[metview] 01/97: Upstream 4.3.11

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Sep 1 09:18:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch master
in repository metview.

commit 786e7e88c7695b549213df71f94324921eb465c1
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Dec 12 15:39:15 2013 +0000

    Upstream 4.3.11
---
 AUTHORS                                            |    44 +
 COPYING                                            |   202 +
 ChangeLog                                          |  2682 ++
 INSTALL                                            |   252 +
 LICENSE                                            |   202 +
 Makefile.am                                        |    58 +
 Makefile.in                                        |   899 +
 NEWS                                               |     0
 NOTICE                                             |   251 +
 README                                             |     0
 aclocal.m4                                         |  9147 ++++++
 aux_build/autotroll.m4                             |   563 +
 aux_build/autotroll.mk                             |   108 +
 config/compile                                     |   142 +
 config/config.guess                                |  1511 +
 config/config.sub                                  |  1705 ++
 config/depcomp                                     |   530 +
 config/install-sh                                  |   323 +
 config/ltmain.sh                                   |  8406 ++++++
 config/missing                                     |   360 +
 config/ylwrap                                      |   223 +
 configure                                          | 28252 +++++++++++++++++++
 configure.ac                                       |  1686 ++
 metview.desktop                                    |    14 +
 rpms/Makefile.am                                   |    26 +
 rpms/Makefile.in                                   |   472 +
 rpms/Metview.spec.in                               |   100 +
 scripts/Makefile.am                                |   114 +
 scripts/Makefile.in                                |   642 +
 scripts/MarsOdbWrapper                             |    70 +
 scripts/MarsScinWrapper                            |    70 +
 scripts/MarsTiggeWrapper                           |    88 +
 scripts/ObstatScatter.magml                        |    90 +
 scripts/ObstatToolWrapper                          |    28 +
 scripts/compile                                    |   126 +
 scripts/compile.src                                |   109 +
 scripts/document_macros.pl                         |   524 +
 scripts/dump                                       |    14 +
 scripts/generate_dictionary.mv                     |    35 +
 scripts/generate_icon_fun_help.mv                  |   190 +
 scripts/generate_list_of_macro_functions.mv        |    42 +
 scripts/generate_video                             |    52 +
 scripts/logrun                                     |    43 +
 scripts/metgramclient.pl                           |   175 +
 scripts/metview-mail                               |   180 +
 scripts/metview_base                               |   847 +
 scripts/metview_create_user_dir                    |    44 +
 scripts/metview_help                               |   199 +
 scripts/metview_local.common                       |   131 +
 scripts/metview_local.ecm_lnx64                    |    49 +
 scripts/metview_local2.common                      |    10 +
 scripts/metview_local2.ecm_lnx64                   |    11 +
 scripts/metview_patches                            |    82 +
 scripts/metview_stat                               |    49 +
 scripts/mv_flextra_prep                            |   339 +
 scripts/mv_flextra_prep.mv                         |   781 +
 scripts/mv_flextra_run                             |   166 +
 scripts/mv_grib_dump                               |    42 +
 scripts/mv_mars_catalog.py                         |    41 +
 scripts/mv_obstat                                  |   292 +
 scripts/mv_odbsql                                  |    53 +
 scripts/mv_odbsql2                                 |    53 +
 scripts/mv_scm_run                                 |   193 +
 scripts/mv_scm_vis.mv                              |   179 +
 scripts/mvrun                                      |   222 +
 scripts/mvrun_c                                    |   281 +
 scripts/mvrun_lnx                                  |   234 +
 scripts/mvusage                                    |    85 +
 scripts/set_mars_env                               |    68 +
 scripts/traj_log                                   |    43 +
 share/metview/Makefile.am                          |    18 +
 share/metview/Makefile.in                          |   658 +
 share/metview/app-defaults/BufrKeyProfile_all.xml  |   193 +
 .../app-defaults/BufrKeyProfile_default.xml        |    42 +
 .../.mvl_plot_scm_data_20121211_1015               |   785 +
 .../.mvl_plot_scm_data_20130121_1343               |   921 +
 .../CommonMacroFuncs/CommonMacroFuncs.proj         |   240 +
 share/metview/app-defaults/CommonMacroFuncs/README |    13 +
 share/metview/app-defaults/CommonMacroFuncs/acc    |    24 +
 .../app-defaults/CommonMacroFuncs/check_mars_order |    55 +
 share/metview/app-defaults/CommonMacroFuncs/clim   |    26 +
 share/metview/app-defaults/CommonMacroFuncs/eps    |    71 +
 .../app-defaults/CommonMacroFuncs/grib_codes       |   155 +
 .../app-defaults/CommonMacroFuncs/load_grib_tools  |    34 +
 .../app-defaults/CommonMacroFuncs/load_list_tools  |    63 +
 .../app-defaults/CommonMacroFuncs/load_metops      |    16 +
 .../CommonMacroFuncs/load_param_classes            |   177 +
 .../CommonMacroFuncs/load_param_classes.keep       |   164 +
 .../CommonMacroFuncs/metops_instanciate            |    29 +
 .../CommonMacroFuncs/mvl_create_netcdf_2d          |   115 +
 .../CommonMacroFuncs/mvl_flextra_etadot            |   173 +
 .../app-defaults/CommonMacroFuncs/mvl_geoline      |    76 +
 .../CommonMacroFuncs/mvl_geopotential_on_ml        |   185 +
 .../app-defaults/CommonMacroFuncs/mvl_ml2hPa       |   144 +
 .../CommonMacroFuncs/mvl_mxn_subframes             |    73 +
 .../CommonMacroFuncs/mvl_plot_scm_data             |  1218 +
 .../CommonMacroFuncs/mvl_regular_layout            |   155 +
 .../CommonMacroFuncs/mvl_regular_layout_area       |    88 +
 .../app-defaults/CommonMacroFuncs/mxn_layout       |    37 +
 share/metview/app-defaults/CommonMacroFuncs/window |    88 +
 share/metview/app-defaults/DemoFonts               |    16 +
 share/metview/app-defaults/Drawers/.Basic          |     8 +
 share/metview/app-defaults/Drawers/.Data Access    |     8 +
 share/metview/app-defaults/Drawers/.Filters        |     8 +
 share/metview/app-defaults/Drawers/.Macros         |     8 +
 share/metview/app-defaults/Drawers/.Modules (Data) |     8 +
 .../app-defaults/Drawers/.Modules (Plotting)       |     8 +
 share/metview/app-defaults/Drawers/.Views          |     8 +
 .../app-defaults/Drawers/.Visual Definitions       |     8 +
 .../app-defaults/Drawers/Basic/.Display Window     |     9 +
 share/metview/app-defaults/Drawers/Basic/.Folder   |     8 +
 share/metview/app-defaults/Drawers/Basic/.Notes    |     6 +
 .../app-defaults/Drawers/Basic/.Shell Script       |     9 +
 .../app-defaults/Drawers/Basic/Display Window      |     4 +
 share/metview/app-defaults/Drawers/Basic/Notes     |     0
 .../app-defaults/Drawers/Basic/Shell Script        |     0
 .../metview/app-defaults/Drawers/Data Access/.Ecfs |     9 +
 .../Drawers/Data Access/.Flextra Prepare           |     5 +
 .../Drawers/Data Access/.Mars Retrieval            |     9 +
 .../app-defaults/Drawers/Data Access/.WmsClient    |     5 +
 .../metview/app-defaults/Drawers/Data Access/Ecfs  |     2 +
 .../Drawers/Data Access/Flextra Prepare            |     2 +
 .../Drawers/Data Access/Mars Retrieval             |     2 +
 .../app-defaults/Drawers/Data Access/WmsClient     |     2 +
 .../app-defaults/Drawers/Filters/.Bufr Picker      |     5 +
 .../app-defaults/Drawers/Filters/.Clean File       |     3 +
 .../app-defaults/Drawers/Filters/.GRIB Filter      |     5 +
 .../app-defaults/Drawers/Filters/.ODB Filter       |     5 +
 .../Drawers/Filters/.Observation Filter            |     9 +
 .../Drawers/Filters/.Opera Radar Filter            |     5 +
 .../app-defaults/Drawers/Filters/.SQL Query        |     5 +
 .../app-defaults/Drawers/Filters/.Table Reader     |     5 +
 .../app-defaults/Drawers/Filters/Bufr Picker       |     1 +
 .../app-defaults/Drawers/Filters/Clean File        |     2 +
 .../app-defaults/Drawers/Filters/GRIB Filter       |     2 +
 .../app-defaults/Drawers/Filters/ODB Filter        |     2 +
 .../Drawers/Filters/Observation Filter             |     2 +
 .../Drawers/Filters/Opera Radar Filter             |     2 +
 .../metview/app-defaults/Drawers/Filters/SQL Query |     0
 .../app-defaults/Drawers/Filters/Table Reader      |     1 +
 share/metview/app-defaults/Drawers/Macros/.Formula |     9 +
 share/metview/app-defaults/Drawers/Macros/.Macro   |     9 +
 .../app-defaults/Drawers/Macros/.Macro Parameters  |     9 +
 .../app-defaults/Drawers/Macros/.Simple Formula    |     9 +
 share/metview/app-defaults/Drawers/Macros/Formula  |     3 +
 share/metview/app-defaults/Drawers/Macros/Macro    |     2 +
 .../app-defaults/Drawers/Macros/Macro Parameters   |     4 +
 .../app-defaults/Drawers/Macros/Simple Formula     |     4 +
 .../Drawers/Modules (Data)/.Average Data           |     5 +
 .../Drawers/Modules (Data)/.Cross Section Data     |     5 +
 .../Drawers/Modules (Data)/.Flextra Run            |     5 +
 .../Drawers/Modules (Data)/.GRIB to Geopoints      |     5 +
 .../Drawers/Modules (Data)/.Geopoints to GRIB      |     5 +
 .../Drawers/Modules (Data)/.Geopoints to KML       |     5 +
 .../Drawers/Modules (Data)/.Hovmoeller Data        |     5 +
 .../Drawers/Modules (Data)/.Percentile             |     5 +
 .../Drawers/Modules (Data)/.Potential Temperature  |     9 +
 .../Modules (Data)/.Rotational or Divergent Wind   |     9 +
 .../app-defaults/Drawers/Modules (Data)/.Scm Run   |     5 +
 .../app-defaults/Drawers/Modules (Data)/.Stations  |     9 +
 .../.Velocity Potential or Stream Fn               |     8 +
 .../Drawers/Modules (Data)/.Vertical Profile Data  |     5 +
 .../Drawers/Modules (Data)/Average Data            |     2 +
 .../Drawers/Modules (Data)/Cross Section Data      |     2 +
 .../Drawers/Modules (Data)/Flextra Run             |     1 +
 .../Drawers/Modules (Data)/GRIB to Geopoints       |     2 +
 .../Drawers/Modules (Data)/Geopoints to GRIB       |     2 +
 .../Drawers/Modules (Data)/Geopoints to KML        |     2 +
 .../Drawers/Modules (Data)/Hovmoeller Data         |     6 +
 .../app-defaults/Drawers/Modules (Data)/Percentile |     2 +
 .../Drawers/Modules (Data)/Potential Temperature   |     6 +
 .../Modules (Data)/Rotational or Divergent Wind    |     5 +
 .../app-defaults/Drawers/Modules (Data)/Scm Run    |     1 +
 .../app-defaults/Drawers/Modules (Data)/Stations   |     2 +
 .../Modules (Data)/Velocity Potential or Stream Fn |     4 +
 .../Drawers/Modules (Data)/Vertical Profile Data   |     2 +
 .../Drawers/Modules (Plotting)/.Data Coverage      |     9 +
 .../Drawers/Modules (Plotting)/.Data Coverage#     |     3 +
 .../Drawers/Modules (Plotting)/.Flextra Visualiser |     5 +
 .../Drawers/Modules (Plotting)/.Grib Vectors       |     5 +
 .../Drawers/Modules (Plotting)/.Input Visualiser   |     5 +
 .../Drawers/Modules (Plotting)/.MagML File         |     5 +
 .../Drawers/Modules (Plotting)/.Meteogram          |     5 +
 .../Drawers/Modules (Plotting)/.NetCDF Visualiser  |     5 +
 .../Drawers/Modules (Plotting)/.Odb Visualiser     |     5 +
 .../Drawers/Modules (Plotting)/.Scm Visualiser     |     5 +
 .../Drawers/Modules (Plotting)/.Table Visualiser   |     5 +
 .../Drawers/Modules (Plotting)/Data Coverage       |     1 +
 .../Drawers/Modules (Plotting)/Flextra Visualiser  |     1 +
 .../Drawers/Modules (Plotting)/Grib Vectors        |     1 +
 .../Drawers/Modules (Plotting)/Input Visualiser    |     1 +
 .../Drawers/Modules (Plotting)/MagML File          |     0
 .../Drawers/Modules (Plotting)/Meteogram           |     2 +
 .../Drawers/Modules (Plotting)/NetCDF Visualiser   |     1 +
 .../Drawers/Modules (Plotting)/Odb Visualiser      |     1 +
 .../Drawers/Modules (Plotting)/Scm Visualiser      |     1 +
 .../Drawers/Modules (Plotting)/Table Visualiser    |     1 +
 .../app-defaults/Drawers/Views/.Average View       |     5 +
 .../app-defaults/Drawers/Views/.Cartesian View     |     5 +
 .../app-defaults/Drawers/Views/.Cross Section View |     5 +
 .../app-defaults/Drawers/Views/.Geographical View  |     5 +
 .../Drawers/Views/.Vertical Profile View           |     5 +
 .../app-defaults/Drawers/Views/Average View        |     1 +
 .../app-defaults/Drawers/Views/Cartesian View      |     2 +
 .../app-defaults/Drawers/Views/Cross Section View  |     1 +
 .../app-defaults/Drawers/Views/Geographical View   |     1 +
 .../Drawers/Views/Vertical Profile View            |     1 +
 .../Drawers/Visual Definitions/.Axis Plotting      |     5 +
 .../Drawers/Visual Definitions/.Binning            |     4 +
 .../Drawers/Visual Definitions/.Coastlines         |     9 +
 .../Drawers/Visual Definitions/.Contouring         |     9 +
 .../Drawers/Visual Definitions/.Graph Plotting     |     5 +
 .../Drawers/Visual Definitions/.Legend             |     5 +
 .../Drawers/Visual Definitions/.Symbol Plotting    |     5 +
 .../Drawers/Visual Definitions/.Text Plotting      |     5 +
 .../Drawers/Visual Definitions/.Wind Plotting      |     5 +
 .../Drawers/Visual Definitions/Axis Plotting       |     1 +
 .../Drawers/Visual Definitions/Binning             |     1 +
 .../Drawers/Visual Definitions/Coastlines          |     2 +
 .../Drawers/Visual Definitions/Contouring          |     2 +
 .../Drawers/Visual Definitions/Graph Plotting      |     1 +
 .../app-defaults/Drawers/Visual Definitions/Legend |     1 +
 .../Drawers/Visual Definitions/Symbol Plotting     |     2 +
 .../Drawers/Visual Definitions/Text Plotting       |     1 +
 .../Drawers/Visual Definitions/Wind Plotting       |     2 +
 share/metview/app-defaults/FrameKeyProfile_all.xml |   268 +
 .../app-defaults/FrameKeyProfile_default.xml       |    11 +
 .../app-defaults/GribKeyProfile_default.xml        |    11 +
 .../app-defaults/LayerKeyProfile_default.xml       |   485 +
 share/metview/app-defaults/Makefile.am             |    31 +
 share/metview/app-defaults/Makefile.in             |   523 +
 share/metview/app-defaults/Metview                 |   101 +
 share/metview/app-defaults/MvVersion               |     1 +
 share/metview/app-defaults/MvVersionDetails        |     1 +
 share/metview/app-defaults/NormalFonts             |     7 +
 .../app-defaults/Templates/.Area Hovmoeller Data   |     3 +
 share/metview/app-defaults/Templates/.Average Data |     3 +
 share/metview/app-defaults/Templates/.Average View |     3 +
 .../metview/app-defaults/Templates/.Cartesian View |     3 +
 share/metview/app-defaults/Templates/.Coastlines   |     3 +
 share/metview/app-defaults/Templates/.Contouring   |     3 +
 .../app-defaults/Templates/.Cross Section Data     |     3 +
 .../app-defaults/Templates/.Cross Section View     |     3 +
 share/metview/app-defaults/Templates/.Datacoverage |     3 +
 .../metview/app-defaults/Templates/.Display Window |     3 +
 .../app-defaults/Templates/.Expand Hovmoeller Data |     3 +
 share/metview/app-defaults/Templates/.Flextra Run  |     3 +
 .../app-defaults/Templates/.Flextra Visualiser     |     3 +
 .../app-defaults/Templates/.Geographical View      |     3 +
 .../app-defaults/Templates/.Geopoints to GRIB      |     3 +
 share/metview/app-defaults/Templates/.Graph Plot   |     3 +
 share/metview/app-defaults/Templates/.Grib Vectors |     3 +
 .../app-defaults/Templates/.Height Hovmoeller Data |     3 +
 .../app-defaults/Templates/.Input Visualiser       |     3 +
 .../app-defaults/Templates/.Line Hovmoeller Data   |     3 +
 share/metview/app-defaults/Templates/.MV3 Contour  |     3 +
 share/metview/app-defaults/Templates/.Map View     |     3 +
 .../metview/app-defaults/Templates/.Mars Retrieval |     3 +
 share/metview/app-defaults/Templates/.Meteogram    |     3 +
 .../app-defaults/Templates/.NetCDF Visualiser      |     3 +
 .../app-defaults/Templates/.Observation Filter     |     3 +
 .../metview/app-defaults/Templates/.Odb Geopoints  |     3 +
 .../metview/app-defaults/Templates/.Odb Geovectors |     3 +
 .../metview/app-defaults/Templates/.Odb Visualiser |     3 +
 share/metview/app-defaults/Templates/.Page         |     3 +
 share/metview/app-defaults/Templates/.Scm Run      |     3 +
 .../metview/app-defaults/Templates/.Scm Visualiser |     3 +
 share/metview/app-defaults/Templates/.Table Reader |     3 +
 .../app-defaults/Templates/.Table Visualiser       |     3 +
 .../app-defaults/Templates/.Vertical Profile Data  |     3 +
 .../app-defaults/Templates/.Vertical Profile View  |     3 +
 share/metview/app-defaults/Templates/.version.txt  |     3 +
 .../Templates/Area Hovmoeller Data/.Data           |     3 +
 .../Templates/Area Hovmoeller Data/.Geo Axis       |     3 +
 .../Templates/Area Hovmoeller Data/.Time Axis      |     3 +
 .../app-defaults/Templates/Average Data/.Data      |     3 +
 .../Templates/Average View/.Horizontal Axis        |     3 +
 .../Templates/Average View/.Vertical Axis          |     3 +
 .../Templates/Cartesian View/.Horizontal Axis      |     3 +
 .../Templates/Cartesian View/.Tephigram Grid       |     3 +
 .../Templates/Cartesian View/.Vertical Axis        |     3 +
 .../Templates/Coastlines/.Land and Sea Shading     |     9 +
 .../Templates/Coastlines/Land and Sea Shading      |     6 +
 .../Templates/Contouring/.Black Contours           |     9 +
 .../app-defaults/Templates/Contouring/.Grid Values |     9 +
 .../Templates/Contouring/.Shaded Contours          |     9 +
 .../Templates/Contouring/Black Contours            |     4 +
 .../app-defaults/Templates/Contouring/Grid Values  |     6 +
 .../Templates/Contouring/Shaded Contours           |     5 +
 .../Templates/Cross Section Data/.Data             |     3 +
 .../Templates/Cross Section View/.Horizontal Axis  |     3 +
 .../Templates/Cross Section View/.Vertical Axis    |     3 +
 .../app-defaults/Templates/Datacoverage/.Data      |     6 +
 .../app-defaults/Templates/Datacoverage/.Symbol    |     6 +
 .../app-defaults/Templates/Display Window/.Pages   |     3 +
 .../Templates/Expand Hovmoeller Data/.Data         |     3 +
 .../Templates/Expand Hovmoeller Data/.Netcdf Data  |     3 +
 .../Templates/Flextra Run/.Flextra Input Data      |     3 +
 .../Templates/Flextra Visualiser/.Flextra Data     |     3 +
 .../Templates/Geographical View/.Coastlines        |     3 +
 .../Templates/Geopoints to GRIB/.Geopoints         |     3 +
 .../Templates/Graph Plot/.Legend Entry             |     3 +
 .../Templates/Grib Vectors/.Colouring Field        |     3 +
 .../app-defaults/Templates/Grib Vectors/.Direction |     3 +
 .../app-defaults/Templates/Grib Vectors/.Intensity |     3 +
 .../Templates/Grib Vectors/.U Component            |     3 +
 .../Templates/Grib Vectors/.V Component            |     3 +
 .../Templates/Height Hovmoeller Data/.Data         |     3 +
 .../Templates/Height Hovmoeller Data/.Height Axis  |     3 +
 .../Templates/Height Hovmoeller Data/.Time Axis    |     3 +
 .../Templates/Input Visualiser/.Input Binning      |     3 +
 .../Templates/Line Hovmoeller Data/.Data           |     3 +
 .../Templates/Line Hovmoeller Data/.Geo Axis       |     3 +
 .../Templates/Line Hovmoeller Data/.Geo2 Axis      |     3 +
 .../Templates/Line Hovmoeller Data/.Time Axis      |     3 +
 .../Templates/MV3 Contour/.Legend Entry            |     3 +
 .../app-defaults/Templates/Map View/.Coastlines    |     6 +
 .../Templates/Map View/.Overlay Control            |     6 +
 .../Mars Retrieval/.2m Temperature Analysis        |     9 +
 .../Templates/Mars Retrieval/.ODB HIRS             |     9 +
 .../Templates/Mars Retrieval/.Obs day-3            |     9 +
 .../Mars Retrieval/.T850 EPS 5-day fc members      |     9 +
 .../Templates/Mars Retrieval/.z500 10-day fc by 6h |     9 +
 .../Mars Retrieval/2m Temperature Analysis         |     5 +
 .../app-defaults/Templates/Mars Retrieval/ODB HIRS |    11 +
 .../Templates/Mars Retrieval/Obs day-3             |     6 +
 .../Mars Retrieval/T850 EPS 5-day fc members       |     9 +
 .../Templates/Mars Retrieval/z500 10-day fc by 6h  |     7 +
 .../app-defaults/Templates/Meteogram/.Station      |     6 +
 .../Templates/NetCDF Visualiser/.Netcdf Data       |     3 +
 .../Templates/Observation Filter/.Data             |     3 +
 .../app-defaults/Templates/Odb Geopoints/.Odb Data |     3 +
 .../Templates/Odb Geovectors/.Odb Data             |     6 +
 .../Templates/Odb Visualiser/.Odb Binning          |     3 +
 .../Templates/Odb Visualiser/.Odb Data             |     3 +
 .../metview/app-defaults/Templates/Page/.Sub Pages |     3 +
 share/metview/app-defaults/Templates/Page/.View    |     3 +
 .../app-defaults/Templates/Scm Run/.Scm Input Data |     3 +
 .../app-defaults/Templates/Scm Run/.Scm Namelist   |     3 +
 .../app-defaults/Templates/Scm Run/.Scm Vtable     |     3 +
 .../Templates/Scm Visualiser/.Compare Data         |     3 +
 .../Templates/Scm Visualiser/.Comparison Data      |     3 +
 .../app-defaults/Templates/Scm Visualiser/.Data    |     3 +
 .../Templates/Scm Visualiser/.Scm Comparison Data  |     3 +
 .../Templates/Scm Visualiser/.Scm Data             |     3 +
 .../app-defaults/Templates/Table Reader/.Data      |     3 +
 .../Templates/Table Visualiser/.Table Binning      |     3 +
 .../Templates/Table Visualiser/.Table Data         |     3 +
 .../Templates/Vertical Profile Data/.Data          |     3 +
 .../Templates/Vertical Profile View/.Pressure Axis |     3 +
 .../Templates/Vertical Profile View/.Value Axis    |     3 +
 share/metview/app-defaults/Templates/version.txt   |     1 +
 share/metview/app-defaults/User_Dir_Frame.tar.gz   |   Bin 0 -> 399578 bytes
 share/metview/app-defaults/metview.qss             |   119 +
 .../app-defaults/news/.Reading Metview Mail        |     7 +
 share/metview/app-defaults/news/.Readme            |     7 +
 share/metview/app-defaults/news/.version           |     1 +
 share/metview/app-defaults/news/About Metview news |     4 +
 .../metview/app-defaults/news/Reading Metview Mail |     3 +
 share/metview/app-defaults/news/Readme             |    19 +
 share/metview/app-defaults/news/add news item      |   204 +
 .../news/articles/Reading Metview Mail             |   112 +
 share/metview/etc/AuxPrepBufrTable_B.txt           |    21 +
 share/metview/etc/AuxPrepBufrTable_D.txt           |    18 +
 share/metview/etc/AxisDef                          |   492 +
 share/metview/etc/AxisRules                        |   162 +
 share/metview/etc/BinningObjectDef                 |    76 +
 share/metview/etc/BinningObjectRules               |    29 +
 share/metview/etc/CartesianViewDef                 |   161 +
 share/metview/etc/CartesianViewRules               |    43 +
 share/metview/etc/CleanFileDef                     |    34 +
 share/metview/etc/CoastDef                         |   204 +
 share/metview/etc/CoastRules                       |    72 +
 share/metview/etc/Coastlines                       |     7 +
 share/metview/etc/CommonMapViewDef.h               |    14 +
 share/metview/etc/CommonMapViewRules.h             |    10 +
 share/metview/etc/ConfigDef                        |   409 +
 share/metview/etc/ConfigRules                      |     3 +
 share/metview/etc/ContDef                          |   758 +
 share/metview/etc/ContRules                        |   284 +
 share/metview/etc/DatacoverageDef                  |    84 +
 share/metview/etc/DatacoverageRules                |     0
 share/metview/etc/DeviceDriverDef                  |   196 +
 share/metview/etc/DeviceDriverRules                |    97 +
 share/metview/etc/DivrotDef                        |   129 +
 share/metview/etc/DivrotRules                      |     1 +
 share/metview/etc/DrawingPriorityDef               |   183 +
 share/metview/etc/DrawingPriorityRules             |     1 +
 share/metview/etc/EPSOutputDef                     |    87 +
 share/metview/etc/EcfsDef                          |    12 +
 share/metview/etc/GenAppDef                        |    59 +
 share/metview/etc/GenAppRules                      |     3 +
 share/metview/etc/GeoToGribDef                     |    60 +
 share/metview/etc/GeoViewDef                       |   109 +
 share/metview/etc/GeoViewRules                     |    23 +
 share/metview/etc/GraphDef                         |   272 +
 share/metview/etc/GraphRules                       |    95 +
 share/metview/etc/GribToGeoDef                     |    19 +
 share/metview/etc/Input_Window                     |     1 +
 share/metview/etc/KMLOutputDef                     |   120 +
 share/metview/etc/MARS_local                       |    18 +
 share/metview/etc/MARS_none                        |     9 +
 share/metview/etc/MARS_remote                      |    26 +
 share/metview/etc/MAXISDef                         |   419 +
 share/metview/etc/MAXISRules                       |    87 +
 share/metview/etc/MAverageViewDef                  |    89 +
 share/metview/etc/MAverageViewRules                |     1 +
 share/metview/etc/MCOASTDef                        |   334 +
 share/metview/etc/MCOASTRules                      |    90 +
 share/metview/etc/MCONTDef                         |   464 +
 share/metview/etc/MCONTRules                       |   306 +
 share/metview/etc/MGRAPHDef                        |   223 +
 share/metview/etc/MGRAPHRules                      |    87 +
 share/metview/etc/MLEGENDDef                       |   263 +
 share/metview/etc/MLEGENDRules                     |    62 +
 share/metview/etc/MSYMBDef                         |   346 +
 share/metview/etc/MSYMBRules                       |    87 +
 share/metview/etc/MTEXTDef                         |   204 +
 share/metview/etc/MTEXTRules                       |    75 +
 share/metview/etc/MVertProfViewDef                 |   111 +
 share/metview/etc/MVertProfViewRules               |     7 +
 share/metview/etc/MWINDDef                         |   268 +
 share/metview/etc/MWINDRules                       |   153 +
 share/metview/etc/MXSectViewDef                    |   109 +
 share/metview/etc/MXSectViewRules                  |     1 +
 share/metview/etc/MacroDef                         |    14 +
 share/metview/etc/MacroParamDef                    |     8 +
 share/metview/etc/MacroParamRules                  |     0
 share/metview/etc/MacroRules                       |     9 +
 share/metview/etc/MagicsColors.h                   |    64 +
 share/metview/etc/Makefile.am                      |   346 +
 share/metview/etc/Makefile.in                      |   954 +
 share/metview/etc/MapViewDef                       |   130 +
 share/metview/etc/MapViewRules                     |    34 +
 share/metview/etc/MarsDef                          |    13 +
 share/metview/etc/MarsG2Def                        |  2142 ++
 share/metview/etc/MarsG2Rules                      |   764 +
 share/metview/etc/MarsOdbDef                       |  7133 +++++
 share/metview/etc/MarsOdbRules                     |   764 +
 share/metview/etc/MarsRules                        |   764 +
 share/metview/etc/MarsTiggeDef                     |  2142 ++
 share/metview/etc/MarsTiggeRules                   |   764 +
 share/metview/etc/ObjectList                       |  2955 ++
 share/metview/etc/ObjectList.forTesting            |    10 +
 share/metview/etc/ObsDef                           |   936 +
 share/metview/etc/ObsFilterDef                     |   467 +
 share/metview/etc/ObsFilterRules                   |    65 +
 share/metview/etc/ObsRules                         |   315 +
 share/metview/etc/OverlayControl                   |    51 +
 share/metview/etc/OverlayControlDef                |    44 +
 share/metview/etc/OverlayControlRules              |    47 +
 share/metview/etc/PDFOutputDef                     |    82 +
 share/metview/etc/PNGOutputDef                     |    82 +
 share/metview/etc/PSOutputDef                      |    87 +
 share/metview/etc/PercentileDef                    |    30 +
 share/metview/etc/PercentileRules                  |     0
 share/metview/etc/PlotPageDef                      |   144 +
 share/metview/etc/PlotPageRules                    |     9 +
 share/metview/etc/PlotSubPageDef                   |    27 +
 share/metview/etc/PlotSubPageRules                 |     0
 share/metview/etc/PlotSuperPageDef                 |    55 +
 share/metview/etc/PlotSuperPageRules               |    19 +
 share/metview/etc/Plot_Window_for_Image            |    21 +
 share/metview/etc/PottFDef                         |   207 +
 share/metview/etc/PottFRules                       |    17 +
 share/metview/etc/SVGOutputDef                     |   101 +
 share/metview/etc/Services                         |   528 +
 share/metview/etc/SimpleFormulaDef                 |   154 +
 share/metview/etc/SimpleFormulaRules               |     0
 share/metview/etc/StationDef                       |   107 +
 share/metview/etc/StationRules                     |    59 +
 share/metview/etc/SubpageFrameDef                  |   157 +
 share/metview/etc/SubpageFrameRules                |    12 +
 share/metview/etc/SymbDef                          |   217 +
 share/metview/etc/SymbRules                        |   121 +
 share/metview/etc/TableCommonDef                   |    29 +
 share/metview/etc/TableReaderDef                   |    35 +
 share/metview/etc/TableReaderRules                 |     0
 share/metview/etc/TextDef                          |   720 +
 share/metview/etc/TextRules                        |   100 +
 share/metview/etc/VelstrDef                        |   100 +
 share/metview/etc/VelstrRules                      |     1 +
 share/metview/etc/VoidDef                          |     4 +
 share/metview/etc/WidgetDef                        |   205 +
 share/metview/etc/WindDef                          |   351 +
 share/metview/etc/WindRules                        |   149 +
 share/metview/etc/dwd.def                          |  1061 +
 share/metview/etc/ecmwf.def                        |  7133 +++++
 share/metview/etc/ifsdata/Makefile.am              |    60 +
 share/metview/etc/ifsdata/Makefile.in              |   549 +
 share/metview/etc/italy.def                        |   664 +
 share/metview/etc/licence_for_about_box.txt        |     4 +
 share/metview/etc/licence_for_macros.txt           |     8 +
 share/metview/etc/macro_built_in_functions.txt     |   304 +
 share/metview/etc/macro_deprecated_functions.txt   |    49 +
 share/metview/etc/macro_icon_function_help.xml     |  2467 ++
 share/metview/etc/macro_templates.txt              |   236 +
 share/metview/etc/mars.chk                         |   764 +
 share/metview/etc/obsgroups.def                    |    41 +
 share/metview/etc/oldrd.chk                        |   102 +
 share/metview/etc/reportypes.def                   |   343 +
 share/metview/etc/rt_by_obsgroup.chk               |   120 +
 share/metview/etc/tigge.def                        |  2142 ++
 share/metview/etc/uPlotTable                       |  1063 +
 share/metview/icons/ALIGN_BOTTOM.xpm               |    23 +
 share/metview/icons/ALIGN_LEFT.xpm                 |    23 +
 share/metview/icons/ALIGN_RIGHT.xpm                |    23 +
 share/metview/icons/ALIGN_TOP.xpm                  |    23 +
 share/metview/icons/BINARY.xpm                     |    37 +
 share/metview/icons/BINNING.xpm                    |   152 +
 share/metview/icons/BUFR.xpm                       |   271 +
 share/metview/icons/BUFRPICKER.xpm                 |   179 +
 share/metview/icons/CARTESIANVIEW.xpm              |   146 +
 share/metview/icons/CLEANFILE.xpm                  |    42 +
 share/metview/icons/COMPUTE.xpm                    |    54 +
 share/metview/icons/DATACOVERAGE.xpm               |    40 +
 share/metview/icons/DISTR_HCENTER.xpm              |    23 +
 share/metview/icons/DISTR_VCENTER.xpm              |    23 +
 share/metview/icons/DIVROT.xpm                     |    39 +
 share/metview/icons/DRAWING_PRIORITY.xpm           |    71 +
 share/metview/icons/ECFS.xpm                       |    44 +
 share/metview/icons/FLEXTRA_FILE.xpm               |   500 +
 share/metview/icons/FLEXTRA_PREPARE.xpm            |   377 +
 share/metview/icons/FLEXTRA_RUN.xpm                |   399 +
 share/metview/icons/FLEXTRA_VISUALISER.xpm         |   419 +
 share/metview/icons/FOLDER.xpm                     |   210 +
 share/metview/icons/GDDRIVER.xpm                   |    82 +
 share/metview/icons/GEOPOINTS.xpm                  |    43 +
 share/metview/icons/GEOVIEW.xpm                    |    40 +
 share/metview/icons/GEO_TO_GRIB.xpm                |   182 +
 share/metview/icons/GIF.xpm                        |   629 +
 share/metview/icons/GRIB.xpm                       |    44 +
 share/metview/icons/GRIBVECTORS.xpm                |    47 +
 share/metview/icons/GRIB_TO_GEO.xpm                |    40 +
 share/metview/icons/GeoToKML.xpm                   |   446 +
 share/metview/icons/HOVMOELLERDATA.xpm             |    42 +
 share/metview/icons/INPUTVISUALISER.xpm            |   153 +
 share/metview/icons/JPEG.xpm                       |    79 +
 share/metview/icons/KML.xpm                        |   159 +
 share/metview/icons/LLMATRIX.xpm                   |    38 +
 share/metview/icons/MACRO.xpm                      |   283 +
 share/metview/icons/MACROPARAM.xpm                 |    44 +
 share/metview/icons/MAGML.xpm                      |   268 +
 share/metview/icons/MAPVIEW.xpm                    |    41 +
 share/metview/icons/MAVERAGEVIEW.xpm               |    44 +
 share/metview/icons/MAXIS.xpm                      |    44 +
 share/metview/icons/MCOAST.xpm                     |    49 +
 share/metview/icons/MCONT.xpm                      |    49 +
 share/metview/icons/MGRAPH.xpm                     |   500 +
 share/metview/icons/MLEGEND.xpm                    |   204 +
 share/metview/icons/MSYMB.xpm                      |    50 +
 share/metview/icons/MTEXT.xpm                      |    47 +
 share/metview/icons/MVPROFVIEW.xpm                 |    41 +
 share/metview/icons/MWIND.xpm                      |    49 +
 share/metview/icons/MXSECTVIEW.xpm                 |    43 +
 share/metview/icons/Makefile.am                    |   191 +
 share/metview/icons/Makefile.in                    |   581 +
 share/metview/icons/MetPlus.xpm                    |   515 +
 share/metview/icons/NAMELIST.xpm                   |   129 +
 share/metview/icons/NETCDF.xpm                     |   135 +
 share/metview/icons/NETCDFPLUS.xpm                 |   207 +
 share/metview/icons/NEWS.xpm                       |    39 +
 share/metview/icons/NOTE.xpm                       |   212 +
 share/metview/icons/OBSFILTER.xpm                  |   158 +
 share/metview/icons/OBSTAT.xpm                     |    23 +
 share/metview/icons/OBSTAT_CURVE.xpm               |   499 +
 share/metview/icons/OBSTAT_SCATTER.xpm             |   552 +
 share/metview/icons/ODB_DB.xpm                     |   558 +
 share/metview/icons/ODB_FILTER.xpm                 |   590 +
 share/metview/icons/ODB_MARS.xpm                   |   473 +
 share/metview/icons/ODB_VISUALISER.xpm             |   577 +
 share/metview/icons/OPERA_RADAR_FILTER.xpm         |   217 +
 share/metview/icons/OVERLAY_CONTROL.xpm            |    72 +
 share/metview/icons/PAXIS.xpm                      |    44 +
 share/metview/icons/PCOAST.xpm                     |    47 +
 share/metview/icons/PCONT.xpm                      |    47 +
 share/metview/icons/PDF.xpm                        |   177 +
 share/metview/icons/PERCENTILE.xpm                 |    37 +
 share/metview/icons/PGRAPH.xpm                     |    47 +
 share/metview/icons/PLOTPAGE.xpm                   |    38 +
 share/metview/icons/PLOTSUBPAGE.xpm                |    39 +
 share/metview/icons/PNG.xpm                        |   184 +
 share/metview/icons/POBS.xpm                       |   185 +
 share/metview/icons/POTTF.xpm                      |    38 +
 share/metview/icons/PSFILE.xpm                     |   164 +
 share/metview/icons/PSOUTPUT.xpm                   |   240 +
 share/metview/icons/PSYMB.xpm                      |    48 +
 share/metview/icons/PTEXT.xpm                      |    48 +
 share/metview/icons/PWIND.xpm                      |    47 +
 share/metview/icons/READ.xpm                       |    48 +
 share/metview/icons/READ_TIGGE.xpm                 |   212 +
 share/metview/icons/REPROJECTION.xpm               |   257 +
 share/metview/icons/RETRIEVE.xpm                   |    45 +
 share/metview/icons/RETRIEVE_TIGGE.xpm             |   172 +
 share/metview/icons/SCM_INPUT_DATA.xpm             |   230 +
 share/metview/icons/SCM_OUTPUT_DATA.xpm            |   230 +
 share/metview/icons/SCM_RUN.xpm                    |   160 +
 share/metview/icons/SCM_VIS.xpm                    |   212 +
 share/metview/icons/SERVICE.xpm                    |   251 +
 share/metview/icons/SHELL.xpm                      |    41 +
 share/metview/icons/SIMPLE_FORMULA.xpm             |    43 +
 share/metview/icons/SQL.xpm                        |   157 +
 share/metview/icons/STATIONS.xpm                   |    42 +
 share/metview/icons/SUBPAGEDETAILS.xpm             |    39 +
 share/metview/icons/SUPERPAGE.xpm                  |    42 +
 share/metview/icons/SVG.xpm                        |   168 +
 share/metview/icons/SVGOUTPUT.xpm                  |   240 +
 share/metview/icons/SYSTEM.xpm                     |   176 +
 share/metview/icons/TABLE.xpm                      |   103 +
 share/metview/icons/TABLEREADER.xpm                |   105 +
 share/metview/icons/TABLEVISUALISER.xpm            |   210 +
 share/metview/icons/TAR.xpm                        |   474 +
 share/metview/icons/TIFF.xpm                       |   293 +
 share/metview/icons/VELSTR.xpm                     |    39 +
 share/metview/icons/VPROFILE.xpm                   |    45 +
 share/metview/icons/WASTEBASKET.xpm                |   149 +
 share/metview/icons/WCS_CLIENT.xpm                 |   293 +
 share/metview/icons/WEBACCESS.xpm                  |   643 +
 share/metview/icons/WMS_CLIENT.xpm                 |   290 +
 share/metview/icons/XAVERAGE.xpm                   |    45 +
 share/metview/icons/XSECTION.xpm                   |    44 +
 share/metview/icons/fix_last_line                  |    14 +
 share/metview/icons/help_area.xpm                  |    22 +
 share/metview/icons/help_line.xpm                  |    22 +
 share/metview/icons/help_map.xpm                   |    22 +
 share/metview/icons/help_point.xpm                 |    22 +
 share/metview/icons/help_station.xpm               |    46 +
 share/metview/icons/lock_icon.xpm                  |    24 +
 share/metview/icons/svg2xpm                        |    10 +
 src/AppMod/Makefile.am                             |    61 +
 src/AppMod/Makefile.in                             |   900 +
 src/AppMod/README                                  |    99 +
 src/AppMod/checkdisplay.cc                         |    31 +
 src/AppMod/examcback.cc                            |   556 +
 src/AppMod/exammain.c                              |   264 +
 src/AppMod/examwidgets.h                           |    29 +
 src/AppMod/mailcback.c                             |   296 +
 src/AppMod/maill.c                                 |  1856 ++
 src/AppMod/maill.l                                 |    18 +
 src/AppMod/mailmain.c                              |   319 +
 src/AppMod/newscback.c                             |   608 +
 src/AppMod/newsmain.c                              |   191 +
 src/AppMod/savepool.cc                             |   430 +
 src/BufrExaminer/BufrExaminer.cc                   |   612 +
 src/BufrExaminer/BufrExaminer.h                    |   101 +
 src/BufrExaminer/BufrMetaData.cc                   |   714 +
 src/BufrExaminer/BufrMetaData.h                    |   184 +
 src/BufrExaminer/Makefile.am                       |    35 +
 src/BufrExaminer/Makefile.in                       |   887 +
 src/BufrExaminer/MvMain.cc                         |    97 +
 src/BufrExaminer/MvQBufrDumpModel.cc               |   521 +
 src/BufrExaminer/MvQBufrDumpModel.h                |   130 +
 src/CptecAccess/CPTECACCESS.xpm                    |   244 +
 src/CptecAccess/CptecAccess.cc                     |   238 +
 src/CptecAccess/CptecAccess.h                      |    35 +
 src/CptecAccess/CptecAccessDef                     |    70 +
 src/CptecAccess/CptecAccessRules                   |     1 +
 src/CptecAccess/Makefile.am                        |    36 +
 src/CptecAccess/Makefile.in                        |   732 +
 src/CptecAccess/ObjectSpec.CptecAccess             |    22 +
 src/Datacoverage/Datacoverage.cc                   |   653 +
 src/Datacoverage/Datacoverage.h                    |   190 +
 src/Datacoverage/Makefile.am                       |    11 +
 src/Datacoverage/Makefile.in                       |   646 +
 src/DebugTools/Makefile.am                         |    18 +
 src/DebugTools/Makefile.in                         |   748 +
 src/DebugTools/cback.c                             |    73 +
 src/DebugTools/moncback.cc                         |   641 +
 src/DebugTools/mvmon.c                             |   431 +
 src/DebugTools/xserv.c                             |   152 +
 src/Divrot/Divrot.cc                               |   291 +
 src/Divrot/Divrot.h                                |   107 +
 src/Divrot/Makefile.am                             |    11 +
 src/Divrot/Makefile.in                             |   647 +
 src/Divrot/divrot-exFortran.cc                     |   663 +
 src/Ecfile/Ecfs.cc                                 |    76 +
 src/Ecfile/Makefile.am                             |    10 +
 src/Ecfile/Makefile.in                             |   629 +
 src/Event/Event.cc                                 |   315 +
 src/Event/Makefile.am                              |    12 +
 src/Event/Makefile.in                              |   752 +
 src/Event/OutputQueue.cc                           |    79 +
 src/Event/ProcessingQueue.cc                       |   110 +
 src/Event/Queue.cc                                 |   124 +
 src/Event/Service.cc                               |   909 +
 src/Event/WaitingQueue.cc                          |   203 +
 src/Event/include/Event.h                          |    47 +
 src/Event/include/OutputQueue.h                    |    40 +
 src/Event/include/ProcessingQueue.h                |    41 +
 src/Event/include/Queue.h                          |    74 +
 src/Event/include/Service.h                        |   118 +
 src/Event/include/WaitingQueue.h                   |    52 +
 src/ExamineManager/Makefile.am                     |    12 +
 src/ExamineManager/Makefile.in                     |   630 +
 src/ExamineManager/MvExamineManager.cc             |   149 +
 src/Flextra/FLEXTRA_FILE.xpm                       |   500 +
 src/Flextra/FLEXTRA_PREPARE.xpm                    |   377 +
 src/Flextra/FLEXTRA_RUN.xpm                        |   399 +
 src/Flextra/FLEXTRA_VISUALISER.xpm                 |   419 +
 src/Flextra/FlexpartRun.cc                         |  1311 +
 src/Flextra/FlexpartRunDef                         |   176 +
 src/Flextra/FlexpartRunRules                       |     6 +
 src/Flextra/FlexpartToGrib.cc                      |    13 +
 src/Flextra/FlextraPrepare.cc                      |   436 +
 src/Flextra/FlextraPrepareDef                      |   102 +
 src/Flextra/FlextraPrepareRules                    |    12 +
 src/Flextra/FlextraRun.cc                          |  1121 +
 src/Flextra/FlextraRunDef                          |   273 +
 src/Flextra/FlextraRunRules                        |    78 +
 src/Flextra/FlextraVisualiser.cc                   |   463 +
 src/Flextra/FlextraVisualiserDef                   |    80 +
 src/Flextra/FlextraVisualiserRules                 |     8 +
 src/Flextra/Makefile.am                            |    82 +
 src/Flextra/Makefile.in                            |   873 +
 src/Flextra/ObjectSpec.Flexpart                    |    43 +
 src/Flextra/ObjectSpec.Flextra                     |   135 +
 src/FlextraExaminer/FlextraExaminer.cc             |   490 +
 src/FlextraExaminer/FlextraExaminer.h              |    86 +
 src/FlextraExaminer/Makefile.am                    |    32 +
 src/FlextraExaminer/Makefile.in                    |   867 +
 src/FlextraExaminer/MvMain.cc                      |    94 +
 src/FlextraExaminer/MvQHighlighter.cc              |   126 +
 src/FlextraExaminer/MvQHighlighter.h               |    39 +
 src/GeopExaminer/GeopExaminer.cc                   |   425 +
 src/GeopExaminer/GeopExaminer.h                    |    87 +
 src/GeopExaminer/Makefile.am                       |    28 +
 src/GeopExaminer/Makefile.in                       |   866 +
 src/GeopExaminer/MvGeoPointsModel.cc               |   104 +
 src/GeopExaminer/MvGeoPointsModel.h                |    40 +
 src/GeopExaminer/MvMain.cc                         |    79 +
 src/GribExaminer/GribExaminer.cc                   |   858 +
 src/GribExaminer/GribExaminer.h                    |   116 +
 src/GribExaminer/Makefile.am                       |    32 +
 src/GribExaminer/Makefile.in                       |   868 +
 src/GribExaminer/MvMain.cc                         |   139 +
 src/GribExaminer/MvQGribDumpModel.cc               |   933 +
 src/GribExaminer/MvQGribDumpModel.h                |   164 +
 src/GribVectors/GRIBVECTORS.xpm                    |    47 +
 src/GribVectors/GribVectorsDef                     |    67 +
 src/GribVectors/GribVectorsRules                   |     7 +
 src/GribVectors/Makefile.am                        |    30 +
 src/GribVectors/Makefile.in                        |   713 +
 src/GribVectors/ObjectSpec.GribVectors             |    29 +
 src/GribVectors/Vectors.cc                         |   108 +
 src/GribVectors/Vectors.h                          |    34 +
 src/Hovmoeller/Factory.cc                          |    66 +
 src/Hovmoeller/Factory.h                           |    70 +
 src/Hovmoeller/HOVMOELLERDATA.xpm                  |    42 +
 src/Hovmoeller/HovToolkit.cc                       |  1899 ++
 src/Hovmoeller/HovToolkit.h                        |   302 +
 src/Hovmoeller/Hovmoeller.cc                       |   138 +
 src/Hovmoeller/Hovmoeller.h                        |    86 +
 src/Hovmoeller/HovmoellerDataDef                   |   285 +
 src/Hovmoeller/Makefile.am                         |    29 +
 src/Hovmoeller/Makefile.in                         |   760 +
 src/Hovmoeller/MvHovmFrame.cc                      |    84 +
 src/Hovmoeller/MvHovmFrame.h                       |    95 +
 src/Hovmoeller/ObjectSpec.Hovmoeller               |    88 +
 src/KML/GeoToKML.cc                                |   352 +
 src/KML/GeoToKML.xpm                               |   446 +
 src/KML/GeoToKMLDef                                |    40 +
 src/KML/GeoToKMLRules                              |     1 +
 src/KML/Makefile.am                                |    31 +
 src/KML/Makefile.in                                |   709 +
 src/KML/ObjectSpec.GeoToKML                        |    33 +
 src/Macro/Makefile.am                              |   105 +
 src/Macro/Makefile.in                              |  1445 +
 src/Macro/Unix.cc                                  |   207 +
 src/Macro/arith.cc                                 |   123 +
 src/Macro/beau.h                                   |   114 +
 src/Macro/beau.ps                                  |   114 +
 src/Macro/beaul.c                                  |  2295 ++
 src/Macro/beaul.l                                  |   181 +
 src/Macro/beautify.c                               |   467 +
 src/Macro/beauy.c                                  |  2243 ++
 src/Macro/beauy.y                                  |   447 +
 src/Macro/bufr.cc                                  |  2295 ++
 src/Macro/codb.cc                                  |   264 +
 src/Macro/code.cc                                  |   312 +
 src/Macro/compute.cc                               |   197 +
 src/Macro/context.cc                               |   552 +
 src/Macro/date.cc                                  |   770 +
 src/Macro/debug.cc                                 |   273 +
 src/Macro/extern.cc                                |   165 +
 src/Macro/files.cc                                 |   407 +
 src/Macro/function.cc                              |    89 +
 src/Macro/grib.cc                                  |  5624 ++++
 src/Macro/image.cc                                 |   672 +
 src/Macro/include/arith.h                          |    23 +
 src/Macro/include/cbufr.h                          |    68 +
 src/Macro/include/cnetcdf.h                        |    49 +
 src/Macro/include/codb.h                           |    54 +
 src/Macro/include/code.h                           |   111 +
 src/Macro/include/cpngjpeg.h                       |    33 +
 src/Macro/include/ctable.h                         |    80 +
 src/Macro/include/date.h                           |    62 +
 src/Macro/include/macro.h                          |   280 +
 src/Macro/include/node.h                           |   107 +
 src/Macro/include/opcodes.h                        |    26 +
 src/Macro/include/script.h                         |   120 +
 src/Macro/include/value.h                          |   603 +
 src/Macro/include/widgets.h                        |    27 +
 src/Macro/library.cc                               |    67 +
 src/Macro/macrol.c                                 |  2356 ++
 src/Macro/macrol.l                                 |   233 +
 src/Macro/macroy.c                                 |  3057 ++
 src/Macro/macroy.y                                 |   830 +
 src/Macro/main.cc                                  |   565 +
 src/Macro/matrix.cc                                |   490 +
 src/Macro/mflextra.cc                              |   396 +
 src/Macro/misc.cc                                  |   865 +
 src/Macro/mlist.cc                                 |   767 +
 src/Macro/module.cc                                |    74 +
 src/Macro/mstring.cc                               |   449 +
 src/Macro/mtable.cc                                |   711 +
 src/Macro/mvector.cc                               |  1551 +
 src/Macro/mvimport.c                               |  1180 +
 src/Macro/netcdf.cc                                |   646 +
 src/Macro/number.cc                                |   366 +
 src/Macro/object.cc                                |   174 +
 src/Macro/perlaccess.cc                            |    90 +
 src/Macro/pngjpeg.cc                               |    38 +
 src/Macro/remote.cc                                |   166 +
 src/Macro/request.cc                               |  1476 +
 src/Macro/script.cc                                |   307 +
 src/Macro/stack.cc                                 |    67 +
 src/Macro/value.cc                                 |   682 +
 src/Macro/variable.cc                              |    57 +
 src/Macro/vis5d.cc                                 |   281 +
 src/Macro/vismod.cc                                |   112 +
 src/MacroEditor/CodeTemplateDialog.cc              |   177 +
 src/MacroEditor/CodeTemplateDialog.h               |    58 +
 src/MacroEditor/CodeTemplateDialog.ui              |   116 +
 src/MacroEditor/FindTextDialog.cc                  |   199 +
 src/MacroEditor/FindTextDialog.h                   |    55 +
 src/MacroEditor/FindTextDialog.ui                  |   162 +
 src/MacroEditor/FunctionListDialog.cc              |   122 +
 src/MacroEditor/FunctionListDialog.h               |    35 +
 src/MacroEditor/FunctionListDialog.ui              |    94 +
 src/MacroEditor/GotoLineDialog.cc                  |    79 +
 src/MacroEditor/GotoLineDialog.h                   |    37 +
 src/MacroEditor/GotoLineDialog.ui                  |    92 +
 src/MacroEditor/Highlighter.cc                     |    30 +
 src/MacroEditor/Highlighter.h                      |    39 +
 src/MacroEditor/LanguageHelper.cc                  |    35 +
 src/MacroEditor/LanguageHelper.h                   |    70 +
 src/MacroEditor/LanguageHelperFactory.cc           |    73 +
 src/MacroEditor/LanguageHelperFactory.h            |    43 +
 src/MacroEditor/MacroEdit.cc                       |  2902 ++
 src/MacroEditor/MacroEdit.h                        |   351 +
 src/MacroEditor/MacroEdit.qrc                      |    22 +
 src/MacroEditor/MacroEdit.ui                       |   840 +
 src/MacroEditor/MacroHelper.cc                     |   314 +
 src/MacroEditor/MacroHelper.h                      |    46 +
 src/MacroEditor/MacroRunOptions.h                  |    31 +
 src/MacroEditor/MagMLHelper.cc                     |   202 +
 src/MacroEditor/MagMLHelper.h                      |    37 +
 src/MacroEditor/Makefile.am                        |    35 +
 src/MacroEditor/Makefile.in                        |  1339 +
 src/MacroEditor/MvMain.cc                          |   186 +
 src/MacroEditor/MvMain.h                           |    12 +
 src/MacroEditor/PlainTextHelper.cc                 |   109 +
 src/MacroEditor/PlainTextHelper.h                  |    36 +
 src/MacroEditor/RunDialog.cc                       |    90 +
 src/MacroEditor/RunDialog.h                        |    39 +
 src/MacroEditor/RunDialog.ui                       |   244 +
 src/MacroEditor/ShellHelper.cc                     |   128 +
 src/MacroEditor/ShellHelper.h                      |    36 +
 src/MacroEditor/TabsDialog.cc                      |   114 +
 src/MacroEditor/TabsDialog.h                       |    39 +
 src/MacroEditor/TabsDialog.ui                      |    96 +
 src/MacroEditor/TabsSettings.h                     |    25 +
 src/MacroEditor/VerbFunctionHelp.cc                |   142 +
 src/MacroEditor/VerbFunctionHelp.h                 |   124 +
 src/MacroEditor/VerbFunctionHelpDialog.cc          |   201 +
 src/MacroEditor/VerbFunctionHelpDialog.h           |    54 +
 src/MacroEditor/VerbFunctionHelpDialog.ui          |   168 +
 src/MacroEditor/mvplaintextedit.cc                 |   396 +
 src/MacroEditor/mvplaintextedit.h                  |   105 +
 src/MagML/MAGML.xpm                                |   268 +
 src/MagML/MagML.cc                                 |   303 +
 src/MagML/Makefile.am                              |    32 +
 src/MagML/Makefile.in                              |   819 +
 src/MagML/ObjectSpec.MagML                         |    22 +
 src/Makefile.am                                    |   100 +
 src/Makefile.in                                    |   778 +
 src/MarsCatalog/MARS_CATALOG.xpm                   |   758 +
 src/MarsCatalog/Makefile.am                        |    69 +
 src/MarsCatalog/Makefile.in                        |  1035 +
 src/MarsCatalog/MvMain.cc                          |    90 +
 src/MarsCatalog/MvQMarsBrowser.cc                  |   590 +
 src/MarsCatalog/MvQMarsBrowser.h                   |    93 +
 src/MarsCatalog/MvQMarsCatalog.cc                  |   411 +
 src/MarsCatalog/MvQMarsCatalog.h                   |    94 +
 src/MarsCatalog/ObjectSpec.MarsCatalog             |    26 +
 src/MarsCatalog/json_spirit.h                      |    20 +
 src/MarsCatalog/json_spirit_reader.cpp             |   755 +
 src/MarsCatalog/json_spirit_reader.h               |    77 +
 src/MarsCatalog/json_spirit_value.cpp              |     8 +
 src/MarsCatalog/json_spirit_value.h                |   558 +
 src/MarsCatalog/json_spirit_writer.cpp             |   329 +
 src/MarsCatalog/json_spirit_writer.h               |    52 +
 src/MarsCatalog/mars.qrc                           |     5 +
 src/Meteogram/Makefile.am                          |    39 +
 src/Meteogram/Makefile.in                          |   735 +
 src/Meteogram/MetPlus.cc                           |   586 +
 src/Meteogram/MetPlus.xpm                          |   515 +
 src/Meteogram/MetPlusDef                           |    57 +
 src/Meteogram/MetPlusRules                         |    13 +
 src/Meteogram/ObjectSpec.Meteogram                 |    29 +
 src/MetviewUI/Action.cc                            |    43 +
 src/MetviewUI/Action.h                             |   114 +
 src/MetviewUI/ActionCommand.cc                     |    35 +
 src/MetviewUI/ActionCommand.h                      |   103 +
 src/MetviewUI/Ask.cc                               |    49 +
 src/MetviewUI/Ask.h                                |   110 +
 src/MetviewUI/BaseTextEditor.cc                    |    81 +
 src/MetviewUI/BaseTextEditor.h                     |   120 +
 src/MetviewUI/Basic.cc                             |   306 +
 src/MetviewUI/Basic.h                              |   128 +
 src/MetviewUI/BoolLine.cc                          |    68 +
 src/MetviewUI/BoolLine.h                           |    52 +
 src/MetviewUI/CatalogDrawer.cc                     |   179 +
 src/MetviewUI/CatalogDrawer.h                      |   118 +
 src/MetviewUI/ColorHelp.cc                         |   137 +
 src/MetviewUI/ColorHelp.h                          |    69 +
 src/MetviewUI/ColorLine.cc                         |    65 +
 src/MetviewUI/ColorLine.h                          |    49 +
 src/MetviewUI/ColorName.cc                         |    65 +
 src/MetviewUI/ColorName.h                          |   124 +
 src/MetviewUI/ColourEditor.cc                      |   245 +
 src/MetviewUI/ColourEditor.h                       |   154 +
 src/MetviewUI/Command.cc                           |    37 +
 src/MetviewUI/Command.h                            |   104 +
 src/MetviewUI/CommandObserver.h                    |   117 +
 src/MetviewUI/ComputeEditor.cc                     |   106 +
 src/MetviewUI/ComputeEditor.h                      |   115 +
 src/MetviewUI/ConfigLoader.cc                      |    46 +
 src/MetviewUI/ConfigLoader.h                       |   113 +
 src/MetviewUI/Confirm.cc                           |    35 +
 src/MetviewUI/Confirm.h                            |   106 +
 src/MetviewUI/Counted.cc                           |    84 +
 src/MetviewUI/Counted.h                            |   155 +
 src/MetviewUI/Dependancy.cc                        |    20 +
 src/MetviewUI/Dependancy.h                         |   126 +
 src/MetviewUI/Dialog.cc                            |    80 +
 src/MetviewUI/Dialog.h                             |    81 +
 src/MetviewUI/DragWindow.cc                        |   479 +
 src/MetviewUI/DragWindow.h                         |   190 +
 src/MetviewUI/Drawer.cc                            |    43 +
 src/MetviewUI/Drawer.h                             |   120 +
 src/MetviewUI/Drop.cc                              |   120 +
 src/MetviewUI/Drop.h                               |   123 +
 src/MetviewUI/DropSite.cc                          |    76 +
 src/MetviewUI/DropSite.h                           |   115 +
 src/MetviewUI/Dropping.cc                          |    36 +
 src/MetviewUI/Dropping.h                           |   118 +
 src/MetviewUI/EditTransaction.cc                   |   127 +
 src/MetviewUI/EditTransaction.h                    |    94 +
 src/MetviewUI/Editor.cc                            |   126 +
 src/MetviewUI/Editor.h                             |   130 +
 src/MetviewUI/EditorButton.cc                      |    48 +
 src/MetviewUI/EditorButton.h                       |   136 +
 src/MetviewUI/EditorDrawer.cc                      |    29 +
 src/MetviewUI/EditorDrawer.h                       |   128 +
 src/MetviewUI/EditorDrawerFactory.cc               |    45 +
 src/MetviewUI/EditorDrawerFactory.h                |   121 +
 src/MetviewUI/EditorFactory.cc                     |    79 +
 src/MetviewUI/EditorFactory.h                      |   115 +
 src/MetviewUI/EditorMsgDrawer.h                    |   111 +
 src/MetviewUI/EditorObserver.h                     |    27 +
 src/MetviewUI/EditorTool.cc                        |    26 +
 src/MetviewUI/EditorTool.h                         |   129 +
 src/MetviewUI/EditorToolFactory.cc                 |    46 +
 src/MetviewUI/EditorToolFactory.h                  |   117 +
 src/MetviewUI/Error.h                              |   117 +
 src/MetviewUI/Extent.h                             |   150 +
 src/MetviewUI/ExternalEditor.cc                    |    57 +
 src/MetviewUI/ExternalEditor.h                     |   130 +
 src/MetviewUI/ExternalHelp.cc                      |    78 +
 src/MetviewUI/ExternalHelp.h                       |    69 +
 src/MetviewUI/ExternalServiceEditor.cc             |    39 +
 src/MetviewUI/ExternalServiceEditor.h              |    50 +
 src/MetviewUI/ExternalTextEditor.cc                |    37 +
 src/MetviewUI/ExternalTextEditor.h                 |   112 +
 src/MetviewUI/Family.cc                            |    84 +
 src/MetviewUI/Family.h                             |   129 +
 src/MetviewUI/FamilyDrawer.h                       |   136 +
 src/MetviewUI/FamilyEditor.cc                      |   229 +
 src/MetviewUI/FamilyEditor.h                       |   160 +
 src/MetviewUI/FamilyHelper.cc                      |   134 +
 src/MetviewUI/FamilyHelper.h                       |   136 +
 src/MetviewUI/FileObject.cc                        |    64 +
 src/MetviewUI/FileObject.h                         |   123 +
 src/MetviewUI/FileSelection.cc                     |    71 +
 src/MetviewUI/FileSelection.h                      |   123 +
 src/MetviewUI/Folder.cc                            |   494 +
 src/MetviewUI/Folder.h                             |   169 +
 src/MetviewUI/FolderDrawers.cc                     |   157 +
 src/MetviewUI/FolderDrawers.h                      |   141 +
 src/MetviewUI/FolderMsgDrawer.h                    |   111 +
 src/MetviewUI/FolderObserver.h                     |    40 +
 src/MetviewUI/FolderView.h                         |     9 +
 src/MetviewUI/FolderViewer.cc                      |   238 +
 src/MetviewUI/FolderViewer.h                       |   160 +
 src/MetviewUI/FolderWindow.cc                      |   477 +
 src/MetviewUI/FolderWindow.h                       |   202 +
 src/MetviewUI/GridDrawer.cc                        |   105 +
 src/MetviewUI/GridDrawer.h                         |   121 +
 src/MetviewUI/HSLMaker.h                           |    62 +
 src/MetviewUI/Help.cc                              |    23 +
 src/MetviewUI/Help.h                               |   114 +
 src/MetviewUI/HelpFactory.cc                       |    49 +
 src/MetviewUI/HelpFactory.h                        |   113 +
 src/MetviewUI/IconClass.cc                         |   530 +
 src/MetviewUI/IconClass.h                          |   166 +
 src/MetviewUI/IconDrawer.cc                        |   114 +
 src/MetviewUI/IconDrawer.h                         |   130 +
 src/MetviewUI/IconFactory.cc                       |   152 +
 src/MetviewUI/IconFactory.h                        |   125 +
 src/MetviewUI/IconHelp.cc                          |   154 +
 src/MetviewUI/IconHelp.h                           |    80 +
 src/MetviewUI/IconHolder.cc                        |   124 +
 src/MetviewUI/IconHolder.h                         |   136 +
 src/MetviewUI/IconInfo.cc                          |    56 +
 src/MetviewUI/IconInfo.h                           |   117 +
 src/MetviewUI/IconLine.cc                          |   170 +
 src/MetviewUI/IconLine.h                           |   140 +
 src/MetviewUI/IconObject.cc                        |   805 +
 src/MetviewUI/IconObject.h                         |   285 +
 src/MetviewUI/IconObserver.h                       |    29 +
 src/MetviewUI/IconSelection.cc                     |    90 +
 src/MetviewUI/IconSelection.h                      |   123 +
 src/MetviewUI/Input.cc                             |    61 +
 src/MetviewUI/Input.h                              |   124 +
 src/MetviewUI/InternalEditor.cc                    |   287 +
 src/MetviewUI/InternalEditor.h                     |   175 +
 src/MetviewUI/InternalService.cc                   |    35 +
 src/MetviewUI/InternalService.h                    |   111 +
 src/MetviewUI/InternalTask.cc                      |   124 +
 src/MetviewUI/InternalTask.h                       |   138 +
 src/MetviewUI/Items.cc                             |   160 +
 src/MetviewUI/Items.h                              |   131 +
 src/MetviewUI/Language.cc                          |   251 +
 src/MetviewUI/Language.h                           |   138 +
 src/MetviewUI/LayoutDrawer.cc                      |    74 +
 src/MetviewUI/LayoutDrawer.h                       |   122 +
 src/MetviewUI/LineFactory.cc                       |    51 +
 src/MetviewUI/LineFactory.h                        |   114 +
 src/MetviewUI/ListHelp.cc                          |    78 +
 src/MetviewUI/ListHelp.h                           |    65 +
 src/MetviewUI/Log.cc                               |   125 +
 src/MetviewUI/Log.h                                |   128 +
 src/MetviewUI/LogWindow.cc                         |   184 +
 src/MetviewUI/LogWindow.h                          |   136 +
 src/MetviewUI/MacroEditor.cc                       |   287 +
 src/MetviewUI/MacroEditor.h                        |   134 +
 src/MetviewUI/MacroParam.cc                        |   103 +
 src/MetviewUI/MacroParam.h                         |   128 +
 src/MetviewUI/MacroParamEditor.cc                  |   230 +
 src/MetviewUI/MacroParamEditor.h                   |   199 +
 src/MetviewUI/MacroParamState.cc                   |   121 +
 src/MetviewUI/MacroParamState.h                    |   125 +
 src/MetviewUI/MacroRunTask.cc                      |   120 +
 src/MetviewUI/MacroRunTask.h                       |   134 +
 src/MetviewUI/Makefile.am                          |   419 +
 src/MetviewUI/Makefile.in                          |  4368 +++
 src/MetviewUI/MenuLine.cc                          |    86 +
 src/MetviewUI/MenuLine.h                           |    54 +
 src/MetviewUI/Message.h                            |    44 +
 src/MetviewUI/MessageObserver.cc                   |    65 +
 src/MetviewUI/MessageObserver.h                    |   125 +
 src/MetviewUI/MethodCommand.cc                     |    38 +
 src/MetviewUI/MethodCommand.h                      |   104 +
 src/MetviewUI/MetviewService.cc                    |    31 +
 src/MetviewUI/MetviewService.h                     |   111 +
 src/MetviewUI/MetviewTask.cc                       |   167 +
 src/MetviewUI/MetviewTask.h                        |   146 +
 src/MetviewUI/MetviewUI.cc                         |    92 +
 src/MetviewUI/MetviewUI.h                          |   108 +
 src/MetviewUI/MotifDrop.cc                         |   168 +
 src/MetviewUI/MotifDrop.h                          |   130 +
 src/MetviewUI/Netscape.cc                          |    91 +
 src/MetviewUI/Netscape.h                           |   100 +
 src/MetviewUI/NoEditor.cc                          |    54 +
 src/MetviewUI/NoEditor.h                           |   117 +
 src/MetviewUI/NoneLine.cc                          |    55 +
 src/MetviewUI/NoneLine.h                           |    47 +
 src/MetviewUI/ODBEditor.cc                         |   321 +
 src/MetviewUI/ODBEditor.h                          |   147 +
 src/MetviewUI/ODBFunctionsDrawer.cc                |   102 +
 src/MetviewUI/ODBFunctionsDrawer.h                 |   115 +
 src/MetviewUI/OutputDrawer.cc                      |    65 +
 src/MetviewUI/OutputDrawer.h                       |   114 +
 src/MetviewUI/PageView.cc                          |    80 +
 src/MetviewUI/PageView.h                           |   151 +
 src/MetviewUI/PaperDrawer.cc                       |    81 +
 src/MetviewUI/PaperDrawer.h                        |   116 +
 src/MetviewUI/ParamList.cc                         |    89 +
 src/MetviewUI/ParamList.h                          |   125 +
 src/MetviewUI/Parameter.cc                         |   222 +
 src/MetviewUI/Parameter.h                          |   148 +
 src/MetviewUI/PlotModHelp.cc                       |    99 +
 src/MetviewUI/PlotModHelp.h                        |    75 +
 src/MetviewUI/Protocol.cc                          |    36 +
 src/MetviewUI/Protocol.h                           |   126 +
 src/MetviewUI/QtMacroEditor.cc                     |   128 +
 src/MetviewUI/QtMacroEditor.h                      |   147 +
 src/MetviewUI/QtOgcClientEditor.cc                 |   157 +
 src/MetviewUI/QtOgcClientEditor.h                  |   147 +
 src/MetviewUI/QtScmEditor.cc                       |   128 +
 src/MetviewUI/QtScmEditor.h                        |    63 +
 src/MetviewUI/QtStackedEditor.cc                   |   171 +
 src/MetviewUI/QtStackedEditor.h                    |   147 +
 src/MetviewUI/Queue.cc                             |    80 +
 src/MetviewUI/Queue.h                              |   140 +
 src/MetviewUI/RGBMaker.h                           |    62 +
 src/MetviewUI/Rainbow.cc                           |    68 +
 src/MetviewUI/Rainbow.h                            |   118 +
 src/MetviewUI/Recents.cc                           |   115 +
 src/MetviewUI/Recents.h                            |   123 +
 src/MetviewUI/ReplyObserver.cc                     |    80 +
 src/MetviewUI/ReplyObserver.h                      |   132 +
 src/MetviewUI/RequestPanel.cc                      |   208 +
 src/MetviewUI/RequestPanel.h                       |   157 +
 src/MetviewUI/RequestPanelHelp.cc                  |    46 +
 src/MetviewUI/RequestPanelHelp.h                   |   133 +
 src/MetviewUI/RequestPanelItem.cc                  |   114 +
 src/MetviewUI/RequestPanelItem.h                   |    88 +
 src/MetviewUI/RequestPanelLine.cc                  |   149 +
 src/MetviewUI/RequestPanelLine.h                   |   121 +
 src/MetviewUI/ResolveTransaction.cc                |    76 +
 src/MetviewUI/ResolveTransaction.h                 |   134 +
 src/MetviewUI/Resources.cc                         |    64 +
 src/MetviewUI/Resources.h                          |    96 +
 src/MetviewUI/RetrieveEditor.cc                    |    27 +
 src/MetviewUI/RetrieveEditor.h                     |   100 +
 src/MetviewUI/RootFolder.cc                        |    50 +
 src/MetviewUI/RootFolder.h                         |   112 +
 src/MetviewUI/Runnable.cc                          |    61 +
 src/MetviewUI/Runnable.h                           |   127 +
 src/MetviewUI/SQLDrawer.cc                         |    39 +
 src/MetviewUI/SQLDrawer.h                          |   113 +
 src/MetviewUI/ScaleLine.cc                         |    84 +
 src/MetviewUI/ScaleLine.h                          |    55 +
 src/MetviewUI/ScriptHelp.cc                        |   101 +
 src/MetviewUI/ScriptHelp.h                         |    58 +
 src/MetviewUI/ScrolledText.cc                      |   125 +
 src/MetviewUI/ScrolledText.h                       |    57 +
 src/MetviewUI/Service.cc                           |    52 +
 src/MetviewUI/Service.h                            |   116 +
 src/MetviewUI/ShellService.cc                      |    31 +
 src/MetviewUI/ShellService.h                       |   111 +
 src/MetviewUI/ShellTask.cc                         |    91 +
 src/MetviewUI/ShellTask.h                          |   129 +
 src/MetviewUI/SimpleDroppin.h                      |     9 +
 src/MetviewUI/SimpleEditor.cc                      |    96 +
 src/MetviewUI/SimpleEditor.h                       |   132 +
 src/MetviewUI/SimpleEditorObserver.h               |   134 +
 src/MetviewUI/Singleton.h                          |    31 +
 src/MetviewUI/State.cc                             |    73 +
 src/MetviewUI/State.h                              |    27 +
 src/MetviewUI/StationaryDrawers.cc                 |    79 +
 src/MetviewUI/StationaryDrawers.h                  |   115 +
 src/MetviewUI/StringLine.cc                        |   100 +
 src/MetviewUI/StringLine.h                         |    58 +
 src/MetviewUI/SyncFolders.cc                       |   297 +
 src/MetviewUI/SyncFolders.h                        |   139 +
 src/MetviewUI/SynchFolders.h                       |     9 +
 src/MetviewUI/SystemFolder.cc                      |    36 +
 src/MetviewUI/SystemFolder.h                       |   110 +
 src/MetviewUI/Task.cc                              |    49 +
 src/MetviewUI/Task.h                               |   140 +
 src/MetviewUI/TaskObserver.h                       |    28 +
 src/MetviewUI/TeeBuffer.cc                         |    61 +
 src/MetviewUI/TeeBuffer.h                          |   112 +
 src/MetviewUI/TeeStream.cc                         |    27 +
 src/MetviewUI/TeeStream.h                          |   107 +
 src/MetviewUI/TempIconClass.cc                     |    44 +
 src/MetviewUI/TempIconClass.h                      |   130 +
 src/MetviewUI/TemplateDrawer.cc                    |   158 +
 src/MetviewUI/TemplateDrawer.h                     |   153 +
 src/MetviewUI/Temporary.cc                         |   146 +
 src/MetviewUI/Temporary.h                          |   146 +
 src/MetviewUI/TemporaryFolder.cc                   |    46 +
 src/MetviewUI/TemporaryFolder.h                    |   104 +
 src/MetviewUI/TextEditor.cc                        |    27 +
 src/MetviewUI/TextEditor.h                         |   105 +
 src/MetviewUI/TextLine.cc                          |   125 +
 src/MetviewUI/TextLine.h                           |    57 +
 src/MetviewUI/Timeout.cc                           |    80 +
 src/MetviewUI/Timeout.h                            |   113 +
 src/MetviewUI/Tools.cc                             |    78 +
 src/MetviewUI/Tools.h                              |   126 +
 src/MetviewUI/Transaction.cc                       |    43 +
 src/MetviewUI/Transaction.h                        |   125 +
 src/MetviewUI/UIAsk.cc                             |    93 +
 src/MetviewUI/UIAsk.h                              |    43 +
 src/MetviewUI/UIBoolLine.cc                        |    87 +
 src/MetviewUI/UIBoolLine.h                         |    38 +
 src/MetviewUI/UICatalogDrawer.cc                   |   174 +
 src/MetviewUI/UICatalogDrawer.h                    |    45 +
 src/MetviewUI/UIColorHelp.cc                       |   235 +
 src/MetviewUI/UIColorHelp.h                        |    57 +
 src/MetviewUI/UIColorLine.cc                       |    71 +
 src/MetviewUI/UIColorLine.h                        |    34 +
 src/MetviewUI/UIColorName.cc                       |    93 +
 src/MetviewUI/UIColorName.h                        |    38 +
 src/MetviewUI/UIColourEditor.cc                    |   333 +
 src/MetviewUI/UIColourEditor.h                     |    58 +
 src/MetviewUI/UIConfirm.cc                         |    88 +
 src/MetviewUI/UIConfirm.h                          |    42 +
 src/MetviewUI/UIEditor.cc                          |   256 +
 src/MetviewUI/UIEditor.h                           |    49 +
 src/MetviewUI/UIFamilyEditor.cc                    |    79 +
 src/MetviewUI/UIFamilyEditor.h                     |    37 +
 src/MetviewUI/UIFileSelection.cc                   |    89 +
 src/MetviewUI/UIFileSelection.h                    |    42 +
 src/MetviewUI/UIFolderWindow.cc                    |   490 +
 src/MetviewUI/UIFolderWindow.h                     |    76 +
 src/MetviewUI/UIGridDrawer.cc                      |   335 +
 src/MetviewUI/UIGridDrawer.h                       |    46 +
 src/MetviewUI/UIIconDrawer.cc                      |   241 +
 src/MetviewUI/UIIconDrawer.h                       |    53 +
 src/MetviewUI/UIIconHelp.cc                        |   181 +
 src/MetviewUI/UIIconHelp.h                         |    46 +
 src/MetviewUI/UIIconLine.cc                        |   200 +
 src/MetviewUI/UIIconLine.h                         |    48 +
 src/MetviewUI/UIIconSelection.cc                   |   104 +
 src/MetviewUI/UIIconSelection.h                    |    43 +
 src/MetviewUI/UILayoutDrawer.cc                    |   301 +
 src/MetviewUI/UILayoutDrawer.h                     |    55 +
 src/MetviewUI/UILine.cc                            |   159 +
 src/MetviewUI/UILine.h                             |    46 +
 src/MetviewUI/UIListHelp.cc                        |   110 +
 src/MetviewUI/UIListHelp.h                         |    43 +
 src/MetviewUI/UILogWindow.cc                       |   152 +
 src/MetviewUI/UILogWindow.h                        |    42 +
 src/MetviewUI/UIMenuLine.cc                        |    93 +
 src/MetviewUI/UIMenuLine.h                         |    38 +
 src/MetviewUI/UINoEditor.cc                        |    72 +
 src/MetviewUI/UINoEditor.h                         |    33 +
 src/MetviewUI/UINoneLine.cc                        |    54 +
 src/MetviewUI/UINoneLine.h                         |    33 +
 src/MetviewUI/UIODBEditor.cc                       |   388 +
 src/MetviewUI/UIODBEditor.h                        |    66 +
 src/MetviewUI/UIODBFunctionsDrawer.cc              |   206 +
 src/MetviewUI/UIODBFunctionsDrawer.h               |    42 +
 src/MetviewUI/UIOutputDrawer.cc                    |    87 +
 src/MetviewUI/UIOutputDrawer.h                     |    37 +
 src/MetviewUI/UIPaperDrawer.cc                     |   170 +
 src/MetviewUI/UIPaperDrawer.h                      |    44 +
 src/MetviewUI/UIParamEditor.cc                     |   209 +
 src/MetviewUI/UIParamEditor.h                      |    42 +
 src/MetviewUI/UIRequestPanel.cc                    |   107 +
 src/MetviewUI/UIRequestPanel.h                     |    35 +
 src/MetviewUI/UISQLDrawer.cc                       |    78 +
 src/MetviewUI/UISQLDrawer.h                        |    34 +
 src/MetviewUI/UIScaleLine.cc                       |    80 +
 src/MetviewUI/UIScaleLine.h                        |    37 +
 src/MetviewUI/UIScriptHelp.cc                      |   137 +
 src/MetviewUI/UIScriptHelp.h                       |    39 +
 src/MetviewUI/UIScrolledText.cc                    |   103 +
 src/MetviewUI/UIScrolledText.h                     |    43 +
 src/MetviewUI/UISimpleEditor.cc                    |    69 +
 src/MetviewUI/UISimpleEditor.h                     |    34 +
 src/MetviewUI/UISyncFolders.cc                     |   323 +
 src/MetviewUI/UISyncFolders.h                      |    60 +
 src/MetviewUI/UITemplateDrawer.cc                  |   173 +
 src/MetviewUI/UITemplateDrawer.h                   |    49 +
 src/MetviewUI/UITextEditor.cc                      |   109 +
 src/MetviewUI/UITextEditor.h                       |    38 +
 src/MetviewUI/UITextLine.cc                        |    87 +
 src/MetviewUI/UITextLine.h                         |    39 +
 src/MetviewUI/UIViewEditor.cc                      |   144 +
 src/MetviewUI/UIViewEditor.h                       |    51 +
 src/MetviewUI/UIViewsDrawer.cc                     |   147 +
 src/MetviewUI/UIViewsDrawer.h                      |    43 +
 src/MetviewUI/Unknown.cc                           |    40 +
 src/MetviewUI/Unknown.h                            |   119 +
 src/MetviewUI/UserMessage.cc                       |    43 +
 src/MetviewUI/UserMessage.h                        |    42 +
 src/MetviewUI/VariableEditor.h                     |   145 +
 src/MetviewUI/VariableTask.h                       |   132 +
 src/MetviewUI/ViewEditor.cc                        |   590 +
 src/MetviewUI/ViewEditor.h                         |   203 +
 src/MetviewUI/ViewsDrawer.cc                       |   136 +
 src/MetviewUI/ViewsDrawer.h                        |   152 +
 src/MetviewUI/Wastebasket.cc                       |    59 +
 src/MetviewUI/Wastebasket.h                        |   111 +
 src/MetviewUI/XMLabel.cc                           |    34 +
 src/MetviewUI/XMLabel.h                            |   113 +
 src/MetviewUI/XMList.cc                            |   176 +
 src/MetviewUI/XMList.h                             |   132 +
 src/MetviewUI/XMString.cc                          |   141 +
 src/MetviewUI/XMString.h                           |   132 +
 src/MetviewUI/XMText.cc                            |   134 +
 src/MetviewUI/XMText.h                             |   131 +
 src/MetviewUI/XPalette.cc                          |   196 +
 src/MetviewUI/XPalette.h                           |   121 +
 src/MetviewUI/XPixmap.cc                           |    68 +
 src/MetviewUI/XPixmap.h                            |   124 +
 src/MetviewUI/XResource.cc                         |    45 +
 src/MetviewUI/XResource.h                          |   206 +
 src/MetviewUI/auto_ptr.h                           |    52 +
 src/MetviewUI/main.cc                              |    39 +
 src/MvApp/Makefile.am                              |    82 +
 src/MvApp/Makefile.in                              |   755 +
 src/MvApp/MarsG2.cc                                |   363 +
 src/MvApp/ODB_MARS.xpm                             |   473 +
 src/MvApp/ObjectSpec.MarsOdb                       |    30 +
 src/MvApp/geo_to_grib.cc                           |   391 +
 src/MvApp/grib_to_geo.cc                           |   168 +
 src/MvApp/pool.cc                                  |   309 +
 src/MvApp/togrib.cc                                |   105 +
 src/MvApp/tomatrix.cc                              |   362 +
 src/NcExaminer/Makefile.am                         |    28 +
 src/NcExaminer/Makefile.in                         |   847 +
 src/NcExaminer/MvMain.cc                           |    80 +
 src/NcExaminer/NcExaminer.cc                       |   585 +
 src/NcExaminer/NcExaminer.h                        |    81 +
 src/ObsFilter/BufrPicker.cc                        |   464 +
 src/ObsFilter/BufrPickerDef                        |   154 +
 src/ObsFilter/BufrPickerRules                      |     5 +
 src/ObsFilter/CleanFile.cc                         |   213 +
 src/ObsFilter/Makefile.am                          |    38 +
 src/ObsFilter/Makefile.in                          |   714 +
 src/ObsFilter/ObjectSpec.BufrPicker                |    28 +
 src/ObsFilter/ObsFilter.cc                         |   793 +
 src/Obstat/Makefile.am                             |    35 +
 src/Obstat/Makefile.in                             |   713 +
 src/Obstat/MvMain.cc                               |   167 +
 src/Obstat/OBSTAT.xpm                              |    23 +
 src/Obstat/ObjectSpec.Obstat                       |    28 +
 src/Obstat/ObstatDef                               |   120 +
 src/ObstatCurveTool/Makefile.am                    |    52 +
 src/ObstatCurveTool/Makefile.in                    |   961 +
 src/ObstatCurveTool/MvMain.cc                      |   143 +
 src/ObstatCurveTool/MvQObstatCurveData.cc          |   445 +
 src/ObstatCurveTool/MvQObstatCurveData.h           |    66 +
 src/ObstatCurveTool/MvQObstatCurveTool.cc          |   218 +
 src/ObstatCurveTool/MvQObstatCurveTool.h           |    58 +
 src/ObstatCurveTool/MvQObstatCurveTool.moc.cpp     |    88 +
 src/ObstatCurveTool/MvQObstatCurveToolBase.cc      |   501 +
 src/ObstatCurveTool/MvQObstatCurveToolBase.h       |    97 +
 src/ObstatCurveTool/MvQObstatCurveToolBase.moc.cpp |    99 +
 src/ObstatCurveTool/OBSTAT_CURVE.xpm               |   499 +
 src/ObstatCurveTool/ObjectSpec.ObstatCurve         |    27 +
 src/ObstatScatterTool/Makefile.am                  |    51 +
 src/ObstatScatterTool/Makefile.in                  |   943 +
 src/ObstatScatterTool/MvMain.cc                    |   143 +
 src/ObstatScatterTool/MvQObstatScatterTool.cc      |   219 +
 src/ObstatScatterTool/MvQObstatScatterTool.h       |    56 +
 src/ObstatScatterTool/MvQObstatScatterTool.moc.cpp |    88 +
 src/ObstatScatterTool/MvQObstatScatterToolBase.cc  |   945 +
 src/ObstatScatterTool/MvQObstatScatterToolBase.h   |   141 +
 .../MvQObstatScatterToolBase.moc.cpp               |   139 +
 src/ObstatScatterTool/OBSTAT_SCATTER.xpm           |   552 +
 src/ObstatScatterTool/ObjectSpec.ObstatScatter     |    27 +
 src/Odb/Makefile.am                                |    49 +
 src/Odb/Makefile.in                                |   752 +
 src/Odb/ODB_FILTER.xpm                             |   590 +
 src/Odb/ODB_VISUALISER.xpm                         |   577 +
 src/Odb/ObjectSpec.Odb                             |   144 +
 src/Odb/OdbFilter.cc                               |   416 +
 src/Odb/OdbFilterDef                               |    16 +
 src/Odb/OdbFilterRules                             |     0
 src/Odb/OdbVisualiser.cc                           |   630 +
 src/Odb/OdbVisualiserDef                           |   109 +
 src/Odb/OdbVisualiserRules                         |    34 +
 src/OdbExaminer/Makefile.am                        |    47 +
 src/OdbExaminer/Makefile.in                        |   961 +
 src/OdbExaminer/MvMain.cc                          |   149 +
 src/OdbExaminer/MvQOdbStat.h                       |    39 +
 src/OdbExaminer/MvQOdbStatModel.cc                 |   126 +
 src/OdbExaminer/MvQOdbStatModel.h                  |    50 +
 src/OdbExaminer/MvQOdbTableView.cc                 |   338 +
 src/OdbExaminer/MvQOdbTableView.h                  |    77 +
 src/OdbExaminer/ObjectSpec.OdbExaminer             |    12 +
 src/OdbExaminer/OdbExaminer.cc                     |   622 +
 src/OdbExaminer/OdbExaminer.h                      |   116 +
 src/OgcClient/Makefile.am                          |    96 +
 src/OgcClient/Makefile.in                          |  1270 +
 src/OgcClient/MvMain.cc                            |   335 +
 src/OgcClient/MvMainWcsClient.cc                   |   213 +
 src/OgcClient/MvQHighlighter.cc                    |   216 +
 src/OgcClient/MvQHighlighter.h                     |    66 +
 src/OgcClient/MvQOgcClient.qrc                     |     8 +
 src/OgcClient/MvQOgcParam.cc                       |   595 +
 src/OgcClient/MvQOgcParam.h                        |   333 +
 src/OgcClient/MvQOgcRequest.cc                     |  1109 +
 src/OgcClient/MvQOgcRequest.h                      |   108 +
 src/OgcClient/MvQOgcTreeModel.cc                   |   154 +
 src/OgcClient/MvQOgcTreeModel.h                    |    43 +
 src/OgcClient/MvQWcsClient.cc                      |  2088 ++
 src/OgcClient/MvQWcsClient.h                       |   290 +
 src/OgcClient/MvQWcsClientEditor.cc                |  1463 +
 src/OgcClient/MvQWcsClientEditor.h                 |   178 +
 src/OgcClient/MvQWmsClient.cc                      |  2947 ++
 src/OgcClient/MvQWmsClient.h                       |   338 +
 src/OgcClient/MvQWmsClientEditor.cc                |  1892 ++
 src/OgcClient/MvQWmsClientEditor.h                 |   215 +
 src/OgcClient/ObjectSpec.WcsClient                 |    36 +
 src/OgcClient/ObjectSpec.WmsClient                 |    47 +
 src/OgcClient/WCS_CLIENT.svg                       |   287 +
 src/OgcClient/WCS_CLIENT.xpm                       |   293 +
 src/OgcClient/WMS_CLIENT.svg                       |   287 +
 src/OgcClient/WMS_CLIENT.xpm                       |   290 +
 src/OgcClient/WcsClientDef                         |    62 +
 src/OgcClient/WcsClientRules                       |     0
 src/OgcClient/WmsClientDef                         |   110 +
 src/OgcClient/WmsClientRules                       |     0
 src/OgcClient/preview.css                          |    68 +
 src/OperaRadar/B0000000000247014008.TXT            |  1488 +
 src/OperaRadar/B0000000065535002004.TXT            |  1477 +
 src/OperaRadar/D0000000000247014008.TXT            |  4136 +++
 src/OperaRadar/D0000000065535002004.TXT            |  4123 +++
 src/OperaRadar/Makefile.am                         |    41 +
 src/OperaRadar/Makefile.in                         |   697 +
 src/OperaRadar/OPERA_RADAR_FILTER.xpm              |   217 +
 src/OperaRadar/ObjectSpec.OperaRadar               |    29 +
 src/OperaRadar/OperaRadar.cc                       |   317 +
 src/OperaRadar/OperaRadarDef                       |    41 +
 src/OperaRadar/OperaRadarRules                     |     2 +
 src/Percentile/Makefile.am                         |    30 +
 src/Percentile/Makefile.in                         |   709 +
 src/Percentile/ObjectSpec.Percentile               |    24 +
 src/Percentile/PERCENTILE.xpm                      |    37 +
 src/Percentile/Percentile.cc                       |   259 +
 src/Percentile/Percentile.h                        |    57 +
 src/Percentile/PercentileDef                       |    30 +
 src/Percentile/PercentileRules                     |     0
 src/PottF/Makefile.am                              |    11 +
 src/PottF/Makefile.in                              |   663 +
 src/PottF/PottF.cc                                 |   348 +
 src/PottF/eqpott.F                                 |   341 +
 src/PottF/pml.F                                    |    46 +
 src/PottF/pott.F                                   |   218 +
 src/PottF/seqpott.F                                |   238 +
 src/PottF/sshm.F                                   |    45 +
 src/PottF/tlvalid.F                                |    91 +
 src/Reprojection/Makefile.am                       |    38 +
 src/Reprojection/Makefile.in                       |   844 +
 src/Reprojection/ObjectSpec.Reprojection           |    27 +
 src/Reprojection/REPROJECTION.xpm                  |   257 +
 src/Reprojection/ReprojectService.cc               |   150 +
 src/Reprojection/ReprojectService.h                |    39 +
 src/Reprojection/Reprojection.cc                   |   142 +
 src/Reprojection/Reprojection.h                    |    56 +
 src/Reprojection/ReprojectionDef                   |    72 +
 src/Reprojection/ReprojectionRules                 |     0
 src/Scm/Makefile.am                                |    45 +
 src/Scm/Makefile.in                                |   747 +
 src/Scm/ObjectSpec.Scm                             |   106 +
 src/Scm/ScmRun.cc                                  |   461 +
 src/Scm/ScmRunDef                                  |    60 +
 src/Scm/ScmRunRules                                |     3 +
 src/Scm/ScmVisualiser.cc                           |   362 +
 src/Scm/ScmVisualiserDef                           |   195 +
 src/Scm/ScmVisualiserInput1dVars                   |    31 +
 src/Scm/ScmVisualiserInput2dVars                   |    28 +
 src/Scm/ScmVisualiserOutput1dVars                  |   106 +
 src/Scm/ScmVisualiserOutput2dVars                  |    99 +
 src/Scm/ScmVisualiserRules                         |    32 +
 src/ScmEditor/Makefile.am                          |    42 +
 src/ScmEditor/Makefile.in                          |   920 +
 src/ScmEditor/MvMain.cc                            |    94 +
 src/ScmEditor/ObjectSpec.ScmEditor                 |    30 +
 src/ScmEditor/ScmDataEditor.cc                     |   838 +
 src/ScmEditor/ScmDataEditor.h                      |   131 +
 src/ScmEditor/scmEditor.qrc                        |    12 +
 src/Stations/Makefile.am                           |    75 +
 src/Stations/Makefile.in                           |   864 +
 src/Stations/Station.cc                            |   341 +
 src/Stations/stat.fmt                              | 12851 +++++++++
 src/Stations/station.h                             |    46 +
 src/Stations/stbase.c                              |   696 +
 src/Stations/stbase.h                              |    58 +
 src/Stations/stcback.cc                            |   925 +
 src/Stations/utils.cc                              |   232 +
 src/Stations/utils.h                               |    31 +
 src/Stations/writebase.c                           |   132 +
 src/StdAppManager/INPUTVISUALISER.svg              |   179 +
 src/StdAppManager/INPUTVISUALISER.xpm              |   153 +
 src/StdAppManager/InputVisualiserDef               |   137 +
 src/StdAppManager/InputVisualiserRules             |    90 +
 src/StdAppManager/Makefile.am                      |    47 +
 src/StdAppManager/Makefile.in                      |   744 +
 src/StdAppManager/NETCDFPLUS.svg                   |   268 +
 src/StdAppManager/NETCDFPLUS.xpm                   |   207 +
 src/StdAppManager/NetcdfPlusDef                    |    61 +
 src/StdAppManager/NetcdfPlusRules                  |    31 +
 src/StdAppManager/ObjectSpec.StdAppManager         |    84 +
 src/StdAppManager/StdAppManager.cc                 |    66 +
 src/StdAppManager/StdAppManager.h                  |    38 +
 src/StdAppManager/TABLEVISUALISER.svg              |   264 +
 src/StdAppManager/TABLEVISUALISER.xpm              |   210 +
 src/StdAppManager/TableVisualiserDef               |   214 +
 src/StdAppManager/TableVisualiserRules             |    80 +
 src/Velstr/Makefile.am                             |    15 +
 src/Velstr/Makefile.in                             |   681 +
 src/Velstr/Velstr.cc                               |   212 +
 src/Velstr/Velstr.h                                |    65 +
 src/Velstr/velstr-exFortran.cc                     |   541 +
 src/VisTools/Makefile.am                           |    13 +
 src/VisTools/Makefile.in                           |   706 +
 src/VisTools/gribcback.cc                          |   590 +
 src/VisTools/gribmain.c                            |   277 +
 src/WebAccess/Makefile.am                          |    31 +
 src/WebAccess/Makefile.in                          |   768 +
 src/WebAccess/ObjectSpec.WebAccess                 |    68 +
 src/WebAccess/WEBACCESS.xpm                        |   643 +
 src/WebAccess/WebAccess.cc                         |   214 +
 src/WebAccess/WebAccessDef                         |     6 +
 src/WebAccess/WebAccessRules                       |     2 +
 src/WebAccess/remote.c                             |   707 +
 src/WebAccess/vroot.h                              |   128 +
 src/XSection/Makefile.am                           |    37 +
 src/XSection/Makefile.in                           |   751 +
 src/XSection/MvXsectFrame.cc                       |  1324 +
 src/XSection/MvXsectFrame.h                        |   270 +
 src/XSection/ObjectSpec.XSection                   |    63 +
 src/XSection/VPROFILE.xpm                          |    45 +
 src/XSection/VProfileDef                           |    66 +
 src/XSection/VProfileRules                         |     8 +
 src/XSection/XAVERAGE.xpm                          |    45 +
 src/XSection/XAverageDef                           |    60 +
 src/XSection/XAverageRules                         |     2 +
 src/XSection/XSECTION.xpm                          |    44 +
 src/XSection/XSectionDef                           |    97 +
 src/XSection/XSectionRules                         |     8 +
 src/XSection/Xsect.cc                              |   819 +
 src/images/Makefile.am                             |    78 +
 src/images/Makefile.in                             |   522 +
 src/images/add.svg                                 |   185 +
 src/images/animation.svg                           |   225 +
 src/images/antialias.svg                           |   397 +
 src/images/arrow_bottom.svg                        |   146 +
 src/images/arrow_down.svg                          |   117 +
 src/images/arrow_left.svg                          |   117 +
 src/images/arrow_top.svg                           |   148 +
 src/images/arrow_up.svg                            |   117 +
 src/images/check_consistency.svg                   |   229 +
 src/images/check_syntax.svg                        |   163 +
 src/images/clear_left.svg                          |   134 +
 src/images/close.svg                               |   242 +
 src/images/configure.svg                           |   170 +
 src/images/connectAnimations.svg                   |   114 +
 src/images/create_mars.svg                         |   154 +
 src/images/data_probe.svg                          |   243 +
 src/images/edit.svg                                |   264 +
 src/images/editcopy.svg                            |   167 +
 src/images/editcut.svg                             |   196 +
 src/images/editpaste.svg                           |   185 +
 src/images/exit.svg                                |   141 +
 src/images/fileInfo.svg                            |   234 +
 src/images/filesave.svg                            |   234 +
 src/images/filesaveas.svg                          |   321 +
 src/images/gunsight.svg                            |   203 +
 src/images/highlight_scene.svg                     |   130 +
 src/images/histogram.svg                           |   119 +
 src/images/insert_licence.svg                      |   132 +
 src/images/key.svg                                 |   349 +
 src/images/layers.svg                              |   185 +
 src/images/log.svg                                 |   123 +
 src/images/macro.svg                               |   232 +
 src/images/magnifier.svg                           |   264 +
 src/images/magnifier_handler.png                   |   Bin 0 -> 752 bytes
 src/images/meta_data.svg                           |   111 +
 src/images/metview_logo.png                        |   Bin 0 -> 1328 bytes
 src/images/monitor.svg                             |   169 +
 src/images/overwrite_steps.svg                     |   259 +
 src/images/player_end.svg                          |   225 +
 src/images/player_next.svg                         |   218 +
 src/images/player_play.svg                         |   218 +
 src/images/player_prev.svg                         |   218 +
 src/images/player_start.svg                        |   225 +
 src/images/player_stop.svg                         |   210 +
 src/images/print.svg                               |   225 +
 src/images/profile.svg                             |   317 +
 src/images/profile_add.svg                         |   226 +
 src/images/profile_delete.svg                      |   309 +
 src/images/profile_duplicate.svg                   |   246 +
 src/images/profile_import.svg                      |   232 +
 src/images/profile_manage.svg                      |   288 +
 src/images/profile_save.svg                        |   332 +
 src/images/redo.svg                                |   112 +
 src/images/reload.svg                              |   221 +
 src/images/remove.svg                              |   242 +
 src/images/reset.svg                               |   134 +
 src/images/run_options.svg                         |   283 +
 src/images/search.svg                              |   295 +
 src/images/select_all.svg                          |   160 +
 src/images/select_line.svg                         |    94 +
 src/images/select_point.svg                        |   119 +
 src/images/select_rect.svg                         |    93 +
 src/images/show_editable_only.svg                  |   318 +
 src/images/sidebar.svg                             |   146 +
 src/images/size_down.svg                           |   128 +
 src/images/size_up.svg                             |   132 +
 src/images/stats.svg                               |    95 +
 src/images/swap_direction.svg                      |    95 +
 src/images/triangle_left.svg                       |   117 +
 src/images/triangle_right.svg                      |   117 +
 src/images/undo.svg                                |   112 +
 src/images/wizard.svg                              |   167 +
 src/images/zoom.svg                                |   257 +
 src/images/zoom_in.svg                             |   314 +
 src/images/zoom_out.svg                            |   296 +
 src/images/zoom_stack.svg                          |   376 +
 src/libFTimeUtil/Makefile.am                       |    11 +
 src/libFTimeUtil/Makefile.in                       |   609 +
 src/libFTimeUtil/fdyntime.cc                       |   171 +
 src/libFTimeUtil/fdyntime.h                        |    52 +
 src/libFTimeUtil/fmettim.cc                        |   210 +
 src/libFTimeUtil/fmettim.h                         |    76 +
 src/libFTimeUtil/fobject.cc                        |    39 +
 src/libFTimeUtil/fobject.h                         |    29 +
 src/libFTimeUtil/fsortabl.cc                       |    40 +
 src/libFTimeUtil/fsortabl.h                        |    34 +
 src/libFTimeUtil/fstatime.cc                       |   354 +
 src/libFTimeUtil/fstatime.h                        |    80 +
 src/libMars/Makefile.am                            |   116 +
 src/libMars/Makefile.in                            |  2092 ++
 src/libMars/account.c                              |   207 +
 src/libMars/api.c                                  |   565 +
 src/libMars/api.h                                  |    37 +
 src/libMars/apibase.c                              |   366 +
 src/libMars/archive.c                              |   229 +
 src/libMars/authenticate.c                         |   985 +
 src/libMars/base.c                                 |   266 +
 src/libMars/base.h                                 |    70 +
 src/libMars/bufr.c                                 |   765 +
 src/libMars/bufr.h                                 |   231 +
 src/libMars/calc.c                                 |  2266 ++
 src/libMars/check.c                                |   479 +
 src/libMars/control.c                              |   109 +
 src/libMars/control.h                              |    25 +
 src/libMars/cos.c                                  |   259 +
 src/libMars/cos.h                                  |    82 +
 src/libMars/dhsbase.c                              |  2817 ++
 src/libMars/ecaccess.c                             |   113 +
 src/libMars/ecaccess.h                             |    20 +
 src/libMars/environ.c                              |   381 +
 src/libMars/expand.c                               |  1387 +
 src/libMars/externf.c                              |    71 +
 src/libMars/field.c                                |  1150 +
 src/libMars/field.h                                |    76 +
 src/libMars/filebase.c                             |   297 +
 src/libMars/files.c                                |    27 +
 src/libMars/flatfilebase.c                         |   215 +
 src/libMars/free.c                                 |   441 +
 src/libMars/globals.h                              |   174 +
 src/libMars/grib.c                                 |   184 +
 src/libMars/grib.h                                 |   872 +
 src/libMars/gribbase.c                             |   132 +
 src/libMars/guess.c                                |   163 +
 src/libMars/handler.c                              |   187 +
 src/libMars/hash.c                                 |   137 +
 src/libMars/hidden.c                               |   564 +
 src/libMars/hypercube.c                            |   942 +
 src/libMars/hypercube.h                            |    29 +
 src/libMars/ibmblk.c                               |   384 +
 src/libMars/ibmblk.h                               |    95 +
 src/libMars/index.c                                |   143 +
 src/libMars/index.h                                |    38 +
 src/libMars/json.c                                 |   769 +
 src/libMars/json.h                                 |    35 +
 src/libMars/lang.h                                 |    67 +
 src/libMars/langl.c                                |  2274 ++
 src/libMars/langl.l                                |   365 +
 src/libMars/langy.c                                |  2109 ++
 src/libMars/langy.y                                |   328 +
 src/libMars/list.c                                 |    34 +
 src/libMars/llmatrix.c                             |   274 +
 src/libMars/lock.c                                 |    20 +
 src/libMars/logfile.c                              |   327 +
 src/libMars/macro_api.c                            |  1310 +
 src/libMars/macro_api.h                            |   145 +
 src/libMars/macro_api_f90.f90                      |    78 +
 src/libMars/macro_api_internals.h                  |    48 +
 src/libMars/mars.h                                 |   716 +
 src/libMars/mcs.h                                  |    92 +
 src/libMars/memory.c                               |   392 +
 src/libMars/metadata.c                             |    33 +
 src/libMars/multibase.c                            |   249 +
 src/libMars/netbase.c                              |  1107 +
 src/libMars/netbase.h                              |    28 +
 src/libMars/nfdbbase.c                             |  1091 +
 src/libMars/nullbase.c                             |    75 +
 src/libMars/odb.cc                                 |   304 +
 src/libMars/odb.h                                  |    35 +
 src/libMars/odbbase.c                              |   442 +
 src/libMars/options.c                              |   552 +
 src/libMars/pproc.c                                |  2049 ++
 src/libMars/proto.h                                |   727 +
 src/libMars/queue.c                                |   304 +
 src/libMars/queue.h                                |    21 +
 src/libMars/remove.c                               |    70 +
 src/libMars/request.c                              |  2673 ++
 src/libMars/restricted.c                           |    55 +
 src/libMars/restricted.h                           |   185 +
 src/libMars/retrieve.c                             |   628 +
 src/libMars/rpcmars.x                              |   134 +
 src/libMars/schedule.c                             |   366 +
 src/libMars/server.c                               |   371 +
 src/libMars/service.c                              |  1225 +
 src/libMars/sh2ll.c                                |   170 +
 src/libMars/statistics.c                           |   402 +
 src/libMars/stream.c                               |   498 +
 src/libMars/target.c                               |   850 +
 src/libMars/tcp.c                                  |   383 +
 src/libMars/time.c                                 |    40 +
 src/libMars/timer.c                                |   331 +
 src/libMars/tools.c                                |  1735 ++
 src/libMars/tools.h                                |    20 +
 src/libMars/udp.c                                  |   211 +
 src/libMars/variable.c                             |   185 +
 src/libMars/variable.h                             |    17 +
 src/libMars/version.c                              |    39 +
 src/libMars/webbase.c                              |   613 +
 src/libMars/wind.c                                 |   536 +
 src/libMars/xservice.c                             |    58 +
 src/libMetview/Cached.h                            |   104 +
 src/libMetview/LLMatrixToGRIB.cc                   |   387 +
 src/libMetview/LLMatrixToGRIB.h                    |    19 +
 src/libMetview/Makefile.am                         |    75 +
 src/libMetview/Makefile.in                         |   708 +
 src/libMetview/Metview.h                           |    73 +
 src/libMetview/MvApplication.cc                    |   197 +
 src/libMetview/MvApplication.h                     |   100 +
 src/libMetview/MvBufr.h                            |   444 +
 src/libMetview/MvBufrObs.h                         |   599 +
 src/libMetview/MvDate.cc                           |   507 +
 src/libMetview/MvDate.h                            |   313 +
 src/libMetview/MvDebugPrintControl.cc              |    68 +
 src/libMetview/MvDebugPrintControl.h               |    14 +
 src/libMetview/MvFieldSet.cc                       |  2029 ++
 src/libMetview/MvFieldSet.h                        |   667 +
 src/libMetview/MvFilter.cc                         |   124 +
 src/libMetview/MvFilter.h                          |   157 +
 src/libMetview/MvFortran.cc                        |    80 +
 src/libMetview/MvFortran.h                         |    66 +
 src/libMetview/MvFunction.cc                       |    55 +
 src/libMetview/MvFunction.h                        |    36 +
 src/libMetview/MvGeoPoints.cc                      |  1031 +
 src/libMetview/MvGeoPoints.h                       |   370 +
 src/libMetview/MvGrid.cc                           |  2964 ++
 src/libMetview/MvGrid.h                            |   637 +
 src/libMetview/MvLanguage.cc                       |    60 +
 src/libMetview/MvLanguage.h                        |    68 +
 src/libMetview/MvLocation.cc                       |   263 +
 src/libMetview/MvLocation.h                        |   187 +
 src/libMetview/MvMatrix.cc                         |    55 +
 src/libMetview/MvMatrix.h                          |    66 +
 src/libMetview/MvObs.cc                            |  3297 +++
 src/libMetview/MvObs.h                             |    25 +
 src/libMetview/MvObsSet.cc                         |  1011 +
 src/libMetview/MvObsSet.h                          |   337 +
 src/libMetview/MvObsUtil.cc                        |    33 +
 src/libMetview/MvObsUtil.h                         |    20 +
 src/libMetview/MvPrepBufrPrep.cc                   |   553 +
 src/libMetview/MvPrepBufrPrep.h                    |   117 +
 src/libMetview/MvProtocol.cc                       |   197 +
 src/libMetview/MvProtocol.h                        |   197 +
 src/libMetview/MvRequest.cc                        |  1123 +
 src/libMetview/MvRequest.h                         |   626 +
 src/libMetview/MvScanFileType.cc                   |   575 +
 src/libMetview/MvScanFileType.h                    |    40 +
 src/libMetview/MvSerie.cc                          |   240 +
 src/libMetview/MvSerie.h                           |    58 +
 src/libMetview/MvService.cc                        |   367 +
 src/libMetview/MvService.h                         |   104 +
 src/libMetview/MvServiceTask.cc                    |    51 +
 src/libMetview/MvServiceTask.h                     |    61 +
 src/libMetview/MvShellTask.cc                      |    59 +
 src/libMetview/MvShellTask.h                       |    33 +
 src/libMetview/MvTable.cc                          |   300 +
 src/libMetview/MvTable.h                           |    99 +
 src/libMetview/MvTask.cc                           |    75 +
 src/libMetview/MvTask.h                            |   103 +
 src/libMetview/MvTemplates.h                       |   162 +
 src/libMetview/MvTimeSerie.cc                      |   209 +
 src/libMetview/MvTimeSerie.h                       |    70 +
 src/libMetview/MvVisTool.cc                        |   174 +
 src/libMetview/MvVisTool.h                         |    49 +
 src/libMetview/Path.cc                             |   253 +
 src/libMetview/Path.h                              |   146 +
 src/libMvMotif/Array.c                             |   410 +
 src/libMvMotif/Array.h                             |    42 +
 src/libMvMotif/ArrayP.h                            |    54 +
 src/libMvMotif/Carousel.c                          |   444 +
 src/libMvMotif/Carousel.h                          |    40 +
 src/libMvMotif/CarouselP.h                         |    60 +
 src/libMvMotif/ChartP.h                            |   118 +
 src/libMvMotif/Colors.c                            |   322 +
 src/libMvMotif/Colors.h                            |    30 +
 src/libMvMotif/ColorsP.h                           |    47 +
 src/libMvMotif/DecChartP.h                         |    77 +
 src/libMvMotif/Drag.c                              |  4941 ++++
 src/libMvMotif/Drag.h                              |   317 +
 src/libMvMotif/DragP.h                             |   180 +
 src/libMvMotif/Hyper.h                             |   123 +
 src/libMvMotif/HyperP.h                            |   115 +
 src/libMvMotif/IconWidget.h                        |    53 +
 src/libMvMotif/LED.c                               |   330 +
 src/libMvMotif/LED.h                               |    31 +
 src/libMvMotif/LEDP.h                              |    50 +
 src/libMvMotif/Layout.c                            |   268 +
 src/libMvMotif/Layout.h                            |    33 +
 src/libMvMotif/LayoutP.h                           |    75 +
 src/libMvMotif/Line.c                              |   408 +
 src/libMvMotif/Line.h                              |    40 +
 src/libMvMotif/LineP.h                             |    56 +
 src/libMvMotif/MArray.cc                           |    25 +
 src/libMvMotif/MArray.hpp                          |    13 +
 src/libMvMotif/MCarousel.cc                        |    26 +
 src/libMvMotif/MCarousel.hpp                       |    13 +
 src/libMvMotif/MColors.cc                          |    24 +
 src/libMvMotif/MColors.hpp                         |    14 +
 src/libMvMotif/MDrag.cc                            |    35 +
 src/libMvMotif/MDrag.hpp                           |   108 +
 src/libMvMotif/MIcon.cc                            |    18 +
 src/libMvMotif/MIcon.hpp                           |    19 +
 src/libMvMotif/MLine.cc                            |    25 +
 src/libMvMotif/MLine.hpp                           |    13 +
 src/libMvMotif/MMatrix.cc                          |    97 +
 src/libMvMotif/MMatrix.hpp                         |    40 +
 src/libMvMotif/MMotif.cc                           |  2272 ++
 src/libMvMotif/MMotif.hpp                          |    11 +
 src/libMvMotif/MMotifOnly.hpp                      |   560 +
 src/libMvMotif/MPaper.cc                           |   117 +
 src/libMvMotif/MPaper.hpp                          |    49 +
 src/libMvMotif/MSymbols.cc                         |    24 +
 src/libMvMotif/MSymbols.hpp                        |    14 +
 src/libMvMotif/MTab.cc                             |    45 +
 src/libMvMotif/MTab.hpp                            |    19 +
 src/libMvMotif/Makefile.am                         |    92 +
 src/libMvMotif/Makefile.in                         |   752 +
 src/libMvMotif/Matrix.h                            |   111 +
 src/libMvMotif/MatrixP.h                           |   126 +
 src/libMvMotif/MvXApplication.cc                   |    57 +
 src/libMvMotif/MvXApplication.h                    |    29 +
 src/libMvMotif/Overview.h                          |    37 +
 src/libMvMotif/OverviewP.h                         |    47 +
 src/libMvMotif/Palette.c                           |   708 +
 src/libMvMotif/Palette.h                           |    89 +
 src/libMvMotif/Paper.c                             |  2005 ++
 src/libMvMotif/Paper.h                             |   134 +
 src/libMvMotif/PaperP.h                            |    98 +
 src/libMvMotif/Symbols.c                           |   343 +
 src/libMvMotif/Symbols.h                           |    30 +
 src/libMvMotif/SymbolsP.h                          |    50 +
 src/libMvMotif/Tab.c                               |   917 +
 src/libMvMotif/Tab.h                               |    65 +
 src/libMvMotif/TabP.h                              |    93 +
 src/libMvMotif/drop.c                              |   521 +
 src/libMvMotif/drop.h                              |    66 +
 src/libMvMotif/progress.c                          |   198 +
 src/libMvMotif/progress.h                          |    27 +
 src/libMvMotif/xdclass.h                           |   218 +
 src/libMvMotif/xdxmdialog.cc                       |    60 +
 src/libMvMotif/xdxtclass.cc                        |   217 +
 src/libMvMotif/xec.h                               |    70 +
 src/libMvMotif/xec_Cursor.c                        |    46 +
 src/libMvMotif/xec_Label.c                         |    39 +
 src/libMvMotif/xec_List.c                          |   227 +
 src/libMvMotif/xec_Strings.c                       |   128 +
 src/libMvMotif/xec_Text.c                          |   296 +
 src/libMvMotif/xec_Widget.c                        |   216 +
 src/libMvNetCDF/Makefile.am                        |    12 +
 src/libMvNetCDF/Makefile.in                        |   604 +
 src/libMvNetCDF/MvNetCDF.cc                        |   814 +
 src/libMvNetCDF/MvNetCDF.h                         |   479 +
 src/libMvQtGui/GLWidget.h                          |    38 +
 src/libMvQtGui/Makefile.am                         |   152 +
 src/libMvQtGui/Makefile.in                         |  2167 ++
 src/libMvQtGui/MvQAbout.cc                         |   174 +
 src/libMvQtGui/MvQAbout.h                          |    29 +
 src/libMvQtGui/MvQAbstractMessageExaminer.cc       |   915 +
 src/libMvQtGui/MvQAbstractMessageExaminer.h        |   143 +
 src/libMvQtGui/MvQAbstractSearchLine.cc            |    97 +
 src/libMvQtGui/MvQAbstractSearchLine.h             |    55 +
 src/libMvQtGui/MvQApplication.cc                   |    50 +
 src/libMvQtGui/MvQApplication.h                    |    48 +
 src/libMvQtGui/MvQCheckBoxCombo.cc                 |   213 +
 src/libMvQtGui/MvQCheckBoxCombo.h                  |    65 +
 src/libMvQtGui/MvQConfigDialog.cc                  |    88 +
 src/libMvQtGui/MvQConfigDialog.h                   |    38 +
 src/libMvQtGui/MvQDragDrop.cc                      |    41 +
 src/libMvQtGui/MvQDragDrop.h                       |    75 +
 src/libMvQtGui/MvQFileBrowserBase.cc               |   583 +
 src/libMvQtGui/MvQFileBrowserBase.h                |   131 +
 src/libMvQtGui/MvQFileInfoLabel.cc                 |   172 +
 src/libMvQtGui/MvQFileInfoLabel.h                  |    32 +
 src/libMvQtGui/MvQGui.cc                           |   281 +
 src/libMvQtGui/MvQGui.h                            |    61 +
 src/libMvQtGui/MvQGuiItem.cc                       |   647 +
 src/libMvQtGui/MvQGuiItem.h                        |   213 +
 src/libMvQtGui/MvQHighlighter.cc                   |   113 +
 src/libMvQtGui/MvQHighlighter.h                    |    45 +
 src/libMvQtGui/MvQKeyDialog.cc                     |  1064 +
 src/libMvQtGui/MvQKeyDialog.h                      |   178 +
 src/libMvQtGui/MvQKeyFilterModel.cc                |   380 +
 src/libMvQtGui/MvQKeyFilterModel.h                 |    83 +
 src/libMvQtGui/MvQKeyMimeData.cc                   |    30 +
 src/libMvQtGui/MvQKeyMimeData.h                    |    40 +
 src/libMvQtGui/MvQKeyModel.cc                      |   363 +
 src/libMvQtGui/MvQKeyModel.h                       |    69 +
 src/libMvQtGui/MvQKeyProfileModel.cc               |   366 +
 src/libMvQtGui/MvQKeyProfileModel.h                |    82 +
 src/libMvQtGui/MvQKeyProfileTree.cc                |   328 +
 src/libMvQtGui/MvQKeyProfileTree.h                 |    54 +
 src/libMvQtGui/MvQLogBrowser.cc                    |   121 +
 src/libMvQtGui/MvQLogBrowser.h                     |    33 +
 src/libMvQtGui/MvQMacroSelector.cc                 |   193 +
 src/libMvQtGui/MvQMacroSelector.h                  |    86 +
 src/libMvQtGui/MvQMainWindow.cc                    |   438 +
 src/libMvQtGui/MvQMainWindow.h                     |    61 +
 src/libMvQtGui/MvQMemoryWidget.cc                  |   139 +
 src/libMvQtGui/MvQMemoryWidget.h                   |    45 +
 src/libMvQtGui/MvQMenuItem.h                       |    37 +
 src/libMvQtGui/MvQOdbDataWidget.cc                 |   570 +
 src/libMvQtGui/MvQOdbDataWidget.h                  |    90 +
 src/libMvQtGui/MvQOdbModel.cc                      |   624 +
 src/libMvQtGui/MvQOdbModel.h                       |   104 +
 src/libMvQtGui/MvQPlainTextEditSearchLine.cc       |   105 +
 src/libMvQtGui/MvQPlainTextEditSearchLine.h        |    37 +
 src/libMvQtGui/MvQProfileView.cc                   |  1126 +
 src/libMvQtGui/MvQProfileView.h                    |   184 +
 src/libMvQtGui/MvQProfileWidget.cc                 |   136 +
 src/libMvQtGui/MvQProfileWidget.h                  |    56 +
 src/libMvQtGui/MvQRangeWidget.cc                   |   444 +
 src/libMvQtGui/MvQRangeWidget.h                    |    89 +
 src/libMvQtGui/MvQScmDataWidget.cc                 |   513 +
 src/libMvQtGui/MvQScmDataWidget.h                  |    98 +
 src/libMvQtGui/MvQScmModel.cc                      |   477 +
 src/libMvQtGui/MvQScmModel.h                       |   118 +
 src/libMvQtGui/MvQSearchLinePanel.cc               |   257 +
 src/libMvQtGui/MvQSearchLinePanel.h                |    65 +
 src/libMvQtGui/MvQService.cc                       |    41 +
 src/libMvQtGui/MvQService.h                        |    39 +
 src/libMvQtGui/MvQStackedEditor.cc                 |    92 +
 src/libMvQtGui/MvQStackedEditor.h                  |    37 +
 src/libMvQtGui/MvQTabManager.cc                    |    70 +
 src/libMvQtGui/MvQTabManager.h                     |    41 +
 src/libMvQtGui/MvQTextDialog.cc                    |    56 +
 src/libMvQtGui/MvQTextDialog.h                     |    28 +
 src/libMvQtGui/MvQTextEditSearchLine.cc            |   106 +
 src/libMvQtGui/MvQTextEditSearchLine.h             |    35 +
 src/libMvQtGui/MvQTreeView.cc                      |   167 +
 src/libMvQtGui/MvQTreeView.h                       |    53 +
 src/libMvQtGui/MvQTreeViewSearchLine.cc            |   248 +
 src/libMvQtGui/MvQTreeViewSearchLine.h             |    51 +
 src/libMvQtGui/MvQX11Application.cc                |   130 +
 src/libMvQtGui/MvQX11Application.h                 |    58 +
 src/libMvQtGui/examiner.qrc                        |     9 +
 src/libMvQtGui/find.qrc                            |     8 +
 src/libMvQtGui/keyDialog.qrc                       |    18 +
 src/libMvQtGui/window.qrc                          |     7 +
 src/libMvQtUtil/Makefile.am                        |    35 +
 src/libMvQtUtil/Makefile.in                        |   906 +
 src/libMvQtUtil/MvQKeyManager.cc                   |   561 +
 src/libMvQtUtil/MvQKeyManager.h                    |    78 +
 src/libMvQtUtil/MvQNetworkAccessManager.cc         |    81 +
 src/libMvQtUtil/MvQNetworkAccessManager.h          |    37 +
 src/libMvQtUtil/MvQNetworkProxyFactory.cc          |    81 +
 src/libMvQtUtil/MvQNetworkProxyFactory.h           |    30 +
 src/libMvQtUtil/MvQObstatScatterData.cc            |   557 +
 src/libMvQtUtil/MvQObstatScatterData.h             |   194 +
 src/libMvQtUtil/MvQOdbMetaData.cc                  |   563 +
 src/libMvQtUtil/MvQOdbMetaData.h                   |   186 +
 src/libMvQtUtil/MvQVisDefManager.cc                |   532 +
 src/libMvQtUtil/MvQVisDefManager.h                 |   108 +
 src/libMvQtUtil/MvQXmlQuery.cc                     |    77 +
 src/libMvQtUtil/MvQXmlQuery.h                      |    29 +
 src/libUtil/Assertions.hpp                         |    27 +
 src/libUtil/Box.cc                                 |   364 +
 src/libUtil/Box.hpp                                |   163 +
 src/libUtil/Cached.cc                              |    90 +
 src/libUtil/Cached.h                               |   104 +
 src/libUtil/DataTools.hpp                          |    40 +
 src/libUtil/DataVis.hpp                            |     6 +
 src/libUtil/Factory.hpp                            |   135 +
 src/libUtil/Grib.cc                                |  1924 ++
 src/libUtil/Grib.hpp                               |  1089 +
 src/libUtil/GribMetaData.cc                        |  1393 +
 src/libUtil/GribMetaData.h                         |   190 +
 src/libUtil/Imagep.hpp                             |   209 +
 src/libUtil/LogHandler.cc                          |    44 +
 src/libUtil/LogHandler.h                           |    78 +
 src/libUtil/MagicsColours.h                        |    69 +
 src/libUtil/Makefile.am                            |    56 +
 src/libUtil/Makefile.in                            |  1190 +
 src/libUtil/MtInputEvent.cc                        |    31 +
 src/libUtil/MtInputEvent.h                         |    81 +
 src/libUtil/MvAlmostObsoleteRequest.cc             |   217 +
 src/libUtil/MvAlmostObsoleteRequest.hpp            |    53 +
 src/libUtil/MvCommandHistory.h                     |   121 +
 src/libUtil/MvElement.cc                           |    46 +
 src/libUtil/MvElement.hpp                          |    51 +
 src/libUtil/MvException.cc                         |    27 +
 src/libUtil/MvException.h                          |    28 +
 src/libUtil/MvFileInfo.cc                          |   113 +
 src/libUtil/MvFileInfo.h                           |    42 +
 src/libUtil/MvFlextra.cc                           |   750 +
 src/libUtil/MvFlextra.h                            |   111 +
 src/libUtil/MvGribParC.c                           |   279 +
 src/libUtil/MvGribParC.h                           |    74 +
 src/libUtil/MvKeyManager.cc                        |   137 +
 src/libUtil/MvKeyManager.h                         |    38 +
 src/libUtil/MvKeyProfile.cc                        |   227 +
 src/libUtil/MvKeyProfile.h                         |    98 +
 src/libUtil/MvList.cc                              |   635 +
 src/libUtil/MvList.hpp                             |   225 +
 src/libUtil/MvMessageMetaData.h                    |    67 +
 src/libUtil/MvMiscelaneous.cc                      |   190 +
 src/libUtil/MvMiscelaneous.h                       |    38 +
 src/libUtil/MvMsg.h                                |    76 +
 src/libUtil/MvOda.h                                |   114 +
 src/libUtil/MvOdb.cc                               |  1091 +
 src/libUtil/MvOdb.h                                |   295 +
 src/libUtil/MvParTable.hpp                         |    19 +
 src/libUtil/MvPath.cc                              |   229 +
 src/libUtil/MvPath.hpp                             |    36 +
 src/libUtil/MvProfileData.cc                       |    66 +
 src/libUtil/MvProfileData.h                        |    97 +
 src/libUtil/MvRequest.hpp                          |    47 +
 src/libUtil/MvRequestUtil.cc                       |   363 +
 src/libUtil/MvRequestUtil.hpp                      |    68 +
 src/libUtil/MvSTL.h                                |    20 +
 src/libUtil/MvScm.cc                               |  1293 +
 src/libUtil/MvScm.h                                |   265 +
 src/libUtil/MvStopWatch.cc                         |   142 +
 src/libUtil/MvStopWatch.h                          |    52 +
 src/libUtil/MvVersionInfo.cc                       |   103 +
 src/libUtil/MvVersionInfo.h                        |    82 +
 src/libUtil/Point.cc                               |    51 +
 src/libUtil/Point.hpp                              |   150 +
 src/libUtil/Projection.hpp                         |  1282 +
 src/libUtil/Prototype.hpp                          |   142 +
 src/libUtil/Rectangle.h                            |    24 +
 src/libUtil/Request.cc                             |    79 +
 src/libUtil/Request.h                              |   129 +
 src/libUtil/TableReader.cc                         |   702 +
 src/libUtil/TableReader.h                          |   210 +
 src/libUtil/Tokenizer.cc                           |    48 +
 src/libUtil/Tokenizer.h                            |    62 +
 src/libUtil/Transfm.hpp                            |    66 +
 src/libUtil/Types.hpp                              |    67 +
 src/libUtil/UtilitiesC.c                           |   306 +
 src/libUtil/UtilitiesC.h                           |    39 +
 src/libUtil/auto_ptr.h                             |    52 +
 src/libUtil/bits.h                                 |    31 +
 src/libUtil/gdefines.h                             |    90 +
 src/libUtil/griddoc.hpp                            |    35 +
 src/libUtil/imagedoc.hpp                           |    52 +
 src/libUtil/inc_iostream.h                         |    77 +
 src/libUtil/inc_stl.h                              |    66 +
 src/libUtil/min_max_macros.h                       |    36 +
 src/libUtil/progress.h                             |    27 +
 src/libUtil/proj_braz.cc                           |  1856 ++
 src/libUtil/proj_braz.hpp                          |   334 +
 src/libUtil/stypes.hpp                             |    48 +
 src/libUtil/xec.h                                  |    70 +
 src/metview_config.h                               |   207 +
 src/metview_config.h.in                            |   206 +
 src/uPlot/AverageView.cc                           |   163 +
 src/uPlot/AverageView.h                            |    90 +
 src/uPlot/BufrDecoder.cc                           |   483 +
 src/uPlot/BufrDecoder.h                            |   137 +
 src/uPlot/Canvas.cc                                |   134 +
 src/uPlot/Canvas.h                                 |   218 +
 src/uPlot/CartesianView.cc                         |   662 +
 src/uPlot/CartesianView.h                          |   125 +
 src/uPlot/CommonXSectView.cc                       |   853 +
 src/uPlot/CommonXSectView.h                        |   160 +
 src/uPlot/Counted.h                                |    79 +
 src/uPlot/CreateAction.cc                          |    44 +
 src/uPlot/CreateAction.h                           |    69 +
 src/uPlot/CreateTypeAction.cc                      |    57 +
 src/uPlot/CreateTypeAction.h                       |    59 +
 src/uPlot/DataBuilder.cc                           |   102 +
 src/uPlot/DataBuilder.h                            |    60 +
 src/uPlot/DataObject.cc                            |   756 +
 src/uPlot/DataObject.h                             |   145 +
 src/uPlot/Decoder.cc                               |    86 +
 src/uPlot/Decoder.h                                |   146 +
 src/uPlot/Device.cc                                |    99 +
 src/uPlot/Device.h                                 |   142 +
 src/uPlot/DeviceData.h                             |    76 +
 src/uPlot/DrawingPriority.cc                       |   345 +
 src/uPlot/DrawingPriority.h                        |    59 +
 src/uPlot/DropAction.cc                            |   135 +
 src/uPlot/DropAction.h                             |    76 +
 src/uPlot/ExportDialog.cc                          |   392 +
 src/uPlot/ExportDialog.h                           |    63 +
 src/uPlot/GenAppService.cc                         |    93 +
 src/uPlot/GenAppService.hpp                        |   126 +
 src/uPlot/GeoTool.cc                               |   758 +
 src/uPlot/GeoTool.h                                |    80 +
 src/uPlot/GeoToolManager.cc                        |   132 +
 src/uPlot/GeoToolManager.h                         |   112 +
 src/uPlot/GeopointsDecoder.cc                      |   121 +
 src/uPlot/GeopointsDecoder.h                       |    72 +
 src/uPlot/GraphicsEngine.cc                        |    38 +
 src/uPlot/GraphicsEngine.h                         |   166 +
 src/uPlot/GribDecoder.cc                           |   127 +
 src/uPlot/GribDecoder.h                            |    79 +
 src/uPlot/Location.cc                              |   284 +
 src/uPlot/Location.h                               |   144 +
 src/uPlot/MacroConverter.cc                        |   309 +
 src/uPlot/MacroConverter.h                         |   123 +
 src/uPlot/MacroVisitor.cc                          |   180 +
 src/uPlot/MacroVisitor.h                           |   102 +
 src/uPlot/MagPlusBatchService.cc                   |    30 +
 src/uPlot/MagPlusBatchService.h                    |    59 +
 src/uPlot/MagPlusInteractiveService.cc             |    48 +
 src/uPlot/MagPlusInteractiveService.h              |    66 +
 src/uPlot/MagPlusService.cc                        |    85 +
 src/uPlot/MagPlusService.h                         |   167 +
 src/uPlot/MagicsGraphicsEngine.cc                  |   679 +
 src/uPlot/MagicsGraphicsEngine.h                   |   142 +
 src/uPlot/MagicsTranslator.cc                      |   976 +
 src/uPlot/MagicsTranslator.h                       |   532 +
 src/uPlot/Makefile.am                              |   229 +
 src/uPlot/Makefile.in                              |  6452 +++++
 src/uPlot/MapView.cc                               |   545 +
 src/uPlot/MapView.h                                |   117 +
 src/uPlot/MatchingCriteria.cc                      |   198 +
 src/uPlot/MatchingCriteria.h                       |    69 +
 src/uPlot/MatchingInfo.cc                          |    21 +
 src/uPlot/MatchingInfo.h                           |    68 +
 src/uPlot/MvCallback.hpp                           |    82 +
 src/uPlot/MvIcon.cc                                |   197 +
 src/uPlot/MvIcon.h                                 |   177 +
 src/uPlot/MvIconDataBase.cc                        |  2034 ++
 src/uPlot/MvIconDataBase.h                         |   470 +
 src/uPlot/MvLayer.cc                               |    50 +
 src/uPlot/MvLayer.h                                |    79 +
 src/uPlot/MvMain.cc                                |   161 +
 src/uPlot/MvMainGeoTool.cc                         |   104 +
 src/uPlot/MvMainuPlotBatch.cc                      |    38 +
 src/uPlot/MvQAreaSelection.cc                      |   781 +
 src/uPlot/MvQAreaSelection.h                       |    80 +
 src/uPlot/MvQContentsModel.cc                      |   579 +
 src/uPlot/MvQContentsModel.h                       |   125 +
 src/uPlot/MvQContentsWidget.cc                     |   112 +
 src/uPlot/MvQContentsWidget.h                      |    53 +
 src/uPlot/MvQCursorData.cc                         |   691 +
 src/uPlot/MvQCursorData.h                          |   107 +
 src/uPlot/MvQCursorDataWidget.cc                   |    73 +
 src/uPlot/MvQCursorDataWidget.h                    |    47 +
 src/uPlot/MvQDataWidget.cc                         |   426 +
 src/uPlot/MvQDataWidget.h                          |    70 +
 src/uPlot/MvQLayerContentsIcon.cc                  |   149 +
 src/uPlot/MvQLayerContentsIcon.h                   |    48 +
 src/uPlot/MvQLayerDataWidget.cc                    |   607 +
 src/uPlot/MvQLayerDataWidget.h                     |    90 +
 src/uPlot/MvQLayerMetaDataWidget.cc                |   844 +
 src/uPlot/MvQLayerMetaDataWidget.h                 |    84 +
 src/uPlot/MvQLayerModel.cc                         |   863 +
 src/uPlot/MvQLayerModel.h                          |   122 +
 src/uPlot/MvQLayerWidget.cc                        |   948 +
 src/uPlot/MvQLayerWidget.h                         |   167 +
 src/uPlot/MvQLineSelection.cc                      |   790 +
 src/uPlot/MvQLineSelection.h                       |    83 +
 src/uPlot/MvQMagnifier.cc                          |   946 +
 src/uPlot/MvQMagnifier.h                           |   219 +
 src/uPlot/MvQPlaceMark.cc                          |   757 +
 src/uPlot/MvQPlaceMark.h                           |   243 +
 src/uPlot/MvQPlaceMarkDialog.cc                    |   342 +
 src/uPlot/MvQPlaceMarkDialog.h                     |    76 +
 src/uPlot/MvQPlaceMarkMimeData.cc                  |    30 +
 src/uPlot/MvQPlaceMarkMimeData.h                   |    39 +
 src/uPlot/MvQPlaceMarkModel.cc                     |   435 +
 src/uPlot/MvQPlaceMarkModel.h                      |   120 +
 src/uPlot/MvQPlaceMarkWidget.cc                    |   338 +
 src/uPlot/MvQPlaceMarkWidget.h                     |    68 +
 src/uPlot/MvQPlotItem.h                            |    50 +
 src/uPlot/MvQPlotView.cc                           |   762 +
 src/uPlot/MvQPlotView.h                            |   109 +
 src/uPlot/MvQPointSelection.cc                     |   378 +
 src/uPlot/MvQPointSelection.h                      |    73 +
 src/uPlot/MvQProgressItem.cc                       |    62 +
 src/uPlot/MvQProgressItem.h                        |    40 +
 src/uPlot/MvQPushButton.h                          |    39 +
 src/uPlot/MvQStepModel.cc                          |   104 +
 src/uPlot/MvQStepModel.h                           |    59 +
 src/uPlot/MvQStepWidget.cc                         |   734 +
 src/uPlot/MvQStepWidget.h                          |    83 +
 src/uPlot/MvQZoom.cc                               |   157 +
 src/uPlot/MvQZoom.h                                |    64 +
 src/uPlot/MvQZoomStackWidget.cc                    |   563 +
 src/uPlot/MvQZoomStackWidget.h                     |   120 +
 src/uPlot/NewpageAction.cc                         |    42 +
 src/uPlot/NewpageAction.h                          |    60 +
 src/uPlot/ObjectInfo.cc                            |   779 +
 src/uPlot/ObjectInfo.h                             |   164 +
 src/uPlot/ObjectList.cc                            |   837 +
 src/uPlot/ObjectList.h                             |   124 +
 src/uPlot/ObjectSpec.OutputFormats                 |   286 +
 src/uPlot/OutputFormatAction.cc                    |    81 +
 src/uPlot/OutputFormatAction.h                     |    59 +
 src/uPlot/Page.cc                                  |  1723 ++
 src/uPlot/Page.h                                   |   366 +
 src/uPlot/PaperSize.h                              |    67 +
 src/uPlot/PlotAction.cc                            |    57 +
 src/uPlot/PlotAction.h                             |    59 +
 src/uPlot/PlotMod.cc                               |   280 +
 src/uPlot/PlotMod.h                                |   126 +
 src/uPlot/PlotModAction.cc                         |    24 +
 src/uPlot/PlotModAction.h                          |    86 +
 src/uPlot/PlotModBatch.cc                          |    91 +
 src/uPlot/PlotModBatch.h                           |    66 +
 src/uPlot/PlotModBuilder.cc                        |    53 +
 src/uPlot/PlotModBuilder.h                         |    92 +
 src/uPlot/PlotModConst.h                           |   195 +
 src/uPlot/PlotModInteractive.cc                    |    87 +
 src/uPlot/PlotModInteractive.h                     |    75 +
 src/uPlot/PlotModService.cc                        |    68 +
 src/uPlot/PlotModService.h                         |    80 +
 src/uPlot/PlotModTask.cc                           |    29 +
 src/uPlot/PlotModTask.h                            |    91 +
 src/uPlot/PlotModView.cc                           |   479 +
 src/uPlot/PlotModView.h                            |   219 +
 src/uPlot/PlotPageBuilder.cc                       |   132 +
 src/uPlot/PlotPageBuilder.h                        |    63 +
 src/uPlot/PmContext.cc                             |   105 +
 src/uPlot/PmContext.h                              |   147 +
 src/uPlot/PmGeneralProjection.cc                   |   781 +
 src/uPlot/PmGeneralProjection.h                    |   737 +
 src/uPlot/PmIndividualProjection.cc                |    64 +
 src/uPlot/PmIndividualProjection.h                 |    97 +
 src/uPlot/PmProjection.cc                          |   254 +
 src/uPlot/PmProjection.h                           |   528 +
 src/uPlot/Preferences.cc                           |   275 +
 src/uPlot/Preferences.h                            |   160 +
 src/uPlot/Presentable.cc                           |  1432 +
 src/uPlot/Presentable.h                            |   716 +
 src/uPlot/Root.cc                                  |   244 +
 src/uPlot/Root.h                                   |   117 +
 src/uPlot/SatelliteProjection.cc                   |   278 +
 src/uPlot/SatelliteProjection.h                    |   304 +
 src/uPlot/SimpleDecoder.cc                         |    71 +
 src/uPlot/SimpleDecoder.h                          |    67 +
 src/uPlot/SkipAction.cc                            |    43 +
 src/uPlot/SkipAction.h                             |    59 +
 src/uPlot/SubPage.cc                               |   756 +
 src/uPlot/SubPage.h                                |   185 +
 src/uPlot/SuperPage.cc                             |  1444 +
 src/uPlot/SuperPage.h                              |   328 +
 src/uPlot/Task.cc                                  |   142 +
 src/uPlot/Task.h                                   |   125 +
 src/uPlot/VertProfView.cc                          |   124 +
 src/uPlot/VertProfView.h                           |    83 +
 src/uPlot/Visitor.h                                |    76 +
 src/uPlot/XDevice.cc                               |   321 +
 src/uPlot/XDevice.h                                |    88 +
 src/uPlot/XSectView.cc                             |   143 +
 src/uPlot/XSectView.h                              |   100 +
 src/uPlot/ZoomStacks.cc                            |    61 +
 src/uPlot/ZoomStacks.h                             |    90 +
 src/uPlot/geoSelect.qrc                            |    10 +
 src/uPlot/layerInfo.css                            |    81 +
 src/uPlot/uPlot.cc                                 |  1290 +
 src/uPlot/uPlot.h                                  |   149 +
 src/uPlot/uPlot.qrc                                |    37 +
 src/uPlot/uPlotApp.cc                              |    45 +
 src/uPlot/uPlotApp.h                               |    37 +
 src/uPlot/uPlotBase.cc                             |  1132 +
 src/uPlot/uPlotBase.h                              |   154 +
 src/uPlot/uPlotBatchApp.cc                         |    49 +
 src/uPlot/uPlotBatchApp.h                          |    37 +
 src/uPlot/uPlotManager.cc                          |    99 +
 src/uPlot/uPlotManager.hpp                         |    29 +
 src/uPlot/uPlotService.cc                          |   134 +
 src/uPlot/uPlotService.hpp                         |    91 +
 test/Makefile.am                                   |     4 +
 test/Makefile.in                                   |   650 +
 test/data/z500.grb                                 |   Bin 0 -> 58200 bytes
 test/macros/HelloWorld.mv                          |    20 +
 test/macros/Makefile.am                            |    11 +
 test/macros/Makefile.in                            |   547 +
 test/macros/MarsAccess.mv                          |    19 +
 test/macros/layoutx3.mv                            |    61 +
 test/macros/set_output.mv                          |    50 +
 version.sh                                         |    25 +
 2288 files changed, 592514 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..287c710
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,44 @@
+Authors of Metview
+==================
+
+The main development of Metview is done through the 
+
+            Meteorological Visualisation Section 
+
+at the
+
+       European Centre for Medium-Range Weather Forecasts 
+               (ECMWF - http://www.ecmwf.int ). 
+
+
+and
+
+   National Institute for Space Research (INPE, Brazil)
+                   (http://www.inpe.br/)
+
+
+Main programmers:
+=================
+
+Iain Russell
+Fernando Ii
+Sandor Kertesz
+Sylvie Lamy-Thepaut
+Stephan Siemen
+
+Past contributors:
+==================
+
+Geir Austad (ECMWF)
+Leonardo Bins  (INPE)
+Rogerio Bonifacio (ECMWF)
+Gilberto Camara (INPE)
+Ricardo Cartaxo (INPE)
+Manuel Fuentes (ECMWF)
+Arne Jorgensen (ECMWF)
+Vesa Karhila (ECMWF)
+Jean-Philippe Martin-Flatin (ECMWF)
+Laercio Namikawa (INPE)
+Elisa Nishimura (INPE)
+Baudouin Raoult (ECMWF)
+Lubia Vinhas (INPE)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..99a1252
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,202 @@
+                                Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2007-2012 European Centre for Medium-Range Weather Forecasts (ECMWF)
+   and Brazil's Instituto Nacional de Pesquisas Espaciais (INPE)
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..524f287
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2682 @@
+   +---------------------------------------------------------------------+
+   |                                                                     |
+   |          This records changes since 4.0 was released.               |
+   |             It is intended mainly for developers.                   |
+   |                                                                     |
+   |    Note: Magics, Emoslib, Mars & GRIB_API related changes are       |
+   |          _not_ recorded here.                                       |
+   |                                                                     |
+   |         Also contains Metview update history at ECMWF.              |
+   |                                                                     |
+   |                     Newest items are at the top                     |
+   |                                                                     |
+   +---------------------------------------------------------------------+
+   +---------------------------------------------------------------------+
+
+254ir Lambert grids: nearest_gridpoint returns the first value in the grid 
+
+   .This is because an update in the Lambert code corresponding to a new
+    GRIB_API version (in 2010) was not completely copied from Metview 3
+    to Metview 4; latitude values in degrees were not being multiplied by
+    1000 and so the algorithm did not work.
+
+   .files: libMetview/MvGrid.cc
+   .date: 2013-04-03
+
+253ir Gaussian grids: construction of MvField can be slow 
+
+   .This is because the GRIB_API function grib_get_gaussian_latitudes() is
+    expensive, and we were calling it for each Gaussian field we loaded.
+    This is not necessary because we can cache the result for each grid size.
+
+   .files: libMetview/MvGrid.[cc,h]
+   .date: 2013-04-03
+
+252ir Meteogram: added new option: '15 days epsgram with climate'
+
+   .Functionality was already in Magics; just added the interface in Metview
+
+   .files: Meteogram/MetPlus.cc,MetPlusDef
+   .date: 2013-03-27
+
+251ir Macro: improved deletion of temporary GRIB files
+
+   .The issue where temporary GRIB files which were passed to
+    icon functions were not subsequently being deleted has been fixed.
+
+   .files: Macro/value.[cc,h],grib.cc
+   .date: 2013-03-25
+
+250ir Macro: removed _UNSET parameter from expanded requests
+
+   .We do not use this parameter, and it can increase the size of a
+    request, which curently has an impact on uPlotBatch when plotting
+    hundreds of page.
+
+   .files: Macro/request.cc
+   .date: 2013-03-04
+
+249ir Updated version number to 4.3.8
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2013-02-26
+
+248ir GRIB Filter icon now saves parameter short name instead of number
+
+   .The GRIB Filter icon was previously storing things like
+    PARAM=130 instead of PARAM='t'. It now does the latter.
+
+   .files: share/metview/etc/ObjectList
+   .date: 2013-02-21
+
+247ir Updated version number to 4.3.7
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2013-02-19
+
+246fi Velstr: fix test of PARAM value
+
+   .Updated the test to check if the input data is Vorticity or Divergence.
+    Now, it works for grib1 and grib2 data.
+
+   .files: Velstr/velstr-exFortran.cc
+   .date: 2013-01-31
+
+245ir Updated version number to 4.3.6
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2013-01-28
+
+244ir SCM: added first version of the SCM Visualiser
+
+   .Still needs some work, but basic functionality is there.
+
+   .files: Scm/various
+   .date: 2013-01-18
+
+
+243ir Cross Section: added y-axis title
+
+   .Added a default y-axis title which indicates whether we are plotting
+    on pressure levels or model levels.
+
+   .files: XSection/XSect.cc
+   .date: 2013-01-08
+
+242ir Macro: added new function dimension_names(netcdf)
+
+   .New Macro function list dimension_names(netcdf) which returns
+    a list of the dimension names for the current netCDF variable.
+
+   .files: Macro/netcdf.cc
+   .date: 2012-12-10
+
+241fi Divrot: fix test of PARAM value
+
+   .Updated the test to check if the input data is Vorticity or Divergence.
+
+   .files: Divrot/divrot-exFortran.cc
+   .date: 2012-11-20
+
+240ir Improved efficiency of some fieldset routines
+
+   .After noticing that Average Data was taking a long time to compute
+    its results, it turned out that the culprit was the repeated calling
+    of GRIB_API functions to retrieve header information. The calls
+    specifically implicated for Average Data were replaced with versions
+    which cache the information. The result is a large improvement in
+    speed of the Average Data module (e.g. 37 seconds down to 1.6 seconds).
+    It should also improve some other functionality, such as the 'batch'
+    calling of nearest_gridpoint(), but this has not been measured.
+
+   .files: version.sh
+   .date: 2012-11-06
+
+239ir Updated version number to 4.3.5
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-10-25
+
+238sk New environment variable: METVIEW_EXTRA_GRIB_DEFINITION_PATH
+
+   .Metview now understands a new environment variable which users can
+    use to specify a directory where custom GRIB_API definition files
+    are stored. METVIEW_EXTRA_GRIB_DEFINITION_PATH should be set
+    before starting Metview.
+
+   .files: scripts/metview_base,metview_help uPlot/uPlotService.cc libUtil/GribMetaData.cc
+   .date: 2012-10-26
+
+237ir Macro: added new function grib_get(fieldset, list, string)
+
+   .New Macro function grib_get(fieldset, list, string) for
+    the efficient retreival of multiple GRIB keys from a fieldset.
+    The keys are provided as a list for the second argument; by default
+    they will be retreived as strings, but their type can be specified
+    by adding a modifier to their names, following the convention used
+    by grib_ls where the key name is followed by a colon and then one or
+    two characters which specify the type (s=string, l=long, d=double,
+    la=long array, da=double array). For example, the key 'centre' can
+    be retreived as a string with 'centre' or 'centre:s', or as a number
+    with 'centre:l'.
+    The result is always a list of lists; by default, or if the optional
+    third argument is 'field', the result will be grouped by field,
+    containing one list per field, each of these lists containing one
+    element per key; if the optional third parameter is 'key', the result
+    will be grouped by key, containing one list per key, each of these
+    lists containing one element per field.
+    Example - the following lines of Macro code on a particular 6-field fieldset:
+      print (grib_get (data, ['editionNumber', 'centre',   'level:s', 'step'], 'field'))
+      print (grib_get (data, ['editionNumber', 'centre:l', 'level:s', 'step'], 'key'))
+    produces this output:
+     [[1,ecmf,1000,0],[1,ecmf,500,0],[1,ecmf,100,0],[1,ecmf,1000,48],[1,ecmf,500,48],[1,ecmf,100,48]]
+     [[1,1,1,1,1,1],[98,98,98,98,98,98],[1000,500,100,1000,500,100],[0,0,0,48,48,48]]
+
+   .files: Macro/grib.cc
+   .date: 2012-10-25
+
+236sk Added expression support for column variables in the ODB Visualiser
+
+    .Previously the column variables in ODB Viusaliser could strictly take
+     column names. Now arbitrary ODB expressions/functions can be used for
+     them. E.g. by setting ODB_VALUE_VARIABLE to an_depar-fg_depar will result 
+     in plotting of the difference between the analysis and first guess 
+     departures. 
+
+    .files: files in libUtil, libMvQtGui and Odb 
+    .date: 2012-10-18
+
+235fi Updated the scheme to trigger requests to be sent to Magics
+
+   .This fix the problem of running Metview in batch mode when another Service
+    was called. For example: AverageView + GribData. The application XSection was
+    called to produce the netCDF file, but the uPlotBatch module was not waiting
+    for it and was killing himself.
+
+    .files: several files in uPlot
+    .date: 2012-10-18
+
+234sk Alphabetically sorted columns in the Data tab of the ODB examiner
+    
+    .The ODB columns in the Data tab of the ODB Examiner are now
+     alphabetically sorted by default. 
+    
+    .files: various files in libMvQtGui
+    .date: 2012-10-04
+
+
+233sk Added show/hide columns option to the Data tab of the ODB examiner
+    
+    .The ODB columns in the Data tab of the ODB Examiner can now be hidden
+    /shown.
+    
+    .files: various files in libMvQtGui
+    .date: 2012-10-04
+
+232sk Enabled ODB Visualiser to save additional columns to the resulting ODB 
+
+    .A parameter called ODB_METADATA_VARIABLES was added to the ODB Visualiser.
+     The columns specified here will be added to the ODB Visualiser's output
+     on top of the lat/lon/value etc. columns. These extra columns can then be 
+     examined in uPlot's new ODB data browser.	
+
+    .files: Odb/OdbVisaliser.cc, OdbVisualiserDef
+    .date: 2012-10-04
+    
+231sk Added an ODB data browser to uPlot
+  
+   .The Values panel in the Data tab of uPlot's sidebar now contains a value
+    browser for ODB data. The ODB data appear in the same table format as in the ODB
+    Examiner. The ODB columns can be hidden/shown and the their visibility status
+    is saved between uPlot sessions. A data probe was also added to the interface. 
+    By positioning the data probe to a given location in the plot the corresponding
+    row will be highlighted in the data table. It also works vice versa: by selecting a 
+    row in the data table the data probe will be automatically placed to the
+    corresponding location in the plot.
+     
+    .files: various files in uPlot, libMvQtGui, Odb and images
+    .date: 2012-10-04
+
+230sk Reorganised sidebar's content in uPlot
+  
+   .The sidebar tabs in uPlot have been restructured. The Layers tab now only 
+    contains the layer list and a new tab called Data was added for the layer
+    data. By selecting the Data tab users are able to see metadata and data values
+    associated with the selected layer. 
+    
+    .files: various files in uPlot, libMvQtGui and images
+    .date: 2012-10-04
+
+229ir Added the ability to shade the area between two curves to the Input Visualiser
+
+   .This was already in Magics - we just needed to add the interface to Metview.
+    The Input Visualiser now has a new mode, XY_AREA. The Graph Plotting
+    icon has now opened up the line-plotting attributes when the mode is Area.
+    See also changes submitted by Sylvie.
+
+   .files: StdAppManager/StdAppManager.cc,InputVisualiserRules,InputVisualiserDef,
+           share/metview/etc/MGRAPHRules.
+   .date: 2012-10-05
+
+228ir Cross Section producing an empty plot when given data in model levels with LNSP  (Elias Holm)
+
+   .The resulting NetCDF visualiser request was asking for the LNSP
+    field to be plotted instead of the data field. Additionally, the levels
+    were 100 times what they should have been.
+
+   .files: XSection/Xsect.cc,McXSectFrame.[cc,h]
+   .date: 2012-10-02
+
+227ir Cross Section producing an empty plot when transect line is of constant longitude  (Johannes Flemming)
+
+   .Solution was to check whether X1==X2 and set latitude instead of
+    longitude to be the X variable.
+
+   .files: XSection/Xsect.cc
+   .date: 2012-10-01
+
+226ir ObsFilter was not working with Level=Occurrence  (Johannes Flemming)
+
+   .When Level was set to Occurrence, the ObsFilter was returning all
+    missing values. This was due to a small syntax error when this
+    module had the Descriptors added as options for Level.
+
+   .files: ObsFilter/ObsFilter.cc
+   .date: 2012-09-28
+
+225ir Updated version number to 4.3.4
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-09-13
+
+224ir Improved the Display Window's Cursor Data for very small values
+
+   .If a data value is very small, the cursor data will revert to
+    scientific notation.
+
+   .files: uPlot/MvQCursorData.[cc,h]
+   .date: 2012-09-12
+
+223ir Macro could not read macro files with the read() command
+
+   .Now a macro can read('/path/to/macro') and obtain a list of strings
+    in the same way as it can with a standard text file.
+
+   .files: Macro/files.cc
+   .date: 2012-08-16
+
+222ir Updated version number to 4.3.3
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-08-14
+
+==============================================================================
+           2012-08-14 Metview 4.3.2 released for export
+==============================================================================
+
+221ir Installation: Qt modules not building on some systems
+
+   .Due to incorrect variables set by the 'qmake' facility, Metview's
+    Qt-based modules were not building on some systems. Metview now
+    sorts out these variables at configure time.
+
+   .files: configure.ac, lots of Makefile.am files.
+   .date: 2012-08-14
+
+220fi GribVectors: only showing the first plot
+
+   .If the input fieldset contains more than one vector-field, uPlot was only
+    showing the first plot.
+
+   .files: uPlot/MagicsTranslator.cc, GribVectors/Vector.cc
+   .date: 2012-08-13
+
+219ir Installation: PKG_CONFIG_PATH was not being set correctly
+
+   .The result was that Magics could often not be found during 'configure',
+    but this was being hidden at ECMWF because it was being set additionally
+    in configure.ecmwf. The problem was that the environment variable was
+    being set, but not exported; now it is also exported.
+
+   .files: configure.ac, configure.ecmwf
+   .date: 2012-08-07
+
+218ir Updated version number to 4.3.2
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-08-06
+
+==============================================================================
+           2012-08-06 Metview 4.3.1 released for export
+==============================================================================
+
+217ir Macro Editor: 'find/replace' now wrap around
+
+   .When searching reaches the bottom (or top for a backwards search) of
+    the file, it continues from the top (or bottom). This is not
+    currently a user option, and is the only behaviour available.
+
+   .files: MacroEditor/MacroEdit.[cc,h]
+   .date: 2012-07-24
+
+216ir Macro: fixed issue when reading floating-point netCDF attributes
+
+   .Float and double attributes for netCDF variables were being cropped
+    because they were being converted to text form in preparation for
+    being put into a request (to be seen as a Macro definition variable).
+    This was using the netCDF as_string() function to perform the
+    conversion. This was however cropping the numbers quite harshly
+    and removing many significant digits. This has now been over-ridden
+    for the case of converting float/double attributes to strings.
+
+   .files: libMvNetCDF/MvNetCDF.[cc,h]
+   .date: 2012-07-17
+
+215ir Macro: added new function sort(vector, string)
+
+   .New Macro function sort(vector, string) returns a sorted version of
+    the given vector. If no second argument is given, the result will be
+    sorted in ascending order; otherwise, a second argument consisting of
+    a string can be given: '<' for ascending, '>' for descending order.
+
+   .files: Macro/mvector.cc,value.h
+   .date: 2012-07-17
+
+214ir Updated version number to 4.3.1
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-07-16
+
+213fi Allow the geopoints decoder to access only part of the data
+
+   .A new parameter, 'number of lines' (nlines), was added to inform the decoder to
+    read only the first nlines of the file. For example, if the date and time information
+    need to be decoded, only the first line of the data needs to be read.
+
+   .files: libMetview/MvGeoPoints.*, uPlot/GeopointsDecoder.cc
+   .date: 2012-07-13
+
+212ir Remove redundant output options from Opera Radar Filter
+
+   .Removed output options which were the 2D geopoints formats. This parameter
+    is in fact ignored by the module; the ouput is always geopoints/xyv.
+   .files: OperaRadar/OperaRadarDef
+   .date: 2012-07-10
+   
+   
+211sk Extended level filter in Obsfilter to work with arbitrary coordinate descriptors 
+
+   The level filter in ObsFilter so far has allowed only surface or pressure
+   level/layer selection. Now two new options were added to the level filter so
+   that it could work for any kind of coordinate descriptors (e.g. height, satellite
+   channel etc). These two new options are follows: 
+  
+   o Descriptor Value: If Level is set to Descriptor Value then ObsFilter performs
+     level filtering according to the descriptor specified in Level Descriptor.
+     The level value is taken from parameter First Level. 
+   o Descriptor Range: If Level is set to Descriptor Range then ObsFilter
+     works similarly but selects the first available level in the specified range.
+     The level range is taken form parameters First Level and Second Level. 
+     
+   .files: ObsFilter/ObsFilter.cc, libMetview/MvObs.cc,MvBufrObs.h,
+           etc/ObsFilterDef, ObsFilterRules
+   .date: 2012-07-09 
+
+210ir Ensure that icons in the icon drawers are always writable
+
+   .When running Metview from a development directory, there is a risk of copying
+    read-only icon files from the Perforce depository. This can also happen with
+    the tarball (should be ok when run from an installed version though). Now,
+    when Metview UI starts up and is copying the icon files from the system
+    drawers, it also checks whether each local file is writable, and if not, makes it so.
+
+   .files: libMetview/MavPath.[cc,h], MetviewUI/Filter.[cc,h], FolderDrawers.cc
+   .date: 2012-07-09
+
+209fi New application: GribVectors
+
+   .This application is similar to Metview 3 Vectors.
+
+   .files: configure.ac, etc/uPlotTable, icons/Makefile.am, src/Makefile.am,
+           uPlot/MagicsTranslator.*, uPlotManager.cc,
+           GribVectors/GRIBVECTORS.xpm, GribVectorsDef, GribVectorsRules,
+           Makefile.am, ObjectSpec.GribVectors, Vectors.*
+
+   .date: 2012-06-15
+
+208ir Removed code for handling computations with GRIB fields in polar stereographic grids
+
+   .This was done to avoid some licensing issues.
+
+   .files: libMetview/MvGrid.[cc,h]
+   .date: 2012-06-21
+
+207ir Updated version number to 4.3.0
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-05-29
+
+206sk GEO_TO_GRIB application: does not always generate the required grid geometry (Souhail Boussetta)
+   
+   .GEO_TO_GRIB did not always generate the required grid: sometimes 
+    the output grid was smaller by one row or column than expected. This
+    issue has been fixed now. On top of that GEO_TO_GRIB more rigorously
+    tests the output grid parameters and gives a warning message if any
+    incosistencies are found (e.g. if grid resuolution does not match the
+    size of the domain).
+   
+   .files: MvApp/geo_to_grib.cc
+   .date: 2012-05-29 
+   
+205vk OPERA Radar Filter: new module
+
+   .Added new module for the purpose of reading OPERA radar BUFR  messages
+    and converting the data to geopoints format. See the changelog on the
+    web, and in the future, the documentation, for more details [METV-85].
+    Note: this log entry was written by ir, a couple of weeks after the
+    work was done.
+
+   .files: src/OperaRadar/*
+   .date: 2012-05-29
+
+204ir uPlot: added parameter LEGEND_TITLE_ORIENTATION to the Legend icon
+
+   .Now the user can decide, for a column legend, if they want the
+    title text to be horizontal or vertical (default).
+
+   .files: share/metview/etc/MLEGENDDef,MLEGENDRules
+   .date: 2012-05-29
+
+203fi uPlot: added Layer info to Data, Text and Legend
+
+   .The Layer info for Coastlines will be added later, after the
+    Coastlines handling in Metview is revised.
+
+   .files: uPlot/DataObject.cc, Device.cc, GraphicsEngine.h,
+           MagicsGraphicsEngine.*, Makefile.am, MapView.cc,
+           MvIconDataBase.*, MvLayer.*, ObjectList.*, 
+           PlotModView.cc, Presentable.*, Root.cc, SubPage.cc,
+           SuperPage.*, uPlot.*
+   .date: 2012-05-24
+
+202ir Macro: added optional 'resize' parameter to set_values(fieldset)
+
+   .If the user wants to create a new fieldset from a template, they
+    may wish to change the number of values; if they supply
+    a third parameter to the set_values() function, it must be
+    the string 'resize'. More options could be added in the future.
+
+   .files: Macro/grib.cc
+   .date: 2012-05-10
+
+201ir Updated mvl_ml2hPa() to properly encode levels < 1 hPa
+
+   .Pressure levels < 1hPa should actually be encoded in Pa, not hPa;
+    therefore the level needs to be multiplied by 100 in order to
+    make the encoding correct. Issue reported by Sandor while
+    investigating an issue for Rossana.
+
+   .files: share/metview/app=defaults/CommonMacroFuncs/mvl_ml2hpa
+   .date: 2012-05-03
+
+200ir ODB-1 support should now be usable in non-ECMWF installations
+
+   .There were some hard-coded paths and settings for using ODB-1 at
+    ECMWF. These have now been generalised, and the ODB-1 related
+    configure flags have been revised. They are now:
+      --with-odb1-bin         Path to the ODB-1 bin directory.
+      --with-odb1-version     Required version of ODB-1 environment [default=ANY.]
+      --with-odb1-use-script  Path to ODB-1 'use' script (normally 'use_odb.sh').
+
+   .files: scripts/mv_odbsql,mv_odbsql2, configure.ac, configure.ecmwf
+   .date: 2012-05-03
+
+199ir Macro: added new function filter(vector, vector)
+
+   .New Macro function filter(vector, vector) works the same way as the
+    filter function works on geopoints: takes two vectors, and returns a
+    new vector containing only the values of the first vector where the
+    second vector's values are non-zero and non-missing.
+
+   .files: Macro/mvector.cc,value.h
+   .date: 2012-05-02
+
+198ir Startup: added new command-line option -m for specifying a different MAGPLUS_HOME
+
+   .Metview can now be started with the command-line parameter -m <path-to-magics>
+    where the supplied path points to what should be the new MAGPLUS_HOME.
+
+   .files: scripts/metview_base
+   .date: 2012-04-30
+
+197ir Macro: added optional second argument to Macro function describe()
+
+   .The function describe() can now take a second argument to specify how it should
+    handle its results: with no second argument, it will print the function
+    description to stdout. With "as_value" as its second argument, it will instead
+    return a list of strings - one for each version of the function.
+
+   .files: Macro/misc.cc,function.cc,macro.h,node.h
+   .date: 2012-04-30
+
+196ir Macro Editor: added option to automatically insert licence text when opening an empty file
+
+   .This should be used by ECMWF users who are writing new macros for
+    users.
+
+   .files: MacroEditor/MacroEdit.[cc,h,ui], MvMain.cc
+   .date: 2012-04-27
+
+195ir Macro Editor: added 'Insert Licence' action
+
+   .Licence text, as stored in share/metview/etc/licence_for_macros.txt,
+    can now be inserted at the top of a macro (or other file that is
+    edited by the Macro Editor) at the push of a button. It will
+    intelligently decide where to put the text (after the file header
+    if it exists) and how to comment it depending on the current type
+    of file (e.g. Macro or MagML).
+
+   .files: MacroEditor/*.[cc,h]
+   .date: 2012-04-27
+
+194ir Updated version number to 4.2.5
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-04-26
+
+193ir Removed libMars-Odb
+
+   .Because the ODB-MARS client had already been replaced by the 'standard'
+    MARS client which now supports ODB (139ir), we can now remove libMars-Odb
+    and the executable MarsOdb, and redirect RETRIEVE_ODB requests to the
+    'standard' MARS client in the same way that TIGGE requests are.
+
+   .files: libMars-Odb/*, configure.ac, src/Makefile.am, MvApp/MarsG2.cc
+   .date: 2012-04-26
+
+192fi Updated request copying in uPlot
+
+   .Loop to copy requests using justOneRequest function replaced to a new
+    function in MvRequest::copyFromCurrent. This should improve speed performance.
+
+   .files: libMetview/MvRequest.*, uPlot/OutputFormatAction.cc, NewpageAction.cc
+   .date: 2012-04-24
+
+191fi Fix in uPlot: Lambert projection area definition
+
+   .In Lambert projection, if MAP_AREA_DEFINITION was set to CORNERS, the AREA definition
+    values were not passed to Magics correctly.
+
+   .files: uPlot/PmGeneralProjection.*
+   .date: 2012-04-23
+
+190ir Macro Editor: improved visual display of whitespace characters
+
+   .Display of tabs and spaces is now done with symbols instead of
+    syntax highlighting, making it easier to see the invididual characters.
+
+   .files: MacroEditor/*.[cc,h]
+   .date: 2012-04-23
+
+189fi Updated scheme for plotting vector fields automatically
+
+   .uPlot now plots vector fields (u/v or speed/direction) automatically. Currently,
+    uPlot understands the following vector fields (described at uPlotTable): a) u/v: 
+    u/v, 10u/10v, ewss/nsss, ocu/ocv; b) speed/direction: wind/dwi, swh/mwd, shww/mdww,
+    shts/mdts. The order of the fields in the fieldset is important, e.g. u/v is a vector 
+    and v/u is not.
+
+   .files: etc/uPlotTable, uPlot/Dataobject.cc, GribDecoder.cc ObjectList.*
+
+   .date: 2012-04-17
+
+188ir Updated version number to 4.2.4
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-04-12
+
+187ir Fix in stdev(fieldset) macro function (Linus Magnusson)
+
+   .Problem in the Mars stdev() function with uninitialised memory being
+    tested. Under very particular circumstances, this could cause very
+    erroneous results (essentially the maximum possible value). Fix is in
+    the Mars code, done by Manuel Fuentes but mentioned here because it
+    directly affects a Macro function.
+
+   .files: libMars/calc.c
+   .date: 2012-04-04
+
+186ir Updated version number to 4.2.3
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2012-03-29
+
+185fi Added Average View module
+
+   .The basic functionality is working. The Macro automatic generation function
+    needs to be updated.
+
+   .files: etc/MAXISDef, MAXISRules, MAverageViewDef, MAverageViewRules, MXSectViewDef, 
+           uPlotTable, ObjectList, Makefile.am, PlotPageDef, PlotSuperPageDef,
+           icons/MAVERAGEVIEW.xpm, Makefile.am, CptecAccess/CptecAccessDef,
+           MetviewUI/ViewEditor.cc, XSection/VProfileDef, XAverageDef, XSectionDef,
+           Xsect.cc, uPlot/AverageView.*, XsectView.cc, uPlotManager.cc, Makefile.am
+
+   .date: 2012-03-28
+
+184sk ODB Filter does not fail if the query runs correctly but returns no data
+
+   .It can happen that an ODB/SQL query runs correctly but returns no data. In this
+    case ODB Filter and ODB Visualiser do not fail anymore. This is true for both
+    the interactive usage and Macro.
+     
+   .files: libMetview/MvScanFileType.cc, macro/codb.cc, 
+           Odb/OdbFilter.cc, OdbVisualiser.cc 
+   .date: 2012-03-19
+
+183sk Add a new tab to show values in the Grib Examiner 
+
+   .The Grib Examiner now fatures a new dump mode on the right hand side
+    to display the latutitude and longitude co-ordinates and the values of
+    all points coded in a message. 
+
+   .files: libUtil/GribMetaData.[cc,h], 
+           libMvQtGu/MvQGribDumpModel.[cc,h], MvQGribExaminerBase.[cc,h]
+   .date: 2012-03-19
+
+182sk Added NetCDF support to the layer meta-data panel in uPlot
+
+   .The layer meta-data panel in uPot now displays information, statistics 
+    and a histogram for NetCDF data.
+
+   .files: app-defaults/LayerKeyProfile_defualt.xml
+   .date: 2012-03-12
+
+181vk More fixes in 'MARS Catalogue' tab (in MARS editor)
+
+   .Modified code in "Find the current settings" to expand the request
+    using EXPAND_LAST_NAME (it looks like MARS Catalogue does not
+    understand Metview default EXPAND_2ND_NAME). Now finding works
+    much better, i.e. some requests work (almost?) OK, while others
+    may still have some hickups.
+
+   .files: MetviewUI/SimpleEditor.[cc,h], MetviewUI/CatalogDrawer.cc
+   .date: 2012-03-12
+
+180fi Added Vertical Profile View module
+
+   .Only the basic functionality is working. There are still funtions to be
+    added, such as, customising axes and Macro automatic generation.
+
+   .files: etc/MVertProfViewDef, MVertProfViewRules, uPlotTable, ObjectList,
+           Makefile.am, icons/MVPROFVIEW.xpm, Makefile.am,
+           uPlot/CommonXSectView.*, Makefile.am, DataObject.cc, Page.*,
+           MagicsTranslator.*, SubPage.cc, VertProfView.*, XSectView.*,
+           uPlotManager.cc
+   .date: 2012-03-11
+
+179fi Added XSection View module
+
+   .Only the basic functionality is working. There are still funtions to be
+    added, such as, customising axes and Macro automatic generation.
+
+   .files: etc/MXSectViewDef, uPlotTable, XSection/ObjectSpec.XSection, XSect.cc,
+           uPlot/CartesianView.cc, CommonXSectView.*, Makefile.am, PlotModConst.h,
+           PlotModService.cc, PlotModView.*, PmProjection.h, XSectView.*,
+           uPlotManager.cc
+   .date: 2012-03-09
+
+178vk Fixes in 'MARS Catalogue' tab (in MARS editor)
+
+   .Commented out non-functional "Grab request from current page" button
+    and changed the request created by "Find the current settings" in the
+    catalogue" button to create lower case values as MARS Catalogue seems
+    not to like upper cases.
+
+    TO DO:
+    -----
+    It seems that in "Find the current settings" MARS Catalogue uses
+    the last value (EXPAND_LAST_NAME) and does not understand the second
+    value (EXPAND_2ND_NAME) that Metview uses by default => somehow use
+    the language file and expand the request using EXPAND_LAST_NAME.
+
+   .files: MetviewUI/UICatalogDrawer.cc, MetviewUI/CatalogDrawer.cc
+   .date: 2012-03-08
+
+177fi Updated communication between Macro and uPlot
+
+   .Macro was updated to better handle plotting requests, such as PLOT and NEWPAGE.
+    The function to handle the EDIT request was also updated.
+
+   .files: Macro/request.cc, etc/DeviceDriverDef, EPSOutputDef, KMLOutputDef,
+           PDFOutputDef, PNGOutputDef, PSOutputDef, SVGOutputDef
+   .date: 2012-03-07
+
+176fi Updated the zoom scheme in uPlot
+
+   .The new zoom scheme holds a string instead of a area location (two coordinates
+    points) information. This string contains a set of definitions, related to
+    area, projection and view, which will be used by Magics to re-draw the map.
+
+   .files: uPlot/CartesianView.*, MapView.*, Page.*, PlotModView.*, Presentable.h,
+           ZoomStacks.*, uPlotBase.cc
+   .date: 2012-03-02
+
+175fi Added in uPlot a redrawing scheme to handle resquests from the Contents
+
+   .First version: it only handles certain visdefs (not coastlines)
+
+   .files: uPlot/Page.h, PlotModView.*, SuperPage.cc
+   .date: 2012-02-23
+
+174fi Added new View: GeoView
+
+   .GeoView is now the default 2-D geographical view, replacing MapView.
+
+   .files: etc/Makefile.am, ObjectList, uPlotTable, icons/Makefile.am, MAPVIEW.xpm,
+           uPlot/GeoTool.cc, MapView.cc, ObjectList.*, Page.cc, PlotModConst.h,
+           Presentable.h, SuperPage.*, uPlotBase.cc, uPlotManager.cc
+   .date: 2012-02-22
+
+173ir Fixed problem where stepping in one subpage affected another
+
+   .When displaying more than one page in a single window, changing the
+    animation step in the active page also affected the other pages. This
+    was related to an experimental feature which was switched on by default.
+    It is now switched off.
+
+   .files: uPlot/uPlotBase.cc
+   .date: 2012-02-16
+
+172fi Added 'zoom' functionality in uPlot to handle Proj4 and CartesianView
+
+   .Proj4: do not send the default geographical coordinates
+
+   .files: etc/CartesianViewDef, CartesianViewRules, libUtil/MvRequestUtil.*,
+           uPlot/Cartesianview.*, Location.*, MagicsGraphicsEngine.cc, MapView.cc,
+           Page.cc
+   .date: 2012-02-10
+
+171fi Added functionality to drop visdefs to fieldsets containing 1D and 2D fields
+
+   .Since VECTOR_FIELD concept has been removed (item 167), a new scheme to handle the
+    dropping of visdefs to fieldsets containing 1D and 2D fields is implemented.
+
+   .files: etc/uPlotTable, uPlot/DataObject.cc, Decoder.*, GeoPointsDecoder.*,
+           GraphicsEngine.h, MagicsGraphicsEngine.*, MapView.cc, ObjectList.*,
+           Page.cc, Presentable.cc, Root.cc, SubPage.*
+   .date: 2012-02-06
+
+170sk Added FLEXTRA interface
+
+   .Metview provides a high level interface to the FLEXTRA trajectory model.
+    Metview is able to prepare input data for FLEXTRA, run FLEXTRA and visualise
+    the resulting output files. The interface was developed and tested with
+    version 5.0 of FLEXTRA, which is using GRIB API to handle GRIB2 fields.
+    There is a tutorial available on the Metview website which explains the
+    usage of the FLEXTRA interface in detail.
+
+   .files: all the files in Flextra and FlextraExaminer,
+           scripts/mv_flextra_run, mv_flextra_run.mv,
+	   libUtil/MvFlextra.[cc,h], Macro/mflextra.cc,files.cc
+	   CommonMacroFuncs/mvl_flextra_etadot
+   .date: 2012-02-02 (Files have been continuously added and modified
+          in the last two months).
+
+169ir New Macro function unique(list)
+
+   .Returns a list of the unique elements in the input list.
+
+   .files: Macro/mlist.cc,value.h,code.h
+   .date: 2012-02-02
+
+
+168vk Comment out 'marslog' call that causes a mysterious crash
+
+   .While processing NCEP PrepBUFR files one 'marslog' call causes a crash.
+    Tried 'valgrind' to spot the reason, not found, so commented out the
+    call.
+    Also, now fully ignore erroneus NCEP msgs with ZERO data subsets.
+
+   .files: libMetview/MvObsSet.cc
+   .date: 2012-01-31
+
+167fi Add new scheme for plotting GRIB fieldset containing 1D and 2D fields
+
+   .The VECTOR_FIELD concept has been removed. Now dataunit GRIB accepts 1D
+    and 2D visdefs (e.g. MCONT and MWIND).
+
+   .files: etc/uPlotTable, uPlot/DataObject.*, MagicsGraphicsEngine.*, Root.cc,
+           MagicsTranslator.cc, MapView.*, ObjectList.*, PlotModView.h, SubPage.cc
+   .date: 2012-01-27
+
+166ir Fixed issue where Vertical Profile was failing to handle missing data properly
+
+   .In the AREA/AREA2 modes of the Vertical Profile module, the situation
+    where there was a mixture of missing and non-missing values was not
+    handled properly; now, the missing values are safely ignored. This
+    change was actually in MvFieldSet::integrate(), and should also
+    affect Hovmoeller and possibly other modules which use this function.
+
+   .files: libMetview/MvFieldSet.cc
+   .date: 2012-01-25
+
+165fi New application: CPTECAccess, which is INPE's specific
+
+   .This module is only installed if configure option --enable-inpe is
+    defined.
+
+   .files: src/CptecAccess/*, src/Makefile, share/metview/icons/Makefile.am,
+           configure.ac
+   .date: 2012-01-25
+
+164ir Macro tests on lists now fail if any element of the list is false
+
+   .Previously, the test "if(list)" would always pass, no matter what the
+    contents of the list. Now, "if(list)" will fail if any of its elements
+    fail (currently, only nil and zero fail).
+
+   .files: Macro/code.cc,Macro/include/code.h
+   .date: 2012-01-20
+
+163ir List-list macro operators now return nil if different number of elements
+
+   .List-list macro operators (e.g. "list = list" or "list + list") now return
+    nil and issue a warning message if the two input lists have different
+    numbers of elements. The previous behaviour was to issue an error message
+    and stop the macro.
+
+   .files: Macro/mlist.cc
+   .date: 2012-01-20
+
+162ir Macro function values(netcdf) has a new mode to allow more powerful access to data
+
+   .New syntax: values(netcdf, list) where list is a list with the same number
+    of elements as the number of dimensions of the current netCDF variable. The
+    elements (except one) should be numbers, specifying the indexes (1-based)
+    into the respective dimensions from where the value(s) are to be taken.
+    If all elements are numbers, then they simply specify the coordinates
+    for a single value (returned as a single-value vector). Optionally, one
+    of the elements can be set to the string 'all'; in this case, all the
+    values from that dimension are returned in a vector. For example, if the
+    current netCDF variable is defined with 3 dimensions: Q(time, region, exp)
+    then we can obtain the values for all times, for the second region and
+    the fifth exp with this syntax: v = values(nc, ['all', 2, 5]).
+
+   .files: Macro/netcdf.cc
+   .date: 2012-01-19
+
+161ir New Macro function find(list, any)
+
+   .Searches the given list for an item and returns the index of
+    the first occurence of it. If an optional third argument is given
+    as the string 'all', then a list of the indexes of all occurences of
+    the item is returned. In both cases, if the item is not contained
+    in the list, nil is returned.
+
+   .files: Macro/mlist.cc
+   .date: 2012-01-11
+
+160ir Macro function values(netcdf) can now handle 'char' variables
+
+   .When a netCDF variable contains ncChar strings, the values(netcdf)
+    function was previously returning a vector of numbers; now it
+    returns a list of strings. Also value(netcdf,index) can handle
+    ncChar strings.
+
+   .files: Macro/netcdf.cc
+   .date: 2012-01-11
+
+159ir New Macro function global_attributes(netcdf)
+
+   .The global attributes of a netCDF file can now be accessed by
+    global_attributes(nc) in Macro.
+
+   .files: Macro/netcdf.cc,include/cnetcdf.h, libMvNetCdf/MvNetCDF.h
+   .date: 2012-01-10
+
+158ir List macro functions now work between dates and lists, e.g. a = date + list
+
+   .The binary operators between lists have been expanded to include a date as one
+    of the arguments, e.g. a = date + list  will return a list of dates if the
+    input list contains a list of numbers which are date offsets.
+
+   .files: Macro/mlist.cc
+   .date: 2012-01-10
+
+157ir GEO_TO_GRIB application: fixed issue in EXPONENTIAL modes when Tolerance=0
+
+   .In modes EXPONENTIAL_MEAN and EXPONENTIAL_SUM, when Tolerance was set
+    to zero, only the input points which were *not* on the output point
+    were considered; this was the opposite of what was intended.
+
+   .files: MvApp/geo_to_grib.cc
+   .date: 2012-01-09
+
+156ir Macro: added optional third parameter to parse() function
+
+   .The Macro parse() function now accepts an optional third parameter
+    which specifies the data type that the result should be in. Currently
+    it only accepts 'string', which means that the result will be a list
+    of strings, with no 'intelligent conversion' performed. This can be
+    useful, for instance, when a string such as '4/05/6' is parsed
+    and we wish to preserve the full string '05'.
+
+   .files: Macro/mstring.cc
+   .date: 2012-01-04
+
+155vk Fixed ObsFilter/MvObs code to filter successfully non-compressed BUFR msgs
+
+   .Previous code did not work with non-compressed multisubset msgs where
+    delayed descriptor counts varied from subset to subset. Fixed.
+
+    Also, new code always produces single subset msgs when filtering is
+    done using data values from BUFR section 4. When filtering is done
+    using only metadata values in BUFR section 1, multisubset msgs are
+    copied as is (no change in behaviour).
+
+   .files: src/libMetvie/MvObs.cc, src/ObsFilter/ObsFilter.cc
+   .date: 2011-12-30
+
+154vk BufrPicker can now pick ALL values related to the innermost coordinate
+
+   .The innermost coordinate value can now be given as "ALL" in order
+    to pick all corresponding values. Current version produces geopoints,
+    but this could be enhanced to produce alternatively a CSV file.
+
+   .files: src/libMetview: MvBufr.h, MvBufrObs.h, MvObs.cc, MvObsSet.cc,
+           src/ObsFilter:  BufrPicker.cc, BufrPickerDef
+   .date: 2011-12-29
+
+153ir Added experimental MARS client based on SCIN interpolation
+
+   .This is really a proof-of-concept addition to get the technical
+    framework up and running.
+
+   .files: libMars-scin/* MvApp/MarsScin.cc, various in share/metview/etc/
+    share/metview/icons, scripts. See Perforce changelist 66107.
+   .date: 2011-12-20
+
+152vk Two NCEP PrepBUFR related files not installed
+
+   .Files AuxPrepBufrTable_B.txt and AuxPrepBufrTable_D.txt existed in P4,
+    but they were not listed in share_DATA and thus not installed :-(
+    Added files to share_DATA list of dir share/metview/etc.
+
+   .files: share/metview/etc/Makefile.am
+   .date: 2011-12-19
+
+151ir Macro: allow conversion from list to vector
+
+   .It is now possible to convert a list of numbers to a vector with the function
+    vector vector(list)
+      Returns a vector containing the numeric elements of the input list. Any
+      'nil' list elements are converted to vector_missing_value. Any other
+      non-numeric elements will cause an error. If the input list is empty, the
+      function returns nil.
+
+   .files: Macro/mvector.cc
+   .date: 2011-12-08
+
+150sk Unified Layer and Layer Data tabs in uPlot
+
+   .The Layer and Layer Data tabs in uPlot's sidebar have been unified. Now
+    there is a single tab for layers (called Layer) contaning tool buttons at the
+    top to switch between two view modes. In 'layer' view mode the
+    contents of the previous Layers tab is shown, while in 'meta-data' view mode
+    the contents of the previous Layer Data tab is visible.
+
+   .files: uPlot/Makefile.am,MvQLayerContentsWidget.[h,cc],
+           MvQLayerDataWidget.[h,cc], MvQLayerMetaDataWidget.[h,cc],
+	   MvQLayerWidget.[h,cc], MvQlayerModel.[h,cc], uPlot.qrc,
+	   uPlotBase.[h,cc]
+   .date: 2011-12-07
+
+149ir Added Vertical Profile module
+
+   .The Vertical Profile module was re-introduced and updated for Magics++.
+
+   .files: XSection/XSect.cc,MvXSectFrame.cc,VPROFILE.xpm,VProfileDef,VProfileRules,
+           ObjectSpec.XSection,
+           share/metview/app-defaults/Modules (Plotting)/[.]Vertical Profile
+   .date: 2011-12-07
+
+148ir Added new ASCII table reader functionality to parse header meta-data
+
+   .Meta-data can be added to an ASCII table file in the form of multiple lines
+    containing multiple param=value pairs. Pairs are space delimited. Example:
+      PARAM1=VALUE1 PARAM2=VALUE2 PARAM3=VALUE3
+      PARAM4=VALUE4.
+    In the read_table() function, the new parameter table_meta_data_rows exists
+    and accepts either a single number or a list of numbers specifying the
+    row(s) containing the meta-data (first row is 1).
+    New Macro functions:
+      list metadata_keys(table)
+          returns a list of all the available meta-data keys (list of strings)
+      string metadata_value(table, string)
+      list   metadata_value(table, list)
+        given a key (or list of keys), returns the corresponding value(s)
+        from the table's meta-data. For any key that does not exist in the
+        meta-data, a 'nil' variable is returned. If there is no meta-data for
+        the table, then 'nil' is returned.
+
+   .files: libUtil/TableReader.[cc,h], libMetview/MvTable.[cc,h], Macro/mtable.cc
+   .date: 2011-12-05
+
+147fi Added NETCDF_XY_POINTS option to the NETCDF_VISUALISER application
+
+   .Added xy_points function to the NETCDF_VISUALISER application
+
+   .files: etc/uPlotTable, StdAppManager/NetcdfPlusDef, NetcdfPlusRules,
+           ObjectSpec.StdAppManager, uPlot/MagicsTranslator.cc, uPlotManager.cc
+   .date: 2011-12-01
+
+146fi Implemented multi-pages scheme in uPlot
+
+   .uPlot generates a new tree where the top is the 'Root' and the first leaves are
+    the 'SuperPage's. In the old code (inherited from PlotMod), the top of the tree
+    was a 'Superpage'.
+
+   .files: Macro/request.cc, uPlot/CreateAction.cc, DropAction.cc, GraphicsEngine.h,
+           MagicsGraphicsEngine.*, ObjectInfo.cc, Page.*, Presentable.*, Root.*,
+           SubPage.*, SuperPage.*, XDevice.cc, ZoomStacks.cc
+   .date: 2011-11-30
+
+
+145sk Added GRIB scaling meta-data keys to the Layer Data tab in uPlot
+
+   .The Layer Data tab in uPlot's sidebar now contains information about the
+    GRIB value scaling used for the visualisation. The scaling formula and
+    the scaled units are both present here.
+
+   .files: app-defaults/LayerKeyProfile.xml
+   .date: 2011-11-25
+
+
+144vk Added code to skip illegal BUFR msgs (with 0 subsets!)
+
+   .Added a check against 0 subsets into MvObsSet::next().
+
+   .files: libMetview/MvObsSet.cc
+   .date: 2011-11-24
+
+==============================================================================
+           2011-11-21 Metview 4.1.3 released for export
+==============================================================================
+
+143ir System drawer files were read-only in non-installed export version
+
+   .If an export version of Metview was built and run from the
+    development directory instead of the installation directory,
+    certain system files (e.g. icon drawers) were read-only.
+    Permissions are now rectified when the tarfiles are un-tarred.
+
+   .files: share/metview/app-defaults/Makefile.am
+   .date: 2011-11-21
+
+142vk Fixed BUFR code to work with non-compressed multisubset BUFR msgs
+
+   .MvObs class called wrong subroutine (BUSEL) when non-compressed multi
+    subset msg. This caused phase errors between values and metadata.
+    Now calls BUSEL2 if multisubset msg.
+
+   .files: libMetview/MvBufrObs.h,MvBufr.h,MvObs.cc,MvPrepBufrPrep.cc
+   .date: 2011-11-17
+
+141fi Updated several definition files and related source code
+
+   .Axis, Graph, Legend and Symbol definitions were updated, together with
+    some Visualisers source code. This also fixes the Macro function read_table().
+
+   .files: etc/MAXISDef, MGRAPHDef, MLEGENDDef, MLEGENDRules, MSYMBDef, ObjectList,
+           Macro/mtable.cc, StdAppManager/InputVisualiserRules, NetcdfPlusDef,
+           TableVisualiserDef, libMetview/MvTable.cc
+   .date: 2011-11-16
+
+140vk Enhanced BUFR code to work with NCEP special "PrepBUFR" files
+
+   .Added code to extract BUFR tables from PrepBUFR messages to a
+    temporary directory and change BUFR_TABLES env.var.
+
+   .files: libMetview/Makefile.am,MvObs.[h,cc],MvObsSet.cc,MvObsUtil.cc
+       new files: MvObsSet.h,MvBufrObs.h,MvPrepBufrPrep.[h,cc],
+                  share/metview/etc/AuxPrepBufrTable[B,D].txt
+   .date: 2011-11-14
+
+139ir Updated Mars client to the version that can handle ODB data
+
+   .Required a couple of small changes to Metview's Mars client source,
+    but the main changes are in the Mars code itself.
+
+   .files: libMars/odb.[cc,h],Makefile.am MvApp/MarsG2.cc,Makefile.am,
+           AppMod/Makefile.am configure.ac
+   .date: 2011-11-11
+
+138ir Updated version number to 4.1.3
+
+   .New revision number.
+
+   .files: version.sh
+   .date: 2011-11-04
+
+==============================================================================
+           2011-11-04 Metview 4.1.2 released for export
+==============================================================================
+
+137ir Updated version number to 4.1.2
+
+   .The visualiser icons have had their definitions changed, which certainly
+    merits a new version number. There are also substantial updates from 4.1.1.
+
+   .files: version.sh
+   .date: 2011-10-05
+
+136ir Added patching mechanism
+
+   .Added new script, metview_patches, called at startup. The impetus for this
+    was the fact that users who have already been using Metview 4 since it
+    got its visualiser icons will now have broken icons in their user space;
+    the first patch fixes this.
+
+   .files: scripts/metview_base,metview_patches
+   .date: 2011-10-05
+
+136sk Fixed issue when displaying int values in the Odb Examiner (Andras Horanyi, ECMWF)
+
+   .Previously all the integer ODB values were stored in float vectors in
+    Metview which occasionally resulted in incorrectly displayed integer
+    values in the Odb Examiner. This problem was overcome by storing the
+    integer values in int vectors in Metview.
+
+   .files: libUtil/MvOdb.cc, libMvQtGui/MvQOdbModel.cc,
+           OdbExaminer/OdbExaminer.[cc,h]
+   .date:  2011-09-30
+
+135sk Redesigned ODB Visualiser icon
+
+   .The ODB Visualiser icon has been changed. Previously its editor contained
+    tabs for the different visualisation types (i.e. it was a "family editor").
+    Now these tabs were removed and a sigle interface was created containing
+    an option menu to switch between the different visualisation types.
+    The class name of the icon has been changed from ODBVISUALISER_FAMILY
+    to ODB_VISUALISER. The OdbVisualiser module, which is assigned to the
+    'execute' action of the icon, now returns back a different request for
+    each visualisation type (e.g. ODB_GEO_POINTS etc.)
+
+   .files: AppMod/savepool.cc, Odb/ObjectSpec.Odb, OdbVisualiser.cc,
+           OdbVisualiserDef, OdbVisualiserRules, OdbExaminer/MvMain.cc,
+	   uPlot/uPlotManager.cc
+   .date:  2011-09-29
+
+134sk Redesigned Cursor Data Tool in uPlot
+
+   .The Cursor Data Tool is to display the data values at the position
+    underneath the cursor in the plot. This tool has been completely
+    redesigned. Tha data values are now presented in a table on a
+    non-transparent background. For each data layer the table shows the
+    data value, the coordinates and the distance to the position underneath
+    the cursor. In addition to the new design the Cursor Data Tool is now
+    able to show data values for ODB data layers.
+
+   .files: uPlot/MvQCursorData.[h,cc], MvQCursorDataWidget.[h,cc],
+           MvQPlotView.[h,cc], uPlotBase.[h,cc],layerInfo.css
+   .date:  2011-09-28
+
+133sk Fixed problem with having different font sizes on screen than in other outputs
+
+   .uPlot is now using the current screen resolution for rendering. Previously the
+    screen resolution was hardcoded to 75 dpi and it resulted in different plot and
+    font sizes in the screen than in the other output formats. The screen resolution
+    value is now determined by the startup script (using the X11 command 'xdyinfo')
+    and stored in the env variable METVIEV_SCREEN_RESOLUTION.
+
+   .files: scripts/metview_base, uPlot/uPlotBase.[h,cc]
+   .date:  2011-09-22
+
+
+132sk Redesigned menu and toolbar setup for all the Qt-based applications
+
+    .The main class of all the Qt-based Metview applications is derived from
+    the MvQMainWindow class, which is responsible for the menu and toolbar
+    creation. Now this class offers only one central method (called 'setMenus')
+    for the menu and toolbar creation and all the derived classes are forced
+    to use it.
+
+   .files: several files in BufrExaminer, GeopExaminer, GribExaminer,
+           MarsCatalog, NcExaminer, ObstatCurveTool, ObstaScatterTool,
+	   OdbExaminer, OgcClient, libMvQtGui, uPlot
+   .date:  2011-09-22
+
+131sk Added point selection to GeoTool
+
+   .GeoTool is a helper application in Metview to define an area, line or
+    point on a geographical domain. So far GeoTool has supported only
+    area and line selection but now is able to handle point selection
+    as well.
+
+   .files: uPlot/GeoTool.[h,cc], MvMainGeoTool.cc, MgQPlotView.[h,cc],
+           MvQpointSelection.[h,cc]
+   .date:  2011-09-20
+
+130ir Fixed issue when dropping icons into Macro Editor
+
+   .An intermittent bug caused the full path of an icon to occasionally be
+    corrupted. This affected the dropping of icons into the Macro Editor,
+    and might have been causing other effects when dragging and dropping icons.
+
+   .files: MetviewUI/DragWindow.cc
+   .date:  2011-09-15
+
+129ir New Macro library function mvl_create_netcdf_2d()
+
+   .Added a new Macro library function, mvl_create_netcdf_2d(),
+    which generates a netCDF file with a 2-dimensional array of data.
+
+   .files: share/metview/app-defaults/CommonMacroFuncs/mvl_create_netcdf_2d
+   .date:  2011-09-15
+
+128sk uPlot: added a plot resize interface
+
+   .uPlot is now equipped with a plot resizing interface. It comprises a combo box
+    with the resize option selection and two buttons to increase or decrease the
+    plot size in discrete steps. The combo box offers a set of fixed resize values
+    (specified in the percentage of the original plot size: from 50% up to 200%).
+    On top of that there are dynamic options as well such as: "Fit To Window",
+    "Fit to Width" and "Fit To Height".
+    Please note that the resize operation only affects the apparent plot size
+    on the screen and does not change the original plot size (which is used for
+    printing and exporting).
+
+   .files: uPlot/uPlotBase.[h,cc], MgQPlotView.[h,cc], GeoTool.[h,cc],
+               MvMainGeoTool.cc, MvQAreaSelection.[h,cc],
+	       MvQLineSelection.[h,cc]
+   .date:  2011-09-12
+
+
+127ir Macro Editor: added new Run options
+    .From the Macro Editor, the user can now select the following options:
+       o highlight current execution line
+       o pause between line excecutions
+       o wait for asynchronous function calls
+       o choose a different run mode
+     The Debug run option has been moved to the new set of options
+     and renamed 'Trace'. All options are available from a new dialog,
+     either from the Program menu or on the toolbar.
+
+    .files: Macro/context.cc,main.cc,include/macro.h,
+            MacroEditor/RunDialog.[cc,h],MacroRunOptions.h,
+            MacroEdit.[ui,qrc,h,cc]
+    .date: 2011-09-08
+
+126sk Set the graphics system to 'raster' for Qt applications
+
+    .All the Qt applications in Metview are now started up by explicitly
+     specifying the graphics system via the '-graphicssystem' flag. This
+     flag can be set via the METVIEW_GRAPHICS_SYSTEM env variable at Metview.
+     startup. The accepted values are 'raster' and 'native'. By default
+     METVIEW_GRAPHICS_SYSTEM is set to 'raster'.
+     Metview previosly did not specify the graphics sytem at all and
+     according to the Qt documention the 'native' system, which is based on
+     X11 on Linux, was used by default. By switching the graphics sytem to
+     'raster' the rendering process dramatically speeds up on the tested
+     Linux systems (Qt 4.6.3 - 64bit, OpenSUSE 10.3 and 11.3) so this is why
+     'raster' is selected as default.
+
+    .files: scripts/metview_base,metview_help,
+            etc/Services, Odb/ObjectSpec.Odb,
+	    uPlot/DataToolManager.cc,GeoToolManager.cc,uPlotService.cc
+    .date:  2011-09-07
+
+125sk Icon drops outside the plot area in uPlot are now allowed
+
+    .uPlot previously crashed when an icon was dropped outside the plot
+     area. This problem has been fixed now.
+
+    .files: uPlot/uPlotBase.cc
+    .date:  2011-09-06
+
+124ir Macro: added new function waitmode()
+    .New macro function waitmode(number) determines whether Macro
+     waits immediately for asynchronous (icon-function) function calls
+     (1) or not (0 = default). Returns the mode's previous value.
+     Originally developed as a possible solution for issue 123ir, this
+     was in the end not needed. However, it could still be useful in cases
+     where we do not wish to have too many modules running at one time
+     (occasionally an issue when virtual memory is scarce). It could also
+     be useful when debugging macros (although trace(2) has a similar effect).
+
+    .files: Macro/context.cc,misc.cc,include/macro.h
+    .date: 2011-09-06
+
+123ir Macro: temporary data files were not being cleaned properly
+    .When a Macro variable which has an underlying temporary data file
+     (e.g. GRIB, ODB, geopoints) is passed to another module, Macro
+     marked the variable for non-deletion because it might still be in
+     use by the external module when the user tries to destroy it. This
+     has now been fixed for data types ODB, GEOPOINTS and BUFR but
+     not for GRIB. Now, Macro stores a list of variables passed to
+     asynchronous function calls and dereferences them when the function
+     returns. GRIB is more complicated because the result of a GRIB filter
+     makes reference to the original data file so we can't delete it at
+     this stage.
+
+    .files: Macro/value.cc,request.cc,codb.cc,bufr.cc,include/value.h
+    .date: 2011-09-06
+
+122sk Macro: retrieve_odb returns 'nil' if no data was found (Mark Rodwell, ECMWF)
+
+    .Function retrieve_odb returns 'nil' if no ODB data was found according
+     to the specified parameters.
+
+    .files: MvApp/MarsOdb.cc
+    .date: 2011-09-01
+
+121sk Macro: odb_filer returns 'nil' if no data was found (Mark Rodwell, ECMWF)
+
+    .Function odb_filter returns 'nil' if no data was found according to
+     the specified ODB/SQL query.
+
+    .files: Odb/OdbFilter.cc
+    .date: 2011-08-31
+
+120ir Re-introduced VelStr icon (Velocity Potential / Stream Function)
+
+   .This module had already been re-written for Metview 4, it just needed
+    to be added to ObjecList, etc.
+
+   .files: etc/Services,ObjectList, Rules/Def/Icon files, Drawers
+   .date: 2011-08-24
+
+119fi uPlot-Magics communication: added CLEAR and REFRESH requests
+
+   .The first request uPlot sends to Magics is either a CLEAR or a REFRESH.
+    These are empty requests and indicates to this is a new request (CLEAR) or
+    an old request with some updates.
+
+   .files: uPlot/Presentable.*, SuperPage.cc
+   .date: 2011-08-22
+
+118fi GEO_TO_GRIB application: added one more interpolation method: EXPONENTIAL_SUM
+
+   .Parameter WEIGHT_METHOD replaced by INTERPOLATION_METHOD. Also, added one more
+    option to the interpolation method: EXPONENTIAL_SUM, which does not divide the
+    final interpolated value by the total weight, e.g.:
+
+	if (sigma && Weight_ != G2G_EXPONENTIAL_SUM )
+		val = val / sigma;
+
+   .files: MvApp/geo_to_grib.cc, etc/GeoToGribDef
+   .date: 2011-08-19
+
+117fi Added parameter WEIGHT_METHOD to application GEO_TO_GRIB
+
+   .This new parameter defines two approaches to compute the weights in the
+    interpolation procedure: 'reciprocal' and 'exponential'. The 'reciprocal' option
+    was the aproach used before and it is the default value. The differences between
+    these two methods are the following:
+
+		// Compute weight
+		if ( Weight_ == G2G_RECIPROCAL )
+		{
+			if( dist == 0 )
+				return gp_iter->value();   //-- Here the point is on the Grid
+			dist = 1/dist;
+		}
+		else // exponential
+		{
+			if ( Tolerance != 0 )
+				dist = exp(-(dist/(pow(Tolerance,2))));
+			else
+				dist = dist ? 1 : 0;
+		}
+
+   .files: MvApp/geo_to_grib.cc, etc/GeoToGribDef
+   .date: 2011-08-18
+
+116ir Updated version number to 4.1.1
+
+   .Not related to specific featutes, just to make comparisons easier.
+
+   .files: version.sh
+   .date: 2011-08-11
+
+115fi uPlot: added functions for timing analysis report
+
+   .Three functions for timing analysis report were introduced: watchStart,
+    watchLaptime and watchStop.
+
+   .files: uPlot/PlotMod.*
+   .date: 2011-08-09
+
+114fi uPlot: fixed cartesianview + data request
+
+   .uPlot was not interpreting correctly a request containing a cartesianview
+    followed by a data.
+
+   .files: uPlot/PlotPageBuilder.cc, DropAction.cc
+   .date: 2011-08-09
+
+113fi NetcdfManager: fixed definition file
+
+   .The definition file for functions NETCDF_MATRIX and NETCDF_GEOMATRIX
+    were not correctly defined.
+
+   .files: StdAppManager/NetcdfPlusDef, ObjectSpec.StdAppManager
+   .date: 2011-08-08
+
+112fi Implemented drop facility to uPlot multi-pages: first version
+
+   .Some optimization is still need later.
+
+   .files: uPlot/DropAction.cc, MagicsGraphicsEngine.h, uPlotBase.cc
+   .date: 2011-08-05
+
+111sk Added search panel to the OdbExaminer
+
+   .A search panel was added to the OdbExamier. It can be activated from the
+    newly added "Edit" menu in the menubar or by pressing Ctrl+F. If activated,
+    the search panel is located below the data view in the middle of the
+    examiner's window.
+
+   .files: libMvQtGui/MvQOdbDataWidget.h, MvQSearhLinePanel.cc,
+           MvQTreeViewSearchLine.cc,
+    	   OdbExaminer/MvMain.cc, OdbExaminer.[cc,h]
+   .date: 2011-08-05
+
+
+110sk Added search panel to the GeopointsExaminer
+
+   .A search panel was added to the GeopointsExamier. It can be activated from
+    the newly added "Edit" menu in the menubar or by pressing Ctrl+F. If activated,
+    the search panel is located below the data view in the middle of the examiner's
+    window. The "Go to row" spinbox, which was originally located below the
+    data view, was placed above the data view.
+
+   .files: libMvQtGui/MvQTreeViewSearchLine.[cc,h],
+    	   GeopExaminer/MvMain.cc, GeopExaminer.[cc,h]
+   .date: 2011-08-04
+
+109sk Added search panel to the GribExaminer and BufrExaminer
+
+   .A search panel was added to the GribExamier and the BufrExaminer. It can be
+    activated from the newly added "Edit" menu in the menubar or by pressing
+    Ctrl+F. If activated, the search panel is located below the message and
+    data views in the middle of the examiners' window.
+
+   .files: several files in libMvQtGui, BufrExaminer, GribExaminer
+   .date: 2011-08-04
+
+108fi NetCDF examiner: Qt-based second version
+
+   .Second version of the NetCDF examiner based on Qt.
+
+   .files: NcExaminer/MvMain, NcExaminer.*, libUtil/Makefile.am, Mvmiscelaneous.*
+   .date: 2011-08-01
+
+107sk Added "Layer Data" tab to uPlot
+
+   .The meta-data information of the selected layer is now shown in a new control
+    tab called "Layer Data" in uPlot. Previously this information was displayed in
+    the "Layers" tab from where it has now been removed.
+
+   .files: uPlot/MvQlayerDataWidget.[h,cc], MvQLayerWidget.[h,cc],uPlotBase.cc
+   .date: 2011-07-26
+
+106fi Overlay Control "uvt"
+
+   .Fixed problem plotting wind and single fields when they come from the are same
+    fieldset. Parameter SUBPAGE_OVERLAY_MODE was added to the definition file.
+
+   .files: etc/MapViewDef, OverlayControl
+   .date: 2011-07-25
+
+105vk New module 'ObsPicker'
+
+   .ObsPicker provides users better access to BUFR satellite data. With ObsPicker
+    users can define several coordinate descriptors (with given coordinate values),
+    thus providing access to parameters within the given coordinates.
+
+   .files: in ObsFilter dir: ObsPicker[.cc,Def,Rules], ObjectSpec.ObsPicker, Makefile.am
+           in share/metview/icons dir: OBSPICKER.xpm, Makefile.am
+           in libMetview dir: MvObs.[h,cc]
+
+   .date: 2011-07-21
+
+104fi Added _ID parameter to the communication uPlot-Magics: first version
+
+   .A new parameter _ID was added to the requests been sent to Magics.
+
+   .files: uPlot/MagicsTranslator.cc, MvIcon.*, MvIconDataBase.*, Presentable.cc,
+		 SuperPage.cc
+   .date:  2011-07-20
+
+
+103ir New Macro library function mvl_geopotential_on_ml()
+
+   .Added a new Macro library function, mvl_geopotential_on_ml(),
+    which computes geopotential on model levels.
+
+   .files: share/metview/app-defaults/CommonMacroFuncs/mvl_geopotential_on_ml
+   .date:  2011-07-13
+
+102fi New Geopoints examiner based on Qt
+
+   .The new Geopoints Examiner based on Qt replaces the previous one based on
+    Unix command 'view'.
+
+   .files: configure.ac, etc/ObjectList, src/Makefile.am, libMetview/MvGeoPoints.*,
+		 libMvQtGui/MvQFileInfoLabe.*, libUtil/MvMiscelaneous.h, Makefile.am,
+		 GeopExaminer/MvMain.cc, GeopExaminer.*, MvGeoPointsModel.*
+   .date:  2011-07-06
+
+101fi Updated communication scheme between uPlot and OdbVisualiser/WmsClient
+
+   .OdbVisualiser now sends an unique verb (ODB_VISUALISER) to uPlot. There is
+    no need to send a SKIP verb if the request comes from a Macro or Drop command.
+    The WmsClient's status machine now has an extra parameter ('context') to
+    indicate that this application needs extra information from uPlot (e.g.
+    geographical information).
+
+   .files: uPlot/ObjectList.*, MapView.cc, MacroConverter.cc,
+		 OgcClient/ObjectSpec.WmsClient. Odb/OdbVisualiser.cc
+   .date:  2011-07-05
+
+100ir Macro functions pressure(), thickness(), vertint() and univertint()  not working with GRIB 2 data
+
+   .Metview was using the 'dataRepresentationType' GRIB_API key (long) inside
+    the MvField::dataRepres() function which is used by a number of functions,
+    not just those mentioned above (Relative Humidity also uses it). However,
+    this key is not available in GRIB 2, so we now use the existing grid type
+    variable that we already store in MvGrid and convert it back to the
+    corresponding integer. Also updated the internal function isLatLon()
+    to use the correct key. Internal function marsName() also now uses
+    the proper GRIB_API approach.
+
+   .files: libMetview/MvFieldSet.cc
+   .date:  2011-07-05
+
+99fi Input/Table/Binning: changed parameter names
+
+    .Binning is now an icon with class name: MBINNING. X/Y parameter names
+	replaced by LONGITUDE/LATITUDE for GEO_* applications.
+
+    .files: etc/BinningObjectDef, InputVisualiserDef, TableVisualiserDef,
+		  ObjectList, Services, icons/Makefile.am, BINNING.xpm/svg
+    .date:  2011-06-29
+
+98ir Macro: added new function: number(string)
+
+    .A frequent request is to have a macro function which converts a
+     string into a number. This function does that, using atof() to do
+     the conversion; this means that if a string cannot be converted
+     into a number, then zero is returned. Example usage:
+       a = number('123.4')
+
+    .files: Macro/mstring.cc
+    .date:  2011-06-28
+
+97fi Macro: fixed a flush problem to the non-screen output drivers
+
+    .Due to a previous change in the internal structure of the output drivers,
+     the last request (or the first one, if there was only one plot to be
+     generated) was not being flushed to all drivers, apart from the screen.
+
+    .files: Macro/main.cc
+    .date:  2011-06-27
+
+96sk Added data sorting to the ODB Examiner
+
+    .Users can now sort the data columns shown in the Data tab of
+     the ODB Examiner. Sorting can be enabled by clicking on any of the
+     data column headers but it is only available if no data blocks are used
+     by the ODB Examiner. By default for more than 10000000 data items to
+     show the ODB Examiner splits the data into individual blocks each having
+     less than 10000000 items and users can navigate through these blocks one
+     by one. To change the default limit value for the data block generation
+     a new configure dialog (available via menu Settings) was added to the
+     ODB Examiner.
+
+    .files: OdbExaminer/OdbExaminer.[cc,h],
+    	    libMvQtUtil/MvQOdbMetaData.[cc,h],
+	    libMvQtGui/MvQOdbDataWidget.[cc,h], MvQOdbModel.[cc,h],
+	    MvQMainWindow.[cc,h], window.qrc
+    .date:  2011-06-22
+
+
+95ir Macro Editor now detects if a file has been externally modified
+
+    .When focus is lost and then regained by the editor, it checks to
+     see whether the file has been externally modified, or its read-only
+     status has changed. If its read-only status has changed, then it will
+     automatically update itself (but not yet reload the file). If
+     the file's modification time has changed, then the user is asked
+     whether they wish to reload the file from disk. If they do not, then
+     they won't be asked again unless the file is externally modified
+     again. There is also a menu option (File | Reload from file) to
+     force a reload of the file from disk.
+
+    .files: MacroEditor/mvplaintextedit.[cc,h],MacroEdit.[cc,h,ui]
+    .date:  2011-06-21
+
+94fi InputVisualiser and TableVisualiser: updated function names
+
+    .Functions Curve and Geo_Curve were removed and the new notations are:
+	XY as opposite to GEO and POINTS instead of SCATTER
+
+    .files: etc/InputVisualiserDef, InputVisualiserRules, TableVisualiserDef,
+		  TableVisualiserRules, Makefile.am, ObjectList, uPlotTable,
+		  icons/INPUTVISUALISER.xpm, TABLEVISUALISER.xpm,
+		  StdAppManager/Makefile.am, ObjectSpec.StdAppManager, StdAppManager.cc,
+		  uPlot/DataObject.cc, MagicsTranslator.cc, uPlotManager.cc
+    .date:  2011-06-20
+
+93fi Added a function to expand a request
+
+    .New function: ExpandRequest . Also some minor changes to remove
+	compilation warning messages.
+
+    .files: etc/PSOutputDef, Macro/request.cc, libUtil/MvPath.*,
+		  uPlot/MagicsTranslator.cc, ObjectList.*, PmProjection.cc,
+		  libMetview/MvFieldSet.cc, MvGrid.cc, MvObs.cc, MvRequest.*,
+		  MvScanFileType.cc, MvService.cc, MvServiceTask.cc, MvTable.cc,
+		  MvVisTool.cc, Path.cc
+    .date:  2011-06-20
+
+92sk WMS Client: add proper handling for percent encoding in URLs
+
+    .The WMS Client failed for HTTP requests containing percentage
+     characters in the URL. This was overcome by converting the URLs with
+     QUrl::fromPercentEncoding() into the proper format before generating
+     the network request for them.
+
+    .files: OgcClient/MvQWmsClient.cc
+    .date:  2011-06-17
+
+
+91sk WMS Client: only accepts CRSs with a valid bounding box for WMS 1.3.0
+
+    .For WMS 1.3.0 only CRSs with a valid bounding box (specified in the
+     <BoundingBox> element in the GetCapabilities document) are listed in
+     the editor's "Layer settings" tab.
+
+    .files: OgcClient/MvQWmsClient.cc
+    .date:  2011-06-17
+
+90sk WMS Client: added preview to the plain editor mode of the WMS Client
+
+    .Now a preview image can be generated in the plain editor mode
+     of the WMS Client.
+
+    .files: OgcClient/MvQWmsClient.[h,cc], MvQWmsClientEditor.[h,cc]
+    .date:  2011-06-17
+
+89ir Renamed various Macro functions
+
+    .For consistency (and 'niceness') of Macro function names, various functions
+     were renamed; the original versions still work, but issue a warning. The list
+     of deprecated functions and the new versions is:
+     fieldset functions:
+       gridvals->values, gridlats->latitudes, gridlons->longitudes,
+       set_gridvals->set_values.
+     geopoint functions:
+       date->dates, level->levels, latitude->latitudes, longitude->longitudes,
+       value->values, value2->value2s,
+       set_latitude->set_latitudes, set_longitude->set_longitudes, set_level->set_levels,
+       set_date->set_dates, set_time->set_times, set_value->set_values, set_value2->set_value2s.
+     table functions:
+       value->values.
+     odb functions:
+       value->values.
+
+    .files: Macro/bufr.cc,function.cc,grib.cc,codb.cc
+    .date:  2011-06-16
+
+88sk GribExaminer: bug-fix for showing arrays in the "namespace dump" (Roger Brugge, ECMWF)
+
+    .GribExaminer crashed in handling GRIB_API keys with arrays with less than
+     128 elements. Now this problem has been fixed. On top of that the GribExaminer
+     now handles only GRIB_API keys with the type of long, double and string (the
+     other types such as  bytes are omitted).
+
+    .files: libUtil/GribMetaData.cc
+    .date:  2011-06-14
+
+87fi Graph: automatic updates for Cartesian view and visdefs
+
+    .If an application sets X/Y axis type to DATE then updates the cartesian
+	view automaticaly. If applications (GEO)_SCATTER or (GEO)_VECTOR_SCATTER set
+	parameter *_VALUES and there is no visdef attached (e.g. a visdef default
+	should be used) then the advanced mode parameter should be set automatically
+	in MSYMB or MWIND.
+
+    .files: uPlot/CartesianView.*, DataObject.*, DataBuilder.cc
+    .date:  2011-06-14
+
+86ir Added new macro functions for list processing
+
+    List functions now available include unary operators such as abs(),
+    cos(), etc and binary operators such as +, -, >, min, etc. These are the
+    same set of basic operators and functions that are available for fieldsets,
+    geopoints, numbers and vectors. Binary operators between two lists
+    will fail if the lists contain different numbers of elements; otherwise,
+    the result will be a new list, where each element is the result of
+    applying the operator to each of the corresponding elements in the
+    input lists. List elements can be of any type, as long as it is legal
+    to perform the operation on elements of that type.
+    Lists are not recommended for computations with many (thousands) of values;
+    for this, the vector data type is significantly more efficient.
+    Examples of the new list operations:
+      a = [1,2,3]
+      b = [4,1,6]
+      c = [|1,2,3|, |4,5,6|, [7,8,9]]  # vector,vector,list
+      d = [10, 20, 30]
+      print (a + b)    :  output is [5,3,9]
+      print (max(a,b)) :  output is [4,2,6]
+      print (max(a,2)) :  output is [2,2,3]
+      print (a - 5)    :  output is [-4,-3,-2]
+      print (sqrt(b))  :  output is [2,1,2.44948974278]
+      print (c + 10)   :  output is [|11,12,13|,|14,15,16|,[17,18,19]]
+      print (c + d)    :  output is [|11,12,13|,|24,25,26|,[37,38,39]]
+    The complete list of operators is: +,-,/,*,^,>,<,>=,<=,=,<>,and,or,
+    mod,div,max,min,neg,not,sgn,int,log10,log,exp,sqrt,sin,cos,tan,asin,acos,
+    atan,abs.
+
+     .files: Macro/mlist.cc
+     .date: 2011-06-13
+
+85fi Synergy between a "Manager" service application and uPlot
+
+    .uPlot was creating a second empty window when processing a "Manager" service
+	application, such as the OdbManager. The solution was to force these type of
+	applications to create a SKIP request, instead of a xxx_MANAGER, if the
+	processing was a result of a DROP action or a Macro program.
+
+    .files: uPlot/MapView.cc, Odb/OdbManager.cc
+    .date:  2011-06-08
+
+84ir Added new macro functions: sum(vector) and mean(vector)
+
+    .sum(vector) returns the sum of all non-missing values in the
+     input vector.
+     mean(vector) returns the mean of all non-missing values in the
+     input vector.
+     In both cases, if there are no valid input values, then 'nil'
+     is returned.
+
+     .files: Macro/mvector.cc
+     .date: 2011-06-008
+
+83ir Macro function set_gridvals had error when input is more than 1 field
+
+    .Now corrected.
+
+     .files: Macro/grib.cc
+     .date: 2011-06-008
+
+82sk Add ODB to the command line version of the examiners
+
+    .The command line version of the examiners now accepts ODB databases
+     as input. Can be launched as: metview -e odb <path_to_odb_database>
+
+     .files: scripts/metview_base, ExamineBase/MvExamineBase.cc,
+             OdbExaminer/MvMain.cc
+     .date: 2011-06-04
+
+81fi New applications: InputManager and TableManager
+
+    .First version.
+
+    .files: etc/Makefile.am,ObjectList,uPlotTable, icons/Makefile.am,
+		  StdAppManager/Makefile.am,ObjectSpec.StdAppManager,StdAppManager.cc,
+		  uPlot/MagicsTranslator.cc,uPlotManager.cc
+    .date:  2011-06-03
+
+80ir Modified macro function read_table() to accept table-parsing parameters
+
+    .Macro function read_table() can now take a definition as its input,
+     specifying the TABLE_READER class parameters to control the
+     parsing of the table file.
+     Also, the table reading code is more tolerant of blank lines in input
+     files: if only one column of data is in the file, then a blank line
+     is interpreted as a missing value; if more than one column, then the
+     line is ignored.
+
+    .files: libUtil/TableReader.[cc,h], libMetview/MvTable.[cc,h],
+            Macro/mtable.cc, Macro/include/ctable.h
+    .date:  2011-05-31
+
+79fi Fixed multi-pages creation problem using Cartesian View
+
+    .It is now possible to create multi-pages with Cartesian View, instead
+     of a single page only.
+
+    .files: uPlot/CartesianView.cc
+    .date:  2011-05-31
+
+78fi Removed connection between StdAppManager and Hovmoeller/XSect applications
+
+    .Hovmoeller and XSect applications are now calling uPlotManager directly,
+     without going through the StdAppManager application.
+
+    .files: Macro/request.cc, Hovmoeller/HovToolkit.cc, XSection/XSect.cc
+    .date:  2011-05-26
+
+77fi Introduce multipages and multiplots in Macro
+
+    .It is now possible to define the following plot commands:
+		plot(dw[1],title,datax,contour)
+		plot(dw[2],datay)
+		setoutput(another_output)
+		plot(dw[1],title,datax,contour,dw[2],datay)
+
+    .files: Macro/script.*, main.cc, request.cc
+		  uPlot/OutputFormatAction.cc, Presentable.cc, Root.*,
+		  SuperPage.cc, uPlotBatchApp.cc
+    .date:  2011-05-24
+
+76ir Ensure that 'Ecfs' module is ready for new ECFS implementation
+
+    .The new implementation will deprecate the Ecp command, so we must
+     use 'ecp' instead.
+
+    .files: Ecfile/Ecfile.cc
+    .date:  2011-05-23
+
+75sk Enable WMS Client to handle fractional ISO8601 dates
+
+    .The WMS Client can now handle fractional ISO8601 dates (e.g. 1991-01)
+     appearing in the TIME dimension.
+
+    .files: OgcClient/MvQOgcRequest.[h,cc]
+    .date:  2011-05-17
+
+74sk Adjust the WMS bounding box for zoom
+
+    .When zoom is performed for WMS images the bounding box in the
+     WMS GetMap request is automatically adjusted to the new map area
+     and a new WMS image set is loaded and visualised. This solution
+     always guearantees an optimal WMS image size and resolution
+     for the current map area.
+
+    .files: uPlot/Page.[h,cc]
+    .date:  2011-05-16
+
+73ir Macro functions thickness() and unithickness/pressure() were not compatible with GRIB 2
+
+   .These functions were setting GRIB_API key 'topLevel'; now they set 'level'.
+
+   .files: Macro/grib.cc
+   .date:  2011-05-16
+
+72ir Some lex/yacc generated files were distributed with the tarball
+
+   .The intention was to allow the installed to avoid installing lex
+    and yacc; but we should not distribute those files so we now don't.
+    This means that installers of Metview should now ensure that
+    lex and yacc are installed on their systems.
+
+   .files: Makefile.am, libMars/Makefile.am, Macro/Makefile.am, libMars-Odb/Makefile.am
+   .date:  2011-05-11
+
+71fi Added "send reply" command to all Examiners
+
+   .Send reply to the "sender" module (MetviewUI). This will turn icon to green;
+    otherwise, it will stay orange.
+
+   .files: OdbExaminer/MvMain.cc, OdaExaminer/MvMain.cc, NcExaminer/MvMain.cc
+		 GribExaminer/MvMain.cc, BufrExaminer/MvMain.cc
+   .date:  2011-05-11
+
+70fi Removed all axes check from CartesianView
+
+   .uPlot is no longer checking the axes consistency between the data
+    and the view.
+
+   .files: uPlot/CartesianView.*
+   .date:  2011-05-11
+
+69ir Potential Temperature module not working on ecgate
+
+   .This was due to the different sizes of different types of integer.
+
+   .files: libMars/macro_api_f90.f90
+   .date:  2011-05-10
+
+68fi Replaced keyword CSV to TABLE
+
+   .TABLE keyword is more generic than CSV.
+
+   .files: several files in uPlot, etc and icons.
+   .date:  2011-05-09
+
+67fi Added CSV Manager first version
+
+   .In this first version, only INPUT_LIST action is accepted.
+
+   .files: several files in uPlot, etc and icons.
+   .date:  2011-05-05
+
+66fi Added Layout first version: single plot command
+
+   .In this first version, the following plot command is accepted:
+	plot(dw[1],data,visdef,dw[2],data2,visdef2,...)
+
+   .files: several files in uPlot and Macro directories
+   .date:  2011-05-05
+
+65vk Added command-line option to launch a data examiner
+
+   .A data examiner can now be launched for a given file with the
+    syntax:
+      metview -e <type> <path>
+    where <type> is a valid data type such as grib or bufr.
+
+   .files: ExamineManager/*
+   .date:  2011-05-05
+
+64ir Added query-by-name to table code in Macro
+
+   .The macro function value(table, ...) can now accept a string as its
+    second argument - if a field of this name exists in the file, then
+    its values will be returned.
+
+   .files: libUtil/TableReader.[cc,h],
+           libMetview/MvTable.[cc,h]
+           Macro/mtable.cc include/ctable.h,
+   .date:  2011-04-28
+
+63ir Metview can now read simple ASCII table files, e.g. CSV
+
+   .Current functionality: can recognise a CSV file from its filename
+    extension (.csv); can edit using the Macro editor; can read in Macro
+    and extract columns as vectors or as lists of strings (automatically
+    determined from the first line of data); functions are:
+      read()  - read a file into a 'table' variable
+      count() - return the number of columns
+      name()  - returns the name of the indexed column
+      value() - returns a vector or a list of strings for the indexed column
+
+   .files: libUtil/TableReader.[cc,h],TableFormatAttributes.h,Makefile.am,
+           libMetview/MvTable.[cc,h],MvScanFileType.cc,
+           MacroEditor/LanguageHelperFactory.cc,
+           Macro/value.cc,mtable.cc,files.cc, include/value.h,ctable.h,
+           icons/TABLE.[svg,xpm], etc/ObjectList
+   .date:  2011-04-27
+
+62ir Macro error message sometimes gives the name of the wrong function (Roger Brugge)
+
+   .For example, if a macro calls functiona() and then afterwards tries to call
+    a non-existent functionb(), the error message suggests that the error
+    occurred within functiona(), even though we were outside it at the time.
+    The solution was to  backup and restore the pointer to the current
+    context.
+
+   .files: Macro/context.cc
+   .date:  2011-04-12
+
+61ir Potential Temperature module crashing with multiple fields (Sylvie Malardel)
+
+   .The Potential Temperature module was crashing when more than one
+    temperature field was given to it. This was because of a premature
+    memory deallocation.
+
+   .files: PottF/pott.F,eqpott.F,seqpott.F
+   .date:  2011-04-07
+
+60fi Improved interaction among MetviewUI, uPlot and  WmsClient
+
+   .When an icon is dropped in uPlot, it now not only acknoledges the dropping
+    but also adds the View information (if defined) to the request returned to
+    MetviewUI. With this extra information, WmsClient will be able to build
+    an image customised to the specific geographical area.
+
+   .files: MetviewUI/DragWindow.cc, Drop.*, InternalTask.h, MacroRunTask.h,
+	   MetviewTask.*, ShellTask.h, Task.h; uPlot/uPlotBase.cc;
+	   libMvMotif/drop.*
+   .date:  2011-03-29
+
+59fi Changed default uPlot Print range selection
+
+    .The default 'Print range' was changed from 'Print all' to the current plot.
+
+    .files: uPlot/uPlotBase.cc
+    .date:  2011-03-22
+
+58ir Use of 'pure' GRIB_API-based Mars client (now Metview 4.0.3)
+
+   .Updated Mars client to use the 'pure' GRIB_API-based version.
+    Also uses emoslib 381 .
+    Updated version number to 4.0.3.
+
+   .files: libMars/*, version.sh
+   .date:  2011-03-09
+
+57fi Hovmoeller "Expand" option was not using the previous axes information (Antje Inness)
+
+   .Expand was using the axes default, instead of taking the information from the
+    netcdf file.
+
+   .files: Hovmoeller/HovToolkit.*
+   .date:  2011-03-08
+
+56ir Macro function datainfo() was not releasing memory (Philippe Lopez)
+
+   .When looping through the GRIB fields, the fields were not being
+    released. They are now.
+
+   .files: Macro/grib.cc
+   .date:  2011-03-02
+
+55ir Added minvalue(vector) and maxvalue(vector) macro functions (Florian Pappenberger)
+
+    .Added minvalue(vector) and maxvalue(vector) functions with sam
+     functionality as for fieldsets and geopoints. If there are no
+     valid values, then nil is returned.
+
+    .files: Macro/mvector.cc
+    .date:  2011-02-25
+
+54fi New Netcdf Examiner
+
+    .This new application is based on Qt and will replace the one based on Motif.
+
+    .files: etc/Services,ObjectList, NcExaminer/NcExaminer.*, libMvNetCDF/MvnetCDF.*,
+	    libMvQtGui/MvQAbout.*,MvQFileInfoLabel.*, libUtil/MvVersionInfo.*
+    .date:  2011-02-25
+
+53ir Vector arguments to inline Fortran/C macro too slow (Florian Pappenberger)
+
+    .When vector arguments were being passed to inline macro functions,
+     their corresponding request contains all the data values. This is
+     slow to generate using the standard Mars funtions. Now, vectors
+     are written to temporary files (just basic memory dumps with a small
+     header). This format may change in the future. The actual request passed
+     is now just a path to this file. A small side-effect of this is that
+     the user can now write a vector to a file:
+       write ('/path/to/file', vector)
+     This is not really encouraged though, because the format may change,
+     and such files may not be readable on other systems.
+
+    .files: libMars/macro_api.c, Macro/mvector.cc, Macro/include/value.h
+    .date:  2011-02-23
+
+52ir Vector arguments to inline Fortran/C macro printed (Florian Pappenberger)
+
+    .When vector arguments were being passed to inline macro functions,
+     the values of their requests were being printed. In the case of
+     large vectors, this could generate a very large log file and waste
+     time. This is now only done in debug mode.
+
+    .files: Macro/mvector.cc
+    .date:  2011-02-22
+
+51ir Some GRIB 2 fields not being properly interpreted (Peter Bechtold)
+
+    .Some GRIB_API keys were not correct for GRIB 2. Now changed to more
+     generic names.
+
+    .files: libMetview/MvFieldSet.cc, Macro/grib.cc
+    .date:  2011-02-17
+
+50vk Fixed a memory bug in BUFR in 64bit systems
+
+    .sizeof(long) was used instead of sizeof(fortint) in memory extimate
+     resulting not enough memory for a BUFR message.
+
+    .files: MvObs.cc
+    .date:  2011-02-17
+
+49fi Enable uPlot to handle ODB_MANAGER and NETCDF_MANAGER
+
+    .Also added 3 ODB new functions to uPlot: XY_POINTS, XY_VECTORS, XY_MATRIX.
+     These are members of the ODB_MANAGER family icon.
+
+    .files: etc/uPlotTable,ObjectList, uPlot/MagicsTranslator.cc,SkipAction.*,
+	    uPlotManager.cc,Makefile.am, StdAppManager/StdAppManager.cc,
+	    Odb/ObjectSpec.Odb
+    .date:  2011-02-16
+
+48ir Reprojection module not being built (Thomas Haiden)
+
+    .The Reprojection module has not been buildable for some time. Changes
+     in Magics and Metview have now enabled it to be built. The output
+     differs by one row and one column compared to the version built in
+     Metview 3, and it now uses missing values for pixels outside the
+     valid area.
+
+    .files: Reprojection/ReprojectService.[cc,h], Reprojection.h
+    .date:  2011-02-16
+
+47ir uPlot not starting up in some installations (Angel, Montenegro)
+
+    .MAGPLUS_HOME was set correctly for a development version of Metview,
+     but when installed into a directory other than where Magics was
+     installed, MAGPLUS_HOME was wrong.
+
+    .files: scripts/metview_base
+    .date:  2011-02-15
+
+46fi Added 3 ODB new functions to uPlot: XY_POINTS, XY_VECTORS, XY_MATRIX
+
+    .These 3 new functions are members of the ODB_MANAGER family icon
+
+    .files: etc/uPlotTable, uPlot/MagicsTranslator.cc
+    .date:  2011-02-15
+
+45sk Enable WMS Client usage in macro
+
+    .The WMS Client can now be used in macro via the wmsclient macro command.
+
+    .files: OgcClient/MvMain.cc, MvQWmsClient.cc, ObjectSpec.WmsClient,
+            WmsClientDef
+    .date:  2011-02-14
+
+44sk Change initial directory of the file save dialog of icons
+
+    .Certain icons have a "save" item in their context menu. This brings up
+     a file selection dialog whose initial directory is now set to the
+     folder of the icon.
+
+    .files: AppMod/savepool.cc
+    .date:  2011-02-10
+
+43sk Add save and examine actions to ODB Manager
+
+    .The resulting ODB of the ODB/SQL query in the ODB Manager icon can now
+     be examined and saved.
+
+    .files: AppMod/savepool.cc, Odb/ObjectSpec.Odb,
+            OdbExaminer/MvMain.cc
+    .date:  2011-02-10
+
+42ir Macro function nearest_gridpoint() now accepts vector locations
+
+    .New mode:
+      vector or list nearest_gridpoint(fieldset, vector, vector)
+     Updated function description:
+     Returns the value of the nearest point to a given location in each field
+     of a fieldset. If a list is given, it must contain two numbers -
+     latitude and longitude. If two numbers or vectors are given, the first
+     is the latitude(s), the second the longitude(s).The field must be a lat-long
+     field. If the fieldset has only one field, a number or vector is returned;
+     otherwise a list is returned. Where it is not possible to generate a sensible
+     value due to lack of valid data in the fieldset, a 'nil' is returned in
+     the case of a single coordinate, or vector_missing_value in the case of
+     a vector.
+     A performance test which extracted 20000 points from a set of 6 fields
+     showed that the vector version took 0.27u/0.01s CPU, whereas peforming
+     a loop to extract the same points took 46.02u/1.63s CPU.
+
+    .files: Macro/grib.cc
+    .date:  2011-02-09
+
+41ir New macro function: fieldset indexes(fieldset, vector)
+
+    .Given a fieldset and a vector of target values, this function finds
+     for each gridpoint the indexes of the nearest values in the target.
+     Indexes are zero-based and will always have a minimum value of zero
+     and a maximum value equal to the index of the last element of the
+     target vector. A value lying between two values in the vector will
+     use the index of the nearest value; if equidistant, then the higher
+     value is used.
+     The input vector MUST be sorted in ascending order.
+     Example: if these are our inputs:
+     -
+     GRIB:  10, 20, 30, 40     VECTOR:  | 5, 10, 15, 20, 25, 30  |
+            15, 25, 35, 45
+             8, 4,  20, 11
+     -
+     then our output would be a new GRIB, with values equal to the input
+     values' positions in the input vector:
+     -
+     GRIB:  1, 3, 5, 5
+            2, 4, 5, 5
+            1, 0, 3, 1
+     -
+     A missing value in the input field will result in a missing value in
+     the output field.
+
+    .files: Macro/grib.cc
+    .date:  2011-02-09
+
+40ir Magics messages were not being printed in batch mode
+
+    .Re-arrangement of code. Errors and warnings now printed, info
+     goes to the logs.
+
+    .files: uPlot/uPlotBase.[cc,h],PlotMod.[cc,h],PlotModBatch.[cc,h],
+            PlotModInteractive.[cc,h]
+    .date:  2011-02-03
+
+39ir Fixed the 'legacy' inline fortran macro interface for 64-bit platforms
+
+    .This code was not working on 64-bit AIX because of the fact that a fortran
+     integer is not necessarily the same size as a 'C' long or a pointer.
+
+    .files: libMars/macro_api.[c,h]
+    .date:  2011-02-02
+
+38sk Improve the interface for the "Plain" editor mode in the WMS Client
+
+    .The WMS Client in the "Plain" editor mode prevously only allowed the
+     direct editing of the GetMap request. Now this interface was redesigned
+     and each WMS parameter can be edited separately. A new dialog was
+     also added to enable users to import arbitrary GetMap requests
+     into the editor.
+
+    .files: libMvQtGui/Makefile.am, MvQTextDialog.[cc,h]
+    	    OgcClient/MvQOgcRequest.[cc,h], MvQWmsClient.[cc,h],
+	    	      MvQWmsClientEditor.[cc,h]
+    .date:  2011-01-27
+
+37fi Added uPlot Print range selection
+
+    .There are two options to select frames to be printed: All and Range.
+     Also, there is an option to select the number of copies.
+
+    .files: uPlot/PlotAction.cc, SuperPage.cc, PlotMod.cc, uPlotBase.cc
+    .date:  2011-01-25
+
+36ir Replaced configure option '--enable-batch-only' with 'disable-ui'
+
+    .This small change should be less confusing to installers.
+
+    .files: configure.ac
+    .date:  2011-01-24
+
+35fi Added uPlot Export frame selection
+
+    .There are three options to select which frames will be exported: Current,
+     All and Range.
+
+    .files: ~magics/basic/Layer.cc, uPlot/ExportDialog.cc, SuperPage.cc
+    .date:  2011-01-24
+
+34sk Improve tree view scrolling performance for the GRIB and BUFR Examiners
+
+    .The message tree views in the GRIB and BUFR Examiners are now able to
+     scroll large number of rows very quickly.
+
+    .files: libMvQtGui/MvQAbstractExaminerBase.cc
+    .date:  2011-01-21
+
+33ir Small issues in Macro Editor
+
+    .The autoindent functionality had some peculiarities if the cursor
+     was not at the start or end of a line. Additionally, the block
+     indent functionality did not work quite properly.
+
+    .files: Macro/MacroEdit.cc,mvplaintextedit.cc
+    .date:  2011-01-21
+
+32sk Add data viewer to ODB Examiner
+
+    .A data viewer tab was added to the ODB Examiner to show all the values
+     of the inspected ODB.
+
+    .files: OdbExaminer/OdbExaminer.[cc,h], MvQOdbModel.[cc,h]
+            libUtil/MvOdb.[cc,h]
+    .date:  2011-01-21
+
+31vk Fixed Macro-With-Parameters
+
+    .Macro-With-Parameters got broken when MvRequest::merge() function
+     was changed to accommodate editor conversion Mv3 -> Mv4. Fixed by
+     introducing MvRequest::mars_merge() to do the old stuff, and make
+     MetviewUI call the new function for Macro-With-Parameters.
+
+    .files: libMetview/MvRequest.h, libMetview/MvRequest.cc,
+            MetviewUI/MacroParam.cc, MetviewUI/MacroParamState.cc
+    .date:  2011-01-20
+
+30ir Macro vector access expanded
+
+    .The full set of ways to access a subset of a list was added to the
+     vector data type in Macro, ie vector[i], vector[first, last],
+     vector[first, last, step]. Also, a additional fourth parameter is
+     now accepted (for vectors only): if supplied, it specifies how
+     many elements to extract from the current step. For example,
+       vector[1, 20, 5, 2] will create a new vector with elements
+     from these indexes: 1,2,6,7,11,12,16,17.
+     Additionally, it is now possible to assign a vector to an indexed
+     position in another vector, for example: v[4] = |99,99,99|. In this
+     example, elements 4, 5 and 6 of v will be replaced.
+
+    .files: Macro/mvector.cc
+    .date:  2011-01-14
+
+29ir Macro function values(netcdf) now returns a vector
+
+    .The macro function values(netcdf) was returning a list of numbers,
+     which could be very slow; this was changed to return a vector.
+
+    .files: Macro/netcdf.cc
+    .date:  2011-01-12
+
+28sk WmsClient now handles SRS for WMS versions 1.1.0 and older
+
+    .The SRS was not correctly parsed in the GetCapabilities documents for
+     versions 1.1.0 and older. Now the whitespace separated list specified
+     for the SRS in these versions are split into individual values.
+
+    .files: OgcClient/MvQWmsClient.cc,MvQWmsClientEditor.cc
+    .date:  2011-01-11
+
+27fi Revise Macro set output drivers
+
+   .Define output requests according to the following rules/priorities:
+	1. Drivers defined in the "plot" command have top priority (overwrite "setoutput")
+	2. Drivers defined in the "setoutput" command have second priority
+	3. If neither 1 or 2 is defined then output goes to "screen"
+
+   .files: Macro/request.cc,script.cc, uPlot/uPlotManager
+   .date:  2011-01-11
+
+26ir NetCDF examiner was crashing on 64-bit Linux platforms
+
+   .Some Motif calls were being passed '0' instead of 'NULL', and this was
+    causing a crash on 64-bit Linux (and might have also been responsible
+    for slightly strange behaviour on 32-bit platforms).
+
+   .files: NcBrowse/NC_comp.cc
+   .date:  2011-01-10
+
+25ir Revise and expand the use of the vector data type in Macro
+
+   .In functions such as gridvals() which return a large list of numbers, the
+    use of the vector data type is much more efficient. As the accessing of
+    vector elements is identical to the accessing of list elements, it was
+    decided to change a number of macro functions which currently return
+    a list of numbers to return instead a vector. This also prompted a
+    development of the functions available on vectors.
+    Vector functions now available include unary operators such as abs(),
+    cos(), etc and binary operators such as +, -, >, min, etc. These are the
+    same set of basic operators and functions that are available for fieldsets,
+    geopoints and numbers.
+    Revised functions:
+      In addition, the following existing functions were modified in order to return or
+      accept vectors instead of lists:
+        gridvals(), grib_get_long_array(), grib_get_double_array(),
+        average_ew(), average_ns(),
+        level(geopoints), latitude(geopoints), longitude(geopoints), value(geopoints),
+        value2(geopoints), value(odb).
+      The following functions on geopoints now accept either a list of numbers or a
+      vector as input:
+        set_latitude(), set_longitude(), set_level(), set_date(), set_time(),
+        set_value(), set_value2()
+    New macro functions:
+      The following are new macro functions:
+        set_gridvals(fieldset, vector) - takes a vector or a list of vectors as input;
+                                         if a single vector, then it is applied to
+                                         all fields;
+                                         if a list of vectors, then there must be the
+                                         same number of vectors as there are fields.
+        gridlats(fieldset), gridlons(fieldset) - return vectors.
+        tolist(vector) - convert a vector to a list of numbers
+                         (missing values become 'nil').
+    Missing values:
+      New functions are available for converting missing values:
+        bitmap(vector,number) and nobitmap(vector,number) .
+      A new global variable, vector_missing_value, now exists for the purpose of testing
+      vector elements. Missing values derived from fieldsets and geopoints variables
+      are honoured.
+    Concatenation:
+      Can concatenate 2 vectors, e.g. c = a & b
+      Can append a number to a vector, e.g. v = v & 7
+    Building a vector:
+      The most efficient way to build a vector is to pre-allocate and then fill:
+        a = vector(num_elements)
+        for i = 1 to num_elements do
+          a[i] = i
+        end for
+
+   .files: Macro/mvector.cc,grib.cc,codb.cc,value.h
+   .date:  2010-12-21 - 2011-01-05
+
+24sk Add float value sorting to the key lists in the examiners and uPlot
+
+   .The float values are now properly sorted in the key lists of the examiners
+    and in the frame list of uPlot.
+
+   .files: libMvQtGui/MvQKeyProfileModel.cc
+   .date:  2010-12-15
+
+23sk Added ODB/SQL query interface to ODB Manager
+
+   .The ODB Manager is now able to perform ODB/SQL queries. With this solution
+    ODB databases can be directly visualised by the ODB Manager.
+
+   .files: configure.ac, src/Makefile.am
+   	   various files in Odb/, OdbFilter/ and StdAppManager/
+   .date:  2010-12-14
+
+22ir The gridvals() macro function can be slow with large datasets
+
+   .This is because it returns a list. Added an optional second parameter
+    which can be either 'list' or 'vector' so that the user can specify
+    whether the function returns a list or a vector. Vectors are much
+    faster.
+
+   .files: Macro/grib.cc
+   .date:  2010-12-13
+
+21fi Added new Output Formats to the Export function
+
+   .The following output formats are now available: ps, pdf, eps, kml, png, svg
+
+   .files: uPlot/ObjectSpec.OutputFormats, etc/ObjectList, EPSOutputDef,
+    	   KMLOutputDef, PDFOutputDef, PNGOutputDef, SVGOutputDef
+   .date:  2010-12-13
+
+20fi Added error handling to uPlot Export icon function
+
+   .An error message window informs the user that an error was detected.
+
+   .files: uPlot/ExportDialog.*
+   .date:  2010-12-06
+
+19fi Added frames selection option to uPlot Export icon function (Sandor)
+
+   .Users can select which frames to be exported via 3 options: Current frame,
+    All frames and Range of frames (e.g. 1,3-5,6,...).
+
+   .files: uPlot/ExportDialog.*, MagicsGraphicsEngine.cc, SuperPage.cc, uPlotBase.cc
+   .date:  2010-12-03
+
+==============================================================================
+           2010-12-06 Metview 4.0.1 released for export
+==============================================================================
+
+18ir Revision of DivRot module code and addition of new functionality
+
+   .The Divrot code was not going through exactly the same pathway
+    as the Mars client does in order to derive wind components from
+    vorticity and divergence. It now does. There is also a new mode,
+    UVWIND, macro function uvwind() for more efficient computation
+    of U/V from VO/D.
+
+   .files: Divrot.cc,Divrot.h,Divrot/divrot-exFortran.cc,share/metview/etc/DivrotDef
+   .date:  2010-11-22
+
+17fi Added automatic macro generation code for the ODB Manager module (Sandor)
+
+   .Also the indentation scheme in the Macro text file has changed.
+
+   .files: uPlot/ObjectInfo.*, MacroConverter.cc,
+   		   OdbFilter/OdbFilter.cc, OdbDef,
+		   Macro/mvimport.c
+   .date:  2010-11-19
+
+16fi Visualization problem with fieldset containing single and companion fields (Vesa)
+
+   .Magics now receives a request with one dataset for single fields and another dataset
+    for companion fields.
+
+   .files: uPlot/MagicsGraphicsEngine.cc, MagicsTranslator.cc, MapView.cc
+   .date:  2010-11-16
+
+15fi Accept any combination of MV3 and MV4 visdefs drops (Vesa)
+
+   .For each dataunit, uPlot now updates the request to be sent to Magics with
+    all the related visdefs under a new parameter called VISDEFS. Also, uPlot now
+    accepts any combination of the new and old visdefs definitions.
+
+   .files: uPlot/MagicsGraphicsEngine.cc, MagicsTranslator.*, ObjectInfo.cc
+   .date:  2010-11-12
+
+14ir Geopoints dropped into the Macro Editor generated bad code
+
+   .Dropping a geopoints file in the editor generated a call to function
+    'metview()' which is not correct. It now generates a read() function
+    call.
+
+   .files: Macro/mvimport.c
+   .date:  2010-11-11
+
+13sk Added service expception handling for WMS 1.3.0 in WmsCLient
+
+   .WmsClient was not able to handle service exceptions for WMS version
+    1.3.0. Now these XML files are correctly parsed and the contents is
+    displayed in log area.
+
+    .files: OgcClient/MvQWmsClient.cc
+    .date: 2010-11-08
+
+12sk Added support for fixed-size images in WmsClient
+
+   .WmsClient now is able to handle WMS layers with a fixed image size
+
+   .files: OgcClient:MvMain.cc MvQOgcParam.[cc,hh] MvOgcRequest.[cc,hh]
+                     MvQWmsClient.cc WmsClientDef
+   .date:  2010-11-05
+
+11ir Added 'Insert Code Template' dialog to Macro Editor
+
+   .Metview's Macro Editor now has the ability to provide a list of code
+    templates (programming language-specific) to the user for insertion.
+
+   .files: MacroEditor/various
+   .date:  2010-11-03
+
+10ir Openjpeg library not linked when GRIB_API needs it
+
+   .Metview's configure script was not taking into account the possibility
+    that GRIB_API could have been built with openjpeg support. Now it does.
+
+   .files: configure.ac
+   .date:  2010-11-02
+
+9ir Macro Editor was showing as an unknown icon in the Process Monitor
+
+   .MetviewUI was not adding a _CLASS parameter to the request. Now it
+    uses the class of the type of file being edited, and therefore
+    the corresponding icon will be displayed in the monitor.
+
+   .files: MetviewUI/QtMacroEditor.cc
+   .date:  2010-11-01
+
+8ir Various editors and examiners could only have 6 instances
+
+   .Specifically the Macro, WMS and WCS editors, and the GRIB, BUFR and
+    ODB examiners were limited to MARS_MAXFORKS instances. They can now
+    have up to 25 instances each.
+
+   .files: etc/Services, other ObjectSpec files
+   .date:  2010-11-01
+
+7ir Macro Editor now handles Shell icons
+
+   .Editing a Shell icon in the user interface now invokes the macro editor,
+    which can now run the script and display its output in its log.
+
+   .files: MacroEditor/(various files)
+   .date:  2010-10-28
+
+6ir Fixed inline C/Fortran macro functions mci_fail and mfi_fail
+
+   .Zero-length strings were being used, seemed to work by accident sometimes.
+
+   .files: libMars/macro_api.c
+   .date:  2010-10-25
+
+5ir New Macro function grib_set_string (Mark Rodwell)
+
+   .Added new Macro function grib_set_string()
+
+   .files: libMetview:MvFieldSet.h, MvGrid.[cc,h], Macro/grib.cc,
+           etc/macro_list_builtin.txt, etc/macro_calltips_builtin.txt
+   .date:  2010-10-25
+
+
+4sk Handling whitespaces in WMS GetCapabilities documents. (Marc Rautenhaus, DLR)
+
+   .WmsClient did not handle whitespaces within data nodes in the GetCapabilities
+    document. This problem was solved by using the "normalize-space" XQuery
+    function.
+
+   .files: src/OgcClient/MvQWmsClient.cc
+   .date:  2010-10-25
+
+3sk Fix compilation related bug for find.qrc (Matthias Langer, ZAMG)
+
+   .After "make clean" in src/OgcClient find.qrc.cpp was not generated.
+    This bug has been fixed.
+
+   .files: src/OgcClient/Makefile.am
+   .date:  2010-10-21
+
+2sk Add service and layer meta data to the output generated by WmsClient.
+
+  .Service and layer meta data are now added to the PRasterLoop output generated
+   by WmsClient. This information is finally displayed in uPlot's layer
+   meta data widget.
+
+   .files: src/OgcClient/MvMain.cc
+   	   src/OgcClient/MvQWmsClient[cc,h], src/OgcClient/WmsClientDef
+   .date:  2010-10-19
+
+1sk Add new widget to uPlot to display layer meta data.
+
+  .uPlot's Layers tab now contains a layer information widget displaying the layer
+  meta data.
+
+   .files: src/uPlot/Makefile.am
+   	   src/uPlot/MvQLayerModel[cc,h], src/uPlot/MvQLayerWidget[cc,h],
+   	   src/uPlot/layerInfo.css src/uPlot/uPlot.qrc
+   .date:  2010-10-19
+
+0sk Check data type in the ODB Manager.
+
+  .ODB Manager can only work with ODB data. Now the input data (either spcified
+   by an icon or by the data path) is checked rigorously.
+
+   .files: src/StdAppmanager/StdAppManager.cc, src/libMetview/MvScanFileType[cc,h]
+   .date:  2010-10-01
+
+==============================================================================
+           2010-09-30 Metview 4.0.0 released internally and for export
+==============================================================================
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..ac57c6e
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,252 @@
+
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+>>>>
+>>>> Please read the installation guide at
+>>>> 
+>>>>    https://software.ecmwf.int/metview/Installation+Guide
+>>>> 
+>>>>  for information
+>>>>
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+
+
+
+Below is some general information about the configure utility and build
+process.
+
+
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..99a1252
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+                                Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2007-2012 European Centre for Medium-Range Weather Forecasts (ECMWF)
+   and Brazil's Instituto Nacional de Pesquisas Espaciais (INPE)
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/Makefile.am b/Makefile.am
new file mode 100755
index 0000000..d4c9b9c
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,58 @@
+SUBDIRS		= src scripts share/metview test
+DIST_SUBDIRS	= src scripts share/metview test rpms
+
+EXTRA_DIST	= LICENSE NOTICE config version.sh metview.desktop
+
+#bin_SCRIPTS	= bin/metview.sh
+ACLOCAL_AMFLAGS	= -I m4
+
+#cleanall:
+#	cd src; $(MAKE) cleanall ; echo "MAKE CLEANALL > src"
+#	cd scripts; $(MAKE) cleanall ; echo "MAKE CLEANALL > scripts"
+
+#
+#  For Gnome and KDE menues
+#
+appsdir = $(datadir)/applications
+apps_DATA = metview.desktop
+
+#clean-all: clean
+#	cd src/libMars ; $(MAKE) clean-all ; cd ../Macro ; $(MAKE) clean-all
+
+clean-local:
+	-rm -Rf bin/*
+	-rm -f lib/*
+depend:
+	cd share/metview/icons && touch make.dep && make depend
+
+quiet:
+	make --quiet install
+	make check
+
+RPM = rpm
+
+rpms srcrpm: dist
+	(cd rpms && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
+	rpmarch=`$(RPM) --showrc | grep "^build arch" | \
+	sed 's/\(.*: \)\(.*\)/\2/'`; \
+	test -z "rpms/$$rpmarch" || \
+	 ( mv rpms/$$rpmarch/* rpms/. && rm -rf rpms/$$rpmarch )
+	rm -rf rpms/$(distdir)
+
+
+# we do not want to distribute CONFIG.site...
+dist-hook:
+	rm -f $(distdir)/config/CONFIG.site
+
+
+.PHONY: srcrpm rpms dist-hook
+
+
+
+# we need a lib64 for 64-bit machines when we run inline fortran/c from
+# a development version
+
+BUILT_SOURCES = lib64
+
+lib64:
+	ln -s lib lib64
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..e7f4553
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,899 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
+	ChangeLog INSTALL NEWS config/compile config/config.guess \
+	config/config.sub config/depcomp config/install-sh \
+	config/ltmain.sh config/missing config/ylwrap
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(appsdir)"
+DATA = $(apps_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src scripts share/metview test
+DIST_SUBDIRS = src scripts share/metview test rpms
+EXTRA_DIST = LICENSE NOTICE config version.sh metview.desktop
+
+#bin_SCRIPTS	= bin/metview.sh
+ACLOCAL_AMFLAGS = -I m4
+
+#cleanall:
+#	cd src; $(MAKE) cleanall ; echo "MAKE CLEANALL > src"
+#	cd scripts; $(MAKE) cleanall ; echo "MAKE CLEANALL > scripts"
+
+#
+#  For Gnome and KDE menues
+#
+appsdir = $(datadir)/applications
+apps_DATA = metview.desktop
+RPM = rpm
+
+# we need a lib64 for 64-bit machines when we run inline fortran/c from
+# a development version
+BUILT_SOURCES = lib64
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-appsDATA: $(apps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(appsdir)" || $(MKDIR_P) "$(DESTDIR)$(appsdir)"
+	@list='$(apps_DATA)'; test -n "$(appsdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appsdir)" || exit $$?; \
+	done
+
+uninstall-appsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(apps_DATA)'; test -n "$(appsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(appsdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(appsdir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@$(am__cd) '$(distuninstallcheck_dir)' \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(appsdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-appsDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-appsDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+	ctags-recursive install install-am install-strip \
+	tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libtool clean-local ctags ctags-recursive dist dist-all \
+	dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
+	dist-xz dist-zip distcheck distclean distclean-generic \
+	distclean-libtool distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-appsDATA install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-appsDATA
+
+
+#clean-all: clean
+#	cd src/libMars ; $(MAKE) clean-all ; cd ../Macro ; $(MAKE) clean-all
+
+clean-local:
+	-rm -Rf bin/*
+	-rm -f lib/*
+depend:
+	cd share/metview/icons && touch make.dep && make depend
+
+quiet:
+	make --quiet install
+	make check
+
+rpms srcrpm: dist
+	(cd rpms && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
+	rpmarch=`$(RPM) --showrc | grep "^build arch" | \
+	sed 's/\(.*: \)\(.*\)/\2/'`; \
+	test -z "rpms/$$rpmarch" || \
+	 ( mv rpms/$$rpmarch/* rpms/. && rm -rf rpms/$$rpmarch )
+	rm -rf rpms/$(distdir)
+
+# we do not want to distribute CONFIG.site...
+dist-hook:
+	rm -f $(distdir)/config/CONFIG.site
+
+.PHONY: srcrpm rpms dist-hook
+
+lib64:
+	ln -s lib lib64
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..fcfd14a
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,251 @@
+Metview
+=======
+
+Copyright 2007-2013 ECMWF and INPE
+
+This product mainly includes software developed by the Meteorological 
+Visualisation Section (formerly known as Graphics Section) at the 
+
+    "European Centre for Medium-Range Weather Forecasts" 
+              (ECMWF - http://www.ecmwf.int )
+
+and
+
+   "National Institute for Space Research (INPE, Brazil)"
+                   (http://www.inpe.br/)
+
+
+Below is a list of software packages which are used inside Metview:
+
+
+Magics++
+========
+
+This graphics library, developed at ECMWF, performs all of the data visualisation
+within Metview. Details can be found at:
+
+  https://software.ecmwf.int/magics
+
+
+
+AutoTroll
+=========
+
+This software configuration utility allows Qt-based projects to be built within
+the GNU Autotools environment. More details can be found at:
+
+  http://www.tsunanet.net/autotroll/
+
+
+
+JSON_SPIRIT_READER
+==================
+
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   json spirit version 4.00
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+
+
+
+Motif icon widget code
+======================
+
+Some Motif code was taken from the book "OSF/Motif Concepts and Programming"
+by Thomas Berlage (Addison Wesley, 1991); ISBN 0-201-55792-4.
+
+
+
+LayoutP.h
+=========
+
+/***********************************************************
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+
+
+vroot.h
+=======
+
+/*****************************************************************************/
+/**                   Copyright 1991 by Andreas Stolcke                     **/
+/**               Copyright 1990 by Solbourne Computer Inc.                 **/
+/**                          Longmont, Colorado                             **/
+/**                                                                         **/
+/**                           All Rights Reserved                           **/
+/**                                                                         **/
+/**    Permission to use, copy, modify, and distribute this software and    **/
+/**    its documentation  for  any  purpose  and  without  fee is hereby    **/
+/**    granted, provided that the above copyright notice appear  in  all    **/
+/**    copies and that both  that  copyright  notice  and  this  permis-    **/
+/**    sion  notice appear in supporting  documentation,  and  that  the    **/
+/**    name of Solbourne not be used in advertising                         **/
+/**    in publicity pertaining to distribution of the  software  without    **/
+/**    specific, written prior permission.                                  **/
+/**                                                                         **/
+/**    ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/
+/**    WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF    **/
+/**    MERCHANTABILITY  AND  FITNESS,  IN  NO  EVENT SHALL ANDREAS STOLCKE  **/
+/**    OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL    **/
+/**    DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA   **/
+/**    OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER    **/
+/**    TORTIOUS ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE    **/
+/**    OR PERFORMANCE OF THIS SOFTWARE.                                     **/
+/*****************************************************************************/
+
+
+
+remote.c
+========
+
+
+ * remote.c --- remote control of Netscape Navigator for Unix.
+ * version 1.1.3, for Netscape Navigator 1.1 and newer.
+ *
+ * Copyright � 1996 Netscape Communications Corporation, all rights reserved.
+ * Created: Jamie Zawinski <jwz at netscape.com>, 24-Dec-94.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or
+ * implied warranty.
+ *
+ * To compile:
+ *
+ *    cc -o netscape-remote remote.c -DSTANDALONE -lXmu -lX11
+ *
+ * To use:
+ *
+ *    netscape-remote -help
+ *
+ * Documentation for the protocol which this code implements may be found at:
+ *
+ *    http://home.netscape.com/newsref/std/x-remote.html
+ *
+ * Bugs and commentary to x_cbug at netscape.com.
+
+
+
+
+Rotated grid code
+=================
+
+Fortran code for handling rotated grids was supplied by agreement with FMI,
+and re-written in C++.
+
+
+Lambert grid code
+=================
+
+Fortran code for handling Lambert grids was taken from:
+
+  http://ruc.noaa.gov/fslparms/w3fb12.f
+
+The code was converted to C++ for use in Metview.
+
+
+Similar code carries the following license:
+
+C**---------------------------------------------------------------------
+C**REQUIRED STANDARD FSL DISCLAIMER (NOVEMBER 2000)
+C**---------------------------------------------------------------------
+C**  OPEN SOURCE LICENSE/DISCLAIMER,  FORECAST SYSTEMS LABORATORY
+C**  NOAA/OAR/FSL, 325 BROADWAY BOULDER, CO 80305
+C**
+C**  THIS SOFTWARE IS DISTRIBUTED UNDER THE OPEN SOURCE DEFINITION, 
+C**  WHICH MAY BE FOUND AT http://www.opensource.org/osd.html.
+C**
+C**  IN PARTICULAR, REDISTRIBUTION AND USE IN SOURCE AND BINARY FORMS,
+C**  WITH OR WITHOUT MODIFICATION, ARE PERMITTED PROVIDED THAT THE 
+C**  FOLLOWING CONDITIONS ARE MET:
+C**
+C**  - REDISTRIBUTIONS OF SOURCE CODE MUST RETAIN THIS NOTICE, THIS LIST
+C**    OF CONDITIONS AND THE FOLLOWING DISCLAIMER.
+C**
+C**  - REDISTRIBUTIONS IN BINARY FORM MUST PROVIDE ACCESS TO THIS 
+C**    NOTICE, THIS LIST OF CONDITIONS AND THE FOLLOWING DISCLAIMER, AND
+C**    THE UNDERLYING SOURCE CODE.
+C**
+C**  - ALL MODIFICATIONS TO THIS SOFTWARE MUST BE CLEARLY DOCUMENTED, 
+C**    AND ARE SOLELY THE RESPONSIBILITY OF THE AGENT MAKING THE 
+C**    MODIFICATIONS.
+C**
+C**  - IF SIGNIFICANT MODIFICATIONS OR ENHANCEMENTS ARE MADE TO THIS
+C**    SOFTWARE, THE FSL SOFTWARE POLICY MANAGER 
+C**    (softwaremgr.fsl at noaa.gov) BE NOTIFIED.
+C**
+C**  THIS SOFTWARE AND ITS DOCUMENTATION ARE IN THE PUBLIC DOMAIN AND 
+C**  ARE FURNISHED "AS IS."  THE AUTHORS, THE UNITED STATES GOVERNMENT,
+C**  ITS INSTRUMENTALITIES, OFFICERS, EMPLOYEES, AND AGENTS MAKE NO 
+C**  WARRANTY, EXPRESS OR IMPLIED, AS TO THE USEFULNESS OF THE SOFTWARE
+C**  AND DOCUMENTATION FOR ANY PURPOSE.  THEY ASSUME NO RESPONSIBILITY 
+C**  (1) FOR THE USE OF THE SOFTWARE AND DOCUMENTATION; OR (2) TO 
+C**  PROVIDE TECHNICAL SUPPORT TO USERS.
+C**---------------------------------------------------------------------
+
+
+
+Qt
+==
+
+Portions of code were taken from
+  - the book "C++ GUI Programming with Qt 4" by Jasmin Blanchette
+    and Mark Summerfield (Prentice Hall, 2010)
+  - the Qt 4.7 documentation and examples on the web, under the BSD license:
+
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..2ca0d4c
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,9147 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+  ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool at gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+  lt_cl_success=:
+  test "$silent" = yes &&
+    lt_config_lt_args="$lt_config_lt_args --quiet"
+  exec AS_MESSAGE_LOG_FD>/dev/null
+  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+  exec AS_MESSAGE_LOG_FD>>config.log
+  $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_XSI_SHELLFNS
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [Java],		[_LT_LANG(GCJ)],
+  [Fortran 77],		[_LT_LANG(F77)],
+  [Fortran],		[_LT_LANG(FC)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+	[lt_cv_ld_exported_symbols_list=yes],
+	[lt_cv_ld_exported_symbols_list=no])
+	LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+[$]*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
+
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
+
+	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "[$]0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+    [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_HELP_STRING([--disable-libtool-lock],
+    [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}]
+_LT_EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+	[], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+       [shlibpath_overrides_runpath=yes])])
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+	[Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 _LT_SYS_MODULE_PATH_AIX
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        AC_LINK_IFELSE(int foo(void) {},
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+        )
+        LDFLAGS="$save_LDFLAGS"
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+        _LT_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+    [[If ld is used when linking, flag to hardcode $libdir into a binary
+    during linking.  This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+    [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_LD
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        _LT_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[[012]]|aix4.[[012]].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        _LT_TAGVAR(always_export_symbols, $1)=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    _LT_SYS_MODULE_PATH_AIX
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+        # as there is no search path for DLLs.
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+        _LT_TAGVAR(always_export_symbols, $1)=no
+        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          _LT_TAGVAR(ld_shlibs, $1)=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            _LT_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+	    ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	    case $host_os in
+	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    output_verbose_link_cmd='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+		*)
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+	   _LT_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${F77-"f77"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]+=\$[2]"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+    ;;
+  esac
+])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  		   [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+		
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+		[AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+	ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+		[$4])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_PROG_LEX
+# -----------
+# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
+# "missing" invocation, for better error output.
+AC_DEFUN([AM_PROG_LEX],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+  LEX=${am_missing_run}flex
+fi])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/aux_build/autotroll.m4 b/aux_build/autotroll.m4
new file mode 100644
index 0000000..d7e071e
--- /dev/null
+++ b/aux_build/autotroll.m4
@@ -0,0 +1,563 @@
+# Build Qt apps with the autotools (Autoconf/Automake).
+# M4 macros.
+# This file is part of AutoTroll.
+# Copyright (C) 2006  Benoit Sigoure <benoit.sigoure at lrde.epita.fr>
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# Disclaimer: Never tested with anything else than Qt 4.2! Feedback welcome.
+# Simply invoke AT_WITH_QT in your configure.ac. AT_WITH_QT can take
+# arguments which are documented in depth below. The default arguments are
+# equivalent to the default .pro file generated by qmake.
+#
+# Invoking AT_WITH_QT will do the following:
+#  - Add a --with-qt option to your configure
+#  - Find qmake, moc and uic and save them in the make variables $(QMAKE),
+#    $(MOC), $(UIC).
+#  - Save the path to Qt in $(QT_PATH)
+#  - Find the flags to use Qt, that is:
+#     * $(QT_DEFINES): -D's defined by qmake.
+#     * $(QT_CFLAGS): CFLAGS as defined by qmake (C?!)
+#     * $(QT_CXXFLAGS): CXXFLAGS as defined by qmake.
+#     * $(QT_INCPATH): -I's defined by qmake.
+#     * $(QT_CPPFLAGS): Same as $(QT_DEFINES) + $(QT_INCPATH)
+#     * $(QT_LFLAGS): LFLAGS defined by qmake.
+#     * $(QT_LDFLAGS): Same thing as $(QT_LFLAGS).
+#     * $(QT_LIBS): LIBS defined by qmake.
+#
+# You *MUST* invoke $(MOC) and/or $(UIC) where necessary. AutoTroll provides
+# you with Makerules to ease this, here is a sample Makefile.am to use with
+# AutoTroll which builds the code given in the chapter 7 of the Qt Tutorial:
+# http://doc.trolltech.com/4.2/tutorial-t7.html
+#
+# -------------------------------------------------------------------------
+# include $(top_srcdir)/build-aux/autotroll.mk
+#
+# ACLOCAL_AMFLAGS = -I build-aux
+#
+# bin_PROGRAMS = lcdrange
+# lcdrange_SOURCES =  $(BUILT_SOURCES) lcdrange.cpp lcdrange.h main.cpp
+# lcdrange_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+# lcdrange_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+# lcdrange_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS)
+# lcdrange_LDADD    = $(QT_LIBS) $(LDADD)
+#
+# BUILT_SOURCES = lcdrange.moc.cpp
+# -------------------------------------------------------------------------
+#
+# Note that your MOC, UIC and QRC files *MUST* be listed manually in
+# BUILT_SOURCES. If you name them properly (eg: .moc.cc, .qrc.cc, .ui.cc -- of
+# course you can use .cpp or .cxx or .C rather than .cc) AutoTroll will build
+# them automagically for you (using implicit rules defined in autotroll.mk).
+
+m4_define([_AUTOTROLL_SERIAL], [m4_translit([
+# serial 4
+], [#
+], [])])
+
+
+m4_ifdef([AX_INSTEAD_IF], [],
+[AC_DEFUN([AX_INSTEAD_IF],
+  [m4_ifval([$1],
+    [AC_MSG_WARN([$2]); [$1]],
+    [AC_MSG_ERROR([$2])])])])
+
+m4_pattern_forbid([^AT_])dnl
+m4_pattern_forbid([^_AT_])dnl
+
+# AT_WITH_QT([QT_modules], [QT_config], [QT_misc], [RUN-IF-FAILED], [RUN-IF-OK])
+# ------------------------------------------------------------------------------
+# Enable Qt support and add an option --with-qt to the configure script.
+#
+# The QT_modules argument is optional and defines extra modules to enable or
+# disable (it's equivalent to the QT variable in .pro files). Modules can be
+# specified as follows:
+#
+# AT_WITH_QT   => No argument -> No QT value.
+#                                Qmake sets it to "core gui" by default.
+# AT_WITH_QT([xml])   => QT += xml
+# AT_WITH_QT([+xml])  => QT += xml
+# AT_WITH_QT([-gui])  => QT -= gui
+# AT_WITH_QT([xml -gui +sql svg])  => QT += xml sql svg
+#                                     QT -= gui
+#
+# The QT_config argument is also optional and follows the same convention as
+# QT_modules. Instead of changing the QT variable, it changes the CONFIG
+# variable, which is used to tweak configuration and compiler options.
+#
+# The last argument, QT_misc (also optional) will be copied as-is the .pro
+# file used to guess how to compile Qt apps. You may use it to further tweak
+# the build process of Qt apps if tweaking the QT or CONFIG variables isn't
+# enough for you.
+#
+# RUN-IF-FAILED is arbitrary code to execute if Qt cannot be found or if any
+# problem happens.  If this argument is omitted, then AC_MSG_ERROR will be
+# called.  RUN-IF-OK is arbitrary code to execute if Qt was successfully found.
+AC_DEFUN([AT_WITH_QT],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CXX])dnl
+echo "$as_me: this is autotroll.m4[]_AUTOTROLL_SERIAL" >&AS_MESSAGE_LOG_FD
+
+  test x"$TROLL" != x && echo 'ViM rox emacs.'
+
+dnl Memo: AC_ARG_WITH(package, help-string, [if-given], [if-not-given])
+  AC_ARG_WITH([qt],
+              [AS_HELP_STRING([--with-qt],
+                 [Path to Qt @<:@Look in PATH and /usr/local/Trolltech@:>@])],
+              [QT_PATH=$withval])
+
+  # this is a hack to get decent flow control with 'break'
+  for _qt_ignored in once; do
+
+  # Find Qt.
+  AC_ARG_VAR([QT_PATH], [Path to the Qt installation])
+  if test -d /usr/local/Trolltech; then
+    # Try to find the latest version.
+    tmp_qt_paths=`echo /usr/local/Trolltech/*/bin | tr ' ' '\n' | sort -nr \
+                                              | xargs | sed 's/  */:/g'`
+  fi
+  # Path to which recent MacPorts (~v1.7) install Qt4.
+  test -d /opt/local/libexec/qt4-mac/bin \
+    && tmp_qt_paths="$tmp_qt_paths:/opt/local/libexec/qt4-mac/bin"
+
+  # Find qmake.
+  AC_ARG_VAR([QMAKE], [Qt Makefile generator command])
+  AC_PATH_PROGS([QMAKE], [qmake qmake-qt4 qmake-qt3], [missing],
+                [$QT_DIR:$QT_PATH:$PATH:$tmp_qt_paths])
+  if test x"$QMAKE" = xmissing; then
+    AX_INSTEAD_IF([$4], [Cannot find qmake in your PATH. Try using --with-qt.])
+    break
+  fi
+
+  # Find moc (Meta Object Compiler).
+  AC_ARG_VAR([MOC], [Qt Meta Object Compiler command])
+  AC_PATH_PROGS([MOC], [moc moc-qt4 moc-qt3], [missing],
+                [$QT_PATH:$PATH:$tmp_qt_paths])
+  if test x"$MOC" = xmissing; then
+    AX_INSTEAD_IF([$4],
+   [Cannot find moc (Meta Object Compiler) in your PATH. Try using --with-qt.])
+    break
+  fi
+
+  # Find uic (User Interface Compiler).
+  AC_ARG_VAR([UIC], [Qt User Interface Compiler command])
+  AC_PATH_PROGS([UIC], [uic uic-qt4 uic-qt3 uic3], [missing],
+                [$QT_PATH:$PATH:$tmp_qt_paths])
+  if test x"$UIC" = xmissing; then
+    AX_INSTEAD_IF([$4],
+[Cannot find uic (User Interface Compiler) in your PATH. Try using --with-qt.])
+    break
+  fi
+
+  # Find rcc (Qt Resource Compiler).
+  AC_ARG_VAR([RCC], [Qt Resource Compiler command])
+  AC_PATH_PROGS([RCC], [rcc], [false], [$QT_PATH:$PATH:$tmp_qt_paths])
+  if test x"$UIC" = xfalse; then
+    AC_MSG_WARN([Cannot find rcc (Qt Resource Compiler) in your PATH.\
+  Try using --with-qt.])
+  fi
+
+  AC_MSG_CHECKING([whether host operating system is Darwin])
+  at_darwin=no
+  at_qmake_args=
+  case $host_os in
+    darwin*)
+      at_darwin=yes
+      at_qmake_args='-spec macx-g++'
+      ;;
+  esac
+  AC_MSG_RESULT([$at_darwin])
+
+  # If we don't know the path to Qt, guess it from the path to qmake.
+  if test x"$QT_PATH" = x; then
+    QT_PATH=`dirname "$QMAKE"`
+  fi
+  if test x"$QT_PATH" = x; then
+    AX_INSTEAD_IF([$4],
+                  [Cannot find the path to your Qt install. Use --with-qt.])
+    break
+  fi
+  AC_SUBST([QT_PATH])
+
+  # Get ready to build a test-app with Qt.
+  if mkdir conftest.dir && cd conftest.dir; then :; else
+    AX_INSTEAD_IF([$4], [Cannot mkdir conftest.dir or cd to that directory.])
+    break
+  fi
+
+  cat >conftest.h <<_ASEOF
+#include <QObject>
+
+class Foo: public QObject
+{
+  Q_OBJECT;
+public:
+  Foo();
+  ~Foo() {}
+public Q_SLOTS:
+  void setValue(int value);
+Q_SIGNALS:
+  void valueChanged(int newValue);
+private:
+  int value_;
+};
+_ASEOF
+
+  cat >conftest.cpp <<_ASEOF
+#include "conftest.h"
+Foo::Foo()
+  : value_ (42)
+{
+  connect(this, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)));
+}
+
+void Foo::setValue(int value)
+{
+  value_ = value;
+}
+
+int main()
+{
+  Foo f;
+}
+_ASEOF
+  if $QMAKE -project; then :; else
+    AX_INSTEAD_IF([$4], [Calling $QMAKE -project failed.])
+    break
+  fi
+
+  # Find the .pro file generated by qmake.
+  pro_file='conftest.dir.pro'
+  test -f $pro_file || pro_file=`echo *.pro`
+  if test -f "$pro_file"; then :; else
+    AX_INSTEAD_IF([$4], [Can't find the .pro file generated by Qmake.])
+    break
+  fi
+
+dnl Tweak the value of QT in the .pro if have been the 1st arg.
+m4_ifval([$1], [_AT_TWEAK_PRO_FILE([QT], [$1])])
+
+dnl Tweak the value of CONFIG in the .pro if have been given a 2nd arg.
+m4_ifval([$2], [_AT_TWEAK_PRO_FILE([CONFIG], [$2])])
+
+m4_ifval([$3],
+[ # Add the extra-settings the user wants to set in the .pro
+  echo "$3" >>"$pro_file"
+])
+
+  echo "$as_me:$LINENO: Invoking $QMAKE on $pro_file" >&AS_MESSAGE_LOG_FD
+  sed 's/^/| /' "$pro_file" >&AS_MESSAGE_LOG_FD
+
+  if $QMAKE $at_qmake_args; then :; else
+    AX_INSTEAD_IF([$4], [Calling $QMAKE $at_qmake_args failed.])
+    break
+  fi
+
+  # QMake has a very annoying misfeature: sometimes it generates Makefiles
+  # where all the references to the files from the Qt installation are
+  # relative.  We can't use them as-is because if we take, say, a
+  # -I../../usr/include/Qt from that Makefile, the flag is invalid as soon
+  # as we use it in another (sub) directory.  So what this perl pass does is
+  # that it rewrite all relative paths to absolute paths.  Another problem
+  # when building on Cygwin is that QMake mixes paths with blackslashes and
+  # forward slashes and paths must be handled with extra care because of the
+  # stupid Windows drive letters.
+  echo "$as_me:$LINENO: fixing the Makefiles:" Makefile* >&AS_MESSAGE_LOG_FD
+  cat >fixmk.pl <<\EOF
+[use strict;
+use Cwd qw(cwd abs_path);
+# This variable is useful on Cygwin for the following reason: Say that you are
+# in `/' (that is, in fact you are in C:/cygwin, or something like that) if you
+# `cd ..' then obviously you remain in `/' (that is in C:/cygwin).  QMake
+# generates paths that are relative to C:/ (or another driver letter, whatever)
+# so the trick to get the `..' resolved properly is to prepend the absolute
+# path of the current working directory in a Windows-style.  C:/cygwin/../ will
+# properly become C:/.
+my $d = "";
+my $r2a = 0;
+my $b2f = 0;
+
+my $cygwin = 0;
+if ($^O eq "cygwin") {
+  $cygwin = 1;
+  $d = cwd();
+  $d = `cygpath --mixed '$d'`;
+  chomp($d);
+  $d .= "/";
+}
+
+sub rel2abs($)
+{
+  my $p = $d . shift;
+  # print "r2a p=$p";
+  -e $p || return $p;
+  if ($cygwin) {
+    $p = `cygpath --mixed '$p'`;
+    chomp($p);
+  }
+  else {
+    # Do not use abs_path on Cygwin: it incorrectly resolves the paths that are
+    # relative to C:/ rather than `/'.
+    $p = abs_path($p);
+  }
+  # print " -> $p\n";
+  ++$r2a;
+  return $p;
+}
+
+# Only useful on Cygwin.
+sub back2forward($)
+{
+  my $p = shift;
+  # print "b2f p=$p";
+  -e $p || return $p;
+  $p = `cygpath --mixed '$p'`;
+  chomp($p);
+  # print " -> $p\n";
+  ++$b2f;
+  return $p;
+}
+
+foreach my $mk (@ARGV)
+{
+  next if $mk =~ /~$/;
+  open(MK, $mk) or die("open $mk: $!");
+  # print "mk=$mk\n";
+  my $file = join("", <MK>);
+  close(MK) or die("close $mk: $!");
+  rename $mk, $mk . "~" or die("rename $mk: $!");
+  $file =~ s{(?:\.\.[\\/])+(?:[^"'\s:]+)}{rel2abs($&)}gse;
+  $file =~ s{(?:[a-zA-Z]:[\\/])?(?:[^"\s]+\\[^"\s:]+)+}
+            {back2forward($&)}gse if $cygwin;
+  open(MK, ">", $mk) or die("open >$mk: $!");
+  print MK $file;
+  close(MK) or die("close >$mk: $!");
+  print "$mk: updated $r2a relative paths and $b2f backslash-style paths\n";
+  $r2a = 0;
+  $b2f = 0;
+}]
+EOF
+
+  perl >&AS_MESSAGE_LOG_FD -w fixmk.pl Makefile* ||
+  AC_MSG_WARN([failed to fix the Makefiles generated by $QMAKE])
+  rm -f fixmk.pl
+
+  # Try to compile a simple Qt app.
+  AC_CACHE_CHECK([whether we can build a simple Qt app], [at_cv_qt_build],
+  [at_cv_qt_build=ko
+  : ${MAKE=make}
+
+  if $MAKE >&AS_MESSAGE_LOG_FD 2>&1; then
+    at_cv_qt_build='ok, looks like Qt 4'
+  else
+    echo "$as_me:$LINENO: Build failed, trying to #include <qobject.h> \
+instead" >&AS_MESSAGE_LOG_FD
+    sed 's/<QObject>/<qobject.h>/' conftest.h > tmp.h && mv tmp.h conftest.h
+    if $MAKE >&AS_MESSAGE_LOG_FD 2>&1; then
+      at_cv_qt_build='ok, looks like Qt 3'
+    else
+      # Sometimes (such as on Debian) build will fail because Qt hasn't been
+      # installed in debug mode and qmake tries (by default) to build apps in
+      # debug mode => Try again in release mode.
+      echo "$as_me:$LINENO: Build failed, trying to enforce release mode" \
+            >&AS_MESSAGE_LOG_FD
+
+      _AT_TWEAK_PRO_FILE([CONFIG], [+release])
+
+      sed 's/<qobject.h>/<QObject>/' conftest.h > tmp.h && mv tmp.h conftest.h
+      if $MAKE >&AS_MESSAGE_LOG_FD 2>&1; then
+        at_cv_qt_build='ok, looks like Qt 4, release mode forced'
+      else
+        echo "$as_me:$LINENO: Build failed, trying to #include <qobject.h> \
+instead" >&AS_MESSAGE_LOG_FD
+        sed 's/<QObject>/<qobject.h>/' conftest.h >tmp.h && mv tmp.h conftest.h
+        if $MAKE >&AS_MESSAGE_LOG_FD 2>&1; then
+          at_cv_qt_build='ok, looks like Qt 3, release mode forced'
+        else
+          at_cv_qt_build=ko
+          echo "$as_me:$LINENO: failed program was:" >&AS_MESSAGE_LOG_FD
+          sed 's/^/| /' conftest.h >&AS_MESSAGE_LOG_FD
+          echo "$as_me:$LINENO: failed program was:" >&AS_MESSAGE_LOG_FD
+          sed 's/^/| /' conftest.cpp >&AS_MESSAGE_LOG_FD
+        fi # if make with Qt3-style #include and release mode forced.
+      fi # if make with Qt4-style #include and release mode forced.
+    fi # if make with Qt3-style #include.
+  fi # if make with Qt4-style #include.
+  ])dnl end: AC_CACHE_CHECK(at_cv_qt_build)
+
+  if test x"$at_cv_qt_build" = xko; then
+    AX_INSTEAD_IF([$4], [Cannot build a test Qt program])
+    break
+  fi
+  QT_VERSION_MAJOR=`echo "$at_cv_qt_build" | sed 's/[[^0-9]]*//g'`
+  AC_SUBST([QT_VERSION_MAJOR])
+
+  # This sed filter is applied after an expression of the form: /^FOO.*=/!d;
+  # It starts by removing the beginning of the line, removing references to
+  # SUBLIBS, removing unnecessary whitespaces at the beginning, and prefixes
+  # all variable uses by QT_.
+  qt_sed_filter='s///;
+                 s/$(SUBLIBS)//g;
+                 s/^ *//;
+                 s/\$(\(@<:@A-Z_@:>@@<:@A-Z_@:>@*\))/$(QT_\1)/g'
+
+  # Find the Makefile (qmake happens to generate a fake Makefile which invokes
+  # a Makefile.Debug or Makefile.Release). We we have both, we'll pick the
+  # Makefile.Release. The reason is that the main difference is that release
+  # uses -Os and debug -g. We can override -Os by passing another -O but we
+  # usually don't override -g.
+  if test -f Makefile.Release; then
+    at_mfile='Makefile.Release'
+  else
+    at_mfile='Makefile'
+  fi
+  if test -f $at_mfile; then :; else
+    AX_INSTEAD_IF([$4], [Cannot find the Makefile generated by qmake.])
+    break
+  fi
+
+  # Find the DEFINES of Qt (should have been named CPPFLAGS).
+  AC_CACHE_CHECK([for the DEFINES to use with Qt], [at_cv_env_QT_DEFINES],
+  [at_cv_env_QT_DEFINES=`sed "/^DEFINES@<:@^A-Z=@:>@*=/!d;$qt_sed_filter" $at_mfile`])
+  AC_SUBST([QT_DEFINES], [$at_cv_env_QT_DEFINES])
+
+  # Find the CFLAGS of Qt (We can use Qt in C?!)
+  AC_CACHE_CHECK([for the CFLAGS to use with Qt], [at_cv_env_QT_CFLAGS],
+  [at_cv_env_QT_CFLAGS=`sed "/^CFLAGS@<:@^A-Z=@:>@*=/!d;$qt_sed_filter" $at_mfile`])
+  AC_SUBST([QT_CFLAGS], [$at_cv_env_QT_CFLAGS])
+
+  # Find the CXXFLAGS of Qt.
+  AC_CACHE_CHECK([for the CXXFLAGS to use with Qt], [at_cv_env_QT_CXXFLAGS],
+  [at_cv_env_QT_CXXFLAGS=`sed "/^CXXFLAGS@<:@^A-Z=@:>@*=/!d;$qt_sed_filter" $at_mfile`])
+  AC_SUBST([QT_CXXFLAGS], [$at_cv_env_QT_CXXFLAGS])
+
+  # Find the INCPATH of Qt.
+  AC_CACHE_CHECK([for the INCPATH to use with Qt], [at_cv_env_QT_INCPATH],
+  [at_cv_env_QT_INCPATH=`sed "/^INCPATH@<:@^A-Z=@:>@*=/!d;$qt_sed_filter" $at_mfile`])
+  AC_SUBST([QT_INCPATH], [$at_cv_env_QT_INCPATH])
+
+  AC_SUBST([QT_CPPFLAGS], ["$at_cv_env_QT_DEFINES $at_cv_env_QT_INCPATH"])
+
+  # Find the LFLAGS of Qt (Should have been named LDFLAGS)
+  AC_CACHE_CHECK([for the LDFLAGS to use with Qt], [at_cv_env_QT_LDFLAGS],
+  [at_cv_env_QT_LDFLAGS=`sed "/^LFLAGS@<:@^A-Z=@:>@*=/!d;$qt_sed_filter" $at_mfile`])
+  AC_SUBST([QT_LFLAGS], [$at_cv_env_QT_LDFLAGS])
+  AC_SUBST([QT_LDFLAGS], [$at_cv_env_QT_LDFLAGS])
+
+  # Find the LIBS of Qt.
+  AC_CACHE_CHECK([for the LIBS to use with Qt], [at_cv_env_QT_LIBS],
+  [at_cv_env_QT_LIBS=`sed "/^LIBS@<:@^A-Z@:>@*=/!d;$qt_sed_filter" $at_mfile`
+   if test x$at_darwin = xyes; then
+     # Fix QT_LIBS: as of today Libtool (GNU Libtool 1.5.23a) doesn't handle
+     # -F properly. The "bug" has been fixed on 22 October 2006
+     # by Peter O'Gorman but we provide backward compatibility here.
+     at_cv_env_QT_LIBS=`echo "$at_cv_env_QT_LIBS" \
+                             | sed 's/^-F/-Wl,-F/;s/ -F/ -Wl,-F/g'`
+   fi
+  ])
+  AC_SUBST([QT_LIBS], [$at_cv_env_QT_LIBS])
+
+  cd .. && rm -rf conftest.dir
+
+  # Run the user code
+  $5
+
+  done  # end hack (useless for to be able to use break)
+])
+
+# AT_REQUIRE_QT_VERSION(QT_version, RUN-IF-FAILED, RUN-IF-OK)
+# -----------------------------------------------------------
+# Check (using qmake) that Qt's version "matches" QT_version.
+# Must be run AFTER AT_WITH_QT. Requires autoconf 2.60.
+#
+# RUN-IF-FAILED is arbitrary code to execute if Qt cannot be found or if any
+# problem happens.  If this argument is omitted, then AC_MSG_ERROR will be
+# called.  RUN-IF-OK is arbitrary code to execute if Qt was successfully found.
+AC_DEFUN([AT_REQUIRE_QT_VERSION],
+[ AC_PREREQ([2.60])
+  # this is a hack to get decent flow control with 'break'
+  for _qt_ignored in once; do
+
+  if test x"$QMAKE" = x; then
+    AX_INSTEAD_IF([$2],
+                  [\$QMAKE is empty.\
+  Did you invoke AT@&t at _WITH_QT before AT@&t at _REQUIRE_QT_VERSION?])
+    break
+  fi
+  AC_CACHE_CHECK([for Qt's version], [at_cv_QT_VERSION],
+  [echo "$as_me:$LINENO: Running $QMAKE --version:" >&AS_MESSAGE_LOG_FD
+  $QMAKE --version >&AS_MESSAGE_LOG_FD 2>&1
+  qmake_version_sed=['/^.*\([0-9]\.[0-9]\.[0-9]\).*$/!d;s//\1/']
+  at_cv_QT_VERSION=`$QMAKE --version 2>&1 | sed "$qmake_version_sed"`])
+  if test x"$at_cv_QT_VERSION" = x; then
+    AX_INSTEAD_IF([$2], [Cannot detect Qt's version.])
+    break
+  fi
+  AC_SUBST([QT_VERSION], [$at_cv_QT_VERSION])
+  AS_VERSION_COMPARE([$QT_VERSION], [$1],
+    [AX_INSTEAD_IF([$2; break; ], [This package requires Qt $1 or above.])])
+
+  # Run the user code
+  $3
+
+  done  # end hack (useless for to be able to use break)
+])
+
+# _AT_TWEAK_PRO_FILE(QT_VAR, VALUE)
+# ---------------------------
+# @internal. Tweak the variable QT_VAR in the .pro.
+# VALUE is an IFS-separated list of value and each value is rewritten
+# as follows:
+#   +value  => QT_VAR += value
+#   -value  => QT_VAR -= value
+#    value  => QT_VAR += value
+AC_DEFUN([_AT_TWEAK_PRO_FILE],
+[ # Tweak the value of $1 in the .pro file for $2.
+
+  qt_conf=''
+  for at_mod in $2; do
+    at_mod=`echo "$at_mod" | sed 's/^-//; tough
+                                  s/^+//; beef
+                                  :ough
+                                  s/^/$1 -= /;n
+                                  :eef
+                                  s/^/$1 += /'`
+    qt_conf="$qt_conf
+$at_mod"
+  done
+  echo "$qt_conf" | sed 1d >>"$pro_file"
+])
diff --git a/aux_build/autotroll.mk b/aux_build/autotroll.mk
new file mode 100644
index 0000000..202693c
--- /dev/null
+++ b/aux_build/autotroll.mk
@@ -0,0 +1,108 @@
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# See autotroll.m4 :)
+
+
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+DISTCLEANFILES = $(BUILT_SOURCES)
diff --git a/config/compile b/config/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/config/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/config.guess b/config/config.guess
new file mode 100755
index 0000000..666c5ad
--- /dev/null
+++ b/config/config.guess
@@ -0,0 +1,1511 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_MACHINE}" in
+    i?86)
+	test -z "$VENDOR" && VENDOR=pc
+	;;
+    *)
+	test -z "$VENDOR" && VENDOR=unknown
+	;;
+esac
+test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-${VENDOR}-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-${VENDOR}-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-${VENDOR}-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[456])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-${VENDOR}-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-${VENDOR}-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-${VENDOR}-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-${VENDOR}-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-${VENDOR}-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-${VENDOR}-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-${VENDOR}-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-${VENDOR}-linux-gnu
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
+	  PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
+	  *)    echo hppa-${VENDOR}-linux-gnu ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR}-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR}-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-${VENDOR}-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-${VENDOR}-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-${VENDOR}-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-${VENDOR}-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-${VENDOR}-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-${VENDOR}-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-${VENDOR}-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-${VENDOR}-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-${VENDOR}-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/config.sub b/config/config.sub
new file mode 100755
index 0000000..2a55a50
--- /dev/null
+++ b/config/config.sub
@@ -0,0 +1,1705 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze)
+		os=
+		basic_machine=$1
+		;;
+        -bluegene*)
+	        os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+        cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+        microblaze)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+        -auroraux)
+	        os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+        mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/depcomp b/config/depcomp
new file mode 100755
index 0000000..04701da
--- /dev/null
+++ b/config/depcomp
@@ -0,0 +1,530 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/install-sh b/config/install-sh
new file mode 100755
index 0000000..4d4a951
--- /dev/null
+++ b/config/install-sh
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-05-14.22
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/ltmain.sh b/config/ltmain.sh
new file mode 100755
index 0000000..a72f2fd
--- /dev/null
+++ b/config/ltmain.sh
@@ -0,0 +1,8406 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+#     --config             show all configuration variables
+#     --debug              enable verbose shell tracing
+# -n, --dry-run            display commands without modifying any files
+#     --features           display basic configuration information and exit
+#     --mode=MODE          use operation mode MODE
+#     --preserve-dup-deps  don't remove duplicate dependency libraries
+#     --quiet, --silent    don't print informational messages
+#     --tag=TAG            use configuration variables from tag TAG
+# -v, --verbose            print informational messages (default)
+#     --version            print version information
+# -h, --help               print short or long help message
+#
+# MODE must be one of the following:
+#
+#       clean              remove files from the build directory
+#       compile            compile a source file into a libtool object
+#       execute            automatically set library path, then run a program
+#       finish             complete the installation of libtool libraries
+#       install            install libraries or executables
+#       link               create a library or an executable
+#       uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#       host-triplet:	$host
+#       shell:		$SHELL
+#       compiler:		$LTCC
+#       compiler flags:		$LTCFLAGS
+#       linker:		$LD (gnu? $with_gnu_ld)
+#       $progname:		(GNU libtool) 2.2.6b
+#       automake:		$automake_version
+#       autoconf:		$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.6b
+TIMESTAMP=""
+package_revision=1.3017
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+  -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+    case $1 in
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+    esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "X$1" | $Xsed \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED -n '/^# Usage:/,/# -h/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	p
+     }' < "$progpath"
+    exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell, and then maybe $ECHO will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $ECHO "enable shared libraries"
+    else
+      $ECHO "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $ECHO "enable static libraries"
+    else
+      $ECHO "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
+    ;;
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
+    ;;
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
+    ;;
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
+    ;;
+  install|instal|insta|inst|ins|in|i)
+    shift; set dummy --mode install ${1+"$@"}; shift
+    ;;
+  link|lin|li|l)
+    shift; set dummy --mode link ${1+"$@"}; shift
+    ;;
+  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
+    ;;
+  esac
+
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+      --config)		func_config					;;
+
+      --debug)		preserve_args="$preserve_args $opt"
+			func_echo "enabling shell trace mode"
+			opt_debug='set -x'
+			$opt_debug
+			;;
+
+      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			execute_dlfiles="$execute_dlfiles $1"
+			shift
+			;;
+
+      --dry-run | -n)	opt_dry_run=:					;;
+      --features)       func_features					;;
+      --finish)		mode="finish"					;;
+
+      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			case $1 in
+			  # Valid mode arguments:
+			  clean)	;;
+			  compile)	;;
+			  execute)	;;
+			  finish)	;;
+			  install)	;;
+			  link)		;;
+			  relink)	;;
+			  uninstall)	;;
+
+			  # Catch anything else as an error
+			  *) func_error "invalid argument for $opt"
+			     exit_cmd=exit
+			     break
+			     ;;
+		        esac
+
+			mode="$1"
+			shift
+			;;
+
+      --preserve-dup-deps)
+			opt_duplicate_deps=:				;;
+
+      --quiet|--silent)	preserve_args="$preserve_args $opt"
+			opt_silent=:
+			;;
+
+      --verbose| -v)	preserve_args="$preserve_args $opt"
+			opt_silent=false
+			;;
+
+      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			preserve_args="$preserve_args $opt $1"
+			func_enable_tag "$1"	# tagname is set here
+			shift
+			;;
+
+      # Separate optargs to long options:
+      -dlopen=*|--mode=*|--tag=*)
+			func_opt_split "$opt"
+			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+			shift
+			;;
+
+      -\?|-h)		func_usage					;;
+      --help)		opt_help=:					;;
+      --version)	func_version					;;
+
+      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
+
+      *)		nonopt="$opt"
+			break
+			;;
+    esac
+  done
+
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
+
+  # Having warned about all mis-specified options, bail out if
+  # anything was wrong.
+  $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+$opt_help || {
+  # Sanity checks first:
+  func_check_version_match
+
+  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+    func_fatal_configuration "not configured to build any kind of library"
+  fi
+
+  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+  # Darwin sucks
+  eval std_shrext=\"$shrext_cmds\"
+
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    func_error "unrecognized option \`-dlopen'"
+    $ECHO "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+	for lalib_p_l in 1 2 3 4
+	do
+	    read lalib_p_line
+	    case "$lalib_p_line" in
+		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+	    esac
+	done
+	exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_ltwrapper_scriptname_result=""
+    if func_ltwrapper_executable_p "$1"; then
+	func_dirname_and_basename "$1" "" "."
+	func_stripname '' '.exe' "$func_basename_result"
+	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)	. "$1" ;;
+    *)		. "./$1" ;;
+    esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+        func_quote_for_eval "$arg"
+	CC_quoted="$CC_quoted $func_quote_for_eval_result"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	      # Double-quote args containing other shell metacharacters.
+	      func_quote_for_eval "$arg"
+	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	    done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  func_echo "unable to infer tagged configuration"
+	  func_fatal_error "specify a tag with \`--tag'"
+#	else
+#	  func_verbose "using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  test -n "$libobj" && \
+	    func_fatal_error "you cannot specify \`-o' more than once"
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+	  continue
+	  ;;
+
+	-shared | -static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+	    func_quote_for_eval "$arg"
+	    lastarg="$lastarg $func_quote_for_eval_result"
+	  done
+	  IFS="$save_ifs"
+	  func_stripname ' ' '' "$lastarg"
+	  lastarg=$func_stripname_result
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	*)
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+	func_basename "$srcfile"
+	libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	continue
+	;;
+
+      -static)
+	build_libtool_libs=no
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+      removelist="$removelist $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    removelist="$removelist $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+	suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile$pie_flag"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
+
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
+
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
+
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
+
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
+    esac
+
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
+
+    exit $?
+}
+
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && \
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+	;;
+
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if func_ltwrapper_script_p "$file"; then
+	  func_source "$file"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	elif func_ltwrapper_executable_p "$file"; then
+	  func_ltwrapper_scriptname "$file"
+	  func_source "$func_ltwrapper_scriptname_result"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_quote_for_eval "$file"
+      args="$args $func_quote_for_eval_result"
+    done
+
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+	      else
+		$lt_unset $lt_var
+	      fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	$ECHO "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    $ECHO "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $ECHO "   $libdir"
+    done
+    $ECHO
+    $ECHO "If you ever happen to want to link against installed libraries"
+    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $ECHO "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $ECHO "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $ECHO "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $ECHO "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $ECHO "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $ECHO
+
+    $ECHO "See any operating system documentation about shared libraries for"
+    case $host in
+      solaris2.[6789]|solaris2.1[0-9])
+        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	$ECHO "pages."
+	;;
+      *)
+        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+        ;;
+    esac
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    install_prog="$install_prog$func_quote_for_eval_result"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o)
+	prev=$arg
+	;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	func_fatal_help "no file or destination specified"
+      else
+	func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+	func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
+
+	library_names=
+	old_library=
+	relink_command=
+	func_source "$file"
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  test "$inst_prefix_dir" = "$destdir" && \
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  func_warning "relinking \`$file'"
+	  func_show_eval "$relink_command" \
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names; shift
+	if test -n "$1"; then
+	  realname="$1"
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+	      'exit $?'
+	  tstripme="$stripme"
+	  case $host_os in
+	  cygwin* | mingw* | pw32* | cegcc*)
+	    case $realname in
+	    *.dll.a)
+	      tstripme=""
+	      ;;
+	    esac
+	    ;;
+	  esac
+	  if test -n "$tstripme" && test -n "$striplib"; then
+	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      test "$linkname" != "$realname" \
+		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  func_execute_cmds "$postinstall_cmds" 'exit $?'
+	fi
+
+	# Install the pseudo-library for information purposes.
+	func_basename "$file"
+	name="$func_basename_result"
+	instname="$dir/$name"i
+	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  func_lo2o "$destfile"
+	  staticdest=$func_lo2o_result
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	test -n "$destfile" && \
+	  func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  func_lo2o "$file"
+	  staticobj=$func_lo2o_result
+	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      func_stripname '' '.exe' "$file"
+	      file=$func_stripname_result
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin* | *mingw*)
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      wrapper=$func_ltwrapper_scriptname_result
+	    else
+	      func_stripname '' '.exe' "$file"
+	      wrapper=$func_stripname_result
+	    fi
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if func_ltwrapper_script_p "$wrapper"; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  func_source "$wrapper"
+
+	  # Check the variables that should have been set.
+	  test -z "$generated_by_libtool_version" && \
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      func_source "$lib"
+	    fi
+	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  func_source "$wrapper"
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    $opt_dry_run || {
+	      if test "$finalize" = yes; then
+	        tmpdir=`func_mktempdir`
+		func_basename "$file$stripped_ext"
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
+	        # Replace the output file specification.
+	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	        $opt_silent || {
+	          func_quote_for_expand "$relink_command"
+		  eval "func_echo $func_quote_for_expand_result"
+	        }
+	        if eval "$relink_command"; then :
+	          else
+		  func_error "error: relink \`$file' with the above command before installing it"
+		  $opt_dry_run || ${RM}r "$tmpdir"
+		  continue
+	        fi
+	        file="$outputname"
+	      else
+	        func_warning "cannot relink \`$file'"
+	      fi
+	    }
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
+	  ;;
+	esac
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
+	fi
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	my_dlsyms="${my_outputname}S.c"
+      else
+	func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+	# Discover the nlist of each of the dlfiles.
+	nlist="$output_objdir/${my_outputname}.nm"
+
+	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+	# Parse the name list into a source file.
+	func_verbose "creating $output_objdir/$my_dlsyms"
+
+	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
+
+	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+	  # Add our own program objects to the symbol list.
+	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	  for progfile in $progfiles; do
+	    func_verbose "extracting global C symbols from \`$progfile'"
+	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -n "$exclude_expsyms"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  if test -n "$export_symbols_regex"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  # Prepare the list of exported symbols
+	  if test -z "$export_symbols"; then
+	    export_symbols="$output_objdir/$outputname.exp"
+	    $opt_dry_run || {
+	      $RM $export_symbols
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      case $host in
+	      *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+	        ;;
+	      esac
+	    }
+	  else
+	    $opt_dry_run || {
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	      case $host in
+	        *cygwin | *mingw* | *cegcc* )
+	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+	          ;;
+	      esac
+	    }
+	  fi
+	fi
+
+	for dlprefile in $dlprefiles; do
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_basename "$dlprefile"
+	  name="$func_basename_result"
+	  $opt_dry_run || {
+	    eval '$ECHO ": $name " >> "$nlist"'
+	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	  }
+	done
+
+	$opt_dry_run || {
+	  # Make sure we have at least an empty file.
+	  test -f "$nlist" || : > "$nlist"
+
+	  if test -n "$exclude_expsyms"; then
+	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	    $MV "$nlist"T "$nlist"
+	  fi
+
+	  # Try sorting and uniquifying the output.
+	  if $GREP -v "^: " < "$nlist" |
+	      if sort -k 3 </dev/null >/dev/null 2>&1; then
+		sort -k 3
+	      else
+		sort +2
+	      fi |
+	      uniq > "$nlist"S; then
+	    :
+	  else
+	    $GREP -v "^: " < "$nlist" > "$nlist"S
+	  fi
+
+	  if test -f "$nlist"S; then
+	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+	  else
+	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
+
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+"
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc* )
+	    $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs.  */"
+	    lt_dlsym_const= ;;
+	  *osf5*)
+	    echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+	    lt_dlsym_const= ;;
+	  *)
+	    lt_dlsym_const=const ;;
+	  esac
+
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
+
+	  case $need_lib_prefix in
+	  no)
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  *)
+	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  esac
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
+
+	pic_flag_for_symtable=
+	case "$compile_command " in
+	*" -static "*) ;;
+	*)
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+	  *-*-hpux*)
+	    pic_flag_for_symtable=" $pic_flag"  ;;
+	  *)
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
+	    fi
+	    ;;
+	  esac
+	  ;;
+	esac
+	symtab_cflags=
+	for arg in $LTCFLAGS; do
+	  case $arg in
+	  -pie | -fpie | -fPIE) ;;
+	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  esac
+	done
+
+	# Now compile the dynamic symbol file.
+	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+	# Transform the symbol file into the correct name.
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	case $host in
+	*cygwin* | *mingw* | *cegcc* )
+	  if test -f "$output_objdir/$my_outputname.def"; then
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	  else
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  fi
+	  ;;
+	*)
+	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  ;;
+	esac
+	;;
+      *)
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
+
+      # Nullify the symbol file.
+      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+    fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 |
+	$SED -n -e '
+	    1,100{
+		/ I /{
+		    s,.*,import,
+		    p
+		    q
+		}
+	    }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  func_arith $extracted_serial + 1
+	  extracted_serial=$func_arith_result
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+	func_verbose "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	$opt_dry_run || {
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename "$darwin_archive"`
+	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+	  if test -n "$darwin_arches"; then
+	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      $LIPO -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    $RM -rf unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd $darwin_orig_dir
+	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	} # !$opt_dry_run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+	;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+	func_emit_wrapper_part1_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part1_arg1=$1
+	fi
+
+	$ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    ECHO=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$ECHO works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$ECHO will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$ECHO "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+	func_emit_wrapper_part2_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part2_arg1=$1
+	fi
+
+	$ECHO "\
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+	  $ECHO "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$ECHO \"\$relink_command_output\" >&2
+	$RM \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+	else
+	  $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2* | *-cegcc*)
+	  $ECHO "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $ECHO "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_arg1=$1
+	fi
+
+	# split this up so that func_emit_cwrapperexe_src
+	# can call each part independently.
+	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin.  Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+  func_to_host_path_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        case $build in
+          *mingw* ) # actually, msys
+            # awkward: cmd appends spaces to result
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_path_tmp1=`cygpath -w "$1"`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # Unfortunately, winepath does not exit with a non-zero
+            # error code, so we are forced to check the contents of
+            # stdout. On the other hand, if the command is not
+            # found, the shell will set an exit code of 127 and print
+            # *an error message* to stdout. So we must check for both
+            # error code of zero AND non-empty stdout, which explains
+            # the odd construction:
+            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+                $SED -e "$lt_sed_naive_backslashify"`
+            else
+              # Allow warning below.
+              func_to_host_path_result=""
+            fi
+            ;;
+        esac
+        if test -z "$func_to_host_path_result" ; then
+          func_error "Could not determine host path corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback:
+          func_to_host_path_result="$1"
+        fi
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+  func_to_host_pathlist_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        # Remove leading and trailing path separator characters from
+        # ARG. msys behavior is inconsistent here, cygpath turns them
+        # into '.;' and ';.', and winepath ignores them completely.
+        func_to_host_pathlist_tmp2="$1"
+        # Once set for this call, this variable should not be
+        # reassigned. It is used in tha fallback case.
+        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+          $SED -e 's|^:*||' -e 's|:*$||'`
+        case $build in
+          *mingw* ) # Actually, msys.
+            # Awkward: cmd appends spaces to result.
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # unfortunately, winepath doesn't convert pathlists
+            func_to_host_pathlist_result=""
+            func_to_host_pathlist_oldIFS=$IFS
+            IFS=:
+            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+              IFS=$func_to_host_pathlist_oldIFS
+              if test -n "$func_to_host_pathlist_f" ; then
+                func_to_host_path "$func_to_host_pathlist_f"
+                if test -n "$func_to_host_path_result" ; then
+                  if test -z "$func_to_host_pathlist_result" ; then
+                    func_to_host_pathlist_result="$func_to_host_path_result"
+                  else
+                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+                  fi
+                fi
+              fi
+              IFS=:
+            done
+            IFS=$func_to_host_pathlist_oldIFS
+            ;;
+        esac
+        if test -z "$func_to_host_pathlist_result" ; then
+          func_error "Could not determine the host path(s) corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback. This may break if $1 contains DOS-style drive
+          # specifications. The fix is not to complicate the expression
+          # below, but for the user to provide a working wine installation
+          # with winepath so that path translation in the cross-to-mingw
+          # case works properly.
+          lt_replace_pathsep_nix_to_dos="s|:|;|g"
+          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+            $SED -e "$lt_replace_pathsep_nix_to_dos"`
+        fi
+        # Now, add the leading and trailing path separators back
+        case "$1" in
+          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+            ;;
+        esac
+        case "$1" in
+          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+            ;;
+        esac
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+	cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+#  define HAVE_SETENV
+#  ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+#  endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+    va_list args;
+    va_start (args, fmt);
+    (void) vfprintf (stderr, fmt, args);
+    va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+	    func_emit_wrapper_part1 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+	    cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+	    func_emit_wrapper_part2 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+
+	    cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_pathlist "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_pathlist "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+	    else
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+	    fi
+
+
+	    cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
+
+static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
+  /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
+  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
+  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
+
+	    cat <<"EOF"
+	  printf ("%s", script_text_part1);
+	  printf ("%s", script_text_part2);
+	  return 0;
+	}
+    }
+
+  newargz = XMALLOC (char *, argc + 1);
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+			  tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+			  actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+			  target_name));
+EOF
+
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
+
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+        {
+          if (argv[i][env_set_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_set_opt_len + 1;
+              lt_opt_process_env_set (p);
+            }
+          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_set (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_set_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+        {
+          if (argv[i][env_prepend_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_prepend_opt_len + 1;
+              lt_opt_process_env_prepend (p);
+            }
+          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_prepend_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+        {
+          if (argv[i][env_append_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_append_opt_len + 1;
+              lt_opt_process_env_append (p);
+            }
+          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_append (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_append_opt);
+          continue;
+        }
+      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal ("Unrecognized option in %s namespace: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  for (i = 0; i < newargc; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+    }
+
+EOF
+
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
+
+	    cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
+
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+	return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+	{
+	  concat_name = xstrdup (wrapper);
+	  if (check_executable (concat_name))
+	    return concat_name;
+	  XFREE (concat_name);
+	}
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+	has_slash = 1;
+	break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+	{
+	  for (p = path; *p; p = p_next)
+	    {
+	      const char *q;
+	      size_t p_len;
+	      for (q = p; *q; q++)
+		if (IS_PATH_SEPARATOR (*q))
+		  break;
+	      p_len = q - p;
+	      p_next = (*q == '\0' ? q : q + 1);
+	      if (p_len == 0)
+		{
+		  /* empty path: current directory */
+		  if (getcwd (tmp, LT_PATHMAX) == NULL)
+		    lt_fatal ("getcwd failed");
+		  tmp_len = strlen (tmp);
+		  concat_name =
+		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, tmp, tmp_len);
+		  concat_name[tmp_len] = '/';
+		  strcpy (concat_name + tmp_len + 1, wrapper);
+		}
+	      else
+		{
+		  concat_name =
+		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, p, p_len);
+		  concat_name[p_len] = '/';
+		  strcpy (concat_name + p_len + 1, wrapper);
+		}
+	      if (check_executable (concat_name))
+		return concat_name;
+	      XFREE (concat_name);
+	    }
+	}
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+			      tmp_pathspec));
+      if (lstat (tmp_pathspec, &s) == 0)
+	{
+	  if (S_ISLNK (s.st_mode) != 0)
+	    {
+	      has_symlinks = 1;
+	      break;
+	    }
+
+	  /* search backwards for last DIR_SEPARATOR */
+	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    p--;
+	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    {
+	      /* no more DIR_SEPARATORS left */
+	      break;
+	    }
+	  *p = '\0';
+	}
+      else
+	{
+	  char *errstr = strerror (errno);
+	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+	}
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+	*str = '\0';
+    }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+	       const char *message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+  const char *p;
+  int len;
+  if (!arg || !*arg)
+    return 1;
+
+  p = strchr (arg, (int)'=');
+
+  if (!p)
+    return 1;
+
+  *value = xstrdup (++p);
+
+  len = strlen (arg) - strlen (*value);
+  *name = XMALLOC (char, len);
+  strncpy (*name, arg, len-1);
+  (*name)[len - 1] = '\0';
+
+  return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+    }
+
+  lt_setenv (name, value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 0);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 1);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	break
+	;;
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    func_warning "complete static linking is impossible in this configuration"
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  func_append compile_command " @OUTPUT@"
+	  func_append finalize_command " @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    func_append compile_command " @SYMFILE@"
+	    func_append finalize_command " @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  test -f "$arg" \
+	    || func_fatal_error "symbol file \`$arg' does not exist"
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+		*" $qarg.ltframework "*) ;;
+		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		   ;;
+	      esac
+	      ;;
+	  esac
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat "$save_arg"`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		func_source "$arg"
+
+		if test -z "$pic_object" ||
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
+		fi
+
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  func_append libobjs " $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  func_append non_pic_objects " $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if $opt_dry_run; then
+		  # Extract subdirectory from the argument.
+		  func_dirname "$arg" "/" ""
+		  xdir="$func_dirname_result"
+
+		  func_lo2o "$arg"
+		  pic_object=$xdir$objdir/$func_lo2o_result
+		  non_pic_object=$xdir$func_lo2o_result
+		  func_append libobjs " $pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+	        else
+		  func_fatal_error "\`$arg' is not a valid libtool object"
+		fi
+	      fi
+	    done
+	  else
+	    func_fatal_error "link input file \`$arg' does not exist"
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    func_fatal_error "only absolute run-paths are allowed"
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  weak_libs="$weak_libs $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  func_append compile_command " $wl$qarg"
+	  func_append finalize_command " $wl$qarg"
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  # See comment for -static flag below, for more details.
+	  func_append compile_command " $link_static_flag"
+	  func_append finalize_command " $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  func_fatal_error "more than one -exported-symbols argument is not allowed"
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+	prev=framework
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	func_stripname '-L' '' "$arg"
+	dir=$func_stripname_result
+	if test -z "$dir"; then
+	  if test "$#" -gt 0; then
+	    func_fatal_error "require no space between \`-L' and \`$1'"
+	  else
+	    func_fatal_error "need path for \`-L' option"
+	  fi
+	fi
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  test -z "$absdir" && \
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  ::) dllsearchpath=$dir;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	prev=xcompiler
+	continue
+	;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+	esac
+	continue
+	;;
+
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	func_stripname '-R' '' "$arg"
+	dir=$func_stripname_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -weak)
+        prev=weak
+	continue
+	;;
+
+      -Wc,*)
+	func_stripname '-Wc,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Wl,*)
+	func_stripname '-Wl,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+	  linker_flags="$linker_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  func_source "$arg"
+
+	  if test -z "$pic_object" ||
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    func_append libobjs " $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    func_append non_pic_objects " $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if $opt_dry_run; then
+	    # Extract subdirectory from the argument.
+	    func_dirname "$arg" "/" ""
+	    xdir="$func_dirname_result"
+
+	    func_lo2o "$arg"
+	    pic_object=$xdir$objdir/$func_lo2o_result
+	    non_pic_object=$xdir$func_lo2o_result
+	    func_append libobjs " $pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_duplicate_deps ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+	passes="conv dlpreopen link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+	## FIXME: Find the place where the list is rebuilt in the wrong
+	##        order, and fix it there properly
+        tmp_deplibs=
+	for deplib in $deplibs; do
+	  tmp_deplibs="$deplib $tmp_deplibs"
+	done
+	deplibs="$tmp_deplibs"
+      fi
+
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+	# Collect and forward deplibs of preopened libtool libs
+	for lib in $dlprefiles; do
+	  # Ignore non-libtool-libs
+	  dependency_libs=
+	  case $lib in
+	  *.la)	func_source "$lib" ;;
+	  esac
+
+	  # Collect preopened libtool deplibs, except any this library
+	  # has declared as weak libs
+	  for deplib in $dependency_libs; do
+            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+	    case " $weak_libs " in
+	    *" $deplib_base "*) ;;
+	    *) deplibs="$deplibs $deplib" ;;
+	    esac
+	  done
+	done
+	libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    continue
+	  fi
+	  func_stripname '-l' '' "$deplib"
+	  name=$func_stripname_result
+	  if test "$linkmode" = lib; then
+	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+	  else
+	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+	  fi
+	  for searchdir in $searchdirs; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if func_lalib_p "$lib"; then
+		  library_names=
+		  old_library=
+		  func_source "$lib"
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    func_dirname "$lib" "" "."
+		    ladir="$func_dirname_result"
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+		;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    func_stripname '-R' '' "$deplib"
+	    dir=$func_stripname_result
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    # Linking convenience modules into shared libraries is allowed,
+	    # but linking other static libraries is non-portable.
+	    case " $dlpreconveniencelibs " in
+	    *" $deplib "*) ;;
+	    *)
+	      valid_a_lib=no
+	      case $deplibs_check_method in
+		match_pattern*)
+		  set dummy $deplibs_check_method; shift
+		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		    valid_a_lib=yes
+		  fi
+		;;
+		pass_all)
+		  valid_a_lib=yes
+		;;
+	      esac
+	      if test "$valid_a_lib" != yes; then
+		$ECHO
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
+		$ECHO "*** that it is just a static archive that I should not use here."
+	      else
+		$ECHO
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      fi
+	      ;;
+	    esac
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$lib" \
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+	func_dirname "$lib" "" "."
+	ladir="$func_dirname_result"
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	inherited_linker_flags=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	func_source "$lib"
+
+	# Convert "-framework foo" to "foo.ltframework"
+	if test -n "$inherited_linker_flags"; then
+	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      func_fatal_error "cannot find name of link library for \`$lib'"
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    func_fatal_error "\`$lib' is not a convenience library"
+	  fi
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    deplibs="$deplib $deplibs"
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  func_fatal_error "cannot find name of link library for \`$lib'"
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "passing it literally to the linker, although it might fail"
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	func_basename "$lib"
+	laname="$func_basename_result"
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    func_warning "library \`$lib' was moved."
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	func_stripname 'lib' '.la' "$laname"
+	name=$func_stripname_result
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	    # Keep a list of preopened convenience libraries to check
+	    # that they are being used correctly in the link pass.
+	    test -z "$libdir" && \
+		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) func_stripname '-L' '' "$deplib"
+	         newlib_search_path="$newlib_search_path $func_stripname_result"
+		 ;;
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath:" in
+	      *"$absdir:"*) ;;
+	      *) temp_rpath="$temp_rpath$absdir:" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc*)
+	      # No point in relinking DLLs because paths are not encoded
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=yes
+	    fi
+	    ;;
+	  esac
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on some
+	  # systems (darwin).  Don't bleat about dlopened modules though!
+	  dlopenmodule=""
+	  for dlpremoduletest in $dlprefiles; do
+	    if test "X$dlpremoduletest" = "X$lib"; then
+	      dlopenmodule="$dlpremoduletest"
+	      break
+	    fi
+	  done
+	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+	    $ECHO
+	    if test "$linkmode" = prog; then
+	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $ECHO "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    shift
+	    realname="$1"
+	    shift
+	    libname=`eval "\\$ECHO \"$libname_spec\""`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw* | *cegcc*)
+	        func_arith $current - $age
+		major=$func_arith_result
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    func_basename "$soroot"
+	    soname="$func_basename_result"
+	    func_stripname 'lib' '.dll' "$soname"
+	    newlib=libimp-$func_stripname_result.a
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      func_verbose "generating import library for \`$soname'"
+	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a (non-dlopened) module then we can not
+		    # link against it, someone is ignoring the earlier warnings
+		    if /usr/bin/file -L $add 2> /dev/null |
+			 $GREP ": [^:]* bundle" >/dev/null ; then
+		      if test "X$dlopenmodule" != "X$lib"; then
+			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
+			if test -z "$old_library" ; then
+			  $ECHO
+			  $ECHO "*** And there doesn't seem to be a static archive available"
+			  $ECHO "*** The link will probably fail, sorry"
+			else
+			  add="$dir/$old_library"
+			fi
+		      elif test -n "$old_library"; then
+			add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes &&
+	         test "$hardcode_direct_absolute" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      func_fatal_configuration "unsupported hardcode properties"
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes &&
+		 test "$hardcode_minus_L" != yes &&
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes &&
+	       test "$hardcode_direct_absolute" = no; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+		add="$inst_prefix_dir$libdir/$linklib"
+	      else
+		add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $ECHO
+	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
+	    $ECHO "*** I have the capability to make that library automatically link in when"
+	    $ECHO "*** you link to this library.  But I can only do this if you have a"
+	    $ECHO "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $ECHO "*** But as you try to build a module library, libtool will still create "
+	      $ECHO "*** a static module, that should work as long as the dlopening application"
+	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$ECHO
+		$ECHO "*** However, this would only work if libtool was able to extract symbol"
+		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$ECHO "*** not find such a program.  So, this module is probably useless."
+		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) func_stripname '-R' '' "$libdir"
+	           temp_xrpath=$func_stripname_result
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+	        func_dirname "$deplib" "" "."
+		dir="$func_dirname_result"
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if $GREP "^installed=no" $deplib > /dev/null; then
+		case $host in
+		*-*-darwin*)
+		  depdepl=
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+		      path=
+		    fi
+		  fi
+		  ;;
+		*)
+		  path="-L$absdir/$objdir"
+		  ;;
+		esac
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  test -z "$libdir" && \
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  test "$absdir" != "$libdir" && \
+		    func_warning "\`$deplib' seems to be moved"
+
+		  path="-L$absdir"
+		fi
+		;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
+	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+	else
+	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	fi
+      fi
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+	func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	func_stripname 'lib' '.la' "$outputname"
+	name=$func_stripname_result
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  func_stripname '' '.la' "$outputname"
+	  name=$func_stripname_result
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  func_stripname '' '.la' "$outputname"
+	  libname=$func_stripname_result
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	else
+	  $ECHO
+	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+	  $ECHO "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	test -n "$vinfo" && \
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+	test -n "$release" && \
+	  func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	shift
+	IFS="$save_ifs"
+
+	test -n "$7" && \
+	  func_fatal_help "too many parameters to \`-version-info'"
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$1"
+	  number_minor="$2"
+	  number_revision="$3"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$1"
+	  revision="$2"
+	  age="$3"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  func_arith $current + 1
+	  minor_current=$func_arith_result
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    func_arith $current - $age
+	  else
+	    func_arith $current - $age + 1
+	  fi
+	  major=$func_arith_result
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    func_arith $revision - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    func_arith $current - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	qnx)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  func_arith $current - $age
+	  major=$func_arith_result
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      libobjs="$libobjs $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$ECHO "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext | *.gcno)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+		 then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	test -n "$removelist" && \
+	  func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $opt_dry_run || $RM conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+		fi
+		if test -n "$i" ; then
+		  libname=`eval "\\$ECHO \"$libname_spec\""`
+		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		  set dummy $deplib_matches; shift
+		  deplib_match=$1
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $ECHO
+		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		    $ECHO "*** I have the capability to make that library automatically link in when"
+		    $ECHO "*** you link to this library.  But I can only do this if you have a"
+		    $ECHO "*** shared version of the library, which I believe you do not have"
+		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $RM conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval "\\$ECHO \"$libname_spec\""`
+		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		    set dummy $deplib_matches; shift
+		    deplib_match=$1
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $ECHO
+		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		      $ECHO "*** I have the capability to make that library automatically link in when"
+		      $ECHO "*** you link to this library.  But I can only do this if you have a"
+		      $ECHO "*** shared version of the library, which you do not appear to have"
+		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $ECHO
+		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $ECHO "*** make it link in!  You will probably need to install it or some"
+		  $ECHO "*** library that it depends on before this library will be fully"
+		  $ECHO "*** functional.  Installing it before continuing would be even better."
+		fi
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null |
+			 $GREP " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+			 $SED -e 10q |
+			 $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$ECHO
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method; shift
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+		       $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$ECHO
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+	    done
+	  fi
+	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
+	     $GREP . >/dev/null; then
+	    $ECHO
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $ECHO "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library with the System framework
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $ECHO
+	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $ECHO "*** a static module, that should work as long as the dlopening"
+	    $ECHO "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $ECHO
+	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
+	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $ECHO "*** not find such a program.  So, this module is probably useless."
+	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
+	    $ECHO "*** automatically added whenever a program is linked with this library"
+	    $ECHO "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $ECHO
+	      $ECHO "*** Since this library must not contain undefined symbols,"
+	      $ECHO "*** because either the platform does not support them or"
+	      $ECHO "*** it was explicitly requested with -no-undefined,"
+	      $ECHO "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+	*-*-darwin*)
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  ;;
+      esac
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	shift
+	realname="$1"
+	shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	test "X$libobjs" = "X " && libobjs=
+
+	delfiles=
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+	  export_symbols="$output_objdir/$libname.uexp"
+	  delfiles="$delfiles $export_symbols"
+	fi
+
+	orig_export_symbols=
+	case $host_os in
+	cygwin* | mingw* | cegcc*)
+	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+	    # exporting using user supplied symfile
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	      # and it's NOT already a .def file. Must figure out
+	      # which of the given symbols are data symbols and tag
+	      # them as such. So, trigger use of export_symbols_cmds.
+	      # export_symbols gets reassigned inside the "prepare
+	      # the list of exported symbols" if statement, so the
+	      # include_expsyms logic still works.
+	      orig_export_symbols="$export_symbols"
+	      export_symbols=
+	      always_export_symbols=yes
+	    fi
+	  fi
+	  ;;
+	esac
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $opt_dry_run || $RM $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      func_len " $cmd"
+	      len=$func_len_result
+	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "using reloadable object file for export list..."
+		skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	fi
+
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	  # The given exports_symbols file has to be filtered, so filter it.
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # though. Also, the filter scales superlinearly with the number of
+	  # global variables. join(1) would be nice here, but unfortunately
+	  # isn't a blessed tool.
+	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	  export_symbols=$output_objdir/$libname.def
+	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+	  case " $convenience " in
+	  *" $test_deplib "*) ;;
+	  *)
+	    tmp_deplibs="$tmp_deplibs $test_deplib"
+	    ;;
+	  esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec" &&
+	    test "$compiler_needs_object" = yes &&
+	    test -z "$libobjs"; then
+	    # extract the archives, so we have objects to list.
+	    # TODO: could optimize this to just extract one archive.
+	    whole_archive_flag_spec=
+	  fi
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    eval test_cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
+	  else
+	    eval test_cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   func_len " $test_cmds" &&
+	   len=$func_len_result &&
+	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise
+	  # or, if using GNU ld and skipped_export is not :, use a linker
+	  # script.
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  last_robj=
+	  k=1
+
+	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
+	    func_verbose "creating GNU ld script: $output"
+	    $ECHO 'INPUT (' > $output
+	    for obj in $save_libobjs
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    $ECHO ')' >> $output
+	    delfiles="$delfiles $output"
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
+	    fi
+	    for obj
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    delfiles="$delfiles $output"
+	    output=$firstobj\"$file_list_spec$output\"
+	  else
+	    if test -n "$save_libobjs"; then
+	      func_verbose "creating reloadable object files..."
+	      output=$output_objdir/$output_la-${k}.$objext
+	      eval test_cmds=\"$reload_cmds\"
+	      func_len " $test_cmds"
+	      len0=$func_len_result
+	      len=$len0
+
+	      # Loop over the list of objects to be linked.
+	      for obj in $save_libobjs
+	      do
+		func_len " $obj"
+		func_arith $len + $func_len_result
+		len=$func_arith_result
+		if test "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  func_append objlist " $obj"
+		else
+		  # The command $test_cmds is almost too long, add a
+		  # command to the queue.
+		  if test "$k" -eq 1 ; then
+		    # The first file doesn't have a previous command to add.
+		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+		  else
+		    # All subsequent reloadable object files will link in
+		    # the last one created.
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+		  fi
+		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  func_arith $k + 1
+		  k=$func_arith_result
+		  output=$output_objdir/$output_la-${k}.$objext
+		  objlist=$obj
+		  func_len " $last_robj"
+		  func_arith $len0 + $func_len_result
+		  len=$func_arith_result
+		fi
+	      done
+	      # Handle the remaining objects by creating one last
+	      # reloadable object file.  All subsequent reloadable object
+	      # files will link in the last one created.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+	      if test -n "$last_robj"; then
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	      fi
+	      delfiles="$delfiles $output"
+
+	    else
+	      output=
+	    fi
+
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
+	      $opt_dry_run || $RM $export_symbols
+	      libobjs=$output
+	      # Append the command to create the export file.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+	      if test -n "$last_robj"; then
+		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+	      fi
+	    fi
+
+	    test -n "$save_libobjs" &&
+	      func_verbose "creating a temporary reloadable object file: $output"
+
+	    # Loop through the commands generated above and execute them.
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $concat_cmds; do
+	      IFS="$save_ifs"
+	      $opt_silent || {
+		  func_quote_for_expand "$cmd"
+		  eval "func_echo $func_quote_for_expand_result"
+	      }
+	      $opt_dry_run || eval "$cmd" || {
+		lt_exit=$?
+
+		# Restore the uninstalled library and exit
+		if test "$mode" = relink; then
+		  ( cd "$output_objdir" && \
+		    $RM "${realname}T" && \
+		    $MV "${realname}U" "$realname" )
+		fi
+
+		exit $lt_exit
+	      }
+	    done
+	    IFS="$save_ifs"
+
+	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+
+          if ${skipped_export-false}; then
+	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	    fi
+
+	    if test -n "$orig_export_symbols"; then
+	      # The given exports_symbols file has to be filtered, so filter it.
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # though. Also, the filter scales superlinearly with the number of
+	      # global variables. join(1) would be nice here, but unfortunately
+	      # isn't a blessed tool.
+	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	      export_symbols=$output_objdir/$libname.def
+	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	    fi
+	  fi
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	      cmds=$archive_expsym_cmds
+	    else
+	      cmds=$archive_cmds
+	    fi
+	  fi
+	fi
+
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  libobjs="$libobjs $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
+	fi
+
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $opt_silent || {
+	    func_quote_for_expand "$cmd"
+	    eval "func_echo $func_quote_for_expand_result"
+	  }
+	  $opt_dry_run || eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      ( cd "$output_objdir" && \
+	        $RM "${realname}T" && \
+		$MV "${realname}U" "$realname" )
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      func_show_eval '${RM}r "$gentop"'
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+	test -n "$objs$old_deplibs" && \
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+	libobj=$output
+	func_lo2o "$libobj"
+	obj=$func_lo2o_result
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+	func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) func_stripname '' '.exe' "$output"
+	          output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for programs"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
+
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+	# Don't allow lazy linking, it breaks C++ global constructors
+	# But is supposedly fixed on 10.4 or later (yay!).
+	if test "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      compile_command="$compile_command ${wl}-bind_at_load"
+	      finalize_command="$finalize_command ${wl}-bind_at_load"
+	    ;;
+	  esac
+	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  ::) dllsearchpath=$libdir;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *cegcc)
+        # Disable wrappers for cegcc, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+	# Replace the output file specification.
+	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
+
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	fi
+
+	exit $exit_status
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $ECHO for shipping.
+      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) func_stripname '' '.exe' "$output"
+	         output=$func_stripname_result ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    func_stripname '' '.exe' "$outputname"
+	    outputname=$func_stripname_result ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    func_dirname_and_basename "$output" "" "."
+	    output_name=$func_basename_result
+	    output_path=$func_dirname_result
+	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
+	    cwrapper="$output_path/$output_name.exe"
+	    $RM $cwrappersource $cwrapper
+	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_cwrapperexe_src > $cwrappersource
+
+	    # The wrapper executable is built using the $host compiler,
+	    # because it contains $host paths and files. If cross-
+	    # compiling, it, like the target executable, must be
+	    # executed on the $host or under an emulation environment.
+	    $opt_dry_run || {
+	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+	      $STRIP $cwrapper
+	    }
+
+	    # Now, create the wrapper script for func_source use:
+	    func_ltwrapper_scriptname $cwrapper
+	    $RM $func_ltwrapper_scriptname_result
+	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+	    $opt_dry_run || {
+	      # note: this script will not be executed, so do not chmod.
+	      if test "x$build" = "x$host" ; then
+		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+	      else
+		func_emit_wrapper no > $func_ltwrapper_scriptname_result
+	      fi
+	    }
+	  ;;
+	  * )
+	    $RM $output
+	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_wrapper no > $output
+	    chmod +x $output
+	  ;;
+	esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $symfileobj"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    oldobjs="$oldobjs $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	cmds=$old_archive_from_new_cmds
+      else
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  oldobjs="$oldobjs $func_extract_archives_result"
+	fi
+
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      func_basename "$obj"
+	      $ECHO "$func_basename_result"
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $ECHO "copying selected object files to avoid basename conflicts..."
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+	  func_mkdir_p "$gentop"
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    func_basename "$obj"
+	    objbase="$func_basename_result"
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		func_arith $counter + 1
+		counter=$func_arith_result
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+	eval cmds=\"$old_archive_cmds\"
+
+	func_len " $cmds"
+	len=$func_len_result
+	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  func_verbose "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  eval test_cmds=\"$old_archive_cmds\"
+	  func_len " $test_cmds"
+	  len0=$func_len_result
+	  len=$len0
+	  for obj in $save_oldobjs
+	  do
+	    func_len " $obj"
+	    func_arith $len + $func_len_result
+	    len=$func_arith_result
+	    func_append objlist " $obj"
+	    if test "$len" -lt "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+		RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	      len=$len0
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  func_quote_for_eval "$var_value"
+	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		func_basename "$deplib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+
+	    for lib in $dlfiles; do
+	      case $lib in
+	      *.la)
+	        func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlfiles="$newdlfiles $libdir/$name"
+		;;
+	      *) newdlfiles="$newdlfiles $lib" ;;
+	      esac
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+	      *.la)
+		# Only pass preopened files to the pseudo-archive (for
+		# eventual linking with the app. that links it) if we
+		# didn't already link the preopened objects directly into
+		# the library:
+		func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlprefiles="$newdlprefiles $libdir/$name"
+		;;
+	      esac
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $RM $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $ECHO >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+    func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) RM="$RM $arg"; rmforce=yes ;;
+      -*) RM="$RM $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+	 { test -h "$file"; } >/dev/null 2>&1 ||
+	 test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if func_lalib_p "$file"; then
+	  func_source $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if func_lalib_p "$file"; then
+
+	  # Read the .lo file
+	  func_source $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    func_stripname '' '.exe' "$file"
+	    file=$func_stripname_result
+	    func_stripname '' '.exe' "$name"
+	    noexename=$func_stripname_result
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if func_ltwrapper_p "$file"; then
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      relink_command=
+	      func_source $func_ltwrapper_scriptname_result
+	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	    else
+	      relink_command=
+	      func_source $dir/$noexename
+	    fi
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/config/missing b/config/missing
new file mode 100755
index 0000000..894e786
--- /dev/null
+++ b/config/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/ylwrap b/config/ylwrap
new file mode 100755
index 0000000..102bd89
--- /dev/null
+++ b/config/ylwrap
@@ -0,0 +1,223 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+#
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case "$1" in
+  '')
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+    ;;
+  --basedir)
+    basedir=$2
+    shift 2
+    ;;
+  -h|--h*)
+    cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+  INPUT is the input file
+  OUTPUT is one file PROG generates
+  DESIRED is the file we actually want instead of OUTPUT
+  PROGRAM is program to run
+  ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v|--v*)
+    echo "ylwrap $scriptversion"
+    exit $?
+    ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+  [\\/]* | ?:[\\/]*)
+    # Absolute path; do nothing.
+    ;;
+  *)
+    # Relative path.  Make it absolute.
+    input="`pwd`/$input"
+    ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+  if test "$1" = "--"; then
+    shift
+    break
+  fi
+  pairlist="$pairlist $1"
+  shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+  [\\/]* | ?:[\\/]*) ;;
+  *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines.  But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+  0) $prog "$input" ;;
+  *) $prog "$@" "$input" ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+  set X $pairlist
+  shift
+  first=yes
+  # Since DOS filename conventions don't allow two dots,
+  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+  y_tab_nodot="no"
+  if test -f y_tab.c || test -f y_tab.h; then
+    y_tab_nodot="yes"
+  fi
+
+  # The directory holding the input.
+  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+  # Quote $INPUT_DIR so we can use it in a regexp.
+  # FIXME: really we should care about more than `.' and `\'.
+  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+  while test "$#" -ne 0; do
+    from="$1"
+    # Handle y_tab.c and y_tab.h output by DOS
+    if test $y_tab_nodot = "yes"; then
+      if test $from = "y.tab.c"; then
+    	from="y_tab.c"
+      else
+    	if test $from = "y.tab.h"; then
+    	  from="y_tab.h"
+    	fi
+      fi
+    fi
+    if test -f "$from"; then
+      # If $2 is an absolute path name, then just use that,
+      # otherwise prepend `../'.
+      case "$2" in
+    	[\\/]* | ?:[\\/]*) target="$2";;
+    	*) target="../$2";;
+      esac
+
+      # We do not want to overwrite a header file if it hasn't
+      # changed.  This avoid useless recompilations.  However the
+      # parser itself (the first file) should always be updated,
+      # because it is the destination of the .y.c rule in the
+      # Makefile.  Divert the output of all other files to a temporary
+      # file so we can compare them to existing versions.
+      if test $first = no; then
+	realtarget="$target"
+	target="tmp-`echo $target | sed s/.*[\\/]//g`"
+      fi
+      # Edit out `#line' or `#' directives.
+      #
+      # We don't want the resulting debug information to point at
+      # an absolute srcdir; it is better for it to just mention the
+      # .y file with no path.
+      #
+      # We want to use the real output file name, not yy.lex.c for
+      # instance.
+      #
+      # We want the include guards to be adjusted too.
+      FROM=`echo "$from" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+      TARGET=`echo "$2" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+      # Check whether header files must be updated.
+      if test $first = no; then
+	if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+	  echo "$2" is unchanged
+	  rm -f "$target"
+	else
+          echo updating "$2"
+          mv -f "$target" "$realtarget"
+        fi
+      fi
+    else
+      # A missing file is only an error for the first file.  This
+      # is a blatant hack to let us support using "yacc -d".  If -d
+      # is not specified, we don't want an error when the header
+      # file is "missing".
+      if test $first = yes; then
+        ret=1
+      fi
+    fi
+    shift
+    shift
+    first=no
+  done
+else
+  ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..0a03537
--- /dev/null
+++ b/configure
@@ -0,0 +1,28252 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.65.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+	# neutralization value for shells without unset; and this also
+	# works around shells that cannot unset nonexistent variables.
+	BASH_ENV=/dev/null
+	ENV=/dev/null
+	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+	export CONFIG_SHELL
+	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+$*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
+
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
+
+	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "$0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+as_awk_strverscmp='
+  # Use only awk features that work with 7th edition Unix awk (1978).
+  # My, what an old awk you have, Mr. Solaris!
+  END {
+    while (length(v1) && length(v2)) {
+      # Set d1 to be the next thing to compare from v1, and likewise for d2.
+      # Normally this is a single character, but if v1 and v2 contain digits,
+      # compare them as integers and fractions as strverscmp does.
+      if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
+	# Split v1 and v2 into their leading digit string components d1 and d2,
+	# and advance v1 and v2 past the leading digit strings.
+	for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
+	for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
+	d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
+	d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
+	if (d1 ~ /^0/) {
+	  if (d2 ~ /^0/) {
+	    # Compare two fractions.
+	    while (d1 ~ /^0/ && d2 ~ /^0/) {
+	      d1 = substr(d1, 2); len1--
+	      d2 = substr(d2, 2); len2--
+	    }
+	    if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
+	      # The two components differ in length, and the common prefix
+	      # contains only leading zeros.  Consider the longer to be less.
+	      d1 = -len1
+	      d2 = -len2
+	    } else {
+	      # Otherwise, compare as strings.
+	      d1 = "x" d1
+	      d2 = "x" d2
+	    }
+	  } else {
+	    # A fraction is less than an integer.
+	    exit 1
+	  }
+	} else {
+	  if (d2 ~ /^0/) {
+	    # An integer is greater than a fraction.
+	    exit 2
+	  } else {
+	    # Compare two integers.
+	    d1 += 0
+	    d2 += 0
+	  }
+	}
+      } else {
+	# The normal case, without worrying about digits.
+	d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
+	d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
+      }
+      if (d1 < d2) exit 1
+      if (d1 > d2) exit 2
+    }
+    # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
+    # which mishandles some comparisons of empty strings to integers.
+    if (length(v2)) exit 1
+    if (length(v1)) exit 2
+  }
+'
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="Metview"
+ac_unique_file="src/libMetview/MvDate.cc"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+METVIEW_SCM_AUX_FALSE
+METVIEW_SCM_AUX_TRUE
+METVIEW_INPE_FALSE
+METVIEW_INPE_TRUE
+METVIEW_EXPERIMENTAL_FALSE
+METVIEW_EXPERIMENTAL_TRUE
+METVIEW_EXTERNAL_FALSE
+METVIEW_EXTERNAL_TRUE
+METVIEW_GUI_FALSE
+METVIEW_GUI_TRUE
+METVIEW_OPERA_FALSE
+METVIEW_OPERA_TRUE
+METVIEW_OBSTAT_FALSE
+METVIEW_OBSTAT_TRUE
+METVIEW_MARS_ODB_FALSE
+METVIEW_MARS_ODB_TRUE
+METVIEW_ODB_PLOT_FALSE
+METVIEW_ODB_PLOT_TRUE
+METVIEW_ODB_OLD_FALSE
+METVIEW_ODB_OLD_TRUE
+METVIEW_ODB_NEW_FALSE
+METVIEW_ODB_NEW_TRUE
+METVIEW_ODB_FALSE
+METVIEW_ODB_TRUE
+METVIEW_MARS_CATALOG_FALSE
+METVIEW_MARS_CATALOG_TRUE
+METVIEW_MARS_FALSE
+METVIEW_MARS_TRUE
+METVIEW_EMOS_FALSE
+METVIEW_EMOS_TRUE
+METVIEW_32BIT_FALSE
+METVIEW_32BIT_TRUE
+METVIEW_QTDEBUG_FALSE
+METVIEW_QTDEBUG_TRUE
+METVIEW_QT_FALSE
+METVIEW_QT_TRUE
+METVIEW_MAGICS_FALSE
+METVIEW_MAGICS_TRUE
+MARS_ACCESS
+FDBLIB
+DBMLIB
+MV_MOTIF_UTIL_LIB
+MV_MOTIF_FLAGS
+METVIEW_NETCDF_LIB
+METVIEW_NETCDF_FLAGS
+STANDARD_METVIEW_LIBS_NO_UTIL
+STANDARD_METVIEW_LIBS
+METVIEW_UTIL_LIB
+PROJ4_LIBS
+ODB_LIBS
+ODB_LDFLAGS
+ODB_CPPFLAGS
+EMOS_LIB_NAME
+MAGPLUS_LIB
+MAGPLUS_LDFLAGS
+MAGPLUS_CPPFLAGS
+LIBNAME
+METVIEW_3RDPARTY_LIBS
+METVIEW_3RDPARTY_INCLUDE
+METVIEW_PROF_FALSE
+METVIEW_PROF_TRUE
+METVIEW_DEBUG_FALSE
+METVIEW_DEBUG_TRUE
+MVSTARTDIR
+METVIEW_EXTRA_TITLE
+MARS_ODB_ACCESS
+ODB1_USE_SCRIPT
+ODB1_VERSION
+ODB1_BIN
+ODB_LIBDIR
+LDFLAGS_INLINE
+GRIBAPI_LIBS
+GRIB_API_LIB
+GRIB_API_INC
+MV_EMOSLIB
+MAGPLUS_LIBDIR
+MAGICS_LIBS
+MAGICS_CFLAGS
+PKG_CONFIG
+MAGPLUS_HOME
+QT_VERSION
+QT_LIBS
+QT_LDFLAGS
+QT_LFLAGS
+QT_CPPFLAGS
+QT_INCPATH
+QT_CXXFLAGS
+QT_CFLAGS
+QT_DEFINES
+QT_VERSION_MAJOR
+RCC
+UIC
+MOC
+QMAKE
+QT_PATH
+FFIXED_FLAGS
+FLIBS
+CPPLIBS
+AXX
+MV_ENVIRON
+PKGCONFIG_REQUIRES
+STARTUP_SCRIPT
+MVINCLUDE
+LIBTOOL_DEPS
+CXXCPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+SED
+LIBTOOL
+EGREP
+GREP
+CPP
+YFLAGS
+YACC
+LEXLIB
+LEX_OUTPUT_ROOT
+LEX
+ac_ct_FC
+FCFLAGS
+FC
+ac_ct_F77
+FFLAGS
+F77
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+METVIEW_GRIBAPI_MIN_VERSION
+METVIEW_MAGICS_MIN_VERSION
+METVIEW_PACKAGE_RELEASE_DATE
+METVIEW_PACKAGE_VERSION
+METVIEW_PACKAGE_NAME
+SITE_WMO_CODE
+SITE_NAME
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_site
+with_wmo_code
+enable_silent_rules
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_startup_script
+enable_32_bits_addressing_mode
+enable_experimental
+enable_ui
+with_qt
+enable_qtdebug
+enable_magics
+with_magics_home
+with_netcdf
+with_emos_libraries
+with_emos_libname
+with_grib_api
+enable_inpe
+enable_mars_odb
+enable_odb
+with_odb
+with_odb1_bin
+with_odb1_version
+with_odb1_use_script
+enable_mars_access
+enable_marscatalog
+enable_mars_api
+enable_obstat
+enable_opera_radar
+with_proj4
+with_flextra
+with_scm
+enable_scm_aux_files
+with_python_command
+with_extra_title
+enable_debug
+enable_prof
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+F77
+FFLAGS
+FC
+FCFLAGS
+YACC
+YFLAGS
+CPP
+CXXCPP
+QT_PATH
+QMAKE
+MOC
+UIC
+RCC
+PKG_CONFIG
+MAGICS_CFLAGS
+MAGICS_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-static[=PKGS]  build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-32-bits-addressing-mode
+                          Force 32 bits addressing mode on 64 bits machines
+  --enable-experimental             enable experimental component use only in developments [default=no]
+  --enable-ui	          enable the graphics user interface [default=yes]
+  --enable-qtdebug        enable QDebug output in Qt-based modules [default=no]
+  --enable-magics         enable the Magics++ library support [default=yes]
+  --enable-inpe             enable the INPE support (only at INPE) [default=no]
+  --enable-mars-odb	          enable the MARS ODB accesss [default=no]
+  --enable-odb	          enable the ODB support [default=no]
+  --enable-mars-access	          enable the MARS accesss (client-server) [default=no]
+  --enable-marscatalog	          enable the MARS catalog support only at ECMWF) [default=no]
+  --enable-mars-api	          enable the MARS API (requires curl library) [default=yes]
+  --enable-obstat	          enable the OBSTAT support (only at ECMWF) [default=no]
+  --enable-opera-radar	          enable OPERA radar support (requires proj4) [default=yes]
+  --enable-scm-aux-files       enable SCM auxillary files [default=no]
+  --enable-debug          Turn on debugging [default=no]
+  --enable-prof           Turn on profiling (ECMWF internal) [default=no]
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-site             Name of installation site
+  --with-wmo-code         WMO code for BUFR tables
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-startup-script   Name of the startup script [default=metview]
+  --with-qt               Path to Qt [Look in PATH and /usr/local/Trolltech]
+  --with-magics-home      Location of Magics libraries
+  --with-netcdf           Prefix of NetCDF libraries and headers.
+  --with-emos-libraries   Location of EMOS libraries [default is
+                          /usr/local/lib]
+  --with-emos-libname     Name of EMOS library [default is emosR64]
+  --with-grib-api         Prefix of GRIB API libraries and headers.
+  --with-odb              Prefix of ODB libraries and headers.
+  --with-odb1-bin         Path to the ODB-1 bin directory.
+  --with-odb1-version     Required version of ODB-1 environment [default=ANY.]
+  --with-odb1-use-script  Path to ODB-1 'use' script (normally 'use_odb.sh').
+  --with-proj4            Prefix of Proj4 libraries and headers.
+  --with-flextra          FLEXTRA executable path.
+  --with-scm              SCM executable path.
+  --with-python-command   Python interpreter's path.
+  --with-extra-title      Extra information for the title bar
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  FC          Fortran compiler command
+  FCFLAGS     Fortran compiler flags
+  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
+              the first program found out of: `bison -y', `byacc', `yacc'.
+  YFLAGS      The list of arguments that will be passed by default to $YACC.
+              This script will default YFLAGS to the empty string to avoid a
+              default value of `-d' given by some make applications.
+  CPP         C preprocessor
+  CXXCPP      C++ preprocessor
+  QT_PATH     Path to the Qt installation
+  QMAKE       Qt Makefile generator command
+  MOC         Qt Meta Object Compiler command
+  UIC         Qt User Interface Compiler command
+  RCC         Qt Resource Compiler command
+  PKG_CONFIG  path to pkg-config utility
+  MAGICS_CFLAGS
+              C compiler flags for MAGICS, overriding pkg-config
+  MAGICS_LIBS linker flags for MAGICS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.65
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_f77_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_f77_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_f77_try_compile
+
+# ac_fn_fc_try_compile LINENO
+# ---------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_fc_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_fc_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_f77_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_f77_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_f77_try_link
+
+# ac_fn_fc_try_link LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_fc_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_fc_try_link
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in config "$srcdir"/config; do
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+# take a copy of LDFLAGS so we can export it for inline C/Fortran
+LDFLAGS_INLINE=${LDFLAGS}
+
+
+
+# Check whether --with-site was given.
+if test "${with_site+set}" = set; then :
+  withval=$with_site; SITE_NAME="${with_site:-outside_ecmwf}"
+
+fi
+
+SITE_WMO_CODE="255"
+
+# Check whether --with-wmo-code was given.
+if test "${with_wmo_code+set}" = set; then :
+  withval=$with_wmo_code; SITE_WMO_CODE="${with_wmo-code}"
+
+fi
+
+if test "x$with_site" = xecmwf; then
+  SITE_WMO_CODE="098"
+fi
+
+
+
+# Source file containing package/library versioning information.
+. ${srcdir}/version.sh
+
+if test "x$prefix" != xNONE; then
+  ac_default_prefix=${prefix}
+else
+  prefix=${ac_default_prefix}
+fi
+
+echo ""
+echo "configuring ${METVIEW_PACKAGE_NAME} ${METVIEW_PACKAGE_VERSION}${METVIEW_PACKAGE_VERSION_ADDENDUM} at ${SITE_NAME}"
+echo ""
+
+
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define METVIEW_VERSION "${METVIEW_PACKAGE_VERSION}"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define METVIEW_NAME "${METVIEW_PACKAGE_NAME}"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define METVIEW_RELEASE_DATE "${METVIEW_PACKAGE_RELEASE_DATE}"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define METVIEW_INSTALL_PATH "${prefix}"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define METVIEW_SITE "${SITE_NAME}"
+_ACEOF
+
+
+printf ${METVIEW_PACKAGE_VERSION} > share/metview/app-defaults/MvVersion
+
+# this is so that Metview can report accurately which version it is
+# the first number is a version number in case we change the format of this file
+mv_version_details=share/metview/app-defaults/MvVersionDetails
+printf "1 "                                    >  ${mv_version_details}
+printf "${METVIEW_PACKAGE_NAME} "              >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_MAJOR} "     >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_MINOR} "     >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_REVISION} "  >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_LABEL} "     >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_COPYRIGHT_YEAR} "    >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_COPYRIGHT_PERIOD} "  >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_RELEASE_DATE}\n"       >> ${mv_version_details}
+
+
+# Ensure that make can run correctly
+
+ac_config_headers="$ac_config_headers src/metview_config.h"
+
+
+am__api_version='1.11'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=$METVIEW_PACKAGE_NAME
+ VERSION="${METVIEW_PACKAGE_VERSION}${METVIEW_PACKAGE_VERSION_ADDENDUM}"
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in xlc_r icc gcc cc CC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in xlc_r icc gcc cc CC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in xlC_r icpc g++ c++ CC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in xlC_r icpc g++ c++ CC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in pgf90 gfortran pgf77 xlf90_r xlf90 xlf77_r f90 g77
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in pgf90 gfortran pgf77 xlf90_r xlf90 xlf77_r f90 g77
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
+if test "${ac_cv_prog_f77_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  FFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+  ac_cv_prog_f77_g=yes
+else
+  ac_cv_prog_f77_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+if test $ac_compiler_gnu = yes; then
+  G77=yes
+else
+  G77=
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in pgf90 gfortran xlf90_r xlf90 f90
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$FC"; then
+  ac_cv_prog_FC="$FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+FC=$ac_cv_prog_FC
+if test -n "$FC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
+$as_echo "$FC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$FC" && break
+  done
+fi
+if test -z "$FC"; then
+  ac_ct_FC=$FC
+  for ac_prog in pgf90 gfortran xlf90_r xlf90 f90
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_FC"; then
+  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_FC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FC=$ac_cv_prog_ac_ct_FC
+if test -n "$ac_ct_FC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
+$as_echo "$ac_ct_FC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_FC" && break
+done
+
+  if test "x$ac_ct_FC" = x; then
+    FC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FC=$ac_ct_FC
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
+if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_fc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
+$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FCFLAGS=${FCFLAGS+set}
+ac_save_FCFLAGS=$FCFLAGS
+FCFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
+$as_echo_n "checking whether $FC accepts -g... " >&6; }
+if test "${ac_cv_prog_fc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  FCFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+  ac_cv_prog_fc_g=yes
+else
+  ac_cv_prog_fc_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
+$as_echo "$ac_cv_prog_fc_g" >&6; }
+if test "$ac_test_FCFLAGS" = set; then
+  FCFLAGS=$ac_save_FCFLAGS
+elif test $ac_cv_prog_fc_g = yes; then
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-g -O2"
+  else
+    FCFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-O2"
+  else
+    FCFLAGS=
+  fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+for ac_prog in flex lex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LEX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LEX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
+$as_echo "$LEX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test "x$LEX" != "x:"; then
+  cat >conftest.l <<_ACEOF
+%%
+a { ECHO; }
+b { REJECT; }
+c { yymore (); }
+d { yyless (1); }
+e { yyless (input () != 0); }
+f { unput (yytext[0]); }
+. { BEGIN INITIAL; }
+%%
+#ifdef YYTEXT_POINTER
+extern char *yytext;
+#endif
+int
+main (void)
+{
+  return ! yylex () + ! yywrap ();
+}
+_ACEOF
+{ { ac_try="$LEX conftest.l"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$LEX conftest.l") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
+$as_echo_n "checking lex output file root... " >&6; }
+if test "${ac_cv_prog_lex_root+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
+else
+  as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
+$as_echo "$ac_cv_prog_lex_root" >&6; }
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+if test -z "${LEXLIB+set}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
+$as_echo_n "checking lex library... " >&6; }
+if test "${ac_cv_lib_lex+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    ac_save_LIBS=$LIBS
+    ac_cv_lib_lex='none needed'
+    for ac_lib in '' -lfl -ll; do
+      LIBS="$ac_lib $ac_save_LIBS"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_lex=$ac_lib
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      test "$ac_cv_lib_lex" != 'none needed' && break
+    done
+    LIBS=$ac_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
+$as_echo "$ac_cv_lib_lex" >&6; }
+  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
+$as_echo_n "checking whether yytext is a pointer... " >&6; }
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent.  Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+ac_save_LIBS=$LIBS
+LIBS="$LEXLIB $ac_save_LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define YYTEXT_POINTER 1
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_prog_lex_yytext_pointer=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
+$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
+
+fi
+rm -f conftest.l $LEX_OUTPUT_ROOT.c
+
+fi
+if test "$LEX" = :; then
+  LEX=${am_missing_run}flex
+fi
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_YACC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_YACC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+$as_echo "$YACC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+      then
+	# cc works too.
+	:
+      else
+	# cc exists but doesn't like -o.
+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#	  define __EXTENSIONS__ 1
+	  $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+#
+# Checks for programs.
+#
+#AC_DISABLE_FAST_INSTALL   # TEMPORARY !!!!
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:6544: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:6547: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:6550: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 7755 "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+	LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[012]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+for ac_header in dlfcn.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+  _lt_caught_CXX_error=yes
+fi
+
+
+
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
+if test "${ac_cv_prog_f77_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  FFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+  ac_cv_prog_f77_g=yes
+else
+  ac_cv_prog_f77_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+if test $ac_compiler_gnu = yes; then
+  G77=yes
+else
+  G77=
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+
+
+
+
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$FC"; then
+  ac_cv_prog_FC="$FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+FC=$ac_cv_prog_FC
+if test -n "$FC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
+$as_echo "$FC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$FC" && break
+  done
+fi
+if test -z "$FC"; then
+  ac_ct_FC=$FC
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_FC"; then
+  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_FC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FC=$ac_cv_prog_ac_ct_FC
+if test -n "$ac_ct_FC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
+$as_echo "$ac_ct_FC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_FC" && break
+done
+
+  if test "x$ac_ct_FC" = x; then
+    FC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FC=$ac_ct_FC
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
+if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_fc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
+$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FCFLAGS=${FCFLAGS+set}
+ac_save_FCFLAGS=$FCFLAGS
+FCFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
+$as_echo_n "checking whether $FC accepts -g... " >&6; }
+if test "${ac_cv_prog_fc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  FCFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+  ac_cv_prog_fc_g=yes
+else
+  ac_cv_prog_fc_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
+$as_echo "$ac_cv_prog_fc_g" >&6; }
+if test "$ac_test_FCFLAGS" = set; then
+  FCFLAGS=$ac_save_FCFLAGS
+elif test $ac_cv_prog_fc_g = yes; then
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-g -O2"
+  else
+    FCFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-O2"
+  else
+    FCFLAGS=
+  fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+  enable_win32_dll=no
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9973: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:9977: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-qpic'
+	lt_prog_compiler_static='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:10312: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:10316: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:10417: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:10421: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:10472: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:10476: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec=
+	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      export_dynamic_flag_spec='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld='+b $libdir'
+	hardcode_libdir_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	hardcode_direct_absolute=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 12839 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 12935 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec_CXX='$convenience'
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+        # as there is no search path for DLLs.
+        hardcode_libdir_flag_spec_CXX='-L$libdir'
+        allow_undefined_flag_CXX=unsupported
+        always_export_symbols_CXX=no
+        enable_shared_with_static_runtimes_CXX=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          ld_shlibs_CXX=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  whole_archive_flag_spec_CXX=''
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+
+  else
+  ld_shlibs_CXX=no
+  fi
+
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[12]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
+
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      old_archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
+
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
+
+	    output_verbose_link_cmd='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14891: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14895: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14990: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14994: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15042: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:15046: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+      ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_direct_absolute_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+inherit_rpath_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${F77-"f77"}
+  compiler=$CC
+  compiler_F77=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  GCC=$G77
+  if test -n "$compiler"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[4-9]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+    GCC_F77="$G77"
+    LD_F77="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_F77='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_F77='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='--shared'
+	lt_prog_compiler_static_F77='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-qpic'
+	lt_prog_compiler_static_F77='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_F77='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_F77='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5
+$as_echo "$lt_prog_compiler_pic_F77" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_F77=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16422: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16426: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_F77=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_F77=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_F77=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
+    :
+else
+    lt_prog_compiler_static_F77=
+fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16521: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:16525: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16573: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:16577: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  always_export_symbols_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  compiler_needs_object_F77=no
+  enable_shared_with_static_runtimes_F77=no
+  export_dynamic_flag_spec_F77=
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic_F77=no
+  hardcode_direct_F77=no
+  hardcode_direct_absolute_F77=no
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  inherit_rpath_F77=no
+  link_all_deplibs_F77=unknown
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  old_archive_from_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  thread_safe_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_F77=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds_F77=''
+        ;;
+      m68k)
+            archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec_F77='-L$libdir'
+            hardcode_minus_L_F77=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_F77='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec_F77=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object_F77=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec_F77=
+	  hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+	  archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs_F77=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_direct_absolute_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      file_list_spec_F77='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct_F77=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_F77=yes
+	  hardcode_libdir_flag_spec_F77='-L$libdir'
+	  hardcode_libdir_separator_F77=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      export_dynamic_flag_spec_F77='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_F77='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_F77='$convenience'
+	  archive_cmds_need_lc_F77=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds_F77=''
+        ;;
+      m68k)
+            archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec_F77='-L$libdir'
+            hardcode_minus_L_F77=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_F77=no
+  hardcode_direct_F77=no
+  hardcode_automatic_F77=yes
+  hardcode_shlibpath_var_F77=unsupported
+  whole_archive_flag_spec_F77=''
+  link_all_deplibs_F77=yes
+  allow_undefined_flag_F77="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs_F77=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	hardcode_libdir_separator_F77=:
+	hardcode_direct_F77=yes
+	hardcode_direct_absolute_F77=yes
+	export_dynamic_flag_spec_F77='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_F77=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	*)
+	  hardcode_direct_F77=yes
+	  hardcode_direct_absolute_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat > conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+  archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc_F77='no'
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      inherit_rpath_F77=yes
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_F77=yes
+	hardcode_shlibpath_var_F77=no
+	hardcode_direct_absolute_F77=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_F77='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_F77='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc_F77='no'
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      archive_cmds_need_lc_F77='no'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds_F77='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_F77=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_F77='${wl}-z,text'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_F77='${wl}-z,text'
+      allow_undefined_flag_F77='${wl}-z,nodefs'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-R,$libdir'
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec_F77='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5
+$as_echo "$ld_shlibs_F77" >&6; }
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+with_gnu_ld_F77=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+	pic_flag=$lt_prog_compiler_pic_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5
+$as_echo "$archive_cmds_need_lc_F77" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\""
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_f77_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" ||
+   test -n "$runpath_var_F77" ||
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
+$as_echo "$hardcode_action_F77" >&6; }
+
+if test "$hardcode_action_F77" = relink ||
+   test "$inherit_rpath_F77" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+      ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+archive_cmds_need_lc_FC=no
+allow_undefined_flag_FC=
+always_export_symbols_FC=no
+archive_expsym_cmds_FC=
+export_dynamic_flag_spec_FC=
+hardcode_direct_FC=no
+hardcode_direct_absolute_FC=no
+hardcode_libdir_flag_spec_FC=
+hardcode_libdir_flag_spec_ld_FC=
+hardcode_libdir_separator_FC=
+hardcode_minus_L_FC=no
+hardcode_automatic_FC=no
+inherit_rpath_FC=no
+module_cmds_FC=
+module_expsym_cmds_FC=
+link_all_deplibs_FC=unknown
+old_archive_cmds_FC=$old_archive_cmds
+no_undefined_flag_FC=
+whole_archive_flag_spec_FC=
+enable_shared_with_static_runtimes_FC=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+objext_FC=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  compiler_FC=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+  if test -n "$compiler"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[4-9]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+    GCC_FC="$ac_cv_fc_compiler_gnu"
+    LD_FC="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    # Dependencies to place before and after the object being linked:
+predep_objects_FC=
+postdep_objects_FC=
+predeps_FC=
+postdeps_FC=
+compiler_lib_search_path_FC=
+
+cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_FC"; then
+	     compiler_lib_search_path_FC="${prev}${p}"
+	   else
+	     compiler_lib_search_path_FC="${compiler_lib_search_path_FC} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_FC"; then
+	   postdeps_FC="${prev}${p}"
+	 else
+	   postdeps_FC="${postdeps_FC} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_FC"; then
+	   predep_objects_FC="$p"
+	 else
+	   predep_objects_FC="$predep_objects_FC $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_FC"; then
+	   postdep_objects_FC="$p"
+	 else
+	   postdep_objects_FC="$postdep_objects_FC $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling FC test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+
+
+case " $postdeps_FC " in
+*" -lc "*) archive_cmds_need_lc_FC=no ;;
+esac
+ compiler_lib_search_dirs_FC=
+if test -n "${compiler_lib_search_path_FC}"; then
+ compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+    lt_prog_compiler_wl_FC=
+lt_prog_compiler_pic_FC=
+lt_prog_compiler_static_FC=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_FC='-Wl,'
+    lt_prog_compiler_static_FC='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_FC='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_FC='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_FC='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_FC='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_FC=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_FC='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_FC=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      lt_prog_compiler_pic_FC='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_FC='-Bstatic'
+      else
+	lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_FC='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_FC='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_FC='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-KPIC'
+	lt_prog_compiler_static_FC='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-fPIC'
+	lt_prog_compiler_static_FC='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='--shared'
+	lt_prog_compiler_static_FC='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-fpic'
+	lt_prog_compiler_static_FC='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_FC='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_FC='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-qpic'
+	lt_prog_compiler_static_FC='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_FC='-KPIC'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  lt_prog_compiler_wl_FC='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_FC='-KPIC'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  lt_prog_compiler_wl_FC=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_FC='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_FC='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_FC='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_FC='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_FC='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_FC='-Qoption ld '
+      lt_prog_compiler_pic_FC='-PIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_FC='-Kconform_pic'
+	lt_prog_compiler_static_FC='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      lt_prog_compiler_can_build_shared_FC=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_FC='-pic'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_FC=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_FC=
+    ;;
+  *)
+    lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_FC" >&5
+$as_echo "$lt_prog_compiler_pic_FC" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_FC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_FC=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_FC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:19014: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:19018: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_FC=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_FC" = xyes; then
+    case $lt_prog_compiler_pic_FC in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;;
+     esac
+else
+    lt_prog_compiler_pic_FC=
+     lt_prog_compiler_can_build_shared_FC=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_FC=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_FC=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_FC=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_FC" = xyes; then
+    :
+else
+    lt_prog_compiler_static_FC=
+fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_FC=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:19113: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:19117: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_FC=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; }
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_FC=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:19165: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:19169: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_FC=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_FC" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag_FC=
+  always_export_symbols_FC=no
+  archive_cmds_FC=
+  archive_expsym_cmds_FC=
+  compiler_needs_object_FC=no
+  enable_shared_with_static_runtimes_FC=no
+  export_dynamic_flag_spec_FC=
+  export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic_FC=no
+  hardcode_direct_FC=no
+  hardcode_direct_absolute_FC=no
+  hardcode_libdir_flag_spec_FC=
+  hardcode_libdir_flag_spec_ld_FC=
+  hardcode_libdir_separator_FC=
+  hardcode_minus_L_FC=no
+  hardcode_shlibpath_var_FC=unsupported
+  inherit_rpath_FC=no
+  link_all_deplibs_FC=unknown
+  module_cmds_FC=
+  module_expsym_cmds_FC=
+  old_archive_from_new_cmds_FC=
+  old_archive_from_expsyms_cmds_FC=
+  thread_safe_flag_spec_FC=
+  whole_archive_flag_spec_FC=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_FC=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_FC=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec_FC='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_FC=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_FC=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds_FC=''
+        ;;
+      m68k)
+            archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec_FC='-L$libdir'
+            hardcode_minus_L_FC=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_FC=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      allow_undefined_flag_FC=unsupported
+      always_export_symbols_FC=no
+      enable_shared_with_static_runtimes_FC=yes
+      export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_FC=no
+      hardcode_shlibpath_var_FC=no
+      hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_FC='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec_FC=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object_FC=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec_FC=
+	  hardcode_libdir_flag_spec_ld_FC='-rpath $libdir'
+	  archive_cmds_FC='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs_FC=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_FC=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_FC=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+	    archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs_FC=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_FC" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_FC=
+      export_dynamic_flag_spec_FC=
+      whole_archive_flag_spec_FC=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_FC=unsupported
+      always_export_symbols_FC=yes
+      archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_FC=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_FC=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_FC=''
+      hardcode_direct_FC=yes
+      hardcode_direct_absolute_FC=yes
+      hardcode_libdir_separator_FC=':'
+      link_all_deplibs_FC=yes
+      file_list_spec_FC='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct_FC=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_FC=yes
+	  hardcode_libdir_flag_spec_FC='-L$libdir'
+	  hardcode_libdir_separator_FC=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      export_dynamic_flag_spec_FC='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_FC=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_FC='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_FC="-z nodefs"
+	  archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_FC=' ${wl}-bernotok'
+	  allow_undefined_flag_FC=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_FC='$convenience'
+	  archive_cmds_need_lc_FC=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds_FC=''
+        ;;
+      m68k)
+            archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec_FC='-L$libdir'
+            hardcode_minus_L_FC=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_FC=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_FC=' '
+      allow_undefined_flag_FC=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds_FC='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_FC='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_FC=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_FC=no
+  hardcode_direct_FC=no
+  hardcode_automatic_FC=yes
+  hardcode_shlibpath_var_FC=unsupported
+  whole_archive_flag_spec_FC=''
+  link_all_deplibs_FC=yes
+  allow_undefined_flag_FC="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs_FC=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_FC=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_FC=yes
+      hardcode_minus_L_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_FC='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      hardcode_direct_FC=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_FC=yes
+      export_dynamic_flag_spec_FC='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld_FC='+b $libdir'
+	hardcode_libdir_separator_FC=:
+	hardcode_direct_FC=yes
+	hardcode_direct_absolute_FC=yes
+	export_dynamic_flag_spec_FC='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_FC=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_FC=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct_FC=no
+	  hardcode_shlibpath_var_FC=no
+	  ;;
+	*)
+	  hardcode_direct_FC=yes
+	  hardcode_direct_absolute_FC=yes
+	  export_dynamic_flag_spec_FC='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_FC=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat > conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+  archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc_FC='no'
+      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      inherit_rpath_FC=yes
+      link_all_deplibs_FC=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    newsos6)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_FC=yes
+      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_FC=yes
+	hardcode_shlibpath_var_FC=no
+	hardcode_direct_absolute_FC=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_FC='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_FC='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_minus_L_FC=yes
+      allow_undefined_flag_FC=unsupported
+      archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_FC=' -expect_unresolved \*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc_FC='no'
+      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_FC=' -expect_unresolved \*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_FC='-rpath $libdir'
+      fi
+      archive_cmds_need_lc_FC='no'
+      hardcode_libdir_separator_FC=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_FC=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_FC='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds_FC='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds_FC='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_shlibpath_var_FC=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_FC='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_FC=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_FC='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_direct_FC=yes
+      hardcode_minus_L_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_FC=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_FC='$CC -r -o $output$reload_objs'
+	  hardcode_direct_FC=no
+        ;;
+	motorola)
+	  archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_FC=no
+      export_dynamic_flag_spec_FC='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_FC=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_FC=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_FC='${wl}-z,text'
+      archive_cmds_need_lc_FC=no
+      hardcode_shlibpath_var_FC=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_FC='${wl}-z,text'
+      allow_undefined_flag_FC='${wl}-z,nodefs'
+      archive_cmds_need_lc_FC=no
+      hardcode_shlibpath_var_FC=no
+      hardcode_libdir_flag_spec_FC='${wl}-R,$libdir'
+      hardcode_libdir_separator_FC=':'
+      link_all_deplibs_FC=yes
+      export_dynamic_flag_spec_FC='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_shlibpath_var_FC=no
+      ;;
+
+    *)
+      ld_shlibs_FC=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec_FC='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5
+$as_echo "$ld_shlibs_FC" >&6; }
+test "$ld_shlibs_FC" = no && can_build_shared=no
+
+with_gnu_ld_FC=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_FC" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_FC=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_FC in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_FC
+	pic_flag=$lt_prog_compiler_pic_FC
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_FC
+        allow_undefined_flag_FC=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+	  archive_cmds_need_lc_FC=no
+        else
+	  archive_cmds_need_lc_FC=yes
+        fi
+        allow_undefined_flag_FC=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_FC" >&5
+$as_echo "$archive_cmds_need_lc_FC" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\""
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_FC=
+if test -n "$hardcode_libdir_flag_spec_FC" ||
+   test -n "$runpath_var_FC" ||
+   test "X$hardcode_automatic_FC" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_FC" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no &&
+     test "$hardcode_minus_L_FC" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_FC=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_FC=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_FC=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5
+$as_echo "$hardcode_action_FC" >&6; }
+
+if test "$hardcode_action_FC" = relink ||
+   test "$inherit_rpath_FC" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+MVINCLUDE=include
+
+
+
+
+############################################
+#
+#  Metview startup script name --startup-script
+#
+
+STARTUP_SCRIPT=metview
+
+
+# Check whether --with-startup-script was given.
+if test "${with_startup_script+set}" = set; then :
+  withval=$with_startup_script; STARTUP_SCRIPT=$with_startup_script
+fi
+
+
+
+
+
+
+############################################
+#
+#  32 bit addressing  --enable-32bit
+#
+# Check whether --enable-32-bits-addressing-mode was given.
+if test "${enable_32_bits_addressing_mode+set}" = set; then :
+  enableval=$enable_32_bits_addressing_mode; enable_32_bits_addressing_mode='yes'
+else
+  enable_32_bits_addressing_mode='no'
+fi
+
+
+
+
+######################################################################
+#
+#     Experimental
+#
+######################################################################
+
+# Check whether --enable-experimental was given.
+if test "${enable_experimental+set}" = set; then :
+  enableval=$enable_experimental; experimental=$enableval
+else
+  experimental=no
+fi
+
+
+if test "x${experimental}" = xyes ; then
+	CXXFLAGS="${CXXFLAGS} -DMETVIEW_EXPERIMENTAL"
+fi
+
+############################################
+#
+#   pkg-config
+#
+if test x$PKG_CONFIG = x; then
+  PKG_CONFIG=pkg-config
+fi
+
+case `$PKG_CONFIG --version` in
+0.?|0.?.?|0.1[0-7]|0.1[0-7].?) PKGCONFIG_REQUIRES="Requires"; ;;
+*) PKGCONFIG_REQUIRES="Requires.private"; ;;
+esac
+
+
+
+
+
+###########################################
+#
+# Architecture dependent Compiler options
+#
+windows=no
+LIBNAME="${LIBNAME:-lib}"
+OPTI=""
+OS=NA
+MAJOR_VERSION=NA
+QT_EXT=""
+
+EMOS_I32_R64="-DR64 -DREAL_8 -DREAL_BIGGER_THAN_INTEGER"
+#MAGICS_I32_R64="-DREAL_IS_DOUBLE -DMAGINT_IS_INT"
+METVIEW_I32_R64="-DI32 -DMAGINT_IS_INT -DREAL_IS_DOUBLE"
+
+PLATFORM_METVIEW_BITFLAGS="${METVIEW_I32_R64}"
+PLATFORM_EMOS_BITFLAGS="${EMOS_I32_R64}"
+
+
+FDBLIB="-L/usr/local/lib -L/usr/local/lib/metaps/lib -lfdb -lrt"
+LEX="${LEX:-lex}"
+make="${MAKE:-make}"
+
+case "${host}" in
+	*linux*)
+		case "${host}" in
+			x86_64*linux*)
+				AXX="-m64 -fPIC"
+				LIBNAME="lib64"
+                QT_EXT="-64"  # used at ECMWF only
+				MV_ENVIRON="ecm_lnx64"
+				FDBLIB="-L/usr/local/lib/metaps/lib -lfdb"
+				X11LIB_DIR=" -L/usr/X11R6/${LIBNAME}"
+				if test "x$enable_32_bits_addressing_mode" == xyes; then
+					echo " "
+					echo "You are on AMD 64 and building a 32 bit version of Metview."
+					echo " "
+					LIBNAME="lib"
+					libdir=${prefix}/${LIBNAME}
+					AXX="-m32"
+				fi
+				;;
+			*)
+				AXX="-m32"
+				LIBNAME="lib"
+				MV_ENVIRON="ecm_lnx"
+                CFLAGS="${CFLAGS} -Dlinux"
+                CXXFLAGS="${CXXFLAGS} -Dlinux"
+				;;
+		esac
+		OS="linux"
+		CC_FLAGS="\$(PLATFORM_WARNING_LEVEL)"
+		CXXFLAGS="${CXXFLAGS} -DUSE_NEW_IO"
+#		AR="ar rlv"
+		AR="ar"
+		RANLIB="/usr/bin/ranlib -t"
+		LEX="flex -l"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }'`
+		METVIEW_DEFINES="-DLITTLE -DLITTLE_END -DH_INCLUDES_CC"
+
+		CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2 -I/usr/include -I/usr/X11R6/include -I/usr/local/include"
+		LDFLAGS="$LDFLAGS -L/usr/local/${LIBNAME} -L/usr/${LIBNAME}"
+		libdir=${prefix}/${LIBNAME}
+		;;
+	# IBM Server
+	*-ibm-aix* )
+		OS="AIX"
+		MV_ENVIRON="ecm_ibm"
+		make="gmake"
+		PLATFORM_PROFILER="-qfullpath"
+		PLATFORM_CLEAN_MAGIGS="-rm -f \$(SRC.f)"
+		AIX_COMMON_FLAGS="-qstrict -qarch=auto -qtune=auto"
+		CC_FLAGS="${PLATFORM_PROFILER} ${AIX_COMMON_FLAGS}"
+		AIX_CXX_TEMPLATES="-qfuncsect -DH_INCLUDES_CC"
+		CXXFLAGS="${CXXFLAGS} -DUSE_NEW_IO -qrtti ${PLATFORM_PROFILER} -DGL_GLEXT_PROTOTYPES ${AIX_COMMON_FLAGS} ${AIX_CXX_TEMPLATES}"
+		# AR="ar -r -l -v -X32"
+		#AR="ar -X64 cru"
+		#ARFLAGS="${ARFLAGS} -X64"
+		#AR_FLAGS="-X64 cru"
+		#echo "ARFLAGS  = ${ARFLAGS}"
+		#echo "AR_FLAGS = ${AR_FLAGS}"
+		RANLIB="/bin/true"
+		LEX="flex -l"
+		CPP="xlc -E -C"
+		CFLAGS="${CFLAGS} -DAIX"
+		CXXFLAGS="${CXXFLAGS} -DAIX"
+		#F2o_RULE="\$(CPP) \$(CPP_FLAGS) \$(FPP_FLAGS) -c \$*.F > \$*.f ; echo \"FC=\$(FC)\" ; \$(FC) -c \$(FC_FLAGS) \$*.f"
+		MAJOR_VERSION=`uname -v`
+		FDBLIB="-L/usr/local/lib/metaps/lib -lfdb"
+		#METVIEW_DEFINES="-DXMSTRINGDEFINES"   DO WE NEED THIS?????
+		EMOS_DEFINES="-DIBM -Drs6000"
+
+		CPPFLAGS="${CPPFLAGS} -DMETVIEW_AIX_XLC -I/usr/include/freetype2" # -I/usr/include/freetype2 -I/opt/freeware/include -I/usr/local/include"
+		LIBS="${LIBS} -lfreetype $LIBS -lpng -lz -liconv"  # for terralib
+		AIX_GD_LIBS="-lfontconfig -liconv"
+		METVIEW_3RDPARTY_LIBS="${METVIEW_3RDPARTY_LIBS} -lfreetype -lpng"
+		;;
+	# HP - aCC
+	*-*-hpux* )
+		OS="hpux"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. ' { print $2 }'`
+		AXX="-AA -Wp,-H30000"
+		RANLIB="/usr/bin/ranlib"
+		;;
+    # MacOSX 10.8
+    *darwin* )
+        OS="macosx"
+        F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+        MAJOR_VERSION=`uname -r | awk -F. ' { print $2 }'`
+        AXX=""
+        CFLAGS="$CFLAGS -Dmacosx -I/usr/include/sys"
+        CXXFLAGS="$CXXFLAGS -Dmacosx -I/usr/include/sys"
+        CPPFLAGS="$CPPFLAGS -I/opt/local/include -I/usr/local/include"
+        LDFLAGS="$LDFLAGS -L/opt/local/lib -L/usr/local/lib"
+    ;;
+	# Compaq alpha ev68-dec-osf5.1 compiler
+	*-dec-osf5.* )
+		OS="osf1"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }' | sed 's/V//'`
+		AXX="-std strict_ansi -noimplicit_include"
+		;;
+	*-irix* )
+		OS="irix"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }'`
+		RANLIB="/bin/true"
+		;;
+	*-sun* )
+		OS="sun"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }'`
+		METVIEW_DEFINES="-D__GLX_MOTIF -DGLX_PROBLEMS"
+		RANLIB="/usr/bin/true"
+		;;
+	*-*-cygwin* | *-*-mingw32*)
+		echo " "
+		echo "You try to install Metview on Windows!"
+		echo " "
+		echo " Please be aware that Windows is NOT a supported platform!!!"
+		echo " "
+		;;
+esac
+
+
+# overwrite MV_ENVIRON if at non-ECMWF site
+if test "x$SITE_NAME" != 'xecmwf'; then
+ MV_ENVIRON="common"
+fi
+
+
+
+
+#AC_SUBST(ARFLAGS)
+#AC_SUBST(AR_FLAGS)
+
+
+
+#
+# Compiler dependent Compiler options
+#
+case "${CXX}" in
+	# GNU GCC
+	g++ )
+		CFLAGS="$CFLAGS $AXX" # -std=c99 -ansi -fpermissive
+		CXXFLAGS="${CXXFLAGS} ${AXX} -fno-gnu-keywords -Wno-deprecated -Wno-write-strings" # -ansi -std=c++98
+		CPPLIBS="-lstdc++"
+		OPTI="${OPTI} -O2"
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtq in -lquadmath" >&5
+$as_echo_n "checking for sqrtq in -lquadmath... " >&6; }
+if test "${ac_cv_lib_quadmath_sqrtq+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lquadmath  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqrtq ();
+int
+main ()
+{
+return sqrtq ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_quadmath_sqrtq=yes
+else
+  ac_cv_lib_quadmath_sqrtq=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_quadmath_sqrtq" >&5
+$as_echo "$ac_cv_lib_quadmath_sqrtq" >&6; }
+if test "x$ac_cv_lib_quadmath_sqrtq" = x""yes; then :
+  LIBS="${LIBS} -lquadmath"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No libquadmath found --- you only need it if you use GCC 4.6 or newer." >&5
+$as_echo "$as_me: WARNING: No libquadmath found --- you only need it if you use GCC 4.6 or newer." >&2;}
+fi
+
+		;;
+	# Intel compiler 9.x
+	icpc | icc )
+		OPTI="${OPTI} -O2"
+		# replace -i-static with -static-intel  !!!!
+		CFLAGS="${CFLAGS} -i-static -wr654 -wr1125 -wr1011"
+		CXXFLAGS="${CXXFLAGS} -i-static -wr654 -wr1125 -wr1011"
+		# -i-static does the job but if any libraries compiled with g++ are used this is needed
+		CPPLIBS="-lstdc++"
+		;;
+	# Portland C++
+	pgCC )
+		CPPLIBS=""     # assumes you use pgf90 or pgf77
+		;;
+	# IBM C++ compiler
+	xlC_r | xlC )
+		#  -qtune=auto
+		#
+		# -qfuncsect
+		#
+		# -qmkshrobj   --> no entry point message??? (570 MB)
+		#
+		#- qtemplateregistry=/scratch/graphics/cgm/metview/IBM/templateregistry
+		#
+		#	rm -f ${PWD}/templateregistry
+		#	CXXFLAGS="-qstrict -qfuncsect -qtemplateregistry=${PWD}/templateregistry -qmaxmem=-1 -qarch=auto -bmaxdata:2000000000"
+		# AR_BITFLAGS="-X32"
+		OPTI="${OPTI} -O2"
+		LDFLAGS="$LDFLAGS -Wl,-bbigtoc"  # to allow a larger number of symbols
+		CFLAGS="-qtune=auto -qstrict -qmaxmem=-1 -qarch=auto -bmaxdata:3000000000 $CFLAGS"
+		CXXFLAGS="-qtune=auto -qstrict -qfuncsect -qmaxmem=-1 -qarch=auto -bmaxdata:3000000000 ${CXXFLAGS}"
+		CPPLIBS="${CPPLIBS} -lC"     # should strictly not nessecary when xlf is used
+		;;
+	# all other C++ compilers ...
+	* )
+		;;
+esac
+
+
+
+# end of C++
+
+############################################################################
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+############################################################################
+#
+# Which fortran compiler should be used?
+#
+# FLIBS is determined which Fortran compiler was used for Emoslib!!!
+#
+F77_ODB=""
+MAGICS_DEFINES=""
+MV_FLIBS=""
+
+case "${F77}" in
+	gfortran )
+		MAGICS_DEFINES="${MAGICS_DEFINES} -DGFORTRAN"
+		FC_BITFLAGS="${AXX} -DGFORTRAN -fno-second-underscore -fpic -fdefault-real-8 -fcray-pointer"
+		FLIBS="${FLIBS} -lgfortran"
+		LDFLAGS="${LDFLAGS} -lgfortran"
+		FFLAGS="${FFLAGS} ${AXX}"
+		MV_FLIBS="${FLIBS}"
+		FC_FLAGS="${FC_BITFLAGS}"
+		FFLAGS="${FFLAGS} ${FC_BITFLAGS}"
+		;;
+
+	g77 )
+		echo "Oops ... $F77 not implemented yet"
+		FFLAGS="${FFLAGS}"
+		FLIBS="${FLIBS}"
+		;;
+
+	# Intel compiler
+	ifc | ifort)
+		#echo "Oops ... $F77 not implemented yet"
+		FC_BITFLAGS=""
+		FFLAGS="${FFLAGS}"
+		FLIBS="${FLIBS} -lifcore -lifport"
+		FC_FLAGS="${FC_BITFLAGS}"
+		;;
+
+	# Portland C++
+	pgf90 | pgf77 )
+		#FLIBS="${FLIBS} -lpgftnrtl -lpgc"        # PGI 5.2
+		FLIBS="${FLIBS} -lpgf90rtl -lpgftnrtl -lrt -lpgf90 -lpgf902 -lpghpf -lpgf90_rpm1 -lpghpf2 -lpgc"    # PGI 7.1
+		#MV_FLIBS="${FLIBS} -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgftnrtl -lpgsse2 -lpgsse1 -lm -lpgc -lrt"
+		FC_BITFLAGS="-r8"
+		FLIBS="$FLIBS -lpgftnrtl -lpgc -lrt"   # PGI 7.1
+		MV_FLIBS="${FLIBS}"
+		F77_ODB="-lifsaux -lmpi_serial -lodbdummy -lpgmp -lpgf90 -lpgf90_rpm1 -lpgf902"
+		case "${host}" in
+			x86_64*linux*)
+				FFLAGS="${FFLAGS} -r8 -tp amd64 ${FC_BITFLAGS}"
+				;;
+			# Linux workstations x86
+			*86-*-linux* )
+				FFLAGS="${FFLAGS} -r8 -tp px ${FC_BITFLAGS}"
+				;;
+		esac
+		FC_BITFLAGS="${FC_BITFLAGS} ${FFLAGS}"
+        FCFLAGS="${FC_BITFLAGS} ${FCFLAGS}"
+		;;
+
+	# IBM fortran compiler
+	xlf | xlf90 | xlf_r | xlf90_r )
+		MAGICS_DEFINES="${MAGICS_DEFINES}"
+		FC_BITFLAGS="${AXX} -qrealsize=8 -qintsize=4"
+		FC_LINK_BITFLAGS="$AXX"
+		FCFLAGS="\$(AIX_COMMON_FLAGS) -qextname -qddim -bdynamic -qnoescape -qmaxmem=-1 ${FC_BITFLAGS} ${PLATFORM_PROFILER}"
+		#FFLAGS="${FFLAGS} ${AXX}"
+		#METVIEW_FC_FLAGS="-I${grib_location}/include64 ${METVIEW_FC_FLAGS}"
+		EMOS_FC_FLAGS="-qfixed -qintlog"
+		#APTRA_FC_FLAGS="\$(PLATFORM_FC_FLAGS) \$(METVIEW_FC_FLAGS)"
+		MACRO_F90_FLAGS="-qsuffix=f=f90"
+		FLIBS="-lxlf90"
+		MV_FLIBS="-lxlfpad -lxlf90 -lxlf"
+		FFLAGS="${FFLAGS} ${AXX} ${FC_BITFLAGS}"
+		FFIXED_FLAGS="-qfixed=72"
+		F77_ODB="-lodbec -lifsaux -lmpi_serial -lesslsmp -lodbdummy -L/usr/lpp/xlf/lib -lxlf90 -lxlopt -lxlf -lxlsmp -lpthreads -lm -lc"
+		;;
+	# all other C++ compilers ...
+	* )
+		if test "x${F77}" = "x"; then
+			echo "No Fortran compiler defined! Use F77=<name> to set one."
+			FLIBS=""
+		else
+		echo "Oops ... $F77 not supported yet"
+		fi
+		;;
+esac
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# end of F O R T R A N
+
+
+#########################################################################################
+#
+#  CHECKING CONFIGURE OPTIONS!!!!
+#
+#  enabling graphical user interface
+#
+#########################################################################################
+
+# Check whether --enable-ui was given.
+if test "${enable_ui+set}" = set; then :
+  enableval=$enable_ui; ui=$enableval
+else
+  ui=yes
+fi
+
+
+if test "x$ui" = xyes; then
+    case "${host}" in
+	    *linux*)
+		    $as_echo "#define METVIEW_GUI 1" >>confdefs.h
+
+		    echo ""
+		    #echo "Your OpenGL setup:"
+		    #glxinfo | grep rendering
+		    #glxinfo | grep "OpenGL vendor"
+		    #glxinfo | grep "OpenGL version"
+		    #glxinfo | grep "glx vendor"
+		    #glxinfo | grep "glx version"
+		    #echo ""
+		    for ac_header in Xm/Xm.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
+if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_XM_XM_H 1
+_ACEOF
+
+fi
+
+done
+
+		    ;;
+        *aix*)
+            $as_echo "#define METVIEW_GUI 1" >>confdefs.h
+
+            ;;
+        *darwin*)
+            $as_echo "#define METVIEW_GUI 1" >>confdefs.h
+
+            ;;
+	    * )
+		    echo "**************************************************"
+		    echo ""
+		    echo "  Currently the Graphical User Interface is not"
+		    echo "  supported on this platform!!!"
+		    echo ""
+		    echo "**************************************************"
+		    ui=no
+		    ;;
+    esac
+
+    ######################################################################
+    #
+    #     Qt
+    #
+    ######################################################################
+
+    qt=yes
+
+    # Qt with AutoTroll.
+    # Build Qt apps with the autotools (Autoconf/Automake).
+# M4 macros.
+# This file is part of AutoTroll.
+# Copyright (C) 2006  Benoit Sigoure <benoit.sigoure at lrde.epita.fr>
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# Disclaimer: Never tested with anything else than Qt 4.2! Feedback welcome.
+# Simply invoke AT_WITH_QT in your configure.ac. AT_WITH_QT can take
+# arguments which are documented in depth below. The default arguments are
+# equivalent to the default .pro file generated by qmake.
+#
+# Invoking AT_WITH_QT will do the following:
+#  - Add a --with-qt option to your configure
+#  - Find qmake, moc and uic and save them in the make variables $(QMAKE),
+#    $(MOC), $(UIC).
+#  - Save the path to Qt in $(QT_PATH)
+#  - Find the flags to use Qt, that is:
+#     * $(QT_DEFINES): -D's defined by qmake.
+#     * $(QT_CFLAGS): CFLAGS as defined by qmake (C?!)
+#     * $(QT_CXXFLAGS): CXXFLAGS as defined by qmake.
+#     * $(QT_INCPATH): -I's defined by qmake.
+#     * $(QT_CPPFLAGS): Same as $(QT_DEFINES) + $(QT_INCPATH)
+#     * $(QT_LFLAGS): LFLAGS defined by qmake.
+#     * $(QT_LDFLAGS): Same thing as $(QT_LFLAGS).
+#     * $(QT_LIBS): LIBS defined by qmake.
+#
+# You *MUST* invoke $(MOC) and/or $(UIC) where necessary. AutoTroll provides
+# you with Makerules to ease this, here is a sample Makefile.am to use with
+# AutoTroll which builds the code given in the chapter 7 of the Qt Tutorial:
+# http://doc.trolltech.com/4.2/tutorial-t7.html
+#
+# -------------------------------------------------------------------------
+# include $(top_srcdir)/build-aux/autotroll.mk
+#
+# ACLOCAL_AMFLAGS = -I build-aux
+#
+# bin_PROGRAMS = lcdrange
+# lcdrange_SOURCES =  $(BUILT_SOURCES) lcdrange.cpp lcdrange.h main.cpp
+# lcdrange_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+# lcdrange_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+# lcdrange_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS)
+# lcdrange_LDADD    = $(QT_LIBS) $(LDADD)
+#
+# BUILT_SOURCES = lcdrange.moc.cpp
+# -------------------------------------------------------------------------
+#
+# Note that your MOC, UIC and QRC files *MUST* be listed manually in
+# BUILT_SOURCES. If you name them properly (eg: .moc.cc, .qrc.cc, .ui.cc -- of
+# course you can use .cpp or .cxx or .C rather than .cc) AutoTroll will build
+# them automagically for you (using implicit rules defined in autotroll.mk).
+
+
+
+
+
+
+
+# AT_WITH_QT([QT_modules], [QT_config], [QT_misc], [RUN-IF-FAILED], [RUN-IF-OK])
+# ------------------------------------------------------------------------------
+# Enable Qt support and add an option --with-qt to the configure script.
+#
+# The QT_modules argument is optional and defines extra modules to enable or
+# disable (it's equivalent to the QT variable in .pro files). Modules can be
+# specified as follows:
+#
+# AT_WITH_QT   => No argument -> No QT value.
+#                                Qmake sets it to "core gui" by default.
+# AT_WITH_QT([xml])   => QT += xml
+# AT_WITH_QT([+xml])  => QT += xml
+# AT_WITH_QT([-gui])  => QT -= gui
+# AT_WITH_QT([xml -gui +sql svg])  => QT += xml sql svg
+#                                     QT -= gui
+#
+# The QT_config argument is also optional and follows the same convention as
+# QT_modules. Instead of changing the QT variable, it changes the CONFIG
+# variable, which is used to tweak configuration and compiler options.
+#
+# The last argument, QT_misc (also optional) will be copied as-is the .pro
+# file used to guess how to compile Qt apps. You may use it to further tweak
+# the build process of Qt apps if tweaking the QT or CONFIG variables isn't
+# enough for you.
+#
+# RUN-IF-FAILED is arbitrary code to execute if Qt cannot be found or if any
+# problem happens.  If this argument is omitted, then AC_MSG_ERROR will be
+# called.  RUN-IF-OK is arbitrary code to execute if Qt was successfully found.
+
+
+# AT_REQUIRE_QT_VERSION(QT_version, RUN-IF-FAILED, RUN-IF-OK)
+# -----------------------------------------------------------
+# Check (using qmake) that Qt's version "matches" QT_version.
+# Must be run AFTER AT_WITH_QT. Requires autoconf 2.60.
+#
+# RUN-IF-FAILED is arbitrary code to execute if Qt cannot be found or if any
+# problem happens.  If this argument is omitted, then AC_MSG_ERROR will be
+# called.  RUN-IF-OK is arbitrary code to execute if Qt was successfully found.
+
+
+# _AT_TWEAK_PRO_FILE(QT_VAR, VALUE)
+# ---------------------------
+# @internal. Tweak the variable QT_VAR in the .pro.
+# VALUE is an IFS-separated list of value and each value is rewritten
+# as follows:
+#   +value  => QT_VAR += value
+#   -value  => QT_VAR -= value
+#    value  => QT_VAR += value
+
+
+    echo "$as_me: this is autotroll.m4 serial 4" >&5
+
+  test x"$TROLL" != x && echo 'ViM rox emacs.'
+
+
+# Check whether --with-qt was given.
+if test "${with_qt+set}" = set; then :
+  withval=$with_qt; QT_PATH=$withval
+fi
+
+
+  # this is a hack to get decent flow control with 'break'
+  for _qt_ignored in once; do
+
+  # Find Qt.
+
+  if test -d /usr/local/Trolltech; then
+    # Try to find the latest version.
+    tmp_qt_paths=`echo /usr/local/Trolltech/*/bin | tr ' ' '\n' | sort -nr \
+                                              | xargs | sed 's/  */:/g'`
+  fi
+  # Path to which recent MacPorts (~v1.7) install Qt4.
+  test -d /opt/local/libexec/qt4-mac/bin \
+    && tmp_qt_paths="$tmp_qt_paths:/opt/local/libexec/qt4-mac/bin"
+
+  # Find qmake.
+
+  for ac_prog in qmake qmake-qt4 qmake-qt3
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_QMAKE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $QMAKE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_QMAKE="$QMAKE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$QT_DIR:$QT_PATH:$PATH:$tmp_qt_paths"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_QMAKE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+QMAKE=$ac_cv_path_QMAKE
+if test -n "$QMAKE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5
+$as_echo "$QMAKE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$QMAKE" && break
+done
+test -n "$QMAKE" || QMAKE="missing"
+
+  if test x"$QMAKE" = xmissing; then
+    as_fn_error "Cannot find qmake in your PATH. Try using --with-qt." "$LINENO" 5
+    break
+  fi
+
+  # Find moc (Meta Object Compiler).
+
+  for ac_prog in moc moc-qt4 moc-qt3
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MOC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MOC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$QT_PATH:$PATH:$tmp_qt_paths"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MOC=$ac_cv_path_MOC
+if test -n "$MOC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
+$as_echo "$MOC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MOC" && break
+done
+test -n "$MOC" || MOC="missing"
+
+  if test x"$MOC" = xmissing; then
+    as_fn_error "Cannot find moc (Meta Object Compiler) in your PATH. Try using --with-qt." "$LINENO" 5
+    break
+  fi
+
+  # Find uic (User Interface Compiler).
+
+  for ac_prog in uic uic-qt4 uic-qt3 uic3
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_UIC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $UIC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_UIC="$UIC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$QT_PATH:$PATH:$tmp_qt_paths"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_UIC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+UIC=$ac_cv_path_UIC
+if test -n "$UIC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UIC" >&5
+$as_echo "$UIC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$UIC" && break
+done
+test -n "$UIC" || UIC="missing"
+
+  if test x"$UIC" = xmissing; then
+    as_fn_error "Cannot find uic (User Interface Compiler) in your PATH. Try using --with-qt." "$LINENO" 5
+    break
+  fi
+
+  # Find rcc (Qt Resource Compiler).
+
+  for ac_prog in rcc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RCC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $RCC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RCC="$RCC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$QT_PATH:$PATH:$tmp_qt_paths"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RCC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+RCC=$ac_cv_path_RCC
+if test -n "$RCC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RCC" >&5
+$as_echo "$RCC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$RCC" && break
+done
+test -n "$RCC" || RCC="false"
+
+  if test x"$UIC" = xfalse; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find rcc (Qt Resource Compiler) in your PATH.\
+  Try using --with-qt." >&5
+$as_echo "$as_me: WARNING: Cannot find rcc (Qt Resource Compiler) in your PATH.\
+  Try using --with-qt." >&2;}
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host operating system is Darwin" >&5
+$as_echo_n "checking whether host operating system is Darwin... " >&6; }
+  at_darwin=no
+  at_qmake_args=
+  case $host_os in
+    darwin*)
+      at_darwin=yes
+      at_qmake_args='-spec macx-g++'
+      ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_darwin" >&5
+$as_echo "$at_darwin" >&6; }
+
+  # If we don't know the path to Qt, guess it from the path to qmake.
+  if test x"$QT_PATH" = x; then
+    QT_PATH=`dirname "$QMAKE"`
+  fi
+  if test x"$QT_PATH" = x; then
+    as_fn_error "Cannot find the path to your Qt install. Use --with-qt." "$LINENO" 5
+    break
+  fi
+
+
+  # Get ready to build a test-app with Qt.
+  if mkdir conftest.dir && cd conftest.dir; then :; else
+    as_fn_error "Cannot mkdir conftest.dir or cd to that directory." "$LINENO" 5
+    break
+  fi
+
+  cat >conftest.h <<_ASEOF
+#include <QObject>
+
+class Foo: public QObject
+{
+  Q_OBJECT;
+public:
+  Foo();
+  ~Foo() {}
+public Q_SLOTS:
+  void setValue(int value);
+Q_SIGNALS:
+  void valueChanged(int newValue);
+private:
+  int value_;
+};
+_ASEOF
+
+  cat >conftest.cpp <<_ASEOF
+#include "conftest.h"
+Foo::Foo()
+  : value_ (42)
+{
+  connect(this, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)));
+}
+
+void Foo::setValue(int value)
+{
+  value_ = value;
+}
+
+int main()
+{
+  Foo f;
+}
+_ASEOF
+  if $QMAKE -project; then :; else
+    as_fn_error "Calling $QMAKE -project failed." "$LINENO" 5
+    break
+  fi
+
+  # Find the .pro file generated by qmake.
+  pro_file='conftest.dir.pro'
+  test -f $pro_file || pro_file=`echo *.pro`
+  if test -f "$pro_file"; then :; else
+    as_fn_error "Can't find the .pro file generated by Qmake." "$LINENO" 5
+    break
+  fi
+
+ # Tweak the value of QT in the .pro file for +xmlpatterns +xml +network.
+
+  qt_conf=''
+  for at_mod in +xmlpatterns +xml +network; do
+    at_mod=`echo "$at_mod" | sed 's/^-//; tough
+                                  s/^+//; beef
+                                  :ough
+                                  s/^/QT -= /;n
+                                  :eef
+                                  s/^/QT += /'`
+    qt_conf="$qt_conf
+$at_mod"
+  done
+  echo "$qt_conf" | sed 1d >>"$pro_file"
+
+
+
+
+
+
+  echo "$as_me:$LINENO: Invoking $QMAKE on $pro_file" >&5
+  sed 's/^/| /' "$pro_file" >&5
+
+  if $QMAKE $at_qmake_args; then :; else
+    as_fn_error "Calling $QMAKE $at_qmake_args failed." "$LINENO" 5
+    break
+  fi
+
+  # QMake has a very annoying misfeature: sometimes it generates Makefiles
+  # where all the references to the files from the Qt installation are
+  # relative.  We can't use them as-is because if we take, say, a
+  # -I../../usr/include/Qt from that Makefile, the flag is invalid as soon
+  # as we use it in another (sub) directory.  So what this perl pass does is
+  # that it rewrite all relative paths to absolute paths.  Another problem
+  # when building on Cygwin is that QMake mixes paths with blackslashes and
+  # forward slashes and paths must be handled with extra care because of the
+  # stupid Windows drive letters.
+  echo "$as_me:$LINENO: fixing the Makefiles:" Makefile* >&5
+  cat >fixmk.pl <<\EOF
+use strict;
+use Cwd qw(cwd abs_path);
+# This variable is useful on Cygwin for the following reason: Say that you are
+# in `/' (that is, in fact you are in C:/cygwin, or something like that) if you
+# `cd ..' then obviously you remain in `/' (that is in C:/cygwin).  QMake
+# generates paths that are relative to C:/ (or another driver letter, whatever)
+# so the trick to get the `..' resolved properly is to prepend the absolute
+# path of the current working directory in a Windows-style.  C:/cygwin/../ will
+# properly become C:/.
+my $d = "";
+my $r2a = 0;
+my $b2f = 0;
+
+my $cygwin = 0;
+if ($^O eq "cygwin") {
+  $cygwin = 1;
+  $d = cwd();
+  $d = `cygpath --mixed '$d'`;
+  chomp($d);
+  $d .= "/";
+}
+
+sub rel2abs($)
+{
+  my $p = $d . shift;
+  # print "r2a p=$p";
+  -e $p || return $p;
+  if ($cygwin) {
+    $p = `cygpath --mixed '$p'`;
+    chomp($p);
+  }
+  else {
+    # Do not use abs_path on Cygwin: it incorrectly resolves the paths that are
+    # relative to C:/ rather than `/'.
+    $p = abs_path($p);
+  }
+  # print " -> $p\n";
+  ++$r2a;
+  return $p;
+}
+
+# Only useful on Cygwin.
+sub back2forward($)
+{
+  my $p = shift;
+  # print "b2f p=$p";
+  -e $p || return $p;
+  $p = `cygpath --mixed '$p'`;
+  chomp($p);
+  # print " -> $p\n";
+  ++$b2f;
+  return $p;
+}
+
+foreach my $mk (@ARGV)
+{
+  next if $mk =~ /~$/;
+  open(MK, $mk) or die("open $mk: $!");
+  # print "mk=$mk\n";
+  my $file = join("", <MK>);
+  close(MK) or die("close $mk: $!");
+  rename $mk, $mk . "~" or die("rename $mk: $!");
+  $file =~ s{(?:\.\.[\\/])+(?:[^"'\s:]+)}{rel2abs($&)}gse;
+  $file =~ s{(?:[a-zA-Z]:[\\/])?(?:[^"\s]+\\[^"\s:]+)+}
+            {back2forward($&)}gse if $cygwin;
+  open(MK, ">", $mk) or die("open >$mk: $!");
+  print MK $file;
+  close(MK) or die("close >$mk: $!");
+  print "$mk: updated $r2a relative paths and $b2f backslash-style paths\n";
+  $r2a = 0;
+  $b2f = 0;
+}
+EOF
+
+  perl >&5 -w fixmk.pl Makefile* ||
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to fix the Makefiles generated by $QMAKE" >&5
+$as_echo "$as_me: WARNING: failed to fix the Makefiles generated by $QMAKE" >&2;}
+  rm -f fixmk.pl
+
+  # Try to compile a simple Qt app.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build a simple Qt app" >&5
+$as_echo_n "checking whether we can build a simple Qt app... " >&6; }
+if test "${at_cv_qt_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_qt_build=ko
+  : ${MAKE=make}
+
+  if $MAKE >&5 2>&1; then
+    at_cv_qt_build='ok, looks like Qt 4'
+  else
+    echo "$as_me:$LINENO: Build failed, trying to #include <qobject.h> \
+instead" >&5
+    sed 's/<QObject>/<qobject.h>/' conftest.h > tmp.h && mv tmp.h conftest.h
+    if $MAKE >&5 2>&1; then
+      at_cv_qt_build='ok, looks like Qt 3'
+    else
+      # Sometimes (such as on Debian) build will fail because Qt hasn't been
+      # installed in debug mode and qmake tries (by default) to build apps in
+      # debug mode => Try again in release mode.
+      echo "$as_me:$LINENO: Build failed, trying to enforce release mode" \
+            >&5
+
+       # Tweak the value of CONFIG in the .pro file for +release.
+
+  qt_conf=''
+  for at_mod in +release; do
+    at_mod=`echo "$at_mod" | sed 's/^-//; tough
+                                  s/^+//; beef
+                                  :ough
+                                  s/^/CONFIG -= /;n
+                                  :eef
+                                  s/^/CONFIG += /'`
+    qt_conf="$qt_conf
+$at_mod"
+  done
+  echo "$qt_conf" | sed 1d >>"$pro_file"
+
+
+      sed 's/<qobject.h>/<QObject>/' conftest.h > tmp.h && mv tmp.h conftest.h
+      if $MAKE >&5 2>&1; then
+        at_cv_qt_build='ok, looks like Qt 4, release mode forced'
+      else
+        echo "$as_me:$LINENO: Build failed, trying to #include <qobject.h> \
+instead" >&5
+        sed 's/<QObject>/<qobject.h>/' conftest.h >tmp.h && mv tmp.h conftest.h
+        if $MAKE >&5 2>&1; then
+          at_cv_qt_build='ok, looks like Qt 3, release mode forced'
+        else
+          at_cv_qt_build=ko
+          echo "$as_me:$LINENO: failed program was:" >&5
+          sed 's/^/| /' conftest.h >&5
+          echo "$as_me:$LINENO: failed program was:" >&5
+          sed 's/^/| /' conftest.cpp >&5
+        fi # if make with Qt3-style #include and release mode forced.
+      fi # if make with Qt4-style #include and release mode forced.
+    fi # if make with Qt3-style #include.
+  fi # if make with Qt4-style #include.
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_qt_build" >&5
+$as_echo "$at_cv_qt_build" >&6; }
+  if test x"$at_cv_qt_build" = xko; then
+    as_fn_error "Cannot build a test Qt program" "$LINENO" 5
+    break
+  fi
+  QT_VERSION_MAJOR=`echo "$at_cv_qt_build" | sed 's/[^0-9]*//g'`
+
+
+  # This sed filter is applied after an expression of the form: /^FOO.*=/!d;
+  # It starts by removing the beginning of the line, removing references to
+  # SUBLIBS, removing unnecessary whitespaces at the beginning, and prefixes
+  # all variable uses by QT_.
+  qt_sed_filter='s///;
+                 s/$(SUBLIBS)//g;
+                 s/^ *//;
+                 s/\$(\([A-Z_][A-Z_]*\))/$(QT_\1)/g'
+
+  # Find the Makefile (qmake happens to generate a fake Makefile which invokes
+  # a Makefile.Debug or Makefile.Release). We we have both, we'll pick the
+  # Makefile.Release. The reason is that the main difference is that release
+  # uses -Os and debug -g. We can override -Os by passing another -O but we
+  # usually don't override -g.
+  if test -f Makefile.Release; then
+    at_mfile='Makefile.Release'
+  else
+    at_mfile='Makefile'
+  fi
+  if test -f $at_mfile; then :; else
+    as_fn_error "Cannot find the Makefile generated by qmake." "$LINENO" 5
+    break
+  fi
+
+  # Find the DEFINES of Qt (should have been named CPPFLAGS).
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DEFINES to use with Qt" >&5
+$as_echo_n "checking for the DEFINES to use with Qt... " >&6; }
+if test "${at_cv_env_QT_DEFINES+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_env_QT_DEFINES=`sed "/^DEFINES[^A-Z=]*=/!d;$qt_sed_filter" $at_mfile`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_env_QT_DEFINES" >&5
+$as_echo "$at_cv_env_QT_DEFINES" >&6; }
+  QT_DEFINES=$at_cv_env_QT_DEFINES
+
+
+  # Find the CFLAGS of Qt (We can use Qt in C?!)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the CFLAGS to use with Qt" >&5
+$as_echo_n "checking for the CFLAGS to use with Qt... " >&6; }
+if test "${at_cv_env_QT_CFLAGS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_env_QT_CFLAGS=`sed "/^CFLAGS[^A-Z=]*=/!d;$qt_sed_filter" $at_mfile`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_env_QT_CFLAGS" >&5
+$as_echo "$at_cv_env_QT_CFLAGS" >&6; }
+  QT_CFLAGS=$at_cv_env_QT_CFLAGS
+
+
+  # Find the CXXFLAGS of Qt.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the CXXFLAGS to use with Qt" >&5
+$as_echo_n "checking for the CXXFLAGS to use with Qt... " >&6; }
+if test "${at_cv_env_QT_CXXFLAGS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_env_QT_CXXFLAGS=`sed "/^CXXFLAGS[^A-Z=]*=/!d;$qt_sed_filter" $at_mfile`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_env_QT_CXXFLAGS" >&5
+$as_echo "$at_cv_env_QT_CXXFLAGS" >&6; }
+  QT_CXXFLAGS=$at_cv_env_QT_CXXFLAGS
+
+
+  # Find the INCPATH of Qt.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the INCPATH to use with Qt" >&5
+$as_echo_n "checking for the INCPATH to use with Qt... " >&6; }
+if test "${at_cv_env_QT_INCPATH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_env_QT_INCPATH=`sed "/^INCPATH[^A-Z=]*=/!d;$qt_sed_filter" $at_mfile`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_env_QT_INCPATH" >&5
+$as_echo "$at_cv_env_QT_INCPATH" >&6; }
+  QT_INCPATH=$at_cv_env_QT_INCPATH
+
+
+  QT_CPPFLAGS="$at_cv_env_QT_DEFINES $at_cv_env_QT_INCPATH"
+
+
+  # Find the LFLAGS of Qt (Should have been named LDFLAGS)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the LDFLAGS to use with Qt" >&5
+$as_echo_n "checking for the LDFLAGS to use with Qt... " >&6; }
+if test "${at_cv_env_QT_LDFLAGS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_env_QT_LDFLAGS=`sed "/^LFLAGS[^A-Z=]*=/!d;$qt_sed_filter" $at_mfile`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_env_QT_LDFLAGS" >&5
+$as_echo "$at_cv_env_QT_LDFLAGS" >&6; }
+  QT_LFLAGS=$at_cv_env_QT_LDFLAGS
+
+  QT_LDFLAGS=$at_cv_env_QT_LDFLAGS
+
+
+  # Find the LIBS of Qt.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the LIBS to use with Qt" >&5
+$as_echo_n "checking for the LIBS to use with Qt... " >&6; }
+if test "${at_cv_env_QT_LIBS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  at_cv_env_QT_LIBS=`sed "/^LIBS[^A-Z]*=/!d;$qt_sed_filter" $at_mfile`
+   if test x$at_darwin = xyes; then
+     # Fix QT_LIBS: as of today Libtool (GNU Libtool 1.5.23a) doesn't handle
+     # -F properly. The "bug" has been fixed on 22 October 2006
+     # by Peter O'Gorman but we provide backward compatibility here.
+     at_cv_env_QT_LIBS=`echo "$at_cv_env_QT_LIBS" \
+                             | sed 's/^-F/-Wl,-F/;s/ -F/ -Wl,-F/g'`
+   fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_env_QT_LIBS" >&5
+$as_echo "$at_cv_env_QT_LIBS" >&6; }
+  QT_LIBS=$at_cv_env_QT_LIBS
+
+
+  cd .. && rm -rf conftest.dir
+
+  # Run the user code
+
+
+  done  # end hack (useless for to be able to use break)
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt" >&5
+$as_echo_n "checking for Qt... " >&6; }
+
+  # this is a hack to get decent flow control with 'break'
+  for _qt_ignored in once; do
+
+  if test x"$QMAKE" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$QMAKE is empty.\
+  Did you invoke AT_WITH_QT before AT_REQUIRE_QT_VERSION?" >&5
+$as_echo "$as_me: WARNING: \$QMAKE is empty.\
+  Did you invoke AT_WITH_QT before AT_REQUIRE_QT_VERSION?" >&2;}; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Qt version >= 4.6 is required" >&5
+$as_echo "$as_me: WARNING: Qt version >= 4.6 is required" >&2;}
+    break
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt's version" >&5
+$as_echo_n "checking for Qt's version... " >&6; }
+if test "${at_cv_QT_VERSION+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  echo "$as_me:$LINENO: Running $QMAKE --version:" >&5
+  $QMAKE --version >&5 2>&1
+  qmake_version_sed='/^.*\([0-9]\.[0-9]\.[0-9]\).*$/!d;s//\1/'
+  at_cv_QT_VERSION=`$QMAKE --version 2>&1 | sed "$qmake_version_sed"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_QT_VERSION" >&5
+$as_echo "$at_cv_QT_VERSION" >&6; }
+  if test x"$at_cv_QT_VERSION" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot detect Qt's version." >&5
+$as_echo "$as_me: WARNING: Cannot detect Qt's version." >&2;}; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Qt version >= 4.6 is required" >&5
+$as_echo "$as_me: WARNING: Qt version >= 4.6 is required" >&2;}
+    break
+  fi
+  QT_VERSION=$at_cv_QT_VERSION
+
+  as_arg_v1=$QT_VERSION
+as_arg_v2=4.6
+awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
+case $? in #(
+  1) :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This package requires Qt 4.6 or above." >&5
+$as_echo "$as_me: WARNING: This package requires Qt 4.6 or above." >&2;}; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Qt version >= 4.6 is required" >&5
+$as_echo "$as_me: WARNING: Qt version >= 4.6 is required" >&2;}; break;  ;; #(
+  0) :
+     ;; #(
+  2) :
+     ;; #(
+  *) :
+     ;;
+esac
+
+  # Run the user code
+
+
+  done  # end hack (useless for to be able to use break)
+
+
+    # ensure that the Qt/XmlPatterns headers are installed
+    SAVED_CPPFLAGS=${CPPFLAGS} # save CPPFLAGS
+    CPPFLAGS="${CPPFLAGS} ${QT_INCPATH}"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_fn_cxx_check_header_mongrel "$LINENO" "QXmlQuery" "ac_cv_header_QXmlQuery" "$ac_includes_default"
+if test "x$ac_cv_header_QXmlQuery" = x""yes; then :
+
+else
+  as_fn_error "Could not successfully find or compile with QXmlQuery. This should be in the Qt/XmlPatterns or Qt/Webkit dev package" "$LINENO" 5
+fi
+
+
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+    CPPFLAGS=${SAVED_CPPFLAGS} # restore CPPFLAGS
+
+
+    $as_echo "#define METVIEW_QT 1" >>confdefs.h
+
+    CXXFLAGS="${CXXFLAGS} -DMETVIEW_QT"
+    MAGPLUS_LIB="-lMagPlusQt ${MAGPLUS_LIB}"
+    echo "set"
+
+    # remove any optmisation flags that we get from Qt - we want to control our own
+    QT_CFLAGS=`echo ${QT_CFLAGS} | sed "s/-O.//g"`
+    QT_CXXFLAGS=`echo ${QT_CXXFLAGS} | sed "s/-O.//g"`
+    QT_CPPFLAGS=`echo ${QT_CPPFLAGS} | sed "s/-O.//g"`
+
+    # unfortunately, qmake combines its linker flags with its libraries in its LIBS variable
+    # which is translated into QT_LIBS. On some systems we need finer-grain control over the
+    # positioning of these elements, so we need to do a search & replace with some 'sed' magic
+    # in order to extract the different components: QT_EXTRACTED_LDFLAGS should contain just the
+    # -L/library/path elements, and QT_EXTRACTED_LIBS should contain everything else. We then
+    # put these back into QT_LIBS and QT_LDFLAGS.
+    QT_EXTRACTED_LIBS=`echo " ${QT_LIBS}" | sed 's/ -L[^ ]*//g'`
+    QT_EXTRACTED_LDFLAGS=`echo " ${QT_LIBS}" | sed 's/ -[^L][^ ]*//g' | sed 's/ [^-][^L][^ ]*//g'`
+
+    QT_LIBS=$QT_EXTRACTED_LIBS
+    QT_LDFLAGS="$QT_LDFLAGS $QT_EXTRACTED_LDFLAGS"
+
+
+
+
+
+    ######################################################################
+    #
+    #     Qt debug
+    #
+    ######################################################################
+
+    # Check whether --enable-qtdebug was given.
+if test "${enable_qtdebug+set}" = set; then :
+  enableval=$enable_qtdebug; qtdebug=$enableval
+else
+  qtdebug=no
+fi
+
+
+    if test "x${qt}" = xyes -a "x${qtdebug}" = xno ; then
+	    CXXFLAGS="${CXXFLAGS} -DQT_NO_DEBUG_OUTPUT"
+    fi
+
+else
+    ui=no
+    qt=no
+    echo "                         ***"
+    echo "Building batch version with no graphical user interface."
+    echo "                         ***"
+fi
+
+
+
+
+
+
+######################################################################
+#
+#  Magics++ support  --enable-magics
+#
+######################################################################
+# Check whether --enable-magics was given.
+if test "${enable_magics+set}" = set; then :
+  enableval=$enable_magics; magics=$enableval
+else
+  magics=yes
+fi
+
+
+magics_odb=no
+
+if test "x$magics" = xyes; then
+
+  #################################################
+  #
+  #   M A G P L U S  H O M E
+  #
+
+# Check whether --with-magics-home was given.
+if test "${with_magics_home+set}" = set; then :
+  withval=$with_magics_home;
+
+fi
+
+
+  # if no magics home is set we try /usr/local or assume /usr as default
+  if test "x${with_magics_home}" = "x" ; then
+    if test -e ${MAGPLUS_HOME}/bin/magics-config ; then
+       with_magics_home=${MAGPLUS_HOME}
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $MAGPLUS_HOME is not a valid Magics directory, so we test for more ..." >&5
+$as_echo "$as_me: WARNING: $MAGPLUS_HOME is not a valid Magics directory, so we test for more ..." >&2;}
+       if test -e /usr/local/bin/magics-config ; then
+         with_magics_home=/usr/local
+         echo " FOUND Magics in /usr/local"
+       elif test -e /usr/bin/magics-config ; then
+         with_magics_home=/usr
+         echo " FOUND Magics in /usr"
+       else
+         as_fn_error "No location found for Magics!!!" "$LINENO" 5
+       fi
+    fi
+  fi
+  MAGPLUS_HOME="${with_magics_home}"
+
+  ##################################################
+
+  export PKG_CONFIG_PATH=${MAGPLUS_HOME}/lib64/pkgconfig/:${MAGPLUS_HOME}/lib/pkgconfig/:${PKG_CONFIG_PATH}
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		PKG_CONFIG=""
+	fi
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAGICS" >&5
+$as_echo_n "checking for MAGICS... " >&6; }
+
+if test -n "$MAGICS_CFLAGS"; then
+    pkg_cv_MAGICS_CFLAGS="$MAGICS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"magics >= \${METVIEW_MAGICS_MIN_VERSION}\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "magics >= ${METVIEW_MAGICS_MIN_VERSION}") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_MAGICS_CFLAGS=`$PKG_CONFIG --cflags "magics >= ${METVIEW_MAGICS_MIN_VERSION}" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$MAGICS_LIBS"; then
+    pkg_cv_MAGICS_LIBS="$MAGICS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"magics >= \${METVIEW_MAGICS_MIN_VERSION}\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "magics >= ${METVIEW_MAGICS_MIN_VERSION}") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_MAGICS_LIBS=`$PKG_CONFIG --libs "magics >= ${METVIEW_MAGICS_MIN_VERSION}" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        MAGICS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "magics >= ${METVIEW_MAGICS_MIN_VERSION}" 2>&1`
+        else
+	        MAGICS_PKG_ERRORS=`$PKG_CONFIG --print-errors "magics >= ${METVIEW_MAGICS_MIN_VERSION}" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$MAGICS_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+    magics=no
+    magics_ver=`${MAGPLUS_HOME}/bin/magics-config --version`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Magics version ${METVIEW_MAGICS_MIN_VERSION} is required. Detected: ${magics_ver}" >&5
+$as_echo "$as_me: WARNING: Magics version ${METVIEW_MAGICS_MIN_VERSION} is required. Detected: ${magics_ver}" >&2;}
+    as_fn_error "If you do not want Magics support, use the --disable-magics option." "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+
+    magics=no
+    magics_ver=`${MAGPLUS_HOME}/bin/magics-config --version`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Magics version ${METVIEW_MAGICS_MIN_VERSION} is required. Detected: ${magics_ver}" >&5
+$as_echo "$as_me: WARNING: Magics version ${METVIEW_MAGICS_MIN_VERSION} is required. Detected: ${magics_ver}" >&2;}
+    as_fn_error "If you do not want Magics support, use the --disable-magics option." "$LINENO" 5
+
+else
+	MAGICS_CFLAGS=$pkg_cv_MAGICS_CFLAGS
+	MAGICS_LIBS=$pkg_cv_MAGICS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+    # check where the libraries are
+    MAGPLUS_LIBDIR=`${MAGPLUS_HOME}/bin/magics-config --libdir`
+
+
+    MAGPLUSLIB_APPEND=${MAGPLUS_LIB}  # to add to the end, later
+    CPPFLAGS="$MAGICS_CFLAGS $CPPFLAGS"
+
+    MAGPLUS_CPPFLAGS="-I${with_magics_home}/include/magics ${MAGPLUS_CPPFLAGS}"
+    MAGPLUS_LDFLAGS="-L${MAGPLUS_LIBDIR} ${MAGPLUS_LDFLAGS}"
+    MAGPLUS_LIB="-L${MAGPLUS_LIBDIR} -lMagWrapper -lMagPlus -lexpat -lz -lm -lfontconfig"
+    # note: the NetCDF libraries will be added to MAGPLUS_LIB later in this script
+
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-metview`" = xno; then
+     as_fn_error "Magics has not been buiilt with Metview support! Please re-configure Magics with the --enable-metview flag." "$LINENO" 5
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-cairo`" = xyes; then
+     magics_cairo=yes
+    else
+     magics_cairo=no
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-bufr`" = xyes; then
+     magics_bufr=yes
+    else
+     magics_bufr=no
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-odb`" = xyes; then
+     magics_odb=yes
+    else
+     magics_odb=no
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-gd`" = xyes; then
+     magics_gd=yes
+     MAGPLUS_LIB="${MAGPLUS_LIB} -lgd -lfreetype -ljpeg -lpng"
+    else
+     magics_gd=no
+    fi
+
+    MAGPLUS_LIB="${MAGPLUS_LIB} ${MAGPLUSLIB_APPEND}"
+
+    ##################################
+    # check whether the static MagPlus library exists - if so, it should be a dependency of any
+    # Metview module which uses Magics++
+    DEPEND_MAGPLUS_LIBS=$${MAGPLUS_LIBDIR}/libMagWrapper.a
+    if test -e $${MAGPLUS_LIBDIR}/libMagPlus.a ; then
+      DEPEND_MAGPLUS_LIBS="${DEPEND_MAGPLUS_LIBS} ${MAGPLUS_LIBDIR}/libMagPlus.a"
+    fi
+    ##################################
+
+    $as_echo "#define METVIEW_MAGICS 1" >>confdefs.h
+
+    echo "Magics version detected:  `${MAGPLUS_HOME}/bin/magics-config --version`"
+
+fi
+fi
+
+
+
+
+#
+#   FREETYPE
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FcInitLoadConfigAndFonts in -lfontconfig" >&5
+$as_echo_n "checking for FcInitLoadConfigAndFonts in -lfontconfig... " >&6; }
+if test "${ac_cv_lib_fontconfig_FcInitLoadConfigAndFonts+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfontconfig  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char FcInitLoadConfigAndFonts ();
+int
+main ()
+{
+return FcInitLoadConfigAndFonts ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_fontconfig_FcInitLoadConfigAndFonts=yes
+else
+  ac_cv_lib_fontconfig_FcInitLoadConfigAndFonts=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fontconfig_FcInitLoadConfigAndFonts" >&5
+$as_echo "$ac_cv_lib_fontconfig_FcInitLoadConfigAndFonts" >&6; }
+if test "x$ac_cv_lib_fontconfig_FcInitLoadConfigAndFonts" = x""yes; then :
+
+		  ac_fn_c_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
+if test "x$ac_cv_header_fontconfig_fontconfig_h" = x""yes; then :
+
+		    LIBS="-lfontconfig ${LIBS}"
+
+fi
+
+
+
+fi
+
+
+#
+# Find the X11 include and library directories.
+#
+if test "x$ui" = xyes ; then
+
+  #
+  #  OpenMotif
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmAttach in -lXext" >&5
+$as_echo_n "checking for XShmAttach in -lXext... " >&6; }
+if test "${ac_cv_lib_Xext_XShmAttach+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XShmAttach ();
+int
+main ()
+{
+return XShmAttach ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xext_XShmAttach=yes
+else
+  ac_cv_lib_Xext_XShmAttach=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShmAttach" >&5
+$as_echo "$ac_cv_lib_Xext_XShmAttach" >&6; }
+if test "x$ac_cv_lib_Xext_XShmAttach" = x""yes; then :
+  LIB_XEXT='-lXext'
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeCombineMask in -lXext" >&5
+$as_echo_n "checking for XShapeCombineMask in -lXext... " >&6; }
+if test "${ac_cv_lib_Xext_XShapeCombineMask+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XShapeCombineMask ();
+int
+main ()
+{
+return XShapeCombineMask ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xext_XShapeCombineMask=yes
+else
+  ac_cv_lib_Xext_XShapeCombineMask=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeCombineMask" >&5
+$as_echo "$ac_cv_lib_Xext_XShapeCombineMask" >&6; }
+if test "x$ac_cv_lib_Xext_XShapeCombineMask" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXEXT 1
+_ACEOF
+
+  LIBS="-lXext $LIBS"
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtAppMainLoop in -lXt" >&5
+$as_echo_n "checking for XtAppMainLoop in -lXt... " >&6; }
+if test "${ac_cv_lib_Xt_XtAppMainLoop+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XtAppMainLoop ();
+int
+main ()
+{
+return XtAppMainLoop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xt_XtAppMainLoop=yes
+else
+  ac_cv_lib_Xt_XtAppMainLoop=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xt_XtAppMainLoop" >&5
+$as_echo "$ac_cv_lib_Xt_XtAppMainLoop" >&6; }
+if test "x$ac_cv_lib_Xt_XtAppMainLoop" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXT 1
+_ACEOF
+
+  LIBS="-lXt $LIBS"
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmCreatePushButton in -lXm" >&5
+$as_echo_n "checking for XmCreatePushButton in -lXm... " >&6; }
+if test "${ac_cv_lib_Xm_XmCreatePushButton+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XmCreatePushButton ();
+int
+main ()
+{
+return XmCreatePushButton ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xm_XmCreatePushButton=yes
+else
+  ac_cv_lib_Xm_XmCreatePushButton=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xm_XmCreatePushButton" >&5
+$as_echo "$ac_cv_lib_Xm_XmCreatePushButton" >&6; }
+if test "x$ac_cv_lib_Xm_XmCreatePushButton" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXM 1
+_ACEOF
+
+  LIBS="-lXm $LIBS"
+
+else
+  as_fn_error "Motif not found." "$LINENO" 5
+fi
+
+
+  # Extra Motif libraries (XPM)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDefaultScreen in -lX11" >&5
+$as_echo_n "checking for XDefaultScreen in -lX11... " >&6; }
+if test "${ac_cv_lib_X11_XDefaultScreen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XDefaultScreen ();
+int
+main ()
+{
+return XDefaultScreen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_X11_XDefaultScreen=yes
+else
+  ac_cv_lib_X11_XDefaultScreen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XDefaultScreen" >&5
+$as_echo "$ac_cv_lib_X11_XDefaultScreen" >&6; }
+if test "x$ac_cv_lib_X11_XDefaultScreen" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBX11 1
+_ACEOF
+
+  LIBS="-lX11 $LIBS"
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
+$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
+if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXpm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XpmReadFileToImage ();
+int
+main ()
+{
+return XpmReadFileToImage ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xpm_XpmReadFileToImage=yes
+else
+  ac_cv_lib_Xpm_XpmReadFileToImage=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
+$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
+if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXPM 1
+_ACEOF
+
+  LIBS="-lXpm $LIBS"
+
+else
+  as_fn_error "Library Xpm not found" "$LINENO" 5
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuClientWindow in -lXmu" >&5
+$as_echo_n "checking for XmuClientWindow in -lXmu... " >&6; }
+if test "${ac_cv_lib_Xmu_XmuClientWindow+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXmu  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XmuClientWindow ();
+int
+main ()
+{
+return XmuClientWindow ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xmu_XmuClientWindow=yes
+else
+  ac_cv_lib_Xmu_XmuClientWindow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuClientWindow" >&5
+$as_echo "$ac_cv_lib_Xmu_XmuClientWindow" >&6; }
+if test "x$ac_cv_lib_Xmu_XmuClientWindow" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXMU 1
+_ACEOF
+
+  LIBS="-lXmu $LIBS"
+
+else
+  as_fn_error "Library Xmu not found." "$LINENO" 5
+fi
+
+
+  CPPFLAGS="${CPPFLAGS} -I/usr/include/X11"
+  ac_fn_c_check_header_mongrel "$LINENO" "xpm.h" "ac_cv_header_xpm_h" "$ac_includes_default"
+if test "x$ac_cv_header_xpm_h" = x""yes; then :
+
+else
+  as_fn_error "could not successfully find or compile with xpm.h" "$LINENO" 5
+fi
+
+
+
+  # Check for a suitable Motif implementation
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <Xm/DrawingAP.h>
+int
+main ()
+{
+XmDrawingAreaConstraintPart* p;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "Your Motif does not implement XmDrawingAreaConstraintPart (are you using Lesstif? It is not supported).
+See \`config.log' for more details." "$LINENO" 5; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_key_create in -lpthread" >&5
+$as_echo_n "checking for pthread_key_create in -lpthread... " >&6; }
+if test "${ac_cv_lib_pthread_pthread_key_create+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_key_create ();
+int
+main ()
+{
+return pthread_key_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_key_create=yes
+else
+  ac_cv_lib_pthread_pthread_key_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_key_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_key_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_key_create" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  LIBS="-lpthread $LIBS"
+
+fi
+
+fi
+#### end GUI
+
+
+################################################################################################
+#
+#  Trajectory support  --enable-trajectory
+#
+#AC_ARG_ENABLE(traj, [[  --enable-trajectory	  enable the Trajectory package (ECMWF internal) [default=no]]],
+#  traj=$enableval, traj=no)
+#if test "x$traj" = xyes; then
+#  AC_DEFINE(METVIEW_TRAJ, 1)
+#fi
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+#
+# freetype
+#
+if test "x$raster" = xyes; then
+  ac_fn_cxx_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
+if test "x$ac_cv_header_ft2build_h" = x""yes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not successfully compile with FreeType2" >&5
+$as_echo "$as_me: WARNING: could not successfully compile with FreeType2" >&2;}
+fi
+
+
+fi
+
+#
+# For XML parser expat
+#
+ac_fn_cxx_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default"
+if test "x$ac_cv_header_expat_h" = x""yes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not successfully compile with expat using the" >&5
+$as_echo "$as_me: WARNING: could not successfully compile with expat using the" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: default compiler flags;" >&5
+$as_echo "$as_me: WARNING: default compiler flags;" >&2;}
+  unset ac_cv_header_expat_h
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate  in -lexpat" >&5
+$as_echo_n "checking for XML_ParserCreate  in -lexpat... " >&6; }
+if test "${ac_cv_lib_expat_XML_ParserCreate_+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lexpat  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XML_ParserCreate  ();
+int
+main ()
+{
+return XML_ParserCreate  ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_expat_XML_ParserCreate_=yes
+else
+  ac_cv_lib_expat_XML_ParserCreate_=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate_" >&5
+$as_echo "$ac_cv_lib_expat_XML_ParserCreate_" >&6; }
+if test "x$ac_cv_lib_expat_XML_ParserCreate_" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBEXPAT 1
+_ACEOF
+
+  LIBS="-lexpat $LIBS"
+
+else
+  as_fn_error "expat xml parser library not found." "$LINENO" 5
+fi
+
+
+#
+#   GDBM
+#
+ac_fn_cxx_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
+if test "x$ac_cv_header_gdbm_h" = x""yes; then :
+
+else
+  as_fn_error "could not successfully compile with gdbm.h" "$LINENO" 5
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
+$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
+if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgdbm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gdbm_open ();
+int
+main ()
+{
+return gdbm_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_gdbm_gdbm_open=yes
+else
+  ac_cv_lib_gdbm_gdbm_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
+$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
+if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGDBM 1
+_ACEOF
+
+  LIBS="-lgdbm $LIBS"
+
+fi
+
+
+
+
+#########################################################################################
+#
+# For netcdf header file
+#
+#########################################################################################
+
+# Check whether --with-netcdf was given.
+if test "${with_netcdf+set}" = set; then :
+  withval=$with_netcdf; CPPFLAGS="-I${with_netcdf}/include ${CPPFLAGS}";LDFLAGS="-L${with_netcdf}/lib ${LDFLAGS}"
+
+fi
+
+ac_fn_cxx_check_header_mongrel "$LINENO" "netcdfcpp.h" "ac_cv_header_netcdfcpp_h" "$ac_includes_default"
+if test "x$ac_cv_header_netcdfcpp_h" = x""yes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not successfully compile with netcdfcpp.h!" >&5
+$as_echo "$as_me: WARNING: could not successfully compile with netcdfcpp.h!" >&2;}
+  unset ac_cv_header_netcdf_h
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncvarid  in -lnetcdf" >&5
+$as_echo_n "checking for ncvarid  in -lnetcdf... " >&6; }
+if test "${ac_cv_lib_netcdf_ncvarid_+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnetcdf  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ncvarid  ();
+int
+main ()
+{
+return ncvarid  ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_netcdf_ncvarid_=yes
+else
+  ac_cv_lib_netcdf_ncvarid_=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netcdf_ncvarid_" >&5
+$as_echo "$ac_cv_lib_netcdf_ncvarid_" >&6; }
+if test "x$ac_cv_lib_netcdf_ncvarid_" = x""yes; then :
+  NETCDF_LIBS="-lnetcdf_c++ -lnetcdf"
+else
+  as_fn_error "netcdf library not found." "$LINENO" 5
+fi
+
+#AC_CHECK_LIB(netcdf_c++, nctypelen        ,echo "",AC_MSG_ERROR([netcdf_c++ library not found.]))
+
+
+#########################################################################################
+#
+# Check for curl - sometimes needed by NetCDF
+#
+#########################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl library sometimes needed by NetCDF" >&5
+$as_echo_n "checking for curl library sometimes needed by NetCDF... " >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_setopt in -lcurl" >&5
+$as_echo_n "checking for curl_easy_setopt in -lcurl... " >&6; }
+if test "${ac_cv_lib_curl_curl_easy_setopt+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char curl_easy_setopt ();
+int
+main ()
+{
+return curl_easy_setopt ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_curl_curl_easy_setopt=yes
+else
+  ac_cv_lib_curl_curl_easy_setopt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_setopt" >&5
+$as_echo "$ac_cv_lib_curl_curl_easy_setopt" >&6; }
+if test "x$ac_cv_lib_curl_curl_easy_setopt" = x""yes; then :
+  have_curl="yes"
+else
+  have_curl="no"
+fi
+
+
+# NetCDF can be built with a dependency on curl. Therefore, we add it to the libraries if it is
+# installed; otherwise, issue a warning.
+
+if test "${have_curl}" = "yes"
+then
+	NETCDF_LIBS="${NETCDF_LIBS} -lcurl"
+else
+    echo "    No curl library - ensure that your NetCDF library does not require it."
+    echo "    NOTE: the MARS web API will not work without curl. Please use install curl or --disable-mars-api."
+fi
+
+
+# add the NetCDF libaries to MAGPLUS__LIB
+MAGPLUS_LIB="${MAGPLUS_LIB} ${NETCDF_LIBS}"
+
+
+
+
+#############################################################################################################
+#
+#     E M O S L I B -- always DOUBLE precision !!!
+#
+
+# emoslib is currently required (or libMars interpolation/subarea extraction, etc)
+# so remove the option to disable it.
+
+#AC_ARG_ENABLE(emos, [[  --enable-emos	          enable the EmosLib support [default=yes]]],
+#  emos=$enableval, emos=yes)
+
+emos="yes"
+
+if test "x$emos" = xyes; then
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EmosLib (ECMWF)" >&5
+$as_echo_n "checking for EmosLib (ECMWF)... " >&6; }
+
+    EMOS_LIB_NAME="emosR64"
+
+    emos_path=/usr/local/${LIBNAME}
+
+
+# Check whether --with-emos-libraries was given.
+if test "${with_emos_libraries+set}" = set; then :
+  withval=$with_emos_libraries; EMOS_LIB_FLAGS="-L$with_emos_libraries";LDFLAGS="$EMOS_LIB_FLAGS $LDFLAGS"; emos_path=$with_emos_libraries
+
+fi
+
+
+
+# Check whether --with-emos-libname was given.
+if test "${with_emos_libname+set}" = set; then :
+  withval=$with_emos_libname; EMOS_LIB_NAME="$with_emos_libname"
+
+fi
+
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_${EMOS_LIB_NAME}''_pbopen" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pbopen in -l${EMOS_LIB_NAME}" >&5
+$as_echo_n "checking for pbopen in -l${EMOS_LIB_NAME}... " >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l${EMOS_LIB_NAME}  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pbopen ();
+int
+main ()
+{
+return pbopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_Lib
+   if test "x$as_val" = x""yes; then :
+  echo "EmosLib detected"
+else
+  as_fn_error "Emoslib (${EMOS_LIB_NAME}) could not be linked! Metview requires emoslib with 64-bit reals (usually libemosR64.a). Try setting --with-emos-libraries and --with-emos-libname." "$LINENO" 5
+fi
+
+
+    $as_echo "#define METVIEW_EMOS 1" >>confdefs.h
+
+    METVIEW_3RDPARTY_LIBS="$METVIEW_3RDPARTY_LIBS -l${EMOS_LIB_NAME}"
+
+    MV_EMOSLIB="${EMOS_LIB_FLAGS} -l${EMOS_LIB_NAME}"
+
+
+else
+    emos="no"
+fi
+
+
+#########################################################################################
+#
+# Check for GRIB API
+#
+#########################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libraries needed by GRIB_API" >&5
+$as_echo_n "checking for JPEG libraries needed by GRIB_API... " >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_image_create in -lopenjpeg" >&5
+$as_echo_n "checking for opj_image_create in -lopenjpeg... " >&6; }
+if test "${ac_cv_lib_openjpeg_opj_image_create+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopenjpeg  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opj_image_create ();
+int
+main ()
+{
+return opj_image_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_openjpeg_opj_image_create=yes
+else
+  ac_cv_lib_openjpeg_opj_image_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_image_create" >&5
+$as_echo "$ac_cv_lib_openjpeg_opj_image_create" >&6; }
+if test "x$ac_cv_lib_openjpeg_opj_image_create" = x""yes; then :
+  have_openjpeg="yes"
+else
+  have_openjpeg="no"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jas_stream_memopen in -ljasper" >&5
+$as_echo_n "checking for jas_stream_memopen in -ljasper... " >&6; }
+if test "${ac_cv_lib_jasper_jas_stream_memopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljasper  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char jas_stream_memopen ();
+int
+main ()
+{
+return jas_stream_memopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_jasper_jas_stream_memopen=yes
+else
+  ac_cv_lib_jasper_jas_stream_memopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jasper_jas_stream_memopen" >&5
+$as_echo "$ac_cv_lib_jasper_jas_stream_memopen" >&6; }
+if test "x$ac_cv_lib_jasper_jas_stream_memopen" = x""yes; then :
+  have_jasper="yes"
+else
+  have_jasper="no"
+fi
+
+
+# GRIB_API prefers openjpeg over jasper, so we do the same - if openjpeg is installed,
+# then use it; otherwise, if jasper is installed, then use that. If neither is installed,
+# then issue a warning.
+
+if test "${have_openjpeg}" = "yes"
+then
+	JPEG_LIB="-lopenjpeg -lm";LIBS="${LIBS} ${JPEG_LIB}"
+fi
+
+
+if test "${have_jasper}" = "yes"
+then
+	JPEG_LIB="-ljasper";LIBS="${LIBS} ${JPEG_LIB}"
+fi
+
+if test "${have_jasper}" = "no" -a "${have_openjpeg}" = "no"
+then
+		echo " "
+		echo "    No OpenJPEG or Jasper (JPEG 2000) library could be found!"
+		echo "    Your Metview programs should work nevertheless as long as"
+		echo "    your installed GRIB_API does NOT require it! Compile GRIB_API"
+		echo "    without JPEG support."
+		echo " "
+fi
+
+
+GRIB_API_INCLUDE_SUBDIR="include"
+
+if test "x$SITE_NAME" = 'xecmwf'  # only at ECMWF we use 'include64'
+then
+  case "${host}" in
+    *-ibm-aix* )   # IBM Server
+          GRIB_API_INCLUDE_SUBDIR="include64"
+          echo "ecgate machine detected - using ${GRIB_API_INCLUDE_SUBDIR} for grib_api include subdirectory"
+    ;;
+    *x86_64* )   # Linux 64-bit
+        GRIB_API_INCLUDE_SUBDIR="include64"
+        echo "64-bit Linux machine detected - using ${GRIB_API_INCLUDE_SUBDIR} for grib_api include subdirectory"
+    ;;
+  esac
+fi
+
+grib_location=/usr/local
+
+# Check whether --with-grib-api was given.
+if test "${with_grib_api+set}" = set; then :
+  withval=$with_grib_api; GRIB_API_INC="-I${with_grib_api}/${GRIB_API_INCLUDE_SUBDIR}";CPPFLAGS="${GRIB_API_INC} ${CPPFLAGS}";GRIB_API_LIB="-L${with_grib_api}/${LIBNAME}";LDFLAGS="${GRIB_API_LIB} ${LDFLAGS}";grib_location=${with_grib_api};
+
+fi
+
+
+# if no grib_api dir is set, we still need to add its 'include' dir to the fortran compilation flags
+if test "x${with_grib_api}" = "x" ; then
+    GRIB_API_INC="-I${grib_location}/${GRIB_API_INCLUDE_SUBDIR}"
+fi
+
+
+
+#METVIEW_FC_FLAGS="${FCFLAGS} -I${grib_location}/include ${METVIEW_FC_FLAGS}"
+
+# Note: we add "-I/usr/include" to FCFLAGS for the case where GRIB_API has been installed by RPM
+FCFLAGS="${FCFLAGS} ${GRIB_API_INC} ${METVIEW_FC_FLAGS} -I/usr/include"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grib_get_message in -lgrib_api" >&5
+$as_echo_n "checking for grib_get_message in -lgrib_api... " >&6; }
+if test "${ac_cv_lib_grib_api_grib_get_message+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgrib_api  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char grib_get_message ();
+int
+main ()
+{
+return grib_get_message ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_grib_api_grib_get_message=yes
+else
+  ac_cv_lib_grib_api_grib_get_message=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grib_api_grib_get_message" >&5
+$as_echo "$ac_cv_lib_grib_api_grib_get_message" >&6; }
+if test "x$ac_cv_lib_grib_api_grib_get_message" = x""yes; then :
+  GRIBAPI_LIBS="-lgrib_api"
+else
+  as_fn_error "Grib API could not be linked! Try setting --with-grib-api ." "$LINENO" 5
+fi
+
+
+GRIB_API_LIB="${GRIB_API_LIB} ${GRIBAPI_LIBS} ${JPEG_LIB}" # for inline fortran/c macros
+ # for inline fortran/c macros
+ # for inline fortran/c macros
+
+  # for inline fortran/c macros
+
+
+#########################################################################################
+#
+# For INPE header file
+#
+#########################################################################################
+# Check whether --enable-inpe was given.
+if test "${enable_inpe+set}" = set; then :
+  enableval=$enable_inpe; inpe=$enableval
+else
+  inpe=no
+fi
+
+
+if test "x$inpe" = xyes ; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INPE (INPE)" >&5
+$as_echo_n "checking for INPE (INPE)... " >&6; }
+   $as_echo "#define METVIEW_INPE 1" >>confdefs.h
+
+fi
+
+#####################################################################
+#
+#    M A R S   ODB  access
+#
+# Check whether --enable-mars-odb was given.
+if test "${enable_mars_odb+set}" = set; then :
+  enableval=$enable_mars_odb; marsodb=$enableval
+else
+  marsodb=no
+fi
+
+
+#####################################################################
+#
+# ODB access
+#
+# Check whether --enable-odb was given.
+if test "${enable_odb+set}" = set; then :
+  enableval=$enable_odb; odb=$enableval
+else
+  odb=no
+fi
+
+
+if test "x${marsodb}" = xyes -o "x${magics_odb}" = xyes ; then
+	odb=yes
+fi
+
+odbnew=no
+odbold=no
+odbplot=no
+ODB_CPPFLAGS=""
+ODB_LDFLAGS=""
+ODB_LIBS=""
+
+if test "x$odb" = xyes ; then
+
+  # Test if we can support ODB-2
+  ODB_LIBDIR=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ODB-2 " >&5
+$as_echo_n "checking for ODB-2 ... " >&6; }
+
+# Check whether --with-odb was given.
+if test "${with_odb+set}" = set; then :
+  withval=$with_odb; ODB_CPPFLAGS="-DODB_SUPPORT -I${with_odb}/include -I${with_odb}/include/eclib  -I${with_odb}/include/eclib/eclib -I${with_odb}/include/odb_api -I${with_odb}/include/odb_api/odblib";
+     ODB_LIBDIR="${with_odb}/lib";
+     ODB_LDFLAGS="-L${ODB_LIBDIR}";
+     ODB_LIBS="-lOdb -lEc";
+     as_ac_File=`$as_echo "ac_cv_file_${with_odb}/lib/libOdb.a" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${with_odb}/lib/libOdb.a" >&5
+$as_echo_n "checking for ${with_odb}/lib/libOdb.a... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${with_odb}/lib/libOdb.a"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
+  odbnew=yes
+else
+  odbnew=no
+fi
+
+
+fi
+
+
+
+  if test "x$odbnew" = xyes; then
+
+$as_echo "#define METVIEW_ODB_NEW 1" >>confdefs.h
+
+      CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB_NEW"
+
+      #Test if we can plot ODB
+      if test "x${magics_odb}" = xyes ; then
+
+$as_echo "#define METVIEW_ODB_PLOT 1" >>confdefs.h
+
+     	 CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB_PLOT"
+	 odbplot=yes
+      else
+	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"ODB plotting is disabled, because Magics was built without ODB support! Please, rebuild Magics with ODB support to enable ODB plotting!\"" >&5
+$as_echo "$as_me: WARNING: \"ODB plotting is disabled, because Magics was built without ODB support! Please, rebuild Magics with ODB support to enable ODB plotting!\"" >&2;}
+      fi
+
+      ODB1_BIN=""   # default - assume the user will not need to know the bin directory (ie it's in their PATH)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ODB-1" >&5
+$as_echo_n "checking for ODB-1... " >&6; }
+
+# Check whether --with-odb1-bin was given.
+if test "${with_odb1_bin+set}" = set; then :
+  withval=$with_odb1_bin; as_ac_File=`$as_echo "ac_cv_file_${with_odb1_bin}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${with_odb1_bin}" >&5
+$as_echo_n "checking for ${with_odb1_bin}... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${with_odb1_bin}"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
+  odboldbin=yes
+else
+  odboldbin=no
+fi
+
+
+fi
+
+
+      # Test if we can support ODB-1
+      if test "x$odboldbin" = xyes; then
+          ODB1_BIN=${with_odb1_bin}
+
+          as_ac_File=`$as_echo "ac_cv_file_${with_odb1_bin}/odbsql2" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${with_odb1_bin}/odbsql2" >&5
+$as_echo_n "checking for ${with_odb1_bin}/odbsql2... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${with_odb1_bin}/odbsql2"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
+  odbold=yes
+else
+  odbold=no
+fi
+
+
+          if test "x$odbold" = xyes; then
+
+$as_echo "#define METVIEW_ODB_OLD 1" >>confdefs.h
+
+              CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB_OLD"
+
+	      ODB1_VERSION=ANY    # did the user supply a required ODB-1 version?
+
+# Check whether --with-odb1-version was given.
+if test "${with_odb1_version+set}" = set; then :
+  withval=$with_odb1_version; ODB1_VERSION=$with_odb1_version
+fi
+
+
+
+              ODB1_USE_SCRIPT="$ODB1_BIN/use_odb.sh"       # ODB-1 use script
+
+# Check whether --with-odb1-use-script was given.
+if test "${with_odb1_use_script+set}" = set; then :
+  withval=$with_odb1_use_script; ODB1_USE_SCRIPT=$with_odb1_use_script
+fi
+
+
+              echo "ODB1_USE_SCRIPT: $ODB1_USE_SCRIPT"
+          else
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"ODB-1 support is DISABLED - No odbsql2 script found!\"" >&5
+$as_echo "$as_me: WARNING: \"ODB-1 support is DISABLED - No odbsql2 script found!\"" >&2;}
+	  fi
+     else
+	   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"ODB-1 support is DISABLED - No ODB-1 bin directory found!\"" >&5
+$as_echo "$as_me: WARNING: \"ODB-1 support is DISABLED - No ODB-1 bin directory found!\"" >&2;}
+     fi
+
+  # If no ODB-2 libraries found
+  else
+     ODB_CPPFLAGS=""
+     ODB_LDFLAGS=""
+     ODB_LIBS=""
+
+     if test "x${magics_odb}" = xyes ; then
+         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "\"Cannot build Metview! Magics was built with ODB support but no ODB-2 library was found! Please provide a valid ODB-2 library path via --with-odb\"
+See \`config.log' for more details." "$LINENO" 5; }
+     else
+     	 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "\"Cannot build Metview! ODB support is enabled but no ODB-2 library was found! Please provide a valid ODB-2 library path via --with-odb\"
+See \`config.log' for more details." "$LINENO" 5; }
+     fi
+  fi
+fi
+
+# ODB is supported if either ODB-2 or ODB-1 is supported
+if test "x$odbnew" = xyes -o "x$odbold" = xyes ; then
+    $as_echo "#define METVIEW_ODB 1" >>confdefs.h
+
+    CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB"
+else
+    odb=no
+fi
+
+#We disable MARS ODB if no ODB-2 library is found
+if test "x$odbnew" != xyes ; then
+    marsodb=no
+fi
+
+
+#####################################################################
+#
+#    M A R S   ODB  access
+#
+#AC_ARG_ENABLE(mars-odb, [[  --enable-mars-odb	          enable the MARS ODB accesss (client-server) [default=no]]],
+#  marsodb=$enableval, marsodb=no)
+
+MARS_ODB_ACCESS=MARS_none
+
+if test "x${marsodb}" = xyes ; then
+  $as_echo "#define METVIEW_MARS_ODB 1" >>confdefs.h
+
+
+  MARS_ODB_ACCESS=MARS_local
+fi
+
+
+
+#####################################################################
+#
+#    M A R S  access
+#
+# Check whether --enable-mars-access was given.
+if test "${enable_mars_access+set}" = set; then :
+  enableval=$enable_mars_access; mars=$enableval
+else
+  mars=no
+fi
+
+
+MARS_ACCESS=MARS_none
+
+if test "x$mars" = xyes ; then
+  $as_echo "#define METVIEW_MARS 1" >>confdefs.h
+
+
+  MARS_ACCESS=MARS_local
+fi
+
+#####################################################################
+#
+#    M A R S  catalog support
+#
+# Check whether --enable-marscatalog was given.
+if test "${enable_marscatalog+set}" = set; then :
+  enableval=$enable_marscatalog; marscatalog=$enableval
+else
+  marscatalog=no
+fi
+
+
+#MARS_CATALOG=MARS_none
+
+if test "x$marscatalog" = xyes ; then
+  $as_echo "#define METVIEW_MARS_CATALOG 1" >>confdefs.h
+
+
+  #MARS_ACCESS=MARS_local
+fi
+
+#####################################################################
+#
+#    M A R S  CURL support
+#
+# Check whether --enable-mars-api was given.
+if test "${enable_mars_api+set}" = set; then :
+  enableval=$enable_mars_api; mars_api=$enableval
+else
+  mars_api=yes
+fi
+
+
+
+
+if test "x$mars_api" = xno ; then
+    CPPFLAGS="${CPPFLAGS} -DNOCURL"
+else
+    if test "${have_curl}" = "no" ; then
+        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The curl library was not found; you can disable its requirement by setting --disable-mars-api.
+See \`config.log' for more details." "$LINENO" 5; }
+    else
+        echo "MARS web api will be built"
+    fi
+fi
+
+
+
+#####################################################################
+#
+# OBSTAT support
+#
+# Check whether --enable-obstat was given.
+if test "${enable_obstat+set}" = set; then :
+  enableval=$enable_obstat; obstat=$enableval
+else
+  obstat=no
+fi
+
+
+if test "x$obstat" = xyes ; then
+  $as_echo "#define METVIEW_OBSTAT 1" >>confdefs.h
+
+fi
+
+#####################################################################
+#
+# OPERA radar support (requires proj4)
+#
+# Check whether --enable-opera-radar was given.
+if test "${enable_opera_radar+set}" = set; then :
+  enableval=$enable_opera_radar; operaradar=$enableval
+else
+  operaradar=yes
+fi
+
+
+if test "x$operaradar" = xyes ; then
+  proj4="yes"
+  $as_echo "#define METVIEW_OPERA 1" >>confdefs.h
+
+fi
+
+if test "x$proj4" = "xyes" ; then
+
+# Check whether --with-proj4 was given.
+if test "${with_proj4+set}" = set; then :
+  withval=$with_proj4; PROJ4_LIBS="-lproj";CPPFLAGS="-I${with_proj4}/include ${CPPFLAGS}";LDFLAGS="-L${with_proj4}/lib ${LDFLAGS}"
+
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Proj4 header" >&5
+$as_echo_n "checking for Proj4 header... " >&6; }
+  ac_fn_cxx_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default"
+if test "x$ac_cv_header_proj_api_h" = x""yes; then :
+
+else
+  as_fn_error "could not successfully find proj_api.h (proj4 development package)" "$LINENO" 5
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Proj4 library" >&5
+$as_echo_n "checking for Proj4 library... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_init in -lproj" >&5
+$as_echo_n "checking for pj_init in -lproj... " >&6; }
+if test "${ac_cv_lib_proj_pj_init+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lproj  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pj_init ();
+int
+main ()
+{
+return pj_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_proj_pj_init=yes
+else
+  ac_cv_lib_proj_pj_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_init" >&5
+$as_echo "$ac_cv_lib_proj_pj_init" >&6; }
+if test "x$ac_cv_lib_proj_pj_init" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPROJ 1
+_ACEOF
+
+  LIBS="-lproj $LIBS"
+
+else
+  as_fn_error "Proj4 could not be linked! Try --disable-opera-radar" "$LINENO" 5
+fi
+
+fi
+
+
+
+
+#####################################################################
+#
+# FLEXTRA support
+#
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLEXTRA" >&5
+$as_echo_n "checking for FLEXTRA... " >&6; }
+
+
+# Check whether --with-flextra was given.
+if test "${with_flextra+set}" = set; then :
+  withval=$with_flextra; MV_FLEXTRA_EXE="${with_flextra}";
+    as_ac_File=`$as_echo "ac_cv_file_${with_flextra}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${with_flextra}" >&5
+$as_echo_n "checking for ${with_flextra}... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${with_flextra}"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
+  flextra=yes
+else
+  flextra=no
+fi
+
+
+fi
+
+
+  if test "x$flextra" = xno; then
+     echo ""
+     echo "  No FLEXTRA executable is found!"
+  fi
+
+#####################################################################
+#
+# SCM support
+#
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCM" >&5
+$as_echo_n "checking for SCM... " >&6; }
+
+
+# Check whether --with-scm was given.
+if test "${with_scm+set}" = set; then :
+  withval=$with_scm; MV_SCM_EXE="${with_scm}";
+    as_ac_File=`$as_echo "ac_cv_file_${with_scm}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${with_scm}" >&5
+$as_echo_n "checking for ${with_scm}... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${with_scm}"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
+  scm=yes
+else
+  scm=no
+fi
+
+
+fi
+
+
+  if test "x$scm" = xno; then
+     echo ""
+     echo "  No SCM executable is found!"
+  fi
+
+
+# Check whether --enable-scm-aux-files was given.
+if test "${enable_scm_aux_files+set}" = set; then :
+  enableval=$enable_scm_aux_files; scm_aux=$enableval
+else
+  scm_aux=no
+fi
+
+
+
+
+
+#####################################################################
+#
+#  python interpreter
+#
+MV_PYTHON_COMMAND="python"
+
+# Check whether --with-python-command was given.
+if test "${with_python_command+set}" = set; then :
+  withval=$with_python_command; MV_PYTHON_COMMAND="${with_python_command}"
+
+fi
+
+
+
+
+###########################################################
+#
+# Additional title text
+#
+
+
+# Check whether --with-extra-title was given.
+if test "${with_extra_title+set}" = set; then :
+  withval=$with_extra_title; METVIEW_EXTRA_TITLE="${with_extra_title}"
+
+fi
+
+
+
+
+
+
+###########################################################
+#
+# Local ECMWF flags
+#
+if test "x$SITE_NAME" = 'xecmwf'
+then
+  CFLAGS="${CFLAGS} -DECMWF"
+  CXXFLAGS="${CXXFLAGS} -DECMWF"
+else
+  CFLAGS="${CFLAGS} -DSiteIsNotECMWF"
+  CXXFLAGS="${CXXFLAGS} -DSiteIsNotECMWF"
+  FDBLIB=""
+  external="yes"
+  $as_echo "#define METVIEW_EXTERNAL 1" >>confdefs.h
+
+fi
+
+
+###########################################################
+#
+# Because Metview has many executables, we avoid filling up the 'bin'
+# dir by putting them in a sub-directory
+#
+bindir=${bindir}/Metview
+MVSTARTDIR=${bindir}/..    # where the startup script will go
+
+
+
+
+
+# Autoheader
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#AH_TEMPLATE(METVIEW_TRAJ,         [Trajectory model.])
+
+
+
+
+
+#
+#  Enable Debug information
+#
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug; case "${enableval}" in
+       yes) debug=true ;;
+       no)  debug=false ;;
+       *) as_fn_error "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;;
+     esac
+else
+  debug=false
+fi
+
+
+#
+#  Enable Profiling information
+#
+# Check whether --enable-prof was given.
+if test "${enable_prof+set}" = set; then :
+  enableval=$enable_prof; case "${enableval}" in
+       yes) prof=true ;;
+       no)  prof=false ;;
+       *) as_fn_error "bad value ${enableval} for --enable-prof" "$LINENO" 5 ;;
+     esac
+else
+  prof=false
+fi
+
+
+# if no debug and no profiling
+if test "x$debug" = xfalse -a "x$prof" = xfalse; then
+	CFLAGS="${OPTI} $CFLAGS"
+	CXXFLAGS="${OPTI} ${CXXFLAGS}"
+    FFLAGS="${FFLAGS} ${OPTI}"
+# otherwise ...
+else
+    # if DEBUG
+     if test "x$debug" = xtrue; then
+         $as_echo "#define METVIEW_DEBUG 1" >>confdefs.h
+
+         CFLAGS="-g -O0 $CFLAGS"
+         CXXFLAGS="-g -O0 ${CXXFLAGS}"
+     fi
+
+    # if PROFILING
+     if test "x$prof" = xtrue; then
+       case "${host}" in
+	*-linux* )
+		CFLAGS="-pg -fno-omit-frame-pointer -ggdb2 -g -O0 ${CFLAGS}"
+		CXXFLAGS="-pg -fno-omit-frame-pointer -ggdb2  -g -O0 ${CXXFLAGS}"
+		;;
+	# IBM Server
+	*-ibm-aix* )
+		LDFLAGS="-L${SITE_TOTALVIEW}/rs6000/lib ${LDFLAGS}"
+		LIBS="${SITE_TOTALVIEW}/rs6000/lib/aix_malloctype.o ${LIBS}"
+		;;
+      esac
+      $as_echo "#define METVIEW_PROF 1" >>confdefs.h
+
+     fi
+fi
+
+
+CFLAGS="$CFLAGS $METVIEW_DEFINES $PLATFORM_EMOS_BITFLAGS $PLATFORM_METVIEW_BITFLAGS"
+CPPFLAGS="$CPPFLAGS $METVIEW_DEFINES $PLATFORM_EMOS_BITFLAGS $PLATFORM_METVIEW_BITFLAGS"
+CXXFLAGS="$CXXFLAGS $METVIEW_DEFINES $PLATFORM_EMOS_BITFLAGS $PLATFORM_METVIEW_BITFLAGS"
+
+
+ if test x$debug = xtrue; then
+  METVIEW_DEBUG_TRUE=
+  METVIEW_DEBUG_FALSE='#'
+else
+  METVIEW_DEBUG_TRUE='#'
+  METVIEW_DEBUG_FALSE=
+fi
+
+ if test x$prof = xtrue; then
+  METVIEW_PROF_TRUE=
+  METVIEW_PROF_FALSE='#'
+else
+  METVIEW_PROF_TRUE='#'
+  METVIEW_PROF_FALSE=
+fi
+
+
+
+METVIEW_3RDPARTY_INCLUDE="$CPPFLAGS"
+METVIEW_3RDPARTY_LIBS="$METVIEW_3RDPARTY_LIBS $NETCDF_LIBS $GRIBAPI_LIBS"
+
+
+
+#AC_SUBST(METVIEW_FC_FLAGS)
+
+
+
+
+
+
+
+
+
+
+############################################
+#
+#   standard compiler options that we always want
+#
+
+
+STANDARD_METVIEW_DEFINES="-DMETVIEW"
+STANDARD_METVIEW_FLAGS="-I../libMetview -I../libUtil -I../libMars  -I../libFTimeUtil"
+CPPFLAGS="$STANDARD_METVIEW_DEFINES $STANDARD_METVIEW_FLAGS $CPPFLAGS"
+
+
+# if we want to be able to have modules which use FLIBS and modules which don't, then we can't put everything
+# into $LIBS and then put $FLIBS into _LDADD, because $LIBS is added at the end, and therefore $FLIBS will be before
+# libMetview, etc. This will not work, because the Linux linker will not link in the FLIBS if they occur on the
+# command line before any objects/libraries which use them. Therefore, the solution is to define STANDARD_METVIEW_LIBS,
+# and have all modules have this in their LDADD, and then they can always add FLIBS to the end of that line if they
+# need it.
+# some more useful defines...
+
+METVIEW_UTIL_LIB="../../lib/libUtil.a"
+
+
+
+STANDARD_METVIEW_LIBS="../../lib/libMetview.a ../../lib/libMars.a ../../lib/libFTimeUtil.a ${METVIEW_UTIL_LIB} ${METVIEW_3RDPARTY_LIBS}"
+STANDARD_METVIEW_LIBS_NO_UTIL="../../lib/libMetview.a ../../lib/libMars.a ../../lib/libFTimeUtil.a ${METVIEW_3RDPARTY_LIBS}"
+
+
+# the AIX linker is more demanding, and requires libraries to be linked in, even if nothing
+# is actually used from them
+case "${host}" in
+*-ibm-aix* )
+    STANDARD_METVIEW_LIBS="${STANDARD_METVIEW_LIBS} ${FLIBS} ${METVIEW_UTIL_LIB}"
+    STANDARD_METVIEW_LIBS_NO_UTIL="${STANDARD_METVIEW_LIBS} ${FLIBS} ${METVIEW_UTIL_LIB}"
+    ;;
+esac
+
+
+
+
+
+
+METVIEW_NETCDF_FLAGS="-I../libMvNetCDF"
+
+
+METVIEW_NETCDF_LIB="../../lib/libMvNetCDF.a"
+
+
+
+MV_MOTIF_FLAGS=" -I../libMvMotif"
+
+
+MV_MOTIF_UTIL_LIB="../../lib/libMvMotif.a"
+
+
+
+DBMLIB="-lgdbm"
+
+
+
+
+
+
+
+
+
+
+#echo "X11LIB_DIR = ${X11LIB_DIR}" >> $config_file
+#echo "X11LIB = \${X11LIB_DIR} -lXm -lXmu -lXpm -lXt -lSM -lXp -lICE -lXext -lX11" >> $config_file
+#echo "XPM_LIB = ${X11LIB_DIR} -lXpm" >> $config_file
+
+
+
+
+
+
+ if test "$magics"    = yes; then
+  METVIEW_MAGICS_TRUE=
+  METVIEW_MAGICS_FALSE='#'
+else
+  METVIEW_MAGICS_TRUE='#'
+  METVIEW_MAGICS_FALSE=
+fi
+
+ if test "$qt"        = yes; then
+  METVIEW_QT_TRUE=
+  METVIEW_QT_FALSE='#'
+else
+  METVIEW_QT_TRUE='#'
+  METVIEW_QT_FALSE=
+fi
+
+ if test "$qtdebug"   = yes; then
+  METVIEW_QTDEBUG_TRUE=
+  METVIEW_QTDEBUG_FALSE='#'
+else
+  METVIEW_QTDEBUG_TRUE='#'
+  METVIEW_QTDEBUG_FALSE=
+fi
+
+ if test "$bit"       = yes; then
+  METVIEW_32BIT_TRUE=
+  METVIEW_32BIT_FALSE='#'
+else
+  METVIEW_32BIT_TRUE='#'
+  METVIEW_32BIT_FALSE=
+fi
+
+ if test "$emos"      = yes; then
+  METVIEW_EMOS_TRUE=
+  METVIEW_EMOS_FALSE='#'
+else
+  METVIEW_EMOS_TRUE='#'
+  METVIEW_EMOS_FALSE=
+fi
+
+ if test "$mars"      = yes; then
+  METVIEW_MARS_TRUE=
+  METVIEW_MARS_FALSE='#'
+else
+  METVIEW_MARS_TRUE='#'
+  METVIEW_MARS_FALSE=
+fi
+
+ if test "$marscatalog"      = yes; then
+  METVIEW_MARS_CATALOG_TRUE=
+  METVIEW_MARS_CATALOG_FALSE='#'
+else
+  METVIEW_MARS_CATALOG_TRUE='#'
+  METVIEW_MARS_CATALOG_FALSE=
+fi
+
+ if test "$odbnew"    = yes  -o  "$odbold" = yes; then
+  METVIEW_ODB_TRUE=
+  METVIEW_ODB_FALSE='#'
+else
+  METVIEW_ODB_TRUE='#'
+  METVIEW_ODB_FALSE=
+fi
+
+ if test "$odbnew"    = yes; then
+  METVIEW_ODB_NEW_TRUE=
+  METVIEW_ODB_NEW_FALSE='#'
+else
+  METVIEW_ODB_NEW_TRUE='#'
+  METVIEW_ODB_NEW_FALSE=
+fi
+
+ if test "$odbold"    = yes; then
+  METVIEW_ODB_OLD_TRUE=
+  METVIEW_ODB_OLD_FALSE='#'
+else
+  METVIEW_ODB_OLD_TRUE='#'
+  METVIEW_ODB_OLD_FALSE=
+fi
+
+ if test "$odbplot"   = yes; then
+  METVIEW_ODB_PLOT_TRUE=
+  METVIEW_ODB_PLOT_FALSE='#'
+else
+  METVIEW_ODB_PLOT_TRUE='#'
+  METVIEW_ODB_PLOT_FALSE=
+fi
+
+ if test "${marsodb}" = yes; then
+  METVIEW_MARS_ODB_TRUE=
+  METVIEW_MARS_ODB_FALSE='#'
+else
+  METVIEW_MARS_ODB_TRUE='#'
+  METVIEW_MARS_ODB_FALSE=
+fi
+
+ if test "$obstat"    = yes; then
+  METVIEW_OBSTAT_TRUE=
+  METVIEW_OBSTAT_FALSE='#'
+else
+  METVIEW_OBSTAT_TRUE='#'
+  METVIEW_OBSTAT_FALSE=
+fi
+
+ if test "$operaradar" = yes; then
+  METVIEW_OPERA_TRUE=
+  METVIEW_OPERA_FALSE='#'
+else
+  METVIEW_OPERA_TRUE='#'
+  METVIEW_OPERA_FALSE=
+fi
+
+ if test "$ui"        = yes; then
+  METVIEW_GUI_TRUE=
+  METVIEW_GUI_FALSE='#'
+else
+  METVIEW_GUI_TRUE='#'
+  METVIEW_GUI_FALSE=
+fi
+
+#AM_CONDITIONAL(METVIEW_TRAJ,    test "$traj"        = yes)
+ if test "$external"  = yes; then
+  METVIEW_EXTERNAL_TRUE=
+  METVIEW_EXTERNAL_FALSE='#'
+else
+  METVIEW_EXTERNAL_TRUE='#'
+  METVIEW_EXTERNAL_FALSE=
+fi
+
+ if test "$experimental"  = yes; then
+  METVIEW_EXPERIMENTAL_TRUE=
+  METVIEW_EXPERIMENTAL_FALSE='#'
+else
+  METVIEW_EXPERIMENTAL_TRUE='#'
+  METVIEW_EXPERIMENTAL_FALSE=
+fi
+
+ if test "$inpe"     = yes; then
+  METVIEW_INPE_TRUE=
+  METVIEW_INPE_FALSE='#'
+else
+  METVIEW_INPE_TRUE='#'
+  METVIEW_INPE_FALSE=
+fi
+
+ if test "$scm_aux"  = yes; then
+  METVIEW_SCM_AUX_TRUE=
+  METVIEW_SCM_AUX_FALSE='#'
+else
+  METVIEW_SCM_AUX_TRUE='#'
+  METVIEW_SCM_AUX_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile src/AppMod/Makefile src/Event/Makefile src/BufrExaminer/Makefile src/CptecAccess/Makefile src/Datacoverage/Makefile src/DebugTools/Makefile src/Divrot/Makefile src/Ecfile/Makefile src/ExamineManager/Makefile src/Flextra/Makefile src/FlextraExaminer/Makefile src/GeopExaminer/Makefile src/GribExaminer/Makefile src/GribVectors/Makefile src/Hovmoeller/Makefile src/KML/Makefile src/Macro/Makefile src/MacroEditor/Makefile src/MagML/Makefi [...]
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_DEBUG_TRUE}" && test -z "${METVIEW_DEBUG_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_PROF_TRUE}" && test -z "${METVIEW_PROF_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_PROF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_MAGICS_TRUE}" && test -z "${METVIEW_MAGICS_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_MAGICS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_QT_TRUE}" && test -z "${METVIEW_QT_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_QT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_QTDEBUG_TRUE}" && test -z "${METVIEW_QTDEBUG_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_QTDEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_32BIT_TRUE}" && test -z "${METVIEW_32BIT_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_32BIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_EMOS_TRUE}" && test -z "${METVIEW_EMOS_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_EMOS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_MARS_TRUE}" && test -z "${METVIEW_MARS_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_MARS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_MARS_CATALOG_TRUE}" && test -z "${METVIEW_MARS_CATALOG_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_MARS_CATALOG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_ODB_TRUE}" && test -z "${METVIEW_ODB_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_ODB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_ODB_NEW_TRUE}" && test -z "${METVIEW_ODB_NEW_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_ODB_NEW\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_ODB_OLD_TRUE}" && test -z "${METVIEW_ODB_OLD_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_ODB_OLD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_ODB_PLOT_TRUE}" && test -z "${METVIEW_ODB_PLOT_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_ODB_PLOT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_MARS_ODB_TRUE}" && test -z "${METVIEW_MARS_ODB_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_MARS_ODB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_OBSTAT_TRUE}" && test -z "${METVIEW_OBSTAT_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_OBSTAT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_OPERA_TRUE}" && test -z "${METVIEW_OPERA_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_OPERA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_GUI_TRUE}" && test -z "${METVIEW_GUI_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_GUI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_EXTERNAL_TRUE}" && test -z "${METVIEW_EXTERNAL_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_EXTERNAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_EXPERIMENTAL_TRUE}" && test -z "${METVIEW_EXPERIMENTAL_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_EXPERIMENTAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_INPE_TRUE}" && test -z "${METVIEW_INPE_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_INPE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${METVIEW_SCM_AUX_TRUE}" && test -z "${METVIEW_SCM_AUX_FALSE}"; then
+  as_fn_error "conditional \"METVIEW_SCM_AUX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.65,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`'
+LD_FC='`$ECHO "X$LD_FC" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_FC='`$ECHO "X$old_archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_FC='`$ECHO "X$compiler_FC" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_FC='`$ECHO "X$GCC_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_FC='`$ECHO "X$lt_prog_compiler_no_builtin_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_FC='`$ECHO "X$lt_prog_compiler_wl_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_FC='`$ECHO "X$lt_prog_compiler_pic_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_FC='`$ECHO "X$lt_prog_compiler_static_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_FC='`$ECHO "X$lt_cv_prog_compiler_c_o_FC" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_FC='`$ECHO "X$archive_cmds_need_lc_FC" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_FC='`$ECHO "X$enable_shared_with_static_runtimes_FC" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_FC='`$ECHO "X$export_dynamic_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_FC='`$ECHO "X$whole_archive_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_FC='`$ECHO "X$compiler_needs_object_FC" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_FC='`$ECHO "X$old_archive_from_new_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_FC='`$ECHO "X$archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_FC='`$ECHO "X$module_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_FC='`$ECHO "X$module_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_FC='`$ECHO "X$with_gnu_ld_FC" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_FC='`$ECHO "X$allow_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_FC='`$ECHO "X$no_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_FC='`$ECHO "X$hardcode_libdir_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_FC='`$ECHO "X$hardcode_libdir_flag_spec_ld_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_FC='`$ECHO "X$hardcode_libdir_separator_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_FC='`$ECHO "X$hardcode_direct_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_FC='`$ECHO "X$hardcode_direct_absolute_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_FC='`$ECHO "X$hardcode_minus_L_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_FC='`$ECHO "X$hardcode_shlibpath_var_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_FC='`$ECHO "X$hardcode_automatic_FC" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_FC='`$ECHO "X$inherit_rpath_FC" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_FC='`$ECHO "X$link_all_deplibs_FC" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_FC='`$ECHO "X$fix_srcfile_path_FC" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_FC='`$ECHO "X$always_export_symbols_FC" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_FC='`$ECHO "X$export_symbols_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_FC='`$ECHO "X$exclude_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_FC='`$ECHO "X$include_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_FC='`$ECHO "X$prelink_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_FC='`$ECHO "X$file_list_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_FC='`$ECHO "X$hardcode_action_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_FC='`$ECHO "X$compiler_lib_search_dirs_FC" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_FC='`$ECHO "X$postdeps_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_FC='`$ECHO "X$compiler_lib_search_path_FC" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+LD_F77 \
+LD_FC \
+compiler_CXX \
+compiler_F77 \
+compiler_FC \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_no_builtin_flag_F77 \
+lt_prog_compiler_no_builtin_flag_FC \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_wl_F77 \
+lt_prog_compiler_wl_FC \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_pic_F77 \
+lt_prog_compiler_pic_FC \
+lt_prog_compiler_static_CXX \
+lt_prog_compiler_static_F77 \
+lt_prog_compiler_static_FC \
+lt_cv_prog_compiler_c_o_CXX \
+lt_cv_prog_compiler_c_o_F77 \
+lt_cv_prog_compiler_c_o_FC \
+export_dynamic_flag_spec_CXX \
+export_dynamic_flag_spec_F77 \
+export_dynamic_flag_spec_FC \
+whole_archive_flag_spec_CXX \
+whole_archive_flag_spec_F77 \
+whole_archive_flag_spec_FC \
+compiler_needs_object_CXX \
+compiler_needs_object_F77 \
+compiler_needs_object_FC \
+with_gnu_ld_CXX \
+with_gnu_ld_F77 \
+with_gnu_ld_FC \
+allow_undefined_flag_CXX \
+allow_undefined_flag_F77 \
+allow_undefined_flag_FC \
+no_undefined_flag_CXX \
+no_undefined_flag_F77 \
+no_undefined_flag_FC \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_F77 \
+hardcode_libdir_flag_spec_FC \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_flag_spec_ld_F77 \
+hardcode_libdir_flag_spec_ld_FC \
+hardcode_libdir_separator_CXX \
+hardcode_libdir_separator_F77 \
+hardcode_libdir_separator_FC \
+fix_srcfile_path_CXX \
+fix_srcfile_path_F77 \
+fix_srcfile_path_FC \
+exclude_expsyms_CXX \
+exclude_expsyms_F77 \
+exclude_expsyms_FC \
+include_expsyms_CXX \
+include_expsyms_F77 \
+include_expsyms_FC \
+file_list_spec_CXX \
+file_list_spec_F77 \
+file_list_spec_FC \
+compiler_lib_search_dirs_CXX \
+compiler_lib_search_dirs_F77 \
+compiler_lib_search_dirs_FC \
+predep_objects_CXX \
+predep_objects_F77 \
+predep_objects_FC \
+postdep_objects_CXX \
+postdep_objects_F77 \
+postdep_objects_FC \
+predeps_CXX \
+predeps_F77 \
+predeps_FC \
+postdeps_CXX \
+postdeps_F77 \
+postdeps_FC \
+compiler_lib_search_path_CXX \
+compiler_lib_search_path_F77 \
+compiler_lib_search_path_FC; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_cmds_F77 \
+old_archive_cmds_FC \
+old_archive_from_new_cmds_CXX \
+old_archive_from_new_cmds_F77 \
+old_archive_from_new_cmds_FC \
+old_archive_from_expsyms_cmds_CXX \
+old_archive_from_expsyms_cmds_F77 \
+old_archive_from_expsyms_cmds_FC \
+archive_cmds_CXX \
+archive_cmds_F77 \
+archive_cmds_FC \
+archive_expsym_cmds_CXX \
+archive_expsym_cmds_F77 \
+archive_expsym_cmds_FC \
+module_cmds_CXX \
+module_cmds_F77 \
+module_cmds_FC \
+module_expsym_cmds_CXX \
+module_expsym_cmds_F77 \
+module_expsym_cmds_FC \
+export_symbols_cmds_CXX \
+export_symbols_cmds_F77 \
+export_symbols_cmds_FC \
+prelink_cmds_CXX \
+prelink_cmds_F77 \
+prelink_cmds_FC; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+  ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "src/metview_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/metview_config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "src/AppMod/Makefile") CONFIG_FILES="$CONFIG_FILES src/AppMod/Makefile" ;;
+    "src/Event/Makefile") CONFIG_FILES="$CONFIG_FILES src/Event/Makefile" ;;
+    "src/BufrExaminer/Makefile") CONFIG_FILES="$CONFIG_FILES src/BufrExaminer/Makefile" ;;
+    "src/CptecAccess/Makefile") CONFIG_FILES="$CONFIG_FILES src/CptecAccess/Makefile" ;;
+    "src/Datacoverage/Makefile") CONFIG_FILES="$CONFIG_FILES src/Datacoverage/Makefile" ;;
+    "src/DebugTools/Makefile") CONFIG_FILES="$CONFIG_FILES src/DebugTools/Makefile" ;;
+    "src/Divrot/Makefile") CONFIG_FILES="$CONFIG_FILES src/Divrot/Makefile" ;;
+    "src/Ecfile/Makefile") CONFIG_FILES="$CONFIG_FILES src/Ecfile/Makefile" ;;
+    "src/ExamineManager/Makefile") CONFIG_FILES="$CONFIG_FILES src/ExamineManager/Makefile" ;;
+    "src/Flextra/Makefile") CONFIG_FILES="$CONFIG_FILES src/Flextra/Makefile" ;;
+    "src/FlextraExaminer/Makefile") CONFIG_FILES="$CONFIG_FILES src/FlextraExaminer/Makefile" ;;
+    "src/GeopExaminer/Makefile") CONFIG_FILES="$CONFIG_FILES src/GeopExaminer/Makefile" ;;
+    "src/GribExaminer/Makefile") CONFIG_FILES="$CONFIG_FILES src/GribExaminer/Makefile" ;;
+    "src/GribVectors/Makefile") CONFIG_FILES="$CONFIG_FILES src/GribVectors/Makefile" ;;
+    "src/Hovmoeller/Makefile") CONFIG_FILES="$CONFIG_FILES src/Hovmoeller/Makefile" ;;
+    "src/KML/Makefile") CONFIG_FILES="$CONFIG_FILES src/KML/Makefile" ;;
+    "src/Macro/Makefile") CONFIG_FILES="$CONFIG_FILES src/Macro/Makefile" ;;
+    "src/MacroEditor/Makefile") CONFIG_FILES="$CONFIG_FILES src/MacroEditor/Makefile" ;;
+    "src/MagML/Makefile") CONFIG_FILES="$CONFIG_FILES src/MagML/Makefile" ;;
+    "src/MarsCatalog/Makefile") CONFIG_FILES="$CONFIG_FILES src/MarsCatalog/Makefile" ;;
+    "src/Meteogram/Makefile") CONFIG_FILES="$CONFIG_FILES src/Meteogram/Makefile" ;;
+    "src/MetviewUI/Makefile") CONFIG_FILES="$CONFIG_FILES src/MetviewUI/Makefile" ;;
+    "src/MvApp/Makefile") CONFIG_FILES="$CONFIG_FILES src/MvApp/Makefile" ;;
+    "src/NcExaminer/Makefile") CONFIG_FILES="$CONFIG_FILES src/NcExaminer/Makefile" ;;
+    "src/ObsFilter/Makefile") CONFIG_FILES="$CONFIG_FILES src/ObsFilter/Makefile" ;;
+    "src/Obstat/Makefile") CONFIG_FILES="$CONFIG_FILES src/Obstat/Makefile" ;;
+    "src/ObstatScatterTool/Makefile") CONFIG_FILES="$CONFIG_FILES src/ObstatScatterTool/Makefile" ;;
+    "src/ObstatCurveTool/Makefile") CONFIG_FILES="$CONFIG_FILES src/ObstatCurveTool/Makefile" ;;
+    "src/OdbExaminer/Makefile") CONFIG_FILES="$CONFIG_FILES src/OdbExaminer/Makefile" ;;
+    "src/Odb/Makefile") CONFIG_FILES="$CONFIG_FILES src/Odb/Makefile" ;;
+    "src/OgcClient/Makefile") CONFIG_FILES="$CONFIG_FILES src/OgcClient/Makefile" ;;
+    "src/OperaRadar/Makefile") CONFIG_FILES="$CONFIG_FILES src/OperaRadar/Makefile" ;;
+    "src/Percentile/Makefile") CONFIG_FILES="$CONFIG_FILES src/Percentile/Makefile" ;;
+    "src/PottF/Makefile") CONFIG_FILES="$CONFIG_FILES src/PottF/Makefile" ;;
+    "src/Reprojection/Makefile") CONFIG_FILES="$CONFIG_FILES src/Reprojection/Makefile" ;;
+    "src/Scm/Makefile") CONFIG_FILES="$CONFIG_FILES src/Scm/Makefile" ;;
+    "src/ScmEditor/Makefile") CONFIG_FILES="$CONFIG_FILES src/ScmEditor/Makefile" ;;
+    "src/StdAppManager/Makefile") CONFIG_FILES="$CONFIG_FILES src/StdAppManager/Makefile" ;;
+    "src/images/Makefile") CONFIG_FILES="$CONFIG_FILES src/images/Makefile" ;;
+    "src/libFTimeUtil/Makefile") CONFIG_FILES="$CONFIG_FILES src/libFTimeUtil/Makefile" ;;
+    "src/libMars/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMars/Makefile" ;;
+    "src/libMetview/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMetview/Makefile" ;;
+    "src/libMvMotif/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMvMotif/Makefile" ;;
+    "src/libMvNetCDF/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMvNetCDF/Makefile" ;;
+    "src/libMvQtGui/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMvQtGui/Makefile" ;;
+    "src/libUtil/Makefile") CONFIG_FILES="$CONFIG_FILES src/libUtil/Makefile" ;;
+    "src/libMvQtUtil/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMvQtUtil/Makefile" ;;
+    "src/uPlot/Makefile") CONFIG_FILES="$CONFIG_FILES src/uPlot/Makefile" ;;
+    "src/Velstr/Makefile") CONFIG_FILES="$CONFIG_FILES src/Velstr/Makefile" ;;
+    "src/VisTools/Makefile") CONFIG_FILES="$CONFIG_FILES src/VisTools/Makefile" ;;
+    "src/XSection/Makefile") CONFIG_FILES="$CONFIG_FILES src/XSection/Makefile" ;;
+    "src/Stations/Makefile") CONFIG_FILES="$CONFIG_FILES src/Stations/Makefile" ;;
+    "src/WebAccess/Makefile") CONFIG_FILES="$CONFIG_FILES src/WebAccess/Makefile" ;;
+    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
+    "share/metview/Makefile") CONFIG_FILES="$CONFIG_FILES share/metview/Makefile" ;;
+    "share/metview/app-defaults/Makefile") CONFIG_FILES="$CONFIG_FILES share/metview/app-defaults/Makefile" ;;
+    "share/metview/etc/Makefile") CONFIG_FILES="$CONFIG_FILES share/metview/etc/Makefile" ;;
+    "share/metview/etc/ifsdata/Makefile") CONFIG_FILES="$CONFIG_FILES share/metview/etc/ifsdata/Makefile" ;;
+    "share/metview/icons/Makefile") CONFIG_FILES="$CONFIG_FILES share/metview/icons/Makefile" ;;
+    "rpms/Makefile") CONFIG_FILES="$CONFIG_FILES rpms/Makefile" ;;
+    "rpms/Metview.spec") CONFIG_FILES="$CONFIG_FILES rpms/Metview.spec" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "test/macros/Makefile") CONFIG_FILES="$CONFIG_FILES test/macros/Makefile" ;;
+
+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "libtool":C)
+
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX F77 FC "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1+=\$2"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+    ;;
+  esac
+
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: F77
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_F77
+
+# A language specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_F77
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_F77
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_F77
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_F77
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_F77
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_F77
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_F77
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_F77
+postdep_objects=$lt_postdep_objects_F77
+predeps=$lt_predeps_F77
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# ### END LIBTOOL TAG CONFIG: F77
+_LT_EOF
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: FC
+
+# The linker used to build libraries.
+LD=$lt_LD_FC
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_FC
+
+# A language specific compiler.
+CC=$lt_compiler_FC
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_FC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_FC
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_FC
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_FC
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_FC
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_FC
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_FC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_FC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_FC
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_FC
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_FC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_FC
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_FC
+archive_expsym_cmds=$lt_archive_expsym_cmds_FC
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_FC
+module_expsym_cmds=$lt_module_expsym_cmds_FC
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_FC
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_FC
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_FC
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_FC
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_FC
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_FC
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_FC
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_FC
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_FC
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_FC
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_FC
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_FC
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_FC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_FC
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_FC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_FC
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_FC
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_FC
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_FC
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_FC
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_FC
+postdep_objects=$lt_postdep_objects_FC
+predeps=$lt_predeps_FC
+postdeps=$lt_postdeps_FC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_FC
+
+# ### END LIBTOOL TAG CONFIG: FC
+_LT_EOF
+
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit $?
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+
+# items that have been removed from AC_CONFIG_FILES, but still have
+# valid Makefile.am files and could be reintroduced:
+#		src/Curve/Makefile
+#		src/ForwardApp/Makefile
+#		src/MetviewUI_qt/Makefile
+#		src/ObsExam/Makefile
+# 		src/PM_Tephigram/Makefile
+#		src/Relhum/Makefile
+#		src/Spectra/Makefile
+#		src/TimeSeries/Makefile
+#		src/TropCycTrack/Makefile
+#		src/ObsExam/Makefile
+
+
+
+
+# add all the flags that will be written into the config files to the standard
+# XFLAGS variables so that configure-generated Makefiles can also use them
+
+
+
+PWD=`echo ${PWD}`
+
+config_file="config/CONFIG.site"
+rm -f $config_file
+echo "#" > $config_file
+echo "# THIS FILE IS GENERATED BY configure `date`" >> $config_file
+echo "#" >> $config_file
+echo "WMO_SITE_NR=${SITE_WMO_CODE}"  >> $config_file
+if test "x$SITE_NAME" = 'xecmwf'; then
+  echo "QT_DIR_LIB=/usr/local/apps/qt/4.6.2${QT_EXT}/lib" >> $config_file
+fi
+echo "INSTALLDIR=${prefix}" >> $config_file
+echo "METVIEW_SCRIPT=${prefix}/bin/$STARTUP_SCRIPT" >> $config_file
+echo "MV_MARS_ACCESS=${MARS_ACCESS}" >> $config_file
+echo "METVIEW_DIR_DEV=${PWD}" >> $config_file
+echo "METVIEW_TITLE_PROD=\"Production ${METVIEW_EXTRA_TITLE}\"" >> $config_file
+echo "METVIEW_TITLE_DEV=\"Development autotools ${METVIEW_EXTRA_TITLE}\"" >> $config_file
+echo "MV_ENVIRON=${MV_ENVIRON}" >> $config_file
+echo "OS=${OS}" >> $config_file
+echo "MAJOR_VERSION=${MAJOR_VERSION}" >> $config_file
+echo "SHELL=/bin/sh" >> $config_file
+echo "MAGPLUS_HOME=${MAGPLUS_HOME:-none}" >> $config_file
+#echo "MAGPLUS_SRC_HOME=${MAGPLUS_SRC}" >> $config_file
+echo "GRIBAPI_DIR=${grib_location}" >> $config_file
+echo "MV_PYTHON_COMMAND=${MV_PYTHON_COMMAND}" >> $config_file
+
+if test "x$odbold" = 'xyes' ; then
+  echo "MV_ODB1_VERSION=${ODB1_VERSION}"       >> $config_file
+  echo "MV_ODB1_BIN=${ODB1_BIN}"               >> $config_file
+  echo "MV_ODB1_USE_SCRIPT=${ODB1_USE_SCRIPT}" >> $config_file
+fi
+
+if test "x$flextra" = 'xyes' ; then
+  echo "MV_FLEXTRA_EXE=\${MV_FLEXTRA_EXE:=${MV_FLEXTRA_EXE}}" >> $config_file
+fi
+
+if test "x$scm" = 'xyes' ; then
+  echo "MV_SCM_EXE=\${MV_SCM_EXE:=${MV_SCM_EXE}}" >> $config_file
+fi
+
+# If we are building this outside ECMWF, then we want different proxy settings
+# (used currently by the OGC clients). We achieve this by simply changing the
+# default setting in the ConfigDef file. We can do this with a  a search/replace
+# operation. This relies very much on the proxy setting having a uniqe 'signature'
+# so that the search/replace can operate on a single line.
+
+if test "x$SITE_NAME" != 'xecmwf'; then
+    configdef=share/metview/etc/ConfigDef
+    configtmp=${configdef}.tmp
+    echo "Not at ECMWF: resetting the default proxy setting in ${configdef}."
+    chmod u+w $configdef
+    sed "s/	} = yes/	} = no/g"  $configdef > $configtmp
+    mv $configtmp $configdef
+fi
+
+
+
+\mkdir -p bin lib
+touch share/metview/icons/make.dep
+
+echo ""
+echo " Metview is configured as follows for host type: $host"
+echo ""
+echo "Option            Configure option = Configured value"
+echo "------------------------------------------------------"
+echo ""
+echo "Graphical UI      --enable-ui=$ui"
+echo "Magics++          --enable-magics=$magics"
+if test "x$magics" = xyes ; then
+ if test "x$magics_cairo" = xno ; then
+  echo "MISSING:          NO PNG and PDF support (disabled in Magics)"
+ fi
+ if test "x$magics_gd" = xno ; then
+  echo "MISSING:          NO GIF support (disabled in Magics)"
+ fi
+ if test "x$magics_bufr" = xno ; then
+  echo "MISSING:          NO BUFR plotting support (disabled in Magics)"
+ fi
+ echo ""
+ echo "  \$MAGPLUS_HOME is defined as: $MAGPLUS_HOME"
+ echo ""
+fi
+echo "MARS              --enable-mars-access=$mars"
+echo "MARS-WEB          --enable-mars-api=$mars_api"
+echo "ODB               --enable-odb=$odb"
+echo "MARS ODB          --enable-mars-odb=${marsodb}"
+echo "OBSTAT            --enable-obstat=$obstat"
+echo "User Interface    --enable-ui=$ui"
+echo "INPE              --enable-inpe=$inpe"
+echo ""
+echo ""
+if test "x$odbnew" = 'xyes' -a "x$odbplot" = 'xno' ; then
+  echo "WARNING:"
+  echo "  ODB plotting is disabled, because Magics was built without ODB support!"
+  echo "  Please rebuild Magics with ODB support to enable ODB plotting!"
+  echo ""
+  echo ""
+fi
+
+
+echo "Options used to compile and install:"
+echo ""
+echo " CXX     = $CXX $CXXFLAGS"
+echo " CC      = $CC $CFLAGS"
+echo " F77     = $F77 ${FFLAGS}"
+echo " FC      = $FC ${FFLAGS}"
+echo ""
+echo " Metview will be installed in   ${prefix}"
+echo ""
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..840a2d1
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1686 @@
+# Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.59)
+AC_INIT(Metview)
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_SYSTEM
+
+# take a copy of LDFLAGS so we can export it for inline C/Fortran
+LDFLAGS_INLINE=${LDFLAGS}
+
+
+AC_ARG_WITH([site],
+       AS_HELP_STRING([--with-site],[Name of installation site]),
+       [SITE_NAME="${with_site:-outside_ecmwf}"]
+)
+SITE_WMO_CODE="255"
+AC_ARG_WITH([wmo-code],
+       AS_HELP_STRING([--with-wmo-code],[WMO code for BUFR tables]),
+       [SITE_WMO_CODE="${with_wmo-code}"]
+)
+if test "x$with_site" = xecmwf; then
+  SITE_WMO_CODE="098"
+fi
+AC_SUBST(SITE_NAME)
+AC_SUBST(SITE_WMO_CODE)
+
+# Source file containing package/library versioning information.
+. ${srcdir}/version.sh
+
+if test "x$prefix" != xNONE; then
+  ac_default_prefix=${prefix}
+else
+  prefix=${ac_default_prefix}
+fi
+
+echo ""
+echo "configuring ${METVIEW_PACKAGE_NAME} ${METVIEW_PACKAGE_VERSION}${METVIEW_PACKAGE_VERSION_ADDENDUM} at ${SITE_NAME}"
+echo ""
+
+AC_SUBST(METVIEW_PACKAGE_NAME)
+AC_SUBST(METVIEW_PACKAGE_VERSION)
+AC_SUBST(METVIEW_PACKAGE_RELEASE_DATE)
+AC_SUBST(METVIEW_MAGICS_MIN_VERSION)
+AC_SUBST(METVIEW_GRIBAPI_MIN_VERSION)
+
+AC_DEFINE_UNQUOTED(METVIEW_VERSION, "${METVIEW_PACKAGE_VERSION}")
+AC_DEFINE_UNQUOTED(METVIEW_NAME, "${METVIEW_PACKAGE_NAME}")
+AC_DEFINE_UNQUOTED(METVIEW_RELEASE_DATE, "${METVIEW_PACKAGE_RELEASE_DATE}")
+AC_DEFINE_UNQUOTED(METVIEW_INSTALL_PATH, "${prefix}")
+AC_DEFINE_UNQUOTED(METVIEW_SITE, "${SITE_NAME}")
+
+printf ${METVIEW_PACKAGE_VERSION} > share/metview/app-defaults/MvVersion
+
+# this is so that Metview can report accurately which version it is
+# the first number is a version number in case we change the format of this file
+mv_version_details=share/metview/app-defaults/MvVersionDetails
+printf "1 "                                    >  ${mv_version_details}
+printf "${METVIEW_PACKAGE_NAME} "              >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_MAJOR} "     >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_MINOR} "     >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_REVISION} "  >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_VERSION_LABEL} "     >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_COPYRIGHT_YEAR} "    >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_COPYRIGHT_PERIOD} "  >> ${mv_version_details}
+printf "${METVIEW_PACKAGE_RELEASE_DATE}\n"       >> ${mv_version_details}
+
+
+# Ensure that make can run correctly
+AC_CONFIG_SRCDIR(src/libMetview/MvDate.cc)
+AM_CONFIG_HEADER(src/metview_config.h)
+
+AM_INIT_AUTOMAKE($METVIEW_PACKAGE_NAME,"${METVIEW_PACKAGE_VERSION}${METVIEW_PACKAGE_VERSION_ADDENDUM}",[http://www.ecmwf.int/publications/manuals/metview/index.html])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+AC_PROG_CC([xlc_r icc gcc cc CC])
+AC_PROG_CXX([xlC_r icpc g++ c++ CC])
+AC_PROG_F77([pgf90 gfortran pgf77 xlf90_r xlf90 xlf77_r f90 g77])
+AC_PROG_FC([pgf90 gfortran xlf90_r xlf90 f90])
+AM_PROG_LEX([lex flex])
+AC_PROG_YACC([yacc])
+AM_PROG_CC_C_O
+AC_AIX
+
+#
+# Checks for programs.
+#
+#AC_DISABLE_FAST_INSTALL   # TEMPORARY !!!!
+AC_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+AC_PROG_LD
+AC_SUBST(LD)
+AC_PROG_INSTALL
+
+
+
+MVINCLUDE=include
+AC_SUBST(MVINCLUDE)
+
+
+
+############################################
+#
+#  Metview startup script name --startup-script
+#
+
+STARTUP_SCRIPT=metview
+
+AC_ARG_WITH([startup-script],
+            [AS_HELP_STRING([--with-startup-script],[Name of the startup script [default=metview]])],
+            [STARTUP_SCRIPT=$with_startup_script])
+
+AC_SUBST(STARTUP_SCRIPT)
+
+
+
+############################################
+#
+#  32 bit addressing  --enable-32bit
+#
+AC_ARG_ENABLE([32-bits-addressing-mode],
+        [AC_HELP_STRING([--enable-32-bits-addressing-mode],
+		                [Force 32 bits addressing mode on 64 bits machines])],
+        enable_32_bits_addressing_mode='yes', enable_32_bits_addressing_mode='no')
+
+
+
+######################################################################
+#
+#     Experimental
+#
+######################################################################
+
+AC_ARG_ENABLE(experimental, [[  --enable-experimental             enable experimental component use only in developments [default=no]]],
+      experimental=$enableval, experimental=no)
+
+if test "x${experimental}" = xyes ; then
+	CXXFLAGS="${CXXFLAGS} -DMETVIEW_EXPERIMENTAL"
+fi
+
+############################################
+#
+#   pkg-config
+#
+if test x$PKG_CONFIG = x; then
+  PKG_CONFIG=pkg-config
+fi
+
+case `$PKG_CONFIG --version` in
+[0.?|0.?.?|0.1[0-7]|0.1[0-7].?]) PKGCONFIG_REQUIRES="Requires"; ;;
+*) PKGCONFIG_REQUIRES="Requires.private"; ;;
+esac
+
+AC_SUBST(PKGCONFIG_REQUIRES)
+
+
+
+###########################################
+#
+# Architecture dependent Compiler options
+#
+windows=no
+LIBNAME="${LIBNAME:-lib}"
+OPTI=""
+OS=NA
+MAJOR_VERSION=NA
+QT_EXT=""
+
+EMOS_I32_R64="-DR64 -DREAL_8 -DREAL_BIGGER_THAN_INTEGER"
+#MAGICS_I32_R64="-DREAL_IS_DOUBLE -DMAGINT_IS_INT"
+METVIEW_I32_R64="-DI32 -DMAGINT_IS_INT -DREAL_IS_DOUBLE"
+
+PLATFORM_METVIEW_BITFLAGS="${METVIEW_I32_R64}"
+PLATFORM_EMOS_BITFLAGS="${EMOS_I32_R64}"
+
+
+FDBLIB="-L/usr/local/lib -L/usr/local/lib/metaps/lib -lfdb -lrt"
+LEX="${LEX:-lex}"
+make="${MAKE:-make}"
+
+case "${host}" in
+	*linux*)
+		case "${host}" in
+			x86_64*linux*)
+				AXX="-m64 -fPIC"
+				LIBNAME="lib64"
+                QT_EXT="-64"  # used at ECMWF only
+				MV_ENVIRON="ecm_lnx64"
+				FDBLIB="-L/usr/local/lib/metaps/lib -lfdb"
+				X11LIB_DIR=" -L/usr/X11R6/${LIBNAME}"
+				if test "x$enable_32_bits_addressing_mode" == xyes; then
+					echo " "
+					echo "You are on AMD 64 and building a 32 bit version of Metview."
+					echo " "
+					LIBNAME="lib"
+					libdir=${prefix}/${LIBNAME}
+					AXX="-m32"
+				fi
+				;;
+			*)
+				AXX="-m32"
+				LIBNAME="lib"
+				MV_ENVIRON="ecm_lnx"
+                CFLAGS="${CFLAGS} -Dlinux"
+                CXXFLAGS="${CXXFLAGS} -Dlinux"
+				;;
+		esac
+		OS="linux"
+		CC_FLAGS="\$(PLATFORM_WARNING_LEVEL)"
+		CXXFLAGS="${CXXFLAGS} -DUSE_NEW_IO"
+#		AR="ar rlv"
+		AR="ar"
+		RANLIB="/usr/bin/ranlib -t"
+		LEX="flex -l"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }'`
+		METVIEW_DEFINES="-DLITTLE -DLITTLE_END -DH_INCLUDES_CC"
+
+		CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2 -I/usr/include -I/usr/X11R6/include -I/usr/local/include"
+		LDFLAGS="$LDFLAGS -L/usr/local/${LIBNAME} -L/usr/${LIBNAME}"
+		libdir=${prefix}/${LIBNAME}
+		;;
+	# IBM Server
+	*-ibm-aix* )
+		OS="AIX"
+		MV_ENVIRON="ecm_ibm"
+		make="gmake"
+		PLATFORM_PROFILER="-qfullpath"
+		PLATFORM_CLEAN_MAGIGS="-rm -f \$(SRC.f)"
+		AIX_COMMON_FLAGS="-qstrict -qarch=auto -qtune=auto"
+		CC_FLAGS="${PLATFORM_PROFILER} ${AIX_COMMON_FLAGS}"
+		AIX_CXX_TEMPLATES="-qfuncsect -DH_INCLUDES_CC"
+		CXXFLAGS="${CXXFLAGS} -DUSE_NEW_IO -qrtti ${PLATFORM_PROFILER} -DGL_GLEXT_PROTOTYPES ${AIX_COMMON_FLAGS} ${AIX_CXX_TEMPLATES}"
+		# AR="ar -r -l -v -X32"
+		#AR="ar -X64 cru"
+		#ARFLAGS="${ARFLAGS} -X64"
+		#AR_FLAGS="-X64 cru"
+		#echo "ARFLAGS  = ${ARFLAGS}"
+		#echo "AR_FLAGS = ${AR_FLAGS}"
+		RANLIB="/bin/true"
+		LEX="flex -l"
+		CPP="xlc -E -C"
+		CFLAGS="${CFLAGS} -DAIX"
+		CXXFLAGS="${CXXFLAGS} -DAIX"
+		#F2o_RULE="\$(CPP) \$(CPP_FLAGS) \$(FPP_FLAGS) -c \$*.F > \$*.f ; echo \"FC=\$(FC)\" ; \$(FC) -c \$(FC_FLAGS) \$*.f"
+		MAJOR_VERSION=`uname -v`
+		FDBLIB="-L/usr/local/lib/metaps/lib -lfdb"
+		#METVIEW_DEFINES="-DXMSTRINGDEFINES"   DO WE NEED THIS?????
+		EMOS_DEFINES="-DIBM -Drs6000"
+
+		CPPFLAGS="${CPPFLAGS} -DMETVIEW_AIX_XLC -I/usr/include/freetype2" # -I/usr/include/freetype2 -I/opt/freeware/include -I/usr/local/include"
+		LIBS="${LIBS} -lfreetype $LIBS -lpng -lz -liconv"  # for terralib
+		AIX_GD_LIBS="-lfontconfig -liconv"
+		METVIEW_3RDPARTY_LIBS="${METVIEW_3RDPARTY_LIBS} -lfreetype -lpng"
+		;;
+	# HP - aCC
+	*-*-hpux* )
+		OS="hpux"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. ' { print $2 }'`
+		AXX="-AA -Wp,-H30000"
+		RANLIB="/usr/bin/ranlib"
+		;;
+    # MacOSX 10.8
+    *darwin* )
+        OS="macosx"
+        F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+        MAJOR_VERSION=`uname -r | awk -F. ' { print $2 }'`
+        AXX=""
+        CFLAGS="$CFLAGS -Dmacosx -I/usr/include/sys"
+        CXXFLAGS="$CXXFLAGS -Dmacosx -I/usr/include/sys"
+        CPPFLAGS="$CPPFLAGS -I/opt/local/include -I/usr/local/include"
+        LDFLAGS="$LDFLAGS -L/opt/local/lib -L/usr/local/lib"
+    ;;
+	# Compaq alpha ev68-dec-osf5.1 compiler
+	*-dec-osf5.* )
+		OS="osf1"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }' | sed 's/V//'`
+		AXX="-std strict_ansi -noimplicit_include"
+		;;
+	*-irix* )
+		OS="irix"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }'`
+		RANLIB="/bin/true"
+		;;
+	*-sun* )
+		OS="sun"
+		F2o_RULE="\$(FC) -c \$(FC_FLAGS) \$(FPP_FLAGS) \$*.F"
+		MAJOR_VERSION=`uname -r | awk -F. '{ print $1 }'`
+		METVIEW_DEFINES="-D__GLX_MOTIF -DGLX_PROBLEMS"
+		RANLIB="/usr/bin/true"
+		;;
+	*-*-cygwin* | *-*-mingw32*)
+		echo " "
+		echo "You try to install Metview on Windows!"
+		echo " "
+		echo " Please be aware that Windows is NOT a supported platform!!!"
+		echo " "
+		;;
+esac
+
+
+# overwrite MV_ENVIRON if at non-ECMWF site
+if test "x$SITE_NAME" != 'xecmwf'; then
+ MV_ENVIRON="common"
+fi
+
+
+AC_SUBST(MV_ENVIRON)
+AC_SUBST(AXX)
+#AC_SUBST(ARFLAGS)
+#AC_SUBST(AR_FLAGS)
+
+
+
+#
+# Compiler dependent Compiler options
+#
+case "${CXX}" in
+	# GNU GCC
+	g++ )
+		CFLAGS="$CFLAGS $AXX" # -std=c99 -ansi -fpermissive
+		CXXFLAGS="${CXXFLAGS} ${AXX} -fno-gnu-keywords -Wno-deprecated -Wno-write-strings" # -ansi -std=c++98
+		CPPLIBS="-lstdc++"
+		OPTI="${OPTI} -O2"
+
+		AC_CHECK_LIB(quadmath,sqrtq,LIBS="${LIBS} -lquadmath",
+			AC_MSG_WARN([No libquadmath found --- you only need it if you use GCC 4.6 or newer.]))
+		;;
+	# Intel compiler 9.x
+	icpc | icc )
+		OPTI="${OPTI} -O2"
+		# replace -i-static with -static-intel  !!!!
+		CFLAGS="${CFLAGS} -i-static -wr654 -wr1125 -wr1011"
+		CXXFLAGS="${CXXFLAGS} -i-static -wr654 -wr1125 -wr1011"
+		# -i-static does the job but if any libraries compiled with g++ are used this is needed
+		CPPLIBS="-lstdc++"
+		;;
+	# Portland C++
+	pgCC )
+		CPPLIBS=""     # assumes you use pgf90 or pgf77
+		;;
+	# IBM C++ compiler
+	xlC_r | xlC )
+		#  -qtune=auto
+		#
+		# -qfuncsect
+		#
+		# -qmkshrobj   --> no entry point message??? (570 MB)
+		#
+		#- qtemplateregistry=/scratch/graphics/cgm/metview/IBM/templateregistry
+		#
+		#	rm -f ${PWD}/templateregistry
+		#	CXXFLAGS="-qstrict -qfuncsect -qtemplateregistry=${PWD}/templateregistry -qmaxmem=-1 -qarch=auto -bmaxdata:2000000000"
+		# AR_BITFLAGS="-X32"
+		OPTI="${OPTI} -O2"
+		LDFLAGS="$LDFLAGS -Wl,-bbigtoc"  # to allow a larger number of symbols
+		CFLAGS="-qtune=auto -qstrict -qmaxmem=-1 -qarch=auto -bmaxdata:3000000000 $CFLAGS"
+		CXXFLAGS="-qtune=auto -qstrict -qfuncsect -qmaxmem=-1 -qarch=auto -bmaxdata:3000000000 ${CXXFLAGS}"
+		CPPLIBS="${CPPLIBS} -lC"     # should strictly not nessecary when xlf is used
+		;;
+	# all other C++ compilers ...
+	* )
+		;;
+esac
+
+AC_SUBST(CPPLIBS)
+
+# end of C++
+
+############################################################################
+AC_LANG_PUSH(Fortran)
+############################################################################
+#
+# Which fortran compiler should be used?
+#
+# FLIBS is determined which Fortran compiler was used for Emoslib!!!
+#
+F77_ODB=""
+MAGICS_DEFINES=""
+MV_FLIBS=""
+
+case "${F77}" in
+	gfortran )
+		MAGICS_DEFINES="${MAGICS_DEFINES} -DGFORTRAN"
+		FC_BITFLAGS="${AXX} -DGFORTRAN -fno-second-underscore -fpic -fdefault-real-8 -fcray-pointer"
+		FLIBS="${FLIBS} -lgfortran"
+		LDFLAGS="${LDFLAGS} -lgfortran"
+		FFLAGS="${FFLAGS} ${AXX}"
+		MV_FLIBS="${FLIBS}"
+		FC_FLAGS="${FC_BITFLAGS}"
+		FFLAGS="${FFLAGS} ${FC_BITFLAGS}"
+		;;
+
+	g77 )
+		echo "Oops ... $F77 not implemented yet"
+		FFLAGS="${FFLAGS}"
+		FLIBS="${FLIBS}"
+		;;
+
+	# Intel compiler
+	ifc | ifort)
+		#echo "Oops ... $F77 not implemented yet"
+		FC_BITFLAGS=""
+		FFLAGS="${FFLAGS}"
+		FLIBS="${FLIBS} -lifcore -lifport"
+		FC_FLAGS="${FC_BITFLAGS}"
+		;;
+
+	# Portland C++
+	pgf90 | pgf77 )
+		#FLIBS="${FLIBS} -lpgftnrtl -lpgc"        # PGI 5.2
+		FLIBS="${FLIBS} -lpgf90rtl -lpgftnrtl -lrt -lpgf90 -lpgf902 -lpghpf -lpgf90_rpm1 -lpghpf2 -lpgc"    # PGI 7.1
+		#MV_FLIBS="${FLIBS} -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgftnrtl -lpgsse2 -lpgsse1 -lm -lpgc -lrt"
+		FC_BITFLAGS="-r8"
+		FLIBS="$FLIBS -lpgftnrtl -lpgc -lrt"   # PGI 7.1
+		MV_FLIBS="${FLIBS}"
+		F77_ODB="-lifsaux -lmpi_serial -lodbdummy -lpgmp -lpgf90 -lpgf90_rpm1 -lpgf902"
+		case "${host}" in
+			x86_64*linux*)
+				FFLAGS="${FFLAGS} -r8 -tp amd64 ${FC_BITFLAGS}"
+				;;
+			# Linux workstations x86
+			*86-*-linux* )
+				FFLAGS="${FFLAGS} -r8 -tp px ${FC_BITFLAGS}"
+				;;
+		esac
+		FC_BITFLAGS="${FC_BITFLAGS} ${FFLAGS}"
+        FCFLAGS="${FC_BITFLAGS} ${FCFLAGS}"
+		;;
+
+	# IBM fortran compiler
+	xlf | xlf90 | xlf_r | xlf90_r )
+		MAGICS_DEFINES="${MAGICS_DEFINES}"
+		FC_BITFLAGS="${AXX} -qrealsize=8 -qintsize=4"
+		FC_LINK_BITFLAGS="$AXX"
+		FCFLAGS="\$(AIX_COMMON_FLAGS) -qextname -qddim -bdynamic -qnoescape -qmaxmem=-1 ${FC_BITFLAGS} ${PLATFORM_PROFILER}"
+		#FFLAGS="${FFLAGS} ${AXX}"
+		#METVIEW_FC_FLAGS="-I${grib_location}/include64 ${METVIEW_FC_FLAGS}"
+		EMOS_FC_FLAGS="-qfixed -qintlog"
+		#APTRA_FC_FLAGS="\$(PLATFORM_FC_FLAGS) \$(METVIEW_FC_FLAGS)"
+		MACRO_F90_FLAGS="-qsuffix=f=f90"
+		FLIBS="-lxlf90"
+		MV_FLIBS="-lxlfpad -lxlf90 -lxlf"
+		FFLAGS="${FFLAGS} ${AXX} ${FC_BITFLAGS}"
+		FFIXED_FLAGS="-qfixed=72"
+		F77_ODB="-lodbec -lifsaux -lmpi_serial -lesslsmp -lodbdummy -L/usr/lpp/xlf/lib -lxlf90 -lxlopt -lxlf -lxlsmp -lpthreads -lm -lc"
+		;;
+	# all other C++ compilers ...
+	* )
+		if test "x${F77}" = "x"; then
+			echo "No Fortran compiler defined! Use F77=<name> to set one."
+			FLIBS=""
+		else
+		echo "Oops ... $F77 not supported yet"
+		fi
+		;;
+esac
+AC_SUBST(FLIBS)
+AC_SUBST(FFIXED_FLAGS)
+
+AC_LANG_POP
+
+# end of F O R T R A N
+
+
+#########################################################################################
+#
+#  CHECKING CONFIGURE OPTIONS!!!!
+#
+#  enabling graphical user interface
+#
+#########################################################################################
+
+AC_ARG_ENABLE(ui, [[  --enable-ui	          enable the graphics user interface [default=yes]]],
+  ui=$enableval, ui=yes)
+
+if test "x$ui" = xyes; then
+    case "${host}" in
+	    *linux*)
+		    AC_DEFINE(METVIEW_GUI, 1)
+		    echo ""
+		    #echo "Your OpenGL setup:"
+		    #glxinfo | grep rendering
+		    #glxinfo | grep "OpenGL vendor"
+		    #glxinfo | grep "OpenGL version"
+		    #glxinfo | grep "glx vendor"
+		    #glxinfo | grep "glx version"
+		    #echo ""
+		    AC_CHECK_HEADERS([Xm/Xm.h])
+		    ;;
+        *aix*)
+            AC_DEFINE(METVIEW_GUI, 1)
+            ;;
+        *darwin*)
+            AC_DEFINE(METVIEW_GUI, 1)
+            ;;
+	    * )
+		    echo "**************************************************"
+		    echo ""
+		    echo "  Currently the Graphical User Interface is not"
+		    echo "  supported on this platform!!!"
+		    echo ""
+		    echo "**************************************************"
+		    ui=no
+		    ;;
+    esac
+
+    ######################################################################
+    #
+    #     Qt
+    #
+    ######################################################################
+
+    qt=yes
+
+    # Qt with AutoTroll.
+    m4_include([aux_build/autotroll.m4])
+    AT_WITH_QT([+xmlpatterns +xml +network])
+    AC_MSG_CHECKING([for Qt])
+    AT_REQUIRE_QT_VERSION([4.6],
+       AC_MSG_WARN([Qt version >= 4.6 is required]))
+
+    # ensure that the Qt/XmlPatterns headers are installed
+    SAVED_CPPFLAGS=${CPPFLAGS} # save CPPFLAGS
+    CPPFLAGS="${CPPFLAGS} ${QT_INCPATH}"
+    AC_LANG_PUSH(C++)
+    AC_CHECK_HEADER(QXmlQuery, ,AC_MSG_ERROR([Could not successfully find or compile with QXmlQuery. This should be in the Qt/XmlPatterns or Qt/Webkit dev package]))
+    AC_LANG_POP
+    CPPFLAGS=${SAVED_CPPFLAGS} # restore CPPFLAGS
+
+
+    AC_DEFINE(METVIEW_QT, 1)
+    CXXFLAGS="${CXXFLAGS} -DMETVIEW_QT"
+    MAGPLUS_LIB="-lMagPlusQt ${MAGPLUS_LIB}"
+    echo "set"
+
+    # remove any optmisation flags that we get from Qt - we want to control our own
+    QT_CFLAGS=`echo ${QT_CFLAGS} | sed "s/-O.//g"`
+    QT_CXXFLAGS=`echo ${QT_CXXFLAGS} | sed "s/-O.//g"`
+    QT_CPPFLAGS=`echo ${QT_CPPFLAGS} | sed "s/-O.//g"`
+
+    # unfortunately, qmake combines its linker flags with its libraries in its LIBS variable
+    # which is translated into QT_LIBS. On some systems we need finer-grain control over the
+    # positioning of these elements, so we need to do a search & replace with some 'sed' magic
+    # in order to extract the different components: QT_EXTRACTED_LDFLAGS should contain just the
+    # -L/library/path elements, and QT_EXTRACTED_LIBS should contain everything else. We then
+    # put these back into QT_LIBS and QT_LDFLAGS.
+    QT_EXTRACTED_LIBS=`echo " ${QT_LIBS}" | sed 's/ -L[[^ ]]*//g'`
+    QT_EXTRACTED_LDFLAGS=`echo " ${QT_LIBS}" | sed 's/ -[[^L]][[^ ]]*//g' | sed 's/ [[^-]][[^L]][[^ ]]*//g'`
+
+    QT_LIBS=$QT_EXTRACTED_LIBS
+    QT_LDFLAGS="$QT_LDFLAGS $QT_EXTRACTED_LDFLAGS"
+
+    AC_SUBST(QT_LIBS)
+    AC_SUBST(QT_LDFLAGS)
+
+
+    ######################################################################
+    #
+    #     Qt debug
+    #
+    ######################################################################
+
+    AC_ARG_ENABLE(qtdebug, [[  --enable-qtdebug        enable QDebug output in Qt-based modules [default=no]]],
+          qtdebug=$enableval, qtdebug=no)
+
+    if test "x${qt}" = xyes -a "x${qtdebug}" = xno ; then
+	    CXXFLAGS="${CXXFLAGS} -DQT_NO_DEBUG_OUTPUT"
+    fi
+
+else
+    ui=no
+    qt=no
+    echo "                         ***"
+    echo "Building batch version with no graphical user interface."
+    echo "                         ***"
+fi
+
+
+
+
+
+
+######################################################################
+#
+#  Magics++ support  --enable-magics
+#
+######################################################################
+AC_ARG_ENABLE(magics,[[  --enable-magics         enable the Magics++ library support [default=yes]]],
+  magics=$enableval, magics=yes)
+
+magics_odb=no
+
+if test "x$magics" = xyes; then
+
+  #################################################
+  #
+  #   M A G P L U S  H O M E
+  #
+  AC_ARG_WITH([magics-home],
+       [AS_HELP_STRING([--with-magics-home],[Location of Magics libraries])],
+       []
+    )
+
+  # if no magics home is set we try /usr/local or assume /usr as default
+  if test "x${with_magics_home}" = "x" ; then
+    if test -e ${MAGPLUS_HOME}/bin/magics-config ; then
+       with_magics_home=${MAGPLUS_HOME}
+    else
+       AC_MSG_WARN([$MAGPLUS_HOME is not a valid Magics directory, so we test for more ...])
+       if test -e /usr/local/bin/magics-config ; then
+         with_magics_home=/usr/local
+         echo " FOUND Magics in /usr/local"
+       elif test -e /usr/bin/magics-config ; then
+         with_magics_home=/usr
+         echo " FOUND Magics in /usr"
+       else
+         AC_MSG_ERROR([No location found for Magics!!!])
+       fi
+    fi
+  fi
+  MAGPLUS_HOME="${with_magics_home}"
+  AC_SUBST(MAGPLUS_HOME)
+  ##################################################
+
+  export PKG_CONFIG_PATH=${MAGPLUS_HOME}/lib64/pkgconfig/:${MAGPLUS_HOME}/lib/pkgconfig/:${PKG_CONFIG_PATH}
+  PKG_CHECK_MODULES(MAGICS, [magics >= ${METVIEW_MAGICS_MIN_VERSION}],
+  [
+    # check where the libraries are
+    MAGPLUS_LIBDIR=`${MAGPLUS_HOME}/bin/magics-config --libdir`
+    AC_SUBST(MAGPLUS_LIBDIR)
+
+    MAGPLUSLIB_APPEND=${MAGPLUS_LIB}  # to add to the end, later
+    CPPFLAGS="$MAGICS_CFLAGS $CPPFLAGS"
+
+    MAGPLUS_CPPFLAGS="-I${with_magics_home}/include/magics ${MAGPLUS_CPPFLAGS}"
+    MAGPLUS_LDFLAGS="-L${MAGPLUS_LIBDIR} ${MAGPLUS_LDFLAGS}"
+    MAGPLUS_LIB="-L${MAGPLUS_LIBDIR} -lMagWrapper -lMagPlus -lexpat -lz -lm -lfontconfig"
+    # note: the NetCDF libraries will be added to MAGPLUS_LIB later in this script
+
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-metview`" = xno; then
+     AC_MSG_ERROR([Magics has not been buiilt with Metview support! Please re-configure Magics with the --enable-metview flag.])
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-cairo`" = xyes; then
+     magics_cairo=yes
+    else
+     magics_cairo=no
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-bufr`" = xyes; then
+     magics_bufr=yes
+    else
+     magics_bufr=no
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-odb`" = xyes; then
+     magics_odb=yes
+    else
+     magics_odb=no
+    fi
+    if test "x`${MAGPLUS_HOME}/bin/magics-config --with-gd`" = xyes; then
+     magics_gd=yes
+     MAGPLUS_LIB="${MAGPLUS_LIB} -lgd -lfreetype -ljpeg -lpng"
+    else
+     magics_gd=no
+    fi
+
+    MAGPLUS_LIB="${MAGPLUS_LIB} ${MAGPLUSLIB_APPEND}"
+
+    ##################################
+    # check whether the static MagPlus library exists - if so, it should be a dependency of any
+    # Metview module which uses Magics++
+    DEPEND_MAGPLUS_LIBS=$${MAGPLUS_LIBDIR}/libMagWrapper.a
+    if test -e $${MAGPLUS_LIBDIR}/libMagPlus.a ; then
+      DEPEND_MAGPLUS_LIBS="${DEPEND_MAGPLUS_LIBS} ${MAGPLUS_LIBDIR}/libMagPlus.a"
+    fi
+    ##################################
+
+    AC_DEFINE(METVIEW_MAGICS, 1)
+    echo "Magics version detected:  `${MAGPLUS_HOME}/bin/magics-config --version`"
+],
+[
+    magics=no
+    magics_ver=`${MAGPLUS_HOME}/bin/magics-config --version`
+    AC_MSG_WARN([Magics version ${METVIEW_MAGICS_MIN_VERSION} is required. Detected: ${magics_ver}])
+    AC_MSG_ERROR([If you do not want Magics support, use the --disable-magics option.])
+])
+fi
+
+
+
+
+#
+#   FREETYPE
+#
+AC_CHECK_LIB([fontconfig], [FcInitLoadConfigAndFonts], [
+		  AC_CHECK_HEADER([fontconfig/fontconfig.h], [
+		    LIBS="-lfontconfig ${LIBS}"
+		  ])
+		])
+
+#
+# Find the X11 include and library directories.
+#
+if test "x$ui" = xyes ; then
+
+  #
+  #  OpenMotif
+  #
+  AC_CHECK_LIB(Xext,XShmAttach,LIB_XEXT='-lXext',,)
+  AC_CHECK_LIB(Xext,XShapeCombineMask)
+  AC_CHECK_LIB(Xt,XtAppMainLoop)
+  AC_CHECK_LIB(Xm,XmCreatePushButton,,AC_MSG_ERROR([Motif not found.]))
+
+  # Extra Motif libraries (XPM)
+  AC_CHECK_LIB(X11,XDefaultScreen)
+  AC_CHECK_LIB(Xpm,XpmReadFileToImage,,AC_MSG_ERROR([Library Xpm not found]))
+  AC_CHECK_LIB(Xmu,XmuClientWindow,   ,AC_MSG_ERROR([Library Xmu not found.]))
+
+  CPPFLAGS="${CPPFLAGS} -I/usr/include/X11"
+  AC_CHECK_HEADER(xpm.h,              ,AC_MSG_ERROR([could not successfully find or compile with xpm.h]))
+
+  # Check for a suitable Motif implementation
+  AC_COMPILE_IFELSE(
+	[AC_LANG_PROGRAM(
+		[[#include <Xm/DrawingAP.h>]],
+		[[XmDrawingAreaConstraintPart* p;]]
+	)],
+	[],
+	[AC_MSG_FAILURE([Your Motif does not implement XmDrawingAreaConstraintPart (are you using Lesstif? It is not supported).])]
+  )
+  AC_CHECK_LIB(pthread,pthread_key_create)
+fi
+#### end GUI
+
+
+################################################################################################
+#
+#  Trajectory support  --enable-trajectory
+#
+#AC_ARG_ENABLE(traj, [[  --enable-trajectory	  enable the Trajectory package (ECMWF internal) [default=no]]],
+#  traj=$enableval, traj=no)
+#if test "x$traj" = xyes; then
+#  AC_DEFINE(METVIEW_TRAJ, 1)
+#fi
+
+
+
+AC_LANG([C++])
+#
+# freetype
+#
+if test "x$raster" = xyes; then
+  AC_CHECK_HEADER(ft2build.h,,AC_MSG_WARN([could not successfully compile with FreeType2]))
+fi
+
+#
+# For XML parser expat
+#
+AC_CHECK_HEADER(expat.h,,
+  AC_MSG_WARN([could not successfully compile with expat using the])
+  AC_MSG_WARN([default compiler flags;])
+  unset ac_cv_header_expat_h)
+AC_CHECK_LIB(expat, XML_ParserCreate ,,AC_MSG_ERROR([expat xml parser library not found.]))
+
+#
+#   GDBM
+#
+AC_CHECK_HEADER(gdbm.h,,AC_MSG_ERROR([could not successfully compile with gdbm.h]))
+AC_CHECK_LIB(gdbm,gdbm_open)
+
+
+
+#########################################################################################
+#
+# For netcdf header file
+#
+#########################################################################################
+AC_ARG_WITH([netcdf],
+       [AS_HELP_STRING([--with-netcdf],
+       [Prefix of NetCDF libraries and headers.])],
+       [CPPFLAGS="-I${with_netcdf}/include ${CPPFLAGS}";LDFLAGS="-L${with_netcdf}/lib ${LDFLAGS}"]
+)
+AC_CHECK_HEADER(netcdfcpp.h,,
+  AC_MSG_WARN([could not successfully compile with netcdfcpp.h!])
+  unset ac_cv_header_netcdf_h)
+
+AC_CHECK_LIB(netcdf,ncvarid ,NETCDF_LIBS="-lnetcdf_c++ -lnetcdf",AC_MSG_ERROR([netcdf library not found.]))
+#AC_CHECK_LIB(netcdf_c++, nctypelen        ,echo "",AC_MSG_ERROR([netcdf_c++ library not found.]))
+
+
+#########################################################################################
+#
+# Check for curl - sometimes needed by NetCDF
+#
+#########################################################################################
+AC_MSG_CHECKING([for curl library sometimes needed by NetCDF])
+
+AC_CHECK_LIB(curl,curl_easy_setopt,  [have_curl="yes"], have_curl="no")
+
+# NetCDF can be built with a dependency on curl. Therefore, we add it to the libraries if it is
+# installed; otherwise, issue a warning.
+
+if test "${have_curl}" = "yes"
+then
+	NETCDF_LIBS="${NETCDF_LIBS} -lcurl"
+else
+    echo "    No curl library - ensure that your NetCDF library does not require it."
+    echo "    NOTE: the MARS web API will not work without curl. Please use install curl or --disable-mars-api."
+fi
+
+
+# add the NetCDF libaries to MAGPLUS__LIB
+MAGPLUS_LIB="${MAGPLUS_LIB} ${NETCDF_LIBS}"
+
+
+
+
+#############################################################################################################
+#
+#     E M O S L I B -- always DOUBLE precision !!!
+#
+
+# emoslib is currently required (or libMars interpolation/subarea extraction, etc)
+# so remove the option to disable it.
+
+#AC_ARG_ENABLE(emos, [[  --enable-emos	          enable the EmosLib support [default=yes]]],
+#  emos=$enableval, emos=yes)
+
+emos="yes"
+
+if test "x$emos" = xyes; then
+
+    AC_MSG_CHECKING([for EmosLib (ECMWF)])
+
+    EMOS_LIB_NAME="emosR64"
+
+    emos_path=/usr/local/${LIBNAME}
+
+    AC_ARG_WITH([emos-libraries],
+           [AS_HELP_STRING([--with-emos-libraries],[Location of EMOS libraries @<:@default is /usr/local/lib@:>@])],
+           [EMOS_LIB_FLAGS="-L$with_emos_libraries";LDFLAGS="$EMOS_LIB_FLAGS $LDFLAGS"; emos_path=$with_emos_libraries]
+    )
+
+    AC_ARG_WITH([emos-libname],
+           [AC_HELP_STRING([--with-emos-libname],[Name of EMOS library @<:@default is emosR64@:>@ ])],
+           [EMOS_LIB_NAME="$with_emos_libname"]
+    )
+
+    AC_CHECK_LIB(${EMOS_LIB_NAME},pbopen,echo "EmosLib detected",
+                AC_MSG_ERROR([Emoslib (${EMOS_LIB_NAME}) could not be linked! Metview requires emoslib with 64-bit reals (usually libemosR64.a). Try setting --with-emos-libraries and --with-emos-libname.]))
+
+    AC_DEFINE(METVIEW_EMOS, 1)
+    METVIEW_3RDPARTY_LIBS="$METVIEW_3RDPARTY_LIBS -l${EMOS_LIB_NAME}"
+
+    MV_EMOSLIB="${EMOS_LIB_FLAGS} -l${EMOS_LIB_NAME}"
+    AC_SUBST(MV_EMOSLIB)
+
+else
+    emos="no"
+fi
+
+
+#########################################################################################
+#
+# Check for GRIB API
+#
+#########################################################################################
+AC_MSG_CHECKING([for JPEG libraries needed by GRIB_API])
+
+AC_CHECK_LIB(openjpeg,opj_image_create,  [have_openjpeg="yes"], have_openjpeg="no")
+AC_CHECK_LIB(jasper,  jas_stream_memopen,[have_jasper="yes"], have_jasper="no")
+
+# GRIB_API prefers openjpeg over jasper, so we do the same - if openjpeg is installed,
+# then use it; otherwise, if jasper is installed, then use that. If neither is installed,
+# then issue a warning.
+
+if test "${have_openjpeg}" = "yes"
+then
+	JPEG_LIB="-lopenjpeg -lm";LIBS="${LIBS} ${JPEG_LIB}"
+fi
+
+
+if test "${have_jasper}" = "yes"
+then
+	JPEG_LIB="-ljasper";LIBS="${LIBS} ${JPEG_LIB}"
+fi
+
+if test "${have_jasper}" = "no" -a "${have_openjpeg}" = "no"
+then
+		echo " "
+		echo "    No OpenJPEG or Jasper (JPEG 2000) library could be found!"
+		echo "    Your Metview programs should work nevertheless as long as"
+		echo "    your installed GRIB_API does NOT require it! Compile GRIB_API"
+		echo "    without JPEG support."
+		echo " "
+fi
+
+
+GRIB_API_INCLUDE_SUBDIR="include"
+
+if test "x$SITE_NAME" = 'xecmwf'  # only at ECMWF we use 'include64'
+then
+  case "${host}" in
+    *-ibm-aix* )   # IBM Server
+          GRIB_API_INCLUDE_SUBDIR="include64"
+          echo "ecgate machine detected - using ${GRIB_API_INCLUDE_SUBDIR} for grib_api include subdirectory"
+    ;;
+    *x86_64* )   # Linux 64-bit
+        GRIB_API_INCLUDE_SUBDIR="include64"
+        echo "64-bit Linux machine detected - using ${GRIB_API_INCLUDE_SUBDIR} for grib_api include subdirectory"
+    ;;
+  esac
+fi
+
+grib_location=/usr/local
+AC_ARG_WITH([grib-api],
+       [AS_HELP_STRING([--with-grib-api],
+       [Prefix of GRIB API libraries and headers.])],
+       [GRIB_API_INC="-I${with_grib_api}/${GRIB_API_INCLUDE_SUBDIR}";CPPFLAGS="${GRIB_API_INC} ${CPPFLAGS}";GRIB_API_LIB="-L${with_grib_api}/${LIBNAME}";LDFLAGS="${GRIB_API_LIB} ${LDFLAGS}";grib_location=${with_grib_api};]
+)
+
+# if no grib_api dir is set, we still need to add its 'include' dir to the fortran compilation flags
+if test "x${with_grib_api}" = "x" ; then
+    GRIB_API_INC="-I${grib_location}/${GRIB_API_INCLUDE_SUBDIR}"
+fi
+
+
+
+#METVIEW_FC_FLAGS="${FCFLAGS} -I${grib_location}/include ${METVIEW_FC_FLAGS}"
+
+# Note: we add "-I/usr/include" to FCFLAGS for the case where GRIB_API has been installed by RPM
+FCFLAGS="${FCFLAGS} ${GRIB_API_INC} ${METVIEW_FC_FLAGS} -I/usr/include"
+
+AC_CHECK_LIB(grib_api,grib_get_message,GRIBAPI_LIBS="-lgrib_api",AC_MSG_ERROR([Grib API could not be linked! Try setting --with-grib-api .]))
+
+GRIB_API_LIB="${GRIB_API_LIB} ${GRIBAPI_LIBS} ${JPEG_LIB}" # for inline fortran/c macros
+AC_SUBST(GRIB_API_INC) # for inline fortran/c macros
+AC_SUBST(GRIB_API_LIB) # for inline fortran/c macros
+AC_SUBST(GRIBAPI_LIBS)
+AC_SUBST(LDFLAGS_INLINE)  # for inline fortran/c macros
+
+
+#########################################################################################
+#
+# For INPE header file
+#
+#########################################################################################
+AC_ARG_ENABLE(inpe, [[  --enable-inpe             enable the INPE support (only at INPE) [default=no]]],
+  inpe=$enableval, inpe=no)
+
+if test "x$inpe" = xyes ; then
+   AC_MSG_CHECKING([for INPE (INPE)])
+   AC_DEFINE(METVIEW_INPE, 1)
+fi
+
+#####################################################################
+#
+#    M A R S   ODB  access
+#
+AC_ARG_ENABLE(mars-odb, [[  --enable-mars-odb	          enable the MARS ODB accesss [default=no]]],
+  marsodb=$enableval, marsodb=no)
+
+#####################################################################
+#
+# ODB access
+#
+AC_ARG_ENABLE(odb, [[  --enable-odb	          enable the ODB support [default=no]]],
+  odb=$enableval, odb=no)
+
+if test "x${marsodb}" = xyes -o "x${magics_odb}" = xyes ; then
+	odb=yes
+fi
+
+odbnew=no
+odbold=no
+odbplot=no
+ODB_CPPFLAGS=""
+ODB_LDFLAGS=""
+ODB_LIBS=""
+
+if test "x$odb" = xyes ; then
+
+  # Test if we can support ODB-2
+  ODB_LIBDIR=""
+  AC_MSG_CHECKING([for ODB-2 ])
+  AC_ARG_WITH([odb],
+  [AS_HELP_STRING([--with-odb],
+     [Prefix of ODB libraries and headers.])],
+     [ODB_CPPFLAGS="-DODB_SUPPORT -I${with_odb}/include -I${with_odb}/include/eclib  -I${with_odb}/include/eclib/eclib -I${with_odb}/include/odb_api -I${with_odb}/include/odb_api/odblib";
+     ODB_LIBDIR="${with_odb}/lib";
+     ODB_LDFLAGS="-L${ODB_LIBDIR}";
+     ODB_LIBS="-lOdb -lEc";
+     AC_CHECK_FILE(${with_odb}/lib/libOdb.a,odbnew=yes,odbnew=no)]
+   )
+   AC_SUBST(ODB_LIBDIR)
+
+  if test "x$odbnew" = xyes; then 
+      AC_DEFINE(METVIEW_ODB_NEW, 1,["Support for the ODB-2 API"])
+      CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB_NEW" 
+
+      #Test if we can plot ODB
+      if test "x${magics_odb}" = xyes ; then	
+ 	 AC_DEFINE(METVIEW_ODB_PLOT, 1,["Support for plotting ODB data"])
+     	 CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB_PLOT" 
+	 odbplot=yes
+      else
+	 AC_MSG_WARN(["ODB plotting is disabled, because Magics was built without ODB support! Please, rebuild Magics with ODB support to enable ODB plotting!"])
+      fi
+
+      ODB1_BIN=""   # default - assume the user will not need to know the bin directory (ie it's in their PATH)
+      AC_MSG_CHECKING([for ODB-1])
+      AC_ARG_WITH([odb1-bin],
+          [AS_HELP_STRING([--with-odb1-bin],
+          [Path to the ODB-1 bin directory.])],
+          [AC_CHECK_FILE(${with_odb1_bin},odboldbin=yes,odboldbin=no)]
+       )
+
+      # Test if we can support ODB-1
+      if test "x$odboldbin" = xyes; then
+          ODB1_BIN=${with_odb1_bin} 
+          AC_SUBST(ODB1_BIN)
+          AC_CHECK_FILE(${with_odb1_bin}/odbsql2,odbold=yes,odbold=no) 
+             
+          if test "x$odbold" = xyes; then
+              AC_DEFINE(METVIEW_ODB_OLD, 1,["Support for the ODB-1 API"])
+              CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB_OLD" 
+
+	      ODB1_VERSION=ANY    # did the user supply a required ODB-1 version?
+              AC_ARG_WITH([odb1-version],
+                 [AS_HELP_STRING([--with-odb1-version],[Required version of ODB-1 environment [default=ANY.]])],
+                 [ODB1_VERSION=$with_odb1_version])
+              AC_SUBST(ODB1_VERSION)
+
+              ODB1_USE_SCRIPT="$ODB1_BIN/use_odb.sh"       # ODB-1 use script
+              AC_ARG_WITH([odb1-use-script],
+                  [AS_HELP_STRING([--with-odb1-use-script],[Path to ODB-1 'use' script (normally 'use_odb.sh').])],
+                  [ODB1_USE_SCRIPT=$with_odb1_use_script])
+              AC_SUBST(ODB1_USE_SCRIPT)
+              echo "ODB1_USE_SCRIPT: $ODB1_USE_SCRIPT"
+          else
+	       AC_MSG_WARN("ODB-1 support is DISABLED - No odbsql2 script found!")
+	  fi
+     else
+	   AC_MSG_WARN("ODB-1 support is DISABLED - No ODB-1 bin directory found!")
+     fi
+	
+  # If no ODB-2 libraries found
+  else		
+     ODB_CPPFLAGS=""
+     ODB_LDFLAGS=""
+     ODB_LIBS=""
+
+     if test "x${magics_odb}" = xyes ; then
+         AC_MSG_FAILURE("[Cannot build Metview! Magics was built with ODB support but no ODB-2 library was found! Please provide a valid ODB-2 library path via --with-odb"])
+     else	
+     	 AC_MSG_FAILURE(["Cannot build Metview! ODB support is enabled but no ODB-2 library was found! Please provide a valid ODB-2 library path via --with-odb"])
+     fi	
+  fi
+fi
+
+# ODB is supported if either ODB-2 or ODB-1 is supported
+if test "x$odbnew" = xyes -o "x$odbold" = xyes ; then
+    AC_DEFINE(METVIEW_ODB, 1)
+    CPPFLAGS="${CPPFLAGS} -DMETVIEW_ODB"
+else
+    odb=no
+fi
+
+#We disable MARS ODB if no ODB-2 library is found
+if test "x$odbnew" != xyes ; then
+    marsodb=no
+fi
+
+
+#####################################################################
+#
+#    M A R S   ODB  access
+#
+#AC_ARG_ENABLE(mars-odb, [[  --enable-mars-odb	          enable the MARS ODB accesss (client-server) [default=no]]],
+#  marsodb=$enableval, marsodb=no)
+
+MARS_ODB_ACCESS=MARS_none
+
+if test "x${marsodb}" = xyes ; then
+  AC_DEFINE(METVIEW_MARS_ODB, 1)
+
+  MARS_ODB_ACCESS=MARS_local
+fi
+
+AC_SUBST(MARS_ODB_ACCESS)
+
+#####################################################################
+#
+#    M A R S  access
+#
+AC_ARG_ENABLE(mars-access, [[  --enable-mars-access	          enable the MARS accesss (client-server) [default=no]]],
+  mars=$enableval, mars=no)
+
+MARS_ACCESS=MARS_none
+
+if test "x$mars" = xyes ; then
+  AC_DEFINE(METVIEW_MARS, 1)
+
+  MARS_ACCESS=MARS_local
+fi
+
+#####################################################################
+#
+#    M A R S  catalog support
+#
+AC_ARG_ENABLE(marscatalog, [[  --enable-marscatalog	          enable the MARS catalog support only at ECMWF) [default=no]]],
+  marscatalog=$enableval, marscatalog=no)
+
+#MARS_CATALOG=MARS_none
+
+if test "x$marscatalog" = xyes ; then
+  AC_DEFINE(METVIEW_MARS_CATALOG, 1)
+
+  #MARS_ACCESS=MARS_local
+fi
+
+#####################################################################
+#
+#    M A R S  CURL support
+#
+AC_ARG_ENABLE(mars-api, [[  --enable-mars-api	          enable the MARS API (requires curl library) [default=yes]]],
+  mars_api=$enableval, mars_api=yes)
+
+
+
+if test "x$mars_api" = xno ; then
+    CPPFLAGS="${CPPFLAGS} -DNOCURL"
+else
+    if test "${have_curl}" = "no" ; then
+        AC_MSG_FAILURE([The curl library was not found; you can disable its requirement by setting --disable-mars-api.])
+    else 
+        echo "MARS web api will be built"
+    fi
+fi
+
+
+
+#####################################################################
+#
+# OBSTAT support
+#
+AC_ARG_ENABLE(obstat, [[  --enable-obstat	          enable the OBSTAT support (only at ECMWF) [default=no]]],
+  obstat=$enableval, obstat=no)
+
+if test "x$obstat" = xyes ; then
+  AC_DEFINE(METVIEW_OBSTAT, 1)
+fi
+
+#####################################################################
+#
+# OPERA radar support (requires proj4)
+#
+AC_ARG_ENABLE(opera-radar, [[  --enable-opera-radar	          enable OPERA radar support (requires proj4) [default=yes]]],
+  operaradar=$enableval, operaradar=yes)
+
+if test "x$operaradar" = xyes ; then
+  proj4="yes"
+  AC_DEFINE(METVIEW_OPERA, 1)
+fi
+
+if test "x$proj4" = "xyes" ; then
+  AC_ARG_WITH([proj4],
+       [AS_HELP_STRING([--with-proj4],
+       [Prefix of Proj4 libraries and headers.])],
+       [PROJ4_LIBS="-lproj";CPPFLAGS="-I${with_proj4}/include ${CPPFLAGS}";LDFLAGS="-L${with_proj4}/lib ${LDFLAGS}"]
+  )
+  AC_MSG_CHECKING([for Proj4 header])
+  AC_CHECK_HEADER(proj_api.h,,AC_MSG_ERROR([could not successfully find proj_api.h (proj4 development package)]))
+  AC_MSG_CHECKING([for Proj4 library])
+  AC_CHECK_LIB(proj,pj_init,,AC_MSG_ERROR([Proj4 could not be linked! Try --disable-opera-radar]))
+fi
+
+
+
+
+#####################################################################
+#
+# FLEXTRA support
+#
+
+  AC_MSG_CHECKING([for FLEXTRA])
+
+  AC_ARG_WITH([flextra],
+  [AS_HELP_STRING([--with-flextra],
+  [FLEXTRA executable path.])],
+  [MV_FLEXTRA_EXE="${with_flextra}";
+    AC_CHECK_FILE(${with_flextra},flextra=yes,flextra=no)]
+  )
+
+  if test "x$flextra" = xno; then
+     echo ""
+     echo "  No FLEXTRA executable is found!"
+  fi
+
+#####################################################################
+#
+# SCM support
+#
+
+  AC_MSG_CHECKING([for SCM])
+
+  AC_ARG_WITH([scm],
+  [AS_HELP_STRING([--with-scm],
+  [SCM executable path.])],
+  [MV_SCM_EXE="${with_scm}";
+    AC_CHECK_FILE(${with_scm},scm=yes,scm=no)]
+  )
+
+  if test "x$scm" = xno; then
+     echo ""
+     echo "  No SCM executable is found!"
+  fi
+
+
+AC_ARG_ENABLE(scm-aux-files, [[  --enable-scm-aux-files       enable SCM auxillary files [default=no]]],
+      scm_aux=$enableval, scm_aux=no)
+
+
+
+
+#####################################################################
+#
+#  python interpreter
+#
+MV_PYTHON_COMMAND="python"
+AC_ARG_WITH([python-command],
+       [AS_HELP_STRING([--with-python-command],
+       [Python interpreter's path.])],
+       [MV_PYTHON_COMMAND="${with_python_command}"]
+)
+
+
+
+###########################################################
+#
+# Additional title text
+#
+
+AC_ARG_WITH([extra-title],
+       [AS_HELP_STRING([--with-extra-title],
+       [Extra information for the title bar])],
+       [METVIEW_EXTRA_TITLE="${with_extra_title}"]
+)
+
+AC_SUBST(METVIEW_EXTRA_TITLE)
+
+
+
+###########################################################
+#
+# Local ECMWF flags
+#
+if test "x$SITE_NAME" = 'xecmwf'
+then
+  CFLAGS="${CFLAGS} -DECMWF"
+  CXXFLAGS="${CXXFLAGS} -DECMWF"
+else
+  CFLAGS="${CFLAGS} -DSiteIsNotECMWF"
+  CXXFLAGS="${CXXFLAGS} -DSiteIsNotECMWF"
+  FDBLIB=""
+  external="yes"
+  AC_DEFINE(METVIEW_EXTERNAL, 1)
+fi
+
+
+###########################################################
+#
+# Because Metview has many executables, we avoid filling up the 'bin'
+# dir by putting them in a sub-directory
+#
+bindir=${bindir}/Metview
+MVSTARTDIR=${bindir}/..    # where the startup script will go
+AC_SUBST(MVSTARTDIR)
+
+
+
+
+# Autoheader
+AH_TEMPLATE(METVIEW_MAGICS,       [Turn on Magics++ related modules.])
+AH_TEMPLATE(METVIEW_QT,           [Turn on Qt related modules.])
+AH_TEMPLATE(METVIEW_QTDEBUG,      [Turn on QDebug output in Qt related modules.])
+AH_TEMPLATE(METVIEW_MARS,         [Turn on MARS related modules.])
+AH_TEMPLATE(METVIEW_MARS_CATALOG, [Turn on the MARS catalog support.])
+AH_TEMPLATE(METVIEW_DEBUG,        [Turn on any additional debugging support])
+AH_TEMPLATE(METVIEW_PROF,         [Turn on any additional profiling information])
+AH_TEMPLATE(METVIEW_GUI,          [Turn on the graphical user interface])
+AH_TEMPLATE(METVIEW_32BIT,        [Turn on 32 bit addressing])
+AH_TEMPLATE(METVIEW_EMOS,         [Turn off the Emoslib support])
+AH_TEMPLATE(METVIEW_ODB,          [Turn on the ODB support])
+AH_TEMPLATE(METVIEW_ODB_NEW,      [Turn on the ODB-2 support])
+AH_TEMPLATE(METVIEW_ODB_OLD,      [Turn on the ODB-1 support])
+AH_TEMPLATE(METVIEW_ODB_PLOT,     [Turn on the ODB plotting])
+AH_TEMPLATE(METVIEW_MARS_ODB,     [Turn on the MARS ODB support])
+AH_TEMPLATE(METVIEW_OBSTAT,       [Turn on the OBSTAT support])
+AH_TEMPLATE(METVIEW_OPERA,        [Turn on the OPERA radar support])
+AH_TEMPLATE(METVIEW_VERSION,      [Version of Metview.])
+AH_TEMPLATE(METVIEW_NAME,         [Name of this package.])
+AH_TEMPLATE(METVIEW_RELEASE_DATE, [Release date of this version.])
+AH_TEMPLATE(METVIEW_INSTALL_PATH, [Install path.])
+AH_TEMPLATE(METVIEW_SITE,         [Name of installation site.])
+#AH_TEMPLATE(METVIEW_TRAJ,         [Trajectory model.])
+AH_TEMPLATE(METVIEW_EXTERNAL,     [Extra data modules used outside ECMWF.])
+AH_TEMPLATE(METVIEW_EXPERIMENTAL, [Turn on experimental components used only in developments.])
+AH_TEMPLATE(METVIEW_INPE,         [Turn on the INPE support])
+AH_TEMPLATE(METVIEW_SCM_AUX,      [Turn on the SCM auxillary files])
+
+#
+#  Enable Debug information
+#
+AC_ARG_ENABLE(debug,
+     [[  --enable-debug          Turn on debugging [default=no] ]],
+     [case "${enableval}" in
+       yes) debug=true ;;
+       no)  debug=false ;;
+       *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+     esac],[debug=false])
+
+#
+#  Enable Profiling information
+#
+AC_ARG_ENABLE(prof,
+     [[  --enable-prof           Turn on profiling (ECMWF internal) [default=no]]],
+     [case "${enableval}" in
+       yes) prof=true ;;
+       no)  prof=false ;;
+       *) AC_MSG_ERROR(bad value ${enableval} for --enable-prof) ;;
+     esac],[prof=false])
+
+# if no debug and no profiling
+if test "x$debug" = xfalse -a "x$prof" = xfalse; then
+	CFLAGS="${OPTI} $CFLAGS"
+	CXXFLAGS="${OPTI} ${CXXFLAGS}"
+    FFLAGS="${FFLAGS} ${OPTI}"
+# otherwise ...
+else
+    # if DEBUG
+     if test "x$debug" = xtrue; then
+         AC_DEFINE(METVIEW_DEBUG, 1)
+         CFLAGS="-g -O0 $CFLAGS"
+         CXXFLAGS="-g -O0 ${CXXFLAGS}"
+     fi
+
+    # if PROFILING
+     if test "x$prof" = xtrue; then
+       case "${host}" in
+	*-linux* )
+		CFLAGS="-pg -fno-omit-frame-pointer -ggdb2 -g -O0 ${CFLAGS}"
+		CXXFLAGS="-pg -fno-omit-frame-pointer -ggdb2  -g -O0 ${CXXFLAGS}"
+		;;
+	# IBM Server
+	*-ibm-aix* )
+		LDFLAGS="-L${SITE_TOTALVIEW}/rs6000/lib ${LDFLAGS}"
+		LIBS="${SITE_TOTALVIEW}/rs6000/lib/aix_malloctype.o ${LIBS}"
+		;;
+      esac
+      AC_DEFINE(METVIEW_PROF, 1)
+     fi
+fi
+
+
+CFLAGS="$CFLAGS $METVIEW_DEFINES $PLATFORM_EMOS_BITFLAGS $PLATFORM_METVIEW_BITFLAGS"
+CPPFLAGS="$CPPFLAGS $METVIEW_DEFINES $PLATFORM_EMOS_BITFLAGS $PLATFORM_METVIEW_BITFLAGS"
+CXXFLAGS="$CXXFLAGS $METVIEW_DEFINES $PLATFORM_EMOS_BITFLAGS $PLATFORM_METVIEW_BITFLAGS"
+
+
+AM_CONDITIONAL(METVIEW_DEBUG, test x$debug = xtrue)
+AM_CONDITIONAL(METVIEW_PROF,  test x$prof = xtrue)
+
+
+METVIEW_3RDPARTY_INCLUDE="$CPPFLAGS"
+METVIEW_3RDPARTY_LIBS="$METVIEW_3RDPARTY_LIBS $NETCDF_LIBS $GRIBAPI_LIBS"
+
+AC_SUBST(METVIEW_3RDPARTY_INCLUDE)
+AC_SUBST(METVIEW_3RDPARTY_LIBS)
+#AC_SUBST(METVIEW_FC_FLAGS)
+AC_SUBST(LIBNAME)
+AC_SUBST(MAGPLUS_CPPFLAGS)
+AC_SUBST(MAGPLUS_LDFLAGS)
+AC_SUBST(MAGPLUS_LIB)
+AC_SUBST(EMOS_LIB_NAME)
+AC_SUBST(ODB_CPPFLAGS)
+AC_SUBST(ODB_LDFLAGS)
+AC_SUBST(ODB_LIBS)
+AC_SUBST(PROJ4_LIBS)
+
+############################################
+#
+#   standard compiler options that we always want
+#
+
+
+STANDARD_METVIEW_DEFINES="-DMETVIEW"
+STANDARD_METVIEW_FLAGS="-I../libMetview -I../libUtil -I../libMars  -I../libFTimeUtil"
+CPPFLAGS="$STANDARD_METVIEW_DEFINES $STANDARD_METVIEW_FLAGS $CPPFLAGS"
+
+
+# if we want to be able to have modules which use FLIBS and modules which don't, then we can't put everything
+# into $LIBS and then put $FLIBS into _LDADD, because $LIBS is added at the end, and therefore $FLIBS will be before
+# libMetview, etc. This will not work, because the Linux linker will not link in the FLIBS if they occur on the
+# command line before any objects/libraries which use them. Therefore, the solution is to define STANDARD_METVIEW_LIBS,
+# and have all modules have this in their LDADD, and then they can always add FLIBS to the end of that line if they
+# need it.
+# some more useful defines...
+
+METVIEW_UTIL_LIB="../../lib/libUtil.a"
+AC_SUBST(METVIEW_UTIL_LIB)
+
+
+STANDARD_METVIEW_LIBS="../../lib/libMetview.a ../../lib/libMars.a ../../lib/libFTimeUtil.a ${METVIEW_UTIL_LIB} ${METVIEW_3RDPARTY_LIBS}"
+STANDARD_METVIEW_LIBS_NO_UTIL="../../lib/libMetview.a ../../lib/libMars.a ../../lib/libFTimeUtil.a ${METVIEW_3RDPARTY_LIBS}"
+
+
+# the AIX linker is more demanding, and requires libraries to be linked in, even if nothing
+# is actually used from them
+case "${host}" in
+*-ibm-aix* )
+    STANDARD_METVIEW_LIBS="${STANDARD_METVIEW_LIBS} ${FLIBS} ${METVIEW_UTIL_LIB}"
+    STANDARD_METVIEW_LIBS_NO_UTIL="${STANDARD_METVIEW_LIBS} ${FLIBS} ${METVIEW_UTIL_LIB}"
+    ;;
+esac
+
+AC_SUBST(STANDARD_METVIEW_LIBS)
+AC_SUBST(STANDARD_METVIEW_LIBS_NO_UTIL)
+
+
+
+METVIEW_NETCDF_FLAGS="-I../libMvNetCDF"
+AC_SUBST(METVIEW_NETCDF_FLAGS)
+
+METVIEW_NETCDF_LIB="../../lib/libMvNetCDF.a"
+AC_SUBST(METVIEW_NETCDF_LIB)
+
+
+MV_MOTIF_FLAGS=" -I../libMvMotif"
+AC_SUBST(MV_MOTIF_FLAGS)
+
+MV_MOTIF_UTIL_LIB="../../lib/libMvMotif.a"
+AC_SUBST(MV_MOTIF_UTIL_LIB)
+
+
+DBMLIB="-lgdbm"
+AC_SUBST(DBMLIB)
+
+
+
+
+AC_SUBST(FDBLIB)
+
+
+AC_SUBST(MARS_ACCESS)
+
+#echo "X11LIB_DIR = ${X11LIB_DIR}" >> $config_file
+#echo "X11LIB = \${X11LIB_DIR} -lXm -lXmu -lXpm -lXt -lSM -lXp -lICE -lXext -lX11" >> $config_file
+#echo "XPM_LIB = ${X11LIB_DIR} -lXpm" >> $config_file
+
+
+
+
+
+
+AM_CONDITIONAL(METVIEW_MAGICS,     test "$magics"    = yes)
+AM_CONDITIONAL(METVIEW_QT,         test "$qt"        = yes)
+AM_CONDITIONAL(METVIEW_QTDEBUG,    test "$qtdebug"   = yes)
+AM_CONDITIONAL(METVIEW_32BIT,      test "$bit"       = yes)
+AM_CONDITIONAL(METVIEW_EMOS,       test "$emos"      = yes)
+AM_CONDITIONAL(METVIEW_MARS,       test "$mars"      = yes)
+AM_CONDITIONAL(METVIEW_MARS_CATALOG,  test "$marscatalog"      = yes)
+AM_CONDITIONAL(METVIEW_ODB,        test "$odbnew"    = yes  -o  "$odbold" = yes)
+AM_CONDITIONAL(METVIEW_ODB_NEW,    test "$odbnew"    = yes)
+AM_CONDITIONAL(METVIEW_ODB_OLD,    test "$odbold"    = yes)
+AM_CONDITIONAL(METVIEW_ODB_PLOT,   test "$odbplot"   = yes)
+AM_CONDITIONAL(METVIEW_MARS_ODB,   test "${marsodb}" = yes)
+AM_CONDITIONAL(METVIEW_OBSTAT,     test "$obstat"    = yes)
+AM_CONDITIONAL(METVIEW_OPERA,      test "$operaradar" = yes)
+AM_CONDITIONAL(METVIEW_GUI,        test "$ui"        = yes)
+#AM_CONDITIONAL(METVIEW_TRAJ,    test "$traj"        = yes)
+AM_CONDITIONAL(METVIEW_EXTERNAL,   test "$external"  = yes)
+AM_CONDITIONAL(METVIEW_EXPERIMENTAL,   test "$experimental"  = yes)
+AM_CONDITIONAL(METVIEW_INPE,        test "$inpe"     = yes)
+AM_CONDITIONAL(METVIEW_SCM_AUX,     test "$scm_aux"  = yes)
+
+AC_CONFIG_FILES([Makefile
+		src/Makefile
+		src/AppMod/Makefile
+		src/Event/Makefile
+		src/BufrExaminer/Makefile
+		src/CptecAccess/Makefile
+		src/Datacoverage/Makefile
+		src/DebugTools/Makefile
+		src/Divrot/Makefile
+		src/Ecfile/Makefile
+		src/ExamineManager/Makefile
+		src/Flextra/Makefile
+		src/FlextraExaminer/Makefile
+		src/GeopExaminer/Makefile
+		src/GribExaminer/Makefile
+		src/GribVectors/Makefile
+		src/Hovmoeller/Makefile
+		src/KML/Makefile
+		src/Macro/Makefile
+		src/MacroEditor/Makefile
+		src/MagML/Makefile
+		src/MarsCatalog/Makefile
+		src/Meteogram/Makefile
+		src/MetviewUI/Makefile
+		src/MvApp/Makefile
+		src/NcExaminer/Makefile
+		src/ObsFilter/Makefile
+		src/Obstat/Makefile
+		src/ObstatScatterTool/Makefile
+		src/ObstatCurveTool/Makefile
+		src/OdbExaminer/Makefile
+		src/Odb/Makefile
+		src/OgcClient/Makefile
+		src/OperaRadar/Makefile
+		src/Percentile/Makefile
+		src/PottF/Makefile
+		src/Reprojection/Makefile
+		src/Scm/Makefile
+		src/ScmEditor/Makefile
+		src/StdAppManager/Makefile
+		src/images/Makefile
+		src/libFTimeUtil/Makefile
+		src/libMars/Makefile
+		src/libMetview/Makefile
+		src/libMvMotif/Makefile
+		src/libMvNetCDF/Makefile
+		src/libMvQtGui/Makefile
+		src/libUtil/Makefile
+		src/libMvQtUtil/Makefile
+		src/uPlot/Makefile
+		src/Velstr/Makefile
+		src/VisTools/Makefile
+		src/XSection/Makefile
+		src/Stations/Makefile
+		src/WebAccess/Makefile
+		scripts/Makefile
+		share/metview/Makefile
+		share/metview/app-defaults/Makefile
+		share/metview/etc/Makefile
+		share/metview/etc/ifsdata/Makefile
+		share/metview/icons/Makefile
+		rpms/Makefile
+		rpms/Metview.spec
+		test/Makefile
+		test/macros/Makefile
+		])
+AC_OUTPUT
+
+
+# items that have been removed from AC_CONFIG_FILES, but still have
+# valid Makefile.am files and could be reintroduced:
+#		src/Curve/Makefile
+#		src/ForwardApp/Makefile
+#		src/MetviewUI_qt/Makefile
+#		src/ObsExam/Makefile
+# 		src/PM_Tephigram/Makefile
+#		src/Relhum/Makefile
+#		src/Spectra/Makefile
+#		src/TimeSeries/Makefile
+#		src/TropCycTrack/Makefile
+#		src/ObsExam/Makefile
+
+
+
+
+# add all the flags that will be written into the config files to the standard
+# XFLAGS variables so that configure-generated Makefiles can also use them
+
+
+
+PWD=`echo ${PWD}`
+
+config_file="config/CONFIG.site"
+rm -f $config_file
+echo "#" > $config_file
+echo "# THIS FILE IS GENERATED BY configure `date`" >> $config_file
+echo "#" >> $config_file
+echo "WMO_SITE_NR=${SITE_WMO_CODE}"  >> $config_file
+if test "x$SITE_NAME" = 'xecmwf'; then
+  echo "QT_DIR_LIB=/usr/local/apps/qt/4.6.2${QT_EXT}/lib" >> $config_file
+fi
+echo "INSTALLDIR=${prefix}" >> $config_file
+echo "METVIEW_SCRIPT=${prefix}/bin/$STARTUP_SCRIPT" >> $config_file
+echo "MV_MARS_ACCESS=${MARS_ACCESS}" >> $config_file
+echo "METVIEW_DIR_DEV=${PWD}" >> $config_file
+echo "METVIEW_TITLE_PROD=\"Production ${METVIEW_EXTRA_TITLE}\"" >> $config_file
+echo "METVIEW_TITLE_DEV=\"Development autotools ${METVIEW_EXTRA_TITLE}\"" >> $config_file
+echo "MV_ENVIRON=${MV_ENVIRON}" >> $config_file
+echo "OS=${OS}" >> $config_file
+echo "MAJOR_VERSION=${MAJOR_VERSION}" >> $config_file
+echo "SHELL=/bin/sh" >> $config_file
+echo "MAGPLUS_HOME=${MAGPLUS_HOME:-none}" >> $config_file
+#echo "MAGPLUS_SRC_HOME=${MAGPLUS_SRC}" >> $config_file
+echo "GRIBAPI_DIR=${grib_location}" >> $config_file
+echo "MV_PYTHON_COMMAND=${MV_PYTHON_COMMAND}" >> $config_file
+
+if test "x$odbold" = 'xyes' ; then
+  echo "MV_ODB1_VERSION=${ODB1_VERSION}"       >> $config_file
+  echo "MV_ODB1_BIN=${ODB1_BIN}"               >> $config_file
+  echo "MV_ODB1_USE_SCRIPT=${ODB1_USE_SCRIPT}" >> $config_file
+fi
+
+if test "x$flextra" = 'xyes' ; then
+  echo "MV_FLEXTRA_EXE=\${MV_FLEXTRA_EXE:=${MV_FLEXTRA_EXE}}" >> $config_file
+fi
+
+if test "x$scm" = 'xyes' ; then
+  echo "MV_SCM_EXE=\${MV_SCM_EXE:=${MV_SCM_EXE}}" >> $config_file
+fi
+
+# If we are building this outside ECMWF, then we want different proxy settings
+# (used currently by the OGC clients). We achieve this by simply changing the
+# default setting in the ConfigDef file. We can do this with a  a search/replace
+# operation. This relies very much on the proxy setting having a uniqe 'signature'
+# so that the search/replace can operate on a single line.
+
+if test "x$SITE_NAME" != 'xecmwf'; then
+    configdef=share/metview/etc/ConfigDef
+    configtmp=${configdef}.tmp
+    echo "Not at ECMWF: resetting the default proxy setting in ${configdef}."
+    chmod u+w $configdef
+    sed "s/	} = yes/	} = no/g"  $configdef > $configtmp
+    mv $configtmp $configdef
+fi
+
+
+
+\mkdir -p bin lib
+touch share/metview/icons/make.dep
+
+echo ""
+echo " Metview is configured as follows for host type: $host"
+echo ""
+echo "Option            Configure option = Configured value"
+echo "------------------------------------------------------"
+echo ""
+echo "Graphical UI      --enable-ui=$ui"
+echo "Magics++          --enable-magics=$magics"
+if test "x$magics" = xyes ; then
+ if test "x$magics_cairo" = xno ; then
+  echo "MISSING:          NO PNG and PDF support (disabled in Magics)"
+ fi
+ if test "x$magics_gd" = xno ; then
+  echo "MISSING:          NO GIF support (disabled in Magics)"
+ fi
+ if test "x$magics_bufr" = xno ; then
+  echo "MISSING:          NO BUFR plotting support (disabled in Magics)"
+ fi
+ echo ""
+ echo "  \$MAGPLUS_HOME is defined as: $MAGPLUS_HOME"
+ echo ""
+fi
+echo "MARS              --enable-mars-access=$mars"
+echo "MARS-WEB          --enable-mars-api=$mars_api"
+echo "ODB               --enable-odb=$odb"
+echo "MARS ODB          --enable-mars-odb=${marsodb}"
+echo "OBSTAT            --enable-obstat=$obstat"
+echo "User Interface    --enable-ui=$ui"
+echo "INPE              --enable-inpe=$inpe"
+echo ""
+echo ""
+if test "x$odbnew" = 'xyes' -a "x$odbplot" = 'xno' ; then
+  echo "WARNING:"
+  echo "  ODB plotting is disabled, because Magics was built without ODB support!"
+  echo "  Please rebuild Magics with ODB support to enable ODB plotting!"
+  echo ""
+  echo ""
+fi
+
+
+echo "Options used to compile and install:"
+echo ""
+echo " CXX     = $CXX $CXXFLAGS"
+echo " CC      = $CC $CFLAGS"
+echo " F77     = $F77 ${FFLAGS}"
+echo " FC      = $FC ${FFLAGS}"
+echo ""
+echo " Metview will be installed in   ${prefix}"
+echo ""
diff --git a/metview.desktop b/metview.desktop
new file mode 100644
index 0000000..bc3b407
--- /dev/null
+++ b/metview.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+X-SuSE-translate=true
+Name=Metview
+GenericName=Meteorological workstation
+X-GNOME-FullName=ECMWF Metview - meteorological workstation
+Comment=Process and visualise meteorological data
+Type=Application
+Categories=Education;Science;DataVisualization;Geoscience;Qt;
+#MimeType=image/svg+xml;image/svg+xml-compressed;
+Exec=metview
+TryExec=metview
+Terminal=false
+StartupNotify=true
+Icon=metview
diff --git a/rpms/Makefile.am b/rpms/Makefile.am
new file mode 100644
index 0000000..fe317bf
--- /dev/null
+++ b/rpms/Makefile.am
@@ -0,0 +1,26 @@
+rpmspec=Metview.spec
+
+rpmmacros =\
+	--define="_rpmdir $${PWD}"\
+	--define="_srcrpmdir $${PWD}"\
+	--define="_sourcedir $${PWD}/.."\
+	--define="_specdir $${PWD}"\
+	--define="_builddir $${PWD}"
+
+RPMBUILD = rpmbuild
+RPMFLAGS = --nodeps --buildroot="$${PWD}/_rpm"
+
+rpmcheck:
+	if [ which $(RPMBUILD) &> /dev/null ]; then \
+	  echo "target requires Linux ..."; \
+	  (exit 1); exit 1; \
+	fi
+
+srcrpm: rpmcheck $(rpmspec)
+	$(RPMBUILD) $(RPMFLAGS) -bs $(rpmmacros) $(rpmspec)
+
+
+rpms: rpmcheck $(rpmspec)
+	$(RPMBUILD) $(RPMFLAGS) -ba $(rpmmacros) $(rpmspec)
+
+.PHONY: rpmcheck srcrpm rpms
diff --git a/rpms/Makefile.in b/rpms/Makefile.in
new file mode 100644
index 0000000..b392ad4
--- /dev/null
+++ b/rpms/Makefile.in
@@ -0,0 +1,472 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = rpms
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/Metview.spec.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES = Metview.spec
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+rpmspec = Metview.spec
+rpmmacros = \
+	--define="_rpmdir $${PWD}"\
+	--define="_srcrpmdir $${PWD}"\
+	--define="_sourcedir $${PWD}/.."\
+	--define="_specdir $${PWD}"\
+	--define="_builddir $${PWD}"
+
+RPMBUILD = rpmbuild
+RPMFLAGS = --nodeps --buildroot="$${PWD}/_rpm"
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rpms/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu rpms/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+Metview.spec: $(top_builddir)/config.status $(srcdir)/Metview.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+rpmcheck:
+	if [ which $(RPMBUILD) &> /dev/null ]; then \
+	  echo "target requires Linux ..."; \
+	  (exit 1); exit 1; \
+	fi
+
+srcrpm: rpmcheck $(rpmspec)
+	$(RPMBUILD) $(RPMFLAGS) -bs $(rpmmacros) $(rpmspec)
+
+rpms: rpmcheck $(rpmspec)
+	$(RPMBUILD) $(RPMFLAGS) -ba $(rpmmacros) $(rpmspec)
+
+.PHONY: rpmcheck srcrpm rpms
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/rpms/Metview.spec.in b/rpms/Metview.spec.in
new file mode 100644
index 0000000..5751c1f
--- /dev/null
+++ b/rpms/Metview.spec.in
@@ -0,0 +1,100 @@
+Name: @METVIEW_PACKAGE_NAME@
+Version: @METVIEW_PACKAGE_VERSION@
+Release: 1.0
+Summary: Desktop and batch system to visualize meteorological data
+URL: http://www.ecmwf.int/products/data/software/metview.html
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Source0: %{name}-%{version}.tar.gz
+License: ECMWF
+# Copyright 2011 ECMWF
+Group: Productivity/Scientific/Other
+
+AutoReqProv: no
+
+Requires: emos
+Requires: grib_api >= @METVIEW_GRIBAPI_MIN_VERSION@
+Requires: grib_api-devel >= @METVIEW_GRIBAPI_MIN_VERSION@
+Requires: cairo
+Requires: netcdf
+Requires: libqt4
+Requires: libQtWebKit4
+Requires: Magics >= @METVIEW_MAGICS_MIN_VERSION@
+Requires: Magics-metview-devel >= @METVIEW_MAGICS_MIN_VERSION@
+
+##################################################
+
+#!BuildIgnore: post-build-checks
+
+BuildRequires: gcc-c++
+BuildRequires: swig
+BuildRequires: cairo-devel
+BuildRequires: pango-devel
+BuildRequires: perl-XML-Parser
+BuildRequires: emos
+BuildRequires: Magics-metview-devel
+
+%if 0%{?fedora} || 0%{?centos_version}
+
+BuildRequires: pkgconfig
+BuildRequires: expat
+
+%if 0%{?fedora} 
+BuildRequires: expat-devel
+BuildRequires: netcdf-devel
+%endif
+
+%else
+BuildRequires: libjasper-devel libexpat-devel gd-devel libnetcdf-devel 
+%endif
+
+
+################################################
+
+%description
+Runtime files for Metview - The library and tools to visualize meteorological data and statistics
+
+Authors:
+--------
+  (ECMWF Meteorological Visualisation Section)
+  Sylvie Lamy-Thepaut
+  Stephan Siemen
+  Fernando Ii
+  Iain Russell
+  Sandor Kertesz
+  Vesa Karhila 
+
+##############################################
+
+%prep
+%setup -q
+%build
+
+./configure --disable-debug --prefix=/usr --with-grib-api=/usr --with-magics-home=/usr CXXFLAGS="-mtune=generic" CFLAGS="-mtune=generic" --libdir=%_libdir
+
+make
+%install
+# install all files into the BuildRoot
+make DESTDIR=$RPM_BUILD_ROOT install
+
+%clean
+# clean up the hard disc after build
+rm -rf $RPM_BUILD_ROOT
+
+
+#%post -p /sbin/ldconfig 
+#%postun -p /sbin/ldconfig 
+
+###############################################
+
+%files
+%defattr(-,root,root)
+/usr/bin/metview
+/usr/bin/Metview
+/usr/share/metview
+/%_libdir
+/usr/include
+/usr/share/applications/metview.desktop
+
+################################################
+
+%changelog
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
new file mode 100644
index 0000000..6c579c8
--- /dev/null
+++ b/scripts/Makefile.am
@@ -0,0 +1,114 @@
+
+CP = cp -p
+
+
+scripts = ../bin/compile ../bin/dump ../bin/metview-mail ../bin/mvrun ../bin/mvrun_c ../bin/mvrun_lnx \
+	../bin/logrun ../bin/metview_stat ../bin/metview_create_user_dir \
+	../bin/metview_patches \
+	../bin/mvusage ../bin/metview_help ../bin/set_mars_env ../bin/traj_log \
+	../bin/document_macros.pl ../bin/mv_grib_dump \
+	../bin/metview_local.${MV_ENVIRON} ../bin/metview_local2.${MV_ENVIRON} \
+	../bin/MarsTiggeWrapper ../bin/metgramclient.pl \
+	../bin/ObstatToolWrapper ../bin/ObstatScatter.magml  \
+	../bin/MarsOdbWrapper ../bin/MarsScinWrapper \
+	../bin/generate_video \
+	../bin/mv_odbsql ../bin/mv_odbsql2 ../bin/mv_obstat \
+	../bin/mv_mars_catalog.py \
+	../bin/mv_flextra_prep.mv ../bin/mv_flextra_prep ../bin/mv_flextra_run \
+	../bin/mv_scm_run ../bin/mv_scm_vis.mv
+
+#../bin/ObstatCurveKind1.magml
+
+macro_list = ../share/metview/etc/macro_built_in_functions.txt
+dict = dict.txt
+icon_function_help = ../share/metview/etc/macro_icon_function_help.xml
+
+bin_SCRIPTS = ${scripts} $(macro_list) $(dict) $(icon_function_help)
+
+mvstartdir = $(MVSTARTDIR)
+mvstart_SCRIPTS = ../$(STARTUP_SCRIPT)
+
+
+all: $(scripts) $(mvstart_SCRIPTS)
+
+$(scripts): ../bin/%: %
+	$(CP) $< $@
+	chmod a+rx $@
+	chmod +w $@
+
+
+compile: compile.src ../config/CONFIG.site
+	echo "#!/bin/ksh"                       >  compile
+	echo "# --- head created by Make ---"   >> compile
+	echo "set -e"                           >> compile
+	echo "CC=$(CC)"                         >> compile
+	echo "CC_FLAGS=\"$(CC_FLAGS) $(CFLAGS)\""   >> compile
+	echo "CXX=$(CXX)"                       >> compile
+	echo "CXX_FLAGS=\"$(CXXFLAGS)\""        >> compile
+	echo "F77=$(F77)"                       >> compile
+	echo "F77_FLAGS=\"$(FFLAGS)\""          >> compile
+	echo "F90=$(FC)"                        >> compile
+	echo "F90_FLAGS=\"$(FFLAGS)\""          >> compile
+	echo "FC_LIBS=\"$(FLIBS)\""             >> compile
+	echo "LIBNAME=\"$(LIBNAME)\""           >> compile
+	echo "GRIBAPI_LIB=\"$(GRIB_API_LIB)\""  >> compile
+	echo "GRIBAPI_INC=\"$(GRIB_API_INC)\""  >> compile
+	echo "MV_EMOSLIB=\"$(MV_EMOSLIB)\""     >> compile
+	echo "LDFLAGS_INLINE=\"$(LDFLAGS_INLINE)\""  >> compile
+	cat compile.src                         >> compile
+
+CLEANFILES = $(scripts) ../$(STARTUP_SCRIPT) $(macro_list) $(dict) $(icon_function_help)
+
+# --------------------------------------------------- scripts to run Metview
+
+if METVIEW_GUI
+METVIEW_GUI_BUILT_FLAG=true
+else
+METVIEW_GUI_BUILT_FLAG=false
+endif
+
+../$(STARTUP_SCRIPT): metview_base ../config/CONFIG.site ../share/metview/app-defaults/MvVersion ../version.sh ../bin
+	-$(RM) $@
+	printf '#!/bin/ksh\n'                              >  $@
+	printf "#\n# DO NOT EDIT! SCRIPT PRODUCED BY make IN DIR ./scripts!\n#\n" >> $@
+	printf 'set -ea\n'                                 >> $@
+	cat  ../config/CONFIG.site                         >> $@
+#	grep VIS5D_DIR  $(MV_XTRA_SW)                      >> $@
+	printf "METVIEW_RELEASE=`cat ../share/metview/app-defaults/MvVersion`\n" >> $@
+#	METVIEW_VERSION_TITLE="Metview `cat ../share/metview/app-defaults/MvVersion` (`date -u '+%Y-%m-%d'`)"
+#	printf "METVIEW_VERSION_TITLE=$(METVIEW_VERSION_TITLE)\n" >> $@
+	printf "METVIEW_VERSION_TITLE=\"Metview `cat ../share/metview/app-defaults/MvVersion` $(METVIEW_EXTRA_TITLE) (`date -u '+%Y-%m-%d'`)\"\n" >> $@
+	printf 'LD_LIBRARY_PATH=\"$${QT_DIR_LIB}:${MAGPLUS_LIBDIR}:${ODB_LIBDIR}:$${LD_LIBRARY_PATH}\"\n'     >> $@
+	printf "METVIEW_GUI_BUILT=${METVIEW_GUI_BUILT_FLAG}\n\n" >> $@
+	cat  metview_base                                     >> $@
+	chmod a+x $@
+	chmod  +w $@
+
+
+# ensure that we regenerate the object list before we run these macros
+regenerate_object_list:
+	rm -f ../share/metview/etc/ObjectListAll
+
+$(macro_list): ../$(STARTUP_SCRIPT)   generate_list_of_macro_functions.mv  ../bin/macro regenerate_object_list ../share/metview/etc/ObjectListAll
+	../$(STARTUP_SCRIPT) -b generate_list_of_macro_functions.mv $(macro_list)
+
+$(dict): ../$(STARTUP_SCRIPT)   generate_dictionary.mv  ../bin/macro ../bin/macro regenerate_object_list ../share/metview/etc/ObjectListAll
+	../$(STARTUP_SCRIPT) -b generate_dictionary.mv $(dict)
+
+$(icon_function_help): $(dict) ../$(STARTUP_SCRIPT)   generate_icon_fun_help.mv ../bin/macro regenerate_object_list ../share/metview/etc/ObjectListAll
+	../$(STARTUP_SCRIPT) -b generate_icon_fun_help.mv $(icon_function_help)
+
+../share/metview/etc/ObjectListAll:
+	(cd ../share/metview/etc ; echo "Building ObjectListAll" ; $(MAKE) ObjectListAll)
+
+
+# just after we install the startup script, we want to replace the version id 'dev' with 'prod'
+# to tell it that it is now the installed version 'prod' and not the dev version.
+install-data-hook:
+	sed "s/METVIEW_VERSION=dev/METVIEW_VERSION=prod/g" ../$(STARTUP_SCRIPT) > $(STARTUP_SCRIPT).temp
+	cp $(STARTUP_SCRIPT).temp $(DESTDIR)/$(prefix)/bin/$(STARTUP_SCRIPT)
+	rm -f $(STARTUP_SCRIPT).temp
+
+
+local_scripts = $(scripts:../bin/%=%)  # e.g. ../bin/dump -> dump
+EXTRA_DIST = $(local_scripts) compile.src metview_local.common metview_local2.common metview_base generate_list_of_macro_functions.mv generate_dictionary.mv generate_icon_fun_help.mv
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
new file mode 100644
index 0000000..83225e6
--- /dev/null
+++ b/scripts/Makefile.in
@@ -0,0 +1,642 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = scripts
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in compile
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mvstartdir)"
+SCRIPTS = $(bin_SCRIPTS) $(mvstart_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+CP = cp -p
+scripts = ../bin/compile ../bin/dump ../bin/metview-mail ../bin/mvrun ../bin/mvrun_c ../bin/mvrun_lnx \
+	../bin/logrun ../bin/metview_stat ../bin/metview_create_user_dir \
+	../bin/metview_patches \
+	../bin/mvusage ../bin/metview_help ../bin/set_mars_env ../bin/traj_log \
+	../bin/document_macros.pl ../bin/mv_grib_dump \
+	../bin/metview_local.${MV_ENVIRON} ../bin/metview_local2.${MV_ENVIRON} \
+	../bin/MarsTiggeWrapper ../bin/metgramclient.pl \
+	../bin/ObstatToolWrapper ../bin/ObstatScatter.magml  \
+	../bin/MarsOdbWrapper ../bin/MarsScinWrapper \
+	../bin/generate_video \
+	../bin/mv_odbsql ../bin/mv_odbsql2 ../bin/mv_obstat \
+	../bin/mv_mars_catalog.py \
+	../bin/mv_flextra_prep.mv ../bin/mv_flextra_prep ../bin/mv_flextra_run \
+	../bin/mv_scm_run ../bin/mv_scm_vis.mv
+
+
+#../bin/ObstatCurveKind1.magml
+macro_list = ../share/metview/etc/macro_built_in_functions.txt
+dict = dict.txt
+icon_function_help = ../share/metview/etc/macro_icon_function_help.xml
+bin_SCRIPTS = ${scripts} $(macro_list) $(dict) $(icon_function_help)
+mvstartdir = $(MVSTARTDIR)
+mvstart_SCRIPTS = ../$(STARTUP_SCRIPT)
+CLEANFILES = $(scripts) ../$(STARTUP_SCRIPT) $(macro_list) $(dict) $(icon_function_help)
+ at METVIEW_GUI_FALSE@METVIEW_GUI_BUILT_FLAG = false
+
+# --------------------------------------------------- scripts to run Metview
+ at METVIEW_GUI_TRUE@METVIEW_GUI_BUILT_FLAG = true
+local_scripts = $(scripts:../bin/%=%)  # e.g. ../bin/dump -> dump
+EXTRA_DIST = $(local_scripts) compile.src metview_local.common metview_local2.common metview_base generate_list_of_macro_functions.mv generate_dictionary.mv generate_icon_fun_help.mv
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-mvstartSCRIPTS: $(mvstart_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(mvstartdir)" || $(MKDIR_P) "$(DESTDIR)$(mvstartdir)"
+	@list='$(mvstart_SCRIPTS)'; test -n "$(mvstartdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(mvstartdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(mvstartdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-mvstartSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(mvstart_SCRIPTS)'; test -n "$(mvstartdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(mvstartdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(mvstartdir)" && rm -f $$files
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mvstartdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-mvstartSCRIPTS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-mvstartSCRIPTS
+
+.MAKE: install-am install-data-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binSCRIPTS install-data install-data-am \
+	install-data-hook install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-mvstartSCRIPTS install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-binSCRIPTS uninstall-mvstartSCRIPTS
+
+
+all: $(scripts) $(mvstart_SCRIPTS)
+
+$(scripts): ../bin/%: %
+	$(CP) $< $@
+	chmod a+rx $@
+	chmod +w $@
+
+compile: compile.src ../config/CONFIG.site
+	echo "#!/bin/ksh"                       >  compile
+	echo "# --- head created by Make ---"   >> compile
+	echo "set -e"                           >> compile
+	echo "CC=$(CC)"                         >> compile
+	echo "CC_FLAGS=\"$(CC_FLAGS) $(CFLAGS)\""   >> compile
+	echo "CXX=$(CXX)"                       >> compile
+	echo "CXX_FLAGS=\"$(CXXFLAGS)\""        >> compile
+	echo "F77=$(F77)"                       >> compile
+	echo "F77_FLAGS=\"$(FFLAGS)\""          >> compile
+	echo "F90=$(FC)"                        >> compile
+	echo "F90_FLAGS=\"$(FFLAGS)\""          >> compile
+	echo "FC_LIBS=\"$(FLIBS)\""             >> compile
+	echo "LIBNAME=\"$(LIBNAME)\""           >> compile
+	echo "GRIBAPI_LIB=\"$(GRIB_API_LIB)\""  >> compile
+	echo "GRIBAPI_INC=\"$(GRIB_API_INC)\""  >> compile
+	echo "MV_EMOSLIB=\"$(MV_EMOSLIB)\""     >> compile
+	echo "LDFLAGS_INLINE=\"$(LDFLAGS_INLINE)\""  >> compile
+	cat compile.src                         >> compile
+
+../$(STARTUP_SCRIPT): metview_base ../config/CONFIG.site ../share/metview/app-defaults/MvVersion ../version.sh ../bin
+	-$(RM) $@
+	printf '#!/bin/ksh\n'                              >  $@
+	printf "#\n# DO NOT EDIT! SCRIPT PRODUCED BY make IN DIR ./scripts!\n#\n" >> $@
+	printf 'set -ea\n'                                 >> $@
+	cat  ../config/CONFIG.site                         >> $@
+#	grep VIS5D_DIR  $(MV_XTRA_SW)                      >> $@
+	printf "METVIEW_RELEASE=`cat ../share/metview/app-defaults/MvVersion`\n" >> $@
+#	METVIEW_VERSION_TITLE="Metview `cat ../share/metview/app-defaults/MvVersion` (`date -u '+%Y-%m-%d'`)"
+#	printf "METVIEW_VERSION_TITLE=$(METVIEW_VERSION_TITLE)\n" >> $@
+	printf "METVIEW_VERSION_TITLE=\"Metview `cat ../share/metview/app-defaults/MvVersion` $(METVIEW_EXTRA_TITLE) (`date -u '+%Y-%m-%d'`)\"\n" >> $@
+	printf 'LD_LIBRARY_PATH=\"$${QT_DIR_LIB}:${MAGPLUS_LIBDIR}:${ODB_LIBDIR}:$${LD_LIBRARY_PATH}\"\n'     >> $@
+	printf "METVIEW_GUI_BUILT=${METVIEW_GUI_BUILT_FLAG}\n\n" >> $@
+	cat  metview_base                                     >> $@
+	chmod a+x $@
+	chmod  +w $@
+
+# ensure that we regenerate the object list before we run these macros
+regenerate_object_list:
+	rm -f ../share/metview/etc/ObjectListAll
+
+$(macro_list): ../$(STARTUP_SCRIPT)   generate_list_of_macro_functions.mv  ../bin/macro regenerate_object_list ../share/metview/etc/ObjectListAll
+	../$(STARTUP_SCRIPT) -b generate_list_of_macro_functions.mv $(macro_list)
+
+$(dict): ../$(STARTUP_SCRIPT)   generate_dictionary.mv  ../bin/macro ../bin/macro regenerate_object_list ../share/metview/etc/ObjectListAll
+	../$(STARTUP_SCRIPT) -b generate_dictionary.mv $(dict)
+
+$(icon_function_help): $(dict) ../$(STARTUP_SCRIPT)   generate_icon_fun_help.mv ../bin/macro regenerate_object_list ../share/metview/etc/ObjectListAll
+	../$(STARTUP_SCRIPT) -b generate_icon_fun_help.mv $(icon_function_help)
+
+../share/metview/etc/ObjectListAll:
+	(cd ../share/metview/etc ; echo "Building ObjectListAll" ; $(MAKE) ObjectListAll)
+
+# just after we install the startup script, we want to replace the version id 'dev' with 'prod'
+# to tell it that it is now the installed version 'prod' and not the dev version.
+install-data-hook:
+	sed "s/METVIEW_VERSION=dev/METVIEW_VERSION=prod/g" ../$(STARTUP_SCRIPT) > $(STARTUP_SCRIPT).temp
+	cp $(STARTUP_SCRIPT).temp $(DESTDIR)/$(prefix)/bin/$(STARTUP_SCRIPT)
+	rm -f $(STARTUP_SCRIPT).temp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/MarsOdbWrapper b/scripts/MarsOdbWrapper
new file mode 100644
index 0000000..dc67a7a
--- /dev/null
+++ b/scripts/MarsOdbWrapper
@@ -0,0 +1,70 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# -----------------------------------------
+# ECMWF extras for setting MARS environment
+# Note this script runs the Mars module
+# unless 'env_only' is specified on the
+# command line.
+# -----------------------------------------
+
+#if [ x$WMO_SITE_NR = x098 ]  # only do this at ECMWF
+#then
+    export MV_MARS_MODE=odb
+
+    export METAPS=/usr/local/lib/metaps/mars_grib_api
+    export MARS_HOME=$METAPS
+
+    #-- for xtra safety --
+    unset FDB_SERVER_HOST || true
+
+    export MARS_AUTH_FILE=$MARS_HOME/etc/mars.authentication
+    export MARS_IBM_RULES=$MARS_HOME/chk/ibm.chk
+
+    export MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsOdbDef
+    export MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsOdbRules
+    ##export MARS_LANGUAGE_FILE=$MARS_HOME/etc/mars.def
+    ##export MARS_TEST_FILE=$MARS_HOME/chk/mars.chk
+
+    #-- for Lagrandian coeffiecient files --
+    export PPDIR=${PPDIR=`$METAPS/bin/ppdir.sh`}
+
+    #-- for MARS statistics --
+    export STAT_PREFIX=metview
+    . $METAPS/bin/marsstat.sh
+
+    #-- MARS home directory for user --
+    . $METAPS/bin/mars_user_home
+
+    #-- how frequent MARS sends warning e-mails --
+    export MARS_MAIL_FREQUENCY=${MARS_MAIL_FREQUENCY:=86400}
+
+    export MARS_DHSBASE_CHECK=$METAPS/chk/dhs.chk
+
+    #-- final solution from Manuel 000615/29 --
+    . $METAPS/bin/mars.environment
+
+    #-- Choose interpolation configuration (040913) --
+    #-- -- moved inside 'mars.environment' (050308) --
+    #-- config_interp=$($METAPS/bin/select_interpolation_mode)
+    #-- CONFIG_INTERP=${CONFIG_INTERP:=$config_interp}
+#else
+#    MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsDef
+#    MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsRules
+#fi
+
+
+if [ x$1 != xenv_only ]
+then
+#    tv8 $METVIEW_BIN/MarsOdb
+	$METVIEW_BIN/Mars
+fi
diff --git a/scripts/MarsScinWrapper b/scripts/MarsScinWrapper
new file mode 100644
index 0000000..e959e96
--- /dev/null
+++ b/scripts/MarsScinWrapper
@@ -0,0 +1,70 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# -----------------------------------------
+# ECMWF extras for setting MARS environment
+# Note this script runs the Mars module
+# unless 'env_only' is specified on the
+# command line.
+# -----------------------------------------
+
+#if [ x$WMO_SITE_NR = x098 ]  # only do this at ECMWF
+#then
+    export MV_MARS_MODE=scin
+
+    export METAPS=/usr/local/lib/metaps/mars_grib_api
+    export MARS_HOME=$METAPS
+
+    #-- for xtra safety --
+    unset FDB_SERVER_HOST || true
+
+    export MARS_AUTH_FILE=$MARS_HOME/etc/mars.authentication
+    export MARS_IBM_RULES=$MARS_HOME/chk/ibm.chk
+
+    export MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsScinDef
+    export MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsScinRules
+    ##export MARS_LANGUAGE_FILE=$MARS_HOME/etc/mars.def
+    ##export MARS_TEST_FILE=$MARS_HOME/chk/mars.chk
+
+    #-- for Lagrandian coeffiecient files --
+    export PPDIR=${PPDIR=`$METAPS/bin/ppdir.sh`}
+
+    #-- for MARS statistics --
+    export STAT_PREFIX=metview
+    . $METAPS/bin/marsstat.sh
+
+    #-- MARS home directory for user --
+    . $METAPS/bin/mars_user_home
+
+    #-- how frequent MARS sends warning e-mails --
+    export MARS_MAIL_FREQUENCY=${MARS_MAIL_FREQUENCY:=86400}
+
+    export MARS_DHSBASE_CHECK=$METAPS/chk/dhs.chk
+
+    #-- final solution from Manuel 000615/29 --
+    . $METAPS/bin/mars.environment
+
+    #-- Choose interpolation configuration (040913) --
+    #-- -- moved inside 'mars.environment' (050308) --
+    #-- config_interp=$($METAPS/bin/select_interpolation_mode)
+    #-- CONFIG_INTERP=${CONFIG_INTERP:=$config_interp}
+#else
+#    MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsDef
+#    MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsRules
+#fi
+
+
+if [ x$1 != xenv_only ]
+then
+#    tv8 $METVIEW_BIN/MarsOdb
+	$METVIEW_BIN/MarsScin
+fi
diff --git a/scripts/MarsTiggeWrapper b/scripts/MarsTiggeWrapper
new file mode 100755
index 0000000..7b064b2
--- /dev/null
+++ b/scripts/MarsTiggeWrapper
@@ -0,0 +1,88 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# -----------------------------------------
+# ECMWF extras for setting MARS environment
+# Note this script runs the Mars module
+# unless 'env_only' is specified on the
+# command line.
+# The first command line argument should be
+# either TIGGE or G2, depending on which 
+# definition/rules files should be used.
+# -----------------------------------------
+
+#if [ x$WMO_SITE_NR = x098 ]  # only do this at ECMWF
+#then
+
+    if [ x$1 = xTIGGE ]
+    then
+        DEF=MarsTiggeDef
+        RULES=MarsTiggeRules
+        export MV_MARS_MODE=TIGGE
+    elif  [ x$1 = xG2 ]
+    then
+        DEF=MarsG2Def
+        RULES=MarsG2Rules
+        export MV_MARS_MODE=G2
+    else
+        echo "$0: First argument should be TIGGE or G2 - it is '$1'"
+        exit 1
+    fi
+
+
+
+    export METAPS=/usr/local/lib/metaps/mars_grib_api
+    export MARS_HOME=$METAPS
+
+    #-- for xtra safety --
+    unset FDB_SERVER_HOST || true
+
+    export MARS_AUTH_FILE=$MARS_HOME/etc/mars.authentication
+    export MARS_IBM_RULES=$MARS_HOME/chk/ibm.chk
+
+    export MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/$DEF
+    export MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/$RULES
+    ##export MARS_LANGUAGE_FILE=$MARS_HOME/etc/mars.def
+    ##export MARS_TEST_FILE=$MARS_HOME/chk/mars.chk
+
+    #-- for Lagrandian coeffiecient files --
+    export PPDIR=${PPDIR=`$METAPS/bin/ppdir.sh`}
+
+    #-- for MARS statistics --
+    export STAT_PREFIX=metview
+    . $METAPS/bin/marsstat.sh
+
+    #-- MARS home directory for user --
+    . $METAPS/bin/mars_user_home
+
+    #-- how frequent MARS sends warning e-mails --
+    export MARS_MAIL_FREQUENCY=${MARS_MAIL_FREQUENCY:=86400}
+
+    export MARS_DHSBASE_CHECK=$METAPS/chk/dhs.chk
+
+    #-- final solution from Manuel 000615/29 --
+    . $METAPS/bin/mars.environment
+
+    #-- Choose interpolation configuration (040913) --
+    #-- -- moved inside 'mars.environment' (050308) --
+    #-- config_interp=$($METAPS/bin/select_interpolation_mode)
+    #-- CONFIG_INTERP=${CONFIG_INTERP:=$config_interp}
+#else
+#    MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsDef
+#    MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsRules
+#fi
+
+
+if [ x$2 != xenv_only ]
+then
+    $METVIEW_BIN/Mars
+fi
diff --git a/scripts/ObstatScatter.magml b/scripts/ObstatScatter.magml
new file mode 100755
index 0000000..1ec466a
--- /dev/null
+++ b/scripts/ObstatScatter.magml
@@ -0,0 +1,90 @@
+<!--**************************** LICENSE START ***********************************
+Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+of the Apache License version 2.0. In applying this license, ECMWF does not
+waive the privileges and immunities granted to it by virtue of its status as
+an Intergovernmental Organization or submit itself to any jurisdiction.
+
+***************************** LICENSE END ************************************-->
+
+<magics version='3'>        
+	<drivers>
+		<png output_name='${path}' output_name_first_page_number='off'/>
+      	</drivers>
+	<page >
+             	<nopageid/>
+		<map display='absolute'  height="18cm" width="18cm" 
+                	margin_top='10%' margin_bottom='10%' margin_left='10%' margin_right='10%' >
+                 
+                 	<cartesian>
+		    		<x_regular x_min="${start_x}" x_max="${end_x}"/>
+		    		<y_regular y_min="${start_y}" y_max="${end_y}"/>
+                 	</cartesian>
+					
+			<plot>
+                    		<netcdf >
+			    		<matrix filename='${dataFile}'
+                         			netcdf_field_variable_name='val'
+                         			netcdf_x_variable_name='x'
+                         			netcdf_y_variable_name='y'/>
+                    		</netcdf>
+                    		<contour contour_level_selection_type   =   "level_list"      
+					contour_level_list        =    "1/2/5/10/20/50/75/100/200/500/1000/5000/7500/10000/50000/100000" 
+					contour_shade   = "on"
+                            		contour_shade_min_level_colour  = "blue_purple"
+        				contour_shade_max_level_colour    ="red"
+        				contour_shade_colour_direction    =    "clockwise"
+        				contour_shade_method       =    "area_fill"
+					contour_shade_technique	   =    "grid_shading"
+        				contour			= "off"
+					contour_hilo	= 'off'
+					contour_grid_shading_position = "middle"
+        				/>    
+			</plot>
+			<plot>
+				<xyinput x_values='${mean_x_lst}' y_values='${mean_y_lst}'/>
+				<symbol type='marker' marker='16' colour='black'/>		
+			
+			</plot>	
+			<horizontal_axis colour='black' style='dash' tick_label_height='0.4'>              
+			        <grid line_style="dot" colour='navy'/>
+				<title text='$x_param' height='0.55' style='bold'/>
+			</horizontal_axis>
+			<vertical_axis colour='black' tick_label_height='0.4'>
+	                	<grid line_style="dot" colour='navy'/>
+				<title text='$y_param' height='0.55'/>
+                	</vertical_axis>  
+		</map>
+			
+		<legend border='off' height='65%' width='10%' bottom='7.5cm' left='12cm'
+			legend_entry_plot_direction='column' 
+			display_type='continuous'
+			text_height='0.5' >               
+		</legend>
+		
+		<text border='off' 
+		      	display = 'absolute'			     
+			bottom = '24.5' 
+			left = '5cm'
+			width = '8cm'
+			height = '1.5cm'
+			font_size='0.55'
+			font_style='bold'				      
+			lines="SCATTER PLOT OF ${x_param} VERSUS ${y_param}/${blockTitle}/PERIOD = ${startDate} -${endDate}/${flag} - ${area}"
+			 />
+          
+		<text border='off' 
+		      display = 'absolute'			     
+		      bottom = '8.5' 
+		      left = '14cm'
+		      width = '8cm'
+		      height = '1.5cm'
+		      font_size='0.55'				      
+		      justification='left'
+		      colour='black'
+		      lines="Total number=${source_num}/Maximum number per bin=${source_num}/ /${x_param}/  min=${x_min} /  max=${x_max}/ /${y_param}/  min=${y_min}/  max=${y_max}"
+			 />		
+		
+        </page>
+   </magics>
+   
+      
diff --git a/scripts/ObstatToolWrapper b/scripts/ObstatToolWrapper
new file mode 100644
index 0000000..d363681
--- /dev/null
+++ b/scripts/ObstatToolWrapper
@@ -0,0 +1,28 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# -----------------------------------------
+# ECMWF extras for setting magmlx environment 
+# for Obstat Scatter tool
+# -----------------------------------------
+
+# set up the environment
+. /usr/local/share/ecmwf/use/sh.newmagics++
+
+
+# run the specified module
+if [ x$1 != x ]
+then
+    	exe=$1
+	shift
+	$METVIEW_BIN/$exe $*
+fi
diff --git a/scripts/compile b/scripts/compile
new file mode 100644
index 0000000..579aa1d
--- /dev/null
+++ b/scripts/compile
@@ -0,0 +1,126 @@
+#!/bin/ksh
+# --- head created by Make ---
+set -e
+CC=gcc
+CC_FLAGS=" -g -O0 -I/include/python2.5  -m64 -fPIC -DECMWF -DLITTLE -DLITTLE_END -DH_INCLUDES_CC -DR64 -DREAL_8 -DREAL_BIGGER_THAN_INTEGER -DI32 -DMAGINT_IS_INT -DREAL_IS_DOUBLE"
+CXX=g++
+CXX_FLAGS="-g -O0  -Wall -W -DMETVIEW_EXPERIMENTAL -DUSE_NEW_IO -m64 -fPIC -fno-gnu-keywords -Wno-deprecated -Wno-write-strings -DMETVIEW_QT -DQT_NO_DEBUG_OUTPUT -DECMWF -DLITTLE -DLITTLE_END -DH_INCLUDES_CC -DR64 -DREAL_8 -DREAL_BIGGER_THAN_INTEGER -DI32 -DMAGINT_IS_INT -DREAL_IS_DOUBLE"
+F77=pgf90
+F77_FLAGS="-g -r8 -tp amd64 -r8"
+F90=pgf90
+F90_FLAGS="-g -r8 -tp amd64 -r8"
+FC_LIBS="-L/usr/local/apps/pgi/pgi-10.8/linux86-64/10.8/libso -Wl,-rpath,/usr/local/apps/pgi/pgi-10.8/linux86-64/10.8/libso -Wl,-rpath,/usr/local/apps/pgi/pgi-10.8/linux86-64/10.8/libso -lpgf90rtl -lpgftnrtl -lrt -lpgf90 -lpgf902 -lpghpf -lpgf90_rpm1 -lpghpf2 -lpgc -lpgftnrtl -lpgc -lrt"
+LIBNAME="lib64"
+GRIBAPI_LIB="-L/usr/local/apps/Metview/AuxSW/grib_api/1.11.0-64/lib64 -lgrib_api -ljasper"
+GRIBAPI_INC="-I/usr/local/apps/Metview/AuxSW/grib_api/1.11.0-64/include64"
+MV_EMOSLIB="-L/usr/local/lib/metaps/lib/000392 -lemos.R64.D64.I32"
+LDFLAGS_INLINE="-L/lib -L/usr/lib64"
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# --------------------------------------- head above created by 'make'
+# --------------------------------------- rest below is scripts/compile.src
+# Script to compile external inline macro functions
+#
+# The upper part is created by Make in order to copy
+# site and platform specific compiler macros from
+# Metview configuration files. The rest of the script
+# - below - should be site and platform independent.
+#
+
+#-- MACRO_EXTRA_LIBS can be set externally to link with custom libs!
+#-- MACRO_EXTRA_F77_FLAGS can be set externally for extra Fortran 77 flags!
+#-- MACRO_EXTRA_F90_FLAGS can be set externally for extra Fortran 90 flags!
+#-- MACRO_EXTRA_CC_FLAGS can be set externally for extra C/C++ flags!
+#-- MACRO_EXTRA_INCS is reserved for C programs, for extra -I flags!
+
+MV_EMOSLIB=${MV_EMOSLIB:="-L/usr/local/lib -lemosR64"}
+
+#-- Warning: here Mars and Emos library names are hardcoded!!
+#-- Note that we end up with a duplicated '-lgrib_api' in $FLIBS, but this is because this needs to
+#-- come after the fortran library (and it also exists within $GRIBAPI_LIB).
+
+FLIB="-L$METVIEW_DIR/${LIBNAME} -lmacro_api_f90 -lMars $MACRO_EXTRA_LIBS $MV_EMOSLIB $GRIBAPI_INC $GRIBAPI_LIB $LDFLAGS_INLINE -lgrib_api_f90 -lgrib_api -lm -lc"
+CLIB="$MACRO_EXTRA_LIBS $GRIBAPI_INC -L$METVIEW_DIR/${LIBNAME} -lMars $MV_EMOSLIB $GRIBAPI_LIB $LDFLAGS_INLINE -lm $FC_LIBS"
+CINC="$MACRO_EXTRA_INCS $GRIBAPI_INC -I$METVIEW_DIR/include"
+MX77="$MACRO_EXTRA_F77_FLAGS"
+MX90="$MACRO_EXTRA_F90_FLAGS"
+MXCC="$MACRO_EXTRA_CC_FLAGS"
+
+cd $METVIEW_TMPDIR
+
+#-- to set trace use macro function 'trace(n)' where n>1
+
+trace=0
+
+if [ "$1" = "-d" ]
+then
+	trace=1
+	set -x
+	shift
+fi
+
+type="$1"
+in="$2"
+out="$3"
+
+#-- uncomment if you need to debug...
+#set -x
+
+case "$type" in
+
+	shell)
+		## Simply copy input to output and make executable
+		ln -f "$in" "$out"
+		chmod +x "$out"
+		;;
+
+	fortran|f77)
+		ln -s -f "$in" compile$$.f
+		$F77 -o "$out" $F77_FLAGS $MX77 compile$$.f $FLIB
+		[ x$MACRO_FORTRAN_DBG != x ] ||  rm -f compile$$.f
+		;;
+
+	fortran90|f90)
+		ln -s -f "$in" compile$$.f90
+		$F90 -o "$out" $F90_FLAGS $MX90 compile$$.f90 $FLIB
+		[ x$MACRO_FORTRAN_DBG != x ] || rm -f compile$$.f90
+		;;
+
+	C|c)
+		ln -s -f "$in" compile$$.c
+		$CC -o "$out" $CC_FLAGS $MXCC $CINC compile$$.c $CLIB
+		[ x$MACRO_FORTRAN_DBG != x ] || rm -f compile$$.c
+		;;
+
+	C++|c++)
+		ln -s -f "$in" compile$$.cc
+		$CXX -o "$out" $CXX_FLAGS $MXCC $CINC compile$$.cc $CLIB
+		[ x$MACRO_FORTRAN_DBG != x ] || rm -f compile$$.c
+		;;
+
+	*)
+		# Consider the string as a command
+		cat <<@ > "$out"
+#!/bin/ksh
+
+
+cat <<\end_of_inline_macro$$ > $METVIEW_TMPDIR/\$\$
+@
+		cat "$in" >> "$out"
+		cat <<@ >> "$out"
+end_of_inline_macro$$
+$type $METVIEW_TMPDIR/\$\$
+e=\$?
+rm -f $METVIEW_TMPDIR/\$\$
+exit \$e
+@
+		;;
+
+esac
diff --git a/scripts/compile.src b/scripts/compile.src
new file mode 100755
index 0000000..5c1567e
--- /dev/null
+++ b/scripts/compile.src
@@ -0,0 +1,109 @@
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# --------------------------------------- head above created by 'make'
+# --------------------------------------- rest below is scripts/compile.src
+# Script to compile external inline macro functions
+#
+# The upper part is created by Make in order to copy
+# site and platform specific compiler macros from
+# Metview configuration files. The rest of the script
+# - below - should be site and platform independent.
+#
+
+#-- MACRO_EXTRA_LIBS can be set externally to link with custom libs!
+#-- MACRO_EXTRA_F77_FLAGS can be set externally for extra Fortran 77 flags!
+#-- MACRO_EXTRA_F90_FLAGS can be set externally for extra Fortran 90 flags!
+#-- MACRO_EXTRA_CC_FLAGS can be set externally for extra C/C++ flags!
+#-- MACRO_EXTRA_INCS is reserved for C programs, for extra -I flags!
+
+MV_EMOSLIB=${MV_EMOSLIB:="-L/usr/local/lib -lemosR64"}
+
+#-- Warning: here Mars and Emos library names are hardcoded!!
+#-- Note that we end up with a duplicated '-lgrib_api' in $FLIBS, but this is because this needs to
+#-- come after the fortran library (and it also exists within $GRIBAPI_LIB).
+
+FLIB="-L$METVIEW_DIR/${LIBNAME} -lmacro_api_f90 -lMars $MACRO_EXTRA_LIBS $MV_EMOSLIB $GRIBAPI_INC $GRIBAPI_LIB $LDFLAGS_INLINE -lgrib_api_f90 -lgrib_api -lm -lc"
+CLIB="$MACRO_EXTRA_LIBS $GRIBAPI_INC -L$METVIEW_DIR/${LIBNAME} -lMars $MV_EMOSLIB $GRIBAPI_LIB $LDFLAGS_INLINE -lm $FC_LIBS"
+CINC="$MACRO_EXTRA_INCS $GRIBAPI_INC -I$METVIEW_DIR/include"
+MX77="$MACRO_EXTRA_F77_FLAGS"
+MX90="$MACRO_EXTRA_F90_FLAGS"
+MXCC="$MACRO_EXTRA_CC_FLAGS"
+
+cd $METVIEW_TMPDIR
+
+#-- to set trace use macro function 'trace(n)' where n>1
+
+trace=0
+
+if [ "$1" = "-d" ]
+then
+	trace=1
+	set -x
+	shift
+fi
+
+type="$1"
+in="$2"
+out="$3"
+
+#-- uncomment if you need to debug...
+#set -x
+
+case "$type" in
+
+	shell)
+		## Simply copy input to output and make executable
+		ln -f "$in" "$out"
+		chmod +x "$out"
+		;;
+
+	fortran|f77)
+		ln -s -f "$in" compile$$.f
+		$F77 -o "$out" $F77_FLAGS $MX77 compile$$.f $FLIB
+		[ x$MACRO_FORTRAN_DBG != x ] ||  rm -f compile$$.f
+		;;
+
+	fortran90|f90)
+		ln -s -f "$in" compile$$.f90
+		$F90 -o "$out" $F90_FLAGS $MX90 compile$$.f90 $FLIB
+		[ x$MACRO_FORTRAN_DBG != x ] || rm -f compile$$.f90
+		;;
+
+	C|c)
+		ln -s -f "$in" compile$$.c
+		$CC -o "$out" $CC_FLAGS $MXCC $CINC compile$$.c $CLIB
+		[ x$MACRO_FORTRAN_DBG != x ] || rm -f compile$$.c
+		;;
+
+	C++|c++)
+		ln -s -f "$in" compile$$.cc
+		$CXX -o "$out" $CXX_FLAGS $MXCC $CINC compile$$.cc $CLIB
+		[ x$MACRO_FORTRAN_DBG != x ] || rm -f compile$$.c
+		;;
+
+	*)
+		# Consider the string as a command
+		cat <<@ > "$out"
+#!/bin/ksh
+
+
+cat <<\end_of_inline_macro$$ > $METVIEW_TMPDIR/\$\$
+@
+		cat "$in" >> "$out"
+		cat <<@ >> "$out"
+end_of_inline_macro$$
+$type $METVIEW_TMPDIR/\$\$
+e=\$?
+rm -f $METVIEW_TMPDIR/\$\$
+exit \$e
+@
+		;;
+
+esac
diff --git a/scripts/document_macros.pl b/scripts/document_macros.pl
new file mode 100755
index 0000000..e9f20e9
--- /dev/null
+++ b/scripts/document_macros.pl
@@ -0,0 +1,524 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# *****************************************************************************
+# Perl script to automatically document all Metview macros for use
+# with the modified NEdit editor.
+#
+# Command-line options:
+#   -debug=?  where ? = 0, 1, 2, or 3
+#      This sets the level of debug information that is output.
+#      (0 - none; 1 - important only; 2 - detailed, 3 - very detailed)
+#
+# Description:
+#   It first examines the environment variable METVIEW_MACRO_PATH.
+#   For each directory specified therein (that exists), each text
+#   file is examined for documentation. It is assumed that a macro
+#   has adopted a standard format for its header comments. This header
+#   section should be at the start of the file and contain a number of
+#   specific fields, formatted in the following style:
+#
+#     # FIELD_NAME    : FIELD_VALUE_LINE_1
+#     #                 FIELD_VALUE_LINE_2
+#     #                 FIELD_VALUE_LINE_N
+#
+#   For example:
+#
+#     # Function      : mvl_regular_layout
+#     #
+#     # Syntax        : list mvl_regular_layout (definition, number, number,
+#     #                                          number, number)
+#
+#   For more examples, see the supplied Metview Macro Library functions.
+#   Note that a multi-line value that starts with a blank line must
+#   have at least one space after the colon which follows the field name.
+#   The search for field names is case-insensitive.
+#
+#   First, the fields required for the macro index file are retrieved.
+#   These are 'Category', 'Function' and 'OneLineDesc'. If one or more of
+#   these fields are missing, then the macro will not appear in the index.
+#
+#   Then, the fields required for the calltips file are retrieved.
+#   These are 'Function', 'Syntax', 'Parameters', 'Description',
+#   'Return Value' and 'Example Usage'. These fields are all optional
+#   except for 'Function' which is necessary.
+#
+#
+# Authorship:
+#   Iain Russell, ECMWF
+#   Started 24th November 2003
+#   Last modified: 29th November 2004
+# *****************************************************************************
+
+
+# ---------------
+# Useful globals
+# ---------------
+
+# $debug             = 1;  # set this to override the command-line option
+
+$max_category_length = 8;
+$num_spaces_for_tab  = 8;  # we substitute tabs with spaces - but how many?
+
+
+
+# -------------------------------------------------------------------------
+# Step 0 - determine the output files to create - and open them for writing
+# -------------------------------------------------------------------------
+
+$strUserDir = $ENV{'METVIEW_USER_DIRECTORY'}  || die ('Could not retrieve environment variable METVIEW_USER_DIRECTORY.');
+$strOutDir  = "$strUserDir/..macro_editor";
+
+# Create strOutDir if it does not exist
+
+if (!-d $strOutDir)
+{
+	mkdir($strOutDir, 0755) || die "Cannot mkdir $strOutDir";
+}
+
+
+
+$macro_index_file    = "$strOutDir/macro_index_unsorted.txt";    # unsorted macro index
+$macro_index_file_s  = "$strOutDir/macro_index.txt";             # sorted macro index
+$macro_calltips_file = "$strOutDir/macro_calltips.txt";          # macro calltips file
+
+open(INDEX_FILE,        ">" . $macro_index_file);     # open for write, overwrite
+open(INDEX_FILE_SORTED, ">" . $macro_index_file_s);   # open for write, overwrite
+open(CALLTIPS_FILE,     ">" . $macro_calltips_file);  # open for write, overwrite
+
+
+
+# -----------------------------------------------------------
+# Step 1 - extract the list of all Metview macro directories.
+#          This is contained in an environment varaible as
+#          colon-separated paths.
+# -----------------------------------------------------------
+
+$strPathList = $ENV{'METVIEW_MACRO_PATH'};
+
+ at PathList = split(/:/, $strPathList);
+
+debug_print ("@PathList\n", 2);
+
+
+
+# --------------------------------------------------------
+# Step 2 - for each directory, document all macros therein
+# --------------------------------------------------------
+
+foreach $dir (@PathList)
+{
+	debug_print ("$dir\n", 2);
+
+	# Does this directory actually exist?
+
+	if (opendir(DIR,"$dir"))
+	{
+		# Yes - examine each file in turn
+
+		while ($file = readdir(DIR) )
+		{
+			if (is_file_a_metview_macro ($dir, $file))
+			{		
+				document_macro ("$dir/$file");
+			}
+		}
+	}
+
+	else
+	{
+		debug_print("Directory $dir is in the macro search list, but does not exist.\n", 1);
+	}
+
+	closedir(DIR);
+}
+
+
+close (INDEX_FILE);
+close (CALLTIPS_FILE);
+
+
+# -----------------------------
+# Step 3 - sort the index file
+# -----------------------------
+
+open  INDEX_FILE,$macro_index_file or die "cant open index file $!\n";
+print INDEX_FILE_SORTED sort (<INDEX_FILE>);   #or if you need: @lines=sort <MYFILE>;
+close INDEX_FILE;
+close INDEX_FILE_SORTED;
+
+
+# remove the temporary unsorted index file
+
+unlink ($macro_index_file);
+
+
+
+
+
+
+
+
+
+# ----------------------------------Subroutines ----------------------------------
+
+
+
+
+
+
+# ******************************************************************
+# Subroutine: is_file_a_metview_macro
+#   Determines whether the given file is a Metview macro file or not
+#   Ok, it's not absolutely accurate, but at least rules out the most
+#   obvious imposters. We'll later look at the contents of the file
+#   to ensure it's a documentable macro.
+# Parameter 1 ($_[0]): the root path
+# Parameter 2 ($_[0]): the filename
+# ******************************************************************
+
+sub is_file_a_metview_macro
+{
+	# Read the input parameters
+
+	local($dir)  = $_[0];
+	local($file) = $_[1];
+	local($path) = "$dir/$file";
+
+
+	# Does the filename begin with a dot?
+	
+	$first_char = substr ($file, 0, 1);
+
+	if ($first_char eq '.')
+	{
+		# Yes - then it's either a directory or a 'dot' file
+
+		return (0);
+	}
+	
+	else
+	{
+		# No - but is it a text file?
+		
+		$file_type = `file $path`;
+		
+		return ($file_type =~ /text/);
+	}
+}
+
+# End of subroutine 'is_file_a_metview_macro'
+
+
+# *****************************************************************
+# Subroutine : document_macro
+# Documents the given macro
+# Parameter 1 ($_[0]) : the path to the macro to document
+# *****************************************************************
+
+sub document_macro
+{
+	# Read the input parameters
+
+	local($file) = $_[0];
+	local($function);
+	local($category);
+	local($one_line);
+	local($pad);
+	local($syntax);
+	local($parameters);
+	local($return_value);
+	local($description);
+	local($example_usage);
+
+	debug_print ("documenting $file\n", 2);
+
+
+	# Read the file and parse, line by line
+	# OK, a Perl magician may be able to come up with a more
+	# concise way of doing this, but this method will work.
+
+	open (FILE, $file) || die "cannot open file $file";
+
+	@Lines = <FILE>;
+
+
+	# Note - we are passing by reference, hence the '\'
+	# before each argument
+
+	# Get the text required for the index file
+
+	$function = get_header_field (\@Lines, \"Function");
+	$category = get_header_field (\@Lines, \"Category");
+	$one_line = get_header_field (\@Lines, \"OneLineDesc");
+
+	if ($function && $category && $one_line)
+	{
+		$category = "-$category-";
+		$pad = sprintf ('%-9s%-21s%s', $category, "$function()", $one_line);
+	
+	    print INDEX_FILE "$pad\n";
+	}
+	
+	else
+	{
+		debug_print ("  File $file did not have enough header information for the index file.\n", 1);
+	}
+
+
+	
+	# Get the text required for the calltips file
+	
+	$syntax        = get_header_field (\@Lines, \"Syntax",        0);
+	$parameters    = get_header_field (\@Lines, \"Parameters",    2);
+	$description   = get_header_field (\@Lines, \"Description",   2);
+	$return_value  = get_header_field (\@Lines, \"Return value",  2);
+	$example_usage = get_header_field (\@Lines, \"Example usage", 2);
+
+	if ($function)
+	{
+		print CALLTIPS_FILE "\n";
+		print_header_field ($function);
+		print_header_field ($syntax);
+		print_header_field ($description,   "Description:");
+		print_header_field ($parameters,    "Parameters:");
+		print_header_field ($return_value,  "Return value:");
+		print_header_field ($example_usage, "Example usage:");
+		print CALLTIPS_FILE "\n";
+	}
+
+
+	close(FILE);
+}
+
+# End of subroutine 'document_macro'
+
+
+
+# ******************************************************************
+# Subroutine : get_header_field
+# Retrieves, as a string, the value for the given field.
+# Parameter 1 ($_[0]): the set of lines comprising the file
+# Parameter 2 ($_[1]): the name of the field (eg 'Syntax')
+# Parameter 3 ($_[2]): the number of spaces to left-pad the result
+# ******************************************************************
+
+sub get_header_field
+{
+	# Read the input parameters and define local variables
+	# Note that we pass the arguments by reference, not value.
+
+	local($lines)       = @_[0];
+	local($field)       = @_[1];
+	local($num_spaces)  = @_[2];
+	local($state)       = "finding first line";
+	local($value)       = "";
+	local($line_value)  = "";
+	local($got_line)    = 0;
+	local($left_padding); # number of extra spaces we need to remove
+	local($spaces)       = sprintf("%-$num_spaces" ."s", "");
+	local($tab_spaces)   = sprintf("%-$num_spaces_for_tab" ."s", "");
+	local($newline)      = ""; # can be "" or "\n"
+	local($valid_length) = 0;  # used then chopping extra lines off the end
+	local($done)         = 0;  # set to 1 when we've finished with this field
+	
+	debug_print ("\n\nSEARCHING for field $$field\n", 3);
+
+	foreach $line (@$lines)
+	{
+		# First, replace any tabs with spaces
+		
+		$line =~ s/\t/$tab_spaces/g;
+		$got_line = 0;
+	
+	
+		# Check what state we're in
+		
+		if ($state eq "finding first line")
+		{
+			# We're looking for the first line of this
+			# field. Use a reglular expression to match
+			# the desired field. Also note the amount of padding
+			# we'll need to make subsequent lines match up.
+
+			if ($line =~ /^(# $$field\s*: )(.*)/i)
+			{
+				$line_value   = $spaces . $2;
+				$left_padding = length($1);
+				$newline      = "";  # do not add a newline
+				$got_line     = 1;
+				$state        = "copying field body";
+			}
+		}
+		elsif ($state eq "copying field body")
+		{
+			# For multi-line fields, we continue looking
+			# until we find the start of a new field.
+
+			if ($line !~ /^# \S.*: .*/)  # is this not the start of a new field?
+			{
+				if ($line =~ /^(# *.*)/)  # is it still a comment?
+				{
+					if ($line =~ /(^#\s*$)|(^#\s*\*+\n$)|(^\s*$)/)  # blank line (ie comment, whitespace)?
+					{
+						# Yes - whitespace. We also need to replace that with a dot.
+
+						$line_value = ".";
+					}
+					else
+					{
+						# A valid line
+
+						$line_value = $spaces . substr($1, $left_padding, length($1) - $left_padding);
+					}
+					
+					
+
+					$newline  = "\n";
+					$got_line = 1;
+					$state    = "copying field body";
+				}
+				
+				else
+				{
+					# This line is not a comment. Therefore assume that we are
+					# past the comment header bock.
+
+					$done = 1;
+				}
+			}
+			else
+			{
+				# Ok, a new field, so we're done.
+
+				$done = 1;
+			}
+		}
+		else
+		{
+			print "get_header_field in impossible state: $state\n";
+		}
+
+
+
+
+		# If the result is just whitespace, then make it into a dot
+
+		if (($got_line) && ($line_value =~ /(^\s*$)/))
+		{
+			$line_value = ".";
+		}
+
+
+		# In case there's nothing more of
+		# interest until the next field, make a
+		# note of the length of the value so far
+		# so we can revert back.
+
+		if (($line_value eq ".") && ($state ne "finding first line"))
+		{
+			if ($valid_length == 0)
+			{
+				$valid_length = length ($value);
+			}
+		}
+		
+		else
+		{
+			$valid_length = 0; # reset this flag as we have a text-containing line
+		}
+
+		$value = $value . $newline . $line_value;
+
+		
+		
+		# Have we reached the end of the field? If so,
+		# remove any trailing newlines (and dots)
+
+		if ($done)
+		{
+			if ($valid_length != 0)
+			{
+				$value = substr($value, 0, $valid_length);
+			}
+
+			$state = "done";
+			debug_print('field found\n', 3);
+			last;
+		}
+	}
+	
+	return ($value);
+}
+
+# End of subroutine 'get_header_field'
+
+
+# ******************************************************************
+# Subroutine : print_header_field
+# Prints the given field if it exists to the calltips file
+# Parameter 1 (@_[0]): field text to print
+# Parameter 2 (@_[1]): optional header to print before the value
+# ******************************************************************
+
+sub print_header_field
+{
+	# Read the input parameters and define local variables
+	# Note that we pass the arguments by reference, not value.
+
+	local($field)  = @_[0];
+	local($header) = @_[1];
+
+
+	# Is the field non-blank?
+
+	if ($field)
+	{
+		# Is the header non-blank?
+
+		if ($header)
+		{
+			print CALLTIPS_FILE ".\n$header\n";
+		}
+
+		print CALLTIPS_FILE "$field\n";
+	}
+}
+
+# End of subroutine 'print_header_field'
+
+
+
+# ******************************************************************
+# Subroutine : debug_print
+# Prints the given string if debug is on
+# Parameter 1 ($_[0]): text to print
+# Parameter 2 ($_[1]): debug level to print it at
+# ******************************************************************
+
+sub debug_print
+{
+	local($text)  = @_[0];
+	local($level) = @_[1];
+
+	# Are we at a high enough debug level to print this text?
+
+	if ($debug >= $level)
+	{
+		print ("$text");
+	}
+}
+
+# End of subroutine 'debug_print'
+
+
+
+
+
diff --git a/scripts/dump b/scripts/dump
new file mode 100755
index 0000000..7798661
--- /dev/null
+++ b/scripts/dump
@@ -0,0 +1,14 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+[ "x$PAGER" = "x" ] && export PAGER=more
+echo "wait..."
+od -cx "$1" | $PAGER
diff --git a/scripts/generate_dictionary.mv b/scripts/generate_dictionary.mv
new file mode 100644
index 0000000..1c63fa6
--- /dev/null
+++ b/scripts/generate_dictionary.mv
@@ -0,0 +1,35 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# Generates a dictionary which describes the available macro functions
+
+
+# get the name of the file to write to
+
+args = arguments()
+strOutFile = args[1]
+
+
+# Open the dictionary file for writing
+
+fileOut = file (strOutFile)
+
+
+loop strFunc in dictionary()
+
+	a = describe (strFunc, "as_value")
+    for i = 1 to count(a) do
+        write(fileOut, a[i], newline)
+    end for
+
+end loop
+
+fileOut = 0 # close the file
diff --git a/scripts/generate_icon_fun_help.mv b/scripts/generate_icon_fun_help.mv
new file mode 100644
index 0000000..9def8e0
--- /dev/null
+++ b/scripts/generate_icon_fun_help.mv
@@ -0,0 +1,190 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# ****************************************************************
+# Metview macro to generate a list of all icon-function parameters
+#
+# Iain Russell
+# Started 9th July 2003 / updated for Metview 4 on 24th June 2010
+# ****************************************************************
+
+
+# Ok, the plan is this:
+# We start reading the list of words generated by the 'describe' function.
+#   Each one that has 'Metview object' as its decription is a candidate for us.
+#     So, for each of these, we call 'values' to get a list of all parameters
+#     for that function.
+#       For each parameter, call 'values' again to see the possible values that
+#       parameter can take.
+#
+# The output file will look something like:
+# 
+#<macro_icon_functions>
+#...
+#<function name='percentile'>
+#  <param name='SOURCE' values = 'OFF' />
+#  <param name='DATA' />
+#  <param name='PERCENTILES' />
+#  <param name='INTERPOLATION' values = 'NEAREST_NEIGHBOUR/LINEAR' />
+#</function>
+#...
+#</macro_icon_functions>
+
+
+# get the name of the file to write to
+
+args = arguments()
+print ('running with args: ', args)
+strParamFile = args[1]
+
+
+# Open the params file for writing
+
+fileOut = file (strParamFile)
+
+
+# Write the xml header, including the stylesheet
+
+strXMLHeader = "<macro_icon_functions>"
+
+write (fileOut, strXMLHeader, newline)
+
+
+
+
+
+# Step 1 - read the input file in one gulp
+# ----------------------------------------
+
+listDescribes = read ('dict.txt')
+
+
+
+# Step 2 - loop through each entry, looking for 'object' functions
+# ----------------------------------------------------------------
+
+strPreviousFunction = ''
+
+loop strDescription in listDescribes
+
+	# bit of 'parse' fiddling to get the function name by itself...
+	
+	listParts = parse(strDescription, ':')
+	
+	strFunction = parse(listParts[1], ' ')[1]
+
+
+	# the dictionary lists multiple entries for some functions,
+	# so take that into account and look for the 'Metview onject' types
+
+	if (not(strFunction = strPreviousFunction) and
+		(listParts[2] = ' Metview object')) then
+
+
+		# ok, start a new xml branch for this icon function
+
+		# print ('Adding ', strFunction)
+
+		write (fileOut, "<function name='" & strFunction & "'>", newline)
+
+
+		# Get the list of valid parameters for this function
+		
+		listParams = values (strFunction)
+		
+
+		# do we have any parameters listed for it?
+
+		if (not (listParams = nil)) then
+
+
+			# Loop through the params, getting the valid values for each
+		
+			loop strParam in listParams
+
+
+				# put the valid values into a list
+
+				listValidValues = values (strFunction, strParam)
+
+
+				# if more than 0 values, start a new SPAN
+				
+				numValidValues = count (listValidValues)
+
+				if not (numValidValues = 0) then
+				
+					write (fileOut, "  <param name='" & strParam & "' values = '")
+							
+				else
+				
+					# otherwise, just put a single entry
+					# for this parameter
+				
+					write (fileOut, "  <param name='" & strParam)
+
+				end if
+
+
+				# write the list of valid values for this parameter
+				
+				for i = 1 to numValidValues do
+				
+					strValidValue = listValidValues [i]
+					
+					write (fileOut, strValidValue)	
+
+					if not (i = numValidValues) then
+						write (fileOut, "/")	
+					end if				
+
+				end for
+
+
+				# finish the tag
+
+				write (fileOut, "' />", newline)
+			
+			end loop
+
+
+			write (fileOut, "</function>", newline)
+
+		else
+
+				write (fileOut, "</function>", newline)
+
+		end if
+
+
+		# make a note of which function we've been dealing with
+		# so we don't do it again
+
+		strPreviousFunction = listParts[1]
+
+	end if
+
+end loop
+
+
+# write the end of the xml
+
+strXMLFooter = "</macro_icon_functions>"
+
+write (fileOut, strXMLFooter, newline)
+
+
+
+# Close the output file
+
+fileOut = 0
+
+print ('Done.')
+
diff --git a/scripts/generate_list_of_macro_functions.mv b/scripts/generate_list_of_macro_functions.mv
new file mode 100644
index 0000000..f4262fe
--- /dev/null
+++ b/scripts/generate_list_of_macro_functions.mv
@@ -0,0 +1,42 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# Generates a list of available macro functions and writes them into
+# a text file which will be used by the macro editor for syntax highlighting.
+
+
+# get the name of the file to write to
+
+args = arguments()
+print ('running with args: ', args)
+out_filename = args[1]
+
+
+# get a list of all the available macro functions
+all_functions = dictionary()
+
+# write them into a file
+f = file (out_filename)
+
+for i = 1 to count(all_functions) do
+
+    func = all_functions[i]
+    
+    if (length(func) > 1) then  # avoid specical characters
+        write (f, func, newline)
+    end if
+
+end for
+
+# close the file
+f = 0
+
+
diff --git a/scripts/generate_video b/scripts/generate_video
new file mode 100644
index 0000000..a36db2c
--- /dev/null
+++ b/scripts/generate_video
@@ -0,0 +1,52 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# --------------------------------------------------------------
+# Converting png files generated by Metview into a video format
+# --------------------------------------------------------------
+
+set -x
+
+if [ $# -ne 3 ] 
+then
+	echo $0 ": worng number of arguments are specified!" 
+fi  
+
+if [ x$1 != x ]
+then
+    format=$1
+fi
+
+if [ x$2 != x ]
+then
+    fileBase=$2
+fi
+
+if [ x$3 != x ]
+then
+    outFile=$3
+fi
+
+retVal=0
+
+if [ $format = "gif" ]
+then
+	convert -delay 10 ${fileBase}_*.png $outFile
+	retVal=$0 
+fi
+
+#rm -f ${filePath}${fileBase}
+
+#clear
+rm -f ${fileBase}_*.png
+
+exit retVal
\ No newline at end of file
diff --git a/scripts/logrun b/scripts/logrun
new file mode 100644
index 0000000..babb874
--- /dev/null
+++ b/scripts/logrun
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                (vk May-98, rev 980507)
+#
+# This script is a simplified "log-only" version of ECMWF script 'mvrun',
+# to be used (through 'metview_local.???') if log files are needed.
+#
+# Log files are created on $SCRATCH ($SCRATCH needs to be defined!!!).
+#
+
+set +e
+Module=`basename $1`
+start_date=`date`
+MYLOG="$SCRATCH/$METVIEW_LOG.$Module.log"
+
+if [ $METVIEW_LOG = no_log -o "$METVIEW_LOG" = "-" ]
+then
+  # -- no log file --
+  "$@"
+  SUCCESS_STATUS=$?
+else
+  # -- create log file --
+  echo "[logrun info] process $$ starting `date` with cmd:" > $MYLOG
+  echo "[logrun info] $@"                        >> $MYLOG
+  echo "[logrun info] mode is $METVIEW_MODE\n"   >> $MYLOG
+
+  "$@"                                           >> $MYLOG
+  SUCCESS_STATUS=$?
+
+  echo "\n[logrun info] process $$ ended `date`" >> $MYLOG
+  echo "[logrun info] exit status: $SUCCESS_STATUS" >> $MYLOG
+fi
+
+exit $SUCCESS_STATUS
diff --git a/scripts/metgramclient.pl b/scripts/metgramclient.pl
new file mode 100644
index 0000000..ac85af4
--- /dev/null
+++ b/scripts/metgramclient.pl
@@ -0,0 +1,175 @@
+#!/usr/bin/perl
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+use strict;
+use Data::Dumper;
+use IO::Socket;
+use Getopt::Long;
+
+
+# set default values for options
+
+my $expver    = "0001";
+my $database  = "10_days";
+my $date      = 20080912;
+my $time      = 0000;
+my $latitude  = 0;
+my $longitude = 0;
+my $height    = -999;  # should be something unlikely
+my $path      = "meteogram";
+my $title     = "Meteogram";
+my $format    = "ps";
+my $size      = "a4";
+my $outwidth  = "800";
+ 
+
+# get value of command-line options
+
+my $result = GetOptions ("expver=s"    => \$expver,
+                         "database=s"  => \$database,
+                         "date=i"      => \$date,
+                         "time=i"      => \$time,
+                         "latitude=f"  => \$latitude,
+                         "longitude=f" => \$longitude,
+                         "height=f"    => \$height,
+                         "path=s"      => \$path,
+                         "title=s"     => \$title,
+                         "format=s"    => \$format,
+                         "size=s"      => \$size,
+                         "outwidth=s"  => \$outwidth,
+                         );
+
+
+# create a mapping that Perl will pass to the web server
+
+my %x = (
+	action     => "make_eps",
+	expver     => $expver,
+	database   => $database,
+	date       => $date,
+	time       => $time,
+	latitude   => $latitude,
+	longitude  => $longitude,
+	path       => $path,
+	title      => $title,
+	type       => $format,
+	format     => lc $size,
+	outwidth   => $outwidth,
+);
+
+
+# get a reference to the hash so we can modify it
+
+my $x = \%x;
+
+
+# only add the 'height' element if we've been passed it on the command line
+
+if ($height != -999)
+{
+    $x->{ 'height' } = $height;
+}
+
+
+# make the remote call to the metgram server
+
+$x = remote_call($x);
+
+
+
+
+sub remote_call {
+	my ($args) = @_;
+
+	local $SIG{ALRM} = sub { die "alarm"; };
+
+	alarm(60);
+
+	my $soc = IO::Socket::INET->new(
+			PeerAddr => "epsgrams:8858",
+			Proto    => "tcp",
+			Type     => SOCK_STREAM,
+			);
+
+    die "Could not create socket: $!\n" unless $soc;
+
+	print $soc Dumper($args);
+	shutdown($soc,1);
+
+	my $VAR1;
+	local $/;
+	$/ = "\n";
+
+	my $line;
+	while($line = get_line($soc))
+	{
+		if($line eq "FILE")
+		{
+			my $size = get_line($soc);
+			my $path = get_line($soc);
+            print "$path\n";
+			my $buf;
+			my $buflen = 64*1024;
+			my $read;
+			my $total = 0;
+
+
+			open(OUT,">$path.tmp") or die "$path.tmp: $!";
+			while($size>0)
+			{
+				$buflen = $size if($size < $buflen);
+				$read = sysread($soc,$buf,$buflen);
+				last if($read <= 0);
+				syswrite(OUT,$buf,$read);
+				$size -= $read;
+				$total += $read;
+			}
+			close(OUT) or die "$path.tmp: $!";
+			rename("$path.tmp",$path) unless($size);
+			next;
+		}
+
+		if($line eq "REPLY")
+		{
+			local $/;
+			$VAR1 = <$soc>;
+			eval $VAR1;
+			last;
+		}
+
+		die "[$line]";
+	}
+
+	close($soc);
+
+	alarm(0);
+
+	return $VAR1;
+
+}
+sub get_line {
+	my ($soc) = @_;
+	my $buf;
+	my $text;
+
+	while(sysread($soc,$buf,1) == 1)
+	{
+		last if($buf eq "\n");
+		$text .= $buf;
+	}
+
+	return $text;
+
+
+}
+
+
diff --git a/scripts/metview-mail b/scripts/metview-mail
new file mode 100755
index 0000000..caab730
--- /dev/null
+++ b/scripts/metview-mail
@@ -0,0 +1,180 @@
+#!/bin/sh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#
+#  This script is called from bin/mvmail (to send/encode Metview
+#  mail) and from bin/mvnews (to read/decode Metview mail).
+#
+#  This version tries first 'bzip2' for compressing. If both compress
+#  commands fail, then the mail is sent uncompressed (which can
+#  produce large emails when sending e.g. GRIB data).
+#
+#  Note that if 'bzip2' is used,the backwards compatibility is
+#  broken, i.e. 'bzip2' compressed mails can not be read with
+#  older versions of this script.
+#
+
+set -e
+
+me=`basename $0`
+
+# extraxt the first parameter
+m=$1
+shift
+
+###########################################################
+
+case $m in
+
+	-s)
+	# sending mail - extract next three parameters
+	user=$1    ; shift
+	subject=$1 ; shift
+	text=$1    ; shift
+
+	[ "$subject" = "" ] && subject="none"
+	[ "$user"    = "" ] && user=$LOGNAME
+
+	cd $METVIEW_USER_DIRECTORY
+
+	rm -f /tmp/$$.*
+	MVIMPORT_TAG="@@MAIL-TAG@@ " export MVIMPORT_TAG
+
+	# if more paramaters, extract them (these are icons)
+	for n
+	do
+		$METVIEW_BIN/mvimport "$n" /tmp/$$.0 >/dev/null 2>&1
+		grep "^$MVIMPORT_TAG" /tmp/$$.0 >> /tmp/$$.1
+	done
+
+	if [ -s /tmp/$$.1 ]   # if icons attached then tar them here
+	then
+
+		sed "s,$MVIMPORT_TAG,./," < /tmp/$$.1 | sort -u > /tmp/$$.0
+
+		rm -f /tmp/$$.1
+		x=c
+
+##		while m=`line || true`
+		while read m
+		do
+			[ "$m" = "" ] && break
+
+			# build icon file and dot file names
+			d=`dirname "$m"`
+			b=`basename "$m"`
+			a=`echo "./$d/$b"  | sed "s,//,/,g"`
+			b=`echo "./$d/.$b" | sed "s,//,/,g"`
+
+			# add icon file and dot file into a tar file
+			# first round create (x=c), then add/replace (x=r)
+			tar ${x}f /tmp/$$.1 "$a" "$b"
+			x=r
+		done < /tmp/$$.0
+
+		# try to compress the created tar file
+		bzip2 /tmp/$$.1 || true   # try 'bzip2'
+		if [ -f /tmp/$$.1.bz2 ]
+		then
+			message=/tmp/$$.1.bz2
+			printf "info: mail compressed successfully"
+		else
+#			gzip /tmp/$$.1 || true   # 'bzip2' failed => try 'gzip'
+#			if [ -f /tmp/$$.1.gz ]
+#			then
+#			    message=/tmp/$$.1.gz # name ends .gz => 'gzip' succeeded
+#			    printf "warning: 'bzip2' failed, using 'gzip' instead"
+#			else
+			    message=/tmp/$$.1     # compression failed, file should be intact
+			    printf "warning: unable to compress, mail is sent uncompressed"
+#			fi
+		fi
+	else
+		message=""                        # no icons to be attached to the mail
+	fi
+
+	if [ x$OS = xaix -o x$OS = xlinux ]
+	then
+	  SUBJ="-s `echo MvMail:$subject | sed 's/ /-/g'`"
+	else
+	  SUBJ=''
+	fi
+
+###########################################################
+# build the mail message and send it
+(
+cat <<@
+Subject: $subject
+@
+cat $text $debug
+echo
+if [ "$message" != "" ]
+then
+
+cat <<@
+
+--METVIEW-ICONS
+
+Use menubar ('Tools' -> 'Icon Inbox ...') to extract the
+attached icons.
+
+For ECMWF users:
+  In order to make this email visible in Metview you
+  need to copy it into your local Mail folder called
+  'MvNewsMail'. For more instructions see the
+  article called "Reading Metview Mail" in the Inbox.
+
+  If you encounter problems setting up your Metview Mail 
+  please conatct the Graphics Section.
+
+
+@
+# for mailing, encode binary tar file to ascii text file
+uuencode $message `basename $message` ; rm -f $message
+cat <<@
+--METVIEW-ICONS--
+@
+
+fi
+) | mail $SUBJ $user
+;;
+
+###########################################################
+	-x)
+	# Check for the MAIL box
+	MAIL=${MAIL:=/var/spool/mail/$LOGNAME}
+	if [ ! -f $MAIL ]
+	then
+	   echo "$me: Cannot access mail box $MAIL" 1>&2
+	   exit 1
+	fi
+
+	n=`grep begin $1 | cut -f3 -d' '`
+	uudecode $1              # decode back to binary tar file
+
+	# what type of compression was used? (if any)
+	mZ=`basename $n .Z`      # check for 'compress'ed file
+	mbz2=`basename $n .bz2`  # check for 'bzip2'ed file
+	if [ $mZ = $mbz2 ]
+	then
+	   cat=cat               # assume non-compressed tar file
+	elif [ `basename $n` != `basename $n .Z` ]
+	then
+	   cat=zcat              # it is 'compressed' tar file
+	else
+	   cat=bzcat             # assume 'bzip2'ed tar file
+	fi
+
+	$cat < $n |  tar xf -    # uncompress + untar
+	rm -f $n
+esac
+
+rm -f /tmp/$$.*
diff --git a/scripts/metview_base b/scripts/metview_base
new file mode 100755
index 0000000..79b554d
--- /dev/null
+++ b/scripts/metview_base
@@ -0,0 +1,847 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#----------------- start of file ./scripts/metview_base
+#
+# Metview scripts are build automatically by 'make'.
+#
+# NOTE: two external files for customising, they are executed
+#       only if they exist ($MV_ENVIRON from config/CONFIG.site):
+#   - 'metview_local.$MV_ENVIRON' (for pre-stuff i.e. to set site dep values)
+#   - 'metview_patches'
+#   - 'metview_stat' collects usage statistics (for ECMWF)
+#   - 'metview_local2.$MV_ENVIRON' (after flags process, e.g. batch/interactive)
+#-----------------------------------------------------------
+
+# abort if using unset env.vars
+# no, because this one causes problems with ksh users (.kshrc)
+#set -o nounset
+
+# ===========================================================
+#                      f u n c t i o n s
+# ===========================================================
+
+checkvar() {
+	n=$1
+	n=`eval echo \\$$n`
+	if [ "$n" = "" ]
+	then
+		echo $me: Variable $1 is not defined. Cannot continue 1>&2
+		exit 1
+	fi
+	#-- if supposed to be a directory then check if exists
+	if [ X$2 = Xdir ]
+	then
+		[ -d $n ] || echo $me: Warning! $1 points to non-existing $n 1>&2
+	fi
+}
+
+# -------------------------------------------------------------
+# File to pass info from script to MetviewUI message window
+
+info(){
+	if [ "$METVIEW_MSG_FILE" = "" ]
+	then
+		METVIEW_MSG_FILE=$METVIEW_TMPDIR/infos
+		rm -f $METVIEW_MSG_FILE > /dev/null 2>&1
+	fi
+	echo "$@"      >> $METVIEW_MSG_FILE
+	echo "$me: $@" 1>&2
+}
+
+# -------------------------------------------------------------
+
+cleanup(){
+	status=$?
+	trap "" EXIT ERR
+
+	if [ "$status" = "0" ]
+	then
+		echo "`basename $0`: $1 (OK) (line $2), exit status $status, starting 'cleanup'"
+	else
+		echo "`basename $0`: $1 on ERROR (line $2), exit status $status, starting 'cleanup'"
+	fi
+
+	# Look for old metview cache directories
+	if [ $METVIEW_MODE = interactive -a x$MV_SILENT = xNO -a "x$MV_HELP_FLAG" != x2 ]
+	then
+
+		if [ $METVIEW_GUI_BUILT = true ]
+		then
+			# restore stdout/stderr, but these will not have been set
+			# up if we have a batch only mode
+			exec 1>&5
+			exec 2>&6
+		fi
+
+		# Get names of possible old metview tmpdirs for warnings
+		# Note: $oldtmp will include also the current cache dir :-(
+		if [ X`echo $METVIEW_TMPDIR | grep "jtmp\."` != X ]
+		then
+			#-- ECMWF workstation: cache under a dynamic parent dir --
+			oldtmp=`ls -d $METVIEW_TMPDIR/../../jtmp.*/mv.*.$LOGNAME 2> /dev/null` || true
+		else
+			#-- cache should be under a static parent dir --
+			oldtmp=`ls -d $METVIEW_TMPDIR/../mv.*.$LOGNAME 2> /dev/null` || true
+		fi
+
+		# print the list of old directories
+		# if only one dir then that must be the current one => no printing!
+		current_tmp_bname=`basename "$METVIEW_TMPDIR"`
+		if [ `echo $oldtmp | wc -w` -gt 1 ]
+		then
+		info "Found several metview cache directories:"
+		info " "
+		for n in $oldtmp
+		do
+			nb="`basename $n`"
+			if [ $nb != $current_tmp_bname ]
+			then
+				info "`cd $n ; ls -ld $PWD`"
+			fi
+		done
+			info " "
+			info "Old ones can be removed with 'rm -rf <dir>'"
+#            for n in $oldtmp
+#            do
+#                nb="`basename $n`"
+#                if [ $nb != $current_tmp_bname ]
+#                then
+#                    info "rm -rf `cd $n ; ls -ld $PWD`"
+#                fi
+#            done
+#            info " "
+#            info "DO NOT remove the current cache dir: $METVIEW_TMPDIR"
+			info " "
+		fi
+	fi
+
+
+	rm -fr $METVIEW_TMPDIR || true
+	rm -f $METVIEW_USER_DIRECTORY/System/.$MV_TMPDIR_LINK || true
+	rm -f $METVIEW_USER_DIRECTORY/System/$MV_TMPDIR_LINK || true
+	if [ -d $METVIEW_TMPDIR ]
+	then
+	   echo " >> Metview cache $METVIEW_TMPDIR still exists, retry in 10 secs..."
+	   sleep 10
+	   rm -fr $METVIEW_TMPDIR || true
+	fi
+	if [ -d $METVIEW_TMPDIR ]
+	then
+	   echo " >> Metview cache $METVIEW_TMPDIR still exists, retry in 30 secs..."
+	   sleep 30
+	   rm -fr $METVIEW_TMPDIR || true
+	fi
+
+	exit $status
+}
+
+
+# -------------------------------------------------------------
+# Users have links in their 'metview' user directory to certain
+# system directories. These links are mainly created when the
+# user starts Metview for the first time and are hard-coded to
+# the directory where that version of Metivew was installed. This could
+# become a problem if that directory is removed when a new version
+# is installed. This function updates those links to the appropriate
+# directory of THIS version of Metview.
+
+ensure_system_dir_links_correct(){
+
+    # we just want one link to maintain:
+    # ~/metview/System/.System  ($METVIEW_USER_SYSTEM_LINK)
+    # - and all other system directories will be children of that.
+
+    METVIEW_USER_SYSTEM_LINK=$METVIEW_USER_DIRECTORY/System/.System
+
+
+	if [ ! -h $METVIEW_USER_SYSTEM_LINK ] # link does not exist?
+    then
+        echo "creating new system link: $METVIEW_USER_SYSTEM_LINK -> $METVIEW_LINK_DIR"
+        ln -s "$METVIEW_LINK_DIR" "$METVIEW_USER_SYSTEM_LINK" # then create it
+
+
+        # for each of the following sub-directories, remove the current link and create a new
+        # one which points to the newly-created System link.
+        # The following lines set KSH arrays.
+
+        set -A local_dirs "System Drawers" "System Templates"
+        set -A sys_dirs    Drawers          Templates
+
+        for i in 0 1
+        do
+            if [ x$MV_QUIET != "x-quiet" ]
+            then
+                info "Updating link: $METVIEW_USER_DIRECTORY/System/${local_dirs[i]} -> .System/${sys_dirs[i]}"
+            fi
+
+            rm -f "$METVIEW_USER_DIRECTORY/System/${local_dirs[i]}"
+            ln -s ".System/${sys_dirs[i]}" "$METVIEW_USER_DIRECTORY/System/${local_dirs[i]}"
+        done
+
+    else
+        # in this case, the System link does already exist - we'll just make
+        # sure it's up-to-date.
+
+        #if [ x$MV_SILENT = xNO ]
+        #then
+            # this message can be annoying. Ideally, we'd like to only print it if we are changing
+            # the link, but we have no way of knowing what the existing link is already pointing to
+            # (unless we parse the result of 'ls -l' on it).
+            # info "updating system link: $METVIEW_USER_SYSTEM_LINK -> $METVIEW_LINK_DIR"
+        #fi
+
+        rm -f  "$METVIEW_USER_SYSTEM_LINK"
+        ln -s "$METVIEW_LINK_DIR" "$METVIEW_USER_SYSTEM_LINK"
+    fi
+}
+
+
+# -------------------------------------------------------------
+
+checkoption() {
+
+while [ "$1" != "" ]
+do
+	case "$1" in
+
+		-F)
+			METVIEW_FONTS=DemoFonts
+			;;
+
+		-log)
+			METVIEW_LOG=$2
+			if [ "$METVIEW_LOG" = "-" ]
+			then
+			  MV_SLOG=yes
+			  shift
+			elif [ "X$METVIEW_LOG" = "X" -o "`echo $METVIEW_LOG | cut -c1`" = "-" ]
+			then
+			  METVIEW_LOG=default_log
+			else
+			  shift
+			fi
+			MV_QUIET=" "
+			MV_SLOG=no
+			MV_DEBUG_PRINT=1
+			;;
+
+
+		-qlog)
+			MV_QLOG=yes
+			MV_SLOG=yes
+			MV_QUIET=" "
+			METVIEW_CMD=""
+			;;
+
+		-slog)
+			MV_SLOG=yes
+			MV_QUIET=" "
+			METVIEW_CMD=""
+			;;
+
+		-mlog)
+			MV_MLOG=yes
+			MV_QLOG=yes
+			MV_SLOG=yes
+			MV_QUIET=" "
+			METVIEW_CMD=""
+			;;
+
+		-m)
+			MAGPLUS_HOME=$2
+			MAGPLUS_LIBDIR=`${MAGPLUS_HOME}/bin/magics-config --libdir`
+			LD_LIBRARY_PATH="${MAGPLUS_LIBDIR}:${LD_LIBRARY_PATH}"
+			shift
+			;;
+
+		-display)
+			DISPLAY=$2
+			shift
+			;;
+
+		-u)
+			METVIEW_USER_DIRECTORY=$2
+			shift
+			;;
+
+		-v)
+			echo " $METVIEW_VERSION_TITLE @ `hostname`"
+			;;
+
+		-q)
+			MV_SILENT=YES
+			;;
+
+		-b)
+			macro=$2
+			shift 2
+			METVIEW_MODE=batch
+			if [ ! -f "$macro" ]
+			then
+				info "Cannot find file $macro"
+				exit 1
+			fi
+			args=$METVIEW_TMPDIR/macro.args.$$
+			touch $args
+			while [ "$1" != "" ]
+			do
+				echo "$1" >> $args
+				shift
+			done
+			METVIEW_STARTUP="$METVIEW_BIN/macro -script $macro -args $args"
+			[ $METVIEW_LOG = no_log -o "$METVIEW_LOG" = "-" ] && METVIEW_CMD=""
+			break
+			;;
+
+		-e)
+			METVIEW_MODE=examine
+			datatype=$2
+			inputfile=$3
+	
+			if [ "$datatype" = "odb" -o "$datatype" = "ODB"  ]
+			then
+				if [  -a ! -f "$inputfile" -a ! -d "$inputfile" ]
+				then
+					info "Cannot find file/directory $inputfile"
+					exit 1
+				fi
+			elif [ ! -f "$inputfile" ]
+			then
+				info "Cannot find file $inputfile"
+				exit 1
+			fi
+
+			METVIEW_STARTUP="$METVIEW_BIN/MvExamineManager $datatype $inputfile"
+			METVIEW_EXIT=MvExamineManager
+			shift 2
+			;;
+
+		-s)
+			METVIEW_STARTUP=$2
+			METVIEW_MODE=batch
+			shift
+			;;
+
+		-H)
+			MV_HELP_FLAG=1
+			;;
+
+		-h)
+			MV_HELP_FLAG=2
+			;;
+
+		-mfdbg)
+			MACRO_FORTRAN_DBG=$2
+			MACRO_EXTRA_F77_FLAGS=${MACRO_EXTRA_F77_FLAGS:=-g}
+			MACRO_EXTRA_F90_FLAGS=${MACRO_EXTRA_F90_FLAGS:=-g}
+			MACRO_EXTRA_CC_FLAGS=${MACRO_EXTRA_CC_FLAGS:=-g}
+			shift
+			;;
+
+		-edbg)
+			MV_DBG=$2
+			shift
+			;;
+
+		*)
+			echo "$me: option not supported \"$1\"" 1>&2
+			exit 1
+			;;
+
+	esac
+	shift
+done
+}
+
+# =============================================================
+#                    end  f u n c t i o n s
+# =============================================================
+
+# for script debugging, set MV_SCRIPT_DEBUG externally
+[ x$MV_SCRIPT_DEBUG != x ] && set -x
+
+
+# set the version (prod or dev). When running on a local development
+# version, we just set 'dev' here. When installed, this is overwritten
+# in the installed version and set to 'prod'.
+METVIEW_VERSION=dev
+
+
+
+case $METVIEW_VERSION in
+
+ dev)
+	METVIEW_DIR=${METVIEW_DIR_DEV}
+	METVIEW_DIR_SHARE=${METVIEW_DIR_DEV}/share/metview
+	METVIEW_BIN=${METVIEW_BIN:=$METVIEW_DIR/bin}
+	METV_DEV=yes
+	MV_DEBUG_PRINT=${MV_DEBUG_PRINT:=1}
+	;;
+
+ prod)
+	METVIEW_DIR=$INSTALLDIR
+	METVIEW_DIR_SHARE=${METVIEW_DIR}/share/metview
+	METVIEW_BIN=${METVIEW_BIN:=$METVIEW_DIR/bin/Metview}
+	METV_DEV=no
+	;;
+esac
+
+METVIEW_LIB=${METVIEW_LIB:=$METVIEW_DIR/lib}
+
+# =============================================================
+
+me=`basename $0`
+
+# =============================================================
+# Create Metview cache directory as a subdir of:
+# - if user has set METVIEW_TMPDIR then use it
+# - else if script /usr/local/share/metview_env exists then
+#     use it to define cache dynamically (depending on the host)
+# - else if TMPDIR has been set then use it
+# - else use /tmp
+
+TMPDIR=${TMPDIR:=/tmp}
+[ -f /usr/local/share/metview_env ] && . /usr/local/share/metview_env
+TMPDIR=${METVIEW_CACHE_ROOT:=$TMPDIR}
+METVIEW_TMPDIR=${METVIEW_TMPDIR:=$TMPDIR}
+
+# check that METVIEW_TMPDIR actually exists - we can't run without it
+
+if [ ! -d $METVIEW_TMPDIR ]
+then
+    echo ""
+    echo "  Temporary directory '$METVIEW_TMPDIR' does not exist"
+    echo "  Metview needs this in order to run. Check that environment"
+    echo "  variable \$TMPDIR is set to a valid directory and try again."
+    exit 1
+fi
+
+# warning: src/MetviewUI/Path.cc: hardcoded length 17+"$$"
+MV_TMPDIR_LINK=MvTemporaryCache_$$
+
+
+
+METVIEW_TMPDIR=$METVIEW_TMPDIR/mv.$$.$LOGNAME
+mkdir -p $METVIEW_TMPDIR
+# assign also to TMPDIR for historical reasons
+TMPDIR=$METVIEW_TMPDIR
+
+
+# =============================================================
+# cache directory cleaned automatically at end or at error.
+# on new platforms check that these signals are valid:
+
+MV_SIGLIST="HUP INT QUIT TERM  PWR XCPU  XFSZ"
+#           1   2   3    15  19/29 30/24 31/25
+trap 'cleanup "EXIT" $LINENO' EXIT
+# removed because failing logical tests triggered an ERR on AIX
+#trap 'cleanup "ERR trap" $LINENO' ERR
+trap 'cleanup "SIGNAL trap" $LINENO' $MV_SIGLIST
+
+# =============================================================
+METVIEW_USER_DIRECTORY=${METVIEW_USER_DIRECTORY:=$HOME/metview}
+METVIEW_LINK_DIR=${METVIEW_LINK_DIR:=$METVIEW_DIR_SHARE/app-defaults}
+
+# =============================================================
+# Config files and 'can_be_created' variables
+
+TRUE_IF_ECMWF=true
+[ $WMO_SITE_NR != 098 ] && TRUE_IF_ECMWF=false
+
+TRUE_IF_MARS_AVAILABLE=true
+[ "$MV_MARS_ACCESS" = "MARS_none" ] && TRUE_IF_MARS_AVAILABLE=false
+
+# -- redefined for ECMWF later ! --
+MARS_LANGUAGE_FILE=${MARS_LANGUAGE_FILE:=$METVIEW_DIR_SHARE/etc/MarsDef}
+MARS_TEST_FILE=${MARS_TEST_FILE:=$METVIEW_DIR_SHARE/etc/MarsRules}
+
+
+# activate warnings/failure for 2 digit years
+#MARS_Y2K=${MARS_Y2K:=1}
+#MARS_Y2K_FAIL=${MARS_Y2K_FAIL:=1}
+
+# activate Emoslib automatic resolution sh->gp
+MARS_AUTO_RESOL=${MARS_AUTO_RESOL:=1}
+
+# nr of forked copies of a Metview process
+# parameter 'maxforks' for individual services in configs
+MARS_MAXFORKS=${MARS_MAXFORKS:=6}
+
+# =============================================================
+# Misc.
+
+#METVIEW_BUG_MAIL=${METVIEW_BUG_MAIL:=metviewdev}
+
+METVIEW_STARTUP=MetviewUI
+METVIEW_EXIT=MetviewUI
+METVIEW_FONTS=NormalFonts
+
+
+#-- by default, use the system grib_dump --
+METVIEW_GRIB_DUMP=${METVIEW_GRIB_DUMP:=grib_dump}
+
+# =============================================================
+case $METVIEW_VERSION in
+
+ dev)
+   METVIEW_CMD=${METVIEW_CMD:="xterm -iconic -e"}
+   #timeout=${METVIEW_TIMEOUT:=60}
+   timeout=${METVIEW_TIMEOUT:=240}
+   METVIEW_STARTUP=xserv
+   METVIEW_EXIT=xserv
+
+   # METVIEW_CONFIG_FILES=$METVIEW_CONFIG_FILES:ObjectList.forTesting
+   ;;
+
+ prod)
+   timeout=${METVIEW_TIMEOUT:=5}
+   ;;
+esac
+
+# =============================================================
+# execute site dependent stuff from another file (if exists),
+# do not crash on errors!
+
+if [ -f $METVIEW_BIN/metview_local.$MV_ENVIRON ]
+then
+  . $METVIEW_BIN/metview_local.$MV_ENVIRON || true
+fi
+
+# =============================================================
+# Set up extra grib definition paths. It has to be done after metview.local 
+# is called because it might call set_mars_env which unset all GRIB API related
+# env variables! 
+
+METVIEW_EXTRA_GRIB_DEFINITION_PATH=${METVIEW_EXTRA_GRIB_DEFINITION_PATH:=""}
+if [ "x$METVIEW_EXTRA_GRIB_DEFINITION_PATH" != x -a "x$GRIBAPI_DIR" != x ] ; then
+  export GRIB_DEFINITION_PATH="${METVIEW_EXTRA_GRIB_DEFINITION_PATH}:${GRIBAPI_DIR}/share/definitions"
+fi
+
+# =============================================================
+# extra stuff (e.g. local DataAccess objects)
+#
+#if [ -f $METVIEW_BIN/extra.$MV_ENVIRON ]
+#then
+#  . $METVIEW_BIN/extra.$MV_ENVIRON || true
+#fi
+
+# =============================================================
+# Check that some variables have been set
+
+[ "X$MAGPLUS_HOME" != "Xnone" ] &&  checkvar MAGPLUS_HOME dir
+# checkvar other ?...
+
+# =============================================================
+# Set up more variables
+
+METVIEW_STATIONS=${METVIEW_STATIONS:=$METVIEW_DIR_SHARE/etc/stations}
+
+METVIEW_NEWS=${METVIEW_NEWS:=$METVIEW_LINK_DIR/news}
+
+MARS_ACCOUNT_FILE=${MARS_ACCOUNT_FILE:=/usr/local/lib/metaps/etc/account}
+MARS_COMPUTE_FLAG=${MARS_COMPUTE_FLAG:=254}
+
+METVIEW_MODE=interactive
+METVIEW_LOG=no_log
+MV_QLOG=${MV_QLOG=no}
+MV_SLOG=${MV_SLOG=no}
+MV_MLOG=${MV_MLOG=no}
+MV_QUIET=${MV_QUIET:=-quiet}
+MV_SILENT=${MV_SILENT:=NO}
+
+#===============================================================
+# Setup Qt graphics system flag for Qt applications
+
+METVIEW_GRAPHICS_SYSTEM=${METVIEW_GRAPHICS_SYSTEM:="raster"}
+
+if [ "$METVIEW_GRAPHICS_SYSTEM" != "raster" -a "$METVIEW_GRAPHICS_SYSTEM" != "native" ]
+then
+	echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1"
+	echo "WARNING: METVIEW_GRAPHICS_SYSTEM is set to an invalid value: $METVIEW_GRAPHICS_SYSTEM"
+	echo "The possible values are: 'raster' and 'native'. Metview will be started up"
+	echo "with value 'raster'."
+	echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+	METVIEW_GRAPHICS_SYSTEM="raster"
+fi
+
+METVIEW_QT_APPLICATION_FLAGS="-style plastique -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss -graphicssystem $METVIEW_GRAPHICS_SYSTEM"
+
+# =============================================================
+# Add metview bin to path
+PATH=$METVIEW_BIN:$PATH
+
+
+# =============================================================
+# Process options. Don't use getopt because of stupid hp
+
+[ $# -gt 0 ] && checkoption "$@"
+
+
+# =============================================================
+# Quick abort if Metview has been built in batch-only mode
+# but the user has requested an interactive session
+
+if [ $METVIEW_MODE = interactive -a $METVIEW_GUI_BUILT != true ]
+then
+    echo ""
+    echo "This Metview has been built without user interface."
+    echo "Please run with the -b option."
+    echo ""
+    exit 1
+fi
+
+
+
+# =================
+# Make sure METVIEW_USER_DIRECTORY is a full path name
+
+case $METVIEW_USER_DIRECTORY in
+
+	/*)
+		;;
+	*)
+		METVIEW_USER_DIRECTORY=`pwd`/$METVIEW_USER_DIRECTORY
+		;;
+esac
+
+# =============================================================
+# Create Metview user directory if missing
+
+if [ ! -d "$METVIEW_USER_DIRECTORY/System" ]
+then
+	metview_create_user_dir "$METVIEW_USER_DIRECTORY"
+fi
+
+
+if [ $METVIEW_MODE = interactive ]
+then
+	# check whether the 'Metview' directory exists - if it doesn't, then we
+	# won't be able to create the system dir link. It's not completely vital
+	# to have this directory, so we won't abort, but we will issue a warning.
+
+	if [ -d "$METVIEW_USER_DIRECTORY/System" ]
+	then
+		# if used interactively, make sure that the links to system dirs are
+		# correct for this version.
+		ensure_system_dir_links_correct
+	else
+		echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+		echo "WARNING: Directory $METVIEW_USER_DIRECTORY/System does not exist!"
+		echo "Please contact your Metview administrator or your system administrator to re-install it."
+		echo "Metview will run, but some functionality may not be available."
+		echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+	fi
+
+
+
+    # External macro editor setup
+
+    EDITOR=${EDITOR:=vi}
+    METVIEW_EDITOR=${METVIEW_MACRO_EDITOR:=$EDITOR}
+
+    case `basename $METVIEW_EDITOR` in
+
+	    vi|vim|ed)
+	    # curses editors, xterm needed
+	    METVIEW_EDITOR="xterm -e $METVIEW_EDITOR"
+	    ;;
+
+	    neditmv)
+	    # specialised NEdit editor. Check whether a complete path was given.
+	    # We want to replace 'neditmv' with 'nedit -lm Metview_Macro'.
+	    ed_dir=`dirname $METVIEW_EDITOR`
+	    if [ "$ed_dir" = "." ]
+	    then
+		    METVIEW_EDITOR='nedit -lm Metview_Macro'
+	    else
+		    METVIEW_EDITOR=`dirname $METVIEW_EDITOR`/'nedit -lm Metview_Macro'
+	    fi
+	    ;;
+
+	    dtpad|emacs|ie|jot|nedit|xedit|xemacs|gvim|kate|kwrite|gedit)
+	    # X Based editor
+	    ;;
+
+	    *)
+	    info "unknown editor $METVIEW_EDITOR (will be started with xterm)"
+	    METVIEW_EDITOR="xterm -e $METVIEW_EDITOR"
+	    ;;
+    esac
+
+
+
+
+    # set up the file viewers
+
+    METVIEW_PS_VIEWER=${METVIEW_PS_VIEWER:=gv}
+    METVIEW_PDF_VIEWER=${METVIEW_PDF_VIEWER:=xpdf}
+    METVIEW_PNG_VIEWER=${METVIEW_PNG_VIEWER:=xv}
+    METVIEW_JPEG_VIEWER=${METVIEW_JPEG_VIEWER:=xv}
+    METVIEW_GIF_VIEWER=${METVIEW_GIF_VIEWER:=display}
+    METVIEW_TIFF_VIEWER=${METVIEW_TIFF_VIEWER:=display}
+    METVIEW_RASTER_EDITOR=${METVIEW_RASTER_EDITOR:=gimp}
+    METVIEW_KML_VIEWER=${METVIEW_KML_VIEWER:=google-earth}
+
+    #########
+    # URLs
+    METVIEW_URL=${METVIEW_URL:=http://www.ecmwf.int/publications/manuals/metview}
+    WEBMARS_URL=${WEBMARS_URL:=http://www.ecmwf.int/services/archive}
+
+    #########
+    # News tool
+
+    #-- 1st: if $MVNEWSMAIL has been set,
+    #---- 2nd: if $HOME/Mail/MvNewsMail exists,
+    #------ 3rd: if $HOME/MozMail/MvNewsMail exists,
+    #-------- 4th: if $HOME/nsmail/MvNewsMail exists,
+    #---------- 5th: if $MAIL has been set,
+    #------------ 6th: /var/spool/mail/$LOGNAME
+    if [ x$MVNEWSMAIL != x ]
+    then
+       MAIL=$MVNEWSMAIL
+    elif [ -f $HOME/Mail/MvNewsMail ]
+    then
+       MVNEWSMAIL=$HOME/Mail/MvNewsMail
+       MAIL=$MVNEWSMAIL
+    elif [ -f $HOME/MozMail/MvNewsMail ]
+    then
+       MVNEWSMAIL=$HOME/MozMail/MvNewsMail
+       MAIL=$MVNEWSMAIL
+    elif [ -f $HOME/nsmail/MvNewsMail ]
+    then
+       MVNEWSMAIL=$HOME/nsmail/MvNewsMail
+       MAIL=$MVNEWSMAIL
+    else
+       MAIL=${MAIL:=/var/spool/mail/$LOGNAME}
+    fi 
+
+    resY=`xdpyinfo | grep "resolution" | awk '{print $2}' | cut -d "x" -f 2` 
+    METVIEW_SCREEN_RESOLUTION=${METVIEW_SCREEN_RESOLUTION:=$resY}
+fi
+
+
+# ===============================================================
+# Path to external macros
+
+user_extern_path=""
+[ x$METVIEW_MACRO_PATH != x ] && user_extern_path="$METVIEW_MACRO_PATH:"
+user_metview_path="$METVIEW_USER_DIRECTORY/System/Macros/$OS:$METVIEW_USER_DIRECTORY/System/Macros"
+system_path="$METVIEW_LINK_DIR/CommonMacroFuncs/$OS:$METVIEW_LINK_DIR/CommonMacroFuncs"
+METVIEW_MACRO_PATH="${user_extern_path}${user_metview_path}:${system_path}"
+
+# ===============================================================
+# Config
+
+XENVIRONMENT=$METVIEW_TMPDIR/Metview
+MARS_CONFIG=$METVIEW_TMPDIR/config
+
+# ===============================================================
+# Build resource file
+
+sed -e 's:\$METVIEW_DIR_SHARE:'"$METVIEW_DIR_SHARE:" \
+		$METVIEW_DIR_SHARE/app-defaults/Metview    >  $METVIEW_TMPDIR/Metview
+cat $METVIEW_DIR_SHARE/app-defaults/$METVIEW_FONTS >> $METVIEW_TMPDIR/Metview
+
+# ===============================================================
+# Config file
+
+#-- do not use full address 'name-at-ecmwf-dot-int'
+#UserSupportMailAddress=${METVIEW_SUPPORT_MAIL:=metview}
+metview_command=${METVIEW_CMD:=''}
+
+
+
+# XXXXXXXXXXX to deal with!
+rm -f $METVIEW_TMPDIR/config
+[ -f $HOME/.metviewrc ] && cp $HOME/.metviewrc  $METVIEW_TMPDIR/config
+
+
+. $METVIEW_DIR_SHARE/etc/ObjectListAll >> $METVIEW_TMPDIR/config
+
+
+# ===============================================================
+# Run script patches from another file
+
+. $METVIEW_BIN/metview_patches || true
+
+
+# =============================================================
+# execute site dependent post-stuff from another file
+# (if exists), do not crash on errors!
+
+#if [ -f $METVIEW_BIN/metview_local2.$MV_ENVIRON ]
+#then
+#  . $METVIEW_BIN/metview_local2.$MV_ENVIRON || true
+#fi
+
+if [ "x$MV_HELP_FLAG" != x ]
+then
+  $METVIEW_BIN/metview_help
+  if [ "x$MV_HELP_FLAG" = x2 ]
+  then
+    exit 0
+  fi
+fi
+
+# =============================================================
+. $METVIEW_BIN/metview_stat
+# =============================================================
+
+# no core files
+ulimit -c 0
+
+if [ $METVIEW_MODE = batch ]
+then
+#	echo "Batch" > $METVIEW_TMPDIR/123_MV_MODE
+#	chmod 777 $METVIEW_TMPDIR/123_MV_MODE
+	# get '$MACRO_STARTUP' to Event without expansion!
+	MACRO_STARTUP="$metview_command $METVIEW_STARTUP"
+	$metview_command $METVIEW_BIN/event $MV_QUIET -startup "\$MACRO_STARTUP"
+
+else
+#	echo "Interactive" > $METVIEW_TMPDIR/123_MV_MODE
+#	chmod 777 $METVIEW_TMPDIR/123_MV_MODE
+
+	$METVIEW_BIN/checkdisplay
+
+	# Set text for MetviewUI titlebar
+	METVIEW_VERSION_TITLE="$METVIEW_VERSION_TITLE @ `hostname`" || true
+
+	# prevent core files eating users disk quota
+	if [ $METV_DEV = no -a $METVIEW_MODE != examine ]
+	then
+#	  SCRATCH=${SCRATCH:=$METVIEW_TMPDIR/..}
+#	  cd $SCRATCH
+	  cd $METVIEW_TMPDIR/..
+	fi
+
+	# Close tty
+	exec  < /dev/null
+
+	exec 5>&1   # store for later
+	exec 6>&2   # store for later
+
+	if [ X$METVIEW_LOG = Xno_log -a X$MV_SLOG = Xno -a x$MV_DBG = x ]
+	then
+	  exec 1> /dev/null
+	  exec 2> /dev/null
+	fi
+
+	if [ "x$MV_DBG" != x ]
+	then
+		echo " Event startup parameters:"
+		echo "     -startup '$METVIEW_STARTUP' -exit $METVIEW_EXIT"
+		$MV_DBG $METVIEW_BIN/event
+	else
+		$metview_command $METVIEW_BIN/event -startup '$METVIEW_STARTUP' \
+			 -exit $METVIEW_EXIT
+	fi
+fi
diff --git a/scripts/metview_create_user_dir b/scripts/metview_create_user_dir
new file mode 100755
index 0000000..51a5811
--- /dev/null
+++ b/scripts/metview_create_user_dir
@@ -0,0 +1,44 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#
+# Create basic user directories by untar'ing
+# the prepared tar file containing the needed
+# directories and files.
+#
+# Called by the main Metview script.
+#
+# Parameter:
+#       User Metview directory (full path)
+#
+
+TAR_FILE=$METVIEW_DIR/share/metview/app-defaults/User_Dir_Frame.tar.gz
+
+if [ x$1 = x ]
+then
+   USER_DIR=$HOME/metview
+else
+   USER_DIR=$1
+fi
+
+echo " creating Metview user directories in $USER_DIR..."
+mkdir $USER_DIR
+
+if [ -f $TAR_FILE ]
+then
+   cd $USER_DIR
+   gunzip -c $TAR_FILE | tar xf -
+   echo " created !"
+else
+   echo " UNABLE TO CREATE: missing file $TAR_FILE"
+   rmdir $USER_DIR
+   exit 1
+fi
diff --git a/scripts/metview_help b/scripts/metview_help
new file mode 100755
index 0000000..1b2bfc2
--- /dev/null
+++ b/scripts/metview_help
@@ -0,0 +1,199 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#
+
+cat <<HEND
+_________________________________________________________________________
+
+  `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText` @ `hostname`
+_________________________________________________________________________
+
+Environment variables that have an effect on Metview-Magics-MARS-Emoslib-GRIB_API:
+[current value in brackets; empty brackets = internal default value used]
+
+
+  EmosLib
+  --------------------------------------------------------------------------
+  BUFR_TABLES		BUFR tables directory
+			[$BUFR_TABLES]
+  PPDIR			path to Spectral-to-Grid conversion coefficients
+			[$PPDIR]
+  EMOS_CYCLE		change Emoslib version number - use with care!
+			[$EMOS_CYCLE]
+
+  MARS
+  --------------------------------------------------------------------------
+  MARS_LSM_PATH		path to Land-Sea-Mask files
+			[$MARS_LSM_PATH]
+  MARS_REFERENCE_DATE	set a custom reference date for relative dates
+			[$MARS_REFERENCE_DATE]
+  MARS_AUTO_RESOL	Spectral->Grid conversion auto resolution
+			[$MARS_AUTO_RESOL]
+  MARS_MAXFORKS		max nro of forked processes from a parent module
+			[$MARS_MAXFORKS]
+  MARS_PACK_BITS	number of bits to be used in encoding new GRIB messages
+			[$MARS_PACK_BITS]
+  MARS_COMPUTE_FLAG	assign 0 to conserve GRIB 'generating process' octet
+			[$MARS_COMPUTE_FLAG]
+  MARS_DEBUG		triggers all modules to print lots of extra debug info
+			[$MARS_DEBUG]
+
+
+  Grib-Api
+  --------------------------------------------------------------------------
+  METVIEW_GRIB_DUMP	path to the grib_dump utility program
+			[$METVIEW_GRIB_DUMP]
+  
+  METVIEW_EXTRA_GRIB_DEFINITION_PATH   path to additional GRIB definitions to the
+                        ones used internally by Metview. 
+			[$METVIEW_EXTRA_GRIB_DEFINITION_PATH]
+
+  Macro Editing
+  --------------------------------------------------------------------------
+  METVIEW_MACRO_EDITOR	primary Macro external editor candidate
+			[$METVIEW_MACRO_EDITOR]
+  EDITOR		secondary Macro external editor - for fallback only
+			[$EDITOR]
+
+
+  Inline Fortran/C
+  --------------------------------------------------------------------------
+  MACRO_EXTRA_LIBS	to provide extra linking flags for inlined programs
+			[$MACRO_EXTRA_LIBS]
+  MACRO_EXTRA_INCS      to provide extra include flags for inlined C/C++ programs
+			[$MACRO_EXTRA_INCS]
+  MACRO_EXTRA_F77_FLAGS to provide extra compiler flags for inlined F77 programs
+			[$MACRO_EXTRA_F77_FLAGS]
+  MACRO_EXTRA_F90_FLAGS to provide extra compiler flags for inlined F90 programs
+			[$MACRO_EXTRA_F90_FLAGS]
+  MACRO_EXTRA_CC_FLAGS  to provide extra compiler flags for inlined C/C++ programs
+			[$MACRO_EXTRA_CC_FLAGS]
+
+  MACRO_DELETE_TEMPORARIES to force deleting more temporary files than normally;
+			use with care and only when your macro overflows the
+			available cache file system quota; in some cases files
+			that might be needed later will also be deleted!
+			[$MACRO_DELETE_TEMPORARY_FILES]
+
+
+  System
+  --------------------------------------------------------------------------
+  MV_BATCH_NOABORT	set to restore old behaviour not-to-signal-exit-status
+			[$MV_BATCH_NOABORT]
+  METVIEW_TIMEOUT	idle time for unused Metview modules before they exit
+			[$METVIEW_TIMEOUT]
+  METVIEW_LOCALHOST	helps to get Event started in some network config cases
+			[$METVIEW_LOCALHOST]
+  DISPLAY		X11 display that interactive Metview runs in
+			[$DISPLAY]
+
+  METVIEW_GRAPHICS_SYSTEM  set the default graphics backend for Qt-based applications
+ 			in Metview. The possible values are 'raster' and 'native'. 
+			[$METVIEW_GRAPHICS_SYSTEM]
+
+
+  Viewers
+  --------------------------------------------------------------------------
+  MV_BROWSER_NAME	WEB browser to receive editor help button ("?") clicks
+			[$MV_BROWSER_NAME]
+  METVIEW_PS_VIEWER	external application to view PostScript icons
+			[$METVIEW_PS_VIEWER]
+  METVIEW_PDF_VIEWER	external application to view PDF icons
+			[$METVIEW_PDF_VIEWER]
+  METVIEW_PNG_VIEWER	external application to view PNG icons
+			[$METVIEW_PNG_VIEWER]
+  METVIEW_JPEG_VIEWER	external application to view JPEG icons
+			[$METVIEW_JPEG_VIEWER]
+  METVIEW_GIF_VIEWER	external application to view GIF icons
+			[$METVIEW_GIF_VIEWER]
+  METVIEW_KML_VIEWER	external application to view KML icons
+			[$METVIEW_KML_VIEWER]
+  METVIEW_RASTER_EDITOR	external application to edit raster images
+			[$METVIEW_RASTER_EDITOR]
+
+
+  FLEXTRA
+  --------------------------------------------------------------------------
+  MV_FLEXTRA_EXE	path to the executable of the FLEXTRA trajectory model
+			[$MV_FLEXTRA_EXE]
+
+
+  SCM
+  --------------------------------------------------------------------------
+  MV_SCM_EXE	        path to the executable of the Single Column Model
+			[$MV_SCM_EXE]
+
+
+  Other
+  --------------------------------------------------------------------------
+  MV_GENERATING_PROCESS	custom value used when converting an LLMatrix to GRIB
+			[$MV_GENERATING_PROCESS]
+  METVIEW_TMPDIR	current Metview cache directory
+			[$METVIEW_TMPDIR]
+  MVNEWSMAIL		primary mail location for Metview News
+			[$MVNEWSMAIL]
+  MAIL			secondary mail location for Metview News
+			[$MAIL]
+  SCRATCH		interactive run-time working dir, batch job log dir
+			[$SCRATCH]
+
+  MV_DEBUG_PRINT        triggers all modules to print some more debug info
+			[$MV_DEBUG_PRINT]
+  MV_SCRIPT_DEBUG	triggers this script to print executed commands
+			[$MV_SCRIPT_DEBUG]
+
+_________________________________________________________________________
+
+Metview command flags:
+warn
+ Common flags:
+    -u dir		use/create 'dir' as Metview user directory (main Metview folder)
+    -q			quiet - suppress warnings about other Metview runtime dirs found
+    -v			print Metview version, last Metview update date, and current host
+    -H			print this help text and start Metview
+    -h			print this help text and exit
+
+ Interactive usage specific flags:
+    -display dis	set \$DISPLAY temporarily to 'dis'
+    -F			use bigger fonts for big audience
+    -mfdbg dbgr		run your external Macro Functions (Fortran/C/C++) under debugger 'dbgr'
+
+ Data examiner flags:
+    -e type path	examine the given file
+			'type' can be grib, bufr or odb
+			e.g. metview -e grib /path/to/grib
+
+ Batch mode specific flags:
+    -b mname		run macro mname in batch mode
+			(-b must be the last Metview flag!)
+    -b mname p1 p2...	as above, p1 p2... are parameters for the macro
+
+ Log related flags:
+    -slog		"Single Log" -  combines output from all modules into
+			 standard output (longer log)
+    -qlog		"Quiet Log" -  as -slog, but only error messages are
+			 printed (shorter log)
+    -mlog		"Mars Log" -  as -qlog, but all MARS retrieval messages
+			 are printed (shortish log)
+    Note: You can increase the amount of log information with environment variables
+          MARS_DEBUG, MV_DEBUG_PRINT, MV_SCRIPT_DEBUG, JDCNDBG (see above)
+
+ Old log related flags:
+    -log		multiple log files into \$SCRATCH/default_log.<module>.log
+			(longest logs)
+    -log logid		multiple log files into \$SCRATCH/'logid'.<module>.log
+			(longest logs)
+
+ Development-only flag:
+    -edbg dbgr		start debugger 'dbgr' instead of central module Event
+			(for solving development/installation problems)
+
+HEND
diff --git a/scripts/metview_local.common b/scripts/metview_local.common
new file mode 100644
index 0000000..333a774
--- /dev/null
+++ b/scripts/metview_local.common
@@ -0,0 +1,131 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# ================================================================
+#                                     19980507/vk, rev 20030718/vk
+#
+# original file 'scripts/metview_local.example'
+# - copied into 'scripts/metview_local.common' by 'mvbuild' script
+# - copied into 'bin/metview_local.common'     by 'make'
+
+#----------------------------------------------------------------+
+#-- If you have installed Metview with MARS_remote - to access   -
+#-- MARS database at ECMWF - then un-comment and customise the   -
+#-- following three lines according to the configuration of      -
+#-- your 'ECaccess Tools' installation (the values assigned here -
+#-- are given only as examples):                                 -
+#----------------------------------------------------------------+
+#
+#ECACCESS_HOME=/usr/local/ecaccess-v2.0.3
+#ECHOST=GatewayHost
+#ECCERT_PORT=9443
+
+
+#------------------------------------------------------+
+#-- If you have problems with shared libraries then    -
+#-- uncomment and customise one of the following lines -
+#-- (pick the one used in your Unix system)            -
+#------------------------------------------------------+
+#
+#LD_LIBRARY_PATH=/your/custom/libdir:$LD_LIBRARY_PATH
+#LIBPATH=/your/custom/libdir:$LIBPATH
+#LPATH=/your/custom/libdir:$LPATH
+#LD_LIBRARYN32_PATH=/your/custom/libdir:$LD_LIBRARYN32_PATH
+
+
+#-- If you have more problems with shared libraries then note that
+#-- on some Linux systems 'xterm' does not inherit environment
+#-- variable LD_LIBRARY_PATH (for some security reasons), but
+#-- 'konsole' does. If this is the case in your environment then
+#-- uncomment the line below to use 'konsole'.
+#-- If this does not help then you need to change 's' bit in
+#-- 'xterm' or 'konsole' executable file protections bits!
+#--
+#-- For more info, see:
+#--
+#--    http://dickey.his.com/xterm/xterm.faq.html#no_libpath
+#--
+#[ $METVIEW_VERSION = dev ] && METVIEW_CMD="konsole -nowelcome -e"
+
+
+#-- editor help button browser config - used in src/WebAccess/WebAccess.cc
+#MV_BROWSER_NAME=${MV_BROWSER_NAME:=firefox}
+#MV_BROWSER_VERS=${MV_BROWSER_VERS:=5.1}
+
+
+#--------------------------------------------------------+
+#-- This one is for log files (the 7 lines in the end)   -
+#-- (note that you can also use the new flag -slog which -
+#-- is available by default)                             -
+#--------------------------------------------------------+
+#
+# BACKGROUND
+# ----------
+#   Metview startup script has a flag called '-log'.  By default
+# this flag is dummy i.e. setting it has no effect.
+#
+#   Sometimes you may need to know what is going on when Metview
+# is running (e.g. you have a macro that fails in batch mode).
+# In such cases you can configure Metview to be able to produce
+# log files i.e. you can activate '-log' flag.
+# (Or - starting from Metview 3.6-export - you can also try flag
+#  -slog which is a standard flag, available by default).
+#
+# WARNING
+# -------
+#   Note that activating '-log' flag does not come free: reconfigured
+# Metview requires twice the number of processes compared to default
+# Metview because activating '-log' flag is done by executing each
+# Metview module indirectly via a small script 'logrun' that handles
+# log file operations.
+#
+# HOW
+# ---
+#   Activating '-log' flag is simple: just uncomment the seven (7) last
+# lines in this file. Remember to run 'make all' after editing!.
+#
+# EXAMPLE
+# -------
+#   In an imaginary member state Memland they have a meteorological service
+#   called Memlandian Weather Institute (MWI). While building some operational
+#   macroes they run into strange problems and they decide to activate  '-log'
+#   option. In directory ./scripts they do:
+#
+#     vi metview_local.common   #-- edit and uncomment the required lines
+#     make                      #-- update the modified file into bin dir
+#
+#   and to activate their production version they install this change i.e.
+#   in directory ./src/MAKE they once more do:
+#
+#     make install
+#
+#   Then they run their problematic macro with '-log' flag...
+#
+# NOTE:
+# ----
+#   When flag '-log' is used it must be given before flag '-b' because
+#   all parameters after '-b' are passed to the macro itself e.g.:
+#
+#      metview -log mymacro -b /path/to/my/macro/mymacro
+#
+#   Log files are created into $SCRATCH. In case your environment has not
+#   defined $SCRATCH Metview script sets $SCRATCH to point to $TMPDIR (or
+#   /tmp if $TMPDIR has not been set).
+#
+
+#-- uncomment the following seven lines to activate log files --
+#if [ $METV_DEV = no ]
+#then
+#   #-- enable flag '-log' i.e. execute modules through a script
+#   METVIEW_CMD="$METVIEW_BIN/logrun "
+#   #-- catch crashing also for MetviewUI
+#   METVIEW_STARTUP="$METVIEW_DIR/bin/logrun $METVIEW_DIR/bin/MetviewUI"
+#fi
+
diff --git a/scripts/metview_local.ecm_lnx64 b/scripts/metview_local.ecm_lnx64
new file mode 100755
index 0000000..34dc29b
--- /dev/null
+++ b/scripts/metview_local.ecm_lnx64
@@ -0,0 +1,49 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# ----------------------------------
+# ECMWF extras for Linux environment
+# ----------------------------------
+
+#. /usr/local/share/ecmwf/use/sh.pgi-6.1 > /dev/null
+
+#-- compiled with byte swap (big endian), thus use common bigendian tables --#
+#-- not needed when we use text tables --#
+# BUFR_TABLES=${BUFR_TABLES:=/home/ma/emos/tables/bufr/000300/}
+
+#-- yes it is! --#
+BUFR_TABLES=${BUFR_TABLES:=/home/ma/emos/tables/bufr/text/000351/}
+
+
+#-- use 'konsole' because xterm discards LD_LIBRARY_PATH setting --#
+##[ $METVIEW_VERSION = dev ] && METVIEW_CMD="konsole -nowelcome -e"
+
+#-- which OpenGL?  PNG/JPEG libs (in Magics) by $MAG_AUX_ROOT_BASENAME --#
+#LD_LIBRARY_PATH=/usr/local/apps/Magics/$MAG_AUX_ROOT_BASENAME/lib:$LD_LIBRARY_PATH
+
+#-- MARS related stuff --
+. $METVIEW_BIN/set_mars_env
+
+#-- editor help button browser config - used in src/WebAccess/WebAccess.cc
+MV_BROWSER_NAME=${MV_BROWSER_NAME:=firefox}
+MV_BROWSER_VERS=${MV_BROWSER_VERS:=5.1}
+
+#-- activate log parameter --
+if [ $METV_DEV = no ]
+then
+   #-- enable flag '-log' i.e. execute modules through a script --
+   METVIEW_CMD="$METVIEW_BIN/mvrun_c "
+   #-- catch crashing also for MetviewUI --
+   METVIEW_STARTUP="$METVIEW_BIN/mvrun_c $METVIEW_BIN/MetviewUI"
+fi
+
+METVIEW_GRIB_DUMP=$GRIBAPI_DIR/bin/grib_dump
+export PATH="/usr/local/apps/netCDF/current/bin:$PATH"  # for ncdump,ncgen
diff --git a/scripts/metview_local2.common b/scripts/metview_local2.common
new file mode 100644
index 0000000..5182b20
--- /dev/null
+++ b/scripts/metview_local2.common
@@ -0,0 +1,10 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
diff --git a/scripts/metview_local2.ecm_lnx64 b/scripts/metview_local2.ecm_lnx64
new file mode 100644
index 0000000..2d5f351
--- /dev/null
+++ b/scripts/metview_local2.ecm_lnx64
@@ -0,0 +1,11 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+ 
diff --git a/scripts/metview_patches b/scripts/metview_patches
new file mode 100644
index 0000000..8297175
--- /dev/null
+++ b/scripts/metview_patches
@@ -0,0 +1,82 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+##################################################################
+## Apply patches
+##
+## The idea is that we maintain a file in ~/metview/System/.PatchNumber
+## which keeps track of the last patch to be applied to this Metview
+## user directory so that we don't unnecessarily test for patches
+## each time Metview is started up. We also maintain a log file
+## containing details of the patches applied.
+## Each patch should have a meaningful test to ensure that it is only
+## applied if necessary - and always consider what should happen if
+## a user is running Metview for the first time.
+## Note that we use integers as patch numbers in order to avoid
+## problems with LANG environments (confusion between '.' and ',').
+## This means that we have the 'major number' of the patch being
+## multiplied by 10, e.g. 14: major=1,minor=4.
+##################################################################
+
+MVU=$METVIEW_USER_DIRECTORY
+PATCH_FILE=$MVU/System/.PatchNumber
+PATCH_LOG=$MVU/System/.PatchLog
+LAST_PATCH_IN_THIS_FILE=14 # MUST be updated if a new patch is added
+
+LAST_PATCH_APPLIED=0
+if [ -f $PATCH_FILE ] # read the last patch applied from file
+then
+    LAST_PATCH_APPLIED=`cat $PATCH_FILE`
+fi
+
+
+
+
+if [ $LAST_PATCH_APPLIED -lt $LAST_PATCH_IN_THIS_FILE ] # any action required?
+then
+
+    # patch 1
+    if [ $LAST_PATCH_APPLIED -lt 14 ]
+    then
+        # FUNCTION: update_vis_icon - updates a Visualiser icon
+        update_vis_icon() {
+            ICON=$1
+            DRAWER=$2
+            BADSTRING=$3
+            PATCH_NUM=$4
+
+            SYS_DRAWER="$METVIEW_DIR_SHARE/app-defaults/Drawers/$DRAWER"
+            USER_DRAWER="$MVU/System/Drawers/$DRAWER"
+
+            if [ -f "$MVU/System/Defaults/$ICON" ] && [ `grep -c $BADSTRING "$MVU/System/Defaults/$ICON"` != 0 ]
+            then
+                rm -f "$MVU/System/Defaults/$ICON" ; rm -f "$MVU/System/Defaults/.$ICON"
+                echo "Patch ${PATCH_NUM}-a (Odb Visualiser default) applied on `date`" >> $PATCH_LOG
+            fi
+
+            if [ -f "$USER_DRAWER/$ICON" ] && [ `grep -c $BADSTRING "$USER_DRAWER/$ICON"` != 0 ]
+            then
+                echo "Updating $ICON drawer icon to latest version"
+                rm -f  "$USER_DRAWER/$ICON" ; rm -f  "$USER_DRAWER/.$ICON"
+                cp "$SYS_DRAWER/$ICON"   "$USER_DRAWER" ; cp "$SYS_DRAWER/.$ICON"  "$USER_DRAWER"
+                echo "Patch ${PATCH_NUM}-b ($ICON icon) applied on `date`" >> $PATCH_LOG
+            fi
+        }
+
+
+        update_vis_icon "Input Visualiser"  "Modules (Plotting)"  INPUTVISUALISER_FAMILY  11
+        update_vis_icon "Odb Visualiser"    "Modules (Plotting)"  ODBVISUALISER_FAMILY    12
+        update_vis_icon "Table Visualiser"  "Modules (Plotting)"  TABLEVISUALISER_FAMILY  13
+        update_vis_icon "NetCDF Visualiser" "Modules (Plotting)"  NETCDFPLUS_FAMILY       14
+    fi
+
+
+    echo $LAST_PATCH_IN_THIS_FILE > $PATCH_FILE
+fi
diff --git a/scripts/metview_stat b/scripts/metview_stat
new file mode 100644
index 0000000..c835ff0
--- /dev/null
+++ b/scripts/metview_stat
@@ -0,0 +1,49 @@
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+###
+#   This is an ECMWF specific script to collect Metview usage
+#   statistics. Every time Metview is started a line about
+#   the user is appended into usage statistics file.
+#
+#   If your site wants usage statistics then:
+#     1) create an empty file with write permissions (touch + chmod)
+#     2) set MV_USAGE_FILE to point to this file
+#     3) remove/modify condition '$MV_SITE_NR = 098' (098 is ECMWF)
+#
+#   If you do not want to collect usage statistics then leave
+#   this file as is.
+###
+
+#-- do not let this script crash the master script!
+set +e
+
+#-- (3) modify this test
+if [ $WMO_SITE_NR = 098 -a $METV_DEV = no -a $OS != hpcf ]
+then
+   #-- first letter of runmode: 'i' or 'b'
+   MV_MODE=`echo $METVIEW_MODE | cut -c1`
+
+   #-- (2) modify here the path to your own usage file
+   MV_USAGE_FILE="/home/graphics/cgx/public/Metview_usage_${METVIEW_RELEASE}_$MV_MODE"
+
+   if [ -f $MV_USAGE_FILE ]
+   then
+      #-- try $USER first, if nothing then try $LOGNAME
+      MVUSERID=$USER
+      [ "$MVUSERID" = "" ] && MVUSERID=$LOGNAME
+      [ "$MVUSERID" = "" ] && MVUSERID="???"
+      echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; $MV_MODE; `hostname`; $METVIEW_VERSION_TITLE" >> $MV_USAGE_FILE
+   else
+      info "Common statistics file not found: $MV_USAGE_FILE"
+   fi
+fi
+
+set -e
diff --git a/scripts/mv_flextra_prep b/scripts/mv_flextra_prep
new file mode 100755
index 0000000..7b82acc
--- /dev/null
+++ b/scripts/mv_flextra_prep
@@ -0,0 +1,339 @@
+#!/usr/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+#set -a
+set -x
+
+#==================================================
+#
+# FUNCTIONS
+#
+#==================================================
+
+#------------------------------------
+#
+#
+#
+#------------------------------------
+
+function getDataForDate
+{
+set -x
+
+typeset reqDate=$1
+typeset reqTime=$2
+typeset reqStep=$3
+
+typeset f_etadot=${d_WORK}/etadot.grb
+typeset f_etadot_tmp=${d_WORK}/etadot_tmp.grb
+typeset f_uvt=${d_WORK}/uvt.grb
+typeset f_spz=${d_WORK}/spz.grb
+
+
+#if [ 1 -eq 0 ]; then
+
+mars <<EOF
+retrieve,
+  type = fc,
+  date = ${reqDate},
+  time = ${reqTime},
+  step = ${reqStep},
+  param = etadot,
+  levtype = ml,
+  levelist = 1/to/91,
+  grid = ${GRID},
+  area = ${AREA},
+  target = "${d_WORK}/etadot.grb"
+EOF
+
+mars <<EOF
+retrieve,
+  type = fc,
+  date = ${reqDate},
+  time = ${reqTime},
+  step = ${reqStep},
+  param = u/v/t,
+  levtype = ml,
+  levelist = 1/to/91,
+  grid = ${GRID},
+  area = ${AREA},
+  target = "${d_WORK}/uvt.grb"
+EOF
+
+mars <<EOF
+retrieve,
+  type = fc,
+  date = ${reqDate},
+  time = ${reqTime},
+  step = ${reqStep},  
+  param = sp/z,
+  levtype = sfc,
+  grid = ${GRID},
+  area = ${AREA},
+  target = "${d_WORK}/spz.grb"
+EOF
+
+#fi
+
+mv ${f_etadot} ${f_etadot_tmp}
+metview4 -b ${macro_ETADOT} ${f_spz} ${f_etadot_tmp} ${f_etadot}
+
+#cat ${f_etadot} ${f_spz} > ${f_etadot_tmp}
+#rm -f ${f_etadot}
+#${exe_ETADOT} ${f_etadot_tmp} ${f_etadot}
+	
+typeset valDate=`grib_get -p validityDate -w count=1 ${f_uvt} | cut -c 3-`
+typeset valTime=`grib_get -p validityTime -w count=1 ${f_uvt} | awk '{printf("%04d", $1)}' | cut -c 1-2`
+
+cat ${f_uvt} ${f_etadot} ${f_spz} > ${d_WORK}/EN${valDate}${valTime}
+rm -f ${f_uvt} ${f_etadot} ${f_etadot_tmp} ${f_spz}
+
+}
+
+#------------------------------------
+#
+# Check if data is already in place
+#
+#------------------------------------
+
+function checkInputIsInPlace
+{
+typeset inputIsInPlace=0
+if [ -f $f_AVAILABLE -a -f $f_METVIEW_INFO ] 
+then
+   if [ "x`grep DATE $f_METVIEW_INFO | cut -d "=" -f 2`" = "x$DATE" -a \
+        "x`grep TIME $f_METVIEW_INFO | cut -d "=" -f 2`" = "x$TIME" -a \
+        "x`grep STEP $f_METVIEW_INFO | cut -d "=" -f 2`" = "x$STEP" -a \
+        "x`grep AREA $f_METVIEW_INFO | cut -d "=" -f 2`" = "x$AREA" -a \
+	"x`grep GRID $f_METVIEW_INFO | cut -d "=" -f 2`" = "x$GRID" ] 
+   then
+      inputIsInPlace=1  
+      while read line
+      do
+        if [ `echo $line | grep -c EN` -eq 1 -a \
+             ! -f ${d_OUTPUT}/`echo $line | awk '{print $3}'` ]	
+        then 
+	   inputIsInPlace=0
+	   break
+       fi
+   done <  $f_AVAILABLE
+   fi
+fi
+
+ return $inputIsInPlace
+}
+
+#==================================================
+#
+# MAIN PART
+#
+#==================================================
+
+#---------------------------------------
+# Get arguments
+#---------------------------------------
+
+f_PAR=
+doCheckOnly=0
+doCheck=1
+
+set -- `getopt p:cf "$@"`
+if [ $# -lt 1 ] ; then
+   echo "Getopt failed to read arguments!"
+   exit 1	
+fi
+
+while [ $# -gt 0 ]
+do
+    case "$1" in
+        -p)  f_PAR="$2"; shift;;
+        -c)  doCheckOnly=1;;
+	-f)  doCheck=0;;
+	--)  shift; break;;
+	-*)
+                echo >&2 \
+		"Usage: $0 -p file [-c] [-f]"
+		exit 1;;
+	*)	break;;
+    esac
+    shift
+done
+
+#---------------------------------------------------------------
+# Include the control parameters set via the Metview interface
+# d_WORK, d_OUTPUT, f_AVAILABLE,  DATE, TIME, STEP, AREA, GRID
+#---------------------------------------------------------------
+
+if [[ "x$f_PAR" != x && -f $f_PAR ]] ; then
+   . $f_PAR
+else
+   echo "No parameter file found: " $f_PAR	
+   exit 1
+fi
+
+#---------------------------------------
+# Init control parameters
+#---------------------------------------
+
+#d_WORK=
+#d_OUTPUT=
+#DATE=20111114
+#TIME=0000
+#STEP=0/3/6/9/12/15/21/24/27/30/33/36
+#AREA=31.17/-28.56/70.77/31.53
+#GRID=1/1
+
+#---------------------------------------
+# Paths
+#---------------------------------------
+
+#f_AVAILABLE=${d_OUTPUT}/AVAILABLE
+f_METVIEW_INFO=${d_OUTPUT}/mv_info.txt
+#exe_ETADOT=${MV_FLEXTRA_ETADOT_EXE}
+
+#-------------------------------------
+# Check if data is already in place
+#-------------------------------------
+
+if [ $doCheckOnly -eq 1 ] ; then
+  
+   checkInputIsInPlace
+   if [ $? -eq 1 ] ; then 
+	echo "All the needed files are already in place!"
+	exit 0
+   else
+        exit 1
+   fi
+	 		
+elif [ $doCheck -eq 0  ] ; then
+   
+   checkInputIsInPlace
+   if [ $? -eq 1 ] ; then 
+        echo "All the needed files are already in place!"
+	exit 0
+   fi
+fi
+
+
+#-----------------------------
+# Further checks
+#-----------------------------
+
+#if [ "x${exe_ETADOT}" = x -o  ! -f $exe_ETADOT ] ; then   
+#   echo "No etadot executable found: " $exe_ETADOT	
+#   exit 1
+#fi
+#
+#if [ ! -x $exe_ETADOT ] ; then   
+#   echo "Etadot executable cannot be run! Permission is missing. " $exe_ETADOT
+#   exit 1
+#fi
+
+#---------------------------------------
+# Check directories
+#---------------------------------------
+
+[[ ! -d $d_WORK ]] && mkdir -p $d_WORK
+[[ ! -d $d_OUTPUT ]] && mkdir -p $d_OUTPUT
+
+#---------------------------------------
+# Create Metview macro to modify etadot
+#---------------------------------------
+
+macro_ETADOT=${d_WORK}/mv_modify_etadot.mv
+
+cat > ${macro_ETADOT} <<EOF
+#Metview Macro
+
+ print("hello")
+
+ x=arg()
+ if count(arg) <> 3 then
+   fail("")
+ end if
+ 
+ sp=read(x[1])
+ etadot=read(x[2])
+ outFile=x[3]
+
+ res=mvl_flextra_etadot(sp,etadot)
+ write(outFile,res)
+
+EOF
+
+#-----------------------------
+# Loop for the steps
+#-----------------------------
+
+#Split steps
+SAVEIFS=$IFS
+IFS="/"
+set -A steps $STEP
+IFS=$SAVEIFS
+
+#Loop for each step
+for ts in ${steps[*]} ; do
+
+	#echo "getDataForDate  $DATE $TIME $ts"
+	getDataForDate  $DATE $TIME $ts 
+done
+
+
+#--------------------------------------
+# Generate the AVIALABLE file and
+# move the results to the output dir
+#--------------------------------------
+
+cd ${d_WORK}
+
+SAVEIFS=$IFS
+IFS=$'\n'
+
+cat > ${f_AVAILABLE} <<EOF
+DATE      TIME     FILNAME     SPECIFICATIONS
+YYYYMMDD  HHMISS
+_____________________________________________
+EOF
+
+#for f in  $(find . -mindepth 1  -name "EN*" -type f)  ; do
+
+for f in  `ls EN*` ; do
+
+  echo "file: " $f
+
+  f_name=`basename $f`	
+  f_date=`grib_get -p validityDate -w count=1 $f`
+  f_time=`grib_get -p validityTime -w count=1 $f`
+  f_time=`echo $f_time | awk '{printf(" %04d", $1)}'`00
+
+  cat >> ${f_AVAILABLE} << EOF
+${f_date} ${f_time}    ${f_name}      ON DISC
+EOF
+
+  mv -f $f ${d_OUTPUT}
+
+done
+IFS=$SAVEIFS
+
+#--------------------------------------
+# Generate the metview info file
+#--------------------------------------
+
+cat > ${f_METVIEW_INFO} <<EOF
+DATE=$DATE
+TIME=$TIME
+STEP=$STEP
+AREA=$AREA
+GRID=$GRID
+EOF
+
+exit 0
diff --git a/scripts/mv_flextra_prep.mv b/scripts/mv_flextra_prep.mv
new file mode 100644
index 0000000..b61a1b0
--- /dev/null
+++ b/scripts/mv_flextra_prep.mv
@@ -0,0 +1,781 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+#---------------------------------------
+# Define parameters
+#---------------------------------------
+
+global AREA=""
+global GRID=""
+global d_OUTPUT=""
+global f_AVAILABLE=""
+global TOP_LEVEL=1
+global TOP_LEVEL_UNITS=""
+
+#---------------------------------------------------------------
+# Read arguments
+#---------------------------------------------------------------
+
+args=arguments()
+
+if count(args) = 0 then
+	fail("No arguments specified!")
+end if
+
+print("Arguments: ",args)
+
+#Get main mode
+mode=args[1]
+if mode <> "fc" and mode <> "period" then 
+    print("Invalid first argument: ",mode,"!")
+    print("Allowed values are: \"fc\" or \"period\"")
+    fail
+end if
+
+#Get check mode
+val=args[2]
+doCheck=0
+if val = "1" then
+    doCheck=1
+end if 
+
+#Get mars parameters
+
+
+
+#Get outdir and AVAILABLE file path
+d_OUTPUT=args[3]
+f_AVAILABLE=args[4]
+
+#Get area and resolution 
+AREA=parse(args[5],"/")
+GRID=parse(args[6],"/") 
+
+#Get top level
+TOP_LEVEL=number(args[7])
+TOP_LEVEL_UNITS=args[8] 
+if TOP_LEVEL_UNITS <> "ML" and TOP_LEVEL_UNITS <> "HPA" then
+    	print("Invalid argument for TOP_LEVEL_UNITS: ",TOP_LEVEL_UNITS,"!")
+        print("Allowed values are: \"ML\" or \"HPA\"")
+	fail
+end if
+
+#---------------------------------------
+# Check directories
+#---------------------------------------
+
+if not(exist(d_OUTPUT)) then
+   if shell("mkdir -p " & d_OUTPUT) <> 0 then
+      print("Could not create output directory!")
+      print("Shell command failed: mkdir -p " & d_OUTPUT)
+      fail()
+   end if   
+end if
+
+#--------------------------------------
+# Generate/check FLEXTRA grib files
+#--------------------------------------
+
+outLst=nil
+if mode = "fc" then
+    outLst=fcMain(args,doCheck)
+else if mode = "period" then
+    outLst=fcPeriod(args,doCheck)
+end if 
+  
+print(outLst)  
+   
+#--------------------------------------
+# Generate the AVIALABLE file
+#--------------------------------------
+
+#First check if we need to generate it
+if doCheck = 1 then 
+	if exist(f_AVAILABLE) then 
+		if checkAvailableFile(outLst) = 1 then		
+			print("AVAILABLE is already in place!")
+			stop(0)
+		end if
+	end if
+end if			
+
+#Now we generate it
+print("Generate a new AVAILABLE file!")
+
+fp=file(f_AVAILABLE)
+
+write(fp,"DATE      TIME     FILNAME     SPECIFICATIONS",newline)
+write(fp,"YYYYMMDD  HHMMSS",newline)
+write(fp,"_____________________________________________",newline)
+
+loop it in outLst
+	outName=it[1] #the output file name
+	outDate=it[2] #the validity date of the output file
+	#The format must be (i8,1x,i6,2(6x,a18)) in FORTRAN!!
+	write(fp,string(outDate,"yyyymmdd")," ",string(outDate,"HHMMSS"),"      ",outName,"      ON DISC",newline)
+end loop
+
+fp=0
+
+stop(0)
+  
+#=================================================
+#
+# Main function to generate/check
+# FLEXTRA GRIB  files in "fc" mode
+#
+#=================================================
+
+function fcMain(arg:list,doCheck:number)
+
+ if count(arg) <> 12 then
+	fail("Invalid number of arguments: " & count(arg) & " (should be 12)")
+ end if
+
+ #Get "fc" mode scpecific params 
+
+ fExpver=arg[9]
+ DATE=number(arg[10])
+ TIME=number(arg[11])
+ STEP=parse(arg[12],"/")
+
+ #Print params
+ print("doCheck=",doCheck)
+ print("d_OUTPUT=",d_OUTPUT) 
+ print("f_AVAILABLE=",f_AVAILABLE) 
+ print("DATE=",DATE) 
+ print("TIME=",TIME) 
+ print("STEP=",STEP) 
+ print("AREA=",AREA) 
+ print("GRID=",GRID) 
+ print("EXPVER=",fExpver) 
+
+ #--------------------------------------
+ # Loop for the steps.
+ # Move the results to the output dir
+ #--------------------------------------
+
+ baseDate = date(DATE) + hour(TIME)
+ outLst=nil
+ fClass="od"
+ fType="fc"
+ fStream="oper"
+ topLevel=1
+ bottomLevel=-1
+ levNum=-1
+ 
+ loop ts in STEP
+	print("Generate data for step: ",ts)
+
+	#Find out file date and fileName	
+ 	fDate = baseDate + hour(ts)
+ 	fDay = DATE 
+ 	fHour = TIME
+ 	fName="EN" & string(fDate,"yymmddHH")	
+
+	if bottomLevel = -1 then
+		lst=getLevelRange(fName,fDate,fStream,fType,fExpver,fDay,fHour,ts)
+		topLevel=lst[1]
+                bottomLevel=lst[2]
+                levNum=bottomLevel
+		print("Top model level=",topLevel) 
+ 		print("Bottom model level=", bottomLevel) 
+        end if
+
+ 	if doCheck = 1 then 
+		if checkInputFile(fName,fDate,fType,fDay,fHour,ts,fExpver,levNum) = 0 then
+			print("  --> Data needs to be generated!")
+			getDataForDate(fName,fDate,fStream,fType,fExpver,fDay,fHour,ts,topLevel,bottomLevel)
+			print("  --> Done!")
+		else 
+			print("  --> Data is already in place!")
+		end if		
+	else 
+		print("  --> Data needs to be generated!")
+		getDataForDate(fName,fDate,fStream,fType,fExpver,fDay,fHour,ts,topLevel,bottomLevel)
+		print("  --> Done!")
+	end if
+	
+	item=[fName,fDate]
+	outLst = outLst & [item]
+				 
+ end loop
+
+ return outLst
+
+end fcMain
+
+#=================================================
+#
+# Main function to generate/check
+# FLEXTRA GRIB  files in "period" mode
+#
+#=================================================
+
+function fcPeriod(arg:list,doCheck:number)
+
+ if count(arg) <> 15 then
+	fail("Invalid number of arguments: " & count(arg) & " (should be 15)")
+ end if
+
+ #Get "fc" mode scpecific params
+ fExpverFc=arg[9]
+ fExpverAn=arg[10]
+ fStreamFc="oper"
+ fStreamAn="oper"
+
+ DATE_START=number(arg[11])
+ TIME_START=number(arg[12])
+ DATE_END=number(arg[13])
+ TIME_END=number(arg[14])
+ STEP=number(arg[15])  #parse(arg[15],"/")
+
+ #Print params
+ print("doCheck=",doCheck)
+ print("d_OUTPUT=",d_OUTPUT) 
+ print("f_AVAILABLE=",f_AVAILABLE) 
+ print("DATE_START=",DATE_START) 
+ print("TIME_START=",TIME_START)
+ print("DATE_END=",DATE_END) 
+ print("TIME_END=",TIME_END)
+ print("STEP=",STEP) 
+ print("AREA=",AREA) 
+ print("GRID=",GRID) 
+
+ #--------------------------------------
+ # Loop for the steps.
+ # Move the results to the output dir
+ #--------------------------------------
+
+ anHours = [0,6,12,18]
+ fcHours = [3,9,15,21]
+ 
+ startDate = date(DATE_START) + hour(TIME_START)
+ endDate = date(DATE_END) + hour(TIME_END)
+ 
+ #Find out the latest forecast run date.
+ #If we are after 9 am we set the run date to today 00.
+ #Otherwise we set the run date to yesterday 12.
+ 
+ 
+ today=now()
+ if hour(today) < 9 then
+ 	today = date(yyyymmdd(today-1)) + hour(12)
+ else
+ 	today = date(yyyymmdd(today))	 
+ end if 
+  
+ #We go through the dates from starting date to end date.
+ #We count and check the number of dates just for
+ #safety!
+ 
+ topLevel=1
+ bottomLevel=-1
+ levNum=-1
+ outLst=nil
+ cnt = 1 
+ actDate = startDate
+ while actDate <= endDate and cnt < 1000 do
+ 
+ 	#Find out fileName, day and hour	 	
+ 	fName="EN" & string(actDate,"yymmddHH")
+	fDate=actDate
+	actDay=yyyymmdd(actDate)
+    actHour=hour(actDate) 
+    fStream="oper" 
+    expVer="1"
+    
+    print("  Process date: ",actDay," time: ",actHour)
+    
+    #Past
+    if actDate < today then
+    	if actHour in anHours then
+    		fType="an"
+                fStream=fStreamAn
+                fExpver=fExpverAn
+    		fDay=actDay
+    		fHour=actHour
+    		ts=0
+    	else if actHour in fcHours then
+    		fType="fc"
+                fStream=fStreamFc
+                fExpver=fExpverFc
+    		fDay=actDay
+    		fHour=actHour-3
+    		if fHour = 6 or fHour = 18 then
+    			fStream="dcda"
+    		end if
+    		ts=3 		
+    	else
+    		print("Invalid data/time found: ",actDay," ",actHour)
+    		fail()
+   	    end if
+    #Future
+    else
+    	fType="fc"
+        fStream=fStreamFc
+        fExpver=fExpverFc
+    	fDay=yyyymmdd(today)
+    	fHour=hour(today)
+    	ts=hour(actDate - today) 				
+    end if
+    
+    if bottomLevel = -1 then
+	lst=getLevelRange(fName,fDate,fStream,fType,fExpver,fDay,fHour,ts)
+	topLevel=lst[1]
+        bottomLevel=lst[2]  
+        levNum=bottomLevel  
+        print("Top model level=",topLevel) 
+        print("Bottom model level=", bottomLevel) 
+    end if
+
+    if fType = "fc" then
+    	print("  --> Data: fc stream: ",fStream," date: ",fDay," time: ",fHour," step: ",ts)
+    else
+    	print("  --> Data: an stream: ",fStream," date: ",fDay," time: ",fHour)	
+    end if
+    
+    if doCheck = 1 then 
+		if checkInputFile(fName,actDate,fType,fDay,fHour,ts,fExpver,levNum) = 0 then
+			print("  --> Data needs to be generated!")
+			getDataForDate(fName,actDate,fStream,fType,fExpver,fDay,fHour,ts,topLevel,bottomLevel)
+			print("  --> Done!")
+		else 
+			print("  --> Data is already in place!")
+		end if		
+	else 
+		print("  --> Data needs to be generated!")
+		getDataForDate(fName,fDate,fStream,fType,fExpver,fDay,fHour,ts,topLevel,bottomLevel)
+		print("  --> Done!")
+	end if
+	
+	item=[fName,actDate]
+	outLst = outLst & [item]
+    
+    actDate = actDate  + hour(STEP)
+    cnt = cnt +1
+      
+ end while
+ print(outLst)  
+ return outLst
+
+end fcPeriod
+
+#===================================================
+#
+# Get FLEXTRA GRIB file for a given forecats step
+#
+#===================================================
+
+function getDataForDate(outFileName,outFileDate,dataStream,dataType,expVer,dataDay,dataHour,dataStep,topLev,bottomLev)
+
+ #Retrieve etadot
+ etadot=retrieve(
+  stream : dataStream,
+  type : dataType,
+  expver : expVer,
+  date : dataDay,
+  time : dataHour,
+  step : dataStep,
+  param : "etadot",
+  levtype : "ml",
+  levelist : [topLev,"to",bottomLev],
+  grid : GRID,
+  area : AREA
+  )
+
+ #Retrieve u, v and t
+ uvt=retrieve(
+  stream : dataStream,
+  type : dataType,
+  expver : expVer,
+  date : dataDay,
+  time : dataHour,
+  step : dataStep,
+  param : ["u","v","t"],
+  levtype : "ml",
+  levelist : [topLev,"to",bottomLev],
+  grid : GRID,
+  area : AREA
+ )
+
+ #Retrieve sp and z
+ spz=retrieve(
+  stream : dataStream,
+  type : dataType,
+  expver : expVer,
+  date : dataDay,
+  time : dataHour,
+  step : dataStep,
+  param : ["sp","z"],
+  levtype : "sfc",
+  grid : GRID,
+  area : AREA
+ )
+ 
+ if spz = nil or uvt = nil or etadot = nil then
+ 	print("MARS retrieval failed!")	
+ 	fail()	
+ end if
+ 
+ print("  --> Compute etadot")
+ #Compute the etadot needed by FLEXTRA
+ res=mvl_flextra_etadot(spz,etadot)
+
+ if res = nil then
+ 	print("Etadot computation failed!")	
+ 	fail()	
+ end if
+
+ #The result
+ res=uvt & res & spz
+ 	
+ valDate=grib_get_long(uvt[1],"validityDate")
+ valTime=grib_get_string(uvt[1],"validityTime") 
+
+ #Valtime has the HHMM format but does not 
+ #contain leading zeros! So we need to change it!
+ len=length(valTime)
+ if len = 4 or len = 3 then
+     h=number(valTime)/100
+ else 
+ 	 h=number(valTime)
+ end if    
+ 
+ d = date(valDate) + hour(h)
+ if d <> outFileDate then
+ 		print("Incosistency between dates!")
+ 		print("Expected: ",outFileDate," recived: ",d)
+ 		fail() 
+ end  if 
+ #print("time: ",valDate," ",valTime," ",d)  
+
+ #Write the resulting fieldset into the output directory
+ #outFileName="EN" & string(outDate,"yymmddHH") 
+ write(d_OUTPUT & "/" & outFileName,res)
+ 
+ #Clear fieldsets
+ uvt=0
+ etadot=0
+ spz=0
+ res=0
+
+end getDataForDate
+
+
+#===================================================
+#
+# Check if a given GRIB data file is 
+# already in place.
+#
+#===================================================
+
+function checkInputFile(outFileName,outFileDate,dataType,dataDay,dataHour,dataStep,dataExpver,dataLevNum)
+
+ #Find out fileName
+ fName=d_OUTPUT & "/" & outFileName 	
+	
+ #Check if file exits
+ if not(exist(fName)) then
+ 	return 0
+ end if	
+
+ grb=read(source: fName,
+	  levType: "ml")
+
+ #Check if there are model levels
+ if grb = nil then
+      print("   No model level were found!")
+      return 0
+ end if
+ 
+ #Check level num
+ levNumGrb=getLevelNum(grb[1])
+ if levNumGrb <> dataLevNum then
+     print("    Level num does not match! Expected: ",dataLevNum," found: ",levNumGrb)
+     return 0
+ end if
+
+ #Check experiment version
+ expGrb=grib_get_string(grb[1],"experimentVersionNumber")
+ if compareExpver(dataExpver,expGrb) then
+     print("    Expver does not match! Expected: ",dataExpver," found: ",expGrb)
+     return 0
+ end if
+
+ #Check date, time
+ dayGrb=grib_get_long(grb[1],"date")
+ if dataDay <> dayGrb then  
+    print("    Date does not match! Expected: ",dataDay," found: ",dayGrb)
+    return 0
+ end if
+ 
+ hourGrb=grib_get_long(grb[1],"time")
+ if 100*dataHour <> hourGrb then  
+    print("    Time does not match! Expected: ",100*dataHour," found: ",hourGrb)
+    return 0
+ end if
+ 
+ #Check step for forecasts
+ if dataType = "fc" then
+   stepGrb=grib_get_long(grb[1],"stepRange")
+   if dataStep <> stepGrb then 
+      print("    Step does not match! Expected: ",dataStep," found: ",stepGrb)
+      return 0
+   end if
+ end if 
+ 
+ #Check grid type 
+ gridGrb=grib_get_string(grb[1],"gridType")
+ if gridGrb <> "regular_ll"  then
+ 	print("    Gridtype does not match! Expected: regular_ll found: ",gridGrb)
+ 	return 0
+ end if
+ 
+ #Get metadata from grib file
+ dxGrb=grib_get_long(grb[1],"iDirectionIncrement")
+ dyGrb=grib_get_long(grb[1],"jDirectionIncrement")
+ southGrb=grib_get_long(grb[1],"latitudeOfLastGridPoint")
+ northGrb=grib_get_long(grb[1],"latitudeOfFirstGridPoint")
+ westGrb=grib_get_long(grb[1],"longitudeOfFirstGridPoint")
+ eastGrb=grib_get_long(grb[1],"longitudeOfLastGridPoint") 
+ gribEdition=grib_get_long(grb[1],"editionNumber")
+ 
+ dx=GRID[1]
+ dy=GRID[2]
+ south=AREA[1]
+ north=AREA[3]
+ west=AREA[2]
+ east=AREA[4]
+
+ # GRIB 1 - millidegrees
+ if gribEdition = 1 then
+
+    dx=dx*1000
+    dy=dy*1000
+    south=south*1000
+    north=north*1000
+    west=west*1000
+    east=east*1000
+    
+    #Check grid resolution
+    if dx <> dxGrb then
+        print("    dx doest not match! Expected: ",dx," found: ",dxGrb) 
+        return 0 
+    end if
+  
+    if dy <> dyGrb then
+        print("    dy doest not match! Expected: ",dy," found: ",dyGrb) 
+        return 0 
+    end if
+  
+    #Check area
+    if south <> southGrb then
+        print("    South does not match! Expected: ",south," found: ",southGrb)
+        return 0
+    end if
+  
+    if north <> northGrb then
+        print("     North does not match! Expected: ",north," found: ",northGrb)
+        return 0
+    end if
+ 
+    globalMatch=0
+    if AREA[2] = -180 and AREA[4] = 180 and 
+       westGrb = -180000 and eastGrb = 179000 then
+          globalMatch=1
+    end if    
+    
+    if west <> westGrb and globalMatch = 0 then
+       print("    West does not match! Expected: ",west," found: ",westGrb)
+       return 0
+    end if
+ 
+    if east <> eastGrb and globalMatch = 0 then
+        print("     East does not match! Expected: ",east," found: ",eastGrb)
+       return 0
+    end if
+    
+ # GRIB 2 - microdegrees  
+ else if gribEdition = 2  then 
+    
+    dx=dx*1000000
+    dy=dy*1000000
+    south=south*1000000
+    north=north*1000000
+     
+    if west < 0 then 
+       west=west + 360.
+    end if
+    west=west*1000000
+ 
+    if east < 0 then 
+      east= east + 360.
+    end if
+    east=east*1000000
+ 
+    #Check grid resolution
+    if dx <> dxGrb then
+    	print("    dx doest not match! Expected: ",dx," found: ",dxGrb) 
+    	return 0 
+ 	end if
+ 	
+    if dy <> dyGrb then
+    	print("    dy doest not match! Expected: ",dy," found: ",dyGrb) 
+    	return 0 
+ 	end if
+ 	
+    #Check area
+    if south <> southGrb then
+ 		print("    South does not match! Expected: ",south," found: ",southGrb)
+ 		return 0
+	end if
+	
+ 	if north <> northGrb then
+ 		print("     North does not match! Expected: ",north," found: ",northGrb)
+ 		return 0
+ 	end if
+ 
+    globalMatch=0
+    if AREA[2] = -180 and AREA[4] = 180 and 
+       westGrb = 180000000 and eastGrb = 179000000 then
+        globalMatch=1
+    end if    
+    
+    if west <> westGrb and globalMatch = 0 then
+ 	    print("    West does not match! Expected: ",west," found: ",westGrb)
+ 	    return 0
+    end if
+    
+    if east <> eastGrb and globalMatch = 0 then
+ 	    print("     East does not match! Expected: ",east," found: ",eastGrb)
+ 	    return 0
+    end if
+ else
+ 		print("     Invalid GRIB edition: ",editionNumber)
+ 	    return 0
+ end if
+ 
+ return 1
+ 
+end checkInputFile
+
+#================================================
+#
+# Check if the AVILABLE file is
+# correctly describing the data we have.
+#
+#================================================
+
+function checkAvailableFile(outLst)
+
+ if not(exist(f_AVAILABLE)) then
+ 	return 0
+ end if	
+ 
+ avLst=nil
+ lines=read(f_AVAILABLE) 
+ for i=1 to count(lines) do
+     f=parse(lines[i]," ")
+     if count(f) >= 4 then
+       if substring(f[3],1,2) = "EN" then 	    
+          avLst=avLst & f[3]
+       end if
+     end if 
+ end for
+ 
+ outAvLst=nil
+ loop f in outLst 
+ 	outAvLst=outAvLst & f[1]
+ end loop
+ 
+ if avLst = outAvLst then
+ 	return 1
+ else
+ 	return 0
+ end if
+ 
+ return 0
+
+end checkAvailableFile		 	
+ 
+   
+function getLevelRange(outFileName,outFileDate,dataStream,dataType,expVer,dataDay,dataHour,dataStep)
+
+ #Retrieve one model level
+ f=retrieve(
+  stream : dataStream,
+  type : dataType,
+  expver : expVer,
+  date : dataDay,
+  time : dataHour,
+  step : dataStep,
+  param : "lnsp",
+  levtype : "ml",
+  levelist : 1,
+  grid : [1.5/1.5]
+  )
+
+  #Number of levels
+  pv=grib_get_double_array(f,"pv")
+  nLev=count(pv)/2-1
+
+  if TOP_LEVEL_UNITS = "ML" then
+     return [TOP_LEVEL,nLev]
+   
+  #Find the topmost model level with larger pressure values than the TOP_LEVEL pressure
+  else 
+
+     ac=vector(nLev+1)
+     bc=vector(nLev+1)
+
+     for i=1 to nLev+1 do
+	ac[i]=pv[i]
+	bc[i]=pv[nLev+1+i]
+     end for
+
+     pres_min=exp(minvalue(f));
+
+     for i=1 to nLev do
+        if ac[i]+bc[i]*pres_min	> TOP_LEVEL*100 then
+              return [i,nLev]
+        end if
+     end for
+   end if
+end getLevelRange
+
+
+function getLevelNum(f:fieldset)  
+  pv=grib_get_double_array(f,"pv")
+  return count(pv)/2-1	
+end getLevelNum
+
+function compareExpver(v,vGrib)
+
+  n=number(v)
+  if n <> 0 then
+      if n < 10 then
+           v="000" & v
+      else if n < 100 then
+           v="00" & v
+      else if n < 1000 then
+           v="000" & v
+      end if
+  end if
+
+  if v = vGrib then
+       return 0
+  else 
+       return 1
+  end if
+
+end compareExpver
diff --git a/scripts/mv_flextra_run b/scripts/mv_flextra_run
new file mode 100644
index 0000000..7eceaf1
--- /dev/null
+++ b/scripts/mv_flextra_run
@@ -0,0 +1,166 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# ---------------------------------------------------------
+# Script to run FLEXTRA from within Metview
+# ---------------------------------------------------------
+
+set -x
+
+print_err()
+{
+	echo ${text_ERR}  $* >> "${f_LOG}"
+} 
+
+text_ERR="Script `basename $0` FAILED> "
+
+#Get args
+
+if [ $# -ne 5 ] ; then
+    echo "Invalid number of arguments specified for script $0! (" $# " instead of 5)"
+    exit 1
+fi
+
+d_WORK=$1
+f_EXE=$2
+type_FLEXTRA=$3
+f_OUTPUT=$4
+f_LOG=$5
+
+#Define executable
+if [ "$f_EXE" = "_UNDEF_" ] ; then
+	exe_FLEXTRA=${MV_FLEXTRA_EXE}
+else
+	exe_FLEXTRA=${f_EXE}
+fi
+
+
+#-------------------------------
+# Go to working directory 
+#-------------------------------
+
+if [ ! -d $d_WORK ] ; then   
+   print_err "No working directory found: " $d_WORK
+   exit 1
+fi
+
+cd $d_WORK
+
+#-------------------------------
+# Checks
+#-------------------------------
+
+if [ $type_FLEXTRA != "NORMAL" -a $type_FLEXTRA != "CET" -a $type_FLEXTRA != "FLIGHT" ] ; then   
+   print_err "Invalid type specified:" $type_FLEXTRA
+   print_err "Type must be: NORMAL, CET or FLIGHT!"
+   exit 1
+fi
+
+if [ x$exe_FLEXTRA = "x" ] ; then   
+   print_err "No FLEXTRA executable is defined. Please define it via env variable MV_FLEXTRA_EXE."
+   exit 1
+fi
+
+if [ ! -f $exe_FLEXTRA ] ; then   
+   print_err "No FLEXTRA executable found: " $exe_FLEXTRA
+   exit 1
+fi
+
+if [ ! -x $exe_FLEXTRA ] ; then   
+   print_err "FLEXTRA executable cannot be run! Permission is missing. " $exe_FLEXTRA
+   exit 1
+fi
+
+#-------------------------------
+#Run flextra
+#-------------------------------
+
+$exe_FLEXTRA >${f_LOG} 2>&1 
+outCode=$?
+
+
+#-----------------------------------
+#  Check log
+#-----------------------------------
+
+if [ -f ${f_LOG} ] ; then
+  if [ `grep -c -i WARNING $f_LOG` -ne 0 ] ; then
+	outCode=255 
+  elif [ `grep -c -i ERROR $f_LOG` -ne 0 ] ; then
+	outCode=1
+  elif [ $outCode -ne 0 ] ; then
+	outCode=$outCode
+  fi  
+fi
+
+#-----------------------------------
+#  Concatenate the resulting files
+#-----------------------------------
+
+touch $f_OUTPUT
+resCnt=0
+
+if [ ${type_FLEXTRA} = "NORMAL" ] ; then
+
+   for f in `ls` ; do
+       if [ `echo $f | cut -c 1-3` = "TI_" ] ; then
+	   cat $f >> $f_OUTPUT
+           resCnt=$(($resCnt+1))
+       fi
+   done
+
+   for f in `ls` ; do
+       if [ `echo $f | cut -c 1-2` = "T_" ] ; then
+	   cat $f >> $f_OUTPUT
+           resCnt=$(($resCnt+1))
+       fi
+   done
+
+elif [ ${type_FLEXTRA} = "CET" ] ; then	
+	
+   for f in `ls` ; do
+       if [ `echo $f | cut -c 1-5` = "CETI_" ] ; then
+	   cat $f >> $f_OUTPUT
+           resCnt=$(($resCnt+1))
+       fi
+   done
+
+   for f in `ls` ; do
+       if [ `echo $f | cut -c 1-4` = "CET_" ] ; then
+	   cat $f >> $f_OUTPUT
+           resCnt=$(($resCnt+1))
+       fi
+   done
+
+elif [ ${type_FLEXTRA} = "FLIGHT" ] 	; then
+	
+   for f in `ls` ; do
+       if [ `echo $f | cut -c 1-8` = "FLIGHTI_" ] ; then
+	   cat $f >> $f_OUTPUT
+           resCnt=$(($resCnt+1))
+       fi
+   done
+
+   for f in `ls` ; do
+       if [ `echo $f | cut -c 1-7` = "FLIGHT_" ] ; then
+	   cat $f >> $f_OUTPUT
+           resCnt=$(($resCnt+1))
+       fi
+   done
+fi
+
+
+if [ $resCnt -gt 1 ] ; then
+	cat $resCnt  > "multipleRes"
+fi	 
+	
+exit $outCode
diff --git a/scripts/mv_grib_dump b/scripts/mv_grib_dump
new file mode 100755
index 0000000..611ed86
--- /dev/null
+++ b/scripts/mv_grib_dump
@@ -0,0 +1,42 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                 2007-10-10/vk
+#
+# This script is called by src/AppMod/examcback.cc. It extracts
+# one GRIB msg from input file and calls 'grib_dump' to examine
+# its metadata.
+
+#set -x
+
+GRIBFILE=$1
+OFFSET=$2
+LENGTH=$3
+
+
+echo " Extracted GRIB message: FIRST OCTET $OFFSET, LENGTH $LENGTH"
+
+TMPFILE=$METVIEW_TMPDIR/mv_grib_dump_tmp.A_$$
+TMPFILEB=$METVIEW_TMPDIR/mv_grib_dump_tmp.B_$$
+
+#-- why does 'tail' issue 'write error' with this:
+#tail --bytes=+$OFFSET $GRIBFILE | head --bytes=$LENGTH > $TMPFILE
+
+#-- no error msgs with these:
+tail -c +$OFFSET "$GRIBFILE" > $TMPFILEB
+head -c $LENGTH $TMPFILEB > $TMPFILE
+rm $TMPFILEB
+
+#-- 'grib_dump' is from 'grib_api' tool box
+$METVIEW_GRIB_DUMP -O $TMPFILE
+
+rm $TMPFILE
+
diff --git a/scripts/mv_mars_catalog.py b/scripts/mv_mars_catalog.py
new file mode 100755
index 0000000..7842f74
--- /dev/null
+++ b/scripts/mv_mars_catalog.py
@@ -0,0 +1,41 @@
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+
+# -*- coding: utf-8 -*-
+import json
+import sys
+from webmars import fetch
+#from beautify import beautify
+
+# MARS catalog is a tree and everything is a node. The abstraction
+# of that in our case is that everything is an instance of the class
+# PSimpleNode.
+
+# returns root node if fetch is called with no arguments
+a=sys.stdin.readlines()
+
+#print a
+
+path    = json.loads("\n".join(a))
+choices = {}
+tree    = []
+
+#print path
+#sys.exit(0)
+
+#def navigate(node):
+#    if node.has_kids():
+#       if node.name in path:
+#          value = path[node.name]
+#          tree.append([node.name, value])
+#          choices[node.name] = node.kids.keys()
+#          return navigate(fetch(node, value))
+#    return node
+
+
+output ={"axis":[], "tree":[], "choices":{}}
+fetch().navigate(path,output)
+#print fetch().kids.keys()
+print json.dumps(output, indent = 4)
diff --git a/scripts/mv_obstat b/scripts/mv_obstat
new file mode 100644
index 0000000..128f86d
--- /dev/null
+++ b/scripts/mv_obstat
@@ -0,0 +1,292 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+set -a
+set -x
+
+# ----------------------------------------------------------------
+# Script to run OBSTAT in a properly set environment.  
+#
+# OBSTAT = flexible ODB and BUFR feedback observation statistics 
+# and plot application. Can be run on your workstation or the
+# linux_cluster
+# -----------------------------------------------------------------
+
+# Include the control variables set via the Metview interface
+if [[ $# -ne 0 ]] ; then
+   . $1 
+fi
+
+
+FIRSTCYCLE=${FIRTSCYCLE:-"2010081512"}
+LASTCYCLE=${LASTCYCLE:-"2010081512"}
+
+# a 4-letter expver (e.g. 0001 for oper, 0028 for e-suite, 
+#  eixd for rd, ER40 for ERA-40)
+EXPVER1=${EXPVER1:-"0001"}   
+
+# rd, od, e4 or ei
+CLASS1=${CLASS1:-"od"}       
+
+# DA, DCDA or SCDA
+STREAM1=${STREAM1:-"DCDA"}  
+
+# Activate the three next lines to overlay plots for two experiments (optional)
+#EXPVER2=0029
+#CLASS2=od
+#STREAM2=DA
+
+# yes: generates generic statistics for all data present in the input database
+LALLDATA=${LALLDATA:-"no"}
+
+# yes: make obstat plot
+OBSTATPLOT=${OBSTATPLOT:-"yes"}
+      
+# yes: make varbc time series plot 
+VARBC_PARAMS=no  
+
+# yes: produce condition number plot 
+CONDITION_NUMBER=no 
+   
+# yes: produce one normalized high resolution grib for the whole period
+GEOGRIB_AVE_PERIOD=${GEOGRIB_AVE_PERIOD:-"yes"} 
+
+# yes: concatenate scat data for the whole period
+SCAT_PERIOD=${SCAT_PERIOD:-"yes"}  
+
+# yes: produce ascii for the production of data coverage maps
+LCOVERAGE=no       
+
+# yes: the fast mode obstat plot where the obstat statistics
+# files are retrieved from ecfs, i.e. without need to retrieve
+# and process feedback/ODB files. This restrict the statistics 
+# to the prepIFS/ops specified regions/instruments (not valid for gridded statistics)
+
+USE_ECFSLOG=${USE_ECFSLOG:-"no"}
+
+# yes: produce departure, varBC or condition number webplots;
+# no: only produce postscript files
+WEBPLOTS=no        
+
+# A3, A4 or EPS  (A4, A3: size of plot; 
+# EPS: one plot per page, suitable for publications)
+LAYOUT=A4
+
+# Default for short comment string for obstat plots (OBSTATPLOT=yes)
+COMMENT=${COMMENT:-""}
+if [[ x$COMMENT != x ]] ; then
+   if [[  x$EXPVER2 = x ]]  ; then
+       COMMENT="/$STREAM1 "
+   else
+       COMMENT="/$STREAM1 (black)  v. $EXPVER2/$STREAM2"
+   fi
+fi
+
+# Activate the line below to define your personal web folder name. Only relevant
+#  when WEBPLOTS=yes.
+#WEBNOTE='Operations 0001 '
+
+# -------------------------------------------------------------------------
+# Settings required for user specific obstat statistics recalculated from 
+# BUFR feedback or ODB-files, i.e. if USE_ECFSLOG='no'.
+# Also controls the observing system selection for time series plots
+#---------------------------------------------------------------------------
+
+# stat definition file
+STATDEF=${STATDEF:-"/home/mo/obstat/OBSTAT/stat.ref"}      
+#PARAMS="/home/mo/obstat/obstat/data/params.txt"
+#FLAGS="/home/mo/obstat/obstat/data/flags.txt"
+
+cluster=$( echo $HOST | cut -c1-3)
+if [[ $cluster = bee || $ARCH = rs6000 ]] ; then
+  # linux cluster or AIX server
+  mkdir $SCRATCH/OBSTATG
+  STOREDIR=${STOREDIR:-"$SCRATCH/OBSTAT_GRIB/"}           # directory for ODB and feedback files
+  EXEDIR=${EXEDIR:-"$SCRATCH/OBSTAT_GRIB/tmp_"}        # work directory with text and ps files
+else
+  # workstation
+  mkdir /tmp/OBSTAT_GRIB
+  STOREDIR=${STOREDIR:-"$SCRATCH/"}           # directory for ODB and feedback files
+  EXEDIR=${EXEDIR:-"$SCRATCH/tmp_"}
+fi
+GRIBDIR=${GRIBDIR:-"$SCRATCH/$EXPVER1"}              # GRIB storage directory
+
+# ODB storage directory
+ODBDIR=${ODBDIR:-"$SCRATCH/$EXPVER1"}              
+
+# put yes to calculate stats from ODB or BUFR feedback files (valid for ascii stats)
+STACALC=${STACALC:-"yes"}   
+
+# put yes to accumulate stat-files cycle by cycle (valid for ascii stats)
+STAACCUM=${STAACCUM:-"no"}    
+
+#  Determine which ODB or BUFR feedback files to extract, possibly a 
+#  subset of observation types, i.e. only conventional data
+
+# format of obs files : BUFR, ODB, USER
+OBSFORMAT=${OBSFORMAT:-"ODB"}    
+
+#USERDATA="$SCRATCH/data"        #Uncomment if OBSFORMAT=USE
+UPDSOFT=${UPDSOFT:-"true"}
+
+#------------------------------
+# Check obs format
+#------------------------------
+
+if [[ $OBSFORMAT = ODB ]] ; then
+
+  # Define ODB file type, i.e. CCMA, ECMA or ODBCMP
+  ODBFILETYPE=${ODBFILETYPE:-"ECMA"}
+
+  # yes: retrieve odb data from ecfs
+  # no:  assumes odb data to be available in $STOREDIR
+  RETRIEVEODB=${RETRIEVEODB:-"yes"}   
+
+  # List of ODB databases to process
+  if [[ $ODBFILETYPE = CCMA || $ODBFILETYPE = MONDB ]] ; then
+    # For CCMA data all data is in one ODB database, so the default is 
+    # datalist="oneodb". 
+    # For specialized tasks, i.e. field-of-view related statistics for TOVS data,
+    # the user must use datalist="tovs" which allows obstat use use an sql that
+    # extract TOVS specific items from the CCMA. Other specialized requests are 
+    # ahown as comments here below.
+
+    ##datalist="tovs"
+    ##datalist="reo3"
+    ##datalist="conv"
+    datalist="oneodb"
+  else
+    # Specify list of ODB databases to process
+    # Some examples are included as commnets below
+
+    ##datalist="conv satob scatt ssmi msu ssu amsua amsub hirs geos reo3 airs iasi gpsro tmi mhs ssmis amsre"
+    datalist="tmi"
+  fi
+
+
+elif [[ $OBSFORMAT = BUFR ]] ; then
+  # Specify list of BUFR feedback files to process
+  # Some examples are commented out below
+
+  ##datalist="fbconv fbscat fbssmi fbrad1c fbgeos fbtovs fbreo3 fbairs"
+  datalist="fbssmi"
+
+elif [[ $OBSFORMAT = USER ]] ; then
+
+  datalist="reo3"
+  DATA_INTERFACE="/home/mo/obstat/obstat/data/data_interface"
+
+else
+  echo "OBSFORMAT $OBSFORMAT is not implemented at ECMWF"
+  exit 1
+fi
+
+
+#---------------------------------------------------------------------------------
+# More specialized control switches that usually are kept at the default values
+# are specified below
+#----------------------------------------------------------------------------------
+
+# put yes (recommended) to avoid storing many ODB or BUFR feedback files
+FBKCLEAN=${FBKCLEAN:-"yes"}      
+
+# put yes to delete intermediate stat-files after merging
+STACLEAN=${STACLEAN:-"no"}       
+
+# put yes to generate a postscript plot
+STAPLOT=${STAPLOT:-"yes"}      
+
+
+#STATFILE=statbcbc.txt    #(optional) file to plot (STAPLOT=yes)
+                          # if statfile is not specified it writes stat$EXPVER.txt
+#STATFILE=$HOME/obstat/stat.ref
+
+# OVERFILE is used to do specialized comparison of two experiments (optional)
+# If both EXPVER1 and EXPVER2 are specified the user specified OVERFILE is not used.
+# OVERFILE="$STOREDIR/tmp$EXPVER2/stat$EXPVER2.txt" 
+
+#TSTEP=6   # Set timestep in hours between analyses. Typically 12 or 6.
+           # For fast mode options TSTEP must be at least equal to the 
+           # 3D-Var/4D-Var assimilation period.  This makes it possible do
+           # statistics in steps of e.g. 24 hours.
+# Select a NSEW box for obstat ODS file ASCII print out of observation statistics
+
+#ODSNORTH=49. 
+#ODSSOUTH=40.
+#ODSEAST=145. 
+#ODSWEST=138.  
+#ODSFLAGFILTER=5
+
+#--------------------------------------
+# Further control of plot layout
+#--------------------------------------
+
+# put yes to replace rms by std.dev
+STDEV=${STDEV:-"yes"} 
+         
+WHISKERS=yes         # put yes to get st.dev box and min/max whiskers on histogram plots
+FIXEDAXES=yes        # put yes to get fixed preselected axis limits on obstat plots
+PLOTBIAS=yes         # put yes to include bias correction curves on satellite data plots
+PLOTAISRBIAS=no      # put yes to include AIRS bias correction curves on AIRS data plots
+HUMMINLEV=70.        # limit TEMP humidity vertical scale to HUMMINLEV hPa
+
+
+
+
+# Use these to raise the print level of diagnostic output and possibly stop it early
+# verbosity level (0 to 5)
+IVERB=0             
+
+# if specified, number of bufr reads before stopping 
+#IMAXREAD=1000     
+
+# EMOS cycle used for BUFR tables and EMOS libraries
+EMOS_CYCLE=000360    
+
+# put yes to merge stat-files into one
+STAMERGE=${STAMERGE:-"yes"}  
+
+# put yes to gzip stat files to save space
+GZIPSTAT=no    
+
+# Default script directory, libraries and sql
+GRIB_API_VERSION=1.9.2; export GRIB_API_VERSION
+
+DATADIR=${DATADIR:-"/home/mo/obstat/OBSTAT/data"}
+
+LIBS="/home/mo/obstat/OBSTAT/lib/current/${ARCH}"
+
+GRIB_API_INCLUDE="-I/usr/local/lib/metaps/lib/grib_api/jasper/include -I/usr/local/lib/metaps/lib/grib_api/${GRIB_API_VERSION}/include"
+
+GRIB_API_LIB="-L/usr/local/lib/metaps/lib/grib_api/${GRIB_API_VERSION}/lib -lgrib_api_f90 -lgrib_api -L/usr/local/lib/metaps/lib/grib_api/jasper/lib -ljasper"
+
+OBSTAT_LIB="$LIBS/libobstat.a"
+
+
+#To speed up ploting it is possible to avoid relinking obstat executable(s)and
+# instead use the default(s) specified below.
+BINDIR="/home/mo/obstat/OBSTAT/bin/current/${ARCH}"
+if [[ $ARCH = linux ]] ; then
+  OBSTATPLOTEXE="$BINDIR/obstat_plot.x_linux"
+  TIMESERIESPLOTEXE="$BINDIR/obstat_timeseries.x_linux"
+  GEOPLOTEXE="$BINDIR/sat_geo_plot_linux"
+  SCATTERPLOTEXE="$BINDIR/sat_scat_plot_linux"
+  NORMALIZEGRIBEXE="$BINDIR/obstat_normalize_grib"
+  ADDGRIBEXE="$BINDIR/obstat_add_grib"
+  CONSCATEXE="$BINDIR/obstat_normalize_scat"
+fi
+
+#----------------------------------------
+# Perform obstat in fast or slow mode
+#----------------------------------------
+$DATADIR/obstat_interface
+
diff --git a/scripts/mv_odbsql b/scripts/mv_odbsql
new file mode 100755
index 0000000..88f6821
--- /dev/null
+++ b/scripts/mv_odbsql
@@ -0,0 +1,53 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# ---------------------------------------------------------
+# Script to run odbsql in a properly set ODB environment.
+# ---------------------------------------------------------
+
+# set up the environment
+
+if [ $# -eq 0 ] ; then
+    exit 1
+fi
+
+if [ "x$MV_ODB1_VERSION" = x ] ; then
+    echo "MV_ODB1_VERSION not set - please ask your Metview installer."
+    exit 1
+fi
+
+
+if [ "x$ODB_ROOT" = x ]  # ODB-1 is not set up?
+then
+
+    ODB_VERSION=$MV_ODB1_VERSION    # call the setup script
+    . $MV_ODB1_USE_SCRIPT           # call the setup script
+
+else  # ODB-1 is set up - is it the right version?
+
+    if [ "x$ODB_VERSION" != "x$MV_ODB1_VERSION" -a "x$ODB_VERSION" != "xANY" ]
+    then
+        if [ "x$ODB_VERSION" != "xANY" ]
+        then
+            ODB_VERSION=$MV_ODB1_VERSION    # call the setup script
+            . $MV_ODB1_USE_SCRIPT           # call the setup script
+        fi
+    fi
+fi
+
+
+
+set -x
+
+odbsql "$@"
+
+return  $?
diff --git a/scripts/mv_odbsql2 b/scripts/mv_odbsql2
new file mode 100644
index 0000000..6b2638a
--- /dev/null
+++ b/scripts/mv_odbsql2
@@ -0,0 +1,53 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# ---------------------------------------------------------
+# Script to run odbsql2 in a properly set ODB environment.
+# ---------------------------------------------------------
+
+# set up the environment
+
+if [ $# -eq 0 ] ; then
+    exit 1
+fi
+
+if [ "x$MV_ODB1_VERSION" = x ] ; then
+    echo "MV_ODB1_VERSION not set - please ask your Metview installer."
+    exit 1
+fi
+
+
+if [ "x$ODB_ROOT" = x ]  # ODB-1 is not set up?
+then
+
+    ODB_VERSION=$MV_ODB1_VERSION    # call the setup script
+    . $MV_ODB1_USE_SCRIPT           # call the setup script
+
+else  # ODB-1 is set up - is it the right version?
+
+    if [ "x$ODB_VERSION" != "x$MV_ODB1_VERSION" -a "x$ODB_VERSION" != "xANY" ]
+    then
+        if [ "x$ODB_VERSION" != "xANY" ]
+        then
+            ODB_VERSION=$MV_ODB1_VERSION    # call the setup script
+            . $MV_ODB1_USE_SCRIPT           # call the setup script
+        fi
+    fi
+fi
+
+
+
+set -x
+
+odbsql2 "$@"
+
+return  $?
diff --git a/scripts/mv_scm_run b/scripts/mv_scm_run
new file mode 100644
index 0000000..e8e5044
--- /dev/null
+++ b/scripts/mv_scm_run
@@ -0,0 +1,193 @@
+#!/bin/sh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2013 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# ---------------------------------------------------------
+# Script to run SCM from within Metview
+# ---------------------------------------------------------
+
+set -x
+
+print_err()
+{
+	echo ${text_ERR}  $* >> "${f_LOG}"
+} 
+
+text_ERR="Script `basename $0` FAILED> "
+
+#Get args
+if [ $# -ne 9 ] ; then
+    echo "Invalid number of arguments specified for script $0 ! (" $# " instead of 9)"
+    exit 1
+fi
+
+d_WORK=$1
+f_EXE=$2
+NLEV=$3
+f_INPUT=$4
+f_NAMELIST=$5
+f_VTABLE=$6
+d_RCLIM=$7
+f_LOG=$8
+f_RES=$9
+
+if [ "$f_EXE" = "_UNDEF_" ] ; then
+	exe_SCM=${MV_SCM_EXE}
+else
+	exe_SCM=${f_EXE}
+fi
+
+#-------------------------------
+# Go to working directory 
+#-------------------------------
+
+if [ ! -d "$d_WORK" ] ; then   
+   print_err "No working directory found: " $d_WORK
+   exit 1
+fi
+
+cd $d_WORK
+
+#-------------------------------
+# Checks
+#-------------------------------
+
+if [ x"$exe_SCM" = "x" ] ; then   
+   print_err "No SCM executable is defined. Please define it via env variable MV_SCM_EXE."
+   exit 1
+fi
+
+if [ ! -f "$exe_SCM" ] ; then   
+   print_err "No SCM executable found: " $exe_SCM
+   exit 1
+fi
+
+if [ ! -x "$exe_SCM" ] ; then   
+   print_err "SCM executable cannot be run! Permission is missing. " $exe_SCM 
+   exit 1
+fi
+
+if [ ! -f "$f_INPUT" ] ; then   
+   print_err "No SCM input profile file is found: " $f_INPUT
+   exit 1
+fi
+
+if [ ! -r "$f_INPUT" ] ; then   
+   print_err "SCM input profile file cannot be read! Permission is missing. " $f_INPUT
+   exit 1
+fi
+
+if [ ! -f "$f_NAMELIST" ] ; then   
+   print_err  "No SCM namelist file is found: " $f_NAMELIST
+   exit 1
+fi
+
+if [ ! -r "$f_NAMELIST" ] ; then   
+   print_err "SCM namelist file cannot be read! Permission is missing. " $f_NAMELIST
+   exit 1
+fi
+
+if [ "$f_VTABLE" = "_UNDEF_" ] ; then
+	f_VTABLE=${METVIEW_DIR_SHARE}/etc/ifsdata/vtable_L${NLEV}
+fi
+
+if [  ! -f "$f_VTABLE" ] ; then   
+  	print_err "No SCM vtable file is found: " $f_VTABLE
+   	exit 1
+fi
+
+if [ ! -r "$f_VTABLE" ] ; then   
+   	print_err "SCM vtable file cannot be read! Permission is missing. " $f_VTABLE
+   	exit 1
+fi
+
+if [ "$d_RCLIM" = "_UNDEF_" ] ; then
+	d_RCLIM=${METVIEW_DIR_SHARE}/etc/ifsdata
+fi
+
+if [  ! -d "$d_RCLIM" ] ; then   
+  	print_err "No directory of SCM climatology data is found: " $d_RCLIM
+   	exit 1
+fi
+
+if [ ! -r "$d_RCLIM" ] ; then   
+   	print_err "Directory of SCM climatology data cannot be read! Permission is missing. " $d_RCLIM
+   	exit 1
+fi
+
+#-------------------------------
+# Prepare input profile
+#-------------------------------
+
+ln -sf "${f_INPUT}" scm_in.nc
+
+#-------------------------------
+# Prepare namelist
+#-------------------------------
+
+ln -sf "${f_NAMELIST}" namelist
+ln -fs "${f_VTABLE}"  vtable
+cpp -P -Dnew_NFLEVG=${NLEV} -Dnew_NCEXTR=${NLEV} namelist > fort.4
+
+#-------------------------------
+# Prepare climatology data
+#-------------------------------
+
+for cf in `ls "$d_RCLIM"` ; do
+	f_cf="${d_RCLIM}"/$cf
+	if [ -r "${f_cf}" -a x`echo $cf | cut -c 1-8` != x"vtable_L" ] ; then
+		ln -sf  "${f_cf}" .
+	fi
+done  
+
+#-------------------------------
+#Run SCM
+#-------------------------------
+
+$exe_SCM > "${f_LOG}" 2>&1 
+outCode=$?
+
+#-----------------------------------
+#  Check log
+#-----------------------------------
+
+if [ -f "${f_LOG}" ] ; then
+  if [ `grep -c -i WARNING "$f_LOG"` -ne 0 ] ; then
+	outCode=255 
+  elif [ `grep -c -i ERROR "$f_LOG"` -ne 0 ] ; then
+	outCode=1
+  elif [ $outCode -ne 0 ] ; then
+	outCode=$outCode
+  fi  
+fi
+
+#-----------------------------------
+#  Check results
+#-----------------------------------
+
+if [ ! -f progvar.nc ] ; then
+   print_err "SCM ouput file \"progvar.nc\" was not generated!"
+   exit 1	 
+fi
+
+if [ ! -f diagvar.nc ] ; then
+   print_err "SCM ouput file \"diagvar.nc\" was not generated!"
+   exit 1	 
+fi
+
+if [ ! -f diagvar2.nc ] ; then
+   print_err "SCM ouput file \"diagvar2.nc\" was not generated!"
+   exit 1	 
+fi
+
+cp -f progvar.nc "${f_RES}"
+
+exit $outCode
diff --git a/scripts/mv_scm_vis.mv b/scripts/mv_scm_vis.mv
new file mode 100644
index 0000000..f0fbf05
--- /dev/null
+++ b/scripts/mv_scm_vis.mv
@@ -0,0 +1,179 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2013 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+
+#---------------------------------------------------------------
+# Read arguments
+#---------------------------------------------------------------
+
+args=arguments()
+
+if count(args) = 0 then
+	fail("No arguments specified!")
+end if
+
+print("Arguments: ",args)
+
+plot_type          = args[1]
+nc_filename_1      = args[2]
+data_title_1       = args[3]
+compare            = args[4]
+nc_filename_2      = args[5]
+data_title_2       = args[6]
+comparison_mode    = args[7]
+var_selection_type = args[8]
+vars_1d            = args[9]
+vars_2d            = args[10]
+times              = args[11]
+output_mode        = args[12]
+output_file_path   = args[13]
+
+num_args = count(args)
+if num_args > 13 then
+    x_min_list   = args[14]
+    x_max_list   = args[15]
+    y_min_list   = args[16]
+    y_max_list   = args[17]
+    val_min_list = args[18]
+    val_max_list = args[19]
+    grid         = args[20]
+else
+    x_min_list = nil
+    grid       = 'off'
+end if
+
+
+if plot_type = 'TIME_HEIGHT_MATRIX' or plot_type = 'PROFILE' then
+    vars = vars_2d
+else
+    vars = vars_1d
+end if
+
+# convert into an actual list and convert to lowercase (ASSUME that all var names are lowercase!)
+vars = parse(lowercase(vars), ',')
+
+
+# convert the time list into an actual list
+times = parse(times, ',')
+
+
+
+# check whether we have any valid x/y/value/min/max lists
+xyminmax_def = ()
+
+if x_min_list <> nil then
+
+    # supplied on command-line, but could still be empty
+
+    xyminmax_def = add_xyminmax_to_def(xyminmax_def, 'x_min_list', x_min_list)
+    xyminmax_def = add_xyminmax_to_def(xyminmax_def, 'x_max_list', x_max_list)
+    xyminmax_def = add_xyminmax_to_def(xyminmax_def, 'y_min_list', y_min_list)
+    xyminmax_def = add_xyminmax_to_def(xyminmax_def, 'y_max_list', y_max_list)
+    xyminmax_def = add_xyminmax_to_def(xyminmax_def, 'value_min_list', val_min_list)
+    xyminmax_def = add_xyminmax_to_def(xyminmax_def, 'value_max_list', val_max_list)
+
+end if
+
+
+
+# force ps output if more than one variable to be plotted
+#if count(vars) > 1 then
+#    if output_mode = 'SCREEN' then
+#        print('Plotting multiple parameters: will generate a PostScript file')
+#        output_mode = 'POSTSCRIPT'
+#    end if
+#end if
+
+
+# remove .ps extension if needed
+if output_mode = 'POSTSCRIPT' then
+    len = length(output_file_path)
+    if len > 3 then
+        if substring(output_file_path,len-2,len) = '.ps' then
+            output_file_path = substring(output_file_path, 1, len-3)
+        end if
+    end if
+end if
+
+
+# 2nd netCDF file for comparison?
+if compare = 'ON' then
+    netcdf_2 = nc_filename_2
+else
+    netcdf_2 = nil
+end if
+
+
+# to make the mvl macro happy
+if comparison_mode = 'dummy' then
+    comparison_mode = 'overlay'
+end if
+
+if grid = 'dummy' then
+    grid = 'off'
+end if
+
+
+#---------------------------------------------------------------
+# Generate the plot
+#---------------------------------------------------------------
+
+
+# we supply a parameter definition with some preferences. If mode = interactive,
+# then a user interface will appear so that the user can make further selections;
+# otherwise the macro will run using only the arguments defined here (and will
+# produce a PostScript file).
+
+scm_plot_params = 
+(
+    mode            : 'batch',  # 'interactive' or 'batch'
+    plot_type       : lowercase(plot_type),
+    netcdf_1        : nc_filename_1, #'/var/tmp/cgi/bigdata/scm/scmfiles/scm_out.nc',
+    netcdf_2        : netcdf_2, #'scm_out_2.nc', # should be nil, or omit the parameter if no comparison file
+    title_1         : data_title_1, # to appear in the legend
+    title_2         : data_title_2, # to appear in the legend
+    comparison_mode : lowercase(comparison_mode),      # 'overlay' or 'difference'
+    output_mode     : lowercase(output_mode),          # 'postscript' or 'screen'
+    output_path     : output_file_path, #'/var/tmp/cgi/PERFORCE/metview_4/metview_maintenance/src/Scm/scm_out',      # only if mode='batch'. Do not supply an extension.
+    param_selection : 'list',         # 'list', 'file' or 'all'
+    param_list_path : nil,            # path to a text file containing each parameter name on a new line
+    param_list      : vars,    # if param_selection is 'list'
+    times           : times,
+    xyminmax_def,
+    grid            : grid
+    #param_list      : ['t_skin', 'top_lwrad_clr', 'u_wind_10m'] # if param_selection is 'list'
+    #param_list      : ['t', 'pot_temperature', 'q', 't_snow', 'sfc_sen_flx'] # if param_list_path not specified
+)
+
+
+mvl_plot_scm_data(scm_plot_params)
+
+
+stop(0)
+
+
+function add_xyminmax_to_def(def, par_name, xy)
+
+    if type(xy) = 'string' then
+        if xy = 'dummy' then
+            return def   # nothing supplied, don't alter the definition
+        else
+            lst = parse(xy, ',')
+            def[par_name] = lst
+        end if
+    else # must be a single number
+        def[par_name] = [xy]
+    end if
+
+    return def
+
+end add_xyminmax_to_def
diff --git a/scripts/mvrun b/scripts/mvrun
new file mode 100644
index 0000000..e3d51d6
--- /dev/null
+++ b/scripts/mvrun
@@ -0,0 +1,222 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                (vk Sep-95, rev 991011)
+#
+# This script was written only for ECMWF and it has not been
+# designed to be portable...
+#
+# Script executes a metview module and reports crashes by mail.
+# (within time this script has grown toooo looooooonnnngggggggg!)
+
+set +e
+Module=`basename $1`
+start_date=`date`
+running_bin="`ls -l $1 | cut -c43-`"
+send_mail=NO
+
+#-- execute module, with possible parameters
+if [ $METVIEW_LOG = no_log -o "$METVIEW_LOG" = "-" ]
+then
+  "$@"
+  SUCCESS_STATUS=$?
+else
+  MYLOG="$SCRATCH/$METVIEW_LOG.$Module.log"
+  echo "[mvrun info] process $$ starting `date` with cmd:" > $MYLOG
+  echo "[mvrun info] $@"                      >> $MYLOG
+  echo "[mvrun info] mode is $METVIEW_MODE\n" >> $MYLOG
+  "$@"                                        >> $MYLOG
+  SUCCESS_STATUS=$?
+  echo "\n[mvrun info] process $$ ended `date`" >> $MYLOG
+  echo "[mvrun info] process exit status was $SUCCESS_STATUS" >> $MYLOG
+fi
+
+st_sig=`expr $SUCCESS_STATUS / 128`
+st_signal=`expr $SUCCESS_STATUS % 128`
+#-- (x:y) were used when divided by 16, now [x:y] when div 128
+st_text="$SUCCESS_STATUS [$st_sig:$st_signal]"
+
+current_bin="`ls -l $1 | cut -c43-`"
+if [ "$running_bin" != "$current_bin" ]
+then
+  st_text="UPDATED!"
+fi
+
+MVUSERID=$USER
+[ "$MVUSERID" = "" ] && MVUSERID=$LOGNAME
+[ "$MVUSERID" = "" ] && MVUSERID="???"
+
+if [ $st_sig -ne 0 ]
+then
+  send_mail=YES
+  case $st_signal in
+    1)
+      send_mail=NO
+      ;;
+    2)
+      send_mail=NO
+      ;;
+    4)
+      st_reason="Illegal Instruction"
+      ;;
+    5)
+      st_reason="Trace/Breakpoint Trap"
+      ;;
+    6)
+      st_reason="Abort"
+      ;;
+    7)
+      st_reason="Emulation Trap"
+      ;;
+    8)
+      st_reason="Arithmetic Exception"
+      ;;
+    10)
+      st_reason="Bus Error"
+      ;;
+    11)
+      st_reason="Segmentation Fault"
+      ;;
+    12)
+      st_reason="Bad System Call"
+      ;;
+    *)
+      send_mail=NO
+      st_reason="(reason not decoded)"
+
+      MV_CRASH_LOG="/home/graphics/cgx/public/Metview_crashlog_nomail"
+      if [ ! -f $MV_CRASH_LOG ]
+      then
+        touch $MV_CRASH_LOG
+        chmod 666 $MV_CRASH_LOG
+        #-- give file to cgx (not to decrease users available disk quota) --
+        chown cgx $MV_CRASH_LOG
+      fi
+      #echo "`date -u '+%d.%m.%Y %R'`; $Module; `echo $METVIEW_MODE | cut -c1`; $st_text; $MVUSERID; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+      echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; `echo $METVIEW_MODE | cut -c1`; $st_text; $Module; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+      ;;
+  esac
+fi
+
+#-- do the hard work if really crashed
+if [ $send_mail = YES ]
+then
+  UserMsg=/tmp/crash_$$.$Module.UserMsg
+  MailMsg=/tmp/crash_$$.$Module.MailMsg
+  Person=`finger $LOGNAME | grep "name: $LOGNAME" | cut -f3 -d: | head -1`
+
+  #-- log into logfile --
+  MV_CRASH_LOG="/home/graphics/cgx/public/Metview_crashlog_`cat $METVIEW_DIR_SHARE/MvVersion`"
+  if [ ! -f $MV_CRASH_LOG ]
+  then
+    touch $MV_CRASH_LOG
+    chmod 666 $MV_CRASH_LOG
+    #-- give file to cgx (not to decrease users available disk quota) --
+    chown cgx $MV_CRASH_LOG
+  fi
+  #-- new crash file format 25.3.1998, add METVIEW_MODE first letter 6.8.1998 --
+  #echo "`date` $Module; $MVUSERID; `hostname`; $st_text; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+  #echo "`date -u '+%d.%m.%Y %R'`; $Module; `echo $METVIEW_MODE | cut -c1`; $st_text; $MVUSERID; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+  #-- 2000-08-18: make column widths more even i.e. constant width values first --
+  echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; `echo $METVIEW_MODE | cut -c1`; $st_text; $Module; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+
+  #-- inform user about crash and core --
+  echo "\nThis is an automatic message to Metview user $Person:" > $UserMsg
+  echo "a module '$Module' just crashed in your Metview session !">>$UserMsg
+
+  if [ "$running_bin" != "$current_bin" ]
+  then
+    echo "________\n\nTHIS CRASH WAS CAUSED BY A METVIEW UPDATE !!!!!" >> $UserMsg
+  fi
+  echo "________\n" >> $UserMsg
+
+  if [ -s core ]
+  then
+    echo "You have the following core file in your directory:" >> $UserMsg
+    ls -l core >> $UserMsg
+    file core >> $UserMsg
+    echo "________\n" >> $UserMsg
+    #-- ecquota is an ECMWF modification for HP servers --
+    ecquota -v >> $UserMsg
+  else
+    echo "No core file was produced or the core file is empty !" >> $UserMsg
+  fi
+  echo " " >> $UserMsg
+
+  if [ "$running_bin" = "$current_bin" ]
+  then
+   echo "+---------------------------------------------------------+">>$UserMsg
+   echo "|   If you have the power to crash Metview repeatedly,    |">>$UserMsg
+   echo "|  please inform Graphics Group how you manage to do it!  |">>$UserMsg
+   echo "+---------------------------------------------------------+">>$UserMsg
+   echo " " >> $UserMsg
+  fi 
+
+  [ -s core ] && echo "Check your disk quota" >> $UserMsg
+  echo "  M e t v i e w" >> $UserMsg
+
+  if [ $METVIEW_MODE = batch ]
+  then
+    /usr/bin/mail $MVUSERID < $UserMsg
+  else
+    xterm -title "Metview Crash Info" -bg gray -fg red4 -b 12 -e view $UserMsg &
+    #-- try to make sure window appears even when network is slow...
+    sleep 15
+  fi
+
+  #-- inform Metview group by mail --
+  echo "Subject: Metview $METVIEW_RELEASE: $Module crashed!" > $MailMsg
+  cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText >> $MailMsg
+  echo "\n$Module: $st_reason! (status=$SUCCESS_STATUS: code=$st_sig, signal=$st_signal)" >> $MailMsg
+  echo "User is $MVUSERID:$Person on `hostname` (informed)" >> $MailMsg
+
+  #-- phone number is an ECMWF command!!!
+  pn "\[$MVUSERID" >> $MailMsg
+
+  echo " " >> $MailMsg
+  echo "Started: $start_date" >> $MailMsg
+  echo "Crashed: `date`" >> $MailMsg
+  echo " " >> $MailMsg
+  echo "Crashed binary: $running_bin" >> $MailMsg
+  echo "Current binary: $current_bin" >> $MailMsg
+  if [ "$running_bin" != "$current_bin" ]
+  then
+    echo "\n!!!!!! CRASH DUE TO EXECUTABLE UPDATE !!!!!" >> $MailMsg
+  fi
+  echo " " >> $MailMsg
+
+  if [ -s core ]
+  then
+    CoreOk=`file core | grep $Module`
+    file core >> $MailMsg
+    echo "file etc.: `ls -l core | cut -c17-`" >> $MailMsg
+    echo "directory: `pwd`" >> $MailMsg
+    chmod 777 core
+
+    if [ "$CoreOk" != "" ]
+    then
+      #-- examine call stack, redirect & tee to catch crash reason
+      echo " " >> $MailMsg
+      echo "where;quit" | dbx $1 core 2>&1 | tee -a $MailMsg
+    else
+      echo "\nWrong core file !" >> $MailMsg
+    fi
+  else
+    echo "No core file or core file empty !" >> $MailMsg
+  fi
+
+  /usr/bin/mail $METVIEW_SUPPORT_MAIL < $MailMsg
+  #mail cgh < $MailMsg
+
+  rm -f $MailMsg
+  rm -f $UserMsg
+fi
+exit $SUCCESS_STATUS
diff --git a/scripts/mvrun_c b/scripts/mvrun_c
new file mode 100644
index 0000000..84530a1
--- /dev/null
+++ b/scripts/mvrun_c
@@ -0,0 +1,281 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                (vk Sep-95, rev 020904)
+#
+# This is a common version of SGI specific script 'mvrun' that
+# has been written only for ECMWF and it has not been
+# designed to be portable...
+#
+# Script executes a metview module and reports crashes by mail.
+# (within time this script has grown toooo looooooonnnngggggggg!)
+
+set +e
+Module=`basename $1`
+start_date=`date`
+running_bin="`ls -l $1 | cut -c43-`"
+send_mail=NO
+
+#-- these ok for sgimips & rs6000:
+MV_DBG=dbx
+MV_MAIL=/usr/bin/mail
+
+if [ X$ARCH = Xlinux ]
+then
+  MV_DBG=gdb
+  MV_MAIL=mail
+fi
+
+#-- execute module, with possible parameters
+if [ $METVIEW_LOG = no_log -o "$METVIEW_LOG" = "-" ]
+then
+  "$@"
+  SUCCESS_STATUS=$?
+else
+  if [ "$OS" = "hpcf" ]
+  then
+    MVLOGROOT="$TEMP"
+  else
+    MVLOGROOT="$SCRATCH"
+  fi
+  
+  MYLOG="$MVLOGROOT/$METVIEW_LOG.$Module.log"
+  echo "[mvrun_c info] process $$ starting `date` with cmd:" >| $MYLOG
+  echo "[mvrun info] $@"                    >> $MYLOG
+  echo "[mvrun info] MAG_HOME = $MAG_HOME"  >> $MYLOG
+  echo "[mvrun info] mode is $METVIEW_MODE" >> $MYLOG
+  echo " " >> $MYLOG
+
+  /usr/bin/time "$@"      2>&1 | tee -a $MYLOG > /dev/null
+  SUCCESS_STATUS=$?
+
+  echo " " >> $MYLOG
+  echo "[mvrun info] process $$ ended `date`" >> $MYLOG
+  echo "[mvrun info] process exit status was $SUCCESS_STATUS" >> $MYLOG
+
+  #-- if development macro log then no mail => exit
+  if [ X$METV_DEV = Xyes ]
+  then
+    exit $SUCCESS_STATUS
+  fi
+fi
+
+st_sig=`expr $SUCCESS_STATUS / 128`
+st_signal=`expr $SUCCESS_STATUS % 128`
+#-- (x:y) were used when divided by 16, now [x:y] when div 128
+st_text="$SUCCESS_STATUS [$st_sig:$st_signal]"
+
+current_bin="`ls -l $1 | cut -c43-`"
+if [ "$running_bin" != "$current_bin" ]
+then
+  st_text="UPDATED!"
+fi
+
+MVUSERID=$USER
+[ "$MVUSERID" = "" ] && MVUSERID=$LOGNAME
+[ "$MVUSERID" = "" ] && MVUSERID="???"
+
+if [ $st_sig -ne 0 ]
+then
+  send_mail=YES
+  case $st_signal in
+    1)
+      send_mail=NO
+      ;;
+    2)
+      send_mail=NO
+      ;;
+    4)
+      st_reason="Illegal Instruction"
+      ;;
+    5)
+      st_reason="Trace/Breakpoint Trap"
+      ;;
+    6)
+      st_reason="Abort"
+      ;;
+    7)
+      st_reason="Emulation Trap"
+      ;;
+    8)
+      st_reason="Arithmetic Exception"
+      ;;
+    10)
+      st_reason="Bus Error"
+      ;;
+    11)
+      st_reason="Segmentation Fault"
+      ;;
+    12)
+      st_reason="Bad System Call"
+      ;;
+    *)
+      send_mail=NO
+      st_reason="(reason not decoded)"
+
+      MV_CRASH_LOG="/home/graphics/cgx/public/Metview_crashlog_nomail"
+      if [ ! -f $MV_CRASH_LOG ]
+      then
+        touch $MV_CRASH_LOG
+        chmod 666 $MV_CRASH_LOG
+        #-- give file to cgx (not to decrease users available disk quota) --
+        chown cgx $MV_CRASH_LOG
+      fi
+      #echo "`date -u '+%d.%m.%Y %R'`; $Module; `echo $METVIEW_MODE | cut -c1`; $st_text; $MVUSERID; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+      echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; `echo $METVIEW_MODE | cut -c1`; $st_text; $Module; `hostname`; $METVIEW_VERSION_TITLE" >> $MV_CRASH_LOG
+      ;;
+  esac
+fi
+
+#-- is this a Graphics Section user id --#
+graph_uid=NO
+if [ X`echo $MVUSERID | cut -c 1-2` = Xcg ]
+then
+  graph_uid=YES
+fi
+
+#-- do the hard work if really crashed and not Graphics id
+if [ $send_mail = YES ]
+then
+  UserMsg=/tmp/crash_$$.$Module.UserMsg
+  MailMsg=/tmp/crash_$$.$Module.MailMsg
+  Person=`finger $LOGNAME | grep "name: $LOGNAME" | cut -f3 -d: | head -1`
+
+  #-- log into logfile --
+  MV_CRASH_LOG="/home/graphics/cgx/public/Metview_crashlog_`cat $METVIEW_DIR_SHARE/app-defaults/MvVersion`"
+  if [ ! -f $MV_CRASH_LOG ]
+  then
+    touch $MV_CRASH_LOG
+    chmod 666 $MV_CRASH_LOG
+    #-- give file to cgx (not to decrease users available disk quota) --
+    chown cgx $MV_CRASH_LOG
+  fi
+  #-- new crash file format 25.3.1998, add METVIEW_MODE first letter 6.8.1998 --
+  #-- 2000-08-18: make column widths more even i.e. constant width values first --
+  echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; `echo $METVIEW_MODE | cut -c1`; $st_text; $Module; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+
+  #-- inform user about crash and core --
+  echo " " >> $UserMsg
+  echo "This is an automatic message to Metview user $Person:"    > $UserMsg
+  echo "a module '$Module' just crashed in your Metview session !">>$UserMsg
+
+  if [ "$running_bin" != "$current_bin" ]
+  then
+    echo " " >> $UserMsg
+    echo " " >> $UserMsg
+    echo "________THIS CRASH WAS CAUSED BY A METVIEW UPDATE !!!!!" >> $UserMsg
+  fi
+  echo "________" >> $UserMsg
+  echo " " >> $UserMsg
+
+  if [ -s core ]
+  then
+    echo "You have the following core file in your directory:" >> $UserMsg
+    ls -l core >> $UserMsg
+    file core >> $UserMsg
+    echo "________" >> $UserMsg
+    echo " " >> $UserMsg
+    #-- ecquota is an ECMWF modification for HP servers --
+    ecquota -v >> $UserMsg
+  else
+    echo "No core file was produced or the core file is empty !" >> $UserMsg
+  fi
+  echo " " >> $UserMsg
+
+  if [ "$running_bin" = "$current_bin" ]
+  then
+   echo "    +------------------------------------------------------+">>$UserMsg
+   echo "    |      A Metview module has crashed unexpectedly!      |">>$UserMsg
+   echo "    |     Sorry for the trouble it may have caused you.    |">>$UserMsg
+   echo "    |                                                      |">>$UserMsg
+   echo "    | If this happens repeatedly then please contact us.   |">>$UserMsg
+   echo "    | We would be very happy to have a look at the problem |">>$UserMsg
+   echo "    | in order to fix it as soon as possible.              |">>$UserMsg
+   echo "    |                                                      |">>$UserMsg
+   echo "    |              Graphics Section, ECMWF                 |">>$UserMsg
+   echo "    +------------------------------------------------------+">>$UserMsg
+   echo " " >> $UserMsg
+  fi
+
+  [ -s core ] && echo "Check your disk quota" >> $UserMsg
+  echo "  M e t v i e w" >> $UserMsg
+
+  if [ $graph_uid = YES ]
+  then
+    echo " " >> $UserMsg
+    echo " ($MVUSERID is Graphics User Id => no email will be sent!)" >> $UserMsg
+  fi
+
+  if [ $METVIEW_MODE = batch ]
+  then
+    $MV_MAIL $MVUSERID < $UserMsg
+  else
+    xterm -title "Metview Crash Info" -bg gray -fg red4 -b 12 -e view $UserMsg &
+    #-- try to make sure window appears even when network is slow...
+    sleep 15
+  fi
+
+  #-- inform Metview group by mail --
+  SUBJ="Mv_$METVIEW_RELEASE-$Module-crash"
+  cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText >> $MailMsg
+  echo " " >> $MailMsg
+  echo "$Module: $st_reason! (status=$SUCCESS_STATUS: code=$st_sig, signal=$st_signal)" >> $MailMsg
+  echo "User is $MVUSERID:$Person on `hostname` (informed)" >> $MailMsg
+
+  #-- phone number is an ECMWF command!!!
+  pn "\[$MVUSERID" >> $MailMsg
+
+  echo " " >> $MailMsg
+  echo "Started: $start_date" >> $MailMsg
+  echo "Crashed: `date`" >> $MailMsg
+  echo " " >> $MailMsg
+  echo "Crashed binary: $running_bin" >> $MailMsg
+  echo "Current binary: $current_bin" >> $MailMsg
+  if [ "$running_bin" != "$current_bin" ]
+  then
+    echo " " >> $MailMsg
+    echo "!!!!!! CRASH DUE TO EXECUTABLE UPDATE !!!!!" >> $MailMsg
+  fi
+  echo " " >> $MailMsg
+
+  if [ -s core ]
+  then
+    CoreOk=`file core | grep $Module`
+    file core >> $MailMsg
+    echo "file etc.: `ls -l core | cut -c17-`" >> $MailMsg
+    echo "directory: `pwd`" >> $MailMsg
+    chmod 777 core
+
+    if [ "$CoreOk" != "" ]
+    then
+      #-- examine call stack, redirect & tee to catch crash reason
+      echo " " >> $MailMsg
+      echo "where;quit" | $MV_DBG $1 core 2>&1 | tee -a $MailMsg
+    else
+      echo " " >> $MailMsg
+      echo "Wrong core file !" >> $MailMsg
+    fi
+  else
+    echo "No core file or core file empty !" >> $MailMsg
+  fi
+
+  if [ $graph_uid = NO ]
+  then
+    #-- do not use full address 'name-at-ecmwf-dot-int'
+    METVIEW_SUPPORT_MAIL=${METVIEW_SUPPORT_MAIL:=metviewbugs}
+    $MV_MAIL -s $SUBJ $METVIEW_SUPPORT_MAIL < $MailMsg
+    # $MV_MAIL -s $SUBJ cgh < $MailMsg
+  fi
+
+  rm -f $MailMsg
+  rm -f $UserMsg
+fi
+exit $SUCCESS_STATUS
diff --git a/scripts/mvrun_lnx b/scripts/mvrun_lnx
new file mode 100644
index 0000000..370fbd4
--- /dev/null
+++ b/scripts/mvrun_lnx
@@ -0,0 +1,234 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                (vk Sep-95, rev 010207)
+#
+# This is a Linux version of a script 'mvrun' that
+# has been written only for ECMWF and it has not been
+# designed to be portable...
+#
+# Script executes a metview module and reports crashes by mail.
+# (within time this script has grown toooo looooooonnnngggggggg!)
+
+set +e
+Module=`basename $1`
+start_date=`date`
+running_bin="`ls -l $1 | cut -c43-`"
+send_mail=NO
+
+ECH="echo -e"
+GDB=gdb
+
+#-- execute module, with possible parameters
+if [ $METVIEW_LOG = no_log -o "$METVIEW_LOG" = "-" ]
+then
+  "$@"
+  SUCCESS_STATUS=$?
+else
+  MYLOG="$SCRATCH/$METVIEW_LOG.$Module.log"
+  echo "[mvrun info] process $$ starting `date` with cmd:" >| $MYLOG
+  echo "[mvrun info] $@"                      >> $MYLOG
+  echo "[mvrun info] MAG_HOME = $MAG_HOME"    >> $MYLOG
+  $ECH "[mvrun info] mode is $METVIEW_MODE\n" >> $MYLOG
+#  "$@"                                   2>&1 >> $MYLOG
+  "$@"                             2>&1 | tee -a $MYLOG > /dev/null
+  SUCCESS_STATUS=$?
+  $ECH "\n[mvrun info] process $$ ended `date`" >> $MYLOG
+  echo "[mvrun info] process exit status was $SUCCESS_STATUS" >> $MYLOG
+
+  #-- if development macro log then no mail => exit
+  if [ X$METV_DEV = Xyes ]
+  then
+    exit $SUCCESS_STATUS
+  fi
+fi
+
+st_sig=`expr $SUCCESS_STATUS / 128`
+st_signal=`expr $SUCCESS_STATUS % 128`
+#-- (x:y) were used when divided by 16, now [x:y] when div 128
+st_text="$SUCCESS_STATUS [$st_sig:$st_signal]"
+
+current_bin="`ls -l $1 | cut -c43-`"
+if [ "$running_bin" != "$current_bin" ]
+then
+  st_text="UPDATED!"
+fi
+
+MVUSERID=$USER
+[ "$MVUSERID" = "" ] && MVUSERID=$LOGNAME
+[ "$MVUSERID" = "" ] && MVUSERID="???"
+
+if [ $st_sig -ne 0 ]
+then
+  send_mail=YES
+  case $st_signal in
+    1)
+      send_mail=NO
+      ;;
+    2)
+      send_mail=NO
+      ;;
+    4)
+      st_reason="Illegal Instruction"
+      ;;
+    5)
+      st_reason="Trace/Breakpoint Trap"
+      ;;
+    6)
+      st_reason="Abort"
+      ;;
+    7)
+      st_reason="Emulation Trap"
+      ;;
+    8)
+      st_reason="Arithmetic Exception"
+      ;;
+    10)
+      st_reason="Bus Error"
+      ;;
+    11)
+      st_reason="Segmentation Fault"
+      ;;
+    12)
+      st_reason="Bad System Call"
+      ;;
+    *)
+      send_mail=NO
+      st_reason="(reason not decoded)"
+
+      MV_CRASH_LOG="/home/graphics/cgx/public/Metview_crashlog_nomail"
+      if [ ! -f $MV_CRASH_LOG ]
+      then
+        touch $MV_CRASH_LOG
+        chmod 666 $MV_CRASH_LOG
+        #-- give file to cgx (not to decrease users available disk quota) --
+        chown cgx $MV_CRASH_LOG
+      fi
+      #echo "`date -u '+%d.%m.%Y %R'`; $Module; `echo $METVIEW_MODE | cut -c1`; $st_text; $MVUSERID; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+      echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; `echo $METVIEW_MODE | cut -c1`; $st_text; $Module; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+      ;;
+  esac
+fi
+
+#-- do the hard work if really crashed
+if [ $send_mail = YES ]
+then
+  UserMsg=/tmp/crash_$$.$Module.UserMsg
+  MailMsg=/tmp/crash_$$.$Module.MailMsg
+  Person=`finger $LOGNAME | grep "name: $LOGNAME" | cut -f3 -d: | head -1`
+
+  #-- log into logfile --
+  MV_CRASH_LOG="/home/graphics/cgx/public/Metview_crashlog_`cat $METVIEW_DIR_SHARE/MvVersion`"
+  if [ ! -f $MV_CRASH_LOG ]
+  then
+    touch $MV_CRASH_LOG
+    chmod 666 $MV_CRASH_LOG
+    #-- give file to cgx (not to decrease users available disk quota) --
+    chown cgx $MV_CRASH_LOG
+  fi
+  #-- new crash file format 25.3.1998, add METVIEW_MODE first letter 6.8.1998 --
+  #echo "`date` $Module; $MVUSERID; `hostname`; $st_text; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+  #echo "`date -u '+%d.%m.%Y %R'`; $Module; `echo $METVIEW_MODE | cut -c1`; $st_text; $MVUSERID; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+  #-- 2000-08-18: make column widths more even i.e. constant width values first --
+  echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; `echo $METVIEW_MODE | cut -c1`; $st_text; $Module; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_CRASH_LOG
+
+  #-- inform user about crash and core --
+  $ECH "\nThis is an automatic message to Metview user $Person:" > $UserMsg
+  echo "a module '$Module' just crashed in your Metview session !">>$UserMsg
+
+  if [ "$running_bin" != "$current_bin" ]
+  then
+    $ECH "________\n\nTHIS CRASH WAS CAUSED BY A METVIEW UPDATE !!!!!" >> $UserMsg
+  fi
+  $ECH "________\n" >> $UserMsg
+
+  if [ -s core ]
+  then
+    echo "You have the following core file in your directory:" >> $UserMsg
+    ls -l core >> $UserMsg
+    file core >> $UserMsg
+    $ECH "________\n" >> $UserMsg
+    #-- ecquota is an ECMWF modification for HP servers --
+    ecquota -v >> $UserMsg
+  else
+    echo "No core file was produced or the core file is empty !" >> $UserMsg
+  fi
+  echo " " >> $UserMsg
+
+  if [ "$running_bin" = "$current_bin" ]
+  then
+   echo "+---------------------------------------------------------+">>$UserMsg
+   echo "|   If you have the power to crash Metview repeatedly,    |">>$UserMsg
+   echo "|  please inform Graphics Group how you manage to do it!  |">>$UserMsg
+   echo "+---------------------------------------------------------+">>$UserMsg
+   echo " " >> $UserMsg
+  fi 
+
+  [ -s core ] && echo "Check your disk quota" >> $UserMsg
+  echo "  M e t v i e w" >> $UserMsg
+
+  if [ $METVIEW_MODE = batch ]
+  then
+    /usr/bin/mail $MVUSERID < $UserMsg
+  else
+    xterm -title "Metview Crash Info" -bg gray -fg red4 -b 12 -e view $UserMsg &
+    #-- try to make sure window appears even when network is slow...
+    sleep 15
+  fi
+
+  #-- inform Metview group by mail --
+  SUBJ="Mv_$METVIEW_RELEASE-$Module-crash"
+  cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText >> $MailMsg
+  $ECH "\n$Module: $st_reason! (status=$SUCCESS_STATUS: code=$st_sig, signal=$st_signal)" >> $MailMsg
+  echo "User is $MVUSERID:$Person on `hostname` (informed)" >> $MailMsg
+
+  #-- phone number is an ECMWF command!!!
+  pn "\[$MVUSERID" >> $MailMsg
+
+  echo " " >> $MailMsg
+  echo "Started: $start_date" >> $MailMsg
+  echo "Crashed: `date`" >> $MailMsg
+  echo " " >> $MailMsg
+  echo "Crashed binary: $running_bin" >> $MailMsg
+  echo "Current binary: $current_bin" >> $MailMsg
+  if [ "$running_bin" != "$current_bin" ]
+  then
+    $ECH "\n!!!!!! CRASH DUE TO EXECUTABLE UPDATE !!!!!" >> $MailMsg
+  fi
+  echo " " >> $MailMsg
+
+  if [ -s core ]
+  then
+    CoreOk=`file core | grep $Module`
+    file core >> $MailMsg
+    echo "file etc.: `ls -l core | cut -c17-`" >> $MailMsg
+    echo "directory: `pwd`" >> $MailMsg
+    chmod 777 core
+
+    if [ "$CoreOk" != "" ]
+    then
+      #-- examine call stack, redirect & tee to catch crash reason
+      echo " " >> $MailMsg
+      echo "where;quit" | $GDB $1 core 2>&1 | tee -a $MailMsg
+    else
+      $ECH "\nWrong core file !" >> $MailMsg
+    fi
+  else
+    echo "No core file or core file empty !" >> $MailMsg
+  fi
+
+  mail -s $SUBJ $METVIEW_SUPPORT_MAIL < $MailMsg
+  #mail -s $SUBJ cgh < $MailMsg
+
+  rm -f $MailMsg
+  rm -f $UserMsg
+fi
+exit $SUCCESS_STATUS
diff --git a/scripts/mvusage b/scripts/mvusage
new file mode 100755
index 0000000..86cc1d3
--- /dev/null
+++ b/scripts/mvusage
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                    (vk 960620)
+#                                                   (rev 980807)
+# prints some statistics from Metview usage and crash log files
+# (log files produced by script 'mvrun').
+
+MVLOGDIR=/home/graphics/cgx/public
+
+VER=$1
+[ "$VER" = "" ] && VER=1.8B
+
+MVUSAGELOG=$MVLOGDIR/Metview_usage_$VER
+MVCRASHLOG=$MVLOGDIR/Metview_crashlog_$VER
+
+echo
+echo "Metview $VER usage:)"
+echo "--------------------"
+echo
+
+if [ ! -f $MVUSAGELOG ]
+then
+  echo " >>> File $MVUSAGELOG not found!"
+  echo
+  exit
+fi
+
+#-- first and last date (first field is data):
+echo "from: `head -1 $MVUSAGELOG | cut -d';' -f1`"
+echo "  to: `tail -1 $MVUSAGELOG | cut -d';' -f1`"
+
+echo
+echo "`cat $MVUSAGELOG | wc -l` usages (script start-ups) in total:"
+echo "`grep ' i;' $MVUSAGELOG | wc -l` interactive"
+echo "`grep ' b;' $MVUSAGELOG | wc -l` batch"
+echo
+
+#-- cut: extract user id (from second field)
+#-- sort discarding duplicates
+#-- count and print usage per users in columns
+USERS=`cat $MVUSAGELOG | cut -f2 -d';' | sort -u`
+for user in $USERS
+do
+  echo "`grep \" $user;\" $MVUSAGELOG | wc -l` $user"
+done | sort -k1rn -k2 | paste - - -
+
+#-- user count
+echo
+echo "`cat $MVUSAGELOG | cut -f2 -d';' | sort -u | wc -l` users in total"
+
+#-- grep discarding training ids
+echo "`cat $MVUSAGELOG | cut -f2 -d';' | sort -u | grep -v ' tr' | wc -l` when discarding training course ids"
+
+if [ ! -f $MVCRASHLOG ]
+then
+  echo
+  echo " >>> File $MVCRASHLOG not found!"
+  echo
+  exit
+fi
+
+echo
+echo "Metview $VER crashes:("
+echo "----------------------"
+
+#-- print crashes per modules
+#MODULES="`cat $MVCRASHLOG | cut -f3 -d: | cut -f4 -d' ' | sort -u | sed 's,;,,g' `"
+MODULES="`cat $MVCRASHLOG | cut -f2 -d';' | sort -u | sed 's,;,,g' `"
+for mod in $MODULES
+do
+  echo "`grep $mod $MVCRASHLOG | wc -l` for $mod"
+done
+
+#-- print total
+echo
+echo "`cat $MVCRASHLOG | wc -l` crashes in total"
diff --git a/scripts/set_mars_env b/scripts/set_mars_env
new file mode 100755
index 0000000..4f131dc
--- /dev/null
+++ b/scripts/set_mars_env
@@ -0,0 +1,68 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# -----------------------------------------
+# ECMWF extras for setting MARS environment
+# -----------------------------------------
+
+export METAPS=/usr/local/lib/metaps/mars_grib_api
+export MARS_HOME=$METAPS
+
+#-- for xtra safety --
+unset FDB_SERVER_HOST || true
+
+export MARS_AUTH_FILE=$METAPS/etc/mars.authentication
+export MARS_IBM_RULES=$METAPS/chk/ibm.chk
+
+#if [ $METV_DEV = no ]
+#then
+   export MARS_LANGUAGE_FILE=$METAPS/etc/mars.def
+   export MARS_TEST_FILE=$METAPS/chk/mars.chk
+#   export MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsDef
+#   export MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsRules
+#else
+#   export MARS_LANGUAGE_FILE=$METVIEW_DIR_SHARE/etc/MarsDef
+#   export MARS_TEST_FILE=$METVIEW_DIR_SHARE/etc/MarsRules
+
+#   MARSOLD_LANGUAGE_FILE=/usr/local/lib/metaps/etc/mars.def
+#   MARSOLD_TEST_FILE=/usr/local/lib/metaps/chk/mars.chk
+#fi
+
+export MARS_CFG_FILE=$METAPS/etc/mars.cfg
+export MARS_EMS_FILE=$METAPS/etc/ems_cache_prod
+export MARS_ACCOUNT_FILE=$METAPS/etc/account
+export MARS_DISSEMINATION_SCHEDULE_FILE=$METAPS/etc/mars.dissemination.schedule
+export MARS_EMS_ACCOUNTS_FILE=$METAPS/etc/ems_ecaccount_prod
+
+
+#-- for Lagrandian coeffiecient files --
+export PPDIR=${PPDIR=`$METAPS/bin/ppdir.sh`}
+
+#-- for MARS statistics --
+export STAT_PREFIX=metview
+. $METAPS/bin/marsstat.sh
+
+#-- MARS home directory for user --
+. $METAPS/bin/mars_user_home
+
+#-- how frequent MARS sends warning e-mails --
+export MARS_MAIL_FREQUENCY=${MARS_MAIL_FREQUENCY:=86400}
+
+export MARS_DHSBASE_CHECK=$METAPS/chk/dhs.chk
+
+#-- final solution from Manuel 000615/29 --
+. $METAPS/bin/mars.environment
+
+#-- Choose interpolation configuration (040913) --
+#-- -- moved inside 'mars.environment' (050308) --
+#-- config_interp=$($METAPS/bin/select_interpolation_mode)
+#-- CONFIG_INTERP=${CONFIG_INTERP:=$config_interp}
diff --git a/scripts/traj_log b/scripts/traj_log
new file mode 100755
index 0000000..5f506d9
--- /dev/null
+++ b/scripts/traj_log
@@ -0,0 +1,43 @@
+#!/bin/ksh
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#                                                             (vk may08)
+# Log Metview trajectory model usage...
+#
+
+#-- do not let this script crash the master script!
+set +e
+
+#-- log only at ECMWF and not on High Performance Computers
+if [ $WMO_SITE_NR = 098 -a $OS != hpcf ]
+then
+   #-- modify here the path to your own usage file
+   MV_TRAJ_LOG="/home/graphics/cgx/public/Metview_traj_log"
+
+   #-- first letter of runmode: 'i' or 'b'
+   MV_MODE=`echo $METVIEW_MODE | cut -c1`
+
+   if [ -f $MV_TRAJ_LOG ]
+   then
+      #-- try $USER first, if nothing then try $LOGNAME
+      MVUSERID=$USER
+      [ "$MVUSERID" = "" ] && MVUSERID=$LOGNAME
+      [ "$MVUSERID" = "" ] && MVUSERID="???"
+
+      #-- write a line into the log file
+      echo "`date -u '+%d.%m.%Y %R'`; $MVUSERID; $MV_MODE; `hostname`; `cat $METVIEW_DIR_SHARE/app-defaults/MvTitleBarVersionText`" >> $MV_TRAJ_LOG
+
+   else
+      echo "Trajectory statistics file not found: $MV_TRAJ_LOG"
+   fi
+fi
+
+set -e
diff --git a/share/metview/Makefile.am b/share/metview/Makefile.am
new file mode 100644
index 0000000..17afa4e
--- /dev/null
+++ b/share/metview/Makefile.am
@@ -0,0 +1,18 @@
+AUTOMAKE_OPTION = foreign
+
+sharedir		= $(datadir)/metview
+
+
+SUBDIRS	= app-defaults etc
+
+CLEANALL_CMD =
+
+if METVIEW_GUI
+SUBDIRS += icons
+CLEANALL_CMD += cd icons; $(MAKE) cleanall ; echo "MAKE CLEANALL > icons"
+endif
+
+# EXTRA_DIST = 
+
+cleanall:
+	${CLEANALL_CMD}
diff --git a/share/metview/Makefile.in b/share/metview/Makefile.in
new file mode 100644
index 0000000..782cab8
--- /dev/null
+++ b/share/metview/Makefile.in
@@ -0,0 +1,658 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ at METVIEW_GUI_TRUE@am__append_1 = icons
+ at METVIEW_GUI_TRUE@am__append_2 = cd icons; $(MAKE) cleanall ; echo "MAKE CLEANALL > icons"
+subdir = share/metview
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = app-defaults etc icons
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTION = foreign
+sharedir = $(datadir)/metview
+SUBDIRS = app-defaults etc $(am__append_1)
+CLEANALL_CMD = $(am__append_2)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu share/metview/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu share/metview/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
+
+# EXTRA_DIST = 
+
+cleanall:
+	${CLEANALL_CMD}
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/share/metview/app-defaults/BufrKeyProfile_all.xml b/share/metview/app-defaults/BufrKeyProfile_all.xml
new file mode 100644
index 0000000..7812d19
--- /dev/null
+++ b/share/metview/app-defaults/BufrKeyProfile_all.xml
@@ -0,0 +1,193 @@
+<MetviewKeyProfile type="BUFR">
+	<Profile name="Section 0">
+		<Key name="totalLength" shortName="L" desc="Total length of BUFR Message (Bytes)">
+			<Data dumpId="TOTAL LENGTH OF BUFR MESSAGE (BYTES)"/>
+			<Data section="0"/>
+		</Key>	
+		<Key name="editionNumber" shortName="E" desc="BUFR Edition Number">
+			<Data dumpId="BUFR EDITION NUMBER"/>
+			<Data section="0"/>
+		</Key>	
+	</Profile>	
+	<Profile name="Section 1">	
+		<Key name="masterTable" shortName="Di" desc="BUFR Master table (discipline) number">
+			<Data dumpId="BUFR MASTER TABLE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="masterTableVersion" shortName="Mv" desc="Master table version number">
+			<Data dumpId="VERSION NUMBER OF MASTER TABLE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="localTableVersion" shortName="Lv " desc="Local table version number">
+			<Data dumpId="VERSION NUMBER OF LOCAL TABLE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="updateSequence" shortName="Usn " desc="Update sequence number">
+			<Data dumpId="UPDATE SEQUENCE NUMBER"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="date" shortName="Date" desc="Date">
+			<Data section="1"/>
+		</Key>
+		<Key name="time" shortName="Time" desc="Time">
+			<Data section="1"/>
+		</Key>
+		<Key name="year" shortName="Year" desc="Year">
+			<Data dumpId="YEAR"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="month" shortName="Month" desc="Month">
+			<Data dumpId="MONTH"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="day" shortName="Day" desc="Day">
+			<Data dumpId="DAY"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="minute" shortName="Min" desc="Minute">
+			<Data dumpId="MINUTE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="messageType" shortName="Typ" desc="Message type">
+			<Data dumpId="BUFR MESSAGE TYPE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="messageSubType" shortName="Sut" desc="Message subtype">
+			<Data dumpId="BUFR MESSAGE SUBTYPE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="originatingCentre" shortName="C" desc="Originating centre">
+			<Data dumpId="ORIGINATING CENTRE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="originatingSubCentre" shortName="C" desc="Originating sub-centre">
+			<Data dumpId="ORIGINATING SUB-CENTRE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="hasSection2" shortName="2" desc="Indicates that message contains \nan optional local section 2">
+			<Data dumpId="FLAG (PRESENCE OF"/>
+			<Data section="1"/>
+		</Key>
+	</Profile>	
+	<Profile name="Section 2">		
+		<Key name="rdb:98" shortName="RDB" desc="Report database">
+			<Data dumpId="REPORT DATA BASE"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="rdbDataType:98" shortName="RDB Typ" desc="Report database type">
+			<Data dumpId="RDB DATA TYPE"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="rdbDataSubType:98" shortName="RDB Sut" desc="Report database subtype">
+			<Data dumpId="RDB DATA SUBTYPE"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="year:98" shortName="Year" desc="Year">
+			<Data dumpId="YEAR"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="month:98" shortName="Month" desc="Month">
+			<Data dumpId="MONTH"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="day:98" shortName="Day" desc="Day">
+			<Data dumpId="DAY"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="hour:98" shortName="Hour" desc="Hour">
+			<Data dumpId="HOUR"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="minute:98" shortName="Min" desc="Minute">
+			<Data dumpId="MINUTE"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>	
+		<Key name="second:98" shortName="Sec" desc="Second">
+			<Data dumpId="SECOND"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>			
+		<Key name="date:98" shortName="Date" desc="Date">
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="time:98" shortName="Time" desc="Time">
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="lat1:98" shortName="Lat1" desc="Latitude 1">
+			<Data dumpId="LATITUDE 1"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="lon1:98" shortName="Lon1" desc="Longitude 1">
+			<Data dumpId="LONGITUDE 1"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="ident:98" shortName="Ident" desc="Identifier">
+			<Data dumpId="IDENTIFIER"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="dayRdb:98" shortName="Day (RDB ins)" desc="Day (RDB insertion)">
+			<Data dumpId="DAY (RDB INSERTION)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="hourRdb:98" shortName="Hour (RDB ins)" desc="Hour (RDB insertion)">
+			<Data dumpId="HOUR (RDB INSERTION)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="minuteRdb:98" shortName="Min (RDB ins)" desc="Minute (RDB insertion)">
+			<Data dumpId="MINUTE (RDB INSERTION)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>			
+		<Key name="secondRdb:98" shortName="Sec (RDB ins)" desc="Second (RDB insertion)">
+			<Data dumpId="SECOND (RDB INSERTION)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>			
+		<Key name="dayMdb:98" shortName="Day (MDB arr)" desc="Day (MDB arrival)">
+			<Data dumpId="DAY (MDB ARRIVAL)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="hourMdb:98" shortName="Hour (MDB arr)" desc="Hour (MDB arrival)">
+			<Data dumpId="HOUR (MDB ARRIVAL)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="minuteMdb:98" shortName="Min (MDB arr)" desc="Minute (MDB arrival)">
+			<Data dumpId="MINUTE (MDB ARRIVAL)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>			
+		<Key name="secondMdb:98" shortName="Sec (MDB arr)" desc="Second (MDB arrival)">
+			<Data dumpId="SECOND (MDB ARRIVAL)"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>			
+		<Key name="quality:98" shortName="Quality" desc="Quality control % confidence">
+			<Data dumpId="QUALITY CONTROL % CONF"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>					
+	</Profile>	
+	<Profile name="Section 3">
+		<Key name="msgSubsetCount" shortName="Ssc" desc="Subset (observation) count">
+			<Data dumpId="NUMBER OF DATA SUBSETS"/>
+			<Data section="3"/>
+		</Key>
+	</Profile>
+</MetviewKeyProfile>
\ No newline at end of file
diff --git a/share/metview/app-defaults/BufrKeyProfile_default.xml b/share/metview/app-defaults/BufrKeyProfile_default.xml
new file mode 100644
index 0000000..b41ee39
--- /dev/null
+++ b/share/metview/app-defaults/BufrKeyProfile_default.xml
@@ -0,0 +1,42 @@
+<MetviewKeyProfile type="BUFR">
+	<Profile name="System::Default">
+		<Key name="MV_Index" shortName="Index" desc="Message index"/>
+		<Key name="messageType" shortName="Typ" desc="Message type">
+			<Data dumpId="BUFR MESSAGE TYPE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="messageSubType" shortName="Sut" desc="Message subtype">
+			<Data dumpId="BUFR MESSAGE SUBTYPE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="originatingCentre" shortName="C" desc="Originating centre">
+			<Data dumpId="ORIGINATING CENTRE"/>
+			<Data section="1"/>
+		</Key>
+		<Key name="msgSubsetCount" shortName="Ssc" desc="Subset (observation) count">
+			<Data dumpId="NUMBER OF DATA SUBSETS"/>
+			<Data section="3"/>
+		</Key>
+		<Key name="date" shortName="Date" desc="Date">
+			<Data section="1"/>
+		</Key>
+		<Key name="time" shortName="Time" desc="Time">
+			<Data section="1"/>
+		</Key>
+		<Key name="lat1:98" shortName="Lat1" desc="Latitude 1">
+			<Data dumpId="LATITUDE 1"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="lon1:98" shortName="Lon1" desc="Longitude 1">
+			<Data dumpId="LONGITUDE 1"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+		<Key name="ident:98" shortName="Ident" desc="Identifier">
+			<Data dumpId="IDENTIFIER"/>
+			<Data centre="98"/>
+			<Data section="2"/>
+		</Key>
+	</Profile>
+</MetviewKeyProfile>
\ No newline at end of file
diff --git a/share/metview/app-defaults/CommonMacroFuncs/.mvl_plot_scm_data_20121211_1015 b/share/metview/app-defaults/CommonMacroFuncs/.mvl_plot_scm_data_20121211_1015
new file mode 100644
index 0000000..e1f126e
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/.mvl_plot_scm_data_20121211_1015
@@ -0,0 +1,785 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_plot_scm_data
+#
+# Syntax        : mvl_plot_scm_data (definition)
+#
+# Author (date) : Iain Russell (05/12/2012)
+#
+# Category      : VISUAL
+#
+# OneLineDesc   : Creates plots interactively or in batch from SCM netCDF data
+#
+# Description   : Creates plots interactively or in batch from SCM netCDF data
+#
+# Parameters    : The input definition can contain some or all of the following
+#                 members. Note that it is valid to provide an empty definition,
+#                 in which case all input will be taken from the user interface.
+#                   mode - 'interactive' (user interface pops up) or 'batch'
+#                   netcdf_1 - path to the 'main' netCDF file
+#                   netcdf_2 - path to the 'comparison' netCDF file
+#                   comparison_mode - 'overlay' or 'difference'
+#                   output_mode - 'ps' or 'screen'
+#                   output_path - only if mode='batch'. Do not supply an extension.
+#                   param_selection - 'list', 'file' or 'all'
+#                   param_list_path - path to a text file containing each parameter name on a new line
+#                   param_list - if param_selection is 'list'
+#
+# Return Value  : None
+#
+# Dependencies  : None
+#
+# Example Usage : 
+#                 # default: pop up a user interface to get user input to the plot
+#                   scm_plot_params = ()
+#                   mvl_plot_scm_data(scm_plot_params)
+#
+#                 # batch usage: supply parameters here; no user interface
+#                   scm_plot_params = 
+#                   (
+#                       mode            : 'batch',
+#                       netcdf_1        : 'scm_out.nc',
+#                       netcdf_2        : 'scm_out_2.nc',
+#                       comparison_mode : 'overlay',
+#                       output_mode     : 'ps',
+#                       output_path     : 'scm_out',
+#                       param_selection : 'list',
+#                       param_list_path : nil,
+#                       param_list      : ['t_skin', 'top_lwrad_clr', 'u_wind_10m']
+#                   )
+#
+#                   mvl_plot_scm_data(scm_plot_params)
+#
+# **************************************************************************
+
+function mvl_plot_scm_data
+
+    args = ()
+
+    arglist = arguments()
+
+    if count(arglist) <> 0 then
+        args = arglist[1]
+    end if
+
+
+    # sanity check on the input arguments
+
+    if args.mode <> nil then
+        if args.mode <> 'interactive' and args.mode <> 'batch' then
+            fail("Argument 'mode' should be 'interactive' or 'batch'. It is ", args.mode)
+        end if
+    end if
+
+    if args.comparison_mode <> nil then
+        if args.comparison_mode <> 'overlay' and args.comparison_mode <> 'difference' then
+            fail("Argument 'comparison_mode' should be 'overlay' or 'difference'. It is ", args.comparison_mode)
+        end if
+    end if
+
+    if args.mode <> nil then
+        if args.output_mode <> 'ps' and args.output_mode <> 'screen' then
+            fail("Argument 'output_mode' should be 'ps' or 'screen'. It is ", args.output_mode)
+        end if
+    end if
+
+    if args.param_selection <> nil then
+        if args.param_selection <> 'list' and args.param_selection <> 'file' and args.param_selection <> 'all' then
+            fail("Argument 'param_selection' should be 'list', 'file' or 'all'. It is ", args.param_selection)
+        end if
+    end if
+
+
+    # fill in the argument definition with defaults if not specified
+
+    if args.mode = nil then
+        args.mode = 'interactive'
+    end if
+
+    if args.comparison_mode = nil then
+        args.comparison_mode = 'overlay'
+    end if
+
+    if args.param_selection = nil then
+        args.param_selection = 'list'
+    end if
+
+    if args.output_path = nil then
+        args.output_path = 'scm_out'
+    end if
+
+    if args.output_mode = nil then
+        args.output_mode = 'screen'
+    end if
+
+
+    
+    # make output_path into an absolute path
+
+    args.output_path = make_path_absolute(args.output_path)
+
+
+    # when running from the command line, we have to force certain options
+
+    if runmode() = 'batch' then
+        args.mode        = 'batch'
+        args.output_mode = 'ps'
+    end if
+
+
+    #print(args)
+
+
+    if args.mode = 'interactive' then
+
+        # ---------------- #
+        # interactive mode #
+        # ---------------- #
+
+
+        ui_comparison_mode = option_menu
+        (
+            name    : "comparison mode",
+            values  : ["overlay", "difference"],
+            default : args.comparison_mode
+        )
+
+        ui_netcdf_1 = icon
+        (
+            name  : "input data 1",
+            class : "NETCDF"
+        )
+
+        ui_netcdf_2 = icon
+        (
+            name  : "input data 2",
+            class : "NETCDF"
+        )
+
+        input = dialog([ui_comparison_mode, ui_netcdf_1, ui_netcdf_2])
+
+        compmode  = input['comparison mode']
+        netcdf_1  = input['input data 1']
+        netcdf_2  = input['input data 2']
+
+        if netcdf_1 = nil then
+            fail('Must supply at least one netCDF icon as input')
+        end if
+
+
+        # ------------------------------------------
+        # user dialog 3 - ask for the parameter(s)
+        # ------------------------------------------
+
+        # parse the parameters from the input netCDF file
+
+        vardef = parse_netcdf_vars(netcdf_1)
+
+        t = generate_vars_help(netcdf_1, vardef)
+
+        dialog_options = nil
+
+        ui_param_selection_mode = option_menu
+        (
+            name    : "parameter selection",
+            values  : ["list", "file", "all"],
+            default : args.param_selection
+        )
+
+        ui_param_list = any
+        (
+            name    : "parameter list",
+            default : 't',
+            help    : "help_script",
+            #help_script_command : "echo list of forward-slash-separated parameter names"
+            #help_script_command : "
+            help_script_command : "echo list of forward-slash-separated parameter names; cat " & t
+        )
+
+        ui_param_file = icon
+        (
+            name  : "parameter file",
+            class : "NOTE"
+        )
+
+        ui_param_output_mode = option_menu
+        (
+            name    : "output mode",
+            values  : ["screen", "ps"],
+            default : args.output_mode
+        )
+
+        outpath = args.output_path
+
+        ui_outpath = any
+        (
+            name    : "output file path",
+            default : outpath
+        )
+
+
+        input = dialog([ui_param_selection_mode, ui_param_list, ui_param_file, ui_param_output_mode, ui_outpath])
+
+        param_selection_mode = input["parameter selection"]
+
+        if param_selection_mode = 'list' then   # user provided an inline list of parameters
+            selected_vars = input['parameter list']
+
+        else if param_selection_mode = 'file' then # user gave a file with a list of parameters to plot
+            parmlist = input["parameter file"]
+
+            if parmlist <> nil then 
+                parmlistpath = parmlist.PATH
+            else
+                fail("Parameter selection was set to 'file', but no icon was supplied")
+            end if
+
+        else # put all the available variable indexes into a list - we will try to plot them all
+            selected_vars = vardef.vars
+        end if
+
+
+        outmode  = input["output mode"]
+        outpath  = input["output file path"]
+
+    else
+
+        # ---------- #
+        # batch mode #
+        # ---------- #
+
+        compmode = args.comparison_mode
+
+        netcdf_1_path = args.netcdf_1
+        if netcdf_1_path = nil then
+            fail('Must supply netcdf_1')
+        else
+            netcdf_1_path = make_path_absolute(netcdf_1_path)
+            netcdf_1 = read(netcdf_1_path)
+        end if
+
+        netcdf_2 = nil
+        netcdf_2_path = args.netcdf_2
+        if netcdf_2_path <> nil then
+            netcdf_2_path = make_path_absolute(netcdf_2_path)
+            netcdf_2 = read(netcdf_2_path)
+        end if
+
+
+        param_selection_mode = args.param_selection
+
+        if param_selection_mode = 'list' then   # user provided an inline list of parameters
+            selected_vars = args.param_list
+        else if param_selection_mode = 'file' then # user gave a file with a list of parameters to plot
+            parmlistpath = param_list_path
+        else # put all the available variable indexes into a list - we will try to plot them all
+            selected_vars = vars
+        end if
+
+        outmode = args.output_mode
+        outpath = args.output_path
+
+
+        # Read netcdf file
+        file_nc = netcdf_1
+
+
+        # parse the parameters from it
+        vardef = parse_netcdf_vars(file_nc)
+
+
+    end if # interactive or batch
+
+
+
+
+    # ----------------------------------------- #
+    # User input obtained, start the processing #
+    # ----------------------------------------- #
+
+
+    # read the list of parameters from a file?
+    if param_selection_mode = 'file' then
+        parmlistpath = parmlist.PATH
+        selected_vars = read(parmlistpath)
+    end if
+
+
+    # (hopefully temporary) mesaure: since we can't yet plot multiple parameters
+    # interactively, we will have to plot just the first one
+
+    if outmode = 'screen' then
+        if count(selected_vars) > 1 then
+            print('Can only plot 1 variable in interactive mode - will plot just the first one')
+            selected_vars = [selected_vars[1]]
+        end if
+    end if
+
+
+    # construct a list of variable indexes from their names
+    plot_var_indexes = nil
+    for i = 1 to count(selected_vars) do
+        index = find(vardef.vars, selected_vars[i])
+        if index = nil then
+            fail('Could not find variable ' & selected_vars[i] & ' in netCDF file')
+        else
+            plot_var_indexes = plot_var_indexes & [index]
+        end if
+    end for
+
+
+    print('Plotting parameters: ', selected_vars, ' ; indexes: ', plot_var_indexes)
+
+
+
+    if outmode = 'ps' then
+        print('Will generate output plot in ', outpath)
+        psfile = ps_output(output_name : outpath)
+        setoutput(psfile)
+    end if
+
+
+
+    # convert seconds to days
+    #setcurrent(file_nc, 4)
+    #file_nc = file_nc / (60*60*24)
+
+
+
+    # decide whether to plot both netCDF files in overlay mode, or to compute
+    # the difference and plot that by itself
+
+    nc_files = nil
+
+    if compmode = 'overlay' then
+        if netcdf_1 <> nil then nc_files = nc_files & [netcdf_1] end if
+        if netcdf_2 <> nil then nc_files = nc_files & [netcdf_2] end if
+    else
+        a = 1 # for syntax correctness
+        if netcdf_2 = nil then
+            fail('Must supply a second netCDF icon')
+        end if
+
+        #setcurrent(netcdf_1, i)
+        #setcurrent(netcdf_2, i)
+        nc_files = [netcdf_1]# - netcdf_2]
+    end if
+
+
+
+
+    graph_line_colours = ['blue', 'red']
+
+
+
+    for j = 1 to count(plot_var_indexes) do
+
+        i = plot_var_indexes[j]
+
+        if not(i in vardef.reserved_var_indexes) and i<>nil then
+
+            # -------------------------------------------
+            # plotting - gather plot info for each netCDF
+            # -------------------------------------------
+
+            to_plot  = nil
+            all_yvals = nil
+            plot_this_var = 0
+
+            for n = 1 to count(nc_files) do
+
+                file_nc = nc_files[n]
+
+                # look at this variable to see what its dimensions are
+                setcurrent(file_nc, i)
+                dim_names = dimension_names(file_nc)
+                print(i, tab, dim_names)
+                if count(dim_names) = 1 then
+                    xdim_name = dim_names[1]
+                        plot_this_var = 1
+
+                        if compmode = 'difference' then
+                            setcurrent(netcdf_2, i)
+                            file_nc = file_nc - netcdf_2
+                        end if
+
+
+                        # visualiser to plot the data
+                        line_plot = netcdf_visualiser
+                        (
+                            netcdf_plot_type      : "xy_points",
+                            netcdf_x_variable     : xdim_name,
+                            netcdf_y_variable     : vardef.vars[i],
+                            netcdf_value_variable : vardef.vars[i],
+                            netcdf_data           : file_nc
+                        )
+
+                        # visual definition to apply to the plot
+                        line_visdef = mgraph
+                        (
+                            legend            : 'on',
+                            graph_line_colour : graph_line_colours[n]
+                        )
+
+                        to_plot = to_plot & [line_plot, line_visdef]
+
+                        # we'll need to combine all the actual values for later
+                        all_yvals = all_yvals & values(file_nc)
+
+                    #else
+                        #print ('Variable ', vardef.vars[i], ' has BAD dims ', xdim_name)
+                    #end if
+
+                else  # 2D matrix plot
+
+                    a = 1 # for syntax
+
+                    if args.mode = 'batch' or  n = 1  or compmode = 'difference' then
+
+                        #xdim_index = find(vardef.reserved_var_sizes, dims[1])
+                        #if xdim_index <> nil then
+                            plot_this_var = 1
+                            xdim_name = dim_names[1] #vardef.reserved_var_names[xdim_index]
+                            ydim_name = dim_names[2] #vardef.reserved_var_names[ydim_index]
+                            ydim_idx = find(vardef.reserved_var_names, ydim_name)
+
+                            if ydim_idx <> nil then
+
+                                if compmode = 'difference' then
+                                    setcurrent(netcdf_2, i)
+                                    file_nc = file_nc - netcdf_2
+                                end if
+
+                                # visualiser to plot the data
+                                matrix_plot = netcdf_visualiser
+                                (
+                                    netcdf_plot_type      : "xy_matrix",
+                                    netcdf_x_variable     : xdim_name,
+                                    netcdf_y_variable     : ydim_name,
+                                    netcdf_value_variable : vardef.vars[i],
+                                    netcdf_data           : file_nc
+                                )
+
+                                # visual definition to apply to the plot
+                                shade = mcont
+                                (
+                                    legend                         : "on",
+                                    contour                        : "off",
+                                    contour_highlight              : "off",
+                                    contour_shade                  : "on",
+                                    contour_shade_method           : "area_fill",
+                                    contour_shade_max_level_colour : "red",
+                                    contour_shade_min_level_colour : "blue",
+                                    contour_shade_colour_direction : "clockwise",
+                                    contour_label                  : "off"
+                                )
+
+                                to_plot = to_plot & [matrix_plot, shade]
+
+                                # store the y values so we can later get a nice y-axis
+                                ydim_index = find(vardef.vars, ydim_name)
+                                setcurrent(file_nc, ydim_index)
+
+                                all_yvals = all_yvals & values(file_nc)
+
+                            else
+                                print ('Variable ', vardef.vars[i], ' has BAD dims ', ydim_name)
+                                plot_this_var = 0
+                            end if
+                        #else
+                        #    print ('Variable ', vardef.vars[i], ' has BAD dims ', xdim_name)
+                        #end if
+
+                    else
+
+                        print('Cannot (yet) overlay plots in interactive mode - not plotting ', vardef.vars[i])
+                        plot_this_var = 0
+
+                    end if # args.mode = 'batch', etc
+
+                end if  # 1D/2D
+
+            end for  # for each netCDF
+
+
+
+            if plot_this_var then
+
+
+                # ----------------------------------
+                # get information for the plot title
+                # ----------------------------------
+                setcurrent(file_nc, i)
+                attrs = attributes(file_nc)
+
+                gattrs         = global_attributes(file_nc)
+                att_title      = gattrs.title
+                att_start_day  = gattrs.start_day
+                att_start_hour = gattrs.start_hour
+
+                title_line_1 = att_title
+                title_line_2 = 'Start day: ' & att_start_day & ' Start hour: ' & att_start_hour
+                title_line_3 = ''
+                if attrs.long_name <> nil then
+                    title_line_3 = title_line_3 & attrs.long_name
+                end if
+                if attrs.units <> nil then
+                    title_line_3 = title_line_3 & ' (' & attrs.units & ')'
+                end if
+                if compmode = 'difference' then
+                    title_line_3 = title_line_3 & ' [difference]'
+                end if
+
+                title = mtext
+                (
+                    text_line_count : 3,
+                    text_line_1     : title_line_1,
+                    text_line_2     : title_line_2,
+                    text_line_3     : title_line_3,
+                    text_font_size  : 0.35
+                )
+
+
+
+                # ------------------------------
+                # get information for the x-axis
+                # ------------------------------
+
+                xdim_index = find(vardef.vars, xdim_name)
+                setcurrent(file_nc, xdim_index)
+                attrs   = attributes(file_nc)
+                x_name  = xdim_name
+                x_units = attrs.units
+                if x_units = nil then
+                    x_units_text = ''
+                else
+                    x_units_text = ' (' & x_units & ')'
+                end if
+                x_axis_title = x_name & x_units_text
+
+
+
+                # ------------------------------
+                # get information for the y-axis
+                # ------------------------------
+
+                # figure out the 'global' min/max for all data files
+                ymin = minvalue(all_yvals)
+                ymax = maxvalue(all_yvals)
+
+                if count(dim_names) = 1 then
+                    adjustment = 0.1 * (ymax - ymin)  # leave a 10% gap around the y limits
+                    if ymin <> 0 then ymin = ymin - adjustment end if
+                    ymax = ymax + adjustment
+
+                    if ymin = ymax then
+                        ymin = ymin - 1
+                        ymax = ymax + 1
+                    end if
+                else
+                    temp = ymin   # matrixc plot - turn the y-axis upside-down
+                    ymin = ymax
+                    ymax = temp
+                end if
+
+
+                if count(dim_names) = 1 then
+                    # define the legend
+                    legend_curves = mlegend
+                    (
+                        legend_display_type     : "disjoint",
+                        legend_text_composition : "user_text_only",
+                        legend_text_font_size   : 0.3,
+                        legend_user_lines       : ['expt 1', 'expt 2']
+                    )
+                    to_plot = to_plot & [legend_curves]
+                end if
+
+                # -----------
+                # do the plot
+                # -----------
+
+                dw = scm_build_layout(ymin, ymax, x_axis_title)
+                plot(dw, to_plot, title)
+                newpage(dw)
+
+            end if  # plot_this_var
+
+        end if #if not(i in reserved_var_indexes)
+    end for  
+
+
+
+    function scm_get_var_sizes (nc: netcdf, all_vars: list, vars: list)
+
+        sizes = nil
+
+        for i = 1 to count(vars) do
+            index = find(all_vars, vars[i])
+            setcurrent(nc, index)
+            dims = dimensions(nc)
+            sizes = sizes & [dims[1]]
+        end for
+
+        return sizes
+
+    end scm_get_var_sizes
+
+
+    function scm_build_layout(ymin, ymax, xtitle)
+
+
+        horizontal_axis = maxis
+        (
+            axis_title_text : xtitle
+        )
+
+
+        # view & page definition
+        cview = cartesianview
+        (  
+            x_automatic  : 'on',
+            #y_automatic  : 'on'
+            y_min : ymin,
+            y_max : ymax,
+            horizontal_axis : horizontal_axis
+            #vertical_axis  : vertical_axis
+        )
+
+        page = plot_page
+        (  
+            view   : cview
+        )  
+
+        # superpage definition 
+        display_window = plot_superpage
+        (  
+            layout_size         : "a4", 
+            layout_orientation  : "landscape", 
+            custom_width        : 29.0, 
+            custom_height       : 21.0, 
+            pages               : [ page ] 
+         ) 
+
+        return display_window
+
+    end scm_build_layout
+
+
+
+    function make_path_absolute(path: string)
+
+        first_char = substring(path, 1, 1)
+        if first_char <> '/' then
+            path = getenv('PWD') & "/" & path
+        end if
+        return path
+
+    end make_path_absolute
+
+
+    function parse_netcdf_vars(nc: netcdf)
+
+        def = ()  # we will returns a definition will various bits of information
+
+        # get the list of variables in the file
+        def.vars = variables(nc)
+
+
+        # get the lists of 'special' variables
+        nlev_var_index   = find(def.vars, 'nlev')
+        nlevp1_var_index = find(def.vars, 'nlevp1')
+        nlevs_var_index  = find(def.vars, 'nlevs')
+        time_var_index   = find(def.vars, 'time')
+
+        if (nlev_var_index = nil or nlevp1_var_index = nil or nlevs_var_index = nil or time_var_index = nil) then
+            fail ('ERROR: Expected to find nlev, nlevp1, nlevs and time variables in netCDF file ', nc_filename)
+        end if
+
+
+        def.reserved_var_indexes = [nlev_var_index, nlevp1_var_index, nlevs_var_index, time_var_index]
+        def.reserved_var_names   = ['nlev', 'nlevp1', 'nlevs', 'time']
+        def.reserved_var_sizes   = scm_get_var_sizes (nc, def.vars, def.reserved_var_names)
+
+
+        # store their names to be used on the y-axis
+        reserved_var_long_names = nil
+        for j = 1 to count(def.reserved_var_indexes) do
+            idx = def.reserved_var_indexes[j]
+            setcurrent(nc, idx)
+            attrs = attributes(nc)
+            reserved_var_long_names = reserved_var_long_names & [attrs.long_name]
+        end for
+
+        def.reserved_var_long_names = reserved_var_long_names
+
+
+        return def
+
+    end parse_netcdf_vars
+
+
+
+
+    function generate_vars_help(nc: netcdf, def: definition)
+
+
+        # parse the file to get the lists of available 1 and 2d variables
+
+        vars_1d = nil
+        vars_2d = nil
+        for i = 1 to count(def.vars) do
+            #print(i, tab, def.vars[i])
+            if not(i in def.reserved_var_indexes) then
+                setcurrent(nc, i)
+                dims = dimensions(nc)
+                if count(dims) = 1 then
+                    vars_1d = vars_1d & [def.vars[i]]
+                else if count(dims) = 2 then
+                    #if dims[2] = 91 then
+                       vars_2d = vars_2d & [def.vars[i]]
+                    #end if
+                end if
+            end if
+        end for
+
+        vars_1d = vars_1d
+        vars_2d = vars_2d
+
+
+        t = tmpfile()
+        f = file(t)
+
+        write(f, "1D variables", newline)
+        write(f, "------------", newline)
+        for i = 1 to count(vars_1d) do
+            write(f, vars_1d[i], newline)
+        end for
+
+        write(f, newline)
+        write(f, "2D variables", newline)
+        write(f, "------------", newline)
+        for i = 1 to count(vars_2d) do
+            write(f, vars_2d[i], newline)
+        end for
+
+
+        f = 0
+
+        return t
+    end generate_vars_help
+
+
+
+end mvl_plot_scm_data
+
diff --git a/share/metview/app-defaults/CommonMacroFuncs/.mvl_plot_scm_data_20130121_1343 b/share/metview/app-defaults/CommonMacroFuncs/.mvl_plot_scm_data_20130121_1343
new file mode 100644
index 0000000..46e69dd
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/.mvl_plot_scm_data_20130121_1343
@@ -0,0 +1,921 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_plot_scm_data
+#
+# Syntax        : mvl_plot_scm_data (definition)
+#
+# Author (date) : Iain Russell (05/12/2012)
+#
+# Category      : VISUAL
+#
+# OneLineDesc   : Creates plots interactively or in batch from SCM netCDF data
+#
+# Description   : Creates plots interactively or in batch from SCM netCDF data
+#
+# Parameters    : The input definition can contain some or all of the following
+#                 members. Note that it is valid to provide an empty definition,
+#                 in which case all input will be taken from the user interface.
+#                   mode - 'interactive' (user interface pops up) or 'batch'
+#                   netcdf_1 - path to the 'main' netCDF file
+#                   netcdf_2 - path to the 'comparison' netCDF file
+#                   comparison_mode - 'overlay' or 'difference'
+#                   output_mode - 'postscript' or 'screen'
+#                   output_path - only if mode='batch'. Do not supply an extension.
+#                   param_selection - 'list', 'file' or 'all'
+#                   param_list_path - path to a text file containing each parameter name on a new line
+#                   param_list - if param_selection is 'list'
+#
+# Return Value  : None
+#
+# Dependencies  : None
+#
+# Example Usage : 
+#                 # default: pop up a user interface to get user input to the plot
+#                   scm_plot_params = ()
+#                   mvl_plot_scm_data(scm_plot_params)
+#
+#                 # batch usage: supply parameters here; no user interface
+#                   scm_plot_params = 
+#                   (
+#                       mode            : 'batch',
+#                       netcdf_1        : 'scm_out.nc',
+#                       netcdf_2        : 'scm_out_2.nc',
+#                       comparison_mode : 'overlay',
+#                       plot_type       : 'profile',  # 'profile' is the only accepted string here; anthing else means 'not profile'
+#                       output_mode     : 'ps',
+#                       output_path     : 'scm_out',
+#                       param_selection : 'list',
+#                       param_list_path : nil,
+#                       param_list      : ['t_skin', 'top_lwrad_clr', 'u_wind_10m'],
+#                       times           : [0, 'to', 'last', 'by', 180]
+#                   )
+#
+#                   mvl_plot_scm_data(scm_plot_params)
+#
+# **************************************************************************
+
+function mvl_plot_scm_data
+
+    args = ()
+
+    arglist = arguments()
+
+    if count(arglist) <> 0 then
+        args = arglist[1]
+    end if
+
+print(arglist)
+    # sanity check on the input arguments
+
+    if args.mode <> nil then
+        if args.mode <> 'interactive' and args.mode <> 'batch' then
+            fail("Argument 'mode' should be 'interactive' or 'batch'. It is ", args.mode)
+        end if
+    end if
+
+    if args.comparison_mode <> nil then
+        if args.comparison_mode <> 'overlay' and args.comparison_mode <> 'difference' then
+            fail("Argument 'comparison_mode' should be 'overlay' or 'difference'. It is ", args.comparison_mode)
+        end if
+    end if
+
+    if args.mode <> nil then
+        if args.output_mode <> 'postscript' and args.output_mode <> 'screen' then
+            fail("Argument 'output_mode' should be 'postscript' or 'screen'. It is ", args.output_mode)
+        end if
+    end if
+
+    if args.param_selection <> nil then
+        if args.param_selection <> 'list' and args.param_selection <> 'file' and args.param_selection <> 'all' then
+            fail("Argument 'param_selection' should be 'list', 'file' or 'all'. It is ", args.param_selection)
+        end if
+    end if
+
+
+    # fill in the argument definition with defaults if not specified
+
+    if args.mode = nil then
+        args.mode = 'interactive'
+    end if
+
+    if args.comparison_mode = nil then
+        args.comparison_mode = 'overlay'
+    end if
+
+    if args.param_selection = nil then
+        args.param_selection = 'list'
+    end if
+
+    if args.output_path = nil then
+        args.output_path = 'scm_out'
+    end if
+
+    if args.output_mode = nil then
+        args.output_mode = 'screen'
+    end if
+
+
+    
+    # make output_path into an absolute path
+
+    args.output_path = make_path_absolute(args.output_path)
+
+
+    # when running from the command line, we have to force certain options
+
+    if runmode() = 'batch' then
+        args.mode        = 'batch'
+        args.output_mode = 'postscript'
+    end if
+
+
+    #print(args)
+
+
+    if args.mode = 'interactive' then
+
+        # ---------------- #
+        # interactive mode #
+        # ---------------- #
+
+
+        ui_comparison_mode = option_menu
+        (
+            name    : "comparison mode",
+            values  : ["overlay", "difference"],
+            default : args.comparison_mode
+        )
+
+        ui_netcdf_1 = icon
+        (
+            name  : "input data 1",
+            class : "NETCDF"
+        )
+
+        ui_netcdf_2 = icon
+        (
+            name  : "input data 2",
+            class : "NETCDF"
+        )
+
+        input = dialog([ui_comparison_mode, ui_netcdf_1, ui_netcdf_2])
+
+        compmode  = input['comparison mode']
+        netcdf_1  = input['input data 1']
+        netcdf_2  = input['input data 2']
+
+        if netcdf_1 = nil then
+            fail('Must supply at least one netCDF icon as input')
+        end if
+
+
+        # ------------------------------------------
+        # user dialog 3 - ask for the parameter(s)
+        # ------------------------------------------
+
+        # parse the parameters from the input netCDF file
+
+        vardef = parse_netcdf_vars(netcdf_1)
+
+        t = generate_vars_help(netcdf_1, vardef)
+
+        dialog_options = nil
+
+        ui_param_selection_mode = option_menu
+        (
+            name    : "parameter selection",
+            values  : ["list", "file", "all"],
+            default : args.param_selection
+        )
+
+        ui_param_list = any
+        (
+            name    : "parameter list",
+            default : 't',
+            help    : "help_script",
+            #help_script_command : "echo list of forward-slash-separated parameter names"
+            #help_script_command : "
+            help_script_command : "echo list of forward-slash-separated parameter names; cat " & t
+        )
+
+        ui_param_file = icon
+        (
+            name  : "parameter file",
+            class : "NOTE"
+        )
+
+        ui_param_output_mode = option_menu
+        (
+            name    : "output mode",
+            values  : ["screen", "postscript"],
+            default : args.output_mode
+        )
+
+        outpath = args.output_path
+
+        ui_outpath = any
+        (
+            name    : "output file path",
+            default : outpath
+        )
+
+
+        input = dialog([ui_param_selection_mode, ui_param_list, ui_param_file, ui_param_output_mode, ui_outpath])
+
+        param_selection_mode = input["parameter selection"]
+
+        if param_selection_mode = 'list' then   # user provided an inline list of parameters
+            selected_vars = input['parameter list']
+
+        else if param_selection_mode = 'file' then # user gave a file with a list of parameters to plot
+            parmlist = input["parameter file"]
+
+            if parmlist <> nil then 
+                parmlistpath = parmlist.PATH
+            else
+                fail("Parameter selection was set to 'file', but no icon was supplied")
+            end if
+
+        else # put all the available variable indexes into a list - we will try to plot them all
+            selected_vars = vardef.vars
+        end if
+
+
+        outmode  = input["output mode"]
+        outpath  = input["output file path"]
+
+    else
+
+        # ---------- #
+        # batch mode #
+        # ---------- #
+
+        compmode = args.comparison_mode
+
+        netcdf_1_path = args.netcdf_1
+        if netcdf_1_path = nil then
+            fail('Must supply netcdf_1')
+        else
+            netcdf_1_path = make_path_absolute(netcdf_1_path)
+            netcdf_1 = read(netcdf_1_path)
+        end if
+
+        netcdf_2 = nil
+        netcdf_2_path = args.netcdf_2
+        if netcdf_2_path <> nil then
+            netcdf_2_path = make_path_absolute(netcdf_2_path)
+            netcdf_2 = read(netcdf_2_path)
+        end if
+
+
+        param_selection_mode = args.param_selection
+
+        if param_selection_mode = 'list' then   # user provided an inline list of parameters
+            selected_vars = args.param_list
+        else if param_selection_mode = 'file' then # user gave a file with a list of parameters to plot
+            parmlistpath = param_list_path
+        else # put all the available variable indexes into a list - we will try to plot them all
+            selected_vars = vars
+        end if
+
+
+        plot_type = args.plot_type
+        times     = args.times
+
+
+        outmode = args.output_mode
+        outpath = args.output_path
+
+
+        # Read netcdf file
+        file_nc = netcdf_1
+
+
+        # parse the parameters from it
+        vardef = parse_netcdf_vars(file_nc)
+
+
+    end if # interactive or batch
+
+
+
+
+    # ----------------------------------------- #
+    # User input obtained, start the processing #
+    # ----------------------------------------- #
+
+
+    # read the list of parameters from a file?
+    if param_selection_mode = 'file' then
+        parmlistpath = parmlist.PATH
+        selected_vars = read(parmlistpath)
+    end if
+
+
+    # (hopefully temporary) mesaure: since we can't yet plot multiple parameters
+    # interactively, we will have to plot just the first one
+
+    if outmode = 'screen' then
+        if count(selected_vars) > 1 then
+            print('Can only plot 1 variable in interactive mode - will plot just the first one')
+            selected_vars = [selected_vars[1]]
+        end if
+    end if
+
+
+    # construct a list of variable indexes from their names
+    plot_var_indexes = nil
+    for i = 1 to count(selected_vars) do
+        index = find(vardef.vars, selected_vars[i])
+        if index = nil then
+            fail('Could not find variable ' & selected_vars[i] & ' in netCDF file')
+        else
+            plot_var_indexes = plot_var_indexes & [index]
+        end if
+    end for
+
+
+    print('Plotting parameters: ', selected_vars, ' ; indexes: ', plot_var_indexes)
+
+
+
+    if outmode = 'postscript' then
+        print('Will generate output plot in ', outpath)
+        psfile = ps_output(output_name : outpath)
+        setoutput(psfile)
+    end if
+
+
+
+    # if plotting profiles, then expand the time steps
+    # e.g.
+    #   0/to/last/by/180
+    #   900,1800,2700
+    #   0/to/2700
+
+    if plot_type = 'profile' then
+
+        if type(times) <> 'list' then
+            times = [times]
+        end if
+
+        first_time = times[1] * 60  # convert from minutes (user) to seconds (file)
+
+        if type(times[2]) = 'string' then   # ASSUME a 'TO' b  (1,2,3)
+            second_time = times[3]
+
+            if type(second_time) = 'string' then # ASSUME a 'TO' 'LAST'
+                setcurrent(netcdf_1, vardef.time_var_index)  # get the last time
+                all_times = values(netcdf_1)
+                second_time = all_times[count(all_times)]  # already in seconds
+            end if
+
+            if count(times) > 4 then  # ASSUME a 'TO' b 'BY' s
+                timestep = times[5] * 60  # # convert from minutes (user) to seconds (file)
+
+                times = nil # construct the list of times
+                for t = first_time to second_time by timestep do
+                    times = times & [t]
+                end for
+            else
+                # no step given - use all available times between first and second
+                times_to_use = (all_times >= first_time) * (all_times <= second_time)
+                times = filter(all_times, times_to_use)
+            end if
+
+        else  # 'times' is just a list of times which we can use directly
+
+            times = times * 60  # convert from minutes (user) to seconds (file)
+
+        end if
+
+        print('Computed times: ', times)
+
+    end if
+
+
+
+
+    # convert seconds to days
+    #setcurrent(file_nc, 4)
+    #file_nc = file_nc / (60*60*24)
+
+
+
+    # decide whether to plot both netCDF files in overlay mode, or to compute
+    # the difference and plot that by itself
+
+    nc_files = nil
+
+    if compmode = 'overlay' then
+        if netcdf_1 <> nil then nc_files = nc_files & [netcdf_1] end if
+        if netcdf_2 <> nil then nc_files = nc_files & [netcdf_2] end if
+    else
+        a = 1 # for syntax correctness
+        if netcdf_2 = nil then
+            fail('Must supply a second netCDF icon')
+        end if
+
+        #setcurrent(netcdf_1, i)
+        #setcurrent(netcdf_2, i)
+        nc_files = [netcdf_1]# - netcdf_2]
+    end if
+
+
+
+
+    graph_line_colours = ['blue', 'red']
+
+
+
+    for j = 1 to count(plot_var_indexes) do
+
+        i = plot_var_indexes[j]
+
+        if not(i in vardef.reserved_var_indexes) and i<>nil then
+
+            # -------------------------------------------
+            # plotting - gather plot info for each netCDF
+            # -------------------------------------------
+
+            to_plot  = nil
+            all_yvals = nil
+            plot_this_var = 0
+
+            for n = 1 to count(nc_files) do
+
+                file_nc = nc_files[n]
+
+                # look at this variable to see what its dimensions are
+                setcurrent(file_nc, i)
+                dim_names = dimension_names(file_nc)
+                #print(i, tab, dim_names)
+                if count(dim_names) = 1 then
+                    xdim_name = dim_names[1]
+                        plot_this_var = 1
+
+                        if compmode = 'difference' then
+                            setcurrent(netcdf_2, i)
+                            file_nc = file_nc - netcdf_2
+                        end if
+
+
+                        # visualiser to plot the data
+                        line_plot = netcdf_visualiser
+                        (
+                            netcdf_plot_type      : "xy_points",
+                            netcdf_x_variable     : xdim_name,
+                            netcdf_y_variable     : vardef.vars[i],
+                            netcdf_value_variable : vardef.vars[i],
+                            netcdf_data           : file_nc
+                        )
+
+                        # visual definition to apply to the plot
+                        line_visdef = mgraph
+                        (
+                            legend            : 'on',
+                            graph_line_colour : graph_line_colours[n]
+                        )
+
+                        to_plot = to_plot & [line_plot, line_visdef]
+
+                        # we'll need to combine all the actual values for later
+                        all_yvals = all_yvals & values(file_nc)
+
+                        y_axis_title = ''
+                    #else
+                        #print ('Variable ', vardef.vars[i], ' has BAD dims ', xdim_name)
+                    #end if
+
+                else  # 2D matrix plot
+
+                    a = 1 # for syntax
+
+                    if args.mode = 'batch' or  n = 1  or compmode = 'difference' then
+
+                        #xdim_index = find(vardef.reserved_var_sizes, dims[1])
+                        #if xdim_index <> nil then
+                            plot_this_var = 1
+                            xdim_name = dim_names[1] #vardef.reserved_var_names[xdim_index]
+                            ydim_name = dim_names[2] #vardef.reserved_var_names[ydim_index]
+                            ydim_idx = find(vardef.reserved_var_names, ydim_name)
+
+                            if ydim_idx <> nil then
+
+                                if compmode = 'difference' then
+                                    setcurrent(netcdf_2, i)
+                                    file_nc = file_nc - netcdf_2
+                                end if
+
+
+                                if plot_type = 'profile' then   # PROFILE CURVES
+
+                                    xdim_name =  vardef.vars[i]
+                                    ydim_name = dim_names[2]
+                                    ydim_idx = find(vardef.reserved_var_names, ydim_name)
+
+                                    rgb_inc = 1/(count(times) + 1)
+
+                                    for ti = 1 to count(times) do
+
+                                        ncvis = netcdf_visualiser
+                                        (
+                                            netcdf_plot_type         : "xy_points",
+                                            netcdf_x_variable        : vardef.vars[i],
+                                            netcdf_y_variable        : ydim_name,
+                                            netcdf_value_variable    : vardef.vars[i],
+                                            netcdf_dimension_setting : ["time/"&times[ti]],
+                                            netcdf_data              : file_nc
+                                        )
+
+                                        if times[ti] = 0 then
+                                            r = 0
+                                            g = 0
+                                            b = 0
+                                        else
+                                            qq = 1 # for syntax
+                                            if n = 1 then   # first netCDF file
+                                                r = ti * rgb_inc
+                                                g = ti * rgb_inc
+                                                b = 0.75 + (ti * rgb_inc * 0.25)
+                                            else           # second netCDF file
+                                                r = 0.75 + (ti * rgb_inc * 0.25)
+                                                g = ti * rgb_inc
+                                                b = ti * rgb_inc
+                                            end if
+                                        end if
+                                        rgb = 'RGB(' & r & ',' & g & ',' & b & ')'
+                                        #print(rgb)
+
+                                        gp = mgraph(graph_line_colour : rgb)
+
+                                        to_plot = to_plot & [ncvis, gp]
+
+                                    end for
+
+                                else   # MATRIX
+
+                                    xdim_name = dim_names[1] #vardef.reserved_var_names[xdim_index]
+                                    ydim_name = dim_names[2] #vardef.reserved_var_names[ydim_index]
+                                    ydim_idx = find(vardef.reserved_var_names, ydim_name)
+
+                                    # visualiser to plot the data
+                                    matrix_plot = netcdf_visualiser
+                                    (
+                                        netcdf_plot_type      : "xy_matrix",
+                                        netcdf_x_variable     : xdim_name,
+                                        netcdf_y_variable     : ydim_name,
+                                        netcdf_value_variable : vardef.vars[i],
+                                        netcdf_data           : file_nc
+                                    )
+
+                                    # visual definition to apply to the plot
+                                    if n = 1 then   # first netCDF, shaded
+                                        matrix_cont = mcont
+                                        (
+                                            legend                         : "on",
+                                            contour                        : "off",
+                                            contour_highlight              : "off",
+                                            contour_shade                  : "on",
+                                            contour_shade_method           : "area_fill",
+                                            contour_shade_max_level_colour : "red",
+                                            contour_shade_min_level_colour : "blue",
+                                            contour_shade_colour_direction : "clockwise",
+                                            contour_label                  : "off"
+                                        )
+                                    else
+                                        matrix_cont = mcont
+                                        (
+                                            contour                 : "on",
+                                            contour_line_colour     : 'black',
+                                            contour_line_thickness  : 2,
+                                            contour_highlight       : "off",
+                                            contour_label           : "on"
+                                        )
+                                    end if
+
+                                    to_plot = to_plot & [matrix_plot, matrix_cont]
+
+
+                                end if
+
+                                # store the y values so we can later get a nice y-axis
+                                ydim_index = find(vardef.vars, ydim_name)
+                                setcurrent(file_nc, ydim_index)
+
+                                all_yvals = all_yvals & values(file_nc)
+
+
+                                # y-axis title
+                                attrs = attributes(file_nc)
+                                y_axis_title = attrs.long_name
+                                if y_axis_title = nil then y_axis_title = '' end if
+                            else
+                                print ('Variable ', vardef.vars[i], ' has BAD dims ', ydim_name)
+                                plot_this_var = 0
+                            end if
+                        #else
+                        #    print ('Variable ', vardef.vars[i], ' has BAD dims ', xdim_name)
+                        #end if
+
+                    else
+
+                        print('Cannot (yet) overlay plots in interactive mode - not plotting ', vardef.vars[i])
+                        plot_this_var = 0
+
+                    end if # args.mode = 'batch', etc
+
+                end if  # 1D/2D
+
+            end for  # for each netCDF
+
+
+
+            if plot_this_var then
+
+
+                # ----------------------------------
+                # get information for the plot title
+                # ----------------------------------
+                setcurrent(file_nc, i)
+                attrs = attributes(file_nc)
+
+                gattrs         = global_attributes(file_nc)
+                att_title      = gattrs.title
+                att_start_day  = gattrs.start_day
+                att_start_hour = gattrs.start_hour
+
+                title_line_1 = att_title
+                title_line_2 = 'Start day: ' & att_start_day & ' Start hour: ' & att_start_hour
+                title_line_3 = ''
+                if attrs.long_name <> nil then
+                    title_line_3 = title_line_3 & attrs.long_name
+                end if
+                if attrs.units <> nil then
+                    title_line_3 = title_line_3 & ' (' & attrs.units & ')'
+                end if
+                if compmode = 'difference' then
+                    title_line_3 = title_line_3 & ' [difference]'
+                end if
+
+                title = mtext
+                (
+                    text_line_count : 3,
+                    text_line_1     : title_line_1,
+                    text_line_2     : title_line_2,
+                    text_line_3     : title_line_3,
+                    text_font_size  : 0.35
+                )
+
+
+
+                # ------------------------------
+                # get information for the x-axis
+                # ------------------------------
+
+                xdim_index = find(vardef.vars, xdim_name)
+                setcurrent(file_nc, xdim_index)
+                attrs   = attributes(file_nc)
+                x_name  = xdim_name
+                x_units = attrs.units
+                if x_units = nil then
+                    x_units_text = ''
+                else
+                    x_units_text = ' (' & x_units & ')'
+                end if
+                x_axis_title = x_name & x_units_text
+
+
+
+                # ------------------------------
+                # get information for the y-axis
+                # ------------------------------
+
+                # figure out the 'global' min/max for all data files
+                ymin = minvalue(all_yvals)
+                ymax = maxvalue(all_yvals)
+
+                if count(dim_names) = 1 then
+                    adjustment = 0.1 * (ymax - ymin)  # leave a 10% gap around the y limits
+                    if ymin <> 0 then ymin = ymin - adjustment end if
+                    ymax = ymax + adjustment
+
+                    if ymin = ymax then
+                        ymin = ymin - 1
+                        ymax = ymax + 1
+                    end if
+                else
+                    temp = ymin   # matrixc plot - turn the y-axis upside-down
+                    ymin = ymax
+                    ymax = temp
+                end if
+
+
+                if count(dim_names) = 1 then
+                    # define the legend
+                    legend_curves = mlegend
+                    (
+                        legend_display_type     : "disjoint",
+                        legend_text_composition : "user_text_only",
+                        legend_text_font_size   : 0.3,
+                        legend_user_lines       : ['expt 1', 'expt 2']
+                    )
+                    to_plot = to_plot & [legend_curves]
+                end if
+
+                # -----------
+                # do the plot
+                # -----------
+
+                dw = scm_build_layout(ymin, ymax, x_axis_title, y_axis_title)
+                plot(dw, to_plot, title)
+                newpage(dw)
+
+            end if  # plot_this_var
+
+        end if #if not(i in reserved_var_indexes)
+    end for  
+
+
+
+    function scm_get_var_sizes (nc: netcdf, all_vars: list, vars: list)
+
+        sizes = nil
+
+        for i = 1 to count(vars) do
+            index = find(all_vars, vars[i])
+            setcurrent(nc, index)
+            dims = dimensions(nc)
+            sizes = sizes & [dims[1]]
+        end for
+
+        return sizes
+
+    end scm_get_var_sizes
+
+
+    function scm_build_layout(ymin, ymax, xtitle, ytitle)
+
+
+        horizontal_axis = maxis
+        (
+            axis_title_text : xtitle
+        )
+
+
+        vertical_axis = maxis
+        (
+            axis_orientation : 'vertical',
+            axis_title_text  : ytitle
+        )
+
+
+        # view & page definition
+        cview = cartesianview
+        (  
+            x_automatic  : 'on',
+            #y_automatic  : 'on'
+            y_min : ymin,
+            y_max : ymax,
+            horizontal_axis : horizontal_axis,
+            vertical_axis   : vertical_axis
+        )
+
+        page = plot_page
+        (  
+            view   : cview
+        )  
+
+        # superpage definition 
+        display_window = plot_superpage
+        (  
+            layout_size         : "a4", 
+            layout_orientation  : "landscape", 
+            custom_width        : 29.0, 
+            custom_height       : 21.0, 
+            pages               : [ page ] 
+         ) 
+
+        return display_window
+
+    end scm_build_layout
+
+
+
+    function make_path_absolute(path: string)
+
+        first_char = substring(path, 1, 1)
+        if first_char <> '/' then
+            path = getenv('PWD') & "/" & path
+        end if
+        return path
+
+    end make_path_absolute
+
+
+    function parse_netcdf_vars(nc: netcdf)
+
+        def = ()  # we will returns a definition will various bits of information
+
+        # get the list of variables in the file
+        def.vars = variables(nc)
+
+
+        # get the lists of 'special' variables
+        nlev_var_index   = find(def.vars, 'nlev')
+        nlevp1_var_index = find(def.vars, 'nlevp1')
+        nlevs_var_index  = find(def.vars, 'nlevs')
+        time_var_index   = find(def.vars, 'time')
+
+        if (nlev_var_index = nil or nlevp1_var_index = nil or nlevs_var_index = nil or time_var_index = nil) then
+            fail ('ERROR: Expected to find nlev, nlevp1, nlevs and time variables in netCDF file ', nc_filename)
+        end if
+
+
+        def.reserved_var_indexes = [nlev_var_index, nlevp1_var_index, nlevs_var_index, time_var_index]
+        def.reserved_var_names   = ['nlev', 'nlevp1', 'nlevs', 'time']
+        def.reserved_var_sizes   = scm_get_var_sizes (nc, def.vars, def.reserved_var_names)
+        def.time_var_index       = time_var_index
+
+
+        # store their names to be used on the y-axis
+        reserved_var_long_names = nil
+        for j = 1 to count(def.reserved_var_indexes) do
+            idx = def.reserved_var_indexes[j]
+            setcurrent(nc, idx)
+            attrs = attributes(nc)
+            reserved_var_long_names = reserved_var_long_names & [attrs.long_name]
+        end for
+
+        def.reserved_var_long_names = reserved_var_long_names
+
+
+        return def
+
+    end parse_netcdf_vars
+
+
+
+
+    function generate_vars_help(nc: netcdf, def: definition)
+
+
+        # parse the file to get the lists of available 1 and 2d variables
+
+        vars_1d = nil
+        vars_2d = nil
+        for i = 1 to count(def.vars) do
+            #print(i, tab, def.vars[i])
+            if not(i in def.reserved_var_indexes) then
+                setcurrent(nc, i)
+                dims = dimensions(nc)
+                if count(dims) = 1 then
+                    vars_1d = vars_1d & [def.vars[i]]
+                else if count(dims) = 2 then
+                    #if dims[2] = 91 then
+                       vars_2d = vars_2d & [def.vars[i]]
+                    #end if
+                end if
+            end if
+        end for
+
+        vars_1d = vars_1d
+        vars_2d = vars_2d
+
+
+        t = tmpfile()
+        f = file(t)
+
+        write(f, "1D variables", newline)
+        write(f, "------------", newline)
+        for i = 1 to count(vars_1d) do
+            write(f, vars_1d[i], newline)
+        end for
+
+        write(f, newline)
+        write(f, "2D variables", newline)
+        write(f, "------------", newline)
+        for i = 1 to count(vars_2d) do
+            write(f, vars_2d[i], newline)
+        end for
+
+
+        f = 0
+
+        return t
+    end generate_vars_help
+
+
+
+end mvl_plot_scm_data
+
diff --git a/share/metview/app-defaults/CommonMacroFuncs/CommonMacroFuncs.proj b/share/metview/app-defaults/CommonMacroFuncs/CommonMacroFuncs.proj
new file mode 100755
index 0000000..3b8d505
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/CommonMacroFuncs.proj
@@ -0,0 +1,240 @@
+struct (
+	"BuildDir" : "cc/include/Metview/MvShared/CommonMacroFuncs",
+	"BuildSupport" : false,
+	"BuildSupportPlatforms" : "All",
+	"CreateLinks" : true,
+	"DisplayName" : "CommonMacroFuncs",
+	"FileCount" : 9,
+	"FileSet" : array (
+		struct (
+			"FileName" : "cc/include/Metview/MvShared/CommonMacroFuncs/CommonMacroFuncs.proj",
+			"FileType" : "Project"
+		),
+		struct (
+			"FileName" : "cc/include/Metview/MvShared/CommonMacroFuncs/README",
+			"FileType" : "ASCII-Documentation"
+		),
+		struct (
+			"FileName" : "cc/include/Metview/MvShared/CommonMacroFuncs/cluster.f",
+			"FileType" : "Fortran-Implementation"
+		),
+		struct (
+			"FileName" : "cc/include/Metview/MvShared/CommonMacroFuncs/clustsize.f",
+			"FileType" : "Fortran-Implementation"
+		),
+		struct (
+			"FileName" : "cc/include/Metview/MvShared/CommonMacroFuncs/enspop.f",
+			"FileType" : "Fortran-Implementation"
+		)
+	),
+	"FileTypes" : struct (
+		"ASCII-Documentation" : struct (
+			"BuildTool" : "",
+			"Language" : "",
+			"Signatures" : "*.txt:README*:readme*:Readme*:ReadMe*",
+			"SubType" : "ASCII",
+			"Type" : "Documentation"
+		),
+		"Assembler Implementation" : struct (
+			"BuildTool" : "",
+			"Language" : "GNUAssembler",
+			"Signatures" : "*.asm:*.s:*.Asm",
+			"SubType" : "Assembler-Type",
+			"Type" : "Implementation"
+		),
+		"C Implementation" : struct (
+			"BuildTool" : "C Compiler",
+			"Language" : "ANSI C/C++",
+			"Signatures" : "*.c",
+			"SubType" : "C-Type",
+			"Type" : "Implementation"
+		),
+		"C++ Implementation" : struct (
+			"BuildTool" : "C++ Compiler",
+			"Language" : "ANSI C/C++",
+			"Signatures" : "*.C:*.cc:*.CC:*.cpp:*.CPP:*.cxx:*.CXX",
+			"SubType" : "C++-Type",
+			"Type" : "Implementation"
+		),
+		"Fortran-Implementation" : struct (
+			"BuildTool" : "Fortran Compiler",
+			"Language" : "Fortran-Fixed",
+			"Signatures" : "*.f:*.f90:*.f77",
+			"SubType" : "Fortran-Type",
+			"Type" : "Implementation"
+		),
+		"HTML-Documentation" : struct (
+			"BuildTool" : "",
+			"Language" : "HTML",
+			"Signatures" : "*.htm:*.html",
+			"SubType" : "HTML",
+			"Type" : "Documentation"
+		),
+		"Header" : struct (
+			"BuildTool" : "",
+			"Language" : "ANSI C/C++",
+			"Signatures" : "*.h:*.H:*.hh:*.HH:*.hpp:*.HPP:*.hxx:*.HXX:*.ci",
+			"SubType" : "Interface",
+			"Type" : "Interface"
+		),
+		"IDL-Interface" : struct (
+			"BuildTool" : "IDL Compiler",
+			"DerivedFrom" : array (
+			),
+			"DerivedFromInfo" : struct (
+				"DerivedLoose" : 0,
+				"DerivedType" : 0,
+				"GenerateDir" : "",
+				"ViewSpecific" : 0
+			),
+			"Language" : "IDL",
+			"Signatures" : "*.idl",
+			"SubType" : "IDL-Type",
+			"Type" : "Implementation"
+		),
+		"Image" : struct (
+			"BuildTool" : "",
+			"Language" : "",
+			"Signatures" : "*.png:*.gif:*.image:*.im:*.jpg:*.jpeg:*.bmp:*.ico",
+			"SubType" : "Image",
+			"Type" : "Other"
+		),
+		"Java" : struct (
+			"BuildTool" : "SniffJMake",
+			"Language" : "Java",
+			"Signatures" : "*.java",
+			"SubType" : "Java-Type",
+			"Type" : "Implementation"
+		),
+		"JavaScript" : struct (
+			"BuildTool" : "",
+			"Language" : "JavaScript",
+			"Signatures" : "*.js",
+			"SubType" : "JavaScript-Type",
+			"Type" : "Implementation"
+		),
+		"Lex Source" : struct (
+			"BuildTool" : "Lexer",
+			"Language" : "",
+			"Signatures" : "*.l",
+			"SubType" : "CodeGenerating-Type",
+			"Type" : "Implementation"
+		),
+		"Make" : struct (
+			"BuildTool" : "",
+			"Language" : "Make",
+			"Signatures" : "Makefile:makefile:*.mk:*.mak:*.MAK:MAKEFILE:Makefile*:makefile*",
+			"SubType" : "Make",
+			"Type" : "Make"
+		),
+		"Perl" : struct (
+			"BuildTool" : "",
+			"DerivedFrom" : array (
+			),
+			"DerivedFromInfo" : struct (
+				"DerivedLoose" : 0,
+				"DerivedType" : 0,
+				"GenerateDir" : "",
+				"ViewSpecific" : 0
+			),
+			"Language" : "Perl",
+			"Signatures" : "*.pl:*.Pl:*.pm",
+			"SubType" : "Perl-Type",
+			"Type" : "Implementation"
+		),
+		"Project" : struct (
+			"BuildTool" : "",
+			"Language" : "",
+			"Signatures" : "*.prj:*.proj:*.shared",
+			"SubType" : "Project",
+			"Type" : "Project"
+		),
+		"SQL" : struct (
+			"BuildTool" : "",
+			"DerivedFrom" : array (
+			),
+			"DerivedFromInfo" : struct (
+				"DerivedLoose" : 0,
+				"DerivedType" : 0,
+				"GenerateDir" : "",
+				"ViewSpecific" : 0
+			),
+			"Language" : "SQL",
+			"Signatures" : "*.sql:*.SQL:*.trg:*.Trg",
+			"SubType" : "SQL-Type",
+			"Type" : "Implementation"
+		),
+		"ShellScript" : struct (
+			"BuildTool" : "",
+			"Language" : "ShellScript",
+			"Signatures" : "*.sh:*.csh",
+			"SubType" : "ShellScript-Type",
+			"Type" : "Script"
+		),
+		"TCL" : struct (
+			"BuildTool" : "",
+			"DerivedFrom" : array (
+			),
+			"DerivedFromInfo" : struct (
+				"DerivedLoose" : 0,
+				"DerivedType" : 0,
+				"GenerateDir" : "",
+				"ViewSpecific" : 0
+			),
+			"Language" : "TCL",
+			"Signatures" : "*.tcl:*.TCL*.itcl",
+			"SubType" : "TCL-Type",
+			"Type" : "Implementation"
+		),
+		"Tornado C++ Header" : struct (
+			"Language" : "ANSI C/C++",
+			"Signatures" : "algorithm:cassert:cctype:cerrno:cfloat:climits:clocale:cmath:complex:csetjmp:csignal:cstdarg:cstddef:cstdio:cstring:ctime:cwctype:deque:exception:fstream:functional:hash_map:hash_set:iomapip:iosfwd:iostream:iterator:list:map:memory:new:numeric:queue:rope:set:slist:stack:stdexcept:string:strstream:typeinfo:utility:vector",
+			"SubType" : "Interface",
+			"Type" : "Interface"
+		),
+		"Yacc Source" : struct (
+			"BuildTool" : "Parser Generator",
+			"Language" : "",
+			"Signatures" : "*.y",
+			"SubType" : "CodeGenerating-Type",
+			"Type" : "Implementation"
+		)
+	),
+	"FileTypesOrder" : array (
+		"Project",
+		"C Implementation",
+		"Header",
+		"Make",
+		"Perl",
+		"TCL",
+		"SQL",
+		"ShellScript",
+		"C++ Implementation",
+		"ASCII-Documentation",
+		"Lex Source",
+		"Yacc Source",
+		"Fortran-Implementation",
+		"HTML-Documentation",
+		"Image",
+		"IDL-Interface",
+		"Java",
+		"JavaScript",
+		"Tornado C++ Header",
+		"Assembler Implementation"
+	),
+	"GenerateDir" : "cc/include/Metview/MvShared/CommonMacroFuncs/.sniffdir",
+	"Release" : "V4.0",
+	"SubProj" : array (
+		"cc/include/Metview/MvShared/CommonMacroFuncs/aix/aix.proj"
+	),
+	"Targets" : struct (
+		"Objects" : struct (
+			"BuildTool" : "None",
+			"PassedToSuperproject" : true
+		),
+		"Received" : struct (
+			"BuildTool" : "None",
+			"PassedToSuperproject" : true
+		)
+	)
+)
\ No newline at end of file
diff --git a/share/metview/app-defaults/CommonMacroFuncs/README b/share/metview/app-defaults/CommonMacroFuncs/README
new file mode 100644
index 0000000..305b158
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/README
@@ -0,0 +1,13 @@
+Common Macro Functions
+======================
+
+This directory contains macro fuctions available to all
+Metview users (through the environment variable
+METVIEW_MACRO_PATH set in script 'metview').
+
+
+
+ECMWF
+4.4.1997/20.10.1997
+Vesa Karhila
+Updated (redundant information removed) 22.06.2011, Iain Russell
diff --git a/share/metview/app-defaults/CommonMacroFuncs/acc b/share/metview/app-defaults/CommonMacroFuncs/acc
new file mode 100644
index 0000000..a319032
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/acc
@@ -0,0 +1,24 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function acc(z1,z2,cl)
+
+	# computes anomaly correlation coefficient between 2 fields z1 and z2
+	# cl is the monthly climate
+
+	x1=z1-cl
+	y1=integrate(x1*x1)-integrate(x1)*integrate(x1)
+	x2=z2-cl
+	y2=integrate(x2*x2)-integrate(x2)*integrate(x2)
+	acc=(integrate(x1*x2)-integrate(x1)*integrate(x2))/sqrt(y1*y2)
+
+	return acc
+end acc
diff --git a/share/metview/app-defaults/CommonMacroFuncs/check_mars_order b/share/metview/app-defaults/CommonMacroFuncs/check_mars_order
new file mode 100644
index 0000000..554713a
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/check_mars_order
@@ -0,0 +1,55 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function check_mars_order
+	mars_order = marsorder()
+
+	my_order = [
+					"DATE",
+					"TIME",
+
+					"REFERENCE",
+					"STEP",
+					"VERIFY",
+					"FCMONTH",
+					"FCPERIOD",
+
+					"EXPVER",
+					"ORIGIN",
+					"DOMAIN",
+
+					"DIAGNOSTIC",
+					"ITERATION",
+
+					"NUMBER",
+
+					"LEVELIST",
+					"LATITUDE",
+					"LONGITUDE",
+					"RANGE",
+
+					"PARAM",
+
+					 #/* For 2-d wave-spectra products */
+					"FREQUENCY",
+					"DIRECTION",
+
+					#/* For EA, EF */
+					"CHANNEL"
+				]
+
+	for i = 1 to count(my_order) do
+		if (my_order[i] <> mars_order[i]) then
+			fail("The order of the fields within the MARS module has changed")
+		end if
+	end for
+	
+end check_mars_order
diff --git a/share/metview/app-defaults/CommonMacroFuncs/clim b/share/metview/app-defaults/CommonMacroFuncs/clim
new file mode 100644
index 0000000..7c03c19
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/clim
@@ -0,0 +1,26 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# retrieve the climatological monthly field
+
+function clim(level,param,date,area,tronc)
+	cl=retrieve(
+			type	:	"cl",
+			stream	:	"mo",
+			param	:	param,
+			levelist:	level,
+			date	:	string(date,'mmm'),
+			area	:	area,
+			resol	:	tronc,
+			grid	:	[2.5,2.5]
+			)
+	return cl
+end clim
diff --git a/share/metview/app-defaults/CommonMacroFuncs/eps b/share/metview/app-defaults/CommonMacroFuncs/eps
new file mode 100644
index 0000000..5eb3d6c
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/eps
@@ -0,0 +1,71 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function eps(level,param,date,area,tronc,steps)
+
+	# 33 members, for one or several steps/dates
+	# the result is run1(step1/date1,step2...),run2(step1,step2...),...
+
+	cs=1
+	cd=1
+
+	if type(steps)='list' then
+		if 'to' in steps then
+			cs=((steps[3]-steps[1])/12)+1
+		else
+			cs=count(steps)
+		end if
+	end if
+
+	if type(date)='list' then
+		if 'to' in date then
+			cd=date(date[3])-date(date[1])+1
+		else
+			cd=count(date)
+		end if
+	end if
+
+	# ensemble control (0)
+	runs = retrieve(
+			type	:	"cf",
+			stream	:	"ef",
+			levelist	:	level,
+			param	:	param,
+			date	:	date,
+			step	:	steps,
+			resol	:	tronc,
+			area	:	area,
+			grid	:	[2.5,2.5]
+			)
+
+	# perturbed fcsts, 1 to 32
+	ptbd = retrieve(
+			type	:	"pf",
+			stream	:	"ef",
+			levelist	:	level,
+			param	:	param,
+			date	:	date,
+			step	:	steps,
+			ensemble	:	[1,"to",32],
+			resol	:	tronc,
+			area	:	area,
+			grid	:	[2.5,2.5]
+			)
+
+	for i = 1 to 32 do
+		for k = 0 to (cs*cd)-1 do
+			runs = runs & ptbd[i+32*k]
+		end for
+	end for
+
+	return runs
+
+end eps
diff --git a/share/metview/app-defaults/CommonMacroFuncs/grib_codes b/share/metview/app-defaults/CommonMacroFuncs/grib_codes
new file mode 100644
index 0000000..ea5275d
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/grib_codes
@@ -0,0 +1,155 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function grib_codes
+return (
+
+	model		: ( indx	:	3),
+
+	param		:
+		(							# Parameter Indicator
+				indx	: 	6,
+				ff10	:	207,	# 10m windspeed
+				tp		:	228,	# Total precipitation
+				
+
+                					# probabilities
+				"10sp"	:	165,	# 10 metre speed probability
+				ttp		:	228,	# Total precipitation probability
+				tap		:	130,	# Temperature anomaly probability
+				"2tp"	:	167,	# 2 metre temperature probability
+				swhp	:	229,	# Significant wave height probability
+				mwpp	:	232		# Mean wave period probability
+			),
+
+	step1		:(	indx	:	16),
+	step2		:(	indx	:	17),
+	timerange	:(	indx	:	18),
+	table2		:						# Version number of table 2
+		(
+			indx		:1,
+			default		:128,
+			gradients	:129,# Gradients
+			astex		:130,# ASTEX
+			proba		:131,# Probability forecast
+			wave		:140,# Wave
+			oceanp		:150,# Ocean - preliminary
+			oceano		:151,# Ocean - operational
+			era_stats	:160,# ECMWF Re-analysis Stats
+            seasonal	:170,# Seasonal Forecasting
+            ecsn		:180,# ECSN - HIRETYCS
+            demeter		:190 # DEMETER
+		),
+
+	local		:						 # ECMWF local GRIB usage
+		(
+			indx		:	37,
+		 	ensemble	:1, # MARS labelling or ensemble forecast data 
+			clusterm	:2, # Cluster means and standard deviations
+			satellite	:3, # Satellite image data
+			ocean		:4, # Ocean model data
+			proba		:5, # Forecast probability data
+			sst			:6, # Surface temperature data
+			sensitivity	:7, # Sensitivity data
+			era			:8, # ECMWF re-analysis data
+			sing_vector	:9, # Singular vectors and ensemble perturbations
+			tubes		:10,# EPS tubes 
+			suppl		:11,# Supplementary data used by the analysis
+			wave2d		:13,# Wave 2D spectra direction and frequency
+			brightness	:14,# Brightness temperature
+			seasonal	:15,# Seasonal forecast data
+			seasonalm	:16,# Seasonal forecast monthly mean data
+			sstice		:17,# Surface temperature or sea-ice data
+			multi_an_ef	:18 # Multi-analysis ensemble forecast
+		),
+
+	mars_class	:
+		(
+			indx		:	38,
+			od			:1,	# Operations
+			rd			:2,	# Research
+			era15		:3,	# ECMWF 15-year re-analysis (ERA 15)
+			eu_clim		:4,	# European climate support network
+			era40		:5,	# ECMWF 40-year re-analysis (ERA 40)
+			demeter		:6,	# DEMETER
+			provost		:7	# PROVOST
+		),
+
+	mars_type	:
+		(
+			indx		:39,
+			# (using MARS abbreviations when defined)
+			fg			:1, # First Guess
+			an			:2, # Analysis
+			ia			:3, # Initialised analysis
+			oi			:4, # OI analysis
+			"3v"		:5, # 3 D variational analysis
+			"4v"		:6, # 4 D variational analysis
+			"3g"		:7, # 3 D variational gradients
+			"4g"		:8, # 4 D variational gradients
+			fc			:9, # Forecast
+			cf			:10,# Control forecast
+			pf			:11,# Perturbed forecast
+			ef			:12,# Errors in first guess, or
+							# Estimate of forecast accuracy (ef)
+			ea			:13,# Errors in analysis, or
+							# Estimate of analysis accuracy (ea)
+			cm			:14,# Cluster means
+			cs			:15,# Cluster standard deviations
+			fp			:16,# Forecast probabilities
+			em			:17,# Ensemble means
+			es			:18,# Ensemble standard deviations
+			fa			:19,# Forecast accumulations
+			cl			:20,# Climatology
+			si			:21,# Climate simulation
+			s3			:22,# Climate simulation, 360-day year
+			ed			:23,# Empirical distribution
+			tu			:24,# Tubes
+			forcing		:25,# Forcing forecast
+			ocean		:26,# Ocean forecast
+			ob			:30,# Observations
+			qc			:31,# Quality control
+			diff_stat	:32,# Difference statistics
+			im			:40,# Image data
+			gm			:50,# Sensitivity gradients
+			tf			:51,# Trajectory forecast
+			sf			:52,# Sensitivity forecast
+			pa			:60 # Perturbed analysis
+		),
+
+	mars_stream	:
+		(
+			indx		:40,
+			oper		:1025,	# Daily archive
+			enfo		:1035 	# Ensemble forecasts
+		),
+
+    #-------------------------------------------------------------------------------
+	#  Local definitions
+    #-------------------------------------------------------------------------------
+	proba		:					# Forecast probability data 
+		(
+			rank		:	42,		# Forecast probability number.
+			number		:	43,		# Total number of forecast probabilities
+			power		:	44,		# Threshold units decimal scale factor.
+									# + or - power of 10 (or zero)
+			threshold	:	45,		# Threshold indicator:
+									# 1 = Only lower threshold is present.
+									# 2 = Only upper threshold is present.  
+									# 3 = Both upper and lower thresholds are present
+			lower		:	46,		# Lower threshold value
+			upper		:	47 		# Upper threshold value
+		)
+)
+
+end grib_codes
+
+
diff --git a/share/metview/app-defaults/CommonMacroFuncs/load_grib_tools b/share/metview/app-defaults/CommonMacroFuncs/load_grib_tools
new file mode 100644
index 0000000..cd9d414
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/load_grib_tools
@@ -0,0 +1,34 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function load_grib_tools()
+	print("load_grib_tools loaded")
+end load_grib_tools
+
+object retriever(request:definition)
+
+	global fieldset
+	fieldset = retrieve(request)
+
+	function fieldset()
+		return fieldset
+	end fieldset
+
+	function fieldset(what:definition)
+		n = fieldindex(fieldset,what)
+		if (n > 0) then
+			return fieldset[n]
+		else
+			return nil
+		end if
+	end fieldset
+
+end retriever
diff --git a/share/metview/app-defaults/CommonMacroFuncs/load_list_tools b/share/metview/app-defaults/CommonMacroFuncs/load_list_tools
new file mode 100644
index 0000000..dcbdb23
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/load_list_tools
@@ -0,0 +1,63 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function load_list_tools()
+	print("list tools loaded")
+end load_list_tools
+
+function filter_list(ll:list,filter:list)
+
+	res = []
+	for i = 1 to count(ll) do
+		if (ll[1] not in filter) then
+			res = res & [ll[i]]
+		end if
+	end for
+
+end filter_list
+
+object unique_list(filter:list)
+	global list
+	list=[]
+
+	function add(value)
+		if (not there(value)) then
+			list = list & [value]
+		end if
+	end add
+
+	function there(value)
+		if (value in filter) then
+			return 1
+		end if
+		if (value in list) then
+			return 1
+		end if
+		return 0
+	end there
+
+	function list()
+		return list
+	end list
+end unique_list
+
+function unique_list()
+	return unique_list([])
+end unique_list
+
+function index_of(value,ll:list)
+	for i = 1 to count(ll) do
+		if (ll[i] = value) then
+			return i
+		end if
+	end for
+	return 0
+end index_of
diff --git a/share/metview/app-defaults/CommonMacroFuncs/load_metops b/share/metview/app-defaults/CommonMacroFuncs/load_metops
new file mode 100644
index 0000000..3bc1117
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/load_metops
@@ -0,0 +1,16 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+global zzz = pcont()
+
+function load_metops
+	print "load..."
+end load_metops
diff --git a/share/metview/app-defaults/CommonMacroFuncs/load_param_classes b/share/metview/app-defaults/CommonMacroFuncs/load_param_classes
new file mode 100644
index 0000000..1712dd3
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/load_param_classes
@@ -0,0 +1,177 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#-----------------------------------------------------------------------------
+# Classes implementing mars requests and calculation of derived fields,
+# e.g. total precipitation, wind speed + standard stuff.
+# To load the classes within a macro, call load_param_classes.
+#
+# load_param_classes calls the function check_mars_order which checks that
+# the order in which the fields are sorted in a mars retrieve is identical to
+# the order when this was programmed. To do so it gets the ACTUAL array used
+# for sorting fields in the mars module.
+# This is important because in order to improve performance, one unique
+# retrieve is done, then the fieldset is accessed using the sorting order.
+# If the order changes, this does not work anymore.
+#-----------------------------------------------------------------------------
+function load_param_classes()
+	load_list_tools()
+	print("param classes loaded")
+	check_mars_order()
+	print("mars field order checked")
+end load_param_classes
+
+object generic_param(request:definition,params)
+
+	global model
+	model = -1
+
+	global field
+	field = nil
+	function field
+		return field
+	end field
+
+	function request()
+		return request
+	end request
+
+	function member_count()
+		if (request["members"] <> nil) then
+			return request["members"]
+		else
+			return 1
+		end if
+	end member_count
+
+	function save_model(f:fieldset)
+		if (count(f) > 1) then
+			rr = f[1]
+		else
+			rr = f
+		end if
+	    codes = grib_codes()
+		model = getksec1(rr,codes.model.indx)
+		return model
+	end save_model
+
+	function change_grib(field:fieldset,param)
+		 return change_grib(field,param,[])
+	end change_grib
+
+	function change_grib(field:fieldset,param,l:list)
+		values = l
+	    codes = grib_codes()
+		if (model <> -1) then
+			values = values & [codes.model.indx,model]
+		end if
+		values = values & [codes.param.indx,param]
+		return putksec1(field,values)
+	end change_grib
+
+	global mars
+	mars = (
+				type    : "fc",
+				class   : "od",
+				expver  : 0001,
+				stream  : "oper",
+				date    : date(-1),
+				time    : 12,
+				step    : [24,48,72,96,120,144,168,192,216,240],
+				param   : params,
+				levtype : "sfc"
+		   )
+	function mars
+		return mars
+	end mars
+
+	function fieldset()
+		if (field = nil) then
+		   field = get_fieldset()
+		end if
+		return field
+	end fieldset
+
+	function get_fieldset()
+		return retrieve(mars(),request())
+	end get_fieldset
+	
+end generic_param
+
+object ff10_param(request) : generic_param(request,["10u","10v"])
+   
+	function get_fieldset()
+		req = (mars(),request())
+		res = retrieve(req)
+
+		codes = grib_codes()
+		save_model(res)
+		#-------- calculate the wind speed ----------
+		nmembers = member_count()
+		u = nil
+		v = nil
+		indx = 1
+		for i = 1 to count(res) / (2 * nmembers) do
+			u = u & res[indx,indx+nmembers*2-2,2]
+			v = v & res[indx+1,indx+nmembers*2-1,2]
+			indx = indx + nmembers*2
+		end for
+		ff = sqrt(u*u+v*v)
+		field = change_grib(ff,codes.param.ff10)
+		return field
+	end fieldset
+
+end ff10_param
+
+function ff10_param(request,val)
+	return ff10_param(request)
+end ff10_param
+
+
+object tp_param(request:definition,cumulation:number) : generic_param(request,["lsp","cp"])
+   
+	function get_fieldset()
+		#-------- build the MARS request ----------
+		req = (mars(), request())
+		steplist = req.step
+		step1 = req.step[1]
+		step0 = step1 - cumulation
+		limit=1
+		if (step0 > 0) then
+			if (count(steplist) > 1) then
+				req.step = [step0] & req.step
+			else
+				req.step = [step0] & [req.step]
+			end if
+			limit=0
+		end if
+		res = retrieve(req)
+		save_model(res)
+
+		count = count(res)
+		tp = res[1,count-1,2] + res[2,count,2]
+		nmembers = member_count()
+		count = count(tp)
+		field = tp[1+nmembers,count] - tp[1,count-nmembers]
+		if (limit) then
+			field = tp[1,nmembers] & field
+		end if
+
+		codes = grib_codes()
+		rain = nil
+		for i = 1 to count(field) / nmembers do
+			indx = (i-1) * nmembers
+			rain = rain & change_grib(field[indx+1,indx+nmembers],codes.param.tp,[codes.step1.indx,steplist[i]-cumulation,codes.step2.indx,steplist[i],codes.timerange.indx,5])
+		end for
+		return rain
+	end fieldset
+
+end tp_param
diff --git a/share/metview/app-defaults/CommonMacroFuncs/load_param_classes.keep b/share/metview/app-defaults/CommonMacroFuncs/load_param_classes.keep
new file mode 100644
index 0000000..854f784
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/load_param_classes.keep
@@ -0,0 +1,164 @@
+function load_param_classes()
+	load_list_tools()
+	print("param classes loaded")
+end load_param_classes
+
+object generic_param(request:definition,params)
+
+	global model
+	model = -1
+
+	global field
+	field = nil
+	function field
+		return field
+	end field
+
+	function request()
+		return request
+	end request
+
+	function save_model(f:fieldset)
+		if (count(f) > 1) then
+			rr = f[1]
+		else
+			rr = f
+		end if
+	    codes = grib_codes()
+		model = getksec1(rr,codes.model.indx)
+		return model
+	end save_model
+
+	function change_grib(field:fieldset,param)
+		 return change_grib(field,param,[])
+	end change_grib
+
+	function change_grib(field:fieldset,param,l:list)
+		values = l
+	    codes = grib_codes()
+		if (model <> -1) then
+			values = values & [codes.model.indx,model]
+		end if
+		values = values & [codes.param.indx,param]
+		return putksec1(field,values)
+	end change_grib
+
+	global mars
+	mars = (
+				type    : "fc",
+				class   : "od",
+				expver  : 0001,
+				stream  : "oper",
+				date    : date(-1),
+				time    : 12,
+				step    : [24,48,72,96,120,144,168,192,216,240],
+				param   : params,
+				levtype : "sfc"
+		   )
+	function mars
+		return mars
+	end mars
+
+	function fieldset()
+		if (field = nil) then
+		   field = get_fieldset()
+		end if
+		return field
+	end fieldset
+
+	function get_fieldset()
+		return retrieve(mars(),request())
+	end get_fieldset
+	
+end generic_param
+
+object ff10_param(request) : generic_param(request,["10u","10v"])
+   
+	function get_fieldset()
+		req = (mars(),request())
+		res = retrieve(req)
+
+		codes = grib_codes()
+		save_model(res)
+		field = nil
+		filter = (data: res)
+		#-------- calculate the wind speed ----------
+		loop theDate in req.date
+			filter.date = theDate
+			loop theTime in req.time
+				filter.time = theTime
+				filter.param = "10u"
+				indx=cube(res,filter)
+				u = res[indx+1]
+				filter.param = "10v"
+				indx=cube(res,filter)
+				v = res[indx+1]
+				ff = sqrt(u*u+v*v)
+				field = field & change_grib(ff,codes.param.ff10)
+			end loop
+		end loop
+		return field
+	end fieldset
+
+end ff10_param
+
+function ff10_param(request,val)
+	return ff10_param(request)
+end ff10_param
+
+
+object tp_param(request:definition,cumulation:number) : generic_param(request,["lsp","cp"])
+   
+	function get_fieldset()
+		#-------- build the MARS request ----------
+		req = (mars(), request())
+		steps = req.step
+
+		field = nil
+		all_steps = unique_list([0])
+		pairs = []
+		for i = 1 to count(steps) do
+			pred = steps[i] - cumulation
+			pairs = pairs & [[pred,steps[i]]]
+			all_steps->add(pred)
+			all_steps->add(steps[i])
+		end for
+		steps = sort(all_steps->list())
+		req.step = steps
+
+		res = retrieve(req)
+		save_model(res)
+
+		codes = grib_codes()
+		filter = (data: res)
+		#-------- calculate the rain ----------
+		loop theDate in req.date
+			filter.date = theDate
+			loop theTime in req.time
+				filter.time = theTime
+				for i = 1 to count(pairs) do
+					step2 = pairs[i][2]
+					filter.step = step2
+					filter.param = "lsp"
+					lsp = read(filter)
+					filter.param = "cp"
+					cp = read(filter)
+					rain = lsp + cp
+					step1 = pairs[i][1]
+					if (step1 in req.step) then
+						filter.step = step1
+						filter.param = "lsp"
+						lsp = read(filter)
+						filter.param = "cp"
+						cp = read(filter)
+						print("substracting: ",step2," - ",step1)
+						rain = rain - lsp - cp
+					end if
+					field = field & change_grib(rain,codes.param.tp,[codes.step1.indx,step1,codes.step2.indx,step2,codes.timerange.indx,5])
+				end for
+			end loop
+		end loop
+		return field
+	end fieldset
+
+end tp_param
diff --git a/share/metview/app-defaults/CommonMacroFuncs/metops_instanciate b/share/metview/app-defaults/CommonMacroFuncs/metops_instanciate
new file mode 100644
index 0000000..2c1de7b
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/metops_instanciate
@@ -0,0 +1,29 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function metops_instanciate(parameter,request)
+	load_param_classes()
+
+	global map = (
+			"tp":	(param: "tp_param", args : [24]),
+			"tp5":	(param: "tp_param", args : [120]),
+			"tp10":	(param: "tp_param", args : [240]),
+			"ff":	(param: "ff10_param", args : []),
+			"ff10":	(param: "ff10_param", args : [])
+		)
+	
+	if (map[parameter] <> nil) then
+		return callargs(map[parameter].param,[request] & [map[parameter].args])	
+	else
+		return callargs("generic_param",[request,parameter])
+	end if
+
+end metops_instanciate
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_create_netcdf_2d b/share/metview/app-defaults/CommonMacroFuncs/mvl_create_netcdf_2d
new file mode 100644
index 0000000..8a0819e
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_create_netcdf_2d
@@ -0,0 +1,115 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_create_netcdf_2d
+#
+# Syntax        : netcdf mvl_create_netcdf_2d (dimension_name_1:string, dimension_vals_1:list,
+#                                              dimension_name_2:string, dimension_vals_2:list,
+#                                              var_name:string, var_values:list)
+#
+# Author (date) : Fernando Ii / Iain Russell (02/04/2007)
+#
+# Category      : NETCDF
+#
+# OneLineDesc   : Creates a 2-dimensional NetCDF file from lists of data
+#
+# Description   : Creates a 2-dimensional NetCDF file from lists of data
+#
+# Parameters    : dimension_name_1:string - the name to assign to the first dimension 
+#                 dimension_vals_1:list   - the first dimension values
+#                 dimension_name_2:string - the name to assign to the second dimension 
+#                 dimension_vals_2:list   - the second dimension values
+#                 var_name:string         - the name to assign to the variable
+#                 dimension_vals:list     - the variable values
+#
+#
+# Return Value  : A newly-created netcdf variable
+#
+# Dependencies  : None
+#
+# Example Usage : 
+#                 levels     = [1000, 925, 850]
+#                 geocoords  = [0, 5, 10, 15]
+#                 values     = [5, 3, 8, 6, 1, 4, 2, 3, 6, 7, 8, 6]
+#
+#                 net = mvl_create_netcdf_2d ('Levels', levels, 'Latitude', geocoords, 'AverageXSection', values)
+#
+#                 write (getenv ('SCRATCH') & '/result.nc', net)
+#
+# **************************************************************************
+
+function mvl_create_netcdf_2d (dimension_name_1:string, dimension_vals_1:list,
+                               dimension_name_2:string, dimension_vals_2:list,
+                               var_name:string, var_values:list)
+
+	# Open temporary file
+	fn = tmpfile()
+	fh = file(fn)
+
+	# Append global values
+	write(fh,"netcdf test {",newline)
+
+	# Append dimensions
+	write(fh,"dimensions:",newline)
+	write(fh,tab,dimension_name_1," = ",count(dimension_vals_1)," ;",newline)
+	write(fh,tab,dimension_name_2," = ",count(dimension_vals_2)," ;",newline)
+
+	# Append variables
+	write(fh,"variables:",newline)
+	write(fh,tab,"double ",dimension_name_1,"(",dimension_name_1,") ;",newline)
+	write(fh,tab,"double ",dimension_name_2,"(",dimension_name_2,") ;",newline)
+	write(fh,tab,"double ",var_name,"(",dimension_name_1,",",dimension_name_2,") ;",newline)
+
+	# Apend data
+	# First dimension
+	write(fh,"data:",newline)
+	write(fh,tab,dimension_name_1," = ")
+	for i = 1 to count(dimension_vals_1)-1 do
+		write(fh,dimension_vals_1[i],", ")
+	end for
+	write(fh,dimension_vals_1[count(dimension_vals_1)], " ;",newline)
+
+	# Second dimension
+	write(fh,tab,dimension_name_2," = ")
+	for i = 1 to count(dimension_vals_2)-1 do
+		write(fh,dimension_vals_2[i],", ")
+	end for
+	write(fh,dimension_vals_2[count(dimension_vals_2)], " ;",newline)
+
+	# Matrix
+	write(fh,tab,var_name," = ")
+	ind = 1
+	for i = 1 to count(dimension_vals_1)-1 do
+		for j = 1 to count(dimension_vals_2) do
+			write(fh,var_values[ind],", ")
+			ind = ind + 1
+		end for
+		write(fh,newline)
+	end for
+	for j = 1 to count(dimension_vals_2)-1 do  #last line
+		write(fh,var_values[ind],", ")
+		ind = ind + 1
+	end for
+	write(fh,var_values[ind], " ;",newline)
+
+	# Close file
+	write(fh,"}",newline)
+	fh = 0
+
+	# Convert text file to a netcdf file
+	fnet = tmpfile()
+	shell("ncgen -o " & fnet &" " & fn)
+	net = read(fnet)
+
+	return net
+
+end mvl_create_netcdf_2d
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_flextra_etadot b/share/metview/app-defaults/CommonMacroFuncs/mvl_flextra_etadot
new file mode 100755
index 0000000..cd69157
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_flextra_etadot
@@ -0,0 +1,173 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+#**************************************************************************
+# Function      : mvl_flextra_etadot
+#
+# Syntax        : fieldset mvl_flextra_etdot(spf:fieldset,
+#                                       etadot:fieldset)
+#
+# Author (date) : Sandor Kertesz, ECMWF (29/12/2011)
+#
+# Category      : INTERPOLATION
+#
+# OneLineDesc   : Computes the time derivate of eta fields needed by FLEXTRA
+#
+# Description   : This function multiplies the time derivative of eta (a.k.a. etadot)
+#		  		  fields by a factor to generate the fields needed by FLEXTRA.
+# 		          The formula applied in this function is as follows ("delta" stands
+#                 for the partial derivative in the formula):   
+# 
+#		          etadot_flextra = etadot_IFS * delta(pressure)/delta(eta)					
+#	
+#		          To achieve the highest possible precision vectors are used for carrying out
+#			      the computations.
+#
+#				  The function selects the first "sp" field from fieldset "spf" 
+#                 and reads the "date", "time", "step", "gridType" and "numberOfValues" 
+#                 parameters out of it. Then only those etadot fields from fieldset 
+#                 "etadot" that are matching these reference parameters are transformed.
+#
+#                 Fieldset "etadot" is sorted according to "shorName" and "level"
+#                 before the transformation takes place. This means that the resulting
+#                 fieldset might contain the fields in a different order than the input
+#                 "etadot" fieldset.
+#
+#                 Please note that this function works only for regular lat-long grids!
+#
+# Parameters    : spf  - fieldset containing the surface pressure field
+#                 etadot - fieldset on model levels containing the etadot fields 
+# 
+# Return Value  : fieldset containing the etadot fields needed by FLEXTRA
+#
+# Dependencies  : none
+#
+# Example Usage : 
+#
+# **************************************************************************
+
+
+function mvl_flextra_etadot(spf:fieldset,etadot:fieldset)
+
+#Initialise the output fieldset
+etadot_out=nil
+
+#Get sp field
+sp=nil
+loop f in spf
+	if sp = nil and grib_get_string(f,"shortName") = "sp" then
+		sp=f
+	end if	
+end loop
+		
+#Get some reference parameters from sp. These parameters 
+#must have the same value for all the etadot fields!
+
+rDate=grib_get_string(sp,"date")
+rTime=grib_get_string(sp,"time")
+rStep=grib_get_long(sp,"step")
+rType=grib_get_string(sp,"gridType")
+rNum=grib_get_long(sp,"numberOfValues")
+
+if rType <> "regular_ll" then
+	print("Grid type: ", rType)
+	fail("Non-supported grid type:  must be regular_ll!")
+end if	
+
+#Read surface pressure into a vector
+spVec=values(sp)
+
+#Reference pressure
+p00=101325.
+               
+#Initialise some parameterssetgribprecision(16)
+abIsRead=0
+lastCnt=0
+
+#Sort according to shortname and level
+etadot=sort(etadot,["shortName","level"],">")
+
+loop f in etadot
+	sName=grib_get_string(f,"shortName")			
+
+	#Read A and B coefficients
+	if sName = "etadot" and abIsRead = 0 then
+	
+		pv=grib_get_double_array(f,"pv")
+		nLev=count(pv)/2-1
+		ac=vector(nLev+1)
+		bc=vector(nLev+1)
+
+		for i=1 to nLev+1 do
+			ac[i]=pv[i]
+			bc[i]=pv[nLev+1+i]
+		end for
+
+		abIsRead=1
+
+	end if
+
+	#Read and process etadot fields
+	if sName = "etadot" then
+	
+		#If parameters do not match values from the sp field
+		# simply concatenates the field to the output fieldset
+		if rDate <> grib_get_string(f,"date") or
+	       rTime <> grib_get_string(f,"time") or
+           rStep <> grib_get_long(f,"step") or
+		   rType <> grib_get_string(f,"gridType") or
+           rNum  <> grib_get_long(f,"numberOfValues") then
+		 	
+		   etadot_out = etadot_out &f 
+		   
+		#Otherwise it does the etadot computation   	
+		else 	  		
+		   lev=grib_get_long(f,"level")
+		   delta_ac=ac[lev+1]-ac[lev]
+		   delta_bc=bc[lev+1]-bc[lev]
+		
+		   #print("lev=",lev," a=",ac[lev]," b=",bc[lev]," delta_a=",delta_ac," delta_bc=",delta_bc) 		
+		   
+		   #Get values
+           fVec=values(f)
+           
+           #Compute new values          
+       	   fVec=2.*fVec*spVec*(delta_ac/spVec+delta_bc)/(delta_ac/p00+delta_bc)
+         
+		   if lastCnt > 0 then
+		     lastLev=grib_get_long(etadot_out[lastCnt],"level")
+		     if lastLev <> lev-1 then
+		   	    fail("Missing level: ", lev-1," !")
+		     end if	 			  
+		     #Subtract the values of the previous level
+		     fVec=fVec-fVecPrev
+		  end if
+  
+          #Add the results to the output grib
+		  etadot_out = etadot_out & set_values(f,fVec)
+		
+		  #Save values of the previous level
+		  fVecPrev=fVec
+		
+		  lastCnt=count(etadot_out)
+	   end if
+
+	#Other fields
+	else
+		etadot_out = etadot_out &f 
+	end if		   
+
+end loop	
+
+return etadot_out
+
+end flextraEtaDot
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_geoline b/share/metview/app-defaults/CommonMacroFuncs/mvl_geoline
new file mode 100644
index 0000000..3b0edc3
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_geoline
@@ -0,0 +1,76 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2013 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_geoline
+#
+# Syntax        : definition mvl_geoline (left_lon : number, right_lon : number,
+#                                         top_lat  : number, bot_lat   : number, incrm : number,
+#                                         colour   : string, thickness : number, linestyle : string)
+#
+# Category      : VISUAL
+#
+# OneLineDesc   : Returns a line marking a line of interest
+#
+# Description   : Returns a visual definintion for drawing a line to mark
+#                 a geographical line of interest. This line is projection-independent.
+#
+# Parameters    : left_lon, right_lon, top_lat, bot_lat - coordinates of the
+#                   corners of the line in lat/long.
+#                 incrm     - the increments in which the line is drawn (degrees)
+#                             (not relevant for cylindrical projection)
+#
+# Return Value  : an Input Visualiser that may be used in a plot() command
+#
+# Example Usage : 
+#
+#                   left_lon  = -130
+#                   right_lon = -100
+#                   top_lat   = 60
+#                   bot_lat   = 30
+#                   incrm     = (right_lon - left_lon) / 100
+#
+#                   my_line = mvl_geoline(left_lon, right_lon, top_lat, bot_lat, incrm)
+#
+#                   plot ( display_window, data, my_line, mgraph())
+#
+# **************************************************************************
+
+function mvl_geoline (left_lon : number, right_lon : number,
+                      top_lat  : number, bot_lat   : number, incrm : number)
+                 
+	# calculates the line equation
+	a = (top_lat - bot_lat) / (right_lon - left_lon)
+	b = top_lat - a*right_lon
+
+	xcoord = nil
+	ycoord = nil
+	for x = left_lon to right_lon by incrm do
+		xcoord = xcoord & [x]
+		ycoord = ycoord & [a*x + b]
+	end for
+
+	# make sure the last point is included
+	xcoord = xcoord & [right_lon]
+	ycoord = ycoord & [a*right_lon + b]
+
+	# sets-up a curve with suitable vis def
+    geoline_curve = input_visualiser
+    (
+        input_plot_type        :    "geo_points",
+        input_longitude_values :    xcoord,
+        input_latitude_values  :    ycoord,
+        input_values           :    ycoord
+     )
+
+	return geoline_curve
+
+end mvl_geoline
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_geopotential_on_ml b/share/metview/app-defaults/CommonMacroFuncs/mvl_geopotential_on_ml
new file mode 100644
index 0000000..00c94d9
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_geopotential_on_ml
@@ -0,0 +1,185 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_geopotential_on_ml
+#
+# Syntax        : fieldset mvl_geopotential_on_ml (T:fieldset, q:fieldset, lnsp:fieldset, zs:fieldset)
+#
+# Author (date) : Iain Russell (12/07/2011)
+#
+# Category      : COMPUTATION
+#
+# OneLineDesc   : Computes geopotential on model levels
+#
+# Description   : Computes geopotential on model levels.
+#                 Based on code from Nils Wedi, the IFS documentation:
+#                 http://www.ecmwf.int/research/ifsdocs/DYNAMICS/Chap2_Discretization4.html
+#                 and an optimised implementation by Dominique Lucas.
+#
+# Parameters    : T    - fieldset of Temperature on model levels in ascending numeric order (e.g. 1-91)
+#                 q    - fieldset of specific humidity on model levels in ascending numeric order (e.g. 1-91)
+#                 lnsp - field of log of surface pressure on model level 1
+#                 zs   - field of geopotential on model level 1 (available from MARS)
+#                 All fields must be GRIDDED data - no spherical harmonics, and they must all be
+#                 on the same grid, with the same number of points.
+#
+# Return Value  : A fieldset of geopotential on model levels
+#
+# Dependencies  : None
+#
+# Example Usage : 
+#       r = (date: -1, time: 12, levtype: "ml", grid: [1.5,1.5])
+#       T    = retrieve(r,levelist: [1,"to",91],param: "t")
+#       q    = retrieve(r,levelist: [1,"to",91],param: "q")
+#       zs   = retrieve(r,levelist: 1,param: "z")
+#       lnsp = retrieve(r,levelist: 1,param: "lnsp")
+#       z_ml = mvl_geopotential_on_ml(T, q, lnsp, zs)
+#
+# **************************************************************************
+
+function mvl_geopotential_on_ml (T_fs:fieldset, q_fs:fieldset, lnsp_fs:fieldset, zs_fs:fieldset)
+
+    Rd = 287.06
+    g  = 9.80665
+
+
+    # do some basic checking on the input data - only check the first field of each fielset for efficiency
+
+    gridtype_t = grib_get_string(T_fs[1],    'gridType')
+    gridtype_q = grib_get_string(q_fs[1],    'gridType')
+    gridtype_l = grib_get_string(lnsp_fs[1], 'gridType')
+    gridtype_z = grib_get_string(zs_fs[1],   'gridType')
+
+    if (gridtype_t = 'sh' or gridtype_q = 'sh' or gridtype_l = 'sh' or gridtype_z = 'sh') then
+        fail ('mvl_geopotential_on_ml: fields must be gridded, not spectral')
+    end if
+
+
+
+    levelSize = count(T_fs)    # how many levels are we computing?
+
+    zs   = gridvals(zs_fs)     # extract the data for this field as a vector
+    lnsp = gridvals(lnsp_fs)   # extract the data for this field as a vector
+
+
+    pv = grib_get_double_array(zs_fs, 'pv') # for computing pressures at model levels
+    sp = exp(lnsp)                          # surface pressure
+    z_h = zs                                # orography
+
+
+    # get the coefficients for computing the pressures
+    
+    pv = grib_get_double_array(zs_fs, 'pv')
+    A = pv[1, levelSize+1]                #e.g. L-91: A=1..92, B=93..184
+    B = pv[levelSize+2, levelSize+levelSize+2]
+
+
+    z_f = z_h        # output vector
+    z_out_fs = nil   # output fieldset - the end result
+
+
+
+    # compute the bottom pressure (on half-levels)
+
+    Ph_levplusone = (A[levelSize+1] + (B[levelSize+1] * sp)) # initialise to the lowest numbered level
+
+
+    # We want to integrate up into the atmosphere, starting at the ground
+    # so we start at the lowest level (highest number) and keep
+    # accumulating the height as we go.
+    # See the IFS documentation:
+    # http://www.ecmwf.int/research/ifsdocs/DYNAMICS/Chap2_Discretization4.html
+    # For speed and file I/O, we perform the computations with vectors instead
+    # of fieldsets.
+
+
+
+    for lev = levelSize to 1 by -1 do
+
+        # we assume that the data are in (numerically) ascending level order - check if true
+
+        T_level = grib_get_long(T_fs[lev], 'level')
+        q_level = grib_get_long(q_fs[lev], 'level')
+
+        if (T_level <> lev) then
+            fail ('T field index ', lev, ' should be level ', lev, ' but it is ', T_level)
+        else if (q_level <> lev) then
+            fail ('q field index ', lev, ' should be level ', lev, ' but it is ', T_level)
+        end if
+
+
+        q = gridvals(q_fs[lev]) # extract the data for this field as a vector
+        T = gridvals(T_fs[lev]) # extract the data for this field as a vector
+
+
+        # quick check for data consistency
+
+        if ((count(q) <> count(T)) or
+            (count(q) <> count(sp)) or
+            (count(q) <> count(z_h))) then
+            errmsg = 'mvl_geopotential_on_ml: T, Q, LNSP and Z, must have the same number of grid points (they have ' &
+                      count(T) & ', ' & count(q) & ', ' & count(sp) & ' and ' & count(z_h) & ' respectively).'
+            fail(errmsg)
+        end if
+
+
+        T = T*(1.+0.609133*q)   # compute moist temperature
+        q = 0                   # free the memory for 'q'
+
+
+        # compute the pressures (on half-levels)
+
+        Ph_lev = (A[lev] + (B[lev] * sp))
+
+
+        if lev = 1 then
+            dlogP = log(Ph_levplusone/0.1) # Ph[lev] is zero, so don't divide by it
+            alpha = log(2)
+        else
+            dlogP = log(Ph_levplusone/Ph_lev)
+            dP    = Ph_levplusone-Ph_lev
+            alpha = 1 - Ph_lev/dP*dlogP
+        end if
+
+        TRd = T*Rd
+        T   = 0      # free memory for 'T'
+
+
+        # z_f is the geopotential of this full level
+        # integrate from previous (lower) half-level z_h to the full level
+
+        z_f = z_h + (TRd*alpha)
+
+
+        # z_h is the geopotential of 'half-levels'
+        # integrate z_h to next half level
+
+        z_h = z_h + (TRd*dlogP)
+
+
+        # store the result (z_f) in a field and add to the output fieldset
+        # (add it to the front, not the end, because we are going 'backwards'
+        # through the fields)
+
+        out_field = set_gridvals(T_fs[lev], z_f)
+        out_field = grib_set_long(out_field, ['paramId', 129,
+                                              'generatingProcessIdentifier',128,
+                                              'level', lev])
+        z_out_fs = out_field & z_out_fs
+
+        Ph_levplusone  = Ph_lev    # store for the next iteration, will be equivalent to (A[lev+1] + (B[lev+1] * sp))
+
+    end for
+
+    return z_out_fs
+
+end mvl_geopotential_on_ml
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_ml2hPa b/share/metview/app-defaults/CommonMacroFuncs/mvl_ml2hPa
new file mode 100644
index 0000000..bfff470
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_ml2hPa
@@ -0,0 +1,144 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# **************************************************************************
+# Function      : mvl_ml2hPa
+#
+# Syntax        : fieldset mvl_ml2hPa (lnsp:fieldset,
+#                                      mfld:fieldset,
+#                                      plist:list )
+#
+# Author (date) : Hans Hersbach, ECMWF (28/02/2011)
+#
+# Category      : INTERPOLATION
+#
+# OneLineDesc   : Interpolates a fieldset on model levels to pressure levels (in hPa)
+#
+# Description   : Interpolates a fieldset on model levels to pressure levels (in hPa).
+#                 Locations where interpolation is not possible are returned as missing.
+#                 Neither mfld nor plist need to be sorted.
+#
+# Parameters    : lnsp  - logarithm of surface pressure
+#                 mfld  - list of fieldsets on model levels
+#                 plist - list of pressure levels in hPa
+#                 
+#
+# Return Value  : list of fieldsets interpolated onto pressure levels
+#
+# Dependencies  : none
+#
+# Example Usage : 
+#                 plevels = [1000, 900, 850, 500, 300, 100, 10, 1, 0.1]
+#                 tpres = mvl_ml2hPa (lnsp, tmod, plevels)
+#
+# **************************************************************************
+
+function mvl_ml2hPa(lnsp:fieldset, mfld:fieldset, plist:list)
+
+# Returns interpolated fieldset from model to pressure levels (in hPa)
+# Locations where interpolation is not possible are returned as missing
+# Neither mfld nor plist needs to be sorted. All units in hPa
+
+#  lnsp  : logarithm of surface pressure                       ( input)
+#  mfld  : list of fieldsets on model levels                   ( input)
+#  plist : list of pressure levels in hPa                      ( input)
+#  ml2hPa: list of fieldsets interpolated onto pressure levels (output)
+
+# Hans Hersbach, 26 February 2011, ECMWF
+
+#-Find and sort model levels
+  mlist=grib_get_double(mfld,"level")
+  mlevs=sort        (mlist)
+  index=sort_indices(mlist)
+
+#-Get a's and b's on full model levels
+  abh=grib_get_double_array(mfld[1],"pv") 
+  nlevh=count(abh)/2
+  a   =nil
+  b   =nil
+  plev=nil
+  for i=1 to count(mlevs) do  # only pick the ones you'll need
+      ilev=mlevs[i]
+      jlev=mlevs[i] + nlevh
+      a   = a   & [ 0.01*(abh[ilev]+abh[ilev+1])/2 ]  # in hPa
+      b   = b   & [      (abh[jlev]+abh[jlev+1])/2 ]
+      plev=plev & [0]     
+      if ( b[i] = 0 ) then
+         a[i]=a[i]*(1-2.0E-5) # to avoid some strange rounding issues
+      end if
+  end for
+
+#-Find required range of model levels for the interpolation
+  ps = 0.01*exp(lnsp)
+  psmin=minvalue(ps)
+  psmax=maxvalue(ps)
+  imin=nil
+  imax=nil
+  for ipress = 1 to count(plist) do
+    press=plist[ipress]
+    i1=1
+    i2=1
+    for i=2 to count(mlevs)-1 do
+      if (a[i]+b[i]*psmax < press) then
+         i1 = i
+      end if
+      if (a[i]+b[i]*psmin < press) then
+         i2 = i
+      end if
+    end for
+    imin = imin & [i1]
+    imax = imax & [i2]
+
+#  -Pre-calculate the pressure fields you'll need
+    for i=i1 to i2+1 do
+      if (type(plev[i]) = type(0)) then
+         plev[i] = a[i] + b[i]*ps
+      end if
+    end for
+  end for
+
+#-Start interpolation; loop over pressure list
+  pfld=nil
+  for ipress = 1 to count(plist) do
+    press=plist[ipress]
+
+#  -Find bracketing levels p1 and p2, with field values f1 and f2
+    p1=0.*plev[imin[ipress]]
+    p2=0.*plev[imin[ipress]]
+    f1=0.*mfld[1]
+    f2=0.*mfld[1]
+    for i = imin[ipress]  to imax[ipress] do
+        ip = (plev[i]<=press) and (press<plev[i+1])
+        p1 = p1 + ip*plev[      i   ]
+        p2 = p2 + ip*plev[      i+1 ]
+        f1 = f1 + ip*mfld[index[i  ]]
+        f2 = f2 + ip*mfld[index[i+1]]
+    end for
+#  -Where interpolation not possible (e.g. below surface), set to missing
+    p1=bitmap(p1,0.)
+    p2=bitmap(p2,0.)
+
+#  -Interpolate, transform to pressure field, and add to fieldset list
+    fint= ( f1*(press-p2)+ f2*(p1-press) )/(p1-p2)
+
+    if (press >= 1) then
+        fpr = grib_set_long(fint,["levtype", 100, "level", press])  # in hPa
+    else
+        fpr = grib_set_long(fint,["levtype", 210, "level", press*100])  # in Pa
+    end if
+    pfld= pfld & fpr
+  end for
+
+#-Done!
+  return pfld
+
+end ml2hPa
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_mxn_subframes b/share/metview/app-defaults/CommonMacroFuncs/mvl_mxn_subframes
new file mode 100644
index 0000000..69bc92a
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_mxn_subframes
@@ -0,0 +1,73 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+# **************************************************************************
+# Function      : mvl_mxn_subframes
+#
+# Syntax        : list mvl_mxn_subframes (number, number)
+#
+# Author (date) : Anonymous (--/--/2003)
+#
+# Category      : LAYOUT
+#
+# OneLineDesc   : Generates a regular grid of subframes
+#
+# Description   : Creates a list of subframes, arranged in a
+#                 regular mxn grid. This list is suitable for
+#                 input into the function plot_page().
+#
+# Parameters    : subframe_cols - the number of subframes along the width
+#                                 of the frame.
+#                 subframe_rows - the number of subframes along the height
+#                                 of the frame.
+#
+# Return Value  : The list of subframes
+#
+# Dependencies  : None
+#
+# Example Usage : 
+#		  # create a list of subframes over 2 columns and 3 rows
+#		  subframe_list = mvl_mxn_subframes (2, 3)
+#
+#		  # create a frame divided into these subframes
+#		  frame   = plot_page( sub_pages	: subframe_list )
+#
+#		  # create a display window with this page
+#		  dw = plot_superpage ( pages : [frame])
+#
+# **************************************************************************
+
+function mvl_mxn_subframes (subframe_cols: number, subframe_rows: number)
+
+	subdelta_x = 100 / subframe_cols
+	subdelta_y = 100 / subframe_rows
+	subframe_list = []
+
+	for i = 1 to subframe_rows do
+		hi_pos = subdelta_y * (i-1)
+		lo_pos = subdelta_y * i
+		for j = 1 to subframe_cols do
+			left_pos  = subdelta_x * (j-1)
+			right_pos = subdelta_x * j
+			subframe = plot_subpage(
+					top	: hi_pos,
+					bottom  : lo_pos,
+					left    : left_pos,
+					right   : right_pos
+					)
+			subframe_list = subframe_list & [subframe]
+		end for
+	end for
+
+	return subframe_list
+
+end mvl_mxn_subframes
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_plot_scm_data b/share/metview/app-defaults/CommonMacroFuncs/mvl_plot_scm_data
new file mode 100755
index 0000000..a38ed2e
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_plot_scm_data
@@ -0,0 +1,1218 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2013 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_plot_scm_data
+#
+# Syntax        : mvl_plot_scm_data (definition)
+#
+# Author (date) : Iain Russell (05/12/2012)
+#
+# Category      : VISUAL
+#
+# OneLineDesc   : Creates plots interactively or in batch from SCM netCDF data
+#
+# Description   : Creates plots interactively or in batch from SCM netCDF data
+#
+# Parameters    : The input definition can contain some or all of the following
+#                 members. Note that it is valid to provide an empty definition,
+#                 in which case all input will be taken from the user interface.
+#                   mode - 'interactive' (user interface pops up) or 'batch'
+#                   netcdf_1 - path to the 'main' netCDF file
+#                   netcdf_2 - path to the 'comparison' netCDF file
+#                   title_1 - title to appear in the legend for the first data
+#                   title_2 - title to appear in the legend for the comparison data
+#                   comparison_mode - 'overlay' or 'difference'
+#                   output_mode - 'postscript' or 'screen'
+#                   output_path - only if mode='batch'. Do not supply an extension.
+#                   param_selection - 'list', 'file' or 'all'
+#                   param_list_path - path to a text file containing each parameter name on a new line
+#                   param_list - if param_selection is 'list'
+#                   y_min_list - list of bottom levels for the y-axis. Each entry should be a number or 'auto'.
+#                   y_max_list - list of top levels for the y-axis. Each entry should be a number or 'auto'.
+#                   x_min_list - list of minimums for the x-axis. Each entry should be a number or 'auto'.
+#                   x_max_list - list of maximums for the x-axis. Each entry should be a number or 'auto'.
+#                   value_min_list - list of minimums for the values Each entry should be a number or 'auto'. Only for matrix plots.
+#                   value_max_list - list of maximums for the values Each entry should be a number or 'auto'. Only for matrix plots.
+#                   grid - 'on' to plot the axis grids, 'off' otherwise
+#
+# Return Value  : None
+#
+# Dependencies  : None
+#
+# Example Usage : 
+#                 # default: pop up a user interface to get user input to the plot
+#                   scm_plot_params = ()
+#                   mvl_plot_scm_data(scm_plot_params)
+#
+#                 # batch usage: supply parameters here; no user interface
+#                   scm_plot_params = 
+#                   (
+#                       mode            : 'batch',
+#                       netcdf_1        : 'scm_out.nc',
+#                       netcdf_2        : 'scm_out_2.nc',
+#                       title_1         : 'Expt 1',
+#                       title_2         : 'Expt 2',
+#                       comparison_mode : 'overlay',
+#                       plot_type       : 'profile',  # 'profile' is the only accepted string here; anthing else means 'not profile'
+#                       output_mode     : 'ps',
+#                       output_path     : 'scm_out',
+#                       param_selection : 'list',
+#                       param_list_path : nil,
+#                       param_list      : ['t_skin', 'top_lwrad_clr', 'u_wind_10m'],
+#                       times           : [0, 'to', 'last', 'by', 180]
+#                   )
+#
+#                   mvl_plot_scm_data(scm_plot_params)
+#
+# **************************************************************************
+
+function mvl_plot_scm_data
+
+    args = ()
+
+    arglist = arguments()
+
+    if count(arglist) <> 0 then
+        args = arglist[1]
+    end if
+
+print(arglist)
+    # sanity check on the input arguments
+
+    if args.mode <> nil then
+        if args.mode <> 'interactive' and args.mode <> 'batch' then
+            fail("Argument 'mode' should be 'interactive' or 'batch'. It is ", args.mode)
+        end if
+    end if
+
+    if args.comparison_mode <> nil then
+        if args.comparison_mode <> 'overlay' and args.comparison_mode <> 'difference' then
+            fail("Argument 'comparison_mode' should be 'overlay' or 'difference'. It is ", args.comparison_mode)
+        end if
+    end if
+
+    if args.mode <> nil then
+        if args.output_mode <> 'postscript' and args.output_mode <> 'screen' then
+            fail("Argument 'output_mode' should be 'postscript' or 'screen'. It is ", args.output_mode)
+        end if
+    end if
+
+    if args.param_selection <> nil then
+        if args.param_selection <> 'list' and args.param_selection <> 'file' and args.param_selection <> 'all' then
+            fail("Argument 'param_selection' should be 'list', 'file' or 'all'. It is ", args.param_selection)
+        end if
+    end if
+
+
+    # fill in the argument definition with defaults if not specified
+
+    if args.mode = nil then
+        args.mode = 'interactive'
+    end if
+
+    if args.comparison_mode = nil then
+        args.comparison_mode = 'overlay'
+    end if
+
+    if args.param_selection = nil then
+        args.param_selection = 'list'
+    end if
+
+    if args.output_path = nil then
+        args.output_path = 'scm_out'
+    end if
+
+    if args.output_mode = nil then
+        args.output_mode = 'screen'
+    end if
+
+    if args.title_1 = nil then
+        args.title_1 = ''
+    end if
+
+    if args.title_2 = nil then
+        args.title_2 = ''
+    end if
+
+    
+    # make output_path into an absolute path
+
+    args.output_path = make_path_absolute(args.output_path)
+
+
+    # when running from the command line, we have to force certain options
+
+    if runmode() = 'batch' then
+        args.mode        = 'batch'
+        args.output_mode = 'postscript'
+    end if
+
+
+    #print(args)
+
+
+    if args.mode = 'interactive' then
+
+        # ---------------- #
+        # interactive mode #
+        # ---------------- #
+
+
+        ui_comparison_mode = option_menu
+        (
+            name    : "comparison mode",
+            values  : ["overlay", "difference"],
+            default : args.comparison_mode
+        )
+
+        ui_netcdf_1 = icon
+        (
+            name  : "input data 1",
+            class : "NETCDF"
+        )
+
+        ui_netcdf_2 = icon
+        (
+            name  : "input data 2",
+            class : "NETCDF"
+        )
+
+        input = dialog([ui_comparison_mode, ui_netcdf_1, ui_netcdf_2])
+
+        compmode  = input['comparison mode']
+        netcdf_1  = input['input data 1']
+        netcdf_2  = input['input data 2']
+
+        if netcdf_1 = nil then
+            fail('Must supply at least one netCDF icon as input')
+        end if
+
+
+        # ------------------------------------------
+        # user dialog 3 - ask for the parameter(s)
+        # ------------------------------------------
+
+        # parse the parameters from the input netCDF file
+
+        vardef = parse_netcdf_vars(netcdf_1)
+
+        t = generate_vars_help(netcdf_1, vardef)
+
+        dialog_options = nil
+
+        ui_param_selection_mode = option_menu
+        (
+            name    : "parameter selection",
+            values  : ["list", "file", "all"],
+            default : args.param_selection
+        )
+
+        ui_param_list = any
+        (
+            name    : "parameter list",
+            default : 't',
+            help    : "help_script",
+            #help_script_command : "echo list of forward-slash-separated parameter names"
+            #help_script_command : "
+            help_script_command : "echo list of forward-slash-separated parameter names; cat " & t
+        )
+
+        ui_param_file = icon
+        (
+            name  : "parameter file",
+            class : "NOTE"
+        )
+
+        ui_param_output_mode = option_menu
+        (
+            name    : "output mode",
+            values  : ["screen", "postscript"],
+            default : args.output_mode
+        )
+
+        outpath = args.output_path
+
+        ui_outpath = any
+        (
+            name    : "output file path",
+            default : outpath
+        )
+
+
+        input = dialog([ui_param_selection_mode, ui_param_list, ui_param_file, ui_param_output_mode, ui_outpath])
+
+        param_selection_mode = input["parameter selection"]
+
+        if param_selection_mode = 'list' then   # user provided an inline list of parameters
+            selected_vars = input['parameter list']
+
+        else if param_selection_mode = 'file' then # user gave a file with a list of parameters to plot
+            parmlist = input["parameter file"]
+
+            if parmlist <> nil then 
+                parmlistpath = parmlist.PATH
+            else
+                fail("Parameter selection was set to 'file', but no icon was supplied")
+            end if
+
+        else # put all the available variable indexes into a list - we will try to plot them all
+            selected_vars = vardef.vars
+        end if
+
+
+        y_max_list = nil
+        y_min_list = nil
+
+        x_min_list = nil
+        x_max_list = nil
+
+        value_min_list = nil
+        value_max_list = nil
+
+        grid = 'off'
+
+        outmode  = input["output mode"]
+        outpath  = input["output file path"]
+
+    else
+
+        # ---------- #
+        # batch mode #
+        # ---------- #
+
+        compmode = args.comparison_mode
+
+        netcdf_1_path = args.netcdf_1
+        if netcdf_1_path = nil then
+            fail('Must supply netcdf_1')
+        else
+            netcdf_1_path = make_path_absolute(netcdf_1_path)
+            netcdf_1 = read(netcdf_1_path)
+        end if
+
+        netcdf_2 = nil
+        netcdf_2_path = args.netcdf_2
+        if netcdf_2_path <> nil then
+            netcdf_2_path = make_path_absolute(netcdf_2_path)
+            netcdf_2 = read(netcdf_2_path)
+        end if
+
+
+        param_selection_mode = args.param_selection
+
+        if param_selection_mode = 'list' then   # user provided an inline list of parameters
+            selected_vars = args.param_list
+        else if param_selection_mode = 'file' then # user gave a file with a list of parameters to plot
+            parmlistpath = param_list_path
+        else # put all the available variable indexes into a list - we will try to plot them all
+            selected_vars = vars
+        end if
+
+
+        plot_type = args.plot_type
+        times     = args.times
+
+        y_max_list = args.y_max_list
+        y_min_list = args.y_min_list
+
+        x_min_list = args.x_min_list
+        x_max_list = args.x_max_list
+
+        value_min_list = args.value_min_list
+        value_max_list = args.value_max_list
+
+        grid = args.grid
+
+
+        outmode = args.output_mode
+        outpath = args.output_path
+
+
+        # Read netcdf file
+        file_nc = netcdf_1
+
+
+        # parse the parameters from it
+        vardef = parse_netcdf_vars(file_nc)
+
+
+    end if # interactive or batch
+
+
+
+
+    # ----------------------------------------- #
+    # User input obtained, start the processing #
+    # ----------------------------------------- #
+
+
+    # read the list of parameters from a file?
+    if param_selection_mode = 'file' then
+        parmlistpath = parmlist.PATH
+        selected_vars = read(parmlistpath)
+    end if
+
+
+    # (hopefully temporary) mesaure: since we can't yet plot multiple parameters
+    # interactively, we will have to plot just the first one
+
+    if outmode = 'screen' then
+        if count(selected_vars) > 1 then
+            print('Can only plot 1 variable in interactive mode - will plot just the first one')
+            selected_vars = [selected_vars[1]]
+        end if
+    end if
+
+
+    # construct a list of variable indexes from their names
+    plot_var_indexes = nil
+    for i = 1 to count(selected_vars) do
+        index = find(vardef.vars, selected_vars[i])
+        if index = nil then
+            fail('Could not find variable ' & selected_vars[i] & ' in netCDF file')
+        else
+            plot_var_indexes = plot_var_indexes & [index]
+        end if
+    end for
+
+
+    print('Plotting parameters: ', selected_vars, ' ; indexes: ', plot_var_indexes)
+
+
+
+    if outmode = 'postscript' then
+        print('Will generate output plot in ', outpath)
+        psfile = ps_output(output_name : outpath)
+        setoutput(psfile)
+    end if
+
+
+
+
+    # plots can have restrictions on their axes' limits
+
+    if y_min_list <> nil then
+        if count(y_min_list) <> count(selected_vars) then
+            fail('y_min_list should have the same number of entries as the number of parameters.')
+        end if
+    end if
+
+    if y_max_list <> nil then
+        if count(y_max_list) <> count(selected_vars) then
+            fail('y_max_list should have the same number of entries as the number of parameters.')
+        end if
+    end if
+
+    if x_min_list <> nil then
+        if count(x_min_list) <> count(selected_vars) then
+            fail('x_min_list should have the same number of entries as the number of parameters.')
+        end if
+    end if
+
+    if x_max_list <> nil then
+        if count(x_max_list) <> count(selected_vars) then
+            fail('x_max_list should have the same number of entries as the number of parameters.')
+        end if
+    end if
+
+    if value_min_list <> nil then
+        if count(value_min_list) <> count(selected_vars) then
+            fail('value_min_list should have the same number of entries as the number of parameters.')
+        end if
+    end if
+
+    if value_max_list <> nil then
+        if count(value_max_list) <> count(selected_vars) then
+            fail('value_max_list should have the same number of entries as the number of parameters.')
+        end if
+    end if
+
+
+    if (x_min_list <> nil and x_max_list = nil) or (x_min_list = nil and x_max_list <> nil)
+    then
+        fail('Cannot specify only one of x_min_list and x_max_list - provide both or neither.')
+    end if
+
+
+    # if plotting profiles, then expand the time steps
+    # e.g.
+    #   0/to/last/by/180
+    #   900,1800,2700
+    #   0/to/2700
+
+    if plot_type = 'profile' then
+
+        if type(times) <> 'list' then
+            times = [times]
+        end if
+
+
+        first_time = times[1] * 60  # convert from minutes (user) to seconds (file)
+
+
+        if count(times) > 1 then
+            if type(times[2]) = 'string' then   # ASSUME a 'TO' b  (1,2,3)
+                second_time = times[3]
+
+                if type(second_time) = 'string' then # ASSUME a 'TO' 'LAST'
+                    setcurrent(netcdf_1, vardef.time_var_index)  # get the last time
+                    all_times = values(netcdf_1)
+                    second_time = all_times[count(all_times)]  # already in seconds
+                end if
+
+                if count(times) > 4 then  # ASSUME a 'TO' b 'BY' s
+                    timestep = times[5] * 60  # # convert from minutes (user) to seconds (file)
+
+                    times = nil # construct the list of times
+                    for t = first_time to second_time by timestep do
+                        times = times & [t]
+                    end for
+                else
+                    # no step given - use all available times between first and second
+                    times_to_use = (all_times >= first_time) * (all_times <= second_time)
+                    times = filter(all_times, times_to_use)
+                end if
+
+            else  # 'times' is just a list of times which we can use directly
+
+                times = times * 60  # convert from minutes (user) to seconds (file)
+
+            end if
+
+        else  # just a single time
+            times = times * 60  # convert from minutes (user) to seconds (file)
+        end if
+
+        print('Computed times: ', times)
+
+    end if  # profile
+
+
+
+    # convert seconds to days
+    #setcurrent(file_nc, 4)
+    #file_nc = file_nc / (60*60*24)
+
+
+
+    # decide whether to plot both netCDF files in overlay mode, or to compute
+    # the difference and plot that by itself
+
+    nc_files = nil
+
+    if compmode = 'overlay' then
+        if netcdf_1 <> nil then nc_files = nc_files & [netcdf_1] end if
+        if netcdf_2 <> nil then nc_files = nc_files & [netcdf_2] end if
+    else
+        a = 1 # for syntax correctness
+        if netcdf_2 = nil then
+            fail('Must supply a second netCDF icon')
+        end if
+
+        #setcurrent(netcdf_1, i)
+        #setcurrent(netcdf_2, i)
+        nc_files = [netcdf_1]# - netcdf_2]
+    end if
+
+
+
+
+    graph_line_colours = ['blue', 'red']
+
+
+
+    for j = 1 to count(plot_var_indexes) do
+
+        i = plot_var_indexes[j]
+
+        if not(i in vardef.reserved_var_indexes) and i<>nil then
+
+            # -------------------------------------------
+            # plotting - gather plot info for each netCDF
+            # -------------------------------------------
+
+            to_plot        = nil
+            all_yvals      = nil
+            plot_this_var  = 0
+            second_axis    = 0 # will be plot a second axis? In practice, this is a pressure axis
+            pres_positions = 0
+            pres_labels    = 0
+            pres_title     = 0
+
+            for n = 1 to count(nc_files) do
+
+                file_nc = nc_files[n]
+
+                # look at this variable to see what its dimensions are
+                setcurrent(file_nc, i)
+                dim_names = dimension_names(file_nc)
+                #print(i, tab, dim_names)
+                if count(dim_names) = 1 then
+                    xdim_name = dim_names[1]
+                        plot_this_var = 1
+
+                        if compmode = 'difference' then
+                            setcurrent(netcdf_2, i)
+                            file_nc = file_nc - netcdf_2
+                        end if
+
+
+                        # visualiser to plot the data
+                        line_plot = netcdf_visualiser
+                        (
+                            netcdf_plot_type      : "xy_points",
+                            netcdf_x_variable     : xdim_name,
+                            netcdf_y_variable     : vardef.vars[i],
+                            netcdf_value_variable : vardef.vars[i],
+                            netcdf_data           : file_nc
+                        )
+
+                        # visual definition to apply to the plot
+                        line_visdef = mgraph
+                        (
+                            legend            : 'on',
+                            graph_line_colour : graph_line_colours[n]
+                        )
+
+                        to_plot = to_plot & [line_plot, line_visdef]
+
+                        # we'll need to combine all the actual values for later
+                        all_yvals = all_yvals & values(file_nc)
+
+                        y_axis_title = ''
+                    #else
+                        #print ('Variable ', vardef.vars[i], ' has BAD dims ', xdim_name)
+                    #end if
+
+                else  # 2D matrix or profile plot
+
+                    a = 1 # for syntax
+
+                    if args.mode = 'batch' or  n = 1  or compmode = 'difference' then
+
+                        #xdim_index = find(vardef.reserved_var_sizes, dims[1])
+                        #if xdim_index <> nil then
+                            plot_this_var = 1
+                            xdim_name = dim_names[1] #vardef.reserved_var_names[xdim_index]
+                            ydim_name = dim_names[2] #vardef.reserved_var_names[ydim_index]
+                            ydim_idx = find(vardef.reserved_var_names, ydim_name)
+
+                            # if y-axis is model levels, then we should plot a pressure axis too
+                            if ydim_name = 'nlev' then  # full pressure levels
+                                second_axis = 1
+                                pres_var = 'pressure_f'
+                            else if ydim_name = 'nlevp1' then # half pressure levels
+                                second_axis = 1
+                                pres_var = 'pressure_h'
+                            end if
+
+                            if ydim_idx <> nil then
+
+                                if compmode = 'difference' then
+                                    setcurrent(netcdf_2, i)
+                                    file_nc = file_nc - netcdf_2
+                                end if
+
+
+                                if plot_type = 'profile' then   # PROFILE CURVES
+
+                                    xdim_name =  vardef.vars[i]
+                                    ydim_name = dim_names[2]
+                                    ydim_idx = find(vardef.reserved_var_names, ydim_name)
+
+                                    rgb1_start = [0.0, 0.0, 0.5]
+                                    rgb1_end   = [0.2, 0.8, 1.0]
+
+                                    rgb2_start = [0.8, 0.0, 0.0]
+                                    rgb2_end   = [1.0, 0.8, 0.1]
+
+                                    colours_1 = interpolate_colours_rgb(rgb1_start, rgb1_end, count(times))
+                                    colours_2 = interpolate_colours_rgb(rgb2_start, rgb2_end, count(times))
+
+                                    for ti = 1 to count(times) do
+
+                                        ncvis = netcdf_visualiser
+                                        (
+                                            netcdf_plot_type         : "xy_points",
+                                            netcdf_x_variable        : vardef.vars[i],
+                                            netcdf_y_variable        : ydim_name,
+                                            netcdf_value_variable    : vardef.vars[i],
+                                            netcdf_dimension_setting : ["time/"&times[ti]],
+                                            netcdf_data              : file_nc
+                                        )
+
+                                        if ti = 1 then profile_legend = 'on'
+                                        else           profile_legend = 'off'
+                                        end if
+
+                                        if n = 1 then   # first netCDF file
+                                            rgb = colours_1[ti]
+                                        else           # second netCDF file
+                                            rgb = colours_2[ti]
+                                        end if
+
+                                        rgb = "RGB(" & round (rgb[1], 5) & "," & round (rgb[2], 5) & "," & round (rgb[3], 5) & ")"
+
+
+                                        if times[ti] = 0 then
+                                            line_thickness = 3
+                                            line_style = 'dash'
+                                        else
+                                            line_thickness = 1
+                                            line_style = 'solid'
+                                        end if
+                                        #print(rgb)
+
+                                        gp = mgraph(legend               : profile_legend,
+                                                    graph_line_colour    : rgb,
+                                                    graph_line_thickness : line_thickness,
+                                                    graph_line_style     : line_style)
+
+                                        to_plot = to_plot & [ncvis, gp]
+
+                                    end for
+
+                                else   # MATRIX
+
+
+                                    # visualiser to plot the data
+                                    matrix_plot = netcdf_visualiser
+                                    (
+                                        netcdf_plot_type      : "xy_matrix",
+                                        netcdf_x_variable     : xdim_name,
+                                        netcdf_y_variable     : ydim_name,
+                                        netcdf_value_variable : vardef.vars[i],
+                                        netcdf_data           : file_nc
+                                    )
+
+                                    # visual definition to apply to the plot
+                                    if n = 1 then   # first netCDF, shaded
+
+                                        # user-defined min/max contour levels?
+                                        min_max_value_def = ()
+                                        min_value = 'auto'
+                                        if value_min_list <> nil then
+                                             min_value = value_min_list[j]
+                                        end if
+                                        if type(min_value) = 'number' then
+                                            min_max_value_def.contour_min_level = min_value
+                                        end if
+
+                                        max_value = 'auto'
+                                        if value_max_list <> nil then
+                                             max_value = value_max_list[j]
+                                        end if
+                                        if type(max_value) = 'number' then
+                                            min_max_value_def.contour_max_level = max_value
+                                        end if
+
+                                        matrix_cont = mcont
+                                        (
+                                            legend                         : "on",
+                                            contour                        : "off",
+                                            contour_highlight              : "off",
+                                            contour_shade                  : "on",
+                                            contour_shade_method           : "area_fill",
+                                            contour_shade_max_level_colour : "red",
+                                            contour_shade_min_level_colour : "blue",
+                                            contour_shade_colour_direction : "clockwise",
+                                            contour_label                  : "off",
+                                            min_max_value_def
+                                        )
+                                    else # 2nd data
+                                        matrix_cont = mcont
+                                        (
+                                            contour                 : "on",
+                                            contour_line_colour     : 'black',
+                                            contour_line_thickness  : 2,
+                                            contour_highlight       : "off",
+                                            contour_label           : "on"
+                                        )
+                                    end if
+
+                                    to_plot = to_plot & [matrix_plot, matrix_cont]
+
+
+                                end if
+
+                                # store the y values so we can later get a nice y-axis
+                                ydim_index = find(vardef.vars, ydim_name)
+                                setcurrent(file_nc, ydim_index)
+
+                                all_yvals = all_yvals & values(file_nc)
+
+
+                                # y-axis title
+                                attrs = attributes(file_nc)
+                                y_axis_title = attrs.long_name
+                                if y_axis_title = nil then y_axis_title = '' end if
+                            else
+                                print ('Variable ', vardef.vars[i], ' has BAD dims ', ydim_name)
+                                plot_this_var = 0
+                            end if
+                        #else
+                        #    print ('Variable ', vardef.vars[i], ' has BAD dims ', xdim_name)
+                        #end if
+
+                    else
+
+                        print('Cannot (yet) overlay plots in interactive mode - not plotting ', vardef.vars[i])
+                        plot_this_var = 0
+
+                    end if # args.mode = 'batch', etc
+
+                end if  # 1D/2D
+
+            end for  # for each netCDF
+
+
+
+            if plot_this_var then
+
+
+                # ----------------------------------
+                # get information for the plot title
+                # ----------------------------------
+                setcurrent(file_nc, i)
+                attrs = attributes(file_nc)
+
+                gattrs         = global_attributes(file_nc)
+                att_title      = gattrs.title
+                att_start_day  = gattrs.start_day
+                att_start_hour = gattrs.start_hour
+
+                title_line_1 = att_title
+                title_line_2 = 'Start day: ' & att_start_day & ' Start hour: ' & att_start_hour
+                title_line_3 = ''
+                if attrs.long_name <> nil then
+                    title_line_3 = title_line_3 & attrs.long_name
+                end if
+                if attrs.units <> nil then
+                    title_line_3 = title_line_3 & ' (' & attrs.units & ')'
+                end if
+                if compmode = 'difference' then
+                    title_line_3 = title_line_3 & ' [difference]'
+                end if
+
+                title = mtext
+                (
+                    text_line_count : 3,
+                    text_line_1     : title_line_1,
+                    text_line_2     : title_line_2,
+                    text_line_3     : title_line_3,
+                    text_font_size  : 0.35
+                )
+
+
+
+                # ------------------------------
+                # get information for the x-axis
+                # ------------------------------
+
+                xdim_index = find(vardef.vars, xdim_name)
+                setcurrent(file_nc, xdim_index)
+                attrs   = attributes(file_nc)
+                x_name  = xdim_name
+                x_units = attrs.units
+                if x_units = nil then
+                    x_units_text = ''
+                else
+                    x_units_text = ' (' & x_units & ')'
+                end if
+                x_axis_title = x_name & x_units_text
+
+                xmin = 'auto'
+                xmax = 'auto'
+                if x_min_list <> nil then
+                    xmin = x_min_list[j]
+                    xmax = x_max_list[j]
+                end if
+
+
+                # ------------------------------
+                # get information for the y-axis
+                # ------------------------------
+
+                num_dims = count(dim_names)
+
+                min_level = 'auto'
+                if y_min_list <> nil then
+                     min_level = y_min_list[j]
+                end if
+
+                max_level = 'auto'
+                if y_max_list <> nil then
+                     max_level = y_max_list[j]
+                end if
+
+
+                # figure out the 'global' min/max for all data files (if not user specified)
+                if max_level = 'auto' then
+                    if num_dims = 1 then ymax = maxvalue(all_yvals)
+                    else                 ymax = minvalue(all_yvals) # 2D (height) plots are upside down
+                    end if
+                else 
+                    ymax = max_level
+                end if
+
+                if min_level = 'auto' then
+                    if num_dims = 1 then ymin = minvalue(all_yvals)
+                    else                 ymin = maxvalue(all_yvals) # 2D (height) plots are upside down
+                    end if
+                else
+                    ymin = min_level
+                end if
+
+
+
+                if num_dims = 1 then
+                    adjustment = 0.1 * (ymax - ymin)  # leave a 10% gap around the y limits
+                    if ymin <> 0 then ymin = ymin - adjustment end if
+                    ymax = ymax + adjustment
+
+                    if ymin = ymax then
+                        ymin = ymin - 1
+                        ymax = ymax + 1
+                    end if
+                end if
+
+
+                if second_axis then   # plot a pressure axis on the right?
+                    pres_index = find(vardef.vars, pres_var)
+                    if pres_index <> nil then
+                        pres_title = 'Pressure (hPa)'
+                        setcurrent(file_nc, pres_index)
+                        all_pres = values(file_nc)
+                        d = dimensions(file_nc)
+                        pres = all_pres[1,d[count(d)]] # get the pressures for the 1st time step
+                        num_pres = count(pres)
+                        pres_positions = nil
+                        pres_labels    = nil
+                        for pi = num_pres to 1 by -10 do
+                            tpres = pres[pi]/100 # 'tpres' = 'this pressure'
+                            rpres = round(tpres, min(3-log10(tpres),2)) # rounded pressure
+                            pres_positions = pres_positions & [pi]
+                            pres_labels    = pres_labels & [rpres]
+                        end for
+                    else
+                        second_axis = 0 # pressure variable not found - do not plot 2nd axis
+                    end if
+                end if
+
+
+                if num_dims = 1 or plot_type = 'profile' then
+                    # define the legend
+                    legend_curves = mlegend
+                    (
+                        legend_display_type     : "disjoint",
+                        legend_text_composition : "user_text_only",
+                        legend_text_font_size   : 0.3,
+                        legend_user_lines       : [args.title_1, args.title_2]
+                    )
+                    to_plot = to_plot & [legend_curves]
+                end if
+
+                # -----------
+                # do the plot
+                # -----------
+
+                dw = scm_build_layout(ymin, ymax, xmin, xmax, x_axis_title, y_axis_title,
+                                      second_axis, pres_positions, pres_labels, pres_title,
+                                      grid)
+
+                if second_axis then
+                    plot(dw[2])
+                end if
+
+                plot(dw[1], to_plot, title)
+
+                newpage(dw)
+
+            end if  # plot_this_var
+
+        end if #if not(i in reserved_var_indexes)
+    end for  
+
+
+
+    function scm_get_var_sizes (nc: netcdf, all_vars: list, vars: list)
+
+        sizes = nil
+
+        for i = 1 to count(vars) do
+            index = find(all_vars, vars[i])
+            setcurrent(nc, index)
+            dims = dimensions(nc)
+            sizes = sizes & [dims[1]]
+        end for
+
+        return sizes
+
+    end scm_get_var_sizes
+
+
+    function scm_build_layout(ymin, ymax, xmin, xmax, xtitle, ytitle,
+                              second_axis, pres_positions, pres_labels, pres_title,
+                              grid)
+
+
+        grid_def = 
+        (
+            axis_grid             : grid,
+            axis_grid_colour      : 'black',
+            axis_grid_line_style  : 'dash'
+        )
+
+
+        horizontal_axis = maxis
+        (
+            axis_title_text : xtitle,
+            grid_def
+        )
+
+
+        vertical_axis = maxis
+        (
+            axis_orientation : 'vertical',
+            axis_title_text  : ytitle,
+            grid_def
+        )
+
+
+        if xmin = 'auto' then
+            x_def = (x_automatic  : 'on')
+        else
+            x_def = (x_min : xmin, x_max : xmax)
+        end if
+
+
+        if second_axis then subpage_x_position = 8
+        else                subpage_x_position = 11 # smaller to make room for second axis
+        end if
+
+
+        # view & page definition
+        cview = cartesianview
+        (  
+            x_def,
+            #y_automatic  : 'on'
+            y_min : ymin,
+            y_max : ymax,
+            horizontal_axis    : horizontal_axis,
+            vertical_axis      : vertical_axis,
+            subpage_x_position : subpage_x_position
+        )
+
+        page = plot_page
+        (  
+            view   : cview
+        )  
+
+        pages = [page]
+
+
+        # second (ie pressure) axis to be plotted on the right?
+        if second_axis then
+
+            pres_axis = maxis
+            (
+                axis_orientation            : "vertical",
+                axis_position               : "right",
+                axis_type                   : "position_list",
+                axis_tick_position_list     : pres_positions,
+                axis_tick_label_type        : "label_list",
+                axis_tick_label_list        : pres_labels,
+                #axis_tick_label_frequency   : 20,
+                axis_title_text             : pres_title
+
+            )
+#            print(pres_positions)
+#            print(pres_labels)
+            empty_h_axis = maxis
+            (
+                axis_orientation : "horizontal",
+                axis_line       : "off",
+                axis_title      : "off",
+                axis_tick       : "off",
+                axis_tick_label : "off"
+            )
+            cview2 = cartesianview
+            (  
+                x_min              : 1,  # dummy values
+                x_max              : 2,  # dummy values
+                y_min              : ymin,
+                y_max              : ymax,
+                vertical_axis      : pres_axis,
+                horizontal_axis    : empty_h_axis,
+                subpage_frame      : 'off',
+                subpage_x_position : subpage_x_position
+            )
+            page2 = plot_page
+            (  
+                view   : cview2
+            )
+            pages = pages & [page2]
+        end if
+
+
+
+        # superpage definition 
+        display_window = plot_superpage
+        (  
+            layout_size         : "a4", 
+            layout_orientation  : "landscape", 
+            custom_width        : 29.0, 
+            custom_height       : 21.0, 
+            pages               : pages 
+         ) 
+
+        return display_window
+
+    end scm_build_layout
+
+
+
+    function make_path_absolute(path: string)
+
+        first_char = substring(path, 1, 1)
+        if first_char <> '/' then
+            path = getenv('PWD') & "/" & path
+        end if
+        return path
+
+    end make_path_absolute
+
+
+    function parse_netcdf_vars(nc: netcdf)
+
+        def = ()  # we will returns a definition will various bits of information
+
+        # get the list of variables in the file
+        def.vars = variables(nc)
+
+
+        # get the lists of 'special' variables
+        nlev_var_index   = find(def.vars, 'nlev')
+        nlevp1_var_index = find(def.vars, 'nlevp1')
+        nlevs_var_index  = find(def.vars, 'nlevs')
+        time_var_index   = find(def.vars, 'time')
+
+        if (nlev_var_index = nil or nlevp1_var_index = nil or nlevs_var_index = nil or time_var_index = nil) then
+            fail ('ERROR: Expected to find nlev, nlevp1, nlevs and time variables in netCDF file ', nc_filename)
+        end if
+
+
+        def.reserved_var_indexes = [nlev_var_index, nlevp1_var_index, nlevs_var_index, time_var_index]
+        def.reserved_var_names   = ['nlev', 'nlevp1', 'nlevs', 'time']
+        def.reserved_var_sizes   = scm_get_var_sizes (nc, def.vars, def.reserved_var_names)
+        def.time_var_index       = time_var_index
+
+
+        # store their names to be used on the y-axis
+        reserved_var_long_names = nil
+        for j = 1 to count(def.reserved_var_indexes) do
+            idx = def.reserved_var_indexes[j]
+            setcurrent(nc, idx)
+            attrs = attributes(nc)
+            reserved_var_long_names = reserved_var_long_names & [attrs.long_name]
+        end for
+
+        def.reserved_var_long_names = reserved_var_long_names
+
+
+        return def
+
+    end parse_netcdf_vars
+
+
+
+
+    function generate_vars_help(nc: netcdf, def: definition)
+
+
+        # parse the file to get the lists of available 1 and 2d variables
+
+        vars_1d = nil
+        vars_2d = nil
+        for i = 1 to count(def.vars) do
+            #print(i, tab, def.vars[i])
+            if not(i in def.reserved_var_indexes) then
+                setcurrent(nc, i)
+                dims = dimensions(nc)
+                if count(dims) = 1 then
+                    vars_1d = vars_1d & [def.vars[i]]
+                else if count(dims) = 2 then
+                    #if dims[2] = 91 then
+                       vars_2d = vars_2d & [def.vars[i]]
+                    #end if
+                end if
+            end if
+        end for
+
+        vars_1d = vars_1d
+        vars_2d = vars_2d
+
+
+        t = tmpfile()
+        f = file(t)
+
+        write(f, "1D variables", newline)
+        write(f, "------------", newline)
+        for i = 1 to count(vars_1d) do
+            write(f, vars_1d[i], newline)
+        end for
+
+        write(f, newline)
+        write(f, "2D variables", newline)
+        write(f, "------------", newline)
+        for i = 1 to count(vars_2d) do
+            write(f, vars_2d[i], newline)
+        end for
+
+
+        f = 0
+
+        return t
+    end generate_vars_help
+
+
+    # ----------------------------------------------------------------------------
+    # Function      : interpolate_colours_rgb
+    #
+    # Description   : Given two endpoint colours, interpolates between them,
+    #                 returning a list of 'num_slices' colours including the
+    #                 endpoints.
+    #                 This version does the interpolation in RGB space.
+    #
+    # ----------------------------------------------------------------------------
+
+    function interpolate_colours_rgb (lRGB1 : list, lRGB2 : list, num_slices : number)
+
+        lColours = nil
+        lNew     = [0, 0, 0]
+
+        for i = 0 to num_slices do
+	        lNew [1] = lRGB1[1] + i * (lRGB2[1] - lRGB1[1]) / num_slices
+	        lNew [2] = lRGB1[2] + i * (lRGB2[2] - lRGB1[2]) / num_slices
+	        lNew [3] = lRGB1[3] + i * (lRGB2[3] - lRGB1[3]) / num_slices
+
+            lColours = lColours & [lNew]
+        end for
+
+        return lColours
+
+    end interpolate_colours_rgb
+
+
+
+end mvl_plot_scm_data
+
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_regular_layout b/share/metview/app-defaults/CommonMacroFuncs/mvl_regular_layout
new file mode 100644
index 0000000..206b30a
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_regular_layout
@@ -0,0 +1,155 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+# **************************************************************************
+# Function      : mvl_regular_layout
+#
+# Syntax        : list mvl_regular_layout (definition, number, number,
+#                                          number, number)
+#
+# Author (date) : Anonymous (--/--/2003)
+#
+# Category      : LAYOUT
+#
+# OneLineDesc   : Generates a regular grid of frames/subframes
+#
+# Description   : Creates a list of frames, arranged in a regular grid.
+#                 Each frame contains a set of 1 or more subframes, each
+#                 arranged in a regular mxn grid. The output is suitable for
+#                 input into the function plot_superpage().
+#
+# Parameters    : the_view    - a view definition to be used with each frame
+#                 frame_cols  - the number of frames along the width
+#                 frame_rows  - the number of frames along the height
+#                 subframe_cols - the number of subframes along the width
+#                                 of each frame.
+#                 subframe_rows - the number of subframes along the height
+#                                 of each frame.
+#
+# Return Value  : The list of frames
+#
+# Dependencies  : mvl_mxn_subframes
+#
+# Example Usage : 
+#                 # create a set of frames using the default map view
+#                 page_list = mvl_regular_layout (mapview(), 2, 1, 1, 3)
+#
+#                 # create a display window using this set of pages
+#                 dw = plot_superpage( pages : page_list )		
+#
+# **************************************************************************
+
+function mvl_regular_layout (the_view      : definition,
+                             frame_cols    : number, frame_rows    : number,
+			     subframe_cols : number, subframe_rows : number)
+
+	delta_x = 100 / frame_cols
+	delta_y = 100 / frame_rows
+
+	subframe_list = mvl_mxn_subframes (subframe_cols, subframe_rows)
+
+	frame_list = []
+	for i = 1 to frame_rows do
+		hi_pos	= delta_y * (i-1)
+		lo_pos  = delta_y * i
+		for j = 1 to frame_cols do
+			left_pos  = delta_x * (j-1)
+			right_pos = delta_x * j
+			frame   = plot_page(
+					top     	: hi_pos,
+					bottom  	: lo_pos,
+					left    	: left_pos,
+					right   	: right_pos,
+					sub_pages	: subframe_list, 
+					view    	: the_view
+					)
+			frame_list = frame_list & [frame]
+		end for
+	end for
+
+	return frame_list
+
+end mvl_regular_layout
+
+# **************************************************************************
+# Function      : mvl_regular_layout
+#
+# Syntax        : list mvl_regular_layout (view, frame_cols, frame_rows,
+#                                          subframe_cols, subframe_rows, area)
+#
+# Author (date) : Anonymous (02/03/2009)
+#
+# Category      : LAYOUT
+#
+# OneLineDesc   : Generates a regular grid of frames/subframes within a given area
+#
+# Description   : Creates a list of frames, arranged in a regular grid.
+#                 Each frame contains a set of 1 or more subframes, each
+#                 arranged in a regular mxn grid. The output is suitable for
+#                 input into the function plot_superpage().
+#
+# Parameters    : the_view    - a view definition to be used with each frame
+#                 frame_cols  - the number of frames along the width
+#                 frame_rows  - the number of frames along the height
+#                 subframe_cols - the number of subframes along the width
+#                                 of each frame.
+#                 subframe_rows - the number of subframes along the height
+#                                 of each frame.
+#		  area		- [TOP,BOTTOM,LEFT,RIGHT], values between 0-100
+#
+# Return Value  : The list of frames
+#
+# Dependencies  : mvl_mxn_frames
+#
+# Example Usage : 
+#                 # create a set of frames within a given area using the default map view
+#                 page_list = mvl_regular_layout (mapview(), 2, 1, 1, 3, [0,100,0,100])
+#
+#                 # create a display window using this set of pages
+#                 dw = plot_superpage( pages : page_list )		
+#
+# **************************************************************************
+
+function mvl_regular_layout (the_view     : definition,
+                             frame_cols    : number, frame_rows    : number,
+			     subframe_cols : number, subframe_rows : number,
+			     area          : list)
+
+	dax = area[4] - area[3]
+	day = area[2] - area[1]
+	delta_x = dax / frame_cols
+	delta_y = day / frame_rows
+
+	subframe_list = mvl_mxn_subframes(subframe_cols, subframe_rows)
+
+	frame_list = []
+	for j = 1 to frame_rows do
+		hi_pos	= delta_y * (j-1) + area[1]
+		lo_pos  = delta_y * j + area[1]
+		for i = 1 to frame_cols do
+			left_pos  = delta_x * (i-1) + area[3]
+			right_pos = delta_x * i + area[3]
+			frame   = plot_page(
+					top     	: hi_pos,
+					bottom  	: lo_pos,
+					left    	: left_pos,
+					right   	: right_pos,
+					sub_pages	: subframe_list, 
+					view    	: the_view
+					)
+			frame_list = frame_list & [frame]
+		end for
+	end for
+
+	return frame_list
+
+end mvl_regular_layout
+
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mvl_regular_layout_area b/share/metview/app-defaults/CommonMacroFuncs/mvl_regular_layout_area
new file mode 100644
index 0000000..ba41937
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mvl_regular_layout_area
@@ -0,0 +1,88 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+#Metview Macro
+
+
+# **************************************************************************
+# Function      : mvl_regular_layout_area
+#
+# Syntax        : list mvl_regular_layout_area (view, frame_cols, frame_rows,
+#                                          subframe_cols, subframe_rows, area)
+#
+# Author (date) : Fernando Ii (02/03/2009) (based on routine mvl_regular_layout)
+#
+# Category      : LAYOUT
+#
+# OneLineDesc   : Generates a regular grid of frames/subframes within a given area
+#
+# Description   : Creates a list of frames, arranged in a regular grid.
+#                 Each frame contains a set of 1 or more subframes, each
+#                 arranged in a regular mxn grid. The output is suitable for
+#                 input into the function plot_superpage().
+#
+# Parameters    : the_view    - a view definition to be used with each frame
+#                 frame_cols  - the number of frames along the width
+#                 frame_rows  - the number of frames along the height
+#                 subframe_cols - the number of subframes along the width
+#                                 of each frame.
+#                 subframe_rows - the number of subframes along the height
+#                                 of each frame.
+#		  area		- [TOP,BOTTOM,LEFT,RIGHT], values between 0-100
+#
+# Return Value  : The list of frames
+#
+# Dependencies  : mvl_mxn_subframes
+#
+# Example Usage : 
+#                 # create a set of frames within a given area using the default map view
+#                 page_list = mvl_regular_layout (mapview(), 2, 1, 1, 3, [0,100,0,100])
+#
+#                 # create a display window using this set of pages
+#                 dw = plot_superpage( pages : page_list )		
+#
+# **************************************************************************
+
+function mvl_regular_layout_area (the_view     : definition,
+                                  frame_cols    : number, frame_rows    : number,
+                                  subframe_cols : number, subframe_rows : number,
+                                  area          : list)
+
+	dax = area[4] - area[3]
+	day = area[2] - area[1]
+	delta_x = dax / frame_cols
+	delta_y = day / frame_rows
+
+	subframe_list = mvl_mxn_subframes(subframe_cols, subframe_rows)
+
+	frame_list = []
+	for j = 1 to frame_rows do
+		hi_pos	= delta_y * (j-1) + area[1]
+		lo_pos  = delta_y * j + area[1]
+		for i = 1 to frame_cols do
+			left_pos  = delta_x * (i-1) + area[3]
+			right_pos = delta_x * i + area[3]
+			frame   = plot_page(
+					top     	: hi_pos,
+					bottom  	: lo_pos,
+					left    	: left_pos,
+					right   	: right_pos,
+					sub_pages	: subframe_list, 
+					view    	: the_view
+					)
+			frame_list = frame_list & [frame]
+		end for
+	end for
+
+	return frame_list
+
+end regular_layout
+
diff --git a/share/metview/app-defaults/CommonMacroFuncs/mxn_layout b/share/metview/app-defaults/CommonMacroFuncs/mxn_layout
new file mode 100644
index 0000000..2f55e6e
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/mxn_layout
@@ -0,0 +1,37 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function mxn_layout (the_view, cols, rows)
+
+	delta_x = 100 / cols
+	delta_y = 100 / rows
+
+	page_list = []
+	for i = 1 to cols do
+		left_pos  = delta_x * (i-1)
+		right_pos = delta_x * i
+		for j = 1 to rows do
+			hi_pos	= delta_y * (j-1)
+			lo_pos  = delta_y * j
+			page    = plot_page(
+					top     :  hi_pos,
+					bottom  :  lo_pos,
+					left    :  left_pos,
+					right   :  right_pos,
+					view    :  the_view
+					)
+			page_list = page_list & [page]
+		end for
+	end for
+
+	return page_list
+
+end mxn_layout
diff --git a/share/metview/app-defaults/CommonMacroFuncs/window b/share/metview/app-defaults/CommonMacroFuncs/window
new file mode 100644
index 0000000..19bdab9
--- /dev/null
+++ b/share/metview/app-defaults/CommonMacroFuncs/window
@@ -0,0 +1,88 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+function window(z)
+	n=count(z)
+	r=1
+	c=1
+	w=700
+	h=700
+	if n=2 then
+		r=1
+		c=2
+		w=1500
+		h=700
+	else if n=3 then
+		r=1
+		c=3
+		w=1500
+		h=500
+	else if n=4 then
+		r=2
+		c=2
+		w=1000
+		h=1000
+	else if n=5 or n=6 then
+		r=2
+		c=3
+		w=1500
+		h=1000
+	else if n=7 or n=8 then
+		r=2
+		c=4
+		w=1500
+		h=700
+	else if n=9 then
+		r=3
+		c=3
+		w=1000
+		h=1000
+	else if n>9 and n<13 then
+		r=3
+		c=4
+		w=1500
+		h=1000
+	else if n>12 and n<17 then
+		r=4
+		c=4
+		w=800
+		h=1000
+	else if n>16 and n<21 then
+		r=4
+		c=5
+		w=1000
+		h=1000
+	else if n>20 and n<26 then
+		r=5
+		c=5
+		w=750
+		h=1000
+	end if
+
+	coastblack = pcoast(
+			map_coastline_colour	:	"background",
+			map_grid_line_style	:	"dot",
+			map_grid_colour	:	"background",
+			map_label	:	"off"
+			)
+	w=plotwindow(
+			row	:	r,
+			column	:	c,
+			width	:	w,
+			height	:	h,
+			pane_organization	:	'connected',
+			subpage_map_projection	:	"polar_stereographic",
+			area	:	[24.42,-16.28,55.18,77.68],
+			subpage_map_vertical_longitude	:	10.01,
+			background	:	coastblack
+			)
+	return w
+end window
diff --git a/share/metview/app-defaults/DemoFonts b/share/metview/app-defaults/DemoFonts
new file mode 100644
index 0000000..caf35ed
--- /dev/null
+++ b/share/metview/app-defaults/DemoFonts
@@ -0,0 +1,16 @@
+!
+! Big font for demonstration
+Metview*Line*sizes:                 30, 300, 50, 300
+Metview*XmList.fontList:	10x20=normal,10x20bold=bold
+Metview*XmMenuShell*fontList: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
+Metview*XmCascadeButton*fontList: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
+Metview*XmLabel*fontList: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
+Metview*XmPushButton*fontList: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
+Metview*XmToggleButton*fontList: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
+Metview*normalFont: 10x20
+Metview*highlightFont: 10x20
+Metview*fontList: \
+10x20=normal,\
+10x20italic=italic,\
+10x20bold=bold,\
+10x20bolditalic=bolditalic
diff --git a/share/metview/app-defaults/Drawers/.Basic b/share/metview/app-defaults/Drawers/.Basic
new file mode 100644
index 0000000..b133db0
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Basic
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    X          = 9,
+    Y          = 120,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/.Data Access b/share/metview/app-defaults/Drawers/.Data Access
new file mode 100644
index 0000000..54e4020
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Data Access	
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE,
+    X          = 65,
+    Y          = 121
+
diff --git a/share/metview/app-defaults/Drawers/.Filters b/share/metview/app-defaults/Drawers/.Filters
new file mode 100644
index 0000000..5cd4b64
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Filters
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE,
+    X          = 175,
+    Y          = 125
+
diff --git a/share/metview/app-defaults/Drawers/.Macros b/share/metview/app-defaults/Drawers/.Macros
new file mode 100644
index 0000000..808687b
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Macros
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    X          = 254,
+    Y          = 129,
+    WIDTH      = 471,
+    HEIGHT     = 155,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/.Modules (Data) b/share/metview/app-defaults/Drawers/.Modules (Data)
new file mode 100644
index 0000000..1430193
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Modules (Data)	
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 587,
+    HEIGHT     = 531,
+    SMALL_ICONS = FALSE,
+    X          = 325,
+    Y          = 125
+
diff --git a/share/metview/app-defaults/Drawers/.Modules (Plotting) b/share/metview/app-defaults/Drawers/.Modules (Plotting)
new file mode 100644
index 0000000..5b874a3
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Modules (Plotting)	
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 604,
+    HEIGHT     = 172,
+    SMALL_ICONS = FALSE,
+    X          = 233,
+    Y          = 194
+
diff --git a/share/metview/app-defaults/Drawers/.Views b/share/metview/app-defaults/Drawers/.Views
new file mode 100644
index 0000000..deb645c
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Views
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    X          = 28,
+    Y          = 194,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/.Visual Definitions b/share/metview/app-defaults/Drawers/.Visual Definitions
new file mode 100644
index 0000000..d4c64ed
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/.Visual Definitions	
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    X          = 113,
+    Y          = 197,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Basic/.Display Window b/share/metview/app-defaults/Drawers/Basic/.Display Window
new file mode 100755
index 0000000..a91a5d1
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Basic/.Display Window	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = PlotSuperPage,
+    X          = 262,
+    Y          = 6,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = PLOT_SUPERPAGE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Basic/.Folder b/share/metview/app-defaults/Drawers/Basic/.Folder
new file mode 100755
index 0000000..8bf7df5
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Basic/.Folder
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    X          = 22,
+    Y          = 10,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Basic/.Notes b/share/metview/app-defaults/Drawers/Basic/.Notes
new file mode 100755
index 0000000..fff87be
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Basic/.Notes
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = NOTE,
+    X          = 105,
+    Y          = 10,
+    RENAMABLE  = TRUE
+
diff --git a/share/metview/app-defaults/Drawers/Basic/.Shell Script b/share/metview/app-defaults/Drawers/Basic/.Shell Script
new file mode 100755
index 0000000..2867145
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Basic/.Shell Script	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Shell Script,
+    X          = 177,
+    Y          = 8,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = SHELL,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Basic/Display Window b/share/metview/app-defaults/Drawers/Basic/Display Window
new file mode 100644
index 0000000..24bba2f
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Basic/Display Window	
@@ -0,0 +1,4 @@
+PLOT_SUPERPAGE,
+    CUSTOM_WIDTH = 29.7,
+    CUSTOM_HEIGHT = 21.0
+
diff --git a/share/metview/app-defaults/Drawers/Basic/Notes b/share/metview/app-defaults/Drawers/Basic/Notes
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/app-defaults/Drawers/Basic/Shell Script b/share/metview/app-defaults/Drawers/Basic/Shell Script
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/app-defaults/Drawers/Data Access/.Ecfs b/share/metview/app-defaults/Drawers/Data Access/.Ecfs
new file mode 100755
index 0000000..98cd9ef
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/.Ecfs	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Ecfs,
+    X          = 28,
+    Y          = 11,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = ECFS,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Data Access/.Flextra Prepare b/share/metview/app-defaults/Drawers/Data Access/.Flextra Prepare
new file mode 100644
index 0000000..050d0c0
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/.Flextra Prepare	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = FLEXTRA_PREPARE,
+    X          = 200,
+    Y          = 12
+
diff --git a/share/metview/app-defaults/Drawers/Data Access/.Mars Retrieval b/share/metview/app-defaults/Drawers/Data Access/.Mars Retrieval
new file mode 100755
index 0000000..0cb2f99
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/.Mars Retrieval	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Mars Retrieval,
+    X          = 101,
+    Y          = 14,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = RETRIEVE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Data Access/.WmsClient b/share/metview/app-defaults/Drawers/Data Access/.WmsClient
new file mode 100644
index 0000000..ffcf72e
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/.WmsClient	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = WMSCLIENT,
+    X          = 377,
+    Y          = 12
+
diff --git a/share/metview/app-defaults/Drawers/Data Access/Ecfs b/share/metview/app-defaults/Drawers/Data Access/Ecfs
new file mode 100755
index 0000000..236f72b
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/Ecfs	
@@ -0,0 +1,2 @@
+ECFS
+
diff --git a/share/metview/app-defaults/Drawers/Data Access/Flextra Prepare b/share/metview/app-defaults/Drawers/Data Access/Flextra Prepare
new file mode 100644
index 0000000..3cafafc
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/Flextra Prepare	
@@ -0,0 +1,2 @@
+FLEXTRA_PREPARE
+
diff --git a/share/metview/app-defaults/Drawers/Data Access/Mars Retrieval b/share/metview/app-defaults/Drawers/Data Access/Mars Retrieval
new file mode 100755
index 0000000..73f8ee9
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/Mars Retrieval	
@@ -0,0 +1,2 @@
+RETRIEVE,
+    GRID       = 1.5/1.5
diff --git a/share/metview/app-defaults/Drawers/Data Access/WmsClient b/share/metview/app-defaults/Drawers/Data Access/WmsClient
new file mode 100644
index 0000000..50550d9
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Data Access/WmsClient	
@@ -0,0 +1,2 @@
+WMSCLIENT
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.Bufr Picker b/share/metview/app-defaults/Drawers/Filters/.Bufr Picker
new file mode 100644
index 0000000..10ce46e
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.Bufr Picker	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = BUFRPICKER,
+    X          = 257,
+    Y          = 8
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.Clean File b/share/metview/app-defaults/Drawers/Filters/.Clean File
new file mode 100755
index 0000000..9023c4f
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.Clean File	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = CLEANFILE
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.GRIB Filter b/share/metview/app-defaults/Drawers/Filters/.GRIB Filter
new file mode 100755
index 0000000..8119268
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.GRIB Filter	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = READ,
+    X          = 148,
+    Y          = 15
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.ODB Filter b/share/metview/app-defaults/Drawers/Filters/.ODB Filter
new file mode 100755
index 0000000..7319f83
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.ODB Filter	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = ODB_FILTER,
+    X          = 41,
+    Y          = 90
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.Observation Filter b/share/metview/app-defaults/Drawers/Filters/.Observation Filter
new file mode 100755
index 0000000..af78727
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.Observation Filter	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Observation Filter,
+    X          = 23,
+    Y          = 70,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = OBSFILTER,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.Opera Radar Filter b/share/metview/app-defaults/Drawers/Filters/.Opera Radar Filter
new file mode 100644
index 0000000..5044edb
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.Opera Radar Filter	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = OPERA_RADAR_FILTER,
+    X          = 353,
+    Y          = 66
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.SQL Query b/share/metview/app-defaults/Drawers/Filters/.SQL Query
new file mode 100644
index 0000000..c7c72f6
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.SQL Query	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = SQL,
+    X          = 270,
+    Y          = 90
+
diff --git a/share/metview/app-defaults/Drawers/Filters/.Table Reader b/share/metview/app-defaults/Drawers/Filters/.Table Reader
new file mode 100644
index 0000000..3119d6e
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/.Table Reader	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = TABLE_READER,
+    X          = 361,
+    Y          = 6
+
diff --git a/share/metview/app-defaults/Drawers/Filters/Bufr Picker b/share/metview/app-defaults/Drawers/Filters/Bufr Picker
new file mode 100644
index 0000000..fc829a8
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/Bufr Picker	
@@ -0,0 +1 @@
+BUFRPICKER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Filters/Clean File b/share/metview/app-defaults/Drawers/Filters/Clean File
new file mode 100755
index 0000000..a5ba689
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/Clean File	
@@ -0,0 +1,2 @@
+CLEANFILE
+
diff --git a/share/metview/app-defaults/Drawers/Filters/GRIB Filter b/share/metview/app-defaults/Drawers/Filters/GRIB Filter
new file mode 100755
index 0000000..a077c76
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/GRIB Filter	
@@ -0,0 +1,2 @@
+READ
+
diff --git a/share/metview/app-defaults/Drawers/Filters/ODB Filter b/share/metview/app-defaults/Drawers/Filters/ODB Filter
new file mode 100755
index 0000000..dcfcb4b
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/ODB Filter	
@@ -0,0 +1,2 @@
+ODB_FILTER
+
diff --git a/share/metview/app-defaults/Drawers/Filters/Observation Filter b/share/metview/app-defaults/Drawers/Filters/Observation Filter
new file mode 100755
index 0000000..398ddb6
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/Observation Filter	
@@ -0,0 +1,2 @@
+OBSFILTER
+
diff --git a/share/metview/app-defaults/Drawers/Filters/Opera Radar Filter b/share/metview/app-defaults/Drawers/Filters/Opera Radar Filter
new file mode 100644
index 0000000..6277e84
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/Opera Radar Filter	
@@ -0,0 +1,2 @@
+OPERA_RADAR_FILTER
+
diff --git a/share/metview/app-defaults/Drawers/Filters/SQL Query b/share/metview/app-defaults/Drawers/Filters/SQL Query
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/app-defaults/Drawers/Filters/Table Reader b/share/metview/app-defaults/Drawers/Filters/Table Reader
new file mode 100644
index 0000000..cd45fca
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Filters/Table Reader	
@@ -0,0 +1 @@
+TABLE_READER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Macros/.Formula b/share/metview/app-defaults/Drawers/Macros/.Formula
new file mode 100755
index 0000000..bfd1593
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/.Formula
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Formula,
+    X          = 34,
+    Y          = 10,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = COMPUTE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Macros/.Macro b/share/metview/app-defaults/Drawers/Macros/.Macro
new file mode 100755
index 0000000..5205bac
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/.Macro
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Macro,
+    X          = 150,
+    Y          = 10,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MACRO,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Macros/.Macro Parameters b/share/metview/app-defaults/Drawers/Macros/.Macro Parameters
new file mode 100755
index 0000000..7d9ecc1
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/.Macro Parameters	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Macro Parameters,
+    X          = 229,
+    Y          = 10,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MACROPARAM,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Macros/.Simple Formula b/share/metview/app-defaults/Drawers/Macros/.Simple Formula
new file mode 100755
index 0000000..1a6cc1e
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/.Simple Formula	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Simple Formula,
+    X          = 349,
+    Y          = 10,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = SIMPLE_FORMULA_FAMILY,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Macros/Formula b/share/metview/app-defaults/Drawers/Macros/Formula
new file mode 100755
index 0000000..e37f69d
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/Formula
@@ -0,0 +1,3 @@
+COMPUTE,
+    FORMULA    = ''
+
diff --git a/share/metview/app-defaults/Drawers/Macros/Macro b/share/metview/app-defaults/Drawers/Macros/Macro
new file mode 100755
index 0000000..48dd6e6
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/Macro
@@ -0,0 +1,2 @@
+#Metview Macro
+
diff --git a/share/metview/app-defaults/Drawers/Macros/Macro Parameters b/share/metview/app-defaults/Drawers/Macros/Macro Parameters
new file mode 100755
index 0000000..abf3fb4
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/Macro Parameters	
@@ -0,0 +1,4 @@
+MACROPARAM
+
+definition
+
diff --git a/share/metview/app-defaults/Drawers/Macros/Simple Formula b/share/metview/app-defaults/Drawers/Macros/Simple Formula
new file mode 100755
index 0000000..d2f601d
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Macros/Simple Formula	
@@ -0,0 +1,4 @@
+SIMPLE_FORMULA_FAMILY
+
+SAMPLE_FORMULA_DOD
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Average Data b/share/metview/app-defaults/Drawers/Modules (Data)/.Average Data
new file mode 100644
index 0000000..bc47b08
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Average Data	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = PM_AVERAGE,
+    X          = 70,
+    Y          = 10
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Cross Section Data b/share/metview/app-defaults/Drawers/Modules (Data)/.Cross Section Data
new file mode 100644
index 0000000..ef2b702
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Cross Section Data	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = PM_XSECT,
+    X          = 273,
+    Y          = 10
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Flextra Run b/share/metview/app-defaults/Drawers/Modules (Data)/.Flextra Run
new file mode 100644
index 0000000..0fac281
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Flextra Run	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = FLEXTRA_RUN,
+    X          = 100,
+    Y          = 254
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.GRIB to Geopoints b/share/metview/app-defaults/Drawers/Modules (Data)/.GRIB to Geopoints
new file mode 100644
index 0000000..affaaeb
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.GRIB to Geopoints	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = GRIB_TO_GEO,
+    X          = 276,
+    Y          = 67
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Geopoints to GRIB b/share/metview/app-defaults/Drawers/Modules (Data)/.Geopoints to GRIB
new file mode 100755
index 0000000..ac33d1a
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Geopoints to GRIB	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = GEO_TO_GRIB,
+    X          = 58,
+    Y          = 67
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Geopoints to KML b/share/metview/app-defaults/Drawers/Modules (Data)/.Geopoints to KML
new file mode 100644
index 0000000..9c2b982
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Geopoints to KML	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = GeoToKML,
+    X          = 53,
+    Y          = 256
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Hovmoeller Data b/share/metview/app-defaults/Drawers/Modules (Data)/.Hovmoeller Data
new file mode 100644
index 0000000..487397b
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Hovmoeller Data	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = HOVMOELLERDATA_FAMILY,
+    X          = 58,
+    Y          = 121
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Percentile b/share/metview/app-defaults/Drawers/Modules (Data)/.Percentile
new file mode 100644
index 0000000..69b665c
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Percentile	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = PERCENTILE,
+    X          = 230,
+    Y          = 247
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Potential Temperature b/share/metview/app-defaults/Drawers/Modules (Data)/.Potential Temperature
new file mode 100755
index 0000000..ab4c14f
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Potential Temperature	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Potential Temperature Family,
+    X          = 264,
+    Y          = 124,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = POTT_FAMILY,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Rotational or Divergent Wind b/share/metview/app-defaults/Drawers/Modules (Data)/.Rotational or Divergent Wind
new file mode 100755
index 0000000..7e329ab
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Rotational or Divergent Wind	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Rotational Wind or Divergent Wind,
+    X          = 29,
+    Y          = 181,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = DIVROT_FAMILY,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Scm Run b/share/metview/app-defaults/Drawers/Modules (Data)/.Scm Run
new file mode 100644
index 0000000..2e7576d
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Scm Run	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = SCM_RUN,
+    X          = 21,
+    Y          = 15
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Stations b/share/metview/app-defaults/Drawers/Modules (Data)/.Stations
new file mode 100755
index 0000000..9e97ffb
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Stations	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Stations,
+    X          = 305,
+    Y          = 181,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = STATIONS,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Velocity Potential or Stream Fn b/share/metview/app-defaults/Drawers/Modules (Data)/.Velocity Potential or Stream Fn
new file mode 100755
index 0000000..ec13d46
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Velocity Potential or Stream Fn	
@@ -0,0 +1,8 @@
+USER_INTERFACE,
+    X          = 5,
+    Y          = 295,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = VELSTR_FAMILY,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/.Vertical Profile Data b/share/metview/app-defaults/Drawers/Modules (Data)/.Vertical Profile Data
new file mode 100644
index 0000000..a8ff46c
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/.Vertical Profile Data	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = PM_VPROF,
+    X          = 312,
+    Y          = 254
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Average Data b/share/metview/app-defaults/Drawers/Modules (Data)/Average Data
new file mode 100644
index 0000000..c6f0834
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Average Data	
@@ -0,0 +1,2 @@
+PM_AVERAGE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Cross Section Data b/share/metview/app-defaults/Drawers/Modules (Data)/Cross Section Data
new file mode 100644
index 0000000..557e77c
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Cross Section Data	
@@ -0,0 +1,2 @@
+PM_XSECT
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Flextra Run b/share/metview/app-defaults/Drawers/Modules (Data)/Flextra Run
new file mode 100644
index 0000000..65c1036
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Flextra Run	
@@ -0,0 +1 @@
+FLEXTRA_RUN
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/GRIB to Geopoints b/share/metview/app-defaults/Drawers/Modules (Data)/GRIB to Geopoints
new file mode 100644
index 0000000..56a85f1
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/GRIB to Geopoints	
@@ -0,0 +1,2 @@
+GRIB_TO_GEO
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Geopoints to GRIB b/share/metview/app-defaults/Drawers/Modules (Data)/Geopoints to GRIB
new file mode 100755
index 0000000..1e7ba8d
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Geopoints to GRIB	
@@ -0,0 +1,2 @@
+GEO_TO_GRIB
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Geopoints to KML b/share/metview/app-defaults/Drawers/Modules (Data)/Geopoints to KML
new file mode 100644
index 0000000..da55a89
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Geopoints to KML	
@@ -0,0 +1,2 @@
+GeoToKML
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Hovmoeller Data b/share/metview/app-defaults/Drawers/Modules (Data)/Hovmoeller Data
new file mode 100644
index 0000000..c76cfdf
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Hovmoeller Data	
@@ -0,0 +1,6 @@
+HOVMOELLERDATA_FAMILY,
+    AREA       = LINE_HOV,
+    APPLICATION = LINE_HOV
+
+LINE_HOV
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Percentile b/share/metview/app-defaults/Drawers/Modules (Data)/Percentile
new file mode 100644
index 0000000..3f05734
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Percentile	
@@ -0,0 +1,2 @@
+PERCENTILE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Potential Temperature b/share/metview/app-defaults/Drawers/Modules (Data)/Potential Temperature
new file mode 100755
index 0000000..0c02e26
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Potential Temperature	
@@ -0,0 +1,6 @@
+POTT_FAMILY,
+    APPLICATION = POTT,
+    LNSP       = MODEL_LEVEL
+
+POTT_M
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Rotational or Divergent Wind b/share/metview/app-defaults/Drawers/Modules (Data)/Rotational or Divergent Wind
new file mode 100755
index 0000000..cd2a2a8
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Rotational or Divergent Wind	
@@ -0,0 +1,5 @@
+DIVROT_FAMILY,
+    APPLICATION = ROTWIND
+
+ROTWIND
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Scm Run b/share/metview/app-defaults/Drawers/Modules (Data)/Scm Run
new file mode 100644
index 0000000..85ce601
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Scm Run	
@@ -0,0 +1 @@
+SCM_RUN
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Stations b/share/metview/app-defaults/Drawers/Modules (Data)/Stations
new file mode 100755
index 0000000..39351ff
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Stations	
@@ -0,0 +1,2 @@
+STATIONS
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Velocity Potential or Stream Fn b/share/metview/app-defaults/Drawers/Modules (Data)/Velocity Potential or Stream Fn
new file mode 100755
index 0000000..e03cb30
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Velocity Potential or Stream Fn	
@@ -0,0 +1,4 @@
+VELSTR_FAMILY,
+    APPLICATION = VELPOT
+
+VELPOT
diff --git a/share/metview/app-defaults/Drawers/Modules (Data)/Vertical Profile Data b/share/metview/app-defaults/Drawers/Modules (Data)/Vertical Profile Data
new file mode 100644
index 0000000..093e298
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Data)/Vertical Profile Data	
@@ -0,0 +1,2 @@
+PM_VPROF
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Data Coverage b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Data Coverage
new file mode 100755
index 0000000..901e7c7
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Data Coverage	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Datacoverage,
+    X          = 14,
+    Y          = 18,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = DATACOVERAGE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Data Coverage# b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Data Coverage#
new file mode 100755
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Data Coverage#	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Flextra Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Flextra Visualiser
new file mode 100644
index 0000000..0e2fa96
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Flextra Visualiser	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = FLEXTRA_VISUALISER,
+    X          = 210,
+    Y          = 12
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Grib Vectors b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Grib Vectors
new file mode 100644
index 0000000..6daabac
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Grib Vectors	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = GRIB_VECTORS_APP,
+    X          = 873,
+    Y          = 24
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Input Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Input Visualiser
new file mode 100644
index 0000000..4c037c1
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Input Visualiser	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = INPUT_VISUALISER,
+    X          = 522,
+    Y          = 17
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.MagML File b/share/metview/app-defaults/Drawers/Modules (Plotting)/.MagML File
new file mode 100644
index 0000000..66cbc8d
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.MagML File	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MAGML,
+    X          = 124,
+    Y          = 20
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Meteogram b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Meteogram
new file mode 100755
index 0000000..0aeb411
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Meteogram	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MetPlus,
+    X          = 423,
+    Y          = 16
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.NetCDF Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/.NetCDF Visualiser
new file mode 100644
index 0000000..cfb1778
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.NetCDF Visualiser	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = NETCDF_VISUALISER,
+    X          = 315,
+    Y          = 13
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Odb Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Odb Visualiser
new file mode 100644
index 0000000..401b306
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Odb Visualiser	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = ODB_VISUALISER,
+    X          = 216,
+    Y          = 17
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Scm Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Scm Visualiser
new file mode 100644
index 0000000..996a2d1
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Scm Visualiser	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = SCM_VISUALISER,
+    X          = 869,
+    Y          = 81
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/.Table Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Table Visualiser
new file mode 100644
index 0000000..ac71303
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/.Table Visualiser	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = TABLE_VISUALISER,
+    X          = 618,
+    Y          = 16
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Data Coverage b/share/metview/app-defaults/Drawers/Modules (Plotting)/Data Coverage
new file mode 100755
index 0000000..8d610e0
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Data Coverage	
@@ -0,0 +1 @@
+DATACOVERAGE
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Flextra Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/Flextra Visualiser
new file mode 100644
index 0000000..afac239
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Flextra Visualiser	
@@ -0,0 +1 @@
+FLEXTRA_VISUALISER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Grib Vectors b/share/metview/app-defaults/Drawers/Modules (Plotting)/Grib Vectors
new file mode 100644
index 0000000..3bcb22d
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Grib Vectors	
@@ -0,0 +1 @@
+GRIB_VECTORS_APP
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Input Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/Input Visualiser
new file mode 100644
index 0000000..71118ce
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Input Visualiser	
@@ -0,0 +1 @@
+INPUT_VISUALISER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/MagML File b/share/metview/app-defaults/Drawers/Modules (Plotting)/MagML File
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Meteogram b/share/metview/app-defaults/Drawers/Modules (Plotting)/Meteogram
new file mode 100755
index 0000000..657719c
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Meteogram	
@@ -0,0 +1,2 @@
+MetPlus
+
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/NetCDF Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/NetCDF Visualiser
new file mode 100644
index 0000000..859beee
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/NetCDF Visualiser	
@@ -0,0 +1 @@
+NETCDF_VISUALISER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Odb Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/Odb Visualiser
new file mode 100644
index 0000000..731fb28
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Odb Visualiser	
@@ -0,0 +1 @@
+ODB_VISUALISER
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Scm Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/Scm Visualiser
new file mode 100644
index 0000000..9711645
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Scm Visualiser	
@@ -0,0 +1 @@
+SCM_VISUALISER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Modules (Plotting)/Table Visualiser b/share/metview/app-defaults/Drawers/Modules (Plotting)/Table Visualiser
new file mode 100644
index 0000000..c939768
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Modules (Plotting)/Table Visualiser	
@@ -0,0 +1 @@
+TABLE_VISUALISER
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Views/.Average View b/share/metview/app-defaults/Drawers/Views/.Average View
new file mode 100644
index 0000000..0ac82b7
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/.Average View	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MAVERAGEVIEW,
+    X          = 532,
+    Y          = 13
+
diff --git a/share/metview/app-defaults/Drawers/Views/.Cartesian View b/share/metview/app-defaults/Drawers/Views/.Cartesian View
new file mode 100644
index 0000000..4e78f96
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/.Cartesian View	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = CARTESIANVIEW,
+    X          = 142,
+    Y          = 70
+
diff --git a/share/metview/app-defaults/Drawers/Views/.Cross Section View b/share/metview/app-defaults/Drawers/Views/.Cross Section View
new file mode 100644
index 0000000..fe44e16
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/.Cross Section View	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MXSECTVIEW,
+    X          = 207,
+    Y          = 12
+
diff --git a/share/metview/app-defaults/Drawers/Views/.Geographical View b/share/metview/app-defaults/Drawers/Views/.Geographical View
new file mode 100644
index 0000000..efbceaa
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/.Geographical View	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = GEOVIEW,
+    X          = 16,
+    Y          = 15
+
diff --git a/share/metview/app-defaults/Drawers/Views/.Vertical Profile View b/share/metview/app-defaults/Drawers/Views/.Vertical Profile View
new file mode 100644
index 0000000..7699373
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/.Vertical Profile View	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MVERTPROFVIEW,
+    X          = 376,
+    Y          = 12
+
diff --git a/share/metview/app-defaults/Drawers/Views/Average View b/share/metview/app-defaults/Drawers/Views/Average View
new file mode 100644
index 0000000..22b33c3
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/Average View	
@@ -0,0 +1 @@
+MAVERAGEVIEW
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Views/Cartesian View b/share/metview/app-defaults/Drawers/Views/Cartesian View
new file mode 100755
index 0000000..5c40b85
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/Cartesian View	
@@ -0,0 +1,2 @@
+CARTESIANVIEW
+
diff --git a/share/metview/app-defaults/Drawers/Views/Cross Section View b/share/metview/app-defaults/Drawers/Views/Cross Section View
new file mode 100644
index 0000000..5727809
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/Cross Section View	
@@ -0,0 +1 @@
+MXSECTVIEW
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Views/Geographical View b/share/metview/app-defaults/Drawers/Views/Geographical View
new file mode 100644
index 0000000..04f7231
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/Geographical View	
@@ -0,0 +1 @@
+GEOVIEW
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Views/Vertical Profile View b/share/metview/app-defaults/Drawers/Views/Vertical Profile View
new file mode 100644
index 0000000..42abd97
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Views/Vertical Profile View	
@@ -0,0 +1 @@
+MVERTPROFVIEW
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Axis Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/.Axis Plotting
new file mode 100644
index 0000000..b7544e2
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Axis Plotting	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MAXIS,
+    X          = 388,
+    Y          = 8
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Binning b/share/metview/app-defaults/Drawers/Visual Definitions/.Binning
new file mode 100644
index 0000000..df39576
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Binning	
@@ -0,0 +1,4 @@
+USER_INTERFACE,
+    ICON_CLASS = MBINNING,
+    X          = 97,
+    Y          = 80
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Coastlines b/share/metview/app-defaults/Drawers/Visual Definitions/.Coastlines
new file mode 100755
index 0000000..7f54907
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Coastlines	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Coastlines,
+    X          = 13,
+    Y          = 16,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MCOAST,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Contouring b/share/metview/app-defaults/Drawers/Visual Definitions/.Contouring
new file mode 100755
index 0000000..e3f86a9
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Contouring	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Contour,
+    X          = 89,
+    Y          = 16,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MCONT,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Graph Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/.Graph Plotting
new file mode 100644
index 0000000..4187c53
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Graph Plotting	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MGRAPH,
+    X          = 97,
+    Y          = 80
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Legend b/share/metview/app-defaults/Drawers/Visual Definitions/.Legend
new file mode 100644
index 0000000..51dc571
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Legend	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MLEGEND,
+    X          = 22,
+    Y          = 84
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Symbol Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/.Symbol Plotting
new file mode 100644
index 0000000..b7faaf1
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Symbol Plotting	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MSYMB,
+    X          = 263,
+    Y          = 14
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Text Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/.Text Plotting
new file mode 100644
index 0000000..36e6c36
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Text Plotting	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MTEXT,
+    X          = 375,
+    Y          = 14
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/.Wind Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/.Wind Plotting
new file mode 100644
index 0000000..bd5a34f
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/.Wind Plotting	
@@ -0,0 +1,5 @@
+USER_INTERFACE,
+    ICON_CLASS = MWIND,
+    X          = 172,
+    Y          = 14
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Axis Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/Axis Plotting
new file mode 100644
index 0000000..bf41ced
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Axis Plotting	
@@ -0,0 +1 @@
+MAXIS
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Binning b/share/metview/app-defaults/Drawers/Visual Definitions/Binning
new file mode 100644
index 0000000..ebb7023
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Binning	
@@ -0,0 +1 @@
+MBINNING 
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Coastlines b/share/metview/app-defaults/Drawers/Visual Definitions/Coastlines
new file mode 100755
index 0000000..4aaf6d2
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Coastlines	
@@ -0,0 +1,2 @@
+MCOAST
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Contouring b/share/metview/app-defaults/Drawers/Visual Definitions/Contouring
new file mode 100755
index 0000000..1a8e1ed
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Contouring	
@@ -0,0 +1,2 @@
+MCONT
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Graph Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/Graph Plotting
new file mode 100644
index 0000000..a40a74c
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Graph Plotting	
@@ -0,0 +1 @@
+MGRAPH
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Legend b/share/metview/app-defaults/Drawers/Visual Definitions/Legend
new file mode 100644
index 0000000..317445b
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Legend	
@@ -0,0 +1 @@
+MLEGEND
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Symbol Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/Symbol Plotting
new file mode 100644
index 0000000..2d06f65
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Symbol Plotting	
@@ -0,0 +1,2 @@
+MSYMB
+
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Text Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/Text Plotting
new file mode 100644
index 0000000..b0f496b
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Text Plotting	
@@ -0,0 +1 @@
+MTEXT
\ No newline at end of file
diff --git a/share/metview/app-defaults/Drawers/Visual Definitions/Wind Plotting b/share/metview/app-defaults/Drawers/Visual Definitions/Wind Plotting
new file mode 100644
index 0000000..7b2af77
--- /dev/null
+++ b/share/metview/app-defaults/Drawers/Visual Definitions/Wind Plotting	
@@ -0,0 +1,2 @@
+MWIND
+
diff --git a/share/metview/app-defaults/FrameKeyProfile_all.xml b/share/metview/app-defaults/FrameKeyProfile_all.xml
new file mode 100644
index 0000000..9cb1fd5
--- /dev/null
+++ b/share/metview/app-defaults/FrameKeyProfile_all.xml
@@ -0,0 +1,268 @@
+<MetviewKeyProfile type="Frame">
+	<Profile name="Metview keys">
+		<Key name="MV_Format" shortName="Format" desc="Data format"/>
+		<Key name="MV_Frame" shortName="Frame" desc="Frame index"/>
+		<Key name="MV_Value" shortName="Val" desc="Data value">
+			<Data x_coord=""/>
+			<Data y_coord=""/>
+			<Data colour="#FF0000"/>
+		</Key>		
+	</Profile>
+	<Profile name="GRIB API keys">
+		<Key name="GRIBEditionNumber" shortName="GRIBEditionNumber" desc=""/>
+		<Key name="Ni" shortName="Ni" desc=""/>
+		<Key name="Nj" shortName="Nj" desc=""/>
+		<Key name="P1" shortName="P1" desc=""/>
+		<Key name="P2" shortName="P2" desc=""/>
+		<Key name="PLPresent" shortName="PLPresent" desc=""/>
+		<Key name="PVPresent" shortName="PVPresent" desc=""/>
+		<Key name="additionalFlagPresent" shortName="additionalFlagPresent" desc=""/>
+		<Key name="alternativeRowScanning" shortName="alternativeRowScanning" desc=""/>
+		<Key name="average" shortName="average" desc=""/>
+		<Key name="binaryScaleFactor" shortName="binaryScaleFactor" desc=""/>
+		<Key name="bitMapIndicator" shortName="bitMapIndicator" desc=""/>
+		<Key name="bitmapPresent" shortName="bitmapPresent" desc=""/>
+		<Key name="bitsPerValue" shortName="bitsPerValue" desc=""/>
+		<Key name="bitsPerValueAndRepack" shortName="bitsPerValueAndRepack" desc=""/>
+		<Key name="centre" shortName="centre" desc=""/>
+		<Key name="centuryOfReferenceTimeOfData" shortName="centuryOfReferenceTimeOfData" desc=""/>
+		<Key name="cfName" shortName="cfName" desc=""/>
+		<Key name="changeDecimalPrecision" shortName="changeDecimalPrecision" desc=""/>
+		<Key name="complexPacking" shortName="complexPacking" desc=""/>
+		<Key name="count" shortName="count" desc=""/>
+		<Key name="countTotal" shortName="countTotal" desc=""/>
+		<Key name="dataDate" shortName="dataDate" desc=""/>
+		<Key name="dataFlag" shortName="dataFlag" desc=""/>
+		<Key name="dataLength" shortName="dataLength" desc=""/>
+		<Key name="dataRepresentationType" shortName="dataRepresentationType" desc=""/>
+		<Key name="dataTime" shortName="dataTime" desc=""/>
+		<Key name="day" shortName="day" desc=""/>
+		<Key name="decimalPrecision" shortName="decimalPrecision" desc=""/>
+		<Key name="decimalScaleFactor" shortName="decimalScaleFactor" desc=""/>
+		<Key name="definitionFilesVersion" shortName="definitionFilesVersion" desc=""/>
+		<Key name="deleteLocalDefinition" shortName="deleteLocalDefinition" desc=""/>
+		<Key name="distinctLatitudes" shortName="distinctLatitudes" desc=""/>
+		<Key name="distinctLongitudes" shortName="distinctLongitudes" desc=""/>
+		<Key name="earthIsOblate" shortName="earthIsOblate" desc=""/>
+		<Key name="editionNumber" shortName="editionNumber" desc=""/>
+		<Key name="eight" shortName="eight" desc=""/>
+		<Key name="endStep" shortName="endStep" desc=""/>
+		<Key name="eps" shortName="eps" desc=""/>
+		<Key name="evenpadding_sec1" shortName="evenpadding_sec1" desc=""/>
+		<Key name="experimentVersionNumber" shortName="experimentVersionNumber" desc=""/>
+		<Key name="false" shortName="false" desc=""/>
+		<Key name="file" shortName="file" desc=""/>
+		<Key name="generatingProcessIdentifier" shortName="generatingProcessIdentifier" desc=""/>
+		<Key name="getNumberOfValues" shortName="getNumberOfValues" desc=""/>
+		<Key name="globalDomain" shortName="globalDomain" desc=""/>
+		<Key name="grib2LocalSectionNumber" shortName="grib2LocalSectionNumber" desc=""/>
+		<Key name="gridDefinition" shortName="gridDefinition" desc=""/>
+		<Key name="gridDefinitionTemplateNumber" shortName="gridDefinitionTemplateNumber" desc=""/>
+		<Key name="gridDescriptionSectionPresent" shortName="gridDescriptionSectionPresent" desc=""/>
+		<Key name="gridType" shortName="gridType" desc=""/>
+		<Key name="halfByte" shortName="halfByte" desc=""/>
+		<Key name="hour" shortName="hour" desc=""/>
+		<Key name="iDirectionIncrement" shortName="iDirectionIncrement" desc=""/>
+		<Key name="iDirectionIncrementInDegrees" shortName="iDirectionIncrementInDegrees" desc=""/>
+		<Key name="iScansNegatively" shortName="iScansNegatively" desc=""/>
+		<Key name="iScansPositively" shortName="iScansPositively" desc=""/>
+		<Key name="ifsParam" shortName="ifsParam" desc=""/>
+		<Key name="ijDirectionIncrementGiven" shortName="ijDirectionIncrementGiven" desc=""/>
+		<Key name="indicatorOfParameter" shortName="indicatorOfParameter" desc=""/>
+		<Key name="indicatorOfTypeOfLevel" shortName="indicatorOfTypeOfLevel" desc=""/>
+		<Key name="integerPointValues" shortName="integerPointValues" desc=""/>
+		<Key name="isConstant" shortName="isConstant" desc=""/>
+		<Key name="jDirectionIncrement" shortName="jDirectionIncrement" desc=""/>
+		<Key name="jDirectionIncrementInDegrees" shortName="jDirectionIncrementInDegrees" desc=""/>
+		<Key name="jPointsAreConsecutive" shortName="jPointsAreConsecutive" desc=""/>
+		<Key name="jScansPositively" shortName="jScansPositively" desc=""/>
+		<Key name="julianDay" shortName="julianDay" desc=""/>
+		<Key name="kindOfProduct" shortName="kindOfProduct" desc=""/>
+		<Key name="kurtosis" shortName="kurtosis" desc=""/>
+		<Key name="latLonValues" shortName="latLonValues" desc=""/>
+		<Key name="latitudeOfFirstGridPoint" shortName="latitudeOfFirstGridPoint" desc=""/>
+		<Key name="latitudeOfFirstGridPointInDegrees" shortName="latitudeOfFirstGridPointInDegrees" desc=""/>
+		<Key name="latitudeOfLastGridPoint" shortName="latitudeOfLastGridPoint" desc=""/>
+		<Key name="latitudeOfLastGridPointInDegrees" shortName="latitudeOfLastGridPointInDegrees" desc=""/>
+		<Key name="latitudes" shortName="latitudes" desc=""/>
+		<Key name="lengthOfHeaders" shortName="lengthOfHeaders" desc=""/>
+		<Key name="level" shortName="level" desc=""/>
+		<Key name="libraryVersion" shortName="libraryVersion" desc=""/>
+		<Key name="localDefinitionNumber" shortName="localDefinitionNumber" desc=""/>
+		<Key name="localExtensionPadding" shortName="localExtensionPadding" desc=""/>
+		<Key name="localUsePresent" shortName="localUsePresent" desc=""/>
+		<Key name="longitudeOfFirstGridPoint" shortName="longitudeOfFirstGridPoint" desc=""/>
+		<Key name="longitudeOfFirstGridPointInDegrees" shortName="longitudeOfFirstGridPointInDegrees" desc=""/>
+		<Key name="longitudeOfLastGridPoint" shortName="longitudeOfLastGridPoint" desc=""/>
+		<Key name="longitudeOfLastGridPointInDegrees" shortName="longitudeOfLastGridPointInDegrees" desc=""/>
+		<Key name="longitudes" shortName="longitudes" desc=""/>
+		<Key name="marsClass" shortName="marsClass" desc=""/>
+		<Key name="marsParam" shortName="marsParam" desc=""/>
+		<Key name="marsStream" shortName="marsStream" desc=""/>
+		<Key name="marsType" shortName="marsType" desc=""/>
+		<Key name="maximum" shortName="maximum" desc=""/>
+		<Key name="md5Headers" shortName="md5Headers" desc=""/>
+		<Key name="md5Section1" shortName="md5Section1" desc=""/>
+		<Key name="md5Section2" shortName="md5Section2" desc=""/>
+		<Key name="md5Section4" shortName="md5Section4" desc=""/>
+		<Key name="minimum" shortName="minimum" desc=""/>
+		<Key name="minute" shortName="minute" desc=""/>
+		<Key name="missingValue" shortName="missingValue" desc=""/>
+		<Key name="month" shortName="month" desc=""/>
+		<Key name="mybits" shortName="mybits" desc=""/>
+		<Key name="name" shortName="name" desc=""/>
+		<Key name="neitherPresent" shortName="neitherPresent" desc=""/>
+		<Key name="numberIncludedInAverage" shortName="numberIncludedInAverage" desc=""/>
+		<Key name="numberMissingFromAveragesOrAccumulations" shortName="numberMissingFromAveragesOrAccumulations" desc=""/>
+		<Key name="numberOfCodedValues" shortName="numberOfCodedValues" desc=""/>
+		<Key name="numberOfDataPoints" shortName="numberOfDataPoints" desc=""/>
+		<Key name="numberOfForecastsInEnsemble" shortName="numberOfForecastsInEnsemble" desc=""/>
+		<Key name="numberOfMissing" shortName="numberOfMissing" desc=""/>
+		<Key name="numberOfValues" shortName="numberOfValues" desc=""/>
+		<Key name="numberOfVerticalCoordinateValues" shortName="numberOfVerticalCoordinateValues" desc=""/>
+		<Key name="offset" shortName="offset" desc=""/>
+		<Key name="offsetSection0" shortName="offsetSection0" desc=""/>
+		<Key name="offsetValuesBy" shortName="offsetValuesBy" desc=""/>
+		<Key name="one" shortName="one" desc=""/>
+		<Key name="packingError" shortName="packingError" desc=""/>
+		<Key name="packingType" shortName="packingType" desc=""/>
+		<Key name="padding_grid0_1" shortName="padding_grid0_1" desc=""/>
+		<Key name="padding_local1_1" shortName="padding_local1_1" desc=""/>
+		<Key name="padding_sec2_1" shortName="padding_sec2_1" desc=""/>
+		<Key name="padding_sec2_2" shortName="padding_sec2_2" desc=""/>
+		<Key name="padding_sec2_3" shortName="padding_sec2_3" desc=""/>
+		<Key name="padding_sec4_1" shortName="padding_sec4_1" desc=""/>
+		<Key name="paramId" shortName="paramId" desc=""/>
+		<Key name="parameterName" shortName="parameterName" desc=""/>
+		<Key name="parameterUnits" shortName="parameterUnits" desc=""/>
+		<Key name="perturbationNumber" shortName="perturbationNumber" desc=""/>
+		<Key name="pressureUnits" shortName="pressureUnits" desc=""/>
+		<Key name="productionStatusOfProcessedData" shortName="productionStatusOfProcessedData" desc=""/>
+		<Key name="pvlLocation" shortName="pvlLocation" desc=""/>
+		<Key name="radius" shortName="radius" desc=""/>
+		<Key name="referenceValue" shortName="referenceValue" desc=""/>
+		<Key name="referenceValueError" shortName="referenceValueError" desc=""/>
+		<Key name="reservedNeedNotBePresent" shortName="reservedNeedNotBePresent" desc=""/>
+		<Key name="resolutionAndComponentFlags" shortName="resolutionAndComponentFlags" desc=""/>
+		<Key name="resolutionAndComponentFlags3" shortName="resolutionAndComponentFlags3" desc=""/>
+		<Key name="resolutionAndComponentFlags4" shortName="resolutionAndComponentFlags4" desc=""/>
+		<Key name="resolutionAndComponentFlags6" shortName="resolutionAndComponentFlags6" desc=""/>
+		<Key name="resolutionAndComponentFlags7" shortName="resolutionAndComponentFlags7" desc=""/>
+		<Key name="resolutionAndComponentFlags8" shortName="resolutionAndComponentFlags8" desc=""/>
+		<Key name="scaleValuesBy" shortName="scaleValuesBy" desc=""/>
+		<Key name="scanningMode" shortName="scanningMode" desc=""/>
+		<Key name="scanningMode4" shortName="scanningMode4" desc=""/>
+		<Key name="scanningMode5" shortName="scanningMode5" desc=""/>
+		<Key name="scanningMode6" shortName="scanningMode6" desc=""/>
+		<Key name="scanningMode7" shortName="scanningMode7" desc=""/>
+		<Key name="scanningMode8" shortName="scanningMode8" desc=""/>
+		<Key name="second" shortName="second" desc=""/>
+		<Key name="section0Length" shortName="section0Length" desc=""/>
+		<Key name="section1Length" shortName="section1Length" desc=""/>
+		<Key name="section1Padding" shortName="section1Padding" desc=""/>
+		<Key name="section2Length" shortName="section2Length" desc=""/>
+		<Key name="section4Length" shortName="section4Length" desc=""/>
+		<Key name="section5Length" shortName="section5Length" desc=""/>
+		<Key name="setLocalDefinition" shortName="setLocalDefinition" desc=""/>
+		<Key name="shapeOfTheEarth" shortName="shapeOfTheEarth" desc=""/>
+		<Key name="shortName" shortName="shortName" desc=""/>
+		<Key name="skewness" shortName="skewness" desc=""/>
+		<Key name="sphericalHarmonics" shortName="sphericalHarmonics" desc=""/>
+		<Key name="standardDeviation" shortName="standardDeviation" desc=""/>
+		<Key name="startStep" shortName="startStep" desc=""/>
+		<Key name="stepRange" shortName="stepRange" desc=""/>
+		<Key name="stepType" shortName="stepType" desc=""/>
+		<Key name="stepUnits" shortName="stepUnits" desc=""/>
+		<Key name="subCentre" shortName="subCentre" desc=""/>
+		<Key name="table2Version" shortName="table2Version" desc=""/>
+		<Key name="tableReference" shortName="tableReference" desc=""/>
+		<Key name="thousand" shortName="thousand" desc=""/>
+		<Key name="timeRangeIndicator" shortName="timeRangeIndicator" desc=""/>
+		<Key name="totalLength" shortName="totalLength" desc=""/>
+		<Key name="truncateDegrees" shortName="truncateDegrees" desc=""/>
+		<Key name="typeOfLevel" shortName="typeOfLevel" desc=""/>
+		<Key name="unitOfTimeRange" shortName="unitOfTimeRange" desc=""/>
+		<Key name="units" shortName="units" desc=""/>
+		<Key name="unitsBias" shortName="unitsBias" desc=""/>
+		<Key name="unitsFactor" shortName="unitsFactor" desc=""/>
+		<Key name="unpackedError" shortName="unpackedError" desc=""/>
+		<Key name="uvRelativeToGrid" shortName="uvRelativeToGrid" desc=""/>
+		<Key name="validityDate" shortName="validityDate" desc=""/>
+		<Key name="validityTime" shortName="validityTime" desc=""/>
+		<Key name="values" shortName="values" desc=""/>
+		<Key name="wrongPadding" shortName="wrongPadding" desc=""/>
+		<Key name="year" shortName="year" desc=""/>
+		<Key name="yearOfCentury" shortName="yearOfCentury" desc=""/>
+		<Key name="zero" shortName="zero" desc=""/>
+	</Profile>
+	<Profile name="GRIB API Namespace: geography">
+		<Key name="geography.bitmapPresent" shortName="geography.bitmapPresent" desc=""/>
+		<Key name="geography.gridType" shortName="geography.gridType" desc=""/>
+		<Key name="geography.iDirectionIncrementInDegrees" shortName="geography.iDirectionIncrementInDegrees" desc=""/>
+		<Key name="geography.iScansNegatively" shortName="geography.iScansNegatively" desc=""/>
+		<Key name="geography.jDirectionIncrementInDegrees" shortName="geography.jDirectionIncrementInDegrees" desc=""/>
+		<Key name="geography.jPointsAreConsecutive" shortName="geography.jPointsAreConsecutive" desc=""/>
+		<Key name="geography.jScansPositively" shortName="geography.jScansPositively" desc=""/>
+		<Key name="geography.latitudeOfFirstGridPointInDegrees" shortName="geography.latitudeOfFirstGridPointInDegrees" desc=""/>
+		<Key name="geography.latitudeOfLastGridPointInDegrees" shortName="geography.latitudeOfLastGridPointInDegrees" desc=""/>
+		<Key name="geography.longitudeOfFirstGridPointInDegrees" shortName="geography.longitudeOfFirstGridPointInDegrees" desc=""/>
+		<Key name="geography.longitudeOfLastGridPointInDegrees" shortName="geography.longitudeOfLastGridPointInDegrees" desc=""/>
+	</Profile>
+	<Profile name="GRIB API Namespace: ls">
+		<Key name="ls.centre" shortName="ls.centre" desc=""/>
+		<Key name="ls.dataDate" shortName="ls.dataDate" desc=""/>
+		<Key name="ls.dataType" shortName="ls.dataType" desc=""/>
+		<Key name="ls.edition" shortName="ls.edition" desc=""/>
+		<Key name="ls.gridType" shortName="ls.gridType" desc=""/>
+		<Key name="ls.level" shortName="ls.level" desc=""/>
+		<Key name="ls.packingType" shortName="ls.packingType" desc=""/>
+		<Key name="ls.shortName" shortName="ls.shortName" desc=""/>
+		<Key name="ls.stepRange" shortName="ls.stepRange" desc=""/>
+		<Key name="ls.typeOfLevel" shortName="ls.typeOfLevel" desc=""/>
+	</Profile>
+	<Profile name="GRIB API Namespace: mars">
+		<Key name="mars.class" shortName="mars.class" desc=""/>
+		<Key name="mars.date" shortName="mars.date" desc=""/>
+		<Key name="mars.domain" shortName="mars.domain" desc=""/>
+		<Key name="mars.expver" shortName="mars.expver" desc=""/>
+		<Key name="mars.levelist" shortName="mars.levelist" desc=""/>
+		<Key name="mars.levtype" shortName="mars.levtype" desc=""/>
+		<Key name="mars.param" shortName="mars.param" desc=""/>
+		<Key name="mars.step" shortName="mars.step" desc=""/>
+		<Key name="mars.stream" shortName="mars.stream" desc=""/>
+		<Key name="mars.time" shortName="mars.time" desc=""/>
+		<Key name="mars.type" shortName="mars.type" desc=""/>
+	</Profile>
+	<Profile name="GRIB API Namespace: parameter">
+		<Key name="parameter.centre" shortName="parameter.centre" desc=""/>
+		<Key name="parameter.name" shortName="parameter.name" desc=""/>
+		<Key name="parameter.paramId" shortName="parameter.paramId" desc=""/>
+		<Key name="parameter.shortName" shortName="parameter.shortName" desc=""/>
+		<Key name="parameter.units" shortName="parameter.units" desc=""/>
+	</Profile>
+	<Profile name="GRIB API Namespace: time">
+		<Key name="time.dataDate" shortName="time.dataDate" desc=""/>
+		<Key name="time.dataTime" shortName="time.dataTime" desc=""/>
+		<Key name="time.endStep" shortName="time.endStep" desc=""/>
+		<Key name="time.startStep" shortName="time.startStep" desc=""/>
+		<Key name="time.stepRange" shortName="time.stepRange" desc=""/>
+		<Key name="time.stepType" shortName="time.stepType" desc=""/>
+		<Key name="time.stepUnits" shortName="time.stepUnits" desc=""/>
+		<Key name="time.validityDate" shortName="time.validityDate" desc=""/>
+		<Key name="time.validityTime" shortName="time.validityTime" desc=""/>
+	</Profile>
+	<Profile name="GRIB API namespace: vertical">
+		<Key name="vertical.level" shortName="vertical.level" desc=""/>
+		<Key name="vertical.typeOfLevel" shortName="vertical.typeOfLevel" desc=""/>
+	</Profile>	
+	<Profile name="GRIB API OBSTAT keys">
+		<Key name="codeType" shortName="codeType" desc=""/>
+		<Key name="dataSelection" shortName="dataSelection" desc=""/>
+		<Key name="instrument" shortName="instrument" desc=""/>
+		<Key name="observationDiagnostic" shortName="observationDiagnostic" desc=""/>
+		<Key name="observationType" shortName="observationType" desc=""/>
+		<Key name="platform" shortName="platform" desc=""/>
+		<Key name="reportType" shortName="reportType" desc=""/>
+		<Key name="scanPosition" shortName="scanPosition" desc=""/>		
+	</Profile>
+</MetviewKeyProfile>
\ No newline at end of file
diff --git a/share/metview/app-defaults/FrameKeyProfile_default.xml b/share/metview/app-defaults/FrameKeyProfile_default.xml
new file mode 100644
index 0000000..0ef38d7
--- /dev/null
+++ b/share/metview/app-defaults/FrameKeyProfile_default.xml
@@ -0,0 +1,11 @@
+<MetviewKeyProfile type="Frame">
+	<Profile name="System::Default">
+		<Key name="MV_Frame" shortName="Frame" desc="Frame index"/>
+		<Key name="shortName" shortName="Name" desc=""/>
+		<Key name="date" shortName="Date" desc=""/>
+		<Key name="time" shortName="Time" desc=""/>
+		<Key name="stepRange" shortName="Step" desc=""/>
+		<Key name="level" shortName="Level" desc=""/>
+		<Key name="levelType" shortName="LevType" desc=""/>
+	</Profile>
+</MetviewKeyProfile>
\ No newline at end of file
diff --git a/share/metview/app-defaults/GribKeyProfile_default.xml b/share/metview/app-defaults/GribKeyProfile_default.xml
new file mode 100644
index 0000000..a0e0725
--- /dev/null
+++ b/share/metview/app-defaults/GribKeyProfile_default.xml
@@ -0,0 +1,11 @@
+<MetviewKeyProfile type="GRIB">
+	<Profile name="System::Default">
+		<Key name="MV_Index" shortName="Index" desc="Message index"/>
+		<Key name="shortName" shortName="Name" desc=""/>
+		<Key name="date" shortName="Date" desc=""/>
+		<Key name="time" shortName="Time" desc=""/>
+		<Key name="stepRange" shortName="Step" desc=""/>
+		<Key name="level" shortName="Level" desc=""/>
+		<Key name="levelType" shortName="LevType" desc=""/>
+	</Profile>
+</MetviewKeyProfile>
\ No newline at end of file
diff --git a/share/metview/app-defaults/LayerKeyProfile_default.xml b/share/metview/app-defaults/LayerKeyProfile_default.xml
new file mode 100644
index 0000000..7fbe481
--- /dev/null
+++ b/share/metview/app-defaults/LayerKeyProfile_default.xml
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<MetviewKeyProfile type="Layer">
+	<Profile name="System::Coastlines">
+	</Profile>
+	<!-- GRIB -->
+	<Profile name="System::GRIB">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="File"/>
+		<Key name="name" shortName="Name">
+			<Data source="gribapi"/>
+		</Key>	
+		<Key name="units" shortName="Original units">
+			<Data source="gribapi"/>
+		</Key>
+		<Key name="scaling_formula" shortName="Scaling"/>
+		<Key name="scaled_units" shortName="Scaled units"/>
+		<Key name="date" shortName="Date">
+			<Data source="gribapi"/>
+		</Key>
+		<Key name="time" shortName="Time">
+			<Data source="gribapi"/>		
+		</Key>
+		<Key name="stepRange" shortName="Step">
+			<Data source="gribapi"/>		
+		</Key>
+		<Key name="level" shortName="Level">
+			<Data source="gribapi"/>
+		</Key>
+		<Key name="levelType" shortName="Level type">
+			<Data source="gribapi"/>
+		</Key>
+		<Key name="gridType" shortName="Grid type">
+			<Data source="gribapi"/>		
+		</Key>
+		<Key name="N" shortName="Grid (N)">
+			<Data source="gribapi"/>		
+		</Key>
+		<Key name="iDirectionIncrementInDegrees" shortName="Dx">
+			<Data source="gribapi"/>
+		</Key>
+		<Key name="jDirectionIncrementInDegrees" shortName="Dy">
+			<Data source="gribapi"/>
+		</Key>
+		<Key name="" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key> 		
+		<Key name="stats::points" shortName="Points">
+			<Data group="stats"/>
+		</Key>
+		<Key name="stats::min" shortName="Minimum">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::max" shortName="Maximum">
+			<Data group="stats"/>
+		</Key>
+		<Key name="stats::avg" shortName="Average">
+			<Data group="stats"/>		
+		</Key>
+		<Key name="stats::stdev" shortName="Stdev">
+			<Data group="stats"/>
+		</Key>
+		<Key name="stats::skewness" shortName="Skewness">
+			<Data group="stats"/>
+		</Key>
+ 		<Key name="stats::kurtosis" shortName="Kurtosis">
+			<Data group="stats"/>
+		</Key>		
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo"/>
+		</Key>     		 
+	</Profile>
+	<Profile name="System::GEOPOINTS">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="File"/>
+		<Key name="" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key>   
+		<Key name="stats::points" shortName="Points">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::min" shortName="Minimum">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::max" shortName="Maximum">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::avg" shortName="Average">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::stdev" shortName="Stdev">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::skewness" shortName="Skewness">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::kurtosis" shortName="Kurtosis">
+			<Data group="stats"/>
+		</Key>
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo"/>
+		</Key>     		  				
+	</Profile>	
+	<Profile name="System::NetCDF_matrix">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="File"/>
+		<Key name="x" shortName="X data"/>
+		<Key name="y" shortName="Y data"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="" shortName="Value attributes">
+			<Data type="title"/>
+		</Key>
+		<Key name="valueAttr">
+			<Data type="table" subType="noShortNameHighlightFirst"/>
+			<Data column="valueAttrKey/valueAttrValue"/>
+		</Key> 
+		<Key name="" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key>
+		<Key name="stats::points" shortName="Points">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::min" shortName="Minimum">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::max" shortName="Maximum">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::avg" shortName="Average">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::stdev" shortName="Stdev">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::skewness" shortName="Skewness">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::kurtosis" shortName="Kurtosis">
+			<Data group="stats"/>
+		</Key>
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo"/>
+		</Key>     		  			
+	</Profile>	
+	<Profile name="System::NetCDF_geomatrix">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="File"/>
+		<Key name="latitude" shortName="Latitude"/>
+		<Key name="longitude" shortName="Longitude"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="" shortName="Value attributes">
+			<Data type="title"/>
+		</Key>
+		<Key name="valueAttr">
+			<Data type="table" subType="noShortNameHighlightFirst"/>
+			<Data column="valueAttrKey/valueAttrValue"/>
+		</Key> 
+		<Key name="" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key>
+		<Key name="stats::points" shortName="Points">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::min" shortName="Minimum">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::max" shortName="Maximum">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::avg" shortName="Average">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::stdev" shortName="Stdev">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::skewness" shortName="Skewness">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::kurtosis" shortName="Kurtosis">
+			<Data group="stats"/>
+		</Key>
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo"/>
+		</Key>     		  			
+	</Profile>		
+	<Profile name="System::NetCDF_xypoints">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="File"/>
+		<Key name="x" shortName="X data"/>
+		<Key name="y" shortName="Y data"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="" shortName="Value attributes">
+			<Data type="title"/>
+		</Key>
+		<Key name="valueAttr">
+			<Data type="table" subType="noShortNameHighlightFirst"/>
+			<Data column="valueAttrKey/valueAttrValue"/>
+		</Key> 
+	</Profile>	
+	<Profile name="System::NetCDF_vprof">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="description" shortName="Description"/>
+		<Key name="latitude" shortName="Latitude"/>
+		<Key name="longitude" shortName="Longitude"/>
+		<Key name="path" shortName="File"/>
+		<Key name="x" shortName="X data"/>
+		<Key name="y" shortName="Y data"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="" shortName="X attributes">
+			<Data type="title"/>
+		</Key>
+		<Key name="xAttr">
+			<Data type="table" subType="noShortNameHighlightFirst"/>
+			<Data column="xAttrKey/xAttrValue"/>
+		</Key>
+		<Key name="" shortName="Y attributes">
+			<Data type="title"/>
+		</Key>
+		<Key name="yAttr">
+			<Data type="table" subType="noShortNameHighlightFirst"/>
+			<Data column="yAttrKey/yAttrValue"/>
+		</Key>
+		
+	</Profile>
+	<Profile name="System::ODB_geopoints">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="Database"/>
+		<Key name="lat" shortName="Latitude"/>
+		<Key name="lon" shortName="Longitude"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key>   
+		<Key name="stats::points" shortName="Points">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::min" shortName="Minimum">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::max" shortName="Maximum">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::avg" shortName="Average">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::stdev" shortName="Stdev">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::skewness" shortName="Skewness">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::kurtosis" shortName="Kurtosis">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo"/>
+		</Key>     		  	
+	</Profile>	
+	<Profile name="System::ODB_geovectors">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="Database"/>
+		<Key name="lat" shortName="Latitude"/>
+		<Key name="lon" shortName="Longitude"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="x" shortName="X component"/>
+		<Key name="y" shortName="Y component"/>
+		<Key name="" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key>   
+		<Key name="stats::points" shortName="Points">	
+			<Data group="stats"/>		
+		</Key>	
+		<Key name="stats::min" shortName="Minimum">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::max" shortName="Maximum">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::avg" shortName="Average">	
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::stdev" shortName="Stdev">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::skewness" shortName="Skewness">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::kurtosis" shortName="Kurtosis">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo"/>
+		</Key>   
+	</Profile>	
+	
+	<Profile name="System::ODB_xy">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="path" shortName="Database"/>
+		<Key name="lat" shortName="Latitude"/>
+		<Key name="lon" shortName="Longitude"/>
+		<Key name="value" shortName="Value"/>
+		<Key name="x" shortName="X data"/>
+		<Key name="y" shortName="Y data"/>
+		<Key name="title" shortName="Statistics (for data in visible area)">
+			<Data type="title"/>
+			<Data group="stats"/>
+		</Key>
+		<Key name="stats::points_x" shortName="Points">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="stats::correlation" shortName="Correlation (XY)">
+			<Data group="stats"/>
+		</Key>	
+		<Key name="st" shortName="">	
+			<Data type="list"/>
+			<Data subType="label"/>
+			<Data item="X data/Y data/Value"/>		    
+		</Key>	
+		<Key name="st" shortName="Minimum">	
+			<Data type="list"/>
+			<Data item="stats::min_x/stats::min_y/stats::min"/>
+			<Data group="stats"/>
+		</Key>		    
+		<Key name="st" shortName="Maximum">	
+			 <Data type="list"/> 
+			 <Data item="stats::max_x/stats::max_y/stats::max"/>
+			 <Data group="stats"/>
+		</Key>				    
+		<Key name="st" shortName="Mean">	
+			 <Data type="list"/>
+			 <Data item="stats::avg_x/stats::avg_y/stats::avg"/>
+			 <Data group="stats"/>			    
+		</Key>	
+		<Key name="st" shortName="Stdev">	
+			 <Data type="list"/>
+			 <Data item="stats::stdev_x/stats::stdev_y/stats::stdev"/>
+			 <Data group="stats"/>			    
+		</Key>	
+		<Key name="" shortName="Histogram (for data in visible area)">
+			<Data type="title" dependency="stats::min"/>
+			<Data group="histo"/>
+		</Key>
+		<Key name="histogram" shortName="Histogram">
+			<Data type="image" subType="histogram"/>
+			<Data group="histo" dependency="stats::min"/>
+		</Key>
+		<Key name="histogram_data" shortName="Histogram data">
+			<Data type="table" subType="histogram"/>
+			<Data header="Bar/From/To/Count"/>
+			<Data column="histogram_col/histogram_min/histogram_max/histogram_val"/>
+			<Data group="histo" dependency="stats::min"/>
+		</Key>     			
+	</Profile>
+	<Profile name="System::RASTERLOOP_WMS">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="service_name" shortName="Service name"/>
+		<Key name="service_title" shortName="Service title"/>
+		<Key name="url" shortName="URL"/>
+		<Key name="name" shortName="Layer name"/>
+		<Key name="title" shortName="Layer title"/>
+		<Key name="description" shortName="Layer description"/>
+		<Key name="dims" shortName="Dimensions">
+			<Data type="table"/>
+			<Data header="Name/Value"/>
+			<Data column="dimName/dimValue"/>
+		</Key>	
+		<Key name="legend" shortName="Legend">
+			<Data type="image"/>
+		</Key>
+		<Key name="logo" shortName="Logo">
+			<Data type="image"/>
+		</Key>	
+	</Profile>	
+	<Profile name="System::TABLE_flextra">
+		<Key name="MV_Format" shortName="Data type"/>
+		<Key name="type" shortName="Type"/>
+		<Key name="direction" shortName="Direction"/>
+		<Key name="startDate" shortName="Date"/>
+		<Key name="startTime" shortName="Time"/>
+		<Key name="startComment" shortName="Location"/>
+		<Key name="startLat" shortName="Latitude"/>
+		<Key name="startLon" shortName="Longitude"/>
+		<Key name="startZ" shortName="Z ASL (m)"/>
+		<Key name="startZAboveGround" shortName="Z AGL (m)"/>
+		<Key name="startPres" shortName="P (hPa)"/>
+		<Key name="" shortName="Trajectories">
+			<Data type="title"/>
+		</Key>
+		<Key name="trajectories" shortName="Trajectories">
+			<Data type="table" subType="noShortName"/>
+			<Data header="Date/Time/Lon/Lat/Z ASL (m)/Z AGL (m)/P (hPa)/Exit code"/>
+			<Data column="startDate_TR/startTime_TR/startLon_TR/startLat_TR/startZ_TR/startZAboveGround_TR/startPres_TR/stopIndex_TR"/>
+		</Key>
+		<Key name="" shortName="Domain">
+			<Data type="title"/>
+		</Key>
+		<Key name="north" shortName="North"/>
+		<Key name="west" shortName="West"/>
+		<Key name="east" shortName="East"/>
+		<Key name="south" shortName="South"/>
+		<Key name="dx" shortName="Dx"/>
+		<Key name="dy" shortName="Dy"/>
+		<Key name="" shortName="Flextra parameters">
+			<Data type="title"/>
+		</Key>
+		<Key name="cflSpace" shortName="Spatial CFL"/>
+		<Key name="cflTime" shortName="Temporal CFL"/>
+		<Key name="integration" shortName="Integration"/>
+		<Key name="interpolation" shortName="Interpolation"/>
+		<!-- <Key name="stop_index" shortName="Flextra Stop Index"/> -->
+	</Profile>
+	<Profile name="System::TABLE">
+        </Profile>	
+</MetviewKeyProfile>
diff --git a/share/metview/app-defaults/Makefile.am b/share/metview/app-defaults/Makefile.am
new file mode 100644
index 0000000..a24c9c4
--- /dev/null
+++ b/share/metview/app-defaults/Makefile.am
@@ -0,0 +1,31 @@
+sharedir		= $(datadir)/metview/app-defaults
+dirstocopy              = CommonMacroFuncs Drawers Templates news
+share_DATA		= DemoFonts Metview NormalFonts User_Dir_Frame.tar.gz MvVersion MvVersionDetails metview.qss \
+			  BufrKeyProfile_default.xml BufrKeyProfile_all.xml GribKeyProfile_default.xml \
+			  FrameKeyProfile_default.xml FrameKeyProfile_all.xml LayerKeyProfile_default.xml
+
+
+# to ensure that certain directories (Drawers, Templates, etc) are installed. Unfortunately,
+# we cannot install these via the usual route because some of the files have spaces in their
+# names and this seems difficult to handle in ordinary Makefiles, and perhaps impossible
+# with autotools.
+
+install-data-hook:
+	echo "install-data-local"
+	cp -r -H $(dirstocopy) $(DESTDIR)$(sharedir)
+	chmod -R u+w  $(DESTDIR)$(sharedir)
+	chmod -R a+rX $(DESTDIR)$(sharedir)
+
+
+
+# ensure the Folder 'icon' is created. Note that we cannot store it in Perforce
+# because it is an empty folder
+
+Drawers/Basic/Folder:
+	mkdir -p Drawers/Basic/Folder
+
+BUILT_SOURCES = Drawers/Basic/Folder
+
+
+
+EXTRA_DIST = $(share_DATA) $(dirstocopy)
diff --git a/share/metview/app-defaults/Makefile.in b/share/metview/app-defaults/Makefile.in
new file mode 100644
index 0000000..beded4a
--- /dev/null
+++ b/share/metview/app-defaults/Makefile.in
@@ -0,0 +1,523 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = share/metview/app-defaults
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sharedir = $(datadir)/metview/app-defaults
+dirstocopy = CommonMacroFuncs Drawers Templates news
+share_DATA = DemoFonts Metview NormalFonts User_Dir_Frame.tar.gz MvVersion MvVersionDetails metview.qss \
+			  BufrKeyProfile_default.xml BufrKeyProfile_all.xml GribKeyProfile_default.xml \
+			  FrameKeyProfile_default.xml FrameKeyProfile_all.xml LayerKeyProfile_default.xml
+
+BUILT_SOURCES = Drawers/Basic/Folder
+EXTRA_DIST = $(share_DATA) $(dirstocopy)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu share/metview/app-defaults/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu share/metview/app-defaults/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-shareDATA
+
+.MAKE: all check install install-am install-data-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-data-hook install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-shareDATA
+
+
+# to ensure that certain directories (Drawers, Templates, etc) are installed. Unfortunately,
+# we cannot install these via the usual route because some of the files have spaces in their
+# names and this seems difficult to handle in ordinary Makefiles, and perhaps impossible
+# with autotools.
+
+install-data-hook:
+	echo "install-data-local"
+	cp -r -H $(dirstocopy) $(DESTDIR)$(sharedir)
+	chmod -R u+w  $(DESTDIR)$(sharedir)
+	chmod -R a+rX $(DESTDIR)$(sharedir)
+
+# ensure the Folder 'icon' is created. Note that we cannot store it in Perforce
+# because it is an empty folder
+
+Drawers/Basic/Folder:
+	mkdir -p Drawers/Basic/Folder
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/share/metview/app-defaults/Metview b/share/metview/app-defaults/Metview
new file mode 100644
index 0000000..c0ecd55
--- /dev/null
+++ b/share/metview/app-defaults/Metview
@@ -0,0 +1,101 @@
+# 1 "GenApp.res"
+
+!!!!
+!!!!	wheel-mouse additions (from Stephan, Nov 2006)
+!!!!
+
+*XmList.baseTranslations: #augment <Btn5Down>: ListNextPage()\n\
+ <Btn4Down>: ListPrevPage()\n
+
+*XmScrollBar.baseTranslations: #augment <Btn4Down>: IncrementUpOrLeft(0) IncrementUpOrLeft(1)\n\
+ <Btn5Down>: IncrementDownOrRight(0) IncrementDownOrRight(1)\n
+
+*XmText.baseTranslations: #augment Shift<Btn4Down>: page-left()\n\
+ Shift<Btn5Down>: page-right()\n\
+ <Btn4Down>: scroll-one-line-down()\n\
+ <Btn5Down>: scroll-one-line-up()\n
+
+
+!!!!!
+!!!!!            GenApp RESOURCES.
+!!!!!
+
+
+!! GenApp windows's look...
+
+Metview*GenApp.AppWidth  : 		800
+Metview*GenApp.AppHeight : 		650
+!Metview*AppIcon : 			$METVIEW_DIR_SHARE/icons/Metview.xpm
+
+Metview*MenuCascade*labelType:		PIXMAP
+
+!Metview*Apply.labelString: 		Appoops
+
+Metview*traversalOn : True
+Metview*ColorArray*round : 1
+Metview*SymbolArray*round : 1
+
+
+# 1 "General.res"
+
+!!!!!
+!!!!!       METVIEW GENERAL RESOURCES.
+!!!!!
+
+! without this one some fields are not editable (e.g. in Stations Tool)
+!Metview*keyboardFocusPolicy: POINTER
+Metview*keyboardFocusPolicy: EXPLICIT
+
+Metview*transient : false
+Metview*Drag.grid : off
+*Hyper.normalFont: times
+
+Metview*XmSeparator.margin:    0
+!Metview*XmList.listMarginWidth : 3
+Metview*XmFrame.shadowType:    Shadow_Etched_In
+
+Metview*listSizePolicy: CONSTANT
+Metview*XmToggleButtonGadget.marginTop: 0
+Metview*XmToggleButtonGadget.marginBottom : 0
+
+! Drag and Drop
+
+Metview*iconForeground: Navy
+Metview*iconBackground: Blue
+
+
+! Icons <<<### For exampool
+
+Metview*SERVICE.iconLargeBitmap:  $METVIEW_DIR_SHARE/icons/SERVICE.icon
+
+!<<<### End For exampool
+
+
+
+!!!! !!!!!!!!!!
+
+!Metview windows background colour
+Metview*background: #ffffff
+Metview*topShadowColor: #dddddd
+Metview*bottomShadowColor: #888888
+
+Metview*XmToggleButton.visibleWhenOff:  true
+Metview*XmToggleButton.selectColor:     Blue
+Metview*XmToggleButton.fillOnSelect:    true
+Metview*XmToggleButtonGadget.selectColor:        Green
+Metview*XmToggleButtonGadget.fillOnSelect:       true
+Metview*indicatorSize:     12
+
+Metview*Hyper*highlightColor: Blue
+Metview*Hyper*navigationType : NONE
+Metview*Hyper*highlightOnEnter : false
+Metview*Hyper*highlightThickness : 0
+
+Metview*.scrollBarDisplayPolicy: STATIC
+
+Metview*.XmText.background: OldLace
+Metview*.XmTextField.background: white
+Metview*.XmPushButton.background: #f4f4ff
+!Metview*.XmPopupMenu.background: #efefef
+Metview.XmForm.XmRowColumn.background: #efefef
+Metview.XmForm.XmRowColumn.XmCascadeButton.background: #efefef
diff --git a/share/metview/app-defaults/MvVersion b/share/metview/app-defaults/MvVersion
new file mode 100644
index 0000000..32e5402
--- /dev/null
+++ b/share/metview/app-defaults/MvVersion
@@ -0,0 +1 @@
+4.3.11
\ No newline at end of file
diff --git a/share/metview/app-defaults/MvVersionDetails b/share/metview/app-defaults/MvVersionDetails
new file mode 100644
index 0000000..171c760
--- /dev/null
+++ b/share/metview/app-defaults/MvVersionDetails
@@ -0,0 +1 @@
+1 Metview 4 3 11  2013 1990-2013 04-July-2013
diff --git a/share/metview/app-defaults/NormalFonts b/share/metview/app-defaults/NormalFonts
new file mode 100644
index 0000000..0aa117d
--- /dev/null
+++ b/share/metview/app-defaults/NormalFonts
@@ -0,0 +1,7 @@
+Metview*Line*sizes:                 20, 210, 50, 210
+Metview*XmList.fontList:	7x13=normal,7x13bold=bold
+Metview*XmText.fontList:	7x13
+Metview*fontList:	-*-helvetica-medium-r-normal--12-*-*-*-*-*-*-*=normal,-*-helvetica-bold-r-normal--12-*-*-*-*-*-*-*=bold,-adobe-helvetica-medium-o-normal--12-*-*-*-*-*-*-*=italic,-adobe-helvetica-medium-o-normal--12-*-*-*-*-*-*-*=bolditalic,-*-*-*-*-*-*-7-*-*-*-*-*-*-*=tiny
+Metview*XmToggleButtonGadget.fontList: -*-helvetica-medium-o-normal--12-*-*-*-*-*-*-*
+Metview*Hyper*normalFont:     7x13
+Metview*Hyper*highlightFont:  7x13
diff --git a/share/metview/app-defaults/Templates/.Area Hovmoeller Data b/share/metview/app-defaults/Templates/.Area Hovmoeller Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Area Hovmoeller Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Average Data b/share/metview/app-defaults/Templates/.Average Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Average Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Average View b/share/metview/app-defaults/Templates/.Average View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Average View	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Cartesian View b/share/metview/app-defaults/Templates/.Cartesian View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Cartesian View	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Coastlines b/share/metview/app-defaults/Templates/.Coastlines
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Coastlines
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Contouring b/share/metview/app-defaults/Templates/.Contouring
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Contouring
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Cross Section Data b/share/metview/app-defaults/Templates/.Cross Section Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Cross Section Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Cross Section View b/share/metview/app-defaults/Templates/.Cross Section View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Cross Section View	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Datacoverage b/share/metview/app-defaults/Templates/.Datacoverage
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Datacoverage
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Display Window b/share/metview/app-defaults/Templates/.Display Window
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Display Window	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Expand Hovmoeller Data b/share/metview/app-defaults/Templates/.Expand Hovmoeller Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Expand Hovmoeller Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Flextra Run b/share/metview/app-defaults/Templates/.Flextra Run
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Flextra Run	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Flextra Visualiser b/share/metview/app-defaults/Templates/.Flextra Visualiser
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Flextra Visualiser	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Geographical View b/share/metview/app-defaults/Templates/.Geographical View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Geographical View	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Geopoints to GRIB b/share/metview/app-defaults/Templates/.Geopoints to GRIB
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Geopoints to GRIB	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Graph Plot b/share/metview/app-defaults/Templates/.Graph Plot
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Graph Plot	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Grib Vectors b/share/metview/app-defaults/Templates/.Grib Vectors
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Grib Vectors	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Height Hovmoeller Data b/share/metview/app-defaults/Templates/.Height Hovmoeller Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Height Hovmoeller Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Input Visualiser b/share/metview/app-defaults/Templates/.Input Visualiser
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Input Visualiser	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Line Hovmoeller Data b/share/metview/app-defaults/Templates/.Line Hovmoeller Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Line Hovmoeller Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.MV3 Contour b/share/metview/app-defaults/Templates/.MV3 Contour
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.MV3 Contour	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Map View b/share/metview/app-defaults/Templates/.Map View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Map View	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Mars Retrieval b/share/metview/app-defaults/Templates/.Mars Retrieval
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Mars Retrieval	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Meteogram b/share/metview/app-defaults/Templates/.Meteogram
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Meteogram
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.NetCDF Visualiser b/share/metview/app-defaults/Templates/.NetCDF Visualiser
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.NetCDF Visualiser	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Observation Filter b/share/metview/app-defaults/Templates/.Observation Filter
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Observation Filter	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Odb Geopoints b/share/metview/app-defaults/Templates/.Odb Geopoints
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Odb Geopoints	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Odb Geovectors b/share/metview/app-defaults/Templates/.Odb Geovectors
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Odb Geovectors	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Odb Visualiser b/share/metview/app-defaults/Templates/.Odb Visualiser
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Odb Visualiser	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Page b/share/metview/app-defaults/Templates/.Page
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Page
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Scm Run b/share/metview/app-defaults/Templates/.Scm Run
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Scm Run	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Scm Visualiser b/share/metview/app-defaults/Templates/.Scm Visualiser
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Scm Visualiser	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Table Reader b/share/metview/app-defaults/Templates/.Table Reader
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Table Reader	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Table Visualiser b/share/metview/app-defaults/Templates/.Table Visualiser
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Table Visualiser	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Vertical Profile Data b/share/metview/app-defaults/Templates/.Vertical Profile Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Vertical Profile Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.Vertical Profile View b/share/metview/app-defaults/Templates/.Vertical Profile View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.Vertical Profile View	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/.version.txt b/share/metview/app-defaults/Templates/.version.txt
new file mode 100644
index 0000000..eefe736
--- /dev/null
+++ b/share/metview/app-defaults/Templates/.version.txt
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = NOTE
+
diff --git a/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Data b/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Geo Axis b/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Geo Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Geo Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Time Axis b/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Time Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Area Hovmoeller Data/.Time Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Average Data/.Data b/share/metview/app-defaults/Templates/Average Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Average Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Average View/.Horizontal Axis b/share/metview/app-defaults/Templates/Average View/.Horizontal Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Average View/.Horizontal Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Average View/.Vertical Axis b/share/metview/app-defaults/Templates/Average View/.Vertical Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Average View/.Vertical Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Cartesian View/.Horizontal Axis b/share/metview/app-defaults/Templates/Cartesian View/.Horizontal Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Cartesian View/.Horizontal Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Cartesian View/.Tephigram Grid b/share/metview/app-defaults/Templates/Cartesian View/.Tephigram Grid
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Cartesian View/.Tephigram Grid	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Cartesian View/.Vertical Axis b/share/metview/app-defaults/Templates/Cartesian View/.Vertical Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Cartesian View/.Vertical Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Coastlines/.Land and Sea Shading b/share/metview/app-defaults/Templates/Coastlines/.Land and Sea Shading
new file mode 100755
index 0000000..e552a5c
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Coastlines/.Land and Sea Shading	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Coastlines,
+    X          = 11,
+    Y          = 11,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MCOAST,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Coastlines/Land and Sea Shading b/share/metview/app-defaults/Templates/Coastlines/Land and Sea Shading
new file mode 100755
index 0000000..b07152a
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Coastlines/Land and Sea Shading	
@@ -0,0 +1,6 @@
+MCOAST,
+    MAP_COASTLINE_LAND_SHADE = ON,
+    MAP_COASTLINE_LAND_SHADE_COLOUR = CREAM,
+    MAP_COASTLINE_SEA_SHADE = ON,
+    MAP_COASTLINE_SEA_SHADE_COLOUR = 'RGB(0.9,0.95,1)'
+
diff --git a/share/metview/app-defaults/Templates/Contouring/.Black Contours b/share/metview/app-defaults/Templates/Contouring/.Black Contours
new file mode 100755
index 0000000..f4367cc
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Contouring/.Black Contours	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Contour,
+    X          = 125,
+    Y          = 8,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MCONT,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Contouring/.Grid Values b/share/metview/app-defaults/Templates/Contouring/.Grid Values
new file mode 100755
index 0000000..6a68f7e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Contouring/.Grid Values	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Contour,
+    X          = 234,
+    Y          = 7,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MCONT,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Contouring/.Shaded Contours b/share/metview/app-defaults/Templates/Contouring/.Shaded Contours
new file mode 100755
index 0000000..5114470
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Contouring/.Shaded Contours	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Contour,
+    X          = 14,
+    Y          = 5,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = MCONT,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Contouring/Black Contours b/share/metview/app-defaults/Templates/Contouring/Black Contours
new file mode 100755
index 0000000..873d362
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Contouring/Black Contours	
@@ -0,0 +1,4 @@
+MCONT,
+    CONTOUR_LINE_COLOUR = BLACK,
+    CONTOUR_HIGHLIGHT_COLOUR = BLACK
+
diff --git a/share/metview/app-defaults/Templates/Contouring/Grid Values b/share/metview/app-defaults/Templates/Contouring/Grid Values
new file mode 100755
index 0000000..c33f28a
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Contouring/Grid Values	
@@ -0,0 +1,6 @@
+MCONT,
+    CONTOUR_LINE_COLOUR = BLACK,
+    CONTOUR_HIGHLIGHT_COLOUR = BLACK,
+    CONTOUR_GRID_VALUE_PLOT = ON,
+    CONTOUR_GRID_VALUE_PLOT_TYPE = BOTH
+
diff --git a/share/metview/app-defaults/Templates/Contouring/Shaded Contours b/share/metview/app-defaults/Templates/Contouring/Shaded Contours
new file mode 100755
index 0000000..d07ed5f
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Contouring/Shaded Contours	
@@ -0,0 +1,5 @@
+MCONT,
+    LEGEND     = ON,
+    CONTOUR_SHADE = ON,
+    CONTOUR_SHADE_METHOD = AREA_FILL
+
diff --git a/share/metview/app-defaults/Templates/Cross Section Data/.Data b/share/metview/app-defaults/Templates/Cross Section Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Cross Section Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Cross Section View/.Horizontal Axis b/share/metview/app-defaults/Templates/Cross Section View/.Horizontal Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Cross Section View/.Horizontal Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Cross Section View/.Vertical Axis b/share/metview/app-defaults/Templates/Cross Section View/.Vertical Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Cross Section View/.Vertical Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Datacoverage/.Data b/share/metview/app-defaults/Templates/Datacoverage/.Data
new file mode 100644
index 0000000..1108ae5
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Datacoverage/.Data
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Datacoverage/.Symbol b/share/metview/app-defaults/Templates/Datacoverage/.Symbol
new file mode 100644
index 0000000..1108ae5
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Datacoverage/.Symbol
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Display Window/.Pages b/share/metview/app-defaults/Templates/Display Window/.Pages
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Display Window/.Pages	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Expand Hovmoeller Data/.Data b/share/metview/app-defaults/Templates/Expand Hovmoeller Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Expand Hovmoeller Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Expand Hovmoeller Data/.Netcdf Data b/share/metview/app-defaults/Templates/Expand Hovmoeller Data/.Netcdf Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Expand Hovmoeller Data/.Netcdf Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Flextra Run/.Flextra Input Data b/share/metview/app-defaults/Templates/Flextra Run/.Flextra Input Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Flextra Run/.Flextra Input Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Flextra Visualiser/.Flextra Data b/share/metview/app-defaults/Templates/Flextra Visualiser/.Flextra Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Flextra Visualiser/.Flextra Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Geographical View/.Coastlines b/share/metview/app-defaults/Templates/Geographical View/.Coastlines
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Geographical View/.Coastlines	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Geopoints to GRIB/.Geopoints b/share/metview/app-defaults/Templates/Geopoints to GRIB/.Geopoints
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Geopoints to GRIB/.Geopoints	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Graph Plot/.Legend Entry b/share/metview/app-defaults/Templates/Graph Plot/.Legend Entry
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Graph Plot/.Legend Entry	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Grib Vectors/.Colouring Field b/share/metview/app-defaults/Templates/Grib Vectors/.Colouring Field
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Grib Vectors/.Colouring Field	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Grib Vectors/.Direction b/share/metview/app-defaults/Templates/Grib Vectors/.Direction
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Grib Vectors/.Direction	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Grib Vectors/.Intensity b/share/metview/app-defaults/Templates/Grib Vectors/.Intensity
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Grib Vectors/.Intensity	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Grib Vectors/.U Component b/share/metview/app-defaults/Templates/Grib Vectors/.U Component
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Grib Vectors/.U Component	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Grib Vectors/.V Component b/share/metview/app-defaults/Templates/Grib Vectors/.V Component
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Grib Vectors/.V Component	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Data b/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Height Axis b/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Height Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Height Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Time Axis b/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Time Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Height Hovmoeller Data/.Time Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Input Visualiser/.Input Binning b/share/metview/app-defaults/Templates/Input Visualiser/.Input Binning
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Input Visualiser/.Input Binning	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Data b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Geo Axis b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Geo Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Geo Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Geo2 Axis b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Geo2 Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Geo2 Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Time Axis b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Time Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Line Hovmoeller Data/.Time Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/MV3 Contour/.Legend Entry b/share/metview/app-defaults/Templates/MV3 Contour/.Legend Entry
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/MV3 Contour/.Legend Entry	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Map View/.Coastlines b/share/metview/app-defaults/Templates/Map View/.Coastlines
new file mode 100644
index 0000000..1108ae5
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Map View/.Coastlines	
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Map View/.Overlay Control b/share/metview/app-defaults/Templates/Map View/.Overlay Control
new file mode 100644
index 0000000..1108ae5
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Map View/.Overlay Control	
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/.2m Temperature Analysis b/share/metview/app-defaults/Templates/Mars Retrieval/.2m Temperature Analysis
new file mode 100755
index 0000000..c0879a0
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/.2m Temperature Analysis	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Mars Retrieval,
+    X          = 13,
+    Y          = 10,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = RETRIEVE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/.ODB HIRS b/share/metview/app-defaults/Templates/Mars Retrieval/.ODB HIRS
new file mode 100755
index 0000000..1049474
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/.ODB HIRS	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Mars Retrieval,
+    X          = 44,
+    Y          = 70,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = RETRIEVE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/.Obs day-3 b/share/metview/app-defaults/Templates/Mars Retrieval/.Obs day-3
new file mode 100755
index 0000000..32b1812
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/.Obs day-3	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Mars Retrieval,
+    X          = 311,
+    Y          = 11,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = RETRIEVE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/.T850 EPS 5-day fc members b/share/metview/app-defaults/Templates/Mars Retrieval/.T850 EPS 5-day fc members
new file mode 100755
index 0000000..f576ebd
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/.T850 EPS 5-day fc members	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Mars Retrieval,
+    X          = 390,
+    Y          = 11,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = RETRIEVE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/.z500 10-day fc by 6h b/share/metview/app-defaults/Templates/Mars Retrieval/.z500 10-day fc by 6h
new file mode 100755
index 0000000..1e40fe9
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/.z500 10-day fc by 6h	
@@ -0,0 +1,9 @@
+USER_INTERFACE,
+    ICON_NAME  = Mars Retrieval,
+    X          = 170,
+    Y          = 11,
+    NB_OF_TIMERS = 0,
+    ICON_CLASS = RETRIEVE,
+    RENAMABLE  = TRUE,
+    TEMPORARY  = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/2m Temperature Analysis b/share/metview/app-defaults/Templates/Mars Retrieval/2m Temperature Analysis
new file mode 100755
index 0000000..b33fd06
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/2m Temperature Analysis	
@@ -0,0 +1,5 @@
+RETRIEVE,
+    LEVTYPE    = SFC,
+    PARAM      = 2T,
+    GRID       = 1.5/1.5
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/ODB HIRS b/share/metview/app-defaults/Templates/Mars Retrieval/ODB HIRS
new file mode 100755
index 0000000..f0cc7a2
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/ODB HIRS	
@@ -0,0 +1,11 @@
+RETRIEVE,
+    TYPE       = MFB,
+    REPRES     = BU,
+    OBSGROUP   = HIRS,
+    REPORTYPE  = 1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/23/24/16/17/18/19/20/21/22,
+    DATE       = -5,
+    TIME       = 00,
+    RESOL      = '',
+    FILTER     = 'select lat, lon, obsvalue, vertco_reference_1',
+    DATABASE   = marsod
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/Obs day-3 b/share/metview/app-defaults/Templates/Mars Retrieval/Obs day-3
new file mode 100755
index 0000000..8353ce8
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/Obs day-3	
@@ -0,0 +1,6 @@
+RETRIEVE,
+    TYPE       = OB,
+    REPRES     = BU,
+    DATE       = -3,
+    RESOL      = ''
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/T850 EPS 5-day fc members b/share/metview/app-defaults/Templates/Mars Retrieval/T850 EPS 5-day fc members
new file mode 100755
index 0000000..8247a6d
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/T850 EPS 5-day fc members	
@@ -0,0 +1,9 @@
+RETRIEVE,
+    TYPE       = PF,
+    STREAM     = EF,
+    LEVELIST   = 850,
+    PARAM      = T,
+    STEP       = 120,
+    NUMBER     = 1/TO/50,
+    GRID       = 1.5/1.5
+
diff --git a/share/metview/app-defaults/Templates/Mars Retrieval/z500 10-day fc by 6h b/share/metview/app-defaults/Templates/Mars Retrieval/z500 10-day fc by 6h
new file mode 100755
index 0000000..f1c1a0f
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Mars Retrieval/z500 10-day fc by 6h	
@@ -0,0 +1,7 @@
+RETRIEVE,
+    TYPE       = FC,
+    LEVELIST   = 500,
+    DATE       = -10,
+    STEP       = 00/TO/240/BY/6,
+    GRID       = 1.5/1.5
+
diff --git a/share/metview/app-defaults/Templates/Meteogram/.Station b/share/metview/app-defaults/Templates/Meteogram/.Station
new file mode 100644
index 0000000..1108ae5
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Meteogram/.Station
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Templates/NetCDF Visualiser/.Netcdf Data b/share/metview/app-defaults/Templates/NetCDF Visualiser/.Netcdf Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/NetCDF Visualiser/.Netcdf Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Observation Filter/.Data b/share/metview/app-defaults/Templates/Observation Filter/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Observation Filter/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Odb Geopoints/.Odb Data b/share/metview/app-defaults/Templates/Odb Geopoints/.Odb Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Odb Geopoints/.Odb Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Odb Geovectors/.Odb Data b/share/metview/app-defaults/Templates/Odb Geovectors/.Odb Data
new file mode 100644
index 0000000..1108ae5
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Odb Geovectors/.Odb Data	
@@ -0,0 +1,6 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER,
+    WIDTH      = 500,
+    HEIGHT     = 300,
+    SMALL_ICONS = FALSE
+
diff --git a/share/metview/app-defaults/Templates/Odb Visualiser/.Odb Binning b/share/metview/app-defaults/Templates/Odb Visualiser/.Odb Binning
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Odb Visualiser/.Odb Binning	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Odb Visualiser/.Odb Data b/share/metview/app-defaults/Templates/Odb Visualiser/.Odb Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Odb Visualiser/.Odb Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Page/.Sub Pages b/share/metview/app-defaults/Templates/Page/.Sub Pages
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Page/.Sub Pages	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Page/.View b/share/metview/app-defaults/Templates/Page/.View
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Page/.View
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Run/.Scm Input Data b/share/metview/app-defaults/Templates/Scm Run/.Scm Input Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Run/.Scm Input Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Run/.Scm Namelist b/share/metview/app-defaults/Templates/Scm Run/.Scm Namelist
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Run/.Scm Namelist	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Run/.Scm Vtable b/share/metview/app-defaults/Templates/Scm Run/.Scm Vtable
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Run/.Scm Vtable	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Visualiser/.Compare Data b/share/metview/app-defaults/Templates/Scm Visualiser/.Compare Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Visualiser/.Compare Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Visualiser/.Comparison Data b/share/metview/app-defaults/Templates/Scm Visualiser/.Comparison Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Visualiser/.Comparison Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Visualiser/.Data b/share/metview/app-defaults/Templates/Scm Visualiser/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Visualiser/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Visualiser/.Scm Comparison Data b/share/metview/app-defaults/Templates/Scm Visualiser/.Scm Comparison Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Visualiser/.Scm Comparison Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Scm Visualiser/.Scm Data b/share/metview/app-defaults/Templates/Scm Visualiser/.Scm Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Scm Visualiser/.Scm Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Table Reader/.Data b/share/metview/app-defaults/Templates/Table Reader/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Table Reader/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Table Visualiser/.Table Binning b/share/metview/app-defaults/Templates/Table Visualiser/.Table Binning
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Table Visualiser/.Table Binning	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Table Visualiser/.Table Data b/share/metview/app-defaults/Templates/Table Visualiser/.Table Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Table Visualiser/.Table Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Vertical Profile Data/.Data b/share/metview/app-defaults/Templates/Vertical Profile Data/.Data
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Vertical Profile Data/.Data	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Vertical Profile View/.Pressure Axis b/share/metview/app-defaults/Templates/Vertical Profile View/.Pressure Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Vertical Profile View/.Pressure Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/Vertical Profile View/.Value Axis b/share/metview/app-defaults/Templates/Vertical Profile View/.Value Axis
new file mode 100644
index 0000000..f50c25e
--- /dev/null
+++ b/share/metview/app-defaults/Templates/Vertical Profile View/.Value Axis	
@@ -0,0 +1,3 @@
+USER_INTERFACE,
+    ICON_CLASS = FOLDER
+
diff --git a/share/metview/app-defaults/Templates/version.txt b/share/metview/app-defaults/Templates/version.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/share/metview/app-defaults/Templates/version.txt
@@ -0,0 +1 @@
+0
diff --git a/share/metview/app-defaults/User_Dir_Frame.tar.gz b/share/metview/app-defaults/User_Dir_Frame.tar.gz
new file mode 100644
index 0000000..9a1a4f7
Binary files /dev/null and b/share/metview/app-defaults/User_Dir_Frame.tar.gz differ
diff --git a/share/metview/app-defaults/metview.qss b/share/metview/app-defaults/metview.qss
new file mode 100644
index 0000000..9aaa472
--- /dev/null
+++ b/share/metview/app-defaults/metview.qss
@@ -0,0 +1,119 @@
+QLineEdit:read-only {
+     background: #eeeeee;
+     color: #3a3a3a
+}
+
+QToolButton::checked#guiItemDefaultTb {
+     background: rgb(200, 241, 255);
+ }
+
+QLabel#fileInfoLabel {
+	background: rgb(246, 246, 246);   
+}
+
+QLabel#fileInfoLabel[mvStyle="odb"] {
+     	border-width: 1px;
+     	border-style: solid;
+	border-bottom-color: #BABABA;
+}
+
+QToolButton#zoomStackLevelTb {
+     	background: rgb(246, 246, 246);
+     	border-style: outset;
+	border-width: 1px;
+	border-color: rgb(120, 120, 120);;
+	border-radius: 0px;
+     	padding: 0px; 
+ }
+
+QToolButton#zoomStackLevelTb:hover {
+	background: rgb(220, 220, 220);	
+ }
+
+QToolButton#zoomStackLevelTb:checked {
+	border-width: 2px;
+	border-color: red;	
+ }
+
+QAbstractItemView[mvStyle="0"] {
+	alternate-background-color: #FFE6BF;
+    	background: #FFF2DE;
+	selection-background-color: rgb(194, 221, 255);
+}
+
+QAbstractItemView::item[mvStyle="0"]  {
+  	border: 1px solid #BBBBBB;
+  	border-top-color: transparent;
+	border-left-color: transparent; 
+    	border-right-color: transparent;
+ }
+
+QAbstractItemView::item:selected[mvStyle="0"] {
+   background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
+}
+
+
+QAbstractItemView[mvStyle="1"]  {
+	alternate-background-color: #C2DDFF;
+    	background:  #F0FFFF;
+	selection-background-color: r rgb(194, 221, 255);
+}
+
+QAbstractItemView::item[mvStyle="1"]
+ {
+  	border: 1px solid #BBBBBB;
+  	border-top-color: transparent;
+	border-left-color: transparent; 
+    	border-right-color: transparent;
+ }
+
+QAbstractItemView::item:selected[mvStyle="1"]
+{
+   background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
+}
+
+
+QListView { 
+	show-decoration-selected: 1; 
+}
+
+QTreeView::item[mvStyle="2"]
+{
+ 	background:  #F9F9F9;
+	border: 1px solid #FFFFFF;
+}
+QTreeView::branch:has-siblings:!adjoins-item[mvStyle="2"]
+{ 
+	border-image: none; 
+	image: none;
+}
+
+QTreeView::branch:!has-children[mvStyle="2"]
+{ 
+	border-image: none; 
+	image: none;
+}
+
+QTreeView::branch:has-children:!has-siblings:closed[mvStyle="2"],
+QTreeView::branch:closed:has-children:has-siblings[mvStyle="2"] {
+         border-image: none;
+         image: url(":uPlot/up.png");
+ }
+
+QTreeView::branch:open:has-children:!has-siblings[mvStyle="2"],
+QTreeView::branch:open:has-children:has-siblings[mvStyle="2"]  {
+         border-image: none;
+         image: url(":uPlot/down.png"); 
+ }
+
+QAbstractItemView::item:selected[mvStyle="3"]  {
+        border: 2px solid #0C79E0;
+        color: black;
+	background: transparent;
+}
+
+QTextBrowser[mvStyle="fileContents"]{ background: rgb(255, 255, 242) }
+
+QPlainTextEdit[mvStyle="fileContents"]{ background: rgb(255, 255, 242) }
+
+QTextEdit { font-size: 9pt }
\ No newline at end of file
diff --git a/share/metview/app-defaults/news/.Reading Metview Mail b/share/metview/app-defaults/news/.Reading Metview Mail
new file mode 100755
index 0000000..1ddb761
--- /dev/null
+++ b/share/metview/app-defaults/news/.Reading Metview Mail	
@@ -0,0 +1,7 @@
+USER_INTERFACE,
+    ICON_NAME  = Reading Metview Mail,
+    X          = 1,
+    Y          = 51,
+    ICON_CLASS = ARTICLE,
+    RENAMABLE  = TRUE
+
diff --git a/share/metview/app-defaults/news/.Readme b/share/metview/app-defaults/news/.Readme
new file mode 100755
index 0000000..b9eb128
--- /dev/null
+++ b/share/metview/app-defaults/news/.Readme
@@ -0,0 +1,7 @@
+USER_INTERFACE,
+    ICON_NAME  = Read me,
+    X          = 453,
+    Y          = 443,
+    ICON_CLASS = NOTE,
+    RENAMABLE  = TRUE
+
diff --git a/share/metview/app-defaults/news/.version b/share/metview/app-defaults/news/.version
new file mode 100755
index 0000000..5625e59
--- /dev/null
+++ b/share/metview/app-defaults/news/.version
@@ -0,0 +1 @@
+1.2
diff --git a/share/metview/app-defaults/news/About Metview news b/share/metview/app-defaults/news/About Metview news
new file mode 100755
index 0000000..05c7e7f
--- /dev/null
+++ b/share/metview/app-defaults/news/About Metview news	
@@ -0,0 +1,4 @@
+ARTICLE,
+    NOTE       = 'articles/About',
+    EXAMPLES   = 'examples/Useful examples/Simple plot'
+
diff --git a/share/metview/app-defaults/news/Reading Metview Mail b/share/metview/app-defaults/news/Reading Metview Mail
new file mode 100755
index 0000000..4437efb
--- /dev/null
+++ b/share/metview/app-defaults/news/Reading Metview Mail	
@@ -0,0 +1,3 @@
+ARTICLE,
+    NOTE       = 'articles/Reading Metview Mail'
+
diff --git a/share/metview/app-defaults/news/Readme b/share/metview/app-defaults/news/Readme
new file mode 100755
index 0000000..841bbc8
--- /dev/null
+++ b/share/metview/app-defaults/news/Readme
@@ -0,0 +1,19 @@
+if you want to write articles for the "What's new" module do the following:
+
+- first set your umask to 022
+- Create a folder linked to /home/graphics/cgx/news in metview 1.2
+- Name the folder "News"
+- open the News folder
+- Duplicate the "About Metview news" icon (type of icon is ARTICLE)
+- Edit the copy, rename it with a nice name
+- Write a note and add it in the article
+- You may attach an example (this can be a folder)
+- Make sure that the example can be read by everyone (especialy for folders)
+- It is better if the notes and the examples are in the News folder
+
+Et voila !
+
+
+
+
+
diff --git a/share/metview/app-defaults/news/add news item b/share/metview/app-defaults/news/add news item
new file mode 100755
index 0000000..694bfe3
--- /dev/null
+++ b/share/metview/app-defaults/news/add news item	
@@ -0,0 +1,204 @@
+# ------------------------------------------------------------------
+# Metview macro with a user interface to make the addition of
+# News examples easier.
+#
+# It assumes that there exist a Notes icon and an examples folder
+# for the news item.
+#
+# Execute the macro, edit the item's name, notes icon and
+# example folder, click apply and the news item should now
+# appear in the list of available articles.
+#
+# Tests can be performed by setting the environment variable
+# METVIEW_NEWS to another folder, restarting Metview and working
+# within that folder.
+#
+# Iain Russell
+# 27th July 2004
+# ------------------------------------------------------------------
+
+
+
+# -------------------------------------
+# Part 1 - retrieve the user's choices
+# -------------------------------------
+
+
+# define the user interface components
+
+a = any (
+			name	: "News Item Name",
+			default	: "New News Item"
+		)
+
+b = any (
+			name	: "Notes Icon",
+			default	: "articles/New News Item"
+		)
+
+c = any (
+			name	: "Examples Folder",
+			default	: "examples/New News Item"
+		)
+
+
+# retrieve the input values
+
+input = dialog([a, b, c])
+
+if input <> nil then
+	Item = 
+	(
+		strName     : input["News Item Name"],
+		strNotes    : ParseFilePath (input["Notes Icon"]),
+		strExamples : ParseFilePath (input["Examples Folder"])
+	)
+else
+	fail("macro failed to get input elements")
+end if
+
+print (Item.strName, "   ", Item.strNotes, "   ", Item.strExamples)
+
+
+
+# -------------------------------------
+# Part 2 - check that everything exists
+# -------------------------------------
+
+if (not (exist (Item.strNotes))) then
+    fail ("Could not find notes file "     & Item.strNotes)
+end if
+
+if (not (exist (Item.strExamples))) then
+    fail ("Could not find example folder " & Item.strExamples)
+end if
+
+
+
+# --------------------------------------
+# Part 3 - ensure everything is readable
+# --------------------------------------
+
+shell ("chmod a+rx " & Item.strNotes)
+shell ("chmod a+rx " & GetDotFile (Item.strNotes))
+
+shell ("chmod -R a+rx " & Item.strExamples)
+shell ("chmod -R a+rx " & GetDotFile (Item.strExamples))
+
+
+# --------------------------------
+# Part 4 - create the ARTICLE file
+# --------------------------------
+
+fArticle = file (Item.strName)
+write (fArticle, "ARTICLE,", newline)
+write (fArticle, "    NOTE       = '", Item.strNotes,    "',", newline)
+write (fArticle, "    EXAMPLES   = '", Item.strExamples, "'",  newline)
+write (fArticle, newline)
+fArticle = 0
+
+
+fDotArticle = file (GetDotFile (Item.strName))
+write (fDotArticle, "NOTE,", newline)
+write (fDotArticle, "    ICON_NAME  = ", Item.strName, ",", newline)
+write (fDotArticle, "    ICON_CLASS = ARTICLE,",            newline)
+write (fDotArticle, "    RENAMABLE  = TRUE,",               newline)
+write (fDotArticle, "    X          = 36,",                 newline)
+write (fDotArticle, "    Y          = 10",                  newline)
+write (fDotArticle, newline)
+fDotArticle = 0
+
+
+# -------------------
+# Auxillary functions
+# -------------------
+
+
+# ----------------------------------------------------------------------------
+# Function      : ParseFilePath
+#
+# Author (date) : Iain Russell (27/07/2004)
+#
+# Description   : The problem is this: if the user enters a path name with
+#                 directory separators, the user interface code interprets
+#                 it as a list, not a string. This function turns it back
+#                 into a string.
+#
+# ----------------------------------------------------------------------------
+
+function ParseFilePath (in_path)
+
+    # if it's already a string, then just return it unaltered
+
+    if (type(in_path) = "string") then
+        return in_path
+    
+    # otherwise, if it's a list, then combine elements with dir separator
+        
+    else if (type(in_path) = "list") then
+    
+        strPath = in_path [1]
+
+
+        for i = 2 to count(in_path) do
+	        strPath = strPath & '/' & in_path [i]	        
+        end for
+        
+        return strPath
+        
+    
+    # number? then convert to a string (not working, but unlikely to happen
+
+    else if (type(in_path) = "number") then
+        return "" & in_path
+    
+    
+    # something else? then we are not prepared for it...
+    
+    else
+        fail ("Input path must be a string")
+    end if
+
+
+end ParseFilePath
+
+
+
+
+# ----------------------------------------------------------------------------
+# Function      : GetDotFile
+#
+# Author (date) : Iain Russell (27/07/2004)
+#
+# Description   : Returns the name of the dot file associated with the given
+#                 file. Example "my_file" returns ".my_file".
+#                 "a/b/c/file" returns "a/b/c/.file".
+#
+# ----------------------------------------------------------------------------
+
+function GetDotFile (strOriginalPath)
+
+    # convert the path into a list of components
+
+    lDirs = parse (strOriginalPath, "/")
+    
+
+    # start with the filename, 'dotted'
+
+    strPath = "." & lDirs [count (lDirs)]
+
+
+    # now prepend the dirs to the filename
+
+    for i = count (lDirs) - 1 to 1 by -1 do
+	    strPath = lDirs [i] & '/' & strPath
+    end for
+
+
+    return strPath
+
+end GetDotFile
+
+
+
+
diff --git a/share/metview/app-defaults/news/articles/Reading Metview Mail b/share/metview/app-defaults/news/articles/Reading Metview Mail
new file mode 100644
index 0000000..f2162a6
--- /dev/null
+++ b/share/metview/app-defaults/news/articles/Reading Metview Mail	
@@ -0,0 +1,112 @@
+                        2005-05-12/vk, last revised 2005-06-30
+
+Reading Metview Mail (in Metview 3.7 or later)
+==============================================
+
+Abstract
+--------
+ If you cannot read incoming Metview Mails then you can either
+ copy mail messages to mail folder $HOME/MozMail/MvNewsMail or
+ $HOME/Mail/MvNewsMail, or $HOME/nsmail/MvNewsMail, or set
+ environment variable $MVNEWSMAIL or $MAIL, before starting
+ Metview.
+
+   Notes for ECMWF Users
+   ---------------------
+    On workstations running SuSE 9.1 (or later) Mail incoming
+    folder (IMAP folder) is not visible (not mounted) any more
+    to non-mail applications. As a consequence, Metview is not
+    able to access your incoming mail folder. For this reason
+    we have modified 'Metview Mail' access in Metview 3.7 by
+    adding folder $HOME/Mail/MvNewsMail to be searched.
+
+    NOTE: We have learned that for new Mozilla Mail users
+          'Local Folders' is under $HOME/MozMail/MvNewsMail.
+          Thus from now on (31 May 2005) Metview knows to
+          use this file if it exists!
+
+    NOTE2: We have learned that for old Netscape Mail users
+          'Local Folders' is under $HOME/nsmail/MvNewsMail.
+          Thus from now on (30 June 2005) 'metview_new' knows
+          to use this file if it exists!
+
+    If you have received 'Metview Mail' which you can see in
+    your mail reader, but the mail message is not visible in
+    'Metview News', then create a mail subfolder called
+    'MvNewsMail' under your mail 'Local Folders' and copy
+    your 'Metview Mail' message to that folder.
+
+    NOTE:
+      Even if your IMAP incoming folder is still visible, but
+      if it contains hundreds of mail messages, accessing
+      'Metview Mail' via 'MvNewsMail' folder is much much faster!
+
+Mail Search Mechanism
+---------------------
+ Metview 'Mail' tool provides a nice way to send Metview
+ icons to other Metview users. 'Metview Mail' can be read
+ and any attached Metview icons extracted with 'News' tool.
+
+ In most cases (when your Metview environment has been
+ properly configured) you should not have problems accessing
+ your received 'Metview Mail' with 'Metview News' tool.
+
+ This 'Metview News' article is intended for those cases
+ when you run into problems accessing your incoming 'Metview
+ Mail' or if you want to know a little bit more about how
+ Metview tries to locate your incoming mail from several
+ possible locations.
+
+ Metview uses environment variable MAIL to locate your
+ incoming 'Metview Mail'. Also variable MVNEWSMAIL is
+ checked.
+
+ Here is the full explanation:
+
+1)
+ First Metview checks if environment variable MVNEWSMAIL
+ has been set. If it has been set then Metview assumes
+ that $MVNEWSMAIL points to a mail folder that contains
+ your received 'Metview Mails'.
+
+2)
+ If $MVNEWSMAIL has not been set then Metview tries to find
+ mail folder called $HOME/Mail/MvNewsMail. If you have a mail
+ folder with such a name then Metview uses that folder. (This
+ is for those ECMWF users who before Mozilla used ZMail.)
+
+3)
+ If 1) and 2) fail then Metview tries to find mail folder
+ called $HOME/MozMail/MvNewsMail. If you have a mail folder
+ with such a name then Metview uses that folder. (This is
+ for new ECMWF users whose first mail client is Mozilla.)
+
+3)
+ If 1) to 3) fail then Metview tries to find mail folder
+ called $HOME/nsmail/MvNewsMail. If you have a mail folder
+ with such a name then Metview uses that folder. (This is
+ for those ECMWF users whose old mail client was Netscape.)
+
+5)
+ If all previous attempts have failed then Metview checks
+ if environment variable MAIL has been set. If it exists
+ then Metview assumes $MAIL points to your incoming 'Metview
+ Mail' folder.
+
+6)
+ If $MAIL has not been set then Metview looks for a mail folder
+ /var/spool/mail/$LOGNAME (at ECMWF; if you are running Metview
+ locally outside ECMWF the default may be different). If this
+ last attempt fails then Metview is not able to access your
+ received 'Metview Mails'.
+
+Note:
+----- 
+ 'Metview News' displays 'Metview Mail' only from the first
+ folder located. For instance, if you create mail folder
+ 'MvNewsMail' and you still have older 'Metview Mails' in
+ your incoming folder, Metview only shows 'Metview Mails'
+ from folder 'MvNewsMail'. In such a case, either copy older
+ 'Metview Mails' into 'MvNewsMail', or play with environment
+ variable MVNEWSMAIL.
+____________________________________________________________
\ No newline at end of file
diff --git a/share/metview/etc/AuxPrepBufrTable_B.txt b/share/metview/etc/AuxPrepBufrTable_B.txt
new file mode 100644
index 0000000..4f57a97
--- /dev/null
+++ b/share/metview/etc/AuxPrepBufrTable_B.txt
@@ -0,0 +1,21 @@
+ 000001 TABLE A:  ENTRY                                                  CCITTIA5                   0            0  24
+ 000002 TABLE A:  DATA CATEGORY DESCRIPTION, LINE 1                      CCITTIA5                   0            0 256
+ 000003 TABLE A:  DATA CATEGORY DESCRIPTION, LINE 2                      CCITTIA5                   0            0 256
+ 000004 BUFR/CREX MASTER TABLE                                           CCITTIA5                   0            0  16
+ 000005 BUFR/CREX EDITION NUMBER                                         CCITTIA5                   0            0  24
+ 000006 BUFR MASTER TABLE VERSION NUMBER                                 CCITTIA5                   0            0  16
+ 000007 CREX MASTER TABLE VERSION NUMBER                                 CCITTIA5                   0            0  16
+ 000008 BUFR LOCAL TABLE VERSION NUMBER                                  CCITTIA5                   0            0  16
+ 000010 F DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0   8
+ 000011 X DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0  16
+ 000012 Y DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0  24
+ 000013 ELEMENT NAME, LINE 1                                             CCITTIA5                   0            0 256
+ 000014 ELEMENT NAME, LINE 2                                             CCITTIA5                   0            0 256
+ 000015 UNITS NAME                                                       CCITTIA5                   0            0 192
+ 000016 UNITS SCALE SIGN                                                 CCITTIA5                   0            0   8
+ 000017 UNITS SCALE                                                      CCITTIA5                   0            0  24
+ 000018 UNITS REFERENCE SIGN                                             CCITTIA5                   0            0   8
+ 000019 UNITS REFERENCE VALUE                                            CCITTIA5                   0            0  80
+ 000020 ELEMENT DATA WIDTH                                               CCITTIA5                   0            0  24
+ 000030 DESCRIPTOR DEFINING SEQUENCE                                     CCITTIA5                   0            0  48
+ 031001 DELAYED DESCRIPTOR REPLICATION FACTOR                            NUMERIC                    0            0   8
diff --git a/share/metview/etc/AuxPrepBufrTable_D.txt b/share/metview/etc/AuxPrepBufrTable_D.txt
new file mode 100644
index 0000000..74445e3
--- /dev/null
+++ b/share/metview/etc/AuxPrepBufrTable_D.txt
@@ -0,0 +1,18 @@
+ 300002  2 000002
+           000003
+ 300003  3 000010
+           000011
+           000012
+ 300004  9 300003
+           000013
+           000014
+           000015
+           000016
+           000017
+           000018
+           000019
+           000020
+ 300010  4 300003
+           101000
+           031001
+           000030
diff --git a/share/metview/etc/AxisDef b/share/metview/etc/AxisDef
new file mode 100755
index 0000000..9b80d6e
--- /dev/null
+++ b/share/metview/etc/AxisDef
@@ -0,0 +1,492 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PAXIS   ; AXIS    ; MAGICS
+{
+        AXIS_TYPE
+        {
+                REGULAR       ; REGULAR      
+                LOGARITHMIC   ; LOGARITHMIC  
+				DATE          ; DATE
+                POSITION_LIST ; POSITION_LIST
+        } = REGULAR
+ 
+        AXIS_MIN_VALUE
+			[visible='off']
+        {
+                AUTO
+                @
+        } = AUTO
+ 
+        AXIS_MAX_VALUE
+			[visible='off']
+        {
+                AUTO
+                @
+        } = AUTO
+ 
+        AXIS_DATE_MIN_VALUE
+			[visible='off']
+        {
+                @
+        }
+ 
+        AXIS_DATE_MAX_VALUE
+			[visible='off']
+        {
+                @
+        }
+ 
+        AXIS_ORIENTATION
+        {
+                HORIZONTAL ; HORIZONTAL
+                VERTICAL   ; VERTICAL  
+        } = HORIZONTAL
+ 
+        AXIS_POSITION
+        {
+                TOP        ; TOP       
+                BOTTOM     ; BOTTOM    
+                LEFT       ; LEFT      
+                RIGHT      ; RIGHT     
+                POSITIONAL ; POSITIONAL
+        } = BOTTOM
+ 
+        AXIS_LINE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        AXIS_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 2
+ 
+        AXIS_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        AXIS_LINE_POSITION
+        {
+                @
+        } = 0.0
+
+        AXIS_TITLE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_TITLE_ORIENTATION
+        {
+                HORIZONTAL ; HORIZONTAL
+                VERTICAL   ; VERTICAL  
+                PARALLEL   ; PARALLEL  
+        } = PARALLEL
+ 
+        AXIS_TITLE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        AXIS_TITLE_HEIGHT
+        {
+                @
+        } = 0.4
+ 
+        AXIS_TITLE_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        AXIS_TITLE_TEXT
+        {
+                @
+        } = " "
+ 
+        AXIS_TIP_TITLE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        AXIS_TIP_TITLE_ORIENTATION
+        {
+                HORIZONTAL ; HORIZONTAL
+                VERTICAL   ; VERTICAL  
+                PARALLEL   ; PARALLEL  
+        } = HORIZONTAL
+ 
+        AXIS_TIP_TITLE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        AXIS_TIP_TITLE_HEIGHT
+        {
+                @
+        } = 0.4
+ 
+        AXIS_TIP_TITLE_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        AXIS_TIP_TITLE_TEXT
+        {
+                @
+        } = " "
+ 
+        AXIS_TICK
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_TICK_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        AXIS_TICK_SIZE
+        {
+                @
+        } = 0.175
+ 
+        AXIS_TICK_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 2
+ 
+        AXIS_TICK_POSITIONING
+        [ visible = false ]
+        {
+                REGULAR       ; REGULAR      
+                LOGARITHMIC   ; LOGARITHMIC  
+				HOURS         ; HOURS
+				DAYS          ; DAYS
+				MONTHS        ; MONTHS
+				YEARS         ; YEARS
+                POSITION_LIST ; POSITION_LIST
+        } = REGULAR
+ 
+        AXIS_TICK_INTERVAL
+        {
+                @
+        } = 1.0
+ 
+        AXIS_TICK_LABEL
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_TICK_LABEL_ORIENTATION
+        {
+                HORIZONTAL ; HORIZONTAL
+                VERTICAL   ; VERTICAL  
+                PARALLEL   ; PARALLEL  
+        } = HORIZONTAL
+ 
+        AXIS_TICK_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        AXIS_TICK_LABEL_HEIGHT
+        {
+                @
+        } = 0.3
+ 
+        AXIS_TICK_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        AXIS_TICK_LABEL_POSITION
+        {
+                ON_TICK    ; ON_TICK   
+                INTER_TICK ; INTER_TICK
+        } = ON_TICK
+ 
+        AXIS_TICK_LABEL_FIRST
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_TICK_LABEL_LAST
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_TICK_LABEL_TYPE
+        {
+                LABEL_LIST ; LABEL_LIST
+                NUMBER     ; NUMBER    
+                LATITUDE   ; LATITUDE  
+                LONGITUDE  ; LONGITUDE 
+        } = NUMBER
+ 
+		AXIS_TICK_LABEL_LIST
+		{
+				@
+				/
+		}
+
+        AXIS_TICK_LABEL_FORMAT
+        {
+                @
+        } = '(AUTOMATIC)'
+ 
+        AXIS_TICK_LABEL_FREQUENCY
+        {
+                *
+        } = 1
+ 
+		AXIS_TICK_POSITION_LIST
+		{
+				@
+				/
+		}
+ 
+		AXIS_TICK_LABEL_UNITS
+		{
+				USER			; User 
+				CM				; Cm
+		} = CM
+
+        AXIS_MINOR_TICK
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        AXIS_MINOR_TICK_COUNT
+        {
+                *
+        } = 0
+ 
+        AXIS_MINOR_TICK_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        AXIS_MINOR_TICK_SIZE
+        {
+                @
+        } = 0.1
+ 
+        AXIS_MINOR_TICK_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        AXIS_MINOR_TICK_MIN_GAP
+        {
+                @
+        } = 0.05
+ 
+        AXIS_BASE_DATE
+        [ visible = false ]
+        {
+                @
+        } = 0.0
+ 
+        AXIS_DATE_TYPE
+        {
+				YEARS         ; YEARS
+				MONTHS        ; MONTHS
+				DAYS          ; DAYS
+				HOURS         ; HOURS
+        } = DAYS
+ 
+        AXIS_HOURS_LABEL
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        AXIS_HOURS_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        AXIS_HOURS_LABEL_HEIGHT
+        {
+                @
+        } = 0.2
+
+        AXIS_HOURS_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = LOW
+
+        AXIS_DAYS_LABEL
+        {
+                DAY    ; DAY
+                NUMBER ; NUMBER
+                BOTH   ; BOTH
+                OFF    ; OFF
+        } = BOTH
+ 
+        AXIS_DAYS_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        AXIS_DAYS_LABEL_HEIGHT
+        {
+                @
+        } = 0.2
+
+        AXIS_DAYS_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+
+        AXIS_DAYS_LABEL_COMPOSITION
+        {
+                ONE    ; ONE
+                THREE  ; THREE
+                FULL   ; FULL
+        } = THREE
+
+        AXIS_MONTHS_LABEL
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_MONTHS_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        AXIS_MONTHS_LABEL_HEIGHT
+        {
+                @
+        } = 0.2
+
+        AXIS_MONTHS_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+
+        AXIS_MONTHS_LABEL_COMPOSITION
+        {
+                ONE    ; ONE
+                THREE  ; THREE
+                FULL   ; FULL
+        } = THREE
+
+        AXIS_YEARS_LABEL
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        AXIS_YEARS_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        AXIS_YEARS_LABEL_HEIGHT
+        {
+                @
+        } = 0.2
+
+        AXIS_YEARS_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+
+        AXIS_GRID
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        AXIS_GRID_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = YELLOW
+ 
+        AXIS_GRID_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        AXIS_GRID_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        AXIS_GRID_POSITIONING
+        [ visible = false ]
+        {
+                POSITIONAL ; POSITIONAL
+                AUTOMATIC  ; AUTOMATIC
+        } = AUTOMATIC
+ 
+        AXIS_DATE_GRID_POSITIONING
+        {
+                POSITIONAL ; POSITIONAL
+                AUTOMATIC  ; AUTOMATIC
+        } = AUTOMATIC
+ 
+		AXIS_GRID_POSITION_LIST
+        [ visible = false ]
+		{
+				@
+				/
+		}
+ 
+		AXIS_DATE_GRID_POSITION_LIST
+		{
+				@
+				/
+		}
+ 
+} ! end of PAXIS  
diff --git a/share/metview/etc/AxisRules b/share/metview/etc/AxisRules
new file mode 100755
index 0000000..c14257b
--- /dev/null
+++ b/share/metview/etc/AxisRules
@@ -0,0 +1,162 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+
+%if AXIS_LINE = OFF %then
+        %unset AXIS_LINE_COLOUR
+        %unset AXIS_LINE_THICKNESS
+        %unset AXIS_LINE_POSITION
+
+%if AXIS_TITLE = OFF %then
+        %unset AXIS_TITLE_ORIENTATION
+        %unset AXIS_TITLE_COLOUR
+        %unset AXIS_TITLE_HEIGHT
+        %unset AXIS_TITLE_QUALITY
+        %unset AXIS_TITLE_TEXT
+
+%if AXIS_TIP_TITLE = OFF %then
+        %unset AXIS_TIP_TITLE_ORIENTATION
+        %unset AXIS_TIP_TITLE_COLOUR
+        %unset AXIS_TIP_TITLE_HEIGHT
+        %unset AXIS_TIP_TITLE_QUALITY
+        %unset AXIS_TIP_TITLE_TEXT
+
+%if AXIS_TICK = OFF %then
+        %unset AXIS_TICK_COLOUR
+        %unset AXIS_TICK_SIZE
+        %unset AXIS_TICK_THICKNESS
+
+%if AXIS_TICK_LABEL = OFF %then
+        %unset AXIS_TICK_LABEL_TYPE
+        %unset AXIS_TICK_LABEL_ORIENTATION
+        %unset AXIS_TICK_LABEL_COLOUR
+        %unset AXIS_TICK_LABEL_HEIGHT
+        %unset AXIS_TICK_LABEL_QUALITY
+        %unset AXIS_TICK_LABEL_POSITION
+        %unset AXIS_TICK_LABEL_FIRST
+        %unset AXIS_TICK_LABEL_LAST
+
+%if AXIS_TICK_LABEL = OFF %or AXIS_TICK_LABEL_TYPE = LABEL_LIST %then
+        %unset AXIS_TICK_LABEL_FORMAT
+        %unset AXIS_TICK_LABEL_FREQUENCY
+
+%if AXIS_TICK_LABEL = OFF %then
+        %unset AXIS_TICK_LABEL_LIST
+
+%if AXIS_MINOR_TICK = OFF %then
+        %unset AXIS_MINOR_TICK_COUNT
+        %unset AXIS_MINOR_TICK_COLOUR
+        %unset AXIS_MINOR_TICK_SIZE
+        %unset AXIS_MINOR_TICK_THICKNESS
+        %unset AXIS_MINOR_TICK_MIN_GAP
+
+%if AXIS_TYPE = REGULAR %then
+        %unset AXIS_TICK_POSITION_LIST
+        %unset AXIS_TICK_LABEL_UNITS
+
+%if AXIS_TYPE = POSITION_LIST %then
+        %unset AXIS_TICK_INTERVAL
+        %unset AXIS_TICK_LABEL_TYPE
+        %unset AXIS_TICK_LABEL_FORMAT
+        %unset AXIS_TICK_LABEL_FREQUENCY
+        %unset AXIS_MINOR_TICK
+        %unset AXIS_MINOR_TICK_COUNT
+        %unset AXIS_MINOR_TICK_COLOUR
+        %unset AXIS_MINOR_TICK_SIZE
+        %unset AXIS_MINOR_TICK_THICKNESS
+        %unset AXIS_MINOR_TICK_MIN_GAP
+
+%if AXIS_TYPE = LOGARITHMIC %then
+        %unset AXIS_TICK_INTERVAL
+        %unset AXIS_TICK_POSITION_LIST
+        %unset AXIS_TICK_LABEL_UNITS
+        %unset AXIS_TICK_LABEL_FREQUENCY
+
+%if AXIS_TYPE = DATE %then
+        %unset AXIS_MIN_VALUE
+        %unset AXIS_MAX_VALUE
+        %unset AXIS_TICK_POSITION_LIST
+        %unset AXIS_TICK_LABEL_UNITS
+        %unset AXIS_TICK_LABEL_TYPE
+        %unset AXIS_TICK_LABEL_FORMAT
+
+%if AXIS_TYPE <> DATE %then
+        %unset AXIS_DATE_TYPE
+        %unset AXIS_DATE_MIN_VALUE
+        %unset AXIS_DATE_MAX_VALUE
+        %unset AXIS_HOURS_LABEL
+        %unset AXIS_DAYS_LABEL
+        %unset AXIS_MONTHS_LABEL
+        %unset AXIS_YEARS_LABEL
+
+%if AXIS_TYPE <> DATE %or AXIS_DATE_TYPE <> HOURS %then
+        %unset AXIS_HOURS_LABEL
+
+%if AXIS_TYPE <> DATE %or AXIS_DATE_TYPE <> HOURS %or AXIS_HOURS_LABEL = OFF %then
+        %unset AXIS_HOURS_LABEL_HEIGHT
+        %unset AXIS_HOURS_LABEL_QUALITY
+        %unset AXIS_HOURS_LABEL_COLOUR
+
+%if AXIS_TYPE <> DATE %or AXIS_DATE_TYPE = MONTHS %or AXIS_DATE_TYPE = YEARS %then
+        %unset AXIS_DAYS_LABEL
+
+%if AXIS_TYPE <> DATE %or AXIS_DATE_TYPE = MONTHS %or AXIS_DATE_TYPE = YEARS
+%or AXIS_DAYS_LABEL = OFF %then
+        %unset AXIS_DAYS_LABEL_COMPOSITION
+        %unset AXIS_DAYS_LABEL_HEIGHT
+        %unset AXIS_DAYS_LABEL_QUALITY
+        %unset AXIS_DAYS_LABEL_COLOUR
+
+%if AXIS_TYPE <> DATE %or AXIS_DATE_TYPE = YEARS %then
+        %unset AXIS_MONTHS_LABEL
+
+%if AXIS_TYPE <> DATE %or AXIS_DATE_TYPE = YEARS %or AXIS_MONTHS_LABEL = OFF %then
+        %unset AXIS_MONTHS_LABEL_COMPOSITION
+        %unset AXIS_MONTHS_LABEL_HEIGHT
+        %unset AXIS_MONTHS_LABEL_QUALITY
+        %unset AXIS_MONTHS_LABEL_COLOUR
+
+%if AXIS_TYPE <> DATE %or AXIS_YEARS_LABEL = OFF %then
+        %unset AXIS_YEARS_LABEL_HEIGHT
+        %unset AXIS_YEARS_LABEL_QUALITY
+        %unset AXIS_YEARS_LABEL_COLOUR
+
+%if AXIS_GRID = OFF %then
+        %unset AXIS_GRID_COLOUR
+        %unset AXIS_GRID_THICKNESS
+        %unset AXIS_GRID_LINE_STYLE
+
+%if AXIS_GRID = OFF %or AXIS_TYPE <> DATE %then
+        %unset AXIS_DATE_GRID_POSITIONING
+
+%if AXIS_GRID = OFF %or AXIS_TYPE <> DATE %or AXIS_DATE_GRID_POSITIONING = AUTOMATIC %then
+        %unset AXIS_DATE_GRID_POSITION_LIST
diff --git a/share/metview/etc/BinningObjectDef b/share/metview/etc/BinningObjectDef
new file mode 100644
index 0000000..72fef41
--- /dev/null
+++ b/share/metview/etc/BinningObjectDef
@@ -0,0 +1,76 @@
+MBINNING; Magics; Automatically generated
+{
+	BINNING_X_METHOD
+	{
+        COUNT
+        INTERVAL
+        LIST
+	} = COUNT
+    
+    BINNING_X_MIN_VALUE
+    {
+        *
+    } = -1.0e+21
+    
+    BINNING_X_MAX_VALUE
+    {
+        *
+    } = 1.0e+21
+    
+    BINNING_X_COUNT
+    {
+        *
+    } = 10 
+    
+    BINNING_X_LIST
+    {
+        *
+        /
+    } = ''
+    BINNING_X_INTERVAL
+    {
+        *
+    } = 10
+    
+    BINNING_X_REFERENCE
+	{
+        *
+    } = 0
+    
+    BINNING_Y_METHOD
+    {
+        COUNT
+        INTERVAL
+        LIST
+    } = COUNT
+    
+    BINNING_Y_MIN_VALUE
+    {
+        *
+    } = -1.0e+21
+    
+    BINNING_Y_MAX_VALUE
+    {
+        *
+    } = 1.0e+21
+    
+    BINNING_Y_COUNT
+    {
+        *
+    } = 10 
+    
+    BINNING_Y_LIST
+    {
+        *
+        /
+    } = ''
+    BINNING_Y_INTERVAL
+    {
+        *
+    } = 10
+
+	BINNING_Y_REFERENCE
+	{
+        *
+	} = 0
+}
diff --git a/share/metview/etc/BinningObjectRules b/share/metview/etc/BinningObjectRules
new file mode 100644
index 0000000..e522817
--- /dev/null
+++ b/share/metview/etc/BinningObjectRules
@@ -0,0 +1,29 @@
+%if BINNING_Y_METHOD = COUNT %then    
+    %unset BINNING_Y_LIST
+    %unset BINNING_Y_INTERVAL
+    %unset BINNING_Y_REFERENCE
+    
+%if BINNING_Y_METHOD = INTERVAL %then    
+    %unset BINNING_Y_LIST
+    %unset BINNING_Y_COUNT
+
+%if BINNING_Y_METHOD = LIST %then  
+    %unset BINNING_Y_COUNT  
+    %unset BINNING_Y_INTERVAL
+    %unset BINNING_Y_REFERENCE 
+    
+%if BINNING_X_METHOD = COUNT %then    
+    %unset BINNING_X_LIST
+    %unset BINNING_X_INTERVAL
+    %unset BINNING_X_REFERENCE
+    
+%if BINNING_X_METHOD = INTERVAL %then    
+    %unset BINNING_X_LIST
+    %unset BINNING_X_COUNT
+
+%if BINNING_X_METHOD = LIST %then  
+    %unset BINNING_X_COUNT  
+    %unset BINNING_X_INTERVAL
+    %unset BINNING_X_REFERENCE 
+    
+    
diff --git a/share/metview/etc/CartesianViewDef b/share/metview/etc/CartesianViewDef
new file mode 100644
index 0000000..159c519
--- /dev/null
+++ b/share/metview/etc/CartesianViewDef
@@ -0,0 +1,161 @@
+CARTESIANVIEW; CartesianTransformation; MagicsPlusPlus Object
+{
+     X_AUTOMATIC
+     [ help = help_script, help_script_command = 'echo "Only active when data is present. This option will be deactivated if there is no data at visualisation time."' ]
+     {
+          on
+          off
+     } = off
+
+	X_AXIS_TYPE {
+          regular
+          date
+          logarithmic
+          geoline
+	} = regular
+   
+     X_MIN {
+		*
+	} = 0
+    
+	X_MAX {
+		*
+	} = 100
+
+	X_MIN_LATITUDE
+	{
+		*
+	} = -90
+
+     X_MAX_LATITUDE
+	{
+		*
+     } = 90
+
+	X_MIN_LONGITUDE
+	{
+		*
+	} = -180
+
+     X_MAX_LONGITUDE
+	{
+		*
+     } = 180
+
+     X_DATE_MIN {
+		@
+	} = 2011-01-01
+
+	X_DATE_MAX {
+		@
+	} = 2011-01-31
+    
+     Y_AUTOMATIC
+     [ help = help_script, help_script_command = 'echo "Only active when data is present. This option will be deactivated if there is no data at visualisation time."' ]
+     {
+          on
+          off
+     } = off
+
+     Y_AXIS_TYPE {        
+          regular
+          date
+          logarithmic
+          geoline
+	} = regular
+
+     Y_MIN {
+		*
+	} = 0
+
+	Y_MAX {
+		*
+	} = 100
+
+	Y_MIN_LATITUDE
+	{
+		*
+	} = -90
+
+     Y_MAX_LATITUDE
+	{
+		*
+     } = 90
+
+	Y_MIN_LONGITUDE
+	{
+		*
+	} = -180
+
+     Y_MAX_LONGITUDE
+	{
+		*
+     } = 180
+
+     Y_DATE_MIN {
+          @
+     } = 2011-01-01
+
+     Y_DATE_MAX {
+          @
+     } = 2011-01-31
+
+     HORIZONTAL_AXIS [interface = icon,
+                      class = MAXIS, missing = ignored,
+                      help            = help_data,
+                      help_name       = Horizontal Axis,
+                      help_directory  = '/System/Defaults',
+                      help_class      = MAXIS,
+                      help_definition = ( MAXIS, AXIS_ORIENTATION ='HORIZONTAL' )
+                     ]
+     {
+          @
+     }
+
+     VERTICAL_AXIS [interface = icon, 
+                    class = MAXIS, missing = ignored,
+                    help            = help_data,
+                    help_name       = Vertical Axis,
+                    help_directory  = '/System/Defaults',
+                    help_class      = MAXIS,
+                    help_definition = ( MAXIS , AXIS_ORIENTATION ='VERTICAL', AXIS_POSITION='LEFT')
+                   ]
+     {
+          @
+     }
+    
+	MAP_PROJECTION 	[ visible = false ]
+	{
+		cartesian
+	} = cartesian
+
+	SUBPAGE_X_POSITION
+	{
+		@
+	} = 11
+
+	SUBPAGE_Y_POSITION
+	{
+		@
+	} = 7.5
+
+	SUBPAGE_X_LENGTH
+	{
+		@
+	} = 85
+
+	SUBPAGE_Y_LENGTH
+	{
+		@
+	} = 80
+
+	SUBPAGE_VERTICAL_AXIS_WIDTH
+	{
+		@
+	} =1
+	SUBPAGE_HORIZONTAL_AXIS_HEIGHT
+	{
+		@
+	} =1
+%include SubpageFrameDef
+}
diff --git a/share/metview/etc/CartesianViewRules b/share/metview/etc/CartesianViewRules
new file mode 100644
index 0000000..5997198
--- /dev/null
+++ b/share/metview/etc/CartesianViewRules
@@ -0,0 +1,43 @@
+%if X_AXIS_TYPE = regular %or X_AXIS_TYPE = logarithmic %then
+     %unset X_DATE_MIN
+     %unset X_DATE_MAX
+     %unset X_MIN_LATITUDE
+     %unset X_MAX_LATITUDE
+     %unset X_MIN_LONGITUDE
+     %unset X_MAX_LONGITUDE
+
+%if X_AXIS_TYPE = geoline %then
+     %unset X_MIN
+     %unset X_MAX
+     %unset X_DATE_MIN
+     %unset X_DATE_MAX
+
+%if X_AXIS_TYPE = date %then
+     %unset X_MIN
+     %unset X_MAX
+     %unset X_MIN_LATITUDE
+     %unset X_MAX_LATITUDE
+     %unset X_MIN_LONGITUDE
+     %unset X_MAX_LONGITUDE
+
+%if Y_AXIS_TYPE = regular %or Y_AXIS_TYPE = logarithmic %then
+     %unset Y_DATE_MIN
+     %unset Y_DATE_MAX
+     %unset Y_MIN_LATITUDE
+     %unset Y_MAX_LATITUDE
+     %unset Y_MIN_LONGITUDE
+     %unset Y_MAX_LONGITUDE
+
+%if Y_AXIS_TYPE = geoline %then
+     %unset Y_MIN
+     %unset Y_MAX
+     %unset Y_DATE_MIN
+     %unset Y_DATE_MAX
+
+%if Y_AXIS_TYPE = date %then
+     %unset Y_MIN
+     %unset Y_MAX
+     %unset Y_MIN_LATITUDE
+     %unset Y_MAX_LATITUDE
+     %unset Y_MIN_LONGITUDE
+     %unset Y_MAX_LONGITUDE
diff --git a/share/metview/etc/CleanFileDef b/share/metview/etc/CleanFileDef
new file mode 100644
index 0000000..4b78bcf
--- /dev/null
+++ b/share/metview/etc/CleanFileDef
@@ -0,0 +1,34 @@
+CLEANFILE; Metview; Specific Application
+{
+
+	PATH
+	[ help = help_file_box ]
+	{ 
+	    @	
+	} = ''
+
+	DATA
+	[
+	    interface  = icon,
+	    class      = BINARY/GRIB/BUFR,
+	    exclusive  = true
+	]
+	{
+	    @
+	}
+
+	SKIP_HIRLAM_CUSTOM_RECORD
+	{
+	    NO
+	    YES
+	} = NO
+
+
+#	-- for backwards compatibility:
+	MAX_RUBBISH_OCTETS
+	[ visible = false ]
+	{
+		*
+	} = 64
+
+}
diff --git a/share/metview/etc/CoastDef b/share/metview/etc/CoastDef
new file mode 100755
index 0000000..6929531
--- /dev/null
+++ b/share/metview/etc/CoastDef
@@ -0,0 +1,204 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PCOAST  ; MAP     ; MAGICS
+{
+
+# All subpage frame parameters should now be on the views in PlotMod.
+# Kept as hidden here for backwards compatibility, but values will
+# not be used.
+        SUBPAGE_FRAME 
+	[ visible = false ]
+        {
+            &PARAMSHARE&ONOFF
+        } = ON
+
+        SUBPAGE_FRAME_COLOUR
+	[ visible = false ]
+        {
+            &PARAMSHARE&COLOUR
+        } = Black
+
+        SUBPAGE_FRAME_LINE_STYLE
+	[ visible = false ]
+        {
+            &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        SUBPAGE_FRAME_THICKNESS
+	[ visible = false ]
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 2
+
+        MAP_COASTLINE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        MAP_COASTLINE_RESOLUTION
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        MAP_COASTLINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        MAP_COASTLINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        MAP_COASTLINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+
+        MAP_GRID
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        MAP_GRID_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        MAP_GRID_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        MAP_GRID_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        MAP_GRID_LATITUDE_REFERENCE
+        {
+                @
+        } = 0.0
+ 
+        MAP_GRID_LONGITUDE_REFERENCE
+        {
+                @
+        } = 0.0
+ 
+        MAP_GRID_LATITUDE_INCREMENT
+        {
+                @
+        } = 10.0
+ 
+        MAP_GRID_LONGITUDE_INCREMENT
+        {
+                @
+        } = 20.0
+ 
+        MAP_LABEL
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        MAP_LABEL_LATITUDE_FREQUENCY
+        {
+                *
+        } = 1
+ 
+        MAP_LABEL_LONGITUDE_FREQUENCY
+        {
+                *
+        } = 1
+ 
+        MAP_LABEL_HEIGHT
+        {
+                @
+        } = 0.2
+ 
+        MAP_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        MAP_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        MAP_COASTLINE_LAND_SHADE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        MAP_COASTLINE_LAND_SHADE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = GREEN
+
+        MAP_COASTLINE_SEA_SHADE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        MAP_COASTLINE_SEA_SHADE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+        MAP_COASTLINE_PATH
+        {
+                 @
+        } = OFF
+
+} ! end of PCOAST 
diff --git a/share/metview/etc/CoastRules b/share/metview/etc/CoastRules
new file mode 100755
index 0000000..6b237c4
--- /dev/null
+++ b/share/metview/etc/CoastRules
@@ -0,0 +1,72 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+%if MAP_COASTLINE = OFF %then
+        %unset MAP_COASTLINE_RESOLUTION
+        %unset MAP_COASTLINE_STYLE
+        %unset MAP_COASTLINE_COLOUR
+        %unset MAP_COASTLINE_THICKNESS
+        %unset MAP_COASTLINE_LAND_SHADE
+        %unset MAP_COASTLINE_SEA_SHADE
+        %unset MAP_COASTLINE_LAND_SHADE_COLOUR
+        %unset MAP_COASTLINE_SEA_SHADE_COLOUR
+
+%if MAP_COASTLINE_LAND_SHADE = OFF %then
+        %unset MAP_COASTLINE_LAND_SHADE_COLOUR
+
+%if MAP_COASTLINE_SEA_SHADE = OFF %then
+        %unset MAP_COASTLINE_SEA_SHADE_COLOUR
+
+%if MAP_GRID = OFF %then
+        %unset MAP_GRID_LINE_STYLE
+        %unset MAP_GRID_THICKNESS
+        %unset MAP_GRID_COLOUR
+        %unset MAP_GRID_LATITUDE_REFERENCE
+        %unset MAP_GRID_LONGITUDE_REFERENCE
+        %unset MAP_GRID_LATITUDE_INCREMENT
+        %unset MAP_GRID_LONGITUDE_INCREMENT
+ 
+%if MAP_LABEL = OFF %then
+        %unset MAP_LABEL_LATITUDE_FREQUENCY
+        %unset MAP_LABEL_LONGITUDE_FREQUENCY
+        %unset MAP_LABEL_HEIGHT
+        %unset MAP_LABEL_QUALITY
+        %unset MAP_LABEL_COLOUR
+
+%if MAP_GRID = OFF %and MAP_LABEL = OFF %then
+        %unset MAP_GRID_COLOUR
+        %unset MAP_LABEL_COLOUR
+
+%if SUBPAGE_FRAME = OFF %then
+        %unset SUBPAGE_FRAME_COLOUR
+        %unset SUBPAGE_FRAME_LINE_STYLE
+        %unset SUBPAGE_FRAME_THICKNESS
diff --git a/share/metview/etc/Coastlines b/share/metview/etc/Coastlines
new file mode 100644
index 0000000..670122f
--- /dev/null
+++ b/share/metview/etc/Coastlines
@@ -0,0 +1,7 @@
+PCOAST,
+	SUBPAGE_FRAME_COLOUR = TAN,
+    MAP_COASTLINE_COLOUR = OCHRE,
+    MAP_GRID_COLOUR 	 = TAN,
+	MAP_LABEL       	 = OFF
+ 
+
diff --git a/share/metview/etc/CommonMapViewDef.h b/share/metview/etc/CommonMapViewDef.h
new file mode 100644
index 0000000..0336c19
--- /dev/null
+++ b/share/metview/etc/CommonMapViewDef.h
@@ -0,0 +1,14 @@
+        COASTLINES
+        [
+              interface       = icon,
+              class           = MCOAST/PCOAST,
+              exclusive       = true,
+              help            = help_data,
+              help_directory  = '/System/Defaults',
+              help_name       = Coastlines,
+              help_class      = MCOAST,
+              help_definition = (MCOAST)
+         ]
+         {
+         @
+         }
diff --git a/share/metview/etc/CommonMapViewRules.h b/share/metview/etc/CommonMapViewRules.h
new file mode 100644
index 0000000..c29978b
--- /dev/null
+++ b/share/metview/etc/CommonMapViewRules.h
@@ -0,0 +1,10 @@
+%if MAP_PROJECTION <> POLAR_STEREOGRAPHIC %then
+    %unset MAP_HEMISPHERE
+    %unset MAP_VERTICAL_LONGITUDE
+
+%if MAP_PROJECTION <> SPACEVIEW %then
+    %unset MAP_SUB_SAT_LONGITUDE
+    %unset MAP_SUB_SAT_LATITUDE
+ 
+%if MAP_PROJECTION = SPACEVIEW %then
+    %unset AREA
diff --git a/share/metview/etc/ConfigDef b/share/metview/etc/ConfigDef
new file mode 100644
index 0000000..8826149
--- /dev/null
+++ b/share/metview/etc/ConfigDef
@@ -0,0 +1,409 @@
+dummy; Metview; dummy
+{
+	color {
+		brown
+		black
+		yellow
+		'#FFFFDADA0000'
+		'#1C1CB8B8A6A6'
+		'#2525FFFF0000'
+		'#2263ffff1E91'
+		red
+		green3
+		'#000073734B4B'
+		'#ffffffff0000'
+		blue
+		orange
+	}
+	boolean {
+		True
+		False
+	}
+}
+
+service; Metview; config
+{
+    name { @ }
+    cmd { @ }
+}
+
+state; Metview; State Translation Table
+{
+	class 			{ @ / }
+	output_class 	{ @ / }
+	mode 			{ @ / } = any
+	action 			{ @ / } = any
+	service 		{ @ }
+}
+
+resources; Metview; config
+{
+	definition 		{ @ }
+	rules 			{ @ }
+	metview 		{ @ }
+	wastebasket 	{ @ }
+	defaults 		{ @ }
+	configuration 	{ @ }
+	user_defaults 	{ @ }
+	system_defaults	{ @ }
+	preferences 	{ @ }
+	about 			{ @ }
+	macrolibrary 	{ @ }
+	all_printers 	{ @ }
+	timer 			{ @ }
+	template 		{ @ }
+	hidden 			{ @ }
+	template_path 	{ @ / }
+	interface_items { @ / }
+	interface_tools { @ / }
+	colour_file		{ @ }
+	help_file 		{ @ }
+	vismod_help_file 	{ @ }
+	printer_list_file 	{ @ }
+	icon			{ @ }
+	lock_icon		{ @ }
+	timer_icon		{ @ }
+	bugs_report		{ @ }
+	actions			{ @ / }
+	vismod_table		{ @ }
+}
+
+object; Metview; config
+{
+	class {
+		@
+	}
+
+	icon_box {
+		@
+	}
+
+	link_prority {
+		*
+	} = 0
+
+	can_be_created {
+		True
+		False
+	} = False
+
+	check {
+		True
+		False
+	} = True
+
+	default_object {
+		True
+		False
+	} = True
+
+	create_member {
+		True
+		False
+	} = False
+
+	show_lock {
+		True
+		False
+	} = True
+
+	definition_file {
+		@
+	}
+
+	rules_file {
+		@
+	}
+
+	doubleclick_method {
+		edit
+		visualise
+		examine
+		execute
+	} = edit
+
+	references {
+		@
+		/
+	}
+
+	want_definition {
+		@
+		/
+	}
+
+	default_name {
+		@
+	}
+
+	type {
+		File
+		Film
+		Basic
+		Folder
+		Data
+		Family
+		FamilyWindow
+		View
+		Visdef
+		Preference
+		Link
+		Window
+		Macro
+		Remote
+	}  = Basic
+
+	expand {
+		*
+	} = 79
+
+	vismod_print_service {
+		@
+	} = '(lpr  -P%s -#%d \"%s\")'
+
+	vismod_visualise_service {
+		@
+    } = '(ghostview \"%s\")'
+
+	preferences 	{ @ }
+
+	macro {
+		@
+	}
+
+	editor_type {
+		SimpleEditor
+		FamilyEditor
+		TextEditor
+		ViewEditor
+		ComputeEditor
+		MacroEditor
+		NoEditor
+		TwoLevelsEditor
+		IndirectEditor
+		FlowEditor
+		TmpLinkEditor
+	} = TextEditor
+
+
+	new_color {
+		&dummy&color
+	} = black
+
+	modified_color {
+		&dummy&color
+	} = black
+
+	wait_color {
+		&dummy&color
+	} = orange
+###	} = '#ffffffff0000'
+
+	error_color {
+		&dummy&color
+	} = red
+
+	warning_color {
+		&dummy&color
+	} = orange
+
+	ready_color {
+		&dummy&color
+	} = green3
+
+
+	pixmap {
+		@
+	}
+
+	mask {
+		@
+	}
+
+	open_pixmap{
+		@
+	}
+
+
+# VISMOD keywords
+	graphical_editor {
+		NoEditor
+		BasicEditor
+		MapEditor
+	} = NoEditor
+	default_request {
+		@
+	}
+	default_background {
+		@
+	}
+	default_of_data {
+		@
+		/
+	}
+	delete {
+		True
+		False
+	} = False
+
+	output_type {
+		@
+	} = paper
+
+}
+
+mode; Metview; config
+{
+	class {
+		@
+	}
+	pixmap {
+		@
+	}
+
+#indicates if plot window need to be cleaned when request is received
+	clean {
+		True
+		False
+	} = False
+
+	preferences_class {
+		@
+	} = VISUALISATION_PREFERENCES
+	preferences {
+		@
+	} = 'Visualisation Preferences'
+	x_resources {
+		@
+		/
+	}
+
+#Following parameters are mode dependent parameters used
+#by VisBasicWindow and derived classes
+#(So far used only by Tephigram application...)
+
+#indicates if window layout should be set (max number of columns)
+	set_layout {
+		True
+		False
+	} = False
+
+	columns {
+		*
+	} = 1
+
+#indicates if all the graphs in a page should have the
+#same height
+
+	subpage_height {
+		constant
+		variable
+	} = variable
+}
+
+interface_tool; describe to be added automatically in the Tools menu of the main User Interface; Metview
+{
+	name      { @ }
+	label     { @ }
+	service   { @ }
+	action    { @ }
+	title    { @ }
+	command    { @ }
+}
+
+interface_item; describe interface items to be added automatically in the main User Interface; Metview
+{
+	name      { @ }
+	full_name { @ }
+	class	  { @ }
+	renamable {
+		True
+		False
+	} = False
+	x		  { * } = 0
+	y		  { * } = 0
+	linked_to { @ }
+	copy_of   { @ }
+	image_of  { @ }
+}
+##############################################################################
+
+GENERAL_PREFERENCES; Configuration; Metview
+{
+
+	OPEN_EACH_FOLDER
+	[ visible = true ]
+	{
+		'In New Window'
+		'In Same Window'
+	} = 'In New Window'
+
+
+	DEFAULT_PRINTER
+	[
+		visible = false,
+        	interface   = icon,
+        	class       = DEVICE,
+        	exclusive   = true,
+        	help        = help_data,
+        	help_name   = Default Default Printer,
+        	help_class  = DEVICE
+	]
+	{
+        	@
+	} = '../Devices/Default Printer'
+
+	DATA_CACHE_RETENTION_PERIOD
+	{
+		0; INFINITE
+		*
+	} = INFINITE
+
+	USE_NETWORK_PROXY
+	[ visible = true ]
+	{
+		'Yes'     ; yes
+		'No'     ;  no
+	} = yes
+
+	PROXY_URL {
+		@
+	} = 'proxy.ecmwf.int'
+
+	PROXY_PORT {
+		@
+	} = '3333'
+
+	NO_PROXY_FOR {
+		@
+	} = '.ecmwf.int'
+
+	MONTH_LONG_NAMES {
+		@
+		/
+	} = January/February/March/April/May/June/July/August/September/
+		October/November/December
+
+	MONTH_SHORT_NAMES {
+		@
+		/
+	} = Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec
+
+	DAY_LONG_NAMES {
+		@
+		/
+	} = Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday
+
+	DAY_SHORT_NAMES {
+		@
+		/
+	} = Mon/Tue/Wed/Thu/Fri/Sat/Sun
+
+	STRING_DATE_FORMAT {
+		@
+	} = 'yyyy-mm-dd HH:MM:SS'
+
+	NUMBER_DATE_FORMAT {
+		@
+	} = 'yyyymmdd'
+}
diff --git a/share/metview/etc/ConfigRules b/share/metview/etc/ConfigRules
new file mode 100644
index 0000000..f0a2323
--- /dev/null
+++ b/share/metview/etc/ConfigRules
@@ -0,0 +1,3 @@
+%if USE_NETWORK_PROXY = no %then		
+	%unset PROXY_URL
+	%unset PROXY_PORT
diff --git a/share/metview/etc/ContDef b/share/metview/etc/ContDef
new file mode 100755
index 0000000..3c867fa
--- /dev/null
+++ b/share/metview/etc/ContDef
@@ -0,0 +1,758 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PCONT   ; CONTOUR ; MAGICS
+{
+	LEGEND {
+                 &PARAMSHARE&ONOFF
+	} = OFF
+ 
+	LEGEND_USER_TEXT {
+		@
+	} = ''
+
+	LEGEND_ENTRY
+    [
+        interface       = icon,
+        class           = LEGENDENTRY,
+        exclusive       = true,
+        help            = help_data,
+        help_directory  = '/Metview/Defaults',
+        help_name       = Legend Entry for Contouring,
+        help_class      = LEGENDENTRY
+    ]
+    {
+        @
+    }
+
+        CONTOUR_METHOD
+        {
+                CONICON ; CONICON
+                LINEAR  ; LINEAR 
+                C3      ; C3     
+        } = C3
+ 
+        CONTOUR_DATA_TRANSFORMATION
+        {
+                NORMAL     ; NORMAL    
+                ISOTACHS   ; ISOTACHS  
+        } = NORMAL
+
+		INPUT_FIELD_ORGANIZATION
+		[ visible = false ]
+		{
+			REGULAR
+			FITTED
+			GAUSSIAN
+		} = REGULAR
+ 
+        CONTOUR
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        CONTOUR_MIN_LEVEL
+        {
+                @
+        } = '-1.0E21'
+ 
+        CONTOUR_MAX_LEVEL
+        {
+                @
+        } = 1.0E21
+ 
+        CONTOUR_LEVEL_SELECTION_TYPE
+        {
+                COUNT      ; COUNT     
+                INTERVAL   ; INTERVAL  
+                LEVEL_LIST ; LEVEL_LIST
+        } = COUNT
+ 
+        CONTOUR_LEVEL_COUNT
+        {
+                *
+        } = 10
+ 
+        CONTOUR_LEVEL_LIST
+        {
+                /
+                @
+        }
+ 
+        CONTOUR_INTERVAL
+        {
+                @
+        } = 8.0
+ 
+        CONTOUR_MISSING_VALUES_PRESENT
+        {
+                &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        CONTOUR_REFERENCE_LEVEL
+        {
+                @
+        } = 0.0
+ 
+        CONTOUR_SHADE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+		CONTOUR_SHADE_TECHNIQUE {
+			POLYGON_SHADING
+			CELL_SHADING
+			MARKER
+			GRID_SHADING
+		} = POLYGON_SHADING
+
+		CONTOUR_SHADE_REDUCTION_METHOD {
+			PRE_CALCULATION
+			POST_CALCULATION
+			NONE
+		} = PRE_CALCULATION
+
+        CONTOUR_SHADE_MIN_LEVEL
+        {
+                @
+        } = '-1.0E21'
+ 
+        CONTOUR_SHADE_MAX_LEVEL
+        {
+                @
+        } = 1.0E21
+ 
+		CONTOUR_SHADE_COLOUR_METHOD
+		{
+			CALCULATE
+			LIST
+		} = CALCULATE
+
+        CONTOUR_SHADE_MIN_LEVEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+
+        CONTOUR_SHADE_MAX_LEVEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        CONTOUR_SHADE_COLOUR_DIRECTION
+        {
+            	ANTI_CLOCKWISE  ; ANTI_CLOCKWISE
+            	CLOCKWISE       ; CLOCKWISE
+        } = ANTI_CLOCKWISE
+
+	CONTOUR_SHADE_COLOUR_LIST [ help = help_colour,interface = colour ]
+	{
+            &PARAMSHARE&COLOUR
+	    /
+	} = BLUE
+
+	CONTOUR_SHADE_COLOUR_TABLE [ help = help_colour,interface = colour ]
+	{
+            &PARAMSHARE&COLOUR
+	    /
+	} = BLUE
+
+		CONTOUR_SHADE_HEIGHT_TABLE 
+		{
+			*
+			/
+		} 
+
+		CONTOUR_SHADE_MARKER_TABLE [ help = help_symbol,interface = symbol ]
+		{
+			0
+			1
+			2
+			3
+			4
+			5
+			6
+			7
+			8
+			9
+			10
+			11
+			12
+			13
+			14
+			15
+			16
+			17
+			18
+			19
+			20
+			/
+		}
+
+        CONTOUR_SHADE_METHOD
+        {
+                 &PARAMSHARE&SHADING
+        } = DOT
+ 
+        CONTOUR_SHADE_DOT_METHOD
+        {
+            	OLD
+            	NEW
+        } = OLD
+
+        CONTOUR_SHADE_DOT_SIZE
+        {
+                @
+        } = 0.02
+ 
+        CONTOUR_SHADE_ANGLE
+        {
+                @
+        } = 45.0
+ 
+        CONTOUR_SHADE_MIN_LEVEL_DENSITY
+        {
+                @
+        } = 0.0
+ 
+        CONTOUR_SHADE_MAX_LEVEL_DENSITY
+        {
+                @
+        } = 50.0
+
+        CONTOUR_SHADE_HATCH_THICKNESS
+        {
+                *
+        } = 1
+
+        CONTOUR_SHADE_HATCH_DENSITY
+        {
+                @
+        } = 18.0
+ 
+        CONTOUR_SHADE_HATCH_INDEX
+        {
+                *
+        } = 1
+ 
+        CONTOUR_SHADE_CELL_METHOD
+        {
+                INTERPOLATE
+				NEAREST 
+        } = INTERPOLATE 
+ 
+        CONTOUR_SHADE_CELL_RESOLUTION
+        {
+                @
+        } = 10.0
+ 
+        CONTOUR_SHADE_LABEL_BLANKING
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+		CONTOUR_LINE_PLOTTING
+		{
+				NOT_SPLIT
+				SPLIT
+		} = NOT_SPLIT
+
+        CONTOUR_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        CONTOUR_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        CONTOUR_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        CONTOUR_HIGHLIGHT
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        CONTOUR_HIGHLIGHT_FREQUENCY
+        {
+                *
+        } = 4
+ 
+        CONTOUR_HIGHLIGHT_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        CONTOUR_HIGHLIGHT_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 3
+ 
+        CONTOUR_HIGHLIGHT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        CONTOUR_SPLIT_LEVEL
+        {
+                 @
+        } = 0.0
+
+        CONTOUR_BELOW_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = DASH
+
+        CONTOUR_BELOW_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+
+        CONTOUR_BELOW_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+        CONTOUR_BELOW_HIGHLIGHT_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = DASH
+
+        CONTOUR_BELOW_HIGHLIGHT_THICKNES
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 3
+
+        CONTOUR_BELOW_HIGHLIGHT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+        CONTOUR_SPLIT_LINE_PLOT
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        CONTOUR_SPLIT_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        CONTOUR_SPLIT_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 3
+
+        CONTOUR_SPLIT_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        CONTOUR_ABOVE_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        CONTOUR_ABOVE_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+
+        CONTOUR_ABOVE_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+
+        CONTOUR_ABOVE_HIGHLIGHT_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        CONTOUR_ABOVE_HIGHLIGHT_THICKNES
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 3
+
+        CONTOUR_ABOVE_HIGHLIGHT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+
+        CONTOUR_LABEL
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        CONTOUR_LABEL_FREQUENCY
+        {
+                *
+        } = 2
+ 
+        CONTOUR_LABEL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = LOW
+ 
+        CONTOUR_LABEL_HEIGHT
+        {
+                @
+        } = 0.2
+ 
+        CONTOUR_LABEL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        CONTOUR_LABEL_TYPE
+        {
+                NUMBER   ; NUMBER
+                TEXT     ; TEXT
+                BOTH     ; BOTH
+        } = NUMBER
+ 
+        CONTOUR_LABEL_FORMAT
+        {
+                @
+        } = '(AUTOMATIC)'
+ 
+        CONTOUR_LABEL_TEXT
+        {
+                @
+        } = ''
+ 
+        CONTOUR_HILO
+        {
+                ON  ; ON 
+                OFF ; OFF
+                HI  ; HI 
+                LO  ; LO 
+        } = OFF
+ 
+        CONTOUR_HILO_MIN_VALUE
+        {
+                @
+        } = '-1.0E21'
+ 
+        CONTOUR_HILO_MAX_VALUE
+        {
+                @
+        } = 1.0E21
+ 
+        CONTOUR_HILO_SUPPRESS_RADIUS
+        {
+                @
+        } = 15.0
+ 
+        CONTOUR_HILO_REDUCTION_RADIUS
+        {
+                @
+        } = 0.0
+ 
+        CONTOUR_LO_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        CONTOUR_HI_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+		CONTOUR_LO_MIN_VALUE
+		{
+				@
+		} = '-1.0E21'
+
+		CONTOUR_LO_MAX_VALUE
+		{
+				@
+		} = 1.0E21
+
+		CONTOUR_HI_MIN_VALUE
+		{
+				@
+		} = '-1.0E21'
+
+		CONTOUR_HI_MAX_VALUE
+		{
+				@
+		} = 1.0E21
+ 
+        CONTOUR_HILO_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = LOW
+ 
+        CONTOUR_HILO_HEIGHT
+        {
+                @
+        } = 0.4
+ 
+        CONTOUR_HILO_TYPE
+        {
+                NUMBER ; NUMBER
+                TEXT   ; TEXT  
+                BOTH   ; BOTH  
+        } = TEXT
+ 
+        CONTOUR_HILO_FORMAT
+        {
+                @
+        } = '(AUTOMATIC)'
+ 
+        CONTOUR_LO_TEXT
+        {
+                @
+        } = L
+ 
+        CONTOUR_HI_TEXT
+        {
+                @
+        } = H
+ 
+        CONTOUR_HILO_MARKER
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        CONTOUR_HILO_MARKER_INDEX
+        {
+                 &PARAMSHARE&MARKER
+        } = 3
+ 
+        CONTOUR_HILO_MARKER_HEIGHT
+        {
+                @
+        } = 0.1
+ 
+        CONTOUR_HILO_POSITION_WRITE
+        {
+                ON  ; ON 
+                OFF ; OFF
+        } = OFF
+
+        CONTOUR_HILO_POSITION_FILE_NAME
+        {
+                @
+        } = 'hilo.geo'
+ 
+        CONTOUR_GRID_VALUE_PLOT
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        CONTOUR_GRID_VALUE_PLOT_TYPE
+        {
+                VALUE  ; VALUE
+                MARKER ; MARKER
+		BOTH   ; BOTH
+        } = VALUE
+ 
+        CONTOUR_GRID_VALUE_TYPE
+        {
+                 NORMAL		; NORMAL
+				 REDUCED	; REDUCED
+        } = NORMAL
+ 
+        CONTOUR_GRID_VALUE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        CONTOUR_GRID_VALUE_FORMAT
+        {
+                @
+        } = '(AUTOMATIC)'
+ 
+        CONTOUR_GRID_VALUE_HEIGHT
+        {
+                @
+        } = 0.25
+ 
+        CONTOUR_GRID_VALUE_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = LOW
+ 
+        CONTOUR_GRID_VALUE_MARKER_PLOT
+	[ visible = false ]
+        {
+                &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        CONTOUR_GRID_VALUE_MARKER_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+ 
+        CONTOUR_GRID_VALUE_MARKER_INDEX
+        {
+                &PARAMSHARE&MARKER
+        } = 3
+
+        CONTOUR_GRID_VALUE_MARKER_HEIGHT
+        {
+                @
+        } = 0.25
+ 
+        CONTOUR_GRID_VALUE_MARKER_QUAL
+        {
+                 &PARAMSHARE&QUALITY
+        } = LOW
+ 
+        CONTOUR_GRID_VALUE_MIN
+        {
+                 @
+        } = -1.0E21
+
+        CONTOUR_GRID_VALUE_MAX
+        {
+                 @
+        } = 1.0E21
+
+        CONTOUR_GRID_VALUE_LAT_FREQUENCY
+        {
+                *
+        } = 1
+ 
+        CONTOUR_GRID_VALUE_LON_FREQUENCY
+        {
+                *
+        } = 1
+
+        INPUT_FIELD_GRADIENT_CONTROL
+        {
+                LEAST     ; LEAST
+                FLAT_ONLY ; FLAT_ONLY  
+                OFF       ; OFF 
+        } = OFF
+
+        INPUT_FIELD_GRADIENT_LIMITATION
+        {
+                MINIMUM ; MINIMUM
+                MAXIMUM ; MAXIMUM  
+                BOTH    ; BOTH  
+                OFF     ; OFF 
+        } = OFF
+
+        INPUT_FIELD_SUPPRESS_ABOVE
+        {
+                 @
+        } = 1.0E21
+
+        INPUT_FIELD_SUPPRESS_BELOW
+        {
+                 @
+        } = -1.0E21
+ 
+        GRIB_SPECTRAL_RESOLUTION
+        {
+                 @
+        } = 1.5
+
+
+		GRIB_SCALING_OF_RETRIEVED_FIELDS
+		{
+                 &PARAMSHARE&ONOFF
+		} = ON
+
+		GRIB_SCALING_OF_DERIVED_FIELDS
+		{
+                 &PARAMSHARE&ONOFF
+		} = OFF
+
+# Note 1 : this parameter used to be set by VisMod, based on the
+# 2 parameters above
+
+        GRIB_SCALING
+				[ visible = false ]
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        GRIB_MISSING_VALUE_INDICATOR {
+                 @
+        } = -1.5E21
+
+        GRIB_TEXT {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        GRIB_TEXT_SPLIT {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        GRIB_TEXT_UNITS {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        GRIB_TEXT_EXPERIMENT {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        GRIB_TEXT_PLOT_TYPE {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+	GRIB_SUBAREA_EXTRACTION {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+	DYNAMIC_MEMORY_ALLOCATION_FACTOR {
+                 @
+        } = 100
+
+} ! end of PCONT  
diff --git a/share/metview/etc/ContRules b/share/metview/etc/ContRules
new file mode 100755
index 0000000..6da9004
--- /dev/null
+++ b/share/metview/etc/ContRules
@@ -0,0 +1,284 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+%if LEGEND = OFF %then 
+		%unset LEGEND_USER_TEXT
+		%unset LEGEND_ENTRY
+
+%if CONTOUR = OFF %then
+        %unset CONTOUR_HIGHLIGHT
+		%unset CONTOUR_LINE_PLOTTING
+#        %unset CONTOUR_LABEL
+
+%if CONTOUR = OFF %or CONTOUR_LINE_PLOTTING = SPLIT %then
+        %unset CONTOUR_LINE_STYLE
+        %unset CONTOUR_LINE_THICKNESS
+        %unset CONTOUR_LINE_COLOUR
+
+%if CONTOUR = OFF %or CONTOUR_LINE_PLOTTING = NOT_SPLIT %or CONTOUR_SPLIT_LINE_PLOT = OFF %then
+        %unset CONTOUR_SPLIT_LINE_STYLE
+        %unset CONTOUR_SPLIT_LINE_THICKNESS
+        %unset CONTOUR_SPLIT_LINE_COLOUR
+
+%if CONTOUR = OFF %or CONTOUR_LINE_PLOTTING = NOT_SPLIT %then
+        %unset CONTOUR_SPLIT_LEVEL
+        %unset CONTOUR_BELOW_LINE_STYLE
+        %unset CONTOUR_BELOW_LINE_THICKNESS
+        %unset CONTOUR_BELOW_LINE_COLOUR
+        %unset CONTOUR_SPLIT_LINE_PLOT
+        %unset CONTOUR_ABOVE_LINE_STYLE
+        %unset CONTOUR_ABOVE_LINE_THICKNESS
+        %unset CONTOUR_ABOVE_LINE_COLOUR
+
+%if CONTOUR = OFF %or CONTOUR_HIGHLIGHT = OFF %then
+        %unset CONTOUR_HIGHLIGHT_FREQUENCY
+
+%if CONTOUR = OFF %or CONTOUR_HIGHLIGHT = OFF %or CONTOUR_LINE_PLOTTING = SPLIT %then
+        %unset CONTOUR_HIGHLIGHT_STYLE
+        %unset CONTOUR_HIGHLIGHT_THICKNESS
+        %unset CONTOUR_HIGHLIGHT_COLOUR
+ 
+%if CONTOUR = OFF %or CONTOUR_HIGHLIGHT = OFF %or CONTOUR_LINE_PLOTTING = NOT_SPLIT %then
+        %unset CONTOUR_BELOW_HIGHLIGHT_STYLE
+        %unset CONTOUR_BELOW_HIGHLIGHT_THICKNESS
+        %unset CONTOUR_BELOW_HIGHLIGHT_COLOUR
+        %unset CONTOUR_ABOVE_HIGHLIGHT_STYLE
+        %unset CONTOUR_ABOVE_HIGHLIGHT_THICKNESS
+        %unset CONTOUR_ABOVE_HIGHLIGHT_COLOUR
+
+# %if CONTOUR = OFF %or CONTOUR_LABEL = OFF %then
+%if CONTOUR_LABEL = OFF %then
+        %unset CONTOUR_LABEL_FREQUENCY
+        %unset CONTOUR_LABEL_QUALITY
+        %unset CONTOUR_LABEL_HEIGHT
+        %unset CONTOUR_LABEL_COLOUR
+        %unset CONTOUR_LABEL_TYPE
+ 
+# %if CONTOUR = ON %and CONTOUR_LABEL = ON %and CONTOUR_LABEL_TYPE = NUMBER %then
+%if CONTOUR_LABEL = ON %and CONTOUR_LABEL_TYPE = NUMBER %then
+        %unset CONTOUR_LABEL_TEXT
+ 
+# %if CONTOUR = ON %and CONTOUR_LABEL = ON %and CONTOUR_LABEL_TYPE = TEXT %then
+%if CONTOUR_LABEL = ON %and CONTOUR_LABEL_TYPE = TEXT %then
+        %unset CONTOUR_LABEL_FORMAT
+
+#%if CONTOUR = OFF %or CONTOUR_LABEL = OFF %then
+%if CONTOUR_LABEL = OFF %then
+        %unset CONTOUR_LABEL_TEXT
+        %unset CONTOUR_LABEL_FORMAT
+
+%if CONTOUR_LEVEL_SELECTION_TYPE = COUNT %then
+        %unset CONTOUR_LEVEL_LIST
+        %unset CONTOUR_INTERVAL
+ 
+%if CONTOUR_LEVEL_SELECTION_TYPE = LEVEL_LIST %then
+        %unset CONTOUR_LEVEL_COUNT
+        %unset CONTOUR_INTERVAL
+ 
+%if CONTOUR_LEVEL_SELECTION_TYPE = INTERVAL %then
+        %unset CONTOUR_LEVEL_COUNT
+        %unset CONTOUR_LEVEL_LIST
+ 
+%if CONTOUR_METHOD = LINEAR %then 
+#        %unset CONTOUR_SHADE
+		%unset INPUT_FIELD_GRADIENT_CONTROL
+		%unset INPUT_FIELD_GRADIENT_LIMITATION
+
+%if CONTOUR_SHADE = OFF %then
+		%unset CONTOUR_SHADE_TECHNIQUE
+        %unset CONTOUR_SHADE_METHOD
+        %unset CONTOUR_SHADE_MAX_LEVEL
+        %unset CONTOUR_SHADE_MIN_LEVEL
+        %unset CONTOUR_SHADE_COLOUR_DIRECTION
+        %unset CONTOUR_SHADE_LABEL_BLANKING
+        %unset CONTOUR_SHADE_COLOUR_METHOD
+		%unset CONTOUR_SHADE_CELL_METHOD
+		%unset CONTOUR_SHADE_CELL_RESOLUTION
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_TECHNIQUE <> MARKER %then
+        %unset CONTOUR_SHADE_COLOUR_TABLE
+        %unset CONTOUR_SHADE_HEIGHT_TABLE
+        %unset CONTOUR_SHADE_MARKER_TABLE
+
+%if CONTOUR_SHADE = ON %and CONTOUR_SHADE_TECHNIQUE = MARKER %then
+        %unset CONTOUR_SHADE_REDUCTION_METHOD
+        %unset CONTOUR_SHADE_COLOUR_METHOD
+        %unset CONTOUR_SHADE_MAX_LEVEL_COLOUR
+        %unset CONTOUR_SHADE_MIN_LEVEL_COLOUR
+        %unset CONTOUR_SHADE_COLOUR_LIST
+        %unset CONTOUR_SHADE_METHOD
+        %unset CONTOUR_SHADE_DOT_METHOD
+        %unset CONTOUR_SHADE_COLOUR_DIRECTION
+        %unset CONTOUR_SHADE_DOT_SIZE
+        %unset CONTOUR_SHADE_ANGLE
+        %unset CONTOUR_SHADE_MAX_LEVEL_DENSITY
+        %unset CONTOUR_SHADE_MIN_LEVEL_DENSITY
+        %unset CONTOUR_SHADE_HATCH_THICKNESS
+        %unset CONTOUR_SHADE_HATCH_DENSITY
+
+%if CONTOUR_SHADE = ON %and CONTOUR_SHADE_TECHNIQUE <> CELL_SHADING %then
+        %unset CONTOUR_SHADE_CELL_METHOD
+        %unset CONTOUR_SHADE_CELL_RESOLUTION
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_COLOUR_METHOD = CALCULATE %then
+        %unset CONTOUR_SHADE_COLOUR_LIST
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_COLOUR_METHOD = LIST %then
+        %unset CONTOUR_SHADE_MAX_LEVEL_COLOUR
+        %unset CONTOUR_SHADE_MIN_LEVEL_COLOUR
+        %unset CONTOUR_SHADE_COLOUR_DIRECTION
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_TECHNIQUE = CELL_SHADING %then
+		%unset CONTOUR_SHADE_REDUCTION_METHOD
+        %unset CONTOUR_SHADE_METHOD
+        %unset CONTOUR_SHADE_DOT_METHOD
+        %unset CONTOUR_SHADE_DOT_SIZE
+        %unset CONTOUR_SHADE_ANGLE
+        %unset CONTOUR_SHADE_MAX_LEVEL_DENSITY
+        %unset CONTOUR_SHADE_MIN_LEVEL_DENSITY
+        %unset CONTOUR_SHADE_HATCH_THICKNESS
+        %unset CONTOUR_SHADE_HATCH_DENSITY
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_METHOD <> DOT %then
+        %unset CONTOUR_SHADE_DOT_METHOD
+        %unset CONTOUR_SHADE_DOT_SIZE
+        %unset CONTOUR_SHADE_MAX_LEVEL_DENSITY
+        %unset CONTOUR_SHADE_MIN_LEVEL_DENSITY
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_METHOD <> DOT %or CONTOUR_SHADE_DOT_METHOD = NEW %then
+        %unset CONTOUR_SHADE_ANGLE
+
+%if CONTOUR_SHADE = OFF %or CONTOUR_SHADE_METHOD <> HATCH %then
+        %unset CONTOUR_SHADE_HATCH_THICKNESS
+        %unset CONTOUR_SHADE_HATCH_DENSITY
+
+%if CONTOUR_HILO = LO %then
+        %unset CONTOUR_HI_COLOUR
+        %unset CONTOUR_HI_MIN_LEVEL
+        %unset CONTOUR_HI_MAX_LEVEL
+        %unset CONTOUR_HI_TEXT
+ 
+%if CONTOUR_HILO = HI %then
+        %unset CONTOUR_LO_COLOUR
+        %unset CONTOUR_LO_MIN_LEVEL
+        %unset CONTOUR_LO_MAX_LEVEL
+        %unset CONTOUR_LO_TEXT
+ 
+%if CONTOUR_HILO = OFF %then
+        %unset CONTOUR_LO_COLOUR
+        %unset CONTOUR_HI_COLOUR
+        %unset CONTOUR_LO_MIN_LEVEL
+        %unset CONTOUR_LO_MAX_LEVEL
+        %unset CONTOUR_HI_MIN_LEVEL
+        %unset CONTOUR_HI_MAX_LEVEL
+        %unset CONTOUR_HILO_QUALITY
+        %unset CONTOUR_HILO_HEIGHT
+        %unset CONTOUR_HILO_TYPE
+        %unset CONTOUR_HILO_FORMAT
+        %unset CONTOUR_LO_TEXT
+        %unset CONTOUR_HI_TEXT
+        %unset CONTOUR_HILO_MARKER
+        %unset CONTOUR_HILO_MAX_VALUE
+        %unset CONTOUR_HILO_MIN_VALUE
+        %unset CONTOUR_HILO_SUPPRESS_RADIUS
+        %unset CONTOUR_HILO_REDUCTION_RADIUS
+        %unset CONTOUR_HILO_POSITION_WRITE
+        %unset CONTOUR_HILO_POSITION_FILE_NAME
+
+%if CONTOUR_HILO <> OFF %and CONTOUR_HILO_TYPE = NUMBER %then
+        %unset CONTOUR_LO_TEXT
+        %unset CONTOUR_HI_TEXT
+ 
+%if CONTOUR_HILO = HI %and CONTOUR_HILO_TYPE = TEXT %then
+        %unset CONTOUR_HILO_FORMAT
+        %unset CONTOUR_LO_TEXT
+ 
+%if CONTOUR_HILO = LO %and CONTOUR_HILO_TYPE = TEXT %then
+        %unset CONTOUR_HILO_FORMAT
+        %unset CONTOUR_HI_TEXT
+ 
+%if CONTOUR_HILO = ON %and CONTOUR_HILO_TYPE = TEXT %then
+        %unset CONTOUR_HILO_FORMAT
+ 
+%if CONTOUR_HILO = HI %and CONTOUR_HILO_TYPE = BOTH %then
+        %unset CONTOUR_LO_TEXT
+ 
+%if CONTOUR_HILO = LO %and CONTOUR_HILO_TYPE = BOTH %then
+        %unset CONTOUR_HI_TEXT
+ 
+%if CONTOUR_HILO = OFF %or CONTOUR_HILO_MARKER = OFF %then
+        %unset CONTOUR_HILO_MARKER_INDEX
+        %unset CONTOUR_HILO_MARKER_HEIGHT
+
+%if CONTOUR_HILO_POSITION_WRITE = OFF %then
+        %unset CONTOUR_HILO_POSITION_FILE_NAME
+
+# for old icons that may still use this obsolete param
+%if CONTOUR_GRID_VALUE_MARKER_PLOT = ON %then
+	%set CONTOUR_GRID_VALUE_MARKER_PLOT = OFF
+
+%if CONTOUR_GRID_VALUE_PLOT = OFF %then
+        %unset CONTOUR_GRID_VALUE_PLOT_TYPE
+        %unset CONTOUR_GRID_VALUE_TYPE
+        %unset CONTOUR_GRID_VALUE_COLOUR
+        %unset CONTOUR_GRID_VALUE_FORMAT
+        %unset CONTOUR_GRID_VALUE_HEIGHT
+        %unset CONTOUR_GRID_VALUE_QUALITY
+#        %unset CONTOUR_GRID_VALUE_MARKER_PLOT
+        %unset CONTOUR_GRID_VALUE_MARKER_INDEX
+        %unset CONTOUR_GRID_VALUE_MARKER_COLOUR
+        %unset CONTOUR_GRID_VALUE_MARKER_HEIGHT
+        %unset CONTOUR_GRID_VALUE_MARKER_QUAL
+        %unset CONTOUR_GRID_VALUE_MIN
+        %unset CONTOUR_GRID_VALUE_MAX
+        %unset CONTOUR_GRID_VALUE_LAT_FREQUENCY
+        %unset CONTOUR_GRID_VALUE_LON_FREQUENCY
+
+%if CONTOUR_GRID_VALUE_PLOT_TYPE = VALUE %then
+        %unset CONTOUR_GRID_VALUE_MARKER_INDEX
+        %unset CONTOUR_GRID_VALUE_MARKER_COLOUR
+        %unset CONTOUR_GRID_VALUE_MARKER_HEIGHT
+        %unset CONTOUR_GRID_VALUE_MARKER_QUAL
+ 
+%if CONTOUR_GRID_VALUE_PLOT_TYPE = MARKER %then
+        %unset CONTOUR_GRID_VALUE_TYPE
+        %unset CONTOUR_GRID_VALUE_COLOUR
+        %unset CONTOUR_GRID_VALUE_FORMAT
+        %unset CONTOUR_GRID_VALUE_HEIGHT
+        %unset CONTOUR_GRID_VALUE_QUALITY
+
+%if GRIB_TEXT = OFF %then
+	%unset GRIB_TEXT_UNITS
+    	%unset GRIB_TEXT_EXPERIMENT
+	%unset GRIB_TEXT_PLOT_TYPE
+    	%unset GRIB_TEXT_SPLIT
+
diff --git a/share/metview/etc/DatacoverageDef b/share/metview/etc/DatacoverageDef
new file mode 100644
index 0000000..f5ae54f
--- /dev/null
+++ b/share/metview/etc/DatacoverageDef
@@ -0,0 +1,84 @@
+DATACOVERAGE; dummy; dummy 
+{ 
+    DATA [ 
+            interface       = icon,
+            class           = BUFR,
+            exclusive       = true,
+
+            help            = help_data,
+            help_directory  = '/Metview/Defaults',
+            help_name       = Data for Observation filtering,
+            help_class      = RETRIEVE,
+            help_definition = ( RETRIEVE, TYPE = OB, DATE = '-2' )
+        ]
+        
+    { 
+        @   
+    }
+
+  CHECKING_DATE 
+  {
+	*
+	/
+  }
+  CHECKING_TIME
+  {
+	*
+	/	
+  }
+
+  SUBTYPE
+	[ visible = false ]
+	{	
+	*
+	} 
+
+  CUTOFF_TIME_IN_MINUTES [ interface = slider, min = 0, max = 1440, step = 10,
+	direction = max_on_right  ] 
+  {
+ 	*
+  } = 0
+  
+  PLOT_SUBSETS
+{
+ON
+OFF
+} = ON
+ 
+ DESCRIPTORS_TO_CHECK
+{
+ *
+ /
+}
+
+ SYMBOL [ 
+		interface		= icon,
+		class			= PSYMB,
+		exclusive		= true,
+
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Symbol plot for Data coverage,
+		help_class      = PSYMB,
+		help_definition = ( PSYMB, SYMBOL_TYPE = MARKER,
+		  SYMBOL_TABLE_MODE = ON,
+		  SYMBOL_MARKER_TABLE = 0/18/2/6/5/3/7/9/10/15/17/19/20/12/8,
+                  SYMBOL_DISTANCE_APART = 0.0, 
+		  SYMBOL_MIN_TABLE =1/2/3/4/5/6/7/8/9/10/11/12/13/14/15,
+		  SYMBOL_MAX_TABLE =2/3/4/5/6/7/8/9/10/11/12/13/14/15/16,
+		  SYMBOL_HEIGHT_TABLE = 0.18/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12/0.12,
+	          SYMBOL_COLOUR_TABLE=RED/BLUE/BLACK/MAGENTA/ORANGE/EVERGREEN/GREY/BRICK/BLUE_PURPLE/GOLD/GREENISH_BLUE/LAVENDER/MUSTARD/REDDISH_PURPLE/TANGERINE)
+		]
+		
+	{ 
+		@
+	}
+
+
+  LEGEND_COLUMN_COUNT
+  {
+      *
+  } = 7
+
+}
+
diff --git a/share/metview/etc/DatacoverageRules b/share/metview/etc/DatacoverageRules
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/etc/DeviceDriverDef b/share/metview/etc/DeviceDriverDef
new file mode 100644
index 0000000..f231d7a
--- /dev/null
+++ b/share/metview/etc/DeviceDriverDef
@@ -0,0 +1,196 @@
+DEVICE_DRIVER ; Driver Controls; Device Driver 
+{
+	FORMAT
+	{
+		POSTSCRIPT
+		JPEG
+		PNG
+		SCREEN
+	} = POSTSCRIPT
+
+	DESTINATION
+	{
+		PREVIEW
+		PRINTER
+		FILE
+	} = FILE
+
+	PREVIEW_PROGRAM
+	{
+		gv	  ; gv
+		xv	  ; xv
+		ghostview ; ghostview
+		display ; display
+	} = gv
+
+	PRINT_OPTION {
+		VISIBLE
+		ALL
+	} = VISIBLE
+
+#	PRINT_SELECTION [ visible = false ] {
+#		VISIBLE
+#		ALL
+#	} = ALL
+
+	NCOPIES {
+		*
+	} = 1
+
+	FILE_NAME {
+		@
+	}
+
+#	FILE_AUTO_NUMBERING [ interface = toggle ] {
+#		ON
+#		OFF
+#	} = ON
+
+
+# Magics DEVICE_WIDTH:
+
+	WIDTH_IN_PIXELS
+	{
+		*
+	} = 800
+
+
+
+# Magics DEVICE_QUALITY_LEVEL:
+
+	JPEG_QUALITY_LEVEL
+	{
+		*
+	} = -1
+
+
+#  PRINTER definition is customised into a separate file!
+#%include PlotModPrinterList
+#FAMI062010 Included here temporarily. The idea is to delete
+# DeviceDriverDef and DeviceDriverRules files. They are Metview 3
+# related and should be replaced when we provide a function to
+# convert Metview3 drivers to Metview4 drivers.
+	PRINTER	{
+		 ps_vax_c
+		 ps_oa_c
+		 ps_vax_a3_c
+		 ps_oa_a3_c
+		 ps_user_area
+		 ps_ua
+		 ps_workshop
+		 ps_vax_a3
+		 ps_oa_a3
+		 ps_vax_c_t
+		 ps_oa_c_t
+		 ps_vax
+		 ps_oa
+		 ps_oa_d
+		 ps_floor0
+		 ps_floor1
+		 ps_floor2
+		 ps_floor3
+		 ps_sys
+		 ps_sys_d
+		 ps_comp_ops
+		 ps_artwork
+		 gs
+		 ps_small
+		 ps_floor0_c
+		 ps_floor0_c_t
+		 ps_floor1_c
+		 ps_floor1_c_t
+		 ps_floor2_c
+		 ps_floor2_c_t
+		 ps_floor3_c
+		 ps_floor3_c_t
+		 ps_cabin
+		 ps_cabin_c
+		 ps_graphics
+		 ps_metops
+		 ps_ext0
+		 ps_ext1
+		 ps_a0
+		 ps_a1
+		 ps_a2
+		 ps_a3
+		 ps_a4
+	} =  ps_vax_c
+
+	PRINTER_CUSTOMIZE
+	{
+		YES
+		NO
+	} = NO
+
+	PRINTER_TYPE
+	[ label = 'Printer Colour Model' ]
+	{
+		Default
+		RGB
+		CMYK
+		MONOCHROME
+		GRAY
+	} = Default
+
+	PRINTER_RESOLUTION 
+	{
+		Default
+		72
+		300
+		400
+		600
+	} = Default
+
+	PRINTER_SCALE_FACTOR
+	{
+		@
+		Default
+	} = Default
+
+	PRINTER_PATH_SIZE
+	{
+		*
+		Default
+	} = Default
+
+	PRINTER_STACK_SIZE
+	{
+		*
+		Default
+	} = Default
+
+	PRINTER_MITER
+	{
+		Default
+		ON
+		OFF
+	} = Default
+
+	PRINT_COMMAND
+	[ help = help_script, help_script_command = print-command-help ]
+	{	
+		@
+	} = 'lpr -P%p -#%n %f'
+#
+# if your system uses 'lp' instead of 'lpr'
+# then replace the line above with the
+# following line (remove comment):
+#	} = 'lp -d%p -n%n %f'
+
+	ICON_IDENTIFICATION_FILE
+	{
+		YES
+		NO
+	} = YES
+
+#	PATH
+#	[ visible = false ]
+#	{
+#		@
+#	}
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/DeviceDriverRules b/share/metview/etc/DeviceDriverRules
new file mode 100644
index 0000000..95e14a6
--- /dev/null
+++ b/share/metview/etc/DeviceDriverRules
@@ -0,0 +1,97 @@
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+%if FORMAT = SCREEN %then
+	%unset DESTINATION
+	%unset PRINT_OPTION
+	%unset NCOPIES
+	%unset FILE_NAME
+	%unset PRINT_COMMAND
+	%unset PREVIEW_PROGRAM
+	%unset PRINTER_CUSTOMIZE
+	%unset PRINTER_TYPE
+	%unset PRINTER_SCALE_FACTOR
+	%unset PRINTER_PATH_SIZE
+	%unset PRINTER_STACK_SIZE
+	%unset PRINTER_RESOLUTION
+	%unset PRINTER_MITER
+
+%if FORMAT = PNG %or FORMAT = JPEG %then
+	%unset PRINT_COMMAND
+	%unset PRINTER_CUSTOMIZE
+	%unset PRINTER_TYPE
+	%unset PRINTER_SCALE_FACTOR
+	%unset PRINTER_PATH_SIZE
+	%unset PRINTER_STACK_SIZE
+	%unset PRINTER_RESOLUTION
+	%unset PRINTER_MITER
+
+%if FORMAT <> JPEG %and FORMAT <> PNG  %then
+	%unset WIDTH_IN_PIXELS
+
+%if FORMAT <> JPEG %then
+	%unset JPEG_QUALITY_LEVEL
+
+%if ( FORMAT = PNG %or FORMAT = JPEG ) %and DESTINATION = PRINTER %then
+	%set DESTINATION = PREVIEW
+
+# Removed the following rule because it was forcing the raster
+# preview program to be 'xv', even if the user selected 'display'.
+#%if ( FORMAT = PNG %or FORMAT = JPEG ) %and DESTINATION = PREVIEW %then
+#	%set PREVIEW_PROGRAM = xv
+
+#%if FORMAT = JPEG %and DESTINATION = PREVIEW %then
+#	%set PREVIEW_PROGRAM = xv
+
+%if DESTINATION = PREVIEW %then
+	%unset NCOPIES
+	%unset FILE_NAME
+
+%if DESTINATION <> FILE  %then
+	%unset FILE_NAME
+	%unset ICON_IDENTIFICATION_FILE
+
+%if DESTINATION <> PREVIEW %then
+	%unset PREVIEW_PROGRAM
+
+%if DESTINATION <> PRINTER %then
+	%unset PRINT_COMMAND
+
+%if PRINTER_CUSTOMIZE = NO %then
+	%unset PRINTER_TYPE
+	%unset PRINTER_SCALE_FACTOR
+	%unset PRINTER_PATH_SIZE
+	%unset PRINTER_STACK_SIZE
+	%unset PRINTER_RESOLUTION
+	%unset PRINTER_MITER
+
+!%if (PRINTER_SCALE_FACTOR <> Default %and (PRINTER_SCALE_FACTOR <= 0 %or PRINTER_SCALE_FACTOR > 1)) %then
+!	%warning "Scale factor outside range (0 to 1), forced to Default"
+!	%set PRINTER_SCALE_FACTOR = Default
+
+%if (PRINTER_PATH_SIZE <> Default %and (PRINTER_PATH_SIZE < 100 %or PRINTER_PATH_SIZE > 200)) %then
+	%warning "Path size outside range (100 to 200), forced to Default"
+	%set PRINTER_PATH_SIZE = Default
+
+%if (PRINTER_STACK_SIZE <> Default %and PRINTER_STACK_SIZE < 200) %then
+	%warning "Stack size should be greater than 200, forced to Default"
+	%set PRINTER_STACK_SIZE = Default
+
diff --git a/share/metview/etc/DivrotDef b/share/metview/etc/DivrotDef
new file mode 100755
index 0000000..d866672
--- /dev/null
+++ b/share/metview/etc/DivrotDef
@@ -0,0 +1,129 @@
+DIVROT_FAMILY; APPLICATION
+{
+	APPLICATION {
+		ROTWIND
+		DIVWIND
+		UVWIND
+	} = ROTWIND
+}
+
+ROTWIND; blabla; Computes rotational wind
+{
+	DATA
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Rotational Wind,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = VO, DATE=-1,
+				    LEVELIST=500) 
+	]
+
+	{ @ }
+
+	TRUNCATION
+	{
+	  *
+	  AV; AV
+	} = 213
+
+	SMOOTHING
+	{
+	  YES; Y
+	  NO; N
+	} = N
+
+	FLTC
+	{
+	  *
+	} = 19.4
+
+	MFLTEXP
+	{
+	  *
+	} = 2
+}
+
+DIVWIND; blabla; Computes divergent wind
+{
+	DATA
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Divergent Wind,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = D, DATE=-1,
+				    LEVELIST=500) 
+	]
+
+	{ @ }
+
+	TRUNCATION
+	{
+	  *
+	  AV; AV
+	} = 213
+
+	SMOOTHING
+	{
+	  YES; Y
+	  NO; N
+	} = N
+
+	FLTC
+	{
+	  *
+	} = 19.4
+
+	MFLTEXP
+	{
+	  *
+	} = 2
+}
+
+
+UVWIND; blabla; Computes uv wind
+{
+	DATA
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for UV Wind,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = VO/D, DATE=-1,
+				    LEVELIST=500) 
+	]
+
+	{ @ }
+
+	TRUNCATION
+	{
+	  *
+	  AV; AV
+	} = 213
+
+	SMOOTHING
+	{
+	  YES; Y
+	  NO; N
+	} = N
+
+	FLTC
+	{
+	  *
+	} = 19.4
+
+	MFLTEXP
+	{
+	  *
+	} = 2
+}
diff --git a/share/metview/etc/DivrotRules b/share/metview/etc/DivrotRules
new file mode 100644
index 0000000..ae0b0cf
--- /dev/null
+++ b/share/metview/etc/DivrotRules
@@ -0,0 +1 @@
+%if SMOOTHING = N %then %unset FLTC %unset MFLTEXP
diff --git a/share/metview/etc/DrawingPriorityDef b/share/metview/etc/DrawingPriorityDef
new file mode 100755
index 0000000..4b6dd32
--- /dev/null
+++ b/share/metview/etc/DrawingPriorityDef
@@ -0,0 +1,183 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	PRIORITY {
+             100        ; 100
+             200        ; 200
+             300        ; 300
+             400        ; 400
+             500        ; 500
+             600        ; 600
+             700        ; 700
+             800        ; 800
+             900        ; 900
+       }
+}
+ 
+
+DRAWING_PRIORITY ; Plot Mod Icon; Metview
+{
+# PCOAST
+	COASTLINE
+		[ label = 'Coastlines' ]
+	{
+			FIRST
+			LAST
+	} = LAST
+
+	COASTLINE_LAND_SHADE
+		[ label = 'Coastlines Land Shade: Off' ]
+	{
+			FIRST
+			LAST
+	} = FIRST
+
+	COASTLINE_SEA_SHADE
+		[ label = 'Coastlines Sea Shade: Off' ]
+	{
+			FIRST
+			LAST
+	} = FIRST
+
+# PAXIS
+	PAXIS
+		[ label = 'Axis' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 100
+
+#PCONT
+	PCONT_CONTOUR_SHADE_OFF
+		[ label = 'Contour Shade: Off' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PCONT_CONTOUR_SHADE_TECHNIQUE_CELL_SHADING
+		[ label = 'Contour Shade Tech.: Cell Shading' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 200
+
+	PCONT_CONTOUR_SHADE_TECHNIQUE_MARKER
+		[ label = 'Contour Shade Tech.: Marker' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PCONT_CONTOUR_SHADE_METHOD_DOT
+		[ label = 'Contour Shade Tech.: Dot' ]
+	{
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PCONT_CONTOUR_SHADE_METHOD_HATCH
+		[ label = 'Contour Shade Tech.: Hatch' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PCONT_CONTOUR_SHADE_METHOD_AREA_FILL
+		[ label = 'Contour Shade Tech.: Area Fill' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 300
+
+# PGRAPH
+	PGRAPH_GRAPH_TYPE_CURVE
+		[ label = 'Graph Type: Curve' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 800
+
+	PGRAPH_GRAPH_TYPE_BAR
+		[ label = 'Graph Type: Bar' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PGRAPH_GRAPH_TYPE_AREA
+		[ label = 'Graph Type: Area' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PGRAPH_GRAPH_SHADE_OFF
+		[ label = 'Graph Shade: Off' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PGRAPH_GRAPH_SHADE_STYLE_DOT
+		[ label = 'Graph Shade Style: Dot' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PGRAPH_GRAPH_SHADE_STYLE_HATCH
+		[ label = 'Graph Shade Style: Hatch' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 700
+
+	PGRAPH_GRAPH_SHADE_STYLE_AREA_FILL
+		[ label = 'Graph Shade Style: Area Fill' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 300
+
+# POBS
+	POBS
+		[ label = 'Observations' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 900
+
+# PSYMB
+	PSYMB
+		[ label = 'Symbol' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 900
+
+# PTEXT
+	PTEXT_TEXT_MODE_TITLE
+		[ label = 'Text Mode: Title' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 900
+
+	PTEXT_TEXT_MODE_POSITIONAL
+		[ label = 'Text Mode: Positional' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 900
+
+	ANNOTATION
+		[ label = 'Text Annotation' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 900
+
+# PWIND
+
+	PWIND_WIND_FIELD_TYPE_ARROWS
+		[ label = 'Wind Field Type: Arrows' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 800
+
+	PWIND_WIND_FIELD_TYPE_FLAGS
+		[ label = 'Wind Field Type: Flags' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 800
+
+	PWIND_WIND_FIELD_TYPE_STREAMLINES
+		[ label = 'Wind Field Type: Streamlines' ]
+	{ 
+		&PARAMSHARE&PRIORITY
+	} = 800
+
+}
+
+
diff --git a/share/metview/etc/DrawingPriorityRules b/share/metview/etc/DrawingPriorityRules
new file mode 100755
index 0000000..8b13789
--- /dev/null
+++ b/share/metview/etc/DrawingPriorityRules
@@ -0,0 +1 @@
+
diff --git a/share/metview/etc/EPSOutputDef b/share/metview/etc/EPSOutputDef
new file mode 100644
index 0000000..204ce46
--- /dev/null
+++ b/share/metview/etc/EPSOutputDef
@@ -0,0 +1,87 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+EPSOUTPUT; Magics; Automatically generated
+{
+	OUTPUT_TITLE
+	{
+		@
+	} = MAGICS++ PLOT
+	OUTPUT_WIDTH
+	{
+		*
+	} = 800
+	OUTPUT_RESOLUTION
+	{
+		*
+	} = 300
+	OUTPUT_NAME
+	{
+		@
+	} = ''
+	OUTPUT_NAME_FIRST_PAGE_NUMBER
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_FULLNAME
+	{
+		@
+	} = ''
+	OUTPUT_LEGACY_NAME
+	{
+		@
+	} = ''
+	OUTPUT_FILE_MINIMAL_WIDTH
+	{
+		*
+	} = 1
+	OUTPUT_FILE_SEPARATOR
+	{
+		@
+	} = '.'
+	OUTPUT_DEBUG
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST_NAME
+	{
+		@
+	} = MAGICS_OUTPUTS.LST
+
+	OUTPUT_PS_COLOUR_MODEL
+	{
+		@
+	} = CMYK
+	OUTPUT_PS_SCALE
+	{
+		*
+	} = 1.0
+	OUTPUT_PS_SPLIT
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/EcfsDef b/share/metview/etc/EcfsDef
new file mode 100644
index 0000000..0ec37d7
--- /dev/null
+++ b/share/metview/etc/EcfsDef
@@ -0,0 +1,12 @@
+ECFS 
+{
+	ECFS_DOMAIN
+	{
+		@
+	} = ec:
+
+	FILE_NAME 
+	{
+		@ 
+	}
+}
diff --git a/share/metview/etc/GenAppDef b/share/metview/etc/GenAppDef
new file mode 100644
index 0000000..5de4d69
--- /dev/null
+++ b/share/metview/etc/GenAppDef
@@ -0,0 +1,59 @@
+FOLDER; GenApp; Metview
+{
+	SYMBOLIC_LINK {
+		YES
+		NO
+	} = NO 
+
+	PATH 
+	[ help = help_file_box ] 
+	{
+		@
+	} = ''
+}
+
+#REMOTE; GenApp; Metview
+#{
+#	HOST {
+#		@
+#	} = localhost
+#
+#	PORT 
+#	{
+#		*
+#	} = 9999
+#
+#	SYMBOLIC_LINK [ visible = false ] {
+#		YES
+#		NO
+#	} = NO
+#
+#	REMOTE_FOLDER {
+#		@
+#	} = '.'
+#
+#	LAST_UPDATE {
+#		*
+#	} = 0
+#}
+#
+#LINK; GenApp; Metview
+#{
+#	CLASS {
+#		DATA_TO_VISDEF
+#		LINK
+#	} = LINK
+#}
+#
+#DATA; GenApp; Metview
+#{
+#	CLASS {
+#		@
+#	}
+#	NAME {
+#		@
+#	}
+#	DEFINITION {
+#		@
+#	}
+#}
diff --git a/share/metview/etc/GenAppRules b/share/metview/etc/GenAppRules
new file mode 100644
index 0000000..06d4dcb
--- /dev/null
+++ b/share/metview/etc/GenAppRules
@@ -0,0 +1,3 @@
+
+%if SYMBOLIC_LINK = NO %then
+	%unset PATH
diff --git a/share/metview/etc/GeoToGribDef b/share/metview/etc/GeoToGribDef
new file mode 100644
index 0000000..13f6543
--- /dev/null
+++ b/share/metview/etc/GeoToGribDef
@@ -0,0 +1,60 @@
+GEO_TO_GRIB; Transform Geopoints to regular grid; metview
+{
+
+	GEOPOINTS 
+	[ interface = icon, class = GEOPOINTS, exclusive = true,
+	  help            = help_data,
+	  help_name       = Geopoints for GRIB,
+	  help_directory  = '/Metview/Defaults',
+	  help_class      = OBSFILTER ,
+	  help_definition = (OBSFILTER,OUTPUT = GEOPOINTS)
+	]
+	{
+		@ 
+	}
+
+
+	AREA
+	[
+        	help = help_input,
+        	input_type = area,
+        	input_window = '/Metview/Defaults/Input Window'
+	]
+	{	
+        	*
+        	/
+	} = 90/-180/-90/180
+
+
+	GRID 
+	{ 
+		* 
+		/ 
+	} = 1.5/1.5
+
+
+	TOLERANCE 
+	{ 
+		* 
+		/ 
+	} = 3
+
+	INTERPOLATION_METHOD
+	{
+		RECIPROCAL
+		EXPONENTIAL_MEAN
+		EXPONENTIAL_SUM
+	} = RECIPROCAL
+
+	PARAMETER
+	{
+		*
+	} = 255
+
+	GRIB_TABLE2_VERSION
+	{
+		*
+	} = 1
+}
+
+
diff --git a/share/metview/etc/GeoViewDef b/share/metview/etc/GeoViewDef
new file mode 100644
index 0000000..6ec2be6
--- /dev/null
+++ b/share/metview/etc/GeoViewDef
@@ -0,0 +1,109 @@
+GEOVIEW; GEOVIEW; UPLOT
+{
+! Include Coastlines
+%include "CommonMapViewDef.h"
+
+	MAP_PROJECTION
+	{
+		CYLINDRICAL	; CYLINDRICAL
+		POLAR_STEREOGRAPHIC	 ; POLAR_STEREOGRAPHIC
+		POLAR_NORTH
+		LAMBERT		
+		GEOS
+		GOODE
+		COLLIGNON
+		MOLLWEIDE
+		BONNE
+        EPSG:32661
+		EPSG:4326
+	} = CYLINDRICAL
+    
+    MAP_AREA_DEFINITION 
+    {
+        CORNERS
+        CENTRE
+        FULL  
+    } = FULL
+    
+    AREA
+	[
+		help = help_input,
+		help_icon = 'help_map',
+		input_type = map,
+		input_window = '/Metview/System/Input Window'
+	]
+	{
+		*
+		/
+        } = -90./-180./90./180
+
+	MAP_HEMISPHERE
+	{
+			NORTH		; NORTH
+			SOUTH		; SOUTH
+	} = NORTH
+
+	
+	MAP_VERTICAL_LONGITUDE
+	{
+		*
+	} = 0
+
+	MAP_CENTRE_LATITUDE
+	{
+		@
+	} = 45.0
+
+	MAP_CENTRE_LONGITUDE
+	{
+		@
+	} = 0.0
+
+
+	MAP_SCALE
+	{
+		@
+	} = 130.0E4
+
+	
+
+    MAP_OVERLAY_CONTROL
+    {
+        ALWAYS
+        BY_DATE
+        BY_LEVEL
+        NEVER
+    }= ALWAYS_OVERLAY
+
+
+	SUBPAGE_X_POSITION
+	{
+		@
+	} = 7.5
+
+	SUBPAGE_Y_POSITION
+	{
+		@
+	} = 5
+
+	SUBPAGE_X_LENGTH
+	{
+		@
+	} = 85
+
+	SUBPAGE_Y_LENGTH
+	{
+		@
+	} = 85
+
+	SUBPAGE_METADATA_INFO {
+		ON
+		OFF
+	} = OFF
+
+	SUBPAGE_METADATA_JAVASCRIPT_PATH {
+		@ 
+	} = map.js
+
+%include SubpageFrameDef
+}
diff --git a/share/metview/etc/GeoViewRules b/share/metview/etc/GeoViewRules
new file mode 100644
index 0000000..99834aa
--- /dev/null
+++ b/share/metview/etc/GeoViewRules
@@ -0,0 +1,23 @@
+%if MAP_PROJECTION <> POLAR_STEREOGRAPHIC %then
+    %unset MAP_HEMISPHERE
+    %unset MAP_VERTICAL_LONGITUDE
+
+%if MAP_AREA_DEFINITION <> CENTRE %then
+    %unset MAP_CENTRE_LATITUDE
+    %unset MAP_CENTRE_LONGITUDE
+    %unset MAP_SCALE
+
+%if MAP_AREA_DEFINITION = FULL %then
+    %unset MAP_VERTICAL_LONGITUDE
+   
+%if MAP_AREA_DEFINITION <> CORNERS  %then
+    %unset AREA
+
+    
+%if SUBPAGE_METADATA_INFO = OFF %then
+    %unset SUBPAGE_METADATA_JAVASCRIPT_PATH
+    
+
+%include SubpageFrameRules
+
+
diff --git a/share/metview/etc/GraphDef b/share/metview/etc/GraphDef
new file mode 100755
index 0000000..833aa47
--- /dev/null
+++ b/share/metview/etc/GraphDef
@@ -0,0 +1,272 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PGRAPH  ; GRAPH   ; MAGICS
+{
+	LEGEND {
+                 &PARAMSHARE&ONOFF
+	} = OFF
+ 
+	LEGEND_USER_TEXT {
+		@
+	}
+
+   LEGEND_ENTRY
+    [
+        interface       = icon,
+        class           = LEGENDENTRY,
+        exclusive       = true,
+        help            = help_data,
+        help_directory  = '/Metview/Defaults',
+        help_name       = Legend Entry for Graph Plotting,
+        help_class      = LEGENDENTRY
+    ]
+    {
+        @
+    }
+
+        GRAPH_POSITION_MODE
+        {
+                AXIS       ; AXIS
+                GEOGRAPHIC ; GEOGRAPHIC
+                PAPER      ; PAPER
+        } = AXIS
+
+        GRAPH_TYPE
+        {
+                CURVE ; CURVE
+                BAR   ; BAR  
+                AREA  ; AREA 
+        } = CURVE
+ 
+#        GRAPH_AXIS_CONTROL
+#        {
+#                OFF			; OFF
+#				AUTOMATIC	; AUTOMATIC
+#		} = OFF
+
+        GRAPH_CURVE_METHOD
+        {
+                STRAIGHT ; STRAIGHT
+                ROUNDED  ; ROUNDED 
+        } = STRAIGHT
+ 
+        GRAPH_LINE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        GRAPH_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        GRAPH_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        GRAPH_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        GRAPH_BLANKING
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        GRAPH_BLANKING_GAP
+        {
+                @
+        } = 0.2
+ 
+        GRAPH_SYMBOL
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        GRAPH_SYMBOL_HEIGHT
+        {
+                @
+        } = 0.2
+ 
+        GRAPH_SYMBOL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+ 
+        GRAPH_SYMBOL_MARKER_INDEX
+        {
+                 *
+        } = 3
+ 
+        GRAPH_MISSING_DATA_MODE
+        {
+                IGNORE ; IGNORE
+                JOIN   ; JOIN  
+                DROP   ; DROP  
+        } = IGNORE
+ 
+        GRAPH_MISSING_DATA_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = DASH
+ 
+        GRAPH_MISSING_DATA_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+ 
+        GRAPH_MISSING_DATA_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        GRAPH_BAR_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        GRAPH_BAR_WIDTH
+        {
+                @
+        } = 0.
+
+        GRAPH_BAR_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        GRAPH_BAR_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        GRAPH_SHADE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        GRAPH_SHADE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        GRAPH_SHADE_STYLE
+			[ interface = option_menu ]
+        {
+                 &PARAMSHARE&SHADING
+        } = AREA_FILL
+ 
+        GRAPH_SHADE_DENSITY
+        {
+                @
+        } = 20.0
+ 
+        GRAPH_SHADE_DOT_SIZE
+        {
+                @
+        } = 0.02
+ 
+        GRAPH_SHADE_HATCH_INDEX
+        {
+                *
+        } = 0
+
+        GRAPH_SHADE_HATCH_THICKNESS
+        {
+                *
+        } = 1
+
+        GRAPH_SHADE_HATCH_DENSITY
+        {
+                @
+        } = 18.0
+ 
+        GRAPH_X_SUPPRESS_BELOW
+        {
+                @
+        } = '-2.1E07'
+ 
+        GRAPH_X_SUPPRESS_ABOVE
+        {
+                @
+        } = 2.1E07
+ 
+        GRAPH_DATE_X_SUPPRESS_BELOW
+        {
+                @
+        } = '1900-01-01'
+ 
+        GRAPH_DATE_X_SUPPRESS_ABOVE
+        {
+                @
+        } = '2099-12-31'
+ 
+        GRAPH_Y_SUPPRESS_BELOW
+        {
+                @
+        } = '-2.1E0'
+ 
+        GRAPH_Y_SUPPRESS_ABOVE
+        {
+                @
+        } = 2.1E07
+ 
+#       GRAPH_Y_MAX_VALUE
+#       {
+#               @
+#       } = 2.1E07
+ 
+} ! end of PGRAPH 
diff --git a/share/metview/etc/GraphRules b/share/metview/etc/GraphRules
new file mode 100755
index 0000000..fffee38
--- /dev/null
+++ b/share/metview/etc/GraphRules
@@ -0,0 +1,95 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+#
+# GRAPH_Y_MAX_VALUE is used for bars but might be removed in magics
+#
+
+%if LEGEND = OFF %then 
+    %unset LEGEND_USER_TEXT
+    %unset LEGEND_ENTRY
+
+%if GRAPH_TYPE = CURVE %then
+        %unset GRAPH_SHADE
+
+%if GRAPH_TYPE = CURVE %or GRAPH_SHADE = OFF %then
+        %unset GRAPH_SHADE_STYLE
+        %unset GRAPH_SHADE_COLOUR
+
+%if GRAPH_TYPE = CURVE %or GRAPH_SHADE = OFF %or GRAPH_SHADE_STYLE <> DOT %then
+        %unset GRAPH_SHADE_DENSITY
+        %unset GRAPH_SHADE_DOT_SIZE
+
+%if GRAPH_TYPE = CURVE %or GRAPH_SHADE = OFF %or GRAPH_SHADE_STYLE <> HATCH %then
+        %unset GRAPH_SHADE_HATCH_INDEX
+        %unset GRAPH_SHADE_HATCH_THICKNESS
+        %unset GRAPH_SHADE_HATCH_DENSITY
+
+%if GRAPH_TYPE = BAR %or GRAPH_SHADE = OFF %then
+        %unset GRAPH_CURVE_METHOD
+
+%if GRAPH_TYPE <> CURVE %then
+        %unset GRAPH_SYMBOL
+        %unset GRAPH_MISSING_DATA_MODE
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_MISSING_DATA_MODE = IGNORE %then
+        %unset GRAPH_MISSING_DATA_STYLE
+        %unset GRAPH_MISSING_DATA_COLOUR
+        %unset GRAPH_MISSING_DATA_THICKNESS
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_LINE = OFF %then
+        %unset GRAPH_BLANKING
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_LINE = OFF %or GRAPH_BLANKING = OFF %then
+        %unset GRAPH_BLANKING_GAP
+
+%if GRAPH_TYPE = AREA %then
+        %unset GRAPH_LINE
+
+%if GRAPH_TYPE = AREA %or GRAPH_LINE = OFF %then
+        %unset GRAPH_LINE_STYLE
+        %unset GRAPH_LINE_COLOUR
+        %unset GRAPH_LINE_THICKNESS
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_SYMBOL = OFF %then
+        %unset GRAPH_SYMBOL_MARKER_INDEX
+        %unset GRAPH_SYMBOL_COLOUR
+        %unset GRAPH_SYMBOL_HEIGHT
+ 
+%if GRAPH_TYPE <> BAR %then
+        %unset GRAPH_BAR_WIDTH
+        %unset GRAPH_BAR_COLOUR
+        %unset GRAPH_BAR_ANNOTATION_POSITION
+
+%if GRAPH_TYPE <> BAR %or GRAPH_LINE = OFF %then
+        %unset GRAPH_BAR_LINE_STYLE
+        %unset GRAPH_BAR_LINE_THICKNESS
diff --git a/share/metview/etc/GribToGeoDef b/share/metview/etc/GribToGeoDef
new file mode 100644
index 0000000..3b0c19e
--- /dev/null
+++ b/share/metview/etc/GribToGeoDef
@@ -0,0 +1,19 @@
+GRIB_TO_GEO; Decode GRIB field to GeoPoints; metview
+{
+
+	DATA
+	[
+	   interface = icon, class = GRIB, exclusive = true
+	]
+	{
+	   @ 
+	}
+
+
+	GEOPOINTS_FORMAT
+	{	
+        	TRADITIONAL
+        	X_Y_V
+	} = TRADITIONAL
+
+}
diff --git a/share/metview/etc/Input_Window b/share/metview/etc/Input_Window
new file mode 100644
index 0000000..81642a1
--- /dev/null
+++ b/share/metview/etc/Input_Window
@@ -0,0 +1 @@
+INPUTWINDOW
diff --git a/share/metview/etc/KMLOutputDef b/share/metview/etc/KMLOutputDef
new file mode 100644
index 0000000..ff24336
--- /dev/null
+++ b/share/metview/etc/KMLOutputDef
@@ -0,0 +1,120 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+KMLOUTPUT; Magics; Automatically generated
+{
+	OUTPUT_TITLE
+	{
+		@
+	} = MAGICS++ PLOT
+	OUTPUT_WIDTH
+	{
+		*
+	} = 800
+	OUTPUT_RESOLUTION
+	{
+		*
+	} = 300
+	OUTPUT_NAME
+	{
+		@
+	} = ''
+	OUTPUT_NAME_FIRST_PAGE_NUMBER
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_FULLNAME
+	{
+		@
+	} = ''
+	OUTPUT_LEGACY_NAME
+	{
+		@
+	} = ''
+	OUTPUT_FILE_MINIMAL_WIDTH
+	{
+		*
+	} = 1
+	OUTPUT_FILE_SEPARATOR
+	{
+		@
+	} = '.'
+	OUTPUT_DEBUG
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST_NAME
+	{
+		@
+	} = MAGICS_OUTPUTS.LST
+
+	KML_KMZ
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	KML_DESCRIPTION
+	{
+		@
+	} = GENERATED BY MAGICS++
+	KML_AUTHOR
+	{
+		@
+	} = ''
+	KML_LINK
+	{
+		@
+	} = ''
+	KML_HEIGHT
+	{
+		*
+	} = 5.0
+	KML_LATITUDE
+	{
+		*
+	} = 40.0
+	KML_LONGITUDE
+	{
+		*
+	} = 0.0
+	KML_TRANSPARENCY
+	{
+		*
+	} = 100
+	KML_TILT
+	{
+		*
+	} = 0
+	KML_RANGE
+	{
+		*
+	} = 6000
+	KML_COASTLINES
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/MARS_local b/share/metview/etc/MARS_local
new file mode 100755
index 0000000..c6f7253
--- /dev/null
+++ b/share/metview/etc/MARS_local
@@ -0,0 +1,18 @@
+#---------------------------------------------------------- MARS_local
+#
+# Definition of the local ECMWF MARS data bases
+#
+#
+
+MARS_CFG_FILE=`/usr/local/lib/metaps/mars_grib_api/bin/select_mars_config`
+export MARS_CFG_FILE
+
+if [ -f $MARS_CFG_FILE ]
+then
+  cat $MARS_CFG_FILE
+else
+  echo "+---------+  Local ECMWF MARS access configured but" 3>&2 2>&1 1>&3
+  echo "| CFG ERR |  local MARS configuration file not found!" 3>&2 2>&1 1>&3
+  echo "+---------+  Check configuration of MARS_local/MARS_remote/MARS_none?" 3>&2 2>&1 1>&3
+fi
+#---------------------------------------------------------------------
diff --git a/share/metview/etc/MARS_none b/share/metview/etc/MARS_none
new file mode 100644
index 0000000..13cbead
--- /dev/null
+++ b/share/metview/etc/MARS_none
@@ -0,0 +1,9 @@
+cat <<END_OF_HERE_DOCUMENT
+#---------------------------------------------------------- MARS_none
+#
+# No MARS access configured to be available!
+#
+#--------------------------------------------------------------------
+
+END_OF_HERE_DOCUMENT
+
diff --git a/share/metview/etc/MARS_remote b/share/metview/etc/MARS_remote
new file mode 100644
index 0000000..7c181ed
--- /dev/null
+++ b/share/metview/etc/MARS_remote
@@ -0,0 +1,26 @@
+#--------------------------------------------------------- MARS_remote
+#
+# Database definitions for the remote access to ECMWF MARS.
+# Use installed MARS Client Software configuration file
+#
+
+#---------------------------------------------------
+#-
+#- If the path given as the default is not valid then
+#- you have to edit correct path into $MARS_CFG_FILE
+#-
+
+MARS_CFG_FILE=$METVIEW_DIR_SHARE/etc/ms_mars.cfg
+export MARS_CFG_FILE
+
+#---------------------------------------------------
+
+if [ -f $MARS_CFG_FILE ]
+then
+  cat $MARS_CFG_FILE
+else
+  echo "+---------+  Remote ECMWF MARS access configured but" 3>&2 2>&1 1>&3
+  echo "| CFG ERR |  remote MARS configuration file not found!" 3>&2 2>&1 1>&3
+  echo "+---------+  Check configuration file ./etc/MARS_remote!" 3>&2 2>&1 1>&3
+fi
+#---------------------------------------------------------------------
diff --git a/share/metview/etc/MAXISDef b/share/metview/etc/MAXISDef
new file mode 100755
index 0000000..d62772a
--- /dev/null
+++ b/share/metview/etc/MAXISDef
@@ -0,0 +1,419 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+		}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+MAXIS; Magics; Automatically generated
+{
+	AXIS_ORIENTATION
+	{
+		HORIZONTAL; HORIZONTAL
+		VERTICAL; VERTICAL
+	} = HORIZONTAL
+
+	AXIS_POSITION
+	{
+		BOTTOM; BOTTOM
+		TOP; TOP
+		LEFT; LEFT
+		RIGHT; RIGHT
+		AUTOMATIC; AUTOMATIC
+	} = AUTOMATIC
+
+	AXIS_TYPE
+	{
+		REGULAR; REGULAR
+		POSITION_LIST; POSITION_LIST
+		LOGARITHMIC; LOGARITHMIC
+		DATE; DATE
+		GEOLINE; GEOLINE
+	} = REGULAR
+
+	AXIS_TICK_INTERVAL
+	{
+		*
+	} = 1.0E+21
+
+	AXIS_TICK_POSITION_LIST
+	{
+		*		
+		/
+	} 
+	AXIS_DATE_TYPE
+	{
+		AUTOMATIC; AUTOMATIC
+		YEARS; YEARS
+		MONTHS; MONTHS
+		DAYS; DAYS
+		HOURS; HOURS
+	} = DAYS
+
+	AXIS_YEARS_LABEL
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_YEARS_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_YEARS_LABEL_QUALITY
+	{
+		@
+	} = medium 
+
+	AXIS_YEARS_LABEL_HEIGHT
+	{
+		*
+	} = 0.2
+
+	AXIS_MONTHS_LABEL
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_MONTHS_LABEL_COMPOSITION
+	{
+		ONE; ONE
+		TWO; TWO
+		THREE; THREE
+	} = THREE
+
+	AXIS_MONTHS_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_MONTHS_LABEL_QUALITY
+	{
+		@
+	} = medium
+
+	AXIS_MONTHS_LABEL_HEIGHT
+	{
+		*
+	} = 0.2
+
+	AXIS_DAYS_LABEL
+	{
+		DAY; DAY
+		NUMBER; NUMBER
+		BOTH; BOTH
+		OFF; OFF
+	} = BOTH
+
+	AXIS_DAYS_LABEL_COMPOSITION
+	{
+		ONE; ONE
+		THREE; THREE
+		FULL; FULL
+	} = THREE
+
+	AXIS_DAYS_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_DAYS_SUNDAY_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = RED
+
+	AXIS_DAYS_LABEL_QUALITY
+	{
+		@
+	} = medium
+
+	AXIS_DAYS_LABEL_HEIGHT
+	{
+		*
+	} = 0.2
+
+	AXIS_HOURS_LABEL
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	AXIS_HOURS_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_HOURS_LABEL_QUALITY
+	{
+		@
+	} = medium
+
+	AXIS_HOURS_LABEL_HEIGHT
+	{
+		*
+	} = 0.2
+
+	AXIS_LINE
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_LINE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_LINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	AXIS_LINE_THICKNESS
+	{
+		*
+	} = 2
+
+	AXIS_GRID
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	AXIS_GRID_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = YELLOW
+
+	AXIS_GRID_LINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	AXIS_GRID_THICKNESS
+	{
+		*
+	} = 1
+
+	AXIS_GRID_REFERENCE_LEVEL
+	{
+		*
+	} = 1.0E+21
+
+	AXIS_GRID_REFERENCE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_GRID_REFERENCE_LINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	AXIS_GRID_REFERENCE_THICKNESS
+	{
+		*
+	} = 2
+
+	AXIS_TITLE
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_TITLE_TEXT
+	{
+		@
+	} 
+
+	AXIS_TITLE_ORIENTATION
+	{
+		@
+	} = parallel
+
+	AXIS_TITLE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_TITLE_HEIGHT
+	{
+		*
+	} = 0.4
+
+	AXIS_TITLE_QUALITY
+	{
+		@
+	} = sansserif
+
+	AXIS_TICK
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_TICK_POSITION
+	{
+		OUT; OUT
+		IN; IN
+	} = OUT
+
+	AXIS_TICK_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_TICK_SIZE
+	{
+		*
+	} = 0.175
+
+	AXIS_TICK_THICKNESS
+	{
+		*
+	} = 2
+
+	AXIS_TICK_LABEL
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_TICK_LABEL_TYPE
+	{
+		NUMBER; NUMBER
+		LABEL_LIST; LABEL_LIST
+		LATITUDE; LATITUDE
+		LONGITUDE; LONGITUDE
+	} = NUMBER
+
+	AXIS_TICK_LABEL_FORMAT
+	{
+		@
+	} = "(automatic)"
+
+	AXIS_TICK_LABEL_LIST
+	{
+		@		
+		/
+	}
+	AXIS_TICK_LABEL_FREQUENCY
+	{
+		*
+	} = 1
+
+	AXIS_TICK_LABEL_FIRST
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_TICK_LABEL_LAST
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	AXIS_TICK_LABEL_POSITION
+	{
+		ON_TICK; ON_TICK
+		INTER_TICK; INTER_TICK
+	} = ON_TICK
+
+	AXIS_TICK_LABEL_ORIENTATION
+	{
+		HORIZONTAL; HORIZONTAL
+		VERTICAL; VERTICAL
+		PARALLEL; PARALLEL
+	} = HORIZONTAL
+
+	AXIS_TICK_LABEL_FONT
+	{
+		@
+	} = sansserif
+
+	AXIS_TICK_LABEL_FONT_STYLE
+	{
+		@
+	} 
+
+	AXIS_TICK_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_TICK_LABEL_HEIGHT
+	{
+		*
+	} = 0.3
+
+	AXIS_MINOR_TICK
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	AXIS_MINOR_TICK_COUNT
+	{
+		*
+	} = 2
+
+	AXIS_MINOR_TICK_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_MINOR_TICK_THICKNESS
+	{
+		*
+	} = 1
+
+	AXIS_TIP_TITLE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	AXIS_TIP_TITLE_TEXT
+	{
+		@
+	} 
+
+	AXIS_TIP_TITLE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	AXIS_TIP_TITLE_HEIGHT
+	{
+		*
+	} = 0.4
+
+	AXIS_TIP_TITLE_QUALITY
+	{
+		HIGH; HIGH
+		MEDIUM; MEDIUM
+		LOW; LOW
+	} = MEDIUM
+
+}
diff --git a/share/metview/etc/MAXISRules b/share/metview/etc/MAXISRules
new file mode 100755
index 0000000..891c0ac
--- /dev/null
+++ b/share/metview/etc/MAXISRules
@@ -0,0 +1,87 @@
+%if AXIS_TYPE <> REGULAR %then
+	%unset AXIS_TICK_INTERVAL
+%if AXIS_TYPE <> POSITION_LIST %then
+	%unset AXIS_TICK_POSITION_LIST
+%if AXIS_TYPE <> DATE %then
+	%unset AXIS_DATE_TYPE
+	%unset AXIS_YEARS_LABEL
+	%unset AXIS_YEARS_LABEL_COLOUR
+	%unset AXIS_YEARS_LABEL_QUALITY
+	%unset AXIS_YEARS_LABEL_HEIGHT
+	%unset AXIS_MONTHS_LABEL
+	%unset AXIS_MONTHS_LABEL_COMPOSITION
+	%unset AXIS_MONTHS_LABEL_COLOUR
+	%unset AXIS_MONTHS_LABEL_QUALITY
+	%unset AXIS_MONTHS_LABEL_HEIGHT
+	%unset AXIS_DAYS_LABEL
+	%unset AXIS_DAYS_LABEL_COMPOSITION
+	%unset AXIS_DAYS_LABEL_COLOUR
+	%unset AXIS_DAYS_SUNDAY_LABEL_COLOUR
+	%unset AXIS_DAYS_LABEL_QUALITY
+	%unset AXIS_DAYS_LABEL_HEIGHT
+	%unset AXIS_HOURS_LABEL
+	%unset AXIS_HOURS_LABEL_COLOUR
+	%unset AXIS_HOURS_LABEL_QUALITY
+	%unset AXIS_HOURS_LABEL_HEIGHT
+%if AXIS_YEARS_LABEL <> ON %then
+	%unset AXIS_YEARS_LABEL_COLOUR
+	%unset AXIS_YEARS_LABEL_QUALITY
+	%unset AXIS_YEARS_LABEL_HEIGHT
+%if AXIS_MONTHS_LABEL <> ON %then
+	%unset AXIS_MONTHS_LABEL_COMPOSITION
+	%unset AXIS_MONTHS_LABEL_COLOUR
+	%unset AXIS_MONTHS_LABEL_QUALITY
+	%unset AXIS_MONTHS_LABEL_HEIGHT
+%if AXIS_HOURS_LABEL <> ON %then
+	%unset AXIS_HOURS_LABEL_COLOUR
+	%unset AXIS_HOURS_LABEL_QUALITY
+	%unset AXIS_HOURS_LABEL_HEIGHT
+%if AXIS_LINE <> ON %then
+	%unset AXIS_LINE_COLOUR
+	%unset AXIS_LINE_STYLE
+	%unset AXIS_LINE_THICKNESS
+%if AXIS_GRID <> ON %then
+	%unset AXIS_GRID_COLOUR
+	%unset AXIS_GRID_LINE_STYLE
+	%unset AXIS_GRID_THICKNESS
+	%unset AXIS_GRID_REFERENCE_LEVEL
+	%unset AXIS_GRID_REFERENCE_COLOUR
+	%unset AXIS_GRID_REFERENCE_LINE_STYLE
+	%unset AXIS_GRID_REFERENCE_THICKNESS
+%if AXIS_TITLE <> ON %then
+	%unset AXIS_TITLE_TEXT
+	%unset AXIS_TITLE_ORIENTATION
+	%unset AXIS_TITLE_COLOUR
+	%unset AXIS_TITLE_HEIGHT
+	%unset AXIS_TITLE_QUALITY
+%if AXIS_TICK <> ON %then
+	%unset AXIS_TICK_POSITION
+	%unset AXIS_TICK_COLOUR
+	%unset AXIS_TICK_SIZE
+	%unset AXIS_TICK_THICKNESS
+%if AXIS_TICK_LABEL <> ON %then
+	%unset AXIS_TICK_LABEL_TYPE
+	%unset AXIS_TICK_LABEL_FORMAT
+	%unset AXIS_TICK_LABEL_LIST
+	%unset AXIS_TICK_LABEL_FREQUENCY
+	%unset AXIS_TICK_LABEL_FIRST
+	%unset AXIS_TICK_LABEL_LAST
+	%unset AXIS_TICK_LABEL_POSITION
+	%unset AXIS_TICK_LABEL_ORIENTATION
+	%unset AXIS_TICK_LABEL_FONT
+	%unset AXIS_TICK_LABEL_FONT_STYLE
+	%unset AXIS_TICK_LABEL_COLOUR
+	%unset AXIS_TICK_LABEL_HEIGHT
+%if AXIS_TICK_LABEL_TYPE <> NUMBER %then
+	%unset AXIS_TICK_LABEL_FORMAT
+%if AXIS_TICK_LABEL_TYPE <> LABEL_LIST %then
+	%unset AXIS_TICK_LABEL_LIST
+%if AXIS_MINOR_TICK <> ON %then
+	%unset AXIS_MINOR_TICK_COUNT
+	%unset AXIS_MINOR_TICK_COLOUR
+	%unset AXIS_MINOR_TICK_THICKNESS
+%if AXIS_TIP_TITLE <> ON %then
+	%unset AXIS_TIP_TITLE_TEXT
+	%unset AXIS_TIP_TITLE_COLOUR
+	%unset AXIS_TIP_TITLE_HEIGHT
+	%unset AXIS_TIP_TITLE_QUALITY
diff --git a/share/metview/etc/MAverageViewDef b/share/metview/etc/MAverageViewDef
new file mode 100644
index 0000000..6830d16
--- /dev/null
+++ b/share/metview/etc/MAverageViewDef
@@ -0,0 +1,89 @@
+MAVERAGEVIEW; uPlot Icon; Metview
+{
+    AREA
+        [
+            help = help_input,
+            help_icon = 'help_area',
+            input_type = area,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 90./-180./-90./180.
+
+    DIRECTION
+    {
+        NORTH SOUTH ; NS ; NS
+        EAST WEST   ; EW ; EW
+    } = NS
+
+    BOTTOM_PRESSURE
+    {
+        *
+    } = 1015.0
+
+    TOP_PRESSURE
+    {
+        *
+    } = 10.0
+
+    PRESSURE_LEVEL_AXIS
+    {
+        LINEAR
+        LOG
+    } = LINEAR
+
+    MAP_PROJECTION  [ visible = false ]
+    {
+        cartesian
+    } = cartesian
+
+    HORIZONTAL_AXIS [interface       = icon,
+                     class           = MAXIS,
+                     missing         = ignored,
+                     help            = help_data,
+                     help_name       = Horizontal Axis,
+                     help_directory  = '/System/Defaults',
+                     help_class      = MAXIS,
+                     help_definition = ( MAXIS, AXIS_ORIENTATION ='HORIZONTAL' )
+                    ]
+    {
+        @
+    }
+
+    VERTICAL_AXIS [interface = icon, 
+                   class           = MAXIS,
+                   missing         = ignored,
+                   help            = help_data,
+                   help_name       = Vertical Axis,
+                   help_directory  = '/System/Defaults',
+                   help_class      = MAXIS,
+                   help_definition = ( MAXIS, AXIS_ORIENTATION ='VERTICAL' )
+                  ]
+    {
+        @
+    }
+
+    SUBPAGE_X_POSITION
+    {
+        @
+    } = 7.5
+
+    SUBPAGE_Y_POSITION
+    {
+        @
+    } = 5
+
+    SUBPAGE_X_LENGTH
+    {
+        @
+    } = 85
+
+    SUBPAGE_Y_LENGTH
+    {
+        @
+    } = 80
+
+%include SubpageFrameDef
+}
diff --git a/share/metview/etc/MAverageViewRules b/share/metview/etc/MAverageViewRules
new file mode 100644
index 0000000..d4d6569
--- /dev/null
+++ b/share/metview/etc/MAverageViewRules
@@ -0,0 +1 @@
+%include "SubpageFrameRules"
diff --git a/share/metview/etc/MCOASTDef b/share/metview/etc/MCOASTDef
new file mode 100644
index 0000000..f5cfd58
--- /dev/null
+++ b/share/metview/etc/MCOASTDef
@@ -0,0 +1,334 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+		}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+MCOAST; Magics; Automatically generated
+{
+	MAP_COASTLINE
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_COASTLINE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	MAP_COASTLINE_RESOLUTION
+	{
+		AUTOMATIC; AUTOMATIC
+		LOW; LOW
+		MEDIUM; MEDIUM
+		HIGH; HIGH
+	} = AUTOMATIC
+
+	MAP_COASTLINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	MAP_COASTLINE_THICKNESS
+	{
+		*
+	} = 1
+
+	MAP_COASTLINE_LAND_SHADE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	MAP_COASTLINE_LAND_SHADE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = GREEN
+
+	MAP_COASTLINE_SEA_SHADE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	MAP_COASTLINE_SEA_SHADE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	MAP_BOUNDARIES
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	MAP_BOUNDARIES_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	MAP_BOUNDARIES_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = GREY
+
+	MAP_BOUNDARIES_THICKNESS
+	{
+		*
+	} = 1
+
+	MAP_DISPUTED_BOUNDARIES
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_DISPUTED_BOUNDARIES_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = DASH
+
+	MAP_DISPUTED_BOUNDARIES_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	MAP_DISPUTED_BOUNDARIES_THICKNESS
+	{
+		*
+	} = 1
+
+	MAP_ADMINISTRATIVE_BOUNDARIES
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	MAP_ADMINISTRATIVE_BOUNDARIES_COUNTRIES_LIST
+	{
+		@		
+		/
+	}
+	MAP_ADMINISTRATIVE_BOUNDARIES_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = DASH
+
+	MAP_ADMINISTRATIVE_BOUNDARIES_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	MAP_ADMINISTRATIVE_BOUNDARIES_THICKNESS
+	{
+		*
+	} = 1
+
+	MAP_CITIES
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	MAP_CITIES_UNIT_SYSTEM
+	{
+		PERCENT; PERCENT
+		CM; CM
+	} = PERCENT
+
+	MAP_CITIES_FONT_NAME
+	{
+		@
+	} = sansserif
+
+	MAP_CITIES_FONT_STYLE
+	{
+		@
+	} = normal
+
+	MAP_CITIES_FONT_SIZE
+	{
+		*
+	} = 2.5
+
+	MAP_CITIES_FONT_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = NAVY
+
+	MAP_CITIES_NAME_POSITION
+	{
+		ABOVE; ABOVE
+		BELOW; BELOW
+		LEFT; LEFT
+		RIGHT; RIGHT
+	} = ABOVE
+
+	MAP_CITIES_MARKER
+	{
+		CIRCLE; CIRCLE
+		BOX; BOX
+		SNOWFLAKE; SNOWFLAKE
+		PLUS; PLUS
+	} = PLUS
+
+	MAP_CITIES_MARKER_HEIGHT
+	{
+		*
+	} = 0.7
+
+	MAP_CITIES_MARKER_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = EVERGREEN
+
+	MAP_RIVERS
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	MAP_RIVERS_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	MAP_RIVERS_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	MAP_RIVERS_THICKNESS
+	{
+		*
+	} = 1
+
+	MAP_GRID
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_GRID_LATITUDE_REFERENCE
+	{
+		*
+	} = 0
+
+	MAP_GRID_LATITUDE_INCREMENT
+	{
+		*
+	} = 10
+
+	MAP_GRID_LONGITUDE_REFERENCE
+	{
+		*
+	} = 0
+
+	MAP_GRID_LONGITUDE_INCREMENT
+	{
+		*
+	} = 20
+
+	MAP_GRID_LINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	MAP_GRID_THICKNESS
+	{
+		*
+	} = 1
+
+	MAP_GRID_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	MAP_LABEL
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_LABEL_QUALITY
+	{
+		@
+	} = MEDIUM
+
+	MAP_LABEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	MAP_LABEL_HEIGHT
+	{
+		*
+	} = 0.25
+
+	MAP_LABEL_LATITUDE_FREQUENCY
+	{
+		*
+	} = 1
+
+	MAP_LABEL_LONGITUDE_FREQUENCY
+	{
+		*
+	} = 1
+
+	MAP_LABEL_LEFT
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_LABEL_RIGHT
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_LABEL_TOP
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	MAP_LABEL_BOTTOM
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+}
diff --git a/share/metview/etc/MCOASTRules b/share/metview/etc/MCOASTRules
new file mode 100644
index 0000000..cee8422
--- /dev/null
+++ b/share/metview/etc/MCOASTRules
@@ -0,0 +1,90 @@
+%if MAP_COASTLINE <> ON %then
+	%unset MAP_COASTLINE_COLOUR
+	%unset MAP_COASTLINE_RESOLUTION
+	%unset MAP_COASTLINE_STYLE
+	%unset MAP_COASTLINE_THICKNESS
+	%unset MAP_COASTLINE_LAND_SHADE
+	%unset MAP_COASTLINE_LAND_SHADE_COLOUR
+	%unset MAP_COASTLINE_SEA_SHADE
+	%unset MAP_COASTLINE_SEA_SHADE_COLOUR
+	%unset MAP_BOUNDARIES
+	%unset MAP_BOUNDARIES_STYLE
+	%unset MAP_BOUNDARIES_COLOUR
+	%unset MAP_BOUNDARIES_THICKNESS
+	%unset MAP_DISPUTED_BOUNDARIES
+	%unset MAP_DISPUTED_BOUNDARIES_STYLE
+	%unset MAP_DISPUTED_BOUNDARIES_COLOUR
+	%unset MAP_DISPUTED_BOUNDARIES_THICKNESS
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_COUNTRIES_LIST
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_STYLE
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_COLOUR
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_THICKNESS
+	%unset MAP_CITIES
+	%unset MAP_CITIES_UNIT_SYSTEM
+	%unset MAP_CITIES_FONT_NAME
+	%unset MAP_CITIES_FONT_STYLE
+	%unset MAP_CITIES_FONT_SIZE
+	%unset MAP_CITIES_FONT_COLOUR
+	%unset MAP_CITIES_NAME_POSITION
+	%unset MAP_CITIES_MARKER
+	%unset MAP_CITIES_MARKER_HEIGHT
+	%unset MAP_CITIES_MARKER_COLOUR
+	%unset MAP_RIVERS
+	%unset MAP_RIVERS_STYLE
+	%unset MAP_RIVERS_COLOUR
+	%unset MAP_RIVERS_THICKNESS
+%if MAP_COASTLINE_LAND_SHADE <> ON %then
+	%unset MAP_COASTLINE_LAND_SHADE_COLOUR
+%if MAP_COASTLINE_SEA_SHADE <> ON %then
+	%unset MAP_COASTLINE_SEA_SHADE_COLOUR
+%if MAP_BOUNDARIES <> ON %then
+	%unset MAP_BOUNDARIES_STYLE
+	%unset MAP_BOUNDARIES_COLOUR
+	%unset MAP_BOUNDARIES_THICKNESS
+	%unset MAP_DISPUTED_BOUNDARIES
+	%unset MAP_DISPUTED_BOUNDARIES_STYLE
+	%unset MAP_DISPUTED_BOUNDARIES_COLOUR
+	%unset MAP_DISPUTED_BOUNDARIES_THICKNESS
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_COUNTRIES_LIST
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_STYLE
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_COLOUR
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_THICKNESS
+%if MAP_DISPUTED_BOUNDARIES <> ON %then
+	%unset MAP_DISPUTED_BOUNDARIES_STYLE
+	%unset MAP_DISPUTED_BOUNDARIES_COLOUR
+	%unset MAP_DISPUTED_BOUNDARIES_THICKNESS
+%if MAP_ADMINISTRATIVE_BOUNDARIES <> ON %then
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_COUNTRIES_LIST
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_STYLE
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_COLOUR
+	%unset MAP_ADMINISTRATIVE_BOUNDARIES_THICKNESS
+%if MAP_CITIES <> ON %then
+	%unset MAP_CITIES_UNIT_SYSTEM
+	%unset MAP_CITIES_FONT_NAME
+	%unset MAP_CITIES_FONT_STYLE
+	%unset MAP_CITIES_FONT_SIZE
+	%unset MAP_CITIES_FONT_COLOUR
+	%unset MAP_CITIES_NAME_POSITION
+	%unset MAP_CITIES_MARKER
+	%unset MAP_CITIES_MARKER_HEIGHT
+	%unset MAP_CITIES_MARKER_COLOUR
+%if MAP_RIVERS <> ON %then
+	%unset MAP_RIVERS_STYLE
+	%unset MAP_RIVERS_COLOUR
+	%unset MAP_RIVERS_THICKNESS
+%if MAP_GRID <> ON %then
+	%unset MAP_GRID_LINE_STYLE
+	%unset MAP_GRID_THICKNESS
+	%unset MAP_GRID_COLOUR
+%if MAP_LABEL <> ON %then
+	%unset MAP_LABEL_QUALITY
+	%unset MAP_LABEL_COLOUR
+	%unset MAP_LABEL_HEIGHT
+	%unset MAP_LABEL_LATITUDE_FREQUENCY
+	%unset MAP_LABEL_LONGITUDE_FREQUENCY
+	%unset MAP_LABEL_LEFT
+	%unset MAP_LABEL_RIGHT
+	%unset MAP_LABEL_TOP
+	%unset MAP_LABEL_BOTTOM
diff --git a/share/metview/etc/MCONTDef b/share/metview/etc/MCONTDef
new file mode 100644
index 0000000..0a3a879
--- /dev/null
+++ b/share/metview/etc/MCONTDef
@@ -0,0 +1,464 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+MCONT; Magics; Automatically generated
+{
+	LEGEND
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+	CONTOUR_LINE_STYLE
+	{
+		&PARAMSHARE&STYLE
+	} = SOLID
+	CONTOUR_LINE_THICKNESS
+	{
+		*
+	} = 1
+	CONTOUR_LINE_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = BLUE
+	CONTOUR_HIGHLIGHT
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+	CONTOUR_HIGHLIGHT_STYLE
+	{
+		&PARAMSHARE&STYLE
+	} = SOLID
+	CONTOUR_REFERENCE_LEVEL
+	{
+		*
+	} = 0.0
+	CONTOUR_HIGHLIGHT_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = BLUE
+	CONTOUR_HIGHLIGHT_THICKNESS
+	{
+		*
+	} = 3
+	CONTOUR_HIGHLIGHT_FREQUENCY
+	{
+		*
+	} = 4
+	CONTOUR_LEVEL_SELECTION_TYPE
+	{
+		COUNT; COUNT
+		INTERVAL; INTERVAL
+		LEVEL_LIST; LEVEL_LIST
+	} = COUNT
+	CONTOUR_MAX_LEVEL
+	{
+		*
+	} = 1.0E+21
+	CONTOUR_MIN_LEVEL
+	{
+		*
+	} = -1.0E+21
+	CONTOUR_SHADE_MAX_LEVEL
+	{
+		*
+	} = 1.0E+21
+	CONTOUR_SHADE_MIN_LEVEL
+	{
+		*
+	} = -1.0E+21
+	CONTOUR_LEVEL_COUNT
+	{
+		*
+	} = 10
+	CONTOUR_LEVEL_TOLERANCE
+	{
+		*
+	} = 2
+	CONTOUR_INTERVAL
+	{
+		*
+	} = 8.0
+	CONTOUR_LEVEL_LIST
+	{
+		*
+		/
+	} = ''
+	CONTOUR_LABEL
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+	CONTOUR_LABEL_TYPE
+	{
+		@
+	} = NUMBER
+	CONTOUR_LABEL_TEXT
+	{
+		@
+	} = ''
+	CONTOUR_LABEL_HEIGHT
+	{
+		*
+	} = 0.3
+	CONTOUR_LABEL_FORMAT
+	{
+		@
+	} = '(AUTOMATIC)'
+	CONTOUR_LABEL_BLANKING
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+	CONTOUR_LABEL_FONT
+	{
+		SERIF;SERIF
+		SANSSERIF;SANSSERIF
+	} = SANSSERIF
+	CONTOUR_LABEL_FONT_STYLE
+	{
+		NORMAL;NORMAL
+		BOLD;BOLD
+		ITALIC;ITALIC
+		BOLDITALIC;BOLDITALIC
+	} = NORMAL
+	CONTOUR_LABEL_COLOUR
+	{
+
+		&PARAMSHARE&COLOUR
+		CONTOUR_LINE_COLOUR
+	} = CONTOUR_LINE_COLOUR
+	CONTOUR_LABEL_FREQUENCY
+	{
+		*
+	} = 2
+	CONTOUR_SHADE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR_SHADE_TECHNIQUE
+	{
+		POLYGON_SHADING; POLYGON_SHADING
+		CELL_SHADING; CELL_SHADING
+		GRID_SHADING; GRID_SHADING
+		MARKER; MARKER
+	} = POLYGON_SHADING
+	CONTOUR_SHADE_METHOD
+	{
+		AREA_FILL; AREA_FILL
+		DOT; DOT
+		HATCH; HATCH
+	} = DOT
+	CONTOUR_SHADE_DOT_SIZE
+	{
+		*
+	} = 0.02
+	CONTOUR_SHADE_MAX_LEVEL_DENSITY
+	{
+		*
+	} = 50.0
+	CONTOUR_SHADE_MIN_LEVEL_DENSITY
+	{
+		*
+	} = 0.0
+	CONTOUR_SHADE_ANGLE
+	{
+		*
+	} = 45.0
+	CONTOUR_SHADE_HATCH_INDEX
+	{
+		*
+	} = 0
+	CONTOUR_SHADE_HATCH_THICKNESS
+	{
+		*
+	} = 1
+	CONTOUR_SHADE_HATCH_DENSITY
+	{
+		*
+	} = 18.0
+	CONTOUR_SHADE_COLOUR_TABLE
+	{
+		@
+		/
+	} = ''
+	CONTOUR_SHADE_HEIGHT_TABLE
+	{
+		*
+		/
+	} = ''
+	CONTOUR_SHADE_MARKER_TABLE
+	{
+		*
+		/
+	} = ''
+	CONTOUR_SHADE_COLOUR_METHOD
+	{
+		CALCULATE; CALCULATE
+		LIST; LIST
+	} = CALCULATE
+	CONTOUR_SHADE_MAX_LEVEL_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = BLUE
+	CONTOUR_SHADE_MIN_LEVEL_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = RED
+	CONTOUR_SHADE_COLOUR_DIRECTION
+	{
+		CLOCKWISE;CLOCKWISE
+		ANTI_CLOCKWISE;ANTI_CLOCKWISE
+	} = ANTI_CLOCKWISE
+	CONTOUR_SHADE_COLOUR_LIST [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR		/
+	} = ''
+	CONTOUR_SHADE_LABEL_BLANKING
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+	CONTOUR_METHOD
+	{
+		AUTOMATIC; AUTOMATIC
+		SAMPLE; SAMPLE
+		LINEAR; LINEAR
+		AKIMA760; AKIMA760
+		AKIMA474; AKIMA474
+	} = AUTOMATIC
+	CONTOUR_SAMPLE_X_INTERVAL
+	{
+		*
+	} = 2
+	CONTOUR_SAMPLE_Y_INTERVAL
+	{
+		*
+	} = 2
+	CONTOUR_AKIMA_X_RESOLUTION
+	{
+		*
+	} = 1.5
+	CONTOUR_AKIMA_Y_RESOLUTION
+	{
+		*
+	} = 1.5
+	CONTOUR_INTERPOLATION_FLOOR
+	{
+		*
+	} = -1.0E21
+	CONTOUR_INTERPOLATION_CEILING
+	{
+		*
+	} = 1.0E21
+	CONTOUR_AUTOMATIC_SETTING
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR_AUTOMATIC_LIBRARY_PATH
+	{
+		@
+	} = ''
+	CONTOUR_HILO
+	{
+		ON; ON
+		OFF; OFF
+		HI; HI
+		LO; LO
+	} = OFF
+	CONTOUR_HILO_TYPE
+	{
+		TEXT; TEXT
+		NUMBER; NUMBER
+		BOTH; BOTH
+	} = TEXT
+	CONTOUR_HILO_HEIGHT
+	{
+		*
+	} = 0.4
+	CONTOUR_HILO_QUALITY
+	{
+		HIGH;HIGH
+		MEDIUM;MEDIUM
+		LOW;LOW
+	} = LOW
+	CONTOUR_HI_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = BLUE
+	CONTOUR_LO_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = BLUE
+	CONTOUR_HI_TEXT
+	{
+		@
+	} = H
+	CONTOUR_LO_TEXT
+	{
+		@
+	} = L
+	CONTOUR_HILO_TEXT_BLANKING
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR_HILO_FORMAT
+	{
+		@
+	} = '(AUTOMATIC)'
+	CONTOUR_HILO_WINDOW_SIZE
+	{
+		*
+	} = 3
+	CONTOUR_HILO_SUPPRESS_RADIUS
+	{
+		*
+	} = 15.0
+	CONTOUR_HILO_MAX_VALUE
+	{
+		*
+	} = 1.0E+21
+	CONTOUR_HILO_MIN_VALUE
+	{
+		*
+	} = -1.0E+21
+	CONTOUR_HI_MAX_VALUE
+	{
+		*
+	} = 1.0E+21
+	CONTOUR_HI_MIN_VALUE
+	{
+		*
+	} = -1.0E+21
+	CONTOUR_LO_MAX_VALUE
+	{
+		*
+	} = 1.0E+21
+	CONTOUR_LO_MIN_VALUE
+	{
+		*
+	} = -1.0E+21
+	CONTOUR_HILO_MARKER
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR_HILO_MARKER_HEIGHT
+	{
+		*
+	} = 0.1
+	CONTOUR_HILO_MARKER_INDEX
+	{
+		*
+	} = 3
+	CONTOUR_HILO_MARKER_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = RED
+	CONTOUR_HILO_POSITION_WRITE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR_HILO_POSITION_FILE_NAME
+	{
+		@
+	} = ''
+	CONTOUR_GRID_VALUE_PLOT
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+	CONTOUR_GRID_VALUE_TYPE
+	{
+		NORMAL;NORMAL
+		REDUCED;REDUCED
+		AKIMA;AKIMA
+	} = NORMAL
+	CONTOUR_GRID_VALUE_PLOT_TYPE
+	{
+		VALUE; VALUE
+		MARKER; MARKER
+		BOTH; BOTH
+	} = VALUE
+	CONTOUR_GRID_VALUE_MIN
+	{
+		*
+	} = -1.0E+21
+	CONTOUR_GRID_VALUE_MAX
+	{
+		*
+	} = 1.0E+21
+	CONTOUR_GRID_VALUE_LAT_FREQUENCY
+	{
+		*
+	} = 1
+	CONTOUR_GRID_VALUE_LON_FREQUENCY
+	{
+		*
+	} = 1
+	CONTOUR_GRID_VALUE_HEIGHT
+	{
+		*
+	} = 0.25
+	CONTOUR_GRID_VALUE_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = BLUE
+	CONTOUR_GRID_VALUE_FORMAT
+	{
+		@
+	} = '(AUTOMATIC)'
+	CONTOUR_GRID_VALUE_QUALITY
+	{
+		HIGH;HIGH
+		MEDIUM;MEDIUM
+		LOW;LOW
+	} = LOW
+	CONTOUR_GRID_VALUE_MARKER_HEIGHT
+	{
+		*
+	} = 0.25
+	CONTOUR_GRID_VALUE_MARKER_COLOUR [ help = help_colour,interface = colour ]
+	{ 
+		&PARAMSHARE&COLOUR
+	} = RED
+	CONTOUR_GRID_VALUE_MARKER_QUAL
+	{
+		@
+	} = LOW
+	CONTOUR_GRID_VALUE_MARKER_INDEX
+	{
+		*
+	} = 3
+	GRIB_SCALING_OF_RETRIEVED_FIELDS
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	GRIB_SCALING_OF_DERIVED_FIELDS
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+}
diff --git a/share/metview/etc/MCONTRules b/share/metview/etc/MCONTRules
new file mode 100644
index 0000000..11be7c6
--- /dev/null
+++ b/share/metview/etc/MCONTRules
@@ -0,0 +1,306 @@
+%if CONTOUR_HIGHLIGHT = OFF %then 
+	%unset CONTOUR_HIGHLIGHT_STYLE 
+	%unset CONTOUR_REFERENCE_LEVEL 
+	%unset CONTOUR_HIGHLIGHT_COLOUR 
+	%unset CONTOUR_HIGHLIGHT_THICKNESS 
+	%unset CONTOUR_HIGHLIGHT_FREQUENCY 
+%if CONTOUR_LEVEL_SELECTION_TYPE = COUNT %then 
+	%unset CONTOUR_LEVEL_LIST 
+	%unset CONTOUR_INTERVAL 
+%if CONTOUR_LEVEL_SELECTION_TYPE = LEVEL_LIST %then 
+	%unset CONTOUR_LEVEL_COUNT 
+	%unset CONTOUR_LEVEL_TOLERANCE 
+	%unset CONTOUR_REFERENCE_LEVEL 
+	%unset CONTOUR_INTERVAL 
+%if CONTOUR_LEVEL_SELECTION_TYPE = INTERVAL %then 
+	%unset CONTOUR_LEVEL_COUNT 
+	%unset CONTOUR_LEVEL_TOLERANCE 
+	%unset CONTOUR_LEVEL_LIST 
+%if CONTOUR_LABEL = OFF %then 
+	%unset CONTOUR_LABEL_TYPE 
+	%unset CONTOUR_LABEL_TEXT 
+	%unset CONTOUR_LABEL_HEIGHT 
+	%unset CONTOUR_LABEL_FORMAT 
+	%unset CONTOUR_LABEL_BLANKING 
+	%unset CONTOUR_LABEL_FONT 
+	%unset CONTOUR_LABEL_FONT_STYLE 
+	%unset CONTOUR_LABEL_COLOUR 
+	%unset CONTOUR_LABEL_FREQUENCY 
+%if CONTOUR_SHADE_METHOD = AREA_FILL %then 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+%if CONTOUR_SHADE_METHOD = DOT %then 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+%if CONTOUR_SHADE_METHOD = HATCH %then 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+%if CONTOUR_SHADE_TECHNIQUE = MARKER %then 
+	%unset CONTOUR_SHADE_METHOD 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+%if CONTOUR_SHADE_TECHNIQUE = POLYGON_SHADING %then 
+	%unset CONTOUR_SHADE_COLOUR_TABLE 
+	%unset CONTOUR_SHADE_HEIGHT_TABLE 
+	%unset CONTOUR_SHADE_MARKER_TABLE 
+%if CONTOUR_SHADE_COLOUR_METHOD = LIST %then 
+	%unset CONTOUR_SHADE_MAX_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_MIN_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_COLOUR_DIRECTION 
+%if CONTOUR_SHADE_COLOUR_METHOD = CALCULATE %then 
+	%unset CONTOUR_SHADE_COLOUR_LIST 
+%if CONTOUR_SHADE = OFF %then 
+	%unset CONTOUR_SHADE_TECHNIQUE 
+	%unset CONTOUR_SHADE_METHOD 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+	%unset CONTOUR_SHADE_COLOUR_TABLE 
+	%unset CONTOUR_SHADE_HEIGHT_TABLE 
+	%unset CONTOUR_SHADE_MARKER_TABLE 
+	%unset CONTOUR_SHADE_MAX_LEVEL 
+	%unset CONTOUR_SHADE_MIN_LEVEL 
+	%unset CONTOUR_SHADE_COLOUR_METHOD 
+	%unset CONTOUR_SHADE_MAX_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_MIN_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_COLOUR_DIRECTION 
+	%unset CONTOUR_SHADE_COLOUR_LIST 
+	%unset CONTOUR_SHADE_LABEL_BLANKING 
+%if CONTOUR_HIGHLIGHT = OFF %then 
+	%unset CONTOUR_HIGHLIGHT_STYLE 
+	%unset CONTOUR_REFERENCE_LEVEL 
+	%unset CONTOUR_HIGHLIGHT_COLOUR 
+	%unset CONTOUR_HIGHLIGHT_THICKNESS 
+	%unset CONTOUR_HIGHLIGHT_FREQUENCY 
+%if CONTOUR_LEVEL_SELECTION_TYPE = COUNT %then 
+	%unset CONTOUR_LEVEL_LIST 
+	%unset CONTOUR_INTERVAL 
+%if CONTOUR_LEVEL_SELECTION_TYPE = LEVEL_LIST %then 
+	%unset CONTOUR_LEVEL_COUNT 
+	%unset CONTOUR_LEVEL_TOLERANCE 
+	%unset CONTOUR_REFERENCE_LEVEL 
+	%unset CONTOUR_INTERVAL 
+%if CONTOUR_LEVEL_SELECTION_TYPE = INTERVAL %then 
+	%unset CONTOUR_LEVEL_COUNT 
+	%unset CONTOUR_LEVEL_TOLERANCE 
+	%unset CONTOUR_LEVEL_LIST 
+%if CONTOUR_LABEL = OFF %then 
+	%unset CONTOUR_LABEL_TYPE 
+	%unset CONTOUR_LABEL_TEXT 
+	%unset CONTOUR_LABEL_HEIGHT 
+	%unset CONTOUR_LABEL_FORMAT 
+	%unset CONTOUR_LABEL_BLANKING 
+	%unset CONTOUR_LABEL_FONT 
+	%unset CONTOUR_LABEL_FONT_STYLE 
+	%unset CONTOUR_LABEL_COLOUR 
+	%unset CONTOUR_LABEL_FREQUENCY 
+%if CONTOUR_SHADE_METHOD = AREA_FILL %then 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+%if CONTOUR_SHADE_METHOD = DOT %then 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+%if CONTOUR_SHADE_METHOD = HATCH %then 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+%if CONTOUR_SHADE_TECHNIQUE = MARKER %then 
+	%unset CONTOUR_SHADE_METHOD 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+%if CONTOUR_SHADE_TECHNIQUE = POLYGON_SHADING %then 
+	%unset CONTOUR_SHADE_COLOUR_TABLE 
+	%unset CONTOUR_SHADE_HEIGHT_TABLE 
+	%unset CONTOUR_SHADE_MARKER_TABLE 
+%if CONTOUR_SHADE_COLOUR_METHOD = LIST %then 
+	%unset CONTOUR_SHADE_MAX_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_MIN_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_COLOUR_DIRECTION 
+%if CONTOUR_SHADE_COLOUR_METHOD = CALCULATE %then 
+	%unset CONTOUR_SHADE_COLOUR_LIST 
+%if CONTOUR_SHADE = OFF %then 
+	%unset CONTOUR_SHADE_TECHNIQUE 
+	%unset CONTOUR_SHADE_METHOD 
+	%unset CONTOUR_SHADE_DOT_SIZE 
+	%unset CONTOUR_SHADE_MAX_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_MIN_LEVEL_DENSITY 
+	%unset CONTOUR_SHADE_ANGLE 
+	%unset CONTOUR_SHADE_HATCH_INDEX 
+	%unset CONTOUR_SHADE_HATCH_THICKNESS 
+	%unset CONTOUR_SHADE_HATCH_DENSITY 
+	%unset CONTOUR_SHADE_COLOUR_TABLE 
+	%unset CONTOUR_SHADE_HEIGHT_TABLE 
+	%unset CONTOUR_SHADE_MARKER_TABLE 
+	%unset CONTOUR_SHADE_MAX_LEVEL 
+	%unset CONTOUR_SHADE_MIN_LEVEL 
+	%unset CONTOUR_SHADE_COLOUR_METHOD 
+	%unset CONTOUR_SHADE_MAX_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_MIN_LEVEL_COLOUR 
+	%unset CONTOUR_SHADE_COLOUR_DIRECTION 
+	%unset CONTOUR_SHADE_COLOUR_LIST 
+	%unset CONTOUR_SHADE_LABEL_BLANKING 
+%if CONTOUR = OFF %then 
+	%unset CONTOUR_LINE_STYLE 
+%if CONTOUR = OFF %then 
+	%unset CONTOUR_LINE_THICKNESS 
+%if CONTOUR = OFF %then 
+	%unset CONTOUR_LINE_COLOUR 
+%if CONTOUR_METHOD = SAMPLE %then 
+	%unset CONTOUR_AKIMA_X_RESOLUTION 
+	%unset CONTOUR_AKIMA_Y_RESOLUTION 
+%if CONTOUR_METHOD = AKIMA760 %then 
+	%unset CONTOUR_SAMPLE_X_INTERVAL 
+	%unset CONTOUR_SAMPLE_Y_INTERVAL 
+%if CONTOUR_METHOD = AKIMA474 %then 
+	%unset CONTOUR_SAMPLE_X_INTERVAL 
+	%unset CONTOUR_SAMPLE_Y_INTERVAL 
+%if CONTOUR_METHOD = AUTOMATIC %then 
+	%unset CONTOUR_SAMPLE_X_INTERVAL 
+	%unset CONTOUR_SAMPLE_Y_INTERVAL 
+	%unset CONTOUR_AKIMA_X_RESOLUTION 
+	%unset CONTOUR_AKIMA_Y_RESOLUTION 
+%if CONTOUR_METHOD = LINEAR %then 
+	%unset CONTOUR_SAMPLE_X_INTERVAL 
+	%unset CONTOUR_SAMPLE_Y_INTERVAL 
+	%unset CONTOUR_AKIMA_X_RESOLUTION 
+	%unset CONTOUR_AKIMA_Y_RESOLUTION 
+%if CONTOUR_AUTOMATIC_SETTING = OFF %then 
+	%unset CONTOUR_AUTOMATIC_LIBRARY_PATH 
+%if CONTOUR_HILO_TYPE = TEXT %then 
+	%unset CONTOUR_HILO_FORMAT 
+%if CONTOUR_HILO_TYPE = NUMBER %then 
+	%unset CONTOUR_HI_TEXT 
+	%unset CONTOUR_LO_TEXT 
+	%unset CONTOUR_HILO_TEXT_BLANKING 
+%if CONTOUR_HILO_TYPE = BOTH %then 
+	%unset CONTOUR_HI_TEXT 
+	%unset CONTOUR_LO_TEXT 
+	%unset CONTOUR_HILO_TEXT_BLANKING 
+	%unset CONTOUR_HILO_FORMAT 
+%if CONTOUR_HILO_MARKER = OFF %then 
+	%unset CONTOUR_HILO_MARKER_HEIGHT 
+	%unset CONTOUR_HILO_MARKER_INDEX 
+	%unset CONTOUR_HILO_MARKER_COLOUR 
+%if CONTOUR_HILO_POSITION_WRITE = OFF %then 
+	%unset CONTOUR_HILO_POSITION_FILE_NAME 
+%if CONTOUR_HILO = HI %then 
+	%unset CONTOUR_HILO_TYPE 
+	%unset CONTOUR_HILO_HEIGHT 
+	%unset CONTOUR_HILO_QUALITY 
+	%unset CONTOUR_HI_COLOUR 
+	%unset CONTOUR_LO_COLOUR 
+	%unset CONTOUR_HI_TEXT 
+	%unset CONTOUR_LO_TEXT 
+	%unset CONTOUR_HILO_TEXT_BLANKING 
+	%unset CONTOUR_HILO_FORMAT 
+	%unset CONTOUR_HILO_WINDOW_SIZE 
+	%unset CONTOUR_HILO_SUPPRESS_RADIUS 
+	%unset CONTOUR_HILO_MAX_VALUE 
+	%unset CONTOUR_HILO_MIN_VALUE 
+	%unset CONTOUR_HI_MAX_VALUE 
+	%unset CONTOUR_HI_MIN_VALUE 
+	%unset CONTOUR_LO_MAX_VALUE 
+	%unset CONTOUR_LO_MIN_VALUE 
+	%unset CONTOUR_HILO_MARKER 
+	%unset CONTOUR_HILO_MARKER_HEIGHT 
+	%unset CONTOUR_HILO_MARKER_INDEX 
+	%unset CONTOUR_HILO_MARKER_COLOUR 
+	%unset CONTOUR_HILO_POSITION_WRITE 
+	%unset CONTOUR_HILO_POSITION_FILE_NAME 
+%if CONTOUR_HILO = OFF %then 
+	%unset CONTOUR_HILO_TYPE 
+	%unset CONTOUR_HILO_HEIGHT 
+	%unset CONTOUR_HILO_QUALITY 
+	%unset CONTOUR_HI_COLOUR 
+	%unset CONTOUR_LO_COLOUR 
+	%unset CONTOUR_HI_TEXT 
+	%unset CONTOUR_LO_TEXT 
+	%unset CONTOUR_HILO_TEXT_BLANKING 
+	%unset CONTOUR_HILO_FORMAT 
+	%unset CONTOUR_HILO_WINDOW_SIZE 
+	%unset CONTOUR_HILO_SUPPRESS_RADIUS 
+	%unset CONTOUR_HILO_MAX_VALUE 
+	%unset CONTOUR_HILO_MIN_VALUE 
+	%unset CONTOUR_HI_MAX_VALUE 
+	%unset CONTOUR_HI_MIN_VALUE 
+	%unset CONTOUR_LO_MAX_VALUE 
+	%unset CONTOUR_LO_MIN_VALUE 
+	%unset CONTOUR_HILO_MARKER 
+	%unset CONTOUR_HILO_MARKER_HEIGHT 
+	%unset CONTOUR_HILO_MARKER_INDEX 
+	%unset CONTOUR_HILO_MARKER_COLOUR 
+	%unset CONTOUR_HILO_POSITION_WRITE 
+	%unset CONTOUR_HILO_POSITION_FILE_NAME 
+%if CONTOUR_HILO = LO %then 
+	%unset CONTOUR_HILO_TYPE 
+	%unset CONTOUR_HILO_HEIGHT 
+	%unset CONTOUR_HILO_QUALITY 
+	%unset CONTOUR_HI_COLOUR 
+	%unset CONTOUR_LO_COLOUR 
+	%unset CONTOUR_HI_TEXT 
+	%unset CONTOUR_LO_TEXT 
+	%unset CONTOUR_HILO_TEXT_BLANKING 
+	%unset CONTOUR_HILO_FORMAT 
+	%unset CONTOUR_HILO_WINDOW_SIZE 
+	%unset CONTOUR_HILO_SUPPRESS_RADIUS 
+	%unset CONTOUR_HILO_MAX_VALUE 
+	%unset CONTOUR_HILO_MIN_VALUE 
+	%unset CONTOUR_HI_MAX_VALUE 
+	%unset CONTOUR_HI_MIN_VALUE 
+	%unset CONTOUR_LO_MAX_VALUE 
+	%unset CONTOUR_LO_MIN_VALUE 
+	%unset CONTOUR_HILO_MARKER 
+	%unset CONTOUR_HILO_MARKER_HEIGHT 
+	%unset CONTOUR_HILO_MARKER_INDEX 
+	%unset CONTOUR_HILO_MARKER_COLOUR 
+	%unset CONTOUR_HILO_POSITION_WRITE 
+	%unset CONTOUR_HILO_POSITION_FILE_NAME 
+%if CONTOUR_GRID_VALUE_PLOT_TYPE = VALUE %then 
+	%unset CONTOUR_GRID_VALUE_MARKER_HEIGHT 
+	%unset CONTOUR_GRID_VALUE_MARKER_COLOUR 
+	%unset CONTOUR_GRID_VALUE_MARKER_QUAL 
+	%unset CONTOUR_GRID_VALUE_MARKER_INDEX 
+%if CONTOUR_GRID_VALUE_PLOT = OFF %then 
+	%unset CONTOUR_GRID_VALUE_TYPE 
+	%unset CONTOUR_GRID_VALUE_PLOT_TYPE 
+	%unset CONTOUR_GRID_VALUE_MIN 
+	%unset CONTOUR_GRID_VALUE_MAX 
+	%unset CONTOUR_GRID_VALUE_LAT_FREQUENCY 
+	%unset CONTOUR_GRID_VALUE_LON_FREQUENCY 
+	%unset CONTOUR_GRID_VALUE_HEIGHT 
+	%unset CONTOUR_GRID_VALUE_COLOUR 
+	%unset CONTOUR_GRID_VALUE_FORMAT 
+	%unset CONTOUR_GRID_VALUE_QUALITY 
+	%unset CONTOUR_GRID_VALUE_MARKER_HEIGHT 
+	%unset CONTOUR_GRID_VALUE_MARKER_COLOUR 
+	%unset CONTOUR_GRID_VALUE_MARKER_QUAL 
+	%unset CONTOUR_GRID_VALUE_MARKER_INDEX 
diff --git a/share/metview/etc/MGRAPHDef b/share/metview/etc/MGRAPHDef
new file mode 100755
index 0000000..dcbf5a4
--- /dev/null
+++ b/share/metview/etc/MGRAPHDef
@@ -0,0 +1,223 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+MGRAPH  ; GRAPH   ; MAGICS
+{
+     LEGEND
+     {
+          ON;  ON
+          OFF; OFF
+     } = OFF
+	
+        GRAPH_TYPE
+        {
+                CURVE ; CURVE
+                BAR   ; BAR  
+                AREA  ; AREA 
+        } = CURVE
+ 
+        GRAPH_LINE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        GRAPH_LINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        GRAPH_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        GRAPH_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+
+        GRAPH_SYMBOL
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        GRAPH_SYMBOL_HEIGHT
+        {
+                @
+        } = 0.2
+ 
+        GRAPH_SYMBOL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+ 
+        GRAPH_SYMBOL_MARKER_INDEX
+        {
+                 *
+        } = 3
+ 
+        GRAPH_MISSING_DATA_MODE
+        {
+                IGNORE ; IGNORE
+                JOIN   ; JOIN  
+                DROP   ; DROP  
+        } = IGNORE
+ 
+        GRAPH_MISSING_DATA_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = DASH
+ 
+        GRAPH_MISSING_DATA_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+ 
+        GRAPH_MISSING_DATA_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        GRAPH_BAR_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        GRAPH_BAR_WIDTH
+        {
+                @
+        } = 0.
+
+        GRAPH_BAR_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        GRAPH_BAR_LINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        GRAPH_SHADE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        GRAPH_SHADE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        GRAPH_SHADE_STYLE
+			[ interface = option_menu ]
+        {
+                 &PARAMSHARE&SHADING
+        } = AREA_FILL
+ 
+        GRAPH_SHADE_DENSITY
+        {
+                @
+        } = 20.0
+ 
+        GRAPH_SHADE_DOT_SIZE
+        {
+                @
+        } = 0.02
+ 
+        GRAPH_SHADE_HATCH_INDEX
+        {
+                *
+        } = 0
+
+        GRAPH_SHADE_HATCH_THICKNESS
+        {
+                *
+        } = 1
+
+        GRAPH_SHADE_HATCH_DENSITY
+        {
+                @
+        } = 18.0
+ 
+        GRAPH_X_SUPPRESS_BELOW
+        {
+                @
+        } = '-2.1E07'
+ 
+        GRAPH_X_SUPPRESS_ABOVE
+        {
+                @
+        } = 2.1E07
+ 
+        GRAPH_DATE_X_SUPPRESS_BELOW [ visible = false ]
+        {
+                @
+        } = '1900-01-01'
+ 
+        GRAPH_DATE_X_SUPPRESS_ABOVE [ visible = false ]
+        {
+                @
+        } = '2099-12-31'
+
+        GRAPH_Y_SUPPRESS_BELOW
+        {
+                @
+        } = '-2.1E0'
+ 
+        GRAPH_Y_SUPPRESS_ABOVE
+        {
+                @
+        } = 2.1E07
+ 
+
+} ! end of MGRAPH 
diff --git a/share/metview/etc/MGRAPHRules b/share/metview/etc/MGRAPHRules
new file mode 100755
index 0000000..522aaf6
--- /dev/null
+++ b/share/metview/etc/MGRAPHRules
@@ -0,0 +1,87 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+#
+# GRAPH_Y_MAX_VALUE is used for bars but might be removed in magics
+#
+
+
+
+%if GRAPH_TYPE = CURVE %then
+        %unset GRAPH_SHADE
+
+%if GRAPH_TYPE = CURVE %or GRAPH_SHADE = OFF %then
+        %unset GRAPH_SHADE_STYLE
+        %unset GRAPH_SHADE_COLOUR
+
+%if GRAPH_TYPE = CURVE %or GRAPH_SHADE = OFF %or GRAPH_SHADE_STYLE <> DOT %then
+        %unset GRAPH_SHADE_DENSITY
+        %unset GRAPH_SHADE_DOT_SIZE
+
+%if GRAPH_TYPE = CURVE %or GRAPH_SHADE = OFF %or GRAPH_SHADE_STYLE <> HATCH %then
+        %unset GRAPH_SHADE_HATCH_INDEX
+        %unset GRAPH_SHADE_HATCH_THICKNESS
+        %unset GRAPH_SHADE_HATCH_DENSITY
+
+%if GRAPH_TYPE <> CURVE %and GRAPH_TYPE <> AREA %then
+        %unset GRAPH_SYMBOL
+        %unset GRAPH_MISSING_DATA_MODE
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_MISSING_DATA_MODE = IGNORE %then
+        %unset GRAPH_MISSING_DATA_STYLE
+        %unset GRAPH_MISSING_DATA_COLOUR
+        %unset GRAPH_MISSING_DATA_THICKNESS
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_LINE = OFF %then
+        %unset GRAPH_BLANKING
+
+%if GRAPH_TYPE <> CURVE %or GRAPH_LINE = OFF %or GRAPH_BLANKING = OFF %then
+        %unset GRAPH_BLANKING_GAP
+
+%if GRAPH_LINE = OFF %then
+        %unset GRAPH_LINE_STYLE
+        %unset GRAPH_LINE_COLOUR
+        %unset GRAPH_LINE_THICKNESS
+
+%if (GRAPH_TYPE <> CURVE %and GRAPH_TYPE <> AREA) %or GRAPH_SYMBOL = OFF %then
+        %unset GRAPH_SYMBOL_MARKER_INDEX
+        %unset GRAPH_SYMBOL_COLOUR
+        %unset GRAPH_SYMBOL_HEIGHT
+ 
+%if GRAPH_TYPE <> BAR %then
+        %unset GRAPH_BAR_WIDTH
+        %unset GRAPH_BAR_COLOUR
+        %unset GRAPH_BAR_ANNOTATION_POSITION
+
+%if GRAPH_TYPE <> BAR %or GRAPH_LINE = OFF %then
+        %unset GRAPH_BAR_LINE_STYLE
+        %unset GRAPH_BAR_LINE_THICKNESS
diff --git a/share/metview/etc/MLEGENDDef b/share/metview/etc/MLEGENDDef
new file mode 100755
index 0000000..821ad2c
--- /dev/null
+++ b/share/metview/etc/MLEGENDDef
@@ -0,0 +1,263 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON
+             OFF ; OFF
+       }
+
+       COLOUR {
+			%include MagicsColors.h
+       }
+
+       LINE_STYLE {
+             SOLID      ; SOLID
+             DOT        ; DOT
+             DASH       ; DASH
+             CHAIN_DOT  ; CHAIN_DOT
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       }
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+
+MLEGEND   ; LEGEND    ; MAGICS
+{
+	
+		LEGEND_POSITIONING [ visible= false]
+		{
+ 				AUTOMATIC	; AUTOMATIC
+ 				#INSIDE		; INSIDE
+ 				#OUTSIDE		; OUTSIDE
+		} = AUTOMATIC
+
+		LEGEND_SUBPAGE_POSITION 
+        [ visible= false]
+		{
+				BOTTOM_RIGHT	; BOTTOM_RIGHT
+				TOP_RIGHT		; TOP_RIGHT
+				TOP_LEFT		; TOP_LEFT
+				BOTTOM_LEFT		; BOTTOM_LEFT
+		} = BOTTOM_RIGHT
+        LEGEND_DISPLAY_TYPE
+    	{
+    	        DISJOINT    ; DISJOINT
+    	        CONTINUOUS  ; CONTINUOUS
+    	        HISTOGRAM  ; HISTOGRAM
+    	} = CONTINUOUS
+
+	LEGEND_ENTRY_PLOT_DIRECTION
+	{
+		AUTOMATIC
+		ROW
+		COLUMN
+	} = AUTOMATIC
+    LEGEND_ENTRY_PLOT_ORIENTATION
+	{
+		BOTTOM_TOP
+		TOP_BOTTOM
+	} = BOTTOM_TOP
+	LEGEND_ENTRY_TEXT_WIDTH
+	{
+		*
+	} = 50
+
+	LEGEND_COLUMN_COUNT
+    	{
+        		*
+    	} = 1
+
+    	LEGEND_TITLE
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+    	LEGEND_TITLE_TEXT
+    	{
+        		@
+    	} = 'LEGEND'
+
+     LEGEND_TITLE_ORIENTATION
+     {
+          AUTOMATIC
+          HORIZONTAL
+          VERTICAL
+     } = AUTOMATIC
+
+     LEGEND_TEXT_COMPOSITION
+     {
+          AUTOMATIC_TEXT_ONLY ;AUTOMATIC_TEXT_ONLY
+          USER_TEXT_ONLY; USER_TEXT_ONLY
+          BOTH; BOTH
+     } = AUTOMATIC_TEXT_ONLY
+
+     LEGEND_USER_LINES
+     {
+          @
+          /
+     } = ''
+
+        LEGEND_TEXT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = NAVY
+
+        LEGEND_TEXT_FORMAT
+        {
+                @
+        } = '(automatic)'
+        
+        LEGEND_TEXT_FONT_SIZE
+        {
+               *
+        } = 0.2
+        
+        LEGEND_LABEL_FREQUENCY
+        {
+            *
+        } = 1
+        
+        LEGEND_ENTRY_BORDER 
+        {
+            &PARAMSHARE&ONOFF
+        } = ON
+        
+        LEGEND_ENTRY_BORDER_COLOUR 
+        {
+            &PARAMSHARE&COLOUR
+        } = black
+        
+        
+    	LEGEND_BOX_BLANKING
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+    	LEGEND_BORDER
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+    	LEGEND_BORDER_COLOUR
+    	{
+    		    &PARAMSHARE&COLOUR
+    	} = BLUE
+
+    	LEGEND_BORDER_LINE_STYLE
+    	{
+        		&PARAMSHARE&LINE_STYLE
+    	} = SOLID
+
+    	LEGEND_BORDER_THICKNESS
+    	{
+        		&PARAMSHARE&THICKNESS
+    	} = 1
+
+    	
+
+
+        LEGEND_BOX_MODE 
+		{
+				AUTOMATIC		; AUTOMATIC
+				POSITIONAL		; POSITIONAL
+		} = AUTOMATIC
+
+	 	
+    	LEGEND_BOX_X_POSITION
+    	{
+        		@
+    	} = 0.0
+
+    	LEGEND_BOX_Y_POSITION 
+    	{
+        		@
+    	} = 0.0
+
+    	LEGEND_BOX_X_LENGTH 
+    	{
+        		@
+    	} = 1.0
+
+    	LEGEND_BOX_Y_LENGTH 
+    	{
+        		@
+    	} = 1.0
+        
+        LEGEND_HISTOGRAM_BORDER 
+        {
+            &PARAMSHARE&ONOFF
+        } = ON
+        
+        LEGEND_HISTOGRAM_BORDER_COLOUR 
+        {
+            &PARAMSHARE&COLOUR
+        } = black
+        
+        LEGEND_HISTOGRAM_MEAN_VALUE 
+        {
+            &PARAMSHARE&ONOFF
+        } = OFF
+        
+        LEGEND_HISTOGRAM_MEAN_VALUE_MARKER 
+        {
+            *
+        } = 15
+        
+        LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_COLOUR
+        {
+            &PARAMSHARE&COLOUR
+        } = black
+        LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_SIZE
+        {
+            @
+        } = 0.5
+        
+         LEGEND_HISTOGRAM_MAX_VALUE 
+        {
+            &PARAMSHARE&ONOFF
+        } = ON
+        LEGEND_HISTOGRAM_GRID_COLOUR
+        {
+            &PARAMSHARE&COLOUR
+        } = black
+        LEGEND_HISTOGRAM_GRID_LINE_STYLE
+        {
+            &PARAMSHARE&LINE_STYLE
+        } = SOLID
+         LEGEND_HISTOGRAM_GRID_THICKNESS
+        {
+            *
+        } = 1
+        
+
+}  ! end of MLEGEND
diff --git a/share/metview/etc/MLEGENDRules b/share/metview/etc/MLEGENDRules
new file mode 100644
index 0000000..a7af715
--- /dev/null
+++ b/share/metview/etc/MLEGENDRules
@@ -0,0 +1,62 @@
+%if LEGEND_TITLE = OFF %then
+    %unset LEGEND_TITLE_TEXT
+    %unset LEGEND_TITLE_ORIENTATION
+
+%if LEGEND_BORDER = OFF %then
+    %unset LEGEND_BORDER_COLOUR
+    %unset LEGEND_BORDER_THICKNESS
+    %unset LEGEND_BORDER_LINE_STYLE
+
+%if LEGEND_BOX_MODE = AUTOMATIC %then
+	%unset LEGEND_BOX_X_POSITION
+	%unset LEGEND_BOX_Y_POSITION
+	%unset LEGEND_BOX_X_LENGTH
+	%unset LEGEND_BOX_Y_LENGTH
+
+%if LEGEND_BOX_MODE = POSITIONAL %then
+    %unset LEGEND_POSITIONING
+    %unset LEGEND_SUBPAGE_POSITION
+
+
+%if LEGEND_DISPLAY_TYPE = DISJOINT %then
+    %unset LEGEND_LABEL_FREQUENCY
+    %unset LEGEND_HISTOGRAM_BORDER
+    %unset LEGEND_HISTOGRAM_BORDER_COLOUR
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_COLOUR
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_SIZE 
+    %unset LEGEND_HISTOGRAM_MAX_VALUE      
+    %unset LEGEND_HISTOGRAM_GRID_COLOUR
+    %unset LEGEND_HISTOGRAM_GRID_LINE_STYLE
+    %unset LEGEND_HISTOGRAM_GRID_THICKNESS
+
+%if LEGEND_DISPLAY_TYPE = CONTINUOUS %then
+    %unset LEGEND_HISTOGRAM_BORDER_COLOUR 
+    %unset LEGEND_HISTOGRAM_BORDER 
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_COLOUR
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_SIZE 
+    %unset LEGEND_HISTOGRAM_MAX_VALUE      
+    %unset LEGEND_HISTOGRAM_GRID_COLOUR
+    %unset LEGEND_HISTOGRAM_GRID_LINE_STYLE
+    %unset LEGEND_HISTOGRAM_GRID_THICKNESS
+    
+%if LEGEND_ENTRY_BORDER = OFF %then
+    %unset LEGEND_ENTRY_BORDER_COLOUR
+
+%if LEGEND_HISTOGRAM_BORDER = OFF %then
+    %unset LEGEND_HISTOGRAM_BORDER_COLOUR
+
+%if LEGEND_POSITIONING = AUTOMATIC %or LEGEND_POSITIONING = OUTSIDE %then
+    %unset LEGEND_SUBPAGE_POSITION
+
+%if LEGEND_TEXT_COMPOSITION = AUTOMATIC_TEXT_ONLY %then
+    %unset LEGEND_USER_LINES
+
+%if LEGEND_HISTOGRAM_MEAN_VALUE = OFF %then
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_COLOUR
+    %unset LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_SIZE
+    
diff --git a/share/metview/etc/MSYMBDef b/share/metview/etc/MSYMBDef
new file mode 100644
index 0000000..e217fa8
--- /dev/null
+++ b/share/metview/etc/MSYMBDef
@@ -0,0 +1,346 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+		}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+MSYMB; Magics; Automatically generated
+{
+	LEGEND
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	SYMBOL_TYPE
+	{
+		NUMBER; NUMBER
+		TEXT; TEXT
+		MARKER; MARKER
+	} = NUMBER
+
+	SYMBOL_FORMAT
+	{
+		@
+	} = "(automatic)"
+
+	SYMBOL_TABLE_MODE
+	{
+		OFF; OFF
+		ADVANCED; ADVANCED
+		ON; ON
+	} = OFF
+
+	SYMBOL_MARKER_MODE
+	{
+		BY_INDEX; BY_INDEX
+		BY_NAME; BY_NAME
+	} = BY_INDEX
+
+	SYMBOL_MARKER_INDEX
+	{
+		*
+	} = 1
+
+	SYMBOL_MARKER_NAME
+	{
+		@
+	} = dot
+
+	SYMBOL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	SYMBOL_HEIGHT
+	{
+		*
+	} = 0.2
+
+	SYMBOL_TEXT_LIST
+	{
+		@		
+		/
+	}
+	SYMBOL_TEXT_POSITION
+	{
+		RIGHT; RIGHT
+		LEFT; LEFT
+		BOTTOM; BOTTOM
+		TOP; TOP
+	} = RIGHT
+
+	SYMBOL_TEXT_FONT_NAME
+	{
+		@
+	} = sansserif
+
+	SYMBOL_TEXT_FONT_SIZE
+	{
+		*
+	} = 0.25
+
+	SYMBOL_TEXT_FONT_STYLE
+	{
+		@
+	} = normal
+
+	SYMBOL_TEXT_FONT_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	SYMBOL_ADVANCED_TABLE_SELECTION_TYPE
+	{
+		COUNT; COUNT
+		INTERVAL; INTERVAL
+		LIST; LIST
+	} = COUNT
+
+	SYMBOL_ADVANCED_TABLE_LEVEL_COUNT
+	{
+		*
+	} = 10
+
+	SYMBOL_ADVANCED_TABLE_LEVEL_TOLERANCE
+	{
+		*
+	} = 2
+
+	SYMBOL_ADVANCED_TABLE_INTERVAL
+	{
+		*
+	} = 8.0
+
+	SYMBOL_ADVANCED_TABLE_REFERENCE_LEVEL
+	{
+		*
+	} = 0.0
+
+	SYMBOL_ADVANCED_TABLE_LEVEL_LIST
+	{
+		*		
+		/
+	} 
+	SYMBOL_ADVANCED_TABLE_MIN_VALUE
+	{
+		*
+	} = -1.E21
+
+	SYMBOL_ADVANCED_TABLE_MAX_VALUE
+	{
+		*
+	} = 1.E21
+
+	SYMBOL_ADVANCED_TABLE_COLOUR_METHOD
+	{
+		CALCULATE; CALCULATE
+		LIST; LIST
+	} = CALCULATE
+
+	SYMBOL_ADVANCED_TABLE_MAX_LEVEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	SYMBOL_ADVANCED_TABLE_MIN_LEVEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = RED
+
+	SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION
+	{
+		CLOCKWISE; CLOCKWISE
+		ANTI-CLOCKWISE; ANTI-CLOCKWISE
+	} = ANTI_CLOCKWISE
+
+	SYMBOL_ADVANCED_TABLE_COLOUR_LIST
+	{
+		@		
+		/
+	}
+	SYMBOL_ADVANCED_TABLE_COLOUR_LIST_POLICY
+	{
+		LASTONE; LASTONE
+		CYCLE; CYCLE
+	} = LASTONE
+
+	SYMBOL_ADVANCED_TABLE_MARKER_LIST
+	{
+		*		
+		/
+	} 
+	SYMBOL_ADVANCED_TABLE_MARKER_LIST_POLICY
+	{
+		LASTONE; LASTONE
+		CYCLE; CYCLE
+	} = LASTONE
+
+	SYMBOL_ADVANCED_TABLE_HEIGHT_METHOD
+	{
+		CALCULATE; CALCULATE
+		LIST; LIST
+	} = LIST
+
+	SYMBOL_ADVANCED_TABLE_HEIGHT_MAX_VALUE
+	{
+		*
+	} = 0.2
+
+	SYMBOL_ADVANCED_TABLE_HEIGHT_MIN_VALUE
+	{
+		*
+	} = 0.1
+
+	SYMBOL_ADVANCED_TABLE_HEIGHT_LIST
+	{
+		*		
+		/
+	} 
+	SYMBOL_ADVANCED_TABLE_HEIGHT_LIST_POLICY
+	{
+		LASTONE; LASTONE
+		CYCLE; CYCLE
+	} = LASTONE
+
+	SYMBOL_ADVANCED_TABLE_TEXT_LIST
+	{
+		@		
+		/
+	}
+	SYMBOL_ADVANCED_TABLE_TEXT_LIST_POLICY
+	{
+		LASTONE; LASTONE
+		CYCLE; CYCLE
+	} = CYCLE
+
+	SYMBOL_ADVANCED_TABLE_TEXT_FONT_NAME
+	{
+		@
+	} = sansserif
+
+	SYMBOL_ADVANCED_TABLE_TEXT_FONT_SIZE
+	{
+		*
+	} = 0.25
+
+	SYMBOL_ADVANCED_TABLE_TEXT_FONT_STYLE
+	{
+		@
+	} = normal
+
+	SYMBOL_ADVANCED_TABLE_TEXT_FONT_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	SYMBOL_ADVANCED_TABLE_TEXT_DISPLAY_TYPE
+	{
+		CENTRE; CENTRE
+		NONE; NONE
+		RIGHT; RIGHT
+		LEFT; LEFT
+		TOP; TOP
+		BOTTOM; BOTTOM
+	} = NONE
+
+	SYMBOL_ADVANCED_TABLE_OUTLAYER_METHOD
+	{
+		NONE; NONE
+		SIMPLE; SIMPLE
+	} = NONE
+
+	SYMBOL_MIN_TABLE
+	{
+		*		
+		/
+	} 
+	SYMBOL_MAX_TABLE
+	{
+		*		
+		/
+	} 
+	SYMBOL_MARKER_TABLE
+	{
+		*		
+		/
+	} 
+	SYMBOL_NAME_TABLE
+	{
+		@		
+		/
+	}
+	SYMBOL_COLOUR_TABLE
+	{
+		@		
+		/
+	}
+	SYMBOL_HEIGHT_TABLE
+	{
+		*		
+		/
+	} 
+	SYMBOL_OUTLINE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	SYMBOL_OUTLINE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	SYMBOL_OUTLINE_THICKNESS
+	{
+		*
+	} = 1
+
+	SYMBOL_OUTLINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	SYMBOL_CONNECT_LINE
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	SYMBOL_CONNECT_AUTOMATIC_LINE_COLOUR
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	SYMBOL_CONNECT_LINE_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLACK
+
+	SYMBOL_CONNECT_LINE_THICKNESS
+	{
+		*
+	} = 1
+
+	SYMBOL_CONNECT_LINE_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+}
diff --git a/share/metview/etc/MSYMBRules b/share/metview/etc/MSYMBRules
new file mode 100644
index 0000000..bde823d
--- /dev/null
+++ b/share/metview/etc/MSYMBRules
@@ -0,0 +1,87 @@
+%if SYMBOL_TYPE <> NUMBER %then
+	%unset SYMBOL_FORMAT
+%if SYMBOL_TABLE_MODE <> OFF %then
+	%unset SYMBOL_MARKER_MODE
+	%unset SYMBOL_MARKER_INDEX
+	%unset SYMBOL_MARKER_NAME
+	%unset SYMBOL_COLOUR
+	%unset SYMBOL_HEIGHT
+	%unset SYMBOL_TEXT_LIST
+	%unset SYMBOL_TEXT_POSITION
+	%unset SYMBOL_TEXT_FONT_NAME
+	%unset SYMBOL_TEXT_FONT_SIZE
+	%unset SYMBOL_TEXT_FONT_STYLE
+	%unset SYMBOL_TEXT_FONT_COLOUR
+%if SYMBOL_TABLE_MODE <> ADVANCED %then
+	%unset SYMBOL_ADVANCED_TABLE_SELECTION_TYPE
+	%unset SYMBOL_ADVANCED_TABLE_LEVEL_COUNT
+	%unset SYMBOL_ADVANCED_TABLE_LEVEL_TOLERANCE
+	%unset SYMBOL_ADVANCED_TABLE_INTERVAL
+	%unset SYMBOL_ADVANCED_TABLE_REFERENCE_LEVEL
+	%unset SYMBOL_ADVANCED_TABLE_LEVEL_LIST
+	%unset SYMBOL_ADVANCED_TABLE_MIN_VALUE
+	%unset SYMBOL_ADVANCED_TABLE_MAX_VALUE
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_METHOD
+	%unset SYMBOL_ADVANCED_TABLE_MAX_LEVEL_COLOUR
+	%unset SYMBOL_ADVANCED_TABLE_MIN_LEVEL_COLOUR
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_LIST
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_LIST_POLICY
+	%unset SYMBOL_ADVANCED_TABLE_MARKER_LIST
+	%unset SYMBOL_ADVANCED_TABLE_MARKER_LIST_POLICY
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_METHOD
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_MAX_VALUE
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_MIN_VALUE
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_LIST
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_LIST_POLICY
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_LIST
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_LIST_POLICY
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_FONT_NAME
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_FONT_SIZE
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_FONT_STYLE
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_FONT_COLOUR
+	%unset SYMBOL_ADVANCED_TABLE_TEXT_DISPLAY_TYPE
+	%unset SYMBOL_ADVANCED_TABLE_OUTLAYER_METHOD
+%if SYMBOL_TABLE_MODE <> ON %then
+	%unset SYMBOL_MIN_TABLE
+	%unset SYMBOL_MAX_TABLE
+	%unset SYMBOL_MARKER_TABLE
+	%unset SYMBOL_NAME_TABLE
+	%unset SYMBOL_COLOUR_TABLE
+	%unset SYMBOL_HEIGHT_TABLE
+%if SYMBOL_MARKER_MODE <> BY_INDEX %then
+	%unset SYMBOL_MARKER_INDEX
+%if SYMBOL_MARKER_MODE <> BY_NAME %then
+	%unset SYMBOL_MARKER_NAME
+%if SYMBOL_ADVANCED_TABLE_SELECTION_TYPE <> COUNT %then
+	%unset SYMBOL_ADVANCED_TABLE_LEVEL_COUNT
+	%unset SYMBOL_ADVANCED_TABLE_LEVEL_TOLERANCE
+%if SYMBOL_ADVANCED_TABLE_SELECTION_TYPE <> INTERVAL %then
+	%unset SYMBOL_ADVANCED_TABLE_INTERVAL
+	%unset SYMBOL_ADVANCED_TABLE_REFERENCE_LEVEL
+%if SYMBOL_ADVANCED_TABLE_SELECTION_TYPE <> LIST %then
+	%unset SYMBOL_ADVANCED_TABLE_LEVEL_LIST
+%if SYMBOL_ADVANCED_TABLE_COLOUR_METHOD <> CALCULATE %then
+	%unset SYMBOL_ADVANCED_TABLE_MAX_LEVEL_COLOUR
+	%unset SYMBOL_ADVANCED_TABLE_MIN_LEVEL_COLOUR
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION
+%if SYMBOL_ADVANCED_TABLE_COLOUR_METHOD <> LIST %then
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_LIST
+	%unset SYMBOL_ADVANCED_TABLE_COLOUR_LIST_POLICY
+%if SYMBOL_ADVANCED_TABLE_HEIGHT_METHOD <> CALCULATE %then
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_MAX_VALUE
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_MIN_VALUE
+%if SYMBOL_ADVANCED_TABLE_HEIGHT_METHOD <> LIST %then
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_LIST
+	%unset SYMBOL_ADVANCED_TABLE_HEIGHT_LIST_POLICY
+%if SYMBOL_OUTLINE <> ON %then
+	%unset SYMBOL_OUTLINE_COLOUR
+	%unset SYMBOL_OUTLINE_THICKNESS
+	%unset SYMBOL_OUTLINE_STYLE
+%if SYMBOL_CONNECT_LINE <> ON %then
+	%unset SYMBOL_CONNECT_AUTOMATIC_LINE_COLOUR
+	%unset SYMBOL_CONNECT_LINE_COLOUR
+	%unset SYMBOL_CONNECT_LINE_THICKNESS
+	%unset SYMBOL_CONNECT_LINE_STYLE
+%if SYMBOL_CONNECT_AUTOMATIC_LINE_COLOUR <> ON %then
+	%unset SYMBOL_CONNECT_LINE_COLOUR
diff --git a/share/metview/etc/MTEXTDef b/share/metview/etc/MTEXTDef
new file mode 100755
index 0000000..c6fb8b6
--- /dev/null
+++ b/share/metview/etc/MTEXTDef
@@ -0,0 +1,204 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON
+             OFF ; OFF
+       }
+
+       COLOUR {
+			%include MagicsColors.h
+       }
+
+       LINE_STYLE {
+             SOLID      ; SOLID
+             DOT        ; DOT
+             DASH       ; DASH
+             CHAIN_DOT  ; CHAIN_DOT
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       }
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+
+MTEXT   ; TEXT    ; MAGICS
+{
+	  TEXT_LINE_COUNT
+        {
+                0
+                1
+                2
+                3
+                4
+                5
+                6
+                7
+                8
+                9
+                10
+        } = 1
+        TEXT_LINE_1
+        {
+                @
+        } = "<magics_title/>"
+
+        TEXT_LINE_2
+        {
+                @
+        } = " "
+
+        TEXT_LINE_3
+        {
+                @
+        } = " "
+
+        TEXT_LINE_4
+        {
+                @
+        } = " "
+
+        TEXT_LINE_5
+        {
+                @
+        } = " "
+
+        TEXT_LINE_6
+        {
+                @
+        } = " "
+
+        TEXT_LINE_7
+        {
+                @
+        } = " "
+
+        TEXT_LINE_8
+        {
+                @
+        } = " "
+
+        TEXT_LINE_9
+        {
+                @
+        } = " "
+
+        TEXT_LINE_10
+        {
+                @
+        } = " "
+
+     
+        TEXT_JUSTIFICATION
+        {
+                CENTRE     ; CENTRE
+                LEFT       ; LEFT
+                RIGHT      ; RIGHT
+        } = CENTRE
+
+        
+        TEXT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = NAVY
+        
+        TEXT_FONT
+	{
+		SERIF;SERIF
+		SANSSERIF;SANSSERIF
+	} = SANSSERIF
+	TEXT_FONT_STYLE
+	{
+		NORMAL;NORMAL
+		BOLD;BOLD
+		ITALIC;ITALIC
+		BOLDITALIC;BOLDITALIC
+	} = NORMAL
+      TEXT_FONT_SIZE
+	{
+		*
+	} = 0.3  
+        TEXT_MODE
+        {
+                TITLE      ; TITLE
+                POSITIONAL ; POSITIONAL
+        } = TITLE
+
+        TEXT_BOX_X_POSITION
+        {
+                @
+        } = 2.08
+
+        TEXT_BOX_Y_POSITION
+        {
+                @
+        } = 18.9
+
+        TEXT_BOX_X_LENGTH
+        {
+                @
+        } = 25.245
+
+        TEXT_BOX_Y_LENGTH
+        {
+                @
+        } = 2.1
+
+        TEXT_BOX_BLANKING
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+       
+       TEXT_BORDER
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        TEXT_BORDER_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+        TEXT_BORDER_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        TEXT_BORDER_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+
+   
+       
+}  ! end of MTEXT
diff --git a/share/metview/etc/MTEXTRules b/share/metview/etc/MTEXTRules
new file mode 100644
index 0000000..c6a2f5b
--- /dev/null
+++ b/share/metview/etc/MTEXTRules
@@ -0,0 +1,75 @@
+%if TEXT_MODE = TITLE %then
+	%unset TEXT_BOX_X_POSITION
+	%unset TEXT_BOX_Y_POSITION
+	%unset TEXT_BOX_X_LENGTH
+	%unset TEXT_BOX_Y_LENGTH
+
+%if TEXT_BORDER = OFF %then
+	%unset TEXT_BORDER_COLOUR
+	%unset TEXT_BORDER_THICKNESS
+	%unset TEXT_BORDER_LINE_STYLE
+
+
+%if TEXT_LINE_COUNT = 1 %then
+    %unset TEXT_LINE_2
+    %unset TEXT_LINE_3
+    %unset TEXT_LINE_4
+    %unset TEXT_LINE_5
+    %unset TEXT_LINE_6
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+        
+%if TEXT_LINE_COUNT = 2 %then
+    %unset TEXT_LINE_3
+    %unset TEXT_LINE_4
+    %unset TEXT_LINE_5
+    %unset TEXT_LINE_6
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+
+%if TEXT_LINE_COUNT = 3 %then
+    %unset TEXT_LINE_4
+    %unset TEXT_LINE_5
+    %unset TEXT_LINE_6
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+    
+%if TEXT_LINE_COUNT = 4 %then
+    %unset TEXT_LINE_5
+    %unset TEXT_LINE_6
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+
+%if TEXT_LINE_COUNT = 5 %then
+    %unset TEXT_LINE_6
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+
+%if TEXT_LINE_COUNT = 6 %then
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+
+%if TEXT_LINE_COUNT = 7 %then
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10   
+    
+%if TEXT_LINE_COUNT = 8 %then
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10  
+    
+
+%if TEXT_LINE_COUNT = 9 %then
+    %unset TEXT_LINE_10   
diff --git a/share/metview/etc/MVertProfViewDef b/share/metview/etc/MVertProfViewDef
new file mode 100644
index 0000000..65f7a95
--- /dev/null
+++ b/share/metview/etc/MVertProfViewDef
@@ -0,0 +1,111 @@
+MVERTPROFVIEW; PlotMod Icon; Metview
+{
+    INPUT_MODE
+    {
+        POINT             ; POINT
+        NEAREST_GRIDPOINT ; GPOINT
+        AREA              ; AREA
+        AREA_2            ; AREA2
+    } = POINT
+
+    POINT
+        [
+            help = help_input,
+            help_icon = 'help_point',
+            input_type = point,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 0./0.
+
+    AREA
+        [
+            help = help_input,
+            help_icon = 'help_area',
+            input_type = area,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 30./-30./-30./30.
+
+    BOTTOM_PRESSURE
+    {
+        *
+    } = 1015.0
+
+    TOP_PRESSURE
+    {
+        *
+    } = 10.0
+
+# PRESSURE_LEVEL_AXIS not checked, use PRESSURE_AXIS icon
+    PRESSURE_LEVEL_AXIS [ visible = false ]
+    {
+        LINEAR
+        LOG
+    } = LINEAR
+
+    PRESSURE_AXIS  
+        [ 
+            interface = icon, 
+            class = PAXIS, 
+            missing = ignored,
+            help            = help_data,
+            help_name       = Pressure Axis,
+            help_directory  = '/System/Defaults',
+            help_class      = PAXIS,
+            help_definition = ( PAXIS,AXIS_ORIENTATION=VERTICAL,
+                                AXIS_POSITION = LEFT)
+        ]
+    {
+        @
+        /
+    }
+
+    VALUE_AXIS
+        [
+            interface = icon, class = PAXIS, missing = ignored,
+            help            = help_data,
+            help_name       = Value Axis,
+            help_directory  = '/System/Defaults',
+            help_class      = PAXIS,
+            help_definition = ( PAXIS, AXIS_TICK_LABEL_TYPE = NUMBER )
+        ]
+    {
+        @
+        /
+    }
+
+    MAP_OVERLAY_CONTROL
+    {
+        ALWAYS
+        BY_DATE
+        BY_LEVEL
+        NEVER
+    } = ALWAYS_OVERLAY
+
+    SUBPAGE_X_POSITION
+    {
+        @
+    } = 7.5
+
+    SUBPAGE_Y_POSITION
+    {
+        @
+    } = 8
+
+    SUBPAGE_X_LENGTH
+    {
+        @
+    } = 85
+
+    SUBPAGE_Y_LENGTH
+    {
+        @
+    } = 80
+%include SubpageFrameDef
+}
diff --git a/share/metview/etc/MVertProfViewRules b/share/metview/etc/MVertProfViewRules
new file mode 100644
index 0000000..86db976
--- /dev/null
+++ b/share/metview/etc/MVertProfViewRules
@@ -0,0 +1,7 @@
+%if INPUT_MODE = POINT %then
+	%unset AREA
+
+%if INPUT_MODE = AREA  %then
+	%unset POINT
+
+%include "SubpageFrameRules"
diff --git a/share/metview/etc/MWINDDef b/share/metview/etc/MWINDDef
new file mode 100644
index 0000000..09a2d05
--- /dev/null
+++ b/share/metview/etc/MWINDDef
@@ -0,0 +1,268 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+		}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+MWIND; Magics; Automatically generated
+{
+	WIND_FIELD_TYPE
+	{
+		FLAGS; FLAGS
+		ARROWS; ARROWS
+	} = ARROWS
+
+	LEGEND
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	WIND_LEGEND_TEXT
+	{
+		@
+	} = vector
+
+	WIND_ARROW_LEGEND_TEXT
+	{
+		@
+	} = m/s
+
+	WIND_ADVANCED_METHOD
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	WIND_ADVANCED_COLOUR_SELECTION_TYPE
+	{
+		COUNT; COUNT
+		INTERVAL; INTERVAL
+		LIST; LIST
+	} = COUNT
+
+	WIND_ADVANCED_COLOUR_REFERENCE_LEVEL
+	{
+		*
+	} = 0.0
+
+	WIND_ADVANCED_COLOUR_LEVEL_COUNT
+	{
+		*
+	} = 10
+
+	WIND_ADVANCED_COLOUR_LEVEL_TOLERANCE
+	{
+		*
+	} = 2
+
+	WIND_ADVANCED_COLOUR_LEVEL_INTERVAL
+	{
+		*
+	} = 8.0
+
+	WIND_ADVANCED_COLOUR_LEVEL_LIST
+	{
+		*		
+		/
+	} 
+	WIND_ADVANCED_COLOUR_MAX_VALUE
+	{
+		*
+	} = 1.E21
+
+	WIND_ADVANCED_COLOUR_MIN_VALUE
+	{
+		*
+	} = -1.E21
+
+	WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD
+	{
+		CALCULATE; CALCULATE
+		LIST; LIST
+	} = CALCULATE
+
+	WIND_ADVANCED_COLOUR_MAX_LEVEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	WIND_ADVANCED_COLOUR_MIN_LEVEL_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = RED
+
+	WIND_ADVANCED_COLOUR_DIRECTION
+	{
+		CLOCKWISE; CLOCKWISE
+		ANTI_CLOCKWISE; ANTI_CLOCKWISE
+	} = ANTI_CLOCKWISE
+
+	WIND_ADVANCED_COLOUR_LIST
+	{
+		/
+	}
+	WIND_ADVANCED_COLOUR_LIST_POLICY
+	{
+		LASTONE; LASTONE
+		CYCLE; CYCLE
+	} = LASTONE
+
+	WIND_ADVANCED_COLOUR_PARAMETER
+	{
+		SPEED; SPEED
+		PARAMETER; PARAMETER
+	} = SPEED
+
+	WIND_FLAG_CALM_INDICATOR
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	WIND_FLAG_CALM_INDICATOR_SIZE
+	{
+		*
+	} = 0.3
+
+	WIND_FLAG_CALM_BELOW
+	{
+		*
+	} = 0.5
+
+	WIND_FLAG_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	WIND_FLAG_LENGTH
+	{
+		*
+	} = 1.0
+
+	WIND_FLAG_MAX_SPEED
+	{
+		*
+	} = 1.0E+21
+
+	WIND_FLAG_MIN_SPEED
+	{
+		*
+	} = -1.0E+21
+
+	WIND_FLAG_MODE
+	{
+		@
+	} = normal
+
+	WIND_FLAG_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	WIND_FLAG_ORIGIN_MARKER
+	{
+		DOT; DOT
+		CIRCLE; CIRCLE
+		OFF; OFF
+	} = CIRCLE
+
+	WIND_FLAG_ORIGIN_MARKER_SIZE
+	{
+		*
+	} = 0.3
+
+	WIND_FLAG_THICKNESS
+	{
+		*
+	} = 1
+
+	WIND_ARROW_CALM_INDICATOR
+	{
+		ON; ON
+		OFF; OFF
+	} = OFF
+
+	WIND_ARROW_CALM_INDICATOR_SIZE
+	{
+		*
+	} = 0.3
+
+	WIND_ARROW_CALM_BELOW
+	{
+		*
+	} = 0.5
+
+	WIND_ARROW_COLOUR
+	{
+		&PARAMSHARE&COLOUR
+	} = BLUE
+
+	WIND_ARROW_CROSS_BOUNDARY
+	{
+		ON; ON
+		OFF; OFF
+	} = ON
+
+	WIND_ARROW_HEAD_SHAPE
+	{
+		*
+	} = 0
+
+	WIND_ARROW_HEAD_RATIO
+	{
+		*
+	} = 0.3
+
+	WIND_ARROW_MAX_SPEED
+	{
+		*
+	} = 1.0E+21
+
+	WIND_ARROW_MIN_SPEED
+	{
+		*
+	} = -1.0E+21
+
+	WIND_ARROW_ORIGIN_POSITION
+	{
+		TAIL; TAIL
+		CENTRE; CENTRE
+	} = TAIL
+
+	WIND_ARROW_THICKNESS
+	{
+		*
+	} = 1
+
+	WIND_ARROW_STYLE
+	{
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DASH; CHAIN_DASH
+		CHAIN_DOT; CHAIN_DOT
+	} = SOLID
+
+	WIND_ARROW_UNIT_VELOCITY
+	{
+		*
+	} = 25.0
+
+	WIND_THINNING_FACTOR
+	{
+		*
+	} = 2.0
+
+}
diff --git a/share/metview/etc/MWINDRules b/share/metview/etc/MWINDRules
new file mode 100644
index 0000000..3d4c5b0
--- /dev/null
+++ b/share/metview/etc/MWINDRules
@@ -0,0 +1,153 @@
+%if LEGEND <> ON  
+		%and  LEGEND <> ON %then 
+	%unset WIND_LEGEND_TEXT
+
+%if WIND_ADVANCED_COLOUR_SELECTION_TYPE <> COUNT  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> COUNT %then 
+	%unset WIND_ADVANCED_COLOUR_LEVEL_TOLERANCE
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_HEAD_SHAPE
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_LENGTH
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_CROSS_BOUNDARY
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_THICKNESS
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_CALM_INDICATOR
+
+%if WIND_ADVANCED_METHOD <> ON  
+		%and  WIND_ADVANCED_METHOD <> ON %then 
+	%unset WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD
+
+%if WIND_ADVANCED_METHOD <> ON  
+		%and  WIND_ADVANCED_METHOD <> ON %then 
+	%unset WIND_ADVANCED_COLOUR_SELECTION_TYPE
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_UNIT_VELOCITY
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_MIN_SPEED
+
+%if WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> LIST  
+		%and  WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> LIST %then 
+	%unset WIND_ADVANCED_COLOUR_LIST_POLICY
+
+%if WIND_ADVANCED_COLOUR_SELECTION_TYPE <> LIST  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> LIST %then 
+	%unset WIND_ADVANCED_COLOUR_LEVEL_LIST
+
+%if WIND_ADVANCED_METHOD <> ON  
+		%and  WIND_ADVANCED_METHOD <> ON %then 
+	%unset WIND_ADVANCED_COLOUR_MAX_VALUE
+
+%if WIND_ADVANCED_COLOUR_SELECTION_TYPE <> COUNT  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> INTERVAL  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> COUNT  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> INTERVAL %then 
+	%unset WIND_ADVANCED_COLOUR_REFERENCE_LEVEL
+
+%if WIND_FLAG_CALM_INDICATOR <> ON %then 
+	%unset WIND_FLAG_CALM_INDICATOR_SIZE
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_MAX_SPEED
+
+%if WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> CALCULATE  
+		%and  WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> CALCULATE %then 
+	%unset WIND_ADVANCED_COLOUR_MAX_LEVEL_COLOUR
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_CALM_INDICATOR
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_ORIGIN_MARKER
+
+%if WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> LIST  
+		%and  WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> LIST %then 
+	%unset WIND_ADVANCED_COLOUR_LIST
+
+%if WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> CALCULATE  
+		%and  WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> CALCULATE %then 
+	%unset WIND_ADVANCED_COLOUR_DIRECTION
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_COLOUR
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_HEAD_RATIO
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_MODE
+
+%if WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> CALCULATE  
+		%and  WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD <> CALCULATE %then 
+	%unset WIND_ADVANCED_COLOUR_MIN_LEVEL_COLOUR
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_MAX_SPEED
+
+%if WIND_FIELD_TYPE <> FLAGS  
+		%and  WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ADVANCED_COLOUR_PARAMETER
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_MIN_SPEED
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_STYLE
+
+%if WIND_FIELD_TYPE <> FLAGS  
+		%and  WIND_FIELD_TYPE <> ARROWS %then 
+	%unset LEGEND
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_COLOUR
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_CALM_BELOW
+
+%if LEGEND <> ON  
+		%and  LEGEND <> ON %then 
+	%unset WIND_ARROW_LEGEND_TEXT
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_CALM_INDICATOR_SIZE
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_ORIGIN_MARKER_SIZE
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_STYLE
+
+%if WIND_ADVANCED_METHOD <> ON  
+		%and  WIND_ADVANCED_METHOD <> ON %then 
+	%unset WIND_ADVANCED_COLOUR_MIN_VALUE
+
+%if WIND_FLAG_CALM_INDICATOR <> ON %then 
+	%unset WIND_FLAG_CALM_BELOW
+
+%if WIND_ADVANCED_COLOUR_SELECTION_TYPE <> INTERVAL  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> INTERVAL %then 
+	%unset WIND_ADVANCED_COLOUR_LEVEL_INTERVAL
+
+%if WIND_FIELD_TYPE <> FLAGS %then 
+	%unset WIND_FLAG_THICKNESS
+
+%if WIND_ADVANCED_COLOUR_SELECTION_TYPE <> COUNT  
+		%and  WIND_ADVANCED_COLOUR_SELECTION_TYPE <> COUNT %then 
+	%unset WIND_ADVANCED_COLOUR_LEVEL_COUNT
+
+%if WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ARROW_ORIGIN_POSITION
+
+%if WIND_FIELD_TYPE <> FLAGS  
+		%and  WIND_FIELD_TYPE <> ARROWS %then 
+	%unset WIND_ADVANCED_METHOD
+
diff --git a/share/metview/etc/MXSectViewDef b/share/metview/etc/MXSectViewDef
new file mode 100644
index 0000000..9e4d335
--- /dev/null
+++ b/share/metview/etc/MXSectViewDef
@@ -0,0 +1,109 @@
+MXSECTVIEW; uPlot Icon; Metview
+{
+	LINE
+	[
+		help = help_input,
+		help_icon = 'help_line',
+		input_type = line,
+		input_window = '/System/Defaults/Input Window'
+	]
+	{
+		*
+		/
+	} = 0./-180./0./180.
+
+    BOTTOM_PRESSURE
+    {
+        * 
+    } = 1015.0
+
+    TOP_PRESSURE
+    {
+        *
+    } = 10.0
+                                
+	WIND_PARALLEL
+	{
+		ON
+		OFF
+	} = ON
+
+	WIND_PERPENDICULAR
+	{
+		ON
+		OFF
+	} = OFF
+
+	WIND_INTENSITY
+	{
+		ON
+		OFF
+	} = OFF
+
+	WIND_HORIZONTAL_COMPONENT
+	[ visible = false ]
+	{
+		PERPENDICULAR   ; PER
+		PARALLEL        ; PAR
+		INTENSITY       ; INT
+	} = PAR
+
+	PRESSURE_LEVEL_AXIS
+	{
+		LINEAR
+		LOG
+	} = LINEAR
+
+    MAP_PROJECTION  [ visible = false ]
+    {
+        cartesian
+    } = cartesian
+
+    HORIZONTAL_AXIS [interface       = icon,
+                     class           = MAXIS,
+                     missing         = ignored,
+                     help            = help_data,
+                     help_name       = Horizontal Axis,
+                     help_directory  = '/System/Defaults',
+                     help_class      = MAXIS,
+                     help_definition = ( MAXIS, AXIS_ORIENTATION ='HORIZONTAL' )
+                    ]
+    {
+        @
+    }
+
+    VERTICAL_AXIS [interface = icon, 
+                   class           = MAXIS,
+                   missing         = ignored,
+                   help            = help_data,
+                   help_name       = Vertical Axis,
+                   help_directory  = '/System/Defaults',
+                   help_class      = MAXIS,
+                   help_definition = ( MAXIS, AXIS_ORIENTATION ='VERTICAL' )
+                  ]
+    {
+        @
+    }
+
+	SUBPAGE_X_POSITION
+	{
+		@
+	} = 7.5
+
+	SUBPAGE_Y_POSITION
+	{
+		@
+	} = 8
+
+	SUBPAGE_X_LENGTH
+	{
+		@
+	} = 85
+
+	SUBPAGE_Y_LENGTH
+	{
+		@
+	} = 80
+
+%include SubpageFrameDef
+}
diff --git a/share/metview/etc/MXSectViewRules b/share/metview/etc/MXSectViewRules
new file mode 100644
index 0000000..d4d6569
--- /dev/null
+++ b/share/metview/etc/MXSectViewRules
@@ -0,0 +1 @@
+%include "SubpageFrameRules"
diff --git a/share/metview/etc/MacroDef b/share/metview/etc/MacroDef
new file mode 100644
index 0000000..dad3d83
--- /dev/null
+++ b/share/metview/etc/MacroDef
@@ -0,0 +1,14 @@
+
+MACRO ;macro ; metview
+{
+	PATH {
+		@
+	} 
+}
+
+WMACRO ;macro ; metview
+{
+	PATH {
+		@
+	} 
+}
diff --git a/share/metview/etc/MacroParamDef b/share/metview/etc/MacroParamDef
new file mode 100644
index 0000000..18c16d8
--- /dev/null
+++ b/share/metview/etc/MacroParamDef
@@ -0,0 +1,8 @@
+
+MACROPARAM; metview; metview
+{
+	MACRO 
+		[ interface = icon, class = MACRO, exclusive = true, 
+		help = help_data, help_class = MACRO, help_name = Macro]
+	{ @ }
+}
diff --git a/share/metview/etc/MacroParamRules b/share/metview/etc/MacroParamRules
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/etc/MacroRules b/share/metview/etc/MacroRules
new file mode 100644
index 0000000..f40e3d7
--- /dev/null
+++ b/share/metview/etc/MacroRules
@@ -0,0 +1,9 @@
+%if %not _SERVICE %then 
+	%set _SERVICE = 'macro'
+
+%if PRETTY_PRINTING = OFF %then
+	%unset ORIENTATION
+	%unset COLUMNS
+	%unset MARGIN
+	%unset FONT_SIZE
+	%unset TAB_SIZE
diff --git a/share/metview/etc/MagicsColors.h b/share/metview/etc/MagicsColors.h
new file mode 100644
index 0000000..56dff68
--- /dev/null
+++ b/share/metview/etc/MagicsColors.h
@@ -0,0 +1,64 @@
+# Definition of magics colors
+# To be included in definition files
+# To sort this file, use: sort -t: +1nr +2nr +3nr
+# After the comment, we have the #rgb:h:s:l values of the color
+
+BACKGROUND           ; BACKGROUND           #000000000000: -1:  0:  0
+BLACK                ; BLACK                #000000000000: -1:  0:  0
+CHARCOAL             ; CHARCOAL             #333333333333: -1:  0: 20
+GREY                 ; GREY                 #b332b332b332: -1:  0: 70
+WHITE                ; WHITE                #ffffffffffff: -1:  0:100
+PINK                 ; PINK                 #e6655c28695e:354: 72: 63
+PURPLISH_RED         ; PURPLISH_RED         #ffff000045e3:343:100: 50
+BURGUNDY             ; BURGUNDY             #7fff00002c35:339:100: 25
+ROSE                 ; ROSE                 #cccc3d706ef9:339: 58: 52
+PURPLE_RED           ; PURPLE_RED           #ffff00007fff:330:100: 50
+REDDISH_PURPLE       ; REDDISH_PURPLE       #ffff0000da84:308:100: 50
+MAGENTA              ; MAGENTA              #ffff0000ffff:300:100: 50
+PURPLE               ; PURPLE               #ffff0000ffff:300:100: 50
+BLUISH_PURPLE        ; BLUISH_PURPLE        #da840000ffff:291:100: 50
+VIOLET               ; VIOLET               #7b7711ebb332:279: 81: 38
+BLUE_PURPLE          ; BLUE_PURPLE          #7fff0000ffff:270:100: 50
+LAVENDER             ; LAVENDER             #9df36830f0a2:263: 81: 67
+PURPLISH_BLUE        ; PURPLISH_BLUE        #257a0000ffff:248:100: 50
+BLUE                 ; BLUE                 #00000000ffff:240:100: 50
+NAVY                 ; NAVY                 #000000006666:240:100: 20
+SKY                  ; SKY                  #7332a3d6ffff:219:100: 72
+GREENISH_BLUE        ; GREENISH_BLUE        #00007fffffff:210:100: 50
+BLUE_GREEN           ; BLUE_GREEN           #0000ffffffff:180:100: 50
+CYAN                 ; CYAN                 #0000ffffffff:180:100: 50
+TURQUOISE            ; TURQUOISE            #1c70b8baa679:172: 73: 41
+EVERGREEN            ; EVERGREEN            #000073324b64:159:100: 22
+BLUISH_GREEN         ; BLUISH_GREEN         #0000ffff7fff:150:100: 50
+KELLY_GREEN          ; KELLY_GREEN          #00008ccc30a3:140:100: 27
+GREEN                ; GREEN                #0000ffff0000:120:100: 50
+YELLOWISH_GREEN      ; YELLOWISH_GREEN      #257affff0000:111:100: 50
+YELLOW_GREEN         ; YELLOW_GREEN         #7fffffff0000: 90:100: 50
+AVOCADO              ; AVOCADO              #6c28a66531eb: 90: 53: 42
+OLIVE                ; OLIVE                #4d1b60610000: 72:100: 18
+GREENISH_YELLOW      ; GREENISH_YELLOW      #da84ffff0000: 68:100: 50
+YELLOW               ; YELLOW               #ffffffff0000: 60:100: 50
+ORANGISH_YELLOW      ; ORANGISH_YELLOW      #fffff63e0000: 57:100: 50
+ORANGE_YELLOW        ; ORANGE_YELLOW        #ffffda840000: 51:100: 50
+GOLD                 ; GOLD                 #bfff93391333: 44: 81: 41
+YELLOWISH_ORANGE     ; YELLOWISH_ORANGE     #ffffb0f80000: 41:100: 50
+CREAM                ; CREAM                #ffffe2d0ab84: 39:100: 83
+MUSTARD              ; MUSTARD              #999964870000: 39:100: 30
+BEIGE                ; BEIGE                #d998b7c177ad: 39: 56: 65
+KHAKI                ; KHAKI                #947a7ad34a3d: 39: 33: 43
+TAN                  ; TAN                  #666654b53333: 39: 33: 30
+OCHRE                ; OCHRE                #ae1373391168: 37: 81: 37
+ORANGE               ; ORANGE               #ffff7fff0000: 30:100: 50
+TANGERINE            ; TANGERINE            #e0dd6c2f0000: 28:100: 43
+REDDISH_ORANGE       ; REDDISH_ORANGE       #ffff4f060000: 18:100: 50
+RUST                 ; RUST                 #b33233740000: 17:100: 35
+PEACH                ; PEACH                #f0a2795160f8: 10: 82: 65
+BROWN                ; BROWN                #686510750000:  9:100: 20
+RED_ORANGE           ; RED_ORANGE           #ffff257a0000:  8:100: 50
+BRICK                ; BRICK                #9999159b07ae:  5: 90: 31
+CORAL                ; CORAL                #e6654a1c3999:  5: 77: 56
+ORANGISH_RED         ; ORANGISH_RED         #ffff09c00000:  2:100: 50
+CHESTNUT             ; CHESTNUT             #51eb02dd0000:  2:100: 16
+RED                  ; RED                  #ffff00000000:  0:100: 50
+# This entry is for RGB and HSL
+@ 
diff --git a/share/metview/etc/Makefile.am b/share/metview/etc/Makefile.am
new file mode 100644
index 0000000..f88ac67
--- /dev/null
+++ b/share/metview/etc/Makefile.am
@@ -0,0 +1,346 @@
+
+SUBDIRS = ifsdata
+
+sharedir		= $(datadir)/metview/etc
+share_DATA		= \
+	AuxPrepBufrTable_B.txt \
+	AuxPrepBufrTable_D.txt \
+	AxisDef \
+	AxisRules \
+	BinningObjectDef \
+	BinningObjectRules \
+	CartesianViewDef \
+	CartesianViewRules\
+	CleanFileDef \
+	Coastlines \
+	CoastDef \
+	CoastRules \
+	CommonMapViewDef.h \
+	CommonMapViewRules.h \
+	ConfigDef \
+	ConfigRules \
+	ContDef \
+	ContRules \
+	DatacoverageDef \
+	DatacoverageRules \
+	DeviceDriverDef \
+	DeviceDriverRules \
+	DivrotDef \
+	DivrotRules \
+	DrawingPriorityDef \
+	DrawingPriorityRules \
+	EcfsDef \
+	EPSOutputDef \
+	GenAppDef \
+	GenAppRules \
+	GeoToGribDef \
+        GeoViewDef GeoViewRules \
+	GraphDef \
+	GraphRules \
+	GribToGeoDef \
+	Input_Window \
+	KMLOutputDef \
+	MARS_none \
+	MARS_local \
+	MARS_remote \
+        MAverageViewDef MAverageViewRules \
+	MAXISDef MAXISRules \
+	MCOASTDef MCOASTRules \
+	MCONTDef MCONTRules \
+	MGRAPHDef MGRAPHRules \
+	MLEGENDDef MLEGENDRules \
+	MSYMBDef MSYMBRules \
+        MTEXTDef MTEXTRules \
+        MVertProfViewDef MVertProfViewRules \
+        MXSectViewDef MXSectViewRules \
+	MWINDDef MWINDRules \
+	MacroDef \
+	MacroParamDef \
+	MacroParamRules \
+	MacroRules \
+	MagicsColors.h \
+	MapViewDef \
+	MapViewRules \
+	MarsDef \
+	MarsRules \
+	MarsG2Def \
+	MarsG2Rules \
+	MarsTiggeDef \
+	MarsTiggeRules \
+	ObjectList \
+	ObjectList.forTesting \
+	ObsDef \
+	ObsRules \
+	ObsFilterDef \
+	ObsFilterRules \
+	OverlayControl \
+	OverlayControlDef \
+	OverlayControlRules \
+	PDFOutputDef \
+	PercentileDef \
+	PercentileRules \
+	PlotPageDef \
+	PlotPageRules \
+	PlotSubPageDef \
+	PlotSubPageRules \
+	PlotSuperPageDef \
+	PlotSuperPageRules \
+	Plot_Window_for_Image \
+	PNGOutputDef \
+	PottFDef \
+	PottFRules \
+	PSOutputDef \
+	Services \
+	SimpleFormulaDef \
+	SimpleFormulaRules \
+	StationDef \
+	StationRules \
+	SubpageFrameDef \
+	SubpageFrameRules \
+	SVGOutputDef \
+	SymbDef SymbRules \
+	TableCommonDef TableReaderDef TableReaderRules \
+	TextDef TextRules \
+	VelstrDef VelstrRules \
+	VoidDef \
+	WidgetDef \
+	WindDef \
+	WindRules \
+	dwd.def \
+	ecmwf.def \
+	italy.def \
+	mars.chk \
+	oldrd.chk \
+	obsgroups.def \
+	rt_by_obsgroup.chk \
+	reportypes.def \
+	tigge.def \
+	macro_built_in_functions.txt \
+	macro_deprecated_functions.txt \
+	macro_templates.txt \
+	uPlotTable \
+	macro_icon_function_help.xml \
+	licence_for_about_box.txt \
+	licence_for_macros.txt
+
+
+if METVIEW_MARS_ODB
+share_DATA += MarsOdbDef MarsOdbRules
+endif  
+
+
+#
+MarsG2Def: tigge.def
+	cat tigge.def | sed 's/RETRIEVE[^D]/RETRIEVE_G2 /g' | sed 's/READ /READ_G2 /g' > $@
+
+MarsG2Rules: mars.chk
+	cat mars.chk | sed 's/RETRIEVE/RETRIEVE_G2/g' | sed 's/READ/READ_G2/g' > $@
+
+MarsTiggeDef: tigge.def
+	cat tigge.def | sed 's/RETRIEVE[^D]/RETRIEVE_TIGGE /g' | sed 's/READ /READ_TIGGE /g' > $@
+
+MarsTiggeRules: mars.chk
+	cat mars.chk | sed 's/RETRIEVE/RETRIEVE_TIGGE/g' | sed 's/READ/READ_TIGGE/g' > $@
+
+if METVIEW_MARS_ODB
+
+MarsOdbDef: ecmwf.def 
+	cat ecmwf.def | sed 's/RETRIEVE[^D]/RETRIEVE_ODB /g' | sed 's/READ /READ_ODB /g' > $@
+
+MarsOdbRules: mars.chk 
+	cat mars.chk | sed 's/RETRIEVE/RETRIEVE_ODB/g' | sed 's/READ/READ_ODB/g' > $@
+
+endif
+
+
+
+
+macro_built_in_functions.txt:
+	touch -d 20050101 $@
+
+
+# the ObjectSpec files are copied from the invididual module directories, so
+# we can delete them here (and should do, so that old ones do not accumulate)
+clean-local:
+	rm -f ObjectSpec.*
+	rm -f ObjectListAll
+
+
+# concatenate all object spec files into one
+# remove all comments
+# add "cat <<@ " as the first line, and "@" as the last
+# we don't currently need to cater for ObjectList.forTesting, as
+# this is currently empty.
+# We use a 'dummy' dependency to ensure that ObjectListAll is
+# always rebuilt when we 'make' in this directory. 
+
+ObjectListAll: remove_objectlist
+	rm -f ObjectListAll.temp
+	touch ObjectListAll.temp
+	cat $(MARS_ACCESS) > ObjectListAll.temp
+	echo "cat <<@ "   >> ObjectListAll.temp
+	cat Services ObjectList uPlotTable >> ObjectListAll.temp
+	echo " " > ObjectSpec.dummy
+	cat ObjectSpec.*  >> ObjectListAll.temp
+	echo "@"          >> ObjectListAll.temp
+	grep -v '^#' ObjectListAll.temp > ObjectListAll  # remove comments
+	rm -f ObjectListAll.temp ObjectSpec.dummy
+	rm -f remove_objectlist
+
+remove_objectlist:
+	touch remove_objectlist
+
+nodist_share_DATA = ObjectListAll
+
+
+
+
+
+#######################################################################################
+#share_DATA		= \
+#	AnnotationDef \
+#	AnnotationRules \
+#	ArticleDef \
+#	BudgetDef \
+#	BudgetRules \
+#	ColourDef \
+#	ColourRules \
+#	CurveDef \
+#	CurveViewDef \
+#	CurveViewRules \
+#	DataBases \
+#	DefaultAxis \
+#	DefaultCoast \
+#	DefaultMatching \
+#	DemoFortDef \
+#	DevObjectList \
+#	DeviceDef \
+#	DeviceRules \
+#	DeviceDriverDef \
+#	DeviceDriverRules \
+#	EditMapDef \
+#	EditMapRules \
+#	EmptyViewDef \
+#	EmptyViewRules \
+#	Family1Def \
+#	Family1Rules \
+#	GeoPointsDef \
+#	GeoPointsRules \
+#	GeoToMatrixDef \
+#	GeoToolsDef \
+#	GeoToolsRules \
+#	GraphObjectsDef \
+#	HovmoellerViewDef \
+#	HovmoellerViewRules \
+#	HovmoellerDataDef \
+#	HovmoellerDataRules \
+#	ImageDef \
+#	ImageRules \
+#	ImportDef \
+#	ImportRules \
+#	ImportViewRules \
+#	ImportViewDef \
+#	LayoutDef \
+#	LayoutRules \
+#	LegendEntryDef \
+#	LegendEntryRules \
+#	MacroPref \
+#	MapDefinitionDef \
+#	MapDefinitionRules \
+#	MarsUIRules \
+#	MatchingInfoDef \
+#	MatchingInfoRules \
+#	MatrixDef \
+#	MatrixRules \
+#	Metgram0Def \
+#	Metgram0Rules \
+#	MetgramCoachDef \
+#	MetgramCoachRules \
+#	MetgramData \
+#	MetgramDef \
+#	MetgramManagerDef \
+#	MetgramManagerRules \
+#	MetgramPref \
+#	MetgramRules \
+#	MetgramUIRules \
+#	MetgramDescDef \
+#	MetPlusDef \
+#	MetPlusRules \
+#	MultiDef \
+#	NeuronsDef \
+#	NeuronsRules \
+#	ODB.sql \
+#	PM_AverageDef \
+#	PM_AverageUIRules \
+#	PM_ImageDef \
+#	PM_ImageRules \
+#	PM_VprofDef \
+#	PM_VprofUIRules \
+#	PM_XsectionDef \
+#	PM_XsectionUIRules \
+#	PageDef \
+#	PageRules \
+#	PhysicalUIRules \
+#	PlotModPrinterList \
+#	PlotModUserInterface \
+#	PlotWindowDef \
+#	PlotWindowRules \
+#	PostcriptDef \
+#	PrintMenuDef \
+#	PrintMenuRules \
+#	PrinterList \
+#	PTephiDef \
+#	RelHum2Def \
+#	RelHum2Rules \
+#	SampleDef \
+#	SampleUIRules \
+#	SatelliteViewDef \
+#	SatelliteViewRules \
+#	SatMonPlotDef \
+#	SatMonPlotRules \
+#	ScoreRules \
+#	ScoresDef \
+#	ScoresRules \
+#	SelectionArea \
+#	SerieDef \
+#	SerieRules \
+#	SeriesDef \
+#	SeriesRules \
+#	SpectraDef \
+#	SpectraRules \
+#	SubpageDef \
+#	SubpageDetailsDef \
+#	SubpageDetailsRules \
+#	SuperPageDef \
+#	SuperPageRules \
+#	TephigramDataDef \
+#	TephigramDataRules \
+#	TephigramViewDef \
+#	TephigramViewRules \
+#	TextViewDef \
+#	TextViewRules \
+#	TimerDef \
+#	TimerRules \
+#	TimeSeriesDescDef \
+#	TotRainDef \
+#	TotRainRules \
+#	VectorsDef \
+#	VectorsRules \
+#	VelstrDef \
+#	VelstrRules \
+#	Vis5DDef \
+#	Vis5DRules \
+#	VisdefUIRules \
+#	VoidDef \
+#	WebClientDef \
+#	WebClientRules \
+#	XSectDef \
+#	XSectRules \
+#	XSectDescDef \
+#	XSectMetadataDef \
+#	macro_calltips_builtin.txt \
+#	macro_list_builtin.txt \
+#	macro_templates_default.txt \
+#	ms_mars.cfg
+
+EXTRA_DIST = $(share_DATA)
diff --git a/share/metview/etc/Makefile.in b/share/metview/etc/Makefile.in
new file mode 100644
index 0000000..a334617
--- /dev/null
+++ b/share/metview/etc/Makefile.in
@@ -0,0 +1,954 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ at METVIEW_MARS_ODB_TRUE@am__append_1 = MarsOdbDef MarsOdbRules
+subdir = share/metview/etc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(sharedir)" "$(DESTDIR)$(sharedir)"
+DATA = $(nodist_share_DATA) $(share_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = ifsdata
+sharedir = $(datadir)/metview/etc
+share_DATA = AuxPrepBufrTable_B.txt AuxPrepBufrTable_D.txt AxisDef \
+	AxisRules BinningObjectDef BinningObjectRules CartesianViewDef \
+	CartesianViewRules CleanFileDef Coastlines CoastDef CoastRules \
+	CommonMapViewDef.h CommonMapViewRules.h ConfigDef ConfigRules \
+	ContDef ContRules DatacoverageDef DatacoverageRules \
+	DeviceDriverDef DeviceDriverRules DivrotDef DivrotRules \
+	DrawingPriorityDef DrawingPriorityRules EcfsDef EPSOutputDef \
+	GenAppDef GenAppRules GeoToGribDef GeoViewDef GeoViewRules \
+	GraphDef GraphRules GribToGeoDef Input_Window KMLOutputDef \
+	MARS_none MARS_local MARS_remote MAverageViewDef \
+	MAverageViewRules MAXISDef MAXISRules MCOASTDef MCOASTRules \
+	MCONTDef MCONTRules MGRAPHDef MGRAPHRules MLEGENDDef \
+	MLEGENDRules MSYMBDef MSYMBRules MTEXTDef MTEXTRules \
+	MVertProfViewDef MVertProfViewRules MXSectViewDef \
+	MXSectViewRules MWINDDef MWINDRules MacroDef MacroParamDef \
+	MacroParamRules MacroRules MagicsColors.h MapViewDef \
+	MapViewRules MarsDef MarsRules MarsG2Def MarsG2Rules \
+	MarsTiggeDef MarsTiggeRules ObjectList ObjectList.forTesting \
+	ObsDef ObsRules ObsFilterDef ObsFilterRules OverlayControl \
+	OverlayControlDef OverlayControlRules PDFOutputDef \
+	PercentileDef PercentileRules PlotPageDef PlotPageRules \
+	PlotSubPageDef PlotSubPageRules PlotSuperPageDef \
+	PlotSuperPageRules Plot_Window_for_Image PNGOutputDef PottFDef \
+	PottFRules PSOutputDef Services SimpleFormulaDef \
+	SimpleFormulaRules StationDef StationRules SubpageFrameDef \
+	SubpageFrameRules SVGOutputDef SymbDef SymbRules \
+	TableCommonDef TableReaderDef TableReaderRules TextDef \
+	TextRules VelstrDef VelstrRules VoidDef WidgetDef WindDef \
+	WindRules dwd.def ecmwf.def italy.def mars.chk oldrd.chk \
+	obsgroups.def rt_by_obsgroup.chk reportypes.def tigge.def \
+	macro_built_in_functions.txt macro_deprecated_functions.txt \
+	macro_templates.txt uPlotTable macro_icon_function_help.xml \
+	licence_for_about_box.txt licence_for_macros.txt \
+	$(am__append_1)
+nodist_share_DATA = ObjectListAll
+
+#######################################################################################
+#share_DATA		= \
+#	AnnotationDef \
+#	AnnotationRules \
+#	ArticleDef \
+#	BudgetDef \
+#	BudgetRules \
+#	ColourDef \
+#	ColourRules \
+#	CurveDef \
+#	CurveViewDef \
+#	CurveViewRules \
+#	DataBases \
+#	DefaultAxis \
+#	DefaultCoast \
+#	DefaultMatching \
+#	DemoFortDef \
+#	DevObjectList \
+#	DeviceDef \
+#	DeviceRules \
+#	DeviceDriverDef \
+#	DeviceDriverRules \
+#	EditMapDef \
+#	EditMapRules \
+#	EmptyViewDef \
+#	EmptyViewRules \
+#	Family1Def \
+#	Family1Rules \
+#	GeoPointsDef \
+#	GeoPointsRules \
+#	GeoToMatrixDef \
+#	GeoToolsDef \
+#	GeoToolsRules \
+#	GraphObjectsDef \
+#	HovmoellerViewDef \
+#	HovmoellerViewRules \
+#	HovmoellerDataDef \
+#	HovmoellerDataRules \
+#	ImageDef \
+#	ImageRules \
+#	ImportDef \
+#	ImportRules \
+#	ImportViewRules \
+#	ImportViewDef \
+#	LayoutDef \
+#	LayoutRules \
+#	LegendEntryDef \
+#	LegendEntryRules \
+#	MacroPref \
+#	MapDefinitionDef \
+#	MapDefinitionRules \
+#	MarsUIRules \
+#	MatchingInfoDef \
+#	MatchingInfoRules \
+#	MatrixDef \
+#	MatrixRules \
+#	Metgram0Def \
+#	Metgram0Rules \
+#	MetgramCoachDef \
+#	MetgramCoachRules \
+#	MetgramData \
+#	MetgramDef \
+#	MetgramManagerDef \
+#	MetgramManagerRules \
+#	MetgramPref \
+#	MetgramRules \
+#	MetgramUIRules \
+#	MetgramDescDef \
+#	MetPlusDef \
+#	MetPlusRules \
+#	MultiDef \
+#	NeuronsDef \
+#	NeuronsRules \
+#	ODB.sql \
+#	PM_AverageDef \
+#	PM_AverageUIRules \
+#	PM_ImageDef \
+#	PM_ImageRules \
+#	PM_VprofDef \
+#	PM_VprofUIRules \
+#	PM_XsectionDef \
+#	PM_XsectionUIRules \
+#	PageDef \
+#	PageRules \
+#	PhysicalUIRules \
+#	PlotModPrinterList \
+#	PlotModUserInterface \
+#	PlotWindowDef \
+#	PlotWindowRules \
+#	PostcriptDef \
+#	PrintMenuDef \
+#	PrintMenuRules \
+#	PrinterList \
+#	PTephiDef \
+#	RelHum2Def \
+#	RelHum2Rules \
+#	SampleDef \
+#	SampleUIRules \
+#	SatelliteViewDef \
+#	SatelliteViewRules \
+#	SatMonPlotDef \
+#	SatMonPlotRules \
+#	ScoreRules \
+#	ScoresDef \
+#	ScoresRules \
+#	SelectionArea \
+#	SerieDef \
+#	SerieRules \
+#	SeriesDef \
+#	SeriesRules \
+#	SpectraDef \
+#	SpectraRules \
+#	SubpageDef \
+#	SubpageDetailsDef \
+#	SubpageDetailsRules \
+#	SuperPageDef \
+#	SuperPageRules \
+#	TephigramDataDef \
+#	TephigramDataRules \
+#	TephigramViewDef \
+#	TephigramViewRules \
+#	TextViewDef \
+#	TextViewRules \
+#	TimerDef \
+#	TimerRules \
+#	TimeSeriesDescDef \
+#	TotRainDef \
+#	TotRainRules \
+#	VectorsDef \
+#	VectorsRules \
+#	VelstrDef \
+#	VelstrRules \
+#	Vis5DDef \
+#	Vis5DRules \
+#	VisdefUIRules \
+#	VoidDef \
+#	WebClientDef \
+#	WebClientRules \
+#	XSectDef \
+#	XSectRules \
+#	XSectDescDef \
+#	XSectMetadataDef \
+#	macro_calltips_builtin.txt \
+#	macro_list_builtin.txt \
+#	macro_templates_default.txt \
+#	ms_mars.cfg
+EXTRA_DIST = $(share_DATA)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu share/metview/etc/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu share/metview/etc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-nodist_shareDATA: $(nodist_share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(nodist_share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-nodist_shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(sharedir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-nodist_shareDATA install-shareDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-nodist_shareDATA uninstall-shareDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	clean-local ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-nodist_shareDATA \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-nodist_shareDATA \
+	uninstall-shareDATA
+
+
+#
+MarsG2Def: tigge.def
+	cat tigge.def | sed 's/RETRIEVE[^D]/RETRIEVE_G2 /g' | sed 's/READ /READ_G2 /g' > $@
+
+MarsG2Rules: mars.chk
+	cat mars.chk | sed 's/RETRIEVE/RETRIEVE_G2/g' | sed 's/READ/READ_G2/g' > $@
+
+MarsTiggeDef: tigge.def
+	cat tigge.def | sed 's/RETRIEVE[^D]/RETRIEVE_TIGGE /g' | sed 's/READ /READ_TIGGE /g' > $@
+
+MarsTiggeRules: mars.chk
+	cat mars.chk | sed 's/RETRIEVE/RETRIEVE_TIGGE/g' | sed 's/READ/READ_TIGGE/g' > $@
+
+ at METVIEW_MARS_ODB_TRUE@MarsOdbDef: ecmwf.def 
+ at METVIEW_MARS_ODB_TRUE@	cat ecmwf.def | sed 's/RETRIEVE[^D]/RETRIEVE_ODB /g' | sed 's/READ /READ_ODB /g' > $@
+
+ at METVIEW_MARS_ODB_TRUE@MarsOdbRules: mars.chk 
+ at METVIEW_MARS_ODB_TRUE@	cat mars.chk | sed 's/RETRIEVE/RETRIEVE_ODB/g' | sed 's/READ/READ_ODB/g' > $@
+
+macro_built_in_functions.txt:
+	touch -d 20050101 $@
+
+# the ObjectSpec files are copied from the invididual module directories, so
+# we can delete them here (and should do, so that old ones do not accumulate)
+clean-local:
+	rm -f ObjectSpec.*
+	rm -f ObjectListAll
+
+# concatenate all object spec files into one
+# remove all comments
+# add "cat <<@ " as the first line, and "@" as the last
+# we don't currently need to cater for ObjectList.forTesting, as
+# this is currently empty.
+# We use a 'dummy' dependency to ensure that ObjectListAll is
+# always rebuilt when we 'make' in this directory. 
+
+ObjectListAll: remove_objectlist
+	rm -f ObjectListAll.temp
+	touch ObjectListAll.temp
+	cat $(MARS_ACCESS) > ObjectListAll.temp
+	echo "cat <<@ "   >> ObjectListAll.temp
+	cat Services ObjectList uPlotTable >> ObjectListAll.temp
+	echo " " > ObjectSpec.dummy
+	cat ObjectSpec.*  >> ObjectListAll.temp
+	echo "@"          >> ObjectListAll.temp
+	grep -v '^#' ObjectListAll.temp > ObjectListAll  # remove comments
+	rm -f ObjectListAll.temp ObjectSpec.dummy
+	rm -f remove_objectlist
+
+remove_objectlist:
+	touch remove_objectlist
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/share/metview/etc/MapViewDef b/share/metview/etc/MapViewDef
new file mode 100644
index 0000000..083b084
--- /dev/null
+++ b/share/metview/etc/MapViewDef
@@ -0,0 +1,130 @@
+MAPVIEW; MAPVIEW; PLOTMOD
+{
+! Include Coastlines
+%include "CommonMapViewDef.h"
+
+	MAP_PROJECTION
+	{
+		CYLINDRICAL			; CYLINDRICAL
+		POLAR_STEREOGRAPHIC	        ; POLAR_STEREOGRAPHIC
+		MERCATOR			; MERCATOR
+		PROJ4			; PROJ4
+		OCEAN_SECTION			; OCEAN_SECTION
+		AITOFF   			; AITOFF
+		LAMBERT  			; LAMBERT
+		NONE				; NONE
+	} = CYLINDRICAL
+
+	MAP_HEMISPHERE
+	{
+			NORTH		; NORTH
+			SOUTH		; SOUTH
+	} = NORTH
+
+	AREA
+	[
+		help = help_input,
+		help_icon = 'help_map',
+		input_type = map,
+		input_window = '/Metview/Defaults/Input Window'
+	]
+	{
+		*
+		/
+        } = -90./-180./90./180
+
+	MAP_VERTICAL_LONGITUDE
+	{
+		*
+	} = 0
+
+	MAP_CENTRE_LATITUDE
+	{
+		@
+	} = 45.0
+
+	MAP_CENTRE_LONGITUDE
+	{
+		@
+	} = 0.0
+
+	MAP_PROJ4_DEFINITION {
+		POLAR_NORTH
+		LAMBERT
+		EPSG:32661
+		EPSG:4326
+		CYLINDRICAL
+		GEOS
+		GOODE
+		COLLIGNON
+		MOLLWEIDE
+		BONNE
+    } = CYLINDRICAL
+
+	MAP_PROJ4_GLOBAL {
+		ON
+		OFF
+	} = ON
+
+
+	MAP_SCALE
+	{
+		@
+	} = 130.0E4
+
+	MAP_STANDARD_LATITUDE_1
+	{
+		@
+	} = 43.5
+
+	MAP_STANDARD_LATITUDE_2
+	{
+		@
+	} = 53.5
+
+%include OverlayControl
+
+    MAP_OVERLAY_CONTROL [ visible = false ]
+    {
+        ALWAYS
+        BY_DATE
+        BY_LEVEL
+        NEVER
+    }= ALWAYS
+
+	SUBPAGE_OVERLAY_MODE [ visible = false ]
+	{
+		@
+	} = NONE
+
+	SUBPAGE_X_POSITION
+	{
+		@
+	} = 7.5
+
+	SUBPAGE_Y_POSITION
+	{
+		@
+	} = 5
+
+	SUBPAGE_X_LENGTH
+	{
+		@
+	} = 85
+
+	SUBPAGE_Y_LENGTH
+	{
+		@
+	} = 85
+
+	SUBPAGE_METADATA_INFO {
+		ON
+		OFF
+	} = OFF
+
+	SUBPAGE_METADATA_JAVASCRIPT_PATH {
+		@ 
+	} = map.js
+
+%include SubpageFrameDef
+}
diff --git a/share/metview/etc/MapViewRules b/share/metview/etc/MapViewRules
new file mode 100644
index 0000000..01fe57f
--- /dev/null
+++ b/share/metview/etc/MapViewRules
@@ -0,0 +1,34 @@
+%if MAP_PROJECTION <> POLAR_STEREOGRAPHIC %then
+    %unset MAP_HEMISPHERE
+    %unset MAP_VERTICAL_LONGITUDE
+
+%if MAP_PROJECTION <> LAMBERT %then
+    %unset MAP_CENTRE_LATITUDE
+    %unset MAP_CENTRE_LONGITUDE
+    %unset MAP_SCALE
+    %unset MAP_STANDARD_LATITUDE_1
+    %unset MAP_STANDARD_LATITUDE_2
+%if MAP_PROJECTION <> POLAR_STEREOGRAPHIC %then
+    %unset MAP_HEMISPHERE
+    %unset MAP_VERTICAL_LONGITUDE
+    
+%if MAP_PROJECTION = OCEAN_SECTION %or MAP_PROJECTION = LAMBERT %then
+    %unset MAP_VERTICAL_LONGITUDE
+
+%if MAP_PROJECTION <> PROJ4 %then
+    %unset MAP_PROJ4_DEFINITION
+    %unset MAP_PROJ4_GLOBAL
+
+%if MAP_PROJ4_GLOBAL = ON %then
+	%unset AREA
+
+    
+%if SUBPAGE_METADATA_INFO = OFF %then
+    %unset SUBPAGE_METADATA_JAVASCRIPT_PATH
+    
+%if MAP_PROJECTION = OCEAN_SECTION %or MAP_PROJECTION = LAMBERT %or MAP_PROJECTION = AITOFF %then
+    %unset AREA
+
+%include SubpageFrameRules
+
+%include OverlayControlRules
diff --git a/share/metview/etc/MarsDef b/share/metview/etc/MarsDef
new file mode 100755
index 0000000..fa3f7d3
--- /dev/null
+++ b/share/metview/etc/MarsDef
@@ -0,0 +1,13 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+%include "ecmwf.def"
+# This should only handle CLASS=TIGGE
+%include "tigge.def"
+%include "dwd.def"
+%include "italy.def"
diff --git a/share/metview/etc/MarsG2Def b/share/metview/etc/MarsG2Def
new file mode 100644
index 0000000..f19312c
--- /dev/null
+++ b/share/metview/etc/MarsG2Def
@@ -0,0 +1,2142 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+!
+! mars language definition file.
+!
+!     author.
+!     -------
+!
+!           b.raoult 22/10/90
+!
+!     Modifications.
+!     --------------
+!
+!           K. Fielding 26.07.93
+!           Add new observation types wind profile (WP) and
+!           temp mobile (TM)
+!
+!
+! syntax :
+!
+!
+!  command name ; command description ; command type     
+!  {
+!        parameter 1
+!        {
+!       value 1 ; abbreviation 1
+!               value 2 ; abbreviation 2
+!               value 3 
+!               ...
+!               value n ; abbreviation n
+!    } = default value
+!
+!        parameter 2
+!        {
+!            ...
+!        } = default value
+!       
+!        ...
+!
+! }
+!
+!------------------------------------------------------------------------
+
+TIGGEDEF ; TIGGE REQUEST  ; TIGGE
+{
+    PARAM {
+
+# Automatically generated by './tigge_def_for_mars.pl master.info'
+
+10 METER U VELOCITY                                ;    10U ;     165
+10 METER V VELOCITY                                ;    10V ;     166
+CONVECTIVE AVAILABLE POTENTIAL ENERGY              ;   CAPE ;      59
+CONVECTIVE INHIBITION                              ;     CIN ;  228001
+GEOPOTENTIAL HEIGHT                                ;     GH ;     156
+LAND SEA MASK                                      ;    LSM ;     172
+MEAN SEA LEVEL PRESSURE                            ;    MSL ;     151
+OROGRAPHY                                          ;   OROG ;  228002
+POTENTIAL TEMPERATURE                              ;     PT ;       3
+POTENTIAL VORTICITY                                ;     PV ;      60
+SKIN TEMPERATURE                                   ;    SKT ;     235
+SNOW DEPTH WATER EQUIVALENT                        ;     SD ;  228141
+SNOW FALL WATER EQUIVALENT                         ;     SF ;  228144
+SOIL MOISTURE                                      ;     SM ;  228039
+SOIL TEMPERATURE                                   ;     ST ;  228139
+SPECIFIC HUMIDITY                                  ;      Q ;     133
+SUNSHINE DURATION                                  ;   SUND ;     189
+SURFACE AIR DEW POINT TEMPERATURE                  ;     2D ;     168
+SURFACE AIR MAXIMUM TEMPERATURE                    ;  MX2T6 ;     121
+SURFACE AIR MINIMUM TEMPERATURE                    ;  MN2T6 ;     122
+SURFACE AIR TEMPERATURE                            ;     2T ;     167
+SURFACE PRESSURE                                   ;     SP ;     134
+TEMPERATURE                                        ;      T ;     130
+TIME INTEGRATED OUTGOING LONG WAVE RADIATION       ;    TTR ;     179
+TIME INTEGRATED SURFACE LATENT HEAT FLUX           ;   SLHF ;     147
+TIME INTEGRATED SURFACE NET SOLAR RADIATION        ;    SSR ;     176
+TIME INTEGRATED SURFACE NET THERMAL RADIATION      ;    STR ;     177
+TIME INTEGRATED SURFACE SENSIBLE HEAT FLUX         ;   SSHF ;     146
+TOTAL CLOUD COVER                                  ;    TCC ;  228164
+TOTAL COLUMN WATER                                 ;    TCW ;     136
+TOTAL PRECIPITATION                                ;     TP ;  228228
+U VELOCITY                                         ;      U ;     131
+V VELOCITY                                         ;      V ;     132
+
+		*
+        /   
+    } = T
+
+    CLASS
+    {
+		TIGGE       ;   TI
+
+    } = TI
+
+    TYPE
+    {
+		CONTROL FORECAST            ;   CF
+		FORECAST                    ;   FC
+		PERTURBED FORECAST          ;   PF
+		ALL                         
+    } = CF
+    
+    STREAM
+    {
+		ENFO
+		DA   ; OPER
+    } = ENFO
+
+	EXPVER
+	{
+		TEST
+		PROD
+	} = PROD
+
+	ORIGIN 
+	{
+	# TIGGE global
+		KWBC
+		BABJ
+		ECMF
+		EGRR
+		RJTD
+		AMMC
+		CWAO
+		RKSL
+		SBSJ
+		LFPW
+
+	# TIGGE LAM
+		COSMOLEPS-ARPASIMC-EU
+		/
+		ALL
+	}
+
+    MODEL
+	{
+		GLOB
+		LAM
+	} = GLOB
+
+    LEVTYPE  
+    {
+		POTENTIAL VORTICITY   ; PV
+		POTENTIAL TEMPERATURE ; PT
+        SURFACE               ; SFC
+        PRESSURE LEVELS       ; PL
+        MODEL LEVELS          ; ML
+		ALL
+    } = PL
+    
+    REPRES 
+    {
+        BUFR            ;   BU
+        SPHERICAL HARMONICS ;   SH
+        LAT LONG GRID       ;   LL
+        GAUSSIAN GRID       ;   GG
+		SPACE VIEW          ; SV
+		OCEAN GRID          ; OG
+		ALL
+    } = SH
+
+    DOMAIN
+    {
+		GENERAL EUROPEAN AREA   ; G
+		GLOBE                   ; G
+        MEDITERRANEAN           ; M
+        NORTHERN HEMISPHERE     ; N
+        SOUTHERN HEMISPHERE     ; S
+		BALTIC AND BLACK SEA    ; B
+		EUROPE                  ; E
+        NORTH WEST EUROPE       ; A
+        NORTH EAST EUROPE       ; B
+        SOUTH WEST EUROPE       ; C
+        SOUTH EAST EUROPE       ; D
+		WESTERN ATLANTIC        ; W
+		FASTEX                  ; F
+		TROPICS                 ; T
+		TROPICS 2               ; U
+		X
+		ALL
+		V
+		H
+		I
+		J
+		K
+		L
+		O
+		P
+		Q
+		R
+		Y
+		Z
+    } = GLOBE
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY         ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+        CURRENT DATE ; 0
+        YESTERDAY    ; -1
+		TO          ; TO
+		BY          ;   BY
+		/
+		OFF
+    } = CURRENT DATE
+
+    PADDING  
+    {
+		AUTOMATIC   ; AUTO
+		NONE        ; N    ; 0
+		OFF
+		*
+    } = OFF
+    
+} ! END OF TIGGEDEF
+
+HELP    ;   Displays prints help file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+NEWS    ;   Displays prints news file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+END ;   Normal exit from mars system    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+DEFAULT ;   Reset defaults    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+ARCHIVE ;   Archives data   ;   TIGGE
+{
+
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  { &TIGGEDEF&CLASS  } = TI
+
+    TYPE   { &TIGGEDEF&TYPE   } = CF
+
+    STREAM { &TIGGEDEF&STREAM } = ENFO
+    
+	MODEL  { &TIGGEDEF&MODEL } = GLOB
+
+	ORIGIN { &TIGGEDEF&ORIGIN } = ECMF
+
+	DOMAIN { &TIGGEDEF&DOMAIN } = G
+
+    EXPVER  [ priority = 1 ]
+    {
+		&TIGGEDEF&EXPVER 
+    } = PROD
+    
+    LEVTYPE { &TIGGEDEF&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/300
+    
+    PARAM { &TIGGEDEF&PARAM } = T
+
+    DATE 
+	{
+		&TIGGEDEF&DATE
+    } = CURRENT DATE
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+    STEP
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } 
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+    } = NEW
+    
+
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+    } = REMOVE
+
+	PADDING
+	{
+		&TIGGEDEF&PADDING
+	} = OFF
+
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+        OFF ;   OFF
+    } = OFF
+
+} ! END OF ARCHIVE
+
+!------------------------------------------------------------------------
+
+LIST    ;   LIST FDF ENTRIES AND CFS FILES  ;   TIGGE
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  
+	{ 
+		&TIGGEDEF&CLASS  
+		/ 
+		ALL
+	} = TI
+    
+    TYPE   
+	{ 
+		&TIGGEDEF&TYPE  
+		/  
+		ALL
+	} = CF 
+
+    STREAM 
+	{ 
+		&TIGGEDEF&STREAM 
+		/ 
+		ALL
+	} = ENFO 
+    
+	MODEL 
+	{
+		&TIGGEDEF&MODEL
+		/
+		ALL
+	} = GLOB
+
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+		ALL
+	}
+
+    EXPVER{
+		&TIGGEDEF&EXPVER
+		/
+		ALL
+    } = PROD 
+    
+    LEVTYPE 
+	{ 
+		&TIGGEDEF&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&TIGGEDEF&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&TIGGEDEF&DOMAIN
+		/
+		ALL
+    } 
+
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &TIGGEDEF&PARAM
+		/
+    }
+    
+    DATE
+    {
+		&TIGGEDEF&DATE
+		ALL
+    } 
+    
+    
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	YEAR
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+	} 
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } = OFF
+    
+    RESOL 
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	LOCATION 
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	PADDING
+	{
+		&TIGGEDEF&PADDING
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+        OFF ;   OFF
+    } = OFF
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	OUTPUT {
+		TABLE
+		BROWSER	
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+
+} ! END OF LIST
+
+STAGE    ;   STAGE FIELDS ;    MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&TIGGEDEF&CLASS  
+	} = TI
+    
+
+    TYPE
+	{ 
+		&TIGGEDEF&TYPE   
+		ALL
+	} = CF
+
+    STREAM
+	{ 
+		&TIGGEDEF&STREAM 
+	} = ENFO
+    
+	MODEL 
+	{
+		&TIGGEDEF&MODEL
+		OFF
+		/
+	} = OFF
+
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+	} = ALL
+
+    EXPVER
+	{
+		&TIGGEDEF&EXPVER
+		/
+    } = PROD
+    
+
+    LEVTYPE
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	} = PL 
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES
+	{ 
+		&TIGGEDEF&REPRES 
+	} = SH
+    
+    DOMAIN
+    {
+		&TIGGEDEF&DOMAIN
+    } = G
+
+    PARAM
+    {
+        ALL             ;   ALL
+        &TIGGEDEF&PARAM
+    } = T
+    
+    DATE
+    {
+		&TIGGEDEF&DATE
+    } = CURRENT DATE
+    
+    TIME 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    BLOCK
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+	RESOL
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+        *   
+	} = AUTO
+
+	ACCURACY
+	{
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+        *   
+		ARCHIVED VALUE ; AV
+	} = N
+
+	AREA
+	{
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+	} = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	GRID
+	{
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+	} = OFF
+
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+		OFF
+    } = OFF
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	DATABASE 
+	{
+		@
+		/
+	} 
+
+} ! END OF STAGE
+
+!------------------------------------------------------------------------
+
+REMOVE  ;   REMOVE FDF ENTRIES AND CFS FILES    ;   MARS
+{
+    
+    CLASS  { 
+		&TIGGEDEF&CLASS  
+	} = TI
+
+    
+    PASSWORD
+    {
+        "   
+		@
+    } 
+    
+    EXPVER
+    {
+		@
+        "   
+    } = ""
+    
+    DOMAIN
+    {
+		&TIGGEDEF&DOMAIN
+    }
+    
+	DATABASE
+	{
+		@
+		*
+		/
+	} 
+
+    TYPE   { &TIGGEDEF&TYPE   }
+
+	DATE { 
+		*
+		TO
+		/
+	}
+
+	TIME {
+		*
+		TO
+		/
+	}
+
+    STREAM
+	{ 
+		&TIGGEDEF&STREAM 
+	}
+    
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+	}
+
+
+    LEVTYPE
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	}
+
+	VOLUME { * }
+
+	CREATED { * }
+
+	LASTACCESS { * }
+
+	EXPR { 
+		"
+		* 
+	}
+
+} ! END OF REMOVE
+
+!------------------------------------------------------------------------
+    
+!------------------------------------------------------------------------
+
+EXPORT  ;   Write cfs files to tape    ;   MARS
+{
+    
+    VOLSER
+    {
+        "   
+    } = ""
+    
+    SLOTNO
+    {
+        "   
+    } = ""
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    DENSITY
+    {
+        *
+    } = 6250
+    
+    RECLEN
+    {
+        *   
+    } = 120
+    
+    FILESEQ
+    {
+        *   
+    } = 1
+    
+    SOFTWARE
+    {
+        "   
+    } = ""
+    
+    FILTER
+    {
+        "   
+    } = "*"
+    
+    CHECK
+    {
+        YES ;   Y
+        NO  ;   N
+    } = NO
+
+}
+
+!------------------------------------------------------------------------
+
+
+RETRIEVE_G2    ;   Retrieval of data   ;   TIGGE
+{
+    
+	DATASET [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		@
+	}
+
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&TIGGEDEF&CLASS   
+	} = TI
+    
+
+    TYPE  	[	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/image/obs/all,
+				mars_interface         = menu,
+				java_hidden  = FALSE ] 
+	{ 
+		&TIGGEDEF&TYPE   
+		*
+	} = CF
+
+
+    STREAM 	[ 	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&TIGGEDEF&STREAM 
+		*
+	} = ENFO
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				marsdoc      = id,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+	{
+        /
+		PROD
+		TEST
+	ALL
+    } = PROD
+    
+
+    MODEL 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				hidden       = TRUE,
+				java_hidden  = FALSE ]
+	{
+		&TIGGEDEF&MODEL
+		OFF
+	} = OFF
+
+    REPRES [ java_control = CHOICE, 
+			 java_section = ID, 
+			 marsdoc      = id,
+			 java_hidden = FALSE ] 
+	{ 
+		&TIGGEDEF&REPRES 
+	} = SH
+    
+    LEVTYPE [ java_control = CHOICE, 
+			  java_section = ID, 
+			  marsdoc      = field/all,
+			  mars_interface         = menu,
+			  java_hidden = FALSE ] 
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, 
+			   java_section = ID, 
+			   marsdoc      = field/level,
+			   mars_interface         = text,
+			   java_hidden = FALSE ]
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/300
+    
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, 
+			marsdoc      = field/all,
+			mars_interface         = list,
+			java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             
+        &TIGGEDEF&PARAM
+    } = T
+    
+	YEAR [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+		&TIGGEDEF&DATE
+    } = YESTERDAY
+    
+    TIME [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+    STEP [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+!		* [DAY]
+!		* [MONTH]
+!		* [WEEK]
+!		* [VERIFY]
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } 
+    
+    NUMBER [ java_control = CHOICE_TEXT_2, 
+			 java_section = OTHER, 
+			 marsdoc      = field/ensemble,
+			 mars_interface         = text,
+			 java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+
+    DOMAIN  [ 	help = help_multiple_selection, # For Metview
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden = FALSE ] 
+    {
+	&TIGGEDEF&DOMAIN
+    } = GLOBE
+
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/supplementary,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{
+		&TIGGEDEF&ORIGIN
+	} = ECMF
+
+
+    SOURCE  [   java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+				mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET [ java_control = TEXT, 
+			 java_section = TARGET, 
+			 marsdoc      = target,
+			 mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+			 java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+
+    TRANSFER [ hidden      = TRUE, check        = false ]
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET  [ java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+			 	mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, 
+			   java_section = TARGET, 
+			   hidden      = TRUE,
+			check        = false,
+			   java_hidden = TRUE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, 
+	          java_section = DATA, 
+				hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP [ java_control = CHOICE,
+			java_section = DATA,
+			hidden      = TRUE,
+			check        = false,
+			java_hidden = FALSE ]
+
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL [ help = help_multiple_selection,  # For Metview
+			check        = false,
+			java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = menu,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   	java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION [ java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/obs,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	LOCATION [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+	ROTATION [ java_control = CHOICE_TEXT_2,
+			   java_section = DATA,
+			   marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN [  help = help_multiple_selection,  # For Metview
+				java_control = CHOICE_TEXT_2, 
+				java_section = DATA, 
+				marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+				java_hidden = FALSE ]
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION [ marsdoc      = pproc/field,
+			check        = false,
+					mars_interface         = text ]
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING [ help = help_multiple_selection,  # For Metview
+			  java_control = CHOICE_TEXT_2,
+			  java_section = DATA,
+			  marsdoc      = pproc/field,
+			  hidden       = true,
+			check        = false,
+			  mars_interface         = text,
+			  java_hidden = FALSE ]
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		JPEG
+		OFF
+	} = OFF
+
+
+    PADDING  [ 	help = help_multiple_selection,  # For Metview
+			check        = false,
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+				mars_interface    = text,
+				java_hidden = FALSE ]
+    {
+		&TIGGEDEF&PADDING
+		OFF
+    } = 0
+    
+
+    DUPLICATES  [ 	java_control = CHOICE, 
+				  	java_section = OTHER, 
+				  	marsdoc      = obs,
+					mars_interface    = on_off,
+			check        = false,
+				  	java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, 
+			  java_section = OTHER, 
+			  hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+    USE  [ 	java_control=CHOICE, 
+	       	java_section=OTHER, 
+		   	marsdoc     = control,
+			mars_interface         = menu,
+			hidden     = TRUE,
+			check        = false,
+		   	java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+    {
+		LOCAL 
+        OFF ;   OFF
+    } = LOCAL
+
+	DATABASE  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				priority = 1,
+				java_hidden = TRUE ]
+	{
+		@
+		/
+	}
+
+	EXPECT [    priority = 0,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+	} = 2.0
+    
+} ! END OF RETRIEVE
+
+READ_G2 ; X; TIGGEMETVIEW
+{
+    FIELDSET [ visible = false ] {
+    @
+    } = OUT
+
+	READ_DATA_FROM [ visible = false ]
+	{
+		FILE
+		METVIEW_ICON
+	} = FILE
+
+
+    SOURCE  [ visible = always, help = help_file_box ]
+	{
+		@
+		OFF
+    } = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATA
+		[
+			interface = icon,
+			class           = GRIB,
+			exclusive       = true
+		]
+	{
+		@
+	}
+
+
+	CFSPATH {
+		@
+		OFF
+	} = OFF
+
+    ORDER [ label = 'Field Ordering' ] {
+	AS IS  ; 0
+        SORTED ; 1
+    } = AS IS
+
+	CLASS  { &TIGGEDEF&CLASS 
+			 ANY ; ANY
+			 } = ANY
+
+	STREAM [ help = help_multiple_selection, exclusive = True ]
+		{ &TIGGEDEF&STREAM 
+			 ANY ; ANY
+			 *
+			 } = ANY
+
+    TYPE   [ help = help_multiple_selection, exclusive = True ]
+		{ 
+		ANY ; ANY
+		&TIGGEDEF&TYPE   
+		*
+	} = ANY
+    
+    MODEL   { 
+		ANY ; ANY
+		&TIGGEDEF&MODEL   
+	} = ANY
+    
+    LEVTYPE
+    {
+		ANY ; ANY
+		&TIGGEDEF&LEVTYPE
+    } = ANY
+    
+    LEVELIST
+    {
+        ANY ; ANY
+		TO  ; TO
+		BY  ; BY 
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = ANY
+    
+    PARAM [ help = help_multiple_selection ] # For Metview
+    {
+        ANY             ;   ANY
+        &TIGGEDEF&PARAM
+    } = ANY
+    
+    DATE
+    {
+		ANY             ;   ANY
+		&TIGGEDEF&DATE   
+    } = ANY
+    
+    TIME
+    {
+		ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+    } = ANY
+    
+    STEP
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY
+    
+    ANOFFSET
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = ANY
+    
+    ACCURACY 
+    {
+		ANY     ;   ANY
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+		ANY
+    } = ANY
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+		ANY
+    } = ANY
+
+    AREA
+    {
+		ANY ; ANY
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        *   
+        /   
+    } = ANY
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+	RESOL 
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		319
+		213
+		106
+        *   
+		ANY ; ANY
+	} = ANY
+
+	ROTATION
+	{
+		ANY     ; ANY
+		*
+		/
+	} = ANY
+
+    GRID
+    {
+        ANY     ; ANY
+        *   
+        /   
+    } = ANY
+
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+	TARGET [ visible = false ]
+	{
+		@
+		"
+		OFF
+	} = OFF
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+    
+! For compatibility with RETRIEVE_G2  They are unset in Mars rules
+
+	REPRES { &TIGGEDEF&REPRES
+			 ANY ; ANY
+			 } = ANY 
+
+    ORIGIN 	{ &TIGGEDEF&ORIGIN
+			 ANY ; ANY
+			 } = ANY 
+
+    PADDING  
+    {
+		ANY  ; ANY
+		&TIGGEDEF&PADDING
+    } = ANY
+    
+    DOMAIN 
+    {
+	&TIGGEDEF&DOMAIN
+	ANY
+    } = ANY
+    
+    EXPVER{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+		ANY ; ANY
+    } = ANY
+    
+}
+
+FLUSH ;   Flushes data   ;   MARS
+{
+
+    CLASS  { &TIGGEDEF&CLASS  }
+
+    TYPE   { &TIGGEDEF&TYPE   }
+
+    STREAM { &TIGGEDEF&STREAM }
+
+    MODEL  { &TIGGEDEF&MODEL }
+
+    ORIGIN { &TIGGEDEF&ORIGIN }
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    }
+    
+    LEVTYPE  { &TIGGEDEF&LEVTYPE }
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    }
+    
+    REPRES   { &TIGGEDEF&REPRES }
+    
+    DOMAIN 
+    {
+	&TIGGEDEF&DOMAIN
+    }
+    
+    PARAM { &TIGGEDEF&PARAM }
+    
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    }
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    }
+    
+    STEP
+    {
+        *   
+    }
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    }
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } 
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    }
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    }
+    
+    PASSWORD
+    {
+        "   
+    } 
+
+	DATABASE
+	{
+		@
+		/
+	} 
+
+! Only for FLUSH
+
+	WAIT
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+	DECACHE
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+} ! END OF FLUSH
diff --git a/share/metview/etc/MarsG2Rules b/share/metview/etc/MarsG2Rules
new file mode 100644
index 0000000..2362cf5
--- /dev/null
+++ b/share/metview/etc/MarsG2Rules
@@ -0,0 +1,764 @@
+!
+! This is the mars check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!          ---> info	 MESSAGE
+!          ---> mail	 MESSAGE
+!          ---> set      PARAMETER = VALUE
+!          ---> unset    PARAMETER 
+!
+!
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+
+# Remove access to marsodb
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = REMOVE)
+	%and DATABASE=marsodb %then
+	%unset DATABASE
+
+%include "oldrd.chk"
+
+
+%if CLASS = OD %and (TYPE = CM %or TYPE = CS %or TYPE = CR) %and DOMAIN = G %then 
+	%warning "Domain forced to E"
+	%set DOMAIN = E
+
+%if (TYPE = IM %or TYPE = SIM %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%set REPRES = SV
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset RESOL
+	%unset DUPLICATES 
+	%unset GRID 
+	%unset ROTATION 
+
+# Simulated radiances
+%if (TYPE = SSD) %then
+	%unset LEVTYPE
+	%unset LEVELIST
+
+
+%if (TYPE = IM  %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%unset STEP
+
+
+%if TYPE = OB %or TYPE = FB  %or STREAM = SSMI %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = OFB %or TYPE = MFB %then 
+	%set REPRES = BU
+	%unset PARAM  
+	%unset STEP  
+	%unset LEVTYPE  
+	%unset LEVELIST  
+	%unset GRID 
+	%unset ROTATION 
+
+%if TYPE = TF %then
+	%set REPRES = BU
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset GRID 
+	%unset ROTATION
+
+%if TYPE = AB %then
+	%unset TIME
+
+%if TYPE = OB %or TYPE = FB %then
+	%unset ORDER
+
+%if TYPE = CL %then
+	%unset STEP
+
+%if LEVTYPE = SFC %or LEVTYPE = WAVE %then 
+	%unset LEVELIST
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = ER %and STREAM = OPER %and (TYPE = AN %or TYPE = FC) %and (%not REPRES) %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %and (TYPE = IA %or TYPE = AN) %and DATE < 19830420 %then
+	%set REPRES = LL
+
+%if (_VERB = RETRIEVE_G2 %and TYPE = TU) %then
+	%set REPRES = LL
+
+%if %not ( TYPE = OLDIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then 
+	%unset OBSTYPE 
+	%unset OBSGROUP 
+	%unset DUPLICATES 
+
+%if %not ( TYPE = IM %or TYPE = OLDIM %or TYPE = SIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB %or TYPE = SSD) %then 
+	%unset IDENT 
+
+%if _VERB = LIST %and %not OBSGROUP %and (TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then
+	%set OBSGROUP = ALL
+
+%if GRID=O  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+%if GRID=AV  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+
+%if (RESOL=AUTO %or RESOL=AV) %and (%not GRID) %then %unset RESOL
+%if (STYLE = DISSEMINATION) %and (RESOL=AUTO %or (%not RESOL)) %then 
+	%warning "Force RESOL=AV when STYLE=DISSEMINATION"
+	%set RESOL=AV
+
+%if AREA = E %then
+	%set AREA = 73.5/-27/33/45
+
+%if (AREA = G %or AREA = GLOBE) %and (_APPL = diss) %then
+	%warning "Expand global AREA for dissemination to AREA = 90/0/-90/359.99"
+	%set AREA = 90/0/-90/359.99
+
+%if AREA = G %then
+	%set _AREA_N = 0
+	%set _AREA_W = 0
+	%set _AREA_S = 0
+	%set _AREA_E = 0
+
+%if AREA = G %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+%if AREA = GLOBE %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+
+%if FORMAT = P %or FORMAT = PACKED  %then %unset FORMAT
+
+# %if FORMAT %then %warning "Format is not yet implemented" %unset FORMAT
+
+
+%if USE = NORMAL     %then %unset USE
+%if USE = STAGE     %then %set TARGET="/dev/null" %unset FIELDSET %set EXPECT=0
+%if COSTONLY = N %then %unset COSTONLY
+
+
+
+!
+!
+!
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CLASS=ANY     %then %unset CLASS
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STREAM=ANY    %then %unset STREAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and MODEL=ANY     %then %unset MODEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVTYPE=ANY   %then %unset LEVTYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVELIST=ANY  %then %unset LEVELIST
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE=ANY      %then %unset TYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PARAM=ANY     %then %unset PARAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DATE=ANY      %then %unset DATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TIME=ANY      %then %unset TIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STEP=ANY      %then %unset STEP
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ANOFFSET=ANY %then %unset ANOFFSET
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and AREA=ANY      %then %unset AREA
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and GRID=ANY      %then %unset GRID
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ROTATION=ANY  %then %unset ROTATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STYLE=ANY     %then %unset STYLE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RESOL=ANY     %then %unset RESOL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORDER=0       %then %unset ORDER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and EXPVER=ANY    %then %unset EXPVER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFERENCE=ANY %then %unset REFERENCE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DOMAIN=ANY    %then %unset DOMAIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORIGIN=ANY    %then %unset ORIGIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CHANNEL=ANY   %then %unset CHANNEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RANGE=ANY     %then %unset RANGE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEADTIME=ANY  %then %unset LEADTIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and OPTTIME=ANY   %then %unset OPTTIME
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PADDING=ANY     %then %unset PADDING
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SYSTEM=ANY     %then %unset SYSTEM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and METHOD=ANY     %then %unset METHOD
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PRODUCT=ANY     %then %unset PRODUCT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SECTION=ANY     %then %unset SECTION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LATITUDE=ANY     %then %unset LATITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LONGITUDE=ANY     %then %unset LONGITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and NUMBER=ANY     %then %unset NUMBER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and QUANTILE=ANY     %then %unset QUANTILE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ITERATION=ANY     %then %unset ITERATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIAGNOSTIC=ANY     %then %unset DIAGNOSTIC
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INSTRUMENT=ANY     %then %unset INSTRUMENT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FILTER=ANY     %then %unset FILTER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INTERPOLATION=ANY     %then %unset INTERPOLATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFDATE=ANY     %then %unset REFDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and HDATE=ANY     %then %unset HDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FREQUENCY=ANY     %then %unset FREQUENCY
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIRECTION=ANY     %then %unset DIRECTION
+
+
+
+
+%if TYPE <> CF %and TYPE <> PF %and TYPE <> CV %then %unset ENSEMBLE
+%if TYPE <> CM %and TYPE <> CS  %then %unset CLUSTER
+%if TYPE <> FP %then %unset PROBABILITY
+
+
+#%if TYPE <> CF %and 
+%if TYPE <> PF %and 
+	TYPE <> CM %and 
+	TYPE <> CS %and 
+	TYPE <> CR %and 
+	TYPE <> CV %and 
+	TYPE <> SV %and 
+	TYPE <> AS %and 
+	TYPE <> FP %and 
+	TYPE <> ED %and 
+	TYPE <> TU %and 
+	TYPE <> CI %and
+	TYPE <> ME %and 
+	TYPE <> FF %and           # Ocean
+	TYPE <> ICP %and 
+	TYPE <> SOT %and 
+	TYPE <> FCMEAN %and
+	TYPE <> FCMAX %and
+	TYPE <> FCMIN %and
+	TYPE <> FCSTDEV %and
+	TYPE <> SVAR %and
+	CLASS <> TI %and
+	STREAM <> MOFC %and 
+	STREAM <> WAMF %and 
+	STREAM <> MOFM %and 
+	STREAM <> WMFM %and 
+	STREAM <> SEAS %and 
+	STREAM <> WASF %and
+	STREAM <> WAMF %and
+	STREAM <> SFMM %and
+	STREAM <> SMMA %and
+	STREAM <> SEAP %and 
+	STREAM <> SWMM %and
+	STREAM <> OCEA %and
+# New Monthly Forecast
+	STREAM <> MNFC %and
+    STREAM <> MNFH %and
+    STREAM <> MNFA %and
+    STREAM <> MNFW %and
+    STREAM <> MFHW %and
+    STREAM <> MFAW %and
+    STREAM <> MNFM %and
+    STREAM <> MFHM %and
+    STREAM <> MFAM %and
+    STREAM <> MFWM %and
+    STREAM <> MHWM %and
+    STREAM <> MAWM %and
+# New Multi-model
+	STREAM <> MMSF %and 
+	STREAM <> MSMM %and 
+	STREAM <> WAMS %and 
+	STREAM <> MSWM %and 
+	STREAM <> MMSA %and 
+# Ensemble Data Assimilation
+	STREAM <> ENDA %and 
+	STREAM <> EWDA %and 
+	STREAM <> EDMM %and 
+	STREAM <> EDMO %and 
+	STREAM <> EWMM %and 
+	STREAM <> EWMO %and 
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %and 
+# Ensemble Supplementary data
+	STREAM <> ESPD %and 
+# Multi-model Multi-annual
+	STREAM <> MMAF %and 
+	STREAM <> MMAM %and 
+	STREAM <> MMAW %and 
+	STREAM <> MMWM %and 
+	STREAM <> SEAS %then
+	%unset NUMBER
+
+%if STREAM <> ENFH %and 
+	STREAM <> ENWH %and
+	STREAM <> EFHO %and
+	STREAM <> EHMM %and
+	STREAM <> EWHO %then
+	%unset HDATE
+
+%if (TYPE <> PD %and 
+    TYPE <> CD %and
+    TYPE <> PB) %then
+	%unset QUANTILE
+
+%if ( STREAM = MNFM %or
+	STREAM = MFHM %or
+    STREAM = MFAM %or
+    STREAM = MFWM %or
+    STREAM = MHWM %or
+    STREAM = ESMM %or
+    STREAM = EHMM %or
+    STREAM = MAWM )
+	%then
+	%unset STEP
+
+%if ( STREAM = MFHM %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES) )
+	%then 
+	%unset DATE
+
+%if ( STREAM = MNFH %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = ED ) )
+	%then
+	%unset DATE
+
+%if (_VERB = RETRIEVE_G2 %or _VERB = ARCHIVE) %and 
+	(STREAM <> MOFC %and STREAM <> WAMF %and STREAM <> MOFM %and STREAM <> WMFM) %and 
+	(TYPE = CF %or TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = TAEM %or TYPE = TAES) %then 
+	%unset ENSEMBLE %unset NUMBER
+
+! For read
+%if _VERB = READ_G2 %and CLASS  <> ANY %then %warning "CLASS  ignored in READ_G2"
+%if _VERB = READ_G2 %and REPRES <> ANY %then %warning "REPRES ignored in READ_G2"
+
+%if _VERB = READ_G2 %then 
+	%unset CLASS 
+	%unset REPRES
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE = FG %and STEP = 0 %and STREAM = OPER  
+	%then 
+		%warning "First Guess step 0 removed"
+		%error   "Please, use STEP=06 instead"
+
+
+! =========================================
+! For wave, there is no step for FG
+%if (STREAM = WAVE %or STREAM = SCWV %or STREAM = DCWV) %and TYPE = FG %and STEP <> 0 %then 
+	%warning "For wave first-guess, step is ignored and set to zero"
+	%set     STEP = 0
+
+! =========================================
+! There are no waves in altitude
+%if STREAM = WAVE %or 
+	STREAM = WAEF %or 
+	STREAM = WEHS %or 
+	STREAM = WEOV %or 
+	STREAM = WAMO %or 
+	STREAM = SCWV %or 
+	STREAM = DCWV %or 
+	STREAM = WVHC %or
+	STREAM = EWHC %or
+	STREAM = MAWV %or
+	STREAM = WASF %or 
+	STREAM = WAMF %or
+	STREAM = WMFM %or
+	STREAM = SWMM %or
+	STREAM = MNFW %or
+	STREAM = MFHW %or
+	STREAM = MFAW %or
+	STREAM = MFWM %or
+	STREAM = MHWM %or
+	STREAM = MAWM %or
+	STREAM = WAMS %or
+	STREAM = DACW %or
+	STREAM = EWDA %or
+	STREAM = LWWV %or
+	STREAM = EWLA %or
+	STREAM = MSWM %then
+
+	%warning "For wave data, LEVTYPE forced to Surface"
+	%set     LEVTYPE = SFC
+	%unset   LEVELIST
+
+!===========================================================
+
+!
+! Avoid use of ENSEMBLE, CLUSTER and PROBABILITY in new MARS retrieval editors
+
+%if TYPE = PF %and ENSEMBLE = OFF %then %unset ENSEMBLE
+%if (TYPE = CM %or TYPE = CS %or TYPE = CR) %and CLUSTER = OFF %then %unset CLUSTER
+%if (TYPE = FP) %and PROBABILITY = OFF %then %unset PROBABILITY
+
+%if STREAM <> WAVE %and 
+	STREAM <> SCWV %and 
+	STREAM <> DCWV %and 
+	STREAM <> MAWV %and 
+	STREAM <> WASF %and 
+
+	STREAM <> WAEF %and 
+	STREAM <> EWDA %and 
+
+	STREAM <> MNFW %and 
+	STREAM <> MFHW %and 
+	STREAM <> MFAW %and 
+
+	STREAM <> WVHC %and
+	STREAM <> EWHC %and
+
+	STREAM <> ENWH %and
+	STREAM <> EWHO %and
+
+	STREAM <> LWWV %and
+	STREAM <> EWLA %and
+
+	STREAM <> WAMF %then 
+	%unset FREQUENCY %unset DIRECTION
+
+! Avoid visiting all mars tree on the server
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and (%not CLASS))   %then 
+	%warning "Missing CLASS. Force to Operations"
+	%set CLASS= OD
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not DATE) %and (%not PSEUDODATE) ) %then 
+	%warning "Missing DATE. Force to yesterday"
+	%set DATE = -1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not STREAM) ) %then 
+	%warning "Missing STREAM. Force to Daily archive"
+	%set STREAM = OPER
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not EXPVER) ) %then 
+	%warning "Missing EXPVER. Force to 1"
+	%set EXPVER = 1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not TYPE) ) %then 
+	%warning "Missing TYPE. Force to Analysis"
+	%set TYPE = AN
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS = RD  %and (%not EXPVER) ) %then 
+	%error "Missing EXPVER. Please, specify one"
+
+%if (_VERB = LIST %and OUTPUT = TREE %and (%not HIDE)) %then 
+	%set HIDE=FILE/LENGTH/MISSING/OFFSET/ID/COST/MONTH/YEAR
+
+
+%if (_VERB = RETRIEVE_G2 %and EXPVER = 8 %and (%not GRID)) %then
+	%warning "To get old EXPVER=8 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 0.5/0.5"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 0.5/0.5
+
+%if (_VERB = RETRIEVE_G2 %and EXPVER = 8) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+%if (_VERB = RETRIEVE_G2 %and EXPVER = 7 %and (%not GRID)) %then
+	%warning "To get old EXPVER=7 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 2/2"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 2/2
+
+%if (_VERB = RETRIEVE_G2 %and EXPVER = 7) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+
+! Observation retrieval from new MARS
+%if (_VERB = RETRIEVE_G2 %and (STREAM = SSBT %or STREAM = E1)) %then
+	%warning "Changed STREAM to OPER"
+	%set STREAM = OPER
+
+%if (_VERB = RETRIEVE_G2 %and STREAM = SSMI) %then
+	%warning "Changed STREAM=OPER, TYPE=OB"
+	%set STREAM = OPER
+	%set TYPE = OB
+
+%if (ACCURACY = N) %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then
+	%unset ACCURACY
+
+%if (ACCURACY = R %or ACCURACY = L) %then
+	%warning "ACCURACY Low or Reduced force to 8 bits"
+	%set ACCURACY = 8
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) 
+	%and _VERB = RETRIEVE_G2 
+	%and SOURCE 
+	%and (%not DATABASE) %then
+	%set DATABASE = file
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (EXPVER=fdy1) 
+	%and (%not DATABASE) %then
+	%set DATABASE = mars grib2
+
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=E4 %or 
+	      CLASS=EI %or
+		  CLASS=ER %or 
+		  CLASS=PV %or 
+		  CLASS=DM %or 
+		  CLASS=CS %or 
+		  CLASS=TO %or 
+		  CLASS=DT %or 
+		  CLASS=EL %or 
+		  CLASS=YT %or 
+		  CLASS=MC %or 
+		  CLASS=EM %or 
+		  CLASS=E2 %or 
+		  CLASS=ME %or 
+		  CLASS=EN) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marser
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=TI)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsth
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER < 10
+	%and (%not DATABASE) %then
+	%set DATABASE = marsod
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER > 9
+	%and (%not DATABASE) %then
+	%set DATABASE = marsode
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=CO %or CLASS=SR %or CLASS=LA %or CLASS=MS %or CLASS=4M) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marsms
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = REMOVE %or 
+	 _VERB = LIST)
+	%and (CLASS<>E4 %and 
+	      CLASS<>EI %and
+	      CLASS<>TI %and
+		  CLASS<>ER %and 
+		  CLASS<>PV %and 
+		  CLASS<>DM %and 
+		  CLASS<>OD %and 
+		  CLASS<>TO %and
+		  CLASS<>DT %and
+		  CLASS<>EN %and
+		  CLASS<>CO %and
+		  CLASS<>4M %and
+		  CLASS<>SR %and
+		  CLASS<>LA %and
+		  CLASS<>EL %and
+		  CLASS<>MS %and
+		  CLASS<>ME %and
+		  CLASS<>EM %and
+		  CLASS<>E2 %and
+		  CLASS<>MC %and
+		  CLASS<>CS)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsrd
+
+# ocean
+%if LEVTYPE = DP
+	%and (SECTION = M %or SECTION = Z) 
+	%and (PRODUCT = INST %or PRODUCT = TACC %or PRODUCT = TAVG)
+	%then
+	%unset LEVELIST
+
+# Special case for TIMS, V
+%if LEVTYPE = DP
+	%and SECTION = V
+	%and PRODUCT = TIMS 
+	%then
+	%unset LEVELIST
+
+%if LEVTYPE = DP
+	%and TYPE = OR
+	%and (%not PRODUCT)
+	%then
+		%warning "Default PRODUCT for Ocean ReAnalysis set to Instantaneous"
+		%set PRODUCT = INST
+
+
+# Year & month
+%if _VERB = RETRIEVE_G2 %and (YEAR %or MONTH) %then
+	%unset DATE
+
+# Boundary Conditions (BC)
+%if _VERB = RETRIEVE_G2 %and CLASS = OD %and TIME = 00 %and STREAM = OPER %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCDA for Boundary Conditions Project data"
+
+%if _VERB = RETRIEVE_G2 %and CLASS = OD %and TIME = 00 %and STREAM = WAVE %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCWV for Boundary Conditions wave data"
+
+%if (_VERB = ARCHIVE %and (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA) %and VERIFY) %then
+	%error "Please, use FCMONTH instead of VERIFY for archiving"
+	%error "Exiting..."
+
+%if ((CLASS <> OD %and CLASS <> EN %and CLASS <> ME) %and SYSTEM ) %then
+	%unset SYSTEM
+
+# A bit of paranoia...
+
+%if _VERB = REMOVE %and CLASS = OD %and %not DATABASE %then
+	%set DATABASE = dhstest
+	
+# That should be disabled in mars.def anyway
+
+%if _VERB = REMOVE %and (
+	CLASS = ER %or
+	CLASS = E4 %or 
+	CLASS = EI %or 
+	CLASS = EM %or 
+	CLASS = E2 %or 
+	CLASS = CS %or 
+	CLASS = PV %or 
+	CLASS = TO %or 
+	CLASS = DT %or 
+	CLASS = PE %or 
+	CLASS = MC %or 
+	CLASS = ME %or 
+	CLASS = DM
+	) %then
+	%error "Cannot remove this data..."
+
+
+%if (CLASS = IT %and MODEL = HRM) %or (CLASS = CO) %then
+	%warning "Post-processing directives are ignored"
+	%set _POSTPROCESSING = 0
+
+%if (STREAM = MODA %or STREAM = MSDA %or STREAM = EDMO %or STREAM = EWMO) %and (CLASS <> ER) %then
+	%unset TIME
+	%unset STEP
+
+%if (STREAM = MDFA) %then
+	%unset TIME
+
+%if (CLASS <> TO %and CLASS <> DT) %or STREAM <> SEAP %then
+	%unset LEADTIME
+	%unset OPTTIME
+
+%if (CLASS=DT) %then
+	%unset METHOD
+
+#########################################
+# Migration from old images to new images
+#########################################
+
+# Meteosat
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=2, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 2 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=3, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 205
+
+# GOES
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=4, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 4 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=20 by CHANNEL=3, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 615
+
+################################################
+# end of Migration from old images to new images
+################################################
+
+%if (FCMONTH %or FCPERIOD)  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then 
+	%unset STEP
+
+# %if (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA %or STREAM = MMSA) %then
+# 	%unset STEP
+# 
+
+%if CLASS = TI %then                %unset DOMAIN
+%if CLASS = TI %and TYPE = CF %then %set NUMBER=0
+%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
+%if CLASS = TI %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if CLASS = DM %and TYPE = FC %then %set TIME=0
+
+# ANOFFSET not valid unless Long window 4dvar 
+%if STREAM <> LWDA %and 
+	STREAM <> LWWV %and
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %then
+	%unset ANOFFSET
+
+
+# ERA Interim Data Server at full resolution
+%if ((DATASET = interim_full_daily)  %and
+    ((TYPE <> AN %and TYPE <> FC) %or
+	 (TYPE = FC %and (STEP > 12 %or LEVTYPE <> SFC)))) %then
+	 %error "Dataset ERA-Interim full resolution available only for Analysis and Forecast surface fluxes at time-step <= 12"
+	 %fail
+
+
+# Double-archiving marsrd/marsrd-cluster
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#    (DATABASE = marsrd)) %then %set DATABASE = marsrd/marsrd-cluster
+
+
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#     (DATABASE = marstest)) %then %set DATABASE = marstest/marsdev-core
+
+%include "rt_by_obsgroup.chk"
diff --git a/share/metview/etc/MarsOdbDef b/share/metview/etc/MarsOdbDef
new file mode 100644
index 0000000..e784aed
--- /dev/null
+++ b/share/metview/etc/MarsOdbDef
@@ -0,0 +1,7133 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+!
+! mars language definition file.
+!
+!     author.
+!     -------
+!
+!           b.raoult 22/10/90
+!
+!     Modifications.
+!     --------------
+!
+!           K. Fielding 26.07.93
+!           Add new observation types wind profile (WP) and
+!           temp mobile (TM)
+!
+!
+! syntax :
+!
+!
+!  command name ; command description ; command type     
+!  {
+!        parameter 1
+!        {
+!       value 1 ; abbreviation 1
+!               value 2 ; abbreviation 2
+!               value 3 
+!               ...
+!               value n ; abbreviation n
+!    } = default value
+!
+!        parameter 2
+!        {
+!            ...
+!        } = default value
+!       
+!        ...
+!
+! }
+!
+!------------------------------------------------------------------------
+
+_DUMMY ; DUMMY REQUEST  ; DUMMY
+{
+    PARAM {
+
+
+20 DEGREES ISOTHERM DEPTH                     ;  20D   ;  163
+ACCUMULATED CLOUD FRACTION TENDENCY           ;  ACF   ;  241
+ACCUMULATED ICE WATER TENDENCY                ;  AIW   ;  249
+ACCUMULATED LIQUID WATER TENDENCY             ;  ALW   ;  242
+ACCUMULATED CARBON DIOXIDE NET ECOSYSTEM EXCHANGE   ; ACO2NEE; 80.228
+ACCUMULATED CARBON DIOXIDE GROSS PRIMARY PRODUCTION ; ACO2GPP; 81.228
+ACCUMULATED CARBON DIOXIDE ECOSYSTEM RESPIRATION    ; ACO2REC; 82.228
+ADIABATIC TENDENCY OF HUMIDITY                ;  ATH   ;  229
+ADIABATIC TENDENCY OF HUMIDITY - ECMWF        ;  ATHE  ;  252
+ADIABATIC TENDENCY OF MERIDIONAL WIND         ;  ATMW  ;  254
+ADIABATIC TENDENCY OF MERIDIONAL WIND - ASTEX ; ATMWAX ;  231
+ADIABATIC TENDENCY OF TEMPERATURE             ;  ATT   ;  228
+ADIABATIC TENDENCY OF TEMPERATURE - ECMWF     ;  ATTE  ;  251
+ADIABATIC TENDENCY OF ZONAL WIN               ;  ATZW  ;  230
+ADIABATIC TENDENCY OF ZONAL WIND - ECMWF      ;  ATZE  ;  253
+ALBEDO                                        ;  AL    ;  174
+ALTIMETER WAVE HEIGHT                         ;  AWH   ;  246
+ALTIMETER CORRECTED WAVE HEIGHT               ;  ACWH  ;  247
+ALTIMETER RANGE RELATIVE CORRECTION           ;  ARRC  ;  248
+ALTITUDE OF EMITTER                           ;  ALE   ;  210119 ; 119.210
+ALTITUDE OF PLUME TOP                         ;  ALPT  ;  210120 ; 120.210
+ANALYSED POTENTIAL TEMPERATURE                ;  APT   ;  181
+ANALYSED SALINITY                             ;  AS    ;  183
+ANGLE OF SUBGRID OROGRAPHY                    ;  ANOR  ;  162
+ANISOTROPHY SUBGRID OROGRAPHY                 ;  ISOR  ;  161
+APPARENT SURFACE HUMIDITY                     ;  ASQ   ;  233
+ATMOSPHERIC TIDE                              ;  AT    ;  127
+AVERAGE POTENTIAL TEMPERATURE IN UPPER 300M   ; TAV300 ;  164
+AVERAGE SALINITY IN UPPER 300M                ; SAV300 ;  175
+BACKGROUND POTENTIAL TEMPERATURE              ;  BPT   ;  180
+BENJAMIN-FEIR INDEX                           ;  BFI   ;  253
+BOUNDARY LAYER DISSIPATION                    ;  BLD   ;  145
+BOUNDARY LAYER HEIGHT                         ;  BLH   ;  159
+BRIGHTNESS TEMPERATURE                        ;  BTMP  ;  194
+BUDGET VALUES                                 ;  BV    ;  128
+CHANGE FROM REMOVING NEG. HUMID               ;  CRNH  ;  227
+CHARNOCK                                      ;  CHNK  ;  148
+CLEAR SKY SURFACE PHOTOSYNTHETICALLY ACTIVE RADIATION  ; PARCS ; 20
+CLIMAT. DEEP SOIL TEMP.                       ;  CDST  ;  183
+CLIMAT. DEEP SOIL WETNESS                     ;  CDSW  ;  184
+CLOUD BASE HEIGHT                             ;  CBH   ;  228023   ; 23.228
+CLOUD COVER                                   ;  CC    ;  248
+CLOUD FRACTION                                ;  CF    ;  213
+CLOUD ICE WATER CONTENT                       ;  CIWC  ;  247
+CLOUD LIQUID WATER                            ;  CLW   ;  212
+CLOUD LIQUID WATER CONTENT                    ;  CLWC  ;  246
+CLOUD LIQUID WATER CONTENT - ERA              ; CLWCER ;  241
+CLOUD RAIN WATER CONTENT                      ;  CRWC  ;  75
+CLOUD SNOW WATER CONTENT                      ;  CSWC  ;  76
+COEFFICIENT OF DRAG WITH WAVES                ;  CDWW  ;  233
+CONVECTIVE AVAILABLE POTENTIAL ENERGY         ;  CAPE  ;  059
+CONVECTIVE CLOUD COVER                        ;  CCC   ;  185
+CONVECTIVE INHIBITION                         ;  CIN   ;  228001
+CONVECTIVE PRECIPITATION                      ;  CP    ;  143
+CONVECTIVE SNOW-FALL                          ;  CSF   ;  239
+CONVECTIVE TENDENCY OF MERIDIONAL WIND        ;  CTMW  ;  223
+CONVECTIVE TENDENCY OF ZONAL WIND             ;  CTZW  ;  222
+DEEP SOIL TEMPERATURE                         ;  DST   ;  170
+DEEP SOIL WETNESS                             ;  DSW   ;  171
+DEPTH OF SALINITY MAXIMUM                     ;  DSMAX ;  174
+DEPTH OF VELOCITY MAXIMUM                     ;  DUMAX ;  172
+DIABATIC HEATING BY CUMULUS CONVECTION        ;  DHCC  ;  216
+DIABATIC HEATING BY LARGE-SCALE CONDENSATION  ;  DHLC  ;  217
+DIABATIC HEATING BY RADIATION                 ;  DHR   ;  214
+DIABATIC HEATING BY VERTICAL DIFFUSION        ;  DHVD  ;  215
+DIRECT SOLAR RADIATION                        ;  DSRP  ;  047
+DIVERGENCE                                    ;  D     ;  155
+DOWNWARD UV RADIATION AT THE SURFACE          ;  UVB   ;  057
+DUCT BASE HEIGHT                              ;  DCTB  ;  228017   ; 017.228
+E-W COMPONENT SURFACE STRESS                  ;  EWSS  ;  180
+E-W OROGRAPHIC VARIANCE.                      ;  EWOV  ;  190
+EQUIVALENT POTENTIAL TEMPERATURE              ;  EQPT  ;  004
+ETA-COORDINATE VERTICAL VELOCITY              ;  ETADOT ; 077
+EVAPORATION                                   ;  E     ;  182
+EW GRAVITY WAVE DRAG                          ;  EWGD  ;  220
+FIELD CAPACITY                                ;  CAP   ;  228170 ; 170.228
+FLUX OF CARBON DIOXIDE NET ECOSYSTEM EXCHANGE       ; FCO2NEE; 83.228
+FLUX OF CARBON DIOXIDE GROSS PRIMARY PRODUCTION     ; FCO2GPP; 84.228
+FLUX OF CARBON DIOXIDE ECOSYSTEM RESPIRATION        ; FCO2REC; 85.228
+FORECAST ALBEDO                               ;  FAL   ;  243
+FORECAST LOG SRF ROUGHNESS HEAT               ;  FLSR  ;  245
+FORECAST SURFACE ROUGHNESS                    ;  FSR   ;  244
+FRICTION VELOCITY                             ;  ZUST  ;  228003 ; 3.228
+GEOPOTENTIAL                                  ;  Z     ;  129
+GEOPOTENTIAL ANOMALY                          ;  ZA    ;  129.171
+GRAVITY WAVE DISSIPATION.                     ;  GWD   ;  197
+HEIGHT GEOPOTENTIAL                           ;  GH    ;  156
+HIGH CLOUD COVER                              ;  HCC   ;  188
+HIGH VEGETATION COVER                         ;  CVH   ;  028
+HORIZONTAL VISIBILITY                         ;  HVIS  ;  228025  ; 25.228
+HUMIDITY TENDENCY BY CUMULUS CONVECTION       ;  HTCC  ;  225
+HUMIDITY TENDENCY BY LARGE-SCALE CONDENSATION ;  HTLC  ;  226
+HUNDRED METRE U WIND COMPONENT                ;  100U  ;  U100 ; 228246  ;  246.228
+HUNDRED METRE V WIND COMPONENT                ;  100V  ;  V100 ; 228247  ;  247.228
+HUNDRED METRE WIND SPEED                      ;  100SI ;  228249  ;  249.228
+ICE AGE                                       ;  ICE   ;  250
+ICE SURFACE TEMPERATURE LAYER 1               ;  ISTL1 ;  035
+ICE SURFACE TEMPERATURE LAYER 2               ;  ISTL2 ;  036
+ICE SURFACE TEMPERATURE LAYER 3               ;  ISTL3 ;  037
+ICE SURFACE TEMPERATURE LAYER 4               ;  ISTL4 ;  038
+INSTANT MOISTURE FLUX                         ;  IE    ;  232
+INSTANT X SURFACE STRESS                      ;  IEWS  ;  229
+INSTANT Y SURFACE STRESS                      ;  INSS  ;  230
+INSTANTANEOUS SURFACE SENSIBLE HEAT FLUX      ;  ISHF  ;  231
+K INDEX                                       ;  KX    ;  260121
+LAKE COVER                                    ;  CL    ;   26
+LAKE DEPTH                                    ;  DL    ;  228007 ;  7.228
+LAKE MIX-LAYER TEMPERATURE                    ;  LMLT  ;  228008 ;  8.228
+LAKE MIX-LAYER DEPTH                          ;  LMLD  ;  228009 ;  9.228
+LAKE BOTTOM TEMPERATURE                       ;  LBLT  ;  228010 ; 10.228
+LAKE TOTAL LAYER TEMPERATURE                  ;  LTLT  ;  228011 ; 11.228
+LAKE SHAPE FACTOR                             ;  LSHF  ;  228012 ; 12.228
+LAKE ICE TEMPERATURE                          ;  LICT  ;  228013 ; 13.228
+LAKE ICE DEPTH                                ;  LICD  ;  228014 ; 14.228
+LAND SEA MASK                                 ;  LSM   ;  172
+LARGE SCALE PRECIPITATION                     ;  LSP   ;  142
+LARGE SCALE PRECIPITATION FRACTION            ;  LSPF  ;  050
+LARGE SCALE SNOW-FALL                         ;  LSF   ;  240
+LATITUDINAL GRAVITYWAVE STRESS                ;  LGWS  ;  195
+LEAF AREA INDEX LOW VEGETATION                ;  LAILV ;   66
+LEAF AREA INDEX HIGH VEGETATION               ;  LAIHV ;   67
+LN SURFACE PRESSURE                           ;  LNSP  ;  152
+LOG SURFACE ROUGHNESS - HEAT                  ;  LSRH  ;  234
+LONG WAVE HEATING RATE                        ;  LWH   ;  154
+LOW CLOUD COVER                               ;  LCC   ;  186
+LOW VEGETATION COVER                          ;  CVL   ;  027
+MAGNITUDE OF SURFACE STRESS                   ;  MAGSS ;  048
+MAXIMUM TEMPERATURE AT 2M                     ;  MX2T  ;  201
+MAXIMUM TEMPERATURE AT 2M ANOMALY             ;  MX2TA  ;  201.171
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS ANOMALY  ;  MX2T6A  ;  121.171
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS  ;  MX2T6 ;  121.128
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 3 HOURS  ;  MX2T3 ;  228026 ; 026.228
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 24 HOURS ;  MX2T24 ;  51
+MAXIMUM INDIVIDUAL WAVE HEIGHT                           ;  HMAX  ;  218
+MAXIMUM OF SIGNIFICANT WAVE HEIGHT            ;  MAXSWH ; 200
+MEAN 2 METRE TEMPERATURE PAST 24 HOURS        ;  MEAN2T24;  055
+MEAN 2 METRE DEWPOINT TEMPERATURE PAST 24 HOURS ;  MEAN2D24;  056
+MEAN TEMPERATURE AT 2 METRES                  ;  MEAN2T ; 228004  ; 4.228
+MEAN DIRECTION OF TOTAL SWELL               ;  MDPS ; MDTS ;  238
+MEAN DIRECTION OF WIND WAVES                  ;  MDWW  ;  235
+MEAN OF 10M WINDSPEED                         ;  MU10  ;  241
+MEAN 10 METRE WINDSPEED                       ;  MEAN10WS ; 228005  ; 5.228
+MEAN TOTAL CLOUD COVER                        ;  MEANTCC ; 228006   ; 6.228
+MEAN PERIOD                                   ;  MP    ;  232
+MEAN PERIOD OF TOTAL SWELL                  ;  MPPS ; MPTS  ;  239
+MEAN PERIOD OF WIND WAVES                     ;  MPWW  ;  236
+MEAN SEA LEVEL PRESSURE                       ;  MSL   ; MSLP ;  151
+MEAN SEA LEVEL PRESSURE ANOMALY               ;  MSLA   ; MSLPA ;  151.171
+MEAN SEA LEVEL PRESSURE SIGNIFICANCE          ;  MSLS  ;  151.234
+MEAN SEA LEVEL PRESSURE ANOMALY OF AT LEAST 0 Pa ;  MSLAG0   ;  10
+MEAN SQUARE SLOPE OF WAVES                    ;  MSQS  ;  244
+MEAN VERTICAL GRADIENT OF REFRACTIVITY INSIDE TRAPPING LAYER ; DNDZA ;  228016  ; 016.228
+MEAN VERTICAL VELOCITY                        ;  MVV   ;  232
+MEAN WAVE DIRECTION                           ;  MWD   ;  230
+MEAN WAVE PERIOD                              ;  MWP   ;  232
+MEAN WAVE PERIOD PROBABILITY                  ;  MWPP  ;  232
+MEAN WAVE PERIOD BASED ON FIRST MOMENT                 ; MP1   ; 220
+MEAN WAVE PERIOD BASED ON FIRST MOMENT FOR SWELL       ; P1PS  ; 226
+MEAN WAVE PERIOD BASED ON FIRST MOMENT FOR WIND WAVES  ; P1WW  ; 223
+MEAN WAVE PERIOD BASED ON SECOND MOMENT                ; MP2   ; 221
+MEAN WAVE PERIOD BASED ON SECOND MOMENT FOR SWELL      ; P2PS  ; 227
+MEAN WAVE PERIOD BASED ON SECOND MOMENT FOR WIND WAVES ; P2WW  ; 224
+MEAN WIND DIRECTION                           ;  MDWI  ;  242
+MEDIUM CLOUD COVER                            ;  MCC   ;  187
+MERIDIONAL GRAVITY WAVE STRESS                ;  MGWS  ;  196
+MINIMUM TEMPERATURE AT 2M                     ;  MN2T  ;  202
+MINIMUM TEMPERATURE AT 2M ANOMALY             ;  MN2TA  ;  202.171
+MINIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS ANOMALY  ;  MN2T6A  ;  122.171
+MINIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS  ;  MN2T6 ;  122.128
+MINIMUM TEMPERATURE AT 2M IN THE LAST 3 HOURS  ;  MN2T3 ;  228027 ; 027.228
+MINIMUM TEMPERATURE AT 2M IN THE LAST 24 HOURS ;  MN2T24 ;  52
+MINIMUM VERTICAL GRADIENT OF REFRACTIVITY INSIDE TRAPPING LAYER ; DNDZN ; 228015 ; 015.228
+MONTGOMERY POTENTIAL                          ;  MONT  ;  053
+N-S COMPONENT SURFACE STRESS                  ;  NSSS  ;  181
+N-S OROGRAPHIC VARIANCE                       ;  NSOV  ;  191
+NE-SW OROGRAPHIC VARIANCE                     ;  NWOV  ;  192
+NS GRAVITY WAVE DRAG                          ;  NSGD  ;  221
+NEAR IR ALBEDO FOR DIRECT RADIATION           ;  ALNIP ;   17
+NEAR IR ALBEDO FOR DIFFUSE RADIATION          ;  ALNID ;   18
+NEUTRAL WIND AT 10 M X-COMPONENT              ;  U10N  ;  228131  ; 131.228
+NEUTRAL WIND AT 10 M Y-COMPONENT              ;  V10N  ;  228132  ; 132.228
+NW-SE OROGRAPHIC VARIANCE                     ;  NEOV  ;  193
+OBSERVATION COUNT                             ;  OBCT  ;  062
+OCEAN POTENTIAL TEMPERATURE                   ;  OCPT  ;  129
+OZONE MASS MIXING RATIO                       ;  O3    ;  203     ; 203.128
+PEAK DIRECTION                                ;  PD    ;  230
+PEAK PERIOD                                   ;  PP    ;  231
+PEAK PERIOD OF 1D SPECTRA                     ;  PP1D  ;  231
+PERIOD CORRESPONDING TO MAXIMUM INDIVIDUAL WAVE HEIGHT   ;  TMAX  ;  217
+PHOTOSYNTHETICALLY ACTIVE RADIATION AT THE SURFACE ;  PAR   ;  058
+PROBABILITY OF A TROPICAL STORM                     ; PTS   ; 89.131
+PROBABILITY OF A HURRICANE                          ; PH    ; 90.131
+PROBABILITY OF A TROPICAL DEPRESION                 ; PTD   ; 91.131
+CLIMATOLOGICAL PROBABILITY OF A TROPICAL STORM      ; CPTS  ; 92.131
+CLIMATOLOGICAL PROBABILITY OF A HURRICANE           ; CPH   ; 93.131
+CLIMATOLOGICAL PROBABILITY OF A TROPICAL DEPRESION  ; CPTD  ; 94.131
+PROBABILITY ANOMALY OF A TROPICAL STORM             ; PATS  ; 95.131
+PROBABILITY ANOMALY OF A HURRICANE                  ; PAH   ; 96.131
+PROBABILITY ANOMALY OF A TROPICAL DEPRESION         ; PATD  ; 97.131
+POTENTIAL TEMPERATURE                         ;  PT    ;  003
+POTENTIAL TEMPERATURE INCREMENT               ;  PTI   ;  178
+POTENTIAL TEMPERATURE ANALYSIS ERROR          ;  PTAE  ;  179
+POTENTIAL TEMPERATURE BACKGROUND ERROR        ;  PTBE  ;  182
+POTENTIAL VORTICITY                           ;  PV    ;  060
+PRECIP. ANALYSIS WEIGHTS                      ;  PAW   ;  204
+PRECIPITABLE WATER CONTENT                    ;  PWC   ;  137
+PRESSURE                                      ;  PRES  ;  054
+RELATIVE HUMIDITY                             ;  R     ;  157
+RUNOFF                                        ;  RO    ;  205
+SALINITY INCREMENT                            ;  SALI  ;  184
+SALINITY MAXIMUM                              ;  SMAX  ;  173
+SATURATED EQUIVALENT POTENTIAL TEMPERATURE    ;  SEPT  ;  005
+SATURATION                                    ;  SAT   ;  228172  ;  172.228
+SEA ICE COVER                                 ;  CI    ;  031
+SEA LEVEL PREVIOUS TIMESTEP                   ;  SL_1  ;  146
+SEA SURFACE TEMPERATURE                       ;  SSTK  ;  SST   ; 034
+SEA SURFACE TEMPERATURE ANOMALY               ;  SSTAK ;  SSTA  ; 171034  ; 034.171
+SHORT WAVE HEATING RATE                       ;  SWHR  ;  153
+SIGNIFICANT HEIGHT TOTAL SWELL              ;  SHPS ; SHTS  ;  237
+SIGNIFICANT HEIGHT WIND WAVES                 ;  SHWW  ;  234
+SIGNIFICANT WAVE HEIGHT                       ;  SWH   ;  229
+SIGNIFICANT WAVE HEIGHT PROBABILITY           ;  SWHP  ;  229
+SKIN RESERVOIR CONTENT                        ;  SRC   ;  198
+SKIN TEMPERATURE                              ;  SKT   ;  235
+SLOPE OF SUBGRID OROGRAPHY                    ;  SLOR  ;  163
+SNOW ALBEDO                                   ;  ASN   ;  032
+SNOW DENSITY                                  ;  RSN   ;  033
+SNOW DENSITY ANOMALY                          ;  RSNA  ;  171033  ; 033.171
+SNOW DEPTH                                    ;  SD    ;  141
+SNOW DEPTH ANOMALY                            ;  SDA   ;  171141  ; 141.171
+SNOW EVAPORATION                              ;  ES    ;  044
+SNOWFALL                                      ;  SF    ;  144
+SNOWFALL PROBABILITY                          ;  SFP   ;  144
+SNOWFALL ANOMALOUS RATE OF ACCUMULATION       ;  SFARA ;  144.173
+SNOWMELT                                      ;  SMLT  ;  045
+SOIL SAND FRACTION                            ;  SSFR  ;    6
+SOIL CLAY FRACTION                            ;  SCFR  ;    7
+SOIL TEMPERATURE LEVEL 1                      ;  STL1  ;  139
+SOIL TEMPERATURE ANOMALY LEVEL 1              ;  STAL1 ;  139.171
+SOIL TEMPERATURE LEVEL 2                      ;  STL2  ;  170
+SOIL TEMPERATURE LEVEL 3                      ;  STL3  ;  183
+SOIL TEMPERATURE LEVEL 4                      ;  STL4  ;  236
+SOIL TYPE                                     ;  SLT   ;  043
+SOIL WETNESS LEVEL 1                          ;  SWL1  ;  140
+SOIL WETNESS LEVEL 2                          ;  SWL2  ;  171
+SOIL WETNESS LEVEL 3                          ;  SWL3  ;  184
+SOIL WETNESS LEVEL 4                          ;  SWL4  ;  237
+SOLAR DURATION                                ;  SDUR  ;  046
+SOLAR INSULATION                              ;  SI    ;  212
+SPECIFIC HUMIDITY                             ;  Q     ;  133
+STANDARD DEVIATION 10M WIND SPEED             ;  SDU   ;  243
+STANDARD DEVIATION OROGRAPHY                  ;  SDOR  ;  160
+STANDARD DEVIATION OF FILTERED SUBGRID OROGRAPHY  ;  SDFOR  ;  74.128
+STANDARD DEVIATION WAVE HEIGHT                ;  SDHS  ;  240
+STREAM FUNCTION                               ;  STRF  ;  001
+STREAM FUNCTION ANOMALY                       ;  STRFA  ;  001.171
+SUB-SURFACE RUNOFF                            ;  SSRO  ;    9
+SUNSHINE DURATION                             ;  SUND  ;  189
+SUNSHINE DURATION ANOMALY                     ;  SUNDA ;  189.171
+SUNSHINE DURATION ANOMALOUS RATE OF ACCUMULATION ;  SUNDARA ;  189.173
+SURFACE LATENT HEAT FLUX                      ;  SLHF  ;  147
+SURFACE NET RADIATION                         ;  SNR   ;  149
+SURFACE NET SOLAR RADIATION CLEAR SKY         ;  SSRC  ;  210
+SURFACE NET THERMAL RADIATION CLEAR SKY       ;  STRC  ;  211
+SURFACE PRESSURE                              ;  SP    ;  134
+SURFACE ROUGHNESS                             ;  SR    ;  173
+SURFACE RUNOFF                                ;  SRO   ;    8
+SURFACE SENSIBLE HEAT FLUX                    ;  SSHF  ;  146
+SURFACE SOIL WETNESS                          ;  SSW   ;  140
+SURFACE SOLAR RADIATION                       ;  SSR   ;  176
+SURFACE SOLAR RADIATION DOWNWARDS             ;  SSRD  ;  169
+SURFACE STRESS                                ;  SS    ;  148
+SURFACE TEMPERATURE                           ;  ST    ;  139
+SURFACE TEMPERATURE ANOMALY OF AT LEAST 0K    ;  STAG0 ;    9
+SURFACE TEMPERATURE SIGNIFICANCE              ;  STS   ;  139.234
+SURFACE NET THERMAL RADIATION                     ;  STR   ;  177
+SURFACE THERMAL RADIATION DOWNWARDS           ;  STRD  ;  175
+TEMPERATURE                                   ;  T     ;  130
+TEMPERATURE ANOMALY                           ;  TA    ;  130.171
+TEMPERATURE ANOMALY PROBABILITY               ;  TAP   ;  130
+TEMPERATURE OF SNOW LAYER                     ;  TSN   ;  238
+TEN METRE SPEED PROBABILITY                   ;  10SP  ;  165
+TEN METRE WIND SPEED INDEX                    ;  10WSI ;  165
+TEN METRE U WIND COMPONENT                    ;  10U   ;  165
+TEN METRE U WIND COMPONENT ANOMALY            ;  10UA   ;  165.171
+TEN METRE V WIND COMPONENT                    ;  10V   ;  166
+TEN METRE V WIND COMPONENT ANOMALY            ;  10VA   ;  166.171
+TEN METRE WINDSPEED IRRESP OF DIR             ;  10SI  ;  207
+TEN METRE WINDSPEED ONLY                      ;  10WS  ;  246
+TEN METRE WIND DIRECTION                      ;  DWI   ;  249
+TENDENCY SURFACE PRESSURE                     ;  TSP   ;  158
+TOP NET RADIATION                             ;  TNR   ;  150
+TOP NET SOLAR RADIATION CLEAR SKY             ;  TSRC  ;  208
+TOP SOLAR RAD. UPWARD CLEAR SKY               ;  TSUC  ;  210
+TOP NET SOLAR RADIATION                           ;  TSR   ;  178
+TOP SOLAR RADIATION UPWARD                    ;  TSRU  ;  208
+TOP THERMAL RAD. UPWARD CLEAR S               ;  TTUC  ;  211
+TOP NET THERMAL RADIATION                         ;  TTR   ;  179
+TOP THERMAL RADIATION UPWARD                  ;  TTRU  ;  209
+TOP UPWARD THERMAL RADIATION CLEAR SKY        ;  TTRC  ;  209
+TOTAL CLOUD COVER                             ;  TCC   ;  164
+TOTAL CLOUD COVER ANOMALY                     ;  TCCA   ;  164.171
+TOTAL COLUMN ICE WATER                        ;  TCIW  ;  079
+TOTAL COLUMN ICE WATER ANOMALY                ;  TCIWA  ;  079.171
+TOTAL COLUMN LIQUID WATER                     ;  TCLW  ;  078
+TOTAL COLUMN LIQUID WATER ANOMALY             ;  TCLWA  ;  078.171
+TOTAL COLUMN OZONE                            ;  TCO3  ;  206     ; 206.128
+TOTAL COLUMN RAIN WATER                       ;  TCRW  ; 228089   ; 089.228
+TOTAL COLUMN SNOW WATER                       ;  TCSW  ; 228090   ; 090.228
+TOTAL COLUMN WATER                            ;  TCW   ;  136
+TOTAL COLUMN WATER ANOMALY                    ;  TCWA  ;  136.171
+TOTAL COLUMN WATER VAPOUR                     ;  TCWV  ;  137
+TOTAL COLUMN WATER VAPOUR ANOMALY             ;  TCWVA ;  137.171
+TOTAL PRECIPITATION                           ;  TP    ;  228
+TOTAL PRECIPITATION ANOMALY                   ;  TPA    ;  228.171
+TOTAL PRECIPITATION ANOMALOUS RATE OF ACCUMULATION ;  TPARA    ;  228.173
+TOTAL PRECIPITATION INDEX                     ;  TPI   ;  228
+TOTAL PRECIPITATION PROBABILITY               ;  TPP   ;  228
+TOTAL PRECIPITATION SIGNIFICANCE              ;  TPS   ;  228.234
+TOTAL PRECIPITATION ANOMALY OF AT LEAST 20 MM ;  TPAG20;    6
+TOTAL PRECIPITATION ANOMALY OF AT LEAST 10 MM ;  TPAG10;    7
+TOTAL PRECIPITATION ANOMALY OF AT LEAST  0 MM ;  TPAG0 ;    8
+TOTAL TOTALS INDEX                            ;  TOTALX ; 260123
+TOTAL SKY DIRECT SOLAR RADIATION AT SURFACE   ;  FDIR ;   228021
+TRAPPING LAYER BASE HEIGHT                    ;  TPLB  ;  228018   ;  018.228
+TRAPPING LAYER TOP HEIGHT                     ;  TPLT  ;  228019   ; 019.228
+TWO METRE DEWPOINT                            ;  2D    ;  168
+TWO METRE DEWPOINT ANOMALY                    ;  2DA   ;  171168   ; 168.171
+TWO METRE TEMPERATURE                         ;  2T    ;  167
+TWO METRE TEMPERATURE INDEX                   ;  2TI   ;  167
+TWO METRE TEMPERATURE PROBABILITY             ;  2TP   ;  167
+TWO METRE TEMPERATURE ANOMALY                 ;  2TA   ;  167.171
+TWO METRE TEMPERATURE SIGNIFICANCE            ;  2TS   ;  167.234
+TWO METRE TEMPERATURE WARM ANOMALY OF AT LEAST 2K    ;  2TWA2K;    1
+TWO METRE TEMPERATURE WARM ANOMALY OF AT LEAST 1K    ;  2TWA1K;    2
+TWO METRE TEMPERATURE WARM ANOMALY OF AT LEAST 0K    ;   2TWA0K;    3
+TWO METRE TEMPERATURE COLD ANOMALY OF AT LEAST 1K    ;  2TCA1K;    4
+TWO METRE TEMPERATURE COLD ANOMALY OF AT LEAST 2K    ;  2TCA2K;    5
+TWO-D WAVE SPECTRA                            ;  2DSP  ;  250
+TWO-D WAVE SINGLE FREQUENCY DIRECTION SPECTRUM;  2DFD  ;  251
+TYPE OF HIGH VEGETATION                       ;  TVH   ;  030
+TYPE OF LOW VEGETATION                        ;  TVL   ;  029
+U WIND COMPONENT                              ;  U     ;  131
+U WIND COMPONENT ANOMALY                      ;  UA    ;  131.171
+U-COMPONENT OF DIVERGENT WIND                 ;  UDVW  ;  011
+U-COMPONENT OF ROTATIONAL WIND                ;  URTW  ;  013
+U-COMPONENT STOKES DRIFT                      ;  UST   ;  215
+UNBALANCED COMPONENT OF DIVERGENCE            ;  UCDV  ;  023
+UNBALANCED COMPONENT OF TEMPERATURE           ;  UCTP  ;  021
+UNBALANCED COMPONENT OF LNSP                  ;  UCLN  ;  022
+U-VELOCITY MAXIMUM                            ;  UMAX  ;  171
+UV VISIBLE ALBEDO FOR DIRECT RADIATION        ;  ALUVP ;   15
+UV VISIBLE ALBEDO FOR DIFFUSE RADIATION       ;  ALUVD ;   16
+V WIND COMPONENT                              ;  V     ;  132
+V WIND COMPONENT ANOMALY                      ;  VA    ;  132.171
+V-COMPONENT OF DIVERGENT WIND                 ;  VDVW  ;  012
+V-COMPONENT OF ROTATIONAL WIND                ;  VRTW  ;  014
+V-COMPONENT STOKES DRIFT                      ;  VST   ;  216
+VARIANCE SUBGRIDSCALE OROGRAPHY               ;  VSO   ;  200
+VEGETATION                                    ;  VEG   ;  199
+VELOCITY POTENTIAL                            ;  VPOT  ;  002
+VELOCITY POTENTIAL ANOMALY                    ;  VPOTA ;  002.171
+VERTICAL DIFFUSION OF HUMIDITY                ;  VDH   ;  224
+VERTICAL DIFFUSION OF MERIDIONAL WIND         ;  VDMW  ;  219
+VERTICAL DIFFUSION OF ZONAL WIND              ;  VDZW  ;  218
+VERTICAL VELOCITY                             ;  W     ;  135
+VERTICALLY INTEGRATED MERIDIONAL HEAT TRANSPORT    ;  MHT   ;  170
+VERTICALLY INTEGRATED MERIDIONAL VOLUME TRANSPORT  ;  MTR   ;  168
+VERTICALLY INTEGRATED ZONAL HEAT TRANSPORT         ;  ZHT   ;  169
+VERTICALLY INTEGRATED ZONAL VOLUME TRANSPORT       ;  ZTR   ;  167
+VOLUMETRIC SOIL WATER LAYER 1                 ;  SWVL1 ;  039
+VOLUMETRIC SOIL WATER LAYER 2                 ;  SWVL2 ;  040
+VOLUMETRIC SOIL WATER LAYER 3                 ;  SWVL3 ;  041
+VOLUMETRIC SOIL WATER LAYER 4                 ;  SWVL4 ;  042
+VORTICITY                                     ;  VO    ;  138
+WAVE HEIGHT                                   ;  WH    ;  229
+WAVE SPECTRAL DIRECTIONAL WIDTH               ;  WDW   ; 222
+WAVE SPECTRAL DIRECTIONAL WIDTH FOR SWELL     ;  DWPS  ; 228
+WAVE SPECTRAL DIRECTIONAL WIDTH FOR WIND WAVES;  DWWW  ; 225
+WAVE SPECTRAL KURTOSIS                        ;  WSK   ; 252
+WAVE SPECTRAL PEAKEDNESS                      ;  WSP   ; 254
+WILTING POINT                                 ;  WILT  ; 228171  ; 171.228
+WIND GUST AT 10 METRES                        ;  10FG  ;  049
+WIND GUST AT 10 METRES INDEX                  ;  10FGI ;  049
+WIND GUST AT 10 METRES IN THE LAST 6 HOURS     ;  10FG6 ;  123
+WIND GUST AT 10 METRES IN THE LAST 3 HOURS     ;  10FG3 ;  228028 ; 028.228
+WIND SPEED                                    ;  WS    ;   10
+ZERO DEGREE LEVEL                             ;  DEG0L ; 228024  ; 24.228
+
+# Variable resolution parameters (extracted with /usr/local/bin/python ./paramdb2overlap.py)
+
+SURFACE RUNOFF VARIABLE RESOLUTION ; SROVAR ; 8.230
+SUB-SURFACE RUNOFF VARIABLE RESOLUTION ; SSROVAR ; 9.230
+SNOW EVAPORATION VARIABLE RESOLUTION ; ESVAR ; 44.230
+SNOWMELT VARIABLE RESOLUTION ; SMLTVAR ; 45.230
+SOLAR DURATION VARIABLE RESOLUTION ; SDURVAR ; 46.230
+DOWNWARD UV RADIATION AT THE SURFACE VARIABLE RESOLUTION ; UVBVAR ; 57.230
+PHOTOSYNTHETICALLY ACTIVE RADIATION AT THE SURFACE VARIABLE RESOLUTION ; PARVAR ; 58.230
+STRATIFORM PRECIPITATION LARGE-SCALE PRECIPITATION VARIABLE RESOLUTION ; LSPVAR ; 142.230
+CONVECTIVE PRECIPITATION VARIABLE RESOLUTION ; CPVAR ; 143.230
+SNOWFALL CONVECTIVE + STRATIFORM VARIABLE RESOLUTION ; SFVAR ; 144.230
+BOUNDARY LAYER DISSIPATION VARIABLE RESOLUTION ; BLDVAR ; 145.230
+SURFACE SENSIBLE HEAT FLUX VARIABLE RESOLUTION ; SSHFVAR ; 146.230
+SURFACE LATENT HEAT FLUX VARIABLE RESOLUTION ; SLHFVAR ; 147.230
+SURFACE SOLAR RADIATION DOWNWARDS VARIABLE RESOLUTION ; SSRDVAR ; 169.230
+ALBEDO VARIABLE RESOLUTION ; ALVAR ; 174.230
+SURFACE THERMAL RADIATION DOWNWARDS VARIABLE RESOLUTION ; STRDVAR ; 175.230
+SURFACE NET SOLAR RADIATION VARIABLE RESOLUTION ; SSRVAR ; 176.230
+SURFACE NET THERMAL RADIATION VARIABLE RESOLUTION ; STRVAR ; 177.230
+TOP NET SOLAR RADIATION VARIABLE RESOLUTION ; TSRVAR ; 178.230
+TOP NET THERMAL RADIATION VARIABLE RESOLUTION ; TTRVAR ; 179.230
+EAST-WEST SURFACE STRESS VARIABLE RESOLUTION ; EWSSVAR ; 180.230
+NORTH-SOUTH SURFACE STRESS VARIABLE RESOLUTION ; NSSSVAR ; 181.230
+EVAPORATION VARIABLE RESOLUTION ; EVAR ; 182.230
+SUNSHINE DURATION VARIABLE RESOLUTION ; SUNDVAR ; 189.230
+LONGITUDINAL COMPONENT OF GRAVITY WAVE STRESS VARIABLE RESOLUTION ; LGWSVAR ; 195.230
+MERIDIONAL COMPONENT OF GRAVITY WAVE STRESS VARIABLE RESOLUTION ; MGWSVAR ; 196.230
+GRAVITY WAVE DISSIPATION VARIABLE RESOLUTION ; GWDVAR ; 197.230
+SKIN RESERVOIR CONTENT VARIABLE RESOLUTION ; SRCVAR ; 198.230
+RUNOFF VARIABLE RESOLUTION ; ROVAR ; 205.230
+TOP NET SOLAR RADIATION CLEAR SKY VARIABLE RESOLUTION ; TSRCVAR ; 208.230
+TOP NET THERMAL RADIATION CLEAR SKY VARIABLE RESOLUTION ; TTRCVAR ; 209.230
+SURFACE NET SOLAR RADIATION CLEAR SKY VARIABLE RESOLUTION ; SSRCVAR ; 210.230
+SURFACE NET THERMAL RADIATION CLEAR SKY VARIABLE RESOLUTION ; STRCVAR ; 211.230
+TOA INCIDENT SOLAR RADIATION VARIABLE RESOLUTION ; TISRVAR ; 212.230
+TOTAL PRECIPITATION VARIABLE RESOLUTION ; TPVAR ; 228.230
+
+# Probability parameters (extracted from METDB with script: ./proba2def.pl on linux)
+
+
+   10 METRE SPEED PROBABILITY                  ; 10SP  ;  165
+   10 METRE WIND GUST OF AT LEAST 15 METRE PER SECOND     ; 10FGG15  ;  070
+   10 METRE WIND GUST OF AT LEAST 20 METRE PER SECOND     ; 10FGG20  ;  071
+   10 METRE WIND GUST OF AT LEAST 25 METRE PER SECOND     ; 10FGG25  ;  072
+   10 METRE WIND GUST PROBABILITY              ; 10GP  ;  049
+   10 METRE WIND SPEED OF AT LEAST 10 METRE PER SECOND     ; 10SPG10  ;  068
+   10 METRE WIND SPEED OF AT LEAST 15 METRE PER SECOND     ; 10SPG15  ;  069
+   2 METRE TEMPERATURE LESS THAN 273.15 K      ; 2TL273  ;  073
+   2 METRE TEMPERATURE PROBABILITY             ; 2TP  ;  167
+   2M TEMPERATURE ANOMALY OF AT LEAST 0K       ; 2TAG0  ;  003
+   2M TEMPERATURE ANOMALY OF AT LEAST 1K      ; 2TAG1  ;  002
+   2M TEMPERATURE ANOMALY OF AT LEAST 2K      ; 2TAG2  ;  001
+   2M TEMPERATURE ANOMALY OF AT MOST -1K       ; 2TALM1  ;  004
+   2M TEMPERATURE ANOMALY OF AT MOST -2K       ; 2TALM2  ;  005
+   CONVECTIVE AVAILABLE POTENTIAL ENERGY PROBABILITY     ; CAPEP  ;  059
+   GEOPOTENTIAL PROBABILITY                    ; ZP  ;  129
+   HEIGTH OF 0 DEGREE ISOTHERM PROBABILITY     ; H0DIP  ;  015
+   HEIGTH OF SNOWFALL LIMIT PROBABILITY        ; HSLP  ;  016
+   MAXIMUM 2 METRE TEMPERATURE PROBABILITY     ; MX2TP  ;  201
+   MEAN SEA LEVEL PRESSURE ANOMALY OF AT LEAST 0 PA     ; MSLAG0  ;  010
+   MEAN WAVE PERIOD OF AT LEAST 10 S           ; MWPG10  ;  079
+   MEAN WAVE PERIOD OF AT LEAST 12 S           ; MWPG12  ;  080
+   MEAN WAVE PERIOD OF AT LEAST 15 S           ; MWPG15  ;  081
+   MEAN WAVE PERIOD OF AT LEAST 8 S            ; MWPG8  ;  078
+   MEAN WAVE PERIOD PROBABILITY                ; MWPP  ;  232
+   MINIMUM 2 METRE TEMPERATURE PROBABILITY     ; MN2TP  ;  202
+   SHOWALTER INDEX PROBABILITY                 ; SAIP  ;  017
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 2 M     ; SWHG2  ;  074
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 4 M     ; SWHG4  ;  075
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 6 M     ; SWHG6  ;  076
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 8 M     ; SWHG8  ;  077
+   SIGNIFICANT WAVE HEIGHT PROBABILITY         ; SWHP  ;  229
+   SNOWFALL PROBABILITY                        ; SFP  ;  144
+   SURFACE TEMPERATURE ANOMALY OF AT LEAST 0K     ; STAG0  ;  009
+   TEMPERATURE ANOMALY GREATER THAN 4 K       ; TAG4K  ;  024
+   TEMPERATURE ANOMALY GREATER THAN 8 K       ; TAG8K  ;  025
+   TEMPERATURE ANOMALY LESS THAN -2 K          ; TALM2K  ;  020
+   TEMPERATURE ANOMALY LESS THAN -4 K          ; TALM4K  ;  023
+   TEMPERATURE ANOMALY LESS THAN -8 K          ; TALM8K  ;  022
+   TEMPERATURE ANOMALY OF AT LEAST 2 K        ; TAG2K  ;  021
+   TEMPERATURE ANOMALY PROBABILITY             ; TAP  ;  130
+   TOTAL CLOUD COVER PROBABILITY               ; TCCP  ;  164
+   TOTAL PRECIPITATION ANOMALY OF AT LEAST 0 MM     ; TPAG0  ;  008
+   TOTAL PRECIPITATION ANOMALY OF AT LEAST 10 MM     ; TPAG10  ;  007
+   TOTAL PRECIPITATION ANOMALY OF AT LEAST 20 MM     ; TPAG20  ;  006
+   TOTAL PRECIPITATION LESS THAN 0.1 MM        ; TPL01  ;  064
+   TOTAL PRECIPITATION OF AT LEAST 1 MM        ; TPG1  ;  060
+   TOTAL PRECIPITATION OF AT LEAST 10 MM       ; TPG10  ;  062
+   TOTAL PRECIPITATION OF AT LEAST 100 MM      ; TPG100  ;  085
+   TOTAL PRECIPITATION OF AT LEAST 150 MM      ; TPG150  ;  086
+   TOTAL PRECIPITATION OF AT LEAST 20 MM       ; TPG20  ;  063
+   TOTAL PRECIPITATION OF AT LEAST 200 MM      ; TPG200  ;  087
+   TOTAL PRECIPITATION OF AT LEAST 300 MM      ; TPG300  ;  088
+   TOTAL PRECIPITATION OF AT LEAST 40 MM       ; TPG40  ;  082
+   TOTAL PRECIPITATION OF AT LEAST 5 MM        ; TPG5  ;  061
+   TOTAL PRECIPITATION OF AT LEAST 60 MM       ; TPG60  ;  083
+   TOTAL PRECIPITATION OF AT LEAST 80 MM       ; TPG80  ;  084
+   TOTAL PRECIPITATION PROBABILITY             ; TPP  ;  228
+   TOTAL PRECIPITATION RATE LESS THAN 1 MM PER DAY     ; TPRL1  ;  065
+   TOTAL PRECIPITATION RATE OF AT LEAST 3 MM PER DAY     ; TPRG3  ;  066
+   TOTAL PRECIPITATION RATE OF AT LEAST 5 MM PER DAY     ; TPRG5  ;  067
+   WHITING INDEX PROBABILITY                   ; WHIP  ;  018
+
+
+# GEMS parameters (to sort when we fully use metdb)
+
+AEROSOL TYPE 1 MIXING RATIO                   ; AERMR01    ;   1.210
+AEROSOL TYPE 2 MIXING RATIO                   ; AERMR02    ;   2.210
+AEROSOL TYPE 3 MIXING RATIO                   ; AERMR03    ;   3.210
+AEROSOL TYPE 4 MIXING RATIO                   ; AERMR04    ;   4.210
+AEROSOL TYPE 5 MIXING RATIO                   ; AERMR05    ;   5.210
+AEROSOL TYPE 6 MIXING RATIO                   ; AERMR06    ;   6.210
+AEROSOL TYPE 7 MIXING RATIO                   ; AERMR07    ;   7.210
+AEROSOL TYPE 8 MIXING RATIO                   ; AERMR08    ;   8.210
+AEROSOL TYPE 9 MIXING RATIO                   ; AERMR09    ;   9.210
+AEROSOL TYPE 10 MIXING RATIO                  ; AERMR10    ;  10.210
+AEROSOL TYPE 11 MIXING RATIO                  ; AERMR11    ;  11.210
+AEROSOL TYPE 12 MIXING RATIO                  ; AERMR12    ;  12.210
+AEROSOL TYPE 1 SOURCE/GAIN ACCUMULATED        ; AERGN01    ;  16.210
+AEROSOL TYPE 2 SOURCE/GAIN ACCUMULATED        ; AERGN02    ;  17.210
+AEROSOL TYPE 3 SOURCE/GAIN ACCUMULATED        ; AERGN03    ;  18.210
+AEROSOL TYPE 4 SOURCE/GAIN ACCUMULATED        ; AERGN04    ;  19.210
+AEROSOL TYPE 5 SOURCE/GAIN ACCUMULATED        ; AERGN05    ;  20.210
+AEROSOL TYPE 6 SOURCE/GAIN ACCUMULATED        ; AERGN06    ;  21.210
+AEROSOL TYPE 7 SOURCE/GAIN ACCUMULATED        ; AERGN07    ;  22.210
+AEROSOL TYPE 8 SOURCE/GAIN ACCUMULATED        ; AERGN08    ;  23.210
+AEROSOL TYPE 9 SOURCE/GAIN ACCUMULATED        ; AERGN09    ;  24.210
+AEROSOL TYPE 10 SOURCE/GAIN ACCUMULATED       ; AERGN10    ;  25.210
+AEROSOL TYPE 11 SOURCE/GAIN ACCUMULATED       ; AERGN11    ;  26.210
+AEROSOL TYPE 12 SOURCE/GAIN ACCUMULATED       ; AERGN12    ;  27.210
+AEROSOL TYPE 1 SINK/LOSS ACCUMULATED          ; AERLS01    ;  31.210
+AEROSOL TYPE 2 SINK/LOSS ACCUMULATED          ; AERLS02    ;  32.210
+AEROSOL TYPE 3 SINK/LOSS ACCUMULATED          ; AERLS03    ;  33.210
+AEROSOL TYPE 4 SINK/LOSS ACCUMULATED          ; AERLS04    ;  34.210
+AEROSOL TYPE 5 SINK/LOSS ACCUMULATED          ; AERLS05    ;  35.210
+AEROSOL TYPE 6 SINK/LOSS ACCUMULATED          ; AERLS06    ;  36.210
+AEROSOL TYPE 7 SINK/LOSS ACCUMULATED          ; AERLS07    ;  37.210
+AEROSOL TYPE 8 SINK/LOSS ACCUMULATED          ; AERLS08    ;  38.210
+AEROSOL TYPE 9 SINK/LOSS ACCUMULATED          ; AERLS09    ;  39.210
+AEROSOL TYPE 10 SINK/LOSS ACCUMULATED         ; AERLS10    ;  40.210
+AEROSOL TYPE 11 SINK/LOSS ACCUMULATED         ; AERLS11    ;  41.210
+AEROSOL TYPE 12 SINK/LOSS ACCUMULATED         ; AERLS12    ;  42.210
+AEROSOL PRECURSOR MIXING RATIO                ; AERPR      ;  46.210
+AEROSOL SMALL MODE MIXING RATIO               ; AERSM      ;  47.210
+AEROSOL LARGE MODE MIXING RATIO               ; AERLG      ;  48.210
+AEROSOL PRECURSOR OPTICAL DEPTH               ; AODPR      ;  49.210
+AEROSOL SMALL MODE OPTICAL DEPTH              ; AODSM      ;  50.210
+AEROSOL LARGE MODE OPTICAL DEPTH              ; AODLG      ;  51.210
+DUST EMISSION POTENTIAL                       ; AERDEP     ;  52.210
+LIFTING THRESHOLD SPEED                       ; AERLTS     ;  53.210
+SOIL CLAY CONTENT                             ; AERSCC     ;  54.210
+CARBON DIOXIDE                                ; CO2        ;  61.210
+METHANE                                       ; CH4        ;  62.210
+NITROUS OXIDE                                 ; N2O        ;  63.210
+TOTAL COLUMN CARBON DIOXIDE                   ; TCCO2      ;  64.210
+TOTAL COLUMN METHANE                          ; TCCH4      ;  65.210
+TOTAL COLUMN NITROUS OXIDE                    ; TCN2O      ;  66.210
+OCEAN FLUX OF CARBON DIOXIDE                  ; CO2OF      ;  67.210
+NATURAL BIOSPHERE FLUX OF CARBON DIOXIDE      ; CO2NBF     ;  68.210
+ANTHROPROGENIC EMISSIONS OF CARBON DIOXIDE    ; CO2APF     ;  69.210
+METHANE SURFACE FLUXES                        ; CH4F       ;  70.210
+METHANE LOSS RATE DUE TO RADICAL HYDROXYL     ; kCH4       ;  71.210
+WILDFIRE FLUX OF CARBON DIOXIDE               ; CO2FIRE    ;  80.210
+WILDFIRE FLUX OF CARBON MONOXIDE              ; COFIRE     ;  81.210
+WILDFIRE FLUX OF METHANE                      ; CH4FIRE    ;  82.210
+WILDFIRE FLUX OF NON-METHANE HYDRO-CARBONS    ; NMHCFIRE   ;  83.210
+WILDFIRE FLUX OF HYDROGEN                     ; H2FIRE     ;  84.210
+WILDFIRE FLUX OF NITROGEN OXIDES NOX          ; NOXFIRE    ;  85.210
+WILDFIRE FLUX OF NITROUS OXIDE                ; N2OFIRE    ;  86.210
+WILDFIRE FLUX OF PARTICULATE MATTER PM2.5     ; PM2P5FIRE  ;  87.210
+WILDFIRE FLUX OF TOTAL PARTICULATE MATTER     ; TPMFIRE    ;  88.210
+WILDFIRE FLUX OF TOTAL CARBON IN AEROSOLS     ; TCFIRE     ;  89.210
+WILDFIRE FLUX OF ORGANIC CARBON               ; OCFIRE     ;  90.210
+WILDFIRE FLUX OF BLACK CARBON                 ; BCFIRE     ;  91.210
+WILDFIRE OVERALL FLUX OF BURNT CARBON         ; CFIRE      ;  92.210
+WILDFIRE FRACTION OF C4 PLANTS                ; C4FFIRE    ;  93.210
+WILDFIRE VEGETATION MAP INDEX                 ; VEGFIRE    ;  94.210
+WILDFIRE COMBUSTION COMPLETENESS              ; CCFIRE     ;  95.210
+WILDFIRE FUEL LOAD CARBON PER UNIT AREA       ; FLFIRE     ;  96.210
+WILDFIRE FRACTION OF AREA BURNT               ; BFFIRE     ;  97.210
+WILDFIRE OBSERVED AREA                        ; OAFIRE     ;  98.210
+WILDFIRE RADIATIVE POWER                      ; FRPFIRE    ;  99.210
+WILDFIRE DRY MATTER COMBUSTION RATE DENSITY   ; DMFIRE     ; 100.210
+NITROGEN DIOXIDE                              ; NO2        ; 121.210
+SULPHUR DIOXIDE                               ; SO2        ; 122.210
+CARBON MONOXIDE                               ; CO         ; 123.210
+FORMALDEHYDE                                  ; HCHO       ; 124.210
+TOTAL COLUMN NITROGEN DIOXIDE                 ; TCNO2      ; 125.210
+TOTAL COLUMN SULPHUR DIOXIDE                  ; TCSO2      ; 126.210
+TOTAL COLUMN CARBON MONOXIDE                  ; TCCO       ; 127.210
+TOTAL COLUMN FORMALDEHYDE                     ; TCHCHO     ; 128.210
+NITROGEN OXIDES                               ; NOX        ; 129.210
+TOTAL COLUMN NITROGEN OXIDES                  ; TCNOX      ; 130.210
+RADON                                         ; RA         ; 181.210
+SULPHUR HEXAFLUORIDE                          ; SF6        ; 182.210
+TOTAL COLUMN RADON                            ; TCRA       ; 183.210
+TOTAL COLUMN SULPHUR HEXAFLUORIDE             ; TCSF6      ; 184.210
+ANTHROPOGENIC EMISSIONS OF SULPHUR HEXAFLUORIDE ; SF6APF     ; 185.210
+GEMS OZONE                                    ; GO3        ; 203.210
+GEMS TOTAL COLUMN OZONE                       ; GTCO3      ; 206.210
+TOTAL AEROSOL OPTICAL DEPTH AT 550NM          ; AOD550     ; 207.210
+SEA SALT AEROSOL OPTICAL DEPTH AT 550NM       ; SSAOD550 ; 208.210
+DUST AEROSOL OPTICAL DEPTH AT 550NM           ; DUAOD550 ; 209.210
+ORGANIC MATTER AEROSOL OPTICAL DEPTH AT 550NM ; OMAOD550 ; 210.210
+BLACK CARBON AEROSOL OPTICAL DEPTH AT 550NM   ; BCAOD550 ; 211.210
+SULPHATE AEROSOL OPTICAL DEPTH AT 550NM       ; SUAOD550 ; 212.210
+TOTAL AEROSOL OPTICAL DEPTH AT 469NM          ; AOD469 ; 213.210
+TOTAL AEROSOL OPTICAL DEPTH AT 670NM          ; AOD670 ; 214.210
+TOTAL AEROSOL OPTICAL DEPTH AT 865NM          ; AOD865 ; 215.210
+TOTAL AEROSOL OPTICAL DEPTH AT 1240NM         ; AOD1240 ; 216.210
+
+		*
+        /   
+    } = Z
+
+    CLASS
+    {
+        OPERATIONS  ;   OD
+        RESEARCH    ;   RD
+        REANALYSE   ;   ER
+        ECSN        ;   CS
+        REANALYSE40 ;   E4
+		ERA INTERIM ;   EI
+        DEMETER     ;   DM
+        PROVOST     ;   PV
+        ELDAS       ;   EL
+        TOST        ;   TO
+        COSMO       ;   CO
+        ENSEMBLES   ;   EN
+        MERSEA      ;   ME
+		SREPS       ;   SR
+		DTS         ;   DT
+		LACE        ; LAEF   ; ALADIN-LAEF ;   LA
+		YOTC        ;   YT
+		MACC        ;   MC
+		PERMANENT EXPERIMENT ; PE
+		E20CM       ; EM
+		E20C        ; E2
+		ESAT        ; EA
+		EPST        ; EP
+
+        EURO4M      ; 4M
+
+		! Member stats
+
+		AUSTRIA		;	AT 
+		BELGIUM		;	BE 
+		CROATIA		;	HR 
+		DENMARK		;	DK 
+		FINLAND		;	FI 
+		FRANCE		;	FR 
+		GERMANY		;	DE 
+		GREECE		;	GR 
+		HUNGARY		;	HU 
+		ICELAND		;	IS 
+		IRELAND		;	IE 
+		ITALY		;	IT 
+		NETHERLANDS	;	NL 
+		NORWAY		;	NO 
+		PORTUGAL	;	PT 
+		SLOVENIA	;	SI 
+		SPAIN		;	ES 
+		SWEDEN		;	SE 
+		SWITZERLAND	;	CH 
+		TURKEY		;	TR 
+		UNITED KINGDOM;	UK 
+
+		! Test
+		METAPS      ;   MA
+		TEST        ;   TE
+    } = OD
+
+    TYPE
+    {
+		3D VARIATIONAL ANALYSIS     ;   3V
+		3D VARIATIONAL GRADIENTS    ;   3G
+		4D VARIATIONAL ANALYSIS     ;   4V
+		4D VARIATIONAL INCREMENTS   ;   4I
+		4D VARIATIONAL GRADIENTS    ;   4G
+		ADJOINT SINGULAR VECTOR     ;   AS
+		ANALYSIS BIAS               ;	AB
+		ANALYSIS INPUT              ;	AI
+		ANALYSIS FEEDBACK           ;	AF
+		ANALYSIS                    ;   AN
+		ASSIMILATION RUN            ;   AR
+		BIAS-CORRECTED FORECAST     ;   BF
+		CALIBRATION VALIDATION FORECAST      ;   CV
+		CLIMATE DISTRIBUTION        ;   CD
+		CLIMATOLOGY                 ;   CL
+		CLUSTERING INFORMATION      ;   CI
+		CLUSTER MEANS               ;   CM
+		CLUSTER REPRESENTATIVE      ;   CR
+		CLUSTER STD DEVIATIONS      ;   CS
+		CONTROL FORECAST            ;   CF
+		EMPIRICAL DISTRIBUTION      ;   ED
+		ENSEMBLE MEAN               ;   EM
+		ENSEMBLE STANDARD DEVIATION ;   ES
+		ERRORS IN ANALYSIS          ;   EA
+		ERRORS IN FIRST GUESS       ;   EF
+		EXTREME FORECAST INDEX      ;   EFI
+		EXTREME FORECAST INDEX CONTROL ;   EFIC
+		FIRST GUESS                 ;   FG
+		FLUX FORCING REALTIME       ;   FF
+		FORECAST                    ;   FC
+		SIMULATED IMAGES            ;   SIM
+		SIMULATED SATELLITE DATA    ;   SSD
+		EVENT PROBABILITY           ;   EP
+		FORECAST PROBABILITY        ;   FP
+		FORECAST ACCUMULATION       ;   FA
+		FLUX FORCING                ;   FX
+		GRIDDED OBSERVATIONS        ;   GO
+		HINDCAST MEAN               ;   HCMEAN
+		IMAGES                      ;   IM
+		INIT. ANALYSIS              ;   IA
+		INITIAL CONDITION PERTURBATION ; ICP
+		MODEL ERRORS                ;   ME
+		OBSERVATIONS                ;   OB
+		OCEAN FORWARD               ;   OF
+		OCEAN REANALYSIS            ;   OR
+		OI ANALYSIS                 ;   OI
+		OLD FORMAT IMAGES           ;   OLDIM
+		PERTURBED ANALYSIS          ;   PA
+		PERTURBED FORECAST          ;   PF
+		PROBABILITY BOUNDARY        ;   PB
+		PROBABILITY DISTRIBUTION    ;   PD
+		SCALED ENSEMBLE STANDARD DEVIATION ;   SES
+		SENSITIVITY FORECAST        ;   SF
+		SENSITIVITY GRADIENT        ;   SG
+		SHIFT OF TAILS              ;   SOT
+		SIGNAL VARIANCE             ;   SVAR
+		SINGULAR VECTOR             ;   SV
+		TIME AVERAGE ENSEMBLE MEAN  ;               TAEM
+		TIME AVERAGE ENSEMBLE STANDARD DEVIATION ;  TAES
+		TRAJECTORY FORECAST         ;   TF
+		TUBE                        ;   TU
+		WEATHER PARAMETERS          ;   WP
+		WEIGHTED ENSEMBLE MEAN               ;   WEM
+		WEIGHTED ENSEMBLE STANDARD DEVIATION ;   WES
+		FEEDBACK                    ;   FB
+                CLIMATE SIMULATION          ;   SI
+		CLIMATE 30 DAYS SIMULATION  ;   S3
+
+		FCMEAN
+		FCMAX
+		FCMIN
+		FCSTDEV
+		ODB FEEDBACK                ; OFB
+		MONDB FEEDBACK              ; MFB
+
+    } = AN
+    
+    STREAM
+    {
+		ANALYSIS FOR MULTIANALYSIS PROJECT ; AMAP
+        BRACKNELL               ; EXETER  ;   EGRR    
+        CHERNOBYL               ;   CH; CHER
+        DAILY ARCHIVE           ;   DA; OPER
+		DAILY ARCHIVE HINDCASTS ;   DAHC
+		DAILY CLIMATOLOGY       ;   DACL
+		DAILY CLIMATOLOGY WAVE  ;   DACW
+        ENSEMBLE DATA ASSIMILATION      ;   ENDA
+		ENSEMBLE DATA ASSIMILATION MONTHLY MEANS                      ; EDMM
+		ENSEMBLE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS       ; EDMO
+		ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS  ; EWMO
+		ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS                 ; EWMM
+		ENSEMBLE LONG WINDOW DATA ASSIMILATION      ; ELDA
+		ENSEMBLE WAVE LONG WINDOW DATA ASSIMILATION ; EWLA
+        ENSEMBLE FORECASTS      ;    EF ; ENFO
+		ENSEMBLE FORECAST HINDCASTS ; EFHC
+		ENSEMBLE FORECAST HINDCAST STATISTICS ; EFHS
+		ENSEMBLE FORECAST OVERLAP ; EFOV
+        ENSEMBLE WAVE DATA ASSIMILATION   ;   EWDA
+		ENFH
+		ENWH
+		EFHO
+		EWHO
+		ERS1                    ;   E1
+		EUROSIP MONTHLY MEANS            ;   ESMM
+		EUROSIP HINDCAST MONTHLY MEANS   ;   EHMM
+        FG                               ;  FGGE         
+        MEANS ARCHIVE           ;   MA
+		MELBOURNE               ;   AMMC
+
+		LONG WINDOW DAILY ARCHIVE             ; LWDA
+		LONG WINDOW WAVE                      ; LWWV
+		MONTHLY FORECAST                      ; MNFC
+		MONTHLY FORECAST HINDCASTS            ; MNFH
+		MONTHLY FORECAST ANOMALIES            ; MNFA
+		MONTHLY FORECAST WAVE                 ; MNFW
+		MONTHLY FORECAST HINDCASTS WAVE       ; MFHW
+		MONTHLY FORECAST ANOMALIES WAVE       ; MFAW
+		MONTHLY FORECAST MEANS                ; MNFM
+		MONTHLY FORECAST HINDCASTS MEANS      ; MFHM
+		MONTHLY FORECAST ANOMALIES MEANS      ; MFAM
+		MONTHLY FORECAST WAVE MEANS           ; MFWM
+		MONTHLY FORECAST HINDCASTS WAVE MEANS ; MHWM
+		MONTHLY FORECAST ANOMALIES WAVE MEANS ; MAWM 
+
+		MONTHLY STDDEV         ;   SYNOPTIC MONTHLY VARIANCE AND CO-VARIANCE ; MV ; MSDC
+		MONTHLY DAILY STDDEV   ;   MONTHLY VARIANCE AND CO-VARIANCE ; MSDA  
+		MONTHLY DAILY MEANS    ;   MONTHLY MEANS OF DAILY MEANS ;   MODA
+		MONTHLY DAILY FORECAST ACCUMULATION ; MDFA
+		MONTHLY MEANS BOERS    ;   MOBR
+        MONTHLY                ; SYNOPTIC MONTHLY MEANS ;   MO; MNTH
+		MONTHLY STDDEV BOERS   ;   MVBR
+
+		SYNOPTIC MONTHLY VARIANCE AND CO-VARIANCE OF FILTERED FIELDS ;  MFVC
+		MONTHLY VARIANCE AND CO-VARIANCE OF FILTERED FIELDS          ;  MFVA
+
+        MONTREAL               ;   CWAO
+        MULTIANALYSIS ENSEMBLE DATA  ;   MAED
+        MULTIANALYSIS WAVE DATA      ;   MAWV
+
+		MULTIMODEL SEASONAL FORECAST                ; MMSF
+		MULTIMODEL SEASONAL FORECAST MEANS          ; MSMM
+		MULTIMODEL SEASONAL FORECAST WAVE           ; WAMS
+		MULTIMODEL SEASONAL FORECAST WAVE MEANS     ; MSWM
+		MULTIMODEL SEASONAL FORECAST MEAN ANOMALIES ; MMSA
+
+		MULTIMODEL MULTIANNUAL FORECAST             ; MMAF
+		MULTIMODEL MULTIANNUAL FORECAST MEANS       ; MMAM
+		MULTIMODEL MULTIANNUAL FORECAST WAVE        ; MMAW
+		MULTIMODEL MULTIANNUAL FORECAST WAVE MEANS  ; MMWM
+
+        OFFENBACH              ;   EDZW
+		OCEAN                  ;   OCEA
+        OLD MONTHLY FORECAST             ;   MOFC  
+        OLD MONTHLY FORECAST MEANS       ;   MOFM  
+		OLD WAVE MONTHLY FORECAST        ;   WAMF
+		OLD WAVE MONTHLY FORECAST  MEANS ;   WMFM
+        PARIS                  ;   LFPW 
+		SEASONAL FORECAST      ;   SEAS
+		SEASONAL MONTHLY MEANS ; SFMM
+		SEASONAL MONTHLY MEANS ANOMALIES ; SMMA
+		SEASONAL WAVE MONTLHY MEANS ; SWMM
+		SENSITIVE AREA PREDICTIONS ; SEAP
+		SENSITIVITY FORECAST   ;    SF ; SENS
+		SHORT CUTOFF DAILY ARCHIVE  ;   SCDA
+		SHORT CUTOFF WAVE      ;   SCWV
+		DELAYED CUTOFF DAILY ARCHIVE  ;   DCDA
+		DELAYED CUTOFF WAVE           ;   DCWV
+		SSBT                   ;   SSBT
+		SSMI                   ;   SSMI
+        SUPPLEMENTARY DATA     ;   SD ; SUPD
+        ENSEMBLE SUPPLEMENTARY DATA     ;   ESPD
+        TOGA                   ;   TG ; TOGA
+        TOKYO                  ;   RJTD
+        WASHINGTON             ;   KWBC
+        WAVE                   ;   WV ; WAVE
+        WAVE ENSEMBLE FORECAST ;   WAEF
+        WAVE ENSEMBLE FORECAST HINDCASTS ;   EWHC
+        WAVE ENSEMBLE FORECAST OVERLAP ;   WEOV
+        WAVE ENSEMBLE HINDCAST STATISTICS ;   WEHS
+        WAVE HINDCASTS         ;   WVHC
+		WAVE MODEL             ;   WAVM
+        WAVE SEASONAL FORECAST ;   WASF
+        WAMO                   ;   WAMO
+        WMO                    ;   WM
+        UKMO CLIMATE SUPPORT   ;   UKMO
+        CNRM CLIMATE SUPPORT   ;   CNRM
+        MPI  CLIMATE SUPPORT   ;   MPIC
+		2243
+		2242
+    } = DA
+
+	ORIGIN 
+	{
+		OFF ; OFF
+        WASHINGTON            ;   7     ; KWBC
+        BRACKNELL   ; EXETER  ;   74    ; EGRR    
+        FLEET NUMERICAL       ;   58    ; FNMOC ; FNMO
+        OFFENBACH             ;   78    ; DWD   ; EDZW
+        ECMWF                 ;   98    ; ECMF
+		TOULOUSE              ;   85    ; LFPW
+		PARIS                 ;   84    ; LFPW
+		MADRID                ;   214   ; LEMM
+		UNIVERSITY OF VIENNA  ;   244   ; VUWIEN
+		KNMI                  ;   245   ; KNMI
+		INGV                  ;   235   ; INGV
+		CERFACS               ;   239   ; CRFC
+		IFMK                  ;   246   ; IFMK
+		HADLEY CENTRE         ;   247   ; HADC
+		CONSENSUS             ;   255   ; CONSENSUS
+# for TIGGE
+		MELBOURNE             ;   1     ; AMMC
+        TOKYO                 ;   34    ; RJTD
+        MONTREAL              ;   54    ; CWAO
+        BEIJING               ;   38    ; BABJ
+		SEOUL                 ;   40    ; RKSL
+		CPTEC                 ;   46    ; SBSJ
+		CNMC                  ;   80    ; CNMC
+		OSLO                  ;   88    ; ENMI
+		/
+		ALL
+	} = OFF
+
+    MODEL
+	{
+		OFF
+		ECMF
+		EDZW
+		EGRR
+		LFPW
+		KWBC
+		NONE
+		HRM
+		LM
+		IFS
+		GLOBAL ; GLOB
+		@
+	} = OFF
+
+	SYSTEM {
+		*
+		ALL
+	}
+
+	METHOD {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+	}
+
+	PRODUCT {
+		INSTANTANEOUS     ; INST
+		TIME-SERIES       ; TIMS
+		TIME-AVERAGE      ; TAVG
+		TIME-ACCUMULATION ; TACC
+		ALL
+	} = INSTANTANEOUS
+
+	SECTION {
+		HORIZONTAL  ; H
+		VERTICAL    ; V
+		ZONAL       ; Z 
+		MERIDIONAL  ; M
+		ALL
+	} = HORIZONTAL
+
+
+
+    LEVTYPE  
+    {
+		POTENTIAL VORTICITY   ; PV
+		POTENTIAL TEMPERATURE ; PT
+        SURFACE               ; SFC
+        PRESSURE LEVELS       ; PL
+        MODEL LEVELS          ; ML
+		DEPTH                 ; DP
+		OCEAN WAVE            ; WV
+		LAYER                 ; LAYER
+		CATEGORY              ; CAT
+		ALL
+    } = PL
+    
+    REPRES 
+    {
+        BUFR            ;   BU
+        SPHERICAL HARMONICS ;   SH
+        LAT LONG GRID       ;   LL
+        GAUSSIAN GRID       ;   GG
+		SPACE VIEW          ; SV
+		OCEAN GRID          ; OG
+		ALL
+    } = SH
+
+    OBSTYPE
+    {
+		 *   
+		 /   
+
+		 ALL                = (NSD/SD)
+		 CONVENTIONAL; NSD  = (LSD/SSD/VSNS/SLNS/SLS/OD/DD/CC/SF/GBGPS/OSTIA)
+		 SD                 = (SDS/VSS/SSMI/SSMIS/SSBT/TRMM/QSCAT/REO3/IASI/ATMS/CRIS)
+
+# Image stuff
+
+GRIB IMAGES #= (0/1/10/20)
+
+	FIRST INFRARED BAND  ; FIB ; 0
+	SECOND INFRARED BAND ; SIB ; 1
+	FIRST VISIBLE BAND   ; FVB ; 10
+	WATER VAPOR BAND     ; WVB ; 20
+
+# Extractions
+
+BUFR = (1/3/9/11/13/19/21/22/23/28/61/62/63/82/83/84/85/86/87/91/92/95/96/101/102/103/106/110/140/142/144/145/164)
+WAVESCAT = (121)
+SCAT = (122)
+RALT = (123)
+TOVH = (53)
+GRAD = (88/89/189/190)
+ATOV = (55)
+AIRS = (57)
+STORM = (31)
+IMSSNOW = (165)
+AMSU_EARS = (155)
+BALTIC_CI = (237)
+WAVESAR = (210)
+IASI = (240)
+OSTIA = (26)
+ENVISAT_MERIS = (212)
+ATMS = (201)
+CRIS = (202)
+
+# FeedBack
+
+FBCONV = (1/3/9/11/13/19/21/22/23/28/65/82/83/86/87/91/92/95/96/101/102/103/106/110/140/142/143/144/145/164)
+FBSCAT = (122/136/137/139)
+FBSSMI = (127)
+FBTMI  = (129)
+FBTOVS = (53)
+FBRAD1C = (54/55)
+FBGEOS = (89/189/190)
+FBTRMR = (255)
+FBREO3 = (206)
+FBAIRS = (57)
+FBAMSRE = (59)
+FBSSMIS = (49)
+FBGPSRO = (250)
+FBIASI = (240)
+FBWINDSAT = (156)
+
+# Type LSD (NSD)
+
+	LAND SURFACE DATA         ; LSD = (1/2/3/4/7/140/165/28)
+
+	SYNOP LAND                ; S   ; 1
+	SYNOP RECORD 2 LAND       ; S2  ; 2
+	SYNOP AUTO LAND           ; SA  ; 3
+	SYNOP AUTO RECORD 2 LAND  ; SA2 ; 4
+	SOIL AND EARTH TEMPERATURE; SET ; 7
+	METAR                     ; METAR ; 140
+	SNOW COVER                ; SNOWCOVER ; SNOW ; 165
+	SNOW DEPTH                ; SNOWD ; 28
+
+# Type SSD (NSD)
+
+	SEA SURFACE DATA ; SSD  = ( 9/11/12/13/14/19/21/22/23 )
+
+	SYNOP ABBREVIATED SHIP    ; SAB ; 9
+	SYNOP SHIP               ; SS   ; 11
+	SYNOP RECORD 2 SHIP      ; SS2  ; 12
+	SYNOP AUTO SHIP          ; SAS  ; 13
+	SYNOP AUTO RECORD 2 SHIP ; SAS2 ; 14
+	SHRED                    ; SH   ; 19
+	DRIBU SURFACE             ; DSU ; 21
+	BATHY SURFACE             ; BSU ; 22
+	TESAC SURFACE             ; TSU ; 23
+	OSTIA                     ;       26
+	BUOY                      ;       27
+
+
+# Type VSNS (NSD)
+
+VERTICAL SOUNDINGS NOT SATELLITE ; VSNS = (91/92/95/96/97/101/102/103/104/105/106/107)
+
+	PILOT LAND   ;  P   ; 91
+	PILOT SHIP   ;  PS  ; 92
+	WIND PROFILE ;  WP  ; 95
+	EUROPEAN WIND PROFILE;  EWP  ; 96
+	EUROPEAN WIND AND TEMPERATURE PROFILE;  EWTP  ; 97
+	TEMP LAND    ;  T   ; 101
+	TEMP SHIP    ;  TS  ; 102
+	TEMP DROP    ;  TD  ; 103
+	ROCOB LAND   ;  R   ; 104
+	ROCOB SHIP   ;  RS  ; 105
+	TEMP MOBILE	 ;  TM  ; 106
+	CLIMATE TEMP ;  CT  ; 107
+
+# Type VSS (SD)
+
+VERTICAL SOUNDINGS SATELLITE ; VSS = (51/53/54/55/56/57/59/61/62/63/65/71/72/73/75/138/139/155/250)
+
+	HIGH RESOLUTION        ;  HR    ; 51
+	RTOVS                  ;  RTOV  ; 53
+	TOVS1b                 ;  TOVB  ; 54
+	ATOVS                  ;  ATOV  ; 55
+	ATOVS PRODUCTS         ;  ATOP  ; 56
+	AIRS                   ;  AIRS  ; 57
+	ADVANCED MICROWAVE SCANNING RADIOMETER  ;  AMSRE ; 59
+	SATEM MEAN TEMPERATURE ;  SMT   ; 61
+	SATEM WATER            ;  SW    ; 62
+	SATEM HIGHER LEVEL     ;  SHL   ; 63
+	SATEM LEVELS MERGED    ;  SLM   ; 65
+	MEAN TEMPERATURE       ;  MT    ; 71
+	WATER                  ;  W     ; 72
+	HIGHER LEVEL           ;  HL    ; 73
+	TOVS LEVELS MERGED     ;  TLM   ; 75
+	ATOVS EUMETSAT         ;  ATEU  ; 155
+	GPS RADIO OCCULTATION  ; GPSRO ; 250
+	ASCAT                  ; 139
+	OSCAT                  ; 138
+
+	IASI_SCREENED          ; IASI  ; 240
+
+CHEMICAL CONSTITUENT; CC = (162/159)
+
+#	SURFACE OZONE           ;  SO    ; 157
+#	SURFACE OZONE AVERAGED  ;  SOA   ; 158
+	OZONE PARTIAL           ;  OP    ; 159
+	OZONE VERTICAL SOUNDING ;  OVS   ; 162
+
+# Synoptic Features
+
+SYNOPTIC FEATURES; SF = (31)
+    STORM ; STOR ; 31
+	TROPICAL CYCLONE ; TC ; 32
+
+SATELLITE = (VSS/SSBT/SSMI/SSMIS/QSCAT/REO3/WSAT/VASS/ATMS)
+
+# Type SLNS (NSD)
+
+SINGLE LEVEL UPPER AIR NOT SATELLITE ; SLNS = (141/142/143/144/145)
+
+	CODAR ;  COD ; 141
+	AIREP ;  AIR ; 142
+	COLBA ;  COL ; 143
+	AMDAR ;  AM  ; 144
+	ACARS ;  AC  ; 145
+
+# Type SLS (NSD)
+
+SINGLE LEVEL UPPER AIR SATELLITE ; SLS = (82/83/84/85/86/87/88/89/189/190)
+
+	SATOB SECTION 2                            ; SAT2 ; 82
+	SATOB SECTION 3                            ; SAT3 ; 83
+	SATOB SECTION 4                            ; SAT4 ; 84
+	SATOB SECTION 5                            ; SAT5 ; 85
+    HIGH RESOLUTION WINDS                      ; SAT6 ; 86 
+    HIGH DENSITY UNIFIED FORMAT SATELLITE WINDS; SAT7 ; 87
+	GEOSTATIONARY RADIANCES                    ; GEOR ; 88 
+	GEOSTATIONARY CLEAR SKY RADIANCES          ; GCSR ; 89
+	GEOSTATIONARY MSG RADIANCES                ; GMSGR ; 189
+	GEOSTATIONARY ALL SKY RADIANCES            ; GASR ; 190
+
+# Type OD (NSD)
+
+OCEANOGRAPHIC DATA      ;   OD = (131/132/133) 
+
+	DRIBU OCEANOGRAPHIC     ;   DO ; 131
+	BATHY OCEANOGRAPHIC     ;   BO ; 132
+	TESAC OCEANOGRAPHIC     ;   TO ; 133
+
+# Type DD (NSD)
+
+DERIVED DATA ;   DD = (164/237) 
+	PAOBS ; PA ; 164
+	BALTIC SEA ICE ; BICE ; 237
+
+
+
+# Type SDS, ERS1 (SD)
+
+SURFACE DATA SATELLITE  ; ERS1; SDS = (121/122/123/124/210/212/213/214/216)
+
+	WAVE SCATTEROMETER      ; WAS  ; 121
+	WIND SCATTEROMETER      ; WIS  ; 122
+	RADAR ALTIMETER         ; RAL  ; 123
+	SEA SURFACE TEMPERATURE ; SST  ; 124
+	ENVISAT SAR             ; ESAR  ; 210
+	ENVISAT MERIS           ; EMERIS ; 212
+	ENVISAT RADAR ALTIMETER ; ERA  ; 213
+	JASON RADAR ALTIMETER ;   JRA  ; 214
+	JASON2 RADAR ALTIMETER ;  J2RA ; 216
+
+# RADAR
+	REPROCESSED WIND        ; RW ;  NEXRAD ; 125
+NEXRAD_RR = (125)
+
+# SSMI
+	
+	MICROWAVE IMAGES  ;  SSMI = (126)
+        SPECIAL SENSOR MICROWAVE IMAGER SOUNDER ; SSMIS = (49)
+
+SEA SURFACE BRIGTHNESS TEMPERATURE ; SSBT ; 127
+
+# TRMM
+TRMM = (129/130)
+TMI BRIGHTNESS TEMPERATURES              ; TBT  ; 129
+TMI INSTANTANEOUS 3-D RAINFALL STRUCTURE ; TI3R ; 130
+
+QSCAT = (137/138)
+QUIKSCAT                                 ; QSCA ; 137
+QUIKSCAT SEAWINDS                        ; QSSW ; 138
+
+REO3 = (206/207/208/209/217)
+RETRIEVED OZONE                          ; REO3 ; 206
+MODIS AEROSOL                                                            ; MODIS     ; 207
+LAYER INTEGRATED MASS DENSITY                                            ; LIMD      ; 208
+LAYER INTEGRATED MASS DENSITY WITH AVERAGING KERNELS                     ; LIMD_AK   ; 209
+LAYER INTEGRATED MASS DENSITY WITH AVERAGING KERNELS AND A PRIORI PROFIL ; LIMD_AKPP ; 217
+
+GBGPS = (110)
+GROUND BASED GPS                         ; PGPS ; 110
+
+WINDSAT                                  ; WSAT ; 156
+VASS = (154)
+VERTICAL ATMOSPHERIC SOUNDER SYSTEM      ; VASS ; 154
+
+ADVANCED TECHNOLOGY MICROWAVE SOUNDER      ; ATMS ; 201
+CROSS-TRACK INFRARED SOUNDER               ; CRIS ; 202
+
+} = SYNOP LAND
+
+	REPORTYPE {
+
+%include "reportypes.def"
+
+		*
+		/
+		OFF
+	} = OFF
+
+	OBSGROUP {	
+#		CONVENTIONAL
+		SAT          ; SATELLITE
+		ERS1 
+		TRMM
+		QSCAT
+#		IASI
+
+		# reo3 needs to stay for compatibility 
+		REO3
+
+%include "obsgroups.def"
+
+	} = CONV
+    
+    DOMAIN
+    {
+		GENERAL EUROPEAN AREA   ; G
+		GLOBE                   ; G
+        MEDITERRANEAN           ; M
+        NORTHERN HEMISPHERE     ; N
+        SOUTHERN HEMISPHERE     ; S
+		BALTIC AND BLACK SEA    ; B
+		EUROPE                  ; E
+        NORTH WEST EUROPE       ; A
+        NORTH EAST EUROPE       ; B
+        SOUTH WEST EUROPE       ; C
+        SOUTH EAST EUROPE       ; D
+		WESTERN ATLANTIC        ; W
+		FASTEX                  ; F
+		TROPICS                 ; T
+		TROPICS 2               ; U
+		X
+		ALL
+		V
+		H
+		I
+		J
+		K
+		L
+		O
+		P
+		Q
+		R
+		Y
+		Z
+    } = GLOBE
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY         ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+        CURRENT DATE ; 0
+        YESTERDAY    ; -1
+		TO          ; TO
+		BY          ;   BY
+		/
+		OFF
+    } = CURRENT DATE
+
+	IDENT {
+        METEOSAT 3 ; MS3  ; 50
+        METEOSAT 4 ; MS4  ; 51
+        METEOSAT 5 ; MS5  ; 52
+        METEOSAT 6 ; MS6  ; 53
+        METEOSAT 7 ; MS7  ; 54
+        METEOSAT 8 ; MS8  ; 55
+        GOES 8     ; GOES ; 252
+        GOES 9     ;        253
+        GOES 10    ;        254
+        GOES 11    ;        255
+        GOES 12    ;        256
+		DMSP 10 ; 204
+		DMSP 13 ; 246
+		/
+		OFF
+	} = OFF
+
+	INSTRUMENT {
+		MHS          ; 203
+		MVIRI        ; 205
+		SEVIRI       ; 207
+		GOES IMAGER  ; 615
+		AMSU-A       ; 570
+		AMSU-B       ; 574
+		MSU          ; 623
+		HIRS2        ; 605
+		HIRS3        ; 606
+		SSU          ; 627
+		*
+		OFF
+		/
+	} = OFF
+
+	CHANNEL {
+		*
+		OFF; OFF
+		/
+		TO 
+		ALL
+	} = OFF
+
+    PADDING  
+    {
+		AUTOMATIC   ; AUTO
+		NONE        ; N    ; 0
+		OFF
+		*
+    } = OFF
+    
+	BRANCH 
+	{
+		TRUE
+		FALSE
+		OFF
+	} = OFF
+
+} ! END OF DUMMY
+
+HELP    ;   Displays prints help file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+NEWS    ;   Displays prints news file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+END ;   Normal exit from mars system    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+DEFAULT ;   Reset defaults    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+ARCHIVE ;   Archives data   ;   MARS
+{
+
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  { &_DUMMY&CLASS  } = OD
+
+    TYPE   { &_DUMMY&TYPE   } = AN
+
+    STREAM { &_DUMMY&STREAM } = DA
+    
+	MODEL  { &_DUMMY&MODEL  } = OFF
+
+	ORIGIN { &_DUMMY&ORIGIN } = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+
+    REPORTYPE { &_DUMMY&REPORTYPE } = OFF
+
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+        /
+    } = 1
+    
+    LEVTYPE { &_DUMMY&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/400/300
+    
+    REPRES { &_DUMMY&REPRES } = SH
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+    
+    OBSTYPE { ALL
+		 KNOWN				= (ALL)
+	&_DUMMY&OBSTYPE } = S
+
+    IDENT
+    {
+		&_DUMMY&IDENT
+		ALL 
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } = CONVENTIONAL	
+    
+    PARAM { &_DUMMY&PARAM } = Z
+
+    CHANNEL { &_DUMMY&CHANNEL } = OFF
+    
+	INSTRUMENT { &_DUMMY&INSTRUMENT } = OFF
+
+    DATE 
+	{
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    VERIFY 
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+    REFERENCE 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        
+		OFF
+    } = OFF 
+
+    STEP
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+    } = NEW
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+    } = OFF
+
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    } = G
+    
+    RESOL
+    {
+        /
+        *   
+    }
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+		OFF
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+
+	CRC
+	{
+		ON
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+    } = REMOVE
+
+	PADDING
+	{
+		&_DUMMY&PADDING
+	} = OFF
+
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+		SERVER 
+        OFF ;   OFF
+    } = OFF
+
+	BRANCH { &_DUMMY&BRANCH } = OFF
+
+} ! END OF ARCHIVE
+
+!------------------------------------------------------------------------
+
+LIST    ;   LIST FDF ENTRIES AND CFS FILES  ;   MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  
+	{ 
+		&_DUMMY&CLASS  
+		/ 
+		ALL
+	} 
+    
+    TYPE   
+	{ 
+		&_DUMMY&TYPE  
+		/  
+		ALL
+	} 
+
+    STREAM 
+	{ 
+		&_DUMMY&STREAM 
+		/ 
+		ALL
+	} 
+    
+	MODEL 
+	{
+		&_DUMMY&MODEL
+		/
+		ALL
+	}
+
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+		ALL
+	}
+
+	SYSTEM 
+	{ 	
+		&_DUMMY&SYSTEM 
+		/
+		ALL 
+	} 
+
+	METHOD 
+	{ 	
+		&_DUMMY&METHOD 
+		/
+		ALL 
+	} 
+
+	PRODUCT 
+	{ 	
+		&_DUMMY&PRODUCT 
+		/
+		ALL 
+	} 
+
+	SECTION 
+	{ 	
+		&_DUMMY&SECTION 
+		/
+		ALL 
+	} 
+
+	LATITUDE 
+	{ 	
+		@
+		/
+		ALL 
+	} 
+
+	LONGITUDE 
+	{ 	
+		@
+		/
+		ALL 
+	} 
+
+    EXPVER{
+		@
+		/
+		ALL
+    } 
+    
+    LEVTYPE 
+	{ 
+		&_DUMMY&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&_DUMMY&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&_DUMMY&DOMAIN
+		/
+		ALL
+    } 
+
+    OBSTYPE 
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+		/
+    } 
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } = ALL
+    
+    REPORTYPE { ALL
+	&_DUMMY&REPORTYPE } = OFF
+
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+		/
+    }
+    
+    CHANNEL 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&CHANNEL 
+	} 
+
+    INSTRUMENT 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&INSTRUMENT 
+	} 
+
+	IDENT
+	{
+		ALL
+		&_DUMMY&IDENT
+		*
+	}
+
+	PSEUDODATE
+	{
+		LATEST
+		EARLIEST
+	}
+
+    DATE
+    {
+		&_DUMMY&DATE
+		ALL
+    } 
+    
+    VERIFY 
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+		ALL
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	YEAR
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+    
+	DECADE
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    REFERENCE 
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = OFF 
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    ENSEMBLE
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    CLUSTER
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } 
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+		OFF
+	} 
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    CFSPATH  
+    {
+        "   
+    } = ""
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } = OFF
+    
+    RESOL 
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	LOCATION 
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	PADDING
+	{
+		&_DUMMY&PADDING
+	} = OFF
+
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+		SERVER
+        OFF ;   OFF
+    } = OFF
+
+	BRANCH { &_DUMMY&BRANCH } = OFF
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	OUTPUT {
+		TABLE
+		BROWSE
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+
+} ! END OF LIST
+
+STAGE    ;   STAGE FIELDS ;    MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE
+	{ 
+		&_DUMMY&TYPE   
+		ALL
+	} = AN
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+	} = DA
+    
+	MODEL 
+	{
+		&_DUMMY&MODEL
+		/
+	} = OFF
+
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+	} = OFF
+
+    EXPVER
+	{
+		@
+        *   
+    } = 1
+    
+
+	SYSTEM 
+	{ 	
+		&_DUMMY&SYSTEM 
+		/
+		ALL 
+	} 
+
+	METHOD 
+	{ 	
+		&_DUMMY&METHOD 
+		/
+		ALL 
+	} 
+
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+    DOMAIN
+    {
+		&_DUMMY&DOMAIN
+    } = G
+
+    OBSTYPE
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = S
+
+	OBSGROUP 
+	{ 
+		&_DUMMY&OBSGROUP
+		OFF    ; OFF
+	} = OFF
+
+    PARAM
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+    } = Z
+    
+    CHANNEL { 
+		ALL     ; ALL
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    INSTRUMENT { 
+		ALL     ; ALL
+		&_DUMMY&INSTRUMENT 
+	} = OFF
+
+    DATE
+    {
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    VERIFY 
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+	REFERENCE 
+	{
+		ALL ;   ALL
+		*
+		/
+		TO  ;   TO
+		BY  ;   BY
+		OFF
+	} = OFF
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    ENSEMBLE
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    BLOCK
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    IDENT
+    {
+		ALL 
+		&_DUMMY&IDENT 
+    }=OFF
+    
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+	RESOL
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+        *   
+	} = AUTO
+
+	ACCURACY
+	{
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+	} = N
+
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+
+	AREA
+	{
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+	} = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	GRID
+	{
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+	} = OFF
+
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+		OFF
+    } = OFF
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	BRANCH { &_DUMMY&BRANCH } = OFF
+
+	DATABASE 
+	{
+		@
+		/
+		OFF
+	} 
+
+} ! END OF STAGE
+
+!------------------------------------------------------------------------
+
+REMOVE  ;   REMOVE FDF ENTRIES AND CFS FILES    ;   MARS
+{
+    
+    CLASS  { 
+
+		RESEARCH    ;   RD
+		OD
+
+		AUSTRIA		;	AT 
+		BELGIUM		;	BE 
+		CROATIA		;	HR 
+		DENMARK		;	DK 
+		FINLAND		;	FI 
+		FRANCE		;	FR 
+		GERMANY		;	DE 
+		GREECE		;	GR 
+		HUNGARY		;	HU 
+		ICELAND		;	IS 
+		IRELAND		;	IE 
+		ITALY		;	IT 
+		NETHERLANDS	;	NL 
+		NORWAY		;	NO 
+		PORTUGAL	;	PT 
+		SLOVENIA	;	SI 
+		SPAIN		;	ES 
+		SWEDEN		;	SE 
+		SWITZERLAND	;	CH 
+		TURKEY		;	TR 
+		UNITED KINGDOM;	UK 
+
+	} = RD
+
+    
+    PASSWORD
+    {
+        "   
+		@
+    } 
+    
+    EXPVER
+    {
+		@
+        "   
+    } = ""
+    
+    DOMAIN
+    {
+		&_DUMMY&DOMAIN
+    }
+    
+	DATABASE
+	{
+		@
+		*
+		/
+		OFF
+	} 
+
+    TYPE   { &_DUMMY&TYPE   }
+
+	DATE { 
+		*
+		TO
+		/
+	}
+
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } 
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} 
+
+	TIME {
+		*
+		TO
+		/
+	}
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+	}
+    
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+	}
+
+
+	SYSTEM 
+	{ 	
+		&_DUMMY&SYSTEM 
+		/
+		ALL 
+	} 
+
+	METHOD 
+	{ 	
+		&_DUMMY&METHOD 
+		/
+		ALL 
+	} 
+
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF }
+	SECTION { &_DUMMY&SECTION 
+			  OFF }
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+	}
+
+	VOLUME { * }
+
+	CREATED { * }
+
+	LASTACCESS { * }
+
+	EXPR { 
+		"
+		* 
+	}
+
+} ! END OF REMOVE
+
+!------------------------------------------------------------------------
+    
+!------------------------------------------------------------------------
+
+EXPORT  ;   Write cfs files to tape    ;   MARS
+{
+    
+    VOLSER
+    {
+        "   
+    } = ""
+    
+    SLOTNO
+    {
+        "   
+    } = ""
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    DENSITY
+    {
+        *
+    } = 6250
+    
+    RECLEN
+    {
+        *   
+    } = 120
+    
+    FILESEQ
+    {
+        *   
+    } = 1
+    
+    SOFTWARE
+    {
+        "   
+    } = ""
+    
+    FILTER
+    {
+        "   
+    } = "*"
+    
+    CHECK
+    {
+        YES ;   Y
+        NO  ;   N
+    } = NO
+
+}
+
+!------------------------------------------------------------------------
+
+
+RETRIEVE_ODB    ;   Retrieval of data   ;   MARS
+{
+    
+	DATASET [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		@
+	}
+
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE  	[	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/image/obs/all,
+				mars_interface         = menu,
+				java_hidden  = FALSE ] 
+	{ 
+		&_DUMMY&TYPE   
+		*
+	} = AN
+
+
+    STREAM 	[ 	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&STREAM 
+		*
+	} = DA
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				marsdoc      = id,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+	{
+		@
+		1
+        "   
+        *   
+        /
+    } = 1
+    
+
+    MODEL 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				hidden       = TRUE,
+				java_hidden  = FALSE ]
+	{
+		&_DUMMY&MODEL
+	} = OFF
+
+    REPRES [ java_control = CHOICE, 
+			 java_section = ID, 
+			 marsdoc      = id,
+			 java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+	OBSGROUP [ 	java_hidden  = false , 
+				visible      = true, 
+				check        = false,
+				priority     = 0]
+	{ 
+		&_DUMMY&OBSGROUP 
+		OFF    ; OFF
+	} = OFF
+
+    REPORTYPE 
+	{ 
+		&_DUMMY&REPORTYPE 
+	} = OFF
+
+    
+	RDBPREFIX [	java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{ 
+		@
+		"
+		OFF    ; OFF
+	} = OFF
+    
+    OBSTYPE [ help = help_multiple_selection, # For Metview
+			java_control = LIST_2, 
+			marsdoc      = obs/image/all,
+			mars_interface         = list,
+				check        = false,
+			java_section = METEO, java_hidden = FALSE, priority = 1 ]
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = S
+
+    LEVTYPE [ java_control = CHOICE, 
+			  java_section = ID, 
+			  marsdoc      = field/all,
+			  mars_interface         = menu,
+			  java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, 
+			   java_section = ID, 
+			   marsdoc      = field/level,
+			   mars_interface         = text,
+			   java_hidden = FALSE ]
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, 
+			marsdoc      = field/all,
+			mars_interface         = list,
+			java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             
+        &_DUMMY&PARAM
+    } = Z
+    
+	YEAR [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	DECADE [
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+		&_DUMMY&DATE
+    } = YESTERDAY
+    
+    VERIFY [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   hidden      = TRUE,
+			check        = false,
+		   java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE [ java_control = CHOICE_TEXT_2,
+				java_section = DATE,
+				marsdoc      = date/all,
+				mars_interface         = text,
+				java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+
+    HDATE [ java_control = CHOICE_TEXT_2,
+				java_section = DATE,
+				marsdoc      = date/all,
+				mars_interface         = text,
+				java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		ALL
+		OFF          ; OFF
+    } = OFF
+
+    FCMONTH [ java_control = CHOICE_TEXT_2,
+			java_section = DATE,
+			marsdoc      = date/all,
+			mars_interface         = text,
+			java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD [ java_control = CHOICE_TEXT_2,
+			java_section = DATE,
+			marsdoc      = date/all,
+			mars_interface         = text,
+			java_hidden = FALSE ]
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+	LEADTIME [ java_control = CHOICE_TEXT_2,
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+		ALL
+	} = OFF
+
+	OPTTIME [ java_control = CHOICE_TEXT_2,
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+		ALL
+	} = OFF
+
+	RANGE [ java_control = CHOICE_TEXT_2, 
+			java_section = DATE, 
+			marsdoc      = date/obs,
+			mars_interface         = text,
+			java_hidden = FALSE ]
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+    STEP [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+!		* [DAY]
+!		* [MONTH]
+!		* [WEEK]
+!		* [VERIFY]
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    }
+    
+    REFERENCE [ java_control = CHOICE_TEXT_2, 
+				java_section = DATE, 
+				marsdoc      = date/field,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } = OFF 
+
+    ENSEMBLE [ 	java_control = CHOICE_TEXT_2, 
+				visible      = false, 
+			check        = false,
+				java_section = OTHER, 
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+    {
+        ALL
+		TO  
+        *   
+        /   
+        OFF ;  OFF
+    } = OFF
+    
+    CLUSTER [ 	java_control = CHOICE_TEXT_2, 
+				visible = false, 
+			check        = false,
+				java_section = OTHER, 
+				java_hidden = FALSE ]
+    {
+        ALL
+		TO  
+        *   
+        /   
+        OFF ;  OFF
+    } = OFF
+    
+    
+    PROBABILITY [ 	java_control = CHOICE_TEXT_2, 
+					visible = false, 
+			check        = false,
+					java_section = OTHER, 
+					java_hidden = FALSE ]
+    {
+        ALL 
+		TO  
+        OFF ; OFF
+        *   
+        /
+    } = OFF
+
+    NUMBER [ java_control = CHOICE_TEXT_2, 
+			 java_section = OTHER, 
+			 marsdoc      = field/ensemble,
+			 mars_interface         = text,
+			 java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE [ java_control = CHOICE_TEXT_2,
+				 java_section = OTHER,
+				 marsdoc      = field/ensemble,
+				 mars_interface         = text,
+			     java_hidden = FALSE ]
+
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DOMAIN  [ 	help = help_multiple_selection, # For Metview
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden = FALSE ] 
+    {
+	&_DUMMY&DOMAIN
+    } = GLOBE
+
+    FREQUENCY [ java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = field/wave,
+				mars_interface         = text,
+				java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION [ priority = 0, 
+				marsdoc  = field/wave,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				mars_interface         = text,
+				java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIAGNOSTIC  [ 	priority = 1, 
+				  	marsdoc  = field/sensitivity,
+					mars_interface         = text,
+				  	java_control = CHOICE_TEXT_2, 
+				  	java_section = OTHER, 
+				  	java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION  [ 	java_control = CHOICE_TEXT_2, 
+				 	java_section = OTHER, 
+				 	marsdoc      = field/sensitivity,
+					mars_interface         = text,
+				 	java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    CHANNEL [ 	priority = 0, 
+			  	java_control = CHOICE_TEXT_2, 
+			  	java_section = OTHER, 
+			  	marsdoc     = field/brigthness,
+				mars_interface         = text,
+			  	java_hidden = FALSE ]
+	{ 
+		ALL
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    IDENT
+			# For Metview
+				   [ help = help_script,                  
+				   help_script_command = 
+					'/usr/local/lib/metaps/bin/mcs_sat_availability.sh',
+			check        = false,
+					java_control = CHOICE_TEXT_2, 
+					java_section = DATA, 
+					marsdoc      = image/obs,
+					mars_interface         = list,
+					java_hidden = FALSE 
+				 ]
+											   
+    {
+		ALL 
+		&_DUMMY&IDENT
+		"
+		@
+    }=OFF
+    
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/supplementary,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    SOURCE  [   java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+				mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET [ java_control = TEXT, 
+			 java_section = TARGET, 
+			 marsdoc      = target,
+			 mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+			 java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    LOGSTATS [ java_control = TEXT,
+             java_section = TARGET,
+             marsdoc      = target,
+             mars_interface         = text,
+                hidden      = TRUE,
+            check        = false,
+             java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    }
+
+    TRANSFER [ hidden      = TRUE, check        = false ]
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET  [ java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+			 	mars_interface         = text,
+				priority     = 1,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, 
+			   java_section = TARGET, 
+			   hidden      = TRUE,
+			check        = false,
+			   java_hidden = TRUE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, 
+	          java_section = DATA, 
+				hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP [ java_control = CHOICE,
+			java_section = DATA,
+			hidden      = TRUE,
+			check        = false,
+			java_hidden = FALSE ]
+
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL [ help = help_multiple_selection,  # For Metview
+			check        = false,
+			java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = menu,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 160 ;   N160
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   	java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION [ java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/obs,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF
+    } = G
+
+	LOCATION [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+    INSTRUMENT  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+		&_DUMMY&INSTRUMENT
+    }=OFF
+
+    FILTER  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+				priority     = 0,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+		@
+		OFF
+    }=OFF
+
+	ROTATION [ java_control = CHOICE_TEXT_2,
+			   java_section = DATA,
+			   marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN [  help = help_multiple_selection,  # For Metview
+				java_control = CHOICE_TEXT_2, 
+				java_section = DATA, 
+				marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+				java_hidden = FALSE ]
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION [ marsdoc      = pproc/field,
+			check        = false,
+					mars_interface         = text ]
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING [ help = help_multiple_selection,  # For Metview
+			  java_control = CHOICE_TEXT_2,
+			  java_section = DATA,
+			  marsdoc      = pproc/field,
+			  hidden       = true,
+			check        = false,
+			  mars_interface         = text,
+			  java_hidden = FALSE ]
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		OFF
+	} = OFF
+
+
+    PADDING  [ 	help = help_multiple_selection,  # For Metview
+			check        = false,
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+				mars_interface    = text,
+				java_hidden = FALSE ]
+    {
+		&_DUMMY&PADDING
+		OFF
+    } = OFF
+    
+
+    DUPLICATES  [ 	java_control = CHOICE, 
+				  	java_section = OTHER, 
+				  	marsdoc      = obs,
+					mars_interface    = on_off,
+			check        = false,
+				  	java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, 
+			  java_section = OTHER, 
+			  hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  [ 	java_control=CHOICE, 
+	       	java_section=OTHER, 
+		   	marsdoc     = control,
+			mars_interface         = menu,
+			hidden     = TRUE,
+			check        = false,
+		   	java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+    {
+		LOCAL 
+		SERVER
+        OFF ;   OFF
+    } = OFF
+
+	BRANCH [ java_control = CHOICE, 
+			 java_section = OTHER, 
+			 hidden       = TRUE,
+			 check        = false,
+			 java_hidden = FALSE ]
+	{ &_DUMMY&BRANCH } = OFF
+
+	DATABASE  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				priority = 1,
+				java_hidden = TRUE ]
+	{
+		@
+		/
+		OFF
+	}
+
+	EXPECT [    priority = 0,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+	} = 2.0
+    
+} ! END OF RETRIEVE
+
+COMPUTE ; X ; METVIEW
+{
+    FORMULA {
+		@
+    } = ""
+
+    FIELDSET {
+        @
+    } = OUT
+
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+}
+
+WRITE ; X; METVIEW
+{
+    FIELDSET {
+    @
+    } = OUT
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+    TARGET  {
+		@
+        "
+    } = ""
+}
+
+READ_ODB ; X; METVIEW
+{
+    FIELDSET [ visible = false ] {
+    @
+    } = OUT
+
+	READ_DATA_FROM [ visible = false ]
+	{
+		FILE
+		METVIEW_ICON
+	} = FILE
+
+
+    SOURCE  [ visible = always, help = help_file_box ]
+	{
+		@
+		OFF
+    } = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATA
+		[
+			interface = icon,
+			class           = GRIB,
+			exclusive       = true
+		]
+	{
+		@
+	}
+
+
+	CFSPATH {
+		@
+		OFF
+	} = OFF
+
+    ORDER [ label = 'Field Ordering' ] {
+	AS IS  ; 0
+        SORTED ; 1
+    } = AS IS
+
+	CLASS  { &_DUMMY&CLASS 
+			 ANY ; ANY
+			 } = ANY
+
+	STREAM [ help = help_multiple_selection, exclusive = True ]
+		{ &_DUMMY&STREAM 
+			 ANY ; ANY
+			 *
+			 } = ANY
+
+    TYPE   [ help = help_multiple_selection, exclusive = True ]
+		{ 
+		ANY ; ANY
+		&_DUMMY&TYPE   
+		*
+	} = ANY
+    
+    MODEL   { 
+		ANY ; ANY
+		&_DUMMY&MODEL   
+	} = ANY
+    
+    LEVTYPE
+    {
+		ANY ; ANY
+		&_DUMMY&LEVTYPE
+    } = ANY
+    
+    LEVELIST
+    {
+        ANY ; ANY
+		TO  ; TO
+		BY  ; BY 
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = ANY
+    
+    PARAM [ help = help_multiple_selection ] # For Metview
+    {
+        ANY             ;   ANY
+        &_DUMMY&PARAM
+    } = ANY
+    
+    DATE
+    {
+		ANY             ;   ANY
+		&_DUMMY&DATE   
+    } = ANY
+    
+    VERIFY 
+	{
+		ANY             ;   ANY
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		ANY             ;   ANY
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		ANY             ;   ANY
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME
+    {
+		ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+    } = ANY
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+		ANY
+	} = ANY
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+		ANY
+	} = ANY
+
+    REFERENCE 
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY 
+
+    STEP
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY
+    
+    ANOFFSET
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = ANY
+    
+	RANGE 
+	{
+		*
+		ANY
+	} = ANY
+    
+    ACCURACY 
+    {
+		ANY     ;   ANY
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+		ANY
+    } = ANY
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+		ANY
+    } = ANY
+
+    AREA
+    {
+		ANY ; ANY
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        *   
+        /   
+    } = ANY
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+	RESOL 
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		319
+		213
+		106
+        *   
+		ANY ; ANY
+	} = ANY
+
+	ROTATION
+	{
+		ANY     ; ANY
+		*
+		/
+	} = ANY
+
+    GRID
+    {
+        ANY     ; ANY
+        *   
+        /   
+    } = ANY
+
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+	TARGET [ visible = false ]
+	{
+		@
+		"
+		OFF
+	} = OFF
+
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+
+    FREQUENCY
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+		ANY
+    } = ANY
+    
+    DIRECTION 
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+		ANY
+    } = ANY
+    
+    DIAGNOSTIC
+    {
+        ALL 
+        OFF ;   OFF
+        *   
+        /
+		ANY
+    } = ANY
+
+    ITERATION
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+		ANY
+    } = ANY
+    
+    CHANNEL { &_DUMMY&CHANNEL 
+			 ANY ; ANY
+			 } = ANY
+
+    IDENT { &_DUMMY&IDENT 
+			 ANY ; ANY
+			 } = ANY
+
+    INSTRUMENT { &_DUMMY&INSTRUMENT 
+			 ANY ; ANY
+			 } = ANY
+
+    FILTER  
+    {
+		@
+		ANY ; ANY
+    }= ANY
+
+! For compatibility with RETRIEVE_ODB  They are unset in Mars rules
+
+	REPRES { &_DUMMY&REPRES
+			 ANY ; ANY
+			 } = ANY 
+
+    ORIGIN 	{ &_DUMMY&ORIGIN
+			 ANY ; ANY
+			 } = ANY 
+
+    PADDING  
+    {
+		ANY  ; ANY
+		&_DUMMY&PADDING
+    } = ANY
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+	ANY
+    } = ANY
+    
+	SYSTEM { &_DUMMY&SYSTEM 
+			  ANY } = ANY
+	METHOD { &_DUMMY&METHOD 
+			  ANY } = ANY
+	PRODUCT { &_DUMMY&PRODUCT 
+			  ANY } = ANY
+	SECTION { &_DUMMY&SECTION 
+			  ANY } = ANY
+	LATITUDE { 
+		@ 
+		ANY
+	} = ANY
+
+	LONGITUDE { 
+		@ 
+		ANY
+	} = ANY
+
+    EXPVER{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+		ANY ; ANY
+    } = ANY
+    
+}
+
+DATA ; X ; METVIEW
+{
+    FIELDSET [ visible = false ] {
+		@
+	}
+
+	PATH {
+		@
+	}
+
+	OFFSET {
+		*
+		/
+	}
+
+	LENGTH {
+		*
+		/
+	}
+
+	INDEX {
+		*
+		/
+	}
+
+}
+
+FLUSH ;   Flushes data   ;   MARS
+{
+
+    CLASS  { &_DUMMY&CLASS  }
+
+    TYPE   { &_DUMMY&TYPE   }
+
+    STREAM { &_DUMMY&STREAM }
+
+    MODEL  { &_DUMMY&MODEL }
+
+    ORIGIN { &_DUMMY&ORIGIN }
+
+	SYSTEM  { &_DUMMY&SYSTEM  }
+
+	METHOD  { &_DUMMY&METHOD  }
+
+	PRODUCT { &_DUMMY&PRODUCT }
+
+	SECTION { &_DUMMY&SECTION }
+
+	LATITUDE { @ }
+
+	LONGITUDE { @ }
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    }
+    
+    LEVTYPE  { &_DUMMY&LEVTYPE }
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    }
+    
+    REPRES   { &_DUMMY&REPRES }
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    }
+    
+    OBSTYPE { ALL &_DUMMY&OBSTYPE }
+    
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } 
+    
+    PARAM { &_DUMMY&PARAM }
+    
+	CHANNEL { &_DUMMY&CHANNEL }
+
+	IDENT { &_DUMMY&IDENT }
+
+	INSTRUMENT { &_DUMMY&INSTRUMENT }
+
+	FILTER { @ }
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    }
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } 
+
+    FCMONTH 
+	{
+        *   
+		ALL
+	}
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} 
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    }
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} 
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} 
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} 
+
+    REFERENCE 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        
+		OFF
+    }
+
+    STEP
+    {
+        *   
+    }
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    }
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    }
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    }
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+    
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    } 
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    }
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    }
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } 
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    }
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    }
+    
+    PASSWORD
+    {
+        "   
+    } 
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	} 
+
+! Only for FLUSH
+
+	WAIT
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+	DECACHE
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+} ! END OF FLUSH
+
+
+ATTACH ;   attaches data   ;   MARS
+{
+
+    CLASS  { &_DUMMY&CLASS  } = OD
+
+    TYPE   { &_DUMMY&TYPE   } = AN
+
+    STREAM { &_DUMMY&STREAM } = DA
+
+    MODEL  { &_DUMMY&MODEL }  = OFF
+
+    ORIGIN { &_DUMMY&ORIGIN } = OFF
+
+    EXPVER  
+    {
+		@
+        "       
+        *       
+    } = 1
+    
+    LEVTYPE  { &_DUMMY&LEVTYPE } = PL
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/400/300
+    
+    REPRES   { &_DUMMY&REPRES } = SH
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+    
+    OBSTYPE { ALL
+	&_DUMMY&OBSTYPE } = S
+    
+    PARAM { &_DUMMY&PARAM } = Z
+    
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    } = CURRENT DATE
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    STEP
+    {
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+    
+	NAME
+	{
+		"
+	} = ""
+
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } = NEW
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    } = G
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+    
+    LAUNCH
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE
+    {
+        FREQUENT    ;   F
+        INFREQUENT  ;   I
+        NORMAL      ;   N
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = N
+    
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	}
+
+	WAIT {
+		YES
+		NO
+	} = NO
+
+} ! END OF ATTACH
+
+
+STORE ;   Stores files   ;   MARS
+{
+
+    CLASS  { &_DUMMY&CLASS  } = OD
+
+    TYPE   { &_DUMMY&TYPE   } = AN
+
+    STREAM { &_DUMMY&STREAM } = DA
+
+    MODEL  { &_DUMMY&MODEL  } = OFF
+
+    ORIGIN { &_DUMMY&ORIGIN } = OFF
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    } = 1
+    
+    LEVTYPE { &_DUMMY&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/400/300
+    
+    REPRES { &_DUMMY&REPRES } = SH
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+    
+    OBSTYPE { ALL
+	&_DUMMY&OBSTYPE } = S
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } = CONVENTIONAL	
+    
+    PARAM { &_DUMMY&PARAM } = Z
+    
+    DATE 
+	{
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    STEP
+    {
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } = NEW
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    } = G
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+    
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	NAME
+	{
+		@
+	} = ""
+
+} ! END OF STORE
+
+REGISTER    ;   Registering of keywords   ;   MARS
+{
+    
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE  	[	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ] 
+	{ 
+		&_DUMMY&TYPE   
+	} = AN
+
+
+    STREAM 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&STREAM 
+	} = DA
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				java_hidden  = FALSE ]
+	{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+    } = 1
+
+    LEVTYPE [ java_control = CHOICE, java_section = ID, java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+
+	NAME
+	{
+		@
+	} = ""
+
+	ATTRIBUTES
+	{
+		DATE
+		TIME
+		OBSTYPE
+		/
+	} = DATE
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	}
+
+} ! END OF REGISTER
+
+
+FETCH    ;   Fetch data   ;   MARS
+{
+    
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE  	[	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ] 
+	{ 
+		&_DUMMY&TYPE   
+	} = AN
+
+
+    STREAM 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&STREAM 
+	} = DA
+    
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				java_hidden  = FALSE ]
+	{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+    } = 1
+    
+
+    LEVTYPE [ java_control = CHOICE, java_section = ID, java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, java_section = ID, java_hidden = FALSE ]
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES [ java_control = CHOICE, java_section = ID, java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+    DOMAIN  [ help = help_multiple_selection, # For Metview
+				java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ] 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+
+    OBSTYPE [ help = help_multiple_selection, # For Metview
+			java_control = LIST_2, java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = S
+
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+    } = Z
+    
+    DATE [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    REFDATE [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+    HDATE [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		ALL
+    } = OFF
+
+    TIME [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+!		00
+!		03
+!		06
+!		09
+!		12
+!		15
+!		18
+!		21
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+	LEADTIME [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+    STEP [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    ENSEMBLE [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    CLUSTER [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    
+    PROBABILITY [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    NUMBER [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC  [ priority = 1, java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION  [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    FREQUENCY [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION [ priority = 0, java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    TARGET [ java_control = TEXT, java_section = TARGET, java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    FIELDSET  [ java_control = CHOICE, java_section = TARGET, java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, java_section = TARGET, java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, java_section = DATA, java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    RESOL [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+        OFF     ;   OFF
+        *   
+        /
+    } = AV
+    
+    ACCURACY [ java_control = CHOICE_TEXT_1, java_section = DATA, java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    IDENT
+			# For Metview
+				   [ help = help_script,                  
+				   help_script_command = 
+					'/usr/local/lib/metaps/bin/mcs_sat_availability.sh',
+					java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE 
+				 ]
+											   
+    {
+		ALL 
+        METEOSAT 3 ; MS3 ; 50
+        METEOSAT 4 ; MS4 ; 51
+        METEOSAT 5 ; MS5 ; 52
+        METEOSAT 6 ; MS6 ; 53
+        METEOSAT 7 ; MS7 ; 54
+		DMSP 10 ; 204
+		DMSP 13 ; 246
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+    
+	ROTATION [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+    DUPLICATES  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, java_section = OTHER, java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  [ java_control=CHOICE, java_section=OTHER, java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, java_section = OTHER, java_hidden = FALSE ]
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+    {
+		LOCAL ; LOCAL
+		SERVER
+        OFF ;   OFF
+    } = LOCAL
+
+
+	DATABASE  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+	{
+		@
+		OFF
+	}
+
+	EXPECT [ priority = 0,
+				java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION {
+		*
+	} = 1.3
+
+	NAME {
+		@
+	}
+    
+} ! END OF FETCH
+
+!------------------------------------------------------------------------
+
+BROWSE    ;   LIST FDF ENTRIES AND CFS FILES  ;   MARS
+{
+    
+    CLASS  
+	{ 
+		&_DUMMY&CLASS  
+		/ 
+		ALL
+	} 
+    
+    TYPE   
+	{ 
+		&_DUMMY&TYPE  
+		/  
+		ALL
+	} 
+
+    STREAM 
+	{ 
+		&_DUMMY&STREAM 
+		/ 
+		ALL
+	} 
+    
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+		ALL
+	}
+
+    EXPVER{
+		@
+		/
+		ALL
+    } 
+    
+    LEVTYPE 
+	{ 
+		&_DUMMY&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&_DUMMY&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&_DUMMY&DOMAIN
+		/
+		ALL
+    } 
+
+    OBSTYPE 
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+		/
+    } 
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP }
+    
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+		/
+    }
+    
+    CHANNEL 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&CHANNEL 
+	} 
+
+    IDENT 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&IDENT 
+	} 
+
+    INSTRUMENT 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&INSTRUMENT 
+	} 
+
+    DATE
+    {
+		&_DUMMY&DATE
+		ALL
+    } 
+
+    REFDATE 
+	{
+		&_DUMMY&DATE
+		ALL
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    REFERENCE 
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    CLUSTER
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    }
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } 
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE {
+		@
+		/
+		OFF
+	}
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	}
+
+
+    SOURCE
+    {
+		@
+        "   
+    } 
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    CFSPATH  
+    {
+        "   
+    }
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } 
+    
+    RESOL 
+    {
+		OFF                  ;   OFF
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    IDENT
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+    
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+		SERVER
+        OFF ;   OFF
+    } = OFF
+
+
+	EXPECT 
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+
+} ! END OF BROWSE
+
+
+GET    ;   GET ;   MARS
+{
+	TAPE
+	{
+		@
+	}
+
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE {
+		@
+		OFF
+	}
+
+} ! END OF GET
+
+
+REGRIB    ;   Regrib of data   ;   MARS
+{
+    
+    CLASS 	
+	{ 
+		&_DUMMY&CLASS  
+		OFF
+	} = OFF
+    
+
+    TYPE
+	{ 
+		&_DUMMY&TYPE   
+		OFF
+	} = OFF
+
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+		OFF
+	} = OFF
+    
+
+    MODEL
+	{
+		&_DUMMY&MODEL
+		OFF
+	} = OFF
+
+    EXPVER
+	{
+		@
+        "   
+		OFF
+    } = OFF
+    
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+		OFF
+	} = OFF
+    
+    LEVELIST 
+    {
+        OFF
+        *   
+    } = OFF
+    
+    PARAM 
+    {
+        &_DUMMY&PARAM
+		OFF
+    } = OFF
+    
+    DATE
+    {
+		&_DUMMY&DATE
+		OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+		OFF
+    } = OFF
+
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    STEP
+    {
+        *   
+		OFF
+    } = OFF
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    } = OFF
+    
+    REFERENCE
+    {
+        *   
+		OFF
+    } = OFF 
+
+    NUMBER
+    {
+        *   
+        OFF
+    } = OFF
+    
+    QUANTILE
+    {
+        *   
+        OFF
+    } = OFF
+
+    DOMAIN
+    {
+	&_DUMMY&DOMAIN
+	OFF
+    } = OFF
+
+    FREQUENCY
+    {
+        *   
+        OFF
+    } = OFF
+    
+    DIRECTION
+    {
+        OFF
+        *   
+    } = OFF
+    
+    DIAGNOSTIC
+    {
+        OFF
+        *   
+    } = OFF
+
+    ITERATION
+    {
+        OFF
+        *   
+    } = OFF
+    
+    CHANNEL
+	{ 
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    IDENT
+	{ 
+		&_DUMMY&IDENT 
+	} = OFF
+
+    INSTRUMENT
+	{ 
+		&_DUMMY&INSTRUMENT 
+	} = OFF
+
+    ORIGIN
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+    MODEL
+	{
+		OFF
+		ECMF
+		EDZW
+		EGRR
+		LFPW
+		KWBC
+		NONE
+	} = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    OBSTYPE { @
+				OFF } = OFF
+
+    IDENT { @
+        METEOSAT 3 ; MS3  ; 50
+        METEOSAT 4 ; MS4  ; 51
+        METEOSAT 5 ; MS5  ; 52
+        METEOSAT 6 ; MS6  ; 53
+        METEOSAT 7 ; MS7  ; 54
+        GOES 8     ; GOES ; 252
+		DMSP 10 ; 204
+		DMSP 13 ; 246
+		OFF } = OFF
+    
+
+	KSEC1 
+	{
+		OFF
+		*
+		@
+		/
+	} = OFF
+
+	LOCALDEF
+	{
+		OFF
+		*
+		@
+	} = OFF
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }= ""
+
+} ! END OF REGRIB
+
+!-----------------------------------------------------------------
+
+ERASE    ;   Erase data   ;   MARS
+{
+    
+	DATASET
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&_DUMMY&CLASS  
+	} = TE
+    
+
+    TYPE
+	{ 
+		&_DUMMY&TYPE   
+		*
+	} = AN
+
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+		*
+	} = MA
+    
+
+    EXPVER
+	{
+		@
+		1
+        "   
+        *   
+        /
+    } = 9999
+    
+
+    MODEL
+	{
+		&_DUMMY&MODEL
+	} = OFF
+
+    REPRES
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+	OBSGROUP
+	{ 
+		&_DUMMY&OBSGROUP 
+		OFF    ; OFF
+	} = OFF
+    
+	RDBPREFIX
+	{ 
+		@
+		"
+		OFF    ; OFF
+	} = OFF
+    
+    OBSTYPE
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = 0
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = DP
+    
+    LEVELIST
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 9999
+    
+    PARAM 
+    {
+        ALL             
+        &_DUMMY&PARAM
+    } = 255
+    
+	YEAR 
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	DECADE
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE 
+    {
+		&_DUMMY&DATE
+    } = 19000101
+    
+    VERIFY
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+
+    HDATE
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+
+    FCMONTH
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+    STEP
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    }
+    
+    REFERENCE
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } = OFF 
+
+    NUMBER
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DOMAIN
+    {
+	&_DUMMY&DOMAIN
+    } = GLOBE
+
+    FREQUENCY
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIAGNOSTIC
+    {
+        ALL 
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    CHANNEL
+	{ 
+		ALL
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    IDENT
+    {
+		ALL 
+		&_DUMMY&IDENT
+		"
+		@
+    }=OFF
+    
+    ORIGIN
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    SOURCE
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+    TRANSFER
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    FORMAT
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	LOCATION
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+    INSTRUMENT
+    {
+		&_DUMMY&INSTRUMENT
+    }=OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		OFF
+	} = OFF
+
+
+    PADDING
+    {
+		&_DUMMY&PADDING
+		OFF
+    } = OFF
+    
+
+    DUPLICATES
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = NORMAL
+    
+    PASSWORD
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS
+    {
+		LOCAL 
+		SERVER
+        OFF ;   OFF
+    } = LOCAL
+
+	BRANCH
+	{ &_DUMMY&BRANCH } = OFF
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	} = marsdev
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION
+	{
+		*
+	} = 2.0
+    
+} ! END OF ERASE
diff --git a/share/metview/etc/MarsOdbRules b/share/metview/etc/MarsOdbRules
new file mode 100644
index 0000000..b7931ea
--- /dev/null
+++ b/share/metview/etc/MarsOdbRules
@@ -0,0 +1,764 @@
+!
+! This is the mars check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!          ---> info	 MESSAGE
+!          ---> mail	 MESSAGE
+!          ---> set      PARAMETER = VALUE
+!          ---> unset    PARAMETER 
+!
+!
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+
+# Remove access to marsodb
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = REMOVE)
+	%and DATABASE=marsodb %then
+	%unset DATABASE
+
+%include "oldrd.chk"
+
+
+%if CLASS = OD %and (TYPE = CM %or TYPE = CS %or TYPE = CR) %and DOMAIN = G %then 
+	%warning "Domain forced to E"
+	%set DOMAIN = E
+
+%if (TYPE = IM %or TYPE = SIM %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%set REPRES = SV
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset RESOL
+	%unset DUPLICATES 
+	%unset GRID 
+	%unset ROTATION 
+
+# Simulated radiances
+%if (TYPE = SSD) %then
+	%unset LEVTYPE
+	%unset LEVELIST
+
+
+%if (TYPE = IM  %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%unset STEP
+
+
+%if TYPE = OB %or TYPE = FB  %or STREAM = SSMI %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = OFB %or TYPE = MFB %then 
+	%set REPRES = BU
+	%unset PARAM  
+	%unset STEP  
+	%unset LEVTYPE  
+	%unset LEVELIST  
+	%unset GRID 
+	%unset ROTATION 
+
+%if TYPE = TF %then
+	%set REPRES = BU
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset GRID 
+	%unset ROTATION
+
+%if TYPE = AB %then
+	%unset TIME
+
+%if TYPE = OB %or TYPE = FB %then
+	%unset ORDER
+
+%if TYPE = CL %then
+	%unset STEP
+
+%if LEVTYPE = SFC %or LEVTYPE = WAVE %then 
+	%unset LEVELIST
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = ER %and STREAM = OPER %and (TYPE = AN %or TYPE = FC) %and (%not REPRES) %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %and (TYPE = IA %or TYPE = AN) %and DATE < 19830420 %then
+	%set REPRES = LL
+
+%if (_VERB = RETRIEVE_ODB %and TYPE = TU) %then
+	%set REPRES = LL
+
+%if %not ( TYPE = OLDIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then 
+	%unset OBSTYPE 
+	%unset OBSGROUP 
+	%unset DUPLICATES 
+
+%if %not ( TYPE = IM %or TYPE = OLDIM %or TYPE = SIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB %or TYPE = SSD) %then 
+	%unset IDENT 
+
+%if _VERB = LIST %and %not OBSGROUP %and (TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then
+	%set OBSGROUP = ALL
+
+%if GRID=O  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+%if GRID=AV  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+
+%if (RESOL=AUTO %or RESOL=AV) %and (%not GRID) %then %unset RESOL
+%if (STYLE = DISSEMINATION) %and (RESOL=AUTO %or (%not RESOL)) %then 
+	%warning "Force RESOL=AV when STYLE=DISSEMINATION"
+	%set RESOL=AV
+
+%if AREA = E %then
+	%set AREA = 73.5/-27/33/45
+
+%if (AREA = G %or AREA = GLOBE) %and (_APPL = diss) %then
+	%warning "Expand global AREA for dissemination to AREA = 90/0/-90/359.99"
+	%set AREA = 90/0/-90/359.99
+
+%if AREA = G %then
+	%set _AREA_N = 0
+	%set _AREA_W = 0
+	%set _AREA_S = 0
+	%set _AREA_E = 0
+
+%if AREA = G %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+%if AREA = GLOBE %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+
+%if FORMAT = P %or FORMAT = PACKED  %then %unset FORMAT
+
+# %if FORMAT %then %warning "Format is not yet implemented" %unset FORMAT
+
+
+%if USE = NORMAL     %then %unset USE
+%if USE = STAGE     %then %set TARGET="/dev/null" %unset FIELDSET %set EXPECT=0
+%if COSTONLY = N %then %unset COSTONLY
+
+
+
+!
+!
+!
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CLASS=ANY     %then %unset CLASS
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STREAM=ANY    %then %unset STREAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and MODEL=ANY     %then %unset MODEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVTYPE=ANY   %then %unset LEVTYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVELIST=ANY  %then %unset LEVELIST
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE=ANY      %then %unset TYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PARAM=ANY     %then %unset PARAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DATE=ANY      %then %unset DATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TIME=ANY      %then %unset TIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STEP=ANY      %then %unset STEP
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ANOFFSET=ANY %then %unset ANOFFSET
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and AREA=ANY      %then %unset AREA
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and GRID=ANY      %then %unset GRID
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ROTATION=ANY  %then %unset ROTATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STYLE=ANY     %then %unset STYLE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RESOL=ANY     %then %unset RESOL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORDER=0       %then %unset ORDER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and EXPVER=ANY    %then %unset EXPVER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFERENCE=ANY %then %unset REFERENCE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DOMAIN=ANY    %then %unset DOMAIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORIGIN=ANY    %then %unset ORIGIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CHANNEL=ANY   %then %unset CHANNEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RANGE=ANY     %then %unset RANGE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEADTIME=ANY  %then %unset LEADTIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and OPTTIME=ANY   %then %unset OPTTIME
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PADDING=ANY     %then %unset PADDING
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SYSTEM=ANY     %then %unset SYSTEM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and METHOD=ANY     %then %unset METHOD
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PRODUCT=ANY     %then %unset PRODUCT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SECTION=ANY     %then %unset SECTION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LATITUDE=ANY     %then %unset LATITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LONGITUDE=ANY     %then %unset LONGITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and NUMBER=ANY     %then %unset NUMBER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and QUANTILE=ANY     %then %unset QUANTILE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ITERATION=ANY     %then %unset ITERATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIAGNOSTIC=ANY     %then %unset DIAGNOSTIC
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INSTRUMENT=ANY     %then %unset INSTRUMENT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FILTER=ANY     %then %unset FILTER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INTERPOLATION=ANY     %then %unset INTERPOLATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFDATE=ANY     %then %unset REFDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and HDATE=ANY     %then %unset HDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FREQUENCY=ANY     %then %unset FREQUENCY
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIRECTION=ANY     %then %unset DIRECTION
+
+
+
+
+%if TYPE <> CF %and TYPE <> PF %and TYPE <> CV %then %unset ENSEMBLE
+%if TYPE <> CM %and TYPE <> CS  %then %unset CLUSTER
+%if TYPE <> FP %then %unset PROBABILITY
+
+
+#%if TYPE <> CF %and 
+%if TYPE <> PF %and 
+	TYPE <> CM %and 
+	TYPE <> CS %and 
+	TYPE <> CR %and 
+	TYPE <> CV %and 
+	TYPE <> SV %and 
+	TYPE <> AS %and 
+	TYPE <> FP %and 
+	TYPE <> ED %and 
+	TYPE <> TU %and 
+	TYPE <> CI %and
+	TYPE <> ME %and 
+	TYPE <> FF %and           # Ocean
+	TYPE <> ICP %and 
+	TYPE <> SOT %and 
+	TYPE <> FCMEAN %and
+	TYPE <> FCMAX %and
+	TYPE <> FCMIN %and
+	TYPE <> FCSTDEV %and
+	TYPE <> SVAR %and
+	CLASS <> TI %and
+	STREAM <> MOFC %and 
+	STREAM <> WAMF %and 
+	STREAM <> MOFM %and 
+	STREAM <> WMFM %and 
+	STREAM <> SEAS %and 
+	STREAM <> WASF %and
+	STREAM <> WAMF %and
+	STREAM <> SFMM %and
+	STREAM <> SMMA %and
+	STREAM <> SEAP %and 
+	STREAM <> SWMM %and
+	STREAM <> OCEA %and
+# New Monthly Forecast
+	STREAM <> MNFC %and
+    STREAM <> MNFH %and
+    STREAM <> MNFA %and
+    STREAM <> MNFW %and
+    STREAM <> MFHW %and
+    STREAM <> MFAW %and
+    STREAM <> MNFM %and
+    STREAM <> MFHM %and
+    STREAM <> MFAM %and
+    STREAM <> MFWM %and
+    STREAM <> MHWM %and
+    STREAM <> MAWM %and
+# New Multi-model
+	STREAM <> MMSF %and 
+	STREAM <> MSMM %and 
+	STREAM <> WAMS %and 
+	STREAM <> MSWM %and 
+	STREAM <> MMSA %and 
+# Ensemble Data Assimilation
+	STREAM <> ENDA %and 
+	STREAM <> EWDA %and 
+	STREAM <> EDMM %and 
+	STREAM <> EDMO %and 
+	STREAM <> EWMM %and 
+	STREAM <> EWMO %and 
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %and 
+# Ensemble Supplementary data
+	STREAM <> ESPD %and 
+# Multi-model Multi-annual
+	STREAM <> MMAF %and 
+	STREAM <> MMAM %and 
+	STREAM <> MMAW %and 
+	STREAM <> MMWM %and 
+	STREAM <> SEAS %then
+	%unset NUMBER
+
+%if STREAM <> ENFH %and 
+	STREAM <> ENWH %and
+	STREAM <> EFHO %and
+	STREAM <> EHMM %and
+	STREAM <> EWHO %then
+	%unset HDATE
+
+%if (TYPE <> PD %and 
+    TYPE <> CD %and
+    TYPE <> PB) %then
+	%unset QUANTILE
+
+%if ( STREAM = MNFM %or
+	STREAM = MFHM %or
+    STREAM = MFAM %or
+    STREAM = MFWM %or
+    STREAM = MHWM %or
+    STREAM = ESMM %or
+    STREAM = EHMM %or
+    STREAM = MAWM )
+	%then
+	%unset STEP
+
+%if ( STREAM = MFHM %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES) )
+	%then 
+	%unset DATE
+
+%if ( STREAM = MNFH %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = ED ) )
+	%then
+	%unset DATE
+
+%if (_VERB = RETRIEVE_ODB %or _VERB = ARCHIVE) %and 
+	(STREAM <> MOFC %and STREAM <> WAMF %and STREAM <> MOFM %and STREAM <> WMFM) %and 
+	(TYPE = CF %or TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = TAEM %or TYPE = TAES) %then 
+	%unset ENSEMBLE %unset NUMBER
+
+! For read
+%if _VERB = READ_ODB %and CLASS  <> ANY %then %warning "CLASS  ignored in READ_ODB"
+%if _VERB = READ_ODB %and REPRES <> ANY %then %warning "REPRES ignored in READ_ODB"
+
+%if _VERB = READ_ODB %then 
+	%unset CLASS 
+	%unset REPRES
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE = FG %and STEP = 0 %and STREAM = OPER  
+	%then 
+		%warning "First Guess step 0 removed"
+		%error   "Please, use STEP=06 instead"
+
+
+! =========================================
+! For wave, there is no step for FG
+%if (STREAM = WAVE %or STREAM = SCWV %or STREAM = DCWV) %and TYPE = FG %and STEP <> 0 %then 
+	%warning "For wave first-guess, step is ignored and set to zero"
+	%set     STEP = 0
+
+! =========================================
+! There are no waves in altitude
+%if STREAM = WAVE %or 
+	STREAM = WAEF %or 
+	STREAM = WEHS %or 
+	STREAM = WEOV %or 
+	STREAM = WAMO %or 
+	STREAM = SCWV %or 
+	STREAM = DCWV %or 
+	STREAM = WVHC %or
+	STREAM = EWHC %or
+	STREAM = MAWV %or
+	STREAM = WASF %or 
+	STREAM = WAMF %or
+	STREAM = WMFM %or
+	STREAM = SWMM %or
+	STREAM = MNFW %or
+	STREAM = MFHW %or
+	STREAM = MFAW %or
+	STREAM = MFWM %or
+	STREAM = MHWM %or
+	STREAM = MAWM %or
+	STREAM = WAMS %or
+	STREAM = DACW %or
+	STREAM = EWDA %or
+	STREAM = LWWV %or
+	STREAM = EWLA %or
+	STREAM = MSWM %then
+
+	%warning "For wave data, LEVTYPE forced to Surface"
+	%set     LEVTYPE = SFC
+	%unset   LEVELIST
+
+!===========================================================
+
+!
+! Avoid use of ENSEMBLE, CLUSTER and PROBABILITY in new MARS retrieval editors
+
+%if TYPE = PF %and ENSEMBLE = OFF %then %unset ENSEMBLE
+%if (TYPE = CM %or TYPE = CS %or TYPE = CR) %and CLUSTER = OFF %then %unset CLUSTER
+%if (TYPE = FP) %and PROBABILITY = OFF %then %unset PROBABILITY
+
+%if STREAM <> WAVE %and 
+	STREAM <> SCWV %and 
+	STREAM <> DCWV %and 
+	STREAM <> MAWV %and 
+	STREAM <> WASF %and 
+
+	STREAM <> WAEF %and 
+	STREAM <> EWDA %and 
+
+	STREAM <> MNFW %and 
+	STREAM <> MFHW %and 
+	STREAM <> MFAW %and 
+
+	STREAM <> WVHC %and
+	STREAM <> EWHC %and
+
+	STREAM <> ENWH %and
+	STREAM <> EWHO %and
+
+	STREAM <> LWWV %and
+	STREAM <> EWLA %and
+
+	STREAM <> WAMF %then 
+	%unset FREQUENCY %unset DIRECTION
+
+! Avoid visiting all mars tree on the server
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and (%not CLASS))   %then 
+	%warning "Missing CLASS. Force to Operations"
+	%set CLASS= OD
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not DATE) %and (%not PSEUDODATE) ) %then 
+	%warning "Missing DATE. Force to yesterday"
+	%set DATE = -1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not STREAM) ) %then 
+	%warning "Missing STREAM. Force to Daily archive"
+	%set STREAM = OPER
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not EXPVER) ) %then 
+	%warning "Missing EXPVER. Force to 1"
+	%set EXPVER = 1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not TYPE) ) %then 
+	%warning "Missing TYPE. Force to Analysis"
+	%set TYPE = AN
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS = RD  %and (%not EXPVER) ) %then 
+	%error "Missing EXPVER. Please, specify one"
+
+%if (_VERB = LIST %and OUTPUT = TREE %and (%not HIDE)) %then 
+	%set HIDE=FILE/LENGTH/MISSING/OFFSET/ID/COST/MONTH/YEAR
+
+
+%if (_VERB = RETRIEVE_ODB %and EXPVER = 8 %and (%not GRID)) %then
+	%warning "To get old EXPVER=8 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 0.5/0.5"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 0.5/0.5
+
+%if (_VERB = RETRIEVE_ODB %and EXPVER = 8) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+%if (_VERB = RETRIEVE_ODB %and EXPVER = 7 %and (%not GRID)) %then
+	%warning "To get old EXPVER=7 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 2/2"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 2/2
+
+%if (_VERB = RETRIEVE_ODB %and EXPVER = 7) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+
+! Observation retrieval from new MARS
+%if (_VERB = RETRIEVE_ODB %and (STREAM = SSBT %or STREAM = E1)) %then
+	%warning "Changed STREAM to OPER"
+	%set STREAM = OPER
+
+%if (_VERB = RETRIEVE_ODB %and STREAM = SSMI) %then
+	%warning "Changed STREAM=OPER, TYPE=OB"
+	%set STREAM = OPER
+	%set TYPE = OB
+
+%if (ACCURACY = N) %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then
+	%unset ACCURACY
+
+%if (ACCURACY = R %or ACCURACY = L) %then
+	%warning "ACCURACY Low or Reduced force to 8 bits"
+	%set ACCURACY = 8
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) 
+	%and _VERB = RETRIEVE_ODB 
+	%and SOURCE 
+	%and (%not DATABASE) %then
+	%set DATABASE = file
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (EXPVER=fdy1) 
+	%and (%not DATABASE) %then
+	%set DATABASE = mars grib2
+
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=E4 %or 
+	      CLASS=EI %or
+		  CLASS=ER %or 
+		  CLASS=PV %or 
+		  CLASS=DM %or 
+		  CLASS=CS %or 
+		  CLASS=TO %or 
+		  CLASS=DT %or 
+		  CLASS=EL %or 
+		  CLASS=YT %or 
+		  CLASS=MC %or 
+		  CLASS=EM %or 
+		  CLASS=E2 %or 
+		  CLASS=ME %or 
+		  CLASS=EN) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marser
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=TI)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsth
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER < 10
+	%and (%not DATABASE) %then
+	%set DATABASE = marsod
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER > 9
+	%and (%not DATABASE) %then
+	%set DATABASE = marsode
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=CO %or CLASS=SR %or CLASS=LA %or CLASS=MS %or CLASS=4M) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marsms
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = REMOVE %or 
+	 _VERB = LIST)
+	%and (CLASS<>E4 %and 
+	      CLASS<>EI %and
+	      CLASS<>TI %and
+		  CLASS<>ER %and 
+		  CLASS<>PV %and 
+		  CLASS<>DM %and 
+		  CLASS<>OD %and 
+		  CLASS<>TO %and
+		  CLASS<>DT %and
+		  CLASS<>EN %and
+		  CLASS<>CO %and
+		  CLASS<>4M %and
+		  CLASS<>SR %and
+		  CLASS<>LA %and
+		  CLASS<>EL %and
+		  CLASS<>MS %and
+		  CLASS<>ME %and
+		  CLASS<>EM %and
+		  CLASS<>E2 %and
+		  CLASS<>MC %and
+		  CLASS<>CS)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsrd
+
+# ocean
+%if LEVTYPE = DP
+	%and (SECTION = M %or SECTION = Z) 
+	%and (PRODUCT = INST %or PRODUCT = TACC %or PRODUCT = TAVG)
+	%then
+	%unset LEVELIST
+
+# Special case for TIMS, V
+%if LEVTYPE = DP
+	%and SECTION = V
+	%and PRODUCT = TIMS 
+	%then
+	%unset LEVELIST
+
+%if LEVTYPE = DP
+	%and TYPE = OR
+	%and (%not PRODUCT)
+	%then
+		%warning "Default PRODUCT for Ocean ReAnalysis set to Instantaneous"
+		%set PRODUCT = INST
+
+
+# Year & month
+%if _VERB = RETRIEVE_ODB %and (YEAR %or MONTH) %then
+	%unset DATE
+
+# Boundary Conditions (BC)
+%if _VERB = RETRIEVE_ODB %and CLASS = OD %and TIME = 00 %and STREAM = OPER %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCDA for Boundary Conditions Project data"
+
+%if _VERB = RETRIEVE_ODB %and CLASS = OD %and TIME = 00 %and STREAM = WAVE %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCWV for Boundary Conditions wave data"
+
+%if (_VERB = ARCHIVE %and (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA) %and VERIFY) %then
+	%error "Please, use FCMONTH instead of VERIFY for archiving"
+	%error "Exiting..."
+
+%if ((CLASS <> OD %and CLASS <> EN %and CLASS <> ME) %and SYSTEM ) %then
+	%unset SYSTEM
+
+# A bit of paranoia...
+
+%if _VERB = REMOVE %and CLASS = OD %and %not DATABASE %then
+	%set DATABASE = dhstest
+	
+# That should be disabled in mars.def anyway
+
+%if _VERB = REMOVE %and (
+	CLASS = ER %or
+	CLASS = E4 %or 
+	CLASS = EI %or 
+	CLASS = EM %or 
+	CLASS = E2 %or 
+	CLASS = CS %or 
+	CLASS = PV %or 
+	CLASS = TO %or 
+	CLASS = DT %or 
+	CLASS = PE %or 
+	CLASS = MC %or 
+	CLASS = ME %or 
+	CLASS = DM
+	) %then
+	%error "Cannot remove this data..."
+
+
+%if (CLASS = IT %and MODEL = HRM) %or (CLASS = CO) %then
+	%warning "Post-processing directives are ignored"
+	%set _POSTPROCESSING = 0
+
+%if (STREAM = MODA %or STREAM = MSDA %or STREAM = EDMO %or STREAM = EWMO) %and (CLASS <> ER) %then
+	%unset TIME
+	%unset STEP
+
+%if (STREAM = MDFA) %then
+	%unset TIME
+
+%if (CLASS <> TO %and CLASS <> DT) %or STREAM <> SEAP %then
+	%unset LEADTIME
+	%unset OPTTIME
+
+%if (CLASS=DT) %then
+	%unset METHOD
+
+#########################################
+# Migration from old images to new images
+#########################################
+
+# Meteosat
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=2, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 2 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=3, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 205
+
+# GOES
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=4, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 4 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=20 by CHANNEL=3, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 615
+
+################################################
+# end of Migration from old images to new images
+################################################
+
+%if (FCMONTH %or FCPERIOD)  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then 
+	%unset STEP
+
+# %if (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA %or STREAM = MMSA) %then
+# 	%unset STEP
+# 
+
+%if CLASS = TI %then                %unset DOMAIN
+%if CLASS = TI %and TYPE = CF %then %set NUMBER=0
+%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
+%if CLASS = TI %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if CLASS = DM %and TYPE = FC %then %set TIME=0
+
+# ANOFFSET not valid unless Long window 4dvar 
+%if STREAM <> LWDA %and 
+	STREAM <> LWWV %and
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %then
+	%unset ANOFFSET
+
+
+# ERA Interim Data Server at full resolution
+%if ((DATASET = interim_full_daily)  %and
+    ((TYPE <> AN %and TYPE <> FC) %or
+	 (TYPE = FC %and (STEP > 12 %or LEVTYPE <> SFC)))) %then
+	 %error "Dataset ERA-Interim full resolution available only for Analysis and Forecast surface fluxes at time-step <= 12"
+	 %fail
+
+
+# Double-archiving marsrd/marsrd-cluster
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#    (DATABASE = marsrd)) %then %set DATABASE = marsrd/marsrd-cluster
+
+
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#     (DATABASE = marstest)) %then %set DATABASE = marstest/marsdev-core
+
+%include "rt_by_obsgroup.chk"
diff --git a/share/metview/etc/MarsRules b/share/metview/etc/MarsRules
new file mode 100755
index 0000000..4a616bf
--- /dev/null
+++ b/share/metview/etc/MarsRules
@@ -0,0 +1,764 @@
+!
+! This is the mars check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!          ---> info	 MESSAGE
+!          ---> mail	 MESSAGE
+!          ---> set      PARAMETER = VALUE
+!          ---> unset    PARAMETER 
+!
+!
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+
+# Remove access to marsodb
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = REMOVE)
+	%and DATABASE=marsodb %then
+	%unset DATABASE
+
+%include "oldrd.chk"
+
+
+%if CLASS = OD %and (TYPE = CM %or TYPE = CS %or TYPE = CR) %and DOMAIN = G %then 
+	%warning "Domain forced to E"
+	%set DOMAIN = E
+
+%if (TYPE = IM %or TYPE = SIM %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%set REPRES = SV
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset RESOL
+	%unset DUPLICATES 
+	%unset GRID 
+	%unset ROTATION 
+
+# Simulated radiances
+%if (TYPE = SSD) %then
+	%unset LEVTYPE
+	%unset LEVELIST
+
+
+%if (TYPE = IM  %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%unset STEP
+
+
+%if TYPE = OB %or TYPE = FB  %or STREAM = SSMI %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = OFB %or TYPE = MFB %then 
+	%set REPRES = BU
+	%unset PARAM  
+	%unset STEP  
+	%unset LEVTYPE  
+	%unset LEVELIST  
+	%unset GRID 
+	%unset ROTATION 
+
+%if TYPE = TF %then
+	%set REPRES = BU
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset GRID 
+	%unset ROTATION
+
+%if TYPE = AB %then
+	%unset TIME
+
+%if TYPE = OB %or TYPE = FB %then
+	%unset ORDER
+
+%if TYPE = CL %then
+	%unset STEP
+
+%if LEVTYPE = SFC %or LEVTYPE = WAVE %then 
+	%unset LEVELIST
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = ER %and STREAM = OPER %and (TYPE = AN %or TYPE = FC) %and (%not REPRES) %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %and (TYPE = IA %or TYPE = AN) %and DATE < 19830420 %then
+	%set REPRES = LL
+
+%if (_VERB = RETRIEVE %and TYPE = TU) %then
+	%set REPRES = LL
+
+%if %not ( TYPE = OLDIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then 
+	%unset OBSTYPE 
+	%unset OBSGROUP 
+	%unset DUPLICATES 
+
+%if %not ( TYPE = IM %or TYPE = OLDIM %or TYPE = SIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB %or TYPE = SSD) %then 
+	%unset IDENT 
+
+%if _VERB = LIST %and %not OBSGROUP %and (TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then
+	%set OBSGROUP = ALL
+
+%if GRID=O  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+%if GRID=AV  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+
+%if (RESOL=AUTO %or RESOL=AV) %and (%not GRID) %then %unset RESOL
+%if (STYLE = DISSEMINATION) %and (RESOL=AUTO %or (%not RESOL)) %then 
+	%warning "Force RESOL=AV when STYLE=DISSEMINATION"
+	%set RESOL=AV
+
+%if AREA = E %then
+	%set AREA = 73.5/-27/33/45
+
+%if (AREA = G %or AREA = GLOBE) %and (_APPL = diss) %then
+	%warning "Expand global AREA for dissemination to AREA = 90/0/-90/359.99"
+	%set AREA = 90/0/-90/359.99
+
+%if AREA = G %then
+	%set _AREA_N = 0
+	%set _AREA_W = 0
+	%set _AREA_S = 0
+	%set _AREA_E = 0
+
+%if AREA = G %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+%if AREA = GLOBE %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+
+%if FORMAT = P %or FORMAT = PACKED  %then %unset FORMAT
+
+# %if FORMAT %then %warning "Format is not yet implemented" %unset FORMAT
+
+
+%if USE = NORMAL     %then %unset USE
+%if USE = STAGE     %then %set TARGET="/dev/null" %unset FIELDSET %set EXPECT=0
+%if COSTONLY = N %then %unset COSTONLY
+
+
+
+!
+!
+!
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CLASS=ANY     %then %unset CLASS
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STREAM=ANY    %then %unset STREAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and MODEL=ANY     %then %unset MODEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVTYPE=ANY   %then %unset LEVTYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVELIST=ANY  %then %unset LEVELIST
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE=ANY      %then %unset TYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PARAM=ANY     %then %unset PARAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DATE=ANY      %then %unset DATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TIME=ANY      %then %unset TIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STEP=ANY      %then %unset STEP
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ANOFFSET=ANY %then %unset ANOFFSET
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and AREA=ANY      %then %unset AREA
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and GRID=ANY      %then %unset GRID
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ROTATION=ANY  %then %unset ROTATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STYLE=ANY     %then %unset STYLE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RESOL=ANY     %then %unset RESOL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORDER=0       %then %unset ORDER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and EXPVER=ANY    %then %unset EXPVER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFERENCE=ANY %then %unset REFERENCE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DOMAIN=ANY    %then %unset DOMAIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORIGIN=ANY    %then %unset ORIGIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CHANNEL=ANY   %then %unset CHANNEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RANGE=ANY     %then %unset RANGE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEADTIME=ANY  %then %unset LEADTIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and OPTTIME=ANY   %then %unset OPTTIME
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PADDING=ANY     %then %unset PADDING
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SYSTEM=ANY     %then %unset SYSTEM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and METHOD=ANY     %then %unset METHOD
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PRODUCT=ANY     %then %unset PRODUCT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SECTION=ANY     %then %unset SECTION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LATITUDE=ANY     %then %unset LATITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LONGITUDE=ANY     %then %unset LONGITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and NUMBER=ANY     %then %unset NUMBER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and QUANTILE=ANY     %then %unset QUANTILE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ITERATION=ANY     %then %unset ITERATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIAGNOSTIC=ANY     %then %unset DIAGNOSTIC
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INSTRUMENT=ANY     %then %unset INSTRUMENT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FILTER=ANY     %then %unset FILTER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INTERPOLATION=ANY     %then %unset INTERPOLATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFDATE=ANY     %then %unset REFDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and HDATE=ANY     %then %unset HDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FREQUENCY=ANY     %then %unset FREQUENCY
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIRECTION=ANY     %then %unset DIRECTION
+
+
+
+
+%if TYPE <> CF %and TYPE <> PF %and TYPE <> CV %then %unset ENSEMBLE
+%if TYPE <> CM %and TYPE <> CS  %then %unset CLUSTER
+%if TYPE <> FP %then %unset PROBABILITY
+
+
+#%if TYPE <> CF %and 
+%if TYPE <> PF %and 
+	TYPE <> CM %and 
+	TYPE <> CS %and 
+	TYPE <> CR %and 
+	TYPE <> CV %and 
+	TYPE <> SV %and 
+	TYPE <> AS %and 
+	TYPE <> FP %and 
+	TYPE <> ED %and 
+	TYPE <> TU %and 
+	TYPE <> CI %and
+	TYPE <> ME %and 
+	TYPE <> FF %and           # Ocean
+	TYPE <> ICP %and 
+	TYPE <> SOT %and 
+	TYPE <> FCMEAN %and
+	TYPE <> FCMAX %and
+	TYPE <> FCMIN %and
+	TYPE <> FCSTDEV %and
+	TYPE <> SVAR %and
+	CLASS <> TI %and
+	STREAM <> MOFC %and 
+	STREAM <> WAMF %and 
+	STREAM <> MOFM %and 
+	STREAM <> WMFM %and 
+	STREAM <> SEAS %and 
+	STREAM <> WASF %and
+	STREAM <> WAMF %and
+	STREAM <> SFMM %and
+	STREAM <> SMMA %and
+	STREAM <> SEAP %and 
+	STREAM <> SWMM %and
+	STREAM <> OCEA %and
+# New Monthly Forecast
+	STREAM <> MNFC %and
+    STREAM <> MNFH %and
+    STREAM <> MNFA %and
+    STREAM <> MNFW %and
+    STREAM <> MFHW %and
+    STREAM <> MFAW %and
+    STREAM <> MNFM %and
+    STREAM <> MFHM %and
+    STREAM <> MFAM %and
+    STREAM <> MFWM %and
+    STREAM <> MHWM %and
+    STREAM <> MAWM %and
+# New Multi-model
+	STREAM <> MMSF %and 
+	STREAM <> MSMM %and 
+	STREAM <> WAMS %and 
+	STREAM <> MSWM %and 
+	STREAM <> MMSA %and 
+# Ensemble Data Assimilation
+	STREAM <> ENDA %and 
+	STREAM <> EWDA %and 
+	STREAM <> EDMM %and 
+	STREAM <> EDMO %and 
+	STREAM <> EWMM %and 
+	STREAM <> EWMO %and 
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %and 
+# Ensemble Supplementary data
+	STREAM <> ESPD %and 
+# Multi-model Multi-annual
+	STREAM <> MMAF %and 
+	STREAM <> MMAM %and 
+	STREAM <> MMAW %and 
+	STREAM <> MMWM %and 
+	STREAM <> SEAS %then
+	%unset NUMBER
+
+%if STREAM <> ENFH %and 
+	STREAM <> ENWH %and
+	STREAM <> EFHO %and
+	STREAM <> EHMM %and
+	STREAM <> EWHO %then
+	%unset HDATE
+
+%if (TYPE <> PD %and 
+    TYPE <> CD %and
+    TYPE <> PB) %then
+	%unset QUANTILE
+
+%if ( STREAM = MNFM %or
+	STREAM = MFHM %or
+    STREAM = MFAM %or
+    STREAM = MFWM %or
+    STREAM = MHWM %or
+    STREAM = ESMM %or
+    STREAM = EHMM %or
+    STREAM = MAWM )
+	%then
+	%unset STEP
+
+%if ( STREAM = MFHM %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES) )
+	%then 
+	%unset DATE
+
+%if ( STREAM = MNFH %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = ED ) )
+	%then
+	%unset DATE
+
+%if (_VERB = RETRIEVE %or _VERB = ARCHIVE) %and 
+	(STREAM <> MOFC %and STREAM <> WAMF %and STREAM <> MOFM %and STREAM <> WMFM) %and 
+	(TYPE = CF %or TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = TAEM %or TYPE = TAES) %then 
+	%unset ENSEMBLE %unset NUMBER
+
+! For read
+%if _VERB = READ %and CLASS  <> ANY %then %warning "CLASS  ignored in READ"
+%if _VERB = READ %and REPRES <> ANY %then %warning "REPRES ignored in READ"
+
+%if _VERB = READ %then 
+	%unset CLASS 
+	%unset REPRES
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE = FG %and STEP = 0 %and STREAM = OPER  
+	%then 
+		%warning "First Guess step 0 removed"
+		%error   "Please, use STEP=06 instead"
+
+
+! =========================================
+! For wave, there is no step for FG
+%if (STREAM = WAVE %or STREAM = SCWV %or STREAM = DCWV) %and TYPE = FG %and STEP <> 0 %then 
+	%warning "For wave first-guess, step is ignored and set to zero"
+	%set     STEP = 0
+
+! =========================================
+! There are no waves in altitude
+%if STREAM = WAVE %or 
+	STREAM = WAEF %or 
+	STREAM = WEHS %or 
+	STREAM = WEOV %or 
+	STREAM = WAMO %or 
+	STREAM = SCWV %or 
+	STREAM = DCWV %or 
+	STREAM = WVHC %or
+	STREAM = EWHC %or
+	STREAM = MAWV %or
+	STREAM = WASF %or 
+	STREAM = WAMF %or
+	STREAM = WMFM %or
+	STREAM = SWMM %or
+	STREAM = MNFW %or
+	STREAM = MFHW %or
+	STREAM = MFAW %or
+	STREAM = MFWM %or
+	STREAM = MHWM %or
+	STREAM = MAWM %or
+	STREAM = WAMS %or
+	STREAM = DACW %or
+	STREAM = EWDA %or
+	STREAM = LWWV %or
+	STREAM = EWLA %or
+	STREAM = MSWM %then
+
+	%warning "For wave data, LEVTYPE forced to Surface"
+	%set     LEVTYPE = SFC
+	%unset   LEVELIST
+
+!===========================================================
+
+!
+! Avoid use of ENSEMBLE, CLUSTER and PROBABILITY in new MARS retrieval editors
+
+%if TYPE = PF %and ENSEMBLE = OFF %then %unset ENSEMBLE
+%if (TYPE = CM %or TYPE = CS %or TYPE = CR) %and CLUSTER = OFF %then %unset CLUSTER
+%if (TYPE = FP) %and PROBABILITY = OFF %then %unset PROBABILITY
+
+%if STREAM <> WAVE %and 
+	STREAM <> SCWV %and 
+	STREAM <> DCWV %and 
+	STREAM <> MAWV %and 
+	STREAM <> WASF %and 
+
+	STREAM <> WAEF %and 
+	STREAM <> EWDA %and 
+
+	STREAM <> MNFW %and 
+	STREAM <> MFHW %and 
+	STREAM <> MFAW %and 
+
+	STREAM <> WVHC %and
+	STREAM <> EWHC %and
+
+	STREAM <> ENWH %and
+	STREAM <> EWHO %and
+
+	STREAM <> LWWV %and
+	STREAM <> EWLA %and
+
+	STREAM <> WAMF %then 
+	%unset FREQUENCY %unset DIRECTION
+
+! Avoid visiting all mars tree on the server
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and (%not CLASS))   %then 
+	%warning "Missing CLASS. Force to Operations"
+	%set CLASS= OD
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not DATE) %and (%not PSEUDODATE) ) %then 
+	%warning "Missing DATE. Force to yesterday"
+	%set DATE = -1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not STREAM) ) %then 
+	%warning "Missing STREAM. Force to Daily archive"
+	%set STREAM = OPER
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not EXPVER) ) %then 
+	%warning "Missing EXPVER. Force to 1"
+	%set EXPVER = 1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not TYPE) ) %then 
+	%warning "Missing TYPE. Force to Analysis"
+	%set TYPE = AN
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS = RD  %and (%not EXPVER) ) %then 
+	%error "Missing EXPVER. Please, specify one"
+
+%if (_VERB = LIST %and OUTPUT = TREE %and (%not HIDE)) %then 
+	%set HIDE=FILE/LENGTH/MISSING/OFFSET/ID/COST/MONTH/YEAR
+
+
+%if (_VERB = RETRIEVE %and EXPVER = 8 %and (%not GRID)) %then
+	%warning "To get old EXPVER=8 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 0.5/0.5"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 0.5/0.5
+
+%if (_VERB = RETRIEVE %and EXPVER = 8) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+%if (_VERB = RETRIEVE %and EXPVER = 7 %and (%not GRID)) %then
+	%warning "To get old EXPVER=7 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 2/2"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 2/2
+
+%if (_VERB = RETRIEVE %and EXPVER = 7) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+
+! Observation retrieval from new MARS
+%if (_VERB = RETRIEVE %and (STREAM = SSBT %or STREAM = E1)) %then
+	%warning "Changed STREAM to OPER"
+	%set STREAM = OPER
+
+%if (_VERB = RETRIEVE %and STREAM = SSMI) %then
+	%warning "Changed STREAM=OPER, TYPE=OB"
+	%set STREAM = OPER
+	%set TYPE = OB
+
+%if (ACCURACY = N) %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then
+	%unset ACCURACY
+
+%if (ACCURACY = R %or ACCURACY = L) %then
+	%warning "ACCURACY Low or Reduced force to 8 bits"
+	%set ACCURACY = 8
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) 
+	%and _VERB = RETRIEVE 
+	%and SOURCE 
+	%and (%not DATABASE) %then
+	%set DATABASE = file
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (EXPVER=fdy1) 
+	%and (%not DATABASE) %then
+	%set DATABASE = mars grib2
+
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=E4 %or 
+	      CLASS=EI %or
+		  CLASS=ER %or 
+		  CLASS=PV %or 
+		  CLASS=DM %or 
+		  CLASS=CS %or 
+		  CLASS=TO %or 
+		  CLASS=DT %or 
+		  CLASS=EL %or 
+		  CLASS=YT %or 
+		  CLASS=MC %or 
+		  CLASS=EM %or 
+		  CLASS=E2 %or 
+		  CLASS=ME %or 
+		  CLASS=EN) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marser
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=TI)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsth
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER < 10
+	%and (%not DATABASE) %then
+	%set DATABASE = marsod
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER > 9
+	%and (%not DATABASE) %then
+	%set DATABASE = marsode
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=CO %or CLASS=SR %or CLASS=LA %or CLASS=MS %or CLASS=4M) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marsms
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = REMOVE %or 
+	 _VERB = LIST)
+	%and (CLASS<>E4 %and 
+	      CLASS<>EI %and
+	      CLASS<>TI %and
+		  CLASS<>ER %and 
+		  CLASS<>PV %and 
+		  CLASS<>DM %and 
+		  CLASS<>OD %and 
+		  CLASS<>TO %and
+		  CLASS<>DT %and
+		  CLASS<>EN %and
+		  CLASS<>CO %and
+		  CLASS<>4M %and
+		  CLASS<>SR %and
+		  CLASS<>LA %and
+		  CLASS<>EL %and
+		  CLASS<>MS %and
+		  CLASS<>ME %and
+		  CLASS<>EM %and
+		  CLASS<>E2 %and
+		  CLASS<>MC %and
+		  CLASS<>CS)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsrd
+
+# ocean
+%if LEVTYPE = DP
+	%and (SECTION = M %or SECTION = Z) 
+	%and (PRODUCT = INST %or PRODUCT = TACC %or PRODUCT = TAVG)
+	%then
+	%unset LEVELIST
+
+# Special case for TIMS, V
+%if LEVTYPE = DP
+	%and SECTION = V
+	%and PRODUCT = TIMS 
+	%then
+	%unset LEVELIST
+
+%if LEVTYPE = DP
+	%and TYPE = OR
+	%and (%not PRODUCT)
+	%then
+		%warning "Default PRODUCT for Ocean ReAnalysis set to Instantaneous"
+		%set PRODUCT = INST
+
+
+# Year & month
+%if _VERB = RETRIEVE %and (YEAR %or MONTH) %then
+	%unset DATE
+
+# Boundary Conditions (BC)
+%if _VERB = RETRIEVE %and CLASS = OD %and TIME = 00 %and STREAM = OPER %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCDA for Boundary Conditions Project data"
+
+%if _VERB = RETRIEVE %and CLASS = OD %and TIME = 00 %and STREAM = WAVE %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCWV for Boundary Conditions wave data"
+
+%if (_VERB = ARCHIVE %and (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA) %and VERIFY) %then
+	%error "Please, use FCMONTH instead of VERIFY for archiving"
+	%error "Exiting..."
+
+%if ((CLASS <> OD %and CLASS <> EN %and CLASS <> ME) %and SYSTEM ) %then
+	%unset SYSTEM
+
+# A bit of paranoia...
+
+%if _VERB = REMOVE %and CLASS = OD %and %not DATABASE %then
+	%set DATABASE = dhstest
+	
+# That should be disabled in mars.def anyway
+
+%if _VERB = REMOVE %and (
+	CLASS = ER %or
+	CLASS = E4 %or 
+	CLASS = EI %or 
+	CLASS = EM %or 
+	CLASS = E2 %or 
+	CLASS = CS %or 
+	CLASS = PV %or 
+	CLASS = TO %or 
+	CLASS = DT %or 
+	CLASS = PE %or 
+	CLASS = MC %or 
+	CLASS = ME %or 
+	CLASS = DM
+	) %then
+	%error "Cannot remove this data..."
+
+
+%if (CLASS = IT %and MODEL = HRM) %or (CLASS = CO) %then
+	%warning "Post-processing directives are ignored"
+	%set _POSTPROCESSING = 0
+
+%if (STREAM = MODA %or STREAM = MSDA %or STREAM = EDMO %or STREAM = EWMO) %and (CLASS <> ER) %then
+	%unset TIME
+	%unset STEP
+
+%if (STREAM = MDFA) %then
+	%unset TIME
+
+%if (CLASS <> TO %and CLASS <> DT) %or STREAM <> SEAP %then
+	%unset LEADTIME
+	%unset OPTTIME
+
+%if (CLASS=DT) %then
+	%unset METHOD
+
+#########################################
+# Migration from old images to new images
+#########################################
+
+# Meteosat
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=2, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 2 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=3, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 205
+
+# GOES
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=4, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 4 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=20 by CHANNEL=3, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 615
+
+################################################
+# end of Migration from old images to new images
+################################################
+
+%if (FCMONTH %or FCPERIOD)  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then 
+	%unset STEP
+
+# %if (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA %or STREAM = MMSA) %then
+# 	%unset STEP
+# 
+
+%if CLASS = TI %then                %unset DOMAIN
+%if CLASS = TI %and TYPE = CF %then %set NUMBER=0
+%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
+%if CLASS = TI %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if CLASS = DM %and TYPE = FC %then %set TIME=0
+
+# ANOFFSET not valid unless Long window 4dvar 
+%if STREAM <> LWDA %and 
+	STREAM <> LWWV %and
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %then
+	%unset ANOFFSET
+
+
+# ERA Interim Data Server at full resolution
+%if ((DATASET = interim_full_daily)  %and
+    ((TYPE <> AN %and TYPE <> FC) %or
+	 (TYPE = FC %and (STEP > 12 %or LEVTYPE <> SFC)))) %then
+	 %error "Dataset ERA-Interim full resolution available only for Analysis and Forecast surface fluxes at time-step <= 12"
+	 %fail
+
+
+# Double-archiving marsrd/marsrd-cluster
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#    (DATABASE = marsrd)) %then %set DATABASE = marsrd/marsrd-cluster
+
+
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#     (DATABASE = marstest)) %then %set DATABASE = marstest/marsdev-core
+
+%include "rt_by_obsgroup.chk"
diff --git a/share/metview/etc/MarsTiggeDef b/share/metview/etc/MarsTiggeDef
new file mode 100644
index 0000000..0ebb986
--- /dev/null
+++ b/share/metview/etc/MarsTiggeDef
@@ -0,0 +1,2142 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+!
+! mars language definition file.
+!
+!     author.
+!     -------
+!
+!           b.raoult 22/10/90
+!
+!     Modifications.
+!     --------------
+!
+!           K. Fielding 26.07.93
+!           Add new observation types wind profile (WP) and
+!           temp mobile (TM)
+!
+!
+! syntax :
+!
+!
+!  command name ; command description ; command type     
+!  {
+!        parameter 1
+!        {
+!       value 1 ; abbreviation 1
+!               value 2 ; abbreviation 2
+!               value 3 
+!               ...
+!               value n ; abbreviation n
+!    } = default value
+!
+!        parameter 2
+!        {
+!            ...
+!        } = default value
+!       
+!        ...
+!
+! }
+!
+!------------------------------------------------------------------------
+
+TIGGEDEF ; TIGGE REQUEST  ; TIGGE
+{
+    PARAM {
+
+# Automatically generated by './tigge_def_for_mars.pl master.info'
+
+10 METER U VELOCITY                                ;    10U ;     165
+10 METER V VELOCITY                                ;    10V ;     166
+CONVECTIVE AVAILABLE POTENTIAL ENERGY              ;   CAPE ;      59
+CONVECTIVE INHIBITION                              ;     CIN ;  228001
+GEOPOTENTIAL HEIGHT                                ;     GH ;     156
+LAND SEA MASK                                      ;    LSM ;     172
+MEAN SEA LEVEL PRESSURE                            ;    MSL ;     151
+OROGRAPHY                                          ;   OROG ;  228002
+POTENTIAL TEMPERATURE                              ;     PT ;       3
+POTENTIAL VORTICITY                                ;     PV ;      60
+SKIN TEMPERATURE                                   ;    SKT ;     235
+SNOW DEPTH WATER EQUIVALENT                        ;     SD ;  228141
+SNOW FALL WATER EQUIVALENT                         ;     SF ;  228144
+SOIL MOISTURE                                      ;     SM ;  228039
+SOIL TEMPERATURE                                   ;     ST ;  228139
+SPECIFIC HUMIDITY                                  ;      Q ;     133
+SUNSHINE DURATION                                  ;   SUND ;     189
+SURFACE AIR DEW POINT TEMPERATURE                  ;     2D ;     168
+SURFACE AIR MAXIMUM TEMPERATURE                    ;  MX2T6 ;     121
+SURFACE AIR MINIMUM TEMPERATURE                    ;  MN2T6 ;     122
+SURFACE AIR TEMPERATURE                            ;     2T ;     167
+SURFACE PRESSURE                                   ;     SP ;     134
+TEMPERATURE                                        ;      T ;     130
+TIME INTEGRATED OUTGOING LONG WAVE RADIATION       ;    TTR ;     179
+TIME INTEGRATED SURFACE LATENT HEAT FLUX           ;   SLHF ;     147
+TIME INTEGRATED SURFACE NET SOLAR RADIATION        ;    SSR ;     176
+TIME INTEGRATED SURFACE NET THERMAL RADIATION      ;    STR ;     177
+TIME INTEGRATED SURFACE SENSIBLE HEAT FLUX         ;   SSHF ;     146
+TOTAL CLOUD COVER                                  ;    TCC ;  228164
+TOTAL COLUMN WATER                                 ;    TCW ;     136
+TOTAL PRECIPITATION                                ;     TP ;  228228
+U VELOCITY                                         ;      U ;     131
+V VELOCITY                                         ;      V ;     132
+
+		*
+        /   
+    } = T
+
+    CLASS
+    {
+		TIGGE       ;   TI
+
+    } = TI
+
+    TYPE
+    {
+		CONTROL FORECAST            ;   CF
+		FORECAST                    ;   FC
+		PERTURBED FORECAST          ;   PF
+		ALL                         
+    } = CF
+    
+    STREAM
+    {
+		ENFO
+		DA   ; OPER
+    } = ENFO
+
+	EXPVER
+	{
+		TEST
+		PROD
+	} = PROD
+
+	ORIGIN 
+	{
+	# TIGGE global
+		KWBC
+		BABJ
+		ECMF
+		EGRR
+		RJTD
+		AMMC
+		CWAO
+		RKSL
+		SBSJ
+		LFPW
+
+	# TIGGE LAM
+		COSMOLEPS-ARPASIMC-EU
+		/
+		ALL
+	}
+
+    MODEL
+	{
+		GLOB
+		LAM
+	} = GLOB
+
+    LEVTYPE  
+    {
+		POTENTIAL VORTICITY   ; PV
+		POTENTIAL TEMPERATURE ; PT
+        SURFACE               ; SFC
+        PRESSURE LEVELS       ; PL
+        MODEL LEVELS          ; ML
+		ALL
+    } = PL
+    
+    REPRES 
+    {
+        BUFR            ;   BU
+        SPHERICAL HARMONICS ;   SH
+        LAT LONG GRID       ;   LL
+        GAUSSIAN GRID       ;   GG
+		SPACE VIEW          ; SV
+		OCEAN GRID          ; OG
+		ALL
+    } = SH
+
+    DOMAIN
+    {
+		GENERAL EUROPEAN AREA   ; G
+		GLOBE                   ; G
+        MEDITERRANEAN           ; M
+        NORTHERN HEMISPHERE     ; N
+        SOUTHERN HEMISPHERE     ; S
+		BALTIC AND BLACK SEA    ; B
+		EUROPE                  ; E
+        NORTH WEST EUROPE       ; A
+        NORTH EAST EUROPE       ; B
+        SOUTH WEST EUROPE       ; C
+        SOUTH EAST EUROPE       ; D
+		WESTERN ATLANTIC        ; W
+		FASTEX                  ; F
+		TROPICS                 ; T
+		TROPICS 2               ; U
+		X
+		ALL
+		V
+		H
+		I
+		J
+		K
+		L
+		O
+		P
+		Q
+		R
+		Y
+		Z
+    } = GLOBE
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY         ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+        CURRENT DATE ; 0
+        YESTERDAY    ; -1
+		TO          ; TO
+		BY          ;   BY
+		/
+		OFF
+    } = CURRENT DATE
+
+    PADDING  
+    {
+		AUTOMATIC   ; AUTO
+		NONE        ; N    ; 0
+		OFF
+		*
+    } = OFF
+    
+} ! END OF TIGGEDEF
+
+HELP    ;   Displays prints help file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+NEWS    ;   Displays prints news file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+END ;   Normal exit from mars system    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+DEFAULT ;   Reset defaults    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+ARCHIVE ;   Archives data   ;   TIGGE
+{
+
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  { &TIGGEDEF&CLASS  } = TI
+
+    TYPE   { &TIGGEDEF&TYPE   } = CF
+
+    STREAM { &TIGGEDEF&STREAM } = ENFO
+    
+	MODEL  { &TIGGEDEF&MODEL } = GLOB
+
+	ORIGIN { &TIGGEDEF&ORIGIN } = ECMF
+
+	DOMAIN { &TIGGEDEF&DOMAIN } = G
+
+    EXPVER  [ priority = 1 ]
+    {
+		&TIGGEDEF&EXPVER 
+    } = PROD
+    
+    LEVTYPE { &TIGGEDEF&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/300
+    
+    PARAM { &TIGGEDEF&PARAM } = T
+
+    DATE 
+	{
+		&TIGGEDEF&DATE
+    } = CURRENT DATE
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+    STEP
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } 
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+    } = NEW
+    
+
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+    } = REMOVE
+
+	PADDING
+	{
+		&TIGGEDEF&PADDING
+	} = OFF
+
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+        OFF ;   OFF
+    } = OFF
+
+} ! END OF ARCHIVE
+
+!------------------------------------------------------------------------
+
+LIST    ;   LIST FDF ENTRIES AND CFS FILES  ;   TIGGE
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  
+	{ 
+		&TIGGEDEF&CLASS  
+		/ 
+		ALL
+	} = TI
+    
+    TYPE   
+	{ 
+		&TIGGEDEF&TYPE  
+		/  
+		ALL
+	} = CF 
+
+    STREAM 
+	{ 
+		&TIGGEDEF&STREAM 
+		/ 
+		ALL
+	} = ENFO 
+    
+	MODEL 
+	{
+		&TIGGEDEF&MODEL
+		/
+		ALL
+	} = GLOB
+
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+		ALL
+	}
+
+    EXPVER{
+		&TIGGEDEF&EXPVER
+		/
+		ALL
+    } = PROD 
+    
+    LEVTYPE 
+	{ 
+		&TIGGEDEF&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&TIGGEDEF&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&TIGGEDEF&DOMAIN
+		/
+		ALL
+    } 
+
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &TIGGEDEF&PARAM
+		/
+    }
+    
+    DATE
+    {
+		&TIGGEDEF&DATE
+		ALL
+    } 
+    
+    
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	YEAR
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+	} 
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } = OFF
+    
+    RESOL 
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	LOCATION 
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	PADDING
+	{
+		&TIGGEDEF&PADDING
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+        OFF ;   OFF
+    } = OFF
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	OUTPUT {
+		TABLE
+		BROWSER	
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+
+} ! END OF LIST
+
+STAGE    ;   STAGE FIELDS ;    MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&TIGGEDEF&CLASS  
+	} = TI
+    
+
+    TYPE
+	{ 
+		&TIGGEDEF&TYPE   
+		ALL
+	} = CF
+
+    STREAM
+	{ 
+		&TIGGEDEF&STREAM 
+	} = ENFO
+    
+	MODEL 
+	{
+		&TIGGEDEF&MODEL
+		OFF
+		/
+	} = OFF
+
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+	} = ALL
+
+    EXPVER
+	{
+		&TIGGEDEF&EXPVER
+		/
+    } = PROD
+    
+
+    LEVTYPE
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	} = PL 
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES
+	{ 
+		&TIGGEDEF&REPRES 
+	} = SH
+    
+    DOMAIN
+    {
+		&TIGGEDEF&DOMAIN
+    } = G
+
+    PARAM
+    {
+        ALL             ;   ALL
+        &TIGGEDEF&PARAM
+    } = T
+    
+    DATE
+    {
+		&TIGGEDEF&DATE
+    } = CURRENT DATE
+    
+    TIME 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    BLOCK
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+	RESOL
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+        *   
+	} = AUTO
+
+	ACCURACY
+	{
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+        *   
+		ARCHIVED VALUE ; AV
+	} = N
+
+	AREA
+	{
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+	} = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	GRID
+	{
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+	} = OFF
+
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+		OFF
+    } = OFF
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	DATABASE 
+	{
+		@
+		/
+	} 
+
+} ! END OF STAGE
+
+!------------------------------------------------------------------------
+
+REMOVE  ;   REMOVE FDF ENTRIES AND CFS FILES    ;   MARS
+{
+    
+    CLASS  { 
+		&TIGGEDEF&CLASS  
+	} = TI
+
+    
+    PASSWORD
+    {
+        "   
+		@
+    } 
+    
+    EXPVER
+    {
+		@
+        "   
+    } = ""
+    
+    DOMAIN
+    {
+		&TIGGEDEF&DOMAIN
+    }
+    
+	DATABASE
+	{
+		@
+		*
+		/
+	} 
+
+    TYPE   { &TIGGEDEF&TYPE   }
+
+	DATE { 
+		*
+		TO
+		/
+	}
+
+	TIME {
+		*
+		TO
+		/
+	}
+
+    STREAM
+	{ 
+		&TIGGEDEF&STREAM 
+	}
+    
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+	}
+
+
+    LEVTYPE
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	}
+
+	VOLUME { * }
+
+	CREATED { * }
+
+	LASTACCESS { * }
+
+	EXPR { 
+		"
+		* 
+	}
+
+} ! END OF REMOVE
+
+!------------------------------------------------------------------------
+    
+!------------------------------------------------------------------------
+
+EXPORT  ;   Write cfs files to tape    ;   MARS
+{
+    
+    VOLSER
+    {
+        "   
+    } = ""
+    
+    SLOTNO
+    {
+        "   
+    } = ""
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    DENSITY
+    {
+        *
+    } = 6250
+    
+    RECLEN
+    {
+        *   
+    } = 120
+    
+    FILESEQ
+    {
+        *   
+    } = 1
+    
+    SOFTWARE
+    {
+        "   
+    } = ""
+    
+    FILTER
+    {
+        "   
+    } = "*"
+    
+    CHECK
+    {
+        YES ;   Y
+        NO  ;   N
+    } = NO
+
+}
+
+!------------------------------------------------------------------------
+
+
+RETRIEVE_TIGGE    ;   Retrieval of data   ;   TIGGE
+{
+    
+	DATASET [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		@
+	}
+
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&TIGGEDEF&CLASS   
+	} = TI
+    
+
+    TYPE  	[	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/image/obs/all,
+				mars_interface         = menu,
+				java_hidden  = FALSE ] 
+	{ 
+		&TIGGEDEF&TYPE   
+		*
+	} = CF
+
+
+    STREAM 	[ 	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&TIGGEDEF&STREAM 
+		*
+	} = ENFO
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				marsdoc      = id,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+	{
+        /
+		PROD
+		TEST
+	ALL
+    } = PROD
+    
+
+    MODEL 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				hidden       = TRUE,
+				java_hidden  = FALSE ]
+	{
+		&TIGGEDEF&MODEL
+		OFF
+	} = OFF
+
+    REPRES [ java_control = CHOICE, 
+			 java_section = ID, 
+			 marsdoc      = id,
+			 java_hidden = FALSE ] 
+	{ 
+		&TIGGEDEF&REPRES 
+	} = SH
+    
+    LEVTYPE [ java_control = CHOICE, 
+			  java_section = ID, 
+			  marsdoc      = field/all,
+			  mars_interface         = menu,
+			  java_hidden = FALSE ] 
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, 
+			   java_section = ID, 
+			   marsdoc      = field/level,
+			   mars_interface         = text,
+			   java_hidden = FALSE ]
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/300
+    
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, 
+			marsdoc      = field/all,
+			mars_interface         = list,
+			java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             
+        &TIGGEDEF&PARAM
+    } = T
+    
+	YEAR [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+		&TIGGEDEF&DATE
+    } = YESTERDAY
+    
+    TIME [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+    STEP [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+!		* [DAY]
+!		* [MONTH]
+!		* [WEEK]
+!		* [VERIFY]
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } 
+    
+    NUMBER [ java_control = CHOICE_TEXT_2, 
+			 java_section = OTHER, 
+			 marsdoc      = field/ensemble,
+			 mars_interface         = text,
+			 java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+
+    DOMAIN  [ 	help = help_multiple_selection, # For Metview
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden = FALSE ] 
+    {
+	&TIGGEDEF&DOMAIN
+    } = GLOBE
+
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/supplementary,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{
+		&TIGGEDEF&ORIGIN
+	} = ECMF
+
+
+    SOURCE  [   java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+				mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET [ java_control = TEXT, 
+			 java_section = TARGET, 
+			 marsdoc      = target,
+			 mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+			 java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+
+    TRANSFER [ hidden      = TRUE, check        = false ]
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET  [ java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+			 	mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, 
+			   java_section = TARGET, 
+			   hidden      = TRUE,
+			check        = false,
+			   java_hidden = TRUE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, 
+	          java_section = DATA, 
+				hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP [ java_control = CHOICE,
+			java_section = DATA,
+			hidden      = TRUE,
+			check        = false,
+			java_hidden = FALSE ]
+
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL [ help = help_multiple_selection,  # For Metview
+			check        = false,
+			java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = menu,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   	java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION [ java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/obs,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	LOCATION [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+	ROTATION [ java_control = CHOICE_TEXT_2,
+			   java_section = DATA,
+			   marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN [  help = help_multiple_selection,  # For Metview
+				java_control = CHOICE_TEXT_2, 
+				java_section = DATA, 
+				marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+				java_hidden = FALSE ]
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION [ marsdoc      = pproc/field,
+			check        = false,
+					mars_interface         = text ]
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING [ help = help_multiple_selection,  # For Metview
+			  java_control = CHOICE_TEXT_2,
+			  java_section = DATA,
+			  marsdoc      = pproc/field,
+			  hidden       = true,
+			check        = false,
+			  mars_interface         = text,
+			  java_hidden = FALSE ]
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		JPEG
+		OFF
+	} = OFF
+
+
+    PADDING  [ 	help = help_multiple_selection,  # For Metview
+			check        = false,
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+				mars_interface    = text,
+				java_hidden = FALSE ]
+    {
+		&TIGGEDEF&PADDING
+		OFF
+    } = 0
+    
+
+    DUPLICATES  [ 	java_control = CHOICE, 
+				  	java_section = OTHER, 
+				  	marsdoc      = obs,
+					mars_interface    = on_off,
+			check        = false,
+				  	java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, 
+			  java_section = OTHER, 
+			  hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+    USE  [ 	java_control=CHOICE, 
+	       	java_section=OTHER, 
+		   	marsdoc     = control,
+			mars_interface         = menu,
+			hidden     = TRUE,
+			check        = false,
+		   	java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+    {
+		LOCAL 
+        OFF ;   OFF
+    } = LOCAL
+
+	DATABASE  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				priority = 1,
+				java_hidden = TRUE ]
+	{
+		@
+		/
+	}
+
+	EXPECT [    priority = 0,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+	} = 2.0
+    
+} ! END OF RETRIEVE
+
+READ_TIGGE ; X; TIGGEMETVIEW
+{
+    FIELDSET [ visible = false ] {
+    @
+    } = OUT
+
+	READ_DATA_FROM [ visible = false ]
+	{
+		FILE
+		METVIEW_ICON
+	} = FILE
+
+
+    SOURCE  [ visible = always, help = help_file_box ]
+	{
+		@
+		OFF
+    } = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATA
+		[
+			interface = icon,
+			class           = GRIB,
+			exclusive       = true
+		]
+	{
+		@
+	}
+
+
+	CFSPATH {
+		@
+		OFF
+	} = OFF
+
+    ORDER [ label = 'Field Ordering' ] {
+	AS IS  ; 0
+        SORTED ; 1
+    } = AS IS
+
+	CLASS  { &TIGGEDEF&CLASS 
+			 ANY ; ANY
+			 } = ANY
+
+	STREAM [ help = help_multiple_selection, exclusive = True ]
+		{ &TIGGEDEF&STREAM 
+			 ANY ; ANY
+			 *
+			 } = ANY
+
+    TYPE   [ help = help_multiple_selection, exclusive = True ]
+		{ 
+		ANY ; ANY
+		&TIGGEDEF&TYPE   
+		*
+	} = ANY
+    
+    MODEL   { 
+		ANY ; ANY
+		&TIGGEDEF&MODEL   
+	} = ANY
+    
+    LEVTYPE
+    {
+		ANY ; ANY
+		&TIGGEDEF&LEVTYPE
+    } = ANY
+    
+    LEVELIST
+    {
+        ANY ; ANY
+		TO  ; TO
+		BY  ; BY 
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = ANY
+    
+    PARAM [ help = help_multiple_selection ] # For Metview
+    {
+        ANY             ;   ANY
+        &TIGGEDEF&PARAM
+    } = ANY
+    
+    DATE
+    {
+		ANY             ;   ANY
+		&TIGGEDEF&DATE   
+    } = ANY
+    
+    TIME
+    {
+		ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+    } = ANY
+    
+    STEP
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY
+    
+    ANOFFSET
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = ANY
+    
+    ACCURACY 
+    {
+		ANY     ;   ANY
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+		ANY
+    } = ANY
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+		ANY
+    } = ANY
+
+    AREA
+    {
+		ANY ; ANY
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        *   
+        /   
+    } = ANY
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+	RESOL 
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		319
+		213
+		106
+        *   
+		ANY ; ANY
+	} = ANY
+
+	ROTATION
+	{
+		ANY     ; ANY
+		*
+		/
+	} = ANY
+
+    GRID
+    {
+        ANY     ; ANY
+        *   
+        /   
+    } = ANY
+
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+	TARGET [ visible = false ]
+	{
+		@
+		"
+		OFF
+	} = OFF
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+    
+! For compatibility with RETRIEVE_TIGGE  They are unset in Mars rules
+
+	REPRES { &TIGGEDEF&REPRES
+			 ANY ; ANY
+			 } = ANY 
+
+    ORIGIN 	{ &TIGGEDEF&ORIGIN
+			 ANY ; ANY
+			 } = ANY 
+
+    PADDING  
+    {
+		ANY  ; ANY
+		&TIGGEDEF&PADDING
+    } = ANY
+    
+    DOMAIN 
+    {
+	&TIGGEDEF&DOMAIN
+	ANY
+    } = ANY
+    
+    EXPVER{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+		ANY ; ANY
+    } = ANY
+    
+}
+
+FLUSH ;   Flushes data   ;   MARS
+{
+
+    CLASS  { &TIGGEDEF&CLASS  }
+
+    TYPE   { &TIGGEDEF&TYPE   }
+
+    STREAM { &TIGGEDEF&STREAM }
+
+    MODEL  { &TIGGEDEF&MODEL }
+
+    ORIGIN { &TIGGEDEF&ORIGIN }
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    }
+    
+    LEVTYPE  { &TIGGEDEF&LEVTYPE }
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    }
+    
+    REPRES   { &TIGGEDEF&REPRES }
+    
+    DOMAIN 
+    {
+	&TIGGEDEF&DOMAIN
+    }
+    
+    PARAM { &TIGGEDEF&PARAM }
+    
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    }
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    }
+    
+    STEP
+    {
+        *   
+    }
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    }
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } 
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    }
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    }
+    
+    PASSWORD
+    {
+        "   
+    } 
+
+	DATABASE
+	{
+		@
+		/
+	} 
+
+! Only for FLUSH
+
+	WAIT
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+	DECACHE
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+} ! END OF FLUSH
diff --git a/share/metview/etc/MarsTiggeRules b/share/metview/etc/MarsTiggeRules
new file mode 100644
index 0000000..4c13594
--- /dev/null
+++ b/share/metview/etc/MarsTiggeRules
@@ -0,0 +1,764 @@
+!
+! This is the mars check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!          ---> info	 MESSAGE
+!          ---> mail	 MESSAGE
+!          ---> set      PARAMETER = VALUE
+!          ---> unset    PARAMETER 
+!
+!
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+
+# Remove access to marsodb
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = REMOVE)
+	%and DATABASE=marsodb %then
+	%unset DATABASE
+
+%include "oldrd.chk"
+
+
+%if CLASS = OD %and (TYPE = CM %or TYPE = CS %or TYPE = CR) %and DOMAIN = G %then 
+	%warning "Domain forced to E"
+	%set DOMAIN = E
+
+%if (TYPE = IM %or TYPE = SIM %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%set REPRES = SV
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset RESOL
+	%unset DUPLICATES 
+	%unset GRID 
+	%unset ROTATION 
+
+# Simulated radiances
+%if (TYPE = SSD) %then
+	%unset LEVTYPE
+	%unset LEVELIST
+
+
+%if (TYPE = IM  %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%unset STEP
+
+
+%if TYPE = OB %or TYPE = FB  %or STREAM = SSMI %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = OFB %or TYPE = MFB %then 
+	%set REPRES = BU
+	%unset PARAM  
+	%unset STEP  
+	%unset LEVTYPE  
+	%unset LEVELIST  
+	%unset GRID 
+	%unset ROTATION 
+
+%if TYPE = TF %then
+	%set REPRES = BU
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset GRID 
+	%unset ROTATION
+
+%if TYPE = AB %then
+	%unset TIME
+
+%if TYPE = OB %or TYPE = FB %then
+	%unset ORDER
+
+%if TYPE = CL %then
+	%unset STEP
+
+%if LEVTYPE = SFC %or LEVTYPE = WAVE %then 
+	%unset LEVELIST
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = ER %and STREAM = OPER %and (TYPE = AN %or TYPE = FC) %and (%not REPRES) %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %and (TYPE = IA %or TYPE = AN) %and DATE < 19830420 %then
+	%set REPRES = LL
+
+%if (_VERB = RETRIEVE_TIGGE %and TYPE = TU) %then
+	%set REPRES = LL
+
+%if %not ( TYPE = OLDIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then 
+	%unset OBSTYPE 
+	%unset OBSGROUP 
+	%unset DUPLICATES 
+
+%if %not ( TYPE = IM %or TYPE = OLDIM %or TYPE = SIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB %or TYPE = SSD) %then 
+	%unset IDENT 
+
+%if _VERB = LIST %and %not OBSGROUP %and (TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then
+	%set OBSGROUP = ALL
+
+%if GRID=O  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+%if GRID=AV  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+
+%if (RESOL=AUTO %or RESOL=AV) %and (%not GRID) %then %unset RESOL
+%if (STYLE = DISSEMINATION) %and (RESOL=AUTO %or (%not RESOL)) %then 
+	%warning "Force RESOL=AV when STYLE=DISSEMINATION"
+	%set RESOL=AV
+
+%if AREA = E %then
+	%set AREA = 73.5/-27/33/45
+
+%if (AREA = G %or AREA = GLOBE) %and (_APPL = diss) %then
+	%warning "Expand global AREA for dissemination to AREA = 90/0/-90/359.99"
+	%set AREA = 90/0/-90/359.99
+
+%if AREA = G %then
+	%set _AREA_N = 0
+	%set _AREA_W = 0
+	%set _AREA_S = 0
+	%set _AREA_E = 0
+
+%if AREA = G %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+%if AREA = GLOBE %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+
+%if FORMAT = P %or FORMAT = PACKED  %then %unset FORMAT
+
+# %if FORMAT %then %warning "Format is not yet implemented" %unset FORMAT
+
+
+%if USE = NORMAL     %then %unset USE
+%if USE = STAGE     %then %set TARGET="/dev/null" %unset FIELDSET %set EXPECT=0
+%if COSTONLY = N %then %unset COSTONLY
+
+
+
+!
+!
+!
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CLASS=ANY     %then %unset CLASS
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STREAM=ANY    %then %unset STREAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and MODEL=ANY     %then %unset MODEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVTYPE=ANY   %then %unset LEVTYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVELIST=ANY  %then %unset LEVELIST
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE=ANY      %then %unset TYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PARAM=ANY     %then %unset PARAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DATE=ANY      %then %unset DATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TIME=ANY      %then %unset TIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STEP=ANY      %then %unset STEP
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ANOFFSET=ANY %then %unset ANOFFSET
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and AREA=ANY      %then %unset AREA
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and GRID=ANY      %then %unset GRID
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ROTATION=ANY  %then %unset ROTATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STYLE=ANY     %then %unset STYLE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RESOL=ANY     %then %unset RESOL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORDER=0       %then %unset ORDER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and EXPVER=ANY    %then %unset EXPVER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFERENCE=ANY %then %unset REFERENCE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DOMAIN=ANY    %then %unset DOMAIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORIGIN=ANY    %then %unset ORIGIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CHANNEL=ANY   %then %unset CHANNEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RANGE=ANY     %then %unset RANGE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEADTIME=ANY  %then %unset LEADTIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and OPTTIME=ANY   %then %unset OPTTIME
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PADDING=ANY     %then %unset PADDING
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SYSTEM=ANY     %then %unset SYSTEM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and METHOD=ANY     %then %unset METHOD
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PRODUCT=ANY     %then %unset PRODUCT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SECTION=ANY     %then %unset SECTION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LATITUDE=ANY     %then %unset LATITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LONGITUDE=ANY     %then %unset LONGITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and NUMBER=ANY     %then %unset NUMBER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and QUANTILE=ANY     %then %unset QUANTILE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ITERATION=ANY     %then %unset ITERATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIAGNOSTIC=ANY     %then %unset DIAGNOSTIC
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INSTRUMENT=ANY     %then %unset INSTRUMENT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FILTER=ANY     %then %unset FILTER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INTERPOLATION=ANY     %then %unset INTERPOLATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFDATE=ANY     %then %unset REFDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and HDATE=ANY     %then %unset HDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FREQUENCY=ANY     %then %unset FREQUENCY
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIRECTION=ANY     %then %unset DIRECTION
+
+
+
+
+%if TYPE <> CF %and TYPE <> PF %and TYPE <> CV %then %unset ENSEMBLE
+%if TYPE <> CM %and TYPE <> CS  %then %unset CLUSTER
+%if TYPE <> FP %then %unset PROBABILITY
+
+
+#%if TYPE <> CF %and 
+%if TYPE <> PF %and 
+	TYPE <> CM %and 
+	TYPE <> CS %and 
+	TYPE <> CR %and 
+	TYPE <> CV %and 
+	TYPE <> SV %and 
+	TYPE <> AS %and 
+	TYPE <> FP %and 
+	TYPE <> ED %and 
+	TYPE <> TU %and 
+	TYPE <> CI %and
+	TYPE <> ME %and 
+	TYPE <> FF %and           # Ocean
+	TYPE <> ICP %and 
+	TYPE <> SOT %and 
+	TYPE <> FCMEAN %and
+	TYPE <> FCMAX %and
+	TYPE <> FCMIN %and
+	TYPE <> FCSTDEV %and
+	TYPE <> SVAR %and
+	CLASS <> TI %and
+	STREAM <> MOFC %and 
+	STREAM <> WAMF %and 
+	STREAM <> MOFM %and 
+	STREAM <> WMFM %and 
+	STREAM <> SEAS %and 
+	STREAM <> WASF %and
+	STREAM <> WAMF %and
+	STREAM <> SFMM %and
+	STREAM <> SMMA %and
+	STREAM <> SEAP %and 
+	STREAM <> SWMM %and
+	STREAM <> OCEA %and
+# New Monthly Forecast
+	STREAM <> MNFC %and
+    STREAM <> MNFH %and
+    STREAM <> MNFA %and
+    STREAM <> MNFW %and
+    STREAM <> MFHW %and
+    STREAM <> MFAW %and
+    STREAM <> MNFM %and
+    STREAM <> MFHM %and
+    STREAM <> MFAM %and
+    STREAM <> MFWM %and
+    STREAM <> MHWM %and
+    STREAM <> MAWM %and
+# New Multi-model
+	STREAM <> MMSF %and 
+	STREAM <> MSMM %and 
+	STREAM <> WAMS %and 
+	STREAM <> MSWM %and 
+	STREAM <> MMSA %and 
+# Ensemble Data Assimilation
+	STREAM <> ENDA %and 
+	STREAM <> EWDA %and 
+	STREAM <> EDMM %and 
+	STREAM <> EDMO %and 
+	STREAM <> EWMM %and 
+	STREAM <> EWMO %and 
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %and 
+# Ensemble Supplementary data
+	STREAM <> ESPD %and 
+# Multi-model Multi-annual
+	STREAM <> MMAF %and 
+	STREAM <> MMAM %and 
+	STREAM <> MMAW %and 
+	STREAM <> MMWM %and 
+	STREAM <> SEAS %then
+	%unset NUMBER
+
+%if STREAM <> ENFH %and 
+	STREAM <> ENWH %and
+	STREAM <> EFHO %and
+	STREAM <> EHMM %and
+	STREAM <> EWHO %then
+	%unset HDATE
+
+%if (TYPE <> PD %and 
+    TYPE <> CD %and
+    TYPE <> PB) %then
+	%unset QUANTILE
+
+%if ( STREAM = MNFM %or
+	STREAM = MFHM %or
+    STREAM = MFAM %or
+    STREAM = MFWM %or
+    STREAM = MHWM %or
+    STREAM = ESMM %or
+    STREAM = EHMM %or
+    STREAM = MAWM )
+	%then
+	%unset STEP
+
+%if ( STREAM = MFHM %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES) )
+	%then 
+	%unset DATE
+
+%if ( STREAM = MNFH %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = ED ) )
+	%then
+	%unset DATE
+
+%if (_VERB = RETRIEVE_TIGGE %or _VERB = ARCHIVE) %and 
+	(STREAM <> MOFC %and STREAM <> WAMF %and STREAM <> MOFM %and STREAM <> WMFM) %and 
+	(TYPE = CF %or TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = TAEM %or TYPE = TAES) %then 
+	%unset ENSEMBLE %unset NUMBER
+
+! For read
+%if _VERB = READ_TIGGE %and CLASS  <> ANY %then %warning "CLASS  ignored in READ_TIGGE"
+%if _VERB = READ_TIGGE %and REPRES <> ANY %then %warning "REPRES ignored in READ_TIGGE"
+
+%if _VERB = READ_TIGGE %then 
+	%unset CLASS 
+	%unset REPRES
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE = FG %and STEP = 0 %and STREAM = OPER  
+	%then 
+		%warning "First Guess step 0 removed"
+		%error   "Please, use STEP=06 instead"
+
+
+! =========================================
+! For wave, there is no step for FG
+%if (STREAM = WAVE %or STREAM = SCWV %or STREAM = DCWV) %and TYPE = FG %and STEP <> 0 %then 
+	%warning "For wave first-guess, step is ignored and set to zero"
+	%set     STEP = 0
+
+! =========================================
+! There are no waves in altitude
+%if STREAM = WAVE %or 
+	STREAM = WAEF %or 
+	STREAM = WEHS %or 
+	STREAM = WEOV %or 
+	STREAM = WAMO %or 
+	STREAM = SCWV %or 
+	STREAM = DCWV %or 
+	STREAM = WVHC %or
+	STREAM = EWHC %or
+	STREAM = MAWV %or
+	STREAM = WASF %or 
+	STREAM = WAMF %or
+	STREAM = WMFM %or
+	STREAM = SWMM %or
+	STREAM = MNFW %or
+	STREAM = MFHW %or
+	STREAM = MFAW %or
+	STREAM = MFWM %or
+	STREAM = MHWM %or
+	STREAM = MAWM %or
+	STREAM = WAMS %or
+	STREAM = DACW %or
+	STREAM = EWDA %or
+	STREAM = LWWV %or
+	STREAM = EWLA %or
+	STREAM = MSWM %then
+
+	%warning "For wave data, LEVTYPE forced to Surface"
+	%set     LEVTYPE = SFC
+	%unset   LEVELIST
+
+!===========================================================
+
+!
+! Avoid use of ENSEMBLE, CLUSTER and PROBABILITY in new MARS retrieval editors
+
+%if TYPE = PF %and ENSEMBLE = OFF %then %unset ENSEMBLE
+%if (TYPE = CM %or TYPE = CS %or TYPE = CR) %and CLUSTER = OFF %then %unset CLUSTER
+%if (TYPE = FP) %and PROBABILITY = OFF %then %unset PROBABILITY
+
+%if STREAM <> WAVE %and 
+	STREAM <> SCWV %and 
+	STREAM <> DCWV %and 
+	STREAM <> MAWV %and 
+	STREAM <> WASF %and 
+
+	STREAM <> WAEF %and 
+	STREAM <> EWDA %and 
+
+	STREAM <> MNFW %and 
+	STREAM <> MFHW %and 
+	STREAM <> MFAW %and 
+
+	STREAM <> WVHC %and
+	STREAM <> EWHC %and
+
+	STREAM <> ENWH %and
+	STREAM <> EWHO %and
+
+	STREAM <> LWWV %and
+	STREAM <> EWLA %and
+
+	STREAM <> WAMF %then 
+	%unset FREQUENCY %unset DIRECTION
+
+! Avoid visiting all mars tree on the server
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and (%not CLASS))   %then 
+	%warning "Missing CLASS. Force to Operations"
+	%set CLASS= OD
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not DATE) %and (%not PSEUDODATE) ) %then 
+	%warning "Missing DATE. Force to yesterday"
+	%set DATE = -1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not STREAM) ) %then 
+	%warning "Missing STREAM. Force to Daily archive"
+	%set STREAM = OPER
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not EXPVER) ) %then 
+	%warning "Missing EXPVER. Force to 1"
+	%set EXPVER = 1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not TYPE) ) %then 
+	%warning "Missing TYPE. Force to Analysis"
+	%set TYPE = AN
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS = RD  %and (%not EXPVER) ) %then 
+	%error "Missing EXPVER. Please, specify one"
+
+%if (_VERB = LIST %and OUTPUT = TREE %and (%not HIDE)) %then 
+	%set HIDE=FILE/LENGTH/MISSING/OFFSET/ID/COST/MONTH/YEAR
+
+
+%if (_VERB = RETRIEVE_TIGGE %and EXPVER = 8 %and (%not GRID)) %then
+	%warning "To get old EXPVER=8 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 0.5/0.5"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 0.5/0.5
+
+%if (_VERB = RETRIEVE_TIGGE %and EXPVER = 8) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+%if (_VERB = RETRIEVE_TIGGE %and EXPVER = 7 %and (%not GRID)) %then
+	%warning "To get old EXPVER=7 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 2/2"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 2/2
+
+%if (_VERB = RETRIEVE_TIGGE %and EXPVER = 7) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+
+! Observation retrieval from new MARS
+%if (_VERB = RETRIEVE_TIGGE %and (STREAM = SSBT %or STREAM = E1)) %then
+	%warning "Changed STREAM to OPER"
+	%set STREAM = OPER
+
+%if (_VERB = RETRIEVE_TIGGE %and STREAM = SSMI) %then
+	%warning "Changed STREAM=OPER, TYPE=OB"
+	%set STREAM = OPER
+	%set TYPE = OB
+
+%if (ACCURACY = N) %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then
+	%unset ACCURACY
+
+%if (ACCURACY = R %or ACCURACY = L) %then
+	%warning "ACCURACY Low or Reduced force to 8 bits"
+	%set ACCURACY = 8
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) 
+	%and _VERB = RETRIEVE_TIGGE 
+	%and SOURCE 
+	%and (%not DATABASE) %then
+	%set DATABASE = file
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (EXPVER=fdy1) 
+	%and (%not DATABASE) %then
+	%set DATABASE = mars grib2
+
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=E4 %or 
+	      CLASS=EI %or
+		  CLASS=ER %or 
+		  CLASS=PV %or 
+		  CLASS=DM %or 
+		  CLASS=CS %or 
+		  CLASS=TO %or 
+		  CLASS=DT %or 
+		  CLASS=EL %or 
+		  CLASS=YT %or 
+		  CLASS=MC %or 
+		  CLASS=EM %or 
+		  CLASS=E2 %or 
+		  CLASS=ME %or 
+		  CLASS=EN) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marser
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=TI)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsth
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER < 10
+	%and (%not DATABASE) %then
+	%set DATABASE = marsod
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER > 9
+	%and (%not DATABASE) %then
+	%set DATABASE = marsode
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=CO %or CLASS=SR %or CLASS=LA %or CLASS=MS %or CLASS=4M) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marsms
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = REMOVE %or 
+	 _VERB = LIST)
+	%and (CLASS<>E4 %and 
+	      CLASS<>EI %and
+	      CLASS<>TI %and
+		  CLASS<>ER %and 
+		  CLASS<>PV %and 
+		  CLASS<>DM %and 
+		  CLASS<>OD %and 
+		  CLASS<>TO %and
+		  CLASS<>DT %and
+		  CLASS<>EN %and
+		  CLASS<>CO %and
+		  CLASS<>4M %and
+		  CLASS<>SR %and
+		  CLASS<>LA %and
+		  CLASS<>EL %and
+		  CLASS<>MS %and
+		  CLASS<>ME %and
+		  CLASS<>EM %and
+		  CLASS<>E2 %and
+		  CLASS<>MC %and
+		  CLASS<>CS)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsrd
+
+# ocean
+%if LEVTYPE = DP
+	%and (SECTION = M %or SECTION = Z) 
+	%and (PRODUCT = INST %or PRODUCT = TACC %or PRODUCT = TAVG)
+	%then
+	%unset LEVELIST
+
+# Special case for TIMS, V
+%if LEVTYPE = DP
+	%and SECTION = V
+	%and PRODUCT = TIMS 
+	%then
+	%unset LEVELIST
+
+%if LEVTYPE = DP
+	%and TYPE = OR
+	%and (%not PRODUCT)
+	%then
+		%warning "Default PRODUCT for Ocean ReAnalysis set to Instantaneous"
+		%set PRODUCT = INST
+
+
+# Year & month
+%if _VERB = RETRIEVE_TIGGE %and (YEAR %or MONTH) %then
+	%unset DATE
+
+# Boundary Conditions (BC)
+%if _VERB = RETRIEVE_TIGGE %and CLASS = OD %and TIME = 00 %and STREAM = OPER %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCDA for Boundary Conditions Project data"
+
+%if _VERB = RETRIEVE_TIGGE %and CLASS = OD %and TIME = 00 %and STREAM = WAVE %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCWV for Boundary Conditions wave data"
+
+%if (_VERB = ARCHIVE %and (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA) %and VERIFY) %then
+	%error "Please, use FCMONTH instead of VERIFY for archiving"
+	%error "Exiting..."
+
+%if ((CLASS <> OD %and CLASS <> EN %and CLASS <> ME) %and SYSTEM ) %then
+	%unset SYSTEM
+
+# A bit of paranoia...
+
+%if _VERB = REMOVE %and CLASS = OD %and %not DATABASE %then
+	%set DATABASE = dhstest
+	
+# That should be disabled in mars.def anyway
+
+%if _VERB = REMOVE %and (
+	CLASS = ER %or
+	CLASS = E4 %or 
+	CLASS = EI %or 
+	CLASS = EM %or 
+	CLASS = E2 %or 
+	CLASS = CS %or 
+	CLASS = PV %or 
+	CLASS = TO %or 
+	CLASS = DT %or 
+	CLASS = PE %or 
+	CLASS = MC %or 
+	CLASS = ME %or 
+	CLASS = DM
+	) %then
+	%error "Cannot remove this data..."
+
+
+%if (CLASS = IT %and MODEL = HRM) %or (CLASS = CO) %then
+	%warning "Post-processing directives are ignored"
+	%set _POSTPROCESSING = 0
+
+%if (STREAM = MODA %or STREAM = MSDA %or STREAM = EDMO %or STREAM = EWMO) %and (CLASS <> ER) %then
+	%unset TIME
+	%unset STEP
+
+%if (STREAM = MDFA) %then
+	%unset TIME
+
+%if (CLASS <> TO %and CLASS <> DT) %or STREAM <> SEAP %then
+	%unset LEADTIME
+	%unset OPTTIME
+
+%if (CLASS=DT) %then
+	%unset METHOD
+
+#########################################
+# Migration from old images to new images
+#########################################
+
+# Meteosat
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=2, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 2 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=3, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 205
+
+# GOES
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=4, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 4 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=20 by CHANNEL=3, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 615
+
+################################################
+# end of Migration from old images to new images
+################################################
+
+%if (FCMONTH %or FCPERIOD)  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then 
+	%unset STEP
+
+# %if (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA %or STREAM = MMSA) %then
+# 	%unset STEP
+# 
+
+%if CLASS = TI %then                %unset DOMAIN
+%if CLASS = TI %and TYPE = CF %then %set NUMBER=0
+%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
+%if CLASS = TI %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if CLASS = DM %and TYPE = FC %then %set TIME=0
+
+# ANOFFSET not valid unless Long window 4dvar 
+%if STREAM <> LWDA %and 
+	STREAM <> LWWV %and
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %then
+	%unset ANOFFSET
+
+
+# ERA Interim Data Server at full resolution
+%if ((DATASET = interim_full_daily)  %and
+    ((TYPE <> AN %and TYPE <> FC) %or
+	 (TYPE = FC %and (STEP > 12 %or LEVTYPE <> SFC)))) %then
+	 %error "Dataset ERA-Interim full resolution available only for Analysis and Forecast surface fluxes at time-step <= 12"
+	 %fail
+
+
+# Double-archiving marsrd/marsrd-cluster
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#    (DATABASE = marsrd)) %then %set DATABASE = marsrd/marsrd-cluster
+
+
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#     (DATABASE = marstest)) %then %set DATABASE = marstest/marsdev-core
+
+%include "rt_by_obsgroup.chk"
diff --git a/share/metview/etc/ObjectList b/share/metview/etc/ObjectList
new file mode 100644
index 0000000..ba59cd6
--- /dev/null
+++ b/share/metview/etc/ObjectList
@@ -0,0 +1,2955 @@
+#
+# Installations outside ECMWF: look for comments containing the word:
+#
+#     INSTIP
+#
+# There are some applications that are not valid outside ECMWF. Setting
+# the parameter 'can_be_created' to 'False' removes these icons from
+# Create Button area.
+# (Most of them are already handled by environment variables (970710/vk))
+#
+
+##################################################################
+# Definition of MARS web api database - this should always
+# be available in Metview, but is only usable if Metview is built
+# with curl support.
+# Note that we may need to keep an eye on this database definition
+# since this is a local copy of one that is installed centrally.
+##################################################################
+
+database,
+	class = apibase,
+	name  = ECMWF REST API/ECMWF Web API/Web API,
+	visit = false
+
+
+##############################################
+# Resources definition
+##############################################
+
+resources,
+	definition	  = '$METVIEW_DIR_SHARE/etc/ConfigDef',
+	rules		  = '$METVIEW_DIR_SHARE/etc/ConfigRules',
+	hidden		  = hidden,
+	metview		  = metview,
+	wastebasket	  = wastebasket,
+	user_defaults 	  = defaults,
+#	about             = about,
+#	macrolibrary      = macrolibrary,
+#	all_printers      = all_printers,
+	system_defaults   = '$METVIEW_DIR_SHARE/etc',
+	configuration     =  GENERAL_PREFERENCES,
+	preferences 	  = preferences,
+#	timer             = timer,
+	template          = templates,
+#	interface_tools   = mail/news/monitor/station/vis5d,
+	interface_tools   = mail/news/monitor,
+	template_path     = templates/system_templates/defaults,
+#	interface_items   = metview/wastebasket/defaults/preferences/
+#			    devices/about/macrolibrary/all_printers/timer/news/
+#			    coastlines/input window/pw for image/macros/hidden/general/
+#			    templates/system_templates/retrieve,
+	interface_items   = metview/wastebasket/defaults/preferences/
+			    devices/all_printers/
+			    coastlines/macros/hidden/general/
+			    templates/system_templates/retrieve,
+	colour_file 	  = '$METVIEW_DIR_SHARE/etc/MagicsColors.h',
+	help_file         = 'Metview_UI_Help',
+#	vismod_help_file  = 'Visualisation_Help',
+#	printer_list_file = '$METVIEW_DIR_SHARE/etc/PrinterList',
+	icon 		  = '$METVIEW_DIR_SHARE/icons/Metview.icon',
+	lock_icon 	  = '$METVIEW_DIR_SHARE/icons/lock_icon.icon',
+	bugs_report 	  = '$METVIEW_BIN/BugsReport',
+#	vismod_table      = '$TMPDIR/VisModTable' #VisMod
+	actions           = execute/visualise/edit/examine/save/analyse/duplicate/print/link/delete
+#	actions           = execute/visualise/edit/examine/save/duplicate/print/link/delete
+
+##################################################################
+# Interface item list
+##################################################################
+
+interface_item,
+    name              = metview,
+    full_name         = '/System',
+    class             = SYSTEM,
+    x                 = 30,
+    y                 = 10
+
+interface_item,
+    name              = wastebasket,
+    full_name         = '/Wastebasket',
+    class             = WASTEBASKET,
+    x                 = 550,
+    y                 = 450
+
+interface_item,
+    name              = defaults,
+    full_name         = '/System/Defaults',
+    class             = SYSTEM,
+    x                 = 30,
+    y                 = 10
+
+interface_item,
+    name              = temporary,
+    full_name         = '/System/$MV_TMPDIR_LINK',
+    class             = TEMPORARY,
+    x                 = 375,
+    y                 = 200
+
+interface_item,
+    name              = preferences,
+    full_name         = '/System/Preferences',
+    class             = SYSTEM,
+    x                 = 80,
+    y                 = 10
+
+interface_item,
+    name              = general,
+    full_name         = '/System/Preferences/General',
+    class             = GENERAL_PREFERENCES,
+    x                 = 0,
+    y                 = 0
+
+interface_item,
+    name              = templates,
+    full_name         = '/System/Templates',
+    class             = SYSTEM
+
+interface_item,
+    name              = system_templates,
+    full_name         = '/System/System Templates',
+    class             = SYSTEM,
+    linked_to         = '$METVIEW_LINK_DIR/Templates'
+
+interface_item,
+    name              = stationary,
+    full_name         = '/System/Drawers',
+    class             = SYSTEM
+
+interface_item,
+    name              = system_stationary,
+    full_name         = '/System/System Drawers',
+    class             = SYSTEM,
+    linked_to         = '$METVIEW_LINK_DIR/Drawers'
+
+#interface_item,
+#    name              = macrolibrary,
+#    full_name         = '/System/MacroLibrary',
+#    class             = SYSTEM,
+#    linked_to         = '$METVIEW_LINK_DIR/MacroLibrary',
+#    x                 = 160,
+#    y                 = 80
+
+interface_item,
+    name              = macros,
+    full_name         = '/System/Macros',
+    class             = SYSTEM,
+    x                 = 140,
+    y                 = 10
+
+#####################################
+# Widgets
+#####################################
+
+object,
+	class		= colour,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Colour widget,
+	macro 		= colour
+
+object,
+	class		= menu,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Menu widget,
+	macro 		= menu
+
+object,
+	class		= option_menu,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Option menu widget,
+	macro 		= option_menu
+
+object,
+	class		= any,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	default_name    = Input field widget,
+	editor_type	= SimpleEditor,
+	macro 		= any
+
+object,
+	class		= icon,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	default_name    = Icon widget,
+	editor_type	= SimpleEditor,
+	macro 		= icon
+
+object,
+	class		= slider,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Slider widget,
+	macro 		= slider
+object,
+	class		= on_off,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Toggle widget,
+	macro 		= toggle
+
+object,
+	class		= checkbox,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Checkbox widget,
+	macro 		= checkbox
+
+object,
+	class		= ui_integer,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Integer input widget,
+	macro 		= ui_integer
+
+object,
+	class		= ui_float,
+	definition_file = '$METVIEW_DIR_SHARE/etc/WidgetDef',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/WIDGET.icon',
+	editor_type	= SimpleEditor,
+	default_name    = Float input widget,
+	macro 		= ui_float
+
+######################################
+# General objects
+######################################
+
+object,
+	class		   = FOLDER,
+	icon_box	   = Basic,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/GenAppDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/GenAppRules',
+	default_object     = False,
+	default_name	   = Folder,
+	help_page	   = Folder,
+	type		   = Folder,
+	editor_type	   = SimpleEditor,
+	pixmap		   = '$METVIEW_DIR_SHARE/icons/FOLDER.icon',
+	doubleclick_method = Examine
+
+object,
+	class		   = WASTEBASKET,
+	default_object	   = False,
+#	definition_file	   = '$METVIEW_DIR_SHARE/etc/GenAppDef',
+#	rules_file	   = '$METVIEW_DIR_SHARE/etc/GenAppRules',
+	default_name	   = Wastebasket,
+	type		   = Folder,
+	editor_type	   = NoEditor,
+	pixmap		   = '$METVIEW_DIR_SHARE/icons/WASTEBASKET.icon',
+	doubleclick_method = Examine
+
+object,
+	class		   = SYSTEM,
+	default_object	   = False,
+#	definition_file	   = '$METVIEW_DIR_SHARE/etc/GenAppDef',
+#	rules_file	   = '$METVIEW_DIR_SHARE/etc/GenAppRules',
+	default_name	   = System Folder,
+	type		   = Folder,
+	editor_type	   = NoEditor,
+	pixmap		   = '$METVIEW_DIR_SHARE/icons/SYSTEM.icon',
+	doubleclick_method = Examine
+
+object,
+	class		   = TEMPORARY,
+	default_object	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/GenAppDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/GenAppRules',
+	default_name	   = Temporary,
+	type		   = Folder,
+	editor_type	   = NoEditor,
+	pixmap		   = '$METVIEW_DIR_SHARE/icons/SYSTEM.icon',
+	doubleclick_method = Examine
+
+object,
+	class		   = GENERAL_PREFERENCES,
+	default_object     = False,
+	can_be_created	   = False,
+	type		   = Preference,
+	default_name	   = General,
+	editor_type	   = SimpleEditor,
+	definition_file    = '$METVIEW_DIR_SHARE/etc/ConfigDef',
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/PREFERENCES.icon'
+
+object,
+	class		   = NOTE,
+	icon_box	   = Basic,
+	can_be_created     = True,
+	default_object     = False,
+	check              = False,
+	type               = File,
+	editor_type        = QtMacroEditor,
+	default_name       = Notes,
+	help_page	   = Notes,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/NOTE.icon'
+
+object,
+	class		   = MACRO,
+	icon_box	   = Macros,
+	check 		   = False,
+	default_object     = False,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MacroDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MacroRules',
+	default_name	   = Macro,
+	help_page	   = Macro,
+	type		   = Macro,
+	editor_type	   = QtMacroEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MACRO.icon'
+
+object,
+	class		   = SHELL,
+	icon_box	   = Basic,
+	default_object	   = False,
+	type		   = File,
+	check 		   = False,
+	can_be_created 	   = True,
+	default_name	   = Shell Script,
+	help_page	   = Shell_Script,
+	editor_type	   = QtMacroEditor,
+	pixmap		   = '$METVIEW_DIR_SHARE/icons/SHELL.icon'
+
+
+
+######################################
+# Mars / GRIB filter objects
+######################################
+
+object,
+	class		   = RETRIEVE,
+	type		   = Data,
+	can_be_created	   = '$TRUE_IF_MARS_AVAILABLE',
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsRules',
+	default_name	   = Mars Retrieval,
+	help_page	   = MARS_Retrieval,
+	macro		   = retrieve,
+	editor_type	   = RetrieveEditor,
+	expand 		   = 16, # EXPAND_SECOND_NAME     #144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/RETRIEVE.icon'
+
+object,
+	class		   = RETRIEVE_G2,
+	type		   = Data,
+	can_be_created	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsG2Def',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsG2Rules',
+	default_name	   = G2 Mars Retrieval,
+	help_page	   = G2_Mars_Retrieval,
+	macro		   = retrieve_g2,
+	editor_type	   = RetrieveEditor,
+	expand 		   = 144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/RETRIEVE_TIGGE.icon'
+
+object,
+	class		   = RETRIEVE_TIGGE,
+	type		   = Data,
+	can_be_created	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsTiggeDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsTiggeRules',
+	default_name	   = TIGGE Mars Retrieval,
+	help_page	   = TIGGE_Mars_Retrieval,
+	macro		   = retrieve_tigge,
+	editor_type	   = RetrieveEditor,
+	expand 		   = 144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/RETRIEVE_TIGGE.icon'
+
+object,
+	class		   = READ,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsRules',
+	default_name	   = GRIB Filter,
+	help_page	   = GRIB_Filter,
+	type		   = Data,
+	macro 		   = read,
+	editor_type	   = SimpleEditor,
+	expand 		   = 144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/READ.icon'
+
+object,
+	class		   = READ_G2,
+	can_be_created	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsG2Def',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsG2Rules',
+	default_name	   = G2 GRIB Filter,
+	help_page	   = G2_GRIB_Filter,
+	type		   = Data,
+	macro 		   = read_g2,
+	editor_type	   = SimpleEditor,
+	expand 		   = 144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/READ_TIGGE.icon'
+
+object,
+	class		   = READ_TIGGE,
+	can_be_created	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsTiggeDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsTiggeRules',
+	default_name	   = TIGGE GRIB Filter,
+	help_page	   = TIGGE_GRIB_Filter,
+	type		   = Data,
+	macro 		   = read_tigge,
+	editor_type	   = SimpleEditor,
+	expand 		   = 144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/READ_TIGGE.icon'
+
+
+
+######################################
+# Other
+######################################
+
+
+object,
+	class		   = BINARY,
+	can_be_created     = False,
+	default_object     = False,
+	check              = False,
+	type               = File,
+	default_name       = Binary,
+	editor_type	   = NoEditor,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/BINARY.icon',
+	doubleclick_method = Examine
+
+object,
+	class		   = SQL,
+	icon_box	   = Basic,
+	can_be_created     = True,
+	default_object     = False,
+	check              = False,
+	type               = File,
+	editor_type        = QtMacroEditor,
+	default_name       = SQL Query,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/SQL.icon'
+
+object,
+	class		   = NAMELIST,
+	icon_box	   = Basic,
+	can_be_created     = True,
+	default_object     = False,
+	check              = False,
+	type               = File,
+	editor_type        = QtMacroEditor,
+	default_name       = IFS Namelist,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/NAMELIST.icon'
+
+######################################
+# View objects
+######################################
+
+object,
+	class              = MAPVIEW,
+	can_be_created     = False,
+	icon_box           = Views,
+	definition_file    = '$METVIEW_DIR_SHARE/etc/MapViewDef',
+	rules_file         = '$METVIEW_DIR_SHARE/etc/MapViewRules',
+	default_name       = Map View,
+	help_page          = Map_View,
+	type               = View,
+	macro              = mapview,
+	editor_type        = SimpleEditor,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/MAPVIEW.icon',
+	expand             = 128, #expand, but not the default values
+	doubleclick_method = Edit
+
+object,
+	class              = GEOVIEW,
+	can_be_created     = True,
+	icon_box           = Views,
+	definition_file    = '$METVIEW_DIR_SHARE/etc/GeoViewDef',
+	rules_file         = '$METVIEW_DIR_SHARE/etc/GeoViewRules',
+	default_name       = Geographical View,
+	help_page          = Geo_View,
+	type               = View,
+	macro              = geoview,
+	editor_type        = SimpleEditor,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/GEOVIEW.icon',
+	expand             = 128, #expand, but not the default values
+	doubleclick_method = Edit
+
+object,
+    class               = CARTESIANVIEW,
+    can_be_created      = True,
+    icon_box            = Views,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/CartesianViewDef',
+    rules_file          = '$METVIEW_DIR_SHARE/etc/CartesianViewRules',
+    default_name        = Cartesian View,
+    help_page           = Cartesian_View,
+    type                = View,
+    macro               = cartesianview,
+    editor_type         = SimpleEditor,
+    pixmap              = '$METVIEW_DIR_SHARE/icons/CARTESIANVIEW.icon',
+    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+    doubleclick_method  = Edit
+
+object,
+    class               = MXSECTVIEW,
+    can_be_created      = True,
+    icon_box            = Views,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/MXSectViewDef',
+    rules_file          = '$METVIEW_DIR_SHARE/etc/MXSectViewRules',
+    default_name        = Cross Section View,
+    help_page           = Cross_Section_View,
+    type                = View,
+    macro               = mxsectview,
+    editor_type         = SimpleEditor,
+    pixmap              = '$METVIEW_DIR_SHARE/icons/MXSECTVIEW.icon',
+    expand              = 128, #expand, but not the default values
+    doubleclick_method  = Edit
+
+object,
+    class               = MVERTPROFVIEW,
+    can_be_created      = True,
+    icon_box            = Views,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/MVertProfViewDef',
+    rules_file          = '$METVIEW_DIR_SHARE/etc/MVertProfViewRules',
+    default_name        = Vertical Profile View,
+    help_page           = Vertical_Profile_View,
+    type                = View,
+    macro               = mvertprofview,
+    editor_type         = SimpleEditor,
+    pixmap              = '$METVIEW_DIR_SHARE/icons/MVPROFVIEW.icon',
+    expand              = 128, #expand, but not the default values
+    doubleclick_method  = Edit
+
+object,
+    class               = MAVERAGEVIEW,
+    can_be_created      = True,
+    icon_box            = Views,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/MAverageViewDef',
+    rules_file          = '$METVIEW_DIR_SHARE/etc/MAverageViewRules',
+    default_name        = Average View,
+    help_page           = Average_View,
+    type                = View,
+    macro               = maverageview,
+    editor_type         = SimpleEditor,
+    pixmap              = '$METVIEW_DIR_SHARE/icons/MAVERAGEVIEW.icon',
+    expand              = 128, #expand, but not the default values
+    doubleclick_method  = Edit
+
+######################################
+# Visual definition objects
+######################################
+
+object,
+	class		   = PCOAST,
+	icon_box	   = Visual definitions,
+	can_be_created 	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/CoastDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/CoastRules',
+	default_name	   = MV3 Coastlines,
+	help_page	   = Coastlines,
+	type		   = Visdef,
+	macro 		   = pcoast,
+	expand 		   = 128, # EXPAND_NO_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/PCOAST.icon'
+
+object,
+	class		   = MCOAST,
+	icon_box	   = Visual definitions,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MCOASTDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MCOASTRules',
+	default_name	   = Coastlines,
+	help_page	   = Coastlines,
+	type		   = Visdef,
+	macro 		   = mcoast,
+	expand 		   = 128, # EXPAND_NO_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MCOAST.icon'
+
+object,
+	class		   = PTEXT,
+	icon_box	   = Visual definitions,
+	can_be_created 	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/TextDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/TextRules',
+	default_name	   = MV3 Text Plotting,
+	help_page	   = Text_Plotting,
+	type		   = Visdef,
+	macro 		   = ptext,
+	expand 		   = 128, # EXPAND_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/PTEXT.icon'
+
+object,
+	class		   = MTEXT,
+	icon_box	   = Visual definitions,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MTEXTDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MTEXTRules',
+	default_name	   = Text Plotting,
+	help_page	   = Text_Plotting,
+	type		   = Visdef,
+	macro 		   = mtext,
+	expand 		   = 128, # EXPAND_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MTEXT.icon'
+
+object,
+	class		   = MLEGEND,
+	icon_box	   = Visual definitions,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MLEGENDDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MLEGENDRules',
+	default_name	   = Legend,
+	help_page	   = Legend,
+	type		   = Visdef,
+	macro 		   = mlegend,
+	expand 		   = 128, # EXPAND_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MLEGEND.icon'
+
+
+object,
+     class               = PAXIS,
+     icon_box            = Visual definitions,
+     can_be_created      = False,
+     definition_file     = '$METVIEW_DIR_SHARE/etc/AxisDef',
+     rules_file          = '$METVIEW_DIR_SHARE/etc/AxisRules',
+     default_name        = Axis Plot,
+     help_page           = Axis,
+     type                = Visdef,
+     macro               = paxis,
+     expand              = 128, # EXPAND_NO_DEFAULT
+     editor_type         = SimpleEditor,
+     pixmap              = '$METVIEW_DIR_SHARE/icons/PAXIS.icon'
+
+object,
+     class               = MAXIS,
+     icon_box            = Visual definitions,
+     can_be_created      = True,
+     definition_file     = '$METVIEW_DIR_SHARE/etc/MAXISDef',
+     rules_file          = '$METVIEW_DIR_SHARE/etc/MAXISRules',
+     default_name        = Axis Plotting,
+     help_page           = Axis,
+     type                = Visdef,
+     macro               = maxis,
+     expand              = 128, # EXPAND_NO_DEFAULT
+     editor_type         = SimpleEditor,
+     pixmap              = '$METVIEW_DIR_SHARE/icons/MAXIS.icon'
+
+object,
+	class		   = PCONT,
+	icon_box	   = Visual definitions,
+	can_be_created	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/ContDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/ContRules',
+	default_name	   = MV3 Contour,
+	help_page	   = Contour,
+	type		   = Visdef,
+	macro 		   = pcont,
+	expand 		   = 128, # EXPAND_NO_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/PCONT.icon'
+
+object,
+	class		   = MCONT,
+	icon_box	   = Visual definitions,
+	can_be_created	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MCONTDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MCONTRules',
+	default_name	   = Contouring,
+	help_page	   = Contouring,
+	type		   = Visdef,
+	macro 		   = mcont,
+	expand 		   = 128, # EXPAND_NO_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MCONT.icon'
+
+object,
+	class		   = POBS,
+	icon_box	   = Visual definitions,
+	can_be_created     = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/ObsDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/ObsRules',
+	default_name	   = Observation Plot,
+	help_page	   = Observation_Plot,
+	type		   = Visdef,
+	macro 		   = pobs,
+	expand 		   = 144, # EXPAND_NO_DEFAULT, EXPAND_2ND_NAME
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/POBS.icon'
+
+object,
+	class		   = PWIND,
+	icon_box	   = Visual definitions,
+	can_be_created	   = False,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/WindDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/WindRules',
+	default_name	   = MV3 Wind Plot,
+	help_page	   = Wind_Plot,
+	type		   = Visdef,
+	macro 		   = pwind,
+	expand 		   = 128, # EXPAND_NO_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/PWIND.icon'
+
+object,
+	class		   = MWIND,
+	icon_box	   = Visual definitions,
+	can_be_created	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MWINDDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MWINDRules',
+	default_name	   = Wind Plotting,
+	help_page	   = Wind_Plot,
+	type		   = Visdef,
+	macro 		   = mwind,
+	expand 		   = 128, # EXPAND_NO_DEFAULT
+	editor_type	   = SimpleEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MWIND.icon'
+
+object,
+     class             = PGRAPH,
+     icon_box          = Visual definitions,
+     can_be_created    = False,
+     definition_file   = '$METVIEW_DIR_SHARE/etc/GraphDef',
+     rules_file        = '$METVIEW_DIR_SHARE/etc/GraphRules',
+     default_name      = Graph Plot,
+     help_page         = Graph,
+     type              = Visdef,
+     macro             = pgraph,
+     expand            = 128, # EXPAND_NO_DEFAULT
+     editor_type       = SimpleEditor,
+     pixmap            = '$METVIEW_DIR_SHARE/icons/PGRAPH.icon'
+
+object,
+     class             = MGRAPH,
+     icon_box          = Visual definitions,
+     can_be_created    = True,
+     definition_file   = '$METVIEW_DIR_SHARE/etc/MGRAPHDef',
+     rules_file        = '$METVIEW_DIR_SHARE/etc/MGRAPHRules',
+     default_name      = Graph Plotting,
+     help_page         = Graph_Plotting,
+     type              = Visdef,
+     macro             = mgraph,
+     expand            = 128, # EXPAND_NO_DEFAULT
+     editor_type       = SimpleEditor,
+     pixmap            = '$METVIEW_DIR_SHARE/icons/MGRAPH.icon'
+
+object,
+     class             = PSYMB,
+     icon_box          = Visual definitions,
+     type              = Visdef,
+     can_be_created    = False,
+     definition_file   = '$METVIEW_DIR_SHARE/etc/SymbDef',
+     rules_file        = '$METVIEW_DIR_SHARE/etc/SymbRules',
+     default_name      = MV3 Symbol Plot,
+     help_page         = Symbol,
+     macro             = psymb,
+     expand            = 128, # EXPAND_NO_DEFAULT
+     editor_type       = SimpleEditor,
+     pixmap            = '$METVIEW_DIR_SHARE/icons/PSYMB.icon'
+
+object,
+     class             = MSYMB,
+     icon_box          = Visual definitions,
+     type              = Visdef,
+     can_be_created    = True,
+     definition_file   = '$METVIEW_DIR_SHARE/etc/MSYMBDef',
+     rules_file        = '$METVIEW_DIR_SHARE/etc/MSYMBRules',
+     default_name      = Symbol Plotting,
+     help_page         = Symbol_Plotting,
+     macro             = msymb,
+     expand            = 128, # EXPAND_NO_DEFAULT
+     editor_type       = SimpleEditor,
+     pixmap            = '$METVIEW_DIR_SHARE/icons/MSYMB.icon'
+
+####################################################################
+# Filter objects
+####################################################################
+
+object,
+	class			= MBINNING,
+	icon_box			= Filters,
+	can_be_created		= True,
+	definition_file	= '$METVIEW_DIR_SHARE/etc/BinningObjectDef',
+	rules_file		= '$METVIEW_DIR_SHARE/etc/BinningObjectRules',
+	default_name		= Binning,
+	help_page			= Binning,
+	type				= Preference,
+	macro			= binning,
+	expand			= 128, # EXPAND_NO_DEFAULT
+	editor_type		= SimpleEditor,
+	pixmap			= '$METVIEW_DIR_SHARE/icons/BINNING.icon'
+
+####################################################################
+# Data objects
+####################################################################
+
+object,
+	class		   = GRIB,
+	check       	   = False,
+	default_object     = False,
+	type        	   = File,
+	pixmap      	   = '$METVIEW_DIR_SHARE/icons/GRIB.icon',
+	default_name       = GRIB File,
+	editor_type 	   = NoEditor
+
+object,
+ 	class			= GEOPOINTS,
+ 	check			= False,
+ 	type				= File,
+ 	editor_type		= QtMacroEditor,
+ 	pixmap			= '$METVIEW_DIR_SHARE/icons/GEOPOINTS.icon'
+
+object,
+	class		   = BUFR,
+	check              = False,
+	default_object     = False,
+	type		   = File,
+	default_name       = BUFR File,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/BUFR.icon',
+	editor_type        = NoEditor
+
+object,
+	class		   = NETCDF,
+	check       	   = False,
+	default_object     = False,
+	type        	   = File,
+	pixmap      	   = '$METVIEW_DIR_SHARE/icons/NETCDF.icon',
+	default_name       = NetCDF File,
+	editor_type 	   = NoEditor
+
+object,
+ 	class		   = LLMATRIX,
+ 	check 		   = False,
+ 	type		   = File,
+	macro		   = togrib,
+ 	editor_type	   = TextEditor,
+ 	pixmap 		   = '$METVIEW_DIR_SHARE/icons/LLMATRIX.icon'
+
+
+object,
+ 	class		   = TABLE,
+ 	check 		   = False,
+ 	type		   = File,
+ 	can_be_created = True,
+	default_name   = Table,
+	macro		   = table,
+ 	editor_type	   = QtMacroEditor,
+ 	pixmap 		   = '$METVIEW_DIR_SHARE/icons/TABLE.icon'
+
+
+object,
+ 	class		   = TABLE_READER,
+ 	check 		   = False,
+ 	type		   = Data,
+ 	can_be_created = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/TableReaderDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/TableReaderRules',
+	default_name   = Table Reader,
+#	macro		   = rrread_table,
+ 	editor_type	   = SimpleEditor,
+ 	pixmap 		   = '$METVIEW_DIR_SHARE/icons/TABLEREADER.icon'
+
+
+object,
+	class		= ODB_DB,
+	check           = False,
+	default_object  = False,
+	type		= File,
+	default_name    = 'ODB File',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/ODB_DB.icon',
+	editor_type     = NoEditor
+
+
+##INSTIP:
+## You may set 'can_be_created' to 'False'.
+## Ecfs is not accessible outside ECMWF!
+#
+object,
+	class		   = ECFS,
+	type               = Data,
+	icon_box           = Data access,
+	can_be_created	   = '$TRUE_IF_ECMWF',
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/EcfsDef',
+	default_name       = Ecfs,
+	help_page          = ECFS_ECMWF_only,
+	macro              = ecfs,
+	editor_type        = SimpleEditor,
+	expand             = 75,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/ECFS.icon'
+
+#########################################################
+# Modules
+#########################################################
+
+object,
+	class 		   = MACROPARAM,
+	icon_box	   = Macros,
+	default_object     = False,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MacroParamDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MacroParamRules',
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/MACROPARAM.icon',
+	default_name	   = Macro Parameters,
+	help_page	   = Macro_Parameters,
+	want_definition    = MACRO,
+	type		   = Data,
+	check 		   = False,
+	editor_type	   = TwoLevelsEditor,
+	expand 		   = 0 # EXPAND_NO_DEFAULT
+
+object,
+	class		   = COMPUTE,
+	icon_box	   = Macros,
+	can_be_created 	   = True,
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsRules',
+	default_name	   = Formula,
+	help_page	   = Formula,
+	macro 		   = compute,
+	type		   = Data,
+	editor_type	   = ComputeEditor,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/COMPUTE.icon'
+
+object,
+	class		   = CLEANFILE,
+	icon_box           = To be organised,
+	can_be_created     = True,
+	definition_file    = '$METVIEW_DIR_SHARE/etc/CleanFileDef',
+	default_name       = Clean File,
+	type               = Data,
+	macro              = cleanfile,
+	editor_type        = SimpleEditor,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/CLEANFILE.icon'
+
+object,
+	class               = GEO_TO_GRIB,
+	icon_box            = Filters,
+	can_be_created 	    = True,
+	check               = True,
+	type                = Data,
+	macro		    = geo_to_grib,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/GEO_TO_GRIB.icon',
+	editor_type         = SimpleEditor,
+	definition_file	    = '$METVIEW_DIR_SHARE/etc/GeoToGribDef',
+	default_object      = False,
+	help_page           = Geopoints_To_GRIB,
+	default_name	    = Geopoints to GRIB
+
+object,
+	class               = GRIB_TO_GEO,
+	icon_box            = Filters,
+	can_be_created 	    = True,
+	check               = True,
+	type                = Data,
+	macro		    = grib_to_geo,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/GRIB_TO_GEO.icon',
+	editor_type         = SimpleEditor,
+	definition_file	    = '$METVIEW_DIR_SHARE/etc/GribToGeoDef',
+	default_object      = False,
+	help_page           = GRIB_To_Geopoints,
+	default_name	    = GRIB to Geopoints
+
+object,
+	class		    = OBSFILTER,
+	can_be_created	    = True,
+	icon_box	    = Filters/Observations,
+	definition_file	    = '$METVIEW_DIR_SHARE/etc/ObsFilterDef',
+	rules_file	    = '$METVIEW_DIR_SHARE/etc/ObsFilterRules',
+	default_name	    = Observation Filter,
+	help_page	    = Observation_Filter,
+	type		    = Data,
+	expand		    = 91, # EXPAND_DATE|EXPAND_TIME|expand_2nd_name|EXPAND_LISTS|EXPAND_LAST_NAME
+	macro 		    = obsfilter,
+	editor_type	    = SimpleEditor,
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/OBSFILTER.icon'
+
+object,
+	class               = POTT_FAMILY,
+	icon_box            = To be organised,
+	type                = Family,
+	can_be_created      = True,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/PottFRules',
+	default_name        = Potential Temperature,
+	help_page           = Potential_Temperature,
+	editor_type         = FamilyEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+	class               = POTT_M,
+	type                = Data,
+	can_be_created      = False,
+	default_name        = 'Potential Temperature (Model levels)',
+	default_object      = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	macro               = pott_m,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+	class               = POTT_P,
+	type                = Data,
+	can_be_created      = False,
+	default_name        = 'Potential Temperature (Pressure levels)',
+	default_object      = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	macro               = pott_p,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+	class               = EQPOTT_M,
+	type                = Data,
+	can_be_created      = False,
+	default_object      = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	default_name        = 'Equivalent Potential Temperature (Model levels)',
+	macro               = eqpott_m,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+	class               = EQPOTT_P,
+	type                = Data,
+	can_be_created      = False,
+	default_object      = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	default_name        = 'Equivalent Potential Temperature (Pressure levels)',
+	macro               = eqpott_p,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+	class               = SEQPOTT_P,
+	type                = Data,
+	can_be_created      = False,
+	default_object      = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	default_name        = 'Saturated Equivalent Potential Temperature (Pressure levels)',
+	macro               = seqpott_p,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+	class               = SEQPOTT_M,
+	type                = Data,
+	can_be_created      = False,
+	default_object      = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PottFDef',
+	default_name        = 'Saturated Equivalent Potential Temperature (Model levels)',
+	macro               = seqpott_m,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/POTTF.icon'
+
+object,
+    class            = DIVROT_FAMILY,
+    icon_box         = To be organised,
+    type             = Family,
+    can_be_created   = True,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/DivrotDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/DivrotRules',
+    default_name     = Rotational or Divergent Wind,
+    help_page        = Rotational_or_Divergent_Wind,
+    editor_type      = FamilyEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/DIVROT.icon'
+object,
+    class            = ROTWIND,
+    type             = Data,
+    can_be_created   = False,
+    default_name     = Rotational Wind,
+    default_object   = False,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/DivrotDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/DivrotRules',
+    macro            = divrot,
+    editor_type      = SimpleEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/DIVROT.icon'
+object,
+    class            = DIVWIND,
+    type             = Data,
+    can_be_created   = False,
+    default_name     = Divergent Wind,
+    default_object   = False,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/DivrotDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/DivrotRules',
+    macro            = divwind,
+    editor_type      = SimpleEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/DIVROT.icon'
+object,
+    class            = UVWIND,
+    type             = Data,
+    can_be_created   = False,
+    default_name     = UV Wind,
+    default_object   = False,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/DivrotDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/DivrotRules',
+    macro            = uvwind,
+    editor_type      = SimpleEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/DIVROT.icon'
+
+state,
+    class            = DIVROT_FAMILY/ROTWIND/DIVWIND/UVWIND,
+    output_class     = GRIB,
+    service          = Divrot
+
+
+object,
+    class            = VELSTR_FAMILY,
+    type             = Family,
+    icon_box         = To be organised,
+    can_be_created   = True,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/VelstrDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/VelstrRules',
+    default_name     = Velocity Potential or Stream Function,
+    help_page        = VelocityPotential_StreamFunction,
+    editor_type      = FamilyEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/VELSTR.icon'
+object,
+    class            = VELPOT,
+    type             = Data,
+    can_be_created   = False,
+    default_name     = Velocity Potential,
+    default_object   = False,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/VelstrDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/VelstrRules',
+    macro            = velpot,
+    editor_type      = SimpleEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/VELSTR.icon'
+object,
+    class            = STREAMFN,
+    type             = Data,
+    can_be_created   = False,
+    default_name     = Stream Function,
+    default_object   = False,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/VelstrDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/VelstrRules',
+    macro            = streamfn,
+    editor_type      = SimpleEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/VELSTR.icon'
+
+state,
+    class            = VELSTR_FAMILY/VELPOT/STREAMFN,
+    output_class     = GRIB,
+    service          = Velstr
+
+
+
+object,
+	class               = SIMPLE_FORMULA_FAMILY,
+	icon_box	    = Macros,
+	can_be_created      = True,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/SimpleFormulaRules',
+	default_name        = Simple Formula,
+	help_page	    = Simple_Formula,
+	type                = Family,
+	editor_type         = FamilyEditor,
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon'
+
+object,
+	can_be_created	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	type 		    = data,
+	default_object	    = False,
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	class		    = SAMPLE_FORMULA_DOD
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	type		    = data,
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	class		    = SAMPLE_FORMULA_DON
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_NOD
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_NON
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_FD
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_FN
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_FDD
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_FDN
+object,
+	can_be_created	    = False,
+	default_object	    = False,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_FND
+object,
+	default_object	    = False,
+	can_be_created	    = False,
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/SIMPLE_FORMULA.icon',
+	definition_file     = '$METVIEW_DIR_SHARE/etc/SimpleFormulaDef',
+	type		    = data,
+	class		    = SAMPLE_FORMULA_FNN
+
+##INSTIP:
+ Datacoverage is not normally accessible outside ECMWF!
+
+object,
+	class		    = DATACOVERAGE,
+	icon_box	    = To be organised,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/DatacoverageDef',
+	rules_file	    = '$METVIEW_DIR_SHARE/etc/DatacoverageRules',
+	can_be_created 	    = '$TRUE_IF_ECMWF',
+	check 		    = True,
+	default_name	    = Datacoverage,
+	help_page	    = Data_Coverage_ECMWF_only,
+	expand		    = 11,  #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+	type		    = Data,
+	macro 		    = datacoverage,
+	editor_type	    = SimpleEditor,
+	pixmap 		    = '$METVIEW_DIR_SHARE/icons/DATACOVERAGE.icon'
+
+#state,
+#	class       = DATACOVERAGE,
+#	action      = examine
+#
+#service,
+#	name=Datacov_data,
+#	cmd='$metview_command $METVIEW_BIN/Datacov_data'
+#
+#object,
+#    class		= DATACOV_DATA,
+#    can_be_created 	= False,
+#    default_name	= Datacov_data,
+#    expand		= 19, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    type		= Data,
+#    macro 		= datacov_data
+#
+#state,
+#        class        = DATACOV_DATA,
+#	output_class = BUFR,
+#        service      = Datacov_data
+#
+####################################################################
+
+object,
+	class 		   = STATIONS,
+	icon_box	   = To be organised,
+	type 		   = Data,
+	can_be_created 	   = True,
+	default_name	   = Stations,
+	help_page	   = Station,
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/STATIONS.icon',
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/StationDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/StationRules',
+	editor_type	   = SimpleEditor,
+	expand  	   = 75,
+	macro 		   = stations
+
+######################################################################
+# Output/Input file types
+######################################################################
+
+object,
+	class              = TAR,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/TAR.icon',
+	default_name       = Tar File,
+	editor_type        = NoEditor
+
+object,
+	class              = TAR_GZ,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/TAR.icon',
+	default_name       = TarGz File,
+	editor_type        = NoEditor
+
+object,
+	class              = TAR_BZ2,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/TAR.icon',
+	default_name       = TarBz2 File,
+	editor_type        = NoEditor
+
+object,
+	class              = ZIP,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/TAR.icon',
+	default_name       = Zip File,
+	editor_type        = NoEditor
+
+####################################################################
+#
+######################################################################
+# uPlot objects
+######################################################################
+object,
+	class               = PLOT_SUPERPAGE,
+	can_be_created      = True,
+	icon_box            = PlotMod,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PlotSuperPageDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/PlotSuperPageRules',
+	default_name        = Display Window,
+	type                = Window,
+	macro               = plot_superpage,
+	editor_type         = ViewEditor,
+	help_page           = The_Display_Window_Icon_Editor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/SUPERPAGE.icon',
+	expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	doubleclick_method  = Edit
+
+object,
+	class               = PLOT_PAGE,
+	can_be_created      = False,
+	icon_box            = PlotMod,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PlotPageDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/PlotPageRules',
+	default_name        = Page,
+	type                = Window,
+	macro               = plot_page,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/PLOTPAGE.icon',
+	expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	doubleclick_method  = Edit
+
+object,
+	class               = PLOT_SUBPAGE,
+	can_be_created      = False,
+	icon_box            = PlotMod,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/PlotSubPageDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/PlotSubPageRules',
+	default_name        = Subpage,
+	type                = Window,
+	macro               = plot_subpage,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/PLOTSUBPAGE.icon',
+	expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	doubleclick_method  = Edit
+
+object,
+	class               = DRAWING_PRIORITY,
+	can_be_created      = False,
+	icon_box            = PlotMod,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/DrawingPriorityDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/DrawingPriorityRules',
+	default_name        = Drawing Priority,
+	help_page           = Drawing_Priority,
+	type                = Visdef,
+	macro               = drawing_priority,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/DRAWING_PRIORITY.icon',
+	expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	doubleclick_method  = Edit
+
+object,
+	class               = OVERLAY_CONTROL,
+	can_be_created      = False,
+	icon_box            = PlotMod,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/OverlayControlDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/OverlayControlRules',
+	default_name        = Overlay Control,
+	help_page           = Overlay_Control,
+	type                = Visdef,
+	macro               = overlay_control,
+	editor_type         = SimpleEditor,
+	pixmap              = '$METVIEW_DIR_SHARE/icons/OVERLAY_CONTROL.icon',
+	expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	doubleclick_method  = Edit
+
+object,
+	class		= PVOID,
+	can_be_created 	= False,
+	definition_file	= '$METVIEW_DIR_SHARE/etc/VoidDef',
+	default_name	= PVoid,
+	expand 		= 79 # EXPAND_NO_DEFAULT
+
+##################################################################
+# State list
+##################################################################
+state,
+	action	     = edit/duplicate/delete,
+	service	     = MetviewUI
+
+state,
+	class	     = GEOVIEW/MAPVIEW/CARTESIANVIEW/MXSECTVIEW/MVERTPROFVIEW/MAVERAGEVIEW,
+	action	     = execute/visualise,
+	service	     = uPlotManager
+
+#state,
+#	class	     = GRIB,
+#	action	     = analyse,
+#	service	     = DataToolManager
+
+state,
+	class	     = GRIB,
+	action	     = examine,
+	service	     = GribExaminer
+
+state,
+	class	     = GRIB/GEOPOINTS/BUFR,
+	action	     = visualise/hardcopy,
+	service	     = uPlotManager
+
+state,
+	class	     = GRIB/GEOPOINTS/BUFR/ODB_DB,
+#/IMAGE/VIS5D_FILE/,
+	action	     = save,
+	service	     = savepool
+
+state,
+	class		= GEOPOINTS,
+	action		= examine,
+	service		= GeopExaminer
+
+state,
+	class		= BUFR,
+	action		= examine,
+	service		= BufrExaminer
+
+state,
+	class		= NETCDF,
+	action		= examine,
+	service		= NcExaminer
+
+state,
+	class        = LLMATRIX,
+	output_class = GRIB,
+	service      = togrib
+
+
+# IS THIS NEEDED?????????????????????????
+#state,
+#	class   = MACRO/WMACRO,
+#	action	= prepare_definition
+
+state,
+	class        = MACRO/MACROPARAM,
+	output_class = '*'/GRIB/BUFR/GEOPOINTS/NETCDF,
+	service      = macro
+
+state,
+	class        = MACROPARAM,
+	action	     = edit/check,
+	service      = macro
+
+
+
+
+# NOTE: the SHELL command is duplicated in the Macro Editor source code,
+# therefore if we change it here, we should also change it there.
+
+state,
+	class	     = SHELL,
+	action	     = execute,
+	service	     = '(x=\`dirname "%s"\`;cd \"\$x\" ; sh \"%s\")'
+
+state,
+	class	     = BINARY,
+	action	     = examine,
+	service	     = '(xterm -e $METVIEW_BIN/dump \"%s\")'
+
+state,
+	class	     = RETRIEVE,
+	output_class = GRIB/BUFR/ODB_DB,
+	service	     = mars
+
+# for backwards compatibility
+state,
+	class	     = RETRIEVE_G2,
+	output_class = GRIB/BUFR,
+	service	     = Mars_G2
+
+state,
+	class	     = RETRIEVE_TIGGE,
+	output_class = GRIB/BUFR,
+	service	     = Mars_TIGGE
+
+state,
+	class        = READ,
+	output_class = GRIB/BUFR/GEOPOINTS,
+	service      = mars
+
+# for backwards compatibility
+state,
+	class        = READ_G2,
+	output_class = GRIB/BUFR/GEOPOINTS,
+	service      = Mars_G2
+
+state,
+	class        = READ_TIGGE,
+	output_class = GRIB/BUFR/GEOPOINTS,
+	service      = Mars_TIGGE
+
+state,
+	class        = ECFS,
+	service      = Ecfs,
+	output_class = GRIB/BUFR/IMAGE/PSFILE
+
+state,
+	class	     = CLEANFILE,
+	output_class = GRIB/BUFR,
+	service	     = CleanFile
+
+state,
+	class        = GEO_TO_GRIB,
+	output_class = GRIB,
+	service      = geo_to_grib
+
+state,
+	class        = GRIB_TO_GEO,
+	output_class = GEOPOINTS,
+	service      = grib_to_geo
+
+state,
+	class        = OBSFILTER,
+	output_class = BUFR/GEOPOINTS/TABLE,
+	service      = ObsFilter
+
+state,
+	class        = POTT_FAMILY/POTT_M/POTT_P/EQPOTT_M/EQPOTT_P/SEQPOTT_M/SEQPOTT_P,
+	output_class = GRIB,
+	service      = PottF
+
+state,
+	class	     = COMPUTE,
+	output_class = GRIB/BUFR/NUMBER/GEOPOINTS,
+	service	     = macro
+
+state,
+	class	     = SIMPLE_FORMULA_FAMILY/ # This should not be
+		       SAMPLE_FORMULA_DOD/
+		       SAMPLE_FORMULA_DON/
+		       SAMPLE_FORMULA_NOD/
+		       SAMPLE_FORMULA_NON/
+		       SAMPLE_FORMULA_FD/
+		       SAMPLE_FORMULA_FN/
+		       SAMPLE_FORMULA_FDD/
+		       SAMPLE_FORMULA_FDN/
+		       SAMPLE_FORMULA_FND/
+		       SAMPLE_FORMULA_FNN,
+	output_class = GRIB/GEOPOINTS,
+	service      = macro
+
+state,
+	class        = DATACOVERAGE,
+	output_class = BUFR,
+	service      = Datacoverage
+
+state,
+	class        = TAR,
+	action	     = execute,
+	service      = '(x=\`dirname "%s"\`;cd \"\$x\" ; tar -xvf \"%s\")'
+
+state,
+	class        = TAR,
+	action	     = examine,
+	service      = '(y=$TMPDIR/\`basename "%s"\`.tar_contents;tar -tvf \"%s\" > \"\$y\";$METVIEW_EDITOR \"\$y\")'
+
+state,
+	class        = TAR_GZ,
+	action	     = execute,
+	service      = '(x=\`dirname "%s"\`;cd \"\$x\" ; tar -xzvf \"%s\")'
+
+state,
+	class        = TAR_GZ,
+	action	     = examine,
+	service      = '(y=$TMPDIR/\`basename "%s"\`.tar_contents;tar -tzvf \"%s\" > \"\$y\";$METVIEW_EDITOR \"\$y\")'
+
+state,
+	class        = TAR_BZ2,
+	action	     = execute,
+	service      = '(x=\`dirname "%s"\`;cd \"\$x\" ; tar -xjvf \"%s\")'
+
+state,
+	class        = TAR_BZ2,
+	action	     = examine,
+	service      = '(y=$TMPDIR/\`basename "%s"\`.tar_contents;tar -tjvf \"%s\" > \"\$y\";$METVIEW_EDITOR \"\$y\")'
+
+state,
+	class        = ZIP,
+	action	     = execute,
+	service      = '(x=\`dirname "%s"\`;cd \"\$x\" ; unzip \"%s\")'
+
+state,
+	class        = ZIP,
+	action	     = examine,
+	service      = '(y=$TMPDIR/\`basename "%s"\`.zip_contents;unzip -l \"%s\" > \"\$y\";$METVIEW_EDITOR \"\$y\")'
+
+state,
+	class	     = STATIONS,
+	output_class = STATION,
+	service      = station
+
+state,
+	class = PRINTER_MANAGER,
+	action = visualise/execute,
+	service = uPlotBatch
+
+state,
+	class		= PLOT_SUPERPAGE,
+	action		= execute/visualise,
+	service		= uPlotManager
+#
+#state,
+#    class    = PLOT_SUPERPAGE,
+#    action   = prepare, # Don't forget prepare for macro
+#    context  = macro,
+#    service  = VisModTrans
+###F    service  = PlotMod
+
+###########################################################################
+# Interface_tool list
+#
+#INSTIP:
+# line 'interface_tools' defines the submenu to be found on User Interface
+# menu 'Tools'. If you need 'Remote Folders' then please swap comments
+# in the two 'interface_tools' lines provided.
+############################################################################
+
+interface_tool,
+	name		   = monitor,
+	label		   = Process Monitor...,
+	service		   = mvmon,
+	action		   = MONITOR
+
+interface_tool,
+	name		   = mail,
+	label		   = E-mail Icons...,
+	service		   = mvmail,
+	action		   = MAIL
+
+interface_tool,
+	name		   = news,
+	label		   = Icon Inbox...,
+	service		   = mvnews,
+	action		   = NEWS
+
+#interface_tool,
+#	name		   = station,
+#	label		   = Stations...,
+#	service		   = stbase,
+#	action		   = STATION
+
+##########################################################################
+##########################################################################
+##########################################################################
+
+#interface_item,
+#    name              = coastlines,
+#    full_name         = '/Metview/Defaults/Coastlines',
+#    class             = PCOAST,
+#    copy_of           = '$METVIEW_DIR_SHARE/etc/Coastlines',
+#    x                 = 0,
+#    y                 = 0
+
+#interface_item,
+#    name              = retrieve,
+#    full_name         = '/Metview/Defaults/Mars Retrieval',
+#    class             = RETRIEVE,
+#    copy_of           = '$METVIEW_DIR_SHARE/etc/Mars_Retrieval',
+#    x                 = 0,
+#    y                 = 0
+
+#interface_item,
+#    name              = hidden,
+#    full_name         = '/Metview/Assist Objects',
+#    class             = SYSTEM,
+#    x                 = 30,
+#    y                 = 10
+
+#interface_item,
+#    name              = all_printers,
+#    full_name         = '/Metview/PrinterDevices',
+#    class             = SYSTEM,
+#    linked_to         = '$METVIEW_LINK_DIR/PrinterDevices',
+#    x                 = 160,
+#    y                 = 80
+
+#interface_item,
+#    name              = devices,
+#    full_name         = '/Metview/Devices',
+#    class             = SYSTEM,
+#    x                 = 100,
+#    y                 = 10
+
+#interface_item,
+#    name              = timer,
+#    full_name         = '/Metview/Timers',
+#    class             = SYSTEM,
+#    x                 = 120,
+#    y                 = 80
+#
+#interface_item,
+#    name              = about,
+#    full_name         = '/Metview/About',
+#    class             = SYSTEM,
+#    linked_to         = '$METVIEW_LINK_DIR/About',
+#    x                 = 120,
+#    y                 = 10
+#
+#interface_item,
+#	name              = news,
+#	full_name         = '/What\'s new',
+#	class             = NEWS,
+#	x                 = 30,
+#	y                 = 50
+#
+#interface_item,
+#   name              = input window,
+#    full_name         = '/Metview/Defaults/Input Window',
+#    class             = INPUTWINDOW,
+#    copy_of           = '$METVIEW_DIR_SHARE/etc/Input_Window',
+#    x                 = 0,
+#    y                 = 0
+#
+#interface_item,
+#    name              = pw for image,
+#    full_name         = '/Metview/Defaults/Plot Window for Image',
+#    class             = PLOTWINDOW,
+#    copy_of           = '$METVIEW_DIR_SHARE/etc/Plot_Window_for_Image',
+#    x                 = 0,
+#    y                 = 0
+#
+#visual_resources,
+#	class	= uPlot,
+#	path	= '$METVIEW_DIR_SHARE/etc/uPlotTable'
+#
+
+######################################
+## Local objects
+######################################
+#
+#object,
+# 	class			= IMAGE,
+# 	check 			= False,
+# 	type			= File,
+# 	pixmap 			= '$METVIEW_DIR_SHARE/icons/IMAGE.icon',
+# 	editor_type		= NoEditor
+######################################
+## General general
+#####################################
+#
+#object,
+#	class		   = NEWS,
+#	type		   = File,
+#	default_object	   = False,
+#	default_name	   = News,
+#	pixmap		   = '$METVIEW_DIR_SHARE/icons/NEWS.icon',
+#	editor_type	   = NoEditor,
+#	doubleclick_method = Execute
+#
+#state,
+#	class		   = NEWS,
+#	action		   = execute,
+#	service		   = mvnews
+#
+#object,
+#	class		= BAD,
+#	can_be_created  = False,
+#	default_object  = False,
+#	check           = False,
+#	type            = File,
+#	default_name    = Bad,
+#	editor_type	= NoEditor,
+#	pixmap          = '$METVIEW_DIR_SHARE/icons/BAD.icon',
+#	doubleclick_method = Examine
+#
+#object,
+#	class		= SPECIAL,
+#	can_be_created  = False,
+#	default_object  = False,
+#	check           = False,
+#	type            = File,
+#	default_name    = Bad,
+#	editor_type	= NoEditor,
+#	pixmap          = '$METVIEW_DIR_SHARE/icons/SPECIAL.icon',
+#	doubleclick_method = Examine
+#
+#object,
+#	class		= LINK,
+#	type		= Link,
+#	default_object  = False,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/GenAppDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/GenAppDef',
+#	default_name	= Link,
+#	editor_type	= TmpLinkEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/LINK.icon'
+#
+#
+#####################
+## Window group
+#####################
+#
+#object,
+#	class			= DEVICE,
+#	can_be_created    	= False,
+#	definition_file   	= '$METVIEW_DIR_SHARE/etc/DeviceDef',
+#	rules_file        	= '$METVIEW_DIR_SHARE/etc/DeviceRules',
+#	pixmap            	= '$METVIEW_DIR_SHARE/icons/DEVICE.icon',
+#	macro             	= device,
+#	type              	= Window,
+#	default_name      	= Output Device,
+#	editor_type       	= SimpleEditor,
+#	expand            	= 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#	graphical_editor  	= NoEditor,
+#	delete			= True,
+#	output_type 	  	= paper,
+#	default_of_data   	= PSFILE
+#
+#### VisMod class that stores the print menu
+#object,
+#	class		= PRINT_MENU,
+#	can_be_created	= False,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/PrintMenuDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/PrintMenuRules',
+#	pixmap		= '$METVIEW_DIR_SHARE/icons/DEVICE.icon',
+#	macro		= print_menu,
+#	type		 = Window,
+#	default_name	= Print Menu,
+#	editor_type	= SimpleEditor,
+#	expand		= 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#	graphical_editor = NoEditor,
+#	delete		= True
+#
+#object,
+#	class           = ARTICLE,
+#	default_object  = False,
+#	editor_type	= SimpleEditor,
+#	default_name	= Article,
+#	expand  	= 128,
+#	can_be_created  = False,
+#	pixmap          = '$METVIEW_DIR_SHARE/icons/ARTICLE.icon',
+#	definition_file = '$METVIEW_DIR_SHARE/etc/ArticleDef'
+#
+#object,
+#	class		= REMOTE,
+#	default_object  = False,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/GenAppDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/GenAppRules',
+#	default_name	= Remote,
+#	type		= Remote,
+#	editor_type	= SimpleEditor,
+#	can_be_created	= False,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/REMOTE.icon',
+#	doubleclick_method = Examine
+#
+#########################################
+## Data groupe
+############################################
+#
+#object,
+#	class		= WMACRO,
+#	check 		= False,
+#	can_be_created 	= False,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/MacroDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/MacroRules',
+#	default_name	= Window Content,
+#	default_object  = False,
+#	doubleclick_method = Execute,
+#	type		= Macro,
+#	editor_type	= MacroEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/WMACRO.icon'
+#
+#object,
+#    class             = GEOTOOLS,
+#    can_be_created    = True,
+#    definition_file   = '$METVIEW_DIR_SHARE/etc/GeoToolsDef',
+#    rules_file        = '$METVIEW_DIR_SHARE/etc/GeoToolsRules',
+#    default_name      = GeoTools,
+#    type              = Window,
+#    expand            = 512, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    macro             = geo_tools,
+#    editor_type       = SimpleEditor,
+#    pixmap            = '$METVIEW_DIR_SHARE/icons/GEOTOOLS.icon'
+#
+## 3rd column
+#
+#
+#object,
+#	class		= METGRAM,
+#	icon_box	= To be organised,
+#	can_be_created	= False,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/MetgramRules',
+#	default_name	= 'Custom Metgram',
+#	help_page	= Custom_Metgram,
+#	type		= Data,
+#	expand		= 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#	macro 		= metgram,
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/METGRAM.icon'
+#
+##INSTIP:
+## You may change 'can_be_created' to have a value 'False'.
+## Classic Metgram is not a real Metview module but only a
+## batch job launcher. The batch job created will not work
+## as such outside ECMWF.
+#
+##
+## Third generation METGRAM_MANAGER_FAMILY (June 2001)
+## integrates METGRAM_FAMILY and METGRAM_COACH_FAMILY
+##
+#object,
+#    class		= METGRAM_MANAGER_FAMILY,
+#    icon_box            = To be organised,
+#    can_be_created 	= '$TRUE_IF_ECMWF',
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramManagerDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/MetgramManagerRules',
+#    default_name	= 'Metgram Manager',
+#    help_page		= Metgram_Manager_ECMWF_only,
+#    type		= Family,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    editor_type		= FamilyEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramManager.icon'
+#object,
+#    class		= INSTANT_EPS_METGRAM,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramManagerDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/MetgramCoachRules',
+#    default_name	= EPS Metgram Coach,
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= eps_metgram_coach,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramManager.icon'
+#object,
+#    class		= BATCH_CLASSIC_METGRAM,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramManagerDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/Metgram0Rules',
+#    default_name	= 'Classic Metgram (batch job)',
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= metgram0,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramManager.icon'
+#object,
+#    class		= BATCH_EPS_METGRAM,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramManagerDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/Metgram0Rules',
+#    default_name	= 'EPS Metgram (batch job)',
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= epsmetgram,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramManager.icon'
+##
+## Second generation Metgram Family (Sep2000)
+## read timeseries data from pre-created BUFR files
+##
+#object,
+#    class		= METGRAM_COACH_FAMILY,
+#    icon_box            = To be organised,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramCoachDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/MetgramCoachRules',
+#    default_name	= 'Metgrams Coach (please use Metgram Manager)',
+#    type		= Family,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    editor_type		= FamilyEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramCoach.icon'
+#object,
+#    class		= CLASSIC_METGRAM_COACH,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramCoachDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/MetgramCoachRules',
+#    default_name	= Classic Metgram Coach,
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= metgram_coach,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramCoach.icon'
+#object,
+#    class		= EPS_METGRAM_COACH,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/MetgramCoachDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/MetgramCoachRules',
+#    default_name	= EPS Metgram Coach,
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= eps_metgram_coach,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/MetgramCoach.icon'
+##
+## First generation Metgram Family
+##
+#object,
+#    class		= METGRAM_FAMILY,
+#    icon_box            = To be organised,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/Metgram0Def',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/Metgram0Rules',
+#    default_name	= 'Classic & EPS Metgrams (please use Metgram Manager)',
+#    type		= Family,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    editor_type		= FamilyEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/Metgram0.icon'
+#object,
+#    class		= CLASSIC_METGRAM,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/Metgram0Def',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/Metgram0Rules',
+#    default_name	= 'Classic Metgram (batch job)',
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= metgram0,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/Metgram0.icon'
+#object,
+#    class		= EPS_METGRAM,
+#    can_be_created 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/Metgram0Def',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/Metgram0Rules',
+#    default_name	= 'EPS Metgram (batch job)',
+#    type		= Data,
+#    expand              = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro 		= epsmetgram,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/Metgram0.icon'
+#
+#
+#
+#object,
+#	class		= RELHUM2,
+#	can_be_created 	= True,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/RelHum2Def',
+#	default_name	= Relative Humidity,
+#	type		= Data,
+#	macro 		= relhum,
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/RELHUM2.icon'
+#
+## 4th column
+#
+################# (new) PlotMod tephigram definition ###################
+#object,
+#    class             = TEPHIDATA_FAMILY,
+#    icon_box          = To be organised,
+#    can_be_created    = True,
+#    definition_file   = '$METVIEW_DIR_SHARE/etc/TephigramDataDef',
+#    rules_file        = '$METVIEW_DIR_SHARE/etc/TephigramDataRules',
+#    default_name      = Tephigram Data,
+#    help_page         = Tephigram_Data,
+#    type              = Family,
+#    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    editor_type       = FamilyEditor,
+#    pixmap            = '$METVIEW_DIR_SHARE/icons/TEPHIDATA.icon'
+#object,
+#    class             = PM_BUFR_TEPHI,
+#    can_be_created    = False,
+#    definition_file   = '$METVIEW_DIR_SHARE/etc/TephigramDataDef',
+#    rules_file        = '$METVIEW_DIR_SHARE/etc/TephigramDataRules',
+#    default_name      = BUFR Tephigram Data,
+#    type              = Data,
+#    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    macro             = pm_bufr_tephi,
+#    editor_type       = SimpleEditor,
+#    pixmap            = '$METVIEW_DIR_SHARE/icons/TEPHIDATA.icon'
+#object,
+#    class             = PM_GRIB_TEPHI,
+#    can_be_created    = False,
+#    definition_file   = '$METVIEW_DIR_SHARE/etc/TephigramDataDef',
+#    rules_file        = '$METVIEW_DIR_SHARE/etc/TephigramDataRules',
+#    default_name      = GRIB Tephigram Data,
+#    type              = Data,
+#    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    macro             = pm_grib_tephi,
+#    editor_type       = SimpleEditor,
+#    pixmap            = '$METVIEW_DIR_SHARE/icons/TEPHIDATA.icon'
+#object,
+#    class             = PM_PRE19950404_GRIB_TEPHI,
+#    can_be_created    = False,
+#    definition_file   = '$METVIEW_DIR_SHARE/etc/TephigramDataDef',
+#    rules_file        = '$METVIEW_DIR_SHARE/etc/TephigramDataRules',
+#    default_name      = Pre 1995 GRIB Tephigram Data,
+#    type              = Data,
+#    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    macro             = pre1995gribtephi,
+#    editor_type       = SimpleEditor,
+#    pixmap            = '$METVIEW_DIR_SHARE/icons/TEPHIDATA.icon'
+#
+################################### End PM Tephigram ############
+#
+## added macro function although it does not work if dropped into editor (vk 971209)
+## also hacked LLMATRIX to be able to manually make geo_to_matrix work!
+#object,
+#	class           	= GEO_TO_MATRIX,
+#	icon_box                = Filters,
+#	can_be_created 		= False,
+#	check           	= True,
+#	type            	= Data,
+#	macro			= geo_to_matrix,
+#	pixmap          	= '$METVIEW_DIR_SHARE/icons/GEO_TO_MATRIX.icon',
+#	editor_type     	= SimpleEditor,
+#	definition_file		= '$METVIEW_DIR_SHARE/etc/GeoToMatrixDef',
+#	default_object  	= False,
+#	default_name		= Lat-Lon Matrix
+#
+#object,
+#	class		= MATRIX,
+#	icon_box	= Data access,
+#	can_be_created 	= True,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/MatrixDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/MatrixRules',
+#	default_name	= Matrix,
+#	help_page	= Matrix,
+#	type		= Data,
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/MATRIX.icon'
+#
+#object,
+#	class		= CURVES_FAMILY,
+#	can_be_created 	= True,
+#	icon_box	= To be organised,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/CurveDef',
+#	default_name	= Curve,
+#	help_page	= Curve,
+#	type		= Family,
+#	expand		= 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#	editor_type	= FamilyEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/GRAPH.icon'
+#object,
+#    class               = CURVE,
+#    can_be_created      = False,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/CurveDef',
+#    default_name        = Curve,
+#    type                = Data,
+#    expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro               = curve,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/GRAPH.icon'
+#object,
+#    class               = GRAPH,
+#    can_be_created      = False,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/CurveDef',
+#    default_name        = Graph,
+#    type                = Data,
+#    expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro               = graph,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/GRAPH.icon'
+#object,
+#    class               = BAR,
+#    can_be_created      = False,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/CurveDef',
+#    default_name        = Graph,
+#    type                = Data,
+#    expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro               = bar,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/GRAPH.icon'
+#object,
+#    class               = AREA,
+#    can_be_created      = False,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/CurveDef',
+#    default_name        = Graph,
+#    type                = Data,
+#    expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    macro               = area,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/GRAPH.icon'
+#
+#
+#object,
+#	class		= VECTORS_FAMILY,
+#	can_be_created	= True,
+#	icon_box	= To be organised,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/VectorsDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/VectorsRules',
+#	default_name	= Vectors,
+#	help_page	= Vectors,
+#	type		= Family,
+#	expand		= 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#	editor_type	= FamilyEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/VECTOR_FIELD.icon'
+#object,
+#    class		= VECTOR_FIELD,
+#    can_be_created 	= False,
+#    default_object 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/VectorsDef',
+#    type		= Data,
+#    macro 		= vector_field,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/VECTOR_FIELD.icon'
+#object,
+#    class		= POLAR_FIELD,
+#    can_be_created 	= False,
+#    default_object 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/VectorsDef',
+#    type		= Data,
+#    macro 		= polar_field,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/VECTOR_FIELD.icon'
+#object,
+#    class		= COLOUR_POLAR_FIELD,
+#    can_be_created 	= False,
+#    default_object 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/VectorsDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/VectorsRules',
+#    type		= Data,
+#    expand		= 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    macro 		= colour_polar_field,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/VECTOR_FIELD.icon'
+#object,
+#    class		= COLOUR_VECTOR_FIELD,
+#    can_be_created 	= False,
+#    default_object 	= False,
+#    definition_file	= '$METVIEW_DIR_SHARE/etc/VectorsDef',
+#    rules_file		= '$METVIEW_DIR_SHARE/etc/VectorsRules',
+#    type		= Data,
+#    expand		= 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+#    macro 		= colour_vector_field,
+#    editor_type		= SimpleEditor,
+#    pixmap 		= '$METVIEW_DIR_SHARE/icons/VECTOR_FIELD.icon'
+#
+#object,
+#	class               = BUDGET,
+#	icon_box            = To be organised,
+#	can_be_created      = True,
+#	definition_file     = '$METVIEW_DIR_SHARE/etc/BudgetDef',
+#	rules_file          = '$METVIEW_DIR_SHARE/etc/BudgetRules',
+#	default_name        = Budget,
+#	help_page           = Budget,
+#	type                = Data,
+#	expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST _NAME
+#	macro               = budget,
+#	editor_type         = SimpleEditor,
+#	pixmap              = '$METVIEW_DIR_SHARE/icons/BUDGET.icon'
+#
+#state,
+#	class    = BUDGET,
+#	action   = visualise/drop/prepare,
+#	service  = Budget
+#
+#object,
+#    class            = SPECTRA_FAMILY,
+#    type             = Family,
+#    can_be_created   = True,
+#    icon_box         = To be organised,
+#    definition_file  = '$METVIEW_DIR_SHARE/etc/SpectraDef',
+#    rules_file       = '$METVIEW_DIR_SHARE/etc/SpectraRules',
+#    default_name     = Spectra,
+#    help_page        = Spectra,
+#    editor_type      = FamilyEditor,
+#    pixmap           = '$METVIEW_DIR_SHARE/icons/SPECTRA.icon'
+#object,
+#    class            = SPEC_GRAPH,
+#    type             = Data,
+#    can_be_created   = False,
+#    default_name     = Spectra Graph,
+#    default_object   = False,
+#    definition_file  = '$METVIEW_DIR_SHARE/etc/SpectraDef',
+#    macro            = spec_graph,
+#    editor_type      = SimpleEditor,
+#    pixmap           = '$METVIEW_DIR_SHARE/icons/SPECTRA.icon'
+#object,
+#    class            = SPEC_CONTOUR,
+#    type             = Data,
+#    can_be_created   = False,
+#    default_name     = Spectra Contour,
+#    default_object   = False,
+#    definition_file  = '$METVIEW_DIR_SHARE/etc/SpectraDef',
+#    macro            = spec_contour,
+#    editor_type      = SimpleEditor,
+#    pixmap           = '$METVIEW_DIR_SHARE/icons/SPECTRA.icon'
+#
+#state,
+#    class            = SPECTRA_FAMILY/SPEC_GRAPH/SPEC_CONTOUR,
+#    action   	     = visualise/drop/prepare,
+#    service          = Spectra
+#
+#object,
+#	class               = SCORES,
+#	icon_box            = To be organised,
+#	can_be_created      = '$TRUE_IF_MARS_AVAILABLE',
+#	definition_file     = '$METVIEW_DIR_SHARE/etc/ScoresDef',
+#	rules_file          = '$METVIEW_DIR_SHARE/etc/ScoresRules',
+#	default_name        = Scores,
+#	help_page           = Scores,
+#	type                = Data,
+#	expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST _NAME
+#	macro               = scores,
+#	editor_type         = SimpleEditor,
+#	pixmap              = '$METVIEW_DIR_SHARE/icons/SCORES.icon'
+#
+#
+#state,
+#	class    = SCORES,
+#	action   = visualise/drop/prepare,
+#	service  = Scores
+#
+#state,
+#	class = GRIB,
+#	mode = SCORES,
+#	service = Scores
+#
+#state,
+#	class   = REMOTE,
+#	action  = execute/prepare,
+#	service = cremote
+#
+#
+###############################################
+## Visdef group
+###############################################
+#
+##ANNOTATION is an alias for PTEXT. For the user point of view there are
+##2 objects: ANNOTATION and TITLE. For the Magics point of view both
+##objects are PTEXT.
+#object,
+#	class		= ANNOTATION,
+#	icon_box	= Visual definitions,
+#	can_be_created 	= True,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/AnnotationDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/AnnotationRules',
+#	default_name	= Annotation,
+#	help_page	= Annotation,
+#	type		= Visdef,
+#	macro 		= annotation,
+#	expand 		= 128, # EXPAND_DEFAULT
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/PTEXTa.icon'
+#
+#object,
+#	class		= PIMPORT,
+#	icon_box	= Visual definitions,
+#	can_be_created 	= True,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/ImportDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/ImportRules',
+#	default_name	= Import Plot,
+#	help_page	= Import_Plot,
+#	type		= Visdef,
+#	macro 		= pimport,
+#	expand 		= 128, # EXPAND_NO_DEFAULT
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/PIMPORT.icon'
+#
+#object,
+#	class		= PMIMAGE,
+#	icon_box        = Visual definitions,
+#	can_be_created 	= True,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/PM_ImageDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/PM_ImageRules',
+#	default_name	= PM Image Table,
+#	help_page	= Image_Table,
+#	type		= Visdef,
+#	macro 		= pmimage,
+#	expand 		= 79, # EXPAND_NO_DEFAULT
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/PMIMAGE.icon'
+#
+## The following icons cannot be created but can be edited (via VisMod)
+#object,
+#	class			= PTEPHI,
+#	can_be_created 		= False,
+#	definition_file		= '$METVIEW_DIR_SHARE/etc/PTephiDef',
+##	rules_file		= '$METVIEW_DIR_SHARE/etc/MagicsRules',
+#	default_name		= Tephi Axis Plot,
+#	type			= Visdef,
+#	macro 			= ptephi,
+#	expand 			= 128, # EXPAND_NO_DEFAULT
+#	editor_type		= SimpleEditor,
+#	pixmap 			= '$METVIEW_DIR_SHARE/icons/PAXIS.icon'
+#
+#object,
+#	class		= LEGENDENTRY,
+#	can_be_created  = True,
+#	type		= Visdef,
+#	definition_file	= '$METVIEW_DIR_SHARE/etc/LegendEntryDef',
+#	rules_file	= '$METVIEW_DIR_SHARE/etc/LegendEntryRules',
+#	default_name	= Legend Entry,
+#	help_page	= Legend_Entry,
+#	macro 		= legendentry,
+#	expand 		= 128, # EXPAND_NO_DEFAULT
+#	editor_type	= SimpleEditor,
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/LEGENDENTRY.icon'
+#
+#object,
+#	class			= VISUALISATION_PREFERENCES,
+#	default_object  = False,
+#	can_be_created	= False,
+#	type			= Preference,
+#	default_name	= Visualisation Preferences,
+#	editor_type		= SimpleEditor,
+#	definition_file = '$METVIEW_DIR_SHARE/etc/VisModPreferencesDef',
+#	pixmap 			= '$METVIEW_DIR_SHARE/icons/PREFERENCES.icon'
+#
+#object,
+#	class			= METGRAM_PREFERENCES,
+#	can_be_created  = False,
+#	default_object  = False,
+#	type			= Preference,
+#	default_name	= Metgram Preferences,
+#	editor_type		= SimpleEditor,
+#	definition_file = '$METVIEW_DIR_SHARE/etc/MetgramPref',
+#	pixmap 			= '$METVIEW_DIR_SHARE/icons/PREFERENCES.icon'
+#
+#object,
+#	class			= MACRO_PREFERENCES,
+#	can_be_created	= False,
+#	type			= Preference,
+#	default_name	= Macro Preferences,
+#	default_object  = False,
+#	editor_type		= SimpleEditor,
+#	definition_file = '$METVIEW_DIR_SHARE/etc/MacroPref',
+#	rules_file = '$METVIEW_DIR_SHARE/etc/MacroRules',
+#	pixmap 			= '$METVIEW_DIR_SHARE/icons/PREFERENCES.icon'
+#
+#object,
+#	class				= INPUT,
+#	can_be_created 		= False,
+#	definition_file		= '$METVIEW_DIR_SHARE/etc/GraphObjectsDef',
+#	default_name		= Line,
+#	type				= Visdef,
+#	macro 				= line,
+#	expand 				= 128, # EXPAND_NO_DEFAULT
+#	editor_type			= SimpleEditor,
+#	pixmap 				= '$METVIEW_DIR_SHARE/icons/INPUT.icon'
+#
+#
+##
+## State list
+##
+#
+#state,
+#	action = prepare_definition
+#
+#state,
+#	class = STATIONS,
+#	action = examine/save
+#
+#state,
+#	class  = PAXIS,
+#	action = execute/visualise/examine/save
+#
+#state,
+#	class   = FOLDER/SYSTEM/FILM/WASTEBASKET/NEWS,
+#	action  = duplicate
+#
+#state,
+#	class   = SYSTEM/WASTEBASKET/NEWS,
+#	action  = delete
+#
+#state,
+#	class   = slider/menu/option_menu/colour/icon/on_off,
+#	action  = visualise/hardcopy
+#
+#state,
+#	class    = VECTORS_FAMILY/COLOUR_VECTOR_FIELD/COLOUR_POLAR_FIELD,
+#	action   = execute
+#
+#
+#state,
+#	class   = MACRO/WMACRO,
+#	action  = print,
+#	service = '($METVIEW_BIN/beautify "%s\" | $MVPRINTCMD)'
+#
+#state,
+#	action  = print,
+#	service = '($MVPRINTCMD \"%s\")'
+#
+#state,
+#	class   =  FOLDER/SYSTEM/WASTEBASKET,
+#	action  =  examine,
+#	service = MetviewUI
+#
+#state,
+#	class   =  FOLDER/SYSTEM/WASTEBASKET/SHELL/NOTE,
+#	action  =  visualise/hardcopy
+#
+#state,
+#	class   = DEVICE,
+#	action  = hardcopy,
+#	service = VisModTrans
+#
+#state,
+#	class   = PRASTER,
+#	action	= save,
+#	service = savepool
+#
+#state,
+#	class   = PRASTERLOOP,
+#	action	= save,
+#	service = savepool
+#
+#state,
+#	class   = PCONT/PGRAPH/PSYMB/PWIND/POBS/PIMPORT/PTEXT/ANNOTATION/DEVICE/NEWS/OVERLAY_CONTROL,
+#	action	= visualise/examine/save/hardcopy
+#
+#state, class = CURVE/BAR/AREA/CURVES_FAMILY,
+#	mode = GRAPH,
+#	service = Graph, action=prepare/visualise
+#
+#state, class = CURVE/BAR/AREA/CURVES_FAMILY,
+#	service = Curve, action=prepare/visualise
+#
+#state, class = GRAPH/CURVES_FAMILY,
+#	service = Graph, action=prepare/visualise
+#
+#
+#state,
+#	class        = GEO_TO_MATRIX,
+#	output_class = LLMATRIX,
+#	service      =  tomatrix
+#
+#state,
+#	class   = LINK,
+#	action  = visualise,
+###	service = PlotMod
+#	service = VisModTrans
+###	service = VisMod
+#
+#
+#
+#state,
+#	class    = METGRAM/SERIE,
+#	action   = visualise/hardcopy/drop/prepare,
+#	service  = Metgram
+#
+#state,
+#    class    = GRIB/STATION/PAXIS,
+#    mode     = METGRAM,
+#	service  = Metgram
+#
+#state,
+#	class    = METGRAM_MANAGER_FAMILY/INSTANT_EPS_METGRAM,
+#	action   = execute/visualise/prepare/drop,
+#	service  = MetgramCoach
+#state,
+#	class    = METGRAM_MANAGER_FAMILY/BATCH_CLASSIC_METGRAM/BATCH_EPS_METGRAM,
+#	action   = execute/prepare/drop,
+#	service  = Metgram0
+#
+#state,
+#	class    = METGRAM_COACH_FAMILY/CLASSIC_METGRAM_COACH/EPS_METGRAM_COACH,
+#	action   = execute/visualise/prepare/drop,
+#	service  = MetgramCoach
+#
+#state,
+#	class    = METGRAM_FAMILY/CLASSIC_METGRAM/EPS_METGRAM,
+#	action   = execute/prepare/drop,
+#	service  = Metgram0
+#
+#state,
+#	class    = RELHUM2,
+#	output_class = GRIB,
+#	action   = visualise/hardcopy/prepare/drop,
+#	service  = Relhum2
+#
+#state,
+#	class    = TOTRAIN,
+#	output_class = GRIB,
+#	action   = execute/visualise/hardcopy/prepare/drop,
+#	service  = totrain
+#
+#state,
+#	class    = COLOUR_VECTOR_FIELD/COLOUR_POLAR_FIELD,
+#	action   = visualise/hardcopy/prepare/drop,
+#	service  = Vectors
+#
+#state,
+#	class    = VECTORS_FAMILY/COLOUR_VECTOR_FIELD/COLOUR_POLAR_FIELD,
+#	action   = execute/hardcopy/visualise,
+#	service  = Vectors
+#
+#state,
+#	class    = SAMPLE,
+#	service  = SampleModule
+#
+#state,
+#	class    = WMACRO,
+#	action   = visualise/hardcopy/examine/save
+#
+#state,
+#    class    = PLOTWINDOW/CAROUSEL/INPUTWINDOW/SUPERPAGE,
+#    action   = prepare, # Don't forget prepare for macro
+#    context  = macro,
+#    service = VisModTrans
+###    service  = VisMod
+#
+#state,
+#    class    = PLOTWINDOW/CAROUSEL/INPUTWINDOW/SUPERPAGE,
+#    action   = execute,
+#    service  = VisModTrans
+###    service  = VisMod
+#
+############# New applications can save it's output ##########
+#state,
+#	class    = PM_VPROF,
+#	output_class = NETCDF,
+#        service  = PM_Xsect
+#
+#state,
+#	class    = GEOTOOLS,
+##	output_class = Window,
+#        service  = GeoTools
+#
+#############################################
+#
+#state,
+#	class    = NEWPAGE,
+#	action   = hardcopy,
+#	service  = PlotMod
+###	service = VisModTrans
+###	service  = VisMod
+#
+#state,
+#	class	= DROP/NOTE/SHELL/NEWS/MACRO_PREFERENCES/
+#		VISUALISATION_PREFERENCES/METGRAM_PREFERENCES/
+#		CAROUSEL/PLOTWINDOW/INPUTWINDOW/ARTICLE/SUPERPAGE,
+#	action  = visualise/hardcopy
+#
+##state,
+##	action  = visualise,
+##	service = VisMod
+#
+##state,
+##	class = STATION,
+##	output_class = GEOPOINTS,
+##	action = visualise/hardcopy,
+##	service  =ToGeoPoints
+#
+#state,
+#	class  = PCOAST,
+#	action = visualise
+#
+#state,
+#	class	= LEOPOINTS/AOF/IMAGE/MATRIX/LIST_OF_POINTS/FILM/
+#		  BAR_GRAPH/DOUBLE_CURVE/VECTOR_FIELD/POLAR_FIELD/PTEPHI,
+#	action	= visualise/hardcopy,
+###	service	= PlotMod
+#	service = VisModTrans
+#
+#state,
+#	class	= CURVE/MAGICS_PARAMETERS/PAXIS/CLEAN/STATION,
+#	action	= visualise/hardcopy,
+#	service	= VisModTrans
+#
+#state,
+#	class = IMAGE,
+#	action = examine,
+#	service = GribExaminer
+##	service = ImageDisplay
+## not exampool???
+#
+## moved
+##state,
+##	class = STATION,
+##	action = examine/save
+#
+#state,
+#	class    = HTML,
+#	action	 = visualise,
+#	service  = '($MV_BROWSER_NAME "%s")'
+#    # is there a better way to do this, e.g. using the WebAccess service?
+#
+#object,
+#    class                = TIMER,
+#    type                 = Data,
+#    can_be_created       = False,
+#    definition_file      = '$METVIEW_DIR_SHARE/etc/TimerDef',
+#    rules_file           = '$METVIEW_DIR_SHARE/etc/TimerRules',
+#    default_name         = Timer,
+#    macro                = timer,
+#    editor_type          = SimpleEditor,
+#    expand               = 75,
+#    pixmap               = '$METVIEW_DIR_SHARE/icons/TIMER.icon'
+#
+#state,
+#    class    = TIMER,
+#    action   = execute,
+#    service  = MetviewUI
+#
+#
+##################################################################
+##                                                               #
+##  P l o t M o d  stuff, moved from DevObjectList 15.9.1998/vk  #
+##                                                               #
+##################################################################
+#
+####  o b j e c t s   f o r   n e w   P l o t M o d  ###
+#
+#####################
+## New PlotMod Icons....
+#####################
+#
+#object,
+#    class               = MAP_DEFINITION,
+#    can_be_created      = False,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/MapDefinitionDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/MapDefinitionRules',
+#    pixmap            	= '$METVIEW_DIR_SHARE/icons/MAPVIEW.icon',
+#    default_name        = Map Definition,
+#    type                = Window,
+#    macro               = map_definition,
+#    editor_type         = SimpleEditor,
+#    graphical_editor  	= NoEditor,
+#    expand              = 32, # EXPAND_FIRST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#    class               = EDIT_MAP,
+#    can_be_created      = False,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/EditMapDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/EditMapRules',
+#    pixmap            	= '$METVIEW_DIR_SHARE/icons/MAPVIEW.icon',
+#    default_name        = Edit Map,
+#    type                = Window,
+#    macro               = edit_map,
+#    editor_type         = SimpleEditor,
+#    graphical_editor  	= NoEditor,
+#    expand              = 32, # EXPAND_FIRST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#    class               = SATELLITEVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/SatelliteViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/SatelliteViewRules',
+#    default_name        = Satellite View,
+#    type                = View,
+#    macro               = satelliteview,
+#    editor_type         = SimpleEditor,
+#    help_page           = Satellite_View,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/SATELLITEVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#    class               = CURVEVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/CurveViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/CurveViewRules',
+#    default_name        = Curve View,
+#    help_page           = Curve_View,
+#    type                = View,
+#    macro               = curveview,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/CURVEVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#    class               = TEPHIGRAMVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/TephigramViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/TephigramViewRules',
+#    default_name        = Tephigram View,
+#    help_page           = Tephigram_View,
+#    type                = View,
+#    macro               = tephigramview,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/TEPHIVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#    class               = EMPTYVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/EmptyViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/EmptyViewRules',
+#    default_name        = Empty View,
+#    help_page           = Empty_View,
+#    type                = View,
+#    macro               = emptyview,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/EMPTYVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#    class               = TEXTVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/TextViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/TextViewRules',
+#    default_name        = Text View,
+#    help_page           = Text_View,
+#    type                = View,
+#    macro               = textview,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/TEXTVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+# object,
+#    class               = IMPORTVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/ImportViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/ImportViewRules',
+#    default_name        = Import View,
+#    help_page           = Import_View,
+#    type                = View,
+#    macro               = importview,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/IMPVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+# object,
+#    class               = HOVMOELLERVIEW,
+#    can_be_created      = True,
+#    icon_box            = Views,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/HovmoellerViewDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/HovmoellerViewRules',
+#    default_name        = Hovmoeller View,
+#    help_page           = Hovm_oslash_ller_View,
+#    type                = View,
+#    macro               = hovmoellerview,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/HOVMOELLERVIEW.icon',
+#    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+#######FAMI Begin : Remove comments later (Jan/2002)
+##object,
+##    class               = MATCHING_INFORMATION,
+##    can_be_created      = True,
+##    icon_box            = PlotMod,
+##    definition_file     = '$METVIEW_DIR_SHARE/etc/MatchingInfoDef',
+##    rules_file          = '$METVIEW_DIR_SHARE/etc/MatchingInfoRules',
+##    default_name        = Matching Criteria,
+##    type                = Visdef,
+##    macro               = matchinginfo,
+##    editor_type         = SimpleEditor,
+##    pixmap              = '$METVIEW_DIR_SHARE/icons/MATCHING_INFORMATION.icon',
+##    expand              = 75, #EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+##    doubleclick_method  = Edit
+#
+######FAMI End
+#
+#object,
+#    class               = SUBPAGEDETAILS,
+#    can_be_created      = False,
+#   icon_box             = PlotMod,
+#    definition_file     = '$METVIEW_DIR_SHARE/etc/SubpageDetailsDef',
+#    rules_file          = '$METVIEW_DIR_SHARE/etc/SubpageDetailsRules',
+#    default_name        = Subpage Details,
+#    type                = Window,
+#    macro               = subpagedetails,
+#    editor_type         = SimpleEditor,
+#    pixmap              = '$METVIEW_DIR_SHARE/icons/SUBPAGEDETAILS.icon',
+#    expand              = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+#    doubleclick_method  = Edit
+#
+#object,
+#	class           = HTML,
+#	check           = False,
+#	default_object  = False,
+#	type            = File,
+#	pixmap          = '$METVIEW_DIR_SHARE/icons/WEBACCESS.icon',
+#	default_name    = HTML File,
+#	editor_type     = TextEditor
+#
+##
+## State list
+##
+## To Enable the Edit Preferences button in the Editor try something like that:
+##state,
+##   class  = RETRIEVE,
+##   action = edit_pref,
+##   service = MetviewUI
+#
+## For the others object, the Edit Preferences button in the Editor is disabled..
+#state,
+#    action = edit_pref
+#
+#web,
+#	page = webmars,
+#	url  = '$WEBMARS_URL'
+#
+#web,
+#	page = catalogue,
+#	url  = '$WEBMARS_URL/d/catalog'
+#
+#web,
+#	page = catalogue_help,
+#	url  = '$WEBMARS_URL/metview'
+#
+#web,
+#	page = index,
+#	url  = '$METVIEW_URL/manual/index.html'
+#
+#web,
+#	page = MetviewUI,
+#	url  = '$METVIEW_URL/manual/The_Metview_Desktop.html'
+#
+#web,
+#	page = PlotMod,
+#	url  = '$METVIEW_URL/manual/The_Display_Layout.html'
+#
+#web,
+#	page = Macro,
+#	url  = '$METVIEW_URL/manual/Macro_Language.html'
+#
+#web,
+#	page = applications,
+#	url  = '$METVIEW_URL/manual/Icon_Reference.html'
+#
+#web,
+#	page = app_help,
+#	url  = '$METVIEW_URL/manual'
+#
+#web,
+#	page = support,
+#	url  = '$METVIEW_URL'
+#
+#web,
+#	page = updates,
+#	url  = '$METVIEW_URL/install'
+#
diff --git a/share/metview/etc/ObjectList.forTesting b/share/metview/etc/ObjectList.forTesting
new file mode 100644
index 0000000..6bdf18f
--- /dev/null
+++ b/share/metview/etc/ObjectList.forTesting
@@ -0,0 +1,10 @@
+# Objects under development
+#
+# This stuff is added into Metview runtime 'config' file
+# only when script 'metview_dev' is run, i.e. this stuff
+# is skipped (not available) in Metview user version.
+
+cat <<@
+
+@
+
diff --git a/share/metview/etc/ObsDef b/share/metview/etc/ObsDef
new file mode 100755
index 0000000..3ed8a4b
--- /dev/null
+++ b/share/metview/etc/ObsDef
@@ -0,0 +1,936 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+_DUMMY ; DUMMY REQUEST  ; DUMMY
+{
+	TYPE_LIST {
+		SYNOP ; SYNOP
+		AIREP ; AIREP
+		SATOB ; SATOB
+		DRIBU ; DRIBU
+		TEMP ; TEMP
+		PILOT ; PILOT
+		SATEM ; SATEM
+		SOILT ; SOILT
+		/
+	} 
+
+	SCAT_REJECTION_LIST {
+		RAIN ; RAIN
+		WSOL ; WSOL
+		WSPD ; WSPD
+		ICE ; ICE
+        /
+    }
+
+    CODE_TYPE_LIST
+    {
+		LSD Synop land - S ; 1
+		LSD Synop record 2 land - S2 ; 2
+		LSD Synop auto land - SA ; 3
+		LSD Synop auto record 2 land - SA2; 4
+
+		SSD Synop ship abbreviated - SAB ; 9
+		SSD Synop ship - SS ; 11
+		SSD Synop record 2 ship -SS2 ; 12
+		SSD Synop auto ship - SAS ; 13
+		SSD Synop auto record 2 ship - SAS2 ; 14
+
+		VSNS Pilot land - P ; 91
+		VSNS Pilot ship - PS ; 92
+		VSNS Temp land - T ; 101
+		VSNS Temp ship - TS ; 102
+		VSNS Temp drop - TD ; 103
+		VSNS Rocob land - R ; 104
+		VSNS Rocob ship - RS ; 105
+
+		VSS High resolution - HR ; 51
+		VSS Satem mean temp - SMT ; 61
+		VSS Satem water - SW ; 62
+		VSS Satem higher level mean layer temperature - SHL ; 63
+		VSS Mean temp - MT ; 71
+		VSS Water - W ; 72
+		VSS Higher level - HL ; 73
+
+		SLS Satob section 2 - SAT2 ; 82
+		SLS Satob section 3 - SAT3 ; 83
+		SLS Satob section 4 - SAT4 ; 84
+		SLS Satob section 5 - SAT5 ; 85
+
+		ERS SCAT ; 122
+		QuikSCAT non-rainy ; 137
+		QuikSCAT rainy ; 139
+
+		OD Dribu oceanographic - DO ; 131
+		OD Bathy oceanographic - BO ; 132
+		OD Tesac oceanographic - TO ; 133
+
+		SLNS Codar - COD ; 141
+		SLNS Airep - AIR ; 142
+		SLNS Colba - COL ; 143
+		SLNS AMDAR - AM ; 144
+		SLNS ACARS - AC ; 145
+
+		DD PAOBS - PA ; 164
+		*
+        /
+    } 
+
+	SATELLITE_NUMBER_LIST 
+    {
+		001 ERS-1 SCAT ; 1
+		002 ERS-2 SCAT ; 2
+		003 Meteosat 3 ; 003
+		004 Meteosat 4 ; 004
+		005 Meteosat 5 ; 005
+		025 Meteosat 5 WV ; 025
+		045 Meteosat 5 VIS ; 045
+		055 Meteosat 5 WV EXP ; 055
+		031 Meteosat 5 IR ; 031
+		033 Meteosat 5 VIS ; 033
+		035 Meteosat 5 WV ; 035
+		040 Meteosat 5 HVIS ; 040
+		104 Himawari 4 IR ; 104
+		144 Himawari 4 VIS ; 144
+		105 Himawari 5 IR ; 105
+		125 Himawari 5 WV ; 125
+		145 Himawari 5 VIS ; 145
+		200 Goes ; 200
+		252 Goes 8 IR ; 252
+		253 Goes 9 IR ; 253
+		272 Goes 8 WV ; 272
+		273 Goes 9 WV ; 273
+		280 NSCAT ; 280
+		281 QuikSCAT ; 281
+		282 Goes 8 COMB ; 282
+		283 Goes 9 COMB ; 283
+		292 Goes 8 VIS ; 292
+		293 Goes 9 VIS ; 293
+		480 Insat ; 480
+		420 Insat ; 420
+		460 Insat VIS ; 460
+		*
+        /
+    } 
+
+    LEVEL
+    {
+        1000 ; 1000
+        925  ;  925
+        850  ;  850
+        700  ;  700
+        500  ;  500
+        400  ;  400
+        300  ;  300
+        200  ;  200
+        100  ;  100
+         70  ;   70
+         50  ;   50
+         30  ;   30
+         10  ;   10
+        *
+    }
+}
+
+POBS    ; OBS     ; MAGICS
+{
+		OBS_TYPE_LIST
+		[ help = help_multiple_selection ]
+		{ 
+			&_DUMMY&TYPE_LIST 
+		}
+
+	    OBS_CODE_TYPE_LIST 
+        [ help = help_multiple_selection ]
+        {
+            &_DUMMY&CODE_TYPE_LIST
+		} 
+
+	    OBS_IDENTIFIER_LIST 
+		{
+			@
+			/
+		} 
+
+	    OBS_SATELLITE_NUMBER_LIST 
+		[ help = help_multiple_selection ]
+		{ 
+			&_DUMMY&SATELLITE_NUMBER_LIST
+		}
+
+        OBS_CONFIDENCE_CHECK
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_CONFIDENCE_PARAMETER
+        {
+				ANY 		; ANY
+                DEWPOINT 	; DEWPOINT
+                HEIGHT 		; HEIGHT
+                POSITION	; POSITION
+                PRESSURE	; PRESSURE
+                TEMPERATURE	; TEMPERATURE
+                WIND		; WIND
+        } = POSITION
+ 
+        OBS_CONFIDENCE_LEVEL
+        [ interface = slider, min = 0, max = 100, step = 1,
+          exclusive = true, direction = max_on_right ]
+        {
+                *
+        } = 70.0
+
+        OBS_DATE_CHECK
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_DATE
+        {
+                *
+        } = 0
+ 
+        OBS_DATE_TOLERANCE
+        {
+                *
+        } = 0
+
+        OBS_TIME_CHECK
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_TIME
+        {
+                *
+        } = 1200
+ 
+        OBS_TIME_TOLERANCE
+        {
+                *
+        } = 0
+ 
+        OBS_IDENTIFICATION
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_IDENTIFICATION_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_IDENTIFICATION_TYPE
+        {
+                STATION_IDENTIFIER   ; STATION_IDENTIFIER  
+                CODE_TYPE            ; CODE_TYPE           
+                OBSERVATION_TYPE     ; OBSERVATION_TYPE    
+        } = STATION_IDENTIFIER
+ 
+        OBS_DISTANCE_APART
+        {
+                @
+        } = 1.0
+ 
+        OBS_SIZE
+        {
+                @
+        } = 0.2
+ 
+        OBS_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        OBS_ROTATION
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_POSITION_ONLY
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_STATION_RING
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_STATION_RING_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_WIND
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_WIND_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_WIND_FLAG_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        OBS_WIND_FLAG_STYLE
+        {
+                SOLID
+                DASH
+                DOT
+        } = SOLID
+
+        OBS_PRESSURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_UPPER_AIR_PRESSURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        OBS_PRESSURE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_TEMPERATURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_TEMPERATURE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_SEA_SURFACE_TEMPERATURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_SEA_SURFACE_TEMP_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_PRESSURE_TENDENCY
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_PRESSURE_TENDENCY_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+                 'BLACK/RED'  ; 'BLACK/RED'
+        } = 'BLACK/RED'
+
+        OBS_PRESENT_WEATHER
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_PRESENT_WEATHER_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_PAST_WEATHER
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_PAST_WEATHER_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+
+        OBS_VISIBILITY
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_VISIBILITY_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_DEWPOINT
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_DEWPOINT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+
+        OBS_TIME_PLOT
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_TIME_PLOT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_CLOUD
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_CLOUD_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_LOW_CLOUD
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_LOW_CLOUD_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_MEDIUM_CLOUD
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_MEDIUM_CLOUD_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_HIGH_CLOUD
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_HIGH_CLOUD_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+
+        OBS_CLOUD_8_GROUPS
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_CLOUD_8_GROUPS_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+!BACKGROUND (020125)
+!BLACK
+
+        OBS_LEVEL
+    	[ help = help_multiple_selection, exclusive = True ]
+   		{
+        		&_DUMMY&LEVEL
+        } = 500
+ 
+        OBS_LEVEL_2
+    	[ help = help_multiple_selection, exclusive = True ]
+   		{
+        		&_DUMMY&LEVEL
+        } = 1000
+ 
+        OBS_LEVEL_TOLERANCE
+        {
+                *
+        } = 0
+ 
+		OBS_THERMAL_WIND
+		{
+            &PARAMSHARE&ONOFF
+		} = OFF
+
+		OBS_THERMAL_WIND_LINE_STYLE
+		{
+			SOLID
+			DASH
+			DOT
+		} = DASH
+
+#		OBS_THERMAL_WIND_TYPE
+#		{
+#			FLAGS
+#			ARROWS
+#		} = FLAGS
+
+        OBS_THETA
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_THETA_TYPE
+        {
+          RELATIVE_HUMIDITY              ; RELATIVE_HUMIDITY               
+          HUMIDITIY_MIXING_RATIO         ; HUMIDITIY_MIXING_RATIO          
+          POTENTIAL_TEMPERATURE          ; POTENTIAL_TEMPERATURE           
+          WATER_PRECIPITABLE             ; WATER_PRECIPITABLE              
+          PSEUDO_POTENTIAL_TEMPERATURE   ; PSEUDO_POTENTIAL_TEMPERATURE    
+          WET_BULB_POTENTIAL_TEMPERATURE ; WET_BULB_POTENTIAL_TEMPERATURE  
+        } = RELATIVE_HUMIDITY
+ 
+        OBS_THETA_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_THICKNESS
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_THICKNESS_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_SATEM_TEMPERATURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_WATER_PRECIPITABLE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_WATER_PRECIPITABLE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_SHIP_DIRECTION
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_SHIP_DIRECTION_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_SHIP_SPEED
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_SHIP_SPEED_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_WAVES
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_WAVES_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+ 
+        OBS_HEIGHT
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_HEIGHT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+		OBS_SOIL_TEMPERATURE_LEVEL_1
+		{
+                 &PARAMSHARE&ONOFF
+		} = ON
+
+        OBS_SOIL_TEMPERATURE_LEVEL_2
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_SOIL_TEMPERATURE_LEVEL_3
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_SOIL_TEMPERATURE_LEVEL_4
+        {
+				&PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_SOIL_TEMPERATURE_COLOUR
+        {
+             	&PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_STATION_HEIGHT
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_STATION_HEIGHT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLACK
+
+        OBS_FB
+        {
+			OFF ; OFF
+#			OI ; OI
+			3DVAR ; 3DVAR
+			4DVAR ; 4DVAR
+        } = OFF
+ 
+ 		OBS_FB_LEGEND
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        OBS_FB_TYPE
+        {
+			REJECT_REPORT ; REJECT_REPORT
+			REJECT_VARIABLES ; REJECT_VARIABLES
+			FLAGGED_BUT_USED ; FLAGGED_BUT_USED
+			USED ; USED
+			NOT_USED ; NOT_USED
+			BLACKLIST_REPORT ; BLACKLIST_REPORT
+			BLACKLIST_VARIABLES ; BLACKLIST_VARIABLES
+			ALL ; ALL
+        } = REJECT_REPORT
+
+        OBS_FB_STATION_RING_HEIGHT
+        {
+                @
+        } = 0.15
+ 
+        OBS_FB_MIN_ERROR_FLAG
+        {
+				1 ; 1
+				2 ; 2
+				3 ; 3
+        } = 2
+        
+        OBS_FB_ERROR_FLAG0_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = GREEN
+ 
+        OBS_FB_ERROR_FLAG1_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = CYAN
+ 
+        OBS_FB_ERROR_FLAG2_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BROWN
+ 
+        OBS_FB_ERROR_FLAG3_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = RED
+ 
+		OBS_FB_SOURCE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_FB_SOURCE_TYPE
+        {
+			RDB ; RDB
+			ML ; ML
+			FG ; FG
+			AN ; AN
+			DP ; DP
+			3D ; 3D
+			4D ; 4D
+			BL ; BL
+			ALL ; ALL
+        } = ALL
+ 
+        OBS_FB_LEVEL
+    	[ help = help_multiple_selection, exclusive = True ]
+   		{
+        		&_DUMMY&LEVEL
+        } = 500
+
+        OBS_FB_LEVEL_2
+    	[ help = help_multiple_selection, exclusive = True ]
+   		{
+        		&_DUMMY&LEVEL
+        } = 1000
+
+		OBS_FB_LEVEL_TOLERANCE_ABOVE
+		{
+				*	
+		} = 0
+ 
+		OBS_FB_LEVEL_TOLERANCE_BELOW
+		{
+				*	
+		} = 0
+ 
+		OBS_FB_DEPARTURES
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+		OBS_FB_DEPARTURES_TYPE  [ beautify = false ]
+		{
+			FG
+			AN
+			IA
+			'OBS-FG'
+			'OBS-FG2'
+			'OBS-FG3'
+			'OBS-AN'
+		} = FG
+
+		OBS_FB_SUBSTITUTES
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+        
+		OBS_FB_HEIGHT
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+		OBS_FB_PRESSURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+		OBS_FB_RELATIVE_HUMIDITY
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+		OBS_FB_SPECIFIC_HUMIDITY
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+		OBS_FB_TEMPERATURE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+		OBS_FB_WIND
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        OBS_FB_WIND_FLAG_LENGTH
+        {
+                *
+        } = 0.8
+        
+		OBS_FB_RADIANCES
+        {
+				&PARAMSHARE&ONOFF
+        } = OFF
+        
+		OBS_FB_RADIANCES_TYPE
+        {
+				'1DVAR'	; '1DVAR'
+				'3DVAR'	; '3DVAR'
+				'4DVAR'	; '4DVAR'
+        } = 3DVAR
+        
+		OBS_FB_RADIANCES_CHANNEL_NUMBER
+        {
+				1	; 1
+				2	; 2
+				3	; 3
+				4	; 4
+				5 	; 5
+				6	; 6
+				7	; 7
+				8	; 8
+				9	; 9
+				10	; 10
+				11	; 11
+				12	; 12
+				13	; 13
+				14	; 14
+				15	; 15
+				16	; 16
+				17	; 17
+				18	; 18
+				19	; 19
+				20	; 20
+				21	; 21
+				22	; 22
+				23	; 23
+				24	; 24
+				25	; 25
+				26	; 26
+				27	; 27
+        } = 1
+        
+		OBS_FB_RADIANCES_CHANNEL_PLOT
+        {
+				&PARAMSHARE&ONOFF
+        } = OFF
+        
+		OBS_FB_RADIANCES_DEPARTURES
+        {
+				&PARAMSHARE&ONOFF
+        } = OFF
+        
+		OBS_FB_RADIANCES_DEPARTURES_TYPE  [ beautify = false ]
+        {
+				'OBS-FG'
+				'OBS-FG2'
+				'OBS-FG3'
+				'OBS-AN'
+				ALL
+				BIAS
+				STDEV
+        } = 'OBS-FG'
+        
+		OBS_FB_SCATTEROMETER_WINDS
+        {
+				&PARAMSHARE&ONOFF
+        } = OFF
+        
+        OBS_FB_SCAT_CLOSEST_TO
+        {
+			FG ; FG
+			AN ; AN
+        } = FG
+
+        OBS_FB_SCAT_AMBIGUITIES
+        {
+			1 ; 1
+			2 ; 2
+			3 ; 3
+			4 ; 4
+        } = 1
+
+		OBS_FB_SCAT_THINNED_ONLY
+        {
+                &PARAMSHARE&ONOFF
+        } = ON
+
+		OBS_FB_SCAT_SWEET_SPOTS_ONLY
+        {
+                &PARAMSHARE&ONOFF
+        } = ON
+
+        OBS_FB_SCAT_ALT_COLORING
+        {
+				COLOURED
+				GREY
+        } = GREY
+
+		OBS_FB_SCAT_REJECTION_LIST
+		[ help = help_multiple_selection ]
+        {
+			&_DUMMY&SCAT_REJECTION_LIST
+        } 
+
+		OBS_FB_SSMI_WATER_PRECIPITABLE
+        {
+				&PARAMSHARE&ONOFF
+        } = ON
+
+		OBS_FB_SSMI_LIQUID_WATER_PATH
+        {
+				&PARAMSHARE&ONOFF
+        } = ON
+
+		OBS_FB_SSMI_TYPE
+        {
+				1DVAR
+				REGRESSION
+        } = 1DVAR
+
+		OBS_FB_SSMI_WIND_STRENGTH
+        {
+				&PARAMSHARE&ONOFF
+        } = ON
+
+		OBS_FB_SSMI_FAILURE_FLAG
+        {
+				&PARAMSHARE&ONOFF
+        } = ON
+
+		OBS_BUFR_SECTION2_USE
+        {
+				&PARAMSHARE&ONOFF
+        } = ON
+
+		OBS_TEXT
+        {
+				&PARAMSHARE&ONOFF
+        } = OFF
+
+} ! end of POBS   
+
diff --git a/share/metview/etc/ObsFilterDef b/share/metview/etc/ObsFilterDef
new file mode 100644
index 0000000..e4d8a21
--- /dev/null
+++ b/share/metview/etc/ObsFilterDef
@@ -0,0 +1,467 @@
+_SUBREQUEST ; Dummy ; dummy
+{
+	OBSERVATION_TYPE
+	{
+		*
+		/
+		ANY - No filtering by type			; ANY	; -1
+
+		LSD - Land surface data				; LSD	; 0
+		SSD - Sea surface data				; SSD	; 1
+		VSNS - Vertical soundings - nonsatellite	; VSNS	; 2
+		VSS - Vertical soundings - satellite		; VSS	; 3
+		SLNS - Single level upper-air - nonsatellite	; SLNS	; 4
+		SLS - Single level upper-air - satellite	; SLS	; 5
+		RD - Radar data					; RD	; 6
+		SF - Synoptic features				; SF	; 7
+		CC - Physical-chemical constituents		; CC	; 8
+		SDS - Surface data - satellite			; SDS	; 12
+		RSM - Radiances - satellite measured		; RSM	; 21
+		OD - Oceanographic data				; OD	; 31
+
+		Z - For other types use numeric code		; HINT	; -99
+	} = ANY
+
+	OBSERVATION_SUBTYPE
+	{
+		*
+		/
+		ANY - No filtering by subtype		; ANY	; -1
+
+		LSD - Synop land 			; S	; 1
+		LSD - Synop record 2 land		; S2	; 2
+		LSD - Synop auto land			; SA	; 3
+		LSD - Synop auto record 2 land		; SA2	; 4
+		LSD - Soil and earth temperature	; SET	; 7
+		LSD - Metar				; METAR	; 140
+
+		SSD - Synop ship abbreviated		; SAB	; 9
+		SSD - Synop ship			; SS	; 11
+		SSD - Synop record 2 ship		; SS2	; 12
+		SSD - Synop auto ship			; SAS	; 13
+		SSD - Synop auto record 2 ship		; SAS2	; 14
+		SSD - SHRED				; SH	; 19
+		SSD - DRIBU SURFACE			; DSU	; 21
+		SSD - BATHY SURFACE			; BSU	; 22
+		SSD - TESAC SURFACE			; TSU	; 23
+
+		SF - STORM				; STOR	; 31
+
+		VSNS - Pilot land			; P	; 91
+		VSNS - Pilot ship			; PS	; 92
+		VSNS - WIND PROFILE			; WP	; 95
+		VSNS - EUROPEAN WIND PROFILE		; EWP	; 96
+		VSNS - EUROPEAN WIND AND TEMPERATURE PROFILE ; EWTP ; 97
+		VSNS - Temp land			; T	; 101
+		VSNS - Temp ship			; TS	; 102
+		VSNS - Temp drop			; TD	; 103
+		VSNS - Rocob land			; R	; 104
+		VSNS - Rocob ship			; RS	; 105
+		VSNS - TEMP MOBILE			; TM	; 106
+		VSNS - CLIMATE TEMP			; CT	; 107
+
+		VSS - High resolution			; HR	; 51
+		VSS - RTOVS				; RTOV	; 53
+		VSS - TOVS1b				; TOVB	; 54
+		VSS - ATOVS				; ATOV	; 55
+		VSS - ATOVS PRODUCTS			; ATOP	; 56
+		VSS - AIRS				; AIRS	; 57
+		VSS - Satem mean temp			; SMT	; 61
+		VSS - Satem water			; SW	; 62
+		VSS - Satem higher level mean layer temperature ; SHL ; 63
+		VSS - SATEM LEVELS MERGED		; SLM	; 65
+		VSS - Mean temp				; MT	; 71
+		VSS - Water				; W	; 72
+		VSS - Higher level			; HL	; 73
+		VSS - TOVS LEVELS MERGED		; TLM	; 75
+
+		VSS - TMI brightness temperatures	; TBT	; 129
+		VSS - TMI Instantaneous 3-D rainfall structure level ; TI3R ; 130
+
+		VSS - RETRIEVED OZONE			; REO3	; 206
+
+#?		CC - SURFACE OZONE			; SO	; 157
+#?		CC - SURFACE OZONE AVERAGED		; SOA	; 158
+#?		CC - OZONE PARTIAL			; OP	; 159
+		CC - OZONE VERTICAL SOUNDING		; OVS	; 162
+
+		DD - PAOBS				; PA	; 164
+
+		SLNS - Codar				; COD	; 141
+		SLNS - Airep				; AIR	; 142
+		SLNS - Colba				; COL	; 143
+		SLNS - AMDAR				; AM	; 144
+		SLNS - ACARS				; AC	; 145
+
+		SLS - Satob section 2			; SAT2	; 82
+		SLS - Satob section 3			; SAT3	; 83
+		SLS - Satob section 4			; SAT4	; 84
+		SLS - Satob section 5			; SAT5	; 85
+		SLS - HIGH RESOLUTION WINDS		; SAT6	; 86
+		SLS - HIGH DENSITY UNIFIED FORMAT SATELLITE WINDS ; SAT7 ; 87
+		SLS - GEOSTATIONARY RADIANCES		; GEOR	; 88
+		SLS - GEOSTATIONARY CLEAR SKY RADIANCES	; GCSR ; 89
+
+		SDS - WAVE SCATTEROMETER		; WAS	; 121
+		SDS - WIND SCATTEROMETER		; WIS	; 122
+		SDS - RADAR ALTIMETER			; RAL	; 123
+		SDS - SEA SURFACE TEMPERATURE		; SST	; 124
+		SDS - REPROCESSED WIND			; RW	; 125
+		SDS - MICROWAVE IMAGES			; SSMI	; 126
+		SDS - SEA SURFACE BRIGHTNESS TEMPERATURE ; SSBT ; 127
+		SDS - TMI BRIGHTNESS TEMPERATURES	; TBT	; 129
+		SDS - TMI INSTANTANEOUS 3-D RAINFALL STRUCTURE ; TI3R ; 130
+		SDS - QUIKSCAT				; QSCA	; 137
+		SDS - QUIKSCAT SEAWINDS			; QSSW	; 138
+		SDS - QUIKSCAT SEAWINDS 50 KM		; QS50	; 139
+
+		OD - Dribu oceanographic		; DO	; 131
+		OD - Bathy oceanographic		; BO	; 132
+		OD - Tesac oceanographic		; TO	; 133
+
+		Z - For other subtypes use numeric code	; HINT	; -99
+
+	} = ANY
+
+
+!	Parameter short hand names starting with  "X" are
+!	non-official names, added here to make ObsFilter
+!	Editor work properly!
+! 970108/vk:
+! - added descriptor numbers in front of parameter names
+! - added descriptor numbers as a new second column
+!  => get rid of shorthand names because there are not names for all params!
+!(after a shiftover period we can remove the third column with shorthand names)
+
+	PARAM
+	{
+        001001 - WMO BLOCK NUMBER ;      001001 ; XWMO_BL ; 001001
+        001002 - WMO STATION NUMBER ;    001002 ; XWMO_ST ; 001002
+        001007 - SATELLITE IDENTIFIER ;  001007 ; XSAT_ID ; 001007
+
+	004053 - Number of days with precipitation equal to or more than 1 mm ; 004053 ; XNDP ; 004053
+
+        010003 - GEOPOTENTIAL ;                  010003 ;   Z ; 010003
+        010004 - PRESSURE ;                      010004 ;   P ; 010004
+        010051 - PRESSURE REDUCED AT SEA LEVEL ; 010051 ;  PS ; 010051
+
+        011001 - WIND DIRECTION ;                011001 ;   D ; 011001
+        011002 - WIND SPEED ;                    011002 ;   F ; 011002
+        011011 - WIND DIRECTION AT 10M ;         011011 ; 10D ; 011011
+        011012 - WIND SPEED AT 10M ;             011012 ; 10F ; 011012
+        011041 - Maximum wind speed in gusts ;   011041 ; XWG ; 011041
+
+        012001 - DRY BULB TEMPERATURE ;               012001 ;       T ; 012001
+        012002 - WET BULB TEMPERATURE ;               012002 ;      TW ; 012002
+        012003 - DEW POINT TEMPERATURE ;              012003 ;      TD ; 012003
+        012004 - DRY BULB TEMPERATURE AT 2M ;         012004 ;      2T ; 012004
+        012005 - WET BULB TEMPERATURE AT 2M ;         012005 ;      2D ; 012005
+        012006 - DEW POINT TEMPERATURE AT 2M ;         012006 ;      DUMMY ; 012006
+        012007 - VIRTUAL TEMPERATURE ;                012007 ;     XVT ; 012007
+	012011 - Maximum temperature - at height and over period specified ; 012011 ; XMXSPEC ; 012011
+	012012 - Minimum temperature - at height and over period specified ; 012012 ; XMNSPEC ; 012012
+	012014 - MAX TEMPERATURE AT 2M PAST 12 HOURS; 012014 ; XMX2T12 ; 012014
+	012015 - MIN TEMPERATURE AT 2M PAST 12 HOURS; 012015 ; XMN2T12 ; 012015
+	012063 - BRIGHTNESS TEMPERATURE; 012063 ; DUMMY  ; 012063
+
+	013003 - RELATIVE HUMIDITY ;                 013003 ;     R ; 013003
+	013004 - Vapour pressure ;                   013004 ;   XVP ; 013004
+        013011 - Total precipitation - total water equivalent ; 013011 ; XTP ; 013011
+        013013 - TOTAL SNOW DEPTH ;                  013013 ;    SD ; 013013
+	013019 - TOTAL PRECIPITATION PAST  1 HOURS ; 013019 ; XTP01 ; 013019
+	013020 - TOTAL PRECIPITATION PAST  3 HOURS ; 013020 ; XTP03 ; 013020
+	013021 - TOTAL PRECIPITATION PAST  6 HOURS ; 013021 ; XTP06 ; 013021
+	013022 - TOTAL PRECIPITATION PAST 12 HOURS ; 013022 ; XTP12 ; 013022
+	013023 - TOTAL PRECIPITATION PAST 24 HOURS ; 013023 ; XTP24 ; 013023
+	013051 - Frequency group - precipitation   ; 013051 ;  XFGP ; 013051
+
+	014031 - Total sunshine - minutes in SYNOP ; 014031 ;  XTSM ; 014031
+	014032 - Total sunshine - hours in CLIMAT ;  014032 ;  XTSH ; 014032
+
+	020001 - HORIZONTAL VISIBILITY ; 020001 ;  XHV ; 020001
+	020002 - VERTICAL VISIBILITY ;   020002 ;  XVV ; 020002
+	020003 - PRESENT WEATHER ;       020003 ;  XPW ; 020003
+	020010 - TOTAL CLOUD COVER ;     020010 ; XTCC ; 020010
+
+	"FOR OTHER PARAMETERS USE BUFR DESCRIPTOR NUMBERS"; 0 ; DUMMY ; 00000
+
+        *
+	}
+
+	LEVEL
+	{
+		1000 ; 1000
+		925  ;  925
+		850  ;  850
+		700  ;  700
+		500  ;  500
+		400  ;  400
+		300  ;  300
+		200  ;  200
+		100  ;  100
+		 70  ;   70
+		 50  ;   50
+		 30  ;   30
+		 10  ;   10
+		*
+	}
+
+	LEVEL_DESCRIPTOR
+	{
+        007001 - HEIGHT OF STATION;     007001 ; DUMMY ; 001001
+        007002 - HEIGHT;    007002 ; DUMMY ; 001002
+        007003 - GEOPOTENTIAL;  007003 ; DUMMY ; 007003
+	007004 - PRESSURE;  007004 ; DUMMY ; 007004
+	007006 - HEIGHT ABOVE STATION ;  007006 ; DUMMY ; 001006
+	007061 - DEPTH BELOW LAND SURFACE;  007061 ; DUMMY ; 007061
+	007062 - DEPTH BELOW SEA SURFACE ;  007062 ; DUMMY ; 007062
+	005042 - CHANNEL NUMBER ;  005042 ; DUMMY ; 005042
+	002150 - ATOVS-AVHRR CHANNEL NUMBER ; 002150; DUMMY ;  002150
+	*
+	}
+
+
+}
+
+
+
+OBSFILTER; Metview; Specific Application
+{
+
+	DATA [
+			interface		= icon,
+			class			= BUFR,
+			exclusive		= true,
+
+			help            = help_data,
+			help_directory  = '/Metview/Defaults',
+			help_name       = Data for Observation filtering,
+			help_class      = RETRIEVE,
+			help_definition = ( RETRIEVE, TYPE = OB, DATE = '-2' )
+		]
+
+	{
+		@
+	}
+
+	OUTPUT
+	{
+		Bufr file                    ; BUFR         ; 0
+		Geographical points          ; GEOPOINTS    ; 1
+		Geographical polar vectors   ; POLAR_VECTOR ; 2
+		Geographical X Y vectors     ; XY_VECTOR    ; 3
+		CSV - Comma separated values ; CSV          ; 4
+	} = BUFR
+
+	PARAMETER
+	[ help = help_multiple_selection, exclusive = True ]
+	{
+		&_SUBREQUEST&PARAM
+		/
+	} = 012004
+
+	MISSING_DATA
+	{
+		IGNORE
+		INCLUDE
+	} = IGNORE
+
+	MISSING_DATA_VALUE
+	{
+		*
+	} = 0	
+
+	LEVEL
+	{
+		Surface ; SURFACE
+		Single level ; SINGLE
+		Layer ; THICKNESS
+		Occurrence ; OCCURRENCE
+		Descriptor Value ; DESCRIPTOR_VALUE
+		Descriptor Range ; DESCRIPTOR_RANGE
+	} = SURFACE
+
+	LEVEL_DESCRIPTOR
+	[ help = help_multiple_selection, exclusive = True ]
+	{
+		&_SUBREQUEST&LEVEL_DESCRIPTOR
+	} =007004
+
+	FIRST_LEVEL
+	[ help = help_multiple_selection, exclusive = True ]
+	{
+		&_SUBREQUEST&LEVEL
+	} = 30
+
+	SECOND_LEVEL
+	[ exclusive = True, help = help_multiple_selection ]
+	{
+		&_SUBREQUEST&LEVEL
+	} = 10
+
+	OCCURRENCE_INDEX
+	{
+		*
+	} = 1
+
+!	FILTERING_STARTS_HERE
+!	{
+!		Filtering Starts Here ; DUMMY1
+!		Input Output Above ; DUMMY2
+!	} = DUMMY1
+
+	OBSERVATION_TYPES
+	[ help = help_multiple_selection ]
+	{
+		&_SUBREQUEST&OBSERVATION_TYPE
+	} = -1
+
+	OBSERVATION_SUBTYPES
+	[ help = help_multiple_selection ]
+	{
+		&_SUBREQUEST&OBSERVATION_SUBTYPE
+	} = -1
+
+	DATE_AND_TIME_FROM
+	{
+		METADATA
+		DATA
+	} = METADATA
+
+	DATE
+	{
+		*
+		ANY ; ANY
+	} = ANY
+
+	TIME
+	{
+		*
+		ANY ; ANY
+	} = ANY
+
+	RESOLUTION_IN_MINS
+	{
+		*
+	} = 0
+
+
+	WMO_BLOCKS
+	{
+		ANY ; ANY
+		*
+		/
+	} = ANY
+
+	WMO_STATIONS
+	{
+		ANY ; ANY
+		*
+		/
+	} = ANY
+
+	LOCATION_FILTER
+	{
+		No Location Filter  ; NONE
+		AREA  ; AREA
+		CROSS SECTION LINE ; LINE
+	} = NONE
+
+	AREA
+	[
+		help = help_input,
+		input_type = area,
+		input_window = '/Metview/Defaults/Input Window'
+	]
+	{
+		*
+		/
+	} = 60/-12/50/3
+
+	LINE
+	[
+		help = help_input,
+		input_type = line,
+		input_window = '/Metview/Defaults/Input Window'
+	]
+	{
+		*
+		/
+	} = 40/-5/60/25
+
+	DELTA_IN_KM
+	{
+		*
+	} = 50
+
+	CUSTOM_FILTER
+	{
+		No Custom Filter ; NONE
+		Filter by Value ; VALUE
+		Filter by Range ; RANGE
+		Filter by Exclude Range ; EXCLUDE
+	} = NONE
+
+	CUSTOM_PARAMETER
+	[ help = help_multiple_selection, exclusive = True ]
+	{
+		&_SUBREQUEST&PARAM
+	} = 01007
+
+	CUSTOM_VALUES
+	{
+		*
+		/
+	} = 200/203
+
+	FAIL_ON_ERROR
+	{
+		YES
+		NO
+	} = YES
+
+	FAIL_ON_EMPTY_OUTPUT
+	{
+		YES
+		NO
+	} = NO
+
+!
+!	TESTPARAM
+!	{
+!		PARAM 1	; P1
+!		PARAM 2	; P2
+!		PARAM 3	; P3
+!		PARAM 4	; P5
+!		PARAM 5	; P6
+!	} = P6
+!
+!	TESTUNIT {
+!		Unit1; u1 ; 10
+!		Unit2; u2 ; 20
+!		Unit3; u3 ; 30
+!	} = 10
+!
+!	TESTSIZE {
+!		*
+!	} = 10
+!
+!	TESTTITLE {
+!		@
+!	} = "Some Test Title"
+!
+!	TESTLIST1
+!	{
+!		A
+!		B
+!		C
+!		/
+!	} = A/B
+!
+!	TESTLIST2
+!	{
+!		*
+!		/
+!	} = 1/2/3
+
+}
diff --git a/share/metview/etc/ObsFilterRules b/share/metview/etc/ObsFilterRules
new file mode 100644
index 0000000..1f8834c
--- /dev/null
+++ b/share/metview/etc/ObsFilterRules
@@ -0,0 +1,65 @@
+%if TIME = ANY %and DATE <> ANY %then
+   %set TIME = 12
+
+%if TIME = ANY %then
+   %unset RESOLUTION_IN_MINS
+
+%if LOCATION_FILTER = NONE %then
+   %unset AREA
+   %unset LINE
+   %unset DELTA_IN_KM
+
+%if LOCATION_FILTER = AREA %then
+   %unset LINE
+   %unset DELTA_IN_KM
+
+%if LOCATION_FILTER = LINE %then
+   %unset AREA
+
+%if CUSTOM_FILTER = NONE %then
+   %unset CUSTOM_PARAMETER
+   %unset CUSTOM_VALUES
+
+#-- OUTPUT=0:  0=BUFR
+#-- OUTPUT<>0: 1=GEOPOINTS, 2=POLAR_VECTOR, 3=XY_VECTOR, 4=CSV
+
+%if OUTPUT = 0 %then
+   %unset PARAMETER
+   %unset MISSING_DATA
+   %unset MISSING_DATA_VALUE
+   %unset LEVEL
+   %unset LEVEL_DESCRIPTOR
+   %unset FIRST_LEVEL
+   %unset SECOND_LEVEL
+   %unset OCCURRENCE_INDEX
+
+%if (OUTPUT <> 0 ) %and MISSING_DATA = IGNORE %then
+   %unset MISSING_DATA_VALUE
+
+%if (OUTPUT <> 0) %and LEVEL = SURFACE %then
+   %unset LEVEL_DESCRIPTOR
+   %unset FIRST_LEVEL
+   %unset SECOND_LEVEL
+   %unset OCCURRENCE_INDEX
+
+%if (OUTPUT <> 0) %and LEVEL = SINGLE %then
+   %unset LEVEL_DESCRIPTOR
+   %unset SECOND_LEVEL
+   %unset OCCURRENCE_INDEX
+
+%if (OUTPUT <> 0) %and LEVEL = THICKNESS %then
+    %unset LEVEL_DESCRIPTOR
+    %unset OCCURRENCE_INDEX
+
+%if (OUTPUT <> 0) %and LEVEL = OCCURRENCE %then
+   %unset LEVEL_DESCRIPTOR
+   %unset FIRST_LEVEL
+   %unset SECOND_LEVEL
+
+%if (OUTPUT <> 0) %and LEVEL = DESCRIPTOR_VALUE %then
+   %unset OCCURRENCE_INDEX 
+   %unset SECOND_LEVEL
+
+%if (OUTPUT <> 0) %and LEVEL = DESCRIPTOR_RANGE %then
+   %unset OCCURRENCE_INDEX 
+
diff --git a/share/metview/etc/ObsRules b/share/metview/etc/ObsRules
new file mode 100755
index 0000000..23f6de9
--- /dev/null
+++ b/share/metview/etc/ObsRules
@@ -0,0 +1,315 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+%if OBS_FB = OFF %and OBS_CONFIDENCE_CHECK = OFF %then
+        %unset OBS_CONFIDENCE_PARAMETER
+        %unset OBS_CONFIDENCE_LEVEL
+ 
+%if OBS_DATE_CHECK = OFF %then
+        %unset OBS_DATE
+        %unset OBS_DATE_TOLERANCE
+ 
+%if OBS_TIME_CHECK = OFF %then
+        %unset OBS_TIME
+        %unset OBS_TIME_TOLERANCE
+ 
+%if OBS_IDENTIFICATION = OFF %then
+        %unset OBS_IDENTIFICATION_COLOUR
+        %unset OBS_IDENTIFICATION_TYPE
+ 
+%if OBS_STATION_RING = OFF %then %unset OBS_STATION_RING_COLOUR
+
+%if OBS_WIND = OFF %then 
+		%unset OBS_WIND_COLOUR
+		%unset OBS_WIND_FLAG_STYLE
+		
+%if OBS_WIND = OFF %and OBS_THERMAL_WIND = OFF %then 
+		%unset OBS_WIND_FLAG_THICKNESS
+	
+
+%if OBS_PRESSURE = OFF %and OBS_UPPER_AIR_PRESSURE = OFF %then %unset OBS_PRESSURE_COLOUR
+%if OBS_TEMPERATURE = OFF %then %unset OBS_TEMPERATURE_COLOUR
+%if OBS_SEA_SURFACE_TEMPERATURE = OFF %then %unset OBS_SEA_SURFACE_TEMP_COLOUR
+%if OBS_PRESSURE_TENDENCY = OFF %then %unset OBS_PRESSURE_TENDENCY_COLOUR
+%if OBS_PRESENT_WEATHER = OFF %then %unset OBS_PRESENT_WEATHER_COLOUR
+%if OBS_PAST_WEATHER = OFF %then %unset OBS_PAST_WEATHER_COLOUR
+%if OBS_VISIBILITY = OFF %then %unset OBS_VISIBILITY_COLOUR
+%if OBS_DEWPOINT = OFF %then %unset OBS_DEWPOINT_COLOUR
+%if OBS_TIME_PLOT = OFF %then %unset OBS_TIME_PLOT_COLOUR
+%if OBS_CLOUD = OFF %then %unset OBS_CLOUD_COLOUR
+%if OBS_LOW_CLOUD = OFF %then %unset OBS_LOW_CLOUD_COLOUR
+%if OBS_MEDIUM_CLOUD = OFF %then %unset OBS_MEDIUM_CLOUD_COLOUR
+%if OBS_HIGH_CLOUD = OFF %then %unset OBS_HIGH_CLOUD_COLOUR
+%if OBS_CLOUD_8_GROUPS = OFF %then %unset OBS_CLOUD_8_GROUPS_COLOUR
+
+%if OBS_THETA = OFF %then 
+        %unset OBS_THETA_TYPE
+        %unset OBS_THETA_COLOUR
+
+%if OBS_THICKNESS = OFF %then
+        %unset OBS_THICKNESS_COLOUR
+
+%if OBS_WATER_PRECIPITABLE = OFF %then %unset OBS_WATER_PRECIPITABLE_COLOUR
+%if OBS_SHIP_DIRECTION = OFF %then %unset OBS_SHIP_DIRECTION_COLOUR
+%if OBS_SHIP_SPEED = OFF %then %unset OBS_SHIP_SPEED_COLOUR
+%if OBS_WAVES = OFF %then %unset OBS_WAVES_COLOUR
+%if OBS_HEIGHT = OFF %then %unset OBS_HEIGHT_COLOUR
+%if OBS_SOIL_TEMPERATURE_LEVEL_1 = OFF %and OBS_SOIL_TEMPERATURE_LEVEL_2 = OFF %and OBS_SOIL_TEMPERATURE_LEVEL_3 = OFF %and OBS_SOIL_TEMPERATURE_LEVEL_4 = OFF %then 
+		%unset OBS_SOIL_TEMPERATURE_COLOUR
+		%unset OBS_STATION_HEIGHT
+		%unset OBS_STATION_HEIGHT_COLOUR
+
+%if OBS_STATION_HEIGHT = OFF %then %unset OBS_STATION_HEIGHT_COLOUR
+
+%if OBS_POSITION_ONLY = ON %then
+        %unset OBS_STATION_RING
+        %unset OBS_WIND
+        %unset OBS_PRESSURE
+        %unset OBS_UPPER_AIR_PRESSURE
+        %unset OBS_TEMPERATURE
+        %unset OBS_SEA_SURFACE_TEMPERATURE
+        %unset OBS_TIME_PLOT
+        %unset OBS_PRESSURE_TENDENCY
+        %unset OBS_PRESENT_WEATHER 
+        %unset OBS_PAST_WEATHER
+        %unset OBS_VISIBILITY
+        %unset OBS_DEWPOINT
+        %unset OBS_CLOUD
+        %unset OBS_LOW_CLOUD
+        %unset OBS_MEDIUM_CLOUD
+        %unset OBS_HIGH_CLOUD
+        %unset OBS_CLOUD_8_GROUPS
+        %unset OBS_LEVEL
+        %unset OBS_LEVEL_TOLERANCE
+		%unset OBS_THERMAL_WIND
+		%unset OBS_THERMAL_WIND_LINE_STYLE
+        %unset OBS_THETA
+        %unset OBS_THETA_TYPE
+        %unset OBS_THICKNESS
+        %unset OBS_LEVEL_2
+        %unset OBS_SATEM_TEMPERATURE
+        %unset OBS_WATER_PRECIPITABLE
+        %unset OBS_SHIP_DIRECTION
+        %unset OBS_SHIP_SPEED
+        %unset OBS_WAVES
+        %unset OBS_HEIGHT
+        %unset OBS_STATION_RING_COLOUR
+        %unset OBS_WIND_COLOUR
+        %unset OBS_WIND_FLAG_THICKNESS
+        %unset OBS_WIND_FLAG_STYLE
+        %unset OBS_PRESSURE_COLOUR
+        %unset OBS_TEMPERATURE_COLOUR
+        %unset OBS_SEA_SURFACE_TEMP_COLOUR
+        %unset OBS_TIME_PLOT_COLOUR
+        %unset OBS_PRESSURE_TENDENCY_COLOUR
+        %unset OBS_PRESENT_WEATHER_COLOUR
+        %unset OBS_PAST_WEATHER_COLOUR
+        %unset OBS_VISIBILITY_COLOUR
+        %unset OBS_DEWPOINT_COLOUR
+        %unset OBS_CLOUD_COLOUR
+        %unset OBS_LOW_CLOUD_COLOUR
+        %unset OBS_MEDIUM_CLOUD_COLOUR
+        %unset OBS_HIGH_CLOUD_COLOUR
+        %unset OBS_CLOUD_8_GROUPS_COLOUR
+        %unset OBS_THETA_COLOUR
+        %unset OBS_THICKNESS_COLOUR
+        %unset OBS_WATER_PRECIPITABLE_COLOUR
+        %unset OBS_SHIP_DIRECTION_COLOUR
+        %unset OBS_SHIP_SPEED_COLOUR
+        %unset OBS_WAVES_COLOUR
+        %unset OBS_HEIGHT_COLOUR
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_1
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_2
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_3
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_4
+		%unset OBS_SOIL_TEMPERATURE_COLOUR
+		%unset OBS_STATION_HEIGHT
+		%unset OBS_STATION_HEIGHT_COLOUR
+
+%if OBS_FB = OFF %then
+        %unset OBS_FB_TYPE
+        %unset OBS_FB_LEVEL
+        %unset OBS_FB_LEVEL_2
+        %unset OBS_FB_LEVEL_TOLERANCE_ABOVE
+        %unset OBS_FB_LEVEL_TOLERANCE_BELOW
+		%unset OBS_FB_SOURCE
+        %unset OBS_FB_SOURCE_TYPE
+		%unset OBS_FB_DEPARTURES
+		%unset OBS_FB_SUBSTITUTES
+        %unset OBS_FB_MIN_ERROR_FLAG
+        %unset OBS_FB_ERROR_FLAG0_COLOUR
+        %unset OBS_FB_ERROR_FLAG1_COLOUR
+        %unset OBS_FB_ERROR_FLAG2_COLOUR
+        %unset OBS_FB_ERROR_FLAG3_COLOUR
+		%unset OBS_FB_WIND
+        %unset OBS_FB_WIND_FLAG_LENGTH
+		%unset OBS_FB_TEMPERATURE
+		%unset OBS_FB_HEIGHT
+		%unset OBS_FB_PRESSURE
+		%unset OBS_FB_RELATIVE_HUMIDITY
+		%unset OBS_FB_SPECIFIC_HUMIDITY
+		%unset OBS_FB_LEGEND
+		%unset OBS_FB_DEPARTURES_TYPE
+        %unset OBS_FB_RADIANCES
+        %unset OBS_FB_STATION_RING_HEIGHT
+        %unset OBS_FB_SCATTEROMETER_WINDS
+        %unset OBS_FB_SCAT_CLOSEST_TO
+
+%if OBS_FB = OFF %then
+        %unset OBS_FB_SSMI_WATER_PRECIPITABLE
+        %unset OBS_FB_SSMI_LIQUID_WATER_PATH
+        %unset OBS_FB_SSMI_TYPE
+        %unset OBS_FB_SSMI_WIND_STRENGTH
+        %unset OBS_FB_SSMI_FAILURE_FLAG
+ 
+%if OBS_FB_SOURCE = OFF %then
+        %unset OBS_FB_SOURCE_TYPE
+
+%if OBS_FB_DEPARTURES = OFF %then
+		%unset OBS_FB_DEPARTURES_TYPE
+
+%if OBS_FB_WIND = OFF %then
+        %unset OBS_FB_FLAG_LENGTH
+
+%if OBS_FB <> OFF %then
+		%unset OBS_CONFIDENCE_CHECK
+        %unset OBS_CONFIDENCE_PARAMETER
+        %unset OBS_CONFIDENCE_LEVEL
+        %unset OBS_STATION_RING
+        %unset OBS_WIND
+        %unset OBS_PRESSURE
+        %unset OBS_UPPER_AIR_PRESSURE
+        %unset OBS_TEMPERATURE
+        %unset OBS_SEA_SURFACE_TEMPERATURE
+        %unset OBS_TIME_PLOT
+        %unset OBS_PRESSURE_TENDENCY
+        %unset OBS_PRESENT_WEATHER 
+        %unset OBS_PAST_WEATHER
+        %unset OBS_VISIBILITY
+        %unset OBS_DEWPOINT
+        %unset OBS_CLOUD
+        %unset OBS_LOW_CLOUD
+        %unset OBS_MEDIUM_CLOUD
+        %unset OBS_HIGH_CLOUD
+        %unset OBS_CLOUD_8_GROUPS
+        %unset OBS_LEVEL
+        %unset OBS_LEVEL_TOLERANCE
+		%unset OBS_THERMAL_WIND
+		%unset OBS_THERMAL_WIND_LINE_STYLE
+        %unset OBS_THETA
+        %unset OBS_THETA_TYPE
+        %unset OBS_THICKNESS
+        %unset OBS_LEVEL_2
+        %unset OBS_SATEM_TEMPERATURE
+        %unset OBS_WATER_PRECIPITABLE
+        %unset OBS_SHIP_DIRECTION
+        %unset OBS_SHIP_SPEED
+        %unset OBS_WAVES
+        %unset OBS_HEIGHT
+        %unset OBS_STATION_RING_COLOUR
+        %unset OBS_WIND_COLOUR
+        %unset OBS_WIND_FLAG_THICKNESS
+        %unset OBS_WIND_FLAG_STYLE
+        %unset OBS_PRESSURE_COLOUR
+        %unset OBS_TEMPERATURE_COLOUR
+        %unset OBS_SEA_SURFACE_TEMP_COLOUR
+        %unset OBS_TIME_PLOT_COLOUR
+        %unset OBS_PRESSURE_TENDENCY_COLOUR
+        %unset OBS_PRESENT_WEATHER_COLOUR
+        %unset OBS_PAST_WEATHER_COLOUR
+        %unset OBS_VISIBILITY_COLOUR
+        %unset OBS_DEWPOINT_COLOUR
+        %unset OBS_CLOUD_COLOUR
+        %unset OBS_LOW_CLOUD_COLOUR
+        %unset OBS_MEDIUM_CLOUD_COLOUR
+        %unset OBS_HIGH_CLOUD_COLOUR
+        %unset OBS_CLOUD_8_GROUPS_COLOUR
+        %unset OBS_THETA_COLOUR
+        %unset OBS_THICKNESS_COLOUR
+        %unset OBS_WATER_PRECIPITABLE_COLOUR
+        %unset OBS_SHIP_DIRECTION_COLOUR
+        %unset OBS_SHIP_SPEED_COLOUR
+        %unset OBS_WAVES_COLOUR
+        %unset OBS_HEIGHT_COLOUR
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_1
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_2
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_3
+		%unset OBS_SOIL_TEMPERATURE_LEVEL_4
+		%unset OBS_SOIL_TEMPERATURE_COLOUR
+		%unset OBS_STATION_HEIGHT
+		%unset OBS_STATION_HEIGHT_COLOUR
+
+%if OBS_FB = OFF %or  OBS_FB_RADIANCES = OFF %then
+        %unset OBS_FB_RADIANCES_TYPE
+        %unset OBS_FB_RADIANCES_CHANNEL_NUMBER
+        %unset OBS_FB_RADIANCES_CHANNEL_PLOT
+        %unset OBS_FB_RADIANCES_DEPARTURES
+
+%if OBS_FB <> OFF %and OBS_FB_RADIANCES = ON %then
+		%unset OBS_FB_LEVEL
+		%unset OBS_FB_LEVEL_2
+		%unset OBS_FB_LEVEL_TOLERANCE_ABOVE
+		%unset OBS_FB_LEVEL_TOLERANCE_BELOW
+		%unset OBS_FB_DEPARTURES
+		%unset OBS_FB_DEPARTURES_TYPE
+		%unset OBS_FB_SUBSTITUTES
+		%unset OBS_FB_HEIGHT
+		%unset OBS_FB_PRESSURE
+		%unset OBS_FB_RELATIVE_HUMIDITY
+		%unset OBS_FB_SPECIFIC_HUMIDITY
+		%unset OBS_FB_TEMPERATURE
+		%unset OBS_FB_WIND
+		%unset OBS_FB_WIND_FLAG_LENGTH
+
+%if OBS_FB = OFF %or  OBS_FB_RADIANCES = OFF %or OBS_FB_RADIANCES_DEPARTURES = OFF %then
+        %unset OBS_FB_RADIANCES_DEPARTURES_TYPE
+
+%if OBS_FB_RADIANCES_TYPE = '1DVAR' %and ( OBS_FB_RADIANCES_DEPARTURES_TYPE = 'OBS-FG2' %or OBS_FB_RADIANCES_DEPARTURES_TYPE = 'OBS-FG3' %or OBS_FB_RADIANCES_DEPARTURES_TYPE = 'OBS-3V' ) %then
+        %error 'Illegal value for 1DVAR Obs_Fb_Radiances_Departures_Type'
+
+%if OBS_FB_RADIANCES_TYPE = '3DVAR' %and ( OBS_FB_RADIANCES_DEPARTURES_TYPE = BIAS %orOBS_FB_RADIANCES_DEPARTURES_TYPE = STDEV ) %then
+        %error 'Illegal value for 3DVAR Obs_Fb_Radiances_Departures_Type'
+
+%if OBS_FB = OFF %or OBS_FB_SCATTEROMETER_WINDS = OFF  %then
+		%unset OBS_FB_SCAT_CLOSEST_TO
+		%unset OBS_FB_SCAT_AMBIGUITIES
+		%unset OBS_FB_SCAT_THINNED_ONLY
+		%unset OBS_FB_SCAT_SWEET_SPOTS_ONLY
+		%unset OBS_FB_SCAT_ALT_COLORING
+		%unset OBS_FB_SCAT_REJECTION_LIST
+
+%if OBS_THERMAL_WIND = OFF %then
+		%unset OBS_THERMAL_WIND_LINE_STYLE
+#		%unset OBS_THERMAL_WIND_TYPE
+
+%if OBS_FB_DEPARTURES = ON %then
+		%unset OBS_FB_SCAT_CLOSEST_TO
diff --git a/share/metview/etc/OverlayControl b/share/metview/etc/OverlayControl
new file mode 100644
index 0000000..b4c09bd
--- /dev/null
+++ b/share/metview/etc/OverlayControl
@@ -0,0 +1,51 @@
+OVERLAY_CONTROL
+[
+     interface       = icon,
+     class           = OVERLAY_CONTROL,
+     exclusive       = true,
+     help            = help_data,
+     help_directory  = '/System/Defaults',
+     help_name       = Overlay Control,
+     help_class      = OVERLAY_CONTROL,
+     help_definition = (OVERLAY_CONTROL)
+]
+{
+     @
+}
+
+#The above parameters are obsoletes (Jan/2002), but
+#they are kept due to backwards compatibility
+	MATCH_DATE
+	[ visible = false ]
+	{
+		YES
+		NO
+	} = YES
+
+	MATCH_TIME
+	[ visible = false ]
+	{
+		YES
+		NO
+	} = YES
+
+	MATCH_LEVEL
+	[ visible = false ]
+	{
+		YES
+		NO
+	} = NO
+
+	MATCH_AREA
+	[ visible = false ]
+	{
+		YES
+		NO
+	} = NO
+
+	MATCH_VERTICAL_AXIS
+	[ visible = false ]
+	{
+		YES
+		NO
+	} = YES
diff --git a/share/metview/etc/OverlayControlDef b/share/metview/etc/OverlayControlDef
new file mode 100644
index 0000000..11112c0
--- /dev/null
+++ b/share/metview/etc/OverlayControlDef
@@ -0,0 +1,44 @@
+OVERLAY_CONTROL ; Plot Mod Icon; Metview
+{
+	OVERLAY_MODE
+	{
+		CHECK_SETTINGS
+                ALWAYS_OVERLAY 
+                NEVER_OVERLAY
+        } = CHECK_SETTINGS
+
+	OVERLAY_DATE
+	{ 
+		ON
+		OFF
+	} = ON
+
+	OVERLAY_TIME { 
+		ON
+		OFF
+	} = ON
+
+	OVERLAY_LEVEL {
+		ON
+		OFF
+	} = OFF
+
+	OVERLAY_AREA {
+		ON
+		OFF
+	} = OFF
+
+	OBS_GROUPING_TIME_FROM {
+		METADATA
+		DATA
+	} = METADATA
+
+	OBS_GROUPING_PERIOD {
+		@
+	} = 6
+
+	OBS_GROUPING_PERIOD_START_MIN {
+		@
+	} = 1
+
+}
diff --git a/share/metview/etc/OverlayControlRules b/share/metview/etc/OverlayControlRules
new file mode 100644
index 0000000..83be6c3
--- /dev/null
+++ b/share/metview/etc/OverlayControlRules
@@ -0,0 +1,47 @@
+%if OVERLAY_MODE <> CHECK_SETTINGS %then
+        %unset OVERLAY_DATE
+        %unset OVERLAY_TIME
+        %unset OVERLAY_LEVEL
+        %unset OVERLAY_AREA
+
+!The above parameters are obsoletes. They are kept for
+!backwards compatibility
+! ***** Date
+%if MATCH_DATE <> YES %then
+	%unset MATCH_DATE
+	%warning "Parameter MATCH_DATE is obsolete"
+
+%if MATCH_DATE = YES %then
+	%unset MATCH_DATE
+
+! ***** Time
+%if MATCH_TIME <> YES %then
+	%unset MATCH_TIME
+	%warning "Parameter MATCH_TIME is obsolete"
+
+%if MATCH_TIME = YES %then
+	%unset MATCH_TIME
+
+! ***** Level
+%if MATCH_LEVEL <> NO %then
+	%unset MATCH_LEVEL
+	%warning "Parameter MATCH_LEVEL is obsolete"
+
+%if MATCH_LEVEL = NO %then
+	%unset MATCH_LEVEL
+
+! ***** Area
+%if MATCH_AREA <> NO %then
+	%unset MATCH_AREA
+	%warning "Parameter MATCH_AREA is obsolete"
+
+%if MATCH_AREA = NO %then
+	%unset MATCH_AREA
+
+! ***** Vertical Axis
+%if MATCH_VERTICAL_AXIS <> YES %then
+	%unset MATCH_VERTICAL_AXIS
+	%warning "Parameter MATCH_VERTICAL_AXIS is obsolete"
+
+%if MATCH_VERTICAL_AXIS = YES %then
+	%unset MATCH_VERTICAL_AXIS
diff --git a/share/metview/etc/PDFOutputDef b/share/metview/etc/PDFOutputDef
new file mode 100644
index 0000000..98104fc
--- /dev/null
+++ b/share/metview/etc/PDFOutputDef
@@ -0,0 +1,82 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+PDFOUTPUT; Magics; Automatically generated
+{
+	OUTPUT_TITLE
+	{
+		@
+	} = MAGICS++ PLOT
+	OUTPUT_WIDTH
+	{
+		*
+	} = 800
+	OUTPUT_RESOLUTION
+	{
+		*
+	} = 300
+	OUTPUT_NAME
+	{
+		@
+	} = ''
+	OUTPUT_NAME_FIRST_PAGE_NUMBER
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_FULLNAME
+	{
+		@
+	} = ''
+	OUTPUT_LEGACY_NAME
+	{
+		@
+	} = ''
+	OUTPUT_FILE_MINIMAL_WIDTH
+	{
+		*
+	} = 1
+	OUTPUT_FILE_SEPARATOR
+	{
+		@
+	} = '.'
+	OUTPUT_DEBUG
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST_NAME
+	{
+		@
+	} = MAGICS_OUTPUTS.LST
+
+	OUTPUT_CAIRO_TRANSPARENT_BACKGROUND
+	{
+		@
+	} = OFF
+	OUTPUT_CAIRO_ANTIALIAS
+	{
+		@
+	} = ON
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/PNGOutputDef b/share/metview/etc/PNGOutputDef
new file mode 100644
index 0000000..8467ea0
--- /dev/null
+++ b/share/metview/etc/PNGOutputDef
@@ -0,0 +1,82 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+PNGOUTPUT; Magics; Automatically generated
+{
+	OUTPUT_TITLE
+	{
+		@
+	} = MAGICS++ PLOT
+	OUTPUT_WIDTH
+	{
+		*
+	} = 800
+	OUTPUT_RESOLUTION
+	{
+		*
+	} = 300
+	OUTPUT_NAME
+	{
+		@
+	} = ''
+	OUTPUT_NAME_FIRST_PAGE_NUMBER
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_FULLNAME
+	{
+		@
+	} = ''
+	OUTPUT_LEGACY_NAME
+	{
+		@
+	} = ''
+	OUTPUT_FILE_MINIMAL_WIDTH
+	{
+		*
+	} = 1
+	OUTPUT_FILE_SEPARATOR
+	{
+		@
+	} = '.'
+	OUTPUT_DEBUG
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST_NAME
+	{
+		@
+	} = MAGICS_OUTPUTS.LST
+
+	OUTPUT_CAIRO_TRANSPARENT_BACKGROUND
+	{
+		@
+	} = OFF
+	OUTPUT_CAIRO_ANTIALIAS
+	{
+		@
+	} = ON
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/PSOutputDef b/share/metview/etc/PSOutputDef
new file mode 100644
index 0000000..e9bff62
--- /dev/null
+++ b/share/metview/etc/PSOutputDef
@@ -0,0 +1,87 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+PSOUTPUT; Magics; Automatically generated
+{
+	OUTPUT_TITLE
+	{
+		@
+	} = MAGICS++ PLOT
+	OUTPUT_WIDTH
+	{
+		*
+	} = 800
+	OUTPUT_RESOLUTION
+	{
+		*
+	} = 300
+	OUTPUT_NAME
+	{
+		@
+	} = ''
+	OUTPUT_NAME_FIRST_PAGE_NUMBER
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_FULLNAME
+	{
+		@
+	} = ''
+	OUTPUT_LEGACY_NAME
+	{
+		@
+	} = ''
+	OUTPUT_FILE_MINIMAL_WIDTH
+	{
+		*
+	} = 1
+	OUTPUT_FILE_SEPARATOR
+	{
+		@
+	} = '.'
+	OUTPUT_DEBUG
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST_NAME
+	{
+		@
+	} = MAGICS_OUTPUTS.LST
+
+	OUTPUT_PS_COLOUR_MODEL
+	{
+		@
+	} = CMYK
+	OUTPUT_PS_SCALE
+	{
+		*
+	} = 1.0
+	OUTPUT_PS_SPLIT
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/PercentileDef b/share/metview/etc/PercentileDef
new file mode 100755
index 0000000..6c33ab7
--- /dev/null
+++ b/share/metview/etc/PercentileDef
@@ -0,0 +1,30 @@
+PERCENTILE; Percentile Application
+{
+	SOURCE
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,  
+					 GRID = 1.5/1.5 )  ]
+	{ @ / }
+
+	PERCENTILES
+	{
+		*
+		/
+	} = 10.0
+
+	INTERPOLATION
+	{
+		NEAREST_NEIGHBOUR
+		LINEAR
+	} = NEAREST_NEIGHBOUR
+}
diff --git a/share/metview/etc/PercentileRules b/share/metview/etc/PercentileRules
new file mode 100755
index 0000000..e69de29
diff --git a/share/metview/etc/PlotPageDef b/share/metview/etc/PlotPageDef
new file mode 100644
index 0000000..34dcf10
--- /dev/null
+++ b/share/metview/etc/PlotPageDef
@@ -0,0 +1,144 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PLOT_PAGE ; Page for PlotMod ; Metview
+{
+
+	TOP 
+		[ label = 'Top ( Percent of the Page )' ]
+	{
+		*
+	} = 0
+
+	BOTTOM 
+		[ label = 'Bottom ( Percent of the Page )' ]
+	{
+		*
+	} = 100
+
+	LEFT 
+		[ label = 'Left ( Percent of the Page )' ]
+	{
+		*
+	} = 0
+
+	RIGHT 
+		[ label = 'Right ( Percent of the Page )' ]
+	{
+		*
+	} = 100
+
+	ROWS {
+		1
+		2
+		3
+		4
+		5
+	} = 1
+
+	COLUMNS {
+		1
+		2
+		3
+		4
+		5
+	} = 1
+
+	PAGE_X_GAP
+		[ label = 'Percent of the Page' ]
+	{
+		*
+	} = 0
+
+	PAGE_Y_GAP
+		[ label = 'Percent of the Page' ]
+	{
+		*
+	} = 0
+
+
+	VIEW
+	[
+        interface       = icon,
+        class           = MXSECTVIEW/MAPVIEW/GEOVIEW/MVERTPROFVIEW/MAVERAGEVIEW,
+        exclusive       = true,
+        help            = help_data,
+        help_directory  = '/System/Defaults',
+        help_name       = View For Plot Page,
+        help_class      = GEOVIEW,
+        help_definition = (GEOVIEW)
+	]
+   	{
+    	@
+		/
+    	} 
+
+	SUB_PAGES 
+	[
+	        interface       = icon,
+        	class           = PLOT_SUBPAGE,
+	        exclusive       = false,
+        	help            = help_data,
+	        help_directory  = '/System/Defaults',
+        	help_name       = Embedded subpage,
+	        help_class      = PLOT_SUBPAGE,
+	        help_icon       = PLOTSUBPAGE,
+        	help_definition = (PLOT_SUBPAGE)
+	]
+	{
+		@
+		/
+	}
+
+
+}
diff --git a/share/metview/etc/PlotPageRules b/share/metview/etc/PlotPageRules
new file mode 100644
index 0000000..36b9008
--- /dev/null
+++ b/share/metview/etc/PlotPageRules
@@ -0,0 +1,9 @@
+!%if FRAME = OFF %then
+!	 %unset FRAME_COLOUR
+!	 %unset FRAME_LINE_STYLE
+!	 %unset FRAME_THICKNESS
+
+%if SUB_PAGE_FRAME = OFF %then
+	 %unset SUB_PAGE_FRAME_COLOUR
+	 %unset SUB_PAGE_FRAME_LINE_STYLE
+	 %unset SUB_PAGE_FRAME_THICKNESS
diff --git a/share/metview/etc/PlotSubPageDef b/share/metview/etc/PlotSubPageDef
new file mode 100644
index 0000000..7c13270
--- /dev/null
+++ b/share/metview/etc/PlotSubPageDef
@@ -0,0 +1,27 @@
+PLOT_SUBPAGE ; Subpage for PlotMod ; Metview
+{
+
+	TOP 
+		[ label = 'Top ( Percent of the Page )' ]
+	{
+		*
+	} = 0
+
+	BOTTOM 
+		[ label = 'Bottom ( Percent of the Page )' ]
+	{
+		*
+	} = 100
+
+	LEFT 
+		[ label = 'Left ( Percent of the Page )' ]
+	{
+		*
+	} = 0
+
+	RIGHT 
+		[ label = 'Right ( Percent of the Page )' ]
+	{
+		*
+	} = 100
+}
diff --git a/share/metview/etc/PlotSubPageRules b/share/metview/etc/PlotSubPageRules
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/etc/PlotSuperPageDef b/share/metview/etc/PlotSuperPageDef
new file mode 100644
index 0000000..1761368
--- /dev/null
+++ b/share/metview/etc/PlotSuperPageDef
@@ -0,0 +1,55 @@
+PLOT_SUPERPAGE ; Plot Mod Icon     ; Metview
+{
+
+	LAYOUT_SIZE {
+		A4
+		A3
+		CUSTOM
+	} = A4
+
+	LAYOUT_ORIENTATION {
+		LANDSCAPE
+		PORTRAIT
+	} = LANDSCAPE
+
+	CUSTOM_WIDTH {
+		*
+	} = 21
+
+	CUSTOM_HEIGHT {
+		*
+	} = '29.7'
+
+!	SUPER_PAGE_FRAME {
+!		ON
+!		OFF
+!	} = ON
+
+	PAGES 
+	[
+	        interface       = icon,
+        	class           = PLOT_PAGE,
+	        exclusive       = false,
+        	help            = help_data,
+	        help_directory  = '/System/Defaults',
+        	help_name       = Embedded page,
+	        help_class      = PLOT_PAGE,
+	        help_icon       = PLOTPAGE,
+        	help_definition = (PLOT_PAGE)
+	]
+    	{
+		@
+		/
+	}
+
+!Change PRINT_OPTION to _PRINT_OPTION
+!PRINT_OPTION does not belong to the PlotSuperPage
+!definition, it is only an extra information
+!	PRINT_OPTION
+!	[ visible = false ]
+!	{
+!		ALL
+!		VISIBLE
+!	} = VISIBLE
+
+}
diff --git a/share/metview/etc/PlotSuperPageRules b/share/metview/etc/PlotSuperPageRules
new file mode 100644
index 0000000..465a04c
--- /dev/null
+++ b/share/metview/etc/PlotSuperPageRules
@@ -0,0 +1,19 @@
+!%if LAYOUT_SIZE <> CUSTOM %then
+!  %unset CUSTOM_WIDTH
+!	%unset CUSTOM_HEIGHT
+
+%if LAYOUT_SIZE = A4 %and LAYOUT_ORIENTATION = PORTRAIT %then
+	%set CUSTOM_WIDTH  = '21.0'
+	%set CUSTOM_HEIGHT = '29.7'
+
+%if LAYOUT_SIZE = A4 %and LAYOUT_ORIENTATION = LANDSCAPE %then
+	%set CUSTOM_WIDTH  = '29.7'
+	%set CUSTOM_HEIGHT = '21.0'
+
+%if LAYOUT_SIZE = A3 %and LAYOUT_ORIENTATION = PORTRAIT %then
+	%set CUSTOM_WIDTH  = '29.7'
+	%set CUSTOM_HEIGHT = '42.0'
+
+%if LAYOUT_SIZE = A3 %and LAYOUT_ORIENTATION = LANDSCAPE %then
+	%set CUSTOM_WIDTH  = '42.0'
+	%set CUSTOM_HEIGHT = '29.7'
diff --git a/share/metview/etc/Plot_Window_for_Image b/share/metview/etc/Plot_Window_for_Image
new file mode 100644
index 0000000..76eb69c
--- /dev/null
+++ b/share/metview/etc/Plot_Window_for_Image
@@ -0,0 +1,21 @@
+PLOTWINDOW,
+    ROW        = 1,
+    COLUMN     = 1,
+    WIDTH      = 500,
+    HEIGHT     = 500,
+    PANE_ORGANIZATION = INDEPENDENT,
+    SUBPAGE_MAP_PROJECTION = SATELLITE,
+    INPUT_IMAGE_ROWS = 2500,
+    INPUT_IMAGE_COLUMNS = 2500,
+    SUBPAGE_MAP_INITIAL_COLUMN = 1,
+    SUBPAGE_MAP_INITIAL_ROW = 1,
+    SUBPAGE_MAP_SUB_SAT_LATITUDE = 0,
+    SUBPAGE_MAP_SUB_SAT_LONGITUDE = 0,
+    SUBPAGE_MAP_SUB_SAT_X = 1250,
+    SUBPAGE_MAP_SUB_SAT_Y = 1250,
+    SUBPAGE_MAP_X_EARTH_DIAMETER = 2417,
+    SUBPAGE_MAP_Y_EARTH_DIAMETER = 2417,
+    SUBPAGE_MAP_SCANNING_MODE = 0,
+    SUBPAGE_MAP_GRID_ORIENTATION = 180000,
+    SUBPAGE_MAP_CAMERA_ALTITUDE = '6.61084e+06',
+    IMAGE_SUBAREA_SELECTION = OFF
diff --git a/share/metview/etc/PottFDef b/share/metview/etc/PottFDef
new file mode 100755
index 0000000..4d52a6e
--- /dev/null
+++ b/share/metview/etc/PottFDef
@@ -0,0 +1,207 @@
+POTT_FAMILY
+{
+	APPLICATION {
+		Potential temperature ; POTT
+		Equivalent potential temperature ; EQPOTT
+		Saturated equivalent Potential temperature ; SEQPOTT
+	} = POTT
+
+	LEVEL_TYPE {
+		Model levels    ; MODEL_LEVEL
+		Pressure levels ; PRESSURE_LEVEL
+	} = MODEL_LEVEL
+} 
+
+###############################################################
+
+POTT_M; SAMPLE Application; Definition of one SAMPLE
+{
+	LNSP
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Lnsp,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, LEVTYPE = ML, LEVELIST = 1, 
+				    PARAM = LNSP, GRID = 1.5/1.5,DATE=-1  )  
+	]
+	{ @ }
+
+	TEMPERATURE
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Temperature,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = T, GRID = 1.5/1.5,
+				    LEVTYPE = ML, LEVELIST = 10, DATE=-1 ) 
+	]
+
+	{ @ }
+}
+
+###############################################################
+
+POTT_P; SAMPLE Application; Definition of one SAMPLE
+{
+	TEMPERATURE
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Temperature,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = T, GRID = 1.5/1.5,
+				    LEVTYPE = PL, LEVELIST = 500, DATE=-1 ) 
+	]
+
+	{ @ }
+}
+
+###############################################################
+
+EQPOTT_M; SAMPLE Application; Definition of one SAMPLE
+{
+	LNSP
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Lnsp,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = LNSP, GRID = 1.5/1.5, 
+				    LEVTYPE = ML, LEVELIST = 1, DATE=-1 ) 
+	]
+
+	{ @ }
+
+	TEMPERATURE
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Temperature,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = T, GRID = 1.5/1.5,
+				    LEVTYPE = ML, LEVELIST = 10, DATE=-1 ) 
+	]
+		
+	{ @ }
+
+	HUMIDITY
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Humidity,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = Q, GRID = 1.5/1.5,
+				    LEVTYPE = ML, LEVELIST = 10, DATE=-1 ) 
+	]
+		
+	{ @ }
+}
+
+###############################################################
+
+EQPOTT_P; SAMPLE Application; Definition of one SAMPLE
+{
+	TEMPERATURE
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Temperature,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = T, GRID = 1.5/1.5,
+				    LEVTYPE = PL, LEVELIST = 500, DATE=-1 ) 
+	]
+		
+	{ @ }
+
+	HUMIDITY
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Humidity,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = R, GRID = 1.5/1.5,
+				    LEVTYPE = PL, LEVELIST = 500, DATE=-1 ) 
+	]
+		
+	{ @ }
+}
+
+###############################################################
+
+SEQPOTT_M; SAMPLE Application; Definition of one SAMPLE
+{
+	LNSP
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Lnsp,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE,PARAM = LNSP, GRID = 1.5/1.5, 
+				    LEVTYPE = ML, LEVELIST = 1, DATE=-1 ) 
+	]
+
+	{ @ }
+
+	TEMPERATURE
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Temperature,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = T, GRID = 1.5/1.5,
+				    LEVTYPE = ML, LEVELIST = 10, DATE=-1 ) 
+	]
+		
+	{ @ }
+}
+
+###############################################################
+
+SEQPOTT_P; SAMPLE Application; Definition of one SAMPLE
+{
+	TEMPERATURE
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Temperature,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = T, GRID = 1.5/1.5,
+				    LEVTYPE = PL, LEVELIST = 500, DATE=-1 ) 
+	]
+		
+	{ @ }
+}
diff --git a/share/metview/etc/PottFRules b/share/metview/etc/PottFRules
new file mode 100644
index 0000000..b3e537d
--- /dev/null
+++ b/share/metview/etc/PottFRules
@@ -0,0 +1,17 @@
+%if APPLICATION = POTT %and LEVEL_TYPE = MODEL_LEVEL %then
+	 %set _SECOND_GROUP = POTT_M
+
+%if APPLICATION = POTT %and LEVEL_TYPE = PRESSURE_LEVEL %then
+	 %set _SECOND_GROUP = POTT_P
+
+%if APPLICATION = EQPOTT %and LEVEL_TYPE = MODEL_LEVEL %then
+	 %set _SECOND_GROUP = EQPOTT_M
+
+%if APPLICATION = EQPOTT %and LEVEL_TYPE = PRESSURE_LEVEL %then
+	 %set _SECOND_GROUP = EQPOTT_P
+
+%if APPLICATION = SEQPOTT %and LEVEL_TYPE = MODEL_LEVEL %then
+	 %set _SECOND_GROUP = SEQPOTT_M
+
+%if APPLICATION = SEQPOTT %and LEVEL_TYPE = PRESSURE_LEVEL %then
+	 %set _SECOND_GROUP = SEQPOTT_P
diff --git a/share/metview/etc/SVGOutputDef b/share/metview/etc/SVGOutputDef
new file mode 100644
index 0000000..a40a372
--- /dev/null
+++ b/share/metview/etc/SVGOutputDef
@@ -0,0 +1,101 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+	COLOUR {
+		%include MagicsColors.h
+	}
+	STYLE {
+		SOLID; SOLID
+		DASH; DASH
+		DOT; DOT
+		CHAIN_DOT; CHAIN_DOT
+		CHAIN_DASH; CHAIN_DASH
+	}
+}
+
+SVGOUTPUT; Magics; Automatically generated
+{
+	OUTPUT_TITLE
+	{
+		@
+	} = MAGICS++ PLOT
+	OUTPUT_WIDTH
+	{
+		*
+	} = 800
+	OUTPUT_RESOLUTION
+	{
+		*
+	} = 300
+	OUTPUT_NAME
+	{
+		@
+	} = ''
+	OUTPUT_NAME_FIRST_PAGE_NUMBER
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_FULLNAME
+	{
+		@
+	} = ''
+	OUTPUT_LEGACY_NAME
+	{
+		@
+	} = ''
+	OUTPUT_FILE_MINIMAL_WIDTH
+	{
+		*
+	} = 1
+	OUTPUT_FILE_SEPARATOR
+	{
+		@
+	} = '.'
+	OUTPUT_DEBUG
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_FILELIST_NAME
+	{
+		@
+	} = MAGICS_OUTPUTS.LST
+
+	OUTPUT_SVG_DESC
+	{
+		@
+	} = ''
+	OUTPUT_SVG_META
+	{
+		@
+	} = ''
+	OUTPUT_SVG_USE_EXTERNAL_FILES
+	{
+		ON;  ON
+		OFF; OFF
+	} = ON
+	OUTPUT_SVG_SCRIPTING
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_SVG_FIX_SIZE
+	{
+		ON;  ON
+		OFF; OFF
+	} = OFF
+	OUTPUT_SVG_LOGO_LOCATION
+	{
+		@
+	} = INLINE
+
+    CLASS [visible=false]
+    {
+        @
+    } = DRIVER
+}
diff --git a/share/metview/etc/Services b/share/metview/etc/Services
new file mode 100644
index 0000000..086e12c
--- /dev/null
+++ b/share/metview/etc/Services
@@ -0,0 +1,528 @@
+## Note on maximum
+# it is the number of requests the module can handle
+# the default is 1, but because applications fork,
+# there may be more requests per app.
+# maximum of 0 means infinite
+
+service,
+	maximum  = 0,
+	alive	 = 1,   # Event won't exit while this is alive
+	name	 = 'MetviewUI',
+	fullname = User Interface,
+	cmd	 = "$metview_command $METVIEW_BIN/MetviewUI"
+
+service,
+	maximum  = 0,
+#	alive	 = 1,   # Event won't exit while this is alive
+	name	 = 'Desktop',
+	fullname = User Interface,
+	cmd	 = "$metview_command $METVIEW_BIN/Desktop $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name='debug',
+	cmd='xterm -T MetviewConsole -bg white -geometry 120x50+0+0 -bw 3 -bd red -e bash --init-file ${METVIEW_DIR}/scripts/mv_debug_env.sh'
+
+service,
+	name	 = 'konsole (SuSE)',
+	cmd	 = 'konsole -T Metview_debug -e csh -f'
+
+#service,
+#	name	 = 'konsole (11.3)',
+#	cmd	 = 'konsole --title Metview_debug'
+
+service,
+	name	 = 'mvmon',
+	fullname = Monitor,
+	cmd	 = '$METVIEW_BIN/mvmon'
+
+service,
+	name	 = 'stbase',
+	fullname = Station Database,
+	cmd	 = '$METVIEW_BIN/stbase'
+
+service,
+	maximum	 = 0,
+	name	 = 'mvmail',
+	fullname = Mail,
+	cmd	 = '$METVIEW_BIN/mvmail',
+	class	 =  application,
+	to	 = '$UserSupportMailAddress',
+	subject	 = 'Metview Bugs Report $METVIEW_RELEASE'
+
+service,
+	name	 = 'mvnews',
+	fullname = Inbox,
+	cmd	 = '$METVIEW_BIN/mvnews'
+
+
+service,
+	maximum	 = 0,
+	timeout	 = 1440, # One day
+	name	 = 'pool',
+	fullname = Data Cache,
+	cmd	 = "$metview_command $METVIEW_BIN/pool"
+
+service,
+	name	 = 'savepool',
+	maximum	 = 0,
+	timeout	 = $timeout, # set in script
+	fullname = Data Saver,
+	cmd	 = "$metview_command $METVIEW_BIN/savepool"
+
+service,
+	name	 = 'uPlotManager',
+	fullname = Display Manager,
+	cmd	 = "$metview_command $METVIEW_BIN/uPlotManager"
+
+service,
+	name	 = 'uPlot',
+	fullname = Display Module,
+	cmd	 = "$metview_command $METVIEW_BIN/uPlot $METVIEW_QT_APPLICATION_FLAGS",
+	dynamic	 = 1,
+	x_resource_name = 'uPlot'
+
+service,
+	name	 = 'uPlotBatch',
+	fullname = Display Batch Module,
+	cmd	 = "$metview_command $METVIEW_BIN/uPlotBatch",
+	dynamic	 = 1,
+	x_resource_name = 'uPlot'
+
+service,
+	name	 = 'GeoToolManager',
+	fullname = GeoTool Manager,
+	cmd	 = "$metview_command $METVIEW_BIN/GeoToolManager"
+
+service,
+	name	 = 'GeoTool',
+	fullname = Geo Tool,
+	cmd	 = "$metview_command $METVIEW_BIN/GeoTool $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name	 = 'DataToolManager',
+	fullname = DataTool Manager,
+	cmd	 = "$metview_command $METVIEW_BIN/DataToolManager"
+
+service,
+	name	 = 'GribTool',
+	fullname = Grib Analyser,
+	cmd	 = "$metview_command $METVIEW_BIN/GribTool $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name	 = 'GribExaminer',
+	maximum	 = 0,
+	timeout  = $timeout, # set in script
+	fullname = GRIB Examiner,
+	cmd	 = "$metview_command $METVIEW_BIN/GribExaminer  -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name	 = 'BufrExaminer',
+	maximum	 = 0,
+	timeout  = $timeout, # set in script
+	fullname = BUFR Examiner,
+	cmd	 = "$metview_command $METVIEW_BIN/BufrExaminer  -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name	 = ObsExam,
+	maximum	 = 0,
+	timeout	 = $timeout, # set in script
+	fullname = BUFR Viewer,
+	cmd	 = "$metview_command $METVIEW_BIN/ObsExam"
+
+service,
+	name	 = NcExaminer,
+	maximum	 = 0,
+	timeout  = $timeout, # set in script
+	fullname = NetCDF Examiner,
+	cmd	 = "$metview_command $METVIEW_BIN/NcExaminer -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name		= GeopExaminer,
+	maximum	= 0,
+	timeout	= $timeout, # set in script
+	fullname	= Geopoints Examiner,
+	cmd		= "$metview_command $METVIEW_BIN/GeopExaminer -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name     = togrib,
+	fullname = Matrix to GRIB,
+	timeout  = $timeout, # set in script
+	cmd      = "$metview_command $METVIEW_BIN/togrib"
+
+# Macro
+service,
+	timeout	 = $timeout, # set in script
+	fullname = Macro Player,
+	name	 ='macro',
+	cmd	 = "$metview_command $METVIEW_BIN/macro -serve"
+
+
+service,
+	name	 = 'macroedit',
+	fullname = Macro Editor,
+	maximum  = 0,
+	cmd	 = "$metview_command $METVIEW_BIN/MacroEditor -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS"
+
+service,
+	name	 = batch,
+	alive	 = 1
+
+service,
+	timeout	 = $timeout, # set in script
+	name     = 'mars',
+	fullname = Mars,
+	cmd      = "$metview_command $METVIEW_BIN/Mars"
+
+service,
+	timeout  = $timeout,
+	name     = 'Mars_G2',
+	fullname = Mars TIGGE_,
+	cmd      = "$metview_command $METVIEW_BIN/MarsTiggeWrapper G2"
+
+service,
+	timeout  = $timeout,
+	name     = 'Mars_TIGGE',
+	fullname = Mars TIGGE,
+	cmd      = "$metview_command $METVIEW_BIN/MarsTiggeWrapper TIGGE"
+
+service,
+	name	 = Ecfs,
+	timeout	 = $timeout, # set in script
+	cmd	 = "$metview_command $METVIEW_BIN/Ecfs"
+
+service,
+	timeout  = $timeout, # set in script
+ 	name	 = 'CleanFile',
+ 	fullname = Clean File,
+	cmd	 = '$METVIEW_BIN/CleanFile'
+
+service,
+	name     = geo_to_grib,
+	fullname = Geopoints to GRIB,
+	timeout  = $timeout, # set in script
+	cmd      = "$metview_command $METVIEW_BIN/geo_to_grib"
+
+service,
+	name     = grib_to_geo,
+	fullname = GRIB to geopoints,
+	timeout  = $timeout,
+	cmd      = "$metview_command $METVIEW_BIN/grib_to_geo"
+
+service,
+	timeout	 = $timeout,
+        name	 = ObsFilter,
+	fullname =Observation Filter,
+        cmd	 = "$metview_command $METVIEW_BIN/ObsFilter"
+
+service,
+	timeout	 = $timeout,
+	cmd      = '$METVIEW_CMD $METVIEW_BIN/PottF',
+	name     = PottF
+
+service,
+	timeout = $timeout, # set in script
+	cmd     = '$METVIEW_CMD $METVIEW_BIN/Divrot',
+	name    = Divrot
+
+service,
+	timeout = $timeout, # set in script
+	cmd     = '$METVIEW_CMD $METVIEW_BIN/Velstr',
+	name    = Velstr
+
+service,
+	name	 = Datacoverage,
+	cmd	 = '$metview_command $METVIEW_BIN/Datacoverage'
+
+service,
+	name	 = station,
+	timeout  = $timeout, # set in script
+	fullname = Stations,
+	cmd	 = "$metview_command $METVIEW_BIN/station"
+
+service,
+	alive=1,
+	name='xserv',
+	cmd= "$METVIEW_BIN/xserv"
+
+
+
+##########################################################################
+##########################################################################
+##########################################################################
+
+## Debug tools
+## start csh without login files (which at ECMWF would (re)set MAG_HOME)
+#service, name='xterm',  cmd='xterm +ls -title Metview_debug -cr red2 -e csh -f'
+#service, name='xterm2', cmd='xterm'
+#service, name='totalview (ECMWF)',    cmd='$METVIEW_DIR/scripts/mv_debug'
+#service, name='dbx (Unix dbg)',       cmd='xterm -e dbx'
+#service, name='gdb (GNU dbg)',        cmd='xterm -e gdb'
+#service, name='ddd (Linux GUI dbg)',  cmd='ddd'
+#service, name='idebug (AIX GUI dbg)', cmd='idebug'
+#service, name='wdb (HP GUI dbg)',     cmd='wdb'
+#service, name='cvd (SGI GUI dbg)',    cmd='cvd'
+#
+#service,
+#    name='PlotMod',
+#    fullname=Plot Module,
+#    cmd="$metview_command $METVIEW_BIN/PlotMod"
+#
+#service,
+#    name='MagicsEngine',
+#	fullname=MAGICS Engine,
+#	timeout = $timeout, # set in script
+#    cmd="$metview_command $METVIEW_BIN/MagicsEngine -nofork"
+#
+#service,
+#   name=MyTest,
+#   cmd="$METVIEW_BIN/MyTest"
+#
+#
+#### Wrappers
+#
+#service,
+#	name    = Vis5D,
+#	maximum = 32000,
+#	cmd     = "$METVIEW_CMD $METVIEW_BIN/Vis5D",
+#	x_name  = Vis5D # Name of XWindow
+#
+#
+#	# Follwed by the drop 'action' see drop.c
+#	# DROP_ACTION_NAME_AND_CLASS = 1
+#	# DROP_ACTION_DEFINITION = 2
+#	# DROP_ACTION_RESOLVE = 3 (default)
+#
+#drop_action, name = Vis5D, class = VIS5D_SCRIPT, action = 2
+#drop_action, name = Vis5D, class = VIS5D_DATA,   action = 2
+#
+##
+## Modules
+#
+#service, name='OdaExaminer',
+#	maximum = 0,
+#	timeout = $timeout, # set in script
+#	fullname=ODA Examiner,
+#    cmd= "$METVIEW_BIN/OdaExaminer $METVIEW_QT_APPLICATION_FLAGS"
+#
+#
+#service, name='help',
+#	maximum = 0,
+#fullname = Help,
+#        cmd= "$METVIEW_BIN/help"
+#
+#service,
+#	timeout = $timeout, # set in script
+#	name    ='Diapason',
+#	cmd     = "$metview_command $METVIEW_BIN/Diapason"
+##
+## Graphics
+##
+#
+#service,
+#    name='VisModTrans',
+#    fullname=Request Translator,
+#	timeout = $timeout, # set in script
+#    cmd="$metview_command $METVIEW_BIN/VisModTrans"
+#
+#
+##
+## Applications
+##
+#
+##	Total Rain needs to be totally rewritten!
+##service,
+##	timeout = $timeout, # set in script
+##	name='totrain',
+##	fullname=Total Rain,
+##	cmd= "$metview_command $METVIEW_BIN/totrain"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name='vertprof',
+#		fullname=Vertical Profile,
+#        cmd= "$metview_command $METVIEW_BIN/Xsect"
+#
+##service,
+##		timeout = $timeout, # set in script
+##        name='xsect',
+##		fullname=Cross Section,
+##        cmd= "$metview_command $METVIEW_BIN/xsect"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name='Xsect',
+#		fullname=Cross Section,
+#        cmd= "$metview_command $METVIEW_BIN/Xsect"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name= SampleModule,
+#        cmd= "$metview_command $METVIEW_BIN/SampleModule"
+#
+## Follwed by the drop 'action' see drop.c
+## DROP_ACTION_NAME_AND_CLASS = 1
+## DROP_ACTION_DEFINITION = 2
+## DROP_ACTION_RESOLVE = 3 (default)
+#
+#service,
+#	timeout = $timeout, # set in script
+#	name= Metgram,
+#	cmd= "$metview_command $METVIEW_BIN/Metgram"
+#
+#service,
+#	timeout = $timeout, # set in script
+#	name= Metgram0,
+#	cmd= "$metview_command $METVIEW_BIN/Metgram0"
+#
+## Move the definition of the service MetgramCoach to ObjectList.ClassicMetgram ...
+##service,
+#	#timeout = $timeout, # set in script
+#	#name= MetgramCoach,
+#	#cmd= "$metview_command $METVIEW_BIN/MetgramCoach"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name= Scores,
+#        cmd= "$metview_command $METVIEW_BIN/Scores"
+#
+#service,
+#	timeout = $timeout, # set in script
+#	cmd     = '$METVIEW_CMD $METVIEW_BIN/Budget',
+#	name    = Budget
+#
+#service,
+#	timeout = $timeout, # set in script
+#	cmd     = '$METVIEW_CMD $METVIEW_BIN/Spectra',
+#	name    = Spectra
+#
+#service,
+#	timeout = $timeout, # set in script
+#        name= Budgets,
+#        cmd= "$metview_command $METVIEW_BIN/Budgets"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name= Neurons,
+#        cmd= "$metview_command $METVIEW_BIN/Neurons"
+#
+## obsolete
+##service,
+##    timeout = $timeout, # set in script
+##    name    = Tephigrams,
+##    cmd     = "$metview_command $METVIEW_BIN/Tephigrams"
+#
+## obsolete
+##service,
+##	timeout = $timeout, # set in script
+##        name= Tephigram-94,
+##        cmd= "$metview_command $METVIEW_BIN/Tephigram-94"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name= Relhum2,
+#		fullname=Relative Humidity,
+#        cmd= "$metview_command $METVIEW_BIN/Relhum2"
+#
+## obsolete
+##service,
+##	timeout = $timeout, # set in script
+##        name= Tephigram OLD,
+##        cmd= "$metview_command $METVIEW_BIN/backup/Tephigram"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name= Vectors,
+#        cmd= "$metview_command $METVIEW_BIN/Vectors"
+#
+#service,
+#		timeout = $timeout, # set in script
+#        name='average',
+#		fullname=Average,
+#        cmd= "$METVIEW_BIN/Xsect"
+#
+#service,
+#	name     = tomatrix,
+#	fullname = Geopoints to  Matrix,
+#	timeout  = $timeout, # set in script
+#	cmd      = "$metview_command $METVIEW_BIN/tomatrix"
+#
+#service,
+#	name     = ODB,
+#	fullname = ODB access,
+#	timeout  = $timeout, # set in script
+#	cmd      = "$metview_command $METVIEW_BIN/ODB.ksh"
+#
+##mv4 service,
+##mv4 	name=ImageFilter,
+##mv4 	timeout = $timeout, # set in script
+##mv4 	cmd = "$metview_command $METVIEW_BIN/ImageFilter"
+#
+#service,
+#	name=IconBox,
+#	timeout = $timeout, # set in script
+#	cmd = "$metview_command $METVIEW_BIN/IconBox"
+#
+#service,
+#	name = gribtool,
+#	cmd = '$metview_command $METVIEW_BIN/gribtool'
+#
+#
+##service,
+##	name=Ecfile,
+##	timeout = $timeout, # set in script
+##	cmd = "$metview_command $METVIEW_BIN/Ecfile"
+#
+##service,
+##    name='EcfileBrowser',
+##	fullname=Ecfile Browser,
+##    cmd='$METVIEW_BIN/EcfileBrowser'
+#
+#service,
+#	name='3dWin',
+#	cmd="/home/ma/mab/src/gl/3dWin -metview"
+#
+#
+#service,
+#	name = Curve,
+#	timeout = $timeout, # set in script
+#	cmd = '$metview_command $METVIEW_BIN/Curve'
+#
+#service,
+#	name = Graph,
+#	timeout = $timeout, # set in script
+#	cmd = '$metview_command $METVIEW_BIN/Graph'
+#
+#service,
+#	name = DemoView,
+#	timeout = $timeout, # set in script
+#	cmd = '$metview_command $METVIEW_BIN/DemoView'
+#
+##service,
+##	name = ImageDisplay,
+##	cmd = '$metview_command $METVIEW_BIN/ImageDisplay'
+#
+#service,
+#   timeout = $timeout, # set in script
+#   fullname = Remote Folder Client,
+#   name    = cremote,
+#   cmd     = "$metview_command $METVIEW_BIN/cremote"
+#
+#service,
+#   name    = sremote,
+#   fullname = Remote Folder Server,
+#   cmd     = "$metview_command $METVIEW_BIN/sremote"
+#
+#
+############################# PlotMod
+#service,
+#	timeout = $timeout, # set in script
+#        name='PM_Tephigram',
+#	fullname=Tephigram,
+#        cmd= "$metview_command $METVIEW_BIN/PM_Tephigram"
+#
+#service,
+#	timeout = $timeout, # set in script
+#        name='GeoTools',
+#	fullname=GeoTools,
+#        cmd= "$metview_command $METVIEW_BIN/GeoTools"
+#
diff --git a/share/metview/etc/SimpleFormulaDef b/share/metview/etc/SimpleFormulaDef
new file mode 100644
index 0000000..ded4d11
--- /dev/null
+++ b/share/metview/etc/SimpleFormulaDef
@@ -0,0 +1,154 @@
+SIMPLE_FORMULA_FAMILY ; FORMULA
+{
+	FORMULA [ beautify = false ] {
+		'F+G'             ; SAMPLE_FORMULA_DOD
+		'F+x'           ; SAMPLE_FORMULA_DON
+		'x+F'           ; SAMPLE_FORMULA_NOD
+#		'x+y'           ; SAMPLE_FORMULA_NON
+		'f(F)'            ; SAMPLE_FORMULA_FD
+#		'f(x)'          ; SAMPLE_FORMULA_FN
+		'f(F,G)'       ; SAMPLE_FORMULA_FDD
+		'f(F,x)'     ; SAMPLE_FORMULA_FDN
+		'f(x,F)'     ; SAMPLE_FORMULA_FND
+#		'f(x,y)'        ; SAMPLE_FORMULA_FNN
+	}= SAMPLE_FORMULA_DOD
+}
+
+_FUNCTIONS
+{
+
+	FUNCTION1 {
+		'-' ; neg
+		not
+		sgn
+		int
+
+		abs
+		sqrt
+
+		log
+		log10
+		exp
+
+		sin
+		cos
+		tan
+
+		asin
+		acos
+		atan
+		
+		coslat
+		sinlat
+
+#		maxvalue
+#		minvalue
+		count
+		mean
+		rms
+		stdev
+		sum
+		var
+	} = neg
+
+	FUNCTION2 {
+		max
+		min
+		covar
+		div
+		merge
+		mod
+		interpolate
+	} = max
+
+	FUNCTION3 {
+		max
+		min
+	} = max
+
+	OPERATORS {
+		'+ '  
+		'- ' 
+		'/ '
+		'* ' 
+		'^ '  
+		'> '  
+		'>=' 
+		'< '  
+		'<=' 
+		'= '  
+		'<>'
+		and
+		or
+	} = '-'
+
+}
+
+SAMPLE_FORMULA_DOD {
+	PARAMETER_1 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+	OPERATOR    [ beautify = false,interface=menu ] { &_FUNCTIONS&OPERATORS } = '-'
+	PARAMETER_2 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+}
+
+SAMPLE_FORMULA_DON {
+	PARAMETER_1 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+	OPERATOR    [ beautify = false,interface=menu ] { &_FUNCTIONS&OPERATORS } = '-'
+	PARAMETER_2                      { * } = 0
+}
+
+SAMPLE_FORMULA_NOD {
+	PARAMETER_1                      { * } = 0
+	OPERATOR    [ beautify = false,interface=menu ] { &_FUNCTIONS&OPERATORS } = '-'
+	PARAMETER_2 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+}
+
+#SAMPLE_FORMULA_NON {
+#	PARAMETER_1                      { * } = 0
+#	OPERATOR    [ beautify = false,interface=menu ] { &_FUNCTIONS&OPERATORS } = '-'
+#	PARAMETER_2                      { * } = 0
+#}
+
+SAMPLE_FORMULA_FD {
+	FUNCTION    [ beautify = false,interface=menu ] { &_FUNCTIONS&FUNCTION1 } = mean
+	PARAMETER   [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+}
+
+#SAMPLE_FORMULA_FN {
+#	FUNCTION    [ beautify = false,interface=menu ] { &_FUNCTIONS&FUNCTION1 } = neg
+#	PARAMETER                        { * } = 0
+#}
+
+
+SAMPLE_FORMULA_FDD {
+	FUNCTION    [ beautify = false,interface=menu ] { &_FUNCTIONS&FUNCTION2 } = max
+	PARAMETER_1 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+	PARAMETER_2 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+}
+
+SAMPLE_FORMULA_FDN {
+	FUNCTION    [ beautify = false,interface=menu ] { &_FUNCTIONS&FUNCTION3 } = max
+	PARAMETER_1 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+	PARAMETER_2                      { */ } = 0
+}
+
+SAMPLE_FORMULA_FND {
+	FUNCTION    [ beautify = false,interface=menu ] { &_FUNCTIONS&FUNCTION3 } = max
+	PARAMETER_1                      { * } = 0
+	PARAMETER_2 [ interface = icon, class = GRIB/GEOPOINTS ] { @ }
+}
+
+#SAMPLE_FORMULA_FNN {
+#	FUNCTION    [ beautify = false,interface=menu ] { &_FUNCTIONS&FUNCTION2 } = max
+#	PARAMETER_1                      { * } = 0
+#	PARAMETER_2                      { * } = 0
+#}
+
+
+
+
+
+
+
+
+
+
diff --git a/share/metview/etc/SimpleFormulaRules b/share/metview/etc/SimpleFormulaRules
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/etc/StationDef b/share/metview/etc/StationDef
new file mode 100755
index 0000000..7b8809c
--- /dev/null
+++ b/share/metview/etc/StationDef
@@ -0,0 +1,107 @@
+STATIONS ; dummy ; dummy2
+{
+	#this one was a "bad idea" (vk)
+	STATION_TYPE
+	[ visible = false ]
+	{
+		WMO_STATION
+		EPS_STATION
+		LOCATION
+		NOT_USED
+	} = NOT_USED
+
+
+#	-- old name for backwards compatibility --
+#	Note that it appears that although libMars uses the last
+#	name in each list (as specified in ObjectList), MetviewUI
+#	uses the second name... hence the duplication.
+
+	SEARCH_STATIONS_DATABASE
+	[ label = 'Station type' ]
+	{
+		YES - WMO_STATION ; WMO ; WMO_STATION ; WMO
+		NO - LOCATION ; NO ; LOCATION ; NO
+	} = WMO
+
+	SEARCH_KEY {
+		NAME
+		IDENT
+		WMO_BLOCK
+		POSITION
+		AREA
+	} = NAME
+
+	NAME
+		[
+			 help = help_external,
+			 help_module = stbase,
+			 help_icon   = help_station,
+			 help_param  = NAME,
+			 help_verb   = INPUT,
+			 help_answer_verb = INPUT
+		]
+	{
+		@
+		/
+	} = Heathrow
+
+	POSITION
+		[ help = help_input, help_icon = 'help_point', input_type = point ]
+	{
+		*
+		/
+	} = 51.38/-0.78
+
+	HEIGHT
+	{
+		*
+	} = 0
+
+
+
+	THRESHOLD
+	[ label = 'Tolerance' ]
+	{
+		*
+	} = 0.1
+
+#	-- old name for backwards compatibility --
+#	THRESHOLD
+#	[ visible = false ]
+#	{
+#		*
+#	}
+
+	IDENT
+		[
+			 help = help_external,
+			 help_module = stbase,
+			 help_icon   = help_station,
+			 help_verb   = INPUT,
+			 help_param  = IDENT,
+			 help_answer_verb = INPUT
+		]
+	{
+		*
+	} = 03772   #-- London/Heathrow is also "an EPS station"
+
+	WMO_BLOCK
+		[
+			 help = help_external,
+			 help_module = stbase,
+			 help_icon   = help_station,
+			 help_verb   = INPUT,
+			 help_param  = WMO_BLOCK,
+			 help_answer_verb = INPUT
+		]
+	{
+		*
+	} = 03
+
+	AREA
+		[ help = help_input, help_icon = 'help_map', input_type = area ]
+	{
+		*
+		/
+	} = 52/-1/51/0
+}
diff --git a/share/metview/etc/StationRules b/share/metview/etc/StationRules
new file mode 100644
index 0000000..6069d32
--- /dev/null
+++ b/share/metview/etc/StationRules
@@ -0,0 +1,59 @@
+! these 3 to fix a temporary bad solution
+%if STATION_TYPE = LOCATION %then
+	%set SEARCH_STATIONS_DATABASE = NO
+
+%if STATION_TYPE = WMO_STATION %then
+	%set SEARCH_STATIONS_DATABASE = WMO
+
+%if SEARCH_STATIONS_DATABASE = NO %then
+	%unset WMO_BLOCK
+	%unset THRESHOLD
+	%unset AREA
+	%unset IDENT
+	%unset SEARCH_KEY
+
+%if SEARCH_KEY = NAME %then
+!	%unset NAME
+	%unset IDENT
+	%unset WMO_BLOCK
+	%unset POSITION
+	%unset THRESHOLD
+	%unset AREA
+	%unset HEIGHT
+
+%if SEARCH_KEY = IDENT %then
+	%unset NAME
+!	%unset IDENT
+	%unset WMO_BLOCK
+	%unset POSITION
+	%unset THRESHOLD
+	%unset AREA
+	%unset HEIGHT
+
+
+%if SEARCH_KEY = WMO_BLOCK %then
+	%unset NAME
+	%unset IDENT
+!	%unset WMO_BLOCK
+	%unset POSITION
+	%unset THRESHOLD
+	%unset AREA
+	%unset HEIGHT
+
+%if SEARCH_KEY = POSITION %then
+	%unset NAME
+	%unset IDENT
+	%unset WMO_BLOCK
+!	%unset POSITION
+!	%unset THRESHOLD
+	%unset AREA
+	%unset HEIGHT
+
+%if SEARCH_KEY = AREA %then
+	%unset NAME
+	%unset IDENT
+	%unset WMO_BLOCK
+	%unset POSITION
+	%unset THRESHOLD
+!	%unset AREA
+	%unset HEIGHT
diff --git a/share/metview/etc/SubpageFrameDef b/share/metview/etc/SubpageFrameDef
new file mode 100644
index 0000000..c860394
--- /dev/null
+++ b/share/metview/etc/SubpageFrameDef
@@ -0,0 +1,157 @@
+PAGE_FRAME
+{
+	ON 		; ON
+	OFF 		; OFF
+} = ON
+
+PAGE_FRAME_COLOUR
+{
+  %include MagicsColors.h
+} = BLUE
+
+PAGE_FRAME_LINE_STYLE
+{
+	SOLID		; SOLID
+	DOT		; DOT
+	DASH		; DASH
+	CHAIN_DOT	; CHAIN_DOT
+	CHAIN_DASH	; CHAIN_DASH
+} = SOLID
+
+PAGE_FRAME_THICKNESS
+{
+	1			; 1
+	2			; 2
+	3			; 3
+	4			; 4
+	5			; 5
+    6           ; 6
+    7           ; 7
+    8           ; 8
+    9           ; 9
+   10           ; 10
+
+} = 2
+
+####
+# In MAGICS, the default for PAGE_ID_LINE (and associate parameters) is ON, 
+# however, in METVIEW is OFF. This is because for the majority of the cases 
+# METVIEW does not need this facility.
+# Also, only the parameter PAGE_ID_LINE_USER_TEXT is available in the user
+# interface, at moment.
+
+    PAGE_ID_LINE
+    {
+		ON			; ON
+		OFF			; OFF
+#		ERRORS_ONLY	; ERRORS_ONLY
+    } = OFF
+
+    PAGE_ID_LINE_TYPE
+    [ visible = false ]
+    {
+		BOTH		; BOTH
+		LOGO_ONLY	; LOGO_ONLY
+		ID_LINE_ONLY	; ID_LINE_ONLY
+    } = BOTH
+
+    PAGE_ID_LINE_COLOUR
+    [ visible = false ]
+    {
+  		%include MagicsColors.h
+    } = BLUE
+
+    PAGE_ID_LINE_SYSTEM_PLOT
+    [ visible = false ]
+    {
+        ON          ; ON
+        OFF         ; OFF
+    } = OFF
+
+    PAGE_ID_LINE_DATE_PLOT
+    [ visible = false ]
+    {
+        ON          ; ON
+        OFF         ; OFF
+    } = OFF
+
+    PAGE_ID_LINE_USER_TEXT_PLOT
+    [ visible = false ]
+    {
+        ON          ; ON
+        OFF         ; OFF
+    } = ON
+
+    PAGE_ID_LINE_USER_TEXT
+    {
+        @
+    } = ''
+
+    PAGE_ID_LINE_ERRORS_PLOT
+    [ visible = false ]
+    {
+        ON          ; ON
+        OFF         ; OFF
+    } = OFF
+
+    PAGE_ID_LINE_LOGO_PLOT
+    [ visible = false ]
+    {
+        ON          ; ON
+        OFF         ; OFF
+    } = OFF
+
+    PAGE_ID_LINE_HEIGHT
+    [ visible = false ]
+    {
+		@
+    } = 0.25
+
+    PAGE_ID_LINE_QUALITY
+    [ visible = false ]
+    {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+    } = MEDIUM
+####
+
+SUBPAGE_FRAME
+{
+	ON 		; ON
+	OFF 		; OFF
+} = ON
+
+SUBPAGE_FRAME_COLOUR
+{
+  %include MagicsColors.h
+} = BLACK
+
+SUBPAGE_FRAME_LINE_STYLE
+{
+	SOLID		; SOLID
+	DOT		; DOT
+	DASH		; DASH
+	CHAIN_DOT	; CHAIN_DOT
+	CHAIN_DASH	; CHAIN_DASH
+} = SOLID
+
+SUBPAGE_FRAME_THICKNESS
+{
+	1			; 1
+	2			; 2
+	3			; 3
+	4			; 4
+	5			; 5
+    6           ; 6
+    7           ; 7
+    8           ; 8
+    9           ; 9
+   10           ; 10
+
+} = 2
+
+SUBPAGE_BACKGROUND_COLOUR
+{
+  %include MagicsColors.h
+} = WHITE
diff --git a/share/metview/etc/SubpageFrameRules b/share/metview/etc/SubpageFrameRules
new file mode 100644
index 0000000..a767e9d
--- /dev/null
+++ b/share/metview/etc/SubpageFrameRules
@@ -0,0 +1,12 @@
+%if PAGE_FRAME = OFF %then
+	%unset PAGE_FRAME_COLOUR
+	%unset PAGE_FRAME_LINE_STYLE
+	%unset PAGE_FRAME_THICKNESS
+
+%if SUBPAGE_FRAME = OFF %then
+	%unset SUBPAGE_FRAME_COLOUR
+	%unset SUBPAGE_FRAME_LINE_STYLE
+	%unset SUBPAGE_FRAME_THICKNESS
+
+%if PAGE_ID_LINE = OFF %then
+	%unset PAGE_ID_LINE_USER_TEXT
diff --git a/share/metview/etc/SymbDef b/share/metview/etc/SymbDef
new file mode 100755
index 0000000..0e03ec1
--- /dev/null
+++ b/share/metview/etc/SymbDef
@@ -0,0 +1,217 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PSYMB   ; SYMBOL  ; MAGICS
+{
+        SYMBOL_TYPE
+        {
+               NUMBER    ; NUMBER
+               TEXT      ; TEXT
+               MARKER    ; MARKER
+               WIND      ; WIND
+        } = NUMBER
+ 
+        SYMBOL_TABLE_MODE
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        LEGEND
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+   LEGEND_ENTRY
+    [
+        interface       = icon,
+        class           = LEGENDENTRY,
+        exclusive       = true,
+        help            = help_data,
+        help_directory  = '/Metview/Defaults',
+        help_name       = Legend Entry for Symbol Plotting,
+        help_class      = LEGENDENTRY
+    ]
+    {
+        @
+    }
+        SYMBOL_POSITION_MODE
+        {
+                GEOGRAPHIC ; GEOGRAPHIC
+                PAPER      ; PAPER     
+                GRAPH      ; GRAPH     
+        } = GEOGRAPHIC
+ 
+		SYMBOL_BORDER_CHECK
+		{
+                 &PARAMSHARE&ONOFF
+		} = OFF
+
+        SYMBOL_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+ 
+        SYMBOL_BLANKING
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        SYMBOL_BLANKING_GAP
+        {
+                @
+        } = 0.
+ 
+        SYMBOL_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        SYMBOL_FORMAT
+        {
+                @
+        } = '(AUTOMATIC)'
+ 
+        SYMBOL_HEIGHT
+        {
+                @
+        } = 0.2
+ 
+#        SYMBOL_INPUT_X_POSITION
+#        {
+#                /
+#                @
+#        }
+# 
+#        SYMBOL_INPUT_Y_POSITION
+#        {
+#                /
+#                @
+#        }
+
+        SYMBOL_INPUT_TEXT_LIST 
+        {
+                /
+                @
+        }
+
+        SYMBOL_INPUT_MARKER_LIST 
+        {
+                /
+                @
+        } = 1
+
+#        SYMBOL_INPUT_NUMBER_LIST
+#        {
+#                /
+#                @
+#        }
+#
+#        SYMBOL_INPUT_WIND_DIRECTION
+#        {
+#                /
+#                @
+#        }
+#
+#        SYMBOL_INPUT_WIND_SPEED
+#        {
+#                /
+#                @
+#        }
+
+        SYMBOL_MIN_TABLE
+        {
+                /
+                @
+        } = -1.0E21
+
+        SYMBOL_MAX_TABLE
+        {
+                /
+                @
+        } = 1.0E21
+
+        SYMBOL_MARKER_TABLE
+        {
+                /
+                @
+        } = 1
+
+        SYMBOL_TEXT_TABLE
+        {
+                /
+                @
+        }
+
+	SYMBOL_COLOUR_TABLE [ help = help_colour,interface = colour ]
+	{
+            &PARAMSHARE&COLOUR
+	    /
+	} = BLUE
+
+        SYMBOL_HEIGHT_TABLE
+        {
+                /
+                @
+        }
+
+        SYMBOL_WIND_ORIGIN_MARKER
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        SYMBOL_DISTANCE_APART
+        {
+                @
+        } = 0.0
+
+} ! end of PSYMB  
diff --git a/share/metview/etc/SymbRules b/share/metview/etc/SymbRules
new file mode 100755
index 0000000..cb6f9b0
--- /dev/null
+++ b/share/metview/etc/SymbRules
@@ -0,0 +1,121 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+%if SYMBOL_TYPE = WIND %then
+        %unset SYMBOL_TABLE_MODE
+        %unset LEGEND
+        %unset SYMBOL_POSITION_MODE
+        %unset SYMBOL_BORDER_CHECK
+        %unset SYMBOL_QUALITY
+        %unset SYMBOL_BLANKING
+        %unset SYMBOL_BLANKING_GAP
+        %unset SYMBOL_FORMAT
+        %unset SYMBOL_HEIGHT
+        %unset SYMBOL_MIN_TABLE
+        %unset SYMBOL_MAX_TABLE
+        %unset SYMBOL_MARKER_TABLE
+        %unset SYMBOL_TEXT_TABLE
+        %unset SYMBOL_COLOUR_TABLE
+        %unset SYMBOL_HEIGHT_TABLE
+        %unset SYMBOL_INPUT_TEXT_LIST
+        %unset SYMBOL_INPUT_MARKER_LIST
+
+%if SYMBOL_TYPE = NUMBER %and SYMBOL_TABLE_MODE = OFF %then
+        %unset SYMBOL_WIND_ORIGIN_MARKER
+        %unset SYMBOL_MIN_TABLE
+        %unset SYMBOL_MAX_TABLE
+        %unset SYMBOL_MARKER_TABLE
+        %unset SYMBOL_TEXT_TABLE
+        %unset SYMBOL_COLOUR_TABLE
+        %unset SYMBOL_HEIGHT_TABLE
+        %unset SYMBOL_INPUT_TEXT_LIST
+        %unset SYMBOL_INPUT_MARKER_LIST
+
+%if SYMBOL_TYPE = NUMBER %and SYMBOL_TABLE_MODE = ON %then
+        %unset SYMBOL_COLOUR
+        %unset SYMBOL_FORMAT
+        %unset SYMBOL_HEIGHT
+        %unset SYMBOL_WIND_ORIGIN_MARKER
+        %unset SYMBOL_MARKER_TABLE
+        %unset SYMBOL_TEXT_TABLE
+        %unset SYMBOL_INPUT_TEXT_LIST
+        %unset SYMBOL_INPUT_MARKER_LIST
+
+%if SYMBOL_TYPE = MARKER %and SYMBOL_TABLE_MODE = OFF %then
+        %unset SYMBOL_WIND_ORIGIN_MARKER
+        %unset SYMBOL_FORMAT
+        %unset SYMBOL_INPUT_TEXT_LIST
+        %unset SYMBOL_MIN_TABLE
+        %unset SYMBOL_MAX_TABLE
+        %unset SYMBOL_MARKER_TABLE
+        %unset SYMBOL_TEXT_TABLE
+        %unset SYMBOL_COLOUR_TABLE
+        %unset SYMBOL_HEIGHT_TABLE
+
+%if SYMBOL_TYPE = MARKER %and SYMBOL_TABLE_MODE = ON %then
+        %unset SYMBOL_COLOUR
+        %unset SYMBOL_FORMAT
+        %unset SYMBOL_HEIGHT
+        %unset SYMBOL_WIND_ORIGIN_MARKER
+        %unset SYMBOL_INPUT_TEXT_LIST
+        %unset SYMBOL_TEXT_TABLE
+        %unset SYMBOL_INPUT_MARKER_LIST
+
+%if SYMBOL_TYPE = TEXT %and SYMBOL_TABLE_MODE = OFF %then
+        %unset SYMBOL_WIND_ORIGIN_MARKER
+        %unset SYMBOL_FORMAT
+        %unset SYMBOL_MIN_TABLE
+        %unset SYMBOL_MAX_TABLE
+        %unset SYMBOL_MARKER_TABLE
+        %unset SYMBOL_TEXT_TABLE
+        %unset SYMBOL_COLOUR_TABLE
+        %unset SYMBOL_HEIGHT_TABLE
+        %unset SYMBOL_INPUT_MARKER_LIST
+
+%if SYMBOL_TYPE = TEXT %and SYMBOL_TABLE_MODE = ON %then
+        %unset SYMBOL_COLOUR
+        %unset SYMBOL_FORMAT
+        %unset SYMBOL_HEIGHT
+        %unset SYMBOL_WIND_ORIGIN_MARKER
+        %unset SYMBOL_MARKER_TABLE
+        %unset SYMBOL_INPUT_TEXT_LIST
+        %unset SYMBOL_INPUT_MARKER_LIST
+
+%if SYMBOL_BLANKING = OFF %then
+        %unset SYMBOL_BLANKING_GAP
+
+%if SYMBOL_TABLE_MODE = OFF %then
+        %unset LEGEND
+        %unset LEGEND_ENTRY
+
+%if LEGEND = OFF %then
+        %unset LEGEND_ENTRY
diff --git a/share/metview/etc/TableCommonDef b/share/metview/etc/TableCommonDef
new file mode 100644
index 0000000..4598df4
--- /dev/null
+++ b/share/metview/etc/TableCommonDef
@@ -0,0 +1,29 @@
+
+	TABLE_DELIMITER       { @ } = ','
+
+
+	TABLE_COMBINE_DELIMITERS
+    	[ help = help_script, help_script_command = 'echo "Consecutive delimiters will be considered as one"' ]
+    	{
+    	    	ON  ; ON 
+    	    	OFF ; OFF
+    	} = OFF
+
+
+	TABLE_HEADER_ROW
+    	[ help = help_script, help_script_command = 'echo "Which row (first is 1) is the header line on? 0 if no header row."' ]
+		{ @ } = 1
+
+
+	TABLE_DATA_ROW_OFFSET
+    	[ help = help_script, help_script_command = 'echo "How many rows after the header row does the data start? 1 if no header row."' ]
+    	{ @ } = 1
+
+	TABLE_META_DATA_ROWS
+    	[ help = help_script, help_script_command = 'echo "List of row indexes containing meta-data of the form P1=V1 P2=V2"' ]
+		{
+			/
+			@
+		}
+
+
diff --git a/share/metview/etc/TableReaderDef b/share/metview/etc/TableReaderDef
new file mode 100644
index 0000000..2b973ca
--- /dev/null
+++ b/share/metview/etc/TableReaderDef
@@ -0,0 +1,35 @@
+
+TABLE_READER; Table Reader Helper; Defines how to read an ASCII table file
+{
+	DATA
+		[ interface = icon, class = TABLE/GEOPOINTS/NOTE, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/System/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+
+	TABLE_FILENAME 
+		[ help = help_file_box ]
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+%include TableCommonDef
+
+	TABLE_COLUMNS
+    	[ help = help_script, help_script_command = 'echo "List of column indexes to selectively read (first is 1)"' ]
+		{
+			/
+			@
+		}
+
+	TABLE_COLUMN_TYPES
+    	[ help = help_script, help_script_command = 'echo "List of column data types (can be number/string)"' ]
+		{
+			/
+			@
+		}
+
+}
diff --git a/share/metview/etc/TableReaderRules b/share/metview/etc/TableReaderRules
new file mode 100644
index 0000000..e69de29
diff --git a/share/metview/etc/TextDef b/share/metview/etc/TextDef
new file mode 100755
index 0000000..5067d26
--- /dev/null
+++ b/share/metview/etc/TextDef
@@ -0,0 +1,720 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON
+             OFF ; OFF
+       }
+
+       COLOUR {
+			%include MagicsColors.h
+       }
+
+       LINE_STYLE {
+             SOLID      ; SOLID
+             DOT        ; DOT
+             DASH       ; DASH
+             CHAIN_DOT  ; CHAIN_DOT
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       }
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+
+PTEXT   ; TEXT    ; MAGICS
+{
+	TEXT_AUTOMATIC
+	{
+ 		YES 	; YES
+ 		NO	; NO
+	} = YES
+
+	TEXT_USER
+	{
+ 		YES 	; YES
+ 		NO	; NO
+	} = NO
+
+	TEXT_MERGE
+	[ visible = false ]
+	{
+ 		YES 	; YES
+ 		NO	; NO
+	} = NO
+
+	TEXT_ORIGIN
+	[ visible = false ]
+	{
+		AUTOMATIC	; AUTOMATIC
+		BOTH		; BOTH
+		MERGE		; MERGE
+		USER		; USER
+		NONE		; NONE
+		NOTSET		; NOTSET
+	} = NOTSET
+
+        TEXT_LINE_1
+        {
+                @
+        } = " "
+
+        TEXT_LINE_2
+        {
+                @
+        } = " "
+
+        TEXT_LINE_3
+        {
+                @
+        } = " "
+
+        TEXT_LINE_4
+        {
+                @
+        } = " "
+
+        TEXT_LINE_5
+        {
+                @
+        } = " "
+
+        TEXT_LINE_6
+        {
+                @
+        } = " "
+
+        TEXT_LINE_7
+        {
+                @
+        } = " "
+
+        TEXT_LINE_8
+        {
+                @
+        } = " "
+
+        TEXT_LINE_9
+        {
+                @
+        } = " "
+
+        TEXT_LINE_10
+        {
+                @
+        } = " "
+
+        TEXT_FIRST_LINE
+        {
+                1
+                2
+                3
+                4
+                5
+                6
+                7
+                8
+                9
+                10
+        } = 1
+
+        TEXT_LINE_COUNT
+        {
+                1
+                2
+                3
+                4
+                5
+                6
+                7
+                8
+                9
+                10
+        } = 1
+
+        TEXT_PARAMETER_ESCAPE_CHARACTER
+        {
+                @
+        } = '@'
+
+        TEXT_INSTRUCTION_SHIFT_CHARACTER
+        {
+                @
+        } = '\\'
+
+        TEXT_META_FIELD_ESCAPE_CHARACTER
+        {
+                @
+        } = '!'
+
+	GRIB_TEXT_UNITS
+	{
+		&PARAMSHARE&ONOFF
+	} = OFF
+
+	TEXT_REDUCTION_LEVEL
+	{
+		0	; 0
+		1	; 1
+		2	; 2
+	} = 0
+
+#		TEXT_ORDER_MODE
+#		{
+# 				AUTOMATIC 	; AUTOMATIC
+# 				USER		; USER
+#		} = AUTOMATIC
+
+#		TEXT_ORDER
+#		{
+#				@
+#				/
+#		} = 1/2/3/4/5/6/7/8/9/10
+
+        TEXT_MODE
+        {
+                TITLE      ; TITLE
+                POSITIONAL ; POSITIONAL
+        } = TITLE
+
+        TEXT_BOX_X_POSITION
+        {
+                @
+        } = 2.08
+
+        TEXT_BOX_Y_POSITION
+        {
+                @
+        } = 18.9
+
+        TEXT_BOX_X_LENGTH
+        {
+                @
+        } = 25.245
+
+        TEXT_BOX_Y_LENGTH
+        {
+                @
+        } = 2.1
+
+        TEXT_BOX_BLANKING
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        TEXT_REFERENCE_CHARACTER_HEIGHT
+        {
+                @
+        } = 2.0
+
+#       TEXT_LINE_SPACE_RATIO
+#       {
+#               @
+#       } = 1.5
+#
+        TEXT_QUALITY
+        {
+                 &PARAMSHARE&QUALITY
+        } = MEDIUM
+
+        TEXT_JUSTIFICATION
+        {
+                CENTRE     ; CENTRE
+                LEFT       ; LEFT
+                RIGHT      ; RIGHT
+        } = CENTRE
+
+        TEXT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+        TEXT_LINE_HEIGHT_RATIO_1
+    	[ visible = false ]
+	{
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_2
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_3
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_4
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_5
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_6
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_7
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_8
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_9
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+        TEXT_LINE_HEIGHT_RATIO_10
+    	[ visible = false ]
+        {
+               @
+        } = 1.0
+
+#       TEXT_INTEGER_1
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_2
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_3
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_4
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_5
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_6
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_7
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_8
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_9
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_INTEGER_10
+#       {
+#               *
+#       } = 0
+#
+#       TEXT_REAL_1
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_2
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_3
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_4
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_5
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_6
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_7
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_8
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_9
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_REAL_10
+#       {
+#               @
+#       } = 0.
+#
+#       TEXT_CHARACTER_1
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_2
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_3
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_4
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_5
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_6
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_7
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_8
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_9
+#       {
+#               @
+#       } = " "
+#
+#       TEXT_CHARACTER_10
+#       {
+#               @
+#       } = " "
+#
+        TEXT_BORDER
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        TEXT_BORDER_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+        TEXT_BORDER_LINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+
+        TEXT_BORDER_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+
+        TEXT_TITLES_TABLE_USE
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+		TEXT_LEGEND_MAGICS_STYLE
+		{
+				&PARAMSHARE&ONOFF
+		} = OFF
+
+    	TEXT_LEGEND_BOX_BLANKING
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+		LEGEND_POSITIONING
+		{
+ 				AUTOMATIC	; AUTOMATIC
+ 				INSIDE		; INSIDE
+ 				OUTSIDE		; OUTSIDE
+		} = AUTOMATIC
+
+		LEGEND_SUBPAGE_POSITION
+		{
+				BOTTOM_RIGHT	; BOTTOM_RIGHT
+				TOP_RIGHT		; TOP_RIGHT
+				TOP_LEFT		; TOP_LEFT
+				BOTTOM_LEFT		; BOTTOM_LEFT
+		} = BOTTOM_RIGHT
+
+ 		LEGEND_ENTRY_PLOT_DIRECTION
+    	{
+        		ROW
+        		COLUMN
+    	} = ROW
+
+   	 	LEGEND_COLUMN_COUNT
+    	{
+        		*
+    	} = 0
+
+		LEGEND_BOX_MODE
+		{
+				AUTOMATIC		; AUTOMATIC
+				POSITIONAL		; POSITIONAL
+		} = AUTOMATIC
+
+	 	LEGEND_DISPLAY_TYPE
+    	{
+    	        DISJOINT    ; DISJOINT
+    	        CONTINUOUS  ; CONTINUOUS
+    	} = DISJOINT
+
+    	LEGEND_BOX_X_POSITION
+    	{
+        		@
+    	} = 0.0
+
+    	LEGEND_BOX_Y_POSITION
+    	{
+        		@
+    	} = 0.0
+
+    	LEGEND_BOX_X_LENGTH
+    	{
+        		@
+    	} = 1.0
+
+    	LEGEND_BOX_Y_LENGTH
+    	{
+        		@
+    	} = 1.0
+
+    	LEGEND_TITLE
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+    	LEGEND_TITLE_TEXT
+    	{
+        		@
+    	} = 'LEGEND'
+
+ 		LEGEND_TEXT_QUALITY
+    	{
+    		    &PARAMSHARE&QUALITY
+   	 	} = LOW
+
+    	LEGEND_TEXT_MAXIMUM_HEIGHT
+    	{
+    		    @
+    	} = 0.4
+
+        LEGEND_TEXT_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+
+    	LEGEND_BOX_BLANKING
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+    	LEGEND_BORDER
+    	{
+        		&PARAMSHARE&ONOFF
+    	} = OFF
+
+    	LEGEND_BORDER_COLOUR
+    	{
+    		    &PARAMSHARE&COLOUR
+    	} = BLUE
+
+    	LEGEND_BORDER_LINE_STYLE
+    	{
+        		&PARAMSHARE&LINE_STYLE
+    	} = SOLID
+
+    	LEGEND_BORDER_THICKNESS
+    	{
+        		&PARAMSHARE&THICKNESS
+    	} = 1
+
+    	LEGEND_ENTRY_MAXIMUM_HEIGHT
+   	{
+        		@
+    	} = 1.0
+
+    	LEGEND_ENTRY_MINIMUM_HEIGHT
+    	{
+        		@
+    	} = 0.15
+
+    	LEGEND_ENTRY_MAXIMUM_WIDTH
+    	{
+        		@
+    	} = 4.0
+
+    	LEGEND_ENTRY_MINIMUM_WIDTH
+    	{
+        		@
+    	} = 1.2
+
+        LEGEND_TEXT_FORMAT
+        {
+                @
+        } = '(AUTOMATIC)'
+
+	LEGEND_SYMBOL_HEIGHT_MODE
+    	{
+    	        AS_MAP    ; AS_MAP
+    	        AS_TEXT   ; AS_TEXT
+    	} = AS_MAP
+
+#    	LEGEND_ENTRY_X_GAP
+#    	{
+#        		@
+#    	} = 0.2
+#
+#    	LEGEND_ENTRY_Y_GAP
+#    	{
+#        		@
+#    	} = 0.2
+#
+#   	IMAGE_LEGEND_BOX_X_POSITION
+#   	{
+#       		@
+#   	} = 0.0
+
+#   	IMAGE_LEGEND_BOX_Y_POSITION
+#   	{
+#       		@
+#   	} = 0.0
+
+#   	IMAGE_LEGEND_BOX_X_LENGTH
+#   	{
+#       		@
+#   	} = 1.0
+
+#   	IMAGE_LEGEND_BOX_Y_LENGTH
+#   	{
+#       		@
+#   	} = 1.0
+
+#   	IMAGE_LEGEND_TITLE
+#   	{
+#       		&PARAMSHARE&ONOFF
+#   	} = OFF
+
+#   	IMAGE_LEGEND_TITLE_TEXT
+#   	{
+#       		@
+#   	} = 'LEGEND'
+
+#   	IMAGE_LEGEND_TEXT_QUALITY
+#   	{
+#       		&PARAMSHARE&QUALITY
+#   	} = MEDIUM
+
+#   	IMAGE_LEGEND_TEXT_COLOUR
+#   	{
+#       		&PARAMSHARE&COLOUR
+#   	} = BLUE
+
+#   	IMAGE_LEGEND_BORDER
+#   	{
+#       		&PARAMSHARE&ONOFF
+#   	} = ON
+
+#   	IMAGE_LEGEND_BORDER_COLOUR
+#   	{
+#       		&PARAMSHARE&COLOUR
+#   	} = BLUE
+
+#   	IMAGE_LEGEND_BORDER_LINE_STYLE
+#   	{
+#       		&PARAMSHARE&LINE_STYLE
+#   	} = SOLID
+
+#   	IMAGE_LEGEND_BORDER_THICKNESS
+#   	{
+#   		    &PARAMSHARE&THICKNESS
+#   	} = 1
+
+#   	IMAGE_LEGEND_BOX_BLANKING
+#   	{
+#       		&PARAMSHARE&ONOFF
+#   	} = OFF
+
+}  ! end of PTEXT
diff --git a/share/metview/etc/TextRules b/share/metview/etc/TextRules
new file mode 100755
index 0000000..0473712
--- /dev/null
+++ b/share/metview/etc/TextRules
@@ -0,0 +1,100 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+#%if TEXT_ORDER_MODE = AUTOMATIC %then
+#	%unset TEXT_ORDER
+
+%if TEXT_USER = NO %then
+    %unset TEXT_LINE_1
+    %unset TEXT_LINE_2
+    %unset TEXT_LINE_3
+    %unset TEXT_LINE_4
+    %unset TEXT_LINE_5
+    %unset TEXT_LINE_6
+    %unset TEXT_LINE_7
+    %unset TEXT_LINE_8
+    %unset TEXT_LINE_9
+    %unset TEXT_LINE_10
+#    %unset TEXT_FIRST_LINE
+    %unset TEXT_LINE_COUNT
+#	%unset TEXT_PARAMETER_ESCAPE_CHARACTER
+#	%unset TEXT_INSTRUCTION_SHIFT_CHARACTER
+#	%unset TEXT_META_FIELD_ESCAPE_CHARACTER
+
+%if TEXT_MODE = TITLE %then
+	%unset TEXT_BOX_X_POSITION
+	%unset TEXT_BOX_Y_POSITION
+	%unset TEXT_BOX_X_LENGTH
+	%unset TEXT_BOX_Y_LENGTH
+    %unset TEXT_BOX_BLANKING
+
+%if TEXT_BORDER = OFF %then
+	%unset TEXT_BORDER_COLOUR
+	%unset TEXT_BORDER_THICKNESS
+	%unset TEXT_BORDER_LINE_STYLE
+
+%if TEXT_LEGEND_MAGICS_STYLE = ON %then
+    %unset TEXT_LEGEND_BOX_BLANKING
+
+%if TEXT_LEGEND_MAGICS_STYLE = OFF %then
+    %unset LEGEND_ENTRY_PLOT_DIRECTION
+    %unset LEGEND_COLUMN_COUNT
+
+%if LEGEND_TITLE = OFF %then
+    %unset LEGEND_TITLE_TEXT
+
+%if LEGEND_BORDER = OFF %then
+    %unset LEGEND_BORDER_COLOUR
+    %unset LEGEND_BORDER_THICKNESS
+    %unset LEGEND_BORDER_LINE_STYLE
+
+%if LEGEND_BOX_MODE = AUTOMATIC %then
+	%unset LEGEND_BOX_X_POSITION
+	%unset LEGEND_BOX_Y_POSITION
+	%unset LEGEND_BOX_X_LENGTH
+	%unset LEGEND_BOX_Y_LENGTH
+    %unset LEGEND_BOX_BLANKING
+
+%if LEGEND_BOX_MODE = POSITIONAL %or TEXT_LEGEND_MAGICS_STYLE = ON %then
+    %unset LEGEND_POSITIONING
+    %unset LEGEND_SUBPAGE_POSITION
+
+%if IMAGE_LEGEND_TITLE = OFF %then
+    %unset IMAGE_LEGEND_TITLE_TEXT
+
+%if IMAGE_LEGEND_BORDER = OFF %then
+    %unset IMAGE_LEGEND_BORDER_COLOUR
+    %unset IMAGE_LEGEND_BORDER_THICKNESS
+    %unset IMAGE_LEGEND_BORDER_LINE_STYLE
+
+%if LEGEND_POSITIONING = AUTOMATIC %or LEGEND_POSITIONING = OUTSIDE %then
+    %unset LEGEND_SUBPAGE_POSITION
diff --git a/share/metview/etc/VelstrDef b/share/metview/etc/VelstrDef
new file mode 100755
index 0000000..73aba87
--- /dev/null
+++ b/share/metview/etc/VelstrDef
@@ -0,0 +1,100 @@
+VELSTR_FAMILY; APPLICATION
+{
+	APPLICATION {
+		VELPOT
+		STREAMFN
+	} = VELPOT
+}
+
+VELPOT; blabla; Computes velocity potential
+{
+	DATA
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Velocity Potential,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = D, DATE=-1,
+				    LEVELIST=500) 
+	]
+
+	{ @ }
+
+	TRUNCATION
+	{
+	  *
+	  AV; AV
+	} = 213
+
+	SMOOTHING
+	{
+	  YES; Y
+	  NO; N
+	} = N
+
+	SCALING
+	[ visible = false ]
+	{
+	  YES; Y
+	  NO;  N
+	} = Y
+
+	FLTC
+	{
+	  *
+	} = 19.4
+
+	MFLTEXP
+	{
+	  *
+	} = 2
+}
+
+STREAMFN; blabla; Computes Stream Function
+{
+	DATA
+	[ 
+		interface	= icon,
+		class		= GRIB,
+		exclusive	= true,
+		help            = help_data,
+		help_directory  = '/Metview/Defaults',
+		help_name       = Data for Stream Function,
+		help_class      = RETRIEVE,
+		help_definition = ( RETRIEVE, PARAM = VO, DATE=-1,
+				    LEVELIST=500) 
+	]
+
+	{ @ }
+
+	TRUNCATION
+	{
+	  *
+	  AV; AV
+	} = 213
+
+	SMOOTHING
+	{
+	  YES; Y
+	  NO; N
+	} = N
+
+	SCALING
+	{
+	  YES; Y
+	  NO;  N
+	} = Y
+
+	FLTC
+	{
+	  *
+	} = 19.4
+
+	MFLTEXP
+	{
+	  *
+	} = 2
+}
diff --git a/share/metview/etc/VelstrRules b/share/metview/etc/VelstrRules
new file mode 100644
index 0000000..ae0b0cf
--- /dev/null
+++ b/share/metview/etc/VelstrRules
@@ -0,0 +1 @@
+%if SMOOTHING = N %then %unset FLTC %unset MFLTEXP
diff --git a/share/metview/etc/VoidDef b/share/metview/etc/VoidDef
new file mode 100644
index 0000000..947f5b4
--- /dev/null
+++ b/share/metview/etc/VoidDef
@@ -0,0 +1,4 @@
+PVOID   ; Void  ; MAGICS
+{
+
+}
diff --git a/share/metview/etc/WidgetDef b/share/metview/etc/WidgetDef
new file mode 100644
index 0000000..81e91db
--- /dev/null
+++ b/share/metview/etc/WidgetDef
@@ -0,0 +1,205 @@
+slider; User Interface; Scale widget
+{
+	name 	 { @ } = slider
+	values   { @ } = '*'
+	default  { * } = 0
+	min 	 { * } = 0
+	max 	 { * } = 100
+	step 	 { * } = 10
+	direction {
+		max_on_left
+		max_on_right
+	} = max_on_right
+	exclusive { true } = true
+
+}
+
+icon; User Interface; Drag an Drop Widget
+{
+	name 	{ @   } = icon
+	class	{ @ / }
+	exclusive    { 
+		true
+		false
+	} = true
+	values  { @ / } = '@'
+	default { @ / }
+}
+	
+toggle; User Interface; Toggle Widget
+{
+	name 	  { @   } = toggle
+	exclusive    { true } = true
+	true 	  { @   } = on
+	false     { @   } = off
+	values    { @ / } = on/off
+	default   { @   } = on
+}
+
+on_off; User Interface; Toggle Widget
+{
+	name 	  { @   } = toggle
+	exclusive    { true } = true
+	true 	  { @   } = on
+	false     { @   } = off
+	values    { @ / } = on/off
+	default   { @   } = on
+}
+
+checkbox; User Interface; Checkbox Widget
+{
+	name 	  { @   } = checkbox
+	exclusive    { true } = true
+	true 	  { @   } = on
+	false     { @   } = off
+	values    { @ / } = on/off
+	default   { @   } = on
+}
+
+menu;  User Interface; Widget
+{
+	name 	 { @   } = menu
+	values   { @ / } = a/b/c
+	default  { @ / } = a
+	source   { @   } = '*'
+	exclusive    { false } = false
+}
+
+
+option_menu;  User Interface; Widget
+{
+	name      { @ } = option_menu
+	values    { @ } = a/b/c
+	default   { @ } = a
+	source    { @ } = '*'
+	exclusive    { true } = true
+	beautify    { 
+		true
+		false
+	} = true
+
+}
+
+colour; User Interface; Colour Widget
+{
+	name     { @   } = colour
+	values   { @ / } = 
+             WHITE                           /
+             CHARCOAL                        /
+             GREY                            /
+             BLACK                           /
+             RED                             /
+             CHESTNUT                        /
+             ORANGISH_RED                    /
+             CORAL                           /
+             BRICK                           /
+             RED_ORANGE                      /
+             BROWN                           /
+             PEACH                           /
+             RUST                            /
+             REDDISH_ORANGE                  /
+             TANGERINE                       /
+             ORANGE                          /
+             OCHRE                           /
+             CREAM                           /
+             BEIGE                           /
+             TAN                             /
+             KHAKI                           /
+             MUSTARD                         /
+             YELLOWISH_ORANGE                /
+             GOLD                            /
+             ORANGE_YELLOW                   /
+             ORANGISH_YELLOW                 /
+             YELLOW                          /
+             GREENISH_YELLOW                 /
+             OLIVE                           /
+             AVOCADO                         /
+             YELLOW_GREEN                    /
+             YELLOWISH_GREEN                 /
+             GREEN                           /
+             KELLY_GREEN                     /
+             BLUISH_GREEN                    /
+             EVERGREEN                       /
+             TURQUOISE                       /
+             BLUE_GREEN                      /
+             CYAN                            /
+             GREENISH_BLUE                   /
+             SKY                             /
+             NAVY                            /
+             BLUE                            /
+             PURPLISH_BLUE                   /
+             LAVENDER                        /
+             BLUE_PURPLE                     /
+             VIOLET                          /
+             BLUISH_PURPLE                   /
+             MAGENTA                         /
+             PURPLE                          /
+             REDDISH_PURPLE                  /
+             PURPLE_RED                      /
+             ROSE                            /
+             BURGUNDY                        /
+             PURPLISH_RED                    /
+             PINK                             
+	default  { @   } = RED
+
+	exclusive    { true 
+	false } = true
+
+	help  { help_colour } = help_colour
+}
+
+any; User Interface; TextField Widget
+{
+    name 	  { @ } = any
+    values    { @ } = '@'
+    default   { @ } = default
+ 
+#	exclusive    { false } = false
+	exclusive    { true 
+	false } = false
+
+	help  {
+		help_input
+		help_script
+		help_multiple_selection
+		help_file_box
+	} 
+
+	input_type {
+		point
+		line
+		area
+	} = line
+	input_window { @ } = '/Metview/Defaults/Input Window' 
+
+	help_script_command { @ } 
+	
+}
+
+integer; User Interface; TextField Widget
+{
+    name 	  { @ } = integer
+    values    { @ } = '*'
+    default   { @ } = 0
+	exclusive    { false } = false
+}
+
+ui_integer; User Interface; TextField Widget
+{
+    name 	  { @ } = ui_integer
+    values    { @ } = '*'
+    default   { @ } = 0  
+    min	      { @ } = '*'
+    max	      { @ } = '*'
+    exclusive    { false } = false
+}
+
+ui_float; User Interface; TextField Widget
+{
+    name 	  { @ } = ui_float
+    values    { @ } = '*'
+    default   { @ } = 0
+    min	      { @ } = '*'
+    max	      { @ } = '*'
+    exclusive    { false } = false
+}
diff --git a/share/metview/etc/WindDef b/share/metview/etc/WindDef
new file mode 100755
index 0000000..e53f43c
--- /dev/null
+++ b/share/metview/etc/WindDef
@@ -0,0 +1,351 @@
+PARAMSHARE ; ParamShare; PARAMSHARE
+{
+       ONOFF {
+             ON  ; ON 
+             OFF ; OFF
+       }
+ 
+       COLOUR {
+			%include MagicsColors.h
+       } 
+
+       LINE_STYLE {
+             SOLID      ; SOLID     
+             DOT        ; DOT       
+             DASH       ; DASH      
+             CHAIN_DOT  ; CHAIN_DOT 
+             CHAIN_DASH ; CHAIN_DASH
+       }
+
+       MARKER {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+       }
+
+       QUALITY {
+             LOW        ; LOW
+             MEDIUM     ; MEDIUM
+             HIGH       ; HIGH
+       } 
+
+       SHADING {
+             DOT        ; DOT
+             HATCH      ; HATCH
+             AREA_FILL  ; AREA_FILL
+       }
+
+       THICKNESS {
+             1        ; 1
+             2        ; 2
+             3        ; 3
+             4        ; 4
+             5        ; 5
+             6        ; 6
+             7        ; 7
+             8        ; 8
+             9        ; 9
+            10        ; 10
+       }
+}
+ 
+PWIND   ; WIND    ; MAGICS
+{
+	LEGEND {
+                 &PARAMSHARE&ONOFF
+	} = OFF
+
+	LEGEND_USER_TEXT {
+		@
+	} = ''
+
+   LEGEND_ENTRY
+    [
+        interface       = icon,
+        class           = LEGENDENTRY,
+        exclusive       = true,
+        help            = help_data,
+        help_directory  = '/Metview/Defaults',
+        help_name       = Legend Entry for Wind Plotting,
+        help_class      = LEGENDENTRY
+    ]
+    {
+        @
+    }
+
+        WIND_THINNING_FACTOR
+        {
+                @
+        } = 2.0
+ 
+        WIND_FIELD_TYPE
+        {
+                ARROWS       ; ARROWS      
+                FLAGS        ; FLAGS       
+                STREAMLINES  ; STREAMLINES 
+        } = ARROWS
+ 
+        WIND_FLAG_LENGTH
+        {
+                @
+        } = 1.0
+ 
+#		WIND_FLAG_LINE_STYLE
+#		{
+#			SOLID
+#			DASH
+#			DOT
+#		} = SOLID
+
+        WIND_FLAG_MODE
+        {
+                NORMAL     ; NORMAL    
+                OFF_LEVEL  ; OFF_LEVEL 
+                OFF_TIME   ; OFF_TIME  
+        } = NORMAL
+ 
+        WIND_FLAG_ORIGIN_MARKER
+        {
+                CIRCLE     ; CIRCLE
+                DOT        ; DOT
+                OFF        ; OFF
+        } = CIRCLE
+ 
+        WIND_FLAG_MIN_SPEED
+        {
+                @
+        } = '-1.0E21'
+ 
+        WIND_FLAG_MAX_SPEED
+        {
+                @
+        } = 1.0E21
+ 
+        WIND_FLAG_CALM_INDICATOR
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        WIND_FLAG_CALM_INDICATOR_SIZE
+        {
+                @
+        } = 0.2
+ 
+        WIND_FLAG_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        WIND_FLAG_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        WIND_FLAG_CROSS_BOUNDARY
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+#		WIND_ARROW_LINE_STYLE
+#		{
+#			SOLID
+#			DASH
+#			DOT
+#		} = SOLID
+
+        WIND_ARROW_UNIT_VELOCITY
+        {
+                @
+        } = 25.0
+ 
+        WIND_ARROW_MIN_SPEED
+        {
+                @
+        } = '-1.0E21'
+ 
+        WIND_ARROW_MAX_SPEED
+        {
+                @
+        } = 1.0E21
+ 
+        WIND_ARROW_CALM_INDICATOR
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        WIND_ARROW_CALM_INDICATOR_SIZE
+        {
+                @
+        } = 0.2
+ 
+        WIND_ARROW_CALM_BELOW
+        {
+                @
+        } = 0.5
+ 
+        WIND_ARROW_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 1
+ 
+        WIND_ARROW_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        WIND_ARROW_CROSS_BOUNDARY
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        WIND_ARROW_HEAD_INDEX
+        {
+                *
+        } = 22
+ 
+        WIND_ARROW_ORIGIN_POSITION
+        {
+                CENTRE    ; CENTRE
+                TAIL      ; TAIL
+        } = TAIL
+ 
+        WIND_ARROW_LEGEND
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        WIND_ARROW_LEGEND_X_POSITION
+        {
+                @
+        } = 0.0
+ 
+        WIND_ARROW_LEGEND_Y_POSITION
+        {
+                @
+        } = 0.0
+ 
+        WIND_ARROW_LEGEND_X_LENGTH
+        {
+                @
+        } = 1.2
+ 
+        WIND_ARROW_LEGEND_Y_LENGTH
+        {
+                @
+        } = 0.6
+ 
+        WIND_ARROW_LEGEND_BLANKING
+        {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+ 
+        WIND_STREAMLINE_MIN_DENSITY
+        {
+                @
+        } = 1.0
+ 
+        WIND_STREAMLINE_MIN_SPEED
+        {
+                @
+        } = 1.0
+ 
+        WIND_STREAMLINE_CLOSENESS_CHECK
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        WIND_STREAMLINE_CLOSENESS_MARGIN
+        {
+                @
+        } = 0.2
+ 
+        WIND_STREAMLINE_THICKNESS
+        {
+                 &PARAMSHARE&THICKNESS
+        } = 2
+ 
+        WIND_STREAMLINE_COLOUR
+        {
+                 &PARAMSHARE&COLOUR
+        } = BLUE
+ 
+        WIND_STREAMLINE_STYLE
+        {
+                 &PARAMSHARE&LINE_STYLE
+        } = SOLID
+ 
+        WIND_STREAMLINE_CALM_MARKER
+        {
+                 &PARAMSHARE&ONOFF
+        } = ON
+ 
+        WIND_STREAMLINE_MARKER_INDEX
+        {
+                 &PARAMSHARE&MARKER
+        } = 3
+ 
+        WIND_STREAMLINE_MARKER_HEIGHT
+        {
+                @
+        } = 0.2
+ 
+        WIND_STREAMLINE_ARROW_HEAD_INDEX
+        {
+                *
+        } = 1
+ 
+        WIND_STREAMLINE_ARROW_HEAD_LENGT
+        {
+                @
+        } = 0.3
+ 
+		INPUT_FIELD_ORGANIZATION
+		[ visible = false ]
+		{
+			REGULAR
+			FITTED
+			GAUSSIAN
+		} = REGULAR
+ 
+        INPUT_FIELD_SUPPRESS_ABOVE
+        {
+                 @
+         } = 1.0E21
+
+        INPUT_FIELD_SUPPRESS_BELOW
+        {
+                 @
+         } = -1.0E21
+
+        GRIB_SPECTRAL_RESOLUTION
+        {
+                 @
+        } = 1.5
+
+        GRIB_MISSING_VALUE_INDICATOR {
+                 @
+        } = -1.5E21
+
+        GRIB_TEXT {
+                 &PARAMSHARE&ONOFF
+        } = ON
+
+        GRIB_TEXT_SPLIT {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        GRIB_TEXT_UNITS {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        GRIB_TEXT_EXPERIMENT {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+        GRIB_TEXT_PLOT_TYPE {
+                 &PARAMSHARE&ONOFF
+        } = OFF
+
+} ! end of PWIND  
diff --git a/share/metview/etc/WindRules b/share/metview/etc/WindRules
new file mode 100755
index 0000000..c93d955
--- /dev/null
+++ b/share/metview/etc/WindRules
@@ -0,0 +1,149 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+
+%if LEGEND = OFF %then 
+    %unset LEGEND_USER_TEXT
+    %unset LEGEND_ENTRY
+
+%if WIND_FIELD_TYPE = FLAGS %then
+        %unset WIND_ARROW_UNIT_VELOCITY
+        %unset WIND_ARROW_MAX_SPEED
+        %unset WIND_ARROW_MIN_SPEED
+        %unset WIND_ARROW_CALM_INDICATOR
+        %unset WIND_ARROW_CALM_INDICATOR_SIZE
+        %unset WIND_ARROW_THICKNESS
+        %unset WIND_ARROW_COLOUR
+        %unset WIND_ARROW_CROSS_BOUNDARY
+        %unset WIND_ARROW_HEAD_INDEX
+        %unset WIND_ARROW_ORIGIN_POSITION
+        %unset WIND_ARROW_LEGEND
+        %unset WIND_ARROW_LEGEND_X_POSITION
+        %unset WIND_ARROW_LEGEND_Y_POSITION
+        %unset WIND_ARROW_LEGEND_X_LENGTH
+        %unset WIND_ARROW_LEGEND_Y_LENGTH
+        %unset WIND_ARROW_LEGEND_BLANKING
+        %unset WIND_STREAMLINE_MIN_DENSITY
+        %unset WIND_STREAMLINE_MIN_SPEED
+        %unset WIND_STREAMLINE_CLOSENESS_CHECK
+        %unset WIND_STREAMLINE_CLOSENESS_MARGIN
+        %unset WIND_STREAMLINE_THICKNESS
+        %unset WIND_STREAMLINE_COLOUR
+        %unset WIND_STREAMLINE_STYLE
+        %unset WIND_STREAMLINE_CALM_MARKER
+        %unset WIND_STREAMLINE_MARKER_INDEX
+        %unset WIND_STREAMLINE_MARKER_HEIGHT
+        %unset WIND_STREAMLINE_ARROW_HEAD_INDEX
+        %unset WIND_STREAMLINE_ARROW_HEAD_LENGT
+#       %unset WIND_ARROW_CALM_BELOW
+#		%unset WIND_ARROW_LINE_STYLE
+
+%if WIND_FIELD_TYPE = FLAGS %and WIND_FLAG_CALM_INDICATOR = OFF %then
+        %unset WIND_FLAG_CALM_INDICATOR_SIZE
+
+%if WIND_FIELD_TYPE = ARROWS %then
+        %unset WIND_FLAG_LENGTH
+        %unset WIND_FLAG_MODE
+        %unset WIND_FLAG_ORIGIN_MARKER
+        %unset WIND_FLAG_MAX_SPEED
+        %unset WIND_FLAG_MIN_SPEED
+        %unset WIND_FLAG_CALM_INDICATOR
+        %unset WIND_FLAG_CALM_INDICATOR_SIZE
+        %unset WIND_FLAG_THICKNESS
+        %unset WIND_FLAG_COLOUR
+        %unset WIND_FLAG_CROSS_BOUNDARY
+        %unset WIND_STREAMLINE_MIN_DENSITY
+        %unset WIND_STREAMLINE_MIN_SPEED
+        %unset WIND_STREAMLINE_CLOSENESS_CHECK
+        %unset WIND_STREAMLINE_CLOSENESS_MARGIN
+        %unset WIND_STREAMLINE_THICKNESS
+        %unset WIND_STREAMLINE_COLOUR
+        %unset WIND_STREAMLINE_STYLE
+        %unset WIND_STREAMLINE_CALM_MARKER
+        %unset WIND_STREAMLINE_MARKER_INDEX
+        %unset WIND_STREAMLINE_MARKER_HEIGHT
+        %unset WIND_STREAMLINE_ARROW_HEAD_INDEX
+        %unset WIND_STREAMLINE_ARROW_HEAD_LENGT
+#		%unset WIND_FLAG_LINE_STYLE
+
+%if WIND_FIELD_TYPE = ARROWS %and WIND_ARROW_CALM_INDICATOR = OFF %then
+        %unset WIND_ARROW_CALM_INDICATOR_SIZE
+#       %unset WIND_ARROW_CALM_BELOW
+
+%if WIND_FIELD_TYPE = ARROWS %and WIND_ARROW_LEGEND = OFF %then
+        %unset WIND_ARROW_LEGEND_X_POSITION
+        %unset WIND_ARROW_LEGEND_Y_POSITION
+        %unset WIND_ARROW_LEGEND_X_LENGTH
+        %unset WIND_ARROW_LEGEND_Y_LENGTH
+        %unset WIND_ARROW_LEGEND_BLANKING
+
+%if WIND_FIELD_TYPE = STREAMLINES %then
+        %unset WIND_FLAG_LENGTH
+        %unset WIND_FLAG_MODE
+        %unset WIND_FLAG_ORIGIN_MARKER
+        %unset WIND_FLAG_MAX_SPEED
+        %unset WIND_FLAG_MIN_SPEED
+        %unset WIND_FLAG_CALM_INDICATOR
+        %unset WIND_FLAG_CALM_INDICATOR_SIZE
+        %unset WIND_FLAG_THICKNESS
+        %unset WIND_FLAG_COLOUR
+        %unset WIND_FLAG_CROSS_BOUNDARY
+        %unset WIND_ARROW_UNIT_VELOCITY
+        %unset WIND_ARROW_MAX_SPEED
+        %unset WIND_ARROW_MIN_SPEED
+        %unset WIND_ARROW_CALM_INDICATOR
+        %unset WIND_ARROW_CALM_INDICATOR_SIZE
+        %unset WIND_ARROW_THICKNESS
+        %unset WIND_ARROW_COLOUR
+        %unset WIND_ARROW_CROSS_BOUNDARY
+        %unset WIND_ARROW_HEAD_INDEX
+        %unset WIND_ARROW_ORIGIN_POSITION
+        %unset WIND_ARROW_LEGEND
+        %unset WIND_ARROW_LEGEND_X_POSITION
+        %unset WIND_ARROW_LEGEND_Y_POSITION
+        %unset WIND_ARROW_LEGEND_X_LENGTH
+        %unset WIND_ARROW_LEGEND_Y_LENGTH
+        %unset WIND_ARROW_LEGEND_BLANKING
+#       %unset WIND_ARROW_CALM_BELOW
+
+%if WIND_FIELD_TYPE = STREAMLINES %and WIND_STREAMLINE_CLOSENESS_CHECK = OFF %then
+        %unset WIND_STREAMLINE_CLOSENESS_MARGIN
+
+%if WIND_FIELD_TYPE = STREAMLINES %and WIND_STREAMLINE_CALM_MARKER = OFF %then
+        %unset WIND_STREAMLINE_MARKER_INDEX
+        %unset WIND_STREAMLINE_MARKER_HEIGHT
+
+%if GRIB_TEXT = OFF %then
+	%unset GRIB_TEXT_UNITS
+    	%unset GRIB_TEXT_EXPERIMENT
+	%unset GRIB_TEXT_PLOT_TYPE
+    	%unset GRIB_TEXT_SPLIT
diff --git a/share/metview/etc/dwd.def b/share/metview/etc/dwd.def
new file mode 100755
index 0000000..d0d6488
--- /dev/null
+++ b/share/metview/etc/dwd.def
@@ -0,0 +1,1061 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+#
+# PARAM {
+#    value1 ;  alias1 ; alias; alias ....
+#    /  if list ok
+#    @ any
+#    " quotted string
+#    * number 
+#    BY
+#    TO
+# } = default
+#
+#
+
+
+GRIB;  Local grib definition; DWD
+{
+	COUNTRY {
+		DE
+		ALL
+	} = DE
+
+	DBASE {
+	   NUMEX
+	   LME
+	   GME
+	   PEGASUS
+	   ALL
+	} = NUMEX
+
+	DATE {
+		*
+		/
+		ALL
+	} = 0
+
+	RKI { 
+		ROUTI
+		MOMIT
+		NOTFA
+		TRAJ
+		75x50
+		150xy
+		RLM01
+		RLM03
+		RLM02
+		COVER
+		MIXED
+		QUALI
+		TEMPO
+		POLAR
+		@
+		ALL
+	} = ROUTI
+
+	RTY [ namespace = dwd, split = 1, type = string ]  {
+		ASSIMILATION; A
+		B
+		C
+		D
+		H
+		HAUPTLAUF; MAIN RUN ; M
+		N
+		P
+		R
+		T
+		V
+		ALL
+
+	} = M
+
+    TY {
+     E128A 
+     GRIBS 
+     I128A 
+     I128F 
+     R128A 
+     R128F 
+     SGGM0 
+     SGGM1 
+     YBOVE 
+     YHOVE 
+     LM1AN 
+     LM1MO 
+     SGLM0 
+     E192A 
+     I192A 
+     I192F 
+     I256A 
+     I256F 
+     KWB02 
+     KWB03 
+     R192A 
+     R192F 
+     R256A 
+     R256F 
+     SGBSH 
+     YBLKL 
+     YDCOV 
+     YROUT 
+     YSTAT 
+     ANALY 
+     AN2MO 
+     B106A 
+     B106V 
+     DM3AN 
+     DM3MO 
+     DM4AN 
+     DM4MO 
+     ECENS 
+     ECMFM 
+     EGMES 
+     EM3AN 
+     EM3MO 
+     KWBCM 
+     KWB01 
+     LFMES 
+     LFMOD 
+     LFPWM 
+     MOMI3 
+     NORMW 
+     NORM3 
+     P106A 
+     SGBAL 
+     SGESH 
+     SGGLO 
+     SGMED 
+     SGNAT 
+     S106A 
+     S106V 
+     WAFSZ 
+     WAFTF 
+     WAMIT 
+     XSYNO 
+     YAERO 
+     YAREW 
+     YBLTZ 
+     YCLIM 
+     YDAER 
+     YEAER 
+     YGAER 
+     YKORR 
+     YPBLA 
+     YPGT4 
+     YRADA 
+     YSATT 
+     YSATW 
+     YSWAM 
+     YTBUS 
+     YTRAJ 
+     YTROP 
+     YWMON 
+     YWZNP 
+     ZABUF 
+     ZAGRA 
+     ZAIRP 
+     ZBUFR 
+     ZCLIM 
+     ZFCEC 
+     ZMETA 
+     ZMGEC 
+     ZPAOB 
+     ZPSYN 
+     ZRADA 
+     ZRADI 
+     ZSASU 
+     ZSATB 
+     ZSATM 
+     ZSATW 
+     ZSAVS 
+     ZSYNO 
+     ZTEMP 
+     ZTRAB 
+     ZVAIR 
+     ZVSAM 
+     ZVSYN 
+     ZVTEM 
+     ZVWPR 
+     ZWIEU 
+     ZWPRO 
+     BKFMO 
+     RBKFM 
+     BKNMO 
+     RBKNM 
+     RAN2M 
+     ASSMO 
+     RASSM 
+     MITLM 
+     RMITL 
+     IGELM 
+     RIGEL 
+     GLMIT 
+     B021V 
+     B042V 
+     B063V 
+     G106S 
+     S021V 
+     S042V 
+     S063V 
+     G106H 
+     AN1MO 
+     RAN1M 
+     EM4AN 
+     EM4MO 
+     EM3DA 
+     ECSMO 
+     EGRRM 
+     EGRRS 
+     WAFST 
+     GLFPW 
+     B021A 
+     B042A 
+     B063A 
+     S021A 
+     S042A 
+     S063A 
+     DKMIT 
+     SAFTA 
+     EZKLM 
+     EWOLF 
+     P021A 
+     P042A 
+     P063A 
+     P106R 
+     P021V 
+     P042V 
+     P063V 
+     P106V 
+     MEEM3 
+     ME106 
+     MEBKF 
+     GLOBA 
+     RMEM3 
+     RM106 
+     RMBKF 
+     GLOBV 
+     EMRHM 
+     BM1AN 
+     BM1MO 
+     TFSAN 
+     TFSMO 
+     LM1RA 
+     LM2AN 
+     LM2MO 
+     LM2RA 
+     LM3AN 
+     LM3MO 
+     LM3RA 
+     I032A 
+     I032F 
+     I048A 
+     I048F 
+     I064A 
+     I064F 
+     I096A 
+     I096F 
+     R032A 
+     R032F 
+     R048A 
+     R048F 
+     R064A 
+     R064F 
+     R096A 
+     R096F 
+     G032A 
+     G032F 
+     G048A 
+     G048F 
+     G064A 
+     G064F 
+     G096A 
+     G096F 
+     G128A 
+     G128F 
+     I016A 
+     I016F 
+     G016A 
+     G016F 
+     G192A 
+     G192F 
+     G256A 
+     G256F 
+     R016A 
+     R016F 
+     E016A 
+     E032A 
+     E048A 
+     E064A 
+     E096A 
+     E256A 
+     SGGM2 
+     SGGM3 
+	 I384A
+	 I384F
+	 R384A
+	 R384F
+	 E384A
+	 ALL
+	} = R128F
+
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/	
+		ALL
+	} 
+
+
+} ! END OF GRIB
+
+
+ARCHIVE ;   Archives data   ;   DWD
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		DE
+		ALL
+	} = DE
+
+	DBASE {
+	   NUMEX
+	   LME
+	   GME
+	   PEGASUS
+	   ALL
+	} = NUMEX
+
+	RKI { 
+		ROUTI
+		MOMIT
+		NOTFA
+		TRAJ
+		75x50
+		150xy
+		RLM01
+		RLM03
+		RLM02
+		COVER
+		MIXED
+		QUALI
+		TEMPO
+		POLAR
+		@
+		ALL
+	} = ROUTI
+
+	RTY [ namespace = dwd, split = 1, type = string ]  {
+		ASSIMILATION; A
+		B
+		C
+		D
+		H
+		HAUPTLAUF; MAIN RUN ; M
+		N
+		P
+		R
+		T
+		V
+		ALL
+
+	} = M
+
+    TY {
+	&GRIB&TY
+	} = R128F
+
+    EXPVER  
+    {
+        *       
+    } 
+    
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/	
+		ALL
+	} 
+
+    PARAM { 
+		* 
+		/
+		ALL
+	} 
+
+	TIME {
+		*
+		/
+		ALL
+	}
+
+	DATE {
+		*
+		/
+		ALL
+	}
+
+    STEP { 
+		* 
+		/
+		ALL
+	} 
+
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } 
+    
+
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} = marsms
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	STREAM {
+		@
+	}
+
+	TYPE {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	DOMAIN {
+		@
+	}
+
+	GRIB {
+		@
+	}
+
+	DUPLICATE {
+		@
+	}
+
+} ! END OF ARCHIVE
+
+LIST ;   list data   ;   DWD
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		DE
+		ALL
+	} = DE
+
+	DBASE {
+	   NUMEX
+	   LME
+	   GME
+	   PEGASUS
+	   ALL
+	} = NUMEX
+
+	RKI  {
+		ROUTI
+		MOMIT
+		NOTFA
+		TRAJ
+		75x50
+		150xy
+		RLM01
+		RLM03
+		RLM02
+		COVER
+		MIXED
+		QUALI
+		TEMPO
+		POLAR
+		*
+		ALL
+	} = ROUTI
+
+	RTY [ namespace = dwd, split = 1, type = string ]  {
+		ASSIMILATION; A
+		B
+		C
+		D
+		H
+		HAUPTLAUF; MAIN RUN ; M
+		N
+		P
+		R
+		T
+		V
+		ALL
+
+	} = M
+
+    TY {
+	&GRIB&TY
+	} = R128F
+
+    EXPVER  
+    {
+		@
+        *       
+    } 
+    
+    LEVTYPE { 
+		* 
+		/
+		ALL
+	} 
+
+    PARAM { 
+		* 
+		/
+		ALL
+	} 
+
+	TIME {
+		*
+		/
+		TO
+		BY
+		ALL
+	}
+
+	DATE {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY         ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *
+        CURRENT DATE ; 0
+        YESTERDAY    ; -1
+        TO          ; TO
+        BY          ;   BY
+        /
+		ALL
+	}
+
+    STEP { 
+		* 
+		/
+		TO
+		BY
+		ALL
+	} 
+
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } 
+    
+
+    TARGET
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} = marsms
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	STREAM {
+		@
+	}
+
+	TYPE {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	DOMAIN {
+		@
+	}
+
+	OUTPUT {
+		TABLE
+		BROWSER	
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+	GRID {
+		*
+		/
+	}
+
+	AREA {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+		*
+		/
+	}
+
+
+} ! END OF LIST
+
+FLUSH ;   flush data   ;   DWD
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		DE
+		ALL
+	} = DE
+
+	DBASE {
+	   NUMEX
+	   LME
+	   GME
+	   PEGASUS
+	   ALL
+	} = NUMEX
+
+	RKI  {
+		ROUTI
+		MOMIT
+		NOTFA
+		TRAJ
+		75x50
+		150xy
+		RLM01
+		RLM03
+		RLM02
+		COVER
+		MIXED
+		QUALI
+		TEMPO
+		POLAR
+		*
+		ALL
+	} = ROUTI
+
+	RTY [ namespace = dwd, split = 1, type = string ]  {
+		ASSIMILATION; A
+		B
+		C
+		D
+		H
+		HAUPTLAUF; MAIN RUN ; M
+		N
+		P
+		R
+		T
+		V
+		ALL
+
+	} = M
+
+    TY {
+	&GRIB&TY
+	} = R128F
+
+    EXPVER  
+    {
+		@
+        *       
+    } 
+    
+    LEVTYPE { 
+		* 
+		/
+		ALL
+	} 
+
+    PARAM { 
+		* 
+		/
+		ALL
+	} 
+
+	TIME {
+		*
+		/
+		ALL
+	}
+
+	DATE {
+		*
+		/
+		ALL
+	}
+
+    STEP { 
+		* 
+		/
+		ALL
+	} 
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } 
+    
+
+    TARGET
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} = marsms
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	STREAM {
+		@
+	}
+
+	TYPE {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	DOMAIN {
+		@
+	}
+
+    ! Only for FLUSH
+
+    WAIT
+    {
+        TRUE
+        FALSE
+    } = FALSE
+
+    DECACHE
+    {
+        TRUE
+        FALSE
+    } = FALSE
+
+} ! END OF FLUSH
+
+RETRIEVE ;   Archives data   ;   DWD
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		DE
+		ALL
+	} = DE
+
+	DBASE {
+	   NUMEX
+	   LME
+	   GME
+	   PEGASUS
+	   ALL
+	} = NUMEX
+
+	RKI  {
+		ROUTI
+		MOMIT
+		NOTFA
+		TRAJ
+		75x50
+		150xy
+		RLM01
+		RLM03
+		RLM02
+		COVER
+		MIXED
+		QUALI
+		TEMPO
+		POLAR
+		*
+		ALL
+	} = ROUTI
+
+	RTY [ namespace = dwd, split = 1, type = string ]  {
+		ASSIMILATION; A
+		B
+		C
+		D
+		H
+		HAUPTLAUF; MAIN RUN ; M
+		N
+		P
+		R
+		T
+		V
+		ALL
+
+	} = M
+
+    TY {
+	&GRIB&TY
+	} = R128F
+
+    EXPVER  
+    {
+        *       
+    }  = 1
+    
+    LEVTYPE { 
+		* 
+		/
+		ALL
+	}  = 1
+
+    PARAM { 
+		* 
+		/
+		ALL
+	}  = 11
+
+	TIME {
+		*
+		/
+		TO
+		BY
+		ALL
+	} = 12
+
+	DATE {
+		*
+		/
+		TO
+		BY
+		ALL
+	} = 0
+
+    STEP { 
+		TO
+		BY
+		* 
+		/
+		ALL
+	} = 0
+
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } = 0
+    
+
+    TARGET
+    {
+		@
+		/
+        "   
+    } = ""
+
+	GRIB 
+	{
+		ORIGINAL
+		ECMWF
+	} = ORIGINAL
+    
+	PADDING
+	{
+		AUTOMATIC   ; AUTO
+		NONE        ; N    ; 0
+		OFF
+		*
+	} = NONE
+
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} = marsms
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	STREAM {
+		@
+	}
+
+	TYPE {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	DOMAIN {
+		@
+	}
+
+	GRID {
+		*
+		/
+	}
+
+	AREA {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+		*
+		/
+	}
+
+	YEAR { * } 
+
+} ! END OF ARCHIVE
+
diff --git a/share/metview/etc/ecmwf.def b/share/metview/etc/ecmwf.def
new file mode 100755
index 0000000..c953aca
--- /dev/null
+++ b/share/metview/etc/ecmwf.def
@@ -0,0 +1,7133 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+!
+! mars language definition file.
+!
+!     author.
+!     -------
+!
+!           b.raoult 22/10/90
+!
+!     Modifications.
+!     --------------
+!
+!           K. Fielding 26.07.93
+!           Add new observation types wind profile (WP) and
+!           temp mobile (TM)
+!
+!
+! syntax :
+!
+!
+!  command name ; command description ; command type     
+!  {
+!        parameter 1
+!        {
+!       value 1 ; abbreviation 1
+!               value 2 ; abbreviation 2
+!               value 3 
+!               ...
+!               value n ; abbreviation n
+!    } = default value
+!
+!        parameter 2
+!        {
+!            ...
+!        } = default value
+!       
+!        ...
+!
+! }
+!
+!------------------------------------------------------------------------
+
+_DUMMY ; DUMMY REQUEST  ; DUMMY
+{
+    PARAM {
+
+
+20 DEGREES ISOTHERM DEPTH                     ;  20D   ;  163
+ACCUMULATED CLOUD FRACTION TENDENCY           ;  ACF   ;  241
+ACCUMULATED ICE WATER TENDENCY                ;  AIW   ;  249
+ACCUMULATED LIQUID WATER TENDENCY             ;  ALW   ;  242
+ACCUMULATED CARBON DIOXIDE NET ECOSYSTEM EXCHANGE   ; ACO2NEE; 80.228
+ACCUMULATED CARBON DIOXIDE GROSS PRIMARY PRODUCTION ; ACO2GPP; 81.228
+ACCUMULATED CARBON DIOXIDE ECOSYSTEM RESPIRATION    ; ACO2REC; 82.228
+ADIABATIC TENDENCY OF HUMIDITY                ;  ATH   ;  229
+ADIABATIC TENDENCY OF HUMIDITY - ECMWF        ;  ATHE  ;  252
+ADIABATIC TENDENCY OF MERIDIONAL WIND         ;  ATMW  ;  254
+ADIABATIC TENDENCY OF MERIDIONAL WIND - ASTEX ; ATMWAX ;  231
+ADIABATIC TENDENCY OF TEMPERATURE             ;  ATT   ;  228
+ADIABATIC TENDENCY OF TEMPERATURE - ECMWF     ;  ATTE  ;  251
+ADIABATIC TENDENCY OF ZONAL WIN               ;  ATZW  ;  230
+ADIABATIC TENDENCY OF ZONAL WIND - ECMWF      ;  ATZE  ;  253
+ALBEDO                                        ;  AL    ;  174
+ALTIMETER WAVE HEIGHT                         ;  AWH   ;  246
+ALTIMETER CORRECTED WAVE HEIGHT               ;  ACWH  ;  247
+ALTIMETER RANGE RELATIVE CORRECTION           ;  ARRC  ;  248
+ALTITUDE OF EMITTER                           ;  ALE   ;  210119 ; 119.210
+ALTITUDE OF PLUME TOP                         ;  ALPT  ;  210120 ; 120.210
+ANALYSED POTENTIAL TEMPERATURE                ;  APT   ;  181
+ANALYSED SALINITY                             ;  AS    ;  183
+ANGLE OF SUBGRID OROGRAPHY                    ;  ANOR  ;  162
+ANISOTROPHY SUBGRID OROGRAPHY                 ;  ISOR  ;  161
+APPARENT SURFACE HUMIDITY                     ;  ASQ   ;  233
+ATMOSPHERIC TIDE                              ;  AT    ;  127
+AVERAGE POTENTIAL TEMPERATURE IN UPPER 300M   ; TAV300 ;  164
+AVERAGE SALINITY IN UPPER 300M                ; SAV300 ;  175
+BACKGROUND POTENTIAL TEMPERATURE              ;  BPT   ;  180
+BENJAMIN-FEIR INDEX                           ;  BFI   ;  253
+BOUNDARY LAYER DISSIPATION                    ;  BLD   ;  145
+BOUNDARY LAYER HEIGHT                         ;  BLH   ;  159
+BRIGHTNESS TEMPERATURE                        ;  BTMP  ;  194
+BUDGET VALUES                                 ;  BV    ;  128
+CHANGE FROM REMOVING NEG. HUMID               ;  CRNH  ;  227
+CHARNOCK                                      ;  CHNK  ;  148
+CLEAR SKY SURFACE PHOTOSYNTHETICALLY ACTIVE RADIATION  ; PARCS ; 20
+CLIMAT. DEEP SOIL TEMP.                       ;  CDST  ;  183
+CLIMAT. DEEP SOIL WETNESS                     ;  CDSW  ;  184
+CLOUD BASE HEIGHT                             ;  CBH   ;  228023   ; 23.228
+CLOUD COVER                                   ;  CC    ;  248
+CLOUD FRACTION                                ;  CF    ;  213
+CLOUD ICE WATER CONTENT                       ;  CIWC  ;  247
+CLOUD LIQUID WATER                            ;  CLW   ;  212
+CLOUD LIQUID WATER CONTENT                    ;  CLWC  ;  246
+CLOUD LIQUID WATER CONTENT - ERA              ; CLWCER ;  241
+CLOUD RAIN WATER CONTENT                      ;  CRWC  ;  75
+CLOUD SNOW WATER CONTENT                      ;  CSWC  ;  76
+COEFFICIENT OF DRAG WITH WAVES                ;  CDWW  ;  233
+CONVECTIVE AVAILABLE POTENTIAL ENERGY         ;  CAPE  ;  059
+CONVECTIVE CLOUD COVER                        ;  CCC   ;  185
+CONVECTIVE INHIBITION                         ;  CIN   ;  228001
+CONVECTIVE PRECIPITATION                      ;  CP    ;  143
+CONVECTIVE SNOW-FALL                          ;  CSF   ;  239
+CONVECTIVE TENDENCY OF MERIDIONAL WIND        ;  CTMW  ;  223
+CONVECTIVE TENDENCY OF ZONAL WIND             ;  CTZW  ;  222
+DEEP SOIL TEMPERATURE                         ;  DST   ;  170
+DEEP SOIL WETNESS                             ;  DSW   ;  171
+DEPTH OF SALINITY MAXIMUM                     ;  DSMAX ;  174
+DEPTH OF VELOCITY MAXIMUM                     ;  DUMAX ;  172
+DIABATIC HEATING BY CUMULUS CONVECTION        ;  DHCC  ;  216
+DIABATIC HEATING BY LARGE-SCALE CONDENSATION  ;  DHLC  ;  217
+DIABATIC HEATING BY RADIATION                 ;  DHR   ;  214
+DIABATIC HEATING BY VERTICAL DIFFUSION        ;  DHVD  ;  215
+DIRECT SOLAR RADIATION                        ;  DSRP  ;  047
+DIVERGENCE                                    ;  D     ;  155
+DOWNWARD UV RADIATION AT THE SURFACE          ;  UVB   ;  057
+DUCT BASE HEIGHT                              ;  DCTB  ;  228017   ; 017.228
+E-W COMPONENT SURFACE STRESS                  ;  EWSS  ;  180
+E-W OROGRAPHIC VARIANCE.                      ;  EWOV  ;  190
+EQUIVALENT POTENTIAL TEMPERATURE              ;  EQPT  ;  004
+ETA-COORDINATE VERTICAL VELOCITY              ;  ETADOT ; 077
+EVAPORATION                                   ;  E     ;  182
+EW GRAVITY WAVE DRAG                          ;  EWGD  ;  220
+FIELD CAPACITY                                ;  CAP   ;  228170 ; 170.228
+FLUX OF CARBON DIOXIDE NET ECOSYSTEM EXCHANGE       ; FCO2NEE; 83.228
+FLUX OF CARBON DIOXIDE GROSS PRIMARY PRODUCTION     ; FCO2GPP; 84.228
+FLUX OF CARBON DIOXIDE ECOSYSTEM RESPIRATION        ; FCO2REC; 85.228
+FORECAST ALBEDO                               ;  FAL   ;  243
+FORECAST LOG SRF ROUGHNESS HEAT               ;  FLSR  ;  245
+FORECAST SURFACE ROUGHNESS                    ;  FSR   ;  244
+FRICTION VELOCITY                             ;  ZUST  ;  228003 ; 3.228
+GEOPOTENTIAL                                  ;  Z     ;  129
+GEOPOTENTIAL ANOMALY                          ;  ZA    ;  129.171
+GRAVITY WAVE DISSIPATION.                     ;  GWD   ;  197
+HEIGHT GEOPOTENTIAL                           ;  GH    ;  156
+HIGH CLOUD COVER                              ;  HCC   ;  188
+HIGH VEGETATION COVER                         ;  CVH   ;  028
+HORIZONTAL VISIBILITY                         ;  HVIS  ;  228025  ; 25.228
+HUMIDITY TENDENCY BY CUMULUS CONVECTION       ;  HTCC  ;  225
+HUMIDITY TENDENCY BY LARGE-SCALE CONDENSATION ;  HTLC  ;  226
+HUNDRED METRE U WIND COMPONENT                ;  100U  ;  U100 ; 228246  ;  246.228
+HUNDRED METRE V WIND COMPONENT                ;  100V  ;  V100 ; 228247  ;  247.228
+HUNDRED METRE WIND SPEED                      ;  100SI ;  228249  ;  249.228
+ICE AGE                                       ;  ICE   ;  250
+ICE SURFACE TEMPERATURE LAYER 1               ;  ISTL1 ;  035
+ICE SURFACE TEMPERATURE LAYER 2               ;  ISTL2 ;  036
+ICE SURFACE TEMPERATURE LAYER 3               ;  ISTL3 ;  037
+ICE SURFACE TEMPERATURE LAYER 4               ;  ISTL4 ;  038
+INSTANT MOISTURE FLUX                         ;  IE    ;  232
+INSTANT X SURFACE STRESS                      ;  IEWS  ;  229
+INSTANT Y SURFACE STRESS                      ;  INSS  ;  230
+INSTANTANEOUS SURFACE SENSIBLE HEAT FLUX      ;  ISHF  ;  231
+K INDEX                                       ;  KX    ;  260121
+LAKE COVER                                    ;  CL    ;   26
+LAKE DEPTH                                    ;  DL    ;  228007 ;  7.228
+LAKE MIX-LAYER TEMPERATURE                    ;  LMLT  ;  228008 ;  8.228
+LAKE MIX-LAYER DEPTH                          ;  LMLD  ;  228009 ;  9.228
+LAKE BOTTOM TEMPERATURE                       ;  LBLT  ;  228010 ; 10.228
+LAKE TOTAL LAYER TEMPERATURE                  ;  LTLT  ;  228011 ; 11.228
+LAKE SHAPE FACTOR                             ;  LSHF  ;  228012 ; 12.228
+LAKE ICE TEMPERATURE                          ;  LICT  ;  228013 ; 13.228
+LAKE ICE DEPTH                                ;  LICD  ;  228014 ; 14.228
+LAND SEA MASK                                 ;  LSM   ;  172
+LARGE SCALE PRECIPITATION                     ;  LSP   ;  142
+LARGE SCALE PRECIPITATION FRACTION            ;  LSPF  ;  050
+LARGE SCALE SNOW-FALL                         ;  LSF   ;  240
+LATITUDINAL GRAVITYWAVE STRESS                ;  LGWS  ;  195
+LEAF AREA INDEX LOW VEGETATION                ;  LAILV ;   66
+LEAF AREA INDEX HIGH VEGETATION               ;  LAIHV ;   67
+LN SURFACE PRESSURE                           ;  LNSP  ;  152
+LOG SURFACE ROUGHNESS - HEAT                  ;  LSRH  ;  234
+LONG WAVE HEATING RATE                        ;  LWH   ;  154
+LOW CLOUD COVER                               ;  LCC   ;  186
+LOW VEGETATION COVER                          ;  CVL   ;  027
+MAGNITUDE OF SURFACE STRESS                   ;  MAGSS ;  048
+MAXIMUM TEMPERATURE AT 2M                     ;  MX2T  ;  201
+MAXIMUM TEMPERATURE AT 2M ANOMALY             ;  MX2TA  ;  201.171
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS ANOMALY  ;  MX2T6A  ;  121.171
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS  ;  MX2T6 ;  121.128
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 3 HOURS  ;  MX2T3 ;  228026 ; 026.228
+MAXIMUM TEMPERATURE AT 2M IN THE LAST 24 HOURS ;  MX2T24 ;  51
+MAXIMUM INDIVIDUAL WAVE HEIGHT                           ;  HMAX  ;  218
+MAXIMUM OF SIGNIFICANT WAVE HEIGHT            ;  MAXSWH ; 200
+MEAN 2 METRE TEMPERATURE PAST 24 HOURS        ;  MEAN2T24;  055
+MEAN 2 METRE DEWPOINT TEMPERATURE PAST 24 HOURS ;  MEAN2D24;  056
+MEAN TEMPERATURE AT 2 METRES                  ;  MEAN2T ; 228004  ; 4.228
+MEAN DIRECTION OF TOTAL SWELL               ;  MDPS ; MDTS ;  238
+MEAN DIRECTION OF WIND WAVES                  ;  MDWW  ;  235
+MEAN OF 10M WINDSPEED                         ;  MU10  ;  241
+MEAN 10 METRE WINDSPEED                       ;  MEAN10WS ; 228005  ; 5.228
+MEAN TOTAL CLOUD COVER                        ;  MEANTCC ; 228006   ; 6.228
+MEAN PERIOD                                   ;  MP    ;  232
+MEAN PERIOD OF TOTAL SWELL                  ;  MPPS ; MPTS  ;  239
+MEAN PERIOD OF WIND WAVES                     ;  MPWW  ;  236
+MEAN SEA LEVEL PRESSURE                       ;  MSL   ; MSLP ;  151
+MEAN SEA LEVEL PRESSURE ANOMALY               ;  MSLA   ; MSLPA ;  151.171
+MEAN SEA LEVEL PRESSURE SIGNIFICANCE          ;  MSLS  ;  151.234
+MEAN SEA LEVEL PRESSURE ANOMALY OF AT LEAST 0 Pa ;  MSLAG0   ;  10
+MEAN SQUARE SLOPE OF WAVES                    ;  MSQS  ;  244
+MEAN VERTICAL GRADIENT OF REFRACTIVITY INSIDE TRAPPING LAYER ; DNDZA ;  228016  ; 016.228
+MEAN VERTICAL VELOCITY                        ;  MVV   ;  232
+MEAN WAVE DIRECTION                           ;  MWD   ;  230
+MEAN WAVE PERIOD                              ;  MWP   ;  232
+MEAN WAVE PERIOD PROBABILITY                  ;  MWPP  ;  232
+MEAN WAVE PERIOD BASED ON FIRST MOMENT                 ; MP1   ; 220
+MEAN WAVE PERIOD BASED ON FIRST MOMENT FOR SWELL       ; P1PS  ; 226
+MEAN WAVE PERIOD BASED ON FIRST MOMENT FOR WIND WAVES  ; P1WW  ; 223
+MEAN WAVE PERIOD BASED ON SECOND MOMENT                ; MP2   ; 221
+MEAN WAVE PERIOD BASED ON SECOND MOMENT FOR SWELL      ; P2PS  ; 227
+MEAN WAVE PERIOD BASED ON SECOND MOMENT FOR WIND WAVES ; P2WW  ; 224
+MEAN WIND DIRECTION                           ;  MDWI  ;  242
+MEDIUM CLOUD COVER                            ;  MCC   ;  187
+MERIDIONAL GRAVITY WAVE STRESS                ;  MGWS  ;  196
+MINIMUM TEMPERATURE AT 2M                     ;  MN2T  ;  202
+MINIMUM TEMPERATURE AT 2M ANOMALY             ;  MN2TA  ;  202.171
+MINIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS ANOMALY  ;  MN2T6A  ;  122.171
+MINIMUM TEMPERATURE AT 2M IN THE LAST 6 HOURS  ;  MN2T6 ;  122.128
+MINIMUM TEMPERATURE AT 2M IN THE LAST 3 HOURS  ;  MN2T3 ;  228027 ; 027.228
+MINIMUM TEMPERATURE AT 2M IN THE LAST 24 HOURS ;  MN2T24 ;  52
+MINIMUM VERTICAL GRADIENT OF REFRACTIVITY INSIDE TRAPPING LAYER ; DNDZN ; 228015 ; 015.228
+MONTGOMERY POTENTIAL                          ;  MONT  ;  053
+N-S COMPONENT SURFACE STRESS                  ;  NSSS  ;  181
+N-S OROGRAPHIC VARIANCE                       ;  NSOV  ;  191
+NE-SW OROGRAPHIC VARIANCE                     ;  NWOV  ;  192
+NS GRAVITY WAVE DRAG                          ;  NSGD  ;  221
+NEAR IR ALBEDO FOR DIRECT RADIATION           ;  ALNIP ;   17
+NEAR IR ALBEDO FOR DIFFUSE RADIATION          ;  ALNID ;   18
+NEUTRAL WIND AT 10 M X-COMPONENT              ;  U10N  ;  228131  ; 131.228
+NEUTRAL WIND AT 10 M Y-COMPONENT              ;  V10N  ;  228132  ; 132.228
+NW-SE OROGRAPHIC VARIANCE                     ;  NEOV  ;  193
+OBSERVATION COUNT                             ;  OBCT  ;  062
+OCEAN POTENTIAL TEMPERATURE                   ;  OCPT  ;  129
+OZONE MASS MIXING RATIO                       ;  O3    ;  203     ; 203.128
+PEAK DIRECTION                                ;  PD    ;  230
+PEAK PERIOD                                   ;  PP    ;  231
+PEAK PERIOD OF 1D SPECTRA                     ;  PP1D  ;  231
+PERIOD CORRESPONDING TO MAXIMUM INDIVIDUAL WAVE HEIGHT   ;  TMAX  ;  217
+PHOTOSYNTHETICALLY ACTIVE RADIATION AT THE SURFACE ;  PAR   ;  058
+PROBABILITY OF A TROPICAL STORM                     ; PTS   ; 89.131
+PROBABILITY OF A HURRICANE                          ; PH    ; 90.131
+PROBABILITY OF A TROPICAL DEPRESION                 ; PTD   ; 91.131
+CLIMATOLOGICAL PROBABILITY OF A TROPICAL STORM      ; CPTS  ; 92.131
+CLIMATOLOGICAL PROBABILITY OF A HURRICANE           ; CPH   ; 93.131
+CLIMATOLOGICAL PROBABILITY OF A TROPICAL DEPRESION  ; CPTD  ; 94.131
+PROBABILITY ANOMALY OF A TROPICAL STORM             ; PATS  ; 95.131
+PROBABILITY ANOMALY OF A HURRICANE                  ; PAH   ; 96.131
+PROBABILITY ANOMALY OF A TROPICAL DEPRESION         ; PATD  ; 97.131
+POTENTIAL TEMPERATURE                         ;  PT    ;  003
+POTENTIAL TEMPERATURE INCREMENT               ;  PTI   ;  178
+POTENTIAL TEMPERATURE ANALYSIS ERROR          ;  PTAE  ;  179
+POTENTIAL TEMPERATURE BACKGROUND ERROR        ;  PTBE  ;  182
+POTENTIAL VORTICITY                           ;  PV    ;  060
+PRECIP. ANALYSIS WEIGHTS                      ;  PAW   ;  204
+PRECIPITABLE WATER CONTENT                    ;  PWC   ;  137
+PRESSURE                                      ;  PRES  ;  054
+RELATIVE HUMIDITY                             ;  R     ;  157
+RUNOFF                                        ;  RO    ;  205
+SALINITY INCREMENT                            ;  SALI  ;  184
+SALINITY MAXIMUM                              ;  SMAX  ;  173
+SATURATED EQUIVALENT POTENTIAL TEMPERATURE    ;  SEPT  ;  005
+SATURATION                                    ;  SAT   ;  228172  ;  172.228
+SEA ICE COVER                                 ;  CI    ;  031
+SEA LEVEL PREVIOUS TIMESTEP                   ;  SL_1  ;  146
+SEA SURFACE TEMPERATURE                       ;  SSTK  ;  SST   ; 034
+SEA SURFACE TEMPERATURE ANOMALY               ;  SSTAK ;  SSTA  ; 171034  ; 034.171
+SHORT WAVE HEATING RATE                       ;  SWHR  ;  153
+SIGNIFICANT HEIGHT TOTAL SWELL              ;  SHPS ; SHTS  ;  237
+SIGNIFICANT HEIGHT WIND WAVES                 ;  SHWW  ;  234
+SIGNIFICANT WAVE HEIGHT                       ;  SWH   ;  229
+SIGNIFICANT WAVE HEIGHT PROBABILITY           ;  SWHP  ;  229
+SKIN RESERVOIR CONTENT                        ;  SRC   ;  198
+SKIN TEMPERATURE                              ;  SKT   ;  235
+SLOPE OF SUBGRID OROGRAPHY                    ;  SLOR  ;  163
+SNOW ALBEDO                                   ;  ASN   ;  032
+SNOW DENSITY                                  ;  RSN   ;  033
+SNOW DENSITY ANOMALY                          ;  RSNA  ;  171033  ; 033.171
+SNOW DEPTH                                    ;  SD    ;  141
+SNOW DEPTH ANOMALY                            ;  SDA   ;  171141  ; 141.171
+SNOW EVAPORATION                              ;  ES    ;  044
+SNOWFALL                                      ;  SF    ;  144
+SNOWFALL PROBABILITY                          ;  SFP   ;  144
+SNOWFALL ANOMALOUS RATE OF ACCUMULATION       ;  SFARA ;  144.173
+SNOWMELT                                      ;  SMLT  ;  045
+SOIL SAND FRACTION                            ;  SSFR  ;    6
+SOIL CLAY FRACTION                            ;  SCFR  ;    7
+SOIL TEMPERATURE LEVEL 1                      ;  STL1  ;  139
+SOIL TEMPERATURE ANOMALY LEVEL 1              ;  STAL1 ;  139.171
+SOIL TEMPERATURE LEVEL 2                      ;  STL2  ;  170
+SOIL TEMPERATURE LEVEL 3                      ;  STL3  ;  183
+SOIL TEMPERATURE LEVEL 4                      ;  STL4  ;  236
+SOIL TYPE                                     ;  SLT   ;  043
+SOIL WETNESS LEVEL 1                          ;  SWL1  ;  140
+SOIL WETNESS LEVEL 2                          ;  SWL2  ;  171
+SOIL WETNESS LEVEL 3                          ;  SWL3  ;  184
+SOIL WETNESS LEVEL 4                          ;  SWL4  ;  237
+SOLAR DURATION                                ;  SDUR  ;  046
+SOLAR INSULATION                              ;  SI    ;  212
+SPECIFIC HUMIDITY                             ;  Q     ;  133
+STANDARD DEVIATION 10M WIND SPEED             ;  SDU   ;  243
+STANDARD DEVIATION OROGRAPHY                  ;  SDOR  ;  160
+STANDARD DEVIATION OF FILTERED SUBGRID OROGRAPHY  ;  SDFOR  ;  74.128
+STANDARD DEVIATION WAVE HEIGHT                ;  SDHS  ;  240
+STREAM FUNCTION                               ;  STRF  ;  001
+STREAM FUNCTION ANOMALY                       ;  STRFA  ;  001.171
+SUB-SURFACE RUNOFF                            ;  SSRO  ;    9
+SUNSHINE DURATION                             ;  SUND  ;  189
+SUNSHINE DURATION ANOMALY                     ;  SUNDA ;  189.171
+SUNSHINE DURATION ANOMALOUS RATE OF ACCUMULATION ;  SUNDARA ;  189.173
+SURFACE LATENT HEAT FLUX                      ;  SLHF  ;  147
+SURFACE NET RADIATION                         ;  SNR   ;  149
+SURFACE NET SOLAR RADIATION CLEAR SKY         ;  SSRC  ;  210
+SURFACE NET THERMAL RADIATION CLEAR SKY       ;  STRC  ;  211
+SURFACE PRESSURE                              ;  SP    ;  134
+SURFACE ROUGHNESS                             ;  SR    ;  173
+SURFACE RUNOFF                                ;  SRO   ;    8
+SURFACE SENSIBLE HEAT FLUX                    ;  SSHF  ;  146
+SURFACE SOIL WETNESS                          ;  SSW   ;  140
+SURFACE SOLAR RADIATION                       ;  SSR   ;  176
+SURFACE SOLAR RADIATION DOWNWARDS             ;  SSRD  ;  169
+SURFACE STRESS                                ;  SS    ;  148
+SURFACE TEMPERATURE                           ;  ST    ;  139
+SURFACE TEMPERATURE ANOMALY OF AT LEAST 0K    ;  STAG0 ;    9
+SURFACE TEMPERATURE SIGNIFICANCE              ;  STS   ;  139.234
+SURFACE NET THERMAL RADIATION                     ;  STR   ;  177
+SURFACE THERMAL RADIATION DOWNWARDS           ;  STRD  ;  175
+TEMPERATURE                                   ;  T     ;  130
+TEMPERATURE ANOMALY                           ;  TA    ;  130.171
+TEMPERATURE ANOMALY PROBABILITY               ;  TAP   ;  130
+TEMPERATURE OF SNOW LAYER                     ;  TSN   ;  238
+TEN METRE SPEED PROBABILITY                   ;  10SP  ;  165
+TEN METRE WIND SPEED INDEX                    ;  10WSI ;  165
+TEN METRE U WIND COMPONENT                    ;  10U   ;  165
+TEN METRE U WIND COMPONENT ANOMALY            ;  10UA   ;  165.171
+TEN METRE V WIND COMPONENT                    ;  10V   ;  166
+TEN METRE V WIND COMPONENT ANOMALY            ;  10VA   ;  166.171
+TEN METRE WINDSPEED IRRESP OF DIR             ;  10SI  ;  207
+TEN METRE WINDSPEED ONLY                      ;  10WS  ;  246
+TEN METRE WIND DIRECTION                      ;  DWI   ;  249
+TENDENCY SURFACE PRESSURE                     ;  TSP   ;  158
+TOP NET RADIATION                             ;  TNR   ;  150
+TOP NET SOLAR RADIATION CLEAR SKY             ;  TSRC  ;  208
+TOP SOLAR RAD. UPWARD CLEAR SKY               ;  TSUC  ;  210
+TOP NET SOLAR RADIATION                           ;  TSR   ;  178
+TOP SOLAR RADIATION UPWARD                    ;  TSRU  ;  208
+TOP THERMAL RAD. UPWARD CLEAR S               ;  TTUC  ;  211
+TOP NET THERMAL RADIATION                         ;  TTR   ;  179
+TOP THERMAL RADIATION UPWARD                  ;  TTRU  ;  209
+TOP UPWARD THERMAL RADIATION CLEAR SKY        ;  TTRC  ;  209
+TOTAL CLOUD COVER                             ;  TCC   ;  164
+TOTAL CLOUD COVER ANOMALY                     ;  TCCA   ;  164.171
+TOTAL COLUMN ICE WATER                        ;  TCIW  ;  079
+TOTAL COLUMN ICE WATER ANOMALY                ;  TCIWA  ;  079.171
+TOTAL COLUMN LIQUID WATER                     ;  TCLW  ;  078
+TOTAL COLUMN LIQUID WATER ANOMALY             ;  TCLWA  ;  078.171
+TOTAL COLUMN OZONE                            ;  TCO3  ;  206     ; 206.128
+TOTAL COLUMN RAIN WATER                       ;  TCRW  ; 228089   ; 089.228
+TOTAL COLUMN SNOW WATER                       ;  TCSW  ; 228090   ; 090.228
+TOTAL COLUMN WATER                            ;  TCW   ;  136
+TOTAL COLUMN WATER ANOMALY                    ;  TCWA  ;  136.171
+TOTAL COLUMN WATER VAPOUR                     ;  TCWV  ;  137
+TOTAL COLUMN WATER VAPOUR ANOMALY             ;  TCWVA ;  137.171
+TOTAL PRECIPITATION                           ;  TP    ;  228
+TOTAL PRECIPITATION ANOMALY                   ;  TPA    ;  228.171
+TOTAL PRECIPITATION ANOMALOUS RATE OF ACCUMULATION ;  TPARA    ;  228.173
+TOTAL PRECIPITATION INDEX                     ;  TPI   ;  228
+TOTAL PRECIPITATION PROBABILITY               ;  TPP   ;  228
+TOTAL PRECIPITATION SIGNIFICANCE              ;  TPS   ;  228.234
+TOTAL PRECIPITATION ANOMALY OF AT LEAST 20 MM ;  TPAG20;    6
+TOTAL PRECIPITATION ANOMALY OF AT LEAST 10 MM ;  TPAG10;    7
+TOTAL PRECIPITATION ANOMALY OF AT LEAST  0 MM ;  TPAG0 ;    8
+TOTAL TOTALS INDEX                            ;  TOTALX ; 260123
+TOTAL SKY DIRECT SOLAR RADIATION AT SURFACE   ;  FDIR ;   228021
+TRAPPING LAYER BASE HEIGHT                    ;  TPLB  ;  228018   ;  018.228
+TRAPPING LAYER TOP HEIGHT                     ;  TPLT  ;  228019   ; 019.228
+TWO METRE DEWPOINT                            ;  2D    ;  168
+TWO METRE DEWPOINT ANOMALY                    ;  2DA   ;  171168   ; 168.171
+TWO METRE TEMPERATURE                         ;  2T    ;  167
+TWO METRE TEMPERATURE INDEX                   ;  2TI   ;  167
+TWO METRE TEMPERATURE PROBABILITY             ;  2TP   ;  167
+TWO METRE TEMPERATURE ANOMALY                 ;  2TA   ;  167.171
+TWO METRE TEMPERATURE SIGNIFICANCE            ;  2TS   ;  167.234
+TWO METRE TEMPERATURE WARM ANOMALY OF AT LEAST 2K    ;  2TWA2K;    1
+TWO METRE TEMPERATURE WARM ANOMALY OF AT LEAST 1K    ;  2TWA1K;    2
+TWO METRE TEMPERATURE WARM ANOMALY OF AT LEAST 0K    ;   2TWA0K;    3
+TWO METRE TEMPERATURE COLD ANOMALY OF AT LEAST 1K    ;  2TCA1K;    4
+TWO METRE TEMPERATURE COLD ANOMALY OF AT LEAST 2K    ;  2TCA2K;    5
+TWO-D WAVE SPECTRA                            ;  2DSP  ;  250
+TWO-D WAVE SINGLE FREQUENCY DIRECTION SPECTRUM;  2DFD  ;  251
+TYPE OF HIGH VEGETATION                       ;  TVH   ;  030
+TYPE OF LOW VEGETATION                        ;  TVL   ;  029
+U WIND COMPONENT                              ;  U     ;  131
+U WIND COMPONENT ANOMALY                      ;  UA    ;  131.171
+U-COMPONENT OF DIVERGENT WIND                 ;  UDVW  ;  011
+U-COMPONENT OF ROTATIONAL WIND                ;  URTW  ;  013
+U-COMPONENT STOKES DRIFT                      ;  UST   ;  215
+UNBALANCED COMPONENT OF DIVERGENCE            ;  UCDV  ;  023
+UNBALANCED COMPONENT OF TEMPERATURE           ;  UCTP  ;  021
+UNBALANCED COMPONENT OF LNSP                  ;  UCLN  ;  022
+U-VELOCITY MAXIMUM                            ;  UMAX  ;  171
+UV VISIBLE ALBEDO FOR DIRECT RADIATION        ;  ALUVP ;   15
+UV VISIBLE ALBEDO FOR DIFFUSE RADIATION       ;  ALUVD ;   16
+V WIND COMPONENT                              ;  V     ;  132
+V WIND COMPONENT ANOMALY                      ;  VA    ;  132.171
+V-COMPONENT OF DIVERGENT WIND                 ;  VDVW  ;  012
+V-COMPONENT OF ROTATIONAL WIND                ;  VRTW  ;  014
+V-COMPONENT STOKES DRIFT                      ;  VST   ;  216
+VARIANCE SUBGRIDSCALE OROGRAPHY               ;  VSO   ;  200
+VEGETATION                                    ;  VEG   ;  199
+VELOCITY POTENTIAL                            ;  VPOT  ;  002
+VELOCITY POTENTIAL ANOMALY                    ;  VPOTA ;  002.171
+VERTICAL DIFFUSION OF HUMIDITY                ;  VDH   ;  224
+VERTICAL DIFFUSION OF MERIDIONAL WIND         ;  VDMW  ;  219
+VERTICAL DIFFUSION OF ZONAL WIND              ;  VDZW  ;  218
+VERTICAL VELOCITY                             ;  W     ;  135
+VERTICALLY INTEGRATED MERIDIONAL HEAT TRANSPORT    ;  MHT   ;  170
+VERTICALLY INTEGRATED MERIDIONAL VOLUME TRANSPORT  ;  MTR   ;  168
+VERTICALLY INTEGRATED ZONAL HEAT TRANSPORT         ;  ZHT   ;  169
+VERTICALLY INTEGRATED ZONAL VOLUME TRANSPORT       ;  ZTR   ;  167
+VOLUMETRIC SOIL WATER LAYER 1                 ;  SWVL1 ;  039
+VOLUMETRIC SOIL WATER LAYER 2                 ;  SWVL2 ;  040
+VOLUMETRIC SOIL WATER LAYER 3                 ;  SWVL3 ;  041
+VOLUMETRIC SOIL WATER LAYER 4                 ;  SWVL4 ;  042
+VORTICITY                                     ;  VO    ;  138
+WAVE HEIGHT                                   ;  WH    ;  229
+WAVE SPECTRAL DIRECTIONAL WIDTH               ;  WDW   ; 222
+WAVE SPECTRAL DIRECTIONAL WIDTH FOR SWELL     ;  DWPS  ; 228
+WAVE SPECTRAL DIRECTIONAL WIDTH FOR WIND WAVES;  DWWW  ; 225
+WAVE SPECTRAL KURTOSIS                        ;  WSK   ; 252
+WAVE SPECTRAL PEAKEDNESS                      ;  WSP   ; 254
+WILTING POINT                                 ;  WILT  ; 228171  ; 171.228
+WIND GUST AT 10 METRES                        ;  10FG  ;  049
+WIND GUST AT 10 METRES INDEX                  ;  10FGI ;  049
+WIND GUST AT 10 METRES IN THE LAST 6 HOURS     ;  10FG6 ;  123
+WIND GUST AT 10 METRES IN THE LAST 3 HOURS     ;  10FG3 ;  228028 ; 028.228
+WIND SPEED                                    ;  WS    ;   10
+ZERO DEGREE LEVEL                             ;  DEG0L ; 228024  ; 24.228
+
+# Variable resolution parameters (extracted with /usr/local/bin/python ./paramdb2overlap.py)
+
+SURFACE RUNOFF VARIABLE RESOLUTION ; SROVAR ; 8.230
+SUB-SURFACE RUNOFF VARIABLE RESOLUTION ; SSROVAR ; 9.230
+SNOW EVAPORATION VARIABLE RESOLUTION ; ESVAR ; 44.230
+SNOWMELT VARIABLE RESOLUTION ; SMLTVAR ; 45.230
+SOLAR DURATION VARIABLE RESOLUTION ; SDURVAR ; 46.230
+DOWNWARD UV RADIATION AT THE SURFACE VARIABLE RESOLUTION ; UVBVAR ; 57.230
+PHOTOSYNTHETICALLY ACTIVE RADIATION AT THE SURFACE VARIABLE RESOLUTION ; PARVAR ; 58.230
+STRATIFORM PRECIPITATION LARGE-SCALE PRECIPITATION VARIABLE RESOLUTION ; LSPVAR ; 142.230
+CONVECTIVE PRECIPITATION VARIABLE RESOLUTION ; CPVAR ; 143.230
+SNOWFALL CONVECTIVE + STRATIFORM VARIABLE RESOLUTION ; SFVAR ; 144.230
+BOUNDARY LAYER DISSIPATION VARIABLE RESOLUTION ; BLDVAR ; 145.230
+SURFACE SENSIBLE HEAT FLUX VARIABLE RESOLUTION ; SSHFVAR ; 146.230
+SURFACE LATENT HEAT FLUX VARIABLE RESOLUTION ; SLHFVAR ; 147.230
+SURFACE SOLAR RADIATION DOWNWARDS VARIABLE RESOLUTION ; SSRDVAR ; 169.230
+ALBEDO VARIABLE RESOLUTION ; ALVAR ; 174.230
+SURFACE THERMAL RADIATION DOWNWARDS VARIABLE RESOLUTION ; STRDVAR ; 175.230
+SURFACE NET SOLAR RADIATION VARIABLE RESOLUTION ; SSRVAR ; 176.230
+SURFACE NET THERMAL RADIATION VARIABLE RESOLUTION ; STRVAR ; 177.230
+TOP NET SOLAR RADIATION VARIABLE RESOLUTION ; TSRVAR ; 178.230
+TOP NET THERMAL RADIATION VARIABLE RESOLUTION ; TTRVAR ; 179.230
+EAST-WEST SURFACE STRESS VARIABLE RESOLUTION ; EWSSVAR ; 180.230
+NORTH-SOUTH SURFACE STRESS VARIABLE RESOLUTION ; NSSSVAR ; 181.230
+EVAPORATION VARIABLE RESOLUTION ; EVAR ; 182.230
+SUNSHINE DURATION VARIABLE RESOLUTION ; SUNDVAR ; 189.230
+LONGITUDINAL COMPONENT OF GRAVITY WAVE STRESS VARIABLE RESOLUTION ; LGWSVAR ; 195.230
+MERIDIONAL COMPONENT OF GRAVITY WAVE STRESS VARIABLE RESOLUTION ; MGWSVAR ; 196.230
+GRAVITY WAVE DISSIPATION VARIABLE RESOLUTION ; GWDVAR ; 197.230
+SKIN RESERVOIR CONTENT VARIABLE RESOLUTION ; SRCVAR ; 198.230
+RUNOFF VARIABLE RESOLUTION ; ROVAR ; 205.230
+TOP NET SOLAR RADIATION CLEAR SKY VARIABLE RESOLUTION ; TSRCVAR ; 208.230
+TOP NET THERMAL RADIATION CLEAR SKY VARIABLE RESOLUTION ; TTRCVAR ; 209.230
+SURFACE NET SOLAR RADIATION CLEAR SKY VARIABLE RESOLUTION ; SSRCVAR ; 210.230
+SURFACE NET THERMAL RADIATION CLEAR SKY VARIABLE RESOLUTION ; STRCVAR ; 211.230
+TOA INCIDENT SOLAR RADIATION VARIABLE RESOLUTION ; TISRVAR ; 212.230
+TOTAL PRECIPITATION VARIABLE RESOLUTION ; TPVAR ; 228.230
+
+# Probability parameters (extracted from METDB with script: ./proba2def.pl on linux)
+
+
+   10 METRE SPEED PROBABILITY                  ; 10SP  ;  165
+   10 METRE WIND GUST OF AT LEAST 15 METRE PER SECOND     ; 10FGG15  ;  070
+   10 METRE WIND GUST OF AT LEAST 20 METRE PER SECOND     ; 10FGG20  ;  071
+   10 METRE WIND GUST OF AT LEAST 25 METRE PER SECOND     ; 10FGG25  ;  072
+   10 METRE WIND GUST PROBABILITY              ; 10GP  ;  049
+   10 METRE WIND SPEED OF AT LEAST 10 METRE PER SECOND     ; 10SPG10  ;  068
+   10 METRE WIND SPEED OF AT LEAST 15 METRE PER SECOND     ; 10SPG15  ;  069
+   2 METRE TEMPERATURE LESS THAN 273.15 K      ; 2TL273  ;  073
+   2 METRE TEMPERATURE PROBABILITY             ; 2TP  ;  167
+   2M TEMPERATURE ANOMALY OF AT LEAST 0K       ; 2TAG0  ;  003
+   2M TEMPERATURE ANOMALY OF AT LEAST 1K      ; 2TAG1  ;  002
+   2M TEMPERATURE ANOMALY OF AT LEAST 2K      ; 2TAG2  ;  001
+   2M TEMPERATURE ANOMALY OF AT MOST -1K       ; 2TALM1  ;  004
+   2M TEMPERATURE ANOMALY OF AT MOST -2K       ; 2TALM2  ;  005
+   CONVECTIVE AVAILABLE POTENTIAL ENERGY PROBABILITY     ; CAPEP  ;  059
+   GEOPOTENTIAL PROBABILITY                    ; ZP  ;  129
+   HEIGTH OF 0 DEGREE ISOTHERM PROBABILITY     ; H0DIP  ;  015
+   HEIGTH OF SNOWFALL LIMIT PROBABILITY        ; HSLP  ;  016
+   MAXIMUM 2 METRE TEMPERATURE PROBABILITY     ; MX2TP  ;  201
+   MEAN SEA LEVEL PRESSURE ANOMALY OF AT LEAST 0 PA     ; MSLAG0  ;  010
+   MEAN WAVE PERIOD OF AT LEAST 10 S           ; MWPG10  ;  079
+   MEAN WAVE PERIOD OF AT LEAST 12 S           ; MWPG12  ;  080
+   MEAN WAVE PERIOD OF AT LEAST 15 S           ; MWPG15  ;  081
+   MEAN WAVE PERIOD OF AT LEAST 8 S            ; MWPG8  ;  078
+   MEAN WAVE PERIOD PROBABILITY                ; MWPP  ;  232
+   MINIMUM 2 METRE TEMPERATURE PROBABILITY     ; MN2TP  ;  202
+   SHOWALTER INDEX PROBABILITY                 ; SAIP  ;  017
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 2 M     ; SWHG2  ;  074
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 4 M     ; SWHG4  ;  075
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 6 M     ; SWHG6  ;  076
+   SIGNIFICANT WAVE HEIGHT OF AT LEAST 8 M     ; SWHG8  ;  077
+   SIGNIFICANT WAVE HEIGHT PROBABILITY         ; SWHP  ;  229
+   SNOWFALL PROBABILITY                        ; SFP  ;  144
+   SURFACE TEMPERATURE ANOMALY OF AT LEAST 0K     ; STAG0  ;  009
+   TEMPERATURE ANOMALY GREATER THAN 4 K       ; TAG4K  ;  024
+   TEMPERATURE ANOMALY GREATER THAN 8 K       ; TAG8K  ;  025
+   TEMPERATURE ANOMALY LESS THAN -2 K          ; TALM2K  ;  020
+   TEMPERATURE ANOMALY LESS THAN -4 K          ; TALM4K  ;  023
+   TEMPERATURE ANOMALY LESS THAN -8 K          ; TALM8K  ;  022
+   TEMPERATURE ANOMALY OF AT LEAST 2 K        ; TAG2K  ;  021
+   TEMPERATURE ANOMALY PROBABILITY             ; TAP  ;  130
+   TOTAL CLOUD COVER PROBABILITY               ; TCCP  ;  164
+   TOTAL PRECIPITATION ANOMALY OF AT LEAST 0 MM     ; TPAG0  ;  008
+   TOTAL PRECIPITATION ANOMALY OF AT LEAST 10 MM     ; TPAG10  ;  007
+   TOTAL PRECIPITATION ANOMALY OF AT LEAST 20 MM     ; TPAG20  ;  006
+   TOTAL PRECIPITATION LESS THAN 0.1 MM        ; TPL01  ;  064
+   TOTAL PRECIPITATION OF AT LEAST 1 MM        ; TPG1  ;  060
+   TOTAL PRECIPITATION OF AT LEAST 10 MM       ; TPG10  ;  062
+   TOTAL PRECIPITATION OF AT LEAST 100 MM      ; TPG100  ;  085
+   TOTAL PRECIPITATION OF AT LEAST 150 MM      ; TPG150  ;  086
+   TOTAL PRECIPITATION OF AT LEAST 20 MM       ; TPG20  ;  063
+   TOTAL PRECIPITATION OF AT LEAST 200 MM      ; TPG200  ;  087
+   TOTAL PRECIPITATION OF AT LEAST 300 MM      ; TPG300  ;  088
+   TOTAL PRECIPITATION OF AT LEAST 40 MM       ; TPG40  ;  082
+   TOTAL PRECIPITATION OF AT LEAST 5 MM        ; TPG5  ;  061
+   TOTAL PRECIPITATION OF AT LEAST 60 MM       ; TPG60  ;  083
+   TOTAL PRECIPITATION OF AT LEAST 80 MM       ; TPG80  ;  084
+   TOTAL PRECIPITATION PROBABILITY             ; TPP  ;  228
+   TOTAL PRECIPITATION RATE LESS THAN 1 MM PER DAY     ; TPRL1  ;  065
+   TOTAL PRECIPITATION RATE OF AT LEAST 3 MM PER DAY     ; TPRG3  ;  066
+   TOTAL PRECIPITATION RATE OF AT LEAST 5 MM PER DAY     ; TPRG5  ;  067
+   WHITING INDEX PROBABILITY                   ; WHIP  ;  018
+
+
+# GEMS parameters (to sort when we fully use metdb)
+
+AEROSOL TYPE 1 MIXING RATIO                   ; AERMR01    ;   1.210
+AEROSOL TYPE 2 MIXING RATIO                   ; AERMR02    ;   2.210
+AEROSOL TYPE 3 MIXING RATIO                   ; AERMR03    ;   3.210
+AEROSOL TYPE 4 MIXING RATIO                   ; AERMR04    ;   4.210
+AEROSOL TYPE 5 MIXING RATIO                   ; AERMR05    ;   5.210
+AEROSOL TYPE 6 MIXING RATIO                   ; AERMR06    ;   6.210
+AEROSOL TYPE 7 MIXING RATIO                   ; AERMR07    ;   7.210
+AEROSOL TYPE 8 MIXING RATIO                   ; AERMR08    ;   8.210
+AEROSOL TYPE 9 MIXING RATIO                   ; AERMR09    ;   9.210
+AEROSOL TYPE 10 MIXING RATIO                  ; AERMR10    ;  10.210
+AEROSOL TYPE 11 MIXING RATIO                  ; AERMR11    ;  11.210
+AEROSOL TYPE 12 MIXING RATIO                  ; AERMR12    ;  12.210
+AEROSOL TYPE 1 SOURCE/GAIN ACCUMULATED        ; AERGN01    ;  16.210
+AEROSOL TYPE 2 SOURCE/GAIN ACCUMULATED        ; AERGN02    ;  17.210
+AEROSOL TYPE 3 SOURCE/GAIN ACCUMULATED        ; AERGN03    ;  18.210
+AEROSOL TYPE 4 SOURCE/GAIN ACCUMULATED        ; AERGN04    ;  19.210
+AEROSOL TYPE 5 SOURCE/GAIN ACCUMULATED        ; AERGN05    ;  20.210
+AEROSOL TYPE 6 SOURCE/GAIN ACCUMULATED        ; AERGN06    ;  21.210
+AEROSOL TYPE 7 SOURCE/GAIN ACCUMULATED        ; AERGN07    ;  22.210
+AEROSOL TYPE 8 SOURCE/GAIN ACCUMULATED        ; AERGN08    ;  23.210
+AEROSOL TYPE 9 SOURCE/GAIN ACCUMULATED        ; AERGN09    ;  24.210
+AEROSOL TYPE 10 SOURCE/GAIN ACCUMULATED       ; AERGN10    ;  25.210
+AEROSOL TYPE 11 SOURCE/GAIN ACCUMULATED       ; AERGN11    ;  26.210
+AEROSOL TYPE 12 SOURCE/GAIN ACCUMULATED       ; AERGN12    ;  27.210
+AEROSOL TYPE 1 SINK/LOSS ACCUMULATED          ; AERLS01    ;  31.210
+AEROSOL TYPE 2 SINK/LOSS ACCUMULATED          ; AERLS02    ;  32.210
+AEROSOL TYPE 3 SINK/LOSS ACCUMULATED          ; AERLS03    ;  33.210
+AEROSOL TYPE 4 SINK/LOSS ACCUMULATED          ; AERLS04    ;  34.210
+AEROSOL TYPE 5 SINK/LOSS ACCUMULATED          ; AERLS05    ;  35.210
+AEROSOL TYPE 6 SINK/LOSS ACCUMULATED          ; AERLS06    ;  36.210
+AEROSOL TYPE 7 SINK/LOSS ACCUMULATED          ; AERLS07    ;  37.210
+AEROSOL TYPE 8 SINK/LOSS ACCUMULATED          ; AERLS08    ;  38.210
+AEROSOL TYPE 9 SINK/LOSS ACCUMULATED          ; AERLS09    ;  39.210
+AEROSOL TYPE 10 SINK/LOSS ACCUMULATED         ; AERLS10    ;  40.210
+AEROSOL TYPE 11 SINK/LOSS ACCUMULATED         ; AERLS11    ;  41.210
+AEROSOL TYPE 12 SINK/LOSS ACCUMULATED         ; AERLS12    ;  42.210
+AEROSOL PRECURSOR MIXING RATIO                ; AERPR      ;  46.210
+AEROSOL SMALL MODE MIXING RATIO               ; AERSM      ;  47.210
+AEROSOL LARGE MODE MIXING RATIO               ; AERLG      ;  48.210
+AEROSOL PRECURSOR OPTICAL DEPTH               ; AODPR      ;  49.210
+AEROSOL SMALL MODE OPTICAL DEPTH              ; AODSM      ;  50.210
+AEROSOL LARGE MODE OPTICAL DEPTH              ; AODLG      ;  51.210
+DUST EMISSION POTENTIAL                       ; AERDEP     ;  52.210
+LIFTING THRESHOLD SPEED                       ; AERLTS     ;  53.210
+SOIL CLAY CONTENT                             ; AERSCC     ;  54.210
+CARBON DIOXIDE                                ; CO2        ;  61.210
+METHANE                                       ; CH4        ;  62.210
+NITROUS OXIDE                                 ; N2O        ;  63.210
+TOTAL COLUMN CARBON DIOXIDE                   ; TCCO2      ;  64.210
+TOTAL COLUMN METHANE                          ; TCCH4      ;  65.210
+TOTAL COLUMN NITROUS OXIDE                    ; TCN2O      ;  66.210
+OCEAN FLUX OF CARBON DIOXIDE                  ; CO2OF      ;  67.210
+NATURAL BIOSPHERE FLUX OF CARBON DIOXIDE      ; CO2NBF     ;  68.210
+ANTHROPROGENIC EMISSIONS OF CARBON DIOXIDE    ; CO2APF     ;  69.210
+METHANE SURFACE FLUXES                        ; CH4F       ;  70.210
+METHANE LOSS RATE DUE TO RADICAL HYDROXYL     ; kCH4       ;  71.210
+WILDFIRE FLUX OF CARBON DIOXIDE               ; CO2FIRE    ;  80.210
+WILDFIRE FLUX OF CARBON MONOXIDE              ; COFIRE     ;  81.210
+WILDFIRE FLUX OF METHANE                      ; CH4FIRE    ;  82.210
+WILDFIRE FLUX OF NON-METHANE HYDRO-CARBONS    ; NMHCFIRE   ;  83.210
+WILDFIRE FLUX OF HYDROGEN                     ; H2FIRE     ;  84.210
+WILDFIRE FLUX OF NITROGEN OXIDES NOX          ; NOXFIRE    ;  85.210
+WILDFIRE FLUX OF NITROUS OXIDE                ; N2OFIRE    ;  86.210
+WILDFIRE FLUX OF PARTICULATE MATTER PM2.5     ; PM2P5FIRE  ;  87.210
+WILDFIRE FLUX OF TOTAL PARTICULATE MATTER     ; TPMFIRE    ;  88.210
+WILDFIRE FLUX OF TOTAL CARBON IN AEROSOLS     ; TCFIRE     ;  89.210
+WILDFIRE FLUX OF ORGANIC CARBON               ; OCFIRE     ;  90.210
+WILDFIRE FLUX OF BLACK CARBON                 ; BCFIRE     ;  91.210
+WILDFIRE OVERALL FLUX OF BURNT CARBON         ; CFIRE      ;  92.210
+WILDFIRE FRACTION OF C4 PLANTS                ; C4FFIRE    ;  93.210
+WILDFIRE VEGETATION MAP INDEX                 ; VEGFIRE    ;  94.210
+WILDFIRE COMBUSTION COMPLETENESS              ; CCFIRE     ;  95.210
+WILDFIRE FUEL LOAD CARBON PER UNIT AREA       ; FLFIRE     ;  96.210
+WILDFIRE FRACTION OF AREA BURNT               ; BFFIRE     ;  97.210
+WILDFIRE OBSERVED AREA                        ; OAFIRE     ;  98.210
+WILDFIRE RADIATIVE POWER                      ; FRPFIRE    ;  99.210
+WILDFIRE DRY MATTER COMBUSTION RATE DENSITY   ; DMFIRE     ; 100.210
+NITROGEN DIOXIDE                              ; NO2        ; 121.210
+SULPHUR DIOXIDE                               ; SO2        ; 122.210
+CARBON MONOXIDE                               ; CO         ; 123.210
+FORMALDEHYDE                                  ; HCHO       ; 124.210
+TOTAL COLUMN NITROGEN DIOXIDE                 ; TCNO2      ; 125.210
+TOTAL COLUMN SULPHUR DIOXIDE                  ; TCSO2      ; 126.210
+TOTAL COLUMN CARBON MONOXIDE                  ; TCCO       ; 127.210
+TOTAL COLUMN FORMALDEHYDE                     ; TCHCHO     ; 128.210
+NITROGEN OXIDES                               ; NOX        ; 129.210
+TOTAL COLUMN NITROGEN OXIDES                  ; TCNOX      ; 130.210
+RADON                                         ; RA         ; 181.210
+SULPHUR HEXAFLUORIDE                          ; SF6        ; 182.210
+TOTAL COLUMN RADON                            ; TCRA       ; 183.210
+TOTAL COLUMN SULPHUR HEXAFLUORIDE             ; TCSF6      ; 184.210
+ANTHROPOGENIC EMISSIONS OF SULPHUR HEXAFLUORIDE ; SF6APF     ; 185.210
+GEMS OZONE                                    ; GO3        ; 203.210
+GEMS TOTAL COLUMN OZONE                       ; GTCO3      ; 206.210
+TOTAL AEROSOL OPTICAL DEPTH AT 550NM          ; AOD550     ; 207.210
+SEA SALT AEROSOL OPTICAL DEPTH AT 550NM       ; SSAOD550 ; 208.210
+DUST AEROSOL OPTICAL DEPTH AT 550NM           ; DUAOD550 ; 209.210
+ORGANIC MATTER AEROSOL OPTICAL DEPTH AT 550NM ; OMAOD550 ; 210.210
+BLACK CARBON AEROSOL OPTICAL DEPTH AT 550NM   ; BCAOD550 ; 211.210
+SULPHATE AEROSOL OPTICAL DEPTH AT 550NM       ; SUAOD550 ; 212.210
+TOTAL AEROSOL OPTICAL DEPTH AT 469NM          ; AOD469 ; 213.210
+TOTAL AEROSOL OPTICAL DEPTH AT 670NM          ; AOD670 ; 214.210
+TOTAL AEROSOL OPTICAL DEPTH AT 865NM          ; AOD865 ; 215.210
+TOTAL AEROSOL OPTICAL DEPTH AT 1240NM         ; AOD1240 ; 216.210
+
+		*
+        /   
+    } = Z
+
+    CLASS
+    {
+        OPERATIONS  ;   OD
+        RESEARCH    ;   RD
+        REANALYSE   ;   ER
+        ECSN        ;   CS
+        REANALYSE40 ;   E4
+		ERA INTERIM ;   EI
+        DEMETER     ;   DM
+        PROVOST     ;   PV
+        ELDAS       ;   EL
+        TOST        ;   TO
+        COSMO       ;   CO
+        ENSEMBLES   ;   EN
+        MERSEA      ;   ME
+		SREPS       ;   SR
+		DTS         ;   DT
+		LACE        ; LAEF   ; ALADIN-LAEF ;   LA
+		YOTC        ;   YT
+		MACC        ;   MC
+		PERMANENT EXPERIMENT ; PE
+		E20CM       ; EM
+		E20C        ; E2
+		ESAT        ; EA
+		EPST        ; EP
+
+        EURO4M      ; 4M
+
+		! Member stats
+
+		AUSTRIA		;	AT 
+		BELGIUM		;	BE 
+		CROATIA		;	HR 
+		DENMARK		;	DK 
+		FINLAND		;	FI 
+		FRANCE		;	FR 
+		GERMANY		;	DE 
+		GREECE		;	GR 
+		HUNGARY		;	HU 
+		ICELAND		;	IS 
+		IRELAND		;	IE 
+		ITALY		;	IT 
+		NETHERLANDS	;	NL 
+		NORWAY		;	NO 
+		PORTUGAL	;	PT 
+		SLOVENIA	;	SI 
+		SPAIN		;	ES 
+		SWEDEN		;	SE 
+		SWITZERLAND	;	CH 
+		TURKEY		;	TR 
+		UNITED KINGDOM;	UK 
+
+		! Test
+		METAPS      ;   MA
+		TEST        ;   TE
+    } = OD
+
+    TYPE
+    {
+		3D VARIATIONAL ANALYSIS     ;   3V
+		3D VARIATIONAL GRADIENTS    ;   3G
+		4D VARIATIONAL ANALYSIS     ;   4V
+		4D VARIATIONAL INCREMENTS   ;   4I
+		4D VARIATIONAL GRADIENTS    ;   4G
+		ADJOINT SINGULAR VECTOR     ;   AS
+		ANALYSIS BIAS               ;	AB
+		ANALYSIS INPUT              ;	AI
+		ANALYSIS FEEDBACK           ;	AF
+		ANALYSIS                    ;   AN
+		ASSIMILATION RUN            ;   AR
+		BIAS-CORRECTED FORECAST     ;   BF
+		CALIBRATION VALIDATION FORECAST      ;   CV
+		CLIMATE DISTRIBUTION        ;   CD
+		CLIMATOLOGY                 ;   CL
+		CLUSTERING INFORMATION      ;   CI
+		CLUSTER MEANS               ;   CM
+		CLUSTER REPRESENTATIVE      ;   CR
+		CLUSTER STD DEVIATIONS      ;   CS
+		CONTROL FORECAST            ;   CF
+		EMPIRICAL DISTRIBUTION      ;   ED
+		ENSEMBLE MEAN               ;   EM
+		ENSEMBLE STANDARD DEVIATION ;   ES
+		ERRORS IN ANALYSIS          ;   EA
+		ERRORS IN FIRST GUESS       ;   EF
+		EXTREME FORECAST INDEX      ;   EFI
+		EXTREME FORECAST INDEX CONTROL ;   EFIC
+		FIRST GUESS                 ;   FG
+		FLUX FORCING REALTIME       ;   FF
+		FORECAST                    ;   FC
+		SIMULATED IMAGES            ;   SIM
+		SIMULATED SATELLITE DATA    ;   SSD
+		EVENT PROBABILITY           ;   EP
+		FORECAST PROBABILITY        ;   FP
+		FORECAST ACCUMULATION       ;   FA
+		FLUX FORCING                ;   FX
+		GRIDDED OBSERVATIONS        ;   GO
+		HINDCAST MEAN               ;   HCMEAN
+		IMAGES                      ;   IM
+		INIT. ANALYSIS              ;   IA
+		INITIAL CONDITION PERTURBATION ; ICP
+		MODEL ERRORS                ;   ME
+		OBSERVATIONS                ;   OB
+		OCEAN FORWARD               ;   OF
+		OCEAN REANALYSIS            ;   OR
+		OI ANALYSIS                 ;   OI
+		OLD FORMAT IMAGES           ;   OLDIM
+		PERTURBED ANALYSIS          ;   PA
+		PERTURBED FORECAST          ;   PF
+		PROBABILITY BOUNDARY        ;   PB
+		PROBABILITY DISTRIBUTION    ;   PD
+		SCALED ENSEMBLE STANDARD DEVIATION ;   SES
+		SENSITIVITY FORECAST        ;   SF
+		SENSITIVITY GRADIENT        ;   SG
+		SHIFT OF TAILS              ;   SOT
+		SIGNAL VARIANCE             ;   SVAR
+		SINGULAR VECTOR             ;   SV
+		TIME AVERAGE ENSEMBLE MEAN  ;               TAEM
+		TIME AVERAGE ENSEMBLE STANDARD DEVIATION ;  TAES
+		TRAJECTORY FORECAST         ;   TF
+		TUBE                        ;   TU
+		WEATHER PARAMETERS          ;   WP
+		WEIGHTED ENSEMBLE MEAN               ;   WEM
+		WEIGHTED ENSEMBLE STANDARD DEVIATION ;   WES
+		FEEDBACK                    ;   FB
+                CLIMATE SIMULATION          ;   SI
+		CLIMATE 30 DAYS SIMULATION  ;   S3
+
+		FCMEAN
+		FCMAX
+		FCMIN
+		FCSTDEV
+		ODB FEEDBACK                ; OFB
+		MONDB FEEDBACK              ; MFB
+
+    } = AN
+    
+    STREAM
+    {
+		ANALYSIS FOR MULTIANALYSIS PROJECT ; AMAP
+        BRACKNELL               ; EXETER  ;   EGRR    
+        CHERNOBYL               ;   CH; CHER
+        DAILY ARCHIVE           ;   DA; OPER
+		DAILY ARCHIVE HINDCASTS ;   DAHC
+		DAILY CLIMATOLOGY       ;   DACL
+		DAILY CLIMATOLOGY WAVE  ;   DACW
+        ENSEMBLE DATA ASSIMILATION      ;   ENDA
+		ENSEMBLE DATA ASSIMILATION MONTHLY MEANS                      ; EDMM
+		ENSEMBLE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS       ; EDMO
+		ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS  ; EWMO
+		ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS                 ; EWMM
+		ENSEMBLE LONG WINDOW DATA ASSIMILATION      ; ELDA
+		ENSEMBLE WAVE LONG WINDOW DATA ASSIMILATION ; EWLA
+        ENSEMBLE FORECASTS      ;    EF ; ENFO
+		ENSEMBLE FORECAST HINDCASTS ; EFHC
+		ENSEMBLE FORECAST HINDCAST STATISTICS ; EFHS
+		ENSEMBLE FORECAST OVERLAP ; EFOV
+        ENSEMBLE WAVE DATA ASSIMILATION   ;   EWDA
+		ENFH
+		ENWH
+		EFHO
+		EWHO
+		ERS1                    ;   E1
+		EUROSIP MONTHLY MEANS            ;   ESMM
+		EUROSIP HINDCAST MONTHLY MEANS   ;   EHMM
+        FG                               ;  FGGE         
+        MEANS ARCHIVE           ;   MA
+		MELBOURNE               ;   AMMC
+
+		LONG WINDOW DAILY ARCHIVE             ; LWDA
+		LONG WINDOW WAVE                      ; LWWV
+		MONTHLY FORECAST                      ; MNFC
+		MONTHLY FORECAST HINDCASTS            ; MNFH
+		MONTHLY FORECAST ANOMALIES            ; MNFA
+		MONTHLY FORECAST WAVE                 ; MNFW
+		MONTHLY FORECAST HINDCASTS WAVE       ; MFHW
+		MONTHLY FORECAST ANOMALIES WAVE       ; MFAW
+		MONTHLY FORECAST MEANS                ; MNFM
+		MONTHLY FORECAST HINDCASTS MEANS      ; MFHM
+		MONTHLY FORECAST ANOMALIES MEANS      ; MFAM
+		MONTHLY FORECAST WAVE MEANS           ; MFWM
+		MONTHLY FORECAST HINDCASTS WAVE MEANS ; MHWM
+		MONTHLY FORECAST ANOMALIES WAVE MEANS ; MAWM 
+
+		MONTHLY STDDEV         ;   SYNOPTIC MONTHLY VARIANCE AND CO-VARIANCE ; MV ; MSDC
+		MONTHLY DAILY STDDEV   ;   MONTHLY VARIANCE AND CO-VARIANCE ; MSDA  
+		MONTHLY DAILY MEANS    ;   MONTHLY MEANS OF DAILY MEANS ;   MODA
+		MONTHLY DAILY FORECAST ACCUMULATION ; MDFA
+		MONTHLY MEANS BOERS    ;   MOBR
+        MONTHLY                ; SYNOPTIC MONTHLY MEANS ;   MO; MNTH
+		MONTHLY STDDEV BOERS   ;   MVBR
+
+		SYNOPTIC MONTHLY VARIANCE AND CO-VARIANCE OF FILTERED FIELDS ;  MFVC
+		MONTHLY VARIANCE AND CO-VARIANCE OF FILTERED FIELDS          ;  MFVA
+
+        MONTREAL               ;   CWAO
+        MULTIANALYSIS ENSEMBLE DATA  ;   MAED
+        MULTIANALYSIS WAVE DATA      ;   MAWV
+
+		MULTIMODEL SEASONAL FORECAST                ; MMSF
+		MULTIMODEL SEASONAL FORECAST MEANS          ; MSMM
+		MULTIMODEL SEASONAL FORECAST WAVE           ; WAMS
+		MULTIMODEL SEASONAL FORECAST WAVE MEANS     ; MSWM
+		MULTIMODEL SEASONAL FORECAST MEAN ANOMALIES ; MMSA
+
+		MULTIMODEL MULTIANNUAL FORECAST             ; MMAF
+		MULTIMODEL MULTIANNUAL FORECAST MEANS       ; MMAM
+		MULTIMODEL MULTIANNUAL FORECAST WAVE        ; MMAW
+		MULTIMODEL MULTIANNUAL FORECAST WAVE MEANS  ; MMWM
+
+        OFFENBACH              ;   EDZW
+		OCEAN                  ;   OCEA
+        OLD MONTHLY FORECAST             ;   MOFC  
+        OLD MONTHLY FORECAST MEANS       ;   MOFM  
+		OLD WAVE MONTHLY FORECAST        ;   WAMF
+		OLD WAVE MONTHLY FORECAST  MEANS ;   WMFM
+        PARIS                  ;   LFPW 
+		SEASONAL FORECAST      ;   SEAS
+		SEASONAL MONTHLY MEANS ; SFMM
+		SEASONAL MONTHLY MEANS ANOMALIES ; SMMA
+		SEASONAL WAVE MONTLHY MEANS ; SWMM
+		SENSITIVE AREA PREDICTIONS ; SEAP
+		SENSITIVITY FORECAST   ;    SF ; SENS
+		SHORT CUTOFF DAILY ARCHIVE  ;   SCDA
+		SHORT CUTOFF WAVE      ;   SCWV
+		DELAYED CUTOFF DAILY ARCHIVE  ;   DCDA
+		DELAYED CUTOFF WAVE           ;   DCWV
+		SSBT                   ;   SSBT
+		SSMI                   ;   SSMI
+        SUPPLEMENTARY DATA     ;   SD ; SUPD
+        ENSEMBLE SUPPLEMENTARY DATA     ;   ESPD
+        TOGA                   ;   TG ; TOGA
+        TOKYO                  ;   RJTD
+        WASHINGTON             ;   KWBC
+        WAVE                   ;   WV ; WAVE
+        WAVE ENSEMBLE FORECAST ;   WAEF
+        WAVE ENSEMBLE FORECAST HINDCASTS ;   EWHC
+        WAVE ENSEMBLE FORECAST OVERLAP ;   WEOV
+        WAVE ENSEMBLE HINDCAST STATISTICS ;   WEHS
+        WAVE HINDCASTS         ;   WVHC
+		WAVE MODEL             ;   WAVM
+        WAVE SEASONAL FORECAST ;   WASF
+        WAMO                   ;   WAMO
+        WMO                    ;   WM
+        UKMO CLIMATE SUPPORT   ;   UKMO
+        CNRM CLIMATE SUPPORT   ;   CNRM
+        MPI  CLIMATE SUPPORT   ;   MPIC
+		2243
+		2242
+    } = DA
+
+	ORIGIN 
+	{
+		OFF ; OFF
+        WASHINGTON            ;   7     ; KWBC
+        BRACKNELL   ; EXETER  ;   74    ; EGRR    
+        FLEET NUMERICAL       ;   58    ; FNMOC ; FNMO
+        OFFENBACH             ;   78    ; DWD   ; EDZW
+        ECMWF                 ;   98    ; ECMF
+		TOULOUSE              ;   85    ; LFPW
+		PARIS                 ;   84    ; LFPW
+		MADRID                ;   214   ; LEMM
+		UNIVERSITY OF VIENNA  ;   244   ; VUWIEN
+		KNMI                  ;   245   ; KNMI
+		INGV                  ;   235   ; INGV
+		CERFACS               ;   239   ; CRFC
+		IFMK                  ;   246   ; IFMK
+		HADLEY CENTRE         ;   247   ; HADC
+		CONSENSUS             ;   255   ; CONSENSUS
+# for TIGGE
+		MELBOURNE             ;   1     ; AMMC
+        TOKYO                 ;   34    ; RJTD
+        MONTREAL              ;   54    ; CWAO
+        BEIJING               ;   38    ; BABJ
+		SEOUL                 ;   40    ; RKSL
+		CPTEC                 ;   46    ; SBSJ
+		CNMC                  ;   80    ; CNMC
+		OSLO                  ;   88    ; ENMI
+		/
+		ALL
+	} = OFF
+
+    MODEL
+	{
+		OFF
+		ECMF
+		EDZW
+		EGRR
+		LFPW
+		KWBC
+		NONE
+		HRM
+		LM
+		IFS
+		GLOBAL ; GLOB
+		@
+	} = OFF
+
+	SYSTEM {
+		*
+		ALL
+	}
+
+	METHOD {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+	}
+
+	PRODUCT {
+		INSTANTANEOUS     ; INST
+		TIME-SERIES       ; TIMS
+		TIME-AVERAGE      ; TAVG
+		TIME-ACCUMULATION ; TACC
+		ALL
+	} = INSTANTANEOUS
+
+	SECTION {
+		HORIZONTAL  ; H
+		VERTICAL    ; V
+		ZONAL       ; Z 
+		MERIDIONAL  ; M
+		ALL
+	} = HORIZONTAL
+
+
+
+    LEVTYPE  
+    {
+		POTENTIAL VORTICITY   ; PV
+		POTENTIAL TEMPERATURE ; PT
+        SURFACE               ; SFC
+        PRESSURE LEVELS       ; PL
+        MODEL LEVELS          ; ML
+		DEPTH                 ; DP
+		OCEAN WAVE            ; WV
+		LAYER                 ; LAYER
+		CATEGORY              ; CAT
+		ALL
+    } = PL
+    
+    REPRES 
+    {
+        BUFR            ;   BU
+        SPHERICAL HARMONICS ;   SH
+        LAT LONG GRID       ;   LL
+        GAUSSIAN GRID       ;   GG
+		SPACE VIEW          ; SV
+		OCEAN GRID          ; OG
+		ALL
+    } = SH
+
+    OBSTYPE
+    {
+		 *   
+		 /   
+
+		 ALL                = (NSD/SD)
+		 CONVENTIONAL; NSD  = (LSD/SSD/VSNS/SLNS/SLS/OD/DD/CC/SF/GBGPS/OSTIA)
+		 SD                 = (SDS/VSS/SSMI/SSMIS/SSBT/TRMM/QSCAT/REO3/IASI/ATMS/CRIS)
+
+# Image stuff
+
+GRIB IMAGES #= (0/1/10/20)
+
+	FIRST INFRARED BAND  ; FIB ; 0
+	SECOND INFRARED BAND ; SIB ; 1
+	FIRST VISIBLE BAND   ; FVB ; 10
+	WATER VAPOR BAND     ; WVB ; 20
+
+# Extractions
+
+BUFR = (1/3/9/11/13/19/21/22/23/28/61/62/63/82/83/84/85/86/87/91/92/95/96/101/102/103/106/110/140/142/144/145/164)
+WAVESCAT = (121)
+SCAT = (122)
+RALT = (123)
+TOVH = (53)
+GRAD = (88/89/189/190)
+ATOV = (55)
+AIRS = (57)
+STORM = (31)
+IMSSNOW = (165)
+AMSU_EARS = (155)
+BALTIC_CI = (237)
+WAVESAR = (210)
+IASI = (240)
+OSTIA = (26)
+ENVISAT_MERIS = (212)
+ATMS = (201)
+CRIS = (202)
+
+# FeedBack
+
+FBCONV = (1/3/9/11/13/19/21/22/23/28/65/82/83/86/87/91/92/95/96/101/102/103/106/110/140/142/143/144/145/164)
+FBSCAT = (122/136/137/139)
+FBSSMI = (127)
+FBTMI  = (129)
+FBTOVS = (53)
+FBRAD1C = (54/55)
+FBGEOS = (89/189/190)
+FBTRMR = (255)
+FBREO3 = (206)
+FBAIRS = (57)
+FBAMSRE = (59)
+FBSSMIS = (49)
+FBGPSRO = (250)
+FBIASI = (240)
+FBWINDSAT = (156)
+
+# Type LSD (NSD)
+
+	LAND SURFACE DATA         ; LSD = (1/2/3/4/7/140/165/28)
+
+	SYNOP LAND                ; S   ; 1
+	SYNOP RECORD 2 LAND       ; S2  ; 2
+	SYNOP AUTO LAND           ; SA  ; 3
+	SYNOP AUTO RECORD 2 LAND  ; SA2 ; 4
+	SOIL AND EARTH TEMPERATURE; SET ; 7
+	METAR                     ; METAR ; 140
+	SNOW COVER                ; SNOWCOVER ; SNOW ; 165
+	SNOW DEPTH                ; SNOWD ; 28
+
+# Type SSD (NSD)
+
+	SEA SURFACE DATA ; SSD  = ( 9/11/12/13/14/19/21/22/23 )
+
+	SYNOP ABBREVIATED SHIP    ; SAB ; 9
+	SYNOP SHIP               ; SS   ; 11
+	SYNOP RECORD 2 SHIP      ; SS2  ; 12
+	SYNOP AUTO SHIP          ; SAS  ; 13
+	SYNOP AUTO RECORD 2 SHIP ; SAS2 ; 14
+	SHRED                    ; SH   ; 19
+	DRIBU SURFACE             ; DSU ; 21
+	BATHY SURFACE             ; BSU ; 22
+	TESAC SURFACE             ; TSU ; 23
+	OSTIA                     ;       26
+	BUOY                      ;       27
+
+
+# Type VSNS (NSD)
+
+VERTICAL SOUNDINGS NOT SATELLITE ; VSNS = (91/92/95/96/97/101/102/103/104/105/106/107)
+
+	PILOT LAND   ;  P   ; 91
+	PILOT SHIP   ;  PS  ; 92
+	WIND PROFILE ;  WP  ; 95
+	EUROPEAN WIND PROFILE;  EWP  ; 96
+	EUROPEAN WIND AND TEMPERATURE PROFILE;  EWTP  ; 97
+	TEMP LAND    ;  T   ; 101
+	TEMP SHIP    ;  TS  ; 102
+	TEMP DROP    ;  TD  ; 103
+	ROCOB LAND   ;  R   ; 104
+	ROCOB SHIP   ;  RS  ; 105
+	TEMP MOBILE	 ;  TM  ; 106
+	CLIMATE TEMP ;  CT  ; 107
+
+# Type VSS (SD)
+
+VERTICAL SOUNDINGS SATELLITE ; VSS = (51/53/54/55/56/57/59/61/62/63/65/71/72/73/75/138/139/155/250)
+
+	HIGH RESOLUTION        ;  HR    ; 51
+	RTOVS                  ;  RTOV  ; 53
+	TOVS1b                 ;  TOVB  ; 54
+	ATOVS                  ;  ATOV  ; 55
+	ATOVS PRODUCTS         ;  ATOP  ; 56
+	AIRS                   ;  AIRS  ; 57
+	ADVANCED MICROWAVE SCANNING RADIOMETER  ;  AMSRE ; 59
+	SATEM MEAN TEMPERATURE ;  SMT   ; 61
+	SATEM WATER            ;  SW    ; 62
+	SATEM HIGHER LEVEL     ;  SHL   ; 63
+	SATEM LEVELS MERGED    ;  SLM   ; 65
+	MEAN TEMPERATURE       ;  MT    ; 71
+	WATER                  ;  W     ; 72
+	HIGHER LEVEL           ;  HL    ; 73
+	TOVS LEVELS MERGED     ;  TLM   ; 75
+	ATOVS EUMETSAT         ;  ATEU  ; 155
+	GPS RADIO OCCULTATION  ; GPSRO ; 250
+	ASCAT                  ; 139
+	OSCAT                  ; 138
+
+	IASI_SCREENED          ; IASI  ; 240
+
+CHEMICAL CONSTITUENT; CC = (162/159)
+
+#	SURFACE OZONE           ;  SO    ; 157
+#	SURFACE OZONE AVERAGED  ;  SOA   ; 158
+	OZONE PARTIAL           ;  OP    ; 159
+	OZONE VERTICAL SOUNDING ;  OVS   ; 162
+
+# Synoptic Features
+
+SYNOPTIC FEATURES; SF = (31)
+    STORM ; STOR ; 31
+	TROPICAL CYCLONE ; TC ; 32
+
+SATELLITE = (VSS/SSBT/SSMI/SSMIS/QSCAT/REO3/WSAT/VASS/ATMS)
+
+# Type SLNS (NSD)
+
+SINGLE LEVEL UPPER AIR NOT SATELLITE ; SLNS = (141/142/143/144/145)
+
+	CODAR ;  COD ; 141
+	AIREP ;  AIR ; 142
+	COLBA ;  COL ; 143
+	AMDAR ;  AM  ; 144
+	ACARS ;  AC  ; 145
+
+# Type SLS (NSD)
+
+SINGLE LEVEL UPPER AIR SATELLITE ; SLS = (82/83/84/85/86/87/88/89/189/190)
+
+	SATOB SECTION 2                            ; SAT2 ; 82
+	SATOB SECTION 3                            ; SAT3 ; 83
+	SATOB SECTION 4                            ; SAT4 ; 84
+	SATOB SECTION 5                            ; SAT5 ; 85
+    HIGH RESOLUTION WINDS                      ; SAT6 ; 86 
+    HIGH DENSITY UNIFIED FORMAT SATELLITE WINDS; SAT7 ; 87
+	GEOSTATIONARY RADIANCES                    ; GEOR ; 88 
+	GEOSTATIONARY CLEAR SKY RADIANCES          ; GCSR ; 89
+	GEOSTATIONARY MSG RADIANCES                ; GMSGR ; 189
+	GEOSTATIONARY ALL SKY RADIANCES            ; GASR ; 190
+
+# Type OD (NSD)
+
+OCEANOGRAPHIC DATA      ;   OD = (131/132/133) 
+
+	DRIBU OCEANOGRAPHIC     ;   DO ; 131
+	BATHY OCEANOGRAPHIC     ;   BO ; 132
+	TESAC OCEANOGRAPHIC     ;   TO ; 133
+
+# Type DD (NSD)
+
+DERIVED DATA ;   DD = (164/237) 
+	PAOBS ; PA ; 164
+	BALTIC SEA ICE ; BICE ; 237
+
+
+
+# Type SDS, ERS1 (SD)
+
+SURFACE DATA SATELLITE  ; ERS1; SDS = (121/122/123/124/210/212/213/214/216)
+
+	WAVE SCATTEROMETER      ; WAS  ; 121
+	WIND SCATTEROMETER      ; WIS  ; 122
+	RADAR ALTIMETER         ; RAL  ; 123
+	SEA SURFACE TEMPERATURE ; SST  ; 124
+	ENVISAT SAR             ; ESAR  ; 210
+	ENVISAT MERIS           ; EMERIS ; 212
+	ENVISAT RADAR ALTIMETER ; ERA  ; 213
+	JASON RADAR ALTIMETER ;   JRA  ; 214
+	JASON2 RADAR ALTIMETER ;  J2RA ; 216
+
+# RADAR
+	REPROCESSED WIND        ; RW ;  NEXRAD ; 125
+NEXRAD_RR = (125)
+
+# SSMI
+	
+	MICROWAVE IMAGES  ;  SSMI = (126)
+        SPECIAL SENSOR MICROWAVE IMAGER SOUNDER ; SSMIS = (49)
+
+SEA SURFACE BRIGTHNESS TEMPERATURE ; SSBT ; 127
+
+# TRMM
+TRMM = (129/130)
+TMI BRIGHTNESS TEMPERATURES              ; TBT  ; 129
+TMI INSTANTANEOUS 3-D RAINFALL STRUCTURE ; TI3R ; 130
+
+QSCAT = (137/138)
+QUIKSCAT                                 ; QSCA ; 137
+QUIKSCAT SEAWINDS                        ; QSSW ; 138
+
+REO3 = (206/207/208/209/217)
+RETRIEVED OZONE                          ; REO3 ; 206
+MODIS AEROSOL                                                            ; MODIS     ; 207
+LAYER INTEGRATED MASS DENSITY                                            ; LIMD      ; 208
+LAYER INTEGRATED MASS DENSITY WITH AVERAGING KERNELS                     ; LIMD_AK   ; 209
+LAYER INTEGRATED MASS DENSITY WITH AVERAGING KERNELS AND A PRIORI PROFIL ; LIMD_AKPP ; 217
+
+GBGPS = (110)
+GROUND BASED GPS                         ; PGPS ; 110
+
+WINDSAT                                  ; WSAT ; 156
+VASS = (154)
+VERTICAL ATMOSPHERIC SOUNDER SYSTEM      ; VASS ; 154
+
+ADVANCED TECHNOLOGY MICROWAVE SOUNDER      ; ATMS ; 201
+CROSS-TRACK INFRARED SOUNDER               ; CRIS ; 202
+
+} = SYNOP LAND
+
+	REPORTYPE {
+
+%include "reportypes.def"
+
+		*
+		/
+		OFF
+	} = OFF
+
+	OBSGROUP {	
+#		CONVENTIONAL
+		SAT          ; SATELLITE
+		ERS1 
+		TRMM
+		QSCAT
+#		IASI
+
+		# reo3 needs to stay for compatibility 
+		REO3
+
+%include "obsgroups.def"
+
+	} = CONV
+    
+    DOMAIN
+    {
+		GENERAL EUROPEAN AREA   ; G
+		GLOBE                   ; G
+        MEDITERRANEAN           ; M
+        NORTHERN HEMISPHERE     ; N
+        SOUTHERN HEMISPHERE     ; S
+		BALTIC AND BLACK SEA    ; B
+		EUROPE                  ; E
+        NORTH WEST EUROPE       ; A
+        NORTH EAST EUROPE       ; B
+        SOUTH WEST EUROPE       ; C
+        SOUTH EAST EUROPE       ; D
+		WESTERN ATLANTIC        ; W
+		FASTEX                  ; F
+		TROPICS                 ; T
+		TROPICS 2               ; U
+		X
+		ALL
+		V
+		H
+		I
+		J
+		K
+		L
+		O
+		P
+		Q
+		R
+		Y
+		Z
+    } = GLOBE
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY         ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+        CURRENT DATE ; 0
+        YESTERDAY    ; -1
+		TO          ; TO
+		BY          ;   BY
+		/
+		OFF
+    } = CURRENT DATE
+
+	IDENT {
+        METEOSAT 3 ; MS3  ; 50
+        METEOSAT 4 ; MS4  ; 51
+        METEOSAT 5 ; MS5  ; 52
+        METEOSAT 6 ; MS6  ; 53
+        METEOSAT 7 ; MS7  ; 54
+        METEOSAT 8 ; MS8  ; 55
+        GOES 8     ; GOES ; 252
+        GOES 9     ;        253
+        GOES 10    ;        254
+        GOES 11    ;        255
+        GOES 12    ;        256
+		DMSP 10 ; 204
+		DMSP 13 ; 246
+		/
+		OFF
+	} = OFF
+
+	INSTRUMENT {
+		MHS          ; 203
+		MVIRI        ; 205
+		SEVIRI       ; 207
+		GOES IMAGER  ; 615
+		AMSU-A       ; 570
+		AMSU-B       ; 574
+		MSU          ; 623
+		HIRS2        ; 605
+		HIRS3        ; 606
+		SSU          ; 627
+		*
+		OFF
+		/
+	} = OFF
+
+	CHANNEL {
+		*
+		OFF; OFF
+		/
+		TO 
+		ALL
+	} = OFF
+
+    PADDING  
+    {
+		AUTOMATIC   ; AUTO
+		NONE        ; N    ; 0
+		OFF
+		*
+    } = OFF
+    
+	BRANCH 
+	{
+		TRUE
+		FALSE
+		OFF
+	} = OFF
+
+} ! END OF DUMMY
+
+HELP    ;   Displays prints help file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+NEWS    ;   Displays prints news file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+END ;   Normal exit from mars system    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+DEFAULT ;   Reset defaults    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+ARCHIVE ;   Archives data   ;   MARS
+{
+
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  { &_DUMMY&CLASS  } = OD
+
+    TYPE   { &_DUMMY&TYPE   } = AN
+
+    STREAM { &_DUMMY&STREAM } = DA
+    
+	MODEL  { &_DUMMY&MODEL  } = OFF
+
+	ORIGIN { &_DUMMY&ORIGIN } = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+
+    REPORTYPE { &_DUMMY&REPORTYPE } = OFF
+
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+        /
+    } = 1
+    
+    LEVTYPE { &_DUMMY&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/400/300
+    
+    REPRES { &_DUMMY&REPRES } = SH
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+    
+    OBSTYPE { ALL
+		 KNOWN				= (ALL)
+	&_DUMMY&OBSTYPE } = S
+
+    IDENT
+    {
+		&_DUMMY&IDENT
+		ALL 
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } = CONVENTIONAL	
+    
+    PARAM { &_DUMMY&PARAM } = Z
+
+    CHANNEL { &_DUMMY&CHANNEL } = OFF
+    
+	INSTRUMENT { &_DUMMY&INSTRUMENT } = OFF
+
+    DATE 
+	{
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    VERIFY 
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+    REFERENCE 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        
+		OFF
+    } = OFF 
+
+    STEP
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+    } = NEW
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+    } = OFF
+
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    } = G
+    
+    RESOL
+    {
+        /
+        *   
+    }
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+		OFF
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+
+	CRC
+	{
+		ON
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+    } = REMOVE
+
+	PADDING
+	{
+		&_DUMMY&PADDING
+	} = OFF
+
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+		SERVER 
+        OFF ;   OFF
+    } = OFF
+
+	BRANCH { &_DUMMY&BRANCH } = OFF
+
+} ! END OF ARCHIVE
+
+!------------------------------------------------------------------------
+
+LIST    ;   LIST FDF ENTRIES AND CFS FILES  ;   MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  
+	{ 
+		&_DUMMY&CLASS  
+		/ 
+		ALL
+	} 
+    
+    TYPE   
+	{ 
+		&_DUMMY&TYPE  
+		/  
+		ALL
+	} 
+
+    STREAM 
+	{ 
+		&_DUMMY&STREAM 
+		/ 
+		ALL
+	} 
+    
+	MODEL 
+	{
+		&_DUMMY&MODEL
+		/
+		ALL
+	}
+
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+		ALL
+	}
+
+	SYSTEM 
+	{ 	
+		&_DUMMY&SYSTEM 
+		/
+		ALL 
+	} 
+
+	METHOD 
+	{ 	
+		&_DUMMY&METHOD 
+		/
+		ALL 
+	} 
+
+	PRODUCT 
+	{ 	
+		&_DUMMY&PRODUCT 
+		/
+		ALL 
+	} 
+
+	SECTION 
+	{ 	
+		&_DUMMY&SECTION 
+		/
+		ALL 
+	} 
+
+	LATITUDE 
+	{ 	
+		@
+		/
+		ALL 
+	} 
+
+	LONGITUDE 
+	{ 	
+		@
+		/
+		ALL 
+	} 
+
+    EXPVER{
+		@
+		/
+		ALL
+    } 
+    
+    LEVTYPE 
+	{ 
+		&_DUMMY&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&_DUMMY&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&_DUMMY&DOMAIN
+		/
+		ALL
+    } 
+
+    OBSTYPE 
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+		/
+    } 
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } = ALL
+    
+    REPORTYPE { ALL
+	&_DUMMY&REPORTYPE } = OFF
+
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+		/
+    }
+    
+    CHANNEL 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&CHANNEL 
+	} 
+
+    INSTRUMENT 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&INSTRUMENT 
+	} 
+
+	IDENT
+	{
+		ALL
+		&_DUMMY&IDENT
+		*
+	}
+
+	PSEUDODATE
+	{
+		LATEST
+		EARLIEST
+	}
+
+    DATE
+    {
+		&_DUMMY&DATE
+		ALL
+    } 
+    
+    VERIFY 
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+		ALL
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	YEAR
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+    
+	DECADE
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    REFERENCE 
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = OFF 
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    ENSEMBLE
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    CLUSTER
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } 
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+		OFF
+	} 
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    CFSPATH  
+    {
+        "   
+    } = ""
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } = OFF
+    
+    RESOL 
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	LOCATION 
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	PADDING
+	{
+		&_DUMMY&PADDING
+	} = OFF
+
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+		SERVER
+        OFF ;   OFF
+    } = OFF
+
+	BRANCH { &_DUMMY&BRANCH } = OFF
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	OUTPUT {
+		TABLE
+		BROWSE
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+
+} ! END OF LIST
+
+STAGE    ;   STAGE FIELDS ;    MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE
+	{ 
+		&_DUMMY&TYPE   
+		ALL
+	} = AN
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+	} = DA
+    
+	MODEL 
+	{
+		&_DUMMY&MODEL
+		/
+	} = OFF
+
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+	} = OFF
+
+    EXPVER
+	{
+		@
+        *   
+    } = 1
+    
+
+	SYSTEM 
+	{ 	
+		&_DUMMY&SYSTEM 
+		/
+		ALL 
+	} 
+
+	METHOD 
+	{ 	
+		&_DUMMY&METHOD 
+		/
+		ALL 
+	} 
+
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+    DOMAIN
+    {
+		&_DUMMY&DOMAIN
+    } = G
+
+    OBSTYPE
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = S
+
+	OBSGROUP 
+	{ 
+		&_DUMMY&OBSGROUP
+		OFF    ; OFF
+	} = OFF
+
+    PARAM
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+    } = Z
+    
+    CHANNEL { 
+		ALL     ; ALL
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    INSTRUMENT { 
+		ALL     ; ALL
+		&_DUMMY&INSTRUMENT 
+	} = OFF
+
+    DATE
+    {
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    VERIFY 
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+	REFERENCE 
+	{
+		ALL ;   ALL
+		*
+		/
+		TO  ;   TO
+		BY  ;   BY
+		OFF
+	} = OFF
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    ENSEMBLE
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    BLOCK
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    IDENT
+    {
+		ALL 
+		&_DUMMY&IDENT 
+    }=OFF
+    
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+	RESOL
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+        *   
+	} = AUTO
+
+	ACCURACY
+	{
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+	} = N
+
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+
+	AREA
+	{
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+	} = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	GRID
+	{
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+	} = OFF
+
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+		OFF
+    } = OFF
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	BRANCH { &_DUMMY&BRANCH } = OFF
+
+	DATABASE 
+	{
+		@
+		/
+		OFF
+	} 
+
+} ! END OF STAGE
+
+!------------------------------------------------------------------------
+
+REMOVE  ;   REMOVE FDF ENTRIES AND CFS FILES    ;   MARS
+{
+    
+    CLASS  { 
+
+		RESEARCH    ;   RD
+		OD
+
+		AUSTRIA		;	AT 
+		BELGIUM		;	BE 
+		CROATIA		;	HR 
+		DENMARK		;	DK 
+		FINLAND		;	FI 
+		FRANCE		;	FR 
+		GERMANY		;	DE 
+		GREECE		;	GR 
+		HUNGARY		;	HU 
+		ICELAND		;	IS 
+		IRELAND		;	IE 
+		ITALY		;	IT 
+		NETHERLANDS	;	NL 
+		NORWAY		;	NO 
+		PORTUGAL	;	PT 
+		SLOVENIA	;	SI 
+		SPAIN		;	ES 
+		SWEDEN		;	SE 
+		SWITZERLAND	;	CH 
+		TURKEY		;	TR 
+		UNITED KINGDOM;	UK 
+
+	} = RD
+
+    
+    PASSWORD
+    {
+        "   
+		@
+    } 
+    
+    EXPVER
+    {
+		@
+        "   
+    } = ""
+    
+    DOMAIN
+    {
+		&_DUMMY&DOMAIN
+    }
+    
+	DATABASE
+	{
+		@
+		*
+		/
+		OFF
+	} 
+
+    TYPE   { &_DUMMY&TYPE   }
+
+	DATE { 
+		*
+		TO
+		/
+	}
+
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } 
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} 
+
+	TIME {
+		*
+		TO
+		/
+	}
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+	}
+    
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+	}
+
+
+	SYSTEM 
+	{ 	
+		&_DUMMY&SYSTEM 
+		/
+		ALL 
+	} 
+
+	METHOD 
+	{ 	
+		&_DUMMY&METHOD 
+		/
+		ALL 
+	} 
+
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF }
+	SECTION { &_DUMMY&SECTION 
+			  OFF }
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+	}
+
+	VOLUME { * }
+
+	CREATED { * }
+
+	LASTACCESS { * }
+
+	EXPR { 
+		"
+		* 
+	}
+
+} ! END OF REMOVE
+
+!------------------------------------------------------------------------
+    
+!------------------------------------------------------------------------
+
+EXPORT  ;   Write cfs files to tape    ;   MARS
+{
+    
+    VOLSER
+    {
+        "   
+    } = ""
+    
+    SLOTNO
+    {
+        "   
+    } = ""
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    DENSITY
+    {
+        *
+    } = 6250
+    
+    RECLEN
+    {
+        *   
+    } = 120
+    
+    FILESEQ
+    {
+        *   
+    } = 1
+    
+    SOFTWARE
+    {
+        "   
+    } = ""
+    
+    FILTER
+    {
+        "   
+    } = "*"
+    
+    CHECK
+    {
+        YES ;   Y
+        NO  ;   N
+    } = NO
+
+}
+
+!------------------------------------------------------------------------
+
+
+RETRIEVE    ;   Retrieval of data   ;   MARS
+{
+    
+	DATASET [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		@
+	}
+
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE  	[	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/image/obs/all,
+				mars_interface         = menu,
+				java_hidden  = FALSE ] 
+	{ 
+		&_DUMMY&TYPE   
+		*
+	} = AN
+
+
+    STREAM 	[ 	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&STREAM 
+		*
+	} = DA
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				marsdoc      = id,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+	{
+		@
+		1
+        "   
+        *   
+        /
+    } = 1
+    
+
+    MODEL 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				hidden       = TRUE,
+				java_hidden  = FALSE ]
+	{
+		&_DUMMY&MODEL
+	} = OFF
+
+    REPRES [ java_control = CHOICE, 
+			 java_section = ID, 
+			 marsdoc      = id,
+			 java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+	OBSGROUP [ 	java_hidden  = false , 
+				visible      = true, 
+				check        = false,
+				priority     = 0]
+	{ 
+		&_DUMMY&OBSGROUP 
+		OFF    ; OFF
+	} = OFF
+
+    REPORTYPE 
+	{ 
+		&_DUMMY&REPORTYPE 
+	} = OFF
+
+    
+	RDBPREFIX [	java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{ 
+		@
+		"
+		OFF    ; OFF
+	} = OFF
+    
+    OBSTYPE [ help = help_multiple_selection, # For Metview
+			java_control = LIST_2, 
+			marsdoc      = obs/image/all,
+			mars_interface         = list,
+				check        = false,
+			java_section = METEO, java_hidden = FALSE, priority = 1 ]
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = S
+
+    LEVTYPE [ java_control = CHOICE, 
+			  java_section = ID, 
+			  marsdoc      = field/all,
+			  mars_interface         = menu,
+			  java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, 
+			   java_section = ID, 
+			   marsdoc      = field/level,
+			   mars_interface         = text,
+			   java_hidden = FALSE ]
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, 
+			marsdoc      = field/all,
+			mars_interface         = list,
+			java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             
+        &_DUMMY&PARAM
+    } = Z
+    
+	YEAR [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	DECADE [
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+		&_DUMMY&DATE
+    } = YESTERDAY
+    
+    VERIFY [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   hidden      = TRUE,
+			check        = false,
+		   java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE [ java_control = CHOICE_TEXT_2,
+				java_section = DATE,
+				marsdoc      = date/all,
+				mars_interface         = text,
+				java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+
+    HDATE [ java_control = CHOICE_TEXT_2,
+				java_section = DATE,
+				marsdoc      = date/all,
+				mars_interface         = text,
+				java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		ALL
+		OFF          ; OFF
+    } = OFF
+
+    FCMONTH [ java_control = CHOICE_TEXT_2,
+			java_section = DATE,
+			marsdoc      = date/all,
+			mars_interface         = text,
+			java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD [ java_control = CHOICE_TEXT_2,
+			java_section = DATE,
+			marsdoc      = date/all,
+			mars_interface         = text,
+			java_hidden = FALSE ]
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+	LEADTIME [ java_control = CHOICE_TEXT_2,
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+		ALL
+	} = OFF
+
+	OPTTIME [ java_control = CHOICE_TEXT_2,
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+		ALL
+	} = OFF
+
+	RANGE [ java_control = CHOICE_TEXT_2, 
+			java_section = DATE, 
+			marsdoc      = date/obs,
+			mars_interface         = text,
+			java_hidden = FALSE ]
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+    STEP [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+!		* [DAY]
+!		* [MONTH]
+!		* [WEEK]
+!		* [VERIFY]
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    }
+    
+    REFERENCE [ java_control = CHOICE_TEXT_2, 
+				java_section = DATE, 
+				marsdoc      = date/field,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } = OFF 
+
+    ENSEMBLE [ 	java_control = CHOICE_TEXT_2, 
+				visible      = false, 
+			check        = false,
+				java_section = OTHER, 
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+    {
+        ALL
+		TO  
+        *   
+        /   
+        OFF ;  OFF
+    } = OFF
+    
+    CLUSTER [ 	java_control = CHOICE_TEXT_2, 
+				visible = false, 
+			check        = false,
+				java_section = OTHER, 
+				java_hidden = FALSE ]
+    {
+        ALL
+		TO  
+        *   
+        /   
+        OFF ;  OFF
+    } = OFF
+    
+    
+    PROBABILITY [ 	java_control = CHOICE_TEXT_2, 
+					visible = false, 
+			check        = false,
+					java_section = OTHER, 
+					java_hidden = FALSE ]
+    {
+        ALL 
+		TO  
+        OFF ; OFF
+        *   
+        /
+    } = OFF
+
+    NUMBER [ java_control = CHOICE_TEXT_2, 
+			 java_section = OTHER, 
+			 marsdoc      = field/ensemble,
+			 mars_interface         = text,
+			 java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE [ java_control = CHOICE_TEXT_2,
+				 java_section = OTHER,
+				 marsdoc      = field/ensemble,
+				 mars_interface         = text,
+			     java_hidden = FALSE ]
+
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DOMAIN  [ 	help = help_multiple_selection, # For Metview
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden = FALSE ] 
+    {
+	&_DUMMY&DOMAIN
+    } = GLOBE
+
+    FREQUENCY [ java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = field/wave,
+				mars_interface         = text,
+				java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION [ priority = 0, 
+				marsdoc  = field/wave,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				mars_interface         = text,
+				java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIAGNOSTIC  [ 	priority = 1, 
+				  	marsdoc  = field/sensitivity,
+					mars_interface         = text,
+				  	java_control = CHOICE_TEXT_2, 
+				  	java_section = OTHER, 
+				  	java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION  [ 	java_control = CHOICE_TEXT_2, 
+				 	java_section = OTHER, 
+				 	marsdoc      = field/sensitivity,
+					mars_interface         = text,
+				 	java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    CHANNEL [ 	priority = 0, 
+			  	java_control = CHOICE_TEXT_2, 
+			  	java_section = OTHER, 
+			  	marsdoc     = field/brigthness,
+				mars_interface         = text,
+			  	java_hidden = FALSE ]
+	{ 
+		ALL
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    IDENT
+			# For Metview
+				   [ help = help_script,                  
+				   help_script_command = 
+					'/usr/local/lib/metaps/bin/mcs_sat_availability.sh',
+			check        = false,
+					java_control = CHOICE_TEXT_2, 
+					java_section = DATA, 
+					marsdoc      = image/obs,
+					mars_interface         = list,
+					java_hidden = FALSE 
+				 ]
+											   
+    {
+		ALL 
+		&_DUMMY&IDENT
+		"
+		@
+    }=OFF
+    
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/supplementary,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    SOURCE  [   java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+				mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET [ java_control = TEXT, 
+			 java_section = TARGET, 
+			 marsdoc      = target,
+			 mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+			 java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    LOGSTATS [ java_control = TEXT,
+             java_section = TARGET,
+             marsdoc      = target,
+             mars_interface         = text,
+                hidden      = TRUE,
+            check        = false,
+             java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    }
+
+    TRANSFER [ hidden      = TRUE, check        = false ]
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET  [ java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+			 	mars_interface         = text,
+				priority     = 1,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, 
+			   java_section = TARGET, 
+			   hidden      = TRUE,
+			check        = false,
+			   java_hidden = TRUE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, 
+	          java_section = DATA, 
+				hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP [ java_control = CHOICE,
+			java_section = DATA,
+			hidden      = TRUE,
+			check        = false,
+			java_hidden = FALSE ]
+
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL [ help = help_multiple_selection,  # For Metview
+			check        = false,
+			java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = menu,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 160 ;   N160
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   	java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION [ java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/obs,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF
+    } = G
+
+	LOCATION [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+    INSTRUMENT  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+		&_DUMMY&INSTRUMENT
+    }=OFF
+
+    FILTER  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+				priority     = 0,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+		@
+		OFF
+    }=OFF
+
+	ROTATION [ java_control = CHOICE_TEXT_2,
+			   java_section = DATA,
+			   marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN [  help = help_multiple_selection,  # For Metview
+				java_control = CHOICE_TEXT_2, 
+				java_section = DATA, 
+				marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+				java_hidden = FALSE ]
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION [ marsdoc      = pproc/field,
+			check        = false,
+					mars_interface         = text ]
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING [ help = help_multiple_selection,  # For Metview
+			  java_control = CHOICE_TEXT_2,
+			  java_section = DATA,
+			  marsdoc      = pproc/field,
+			  hidden       = true,
+			check        = false,
+			  mars_interface         = text,
+			  java_hidden = FALSE ]
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		OFF
+	} = OFF
+
+
+    PADDING  [ 	help = help_multiple_selection,  # For Metview
+			check        = false,
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+				mars_interface    = text,
+				java_hidden = FALSE ]
+    {
+		&_DUMMY&PADDING
+		OFF
+    } = OFF
+    
+
+    DUPLICATES  [ 	java_control = CHOICE, 
+				  	java_section = OTHER, 
+				  	marsdoc      = obs,
+					mars_interface    = on_off,
+			check        = false,
+				  	java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, 
+			  java_section = OTHER, 
+			  hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  [ 	java_control=CHOICE, 
+	       	java_section=OTHER, 
+		   	marsdoc     = control,
+			mars_interface         = menu,
+			hidden     = TRUE,
+			check        = false,
+		   	java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+    {
+		LOCAL 
+		SERVER
+        OFF ;   OFF
+    } = OFF
+
+	BRANCH [ java_control = CHOICE, 
+			 java_section = OTHER, 
+			 hidden       = TRUE,
+			 check        = false,
+			 java_hidden = FALSE ]
+	{ &_DUMMY&BRANCH } = OFF
+
+	DATABASE  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				priority = 1,
+				java_hidden = TRUE ]
+	{
+		@
+		/
+		OFF
+	}
+
+	EXPECT [    priority = 0,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+	} = 2.0
+    
+} ! END OF RETRIEVE
+
+COMPUTE ; X ; METVIEW
+{
+    FORMULA {
+		@
+    } = ""
+
+    FIELDSET {
+        @
+    } = OUT
+
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+}
+
+WRITE ; X; METVIEW
+{
+    FIELDSET {
+    @
+    } = OUT
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+    TARGET  {
+		@
+        "
+    } = ""
+}
+
+READ ; X; METVIEW
+{
+    FIELDSET [ visible = false ] {
+    @
+    } = OUT
+
+	READ_DATA_FROM [ visible = false ]
+	{
+		FILE
+		METVIEW_ICON
+	} = FILE
+
+
+    SOURCE  [ visible = always, help = help_file_box ]
+	{
+		@
+		OFF
+    } = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATA
+		[
+			interface = icon,
+			class           = GRIB,
+			exclusive       = true
+		]
+	{
+		@
+	}
+
+
+	CFSPATH {
+		@
+		OFF
+	} = OFF
+
+    ORDER [ label = 'Field Ordering' ] {
+	AS IS  ; 0
+        SORTED ; 1
+    } = AS IS
+
+	CLASS  { &_DUMMY&CLASS 
+			 ANY ; ANY
+			 } = ANY
+
+	STREAM [ help = help_multiple_selection, exclusive = True ]
+		{ &_DUMMY&STREAM 
+			 ANY ; ANY
+			 *
+			 } = ANY
+
+    TYPE   [ help = help_multiple_selection, exclusive = True ]
+		{ 
+		ANY ; ANY
+		&_DUMMY&TYPE   
+		*
+	} = ANY
+    
+    MODEL   { 
+		ANY ; ANY
+		&_DUMMY&MODEL   
+	} = ANY
+    
+    LEVTYPE
+    {
+		ANY ; ANY
+		&_DUMMY&LEVTYPE
+    } = ANY
+    
+    LEVELIST
+    {
+        ANY ; ANY
+		TO  ; TO
+		BY  ; BY 
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = ANY
+    
+    PARAM [ help = help_multiple_selection ] # For Metview
+    {
+        ANY             ;   ANY
+        &_DUMMY&PARAM
+    } = ANY
+    
+    DATE
+    {
+		ANY             ;   ANY
+		&_DUMMY&DATE   
+    } = ANY
+    
+    VERIFY 
+	{
+		ANY             ;   ANY
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		ANY             ;   ANY
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		ANY             ;   ANY
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    FCMONTH 
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME
+    {
+		ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+    } = ANY
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+		ANY
+	} = ANY
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+		ANY
+	} = ANY
+
+    REFERENCE 
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY 
+
+    STEP
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY
+    
+    ANOFFSET
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = ANY
+    
+	RANGE 
+	{
+		*
+		ANY
+	} = ANY
+    
+    ACCURACY 
+    {
+		ANY     ;   ANY
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+		ANY
+    } = ANY
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+		ANY
+    } = ANY
+
+    AREA
+    {
+		ANY ; ANY
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        *   
+        /   
+    } = ANY
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+	RESOL 
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		319
+		213
+		106
+        *   
+		ANY ; ANY
+	} = ANY
+
+	ROTATION
+	{
+		ANY     ; ANY
+		*
+		/
+	} = ANY
+
+    GRID
+    {
+        ANY     ; ANY
+        *   
+        /   
+    } = ANY
+
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+	TARGET [ visible = false ]
+	{
+		@
+		"
+		OFF
+	} = OFF
+
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+
+    FREQUENCY
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+		ANY
+    } = ANY
+    
+    DIRECTION 
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+		ANY
+    } = ANY
+    
+    DIAGNOSTIC
+    {
+        ALL 
+        OFF ;   OFF
+        *   
+        /
+		ANY
+    } = ANY
+
+    ITERATION
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+		ANY
+    } = ANY
+    
+    CHANNEL { &_DUMMY&CHANNEL 
+			 ANY ; ANY
+			 } = ANY
+
+    IDENT { &_DUMMY&IDENT 
+			 ANY ; ANY
+			 } = ANY
+
+    INSTRUMENT { &_DUMMY&INSTRUMENT 
+			 ANY ; ANY
+			 } = ANY
+
+    FILTER  
+    {
+		@
+		ANY ; ANY
+    }= ANY
+
+! For compatibility with RETRIEVE. They are unset in Mars rules
+
+	REPRES { &_DUMMY&REPRES
+			 ANY ; ANY
+			 } = ANY 
+
+    ORIGIN 	{ &_DUMMY&ORIGIN
+			 ANY ; ANY
+			 } = ANY 
+
+    PADDING  
+    {
+		ANY  ; ANY
+		&_DUMMY&PADDING
+    } = ANY
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+	ANY
+    } = ANY
+    
+	SYSTEM { &_DUMMY&SYSTEM 
+			  ANY } = ANY
+	METHOD { &_DUMMY&METHOD 
+			  ANY } = ANY
+	PRODUCT { &_DUMMY&PRODUCT 
+			  ANY } = ANY
+	SECTION { &_DUMMY&SECTION 
+			  ANY } = ANY
+	LATITUDE { 
+		@ 
+		ANY
+	} = ANY
+
+	LONGITUDE { 
+		@ 
+		ANY
+	} = ANY
+
+    EXPVER{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+		ANY ; ANY
+    } = ANY
+    
+}
+
+DATA ; X ; METVIEW
+{
+    FIELDSET [ visible = false ] {
+		@
+	}
+
+	PATH {
+		@
+	}
+
+	OFFSET {
+		*
+		/
+	}
+
+	LENGTH {
+		*
+		/
+	}
+
+	INDEX {
+		*
+		/
+	}
+
+}
+
+FLUSH ;   Flushes data   ;   MARS
+{
+
+    CLASS  { &_DUMMY&CLASS  }
+
+    TYPE   { &_DUMMY&TYPE   }
+
+    STREAM { &_DUMMY&STREAM }
+
+    MODEL  { &_DUMMY&MODEL }
+
+    ORIGIN { &_DUMMY&ORIGIN }
+
+	SYSTEM  { &_DUMMY&SYSTEM  }
+
+	METHOD  { &_DUMMY&METHOD  }
+
+	PRODUCT { &_DUMMY&PRODUCT }
+
+	SECTION { &_DUMMY&SECTION }
+
+	LATITUDE { @ }
+
+	LONGITUDE { @ }
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    }
+    
+    LEVTYPE  { &_DUMMY&LEVTYPE }
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    }
+    
+    REPRES   { &_DUMMY&REPRES }
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    }
+    
+    OBSTYPE { ALL &_DUMMY&OBSTYPE }
+    
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } 
+    
+    PARAM { &_DUMMY&PARAM }
+    
+	CHANNEL { &_DUMMY&CHANNEL }
+
+	IDENT { &_DUMMY&IDENT }
+
+	INSTRUMENT { &_DUMMY&INSTRUMENT }
+
+	FILTER { @ }
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    }
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } 
+
+    FCMONTH 
+	{
+        *   
+		ALL
+	}
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} 
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    }
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} 
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} 
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} 
+
+    REFERENCE 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        
+		OFF
+    }
+
+    STEP
+    {
+        *   
+    }
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    }
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    }
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    }
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+    
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    } 
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  
+        *   
+        /
+    }
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    }
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } 
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    }
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    }
+    
+    PASSWORD
+    {
+        "   
+    } 
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	} 
+
+! Only for FLUSH
+
+	WAIT
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+	DECACHE
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+} ! END OF FLUSH
+
+
+ATTACH ;   attaches data   ;   MARS
+{
+
+    CLASS  { &_DUMMY&CLASS  } = OD
+
+    TYPE   { &_DUMMY&TYPE   } = AN
+
+    STREAM { &_DUMMY&STREAM } = DA
+
+    MODEL  { &_DUMMY&MODEL }  = OFF
+
+    ORIGIN { &_DUMMY&ORIGIN } = OFF
+
+    EXPVER  
+    {
+		@
+        "       
+        *       
+    } = 1
+    
+    LEVTYPE  { &_DUMMY&LEVTYPE } = PL
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/400/300
+    
+    REPRES   { &_DUMMY&REPRES } = SH
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+    
+    OBSTYPE { ALL
+	&_DUMMY&OBSTYPE } = S
+    
+    PARAM { &_DUMMY&PARAM } = Z
+    
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    } = CURRENT DATE
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    STEP
+    {
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+    
+	NAME
+	{
+		"
+	} = ""
+
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } = NEW
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    } = G
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+    
+    LAUNCH
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE
+    {
+        FREQUENT    ;   F
+        INFREQUENT  ;   I
+        NORMAL      ;   N
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = N
+    
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	}
+
+	WAIT {
+		YES
+		NO
+	} = NO
+
+} ! END OF ATTACH
+
+
+STORE ;   Stores files   ;   MARS
+{
+
+    CLASS  { &_DUMMY&CLASS  } = OD
+
+    TYPE   { &_DUMMY&TYPE   } = AN
+
+    STREAM { &_DUMMY&STREAM } = DA
+
+    MODEL  { &_DUMMY&MODEL  } = OFF
+
+    ORIGIN { &_DUMMY&ORIGIN } = OFF
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    } = 1
+    
+    LEVTYPE { &_DUMMY&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/400/300
+    
+    REPRES { &_DUMMY&REPRES } = SH
+    
+    DOMAIN 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+    
+    OBSTYPE { ALL
+	&_DUMMY&OBSTYPE } = S
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP } = CONVENTIONAL	
+    
+    PARAM { &_DUMMY&PARAM } = Z
+    
+    DATE 
+	{
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    STEP
+    {
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    CLUSTER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+        *   
+        /
+    } = OFF
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } = NEW
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    } = G
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+    
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	NAME
+	{
+		@
+	} = ""
+
+} ! END OF STORE
+
+REGISTER    ;   Registering of keywords   ;   MARS
+{
+    
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE  	[	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ] 
+	{ 
+		&_DUMMY&TYPE   
+	} = AN
+
+
+    STREAM 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&STREAM 
+	} = DA
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				java_hidden  = FALSE ]
+	{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+    } = 1
+
+    LEVTYPE [ java_control = CHOICE, java_section = ID, java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+
+	NAME
+	{
+		@
+	} = ""
+
+	ATTRIBUTES
+	{
+		DATE
+		TIME
+		OBSTYPE
+		/
+	} = DATE
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	}
+
+} ! END OF REGISTER
+
+
+FETCH    ;   Fetch data   ;   MARS
+{
+    
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&CLASS  
+	} = OD
+    
+
+    TYPE  	[	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ] 
+	{ 
+		&_DUMMY&TYPE   
+	} = AN
+
+
+    STREAM 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{ 
+		&_DUMMY&STREAM 
+	} = DA
+    
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				java_hidden  = FALSE ]
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				java_hidden  = FALSE ]
+	{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+    } = 1
+    
+
+    LEVTYPE [ java_control = CHOICE, java_section = ID, java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, java_section = ID, java_hidden = FALSE ]
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES [ java_control = CHOICE, java_section = ID, java_hidden = FALSE ] 
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+    DOMAIN  [ help = help_multiple_selection, # For Metview
+				java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ] 
+    {
+	&_DUMMY&DOMAIN
+    } = G
+
+    OBSTYPE [ help = help_multiple_selection, # For Metview
+			java_control = LIST_2, java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = S
+
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+    } = Z
+    
+    DATE [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+		&_DUMMY&DATE
+    } = CURRENT DATE
+    
+    REFDATE [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+    HDATE [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		&_DUMMY&DATE
+		ALL
+    } = OFF
+
+    TIME [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+!		00
+!		03
+!		06
+!		09
+!		12
+!		15
+!		18
+!		21
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+	LEADTIME [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+    STEP [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, java_section = DATE, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    ENSEMBLE [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    CLUSTER [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } = OFF
+    
+    
+    PROBABILITY [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    NUMBER [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DIAGNOSTIC  [ priority = 1, java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION  [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    FREQUENCY [ java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION [ priority = 0, java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE ]
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    TARGET [ java_control = TEXT, java_section = TARGET, java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    FIELDSET  [ java_control = CHOICE, java_section = TARGET, java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, java_section = TARGET, java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, java_section = DATA, java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    RESOL [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+        OFF     ;   OFF
+        *   
+        /
+    } = AV
+    
+    ACCURACY [ java_control = CHOICE_TEXT_1, java_section = DATA, java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    IDENT
+			# For Metview
+				   [ help = help_script,                  
+				   help_script_command = 
+					'/usr/local/lib/metaps/bin/mcs_sat_availability.sh',
+					java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE 
+				 ]
+											   
+    {
+		ALL 
+        METEOSAT 3 ; MS3 ; 50
+        METEOSAT 4 ; MS4 ; 51
+        METEOSAT 5 ; MS5 ; 52
+        METEOSAT 6 ; MS6 ; 53
+        METEOSAT 7 ; MS7 ; 54
+		DMSP 10 ; 204
+		DMSP 13 ; 246
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+    
+	ROTATION [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, java_section = DATA, java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+    DUPLICATES  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, java_section = OTHER, java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  [ java_control=CHOICE, java_section=OTHER, java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, java_section = OTHER, java_hidden = FALSE ]
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+    {
+		LOCAL ; LOCAL
+		SERVER
+        OFF ;   OFF
+    } = LOCAL
+
+
+	DATABASE  [ java_control = CHOICE, java_section = OTHER, java_hidden = FALSE ]
+	{
+		@
+		OFF
+	}
+
+	EXPECT [ priority = 0,
+				java_control = CHOICE_TEXT_2, java_section = OTHER, java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION {
+		*
+	} = 1.3
+
+	NAME {
+		@
+	}
+    
+} ! END OF FETCH
+
+!------------------------------------------------------------------------
+
+BROWSE    ;   LIST FDF ENTRIES AND CFS FILES  ;   MARS
+{
+    
+    CLASS  
+	{ 
+		&_DUMMY&CLASS  
+		/ 
+		ALL
+	} 
+    
+    TYPE   
+	{ 
+		&_DUMMY&TYPE  
+		/  
+		ALL
+	} 
+
+    STREAM 
+	{ 
+		&_DUMMY&STREAM 
+		/ 
+		ALL
+	} 
+    
+	ORIGIN 
+	{
+		&_DUMMY&ORIGIN
+		/
+		ALL
+	}
+
+    EXPVER{
+		@
+		/
+		ALL
+    } 
+    
+    LEVTYPE 
+	{ 
+		&_DUMMY&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&_DUMMY&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&_DUMMY&DOMAIN
+		/
+		ALL
+    } 
+
+    OBSTYPE 
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+		/
+    } 
+
+	OBSGROUP { ALL
+	&_DUMMY&OBSGROUP }
+    
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &_DUMMY&PARAM
+		/
+    }
+    
+    CHANNEL 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&CHANNEL 
+	} 
+
+    IDENT 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&IDENT 
+	} 
+
+    INSTRUMENT 
+	{ 	
+		ALL             ; ALL
+		&_DUMMY&INSTRUMENT 
+	} 
+
+    DATE
+    {
+		&_DUMMY&DATE
+		ALL
+    } 
+
+    REFDATE 
+	{
+		&_DUMMY&DATE
+		ALL
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    REFERENCE 
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    ENSEMBLE
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    CLUSTER
+    {
+        ALL
+		TO  ; TO
+        *   
+        /   
+        OFF ; OFF;  OFF
+    } 
+    
+    
+    PROBABILITY
+    {
+        ALL ;   ALL
+		TO  ; TO
+        OFF ;   OFF
+        *   
+        /
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    }
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+
+    DIAGNOSTIC
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /
+    } 
+
+    ITERATION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+
+    FREQUENCY
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO
+        *   
+        /
+    }
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE {
+		@
+		/
+		OFF
+	}
+
+	RANGE 
+	{
+		*
+		OFF; OFF
+	}
+
+
+    SOURCE
+    {
+		@
+        "   
+    } 
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    CFSPATH  
+    {
+        "   
+    }
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } 
+    
+    RESOL 
+    {
+		OFF                  ;   OFF
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    IDENT
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+    
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+		SERVER
+        OFF ;   OFF
+    } = OFF
+
+
+	EXPECT 
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+
+} ! END OF BROWSE
+
+
+GET    ;   GET ;   MARS
+{
+	TAPE
+	{
+		@
+	}
+
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE {
+		@
+		OFF
+	}
+
+} ! END OF GET
+
+
+REGRIB    ;   Regrib of data   ;   MARS
+{
+    
+    CLASS 	
+	{ 
+		&_DUMMY&CLASS  
+		OFF
+	} = OFF
+    
+
+    TYPE
+	{ 
+		&_DUMMY&TYPE   
+		OFF
+	} = OFF
+
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+		OFF
+	} = OFF
+    
+
+    MODEL
+	{
+		&_DUMMY&MODEL
+		OFF
+	} = OFF
+
+    EXPVER
+	{
+		@
+        "   
+		OFF
+    } = OFF
+    
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+		OFF
+	} = OFF
+    
+    LEVELIST 
+    {
+        OFF
+        *   
+    } = OFF
+    
+    PARAM 
+    {
+        &_DUMMY&PARAM
+		OFF
+    } = OFF
+    
+    DATE
+    {
+		&_DUMMY&DATE
+		OFF
+    } = OFF
+    
+    REFDATE 
+	{
+		&_DUMMY&DATE
+    } = OFF
+
+	HDATE 
+	{ 
+		&_DUMMY&DATE 
+		ALL
+	} = OFF
+
+    TIME
+    {
+        *   
+		OFF
+    } = OFF
+
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+    STEP
+    {
+        *   
+		OFF
+    } = OFF
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    } = OFF
+    
+    REFERENCE
+    {
+        *   
+		OFF
+    } = OFF 
+
+    NUMBER
+    {
+        *   
+        OFF
+    } = OFF
+    
+    QUANTILE
+    {
+        *   
+        OFF
+    } = OFF
+
+    DOMAIN
+    {
+	&_DUMMY&DOMAIN
+	OFF
+    } = OFF
+
+    FREQUENCY
+    {
+        *   
+        OFF
+    } = OFF
+    
+    DIRECTION
+    {
+        OFF
+        *   
+    } = OFF
+    
+    DIAGNOSTIC
+    {
+        OFF
+        *   
+    } = OFF
+
+    ITERATION
+    {
+        OFF
+        *   
+    } = OFF
+    
+    CHANNEL
+	{ 
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    IDENT
+	{ 
+		&_DUMMY&IDENT 
+	} = OFF
+
+    INSTRUMENT
+	{ 
+		&_DUMMY&INSTRUMENT 
+	} = OFF
+
+    ORIGIN
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+    MODEL
+	{
+		OFF
+		ECMF
+		EDZW
+		EGRR
+		LFPW
+		KWBC
+		NONE
+	} = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    OBSTYPE { @
+				OFF } = OFF
+
+    IDENT { @
+        METEOSAT 3 ; MS3  ; 50
+        METEOSAT 4 ; MS4  ; 51
+        METEOSAT 5 ; MS5  ; 52
+        METEOSAT 6 ; MS6  ; 53
+        METEOSAT 7 ; MS7  ; 54
+        GOES 8     ; GOES ; 252
+		DMSP 10 ; 204
+		DMSP 13 ; 246
+		OFF } = OFF
+    
+
+	KSEC1 
+	{
+		OFF
+		*
+		@
+		/
+	} = OFF
+
+	LOCALDEF
+	{
+		OFF
+		*
+		@
+	} = OFF
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }= ""
+
+} ! END OF REGRIB
+
+!-----------------------------------------------------------------
+
+ERASE    ;   Erase data   ;   MARS
+{
+    
+	DATASET
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&_DUMMY&CLASS  
+	} = TE
+    
+
+    TYPE
+	{ 
+		&_DUMMY&TYPE   
+		*
+	} = AN
+
+
+    STREAM
+	{ 
+		&_DUMMY&STREAM 
+		*
+	} = MA
+    
+
+    EXPVER
+	{
+		@
+		1
+        "   
+        *   
+        /
+    } = 9999
+    
+
+    MODEL
+	{
+		&_DUMMY&MODEL
+	} = OFF
+
+    REPRES
+	{ 
+		&_DUMMY&REPRES 
+	} = SH
+    
+	OBSGROUP
+	{ 
+		&_DUMMY&OBSGROUP 
+		OFF    ; OFF
+	} = OFF
+    
+	RDBPREFIX
+	{ 
+		@
+		"
+		OFF    ; OFF
+	} = OFF
+    
+    OBSTYPE
+    {
+        ALL                     ;   ALL
+        NON SATELLITE DATA ALL  ;   NSD 
+        SATELLITE DATA ALL      ;   SD
+        &_DUMMY & OBSTYPE
+    } = 0
+
+    LEVTYPE
+	{ 
+		&_DUMMY&LEVTYPE 
+	} = DP
+    
+    LEVELIST
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 9999
+    
+    PARAM 
+    {
+        ALL             
+        &_DUMMY&PARAM
+    } = 255
+    
+	YEAR 
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	DECADE
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE 
+    {
+		&_DUMMY&DATE
+    } = 19000101
+    
+    VERIFY
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+    
+    REFDATE
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+
+    HDATE
+	{
+		&_DUMMY&DATE
+		OFF          ; OFF
+    } = OFF
+
+    FCMONTH
+	{
+		*
+		/
+		TO
+		BY  ! 1
+		OFF
+    } = OFF
+    
+    FCPERIOD
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } = OFF
+    
+    TIME
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+	LEADTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	OPTTIME
+	{
+		*
+		/
+		TO
+		OFF
+	} = OFF
+
+	RANGE
+	{
+		*
+		OFF; OFF
+	} = OFF
+    
+    STEP
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    }
+    
+    REFERENCE
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } = OFF 
+
+    NUMBER
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+    QUANTILE
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+
+    DOMAIN
+    {
+	&_DUMMY&DOMAIN
+    } = GLOBE
+
+    FREQUENCY
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIRECTION
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    DIAGNOSTIC
+    {
+        ALL 
+        OFF ;   OFF
+        *   
+        /
+    } = OFF
+
+    ITERATION
+    {
+        ALL 
+        OFF ;   OFF
+		TO
+        *   
+        /
+    } = OFF
+    
+    CHANNEL
+	{ 
+		ALL
+		&_DUMMY&CHANNEL 
+	} = OFF
+
+    IDENT
+    {
+		ALL 
+		&_DUMMY&IDENT
+		"
+		@
+    }=OFF
+    
+    ORIGIN
+	{
+		&_DUMMY&ORIGIN
+	} = OFF
+
+	SYSTEM { &_DUMMY&SYSTEM 
+			  OFF } = OFF
+	METHOD { &_DUMMY&METHOD 
+			  OFF } = OFF
+	PRODUCT { &_DUMMY&PRODUCT 
+			  OFF } = OFF
+	SECTION { &_DUMMY&SECTION 
+			  OFF } = OFF
+	LATITUDE { @ 
+			   OFF } = OFF
+	LONGITUDE { @ 
+				OFF } = OFF
+
+    SOURCE
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+    TRANSFER
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    FORMAT
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	LOCATION
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+    INSTRUMENT
+    {
+		&_DUMMY&INSTRUMENT
+    }=OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		OFF
+	} = OFF
+
+
+    PADDING
+    {
+		&_DUMMY&PADDING
+		OFF
+    } = OFF
+    
+
+    DUPLICATES
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH
+    {
+        "   
+    } = ""
+    
+	JOB
+	{
+		"
+		OFF
+	} = OFF
+
+    USE
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		COMPARE
+		MONTHLY RUN
+    } = NORMAL
+    
+    PASSWORD
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS
+    {
+		LOCAL 
+		SERVER
+        OFF ;   OFF
+    } = LOCAL
+
+	BRANCH
+	{ &_DUMMY&BRANCH } = OFF
+
+	DATABASE
+	{
+		@
+		/
+		OFF
+	} = marsdev
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION
+	{
+		*
+	} = 2.0
+    
+} ! END OF ERASE
diff --git a/share/metview/etc/ifsdata/Makefile.am b/share/metview/etc/ifsdata/Makefile.am
new file mode 100644
index 0000000..ca11578
--- /dev/null
+++ b/share/metview/etc/ifsdata/Makefile.am
@@ -0,0 +1,60 @@
+sharedir		= $(datadir)/metview/etc/ifsdata
+
+share_data_to_dist = 
+
+if METVIEW_SCM_AUX
+share_data_not_to_dist = \
+	vtable_L19 \
+	vtable_L31 \
+	vtable_L40 \
+	vtable_L43 \
+	vtable_L50 \
+	vtable_L60 \
+	vtable_L61 \
+	vtable_L62 \
+	vtable_L72 \
+ 	vtable_L80 \
+	vtable_L89 \
+	vtable_L90 \
+	vtable_L91 \
+	vtable_L137 \
+	C11CLIM \
+	C12CLIM \
+	C22CLIM \
+	CCL4CLIM \
+	CH4CLIM \
+	CO2CLIM \
+	ECOZC \
+	GCH4CLIM \
+	GCO2CLIM \
+	GOZOCLIM \
+	MCICA \
+	N2OCLIM \
+	NO2CLIM \
+	OZOCLIM \
+	RADRRTM \
+	RADSRTM \
+	SO4_A1B2000 \
+	SO4_A1B2010 \
+	SO4_A1B2020 \
+	SO4_A1B2030 \
+	SO4_A1B2040 \
+	SO4_A1B2050 \
+	SO4_A1B2060 \
+	SO4_A1B2070 \
+	SO4_A1B2080 \
+	SO4_A1B2090 \
+	SO4_A1B2100 \
+	SO4_OBS1920 \
+	SO4_OBS1930 \
+	SO4_OBS1940 \
+	SO4_OBS1950 \
+	SO4_OBS1960 \
+	SO4_OBS1970 \
+	SO4_OBS1980 \
+	SO4_OBS1990
+endif
+
+share_DATA = $(share_data_to_dist) $(share_data_not_to_dist)
+
+#EXTRA_DIST = $(share_data_to_dist)
diff --git a/share/metview/etc/ifsdata/Makefile.in b/share/metview/etc/ifsdata/Makefile.in
new file mode 100644
index 0000000..76982b1
--- /dev/null
+++ b/share/metview/etc/ifsdata/Makefile.in
@@ -0,0 +1,549 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = share/metview/etc/ifsdata
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sharedir = $(datadir)/metview/etc/ifsdata
+share_data_to_dist = 
+ at METVIEW_SCM_AUX_TRUE@share_data_not_to_dist = \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L19 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L31 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L40 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L43 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L50 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L60 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L61 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L62 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L72 \
+ at METVIEW_SCM_AUX_TRUE@ 	vtable_L80 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L89 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L90 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L91 \
+ at METVIEW_SCM_AUX_TRUE@	vtable_L137 \
+ at METVIEW_SCM_AUX_TRUE@	C11CLIM \
+ at METVIEW_SCM_AUX_TRUE@	C12CLIM \
+ at METVIEW_SCM_AUX_TRUE@	C22CLIM \
+ at METVIEW_SCM_AUX_TRUE@	CCL4CLIM \
+ at METVIEW_SCM_AUX_TRUE@	CH4CLIM \
+ at METVIEW_SCM_AUX_TRUE@	CO2CLIM \
+ at METVIEW_SCM_AUX_TRUE@	ECOZC \
+ at METVIEW_SCM_AUX_TRUE@	GCH4CLIM \
+ at METVIEW_SCM_AUX_TRUE@	GCO2CLIM \
+ at METVIEW_SCM_AUX_TRUE@	GOZOCLIM \
+ at METVIEW_SCM_AUX_TRUE@	MCICA \
+ at METVIEW_SCM_AUX_TRUE@	N2OCLIM \
+ at METVIEW_SCM_AUX_TRUE@	NO2CLIM \
+ at METVIEW_SCM_AUX_TRUE@	OZOCLIM \
+ at METVIEW_SCM_AUX_TRUE@	RADRRTM \
+ at METVIEW_SCM_AUX_TRUE@	RADSRTM \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2000 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2010 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2020 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2030 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2040 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2050 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2060 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2070 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2080 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2090 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_A1B2100 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1920 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1930 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1940 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1950 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1960 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1970 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1980 \
+ at METVIEW_SCM_AUX_TRUE@	SO4_OBS1990
+
+share_DATA = $(share_data_to_dist) $(share_data_not_to_dist)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu share/metview/etc/ifsdata/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu share/metview/etc/ifsdata/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-shareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-shareDATA \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am uninstall-shareDATA
+
+
+#EXTRA_DIST = $(share_data_to_dist)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/share/metview/etc/italy.def b/share/metview/etc/italy.def
new file mode 100755
index 0000000..4f919ee
--- /dev/null
+++ b/share/metview/etc/italy.def
@@ -0,0 +1,664 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+#
+# PARAM {
+#    value1 ;  alias1 ; alias; alias ....
+#    /  if list ok
+#    @ any
+#    " quotted string
+#    * number 
+#    BY
+#    TO
+# } = default
+#
+#
+
+GRIB;  Local grib definition; ITALY
+{
+
+	COUNTRY {
+		IT
+	} 
+
+	MODEL {
+	   LM
+	   HRM
+	   WAM
+	} 
+
+	DOMAIN {
+	   ITALY
+	   EUROATL
+	   EUROPE
+	   MEDITERRANEAN
+	}
+
+	BCMODEL {
+		GME
+		IFS
+	}
+
+	ICMODEL {
+		GME
+		IFS
+		MVOI
+		NUDGING
+		3DVAR
+	}
+
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/	
+		ALL
+	} 
+
+} ! END OF GRIB
+
+
+
+ARCHIVE ;   Archives data   ;   ITALY
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		IT
+	} = IT
+
+	MODEL {
+	   LM
+	   HRM
+	   WAM
+	} = LM
+
+	BCMODEL {
+		GME
+		IFS
+	} = IFS
+
+	ICMODEL {
+		GME
+		IFS
+		MVOI
+		NUDGING
+		3DVAR
+	} = IFS
+
+	DOMAIN {
+	   ITALY
+	   EUROATL
+	   EUROPE
+	   MEDITERRANEAN
+	}
+
+	STREAM {
+		 &_DUMMY&STREAM
+	} = DA
+
+	TYPE {
+	 	&_DUMMY&TYPE
+	} = AN
+
+    EXPVER  
+    {
+        *       
+    } 
+    
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/	
+		ALL
+	} 
+
+    PARAM { 
+		* 
+		/
+		ALL
+	} 
+
+	TIME {
+		*
+		/
+		ALL
+	}
+
+	DATE {
+		*
+		/
+		ALL
+	}
+
+    STEP { 
+		* 
+		/
+		ALL
+	} = 00
+
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } 
+    
+
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	GRIB {
+	@
+	}
+
+	DUPLICATE {
+	@
+	}
+
+} ! END OF ARCHIVE
+
+LIST ;   Lists data   ;   ITALY
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		IT
+	} = IT
+
+	MODEL {
+	   LM
+	   HRM
+	   WAM
+	   ALL
+	} = LM
+
+	BCMODEL {
+		GME
+		IFS
+	   ALL
+	} = IFS
+
+	ICMODEL {
+		GME
+		IFS
+		MVOI
+		NUDGING
+		3DVAR
+	   ALL
+	} = IFS
+
+	DOMAIN {
+	   ITALY
+	   EUROATL
+	   EUROPE
+	   MEDITERRANEAN
+	   ALL
+	}
+
+	STREAM {
+		 &_DUMMY&STREAM
+	   ALL
+	} = DA
+
+	TYPE {
+	 	&_DUMMY&TYPE
+	   ALL
+	} = AN
+
+    EXPVER  
+    {
+		@
+        *       
+    } 
+    
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/	
+		ALL
+	} 
+
+    PARAM { 
+		* 
+		/
+		ALL
+	} 
+
+	TIME {
+		*
+		/
+		ALL
+	}
+
+	DATE {
+		*
+		/
+		ALL
+	}
+
+    STEP { 
+		* 
+		/
+		ALL
+	} 
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } 
+    
+
+    TARGET
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	OUTPUT {
+		TABLE
+		BROWSE
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+	HIDE   { @ / }
+
+	SHOW   { @ / }
+
+} ! END OF LIST
+
+RETRIEVE ;   Retrieves data   ;   ITALY
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		IT
+	} = IT
+
+	MODEL {
+	   LM
+	   HRM
+	   WAM
+	} = LM
+
+	BCMODEL {
+		GME
+		IFS
+	} = IFS
+
+	ICMODEL {
+		GME
+		IFS
+		MVOI
+		NUDGING
+		3DVAR
+	} = IFS
+
+	DOMAIN {
+	   ITALY
+	   EUROATL
+	   EUROPE
+	   MEDITERRANEAN
+	}
+
+	STREAM {
+		 &_DUMMY&STREAM
+	} = DA
+
+	TYPE {
+	 	&_DUMMY&TYPE
+	} = AN
+
+    EXPVER  
+    {
+        *       
+    }  = 1
+    
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/
+		ALL
+	}  = PL
+
+    PARAM { 
+		* 
+		/
+		ALL
+	}  = 11
+
+	TIME {
+		*
+		/
+		ALL
+		TO
+	} = 12
+
+	DATE {
+		*
+		/
+		ALL
+		TO
+	} = 0
+
+    STEP { 
+		TO
+		BY
+		* 
+		/
+		ALL
+	} = 0
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } = 0
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+
+    TARGET
+    {
+		@
+		/
+        "   
+    } = ""
+
+	FIELDSET
+	{
+		@
+		OFF
+	}
+
+	GRIB 
+	{
+		ORIGINAL
+		ECMWF
+	} = ECMWF
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    }
+    
+	DATABASE
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+	GRID {
+		*
+		/
+		OFF
+	} = OFF
+
+	PADDING {
+		*
+		OFF
+	}
+
+	YEAR { @ }
+
+} ! END OF RETRIEVE
+
+
+FLUSH ;   Flushes data   ;   ITALY
+{
+
+    CLASS  { 
+		MS
+	} = MS
+
+	COUNTRY {
+		IT
+	} = IT
+
+	MODEL {
+	   LM
+	   HRM
+	   WAM
+	} = LM
+
+	BCMODEL {
+		GME
+		IFS
+	} = IFS
+
+	ICMODEL {
+		GME
+		IFS
+		MVOI
+		NUDGING
+		3DVAR
+	} = IFS
+
+	DOMAIN {
+	   ITALY
+	   EUROATL
+	   EUROPE
+	   MEDITERRANEAN
+	}
+
+	STREAM {
+		 &_DUMMY&STREAM
+	} = DA
+
+	TYPE {
+	 	&_DUMMY&TYPE
+	} = AN
+
+    EXPVER  
+    {
+        *       
+    } 
+    
+    LEVTYPE { 
+		SFC
+		ML
+		PL
+		* 
+		/	
+		ALL
+	} 
+
+    PARAM { 
+		* 
+		/
+		ALL
+	} 
+
+	TIME {
+		*
+		/
+		ALL
+	}
+
+	DATE {
+		*
+		/
+		ALL
+	}
+
+    STEP { 
+		* 
+		/
+		ALL
+	} 
+
+
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+		ALL
+    } 
+    
+
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		FAIL 
+		REMOVE
+    } = NEW
+    
+	DATABASE
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+
+	PASSWORD {
+		@
+	}
+
+	REPRES {
+		@
+	}
+
+} ! END OF FLUSH
diff --git a/share/metview/etc/licence_for_about_box.txt b/share/metview/etc/licence_for_about_box.txt
new file mode 100644
index 0000000..f885d73
--- /dev/null
+++ b/share/metview/etc/licence_for_about_box.txt
@@ -0,0 +1,4 @@
+Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+of the Apache License version 2.0. In applying this license, ECMWF does not
+waive the privileges and immunities granted to it by virtue of its status as
+an Intergovernmental Organization or submit itself to any jurisdiction.
diff --git a/share/metview/etc/licence_for_macros.txt b/share/metview/etc/licence_for_macros.txt
new file mode 100644
index 0000000..64e1e79
--- /dev/null
+++ b/share/metview/etc/licence_for_macros.txt
@@ -0,0 +1,8 @@
+ **************************** LICENSE START ***********************************
+
+ Copyright [YEAR] ECMWF. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END ************************************
diff --git a/share/metview/etc/macro_built_in_functions.txt b/share/metview/etc/macro_built_in_functions.txt
new file mode 100644
index 0000000..e31bf8c
--- /dev/null
+++ b/share/metview/etc/macro_built_in_functions.txt
@@ -0,0 +1,304 @@
+abs
+accumulate
+acos
+addmonths
+any
+append
+arguments
+ascii
+asin
+atan
+atan2
+attributes
+average
+average_ew
+average_ns
+binning
+bitmap
+bufr_picker
+cartesianview
+checkbox
+cleanfile
+colour
+compute
+convolution
+corr_a
+cos
+coslat
+count
+covar
+covar_a
+cptec_access
+create_geo
+cross_sect
+datacoverage
+datainfo
+date
+dates
+day
+db_info
+definition
+describe
+det
+dictionary
+dimension_names
+dimensions
+direction
+distance
+distribution
+divrot
+divwind
+dow
+drawing_priority
+dumpgrib
+duplicate
+ecfs
+eps_output
+eqpott_m
+eqpott_p
+exist
+exp
+fail
+fetch
+file
+filter
+find
+flexpart_run
+flextra_group_get
+flextra_prepare
+flextra_run
+flextra_tr_get
+flextra_visualiser
+float
+frequencies
+generate
+geo_to_grib
+geo_to_kml
+geosort
+geoview
+getenv
+gfind
+global_attributes
+grib_get
+grib_get_double
+grib_get_double_array
+grib_get_long
+grib_get_long_array
+grib_get_string
+grib_set_double
+grib_set_long
+grib_set_string
+grib_to_geo
+grib_vectors
+gribsetbits
+gridlats
+gridlons
+gridvals
+hhmm
+hhmmss
+hour
+hovmoeller_area
+hovmoeller_expand
+hovmoeller_height
+hovmoeller_line
+icon
+in
+indexes
+input
+input_visualiser
+int
+intbits
+integer
+integrate
+interpolate
+inverse
+juldate
+julday
+kml_output
+latitude
+latitudes
+length
+level
+levels
+list
+log
+log10
+longitude
+longitudes
+lookup
+lowercase
+magml
+mapview
+mask
+matrix
+maverageview
+max
+maxis
+maxvalue
+mcoast
+mcont
+mean
+mean_ew
+menu
+merge
+metadata_keys
+metadata_value
+meteogram
+mgraph
+min
+minute
+minvalue
+mlegend
+month
+msymb
+mtext
+mvertprofview
+mwind
+mxsectview
+name
+nearest_gridpoint
+nearest_gridpoint_info
+netcdf_visualiser
+nice
+nobitmap
+now
+number
+obsfilter
+obstat
+odb_filter
+odb_visualiser
+offset
+opera_radar_filter
+option_menu
+output
+overlay_control
+parse
+paxis
+pcoast
+pcont
+pdf_output
+percentile
+pgraph
+plot_page
+plot_subpage
+png_output
+pobs
+polar_vector
+pott_m
+pott_p
+precision
+pressure
+print
+printdef
+ps_output
+psymb
+ptext
+putenv
+pwind
+random
+read
+read_g2
+read_table
+read_tigge
+reduce
+remove_duplicates
+remove_missing_values
+repeat
+reprojection
+retrieve
+retrieve_g2
+retrieve_odb
+retrieve_tigge
+rmask
+rms
+round
+runmode
+scm_run
+scm_visualiser
+search
+second
+seqpott_m
+seqpott_p
+set_date
+set_dates
+set_gridvals
+set_latitude
+set_latitudes
+set_level
+set_levels
+set_longitude
+set_longitudes
+set_time
+set_times
+set_value
+set_value2
+set_value2s
+set_values
+setcurrent
+sgn
+shell
+sin
+sinlat
+sleep
+slider
+sort
+sort_and_indices
+sort_indices
+sqrt
+stations
+stdev
+stdev_a
+stop
+stopwatch_laptime
+stopwatch_reset
+stopwatch_start
+stopwatch_stop
+store
+streamfn
+subsample
+substring
+sum
+svg_output
+table
+table_visualiser
+tan
+thickness
+tmpfile
+tmpname
+toggle
+togrib
+tolist
+trace
+transpose
+type
+ui_float
+ui_integer
+unipressure
+unique
+unithickness
+univertint
+uppercase
+uvwind
+value
+value2
+value2s
+values
+var
+var_a
+variables
+vector
+velpot
+version_info
+vert_prof
+vertint
+vis5d
+waitmode
+wcsclient
+webaccess
+wmsclient
+write
+xs_average
+xy_vector
+year
+yymmdd
+yyyymmdd
diff --git a/share/metview/etc/macro_deprecated_functions.txt b/share/metview/etc/macro_deprecated_functions.txt
new file mode 100644
index 0000000..b9a9063
--- /dev/null
+++ b/share/metview/etc/macro_deprecated_functions.txt
@@ -0,0 +1,49 @@
+device
+output
+plotwindow
+inputwindow
+carousel
+page
+superpage
+subpage
+xsect
+vprof
+average
+bufrtephi
+gribtephi
+pre1995gribtephi
+tephi
+ecfile
+retrieve_g2
+read_g2
+geo_tools
+metgram
+eps_metgram_coach
+metgram0
+epsmetgram
+metgram_coach
+timer
+map_definition
+edit_map
+matchinginfo
+subpagedetails
+trajectory
+geography
+setdevice
+getdevice
+putksec1
+putksec2
+putksec3
+putksec4
+putrsec1
+putrsec2
+putrsec3
+putrsec4
+getksec1
+getksec2
+getksec3
+getksec4
+getrsec1
+getrsec2
+getrsec3
+getrsec4
diff --git a/share/metview/etc/macro_icon_function_help.xml b/share/metview/etc/macro_icon_function_help.xml
new file mode 100644
index 0000000..88ca9bf
--- /dev/null
+++ b/share/metview/etc/macro_icon_function_help.xml
@@ -0,0 +1,2467 @@
+<macro_icon_functions>
+<function name='any'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='exclusive' values = 'true/false' />
+  <param name='help' values = 'help_input/help_script/help_multiple_selection/help_file_box' />
+  <param name='input_type' values = 'point/line/area' />
+  <param name='input_window' />
+  <param name='help_script_command' />
+</function>
+<function name='binning'>
+</function>
+<function name='bufr_picker'>
+  <param name='DATA' />
+  <param name='OUTPUT' values = 'Geographical points/Geographical polar vectors/Geographical X Y vectors' />
+  <param name='PARAMETER' values = '001001 - WMO BLOCK NUMBER/001002 - WMO STATION NUMBER/001007 - SATELLITE IDENTIFIER/004053 - Number of days with precipitation equal to or more than 1 mm/010003 - GEOPOTENTIAL/010004 - PRESSURE/010051 - PRESSURE REDUCED AT SEA LEVEL/011001 - WIND DIRECTION/011002 - WIND SPEED/011011 - WIND DIRECTION AT 10M/011012 - WIND SPEED AT 10M/011041 - Maximum wind speed in gusts/012001 - DRY BULP TEMPERATURE/012002 - WET BULP TEMPERATURE/012003 - DEW POINT TEMPE [...]
+  <param name='MISSING_DATA' values = 'IGNORE/INCLUDE' />
+  <param name='MISSING_DATA_VALUE' />
+  <param name='COORDINATE_DESCRIPTORS' values = '005040 - Orbit number/005041 - Scan line number/005042 - Channel number/005043 - Field of view number/005044 - Satellite cycle number/005045 - Field of regard number/007002 - Height or altitude/007003 - Geopotential/007004 - Pressure/007007 - Height/007008 - Geopotential/007009 - Geopotential height/007010 - Flight level' />
+  <param name='COORDINATE_VALUES' values = 'ALL' />
+  <param name='FAIL_ON_ERROR' values = 'YES/NO' />
+</function>
+<function name='cartesianview'>
+  <param name='X_AUTOMATIC' values = 'on/off' />
+  <param name='X_AXIS_TYPE' values = 'regular/date/logarithmic/geoline' />
+  <param name='X_MIN' />
+  <param name='X_MAX' />
+  <param name='X_MIN_LATITUDE' />
+  <param name='X_MAX_LATITUDE' />
+  <param name='X_MIN_LONGITUDE' />
+  <param name='X_MAX_LONGITUDE' />
+  <param name='X_DATE_MIN' />
+  <param name='X_DATE_MAX' />
+  <param name='Y_AUTOMATIC' values = 'on/off' />
+  <param name='Y_AXIS_TYPE' values = 'regular/date/logarithmic/geoline' />
+  <param name='Y_MIN' />
+  <param name='Y_MAX' />
+  <param name='Y_MIN_LATITUDE' />
+  <param name='Y_MAX_LATITUDE' />
+  <param name='Y_MIN_LONGITUDE' />
+  <param name='Y_MAX_LONGITUDE' />
+  <param name='Y_DATE_MIN' />
+  <param name='Y_DATE_MAX' />
+  <param name='HORIZONTAL_AXIS' />
+  <param name='VERTICAL_AXIS' />
+  <param name='MAP_PROJECTION' values = 'cartesian' />
+  <param name='SUBPAGE_X_POSITION' />
+  <param name='SUBPAGE_Y_POSITION' />
+  <param name='SUBPAGE_X_LENGTH' />
+  <param name='SUBPAGE_Y_LENGTH' />
+  <param name='SUBPAGE_VERTICAL_AXIS_WIDTH' />
+  <param name='SUBPAGE_HORIZONTAL_AXIS_HEIGHT' />
+  <param name='PAGE_FRAME' values = 'ON/OFF' />
+  <param name='PAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='PAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='PAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='PAGE_ID_LINE' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_TYPE' values = 'BOTH/LOGO_ONLY/ID_LINE_ONLY' />
+  <param name='PAGE_ID_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='PAGE_ID_LINE_SYSTEM_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_DATE_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT' />
+  <param name='PAGE_ID_LINE_ERRORS_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_LOGO_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_HEIGHT' />
+  <param name='PAGE_ID_LINE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='SUBPAGE_BACKGROUND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+</function>
+<function name='checkbox'>
+  <param name='name' />
+  <param name='exclusive' values = 'true' />
+  <param name='true' />
+  <param name='false' />
+  <param name='values' />
+  <param name='default' />
+</function>
+<function name='cleanfile'>
+  <param name='PATH' />
+  <param name='DATA' />
+  <param name='SKIP_HIRLAM_CUSTOM_RECORD' values = 'NO/YES' />
+  <param name='MAX_RUBBISH_OCTETS' />
+</function>
+<function name='colour'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='exclusive' values = 'true/false' />
+  <param name='help' values = 'help_colour' />
+</function>
+<function name='compute'>
+  <param name='FORMULA' />
+  <param name='FIELDSET' />
+  <param name='ACCURACY' values = 'NORMAL/REDUCED/LOW/OFF/ARCHIVED VALUE' />
+  <param name='TARGET' values = 'OFF' />
+</function>
+<function name='cptec_access'>
+  <param name='MODEL' values = 'ETA_15Km_1h/ETA_15Km_3h/ETA_20Km/GLOBAL' />
+  <param name='LEVTYPE' values = 'SURFACE/10_METER/PRESSURE_LEVEL/MODEL_LEVEL' />
+  <param name='LEVELIST' />
+  <param name='PARAM' />
+  <param name='DATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='TIME' />
+  <param name='STEP' values = 'TO/BY' />
+</function>
+<function name='cross_sect'>
+</function>
+<function name='datacoverage'>
+  <param name='DATA' />
+  <param name='CHECKING_DATE' />
+  <param name='CHECKING_TIME' />
+  <param name='SUBTYPE' />
+  <param name='CUTOFF_TIME_IN_MINUTES' />
+  <param name='PLOT_SUBSETS' values = 'ON/OFF' />
+  <param name='DESCRIPTORS_TO_CHECK' />
+  <param name='SYMBOL' />
+  <param name='LEGEND_COLUMN_COUNT' />
+</function>
+<function name='definition'>
+</function>
+<function name='divrot'>
+  <param name='APPLICATION' values = 'ROTWIND/DIVWIND/UVWIND' />
+</function>
+<function name='divwind'>
+  <param name='DATA' />
+  <param name='TRUNCATION' values = 'AV' />
+  <param name='SMOOTHING' values = 'YES/NO' />
+  <param name='FLTC' />
+  <param name='MFLTEXP' />
+</function>
+<function name='drawing_priority'>
+  <param name='COASTLINE' values = 'FIRST/LAST' />
+  <param name='COASTLINE_LAND_SHADE' values = 'FIRST/LAST' />
+  <param name='COASTLINE_SEA_SHADE' values = 'FIRST/LAST' />
+  <param name='PAXIS' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PCONT_CONTOUR_SHADE_OFF' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PCONT_CONTOUR_SHADE_TECHNIQUE_CELL_SHADING' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PCONT_CONTOUR_SHADE_TECHNIQUE_MARKER' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PCONT_CONTOUR_SHADE_METHOD_DOT' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PCONT_CONTOUR_SHADE_METHOD_HATCH' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PCONT_CONTOUR_SHADE_METHOD_AREA_FILL' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_TYPE_CURVE' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_TYPE_BAR' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_TYPE_AREA' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_SHADE_OFF' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_SHADE_STYLE_DOT' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_SHADE_STYLE_HATCH' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PGRAPH_GRAPH_SHADE_STYLE_AREA_FILL' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='POBS' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PSYMB' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PTEXT_TEXT_MODE_TITLE' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PTEXT_TEXT_MODE_POSITIONAL' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='ANNOTATION' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PWIND_WIND_FIELD_TYPE_ARROWS' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PWIND_WIND_FIELD_TYPE_FLAGS' values = '100/200/300/400/500/600/700/800/900' />
+  <param name='PWIND_WIND_FIELD_TYPE_STREAMLINES' values = '100/200/300/400/500/600/700/800/900' />
+</function>
+<function name='ecfs'>
+  <param name='ECFS_DOMAIN' />
+  <param name='FILE_NAME' />
+</function>
+<function name='eps_output'>
+  <param name='OUTPUT_TITLE' />
+  <param name='OUTPUT_WIDTH' />
+  <param name='OUTPUT_RESOLUTION' />
+  <param name='OUTPUT_NAME' />
+  <param name='OUTPUT_NAME_FIRST_PAGE_NUMBER' values = 'ON/OFF' />
+  <param name='OUTPUT_FULLNAME' />
+  <param name='OUTPUT_LEGACY_NAME' />
+  <param name='OUTPUT_FILE_MINIMAL_WIDTH' />
+  <param name='OUTPUT_FILE_SEPARATOR' />
+  <param name='OUTPUT_DEBUG' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST_NAME' />
+  <param name='OUTPUT_PS_COLOUR_MODEL' />
+  <param name='OUTPUT_PS_SCALE' />
+  <param name='OUTPUT_PS_SPLIT' values = 'ON/OFF' />
+  <param name='CLASS' />
+</function>
+<function name='eqpott_m'>
+  <param name='LNSP' />
+  <param name='TEMPERATURE' />
+  <param name='HUMIDITY' />
+</function>
+<function name='eqpott_p'>
+  <param name='TEMPERATURE' />
+  <param name='HUMIDITY' />
+</function>
+<function name='flexpart_run'>
+  <param name='FLEXPART_EXE' />
+  <param name='FLEXPART_INPUT_MODE' values = 'ICON/PATH' />
+  <param name='FLEXPART_INPUT_DATA' />
+  <param name='FLEXPART_INPUT_PATH' />
+  <param name='FLEXPART_AVAILABLE_FILE_PATH' />
+  <param name='FLEXPART_RUN_LABEL' />
+  <param name='FLEXPART_RUN_MODE' values = 'NORMAL/CET/FLIGHT' />
+  <param name='FLEXPART_SIMULATION_DIRECTION' values = 'FORWARD/BACKWARD' />
+  <param name='FLEXPART_STARTING_DATE' />
+  <param name='FLEXPART_ENDING_DATE' />
+  <param name='FLEXPART_OUTPUT_INTERVAL' />
+  <param name='FLEXPART_OUTPUT_AVERAGING_INTERVAL' />
+  <param name='FLEXPART_OUTPUT_SAMPLING_INTERVAL' />
+  <param name='FLEXPART_PARTICLE_SPLITTING_INTERVAL' />
+  <param name='FLEXPART_SYNC_INTERVAL' />
+  <param name='FLEXPART_CTL' />
+  <param name='FLEXPART_VERT_REDUCTION' />
+  <param name='FLEXPART_OUTPUT_FORM' values = 'CONCENTRATION/MIXING RATIO/BOTH/PLUME' />
+  <param name='FLEXPART_DUMP_PARTICLE_POSITIONS' values = 'NO/AT OUTPUT/AT END' />
+  <param name='FLEXPART_SUBGRID_TERRAIN' values = 'ON/OFF' />
+  <param name='FLEXPART_CONVECTION' values = 'ON/OFF' />
+  <param name='FLEXPART_AGE_SPECTRA' values = 'ON/OFF' />
+  <param name='FLEXPART_OUTPUT_FOR_EACH_RELEASE' values = 'ON/OFF' />
+  <param name='FLEXPART_COMPUTE_FLUXES' values = 'ON/OFF' />
+  <param name='FLEXPART_DOMAIN_FILL' values = 'ON/OFF' />
+  <param name='FLEXPART_SOURCE_UNITS' values = 'MASS/MASS MIXING RATIO' />
+  <param name='FLEXPART_RECEPTOR_UNITS' values = 'MASS/MASS MIXING RATIO' />
+  <param name='FLEXPART_TRACK_PARTICLES' values = 'ON/OFF' />
+  <param name='FLEXPART_NESTED_OUTPUT' values = 'ON/OFF' />
+  <param name='FLEXPART_WRITE_INITIAL_CONDITIONS' values = 'NO/MASS/MASS MIXING RATIO' />
+</function>
+<function name='flextra_prepare'>
+  <param name='FLEXTRA_PREPARE_MODE' values = 'FORECAST/PERIOD' />
+  <param name='FLEXTRA_FC_MARS_EXPVER' />
+  <param name='FLEXTRA_AN_MARS_EXPVER' />
+  <param name='FLEXTRA_DATE' />
+  <param name='FLEXTRA_TIME' />
+  <param name='FLEXTRA_STEP' />
+  <param name='FLEXTRA_PERIOD_START_DATE' />
+  <param name='FLEXTRA_PERIOD_START_TIME' />
+  <param name='FLEXTRA_PERIOD_END_DATE' values = 'INTERVAL' />
+  <param name='FLEXTRA_PERIOD_END_TIME' />
+  <param name='FLEXTRA_PERIOD_STEP' values = '3/6' />
+  <param name='FLEXTRA_AREA' />
+  <param name='FLEXTRA_GRID' />
+  <param name='FLEXTRA_TOP_LEVEL' />
+  <param name='FLEXTRA_TOP_LEVEL_UNITS' values = 'MODEL_LEVELS/HPA' />
+  <param name='FLEXTRA_REUSE_INPUT' values = 'ON/OFF' />
+  <param name='FLEXTRA_OUTPUT_PATH' />
+</function>
+<function name='flextra_run'>
+  <param name='FLEXTRA_EXE_PATH' />
+  <param name='FLEXTRA_INPUT_MODE' values = 'ICON/PATH' />
+  <param name='FLEXTRA_INPUT_DATA' />
+  <param name='FLEXTRA_INPUT_PATH' />
+  <param name='FLEXTRA_AVAILABLE_FILE_PATH' />
+  <param name='FLEXTRA_RUN_LABEL' />
+  <param name='FLEXTRA_RUN_MODE' values = 'NORMAL/CET/FLIGHT' />
+  <param name='FLEXTRA_TRAJECTORY_DIRECTION' values = 'FORWARD/BACKWARD' />
+  <param name='FLEXTRA_TRAJECTORY_LENGTH' />
+  <param name='FLEXTRA_FIRST_STARTING_DATE' />
+  <param name='FLEXTRA_FIRST_STARTING_TIME' />
+  <param name='FLEXTRA_LAST_STARTING_DATE' />
+  <param name='FLEXTRA_LAST_STARTING_TIME' />
+  <param name='FLEXTRA_STARTING_TIME_INTERVAL' />
+  <param name='FLEXTRA_OUTPUT_INTERVAL_MODE' values = 'ORIGINAL/INTERVAL/BOTH' />
+  <param name='FLEXTRA_OUTPUT_INTERVAL_VALUE' />
+  <param name='FLEXTRA_NORMAL_TYPES' />
+  <param name='FLEXTRA_NORMAL_NAMES' />
+  <param name='FLEXTRA_NORMAL_LATITUDES' />
+  <param name='FLEXTRA_NORMAL_LONGITUDES' />
+  <param name='FLEXTRA_NORMAL_LEVELS' />
+  <param name='FLEXTRA_NORMAL_LEVEL_UNITS' />
+  <param name='FLEXTRA_CET_TYPE' values = '3D/MODEL LEVEL/ISOBARIC/ISENTROPIC' />
+  <param name='FLEXTRA_CET_NAME' />
+  <param name='FLEXTRA_CET_AREA' />
+  <param name='FLEXTRA_CET_DX' />
+  <param name='FLEXTRA_CET_DY' />
+  <param name='FLEXTRA_CET_TOP_LEVEL' />
+  <param name='FLEXTRA_CET_BOTTOM_LEVEL' />
+  <param name='FLEXTRA_CET_DZ' />
+  <param name='FLEXTRA_CET_LEVEL_UNITS' values = 'METRES ASL/METRES AGL/HPA' />
+  <param name='FLEXTRA_FLIGHT_TYPE' values = '3D/MODEL LEVEL/ISOBARIC/ISENTROPIC' />
+  <param name='FLEXTRA_FLIGHT_NAME' />
+  <param name='FLEXTRA_FLIGHT_LATITUDES' />
+  <param name='FLEXTRA_FLIGHT_LONGITUDES' />
+  <param name='FLEXTRA_FLIGHT_LEVELS' />
+  <param name='FLEXTRA_FLIGHT_LEVEL_UNITS' values = 'METRES ASL/METRES AGL/HPA' />
+  <param name='FLEXTRA_FLIGHT_STARTING_DATES' />
+  <param name='FLEXTRA_FLIGHT_STARTING_TIMES' />
+  <param name='FLEXTRA_INTERPOLATION_TYPE' />
+  <param name='FLEXTRA_CFL_SPATIAL' />
+  <param name='FLEXTRA_CFL_TEMPORAL' />
+  <param name='FLEXTRA_UNCERTAINTY_TRAJECTORIES' values = 'ON/OFF' />
+  <param name='FLEXTRA_UNCERTAINTY_TRAJECTORY_NUMBER' />
+  <param name='FLEXTRA_UNCERTAINTY_TRAJECTORY_DISTANCE' />
+  <param name='FLEXTRA_UNCERTAINTY_TRAJECTORY_TIME_CONSTANT' />
+  <param name='FLEXTRA_U_RANDOM_ERROR' />
+  <param name='FLEXTRA_V_RANDOM_ERROR' />
+  <param name='FLEXTRA_W_RANDOM_ERROR' />
+</function>
+<function name='flextra_visualiser'>
+  <param name='FLEXTRA_PLOT_TYPE' values = 'GEO_POINTS/XY_POINTS' />
+  <param name='FLEXTRA_PLOT_CONTENT' values = 'TRAJECTORY/LABEL' />
+  <param name='FLEXTRA_FILENAME' values = 'OFF' />
+  <param name='FLEXTRA_DATA' />
+  <param name='FLEXTRA_GROUP_INDEX' />
+  <param name='FLEXTRA_X_VARIABLE' values = 'DATE/LATITUDE/LONGITUDE/ETA/PRESSURE/HEIGHT/HEIGHT_AGL/PV/THETA' />
+  <param name='FLEXTRA_Y_VARIABLE' values = 'DATE/LATITUDE/LONGITUDE/ETA/PRESSURE/HEIGHT/HEIGHT_AGL/PV/THETA' />
+  <param name='FLEXTRA_LABEL_VARIABLE' values = 'TIME/LATITUDE/LONGITUDE/ETA/PRESSURE/HEIGHT/HEIGHT_AGL/PV/THETA' />
+  <param name='FLEXTRA_LABEL_PERIOD' values = '6h/12h/24h/48h' />
+</function>
+<function name='geo_to_grib'>
+  <param name='GEOPOINTS' />
+  <param name='AREA' />
+  <param name='GRID' />
+  <param name='TOLERANCE' />
+  <param name='INTERPOLATION_METHOD' values = 'RECIPROCAL/EXPONENTIAL_MEAN/EXPONENTIAL_SUM' />
+  <param name='PARAMETER' />
+  <param name='GRIB_TABLE2_VERSION' />
+</function>
+<function name='geo_to_kml'>
+  <param name='GEOPOINTS' />
+  <param name='OUTPUT_MODE' values = 'Points/Tracks/Polygon' />
+  <param name='OUTPUT_FORMAT' values = 'KMZ/KML' />
+  <param name='AREA' />
+</function>
+<function name='geoview'>
+  <param name='COASTLINES' />
+  <param name='MAP_PROJECTION' values = 'CYLINDRICAL/POLAR_STEREOGRAPHIC/POLAR_NORTH/LAMBERT/GEOS/GOODE/COLLIGNON/MOLLWEIDE/BONNE/EPSG:32661/EPSG:4326' />
+  <param name='MAP_AREA_DEFINITION' values = 'CORNERS/CENTRE/FULL' />
+  <param name='AREA' />
+  <param name='MAP_HEMISPHERE' values = 'NORTH/SOUTH' />
+  <param name='MAP_VERTICAL_LONGITUDE' />
+  <param name='MAP_CENTRE_LATITUDE' />
+  <param name='MAP_CENTRE_LONGITUDE' />
+  <param name='MAP_SCALE' />
+  <param name='MAP_OVERLAY_CONTROL' values = 'ALWAYS/BY_DATE/BY_LEVEL/NEVER' />
+  <param name='SUBPAGE_X_POSITION' />
+  <param name='SUBPAGE_Y_POSITION' />
+  <param name='SUBPAGE_X_LENGTH' />
+  <param name='SUBPAGE_Y_LENGTH' />
+  <param name='SUBPAGE_METADATA_INFO' values = 'ON/OFF' />
+  <param name='SUBPAGE_METADATA_JAVASCRIPT_PATH' />
+  <param name='PAGE_FRAME' values = 'ON/OFF' />
+  <param name='PAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='PAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='PAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='PAGE_ID_LINE' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_TYPE' values = 'BOTH/LOGO_ONLY/ID_LINE_ONLY' />
+  <param name='PAGE_ID_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='PAGE_ID_LINE_SYSTEM_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_DATE_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT' />
+  <param name='PAGE_ID_LINE_ERRORS_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_LOGO_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_HEIGHT' />
+  <param name='PAGE_ID_LINE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='SUBPAGE_BACKGROUND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+</function>
+<function name='grib_to_geo'>
+  <param name='DATA' />
+  <param name='GEOPOINTS_FORMAT' values = 'TRADITIONAL/X_Y_V' />
+</function>
+<function name='grib_vectors'>
+  <param name='TYPE' values = 'VECTOR_FIELD/POLAR_FIELD' />
+  <param name='U_COMPONENT' />
+  <param name='V_COMPONENT' />
+  <param name='INTENSITY' />
+  <param name='DIRECTION' />
+  <param name='COLOURING_FIELD' />
+</function>
+<function name='hovmoeller_area'>
+  <param name='APPLICATION' values = 'LINE_HOV/AREA_HOV/HEIGHT_HOV/EXPAND_HOV' />
+</function>
+<function name='hovmoeller_expand'>
+  <param name='APPLICATION' values = 'LINE_HOV/AREA_HOV/HEIGHT_HOV/EXPAND_HOV' />
+</function>
+<function name='hovmoeller_height'>
+  <param name='APPLICATION' values = 'LINE_HOV/AREA_HOV/HEIGHT_HOV/EXPAND_HOV' />
+</function>
+<function name='hovmoeller_line'>
+  <param name='APPLICATION' values = 'LINE_HOV/AREA_HOV/HEIGHT_HOV/EXPAND_HOV' />
+</function>
+<function name='icon'>
+  <param name='name' />
+  <param name='class' />
+  <param name='exclusive' values = 'true/false' />
+  <param name='values' />
+  <param name='default' />
+</function>
+<function name='input_visualiser'>
+  <param name='INPUT_PLOT_TYPE' values = 'XY_POINTS/GEO_POINTS/XY_AREA/XY_VECTORS/GEO_VECTORS/XY_BINNING/GEO_BINNING' />
+  <param name='INPUT_X_TYPE' values = 'NUMBER/DATE' />
+  <param name='INPUT_Y_TYPE' values = 'NUMBER/DATE' />
+  <param name='INPUT_X_VALUES' />
+  <param name='INPUT_Y_VALUES' />
+  <param name='INPUT_X2_VALUES' />
+  <param name='INPUT_Y2_VALUES' />
+  <param name='INPUT_X_MISSING_VALUE' />
+  <param name='INPUT_Y_MISSING_VALUE' />
+  <param name='INPUT_DATE_X_VALUES' />
+  <param name='INPUT_DATE_Y_VALUES' />
+  <param name='INPUT_DATE_X2_VALUES' />
+  <param name='INPUT_DATE_Y2_VALUES' />
+  <param name='INPUT_LONGITUDE_VALUES' />
+  <param name='INPUT_LATITUDE_VALUES' />
+  <param name='INPUT_X_COMPONENT_VALUES' />
+  <param name='INPUT_Y_COMPONENT_VALUES' />
+  <param name='INPUT_VALUES' />
+  <param name='INPUT_BINNING' />
+</function>
+<function name='kml_output'>
+  <param name='OUTPUT_TITLE' />
+  <param name='OUTPUT_WIDTH' />
+  <param name='OUTPUT_RESOLUTION' />
+  <param name='OUTPUT_NAME' />
+  <param name='OUTPUT_NAME_FIRST_PAGE_NUMBER' values = 'ON/OFF' />
+  <param name='OUTPUT_FULLNAME' />
+  <param name='OUTPUT_LEGACY_NAME' />
+  <param name='OUTPUT_FILE_MINIMAL_WIDTH' />
+  <param name='OUTPUT_FILE_SEPARATOR' />
+  <param name='OUTPUT_DEBUG' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST_NAME' />
+  <param name='KML_KMZ' values = 'ON/OFF' />
+  <param name='KML_DESCRIPTION' />
+  <param name='KML_AUTHOR' />
+  <param name='KML_LINK' />
+  <param name='KML_HEIGHT' />
+  <param name='KML_LATITUDE' />
+  <param name='KML_LONGITUDE' />
+  <param name='KML_TRANSPARENCY' />
+  <param name='KML_TILT' />
+  <param name='KML_RANGE' />
+  <param name='KML_COASTLINES' values = 'ON/OFF' />
+  <param name='CLASS' />
+</function>
+<function name='magml'>
+</function>
+<function name='mapview'>
+  <param name='COASTLINES' />
+  <param name='MAP_PROJECTION' values = 'CYLINDRICAL/POLAR_STEREOGRAPHIC/MERCATOR/PROJ4/OCEAN_SECTION/AITOFF/LAMBERT/NONE' />
+  <param name='MAP_HEMISPHERE' values = 'NORTH/SOUTH' />
+  <param name='AREA' />
+  <param name='MAP_VERTICAL_LONGITUDE' />
+  <param name='MAP_CENTRE_LATITUDE' />
+  <param name='MAP_CENTRE_LONGITUDE' />
+  <param name='MAP_PROJ4_DEFINITION' values = 'POLAR_NORTH/LAMBERT/EPSG:32661/EPSG:4326/CYLINDRICAL/GEOS/GOODE/COLLIGNON/MOLLWEIDE/BONNE' />
+  <param name='MAP_PROJ4_GLOBAL' values = 'ON/OFF' />
+  <param name='MAP_SCALE' />
+  <param name='MAP_STANDARD_LATITUDE_1' />
+  <param name='MAP_STANDARD_LATITUDE_2' />
+  <param name='OVERLAY_CONTROL' />
+  <param name='MATCH_DATE' values = 'YES/NO' />
+  <param name='MATCH_TIME' values = 'YES/NO' />
+  <param name='MATCH_LEVEL' values = 'YES/NO' />
+  <param name='MATCH_AREA' values = 'YES/NO' />
+  <param name='MATCH_VERTICAL_AXIS' values = 'YES/NO' />
+  <param name='MAP_OVERLAY_CONTROL' values = 'ALWAYS/BY_DATE/BY_LEVEL/NEVER' />
+  <param name='SUBPAGE_OVERLAY_MODE' />
+  <param name='SUBPAGE_X_POSITION' />
+  <param name='SUBPAGE_Y_POSITION' />
+  <param name='SUBPAGE_X_LENGTH' />
+  <param name='SUBPAGE_Y_LENGTH' />
+  <param name='SUBPAGE_METADATA_INFO' values = 'ON/OFF' />
+  <param name='SUBPAGE_METADATA_JAVASCRIPT_PATH' />
+  <param name='PAGE_FRAME' values = 'ON/OFF' />
+  <param name='PAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='PAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='PAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='PAGE_ID_LINE' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_TYPE' values = 'BOTH/LOGO_ONLY/ID_LINE_ONLY' />
+  <param name='PAGE_ID_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='PAGE_ID_LINE_SYSTEM_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_DATE_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT' />
+  <param name='PAGE_ID_LINE_ERRORS_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_LOGO_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_HEIGHT' />
+  <param name='PAGE_ID_LINE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='SUBPAGE_BACKGROUND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+</function>
+<function name='maverageview'>
+  <param name='AREA' />
+  <param name='DIRECTION' values = 'NORTH SOUTH/EAST WEST' />
+  <param name='BOTTOM_PRESSURE' />
+  <param name='TOP_PRESSURE' />
+  <param name='PRESSURE_LEVEL_AXIS' values = 'LINEAR/LOG' />
+  <param name='MAP_PROJECTION' values = 'cartesian' />
+  <param name='HORIZONTAL_AXIS' />
+  <param name='VERTICAL_AXIS' />
+  <param name='SUBPAGE_X_POSITION' />
+  <param name='SUBPAGE_Y_POSITION' />
+  <param name='SUBPAGE_X_LENGTH' />
+  <param name='SUBPAGE_Y_LENGTH' />
+  <param name='PAGE_FRAME' values = 'ON/OFF' />
+  <param name='PAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='PAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='PAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='PAGE_ID_LINE' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_TYPE' values = 'BOTH/LOGO_ONLY/ID_LINE_ONLY' />
+  <param name='PAGE_ID_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='PAGE_ID_LINE_SYSTEM_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_DATE_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT' />
+  <param name='PAGE_ID_LINE_ERRORS_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_LOGO_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_HEIGHT' />
+  <param name='PAGE_ID_LINE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='SUBPAGE_BACKGROUND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+</function>
+<function name='maxis'>
+  <param name='AXIS_ORIENTATION' values = 'HORIZONTAL/VERTICAL' />
+  <param name='AXIS_POSITION' values = 'BOTTOM/TOP/LEFT/RIGHT/AUTOMATIC' />
+  <param name='AXIS_TYPE' values = 'REGULAR/POSITION_LIST/LOGARITHMIC/DATE/GEOLINE' />
+  <param name='AXIS_TICK_INTERVAL' />
+  <param name='AXIS_TICK_POSITION_LIST' />
+  <param name='AXIS_DATE_TYPE' values = 'AUTOMATIC/YEARS/MONTHS/DAYS/HOURS' />
+  <param name='AXIS_YEARS_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_YEARS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='AXIS_YEARS_LABEL_QUALITY' />
+  <param name='AXIS_YEARS_LABEL_HEIGHT' />
+  <param name='AXIS_MONTHS_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_MONTHS_LABEL_COMPOSITION' values = 'ONE/TWO/THREE' />
+  <param name='AXIS_MONTHS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_O [...]
+  <param name='AXIS_MONTHS_LABEL_QUALITY' />
+  <param name='AXIS_MONTHS_LABEL_HEIGHT' />
+  <param name='AXIS_DAYS_LABEL' values = 'DAY/NUMBER/BOTH/OFF' />
+  <param name='AXIS_DAYS_LABEL_COMPOSITION' values = 'ONE/THREE/FULL' />
+  <param name='AXIS_DAYS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='AXIS_DAYS_SUNDAY_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDD [...]
+  <param name='AXIS_DAYS_LABEL_QUALITY' />
+  <param name='AXIS_DAYS_LABEL_HEIGHT' />
+  <param name='AXIS_HOURS_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_HOURS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='AXIS_HOURS_LABEL_QUALITY' />
+  <param name='AXIS_HOURS_LABEL_HEIGHT' />
+  <param name='AXIS_LINE' values = 'ON/OFF' />
+  <param name='AXIS_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='AXIS_LINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='AXIS_LINE_THICKNESS' />
+  <param name='AXIS_GRID' values = 'ON/OFF' />
+  <param name='AXIS_GRID_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='AXIS_GRID_LINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='AXIS_GRID_THICKNESS' />
+  <param name='AXIS_GRID_REFERENCE_LEVEL' />
+  <param name='AXIS_GRID_REFERENCE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH [...]
+  <param name='AXIS_GRID_REFERENCE_LINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='AXIS_GRID_REFERENCE_THICKNESS' />
+  <param name='AXIS_TITLE' values = 'ON/OFF' />
+  <param name='AXIS_TITLE_TEXT' />
+  <param name='AXIS_TITLE_ORIENTATION' />
+  <param name='AXIS_TITLE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='AXIS_TITLE_HEIGHT' />
+  <param name='AXIS_TITLE_QUALITY' />
+  <param name='AXIS_TICK' values = 'ON/OFF' />
+  <param name='AXIS_TICK_POSITION' values = 'OUT/IN' />
+  <param name='AXIS_TICK_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='AXIS_TICK_SIZE' />
+  <param name='AXIS_TICK_THICKNESS' />
+  <param name='AXIS_TICK_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_TICK_LABEL_TYPE' values = 'NUMBER/LABEL_LIST/LATITUDE/LONGITUDE' />
+  <param name='AXIS_TICK_LABEL_FORMAT' />
+  <param name='AXIS_TICK_LABEL_LIST' />
+  <param name='AXIS_TICK_LABEL_FREQUENCY' />
+  <param name='AXIS_TICK_LABEL_FIRST' values = 'ON/OFF' />
+  <param name='AXIS_TICK_LABEL_LAST' values = 'ON/OFF' />
+  <param name='AXIS_TICK_LABEL_POSITION' values = 'ON_TICK/INTER_TICK' />
+  <param name='AXIS_TICK_LABEL_ORIENTATION' values = 'HORIZONTAL/VERTICAL/PARALLEL' />
+  <param name='AXIS_TICK_LABEL_FONT' />
+  <param name='AXIS_TICK_LABEL_FONT_STYLE' />
+  <param name='AXIS_TICK_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='AXIS_TICK_LABEL_HEIGHT' />
+  <param name='AXIS_MINOR_TICK' values = 'ON/OFF' />
+  <param name='AXIS_MINOR_TICK_COUNT' />
+  <param name='AXIS_MINOR_TICK_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='AXIS_MINOR_TICK_THICKNESS' />
+  <param name='AXIS_TIP_TITLE' values = 'ON/OFF' />
+  <param name='AXIS_TIP_TITLE_TEXT' />
+  <param name='AXIS_TIP_TITLE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='AXIS_TIP_TITLE_HEIGHT' />
+  <param name='AXIS_TIP_TITLE_QUALITY' values = 'HIGH/MEDIUM/LOW' />
+</function>
+<function name='mcoast'>
+  <param name='MAP_COASTLINE' values = 'ON/OFF' />
+  <param name='MAP_COASTLINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='MAP_COASTLINE_RESOLUTION' values = 'AUTOMATIC/LOW/MEDIUM/HIGH' />
+  <param name='MAP_COASTLINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='MAP_COASTLINE_THICKNESS' />
+  <param name='MAP_COASTLINE_LAND_SHADE' values = 'ON/OFF' />
+  <param name='MAP_COASTLINE_LAND_SHADE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RE [...]
+  <param name='MAP_COASTLINE_SEA_SHADE' values = 'ON/OFF' />
+  <param name='MAP_COASTLINE_SEA_SHADE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='MAP_BOUNDARIES' values = 'ON/OFF' />
+  <param name='MAP_BOUNDARIES_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='MAP_BOUNDARIES_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='MAP_BOUNDARIES_THICKNESS' />
+  <param name='MAP_DISPUTED_BOUNDARIES' values = 'ON/OFF' />
+  <param name='MAP_DISPUTED_BOUNDARIES_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='MAP_DISPUTED_BOUNDARIES_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='MAP_DISPUTED_BOUNDARIES_THICKNESS' />
+  <param name='MAP_ADMINISTRATIVE_BOUNDARIES' values = 'ON/OFF' />
+  <param name='MAP_ADMINISTRATIVE_BOUNDARIES_COUNTRIES_LIST' />
+  <param name='MAP_ADMINISTRATIVE_BOUNDARIES_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='MAP_ADMINISTRATIVE_BOUNDARIES_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERI [...]
+  <param name='MAP_ADMINISTRATIVE_BOUNDARIES_THICKNESS' />
+  <param name='MAP_CITIES' values = 'ON/OFF' />
+  <param name='MAP_CITIES_UNIT_SYSTEM' values = 'PERCENT/CM' />
+  <param name='MAP_CITIES_FONT_NAME' />
+  <param name='MAP_CITIES_FONT_STYLE' />
+  <param name='MAP_CITIES_FONT_SIZE' />
+  <param name='MAP_CITIES_FONT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='MAP_CITIES_NAME_POSITION' values = 'ABOVE/BELOW/LEFT/RIGHT' />
+  <param name='MAP_CITIES_MARKER' values = 'CIRCLE/BOX/SNOWFLAKE/PLUS' />
+  <param name='MAP_CITIES_MARKER_HEIGHT' />
+  <param name='MAP_CITIES_MARKER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_O [...]
+  <param name='MAP_RIVERS' values = 'ON/OFF' />
+  <param name='MAP_RIVERS_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='MAP_RIVERS_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='MAP_RIVERS_THICKNESS' />
+  <param name='MAP_GRID' values = 'ON/OFF' />
+  <param name='MAP_GRID_LATITUDE_REFERENCE' />
+  <param name='MAP_GRID_LATITUDE_INCREMENT' />
+  <param name='MAP_GRID_LONGITUDE_REFERENCE' />
+  <param name='MAP_GRID_LONGITUDE_INCREMENT' />
+  <param name='MAP_GRID_LINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='MAP_GRID_THICKNESS' />
+  <param name='MAP_GRID_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUS [...]
+  <param name='MAP_LABEL' values = 'ON/OFF' />
+  <param name='MAP_LABEL_QUALITY' />
+  <param name='MAP_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='MAP_LABEL_HEIGHT' />
+  <param name='MAP_LABEL_LATITUDE_FREQUENCY' />
+  <param name='MAP_LABEL_LONGITUDE_FREQUENCY' />
+  <param name='MAP_LABEL_LEFT' values = 'ON/OFF' />
+  <param name='MAP_LABEL_RIGHT' values = 'ON/OFF' />
+  <param name='MAP_LABEL_TOP' values = 'ON/OFF' />
+  <param name='MAP_LABEL_BOTTOM' values = 'ON/OFF' />
+</function>
+<function name='mcont'>
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='CONTOUR' values = 'ON/OFF' />
+  <param name='CONTOUR_LINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_LINE_THICKNESS' />
+  <param name='CONTOUR_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='CONTOUR_HIGHLIGHT' values = 'ON/OFF' />
+  <param name='CONTOUR_HIGHLIGHT_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_REFERENCE_LEVEL' />
+  <param name='CONTOUR_HIGHLIGHT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_O [...]
+  <param name='CONTOUR_HIGHLIGHT_THICKNESS' />
+  <param name='CONTOUR_HIGHLIGHT_FREQUENCY' />
+  <param name='CONTOUR_LEVEL_SELECTION_TYPE' values = 'COUNT/INTERVAL/LEVEL_LIST' />
+  <param name='CONTOUR_MAX_LEVEL' />
+  <param name='CONTOUR_MIN_LEVEL' />
+  <param name='CONTOUR_SHADE_MAX_LEVEL' />
+  <param name='CONTOUR_SHADE_MIN_LEVEL' />
+  <param name='CONTOUR_LEVEL_COUNT' />
+  <param name='CONTOUR_LEVEL_TOLERANCE' />
+  <param name='CONTOUR_INTERVAL' />
+  <param name='CONTOUR_LEVEL_LIST' />
+  <param name='CONTOUR_LABEL' values = 'ON/OFF' />
+  <param name='CONTOUR_LABEL_TYPE' />
+  <param name='CONTOUR_LABEL_TEXT' />
+  <param name='CONTOUR_LABEL_HEIGHT' />
+  <param name='CONTOUR_LABEL_FORMAT' />
+  <param name='CONTOUR_LABEL_BLANKING' values = 'ON/OFF' />
+  <param name='CONTOUR_LABEL_FONT' values = 'SERIF/SANSSERIF' />
+  <param name='CONTOUR_LABEL_FONT_STYLE' values = 'NORMAL/BOLD/ITALIC/BOLDITALIC' />
+  <param name='CONTOUR_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='CONTOUR_LABEL_FREQUENCY' />
+  <param name='CONTOUR_SHADE' values = 'ON/OFF' />
+  <param name='CONTOUR_SHADE_TECHNIQUE' values = 'POLYGON_SHADING/CELL_SHADING/GRID_SHADING/MARKER' />
+  <param name='CONTOUR_SHADE_METHOD' values = 'AREA_FILL/DOT/HATCH' />
+  <param name='CONTOUR_SHADE_DOT_SIZE' />
+  <param name='CONTOUR_SHADE_MAX_LEVEL_DENSITY' />
+  <param name='CONTOUR_SHADE_MIN_LEVEL_DENSITY' />
+  <param name='CONTOUR_SHADE_ANGLE' />
+  <param name='CONTOUR_SHADE_HATCH_INDEX' />
+  <param name='CONTOUR_SHADE_HATCH_THICKNESS' />
+  <param name='CONTOUR_SHADE_HATCH_DENSITY' />
+  <param name='CONTOUR_SHADE_COLOUR_TABLE' />
+  <param name='CONTOUR_SHADE_HEIGHT_TABLE' />
+  <param name='CONTOUR_SHADE_MARKER_TABLE' />
+  <param name='CONTOUR_SHADE_COLOUR_METHOD' values = 'CALCULATE/LIST' />
+  <param name='CONTOUR_SHADE_MAX_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='CONTOUR_SHADE_MIN_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='CONTOUR_SHADE_COLOUR_DIRECTION' values = 'CLOCKWISE/ANTI_CLOCKWISE' />
+  <param name='CONTOUR_SHADE_COLOUR_LIST' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_SHADE_LABEL_BLANKING' values = 'ON/OFF' />
+  <param name='CONTOUR_METHOD' values = 'AUTOMATIC/SAMPLE/LINEAR/AKIMA760/AKIMA474' />
+  <param name='CONTOUR_SAMPLE_X_INTERVAL' />
+  <param name='CONTOUR_SAMPLE_Y_INTERVAL' />
+  <param name='CONTOUR_AKIMA_X_RESOLUTION' />
+  <param name='CONTOUR_AKIMA_Y_RESOLUTION' />
+  <param name='CONTOUR_INTERPOLATION_FLOOR' />
+  <param name='CONTOUR_INTERPOLATION_CEILING' />
+  <param name='CONTOUR_AUTOMATIC_SETTING' values = 'ON/OFF' />
+  <param name='CONTOUR_AUTOMATIC_LIBRARY_PATH' />
+  <param name='CONTOUR_HILO' values = 'ON/OFF/HI/LO' />
+  <param name='CONTOUR_HILO_TYPE' values = 'TEXT/NUMBER/BOTH' />
+  <param name='CONTOUR_HILO_HEIGHT' />
+  <param name='CONTOUR_HILO_QUALITY' values = 'HIGH/MEDIUM/LOW' />
+  <param name='CONTOUR_HI_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='CONTOUR_LO_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='CONTOUR_HI_TEXT' />
+  <param name='CONTOUR_LO_TEXT' />
+  <param name='CONTOUR_HILO_TEXT_BLANKING' values = 'ON/OFF' />
+  <param name='CONTOUR_HILO_FORMAT' />
+  <param name='CONTOUR_HILO_WINDOW_SIZE' />
+  <param name='CONTOUR_HILO_SUPPRESS_RADIUS' />
+  <param name='CONTOUR_HILO_MAX_VALUE' />
+  <param name='CONTOUR_HILO_MIN_VALUE' />
+  <param name='CONTOUR_HI_MAX_VALUE' />
+  <param name='CONTOUR_HI_MIN_VALUE' />
+  <param name='CONTOUR_LO_MAX_VALUE' />
+  <param name='CONTOUR_LO_MIN_VALUE' />
+  <param name='CONTOUR_HILO_MARKER' values = 'ON/OFF' />
+  <param name='CONTOUR_HILO_MARKER_HEIGHT' />
+  <param name='CONTOUR_HILO_MARKER_INDEX' />
+  <param name='CONTOUR_HILO_MARKER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH [...]
+  <param name='CONTOUR_HILO_POSITION_WRITE' values = 'ON/OFF' />
+  <param name='CONTOUR_HILO_POSITION_FILE_NAME' />
+  <param name='CONTOUR_GRID_VALUE_PLOT' values = 'ON/OFF' />
+  <param name='CONTOUR_GRID_VALUE_TYPE' values = 'NORMAL/REDUCED/AKIMA' />
+  <param name='CONTOUR_GRID_VALUE_PLOT_TYPE' values = 'VALUE/MARKER/BOTH' />
+  <param name='CONTOUR_GRID_VALUE_MIN' />
+  <param name='CONTOUR_GRID_VALUE_MAX' />
+  <param name='CONTOUR_GRID_VALUE_LAT_FREQUENCY' />
+  <param name='CONTOUR_GRID_VALUE_LON_FREQUENCY' />
+  <param name='CONTOUR_GRID_VALUE_HEIGHT' />
+  <param name='CONTOUR_GRID_VALUE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_GRID_VALUE_FORMAT' />
+  <param name='CONTOUR_GRID_VALUE_QUALITY' values = 'HIGH/MEDIUM/LOW' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_HEIGHT' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/R [...]
+  <param name='CONTOUR_GRID_VALUE_MARKER_QUAL' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_INDEX' />
+  <param name='GRIB_SCALING_OF_RETRIEVED_FIELDS' values = 'ON/OFF' />
+  <param name='GRIB_SCALING_OF_DERIVED_FIELDS' values = 'ON/OFF' />
+</function>
+<function name='menu'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='source' />
+  <param name='exclusive' values = 'false' />
+</function>
+<function name='meteogram'>
+  <param name='type' values = '10_days_epsgram/15_days_epsgram/10_days_metgram/10_days_wave_epsgram/15_days_epsgram_with_climate' />
+  <param name='station' />
+  <param name='DATA_SELECTION_TYPE' values = 'LATEST/DATE/LOCAL' />
+  <param name='DATE' />
+  <param name='FORECAST_RUN_TIME' values = '00/12' />
+  <param name='EXPERIMENT' />
+  <param name='format' values = 'PostScript/PDF/GIF/PNG' />
+  <param name='database' />
+</function>
+<function name='mgraph'>
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='GRAPH_TYPE' values = 'CURVE/BAR/AREA' />
+  <param name='GRAPH_LINE' values = 'ON/OFF' />
+  <param name='GRAPH_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='GRAPH_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='GRAPH_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='GRAPH_SYMBOL' values = 'ON/OFF' />
+  <param name='GRAPH_SYMBOL_HEIGHT' />
+  <param name='GRAPH_SYMBOL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='GRAPH_SYMBOL_MARKER_INDEX' />
+  <param name='GRAPH_MISSING_DATA_MODE' values = 'IGNORE/JOIN/DROP' />
+  <param name='GRAPH_MISSING_DATA_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='GRAPH_MISSING_DATA_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='GRAPH_MISSING_DATA_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='GRAPH_BAR_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='GRAPH_BAR_WIDTH' />
+  <param name='GRAPH_BAR_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='GRAPH_BAR_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='GRAPH_SHADE' values = 'ON/OFF' />
+  <param name='GRAPH_SHADE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/ [...]
+  <param name='GRAPH_SHADE_STYLE' values = 'DOT/HATCH/AREA_FILL' />
+  <param name='GRAPH_SHADE_DENSITY' />
+  <param name='GRAPH_SHADE_DOT_SIZE' />
+  <param name='GRAPH_SHADE_HATCH_INDEX' />
+  <param name='GRAPH_SHADE_HATCH_THICKNESS' />
+  <param name='GRAPH_SHADE_HATCH_DENSITY' />
+  <param name='GRAPH_X_SUPPRESS_BELOW' />
+  <param name='GRAPH_X_SUPPRESS_ABOVE' />
+  <param name='GRAPH_DATE_X_SUPPRESS_BELOW' />
+  <param name='GRAPH_DATE_X_SUPPRESS_ABOVE' />
+  <param name='GRAPH_Y_SUPPRESS_BELOW' />
+  <param name='GRAPH_Y_SUPPRESS_ABOVE' />
+</function>
+<function name='mlegend'>
+  <param name='LEGEND_POSITIONING' values = 'AUTOMATIC' />
+  <param name='LEGEND_SUBPAGE_POSITION' values = 'BOTTOM_RIGHT/TOP_RIGHT/TOP_LEFT/BOTTOM_LEFT' />
+  <param name='LEGEND_DISPLAY_TYPE' values = 'DISJOINT/CONTINUOUS/HISTOGRAM' />
+  <param name='LEGEND_ENTRY_PLOT_DIRECTION' values = 'AUTOMATIC/ROW/COLUMN' />
+  <param name='LEGEND_ENTRY_PLOT_ORIENTATION' values = 'BOTTOM_TOP/TOP_BOTTOM' />
+  <param name='LEGEND_ENTRY_TEXT_WIDTH' />
+  <param name='LEGEND_COLUMN_COUNT' />
+  <param name='LEGEND_TITLE' values = 'ON/OFF' />
+  <param name='LEGEND_TITLE_TEXT' />
+  <param name='LEGEND_TITLE_ORIENTATION' values = 'AUTOMATIC/HORIZONTAL/VERTICAL' />
+  <param name='LEGEND_TEXT_COMPOSITION' values = 'AUTOMATIC_TEXT_ONLY/USER_TEXT_ONLY/BOTH' />
+  <param name='LEGEND_USER_LINES' />
+  <param name='LEGEND_TEXT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/ [...]
+  <param name='LEGEND_TEXT_FORMAT' />
+  <param name='LEGEND_TEXT_FONT_SIZE' />
+  <param name='LEGEND_LABEL_FREQUENCY' />
+  <param name='LEGEND_ENTRY_BORDER' values = 'ON/OFF' />
+  <param name='LEGEND_ENTRY_BORDER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH [...]
+  <param name='LEGEND_BOX_BLANKING' values = 'ON/OFF' />
+  <param name='LEGEND_BORDER' values = 'ON/OFF' />
+  <param name='LEGEND_BORDER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='LEGEND_BORDER_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='LEGEND_BORDER_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='LEGEND_BOX_MODE' values = 'AUTOMATIC/POSITIONAL' />
+  <param name='LEGEND_BOX_X_POSITION' />
+  <param name='LEGEND_BOX_Y_POSITION' />
+  <param name='LEGEND_BOX_X_LENGTH' />
+  <param name='LEGEND_BOX_Y_LENGTH' />
+  <param name='LEGEND_HISTOGRAM_BORDER' values = 'ON/OFF' />
+  <param name='LEGEND_HISTOGRAM_BORDER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='LEGEND_HISTOGRAM_MEAN_VALUE' values = 'ON/OFF' />
+  <param name='LEGEND_HISTOGRAM_MEAN_VALUE_MARKER' />
+  <param name='LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TA [...]
+  <param name='LEGEND_HISTOGRAM_MEAN_VALUE_MARKER_SIZE' />
+  <param name='LEGEND_HISTOGRAM_MAX_VALUE' values = 'ON/OFF' />
+  <param name='LEGEND_HISTOGRAM_GRID_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDI [...]
+  <param name='LEGEND_HISTOGRAM_GRID_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='LEGEND_HISTOGRAM_GRID_THICKNESS' />
+</function>
+<function name='msymb'>
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='SYMBOL_TYPE' values = 'NUMBER/TEXT/MARKER' />
+  <param name='SYMBOL_FORMAT' />
+  <param name='SYMBOL_TABLE_MODE' values = 'OFF/ADVANCED/ON' />
+  <param name='SYMBOL_MARKER_MODE' values = 'BY_INDEX/BY_NAME' />
+  <param name='SYMBOL_MARKER_INDEX' />
+  <param name='SYMBOL_MARKER_NAME' />
+  <param name='SYMBOL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUST/ [...]
+  <param name='SYMBOL_HEIGHT' />
+  <param name='SYMBOL_TEXT_LIST' />
+  <param name='SYMBOL_TEXT_POSITION' values = 'RIGHT/LEFT/BOTTOM/TOP' />
+  <param name='SYMBOL_TEXT_FONT_NAME' />
+  <param name='SYMBOL_TEXT_FONT_SIZE' />
+  <param name='SYMBOL_TEXT_FONT_STYLE' />
+  <param name='SYMBOL_TEXT_FONT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='SYMBOL_ADVANCED_TABLE_SELECTION_TYPE' values = 'COUNT/INTERVAL/LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_LEVEL_COUNT' />
+  <param name='SYMBOL_ADVANCED_TABLE_LEVEL_TOLERANCE' />
+  <param name='SYMBOL_ADVANCED_TABLE_INTERVAL' />
+  <param name='SYMBOL_ADVANCED_TABLE_REFERENCE_LEVEL' />
+  <param name='SYMBOL_ADVANCED_TABLE_LEVEL_LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_MIN_VALUE' />
+  <param name='SYMBOL_ADVANCED_TABLE_MAX_VALUE' />
+  <param name='SYMBOL_ADVANCED_TABLE_COLOUR_METHOD' values = 'CALCULATE/LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_MAX_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGE [...]
+  <param name='SYMBOL_ADVANCED_TABLE_MIN_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGE [...]
+  <param name='SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION' values = 'CLOCKWISE/ANTI-CLOCKWISE' />
+  <param name='SYMBOL_ADVANCED_TABLE_COLOUR_LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_COLOUR_LIST_POLICY' values = 'LASTONE/CYCLE' />
+  <param name='SYMBOL_ADVANCED_TABLE_MARKER_LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_MARKER_LIST_POLICY' values = 'LASTONE/CYCLE' />
+  <param name='SYMBOL_ADVANCED_TABLE_HEIGHT_METHOD' values = 'CALCULATE/LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_HEIGHT_MAX_VALUE' />
+  <param name='SYMBOL_ADVANCED_TABLE_HEIGHT_MIN_VALUE' />
+  <param name='SYMBOL_ADVANCED_TABLE_HEIGHT_LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_HEIGHT_LIST_POLICY' values = 'LASTONE/CYCLE' />
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_LIST' />
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_LIST_POLICY' values = 'LASTONE/CYCLE' />
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_FONT_NAME' />
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_FONT_SIZE' />
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_FONT_STYLE' />
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_FONT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGE [...]
+  <param name='SYMBOL_ADVANCED_TABLE_TEXT_DISPLAY_TYPE' values = 'CENTRE/NONE/RIGHT/LEFT/TOP/BOTTOM' />
+  <param name='SYMBOL_ADVANCED_TABLE_OUTLAYER_METHOD' values = 'NONE/SIMPLE' />
+  <param name='SYMBOL_MIN_TABLE' />
+  <param name='SYMBOL_MAX_TABLE' />
+  <param name='SYMBOL_MARKER_TABLE' />
+  <param name='SYMBOL_NAME_TABLE' />
+  <param name='SYMBOL_COLOUR_TABLE' />
+  <param name='SYMBOL_HEIGHT_TABLE' />
+  <param name='SYMBOL_OUTLINE' values = 'ON/OFF' />
+  <param name='SYMBOL_OUTLINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='SYMBOL_OUTLINE_THICKNESS' />
+  <param name='SYMBOL_OUTLINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='SYMBOL_CONNECT_LINE' values = 'ON/OFF' />
+  <param name='SYMBOL_CONNECT_AUTOMATIC_LINE_COLOUR' values = 'ON/OFF' />
+  <param name='SYMBOL_CONNECT_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH [...]
+  <param name='SYMBOL_CONNECT_LINE_THICKNESS' />
+  <param name='SYMBOL_CONNECT_LINE_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+</function>
+<function name='mtext'>
+  <param name='TEXT_LINE_COUNT' values = '0/1/2/3/4/5/6/7/8/9/10' />
+  <param name='TEXT_LINE_1' />
+  <param name='TEXT_LINE_2' />
+  <param name='TEXT_LINE_3' />
+  <param name='TEXT_LINE_4' />
+  <param name='TEXT_LINE_5' />
+  <param name='TEXT_LINE_6' />
+  <param name='TEXT_LINE_7' />
+  <param name='TEXT_LINE_8' />
+  <param name='TEXT_LINE_9' />
+  <param name='TEXT_LINE_10' />
+  <param name='TEXT_JUSTIFICATION' values = 'CENTRE/LEFT/RIGHT' />
+  <param name='TEXT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUST/PE [...]
+  <param name='TEXT_FONT' values = 'SERIF/SANSSERIF' />
+  <param name='TEXT_FONT_STYLE' values = 'NORMAL/BOLD/ITALIC/BOLDITALIC' />
+  <param name='TEXT_FONT_SIZE' />
+  <param name='TEXT_MODE' values = 'TITLE/POSITIONAL' />
+  <param name='TEXT_BOX_X_POSITION' />
+  <param name='TEXT_BOX_Y_POSITION' />
+  <param name='TEXT_BOX_X_LENGTH' />
+  <param name='TEXT_BOX_Y_LENGTH' />
+  <param name='TEXT_BOX_BLANKING' values = 'ON/OFF' />
+  <param name='TEXT_BORDER' values = 'ON/OFF' />
+  <param name='TEXT_BORDER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/ [...]
+  <param name='TEXT_BORDER_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='TEXT_BORDER_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+</function>
+<function name='mvertprofview'>
+  <param name='INPUT_MODE' values = 'POINT/NEAREST_GRIDPOINT/AREA/AREA_2' />
+  <param name='POINT' />
+  <param name='AREA' />
+  <param name='BOTTOM_PRESSURE' />
+  <param name='TOP_PRESSURE' />
+  <param name='PRESSURE_LEVEL_AXIS' values = 'LINEAR/LOG' />
+  <param name='PRESSURE_AXIS' />
+  <param name='VALUE_AXIS' />
+  <param name='MAP_OVERLAY_CONTROL' values = 'ALWAYS/BY_DATE/BY_LEVEL/NEVER' />
+  <param name='SUBPAGE_X_POSITION' />
+  <param name='SUBPAGE_Y_POSITION' />
+  <param name='SUBPAGE_X_LENGTH' />
+  <param name='SUBPAGE_Y_LENGTH' />
+  <param name='PAGE_FRAME' values = 'ON/OFF' />
+  <param name='PAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='PAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='PAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='PAGE_ID_LINE' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_TYPE' values = 'BOTH/LOGO_ONLY/ID_LINE_ONLY' />
+  <param name='PAGE_ID_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='PAGE_ID_LINE_SYSTEM_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_DATE_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT' />
+  <param name='PAGE_ID_LINE_ERRORS_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_LOGO_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_HEIGHT' />
+  <param name='PAGE_ID_LINE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='SUBPAGE_BACKGROUND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+</function>
+<function name='mwind'>
+  <param name='WIND_FIELD_TYPE' values = 'FLAGS/ARROWS' />
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='WIND_LEGEND_TEXT' />
+  <param name='WIND_ARROW_LEGEND_TEXT' />
+  <param name='WIND_ADVANCED_METHOD' values = 'ON/OFF' />
+  <param name='WIND_ADVANCED_COLOUR_SELECTION_TYPE' values = 'COUNT/INTERVAL/LIST' />
+  <param name='WIND_ADVANCED_COLOUR_REFERENCE_LEVEL' />
+  <param name='WIND_ADVANCED_COLOUR_LEVEL_COUNT' />
+  <param name='WIND_ADVANCED_COLOUR_LEVEL_TOLERANCE' />
+  <param name='WIND_ADVANCED_COLOUR_LEVEL_INTERVAL' />
+  <param name='WIND_ADVANCED_COLOUR_LEVEL_LIST' />
+  <param name='WIND_ADVANCED_COLOUR_MAX_VALUE' />
+  <param name='WIND_ADVANCED_COLOUR_MIN_VALUE' />
+  <param name='WIND_ADVANCED_COLOUR_TABLE_COLOUR_METHOD' values = 'CALCULATE/LIST' />
+  <param name='WIND_ADVANCED_COLOUR_MAX_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGER [...]
+  <param name='WIND_ADVANCED_COLOUR_MIN_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGER [...]
+  <param name='WIND_ADVANCED_COLOUR_DIRECTION' values = 'CLOCKWISE/ANTI_CLOCKWISE' />
+  <param name='WIND_ADVANCED_COLOUR_LIST' />
+  <param name='WIND_ADVANCED_COLOUR_LIST_POLICY' values = 'LASTONE/CYCLE' />
+  <param name='WIND_ADVANCED_COLOUR_PARAMETER' values = 'SPEED/PARAMETER' />
+  <param name='WIND_FLAG_CALM_INDICATOR' values = 'ON/OFF' />
+  <param name='WIND_FLAG_CALM_INDICATOR_SIZE' />
+  <param name='WIND_FLAG_CALM_BELOW' />
+  <param name='WIND_FLAG_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='WIND_FLAG_LENGTH' />
+  <param name='WIND_FLAG_MAX_SPEED' />
+  <param name='WIND_FLAG_MIN_SPEED' />
+  <param name='WIND_FLAG_MODE' />
+  <param name='WIND_FLAG_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='WIND_FLAG_ORIGIN_MARKER' values = 'DOT/CIRCLE/OFF' />
+  <param name='WIND_FLAG_ORIGIN_MARKER_SIZE' />
+  <param name='WIND_FLAG_THICKNESS' />
+  <param name='WIND_ARROW_CALM_INDICATOR' values = 'ON/OFF' />
+  <param name='WIND_ARROW_CALM_INDICATOR_SIZE' />
+  <param name='WIND_ARROW_CALM_BELOW' />
+  <param name='WIND_ARROW_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='WIND_ARROW_CROSS_BOUNDARY' values = 'ON/OFF' />
+  <param name='WIND_ARROW_HEAD_SHAPE' />
+  <param name='WIND_ARROW_HEAD_RATIO' />
+  <param name='WIND_ARROW_MAX_SPEED' />
+  <param name='WIND_ARROW_MIN_SPEED' />
+  <param name='WIND_ARROW_ORIGIN_POSITION' values = 'TAIL/CENTRE' />
+  <param name='WIND_ARROW_THICKNESS' />
+  <param name='WIND_ARROW_STYLE' values = 'SOLID/DASH/DOT/CHAIN_DASH/CHAIN_DOT' />
+  <param name='WIND_ARROW_UNIT_VELOCITY' />
+  <param name='WIND_THINNING_FACTOR' />
+</function>
+<function name='mxsectview'>
+  <param name='LINE' />
+  <param name='BOTTOM_PRESSURE' />
+  <param name='TOP_PRESSURE' />
+  <param name='WIND_PARALLEL' values = 'ON/OFF' />
+  <param name='WIND_PERPENDICULAR' values = 'ON/OFF' />
+  <param name='WIND_INTENSITY' values = 'ON/OFF' />
+  <param name='WIND_HORIZONTAL_COMPONENT' values = 'PERPENDICULAR/PARALLEL/INTENSITY' />
+  <param name='PRESSURE_LEVEL_AXIS' values = 'LINEAR/LOG' />
+  <param name='MAP_PROJECTION' values = 'cartesian' />
+  <param name='HORIZONTAL_AXIS' />
+  <param name='VERTICAL_AXIS' />
+  <param name='SUBPAGE_X_POSITION' />
+  <param name='SUBPAGE_Y_POSITION' />
+  <param name='SUBPAGE_X_LENGTH' />
+  <param name='SUBPAGE_Y_LENGTH' />
+  <param name='PAGE_FRAME' values = 'ON/OFF' />
+  <param name='PAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='PAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='PAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='PAGE_ID_LINE' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_TYPE' values = 'BOTH/LOGO_ONLY/ID_LINE_ONLY' />
+  <param name='PAGE_ID_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='PAGE_ID_LINE_SYSTEM_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_DATE_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_USER_TEXT' />
+  <param name='PAGE_ID_LINE_ERRORS_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_LOGO_PLOT' values = 'ON/OFF' />
+  <param name='PAGE_ID_LINE_HEIGHT' />
+  <param name='PAGE_ID_LINE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='SUBPAGE_BACKGROUND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+</function>
+<function name='netcdf_visualiser'>
+  <param name='NETCDF_PLOT_TYPE' values = 'GEO_POINTS/GEO_VECTORS/GEO_MATRIX/XY_POINTS/XY_MATRIX' />
+  <param name='NETCDF_FILENAME' values = 'OFF' />
+  <param name='NETCDF_DATA' />
+  <param name='NETCDF_LATITUDE_VARIABLE' />
+  <param name='NETCDF_LONGITUDE_VARIABLE' />
+  <param name='NETCDF_X_VARIABLE' />
+  <param name='NETCDF_Y_VARIABLE' />
+  <param name='NETCDF_VALUE_VARIABLE' />
+  <param name='NETCDF_DIMENSION_SETTING' />
+  <param name='NETCDF_X_COMPONENT_VARIABLE' />
+  <param name='NETCDF_Y_COMPONENT_VARIABLE' />
+  <param name='NETCDF_POSITION_TYPE' values = 'ARRAY/MATRIX' />
+  <param name='NETCDF_MISSING_ATTRIBUTE' />
+</function>
+<function name='obsfilter'>
+  <param name='DATA' />
+  <param name='OUTPUT' values = 'Bufr file/Geographical points/Geographical polar vectors/Geographical X Y vectors/CSV - Comma separated values' />
+  <param name='PARAMETER' values = '001001 - WMO BLOCK NUMBER/001002 - WMO STATION NUMBER/001007 - SATELLITE IDENTIFIER/004053 - Number of days with precipitation equal to or more than 1 mm/010003 - GEOPOTENTIAL/010004 - PRESSURE/010051 - PRESSURE REDUCED AT SEA LEVEL/011001 - WIND DIRECTION/011002 - WIND SPEED/011011 - WIND DIRECTION AT 10M/011012 - WIND SPEED AT 10M/011041 - Maximum wind speed in gusts/012001 - DRY BULB TEMPERATURE/012002 - WET BULB TEMPERATURE/012003 - DEW POINT TEMPE [...]
+  <param name='MISSING_DATA' values = 'IGNORE/INCLUDE' />
+  <param name='MISSING_DATA_VALUE' />
+  <param name='LEVEL' values = 'Surface/Single level/Layer/Occurrence/Descriptor Value/Descriptor Range' />
+  <param name='LEVEL_DESCRIPTOR' values = '007001 - HEIGHT OF STATION/007002 - HEIGHT/007003 - GEOPOTENTIAL/007004 - PRESSURE/007006 - HEIGHT ABOVE STATION/007061 - DEPTH BELOW LAND SURFACE/007062 - DEPTH BELOW SEA SURFACE/005042 - CHANNEL NUMBER/002150 - ATOVS-AVHRR CHANNEL NUMBER' />
+  <param name='FIRST_LEVEL' values = '1000/925/850/700/500/400/300/200/100/70/50/30/10' />
+  <param name='SECOND_LEVEL' values = '1000/925/850/700/500/400/300/200/100/70/50/30/10' />
+  <param name='OCCURRENCE_INDEX' />
+  <param name='OBSERVATION_TYPES' values = 'ANY - No filtering by type/LSD - Land surface data/SSD - Sea surface data/VSNS - Vertical soundings - nonsatellite/VSS - Vertical soundings - satellite/SLNS - Single level upper-air - nonsatellite/SLS - Single level upper-air - satellite/RD - Radar data/SF - Synoptic features/CC - Physical-chemical constituents/SDS - Surface data - satellite/RSM - Radiances - satellite measured/OD - Oceanographic data/Z - For other types use numeric code' />
+  <param name='OBSERVATION_SUBTYPES' values = 'ANY - No filtering by subtype/LSD - Synop land/LSD - Synop record 2 land/LSD - Synop auto land/LSD - Synop auto record 2 land/LSD - Soil and earth temperature/LSD - Metar/SSD - Synop ship abbreviated/SSD - Synop ship/SSD - Synop record 2 ship/SSD - Synop auto ship/SSD - Synop auto record 2 ship/SSD - SHRED/SSD - DRIBU SURFACE/SSD - BATHY SURFACE/SSD - TESAC SURFACE/SF - STORM/VSNS - Pilot land/VSNS - Pilot ship/VSNS - WIND PROFILE/VSNS - EUR [...]
+  <param name='DATE_AND_TIME_FROM' values = 'METADATA/DATA' />
+  <param name='DATE' values = 'ANY' />
+  <param name='TIME' values = 'ANY' />
+  <param name='RESOLUTION_IN_MINS' />
+  <param name='WMO_BLOCKS' values = 'ANY' />
+  <param name='WMO_STATIONS' values = 'ANY' />
+  <param name='LOCATION_FILTER' values = 'No Location Filter/AREA/CROSS SECTION LINE' />
+  <param name='AREA' />
+  <param name='LINE' />
+  <param name='DELTA_IN_KM' />
+  <param name='CUSTOM_FILTER' values = 'No Custom Filter/Filter by Value/Filter by Range/Filter by Exclude Range' />
+  <param name='CUSTOM_PARAMETER' values = '001001 - WMO BLOCK NUMBER/001002 - WMO STATION NUMBER/001007 - SATELLITE IDENTIFIER/004053 - Number of days with precipitation equal to or more than 1 mm/010003 - GEOPOTENTIAL/010004 - PRESSURE/010051 - PRESSURE REDUCED AT SEA LEVEL/011001 - WIND DIRECTION/011002 - WIND SPEED/011011 - WIND DIRECTION AT 10M/011012 - WIND SPEED AT 10M/011041 - Maximum wind speed in gusts/012001 - DRY BULB TEMPERATURE/012002 - WET BULB TEMPERATURE/012003 - DEW POIN [...]
+  <param name='CUSTOM_VALUES' />
+  <param name='FAIL_ON_ERROR' values = 'YES/NO' />
+  <param name='FAIL_ON_EMPTY_OUTPUT' values = 'YES/NO' />
+</function>
+<function name='obstat'>
+  <param name='first_cycle' />
+  <param name='last_cycle' />
+  <param name='expver_1' />
+  <param name='class_1' />
+  <param name='stream_1' />
+  <param name='expver_2' />
+  <param name='class_2' />
+  <param name='stream_2' />
+  <param name='all_data' values = 'ON/OFF' />
+  <param name='use_ecfs_log' values = 'ON/OFF' />
+  <param name='stat_def' />
+  <param name='user_params' />
+  <param name='user_flags' />
+  <param name='output_grib_dir' />
+  <param name='store_dir' />
+  <param name='exe_dir' />
+  <param name='lib_dir' />
+  <param name='data_dir' />
+  <param name='stdev' values = 'ON/OFF' />
+  <param name='stat_merge' />
+  <param name='stat_calc' values = 'ON/OFF' />
+  <param name='obs_format' values = 'ODB/BUFR/USER' />
+  <param name='odb_file_type' values = 'CCMA/ECMA/ODBCMP/MONDB' />
+  <param name='odb_datalist' values = 'AMSUA/AMSRE/AMSUA/AMSUB/CONV/GEOS/GPSRO/HIRS/IASI/MERIS/MHS/MWHS/MWTS/REO3/SATOB/SCATT/SSMI/SSMIS/SURF_CONV/TMI' />
+  <param name='retireve_odb' values = 'ON/OFF' />
+  <param name='obstat_plot' values = 'ON/OFF' />
+  <param name='coverage' values = 'ON/OFF' />
+  <param name='geogrib_average_period' values = 'ON/OFF' />
+  <param name='fovgrib_average_period' values = 'ON/OFF' />
+  <param name='scat_period' values = 'ON/OFF' />
+  <param name='comment' />
+  <param name='sta_calc' values = 'ON/OFF' />
+  <param name='sta_accum' values = 'ON/OFF' />
+  <param name='update_soft' values = 'ON/OFF' />
+  <param name='feedback_clean' values = 'ON/OFF' />
+  <param name='sta_clean' values = 'ON/OFF' />
+  <param name='sta_plot' values = 'ON/OFF' />
+  <param name='sql_section' />
+</function>
+<function name='odb_filter'>
+  <param name='ODB_OUTPUT' values = 'ODB' />
+  <param name='ODB_FILENAME' values = 'OFF' />
+  <param name='ODB_DATA' />
+  <param name='ODB_QUERY' />
+  <param name='ODB_NB_ROWS' />
+</function>
+<function name='odb_visualiser'>
+  <param name='ODB_PLOT_TYPE' values = 'GEO_POINTS/GEO_VECTORS/XY_POINTS/XY_VECTORS/XY_BINNING' />
+  <param name='ODB_FILENAME' values = 'OFF' />
+  <param name='ODB_DATA' />
+  <param name='ODB_X_TYPE' values = 'NUMBER/DATE' />
+  <param name='ODB_Y_TYPE' values = 'NUMBER/DATE' />
+  <param name='ODB_X_VARIABLE' />
+  <param name='ODB_Y_VARIABLE' />
+  <param name='ODB_LATITUDE_VARIABLE' />
+  <param name='ODB_LONGITUDE_VARIABLE' />
+  <param name='ODB_X_COMPONENT_VARIABLE' />
+  <param name='ODB_Y_COMPONENT_VARIABLE' />
+  <param name='ODB_VALUE_VARIABLE' />
+  <param name='ODB_METADATA_VARIABLES' values = 'ALL' />
+  <param name='ODB_PARAMETERS' />
+  <param name='ODB_FROM' />
+  <param name='ODB_WHERE' />
+  <param name='ODB_ORDERBY' />
+  <param name='ODB_NB_ROWS' />
+  <param name='ODB_COORDINATES_UNIT' values = 'DEGREES/RADIANS' />
+  <param name='ODB_BINNING' />
+</function>
+<function name='opera_radar_filter'>
+  <param name='DATA' />
+  <param name='OUTPUT' values = 'Geographical points' />
+  <param name='MISSING_DATA' values = 'IGNORE/INCLUDE' />
+  <param name='MISSING_DATA_VALUE' />
+  <param name='FAIL_ON_ERROR' values = 'YES/NO' />
+</function>
+<function name='option_menu'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='source' />
+  <param name='exclusive' values = 'true' />
+  <param name='beautify' values = 'true/false' />
+</function>
+<function name='output'>
+</function>
+<function name='overlay_control'>
+  <param name='OVERLAY_MODE' values = 'CHECK_SETTINGS/ALWAYS_OVERLAY/NEVER_OVERLAY' />
+  <param name='OVERLAY_DATE' values = 'ON/OFF' />
+  <param name='OVERLAY_TIME' values = 'ON/OFF' />
+  <param name='OVERLAY_LEVEL' values = 'ON/OFF' />
+  <param name='OVERLAY_AREA' values = 'ON/OFF' />
+  <param name='OBS_GROUPING_TIME_FROM' values = 'METADATA/DATA' />
+  <param name='OBS_GROUPING_PERIOD' />
+  <param name='OBS_GROUPING_PERIOD_START_MIN' />
+</function>
+<function name='paxis'>
+  <param name='AXIS_TYPE' values = 'REGULAR/LOGARITHMIC/DATE/POSITION_LIST' />
+  <param name='AXIS_MIN_VALUE' values = 'AUTO' />
+  <param name='AXIS_MAX_VALUE' values = 'AUTO' />
+  <param name='AXIS_DATE_MIN_VALUE' />
+  <param name='AXIS_DATE_MAX_VALUE' />
+  <param name='AXIS_ORIENTATION' values = 'HORIZONTAL/VERTICAL' />
+  <param name='AXIS_POSITION' values = 'TOP/BOTTOM/LEFT/RIGHT/POSITIONAL' />
+  <param name='AXIS_LINE' values = 'ON/OFF' />
+  <param name='AXIS_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='AXIS_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='AXIS_LINE_POSITION' />
+  <param name='AXIS_TITLE' values = 'ON/OFF' />
+  <param name='AXIS_TITLE_ORIENTATION' values = 'HORIZONTAL/VERTICAL/PARALLEL' />
+  <param name='AXIS_TITLE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='AXIS_TITLE_HEIGHT' />
+  <param name='AXIS_TITLE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_TITLE_TEXT' />
+  <param name='AXIS_TIP_TITLE' values = 'ON/OFF' />
+  <param name='AXIS_TIP_TITLE_ORIENTATION' values = 'HORIZONTAL/VERTICAL/PARALLEL' />
+  <param name='AXIS_TIP_TITLE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='AXIS_TIP_TITLE_HEIGHT' />
+  <param name='AXIS_TIP_TITLE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_TIP_TITLE_TEXT' />
+  <param name='AXIS_TICK' values = 'ON/OFF' />
+  <param name='AXIS_TICK_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='AXIS_TICK_SIZE' />
+  <param name='AXIS_TICK_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='AXIS_TICK_POSITIONING' values = 'REGULAR/LOGARITHMIC/HOURS/DAYS/MONTHS/YEARS/POSITION_LIST' />
+  <param name='AXIS_TICK_INTERVAL' />
+  <param name='AXIS_TICK_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_TICK_LABEL_ORIENTATION' values = 'HORIZONTAL/VERTICAL/PARALLEL' />
+  <param name='AXIS_TICK_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='AXIS_TICK_LABEL_HEIGHT' />
+  <param name='AXIS_TICK_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_TICK_LABEL_POSITION' values = 'ON_TICK/INTER_TICK' />
+  <param name='AXIS_TICK_LABEL_FIRST' values = 'ON/OFF' />
+  <param name='AXIS_TICK_LABEL_LAST' values = 'ON/OFF' />
+  <param name='AXIS_TICK_LABEL_TYPE' values = 'LABEL_LIST/NUMBER/LATITUDE/LONGITUDE' />
+  <param name='AXIS_TICK_LABEL_LIST' />
+  <param name='AXIS_TICK_LABEL_FORMAT' />
+  <param name='AXIS_TICK_LABEL_FREQUENCY' />
+  <param name='AXIS_TICK_POSITION_LIST' />
+  <param name='AXIS_TICK_LABEL_UNITS' values = 'USER/CM' />
+  <param name='AXIS_MINOR_TICK' values = 'ON/OFF' />
+  <param name='AXIS_MINOR_TICK_COUNT' />
+  <param name='AXIS_MINOR_TICK_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='AXIS_MINOR_TICK_SIZE' />
+  <param name='AXIS_MINOR_TICK_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='AXIS_MINOR_TICK_MIN_GAP' />
+  <param name='AXIS_BASE_DATE' />
+  <param name='AXIS_DATE_TYPE' values = 'YEARS/MONTHS/DAYS/HOURS' />
+  <param name='AXIS_HOURS_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_HOURS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='AXIS_HOURS_LABEL_HEIGHT' />
+  <param name='AXIS_HOURS_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_DAYS_LABEL' values = 'DAY/NUMBER/BOTH/OFF' />
+  <param name='AXIS_DAYS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='AXIS_DAYS_LABEL_HEIGHT' />
+  <param name='AXIS_DAYS_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_DAYS_LABEL_COMPOSITION' values = 'ONE/THREE/FULL' />
+  <param name='AXIS_MONTHS_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_MONTHS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_O [...]
+  <param name='AXIS_MONTHS_LABEL_HEIGHT' />
+  <param name='AXIS_MONTHS_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_MONTHS_LABEL_COMPOSITION' values = 'ONE/THREE/FULL' />
+  <param name='AXIS_YEARS_LABEL' values = 'ON/OFF' />
+  <param name='AXIS_YEARS_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='AXIS_YEARS_LABEL_HEIGHT' />
+  <param name='AXIS_YEARS_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='AXIS_GRID' values = 'ON/OFF' />
+  <param name='AXIS_GRID_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='AXIS_GRID_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='AXIS_GRID_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='AXIS_GRID_POSITIONING' values = 'POSITIONAL/AUTOMATIC' />
+  <param name='AXIS_DATE_GRID_POSITIONING' values = 'POSITIONAL/AUTOMATIC' />
+  <param name='AXIS_GRID_POSITION_LIST' />
+  <param name='AXIS_DATE_GRID_POSITION_LIST' />
+</function>
+<function name='pcoast'>
+  <param name='SUBPAGE_FRAME' values = 'ON/OFF' />
+  <param name='SUBPAGE_FRAME_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='SUBPAGE_FRAME_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='SUBPAGE_FRAME_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='MAP_COASTLINE' values = 'ON/OFF' />
+  <param name='MAP_COASTLINE_RESOLUTION' values = 'LOW/MEDIUM/HIGH' />
+  <param name='MAP_COASTLINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='MAP_COASTLINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='MAP_COASTLINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='MAP_GRID' values = 'ON/OFF' />
+  <param name='MAP_GRID_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='MAP_GRID_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='MAP_GRID_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUS [...]
+  <param name='MAP_GRID_LATITUDE_REFERENCE' />
+  <param name='MAP_GRID_LONGITUDE_REFERENCE' />
+  <param name='MAP_GRID_LATITUDE_INCREMENT' />
+  <param name='MAP_GRID_LONGITUDE_INCREMENT' />
+  <param name='MAP_LABEL' values = 'ON/OFF' />
+  <param name='MAP_LABEL_LATITUDE_FREQUENCY' />
+  <param name='MAP_LABEL_LONGITUDE_FREQUENCY' />
+  <param name='MAP_LABEL_HEIGHT' />
+  <param name='MAP_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='MAP_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='MAP_COASTLINE_LAND_SHADE' values = 'ON/OFF' />
+  <param name='MAP_COASTLINE_LAND_SHADE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RE [...]
+  <param name='MAP_COASTLINE_SEA_SHADE' values = 'ON/OFF' />
+  <param name='MAP_COASTLINE_SEA_SHADE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='MAP_COASTLINE_PATH' />
+</function>
+<function name='pcont'>
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='LEGEND_USER_TEXT' />
+  <param name='LEGEND_ENTRY' />
+  <param name='CONTOUR_METHOD' values = 'CONICON/LINEAR/C3' />
+  <param name='CONTOUR_DATA_TRANSFORMATION' values = 'NORMAL/ISOTACHS' />
+  <param name='INPUT_FIELD_ORGANIZATION' values = 'REGULAR/FITTED/GAUSSIAN' />
+  <param name='CONTOUR' values = 'ON/OFF' />
+  <param name='CONTOUR_MIN_LEVEL' />
+  <param name='CONTOUR_MAX_LEVEL' />
+  <param name='CONTOUR_LEVEL_SELECTION_TYPE' values = 'COUNT/INTERVAL/LEVEL_LIST' />
+  <param name='CONTOUR_LEVEL_COUNT' />
+  <param name='CONTOUR_LEVEL_LIST' />
+  <param name='CONTOUR_INTERVAL' />
+  <param name='CONTOUR_MISSING_VALUES_PRESENT' values = 'ON/OFF' />
+  <param name='CONTOUR_REFERENCE_LEVEL' />
+  <param name='CONTOUR_SHADE' values = 'ON/OFF' />
+  <param name='CONTOUR_SHADE_TECHNIQUE' values = 'POLYGON_SHADING/CELL_SHADING/MARKER/GRID_SHADING' />
+  <param name='CONTOUR_SHADE_REDUCTION_METHOD' values = 'PRE_CALCULATION/POST_CALCULATION/NONE' />
+  <param name='CONTOUR_SHADE_MIN_LEVEL' />
+  <param name='CONTOUR_SHADE_MAX_LEVEL' />
+  <param name='CONTOUR_SHADE_COLOUR_METHOD' values = 'CALCULATE/LIST' />
+  <param name='CONTOUR_SHADE_MIN_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='CONTOUR_SHADE_MAX_LEVEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='CONTOUR_SHADE_COLOUR_DIRECTION' values = 'ANTI_CLOCKWISE/CLOCKWISE' />
+  <param name='CONTOUR_SHADE_COLOUR_LIST' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_SHADE_COLOUR_TABLE' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH [...]
+  <param name='CONTOUR_SHADE_HEIGHT_TABLE' />
+  <param name='CONTOUR_SHADE_MARKER_TABLE' values = '0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20' />
+  <param name='CONTOUR_SHADE_METHOD' values = 'DOT/HATCH/AREA_FILL' />
+  <param name='CONTOUR_SHADE_DOT_METHOD' values = 'OLD/NEW' />
+  <param name='CONTOUR_SHADE_DOT_SIZE' />
+  <param name='CONTOUR_SHADE_ANGLE' />
+  <param name='CONTOUR_SHADE_MIN_LEVEL_DENSITY' />
+  <param name='CONTOUR_SHADE_MAX_LEVEL_DENSITY' />
+  <param name='CONTOUR_SHADE_HATCH_THICKNESS' />
+  <param name='CONTOUR_SHADE_HATCH_DENSITY' />
+  <param name='CONTOUR_SHADE_HATCH_INDEX' />
+  <param name='CONTOUR_SHADE_CELL_METHOD' values = 'INTERPOLATE/NEAREST' />
+  <param name='CONTOUR_SHADE_CELL_RESOLUTION' />
+  <param name='CONTOUR_SHADE_LABEL_BLANKING' values = 'ON/OFF' />
+  <param name='CONTOUR_LINE_PLOTTING' values = 'NOT_SPLIT/SPLIT' />
+  <param name='CONTOUR_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='CONTOUR_HIGHLIGHT' values = 'ON/OFF' />
+  <param name='CONTOUR_HIGHLIGHT_FREQUENCY' />
+  <param name='CONTOUR_HIGHLIGHT_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_HIGHLIGHT_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_HIGHLIGHT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_O [...]
+  <param name='CONTOUR_SPLIT_LEVEL' />
+  <param name='CONTOUR_BELOW_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_BELOW_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_BELOW_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_BELOW_HIGHLIGHT_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_BELOW_HIGHLIGHT_THICKNES' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_BELOW_HIGHLIGHT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='CONTOUR_SPLIT_LINE_PLOT' values = 'ON/OFF' />
+  <param name='CONTOUR_SPLIT_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_SPLIT_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_SPLIT_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_ABOVE_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_ABOVE_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_ABOVE_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_ABOVE_HIGHLIGHT_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='CONTOUR_ABOVE_HIGHLIGHT_THICKNES' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='CONTOUR_ABOVE_HIGHLIGHT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/RED [...]
+  <param name='CONTOUR_LABEL' values = 'ON/OFF' />
+  <param name='CONTOUR_LABEL_FREQUENCY' />
+  <param name='CONTOUR_LABEL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='CONTOUR_LABEL_HEIGHT' />
+  <param name='CONTOUR_LABEL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='CONTOUR_LABEL_TYPE' values = 'NUMBER/TEXT/BOTH' />
+  <param name='CONTOUR_LABEL_FORMAT' />
+  <param name='CONTOUR_LABEL_TEXT' />
+  <param name='CONTOUR_HILO' values = 'ON/OFF/HI/LO' />
+  <param name='CONTOUR_HILO_MIN_VALUE' />
+  <param name='CONTOUR_HILO_MAX_VALUE' />
+  <param name='CONTOUR_HILO_SUPPRESS_RADIUS' />
+  <param name='CONTOUR_HILO_REDUCTION_RADIUS' />
+  <param name='CONTOUR_LO_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='CONTOUR_HI_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='CONTOUR_LO_MIN_VALUE' />
+  <param name='CONTOUR_LO_MAX_VALUE' />
+  <param name='CONTOUR_HI_MIN_VALUE' />
+  <param name='CONTOUR_HI_MAX_VALUE' />
+  <param name='CONTOUR_HILO_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='CONTOUR_HILO_HEIGHT' />
+  <param name='CONTOUR_HILO_TYPE' values = 'NUMBER/TEXT/BOTH' />
+  <param name='CONTOUR_HILO_FORMAT' />
+  <param name='CONTOUR_LO_TEXT' />
+  <param name='CONTOUR_HI_TEXT' />
+  <param name='CONTOUR_HILO_MARKER' values = 'ON/OFF' />
+  <param name='CONTOUR_HILO_MARKER_INDEX' values = '1/2/3/4/5' />
+  <param name='CONTOUR_HILO_MARKER_HEIGHT' />
+  <param name='CONTOUR_HILO_POSITION_WRITE' values = 'ON/OFF' />
+  <param name='CONTOUR_HILO_POSITION_FILE_NAME' />
+  <param name='CONTOUR_GRID_VALUE_PLOT' values = 'ON/OFF' />
+  <param name='CONTOUR_GRID_VALUE_PLOT_TYPE' values = 'VALUE/MARKER/BOTH' />
+  <param name='CONTOUR_GRID_VALUE_TYPE' values = 'NORMAL/REDUCED' />
+  <param name='CONTOUR_GRID_VALUE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='CONTOUR_GRID_VALUE_FORMAT' />
+  <param name='CONTOUR_GRID_VALUE_HEIGHT' />
+  <param name='CONTOUR_GRID_VALUE_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_PLOT' values = 'ON/OFF' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/R [...]
+  <param name='CONTOUR_GRID_VALUE_MARKER_INDEX' values = '1/2/3/4/5' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_HEIGHT' />
+  <param name='CONTOUR_GRID_VALUE_MARKER_QUAL' values = 'LOW/MEDIUM/HIGH' />
+  <param name='CONTOUR_GRID_VALUE_MIN' />
+  <param name='CONTOUR_GRID_VALUE_MAX' />
+  <param name='CONTOUR_GRID_VALUE_LAT_FREQUENCY' />
+  <param name='CONTOUR_GRID_VALUE_LON_FREQUENCY' />
+  <param name='INPUT_FIELD_GRADIENT_CONTROL' values = 'LEAST/FLAT_ONLY/OFF' />
+  <param name='INPUT_FIELD_GRADIENT_LIMITATION' values = 'MINIMUM/MAXIMUM/BOTH/OFF' />
+  <param name='INPUT_FIELD_SUPPRESS_ABOVE' />
+  <param name='INPUT_FIELD_SUPPRESS_BELOW' />
+  <param name='GRIB_SPECTRAL_RESOLUTION' />
+  <param name='GRIB_SCALING_OF_RETRIEVED_FIELDS' values = 'ON/OFF' />
+  <param name='GRIB_SCALING_OF_DERIVED_FIELDS' values = 'ON/OFF' />
+  <param name='GRIB_SCALING' values = 'ON/OFF' />
+  <param name='GRIB_MISSING_VALUE_INDICATOR' />
+  <param name='GRIB_TEXT' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_SPLIT' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_UNITS' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_EXPERIMENT' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_PLOT_TYPE' values = 'ON/OFF' />
+  <param name='GRIB_SUBAREA_EXTRACTION' values = 'ON/OFF' />
+  <param name='DYNAMIC_MEMORY_ALLOCATION_FACTOR' />
+</function>
+<function name='pdf_output'>
+  <param name='OUTPUT_TITLE' />
+  <param name='OUTPUT_WIDTH' />
+  <param name='OUTPUT_RESOLUTION' />
+  <param name='OUTPUT_NAME' />
+  <param name='OUTPUT_NAME_FIRST_PAGE_NUMBER' values = 'ON/OFF' />
+  <param name='OUTPUT_FULLNAME' />
+  <param name='OUTPUT_LEGACY_NAME' />
+  <param name='OUTPUT_FILE_MINIMAL_WIDTH' />
+  <param name='OUTPUT_FILE_SEPARATOR' />
+  <param name='OUTPUT_DEBUG' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST_NAME' />
+  <param name='OUTPUT_CAIRO_TRANSPARENT_BACKGROUND' />
+  <param name='OUTPUT_CAIRO_ANTIALIAS' />
+  <param name='CLASS' />
+</function>
+<function name='percentile'>
+  <param name='SOURCE' values = 'OFF' />
+  <param name='DATA' />
+  <param name='PERCENTILES' />
+  <param name='INTERPOLATION' values = 'NEAREST_NEIGHBOUR/LINEAR' />
+</function>
+<function name='pgraph'>
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='LEGEND_USER_TEXT' />
+  <param name='LEGEND_ENTRY' />
+  <param name='GRAPH_POSITION_MODE' values = 'AXIS/GEOGRAPHIC/PAPER' />
+  <param name='GRAPH_TYPE' values = 'CURVE/BAR/AREA' />
+  <param name='GRAPH_CURVE_METHOD' values = 'STRAIGHT/ROUNDED' />
+  <param name='GRAPH_LINE' values = 'ON/OFF' />
+  <param name='GRAPH_LINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='GRAPH_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='GRAPH_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='GRAPH_BLANKING' values = 'ON/OFF' />
+  <param name='GRAPH_BLANKING_GAP' />
+  <param name='GRAPH_SYMBOL' values = 'ON/OFF' />
+  <param name='GRAPH_SYMBOL_HEIGHT' />
+  <param name='GRAPH_SYMBOL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='GRAPH_SYMBOL_MARKER_INDEX' />
+  <param name='GRAPH_MISSING_DATA_MODE' values = 'IGNORE/JOIN/DROP' />
+  <param name='GRAPH_MISSING_DATA_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='GRAPH_MISSING_DATA_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='GRAPH_MISSING_DATA_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='GRAPH_BAR_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='GRAPH_BAR_WIDTH' />
+  <param name='GRAPH_BAR_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='GRAPH_BAR_LINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='GRAPH_SHADE' values = 'ON/OFF' />
+  <param name='GRAPH_SHADE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/ [...]
+  <param name='GRAPH_SHADE_STYLE' values = 'DOT/HATCH/AREA_FILL' />
+  <param name='GRAPH_SHADE_DENSITY' />
+  <param name='GRAPH_SHADE_DOT_SIZE' />
+  <param name='GRAPH_SHADE_HATCH_INDEX' />
+  <param name='GRAPH_SHADE_HATCH_THICKNESS' />
+  <param name='GRAPH_SHADE_HATCH_DENSITY' />
+  <param name='GRAPH_X_SUPPRESS_BELOW' />
+  <param name='GRAPH_X_SUPPRESS_ABOVE' />
+  <param name='GRAPH_DATE_X_SUPPRESS_BELOW' />
+  <param name='GRAPH_DATE_X_SUPPRESS_ABOVE' />
+  <param name='GRAPH_Y_SUPPRESS_BELOW' />
+  <param name='GRAPH_Y_SUPPRESS_ABOVE' />
+</function>
+<function name='plot_page'>
+  <param name='TOP' />
+  <param name='BOTTOM' />
+  <param name='LEFT' />
+  <param name='RIGHT' />
+  <param name='ROWS' values = '1/2/3/4/5' />
+  <param name='COLUMNS' values = '1/2/3/4/5' />
+  <param name='PAGE_X_GAP' />
+  <param name='PAGE_Y_GAP' />
+  <param name='VIEW' />
+  <param name='SUB_PAGES' />
+</function>
+<function name='plot_subpage'>
+  <param name='TOP' />
+  <param name='BOTTOM' />
+  <param name='LEFT' />
+  <param name='RIGHT' />
+</function>
+<function name='png_output'>
+  <param name='OUTPUT_TITLE' />
+  <param name='OUTPUT_WIDTH' />
+  <param name='OUTPUT_RESOLUTION' />
+  <param name='OUTPUT_NAME' />
+  <param name='OUTPUT_NAME_FIRST_PAGE_NUMBER' values = 'ON/OFF' />
+  <param name='OUTPUT_FULLNAME' />
+  <param name='OUTPUT_LEGACY_NAME' />
+  <param name='OUTPUT_FILE_MINIMAL_WIDTH' />
+  <param name='OUTPUT_FILE_SEPARATOR' />
+  <param name='OUTPUT_DEBUG' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST_NAME' />
+  <param name='OUTPUT_CAIRO_TRANSPARENT_BACKGROUND' />
+  <param name='OUTPUT_CAIRO_ANTIALIAS' />
+  <param name='CLASS' />
+</function>
+<function name='pobs'>
+  <param name='OBS_TYPE_LIST' values = 'SYNOP/AIREP/SATOB/DRIBU/TEMP/PILOT/SATEM/SOILT' />
+  <param name='OBS_CODE_TYPE_LIST' values = 'LSD Synop land - S/LSD Synop record 2 land - S2/LSD Synop auto land - SA/LSD Synop auto record 2 land - SA2/SSD Synop ship abbreviated - SAB/SSD Synop ship - SS/SSD Synop record 2 ship -SS2/SSD Synop auto ship - SAS/SSD Synop auto record 2 ship - SAS2/VSNS Pilot land - P/VSNS Pilot ship - PS/VSNS Temp land - T/VSNS Temp ship - TS/VSNS Temp drop - TD/VSNS Rocob land - R/VSNS Rocob ship - RS/VSS High resolution - HR/VSS Satem mean temp - SMT/VSS [...]
+  <param name='OBS_IDENTIFIER_LIST' />
+  <param name='OBS_SATELLITE_NUMBER_LIST' values = '001 ERS-1 SCAT/002 ERS-2 SCAT/003 Meteosat 3/004 Meteosat 4/005 Meteosat 5/025 Meteosat 5 WV/045 Meteosat 5 VIS/055 Meteosat 5 WV EXP/031 Meteosat 5 IR/033 Meteosat 5 VIS/035 Meteosat 5 WV/040 Meteosat 5 HVIS/104 Himawari 4 IR/144 Himawari 4 VIS/105 Himawari 5 IR/125 Himawari 5 WV/145 Himawari 5 VIS/200 Goes/252 Goes 8 IR/253 Goes 9 IR/272 Goes 8 WV/273 Goes 9 WV/280 NSCAT/281 QuikSCAT/282 Goes 8 COMB/283 Goes 9 COMB/292 Goes 8 VIS/293  [...]
+  <param name='OBS_CONFIDENCE_CHECK' values = 'ON/OFF' />
+  <param name='OBS_CONFIDENCE_PARAMETER' values = 'ANY/DEWPOINT/HEIGHT/POSITION/PRESSURE/TEMPERATURE/WIND' />
+  <param name='OBS_CONFIDENCE_LEVEL' />
+  <param name='OBS_DATE_CHECK' values = 'ON/OFF' />
+  <param name='OBS_DATE' />
+  <param name='OBS_DATE_TOLERANCE' />
+  <param name='OBS_TIME_CHECK' values = 'ON/OFF' />
+  <param name='OBS_TIME' />
+  <param name='OBS_TIME_TOLERANCE' />
+  <param name='OBS_IDENTIFICATION' values = 'ON/OFF' />
+  <param name='OBS_IDENTIFICATION_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_IDENTIFICATION_TYPE' values = 'STATION_IDENTIFIER/CODE_TYPE/OBSERVATION_TYPE' />
+  <param name='OBS_DISTANCE_APART' />
+  <param name='OBS_SIZE' />
+  <param name='OBS_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='OBS_ROTATION' values = 'ON/OFF' />
+  <param name='OBS_POSITION_ONLY' values = 'ON/OFF' />
+  <param name='OBS_STATION_RING' values = 'ON/OFF' />
+  <param name='OBS_STATION_RING_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='OBS_WIND' values = 'ON/OFF' />
+  <param name='OBS_WIND_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUS [...]
+  <param name='OBS_WIND_FLAG_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='OBS_WIND_FLAG_STYLE' values = 'SOLID/DASH/DOT' />
+  <param name='OBS_PRESSURE' values = 'ON/OFF' />
+  <param name='OBS_UPPER_AIR_PRESSURE' values = 'ON/OFF' />
+  <param name='OBS_PRESSURE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='OBS_TEMPERATURE' values = 'ON/OFF' />
+  <param name='OBS_TEMPERATURE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='OBS_SEA_SURFACE_TEMPERATURE' values = 'ON/OFF' />
+  <param name='OBS_SEA_SURFACE_TEMP_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDIS [...]
+  <param name='OBS_PRESSURE_TENDENCY' values = 'ON/OFF' />
+  <param name='OBS_PRESSURE_TENDENCY_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDI [...]
+  <param name='OBS_PRESENT_WEATHER' values = 'ON/OFF' />
+  <param name='OBS_PRESENT_WEATHER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH [...]
+  <param name='OBS_PAST_WEATHER' values = 'ON/OFF' />
+  <param name='OBS_PAST_WEATHER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='OBS_VISIBILITY' values = 'ON/OFF' />
+  <param name='OBS_VISIBILITY_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='OBS_DEWPOINT' values = 'ON/OFF' />
+  <param name='OBS_DEWPOINT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='OBS_TIME_PLOT' values = 'ON/OFF' />
+  <param name='OBS_TIME_PLOT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='OBS_CLOUD' values = 'ON/OFF' />
+  <param name='OBS_CLOUD_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='OBS_LOW_CLOUD' values = 'ON/OFF' />
+  <param name='OBS_LOW_CLOUD_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='OBS_MEDIUM_CLOUD' values = 'ON/OFF' />
+  <param name='OBS_MEDIUM_CLOUD_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_OR [...]
+  <param name='OBS_HIGH_CLOUD' values = 'ON/OFF' />
+  <param name='OBS_HIGH_CLOUD_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='OBS_CLOUD_8_GROUPS' values = 'ON/OFF' />
+  <param name='OBS_CLOUD_8_GROUPS_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_LEVEL' values = '1000/925/850/700/500/400/300/200/100/70/50/30/10' />
+  <param name='OBS_LEVEL_2' values = '1000/925/850/700/500/400/300/200/100/70/50/30/10' />
+  <param name='OBS_LEVEL_TOLERANCE' />
+  <param name='OBS_THERMAL_WIND' values = 'ON/OFF' />
+  <param name='OBS_THERMAL_WIND_LINE_STYLE' values = 'SOLID/DASH/DOT' />
+  <param name='OBS_THETA' values = 'ON/OFF' />
+  <param name='OBS_THETA_TYPE' values = 'RELATIVE_HUMIDITY/HUMIDITIY_MIXING_RATIO/POTENTIAL_TEMPERATURE/WATER_PRECIPITABLE/PSEUDO_POTENTIAL_TEMPERATURE/WET_BULB_POTENTIAL_TEMPERATURE' />
+  <param name='OBS_THETA_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='OBS_THICKNESS' values = 'ON/OFF' />
+  <param name='OBS_THICKNESS_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='OBS_SATEM_TEMPERATURE' values = 'ON/OFF' />
+  <param name='OBS_WATER_PRECIPITABLE' values = 'ON/OFF' />
+  <param name='OBS_WATER_PRECIPITABLE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDD [...]
+  <param name='OBS_SHIP_DIRECTION' values = 'ON/OFF' />
+  <param name='OBS_SHIP_DIRECTION_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_SHIP_SPEED' values = 'ON/OFF' />
+  <param name='OBS_SHIP_SPEED_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORAN [...]
+  <param name='OBS_WAVES' values = 'ON/OFF' />
+  <param name='OBS_WAVES_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='OBS_HEIGHT' values = 'ON/OFF' />
+  <param name='OBS_HEIGHT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='OBS_SOIL_TEMPERATURE_LEVEL_1' values = 'ON/OFF' />
+  <param name='OBS_SOIL_TEMPERATURE_LEVEL_2' values = 'ON/OFF' />
+  <param name='OBS_SOIL_TEMPERATURE_LEVEL_3' values = 'ON/OFF' />
+  <param name='OBS_SOIL_TEMPERATURE_LEVEL_4' values = 'ON/OFF' />
+  <param name='OBS_SOIL_TEMPERATURE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDIS [...]
+  <param name='OBS_STATION_HEIGHT' values = 'ON/OFF' />
+  <param name='OBS_STATION_HEIGHT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_FB' values = 'OFF/3DVAR/4DVAR' />
+  <param name='OBS_FB_LEGEND' values = 'ON/OFF' />
+  <param name='OBS_FB_TYPE' values = 'REJECT_REPORT/REJECT_VARIABLES/FLAGGED_BUT_USED/USED/NOT_USED/BLACKLIST_REPORT/BLACKLIST_VARIABLES/ALL' />
+  <param name='OBS_FB_STATION_RING_HEIGHT' />
+  <param name='OBS_FB_MIN_ERROR_FLAG' values = '1/2/3' />
+  <param name='OBS_FB_ERROR_FLAG0_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_FB_ERROR_FLAG1_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_FB_ERROR_FLAG2_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_FB_ERROR_FLAG3_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ [...]
+  <param name='OBS_FB_SOURCE' values = 'ON/OFF' />
+  <param name='OBS_FB_SOURCE_TYPE' values = 'RDB/ML/FG/AN/DP/3D/4D/BL/ALL' />
+  <param name='OBS_FB_LEVEL' values = '1000/925/850/700/500/400/300/200/100/70/50/30/10' />
+  <param name='OBS_FB_LEVEL_2' values = '1000/925/850/700/500/400/300/200/100/70/50/30/10' />
+  <param name='OBS_FB_LEVEL_TOLERANCE_ABOVE' />
+  <param name='OBS_FB_LEVEL_TOLERANCE_BELOW' />
+  <param name='OBS_FB_DEPARTURES' values = 'ON/OFF' />
+  <param name='OBS_FB_DEPARTURES_TYPE' values = 'FG/AN/IA/OBS-FG/OBS-FG2/OBS-FG3/OBS-AN' />
+  <param name='OBS_FB_SUBSTITUTES' values = 'ON/OFF' />
+  <param name='OBS_FB_HEIGHT' values = 'ON/OFF' />
+  <param name='OBS_FB_PRESSURE' values = 'ON/OFF' />
+  <param name='OBS_FB_RELATIVE_HUMIDITY' values = 'ON/OFF' />
+  <param name='OBS_FB_SPECIFIC_HUMIDITY' values = 'ON/OFF' />
+  <param name='OBS_FB_TEMPERATURE' values = 'ON/OFF' />
+  <param name='OBS_FB_WIND' values = 'ON/OFF' />
+  <param name='OBS_FB_WIND_FLAG_LENGTH' />
+  <param name='OBS_FB_RADIANCES' values = 'ON/OFF' />
+  <param name='OBS_FB_RADIANCES_TYPE' values = '1DVAR/3DVAR/4DVAR' />
+  <param name='OBS_FB_RADIANCES_CHANNEL_NUMBER' values = '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27' />
+  <param name='OBS_FB_RADIANCES_CHANNEL_PLOT' values = 'ON/OFF' />
+  <param name='OBS_FB_RADIANCES_DEPARTURES' values = 'ON/OFF' />
+  <param name='OBS_FB_RADIANCES_DEPARTURES_TYPE' values = 'OBS-FG/OBS-FG2/OBS-FG3/OBS-AN/ALL/BIAS/STDEV' />
+  <param name='OBS_FB_SCATTEROMETER_WINDS' values = 'ON/OFF' />
+  <param name='OBS_FB_SCAT_CLOSEST_TO' values = 'FG/AN' />
+  <param name='OBS_FB_SCAT_AMBIGUITIES' values = '1/2/3/4' />
+  <param name='OBS_FB_SCAT_THINNED_ONLY' values = 'ON/OFF' />
+  <param name='OBS_FB_SCAT_SWEET_SPOTS_ONLY' values = 'ON/OFF' />
+  <param name='OBS_FB_SCAT_ALT_COLORING' values = 'COLOURED/GREY' />
+  <param name='OBS_FB_SCAT_REJECTION_LIST' values = 'RAIN/WSOL/WSPD/ICE' />
+  <param name='OBS_FB_SSMI_WATER_PRECIPITABLE' values = 'ON/OFF' />
+  <param name='OBS_FB_SSMI_LIQUID_WATER_PATH' values = 'ON/OFF' />
+  <param name='OBS_FB_SSMI_TYPE' values = '1DVAR/REGRESSION' />
+  <param name='OBS_FB_SSMI_WIND_STRENGTH' values = 'ON/OFF' />
+  <param name='OBS_FB_SSMI_FAILURE_FLAG' values = 'ON/OFF' />
+  <param name='OBS_BUFR_SECTION2_USE' values = 'ON/OFF' />
+  <param name='OBS_TEXT' values = 'ON/OFF' />
+</function>
+<function name='pott_m'>
+  <param name='LNSP' />
+  <param name='TEMPERATURE' />
+</function>
+<function name='pott_p'>
+  <param name='TEMPERATURE' />
+</function>
+<function name='ps_output'>
+  <param name='OUTPUT_TITLE' />
+  <param name='OUTPUT_WIDTH' />
+  <param name='OUTPUT_RESOLUTION' />
+  <param name='OUTPUT_NAME' />
+  <param name='OUTPUT_NAME_FIRST_PAGE_NUMBER' values = 'ON/OFF' />
+  <param name='OUTPUT_FULLNAME' />
+  <param name='OUTPUT_LEGACY_NAME' />
+  <param name='OUTPUT_FILE_MINIMAL_WIDTH' />
+  <param name='OUTPUT_FILE_SEPARATOR' />
+  <param name='OUTPUT_DEBUG' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST_NAME' />
+  <param name='OUTPUT_PS_COLOUR_MODEL' />
+  <param name='OUTPUT_PS_SCALE' />
+  <param name='OUTPUT_PS_SPLIT' values = 'ON/OFF' />
+  <param name='CLASS' />
+</function>
+<function name='psymb'>
+  <param name='SYMBOL_TYPE' values = 'NUMBER/TEXT/MARKER/WIND' />
+  <param name='SYMBOL_TABLE_MODE' values = 'ON/OFF' />
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='LEGEND_ENTRY' />
+  <param name='SYMBOL_POSITION_MODE' values = 'GEOGRAPHIC/PAPER/GRAPH' />
+  <param name='SYMBOL_BORDER_CHECK' values = 'ON/OFF' />
+  <param name='SYMBOL_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='SYMBOL_BLANKING' values = 'ON/OFF' />
+  <param name='SYMBOL_BLANKING_GAP' />
+  <param name='SYMBOL_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUST/ [...]
+  <param name='SYMBOL_FORMAT' />
+  <param name='SYMBOL_HEIGHT' />
+  <param name='SYMBOL_INPUT_TEXT_LIST' />
+  <param name='SYMBOL_INPUT_MARKER_LIST' />
+  <param name='SYMBOL_MIN_TABLE' />
+  <param name='SYMBOL_MAX_TABLE' />
+  <param name='SYMBOL_MARKER_TABLE' />
+  <param name='SYMBOL_TEXT_TABLE' />
+  <param name='SYMBOL_COLOUR_TABLE' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE [...]
+  <param name='SYMBOL_HEIGHT_TABLE' />
+  <param name='SYMBOL_WIND_ORIGIN_MARKER' values = 'ON/OFF' />
+  <param name='SYMBOL_DISTANCE_APART' />
+</function>
+<function name='ptext'>
+  <param name='TEXT_AUTOMATIC' values = 'YES/NO' />
+  <param name='TEXT_USER' values = 'YES/NO' />
+  <param name='TEXT_MERGE' values = 'YES/NO' />
+  <param name='TEXT_ORIGIN' values = 'AUTOMATIC/BOTH/MERGE/USER/NONE/NOTSET' />
+  <param name='TEXT_LINE_1' />
+  <param name='TEXT_LINE_2' />
+  <param name='TEXT_LINE_3' />
+  <param name='TEXT_LINE_4' />
+  <param name='TEXT_LINE_5' />
+  <param name='TEXT_LINE_6' />
+  <param name='TEXT_LINE_7' />
+  <param name='TEXT_LINE_8' />
+  <param name='TEXT_LINE_9' />
+  <param name='TEXT_LINE_10' />
+  <param name='TEXT_FIRST_LINE' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='TEXT_LINE_COUNT' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='TEXT_PARAMETER_ESCAPE_CHARACTER' />
+  <param name='TEXT_INSTRUCTION_SHIFT_CHARACTER' />
+  <param name='TEXT_META_FIELD_ESCAPE_CHARACTER' />
+  <param name='GRIB_TEXT_UNITS' values = 'ON/OFF' />
+  <param name='TEXT_REDUCTION_LEVEL' values = '0/1/2' />
+  <param name='TEXT_MODE' values = 'TITLE/POSITIONAL' />
+  <param name='TEXT_BOX_X_POSITION' />
+  <param name='TEXT_BOX_Y_POSITION' />
+  <param name='TEXT_BOX_X_LENGTH' />
+  <param name='TEXT_BOX_Y_LENGTH' />
+  <param name='TEXT_BOX_BLANKING' values = 'ON/OFF' />
+  <param name='TEXT_REFERENCE_CHARACTER_HEIGHT' />
+  <param name='TEXT_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='TEXT_JUSTIFICATION' values = 'CENTRE/LEFT/RIGHT' />
+  <param name='TEXT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RUST/PE [...]
+  <param name='TEXT_LINE_HEIGHT_RATIO_1' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_2' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_3' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_4' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_5' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_6' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_7' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_8' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_9' />
+  <param name='TEXT_LINE_HEIGHT_RATIO_10' />
+  <param name='TEXT_BORDER' values = 'ON/OFF' />
+  <param name='TEXT_BORDER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/ [...]
+  <param name='TEXT_BORDER_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='TEXT_BORDER_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='TEXT_TITLES_TABLE_USE' values = 'ON/OFF' />
+  <param name='TEXT_LEGEND_MAGICS_STYLE' values = 'ON/OFF' />
+  <param name='TEXT_LEGEND_BOX_BLANKING' values = 'ON/OFF' />
+  <param name='LEGEND_POSITIONING' values = 'AUTOMATIC/INSIDE/OUTSIDE' />
+  <param name='LEGEND_SUBPAGE_POSITION' values = 'BOTTOM_RIGHT/TOP_RIGHT/TOP_LEFT/BOTTOM_LEFT' />
+  <param name='LEGEND_ENTRY_PLOT_DIRECTION' values = 'ROW/COLUMN' />
+  <param name='LEGEND_COLUMN_COUNT' />
+  <param name='LEGEND_BOX_MODE' values = 'AUTOMATIC/POSITIONAL' />
+  <param name='LEGEND_DISPLAY_TYPE' values = 'DISJOINT/CONTINUOUS' />
+  <param name='LEGEND_BOX_X_POSITION' />
+  <param name='LEGEND_BOX_Y_POSITION' />
+  <param name='LEGEND_BOX_X_LENGTH' />
+  <param name='LEGEND_BOX_Y_LENGTH' />
+  <param name='LEGEND_TITLE' values = 'ON/OFF' />
+  <param name='LEGEND_TITLE_TEXT' />
+  <param name='LEGEND_TEXT_QUALITY' values = 'LOW/MEDIUM/HIGH' />
+  <param name='LEGEND_TEXT_MAXIMUM_HEIGHT' />
+  <param name='LEGEND_TEXT_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/ [...]
+  <param name='LEGEND_BOX_BLANKING' values = 'ON/OFF' />
+  <param name='LEGEND_BORDER' values = 'ON/OFF' />
+  <param name='LEGEND_BORDER_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANG [...]
+  <param name='LEGEND_BORDER_LINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='LEGEND_BORDER_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='LEGEND_ENTRY_MAXIMUM_HEIGHT' />
+  <param name='LEGEND_ENTRY_MINIMUM_HEIGHT' />
+  <param name='LEGEND_ENTRY_MAXIMUM_WIDTH' />
+  <param name='LEGEND_ENTRY_MINIMUM_WIDTH' />
+  <param name='LEGEND_TEXT_FORMAT' />
+  <param name='LEGEND_SYMBOL_HEIGHT_MODE' values = 'AS_MAP/AS_TEXT' />
+</function>
+<function name='pwind'>
+  <param name='LEGEND' values = 'ON/OFF' />
+  <param name='LEGEND_USER_TEXT' />
+  <param name='LEGEND_ENTRY' />
+  <param name='WIND_THINNING_FACTOR' />
+  <param name='WIND_FIELD_TYPE' values = 'ARROWS/FLAGS/STREAMLINES' />
+  <param name='WIND_FLAG_LENGTH' />
+  <param name='WIND_FLAG_MODE' values = 'NORMAL/OFF_LEVEL/OFF_TIME' />
+  <param name='WIND_FLAG_ORIGIN_MARKER' values = 'CIRCLE/DOT/OFF' />
+  <param name='WIND_FLAG_MIN_SPEED' />
+  <param name='WIND_FLAG_MAX_SPEED' />
+  <param name='WIND_FLAG_CALM_INDICATOR' values = 'ON/OFF' />
+  <param name='WIND_FLAG_CALM_INDICATOR_SIZE' />
+  <param name='WIND_FLAG_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='WIND_FLAG_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/RU [...]
+  <param name='WIND_FLAG_CROSS_BOUNDARY' values = 'ON/OFF' />
+  <param name='WIND_ARROW_UNIT_VELOCITY' />
+  <param name='WIND_ARROW_MIN_SPEED' />
+  <param name='WIND_ARROW_MAX_SPEED' />
+  <param name='WIND_ARROW_CALM_INDICATOR' values = 'ON/OFF' />
+  <param name='WIND_ARROW_CALM_INDICATOR_SIZE' />
+  <param name='WIND_ARROW_CALM_BELOW' />
+  <param name='WIND_ARROW_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='WIND_ARROW_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORANGE/R [...]
+  <param name='WIND_ARROW_CROSS_BOUNDARY' values = 'ON/OFF' />
+  <param name='WIND_ARROW_HEAD_INDEX' />
+  <param name='WIND_ARROW_ORIGIN_POSITION' values = 'CENTRE/TAIL' />
+  <param name='WIND_ARROW_LEGEND' values = 'ON/OFF' />
+  <param name='WIND_ARROW_LEGEND_X_POSITION' />
+  <param name='WIND_ARROW_LEGEND_Y_POSITION' />
+  <param name='WIND_ARROW_LEGEND_X_LENGTH' />
+  <param name='WIND_ARROW_LEGEND_Y_LENGTH' />
+  <param name='WIND_ARROW_LEGEND_BLANKING' values = 'ON/OFF' />
+  <param name='WIND_STREAMLINE_MIN_DENSITY' />
+  <param name='WIND_STREAMLINE_MIN_SPEED' />
+  <param name='WIND_STREAMLINE_CLOSENESS_CHECK' values = 'ON/OFF' />
+  <param name='WIND_STREAMLINE_CLOSENESS_MARGIN' />
+  <param name='WIND_STREAMLINE_THICKNESS' values = '1/2/3/4/5/6/7/8/9/10' />
+  <param name='WIND_STREAMLINE_COLOUR' values = 'BACKGROUND/BLACK/CHARCOAL/GREY/WHITE/PINK/PURPLISH_RED/BURGUNDY/ROSE/PURPLE_RED/REDDISH_PURPLE/MAGENTA/PURPLE/BLUISH_PURPLE/VIOLET/BLUE_PURPLE/LAVENDER/PURPLISH_BLUE/BLUE/NAVY/SKY/GREENISH_BLUE/BLUE_GREEN/CYAN/TURQUOISE/EVERGREEN/BLUISH_GREEN/KELLY_GREEN/GREEN/YELLOWISH_GREEN/YELLOW_GREEN/AVOCADO/OLIVE/GREENISH_YELLOW/YELLOW/ORANGISH_YELLOW/ORANGE_YELLOW/GOLD/YELLOWISH_ORANGE/CREAM/MUSTARD/BEIGE/KHAKI/TAN/OCHRE/ORANGE/TANGERINE/REDDISH_ORA [...]
+  <param name='WIND_STREAMLINE_STYLE' values = 'SOLID/DOT/DASH/CHAIN_DOT/CHAIN_DASH' />
+  <param name='WIND_STREAMLINE_CALM_MARKER' values = 'ON/OFF' />
+  <param name='WIND_STREAMLINE_MARKER_INDEX' values = '1/2/3/4/5' />
+  <param name='WIND_STREAMLINE_MARKER_HEIGHT' />
+  <param name='WIND_STREAMLINE_ARROW_HEAD_INDEX' />
+  <param name='WIND_STREAMLINE_ARROW_HEAD_LENGT' />
+  <param name='INPUT_FIELD_ORGANIZATION' values = 'REGULAR/FITTED/GAUSSIAN' />
+  <param name='INPUT_FIELD_SUPPRESS_ABOVE' />
+  <param name='INPUT_FIELD_SUPPRESS_BELOW' />
+  <param name='GRIB_SPECTRAL_RESOLUTION' />
+  <param name='GRIB_MISSING_VALUE_INDICATOR' />
+  <param name='GRIB_TEXT' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_SPLIT' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_UNITS' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_EXPERIMENT' values = 'ON/OFF' />
+  <param name='GRIB_TEXT_PLOT_TYPE' values = 'ON/OFF' />
+</function>
+<function name='read'>
+  <param name='FIELDSET' />
+  <param name='READ_DATA_FROM' values = 'FILE/METVIEW_ICON' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='LOGSTATS' values = 'OFF' />
+  <param name='DATA' />
+  <param name='CFSPATH' values = 'OFF' />
+  <param name='ORDER' values = 'AS IS/SORTED' />
+  <param name='CLASS' values = 'OPERATIONS/RESEARCH/REANALYSE/ECSN/REANALYSE40/ERA INTERIM/DEMETER/PROVOST/ELDAS/TOST/COSMO/ENSEMBLES/MERSEA/SREPS/DTS/LACE/YOTC/MACC/PERMANENT EXPERIMENT/E20CM/E20C/ESAT/EPST/EURO4M/AUSTRIA/BELGIUM/CROATIA/DENMARK/FINLAND/FRANCE/GERMANY/GREECE/HUNGARY/ICELAND/IRELAND/ITALY/NETHERLANDS/NORWAY/PORTUGAL/SLOVENIA/SPAIN/SWEDEN/SWITZERLAND/TURKEY/UNITED KINGDOM/METAPS/TEST/ANY' />
+  <param name='STREAM' values = 'ANALYSIS FOR MULTIANALYSIS PROJECT/BRACKNELL/CHERNOBYL/DAILY ARCHIVE/DAILY ARCHIVE HINDCASTS/DAILY CLIMATOLOGY/DAILY CLIMATOLOGY WAVE/ENSEMBLE DATA ASSIMILATION/ENSEMBLE DATA ASSIMILATION MONTHLY MEANS/ENSEMBLE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS/ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS/ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS/ENSEMBLE LONG WINDOW DATA ASSIMILATION/ENSEMBLE WAVE LONG WINDOW DATA ASSIMILATION/ENSEMBLE FO [...]
+  <param name='TYPE' values = 'ANY/3D VARIATIONAL ANALYSIS/3D VARIATIONAL GRADIENTS/4D VARIATIONAL ANALYSIS/4D VARIATIONAL INCREMENTS/4D VARIATIONAL GRADIENTS/ADJOINT SINGULAR VECTOR/ANALYSIS BIAS/ANALYSIS INPUT/ANALYSIS FEEDBACK/ANALYSIS/ASSIMILATION RUN/BIAS-CORRECTED FORECAST/CALIBRATION VALIDATION FORECAST/CLIMATE DISTRIBUTION/CLIMATOLOGY/CLUSTERING INFORMATION/CLUSTER MEANS/CLUSTER REPRESENTATIVE/CLUSTER STD DEVIATIONS/CONTROL FORECAST/EMPIRICAL DISTRIBUTION/ENSEMBLE MEAN/ENSEMBLE S [...]
+  <param name='MODEL' values = 'ANY/OFF/ECMF/EDZW/EGRR/LFPW/KWBC/NONE/HRM/LM/IFS/GLOBAL' />
+  <param name='LEVTYPE' values = 'ANY/POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/DEPTH/OCEAN WAVE/LAYER/CATEGORY/ALL' />
+  <param name='LEVELIST' values = 'ANY/TO/BY/OFF' />
+  <param name='PARAM' values = 'ANY/20 DEGREES ISOTHERM DEPTH/ACCUMULATED CLOUD FRACTION TENDENCY/ACCUMULATED ICE WATER TENDENCY/ACCUMULATED LIQUID WATER TENDENCY/ACCUMULATED CARBON DIOXIDE NET ECOSYSTEM EXCHANGE/ACCUMULATED CARBON DIOXIDE GROSS PRIMARY PRODUCTION/ACCUMULATED CARBON DIOXIDE ECOSYSTEM RESPIRATION/ADIABATIC TENDENCY OF HUMIDITY/ADIABATIC TENDENCY OF HUMIDITY - ECMWF/ADIABATIC TENDENCY OF MERIDIONAL WIND/ADIABATIC TENDENCY OF MERIDIONAL WIND - ASTEX/ADIABATIC TENDENCY OF TE [...]
+  <param name='DATE' values = 'ANY/JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='VERIFY' values = 'ANY/JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/OFF' />
+  <param name='REFDATE' values = 'ANY/JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='HDATE' values = 'ANY/JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/ALL' />
+  <param name='FCMONTH' values = 'TO/BY/OFF' />
+  <param name='FCPERIOD' values = 'TO/BY/OFF' />
+  <param name='TIME' values = 'ANY/TO/BY' />
+  <param name='LEADTIME' values = 'TO/OFF/ANY' />
+  <param name='OPTTIME' values = 'TO/OFF/ANY' />
+  <param name='REFERENCE' values = 'ANY/TO/BY' />
+  <param name='STEP' values = 'ANY/TO/BY' />
+  <param name='ANOFFSET' values = 'ANY/TO/BY/OFF' />
+  <param name='RANGE' values = 'ANY' />
+  <param name='ACCURACY' values = 'ANY/NORMAL/REDUCED/LOW/OFF/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF/ANY' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF/ANY' />
+  <param name='AREA' values = 'ANY/GLOBE/EUROPE' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/319/213/106/ANY' />
+  <param name='ROTATION' values = 'ANY' />
+  <param name='GRID' values = 'ANY' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='ENSEMBLE' values = 'ALL/OFF/TO' />
+  <param name='CLUSTER' values = 'ALL/OFF/TO' />
+  <param name='PROBABILITY' values = 'ALL/OFF/TO' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY/ANY' />
+  <param name='QUANTILE' values = 'ALL/OFF/TO/BY/ANY' />
+  <param name='FREQUENCY' values = 'ALL/OFF/TO/ANY' />
+  <param name='DIRECTION' values = 'ALL/OFF/TO/ANY' />
+  <param name='DIAGNOSTIC' values = 'ALL/OFF/ANY' />
+  <param name='ITERATION' values = 'ALL/OFF/TO/ANY' />
+  <param name='CHANNEL' values = 'OFF/TO/ALL/ANY' />
+  <param name='IDENT' values = 'METEOSAT 3/METEOSAT 4/METEOSAT 5/METEOSAT 6/METEOSAT 7/METEOSAT 8/GOES 8/GOES 9/GOES 10/GOES 11/GOES 12/DMSP 10/DMSP 13/OFF/ANY' />
+  <param name='INSTRUMENT' values = 'MHS/MVIRI/SEVIRI/GOES IMAGER/AMSU-A/AMSU-B/MSU/HIRS2/HIRS3/SSU/OFF/ANY' />
+  <param name='FILTER' values = 'ANY' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL/ANY' />
+  <param name='ORIGIN' values = 'OFF/WASHINGTON/BRACKNELL/FLEET NUMERICAL/OFFENBACH/ECMWF/TOULOUSE/PARIS/MADRID/UNIVERSITY OF VIENNA/KNMI/INGV/CERFACS/IFMK/HADLEY CENTRE/CONSENSUS/MELBOURNE/TOKYO/MONTREAL/BEIJING/SEOUL/CPTEC/CNMC/OSLO/ALL/ANY' />
+  <param name='PADDING' values = 'ANY/AUTOMATIC/NONE/OFF' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z/ANY' />
+  <param name='SYSTEM' values = 'ALL/ANY' />
+  <param name='METHOD' values = 'TO/BY/ALL/OFF/ANY' />
+  <param name='PRODUCT' values = 'INSTANTANEOUS/TIME-SERIES/TIME-AVERAGE/TIME-ACCUMULATION/ALL/ANY' />
+  <param name='SECTION' values = 'HORIZONTAL/VERTICAL/ZONAL/MERIDIONAL/ALL/ANY' />
+  <param name='LATITUDE' values = 'ANY' />
+  <param name='LONGITUDE' values = 'ANY' />
+  <param name='EXPVER' values = '1/2/11/12/ANY' />
+</function>
+<function name='read_g2'>
+  <param name='FIELDSET' />
+  <param name='READ_DATA_FROM' values = 'FILE/METVIEW_ICON' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='LOGSTATS' values = 'OFF' />
+  <param name='DATA' />
+  <param name='CFSPATH' values = 'OFF' />
+  <param name='ORDER' values = 'AS IS/SORTED' />
+  <param name='CLASS' values = 'TIGGE/ANY' />
+  <param name='STREAM' values = 'ENFO/DA/ANY' />
+  <param name='TYPE' values = 'ANY/CONTROL FORECAST/FORECAST/PERTURBED FORECAST/ALL' />
+  <param name='MODEL' values = 'ANY/GLOB/LAM' />
+  <param name='LEVTYPE' values = 'ANY/POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/ALL' />
+  <param name='LEVELIST' values = 'ANY/TO/BY/OFF' />
+  <param name='PARAM' values = 'ANY/10 METER U VELOCITY/10 METER V VELOCITY/CONVECTIVE AVAILABLE POTENTIAL ENERGY/CONVECTIVE INHIBITION/GEOPOTENTIAL HEIGHT/LAND SEA MASK/MEAN SEA LEVEL PRESSURE/OROGRAPHY/POTENTIAL TEMPERATURE/POTENTIAL VORTICITY/SKIN TEMPERATURE/SNOW DEPTH WATER EQUIVALENT/SNOW FALL WATER EQUIVALENT/SOIL MOISTURE/SOIL TEMPERATURE/SPECIFIC HUMIDITY/SUNSHINE DURATION/SURFACE AIR DEW POINT TEMPERATURE/SURFACE AIR MAXIMUM TEMPERATURE/SURFACE AIR MINIMUM TEMPERATURE/SURFACE A [...]
+  <param name='DATE' values = 'ANY/JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='TIME' values = 'ANY/TO/BY' />
+  <param name='STEP' values = 'ANY/TO/BY' />
+  <param name='ANOFFSET' values = 'ANY/TO/BY/OFF' />
+  <param name='ACCURACY' values = 'ANY/NORMAL/REDUCED/LOW/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF/ANY' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF/ANY' />
+  <param name='AREA' values = 'ANY/GLOBE/EUROPE' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/319/213/106/ANY' />
+  <param name='ROTATION' values = 'ANY' />
+  <param name='GRID' values = 'ANY' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY/ANY' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL/ANY' />
+  <param name='ORIGIN' values = 'KWBC/BABJ/ECMF/EGRR/RJTD/AMMC/CWAO/RKSL/SBSJ/LFPW/COSMOLEPS-ARPASIMC-EU/ALL/ANY' />
+  <param name='PADDING' values = 'ANY/AUTOMATIC/NONE/OFF' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z/ANY' />
+  <param name='EXPVER' values = '1/2/11/12/ANY' />
+</function>
+<function name='read_tigge'>
+  <param name='FIELDSET' />
+  <param name='READ_DATA_FROM' values = 'FILE/METVIEW_ICON' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='LOGSTATS' values = 'OFF' />
+  <param name='DATA' />
+  <param name='CFSPATH' values = 'OFF' />
+  <param name='ORDER' values = 'AS IS/SORTED' />
+  <param name='CLASS' values = 'TIGGE/ANY' />
+  <param name='STREAM' values = 'ENFO/DA/ANY' />
+  <param name='TYPE' values = 'ANY/CONTROL FORECAST/FORECAST/PERTURBED FORECAST/ALL' />
+  <param name='MODEL' values = 'ANY/GLOB/LAM' />
+  <param name='LEVTYPE' values = 'ANY/POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/ALL' />
+  <param name='LEVELIST' values = 'ANY/TO/BY/OFF' />
+  <param name='PARAM' values = 'ANY/10 METER U VELOCITY/10 METER V VELOCITY/CONVECTIVE AVAILABLE POTENTIAL ENERGY/CONVECTIVE INHIBITION/GEOPOTENTIAL HEIGHT/LAND SEA MASK/MEAN SEA LEVEL PRESSURE/OROGRAPHY/POTENTIAL TEMPERATURE/POTENTIAL VORTICITY/SKIN TEMPERATURE/SNOW DEPTH WATER EQUIVALENT/SNOW FALL WATER EQUIVALENT/SOIL MOISTURE/SOIL TEMPERATURE/SPECIFIC HUMIDITY/SUNSHINE DURATION/SURFACE AIR DEW POINT TEMPERATURE/SURFACE AIR MAXIMUM TEMPERATURE/SURFACE AIR MINIMUM TEMPERATURE/SURFACE A [...]
+  <param name='DATE' values = 'ANY/JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='TIME' values = 'ANY/TO/BY' />
+  <param name='STEP' values = 'ANY/TO/BY' />
+  <param name='ANOFFSET' values = 'ANY/TO/BY/OFF' />
+  <param name='ACCURACY' values = 'ANY/NORMAL/REDUCED/LOW/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF/ANY' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF/ANY' />
+  <param name='AREA' values = 'ANY/GLOBE/EUROPE' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/319/213/106/ANY' />
+  <param name='ROTATION' values = 'ANY' />
+  <param name='GRID' values = 'ANY' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY/ANY' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL/ANY' />
+  <param name='ORIGIN' values = 'KWBC/BABJ/ECMF/EGRR/RJTD/AMMC/CWAO/RKSL/SBSJ/LFPW/COSMOLEPS-ARPASIMC-EU/ALL/ANY' />
+  <param name='PADDING' values = 'ANY/AUTOMATIC/NONE/OFF' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z/ANY' />
+  <param name='EXPVER' values = '1/2/11/12/ANY' />
+</function>
+<function name='reprojection'>
+  <param name='SOURCE' values = 'OFF' />
+  <param name='DATA' />
+  <param name='AREA' />
+  <param name='RESOLUTION' />
+  <param name='PROJECTION' values = 'LATLONG' />
+  <param name='INTERPOLATION' values = 'NEAREST_NEIGHBOUR' />
+  <param name='MAP_PROJECTION' values = 'CYLINDRICAL/POLAR_STEREOGRAPHIC/MERCATOR/OCEAN_SECTION/AITOFF/LAMBERT/NONE' />
+  <param name='MAP_VERTICAL_LONGITUDE' />
+</function>
+<function name='retrieve'>
+  <param name='DATASET' />
+  <param name='CLASS' values = 'OPERATIONS/RESEARCH/REANALYSE/ECSN/REANALYSE40/ERA INTERIM/DEMETER/PROVOST/ELDAS/TOST/COSMO/ENSEMBLES/MERSEA/SREPS/DTS/LACE/YOTC/MACC/PERMANENT EXPERIMENT/E20CM/E20C/ESAT/EPST/EURO4M/AUSTRIA/BELGIUM/CROATIA/DENMARK/FINLAND/FRANCE/GERMANY/GREECE/HUNGARY/ICELAND/IRELAND/ITALY/NETHERLANDS/NORWAY/PORTUGAL/SLOVENIA/SPAIN/SWEDEN/SWITZERLAND/TURKEY/UNITED KINGDOM/METAPS/TEST' />
+  <param name='TYPE' values = '3D VARIATIONAL ANALYSIS/3D VARIATIONAL GRADIENTS/4D VARIATIONAL ANALYSIS/4D VARIATIONAL INCREMENTS/4D VARIATIONAL GRADIENTS/ADJOINT SINGULAR VECTOR/ANALYSIS BIAS/ANALYSIS INPUT/ANALYSIS FEEDBACK/ANALYSIS/ASSIMILATION RUN/BIAS-CORRECTED FORECAST/CALIBRATION VALIDATION FORECAST/CLIMATE DISTRIBUTION/CLIMATOLOGY/CLUSTERING INFORMATION/CLUSTER MEANS/CLUSTER REPRESENTATIVE/CLUSTER STD DEVIATIONS/CONTROL FORECAST/EMPIRICAL DISTRIBUTION/ENSEMBLE MEAN/ENSEMBLE STAND [...]
+  <param name='STREAM' values = 'ANALYSIS FOR MULTIANALYSIS PROJECT/BRACKNELL/CHERNOBYL/DAILY ARCHIVE/DAILY ARCHIVE HINDCASTS/DAILY CLIMATOLOGY/DAILY CLIMATOLOGY WAVE/ENSEMBLE DATA ASSIMILATION/ENSEMBLE DATA ASSIMILATION MONTHLY MEANS/ENSEMBLE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS/ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS/ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS/ENSEMBLE LONG WINDOW DATA ASSIMILATION/ENSEMBLE WAVE LONG WINDOW DATA ASSIMILATION/ENSEMBLE FO [...]
+  <param name='EXPVER' values = '1' />
+  <param name='MODEL' values = 'OFF/ECMF/EDZW/EGRR/LFPW/KWBC/NONE/HRM/LM/IFS/GLOBAL' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL' />
+  <param name='OBSGROUP' values = 'SAT/ERS1/TRMM/QSCAT/REO3/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/99/OFF' />
+  <param name='REPORTYPE' values = 'TIROS-N HIRS Radiances/NOAA 6 HIRS Radiances/NOAA 7 HIRS Radiances/NOAA 8 HIRS Radiances/NOAA 9 HIRS Radiances/NOAA 10 HIRS Radiances/NOAA 11 HIRS Radiances/NOAA 12 HIRS Radiances/NOAA 14 HIRS Radiances/NOAA 15 HIRS Radiances/NOAA 16 HIRS Radiances/NOAA 17 HIRS Radiances/NOAA 18 HIRS Radiances/NOAA 19 HIRS Radiances/METOP-A HIRS Radiances/NOAA 8 HIRS Radiances/NOAA 9 HIRS Radiances/NOAA 10 HIRS Radiances/NOAA 11 HIRS Radiances/NOAA 6 HIRS Radiances/NOA [...]
+  <param name='RDBPREFIX' values = 'OFF' />
+  <param name='OBSTYPE' values = 'ALL/NON SATELLITE DATA ALL/SATELLITE DATA ALL/ALL/CONVENTIONAL/SD/GRIB IMAGES/FIRST INFRARED BAND/SECOND INFRARED BAND/FIRST VISIBLE BAND/WATER VAPOR BAND/BUFR/WAVESCAT/SCAT/RALT/TOVH/GRAD/ATOV/AIRS/STORM/IMSSNOW/AMSU_EARS/BALTIC_CI/WAVESAR/IASI/OSTIA/ENVISAT_MERIS/ATMS/CRIS/FBCONV/FBSCAT/FBSSMI/FBTMI/FBTOVS/FBRAD1C/FBGEOS/FBTRMR/FBREO3/FBAIRS/FBAMSRE/FBSSMIS/FBGPSRO/FBIASI/FBWINDSAT/LAND SURFACE DATA/SYNOP LAND/SYNOP RECORD 2 LAND/SYNOP AUTO LAND/SYNOP  [...]
+  <param name='LEVTYPE' values = 'POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/DEPTH/OCEAN WAVE/LAYER/CATEGORY/ALL' />
+  <param name='LEVELIST' values = 'TO/BY/ALL/OFF' />
+  <param name='PARAM' values = 'ALL/20 DEGREES ISOTHERM DEPTH/ACCUMULATED CLOUD FRACTION TENDENCY/ACCUMULATED ICE WATER TENDENCY/ACCUMULATED LIQUID WATER TENDENCY/ACCUMULATED CARBON DIOXIDE NET ECOSYSTEM EXCHANGE/ACCUMULATED CARBON DIOXIDE GROSS PRIMARY PRODUCTION/ACCUMULATED CARBON DIOXIDE ECOSYSTEM RESPIRATION/ADIABATIC TENDENCY OF HUMIDITY/ADIABATIC TENDENCY OF HUMIDITY - ECMWF/ADIABATIC TENDENCY OF MERIDIONAL WIND/ADIABATIC TENDENCY OF MERIDIONAL WIND - ASTEX/ADIABATIC TENDENCY OF TE [...]
+  <param name='YEAR' values = 'TO/BY/ALL' />
+  <param name='DECADE' values = 'TO/BY/ALL' />
+  <param name='MONTH' values = 'TO/BY/ALL' />
+  <param name='DATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='VERIFY' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/OFF' />
+  <param name='REFDATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/OFF' />
+  <param name='HDATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/ALL/OFF' />
+  <param name='FCMONTH' values = 'TO/BY/OFF' />
+  <param name='FCPERIOD' values = 'TO/BY/OFF' />
+  <param name='TIME' values = 'TO/BY/ALL/12' />
+  <param name='LEADTIME' values = 'TO/OFF/ALL' />
+  <param name='OPTTIME' values = 'TO/OFF/ALL' />
+  <param name='RANGE' values = 'OFF' />
+  <param name='STEP' values = 'ALL/TO/BY' />
+  <param name='ANOFFSET' values = 'ALL/TO/BY/OFF' />
+  <param name='REFERENCE' values = 'ALL/TO/BY/OFF' />
+  <param name='ENSEMBLE' values = 'ALL/TO/OFF' />
+  <param name='CLUSTER' values = 'ALL/TO/OFF' />
+  <param name='PROBABILITY' values = 'ALL/TO/OFF' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY' />
+  <param name='QUANTILE' values = 'ALL/OFF/TO/BY' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z' />
+  <param name='FREQUENCY' values = 'ALL/OFF/TO' />
+  <param name='DIRECTION' values = 'ALL/OFF/TO' />
+  <param name='DIAGNOSTIC' values = 'ALL/OFF' />
+  <param name='ITERATION' values = 'ALL/OFF/TO' />
+  <param name='CHANNEL' values = 'ALL/OFF/TO/ALL' />
+  <param name='IDENT' values = 'ALL/METEOSAT 3/METEOSAT 4/METEOSAT 5/METEOSAT 6/METEOSAT 7/METEOSAT 8/GOES 8/GOES 9/GOES 10/GOES 11/GOES 12/DMSP 10/DMSP 13/OFF' />
+  <param name='ORIGIN' values = 'OFF/WASHINGTON/BRACKNELL/FLEET NUMERICAL/OFFENBACH/ECMWF/TOULOUSE/PARIS/MADRID/UNIVERSITY OF VIENNA/KNMI/INGV/CERFACS/IFMK/HADLEY CENTRE/CONSENSUS/MELBOURNE/TOKYO/MONTREAL/BEIJING/SEOUL/CPTEC/CNMC/OSLO/ALL' />
+  <param name='SYSTEM' values = 'ALL/OFF' />
+  <param name='METHOD' values = 'TO/BY/ALL/OFF/OFF' />
+  <param name='PRODUCT' values = 'INSTANTANEOUS/TIME-SERIES/TIME-AVERAGE/TIME-ACCUMULATION/ALL/OFF' />
+  <param name='SECTION' values = 'HORIZONTAL/VERTICAL/ZONAL/MERIDIONAL/ALL/OFF' />
+  <param name='LATITUDE' values = 'OFF' />
+  <param name='LONGITUDE' values = 'OFF' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='LOGSTATS' values = 'OFF' />
+  <param name='TRANSFER' values = 'HANDLE/DATA/OFF' />
+  <param name='FIELDSET' values = 'OFF' />
+  <param name='CFSPATH' />
+  <param name='FORMAT' values = 'PACKED/UNPACKED/GRIB EDITION 1/GRIB EDITION 2' />
+  <param name='DISP' values = 'NEW/OLD/REMOVE/OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/REDUCED GAUSSIAN 128/REDUCED GAUSSIAN 160/REDUCED GAUSSIAN 200/OFF/319/213/106/63' />
+  <param name='ACCURACY' values = 'NORMAL/REDUCED/LOW/OFF/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF' />
+  <param name='AREA' values = 'GLOBE/EUROPE/NORTHERN HEMISPHERE OCTANT 1/NORTHERN HEMISPHERE OCTANT 2/NORTHERN HEMISPHERE OCTANT 3/NORTHERN HEMISPHERE OCTANT 4/SOUTHERN HEMISPHERE OCTANT 1/SOUTHERN HEMISPHERE OCTANT 2/SOUTHERN HEMISPHERE OCTANT 3/SOUTHERN HEMISPHERE OCTANT 4/OFF' />
+  <param name='LOCATION' values = 'OFF' />
+  <param name='BLOCK' values = 'OFF' />
+  <param name='INSTRUMENT' values = 'MHS/MVIRI/SEVIRI/GOES IMAGER/AMSU-A/AMSU-B/MSU/HIRS2/HIRS3/SSU/OFF' />
+  <param name='FILTER' values = 'OFF' />
+  <param name='ROTATION' values = 'OFF' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='GRID' values = 'ARCHIVED VALUE/320/160/80/48/OFF' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='PACKING' values = 'SI/CO/SO/AV/OFF' />
+  <param name='PADDING' values = 'AUTOMATIC/NONE/OFF/OFF' />
+  <param name='DUPLICATES' values = 'KEEP/REMOVE' />
+  <param name='LAUNCH' />
+  <param name='JOB' values = 'OFF' />
+  <param name='USE' values = 'FREQUENT/INFREQUENT/NORMAL/BOUNDARY CONDITIONS/COMPARE/MONTHLY RUN' />
+  <param name='PASSWORD' values = 'OFF' />
+  <param name='COSTONLY' values = 'YES/NO' />
+  <param name='PROCESS' values = 'LOCAL/SERVER/OFF' />
+  <param name='BRANCH' values = 'TRUE/FALSE/OFF' />
+  <param name='DATABASE' values = 'OFF' />
+  <param name='EXPECT' values = 'ANY/OFF' />
+</function>
+<function name='retrieve_g2'>
+  <param name='DATASET' />
+  <param name='CLASS' values = 'TIGGE' />
+  <param name='TYPE' values = 'CONTROL FORECAST/FORECAST/PERTURBED FORECAST/ALL' />
+  <param name='STREAM' values = 'ENFO/DA' />
+  <param name='EXPVER' values = 'PROD/TEST/ALL' />
+  <param name='MODEL' values = 'GLOB/LAM/OFF' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL' />
+  <param name='LEVTYPE' values = 'POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/ALL' />
+  <param name='LEVELIST' values = 'TO/BY/ALL/OFF' />
+  <param name='PARAM' values = 'ALL/10 METER U VELOCITY/10 METER V VELOCITY/CONVECTIVE AVAILABLE POTENTIAL ENERGY/CONVECTIVE INHIBITION/GEOPOTENTIAL HEIGHT/LAND SEA MASK/MEAN SEA LEVEL PRESSURE/OROGRAPHY/POTENTIAL TEMPERATURE/POTENTIAL VORTICITY/SKIN TEMPERATURE/SNOW DEPTH WATER EQUIVALENT/SNOW FALL WATER EQUIVALENT/SOIL MOISTURE/SOIL TEMPERATURE/SPECIFIC HUMIDITY/SUNSHINE DURATION/SURFACE AIR DEW POINT TEMPERATURE/SURFACE AIR MAXIMUM TEMPERATURE/SURFACE AIR MINIMUM TEMPERATURE/SURFACE A [...]
+  <param name='YEAR' values = 'TO/BY/ALL' />
+  <param name='MONTH' values = 'TO/BY/ALL' />
+  <param name='DATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='TIME' values = 'TO/BY/ALL/12' />
+  <param name='STEP' values = 'ALL/TO/BY' />
+  <param name='ANOFFSET' values = 'ALL/TO/BY/OFF' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z' />
+  <param name='ORIGIN' values = 'KWBC/BABJ/ECMF/EGRR/RJTD/AMMC/CWAO/RKSL/SBSJ/LFPW/COSMOLEPS-ARPASIMC-EU/ALL' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='TRANSFER' values = 'HANDLE/DATA/OFF' />
+  <param name='FIELDSET' values = 'OFF' />
+  <param name='CFSPATH' />
+  <param name='FORMAT' values = 'PACKED/UNPACKED/GRIB EDITION 1/GRIB EDITION 2' />
+  <param name='DISP' values = 'NEW/OLD/REMOVE/OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/REDUCED GAUSSIAN 128/REDUCED GAUSSIAN 200/OFF/319/213/106/63' />
+  <param name='ACCURACY' values = 'NORMAL/REDUCED/LOW/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF' />
+  <param name='AREA' values = 'GLOBE/EUROPE/NORTHERN HEMISPHERE OCTANT 1/NORTHERN HEMISPHERE OCTANT 2/NORTHERN HEMISPHERE OCTANT 3/NORTHERN HEMISPHERE OCTANT 4/SOUTHERN HEMISPHERE OCTANT 1/SOUTHERN HEMISPHERE OCTANT 2/SOUTHERN HEMISPHERE OCTANT 3/SOUTHERN HEMISPHERE OCTANT 4' />
+  <param name='LOCATION' values = 'OFF' />
+  <param name='BLOCK' values = 'OFF' />
+  <param name='ROTATION' values = 'OFF' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='GRID' values = 'ARCHIVED VALUE/320/160/80/48/OFF' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='PACKING' values = 'SI/CO/SO/AV/JPEG/OFF' />
+  <param name='PADDING' values = 'AUTOMATIC/NONE/OFF/OFF' />
+  <param name='DUPLICATES' values = 'KEEP/REMOVE' />
+  <param name='LAUNCH' />
+  <param name='USE' values = 'FREQUENT/INFREQUENT/NORMAL/BOUNDARY CONDITIONS' />
+  <param name='PASSWORD' values = 'OFF' />
+  <param name='COSTONLY' values = 'YES/NO' />
+  <param name='PROCESS' values = 'LOCAL/OFF' />
+  <param name='DATABASE' />
+  <param name='EXPECT' values = 'ANY/OFF' />
+</function>
+<function name='retrieve_odb'>
+  <param name='DATASET' />
+  <param name='CLASS' values = 'OPERATIONS/RESEARCH/REANALYSE/ECSN/REANALYSE40/ERA INTERIM/DEMETER/PROVOST/ELDAS/TOST/COSMO/ENSEMBLES/MERSEA/SREPS/DTS/LACE/YOTC/MACC/PERMANENT EXPERIMENT/E20CM/E20C/ESAT/EPST/EURO4M/AUSTRIA/BELGIUM/CROATIA/DENMARK/FINLAND/FRANCE/GERMANY/GREECE/HUNGARY/ICELAND/IRELAND/ITALY/NETHERLANDS/NORWAY/PORTUGAL/SLOVENIA/SPAIN/SWEDEN/SWITZERLAND/TURKEY/UNITED KINGDOM/METAPS/TEST' />
+  <param name='TYPE' values = '3D VARIATIONAL ANALYSIS/3D VARIATIONAL GRADIENTS/4D VARIATIONAL ANALYSIS/4D VARIATIONAL INCREMENTS/4D VARIATIONAL GRADIENTS/ADJOINT SINGULAR VECTOR/ANALYSIS BIAS/ANALYSIS INPUT/ANALYSIS FEEDBACK/ANALYSIS/ASSIMILATION RUN/BIAS-CORRECTED FORECAST/CALIBRATION VALIDATION FORECAST/CLIMATE DISTRIBUTION/CLIMATOLOGY/CLUSTERING INFORMATION/CLUSTER MEANS/CLUSTER REPRESENTATIVE/CLUSTER STD DEVIATIONS/CONTROL FORECAST/EMPIRICAL DISTRIBUTION/ENSEMBLE MEAN/ENSEMBLE STAND [...]
+  <param name='STREAM' values = 'ANALYSIS FOR MULTIANALYSIS PROJECT/BRACKNELL/CHERNOBYL/DAILY ARCHIVE/DAILY ARCHIVE HINDCASTS/DAILY CLIMATOLOGY/DAILY CLIMATOLOGY WAVE/ENSEMBLE DATA ASSIMILATION/ENSEMBLE DATA ASSIMILATION MONTHLY MEANS/ENSEMBLE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS/ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS OF DAILY MEANS/ENSEMBLE WAVE DATA ASSIMILATION MONTHLY MEANS/ENSEMBLE LONG WINDOW DATA ASSIMILATION/ENSEMBLE WAVE LONG WINDOW DATA ASSIMILATION/ENSEMBLE FO [...]
+  <param name='EXPVER' values = '1' />
+  <param name='MODEL' values = 'OFF/ECMF/EDZW/EGRR/LFPW/KWBC/NONE/HRM/LM/IFS/GLOBAL' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL' />
+  <param name='OBSGROUP' values = 'SAT/ERS1/TRMM/QSCAT/REO3/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/99/OFF' />
+  <param name='REPORTYPE' values = 'TIROS-N HIRS Radiances/NOAA 6 HIRS Radiances/NOAA 7 HIRS Radiances/NOAA 8 HIRS Radiances/NOAA 9 HIRS Radiances/NOAA 10 HIRS Radiances/NOAA 11 HIRS Radiances/NOAA 12 HIRS Radiances/NOAA 14 HIRS Radiances/NOAA 15 HIRS Radiances/NOAA 16 HIRS Radiances/NOAA 17 HIRS Radiances/NOAA 18 HIRS Radiances/NOAA 19 HIRS Radiances/METOP-A HIRS Radiances/NOAA 8 HIRS Radiances/NOAA 9 HIRS Radiances/NOAA 10 HIRS Radiances/NOAA 11 HIRS Radiances/NOAA 6 HIRS Radiances/NOA [...]
+  <param name='RDBPREFIX' values = 'OFF' />
+  <param name='OBSTYPE' values = 'ALL/NON SATELLITE DATA ALL/SATELLITE DATA ALL/ALL/CONVENTIONAL/SD/GRIB IMAGES/FIRST INFRARED BAND/SECOND INFRARED BAND/FIRST VISIBLE BAND/WATER VAPOR BAND/BUFR/WAVESCAT/SCAT/RALT/TOVH/GRAD/ATOV/AIRS/STORM/IMSSNOW/AMSU_EARS/BALTIC_CI/WAVESAR/IASI/OSTIA/ENVISAT_MERIS/ATMS/CRIS/FBCONV/FBSCAT/FBSSMI/FBTMI/FBTOVS/FBRAD1C/FBGEOS/FBTRMR/FBREO3/FBAIRS/FBAMSRE/FBSSMIS/FBGPSRO/FBIASI/FBWINDSAT/LAND SURFACE DATA/SYNOP LAND/SYNOP RECORD 2 LAND/SYNOP AUTO LAND/SYNOP  [...]
+  <param name='LEVTYPE' values = 'POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/DEPTH/OCEAN WAVE/LAYER/CATEGORY/ALL' />
+  <param name='LEVELIST' values = 'TO/BY/ALL/OFF' />
+  <param name='PARAM' values = 'ALL/20 DEGREES ISOTHERM DEPTH/ACCUMULATED CLOUD FRACTION TENDENCY/ACCUMULATED ICE WATER TENDENCY/ACCUMULATED LIQUID WATER TENDENCY/ACCUMULATED CARBON DIOXIDE NET ECOSYSTEM EXCHANGE/ACCUMULATED CARBON DIOXIDE GROSS PRIMARY PRODUCTION/ACCUMULATED CARBON DIOXIDE ECOSYSTEM RESPIRATION/ADIABATIC TENDENCY OF HUMIDITY/ADIABATIC TENDENCY OF HUMIDITY - ECMWF/ADIABATIC TENDENCY OF MERIDIONAL WIND/ADIABATIC TENDENCY OF MERIDIONAL WIND - ASTEX/ADIABATIC TENDENCY OF TE [...]
+  <param name='YEAR' values = 'TO/BY/ALL' />
+  <param name='DECADE' values = 'TO/BY/ALL' />
+  <param name='MONTH' values = 'TO/BY/ALL' />
+  <param name='DATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='VERIFY' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/OFF' />
+  <param name='REFDATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/OFF' />
+  <param name='HDATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF/ALL/OFF' />
+  <param name='FCMONTH' values = 'TO/BY/OFF' />
+  <param name='FCPERIOD' values = 'TO/BY/OFF' />
+  <param name='TIME' values = 'TO/BY/ALL/12' />
+  <param name='LEADTIME' values = 'TO/OFF/ALL' />
+  <param name='OPTTIME' values = 'TO/OFF/ALL' />
+  <param name='RANGE' values = 'OFF' />
+  <param name='STEP' values = 'ALL/TO/BY' />
+  <param name='ANOFFSET' values = 'ALL/TO/BY/OFF' />
+  <param name='REFERENCE' values = 'ALL/TO/BY/OFF' />
+  <param name='ENSEMBLE' values = 'ALL/TO/OFF' />
+  <param name='CLUSTER' values = 'ALL/TO/OFF' />
+  <param name='PROBABILITY' values = 'ALL/TO/OFF' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY' />
+  <param name='QUANTILE' values = 'ALL/OFF/TO/BY' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z' />
+  <param name='FREQUENCY' values = 'ALL/OFF/TO' />
+  <param name='DIRECTION' values = 'ALL/OFF/TO' />
+  <param name='DIAGNOSTIC' values = 'ALL/OFF' />
+  <param name='ITERATION' values = 'ALL/OFF/TO' />
+  <param name='CHANNEL' values = 'ALL/OFF/TO/ALL' />
+  <param name='IDENT' values = 'ALL/METEOSAT 3/METEOSAT 4/METEOSAT 5/METEOSAT 6/METEOSAT 7/METEOSAT 8/GOES 8/GOES 9/GOES 10/GOES 11/GOES 12/DMSP 10/DMSP 13/OFF' />
+  <param name='ORIGIN' values = 'OFF/WASHINGTON/BRACKNELL/FLEET NUMERICAL/OFFENBACH/ECMWF/TOULOUSE/PARIS/MADRID/UNIVERSITY OF VIENNA/KNMI/INGV/CERFACS/IFMK/HADLEY CENTRE/CONSENSUS/MELBOURNE/TOKYO/MONTREAL/BEIJING/SEOUL/CPTEC/CNMC/OSLO/ALL' />
+  <param name='SYSTEM' values = 'ALL/OFF' />
+  <param name='METHOD' values = 'TO/BY/ALL/OFF/OFF' />
+  <param name='PRODUCT' values = 'INSTANTANEOUS/TIME-SERIES/TIME-AVERAGE/TIME-ACCUMULATION/ALL/OFF' />
+  <param name='SECTION' values = 'HORIZONTAL/VERTICAL/ZONAL/MERIDIONAL/ALL/OFF' />
+  <param name='LATITUDE' values = 'OFF' />
+  <param name='LONGITUDE' values = 'OFF' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='LOGSTATS' values = 'OFF' />
+  <param name='TRANSFER' values = 'HANDLE/DATA/OFF' />
+  <param name='FIELDSET' values = 'OFF' />
+  <param name='CFSPATH' />
+  <param name='FORMAT' values = 'PACKED/UNPACKED/GRIB EDITION 1/GRIB EDITION 2' />
+  <param name='DISP' values = 'NEW/OLD/REMOVE/OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/REDUCED GAUSSIAN 128/REDUCED GAUSSIAN 160/REDUCED GAUSSIAN 200/OFF/319/213/106/63' />
+  <param name='ACCURACY' values = 'NORMAL/REDUCED/LOW/OFF/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF' />
+  <param name='AREA' values = 'GLOBE/EUROPE/NORTHERN HEMISPHERE OCTANT 1/NORTHERN HEMISPHERE OCTANT 2/NORTHERN HEMISPHERE OCTANT 3/NORTHERN HEMISPHERE OCTANT 4/SOUTHERN HEMISPHERE OCTANT 1/SOUTHERN HEMISPHERE OCTANT 2/SOUTHERN HEMISPHERE OCTANT 3/SOUTHERN HEMISPHERE OCTANT 4/OFF' />
+  <param name='LOCATION' values = 'OFF' />
+  <param name='BLOCK' values = 'OFF' />
+  <param name='INSTRUMENT' values = 'MHS/MVIRI/SEVIRI/GOES IMAGER/AMSU-A/AMSU-B/MSU/HIRS2/HIRS3/SSU/OFF' />
+  <param name='FILTER' values = 'OFF' />
+  <param name='ROTATION' values = 'OFF' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='GRID' values = 'ARCHIVED VALUE/320/160/80/48/OFF' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='PACKING' values = 'SI/CO/SO/AV/OFF' />
+  <param name='PADDING' values = 'AUTOMATIC/NONE/OFF/OFF' />
+  <param name='DUPLICATES' values = 'KEEP/REMOVE' />
+  <param name='LAUNCH' />
+  <param name='JOB' values = 'OFF' />
+  <param name='USE' values = 'FREQUENT/INFREQUENT/NORMAL/BOUNDARY CONDITIONS/COMPARE/MONTHLY RUN' />
+  <param name='PASSWORD' values = 'OFF' />
+  <param name='COSTONLY' values = 'YES/NO' />
+  <param name='PROCESS' values = 'LOCAL/SERVER/OFF' />
+  <param name='BRANCH' values = 'TRUE/FALSE/OFF' />
+  <param name='DATABASE' values = 'OFF' />
+  <param name='EXPECT' values = 'ANY/OFF' />
+</function>
+<function name='retrieve_tigge'>
+  <param name='DATASET' />
+  <param name='CLASS' values = 'TIGGE' />
+  <param name='TYPE' values = 'CONTROL FORECAST/FORECAST/PERTURBED FORECAST/ALL' />
+  <param name='STREAM' values = 'ENFO/DA' />
+  <param name='EXPVER' values = 'PROD/TEST/ALL' />
+  <param name='MODEL' values = 'GLOB/LAM/OFF' />
+  <param name='REPRES' values = 'BUFR/SPHERICAL HARMONICS/LAT LONG GRID/GAUSSIAN GRID/SPACE VIEW/OCEAN GRID/ALL' />
+  <param name='LEVTYPE' values = 'POTENTIAL VORTICITY/POTENTIAL TEMPERATURE/SURFACE/PRESSURE LEVELS/MODEL LEVELS/ALL' />
+  <param name='LEVELIST' values = 'TO/BY/ALL/OFF' />
+  <param name='PARAM' values = 'ALL/10 METER U VELOCITY/10 METER V VELOCITY/CONVECTIVE AVAILABLE POTENTIAL ENERGY/CONVECTIVE INHIBITION/GEOPOTENTIAL HEIGHT/LAND SEA MASK/MEAN SEA LEVEL PRESSURE/OROGRAPHY/POTENTIAL TEMPERATURE/POTENTIAL VORTICITY/SKIN TEMPERATURE/SNOW DEPTH WATER EQUIVALENT/SNOW FALL WATER EQUIVALENT/SOIL MOISTURE/SOIL TEMPERATURE/SPECIFIC HUMIDITY/SUNSHINE DURATION/SURFACE AIR DEW POINT TEMPERATURE/SURFACE AIR MAXIMUM TEMPERATURE/SURFACE AIR MINIMUM TEMPERATURE/SURFACE A [...]
+  <param name='YEAR' values = 'TO/BY/ALL' />
+  <param name='MONTH' values = 'TO/BY/ALL' />
+  <param name='DATE' values = 'JANUARY/FEBRUARY/MARCH/APRIL/MAY/JUNE/JULY/AUGUST/SEPTEMBER/OCTOBER/NOVEMBER/DECEMBER/CURRENT DATE/YESTERDAY/TO/BY/OFF' />
+  <param name='TIME' values = 'TO/BY/ALL/12' />
+  <param name='STEP' values = 'ALL/TO/BY' />
+  <param name='ANOFFSET' values = 'ALL/TO/BY/OFF' />
+  <param name='NUMBER' values = 'ALL/OFF/TO/BY' />
+  <param name='DOMAIN' values = 'GENERAL EUROPEAN AREA/GLOBE/MEDITERRANEAN/NORTHERN HEMISPHERE/SOUTHERN HEMISPHERE/BALTIC AND BLACK SEA/EUROPE/NORTH WEST EUROPE/NORTH EAST EUROPE/SOUTH WEST EUROPE/SOUTH EAST EUROPE/WESTERN ATLANTIC/FASTEX/TROPICS/TROPICS 2/X/ALL/V/H/I/J/K/L/O/P/Q/R/Y/Z' />
+  <param name='ORIGIN' values = 'KWBC/BABJ/ECMF/EGRR/RJTD/AMMC/CWAO/RKSL/SBSJ/LFPW/COSMOLEPS-ARPASIMC-EU/ALL' />
+  <param name='SOURCE' values = 'OFF' />
+  <param name='TARGET' values = 'OFF' />
+  <param name='TRANSFER' values = 'HANDLE/DATA/OFF' />
+  <param name='FIELDSET' values = 'OFF' />
+  <param name='CFSPATH' />
+  <param name='FORMAT' values = 'PACKED/UNPACKED/GRIB EDITION 1/GRIB EDITION 2' />
+  <param name='DISP' values = 'NEW/OLD/REMOVE/OFF' />
+  <param name='RESOL' values = 'ARCHIVED VALUE/AUTOMATIC RESOLUTION/REDUCED GAUSSIAN 128/REDUCED GAUSSIAN 200/OFF/319/213/106/63' />
+  <param name='ACCURACY' values = 'NORMAL/REDUCED/LOW/ARCHIVED VALUE' />
+  <param name='STYLE' values = 'DISSEMINATION/OFF' />
+  <param name='INTERPOLATION' values = 'NEAREST NEIGHBOUR/NEAREST LSM/BILINEAR/OFF' />
+  <param name='AREA' values = 'GLOBE/EUROPE/NORTHERN HEMISPHERE OCTANT 1/NORTHERN HEMISPHERE OCTANT 2/NORTHERN HEMISPHERE OCTANT 3/NORTHERN HEMISPHERE OCTANT 4/SOUTHERN HEMISPHERE OCTANT 1/SOUTHERN HEMISPHERE OCTANT 2/SOUTHERN HEMISPHERE OCTANT 3/SOUTHERN HEMISPHERE OCTANT 4' />
+  <param name='LOCATION' values = 'OFF' />
+  <param name='BLOCK' values = 'OFF' />
+  <param name='ROTATION' values = 'OFF' />
+  <param name='FRAME' values = 'OFF' />
+  <param name='BITMAP' values = 'OFF' />
+  <param name='GRID' values = 'ARCHIVED VALUE/320/160/80/48/OFF' />
+  <param name='GAUSSIAN' values = 'REDUCED/REGULAR/OFF' />
+  <param name='SPECIFICATION' values = 'OFF' />
+  <param name='PACKING' values = 'SI/CO/SO/AV/JPEG/OFF' />
+  <param name='PADDING' values = 'AUTOMATIC/NONE/OFF/OFF' />
+  <param name='DUPLICATES' values = 'KEEP/REMOVE' />
+  <param name='LAUNCH' />
+  <param name='USE' values = 'FREQUENT/INFREQUENT/NORMAL/BOUNDARY CONDITIONS' />
+  <param name='PASSWORD' values = 'OFF' />
+  <param name='COSTONLY' values = 'YES/NO' />
+  <param name='PROCESS' values = 'LOCAL/OFF' />
+  <param name='DATABASE' />
+  <param name='EXPECT' values = 'ANY/OFF' />
+</function>
+<function name='scm_run'>
+  <param name='SCM_EXE_PATH' />
+  <param name='SCM_INPUT_DATA' />
+  <param name='SCM_INPUT_DATA_PATH' />
+  <param name='SCM_NAMELIST' />
+  <param name='SCM_NAMELIST_PATH' />
+  <param name='SCM_VTABLE' />
+  <param name='SCM_VTABLE_PATH' />
+  <param name='SCM_RCLIM_PATH' />
+  <param name='SCM_COPY_OUTPUT_DATA' values = 'ON/OFF' />
+  <param name='SCM_OUTPUT_DATA_PATH' />
+</function>
+<function name='scm_visualiser'>
+  <param name='SCM_PLOT_TYPE' values = 'TIME_VALUE_CURVE/TIME_HEIGHT_MATRIX/PROFILE' />
+  <param name='SCM_DATA_FILENAME' values = 'OFF' />
+  <param name='SCM_DATA' />
+  <param name='SCM_DATA_TITLE' />
+  <param name='SCM_DATA_TYPE' values = 'INPUT/OUTPUT' />
+  <param name='SCM_COMPARE_DATA' values = 'ON/OFF' />
+  <param name='SCM_COMPARISON_DATA_FILENAME' values = 'OFF' />
+  <param name='SCM_COMPARISON_DATA' />
+  <param name='SCM_COMPARISON_DATA_TITLE' />
+  <param name='SCM_COMPARISON_MODE' values = 'OVERLAY/DIFFERENCE' />
+  <param name='SCM_OUTPUT_1D_VARIABLES' values = 'Skin Temperature/Skin Reservoir Water Content/Snow Depth -liquid equivalent-/Snow Temperature/Snow Albedo/Snow Density/Tiles/Orographic Variances/Water Vapor Path/Liquid Water Path/Ice Water Path/Boundary Layer Height/Total Cloud Cover/Low Cloud Cover/Middle Cloud Cover/High Cloud Cover/Convective Rain/Convective Snow/Stratiform Rain/Stratiform Snow/Top SW Radiation Incoming/Deep/Shallow/Midlevel Convection/Dry stable/Dry conv/Sc/Cu/Index [...]
+  <param name='SCM_OUTPUT_2D_VARIABLES' values = 'Pressure - full levels/Pressure - half levels/Height - full levels/Height - half levels/Relative Humidity/Temperature/Potential Temperature/Equivalent Potential Temperature/U Wind/V Wind/Dry Static Energy/Moist Static Energy/Water Vapor Mixing Ratio/Liquid Water Mixing Ratio/Ice Water Mixing Ratio/Cloud Fraction/Rain Water Mixing Ratio/Snow Water Mixing Ratio/Soil Temperature/Soil Moisture/Saturation Specific Humidity/Tiled Surface Sensib [...]
+  <param name='SCM_INPUT_1D_VARIABLES' values = 'Date/Second/latitude/Extra variable lon/surface pressure/Momentum Roughness Length/Momentum Roughness Length/High Vegetation Type/Low Vegetation Type/High Vegetation cover/Low Vegetation cover/Skin Temperature/Skin Temperature/Surface Sensible Heat flux/Surface Latent Heat flux/Land-Sea Mask/Sea Ice Fraction/Sea Ice Temperature/Open SST/Snow Depth/Snow Temperature/Snow Albedo/Snow Density/Orography/Orography -SD form drag/Orography -SD/Oro [...]
+  <param name='SCM_INPUT_2D_VARIABLES' values = 'Pressure - full level/Pressure - half level/Height - full level/Height - half level/U wind/V wind/Temperature/Water vapor mixing ratio/Liquid water mixing ratio/Ice water mixing ratio/cloud fraction/Potential Temperature/Equivalent Potential Temperature/Dry static energy/Moist static energy/relative humidity/Saturation specific humidity/Geostrophic U wind/Geostrophic V wind/Advective T tendency/Advective Q tendency/Advective U tendency/Adv [...]
+  <param name='SCM_TIMES' values = 'TO/BY/LAST/ALL' />
+  <param name='SCM_X_MIN_LIST' />
+  <param name='SCM_X_MAX_LIST' />
+  <param name='SCM_Y_MIN_LIST' />
+  <param name='SCM_Y_MAX_LIST' />
+  <param name='SCM_VALUE_MIN_LIST' />
+  <param name='SCM_VALUE_MAX_LIST' />
+  <param name='SCM_GRID' values = 'ON/OFF' />
+  <param name='SCM_OUTPUT_MODE' values = 'SCREEN/POSTSCRIPT' />
+  <param name='SCM_OUTPUT_FILE_PATH' />
+</function>
+<function name='seqpott_m'>
+  <param name='LNSP' />
+  <param name='TEMPERATURE' />
+</function>
+<function name='seqpott_p'>
+  <param name='TEMPERATURE' />
+</function>
+<function name='slider'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='min' />
+  <param name='max' />
+  <param name='step' />
+  <param name='direction' values = 'max_on_left/max_on_right' />
+  <param name='exclusive' values = 'true' />
+</function>
+<function name='stations'>
+  <param name='STATION_TYPE' values = 'WMO_STATION/EPS_STATION/LOCATION/NOT_USED' />
+  <param name='SEARCH_STATIONS_DATABASE' values = 'YES - WMO_STATION/NO - LOCATION' />
+  <param name='SEARCH_KEY' values = 'NAME/IDENT/WMO_BLOCK/POSITION/AREA' />
+  <param name='NAME' />
+  <param name='POSITION' />
+  <param name='HEIGHT' />
+  <param name='THRESHOLD' />
+  <param name='IDENT' />
+  <param name='WMO_BLOCK' />
+  <param name='AREA' />
+</function>
+<function name='streamfn'>
+  <param name='DATA' />
+  <param name='TRUNCATION' values = 'AV' />
+  <param name='SMOOTHING' values = 'YES/NO' />
+  <param name='SCALING' values = 'YES/NO' />
+  <param name='FLTC' />
+  <param name='MFLTEXP' />
+</function>
+<function name='svg_output'>
+  <param name='OUTPUT_TITLE' />
+  <param name='OUTPUT_WIDTH' />
+  <param name='OUTPUT_RESOLUTION' />
+  <param name='OUTPUT_NAME' />
+  <param name='OUTPUT_NAME_FIRST_PAGE_NUMBER' values = 'ON/OFF' />
+  <param name='OUTPUT_FULLNAME' />
+  <param name='OUTPUT_LEGACY_NAME' />
+  <param name='OUTPUT_FILE_MINIMAL_WIDTH' />
+  <param name='OUTPUT_FILE_SEPARATOR' />
+  <param name='OUTPUT_DEBUG' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST' values = 'ON/OFF' />
+  <param name='OUTPUT_FILELIST_NAME' />
+  <param name='OUTPUT_SVG_DESC' />
+  <param name='OUTPUT_SVG_META' />
+  <param name='OUTPUT_SVG_USE_EXTERNAL_FILES' values = 'ON/OFF' />
+  <param name='OUTPUT_SVG_SCRIPTING' values = 'ON/OFF' />
+  <param name='OUTPUT_SVG_FIX_SIZE' values = 'ON/OFF' />
+  <param name='OUTPUT_SVG_LOGO_LOCATION' />
+  <param name='CLASS' />
+</function>
+<function name='table'>
+</function>
+<function name='table_visualiser'>
+  <param name='TABLE_PLOT_TYPE' values = 'XY_POINTS/GEO_POINTS/XY_VECTORS/GEO_VECTORS/XY_BINNING/GEO_BINNING' />
+  <param name='TABLE_FILENAME' values = 'OFF' />
+  <param name='TABLE_DATA' />
+  <param name='TABLE_X_TYPE' values = 'NUMBER/DATE' />
+  <param name='TABLE_Y_TYPE' values = 'NUMBER/DATE' />
+  <param name='TABLE_VARIABLE_IDENTIFIER_TYPE' values = 'NAME/INDEX' />
+  <param name='TABLE_X_VARIABLE' />
+  <param name='TABLE_Y_VARIABLE' />
+  <param name='TABLE_X_MISSING_VALUE' />
+  <param name='TABLE_Y_MISSING_VALUE' />
+  <param name='TABLE_LONGITUDE_VARIABLE' />
+  <param name='TABLE_LATITUDE_VARIABLE' />
+  <param name='TABLE_X_COMPONENT_VARIABLE' />
+  <param name='TABLE_Y_COMPONENT_VARIABLE' />
+  <param name='TABLE_VALUE_VARIABLE' />
+  <param name='TABLE_BINNING' />
+  <param name='TABLE_DELIMITER' />
+  <param name='TABLE_COMBINE_DELIMITERS' values = 'ON/OFF' />
+  <param name='TABLE_HEADER_ROW' />
+  <param name='TABLE_DATA_ROW_OFFSET' />
+  <param name='TABLE_META_DATA_ROWS' />
+</function>
+<function name='toggle'>
+  <param name='name' />
+  <param name='exclusive' values = 'true' />
+  <param name='true' />
+  <param name='false' />
+  <param name='values' />
+  <param name='default' />
+</function>
+<function name='togrib'>
+</function>
+<function name='ui_float'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='min' />
+  <param name='max' />
+  <param name='exclusive' values = 'false' />
+</function>
+<function name='ui_integer'>
+  <param name='name' />
+  <param name='values' />
+  <param name='default' />
+  <param name='min' />
+  <param name='max' />
+  <param name='exclusive' values = 'false' />
+</function>
+<function name='uvwind'>
+  <param name='DATA' />
+  <param name='TRUNCATION' values = 'AV' />
+  <param name='SMOOTHING' values = 'YES/NO' />
+  <param name='FLTC' />
+  <param name='MFLTEXP' />
+</function>
+<function name='velpot'>
+  <param name='DATA' />
+  <param name='TRUNCATION' values = 'AV' />
+  <param name='SMOOTHING' values = 'YES/NO' />
+  <param name='SCALING' values = 'YES/NO' />
+  <param name='FLTC' />
+  <param name='MFLTEXP' />
+</function>
+<function name='vert_prof'>
+</function>
+<function name='wcsclient'>
+  <param name='MODE' values = 'EXPERT/INTERACTIVE' />
+  <param name='SERVER' />
+  <param name='VERSION' />
+  <param name='REQUEST' />
+  <param name='EXTRA_GETCAP_PAR' />
+  <param name='EXTRA_GETMAP_PAR' />
+  <param name='HTTP_USER' />
+  <param name='HTTP_PASSWORD' />
+  <param name='LAYER_DESCRIPTION' />
+  <param name='SERVICE_TITLE' />
+  <param name='TIME_DIMENSIONS' />
+</function>
+<function name='webaccess'>
+  <param name='URL' />
+</function>
+<function name='wmsclient'>
+  <param name='MODE' values = 'EXPERT/INTERACTIVE' />
+  <param name='SERVER' />
+  <param name='VERSION' />
+  <param name='REQUEST' />
+  <param name='EXTRA_GETCAP_PAR' />
+  <param name='EXTRA_GETMAP_PAR' />
+  <param name='HTTP_USER' />
+  <param name='HTTP_PASSWORD' />
+  <param name='LAYER_TITLE' />
+  <param name='LAYER_DESCRIPTION' />
+  <param name='SERVICE_TITLE' />
+  <param name='LAYER_LEGEND' />
+  <param name='LAYER_NOSUBSETS' />
+  <param name='LAYER_FIXEDWIDTH' />
+  <param name='LAYER_FIXEDHEIGHT' />
+  <param name='TIME_DIMENSIONS' />
+  <param name='LAYER_LOGO' />
+  <param name='MAX_BOUNDING_BOX' />
+</function>
+<function name='xs_average'>
+</function>
+</macro_icon_functions>
diff --git a/share/metview/etc/macro_templates.txt b/share/metview/etc/macro_templates.txt
new file mode 100644
index 0000000..18ae344
--- /dev/null
+++ b/share/metview/etc/macro_templates.txt
@@ -0,0 +1,236 @@
+{basic for loop}
+for _ = _ to _ do
+	<code>
+end for
+
+{for loop with step}
+for _ = _ to _ by _ do
+	<code>
+end for
+
+{basic while loop}
+while _ do
+	<code>
+end while
+
+{basic repeat loop}
+repeat
+	<code>
+until _
+
+{loop through a list}
+loop _ in _
+	<code>
+end loop
+
+{basic if test}
+if _ then
+	<code>
+end if
+
+{if/else test}
+if _ then
+	<code>
+else
+	<code>
+end if
+
+{if/else if/else test}
+if _ then
+	<code>
+else if _ then
+	<code>
+else
+	<code>
+end if
+
+{when statement}
+when
+	<test> :
+	<code>	
+	end
+
+	<test> :
+	<code>
+	end
+end when
+
+{case statement}
+case _ of
+	_ :
+		<code>
+		end
+
+	_ :
+		<code>
+		end
+
+	otherwise :
+		<code>
+		end
+end case
+
+{function with no parameters}
+# ----------------------------------------------------------------------------
+# Function      : func_name
+#
+# Author (date) : anonymous (--/--/2004)
+#
+# Description   : 
+#
+# Return value  : 
+# ----------------------------------------------------------------------------
+
+function func_name ()
+end func_name
+
+{function with general parameters}
+# ----------------------------------------------------------------------------
+# Function      : func_name
+#
+# Author (date) : anonymous (--/--/2004)
+#
+# Description   : 
+#
+# Parameters    : 
+#
+# Return value  : 
+# ----------------------------------------------------------------------------
+
+function func_name (param1, param2)
+end func_name
+
+{function with specific parameters}
+# ----------------------------------------------------------------------------
+# Function      : func_name
+#
+# Author (date) : anonymous (--/--/2004)
+#
+# Description   : 
+#
+# Parameters    : 
+#
+# Return value  : 
+# ----------------------------------------------------------------------------
+
+function func_name (param1: type, param2: type)
+end func_name
+
+{function with any no of parameters}
+# ----------------------------------------------------------------------------
+# Function      : func_name
+#
+# Author (date) : anonymous (--/--/2004)
+#
+# Description   : 
+#
+# Parameters    : 
+#
+# Return value  : 
+# ----------------------------------------------------------------------------
+
+function func_name
+	loop arg in arguments()
+	end loop
+end func_name
+
+
+{function for macro library}
+# **************************************************************************
+# Function      : name
+#
+# Syntax        : 
+#
+# Author (date) : Anonymous (--/--/----)
+#
+# Category      : 
+#
+# OneLineDesc   : 
+#
+# Description   : 
+#
+# Parameters    : 
+#
+# Return Value  : 
+#
+# Dependencies  : 
+#
+# Example Usage : 
+#
+# **************************************************************************
+
+function func_name (param1: type, param2: type)
+end func_name
+
+
+{runmode tests}
+
+# Execute specific code depending on the runmode
+
+strMode = runmode()
+
+case strMode of
+	'execute':
+		print ('Running in execute mode')
+		end
+
+	'visualise' :
+		print ('Running in visualise mode')
+		end
+
+	'examine' :
+		print ('Running in examine mode')
+		end
+
+	'save' :
+		print ('Running in save mode')
+		end
+
+	'edit' :
+		print ('Running in edit mode')
+		end
+
+	'batch' :
+		print ('Running in batch mode')
+		end
+
+	'prepare' :
+		print ('Running in prepare mode')
+		end
+
+	otherwise :
+		fail ('Running in unknown mode - ' & strMode)
+		end
+end case
+
+{SCM interactive plot}
+# we supply an empty parameter definition for the function, which will mean that
+# a user interface will be brought up using default values
+
+scm_plot_params = ()
+
+mvl_plot_scm_data(scm_plot_params)
+
+{SCM batch plot}
+# we supply a parameter definition with some preferences. If mode = interactive,
+# then a user interface will appear so that the user can make further selections;
+# otherwise the macro will run using only the arguments defined here (and will
+# produce a PostScript file).
+
+scm_plot_params = 
+(
+    mode            : 'batch',  # 'interactive' or 'batch'
+    netcdf_1        : 'scm_out.nc',
+    #netcdf_2        : 'scm_out_2.nc', # should be nil, or omit the parameter if no comparison file
+    comparison_mode : 'overlay',      # 'overlay' or 'difference'
+    output_mode     : 'ps',       # 'ps' or 'screen'
+    output_path     : 'scm_out',      # only if mode='batch'. Do not supply an extension.
+    param_selection : 'list',         # 'list', 'file' or 'all'
+    param_list_path : nil,            # path to a text file containing each parameter name on a new line
+    param_list      : ['t_skin', 'top_lwrad_clr', 'u_wind_10m'] # if param_selection is 'list'
+)
+
+
+mvl_plot_scm_data(scm_plot_params)
+
+
diff --git a/share/metview/etc/mars.chk b/share/metview/etc/mars.chk
new file mode 100755
index 0000000..4a616bf
--- /dev/null
+++ b/share/metview/etc/mars.chk
@@ -0,0 +1,764 @@
+!
+! This is the mars check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!          ---> info	 MESSAGE
+!          ---> mail	 MESSAGE
+!          ---> set      PARAMETER = VALUE
+!          ---> unset    PARAMETER 
+!
+!
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+
+# Remove access to marsodb
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = REMOVE)
+	%and DATABASE=marsodb %then
+	%unset DATABASE
+
+%include "oldrd.chk"
+
+
+%if CLASS = OD %and (TYPE = CM %or TYPE = CS %or TYPE = CR) %and DOMAIN = G %then 
+	%warning "Domain forced to E"
+	%set DOMAIN = E
+
+%if (TYPE = IM %or TYPE = SIM %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%set REPRES = SV
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset RESOL
+	%unset DUPLICATES 
+	%unset GRID 
+	%unset ROTATION 
+
+# Simulated radiances
+%if (TYPE = SSD) %then
+	%unset LEVTYPE
+	%unset LEVELIST
+
+
+%if (TYPE = IM  %or TYPE = OLDIM) %and STREAM <> SSMI %then
+	%unset STEP
+
+
+%if TYPE = OB %or TYPE = FB  %or STREAM = SSMI %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = OFB %or TYPE = MFB %then 
+	%set REPRES = BU
+	%unset PARAM  
+	%unset STEP  
+	%unset LEVTYPE  
+	%unset LEVELIST  
+	%unset GRID 
+	%unset ROTATION 
+
+%if TYPE = TF %then
+	%set REPRES = BU
+	%unset PARAM
+	%unset LEVTYPE
+	%unset LEVELIST
+	%unset GRID 
+	%unset ROTATION
+
+%if TYPE = AB %then
+	%unset TIME
+
+%if TYPE = OB %or TYPE = FB %then
+	%unset ORDER
+
+%if TYPE = CL %then
+	%unset STEP
+
+%if LEVTYPE = SFC %or LEVTYPE = WAVE %then 
+	%unset LEVELIST
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = ER %and STREAM = OPER %and (TYPE = AN %or TYPE = FC) %and (%not REPRES) %then
+	%set REPRES = GG
+
+%if LEVTYPE = SFC %and CLASS = OD %and STREAM = OPER %and (TYPE = IA %or TYPE = AN) %and DATE < 19830420 %then
+	%set REPRES = LL
+
+%if (_VERB = RETRIEVE %and TYPE = TU) %then
+	%set REPRES = LL
+
+%if %not ( TYPE = OLDIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then 
+	%unset OBSTYPE 
+	%unset OBSGROUP 
+	%unset DUPLICATES 
+
+%if %not ( TYPE = IM %or TYPE = OLDIM %or TYPE = SIM %or TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB %or TYPE = SSD) %then 
+	%unset IDENT 
+
+%if _VERB = LIST %and %not OBSGROUP %and (TYPE = OB %or TYPE = FB %or TYPE = AI %or TYPE = AF %or TYPE = AB %or TYPE = TF %or TYPE = OFB %or TYPE = MFB) %then
+	%set OBSGROUP = ALL
+
+%if GRID=O  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+%if GRID=AV  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset GRID
+
+%if (RESOL=AUTO %or RESOL=AV) %and (%not GRID) %then %unset RESOL
+%if (STYLE = DISSEMINATION) %and (RESOL=AUTO %or (%not RESOL)) %then 
+	%warning "Force RESOL=AV when STYLE=DISSEMINATION"
+	%set RESOL=AV
+
+%if AREA = E %then
+	%set AREA = 73.5/-27/33/45
+
+%if (AREA = G %or AREA = GLOBE) %and (_APPL = diss) %then
+	%warning "Expand global AREA for dissemination to AREA = 90/0/-90/359.99"
+	%set AREA = 90/0/-90/359.99
+
+%if AREA = G %then
+	%set _AREA_N = 0
+	%set _AREA_W = 0
+	%set _AREA_S = 0
+	%set _AREA_E = 0
+
+%if AREA = G %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+%if AREA = GLOBE %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then %unset AREA
+
+%if FORMAT = P %or FORMAT = PACKED  %then %unset FORMAT
+
+# %if FORMAT %then %warning "Format is not yet implemented" %unset FORMAT
+
+
+%if USE = NORMAL     %then %unset USE
+%if USE = STAGE     %then %set TARGET="/dev/null" %unset FIELDSET %set EXPECT=0
+%if COSTONLY = N %then %unset COSTONLY
+
+
+
+!
+!
+!
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CLASS=ANY     %then %unset CLASS
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STREAM=ANY    %then %unset STREAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and MODEL=ANY     %then %unset MODEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVTYPE=ANY   %then %unset LEVTYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEVELIST=ANY  %then %unset LEVELIST
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE=ANY      %then %unset TYPE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PARAM=ANY     %then %unset PARAM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DATE=ANY      %then %unset DATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TIME=ANY      %then %unset TIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STEP=ANY      %then %unset STEP
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ANOFFSET=ANY %then %unset ANOFFSET
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and AREA=ANY      %then %unset AREA
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and GRID=ANY      %then %unset GRID
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ROTATION=ANY  %then %unset ROTATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and STYLE=ANY     %then %unset STYLE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RESOL=ANY     %then %unset RESOL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORDER=0       %then %unset ORDER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and EXPVER=ANY    %then %unset EXPVER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFERENCE=ANY %then %unset REFERENCE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DOMAIN=ANY    %then %unset DOMAIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ORIGIN=ANY    %then %unset ORIGIN
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and CHANNEL=ANY   %then %unset CHANNEL
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and RANGE=ANY     %then %unset RANGE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LEADTIME=ANY  %then %unset LEADTIME
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and OPTTIME=ANY   %then %unset OPTTIME
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PADDING=ANY     %then %unset PADDING
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SYSTEM=ANY     %then %unset SYSTEM
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and METHOD=ANY     %then %unset METHOD
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and PRODUCT=ANY     %then %unset PRODUCT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and SECTION=ANY     %then %unset SECTION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LATITUDE=ANY     %then %unset LATITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and LONGITUDE=ANY     %then %unset LONGITUDE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and NUMBER=ANY     %then %unset NUMBER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and QUANTILE=ANY     %then %unset QUANTILE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and ITERATION=ANY     %then %unset ITERATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIAGNOSTIC=ANY     %then %unset DIAGNOSTIC
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INSTRUMENT=ANY     %then %unset INSTRUMENT
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FILTER=ANY     %then %unset FILTER
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and INTERPOLATION=ANY     %then %unset INTERPOLATION
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and REFDATE=ANY     %then %unset REFDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and HDATE=ANY     %then %unset HDATE
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and FREQUENCY=ANY     %then %unset FREQUENCY
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and DIRECTION=ANY     %then %unset DIRECTION
+
+
+
+
+%if TYPE <> CF %and TYPE <> PF %and TYPE <> CV %then %unset ENSEMBLE
+%if TYPE <> CM %and TYPE <> CS  %then %unset CLUSTER
+%if TYPE <> FP %then %unset PROBABILITY
+
+
+#%if TYPE <> CF %and 
+%if TYPE <> PF %and 
+	TYPE <> CM %and 
+	TYPE <> CS %and 
+	TYPE <> CR %and 
+	TYPE <> CV %and 
+	TYPE <> SV %and 
+	TYPE <> AS %and 
+	TYPE <> FP %and 
+	TYPE <> ED %and 
+	TYPE <> TU %and 
+	TYPE <> CI %and
+	TYPE <> ME %and 
+	TYPE <> FF %and           # Ocean
+	TYPE <> ICP %and 
+	TYPE <> SOT %and 
+	TYPE <> FCMEAN %and
+	TYPE <> FCMAX %and
+	TYPE <> FCMIN %and
+	TYPE <> FCSTDEV %and
+	TYPE <> SVAR %and
+	CLASS <> TI %and
+	STREAM <> MOFC %and 
+	STREAM <> WAMF %and 
+	STREAM <> MOFM %and 
+	STREAM <> WMFM %and 
+	STREAM <> SEAS %and 
+	STREAM <> WASF %and
+	STREAM <> WAMF %and
+	STREAM <> SFMM %and
+	STREAM <> SMMA %and
+	STREAM <> SEAP %and 
+	STREAM <> SWMM %and
+	STREAM <> OCEA %and
+# New Monthly Forecast
+	STREAM <> MNFC %and
+    STREAM <> MNFH %and
+    STREAM <> MNFA %and
+    STREAM <> MNFW %and
+    STREAM <> MFHW %and
+    STREAM <> MFAW %and
+    STREAM <> MNFM %and
+    STREAM <> MFHM %and
+    STREAM <> MFAM %and
+    STREAM <> MFWM %and
+    STREAM <> MHWM %and
+    STREAM <> MAWM %and
+# New Multi-model
+	STREAM <> MMSF %and 
+	STREAM <> MSMM %and 
+	STREAM <> WAMS %and 
+	STREAM <> MSWM %and 
+	STREAM <> MMSA %and 
+# Ensemble Data Assimilation
+	STREAM <> ENDA %and 
+	STREAM <> EWDA %and 
+	STREAM <> EDMM %and 
+	STREAM <> EDMO %and 
+	STREAM <> EWMM %and 
+	STREAM <> EWMO %and 
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %and 
+# Ensemble Supplementary data
+	STREAM <> ESPD %and 
+# Multi-model Multi-annual
+	STREAM <> MMAF %and 
+	STREAM <> MMAM %and 
+	STREAM <> MMAW %and 
+	STREAM <> MMWM %and 
+	STREAM <> SEAS %then
+	%unset NUMBER
+
+%if STREAM <> ENFH %and 
+	STREAM <> ENWH %and
+	STREAM <> EFHO %and
+	STREAM <> EHMM %and
+	STREAM <> EWHO %then
+	%unset HDATE
+
+%if (TYPE <> PD %and 
+    TYPE <> CD %and
+    TYPE <> PB) %then
+	%unset QUANTILE
+
+%if ( STREAM = MNFM %or
+	STREAM = MFHM %or
+    STREAM = MFAM %or
+    STREAM = MFWM %or
+    STREAM = MHWM %or
+    STREAM = ESMM %or
+    STREAM = EHMM %or
+    STREAM = MAWM )
+	%then
+	%unset STEP
+
+%if ( STREAM = MFHM %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES) )
+	%then 
+	%unset DATE
+
+%if ( STREAM = MNFH %and
+	( TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = ED ) )
+	%then
+	%unset DATE
+
+%if (_VERB = RETRIEVE %or _VERB = ARCHIVE) %and 
+	(STREAM <> MOFC %and STREAM <> WAMF %and STREAM <> MOFM %and STREAM <> WMFM) %and 
+	(TYPE = CF %or TYPE = EM %or TYPE = ES %or TYPE = SES %or TYPE = TAEM %or TYPE = TAES) %then 
+	%unset ENSEMBLE %unset NUMBER
+
+! For read
+%if _VERB = READ %and CLASS  <> ANY %then %warning "CLASS  ignored in READ"
+%if _VERB = READ %and REPRES <> ANY %then %warning "REPRES ignored in READ"
+
+%if _VERB = READ %then 
+	%unset CLASS 
+	%unset REPRES
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %and TYPE = FG %and STEP = 0 %and STREAM = OPER  
+	%then 
+		%warning "First Guess step 0 removed"
+		%error   "Please, use STEP=06 instead"
+
+
+! =========================================
+! For wave, there is no step for FG
+%if (STREAM = WAVE %or STREAM = SCWV %or STREAM = DCWV) %and TYPE = FG %and STEP <> 0 %then 
+	%warning "For wave first-guess, step is ignored and set to zero"
+	%set     STEP = 0
+
+! =========================================
+! There are no waves in altitude
+%if STREAM = WAVE %or 
+	STREAM = WAEF %or 
+	STREAM = WEHS %or 
+	STREAM = WEOV %or 
+	STREAM = WAMO %or 
+	STREAM = SCWV %or 
+	STREAM = DCWV %or 
+	STREAM = WVHC %or
+	STREAM = EWHC %or
+	STREAM = MAWV %or
+	STREAM = WASF %or 
+	STREAM = WAMF %or
+	STREAM = WMFM %or
+	STREAM = SWMM %or
+	STREAM = MNFW %or
+	STREAM = MFHW %or
+	STREAM = MFAW %or
+	STREAM = MFWM %or
+	STREAM = MHWM %or
+	STREAM = MAWM %or
+	STREAM = WAMS %or
+	STREAM = DACW %or
+	STREAM = EWDA %or
+	STREAM = LWWV %or
+	STREAM = EWLA %or
+	STREAM = MSWM %then
+
+	%warning "For wave data, LEVTYPE forced to Surface"
+	%set     LEVTYPE = SFC
+	%unset   LEVELIST
+
+!===========================================================
+
+!
+! Avoid use of ENSEMBLE, CLUSTER and PROBABILITY in new MARS retrieval editors
+
+%if TYPE = PF %and ENSEMBLE = OFF %then %unset ENSEMBLE
+%if (TYPE = CM %or TYPE = CS %or TYPE = CR) %and CLUSTER = OFF %then %unset CLUSTER
+%if (TYPE = FP) %and PROBABILITY = OFF %then %unset PROBABILITY
+
+%if STREAM <> WAVE %and 
+	STREAM <> SCWV %and 
+	STREAM <> DCWV %and 
+	STREAM <> MAWV %and 
+	STREAM <> WASF %and 
+
+	STREAM <> WAEF %and 
+	STREAM <> EWDA %and 
+
+	STREAM <> MNFW %and 
+	STREAM <> MFHW %and 
+	STREAM <> MFAW %and 
+
+	STREAM <> WVHC %and
+	STREAM <> EWHC %and
+
+	STREAM <> ENWH %and
+	STREAM <> EWHO %and
+
+	STREAM <> LWWV %and
+	STREAM <> EWLA %and
+
+	STREAM <> WAMF %then 
+	%unset FREQUENCY %unset DIRECTION
+
+! Avoid visiting all mars tree on the server
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and (%not CLASS))   %then 
+	%warning "Missing CLASS. Force to Operations"
+	%set CLASS= OD
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not DATE) %and (%not PSEUDODATE) ) %then 
+	%warning "Missing DATE. Force to yesterday"
+	%set DATE = -1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not STREAM) ) %then 
+	%warning "Missing STREAM. Force to Daily archive"
+	%set STREAM = OPER
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not EXPVER) ) %then 
+	%warning "Missing EXPVER. Force to 1"
+	%set EXPVER = 1
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS <> RD  %and (%not TYPE) ) %then 
+	%warning "Missing TYPE. Force to Analysis"
+	%set TYPE = AN
+
+%if (_VERB = LIST %and OUTPUT <> BROWSER %and CLASS = RD  %and (%not EXPVER) ) %then 
+	%error "Missing EXPVER. Please, specify one"
+
+%if (_VERB = LIST %and OUTPUT = TREE %and (%not HIDE)) %then 
+	%set HIDE=FILE/LENGTH/MISSING/OFFSET/ID/COST/MONTH/YEAR
+
+
+%if (_VERB = RETRIEVE %and EXPVER = 8 %and (%not GRID)) %then
+	%warning "To get old EXPVER=8 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 0.5/0.5"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 0.5/0.5
+
+%if (_VERB = RETRIEVE %and EXPVER = 8) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+%if (_VERB = RETRIEVE %and EXPVER = 7 %and (%not GRID)) %then
+	%warning "To get old EXPVER=7 SST, please specify:"
+	%warning "ORIGIN = KWBC, EXPVER = 1, GRID = 2/2"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+	%set GRID   = 2/2
+
+%if (_VERB = RETRIEVE %and EXPVER = 7) %then
+	%warning "To get SST, specify the following:"
+	%warning "ORIGIN = KWBC, EXPVER = 1"
+	%set ORIGIN = KWBC
+	%set EXPVER = 1
+
+
+! Observation retrieval from new MARS
+%if (_VERB = RETRIEVE %and (STREAM = SSBT %or STREAM = E1)) %then
+	%warning "Changed STREAM to OPER"
+	%set STREAM = OPER
+
+%if (_VERB = RETRIEVE %and STREAM = SSMI) %then
+	%warning "Changed STREAM=OPER, TYPE=OB"
+	%set STREAM = OPER
+	%set TYPE = OB
+
+%if (ACCURACY = N) %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then
+	%unset ACCURACY
+
+%if (ACCURACY = R %or ACCURACY = L) %then
+	%warning "ACCURACY Low or Reduced force to 8 bits"
+	%set ACCURACY = 8
+
+%if (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) 
+	%and _VERB = RETRIEVE 
+	%and SOURCE 
+	%and (%not DATABASE) %then
+	%set DATABASE = file
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (EXPVER=fdy1) 
+	%and (%not DATABASE) %then
+	%set DATABASE = mars grib2
+
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=E4 %or 
+	      CLASS=EI %or
+		  CLASS=ER %or 
+		  CLASS=PV %or 
+		  CLASS=DM %or 
+		  CLASS=CS %or 
+		  CLASS=TO %or 
+		  CLASS=DT %or 
+		  CLASS=EL %or 
+		  CLASS=YT %or 
+		  CLASS=MC %or 
+		  CLASS=EM %or 
+		  CLASS=E2 %or 
+		  CLASS=ME %or 
+		  CLASS=EN) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marser
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=TI)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsth
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER < 10
+	%and (%not DATABASE) %then
+	%set DATABASE = marsod
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and CLASS=OD 
+	%and EXPVER > 9
+	%and (%not DATABASE) %then
+	%set DATABASE = marsode
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = STAGE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = LIST %or 
+	 _VERB = REMOVE)
+	%and (CLASS=CO %or CLASS=SR %or CLASS=LA %or CLASS=MS %or CLASS=4M) 
+	%and (%not DATABASE) %then
+	%set DATABASE = marsms
+
+%if (_VERB = ARCHIVE %or 
+	 _VERB = FLUSH %or 
+	 _VERB = STAGE %or 
+	 _VERB = REMOVE %or 
+	 _VERB = LIST)
+	%and (CLASS<>E4 %and 
+	      CLASS<>EI %and
+	      CLASS<>TI %and
+		  CLASS<>ER %and 
+		  CLASS<>PV %and 
+		  CLASS<>DM %and 
+		  CLASS<>OD %and 
+		  CLASS<>TO %and
+		  CLASS<>DT %and
+		  CLASS<>EN %and
+		  CLASS<>CO %and
+		  CLASS<>4M %and
+		  CLASS<>SR %and
+		  CLASS<>LA %and
+		  CLASS<>EL %and
+		  CLASS<>MS %and
+		  CLASS<>ME %and
+		  CLASS<>EM %and
+		  CLASS<>E2 %and
+		  CLASS<>MC %and
+		  CLASS<>CS)
+	%and (%not DATABASE) %then
+	%set DATABASE = marsrd
+
+# ocean
+%if LEVTYPE = DP
+	%and (SECTION = M %or SECTION = Z) 
+	%and (PRODUCT = INST %or PRODUCT = TACC %or PRODUCT = TAVG)
+	%then
+	%unset LEVELIST
+
+# Special case for TIMS, V
+%if LEVTYPE = DP
+	%and SECTION = V
+	%and PRODUCT = TIMS 
+	%then
+	%unset LEVELIST
+
+%if LEVTYPE = DP
+	%and TYPE = OR
+	%and (%not PRODUCT)
+	%then
+		%warning "Default PRODUCT for Ocean ReAnalysis set to Instantaneous"
+		%set PRODUCT = INST
+
+
+# Year & month
+%if _VERB = RETRIEVE %and (YEAR %or MONTH) %then
+	%unset DATE
+
+# Boundary Conditions (BC)
+%if _VERB = RETRIEVE %and CLASS = OD %and TIME = 00 %and STREAM = OPER %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCDA for Boundary Conditions Project data"
+
+%if _VERB = RETRIEVE %and CLASS = OD %and TIME = 00 %and STREAM = WAVE %and DATE >= 20000906 %and EXPVER = 02
+%then 
+	%warning "From 20000906 onwards, please use EXPVER=1"
+	%warning "STREAM=SCWV for Boundary Conditions wave data"
+
+%if (_VERB = ARCHIVE %and (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA) %and VERIFY) %then
+	%error "Please, use FCMONTH instead of VERIFY for archiving"
+	%error "Exiting..."
+
+%if ((CLASS <> OD %and CLASS <> EN %and CLASS <> ME) %and SYSTEM ) %then
+	%unset SYSTEM
+
+# A bit of paranoia...
+
+%if _VERB = REMOVE %and CLASS = OD %and %not DATABASE %then
+	%set DATABASE = dhstest
+	
+# That should be disabled in mars.def anyway
+
+%if _VERB = REMOVE %and (
+	CLASS = ER %or
+	CLASS = E4 %or 
+	CLASS = EI %or 
+	CLASS = EM %or 
+	CLASS = E2 %or 
+	CLASS = CS %or 
+	CLASS = PV %or 
+	CLASS = TO %or 
+	CLASS = DT %or 
+	CLASS = PE %or 
+	CLASS = MC %or 
+	CLASS = ME %or 
+	CLASS = DM
+	) %then
+	%error "Cannot remove this data..."
+
+
+%if (CLASS = IT %and MODEL = HRM) %or (CLASS = CO) %then
+	%warning "Post-processing directives are ignored"
+	%set _POSTPROCESSING = 0
+
+%if (STREAM = MODA %or STREAM = MSDA %or STREAM = EDMO %or STREAM = EWMO) %and (CLASS <> ER) %then
+	%unset TIME
+	%unset STEP
+
+%if (STREAM = MDFA) %then
+	%unset TIME
+
+%if (CLASS <> TO %and CLASS <> DT) %or STREAM <> SEAP %then
+	%unset LEADTIME
+	%unset OPTTIME
+
+%if (CLASS=DT) %then
+	%unset METHOD
+
+#########################################
+# Migration from old images to new images
+#########################################
+
+# Meteosat
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=2, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 2 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=3, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 205
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=52 %or IDENT=53 %or IDENT=54))  %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=205"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 205
+
+# GOES
+%if (TYPE=IM %and OBSTYPE=0 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=0 by CHANNEL=4, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 4 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=10 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=10 by CHANNEL=1, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 1 
+	%set INSTRUMENT = 615
+
+%if (TYPE=IM %and OBSTYPE=20 %and (IDENT=252 %or IDENT=253 %or IDENT=254 %or IDENT=255 %or IDENT=256)) %then 
+	%warning "Replacing OBSTYPE=20 by CHANNEL=3, INSTRUMENT=615"
+	%unset OBSTYPE 
+	%set CHANNEL    = 3 
+	%set INSTRUMENT = 615
+
+################################################
+# end of Migration from old images to new images
+################################################
+
+%if (FCMONTH %or FCPERIOD)  %and (_APPL = mars %or _APPL = marsG2 %or _APPL = msserver %or _APPL = uniserver) %then 
+	%unset STEP
+
+# %if (STREAM = SFMM %or STREAM = SWMM %or STREAM = SMMA %or STREAM = MMSA) %then
+# 	%unset STEP
+# 
+
+%if CLASS = TI %then                %unset DOMAIN
+%if CLASS = TI %and TYPE = CF %then %set NUMBER=0
+%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
+%if CLASS = TI %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if CLASS = DM %and TYPE = FC %then %set TIME=0
+
+# ANOFFSET not valid unless Long window 4dvar 
+%if STREAM <> LWDA %and 
+	STREAM <> LWWV %and
+	STREAM <> ELDA %and 
+	STREAM <> EWLA %then
+	%unset ANOFFSET
+
+
+# ERA Interim Data Server at full resolution
+%if ((DATASET = interim_full_daily)  %and
+    ((TYPE <> AN %and TYPE <> FC) %or
+	 (TYPE = FC %and (STEP > 12 %or LEVTYPE <> SFC)))) %then
+	 %error "Dataset ERA-Interim full resolution available only for Analysis and Forecast surface fluxes at time-step <= 12"
+	 %fail
+
+
+# Double-archiving marsrd/marsrd-cluster
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#    (DATABASE = marsrd)) %then %set DATABASE = marsrd/marsrd-cluster
+
+
+#%if ((_VERB = ARCHIVE %or 
+#	 _VERB = FLUSH %or 
+#	 _VERB = REMOVE) %and 
+#     (DATABASE = marstest)) %then %set DATABASE = marstest/marsdev-core
+
+%include "rt_by_obsgroup.chk"
diff --git a/share/metview/etc/obsgroups.def b/share/metview/etc/obsgroups.def
new file mode 100755
index 0000000..ed709d5
--- /dev/null
+++ b/share/metview/etc/obsgroups.def
@@ -0,0 +1,41 @@
+1 ; HIRS ; HIRS
+2 ; AMSUA ; AMSUA
+3 ; AMSUB ; AMSUB
+4 ; MHS ; MHS
+5 ; GEOS ; GEOS
+6 ; RESAT ; RESAT
+7 ; MERIS ; MERIS
+8 ; GPSRO ; GPSRO
+9 ; SATOB ; SATOB
+10 ; SCATT ; SCATT
+11 ; SSMI All-sky ; SSMI_AS
+12 ; IASI ; IASI
+13 ; AIRS ; AIRS
+14 ; SSMIS All-sky ; SSMIS_AS
+15 ; TMI All-sky ; TMI_AS
+16 ; AMSRE All-sky ; AMSRE_AS
+17 ; CONV ; CONV
+19 ; SMOS ; SMOS
+20 ; WINDSAT All-sky ; WINDSAT_AS
+21 ; SSMI ; SSMI
+22 ; AMSUA All-sky ; AMSUA_AS
+23 ; AMSRE ; AMSRE
+24 ; TMI ; TMI
+25 ; SSMIS ; SSMIS
+26 ; GBRAD ; GBRAD
+27 ; MWHS ; MWHS
+28 ; MWTS ; MWTS
+29 ; MWRI All-sky ; MWRI_AS
+30 ; IRAS ; IRAS
+31 ; MSU ; MSU
+32 ; SSU ; SSU
+33 ; VTPR1 ; VTPR1
+34 ; VTPR2 ; VTPR2
+35 ; ATMS ; ATMS
+36 ; RESAT Averaging Kernels ; RESAT_AK
+37 ; CRIS ; CRIS
+38 ; WAVE integrated Parameters ; WAVE_IP
+39 ; WAVE spectra ; WAVE_SP
+40 ; RAINGG ; RAINGG
+41 ; SURFACE MULTISENSOR ; SFC_MS
+99 ; TEST ; TEST
diff --git a/share/metview/etc/oldrd.chk b/share/metview/etc/oldrd.chk
new file mode 100755
index 0000000..8d708e0
--- /dev/null
+++ b/share/metview/etc/oldrd.chk
@@ -0,0 +1,102 @@
+#
+# Old Member States prepIFS experiments archived to marsrd
+#
+ %if (_VERB = ARCHIVE %or _VERB = FLUSH %or _VERB = STAGE %or _VERB = REMOVE %or _VERB = LIST) %and (
+ 	CLASS = AT
+ %or CLASS = BE
+ %or CLASS = CH
+ %or CLASS = DE
+ %or CLASS = DK
+ %or CLASS = ES
+ %or CLASS = FR
+ %or CLASS = IE
+ %or CLASS = IT
+ %or CLASS = NL
+ %or CLASS = NO
+ %or CLASS = PT
+ %or CLASS = SE
+ %or CLASS = TR
+ %or CLASS = UK
+ ) %and old_expver() %and (%not DATABASE) %then
+ 	%set DATABASE = marsrd
+ 
+
+
+#
+# Fail if new MS prepIFS experiments are archived in RD
+#
+ %if (_VERB = ARCHIVE %or _VERB = FLUSH %or _VERB = STAGE %or _VERB = REMOVE %or _VERB = LIST) %and (
+ 	 CLASS = AT
+ %or CLASS = BE
+ %or CLASS = CH
+ %or CLASS = DE
+ %or CLASS = DK
+ %or CLASS = ES
+ %or CLASS = FR
+ %or CLASS = IE
+ %or CLASS = IT
+ %or CLASS = NL
+ %or CLASS = NO
+ %or CLASS = PT
+ %or CLASS = SE
+ %or CLASS = TR
+ %or CLASS = UK
+ %or CLASS = TE
+ ) %and (%not old_expver()) %and (DATABASE = marsrd) %then
+	 %error "New experiments should not be archived in marsrd. Remove DATABASE from the request"
+	 %fail 
+
+
+
+#
+# New MS prepIFS experiments archived to marsms
+#
+ %if (_VERB = ARCHIVE %or _VERB = FLUSH %or _VERB = STAGE %or _VERB = REMOVE %or _VERB = LIST) %and (
+ 	CLASS = AT
+ 	%or CLASS = BE
+ 	%or CLASS = CH
+ 	%or CLASS = DE
+ 	%or CLASS = DK
+ 	%or CLASS = ES
+ 	%or CLASS = FR
+ 	%or CLASS = IE
+ 	%or CLASS = IT
+ 	%or CLASS = NL
+ 	%or CLASS = NO
+ 	%or CLASS = PT
+ 	%or CLASS = SE
+ 	%or CLASS = TR
+ 	%or CLASS = UK
+ ) %and (%not DATABASE) %then
+ 	%set DATABASE = marsms
+ 
+##
+## Old RD experiments archived to marsrd
+##
+# %if (_VERB = ARCHIVE %or _VERB = FLUSH %or _VERB = STAGE %or _VERB = REMOVE %or _VERB = LIST) %and (
+# 	CLASS = RD
+# %or CLASS = TE
+# ) %and old_expver() %and (%not DATABASE) %then
+# 	%set DATABASE = marsrd
+
+##
+## Fail if new RD experiments are archived in RD
+##
+# %if (_VERB = ARCHIVE %or _VERB = FLUSH %or _VERB = STAGE %or _VERB = REMOVE %or _VERB = LIST) %and (
+#     CLASS = RD
+# %or CLASS = TE
+# ) %and (%not old_expver()) %and (DATABASE = marsrd) %then
+#	 %error "New experiments should not be archived in marsrd. Remove DATABASE from the request"
+#	 %fail 
+
+
+##
+## New RD experiments archived to marsrd-core
+##
+# 
+# %if (_VERB = ARCHIVE %or _VERB = FLUSH %or _VERB = STAGE %or _VERB = REMOVE %or _VERB = LIST) %and (
+# 	CLASS = RD
+# %or CLASS = TE
+# ) %and (%not DATABASE) %then
+# 	%set DATABASE = marsrd-core
+#
diff --git a/share/metview/etc/reportypes.def b/share/metview/etc/reportypes.def
new file mode 100755
index 0000000..5034e82
--- /dev/null
+++ b/share/metview/etc/reportypes.def
@@ -0,0 +1,343 @@
+TIROS-N HIRS Radiances ; 1
+NOAA 6 HIRS Radiances ; 2
+NOAA 7 HIRS Radiances ; 3
+NOAA 8 HIRS Radiances ; 4
+NOAA 9 HIRS Radiances ; 5
+NOAA 10 HIRS Radiances ; 6
+NOAA 11 HIRS Radiances ; 7
+NOAA 12 HIRS Radiances ; 8
+NOAA 14 HIRS Radiances ; 9
+NOAA 15 HIRS Radiances ; 10
+NOAA 16 HIRS Radiances ; 11
+NOAA 17 HIRS Radiances ; 12
+NOAA 18 HIRS Radiances ; 13
+NOAA 19 HIRS Radiances ; 14
+METOP-A HIRS Radiances ; 15
+NOAA 8 HIRS Radiances ; 16
+NOAA 9 HIRS Radiances ; 17
+NOAA 10 HIRS Radiances ; 18
+NOAA 11 HIRS Radiances ; 19
+NOAA 6 HIRS Radiances ; 20
+NOAA 7 HIRS Radiances ; 21
+TIROS-N HIRS Radiances ; 22
+NOAA 12 HIRS Radiances ; 23
+NOAA 14 HIRS Radiances ; 24
+METOP-B HIRS Radiances ; 25
+NOAA 15 AMSUA Radiances ; 1001
+NOAA 16 AMSUA Radiances ; 1002
+NOAA 17 AMSUA Radiances ; 1003
+NOAA 18 AMSUA Radiances ; 1004
+NOAA 19 AMSUA Radiances ; 1005
+METOP-A AMSUA Radiances ; 1007
+AQUA AMSUA Radiances ; 1008
+METOP-B AMSUA Radiances ; 1009
+NOAA 15 AMSUB Radiances ; 2001
+NOAA 16 AMSUB Radiances ; 2002
+NOAA 17 AMSUB Radiances ; 2003
+NOAA 18 AMSUB Radiances ; 2004
+NOAA 19 MHS Radiances ; 3001
+METOP-A MHS Radiances ; 3002
+NOAA 18 MHS Radiances ; 3003
+METOP-B MHS Radiances ; 3004
+GOES 8 GEOS Radiances ; 4002
+GOES 9 GEOS Radiances ; 4003
+GOES 10 GEOS Radiances ; 4004
+GOES 11 GEOS Radiances ; 4005
+GOES 12 GEOS Radiances ; 4006
+METEOSAT 7 GEOS Radiances ; 4007
+METEOSAT 8 GEOS Radiances ; 4008
+METEOSAT 9 GEOS Radiances ; 4009
+MTSAT-1R GEOS Radiances ; 4010
+GOES 13 GEOS Radiances ; 4011
+MTSAT-2 GEOS Radiances ; 4012
+METEOSAT 9 GEOS Allsky Radiances ; 4013
+GOES 14 GEOS Radiances ; 4014
+GOES 15 GEOS Radiances ; 4015
+METEOSAT 10 GEOS Allsky Radiances ; 4016
+METEOSAT 5 GEOS Radiances ; 4017
+ERS 2 GOME O3 ; 5001
+METEOSAT 8 SEVIRI O3 ; 5002
+METEOSAT 9 SEVIRI O3 ; 5003
+AURA MLS O3 ; 5004
+AURA OMI O3 ; 5005
+NOAA 9 SBUV-2 O3 ; 5006
+NOAA 11 SBUV-2 O3 ; 5007
+NOAA 14 SBUV-2 O3 ; 5008
+NOAA 16 SBUV-2 O3 ; 5009
+NOAA 17 SBUV-2 O3 ; 5010
+NOAA 18 SBUV-2 O3 ; 5011
+NOAA 19 SBUV-2 O3 ; 5012
+METOP-A GOME-2 O3 ; 5013
+ENVISAT SCIAMACHY O3 ; 5014
+ENVISAT GOMOS O3 ; 5015
+ENVISAT MIPAS O3 ; 5016
+METEOR 3-5 TOMS O3 ; 5017
+NIMBUS 7 SBUV-2 O3 ; 5018
+AQUA MODIS Aerosol ; 5019
+TERRA MODIS Aerosol ; 5020
+GOSAT TANSO-FTS Layer volumetric mixing ratio ; 5021
+NIMBUS 7 TOMS O3 ; 5022
+EARTH PROBE TOMS O3 ; 5023
+METOP-A IASI Layer integrated mass density ; 5024
+ERS 2 GOME MACC O3 ; 5025
+METEOSAT 8 SEVIRI MACC O3 ; 5026
+METEOSAT 9 SEVIRI MACC O3 ; 5027
+AURA MLS MACC O3 ; 5028
+AURA OMI MACC O3 ; 5029
+NOAA 9 SBUV-2 MACC O3 ; 5030
+NOAA 11 SBUV-2 MACC O3 ; 5031
+NOAA 14 SBUV-2 MACC O3 ; 5032
+NOAA 16 SBUV-2 MACC O3 ; 5033
+NOAA 17 SBUV-2 MACC O3 ; 5034
+NOAA 18 SBUV-2 MACC O3 ; 5035
+NOAA 19 SBUV-2 MACC O3 ; 5036
+METOP-A GOME-2 MACC O3 ; 5037
+ENVISAT SCIAMACHY MACC O3 ; 5038
+ENVISAT GOMOS MACC O3 ; 5039
+ENVISAT MIPAS MACC O3 ; 5040
+METEOR 3-5 TOMS MACC O3 ; 5041
+NIMBUS 7 SBUV-2 MACC O3 ; 5042
+NIMBUS 7 TOMS MACC O3 ; 5043
+EARTH PROBE TOMS MACC O3 ; 5044
+ENVISAT SCIAMACHY Layer volumetric mixing ratio ; 5045
+ENVISAT SCIAMACHY Layer integrated mass density ; 5046
+METOP-A GOME-2 Layer integrated mass density ; 5047
+AURA OMI Layer integrated mass density ; 5048
+TERRA MOPITT Layer integrated mass density ; 5049
+ERS-2 GOME Layer integrated mass density ; 5050
+NOAA 15 ATOVS ; 5051
+NOAA 16 ATOVS ; 5052
+NOAA 17 ATOVS ; 5053
+NOAA 18 ATOVS ; 5054
+NOAA 19 ATOVS ; 5055
+METOP-A ATOVS ; 5056
+ENVISAT MERIS TCWV ; 6001
+METOP-A GPSRO ; 7001
+CHAMP GPSRO ; 7002
+GRACE A GPSRO ; 7003
+COSMIC-1 GPSRO ; 7004
+COSMIC-2 GPSRO ; 7005
+COSMIC-3 GPSRO ; 7006
+COSMIC-4 GPSRO ; 7007
+COSMIC-5 GPSRO ; 7008
+COSMIC-6 GPSRO ; 7009
+TerraSAR-X GPSRO ; 7010
+CNOFS GPSRO ; 7011
+SAC-C GPSRO ; 7012
+METOP-B GPSRO ; 7013
+METEOSAT 2 AMV ; 8001
+METEOSAT 3 AMV ; 8002
+METEOSAT 4 AMV ; 8003
+METEOSAT 5 AMV ; 8004
+METEOSAT 6 AMV ; 8005
+METEOSAT 7 AMV ; 8006
+METEOSAT 8 AMV ; 8007
+METEOSAT 9 AMV ; 8008
+GMS 5 AMV ; 8009
+MTSAT-1R AMV ; 8010
+GOES 9 WV AMV ; 8011
+GOES 10 AMV ; 8012
+GOES 11 AMV ; 8013
+GOES 12 AMV ; 8014
+NOAA 15 AVHRR IR AMV ; 8015
+NOAA 16 AVHRR IR AMV ; 8016
+NOAA 17 AVHRR IR AMV ; 8017
+NOAA 18 AVHRR IR AMV ; 8018
+NOAA 19 AVHRR IR AMV ; 8019
+TERRA MODIS AMV ; 8020
+AQUA MODIS AMV ; 8021
+FY-2C IR AMV ; 8022
+FY-2D IR AMV ; 8023
+FY-2E IR AMV ; 8024
+GOES 13 AMV ; 8025
+MTSAT-2 AMV ; 8026
+METOP-A AMV ; 8027
+GOES 14 AMV ; 8028
+GOES 15 AMV ; 8029
+METOP-B AMV ; 8030
+METEOSAT 10 AMV ; 8031
+Old ERS 1 Scatterometer ; 9001
+New ERS 1 Scatterometer ; 9002
+ERS 2 Scatterometer ; 9003
+QuickSCAT SeaWind ; 9004
+METOP-A ASCAT ; 9005
+OceanSat-2 Scatterometer ; 9006
+METOP-B ASCAT ; 9007
+DMSP 7 SSMI All-sky ; 10001
+DMSP 8 SSMI All-sky ; 10002
+DMSP 9 SSMI All-sky ; 10003
+DMSP 10 SSMI All-sky ; 10004
+DMSP 11 SSMI All-sky ; 10005
+DMSP 13 SSMI All-sky ; 10006
+DMSP 14 SSMI All-sky ; 10007
+DMSP 15 SSMI All-sky ; 10008
+METOP-A IASI Radiances ; 11001
+METOP-B IASI Radiances ; 11002
+AQUA AIRS Radiances ; 12001
+DMSP 16 SSMIS Radiances All-sky ; 13001
+DMSP 17 SSMIS Radiances All-sky ; 13002
+DMSP 18 SSMIS Radiances All-sky ; 13003
+TRMM TMI Radiances All-sky ; 14001
+AQUA AMSRE Radiances All-sky ; 15001
+Automatic Land SYNOP ; 16001
+Manual Land SYNOP ; 16002
+Abbreviated SYNOP ; 16003
+METAR ; 16004
+DRIBU ; 16005
+Automatic SHIP ; 16006
+Reduced SHIP ; 16007
+SHIP ; 16008
+Abbreviated SHIP ; 16009
+DRIBU-BATHY ; 16010
+DRIBU-TESAC ; 16011
+Ground-Based GPS ; 16012
+Land PILOT ; 16013
+PILOT SHIP ; 16014
+American Wind Profiler 1 ; 16015
+American Wind Profiler 2 ; 16016
+European Wind Profiler ; 16017
+Japanese Wind Profiler ; 16018
+TEMP SHIP ; 16019
+DROP Sonde ; 16020
+Mobile TEMP ; 16021
+Land TEMP ; 16022
+ROCOB TEMP ; 16023
+SHIP ROCOB TEMP ; 16024
+Additional Land Surface Data ; 16025
+AIREP ; 16026
+CODAR ; 16027
+COLBA ; 16028
+AMDAR ; 16029
+ACARS ; 16030
+PAOB ; 16031
+PAOB via Sat code ; 16032
+SATEM 500km Low Level Temperature ; 16037
+SATEM 500km PWC ; 16038
+SATEM 500km High Level Temperature ; 16039
+SATEM 500km Merged ; 16040
+SATEM 250km Low Level Temperature ; 16041
+SATEM 250km PWC ; 16042
+SATEM 250km High Level Temperature ; 16043
+SATEM 250km Merged ; 16044
+Mobile pilot ; 16045
+TAMDAR ; 16046
+Land High Resolution TEMP ; 16047
+SHIP High Resolution TEMP ; 16048
+Ocean Station Vessel On Station ; 16049
+Ocean Station Vessel Off Station ; 16050
+Station Or Ship On Ice ; 16051
+Ocean Bottle And Low Resolution Conductivity Temperature Depth CTD And XCTD ; 16052
+Mechanical Or Digital Or Micro Bathythermograph MBT ; 16053
+Expandable Bathythermograph XBT ; 16054
+Coastal-Marine Automated Network CMAN ; 16055
+Coastal Or Island Station ; 16056
+Fixed Ocean Platform Or Rig ; 16057
+Mobile land SYNOP ; 16058
+Forecaster bogus ; 16059
+Tropical cyclone bogus ; 16060
+High Resolution Conductivity Temperature Depth CTD And XCTD ; 16061
+Undulating Oceanographic Recorder UOR ; 16062
+Autonomous Pinniped Bathythermograph APBT ; 16063
+Underwater Ocean Glider ; 16064
+SMOS ; 18001
+CORIOLIS WINDSAT All-sky ; 19001
+DMSP 8 SSMI ; 20001
+DMSP 9 SSMI ; 20002
+DMSP 10 SSMI ; 20003
+DMSP 11 SSMI ; 20004
+DMSP 13 SSMI ; 20005
+DMSP 14 SSMI ; 20006
+DMSP 15 SSMI ; 20007
+NOAA 15 AMSUA Radiances All-sky ; 21001
+NOAA 16 AMSUA Radiances All-sky ; 21002
+NOAA 17 AMSUA Radiances All-sky ; 21003
+NOAA 18 AMSUA Radiances All-sky ; 21004
+NOAA 19 AMSUA Radiances All-sky ; 21005
+METOP-A AMSUA Radiances All-sky ; 21007
+AQUA AMSUA Radiances All-sky ; 21008
+METOP-B AMSUA Radiances All-sky ; 21009
+AQUA AMSRE Radiances ; 22001
+TRMM TMI Radiances ; 23001
+DMSP 16 SSMIS Radiances ; 24001
+Ground-Based Radar ; 25001
+FY-3A MWHS Radiances ; 26001
+FY-3B MWHS Radiances ; 26002
+FY-3A MWTS Radiances ; 27001
+FY-3B MWTS Radiances ; 27002
+FY-3A MWRI Radiances All-sky ; 28001
+FY-3B MWRI Radiances All-sky ; 28002
+FY-3A IRAS Radiances ; 29001
+FY-3B IRAS Radiances ; 29002
+TIROS-N MSU Radiances ; 30001
+NOAA 6 MSU Radiances ; 30002
+NOAA 7 MSU Radiances ; 30003
+NOAA 8 MSU Radiances ; 30004
+NOAA 9 MSU Radiances ; 30005
+NOAA 10 MSU Radiances ; 30006
+NOAA 11 MSU Radiances ; 30007
+NOAA 12 MSU Radiances ; 30008
+NOAA 14 MSU Radiances ; 30009
+NOAA 8 MSU Radiances ; 30010
+NOAA 10 MSU Radiances ; 30011
+NOAA 11 MSU Radiances ; 30012
+NOAA 6 MSU Radiances ; 30013
+NOAA 7 MSU Radiances ; 30014
+TIROS-N MSU Radiances ; 30015
+NOAA 14 MSU Radiances ; 30016
+TIROS-N SSU Radiances ; 31001
+NOAA 6 SSU Radiances ; 31002
+NOAA 7 MSU Radiances ; 31003
+NOAA 8 SSU Radiances ; 31004
+NOAA 9 SSU Radiances ; 31005
+NOAA 11 MSU Radiances ; 31006
+NOAA 12 SSU Radiances ; 31007
+NOAA 14 SSU Radiances ; 31008
+NOAA 8 SSU Radiances ; 31009
+NOAA 9 SSU Radiances ; 31010
+NOAA 11 SSU Radiances ; 31011
+NOAA 6 SSU Radiances ; 31012
+NOAA 7 MSU Radiances ; 31013
+TIROS-N SSU Radiances ; 31014
+NOAA 14 SSU Radiances ; 31015
+NOAA 2 VTPR1 Radiances ; 32001
+NOAA 3 VTPR1 Radiances ; 32002
+NOAA 4 VTPR1 Radiances ; 32003
+NOAA 2 VTPR1 Radiances ; 32004
+NOAA 2 VTPR2 Radiances ; 33001
+NOAA 3 VTPR2 Radiances ; 33002
+NOAA 4 VTPR2 Radiances ; 33003
+NOAA 5 VTPR2 Radiances ; 33004
+NPP ATMS Radiances ; 34001
+TERRA MOPITT Layer integrated mass density with Averaging Kernels and a priori profile ; 35001
+ERS-2 GOME Layer integrated mass density with Averaging Kernels ; 35002
+ENVISAT SCIAMACHY Layer integrated mass density with Averaging Kernels ; 35003
+METOP-A GOME-2 Layer integrated mass density with Averaging Kernels ; 35004
+METOP-A IASI Layer volumetric mixing ratio with Averaging Kernels and a priori profile ; 35005
+ENVISAT SCIAMACHY Layer volumetric mixing ratio with Averaging Kernels and a priori profile ; 35006
+METOP-A IASI Layer Integrated mass density with Averaging Kernels and a priori profile ; 35007
+AURA OMI Layer integrated mass density with Averaging Kernels ; 35008
+GOSAT TANSO-FTS Layer volumetric mixing ratio with Averaging Kernels and a priori profile ; 35009
+METOP-A GOME-2 Layer integrated mass density with Averaging Kernels and a priori profile ; 35010
+NPP CRIS Radiances ; 36001
+ENVISAT RALT WAVE ; 37001
+JASON 1 RALT WAVE ; 37002
+JASON 2 RALT WAVE ; 37003
+ERS 1 RALT WAVE ; 37004
+ERS 2 RALT WAVE ; 37005
+CRYOSAT 2 RALT WAVE ; 37006
+1h rain gauge accumulation ; 39001
+3h rain gauge accumulation ; 39002
+6h rain gauge accumulation ; 39003
+12h rain gauge accumulation ; 39004
+24h rain gauge accumulation ; 39005
+NESDIS IMS ; 40001
+TEST REPORTYPE 1 ; 98001
+TEST REPORTYPE 2 ; 98002
+TEST REPORTYPE 3 ; 98003
+TEST REPORTYPE 4 ; 98004
+TEST REPORTYPE 5 ; 98005
+TEST REPORTYPE 6 ; 98006
+TEST REPORTYPE 7 ; 98007
+TEST REPORTYPE 8 ; 98008
+TEST REPORTYPE 9 ; 98009
+TEST REPORTYPE 10 ; 98010
diff --git a/share/metview/etc/rt_by_obsgroup.chk b/share/metview/etc/rt_by_obsgroup.chk
new file mode 100755
index 0000000..03d9114
--- /dev/null
+++ b/share/metview/etc/rt_by_obsgroup.chk
@@ -0,0 +1,120 @@
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  HIRS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  AMSUA ) %and %not REPORTYPE %then
+	%set REPORTYPE =  1001/1002/1003/1004/1005/1007/1008/1009
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  AMSUB ) %and %not REPORTYPE %then
+	%set REPORTYPE =  2001/2002/2003/2004
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  MHS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  3001/3002/3003/3004
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  GEOS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  4002/4003/4004/4005/4006/4007/4008/4009/4010/4011/4012/4013/4014/4015/4016/4017
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  RESAT ) %and %not REPORTYPE %then
+	%set REPORTYPE =  5001/5002/5003/5004/5005/5006/5007/5008/5009/5010/5011/5012/5013/5014/5015/5016/5017/5018/5019/5020/5021/5022/5023/5024/5025/5026/5027/5028/5029/5030/5031/5032/5033/5034/5035/5036/5037/5038/5039/5040/5041/5042/5043/5044/5045/5046/5047/5048/5049/5050/5051/5052/5053/5054/5055/5056
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  MERIS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  6001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  GPSRO ) %and %not REPORTYPE %then
+	%set REPORTYPE =  7001/7002/7003/7004/7005/7006/7007/7008/7009/7010/7011/7012/7013
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SATOB ) %and %not REPORTYPE %then
+	%set REPORTYPE =  8001/8002/8003/8004/8005/8006/8007/8008/8009/8010/8011/8012/8013/8014/8015/8016/8017/8018/8019/8020/8021/8022/8023/8024/8025/8026/8027/8028/8029/8030/8031
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SCATT ) %and %not REPORTYPE %then
+	%set REPORTYPE =  9001/9002/9003/9004/9005/9006/9007
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SSMI_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  10001/10002/10003/10004/10005/10006/10007/10008
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  IASI ) %and %not REPORTYPE %then
+	%set REPORTYPE =  11001/11002
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  AIRS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  12001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SSMIS_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  13001/13002/13003
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  TMI_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  14001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  AMSRE_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  15001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  CONV ) %and %not REPORTYPE %then
+	%set REPORTYPE =  16001/16002/16003/16004/16005/16006/16007/16008/16009/16010/16011/16012/16013/16014/16015/16016/16017/16018/16019/16020/16021/16022/16023/16024/16025/16026/16027/16028/16029/16030/16031/16032/16037/16038/16039/16040/16041/16042/16043/16044/16045/16046/16047/16048/16049/16050/16051/16052/16053/16054/16055/16056/16057/16058/16059/16060/16061/16062/16063/16064
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SMOS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  18001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  WINDSAT_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  19001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SSMI ) %and %not REPORTYPE %then
+	%set REPORTYPE =  20001/20002/20003/20004/20005/20006/20007
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  AMSUA_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  21001/21002/21003/21004/21005/21007/21008/21009
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  AMSRE ) %and %not REPORTYPE %then
+	%set REPORTYPE =  22001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  TMI ) %and %not REPORTYPE %then
+	%set REPORTYPE =  23001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SSMIS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  24001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  GBRAD ) %and %not REPORTYPE %then
+	%set REPORTYPE =  25001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  MWHS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  26001/26002
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  MWTS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  27001/27002
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  MWRI_AS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  28001/28002
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  IRAS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  29001/29002
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  MSU ) %and %not REPORTYPE %then
+	%set REPORTYPE =  30001/30002/30003/30004/30005/30006/30007/30008/30009/30010/30011/30012/30013/30014/30015/30016
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SSU ) %and %not REPORTYPE %then
+	%set REPORTYPE =  31001/31002/31003/31004/31005/31006/31007/31008/31009/31010/31011/31012/31013/31014/31015
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  VTPR1 ) %and %not REPORTYPE %then
+	%set REPORTYPE =  32001/32002/32003/32004
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  VTPR2 ) %and %not REPORTYPE %then
+	%set REPORTYPE =  33001/33002/33003/33004
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  ATMS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  34001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  RESAT_AK ) %and %not REPORTYPE %then
+	%set REPORTYPE =  35001/35002/35003/35004/35005/35006/35007/35008/35009/35010
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  CRIS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  36001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  WAVE_IP ) %and %not REPORTYPE %then
+	%set REPORTYPE =  37001/37002/37003/37004/37005/37006
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  RAINGG ) %and %not REPORTYPE %then
+	%set REPORTYPE =  39001/39002/39003/39004/39005
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  SFC_MS ) %and %not REPORTYPE %then
+	%set REPORTYPE =  40001
+
+%if (TYPE = OFB %or TYPE = MFB) %and (OBSGROUP =  TEST ) %and %not REPORTYPE %then
+	%set REPORTYPE =  98001/98002/98003/98004/98005/98006/98007/98008/98009/98010
+
diff --git a/share/metview/etc/tigge.def b/share/metview/etc/tigge.def
new file mode 100755
index 0000000..3980ae1
--- /dev/null
+++ b/share/metview/etc/tigge.def
@@ -0,0 +1,2142 @@
+# © Copyright 1996-2012 ECMWF.
+# 
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+# In applying this licence, ECMWF does not waive the privileges and immunities 
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+!
+! mars language definition file.
+!
+!     author.
+!     -------
+!
+!           b.raoult 22/10/90
+!
+!     Modifications.
+!     --------------
+!
+!           K. Fielding 26.07.93
+!           Add new observation types wind profile (WP) and
+!           temp mobile (TM)
+!
+!
+! syntax :
+!
+!
+!  command name ; command description ; command type     
+!  {
+!        parameter 1
+!        {
+!       value 1 ; abbreviation 1
+!               value 2 ; abbreviation 2
+!               value 3 
+!               ...
+!               value n ; abbreviation n
+!    } = default value
+!
+!        parameter 2
+!        {
+!            ...
+!        } = default value
+!       
+!        ...
+!
+! }
+!
+!------------------------------------------------------------------------
+
+TIGGEDEF ; TIGGE REQUEST  ; TIGGE
+{
+    PARAM {
+
+# Automatically generated by './tigge_def_for_mars.pl master.info'
+
+10 METER U VELOCITY                                ;    10U ;     165
+10 METER V VELOCITY                                ;    10V ;     166
+CONVECTIVE AVAILABLE POTENTIAL ENERGY              ;   CAPE ;      59
+CONVECTIVE INHIBITION                              ;     CIN ;  228001
+GEOPOTENTIAL HEIGHT                                ;     GH ;     156
+LAND SEA MASK                                      ;    LSM ;     172
+MEAN SEA LEVEL PRESSURE                            ;    MSL ;     151
+OROGRAPHY                                          ;   OROG ;  228002
+POTENTIAL TEMPERATURE                              ;     PT ;       3
+POTENTIAL VORTICITY                                ;     PV ;      60
+SKIN TEMPERATURE                                   ;    SKT ;     235
+SNOW DEPTH WATER EQUIVALENT                        ;     SD ;  228141
+SNOW FALL WATER EQUIVALENT                         ;     SF ;  228144
+SOIL MOISTURE                                      ;     SM ;  228039
+SOIL TEMPERATURE                                   ;     ST ;  228139
+SPECIFIC HUMIDITY                                  ;      Q ;     133
+SUNSHINE DURATION                                  ;   SUND ;     189
+SURFACE AIR DEW POINT TEMPERATURE                  ;     2D ;     168
+SURFACE AIR MAXIMUM TEMPERATURE                    ;  MX2T6 ;     121
+SURFACE AIR MINIMUM TEMPERATURE                    ;  MN2T6 ;     122
+SURFACE AIR TEMPERATURE                            ;     2T ;     167
+SURFACE PRESSURE                                   ;     SP ;     134
+TEMPERATURE                                        ;      T ;     130
+TIME INTEGRATED OUTGOING LONG WAVE RADIATION       ;    TTR ;     179
+TIME INTEGRATED SURFACE LATENT HEAT FLUX           ;   SLHF ;     147
+TIME INTEGRATED SURFACE NET SOLAR RADIATION        ;    SSR ;     176
+TIME INTEGRATED SURFACE NET THERMAL RADIATION      ;    STR ;     177
+TIME INTEGRATED SURFACE SENSIBLE HEAT FLUX         ;   SSHF ;     146
+TOTAL CLOUD COVER                                  ;    TCC ;  228164
+TOTAL COLUMN WATER                                 ;    TCW ;     136
+TOTAL PRECIPITATION                                ;     TP ;  228228
+U VELOCITY                                         ;      U ;     131
+V VELOCITY                                         ;      V ;     132
+
+		*
+        /   
+    } = T
+
+    CLASS
+    {
+		TIGGE       ;   TI
+
+    } = TI
+
+    TYPE
+    {
+		CONTROL FORECAST            ;   CF
+		FORECAST                    ;   FC
+		PERTURBED FORECAST          ;   PF
+		ALL                         
+    } = CF
+    
+    STREAM
+    {
+		ENFO
+		DA   ; OPER
+    } = ENFO
+
+	EXPVER
+	{
+		TEST
+		PROD
+	} = PROD
+
+	ORIGIN 
+	{
+	# TIGGE global
+		KWBC
+		BABJ
+		ECMF
+		EGRR
+		RJTD
+		AMMC
+		CWAO
+		RKSL
+		SBSJ
+		LFPW
+
+	# TIGGE LAM
+		COSMOLEPS-ARPASIMC-EU
+		/
+		ALL
+	}
+
+    MODEL
+	{
+		GLOB
+		LAM
+	} = GLOB
+
+    LEVTYPE  
+    {
+		POTENTIAL VORTICITY   ; PV
+		POTENTIAL TEMPERATURE ; PT
+        SURFACE               ; SFC
+        PRESSURE LEVELS       ; PL
+        MODEL LEVELS          ; ML
+		ALL
+    } = PL
+    
+    REPRES 
+    {
+        BUFR            ;   BU
+        SPHERICAL HARMONICS ;   SH
+        LAT LONG GRID       ;   LL
+        GAUSSIAN GRID       ;   GG
+		SPACE VIEW          ; SV
+		OCEAN GRID          ; OG
+		ALL
+    } = SH
+
+    DOMAIN
+    {
+		GENERAL EUROPEAN AREA   ; G
+		GLOBE                   ; G
+        MEDITERRANEAN           ; M
+        NORTHERN HEMISPHERE     ; N
+        SOUTHERN HEMISPHERE     ; S
+		BALTIC AND BLACK SEA    ; B
+		EUROPE                  ; E
+        NORTH WEST EUROPE       ; A
+        NORTH EAST EUROPE       ; B
+        SOUTH WEST EUROPE       ; C
+        SOUTH EAST EUROPE       ; D
+		WESTERN ATLANTIC        ; W
+		FASTEX                  ; F
+		TROPICS                 ; T
+		TROPICS 2               ; U
+		X
+		ALL
+		V
+		H
+		I
+		J
+		K
+		L
+		O
+		P
+		Q
+		R
+		Y
+		Z
+    } = GLOBE
+
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY         ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+        CURRENT DATE ; 0
+        YESTERDAY    ; -1
+		TO          ; TO
+		BY          ;   BY
+		/
+		OFF
+    } = CURRENT DATE
+
+    PADDING  
+    {
+		AUTOMATIC   ; AUTO
+		NONE        ; N    ; 0
+		OFF
+		*
+    } = OFF
+    
+} ! END OF TIGGEDEF
+
+HELP    ;   Displays prints help file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+NEWS    ;   Displays prints news file   ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+END ;   Normal exit from mars system    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+DEFAULT ;   Reset defaults    ;   INTERNAL
+{
+}
+
+!------------------------------------------------------------------------
+
+ARCHIVE ;   Archives data   ;   TIGGE
+{
+
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  { &TIGGEDEF&CLASS  } = TI
+
+    TYPE   { &TIGGEDEF&TYPE   } = CF
+
+    STREAM { &TIGGEDEF&STREAM } = ENFO
+    
+	MODEL  { &TIGGEDEF&MODEL } = GLOB
+
+	ORIGIN { &TIGGEDEF&ORIGIN } = ECMF
+
+	DOMAIN { &TIGGEDEF&DOMAIN } = G
+
+    EXPVER  [ priority = 1 ]
+    {
+		&TIGGEDEF&EXPVER 
+    } = PROD
+    
+    LEVTYPE { &TIGGEDEF&LEVTYPE } = PL 
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    } = 1000/850/700/500/300
+    
+    PARAM { &TIGGEDEF&PARAM } = T
+
+    DATE 
+	{
+		&TIGGEDEF&DATE
+    } = CURRENT DATE
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    } = 12
+    
+    STEP
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+    } = 00
+    
+    ANOFFSET
+    {
+        TO  ;   TO
+        BY  ;   BY    
+		/
+        *   
+		OFF
+    } 
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    } = ""
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+    } = NEW
+    
+
+    PASSWORD
+    {
+        "   
+    } = ""
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+	} 
+
+	EXPECT [ priority = 0 ]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+    } = REMOVE
+
+	PADDING
+	{
+		&TIGGEDEF&PADDING
+	} = OFF
+
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+        OFF ;   OFF
+    } = OFF
+
+} ! END OF ARCHIVE
+
+!------------------------------------------------------------------------
+
+LIST    ;   LIST FDF ENTRIES AND CFS FILES  ;   TIGGE
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS  
+	{ 
+		&TIGGEDEF&CLASS  
+		/ 
+		ALL
+	} = TI
+    
+    TYPE   
+	{ 
+		&TIGGEDEF&TYPE  
+		/  
+		ALL
+	} = CF 
+
+    STREAM 
+	{ 
+		&TIGGEDEF&STREAM 
+		/ 
+		ALL
+	} = ENFO 
+    
+	MODEL 
+	{
+		&TIGGEDEF&MODEL
+		/
+		ALL
+	} = GLOB
+
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+		ALL
+	}
+
+    EXPVER{
+		&TIGGEDEF&EXPVER
+		/
+		ALL
+    } = PROD 
+    
+    LEVTYPE 
+	{ 
+		&TIGGEDEF&LEVTYPE 
+		/ 
+		ALL
+	}
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    }
+    
+    REPRES { 
+		&TIGGEDEF&REPRES 
+		/ 
+		ALL
+	}
+    
+    DOMAIN  
+    {
+		&TIGGEDEF&DOMAIN
+		/
+		ALL
+    } 
+
+    DUPLICATES  {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    PARAM 
+    {
+        ALL             ;   ALL
+        &TIGGEDEF&PARAM
+		/
+    }
+    
+    DATE
+    {
+		&TIGGEDEF&DATE
+		ALL
+    } 
+    
+    
+	MONTH
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	YEAR
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    }
+    
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    }
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+	SHOW
+	{
+		@
+		/
+	}
+
+	HIDE
+	{
+		@
+		/
+	}
+
+ 
+    TARGET
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATABASE [ priority = 1 ]
+	{
+		@
+		/
+	} 
+
+    SOURCE
+    {
+		@
+        "   
+    } = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+    FORMAT  
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+		OFF         ;   OFF
+    } = OFF
+    
+    RESOL 
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = OFF
+    
+    ACCURACY 
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+		OFF; OFF
+        *   
+		ARCHIVED VALUE ; AV
+    } = OFF
+    
+    AREA  
+    {
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+		OFF; OFF
+    } = OFF
+
+	LOCATION 
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    BLOCK  
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+    GRID  
+    {
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+    } = OFF
+    
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    LAUNCH  
+    {
+        "   
+    } = ""
+    
+	PADDING
+	{
+		&TIGGEDEF&PADDING
+	} = OFF
+
+    USE  
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+		OFF; OFF
+    } = OFF
+    
+    PASSWORD  
+    {
+        "   
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  
+    {
+        YES ;   Y
+        NO  ;   N
+		OFF ;   OFF
+    } = OFF
+    
+    PROCESS  
+    {
+		LOCAL ; LOCAL
+        OFF ;   OFF
+    } = OFF
+
+	EXPECT 
+	{
+		*
+		OFF ; OFF
+		ANY
+	} = OFF
+
+	OUTPUT {
+		TABLE
+		BROWSER	
+		COST
+		SEARCH
+		TREE
+	} = TABLE
+
+
+} ! END OF LIST
+
+STAGE    ;   STAGE FIELDS ;    MARS
+{
+    
+	DATASET [ priority = 0 ]
+	{
+		@
+	}
+
+    CLASS
+	{ 
+		&TIGGEDEF&CLASS  
+	} = TI
+    
+
+    TYPE
+	{ 
+		&TIGGEDEF&TYPE   
+		ALL
+	} = CF
+
+    STREAM
+	{ 
+		&TIGGEDEF&STREAM 
+	} = ENFO
+    
+	MODEL 
+	{
+		&TIGGEDEF&MODEL
+		OFF
+		/
+	} = OFF
+
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+	} = ALL
+
+    EXPVER
+	{
+		&TIGGEDEF&EXPVER
+		/
+    } = PROD
+    
+
+    LEVTYPE
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	} = PL 
+    
+    LEVELIST
+    {
+		TO ; TO
+		BY ; BY 
+        ALL ;   ALL
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/400/300
+    
+    REPRES
+	{ 
+		&TIGGEDEF&REPRES 
+	} = SH
+    
+    DOMAIN
+    {
+		&TIGGEDEF&DOMAIN
+    } = G
+
+    PARAM
+    {
+        ALL             ;   ALL
+        &TIGGEDEF&PARAM
+    } = T
+    
+    DATE
+    {
+		&TIGGEDEF&DATE
+    } = CURRENT DATE
+    
+    TIME 
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+		ALL ;   ALL
+    } = 12
+
+    STEP
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = 00
+    
+    ANOFFSET
+    {
+        ALL ;   ALL
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    }
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } = OFF
+    
+    BLOCK
+    {
+        OFF     ; OFF;  OFF
+        /   
+        *       
+    }=OFF
+
+	TARGET 
+	{
+		@
+		"
+		OFF
+	} = ""
+
+    FIELDSET  
+    {
+        @
+    }
+    
+	RESOL
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		OFF                  ;   OFF
+		319
+		213
+		106
+        *   
+	} = AUTO
+
+	ACCURACY
+	{
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+        *   
+		ARCHIVED VALUE ; AV
+	} = N
+
+	AREA
+	{
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+	} = G
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF; OFF
+		@
+		"
+	} = OFF
+
+	ROTATION
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	GRID
+	{
+        ARCHIVED VALUE  ;   AV
+        *   
+        /   
+        OFF     ; OFF;  OFF
+	} = OFF
+
+	GAUSSIAN
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+    DUPLICATES  
+    {
+        KEEP
+        REMOVE
+		OFF
+    } = OFF
+
+	EXPECT
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	DATABASE 
+	{
+		@
+		/
+	} 
+
+} ! END OF STAGE
+
+!------------------------------------------------------------------------
+
+REMOVE  ;   REMOVE FDF ENTRIES AND CFS FILES    ;   MARS
+{
+    
+    CLASS  { 
+		&TIGGEDEF&CLASS  
+	} = TI
+
+    
+    PASSWORD
+    {
+        "   
+		@
+    } 
+    
+    EXPVER
+    {
+		@
+        "   
+    } = ""
+    
+    DOMAIN
+    {
+		&TIGGEDEF&DOMAIN
+    }
+    
+	DATABASE
+	{
+		@
+		*
+		/
+	} 
+
+    TYPE   { &TIGGEDEF&TYPE   }
+
+	DATE { 
+		*
+		TO
+		/
+	}
+
+	TIME {
+		*
+		TO
+		/
+	}
+
+    STREAM
+	{ 
+		&TIGGEDEF&STREAM 
+	}
+    
+	ORIGIN 
+	{
+		&TIGGEDEF&ORIGIN
+		/
+	}
+
+
+    LEVTYPE
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	}
+
+	VOLUME { * }
+
+	CREATED { * }
+
+	LASTACCESS { * }
+
+	EXPR { 
+		"
+		* 
+	}
+
+} ! END OF REMOVE
+
+!------------------------------------------------------------------------
+    
+!------------------------------------------------------------------------
+
+EXPORT  ;   Write cfs files to tape    ;   MARS
+{
+    
+    VOLSER
+    {
+        "   
+    } = ""
+    
+    SLOTNO
+    {
+        "   
+    } = ""
+    
+    CFSPATH
+    {
+        "   
+    } = ""
+    
+    DENSITY
+    {
+        *
+    } = 6250
+    
+    RECLEN
+    {
+        *   
+    } = 120
+    
+    FILESEQ
+    {
+        *   
+    } = 1
+    
+    SOFTWARE
+    {
+        "   
+    } = ""
+    
+    FILTER
+    {
+        "   
+    } = "*"
+    
+    CHECK
+    {
+        YES ;   Y
+        NO  ;   N
+    } = NO
+
+}
+
+!------------------------------------------------------------------------
+
+
+RETRIEVE    ;   Retrieval of data   ;   TIGGE
+{
+    
+	DATASET [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		@
+	}
+
+    CLASS 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&TIGGEDEF&CLASS   
+	} = TI
+    
+
+    TYPE  	[	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/image/obs/all,
+				mars_interface         = menu,
+				java_hidden  = FALSE ] 
+	{ 
+		&TIGGEDEF&TYPE   
+		*
+	} = CF
+
+
+    STREAM 	[ 	help = help_multiple_selection, exclusive = True,
+				java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{ 
+		&TIGGEDEF&STREAM 
+		*
+	} = ENFO
+    
+
+    EXPVER 	[ 	priority     = 1,
+				java_control = CHOICE_TEXT_1,
+				java_section = ID,
+				marsdoc      = id,
+				mars_interface         = text,
+				java_hidden  = FALSE ]
+	{
+        /
+		PROD
+		TEST
+	ALL
+    } = PROD
+    
+
+    MODEL 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				hidden       = TRUE,
+				java_hidden  = FALSE ]
+	{
+		&TIGGEDEF&MODEL
+		OFF
+	} = OFF
+
+    REPRES [ java_control = CHOICE, 
+			 java_section = ID, 
+			 marsdoc      = id,
+			 java_hidden = FALSE ] 
+	{ 
+		&TIGGEDEF&REPRES 
+	} = SH
+    
+    LEVTYPE [ java_control = CHOICE, 
+			  java_section = ID, 
+			  marsdoc      = field/all,
+			  mars_interface         = menu,
+			  java_hidden = FALSE ] 
+	{ 
+		&TIGGEDEF&LEVTYPE 
+	} = PL 
+    
+    LEVELIST [ java_control = CHOICE_TEXT_2, 
+			   java_section = ID, 
+			   marsdoc      = field/level,
+			   mars_interface         = text,
+			   java_hidden = FALSE ]
+    {
+		TO ;    TO
+		BY ;    BY 
+        ALL ;   ALL
+        OFF ;   OFF
+        *   
+        /   
+    } = 1000/850/700/500/300
+    
+    PARAM [ help = help_multiple_selection,  # For Metview
+			java_control = LIST_2, 
+			marsdoc      = field/all,
+			mars_interface         = list,
+			java_section = METEO, java_hidden = FALSE ]
+    {
+        ALL             
+        &TIGGEDEF&PARAM
+    } = T
+    
+	YEAR [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+	MONTH [  
+			check        = false,
+			visible = false
+			]
+	{
+		*
+		/
+		TO
+		BY  ;   BY           !        1
+		ALL
+	}
+
+    DATE [ java_control = CHOICE_TEXT_2, 
+	       java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+		&TIGGEDEF&DATE
+    } = YESTERDAY
+    
+    TIME [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/all,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        *   
+        /   
+        TO  
+        BY  !        6
+		ALL 
+		12
+    } = 12
+
+    STEP [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+!		* [DAY]
+!		* [MONTH]
+!		* [WEEK]
+!		* [VERIFY]
+    } = 00
+    
+    ANOFFSET [ java_control = CHOICE_TEXT_2, 
+		   java_section = DATE, 
+		   marsdoc      = date/field,
+		   mars_interface         = text,
+		   java_hidden = FALSE ]
+    {
+        ALL 
+        *   
+        /   
+        TO  
+        BY  !           12
+		OFF
+    } 
+    
+    NUMBER [ java_control = CHOICE_TEXT_2, 
+			 java_section = OTHER, 
+			 marsdoc      = field/ensemble,
+			 mars_interface         = text,
+			 java_hidden = FALSE ]
+    {
+        ALL 
+        OFF ;   OFF
+		TO  
+		BY
+        *   
+        /
+    } = OFF
+    
+
+    DOMAIN  [ 	help = help_multiple_selection, # For Metview
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = id,
+				mars_interface         = menu,
+				java_hidden = FALSE ] 
+    {
+	&TIGGEDEF&DOMAIN
+    } = GLOBE
+
+    ORIGIN 	[ 	java_control = CHOICE, 
+				java_section = ID, 
+				marsdoc      = field/supplementary,
+				mars_interface         = menu,
+				java_hidden  = FALSE ]
+	{
+		&TIGGEDEF&ORIGIN
+	} = ECMF
+
+
+    SOURCE  [   java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+				mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+    TARGET [ java_control = TEXT, 
+			 java_section = TARGET, 
+			 marsdoc      = target,
+			 mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+			 java_hidden = FALSE ]
+    {
+		@
+        "   
+		OFF
+    } = ""
+
+
+    TRANSFER [ hidden      = TRUE, check        = false ]
+    {
+		HANDLE
+		DATA
+		OFF
+    }
+
+    FIELDSET  [ java_control = CHOICE, 
+				java_section = TARGET, 
+				marsdoc      = target,
+			 	mars_interface         = text,
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = TRUE ]
+    {
+        @
+		OFF
+    }
+    
+    CFSPATH  [ java_control = TEXT, 
+			   java_section = TARGET, 
+			   hidden      = TRUE,
+			check        = false,
+			   java_hidden = TRUE ]
+    {
+        "   
+    } = ""
+    
+    FORMAT  [ java_control = CHOICE, 
+	          java_section = DATA, 
+				hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        PACKED      ;   P
+        UNPACKED    ;   U
+        GRIB EDITION 1 ;   GRIB1
+        GRIB EDITION 2 ;   GRIB2
+    } = P
+    
+    DISP [ java_control = CHOICE,
+			java_section = DATA,
+			hidden      = TRUE,
+			check        = false,
+			java_hidden = FALSE ]
+
+    {
+        NEW ;   N
+        OLD ;   OLD
+		REMOVE
+		OFF
+    } = OFF
+    
+    RESOL [ help = help_multiple_selection,  # For Metview
+			check        = false,
+			java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = menu,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		REDUCED GAUSSIAN 128 ;   N128
+		REDUCED GAUSSIAN 200 ;   N200
+		OFF                  ;   OFF
+		319
+		213
+		106
+		63
+        *   
+    } = AUTO
+    
+    ACCURACY [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   	java_hidden = FALSE ]
+    {
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW     ;   L
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+    STYLE [ 	java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+    {
+        DISSEMINATION  
+        OFF   
+    } = OFF
+    
+	INTERPOLATION [ java_control = CHOICE_TEXT_1, 
+			   	java_section = DATA, 
+			   	marsdoc      = pproc/field,
+				mars_interface         = text,
+			    check        = false,
+			   	java_hidden = FALSE ]
+	{
+		NEAREST NEIGHBOUR
+        NEAREST LSM  
+		BILINEAR
+		OFF
+	} = OFF
+
+    AREA  [ help = help_multiple_selection,			# For Metview
+    		java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/obs,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        GLOBE                           ;   G
+        EUROPE                          ;   E 
+        NORTHERN HEMISPHERE OCTANT 1    ;   N1
+        NORTHERN HEMISPHERE OCTANT 2    ;   N2
+        NORTHERN HEMISPHERE OCTANT 3    ;   N3
+        NORTHERN HEMISPHERE OCTANT 4    ;   N4
+        SOUTHERN HEMISPHERE OCTANT 1    ;   S1
+        SOUTHERN HEMISPHERE OCTANT 2    ;   S2
+        SOUTHERN HEMISPHERE OCTANT 3    ;   S3
+        SOUTHERN HEMISPHERE OCTANT 4    ;   S4
+        *   
+        /   
+    } = G
+
+	LOCATION [ java_hidden  = TRUE , 
+				visible      = false, 
+				check        = false,
+				priority     = 0]
+	{
+		*
+        /   
+        OFF     ;  OFF
+	} = OFF
+
+    BLOCK  [ 	java_control = CHOICE_TEXT_2, 
+			 	java_section = DATA, 
+			 	marsdoc      = obs,
+				mars_interface         = text,
+			check        = false,
+			 	java_hidden = FALSE ]
+    {
+        OFF     ;  OFF
+        /   
+        *       
+    }=OFF
+
+	ROTATION [ java_control = CHOICE_TEXT_2,
+			   java_section = DATA,
+			   marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+		/
+		OFF;  OFF
+	} = OFF
+
+	FRAME [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		*
+		OFF;  OFF
+	} = OFF
+
+	BITMAP [ marsdoc      = pproc/field,
+			check        = false,
+			mars_interface         = text ]
+	{
+		OFF ; OFF
+		@
+		"
+	}  = OFF
+
+    GRID  [ java_control = CHOICE_TEXT_2, 
+			java_section = DATA, 
+			marsdoc      = pproc/field,
+			mars_interface         = text,
+			check        = false,
+			java_hidden = FALSE ]
+    {
+        ARCHIVED VALUE  ;   AV
+		320
+		160
+		80
+		48
+        *   
+        /   
+        OFF     ;  OFF
+    } = OFF
+    
+	GAUSSIAN [  help = help_multiple_selection,  # For Metview
+				java_control = CHOICE_TEXT_2, 
+				java_section = DATA, 
+				marsdoc      = pproc/field,
+				mars_interface         = text,
+			check        = false,
+				java_hidden = FALSE ]
+	{
+		REDUCED
+		REGULAR
+		OFF     ;  OFF
+	} = OFF
+
+	SPECIFICATION [ marsdoc      = pproc/field,
+			check        = false,
+					mars_interface         = text ]
+	{
+		*
+		OFF
+	} = OFF
+
+	PACKING [ help = help_multiple_selection,  # For Metview
+			  java_control = CHOICE_TEXT_2,
+			  java_section = DATA,
+			  marsdoc      = pproc/field,
+			  hidden       = true,
+			check        = false,
+			  mars_interface         = text,
+			  java_hidden = FALSE ]
+	{
+		SI   ; SIMPLE
+		CO   ; COMPLEX
+		SO   ; SECOND ORDER
+		AV   ; ARCHIVED VALUE
+		JPEG
+		OFF
+	} = OFF
+
+
+    PADDING  [ 	help = help_multiple_selection,  # For Metview
+			check        = false,
+				java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+				mars_interface    = text,
+				java_hidden = FALSE ]
+    {
+		&TIGGEDEF&PADDING
+		OFF
+    } = 0
+    
+
+    DUPLICATES  [ 	java_control = CHOICE, 
+				  	java_section = OTHER, 
+				  	marsdoc      = obs,
+					mars_interface    = on_off,
+			check        = false,
+				  	java_hidden = FALSE ]
+    {
+        KEEP
+        REMOVE
+    } = KEEP
+    
+    LAUNCH  [ java_control = TEXT, 
+			  java_section = OTHER, 
+			  hidden      = TRUE,
+			check        = false,
+			  java_hidden = FALSE ]
+    {
+        "   
+    } = ""
+    
+    USE  [ 	java_control=CHOICE, 
+	       	java_section=OTHER, 
+		   	marsdoc     = control,
+			mars_interface         = menu,
+			hidden     = TRUE,
+			check        = false,
+		   	java_hidden=FALSE ]
+    {
+        FREQUENT   
+        INFREQUENT
+        NORMAL
+		BOUNDARY CONDITIONS  ;  BC
+    } = NORMAL
+    
+    PASSWORD  [ java_control = CHOICE_TEXT_1, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        "   
+		@
+        OFF ;   OFF
+    } = OFF
+    
+    COSTONLY  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				hidden      = TRUE,
+			check        = false,
+				java_hidden = FALSE ]
+    {
+        YES ;   Y
+        NO  ;   N
+    } = N
+    
+    PROCESS  [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+    {
+		LOCAL 
+        OFF ;   OFF
+    } = LOCAL
+
+	DATABASE  [ java_control = CHOICE, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				priority = 1,
+				java_hidden = TRUE ]
+	{
+		@
+		/
+	}
+
+	EXPECT [    priority = 0,
+				java_control = CHOICE_TEXT_2, 
+				java_section = OTHER, 
+				marsdoc      = control,
+			check        = false,
+				java_hidden = FALSE]
+	{
+		ANY
+		*
+		OFF ; OFF
+	} = OFF
+
+	_VERSION [ java_control = CHOICE, 
+			   java_section = OTHER, 
+			   hidden       = TRUE,
+			check        = false,
+			   java_hidden = FALSE ]
+	{
+		*
+	} = 2.0
+    
+} ! END OF RETRIEVE
+
+READ ; X; TIGGEMETVIEW
+{
+    FIELDSET [ visible = false ] {
+    @
+    } = OUT
+
+	READ_DATA_FROM [ visible = false ]
+	{
+		FILE
+		METVIEW_ICON
+	} = FILE
+
+
+    SOURCE  [ visible = always, help = help_file_box ]
+	{
+		@
+		OFF
+    } = OFF
+
+    LOGSTATS
+    {
+		@
+        "   
+		OFF
+    }
+
+	DATA
+		[
+			interface = icon,
+			class           = GRIB,
+			exclusive       = true
+		]
+	{
+		@
+	}
+
+
+	CFSPATH {
+		@
+		OFF
+	} = OFF
+
+    ORDER [ label = 'Field Ordering' ] {
+	AS IS  ; 0
+        SORTED ; 1
+    } = AS IS
+
+	CLASS  { &TIGGEDEF&CLASS 
+			 ANY ; ANY
+			 } = ANY
+
+	STREAM [ help = help_multiple_selection, exclusive = True ]
+		{ &TIGGEDEF&STREAM 
+			 ANY ; ANY
+			 *
+			 } = ANY
+
+    TYPE   [ help = help_multiple_selection, exclusive = True ]
+		{ 
+		ANY ; ANY
+		&TIGGEDEF&TYPE   
+		*
+	} = ANY
+    
+    MODEL   { 
+		ANY ; ANY
+		&TIGGEDEF&MODEL   
+	} = ANY
+    
+    LEVTYPE
+    {
+		ANY ; ANY
+		&TIGGEDEF&LEVTYPE
+    } = ANY
+    
+    LEVELIST
+    {
+        ANY ; ANY
+		TO  ; TO
+		BY  ; BY 
+        OFF ; OFF;   OFF
+        *   
+        /   
+    } = ANY
+    
+    PARAM [ help = help_multiple_selection ] # For Metview
+    {
+        ANY             ;   ANY
+        &TIGGEDEF&PARAM
+    } = ANY
+    
+    DATE
+    {
+		ANY             ;   ANY
+		&TIGGEDEF&DATE   
+    } = ANY
+    
+    TIME
+    {
+		ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY           !        6
+    } = ANY
+    
+    STEP
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+    } = ANY
+    
+    ANOFFSET
+    {
+        ANY ;   ANY
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY        !           12
+		OFF
+    } = ANY
+    
+    ACCURACY 
+    {
+		ANY     ;   ANY
+        NORMAL  ;   N
+        REDUCED ;   R
+        LOW ;   L
+        *   
+		ARCHIVED VALUE ; AV
+    } = N
+    
+	STYLE
+    {
+        DISSEMINATION  
+        OFF   
+		ANY
+    } = ANY
+
+	INTERPOLATION
+    {
+        NEAREST NEIGHBOUR  
+        NEAREST LSM  
+		BILINEAR
+        OFF   
+		ANY
+    } = ANY
+
+    AREA
+    {
+		ANY ; ANY
+        GLOBE               ;  GLOBE;  G
+        EUROPE              ;  EUROPE; E
+        *   
+        /   
+    } = ANY
+
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+	RESOL 
+	{
+        ARCHIVED VALUE       ;   AV
+		AUTOMATIC RESOLUTION ;   AUTO
+		319
+		213
+		106
+        *   
+		ANY ; ANY
+	} = ANY
+
+	ROTATION
+	{
+		ANY     ; ANY
+		*
+		/
+	} = ANY
+
+    GRID
+    {
+        ANY     ; ANY
+        *   
+        /   
+    } = ANY
+
+	GAUSSIAN 
+	{
+		REDUCED
+		REGULAR
+		OFF     ; OFF;  OFF
+	} = OFF
+
+	SPECIFICATION 
+	{
+		*
+		OFF
+	} = OFF
+
+	TARGET [ visible = false ]
+	{
+		@
+		"
+		OFF
+	} = OFF
+
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+		ANY
+    } = ANY
+    
+! For compatibility with RETRIEVE. They are unset in Mars rules
+
+	REPRES { &TIGGEDEF&REPRES
+			 ANY ; ANY
+			 } = ANY 
+
+    ORIGIN 	{ &TIGGEDEF&ORIGIN
+			 ANY ; ANY
+			 } = ANY 
+
+    PADDING  
+    {
+		ANY  ; ANY
+		&TIGGEDEF&PADDING
+    } = ANY
+    
+    DOMAIN 
+    {
+	&TIGGEDEF&DOMAIN
+	ANY
+    } = ANY
+    
+    EXPVER{
+		@
+		1
+		2
+		11
+		12
+        "   
+        *   
+		ANY ; ANY
+    } = ANY
+    
+}
+
+FLUSH ;   Flushes data   ;   MARS
+{
+
+    CLASS  { &TIGGEDEF&CLASS  }
+
+    TYPE   { &TIGGEDEF&TYPE   }
+
+    STREAM { &TIGGEDEF&STREAM }
+
+    MODEL  { &TIGGEDEF&MODEL }
+
+    ORIGIN { &TIGGEDEF&ORIGIN }
+
+    EXPVER  [ priority = 1 ]
+    {
+		@
+        "       
+        *       
+    }
+    
+    LEVTYPE  { &TIGGEDEF&LEVTYPE }
+    
+    LEVELIST  
+    {
+		TO ; TO
+		BY ; BY 
+        OFF ;   OFF
+        *       
+        /       
+    }
+    
+    REPRES   { &TIGGEDEF&REPRES }
+    
+    DOMAIN 
+    {
+	&TIGGEDEF&DOMAIN
+    }
+    
+    PARAM { &TIGGEDEF&PARAM }
+    
+    DATE
+    {
+        JANUARY     ;   JAN
+        FEBRUARY    ;   FEB
+        MARCH       ;   MAR
+        APRIL       ;   APR
+        MAY     ;   MAY
+        JUNE        ;   JUN
+        JULY        ;   JUL
+        AUGUST      ;   AUG
+        SEPTEMBER   ;   SEP
+        OCTOBER     ;   OCT
+        NOVEMBER    ;   NOV
+        DECEMBER    ;   DEC
+        *   
+         CURRENT DATE ; 0
+         YESTERDAY    ; -1
+		 TO ; TO
+		 /
+    }
+    
+    TIME
+    {
+        *   
+        /   
+        TO  ;   TO
+        BY  ;   BY    !                               6
+    }
+    
+    STEP
+    {
+        *   
+    }
+    
+    ANOFFSET
+    {
+        *   
+		OFF
+    }
+    
+    NUMBER
+    {
+        ALL ;   ALL
+        OFF ;   OFF
+		TO  ; TO
+		BY
+        *   
+        /
+    } 
+    
+    SOURCE
+    {
+		@
+		/
+        "   
+    }
+    
+    DISP
+    {
+        NEW ;   N
+        OLD ;   OLD
+    } 
+    
+    AREA
+    {
+        GLOBE   ;   G
+        EUROPE  ;   E
+    }
+    
+	FRAME 
+	{
+		*
+		OFF; OFF
+	} = OFF
+
+	BITMAP 
+	{
+		OFF ; OFF
+		@
+		"
+	} = OFF
+
+    RESOL
+    {
+        /
+        *   
+    }
+
+    GRID
+    {
+        *
+        /
+        OFF     ; OFF;  OFF
+    }
+    
+    PASSWORD
+    {
+        "   
+    } 
+
+	DATABASE
+	{
+		@
+		/
+	} 
+
+! Only for FLUSH
+
+	WAIT
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+	DECACHE
+	{
+		TRUE
+		FALSE
+	} = FALSE
+
+} ! END OF FLUSH
diff --git a/share/metview/etc/uPlotTable b/share/metview/etc/uPlotTable
new file mode 100644
index 0000000..c1041c2
--- /dev/null
+++ b/share/metview/etc/uPlotTable
@@ -0,0 +1,1063 @@
+#
+# uPlot Table
+#
+#	Contains the definitions used by uPlot module
+#
+#	There are various types of definitions
+#
+#	1. The action associated to each request
+#	   processed by uPlot
+#
+#	2. The possible types of VisDefs associated
+#	   to a data unit
+#
+
+#####################################################
+# Request group
+#####################################################
+
+request,
+	class		= PLOT_SUPERPAGE,
+	action		= Create,
+	builder        = PlotPageBuilder,
+	view           = EmptyView
+
+request,
+	class 		= SUPERPAGE,
+	action		= Plot,
+	view           = None
+
+request,
+	class		= DROP,
+	action		= Drop,
+	builder		= DropBuilder,
+	view           = None
+
+request,
+	class		= GRIB,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= GribDecoder,
+	view        = GeoView
+
+request,
+	class		= GEOPOINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= GeopointsDecoder,
+	view        = GeoView
+
+request,
+	class		= BUFR,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= BufrDecoder,
+	view        = GeoView
+
+request,
+	class		= NETCDF_GEO_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= NETCDF_GEO_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= NETCDF_GEO_MATRIX,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= NETCDF_XY_MATRIX,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view		= CartesianView
+
+request,
+     class          = NETCDF_XY_POINTS,
+     action         = Create,
+     builder        = DataBuilder,
+     decoder        = SimpleDecoder,
+     view           = CartesianView
+
+request,
+	class		= ODB_DB,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= ODB_VISUALISER,
+	action		= Skip,
+	builder		= None,
+	view        = None
+
+request,
+	class		= ODB_GEO_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= ODB_GEO_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= ODB_XY_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view		= CartesianView
+
+request,
+	class		= ODB_XY_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view		= CartesianView
+
+request,
+	class		= ODB_XY_BINNING,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view		= CartesianView
+
+request,
+	class		= PRASTERLOOP,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= PRINTER_MANAGER,
+	action		= OutputFormat,
+	view		= None
+
+request,
+	class		= TABLE_HISTOGRAM,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view			= CartesianView
+
+request,
+	class		= TABLE_XY_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view			= CartesianView
+
+request,
+	class		= TABLE_GEO_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= TABLE_XY_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view			= CartesianView
+
+request,
+	class		= TABLE_GEO_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= TABLE_XY_BINNING,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= TABLE_GEO_BINNING,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= TABLE_XY_BOXES,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= TABLE_GEO_BOXES,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= TABLE_HOR_BAR,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= TABLE_VER_BAR,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_HISTOGRAM,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_XY_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_GEO_POINTS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= INPUT_XY_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_GEO_VECTORS,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= INPUT_XY_BINNING,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_GEO_BINNING,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= INPUT_XY_BOXES,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_GEO_BOXES,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = GeoView
+
+request,
+	class		= INPUT_HOR_BAR,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view        = CartesianView
+
+request,
+	class		= INPUT_VER_BAR,
+	action		= Create,
+	builder		= DataBuilder,
+	decoder		= SimpleDecoder,
+	view			= CartesianView
+
+request,
+	class		= CLEAN,
+	action		= Skip,
+	builder		= None,
+	view			= None
+
+request,
+    class       = REFRESH,
+    action      = Skip,
+    builder     = None,
+    view        = None
+
+request,
+     class      = NEWPAGE,
+     action     = Newpage,
+     view       = None
+
+request,
+   class       = GRIB_VECTORS,
+   action      = Create,
+   builder     = DataBuilder,
+   decoder     = SimpleDecoder,
+   view        = GeoView
+
+#############################################
+#  View list
+#############################################
+
+view,
+	class       = MAPVIEW,
+	name        = MapView
+
+view,
+    class       = GEOVIEW,
+    name        = MapView
+
+view,
+	class       = CARTESIANVIEW,
+	name        = CartesianView
+
+view,
+    class       = MXSECTVIEW,
+    name        = XSectView,
+    service     = XSection
+
+view,
+    class       = MAVERAGEVIEW,
+    name        = AverageView,
+    service     = XSection
+
+view,
+    class       = MVERTPROFVIEW,
+    name        = VertProfView,
+    service     = XSection
+
+#############################################
+#  Data unit list
+#############################################
+
+dataunit,
+     class            = GRIB,
+     defaultVisDef    = MCONT/MWIND,
+     1D_VISDEF        = MCONT/PCONT,
+     2D_VISDEF        = MWIND/PWIND,
+     listVisDef       = MCONT/MWIND/PWIND/PCONT
+
+dataunit,
+	class		= GEOPOINTS,
+	defaultVisDef   = MSYMB,
+	listVisDef	= MSYMB/MWIND/MGRAPH/PGRAPH/PSYMB
+
+dataunit,
+	class		= BUFR,
+	defaultVisDef   = POBS,
+	listVisDef	= POBS 
+
+dataunit,
+	class		= NETCDF_GEO_POINTS,
+	defaultVisDef   = MSYMB,
+	listVisDef	= MSYMB/MGRAPH/PGRAPH/PSYMB
+
+dataunit,
+	class		= NETCDF_GEO_VECTORS,
+	defaultVisDef   = MWIND,
+	listVisDef	= MWIND/MSYMB/MCONT/MGRAPH/PSYMB/PGRAPH/PCONT/PWIND
+
+dataunit,
+	class		= NETCDF_GEO_MATRIX,
+	defaultVisDef   = MCONT,
+	listVisDef	= MSYMB/MCONT/MWIND/MGRAPH/PSYMB/PGRAPH/PCONT/PWIND
+
+dataunit,
+	class		= NETCDF_XY_MATRIX,
+	defaultVisDef   = MCONT,
+	listVisDef	= MSYMB/MCONT/MWIND/MGRAPH/PSYMB/PGRAPH/PCONT/PWIND
+
+dataunit,
+     class          = NETCDF_XY_POINTS,
+     defaultVisDef  = MGRAPH,
+     listVisDef     = MSYMB/MGRAPH/PSYMB/PGRAPH
+
+dataunit,
+	class		= ODB_DB,
+	defaultVisDef   = MSYMB,
+	listVisDef	= MSYMB/PSYMB/MGRAPH/PGRAPH/MWIND/PWIND
+
+dataunit,
+	class		= ODB_GEO_POINTS,
+	defaultVisDef   = MSYMB,
+	listVisDef	= MSYMB/MGRAPH/PSYMB/PGRAPH
+
+dataunit,
+	class		= ODB_GEO_VECTORS,
+	defaultVisDef   = MWIND,
+	listVisDef	= MWIND/PWIND
+
+dataunit,
+	class		= ODB_XY_POINTS,
+	defaultVisDef   = MSYMB,
+	listVisDef	= MSYMB/PSYMB/MGRAPH/PGRAPH
+
+dataunit,
+	class		= ODB_XY_VECTORS,
+	defaultVisDef   = MWIND,
+	listVisDef	= MWIND/PWIND
+
+dataunit,
+	class		= ODB_XY_BINNING,
+	defaultVisDef   = MCONT,
+	listVisDef	= MCONT/PCONT
+
+dataunit,
+	class		= STATION,
+	defaultVisDef   = MSYMB,
+	listVisDef	= MSYMB/MGRAPH/PSYMB/PGRAPH
+
+dataunit,
+	class		= PRASTERLOOP,
+	defaultVisDef   = PVOID,
+	listVisDef      = PVOID
+
+dataunit,
+	class		= TABLE_HISTOGRAM,
+	defaultVisDef  = MHIST,
+	listVisDef	= MHIST
+
+dataunit,
+	class		= TABLE_XY_POINTS,
+	defaultVisDef  = MSYMB,
+	listVisDef	= MSYMB/MGRAPH
+
+dataunit,
+	class		= TABLE_GEO_POINTS,
+	defaultVisDef  = MSYMB,
+	listVisDef	= MSYMB/MGRAPH
+
+dataunit,
+	class		= TABLE_XY_VECTORS,
+	defaultVisDef  = MWIND,
+	listVisDef	= MWIND
+
+dataunit,
+	class		= TABLE_GEO_VECTORS,
+	defaultVisDef  = MWIND,
+	listVisDef	= MWIND
+
+dataunit,
+	class		= TABLE_XY_BINNING,
+	defaultVisDef  = MCONT,
+	listVisDef	= MCONT
+
+dataunit,
+	class		= TABLE_GEO_BINNING,
+	defaultVisDef  = MCONT,
+	listVisDef	= MCONT
+
+dataunit,
+   class          = TABLE_XY_BOXES,
+   defaultVisDef  = MBOXPLOT,
+   listVisDef     = MBOXPLOT
+
+dataunit,
+   class          = TABLE_GEO_BOXES,
+   defaultVisDef  = MBOXPLOT,
+   listVisDef     = MBOXPLOT
+
+dataunit,
+   class          = TABLE_HOR_BAR,
+   defaultVisDef  = MGRAPH,
+   listVisDef     = MGRAPH
+
+dataunit,
+   class          = TABLE_VER_BAR,
+   defaultVisDef  = MGRAPH,
+   listVisDef     = MGRAPH
+
+dataunit,
+   class          = INPUT_HISTOGRAM,
+   defaultVisDef  = MHIST,
+   listVisDef     = MHIST
+
+dataunit,
+   class          = INPUT_XY_POINTS,
+   defaultVisDef  = MSYMB,
+   listVisDef     = MSYMB/MGRAPH
+
+dataunit,
+   class          = INPUT_GEO_POINTS,
+   defaultVisDef  = MSYMB,
+   listVisDef     = MSYMB/MGRAPH
+
+dataunit,
+   class          = INPUT_XY_VECTORS,
+   defaultVisDef  = MWIND,
+   listVisDef     = MWIND
+
+dataunit,
+   class          = INPUT_GEO_VECTORS,
+   defaultVisDef  = MWIND,
+   listVisDef     = MWIND
+
+dataunit,
+   class          = INPUT_XY_BINNING,
+   defaultVisDef  = MCONT,
+   listVisDef     = MCONT
+
+dataunit,
+   class          = INPUT_GEO_BINNING,
+   defaultVisDef  = MCONT,
+   listVisDef     = MCONT
+
+dataunit,
+   class          = INPUT_XY_BOXES,
+   defaultVisDef  = MBOXPLOT,
+   listVisDef     = MBOXPLOT
+
+dataunit,
+   class          = INPUT_GEO_BOXES,
+   defaultVisDef  = MBOXPLOT,
+   listVisDef     = MBOXPLOT
+
+dataunit,
+   class          = INPUT_HOR_BAR,
+   defaultVisDef  = MGRAPH,
+   listVisDef     = MGRAPH
+
+dataunit,
+   class          = INPUT_VER_BAR,
+   defaultVisDef  = MGRAPH,
+   listVisDef     = MGRAPH
+
+dataunit,
+   class          = GRIB_VECTORS,
+   defaultVisDef  = MWIND,
+   listVisDef     = MWIND
+
+#############################################
+#  Visual definition list
+#############################################
+
+visdef,
+   class    = PCONT
+
+visdef,
+   class    = MCONT
+
+visdef,
+   class    = POBS
+
+visdef,
+   class    = PWIND
+
+visdef,
+   class    = MWIND
+
+visdef,
+	class		= PGRAPH
+
+visdef,
+	class		= MGRAPH
+
+visdef,
+	class		= PAXIS
+
+visdef,
+	class		= PSYMB
+
+visdef,
+	class		= MSYMB
+
+visdef,
+	class		= MVALUE
+
+visdef,
+	class		= MBOXPLOT
+
+
+############################################
+#  Companion list
+############################################
+
+companion,
+	class		= u,
+	friend		= v
+
+companion,
+	class		= 10u,
+	friend		= 10v
+
+companion,
+	class		= ewss,
+	friend		= nsss
+
+companion,
+    class       = wind,
+    friend      = dwi,
+    mode        = sd
+
+companion,
+    class       = swh,
+    friend      = mwd,
+    mode        = sd
+
+companion,
+    class       = ocu,
+    friend      = ocv
+
+companion,
+    class       = shww,
+    friend      = mdww,
+    mode        = sd
+
+companion,
+    class       = shts,
+    friend      = mdts,
+    mode        = sd
+
+############################################
+#  Graphics Engine list
+############################################
+
+graphics_engine,
+	class		= Default,
+	choice  	= Magics
+
+#########################################################################
+#########################################################################
+#########################################################################
+
+#request,
+#	class		= CLOSE,
+#	action		= Close
+#
+#request,
+#	class		= CLOSE_MAP_EDITOR,
+#	action		= CloseMap
+#
+#request,
+#	class		= EDIT_MAP,
+#	action		= EditMap
+#
+#request,
+#	class		= NEWPAGE,
+#	action		= Newpage
+#
+#request, 
+#	class           = MAGICS_PICTURE,
+#	action          = MagicsPicture
+#
+#request,
+#	class 		= PAGE,
+#	action		= Create,
+#	builder		= PageBuilder,
+#	view		= EmptyView
+#
+#request,
+#	class		= FLUSHSUPERPAGE,
+#	action		= Close,
+#	builder		= None,
+#	view		= None
+#
+#request,
+#	class		= PLOTWINDOW,
+#	action		= Create,
+#	builder		= PlotWindowBuilder,
+#	view		= EmptyView
+#
+#request,
+#	class		= PRASTER,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= SimpleDecoder,
+#	view		= MapView
+#
+#request,
+#	class		= VECTOR_FIELD,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= VectorFieldDecoder,
+#	view		= MapView
+#request,
+#	class		= POLAR_FIELD,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= PolarFieldDecoder,
+#	view		= MapView
+#
+#request,
+#	class		= IMAGE,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= ImageDecoder,
+#	view		= MapView
+#
+#request,
+#	class		= CURVE,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= CurveDecoder,
+#	view		= CurveView
+#request,
+#	class		= BAR_GRAPH,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= CurveDecoder,
+#	view		= CurveView
+#request,
+#	class		= DOUBLE_CURVE,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= CurveDecoder,
+#	view		= CurveView
+#request,
+#	class		= MATRIX,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= MatrixDecoder,
+#	view		= MapView
+#request,
+#	class		= NOTE,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= SimpleDecoder,
+#	view		= TextView
+#request,
+#	class		= STRING,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= SimpleDecoder,
+#	view		= TextView
+#
+#request,
+#	class		= PSFILE,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= SimpleDecoder,
+#	view		= ImportView
+#
+#request,
+#	class		= JPEG,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= SimpleDecoder,
+#	view		= ImportView
+#
+#request,
+#	class		= PNG,
+#	action		= Create,
+#	builder		= DataBuilder,
+#	decoder		= SimpleDecoder,
+#	view		= ImportView
+#
+#request,
+#	class		= PM_VPROF,
+#	action 		= Drop,
+#	builder		= ApplicationBuilder,
+#	view		= VertProfView
+#
+#request,
+#	class		= PM_XSECT,
+#	action 		= Drop,
+#	builder		= ApplicationBuilder,
+#	view		= XSectView
+#
+#request,
+#	class		= PM_AVERAGE,
+#	action 		= Drop,
+#	builder		= ApplicationBuilder,
+#	view		= AverageView
+#
+#request,
+#	class		= TEPHIGRAM,
+#	action 		= Drop,
+#	builder		= ApplicationBuilder,
+#	view		= TephigramView
+#
+#request,
+#	class		= Hovmoeller,
+#	action 		= Drop,
+#	builder		= ApplicationBuilder,
+#	view		= HovmoellerView
+#
+#request,
+#	class		= DEVICE,
+#	action		= Device,
+#	builder		= Default,
+#	view		= None
+#
+#request,
+#	class		= DEVICE_DRIVER,
+#	action		= Device,
+#	view		= None
+#
+#request,
+#	class		= INPUT_WINDOW,
+#	action		= EditMap,
+#	builder		= None,
+#	view		= None
+#
+#request,
+#	class		= MESSAGE,
+#	action		= Message,
+#	builder		= None,
+#	view		= None
+#
+#request, 
+#	class		= MAGICS_PARAMETERS,
+#	action		= Skip,
+#	builder		= None,
+#	view		= None
+#
+#request,
+#	class		= REGISTER,
+#	action		= RegisterTool
+#request,
+#	class		= EXIT,
+#	action		= ExitTool
+#
+#request,
+#	class		= WEBCLIENT,
+#	view		= MAPVIEW
+#
+##request, 
+##	class		= PAXIS,
+##	action		= Skip,
+##	builder		= None,
+##	view		= None
+#########################################################
+##
+##	data unit - visdef
+##
+#########################################################
+#
+#dataunit,
+#	class		= PNG,           	
+#	defaultVisDef   = PIMPORT,
+#	listVisDef	= PIMPORT
+#
+#dataunit,
+#	class		= JPEG,           	
+#	defaultVisDef   = PIMPORT,
+#	listVisDef	= PIMPORT
+#
+#dataunit,
+#	class		= PSFILE,           	
+#	defaultVisDef   = PIMPORT,
+#	listVisDef	= PIMPORT
+#
+#dataunit,
+#	class		= PRASTER,
+#	defaultVisDef   = PVOID,
+#	listVisDef      = PVOID
+#
+#dataunit,
+#	class		= MATRIX,           	
+#	defaultVisDef   = PCONT,
+###	listVisDef	= PCONT/PWIND/PGRAPH   ??Why PWIND and PGRAPHY ?
+#	listVisDef	= PCONT
+#
+#dataunit,
+#	class		= MATRIX1D,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PGRAPH
+#
+#dataunit,
+#	class		= MATRIX2D,           	
+#	defaultVisDef   = PCONT,
+#	listVisDef	= PCONT 
+#
+#dataunit,
+#	class		= MATRIX3D,           	
+#	defaultVisDef   = PWIND,
+#	listVisDef	= PWIND 
+#
+#dataunit,
+#	class		= CURVE,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PGRAPH/PSYMB
+#
+#dataunit,
+#	class		= BAR_GRAPH,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PGRAPH/PSYMB
+#
+#dataunit,
+#	class		= DOUBLE_CURVE,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PGRAPH/PSYMB
+#   	 	 
+#    	 	  	 	 
+#dataunit,
+#	class		= POLAR_FIELD,           	
+#	defaultVisDef   = PWIND,
+#	listVisDef	= PWIND/PCONT 
+#
+#dataunit,
+#	class		= LIST_OF_POINTS,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PGRAPH/PSYMB 
+#
+#dataunit,
+#	class		= IMAGE,           	
+#	defaultVisDef   = PMIMAGE,
+#	listVisDef	= PMIMAGE 
+#
+#dataunit,
+#	class		= PM_BUFR_TEPHI,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PSYMB/PGRAPH 
+#
+#dataunit,
+#	class		= PM_GRIB_TEPHI,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PSYMB/PGRAPH
+#
+#dataunit,
+#	class		= PM_PRE19950404_GRIB_TEPHI,           	
+#	defaultVisDef   = PGRAPH,
+#	listVisDef	= PSYMB/PGRAPH
+#
+#dataunit,
+#	class		= DUMMYDATA,
+#	defaultVisDef   = PSYMB,
+#	listVisDef	= PGRAPH/PSYMB/PWIND/PCONT/POBS
+#
+#dataunit,
+#	class		= NOTE,
+#	defaultVisDef   = ANNOTATION,
+#	listVisDef	= ANNOTATION/PTEXT
+#
+#dataunit,
+#	class		= STRING,
+#	defaultVisDef   = ANNOTATION,
+#	listVisDef	= ANNOTATION/PTEXT
+#
+##########################################################
+##
+## Visdef  
+##
+##########################################################
+#
+#visdef,
+#	class		= PMIMAGE
+#
+#visdef,
+#	class		= PCURVE
+#
+#visdef,
+#	class		= PIMPORT
+#
+visdef,
+	class		= PVOID
+
+##visdef,
+##	class = ANNOTATION
+#
+########################################################
+##
+##   Default group
+##
+##   (here are the defaults for the requests in PlotMod
+##
+########################################################
+#
+#
+#driver,
+#	class		= XWINDOW,
+#	name		= OpenGL
+#
+#driver,
+#	class		= WINDOW,
+#	name		= OpenGL
+#
+#driver,
+#	class		= POSTSCRIPT,
+#	name		= PostScript
+#
+#driver,
+#	class		= ICON,
+#	name		= PostScript
+#
+#driver,
+#	class		= FILE,
+#	name		= PostScript
+#
+#view,
+#	class		= SATELLITEVIEW,
+#	name		= SatelliteView
+#
+#view,
+#	class		= CURVEVIEW,
+#	name		= CurveView
+##	service		= CURVE
+#
+#view,
+#	class		= TEPHIGRAMVIEW,
+#	name		= TephigramView,
+#	service		= PM_Tephigram
+#
+#view,
+#	class		= TEXTVIEW,
+#	name		= TextView
+#view,
+#	class		= IMPORTVIEW,
+#	name		= ImportView
+#
+#view,
+#	class		= EMPTYVIEW,
+#	name		= EmptyView
+#
+#view,
+#	class		= HOVMOELLERVIEW,
+#	name		= HovmoellerView,
+#	service		= Hovmoeller
+#
+
+############################################
+##
+##  Background
+##
+############################################
+#
+#background,
+#	class 		= Default,
+#	choice		= PCONT
+#
+############################################
+##
+##  Window
+##
+############################################
+#
+#window,
+#	class 		= PLOT_SUPERPAGE
+#
+#window,
+#	class		= PLOT_PAGE
+
diff --git a/share/metview/icons/ALIGN_BOTTOM.xpm b/share/metview/icons/ALIGN_BOTTOM.xpm
new file mode 100644
index 0000000..6e0c9a5
--- /dev/null
+++ b/share/metview/icons/ALIGN_BOTTOM.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * ALIGN_BOTTOM_xpm[] = {
+"16 16 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000000000000",
+"X	c #FFFFCCCC9999",
+"o	c #00000000FFFF",
+"                ",
+"      ....      ",
+"      .XX.      ",
+"      .XX.      ",
+"      .XX. .... ",
+"      .XX. .XX. ",
+"      .XX. .XX. ",
+" .... .XX. .XX. ",
+" .XX. .XX. .XX. ",
+" .XX. .XX. .XX. ",
+" .XX. .XX. .XX. ",
+" .XX. .XX. .XX. ",
+" .XX. .XX. .XX. ",
+" oooooooooooooo ",
+" oooooooooooooo ",
+"                "};
diff --git a/share/metview/icons/ALIGN_LEFT.xpm b/share/metview/icons/ALIGN_LEFT.xpm
new file mode 100644
index 0000000..40efe64
--- /dev/null
+++ b/share/metview/icons/ALIGN_LEFT.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * ALIGN_LEFT_xpm[] = {
+"16 16 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #00000000FFFF",
+"X	c #000000000000",
+"o	c #FFFFCCCC9999",
+"                ",
+" ..XXXXXX       ",
+" ..oooooX       ",
+" ..oooooX       ",
+" ..XXXXXX       ",
+" ..             ",
+" ..XXXXXXXXXXXX ",
+" ..oooooooooooX ",
+" ..oooooooooooX ",
+" ..XXXXXXXXXXXX ",
+" ..             ",
+" ..XXXXXXXXX    ",
+" ..ooooooooX    ",
+" ..ooooooooX    ",
+" ..XXXXXXXXX    ",
+"                "};
diff --git a/share/metview/icons/ALIGN_RIGHT.xpm b/share/metview/icons/ALIGN_RIGHT.xpm
new file mode 100644
index 0000000..16b6140
--- /dev/null
+++ b/share/metview/icons/ALIGN_RIGHT.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * ALIGN_RIGHT_xpm[] = {
+"16 16 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000000000000",
+"X	c #00000000FFFF",
+"o	c #FFFFCCCC9999",
+"                ",
+"       ......XX ",
+"       .oooooXX ",
+"       .oooooXX ",
+"       ......XX ",
+"             XX ",
+" ............XX ",
+" .oooooooooooXX ",
+" .oooooooooooXX ",
+" ............XX ",
+"             XX ",
+"    .........XX ",
+"    .ooooooooXX ",
+"    .ooooooooXX ",
+"    .........XX ",
+"                "};
diff --git a/share/metview/icons/ALIGN_TOP.xpm b/share/metview/icons/ALIGN_TOP.xpm
new file mode 100644
index 0000000..7fe57ff
--- /dev/null
+++ b/share/metview/icons/ALIGN_TOP.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * ALIGN_TOP[] = {
+"16 16 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #00000000FFFF",
+"X	c #000000000000",
+"o	c #FFFFCCCC9999",
+"                ",
+"                ",
+" .............. ",
+" .............. ",
+" XooX XooX XooX ",
+" XooX XooX XooX ",
+" XooX XooX XooX ",
+" XooX XooX XooX ",
+" XXXX XooX XooX ",
+"      XooX XooX ",
+"      XooX XooX ",
+"      XooX XXXX ",
+"      XooX      ",
+"      XXXX      ",
+"                ",
+"                "};
diff --git a/share/metview/icons/BINARY.xpm b/share/metview/icons/BINARY.xpm
new file mode 100644
index 0000000..7d35212
--- /dev/null
+++ b/share/metview/icons/BINARY.xpm
@@ -0,0 +1,37 @@
+/* XPM */
+static char * BINARY_icon[] = {
+"32 32 2 1",
+" 	c #000000000000",
+".	c #FFFFFFFFFFFF",
+"                                ",
+" .............................. ",
+" .............................. ",
+" .. ... ... ... ... ... ... ... ",
+" . . .  .. . . . .  .. . . . .. ",
+" . . .. .. . . . .. .. . . . .. ",
+" . . .. .. . . . .. .. . . . .. ",
+" .. ..   .. ... ..   .. ... ... ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .. ... ... ... ... ... ... ... ",
+" .  .. . .  .. . . . .  .. . .. ",
+" .. .. . .. .. . . . .. .. . .. ",
+" .. .. . .. .. . . . .. .. . .. ",
+" .   .. ..   .. ... ..   .. ... ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .. ... ... ... ... ... ... ... ",
+" .  .. . . . . . .  .. . .  ... ",
+" .. .. . . . . . .. .. . .. ... ",
+" .. .. . . . . . .. .. . .. ... ",
+" .   .. ... ... ..   .. ..   .. ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/BINNING.xpm b/share/metview/icons/BINNING.xpm
new file mode 100644
index 0000000..ddcb195
--- /dev/null
+++ b/share/metview/icons/BINNING.xpm
@@ -0,0 +1,152 @@
+/* XPM */
+static char *BINNING[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 114 2",
+"   c #6E737D",
+".  c #6E747E",
+"X  c #6F7580",
+"o  c #6D7C9F",
+"O  c #717B90",
+"+  c #757D90",
+"@  c #707A94",
+"#  c #737E95",
+"$  c #747D95",
+"%  c #4F6DCF",
+"&  c #5571D0",
+"*  c #5575D0",
+"=  c #5776D0",
+"-  c #5B7AD1",
+";  c #5F7DD1",
+":  c #627FCF",
+">  c #627ED2",
+",  c #7B838E",
+"<  c #7C858F",
+"1  c #7C8590",
+"2  c #7E8691",
+"3  c #7F8893",
+"4  c #74829F",
+"5  c #79839D",
+"6  c #6D84CE",
+"7  c #7A93CF",
+"8  c #6785D3",
+"9  c #6B84D4",
+"0  c #6A87D4",
+"q  c #6C85D4",
+"w  c #6D85D4",
+"e  c #6D8AD4",
+"r  c #6E8BD5",
+"t  c #6F8CD4",
+"y  c #708DD5",
+"u  c #718ED5",
+"i  c #738FD5",
+"p  c #7D97D0",
+"a  c #7D96D1",
+"s  c #7A96D6",
+"d  c #7E99D4",
+"f  c #7D98D6",
+"g  c #7D98D7",
+"h  c #7F9AD7",
+"j  c #80858D",
+"k  c #82878F",
+"l  c #838890",
+"z  c #848891",
+"x  c #868B92",
+"c  c #868A93",
+"v  c #8B8F97",
+"b  c #828D9A",
+"n  c #818E9D",
+"m  c #85919D",
+"M  c #84909E",
+"N  c #8F939A",
+"B  c #8099D1",
+"V  c #809BD7",
+"C  c #829DD7",
+"Z  c #8C9ED4",
+"A  c #829DD8",
+"S  c #8B9EDA",
+"D  c #8FA2DB",
+"F  c #91A2D4",
+"G  c #94A5D4",
+"H  c #94A4D5",
+"J  c #90A3DB",
+"K  c #93A5DC",
+"L  c #96A7DC",
+"P  c #90ABDB",
+"I  c #97A8DD",
+"U  c #92ACDC",
+"Y  c #99AADD",
+"T  c #9AABDD",
+"R  c #9CACDD",
+"E  c #9CB6DE",
+"W  c #9DB7DE",
+"Q  c #9EB8DE",
+"!  c #AFC3D2",
+"~  c #A9C0DB",
+"^  c #AAC1DA",
+"/  c #ACC3DF",
+"(  c #AEC5DF",
+")  c #B0C4D4",
+"_  c #B4C8D8",
+"`  c #B5CAD9",
+"'  c #B7CBDA",
+"]  c #B6CCDD",
+"[  c #B7CCDD",
+"{  c #AEC5E0",
+"}  c #BBD1E2",
+"|  c #BBD1E3",
+" . c #BDD3E2",
+".. c #BFD5E2",
+"X. c #CAD1DF",
+"o. c #CBD2DF",
+"O. c #D0D5D8",
+"+. c #D4D8DB",
+"@. c #DBDFE2",
+"#. c #D3DAE8",
+"$. c #D5DBE8",
+"%. c #D5DCE8",
+"&. c #D5DCE9",
+"*. c #D7DEE9",
+"=. c #DDE0E1",
+"-. c #DCE0E2",
+";. c #DEE2E5",
+":. c #E6EAEC",
+">. c #E7EAEC",
+",. c #E7EBEC",
+"<. c #E7EBED",
+"1. c #E8ECEC",
+"2. c #E9EDEC",
+"3. c #EBEEED",
+/* pixels */
+"  j < j k j j c + + j c c j , j k j k k z + O , 1 < , 1 1 , , . ",
+"l O. at .@. at .@. at .-.G F -.+.+.-. at .@. at .@. at .@. at .G 7 ` ` ` _ _ _ ` ) b ",
+"c -.<.<.>.>.>.2.Y J ,.>.3.,.,.>.:.:.1.<.1.Y s ....} } } } } [ n ",
+"c @.<.<.:.>.>.2.L L >.>.,.,.>.>.:.:.:.>.1.Y s } } } } } } ..[ m ",
+"c @.:.:.:.:.:.>.Y K 1.>.:.:.>.>.:.:.:.:.1.Y s } } } } } } } [ n ",
+"c @.:.:.:.:.>.1.L K 1.<.:.:.>.>.:.:.:.:.2.Y s ..} } } } } } [ m ",
+"c @.>.:.:.:.>.>.L L >.:.:.:.>.>.:.:.:.:.2.T s ..} } } } } } [ m ",
+"c @.1.>.>.:.>.1.Y L 1.>.>.:.>.>.:.:.:.:.2.T s ..} } } ..} ..[ m ",
+"j o.$.$.#.#.$.%.D S *.$.#.#.%.#.%.#.%.$.$.K u { / / / / / / ^ n ",
+"@ 6 9 9 9 9 q q & % > > > > > > > > > > > % % > ; ; ; ; > ; : o ",
+"l X.$.#.#.#.#.$.J 8 P U U P P U P P U U U 0 u { / / / / / / ~ n ",
+"c @.<.<.>.>.>.,.Y t E E E E E E E E E E E u s ..} ..} } } ..[ n ",
+"c @.<.:.:.:.>.>.Y r E E E E E E E E E E E u s } } } } } } } [ m ",
+"c @.>.<.:.:.>.,.Y r E E E E E E E E E E E u s ..} } } } } } [ n ",
+"c @.<.<.:.:.:.:.L r E E E E E E E E E E E u s } } } } } } } [ m ",
+"c @.<.<.:.:.:.:.Y r E E E E E E E E E E E r s } } } } } } } [ M ",
+"l @.:.:.>.>.>.1.L r E E E E E E E E E E W u s  .} } } } } } [ n ",
+"c @.:.:.>.>.>.1.Y r Q E E E E E E E E E E u s  .} } } } } } [ M ",
+"c @.:.:.:.:.>.1.Y r Q E E E E E E E E E E u s  .} } } } } } [ M ",
+"c @.:.:.:.:.<.1.L r E E E E E E E E E E E r s } } } } } } } [ M ",
+"l -.<.<.<.<.<.<.Y r E E E E E E E E E E W u s  .} } } } } } [ n ",
+"c @.1.1.<.3.<.1.Y u E E Q Q E Q E E W W W u s .. . . . .| ..[ m ",
+"$ J Y L I I I I 9 = u t r r r u t t t r u = - g d g g V g d d 4 ",
+"$ p g d g g g s ; > g d g g g d d d d d g > 8 K K K K K K K D 5 ",
+"3 ` ..} ..} .. .A g .. . .| }  . .} ..} ..A J 3.1.3.:.<.>.1.;.N ",
+"l ' } } } } } ..V d ..| } } } } } } } } ..A J 1.<.1.:.:.:.:.;.N ",
+"3 _ } } } } } } d g ..} } } } } } } } } ..d D <.<.<.:.:.<.<. at .N ",
+"3 [ } } } } } } V s } } } } } } } } } } ..A J ,.<.<.:.:.>.<.;.N ",
+"3 _ | | } } } ..A s ..} } } } | } } } } ..V D ,.<.<.<.<.>.:. at .N ",
+"3 ' | } } } } } V d ..} } | } | } } } } ..A D 1.>.<.<.<.:.<.;.N ",
+"3 ! _ _ ' _ ' ' d p [ _ _ ` [ _ _ [ ` ` [ B Z @. at .@. at .@. at .@.O.v ",
+"X 1 3 3 3 3 3 3 # # 3 3 3 3 3 2 2 3 z 1 1 # # c c l c c c c l X "
+};
diff --git a/share/metview/icons/BUFR.xpm b/share/metview/icons/BUFR.xpm
new file mode 100644
index 0000000..357a3e3
--- /dev/null
+++ b/share/metview/icons/BUFR.xpm
@@ -0,0 +1,271 @@
+/* XPM */
+static char *BUFR[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 233 2",
+"   c #3D0F17",
+".  c #26131C",
+"X  c #1C1A26",
+"o  c #241C24",
+"O  c #2B1C23",
+"+  c #23232B",
+"@  c #28272F",
+"#  c #312026",
+"$  c #2A2D33",
+"%  c #262E38",
+"&  c #3E393E",
+"*  c #480B14",
+"=  c #570E19",
+"-  c #630612",
+";  c #64111C",
+":  c #4F1C24",
+">  c #6B242E",
+",  c #283548",
+"<  c #2D384A",
+"1  c #353C49",
+"2  c #4D3D42",
+"3  c #3C414E",
+"4  c #344756",
+"5  c #3C4454",
+"6  c #374C59",
+"7  c #394F5B",
+"8  c #39515D",
+"9  c #3C4C62",
+"0  c #41464E",
+"q  c #484448",
+"w  c #414650",
+"e  c #424850",
+"r  c #46505B",
+"t  c #4B555E",
+"y  c #56575C",
+"u  c #5A5558",
+"i  c #575A5E",
+"p  c #6A585D",
+"a  c #464D60",
+"s  c #425A6E",
+"d  c #535A64",
+"f  c #575F6B",
+"g  c #576473",
+"h  c #5F6C73",
+"j  c #6B6064",
+"k  c #636E72",
+"l  c #62747B",
+"z  c #6D7D7F",
+"x  c #7C7A7D",
+"c  c #982430",
+"v  c #D31D2F",
+"b  c #CD2B3B",
+"n  c #D02738",
+"m  c #E02638",
+"M  c #F02135",
+"N  c #A13F4A",
+"B  c #B13A45",
+"V  c #E63547",
+"C  c #EF3547",
+"Z  c #954A54",
+"A  c #8E5B63",
+"S  c #BD5863",
+"D  c #B0747C",
+"F  c #EB4A5A",
+"G  c #F04454",
+"H  c #C76C76",
+"J  c #E26874",
+"K  c #4E6E88",
+"L  c #4F718B",
+"P  c #577889",
+"I  c #4D6E91",
+"U  c #4B7194",
+"Y  c #547594",
+"T  c #5C7B93",
+"R  c #52769A",
+"E  c #5D7E9B",
+"W  c #687E8D",
+"Q  c #797B86",
+"!  c #627798",
+"~  c #69779B",
+"^  c #637F9C",
+"/  c #5C7DA5",
+"(  c #738281",
+")  c #76878A",
+"_  c #7C838A",
+"`  c #658596",
+"'  c #6C8390",
+"]  c #6C8C9A",
+"[  c #728295",
+"{  c #738F95",
+"}  c #75819A",
+"|  c #739198",
+" . c #78959D",
+".. c #7B9A9F",
+"X. c #5983A0",
+"o. c #5D8BB7",
+"O. c #6485A3",
+"+. c #6D84A1",
+"@. c #658AA4",
+"#. c #6B8CA6",
+"$. c #6284AC",
+"%. c #6A8BAD",
+"&. c #7987A3",
+"*. c #768CA4",
+"=. c #748DAD",
+"-. c #7D8FAD",
+";. c #6E94AB",
+":. c #7D9BA1",
+">. c #7394AC",
+",. c #7B92AD",
+"<. c #759AAE",
+"1. c #6389B1",
+"2. c #6F8DB1",
+"3. c #718DB0",
+"4. c #6E94B3",
+"5. c #6F9DB6",
+"6. c #6595BC",
+"7. c #6C9ABB",
+"8. c #7B94B2",
+"9. c #7299B6",
+"0. c #7A9AB1",
+"q. c #739EBA",
+"w. c #7BA0B5",
+"e. c #6095C1",
+"r. c #649CC7",
+"t. c #6F9FC0",
+"y. c #67A2CC",
+"u. c #6CA5CB",
+"i. c #73A5C3",
+"p. c #78A7C1",
+"a. c #75A9C7",
+"s. c #7BABC5",
+"d. c #72A7C9",
+"f. c #8B8D93",
+"g. c #848D9E",
+"h. c #839693",
+"j. c #959D9F",
+"k. c #A49B9D",
+"l. c #8691A4",
+"z. c #8A96A4",
+"x. c #8294A9",
+"c. c #8195B1",
+"v. c #829DB3",
+"b. c #8B9DB5",
+"n. c #87A5A6",
+"m. c #8EA2A4",
+"M. c #8EA8A7",
+"N. c #8BA7A8",
+"B. c #8BA9AC",
+"V. c #90A9A6",
+"C. c #96AFAA",
+"Z. c #9BB3AC",
+"A. c #83A1B5",
+"S. c #86A4B8",
+"D. c #8DA3B9",
+"F. c #8BAABC",
+"G. c #90A4B0",
+"H. c #98A0B4",
+"J. c #94A5BC",
+"K. c #93A9BD",
+"L. c #9AACBD",
+"P. c #97B9BC",
+"I. c #9BBBBA",
+"U. c #A9A9AE",
+"Y. c #A3B9AE",
+"T. c #A6AEB0",
+"R. c #A7ACBE",
+"E. c #A4BDB3",
+"W. c #A6B4BC",
+"Q. c #A1BEB8",
+"!. c #AEBBBF",
+"~. c #BFB5B6",
+"^. c #DA9EA3",
+"/. c #A7C0B4",
+"(. c #80AFC5",
+"). c #9AAEC1",
+"_. c #8CB0C0",
+"`. c #9DB2C4",
+"'. c #9DBBC9",
+"]. c #A2B5C6",
+"[. c #ABB3C4",
+"{. c #A3B5C8",
+"}. c #A5B9C9",
+"|. c #ABBBCB",
+" X c #B5BDC3",
+".X c #B5BFCD",
+"XX c #CEBDC0",
+"oX c #9EC0CD",
+"OX c #B8C6C7",
+"+X c #B2C1CF",
+"@X c #ACC6D2",
+"#X c #A7C8D2",
+"$X c #B6C6D3",
+"%X c #B6C9D6",
+"&X c #BBCAD6",
+"*X c #B6CED9",
+"=X c #BECDD9",
+"-X c #B4D3DB",
+";X c #BAD0DA",
+":X c #BBDDE2",
+">X c #C1C3C7",
+",X c #C4C6C9",
+"<X c #C3CBD0",
+"1X c #C0CDD9",
+"2X c #C2D3DD",
+"3X c #C9D0DD",
+"4X c #E0DDDF",
+"5X c #C7D7E0",
+"6X c #C6DDE3",
+"7X c #C9DBE2",
+"8X c #D4DDE4",
+"9X c #E1DFE0",
+"0X c #C9E2E7",
+"qX c #C5E5E9",
+"wX c #CBE6E9",
+"eX c #CDECED",
+"rX c #D5E7EC",
+"tX c #DDE4EA",
+"yX c #D2EDEF",
+"uX c #DBEBEF",
+"iX c #D5EFF0",
+"pX c #DBEEF0",
+"aX c #D7F0F1",
+"sX c #DCF1F2",
+"dX c #E8E7E8",
+"fX c #E4EAEE",
+"gX c #E1F4F5",
+"hX c #ECF1F4",
+"jX c #E6F8F8",
+"kX c #F1F3F6",
+"lX c #FDF4F5",
+"zX c #F6FBFB",
+"xX c #FFFFFF",
+/* pixels */
+"xXxXxXxXxXxXxXxXxXxXxXkX8X$X}.).).|.=XtXzXxXxXxXxXxXxXxXxXxXxXxX",
+"xXxXxXxXxXxXxXxXzX8X`.,. at .0.S.F.F.A.0.>.v.$XfXxXxXxXxXxXxXxXxXxX",
+"xXxXxXxXxXxXxX8XD.O.S.#X0XuXsXgXgXgX!.h g ] O.|.hXxXxXxXxXxXxXxX",
+"xXxXxXxXxXzX+XE E *.iXsXsXgXsXgXjXOX& p 2 d ! L ^ ,XdXkXxXxXxXxX",
+"xXxXxXxXzX].Y <.B.x.rXpXsXpXgXgXrXf j lXXX@ ' r 1 3 0 U.xXxXxXxX",
+"xXxXxXxX{.U 5.F. .}.pXpXpXgXpXgXJ., x xX9X$ ..B.M. .K +XxXxXxXxX",
+"xXxXxX&XY R 5.+.).yXpX at XL.pXgX5X~ 1 x xX4X$ :.P.I.I.:.O.8XxXxXxX",
+"xXxXtX at ._.,.v.*XiXiXsX`.D.7XJ.J.|.d Q xX4X$ ..B.N.M.m.] >.hXxXxX",
+"xXxXK.0.eXqXeXiXiXiXsX*Xc.-.2.4.*.< x xX4X$ { t 0 e 0 z ` }.xXxX",
+"xX8X at .-XeXeXiXyXiXiXiX]./ t.7.q.s.6 x xX4X$ ..B.N.M.V.Z.n.O.fXxX",
+"xX`.w.eXeXeXeXeXiXiX7X! / / b.c.9.7 x xX4X$ :.P.I.I.Q.E.E.` |.xX",
+"hX;.oXeXeXeXiXiXiXiX5Xb.-.).gXrXc.4 x xX4X$ ..B.N.M.M.Z.E...c.zX",
+"8X at .:XeXeXeXeXiXiX`.$.2.%.=.&XgX2Xw x xX4X$ { t 0 e 0 ( /.C.` tX",
+"%X;.qXeXeXeXiXiX}.o.r.d.d.t.=.).uXk x xX4X$ ..B.N.M.V.Z.E.Y.` =X",
+"}.;.:XeXeXeXeXqX2.r.u.u.d.d.p.4.c.5 x xX4X$ :.P.I.I.Q.Q.E.E.] |.",
+").I *.-XeXeXeX;Xo.r.u.d.d.d.s.s.p.4 x xX9X$ ] l k k k h.E.E.] `.",
+").X.0.x.wXeXiX}.o.y.u.d.d.a.s.s.(.7 u ~.k.+ g.Q r a d ) E.E.` L.",
+"].X.,.v.eXeXeX*X1.y.y.u.d.a.s.s.(.7 : B c O <X3X[..X].H.z.E.T |.",
+"&XU +.-XeXeXeXeX8.e.u.d.d.a.a.s.(.8 > G n . W &.8XxXxXfXz.m.Y $X",
+"tXT F.eXeXeXeXiX at X3.1.6.r.i.s.s.(.7 > G b . | g Q f.f.XXR.} ! 8X",
+"zXv._.eXeXeXiXiXiXwX%XK.b.3.q.s.(.8 > F n . W _ f.f.f.>XkX|.,.kX",
+"xX|.;.eXeXeXeXiXiXpXpXsXsX5X=.p.(.8 > F b . l.jXzXzXxXxXxXK.`.xX",
+"xXgX#.#XeXeXeXeXiXiXsXsXsXgXK.9.s.4 > F b .  XzXzXzXzXxXtX#.8XxX",
+"xXxX}.;.qXeXiXiXiXaXpXiXsXgX).5.P o N F V = y fXzXzXzXzXK.K.xXxX",
+"xXxXhX>._.eXyXiXiXiXaXiXsXgX].%.& p J F C v   T.zXzXxX=X#.tXxXxX",
+"xXxXxX8X+.oXeXyXiXaXsXsXsXsX&X^ o D ^.J C M - _ zXzX8X#.&XxXxXxX",
+"xXxXxXxX1X at .oXiXiXpXiXsXsXsX7X^ % A ^.^.J m * j.zXrX>.].xXxXxXxX",
+"xXxXxXxXxX1X at ._.qXsXiXsXsXgXrX8.s O Z H S ; q tX;X#.].zXxXxXxXxX",
+"xXxXxXxXxXxX8X>.>. at XiXsXsXsXsX5X,.9 X . # i W.F. at .&XxXxXxXxXxXxX",
+"xXxXxXxXxXxXxXhX|. at .0.'.6XpXsXjXuX[.g.[ G.b.#.K.tXxXxXxXxXxXxXxX",
+"xXxXxXxXxXxXxXxXxXfX$Xv.#.>.v.F.F.S.0.#.0.`.8XzXxXxXxXxXxXxXxXxX",
+"xXxXxXxXxXxXxXxXxXxXxXzXtX1X|.).).}.%X8XkXxXxXxXxXxXxXxXxXxXxXxX"
+};
diff --git a/share/metview/icons/BUFRPICKER.xpm b/share/metview/icons/BUFRPICKER.xpm
new file mode 100644
index 0000000..6abac3d
--- /dev/null
+++ b/share/metview/icons/BUFRPICKER.xpm
@@ -0,0 +1,179 @@
+/* XPM */
+static char *BUFRPICKER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 141 2",
+"   c #5E657F",
+".  c #CB2D2E",
+"X  c #D52423",
+"o  c #DB2322",
+"O  c #DA2B29",
+"+  c #D7302F",
+"@  c #CB3333",
+"#  c #C63939",
+"$  c #C93838",
+"%  c #D23433",
+"&  c #DD3635",
+"*  c #E32725",
+"=  c #E8322F",
+"-  c #E23B39",
+";  c #CD403F",
+":  c #C94444",
+">  c #C74A4A",
+",  c #DB4441",
+"<  c #D54D4B",
+"1  c #C65150",
+"2  c #D15755",
+"3  c #D15856",
+"4  c #CB6160",
+"5  c #DA6767",
+"6  c #D86969",
+"7  c #D77474",
+"8  c #E17979",
+"9  c #2C42A3",
+"0  c #3B54A5",
+"q  c #3F5BA5",
+"w  c #475592",
+"e  c #4C5C95",
+"r  c #425D9E",
+"t  c #5C6382",
+"y  c #4C6093",
+"u  c #656B84",
+"i  c #646C89",
+"p  c #6D738A",
+"a  c #70758C",
+"s  c #72788E",
+"d  c #757B91",
+"f  c #7A7F94",
+"g  c #0F30C4",
+"h  c #1635C6",
+"j  c #1739C4",
+"k  c #1939C6",
+"l  c #1C3AC8",
+"z  c #203DC9",
+"x  c #1C43C5",
+"c  c #1F4CC4",
+"v  c #1F41C8",
+"b  c #2245C4",
+"n  c #2442C9",
+"m  c #2D4ACB",
+"M  c #304AC4",
+"N  c #304FCB",
+"B  c #2555C5",
+"V  c #265FC1",
+"C  c #2A5AC6",
+"Z  c #2951C9",
+"A  c #3854CE",
+"S  c #2962C3",
+"D  c #4C65D2",
+"F  c #657BD9",
+"G  c #7C8296",
+"H  c #7E8498",
+"J  c #7685C8",
+"K  c #788ADE",
+"L  c #808599",
+"P  c #848A9D",
+"I  c #898DA0",
+"U  c #8C91A3",
+"Y  c #9196A9",
+"T  c #999DAD",
+"R  c #9B9FB0",
+"E  c #B19FAA",
+"W  c #9CA0AE",
+"Q  c #9CA1B1",
+"!  c #ACA1AC",
+"~  c #A1A5B3",
+"^  c #A6A9B6",
+"/  c #A9ABB7",
+"(  c #A7ABB9",
+")  c #A9ADB9",
+"_  c #AEB2BE",
+"`  c #B0B3BE",
+"'  c #E69D9D",
+"]  c #D0A7AC",
+"[  c #D1B6BC",
+"{  c #E0A0A0",
+"}  c #B3B6C1",
+"|  c #B5B8C2",
+" . c #B9BCC6",
+".. c #B3B8CD",
+"X. c #B9BEC8",
+"o. c #8091E0",
+"O. c #8E9EE2",
+"+. c #94A2E4",
+"@. c #A1AEE7",
+"#. c #A2AEE8",
+"$. c #A5B1E9",
+"%. c #ABB6EA",
+"&. c #B5BFED",
+"*. c #BEC1CA",
+"=. c #B7C0ED",
+"-. c #C2C5CD",
+";. c #C4C8CE",
+":. c #C5C9D1",
+">. c #C9CDD3",
+",. c #C1C7DB",
+"<. c #CDD1D6",
+"1. c #CFD3D8",
+"2. c #D1D2D6",
+"3. c #D1D4D9",
+"4. c #D5D8DE",
+"5. c #D8DBDF",
+"6. c #E7C6C6",
+"7. c #E8C6C6",
+"8. c #F2C8C8",
+"9. c #F5D5D5",
+"0. c #DADDE1",
+"q. c #CAD1F2",
+"w. c #D0D7F4",
+"e. c #D4DAF4",
+"r. c #D8DDF5",
+"t. c #DEE0E4",
+"y. c #DBE0F6",
+"u. c #E4E4E5",
+"i. c #E2E5E8",
+"p. c #E6E8EB",
+"a. c #EAEAEB",
+"s. c #F2ECEC",
+"d. c #E0E4F7",
+"f. c #ECEEF1",
+"g. c #E8EBF9",
+"h. c #EEF0F2",
+"j. c #EEF1FB",
+"k. c #F3F4F4",
+"l. c #F5F6FA",
+"z. c #F7F8FD",
+"x. c #FFFFFF",
+/* pixels */
+"x.x.x.x.x.x.x.x.x.x.x.9.' ' ' ' ' ' ' ' 9.x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.' $ : ; $ % + O X ' x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.' # : < < , & O X ' x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.9.' 5 ; < , + 5 ' 9.x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.x.x.' ; < , + ' x.x.x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.x.x.' ; < , + ' x.x.x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.x.x.' ; < , + ' x.x.x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.9.' ' 5 ; < , + 5 ' ' 8.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.' # > ; 1 < ; & O * o 8 x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.k.[ @ 1 4 3 < , - = * . ] s.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.k.` U s G T ! ; ; 2 < , - + $ E W L d U } k.x.x.x.x.x.",
+"x.x.x.a.~ a / 2.u.a.u.a.u.7 ; < ; & 6 s.k.k.x.k.u.} s Q a.x.x.x.",
+"x.x.l.p | u.u.u.u.a.a.a.a.s.{ @ + ' k.k.k.k.k.k.l.z.z.;.s l.x.x.",
+"x.x.T ^ u.u.u.u.u.u.u.a.a.a.f.6.7.k.k.k.k.x.k.x.l.l.x.x. .R x.x.",
+"x.x.L p 2.u.u.u.a.u.a.a.a.a.s.s.f.k.s.k.k.k.k.k.l.x.x.p.p H x.x.",
+"x.x.P T   f ` 2.u.a.a.a.s.s.s.f.h.s.s.k.k.k.l.k.u.-.d   L P x.x.",
+"x.x.I 0.k.:.Y s t p U W ( `  .;.;.*.` ) ^ Y a   p H ^ ;.) P x.x.",
+"x.x.H 1.j.k.h.f.a.4.X._ ^ R U P P I W W Q ) *.<.>.>.>.*.) P x.x.",
+"x.x.I 0.k.h.j.f.f.a.p.i.i.t.t.0.0.5.3.3.3.1.<.<.>.>.;.;.) P x.x.",
+"x.x.I <.k.k.f.f.f.p.p.i.i.u.t.t.0.5.5.3.3.<.<.<.>.>.;.;.^ H x.x.",
+"x.x.4.i :.h.f.f.f.p.p.i.i.t.t.0.5.5.4.3.3.1.<.>.>.:.;.~ u >.x.x.",
+"x.x.x.J e t Q -.t.p.p.i.i.0.0.0.0.5.4.4.3.1.<.*.) I t w ,.x.x.x.",
+"x.x.x.x.e.b q e i u H U Y T ~ ( ^ W Y U P G u t y 0 M x.x.x.x.x.",
+"x.x.x.x.q.b C n #.z.t.3...9 9 r r 9 9 ..3.t.z.m B Z m x.x.x.x.x.",
+"x.x.z.q.$.b C v o.q.g.x.x.x.m B m m x.x.x.y.w.n B Z n w.r.x.x.x.",
+"x.x.q.g x c C b z h +.x.x.x.m B B m x.x.x.N x x B Z l z z x.x.x.",
+"x.x.l.A c S C N n l e.x.r.w.n B Z n w.r.x.O.j V C C m k K x.x.x.",
+"x.x.x.z.D c C n n d.x.x.N x x C Z l l n x.x. at .j B Z k +.x.x.x.x.",
+"x.x.x.x.x.F h A j.x.x.x.O.j V C Z m l K x.x.x.=.j l &.x.x.x.x.x.",
+"x.x.x.x.x.x.%.z.x.x.x.x.x. at .j B Z j +.x.x.x.x.x.q.q.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.x.x.x.=.k j &.x.x.x.x.x.x.x.x.x.x.x.x.x.x.",
+"x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.q.q.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x."
+};
diff --git a/share/metview/icons/CARTESIANVIEW.xpm b/share/metview/icons/CARTESIANVIEW.xpm
new file mode 100644
index 0000000..9173d75
--- /dev/null
+++ b/share/metview/icons/CARTESIANVIEW.xpm
@@ -0,0 +1,146 @@
+/* XPM */
+static char *CARTESIANVIEW[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 108 2",
+"   c #010101",
+".  c #0A0B0B",
+"X  c #161617",
+"o  c #1D1E1E",
+"O  c #1B1E20",
+"+  c #1D2021",
+"@  c #242526",
+"#  c #333435",
+"$  c #303538",
+"%  c #373839",
+"&  c #3D4144",
+"*  c #424243",
+"=  c #4B4C4E",
+"-  c #494F54",
+";  c #515354",
+":  c #535658",
+">  c #55585A",
+",  c #5A5A5B",
+"<  c #73494C",
+"1  c #595E61",
+"2  c #5E6163",
+"3  c #606365",
+"4  c #696A6D",
+"5  c #6A6E72",
+"6  c #6A7276",
+"7  c #707377",
+"8  c #727679",
+"9  c #75787C",
+"0  c #7B7C7E",
+"q  c #99090A",
+"w  c #853C3F",
+"e  c #CE1D1E",
+"r  c #D42324",
+"t  c #A05A5E",
+"y  c #D7484B",
+"u  c #D84F53",
+"i  c #D8575B",
+"p  c #C55F63",
+"a  c #D16369",
+"s  c #DA6A6F",
+"d  c #D86D72",
+"f  c #DA7075",
+"g  c #DA757A",
+"h  c #6E7B82",
+"j  c #737E85",
+"k  c #7F7F80",
+"l  c #7E8185",
+"z  c #7B838A",
+"x  c #7F8D95",
+"c  c #81888E",
+"v  c #858B91",
+"b  c #8A8E93",
+"n  c #8D9093",
+"m  c #849199",
+"M  c #8C949A",
+"N  c #929396",
+"B  c #91959A",
+"V  c #95989C",
+"C  c #8798A1",
+"Z  c #8F9CA5",
+"A  c #929AA1",
+"S  c #9B9DA1",
+"D  c #A8AAAF",
+"F  c #A3AFB8",
+"G  c #A4B3BD",
+"H  c #B1B4B9",
+"J  c #D28188",
+"K  c #DE959B",
+"L  c #D19FA6",
+"P  c #DEA3AA",
+"I  c #DFAAB1",
+"U  c #E0B4BB",
+"Y  c #A6B6C0",
+"T  c #ABBAC4",
+"R  c #AABDC8",
+"E  c #BAC3CB",
+"W  c #AFC5D1",
+"Q  c #B6CFDB",
+"!  c #B6D0DB",
+"~  c #B9D2DE",
+"^  c #BCD5E1",
+"/  c #C2C6CC",
+"(  c #CACACB",
+")  c #D6C0CA",
+"_  c #DEC2CA",
+"`  c #C9CDD4",
+"'  c #DEC9D2",
+"]  c #CDD6DF",
+"[  c #D0D5DC",
+"{  c #D7DADE",
+"}  c #C7D5E1",
+"|  c #C2D8E5",
+" . c #CCDDE9",
+".. c #D6D9E0",
+"X. c #DADEE4",
+"o. c #E1D7E0",
+"O. c #E1D8E1",
+"+. c #D3E2ED",
+"@. c #DFE2E8",
+"#. c #DBE6F1",
+"$. c #E1E1E1",
+"%. c #E9E9E9",
+"&. c #E3EBF5",
+"*. c #E8EEF6",
+"=. c #EBF1F8",
+"-. c #F3F5FB",
+";. c #F7F8FD",
+":. c #FCFDFE",
+/* pixels */
+". o o o o o o @ o o o o o @ o o @ o o o o @ o o o o o o o o o   ",
+"X :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.X ",
+"X :.N , , , , , 1 , , 1 , 1 , 1 , , , , , , , , , , , , , ; :.X ",
+"X :.3 Q ^ | |  . . .+.#. at .#.&.&.*.=.=.=.-.=.-.;.;.:.:.:.:., :.X ",
+"X :.2 Q ^ | j  . .+.+.+.+.#.#.&.*.*.=.=.=.-.-.-.;.;.;.:.:., :.X ",
+"X :.2 Q ^ ^   Z +.X.+.+.#.#.&.&.&.*.*.=.=.=.-.;.;.;.:.:.:., :.X ",
+"X :.2 ~ ^ m   -  . . .#.#.&.&.&.&.*.*.=.-.-.-.-.;.;.:.:.:., :.X ",
+"X :.2 ~ ^ &   .  . .+.+.+.#.#.&.*.*.=.=.=.-.-.;.;.;.:.:.:., :.X ",
+"X :.2 ~ W       C +.+.#.#.#.&.&.&.*.*.=.=.-.-.;.;.;.:.:.:., :.X ",
+"X :., ! h       &  .+.+.#.#.&.&.*.*.=.=.-.=.-.-.-.:.;.:.:.: :.X ",
+"X :.2 ~ C R O F M  .+.+.+.#.&.*.&.*.=.=.=.-.-.;.;.:.;.:.:., :.X ",
+"X :., ~ ^ ^ o R  . .+.#.#.#.&.*.&.*.=.=.=.-.-.-.;.;.:.:.:., :.X ",
+"X :., ~ ^ ^ o e a J r ) r d s I *.*.=.=.-.-.-.-.-.:.-.:.:., :.X ",
+"X :., ~ ^ | o R  . .+.+.#.#.y L &.*.*.=.=.=.-.;.;.-.:.:.:., :.X ",
+"X :., ~ ^ | + R  .+.+.#.#.#.f U &.*.*.=.-.-.-.-.;.:.:.:.:., :.X ",
+"X :., ^ ^ | + R  .+.+.+.#.#._ O.*.*.=.` $.-.-.-.;.-.:.:.:., :.X ",
+"X :.1 ~ ^ | O $ O F 1 O A 5 q t z o 6 # S =.;.;.;.;.:.:.:., :.X ",
+"X :.: ~ ^ | O Z Y } R T [ ` p L ..E ] 5 H -.-.-.;.;.;.:.:.> :.X ",
+"X :.: ~ ^ | O T  . .+.#.#.#._ o.*.*.=./ @.=.-.;.;.:.;.:.:., :.X ",
+"X :.1 ^ | | O Y  . .X.+.+.&.u L &.*.=.: S =.-.-.;.;.:.:.:., :.X ",
+"o :.> ~ ^ | O Y  .X.+.#.#.#.f I &.*.=.l H =.-.;.;.;.;.:.:., :.X ",
+"X :.> ^ ^ | O T  .+.+.+.#.#.' O.*.*.=./ ..-.-.-.;.;.:.:.:., :.X ",
+"o :.> ~ ^ | O Y  .+.+.#.#.#.i K &.*.=.1 V -.-.;.;.;.:.:.:., :.X ",
+"X :.> ~ ^ | O Y  .+.+.+.#.#.g P &.*.=.b H D { -.;.;.:.:.:., :.X ",
+"o :.: ~ | | + G  . .+.#.#.#.' X.*.*.*./ [ l   & V =.:.:.:., :.X ",
+"o :.> ~ ^ | X - 1 1 1 1 1 1 w < 1 , , @ # =         * ( :.: :.X ",
+"o :.: ~ ^ | x h j z z c x v v b n M B b N 8       # N ;.:., :.X ",
+"o :.: ~ ^ | |  . .+.+.+.+.#.&.&.&.*.*.=.-.4 % N %.:.:.:.:., :.X ",
+"o :.: ~ ^ | |  . .+.+.+.+.&.#.&.*.*.*.=.=.$.-.-.;.;.:.:.:.> -.X ",
+"o :.; 6 6 6 6 6 7 7 8 8 8 8 8 0 9 9 0 j 0 k k 0 0 k k k t & ;.X ",
+"o :.%.$.$.$. at .$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.;.X ",
+"  o o o o o o o o o o @ o o o o o o o o o o o o o o o + + + +   "
+};
diff --git a/share/metview/icons/CLEANFILE.xpm b/share/metview/icons/CLEANFILE.xpm
new file mode 100644
index 0000000..81620ce
--- /dev/null
+++ b/share/metview/icons/CLEANFILE.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char * Washing_xpm[] = {
+"32 32 7 1",
+" 	c #FFFFFFFFFFFF",
+".	c #777777777777",
+"X	c #DDDDDDDDDDDD",
+"o	c #000000000000",
+"O	c #B2B2B2B2B2B2",
+"+	c #00000000FFFF",
+"@	c #0000FFFFFFFF",
+"    ...........................X",
+"   ...........................X.",
+"  ..........................X...",
+" ..........................X....",
+".XXXXXXXXXXXXXXXXXXXXXXXX.......",
+"X........................X......",
+"X.XXXXXXXXoXXXXXXXXXXoXX.X......",
+"X.XoooXXXoooXXXoooXXoooX.X......",
+"X.XXXXXXXXoXXXXXXXXXXoXX.X......",
+"X........................X......",
+"XOOOOOOOOOOOOOOOOOOOOOOOOX......",
+"XOOOOOOOOOOOOOOOOOOOOOOOOX......",
+"XOOOOOOOOoooooooOOOOOOOOOX......",
+"XOOOOOOooooooooooooOOOOOOX......",
+"XOOOOOooooooooooooooOOOOOX......",
+"XOOOOOooooooooooooooOOOOOX......",
+"XOOOOooooooooooooooooOOOOX......",
+"XOOOOooooooooooooooooOOOOX......",
+"XOOOOoooooooooooooo+oOOOOX......",
+"XOOOOooo+ at ooooooooo@oOOOOX......",
+"XOOOOo at +++++oooo+@++oOOOOX......",
+"XOOOOo++ at +++++@+++++oOOOOX......",
+"XOOOOOo++++ at ++++++@oOOOOOX......",
+"XOOOOOo++++++++++++oOOOOOX......",
+"XOOOOOOo++++++++++oOOOOOOX......",
+"XOOOOOOOo+++++++ooOOOOOOOX......",
+"XOOOOOOOOoooooooOOOOOOOOOX..... ",
+"XOOOOOOOOOOOOOOOOOOOOOOOOX....  ",
+"XOOOOOOOOOOOOOOOOOOOOOOOOX...   ",
+"XOOOOOOOOOOOOOOOOOOOOOOOOX..    ",
+"XXXXXXXXXXXXXXXXXXXXXXXXXX.     ",
+"  ......................        "};
diff --git a/share/metview/icons/COMPUTE.xpm b/share/metview/icons/COMPUTE.xpm
new file mode 100644
index 0000000..e742809
--- /dev/null
+++ b/share/metview/icons/COMPUTE.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+static char * COMPUTE_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 16 1",
+/* colors */
+" 	c white",
+".	c #B2B2B2B2B2B2",
+"X	c #555555",
+"o	c black",
+"O	c #CCCCCCCCFFFF",
+"+	c #DDDDDDDDDDDD",
+"@	c #FFFFF6F60000",
+"#	c #FFFFB0B00000",
+"$	c #FFFF4F4F0000",
+"%	c #FFFF25250000",
+"&	c gray70",
+"*	c cyan",
+"=	c #000073734B4B",
+"-	c #6C6CA6A63131",
+";	c #7373A3A3FFFF",
+":	c blue",
+/* pixels */
+"         ...................... ",
+"        .......................X",
+"        ...oooooooooooooooooo..X",
+"        ...oOOOOOOOOOOOOOOOOo..X",
+"        ...oOOOOOOOOOOOOOOOOo..X",
+"        ...oOOOOOOOOOOOOOOOOo..X",
+"        ...oooooooooooooooooo..X",
+"        .......................X",
+"        .......................X",
+"        .......................X",
+"        .......................X",
+"        .......................X",
+"        ........++X..@@#..$$%..X",
+"        ........++X..@@#..$$%..X",
+"     &XooooX....XXX..###..%%%..X",
+"    Xo**===*oX.................X",
+"   o*=- * =**=o................X",
+"  o=*-= * =* ==oX+X..++X..++X..X",
+" X=-= ==  * -===X+X..++X..++X..X",
+"&o=-=== ==  -===oXX..XXX..XXX..X",
+"X*=-== ===* *-* *X.............X",
+"o*=-====*   **===o.............X",
+"o*=-====  * *-===oX..++X..;;:..X",
+"o*=-====*   *-===oX..++X..;;:..X",
+"o** === ==* *====oX..XXX..:::..X",
+"X*** == *  * *===X.............X",
+"&o* * ===== * **o..............X",
+" X** *=====* ***X+X..++X..;;:..X",
+"  o** *===*****o++X..++X..;;:..X",
+"   o** ===****o.XXX..XXX..:::..X",
+"    &X*===**oX.................X",
+"     &XooooXXXXXXXXXXXXXXXXXXXX "};
diff --git a/share/metview/icons/DATACOVERAGE.xpm b/share/metview/icons/DATACOVERAGE.xpm
new file mode 100644
index 0000000..300db49
--- /dev/null
+++ b/share/metview/icons/DATACOVERAGE.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char * DATACOVERAGE_icon[] = {
+"32 32 5 1",
+" 	c #FFFFFFFFFFFF",
+".	c #B3B3FFFFFFFF",
+"X	c #6C6CA5A56767",
+"o	c #FFFF00000000",
+"O	c #00000000FFFF",
+"           ..........           ",
+"         ..............         ",
+"       X............XoooX       ",
+"      XXX..........XXoooXX      ",
+"     XXX..........XXXoooXX.     ",
+"    XXXXX.........XXXXXXXXXX    ",
+"   XXXXX...........XXXXXXXXXX   ",
+"  XXXX.........X...XXXXXX....X  ",
+"  XXX.........XoooXXXXXXX...XX  ",
+" XX.........XXXoooXXXXXX....X.X ",
+" ...........XXXoooXXXXXX....XXX ",
+"......XX....XXXXXXXXXXXXXX..XXXX",
+".......X....XXXXXXXXXXXXXXXX.XXX",
+"...........XXX.XXXXXXXXXXXX.XXXX",
+"...........XXX..XXXXXXXXXXoooXXX",
+"XXX........XXX.XXXXXX.XXXXoooXXX",
+"..XX....XX.....XXXXXX...XXooo..X",
+"...X.....XX.X.XXXXXX....XX.....X",
+".........X...XXXXXXXX..........X",
+"............XXXXXXXXXX.........X",
+".....OOO....XXXXXX.XXXX........X",
+".....OOO...XXXXXXX..XXXXX......X",
+" ....OOO..XXXXXXXXX...XXXX....XX",
+" ...........XXXXXXX....XX....XX ",
+"  ..........XXXXXX..X..X.....XX ",
+"  ...........XXXX...OOOX.....X  ",
+"   ...........XX....OOO.....XX  ",
+"    ..........XXXX..OOO....XX   ",
+"     ........XXXXX.......XXX    ",
+"      .......XXXXX....XXXXX     ",
+"        ......XXX....XXXX       ",
+"          .....X...XXXX         "};
diff --git a/share/metview/icons/DISTR_HCENTER.xpm b/share/metview/icons/DISTR_HCENTER.xpm
new file mode 100644
index 0000000..efb5555
--- /dev/null
+++ b/share/metview/icons/DISTR_HCENTER.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * DISTR_HCENTER_xpm[] = {
+"16 16 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000000000000",
+"X	c #FFFFCCCC9999",
+"o	c #00000000FFFF",
+"                ",
+"....        ....",
+".XX.        .XX.",
+".XX.        .XX.",
+".XX.        .XX.",
+".XX.        .XX.",
+".XX.  o  o  .XX.",
+".XX. oo  oo .XX.",
+".XX.oooooooo.XX.",
+".XX. oo  oo .XX.",
+".XX.  o  o  .XX.",
+".XX.        .XX.",
+".XX.        .XX.",
+".XX.        .XX.",
+"....        ....",
+"                "};
diff --git a/share/metview/icons/DISTR_VCENTER.xpm b/share/metview/icons/DISTR_VCENTER.xpm
new file mode 100644
index 0000000..1ed0181
--- /dev/null
+++ b/share/metview/icons/DISTR_VCENTER.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * DISTR_VCENTER_xpm[] = {
+"16 16 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000000000000",
+"X	c #FFFFCCCC9999",
+"o	c #00000000FFFF",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .............. ",
+"       o        ",
+"      ooo       ",
+"     ooooo      ",
+"       o        ",
+"       o        ",
+"     ooooo      ",
+"      ooo       ",
+"       o        ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .............. "};
diff --git a/share/metview/icons/DIVROT.xpm b/share/metview/icons/DIVROT.xpm
new file mode 100644
index 0000000..9ded32a
--- /dev/null
+++ b/share/metview/icons/DIVROT.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static char * DIVROT_xpm[] = {
+"32 32 4 1",
+" 	c #AFAFAFAFAFAF",
+".	c #FFFFFFFFFFFF",
+"X	c #555555555555",
+"o	c #B2B2B2B2B2B2",
+"                                ",
+" .............................. ",
+" .........................X.... ",
+" oX..oX........XXXXXXX....X.... ",
+" oX.oX.........XoooooX.Xo.X.oX. ",
+" oXoX...Xo..oX.Xo...oX.Xo.X.oX. ",
+" oXX.....XooX...Xo.oX..Xo.X.oX. ",
+" oXXo.....XX....Xo.oX..Xo.X.oX. ",
+" oX.Xo....XX.....XoX....XoooX.. ",
+" oX..Xo..XooX....XoX.....XXX... ",
+" oX...X.Xo..oX....X.......Xo... ",
+" .........................Xo... ",
+" .........................Xo... ",
+" .........................Xo... ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" .............................. ",
+" ......................oX...... ",
+" .......XXXXXXX....XXXoX....... ",
+" .......XoooooX...XoooX........ ",
+" .......Xo...oX..Xo.oXoX....... ",
+" ........Xo.oX...XooX.oX....... ",
+" ........Xo.oX...XooX.oX....... ",
+" .........XoX....XoX..oX....... ",
+" .........XoX....oXoooX........ ",
+" ..........X....oX.XXX......... ",
+" ...............X.............. ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/DRAWING_PRIORITY.xpm b/share/metview/icons/DRAWING_PRIORITY.xpm
new file mode 100644
index 0000000..17dbe1c
--- /dev/null
+++ b/share/metview/icons/DRAWING_PRIORITY.xpm
@@ -0,0 +1,71 @@
+/* XPM */
+static char * DRAWING_PRIORITY_xpm[] = {
+"32 32 36 1",
+" 	c #FFFFFFFFFFFF",
+".	c #E5E5E5E5E5E5",
+"X	c #7E7E7E7E7E7E",
+"o	c #B2B2B2B2B2B2",
+"O	c #FFFFE2E2ABAB",
+"+	c #FFFFB0B00000",
+"@	c #F0F0E6E68C8C",
+"#	c #BFBFA4A46868",
+"$	c #777777777777",
+"%	c #FFFFFFFFCCCC",
+"&	c #9D9D6868F0F0",
+"*	c #CCCCCCCCCCCC",
+"=	c #BEBEBEBEBEBE",
+"-	c #B0B0C4C4DEDE",
+";	c #7F7F0000FFFF",
+":	c #7B7B1212B2B2",
+">	c #666654543333",
+",	c #7F7F00002C2C",
+"<	c #BFBF93931313",
+"1	c #333333333333",
+"2	c #6C6C7B7B8B8B",
+"3	c #94947A7A4A4A",
+"4	c #999964640000",
+"5	c #000000000000",
+"6	c #66663B3B2020",
+"7	c #FFFF7F7F0000",
+"8	c #F0F079796161",
+"9	c #FFFF4F4F0000",
+"0	c #CCCCCCCCFFFF",
+"q	c #D9D9B7B77777",
+"w	c #E5E55C5C6969",
+"e	c #A7A761613636",
+"r	c #E5E54A4A3939",
+"t	c #999916160808",
+"y	c #25250000FFFF",
+"u	c #FFFF00000000",
+" .XooooooooooooX O+@@@#$$@@@@@@+",
+".$o............oO+@%%&&**%%%%%%@",
+"Xo=.-&&&&&&&.o$o+ at O%%%;*&;%%%%%@",
+"o.-&-.......:>,o@%%%%%&%&%%%%%%@",
+"o&-........o<12o@%%%%%&&;*%%%$1@",
+"2........$1<1o&o@%%%&&*&%&%%3>$@",
+"o.......$#<1>.&o@%*;%%&*;o1331%@",
+"o..&&&-$#<1>O$.:@%&%%&%%o#>31%%@",
+"o-;....>411#OO15@%**%&%o#>31#o%@",
+"2-.....>1#@OOO>5@*;*%;%>>316O#$<",
+"o.&&&&1$.o1>>@>5@*&&&%%3333OOO>4",
+"o&....&...&..$15@%%%%%o1$3>@@O>4",
+":.....--..&....:@%%%%%2&&&&$1>14",
+":.....--..&...&o@%%%%%&%%%%%&%o<",
+":.....&..--...&o@%%%%%%%%;&&%%%@",
+"X2oooo2oo2oooo2X+@@@@@@@@#@@@@@+",
+" O78888888888,17 .&----------:1&",
+"O98OOOOOOOOO3>>8.&-0000000003>:-",
+"78qOOOOOO#3331O8&-0=00000o23310-",
+"8OOOOOOO##>31OO8-00ww000o#>3100-",
+"8OOOOOO##>31##O8-0www00o#>31#o0-",
+"8OOOOOO>>316O#3e-00rw00>>316O#22",
+"8&=&OOO3333OOO>t-000r003333OOO>1",
+"8&=;OO#13>>@@O>t-0000wo12$>@@O>1",
+"8OOOO;:&OOO33>1t-00000e000022>11",
+"8OOO&y&O&OOOOO#e-000000w000000o2",
+"8OOO&yyy;&&&&yy8-0000000w=w0000-",
+"8OOOO;y;OOOOO=y8-0000000=uur000-",
+"8&=&OOOOOOOOOO=8-0000000wuuu000-",
+"8&=&OOOOOOOOOOO8-00000000ru=000-",
+"8OOOOOOOOOOOOOO8-00000000000000-",
+"7888888888888887&--------------&"};
diff --git a/share/metview/icons/ECFS.xpm b/share/metview/icons/ECFS.xpm
new file mode 100644
index 0000000..e3a146b
--- /dev/null
+++ b/share/metview/icons/ECFS.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * ECFS_xpm[] = {
+"32 32 9 1",
+" 	c #FFFFFFFFFFFF",
+".	c #555555555555",
+"X	c #B2B2B2B2B2B2",
+"o	c #FFFF00000000",
+"O	c #CCCCCCCCFFFF",
+"+	c #7373A3A3FFFF",
+"@	c #25250000FFFF",
+"#	c #00000000FFFF",
+"$	c #999915150707",
+"                                ",
+"             .......            ",
+"          ...XXXXXXX...         ",
+"        ..XXXX     XXXX..       ",
+"       .XX             XX.      ",
+"      .X                 X.     ",
+"     .X                   X.    ",
+"    .X                     X.   ",
+"   .X                       X.  ",
+"   .X                       X.  ",
+"  .X                         X. ",
+"  .X          ooooo          X. ",
+"  .X         ooooooo         X. ",
+" .XX        ooo   ooo         X.",
+" .X        ooo     ooo        X.",
+" .X        oo       oo        X.",
+" .X        oo       oo        X.",
+" .X        oo       oo        X.",
+" .X        ooo     ooo        X.",
+" .X         ooo   ooo         X.",
+"  .X         ooooooo         X. ",
+"  .O++O  O++O ooooo          X. ",
+" O@####@@####@O              X. ",
+" ###++####++###             X.  ",
+"+#@.X  ##    @#+            X.  ",
+"O+O .X OO    O+O           X.   ",
+"+###+.X                   X.    ",
+"O+O   .OO    O+O         X.     ",
+"+#@    ##X   @#O       XX.      ",
+" ###++####++###     XXX..$$$$$$$",
+" O@####@@####@OXXXXX...$$$$$$$$$",
+"   O++O  O++O ......            "};
diff --git a/share/metview/icons/FLEXTRA_FILE.xpm b/share/metview/icons/FLEXTRA_FILE.xpm
new file mode 100755
index 0000000..1800045
--- /dev/null
+++ b/share/metview/icons/FLEXTRA_FILE.xpm
@@ -0,0 +1,500 @@
+/* XPM */
+static char * FLEXTRA_FILE_xpm[] = {
+"32 32 465 2",
+"  	c None",
+". 	c #557FC8",
+"+ 	c #6086CA",
+"@ 	c #537DC7",
+"# 	c #9DB1D9",
+"$ 	c #9DB1DA",
+"% 	c #9EB2DA",
+"& 	c #9DB2DA",
+"* 	c #9EB2DB",
+"= 	c #9FB3DB",
+"- 	c #9FB3DA",
+"; 	c #A0B3DB",
+"> 	c #A0B4DB",
+", 	c #8DA4D4",
+"' 	c #6388CB",
+") 	c #C8CFE4",
+"! 	c #668ACC",
+"~ 	c #E0E5F0",
+"{ 	c #E2E7F2",
+"] 	c #E4E8F3",
+"^ 	c #E6EAF3",
+"/ 	c #E8EBF5",
+"( 	c #EAEDF6",
+"_ 	c #ECEEF6",
+": 	c #EEF0F7",
+"< 	c #EFF1F8",
+"[ 	c #F1F3F9",
+"} 	c #F2F4F9",
+"| 	c #F4F5FA",
+"1 	c #F5F6FB",
+"2 	c #F6F7FB",
+"3 	c #F7F9FC",
+"4 	c #F9FAFC",
+"5 	c #FAFAFD",
+"6 	c #FBFBFD",
+"7 	c #FCFCFE",
+"8 	c #FDFDFE",
+"9 	c #FDFEFE",
+"0 	c #A4B7DC",
+"a 	c #C9D0E5",
+"b 	c #CAD0E5",
+"c 	c #668BCC",
+"d 	c #6389CB",
+"e 	c #CAD1E5",
+"f 	c #CBD1E5",
+"g 	c #CBD2E5",
+"h 	c #CBD2E6",
+"i 	c #CCD2E6",
+"j 	c #CCD3E6",
+"k 	c #CDD4E6",
+"l 	c #678CCD",
+"m 	c #CBD3E7",
+"n 	c #BCC9DD",
+"o 	c #BDCADC",
+"p 	c #BCCADC",
+"q 	c #BDCADD",
+"r 	c #C8D0E4",
+"s 	c #CFD5E8",
+"t 	c #678CCC",
+"u 	c #276A7C",
+"v 	c #216778",
+"w 	c #8DABBD",
+"x 	c #CFD6E8",
+"y 	c #6289CB",
+"z 	c #CDD4E7",
+"A 	c #8AA9BB",
+"B 	c #759CAE",
+"C 	c #498092",
+"D 	c #88A9BA",
+"E 	c #B5C6D7",
+"F 	c #D1D7E9",
+"G 	c #EBEDF6",
+"H 	c #D0D9E5",
+"I 	c #AFBFCF",
+"J 	c #8CA4BA",
+"K 	c #6D8DA7",
+"L 	c #86A0B7",
+"M 	c #AEBECF",
+"N 	c #D6DFE8",
+"O 	c #F5F8FB",
+"P 	c #6288CB",
+"Q 	c #CDD4E8",
+"R 	c #CED5E8",
+"S 	c #AFC2D5",
+"T 	c #6794A5",
+"U 	c #D1D8EA",
+"V 	c #D2D8EA",
+"W 	c #6585A2",
+"X 	c #547998",
+"Y 	c #7495AE",
+"Z 	c #91B0C1",
+"` 	c #ACC5D3",
+" .	c #98B2C4",
+"..	c #7493AB",
+"+.	c #4F7592",
+"@.	c #456D84",
+"#.	c #B9C7C9",
+"$.	c #D0D5E8",
+"%.	c #B1C3D5",
+"&.	c #6894A4",
+"*.	c #D2D9EA",
+"=.	c #D3D9EA",
+"-.	c #D4DAEA",
+";.	c #E6E9F3",
+">.	c #709499",
+",.	c #416A88",
+"'.	c #85A9B5",
+").	c #D2EBEF",
+"!.	c #D4ECF0",
+"~.	c #D8EEF1",
+"{.	c #DAEDF0",
+"].	c #87AA90",
+"^.	c #3E6E3C",
+"/.	c #3C6D39",
+"(.	c #3A6853",
+"_.	c #3C6682",
+":.	c #608388",
+"<.	c #F7F8FB",
+"[.	c #D0D7E8",
+"}.	c #B2C3D5",
+"|.	c #6894A6",
+"1.	c #D4D9EA",
+"2.	c #D4DBEB",
+"3.	c #5F8A86",
+"4.	c #396978",
+"5.	c #387949",
+"6.	c #7AAD8D",
+"7.	c #789D80",
+"8.	c #2F642A",
+"9.	c #7D8A98",
+"0.	c #748191",
+"a.	c #6A7789",
+"b.	c #5F6C86",
+"c.	c #3F6776",
+"d.	c #618390",
+"e.	c #CFD6E9",
+"f.	c #B1C4D5",
+"g.	c #D4DAEB",
+"h.	c #D5DBEB",
+"i.	c #D6DBEB",
+"j.	c #688DCD",
+"k.	c #C0CDD9",
+"l.	c #3A6780",
+"m.	c #558871",
+"n.	c #28732F",
+"o.	c #B0D4CA",
+"p.	c #CCE4E5",
+"q.	c #67916D",
+"r.	c #3C6E39",
+"s.	c #346830",
+"t.	c #858EA3",
+"u.	c #7A8399",
+"v.	c #6E7890",
+"w.	c #626D87",
+"x.	c #53627B",
+"y.	c #3D6780",
+"z.	c #9AB0B1",
+"A.	c #6188CB",
+"B.	c #D1D8E9",
+"C.	c #D2D8E9",
+"D.	c #D3DAEB",
+"E.	c #D6DCEC",
+"F.	c #D7DCED",
+"G.	c #678DCD",
+"H.	c #E1E5F1",
+"I.	c #557A95",
+"J.	c #286947",
+"K.	c #347C3F",
+"L.	c #A1CAB9",
+"M.	c #CFEAED",
+"N.	c #88AE96",
+"O.	c #386B35",
+"P.	c #557B58",
+"Q.	c #557D59",
+"R.	c #698576",
+"S.	c #7A8994",
+"T.	c #768193",
+"U.	c #56627D",
+"V.	c #455C71",
+"W.	c #3E6782",
+"X.	c #E9EEF0",
+"Y.	c #D0D7E9",
+"Z.	c #7FA2B3",
+"`.	c #3C7889",
+" +	c #417B8C",
+".+	c #5F8FA0",
+"++	c #C8D2E3",
+"@+	c #D8DEED",
+"#+	c #C5CFDF",
+"$+	c #537B98",
+"%+	c #BCE0DE",
+"&+	c #C9E9EB",
+"*+	c #CDEAED",
+"=+	c #4D7B4D",
+"-+	c #31662D",
+";+	c #457545",
+">+	c #467448",
+",+	c #7C8E90",
+"'+	c #366832",
+")+	c #366833",
+"!+	c #687687",
+"~+	c #4B5774",
+"{+	c #3E6574",
+"]+	c #839EA0",
+"^+	c #6288CA",
+"/+	c #6F98AB",
+"(+	c #789FB0",
+"_+	c #6996A6",
+":+	c #7DA3B3",
+"<+	c #D9DEED",
+"[+	c #A3B5C9",
+"}+	c #6E95AC",
+"|+	c #C8E8EB",
+"1+	c #CAE9EC",
+"2+	c #719B7B",
+"3+	c #7FA488",
+"4+	c #81A58A",
+"5+	c #33662F",
+"6+	c #477846",
+"7+	c #3C6A3B",
+"8+	c #687686",
+"9+	c #3B5B6C",
+"0+	c #527880",
+"a+	c #6287CA",
+"b+	c #78A0B0",
+"c+	c #6795A5",
+"d+	c #8DADBD",
+"e+	c #D9DFEE",
+"f+	c #688DCE",
+"g+	c #7292A5",
+"h+	c #507C73",
+"i+	c #B1D5CD",
+"j+	c #91B6A3",
+"k+	c #618764",
+"l+	c #BFC4D1",
+"m+	c #B0B7C4",
+"n+	c #628468",
+"o+	c #538055",
+"p+	c #4C794C",
+"q+	c #507755",
+"r+	c #73808F",
+"s+	c #3E536D",
+"t+	c #3E677C",
+"u+	c #6F99AB",
+"v+	c #337283",
+"w+	c #588A9B",
+"x+	c #D7DDEC",
+"y+	c #DADFEE",
+"z+	c #4E7585",
+"A+	c #3A6B4E",
+"B+	c #467942",
+"C+	c #517F53",
+"D+	c #BAC3C7",
+"E+	c #C0C5D2",
+"F+	c #B4BAC9",
+"G+	c #A9AFBF",
+"H+	c #829493",
+"I+	c #778B89",
+"J+	c #848EA2",
+"K+	c #6D7E85",
+"L+	c #51715E",
+"M+	c #566B71",
+"N+	c #526274",
+"O+	c #3D4F66",
+"P+	c #3D6688",
+"Q+	c #FBFDFD",
+"R+	c #6F99AA",
+"S+	c #ABBFCF",
+"T+	c #447D8E",
+"U+	c #23687A",
+"V+	c #B5C8D6",
+"W+	c #DBE0EE",
+"X+	c #688CCE",
+"Y+	c #587F84",
+"Z+	c #366656",
+"`+	c #6E9B77",
+" @	c #4C7B4C",
+".@	c #B7C1C3",
+"+@	c #9DA4B6",
+"@@	c #9199AC",
+"#@	c #838DA1",
+"$@	c #386A35",
+"%@	c #689069",
+"&@	c #376933",
+"*@	c #376935",
+"=@	c #3A585D",
+"-@	c #416A83",
+";@	c #6187CA",
+">@	c #ACC2D2",
+",@	c #9EB9C9",
+"'@	c #598C9C",
+")@	c #DCE1EF",
+"!@	c #96ACB8",
+"~@	c #45707A",
+"{@	c #C3E5E6",
+"]@	c #89B09A",
+"^@	c #59815A",
+"/@	c #97AAA3",
+"(@	c #A3AFB5",
+"_@	c #A8AEBD",
+":@	c #4E7454",
+"<@	c #406C43",
+"[@	c #698F6C",
+"}@	c #F0F7FA",
+"|@	c #9CB69D",
+"1@	c #366553",
+"2@	c #618393",
+"3@	c #BACADA",
+"4@	c #A7BDCE",
+"5@	c #CCD6E6",
+"6@	c #D7DDED",
+"7@	c #ACC1D0",
+"8@	c #ABC1D1",
+"9@	c #CAD3E1",
+"0@	c #4B7292",
+"a@	c #C7E8EA",
+"b@	c #CAE7E9",
+"c@	c #9FC1B2",
+"d@	c #6A9371",
+"e@	c #4D7A4D",
+"f@	c #748190",
+"g@	c #426F43",
+"h@	c #C2D4C9",
+"i@	c #EAF2F0",
+"j@	c #698A96",
+"k@	c #A6B8C9",
+"l@	c #D3D9EB",
+"m@	c #C9D4E4",
+"n@	c #6B96A7",
+"o@	c #6D98A8",
+"p@	c #D5DCEA",
+"q@	c #DAE0EE",
+"r@	c #6A8AA7",
+"s@	c #87ABBE",
+"t@	c #4B794B",
+"u@	c #939EA9",
+"v@	c #547462",
+"w@	c #86A78A",
+"x@	c #EDF6F9",
+"y@	c #DBE4EB",
+"z@	c #4C7193",
+"A@	c #E2E7ED",
+"B@	c #D0D8E9",
+"C@	c #D2D9EB",
+"D@	c #90AEC0",
+"E@	c #A2BCCA",
+"F@	c #DDE2F0",
+"G@	c #D4DBE8",
+"H@	c #4B7192",
+"I@	c #B0D2DA",
+"J@	c #608A65",
+"K@	c #88989B",
+"L@	c #838DA0",
+"M@	c #3D6E3B",
+"N@	c #D8E6E4",
+"O@	c #EDF5F8",
+"P@	c #6686A2",
+"Q@	c #AABCCC",
+"R@	c #4F8595",
+"S@	c #317282",
+"T@	c #6090A1",
+"U@	c #DBE0EF",
+"V@	c #DDE2EF",
+"W@	c #ABBCCE",
+"X@	c #527997",
+"Y@	c #B1D0D9",
+"Z@	c #759D7D",
+"`@	c #7B908B",
+" #	c #6D8281",
+".#	c #668D69",
+"+#	c #E9F4F6",
+"@#	c #E8F2F6",
+"##	c #87A1B6",
+"$#	c #708EA7",
+"%#	c #FBFBFE",
+"&#	c #C1CDDF",
+"*#	c #236879",
+"=#	c #79A0B1",
+"-#	c #6593A3",
+";#	c #276B7C",
+">#	c #D2DBEA",
+",#	c #ABBBCE",
+"'#	c #4B7193",
+")#	c #85A7BA",
+"!#	c #CEE7ED",
+"~#	c #9ABBA8",
+"{#	c #567D5A",
+"]#	c #8D97A6",
+"^#	c #667F77",
+"/#	c #80A385",
+"(#	c #BFD2DC",
+"_#	c #577B9A",
+":#	c #819BB3",
+"<#	c #EDF1F5",
+"[#	c #6187CB",
+"}#	c #CFD7E8",
+"|#	c #83A6B7",
+"1#	c #367485",
+"2#	c #327283",
+"3#	c #98B5C3",
+"4#	c #DDE3EF",
+"5#	c #DAE1EB",
+"6#	c #718EA9",
+"7#	c #4C7393",
+"8#	c #6E90AA",
+"9#	c #8DACBE",
+"0#	c #71958F",
+"a#	c #3E6B5C",
+"b#	c #3E696A",
+"c#	c #587B95",
+"d#	c #527695",
+"e#	c #C1CEDA",
+"f#	c #6086CB",
+"g#	c #2B6E7E",
+"h#	c #7BA1B1",
+"i#	c #568A9A",
+"j#	c #D8DFE9",
+"k#	c #B2C2D3",
+"l#	c #8BA4BA",
+"m#	c #6A8AA5",
+"n#	c #7C97AF",
+"o#	c #A2B5C5",
+"p#	c #C7D2DE",
+"q#	c #F0F2F7",
+"r#	c #C9D1E5",
+"s#	c #789FB1",
+"t#	c #92B0C0",
+"u#	c #8BACBC",
+"v#	c #82A6B5",
+"w#	c #DCE2EF",
+"x#	c #698ECD",
+"y#	c #5F86CA",
+"z#	c #CED5E7",
+"A#	c #D9DEEC",
+"B#	c #D1D9E9",
+"C#	c #D4DBEA",
+"D#	c #D6DDEC",
+"E#	c #D8DFEC",
+"F#	c #DAE1EE",
+"G#	c #698DCD",
+"H#	c #5F85CA",
+"I#	c #CED6E7",
+"J#	c #D1D8E8",
+"K#	c #D3DAEA",
+"L#	c #D5DCEB",
+"M#	c #D8DEEC",
+"N#	c #DAE0ED",
+"O#	c #5E85CA",
+"P#	c #CDD5E7",
+"Q#	c #D7DEEC",
+"R#	c #D9DFED",
+"S#	c #527DC7",
+"T#	c #507CC7",
+"U#	c #A0B3DA",
+"V#	c #A1B4DB",
+"W#	c #A1B5DC",
+"X#	c #A1B4DC",
+"Y#	c #A2B5DB",
+"Z#	c #A2B5DC",
+"`#	c #A3B6DC",
+" $	c #A3B7DC",
+".$	c #A4B6DC",
+"+$	c #A3B7DD",
+"@$	c #A4B7DD",
+"#$	c #8EA5D4",
+". + + + + + + + + @ # # # # $ % & % % % * = = - ; ; ; > ; > > , ",
+"' ) ) ) ) ) ) ) ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"' a a a a a a a b c ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d e e e e f g g g c ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d h h h i j j j k l ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d m n o p p q r s t ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d j u v v v v w x t ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"y z A B v C D E F l ~ { ] ^ / ( G H I J K L M N O 4 5 6 7 8 9 0 ",
+"P Q R S v T U V V l ~ { ] ^ / H W X Y Z `  ...+. at .#.5 6 7 8 9 0 ",
+"P R $.%.v &.*.=.-.l ~ { ] ;.>.,.'.).!.~.{.].^./.(._.:.<.7 8 9 0 ",
+"P s [.}.v |.1.-.2.l ~ { ] 3.4.5.6.).!.~.7.8.9.0.a.b.c.d.7 8 9 0 ",
+"P e.F f.v |.g.h.i.j.~ { k.l.m.n.o.).p.q.r.s.t.u.v.w.x.y.z.8 9 0 ",
+"A.e.B.C.D.g.h.E.F.G.~ H.I.J.K.L.M.N.O.P.Q.R.S.T.v.w.U.V.W.X.9 0 ",
+"A.Y.Z.`.`. +.+++ at +G.~ #+$+%+&+*+M.=+-+;+>+,+'+)+!+w.U.~+{+]+9 0 ",
+"^+Y./+v (+_+v :+<+G.~ [+}+|+1+*+2+r.O.3+4+5+6+7+8+w.U.~+9+0+9 0 ",
+"a+F /+v b+c+v d+e+f+~ g+h+i+1+j+k+l+m+n+o+p+q+r+v.w.U.~+s+t+9 0 ",
+"a+F u+v v+v w+x+y+f+~ z+A+B+1+C+D+E+F+G+H+I+J+K+L+M+N+~+O+P+Q+0 ",
+"a+B.R+v S+T+U+V+W+X+~ Y+Z+`+1+ @. at E+F+G++@@@#@$@%@&@^.*@=@- at 9 0 ",
+";@B.R+v >@, at v '@)@f+~ !@~@{@1+]@^@/@(@_ at +@@@t.:@<@[@}@|@1 at 2@9 0 ",
+";@B.3 at 4@5 at 6@7 at 8@W+f+~ 9 at 0@a at 1+b@c at d@e at n++@@@t.f at g@h@}@i at j@k at 9 0 ",
+";@B.l at m@n at o@p at q@)@f+~ { r at s@1+*+M.).!.t at u@@@t.v at w@x@}@y at z@A at 9 0 ",
+"+ B at C@D at v v E at q@F at f+~ { G at H@I@*+M.).!.J at K@@@L at M@N at x@O at P@Q at 8 9 0 ",
+"+ [.*.R at T+S@T at U@V at f+~ { ] W at X@Y at M.).!.Z@`@@@ #.#+#@###$#%#8 9 0 ",
+"+ [.&#*#=#-#;#>#V at f+~ { ] ^ ,#'#)#!#!.~#{#]#^#/#(#_#:#<#7 8 9 0 ",
+"[#}#|#v 1#2#v 3#4#j.~ { ] ^ / 5#6#7#8#9#0#a#b#c#d#e#5 6 7 8 9 0 ",
+"f#x T+g#h#h#U+i#F at j.~ { ] ^ / ( _ j#k#l#m#n#o#p#q#4 5 6 7 8 9 0 ",
+"+ r#s#t#h.6 at u#v#w#x#~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"y#z#Y.*.2.x+A#W+V at x#~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"y#z }#B#C#D#E#F#V at G#~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"H#j I#J#K#L#M#N#V at j.~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"O#h P#[.*.h.Q#R#)@j.~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"S#H#H#H#H#O#O#y#y#T#U#; > > ; V#W#W#X#Y#Z#Z#`#`#`#`# $.$+$@$0 #$"};
diff --git a/share/metview/icons/FLEXTRA_PREPARE.xpm b/share/metview/icons/FLEXTRA_PREPARE.xpm
new file mode 100755
index 0000000..6942789
--- /dev/null
+++ b/share/metview/icons/FLEXTRA_PREPARE.xpm
@@ -0,0 +1,377 @@
+/* XPM */
+static char * FLEXTRA_PREPARE_xpm[] = {
+"32 32 342 2",
+"  	c None",
+". 	c #527DC7",
+"+ 	c #6489CB",
+"@ 	c #537DC7",
+"# 	c #9DB1D9",
+"$ 	c #9DB1DA",
+"% 	c #9DB2DA",
+"& 	c #9EB2DA",
+"* 	c #9EB2DB",
+"= 	c #9FB3DB",
+"- 	c #9FB3DA",
+"; 	c #A0B3DB",
+"> 	c #A0B4DB",
+", 	c #8BA3D3",
+"' 	c #C8CFE4",
+") 	c #658ACC",
+"! 	c #E0E5F0",
+"~ 	c #E2E7F2",
+"{ 	c #E4E9F3",
+"] 	c #E6EAF4",
+"^ 	c #E8ECF5",
+"/ 	c #EAEEF6",
+"( 	c #ECEFF6",
+"_ 	c #EEF1F7",
+": 	c #EFF1F8",
+"< 	c #F1F3F9",
+"[ 	c #F2F4F9",
+"} 	c #F4F5FA",
+"| 	c #F5F6FB",
+"1 	c #F6F8FB",
+"2 	c #F8F9FC",
+"3 	c #F9FAFC",
+"4 	c #FAFBFD",
+"5 	c #FBFBFD",
+"6 	c #FCFCFE",
+"7 	c #FDFDFE",
+"8 	c #FDFEFE",
+"9 	c #9CB1DA",
+"0 	c #C9D0E5",
+"a 	c #CAD0E5",
+"b 	c #668BCC",
+"c 	c #6488CB",
+"d 	c #CAD1E5",
+"e 	c #CBD1E5",
+"f 	c #CBD2E5",
+"g 	c #668CCC",
+"h 	c #CBD2E6",
+"i 	c #CCD2E6",
+"j 	c #CCD3E6",
+"k 	c #CDD4E6",
+"l 	c #678CCC",
+"m 	c #CBD3E7",
+"n 	c #BDC9DC",
+"o 	c #BDCADC",
+"p 	c #BCCADC",
+"q 	c #BDCADD",
+"r 	c #C9D1E5",
+"s 	c #CFD5E8",
+"t 	c #6388CB",
+"u 	c #CAD2E4",
+"v 	c #216778",
+"w 	c #96B1C3",
+"x 	c #CFD6E8",
+"y 	c #EAECF3",
+"z 	c #CAC0AB",
+"A 	c #CABFA9",
+"B 	c #CABFA7",
+"C 	c #C9BEA5",
+"D 	c #CABEA3",
+"E 	c #C9BCA0",
+"F 	c #CFC4AC",
+"G 	c #87A8B9",
+"H 	c #6F99AA",
+"I 	c #508596",
+"J 	c #88A9BA",
+"K 	c #B8C8D9",
+"L 	c #D1D7E9",
+"M 	c #668CCD",
+"N 	c #E6E7EA",
+"O 	c #8E6F2A",
+"P 	c #8F702B",
+"Q 	c #91722C",
+"R 	c #93722E",
+"S 	c #93742E",
+"T 	c #94752F",
+"U 	c #91732C",
+"V 	c #9A7E40",
+"W 	c #CED4E8",
+"X 	c #A8BCCF",
+"Y 	c #6F9AAB",
+"Z 	c #D1D8EA",
+"` 	c #D2D8EA",
+" .	c #D3D8EA",
+"..	c #E5E6E9",
+"+.	c #CA9835",
+"@.	c #E2A83A",
+"#.	c #BA8D32",
+"$.	c #9A7C3D",
+"%.	c #6389CB",
+"&.	c #CED5E8",
+"*.	c #D0D5E9",
+"=.	c #A8BDCF",
+"-.	c #719AAC",
+";.	c #D4D9EB",
+">.	c #D4DAEB",
+",.	c #E6E6E8",
+"'.	c #CA983B",
+").	c #E2A841",
+"!.	c #BA8D36",
+"~.	c #9A7C3E",
+"{.	c #D0D7E8",
+"].	c #A9BECF",
+"^.	c #719AAB",
+"/.	c #D4D9EA",
+"(.	c #D4DAEA",
+"_.	c #D4DBEB",
+":.	c #678DCD",
+"<.	c #E5E5E7",
+"[.	c #CA9940",
+"}.	c #E1A949",
+"|.	c #BA8E3A",
+"1.	c #6289CB",
+"2.	c #CFD6E9",
+"3.	c #D5DBEB",
+"4.	c #D6DBEB",
+"5.	c #E4E5E6",
+"6.	c #CA9946",
+"7.	c #E1AA51",
+"8.	c #BA8E3F",
+"9.	c #D1D8E9",
+"0.	c #D2D8E9",
+"a.	c #D3DAEB",
+"b.	c #D5DBEC",
+"c.	c #D6DCEC",
+"d.	c #D7DCED",
+"e.	c #E5E4E5",
+"f.	c #C99A4B",
+"g.	c #E0AB58",
+"h.	c #B98F42",
+"i.	c #6288CB",
+"j.	c #779EAF",
+"k.	c #3C7889",
+"l.	c #427D8D",
+"m.	c #6391A2",
+"n.	c #CCD6E6",
+"o.	c #D8DEED",
+"p.	c #E4E4E5",
+"q.	c #C99B51",
+"r.	c #E0AC60",
+"s.	c #B98F47",
+"t.	c #6694A5",
+"u.	c #7DA3B3",
+"v.	c #6392A2",
+"w.	c #87A9B9",
+"x.	c #D9DFED",
+"y.	c #688DCE",
+"z.	c #E4E4E4",
+"A.	c #C89B56",
+"B.	c #DFAD68",
+"C.	c #B9904B",
+"D.	c #9A7C3F",
+"E.	c #6291A2",
+"F.	c #96B4C2",
+"G.	c #D9DFEE",
+"H.	c #E2E5ED",
+"I.	c #B5A583",
+"J.	c #B3A17C",
+"K.	c #B19E76",
+"L.	c #C89C5C",
+"M.	c #DFAE6F",
+"N.	c #B9904F",
+"O.	c #937431",
+"P.	c #B9A67F",
+"Q.	c #BAA77F",
+"R.	c #CABB9D",
+"S.	c #6188CB",
+"T.	c #337283",
+"U.	c #5F8FA0",
+"V.	c #DADFEE",
+"W.	c #688CCE",
+"X.	c #C7BFAD",
+"Y.	c #957531",
+"Z.	c #A2803E",
+"`.	c #A17F3D",
+" +	c #CEA468",
+".+	c #DEB177",
+"++	c #C29A5C",
+"@+	c #A1803E",
+"#+	c #A3803F",
+"$+	c #917330",
+"%+	c #E8E4D8",
+"&+	c #6794A4",
+"*+	c #B1C4D5",
+"=+	c #3D7989",
+"-+	c #24697A",
+";+	c #BCCDDB",
+">+	c #DBE1EE",
+",+	c #B3A27D",
+"'+	c #91722E",
+")+	c #D0A971",
+"!+	c #DCB47E",
+"~+	c #C29D62",
+"{+	c #D3C8B0",
+"]+	c #B7C7D8",
+"^+	c #96B3C3",
+"/+	c #6091A1",
+"(+	c #E5E9F0",
+"_+	c #A08953",
+":+	c #9C7C3C",
+"<+	c #D8B481",
+"[+	c #DBB785",
+"}+	c #CFAC77",
+"|+	c #91732F",
+"1+	c #BAA880",
+"2+	c #6187CA",
+"3+	c #B9C8D9",
+"4+	c #A7BECE",
+"5+	c #CDD6E6",
+"6+	c #D6DDEC",
+"7+	c #ABC1D1",
+"8+	c #AEC3D2",
+"9+	c #DCE1EF",
+"0+	c #DEDEDD",
+"a+	c #947636",
+"b+	c #A8894C",
+"c+	c #D9BA8C",
+"d+	c #D6B788",
+"e+	c #9A7D3D",
+"f+	c #A38A54",
+"g+	c #F7F8F8",
+"h+	c #6087CA",
+"i+	c #C5D2E1",
+"j+	c #6B96A7",
+"k+	c #709BAA",
+"l+	c #DBE0EE",
+"m+	c #DDE2EF",
+"n+	c #D2CBBC",
+"o+	c #B99D67",
+"p+	c #D8BE93",
+"q+	c #A78A4E",
+"r+	c #957837",
+"s+	c #ECE9E4",
+"t+	c #D0D8E9",
+"u+	c #D2DAEA",
+"v+	c #86A8BA",
+"w+	c #DDE2F0",
+"x+	c #BCAF8E",
+"y+	c #8F702C",
+"z+	c #C7B082",
+"A+	c #D6C19A",
+"B+	c #B79E6A",
+"C+	c #8F702A",
+"D+	c #DAD1C1",
+"E+	c #D0D7E9",
+"F+	c #D2D9EA",
+"G+	c #467F90",
+"H+	c #4A8292",
+"I+	c #2A6D7E",
+"J+	c #6A96A6",
+"K+	c #DBE0EF",
+"L+	c #DCE2F0",
+"M+	c #EDEFF5",
+"N+	c #A7915F",
+"O+	c #957938",
+"P+	c #D0BE98",
+"Q+	c #C5B186",
+"R+	c #C2B392",
+"S+	c #6086CA",
+"T+	c #B9C9D9",
+"U+	c #81A6B7",
+"V+	c #5B8D9D",
+"W+	c #2D6E80",
+"X+	c #D7DDEB",
+"Y+	c #DEE2EF",
+"Z+	c #688DCD",
+"`+	c #E7E7E7",
+" @	c #977C3E",
+".@	c #A0864C",
+"+@	c #967838",
+"@@	c #AA9463",
+"#@	c #F5F7F9",
+"$@	c #CFD7E8",
+"%@	c #7AA0B1",
+"&@	c #397786",
+"*@	c #317182",
+"=@	c #A1BBC9",
+"-@	c #DDE3EF",
+";@	c #DAD5CA",
+">@	c #8F712C",
+",@	c #987C3F",
+"'@	c #EEECEB",
+")@	c #3C788A",
+"!@	c #307181",
+"~@	c #7BA1B0",
+"{@	c #77A0B0",
+"]@	c #C9BDA3",
+"^@	c #DED9CE",
+"/@	c #5F86CA",
+"(@	c #C5CFE2",
+"_@	c #799FB0",
+":@	c #96B2C3",
+"<@	c #D7DDED",
+"[@	c #87A9BA",
+"}@	c #85A9B8",
+"|@	c #DDE3F0",
+"1@	c #698ECD",
+"2@	c #5F85C9",
+"3@	c #D5DCEB",
+"4@	c #D7DDEC",
+"5@	c #D9DEED",
+"6@	c #CDD5E7",
+"7@	c #D2D9E9",
+"8@	c #D4DBEA",
+"9@	c #D8DFED",
+"0@	c #698DCD",
+"a@	c #5E85C9",
+"b@	c #CCD4E6",
+"c@	c #CED6E7",
+"d@	c #D1D8E8",
+"e@	c #D3DAEA",
+"f@	c #D6DCEB",
+"g@	c #DBE0ED",
+"h@	c #CBD3E6",
+"i@	c #CED5E7",
+"j@	c #D3D9EA",
+"k@	c #D7DEED",
+"l@	c #DADFED",
+"m@	c #5F85CA",
+"n@	c #5E85CA",
+"o@	c #557FC7",
+"p@	c #A0B3DA",
+"q@	c #A1B4DB",
+"r@	c #A1B5DC",
+"s@	c #A1B4DC",
+"t@	c #A2B5DB",
+"u@	c #A2B5DC",
+"v@	c #A3B6DC",
+"w@	c #A4B6DC",
+"x@	c #A3B7DC",
+"y@	c #A4B7DD",
+"z@	c #A4B7DC",
+"A@	c #8CA4D3",
+". + + + + + + + + @ # # # # $ % % & & & * = = - ; ; ; > ; > > , ",
+"+ ' ' ' ' ' ' ' ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"+ 0 0 0 0 0 0 0 a b ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"c d d d d e f f f g ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"c h h h i j j j k l ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"c m n o p p q r s g ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"t u v v v v v w x g ! ~ { ] ^ / y z A B C C D E F 3 4 5 6 7 8 9 ",
+"t j G H v I J K L M ! ~ { ] ^ / N O P Q R S T U V 3 4 5 6 7 8 9 ",
+"t W s X v Y Z `  .M ! ~ { ] ^ / ..O +. at .@. at .@.#.$.3 4 5 6 7 8 9 ",
+"%.&.*.=.v -.` ;.>.M ! ~ { ] ^ / ,.O '.).).).).!.~.3 4 5 6 7 8 9 ",
+"%.s {.].v ^./.(._.:.! ~ { ] ^ / <.O [.}.}.}.}.|.~.3 4 5 6 7 8 9 ",
+"1.2.L ].v -.>.3.4.:.! ~ { ] ^ / 5.O 6.7.7.7.7.8.~.3 4 5 6 7 8 9 ",
+"1.2.9.0.a.>.b.c.d.:.! ~ { ] ^ / e.O f.g.g.g.g.h.~.3 4 5 6 7 8 9 ",
+"i.L j.k.k.l.m.n.o.:.! ~ { ] ^ / p.O q.r.r.r.r.s.~.3 4 5 6 7 8 9 ",
+"i.L t.v u.v.v w.x.y.! ~ { ] ^ / z.O A.B.B.B.B.C.D.3 4 5 6 7 8 9 ",
+"i.L t.v u.E.v F.G.y.! ~ H.I.J.J.K.O L.M.M.M.M.N.O.P.Q.Q.R.7 8 9 ",
+"S.9.t.v T.v U.x.V.W.! ~ { X.O Y.Z.`. +.+.+.+.+++ at +#+Q $+%+7 8 9 ",
+"S.9.&+v *+=+-+;+>+y.! ~ { ] ,+'+)+!+!+!+!+!+!+!+!+~+O {+6 7 8 9 ",
+"S.9.&+v ]+^+v /+>+y.! ~ { ] (+_+:+<+[+[+[+[+[+[+}+|+1+5 6 7 8 9 ",
+"2+9.3+4+5+6+7+8+9+y.! ~ { ] ^ 0+a+b+c+c+c+c+c+d+e+f+g+5 6 7 8 9 ",
+"h+9.a.i+j+k+o.l+m+y.! ~ { ] ^ / n+P o+p+p+p+p+q+r+s+4 5 6 7 8 9 ",
+"2+t+u+v+v v 7+l+w+y.! ~ { ] ^ / ( x+y+z+A+A+B+C+D+3 4 5 6 7 8 9 ",
+"2+E+F+G+H+I+J+K+L+y.! ~ { ] ^ / ( M+N+O+P+Q+y+R+2 3 4 5 6 7 8 9 ",
+"S+{.T+v U+V+W+X+Y+Z+! ~ { ] ^ / ( _ `+ @. at +@@@#@2 3 4 5 6 7 8 9 ",
+"S+$@%@v &@*@v =@- at Z+! ~ { ] ^ / ( _ : ;@>@,@'@1 2 3 4 5 6 7 8 9 ",
+"S+x )@!@~@{@v U.w+Z+! ~ { ] ^ / ( _ : < ]@^@| 1 2 3 4 5 6 7 8 9 ",
+"/@(@_@:@3.<@[@}@|@1@! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"2@&.E+u+3 at 4@5 at l+m+1@! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"2 at 6@$@7 at 8@6+9@>+m+0@! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"a at b@c at d@e at f@o.g at m+Z+! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"a at h@i@{.j at 3@k at l@9+Z+! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+". m at m@m at m@n at n@/@/@o at p@; > > ; q at r@r at s@t at u@u at v@v at v@w at x@w at y@y at z@A@"};
diff --git a/share/metview/icons/FLEXTRA_RUN.xpm b/share/metview/icons/FLEXTRA_RUN.xpm
new file mode 100755
index 0000000..fe08da7
--- /dev/null
+++ b/share/metview/icons/FLEXTRA_RUN.xpm
@@ -0,0 +1,399 @@
+/* XPM */
+static char * FLEXTRA_RUN_xpm[] = {
+"32 32 364 2",
+"  	c None",
+". 	c #537DC7",
+"+ 	c #6488CB",
+"@ 	c #6489CB",
+"# 	c #5780C8",
+"$ 	c #9DB1D9",
+"% 	c #9DB1DA",
+"& 	c #9EB2DA",
+"* 	c #9DB2DA",
+"= 	c #9EB2DB",
+"- 	c #9FB3DB",
+"; 	c #9FB3DA",
+"> 	c #A0B3DB",
+", 	c #A0B4DB",
+"' 	c #8EA5D4",
+") 	c #6186CA",
+"! 	c #C8CFE4",
+"~ 	c #6A8ECD",
+"{ 	c #E0E4F0",
+"] 	c #E2E6F2",
+"^ 	c #E4E8F3",
+"/ 	c #E6EAF3",
+"( 	c #E8EBF5",
+"_ 	c #EAEDF6",
+": 	c #ECEEF6",
+"< 	c #EEF0F7",
+"[ 	c #EFF1F8",
+"} 	c #F1F3F9",
+"| 	c #F2F4F9",
+"1 	c #F4F5FA",
+"2 	c #F5F6FB",
+"3 	c #F6F7FB",
+"4 	c #F7F9FC",
+"5 	c #F9FAFC",
+"6 	c #FAFAFD",
+"7 	c #FBFBFD",
+"8 	c #FCFCFD",
+"9 	c #FDFDFE",
+"0 	c #FDFEFE",
+"a 	c #A7BADE",
+"b 	c #C9D0E5",
+"c 	c #CAD0E5",
+"d 	c #6086CA",
+"e 	c #CAD1E5",
+"f 	c #CBD1E5",
+"g 	c #CBD2E5",
+"h 	c #CBD2E6",
+"i 	c #CCD2E6",
+"j 	c #CCD3E6",
+"k 	c #CDD4E6",
+"l 	c #CBD3E7",
+"m 	c #BCC9DD",
+"n 	c #BDCADC",
+"o 	c #BCCADC",
+"p 	c #BDCADD",
+"q 	c #C8D0E5",
+"r 	c #CFD5E8",
+"s 	c #216778",
+"t 	c #92B0C1",
+"u 	c #CFD6E8",
+"v 	c #6B8FCD",
+"w 	c #CED0DF",
+"x 	c #8787AC",
+"y 	c #8282A7",
+"z 	c #8284A8",
+"A 	c #8283A8",
+"B 	c #8384A8",
+"C 	c #8485A9",
+"D 	c #8586AA",
+"E 	c #8787AA",
+"F 	c #8888AB",
+"G 	c #8889AC",
+"H 	c #8485A8",
+"I 	c #9899B7",
+"J 	c #CDD4E7",
+"K 	c #87A9B9",
+"L 	c #729AAB",
+"M 	c #4E8395",
+"N 	c #88A9BA",
+"O 	c #B8C7D8",
+"P 	c #D1D7E9",
+"Q 	c #6B8FCE",
+"R 	c #E0E3EE",
+"S 	c #999BB9",
+"T 	c #74759D",
+"U 	c #454F8C",
+"V 	c #38458A",
+"W 	c #414D8F",
+"X 	c #495594",
+"Y 	c #535E99",
+"Z 	c #5A669E",
+"` 	c #636FA4",
+" .	c #6C76AA",
+"..	c #767EAD",
+"+.	c #787DA7",
+"@.	c #7476A0",
+"#.	c #8F8FAF",
+"$.	c #CDD4E8",
+"%.	c #CED5E8",
+"&.	c #A9BECF",
+"*.	c #6D98A9",
+"=.	c #D1D8EA",
+"-.	c #D2D8EA",
+";.	c #BABDD1",
+">.	c #7979A0",
+",.	c #5A6194",
+"'.	c #344287",
+").	c #313F86",
+"!.	c #334187",
+"~.	c #3C498C",
+"{.	c #435090",
+"].	c #4D5996",
+"^.	c #56609B",
+"/.	c #5E69A1",
+"(.	c #6B72A2",
+"_.	c #73749E",
+":.	c #5F669A",
+"<.	c #646DA1",
+"[.	c #9192B2",
+"}.	c #D0D5E8",
+"|.	c #AABED0",
+"1.	c #6E98AA",
+"2.	c #D2D9EA",
+"3.	c #D3D9EA",
+"4.	c #D4DAEA",
+"5.	c #DADDEB",
+"6.	c #77779E",
+"7.	c #7679A0",
+"8.	c #7879A2",
+"9.	c #777BA3",
+"0.	c #797CA3",
+"a.	c #797BA3",
+"b.	c #7B7DA4",
+"c.	c #7C7EA4",
+"d.	c #7D7FA5",
+"e.	c #7F81A6",
+"f.	c #7B7CA2",
+"g.	c #646897",
+"h.	c #475391",
+"i.	c #535F9A",
+"j.	c #5F85CA",
+"k.	c #D0D7E8",
+"l.	c #ABBED0",
+"m.	c #D4D9EA",
+"n.	c #D4DBEB",
+"o.	c #6C8FCE",
+"p.	c #8589AC",
+"q.	c #395A8F",
+"r.	c #456497",
+"s.	c #536F9D",
+"t.	c #5F7AA6",
+"u.	c #6B84AD",
+"v.	c #7A8FB5",
+"w.	c #879ABC",
+"x.	c #93A5C2",
+"y.	c #A0B0C9",
+"z.	c #8C94B5",
+"A.	c #4A5490",
+"B.	c #455191",
+"C.	c #CFD6E9",
+"D.	c #ABC0D1",
+"E.	c #6F98AA",
+"F.	c #D4DAEB",
+"G.	c #D5DBEB",
+"H.	c #D6DBEB",
+"I.	c #D1D8E9",
+"J.	c #D2D8E9",
+"K.	c #D3DAEB",
+"L.	c #D6DCEC",
+"M.	c #D7DCED",
+"N.	c #0F1622",
+"O.	c #090C12",
+"P.	c #0B0E13",
+"Q.	c #0B0F14",
+"R.	c #0E1115",
+"S.	c #0F1116",
+"T.	c #3A424E",
+"U.	c #5F86CA",
+"V.	c #D0D7E9",
+"W.	c #799FB1",
+"X.	c #3C7889",
+"Y.	c #417B8C",
+"Z.	c #6190A1",
+"`.	c #CAD4E4",
+" +	c #D8DEED",
+".+	c #6C90CF",
+"++	c #1E2D43",
+"@+	c #1F293A",
+"#+	c #242E3E",
+"$+	c #283141",
+"%+	c #2D3543",
+"&+	c #333A46",
+"*+	c #535E6E",
+"=+	c #6995A6",
+"-+	c #7BA1B2",
+";+	c #6593A3",
+">+	c #83A7B7",
+",+	c #D9DEED",
+"'+	c #8E94B5",
+")+	c #5E86CA",
+"!+	c #6A95A6",
+"~+	c #7BA2B1",
+"{+	c #6493A2",
+"]+	c #92B1C1",
+"^+	c #D9DFEE",
+"/+	c #3B5782",
+"(+	c #465D85",
+"_+	c #50678B",
+":+	c #5A7092",
+"<+	c #667898",
+"[+	c #71829E",
+"}+	c #8494AF",
+"|+	c #337283",
+"1+	c #5D8F9F",
+"2+	c #D8DDEC",
+"3+	c #DADFEE",
+"4+	c #6D90CF",
+"5+	c #05080D",
+"6+	c #000000",
+"7+	c #333843",
+"8+	c #8C93B4",
+"9+	c #B0C3D3",
+"0+	c #3F7A8A",
+"a+	c #236879",
+"b+	c #BACBDA",
+"c+	c #DBE0EE",
+"d+	c #304568",
+"e+	c #354867",
+"f+	c #3F506C",
+"g+	c #475671",
+"h+	c #4F5E76",
+"i+	c #57657A",
+"j+	c #728097",
+"k+	c #5E85CA",
+"l+	c #6996A6",
+"m+	c #B3C6D6",
+"n+	c #99B5C5",
+"o+	c #5E8F9F",
+"p+	c #DBE1EE",
+"q+	c #B9C9D8",
+"r+	c #A6BECE",
+"s+	c #CDD6E7",
+"t+	c #D5DDEC",
+"u+	c #ABC1D0",
+"v+	c #ADC3D2",
+"w+	c #DCE1EF",
+"x+	c #446694",
+"y+	c #52719A",
+"z+	c #5E7BA3",
+"A+	c #6B86AB",
+"B+	c #5D85CA",
+"C+	c #D3D9EB",
+"D+	c #C7D2E2",
+"E+	c #6A95A7",
+"F+	c #6F99AA",
+"G+	c #D7DEEC",
+"H+	c #DAE0EE",
+"I+	c #DDE2EF",
+"J+	c #3CA04A",
+"K+	c #50B944",
+"L+	c #50BB45",
+"M+	c #4B9D65",
+"N+	c #5D85C9",
+"O+	c #D0D8E9",
+"P+	c #D2D9EB",
+"Q+	c #8AAABC",
+"R+	c #A8C0CF",
+"S+	c #DDE2F0",
+"T+	c #48AD49",
+"U+	c #74F030",
+"V+	c #4DA062",
+"W+	c #4A8192",
+"X+	c #488091",
+"Y+	c #2D6F80",
+"Z+	c #6695A4",
+"`+	c #DBE0EF",
+" @	c #3EA449",
+".@	c #57C53E",
+"+@	c #57C63E",
+"@@	c #4D9F64",
+"#@	c #5D84C9",
+"$@	c #BBCADB",
+"%@	c #226879",
+"&@	c #7EA4B4",
+"*@	c #5F8FA0",
+"=@	c #2B6E7F",
+"-@	c #D5DCEB",
+";@	c #6D90CE",
+">@	c #436B8D",
+",@	c #4E7491",
+"'@	c #597D99",
+")@	c #6887A6",
+"!@	c #686FA0",
+"~@	c #8889AB",
+"{@	c #5C84C9",
+"]@	c #CFD7E8",
+"^@	c #7DA2B3",
+"/@	c #397786",
+"(@	c #327183",
+"_@	c #9FBAC7",
+":@	c #DDE3EF",
+"<@	c #475392",
+"[@	c #676C9C",
+"}@	c #8385A9",
+"|@	c #E1E2EA",
+"1@	c #3E7A8B",
+"2@	c #2E7081",
+"3@	c #7AA1B1",
+"4@	c #79A0B1",
+"5@	c #5C8D9E",
+"6@	c #8B91B3",
+"7@	c #555D92",
+"8@	c #7477A0",
+"9@	c #B5B7CE",
+"0@	c #C7D0E3",
+"a@	c #799FB0",
+"b@	c #95B1C2",
+"c@	c #D7DDED",
+"d@	c #83A6B6",
+"e@	c #DDE3F0",
+"f@	c #DCE0ED",
+"g@	c #8788AB",
+"h@	c #8083A7",
+"i@	c #8285A8",
+"j@	c #8386A9",
+"k@	c #8486A9",
+"l@	c #8689AA",
+"m@	c #8689AB",
+"n@	c #898AAB",
+"o@	c #898CAD",
+"p@	c #888AAE",
+"q@	c #EBECF2",
+"r@	c #5C83C9",
+"s@	c #CED5E7",
+"t@	c #D7DDEC",
+"u@	c #D9DEEC",
+"v@	c #D1D9E9",
+"w@	c #D4DBEA",
+"x@	c #D6DDEC",
+"y@	c #D8DFEC",
+"z@	c #DAE1EE",
+"A@	c #CED6E7",
+"B@	c #D1D8E8",
+"C@	c #D3DAEA",
+"D@	c #D8DEEC",
+"E@	c #DAE0ED",
+"F@	c #CDD5E7",
+"G@	c #D9DFED",
+"H@	c #507BC6",
+"I@	c #537EC7",
+"J@	c #A0B3DA",
+"K@	c #A1B4DB",
+"L@	c #A1B5DC",
+"M@	c #A1B4DC",
+"N@	c #A2B5DB",
+"O@	c #A2B5DC",
+"P@	c #A2B6DC",
+"Q@	c #A3B6DC",
+"R@	c #A3B7DC",
+"S@	c #A4B6DC",
+"T@	c #A3B7DD",
+"U@	c #A4B7DD",
+"V@	c #A4B7DC",
+"W@	c #8FA6D5",
+". + + + + + @ @ @ # $ $ $ $ % & * & & & = - - ; > > > , > , , ' ",
+") ! ! ! ! ! ! ! ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+") b b b b b b b c ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d e e e e f g g g ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d h h h i j j j k ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d l m n o o p q r ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d j s s s s s t u v { ] ^ / ( _ w x y z A B C D E F G H I 9 0 a ",
+"d J K L s M N O P Q { ] ^ / R S T U V W X Y Z `  ...+. at .#.9 0 a ",
+"d $.%.&.s *.=.-.-.Q { ] ^ ;.>.,.'.).!.~.{.].^./.(._.:.<.[.9 0 a ",
+"d %.}.|.s 1.2.3.4.v { ] 5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.<.[.9 0 a ",
+"j.r k.l.s 1.m.4.n.o.{ ] 5.p.q.r.s.t.u.v.w.x.y.z.A.B.i.<.[.9 0 a ",
+"j.C.P D.s E.F.G.H.o.{ ] 5.p.q.r.s.t.u.v.w.x.y.z.A.B.i.<.[.9 0 a ",
+"j.C.I.J.K.F.G.L.M.o.{ ] 5.p.q.N.O.P.Q.R.S.T.y.z.A.B.i.<.[.9 0 a ",
+"U.V.W.X.X.Y.Z.`. +.+{ ] 5.p.q.++ at +#+$+%+&+*+y.z.A.B.i.<.[.9 0 a ",
+"U.V.=+s -+;+s >+,+.+{ ] 5.p.q.r.s.t.u.v.w.x.y.'+A.B.i.<.[.9 0 a ",
+")+P !+s ~+{+s ]+^+.+{ ] 5.p.q./+(+_+:+<+[+}+y.'+A.B.i.<.[.9 0 a ",
+")+P !+s |+s 1+2+3+4+{ ] 5.p.q.5+6+6+6+6+6+7+y.8+A.B.i.<.[.9 0 a ",
+")+I.=+s 9+0+a+b+c+4+{ ] 5.p.q.d+e+f+g+h+i+j+y.8+A.B.i.<.[.9 0 a ",
+"k+I.l+s m+n+s o+p+4+{ ] 5.p.q.r.s.t.u.v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"k+I.q+r+s+t+u+v+w+.+{ ] 5.p.q.x+y+z+A+v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"B+I.C+D+E+F+G+H+I+.+{ ] 5.p.q.J+K+L+M+v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"N+O+P+Q+s s R+H+S+.+{ ] 5.p.q.T+U+U+V+v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"N+k.2.W+X+Y+Z+`+I+.+{ ] 5.p.q. @. at +@@@v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"#@k.$@%@&@*@=@- at I+;@{ ] 5.p.q.>@,@'@)@v.w.x.y.8+A.B.i.!@~@9 0 a ",
+"{@]@^@s /@(@s _@:@;@{ ] 5.p.q.r.s.t.u.v.w.x.y.8+A.<@[@}@|@9 0 a ",
+"{@u 1 at 2@3 at 4@%@5 at S+;@{ ] 5.p.q.r.s.t.u.v.w.x.y.6 at 7@8 at 9@7 8 9 0 a ",
+"#@0 at a@b at G.c@N d at e@4+{ ] f at g@h at i@j at k@l at m@~@n at o@g at p@q at 6 7 8 9 0 a ",
+"r at s@V.2.n.t at u@c+I+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"r at J ]@v at w@x at y@z at I+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"r at j A at B@C at -@D at E@I+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"r at h F at k.2.G.G+G@w+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"H at j.j.j.j.k+k+U.U.I@J@; , , > K at L@L at M@N at O@P at O@Q at Q@Q at R@S at T@U at V@W@"};
diff --git a/share/metview/icons/FLEXTRA_VISUALISER.xpm b/share/metview/icons/FLEXTRA_VISUALISER.xpm
new file mode 100755
index 0000000..c6e95c2
--- /dev/null
+++ b/share/metview/icons/FLEXTRA_VISUALISER.xpm
@@ -0,0 +1,419 @@
+/* XPM */
+static char * FLEXTRA_VISUALISER_xpm[] = {
+"32 32 384 2",
+"  	c None",
+". 	c #507CC7",
+"+ 	c #6186CA",
+"@ 	c #6187CA",
+"# 	c #547EC7",
+"$ 	c #A3B5DC",
+"% 	c #A3B5DB",
+"& 	c #A3B6DC",
+"* 	c #A3B7DC",
+"= 	c #A4B6DC",
+"- 	c #A4B7DC",
+"; 	c #A5B7DD",
+"> 	c #A6B8DD",
+", 	c #A5B8DD",
+"' 	c #A6B9DD",
+") 	c #A7B9DE",
+"! 	c #A7B9DD",
+"~ 	c #A7BADE",
+"{ 	c #A8BADE",
+"] 	c #8EA5D4",
+"^ 	c #C8CFE4",
+"/ 	c #6A8ECD",
+"( 	c #E0E5F0",
+"_ 	c #E2E7F2",
+": 	c #E4E9F3",
+"< 	c #E6EAF4",
+"[ 	c #E8ECF5",
+"} 	c #EAEEF6",
+"| 	c #ECEEF6",
+"1 	c #EEF0F7",
+"2 	c #EFF1F8",
+"3 	c #F1F3F9",
+"4 	c #F2F4F9",
+"5 	c #F4F5FA",
+"6 	c #F5F6FB",
+"7 	c #F6F8FB",
+"8 	c #F7F9FC",
+"9 	c #F9FAFC",
+"0 	c #FAFBFD",
+"a 	c #FBFBFD",
+"b 	c #FCFCFE",
+"c 	c #FDFDFE",
+"d 	c #FDFEFE",
+"e 	c #A0B4DB",
+"f 	c #C9D0E5",
+"g 	c #CAD0E5",
+"h 	c #6086CA",
+"i 	c #CAD1E5",
+"j 	c #CBD1E5",
+"k 	c #CBD2E5",
+"l 	c #CBD2E6",
+"m 	c #CCD2E6",
+"n 	c #CCD3E6",
+"o 	c #CDD4E6",
+"p 	c #CBD3E7",
+"q 	c #BDC9DD",
+"r 	c #BDCADC",
+"s 	c #BCCADC",
+"t 	c #BDCADD",
+"u 	c #C8D0E5",
+"v 	c #CFD5E8",
+"w 	c #226879",
+"x 	c #216778",
+"y 	c #93AFC1",
+"z 	c #CFD6E8",
+"A 	c #6B8FCD",
+"B 	c #CDD4E7",
+"C 	c #87A9B9",
+"D 	c #719AAB",
+"E 	c #4E8394",
+"F 	c #88A9BA",
+"G 	c #B8C7D8",
+"H 	c #D1D7E9",
+"I 	c #6B8FCE",
+"J 	c #CED4E8",
+"K 	c #ABBED0",
+"L 	c #6C98A8",
+"M 	c #D1D8EA",
+"N 	c #D2D8EA",
+"O 	c #D3D8EA",
+"P 	c #CFD3DB",
+"Q 	c #757979",
+"R 	c #606463",
+"S 	c #616363",
+"T 	c #616563",
+"U 	c #626563",
+"V 	c #636563",
+"W 	c #636664",
+"X 	c #646764",
+"Y 	c #646664",
+"Z 	c #656765",
+"` 	c #656764",
+" .	c #666865",
+"..	c #7F817F",
+"+.	c #E3E3E4",
+"@.	c #CED5E8",
+"#.	c #D0D5E8",
+"$.	c #ABBFD0",
+"%.	c #6D98A9",
+"&.	c #D2D9EA",
+"*.	c #D4D9EA",
+"=.	c #D4DAEA",
+"-.	c #5D6160",
+";.	c #5A5C56",
+">.	c #969691",
+",.	c #5C5E58",
+"'.	c #5F625E",
+").	c #D0D7E8",
+"!.	c #ACBFD1",
+"~.	c #D4DBEB",
+"{.	c #6C8FCE",
+"].	c #373A35",
+"^.	c #B8B6B2",
+"/.	c #71757F",
+"(.	c #E7E4E0",
+"_.	c #E6ADAA",
+":.	c #E7DBD7",
+"<.	c #BFBDB8",
+"[.	c #393D37",
+"}.	c #5F85CA",
+"|.	c #CFD6E9",
+"1.	c #ACC1D1",
+"2.	c #6E98A9",
+"3.	c #D4DAEB",
+"4.	c #D5DBEB",
+"5.	c #D6DBEB",
+"6.	c #20293D",
+"7.	c #E6E3DF",
+"8.	c #E7B5B2",
+"9.	c #E52626",
+"0.	c #E6A3A1",
+"a.	c #D1D8E9",
+"b.	c #D2D8E9",
+"c.	c #D3DAEB",
+"d.	c #D5DBEC",
+"e.	c #D6DCEC",
+"f.	c #D7DCED",
+"g.	c #21293D",
+"h.	c #E5E3DF",
+"i.	c #E55050",
+"j.	c #E54C4B",
+"k.	c #E67473",
+"l.	c #E7B7B4",
+"m.	c #E7CECA",
+"n.	c #5F86CA",
+"o.	c #D0D7E9",
+"p.	c #799FB1",
+"q.	c #3C7889",
+"r.	c #417B8C",
+"s.	c #6190A2",
+"t.	c #CAD4E4",
+"u.	c #D8DEED",
+"v.	c #6C90CF",
+"w.	c #212A3E",
+"x.	c #E5E2DE",
+"y.	c #E6A9A6",
+"z.	c #E54645",
+"A.	c #E7B9B6",
+"B.	c #E54544",
+"C.	c #E68F8D",
+"D.	c #E53939",
+"E.	c #E53B3A",
+"F.	c #E7C2BF",
+"G.	c #6996A7",
+"H.	c #7BA1B2",
+"I.	c #6493A3",
+"J.	c #83A7B7",
+"K.	c #D9DEED",
+"L.	c #222B3F",
+"M.	c #E4E1DD",
+"N.	c #E7E3DF",
+"O.	c #E6ABA9",
+"P.	c #E7E0DC",
+"Q.	c #E52D2D",
+"R.	c #E54847",
+"S.	c #E7D1CE",
+"T.	c #E6A8A5",
+"U.	c #E53838",
+"V.	c #6995A7",
+"W.	c #7BA2B1",
+"X.	c #6493A2",
+"Y.	c #93B1C1",
+"Z.	c #D9DFEE",
+"`.	c #232C3F",
+" +	c #E3E0DD",
+".+	c #E69D9B",
+"++	c #E55352",
+"@+	c #E7C1BE",
+"#+	c #E7D8D4",
+"$+	c #E67675",
+"%+	c #5E86CA",
+"&+	c #6997A7",
+"*+	c #337283",
+"=+	c #5C8E9E",
+"-+	c #D8DEEC",
+";+	c #DADFEE",
+">+	c #6D90CF",
+",+	c #242C40",
+"'+	c #E2E0DC",
+")+	c #E69290",
+"!+	c #E7BFBC",
+"~+	c #B0C3D3",
+"{+	c #3F7A8A",
+"]+	c #236879",
+"^+	c #BBCBDA",
+"/+	c #DBE1EE",
+"(+	c #232C40",
+"_+	c #ABABAE",
+":+	c #AEAEB1",
+"<+	c #ADADB0",
+"[+	c #ACADB0",
+"}+	c #ABACAF",
+"|+	c #AAAAAE",
+"1+	c #A9AAAD",
+"2+	c #B1B1B4",
+"3+	c #5E85CA",
+"4+	c #B2C6D5",
+"5+	c #99B6C5",
+"6+	c #5E8F9F",
+"7+	c #B7B6B1",
+"8+	c #616572",
+"9+	c #575D6A",
+"0+	c #585E6B",
+"a+	c #595F6C",
+"b+	c #5A5F6C",
+"c+	c #5B606D",
+"d+	c #5B616E",
+"e+	c #5C626E",
+"f+	c #5D626F",
+"g+	c #6E727D",
+"h+	c #BDBBB7",
+"i+	c #393C36",
+"j+	c #BAC9D8",
+"k+	c #A7BECE",
+"l+	c #CDD6E7",
+"m+	c #D5DDEC",
+"n+	c #ABC1D1",
+"o+	c #ADC2D1",
+"p+	c #DCE1EF",
+"q+	c #666B6B",
+"r+	c #484A44",
+"s+	c #82827D",
+"t+	c #74756F",
+"u+	c #50524C",
+"v+	c #61635D",
+"w+	c #4C4E48",
+"x+	c #6C6F6B",
+"y+	c #C6D3E3",
+"z+	c #6A95A7",
+"A+	c #6F99AA",
+"B+	c #D7DEED",
+"C+	c #DBE0EE",
+"D+	c #DDE2EF",
+"E+	c #D9DDE7",
+"F+	c #8B8F92",
+"G+	c #747878",
+"H+	c #757978",
+"I+	c #767A79",
+"J+	c #777A79",
+"K+	c #5B5F5B",
+"L+	c #222520",
+"M+	c #3B3D39",
+"N+	c #313430",
+"O+	c #333531",
+"P+	c #7A7D7B",
+"Q+	c #7C7E7C",
+"R+	c #7C7F7C",
+"S+	c #7C7F7B",
+"T+	c #969997",
+"U+	c #EFEFF1",
+"V+	c #5D85C9",
+"W+	c #D0D8E9",
+"X+	c #D2DAEA",
+"Y+	c #8AABBB",
+"Z+	c #A7BFCF",
+"`+	c #DDE2F0",
+" @	c #767A7C",
+".@	c #1E221D",
+"+@	c #191F18",
+"@@	c #1A1F18",
+"#@	c #171C15",
+"$@	c #161A13",
+"%@	c #161A14",
+"&@	c #171B15",
+"*@	c #1B2019",
+"=@	c #1C201A",
+"-@	c #595C59",
+";@	c #FAFAFC",
+">@	c #4A8192",
+",@	c #478091",
+"'@	c #2D6F80",
+")@	c #6695A5",
+"!@	c #DBE0EF",
+"~@	c #DCE2F0",
+"{@	c #6D91CF",
+"]@	c #D5D9E3",
+"^@	c #1C201B",
+"/@	c #ACBCC1",
+"(@	c #B6C6CC",
+"_@	c #B2C2C8",
+":@	c #373C37",
+"<@	c #BFC0BF",
+"[@	c #BBCADB",
+"}@	c #7EA4B4",
+"|@	c #5F8FA0",
+"1@	c #2A6D7E",
+"2@	c #D5DCEB",
+"3@	c #6D91CE",
+"4@	c #E2E7F1",
+"5@	c #282C27",
+"6@	c #5B6362",
+"7@	c #687272",
+"8@	c #636D6C",
+"9@	c #1F241E",
+"0@	c #CFD7E8",
+"a@	c #7EA2B4",
+"b@	c #387686",
+"c@	c #327183",
+"d@	c #9EB9C7",
+"e@	c #DDE3EF",
+"f@	c #6D90CE",
+"g@	c #CCD0D8",
+"h@	c #898D8F",
+"i@	c #848688",
+"j@	c #858788",
+"k@	c #868889",
+"l@	c #868989",
+"m@	c #878989",
+"n@	c #888A8A",
+"o@	c #898B8B",
+"p@	c #8A8C8A",
+"q@	c #8A8C8B",
+"r@	c #8B8C8B",
+"s@	c #8B8D8B",
+"t@	c #8E908E",
+"u@	c #CECFCE",
+"v@	c #5C84C9",
+"w@	c #3E7A8B",
+"x@	c #2E7081",
+"y@	c #7AA1B1",
+"z@	c #79A0B1",
+"A@	c #5D8D9E",
+"B@	c #5D84C9",
+"C@	c #C7D0E3",
+"D@	c #799FB0",
+"E@	c #96B2C2",
+"F@	c #D7DDED",
+"G@	c #88A9BB",
+"H@	c #83A6B6",
+"I@	c #DDE3F0",
+"J@	c #D7DDEC",
+"K@	c #CDD5E7",
+"L@	c #D2D9E9",
+"M@	c #D4DBEA",
+"N@	c #D6DDEC",
+"O@	c #D8DFED",
+"P@	c #5C83C9",
+"Q@	c #CCD4E6",
+"R@	c #CED6E7",
+"S@	c #D1D8E8",
+"T@	c #D3DAEA",
+"U@	c #DBE0ED",
+"V@	c #CBD3E6",
+"W@	c #CED5E7",
+"X@	c #DADFED",
+"Y@	c #507BC6",
+"Z@	c #5B83C8",
+"`@	c #5B82C8",
+" #	c #537DC7",
+".#	c #99AED8",
+"+#	c #99AFD8",
+"@#	c #9AAED9",
+"##	c #9AAFD9",
+"$#	c #9BB0D9",
+"%#	c #9BAFD9",
+"&#	c #9BAFDA",
+"*#	c #9CB0D9",
+"=#	c #9BB1D9",
+"-#	c #9BB0DA",
+";#	c #9CB1DA",
+">#	c #9CB0DA",
+",#	c #9DB1D9",
+"'#	c #9DB1DA",
+")#	c #8BA3D3",
+". + + + + + @ @ @ # $ % & * = - - ; ; > , > ' > ) ) ! ~ { { ~ ] ",
+"+ ^ ^ ^ ^ ^ ^ ^ ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"+ f f f f f f f g / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h i i i i j k k k / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h l l l m n n n o / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h p q r s s t u v / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h n w x x x x y z A ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h B C D x E F G H I ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h J v K x L M N O I ( _ P Q R S T U V V W X Y Z `  . ...+.c d e ",
+"h @.#.$.x %.&.*.=.A ( _ -.;.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.c d e ",
+"h v ).!.x %.*.=.~.{.( _ ].^./.(.(.(.(._.:.(.(.(.(.(.(.<.[.c d e ",
+"}.|.H 1.x 2.3.4.5.{.( _ ].^.6.7.(.(.8.9.0.(.(.(.(.(.(.<.[.c d e ",
+"}.|.a.b.c.3.d.e.f.{.( _ ].^.g.h.(.(.i.j.k.(.l.m.(.(.(.<.[.c d e ",
+"n.o.p.q.q.r.s.t.u.v.( _ ].^.w.x.(.y.z.A.B.C.D.E.F.(.(.<.[.c d e ",
+"n.H G.x H.I.x J.K.v.( _ ].^.L.M.N.z.O.P.Q.R.S.T.U.l.(.<.[.c d e ",
+"n.H V.x W.X.x Y.Z.v.( _ ].^.`. +.+++(.(. at +#+(.(.l.$+(.<.[.c d e ",
+"%+a.&+x *+x =+-+;+>+( _ ].^.,+'+)+!+(.(.(.(.(.(.(.(.(.<.[.c d e ",
+"%+a.&+x ~+{+]+^+/+>+( _ ].^.(+_+:+<+<+[+[+}+_+_+|+1+2+<.[.c d e ",
+"3+a.&+x 4+5+x 6+/+>+( _ ].7+8+9+0+a+a+b+b+c+d+d+e+f+g+h+i+c d e ",
+"3+a.j+k+l+m+n+o+p+v.( _ q+r+s+s+s+s+t+u+u+u+v+s+s+s+s+w+x+c d e ",
+"3+a.c.y+z+A+B+C+D+v.( _ E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+c d e ",
+"V+W+X+Y+x x Z+C+`+v.( _ :  @. at +@@@@@#@$@%@%@&@@@@@*@=@-@;@c d e ",
+"V+o.&.>@,@'@)@!@~@{@( _ ]@^@/@(@(@(@(@(@(@(@(@(@(@(@_@:@<@c d e ",
+"V+).[@w }@|@1 at 2@D+3@( _ 4 at 5@6 at 7@7 at 7@7 at 7@7 at 7@7 at 7@7 at 7@8 at 9@+.c d e ",
+"V+0 at a@x b at c@x d at e@f@( _ : g at h@i at j@k at l@m at n@o at p@q at r@s at t@u at b c d e ",
+"v at z w at x@y at z@w A@`+f@( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"B at C@D at E@4.F at G@H at I@>+( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"B@@.o.X+~.J at K.C+D+>+( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"v at K@0 at L@M at N@O@/+D+>+( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"P at Q@R at S@T at 2@u.U at D+{@( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"P at V@W@).&.4.B+X at p+{@( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"Y at Z@Z at Z@Z@`@P at P@P@ #.#+#@#########$#%#&#$#*#=#$#*#-#;#>#;#,#'#)#"};
diff --git a/share/metview/icons/FOLDER.xpm b/share/metview/icons/FOLDER.xpm
new file mode 100644
index 0000000..ac20cd1
--- /dev/null
+++ b/share/metview/icons/FOLDER.xpm
@@ -0,0 +1,210 @@
+/* XPM */
+static char *FOLDER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 172 2",
+"   c #766639",
+".  c #7F6D3C",
+"X  c #7C6C40",
+"o  c #6D6756",
+"O  c #736C54",
+"+  c #7D7868",
+"@  c #767A79",
+"#  c #8B7742",
+"$  c #927E47",
+"%  c #927F49",
+"&  c #867952",
+"*  c #82775C",
+"=  c #93814D",
+"-  c #8C8057",
+";  c #958553",
+":  c #9C8854",
+">  c #96865B",
+",  c #96895D",
+"<  c #9B8B5A",
+"1  c #A38F58",
+"2  c #A4925C",
+"3  c #AB9559",
+"4  c #B39A57",
+"5  c #B39C5B",
+"6  c #BCA25C",
+"7  c #928665",
+"8  c #968962",
+"9  c #988B63",
+"0  c #92876A",
+"q  c #948B6E",
+"w  c #998E6B",
+"e  c #9E9060",
+"r  c #9B926C",
+"t  c #848075",
+"y  c #938B73",
+"u  c #998E71",
+"i  c #958D78",
+"p  c #9C9375",
+"a  c #97907D",
+"s  c #9C957C",
+"d  c #9F987B",
+"f  c #A39665",
+"g  c #A69867",
+"h  c #A2966B",
+"j  c #A6996A",
+"k  c #AB9C6C",
+"l  c #A69B72",
+"z  c #A99F7A",
+"x  c #B7A66D",
+"c  c #AEA376",
+"v  c #B3A676",
+"b  c #B3A879",
+"n  c #BAAE7D",
+"m  c #BEB07D",
+"M  c #C4A95F",
+"N  c #C6AB61",
+"B  c #CBAF61",
+"V  c #CDB062",
+"C  c #CEB46A",
+"Z  c #D2B565",
+"A  c #D6B867",
+"S  c #D8BA67",
+"D  c #D5BA6C",
+"F  c #DBBD6A",
+"G  c #C1AE73",
+"H  c #CEB771",
+"J  c #CEB875",
+"K  c #C6B479",
+"L  c #CBB778",
+"P  c #D5BD73",
+"I  c #D6C17D",
+"U  c #E2C36E",
+"Y  c #E3C572",
+"T  c #E5C976",
+"R  c #E6CB7A",
+"E  c #E8CD7E",
+"W  c #2B558B",
+"Q  c #1759AF",
+"!  c #004BB1",
+"~  c #0452B8",
+"^  c #1257B1",
+"/  c #496C98",
+"(  c #566F90",
+")  c #0054C7",
+"_  c #0559CA",
+"`  c #1D68C6",
+"'  c #798288",
+"]  c #6089AE",
+"[  c #5287C1",
+"{  c #8B8A89",
+"}  c #9C9684",
+"|  c #9E9984",
+" . c #9F9B8C",
+".. c #88919D",
+"X. c #A19C8E",
+"o. c #A19E93",
+"O. c #A5A085",
+"+. c #A8A288",
+"@. c #BBB083",
+"#. c #A5A39B",
+"$. c #A9A59C",
+"%. c #BFB895",
+"&. c #8090A3",
+"*. c #9A9FA5",
+"=. c #8FAAB8",
+"-. c #97B2BC",
+";. c #AEAAA2",
+":. c #ABABAB",
+">. c #B2B0A9",
+",. c #AAB0B7",
+"<. c #B8B7B2",
+"1. c #BBBAB5",
+"2. c #BCBCB8",
+"3. c #C9B980",
+"4. c #C1B688",
+"5. c #C5BA8A",
+"6. c #C4BB93",
+"7. c #C0BFBD",
+"8. c #CFC18A",
+"9. c #DDC885",
+"0. c #D6C588",
+"q. c #DDCC8E",
+"w. c #C7C39C",
+"e. c #D3C691",
+"r. c #DACB92",
+"t. c #D7CB98",
+"y. c #DED29F",
+"u. c #E4CD84",
+"i. c #E9CF80",
+"p. c #E2CF8D",
+"a. c #EAD284",
+"s. c #EDD68B",
+"d. c #EFD88E",
+"f. c #E4D394",
+"g. c #E9D796",
+"h. c #EFD991",
+"j. c #E3D49B",
+"k. c #F1DC94",
+"l. c #F1DE9B",
+"z. c #F3E19C",
+"x. c #DAD1A4",
+"c. c #C2C1BD",
+"v. c #D1D3B5",
+"b. c #E1D5A2",
+"n. c #E6DAA7",
+"m. c #EADCA3",
+"M. c #E1D9AE",
+"N. c #EEE3AF",
+"B. c #F5E4A2",
+"V. c #F7E7A8",
+"C. c #F9E9AC",
+"Z. c #EEE3B0",
+"A. c #F4E8B3",
+"S. c #FAEDB4",
+"D. c #F0E6B8",
+"F. c #FAEFB9",
+"G. c #FBF1BD",
+"H. c #C4C4C1",
+"J. c #CAC9C6",
+"K. c #CBCAC9",
+"L. c #D3D3D3",
+"P. c #DADADA",
+"I. c #FFF4C1",
+"U. c #E2E2E3",
+"Y. c #E6E7E8",
+"T. c #E7E8E8",
+"R. c #ECECEC",
+"E. c #EFF0F0",
+"W. c #F4F4F5",
+"Q. c #F7F7F8",
+"!. c #F7F8F8",
+"~. c #FFFFFF",
+/* pixels */
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.",
+"~.~.~.~.~.~.~.Q.L.T.!.~.~.~.~.R.R.Q.~.~.~.~.~.~.~.~.~.~.~.~.~.~.",
+"~.~.~.~.~.~.~.P.* s o.2.U.Q.Y.( / &.,.P.W.~.~.~.~.~.~.~.~.~.~.~.",
+"~.!.P.R.~.~.~.<. at .l.r.@.d  .' ^ ) ~ Q W *.~.~.~.~.~.~.~.~.~.~.~.",
+"~.R.+ q o.H.T. .0.B.B.V.B.j.w.=.[ ` _ ! ..~.~.~.~.~.~.~.~.~.~.~.",
+"~.E.p P J k w O g 0.g.z.B.V.V.C.N.v.-.] @ <.P.E.~.~.~.~.~.~.~.~.",
+"~.!.| P a.a.u.I x < , j q.z.B.V.V.V.C.A.b.6.O.X.#.7.P.R.!.~.~.~.",
+"~.~.X.C R E i.s.s.s.9.g j z.z.B.V.V.C.C.S.S.F.Z.x.%.X. .#.<.T.~.",
+"~.~.o.N T T E E a.a.d.L & K p.z.z.j.b e.m.C.S.S.S.G.G.D.M.} c.~.",
+"~.~.;.6 U Y T T E E a.i.G f , f 3.j 9 h w l 5.y.A.S.S.G.I.+.P.~.",
+"~.~.1.5 U U U Y T R E i.a.s.u.K g - q.B.f.8.c r r y.S.S.A.| Y.~.",
+"~.~.K.2 U U U U Y Y R R i.a.a.s.h.s.h.h.z.B.V.B.l 4.S.S.n. .Q.~.",
+"~.~.P.< U U U U U U Y Y R R u.a.a.s.d.h.l.l.l.B.n n C.C.t.#.~.~.",
+"~.~.U.> U U U U U U U Y Y Y R R a.a.s.s.h.h.h.z.m v B.C. at .<.~.~.",
+"~.~.T.8 F U U U U U U U Y Y Y T R R a.a.s.s.d.k.K k z.B.z L.~.~.",
+"~.~.R.u S U U U U U U U Y U U Y T R R u.a.a.s.k.K g l.l.p Y.~.~.",
+"~.~.W.p A U U U U U U U U U U U Y Y T R R a.a.d.L e k.p.| W.~.~.",
+"~.~.~. .V U U U U U U U U U U U U U Y T R R R a.J , d.I X.~.~.~.",
+"~.~.~.X.M U U U U U U U U U U U U U U U Y T R R H ; s.G ;.~.~.~.",
+"~.~.~.#.M U U U U U U U U F U U U U U U U U T T C ; a.k K.~.~.~.",
+"~.~.~.J.* 6 F U U U U U U U U U U U U U U U U Y C = T 9 U.~.~.~.",
+"~.~.~.~.U.#.7 4 A U U U U U U U U U U U U U U U C % D u R.~.~.~.",
+"~.~.~.~.~.~.Y.;.7 4 A U U U U U U U U U U F U U Z $ M } ~.~.~.~.",
+"~.~.~.~.~.~.~.~.Y.>.0 3 A U U U U U U U U U U U A $ 4 $.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.R.<.0 2 Z U U U U U U U U U S % : c.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.E.1.y 1 Z U U U U U U U F $ & P.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.W.7.i 1 B U U U U U F # * R.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.W.H.a < M U U U U . t !.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.Q.K.} > M U Y   { ~.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.Q.L.} > M X :.~.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.L.X.o L.~.~.~.~.~.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.!.U.!.~.~.~.~.~."
+};
diff --git a/share/metview/icons/GDDRIVER.xpm b/share/metview/icons/GDDRIVER.xpm
new file mode 100644
index 0000000..79e8fb8
--- /dev/null
+++ b/share/metview/icons/GDDRIVER.xpm
@@ -0,0 +1,82 @@
+/* XPM */
+static char * GDDRIVER_xpm[] = {
+"32 32 47 1",
+" 	c #FFFFFFFFFFFF",
+".	c #00008B8B0000",
+"X	c #E5E5E5E5E5E5",
+"o	c #999999999999",
+"O	c #E8E8E8E8E8E8",
+"+	c #E0E0E0E0E8E8",
+"@	c #D0D0D0D0E0E0",
+"#	c #C8C8C8C8D8D8",
+"$	c #C0C0C0C0D0D0",
+"%	c #B8B8B8B8C8C8",
+"&	c #F8F8F8F8F8F8",
+"*	c #C0C0C8C8D8D8",
+"=	c #C0C0C0C0D8D8",
+"-	c #F0F0F0F0F0F0",
+";	c #E0E0E0E0F0F0",
+":	c #D8D8E0E0F0F0",
+">	c #D8D8D8D8E8E8",
+",	c #C8C8C8C8D0D0",
+"<	c #E0E0E0E0F8F8",
+"1	c #E0E0E8E8F8F8",
+"2	c #D0D0D0D0D8D8",
+"3	c #E8E8E8E8F0F0",
+"4	c #D8D8D8D8E0E0",
+"5	c #D0D0D8D8E8E8",
+"6	c #D0D0D8D8D8D8",
+"7	c #E0E0E8E8F0F0",
+"8	c #D0D0D0D0E8E8",
+"9	c #C0C0C0C0C8C8",
+"0	c #F0F0F0F0F8F8",
+"q	c #909090909898",
+"w	c #A0A0A8A8A8A8",
+"e	c #888890909090",
+"r	c #C8C8D8D8E8E8",
+"t	c #C0C0D0D0E8E8",
+"y	c #D8D8D8D8F0F0",
+"u	c #F0F0F8F8F8F8",
+"i	c #9898FBFB9898",
+"p	c #0000CDCD0000",
+"a	c #D0D0D8D8F0F0",
+"s	c #E8E8F0F0F8F8",
+"d	c #0000FFFF0000",
+"f	c #C8C8D0D0E8E8",
+"g	c #C0C0C8C8E8E8",
+"h	c #9090EEEE9090",
+"j	c #E8E8E8E8F8F8",
+"k	c #D0D0D8D8E0E0",
+"l	c #C8C8D0D0E0E0",
+"           ......X.....         ",
+"           ......X..X..         ",
+"         oo..OXOOX..+O..        ",
+"        o@@..XXOOX..XX..        ",
+"       o#$@..O...X..  ..ooooooo ",
+"      o%@O&..O...&..  ..#**=*ooo",
+"     o%+-&&..&&..&..&&..;;;;:>>o",
+"    o,O&&&&..&&.. ..&...<<<11;>o",
+"   o23&&&&&...... .....<;;<<<:>o",
+"  o4-&&&&&&...... .....X;;;;;5>o",
+" o4-&&&&&&&&&&&&&&&&&&67;::;;8>o",
+"o%O&&&&&&&&&&&&&&&&&&&91:::::>oo",
+"oo40&&&&&&&&&&&&&&&qwe:rtry:y>o ",
+" o#3&&&&&&&&uuuuuu0ipppp.pa:y>o ",
+" o#@0&uuuuuuuuuiiisd.....pffg>o ",
+"  o#+0uuuuuu00ip.pdd.ddp.pp..p  ",
+"  o##300u000sip......ddp......h ",
+"   o#>000sjjdp.pdddddddppppp..h ",
+"   o##7sj111dp.pddddddddddddp..h",
+"    o#kj1<<:dpp.dddddddddddp...h",
+"    o##;1;;d.pppddiiiiiidddp..hh",
+"     o#@;;:d.dpdddihpppidddp..hh",
+"     o##:<:d.pddddip  pidddp....",
+"      o#8;yd.pddddip  pidddddd..",
+"      o#*:yd...pddipppiidddddd.h",
+"       o#5yd...pddiiiiiiddp....d",
+"       o##yddd.pddddddddddp....d",
+"        o#>yd..pdddddddddp....h ",
+"        o#l:d..ppppppppdp...hd  ",
+"         o#*d...............d   ",
+"         o##&ddh..........h&    ",
+"          oo0&uhh.hhhh..hd      "};
diff --git a/share/metview/icons/GEOPOINTS.xpm b/share/metview/icons/GEOPOINTS.xpm
new file mode 100644
index 0000000..3d54422
--- /dev/null
+++ b/share/metview/icons/GEOPOINTS.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * GEOPOINTS_xpm[] = {
+"32 32 8 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000034340000",
+"X	c #FFFFF7F7F7F7",
+"o	c #8484C1C1D6D6",
+"O	c #FFFF00000000",
+"+	c #0000F7F76C6C",
+"@	c #00000000FFFF",
+"#	c #E6E6D6D65C5C",
+"            ........            ",
+"         ...XXXXXXXX...         ",
+"       .....ooXXXXXXXoo..       ",
+"      ....o..oooXXXOOooo..      ",
+"     ..+.oo....ooXOOOOoo.+.     ",
+"    .+..ooo.+..oooOOOOoo.oo.    ",
+"   ....OO.....ooooXOOoooooo..   ",
+"  ..X.OOOO...ooo.oooooo+o.....  ",
+"  .X..OOOO..o..ooooooooo..+++.  ",
+" ..X...OO++...oooooooooooo..... ",
+" ...X..+.+...ooooooooooo....o.. ",
+" .o.....+.+.oooooooooooo..o@@o. ",
+".oo.........@@ooooOOoooooo@@@@o.",
+".ooo...oooo@@@@ooOOOOooo..@@@@o.",
+".oooo..oooo@@@@ooOOOOooo...@@...",
+".o@@oo..oooo@@ooooOOooo..##.#.##",
+".@@@@oo.....oooooooooo...#.###.#",
+".@@@@........ooooooooo..########",
+".o@@o..X..+...oooooooo...#.#..##",
+".oooo..X....+..oooooooo.........",
+" .oooo..X...+..ooooooooooo..... ",
+" .oooooo.X..+..ooooooooooo.++.. ",
+" .ooooOO..X...ooooooooooooo..+. ",
+"  .ooOOOO.X...ooooooOOooooo...  ",
+"  ..oOOOO.X..ooooooOOOOoooo...  ",
+"   .ooOOo...oooooooOOOOooo...   ",
+"    .oooo..oo@@oooooOOoooo..    ",
+"     .ooo..o@@@@ooooooooo..     ",
+"      ..oo.o@@@@oooooooo..      ",
+"       ..oooo@@oooooooo..       ",
+"         ...oooooooo...         ",
+"            ........            "};
diff --git a/share/metview/icons/GEOVIEW.xpm b/share/metview/icons/GEOVIEW.xpm
new file mode 100644
index 0000000..da434ed
--- /dev/null
+++ b/share/metview/icons/GEOVIEW.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char * MAPVIEW_xpm[] = {
+"32 32 5 1",
+" 	c #333333333333",
+".	c #FFFFFFFFFFFF",
+"X	c #7E7E7E7E7E7E",
+"o	c #DADAF6F6FFFF",
+"O	c #7C7CBDBD7676",
+"                                ",
+" .............................. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .X..........................X. ",
+" .X..oooooOOOooooooooooooOo..X. ",
+" .X..ooooooOOOooooooooooOOO..X. ",
+" .X..oooooooOOOoooooooooOOO..X. ",
+" .X..ooOOOoooOOOooooooooOOO..X. ",
+" .X..oOOOOoooOOOoooooooOOOO..X. ",
+" .X..oOOOOooOOOOOOooOoOOOOO..X. ",
+" .X..oOoooooOOOOOooOOOOOOOO..X. ",
+" .X..ooooooOOooooOOOOOOOOOO..X. ",
+" .X..oooooooooooOOOOOOOOOOO..X. ",
+" .X..oooooooooOOOOOOOOOOOOO..X. ",
+" .X..oooooooOOOOOOOOOOOOOOO..X. ",
+" .X..oooooooooOOOOOOOOOOOOO..X. ",
+" .X..oooooooooOOOOOOOOOOOOO..X. ",
+" .X..ooooooooOOOOOOOOOOOOOO..X. ",
+" .X..oooOOOOOOOOOOOOOOOOoOO..X. ",
+" .X..ooOOOOOOOOOOOOOOOooooo..X. ",
+" .X..oOOOOOOOOOOOOooooooOoo..X. ",
+" .X..oOOOOOOOOOOOoooooooooo..X. ",
+" .X..oOOOOOOOOOOooooooooOoo..X. ",
+" .X..oOOOOOOOOOOooOoooooooo..X. ",
+" .X..ooOOOOOOOOoooOOOOOOOOo..X. ",
+" .X..oooOOOOOOoooOOOOOOOOOo..X. ",
+" .X..oooooOooooOOOOOOOOOOOo..X. ",
+" .X..oooOOOOOOOOOOOOOOOOOOo..X. ",
+" .X..........................X. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/GEO_TO_GRIB.xpm b/share/metview/icons/GEO_TO_GRIB.xpm
new file mode 100644
index 0000000..5dc1552
--- /dev/null
+++ b/share/metview/icons/GEO_TO_GRIB.xpm
@@ -0,0 +1,182 @@
+/* XPM */
+static char *GEO_TO_GRIB[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 144 2",
+"   c #000000",
+".  c #161A23",
+"X  c #1D2128",
+"o  c #21252C",
+"O  c #2B2E33",
+"+  c #2F3134",
+"@  c #313335",
+"#  c #35373A",
+"$  c #36383B",
+"%  c #752727",
+"&  c #772828",
+"*  c #7A2E2F",
+"=  c #7F3233",
+"-  c #3A3C40",
+";  c #2A3D6E",
+":  c #2E4171",
+">  c #324574",
+",  c #364977",
+"<  c #364978",
+"1  c #3A4D7A",
+"2  c #3E507D",
+"3  c #4A4C55",
+"4  c #4D4F58",
+"5  c #50535E",
+"6  c #545661",
+"7  c #585B64",
+"8  c #5C5E68",
+"9  c #40527F",
+"0  c #5E6067",
+"q  c #5E6068",
+"w  c #9D1F1E",
+"e  c #B9201E",
+"r  c #842D2A",
+"t  c #99322E",
+"y  c #803432",
+"u  c #853A35",
+"i  c #823739",
+"p  c #953231",
+"a  c #9A3130",
+"s  c #AC2A27",
+"d  c #A42E2D",
+"f  c #F41215",
+"g  c #F41618",
+"h  c #F41A1B",
+"j  c #D7201E",
+"k  c #C92321",
+"l  c #CC2A28",
+"z  c #DB2522",
+"x  c #D12B2A",
+"c  c #CC3433",
+"v  c #EF2C2A",
+"b  c #F32624",
+"n  c #F42927",
+"m  c #F42B29",
+"M  c #E4312F",
+"N  c #EB3230",
+"B  c #E83837",
+"V  c #F43D35",
+"C  c #F44039",
+"Z  c #8C4B4E",
+"A  c #9B5A4D",
+"S  c #914E52",
+"D  c #945256",
+"F  c #915458",
+"G  c #A46B59",
+"H  c #955E63",
+"J  c #9B696F",
+"K  c #F55347",
+"L  c #F56453",
+"P  c #F6725F",
+"I  c #F57965",
+"U  c #F5846D",
+"Y  c #F68D74",
+"T  c #F69176",
+"R  c #F5977A",
+"E  c #F5997C",
+"W  c #435581",
+"Q  c #465883",
+"!  c #485A85",
+"~  c #4D5D88",
+"^  c #53648D",
+"/  c #596991",
+"(  c #606F96",
+")  c #607096",
+"_  c #657499",
+"`  c #68779C",
+"'  c #6C7A9E",
+"]  c #6E7DA1",
+"[  c #717FA2",
+"{  c #7583A5",
+"}  c #7986A8",
+"|  c #7D8AAB",
+" . c #AA8B93",
+".. c #AFB08D",
+"X. c #818EAE",
+"o. c #838FB0",
+"O. c #8591B0",
+"+. c #8A96B4",
+"@. c #8F9BB8",
+"#. c #919DBA",
+"$. c #95A0BC",
+"%. c #99A4BF",
+"&. c #A9AEB7",
+"*. c #BAA8B3",
+"=. c #C8AE8D",
+"-. c #CFBA96",
+";. c #F6A283",
+":. c #F6A888",
+">. c #F7B18F",
+",. c #F6BA96",
+"<. c #F6BE98",
+"1. c #CBCCA3",
+"2. c #D8C8A1",
+"3. c #F6CDA4",
+"4. c #F6D9AE",
+"5. c #E3E4B5",
+"6. c #E9E4B6",
+"7. c #E6E7B8",
+"8. c #E7E8B9",
+"9. c #EAEBBB",
+"0. c #F7E2B4",
+"q. c #F6EABA",
+"w. c #EEF0BF",
+"e. c #9BA5C0",
+"r. c #9DA8C2",
+"t. c #A2ACC6",
+"y. c #A5AFC8",
+"u. c #AAB4CC",
+"i. c #AEB8CF",
+"p. c #B2BBD2",
+"a. c #BDC3CE",
+"s. c #BCC4D9",
+"d. c #C7C3D0",
+"f. c #CAC6D2",
+"g. c #C4CBDE",
+"h. c #CDCDDA",
+"j. c #F6F5C3",
+"k. c #F6F8C5",
+"l. c #C6CDE0",
+"z. c #CDD4E5",
+"x. c #D1D5E4",
+"c. c #D1D7E8",
+"v. c #D5DAEA",
+"b. c #D8DEED",
+/* pixels */
+"3 0 q 0 0 0 0 0 0 0 0 0 0 0 0 3 3 q 6 7 q q 8 8 7 8 q q 8 q 8 3 ",
+"q k.k.k.k.k.k.k.k.k.k.k.k.k.w.  @ b.i., O.b.b.c.: v.b.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.>.C R k.w.  + b.b.z.^ / v.b._ O.b.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.V f h k.9.  @ b.b.b.b.] ! z.z.< t.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.T h P k.9.  X z.b.b.b.b.+.1 v.s.< @.b.b.b.7 ",
+"q k.k.U K 3.k.k.k.k.k.j.k.k.9.  o < r.b.b.b.b.[ ] b.l.^ : ` r.7 ",
+"q k.4.f g L k.k.k.k.k.k.k.k.9.  # s.~ / z.b.b.v.1 i.b.b.c.e.) 7 ",
+"q k.j.V h :.k.k.k.k.k.k.k.k.9.  $ b.b. at .2 z.b.b.p.1 v.b.b.b.b.7 ",
+"q k.k.k.q.k.k.k.k.k.k.k.k.k.7.  $ b.b.b. at .9 c.b.b._ #.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.k.k.k.k.5.  - b.b.b.b.} ] b.b.s.1 b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.k.k.k.k.7.  - b.b.b.b.v.< s.b.b./ r.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.k.k.k.k.5.  - *. .h.b.b.r./ b.b.p.Q b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.E H G 5.w...&.D w y h.b.b.1 s.b.b.Q p.b.b.7 ",
+"q k.k.3.0.k.k.k.k.k.A e & -.6.7.h.S j k = f.b.| o.b.b.#.` b.b.7 ",
+"q k.;.f h 0.k.k.k.k.A z s r r r r r z b k = d.p.^ b.b.v.> c.b.7 ",
+"q k.U g f 3.k.k.k.k.A x v v v v v v v v v l * d.; b.b.b.} [ b.7 ",
+"0 k.q.U ;.k.k.k.k.k.A x M M M M M M N N N d Z h.; b.b.b.c.W +.7 ",
+"q k.k.k.k.k.k.k.k.k.A c t = u u i % c B a F v.t.( b.b.b.b.z.1 5 ",
+"q k.k.k.k.k.k.k.k.k.A t * 2.k.k.v.F c p H v.b._ e.b.b.b.b.b.c.6 ",
+"q k.k.k.k.k.k.k.k.k.2.=.=.9.k.1.a.H & J b.b.c.> z.b.b.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.k.k.j.k.w.  O x.h.b.b.b.o.] b.b.b.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.k.q.j.k.q.  @ b.b.b.b.X.< g.b.b.v.b.b.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.<.h n q.9.  @ b.b.x./ ^ z.b.%.9 ; W g.b.b.7 ",
+"q k.k.k.k.k.k.k.k.k.U f g <.9.  O y.+.1 o.b.p.W ^ p.b.e.> p.b.7 ",
+"q k.k.k.k.k.k.k.k.k.0.L I k.9.  . _ X.p.z.) 1 u.b.b.b.b.p.> u.7 ",
+"q k.E n T k.k.k.k.k.k.k.k.k.8.  # b.b. at .: O.b.b.l.s.b.b.b.s.> 6 ",
+"q k.m f n k.k.k.0.q.k.k.k.k.8.  # l.! / g.v.#.1 1 Q > #.b.b.u.5 ",
+"q k.E n T k.k.,.g h 0.k.k.k.7.  O > $.b.t.> ) s.b.b.l.Q ' v.b.7 ",
+"q k.k.k.k.k.k.Y f f ,.k.k.k.5.  o s.b.s.> s.b.b.b.b.b.v.` ! b.7 ",
+"q k.k.k.k.k.k.q.P U j.k.k.k.5.  - b.x.< u.b.b.b.b.b.b.b.b.! p.7 ",
+"q k.k.k.k.k.k.k.k.k.k.k.k.k.5.  - b.} { b.b.b.b.b.b.b.b.b.X.| 7 ",
+"4 q q q 0 0 0 0 q 0 q q 0 q 8 7 7 8 7 8 8 8 8 8 8 8 8 8 8 8 8 3 "
+};
diff --git a/share/metview/icons/GIF.xpm b/share/metview/icons/GIF.xpm
new file mode 100644
index 0000000..1837387
--- /dev/null
+++ b/share/metview/icons/GIF.xpm
@@ -0,0 +1,629 @@
+/* XPM */
+static char * GIF_xpm[] = {
+"32 32 594 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #E2E2E2",
+"@ 	c #EDEDED",
+"# 	c #ECECEC",
+"$ 	c #EBEBEB",
+"% 	c #EAEAEA",
+"& 	c #E9E9E9",
+"* 	c #E8E8E8",
+"= 	c #D6D6D6",
+"- 	c #FBFBFB",
+"; 	c #E1E1E1",
+"> 	c #BDCEFF",
+", 	c #AFC4FF",
+"' 	c #889BCD",
+") 	c #7787B7",
+"! 	c #7E92C9",
+"~ 	c #778BC3",
+"{ 	c #7388C3",
+"] 	c #93AFFF",
+"^ 	c #8EACFF",
+"/ 	c #8AA8FF",
+"( 	c #85A5FF",
+"_ 	c #80A2FF",
+": 	c #7C9EFF",
+"< 	c #779BFF",
+"[ 	c #7297FF",
+"} 	c #6E93FF",
+"| 	c #6C92FF",
+"1 	c #6C92FE",
+"2 	c #6C91FE",
+"3 	c #D5D7DE",
+"4 	c #F1F1F1",
+"5 	c #B8CBFF",
+"6 	c #AAC0FF",
+"7 	c #7383B3",
+"8 	c #8397D2",
+"9 	c #6A7CAF",
+"0 	c #6273A7",
+"a 	c #7189C9",
+"b 	c #8CAAFF",
+"c 	c #87A6FF",
+"d 	c #82A2FF",
+"e 	c #7D9FFF",
+"f 	c #789CFF",
+"g 	c #7398FF",
+"h 	c #6E94FF",
+"i 	c #6A90FF",
+"j 	c #648CFF",
+"k 	c #638BFF",
+"l 	c #D4D7DE",
+"m 	c #7181AF",
+"n 	c #7081B4",
+"o 	c #5D6D9A",
+"p 	c #687AB1",
+"q 	c #8EABFC",
+"r 	c #E0E0E0",
+"s 	c #F2F5FF",
+"t 	c #EFF3FF",
+"u 	c #E9EDFA",
+"v 	c #DBDFEC",
+"w 	c #E5EAF8",
+"x 	c #E4E9F8",
+"y 	c #EAF0FF",
+"z 	c #E9EFFF",
+"A 	c #E8EEFF",
+"B 	c #E7EDFF",
+"C 	c #E5ECFE",
+"D 	c #E4EAFD",
+"E 	c #E2E9FC",
+"F 	c #E0E7FB",
+"G 	c #DFE6FB",
+"H 	c #DDE4FA",
+"I 	c #DCE3F9",
+"J 	c #DBE2F8",
+"K 	c #DAE2F8",
+"L 	c #D9E1F7",
+"M 	c #D9E0F6",
+"N 	c #D8DFF5",
+"O 	c #D7DFF4",
+"P 	c #D6DEF4",
+"Q 	c #D5DDF3",
+"R 	c #D4DCF2",
+"S 	c #DBDCDD",
+"T 	c #F0F2EF",
+"U 	c #C2C9C0",
+"V 	c #C1CAC0",
+"W 	c #C1CDC0",
+"X 	c #C0D1C0",
+"Y 	c #C2D7C0",
+"Z 	c #C6DCC2",
+"` 	c #CAE1C4",
+" .	c #D6E6C6",
+"..	c #E9EAC8",
+"+.	c #F8EBCA",
+"@.	c #F9E1C8",
+"#.	c #F9D6C6",
+"$.	c #F8CCC4",
+"%.	c #F4CBC4",
+"&.	c #EFCBC4",
+"*.	c #EBCBC5",
+"=.	c #E4CBC6",
+"-.	c #DACCCA",
+";.	c #D8CBD7",
+">.	c #D6CAE6",
+",.	c #D4C9F3",
+"'.	c #D5CFF4",
+").	c #D6D5F3",
+"!.	c #D7DCF2",
+"~.	c #E0E6EC",
+"{.	c #DCDCDC",
+"].	c #092804",
+"^.	c #082E03",
+"/.	c #063A02",
+"(.	c #054E01",
+"_.	c #116507",
+":.	c #217A0E",
+"<.	c #349015",
+"[.	c #77A320",
+"}.	c #C4B62B",
+"|.	c #ECAC2F",
+"1.	c #EF832A",
+"2.	c #F25A25",
+"3.	c #EE3F23",
+"4.	c #E04126",
+"5.	c #D1442A",
+"6.	c #C0472E",
+"7.	c #9E4D37",
+"8.	c #855159",
+"9.	c #814F96",
+"0.	c #7C4DD2",
+"a.	c #7B55FC",
+"b.	c #8271FD",
+"c.	c #898EFB",
+"d.	c #92B4F9",
+"e.	c #BFE0EC",
+"f.	c #DFDFDF",
+"g.	c #092A04",
+"h.	c #073403",
+"i.	c #044501",
+"j.	c #0A5B04",
+"k.	c #1A710B",
+"l.	c #298612",
+"m.	c #539B1A",
+"n.	c #A1AE26",
+"o.	c #E2B72F",
+"p.	c #EE962C",
+"q.	c #F06D27",
+"r.	c #F24723",
+"s.	c #E74025",
+"t.	c #D84229",
+"u.	c #C8452C",
+"v.	c #B04A32",
+"w.	c #8C5043",
+"x.	c #82507A",
+"y.	c #7E4EB7",
+"z.	c #7A4EF0",
+"A.	c #7E63FE",
+"B.	c #8681FC",
+"C.	c #8D9FFA",
+"D.	c #99D2F7",
+"E.	c #C1EDE8",
+"F.	c #063C02",
+"G.	c #055002",
+"H.	c #126608",
+"I.	c #227C0F",
+"J.	c #389116",
+"K.	c #7DA521",
+"L.	c #CAB72C",
+"M.	c #EDA92E",
+"N.	c #EF802A",
+"O.	c #F25725",
+"P.	c #ED3F23",
+"Q.	c #DF4127",
+"R.	c #CF442A",
+"S.	c #BE472F",
+"T.	c #9B4E38",
+"U.	c #85505E",
+"V.	c #804E9B",
+"W.	c #7B4DD7",
+"X.	c #7B56FD",
+"Y.	c #8273FD",
+"Z.	c #8991FB",
+"`.	c #93B8F8",
+" +	c #9FEEF2",
+".+	c #BDEDD8",
+"++	c #DEDEDE",
+"@+	c #C1CBC0",
+"#+	c #073503",
+"$+	c #044601",
+"%+	c #0B5C04",
+"&+	c #1B720C",
+"*+	c #2A8812",
+"=+	c #599C1B",
+"-+	c #A7AF27",
+";+	c #E5B62F",
+">+	c #EE932C",
+",+	c #F16A27",
+"'+	c #F24523",
+")+	c #E64025",
+"!+	c #D64229",
+"~+	c #C7462D",
+"{+	c #AD4A33",
+"]+	c #8A5046",
+"^+	c #82507E",
+"/+	c #7E4DBB",
+"(+	c #7A4EF3",
+"_+	c #7F66FD",
+":+	c #8683FC",
+"<+	c #8EA3FA",
+"[+	c #9AD6F7",
+"}+	c #9BF9DB",
+"|+	c #B6EAC3",
+"1+	c #DDDDDD",
+"2+	c #C1CCC0",
+"3+	c #063D02",
+"4+	c #065202",
+"5+	c #146808",
+"6+	c #237E0F",
+"7+	c #3C9317",
+"8+	c #84A622",
+"9+	c #CFB82D",
+"0+	c #EDA62E",
+"a+	c #F07D29",
+"b+	c #F25424",
+"c+	c #EC3F23",
+"d+	c #DD4127",
+"e+	c #CE442B",
+"f+	c #BC482F",
+"g+	c #984E39",
+"h+	c #845062",
+"i+	c #804F9F",
+"j+	c #7B4DDC",
+"k+	c #7C58FE",
+"l+	c #8376FC",
+"m+	c #8A93FB",
+"n+	c #94BCF8",
+"o+	c #9FF1F0",
+"p+	c #8DF2B2",
+"q+	c #ABE4A1",
+"r+	c #C1CEC0",
+"s+	c #044801",
+"t+	c #0C5E05",
+"u+	c #1C740C",
+"v+	c #2C8A13",
+"w+	c #5F9E1C",
+"x+	c #AEB028",
+"y+	c #E8B42F",
+"z+	c #EF902B",
+"A+	c #F16627",
+"B+	c #F14323",
+"C+	c #E44025",
+"D+	c #D54329",
+"E+	c #C6462D",
+"F+	c #AA4B34",
+"G+	c #895049",
+"H+	c #824F83",
+"I+	c #7D4DC0",
+"J+	c #7A4FF6",
+"K+	c #8068FD",
+"L+	c #8786FB",
+"M+	c #8EA6FA",
+"N+	c #9CDBF6",
+"O+	c #9AF8D6",
+"P+	c #79E778",
+"Q+	c #A7DF94",
+"R+	c #075402",
+"S+	c #156A09",
+"T+	c #247F10",
+"U+	c #409517",
+"V+	c #8AA823",
+"W+	c #D4B82D",
+"X+	c #EDA22E",
+"Y+	c #F07929",
+"Z+	c #F25124",
+"`+	c #EB3F24",
+" @	c #DC4128",
+".@	c #CD442B",
+"+@	c #BA4830",
+"@@	c #954F3A",
+"#@	c #845067",
+"$@	c #804EA4",
+"%@	c #7B4CE1",
+"&@	c #7C5BFE",
+"*@	c #8378FC",
+"=@	c #8B95FA",
+"-@	c #95C0F8",
+";@	c #9FF3ED",
+">@	c #8BF1AB",
+",@	c #6ADB4B",
+"'@	c #A7D990",
+")@	c #C0D4BF",
+"!@	c #0E6005",
+"~@	c #1D760C",
+"{@	c #2E8B13",
+"]@	c #659F1D",
+"^@	c #B4B228",
+"/@	c #EAB32F",
+"(@	c #EF8C2B",
+"_@	c #F16326",
+":@	c #F14223",
+"<@	c #E34026",
+"[@	c #D44329",
+"}@	c #C4462D",
+"|@	c #A74C34",
+"1@	c #88514D",
+"2@	c #814F88",
+"3@	c #7D4DC5",
+"4@	c #7A50F8",
+"5@	c #806AFD",
+"6@	c #8788FB",
+"7@	c #8FA9F9",
+"8@	c #9CE0F6",
+"9@	c #98F8D1",
+"0@	c #76E570",
+"a@	c #66CF3C",
+"b@	c #A7D28B",
+"c@	c #166C09",
+"d@	c #268110",
+"e@	c #449618",
+"f@	c #90A924",
+"g@	c #D8B92E",
+"h@	c #EE9F2D",
+"i@	c #F07628",
+"j@	c #F24E24",
+"k@	c #EA3F24",
+"l@	c #DB4228",
+"m@	c #CC452B",
+"n@	c #B84830",
+"o@	c #924F3C",
+"p@	c #84506C",
+"q@	c #7F4EA9",
+"r@	c #7B4DE5",
+"s@	c #7D5DFE",
+"t@	c #847AFC",
+"u@	c #8B98FA",
+"v@	c #96C5F8",
+"w@	c #9FF5EB",
+"x@	c #88EFA2",
+"y@	c #69D947",
+"z@	c #65C232",
+"A@	c #A6CB86",
+"B@	c #C4DAC1",
+"C@	c #1E770D",
+"D@	c #308D14",
+"E@	c #6CA11E",
+"F@	c #B9B32A",
+"G@	c #EBB02F",
+"H@	c #EF892A",
+"I@	c #F16026",
+"J@	c #F04123",
+"K@	c #E24026",
+"L@	c #D3432A",
+"M@	c #C3462E",
+"N@	c #A44C35",
+"O@	c #875151",
+"P@	c #814F8D",
+"Q@	c #7D4DCA",
+"R@	c #7A51FA",
+"S@	c #816DFD",
+"T@	c #888AFB",
+"U@	c #90ADF9",
+"V@	c #9DE4F5",
+"W@	c #96F7CB",
+"X@	c #74E368",
+"Y@	c #66CE3B",
+"Z@	c #63B226",
+"`@	c #A6C27F",
+" #	c #C6DCC1",
+".#	c #268311",
+"+#	c #499819",
+"@#	c #96AB24",
+"##	c #DCB82E",
+"$#	c #EE9C2D",
+"%#	c #F07328",
+"&#	c #F24B23",
+"*#	c #E93F24",
+"=#	c #DA4228",
+"-#	c #CB452C",
+";#	c #B54931",
+">#	c #90503E",
+",#	c #835071",
+"'#	c #7F4EAE",
+")#	c #7A4DE9",
+"!#	c #7D5FFE",
+"~#	c #847CFC",
+"{#	c #8C9AFA",
+"]#	c #97C9F7",
+"^#	c #9EF7E7",
+"/#	c #85EE9A",
+"(#	c #68D844",
+"_#	c #64C030",
+":#	c #61A019",
+"<#	c #A5B979",
+"[#	c #DBDBDB",
+"}#	c #BFD6BA",
+"|#	c #328E15",
+"1#	c #72A21F",
+"2#	c #BFB52A",
+"3#	c #ECAE2F",
+"4#	c #EF862A",
+"5#	c #F25D26",
+"6#	c #EF4023",
+"7#	c #E14126",
+"8#	c #D2442A",
+"9#	c #C2472E",
+"0#	c #A14D36",
+"a#	c #865155",
+"b#	c #814F92",
+"c#	c #7C4DCF",
+"d#	c #7B53FB",
+"e#	c #816FFD",
+"f#	c #888CFB",
+"g#	c #91B0F9",
+"h#	c #9EE8F4",
+"i#	c #94F6C5",
+"j#	c #71E160",
+"k#	c #66CC39",
+"l#	c #62AF24",
+"m#	c #5F8E0B",
+"n#	c #A5B777",
+"o#	c #C1D9BB",
+"p#	c #4E991A",
+"q#	c #9CAC26",
+"r#	c #E0B82F",
+"s#	c #EE992D",
+"t#	c #F07028",
+"u#	c #F24923",
+"v#	c #E84025",
+"w#	c #D94228",
+"x#	c #C9452C",
+"y#	c #B34931",
+"z#	c #8E5041",
+"A#	c #835075",
+"B#	c #7E4EB2",
+"C#	c #7A4DED",
+"D#	c #7E61FE",
+"E#	c #857FFC",
+"F#	c #8C9DFA",
+"G#	c #98CEF7",
+"H#	c #9DF8E4",
+"I#	c #82EC91",
+"J#	c #68D642",
+"K#	c #64BD2E",
+"L#	c #609D16",
+"M#	c #5D8202",
+"N#	c #A6B777",
+"O#	c #C8DCBD",
+"P#	c #78A420",
+"Q#	c #C5B62B",
+"R#	c #ECAB2F",
+"S#	c #EF822A",
+"T#	c #D0442A",
+"U#	c #9D4D37",
+"V#	c #85515A",
+"W#	c #804F96",
+"X#	c #7C4DD4",
+"Y#	c #7B55FD",
+"Z#	c #9FEBF3",
+"`#	c #92F5BF",
+" $	c #6FE05A",
+".$	c #66CA38",
+"+$	c #62AD22",
+"@$	c #5E8B09",
+"#$	c #5D8000",
+"$$	c #A6B778",
+"%$	c #DADADA",
+"&$	c #E2E9D9",
+"*$	c #C4CE8B",
+"=$	c #E7D590",
+"-$	c #EFC68F",
+";$	c #F1B18C",
+">$	c #F29D8A",
+",$	c #ED988B",
+"'$	c #E59A8C",
+")$	c #DE9B8E",
+"!$	c #D39D91",
+"~$	c #C0A098",
+"{$	c #BAA0B2",
+"]$	c #B89FD0",
+"^$	c #B69FEE",
+"/$	c #B7A8F7",
+"($	c #BBB7F7",
+"_$	c #BFC6F6",
+":$	c #C4DEF4",
+"<$	c #C8F4EC",
+"[$	c #BBEFC5",
+"}$	c #ACE49A",
+"|$	c #ABD890",
+"1$	c #A9C884",
+"2$	c #A7BA7A",
+"3$	c #A7B878",
+"4$	c #CCD4B4",
+"5$	c #F4F4F4",
+"6$	c #F2F2F2",
+"7$	c #DDDEEB",
+"8$	c #AEB0DC",
+"9$	c #A1A4D8",
+"0$	c #B7B9DF",
+"a$	c #E5E6EE",
+"b$	c #B9BBE0",
+"c$	c #EFEFF1",
+"d$	c #BCBDE1",
+"e$	c #B6B8DF",
+"f$	c #DADBEA",
+"g$	c #F0F0F0",
+"h$	c #D9D9D9",
+"i$	c #F5F5F5",
+"j$	c #F3F3F3",
+"k$	c #ABADDC",
+"l$	c #5C61C2",
+"m$	c #A0A2D8",
+"n$	c #B1B3DE",
+"o$	c #9396D4",
+"p$	c #5D62C3",
+"q$	c #F0F0F2",
+"r$	c #3C42B8",
+"s$	c #ECECF0",
+"t$	c #484DBC",
+"u$	c #9295D4",
+"v$	c #9DA0D7",
+"w$	c #D2D3E8",
+"x$	c #D5D5D5",
+"y$	c #D2D2D2",
+"z$	c #D0D0D0",
+"A$	c #CECECE",
+"B$	c #CCCCCC",
+"C$	c #CACACA",
+"D$	c #B0B0B0",
+"E$	c #F8F8F8",
+"F$	c #F6F6F6",
+"G$	c #DFDFED",
+"H$	c #4D52BE",
+"I$	c #E4E5EF",
+"J$	c #EAEAF0",
+"K$	c #EDEDF1",
+"L$	c #4A4FBD",
+"M$	c #DEDFED",
+"N$	c #CDCDCD",
+"O$	c #FDFDFD",
+"P$	c #FEFEFE",
+"Q$	c #F7F7F7",
+"R$	c #AFB1DE",
+"S$	c #7B7FCD",
+"T$	c #EEEEF2",
+"U$	c #484EBC",
+"V$	c #9EA1D8",
+"W$	c #ABAEDD",
+"X$	c #ADAFDD",
+"Y$	c #EEEFF2",
+"Z$	c #FAFAFA",
+"`$	c #F9F9F9",
+" %	c #FCFCFC",
+".%	c #D8D8D8",
+"+%	c #A5A8DB",
+"@%	c #8589D1",
+"#%	c #6367C5",
+"$%	c #4F54BF",
+"%%	c #D8D9EC",
+"&%	c #EFEFF3",
+"*%	c #9EA1D9",
+"=%	c #ADAFDE",
+"-%	c #EFF0F3",
+";%	c #D7D7D7",
+">%	c #C3C5E5",
+",%	c #6569C6",
+"'%	c #565BC1",
+")%	c #D4D5EB",
+"!%	c #E0E1EE",
+"~%	c #C8C8C8",
+"{%	c #EEEEEE",
+"]%	c #D3D3D3",
+"^%	c #F4F4F6",
+"/%	c #6165C5",
+"(%	c #A9ABDD",
+"_%	c #F1F1F5",
+":%	c #5156C0",
+"<%	c #D6D7EC",
+"[%	c #F0F1F5",
+"}%	c #E2E2F0",
+"|%	c #C9C9C9",
+"1%	c #E9E9F3",
+"2%	c #878BD2",
+"3%	c #6368C6",
+"4%	c #696DC7",
+"5%	c #989AD7",
+"6%	c #5E62C4",
+"7%	c #696EC8",
+"8%	c #E6E6F1",
+"9%	c #F7F7F9",
+"0%	c #F4F4F8",
+"a%	c #F8F8F9",
+"b%	c #D4D4D4",
+"c%	c #C5C5C5",
+". + @ @ @ @ # # # # $ $ $ $ % % % % % & & & & * * * * * = - . . ",
+". ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | | 1 1 1 1 1 1 1 2 3 4 . . ",
+". ; 5 6 7 8 9 0 a b c d e f g h i j k k k k k k k k k k l 4 . . ",
+". ; 5 6 m n o p q b c d e f g h i j k k k k k k k k k k l 4 . . ",
+". r s t u v w x y z A B C D E F G H I J K L M N O P Q R S 4 . . ",
+". r T U V W X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.~.{.4 . . ",
+". r U ].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.{.4 . . ",
+". f.U g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.{.4 . . ",
+". f.U ^.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+{.4 . . ",
+". ++ at +#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+4 . . ",
+". ++2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+1+4 . . ",
+". ++r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+1+4 . . ",
+". 1+X R+S+T+U+V+W+X+Y+Z+`+ @. at +@@@#@$@%@&@*@=@-@;@>@,@'@1+4 . . ",
+". 1+)@!@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@1+4 . . ",
+". {.Y c at d@e at f@g at h@i at j@k at l@m at n@o at p@q at r@s at t@u at v@w at x@y at z@A at ++4 . . ",
+". {.B at C@D at E@F at G@H at I@J at K@L at M@N at O@P at Q@R at S@T at U@V at W@X at Y@Z@`@++4 . . ",
+". {. #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#++4 . . ",
+". [#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#++4 . . ",
+". [#o#p#q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#++4 . . ",
+". [#O#P#Q#R#S#2.3.Q.T#6.U#V#W#X#Y#b.c.d.Z#`# $.$+$@$#$$$++4 . . ",
+". %$&$*$=$-$;$>$,$'$)$!$~${$]$^$/$($_$:$<$[$}$|$1$2$3$4$++4 . . ",
+". %$5$6$6$7$8$9$0$a$6$6$b$c$6$d$e$e$e$f$4 g$g$g$g$g$g$g$1+4 . . ",
+". h$i$j$k$l$m$n$o$p$q$j$r$s$j$t$u$v$v$w$x$y$z$A$B$C$C$C$D$E$. . ",
+". h$F$G$H$I$5$5$5$J$j$5$r$K$5$L$M$5$5$5$N$O$O$P$. . . 1+r . . . ",
+". h$Q$R$S$i$i$5$5$5$i$i$r$T$i$U$V$W$X$Y$B$Z$E$`$Z$ %{.r . . . . ",
+". .%E$+%@%F$F$R$#%$%%%F$r$&%F$U$*%W$=%-%C$Q$j$5$i$;%r . . . . . ",
+". .%E$>%,%i$F$F$F$'%)%F$r$&%F$L$!%F$F$F$~%j$@ {%]%f.. . . . . . ",
+". .%E$^%/%(%^%E$_%:%<%E$r$[%E$L$}%E$E$E$|%g$* A$f.. . . . . . . ",
+". .%`$E$1%2%3%4%4%5%[%E$6%_%E$7%8%E$E$E$|%@ |%f.. . . . . . . . ",
+". .%Z$Z$Z$Z$9%0%a%Z$Z$Z$Z$Z$Z$Z$Z$Z$Z$Z$C$y$f.. . . . . . . . . ",
+". b%++++++++++++++++++++++++++++++++++++c%r . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/GRIB.xpm b/share/metview/icons/GRIB.xpm
new file mode 100644
index 0000000..24950ea
--- /dev/null
+++ b/share/metview/icons/GRIB.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * GRIB_icon[] = {
+/* noname pixmap
+ * width height ncolors chars_per_pixel */
+"32 32 6 1",
+" 	c white",
+".	s c0	c darkgreen",
+"X	s c4	c snow1",
+"o	s c2	c lightblue",
+"O	s c5	c MediumSpringGreen",
+"+	s c3	c khaki",
+/* pixels */
+"            ........            ",
+"         ...XXXXXXXX...         ",
+"       .....ooXXXXXXXoo..       ",
+"      ....o..oooXXXXXooo..      ",
+"     ..O.oo....ooXXXoooo.O.     ",
+"    .O..ooo.O..oooXXoooo.oo.    ",
+"   ...........ooooXoooooooo..   ",
+"  ..X...O....ooo.ooooooOo.....  ",
+"  .X....O...o..ooooooooo..OOO.  ",
+" ..X...O.OO...oooooooooooo..... ",
+" ...X..O.O...ooooooooooo....o.. ",
+" .o.....O.O.oooooooooooo..oo.o. ",
+".oo.........ooooooooooooooooooo.",
+".ooo...oooo.oooooooooooo....ooo.",
+".oooo..ooooooooooooooooo........",
+".ooooo..ooooooooooooooo..++.+.++",
+".oooooo.....oooooooooo...+.+++.+",
+".oooo........ooooooooo..++++++++",
+".oooo..X..O...oooooooo...+.+..++",
+".oooo..X....O..oooooooo.........",
+" .oooo..X...O..ooooooooooo..... ",
+" .oooooo.X..O..ooooooooooo.OO.. ",
+" .oooooo..X...ooooooooooooo..O. ",
+"  .oooooo.X...ooooooooooooo...  ",
+"  ..ooooo.X..oooooooooooooo...  ",
+"   .ooooo...oooooooooooooo...   ",
+"    .oooo..ooooooooooooooo..    ",
+"     .ooo..oooooooooooooo..     ",
+"      ..oo.ooooooooooooo..      ",
+"       ..oooooooooooooo..       ",
+"         ...oooooooo...         ",
+"            ........            "};
diff --git a/share/metview/icons/GRIBVECTORS.xpm b/share/metview/icons/GRIBVECTORS.xpm
new file mode 100755
index 0000000..d47693e
--- /dev/null
+++ b/share/metview/icons/GRIBVECTORS.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * VECTORS_icon[] = {
+"32 32 12 1",
+" 	c #FFFFFFFFFFFF",
+".	c #00000000DDDD",
+"X	c #9999FFFFFFFF",
+"o	c #00009999FFFF",
+"O	c #555555555555",
+"+	c #EEEEEEEEEEEE",
+"@	c #3333FFFF9999",
+"#	c #333399996666",
+"$	c #0000BBBB0000",
+"%	c #FFFFCCCC9999",
+"&	c #FFFF66663333",
+"*	c #DDDD00000000",
+"    .                           ",
+"   Xo.                          ",
+"  XXo..OOOOOOOOOOOOOOOOOOOOOOO  ",
+" XXooo..+++++++++++++++++++++O  ",
+"XXooooo..++++++++++++++++++++O  ",
+" O+Xo.++++++++++++++@@@@@@#++O  ",
+" O+Xo.+++++++++++++++@@@$$#++O  ",
+" O+Xo.++++++++++++++++$$$$#++O  ",
+" O+Xo.++++++++++++++++@$$##++O  ",
+" O+Xo.+++++++++++++++@$#$##++O  ",
+" O+Xo.++++++++++++++@$#++##++O  ",
+" O+Xo.+++++++++++++@$#++++#++O  ",
+" O+Xo.++++++++++++@$#++++++++O  ",
+" O+Xo.+++++++++++@$#+++++++++O  ",
+" O+Xo.++++++++++@$#++++++++++O  ",
+" O+Xo.+++++++++@$#+++++++++++O  ",
+" O+Xo.++++++++@$#++++++++++++O  ",
+" O+Xo.+++++++@$#+++++++++++++O  ",
+" O+Xo.++++++@$#++++++++++++++O  ",
+" O+Xo.+++++@$#+++++++++++++++O  ",
+" O+Xo.++++@$#++++++++++++++++O  ",
+" O+Xo.+++@$#+++++++++++++++++O  ",
+" O+Xo.++@$#++++++++++++++++++O  ",
+" O+Xo.+@$#+++++++++++++++++%+O  ",
+" O+Xo.@$#++++++++++++++++++%%O  ",
+" O+Xo@$#+++++++++++++++++++&%%  ",
+"%%%%@$#%%%%%%%%%%%%%%%%%%%%&&%% ",
+"&&&@$#&&&&&&&&&&&&&&&&&&&&&&&&&*",
+"**@$#**********************&&** ",
+" @$#o.+++++++++++++++++++++&**  ",
+"@$#Xo.OOOOOOOOOOOOOOOOOOOOO**   ",
+"$# Xo.                     *    "};
diff --git a/share/metview/icons/GRIB_TO_GEO.xpm b/share/metview/icons/GRIB_TO_GEO.xpm
new file mode 100644
index 0000000..456879f
--- /dev/null
+++ b/share/metview/icons/GRIB_TO_GEO.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char *GRIB_TO_GEO[]={
+"32 32 5 1",
+"a c #0000ff",
+". c #303030",
+"# c #dcdcdc",
+"c c #ff0000",
+"b c #ffffc0",
+"................................",
+".####a####a####..bbbbbbbbbbbbbb.",
+".####a####a####..bbcbbbbbbcbbbb.",
+".####a####a####..bcccbbbbcccbbb.",
+".####aa####a###..bbcbbbbbbcbbbb.",
+".#####a#####aa#..bbbbbbbbbbbbbb.",
+".######a######a..bbbbbbbbbbbbbb.",
+".#######a######..bbbbbbbbbbbbbb.",
+".########aaa###..bbbbbbbbbbbbbb.",
+".a##########aaa..bbbbbbbbbbbbbb.",
+".#a#############bbbbcbbbbbbcbbb.",
+".##a###########b#bbcccbbbbcccbb.",
+".###a##########abbbbcbbbbbbcbbb.",
+".###a####aaa###baabbbbbbbbbbbbb.",
+".###a#####aaaaaaaaaabbbbbbbbbbb.",
+".###a######aaaaaaaaaaabbbbbbbbb.",
+".###a######aaaaaaaaaaabbbbbbbbb.",
+".###a#####aaaaaaaaaabbbbbbbbbbb.",
+".##a#####aaa###baabbbcbbbbbbcbb.",
+".##a###########abbbbcccbbbbcccb.",
+".##a###########b#bbbbcbbbbbbcbb.",
+".#a#############bbbbbbbbbbbbbbb.",
+".#a############..bbbbbbbbbbbbbb.",
+".a##########aaa..bbbbbbbbbbbbbb.",
+".#######aaaa###..bbbbbbbbbbbbbb.",
+".####aaa#######..bbbbbbbbbbbbbb.",
+".###a##########..bbbbbcbbbbbbcb.",
+".#aa#########aa..bbbbcccbbbbccc.",
+".a########aaa##..bbbbbcbbbbbbcb.",
+".#######aa#####..bbbbbbbbbbbbbb.",
+".######a#######..bbbbbbbbbbbbbb.",
+"................................"};
diff --git a/share/metview/icons/GeoToKML.xpm b/share/metview/icons/GeoToKML.xpm
new file mode 100755
index 0000000..557d24f
--- /dev/null
+++ b/share/metview/icons/GeoToKML.xpm
@@ -0,0 +1,446 @@
+/* XPM */
+static char * GeoToKML_xpm[] = {
+"32 32 411 2",
+"  	c #FFFFFF",
+". 	c #003400",
+"+ 	c #253F8A",
+"@ 	c #3144A1",
+"# 	c #375184",
+"$ 	c #000000",
+"% 	c #FFF7F7",
+"& 	c #C3BFD9",
+"* 	c #BFB9D3",
+"= 	c #C3BDD3",
+"- 	c #BEB7CF",
+"; 	c #B1B3D0",
+"> 	c #979BC4",
+", 	c #727AB5",
+"' 	c #3D4AA3",
+") 	c #263893",
+"! 	c #253C72",
+"~ 	c #7CBAD2",
+"{ 	c #4082B8",
+"] 	c #8585BE",
+"^ 	c #9997C5",
+"/ 	c #BAB4CE",
+"( 	c #D4D3DE",
+"_ 	c #E9E6E5",
+": 	c #EEEAE5",
+"< 	c #E0DDDC",
+"[ 	c #B6B6C9",
+"} 	c #6169A6",
+"| 	c #2F3C96",
+"1 	c #2E4568",
+"2 	c #84C1D6",
+"3 	c #145AAB",
+"4 	c #145AA9",
+"5 	c #155AA8",
+"6 	c #363EA0",
+"7 	c #434FA7",
+"8 	c #787FB8",
+"9 	c #BBBCD0",
+"0 	c #E8E3E0",
+"a 	c #E4E0DD",
+"b 	c #D7D3D5",
+"c 	c #AAAAC0",
+"d 	c #3D4794",
+"e 	c #243791",
+"f 	c #00F76C",
+"g 	c #175DAE",
+"h 	c #1A55AB",
+"i 	c #2939A6",
+"j 	c #23339C",
+"k 	c #213095",
+"l 	c #636BAA",
+"m 	c #BCBCCD",
+"n 	c #E0DBD9",
+"o 	c #DDD8D8",
+"p 	c #D0CBCE",
+"q 	c #7276A2",
+"r 	c #233176",
+"s 	c #175EB2",
+"t 	c #1B57B0",
+"u 	c #2B3CAD",
+"v 	c #2839A4",
+"w 	c #27369D",
+"x 	c #223092",
+"y 	c #394596",
+"z 	c #B4B3C6",
+"A 	c #DDD8D7",
+"B 	c #D9D4D4",
+"C 	c #D3CECF",
+"D 	c #696D9A",
+"E 	c #212F70",
+"F 	c #FF0000",
+"G 	c #5B9AC5",
+"H 	c #2A70B9",
+"I 	c #1A5BB3",
+"J 	c #2C41B3",
+"K 	c #2A3CAC",
+"L 	c #2939A4",
+"M 	c #26359A",
+"N 	c #233191",
+"O 	c #2D3A8C",
+"P 	c #A0A0BB",
+"Q 	c #DAD5D4",
+"R 	c #D5D0D0",
+"S 	c #D0CACB",
+"T 	c #6F729A",
+"U 	c #1E2D77",
+"V 	c #7DB9CE",
+"W 	c #7DB8CD",
+"X 	c #6AA7C8",
+"Y 	c #04360B",
+"Z 	c #2B44B9",
+"` 	c #2B3DB1",
+" .	c #2A3AA9",
+"..	c #27379E",
+"+.	c #253496",
+"@.	c #1F2D89",
+"#.	c #37418C",
+"$.	c #CEC9CD",
+"%.	c #D6D1D0",
+"&.	c #D3CDCD",
+"*.	c #C7C1C4",
+"=.	c #383F7E",
+"-.	c #22319F",
+";.	c #7BB6CB",
+">.	c #6AA8C6",
+",.	c #4A6CC2",
+"'.	c #2A3EB6",
+").	c #2B3CAE",
+"!.	c #2838A3",
+"~.	c #23318F",
+"{.	c #1C2983",
+"].	c #696E9E",
+"^.	c #D1CBCD",
+"/.	c #D1CBCC",
+"(.	c #CEC8C8",
+"_.	c #9C9AAA",
+":.	c #252E71",
+"<.	c #7BB6CC",
+"[.	c #7AB5CB",
+"}.	c #7AB5C9",
+"|.	c #87B1CD",
+"1.	c #4256BD",
+"2.	c #283BB0",
+"3.	c #2939A5",
+"4.	c #27369C",
+"5.	c #243291",
+"6.	c #212E88",
+"7.	c #293481",
+"8.	c #9F9EB5",
+"9.	c #CBC5C6",
+"0.	c #C0BBBC",
+"a.	c #555883",
+"b.	c #1D217A",
+"c.	c #7BB7CC",
+"d.	c #79B4CA",
+"e.	c #78B3C9",
+"f.	c #82B8CA",
+"g.	c #ACBFD3",
+"h.	c #5E6ABD",
+"i.	c #2637A7",
+"j.	c #27369E",
+"k.	c #243393",
+"l.	c #222F89",
+"m.	c #1C297C",
+"n.	c #2E377D",
+"o.	c #BCB8C0",
+"p.	c #CBC5C5",
+"q.	c #C4BFBE",
+"r.	c #9F9BA6",
+"s.	c #1A2370",
+"t.	c #64A5D0",
+"u.	c #73B0CB",
+"v.	c #7AB5CA",
+"w.	c #77B2C8",
+"x.	c #76B1C6",
+"y.	c #8FBBCA",
+"z.	c #C7CAD6",
+"A.	c #515EB3",
+"B.	c #24349E",
+"C.	c #1F2B7E",
+"D.	c #192473",
+"E.	c #545988",
+"F.	c #BDB8BD",
+"G.	c #C2BDBC",
+"H.	c #BBB5B5",
+"I.	c #272E66",
+"J.	c #0000FF",
+"K.	c #63A2C8",
+"L.	c #76B1C8",
+"M.	c #77B2C6",
+"N.	c #76B0C5",
+"O.	c #FE0505",
+"P.	c #F06968",
+"Q.	c #D2D1D5",
+"R.	c #777EB6",
+"S.	c #243293",
+"T.	c #202E89",
+"U.	c #1D2774",
+"V.	c #172167",
+"W.	c #383E72",
+"X.	c #9593A1",
+"Y.	c #77768B",
+"Z.	c #131A52",
+"`.	c #1F2986",
+" +	c #4C8EC3",
+".+	c #74AFC5",
+"++	c #FA1F1F",
+"@+	c #E1BBBB",
+"#+	c #D6D1D4",
+"$+	c #787DAF",
+"%+	c #243189",
+"&+	c #1E2A7D",
+"*+	c #1C2773",
+"=+	c #192268",
+"-+	c #151D5D",
+";+	c #1D2358",
+">+	c #181E52",
+",+	c #131950",
+"'+	c #172066",
+")+	c #286FBD",
+"!+	c #3075BB",
+"~+	c #ED6464",
+"{+	c #D7D2D2",
+"]+	c #D8D2D1",
+"^+	c #A8A6BC",
+"/+	c #353E85",
+"(+	c #1A2570",
+"_+	c #192266",
+":+	c #171F5D",
+"<+	c #141A51",
+"[+	c #13194E",
+"}+	c #13194F",
+"|+	c #131A56",
+"1+	c #2A71BE",
+"2+	c #256CBB",
+"3+	c #1E65B7",
+"4+	c #1C63B4",
+"5+	c #91B8C6",
+"6+	c #D6D0D1",
+"7+	c #D4CECF",
+"8+	c #D4CECE",
+"9+	c #ADABBA",
+"0+	c #505689",
+"a+	c #131D61",
+"b+	c #151D5A",
+"c+	c #141A50",
+"d+	c #121850",
+"e+	c #77B5D2",
+"f+	c #286EBC",
+"g+	c #2369B9",
+"h+	c #1F65B7",
+"i+	c #1960B4",
+"j+	c #175DB0",
+"k+	c #1B5FA9",
+"l+	c #578BB4",
+"m+	c #C8C4CB",
+"n+	c #D0C9CA",
+"o+	c #CBC4C5",
+"p+	c #C8C2C1",
+"q+	c #818098",
+"r+	c #343969",
+"s+	c #10174D",
+"t+	c #12184E",
+"u+	c #2E74BC",
+"v+	c #1C63B5",
+"w+	c #1960B3",
+"x+	c #165CAD",
+"y+	c #155BA8",
+"z+	c #1459A4",
+"A+	c #19529E",
+"B+	c #4D579D",
+"C+	c #A7A5BA",
+"D+	c #CFC8C8",
+"E+	c #C7C2C2",
+"F+	c #C1BBBC",
+"G+	c #BCB6B6",
+"H+	c #A5A1A7",
+"I+	c #66667F",
+"J+	c #343861",
+"K+	c #191E51",
+"L+	c #131954",
+"M+	c #175EB0",
+"N+	c #175DAF",
+"O+	c #165CAC",
+"P+	c #1358A1",
+"Q+	c #164C98",
+"R+	c #202D87",
+"S+	c #1D297D",
+"T+	c #454C87",
+"U+	c #918FA5",
+"V+	c #B1ADB2",
+"W+	c #B9B3B2",
+"X+	c #B3ADAD",
+"Y+	c #AFA9A8",
+"Z+	c #ABA6A4",
+"`+	c #6B6A7E",
+" @	c #171E5F",
+".@	c #165BAA",
+"+@	c #155AA7",
+"@@	c #13579D",
+"#@	c #174894",
+"$@	c #202C82",
+"%@	c #1D2978",
+"&@	c #19246F",
+"*@	c #20286A",
+"=@	c #3D4272",
+"-@	c #78778C",
+";@	c #9D999F",
+">@	c #ACA7A3",
+",@	c #585973",
+"'@	c #192376",
+")@	c #145AA4",
+"!@	c #1458A2",
+"~@	c #1357A0",
+"{@	c #12569C",
+"]@	c #125599",
+"^@	c #16458E",
+"/@	c #1E2A7A",
+"(@	c #1C2771",
+"_@	c #1A246A",
+":@	c #182061",
+"<@	c #151C58",
+"[@	c #0E154D",
+"}@	c #141B4F",
+"|@	c #31355F",
+"1@	c #4B4D6D",
+"2@	c #252A59",
+"3@	c #1358A0",
+"4@	c #13579E",
+"5@	c #115598",
+"6@	c #115495",
+"7@	c #144489",
+"8@	c #1D2773",
+"9@	c #1A246B",
+"0@	c #192164",
+"a@	c #161E5B",
+"b@	c #141B53",
+"c@	c #12194E",
+"d@	c #141B59",
+"e@	c #3072AB",
+"f@	c #12569A",
+"g@	c #115496",
+"h@	c #105393",
+"i@	c #105290",
+"j@	c #134282",
+"k@	c #182163",
+"l@	c #171F5C",
+"m@	c #141B54",
+"n@	c #18215C",
+"o@	c #5E9DC1",
+"p@	c #145797",
+"q@	c #105394",
+"r@	c #105392",
+"s@	c #0F518F",
+"t@	c #0E508C",
+"u@	c #B40C23",
+"v@	c #151C55",
+"w@	c #11174D",
+"x@	c #0F154C",
+"y@	c #171C50",
+"z@	c #7DBAD0",
+"A@	c #417FA8",
+"B@	c #236497",
+"C@	c #1A5B92",
+"D@	c #13558C",
+"E@	c #9B0F2B",
+"F@	c #19205C",
+"G@	c #181E55",
+"H@	c #181F52",
+"I@	c #1E2354",
+"J@	c #292D5A",
+"K@	c #444768",
+"L@	c #666679",
+"M@	c #2E325D",
+"N@	c #16216D",
+"O@	c #74B0C5",
+"P@	c #5F99B1",
+"Q@	c #5792AC",
+"R@	c #4E89A6",
+"S@	c #C13B45",
+"T@	c #79788C",
+"U@	c #777688",
+"V@	c #7B7A88",
+"W@	c #85838C",
+"X@	c #8E8B90",
+"Y@	c #969392",
+"Z@	c #606075",
+"`@	c #131B51",
+" #	c #639EB2",
+".#	c #5E98AD",
+"+#	c #5D96AC",
+"@#	c #6798A9",
+"##	c #B9908E",
+"$#	c #A7A2A0",
+"%#	c #A19D9B",
+"&#	c #959293",
+"*#	c #848289",
+"=#	c #51526D",
+"-#	c #181F5A",
+";#	c #609CB5",
+">#	c #508BA4",
+",#	c #598DA3",
+"'#	c #80919E",
+")#	c #928E95",
+"!#	c #88868F",
+"~#	c #717181",
+"{#	c #595A73",
+"]#	c #383B62",
+"^#	c #232756",
+"/#	c #151C59",
+"(#	c #508EAF",
+"_#	c #0A4475",
+":#	c #102E61",
+"<#	c #141B50",
+"[#	c #12184D",
+"}#	c #0F164C",
+"|#	c #0E144B",
+"1#	c #12184F",
+"2#	c #151D52",
+"3#	c #1E517E",
+"4#	c #102256",
+"5#	c #1B2270",
+"6#	c #80BDD3",
+"7#	c #395D87",
+"8#	c #131A4F",
+"9#	c #12194F",
+"0#	c #151C5A",
+"a#	c #18215B",
+"b#	c #536E5F",
+"c#	c #151D5E",
+"d#	c #1C2578",
+"                        . . . . . + @ # $ $                     ",
+"                  . . . % & * = - ; > , ' ) ! $                 ",
+"              . . . . . ~ { ] ^ / ( _ : < [ } | 1 $             ",
+"            . . . . 2 . . 3 4 5 6 7 8 9 0 a b c d e $           ",
+"          . . f . 2 2 . . . . g h i j k l m n o p q r $         ",
+"        . f . . 2 2 2 . f . . s t u v w x y z A B C D E $       ",
+"      . . . . F F . . . . . G H I J K L M N O P Q R S T U $     ",
+"    . . % . F F F F . . . V W X Y Z `  ...+. at .#.$.%.&.*.=.-.    ",
+"    . % . . F F F F . . V . . ;.>.,.'.).!.M ~.{.].^./.(._.:.$   ",
+"  . . % . . . F F f f . . . <.[.}.|.1.2.3.4.5.6.7.8.&.9.0.a.b.  ",
+"  . . . % . . f . f . . . c.[.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.$ ",
+"  . 2 . . . . . f . f . t.u.v.e.w.x.y.z.A.B.k.l.C.D.E.F.G.H.I.$ ",
+". 2 2 . . . . . . . . . J.J.K.L.M.N.O.P.Q.R.S.T.C.U.V.W.X.Y.Z.`.",
+". 2 2 2 . . . 2 2 2 2 J.J.J.J. +.+F F ++ at +#+$+%+&+*+=+-+;+>+,+'+",
+". 2 2 2 2 . . 2 2 2 2 J.J.J.J.)+!+F F F ~+{+]+^+/+(+_+:+<+[+}+|+",
+". 2 J.J.2 2 . . 2 2 2 2 J.J.1+2+3+4+F F 5+6+7+8+9+0+a+b+c+[+[+d+",
+". J.J.J.J.2 2 . . . . . e+f+g+h+i+j+3 k+l+m+8+n+o+p+q+r+[+s+t+d+",
+". J.J.J.J.. . . . . . . . u+v+w+j+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+",
+". 2 J.J.2 . . % . . f . . . M+N+O+y+z+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @",
+". 2 2 2 2 . . % . . . . f . . . at +@z+P+@@#@$@%@&@*@=@-@;@Z+>@,@'@",
+"  . 2 2 2 2 . . % . . . f . . )@!@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@$ ",
+"  . 2 2 2 2 2 2 . % . . f . . 3 at 4@{@5 at 6@7 at 8@9 at 0@a at b@[+c at s+s+d@$ ",
+"  . 2 2 2 2 F F . . % . . . e at f@5 at g@h at i@j at 9@k at l@m@}+[+[+[+[+n@  ",
+"    . 2 2 F F F F . % . . . o at p@q at r@s at t@u at 0@l at v@}+[+w at x@y at t+$   ",
+"    . . 2 F F F F . % . . 2 z at A@B at C@D at F E at F@G at H@I at J@K at L@M at N@    ",
+"      . 2 2 F F 2 . . . 2 2 2 O at P@Q at R@F S at T@U at V@W at X@Y at Z@`@$     ",
+"        . 2 2 2 2 . . 2 2 J.J.c. #.#+#@###Z+$#%#&#*#=#-#$       ",
+"          . 2 2 2 . . 2 J.J.J.J.;#>#,#'#)#!#~#{#]#^#/#$         ",
+"            . . 2 2 . 2 J.J.J.J.(#_#:#<#[#}#|#x at 1#2#$           ",
+"              . . 2 2 2 2 J.J.2 z at 3#4#c@[+[+[+t+5#$             ",
+"                  . . . 2 2 2 2 6#7#8#[+9#0#a#$                 ",
+"                        . . . . . b#c#d#$ $                     "};
diff --git a/share/metview/icons/HOVMOELLERDATA.xpm b/share/metview/icons/HOVMOELLERDATA.xpm
new file mode 100755
index 0000000..5fd516b
--- /dev/null
+++ b/share/metview/icons/HOVMOELLERDATA.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *HOVMOELLERDATA[]={
+"32 32 7 1",
+"c c #000000",
+"d c #007fff",
+"a c #777777",
+"b c #ccccff",
+"e c #d9b777",
+"# c #ff00ff",
+". c #ffffff",
+"................................",
+"................................",
+"................................",
+"................................",
+".....###........................",
+"......###.......................",
+"........###.....................",
+".........###aaaaaaaaaaa.........",
+".....aaaabb###bbbbbbbbbaaaa.....",
+"..aaabbbbbbbb##bbbbbbbbbbbbaaa..",
+".abbbbbbbbbbbb##bbbbbbbbbbbbbba.",
+"abbbbbbbbbbbbbb##bbbbbbbbbbbbbba",
+"bbbbbbbbbaaaaaaa##aaaaabbbbbbbbb",
+"bbbbbaaaabbbbbbbb##bbbbaaaabbbbb",
+"bbaaabbbbbbbbbbbbb##bbbbbbbaaabb",
+"babbbbbbbbbbbbbbbbb##bbbbbbbbbab",
+"abbbbbbbbbbbbbbbbbbb##bbbbbbbbba",
+"bbbbbbbbbaaaaaaaaaaaa#abbbbbbbbb",
+"bbbbbaaaabbbbbbbbbbbb##aaaabbbbb",
+"bbaaabbbbbbbbbbbbbbbbb##bbbaaabb",
+"babbbbbbbbbbbbbbbbbbbbb##bb#bbab",
+"abbbbbbbbbbbbbbbbbbbbbb##b##bbba",
+"bbbbbbbbbaaaaaaaaaaaaaa#####bbbb",
+"bbbbbaaaabbbbbbbbbbbbbbb####bbbb",
+"bbaaabbbbbbbbbbbbbbbbbb#####aabb",
+"babbbbbbbbbbbbbbbbbbbb######bbab",
+"abbbbbbbbbbbbbbbbbbbb#######bbba",
+"bbbbbbbbbccccccccccccccbbbbbbbbb",
+"bbbbbccccddddddeeeeeeeecccccbbbb",
+"bbcccdddddddddeeeeeeeeeeeeecccbb",
+"bcddddddddddeeeeeeeeeeeeeeeeeecb",
+"cddddddddddeeeeeeeeeeeeeeeeeeeec"};
diff --git a/share/metview/icons/INPUTVISUALISER.xpm b/share/metview/icons/INPUTVISUALISER.xpm
new file mode 100755
index 0000000..433b418
--- /dev/null
+++ b/share/metview/icons/INPUTVISUALISER.xpm
@@ -0,0 +1,153 @@
+/* XPM */
+static char *INPUTVISUALISER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 115 2",
+"   c #1D54204D1A68",
+".  c #27122B07267E",
+"X  c #2A412D4128B8",
+"o  c #2D5A31F22D2F",
+"O  c #313633EE2EA7",
+"+  c #3129359730CB",
+"@  c #35E239D134F5",
+"#  c #39963C3D36F8",
+"$  c #3A613E073923",
+"%  c #3D3C41373BD8",
+"&  c #402B42E23D9B",
+"*  c #3E46455D5610",
+"=  c #421146C34202",
+"-  c #441948274351",
+";  c #48EF4B7745CD",
+":  c #46524ED04C5B",
+">  c #4C194EF24984",
+",  c #4F1052844DBC",
+"<  c #504452C94D3D",
+"1  c #546E56A050E1",
+"2  c #574159CD5514",
+"3  c #5D9B5D9B5D9B",
+"4  c #5EDD60665A58",
+"5  c #607962245CEA",
+"6  c #4EBE54F5636B",
+"7  c #5065567064EF",
+"8  c #589C5E506B76",
+"9  c #594F632A61F4",
+"0  c #6350637B6317",
+"q  c #6C6A6CDB6C2B",
+"w  c #612A6638726F",
+"e  c #742274C173B0",
+"r  c #76E8789173E2",
+"t  c #7A6F7B627611",
+"y  c #7D487D787D2D",
+"u  c #E60935B0354F",
+"i  c #E6253CB83C47",
+"p  c #E63D4D364C62",
+"a  c #E65650554F8C",
+"s  c #E6635351526D",
+"d  c #E66A5C435B0E",
+"f  c #E6C060925F96",
+"g  c #E68B62C3613F",
+"h  c #E67F6DEA6C84",
+"j  c #E6AE70746EBE",
+"k  c #E6BB78477675",
+"l  c #E6AD7ABD790A",
+"z  c #81BB83657FD3",
+"x  c #E6EE81197F03",
+"c  c #786F8454858B",
+"v  c #8425846483E6",
+"b  c #8800893B85FC",
+"n  c #890388FC838E",
+"m  c #8C038C4D8B8F",
+"M  c #904C90918FFF",
+"N  c #8EF09C3A9F43",
+"B  c #9405941793EC",
+"V  c #97E098ED9720",
+"C  c #9C9A9CBD9C7E",
+"Z  c #9FCEA1589E8A",
+"A  c #A444A3539E54",
+"S  c #8FEB9D36A042",
+"D  c #90D29E33A149",
+"F  c #98F89AA3A0C0",
+"G  c #9F5FA0C7A620",
+"H  c #A42EA44EA45B",
+"J  c #A858A765A25B",
+"K  c #AB28AA2EA53A",
+"L  c #A49CA5C5AA5B",
+"P  c #AC45AC61AC61",
+"I  c #AFBBAF8EB078",
+"U  c #A7A9B6D5BBAA",
+"Y  c #A8A8B7D4BCB2",
+"T  c #B2F0B2EDB30C",
+"R  c #BBF4BBF7BBF2",
+"E  c #E6C385D883BA",
+"W  c #E6E1899D87A4",
+"Q  c #E7168E0F8C0B",
+"!  c #E72391FE8FD3",
+"~  c #E8879602938A",
+"^  c #E7159EE49C44",
+"/  c #E6F3A2B89FF1",
+"(  c #E74AA7FEA55C",
+")  c #E9E0A847A57D",
+"_  c #E74DABE5A929",
+"`  c #E956ADA7AA99",
+"'  c #E837B7FDB4DF",
+"]  c #E77BB8F9B603",
+"[  c #E77ABC22B8FF",
+"{  c #C486C476C43D",
+"}  c #C8E4C9B3C825",
+"|  c #CC3DCC4CCC11",
+" . c #D507D00BCE84",
+".. c #D376D1AED022",
+"X. c #D3D5D376D317",
+"o. c #D822D869D7C4",
+"O. c #DCD0DC52DB7F",
+"+. c #E783C652C2F1",
+"@. c #E78DCB61C7E9",
+"#. c #E79ACEF7CB7A",
+"$. c #E7B5D2B5CF0A",
+"%. c #E7B5D6E4D313",
+"&. c #EA5FD7BBD42D",
+"*. c #E7C1DA6FD6AB",
+"=. c #E7C8DE04DA2A",
+"-. c #EA70DE39DA66",
+";. c #E73FE300DF37",
+":. c #E8FFE3AFDF97",
+">. c #E618E502E305",
+",. c #E9EBE719E308",
+"<. c #EC0AE972E57B",
+"1. c #ECA7ECA7ECA7",
+"2. c #F080F0B9F033",
+"3. c #F4D1F4D3F4CD",
+"4. c #FF7DFF7EFF7D",
+/* pixels */
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.",
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.",
+"4.4.4.T } 4.1.| X.C T 3.4.| o.C { 4.>.V C o.4.>.X.R C 3.4.>.H V ",
+"4.4.X.0 V 4.{ H b R v X.1.B O.B B 4.{ y | 1.4.P { } q >.4.m L | ",
+"4.3.C C C 4.C X.C r r >.} P 4.{ V 4.X.y y { 3.B 1.3.v >.1.3 b y ",
+"4.R e r q O.B >.v R m { H X.4.{ V 4.4.3.{ y o.C 4.3.v >.1.3 O.V ",
+"4.1.| B b { H 3.y K y T B 3.1.B q O.O.R m V T R 4.} 3 P 3.B H e ",
+"4.4.4.1.>.R X.4.>.T } o.T 4.1.R T O.>.T R 1.P >.4.X.T { 3.1.R { ",
+"4.4.4.4.4.3.4.4.4.4.4.4.3.4.4.4.4.4.4.4.4.4.3.4.4.4.4.4.4.4.4.4.",
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.",
+"4.4.O.K { 4.3.X.{ P K >.4.o.<.R T 1.4.>.>.{ L >.4.3.o.o.H } 4.4.",
+"4.1.v T X.4.} K o.R 0 O.1.M V b m V 2.V V e C t >.R B e C e X.4.",
+"4.{ 3 m P 4.H X.4.X.b >.r # $ & = # < # # $ , O > & $ + < @ 2 } ",
+"4.{ q O.e X.B 1.4.C R C - A P K K K K K P K K K K K K K K K 4 2 ",
+"4.>.y T e R H 4.1.y 1.t r } L ;.,.,.,.-.) &.,.,.,.,.,.,.,.<.J % ",
+"4.4.| H X.T | 4.1.| 4.t t G w O.,.>.,./ u ( ,.>.>.>.>.>.>.,.J % ",
+"4.4.4.4.4.3.4.4.4.4.4.t t H w O.,.>.$.d i x >.>.*.:.>.>.>.,.J % ",
+"4.4.4.4.4.4.4.4.4.4.4.t t L w O.,.>.Q f ! g %.^ d ^ ;.>.>.,.J % ",
+"4.3.{ R 1.4.3.O.X.R | e t L w O.,.+.a _ +.p j s x s W =.>.,.J % ",
+"4.3.R H m 4.| H b C } e t L w O.:.l h =.*.d s ] ,.] d k *.,.J % ",
+"4.4.>.V m 4.L } m v P e t L w O.' p [ ,.>.+. at .,.>.,.+.E #.<.J % ",
+"4.4.>.C b <.B 1.1.O.e - t L w O.` ~ :.,.,.,.,.,.,.,.,.:.,.<.J % ",
+"4.3.O.{ e { C 4.O.o.e ; t L 8 }  . .X.X.X.X.X.X.......X...O.J % ",
+"4.<.C B | R { 4.P m T e t P * 6 7 7 7 7 6 6 6 6 6 6 6 6 6 F K % ",
+"4.4.4.4.4.3.4.4.4.4.4.v 5 { P P P P P P P I I T T T T T T { n - ",
+"4.4.4.4.4.4.4.4.4.4.4.| ; ; 1 1 1 1 1 > ; ; ; ; < 1 1 1 1 < % V ",
+"4.3.X.} 3.4.o.| 1.4.4.1.O.H v m b e z >   o X   5 m m b r B | 4.",
+"4.>.H m B 3.T C b 3.>.H { < % = = % % @ o + + o $ - - = % % z 3.",
+"4.4.4.X.y 3.3.T y 3.R T r 9 U U U U U Y Y Y Y Y U U U U Y D % { ",
+"4.4.1.m } 4.<.C v 1.C | 1 : N N S D D N N N N S D S N D D c % | ",
+"4.1.y H 1.3.>.O.e } V 1.C q @ , # X $ ; % > 1 $ . % , + + @ Z 3.",
+"4.o.q v H ,.B t H { L 4.4.3.H O.C 0 e P m o.>.v 0 M >.H 0 P 4.4."
+};
diff --git a/share/metview/icons/JPEG.xpm b/share/metview/icons/JPEG.xpm
new file mode 100644
index 0000000..652250c
--- /dev/null
+++ b/share/metview/icons/JPEG.xpm
@@ -0,0 +1,79 @@
+/* XPM */
+static char * JPEG_xpm[] = {
+"32 32 44 1",
+" 	c #FFFFFFFFFFFF",
+".	c #FCFCFDFDFFFF",
+"X	c #FAFAFBFBFFFF",
+"o	c #F8F8FAFAFFFF",
+"O	c #F6F6F8F8FFFF",
+"+	c #F4F4F6F6FFFF",
+"@	c #F2F2F5F5FFFF",
+"#	c #F0F0F3F3FFFF",
+"$	c #EEEEF1F1FFFF",
+"%	c #ECECF0F0FFFF",
+"&	c #EAEAEEEEFFFF",
+"*	c #E8E8ECECFFFF",
+"=	c #E6E6EBEBFFFF",
+"-	c #E4E4E9E9FFFF",
+";	c #E2E2E7E7FFFF",
+":	c #E0E0E6E6FFFF",
+">	c #DEDEE4E4FFFF",
+",	c #DCDCE2E2FFFF",
+"<	c #DADAE1E1FFFF",
+"1	c #D8D8DFDFFFFF",
+"2	c #D6D6DDDDFFFF",
+"3	c #D4D4DCDCFFFF",
+"4	c #D2D2DADAFFFF",
+"5	c #D0D0D8D8FFFF",
+"6	c #CECED7D7FFFF",
+"7	c #CCCCD5D5FFFF",
+"8	c #C8C8D2D2FFFF",
+"9	c #C6C6D0D0FFFF",
+"0	c #C4C4CECEFFFF",
+"q	c #000000000000",
+"w	c #C0C0CBCBFFFF",
+"e	c #C2C2CDCDFFFF",
+"r	c #CACAD3D3FEFE",
+"t	c #BABAC6C6FFFF",
+"y	c #BEBEC9C9FFFF",
+"u	c #B8B8C4C4FFFF",
+"i	c #B4B4C1C1FFFF",
+"p	c #BCBCC8C8FFFF",
+"a	c #B0B0BEBEFFFF",
+"s	c #ACACBABAFFFF",
+"d	c #AAAAB9B9FFFF",
+"f	c #A6A6B5B5FFFF",
+"g	c #A2A2B2B2FFFF",
+"h	c #B2B2BFBFFFFF",
+"                                ",
+"           .XooOOOooX.          ",
+"         XoO+@@###@@+OoX        ",
+"       .oO@#$%%&&&%%$#@Oo.      ",
+"      XO+#%&*==---==*&%#+OX     ",
+"     XO@$&*-;:>>>>>:;-*&$@OX    ",
+"    XO@$&=;>,<11111<,>;=&$@OX   ",
+"   .O@$*-:,<234444432<,:-*$@O.  ",
+"   o+$&-:,1356777776531,:-&$+o  ",
+"  XO#&=:,246789909987642,:=&#OX ",
+"  o@%qqq14qqqqqqqwwe9r6qqqq*%@o ",
+" .O#&qqq36qqqqqqqqtyeqqqqqqqq#O.",
+" X+$*qqq57qqquiqqqqupqqq52qqq$+X",
+" o@%=qqq68qqqiasqqqiqqq863<qqq at o",
+" o@%=qqq79qqqadfqqqaqqq9741qqq at o",
+" O#&-qqq79qqqsfqqqqsqqq9741>-&#O",
+" O#&-qqq70qqqqqqqqfsqqq0741>-&#O",
+" O#&-qqq79qqqqqqqgfsqqq97qqqqq#O",
+" o@%=qqq79qqqadfffdaqqq97qqqqq at o",
+" qqq=qqq68qqqiasssaiqqq863<qqq at o",
+" qqq*qqq57qqquihhhiuqqq752,qqq+X",
+" qqq&qqq36qqqytuuutyeqqq3<qqqqO.",
+" qqqqqqq14qqqewwywwe9qqqqqqqqqo ",
+"  qqqqq:,2qqq8990998764qqqq&qqX ",
+"   o+$&-:,1356777776531,:-&$+o  ",
+"   .O@$*-:,<234444432<,:-*$@O.  ",
+"    XO@$&=;>,<11111<,>;=&$@OX   ",
+"     XO@$&*-;:>>>>>:;-*&$@OX    ",
+"      XO+#%&*==---==*&%#+OX     ",
+"       .oO@#$%%&&&%%$#@Oo.      ",
+"         XoO+@@###@@+OoX        ",
+"           .XooOOOooX.          "};
diff --git a/share/metview/icons/KML.xpm b/share/metview/icons/KML.xpm
new file mode 100644
index 0000000..e563814
--- /dev/null
+++ b/share/metview/icons/KML.xpm
@@ -0,0 +1,159 @@
+/* XPM */
+static char *KML[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 121 2",
+"   c #918576",
+".  c #938A7F",
+"X  c #1717B4",
+"o  c #1B1BB5",
+"O  c #2E2EA6",
+"+  c #3C3BA1",
+"@  c #3131A9",
+"#  c #2828B9",
+"$  c #3434BD",
+"%  c #4948AA",
+"&  c #4544B8",
+"*  c #4949BD",
+"=  c #7474AA",
+"-  c #3E3EC0",
+";  c #4A4AC4",
+":  c #5353C7",
+">  c #5656C8",
+",  c #5D5DCA",
+"<  c #6161CC",
+"1  c #6D6DD0",
+"2  c #7474D2",
+"3  c #7D7DD5",
+"4  c #969088",
+"5  c #9C948B",
+"6  c #8E8F91",
+"7  c #999594",
+"8  c #AC9982",
+"9  c #AB9C89",
+"0  c #B09E89",
+"q  c #BBA78C",
+"w  c #A5A19E",
+"e  c #B3A696",
+"r  c #BDAB93",
+"t  c #B2A59A",
+"y  c #BBAD9A",
+"u  c #A4A1AA",
+"i  c #AFACA9",
+"p  c #B3ACA5",
+"a  c #B4AFAB",
+"s  c #B7B4AF",
+"d  c #BAB1AA",
+"f  c #AEACBC",
+"g  c #B4B3B3",
+"h  c #BBB6B1",
+"j  c #BFBBB7",
+"k  c #BDBCBB",
+"l  c #C4AC8D",
+"z  c #D9B588",
+"x  c #DAB88D",
+"c  c #C6AD93",
+"v  c #CBAF90",
+"b  c #C1B09B",
+"n  c #D4B793",
+"m  c #DBBC96",
+"M  c #D3B79A",
+"N  c #DABB99",
+"B  c #C7B9A7",
+"V  c #C1B6A9",
+"C  c #DDBDA3",
+"Z  c #C4BDB2",
+"A  c #C2BDBA",
+"S  c #E9C08F",
+"D  c #E5C195",
+"F  c #ECC291",
+"G  c #E1C099",
+"H  c #E8C49A",
+"J  c #F1C794",
+"K  c #F4C995",
+"L  c #FECF96",
+"P  c #FBCF98",
+"I  c #FED196",
+"U  c #CBC1B5",
+"Y  c #C3C2BE",
+"T  c #C8C1BD",
+"R  c #E9C6A4",
+"E  c #EEC9A5",
+"W  c #8181D6",
+"Q  c #8686D8",
+"!  c #8C8CDA",
+"~  c #9494DC",
+"^  c #9A9ADE",
+"/  c #BEBDC6",
+"(  c #BBBBC9",
+")  c #BBBAD8",
+"_  c #A5A5E2",
+"`  c #ABABE3",
+"'  c #BEBEE2",
+"]  c #B7B7E8",
+"[  c #BABAE9",
+"{  c #C2BBD3",
+"}  c #C5C4C3",
+"|  c #C8C6C3",
+" . c #CCCBC4",
+".. c #C1C1CD",
+"X. c #CDCDCD",
+"o. c #D3D3CC",
+"O. c #C5C5D2",
+"+. c #D5D5D4",
+"@. c #DAD9D6",
+"#. c #D7D8D8",
+"$. c #DEDEDE",
+"%. c #E1E0DF",
+"&. c #C5C4E5",
+"*. c #C8C4E0",
+"=. c #C0C0EA",
+"-. c #C9C9EB",
+";. c #D5D5EC",
+":. c #D7D8EF",
+">. c #D8D8EF",
+",. c #D3D3F1",
+"<. c #DCDCF1",
+"1. c #E3E3E3",
+"2. c #E5E5E9",
+"3. c #E9E9E9",
+"4. c #E4E4F5",
+"5. c #E9E9F7",
+"6. c #EDEDF9",
+"7. c #F5F5F4",
+"8. c #F4F4FB",
+"9. c #F7F8F8",
+"0. c #FDFDFE",
+/* pixels */
+"0.0.7.1.3.2.3.3.2.3.3.3.3.1.3.3.3.3.3.3.3.1.3.3.3.3.3.3.3.3.9.0.",
+"0.9.= O @ @ @ @ O O @ @ @ @ O O O @ @ O O O @ @ @ @ @ @ O + O.0.",
+"0.7.= * * & * * * * * * * * * * * * * * * * * ; * * * * * % ..0.",
+"0.9.| 3.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.3.7.7.+.$.0.",
+"0.9.X.9.0.6.;.9.0.0.4.-.8.-.,.8.0.0.9.-.<.9.,.5.0.0.0.0.0.$.$.0.",
+"0.9.X.7.0.[ : 6.0.,.; ~ 5.- - 4.0.0.<.# 2 8.< ` 0.0.0.0.0.1.1.0.",
+"0.9.X.9.0.] ; 6.<.; W 8.5.- - ` 0.0._ X 1 8.> _ 0.0.0.0.0.$.$.0.",
+"0.9.X.9.0.[ ; -.> 3 8.0.5.; > 3 0.9.2 ; 1 6.: _ 0.0.0.0.0.$.1.0.",
+"0.9.X.9.0.[ $ ; o =.0.0.5.; ~ : 6.<.< 3 1 6.> _ 0.0.0.0.0.$.$.0.",
+"0.9.X.7.0.[ X 2 2 : 6.0.5.; [ , [ _ Q ~ 1 6.> _ 0.0.0.0.0.1.1.0.",
+"0.9.X.9.0.] - 4.4.; Q 0.5.; -.! 3 2 [ ~ 1 6.> _ 0.0.0.0.0.$.$.0.",
+"0.9.X.9.0.] ; 6.0.[ $ [ 5.; -.-.- : 6.~ 1 8.: ~ 6.6.6.9.0.$.1.0.",
+"0.9.X.9.0.[ > 6.0.9.3 > <.> -.8.; 3 0.^ 2 8.> - ; ; > ,.0.$.$.0.",
+"0.9.X.7.0.8.<.9.0.0.8.,.6.<.9.0.4.5.0.5.4.0.<.-.-.-.-.9.0.1.1.0.",
+"0.9.X.9.0.5.<.<.<.<.<.<.<.<.<.<.<.<.<.<.<.<.4.<.4.4.<.6.0.$.$.0.",
+"0.9.X.9.8.' ;.<.<.<.<.;.<.<.>.>.:.<.:.<.:.;.;.;.,.<.-.&.0.$.1.0.",
+"0.9.X.9.8.' j U Z s X.Y i h 3.0.9.+.| j h A T A h h / &.0.%.%.0.",
+"0.9.X.9.8.) 5 8 z S G     9 @.} a M H D F F K J S c u &.0.>.%.0.",
+"0.9.X.9.8.&.6.$.y K D e k X.1.6 0 I I I I I I I n A 2.-.0.%.%.0.",
+"0.9.X.9.8.-.9.0.o.q 4 #.0.0.0.} v I L G N H P m A 7.6.-.0.$.%.0.",
+"0.9.X.9.8.-.8.0.0.k . r A 7.0.} c L K d g 7 e p 7.0.6.&.0.$.%.0.",
+"0.9.X.9.9.&.9.0.0.9.V J v +.0.9.A m N | 9.7.+.w +.0.8.-.0.%.%.0.",
+"0.9.X.9.8.-.9.0.0.0.h x r 1.0.0.3.t d 7.0.0.| r t 7.8.&.0.$.$.0.",
+"0.9.X.9.8.-.0.0.0.0.Y 5 $.0.0.0.0.1.1.0.0.0.9. at .X.9.6.-.0.$.1.0.",
+"0.9.X.9.8.-.9.7.3.3.$.k 1.1.#.X.o. at .%.$.$. at .o.X.Y @.2.&.0.$.$.0.",
+"0.9.X.9.9.) Z B b y y c q l n G G m n n n m G c y y i ( #.g 1.0.",
+"0.9.X.9.8.{ C R E E E E E E E E E E E E E E E c  .o.o.o.k X.0.0.",
+"0.9.X.9.0.;.*.*.*.*.*.*.*.*.*.*.&.O.*.*.*.*.*.f  .o.o.Y $.0.0.0.",
+"0.9.X.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.o. .o.} 1.0.0.0.0.",
+"0.9.X.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.+.| | 3.0.0.0.0.0.",
+"0.9.} +.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.#.g | 7.0.0.0.0.0.0.",
+"0.0.3.3.3.2.3.3.3.3.3.2.3.3.3.3.3.2.3.3.3.3.3.1.9.0.0.0.0.0.0.0."
+};
diff --git a/share/metview/icons/LLMATRIX.xpm b/share/metview/icons/LLMATRIX.xpm
new file mode 100644
index 0000000..16339ca
--- /dev/null
+++ b/share/metview/icons/LLMATRIX.xpm
@@ -0,0 +1,38 @@
+/* XPM */
+static char * LLMATRIX_icon[] = {
+"32 32 3 1",
+" 	c #00000000FFFF",
+".	c #FFFFFFFFFFFF",
+"X	c #000000000000",
+"                                ",
+" ......X....X.. ....... X...... ",
+" ......X....X.. ....... X...... ",
+" ......X....X.. ....... X...... ",
+" .....X ....X.. ....... .X.....X",
+" .....X .....X. ....... .X.....X",
+" .....X .....X. ....... ..XX.XX ",
+" .....X .....X. ....... ....X.. ",
+" .....X .....X. ....... ....... ",
+" ......X......X ....... ....... ",
+" ......X......X ....... ....... ",
+"                                ",
+" ......X.......X....... ....... ",
+" ......X....... X...... ....... ",
+" ...... X...... .X..... ....... ",
+" ...... X...... ..X.... ....... ",
+" ...... .X..... ...XX.. ....... ",
+" ...... .X..... .....XX ....... ",
+" ...... ..X.... ....... XXX...XX",
+" ...... ..X.... ....... ...XXX. ",
+" ...... ...X... ....... ....... ",
+"                                ",
+" ...... ....X.. ....... ....... ",
+" ...... .....X. ....... ....... ",
+" ...... ......XX....... ....... ",
+" ...... ....... X...... ....... ",
+" ...... ....... .XX.... ....... ",
+" ...... ....... ...XX.. ....... ",
+" ...... ....... .....XX ....... ",
+" ...... ....... ....... XXXX... ",
+" ...... ....... ....... ....XXXX",
+"                                "};
diff --git a/share/metview/icons/MACRO.xpm b/share/metview/icons/MACRO.xpm
new file mode 100644
index 0000000..aa1a95d
--- /dev/null
+++ b/share/metview/icons/MACRO.xpm
@@ -0,0 +1,283 @@
+/* XPM */
+static char * macro_xpm[] = {
+"32 32 248 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #A69D99",
+"@ 	c #785344",
+"# 	c #815748",
+"$ 	c #825848",
+"% 	c #825849",
+"& 	c #82584B",
+"* 	c #81584B",
+"= 	c #815A4C",
+"- 	c #815A4D",
+"; 	c #825B4D",
+"> 	c #825B4E",
+", 	c #835D4E",
+"' 	c #835E4F",
+") 	c #815D4F",
+"! 	c #815D51",
+"~ 	c #815F51",
+"{ 	c #825E51",
+"] 	c #836053",
+"^ 	c #494034",
+"/ 	c #F4F4F4",
+"( 	c #7A6C60",
+"_ 	c #B45A44",
+": 	c #EC6C50",
+"< 	c #EC6D52",
+"[ 	c #EC6F54",
+"} 	c #EC7157",
+"| 	c #EC7359",
+"1 	c #EC755B",
+"2 	c #ED765D",
+"3 	c #ED7860",
+"4 	c #ED7A62",
+"5 	c #ED7C64",
+"6 	c #ED7E66",
+"7 	c #ED8069",
+"8 	c #EE816B",
+"9 	c #EE836D",
+"0 	c #EE856F",
+"a 	c #EE8771",
+"b 	c #EE8974",
+"c 	c #EE8A76",
+"d 	c #EF8C78",
+"e 	c #EF8E7A",
+"f 	c #EF907D",
+"g 	c #816155",
+"h 	c #D2D0CE",
+"i 	c #705346",
+"j 	c #DA6348",
+"k 	c #EC6F55",
+"l 	c #ED775E",
+"m 	c #DC725B",
+"n 	c #ED7E67",
+"o 	c #EE826B",
+"p 	c #EE8570",
+"q 	c #EE8772",
+"r 	c #EE8B76",
+"s 	c #EF8E7B",
+"t 	c #EF927F",
+"u 	c #816255",
+"v 	c #9E968F",
+"w 	c #8D5342",
+"x 	c #EB6A4E",
+"y 	c #EC6E53",
+"z 	c #ED755C",
+"A 	c #ED7960",
+"B 	c #D77059",
+"C 	c #1F1A0D",
+"D 	c #965442",
+"E 	c #EE846D",
+"F 	c #EF8D79",
+"G 	c #EF9482",
+"H 	c #816356",
+"I 	c #F1F1F1",
+"J 	c #76665A",
+"K 	c #BB5B42",
+"L 	c #EC6A4E",
+"M 	c #EC6C51",
+"N 	c #EC7055",
+"O 	c #ED7B62",
+"P 	c #ED7C65",
+"Q 	c #C56A55",
+"R 	c #EE846E",
+"S 	c #EE8670",
+"T 	c #EE8B77",
+"U 	c #EF8F7B",
+"V 	c #EF9280",
+"W 	c #EF9684",
+"X 	c #836356",
+"Y 	c #CCCAC6",
+"Z 	c #735244",
+"` 	c #DE6549",
+" .	c #EC6A4F",
+"..	c #EC7257",
+"+.	c #EC735A",
+"@.	c #ED7B63",
+"#.	c #ED7D65",
+"$.	c #EE826C",
+"%.	c #EE8975",
+"&.	c #EF917E",
+"*.	c #F09886",
+"=.	c #836458",
+"-.	c #69483A",
+";.	c #EC6B4F",
+">.	c #C45F46",
+",.	c #904B37",
+"'.	c #EC745A",
+").	c #ED7961",
+"!.	c #ED7F67",
+"~.	c #ED7F6A",
+"{.	c #7E4A3A",
+"].	c #DE7C67",
+"^.	c #EE8873",
+"/.	c #C0725F",
+"(.	c #9A5F4E",
+"_.	c #ED927F",
+":.	c #7D5344",
+"<.	c #E28E7C",
+"[.	c #F09887",
+"}.	c #F09A89",
+"|.	c #836459",
+"1.	c #805041",
+"2.	c #EC7056",
+"3.	c #7C412F",
+"4.	c #4A2C1C",
+"5.	c #E8745A",
+"6.	c #ED775F",
+"7.	c #ED7F68",
+"8.	c #EE816A",
+"9.	c #D97762",
+"0.	c #3B291B",
+"a.	c #A45F4C",
+"b.	c #EE8A75",
+"c.	c #7A4D3E",
+"d.	c #52382A",
+"e.	c #EE907E",
+"f.	c #EF9380",
+"g.	c #D68674",
+"h.	c #3A2C20",
+"i.	c #A96E5F",
+"j.	c #F09C8B",
+"k.	c #83655B",
+"l.	c #805141",
+"m.	c #EC6D51",
+"n.	c #EC6E54",
+"o.	c #EC7258",
+"p.	c #ED785F",
+"q.	c #ED7D66",
+"r.	c #EE836C",
+"s.	c #EE8671",
+"t.	c #EE8C77",
+"u.	c #EF8D7A",
+"v.	c #EF8F7C",
+"w.	c #EF9583",
+"x.	c #EF9785",
+"y.	c #F09C8C",
+"z.	c #F09E8E",
+"A.	c #83665B",
+"B.	c #805142",
+"C.	c #ED7A61",
+"D.	c #EF9381",
+"E.	c #F09987",
+"F.	c #F09A8A",
+"G.	c #F0A090",
+"H.	c #83685C",
+"I.	c #805242",
+"J.	c #EC7156",
+"K.	c #EC745B",
+"L.	c #E7755D",
+"M.	c #CF6B54",
+"N.	c #D4745E",
+"O.	c #E47E68",
+"P.	c #CB7764",
+"Q.	c #EF907C",
+"R.	c #F09B8A",
+"S.	c #CD8777",
+"T.	c #F0A293",
+"U.	c #83685D",
+"V.	c #805443",
+"W.	c #653A2A",
+"X.	c #302215",
+"Y.	c #E87C64",
+"Z.	c #3D2A1C",
+"`.	c #533527",
+" +	c #EE8874",
+".+	c #D87E6B",
+"++	c #1F1C0F",
+"@+	c #955D4D",
+"#+	c #F09988",
+"$+	c #D48B7B",
+"%+	c #1D1C10",
+"&+	c #9D6D5F",
+"*+	c #805544",
+"=+	c #EB7B63",
+"-+	c #D9755E",
+";+	c #DE7D68",
+">+	c #E7836E",
+",+	c #D8816F",
+"'+	c #EF9481",
+")+	c #F09786",
+"!+	c #F09D8C",
+"~+	c #F09E8F",
+"{+	c #D99182",
+"]+	c #805647",
+"^+	c #F09D8D",
+"/+	c #F09F8F",
+"(+	c #F0A091",
+"_+	c #805648",
+":+	c #ED816B",
+"<+	c #EE917F",
+"[+	c #F09B8B",
+"}+	c #EF9C8C",
+"|+	c #F0A191",
+"1+	c #744634",
+"2+	c #412C1E",
+"3+	c #E9826E",
+"4+	c #D98574",
+"5+	c #31271B",
+"6+	c #9F6758",
+"7+	c #F09A88",
+"8+	c #724F43",
+"9+	c #49382B",
+"0+	c #EFA090",
+"a+	c #805749",
+"b+	c #CF7460",
+"c+	c #9D5B4A",
+"d+	c #EF917D",
+"e+	c #8D5C4E",
+"f+	c #E79381",
+"g+	c #CD8A7B",
+"h+	c #A87466",
+"i+	c #805849",
+"j+	c #EE806A",
+"k+	c #F09F90",
+"l+	c #F0A192",
+"m+	c #483B2F",
+"n+	c #81594B",
+"o+	c #815B4D",
+"p+	c #815B4E",
+"q+	c #815C4E",
+"r+	c #815D50",
+"s+	c #815E51",
+"t+	c #815F52",
+"u+	c #816154",
+"v+	c #816256",
+"w+	c #836357",
+"x+	c #83665C",
+"y+	c #484236",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . + @ # # # $ % & * = - - ; > , ' ' ) ! ~ { ] ^ . ",
+". . . . . . / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g . ",
+". . . . . h i j : < k } | 1 l 3 m 5 n 7 o 9 p q b r d s f t u . ",
+". . . . v w x : y k } | z l A B C D 7 o E p q b r F s f t G H . ",
+". . I J K L M y N } | z l A O P Q 7 o R S q b T F U f V G W X . ",
+". Y Z `  .M y N ..+.z l A @.#.n 7 $.R S q %.T F U &.V G W *.=.. ",
+". -.L ;.M y >.,.'.z l ). at .#.!.~.{.].S ^.%./.(.U &._.:.<.[.}.|.. ",
+". 1.;.M y 2.3.4.5.6.). at .#.7.8.9.0.a.^.b.T c.d.e.f.g.h.i.}.j.k.. ",
+". l.m.n.2.o.'.2 p.). at .q.7.8.r.R s.^.b.t.u.v.&.f.w.x.[.}.y.z.A.. ",
+". B.[ 2.o.'.2 p.C. at .q.7.8.r.0 s.^.b.d e v.&.D.w.x.E.F.y.z.G.H.. ",
+". I.J.o.K.2 L.M.5 q.7.N.O.0 s.^.P.d e Q.&.D.w.x.E.R.S.z.G.T.U.. ",
+". V.| K.2 p.W.X.Y.7.8 Z.`.a  +.+++ at +f t D.w.x.#+R.$+%+&+T.T.U.. ",
+". *+1 2 3 4 =+-+7 8 9 ;+>+b c d ,+f t '+w.)+#+R.!+~+{+T.T.T.U.. ",
+". ]+l 3 4 5 6 7 o 9 0 q b r d s f t '+W )+#+R.^+/+(+T.T.T.T.U.. ",
+". _+A 4 5 n 7 :+9 p q b r F s f <+G W *.#+[+}+/+|+T.T.T.T.T.U.. ",
+". _+O P n 7 1+2+3+q b T F U f 4+5+6+*.7+[+8+9+0+T.T.T.T.T.T.U.. ",
+". a+#.n 7 $.b+c+q b T F U d+V G e+f+}.j.^+g+h+T.T.T.T.T.T.T.U.. ",
+". i+!.j+$.R S ^.%.T F U &.f.G W [.}.j.^+k+l+T.T.T.T.T.T.T.T.U.. ",
+". m+n+o+p+q+r+r+s+s+t+u+u v+H w+=.|.k.A.x+U.U.U.U.U.U.U.U.U.y+. ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/MACROPARAM.xpm b/share/metview/icons/MACROPARAM.xpm
new file mode 100644
index 0000000..5318617
--- /dev/null
+++ b/share/metview/icons/MACROPARAM.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * MACROPARAM_icon[] = {
+"32 32 9 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000000000000",
+"X	c #DADA0000FFFF",
+"o	c #FFFFFFFF0000",
+"O	c #D9D9B7B77777",
+"+	c #FFFFE2E2ABAB",
+"@	c #FFFF4F4F0000",
+"#	c #FFFFFFFFCCCC",
+"$	c #B8B8F0F0B9B9",
+"                                ",
+"                            ... ",
+"                           .XX. ",
+"                          .o.X. ",
+"                         .oO..  ",
+"                        .oO..   ",
+"                    ....oO..    ",
+"                   .+O.oO..     ",
+"                  .+O.oO..      ",
+"                 .+O.oO..O.     ",
+"                .+O.oO..OO+.    ",
+"               .+O.oO...O+++.   ",
+"               .O.oO.. . at ++++...",
+"     ............o.....#+++++O..",
+"    .$$$$$$$$$$.o.#++++++++++O..",
+"   .$$$$$$$$$$$.O...OOO++++++O..",
+"  .$$$$$$$$$$$$........OOOO++O..",
+" .$$$$$$$$$$$$.$$$$$$$$....OOO..",
+".$$$.$$$$$$$.$$$$$$$$$$$$$......",
+".$$$$$$$$$$$$$$.$$$$$$$$$$.   ..",
+".$$$$$$$$$$$$$$$$$$$$$$$$$.     ",
+".$$$$$$$$$$$$$$$$$$$$$$$$$.     ",
+".$$$.$$$.$$$.$$$$$$$.$$$.$.     ",
+".$$$$$$$$$$$$$$$$$$$$$$$$$.     ",
+".$$$$$$.$$$$$$$$$$$$$$$$$$.     ",
+".$$$$$$$$$$$$$$$$$$$$$$$$$.     ",
+".$$$.$$$$$$$$$$$.$$$$$$$.$.     ",
+".$$$$$$$$$$$$$$$$$$$$$$$$$.     ",
+"...........................     ",
+"                                ",
+"                                ",
+"                                "};
diff --git a/share/metview/icons/MAGML.xpm b/share/metview/icons/MAGML.xpm
new file mode 100755
index 0000000..695ecbe
--- /dev/null
+++ b/share/metview/icons/MAGML.xpm
@@ -0,0 +1,268 @@
+/* XPM */
+static char *MAGML[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 230 2",
+"   c gray20",
+".  c #343434",
+"X  c gray22",
+"o  c #393939",
+"O  c #3C3C3C",
+"+  c gray24",
+"@  c gray25",
+"#  c gray26",
+"$  c #434343",
+"%  c #444444",
+"&  c #464646",
+"*  c gray28",
+"=  c #494949",
+"-  c #4C4C4C",
+";  c gray30",
+":  c #4E4E4E",
+">  c #505050",
+",  c gray32",
+"<  c #535353",
+"1  c gray33",
+"2  c #555555",
+"3  c #565656",
+"4  c #585858",
+"5  c gray35",
+"6  c #5A5A5A",
+"7  c #5B5B5B",
+"8  c gray36",
+"9  c #5D5D5D",
+"0  c gray37",
+"q  c #5F5F5F",
+"w  c #626262",
+"e  c gray39",
+"r  c #646464",
+"t  c #656565",
+"y  c gray40",
+"u  c #676767",
+"i  c #686868",
+"p  c DimGray",
+"a  c #6A6A6A",
+"s  c gray42",
+"d  c #6C6C6C",
+"f  c #6F6F6F",
+"g  c gray44",
+"h  c #717171",
+"j  c #747474",
+"k  c gray46",
+"l  c #767676",
+"z  c #777777",
+"x  c #797979",
+"c  c gray49",
+"v  c #7F7F7F",
+"b  c #B31200",
+"n  c #B41605",
+"m  c #B51907",
+"M  c #B71E0F",
+"N  c #BA2518",
+"B  c #BA2D1D",
+"V  c #BB2E1E",
+"C  c #BD2D22",
+"Z  c #BC3122",
+"A  c #BC3324",
+"S  c #BF382B",
+"D  c #C0342B",
+"F  c #C23C35",
+"G  c #C24034",
+"H  c #C5473D",
+"J  c #C84D45",
+"K  c #C8504A",
+"L  c #C9544E",
+"P  c #D26A69",
+"I  c #D26B6A",
+"U  c #D26F6A",
+"Y  c #D4716F",
+"T  c #D77477",
+"R  c #D77E7B",
+"E  c #D87F7D",
+"W  c #D87D7E",
+"Q  c #D87B80",
+"!  c #808080",
+"~  c #818181",
+"^  c gray51",
+"/  c #838383",
+"(  c #848484",
+")  c gray52",
+"_  c gray53",
+"`  c #888888",
+"'  c #898989",
+"]  c gray54",
+"[  c #8B8B8B",
+"{  c #8E8E8E",
+"}  c #909090",
+"|  c gray57",
+" . c gray58",
+".. c #959595",
+"X. c gray59",
+"o. c #979797",
+"O. c #989898",
+"+. c #9A9A9A",
+"@. c #9B9B9B",
+"#. c #9D9D9D",
+"$. c #9F9F9F",
+"%. c gray63",
+"&. c #A2A2A2",
+"*. c gray64",
+"=. c #A4A4A4",
+"-. c #A5A5A5",
+";. c gray65",
+":. c #A7A7A7",
+">. c gray66",
+",. c #AAAAAA",
+"<. c #ACACAC",
+"1. c gray68",
+"2. c #AEAEAE",
+"3. c gray69",
+"4. c #B2B2B2",
+"5. c #B4B4B4",
+"6. c gray71",
+"7. c #B6B6B6",
+"8. c #B7B7B7",
+"9. c gray72",
+"0. c #B9B9B9",
+"q. c gray73",
+"w. c #BBBBBB",
+"e. c #BCBCBC",
+"r. c gray74",
+"t. c gray",
+"y. c gray75",
+"u. c #D98482",
+"i. c #DB8188",
+"p. c #DC8889",
+"a. c #DC8C89",
+"s. c #DD8C8D",
+"d. c #DD8C90",
+"f. c #DE8D91",
+"g. c #E1919A",
+"h. c #E2969D",
+"j. c #E29E9D",
+"k. c #E399A1",
+"l. c #DEB3AE",
+"z. c #E4A2A4",
+"x. c #E5A1A8",
+"c. c #E5A3A9",
+"v. c #E6A0AB",
+"b. c #E5A4A9",
+"n. c #E5A6A8",
+"m. c #E0B2AD",
+"M. c #E1B3AE",
+"N. c #E2B4AF",
+"B. c #E8ABB2",
+"V. c #E9ABB4",
+"C. c #E3B5B0",
+"Z. c #E4B6B1",
+"A. c #E5B7B2",
+"S. c #E6B9B4",
+"D. c #E7BBB7",
+"F. c #E9B4B8",
+"G. c #E8BDBA",
+"H. c #E9C1BE",
+"J. c #EDBAC2",
+"K. c #C0C0C0",
+"L. c #C1C1C1",
+"P. c gray76",
+"I. c gray77",
+"U. c #C5C5C5",
+"Y. c gray78",
+"T. c #C8C8C8",
+"R. c #CACACA",
+"E. c #CBCBCB",
+"W. c gray80",
+"Q. c gray81",
+"!. c #D0D0D0",
+"~. c gray82",
+"^. c #D2D2D2",
+"/. c #D5D5D5",
+"(. c gray84",
+"). c #D7D7D7",
+"_. c #D8D8D8",
+"`. c gray85",
+"'. c #DADADA",
+"]. c gray86",
+"[. c gainsboro",
+"{. c #DDDDDD",
+"}. c gray87",
+"|. c #DFDFDF",
+" X c #EBC4C1",
+".X c #EDC7C5",
+"XX c #EEC9C8",
+"oX c #EFCCCB",
+"OX c #F0CECE",
+"+X c #EFCDD3",
+"@X c #F1D0D1",
+"#X c #F1D3D8",
+"$X c #F3D7D9",
+"%X c #F4D8D9",
+"&X c #F4D9DB",
+"*X c #F4DADB",
+"=X c #F5DBDE",
+"-X c #F6DDE1",
+";X c gray88",
+":X c #E1E1E1",
+">X c #E2E2E2",
+",X c gray89",
+"<X c #E4E4E4",
+"1X c gray90",
+"2X c #E6E6E6",
+"3X c #E7E7E7",
+"4X c gray91",
+"5X c #E9E9E9",
+"6X c #EAEAEA",
+"7X c gray92",
+"8X c #ECECEC",
+"9X c gray93",
+"0X c #EEEEEE",
+"qX c #EFEFEF",
+"wX c #F7EDEF",
+"eX c gray94",
+"rX c #F1F1F1",
+"tX c gray95",
+"yX c #F3F3F3",
+"uX c #F4F4F4",
+"iX c gray96",
+"pX c #F6F6F6",
+"aX c gray97",
+"sX c #F8F8F8",
+"dX c #F9F9F9",
+"fX c gray98",
+"gX c #FBFBFB",
+"hX c gray99",
+"jX c #FDFDFD",
+"kX c gray100",
+/* pixels */
+"kX6X3X3X2X2X2X1X1X1X1X<X<X<X,X,X,X>X>X>X>X:X:X:X;X;X;X;X;X~.kXkX",
+"kX3X#XV.k.h.i.Q T p.I E U L J H G S Z V V V V V V V B B A :XkXkX",
+"kX3X+XJ.B.c.F.f.z.s.j.u.R F D C N M n b b b b b b b b b m :XkXkX",
+"kX2X+Xv.g.x.b.d.n.W P Y a.K D C N M n b b b b b b b b b m :XkXkX",
+"kX2XwX-X=X&X$X%X*X at XOXoXXX.X XH.G.D.S.A.Z.Z.C.N.N.M.M.m.l.;XkXkX",
+"kX2XsX3X;X{.5X}.}.pXdX].2X2X,X`.[.8X2XaXaXpXiXuXyXtXrXrX8X;XkXkX",
+"kX1XdX>X}.4X>X`.|.>X`.6X4X<X|.9XdXdXsXaXpXiXuXuXyXtXrXeX5X;XkXkX",
+"kX1XtX`.5XkXkXkXjX`.,XjXhXhXgXfXdXsXaXpXpXiXuXyXtXrXrX0X4X;XkXkX",
+"kX1X/.  2 iXtXeXe.  i uX9XeX9XuXeX,XuX8X7X5X0X0X<X7X0X6X5X;XkXkX",
+"kX1X/.o 4 R.sXqXk w s 8XsX7X}.'.qX4X6X6XtX5X~.1X|.:X7X5X6X;XkXkX",
+"kX<X/.o $.) hX2X% $.d rXpX7 3 < # w.1X0Xy.@ : = j c <X6X7X;XkXkX",
+"kX<X(.o 3X& pX*.! >.i 0XrX{.yX3X>.> 7X2X; X.1X].% v 7X7X8X;XkXkX",
+"kX<X(.o rXg 9.0 W.>.u 9XtX).,.^ j . }.^.. {.0X>Xh x <X8X9X;XkXkX",
+"kX,X(.X tX6.5 , tX&.i tX9X* { 8.r.  {.Q.X ,X4XqX( v 9X9X9X;XkXkX",
+"kX,X(.o kXhXw <.jX,.d fXK.9 sXaX0.  3XqXO L.eX0X2 v 0X0X0X;XkXkX",
+"kX,X(.X sXdXtXtXeX%.d fX4XO :.=.e . 3XyX at .@ ' q 5 ! qXqXqX;XkXkX",
+"kX>X5XX.uXsXrXrX0XE.,.pXyXI._ | ).} _.:X(.4...t.f [ 7XeXeX;XkXkX",
+"kX>XfXtXyXpXqXuXsXh 8 W.0X8XtXQ.6 r 2X6X .f [.5.+ P.1X0XrX;XkXkX",
+"kX>XdX}.0X7XuX7X8Xt 9 ' 5X}.;X .7 5 ,X3X~ - $ > #.;X|.qXtX;XkXkX",
+"kX>XdXrXtXtXtXtXtXt o.3 8XtXrXq O.5 tXtX%.a tXrXeXtXtXtXtX;XkXkX",
+"kX:XfX_.:X2X0X3X2Xw -.j 6.yXU.y t.5 yXyX&.a yXyXyXyXyXyXyX;XkXkX",
+"kX:XfXuXuXuXuXyXuXt 1.7.z uX` =.y.5 uXuX&.a uXuXuXuXuXuXuX;XkXkX",
+"kX:XfX{.).;X].2X3Xw %.~.2 U.1 {.3.4 8X9XO.t }.;X`.>X<X8X8X'.kXkX",
+"kX;XgX).<X5X;X:X,Xt $.,X/ p k 1Xq.5 :X9Xo.w /.~.!.[.}.}.[.8.kXkX",
+"kX;XhX7X5X;X,XqX5Xr ;.6XP.8 2.1X7.5 6X,X+.t 3X7X7XuXkXjX!.jXkXkX",
+"kX;XhX`.tXyX4X2X5Xr 2.iXaXpXaXaXL.5 aXaX=.8 e.e.r.r.[.Q.jXkXkXkX",
+"kX;XhXsXsXsXsXsXsX] L.sXsXsXsXsXQ.~ sXsX0.f l l l l $.jXkXkXkXkX",
+"kX;XhX/.(.3XrX5X9XsXsXsXsXsXsXsXsXsXsXsXsX(.9X7X7XE.jXkXkXkXkXkX",
+"kX;XhXaXsXsXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdX(.4X1XT.jXkXkXkXkXkXkX",
+"kX;XhXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdX).,XU.jXkXkXkXkXkXkXkX",
+"kX;XjXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX/.I.jXkXkXkXkXkXkXkXkX",
+"kX5X|.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.Y.gXkXkXkXkXkXkXkXkXkX"
+};
diff --git a/share/metview/icons/MAPVIEW.xpm b/share/metview/icons/MAPVIEW.xpm
new file mode 100644
index 0000000..ac3963e
--- /dev/null
+++ b/share/metview/icons/MAPVIEW.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char * MAPVIEW_xpm[] = {
+"32 32 6 1",
+" 	c None",
+".	c #989898",
+"+	c #FFFFFF",
+"@	c #BEBEBE",
+"#	c #EBFAFF",
+"$	c #B9E3B5",
+"................................",
+".++++++++++++++++++++++++++++++.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@+.",
+".+ at ++++++++++++++++++++++++++@+.",
+".+ at ++#####$$$############$#++ at +.",
+".+ at ++######$$$##########$$$++ at +.",
+".+ at ++#######$$$#########$$$++ at +.",
+".+ at ++##$$$###$$$########$$$++ at +.",
+".+ at ++#$$$$###$$$#######$$$$++ at +.",
+".+ at ++#$$$$##$$$$$$##$#$$$$$++ at +.",
+".+ at ++#$#####$$$$$##$$$$$$$$++ at +.",
+".+ at ++######$$####$$$$$$$$$$++ at +.",
+".+ at ++###########$$$$$$$$$$$++ at +.",
+".+ at ++#########$$$$$$$$$$$$$++ at +.",
+".+ at ++#######$$$$$$$$$$$$$$$++ at +.",
+".+ at ++#########$$$$$$$$$$$$$++ at +.",
+".+ at ++#########$$$$$$$$$$$$$++ at +.",
+".+ at ++########$$$$$$$$$$$$$$++ at +.",
+".+ at ++###$$$$$$$$$$$$$$$$#$$++ at +.",
+".+ at ++##$$$$$$$$$$$$$$$#####++ at +.",
+".+ at ++#$$$$$$$$$$$$######$##++ at +.",
+".+ at ++#$$$$$$$$$$$##########++ at +.",
+".+ at ++#$$$$$$$$$$########$##++ at +.",
+".+ at ++#$$$$$$$$$$##$########++ at +.",
+".+ at ++##$$$$$$$$###$$$$$$$$#++ at +.",
+".+ at ++###$$$$$$###$$$$$$$$$#++ at +.",
+".+ at ++#####$####$$$$$$$$$$$#++ at +.",
+".+ at ++###$$$$$$$$$$$$$$$$$$#++ at +.",
+".+ at ++++++++++++++++++++++++++@+.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@+.",
+".++++++++++++++++++++++++++++++.",
+"................................"};
diff --git a/share/metview/icons/MAVERAGEVIEW.xpm b/share/metview/icons/MAVERAGEVIEW.xpm
new file mode 100644
index 0000000..a9f39e5
--- /dev/null
+++ b/share/metview/icons/MAVERAGEVIEW.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * AVERAGEVIEW_xpm[] = {
+"32 32 9 1",
+" 	c #333333333333",
+".	c #FFFFFFFFFFFF",
+"X	c #7A7A7A7A7A7A",
+"o	c #777777777777",
+"O	c #CCCCCCCCFFFF",
+"+	c #FFFF0000FFFF",
+"@	c #000000000000",
+"#	c #00007F7FFFFF",
+"$	c #D9D9B7B77777",
+"                                ",
+" .............................. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .X..........................X. ",
+" .X..........................X. ",
+" .X..........................X. ",
+" .X..........................X. ",
+" .X......oooooooooooooo......X. ",
+" .X..ooooOOOOOOOOOOOOOOoooo..X. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOO+OOOOOOOO+OOOOOOOOX. ",
+" .XOOOOOOoo++oooooo++ooOOOOOOX. ",
+" .XOOooooOO+++OOOO+++OOooooOOX. ",
+" .X++++++++++++OO++++++++++++X. ",
+" .XOOOOOOOO+++OOOO+++OOOOOOOOX. ",
+" .XOOOOOOOO++OOOOOO++OOOOOOOOX. ",
+" .XOOOOOOoo+oooooooo+ooOOOOOOX. ",
+" .XOOooooOOOOOOOOOOOOOOooooOOX. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOooooooooooooooOOOOOOX. ",
+" .XOOooooOOOOOOOOOOOOOOooooOOX. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOO@@@@@@@@@@@@@@OOOOOOX. ",
+" .XOO@@@@######$$$$$$$$@@@@@OX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/MAXIS.xpm b/share/metview/icons/MAXIS.xpm
new file mode 100644
index 0000000..39b9026
--- /dev/null
+++ b/share/metview/icons/MAXIS.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * PAXIS_icon[] = {
+"32 32 9 1",
+" 	c #FFFFFFFFFFFF",
+".	c #FFFFFFFF0000",
+"X	c #FFFFFFFFCCCC",
+"o	c #00000000FFFF",
+"O	c #000000000000",
+"+	c #FFFF0000DADA",
+"@	c #D9D9B7B77777",
+"#	c #FFFFE2E2ABAB",
+"$	c #E0E06C6C0000",
+"   .............................",
+"  ..XXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+" ...XXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"....oXXXXXXXXXXXXXXXXXXXXXXOOOX.",
+".XXoooXXXXXXXXXXXXXXXXXXXXO++OX.",
+".XXXoXXXXXXXXXXXXXXXXXXXXO.O+OX.",
+".XXXoXXXXXXXXXXXXXXXXXXXO. at OOXX.",
+".XXXoXXXXXXXXXXXXXXXXXXO. at OOXXX.",
+".XXoooXXXoXXXXXoXXXOOOO. at OOXoXX.",
+".XXXoXXXXXXXXXXXXXO#@O. at OOXXXXX.",
+".XXXoXXXXXXXXXXXXO#@O. at OOXXXXXX.",
+".XXXoXXXXXXXXXXXO#@O. at OO@OXXXXX.",
+".XXXoXXXXXXXXXXO#@O. at OO@@#OXXXX.",
+".XXXoXXXXXXXXXO#@O. at OOO@###OXXX.",
+".XXoooXXXoXXXXO at O.@OOXO$####OOO.",
+".XXXoXXXXXXXXXXO.OOOOOX#####@OO.",
+".XXXoXXXXXXXXXO.OX##########@OO.",
+".XXXoXXXXXXXXXO at OOO@@@######@OO.",
+".XXXoXXXXXXXXOOOXXXOOO@@@@##@OO.",
+".XXoooXXXoXXXXXXoXXXXXOOOO@@@OO.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXOOOOO.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXXXXOO.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXoXXXXoXXXXXXoXXXXXoXXXXXoXX.",
+".XXXooooooooooooooooooooooooooX.",
+".XXXoXXXXoXXXXXXoXXXXXoXXXXXoXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"................................",
+"                                "};
diff --git a/share/metview/icons/MCOAST.xpm b/share/metview/icons/MCOAST.xpm
new file mode 100644
index 0000000..f9bf008
--- /dev/null
+++ b/share/metview/icons/MCOAST.xpm
@@ -0,0 +1,49 @@
+/* XPM */
+static char * PCOAST_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 11 1",
+/* colors */
+" 	c white",
+".	c #FFFFB0B00000",
+"X	c #FFFFCC",
+"o	c blue",
+"O	c #25250000FFFF",
+"+	c black",
+"@	c #FFFF0000DADA",
+"#	c yellow",
+"$	c #D9D9B7B77777",
+"%	c #FFFFE2E2ABAB",
+"&	c #E0E06C6C0000",
+/* pixels */
+"    ............................",
+"   ..XXXXXXXoXOOOOXXXXXXXXXXXXX.",
+"  ...XXXXXXoXOXXOXXXXXXXXXXXXXX.",
+" ....XXXXXXoXOXOXXXXXXXXXXXXXXX.",
+".....XXXXXXXOOXOOOOOXXXXXXXXXXX.",
+".XXXXXXXXXXXOXXXXXOXXXXXXXXXXXX.",
+".XXXXXXXXXXXOXXXXOXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXOXXXOXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXOOXOXXXXXXXXXX+++X.",
+".XXXXXXXXXXXXOOXOOOXXXXXXX+@@+X.",
+".XXXXXXXXXOXXXOXXXXOXXXXX+#+ at +X.",
+".XXXXXXXOOXOOXXOXXXOXXXX+#$++XX.",
+".XXXXXXOXXXXOXXOOOXXOXX+#$++XXX.",
+".XXXXOOOXXXXOXXXXOX++++#$++XXXX.",
+".XXXOXXXXXXOXXXXXX+%$+#$++XXXXX.",
+".XXXOXXXXXXOXXXXX+%$+#$++XXXXXX.",
+".XXXXOXXXXXOXXXX+%$+#$++$+XXXXX.",
+".XXXXXOXXXXOXXX+%$+#$++$$%+XXXX.",
+".XXXXOOXXXXOXX+%$+#$+++$%%%+XXX.",
+".XXOOOXXXXOOXX+$+#$++X+&%%%%+++.",
+".XXOXXXOOOXXXXX+#+++++X%%%%%$++.",
+".XXXOOOXXXXXXX+#+X%%%%%%%%%%$++.",
+".XXXXXXXXXXXXX+$+++$$$%%%%%%$++.",
+".XXXXXXXXXXXX+++XXX+++$$$$%%$++.",
+".XXXXXXXXXXXX+XXXOOOOO++++$$$++.",
+".XXXXXXXXXXXOXOOOXXXXXXXXO+++++.",
+".XXXXXXXXXXXOOXXXXXXXXXXXOXXX++.",
+".XXXXXXXXXXXXXXXXXXXXXXXOXXXXXX.",
+".XXXXXXXXXXXXXXXXXOOXXXOXXXXXXX.",
+".XXXXXXXXXXXXXXXXXOXOOOXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXOXXXXXXXXXXX.",
+"................................"};
diff --git a/share/metview/icons/MCONT.xpm b/share/metview/icons/MCONT.xpm
new file mode 100644
index 0000000..41cf9f8
--- /dev/null
+++ b/share/metview/icons/MCONT.xpm
@@ -0,0 +1,49 @@
+/* XPM */
+static char * PCONT_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 11 1",
+/* colors */
+" 	c white",
+".	c #777777777777",
+"X	c #DDDDDD",
+"o	c #25250000FFFF",
+"O	c black",
+"+	c #FFFF0000DADA",
+"@	c yellow",
+"#	c #D9D9B7B77777",
+"$	c #FFFFE2E2ABAB",
+"%	c #FFFF4F4F0000",
+"&	c #FFFFCC",
+/* pixels */
+"    ............................",
+"   ..XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"  ...XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+" ....XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".....XXXXXXoooooooXXXXXXXXXXXXX.",
+".XXXXXXXXooXXXXXXXooooooXXXOOOX.",
+".XXXXXXooXXXXXXXXXXXXXXXooO++OX.",
+".XXXXooXXXXXXXXXXXXXXXXXXO at O+OX.",
+".XXooXXXXXXXXXXXXXXXXXXXO@#OOXX.",
+".XoXXXXXXXXXXXXXXXXXXXXO@#OOoXX.",
+".oXXXXXXXXXXXXXXXXXOOOO@#OOXXoX.",
+".XXXXXXXXXXXXXXXXXO$#O@#OOXXXoX.",
+".XXXXXXXXXXXXXXXXO$#O@#OOXXXXoX.",
+".XXXXXXXXXXXXXXXO$#O@#OO#OXXXoX.",
+".XXXXXXXXooooXXO$#O@#OO##$OXXXo.",
+".XXXXXoooXXXXXO$#O@#OOO#$$$OXXo.",
+".XXXooXXXXXXXXO#O@#OOXO%$$$$OOOO",
+".XXooXXXXXXXXXXO at OOOOO&$$$$$#OOO",
+".XoXXXXXXXXXXXO at O&$$$$$$$$$$#OOO",
+".oXXXXXXXXXXXXO#OOO###$$$$$$#OOO",
+".XXXXXooooXXXOOOXXXOOO####$$#OOO",
+".XXXooXXXXooOOXXXXXXoXOOOO###OOO",
+".XXoXXXXXXXXXoXXXXXXoXXXXXOOOOOO",
+".XoXXXXXXXXXXoXXXXXXXoXXXXXXXOOO",
+".oXXXXXXXXXXXoXXXXXXXoXXXXXXXXo.",
+".oXXXXXXXXXXXXoXXXXXXoXXXXXXXXo.",
+".oXXXXXXXXXXXXoXXXXXoXXXXXXXXoX.",
+".oXXXXXXXXXXXoXXXXXXoXXXXXXXXoX.",
+".oXXXXXXXXXXXoXXXXXXoXXXXXXXXoX.",
+".oXXXXXXXXXXXoXXXXXoXXXXXXXXoXX.",
+".XoXXXXXXXXXoXXXXXXoXXXXXXXXoXX.",
+"................................"};
diff --git a/share/metview/icons/MGRAPH.xpm b/share/metview/icons/MGRAPH.xpm
new file mode 100644
index 0000000..d822515
--- /dev/null
+++ b/share/metview/icons/MGRAPH.xpm
@@ -0,0 +1,500 @@
+/* XPM */
+static char * MGRAPH_xpm[] = {
+"32 32 465 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #7F00FF",
+"@ 	c #8CC2FE",
+"# 	c #88BEFA",
+"$ 	c #86BCF8",
+"% 	c #91C5FF",
+"& 	c #8FC3FD",
+"* 	c #92C5FE",
+"= 	c #99CAFF",
+"- 	c #9FCCFF",
+"; 	c #9FCAFF",
+"> 	c #A0C9FD",
+", 	c #A1CCFF",
+"' 	c #9BC9FD",
+") 	c #95C4F8",
+"! 	c #94C3F9",
+"~ 	c #99CBFF",
+"{ 	c #9CCDFF",
+"] 	c #96C7FF",
+"^ 	c #97C8FF",
+"/ 	c #A4D3FF",
+"( 	c #9ECDFF",
+"_ 	c #000000",
+": 	c #FF00DA",
+"< 	c #CCCCFF",
+"[ 	c #8DC3FF",
+"} 	c #89BFFD",
+"| 	c #8CC0FC",
+"1 	c #90C4FE",
+"2 	c #93C6FF",
+"3 	c #93C4FC",
+"4 	c #98C5FC",
+"5 	c #9DCBFF",
+"6 	c #A0CBFE",
+"7 	c #9EC9FC",
+"8 	c #96C5F9",
+"9 	c #93C2F8",
+"0 	c #95C7FC",
+"a 	c #9ACBFF",
+"b 	c #98CBFF",
+"c 	c #95C8FF",
+"d 	c #94C7FE",
+"e 	c #9DCFFF",
+"f 	c #FFFF00",
+"g 	c #8AC0FF",
+"h 	c #87BDFB",
+"i 	c #93C7FF",
+"j 	c #8EC1F8",
+"k 	c #9CCAFE",
+"l 	c #A0CEFF",
+"m 	c #9BC9FB",
+"n 	c #97C6FA",
+"o 	c #90C2F7",
+"p 	c #92C4F9",
+"q 	c #96C9FF",
+"r 	c #92C5FC",
+"s 	c #D9B777",
+"t 	c #8CC3FF",
+"u 	c #89C0FF",
+"v 	c #87BEFE",
+"w 	c #84BCF9",
+"x 	c #8EC4FF",
+"y 	c #9BCAFE",
+"z 	c #9DCBFD",
+"A 	c #99C8FC",
+"B 	c #91C3F8",
+"C 	c #8FC1F6",
+"D 	c #94C9FF",
+"E 	c #87BAFC",
+"F 	c #86B9FB",
+"G 	c #85BAFC",
+"H 	c #88BFFF",
+"I 	c #8BC2FF",
+"J 	c #8AC1FF",
+"K 	c #87BEFF",
+"L 	c #83BAFA",
+"M 	c #8AC2FF",
+"N 	c #8FC6FF",
+"O 	c #90C4FD",
+"P 	c #90C3FA",
+"Q 	c #96C8FD",
+"R 	c #9CCBFF",
+"S 	c #9DCCFF",
+"T 	c #99CBFE",
+"U 	c #93C5FA",
+"V 	c #88BAFF",
+"W 	c #84B6FB",
+"X 	c #82B7FB",
+"Y 	c #88C1FF",
+"Z 	c #86C0FF",
+"` 	c #7FB9F9",
+" .	c #84BBFB",
+"..	c #8AC2FD",
+"+.	c #90C7FF",
+"@.	c #91C6FC",
+"#.	c #90C3F8",
+"$.	c #93C6FB",
+"%.	c #9BCDFF",
+"&.	c #9ACCFF",
+"*.	c #FFE2AB",
+"=.	c #89BBFF",
+"-.	c #81B6FA",
+";.	c #87C0FF",
+">.	c #86BFFF",
+",.	c #7EB7FA",
+"'.	c #7EB8F8",
+").	c #87BFFC",
+"!.	c #90C8FF",
+"~.	c #8BBFF8",
+"{.	c #8EC3F9",
+"].	c #99CCFF",
+"^.	c #91C3FF",
+"/.	c #86BBFF",
+"(.	c #7DB2F6",
+"_.	c #85BEFF",
+":.	c #81BCFF",
+"<.	c #82BDFF",
+"[.	c #78B3F5",
+"}.	c #79B3F3",
+"|.	c #93CBFF",
+"1.	c #90C6FF",
+"2.	c #8BC2FB",
+"3.	c #8DC1FA",
+"4.	c #92C4FF",
+"5.	c #8ABFFF",
+"6.	c #80B7FA",
+"7.	c #80B9FE",
+"8.	c #7FBAFF",
+"9.	c #84BFFF",
+"0.	c #7CB7FB",
+"a.	c #FF00FF",
+"b.	c #82BBFE",
+"c.	c #8BC5FF",
+"d.	c #92C5FF",
+"e.	c #8FC4FF",
+"f.	c #85BCFF",
+"g.	c #7AB3F8",
+"h.	c #7BB6FC",
+"i.	c #7BB7FF",
+"j.	c #83BFFF",
+"k.	c #77B3F9",
+"l.	c #8BC4FF",
+"m.	c #90C3FF",
+"n.	c #91C7FF",
+"o.	c #77B2F6",
+"p.	c #79B8FF",
+"q.	c #7EBCFF",
+"r.	c #76B2FB",
+"s.	c #79B3FC",
+"t.	c #88C2FF",
+"u.	c #FF4F00",
+"v.	c #8DC1FD",
+"w.	c #8FC5FF",
+"x.	c #78B3F7",
+"y.	c #78B6FF",
+"z.	c #78B7FF",
+"A.	c #72B0FD",
+"B.	c #6BA9F6",
+"C.	c #87C2FF",
+"D.	c #FFFFCC",
+"E.	c #8AC1FA",
+"F.	c #8BC1FD",
+"G.	c #89C4FF",
+"H.	c #7BB8FB",
+"I.	c #73B2FF",
+"J.	c #75B4FF",
+"K.	c #73B0FF",
+"L.	c #6EABFB",
+"M.	c #70AAFC",
+"N.	c #8BC2FA",
+"O.	c #88C3FF",
+"P.	c #7FBCFD",
+"Q.	c #76B2FA",
+"R.	c #72B1FE",
+"S.	c #6EABFE",
+"T.	c #8FC3FC",
+"U.	c #86BDF6",
+"V.	c #82BFFF",
+"W.	c #6BABF3",
+"X.	c #71B3FF",
+"Y.	c #75B6FF",
+"Z.	c #6DABFE",
+"`.	c #63A1F6",
+" +	c #7BB4FF",
+".+	c #EBEBFF",
+"++	c #94C7FF",
+"@+	c #8BBFF9",
+"#+	c #86BCFA",
+"$+	c #79BAFE",
+"%+	c #63A6ED",
+"&+	c #6AAEF9",
+"*+	c #6BAEFC",
+"=+	c #6EB3FF",
+"-+	c #72B6FF",
+";+	c #70B2FF",
+">+	c #6BADFF",
+",+	c #6FB0FF",
+"'+	c #74B5FF",
+")+	c #77B5FF",
+"!+	c #79B7FF",
+"~+	c #7AB8FF",
+"{+	c #97CAFF",
+"]+	c #90C2FD",
+"^+	c #85BBF7",
+"/+	c #7EBFFF",
+"(+	c #6BAEF4",
+"_+	c #67ABF4",
+":+	c #66ABF6",
+"<+	c #6AAFFD",
+"[+	c #6DB4FF",
+"}+	c #6EB2FF",
+"|+	c #69ADFF",
+"1+	c #67A9FF",
+"2+	c #6FB3FF",
+"3+	c #74B3FF",
+"4+	c #76B4FF",
+"5+	c #77B2FF",
+"6+	c #78B1FE",
+"7+	c #72ABFA",
+"8+	c #6FAAFA",
+"9+	c #9ACDFF",
+"0+	c #96C8FF",
+"a+	c #87C4FF",
+"b+	c #85C4FF",
+"c+	c #76B9FF",
+"d+	c #66AAF3",
+"e+	c #63A8F3",
+"f+	c #66ABF9",
+"g+	c #6DB1FF",
+"h+	c #6CAEFF",
+"i+	c #66A6FD",
+"j+	c #62A4FA",
+"k+	c #6CB0FF",
+"l+	c #70B3FF",
+"m+	c #74B2FF",
+"n+	c #76B1FF",
+"o+	c #75B0FE",
+"p+	c #73AEFE",
+"q+	c #6EABFC",
+"r+	c #6AA8FB",
+"s+	c #87C3FF",
+"t+	c #87C7FF",
+"u+	c #7FC0FF",
+"v+	c #6BAEF5",
+"w+	c #67AAF8",
+"x+	c #6FB2FF",
+"y+	c #75B8FF",
+"z+	c #69AAFE",
+"A+	c #63A4F8",
+"B+	c #6AACFF",
+"C+	c #72B4FF",
+"D+	c #75B2FF",
+"E+	c #74B1FF",
+"F+	c #70AFFE",
+"G+	c #6BACFC",
+"H+	c #67A9FD",
+"I+	c #66A8FC",
+"J+	c #65A9FE",
+"K+	c #91C4FD",
+"L+	c #87C1FF",
+"M+	c #82C2FF",
+"N+	c #72B3F7",
+"O+	c #69ACF2",
+"P+	c #68AAF4",
+"Q+	c #70B2FE",
+"R+	c #77B8FF",
+"S+	c #6EACFF",
+"T+	c #66A7FB",
+"U+	c #76B5FF",
+"V+	c #76B3FF",
+"W+	c #6EAFFF",
+"X+	c #6BAEFD",
+"Y+	c #68ABFC",
+"Z+	c #65A9FC",
+"`+	c #8CBDF7",
+" @	c #95C7FF",
+".@	c #96CAFF",
+"+@	c #89C1FE",
+"@@	c #85C1FF",
+"#@	c #85C2FF",
+"$@	c #78B7FA",
+"%@	c #6FB0F4",
+"&@	c #70B0FA",
+"*@	c #71B0FF",
+"=@	c #6CADFF",
+"-@	c #65A7FB",
+";@	c #69ABFF",
+">@	c #6EB0FF",
+",@	c #73B4FF",
+"'@	c #6FAEFD",
+")@	c #6CAFFD",
+"!@	c #67ACFA",
+"~@	c #88B9F1",
+"{@	c #8FC2FB",
+"]@	c #9ACEFF",
+"^@	c #8AC2FB",
+"/@	c #87BFFA",
+"(@	c #8AC5FF",
+"_@	c #82BEFD",
+":@	c #78B5F6",
+"<@	c #72AEF4",
+"[@	c #72B1F8",
+"}@	c #78B5FF",
+"|@	c #66A8FE",
+"1@	c #63A5F9",
+"2@	c #72B3FF",
+"3@	c #6FB1FF",
+"4@	c #6DAFFB",
+"5@	c #74B6FF",
+"6@	c #76B8FF",
+"7@	c #73B7FF",
+"8@	c #6FB3FE",
+"9@	c #87B8F0",
+"0@	c #8BBEF5",
+"a@	c #9DD0FF",
+"b@	c #8CC3FB",
+"c@	c #88BFF8",
+"d@	c #8FC7FF",
+"e@	c #7FBBFA",
+"f@	c #78B3F9",
+"g@	c #7BB5FE",
+"h@	c #7CB7FF",
+"i@	c #61A2F4",
+"j@	c #63A4F6",
+"k@	c #6DAEFF",
+"l@	c #77B9FF",
+"m@	c #75B7FF",
+"n@	c #6AACF8",
+"o@	c #6EB0FC",
+"p@	c #78BAFF",
+"q@	c #71B5FC",
+"r@	c #6CAFF6",
+"s@	c #8CBFF6",
+"t@	c #8DC0F7",
+"u@	c #94C7FC",
+"v@	c #9ED3FF",
+"w@	c #96CBFF",
+"x@	c #7FB6F6",
+"y@	c #79B2F5",
+"z@	c #7BB4FB",
+"A@	c #7EB8FF",
+"B@	c #81BAFF",
+"C@	c #7BBAFF",
+"D@	c #65A4F4",
+"E@	c #62A3F3",
+"F@	c #6FB1FD",
+"G@	c #7ABDFF",
+"H@	c #7DC0FF",
+"I@	c #78B9FD",
+"J@	c #8EC1F6",
+"K@	c #83C2FF",
+"L@	c #7EBDFF",
+"M@	c #91C4FB",
+"N@	c #95C7FA",
+"O@	c #A1D3FF",
+"P@	c #9FD1FF",
+"Q@	c #9BCDFE",
+"R@	c #93C6FD",
+"S@	c #8CBEF9",
+"T@	c #86B9F8",
+"U@	c #83B8FA",
+"V@	c #87BDFF",
+"W@	c #86BEFF",
+"X@	c #8FC9FF",
+"Y@	c #78B4FC",
+"Z@	c #6EAAF2",
+"`@	c #6BA9F2",
+" #	c #71B1F9",
+".#	c #7CBCFF",
+"+#	c #84C4FF",
+"@#	c #7EBEFF",
+"##	c #76B6FD",
+"$#	c #73B3FA",
+"%#	c #84C1FF",
+"&#	c #86C1FF",
+"*#	c #95C8FD",
+"=#	c #94C6FB",
+"-#	c #96C8FB",
+";#	c #A2D2FF",
+">#	c #A5D5FF",
+",#	c #9FCFFF",
+"'#	c #98CAFD",
+")#	c #91C2FC",
+"!#	c #8BBDF8",
+"~#	c #88BBFC",
+"{#	c #86BBFD",
+"]#	c #88BDFF",
+"^#	c #89BFFF",
+"/#	c #94CBFF",
+"(#	c #8DC6FF",
+"_#	c #84BDFF",
+":#	c #70ACF2",
+"<#	c #71B0F5",
+"[#	c #83C4FF",
+"}#	c #86C5FF",
+"|#	c #7AB9FE",
+"1#	c #74B3F8",
+"2#	c #89C3FF",
+"3#	c #97C9FE",
+"4#	c #97C9FA",
+"5#	c #9CCCFC",
+"6#	c #A3D2FF",
+"7#	c #A8D7FF",
+"8#	c #ABDAFF",
+"9#	c #A3D1FF",
+"0#	c #9FCDFF",
+"a#	c #98C7FF",
+"b#	c #90C1FB",
+"c#	c #8ABCFB",
+"d#	c #89BEFF",
+"e#	c #92C8FF",
+"f#	c #8EC6FF",
+"g#	c #83BDFC",
+"h#	c #78B4F3",
+"i#	c #74B1F2",
+"j#	c #79B6F9",
+"k#	c #8BC8FF",
+"l#	c #7AB7FA",
+"m#	c #7CB7F9",
+"n#	c #81BBFB",
+"o#	c #8BC1FF",
+"p#	c #9BCEFF",
+"q#	c #9BCBFC",
+"r#	c #9DCBFC",
+"s#	c #A1D0FC",
+"t#	c #A9D5FF",
+"u#	c #AFDBFF",
+"v#	c #A8D4FF",
+"w#	c #A5D1FF",
+"x#	c #9ECBFF",
+"y#	c #96C4FF",
+"z#	c #8DBDFB",
+"A#	c #8ABBFD",
+"B#	c #8ABCFF",
+"C#	c #8CBFFF",
+"D#	c #81BCF8",
+"E#	c #79B5F4",
+"F#	c #7AB7F8",
+"G#	c #88C5FF",
+"H#	c #83BEFF",
+"I#	c #7DB7F7",
+"J#	c #8EC1FF",
+"K#	c #9ED1FF",
+"L#	c #9ED0FF",
+"M#	c #9DCDFD",
+"N#	c #9CCBF9",
+"O#	c #A1CDFA",
+"P#	c #A9D4FF",
+"Q#	c #AFDAFF",
+"R#	c #ADD8FF",
+"S#	c #AAD6FF",
+"T#	c #9AC9FF",
+"U#	c #90C1FC",
+"V#	c #8CBEFD",
+"W#	c #95C9FB",
+"X#	c #99CEFF",
+"Y#	c #7FBAF6",
+"Z#	c #7AB6F4",
+"`#	c #7AB6F5",
+" $	c #8DC8FF",
+".$	c #81B8F9",
+"+$	c #7EB4F4",
+"@$	c #8ABDFC",
+"#$	c #93C5FF",
+". . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
+". . . + + @ # $ % & * = - ; > , ' ) ! ~ { = ] ^ / ( _ : : _ < + ",
+". . + + + [ } $ | 1 2 3 4 5 6 7 5 8 9 0 a b c d e _ f _ : _ < + ",
+". + + + + [ g h h % i j 9 k l m ( n o p q b c r _ f s _ _ < < + ",
+"+ + + + + t u v w x i j o y l z ( A B C r D D _ f s _ _ < < < + ",
+"+ E F G H I J K L M N O P Q R S S T U _ _ _ _ f s _ _ < < < < + ",
+"+ V W X + u Y Z `  ...+. at .#.$.%.&.%._ *.s _ f s _ _ < < < < < + ",
+"+ =.-.+ + + ;.>.,.'.).!.+.~.{.].b _ *.s _ f s _ _ < < < < < < + ",
+"+ ^./.(.+ _.;.:.<.[.}.u |.1.2.3._ *.s _ f s _ _ s _ < < < < < + ",
+"+ 4.5.6.+ 7.:.8.9.0.a.b.c.N J _ *.s _ f s _ _ s s *._ < < < < + ",
+"+ d.e.f.+ g.h.i.j.a.k.a.:.l._ *.s _ f s _ _ _ s *.*.*._ < < < + ",
+"+ m.n.u + o.k.p.q.a.r.a.s.t._ s _ f s _ _ *._ u.*.*.*.*._ _ _ + ",
+"+ v.w.I + x.k.y.: z.A.B.a.:.C._ f _ _ _ _ _ D.*.*.*.*.*.s _ _ + ",
+"+ E.F.G.+ H.k.a.I.J.K.L.M.a._ f _ *.*.*.*.*.*.*.*.*.*.*.s _ _ + ",
+"+ N.# O.+ P.Q.a.R.I.J.I.S.a._ s _ _ _ s s s *.*.*.*.*.*.s _ _ + ",
+"+ T.U.M + V.a.W.I.X.Y.Y.Z.`.a._  +a..+_ _ _ s s s s *.*.s _ _ + ",
+"+ ++ at +#++ a.$+%+&+*+=+-+;+>+a.,+'+J.a.)+!+~+_ _ _ _ s s s _ _ + ",
+"+ {+]+^++ a./+(+_+:+<+[+}+|+1+a.2+2+a.X.3+4+5+6+7+8+_ _ _ _ _ + ",
+"+ 9+0+^+a.a+b+c+d+e+f+g+X.h+i+j+k+g+l+a.I.m+n+5+o+p+q+r+i+_ _ + ",
+"+ b &.# + s+t+u+v+d+w+x+y+X.z+A+B+g+C+a.'+J.D+4+a.E+F+G+H+I+J++ ",
+"+ K+&.x + L+a+M+N+O+P+Q+R+'+S+T+I+|+;+y+a.U+I.a.V+a.a.W+X+Y+Z++ ",
+"+ `+ @. at + +@@@#@$@%@W.&@U+J.*@=@- at J+;@>@a., at a.'@I.3+C+a.x+)@!@+ ",
+"+ ~@{@]@+ ^@/@(@_@:@<@[@)+)+}@z.=@|@1 at I+W+a.2@3 at 4@Q+5 at 6@7 at 8@&++ ",
+"+ 9 at 0@a at + b at c@d@(@e@[.f at g@h at 8.V.'+;@i at j@k at Y.l@m at n@o at 5@p at l@q at r@+ ",
+"+ s at t@u at + v at w@b at N ).x at y@z at A@B@:.C at W+D@E at G+5@p at l@F at 5@6 at + G at H@I at + ",
+"+ j J at + + + + + + + + + + + + + + + + + + + + + + + + + + K at L@+ ",
+"+ M at B N at + O at P@Q@&.R at S@T at U@f.V at W@X at Z Y at Z@`@ #.#+#@###$#+ %#a+&#+ ",
+"+ *#=#-#+ ;#>#>#,#'#)#!#~#{#]#^#/#(#_#x.:#<#C@[#}#|#1#H.9.t.2#+ ",
+"+ b 3#4#5#6#7#8#9#0#a#b#c#~#]#d#e#e#f#g#h#i#j#L at k#V.l#m#n#v o#+ ",
+"+ p#%.q#r#s#t#u#v#w#x#y#z#A#B#C#1 D /#f#D#E#h#F#G#G.H#I#x at h J#+ ",
+"+ K#L#M#N#O#P#Q#R#S#9#T#U#V#C#J#P W#X#/#..Y#Z#`#H# $(#.$+$@$#$+ ",
+"+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "};
diff --git a/share/metview/icons/MLEGEND.xpm b/share/metview/icons/MLEGEND.xpm
new file mode 100644
index 0000000..9ce7bab
--- /dev/null
+++ b/share/metview/icons/MLEGEND.xpm
@@ -0,0 +1,204 @@
+/* XPM */
+static char *MLEGEND[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 166 2",
+"   c #0D0B06",
+".  c #151209",
+"X  c #1A170B",
+"o  c #211E17",
+"O  c #2E2A13",
+"+  c #302C18",
+"@  c #3B3911",
+"#  c #302D29",
+"$  c #353224",
+"%  c #3E3722",
+"&  c #35332E",
+"*  c #39342A",
+"=  c #3D3B36",
+"-  c #3E3C39",
+";  c #423F0C",
+":  c #433C2B",
+">  c #673E37",
+",  c #713333",
+"<  c #454211",
+"1  c #4C4913",
+"2  c #524E12",
+"3  c #5D5A14",
+"4  c #6A680C",
+"5  c #504624",
+"6  c #564A2D",
+"7  c #594D2E",
+"8  c #44413A",
+"9  c #4A4638",
+"0  c #4A483E",
+"q  c #524531",
+"w  c #5B4F35",
+"e  c #544C3D",
+"r  c #5A503E",
+"t  c #645C24",
+"y  c #6C5E24",
+"u  c #67593B",
+"i  c #506A37",
+"p  c #726527",
+"a  c #2D3469",
+"s  c #3B6854",
+"d  c #474646",
+"f  c #494743",
+"g  c #524F46",
+"h  c #53514D",
+"j  c #585652",
+"k  c #5C5B54",
+"l  c #5C5C5C",
+"z  c #69514E",
+"x  c #635A4A",
+"c  c #715252",
+"v  c #576647",
+"b  c #4B704A",
+"n  c #4E6657",
+"m  c #71704A",
+"M  c #6A6252",
+"N  c #6A6858",
+"B  c #706259",
+"V  c #4A5167",
+"C  c #525062",
+"Z  c #504F70",
+"A  c #586F6F",
+"S  c #656360",
+"D  c #6B6A67",
+"F  c #6D6D6D",
+"G  c #716F6E",
+"H  c #737166",
+"J  c #7A786E",
+"K  c #747272",
+"L  c #787673",
+"P  c #7D7B76",
+"I  c #7E7C7C",
+"U  c #B90C0C",
+"Y  c #8A3A2B",
+"T  c #913B2B",
+"R  c #8F3939",
+"E  c #C20A0A",
+"W  c #F10202",
+"Q  c #FF0000",
+"!  c #837F0C",
+"~  c #897033",
+"^  c #907534",
+"/  c #F17929",
+"(  c #FF7F2A",
+")  c #8F6144",
+"_  c #837253",
+"`  c #8D7951",
+"'  c #817E7E",
+"]  c #9B7979",
+"[  c #378D35",
+"{  c #51872C",
+"}  c #548E2C",
+"|  c #02F102",
+" . c #00FF00",
+".. c #308766",
+"X. c #308E6A",
+"o. c #8D8A0C",
+"O. c #979209",
+"+. c #8D812D",
+"@. c #988D27",
+"#. c #91852C",
+"$. c #958A2A",
+"%. c #908E32",
+"&. c #DCD80F",
+"*. c #F1F102",
+"=. c #FFFF00",
+"-. c #EEEA16",
+";. c #E9E618",
+":. c #F2EE13",
+">. c #E5D729",
+",. c #97876A",
+"<. c #85847C",
+"1. c #968872",
+"2. c #9F8F71",
+"3. c #A48D62",
+"4. c #B39868",
+"5. c #AD9976",
+"6. c #B39F79",
+"7. c #BCA272",
+"8. c #C6AA4A",
+"9. c #C0A36B",
+"0. c #C6AA75",
+"q. c #C4A979",
+"w. c #CDB075",
+"e. c #D5B271",
+"r. c #D8B675",
+"t. c #DABA7C",
+"y. c #29278F",
+"u. c #212B89",
+"i. c #212C90",
+"p. c #0202F1",
+"a. c #0000FF",
+"s. c #348E8E",
+"d. c #02F1F1",
+"f. c #00FFFF",
+"g. c #828080",
+"h. c #87858F",
+"j. c #8A8A8A",
+"k. c #9B8484",
+"l. c #949494",
+"z. c #9B9B9A",
+"x. c #BEA981",
+"c. c #A3A3A3",
+"v. c #AAAAAA",
+"b. c #B2A4A4",
+"n. c #B3B3B3",
+"m. c #BABABA",
+"M. c #CAB183",
+"N. c #C9B288",
+"B. c #D0B382",
+"V. c #DFBF82",
+"C. c #D5C096",
+"Z. c #D6C19B",
+"A. c #E1C28A",
+"S. c #E7CA95",
+"D. c #EACF9C",
+"F. c #EDD19C",
+"G. c #F0D7AC",
+"H. c #F4DAAB",
+"J. c #F9DEAB",
+"K. c #C2C2C2",
+"L. c #CBCBCB",
+"P. c #D3D3D3",
+"I. c #D8D7D7",
+"U. c #DBDBDB",
+"Y. c #E5E5E5",
+"T. c #FFFFFF",
+/* pixels */
+"T.T.T.U.I ' ' ' g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.L ",
+"T.T.I.' I Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"T.I.g.I G Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"P.' ' K G Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.P.Y.Y.Y.Y.I ",
+"L I K K K Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.<.X k Y.Y.Y.I ",
+"I Y.Y.U.b.] ] ] ] k.U.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' 1 ;.t P Y.Y.I ",
+"' Y.Y.Y.c U E E E , K.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.J 2 ;.+.7 g Y.Y.' ",
+"' Y.Y.Y.c W Q Q Q R K.L.j.l.c.n.m.L.I.v.j.v.H 3 -.+.7 8 Y.Y.Y.I ",
+"I Y.Y.Y.c W Q Q Q R K.K.K g.l.c.n.K.D x 5.o ; -.#.6 0 Y.Y.Y.Y.' ",
+"' Y.Y.Y.z Y T T T > K.Y.Y.Y.Y.Y.U.h ,.t.3.@ :.#.7 0 Y.Y.Y.Y.Y.I ",
+"' Y.Y.Y.B / ( ( ( ) K.U.L.P.P.L.: x.t.4.@ :.$.% X L.Y.Y.Y.Y.Y.I ",
+"' Y.Y.Y.B / ( ( ( ) K.m.l F K # N.e.` < :.$.% r C.8 U.Y.Y.Y.Y.I ",
+"' Y.Y.Y.B / ( ( ( ) K.I.m.m.& B.e.w 4 :.$.6 q A.H.6.j U.Y.Y.Y.<.",
+"' Y.Y.Y.M ~ ^ ^ ~ u K.Y.Y.z.3.9.: ! :. at .6 g _ S.H.H.2.d I.Y.Y.I ",
+"' Y.Y.Y.m *.=.=.=.%.K.U.P.v.l $ o.&. at .6 8 - q.G.H.H.H.M.= l S L ",
+"' Y.Y.Y.m *.=.=.=.%.K.m.l F $ O.3 : * * M Z.G.H.H.H.J.J.6.    G ",
+"' Y.Y.Y.m *.=.=.=.%.K.I.n.c.p >.+ 1.N.t.V.V.V.D.H.H.J.J.q.    F ",
+"' Y.Y.Y.v { } } } i K.Y.Y.N y 8.5 & f f : 3.w.e.A.F.J.J.x.    G ",
+"' Y.Y.Y.b |  . . .[ K.U.P.. O 8 c.U.Y.Y.Y.z.9 7.e.e.e.e.e.    G ",
+"' Y.Y.Y.b |  . . .[ K.m.d - K l.c.m.L.Y.Y.Y.Y.P e 0.r.e.w.    G ",
+"g.Y.Y.Y.b |  . . .[ K.P.n.m.m.L.L.I.U.Y.Y.Y.Y.Y.I.L d g :     K ",
+"' Y.Y.Y.n ..X.X.X.s K.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.& & K ",
+"g.Y.Y.Y.A d.f.f.f.s.K.U.P.P.P.U.U.U.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I ",
+"g.Y.Y.Y.A d.f.f.f.s.L.m.l F g.l.v.m.L.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I ",
+"g.Y.Y.Y.A d.f.f.f.s.K.I.m.K.L.L.P.U.U.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.g.",
+"g.Y.Y.Y.V u.i.i.i.a K.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"g.Y.Y.Y.Z p.a.a.a.y.K.P.l.z.v.n.m.L.U.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"g.Y.Y.Y.Z p.a.a.a.y.K.L.D P j.z.v.m.P.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I ",
+"g.Y.Y.Y.Z p.a.a.a.y.K.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"g.Y.Y.Y.h.C C C C C L.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"g.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.' ",
+"L g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.h.g.g.g.g.g.g.g.g.g.g.g.K "
+};
diff --git a/share/metview/icons/MSYMB.xpm b/share/metview/icons/MSYMB.xpm
new file mode 100644
index 0000000..57f653f
--- /dev/null
+++ b/share/metview/icons/MSYMB.xpm
@@ -0,0 +1,50 @@
+/* XPM */
+static char * PSYMB_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 12 1",
+/* colors */
+" 	c white",
+".	c #000073734B4B",
+"X	c black",
+"o	c #1C1CB8B8A6A6",
+"O	c #FFFF0000DADA",
+"+	c yellow",
+"@	c #D9D9B7B77777",
+"#	c #FFFFE2E2ABAB",
+"$	c #FFFF4F4F0000",
+"%	c #FFFFCC",
+"&	c blue",
+"*	c red",
+/* pixels */
+"    .......................XXX..",
+"   ..oooooooOoooooooooooooXOOXo.",
+"  ...oooooooOooooooooooooX+XOXo.",
+" ....oooooooOoooooooooooX+ at XXoo.",
+".....ooooOOOOOOOoooooooX+ at XXooo.",
+".oooooooooooOooooooXXXX+ at XXoooo.",
+".oooooooooooOoooooX#@X+ at XXooooo.",
+".oooooooooooOooooX#@X+ at XXoooooo.",
+".oooooooooooooooX#@X+ at XX@Xooooo.",
+".ooooooooooooooX#@X+ at XX@@#Xoooo.",
+".oooooooooooooX#@X+ at XXX@###Xooo.",
+".oooooooooooooX at X+@XXoX$####XXX.",
+".ooooooooooooooX+XXXXX%#####@XX.",
+".oooooooo&ooooX+X%##########@XX.",
+".ooooooooo&oooX at XXX@@@######@XX.",
+".oooooooooo&oXXXoooXXX@@@@##@XX.",
+".ooooooooooo&XooooooooXXXX@@@XX.",
+".ooooooooooo&&ooooooooooooXXXXX.",
+".oooooooooo&oo&ooooooooooooooXX.",
+".ooooooooo&oooo&ooooooooooooooo.",
+".oooooooo&oooooo&ooo***oooooooo.",
+".oooooooooooooooooo*****ooooooo.",
+".ooooooooooooooooo*******oooooo.",
+".ooooooooooooooooo*******oooooo.",
+".ooooooooooooooooo*******oooooo.",
+".oooooooooooooooooo*****ooooooo.",
+".ooooooooooooooooooo***oooooooo.",
+".oooooooooooooooooooooooooooooo.",
+".oooooooooooooooooooooooooooooo.",
+".oooooooooooooooooooooooooooooo.",
+".oooooooooooooooooooooooooooooo.",
+"................................"};
diff --git a/share/metview/icons/MTEXT.xpm b/share/metview/icons/MTEXT.xpm
new file mode 100644
index 0000000..be08cfe
--- /dev/null
+++ b/share/metview/icons/MTEXT.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * PTEXT_icon[] = {
+"32 32 12 1",
+" 	c #FFFFFFFFFFFF",
+".	c #7E7E7E7E7E7E",
+"X	c #E5E5E5E5E5E5",
+"o	c #00007F7FFFFF",
+"O	c #000000006666",
+"+	c #000000000000",
+"@	c #FFFF0000DADA",
+"#	c #FFFFFFFF0000",
+"$	c #D9D9B7B77777",
+"%	c #FFFFE2E2ABAB",
+"&	c #FFFF4F4F0000",
+"*	c #FFFFFFFFCCCC",
+"    ............................",
+"   ..XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"  ...XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+" ....XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".....                   XXXXXXX.",
+".XXX oooooooooooooooooooOXX+++X.",
+".XXX oooooooooooooooooooOX+@@+X.",
+".XXX oooooooooooooooooooO+#+ at +X.",
+".XXX oOOOOOO oooOOOOOOoo+#$++XX.",
+".XXX OXXXXXX oooOXXXXXX+#$++XXX.",
+".XXXXXXXXXXX oooOXX++++#$++XXXX.",
+".XXXXXXXXXXX oooOX+%$+#$++XXXXX.",
+".XXXXXXXXXXX oooO+%$+#$++XXXXXX.",
+".XXXXXXXXXXX ooo+%$+#$++$+XXXXX.",
+".XXXXXXXXXXX oo+%$+#$++$$%+XXXX.",
+".XXXXXXXXXXX o+%$+#$+++$%%%+XXX.",
+".XXXXXXXXXXX o+$+#$++X+&%%%%++++",
+".XXXXXXXXXXX oo+#+++++*%%%%%$+++",
+".XXXXXXXXXXX o+#+*%%%%%%%%%%$+++",
+".XXXXXXXXXXX o+$+++$$$%%%%%%$+++",
+".XXXXXXXXXXX +++OXX+++$$$$%%$+++",
+".XXXXXXXXXXX++ooOXXXXX++++$$$+++",
+".XXXXXXXXXXX oooOXXXXXXXXX++++++",
+".XXXXXXXXXXX oooOXXXXXXXXXXXX+++",
+".XXXXXXXXXXX oooOXXXXXXXXXXXXXX.",
+".XXXXXXXXXXX oooOXXXXXXXXXXXXXX.",
+".XXXXXXXXXXoooooooXXXXXXXXXXXXX.",
+".XXXXXXXXoooooooooooOXXXXXXXXXX.",
+".XXXXXXXXOOOOOOOOOOOOXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"................................"};
diff --git a/share/metview/icons/MVPROFVIEW.xpm b/share/metview/icons/MVPROFVIEW.xpm
new file mode 100644
index 0000000..0624c4d
--- /dev/null
+++ b/share/metview/icons/MVPROFVIEW.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char * VPROFVIEW_xpm[] = {
+"32 32 6 1",
+" 	c #404040404040",
+".	c #FFFFFFFFFFFF",
+"X	c #000000000000",
+"o	c #FFFF0000FFFF",
+"O	c #777777777777",
+"+	c #CCCCCCCCFFFF",
+"                                ",
+" .............................. ",
+" .                            . ",
+" .XXX.......oo............... . ",
+" . X..........o.............. . ",
+" . X..........oo............. . ",
+" .XXX..........ooo........... . ",
+" . X.....OOOOOOOOoOOOOO...... . ",
+" . X.OOOO++++++++o+++++OOOO.. . ",
+" .XXX++++++++++++o+++++++++OO . ",
+" . X+++++++++++++o+++++++++++ . ",
+" . X+++++++++++++o+++++++++++ . ",
+" . XX++++OOOOOOoooOOOOO++++++ . ",
+" . X+OOOO+++++oo+++++++OOOO++ . ",
+" . XO++++++oooo++++++++++++OO . ",
+" .XXX++++++o+++++++++++++++++ . ",
+" . X+++++++o+++++++++++++++++ . ",
+" . X+++++OOoOOOOOOOOOOO++++++ . ",
+" .XXXOOOO++oo++++++++++OOOO++ . ",
+" . XO+++++++ooo++++++++++++OO . ",
+" . X+++++++++++oooo++++++++++ . ",
+" .XXX+++++++++++++ooo++++++++ . ",
+" . X+++++OOOOOOOOOOOooo++++++ . ",
+" . X+OOOO+++++++++++++ooOOO++ . ",
+" .XXX++++++++++++++++++oo++OO . ",
+" . X++++++++++++++++++++o++++ . ",
+" . X++X++X++X++X++X++X++X++X+ . ",
+" . XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .    X  X  X  X  X  X  X  X  . ",
+" .............................. ",
+" .............................. ",
+"X                               "};
diff --git a/share/metview/icons/MWIND.xpm b/share/metview/icons/MWIND.xpm
new file mode 100644
index 0000000..1bc51b6
--- /dev/null
+++ b/share/metview/icons/MWIND.xpm
@@ -0,0 +1,49 @@
+/* XPM */
+static char * PWIND_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 11 1",
+/* colors */
+" 	s c1	c white",
+".	c #9D9D6868F0F0",
+"X	c black",
+"o	c #CCCCFF",
+"O	c #DADA0000FFFF",
+"+	c yellow",
+"@	c #D9D9B7B77777",
+"#	c red",
+"$	c #FFFFE2E2ABAB",
+"%	c #FFFF4F4F0000",
+"&	c #FFFFCC",
+/* pixels */
+"    .......................XXX..",
+"   ..oooooooooooooooooooooXOOXo.",
+"  ...ooooooooooooooooooooX+XOXo.",
+" ....oooooooooooooooooooX+ at XXoo.",
+".....ooooooooooooooooooX+ at XXooo.",
+".oooooo#oooooooooooXXXX+ at XXoooo.",
+".oooooo#o#ooooooooX$@X+ at XXooooo.",
+".oooooo#o#oooooooX$@X+ at XXoooooo.",
+".ooo#oo#o#ooooooX$@X+ at XX@Xooooo.",
+".oooo#o#o#oooooX$@X+ at XX@@$Xoooo.",
+".ooooo##o#ooooX$@X+ at XXX@$$$Xooo.",
+".oooooo#o#ooooX at X+@XXoX%$$$$XXX.",
+".ooooooo##oooooX+XXXXX&$$$$$@XX.",
+".oooooooo#ooooX+X&$$$$$$$$$$@XX.",
+".ooooooooo#oooX at XXX@@@$$$$$$@XX.",
+".oooooooooo#oXXXoooXXX@@@@$$@XX.",
+".ooooooooooo#XooooooooXXXX@@@XX.",
+".oooooooooooo#ooooooooooooXXXXX.",
+".ooooooooooooo#ooooooooooooooXX.",
+".oooooooooooooo#ooooooooooooooo.",
+".ooooooooooooooo#oooooooooooooo.",
+".oooooooooooooooo#o###ooooooooo.",
+".ooooooooooooooooo#####oooooooo.",
+".oooooooooooooooo#######ooooooo.",
+".oooooooooooooooo#######ooooooo.",
+".oooooooooooooooo#######ooooooo.",
+".ooooooooooooooooo#####oooooooo.",
+".oooooooooooooooooo###ooooooooo.",
+".oooooooooooooooooooooooooooooo.",
+".oooooooooooooooooooooooooooooo.",
+".oooooooooooooooooooooooooooooo.",
+"................................"};
diff --git a/share/metview/icons/MXSECTVIEW.xpm b/share/metview/icons/MXSECTVIEW.xpm
new file mode 100644
index 0000000..672e1c6
--- /dev/null
+++ b/share/metview/icons/MXSECTVIEW.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * XSECTVIEW_xpm[] = {
+"32 32 8 1",
+" 	c #333333333333",
+".	c #FFFFFFFFFFFF",
+"X	c #7E7E7E7E7E7E",
+"o	c #777777777777",
+"O	c #CCCCCCCCFFFF",
+"+	c #000000000000",
+"@	c #00007F7FFFFF",
+"#	c #D9D9B7B77777",
+"                                ",
+" .............................. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .X..........................X. ",
+" .X..........................X. ",
+" .X..........................X. ",
+" .X......oooooooooooooo......X. ",
+" .X..ooooOOOOOOOOOOOOOOoooo..X. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOooooooooooooooOOOOOOX. ",
+" .XOOooooOOOOOOOOOOOOOOooooOOX. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOooooooooooooooOOOOOOX. ",
+" .XOOooooOOOOOOOOOOOOOOooooOOX. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOooooooooooooooOOOOOOX. ",
+" .XOOooooOOOOOOOOOOOOOOooooOOX. ",
+" .XooOOOOOOOOOOOOOOOOOOOOOOooX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOOOOOOOOOOOOOOOOOOOOOOX. ",
+" .XOOOOOO++++++++++++++OOOOOOX. ",
+" .XOO++++@@@@@@########+++++OX. ",
+" .X++@@@@@@@@@#############++X. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/Makefile.am b/share/metview/icons/Makefile.am
new file mode 100644
index 0000000..682f621
--- /dev/null
+++ b/share/metview/icons/Makefile.am
@@ -0,0 +1,191 @@
+svg_icons = \
+	BINNING.svg \
+	BUFR.svg \
+	BUFRPICKER.svg \
+	CARTESIANVIEW.svg \
+	FOLDER.svg \
+	GEO_TO_GRIB.svg \
+	INPUTVISUALISER.svg \
+	KML.svg \
+	MLEGEND.svg \
+	NAMELIST.svg \
+	NOTES.svg  NETCDF.svg NETCDFPLUS.svg \
+	OBSFILTER.svg \
+	POBS.svg \
+	PDF.svg PNG.svg PSFILE.svg \
+	READ_TIGGE.svg RETRIEVE_TIGGE.svg \
+	SCM_INPUT_DATA.svg SCM_OUTPUT_DATA.svg SCM_RUN.svg SCM_VIS.svg \
+	SQL.svg SVG.svg SYSTEM.svg \
+	TABLE.svg TABLEREADER.svg TABLEVISUALISER.svg \
+	WASTEBASKET.svg
+
+icons =  ALIGN_BOTTOM.xpm \
+         ALIGN_LEFT.xpm \
+         ALIGN_RIGHT.xpm \
+         ALIGN_TOP.xpm \
+         BINARY.xpm \
+         BINNING.xpm \
+         BUFR.xpm \
+         CARTESIANVIEW.xpm \
+         CLEANFILE.xpm \
+         COMPUTE.xpm \
+         DATACOVERAGE.xpm \
+         DISTR_HCENTER.xpm \
+         DISTR_VCENTER.xpm \
+         DRAWING_PRIORITY.xpm \
+         ECFS.xpm \
+         FLEXTRA_PREPARE.xpm FLEXTRA_RUN.xpm FLEXTRA_FILE.xpm FLEXTRA_VISUALISER.xpm \
+	 FOLDER.xpm \
+         GDDRIVER.xpm \
+         GEOPOINTS.xpm \
+         GEOVIEW.xpm \
+         GEO_TO_GRIB.xpm \
+         GIF.xpm \
+         GRIB.xpm \
+         GRIB_TO_GEO.xpm \
+         GRIBVECTORS.xpm \
+         GeoToKML.xpm \
+         help_area.xpm \
+         help_line.xpm \
+         help_map.xpm \
+         help_point.xpm \
+         help_station.xpm \
+         HOVMOELLERDATA.xpm \
+         INPUTVISUALISER.xpm \
+         JPEG.xpm \
+         LLMATRIX.xpm \
+         lock_icon.xpm \
+         MACRO.xpm \
+         MACROPARAM.xpm \
+         MAGML.xpm \
+         MAPVIEW.xpm \
+         MAVERAGEVIEW.xpm \
+         MCOAST.xpm \
+         MCONT.xpm \
+         MGRAPH.xpm \
+         MLEGEND.xpm \
+         MTEXT.xpm \
+         MSYMB.xpm \
+         MVPROFVIEW.xpm \
+         MXSECTVIEW.xpm \
+         MWIND.xpm \
+         NAMELIST.xpm \
+         NETCDF.xpm \
+         NETCDFPLUS.xpm \
+         NEWS.xpm \
+         NOTE.xpm \
+         OBSFILTER.xpm \
+         ODB_DB.xpm \
+         BUFRPICKER.xpm \
+         OVERLAY_CONTROL.xpm \
+         PAXIS.xpm \
+         MAXIS.xpm \
+         PCOAST.xpm \
+         PCONT.xpm \
+         PDF.xpm \
+         PERCENTILE.xpm \
+         PGRAPH.xpm \
+         PLOTPAGE.xpm \
+         PLOTSUBPAGE.xpm \
+         PNG.xpm \
+         POBS.xpm \
+         POTTF.xpm \
+         DIVROT.xpm \
+         PSOUTPUT.xpm \
+         PSFILE.xpm \
+         PSYMB.xpm \
+         PTEXT.xpm \
+         PWIND.xpm \
+         READ.xpm \
+         READ_TIGGE.xpm \
+         RETRIEVE.xpm \
+         RETRIEVE_TIGGE.xpm \
+         SCM_INPUT_DATA.xpm  SCM_OUTPUT_DATA.xpm SCM_RUN.xpm SCM_VIS.xpm \
+	 SERVICE.xpm \
+         SHELL.xpm \
+         SIMPLE_FORMULA.xpm \
+         SQL.xpm \
+         STATIONS.xpm \
+         SUBPAGEDETAILS.xpm \
+         SUPERPAGE.xpm \
+         SVG.xpm \
+         SVGOUTPUT.xpm \
+         SYSTEM.xpm \
+         TABLE.xpm \
+         TABLEREADER.xpm \
+         TABLEVISUALISER.xpm \
+         TAR.xpm \
+         TIFF.xpm \
+         VELSTR.xpm \
+         VPROFILE.xpm \
+         XAVERAGE.xpm \
+         XSECTION.xpm \
+         WASTEBASKET.xpm
+
+
+#  ---------- start of module-specific icons -------------
+
+if METVIEW_MAGICS
+    icons += KML.xpm REPROJECTION.xpm
+if !METVIEW_EXTERNAL
+    icons += MetPlus.xpm
+endif
+endif
+
+if METVIEW_ODB
+    icons += ODB_FILTER.xpm ODB_VISUALISER.xpm
+endif
+
+if METVIEW_MARS_ODB
+    icons += ODB_MARS.xpm
+endif
+
+
+if METVIEW_OBSTAT
+    icons += OBSTAT_SCATTER.xpm OBSTAT_CURVE.xpm OBSTAT.xpm
+endif
+
+if METVIEW_OPERA
+    icons += OPERA_RADAR_FILTER.xpm
+endif
+
+if METVIEW_QT
+    icons += WMS_CLIENT.xpm WCS_CLIENT.xpm
+endif
+
+if METVIEW_GUI
+    icons += WEBACCESS.xpm
+endif
+
+#  ---------- end of module-specific icons -------------
+
+
+
+icons_dot_icon = $(icons:.xpm=.icon)      # e.g. FOLDER.xpm -> FOLDER.icon
+icons_dot_half = $(icons:.xpm=.half)       # e.g. FOLDER.xpm -> FOLDER.half
+
+sharedir		= $(datadir)/metview/icons
+share_DATA	= $(icons_dot_icon) $(icons_dot_half)
+
+##############################################################
+#
+# Rules to generate the icons
+#
+.svg.xpm:
+	p4 edit $*.xpm
+	./svg2xpm $*.svg
+
+.xpm.icon:
+	cp $*.xpm $*.icon
+	chmod 775 $*.icon
+
+# use 54% (17*17) because with 50% converted icons look bad
+.xpm.half:
+	./fix_last_line $*.xpm
+	convert -geometry 54% -map fixed.xpm xpm:fixed.xpm xpm:$*.half
+	rm -f fixed.xpm
+	chmod 775 $*.half
+
+
+CLEANFILES = $(icons_dot_icon) $(icons_dot_half)
+EXTRA_DIST = $(icons) fix_last_line svg2xpm
diff --git a/share/metview/icons/Makefile.in b/share/metview/icons/Makefile.in
new file mode 100644
index 0000000..30319a8
--- /dev/null
+++ b/share/metview/icons/Makefile.in
@@ -0,0 +1,581 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+
+#  ---------- start of module-specific icons -------------
+ at METVIEW_MAGICS_TRUE@am__append_1 = KML.xpm REPROJECTION.xpm
+ at METVIEW_EXTERNAL_FALSE@@METVIEW_MAGICS_TRUE at am__append_2 = MetPlus.xpm
+ at METVIEW_ODB_TRUE@am__append_3 = ODB_FILTER.xpm ODB_VISUALISER.xpm
+ at METVIEW_MARS_ODB_TRUE@am__append_4 = ODB_MARS.xpm
+ at METVIEW_OBSTAT_TRUE@am__append_5 = OBSTAT_SCATTER.xpm OBSTAT_CURVE.xpm OBSTAT.xpm
+ at METVIEW_OPERA_TRUE@am__append_6 = OPERA_RADAR_FILTER.xpm
+ at METVIEW_QT_TRUE@am__append_7 = WMS_CLIENT.xpm WCS_CLIENT.xpm
+ at METVIEW_GUI_TRUE@am__append_8 = WEBACCESS.xpm
+subdir = share/metview/icons
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+svg_icons = \
+	BINNING.svg \
+	BUFR.svg \
+	BUFRPICKER.svg \
+	CARTESIANVIEW.svg \
+	FOLDER.svg \
+	GEO_TO_GRIB.svg \
+	INPUTVISUALISER.svg \
+	KML.svg \
+	MLEGEND.svg \
+	NAMELIST.svg \
+	NOTES.svg  NETCDF.svg NETCDFPLUS.svg \
+	OBSFILTER.svg \
+	POBS.svg \
+	PDF.svg PNG.svg PSFILE.svg \
+	READ_TIGGE.svg RETRIEVE_TIGGE.svg \
+	SCM_INPUT_DATA.svg SCM_OUTPUT_DATA.svg SCM_RUN.svg SCM_VIS.svg \
+	SQL.svg SVG.svg SYSTEM.svg \
+	TABLE.svg TABLEREADER.svg TABLEVISUALISER.svg \
+	WASTEBASKET.svg
+
+icons = ALIGN_BOTTOM.xpm ALIGN_LEFT.xpm ALIGN_RIGHT.xpm ALIGN_TOP.xpm \
+	BINARY.xpm BINNING.xpm BUFR.xpm CARTESIANVIEW.xpm \
+	CLEANFILE.xpm COMPUTE.xpm DATACOVERAGE.xpm DISTR_HCENTER.xpm \
+	DISTR_VCENTER.xpm DRAWING_PRIORITY.xpm ECFS.xpm \
+	FLEXTRA_PREPARE.xpm FLEXTRA_RUN.xpm FLEXTRA_FILE.xpm \
+	FLEXTRA_VISUALISER.xpm FOLDER.xpm GDDRIVER.xpm GEOPOINTS.xpm \
+	GEOVIEW.xpm GEO_TO_GRIB.xpm GIF.xpm GRIB.xpm GRIB_TO_GEO.xpm \
+	GRIBVECTORS.xpm GeoToKML.xpm help_area.xpm help_line.xpm \
+	help_map.xpm help_point.xpm help_station.xpm \
+	HOVMOELLERDATA.xpm INPUTVISUALISER.xpm JPEG.xpm LLMATRIX.xpm \
+	lock_icon.xpm MACRO.xpm MACROPARAM.xpm MAGML.xpm MAPVIEW.xpm \
+	MAVERAGEVIEW.xpm MCOAST.xpm MCONT.xpm MGRAPH.xpm MLEGEND.xpm \
+	MTEXT.xpm MSYMB.xpm MVPROFVIEW.xpm MXSECTVIEW.xpm MWIND.xpm \
+	NAMELIST.xpm NETCDF.xpm NETCDFPLUS.xpm NEWS.xpm NOTE.xpm \
+	OBSFILTER.xpm ODB_DB.xpm BUFRPICKER.xpm OVERLAY_CONTROL.xpm \
+	PAXIS.xpm MAXIS.xpm PCOAST.xpm PCONT.xpm PDF.xpm \
+	PERCENTILE.xpm PGRAPH.xpm PLOTPAGE.xpm PLOTSUBPAGE.xpm PNG.xpm \
+	POBS.xpm POTTF.xpm DIVROT.xpm PSOUTPUT.xpm PSFILE.xpm \
+	PSYMB.xpm PTEXT.xpm PWIND.xpm READ.xpm READ_TIGGE.xpm \
+	RETRIEVE.xpm RETRIEVE_TIGGE.xpm SCM_INPUT_DATA.xpm \
+	SCM_OUTPUT_DATA.xpm SCM_RUN.xpm SCM_VIS.xpm SERVICE.xpm \
+	SHELL.xpm SIMPLE_FORMULA.xpm SQL.xpm STATIONS.xpm \
+	SUBPAGEDETAILS.xpm SUPERPAGE.xpm SVG.xpm SVGOUTPUT.xpm \
+	SYSTEM.xpm TABLE.xpm TABLEREADER.xpm TABLEVISUALISER.xpm \
+	TAR.xpm TIFF.xpm VELSTR.xpm VPROFILE.xpm XAVERAGE.xpm \
+	XSECTION.xpm WASTEBASKET.xpm $(am__append_1) $(am__append_2) \
+	$(am__append_3) $(am__append_4) $(am__append_5) \
+	$(am__append_6) $(am__append_7) $(am__append_8)
+
+#  ---------- end of module-specific icons -------------
+icons_dot_icon = $(icons:.xpm=.icon)      # e.g. FOLDER.xpm -> FOLDER.icon
+icons_dot_half = $(icons:.xpm=.half)       # e.g. FOLDER.xpm -> FOLDER.half
+sharedir = $(datadir)/metview/icons
+share_DATA = $(icons_dot_icon) $(icons_dot_half)
+CLEANFILES = $(icons_dot_icon) $(icons_dot_half)
+EXTRA_DIST = $(icons) fix_last_line svg2xpm
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .half .icon .svg .xpm
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu share/metview/icons/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu share/metview/icons/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-shareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-shareDATA \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am uninstall-shareDATA
+
+
+##############################################################
+#
+# Rules to generate the icons
+#
+.svg.xpm:
+	p4 edit $*.xpm
+	./svg2xpm $*.svg
+
+.xpm.icon:
+	cp $*.xpm $*.icon
+	chmod 775 $*.icon
+
+# use 54% (17*17) because with 50% converted icons look bad
+.xpm.half:
+	./fix_last_line $*.xpm
+	convert -geometry 54% -map fixed.xpm xpm:fixed.xpm xpm:$*.half
+	rm -f fixed.xpm
+	chmod 775 $*.half
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/share/metview/icons/MetPlus.xpm b/share/metview/icons/MetPlus.xpm
new file mode 100755
index 0000000..22254a1
--- /dev/null
+++ b/share/metview/icons/MetPlus.xpm
@@ -0,0 +1,515 @@
+/* XPM */
+static char * MetPlus_xpm[] = {
+"32 32 480 2",
+"  	c #000000",
+". 	c #FFFFFF",
+"+ 	c #D6D6FF",
+"@ 	c #E1E1FF",
+"# 	c #C8C8FF",
+"$ 	c #CFCFFF",
+"% 	c #DFDFFF",
+"& 	c #CECEFF",
+"* 	c #D7D7FF",
+"= 	c #BFBFFF",
+"- 	c #C5C5FF",
+"; 	c #CDCDFF",
+"> 	c #BCBCFF",
+", 	c #C4C4FF",
+"' 	c #C3C3FF",
+") 	c #B3B3FF",
+"! 	c #D4D4FF",
+"~ 	c #C6C6FF",
+"{ 	c #C9C9FF",
+"] 	c #BEBEFF",
+"^ 	c #D1D1FF",
+"/ 	c #D0D0FF",
+"( 	c #E4E3FF",
+"_ 	c #D9D9FF",
+": 	c #D7D8FF",
+"< 	c #E5E4FF",
+"[ 	c #F7F3FF",
+"} 	c #ECDFFF",
+"| 	c #D5D9D0",
+"1 	c #E6DFE8",
+"2 	c #F3EDEC",
+"3 	c #FDF3F4",
+"4 	c #C8CED8",
+"5 	c #CBCBD4",
+"6 	c #B8C1C4",
+"7 	c #35AAB7",
+"8 	c #C0D2E0",
+"9 	c #53A0B0",
+"0 	c #A2D8D0",
+"a 	c #61AAC9",
+"b 	c #C1B8D2",
+"c 	c #4AD8CD",
+"d 	c #B9C2D9",
+"e 	c #8FB9C4",
+"f 	c #71BFCE",
+"g 	c #A4B7B1",
+"h 	c #7AD5D1",
+"i 	c #A1D5D1",
+"j 	c #37A0C0",
+"k 	c #A4CBD9",
+"l 	c #2FA9C0",
+"m 	c #97CAD5",
+"n 	c #41A6BE",
+"o 	c #9AD0D2",
+"p 	c #4EB8D8",
+"q 	c #66B5B6",
+"r 	c #FBFBF9",
+"s 	c #97B7BB",
+"t 	c #F9E5DD",
+"u 	c #57CBC7",
+"v 	c #F6FDF2",
+"w 	c #35ADC2",
+"x 	c #93C4D3",
+"y 	c #2FCAC3",
+"z 	c #CAECE6",
+"A 	c #00C0D8",
+"B 	c #BCBCD2",
+"C 	c #7CE4D8",
+"D 	c #40B3CF",
+"E 	c #5DBFBA",
+"F 	c #30EBE7",
+"G 	c #91CCE1",
+"H 	c #09CAC5",
+"I 	c #FFFFF7",
+"J 	c #63C7C0",
+"K 	c #B1D5F9",
+"L 	c #4FE6D9",
+"M 	c #8A97C4",
+"N 	c #21DFDD",
+"O 	c #3BA7BF",
+"P 	c #F9F7F6",
+"Q 	c #FEFDFE",
+"R 	c #AFC1C0",
+"S 	c #FFFDFD",
+"T 	c #67CDCE",
+"U 	c #E3F6F3",
+"V 	c #C4CDE0",
+"W 	c #77B5CF",
+"X 	c #32C7BF",
+"Y 	c #EEDFDB",
+"Z 	c #00CAE3",
+"` 	c #EACBCE",
+" .	c #7DF0E7",
+"..	c #7BAFC8",
+"+.	c #7AD4CB",
+"@.	c #46ECE2",
+"#.	c #A0C3DB",
+"$.	c #85CFC9",
+"%.	c #F7F8F8",
+"&.	c #89CAC7",
+"*.	c #FFF9F6",
+"=.	c #43E1D9",
+"-.	c #F0C0CE",
+";.	c #2FF4E7",
+">.	c #1D9EB8",
+",.	c #F4F4F1",
+"'.	c #F9FDFB",
+").	c #FFFEFF",
+"!.	c #37D7D5",
+"~.	c #A6CDCE",
+"{.	c #BDEDEA",
+"].	c #FFF3EA",
+"^.	c #B8C0E6",
+"/.	c #83CAC5",
+"(.	c #FFF6F2",
+"_.	c #00CDC9",
+":.	c #FFE4E2",
+"<.	c #66E8E4",
+"[.	c #9ECCD4",
+"}.	c #5DCCDF",
+"|.	c #57CCD2",
+"1.	c #94CAE1",
+"2.	c #89D2CB",
+"3.	c #DAF3F1",
+"4.	c #AFD1D2",
+"5.	c #EBF6F4",
+"6.	c #60C4C3",
+"7.	c #FFE0DF",
+"8.	c #66E3DB",
+"9.	c #0B9DB7",
+"0.	c #F4F4F3",
+"a.	c #34C8C8",
+"b.	c #E3DAD8",
+"c.	c #E5F1F0",
+"d.	c #F8EDEB",
+"e.	c #F6EAE5",
+"f.	c #53E9E5",
+"g.	c #FFFDFE",
+"h.	c #57B5B5",
+"i.	c #FFE9E9",
+"j.	c #72D8D7",
+"k.	c #B5DED5",
+"l.	c #5FB4E5",
+"m.	c #48B4C0",
+"n.	c #A0C7DA",
+"o.	c #CBE9E1",
+"p.	c #F8F8F8",
+"q.	c #A2CECE",
+"r.	c #DDF4F2",
+"s.	c #57C5C5",
+"t.	c #FFDCDC",
+"u.	c #75E5DF",
+"v.	c #15AFC7",
+"w.	c #FAF7F7",
+"x.	c #59C8C9",
+"y.	c #F5F3F4",
+"z.	c #F6F4F5",
+"A.	c #79BFC0",
+"B.	c #68A1A2",
+"C.	c #FFF0F1",
+"D.	c #9ED4D4",
+"E.	c #97D5D0",
+"F.	c #DBE8EE",
+"G.	c #68BAD7",
+"H.	c #78AEC0",
+"I.	c #B1DDDA",
+"J.	c #8BC5C6",
+"K.	c #D9EEEF",
+"L.	c #8BCFD0",
+"M.	c #CFE4E5",
+"N.	c #78BFBC",
+"O.	c #40A1BD",
+"P.	c #F9FDEF",
+"Q.	c #FFFFF1",
+"R.	c #FFFFFB",
+"S.	c #FFFFFD",
+"T.	c #F8FFF6",
+"U.	c #FBFEFC",
+"V.	c #FFFFFE",
+"W.	c #F3F5EF",
+"X.	c #F9EDEA",
+"Y.	c #FFFEFA",
+"Z.	c #FFFFFC",
+"`.	c #FBF2F9",
+" +	c #FFF6ED",
+".+	c #FFFEF9",
+"++	c #F6F4F0",
+"@+	c #ECF2EE",
+"#+	c #FEFFFC",
+"$+	c #FDEAE4",
+"%+	c #E9EBEF",
+"&+	c #D3D1FD",
+"*+	c #BFBBFA",
+"=+	c #C2BFFC",
+"-+	c #B8B0F7",
+";+	c #BCB7FA",
+">+	c #D4D3FB",
+",+	c #C4C2FE",
+"'+	c #BBB1F7",
+")+	c #FFDADF",
+"!+	c #FFEDEB",
+"~+	c #FFF2F4",
+"{+	c #FFEFEE",
+"]+	c #FFEBEA",
+"^+	c #FFE5E3",
+"/+	c #FFEEED",
+"(+	c #FFE8EA",
+"_+	c #FFF7F7",
+":+	c #FFF5F4",
+"<+	c #FDFDF4",
+"[+	c #F5F6E5",
+"}+	c #FFFFF2",
+"|+	c #FCFFF5",
+"1+	c #DAE1D7",
+"2+	c #F5FCFA",
+"3+	c #DEDFF3",
+"4+	c #EDF1EE",
+"5+	c #FAFCF8",
+"6+	c #E0EAE6",
+"7+	c #E8E9EA",
+"8+	c #EEF2F1",
+"9+	c #EAEFED",
+"0+	c #ECEFF0",
+"a+	c #E8E9EB",
+"b+	c #E9EBEC",
+"c+	c #FBFFFF",
+"d+	c #F8F7F4",
+"e+	c #CCD0D1",
+"f+	c #EFEFEE",
+"g+	c #F7F8F7",
+"h+	c #DCE1DB",
+"i+	c #E3E5FE",
+"j+	c #DDD2E9",
+"k+	c #E4E0DA",
+"l+	c #FFEDFF",
+"m+	c #A0D6D0",
+"n+	c #FAECED",
+"o+	c #F3F3F2",
+"p+	c #EDEEEC",
+"q+	c #F0EEF0",
+"r+	c #D3D3D3",
+"s+	c #DCDDDE",
+"t+	c #FDFFFF",
+"u+	c #FCF9F9",
+"v+	c #EAEBEA",
+"w+	c #A6D4D5",
+"x+	c #E2E0E1",
+"y+	c #F8F3F1",
+"z+	c #F5EDE2",
+"A+	c #FCDBED",
+"B+	c #C9BED3",
+"C+	c #F3E5D9",
+"D+	c #A3BBF1",
+"E+	c #73DED4",
+"F+	c #FFEFEF",
+"G+	c #F7F6F5",
+"H+	c #F1F1F0",
+"I+	c #F3F2F3",
+"J+	c #D7D7D6",
+"K+	c #D4D4D3",
+"L+	c #F4F5F4",
+"M+	c #FDFAFA",
+"N+	c #ECEDEC",
+"O+	c #67D4D2",
+"P+	c #DAEBE3",
+"Q+	c #FFFFF9",
+"R+	c #A1D9E0",
+"S+	c #D2E3EC",
+"T+	c #BAC7D7",
+"U+	c #90B7CD",
+"V+	c #FCFDFC",
+"W+	c #9BE2D5",
+"X+	c #9BAAD9",
+"Y+	c #5FE8DF",
+"Z+	c #FFECE7",
+"`+	c #FFFDFB",
+" @	c #F1F1EF",
+".@	c #DEDFE0",
+"+@	c #F5F8F7",
+"@@	c #D9D9D8",
+"#@	c #F5F5F5",
+"$@	c #FFFFFA",
+"%@	c #31B5B7",
+"&@	c #A3B8D2",
+"*@	c #F7FFF8",
+"=@	c #6F96AF",
+"-@	c #829ACC",
+";@	c #A6FBEF",
+">@	c #91B0C4",
+",@	c #EBE9E5",
+"'@	c #66CBD5",
+")@	c #D4E6E8",
+"!@	c #42D7EA",
+"~@	c #AADED6",
+"{@	c #DAF3EF",
+"]@	c #F4ECE6",
+"^@	c #E6E4E0",
+"/@	c #E7E5E0",
+"(@	c #ECDEE7",
+"_@	c #236C82",
+":@	c #F2C0D6",
+"<@	c #0A8AA6",
+"[@	c #86BBB0",
+"}@	c #B6A9B5",
+"|@	c #5491AC",
+"1@	c #3CBBB9",
+"2@	c #00ACAA",
+"3@	c #87D4CA",
+"4@	c #1C8091",
+"5@	c #F9D2E8",
+"6@	c #246E7E",
+"7@	c #F0CFDF",
+"8@	c #0083A3",
+"9@	c #3EA498",
+"0@	c #1D82A8",
+"a@	c #1290A4",
+"b@	c #78B7CC",
+"c@	c #D9C7D2",
+"d@	c #66A5BA",
+"e@	c #7AA6BC",
+"f@	c #CDD6E0",
+"g@	c #8EADBA",
+"h@	c #E5D5E2",
+"i@	c #8C99AA",
+"j@	c #96BECD",
+"k@	c #DAD9DB",
+"l@	c #F6F5FF",
+"m@	c #F9F8FF",
+"n@	c #FEFEFF",
+"o@	c #FCFCFF",
+"p@	c #FBFBFF",
+"q@	c #FDFCFF",
+"r@	c #EEEEFF",
+"s@	c #F0F0FF",
+"t@	c #F1F1FF",
+"u@	c #FBFAFF",
+"v@	c #F3F3FF",
+"w@	c #D8D7F5",
+"x@	c #DCDBF7",
+"y@	c #C8C7F6",
+"z@	c #CBCBF6",
+"A@	c #D0D0F6",
+"B@	c #C8C5F6",
+"C@	c #D0CFF6",
+"D@	c #D5D4F6",
+"E@	c #C7C7F6",
+"F@	c #E0DFF6",
+"G@	c #B4B4F6",
+"H@	c #DFDCF6",
+"I@	c #EFEFF6",
+"J@	c #D1D1F6",
+"K@	c #E9E8F6",
+"L@	c #CAC7F6",
+"M@	c #E6E5F6",
+"N@	c #D3D3F6",
+"O@	c #E0DDF6",
+"P@	c #CACAF5",
+"Q@	c #DAD9FF",
+"R@	c #DAD8FF",
+"S@	c #E6DCFF",
+"T@	c #E3D9FF",
+"U@	c #FCFBF6",
+"V@	c #DDDACB",
+"W@	c #FFFFED",
+"X@	c #37A0B8",
+"Y@	c #F8F6F7",
+"Z@	c #FAFDFC",
+"`@	c #FFFEFE",
+" #	c #F2F7F3",
+".#	c #E8E2E3",
+"+#	c #F4F8F3",
+"@#	c #9AC0C2",
+"##	c #DBE8E3",
+"$#	c #58A5CA",
+"%#	c #62BDC1",
+"&#	c #0093A1",
+"*#	c #CFE8FF",
+"=#	c #FAF8F9",
+"-#	c #FCFFFE",
+";#	c #EAE7E5",
+">#	c #7CACB3",
+",#	c #8FCCD5",
+"'#	c #A1D8DE",
+")#	c #6BA4B4",
+"!#	c #7EB7C5",
+"~#	c #207E7C",
+"{#	c #F6FFFD",
+"]#	c #E6EEF4",
+"^#	c #13758D",
+"/#	c #BAC8DE",
+"(#	c #98B3D1",
+"_#	c #D6C6D8",
+":#	c #8199AA",
+"<#	c #FFF6FF",
+"[#	c #97D7CC",
+"}#	c #D4B2CD",
+"|#	c #F1F8F4",
+"1#	c #FFFDF5",
+"2#	c #FFE9FF",
+"3#	c #6697B6",
+"4#	c #C1BDD7",
+"5#	c #B5B2C6",
+"6#	c #FFDFF3",
+"7#	c #ECDBEC",
+"8#	c #EAD6F9",
+"9#	c #A3B9C9",
+"0#	c #E6D7EC",
+"a#	c #FFF4FB",
+"b#	c #F9D6EA",
+"c#	c #BDBFBF",
+"d#	c #FFFBFF",
+"e#	c #8FE7F8",
+"f#	c #829DB7",
+"g#	c #5AACB4",
+"h#	c #A7AFD2",
+"i#	c #999EB6",
+"j#	c #E4D8EE",
+"k#	c #297F96",
+"l#	c #879AB1",
+"m#	c #CDC4DD",
+"n#	c #699CB3",
+"o#	c #A9DADE",
+"p#	c #3B789D",
+"q#	c #9FCCE2",
+"r#	c #2790B1",
+"s#	c #91C7DE",
+"t#	c #65B0BB",
+"u#	c #4088A0",
+"v#	c #96DAD9",
+"w#	c #006294",
+"x#	c #BBF3ED",
+"y#	c #46C4C0",
+"z#	c #80C2C2",
+"A#	c #C9C9C6",
+"B#	c #F3F3E3",
+"C#	c #E0F7F0",
+"D#	c #F8F6E9",
+"E#	c #9FD7C9",
+"F#	c #FFFFF8",
+"G#	c #C1CCBB",
+"H#	c #FFFFF3",
+"I#	c #FDF9EB",
+"J#	c #CBF2E7",
+"K#	c #EEEDDC",
+"L#	c #F4F1ED",
+"M#	c #EFECEA",
+"N#	c #FAEFFF",
+"O#	c #F2F1FF",
+"P#	c #EAECFF",
+"Q#	c #E3E2FF",
+"R#	c #D0D1FF",
+"S#	c #FFD9D1",
+"T#	c #FFD4CD",
+"U#	c #F5FFFF",
+"V#	c #C0C6FF",
+"W#	c #EBE9FF",
+"X#	c #F6F6FF",
+"Y#	c #CDCAFF",
+"Z#	c #F1F3FF",
+"`#	c #E1DFFF",
+" $	c #F8FAFD",
+".$	c #D4D6FF",
+"+$	c #CFCEFF",
+"@$	c #D3D0FF",
+"#$	c #E5E2FF",
+"$$	c #E9EDFE",
+"%$	c #C7C8FF",
+"&$	c #E2E9FF",
+"*$	c #FFD9D5",
+"=$	c #FFD4D5",
+"-$	c #FCF7F5",
+";$	c #E0E0FF",
+">$	c #F3F2FF",
+",$	c #CFD2FF",
+"'$	c #CBD7FF",
+")$	c #FFD5D0",
+"!$	c #FFDAD4",
+"~$	c #FFE3DA",
+"{$	c #C6C5FF",
+"]$	c #DEDEFF",
+"                                                                ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . + @ # $ % & * = - ; > , ' & ) ! ~ { ) ] ^ @ / ^ ^ ^ ^ ; .   ",
+"  . ( _ : % < [ } . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . | 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p q .   ",
+"  . r . . . . s t u v w x y z A B C D E F G H I J K L M N O .   ",
+"  . P . Q . . R S T U V W X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>..   ",
+"  . ,.. '.).. !.. ~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9..   ",
+"  . 0.. '.Q . a.. b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v..   ",
+"  . w.. . . . x.. y.z.. . A.. B.C.D.E.F.G.H.I.. J.K.L.M.N.O..   ",
+"  . P.I Q.I R.Q.S.S.T.U.V.W.. X.. Y.Z.. `. +.+. ++. @+#+$+%+.   ",
+"  . &+*+=+-+;+>+,+'+)+. !+S.S V.~+{+]+^+. . /+(+. ]+V._+:+. .   ",
+"  . <+. . [+. . }+|+1+2+3+. . . 4+5+6+7+8+. 9+0+. a+. b+. c+.   ",
+"  . d+. . e+. . f+g+h+i+j+. ).. k+l+m+n+o+. p+q+. r+. s+. t+.   ",
+"  . u+v+. w+x+. y+Y.z+A+B+. ).. C+D+E+F+G+. H+I+. J+. K+L+. .   ",
+"  . M+N+. O+P+. Q+R+S+T+U+. V+. W+X+Y+Z+`+ @L+. at +@@@. J+#@. .   ",
+"  . . $@. %@&@. *@=@-@;@>@. , at . '@)@!@~@{@R.. ]@. ^@. /@S.. .   ",
+"  . (@_@:@<@[@}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@e at f@g at h@i at j@k at .   ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . l at m@. . n at . ).o at . p at . . q at r@n at m@s at t@o at u@v at t@. . . . . . .   ",
+"  . w at x@y at z@y at A@B at C@D at E@F at G@H at F@I at J@K at L@M at N@O at P@Q at R@R at S@S at T@.   ",
+"  . U at . V.. . V.. . V.. . . . . . . . . . . . . . V at W@. X at Q+.   ",
+"  . Y at . Z@`@`@t+. . . . . .  #. . .#. . +#. @###. $#%#. &#*#.   ",
+"  . =#. -#. . . ;#>#. ,#'#. )#!#. ~#{#]#^#. /#(#. _#:#<#[#}#.   ",
+"  . Z.|#. . 1#. 2#3#. 4#5#. 6#7#.+8#9#0#. a#b#. c#d#e#f#. g#.   ",
+"  . . h#i#j#k#l#m#. n#o#. p#. q#r#. s#t#. u#v#. w#. x#y#. z#.   ",
+"  . A#S.. B#. . C#. . D#. E#. F#G#. R.H#. I#J#. K#. $@L#. M#.   ",
+"  . N#O#P#Q#R#. S#T#U#V#W#X#Y#Z#`#!  $.$+$. @$#$$$%$&$*$=$-$.   ",
+"  . ;$;$. . >$,$'$)$!$~$. . . . {$; ]$. . . . . . . . . . . .   ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"                                                                "};
diff --git a/share/metview/icons/NAMELIST.xpm b/share/metview/icons/NAMELIST.xpm
new file mode 100644
index 0000000..86dcd95
--- /dev/null
+++ b/share/metview/icons/NAMELIST.xpm
@@ -0,0 +1,129 @@
+/* XPM */
+static char *NAMELIST[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 91 1",
+"  c #000000",
+". c #060708",
+"X c #07090A",
+"o c #0B0D0E",
+"O c #0C0E10",
+"+ c #131517",
+"@ c #151819",
+"# c #1F242A",
+"$ c #212529",
+"% c #23282D",
+"& c #272C30",
+"* c #292F33",
+"= c #293036",
+"- c #2C333B",
+"; c #2F3841",
+": c #363F49",
+"> c #3B424A",
+", c #46525E",
+"< c #4C5359",
+"1 c #4E5862",
+"2 c #4F5C69",
+"3 c #575F67",
+"4 c #515D6A",
+"5 c #596067",
+"6 c #56606B",
+"7 c #596168",
+"8 c #5E6770",
+"9 c #5E6871",
+"0 c #5C6C7C",
+"q c #626B74",
+"w c #616F7D",
+"e c #63707C",
+"r c #5E6F81",
+"t c #6B7783",
+"y c #6D7883",
+"u c #6C7C8B",
+"i c #717E8A",
+"p c #6D8195",
+"a c #7B8894",
+"s c #728698",
+"d c #74899D",
+"f c #7C8D9D",
+"g c #818D99",
+"h c #86919C",
+"j c #8794A1",
+"k c #879BAE",
+"l c #859CB3",
+"z c #8A9FB3",
+"x c #92A1AE",
+"c c #8DA0B3",
+"v c #92A4B5",
+"b c #93AEC9",
+"n c #9DB3C8",
+"m c #9FBCD8",
+"M c #A3B6C9",
+"N c #A5BACF",
+"B c #AABAC9",
+"V c #A1B9D1",
+"C c #AEC2D5",
+"Z c #AFC6DC",
+"A c #BCCAD7",
+"S c #B2C7DB",
+"D c #B3C9DD",
+"F c #B9CBDC",
+"G c #A7C7E7",
+"H c #A8C7E4",
+"J c #AECAE7",
+"K c #ABC9E8",
+"L c #B2CCE5",
+"P c #B9CEE1",
+"I c #B5CFE8",
+"U c #BDD2E7",
+"Y c #B5D0EB",
+"T c #BAD2E8",
+"R c #C3D5E7",
+"E c #C6D8E7",
+"W c #CBD9E6",
+"Q c #C4D7E8",
+"! c #C6D8E9",
+"~ c #CCDBE8",
+"^ c #D1DEE9",
+"/ c #D5E0EA",
+"( c #DBE5ED",
+") c #E0E9EF",
+"_ c #E5ECF2",
+"` c #E9EFF4",
+"' c #ECF1F6",
+"] c #F0F4F7",
+"[ c #F2F6F9",
+"{ c #F7F9FB",
+"} c #FFFFFF",
+/* pixels */
+"}}}}}}}}}}}}}}}{{}}}}}}}}}}}}}}}",
+"}}}}}}}}}}}[`((((((_]{}}}}}}}}}}",
+"}}}}}}}}{'(/^^^^^^^^/(`{}}}}}}}}",
+"}}}}}}}](/^~~~~~~~~~^^^('}}}}}}}",
+"}}}}}}`/^^~~~E!~E~~~~~~^/_{}}}}}",
+"}}}}}_/~~^~~~!E!EEQ~!~~^~^_}}}}}",
+"}}}}'/^~Aq573hQRFy57755g~^^_}}}}",
+"}}}'/^~~B+   %NRC&     <E~^^'}}}",
+"}}}(^~~~B@    tUC*     <RW~^({}}",
+"}}'^^~E~Da7X  &VDfu; %txEE~^^_}}",
+"}}(^~~QRRQvO  .uIIT6 >P!EEW~^({}",
+"}[/^~EERUUvO X =VLL4 >DUREEE~/'}",
+"}`^^~EERUTvoo>. uJJ4 >SURRE~~^)}",
+"}_^~~ERUUTzoOs& -mJ4 >ZTUEEE~^(}",
+"{(^~~ERUTTzoOlr .pK2 >ZTUREE~^({",
+"}(^~EERUTTzoOlb# ;m2 >ZPUREE~^({",
+"{(^~~ERUTTcoolG0 Xd4 >ZPUREE~~({",
+"})^~EERUPTcoolGb# :, >ZTUREQ~^({",
+"})^~~ERUTTcoolKH0 o# >DUUR!~~~(}",
+"}`^~~ERRUTcoOlJJb#   >DUUQ!~^^_}",
+"}[/~~EEERRvOocYLLw   >DUEEE~~^]}",
+"}}(^~~EQSi1XX1elLn$  >DREEE~^({}",
+"}}'^^~EQB+     6TTw  >FREE~^^_}}",
+"}}}(^~~~B+     6UTM$ >F~EE~^({}}",
+"}}}]/^~~Atqqqq9kUUUj8gEE~~^^'}}}",
+"}}}}`/^~~~~~!!!QRRR!~~E~~^/_}}}}",
+"}}}}}_^^~~~E!!QR!!EE!~~~^^){}}}}",
+"}}}}}}'/^^~~~~!~EEE~~~~^/_}}}}}}",
+"}}}}}}}'(/^~~~~~~~~^~^^('}}}}}}}",
+"}}}}}}}}{'(/^^^^^^^^/(`{}}}}}}}}",
+"}}}}}}}}}}}]`)(((()_[{}}}}}}}}}}",
+"}}}}}}}}}}}}}}{}{{}}}}}}}}}}}}}}"
+};
diff --git a/share/metview/icons/NETCDF.xpm b/share/metview/icons/NETCDF.xpm
new file mode 100644
index 0000000..2fc66d6
--- /dev/null
+++ b/share/metview/icons/NETCDF.xpm
@@ -0,0 +1,135 @@
+/* XPM */
+static char *NETCDF[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 97 2",
+"   c #1F3D44",
+".  c #203E45",
+"X  c #234148",
+"o  c #2A474E",
+"O  c #2C484F",
+"+  c #39545B",
+"@  c #1C5867",
+"#  c #1E5A69",
+"$  c #215C6B",
+"%  c #2B6371",
+"&  c #366C79",
+"*  c #396E7B",
+"=  c #3F727F",
+"-  c #425B62",
+";  c #616262",
+":  c #6F7372",
+">  c #737474",
+",  c #777A79",
+"<  c #7A7C7C",
+"1  c #437581",
+"2  c #497985",
+"3  c #58848F",
+"4  c #5B8691",
+"5  c #7F8382",
+"6  c #6C939D",
+"7  c #848685",
+"8  c #838887",
+"9  c #878989",
+"0  c #8B8B8B",
+"q  c #8A908F",
+"w  c #809D97",
+"e  c #819E98",
+"r  c #949595",
+"t  c #969998",
+"y  c #9A9C9C",
+"u  c #85A19B",
+"i  c #88A39E",
+"p  c #9EA0A0",
+"a  c #97A5A9",
+"s  c #95ADA8",
+"d  c #9CA9AD",
+"f  c #9AB2AD",
+"g  c #8CABB3",
+"h  c #91AFB6",
+"j  c #9FB5B0",
+"k  c #96B2B9",
+"l  c #98B3BA",
+"z  c #A2A3A3",
+"x  c #A4ABAA",
+"c  c #ABADAD",
+"v  c #A1B6B2",
+"b  c #ABB2B3",
+"n  c #ACBFBB",
+"m  c #B3B4B4",
+"M  c #B4BBBB",
+"N  c #BBBCBC",
+"B  c #AEC1BD",
+"V  c #B0C3BF",
+"C  c #A6BDC3",
+"Z  c #BEC2C2",
+"A  c #B7C8C4",
+"S  c #B9C9C6",
+"D  c #BFC7C9",
+"F  c #B5C9CE",
+"G  c #BFD0D4",
+"H  c #C2C4C4",
+"J  c #C5CBCA",
+"K  c #CBCDCD",
+"L  c #C4D2CF",
+"P  c #C8D0CF",
+"I  c #C6CDD0",
+"U  c #C5D3D0",
+"Y  c #C9D5D3",
+"T  c #CDD9D6",
+"R  c #CAD8DB",
+"E  c #D3D5D4",
+"W  c #D4D8D7",
+"Q  c #D5DCDB",
+"!  c #D9DCDC",
+"~  c #D7E0DF",
+"^  c #D2DEE1",
+"/  c #DADFE0",
+"(  c #D5E0E3",
+")  c #DEE6E4",
+"_  c #DFE7E9",
+"`  c #E0E6E5",
+"'  c #E1E8E6",
+"]  c #E4EAEA",
+"[  c #EAECEC",
+"{  c #F0EFEF",
+"}  c #EBF0EE",
+"|  c #E9EFF1",
+" . c #EDF1F1",
+".. c #F2F5F5",
+"X. c #F6F8F7",
+"o. c #F6F9F8",
+"O. c #FFFFFF",
+/* pixels */
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.] D D D D I X.O._ G G G G R o.O.' ~ / / ) } O.o.o.o.o.o.o.O.O.",
+"O.d O O O o - ! O.h % % % % 2  .X.f i u i i S O. .' ' ' ' ] O.O.",
+"O.a   .     + Q O.g # # # # = | X.s 6 u u w V O. .' ' ) ` ] O.O.",
+"O.a   . .   + Q O.g # $ # # = | ..s u u w w V O. .` ) ` ) ] o.O.",
+"O.a         + ^ O.g $ $ $ # = } ..s 6 e e e A O. .) ) ` ) ' O.O.",
+"O.d . X X   + ^ O.g $ $ $ # 1  .X.f i u u e A O. .) ' ` ' ] O.O.",
+"O.( b b b b n ..O.^ C C C C F o.O.~ T T T Y ' O.o.........X.O.O.",
+"O.O.o.o.o.o.o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.F 4 4 4 4 6 ] O.) S S S D L X.X.Q Y Y T Y ) O.o..... . ...O.O.",
+"O.l # # # # & ( O.T f j j j B X.X.B j j j j Y O. .) ) ' ) ] O.O.",
+"O.l # $ $ $ * ( O.T v v v v B X.X.B j v v j U O. .) ` ) ` ] o.O.",
+"O.l # $ $ # * ( O.T v v v j B X.X.V j v v j Y O. .) ) ' ) ' O.O.",
+"O.k @ # $ @ * ( O.W j j j j M o.X.B j j j j P O.} ` ) ) ) ' O.O.",
+"O.F 4 4 3 3 6 ] O.~ A A S S L o.o.J V V V N Q O...] [ [ ' [ O.O.",
+"O.o.........X.o.O.O.X.[ o.{ H c K X.E x c H { X.N c c H X.o.O.O.",
+"O.O.X...{ O.O...[ O.! r { t r M 5 K z 7 m 9 c [ : x m K X.O.O.O.",
+"O...t 9 5 V E q q m m ; b , [ O.` E y m X.! > E , K ! ' { ..O.O.",
+"O.[ : x x 8 7 7 c > N 7 M 7 [ O.O.{ r c ..` < K ; < 9 J } ..O.O.",
+"O.[ , J M 7 < 0 N p Z 9 E > ! O.N m r c ..P , W < ! [ [ } ..O.O.",
+"O.[ 5 J M 0 c 7 p z E > K p < t < J y > q , m [ 9 ` ..} } } O.O.",
+"O. .J ~ Q P ) E E [ [ K ! [ K H ` ..! Z H W X.o.! [  . .} ..O.O.",
+"O...' ' ) ' ' O.O.o....... ...O.O.o.X.o.o.o.o.O.O.o.o.o.o.o.O.O.",
+"O.O.O.o.X.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O."
+};
diff --git a/share/metview/icons/NETCDFPLUS.xpm b/share/metview/icons/NETCDFPLUS.xpm
new file mode 100755
index 0000000..9c8b7a6
--- /dev/null
+++ b/share/metview/icons/NETCDFPLUS.xpm
@@ -0,0 +1,207 @@
+/* XPM */
+static char *NETCDFPLUS[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 169 2",
+"   c #1DCB217F1B65",
+".  c #21AE24F21F5B",
+"X  c #229C262220AE",
+"o  c #2674298E23DA",
+"O  c #2DCE310C2AA1",
+"+  c #39463CD4368A",
+"@  c #3EBC42893D17",
+"#  c #402542D43D38",
+"$  c #1EE83D4C446D",
+"%  c #207B3EB045BB",
+"&  c #22BE409C47AE",
+"*  c #23B3416B4881",
+"=  c #2B0547C74E9B",
+"-  c #2BEA48A04F48",
+";  c #3F2044F340BA",
+":  c #3A1454815B59",
+">  c #1E415A486984",
+",  c #212F5C676B75",
+"<  c #2B8664037267",
+"1  c #37296CB87A6D",
+"2  c #39CC6EAD7C37",
+"3  c #3F7C72747F86",
+"4  c #451747744112",
+"5  c #440A4A084606",
+"6  c #4A984CDE46A4",
+"7  c #44634C3B4915",
+"8  c #4C7A4F764A37",
+"9  c #4D2550574B42",
+"0  c #44154AFC5AA0",
+"q  c #4E6B57285514",
+"w  c #49BE50385F57",
+"e  c #5211556950C4",
+"r  c #57C25982536B",
+"t  c #59FB5C7B5734",
+"y  c #5D055EFC5938",
+"u  c #5E9B61785CA8",
+"i  c #609D63645ED0",
+"p  c #4C5152AF6169",
+"a  c #42E35C2962B7",
+"s  c #401572E67FEC",
+"d  c #61F464D66032",
+"f  c #6CA86DBA67D8",
+"g  c #671D6EE469D6",
+"h  c #6C0B6F486ADF",
+"j  c #62EC71D06C07",
+"k  c #73B574806ED3",
+"l  c #6F27738E7E76",
+"z  c #6D3578457890",
+"x  c #739D75D871B9",
+"c  c #708F74C37F80",
+"v  c #71A17D267AF5",
+"b  c #E62735E63591",
+"n  c #E63744044370",
+"m  c #E6524E664D8D",
+"M  c #E66752425147",
+"N  c #E66B59A75881",
+"B  c #E69C64576313",
+"V  c #E676690967AD",
+"C  c #E6AD6D526BDE",
+"Z  c #E6C371056F57",
+"A  c #E6B174D17326",
+"S  c #721983017D46",
+"D  c #7EF281147D28",
+"F  c #43587577822E",
+"G  c #49CF7A30867F",
+"H  c #71E6762280A2",
+"J  c #59D985F5915D",
+"K  c #5D1888759384",
+"L  c #77E983A384B4",
+"P  c #795C8513862C",
+"I  c #6D11942C9E23",
+"U  c #873387A682E6",
+"Y  c #880188748393",
+"T  c #8932898584B8",
+"R  c #810184128D14",
+"E  c #90B4925F8F0A",
+"W  c #8705897E9144",
+"Q  c #8A268CF29435",
+"!  c #8F2891CF98A1",
+"~  c #81C29F0C98F9",
+"^  c #92AF964A9300",
+"/  c #95B498DA95B8",
+"(  c #9C1C9D8A9A1B",
+")  c #850CA1A79BC5",
+"_  c #88D3A4939ED2",
+"`  c #9EF0A045A4FC",
+"'  c #9888A658A9D6",
+"]  c #95B8AE64A971",
+"[  c #9D49AA76ADF6",
+"{  c #9B7CB2DAAE21",
+"}  c #8D4FAC0EB3ED",
+"|  c #9257AFB8B755",
+" . c #975EB387BA5B",
+".. c #98C9B4A1BB52",
+"X. c #A7F0A6CDA21F",
+"o. c #A6E1AA16A778",
+"O. c #A678B2F5B666",
+"+. c #A8B4B44DB755",
+"@. c #A813B73EBC3B",
+"#. c #AB1FBA78BFA0",
+"$. c #B4E6B61CB3E6",
+"%. c #BD09BB68B7AF",
+"&. c #B19CBC29BE98",
+"*. c #BE54BEE7BDBF",
+"=. c #E6D785D28404",
+"-. c #E6E08A278802",
+";. c #E8E08F698D4B",
+":. c #E72096F9949B",
+">. c #E7199A0397A0",
+",. c #C132BF54BAED",
+"<. c #E740A38CA0F5",
+"1. c #E74FAB39A853",
+"2. c #E744B2A9AFB6",
+"3. c #E76FB703B3EF",
+"4. c #EAE3B4F8B187",
+"5. c #E77ABE19BACB",
+"6. c #B131C0B5BCFB",
+"7. c #C216C045BBD7",
+"8. c #E7A6C0A8BD59",
+"9. c #E981C0BFBD99",
+"0. c #A768BF35C539",
+"q. c #A886C036C638",
+"w. c #C0B5C015C0A6",
+"e. c #B810C89CC533",
+"r. c #B8C5C935C5D0",
+"t. c #B743CAD9CFC5",
+"y. c #BED4C968CA15",
+"u. c #B8CECBB8D083",
+"i. c #BFC8D0E7D550",
+"p. c #C1E2C13EC1C8",
+"a. c #C97AC80AC6B2",
+"s. c #CA9EC926C7AD",
+"d. c #C0CAC970CB6F",
+"f. c #CACFCB14C958",
+"g. c #D1E4CFDECC5A",
+"h. c #D2BCD173CF97",
+"j. c #C730CEE9D0DD",
+"k. c #CE6BDABBD9AE",
+"l. c #D84CD5D8D19B",
+"z. c #D95FD6E1D2A5",
+"x. c #D420DC9FDBFF",
+"c. c #D95FDE46DFD1",
+"v. c #E79BC7C9C44C",
+"b. c #E7A7CE58CAB9",
+"n. c #E7B6D68FD2E0",
+"m. c #E7C8DAF4D72A",
+"M. c #EB4DDBCDD790",
+"N. c #E7CDDFD0DBF3",
+"B. c #E9CEDD82D992",
+"V. c #E02BE0B7DFB4",
+"C. c #E7DFE28BDE93",
+"Z. c #ED60E3B5DF2B",
+"A. c #D3CADFCAE284",
+"S. c #D66EE189E4A6",
+"D. c #DC60E4F2E32F",
+"F. c #E05EE8D1EAF3",
+"G. c #E574E699E461",
+"H. c #EA00E72EE328",
+"J. c #E280E8EBE736",
+"K. c #EB52E8F6E492",
+"L. c #E53EEB22EACB",
+"P. c #EC9EED4BECA8",
+"I. c #EC9EF0DCEFD4",
+"U. c #EAAFF050F1DE",
+"Y. c #EE58F28EF230",
+"T. c #F464F703F705",
+"R. c #F64FF882F7EA",
+"E. c #F74FF9C2F9DE",
+"W. c #FF75FF97FF91",
+/* pixels */
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.L.d.y.y.y.j.R.W.F.i.i.i.i.k.E.W.L.D.D.D.D.I.W.E.E.E.E.E.E.W.W.",
+"W.[ = - - = a c.W.| < < < < G Y.R.{ _ _ _ _ y.W.Y.J.J.J.J.L.W.W.",
+"W.' $ % % $ : x.W.} > , , > 3 U.R.] ~ ~ ~ ~ e.W.Y.J.J.J.J.L.W.W.",
+"W.' $ % % % : x.W.} , , , > s U.R.] ~ ~ ~ ~ e.W.Y.J.J.J.J.L.W.W.",
+"W.' $ % % $ : x.W.} > , , > 3 U.R.] ~ ~ ~ ~ e.W.Y.J.J.J.J.L.W.W.",
+"W.[ & * * & : c.W.} , , , , F Y.R.] ) ) ) ) r.W.Y.J.J.J.J.L.W.W.",
+"W.D.+.O.+.O.&.T.W.A.0.0.q.q.t.E.W.D.k.k.k.k.L.W.E.T.R.R.T.E.W.W.",
+"W.W.E.E.E.E.E.W.W.W.W.E.P.K.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.P.E.",
+"W.u.K K K K I L.W.D.6.g # @ @ # # @ @ @ @ @ # # # # # # # @ 5 D ",
+"W. .> > > > 1 S.W.x.S + X.%.*.,.,.,.,.,.,.,.,.,.,.,.,.,.,.7.( O ",
+"W...> , , , 2 S.W.x.j t h.R h.K.H.H.K.9.;.B.H.H.H.H.H.H.H.K.z.6 ",
+"W...> , , , 2 S.W.x.j y a.0 p.H.H.H.m.B b 8.H.H.H.H.H.H.H.H.l.6 ",
+"W. .> > > > 1 S.W.x.j y s.w p.H.H.H.>.m M :.K.m.5.m.H.H.H.H.l.6 ",
+"W.t.J J J J I L.W.D.v y s.w p.H.H.v.M <.-.C v.Z n A b.H.H.H.l.6 ",
+"W.E.T.T.T.T.T.W.W.W./ y s.p w.H.C.A C N.3.n m C 2.V N 3.C.H.l.6 ",
+"W.W.W.W.W.W.W.W.W.W.( y s.p *.H.1.m 8.H.n.V -.m.H.m.=.M 5.H.l.6 ",
+"W.R.I.I.I.I.Y.W.W.W./ y s.p *.B.B ;.H.H.C.m.C.H.H.H.C.3.b.H.l.6 ",
+"W.Y.D.D.D.D.D.E.W.E.^ y f.p p.Z.4.M.K.K.K.K.K.K.K.K.K.K.K.K.l.6 ",
+"W.Y.D.D.D.D.D.E.W.E.^ y f.0 H Q Q Q Q Q Q Q Q Q Q Q W W W ` g.6 ",
+"W.Y.D.D.D.D.D.E.W.E.^ r h.R l l l l l c c c c c c H H H c ! f.4 ",
+"W.Y.D.D.D.D.D.E.W.E.*.+ k Y U U U U U T T T T T Y Y Y Y Y T f O ",
+"W.T.J.J.J.J.L.E.W.E.P.o.h u y u u u t o . o o   8 u u u u u x $.",
+"W.W.W.W.W.W.W.W.W.W.W.R.( d u u u u t o   X .   9 u u u u i / P.",
+"W.W.W.W.W.W.W.W.W.W.W.$.@ z L L L L L P P P P P L L L L L v @ E ",
+"W.W.W.W.W.W.W.W.W.W.W.( 7 O.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. at .q x ",
+"W.W.W.W.W.W.W.W.W.W.W.V.y @ 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ; e s.",
+"W.W.W.W.W.W.W.W.W.W.W.W.P.h.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.P.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W."
+};
diff --git a/share/metview/icons/NEWS.xpm b/share/metview/icons/NEWS.xpm
new file mode 100644
index 0000000..43398c5
--- /dev/null
+++ b/share/metview/icons/NEWS.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static char * NEWS_icon[] = {
+"32 32 4 1",
+" 	c #858585858585",
+".	c #FFFFFFFFFFFF",
+"X	c #000000000000",
+"o	c #CCCCCCCCCCCC",
+"                                ",
+" .............................. ",
+" XX....XXX..................... ",
+" .XX....X...................... ",
+" .XX....X...................... ",
+" .X.X...X...XX..XXX.XX.XX..XXX. ",
+" .X..X..X..X..X..X..X..X..X..X. ",
+" .X..X..X..XXXX..XX.X.XX..XX... ",
+" .X...X.X..X......X.X.X.....XX. ",
+" .X....XX..XX..X..XX.X....X..X. ",
+" XXX....X...XXX...X..X....XXX.. ",
+" .............................. ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .............................. ",
+" .............. ..            . ",
+" .XXX.X..XXX... .. oooooooooo . ",
+" .............. .. ooooooXooo . ",
+" .XXX.XXX..XX.. .. oooooXoXoo . ",
+" .............. .. oooooXoXoo . ",
+" .XX..XX..XXX.. .. ooooooXooo . ",
+" .............. .. oooooXXXoo . ",
+" .XXX.XX.XX.X.. .. ooooXXXXXo . ",
+" .............. ..            . ",
+" .XX.XX..XX.X.. ............... ",
+" .............. ..XX.X.XXX..X.. ",
+" .XXX..X.XX.X.. ............... ",
+" .............. ..XXX.X.XXX.X.. ",
+" .XX.XX.X.X.X.. ............... ",
+" .............. ..XXX.X.XX.XX.. ",
+" .X.XXX.XX.XX.. ............... ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/NOTE.xpm b/share/metview/icons/NOTE.xpm
new file mode 100644
index 0000000..122f5da
--- /dev/null
+++ b/share/metview/icons/NOTE.xpm
@@ -0,0 +1,212 @@
+/* XPM */
+static char *NOTE[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 174 2",
+"   c #5A4827",
+".  c #55472B",
+"X  c #56482D",
+"o  c #776F30",
+"O  c #797131",
+"+  c #74743D",
+"@  c #78773B",
+"#  c #747444",
+"$  c #757449",
+"%  c #806B3C",
+"&  c #92743F",
+"*  c #8A7444",
+"=  c #9D7E46",
+"-  c #917A4C",
+";  c #8D6A52",
+":  c #8E7851",
+">  c #947D51",
+",  c #9D7861",
+"<  c #9C834D",
+"1  c #9E865A",
+"2  c #A18957",
+"3  c #BC9C52",
+"4  c #ABAA4E",
+"5  c #BBB34B",
+"6  c #B5B456",
+"7  c #B6B458",
+"8  c #BBBA5D",
+"9  c #9F8765",
+"0  c #9F886D",
+"q  c #9A9977",
+"w  c #9B9A7C",
+"e  c #A08862",
+"r  c #A0886A",
+"t  c #BEBD63",
+"y  c #BAB97D",
+"u  c #D0A65E",
+"i  c #C5AA67",
+"p  c #C8AD6D",
+"a  c #D9BD6A",
+"s  c #CAAF73",
+"d  c #D8BC73",
+"f  c #D1B77F",
+"g  c #D4B87B",
+"h  c #CFC256",
+"j  c #D1C458",
+"k  c #C2C26B",
+"l  c #CFCD6E",
+"z  c #D7D660",
+"x  c #D9D762",
+"c  c #D5D36B",
+"v  c #C6C573",
+"b  c #CACA74",
+"n  c #C4C479",
+"m  c #CCCB7C",
+"M  c #D1CF71",
+"N  c #D2D071",
+"B  c #8F8E85",
+"V  c #8C8B8A",
+"C  c #918989",
+"Z  c #9C9B82",
+"A  c #96958D",
+"S  c #9C9D8C",
+"D  c #988F90",
+"F  c #959592",
+"G  c #9C9292",
+"H  c #9B9A92",
+"J  c #9C9C9A",
+"K  c #AC9180",
+"L  c #B69990",
+"P  c #A5A484",
+"I  c #ACAC84",
+"U  c #A5A48B",
+"Y  c #AEAD89",
+"T  c #B0AF89",
+"R  c #ACAC94",
+"E  c #A6A69F",
+"W  c #BCBB94",
+"Q  c #B5B59D",
+"!  c #BCBC9C",
+"~  c #ADADA2",
+"^  c #B2B2A3",
+"/  c #BDBDA3",
+"(  c #B5B5AA",
+")  c #BABAAC",
+"_  c #BCBCB1",
+"`  c #CEB485",
+"'  c #CBB18A",
+"]  c #D1B585",
+"[  c #D3B78B",
+"{  c #C0BF9A",
+"}  c #D9BE95",
+"|  c #C3B6B7",
+" . c #CEC386",
+".. c #D6D787",
+"X. c #D2D18F",
+"o. c #D8D88A",
+"O. c #C4C497",
+"+. c #C4C49D",
+"@. c #DACC92",
+"#. c #D3D290",
+"$. c #E9C994",
+"%. c #EFD79E",
+"&. c #EFD89F",
+"*. c #E4E39E",
+"=. c #C5C5A5",
+"-. c #CECDAC",
+";. c #D0CFA1",
+":. c #D2D1A3",
+">. c #D4D3A9",
+",. c #DDDDAB",
+"<. c #C3C3B4",
+"1. c #CBCBB3",
+"2. c #CACABB",
+"3. c #D6D6B7",
+"4. c #DBDBB5",
+"5. c #DDDDBA",
+"6. c #E3E2A0",
+"7. c #E3E2AC",
+"8. c #E9E8AF",
+"9. c #F4E5A5",
+"0. c #F9EEA8",
+"q. c #E3E2B5",
+"w. c #E8E7B4",
+"e. c #EDECB5",
+"r. c #E3E2BB",
+"t. c #F7ECB3",
+"y. c #F8EEB2",
+"u. c #F9EEBA",
+"i. c #F3F2B7",
+"p. c #FFFFB4",
+"a. c #F4F3B8",
+"s. c #FEFEBE",
+"d. c #C1C1C0",
+"f. c #CECEC5",
+"g. c #D2C5C5",
+"h. c #D6C9C8",
+"j. c #DACCCC",
+"k. c #DCDCC5",
+"l. c #D3D3CA",
+"z. c #DFDFC9",
+"x. c #DECFD0",
+"c. c #D1D0D1",
+"v. c #E3D4D5",
+"b. c #E7DADA",
+"n. c #E3E3C5",
+"m. c #EFEEC1",
+"M. c #E3E3CC",
+"N. c #ECECCD",
+"B. c #F9EEC2",
+"V. c #F6EDCB",
+"C. c #F8EECB",
+"Z. c #F3F3C3",
+"A. c #FEFEC3",
+"S. c #F2F2CB",
+"D. c #FEFECB",
+"F. c #E3E3D4",
+"G. c #E3E3DA",
+"H. c #F0F0D0",
+"J. c #FAF0D5",
+"K. c #FEFED4",
+"L. c #FAF0DC",
+"P. c #FEFEDC",
+"I. c #E5E5E1",
+"U. c #ECECE4",
+"Y. c #E9E9E9",
+"T. c #F7EDE6",
+"R. c #F3EBEB",
+"E. c #FAF0E3",
+"W. c #FEFEE3",
+"Q. c #F5F5EC",
+"!. c #FAF0ED",
+"~. c #FFFFEC",
+"^. c #FEFEF4",
+"/. c #FEFEFD",
+/* pixels */
+"/.R.v.v.| G v.2.C v.2.C v.g.V x.h.V j.h.C j.j.C h.j.C g.v.b.^./.",
+"/.L & < %   = * . < * . < * X < - . > - X - > X : 1 X : 1 ; v./.",
+"/.K 5 z 4 o a 5 @ c 8 + l t @ l k + b k # v v $ v m $ y ..1 h./.",
+"/.K 5 x 4 o h 6 O c 8 + c i + N k # M v # b b $ n m $ n o.1 h./.",
+"/.K 5 z 4 O j 7 @ c 8 + N t + c k + b k # b b $ v m $ n o.1 h./.",
+"/.K 3 a 3 < u p 1 d p 2 g s 1 g s 9 f ` e ] ] r ` [ 0 ' } , h./.",
+"/.H  .0.0.%.$.y.t.u.u.u.B.B.B.C.C.V.V.J.J.L.L.L.E.E.T.T.!.G c./.",
+"/.H X.p.p.9.%.A.s.,.,.r.w.w.4.=.S.P.H.R S S ^ <.<._ U././.J c./.",
+"/.H #.p.p.9.&.A.a.I q q w w Z ! N.P.K.k.k.k.1.( ( d.Q.^./.J l./.",
+"/.H X.p.p.9.&.s.s.A.A.D.S.D.K.K.K.P.P.W.W.W.~.~.^.^.^././.J c./.",
+"/.H X.p.p.9.%.s.A.A.D.D.D.K.K.K.K.P.P.W.W.W.~.~.~.^./.^./.J c./.",
+"/.H X.p.p.9.%.s.i.:.;.;.>.,.5.r.5.3.1.N.W.~.F.) ) ( _ Q./.J c./.",
+"/.H X.p.p.9.%.s.8.I I P P w w Z Z U R n.W.W.M._ _ <.f.^./.J c./.",
+"/.H X.p.p.9.%.s.A.A.D.D.D.K.K.K.P.P.P.W.W.~.~.~.^.^.^././.J c./.",
+"/.H #.p.p.9.%.s.s.A.A.D.D.K.K.K.K.P.P.W.W.W.W.~.~.^.^.^./.J c./.",
+"/.H #.p.p.9.%.s.A.A.A.D.D.D.K.K.P.P.P.W.W.W.~.~.^.^.^././.J c./.",
+"/.H X.p.p.9.%.s.s.7.W W { Z.{ U ! / / M.W.M.( ( ^ E E l./.J c./.",
+"/.H X.p.p.9.%.s.A.7.W W +.Z.n.-./ ! / n.W.M.<.<.2.f.f.U./.J c./.",
+"/.H #.p.p.9.%.s.s.A.D.D.D.D.K.K.P.P.W.W.W.~.~.~.~.^.^././.J c./.",
+"/.H #.p.p.9.%.s.A.A.A.D.D.K.K.K.K.P.P.P.W.W.~.~.^.^.^.^./.J c./.",
+"/.H #.p.p.9.&.s.s.A.Z.e.r.q.4.4.r.n.H.W.W.k.<.) ) F.^././.J c./.",
+"/.H X.p.p.9.%.s.s.O.q w w w Z Z Z Z / P.W.2.^ ) <.G.^.^./.J c./.",
+"/.H X.p.p.9.%.s.A.e.w.Z.D.D.K.K.P.K.J.P.W.W.~.~.^.^.^.^./.J c./.",
+"/.H X.p.p.9.%.s.s.A.A.D.D.D.K.K.P.P.P.W.W.W.~.~.~.~.^././.J c./.",
+"/.H X.p.p.9.%.s.A.A.A.D.D.D.K.K.K.P.P.W.W.W.~.~.^.^.^.^./.J c./.",
+"/.H X.p.p.9.%.s.s.A.A.D.D.K.K.K.P.P.P.P.W.W.~.~.~.^.^././.J c./.",
+"/.H #.p.p.9.%.s.s.W T +.W ! m.S.R Q Q ~ k.E.^ ~ ( H f.^./.J c./.",
+"/.H #.p.p.9.%.s.s.7.O.Y W =.m.K.4./ / 1.N.W.k.2.<.l.T././.J c./.",
+"/.H X.p.p.9.&.A.A.A.D.D.D.K.K.P.P.P.W.W.~.W.~.~.^.^./././.J c./.",
+"/.A y *.6. at . .7.7.7.7.q.q.q.r.5.r.n.n.n.z.z.F.F.F.F.G.x.I.V c./.",
+"/.d.B B A C D A B A A V A A F F A A A F F F F F F F F F F F Y./.",
+"/././././././.^././././././.Q././././././.Q././././././././././."
+};
diff --git a/share/metview/icons/OBSFILTER.xpm b/share/metview/icons/OBSFILTER.xpm
new file mode 100644
index 0000000..dc33c7a
--- /dev/null
+++ b/share/metview/icons/OBSFILTER.xpm
@@ -0,0 +1,158 @@
+/* XPM */
+static char *OBSFILTER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 120 2",
+"   c #5E657F",
+".  c #CB2D2E",
+"X  c #D52423",
+"o  c #DB2322",
+"O  c #D72F2E",
+"+  c #DA2B29",
+"@  c #D7302F",
+"#  c #CB3333",
+"$  c #C63939",
+"%  c #C93838",
+"&  c #D23433",
+"*  c #DD3635",
+"=  c #E32725",
+"-  c #E8322F",
+";  c #E23B39",
+":  c #CD403F",
+">  c #C94444",
+",  c #C74A4A",
+"<  c #DB4441",
+"1  c #D54D4B",
+"2  c #C65150",
+"3  c #D15755",
+"4  c #D15856",
+"5  c #CB6160",
+"6  c #DA6767",
+"7  c #D77474",
+"8  c #E17979",
+"9  c #5F6680",
+"0  c #656B84",
+"q  c #696F87",
+"w  c #6D738A",
+"e  c #70758C",
+"r  c #72788E",
+"t  c #757B91",
+"y  c #444DA9",
+"u  c #505CA2",
+"i  c #5E67AE",
+"p  c #2934CD",
+"a  c #323DCE",
+"s  c #343FD0",
+"d  c #3631E2",
+"f  c #3645CB",
+"g  c #3D4DCC",
+"h  c #3842D1",
+"j  c #3D48D0",
+"k  c #4455CE",
+"l  c #424DD2",
+"z  c #5159D6",
+"x  c #545DDB",
+"c  c #5B76C9",
+"v  c #5B6AD3",
+"b  c #5B63D9",
+"n  c #4344E0",
+"m  c #7C8296",
+"M  c #7E8498",
+"N  c #7B84DE",
+"B  c #808599",
+"V  c #848A9D",
+"C  c #898EA1",
+"Z  c #8D92A3",
+"A  c #9196A9",
+"S  c #9499AB",
+"D  c #999DAD",
+"F  c #8F93BF",
+"G  c #9B9FB0",
+"H  c #B19FAA",
+"J  c #9CA0AE",
+"K  c #9DA1B0",
+"L  c #ACA1AC",
+"P  c #A1A5B4",
+"I  c #A6A9B6",
+"U  c #A9ABB7",
+"Y  c #A7ABB9",
+"T  c #A9ADB9",
+"R  c #AEB2BE",
+"E  c #B0B3BE",
+"W  c #E69D9D",
+"Q  c #D0A7AC",
+"!  c #D1B6BC",
+"~  c #E0A0A0",
+"^  c #ABAECB",
+"/  c #B3B6C1",
+"(  c #B5B8C3",
+")  c #B9BCC6",
+"_  c #939AE4",
+"`  c #9EA4E7",
+"'  c #A7ADEA",
+"]  c #ACB0EA",
+"[  c #B2B6ED",
+"{  c #BEC1CA",
+"}  c #BCC0EF",
+"|  c #C2C5CD",
+" . c #C4C8CE",
+".. c #C5C9D1",
+"X. c #C9CDD3",
+"o. c #CDD1D6",
+"O. c #CFD3D8",
+"+. c #D1D2D6",
+"@. c #D1D4D9",
+"#. c #D5D8DE",
+"$. c #D8DBDF",
+"%. c #E7C6C6",
+"&. c #F2C8C8",
+"*. c #F5D5D5",
+"=. c #DADDE1",
+"-. c #CACDF2",
+";. c #DDDFF7",
+":. c #DEE0E4",
+">. c #DEE0F7",
+",. c #E4E4E5",
+"<. c #E2E5E8",
+"1. c #E6E8EB",
+"2. c #EAEAEB",
+"3. c #F2ECEC",
+"4. c #ECEEF1",
+"5. c #E2E4F8",
+"6. c #EEF0F2",
+"7. c #F3F4F4",
+"8. c #F6F7F8",
+"9. c #FFFFFF",
+/* pixels */
+"9.9.9.9.9.9.9.9.9.9.9.*.W W W W W W W W *.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.W % > : % & @ + X W 9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.W $ > 1 1 < * + X W 9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.*.W 6 : 1 < @ 6 W *.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.W : 1 < @ W 9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.W : 1 < @ W 9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.W : 1 < @ W 9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.*.W W 6 : 1 < @ 6 W W &.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.W $ , : 2 1 : * + o o 8 9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.7.! # 2 5 4 1 < ; - = . Q 7.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.7.E Z r m D L : : 3 1 < ; O % H J B t Z / 7.9.9.9.9.9.",
+"9.9.9.2.P e U +.,.2.,.2.,.7 : 1 : * 6 3.7.7.8.8.,./ r K 2.9.9.9.",
+"9.9.8.e ( ,.,.,.,.2.2.2.2.3.~ # @ W 6.7.8.8.8.8.8.9.8...r 8.9.9.",
+"9.9.D U ,.,.,.,.,.,.,.2.2.2.4.%.&.7.6.7.7.7.7.8.8.8.9.9.) G 9.9.",
+"9.9.B w +.,.,.,.2.,.2.2.2.2.3.3.7.6.6.7.7.8.8.8.8.8.9.1.w M 9.9.",
+"9.9.V S 0 r E +.,.2.2.2.3.3.3.4.3.3.6.7.7.8.8.8.,.| t   B V 9.9.",
+"9.9.M #.7...A t 9 e Z J I R )  . .) E E K A r   w B U  .T V 9.9.",
+"9.9.C #.7.6.6.4.2. at .{ R P J Z B V C S J P R { o.o. . . .T B 9.9.",
+"9.9.C #.7.6.6.4.4.2.1.<.<.<.:.:.$.$.#. at .@.O.O.X.X.X. . .U V 9.9.",
+"9.9.C X.7.7.4.4.4.1.1.1.<.:.:.=.$.$.#.#.O.O.o.o.X. . . .Y B 9.9.",
+"9.9. at .w ..6.6.4.4.1.1.:.<.:.:.:.=.$.#.#.O.O.o.X.X.X. .P q X.9.9.",
+"9.9.9.=.C w P | :.1.1.1.<.:.:.=.$.$.#.#. at .O.O.{ Y Z q C =.9.9.9.",
+"9.9.9.9.9.6.( Z e q M Z A D K U T J Z C M m 9 w Z ( 6.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.8.:.O.X.F i u i y M ^ #.>.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.9.` k x h 5.9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.9.` k x h 5.9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.} v l k x s z b 5.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.' f c v x n d p ;.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.N g v x n a [ 9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.9._ f l a -.9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.] j ;.9.9.9.9.9.9.9.9.9.9.9.9.9.9.",
+"9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9."
+};
diff --git a/share/metview/icons/OBSTAT.xpm b/share/metview/icons/OBSTAT.xpm
new file mode 100755
index 0000000..9ec521a
--- /dev/null
+++ b/share/metview/icons/OBSTAT.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char *Obstat[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 1 1",
+"  c #DC243A",
+/* pixels */
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                "
+};
diff --git a/share/metview/icons/OBSTAT_CURVE.xpm b/share/metview/icons/OBSTAT_CURVE.xpm
new file mode 100755
index 0000000..7ea6eda
--- /dev/null
+++ b/share/metview/icons/OBSTAT_CURVE.xpm
@@ -0,0 +1,499 @@
+/* XPM */
+static char * OBSTAT_CURVE_xpm[] = {
+"32 32 464 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #CFCFCF",
+"@ 	c #AFAFAF",
+"# 	c #B0B0B0",
+"$ 	c #DEDEDE",
+"% 	c #DBDBDB",
+"& 	c #303435",
+"* 	c #1F2629",
+"= 	c #3E4D52",
+"- 	c #445154",
+"; 	c #465255",
+"> 	c #4B5357",
+", 	c #4E5458",
+"' 	c #505758",
+") 	c #545859",
+"! 	c #565A5B",
+"~ 	c #575A5B",
+"{ 	c #565A5A",
+"] 	c #535758",
+"^ 	c #515457",
+"/ 	c #515656",
+"( 	c #505355",
+"_ 	c #4D5253",
+": 	c #4C5252",
+"< 	c #4C5253",
+"[ 	c #4A5152",
+"} 	c #4A4F51",
+"| 	c #494F52",
+"1 	c #474F50",
+"2 	c #474E4F",
+"3 	c #181B1B",
+"4 	c #4B4D4D",
+"5 	c #F5F5F5",
+"6 	c #5C6060",
+"7 	c #466571",
+"8 	c #8CC2D5",
+"9 	c #99C8D9",
+"0 	c #A3CEDB",
+"a 	c #AFD2DF",
+"b 	c #B9D8E3",
+"c 	c #C4DEE6",
+"d 	c #CEE2E9",
+"e 	c #D8E7ED",
+"f 	c #E2ECF1",
+"g 	c #EAF2F3",
+"h 	c #E6EEF0",
+"i 	c #E0EAEC",
+"j 	c #DAE7E8",
+"k 	c #D6E3E5",
+"l 	c #D2E0E4",
+"m 	c #CEDDE1",
+"n 	c #CADADF",
+"o 	c #C7D7DC",
+"p 	c #C3D5DA",
+"q 	c #BED2D8",
+"r 	c #BDD1D5",
+"s 	c #B9D0D4",
+"t 	c #B8CDD3",
+"u 	c #B4CCD0",
+"v 	c #B1C9CE",
+"w 	c #434B4B",
+"x 	c #9B9B9B",
+"y 	c #0C0E0F",
+"z 	c #77B1C5",
+"A 	c #89C0D3",
+"B 	c #94C6D7",
+"C 	c #A0CCDB",
+"D 	c #AAD1DD",
+"E 	c #B6D6E2",
+"F 	c #C0DCE5",
+"G 	c #CCE1E8",
+"H 	c #D5E6EC",
+"I 	c #DEEBEF",
+"J 	c #E7F0F2",
+"K 	c #E6F0F0",
+"L 	c #E2ECED",
+"M 	c #DDE7EB",
+"N 	c #D7E4E8",
+"O 	c #D3E1E4",
+"P 	c #CFDEE2",
+"Q 	c #CBDBDF",
+"R 	c #C8D8DC",
+"S 	c #C4D6DB",
+"T 	c #C0D3D9",
+"U 	c #BDD2D7",
+"V 	c #BBCFD3",
+"W 	c #B8CDD2",
+"X 	c #B5CDD0",
+"Y 	c #B3CCD0",
+"Z 	c #8C9EA3",
+"` 	c #3D4040",
+" .	c #0A0C0D",
+"..	c #79B8CE",
+"+.	c #85BDD2",
+"@.	c #91C4D6",
+"#.	c #9DCADA",
+"$.	c #A9D0DC",
+"%.	c #B3D5E1",
+"&.	c #BEDBE5",
+"*.	c #C8DFE7",
+"=.	c #D2E5EB",
+"-.	c #DBEAEE",
+";.	c #E5EFF1",
+">.	c #C3D3DA",
+",.	c #B8CED2",
+"'.	c #B4CAD1",
+").	c #B0C7CE",
+"!.	c #B9CDD2",
+"~.	c #D1DFE3",
+"{.	c #CDDCDF",
+"].	c #C8D9DE",
+"^.	c #C4D7DA",
+"/.	c #C2D5D8",
+"(.	c #BFD2D6",
+"_.	c #BBD1D5",
+":.	c #B9CFD4",
+"<.	c #B7CCD2",
+"[.	c #B4CBD0",
+"}.	c #9CB1B6",
+"|.	c #323333",
+"1.	c #75B6CD",
+"2.	c #82BCD1",
+"3.	c #8DC2D5",
+"4.	c #9AC8D9",
+"5.	c #A4CEDB",
+"6.	c #B0D3E0",
+"7.	c #BBD8E3",
+"8.	c #C5DFE7",
+"9.	c #CFE2EB",
+"0.	c #D9E9ED",
+"a.	c #E2EEF1",
+"b.	c #26617B",
+"c.	c #5795A1",
+"d.	c #5694A0",
+"e.	c #5794A2",
+"f.	c #396E87",
+"g.	c #CEDDDF",
+"h.	c #CADADD",
+"i.	c #C5D7DC",
+"j.	c #C3D4DA",
+"k.	c #B8CED1",
+"l.	c #B4CBD1",
+"m.	c #9DB1B6",
+"n.	c #090C0D",
+"o.	c #71B4CB",
+"p.	c #7DBAD0",
+"q.	c #8AC0D4",
+"r.	c #96C6D6",
+"s.	c #A1CCDB",
+"t.	c #ACD2DF",
+"u.	c #B7D7E2",
+"v.	c #C1DDE6",
+"w.	c #CCE1E9",
+"x.	c #DFEBEF",
+"y.	c #377087",
+"z.	c #A3E5E0",
+"A.	c #366F86",
+"B.	c #C2D6DB",
+"C.	c #C0D3D7",
+"D.	c #BDD2D6",
+"E.	c #9DB1B5",
+"F.	c #6EB2C9",
+"G.	c #7BB8CE",
+"H.	c #86BED3",
+"I.	c #93C5D5",
+"J.	c #A9D0DD",
+"K.	c #B4D5E1",
+"L.	c #BFDAE5",
+"M.	c #C8E0E7",
+"N.	c #D3E6EA",
+"O.	c #2F6880",
+"P.	c #9EBAC3",
+"Q.	c #9BB8C2",
+"R.	c #99B5BF",
+"S.	c #A5C0C7",
+"T.	c #BFD1D6",
+"U.	c #B9CFD3",
+"V.	c #B5CCD2",
+"W.	c #9EB2B5",
+"X.	c #6AAFC9",
+"Y.	c #77B6CD",
+"Z.	c #82BCD2",
+"`.	c #8FC3D5",
+" +	c #9AC9D9",
+".+	c #A6CEDC",
+"++	c #B1D3E0",
+"@+	c #BBD9E4",
+"#+	c #C6DFE7",
+"$+	c #CFE4EB",
+"%+	c #D9E9EE",
+"&+	c #145671",
+"*+	c #438996",
+"=+	c #428996",
+"-+	c #428895",
+";+	c #377086",
+">+	c #C5D8DB",
+",+	c #C1D6D9",
+"'+	c #BED3D7",
+")+	c #BBD2D4",
+"!+	c #B9CED3",
+"~+	c #9FB2B7",
+"{+	c #313232",
+"]+	c #66AEC8",
+"^+	c #73B3CC",
+"/+	c #7FBAD0",
+"(+	c #8CC1D4",
+"_+	c #97C7D8",
+":+	c #A3CDDB",
+"<+	c #AED2DF",
+"[+	c #B9D7E3",
+"}+	c #C2DDE6",
+"|+	c #CDE1E9",
+"1+	c #D6E7ED",
+"2+	c #347087",
+"3+	c #175872",
+"4+	c #77C5C3",
+"5+	c #376F85",
+"6+	c #C6D7DC",
+"7+	c #C2D6D9",
+"8+	c #BDD0D6",
+"9+	c #9FB3B7",
+"0+	c #63ACC7",
+"a+	c #6FB3CB",
+"b+	c #7CB9CE",
+"c+	c #88BFD3",
+"d+	c #94C5D7",
+"e+	c #9ECBDA",
+"f+	c #A9D1DD",
+"g+	c #C9E0E8",
+"h+	c #D4E6EA",
+"i+	c #175873",
+"j+	c #386F85",
+"k+	c #C7D8DD",
+"l+	c #C1D5D8",
+"m+	c #BBD0D5",
+"n+	c #5EAAC5",
+"o+	c #6AB0C9",
+"p+	c #90C3D5",
+"q+	c #A3CCD9",
+"r+	c #356D86",
+"s+	c #376F87",
+"t+	c #396F87",
+"u+	c #3B7189",
+"v+	c #215F79",
+"w+	c #376F86",
+"x+	c #C1D5D9",
+"y+	c #BBD0D4",
+"z+	c #B8CED3",
+"A+	c #A0B3B6",
+"B+	c #080B0C",
+"C+	c #5AA8C4",
+"D+	c #67AEC8",
+"E+	c #73B5CC",
+"F+	c #80BBD0",
+"G+	c #9FC8D8",
+"H+	c #377085",
+"I+	c #9AC3C1",
+"J+	c #1A5974",
+"K+	c #185873",
+"L+	c #386F87",
+"M+	c #C7D9DC",
+"N+	c #C0D2D8",
+"O+	c #A0B4B8",
+"P+	c #56A5C4",
+"Q+	c #7CB9CF",
+"R+	c #88C0D3",
+"S+	c #9BC6D7",
+"T+	c #377084",
+"U+	c #387087",
+"V+	c #CCDCDE",
+"W+	c #C7D8DB",
+"X+	c #BDD3D7",
+"Y+	c #BBCFD4",
+"Z+	c #A0B4B7",
+"`+	c #313234",
+" @	c #52A4C2",
+".@	c #5FABC5",
+"+@	c #6CB1C9",
+"@@	c #78B6CD",
+"#@	c #90C4D6",
+"$@	c #98C5D6",
+"%@	c #366F84",
+"&@	c #387085",
+"*@	c #A2B4B9",
+"=@	c #080A0C",
+"-@	c #4EA2C0",
+";@	c #5BA8C4",
+">@	c #68AEC9",
+",@	c #74B5CC",
+"'@	c #81BBD1",
+")@	c #94C3D5",
+"!@	c #387086",
+"~@	c #A3B6B9",
+"{@	c #313434",
+"]@	c #4A9FBF",
+"^@	c #57A6C4",
+"/@	c #5FA6C2",
+"(@	c #33778C",
+"_@	c #418594",
+":@	c #448795",
+"<@	c #478894",
+"[@	c #2F6A80",
+"}@	c #12556B",
+"|@	c #33717D",
+"1@	c #32717C",
+"2@	c #32707C",
+"3@	c #225F75",
+"4@	c #A3B5B8",
+"5@	c #070A0B",
+"6@	c #469DBD",
+"7@	c #53A4C2",
+"8@	c #56A1BC",
+"9@	c #468E90",
+"0@	c #78C8AE",
+"a@	c #74C4AC",
+"b@	c #2C687E",
+"c@	c #1D6270",
+"d@	c #7ED795",
+"e@	c #2B6B78",
+"f@	c #A3B7BA",
+"g@	c #419BBC",
+"h@	c #4FA2C1",
+"i@	c #539EBA",
+"j@	c #1E6270",
+"k@	c #2B6B79",
+"l@	c #A3B7BB",
+"m@	c #303232",
+"n@	c #3D99BB",
+"o@	c #4BA0BF",
+"p@	c #4F9CB9",
+"q@	c #2D6B79",
+"r@	c #A4B7BA",
+"s@	c #3997B9",
+"t@	c #469EBD",
+"u@	c #4C9AB8",
+"v@	c #1E6370",
+"w@	c #A7B8BC",
+"x@	c #3494B8",
+"y@	c #439CBC",
+"z@	c #4798B7",
+"A@	c #458E90",
+"B@	c #2C687D",
+"C@	c #2D6C79",
+"D@	c #A6B9BC",
+"E@	c #3093B7",
+"F@	c #3F99BB",
+"G@	c #4497B7",
+"H@	c #2B687D",
+"I@	c #2B6C79",
+"J@	c #A8B8BC",
+"K@	c #2B91B5",
+"L@	c #3A97BA",
+"M@	c #4499B8",
+"N@	c #2B7285",
+"O@	c #398390",
+"P@	c #3D8491",
+"Q@	c #408692",
+"R@	c #195874",
+"S@	c #2B6780",
+"T@	c #2D6781",
+"U@	c #2E6981",
+"V@	c #215D77",
+"W@	c #326E85",
+"X@	c #336E86",
+"Y@	c #367087",
+"Z@	c #1D5C77",
+"`@	c #346D84",
+" #	c #356D85",
+".#	c #346E85",
+"+#	c #216073",
+"@#	c #326E7D",
+"##	c #326C7C",
+"$#	c #306D7C",
+"%#	c #356C80",
+"&#	c #A8B9BD",
+"*#	c #288EB3",
+"=#	c #3796B8",
+"-#	c #449CBE",
+";#	c #52A4C1",
+">#	c #6BB0CA",
+",#	c #84BDD2",
+"'#	c #90C3D6",
+")#	c #A6CFDC",
+"!#	c #B2D4E0",
+"~#	c #C7DFE7",
+"{#	c #D0E4EB",
+"]#	c #DAE9EE",
+"^#	c #E3EEF1",
+"/#	c #EAF0F2",
+"(#	c #E4ECEE",
+"_#	c #E0EAEB",
+":#	c #DAE6E8",
+"<#	c #CDDCE1",
+"[#	c #A9B9BD",
+"}#	c #238CB2",
+"|#	c #3193B7",
+"1#	c #3F9ABB",
+"2#	c #4DA0BF",
+"3#	c #E1ECEF",
+"4#	c #E0EAED",
+"5#	c #DBE7E9",
+"6#	c #D7E4E6",
+"7#	c #CFDEE0",
+"8#	c #A9BABE",
+"9#	c #1E85AC",
+"0#	c #2C91B6",
+"a#	c #3B98BA",
+"b#	c #489FBE",
+"c#	c #A0CBDB",
+"d#	c #CAE1E8",
+"e#	c #D4E6EC",
+"f#	c #DEEBEE",
+"g#	c #E7EFF2",
+"h#	c #E8F0F0",
+"i#	c #D0DEE2",
+"j#	c #9EAEB0",
+"k#	c #3A3B3B",
+"l#	c #495052",
+"m#	c #10536C",
+"n#	c #298EB4",
+"o#	c #449DBE",
+"p#	c #A7CFDC",
+"q#	c #BDD9E4",
+"r#	c #E5EEF1",
+"s#	c #EAF0F1",
+"t#	c #E4ECEF",
+"u#	c #DFE8EB",
+"v#	c #555B5E",
+"w#	c #8D8D8D",
+"x#	c #CDCDCD",
+"y#	c #141A1C",
+"z#	c #19313B",
+"A#	c #1E4857",
+"B#	c #224A59",
+"C#	c #2A4E5A",
+"D#	c #2F505D",
+"E#	c #35545F",
+"F#	c #395560",
+"G#	c #405A63",
+"H#	c #445B63",
+"I#	c #495E66",
+"J#	c #506268",
+"K#	c #546369",
+"L#	c #59666B",
+"M#	c #5C686B",
+"N#	c #616B6E",
+"O#	c #666D70",
+"P#	c #696F70",
+"Q#	c #6E7072",
+"R#	c #6B6F70",
+"S#	c #696E6F",
+"T#	c #676C6D",
+"U#	c #656A6B",
+"V#	c #62696A",
+"W#	c #606869",
+"X#	c #2F3333",
+"Y#	c #2F2F2F",
+"Z#	c #EEEEEE",
+"`#	c #FDFDFD",
+" $	c #B6B6B6",
+".$	c #979797",
+"+$	c #989898",
+"@$	c #C7C7C7",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ # $ . . . ",
+". . % & * = - ; > , ' ) ! ~ { ) ] ^ / ( _ : < [ } | 1 2 3 4 5 . ",
+". . 6 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u v w x . ",
+". . y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ` . ",
+". .  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.. ",
+". .  .1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.l g.h.i.j.q r :.k.l.m.|.. ",
+". . n.o.p.q.r.s.t.u.v.w.H x.y.z.z.z.A.l P Q R B.C.D.V W X E.|.. ",
+". . n.F.G.H.I.#.J.K.L.M.N.-.y.z.z.z.O.P.Q.R.S.^./.T._.U.V.W.|.. ",
+". . n.X.Y.Z.`. +.+++ at +#+$+%+y.z.z.z.&+*+=+-+;+>+,+'+)+!+k.~+{+. ",
+". . n.]+^+/+(+_+:+<+[+}+|+1+2+z.z.z.3+4+4+4+5+6+7+C.8+V t 9+{+. ",
+". . n.0+a+b+c+d+e+f+K.L.g+h+2+z.z.z.i+4+4+4+j+k+^.l+r m+U.9+{+. ",
+". . n.n+o+Y.Z.p+ +q+r+s+t+u+v+z.z.z.i+4+4+4+w+].>+x+'+y+z+A+{+. ",
+". . B+C+D+E+F+(+_+G+H+I+I+I+J+z.z.z.K+4+4+4+L+n M+p N+r y+O+{+. ",
+". . B+P+0+a+Q+R+B S+T+I+I+I+J+z.z.z.K+4+4+4+U+V+W+^.T X+Y+Z+`+. ",
+". . B+ @. at +@@@+.#@$@%@I+I+I+J+z.z.z.K+4+4+4+&@{.].>+x+'+y+*@`+. ",
+". . =@-@;@>@,@'@8 )@%@I+I+I+J+z.z.z.K+4+4+4+!@m n o p q r ~@{@. ",
+". . =@]@^@/@(@_@:@<@[@I+I+I+J+z.z.z.K+4+4+4+}@|@1 at 2@3 at T U 4@{@. ",
+". . 5 at 6@7 at 8@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+c@d at d@d at e@/.(.f@{@. ",
+". . 5 at g@h at i@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+j@d at d@d at k@j.q l at m@. ",
+". . 5 at n@o at p@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+j@d at d@d at q@B.C.r@`+. ",
+". . 5 at s@t at u@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+v@d at d@d at q@^./.w@`+. ",
+". . 5 at x@y at z@A at 0@0 at a@B at I+I+I+J+z.z.z.K+4+4+4+v@d at d@d at C@>+,+D@`+. ",
+". . 5 at E@F at G@A at 0@0 at a@H at I+I+I+J+z.z.z.K+4+4+4+v@d at d@d at I@6+7+J@{@. ",
+". . 5 at K@L at M@N at O@P at Q@R at S@T at U@V at W@X at Y@Z@`@ #.#+#@###$#%#k+^.&#{@. ",
+". . 5@*#=#-#;#n+>#Y.,#'# +)#!#@+~#{#]#^#/#(#_#:#k ~.<#].>+[#{@. ",
+". . 5@}#|#1#2#C+D+E+F+(+_+:+<+b c d 1+3#g h 4#5#6#l 7#n M+8#{@. ",
+". . 5 at 9#0#a#b#P+0+a+Q+R+B c#D E F d#e#f#g#h#L M N O i#V+W+j#k#. ",
+". . l#m#n#=#o# @. at +@@@+.#@#.p#%.q#*.=.-.r#s#t#u#:#k ~.{.].v#w#. ",
+". . x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#. ",
+". . . `# $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$+$@$. . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/OBSTAT_SCATTER.xpm b/share/metview/icons/OBSTAT_SCATTER.xpm
new file mode 100755
index 0000000..3433624
--- /dev/null
+++ b/share/metview/icons/OBSTAT_SCATTER.xpm
@@ -0,0 +1,552 @@
+/* XPM */
+static char * OBSTAT_SCATTER_xpm[] = {
+"32 32 517 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #C6C6C6",
+"@ 	c #7A7B7C",
+"# 	c #747676",
+"$ 	c #767676",
+"% 	c #757676",
+"& 	c #757575",
+"* 	c #747575",
+"= 	c #747474",
+"- 	c #79797A",
+"; 	c #C4C4C4",
+"> 	c #414345",
+", 	c #232B2E",
+"' 	c #556F79",
+") 	c #5E7982",
+"! 	c #647C84",
+"~ 	c #6C7F86",
+"{ 	c #728288",
+"] 	c #77848A",
+"^ 	c #7E888C",
+"/ 	c #858B8F",
+"( 	c #898E8F",
+"_ 	c #898E8E",
+": 	c #858B8D",
+"< 	c #82888B",
+"[ 	c #7F878A",
+"} 	c #7C8586",
+"| 	c #7B8585",
+"1 	c #798184",
+"2 	c #757F82",
+"3 	c #738081",
+"4 	c #727D7F",
+"5 	c #6F7B7E",
+"6 	c #6D7A7D",
+"7 	c #6B787B",
+"8 	c #667377",
+"9 	c #2B3030",
+"0 	c #3E3E3E",
+"a 	c #CBCBCB",
+"b 	c #1F272A",
+"c 	c #86BED2",
+"d 	c #92C4D5",
+"e 	c #9DCADA",
+"f 	c #A9D0DC",
+"g 	c #B3D5E1",
+"h 	c #BEDBE5",
+"i 	c #C8DFE7",
+"j 	c #D2E5EB",
+"k 	c #DBEAEE",
+"l 	c #E5EFF1",
+"m 	c #EAF0F1",
+"n 	c #E4ECEF",
+"o 	c #DFE8EB",
+"p 	c #DAE6E8",
+"q 	c #D6E3E5",
+"r 	c #D1DFE3",
+"s 	c #CDDCDF",
+"t 	c #C8D9DE",
+"u 	c #C5D8DB",
+"v 	c #C1D5D9",
+"w 	c #B5C9CC",
+"x 	c #425952",
+"y 	c #54766D",
+"z 	c #54756D",
+"A 	c #53756D",
+"B 	c #627877",
+"C 	c #272C2D",
+"D 	c #C3C3C3",
+"E 	c #40636E",
+"F 	c #82BCD1",
+"G 	c #8EC2D5",
+"H 	c #9AC8D9",
+"I 	c #A4CEDB",
+"J 	c #B0D3E0",
+"K 	c #BBD8E3",
+"L 	c #C5DEE7",
+"M 	c #CEE2EB",
+"N 	c #D9E9ED",
+"O 	c #E2EEF1",
+"P 	c #ECF2F3",
+"Q 	c #E4EEEF",
+"R 	c #E0EAEB",
+"S 	c #DAE7E8",
+"T 	c #D2E0E4",
+"U 	c #CEDDE1",
+"V 	c #CADADF",
+"W 	c #C7D9DC",
+"X 	c #C3D5DA",
+"Y 	c #B3C5CA",
+"Z 	c #568076",
+"` 	c #7BC3AD",
+" .	c #617C79",
+"..	c #637073",
+"+.	c #7A7A7A",
+"@.	c #727575",
+"#.	c #406472",
+"$.	c #7FBAD0",
+"%.	c #8AC0D4",
+"&.	c #96C7D6",
+"*.	c #A1CCDB",
+"=.	c #AED2DF",
+"-.	c #B7D7E2",
+";.	c #C1DDE6",
+">.	c #CCE1E9",
+",.	c #D5E6EC",
+"'.	c #DEEBEF",
+").	c #E7F0F2",
+"!.	c #E6F0F0",
+"~.	c #E2ECED",
+"{.	c #DDE7EB",
+"].	c #D7E4E8",
+"^.	c #D3E1E4",
+"/.	c #D0DEE0",
+"(.	c #CCDCDE",
+"_.	c #C8D8DC",
+":.	c #C4D6DB",
+"<.	c #B4C5CA",
+"[.	c #578176",
+"}.	c #6A787B",
+"|.	c #3E6470",
+"1.	c #7BB8CE",
+"2.	c #86BED3",
+"3.	c #93C5D5",
+"4.	c #9ECBDA",
+"5.	c #A9D0DD",
+"6.	c #B4D5E1",
+"7.	c #BFDAE5",
+"8.	c #C8E0E7",
+"9.	c #D3E6EA",
+"0.	c #E6EFF1",
+"a.	c #E8F0F1",
+"b.	c #E2ECEE",
+"c.	c #DEE8EB",
+"d.	c #DAE5E8",
+"e.	c #D4E3E5",
+"f.	c #B6C8CB",
+"g.	c #568174",
+"h.	c #617E7A",
+"i.	c #727375",
+"j.	c #3C6370",
+"k.	c #77B6CD",
+"l.	c #82BCD2",
+"m.	c #90C3D5",
+"n.	c #9AC9D9",
+"o.	c #A6CFDC",
+"p.	c #B1D3E0",
+"q.	c #BBD9E4",
+"r.	c #C6DFE7",
+"s.	c #CFE4EB",
+"t.	c #D9E9EE",
+"u.	c #EAF2F3",
+"v.	c #969792",
+"w.	c #8E887E",
+"x.	c #8B867E",
+"y.	c #8A867C",
+"z.	c #88847B",
+"A.	c #868279",
+"B.	c #807D74",
+"C.	c #3B4F48",
+"D.	c #57766F",
+"E.	c #57756E",
+"F.	c #56756F",
+"G.	c #667E7C",
+"H.	c #6A787A",
+"I.	c #386170",
+"J.	c #73B5CC",
+"K.	c #80BAD0",
+"L.	c #8CC1D4",
+"M.	c #97C7D8",
+"N.	c #A3CDDB",
+"O.	c #B9D7E3",
+"P.	c #C2DDE6",
+"Q.	c #CDE1E9",
+"R.	c #D6E7EC",
+"S.	c #DFECEF",
+"T.	c #E9F0F3",
+"U.	c #E6EEF1",
+"V.	c #908A7E",
+"W.	c #DDB383",
+"X.	c #DCB082",
+"Y.	c #DBB080",
+"Z.	c #DAB081",
+"`.	c #D9AE7F",
+" +	c #D8AE7E",
+".+	c #838177",
+"++	c #BDD2D7",
+"@+	c #BBCFD3",
+"#+	c #B8CDD2",
+"$+	c #B5CDD0",
+"%+	c #69787A",
+"&+	c #376070",
+"*+	c #6FB3CB",
+"=+	c #7CB9CE",
+"-+	c #88C0D3",
+";+	c #94C5D7",
+">+	c #AAD1DD",
+",+	c #B4D6E2",
+"'+	c #C9E0E8",
+")+	c #D4E6EA",
+"!+	c #DDEBEE",
+"~+	c #E6EFF2",
+"{+	c #918B7F",
+"]+	c #DFB282",
+"^+	c #DDB183",
+"/+	c #DCB181",
+"(+	c #D9AF80",
+"_+	c #D8AF7F",
+":+	c #D9AF7F",
+"<+	c #838279",
+"[+	c #BFD2D6",
+"}+	c #BBD1D5",
+"|+	c #B9CFD4",
+"1+	c #B7CCD2",
+"2+	c #36606F",
+"3+	c #6CB1C9",
+"4+	c #78B6CD",
+"5+	c #84BDD2",
+"6+	c #90C3D6",
+"7+	c #9BC9D9",
+"8+	c #B2D4E0",
+"9+	c #C7DFE7",
+"0+	c #D0E4EB",
+"a+	c #E3EEF1",
+"b+	c #E4ECEE",
+"c+	c #928B80",
+"d+	c #DFB283",
+"e+	c #DCB283",
+"f+	c #DBB081",
+"g+	c #DCB080",
+"h+	c #848278",
+"i+	c #BED2D8",
+"j+	c #BBD2D6",
+"k+	c #B9CED3",
+"l+	c #B8CED1",
+"m+	c #335F6F",
+"n+	c #68AEC9",
+"o+	c #74B5CC",
+"p+	c #81BBD1",
+"q+	c #8CC2D4",
+"r+	c #97C8D8",
+"s+	c #B9D8E3",
+"t+	c #C4DEE6",
+"u+	c #CEE2E9",
+"v+	c #D6E7ED",
+"w+	c #E1ECEF",
+"x+	c #E6EEF0",
+"y+	c #948C81",
+"z+	c #E0B383",
+"A+	c #848178",
+"B+	c #C0D3D7",
+"C+	c #BDD2D6",
+"D+	c #315D6D",
+"E+	c #64ADC8",
+"F+	c #71B3CB",
+"G+	c #7DB9CF",
+"H+	c #94C6D7",
+"I+	c #A0CCDB",
+"J+	c #B6D6E2",
+"K+	c #C0DCE5",
+"L+	c #CAE0E8",
+"M+	c #D4E6EC",
+"N+	c #DEEBEE",
+"O+	c #948B81",
+"P+	c #E0B284",
+"Q+	c #DEB282",
+"R+	c #DCB180",
+"S+	c #D8AE7F",
+"T+	c #858379",
+"U+	c #C1D5D8",
+"V+	c #BDD1D6",
+"W+	c #B9CFD3",
+"X+	c #2F5B6C",
+"Y+	c #5FABC5",
+"Z+	c #6DB2C9",
+"`+	c #78B6CE",
+" @	c #85BDD2",
+".@	c #90C4D6",
+"+@	c #A7CFDC",
+"@@	c #9BB8C3",
+"#@	c #9DB4BD",
+"$@	c #A3B8C0",
+"%@	c #ACBDC2",
+"&@	c #B5C1C5",
+"*@	c #BDC5C7",
+"=@	c #C2C7C7",
+"-@	c #827B72",
+";@	c #D9AF81",
+">@	c #D8AD7F",
+",@	c #D7AD80",
+"'@	c #D6AD7E",
+")@	c #D5AB7D",
+"!@	c #858279",
+"~@	c #C1D6D9",
+"{@	c #BED3D7",
+"]@	c #BBD2D4",
+"^@	c #6D7A7B",
+"/@	c #717375",
+"(@	c #2C5B6C",
+"_@	c #5CA8C4",
+":@	c #68AFC9",
+"<@	c #75B6CC",
+"[@	c #8DC2D5",
+"}@	c #99C8D9",
+"|@	c #5C555A",
+"1@	c #A0555E",
+"2@	c #A45760",
+"3@	c #A65761",
+"4@	c #A95A61",
+"5@	c #AC5A63",
+"6@	c #B05C63",
+"7@	c #634F4F",
+"8@	c #979793",
+"9@	c #939492",
+"0@	c #92938F",
+"a@	c #8F918D",
+"b@	c #8D908C",
+"c@	c #8A8E8A",
+"d@	c #9EA6A6",
+"e@	c #BDD1D5",
+"f@	c #BBD0D5",
+"g@	c #295A6A",
+"h@	c #58A6C4",
+"i@	c #71B4CB",
+"j@	c #7DBAD0",
+"k@	c #89C0D4",
+"l@	c #96C6D6",
+"m@	c #6C5861",
+"n@	c #DE5765",
+"o@	c #E15968",
+"p@	c #E45A68",
+"q@	c #E75C68",
+"r@	c #EB5E6A",
+"s@	c #EF5F6B",
+"t@	c #836C6F",
+"u@	c #D0DEE2",
+"v@	c #C7D8DD",
+"w@	c #C4D7DA",
+"x@	c #28596A",
+"y@	c #54A4C2",
+"z@	c #61AAC7",
+"A@	c #6EB2C9",
+"B@	c #6A5861",
+"C@	c #DD5765",
+"D@	c #E05968",
+"E@	c #E35A68",
+"F@	c #E65B68",
+"G@	c #E95E6A",
+"H@	c #ED5E6A",
+"I@	c #846D70",
+"J@	c #BBD0D4",
+"K@	c #6D7B7D",
+"L@	c #25566A",
+"M@	c #4FA3C1",
+"N@	c #5DAAC5",
+"O@	c #6AAFC9",
+"P@	c #69585F",
+"Q@	c #DC5665",
+"R@	c #E05967",
+"S@	c #E65B69",
+"T@	c #856D70",
+"U@	c #C0D2D8",
+"V@	c #6F7B7D",
+"W@	c #245669",
+"X@	c #4CA0BF",
+"Y@	c #5AA8C3",
+"Z@	c #66AEC8",
+"`@	c #72B4CB",
+" #	c #68585F",
+".#	c #DB5665",
+"+#	c #E15967",
+"@#	c #E45A69",
+"##	c #E85D6A",
+"$#	c #856D6F",
+"%#	c #CFDEE2",
+"&#	c #C0D3D9",
+"*#	c #BDD3D7",
+"=#	c #6D7B7E",
+"-#	c #215567",
+";#	c #489EBE",
+">#	c #55A5C2",
+",#	c #63ACC7",
+"'#	c #6EB2CB",
+")#	c #88BED3",
+"!#	c #67575F",
+"~#	c #DA5665",
+"{#	c #826C6F",
+"]#	c #C5D6DB",
+"^#	c #1F5567",
+"/#	c #449CBE",
+"(#	c #52A4C1",
+"_#	c #5EAAC5",
+":#	c #6AB0C9",
+"<#	c #64555F",
+"[#	c #D95665",
+"}#	c #DD5665",
+"|#	c #CEDDDF",
+"1#	c #CADADD",
+"2#	c #C5D7DC",
+"3#	c #1B5367",
+"4#	c #265570",
+"5#	c #213E5E",
+"6#	c #25405F",
+"7#	c #284161",
+"8#	c #2C4261",
+"9#	c #2E4564",
+"0#	c #314664",
+"a#	c #342F39",
+"b#	c #6B606A",
+"c#	c #6E616A",
+"d#	c #75646D",
+"e#	c #78676D",
+"f#	c #7E6A6F",
+"g#	c #836C71",
+"h#	c #888082",
+"i#	c #DDE7E9",
+"j#	c #D7E4E6",
+"k#	c #CBDBDF",
+"l#	c #195066",
+"m#	c #1D415C",
+"n#	c #3E5CBF",
+"o#	c #374B6B",
+"p#	c #DDE9EB",
+"q#	c #D5E1E4",
+"r#	c #D0DEE3",
+"s#	c #C7D9DD",
+"t#	c #C2D5D8",
+"u#	c #707C7F",
+"v#	c #165064",
+"w#	c #1C405C",
+"x#	c #DAE9EE",
+"y#	c #D2E0E3",
+"z#	c #707375",
+"A#	c #144F64",
+"B#	c #1A405C",
+"C#	c #344A69",
+"D#	c #E2EAED",
+"E#	c #DBE7E9",
+"F#	c #CBDBDD",
+"G#	c #C6D7DC",
+"H#	c #C2D6D9",
+"I#	c #727E7F",
+"J#	c #114E64",
+"K#	c #183E5C",
+"L#	c #334A69",
+"M#	c #CAE1E8",
+"N#	c #D9E4E8",
+"O#	c #727D80",
+"P#	c #0F4D63",
+"Q#	c #173D5C",
+"R#	c #324969",
+"S#	c #BDD9E4",
+"T#	c #E5EEF1",
+"U#	c #EAF0F2",
+"V#	c #DFE9EB",
+"W#	c #CDDCE1",
+"X#	c #7D7F80",
+"Y#	c #0D465A",
+"Z#	c #163A58",
+"`#	c #344EA1",
+" $	c #2E4462",
+".$	c #D8E7ED",
+"+$	c #E2ECF1",
+"@$	c #E0EAED",
+"#$	c #CFDEE0",
+"$$	c #677174",
+"%$	c #7C7D7D",
+"&$	c #D7D7D7",
+"*$	c #0E1A1E",
+"=$	c #1B6D8F",
+"-$	c #215D77",
+";$	c #29627A",
+">$	c #2F647D",
+",$	c #38687F",
+"'$	c #406C81",
+")$	c #477084",
+"!$	c #608EA1",
+"~$	c #ACD2DF",
+"{$	c #B6D7E2",
+"]$	c #CCE1E8",
+"^$	c #E7EFF2",
+"/$	c #C4D5D9",
+"($	c #212223",
+"_$	c #CFCFCF",
+":$	c #5A5E60",
+"<$	c #0C1317",
+"[$	c #1A4353",
+"}$	c #1F4B5D",
+"|$	c #25505E",
+"1$	c #2C5461",
+"2$	c #325663",
+"3$	c #395A65",
+"4$	c #3E5C67",
+"5$	c #445F69",
+"6$	c #4A626A",
+"7$	c #4F666C",
+"8$	c #54686E",
+"9$	c #596B6F",
+"0$	c #5F6E72",
+"a$	c #647073",
+"b$	c #697175",
+"c$	c #6D7476",
+"d$	c #717778",
+"e$	c #747879",
+"f$	c #717677",
+"g$	c #6F7474",
+"h$	c #6C7273",
+"i$	c #6B7071",
+"j$	c #696F71",
+"k$	c #5F6566",
+"l$	c #1A1B1B",
+"m$	c #5D5D5D",
+"n$	c #DFDFDF",
+"o$	c #949494",
+"p$	c #8F8F8F",
+"q$	c #939393",
+"r$	c #DDDDDD",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . + @ # # # # $ $ $ $ $ $ % & & * * * = & & & & & - ; . . . ",
+". . > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 5 6 7 8 9 0 . . ",
+". a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D . ",
+". @ E F G H I J K L M N O P Q R S q T U V W X Y Z ` ` `  ...+.. ",
+". @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.` ` `  .}.* . ",
+". @.|.1.2.3.4.5.6.7.8.9.k 0.a.b.c.d.e.r s t u f.g.` ` ` h.}.* . ",
+". i.j.k.l.m.n.o.p.q.r.s.t.O u.n R v.w.x.y.z.A.B.C.D.E.F.G.H.* . ",
+". i.I.J.K.L.M.N.=.O.P.Q.R.S.T.U.~.V.W.X.Y.Z.`. +.+++ at +#+$+%+* . ",
+". i.&+*+=+-+;+4.>+,+7.'+)+!+~+a.b.{+]+^+/+(+_+:+<+[+}+|+1+7 * . ",
+". i.2+3+4+5+6+7+o.8+q.9+0+t.a+u.b+c+d+e+f+g+(+`.h+i+j+k+l+7 * . ",
+". i.m+n+o+p+q+r+N.=.s+t+u+v+w+u.x+y+z+W.X.Y.Z.`.A+B+C+ at +#+7 & . ",
+". i.D+E+F+G+-+H+I+>+J+K+L+M+N+~+a.O+P+Q+^+R+:+S+T+U+V+}+W+7 & . ",
+". i.X+Y+Z+`+ @. at e +@@@#@$@%@&@*@=@- at X.;@>@,@'@)@!@~@{@]@k+^@& . ",
+". /@(@_@:@<@p+[@}@I |@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@X B+e at f@6 & . ",
+". /@g at h@E+i at j@k at l@I+m at n@o at p@q at r@s at t@~.{.].^.u@(.v at w@U+e at f@6 & . ",
+". /@x at y@z at A@1.c d e B at C@D at E@F at G@H at I@n o p q r s t u v {@J at K@& . ",
+". /@L at M@N at O@k.F G H P at Q@R at E@S at G@r at T@Q R S q T U V W X U at e@V@& . ",
+". /@W at X@Y at Z@`@$.%.M. #.#n at +#@###r@$#!.~.{.].^.%#(._.:.&#*#=#& . ",
+". /@-#;#>#,#'#1.)#3.!#~#C at R@E at F@G@{#a.b.c.d.e.r s t ]#v {@5 & . ",
+". /@^#/#(#_#:#k.l.m.<#[#}#R at E@F at G@{#u.n R S q T |#1#2#X i+5 & . ",
+". /@3#4#5#6#7#8#9#0#a#b#c#d#e#f#g#h#T.U.~.i#j#T %#k#_.:.&#5 & . ",
+". /@l#m#n#n#n#n#n#n#o#4.>+,+7.'+)+!+~+a.b.p#d.q#r#(.s#w at t#u#& . ",
+". /@v#w#n#n#n#n#n#n#o#7+o.8+q.9+0+x#a+u.b+R S q y#|#1#2#~@u#& . ",
+". z#A#B#n#n#n#n#n#n#C#r+N.=.s+t+u+v+w+u.x+D#E#j#T %#F#G#H#I#& . ",
+". z#J#K#n#n#n#n#n#n#L#H+I+>+J+K+M#M+N+~+a.~.{.N#q#u@(.v at w@O#& . ",
+". z#P#Q#n#n#n#n#n#n#R#. at e + at g S#i j x#T#U#Q V#p q r W#t u O#& . ",
+". X#Y#Z#`#`#`#`#`#`# $[@H I J s+t+u+.$+$u.x+@$E#j#T #$F#G#$$%$. ",
+". &$*$=$-$;$>$,$'$)$!$%.l at I+~${$K+]$,.'.^$!.~.{.].^.u@(./$($_$. ",
+". . :$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$. . ",
+". . . n$o$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$q$r$. . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/ODB_DB.xpm b/share/metview/icons/ODB_DB.xpm
new file mode 100755
index 0000000..4319c67
--- /dev/null
+++ b/share/metview/icons/ODB_DB.xpm
@@ -0,0 +1,558 @@
+/* XPM */
+static char * ODB_DB_xpm[] = {
+"32 32 523 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #F4F5FA",
+"@ 	c #D4D9EC",
+"# 	c #B4BDDD",
+"$ 	c #95A3CF",
+"% 	c #8A98CA",
+"& 	c #8191C6",
+"* 	c #7888C2",
+"= 	c #7083BF",
+"- 	c #7082BF",
+"; 	c #7183BF",
+"> 	c #798AC3",
+", 	c #8392C7",
+"' 	c #8E9CCC",
+") 	c #98A4D1",
+"! 	c #B5BDDE",
+"~ 	c #D6DAEC",
+"{ 	c #FEFEFE",
+"] 	c #D1D6EA",
+"^ 	c #8694C8",
+"/ 	c #697BBB",
+"( 	c #6F81BD",
+"_ 	c #7E91C1",
+": 	c #8BA1C5",
+"< 	c #9CB2CC",
+"[ 	c #A4BBD0",
+"} 	c #ABC4D3",
+"| 	c #B4CCD6",
+"1 	c #BAD4DA",
+"2 	c #BDD7DC",
+"3 	c #BFDADE",
+"4 	c #C1DBDF",
+"5 	c #BFD7DD",
+"6 	c #BAD0DA",
+"7 	c #B5CAD9",
+"8 	c #B0C2D6",
+"9 	c #9DAFCE",
+"0 	c #899AC8",
+"a 	c #7384BF",
+"b 	c #6C7EBD",
+"c 	c #8C9ACB",
+"d 	c #D5DAEC",
+"e 	c #B6BEDE",
+"f 	c #6A7CBC",
+"g 	c #788BBE",
+"h 	c #94AAC5",
+"i 	c #A8BDCC",
+"j 	c #AAC0CE",
+"k 	c #ACC3D0",
+"l 	c #AFC6D1",
+"m 	c #B1C9D3",
+"n 	c #B4CCD5",
+"o 	c #B6CFD7",
+"p 	c #B9D2D9",
+"q 	c #BBD5DB",
+"r 	c #BDD8DD",
+"s 	c #C0DBDF",
+"t 	c #C2DBDF",
+"u 	c #C4DCDF",
+"v 	c #C7DCE0",
+"w 	c #C9DDE0",
+"x 	c #CCDEE0",
+"y 	c #CEDEE0",
+"z 	c #D0DFE1",
+"A 	c #D3DFE1",
+"B 	c #D4E0E1",
+"C 	c #BAC5D7",
+"D 	c #8795C6",
+"E 	c #7282BF",
+"F 	c #BFC6E2",
+"G 	c #C3CAE4",
+"H 	c #7183BB",
+"I 	c #9DB2C6",
+"J 	c #A4B9C9",
+"K 	c #A6BBCA",
+"L 	c #A8BECC",
+"M 	c #ABC1CE",
+"N 	c #ADC4D0",
+"O 	c #B0C7D2",
+"P 	c #B2CAD4",
+"Q 	c #B4CDD6",
+"R 	c #B7D0D8",
+"S 	c #B9D3DA",
+"T 	c #BCD6DC",
+"U 	c #BED9DD",
+"V 	c #C3DBDF",
+"W 	c #C5DCDF",
+"X 	c #C8DDE0",
+"Y 	c #CADDE0",
+"Z 	c #CFDEE1",
+"` 	c #D1DFE1",
+" .	c #D6E0E2",
+"..	c #D8E1E2",
+"+.	c #DAE1E2",
+"@.	c #D4DAE0",
+"#.	c #7C8BC2",
+"$.	c #CFD4E9",
+"%.	c #5F71B7",
+"&.	c #97ACC3",
+"*.	c #A2B6C7",
+"=.	c #A7BCCB",
+"-.	c #A9BFCD",
+";.	c #ACC2CF",
+">.	c #AEC5D1",
+",.	c #B0C8D3",
+"'.	c #B3CBD5",
+").	c #B5CED6",
+"!.	c #B8D1D8",
+"~.	c #BCD7DC",
+"{.	c #C6DCDF",
+"].	c #CBDDE0",
+"^.	c #CDDEE0",
+"/.	c #D2DFE1",
+"(.	c #D9E1E2",
+"_.	c #DBE1E2",
+":.	c #DDE2E3",
+"<.	c #CAD0DC",
+"[.	c #6878BB",
+"}.	c #5568B4",
+"|.	c #6175B5",
+"1.	c #97AAC5",
+"2.	c #A5BACA",
+"3.	c #A7BDCC",
+"4.	c #ACC3CF",
+"5.	c #B8D2D9",
+"6.	c #C7DCDF",
+"7.	c #D5E0E1",
+"8.	c #D7E0E2",
+"9.	c #DCE2E2",
+"0.	c #C4CBD9",
+"a.	c #6476B6",
+"b.	c #5F70B6",
+"c.	c #596DB3",
+"d.	c #7691B2",
+"e.	c #5A6FB3",
+"f.	c #6377B7",
+"g.	c #879CC3",
+"h.	c #AFC7D2",
+"i.	c #BCD6DB",
+"j.	c #CEDEE1",
+"k.	c #D0DADF",
+"l.	c #A3AECE",
+"m.	c #6376B6",
+"n.	c #5A6CAF",
+"o.	c #868DA9",
+"p.	c #5D6FB4",
+"q.	c #5B6FB5",
+"r.	c #8EB0B3",
+"s.	c #98B8BB",
+"t.	c #87A2BC",
+"u.	c #6F86BB",
+"v.	c #5D70B5",
+"w.	c #5C70B6",
+"x.	c #687BBA",
+"y.	c #768DBF",
+"z.	c #8AA1C7",
+"A.	c #95ACCC",
+"B.	c #A2BBD1",
+"C.	c #B1CBD8",
+"D.	c #BFD9DD",
+"E.	c #C5DADE",
+"F.	c #BACFDB",
+"G.	c #AEC1D5",
+"H.	c #A3B5D0",
+"I.	c #97A9CC",
+"J.	c #8292C3",
+"K.	c #677BB9",
+"L.	c #586DB3",
+"M.	c #596DB2",
+"N.	c #6277AE",
+"O.	c #687FA0",
+"P.	c #8B979E",
+"Q.	c #A5A4A4",
+"R.	c #8FB0B4",
+"S.	c #A2C0C3",
+"T.	c #ABC8CA",
+"U.	c #B5D0D2",
+"V.	c #B7D0D7",
+"W.	c #A7BED4",
+"X.	c #91A7CE",
+"Y.	c #7E94C5",
+"Z.	c #7289C0",
+"`.	c #697EBB",
+" +	c #6075B7",
+".+	c #5A70B6",
+"++	c #576DB4",
+"@+	c #5A6FB5",
+"#+	c #5F74B5",
+"$+	c #647BB8",
+"%+	c #6B82B9",
+"&+	c #6F89BA",
+"*+	c #7C95BA",
+"=+	c #86A5B8",
+"-+	c #8BAAB2",
+";+	c #84A1A9",
+">+	c #7A95A0",
+",+	c #738C98",
+"'+	c #8D989E",
+")+	c #A7A4A4",
+"!+	c #8FB1B4",
+"~+	c #99B9BC",
+"{+	c #A2C1C3",
+"]+	c #ACC9CB",
+"^+	c #B5D1D3",
+"/+	c #BFD8DA",
+"(+	c #C8E0E2",
+"_+	c #D0E7E8",
+":+	c #CCE4E5",
+"<+	c #C9E2E2",
+"[+	c #C5DFDF",
+"}+	c #C1DCDD",
+"|+	c #BDD9DA",
+"1+	c #BAD6D7",
+"2+	c #B6D3D4",
+"3+	c #B2D0D1",
+"4+	c #AECECE",
+"5+	c #ABCBCB",
+"6+	c #A7C8C8",
+"7+	c #A3C5C5",
+"8+	c #9FC2C2",
+"9+	c #97B8BB",
+"0+	c #8DACB1",
+"a+	c #83A0A8",
+"b+	c #79949F",
+"c+	c #768D99",
+"d+	c #90999F",
+"e+	c #A9A6A5",
+"f+	c #5D70B4",
+"g+	c #90B1B5",
+"h+	c #9AB9BC",
+"i+	c #A3C1C4",
+"j+	c #B6D1D3",
+"k+	c #BFD9DB",
+"l+	c #C9E1E2",
+"m+	c #C8E1E2",
+"n+	c #C5DEDF",
+"o+	c #C1DCDC",
+"p+	c #BDD9D9",
+"q+	c #B9D6D6",
+"r+	c #AECDCE",
+"s+	c #AACBCB",
+"t+	c #96B8BA",
+"u+	c #8CABB1",
+"v+	c #829FA7",
+"w+	c #78939E",
+"x+	c #788E99",
+"y+	c #919A9F",
+"z+	c #ABA6A5",
+"A+	c #556AB3",
+"B+	c #8EAEB5",
+"C+	c #9ABABD",
+"D+	c #A4C2C4",
+"E+	c #ADCACC",
+"F+	c #B6D2D4",
+"G+	c #C0DADB",
+"H+	c #C9E1E3",
+"I+	c #C4DEDF",
+"J+	c #C1DBDC",
+"K+	c #B5D3D3",
+"L+	c #B2D0D0",
+"M+	c #AECDCD",
+"N+	c #AACACB",
+"O+	c #A6C7C8",
+"P+	c #95B7B9",
+"Q+	c #8BABB0",
+"R+	c #819FA7",
+"S+	c #77929E",
+"T+	c #798F9A",
+"U+	c #939BA0",
+"V+	c #ABA5A6",
+"W+	c #596BB2",
+"X+	c #5468B1",
+"Y+	c #647DB3",
+"Z+	c #96B6BD",
+"`+	c #A4C2C5",
+" @	c #AECACD",
+".@	c #B7D2D4",
+"+@	c #C1DADC",
+"@@	c #CAE2E3",
+"#@	c #CFE7E8",
+"$@	c #C0DBDC",
+"%@	c #BDD8D9",
+"&@	c #B1D0D0",
+"*@	c #AACACA",
+"=@	c #A6C7C7",
+"-@	c #A2C4C5",
+";@	c #95B6B9",
+">@	c #8BAAAF",
+",@	c #819EA6",
+"'@	c #76929D",
+")@	c #7B909A",
+"!@	c #9098A2",
+"~@	c #6D79AF",
+"{@	c #5B6DB3",
+"]@	c #5A6DB5",
+"^@	c #6D87B4",
+"/@	c #576DB3",
+"(@	c #768EBA",
+"_@	c #A6C2CB",
+":@	c #B8D3D5",
+"<@	c #CBE3E4",
+"[@	c #CFE6E7",
+"}@	c #CBE4E4",
+"|@	c #BCD8D9",
+"1@	c #B9D5D6",
+"2@	c #B5D2D3",
+"3@	c #ADCDCD",
+"4@	c #A2C4C4",
+"5@	c #9EC1C1",
+"6@	c #94B5B8",
+"7@	c #8AA9AF",
+"8@	c #809DA6",
+"9@	c #728B9F",
+"0@	c #6376A9",
+"a@	c #586BB0",
+"b@	c #7B85AA",
+"c@	c #5A6EB5",
+"d@	c #94B4BB",
+"e@	c #7D96BB",
+"f@	c #5D73B6",
+"g@	c #6076B7",
+"h@	c #788EC1",
+"i@	c #9BB1D2",
+"j@	c #B8CFDD",
+"k@	c #C7E0E1",
+"l@	c #C4DEDE",
+"m@	c #B8D5D6",
+"n@	c #B1CFD0",
+"o@	c #A9CACA",
+"p@	c #A0C1C3",
+"q@	c #8EAEBE",
+"r@	c #7794B4",
+"s@	c #647AB1",
+"t@	c #586DB0",
+"u@	c #576CB0",
+"v@	c #657AA2",
+"w@	c #8A979E",
+"x@	c #A6A4A4",
+"y@	c #99B8BC",
+"z@	c #ABC8CB",
+"A@	c #ADC7D0",
+"B@	c #9DB6CE",
+"C@	c #8CA1C9",
+"D@	c #7286C0",
+"E@	c #5F74B7",
+"F@	c #5D71B7",
+"G@	c #5E71B8",
+"H@	c #6178B9",
+"I@	c #687EBB",
+"J@	c #6E83BB",
+"K@	c #6C83BB",
+"L@	c #657BB9",
+"M@	c #5F74B6",
+"N@	c #596EB3",
+"O@	c #5B70B4",
+"P@	c #667EB6",
+"Q@	c #7590B6",
+"R@	c #7C9AB2",
+"S@	c #7F9DAA",
+"T@	c #79959F",
+"U@	c #748C98",
+"V@	c #8E989E",
+"W@	c #A7A5A5",
+"X@	c #90B1B4",
+"Y@	c #BFD9DA",
+"Z@	c #BBD5D9",
+"`@	c #AFCBD4",
+" #	c #A6C1D1",
+".#	c #A3BFCE",
+"+#	c #A7C4CD",
+"@#	c #A8C8CD",
+"##	c #8CACB1",
+"$#	c #82A0A8",
+"%#	c #78949F",
+"&#	c #778D99",
+"*#	c #909A9F",
+"=#	c #AAA6A5",
+"-#	c #90B2B5",
+";#	c #ADC9CC",
+">#	c #C0D9DB",
+",#	c #96B7BA",
+"'#	c #8CABB0",
+")#	c #77939E",
+"!#	c #929BA0",
+"~#	c #ACA7A6",
+"{#	c #5D71B6",
+"]#	c #84A2B5",
+"^#	c #9BBABD",
+"/#	c #8BAAB0",
+"(#	c #77929D",
+"_#	c #7A8F9A",
+":#	c #949BA0",
+"<#	c #9A99A9",
+"[#	c #5367B2",
+"}#	c #566CB3",
+"|#	c #6D84B7",
+"1#	c #A1BEC3",
+"2#	c #AECBCD",
+"3#	c #CAE2E4",
+"4#	c #CFE7E7",
+"5#	c #CBE4E5",
+"6#	c #76919D",
+"7#	c #798D9C",
+"8#	c #6877AC",
+"9#	c #5669B0",
+"0#	c #86A5B3",
+"a#	c #6D86B5",
+"b#	c #576CB3",
+"c#	c #687DB8",
+"d#	c #869DC4",
+"e#	c #B0C9D6",
+"f#	c #C7E1E1",
+"g#	c #7F9DAE",
+"h#	c #6780AC",
+"i#	c #5A70AF",
+"j#	c #5468AF",
+"k#	c #6A7CAB",
+"l#	c #9B9CA5",
+"m#	c #9AB9C1",
+"n#	c #8BA5C1",
+"o#	c #7990BF",
+"p#	c #667ABB",
+"q#	c #778DC1",
+"r#	c #7E94C4",
+"s#	c #879EC6",
+"t#	c #8FA7C8",
+"u#	c #98B2CB",
+"v#	c #94B0C9",
+"w#	c #89A1C3",
+"x#	c #7C95BF",
+"y#	c #738CBB",
+"z#	c #6C85B9",
+"A#	c #667DB7",
+"B#	c #5D74B5",
+"C#	c #556BB2",
+"D#	c #5C72B1",
+"E#	c #6981AF",
+"F#	c #6C86A6",
+"G#	c #708899",
+"H#	c #8C989E",
+"I#	c #BED8DA",
+"J#	c #C5DEE0",
+"K#	c #B6CCDD",
+"L#	c #A1B8D3",
+"M#	c #97AFCF",
+"N#	c #8DA5C9",
+"O#	c #8399C5",
+"P#	c #798FC0",
+"Q#	c #6F86BD",
+"R#	c #6E85BD",
+"S#	c #768DBE",
+"T#	c #7C93BD",
+"U#	c #819BBF",
+"V#	c #85A0BF",
+"W#	c #87A4BF",
+"X#	c #91B0BF",
+"Y#	c #8DADB2",
+"Z#	c #83A1A9",
+"`#	c #5D72B5",
+" $	c #88A7B6",
+".$	c #A4A0A7",
+"+$	c #6172B7",
+"@$	c #CDD2E8",
+"#$	c #6275B6",
+"$$	c #86A4BB",
+"%$	c #A5C3C5",
+"&$	c #7C8F9A",
+"*$	c #818BA5",
+"=$	c #6475B5",
+"-$	c #CACFE8",
+";$	c #D4D8EB",
+">$	c #7D8CC3",
+",$	c #677AB8",
+"'$	c #8DA5C3",
+")$	c #AEC8D1",
+"!$	c #C2DBDC",
+"~$	c #8AA9AE",
+"{$	c #7A96A7",
+"]$	c #6780A5",
+"^$	c #5F72B3",
+"/$	c #8391C6",
+"($	c #D9DEED",
+"_$	c #DFE4F1",
+":$	c #96A3D0",
+"<$	c #6F7FBE",
+"[$	c #6377BA",
+"}$	c #7D8FC4",
+"|$	c #95ABCE",
+"1$	c #A6BDD5",
+"2$	c #ACC4D6",
+"3$	c #B0CAD6",
+"4$	c #B5D0D7",
+"5$	c #B9D4D7",
+"6$	c #B4D2D3",
+"7$	c #AECCCF",
+"8$	c #A3C1CA",
+"9$	c #9BB9C6",
+"0$	c #91B0C2",
+"a$	c #89A7BE",
+"b$	c #7B94B9",
+"c$	c #6C82B8",
+"d$	c #5E72B5",
+"e$	c #6D7EBD",
+"f$	c #99A6D1",
+"g$	c #E6E8F3",
+"h$	c #F9F9FC",
+"i$	c #D6DBED",
+"j$	c #B1BBDC",
+"k$	c #96A3D1",
+"l$	c #8A97CA",
+"m$	c #7D8DC4",
+"n$	c #677ABA",
+"o$	c #6175B7",
+"p$	c #6275B9",
+"q$	c #687BBB",
+"r$	c #7182BF",
+"s$	c #7C8EC3",
+"t$	c #8796C9",
+"u$	c #94A2CE",
+"v$	c #B3BDDC",
+"w$	c #DBDEEE",
+"x$	c #FBFBFD",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . + @ # $ % & * = - = ; > , ' ) ! ~ + . . . . . . . ",
+". . . { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . ",
+". . e f g h i j k l m n o p q r s t u v w x y z A B C D E F . . ",
+". G H I J K L M N O P Q R S T U s V W X Y x Z ` A  ...+. at .#.$.. ",
+"{ %.&.*.J =.-.;.>.,.'.).!.1 ~.3 4 u {.X ].^.Z /.B  .(._.:.<.[.. ",
+". }.|.1.2.3.j 4.l m n o 5.q r s t u 6.w ].y z /.7.8.(.9.0.a.b.. ",
+". c.d.e.f.g.3.N h.P Q R S i.U s V W v Y x j.` A  .k.l.m.n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.4 V E.F.G.H.I.J.K.L.M.N.O.P.Q.p.. ",
+". q.R.s.S.T.U.V.W.X.Y.Z.`. +.+++++ at +#+$+%+&+*+=+-+;+>+,+'+)+p.. ",
+". q.!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+. ",
+". q.g+h+i+]+j+k+l+_+:+m+n+o+p+q+2+3+r+s+6+7+8+t+u+v+w+x+y+z+f+. ",
+". A+B+C+D+E+F+G+H+_+:+m+I+J+p+q+K+L+M+N+O+7+8+P+Q+R+S+T+U+V+W+. ",
+". X+Y+Z+`+ @. at +@@@#@:+m+I+$@%@q+K+&@M+*@=@- at 8+;@>@,@'@)@!@~@{@. ",
+". ]@^@/@(@_@:@J+<@[@}@m+I+$@|@1 at 2@&@3@*@=@4 at 5@6 at 7@8 at 9@0 at a@b at p.. ",
+". c at r.d@e at f@g at h@i at j@H+k at l@$@|@m at 2@n at 3@o@=@p at q@r at s@t at u@v at w@x at p.. ",
+". c@!+y at S.z@A at B@C at D@E at F@G at H@I at J@K at L@M@@+N at O@P at Q@R at S@T at U@V at W@p.. ",
+". c at X@~+i+]+j+Y at m+_+:+m+I+Z@`@ #.#+#@#N+6+7+8+t+##$#%#&#*#=#f+. ",
+". c at -#C+i+;#j+>#l+_+:+m+I+o+p+q+K+3+r+N+6+7+8+,#'#v+)#x+!#~#f+. ",
+". {#]#^#`+E+. at G+@@#@:+m+I+$@%@q+K+&@M+*@O+7+8+;@/#,@(#_#:#<#b.. ",
+". [#}#|#1#2#. at +@3#4#5#m+I+$@|@1 at K+&@3@*@=@4 at 8+6@7 at 8@6#7#8#9#p.. ",
+". ]@0#a#b#c#d#e#<@[@<@f#I+$@|@m at 2@&@3 at o@=@4 at 5@6 at g#h#i#j#k#l#p.. ",
+". c at r.s.m#n#o#f.]@p#D at q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#x at p.. ",
+". c at R.s.S.T.U.I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#9+Y#Z#T at U@V at W@p.. ",
+". c at X@~+i+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+. ",
+". c at -#C+i+;#j+>#l+_+:+m+I+o+p+q+K+3+r+s+6+7+8+t+u+v+w+x+y+z+f+. ",
+". `# $^#`+E+. at G+@@#@:+m+I+$@%@q+K+&@M+*@O+7+8+;@/#,@(#_#:#.$+$. ",
+". @$#$$$%$2#. at +@3#4#5#m+I+$@|@1 at K+&@3@*@=@4 at 8+6@7 at 8@6#&$*$=$-$. ",
+". . ;$>$,$'$)$!$<@[@<@f#I+$@|@m at 2@&@3 at o@=@4 at 5@6@~${$]$^$/$($. . ",
+". . . . _$:$<$[$}$|$1$2$3$4$5$m at 6$7$8$9$0$a$b$c$d$e$f$g$. . . . ",
+". . . . . . . h$i$j$k$l$m$; n$o$p$q$r$s$t$u$v$w$x$. . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/ODB_FILTER.xpm b/share/metview/icons/ODB_FILTER.xpm
new file mode 100755
index 0000000..361d945
--- /dev/null
+++ b/share/metview/icons/ODB_FILTER.xpm
@@ -0,0 +1,590 @@
+/* XPM */
+static char * ODB_FILTER_xpm[] = {
+"32 32 555 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #F4F5FA",
+"@ 	c #D4D9EC",
+"# 	c #B4BDDD",
+"$ 	c #95A3CF",
+"% 	c #8A98CA",
+"& 	c #8191C6",
+"* 	c #7888C2",
+"= 	c #7083BF",
+"- 	c #7082BF",
+"; 	c #7183BF",
+"> 	c #798AC3",
+", 	c #8392C7",
+"' 	c #8E9CCC",
+") 	c #98A4D1",
+"! 	c #B5BDDE",
+"~ 	c #D6DAEC",
+"{ 	c #FEFEFE",
+"] 	c #D1D6EA",
+"^ 	c #8694C8",
+"/ 	c #697BBB",
+"( 	c #6F81BD",
+"_ 	c #7E91C1",
+": 	c #8BA1C5",
+"< 	c #9CB2CC",
+"[ 	c #A4BBD0",
+"} 	c #ABC4D3",
+"| 	c #B4CCD6",
+"1 	c #BAD4DA",
+"2 	c #BDD7DC",
+"3 	c #BFDADE",
+"4 	c #C1DBDF",
+"5 	c #BFD7DD",
+"6 	c #BAD0DA",
+"7 	c #B5CAD9",
+"8 	c #B0C2D6",
+"9 	c #9DAFCE",
+"0 	c #899AC8",
+"a 	c #7384BF",
+"b 	c #6C7EBD",
+"c 	c #8C9ACB",
+"d 	c #D5DAEC",
+"e 	c #B6BEDE",
+"f 	c #6A7CBC",
+"g 	c #788BBE",
+"h 	c #94AAC5",
+"i 	c #A8BDCC",
+"j 	c #AAC0CE",
+"k 	c #ACC3D0",
+"l 	c #AFC6D1",
+"m 	c #B1C9D3",
+"n 	c #B4CCD5",
+"o 	c #B6CFD7",
+"p 	c #B9D2D9",
+"q 	c #BBD5DB",
+"r 	c #BDD8DD",
+"s 	c #C0DBDF",
+"t 	c #C2DBDF",
+"u 	c #C4DCDF",
+"v 	c #C7DCE0",
+"w 	c #C9DDE0",
+"x 	c #CCDEE0",
+"y 	c #CEDEE0",
+"z 	c #D0DFE1",
+"A 	c #D3DFE1",
+"B 	c #D4E0E1",
+"C 	c #BAC5D7",
+"D 	c #8795C6",
+"E 	c #7282BF",
+"F 	c #BFC6E2",
+"G 	c #C3CAE4",
+"H 	c #7183BB",
+"I 	c #9DB2C6",
+"J 	c #A4B9C9",
+"K 	c #A6BBCA",
+"L 	c #A8BECC",
+"M 	c #ABC1CE",
+"N 	c #ADC4D0",
+"O 	c #B0C7D2",
+"P 	c #B2CAD4",
+"Q 	c #B4CDD6",
+"R 	c #B7D0D8",
+"S 	c #B9D3DA",
+"T 	c #BCD6DC",
+"U 	c #BED9DD",
+"V 	c #C3DBDF",
+"W 	c #C5DCDF",
+"X 	c #C8DDE0",
+"Y 	c #CADDE0",
+"Z 	c #CFDEE1",
+"` 	c #D1DFE1",
+" .	c #D6E0E2",
+"..	c #D8E1E2",
+"+.	c #DAE1E2",
+"@.	c #D4DAE0",
+"#.	c #7C8BC2",
+"$.	c #CFD4E9",
+"%.	c #5F71B7",
+"&.	c #97ACC3",
+"*.	c #A2B6C7",
+"=.	c #A7BCCB",
+"-.	c #A9BFCD",
+";.	c #ACC2CF",
+">.	c #AEC5D1",
+",.	c #B0C8D3",
+"'.	c #B3CBD5",
+").	c #B5CED6",
+"!.	c #B8D1D8",
+"~.	c #BCD7DC",
+"{.	c #C6DCDF",
+"].	c #CBDDE0",
+"^.	c #CDDEE0",
+"/.	c #D2DFE1",
+"(.	c #D9E1E2",
+"_.	c #DBE1E2",
+":.	c #DDE2E3",
+"<.	c #CAD0DC",
+"[.	c #6878BB",
+"}.	c #5568B4",
+"|.	c #6175B5",
+"1.	c #97AAC5",
+"2.	c #A5BACA",
+"3.	c #A7BDCC",
+"4.	c #ACC3CF",
+"5.	c #B8D2D9",
+"6.	c #C7DCDF",
+"7.	c #D5E0E1",
+"8.	c #D7E0E2",
+"9.	c #DCE2E2",
+"0.	c #C4CBD9",
+"a.	c #6476B6",
+"b.	c #5F70B6",
+"c.	c #596DB3",
+"d.	c #7691B2",
+"e.	c #5A6FB3",
+"f.	c #6377B7",
+"g.	c #879CC3",
+"h.	c #AFC7D2",
+"i.	c #BCD6DB",
+"j.	c #CEDEE1",
+"k.	c #D0DADF",
+"l.	c #A3AECE",
+"m.	c #6376B6",
+"n.	c #5A6CAF",
+"o.	c #868DA9",
+"p.	c #5D6FB4",
+"q.	c #5B6FB5",
+"r.	c #8EB0B3",
+"s.	c #98B8BB",
+"t.	c #87A2BC",
+"u.	c #6F86BB",
+"v.	c #5D70B5",
+"w.	c #5C70B6",
+"x.	c #687BBA",
+"y.	c #768DBF",
+"z.	c #8AA1C7",
+"A.	c #95ACCC",
+"B.	c #A2BBD1",
+"C.	c #B1CBD8",
+"D.	c #BFD9DD",
+"E.	c #C5DADE",
+"F.	c #BACFDB",
+"G.	c #AEC1D5",
+"H.	c #A3B5D0",
+"I.	c #97A9CC",
+"J.	c #8292C3",
+"K.	c #677BB9",
+"L.	c #586DB3",
+"M.	c #596DB2",
+"N.	c #6277AE",
+"O.	c #687FA0",
+"P.	c #8B979E",
+"Q.	c #A5A4A4",
+"R.	c #8FB0B4",
+"S.	c #A2C0C3",
+"T.	c #ABC8CA",
+"U.	c #B5D0D2",
+"V.	c #B7D0D7",
+"W.	c #A7BED4",
+"X.	c #91A7CE",
+"Y.	c #7E94C5",
+"Z.	c #7289C0",
+"`.	c #697EBB",
+" +	c #6075B7",
+".+	c #5A70B6",
+"++	c #576DB4",
+"@+	c #5A6FB5",
+"#+	c #5F74B5",
+"$+	c #647BB8",
+"%+	c #6B82B9",
+"&+	c #6F89BA",
+"*+	c #7C95BA",
+"=+	c #86A5B8",
+"-+	c #8BAAB2",
+";+	c #84A1A9",
+">+	c #7A95A0",
+",+	c #738C98",
+"'+	c #8D989E",
+")+	c #A7A4A4",
+"!+	c #8FB1B4",
+"~+	c #99B9BC",
+"{+	c #A2C1C3",
+"]+	c #ACC9CB",
+"^+	c #B5D1D3",
+"/+	c #BFD8DA",
+"(+	c #C8E0E2",
+"_+	c #D0E7E8",
+":+	c #CCE4E5",
+"<+	c #C9E2E2",
+"[+	c #C5DFDF",
+"}+	c #C1DCDD",
+"|+	c #BDD9DA",
+"1+	c #BAD6D7",
+"2+	c #B6D3D4",
+"3+	c #B2D0D1",
+"4+	c #AECECE",
+"5+	c #ABCBCB",
+"6+	c #A7C8C8",
+"7+	c #A3C5C5",
+"8+	c #9FC2C2",
+"9+	c #97B8BB",
+"0+	c #8DACB1",
+"a+	c #83A0A8",
+"b+	c #79949F",
+"c+	c #768D99",
+"d+	c #90999F",
+"e+	c #A9A6A5",
+"f+	c #5D70B4",
+"g+	c #90B1B5",
+"h+	c #9AB9BC",
+"i+	c #A3C1C4",
+"j+	c #B6D1D3",
+"k+	c #BFD9DB",
+"l+	c #C9E1E2",
+"m+	c #C8E1E2",
+"n+	c #C5DEDF",
+"o+	c #C1DCDC",
+"p+	c #BDD9D9",
+"q+	c #B9D6D6",
+"r+	c #899FA6",
+"s+	c #6E7F89",
+"t+	c #6D7E88",
+"u+	c #6B7C86",
+"v+	c #697B84",
+"w+	c #647580",
+"x+	c #556472",
+"y+	c #5A6876",
+"z+	c #546272",
+"A+	c #54606F",
+"B+	c #616672",
+"C+	c #6F6C76",
+"D+	c #464F7D",
+"E+	c #F2F2F3",
+"F+	c #556AB3",
+"G+	c #8EAEB5",
+"H+	c #9ABABD",
+"I+	c #A4C2C4",
+"J+	c #ADCACC",
+"K+	c #B6D2D4",
+"L+	c #C0DADB",
+"M+	c #C9E1E3",
+"N+	c #C4DEDF",
+"O+	c #C1DBDC",
+"P+	c #B5D3D3",
+"Q+	c #B2D0D0",
+"R+	c #626C79",
+"S+	c #71717D",
+"T+	c #8D8D96",
+"U+	c #39394C",
+"V+	c #84848E",
+"W+	c #3C3C52",
+"X+	c #E4E4E6",
+"Y+	c #5468B1",
+"Z+	c #647DB3",
+"`+	c #96B6BD",
+" @	c #A4C2C5",
+".@	c #AECACD",
+"+@	c #B7D2D4",
+"@@	c #C1DADC",
+"#@	c #CAE2E3",
+"$@	c #CFE7E8",
+"%@	c #B9D3D4",
+"&@	c #B6D0D1",
+"*@	c #B1D0D0",
+"=@	c #A9A9AF",
+"-@	c #DBDBDB",
+";@	c #454557",
+">@	c #CACACC",
+",@	c #4B4C62",
+"'@	c #5A6DB5",
+")@	c #6D87B4",
+"!@	c #576DB3",
+"~@	c #768EBA",
+"{@	c #A6C2CB",
+"]@	c #B8D3D5",
+"^@	c #CBE3E4",
+"/@	c #CFE6E7",
+"(@	c #CBE4E4",
+"_@	c #AAC3C2",
+":@	c #303A32",
+"<@	c #A7C0C0",
+"[@	c #B5D2D3",
+"}@	c #616C79",
+"|@	c #464658",
+"1@	c #C9C9CB",
+"2@	c #4B4C61",
+"3@	c #5A6EB5",
+"4@	c #94B4BB",
+"5@	c #7D96BB",
+"6@	c #5D73B6",
+"7@	c #6076B7",
+"8@	c #788EC1",
+"9@	c #9BB1D2",
+"0@	c #B8CFDD",
+"a@	c #C7E0E1",
+"b@	c #C4DEDE",
+"c@	c #121B10",
+"d@	c #1F2D1D",
+"e@	c #96AEAD",
+"f@	c #B1CFD0",
+"g@	c #474759",
+"h@	c #C8C8CB",
+"i@	c #99B8BC",
+"j@	c #ABC8CB",
+"k@	c #ADC7D0",
+"l@	c #9DB6CE",
+"m@	c #8CA1C9",
+"n@	c #7286C0",
+"o@	c #5F74B7",
+"p@	c #5D71B7",
+"q@	c #5E71B8",
+"r@	c #576CA4",
+"s@	c #1A2F17",
+"t@	c #38AD14",
+"u@	c #172517",
+"v@	c #4C5D85",
+"w@	c #454D70",
+"x@	c #313144",
+"y@	c #343447",
+"z@	c #343448",
+"A@	c #353549",
+"B@	c #2B2B40",
+"C@	c #36364A",
+"D@	c #3A3A4D",
+"E@	c #3C3C4E",
+"F@	c #3D3D50",
+"G@	c #313247",
+"H@	c #90B1B4",
+"I@	c #98B4B6",
+"J@	c #869D9D",
+"K@	c #91A6A7",
+"L@	c #9AB0B0",
+"M@	c #A5BBB9",
+"N@	c #AFC2C2",
+"O@	c #AFC4C4",
+"P@	c #AFC6C6",
+"Q@	c #AFC6C7",
+"R@	c #96ACAE",
+"S@	c #1E3318",
+"T@	c #48EA16",
+"U@	c #3FC514",
+"V@	c #1C2E17",
+"W@	c #3D4749",
+"X@	c #DADADA",
+"Y@	c #48485A",
+"Z@	c #C4C4C6",
+"`@	c #D6D6D7",
+" #	c #D4D4D5",
+".#	c #D2D2D3",
+"+#	c #494A5F",
+"@#	c #90B2B5",
+"##	c #7A9191",
+"$#	c #1A2A15",
+"%#	c #28521D",
+"&#	c #294D1C",
+"*#	c #274B1E",
+"=#	c #27471E",
+"-#	c #25441D",
+";#	c #24401C",
+">#	c #223B1C",
+",#	c #21381B",
+"'#	c #245016",
+")#	c #43D815",
+"!#	c #1D3D14",
+"~#	c #4E564C",
+"{#	c #D8D8D8",
+"]#	c #4A4A5B",
+"^#	c #C6C6C8",
+"/#	c #5D71B6",
+"(#	c #84A2B5",
+"_#	c #9BBABD",
+":#	c #7B9191",
+"<#	c #2A5B1C",
+"[#	c #47E415",
+"}#	c #275B18",
+"|#	c #434E3F",
+"1#	c #D1D1D1",
+"2#	c #49495B",
+"3#	c #C5C5C8",
+"4#	c #5367B2",
+"5#	c #566CB3",
+"6#	c #6D84B7",
+"7#	c #798E90",
+"8#	c #3BB914",
+"9#	c #141D10",
+"0#	c #373846",
+"a#	c #3F3F51",
+"b#	c #3E3E51",
+"c#	c #2C2C41",
+"d#	c #38384C",
+"e#	c #37374A",
+"f#	c #38394E",
+"g#	c #86A5B3",
+"h#	c #6D86B5",
+"i#	c #435384",
+"j#	c #25561A",
+"k#	c #3CBE15",
+"l#	c #1A2616",
+"m#	c #A5A6A5",
+"n#	c #D3D3D4",
+"o#	c #D4D4D4",
+"p#	c #C0C0C3",
+"q#	c #D9D9D9",
+"r#	c #748B8F",
+"s#	c #1D3B15",
+"t#	c #318F13",
+"u#	c #319312",
+"v#	c #329712",
+"w#	c #339B13",
+"x#	c #359E13",
+"y#	c #35A313",
+"z#	c #36A713",
+"A#	c #38AA13",
+"B#	c #39B113",
+"C#	c #3DC214",
+"D#	c #162312",
+"E#	c #838486",
+"F#	c #4C4C5D",
+"G#	c #C3C3C6",
+"H#	c #8DA8A9",
+"I#	c #576862",
+"J#	c #586860",
+"K#	c #57685E",
+"L#	c #54675C",
+"M#	c #4D5D57",
+"N#	c #42544F",
+"O#	c #3D4E49",
+"P#	c #374843",
+"Q#	c #31433E",
+"R#	c #12190F",
+"S#	c #3FC614",
+"T#	c #182716",
+"U#	c #3E4557",
+"V#	c #A6A6AC",
+"W#	c #4D4D5E",
+"X#	c #131910",
+"Y#	c #3FC915",
+"Z#	c #1C2C17",
+"`#	c #839998",
+" $	c #2C2C40",
+".$	c #323246",
+"+$	c #38384B",
+"@$	c #36364B",
+"#$	c #ADC9CC",
+"$$	c #C0D9DB",
+"%$	c #141C10",
+"&$	c #809693",
+"*$	c #4E4E5F",
+"=$	c #C1C1C4",
+"-$	c #D5D5D6",
+";$	c #4A4B5F",
+">$	c #5D72B5",
+",$	c #88A7B6",
+"'$	c #C0DBDC",
+")$	c #1B2319",
+"!$	c #7F9490",
+"~$	c #CDD2E8",
+"{$	c #6275B6",
+"]$	c #86A4BB",
+"^$	c #A5C3C5",
+"/$	c #AECBCD",
+"($	c #CAE2E4",
+"_$	c #CFE7E7",
+":$	c #CBE4E5",
+"<$	c #879C9B",
+"[$	c #B9D5D6",
+"}$	c #757581",
+"|$	c #92929B",
+"1$	c #3F3F52",
+"2$	c #82828C",
+"3$	c #424255",
+"4$	c #D4D8EB",
+"5$	c #7D8CC3",
+"6$	c #677AB8",
+"7$	c #8DA5C3",
+"8$	c #AEC8D1",
+"9$	c #C2DBDC",
+"0$	c #C7E1E1",
+"a$	c #BCD8D9",
+"b$	c #B8D5D6",
+"c$	c #869CA2",
+"d$	c #6A7A84",
+"e$	c #697883",
+"f$	c #677781",
+"g$	c #657680",
+"h$	c #60707C",
+"i$	c #4C5565",
+"j$	c #525E71",
+"k$	c #4B5773",
+"l$	c #485079",
+"m$	c #585F82",
+"n$	c #808394",
+"o$	c #93939D",
+"p$	c #F1F1F2",
+"q$	c #DFE4F1",
+"r$	c #96A3D0",
+"s$	c #6F7FBE",
+"t$	c #6377BA",
+"u$	c #7D8FC4",
+"v$	c #95ABCE",
+"w$	c #A6BDD5",
+"x$	c #ACC4D6",
+"y$	c #B0CAD6",
+"z$	c #B5D0D7",
+"A$	c #B9D4D7",
+"B$	c #B4D2D3",
+"C$	c #AECCCF",
+"D$	c #A3C1CA",
+"E$	c #9BB9C6",
+"F$	c #91B0C2",
+"G$	c #89A7BE",
+"H$	c #7B94B9",
+"I$	c #6C82B8",
+"J$	c #5E72B5",
+"K$	c #6D7EBD",
+"L$	c #99A6D1",
+"M$	c #E6E8F3",
+"N$	c #F9F9FC",
+"O$	c #D6DBED",
+"P$	c #B1BBDC",
+"Q$	c #96A3D1",
+"R$	c #8A97CA",
+"S$	c #7D8DC4",
+"T$	c #677ABA",
+"U$	c #6175B7",
+"V$	c #6275B9",
+"W$	c #687BBB",
+"X$	c #7182BF",
+"Y$	c #7C8EC3",
+"Z$	c #8796C9",
+"`$	c #94A2CE",
+" %	c #B3BDDC",
+".%	c #DBDEEE",
+"+%	c #FBFBFD",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . + @ # $ % & * = - = ; > , ' ) ! ~ + . . . . . . . ",
+". . . { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . ",
+". . e f g h i j k l m n o p q r s t u v w x y z A B C D E F . . ",
+". G H I J K L M N O P Q R S T U s V W X Y x Z ` A  ...+. at .#.$.. ",
+"{ %.&.*.J =.-.;.>.,.'.).!.1 ~.3 4 u {.X ].^.Z /.B  .(._.:.<.[.. ",
+". }.|.1.2.3.j 4.l m n o 5.q r s t u 6.w ].y z /.7.8.(.9.0.a.b.. ",
+". c.d.e.f.g.3.N h.P Q R S i.U s V W v Y x j.` A  .k.l.m.n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.4 V E.F.G.H.I.J.K.L.M.N.O.P.Q.p.. ",
+". q.R.s.S.T.U.V.W.X.Y.Z.`. +.+++++ at +#+$+%+&+*+=+-+;+>+,+'+)+p.. ",
+". q.!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+. ",
+". q.g+h+i+]+j+k+l+_+:+m+n+o+p+q+2+3+r+s+t+u+v+w+x+y+z+A+B+C+D+E+",
+". F+G+H+I+J+K+L+M+_+:+m+N+O+p+q+P+Q+R+S+T+T+T+T+U+V+T+T+T+T+W+X+",
+". Y+Z+`+ @. at +@@@#@$@:+m+N+%@&@q+P+*@R+=@- at -@- at -@;@>@- at -@- at -@, at X+",
+". '@)@!@~@{@]@O+^@/@(@m+N+_@:@<@[@*@}@=@- at -@- at -@|@1 at -@- at -@- at 2@X+",
+". 3 at r.4@5 at 6@7 at 8@9 at 0@M+a at b@_ at c@d at e@f@}@=@- at -@- at -@g at h@- at -@- at -@2 at X+",
+". 3@!+i at S.j@k at l@m at n@o at p@q at r@s at t@u at v@w at x@y at y@z at A@B at C@U+D at E@F at G@X+",
+". 3 at H@~+I at J@K at L@M at N@O at P@Q at R@S at T@U at V@W@=@- at -@- at X@Y at Z@`@ # #.#+#X+",
+". 3@@#H+##$#%#&#*#=#-#;#>#,#'#T at T@)#!#~#{#- at -@-@]#^#- at -@- at -@2 at X+",
+". /#(#_#:#<#T at T@T at T@T at T@T at T@T at T@T at T@[#}#|#1#- at -@2#3#- at -@- at -@2 at X+",
+". 4#5#6#7#<#T at T@T at T@T at T@T at T@T at T@T at T@T at 8#9#0#a#b#c#U+D at d#e#A at f#X+",
+". '@g#h#i#j#T at T@T at T@T at T@T at T@T at T@T at T@k#l#m#n#o# #]#p#{#q#q#X at 2@X+",
+". 3 at r.s.r#s#t#u#v#w#x#y#z#A#B#T at T@C#D#E#- at -@- at -@F#G#- at -@- at -@2 at X+",
+". 3 at R.s.H#I#J#K#L#M#N#O#P#Q#R#T at S#T#U#V#q#- at -@- at W#G#- at -@- at -@2 at X+",
+". 3 at H@~+i+]+^+/+(+_+:+<+[+}+X#Y#Z#`#R+z at A@z at y@y@ $.$A at +$D at E@@$X+",
+". 3@@#H+i+#$j+$$l+_+:+m+N+o+%$V@&$3+R+=@- at -@- at -@*$=$X@{#-$ #;$X+",
+". >$,$_# @J++ at L+#@$@:+m+N+'$)$!$P+*@R+=@- at -@- at -@*$p#- at -@- at -@2 at X+",
+". ~${$]$^$/$+@@@($_$:$m+N+'$<$[$P+*@}@}$|$|$|$|$1$2$|$|$|$|$3$X+",
+". . 4$5$6$7$8$9$^@/@^@0$N+'$a$b$[@*@c$d$e$f$g$h$i$j$k$l$m$n$o$p$",
+". . . . q$r$s$t$u$v$w$x$y$z$A$b$B$C$D$E$F$G$H$I$J$K$L$M$. . . . ",
+". . . . . . . N$O$P$Q$R$S$; T$U$V$W$X$Y$Z$`$ %.%+%. . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/ODB_MARS.xpm b/share/metview/icons/ODB_MARS.xpm
new file mode 100755
index 0000000..5f5245c
--- /dev/null
+++ b/share/metview/icons/ODB_MARS.xpm
@@ -0,0 +1,473 @@
+/* XPM */
+static char * ODB_MARS_xpm[] = {
+"32 32 438 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #FEFEFE",
+"@ 	c #D0D0D2",
+"# 	c #A0A1A6",
+"$ 	c #888B91",
+"% 	c #72747C",
+"& 	c #75767E",
+"* 	c #8A8C92",
+"= 	c #A2A4A8",
+"- 	c #D9D9DB",
+"; 	c #E3E3E4",
+"> 	c #7C7D83",
+", 	c #343641",
+"' 	c #242733",
+") 	c #636670",
+"! 	c #7F828B",
+"~ 	c #9B9EA5",
+"{ 	c #999BA3",
+"] 	c #7E8188",
+"^ 	c #5E636D",
+"/ 	c #212430",
+"( 	c #3B3C47",
+"_ 	c #86878E",
+": 	c #EBECEE",
+"< 	c #F0F0F1",
+"[ 	c #7F8288",
+"} 	c #212531",
+"| 	c #767881",
+"1 	c #BCBFC7",
+"2 	c #CACDD5",
+"3 	c #DCDEE3",
+"4 	c #E5E6EA",
+"5 	c #ECEDF0",
+"6 	c #E4E6EA",
+"7 	c #C9CCD3",
+"8 	c #BABDC4",
+"9 	c #696B75",
+"0 	c #272A36",
+"a 	c #8E9097",
+"b 	c #F6F6F8",
+"c 	c #D9D9DC",
+"d 	c #3A3C46",
+"e 	c #4E505A",
+"f 	c #C1C4CB",
+"g 	c #D7D9DF",
+"h 	c #F9FAFA",
+"i 	c #F8F9FA",
+"j 	c #D4D7DD",
+"k 	c #BCBFC6",
+"l 	c #43454F",
+"m 	c #484A53",
+"n 	c #E4E5E7",
+"o 	c #C3C3C7",
+"p 	c #888B94",
+"q 	c #C9CCD4",
+"r 	c #EEEFF1",
+"s 	c #ECEDEF",
+"t 	c #C8CBD3",
+"u 	c #7A7C84",
+"v 	c #2F323D",
+"w 	c #D4D5D7",
+"x 	c #AEB1B8",
+"y 	c #D7DADF",
+"z 	c #FCFCFD",
+"A 	c #FBFBFC",
+"B 	c #D5D7DD",
+"C 	c #A3A6AE",
+"D 	c #353742",
+"E 	c #E9E9EA",
+"F 	c #EEEEF0",
+"G 	c #393C46",
+"H 	c #8C8F97",
+"I 	c #D2D4DB",
+"J 	c #787A82",
+"K 	c #4C4D57",
+"L 	c #F8F8F8",
+"M 	c #7C7E86",
+"N 	c #52545D",
+"O 	c #FBFBFB",
+"P 	c #C6C9D2",
+"Q 	c #3C3E4A",
+"R 	c #98999F",
+"S 	c #E1E1E3",
+"T 	c #20222F",
+"U 	c #EFF0F2",
+"V 	c #AFB7ED",
+"W 	c #707DDF",
+"X 	c #3B4DD4",
+"Y 	c #394BD3",
+"Z 	c #6E7BDF",
+"` 	c #ACB3ED",
+" .	c #FEFEFF",
+"..	c #EBECEF",
+"+.	c #B9BCC4",
+"@.	c #292D37",
+"#.	c #76797F",
+"$.	c #80828B",
+"%.	c #D9DBE1",
+"&.	c #E8EAFA",
+"*.	c #5666DA",
+"=.	c #1329CB",
+"-.	c #1C32CD",
+";.	c #4B5CD7",
+">.	c #4C5CD8",
+",.	c #1D32CD",
+"'.	c #5060D8",
+").	c #E3E6F9",
+"!.	c #686A74",
+"~.	c #919299",
+"{.	c #FDFDFD",
+"].	c #2E313C",
+"^.	c #BEC1C9",
+"/.	c #F3F4FC",
+"(.	c #2F43D1",
+"_.	c #182DCC",
+":.	c #919BE7",
+"<.	c #FCFCFE",
+"[.	c #96A0E8",
+"}.	c #182ECC",
+"|.	c #2B3ED1",
+"1.	c #F0F2FC",
+"2.	c #FAFAFB",
+"3.	c #B8BBC4",
+"4.	c #494D56",
+"5.	c #CACCCF",
+"6.	c #CFD1D8",
+"7.	c #7380E0",
+"8.	c #B7BEEF",
+"9.	c #BEC4F1",
+"0.	c #142ACB",
+"a.	c #6C7ADF",
+"b.	c #E6E6E8",
+"c.	c #999AA0",
+"d.	c #757881",
+"e.	c #E3E5E9",
+"f.	c #FDFDFE",
+"g.	c #EDEFF7",
+"h.	c #D9DEEE",
+"i.	c #B6BEE3",
+"j.	c #2036C6",
+"k.	c #6977DA",
+"l.	c #727FE0",
+"m.	c #DADDF7",
+"n.	c #DFE1E5",
+"o.	c #555964",
+"p.	c #B6B6BB",
+"q.	c #82848B",
+"r.	c #8189A7",
+"s.	c #92A0C9",
+"t.	c #95A4CD",
+"u.	c #92A3CB",
+"v.	c #91A4CA",
+"w.	c #99AECE",
+"x.	c #A4BCD2",
+"y.	c #AFC8D7",
+"z.	c #A2BAD3",
+"A.	c #9BAFD1",
+"B.	c #9BACD0",
+"C.	c #9DACD1",
+"D.	c #A1AED3",
+"E.	c #A4AFD4",
+"F.	c #DCE0EF",
+"G.	c #CBD0F4",
+"H.	c #AAB2EC",
+"I.	c #E7E8EC",
+"J.	c #797B86",
+"K.	c #9EA0A5",
+"L.	c #FBFBFD",
+"M.	c #6878A8",
+"N.	c #92A7C3",
+"O.	c #A7BDCB",
+"P.	c #ABC2CF",
+"Q.	c #AFC7D2",
+"R.	c #B4CCD5",
+"S.	c #B8D1D8",
+"T.	c #BCD6DC",
+"U.	c #C0DBDF",
+"V.	c #C4DCE0",
+"W.	c #C8DDE0",
+"X.	c #CCDEE1",
+"Y.	c #D0DFE1",
+"Z.	c #D4E0E2",
+"`.	c #D7E0E2",
+" +	c #B5BFD6",
+".+	c #A6B0D5",
+"++	c #F7F7FD",
+"@+	c #162CCC",
+"#+	c #7E8AE3",
+"$+	c #9598A1",
+"%+	c #898A8F",
+"&+	c #C5CCE5",
+"*+	c #7083B5",
+"=+	c #A4B9C9",
+"-+	c #A8BECC",
+";+	c #ADC3D0",
+">+	c #B1C8D3",
+",+	c #B5CDD6",
+"'+	c #B9D2D9",
+")+	c #BDD8DD",
+"!+	c #C1DBDF",
+"~+	c #C5DCE0",
+"{+	c #C9DDE0",
+"]+	c #CDDEE1",
+"^+	c #D1DFE1",
+"/+	c #D5E0E2",
+"(+	c #D9E1E3",
+"_+	c #DAE1E2",
+":+	c #7E8CC2",
+"<+	c #EEF0F7",
+"[+	c #F1F2FC",
+"}+	c #8691E4",
+"|+	c #989BA3",
+"1+	c #C2CAE3",
+"2+	c #6D87B1",
+"3+	c #6A80B6",
+"4+	c #758ABD",
+"5+	c #8399C3",
+"6+	c #95ACCA",
+"7+	c #ADC6D4",
+"8+	c #BAD4DA",
+"9+	c #BED9DE",
+"0+	c #C2DCDF",
+"a+	c #C7DDE0",
+"b+	c #CBDEE0",
+"c+	c #BFCFDB",
+"d+	c #A7B6D1",
+"e+	c #8E9EC7",
+"f+	c #7688BC",
+"g+	c #6C7EB2",
+"h+	c #7983B4",
+"i+	c #EFF1F8",
+"j+	c #C3C8F2",
+"k+	c #B2B9EE",
+"l+	c #E8EAED",
+"m+	c #7C7E89",
+"n+	c #A1A1A6",
+"o+	c #81A0B3",
+"p+	c #9FBEC0",
+"q+	c #ABC7CC",
+"r+	c #ACC5D3",
+"s+	c #A8BED7",
+"t+	c #93A8CE",
+"u+	c #859AC7",
+"v+	c #8095C4",
+"w+	c #7C91C2",
+"x+	c #6F87BF",
+"y+	c #748DBE",
+"z+	c #849EC0",
+"A+	c #89A7BD",
+"B+	c #84A1B1",
+"C+	c #7995A1",
+"D+	c #85959D",
+"E+	c #8F95B5",
+"F+	c #E5E8F9",
+"G+	c #E1E3E7",
+"H+	c #585B67",
+"I+	c #B6B7BB",
+"J+	c #C3CAE3",
+"K+	c #82A0B4",
+"L+	c #A0BFC1",
+"M+	c #B0CCCE",
+"N+	c #C0DADB",
+"O+	c #D0E7E8",
+"P+	c #CBE3E4",
+"Q+	c #C5DFDF",
+"R+	c #BEDADA",
+"S+	c #B8D5D5",
+"T+	c #B1D0D0",
+"U+	c #ABCBCB",
+"V+	c #A4C6C6",
+"W+	c #9CBEBF",
+"X+	c #8AA9AF",
+"Y+	c #7995A0",
+"Z+	c #88969E",
+"`+	c #9095B5",
+" @	c #98A2E8",
+".@	c #8994E5",
+"+@	c #CCCFD6",
+"@@	c #2A2D39",
+"#@	c #EAEAEB",
+"$@	c #B3BCDC",
+"%@	c #7994B6",
+"&@	c #A1BFC2",
+"*@	c #B1CDCF",
+"=@	c #C1DBDC",
+"-@	c #D1E8E9",
+";@	c #CAE3E4",
+">@	c #C4DEDF",
+",@	c #BED9DA",
+"'@	c #B7D4D5",
+")@	c #B1CFD0",
+"!@	c #AACBCB",
+"~@	c #9BBDBE",
+"{@	c #89A8AE",
+"]@	c #78939E",
+"^@	c #8C989E",
+"/@	c #7A83B2",
+"(@	c #6775D8",
+"_@	c #4254D5",
+":@	c #FAFBFE",
+"<@	c #BABCC5",
+"[@	c #4D4E58",
+"}@	c #6B85B3",
+"|@	c #6E85B6",
+"1@	c #97B0C7",
+"2@	c #B4CED8",
+"3@	c #CFE6E8",
+"4@	c #CAE3E3",
+"5@	c #C3DEDE",
+"6@	c #BDD9DA",
+"7@	c #B7D4D4",
+"8@	c #B0CFCF",
+"9@	c #AACACA",
+"0@	c #A3C5C5",
+"a@	c #97B9BD",
+"b@	c #809DAE",
+"c@	c #6881A5",
+"d@	c #6374AC",
+"e@	c #6B78B1",
+"f@	c #1A30CA",
+"g@	c #7B87E2",
+"h@	c #F8F8FD",
+"i@	c #DEDFE4",
+"j@	c #737780",
+"k@	c #95969C",
+"l@	c #81A0B4",
+"m@	c #9EBDC1",
+"n@	c #96AFC6",
+"o@	c #91A8CA",
+"p@	c #889DC9",
+"q@	c #8298C7",
+"r@	c #7F95C4",
+"s@	c #7E95C3",
+"t@	c #7F97C2",
+"u@	c #7991BF",
+"v@	c #758EBD",
+"w@	c #728CBA",
+"x@	c #738EB7",
+"y@	c #758FB0",
+"z@	c #718BA4",
+"A@	c #858BB3",
+"B@	c #C9CFF0",
+"C@	c #F2F3F5",
+"D@	c #BABDC6",
+"E@	c #2F313D",
+"F@	c #F2F2F2",
+"G@	c #B0CCCF",
+"H@	c #C0DADC",
+"I@	c #B6D4D5",
+"J@	c #79959F",
+"K@	c #89969E",
+"L@	c #9195B5",
+"M@	c #C8CBD2",
+"N@	c #41444E",
+"O@	c #C1C9E3",
+"P@	c #7187B7",
+"Q@	c #A1C0C3",
+"R@	c #B1CDD0",
+"S@	c #AACACB",
+"T@	c #8A969F",
+"U@	c #727FB7",
+"V@	c #EBEEF7",
+"W@	c #DADCE1",
+"X@	c #82848E",
+"Y@	c #54575F",
+"Z@	c #728CB4",
+"`@	c #6E84B9",
+" #	c #748ABD",
+".#	c #879EC6",
+"+#	c #A5BBD6",
+"@#	c #BCD5DE",
+"##	c #BDD9D9",
+"$#	c #A9C9CA",
+"%#	c #95B5C2",
+"&#	c #7D99B9",
+"*#	c #6D85B2",
+"=#	c #6378B1",
+"-#	c #6A7BAF",
+";#	c #7B85B4",
+">#	c #E0E2E6",
+",#	c #ACAFB8",
+"'#	c #393B46",
+")#	c #EDEDED",
+"!#	c #A7BCD5",
+"~#	c #899FC5",
+"{#	c #7D92C1",
+"]#	c #798EC1",
+"^#	c #778DC0",
+"/#	c #798EC0",
+"(#	c #7A91BF",
+"_#	c #839DBF",
+":#	c #F5F6F7",
+"<#	c #383B46",
+"[#	c #DADADD",
+"}#	c #BCC0C8",
+"|#	c #484C56",
+"1#	c #53545E",
+"2#	c #D8DDED",
+"3#	c #7F99B8",
+"4#	c #888FB8",
+"5#	c #DFE2EA",
+"6#	c #D1D4DA",
+"7#	c #7F808B",
+"8#	c #282631",
+"9#	c #581E2A",
+"0#	c #851E28",
+"a#	c #871E28",
+"b#	c #B4BEDB",
+"c#	c #8699C4",
+"d#	c #99B2C9",
+"e#	c #B5CDD8",
+"f#	c #97B8BD",
+"g#	c #7F9DAE",
+"h#	c #6D84A5",
+"i#	c #717FAE",
+"j#	c #8389A3",
+"k#	c #70747E",
+"l#	c #363A45",
+"m#	c #352632",
+"n#	c #531E2A",
+"o#	c #811E28",
+"p#	c #D3D8EB",
+"q#	c #B7C1DF",
+"r#	c #A1AED5",
+"s#	c #9AA9D1",
+"t#	c #94A5CE",
+"u#	c #8EA1CA",
+"v#	c #8A9FC7",
+"w#	c #8B9FC7",
+"x#	c #8FA1C9",
+"y#	c #899AC2",
+"z#	c #7E8CB3",
+"A#	c #7D86A6",
+"B#	c #787D91",
+"C#	c #83848A",
+"D#	c #B1B2B5",
+"E#	c #E5E5E8",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . + @ # $ % & * = - . . . . . . . . . . . . ",
+". . . . . . . . . ; > , ' ) ! ~ { ] ^ / ( _ : . . . . . . . . . ",
+". . . . . . . < [ } | 1 2 3 4 5 5 6 3 7 8 9 0 a b . . . . . . . ",
+". . . . . . c d e f g h . . . . . . . . i j k l m n . . . . . . ",
+". . . . . o 0 p q r . . . . . . . . . . . . s t u v w . . . . . ",
+". . . . - 0 x y z . . . . . . . . . . . . . . A B C D E . . . . ",
+". . . F G H g . . . . . . . . . . . . . . . . . . I J K L . . . ",
+". . . M N t z . . . . . . . . . . . . . . . . . . O P Q R . . . ",
+". . S T f U . . . . . . . V W X Y Z `  .. . . . . . ..+. at .F . . ",
+". . #.$.%.. . . . . . &.*.=.-.;.>.,.=.'.).. . . . . . B !.~.. . ",
+". {.].^.{.. . . . . /.(._.:.<.. . <.[.}.|.1.. . . . . 2.3.4.. . ",
+". 5.].6.. . . . . . 7.=.8.. . . . . . 9.0.a.. . . . . . q ' b.. ",
+". c.d.e.. . f.g.h.i.j.k. .. . . . . . . l.=.m.. . . . . n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.. . . G.=.H.. . . . . I.J.K.. ",
+"L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+. . ++ at +#+. . . . . r $+%+. ",
+"&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+. [+0.}+. . . . . U |+$ . ",
+"1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+. j+=.k+. . . . . l+m+n+. ",
+"1+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+i+. *._.F+. . . . . G+H+I+. ",
+"J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+i+ @=.. at . . . . . . +@@@#@. ",
+"$@%@&@*@=@-@;@>@,@'@)@!@V+~@{@]@^@/@(@=._@:@. . . . . {.<@[@. . ",
+"1+}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@e at f@g at h@. . . . . . i at j@k at . . ",
+"1+l at m@n at o@p at q@r at s@t at u@v at w@x at y@z at D+A@B at . . . . . . . C at D@E at F@. . ",
+"J+K+L+G at H@- at P+>@, at I@T+U+V+W+X+J at K@L at i+. . . . . . f.M at N@K.. . . ",
+"O at P@Q at R@=@-@;@>@6@'@)@S at V+~@{@]@T at U@V at . . . . . . W at X@Y at A . . . ",
+"1+Z@`@ #.#+#@#5@##7 at 8@$#%#&#*#=#-#;#i+. . . .  .>#,#'#)#. . . . ",
+"1+o+p+q+r+!#~#{#]#^#/#(#_#A+B+C+D+E+i+. . . :#2 p <#[#. . . . . ",
+"J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+J at Z+`+i+. + G+}#|#1#: . . . . . . ",
+"2#3#&@*@=@-@;@>@,@'@)@!@V+~@{@]@^@4#5#6#}#7#8#9#0#a#a#a#a#a#a#. ",
+". b#c#d#e#3 at 4@5@##7 at 8@9 at 0@f#g#h#i#j#k#l#m#n#o#a#a#a#a#a#a#a#a#. ",
+". . z p#q#r#s#t#u#v#w#x#y#z#A#B#C#c.D#E#. . . . . . . . . . . . ",
+". . . . . . . . . f.. . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/ODB_VISUALISER.xpm b/share/metview/icons/ODB_VISUALISER.xpm
new file mode 100755
index 0000000..139e759
--- /dev/null
+++ b/share/metview/icons/ODB_VISUALISER.xpm
@@ -0,0 +1,577 @@
+/* XPM */
+static char * ODB_MANAGER_xpm[] = {
+"32 32 542 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #F4F5FA",
+"@ 	c #D4D9EC",
+"# 	c #B4BDDD",
+"$ 	c #95A3CF",
+"% 	c #8A98CA",
+"& 	c #8191C6",
+"* 	c #7888C2",
+"= 	c #7083BF",
+"- 	c #7082BF",
+"; 	c #7183BF",
+"> 	c #798AC3",
+", 	c #8392C7",
+"' 	c #8E9CCC",
+") 	c #98A4D1",
+"! 	c #B5BDDE",
+"~ 	c #D6DAEC",
+"{ 	c #FEFEFE",
+"] 	c #D1D6EA",
+"^ 	c #8694C8",
+"/ 	c #697BBB",
+"( 	c #6F81BD",
+"_ 	c #7E91C1",
+": 	c #8BA1C5",
+"< 	c #9CB2CC",
+"[ 	c #A4BBD0",
+"} 	c #ABC4D3",
+"| 	c #B4CCD6",
+"1 	c #BAD4DA",
+"2 	c #BDD7DC",
+"3 	c #BFDADE",
+"4 	c #C1DBDF",
+"5 	c #BFD7DD",
+"6 	c #BAD0DA",
+"7 	c #B5CAD9",
+"8 	c #B0C2D6",
+"9 	c #9DAFCE",
+"0 	c #899AC8",
+"a 	c #7384BF",
+"b 	c #6C7EBD",
+"c 	c #8C9ACB",
+"d 	c #D5DAEC",
+"e 	c #B6BEDE",
+"f 	c #6A7CBC",
+"g 	c #788BBE",
+"h 	c #94AAC5",
+"i 	c #A8BDCC",
+"j 	c #AAC0CE",
+"k 	c #ACC3D0",
+"l 	c #AFC6D1",
+"m 	c #B1C9D3",
+"n 	c #B4CCD5",
+"o 	c #B6CFD7",
+"p 	c #B9D2D9",
+"q 	c #BBD5DB",
+"r 	c #BDD8DD",
+"s 	c #C0DBDF",
+"t 	c #C2DBDF",
+"u 	c #C4DCDF",
+"v 	c #C7DCE0",
+"w 	c #C9DDE0",
+"x 	c #CCDEE0",
+"y 	c #CEDEE0",
+"z 	c #D0DFE1",
+"A 	c #D3DFE1",
+"B 	c #D4E0E1",
+"C 	c #BAC5D7",
+"D 	c #8795C6",
+"E 	c #7282BF",
+"F 	c #BFC6E2",
+"G 	c #C3CAE4",
+"H 	c #7183BB",
+"I 	c #9DB2C6",
+"J 	c #A4B9C9",
+"K 	c #A6BBCA",
+"L 	c #A8BECC",
+"M 	c #ABC1CE",
+"N 	c #ADC4D0",
+"O 	c #B0C7D2",
+"P 	c #B2CAD4",
+"Q 	c #B4CDD6",
+"R 	c #B7D0D8",
+"S 	c #B9D3DA",
+"T 	c #BCD6DC",
+"U 	c #BED9DD",
+"V 	c #C3DBDF",
+"W 	c #C5DCDF",
+"X 	c #C8DDE0",
+"Y 	c #CADDE0",
+"Z 	c #CFDEE1",
+"` 	c #D1DFE1",
+" .	c #D6E0E2",
+"..	c #D8E1E2",
+"+.	c #DAE1E2",
+"@.	c #D4DAE0",
+"#.	c #7C8BC2",
+"$.	c #CFD4E9",
+"%.	c #5F71B7",
+"&.	c #97ACC3",
+"*.	c #A2B6C7",
+"=.	c #A7BCCB",
+"-.	c #A9BFCD",
+";.	c #ACC2CF",
+">.	c #AEC5D1",
+",.	c #B0C8D3",
+"'.	c #B3CBD5",
+").	c #B5CED6",
+"!.	c #B8D1D8",
+"~.	c #BCD7DC",
+"{.	c #C6DCDF",
+"].	c #CBDDE0",
+"^.	c #CDDEE0",
+"/.	c #D2DFE1",
+"(.	c #D9E1E2",
+"_.	c #DBE1E2",
+":.	c #DDE2E3",
+"<.	c #CAD0DC",
+"[.	c #6878BB",
+"}.	c #5568B4",
+"|.	c #6175B5",
+"1.	c #97AAC5",
+"2.	c #A5BACA",
+"3.	c #A7BDCC",
+"4.	c #ACC3CF",
+"5.	c #B8D2D9",
+"6.	c #C7DCDF",
+"7.	c #D5E0E1",
+"8.	c #D7E0E2",
+"9.	c #DCE2E2",
+"0.	c #C4CBD9",
+"a.	c #6476B6",
+"b.	c #5F70B6",
+"c.	c #596DB3",
+"d.	c #7691B2",
+"e.	c #5A6FB3",
+"f.	c #6377B7",
+"g.	c #879CC3",
+"h.	c #AFC7D2",
+"i.	c #BCD6DB",
+"j.	c #CEDEE1",
+"k.	c #D0DADF",
+"l.	c #A3AECE",
+"m.	c #6376B6",
+"n.	c #5A6CAF",
+"o.	c #868DA9",
+"p.	c #5D6FB4",
+"q.	c #5B6FB5",
+"r.	c #8EB0B3",
+"s.	c #98B8BB",
+"t.	c #87A2BC",
+"u.	c #6F86BB",
+"v.	c #5D70B5",
+"w.	c #5C70B6",
+"x.	c #687BBA",
+"y.	c #768DBF",
+"z.	c #8AA1C7",
+"A.	c #95ACCC",
+"B.	c #A2BBD1",
+"C.	c #B1CBD8",
+"D.	c #BFD9DD",
+"E.	c #C5DADE",
+"F.	c #BACFDB",
+"G.	c #AEC1D5",
+"H.	c #A3B5D0",
+"I.	c #97A9CC",
+"J.	c #8292C3",
+"K.	c #677BB9",
+"L.	c #586DB3",
+"M.	c #596DB2",
+"N.	c #6277AE",
+"O.	c #687FA0",
+"P.	c #8B979E",
+"Q.	c #A5A4A4",
+"R.	c #8FB0B4",
+"S.	c #A2C0C3",
+"T.	c #ABC8CA",
+"U.	c #B5D0D2",
+"V.	c #B7D0D7",
+"W.	c #A7BED4",
+"X.	c #91A7CE",
+"Y.	c #7E94C5",
+"Z.	c #7289C0",
+"`.	c #697EBB",
+" +	c #6075B7",
+".+	c #5A70B6",
+"++	c #576DB4",
+"@+	c #5A6FB5",
+"#+	c #5F74B5",
+"$+	c #647BB8",
+"%+	c #6B82B9",
+"&+	c #6F89BA",
+"*+	c #7C95BA",
+"=+	c #86A5B8",
+"-+	c #8BAAB2",
+";+	c #84A1A9",
+">+	c #7A95A0",
+",+	c #738C98",
+"'+	c #8D989E",
+")+	c #A7A4A4",
+"!+	c #8FB1B4",
+"~+	c #99B9BC",
+"{+	c #A2C1C3",
+"]+	c #ACC9CB",
+"^+	c #B5D1D3",
+"/+	c #BFD8DA",
+"(+	c #C8E0E2",
+"_+	c #D0E7E8",
+":+	c #CCE4E5",
+"<+	c #C9E2E2",
+"[+	c #C5DFDF",
+"}+	c #C1DCDD",
+"|+	c #BDD9DA",
+"1+	c #BAD6D7",
+"2+	c #B6D3D4",
+"3+	c #B2D0D1",
+"4+	c #AECECE",
+"5+	c #ABCBCB",
+"6+	c #A7C8C8",
+"7+	c #A3C5C5",
+"8+	c #9FC2C2",
+"9+	c #97B8BB",
+"0+	c #8DACB1",
+"a+	c #83A0A8",
+"b+	c #79949F",
+"c+	c #768D99",
+"d+	c #90999F",
+"e+	c #A9A6A5",
+"f+	c #5D70B4",
+"g+	c #90B1B5",
+"h+	c #9AB9BC",
+"i+	c #A3C1C4",
+"j+	c #B6D1D3",
+"k+	c #BFD9DB",
+"l+	c #C9E1E2",
+"m+	c #C8E1E2",
+"n+	c #C5DEDF",
+"o+	c #C1DCDC",
+"p+	c #BDD9D9",
+"q+	c #B9D6D6",
+"r+	c #AECDCE",
+"s+	c #AACBCB",
+"t+	c #96B8BA",
+"u+	c #8CABB1",
+"v+	c #829FA7",
+"w+	c #78939E",
+"x+	c #788E99",
+"y+	c #919A9F",
+"z+	c #ABA6A5",
+"A+	c #556AB3",
+"B+	c #8EAEB5",
+"C+	c #9ABABD",
+"D+	c #A4C2C4",
+"E+	c #ADCACC",
+"F+	c #B6D2D4",
+"G+	c #C0DADB",
+"H+	c #C9E1E3",
+"I+	c #C4DEDF",
+"J+	c #B6CFCF",
+"K+	c #A2BAB9",
+"L+	c #9EB8B6",
+"M+	c #9BB5B4",
+"N+	c #99B3B1",
+"O+	c #95B0AF",
+"P+	c #92ADAD",
+"Q+	c #8EABAB",
+"R+	c #8CA9A8",
+"S+	c #89A7A6",
+"T+	c #809D9E",
+"U+	c #789396",
+"V+	c #6F898F",
+"W+	c #677E87",
+"X+	c #697C84",
+"Y+	c #7E8689",
+"Z+	c #948F8F",
+"`+	c #596AB0",
+" @	c #5468B1",
+".@	c #647DB3",
+"+@	c #96B6BD",
+"@@	c #A4C2C5",
+"#@	c #AECACD",
+"$@	c #B7D2D4",
+"%@	c #C1DADC",
+"&@	c #CAE2E3",
+"*@	c #CFE7E8",
+"=@	c #7F908D",
+"-@	c #1D221B",
+";@	c #2F332D",
+">@	c #2E332D",
+",@	c #2E332C",
+"'@	c #2E322C",
+")@	c #2D322C",
+"!@	c #2D312B",
+"~@	c #2C312B",
+"{@	c #2C302A",
+"]@	c #2B302A",
+"^@	c #2B2F2A",
+"/@	c #272B27",
+"(@	c #1D2222",
+"_@	c #E4E5E4",
+":@	c #5A6DB5",
+"<@	c #6D87B4",
+"[@	c #576DB3",
+"}@	c #768EBA",
+"|@	c #A6C2CB",
+"1@	c #B8D3D5",
+"2@	c #C1DBDC",
+"3@	c #CBE3E4",
+"4@	c #CFE6E7",
+"5@	c #CBE4E4",
+"6@	c #313731",
+"7@	c #B4B2AE",
+"8@	c #E7E4E0",
+"9@	c #5F615D",
+"0@	c #939591",
+"a@	c #5A6EB5",
+"b@	c #94B4BB",
+"c@	c #7D96BB",
+"d@	c #5D73B6",
+"e@	c #6076B7",
+"f@	c #788EC1",
+"g@	c #9BB1D2",
+"h@	c #B8CFDD",
+"i@	c #C7E0E1",
+"j@	c #272D27",
+"k@	c #CCCAC6",
+"l@	c #5B606D",
+"m@	c #B8B7B9",
+"n@	c #E68280",
+"o@	c #E6B9B6",
+"p@	c #7B7C76",
+"q@	c #878985",
+"r@	c #99B8BC",
+"s@	c #ABC8CB",
+"t@	c #ADC7D0",
+"u@	c #9DB6CE",
+"v@	c #8CA1C9",
+"w@	c #7286C0",
+"x@	c #5F74B7",
+"y@	c #5D71B7",
+"z@	c #202524",
+"A@	c #535966",
+"B@	c #B3B3B6",
+"C@	c #E6B0AD",
+"D@	c #E52626",
+"E@	c #E67573",
+"F@	c #90B1B4",
+"G@	c #BFD9DA",
+"H@	c #555A68",
+"I@	c #B1B2B4",
+"J@	c #E7E1DD",
+"K@	c #E54646",
+"L@	c #E68381",
+"M@	c #E54443",
+"N@	c #E7DFDB",
+"O@	c #E69B99",
+"P@	c #E7DAD7",
+"Q@	c #90B2B5",
+"R@	c #ADC9CC",
+"S@	c #C0D9DB",
+"T@	c #555C69",
+"U@	c #B1B0B3",
+"V@	c #E69694",
+"W@	c #E65655",
+"X@	c #E7E2DE",
+"Y@	c #E53333",
+"Z@	c #E6C1BE",
+"`@	c #E65150",
+" #	c #E54645",
+".#	c #E7CDCA",
+"+#	c #5D71B6",
+"@#	c #84A2B5",
+"##	c #9BBABD",
+"$#	c #575D6A",
+"%#	c #AFAFB2",
+"&#	c #E7D8D4",
+"*#	c #E53837",
+"=#	c #E56261",
+"-#	c #E52D2D",
+";#	c #E68583",
+">#	c #E68F8D",
+",#	c #E63838",
+"'#	c #5367B2",
+")#	c #566CB3",
+"!#	c #6D84B7",
+"~#	c #A1BEC3",
+"{#	c #AECBCD",
+"]#	c #CAE2E4",
+"^#	c #CFE7E7",
+"/#	c #CBE4E5",
+"(#	c #595E6C",
+"_#	c #ADAEB0",
+":#	c #E67B79",
+"<#	c #E6706F",
+"[#	c #E7C6C3",
+"}#	c #E7AEAB",
+"|#	c #E6AAA7",
+"1#	c #E54544",
+"2#	c #86A5B3",
+"3#	c #6D86B5",
+"4#	c #576CB3",
+"5#	c #687DB8",
+"6#	c #869DC4",
+"7#	c #B0C9D6",
+"8#	c #C7E1E1",
+"9#	c #ABACAF",
+"0#	c #E64040",
+"a#	c #E7D2CF",
+"b#	c #9AB9C1",
+"c#	c #8BA5C1",
+"d#	c #7990BF",
+"e#	c #667ABB",
+"f#	c #778DC1",
+"g#	c #222725",
+"h#	c #5C616E",
+"i#	c #AAABAE",
+"j#	c #BED8DA",
+"k#	c #C5DEE0",
+"l#	c #B6CCDD",
+"m#	c #A1B8D3",
+"n#	c #97AFCF",
+"o#	c #232825",
+"p#	c #565B69",
+"q#	c #424959",
+"r#	c #49505E",
+"s#	c #494F5F",
+"t#	c #484E5E",
+"u#	c #474E5D",
+"v#	c #464D5C",
+"w#	c #454C5B",
+"x#	c #444B5B",
+"y#	c #B5B5B7",
+"z#	c #2F352F",
+"A#	c #B9B8B3",
+"B#	c #CAC8C8",
+"C#	c #BCBCBD",
+"D#	c #BDBCBE",
+"E#	c #BDBDBD",
+"F#	c #BEBEBE",
+"G#	c #BFBEBF",
+"H#	c #C0BFC0",
+"I#	c #C1C0C1",
+"J#	c #C2C1C1",
+"K#	c #DBD9D7",
+"L#	c #656762",
+"M#	c #90928F",
+"N#	c #788885",
+"O#	c #1E221C",
+"P#	c #3C403A",
+"Q#	c #3B403A",
+"R#	c #3B4039",
+"S#	c #343832",
+"T#	c #1D211B",
+"U#	c #31362F",
+"V#	c #383D37",
+"W#	c #383C37",
+"X#	c #383C36",
+"Y#	c #393C37",
+"Z#	c #353832",
+"`#	c #191E1B",
+" $	c #E1E2E1",
+".$	c #5D72B5",
+"+$	c #88A7B6",
+"@$	c #ADC6C6",
+"#$	c #8DA1A0",
+"$$	c #839997",
+"%$	c #819795",
+"&$	c #7E9592",
+"*$	c #7C9291",
+"=$	c #627572",
+"-$	c #252924",
+";$	c #494A47",
+">$	c #272B26",
+",$	c #4F6160",
+"'$	c #5D7375",
+")$	c #566A6F",
+"!$	c #59686E",
+"~$	c #6A7072",
+"{$	c #7F7C80",
+"]$	c #5F6FB1",
+"^$	c #CDD2E8",
+"/$	c #6275B6",
+"($	c #86A4BB",
+"_$	c #A5C3C5",
+":$	c #61706C",
+"<$	c #1F241F",
+"[$	c #29302A",
+"}$	c #292F29",
+"|$	c #252B25",
+"1$	c #1C201B",
+"2$	c #1C201A",
+"3$	c #242923",
+"4$	c #262C27",
+"5$	c #272C27",
+"6$	c #1C201D",
+"7$	c #7D818B",
+"8$	c #D4D8EB",
+"9$	c #7D8CC3",
+"0$	c #677AB8",
+"a$	c #8DA5C3",
+"b$	c #AEC8D1",
+"c$	c #C2DBDC",
+"d$	c #BED7D7",
+"e$	c #1B211A",
+"f$	c #AEBEC3",
+"g$	c #B6C6CC",
+"h$	c #9CAAAE",
+"i$	c #2A2E28",
+"j$	c #DFE4F1",
+"k$	c #96A3D0",
+"l$	c #6F7FBE",
+"m$	c #6377BA",
+"n$	c #7D8FC4",
+"o$	c #95ABCE",
+"p$	c #A6BDD5",
+"q$	c #ACC4D6",
+"r$	c #B0CAD6",
+"s$	c #2B322D",
+"t$	c #626C6D",
+"u$	c #7D898A",
+"v$	c #555E5C",
+"w$	c #525650",
+"x$	c #F9F9FC",
+"y$	c #D6DBED",
+"z$	c #B1BBDC",
+"A$	c #96A3D1",
+"B$	c #8A97CA",
+"C$	c #7D8DC4",
+"D$	c #6474A6",
+"E$	c #3B465F",
+"F$	c #353F54",
+"G$	c #384155",
+"H$	c #3A4456",
+"I$	c #3E4758",
+"J$	c #424A59",
+"K$	c #47505C",
+"L$	c #525860",
+"M$	c #606466",
+"N$	c #6B6E6C",
+"O$	c #6C706C",
+"P$	c #898A87",
+"Q$	c #E8E9E8",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . + @ # $ % & * = - = ; > , ' ) ! ~ + . . . . . . . ",
+". . . { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . ",
+". . e f g h i j k l m n o p q r s t u v w x y z A B C D E F . . ",
+". G H I J K L M N O P Q R S T U s V W X Y x Z ` A  ...+. at .#.$.. ",
+"{ %.&.*.J =.-.;.>.,.'.).!.1 ~.3 4 u {.X ].^.Z /.B  .(._.:.<.[.. ",
+". }.|.1.2.3.j 4.l m n o 5.q r s t u 6.w ].y z /.7.8.(.9.0.a.b.. ",
+". c.d.e.f.g.3.N h.P Q R S i.U s V W v Y x j.` A  .k.l.m.n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.4 V E.F.G.H.I.J.K.L.M.N.O.P.Q.p.. ",
+". q.R.s.S.T.U.V.W.X.Y.Z.`. +.+++++ at +#+$+%+&+*+=+-+;+>+,+'+)+p.. ",
+". q.!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+. ",
+". q.g+h+i+]+j+k+l+_+:+m+n+o+p+q+2+3+r+s+6+7+8+t+u+v+w+x+y+z+f+. ",
+". A+B+C+D+E+F+G+H+_+:+m+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+. ",
+".  @. at +@@@#@$@%@&@*@:+m+=@-@;@>@>@>@,@'@'@)@)@!@~@{@]@^@{@/@(@_@",
+". :@<@[@}@|@1 at 2@3 at 4@5 at m+6@7 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 9@0@",
+". a at r.b@c at d@e at f@g at h@H+i at j@k at l@m at 8@8 at 8@8 at n@o at 8@8 at 8@8 at 8@8 at 8@8 at p@q@",
+". a@!+r at S.s@t at u@v at w@x at y@z at k@A at B@8 at 8@8 at C@D at E@8 at 8@8 at 8@8 at 8@8 at 8@p at q@",
+". a at F@~+i+]+j+G at m+_+:+m+j at k@H at I@8 at 8@J at K@L at M@8 at N@O at P@8 at 8@8 at 8@p at q@",
+". a at Q@C+i+R at j+S@l+_+:+m+j at k@T at U@8 at 8@V at W@X at Y@Z@`@ #K at .#8 at 8@8 at p@q@",
+". +#@###@@E+$@G+&@*@:+m+j at k@$#%#8@&#*#Z at 8@=#-#;#8@>#,#o at 8@8 at p@q@",
+". '#)#!#~#{#$@%@]#^#/#m+j at k@(#_#8@:#<#8 at 8@[#}#8 at 8@8@|#1#8 at 8@p at q@",
+". :@2#3#4#5#6#7#3 at 4@3 at 8#j at k@l at 9#8 at 0#a#8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at p@q@",
+". a at r.s.b#c#d#f.:@e#w at f#g#k at h#i#8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@p at q@",
+". a at R.s.S.T.U.j#k#l#m#n#o#k at p#q#r#r#s#s#t#t#u#u#v#v#w#x#x#y#p at q@",
+". a at F@~+i+]+^+/+(+_+:+<+z#A#B#C#D#D#E#E#F#F#G#G#H#H#I#J#J#K#L#M#",
+". a at Q@C+i+R at j+S@l+_+:+m+N#O#P#P#Q#Q#R#S#T#O#O#T#U#V#W#X#Y#Z#`# $",
+". .$+$##@@E+$@G+&@*@:+m+I+@$#$$$%$&$*$=$-$;$;$>$,$'$)$!$~${$]$. ",
+". ^$/$($_${#$@%@]#^#/#m+I+:$<$[$[$[$}$|$1$O#O#2$3$j at 4$4$5$6$7$. ",
+". . 8$9$0$a$b$c$3 at 4@3 at 8#d$e$f$g$g$g$g$g$g$g$g$g$g$g$g$g$g$h$i$. ",
+". . . . j$k$l$m$n$o$p$q$r$s$t$u$u$u$u$u$u$u$u$u$u$u$u$u$u$v$w$. ",
+". . . . . . . x$y$z$A$B$C$D$E$F$F$G$H$I$J$K$L$M$N$O$O$O$O$P$Q$. ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/OPERA_RADAR_FILTER.xpm b/share/metview/icons/OPERA_RADAR_FILTER.xpm
new file mode 100755
index 0000000..a76dd87
--- /dev/null
+++ b/share/metview/icons/OPERA_RADAR_FILTER.xpm
@@ -0,0 +1,217 @@
+/* XPM */
+static char *OPERA_RADAR_FILTER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 179 2",
+"   c #020203",
+".  c #07090C",
+"X  c #0A0A0C",
+"o  c #1A0707",
+"O  c #070C12",
+"+  c #0D0E10",
+"@  c #0F1012",
+"#  c #101214",
+"$  c #16181D",
+"%  c #2B1E1E",
+"&  c #081221",
+"*  c #04142B",
+"=  c #0D1A2E",
+"-  c #1B1E25",
+";  c #1F242A",
+":  c #202123",
+">  c #23252A",
+",  c #23282F",
+"<  c #292B2C",
+"1  c #3A2C2C",
+"2  c #262C34",
+"3  c #2F3032",
+"4  c #2B313B",
+"5  c #353637",
+"6  c #363839",
+"7  c #3A3B3D",
+"8  c #0A2245",
+"9  c #08244C",
+"0  c #2E3642",
+"q  c #323A46",
+"w  c #3A3F45",
+"e  c #363E4B",
+"r  c #002762",
+"t  c #012864",
+"y  c #394352",
+"u  c #3D4858",
+"i  c #404244",
+"p  c #43464A",
+"a  c #4B4C4E",
+"s  c #4F5051",
+"d  c #575859",
+"f  c #414E60",
+"g  c #485568",
+"h  c #4D5B70",
+"j  c #5F6061",
+"k  c #636466",
+"l  c #656769",
+"z  c #6B6B6C",
+"x  c #656970",
+"c  c #717273",
+"v  c #877D7D",
+"b  c #3F887A",
+"n  c #389876",
+"m  c #46847D",
+"M  c #419D7B",
+"N  c #003585",
+"B  c #0042A5",
+"V  c #576983",
+"C  c #5B6E89",
+"Z  c #457189",
+"A  c #4B7888",
+"S  c #51778F",
+"D  c #557D88",
+"F  c #4C7190",
+"G  c #5A7A96",
+"H  c #7A7E83",
+"J  c #657997",
+"K  c #66789E",
+"L  c #004FC4",
+"P  c #0050C7",
+"I  c #0055D4",
+"U  c #4A8B80",
+"Y  c #538389",
+"T  c #578888",
+"R  c #5A888B",
+"E  c #4F9183",
+"W  c #599A89",
+"Q  c #5C829E",
+"!  c #5C9491",
+"~  c #75899E",
+"^  c #689199",
+"/  c #78909C",
+"(  c #4AA181",
+")  c #53A586",
+"_  c #59A28A",
+"`  c #5CA98C",
+"'  c #69A294",
+"]  c #5F85A0",
+"[  c #6687A3",
+"{  c #6F86A7",
+"}  c #6689A3",
+"|  c #7586A0",
+" . c #748EA0",
+".. c #788DA1",
+"X. c #7589AF",
+"o. c #6D94AC",
+"O. c #7597A4",
+"+. c #7998A2",
+"@. c #7595AD",
+"#. c #7C9CA9",
+"$. c #7890B4",
+"%. c #759AB0",
+"&. c #7A96BC",
+"*. c #759CBC",
+"=. c #79A0BF",
+"-. c #7692C0",
+";. c #7CA2C1",
+":. c #838383",
+">. c #8C8C8C",
+",. c #8F959D",
+"<. c #939393",
+"1. c #93989F",
+"2. c #9B9B9B",
+"3. c #829BAA",
+"4. c #8C9CAF",
+"5. c #959BA3",
+"6. c #999EA5",
+"7. c #849FB5",
+"8. c #8A9EB1",
+"9. c #86A5B1",
+"0. c #85A5B8",
+"q. c #8DA9BC",
+"w. c gray65",
+"e. c #B3B3B3",
+"r. c #B9B9B9",
+"t. c #97C2AE",
+"y. c #819DC6",
+"u. c #829DC9",
+"i. c #81A2C6",
+"p. c #86A0CB",
+"a. c #89A2CD",
+"s. c #90A3C8",
+"d. c #9DB6C4",
+"f. c #8DA5D3",
+"g. c #95AED5",
+"h. c #91AFDA",
+"j. c #98AFD8",
+"k. c #98B1D6",
+"l. c #9DB2DA",
+"z. c #A4B8C4",
+"x. c #A9B9C6",
+"c. c #ACBFCC",
+"v. c #A2B5DC",
+"b. c #98B6E4",
+"n. c #9CBCEA",
+"m. c #A3C0CE",
+"M. c #A9C5CE",
+"N. c #A1C4D0",
+"B. c #B3C6D2",
+"V. c #BAC5D2",
+"C. c #B6CDD5",
+"Z. c #B8CAD6",
+"A. c #B8CDD8",
+"S. c #A2C3F4",
+"D. c #A6C7F9",
+"F. c #A7C9FB",
+"G. c #AACCFF",
+"H. c #C2C2C2",
+"J. c #CBCBCB",
+"K. c LightGray",
+"L. c #DCDCDC",
+"P. c #C3DBE2",
+"I. c #D3DCE4",
+"U. c #D8DDE5",
+"Y. c #C2E1E6",
+"T. c #C4E5E9",
+"R. c #CDECEE",
+"E. c #D1EDEF",
+"W. c #D4EFF0",
+"Q. c #D9EFF2",
+"!. c #D6F0F1",
+"~. c #DBF1F3",
+"^. c #E3E3E3",
+"/. c #E0E8ED",
+"(. c #EBEBEB",
+"). c #E0F3F4",
+"_. c #EFF2F6",
+"`. c #F4F5F5",
+"'. c #FFFFFF",
+/* pixels */
+"f.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.f.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.L.:.>.w.J.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.`.L.w.>.L.'.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.(.:.L.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.H.w.r.(.'.'.'.(.:.`.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.`.L.J.<.w.'.'.'.e.H.'.'.'.'.'.'.l.",
+"v.'.'.'.'.J.'.'.'.'.'.'.'.'.'.'.'.'.'.r.e.'.'.^.<.'.'.'.'.'.'.l.",
+"v.'.'.'.^.. c '.'.'.'.'.'.'.'.'.`.'.'.'.:.'.'.'.:.'.'.'.'.'.'.l.",
+"v.'.'.'.a f ; l '.'.'.'.'.'.'.`.1 v '.'.2.(.'.'.:.'.'.'.'.'.'.l.",
+"v.'.'.e.$ S.n., j '.'.'.'.'.'.H o % `.'.2.(.'.'.:.'.'.'.'.'.'.l.",
+"v.'.'.< { G.G.n.2 d '.'.'.'.6.g.x ^.'.'.<.`.'.'.:.'.'.'.'.'.'.l.",
+"v.'.`.  n.G.G.G.S.4 s `.'.5.k.5.`.'.'.'.(.'.'.(.<.'.'.'.'.'.'.l.",
+"v.'.K.@ G.G.G.G.G.S.4 p ,.k.5.'.'.'.'.'.'.'.'.(.K.'.'.'.'.'.'.l.",
+"v.'.w.4 G.G.G.G.G.G.S.0 4 1.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.2.q G.G.G.G.G.G.G.D.q 7 `.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.K.+ G.G.G.G.G.G.G.G.D.y 5 (.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.'.X h.G.G.G.G.G.G.G.G.F.u 3 (.'.'.'.'.'.'.'.'.'.'.I.c.7.[ u.",
+"v.'.'.i J G.G.G.G.G.G.G.G.G.G.f < (.'.'.'.'.'.'.'.V.} 0.m.P.~.j.",
+"v.'.'.H.# b.G.G.G.G.G.G.G.G.G.G.g > ^.'.'.'.'.`.G S | ~.~.~.).j.",
+"v.'.'.'.c 0 G.G.G.G.G.G.G.G.G.G.G.h : ^.'.'._.F ! t.4.~.Q.~.).j.",
+"v.'.'.'.`.< h D.G.G.G.G.G.G.G.G.G.S.- 5 '.'. at .A ' ~ E.~.3.x.).a.",
+"v.'.'.'.'.L.6 > p.G.G.G.G.G.G.G.a.- a (.'.Z.%. .d.W.!.~.#.c. .a.",
+"v.'.'.'.'.'.'.z X y C $.h.&.V e + 2.'.'._.] T.R.E.W.!.~.3.R _ i.",
+"v.'.'.'.'.'.'.p * * & X . < k 2.^.'.'.'.q.N.R.R.E.W.!.C.D E +.y.",
+"v.'.'.'.'.'.'.- B I I 8 <.'.'.'.'.'.'.'.} T.R.R.E.W.!.A.~ 8.).f.",
+"v.'.'.'.'.'.'.  L I I t z '.'.'.'.'.'.'.Q R.R.R.E.W.9.m U T z.j.",
+"v.'.'.'.'.'.L.. I I I N w '.'.'.'.'.'./.o.R.R.R.E.M.b M ( ) W u.",
+"v.'.'.'.'.'.r.= I I I B $ '.'.'.'.'.'.B.G d.R.R.E.^ n M ( ) ` i.",
+"v.'.'.'.'.'.<.9 I I I P   `.'.'.'.'.'.B.A / Y.R.E.Y n M ( ) ` i.",
+"v.'.'.'.'.'.l r P P P P O K.'.'.'.'.'.U.Z ..R.R.E.O.n M ( ) ` i.",
+"f.v.v.v.v.v.X.K K K K K K s.v.v.v.v.v.v.-.g.k.k.k.g.&.*.=.=.;.p."
+};
diff --git a/share/metview/icons/OVERLAY_CONTROL.xpm b/share/metview/icons/OVERLAY_CONTROL.xpm
new file mode 100644
index 0000000..7a53f4a
--- /dev/null
+++ b/share/metview/icons/OVERLAY_CONTROL.xpm
@@ -0,0 +1,72 @@
+/* XPM */
+static char * OVERLAY_CONTROL_xpm[] = {
+"32 32 37 1",
+" 	c #DADAF6F6FFFF",
+".	c #7C7CBDBD7676",
+"X	c #BEBEBEBEBEBE",
+"o	c #7E7E7E7E7E7E",
+"O	c #666654543333",
+"+	c #000064640000",
+"@	c #333333333333",
+"#	c #6C6C7B7B8B8B",
+"$	c #ADADD8D8E6E6",
+"%	c #6C6CA6A63232",
+"&	c #B0B0C4C4DEDE",
+"*	c #000073734B4B",
+"=	c #E5E54A4A3939",
+"-	c #999916160808",
+";	c #4D4D60600000",
+":	c #FFFF00000000",
+">	c #A7A761613636",
+",	c #E5E55C5C6969",
+"<	c #94947A7A4A4A",
+"1	c #686810100000",
+"2	c #B2B2B2B2B2B2",
+"3	c #00008C8C3030",
+"4	c #525203030000",
+"5	c #B2B233330000",
+"6	c #777777777777",
+"7	c #66663B3B2020",
+"8	c #FFFF25250000",
+"9	c #BFBFA4A46868",
+"0	c #F0F079796161",
+"q	c #FFFFFFFFFFFF",
+"w	c #FFFFE2E2ABAB",
+"e	c #00000000FFFF",
+"r	c #7373A3A3FFFF",
+"t	c #00007F7FFFFF",
+"y	c #000000008080",
+"u	c #D9D9B7B77777",
+"i	c #25250000FFFF",
+"      ..          ............  ",
+"     ...          ........... ..",
+"     .....       ...........  ..",
+"     .....       XooooooX     ..",
+"      .....     O+@#$$$$#O   .. ",
+"  .     ...    %+##+#$$&&*#     ",
+"....   .....  O=-;-O:>:,<:1>    ",
+".....  ..... Xo1-%1@:222&:34X   ",
+".....  ..... o@>451#:=&&&:##o.. ",
+"....    .... ##1@=1&:&=&&:#&#...",
+" .     ..... #&,O&22,,,&657;%...",
+"     .....   #&#=1-6:,=&-88=9...",
+"             #&,0+;+:&,,>574%...",
+"     q Xoooooo&,>o+3:&,,,=7+o...",
+"      O+@#$#wX#2=@9+:&=2,,#+X...",
+"     %+##+#$::O&2>46,,2&,, at O ...",
+"    OO--+@&#2###&##&&&&&&#O  ...",
+"   Xo+-5+@#&&$$#O##&&&&&#O   ...",
+"   o at O+3+#&&&:##eXo####oX    ...",
+"   ##+@#*er2:2&#ee#...      ....",
+"   #t#@&rer2:2#;@@%..   .  .....",
+"   yey at ++#&&&&+99u9...     .....",
+"   #t#o+++#&&&@;;+%.... .  .....",
+" . o&&#o+3#&&&&&++o .....  .....",
+".. X#2:4o+&&&,&&#+X  ...   .... ",
+"..  O2:OO#&&,:,&@O   ..    ...  ",
+"...  #&##ii&&,&#O     ..    .   ",
+"  .   O##ii&&&#O                ",
+"       Xo####oX    .............",
+"   ...         .................",
+" ...............................",
+"................................"};
diff --git a/share/metview/icons/PAXIS.xpm b/share/metview/icons/PAXIS.xpm
new file mode 100644
index 0000000..39b9026
--- /dev/null
+++ b/share/metview/icons/PAXIS.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * PAXIS_icon[] = {
+"32 32 9 1",
+" 	c #FFFFFFFFFFFF",
+".	c #FFFFFFFF0000",
+"X	c #FFFFFFFFCCCC",
+"o	c #00000000FFFF",
+"O	c #000000000000",
+"+	c #FFFF0000DADA",
+"@	c #D9D9B7B77777",
+"#	c #FFFFE2E2ABAB",
+"$	c #E0E06C6C0000",
+"   .............................",
+"  ..XXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+" ...XXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"....oXXXXXXXXXXXXXXXXXXXXXXOOOX.",
+".XXoooXXXXXXXXXXXXXXXXXXXXO++OX.",
+".XXXoXXXXXXXXXXXXXXXXXXXXO.O+OX.",
+".XXXoXXXXXXXXXXXXXXXXXXXO. at OOXX.",
+".XXXoXXXXXXXXXXXXXXXXXXO. at OOXXX.",
+".XXoooXXXoXXXXXoXXXOOOO. at OOXoXX.",
+".XXXoXXXXXXXXXXXXXO#@O. at OOXXXXX.",
+".XXXoXXXXXXXXXXXXO#@O. at OOXXXXXX.",
+".XXXoXXXXXXXXXXXO#@O. at OO@OXXXXX.",
+".XXXoXXXXXXXXXXO#@O. at OO@@#OXXXX.",
+".XXXoXXXXXXXXXO#@O. at OOO@###OXXX.",
+".XXoooXXXoXXXXO at O.@OOXO$####OOO.",
+".XXXoXXXXXXXXXXO.OOOOOX#####@OO.",
+".XXXoXXXXXXXXXO.OX##########@OO.",
+".XXXoXXXXXXXXXO at OOO@@@######@OO.",
+".XXXoXXXXXXXXOOOXXXOOO@@@@##@OO.",
+".XXoooXXXoXXXXXXoXXXXXOOOO@@@OO.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXOOOOO.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXXXXOO.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXoXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXoXXXXoXXXXXXoXXXXXoXXXXXoXX.",
+".XXXooooooooooooooooooooooooooX.",
+".XXXoXXXXoXXXXXXoXXXXXoXXXXXoXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"................................",
+"                                "};
diff --git a/share/metview/icons/PCOAST.xpm b/share/metview/icons/PCOAST.xpm
new file mode 100644
index 0000000..e6cd0cf
--- /dev/null
+++ b/share/metview/icons/PCOAST.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * PCOAST_xpm[] = {
+"32 32 12 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #E5CD99",
+"@	c #F9FAEA",
+"#	c #9999E5",
+"$	c #A399E5",
+"%	c #7F7F7F",
+"&	c #E599DA",
+"*	c #E4E599",
+"=	c #E2D8C4",
+"-	c #F6EDDC",
+";	c #E2B48C",
+"....++++++++++++++++++++++++++++",
+"...++@@@@@@@#@$$$$@@@@@@@@@@@@@+",
+"..+++@@@@@@#@$@@$@@@@@@@@@@@@@@+",
+".++++@@@@@@#@$@$@@@@@@@@@@@@@@@+",
+"+++++@@@@@@@$$@$$$$$@@@@@@@@@@@+",
+"+@@@@@@@@@@@$@@@@@$@@@@@@@@@@@@+",
+"+@@@@@@@@@@@$@@@@$@@@@@@@@@@@@@+",
+"+@@@@@@@@@@@@$@@@$@@@@@@@@@@@@@+",
+"+@@@@@@@@@@@@$$@$@@@@@@@@@@%%%@+",
+"+@@@@@@@@@@@@$$@$$$@@@@@@@%&&%@+",
+"+@@@@@@@@@$@@@$@@@@$@@@@@%*%&%@+",
+"+@@@@@@@$$@$$@@$@@@$@@@@%*=%%@@+",
+"+@@@@@@$@@@@$@@$$$@@$@@%*=%%@@@+",
+"+@@@@$$$@@@@$@@@@$@%%%%*=%%@@@@+",
+"+@@@$@@@@@@$@@@@@@%-=%*=%%@@@@@+",
+"+@@@$@@@@@@$@@@@@%-=%*=%%@@@@@@+",
+"+@@@@$@@@@@$@@@@%-=%*=%%=%@@@@@+",
+"+@@@@@$@@@@$@@@%-=%*=%%==-%@@@@+",
+"+@@@@$$@@@@$@@%-=%*=%%%=---%@@@+",
+"+@@$$$@@@@$$@@%=%*=%%@%;----%%%+",
+"+@@$@@@$$$@@@@@%*%%%%%@-----=%%+",
+"+@@@$$$@@@@@@@%*%@----------=%%+",
+"+@@@@@@@@@@@@@%=%%%===------=%%+",
+"+@@@@@@@@@@@@%%%@@@%%%====--=%%+",
+"+@@@@@@@@@@@@%@@@$$$$$%%%%===%%+",
+"+@@@@@@@@@@@$@$$$@@@@@@@@$%%%%%+",
+"+@@@@@@@@@@@$$@@@@@@@@@@@$@@@%%+",
+"+@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@+",
+"+@@@@@@@@@@@@@@@@@$$@@@$@@@@@@@+",
+"+@@@@@@@@@@@@@@@@@$@$$$@@@@@@@@+",
+"+@@@@@@@@@@@@@@@@@@$@@@@@@@@@@@+",
+"++++++++++++++++++++++++++++++++"};
diff --git a/share/metview/icons/PCONT.xpm b/share/metview/icons/PCONT.xpm
new file mode 100644
index 0000000..61bde40
--- /dev/null
+++ b/share/metview/icons/PCONT.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * PCONT_xpm[] = {
+"32 32 12 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #BABABA",
+"@	c #EDEDED",
+"#	c #A399E5",
+"$	c #7F7F7F",
+"%	c #E599DA",
+"&	c #E4E599",
+"*	c #E2D8C4",
+"=	c #F6EDDC",
+"-	c #E5B099",
+";	c #F9FAEA",
+"....++++++++++++++++++++++++++++",
+"...++@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+"..+++@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+".++++@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+"+++++@@@@@@#######@@@@@@@@@@@@@+",
+"+@@@@@@@@##@@@@@@@######@@@$$$@+",
+"+@@@@@@##@@@@@@@@@@@@@@@##$%%$@+",
+"+@@@@##@@@@@@@@@@@@@@@@@@$&$%$@+",
+"+@@##@@@@@@@@@@@@@@@@@@@$&*$$@@+",
+"+@#@@@@@@@@@@@@@@@@@@@@$&*$$#@@+",
+"+#@@@@@@@@@@@@@@@@@$$$$&*$$@@#@+",
+"+@@@@@@@@@@@@@@@@@$=*$&*$$@@@#@+",
+"+@@@@@@@@@@@@@@@@$=*$&*$$@@@@#@+",
+"+@@@@@@@@@@@@@@@$=*$&*$$*$@@@#@+",
+"+@@@@@@@@####@@$=*$&*$$**=$@@@#+",
+"+@@@@@###@@@@@$=*$&*$$$*===$@@#+",
+"+@@@##@@@@@@@@$*$&*$$@$-====$$$$",
+"+@@##@@@@@@@@@@$&$$$$$;=====*$$$",
+"+@#@@@@@@@@@@@$&$;==========*$$$",
+"+#@@@@@@@@@@@@$*$$$***======*$$$",
+"+@@@@@####@@@$$$@@@$$$****==*$$$",
+"+@@@##@@@@##$$@@@@@@#@$$$$***$$$",
+"+@@#@@@@@@@@@#@@@@@@#@@@@@$$$$$$",
+"+@#@@@@@@@@@@#@@@@@@@#@@@@@@@$$$",
+"+#@@@@@@@@@@@#@@@@@@@#@@@@@@@@#+",
+"+#@@@@@@@@@@@@#@@@@@@#@@@@@@@@#+",
+"+#@@@@@@@@@@@@#@@@@@#@@@@@@@@#@+",
+"+#@@@@@@@@@@@#@@@@@@#@@@@@@@@#@+",
+"+#@@@@@@@@@@@#@@@@@@#@@@@@@@@#@+",
+"+#@@@@@@@@@@@#@@@@@#@@@@@@@@#@@+",
+"+@#@@@@@@@@@#@@@@@@#@@@@@@@@#@@+",
+"++++++++++++++++++++++++++++++++"};
diff --git a/share/metview/icons/PDF.xpm b/share/metview/icons/PDF.xpm
new file mode 100644
index 0000000..1101530
--- /dev/null
+++ b/share/metview/icons/PDF.xpm
@@ -0,0 +1,177 @@
+/* XPM */
+static char *PDF[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 139 2",
+"   c #AE205E",
+".  c #AA3B67",
+"X  c #B53165",
+"o  c #B5346C",
+"O  c #B7386F",
+"+  c #B73970",
+"@  c #B83C72",
+"#  c #BA4276",
+"$  c #B44873",
+"%  c #BC4578",
+"&  c #BE4B7D",
+"*  c #C44476",
+"=  c #C9497B",
+"-  c #918576",
+";  c #938A7F",
+":  c #AF748B",
+">  c #B1738B",
+",  c #C05282",
+"<  c #C35987",
+"1  c #C45D89",
+"2  c #C6618D",
+"3  c #C96A93",
+"4  c #CE779D",
+"5  c #D07EA1",
+"6  c #969088",
+"7  c #9C948B",
+"8  c #8E8F91",
+"9  c #999594",
+"0  c #AB9C89",
+"q  c #B09E89",
+"w  c #BBA78C",
+"e  c #A5A19E",
+"r  c #B3A696",
+"t  c #BDAB93",
+"y  c #B2A59A",
+"u  c #B4AA9C",
+"i  c #BBAD9A",
+"p  c #A4A1AA",
+"a  c #AFACA9",
+"s  c #B3ACA5",
+"d  c #B4AFAB",
+"f  c #B7B4AF",
+"g  c #BAB1AA",
+"h  c #AEACBC",
+"j  c #B4B3B3",
+"k  c #BBB6B1",
+"l  c #BFBBB7",
+"z  c #BDBCBB",
+"x  c #C4AC8D",
+"c  c #D9B588",
+"v  c #DAB88D",
+"b  c #C6AD93",
+"n  c #CBAF90",
+"m  c #CAB090",
+"M  c #C1B09B",
+"N  c #D4B793",
+"B  c #DBBC96",
+"V  c #D3B79A",
+"C  c #DABB99",
+"Z  c #D182A4",
+"A  c #D48AAA",
+"S  c #D894B2",
+"D  c #DA98B5",
+"F  c #DB9DB8",
+"G  c #C7B9A7",
+"H  c #C1B6A9",
+"J  c #DDBDA3",
+"K  c #C4BDB2",
+"L  c #C2BDBA",
+"P  c #E9C08F",
+"I  c #E5C195",
+"U  c #ECC291",
+"Y  c #E1C099",
+"T  c #E8C49A",
+"R  c #F1C794",
+"E  c #F4C995",
+"W  c #FECF96",
+"Q  c #FED196",
+"!  c #FFD198",
+"~  c #CBC1B5",
+"^  c #C3C2BE",
+"/  c #C8C1BD",
+"(  c #E9C6A4",
+")  c #EEC9A5",
+"_  c #BBBBC9",
+"`  c #BBBAD8",
+"'  c #BEBEE2",
+"]  c #C2BBD3",
+"[  c #E2AEC4",
+"{  c #E3B1C7",
+"}  c #E4B5C9",
+"|  c #E6BACD",
+" . c #E7BFD1",
+".. c #C5C4C3",
+"X. c #CAC4C4",
+"o. c #CCCBC4",
+"O. c #C7C7C8",
+"+. c #CDCDCD",
+"@. c #D3C5CA",
+"#. c #D1CFCD",
+"$. c #D3D3CC",
+"%. c #D5D5D4",
+"&. c #D9D7D5",
+"*. c #DAD9D6",
+"=. c #D7D8D8",
+"-. c #DEDEDE",
+";. c #E9C2D3",
+":. c #EBC8D7",
+">. c #EDCDDB",
+",. c #EFD3DF",
+"<. c #E1E0DF",
+"1. c #C5C4E5",
+"2. c #C8C4E0",
+"3. c #C8C8E9",
+"4. c #D5D5EC",
+"5. c #D7D8EF",
+"6. c #D8D8EF",
+"7. c #DCDCF1",
+"8. c #F0D5E1",
+"9. c #F3DDE6",
+"0. c #F3DFE8",
+"q. c #DEE0F3",
+"w. c #E3E3E3",
+"e. c #E4E4E9",
+"r. c #E8E7E8",
+"t. c #E9E9E9",
+"y. c #F5E5EC",
+"u. c #F7E9EF",
+"i. c #E7E7F5",
+"p. c #EBEBF7",
+"a. c #EFEFF8",
+"s. c #F7EAF0",
+"d. c #F8EDF2",
+"f. c #F4F5F5",
+"g. c #FAF1F5",
+"h. c #F4F4FB",
+"j. c #FBF6F8",
+"k. c #F7F8F8",
+"l. c #FFFFFF",
+/* pixels */
+"l.l.f.w.r.r.r.r.w.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.k.l.",
+"l.k.> X X X X X X X X X X X X X X X X X X X X X X X X X X . @.l.",
+"l.f.: * = = = = * = = = = = = = = * = = * = = = = = = * = $ X.l.",
+"l.k.O.t.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.%.-.l.",
+"l.k.+.k.l.f.8.8.8.0.g.l.l.0.8.8.9.f.l.l.l.0.8.8.8.8.d.l.l.-.-.l.",
+"l.k.+.k.l.:.o @ # @ , ,.d., o # O & } l.s.& o # # # [ l.l.w.w.l.",
+"l.k.+.f.l.;.# ,.u.0.2 3 y.& [ y.0.S + 8.s.# [ s.y.y.k.l.l.-.-.l.",
+"l.k.+.f.l.;.% u.l.l.F , 0.& | l.l.k.< A d.%  .l.l.l.l.l.l.-.w.l.",
+"l.k.+.k.l.;.@ | :.} & 5 s.& | l.l.l.Z 3 u.@ 1 4 4 D j.l.l.-.-.l.",
+"l.k.+.f.l.;.  # & , 5 y.d.& | l.l.l.5 3 s.@ 1 Z Z F j.l.l.w.w.l.",
+"l.k.+.k.l.;.# 8.s.g.l.l.s.& | l.l.l.1 A d.%  .l.l.l.l.l.l.-.-.l.",
+"l.k.+.k.l. .% s.l.l.l.l.s.& { j.d.[ o >.s.% ;.l.l.l.l.l.l.-.w.l.",
+"l.k.+.k.l.;., s.l.l.l.l.d.& % 1 & @ F l.u.& ;.l.l.l.l.l.l.-.-.l.",
+"l.k.+.f.l.d.;.l.l.l.l.l.l.;.{ [ | 0.l.l.l.:.u.l.l.l.l.l.l.w.w.l.",
+"l.k.+.k.l.i.7.7.7.7.7.7.7.7.7.q.7.7.7.7.7.q.7.7.7.7.7.a.l.-.-.l.",
+"l.k.+.k.h.' 5.5.7.7.7.4.7.7.7.4.7.7.7.7.6.4.4.4.7.7.3.1.l.-.w.l.",
+"l.k.+.k.h.1.~ ~ K f +.^ a k r.l.k.%./ l k L / L k k _ 3.l.-.-.l.",
+"l.k.+.k.h.` 7 ; c P Y - - 0 *...d V T I U U E R P b p ' l.-.-.l.",
+"l.k.+.f.h.1.p.-.t E I r z #.w.8 q ! Q Q Q Q Q Q N L 0.3.l.-.-.l.",
+"l.k.+.k.h.3.l.l.%.w 6 =.l.l.l...n Q Q Y C T ! B L k.p.3.l.-.w.l.",
+"l.k.+.k.h.3.l.l.k.z 6 t L f.l...b W E g j 9 r s f.l.a.3.l.-.-.l.",
+"l.k.+.k.h.1.h.l.l.k.H R m %.l.k.L B B X.k.f.%.e %.l.a.1.l.w.w.l.",
+"l.k.+.k.h.1.l.l.l.l.f v t w.l.l.t.y g f.l.l.X.t y f.h.1.l.-.-.l.",
+"l.k.+.k.h.1.l.l.l.l./ 7 -.l.l.l.l.w.e.l.l.l.k.&.#.k.a.3.l.-.w.l.",
+"l.k.+.f.h.3.l.f.t.t.-.z e.e.%.+.$.&.<.-.*.&.%.+...&.e.1.l.-.-.l.",
+"l.k.+.k.h.` K G M i t b w x N Y Y B N N B B Y b i u a _ &.j w.l.",
+"l.k.+.k.h.] J ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) b o.$.$.$.z +.l.l.",
+"l.k.+.k.l.4.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.h o.$.$.^ -.l.l.l.",
+"l.k.+.k.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.$.o.$...w.l.l.l.l.",
+"l.k.+.f.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.%.^ O.t.l.l.l.l.l.",
+"l.k...%.=.%.%.%.%.%.=.%.%.%.%.%.=.%.%.%.%.%.%.k O.f.l.l.l.l.l.l.",
+"l.l.t.e.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.f.l.l.l.l.l.l.l."
+};
diff --git a/share/metview/icons/PERCENTILE.xpm b/share/metview/icons/PERCENTILE.xpm
new file mode 100755
index 0000000..36f56c3
--- /dev/null
+++ b/share/metview/icons/PERCENTILE.xpm
@@ -0,0 +1,37 @@
+/* XPM */
+static char * PERCENTILE_xpm[] = {
+"32 32 2 1",
+" 	c #FFFFFFFFFFFF",
+".	c #666666666666",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"       .....               ..   ",
+"      .......       ....   ..   ",
+"     ..     ..      ....  ..    ",
+"    ..       ..     ....  ..    ",
+"    ..       ..     .... ..     ",
+"   ..         ..         ..     ",
+"   ..         ..        ..      ",
+"   ..         ..        ..      ",
+"   ..         ..       ..       ",
+"   ..         ..       ..       ",
+"   ..    ..   ..      ..        ",
+"    ..    .. ..       .. ....   ",
+"    ..     . ..      ..  ....   ",
+"     ..    ...       ..  ....   ",
+"      ..........    ..   ....   ",
+"       .....  ...   ..          ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                "};
diff --git a/share/metview/icons/PGRAPH.xpm b/share/metview/icons/PGRAPH.xpm
new file mode 100644
index 0000000..bf1f84e
--- /dev/null
+++ b/share/metview/icons/PGRAPH.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * PGRAPH_icon[] = {
+"32 32 12 1",
+" 	c #FFFFFFFFFFFF",
+".	c #7F7F0000FFFF",
+"X	c #CCCCCCCCFFFF",
+"o	c #000000000000",
+"O	c #FFFF0000DADA",
+"+	c #FFFFFFFF0000",
+"@	c #D9D9B7B77777",
+"#	c #FFFFE2E2ABAB",
+"$	c #FFFF0000FFFF",
+"%	c #FFFF4F4F0000",
+"&	c #FFFFFFFFCCCC",
+"*	c #EBEBEBEBFFFF",
+"    ............................",
+"   ..XXXXXXXXXXXXXXXXXXXXXoOOoX.",
+"  ...XXXXXXXXXXXXXXXXXXXXo+oOoX.",
+" ....XXXXXXXXXXXXXXXXXXXo+ at ooXX.",
+".....XXXXXXXXXXXXXXXXXXo+ at ooXXX.",
+".XXXXXXXXXXXXXXXXXXoooo+ at ooXXXX.",
+".XXX.XXXXXXXXXXXXXo#@o+ at ooXXXXX.",
+".XX...XXXXXXXXXXXo#@o+ at ooXXXXXX.",
+".XXX.XXXXXXXXXXXo#@o+ at oo@oXXXXX.",
+".XXX.XXXXX$XXXXo#@o+ at oo@@#oXXXX.",
+".XXX.XXXX$X$XXo#@o+ at ooo@###oXXX.",
+".XXX.XXXX$X$XXo at o+@oo#o%####ooo.",
+".XXX.XXXOXXX$XXo+ooooo&#####@oo.",
+".XXX.XX$XXXXX$o+o###########@oo.",
+".XXX.XX$XXXXX$o at ooo@@@######@oo.",
+".XXX.X$XXXXXXX$oX$*ooo@@@@##@oo.",
+".XXX.$XXXXXXXX$XXX$XXXoooo@@@oo.",
+".XXX.$XXXXXXXXX$XX$XXXXXXXooooo.",
+".XXX$XXXXXXXXXXXXXX$XXXXXXXXXoo.",
+".XXX.XXXXXXXXXXXXXX$XXXX$XXXXXX.",
+".XXX.XXXXXXXXXXXXXXX$XX$X$$XXXX.",
+".XXX.XXXXXXXXXXXXXXX$X$XXXX$XXX.",
+".XXX.XXXXXXXXXXXXXXXX$XXXXXXXXX.",
+".XXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXX.XXXXXXXXXXXXXXXXXXXXXX.XXX.",
+".XX..........................XX.",
+".XXX.XXXXXXXXXXXXXXXXXXXXXX.XXX.",
+".XXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"................................"};
diff --git a/share/metview/icons/PLOTPAGE.xpm b/share/metview/icons/PLOTPAGE.xpm
new file mode 100644
index 0000000..ace1a4f
--- /dev/null
+++ b/share/metview/icons/PLOTPAGE.xpm
@@ -0,0 +1,38 @@
+/* XPM */
+static char * PLOTPAGE_xpm[] = {
+"32 32 3 1",
+" 	c #FFFFFFFFFFFF",
+".	c #373737373737",
+"X	c #808080808080",
+"    ........................    ",
+"    .                      .    ",
+"    .                      .    ",
+"    . XXXXXXXXXXXXXXXXXXXX .    ",
+"    . X                  X .    ",
+"    . X                  X .    ",
+"    . X                  X .    ",
+"    . XXXXXXXXXXXXXXXXXXXX .    ",
+"    .                      .    ",
+"    . XXXXXXXXXX XXXXXXXXX .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . XXXXXXXXXX X       X .    ",
+"    .            X       X .    ",
+"    . XXXXXXXXXX X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . XXXXXXXXXX XXXXXXXXX .    ",
+"    .                      .    ",
+"    ........................    "};
diff --git a/share/metview/icons/PLOTSUBPAGE.xpm b/share/metview/icons/PLOTSUBPAGE.xpm
new file mode 100644
index 0000000..9ae6c44
--- /dev/null
+++ b/share/metview/icons/PLOTSUBPAGE.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static char * SUBPAGEDETAILS_xpm[] = {
+"32 32 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #373737373737",
+"X	c #808080808080",
+"o	c #8F8F8F8F8F8F",
+"    ........................    ",
+"    .                      .    ",
+"    .                      .    ",
+"    . XXXXXXXXXXXXXXXXXXXX .    ",
+"    . X                  X .    ",
+"    . X ooooooooooooooo  X .    ",
+"    . X ooooooooooooooo  X .    ",
+"    . XXXXXXXXXXXXXXXXXXXX .    ",
+"    .                      .    ",
+"    . XXXXXXXXXX XXXXXXXXX .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X        X X oooo  X .    ",
+"    . XXXXXXXXXX X oooo  X .    ",
+"    .            X oooo  X .    ",
+"    . XXXXXXXXXX X oooo  X .    ",
+"    . X        X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X       X .    ",
+"    . X oooooo X X       X .    ",
+"    . X        X X       X .    ",
+"    . XXXXXXXXXX XXXXXXXXX .    ",
+"    .                      .    ",
+"    ........................    "};
diff --git a/share/metview/icons/PNG.xpm b/share/metview/icons/PNG.xpm
new file mode 100644
index 0000000..d2f61df
--- /dev/null
+++ b/share/metview/icons/PNG.xpm
@@ -0,0 +1,184 @@
+/* XPM */
+static char *PNG[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 146 2",
+"   c #0F7C0A",
+".  c #107D0B",
+"X  c #2E752E",
+"o  c #307730",
+"O  c #317831",
+"+  c #3B773B",
+"@  c #318F2D",
+"#  c #369232",
+"$  c #3A9437",
+"%  c #3D9539",
+"&  c #43983F",
+"*  c #448944",
+"=  c #488248",
+"-  c #498D49",
+";  c #459A41",
+":  c #489B45",
+">  c #4D9E49",
+",  c #51A04E",
+"<  c #56A352",
+"1  c #58A455",
+"2  c #5DA659",
+"3  c #5FA85C",
+"4  c #62A95F",
+"5  c #749474",
+"6  c #65AB62",
+"7  c #6EB06C",
+"8  c #71B26E",
+"9  c #75B472",
+"0  c #78B575",
+"q  c #7BB778",
+"w  c #7DB87A",
+"e  c #918576",
+"r  c #938A7F",
+"t  c #969088",
+"y  c #9C948B",
+"u  c #8E8F91",
+"i  c #999594",
+"p  c #AB9C89",
+"a  c #B09E89",
+"s  c #85BD83",
+"d  c #88BE86",
+"f  c #BBA78C",
+"g  c #A5A19E",
+"h  c #B3A696",
+"j  c #BDAB93",
+"k  c #B2A59A",
+"l  c #B4AA9C",
+"z  c #BBAD9A",
+"x  c #A4A1AA",
+"c  c #AFACA9",
+"v  c #B3ACA5",
+"b  c #B7B4AF",
+"n  c #BAB1AA",
+"m  c #AEACBC",
+"M  c #B4B3B3",
+"N  c #BBB6B1",
+"B  c #BFBBB7",
+"V  c #BDBCBB",
+"C  c #C4AC8D",
+"Z  c #D9B588",
+"A  c #DAB88D",
+"S  c #C6AD93",
+"D  c #CAB090",
+"F  c #C1B09B",
+"G  c #D4B793",
+"H  c #DBBC96",
+"J  c #D3B79A",
+"K  c #DABB99",
+"L  c #C7B9A7",
+"P  c #C1B6A9",
+"I  c #DDBDA3",
+"U  c #C4BDB2",
+"Y  c #C2BDBA",
+"T  c #8DC18B",
+"R  c #91C38F",
+"E  c #94C491",
+"W  c #98C796",
+"Q  c #9CC99A",
+"!  c #A5CEA4",
+"~  c #A8D0A7",
+"^  c #ADD2AB",
+"/  c #B4D6B3",
+"(  c #B7D8B6",
+")  c #B8D8B7",
+"_  c #BBDABA",
+"`  c #E9C08F",
+"'  c #E5C195",
+"]  c #ECC291",
+"[  c #E1C099",
+"{  c #E8C49A",
+"}  c #F1C794",
+"|  c #F4C995",
+" . c #FBCF98",
+".. c #FED196",
+"X. c #FFD198",
+"o. c #CBC1B5",
+"O. c #C3C2BE",
+"+. c #C8C1BD",
+"@. c #E9C6A4",
+"#. c #EEC9A5",
+"$. c #BBBBC9",
+"%. c #BBBAD8",
+"&. c #BEBEE2",
+"*. c #C2BBD3",
+"=. c #C5C4C3",
+"-. c #C8C6C3",
+";. c #C3CAC3",
+":. c #CCCBC4",
+">. c #C7C7C8",
+",. c #CDCDCD",
+"<. c #C3DEC2",
+"1. c #D3D3CC",
+"2. c #D5D5D4",
+"3. c #D9D7D5",
+"4. c #DAD9D6",
+"5. c #D7D8D8",
+"6. c #DEDEDE",
+"7. c #C8E1C7",
+"8. c #CCE3CB",
+"9. c #D1E6D0",
+"0. c #D6E9D5",
+"q. c #DBEBDA",
+"w. c #E1E0DF",
+"e. c #C5C4E5",
+"r. c #C8C4E0",
+"t. c #C8C8E9",
+"y. c #D5D5EC",
+"u. c #D7D8EF",
+"i. c #D8D8EF",
+"p. c #DCDCF1",
+"a. c #E3E3E4",
+"s. c #E1EFE0",
+"d. c #E4E4E9",
+"f. c #E9E9E9",
+"g. c #E4F0E3",
+"h. c #E8F2E7",
+"j. c #ECF4EB",
+"k. c #E8E7F6",
+"l. c #EBEBF7",
+"z. c #EFEFF8",
+"x. c #F5F5F5",
+"c. c #F5F9F5",
+"v. c #F4F4FB",
+"b. c #F8F7F8",
+"n. c #F7F8F8",
+"m. c #FDFDFD",
+/* pixels */
+"m.m.x.a.f.f.f.f.f.f.f.f.f.a.d.f.f.f.f.f.f.f.f.f.f.a.f.f.a.f.n.m.",
+"m.n.5 o o o o o o o o o o o o o o o O X O o o o O O o o o + ;.m.",
+"m.x.5 * - - - - * - - - - - - - - = - - * - - - - - - - - = ;.m.",
+"m.b.>.f.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.2.6.m.",
+"m.b.,.b.b.8._ _ <.q.m.m.q.q.m.m.m.w.q.m.m.m.0.^ ^ 0.m.m.m.6.6.m.",
+"m.b.,.b.j.: ; 1 , & W m.0 % q.m.m.W 9 m.n.T & 4 3 ; ~ m.m.a.a.m.",
+"m.b.,.b.h.; ) x.j.! $ g.9 . w m.m.R 8 m.^ & 7.c.c.^ > g.m.6.6.m.",
+"m.b.,.b.h.: 7.m.m.0.# q.9 4 ; ) m.R 8 n.4 T m.m.m.c.O.x.m.6.a.m.",
+"m.b.,.b.h.; T / ~ 3 2 c.9 T W > j.E 8 h.: ) m.m.9.8.8.j.m.6.6.m.",
+"m.b.,.b.j.% ; 2 4 w q.m.8 T c.1 T R 8 h.: ( m.j.6 > @ ~ m.a.a.m.",
+"m.n.,.b.h.: ) n.n.m.m.m.9 T m.<.; 3 8 n.6 d m.m.j.h.3 Q m.6.6.m.",
+"m.b.,.b.h.; 7.m.m.m.m.m.8 T m.m.s   7 m./ % / j.c._ % ~ m.6.a.m.",
+"m.b.,.b.j.1 7.m.m.m.m.m.w W m.m.g.; 9 m.m.Q & < > $ q j.m.6.6.m.",
+"m.b.,.x.m.q.c.m.m.m.m.m.g.h.m.m.m.g.s.m.m.m.s._ ) q.m.m.m.a.a.m.",
+"m.b.,.n.m.k.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.k.p.p.z.m.6.6.m.",
+"m.b.,.b.v.&.y.u.p.p.p.y.p.p.i.u.i.i.p.p.p.y.y.y.u.p.t.e.m.6.a.m.",
+"m.b.,.n.v.e.o.o.U b ,.V c N f.m.b.2.+.B N Y +.Y N N $.e.m.6.6.m.",
+"m.n.,.n.v.%.y r Z ` [ e e p 5.=.b J { ' ] ] | } ` S x e.m.a.a.m.",
+"m.b.,.x.v.e.l.6.S | ' h V 1.a.u a ............X.G Y d.t.m.6.6.m.",
+"m.b.,.n.v.t.m.m.2.f t 5.m.m.m.=.D ....[ K {  .H Y x.z.t.m.6.a.m.",
+"m.b.,.b.v.t.m.m.b.V t j Y x.m.=.S ..| n M i h v x.m.z.t.m.6.6.m.",
+"m.b.,.n.v.e.v.m.m.n.P ] D 2.m.b.Y H H -.n.x.2.g 2.m.z.e.m.a.a.m.",
+"m.n.,.n.v.e.m.m.m.m.N A j a.m.m.f.k n x.m.m.-.j k x.v.e.m.6.6.m.",
+"m.n.,.n.v.e.m.m.m.m.+.y 6.m.m.m.m.a.d.m.m.m.b.3.,.n.z.t.m.6.a.m.",
+"m.b.,.n.v.t.b.x.f.f.i.V f.a.2.:.1.3.w.6.4.3.2.,.-.3.d.e.m.6.6.m.",
+"m.b.,.n.v.%.o.L F z C j f C H [ [ H G G H H [ S z l c $.3.M a.m.",
+"m.b.,.n.v.*.I @.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.S :.1.1.1.V ,.m.m.",
+"m.b.,.n.m.y.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.m :.1.1.O.q.m.m.m.",
+"m.n.,.n.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.1.:.1.-.a.m.m.m.m.",
+"m.n.,.x.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.2.+.>.f.m.m.m.m.m.",
+"m.b.O.,.5.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.5.M ;.x.m.m.m.m.m.m.",
+"m.m.x.a.f.d.f.f.f.f.f.d.f.f.f.f.f.d.f.f.a.f.f.f.x.m.m.m.m.m.m.m."
+};
diff --git a/share/metview/icons/POBS.xpm b/share/metview/icons/POBS.xpm
new file mode 100644
index 0000000..40bd8ce
--- /dev/null
+++ b/share/metview/icons/POBS.xpm
@@ -0,0 +1,185 @@
+/* XPM */
+static char *POBS[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 147 2",
+"   c #0D0B06",
+".  c #14110B",
+"X  c #1B170F",
+"o  c #231F14",
+"O  c #231E1E",
+"+  c #26220B",
+"@  c #332E0E",
+"#  c #3A360C",
+"$  c #242016",
+"%  c #252019",
+"&  c #2F281D",
+"*  c #322D12",
+"=  c #362E1C",
+"-  c #3E3813",
+";  c #36301B",
+":  c #38311D",
+">  c #322B21",
+",  c #3F382B",
+"<  c #403C0B",
+"1  c #403B19",
+"2  c #483F1A",
+"3  c #453D2C",
+"4  c #534E0C",
+"5  c #4F451B",
+"6  c #5E522E",
+"7  c #4D4433",
+"8  c #534732",
+"9  c #584D36",
+"0  c #584F3D",
+"q  c #5B503F",
+"w  c #605537",
+"e  c #675B45",
+"r  c #6D5A43",
+"t  c #756546",
+"y  c #74624A",
+"u  c #79634A",
+"i  c #7B6B4E",
+"p  c #736650",
+"a  c #756850",
+"s  c #7B6D54",
+"d  c #D14E11",
+"f  c #FF4F00",
+"g  c #FF5002",
+"h  c #FF5A0D",
+"j  c #F45912",
+"k  c #FE5D13",
+"l  c #FF6016",
+"z  c #FF6218",
+"x  c #8C774F",
+"c  c #877654",
+"v  c #87795F",
+"b  c #8B7B5D",
+"n  c #8E7E60",
+"m  c #A4A00E",
+"M  c #B3B010",
+"N  c #C6BC2D",
+"B  c #CCC80E",
+"V  c #D2CE0F",
+"C  c #D4D10F",
+"Z  c #DDD90E",
+"A  c #D1CD12",
+"S  c #D6D212",
+"D  c #DBD711",
+"F  c #EDE90E",
+"G  c #CBC329",
+"H  c #D0C726",
+"J  c #D1C826",
+"K  c #94815B",
+"L  c #948464",
+"P  c #998767",
+"I  c #9E8C6A",
+"U  c #A89063",
+"Y  c #B59B6A",
+"T  c #B19D77",
+"R  c #B6A17A",
+"E  c #BBA67C",
+"W  c #CCAD50",
+"Q  c #CFB37F",
+"!  c #D4B372",
+"~  c #D8B676",
+"^  c #383180",
+"/  c #1310C0",
+"(  c #1E1BE9",
+")  c #0000FE",
+"_  c #0807FC",
+"`  c #0A09FB",
+"'  c #100EF9",
+"]  c #1916F6",
+"[  c #1D19F5",
+"{  c #1411F8",
+"}  c #201CF4",
+"|  c #322CEE",
+" . c #3C35EB",
+".. c #3F38EA",
+"X. c #2521F3",
+"o. c #2823F2",
+"O. c #453DE8",
+"+. c #5248D5",
+"@. c #655ADE",
+"#. c #685CDD",
+"$. c #7C6ED6",
+"%. c #7164DA",
+"&. c #4B42E6",
+"*. c #5047E5",
+"=. c #5D52E0",
+"-. c #8374D4",
+";. c #8879D2",
+":. c #B1A086",
+">. c #C3AD83",
+",. c #C6B084",
+"<. c #C9B287",
+"1. c #CCB68A",
+"2. c #D2B98C",
+"3. c #D9BD8A",
+"4. c #C4AEBE",
+"5. c #C7B0BD",
+"6. c #CCB4BB",
+"7. c #D1B9B9",
+"8. c #DEC18D",
+"9. c #DAC292",
+"0. c #E3C285",
+"q. c #E4C894",
+"w. c #D9C0B8",
+"e. c #E6CDA3",
+"r. c #EDD2A0",
+"t. c #F1D6A2",
+"y. c #FEDCA4",
+"u. c #F4DAAC",
+"i. c #FADEAB",
+"p. c #E5CBB3",
+"a. c #E8CEB2",
+"s. c #FFCBB4",
+"d. c #FFCEB8",
+"f. c #ECD1B1",
+"g. c #F0D5B0",
+"h. c #FFD1BC",
+"j. c #FEE1AB",
+"k. c #9382CE",
+"l. c #9B89CC",
+"z. c #A18FCA",
+"x. c #AD99C5",
+"c. c #A592C8",
+"v. c #B5A0C3",
+"b. c #BAA5C1",
+"n. c #BEA8C0",
+"m. c #FFD4C1",
+"M. c #FFFFFF",
+/* pixels */
+"M.M.M.m.k z z z z z z z z z z z z z z z l z z z z z z z z z z g ",
+"M.M.h.l h y.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.2.2 :.j.j.j.k ",
+"M.d.l h g y.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.2.@ M - E j.j.k ",
+"s.l k f g y.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.<.* A N y 3 j.j.k ",
+"h k f f g y.j.j.j.j.j.j.j.j.j.j.j.j.j.j.u.j.,.@ S N u : 9.j.j.k ",
+"k y.y.y.y.j.j.j.j.j.j.j.j.j.j.j.j.j.9., 8 & + D G u = 9.j.j.j.k ",
+"k j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.E 3 8.Q $ C G u > 9.j.j.j.j.k ",
+"k j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.L q 8.! ; V G r o 9.j.j.j.j.j.k ",
+"k j.j.j.j.j.j.j.j.j.j.j.j.j.j.s t 8.! : B H r $ n e j.j.j.j.j.k ",
+"k j.j.j.j.j.j.j.j.j.j.j.j.j.a b ~ U * Z H u & Q u.p I j.j.j.j.k ",
+"l j.j.j.j.j.j.j.j.j.j.j.j.3.i ! x # F H u : t 8.g.u.0 P j.j.j.k ",
+"k j.j.j.j.j.j.j.j.j.j.j.j.R 8 9 < F J u ; v U r.u.u.u.a y >.>.j ",
+"l j.v.' i.l.| ..f.j.j.j.j.j.K 4 m 1 = % , s e.u.u.j.u.j.K .   d ",
+"l 7.O.) i.b.6.] 6.j.j.j.j.t.5 Z ; :.:.3.8.q.r.u.u.u.u.j.1..   d ",
+"k j.f.) i.p.| k.j.j.j.j.j.K K W 6 % q t K ! ! ~ q.u.j.u.1..   d ",
+"l j.f.) i.&._ } b.j.j.7.l.$ # 4 w q.t.j.2.q K ~ ! ~ 8.0.Q .   d ",
+"l j.j.j.j.j.j.j.j.u. at .) / O ^ +.g.j.j.j.j.j.,.7 U ! ! ! ! .   d ",
+"l j.j.j.j.j.j.j.j.%.) ) ( j.j.c.=.j.j.j.j.j.j.j.T 7 c Y i .   d ",
+"k j.j.j.j.j.j.j.a.) ) ) } j.j.j.*.w.j.j.j.j.j.j.j.j.9.R <.X   d ",
+"l j.j.j.j.j.j.j.v.) ) ) ] 7.7.6.%.z.i.j.j.j.j.j.j.j.j.j.j.9.9.j ",
+"z j.j.j.j.j.j.j.n.) ) ) ) ) ) ) ) X._ ) ) ) ) ) ) ) ) ) ) ) j.k ",
+"l j.j.j.j.j.j.j.f.` ) ) ) ) ) ) ) p.j.j.j.j.j.j.j.j.;.` ) [ j.k ",
+"l j.j.j.j.j.j.j.j.k.) ) ) ) ) ) $.j.j.j.j.j.j.j.j.j.j.-.' [ j.k ",
+"l j.j.j.j.j.j.j.j.j.k.` ) ) _ ;.j.j.j.j.j.j.j.j.j.j.j.j.$.) j.k ",
+"l j.4.{ a.5.O. .f.j.j.i.6.5.u.j.j.j.j.j.j.j.j.j.j.j.j.j.j.-.j.k ",
+"z p.&.) p.#.l.O.c.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.k ",
+"z j.j.) p.&.l.*.x.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.k ",
+"l j.j.) p.x.o. .f.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.k ",
+"z j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.k ",
+"z j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.k ",
+"z j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.j.k ",
+"g z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z f "
+};
diff --git a/share/metview/icons/POTTF.xpm b/share/metview/icons/POTTF.xpm
new file mode 100644
index 0000000..57919a8
--- /dev/null
+++ b/share/metview/icons/POTTF.xpm
@@ -0,0 +1,38 @@
+/* XPM */
+static char * POTTF_xpm[] = {
+"32 32 3 1",
+" 	c #FFFFFFFFFFFF",
+".	c #555555555555",
+"X	c #B2B2B2B2B2B2",
+"                                ",
+"                                ",
+"                                ",
+"             ......             ",
+"           ..XXXXXX..           ",
+"          .XX      XX.          ",
+"         .X          X.         ",
+"        .X            X.        ",
+"       .X              X.       ",
+"       .X              X.       ",
+"      .X                X.      ",
+"      .X                X.      ",
+"     .X                  X.     ",
+"     .X   .X        X.   X.     ",
+"     .X   .X.      .X.   X.     ",
+"     .X   .X........X.   X.     ",
+"     .X   .XXXXXXXXXX.   X.     ",
+"     .X   .XX      XX.   X.     ",
+"     .X   .X        X.   X.     ",
+"     .X                  X.     ",
+"      .X                X.      ",
+"      .X                X.      ",
+"       .X              X.       ",
+"       .X              X.       ",
+"        .X            X.        ",
+"         .X          X.         ",
+"          .XX      XX.          ",
+"           ..XXXXXX..           ",
+"             ......             ",
+"                                ",
+"                                ",
+"                                "};
diff --git a/share/metview/icons/PSFILE.xpm b/share/metview/icons/PSFILE.xpm
new file mode 100644
index 0000000..c403509
--- /dev/null
+++ b/share/metview/icons/PSFILE.xpm
@@ -0,0 +1,164 @@
+/* XPM */
+static char *PSFILE[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 126 2",
+"   c #AE1F1F",
+".  c #B22D2D",
+"X  c #AA3B3B",
+"o  c #B53232",
+"O  c #B93D3D",
+"+  c #BB4343",
+"@  c #B44848",
+"#  c #BD4A4A",
+"$  c #AF7474",
+"%  c #B17373",
+"&  c #C44444",
+"*  c #C94949",
+"=  c #C15353",
+"-  c #C45C5C",
+";  c #C66262",
+":  c #C86A6A",
+">  c #D07E7E",
+",  c #918576",
+"<  c #938A7F",
+"1  c #969088",
+"2  c #9C948B",
+"3  c #8E8F91",
+"4  c #999594",
+"5  c #AC9982",
+"6  c #AB9C89",
+"7  c #B09E89",
+"8  c #BBA78C",
+"9  c #A5A19E",
+"0  c #B3A696",
+"q  c #BDAB93",
+"w  c #B2A59A",
+"e  c #BBAD9A",
+"r  c #A4A1AA",
+"t  c #AFACA9",
+"y  c #B3ACA5",
+"u  c #B4AFAB",
+"i  c #B7B4AF",
+"p  c #BAB1AA",
+"a  c #AEACBC",
+"s  c #B4B3B3",
+"d  c #BBB6B1",
+"f  c #BFBBB7",
+"g  c #BDBCBB",
+"h  c #D38686",
+"j  c #D58C8C",
+"k  c #D79292",
+"l  c #DB9A9A",
+"z  c #C4AC8D",
+"x  c #D9B588",
+"c  c #DAB88D",
+"v  c #C6AD93",
+"b  c #CBAF90",
+"n  c #C1B09B",
+"m  c #D4B793",
+"M  c #DBBC96",
+"N  c #D3B79A",
+"B  c #DABB99",
+"V  c #DDA1A1",
+"C  c #C7B9A7",
+"Z  c #C1B6A9",
+"A  c #DDBDA3",
+"S  c #C4BDB2",
+"D  c #C2BDBA",
+"F  c #E0ABAB",
+"G  c #E4B4B4",
+"H  c #E7BFBF",
+"J  c #E9C08F",
+"K  c #E5C195",
+"L  c #ECC291",
+"P  c #E1C099",
+"I  c #E8C49A",
+"U  c #F1C794",
+"Y  c #F4C995",
+"T  c #FECF96",
+"R  c #FED196",
+"E  c #FFD198",
+"W  c #CBC1B5",
+"Q  c #C3C2BE",
+"!  c #C8C1BD",
+"~  c #EEC9A5",
+"^  c #BBBBC9",
+"/  c #BBBAD8",
+"(  c #BEBEE2",
+")  c #C2BBD3",
+"_  c #C5C4C3",
+"`  c #CAC4C2",
+"'  c #CCCBC4",
+"]  c #C7C7C8",
+"[  c #CDCDCD",
+"{  c #D3C5C5",
+"}  c #D1CFCD",
+"|  c #D3D3CC",
+" . c #D5D5D4",
+".. c #D9D7D5",
+"X. c #DAD9D6",
+"o. c #D7D8D8",
+"O. c #DEDEDE",
+"+. c #E9C3C3",
+"@. c #EDCCCC",
+"#. c #EFD3D3",
+"$. c #F0D6D5",
+"%. c #F2DADA",
+"&. c #E1E0DF",
+"*. c #C5C4E5",
+"=. c #C8C4E0",
+"-. c #C8C8E9",
+";. c #D5D5EC",
+":. c #D7D8EF",
+">. c #D8D8EF",
+",. c #DCDCF1",
+"<. c #DEE0F4",
+"1. c #E3E3E3",
+"2. c #E8E7E7",
+"3. c #E4E4E9",
+"4. c #E9E9E9",
+"5. c #F4E2E2",
+"6. c #F7EBEB",
+"7. c #F8ECEC",
+"8. c #E6E6F5",
+"9. c #EBEBF7",
+"0. c #EFEFF8",
+"q. c #F4F5F5",
+"w. c #FBF4F4",
+"e. c #F4F4FB",
+"r. c #F7F8F8",
+"t. c #FFFFFF",
+/* pixels */
+"t.t.q.1.2.2.2.4.4.4.4.1.4.4.1.4.4.2.2.4.1.4.2.4.2.2.1.4.4.4.r.t.",
+"t.r.% . o o o o o o o o o o o o o o o o o o o o o o o o o X { t.",
+"t.r.$ & * * * * * * * * * * * & * & * * & * * * * & * & * @ ` t.",
+"t.r.] 4.q.4.q.q.4.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q. .O.t.",
+"t.r.[ r.t.t.t.t.t.w.$.$.$.5.w.t.t.t.5.+. at .r.t.t.t.t.t.t.t.,.&.t.",
+"t.r.[ r.t.t.t.t.t.F . + + O ; %.t.V + = + - 5.t.t.t.t.t.t.&.&.t.",
+"t.r.[ r.t.t.t.t.t.V = %.5.$.# h 6.+ V r.5.- k t.t.t.t.t.t.&.O.t.",
+"t.r.[ r.t.t.t.t.t.V ; w.t.t.> : 5.O V t.t.$. at .t.t.t.t.t.t.O.&.t.",
+"t.r.[ r.t.t.t.t.t.V # +. at .F O l t.l o = h @.t.t.t.t.t.t.t.O.O.t.",
+"t.r.[ r.t.t.t.t.t.V   + # = j w.t.t.$.k - o F t.t.t.t.t.t.1.1.t.",
+"t.r.[ r.t.t.t.t.t.V = 5.7.w.t.t.$.F r.t.r.l = r.t.t.t.t.t.O.O.t.",
+"t.r.[ r.t.t.t.t.t.V - w.t.t.t.t.+.o H r.w.k - w.t.t.t.t.t.O.1.t.",
+"t.r.[ r.t.t.t.t.t.V ; w.t.t.t.t.w.> o ; - O G t.t.t.t.t.t.O.O.t.",
+"t.r.[ r.t.t.t.t.t.5. at .t.t.t.t.t.t.r.+.l V #.t.t.t.t.t.t.t.1.1.t.",
+"t.r.[ r.t.8.,.,.,.,.<.,.,.,.,.,.,.,.8.,.8.,.,.>.,.,.>.0.t.&.O.t.",
+"t.r.[ r.e.( ;.,.,.,.,.;.,.,.,.;.,.:.,.,.>.;.;.;.,.,.-.=.t.,.&.t.",
+"t.r.[ r.e.( f W S d ' g t s 4.t.r. ._ D d D ! D d d ^ *.t.,.&.t.",
+"t.r.[ r.e./ 2 5 x J I , , 6 X._ u N I K J L Y Y J v r *.t.&.&.t.",
+"t.r.[ r.e.*.9.O.e Y K 0 Q [ 1.3 7 R T T R R R R m D 3.-.t.&.O.t.",
+"t.r.[ e.e.-.r.t. .8 1 o.t.t.t._ b R T P B I E M D r.9.-.t.O.&.t.",
+"t.r.[ r.e.-.e.t.r.g < e D r.t._ z T Y p s 4 w y q.t.0.*.t.O.&.t.",
+"t.r.[ r.e.-.t.t.t.r.Z U b  .t.r.f P B ` r.q. .9  .t.0.-.t.&.&.t.",
+"t.r.[ r.e.-.t.t.t.t.i c q 1.t.t.4.w p q.t.t.` q w q.e.-.t.O.O.t.",
+"t.r.[ r.e.-.r.t.t.t.D 6 O.t.t.t.t.1.3.t.t.t.r...[ r.0.-.t.O.1.t.",
+"t.r.[ r.e.-.r.q.4.4.O.g 3.3. .[ | X.O.%.O.X.| [ _ ..3.*.t.O.O.t.",
+"t.r.[ r.e./ S C n e e v 8 z M P P m m m m M P v e e t ^ o.s 1.t.",
+"t.r.[ r.e.) A ~ ~ ~ ~ ~ ~ ~ I ~ ~ ~ ~ ~ ~ ~ ~ v ' | | } g [ t.t.",
+"t.r.[ r.t.;.=.=.=.=.=.=.=.=.=.=.=.*.=.=.=.=.=.a ' | | Q O.t.t.t.",
+"t.r.[ r.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.| ' [ _ 1.t.t.t.t.",
+"t.r.[ r.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t. .Q ' 4.t.t.t.t.t.",
+"t.r.] |  . . . . . . . . . . . . . . . . . .o.s ' q.t.t.t.t.t.t.",
+"t.t.4.2.4.3.4.4.2.2.4.3.4.4.2.2.4.2.2.4.2.2.4.1.r.t.t.t.t.t.t.t."
+};
diff --git a/share/metview/icons/PSOUTPUT.xpm b/share/metview/icons/PSOUTPUT.xpm
new file mode 100644
index 0000000..98cfaca
--- /dev/null
+++ b/share/metview/icons/PSOUTPUT.xpm
@@ -0,0 +1,240 @@
+/* XPM */
+static char * PSDRIVER_xpm[] = {
+"32 32 205 2",
+"  	c #FFFFFFFFFFFF",
+". 	c #10107070A8A8",
+"X 	c #E5E5E5E5E5E5",
+"o 	c #999999999999",
+"O 	c #E8E8E8E8E8E8",
+"+ 	c #D0D0D0D0E0E0",
+"@ 	c #C8C8C8C8D8D8",
+"# 	c #C0C0C0C0D0D0",
+"$ 	c #B8B8B8B8C8C8",
+"% 	c #F8F8F8F8F8F8",
+"& 	c #C0C0C8C8D8D8",
+"* 	c #C0C0C0C0D8D8",
+"= 	c #E0E0E0E0E8E8",
+"- 	c #F0F0F0F0F0F0",
+"; 	c #E0E0E0E0F0F0",
+": 	c #D8D8E0E0F0F0",
+"> 	c #D8D8D8D8E8E8",
+", 	c #C8C8C8C8D0D0",
+"< 	c #E0E0E0E0F8F8",
+"1 	c #E0E0E8E8F8F8",
+"2 	c #D0D0D0D0D8D8",
+"3 	c #E8E8E8E8F0F0",
+"4 	c #D8D8D8D8E0E0",
+"5 	c #D0D0D8D8E8E8",
+"6 	c #D0D0D8D8D8D8",
+"7 	c #E0E0E8E8F0F0",
+"8 	c #D0D0D0D0E8E8",
+"9 	c #C0C0C0C0C8C8",
+"0 	c #F0F0F0F0F8F8",
+"q 	c #909090909898",
+"w 	c #A0A0A8A8A8A8",
+"e 	c #888890909090",
+"r 	c #C8C8D8D8E8E8",
+"t 	c #C0C0D0D0E8E8",
+"y 	c #D8D8D8D8F0F0",
+"u 	c #F0F0F8F8F8F8",
+"i 	c #D0D0E0E0F0F0",
+"p 	c #A0A0C8C8E0E0",
+"a 	c #9090C0C0D8D8",
+"s 	c #8888B8B8D8D8",
+"d 	c #7878B0B0D0D0",
+"f 	c #7070A0A0D0D0",
+"g 	c #A0A0C0C0E0E0",
+"h 	c #D0D0D8D8F0F0",
+"j 	c #E8E8F0F0F8F8",
+"k 	c #B0B0D0D0E0E0",
+"l 	c #7070A8A8D0D0",
+"z 	c #7878B0B0E0E0",
+"x 	c #8080C0C0E8E8",
+"c 	c #7878B8B8E0E0",
+"v 	c #6060A0A0D0D0",
+"b 	c #C8C8D0D0E8E8",
+"n 	c #C0C0C8C8E8E8",
+"m 	c #D8D8E8E8F0F0",
+"M 	c #A8A8C8C8E0E0",
+"N 	c #8080B0B0D0D0",
+"B 	c #6868A8A8D0D0",
+"V 	c #7878B8B8E8E8",
+"C 	c #8888C8C8F0F0",
+"Z 	c #8080B8B8E8E8",
+"A 	c #A8A8C0C0E0E0",
+"S 	c #B0B0C0C0E0E0",
+"D 	c #8080A8A8D0D0",
+"F 	c #9090A0A0C0C0",
+"G 	c #9898C0C0E0E0",
+"H 	c #7070A8A8D8D8",
+"J 	c #6868A8A8D8D8",
+"K 	c #8080B0B0D8D8",
+"L 	c #5858A0A0D0D0",
+"P 	c #8080C0C0F0F0",
+"I 	c #9090C8C8F8F8",
+"U 	c #7878A8A8D0D0",
+"Y 	c #6060A0A0C8C8",
+"T 	c #60608888B0B0",
+"R 	c #E8E8E8E8F8F8",
+"E 	c #9090B8B8D8D8",
+"W 	c #6060A8A8E0E0",
+"Q 	c #7070B0B0F0F0",
+"! 	c #6868B0B0E0E0",
+"~ 	c #5858A0A0D8D8",
+"^ 	c #6868B0B0E8E8",
+"/ 	c #8080C0C0F8F8",
+"( 	c #8888C8C8F8F8",
+") 	c #7070B0B0E0E0",
+"_ 	c #7878B0B0D8D8",
+"` 	c #8888C0C0E8E8",
+"' 	c #8080B8B8E0E0",
+"] 	c #50509898C0C0",
+"[ 	c #58589898D0D0",
+"{ 	c #5050A0A0E0E0",
+"} 	c #6060B0B0F0F0",
+"| 	c #6868B0B0F8F8",
+" .	c #6868B0B0F0F0",
+"..	c #7070B8B8F0F0",
+"X.	c #7070B8B8F8F8",
+"o.	c #7878B8B8F8F8",
+"O.	c #7878C0C0F8F8",
+"+.	c #8888C0C0F0F0",
+"@.	c #9898C8C8F0F0",
+"#.	c #9898C8C8F8F8",
+"$.	c #20208080B8B8",
+"%.	c #D0D0D8D8E0E0",
+"&.	c #B8B8D0D0E8E8",
+"*.	c #40409090C8C8",
+"=.	c #5050A0A0E8E8",
+"-.	c #6060B0B0F8F8",
+";.	c #6060A8A8F0F0",
+":.	c #5858A8A8E8E8",
+">.	c #5858A0A0E0E0",
+",.	c #5858A8A8E0E0",
+"<.	c #6060A8A8E8E8",
+"1.	c #7878B8B8F0F0",
+"2.	c #8888C0C0F8F8",
+"3.	c #9898D0D0F8F8",
+"4.	c #6060A8A8D8D8",
+"5.	c #38388888C0C0",
+"6.	c #10107070B0B0",
+"7.	c #50509898D0D0",
+"8.	c #38389090D0D0",
+"9.	c #4848A0A0E8E8",
+"0.	c #5858A8A8F8F8",
+"q.	c #50509898D8D8",
+"w.	c #6060A0A0D8D8",
+"e.	c #50509090C0C0",
+"r.	c #48488080A8A8",
+"t.	c #B0B0C8C8E0E0",
+"y.	c #40409090E0E0",
+"u.	c #40409898E8E8",
+"i.	c #48489898E8E8",
+"p.	c #5050A8A8F8F8",
+"a.	c #5858A8A8F0F0",
+"s.	c #B0B0C8C8E8E8",
+"d.	c #9898B8B8E0E0",
+"f.	c #58589090B8B8",
+"g.	c #50508080A8A8",
+"h.	c #48489898D8D8",
+"j.	c #40409898F0F0",
+"k.	c #4848A0A0F8F8",
+"l.	c #5050A0A0F8F8",
+"z.	c #7878A8A8D8D8",
+"x.	c #B8B8C8C8E8E8",
+"c.	c #58589898C8C8",
+"v.	c #48488888B8B8",
+"b.	c #30308080B8B8",
+"n.	c #40409090D8D8",
+"m.	c #38389898E8E8",
+"M.	c #6060A8A8D0D0",
+"N.	c #28288080B8B8",
+"B.	c #8888B0B0D8D8",
+"V.	c #38388888D0D0",
+"C.	c #30308888D8D8",
+"Z.	c #6868A8A8E0E0",
+"A.	c #7070B0B0E8E8",
+"S.	c #6868A0A0D0D0",
+"D.	c #50509090C8C8",
+"F.	c #38389090E0E0",
+"G.	c #5050A0A0F0F0",
+"H.	c #48489898C8C8",
+"J.	c #9898B8B8D8D8",
+"K.	c #6868A8A8E8E8",
+"L.	c #6060A8A8F8F8",
+"P.	c #48489090C8C8",
+"I.	c #68689898C8C8",
+"U.	c #58589090C0C0",
+"Y.	c #40408888C0C0",
+"T.	c #C0C0D8D8E8E8",
+"R.	c #B8B8C8C8E0E0",
+"E.	c #38388888D8D8",
+"W.	c #30309090E8E8",
+"Q.	c #38389898F8F8",
+"!.	c #40409898F8F8",
+"~.	c #40409898E0E0",
+"^.	c #48488888C8C8",
+"/.	c #78789898C0C0",
+"(.	c #80809090B8B8",
+").	c #58588888B0B0",
+"_.	c #C8C8D0D0E0E0",
+"`.	c #28288080D0D0",
+"'.	c #38389090F8F8",
+"].	c #38389090F0F0",
+"[.	c #30309090E0E0",
+"{.	c #38389090D8D8",
+"}.	c #30309090D8D8",
+"|.	c #4848A0A0F0F0",
+" X	c #40408080B8B8",
+".X	c #C8C8D8D8E0E0",
+"XX	c #A8A8B0B0C8C8",
+"oX	c #68689090B8B8",
+"OX	c #30308080C0C0",
+"+X	c #20208080D0D0",
+"@X	c #28288888E8E8",
+"#X	c #30309090F0F0",
+"$X	c #20208080D8D8",
+"%X	c #10107878C0C0",
+"&X	c #10107070B8B8",
+"*X	c #20208080C8C8",
+"=X	c #28288888D0D0",
+"-X	c #28287878B8B8",
+";X	c #18187878C8C8",
+":X	c #18188080D0D0",
+">X	c #28288888D8D8",
+",X	c #28288888C8C8",
+"<X	c #08087070B0B0",
+"1X	c #00006868B0B0",
+"2X	c #08087070B8B8",
+"                      . . . . . . X . . . . . .                 ",
+"                      . . . . . . X . . . . . .                 ",
+"                  o o . . O X . . X . .                         ",
+"                o + + . . X X . . X . .                         ",
+"              o @ # + . . . . . . X . . . . . . o o o o o o o   ",
+"            o $ + O % . . . . . . % . . . . . . @ & & * & o o o ",
+"          o $ = - % % . . % % % % % % % % % . . ; ; ; ; : > > o ",
+"        o , O % % % % . . % % % %       % % . . < < < 1 1 ; > o ",
+"      o 2 3 % % % % % . . % % % %   . . . . . . ; ; < < < : > o ",
+"    o 4 - % % % % % % . . % % % %   . . . . . . ; ; ; ; ; 5 > o ",
+"  o 4 - % % % % % % % % % % % % % % % % % % 6 7 ; : : ; ; 8 > o ",
+"o $ O % % % % % % % % % % % % % % % % % % % 9 1 : : : : : > o o ",
+"o o 4 0 % % % % % % % % % % % % % % % q w e : r t r y : y > o   ",
+"  o @ 3 % % % % % % % % u u u u u u 0 i p a s d f g h : y > o   ",
+"  o @ + 0 % u u u u u u u u u j : 1 j k l z x c v g b b n > o   ",
+"    o @ = 0 u u u u u u 0 0 m M N g i k B V C Z l A S D D F     ",
+"    o @ @ 3 0 0 u 0 0 0 j i G H J B s K L P I c v N U B Y T     ",
+"      o @ > 0 0 0 j R R : E v W Q ! ~ ~ ^ / ( P ) J _ ` ' ]     ",
+"      o @ @ 7 j R 1 1 1 h E [ { } | }  ...X.o.O.P +. at .#.+.L $.  ",
+"        o @ %.R 1 < < : &.g l *.=.-.| ;.:.>.,.<.1.2.3.` 4.5.6.  ",
+"        o @ @ ; 1 ; ; t l [ 7.8.9.0.=.q.J K K w.W o.( ) e.r.    ",
+"          o @ + ; ; : t.7.y.u.i.p.a.q.K s.r b d.~  ./ ) f.g.    ",
+"          o @ @ : < : g h.j.k.l.0.W z.x.y : y A ~ ;.o.V c.v.b.. ",
+"            o @ 8 ; y d.n.m.j.k.| J E b y y h E ~ } o.+.x ' M.N.",
+"            o @ & : y B.V.C.C.u.} Z.K x.h b g l W -. .A.1.P J % ",
+"              o @ 5 y E c.S.D.F.G.^ v U B.U B )  .;.h.*.h.W H.p ",
+"              o @ @ y t A J.[ C.j.0.K.w.v 4.!  .L.9.P.I.U.Y.b.T.",
+"                o @ > y R.S.E.W.Q.!.l.:.<.:.a.0.p.~.^./.(.).    ",
+"                o @ _.: S e.`.W.'.Q.].[.{.}.F.k.l.|.V. X% .X    ",
+"                  o @ & XXoXOX+X at X#X$X%XX &X*Xm.j.u.=X-Xk       ",
+"                  o @ @ % .Xk % ;X:X%XX X X %X>X>X,X% % j       ",
+"                    o o 0 % u j % <XX X X X 1X2X% p m           "};
diff --git a/share/metview/icons/PSYMB.xpm b/share/metview/icons/PSYMB.xpm
new file mode 100644
index 0000000..a6c9d86
--- /dev/null
+++ b/share/metview/icons/PSYMB.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * PSYMB_xpm[] = {
+"32 32 13 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #61D7AF",
+"@	c #7F7F7F",
+"#	c #93D5CE",
+"$	c #E599DA",
+"%	c #E4E599",
+"&	c #E2D8C4",
+"*	c #F6EDDC",
+"=	c #E5B099",
+"-	c #F9FAEA",
+";	c #9999E5",
+">	c #E59999",
+"....+++++++++++++++++++++++@@@++",
+"...++#######$#############@$$@#+",
+"..+++#######$############@%@$@#+",
+".++++#######$###########@%&@@##+",
+"+++++####$$$$$$$#######@%&@@###+",
+"+###########$######@@@@%&@@####+",
+"+###########$#####@*&@%&@@#####+",
+"+###########$####@*&@%&@@######+",
+"+###############@*&@%&@@&@#####+",
+"+##############@*&@%&@@&&*@####+",
+"+#############@*&@%&@@@&***@###+",
+"+#############@&@%&@@#@=****@@@+",
+"+##############@%@@@@@-*****&@@+",
+"+########;####@%@-**********&@@+",
+"+#########;###@&@@@&&&******&@@+",
+"+##########;#@@@###@@@&&&&**&@@+",
+"+###########;@########@@@@&&&@@+",
+"+###########;;############@@@@@+",
+"+##########;##;##############@@+",
+"+#########;####;###############+",
+"+########;######;###>>>########+",
+"+##################>>>>>#######+",
+"+#################>>>>>>>######+",
+"+#################>>>>>>>######+",
+"+#################>>>>>>>######+",
+"+##################>>>>>#######+",
+"+###################>>>########+",
+"+##############################+",
+"+##############################+",
+"+##############################+",
+"+##############################+",
+"++++++++++++++++++++++++++++++++"};
diff --git a/share/metview/icons/PTEXT.xpm b/share/metview/icons/PTEXT.xpm
new file mode 100644
index 0000000..68dffec
--- /dev/null
+++ b/share/metview/icons/PTEXT.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * PTEXT_xpm[] = {
+"32 32 13 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #BEBEBE",
+"@	c #F1F1F1",
+"#	c #99BFE5",
+"$	c #5A5AD6",
+"%	c #7F7F7F",
+"&	c #E599DA",
+"*	c #E4E599",
+"=	c #E2D8C4",
+"-	c #F6EDDC",
+";	c #E5B099",
+">	c #F9FAEA",
+"....++++++++++++++++++++++++++++",
+"...++@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+"..+++@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+".++++@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+"+++++...................@@@@@@@+",
+"+@@@.###################$@@%%%@+",
+"+@@@.###################$@%&&%@+",
+"+@@@.###################$%*%&%@+",
+"+@@@.#$$$$$$.###$$$$$$##%*=%%@@+",
+"+@@@.$@@@@@@.###$@@@@@@%*=%%@@@+",
+"+@@@@@@@@@@@.###$@@%%%%*=%%@@@@+",
+"+@@@@@@@@@@@.###$@%-=%*=%%@@@@@+",
+"+@@@@@@@@@@@.###$%-=%*=%%@@@@@@+",
+"+@@@@@@@@@@@.###%-=%*=%%=%@@@@@+",
+"+@@@@@@@@@@@.##%-=%*=%%==-%@@@@+",
+"+@@@@@@@@@@@.#%-=%*=%%%=---%@@@+",
+"+@@@@@@@@@@@.#%=%*=%%@%;----%%%%",
+"+@@@@@@@@@@@.##%*%%%%%>-----=%%%",
+"+@@@@@@@@@@@.#%*%>----------=%%%",
+"+@@@@@@@@@@@.#%=%%%===------=%%%",
+"+@@@@@@@@@@@.%%%$@@%%%====--=%%%",
+"+@@@@@@@@@@@%%##$@@@@@%%%%===%%%",
+"+@@@@@@@@@@@.###$@@@@@@@@@%%%%%%",
+"+@@@@@@@@@@@.###$@@@@@@@@@@@@%%%",
+"+@@@@@@@@@@@.###$@@@@@@@@@@@@@@+",
+"+@@@@@@@@@@@.###$@@@@@@@@@@@@@@+",
+"+@@@@@@@@@@#######@@@@@@@@@@@@@+",
+"+@@@@@@@@###########$@@@@@@@@@@+",
+"+@@@@@@@@$$$$$$$$$$$$@@@@@@@@@@+",
+"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+",
+"++++++++++++++++++++++++++++++++"};
diff --git a/share/metview/icons/PWIND.xpm b/share/metview/icons/PWIND.xpm
new file mode 100644
index 0000000..e8776fa
--- /dev/null
+++ b/share/metview/icons/PWIND.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * PWIND_xpm[] = {
+"32 32 12 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #D1C1E9",
+"@	c #7F7F7F",
+"#	c #EAEAFA",
+"$	c #DA99E5",
+"%	c #E4E599",
+"&	c #E2D8C4",
+"*	c #E59999",
+"=	c #F6EDDC",
+"-	c #E5B099",
+";	c #F9FAEA",
+"....+++++++++++++++++++++++@@@++",
+"...++#####################@$$@#+",
+"..+++####################@%@$@#+",
+".++++###################@%&@@##+",
+"+++++##################@%&@@###+",
+"+######*###########@@@@%&@@####+",
+"+######*#*########@=&@%&@@#####+",
+"+######*#*#######@=&@%&@@######+",
+"+###*##*#*######@=&@%&@@&@#####+",
+"+####*#*#*#####@=&@%&@@&&=@####+",
+"+#####**#*####@=&@%&@@@&===@###+",
+"+######*#*####@&@%&@@#@-====@@@+",
+"+#######**#####@%@@@@@;=====&@@+",
+"+########*####@%@;==========&@@+",
+"+#########*###@&@@@&&&======&@@+",
+"+##########*#@@@###@@@&&&&==&@@+",
+"+###########*@########@@@@&&&@@+",
+"+############*############@@@@@+",
+"+#############*##############@@+",
+"+##############*###############+",
+"+###############*##############+",
+"+################*#***#########+",
+"+#################*****########+",
+"+################*******#######+",
+"+################*******#######+",
+"+################*******#######+",
+"+#################*****########+",
+"+##################***#########+",
+"+##############################+",
+"+##############################+",
+"+##############################+",
+"++++++++++++++++++++++++++++++++"};
diff --git a/share/metview/icons/READ.xpm b/share/metview/icons/READ.xpm
new file mode 100644
index 0000000..823ce30
--- /dev/null
+++ b/share/metview/icons/READ.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * READ_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 10 1",
+/* colors */
+" 	c white",
+".	c black",
+"X	c #B2B2B2B2B2B2",
+"o	c #777777",
+"O	c #DDDDDDDDDDDD",
+"+	c #555555555555",
+"@	c cyan",
+"#	c #000073734B4B",
+"$	c #6C6CA6A63131",
+"%	c #00008C8C3030",
+/* pixels */
+" ...........................    ",
+".XXXoXXoooooooooooooooooOXXo.   ",
+".XXXoXXoooooooooo...ooooOXXXo.  ",
+".XXXoXXooooooooo.XXXOoooOXXXXo. ",
+".XXXoXXooooooooo.XXXOoooOXXXXXo.",
+".XXXoXXooooooooo.XXXOoooOXXXXXX.",
+".XXXoXXooooooooo.XXXOoooOXXXXXX.",
+".XXXoXXooooooooo.XXXOoooOXXXXXX.",
+".XXXoXXooooooooo.XXXOoooOXXXXXX.",
+".XXXoXXooooooooooOOOXoooOXXXXXX.",
+".XXXoXXXoooooooooooooooXOXXXXXX.",
+".XXXXOOOOOOOOOOOOOOOOOOOOXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+".XXXXX+....+XooooooooooooooXXXX.",
+".XXX+.@@###@.+XXXXXXXXXXXXXOXXX.",
+".XX.@#$ @ #@@#.XXXXXXXXXXXXOXXX.",
+".X.#@$% @ %@ ##.XXXXXXXXXXXOXXX.",
+".+#$% %%  @ %###+XXXXXXXXXXOXXX.",
+"X.#$%%% %%  %###.XXXXXXXXXXOXXX.",
+"+@#$%% %%%@ @%@ @+XXXXXXXXXOXXX.",
+".@#$%%%%@   @@###.XXXXXXXXXOXXX.",
+".@#$%%%%  @ @$###.XXXXXXXXXOXXX.",
+".@#$%%%%@   @$###.XXXXXXXXXOXXX.",
+".@@ %%% %%@ @####.XXXXXXXXXOXXX.",
+"+@@@ %% @  @ @###+XXXXXXXXXOXXX.",
+"X.@ @ %%%%% @ @@.XXXXXXXXXXOXXX.",
+".+@@ @#####@ @@@+XXXXXXXXXXOXXX.",
+".X.@@ @###@@@@@.XXXXXXXXXXXOXXX.",
+".XX.@@ ###@@@@.XXXXXXXXXXXXOXXX.",
+".XXX+.@###@@.+XXXXXXXXXXXXXOXXX.",
+" ....X+....+X.................. "};
diff --git a/share/metview/icons/READ_TIGGE.xpm b/share/metview/icons/READ_TIGGE.xpm
new file mode 100644
index 0000000..a024687
--- /dev/null
+++ b/share/metview/icons/READ_TIGGE.xpm
@@ -0,0 +1,212 @@
+/* XPM */
+static char *READ_TIGGE[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 174 2",
+"   c black",
+".  c #060708",
+"X  c gray5",
+"o  c #111111",
+"O  c gray7",
+"+  c #131313",
+"@  c #101315",
+"#  c #151515",
+"$  c gray9",
+"%  c #191919",
+"&  c #1B1B1B",
+"*  c gray11",
+"=  c gray12",
+"-  c gray14",
+";  c #272727",
+":  c #2A2A2A",
+">  c gray17",
+",  c #2C2C2C",
+"<  c #2D2D2D",
+"1  c gray18",
+"2  c gray19",
+"3  c gray20",
+"4  c #373737",
+"5  c #3C3C3C",
+"6  c gray24",
+"7  c #00734B",
+"8  c #414141",
+"9  c gray26",
+"0  c #434343",
+"q  c #444444",
+"w  c #464646",
+"e  c #484848",
+"r  c #4B4B4B",
+"t  c #4C4C4C",
+"y  c #424A57",
+"u  c gray32",
+"i  c #535353",
+"p  c gray33",
+"a  c #555555",
+"s  c gray34",
+"d  c gray36",
+"f  c gray38",
+"g  c #626262",
+"h  c #656565",
+"j  c gray40",
+"k  c #686868",
+"l  c #6B7078",
+"z  c #727272",
+"x  c #767676",
+"c  c #777777",
+"v  c gray47",
+"b  c #797979",
+"n  c gray48",
+"m  c #7C7C7C",
+"M  c gray49",
+"N  c #7F7F7F",
+"B  c #008C30",
+"V  c #0B903B",
+"C  c #0C903D",
+"Z  c #6CA631",
+"A  c #3DA070",
+"S  c #83B171",
+"D  c #84B172",
+"F  c #757C89",
+"G  c #777F8C",
+"H  c #3D9082",
+"J  c #3E9083",
+"K  c #429286",
+"L  c cyan",
+"P  c #07FCFE",
+"I  c #0EFAFD",
+"U  c #0FFAFD",
+"Y  c #17F7FB",
+"T  c #1CF6FB",
+"R  c #1AF6FC",
+"E  c #12F8FC",
+"W  c #11FAFD",
+"Q  c #14F9FC",
+"!  c #3DEBF7",
+"~  c #3FECF8",
+"^  c #40EAF7",
+"/  c #41EAF7",
+"(  c #42EAF7",
+")  c #808080",
+"_  c #838383",
+"`  c #848484",
+"'  c gray52",
+"]  c gray54",
+"[  c #8B8B8B",
+"{  c gray56",
+"}  c #89909B",
+"|  c #89919C",
+" . c #8A929E",
+".. c #8B929E",
+"X. c #8A929F",
+"o. c #8B929F",
+"O. c #8B939F",
+"+. c gray57",
+"@. c #929292",
+"#. c gray58",
+"$. c gray59",
+"%. c #9A9A9A",
+"&. c #9B9B9B",
+"*. c #9D9D9D",
+"=. c #8B94A1",
+"-. c #8C94A0",
+";. c #8C94A1",
+":. c #A0A0A0",
+">. c #A2A2A2",
+",. c #A4A4A4",
+"<. c gray65",
+"1. c gray66",
+"2. c #A9A9A9",
+"3. c #AAAAAA",
+"4. c gray67",
+"5. c #ACACAC",
+"6. c #B2B2B2",
+"7. c #B2B2B3",
+"8. c #B2B3B3",
+"9. c gray70",
+"0. c #B2B2B4",
+"q. c #B2B3B4",
+"w. c #B3B3B4",
+"e. c #B2B3B5",
+"r. c #B2B3B6",
+"t. c #B2B4B5",
+"y. c #B2B4B7",
+"u. c #B2B4B8",
+"i. c #B1B7BF",
+"p. c gray72",
+"a. c gray73",
+"s. c #BBBBBB",
+"d. c gray75",
+"f. c #B0B7C0",
+"g. c #B1B8C1",
+"h. c #B1B8C2",
+"j. c #B1B8C3",
+"k. c #B2B8C2",
+"l. c #B1B8C4",
+"z. c #B1B9C4",
+"x. c #B1B9C5",
+"c. c #B1BAC5",
+"v. c #B2BAC4",
+"b. c #B2B9C6",
+"n. c #B2BAC7",
+"m. c #C1C1C1",
+"M. c gray77",
+"N. c #C5C5C5",
+"B. c #C6C6C6",
+"V. c gray78",
+"C. c #CACACA",
+"Z. c #CBCBCB",
+"A. c gray80",
+"S. c #CDCDCD",
+"D. c gray81",
+"F. c #D0D0D0",
+"G. c gray82",
+"H. c gray83",
+"J. c #D7D7D7",
+"K. c gray86",
+"L. c #CDD4E1",
+"P. c #CDD5E1",
+"I. c #CDD5E2",
+"U. c #CDD6E2",
+"Y. c #E2E2E2",
+"T. c gray90",
+"R. c #E9E9E9",
+"E. c #E2EAF7",
+"W. c #E3EBF8",
+"Q. c #F4F4F4",
+"!. c #F4F7FC",
+"~. c #FBFCFE",
+"^. c #FDFDFD",
+"/. c gray100",
+/* pixels */
+"/.q N N N N N N N N N N N N N N N N N N N N N N N N N N /./././.",
+"  S.T.T.G.T.T.G.G.G.G.G.G.G.F.G.G.G.G.G.G.G.F.G.Q.T.T.G.2./././.",
+"  5.* * % * * 5 *.p G.G.<.< X O p :.2.<.g $ X ; 3.T.&.* % # = Y.",
+"  Z.J.J.6 %.J.B.$.9 G.s.+ #.D.B.s m.T.k t m.F.3.n T.+.a J.M.*.^.",
+"  S.T.T.9 ,.T.G.$.9 G.g j G.G.G.2.T.K.o Y.G.G.G.Q.T.+.d T.T.G.' ",
+"  S.T.T.9 ,.T.G.$.9 G.5 #.G.G.G.2.T.a.: Q.G.G.G.Q.T.+.3 ) ) _ ' ",
+"  S.T.T.9 ,.T.G.$.9 G., :.G.p.% # *.3.4 Q.G.f % 4 T.+.1 z z x ' ",
+"  S.T.T.9 ,.T.G.$.9 G.w [ G.D.M.0 @.B.= Q.G.C.s.& T.+.d T.T.T.' ",
+"  S.T.T.9 ,.T.G.$.9 G.M 8 G.G.G.e @.Y.= d.G.G.V.& T.+.d T.T.T.' ",
+"  S.T.T.9 ,.T.G.$.9 G.A., r [ ` - 4.Q.1.% c { h > T.+.2 b b b b ",
+"  S.T.T.] N.T.T.9.] G.G.A.m i f >.G.G.G.3.h u ) R.T.s.z z z z v ",
+"  S.T.T.T.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.T.T.T.T.T.T.' ",
+"  M.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.s ",
+"  6.6.6.6.6.6.6.6.6.6.6.6.t.q.q.8.6.6.6.6.6.6.6.6.6.6.6.6.6.6.  ",
+"  6.6.6.6.6.a         a w.=...o.O.-.;.-.-.O.X. .| | } h.y.6.6.  ",
+"  6.6.6.a   L L 7 7 7 L . F n.n.n.n.n.n.n.n.n.n.n.n.n.L.u.6.6.  ",
+"  6.6.  L 7 Z /.L /.7 L P H y n.n.n.n.n.n.n.n.n.n.n.n.P.y.6.6.  ",
+"  6.  7 L Z B /.L /.B L ~.H K y n.n.n.n.n.n.n.n.n.n.n.P.y.6.6.  ",
+"  a 7 Z B /.B B /./.L /.V H K K G n.n.n.n.n.n.n.n.n.n.P.r.6.6.  ",
+"6.  7 Z B B B /.B B /./.C H K K y n.n.n.n.n.n.n.n.n.n.P.r.6.6.  ",
+"a L 7 Z B B /.B B B L /.I A ( E.( G n.n.n.n.n.n.n.n.n.P.e.6.6.  ",
+"  L 7 Z B B B B L /././.U ! K K K y n.n.n.n.n.n.n.n.n.I.0.6.6.  ",
+"  L 7 Z B B B B /./.L /.W S K K K y n.n.n.n.n.n.n.n.n.P.q.6.6.  ",
+"  L 7 Z B B B B L /././.E D K K K y n.n.n.n.n.n.n.n.n.P.7.6.6.  ",
+"  L L /.B B B /.B B L /.Q J K K K y n.n.n.n.n.n.n.n.n.P.7.6.6.  ",
+"a L L L /.B B /.L /./.L !.~ K K K G n.n.n.n.n.n.n.n.n.U.9.6.6.  ",
+"6.  L /.L /.B B B B B /.Y W.( ( y n.n.n.n.n.n.n.n.n.n.I.6.6.6.  ",
+"  a L L /.L 7 7 7 7 7 L !.^ ( ( G n.n.n.n.n.n.n.n.n.n.I.6.6.6.  ",
+"  6.  L L /.L 7 7 7 L L R ^ ( y n.n.n.n.n.n.n.n.n.n.n.I.6.6.6.  ",
+"  6.6.  L L /.7 7 7 L L T / y n.n.n.n.n.n.n.n.n.n.n.n.I.6.6.6.  ",
+"  6.6.6.a   L 7 7 7 L L @ l i.g.f.h.k.v.l.j.z.x.b.c.c.P.6.6.6.  ",
+"/.        6.a         a 6.                                    /."
+};
diff --git a/share/metview/icons/REPROJECTION.xpm b/share/metview/icons/REPROJECTION.xpm
new file mode 100755
index 0000000..137d788
--- /dev/null
+++ b/share/metview/icons/REPROJECTION.xpm
@@ -0,0 +1,257 @@
+/* XPM */
+static char * web1_xpm[] = {
+"32 32 222 2",
+"  	c #FFFFFFFFFFFF",
+". 	c #FFFFFFFFFFFF",
+"X 	c #E0E0E8E8F0F0",
+"o 	c #E8E8F0F0F8F8",
+"O 	c #F0F0F0F0F8F8",
+"+ 	c #F0F0F0F0F0F0",
+"@ 	c #D0D0D8D8E8E8",
+"# 	c #8888A8A8D8D8",
+"$ 	c #A0A0C0C0E0E0",
+"% 	c #8888B8B8E0E0",
+"& 	c #38388888C8C8",
+"* 	c #48489090D0D0",
+"= 	c #5050A0A0D0D0",
+"- 	c #6060A8A8D0D0",
+"; 	c #B0B0D0D0E8E8",
+": 	c #D0D0E0E0E8E8",
+"> 	c #E0E0F0F0F0F0",
+", 	c #D8D8E0E0F0F0",
+"< 	c #78789898C8C8",
+"1 	c #30307070B8B8",
+"2 	c #58589090C8C8",
+"3 	c #A0A0C8C8E8E8",
+"4 	c #48489898D0D0",
+"5 	c #6868A8A8D0D0",
+"6 	c #7878B8B8D0D0",
+"7 	c #8888C0C0D0D0",
+"8 	c #A8A8D0D0D8D8",
+"9 	c #B8B8C0C0E0E0",
+"0 	c #40407070B8B8",
+"q 	c #18185858B0B0",
+"w 	c #20207070C0C0",
+"e 	c #A8A8C8C8E8E8",
+"r 	c #6060A0A0D8D8",
+"t 	c #40409090D0D0",
+"y 	c #9898C8C8D0D0",
+"u 	c #C8C8E0E0E0E0",
+"i 	c #A8A8D0D0D0D0",
+"p 	c #D8D8E8E8E8E8",
+"a 	c #B0B0C0C0E0E0",
+"s 	c #38386868B0B0",
+"d 	c #7878A0A0D0D0",
+"f 	c #60609090D0D0",
+"g 	c #58589090D0D0",
+"h 	c #5858A8A8D0D0",
+"j 	c #7070B0B0D0D0",
+"k 	c #9090C0C0D0D0",
+"l 	c #B0B0D8D8D8D8",
+"z 	c #D0D0E0E0E0E0",
+"x 	c #E0E0F0F0E8E8",
+"c 	c #C0C0E0E0E0E0",
+"v 	c #C0C0D8D8E0E0",
+"b 	c #C0C0D0D0E8E8",
+"n 	c #28285858B0B0",
+"m 	c #10105050B0B0",
+"M 	c #40407878C0C0",
+"N 	c #9898B8B8E0E0",
+"B 	c #D0D0E0E0F0F0",
+"V 	c #B8B8D0D0E8E8",
+"C 	c #7070A8A8D8D8",
+"Z 	c #6060A8A8D8D8",
+"A 	c #8080B8B8D0D0",
+"S 	c #A0A0C8C8D0D0",
+"D 	c #E8E8F0F0F0F0",
+"F 	c #D8D8E8E8E0E0",
+"G 	c #A0A0C8C8C8C8",
+"H 	c #8080B8B8C8C8",
+"J 	c #D0D0E8E8E8E8",
+"K 	c #F0F0F8F8F8F8",
+"L 	c #40406868B0B0",
+"P 	c #10104848A8A8",
+"I 	c #20206060B8B8",
+"U 	c #30307878C0C0",
+"Y 	c #B8B8D8D8E8E8",
+"T 	c #C8C8E0E0F0F0",
+"R 	c #D8D8E8E8F0F0",
+"E 	c #F0F0F8F8F0F0",
+"W 	c #C8C8E0E0D8D8",
+"Q 	c #9898A8A8D0D0",
+"! 	c #10104848A0A0",
+"~ 	c #10105050A8A8",
+"^ 	c #20206868B8B8",
+"/ 	c #48488888D0D0",
+"( 	c #48489898D8D8",
+") 	c #40409898D0D0",
+"_ 	c #6868B0B0D0D0",
+"` 	c #C0C0E0E0D8D8",
+"' 	c #E0E0F0F0E0E0",
+"] 	c #E8E8F0F0E8E8",
+"[ 	c #A8A8D0D0E0E0",
+"{ 	c #60608080C0C0",
+"} 	c #08084040A0A0",
+"| 	c #18186060B8B8",
+" .	c #20206868C0C0",
+"..	c #60609898D0D0",
+"X.	c #38389090D0D0",
+"o.	c #9090C0C0C8C8",
+"O.	c #B0B0D0D0D0D0",
+"+.	c #D0D0E8E8D8D8",
+"@.	c #C0C0D8D8D8D8",
+"#.	c #7878B8B8C8C8",
+"$.	c #9090A0A0D0D0",
+"%.	c #7070A0A0D8D8",
+"&.	c #A0A0C0C0E8E8",
+"*.	c #40409898D8D8",
+"=.	c #4848A0A0D8D8",
+"-.	c #8888C0C0C8C8",
+";.	c #A0A0D0D0C0C0",
+":.	c #B0B0D0D0C8C8",
+">.	c #B0B0D8D8C8C8",
+",.	c #B8B8D8D8D8D8",
+"<.	c #7070B0B0C8C8",
+"1.	c #E0E0F0F0F8F8",
+"2.	c #30306060B0B0",
+"3.	c #9898B0B0D8D8",
+"4.	c #30306868B8B8",
+"5.	c #7878A8A8D8D8",
+"6.	c #9090B8B8E0E0",
+"7.	c #38388888D0D0",
+"8.	c #40409090D8D8",
+"9.	c #B0B0D0D0B8B8",
+"0.	c #E8E8F0F0A0A0",
+"q.	c #C8C8E0E0B0B0",
+"w.	c #9898C8C8C8C8",
+"e.	c #9090C8C8C8C8",
+"r.	c #B0B0D0D0D8D8",
+"t.	c #6868B0B0D8D8",
+"y.	c #B0B0D8D8F0F0",
+"u.	c #A8A8D0D0E8E8",
+"i.	c #38386868B8B8",
+"p.	c #A8A8C0C0E0E0",
+"a.	c #60609090C8C8",
+"s.	c #8080B0B0D8D8",
+"d.	c #38389090D8D8",
+"f.	c #A8A8D0D0B8B8",
+"g.	c #F0F0F8F89898",
+"h.	c #8888C0C0E0E0",
+"j.	c #B8B8D8D8F0F0",
+"k.	c #6868B0B0E0E0",
+"l.	c #7878B0B0E0E0",
+"z.	c #08084848A8A8",
+"x.	c #28286060B8B8",
+"c.	c #8080B0B0E0E0",
+"v.	c #30308888D0D0",
+"b.	c #6868B0B0C8C8",
+"n.	c #A0A0C8C8E0E0",
+"m.	c #B0B0D8D8E8E8",
+"M.	c #5858A8A8D8D8",
+"N.	c #6868A8A8E0E0",
+"B.	c #08083838A0A0",
+"V.	c #68689898D0D0",
+"C.	c #C0C0D8D8F0F0",
+"Z.	c #7070A8A8E0E0",
+"A.	c #50509898D8D8",
+"S.	c #8080B8B8E0E0",
+"D.	c #9898C0C0E8E8",
+"F.	c #C0C0E0E0F0F0",
+"G.	c #D8D8E8E8F8F8",
+"H.	c #9090C0C0E8E8",
+"J.	c #6868A8A8D8D8",
+"K.	c #28287878C8C8",
+"L.	c #30308080C8C8",
+"P.	c #50509898C8C8",
+"I.	c #6868A8A8C0C0",
+"U.	c #6060A8A8C8C8",
+"Y.	c #7878B8B8E0E0",
+"T.	c #50508888C8C8",
+"R.	c #28287070C0C0",
+"E.	c #40408888C8C8",
+"W.	c #8080B0B0B8B8",
+"Q.	c #9090C0C0B8B8",
+"!.	c #5858A0A0C8C8",
+"~.	c #30308080D0D0",
+"^.	c #C8C8D0D0E8E8",
+"/.	c #50507878B8B8",
+"(.	c #38387070C0C0",
+").	c #48488888C0C0",
+"_.	c #8888B8B8B0B0",
+"`.	c #9090C0C0B0B0",
+"'.	c #6868A0A0C0C0",
+"].	c #7878A0A0D8D8",
+"[.	c #E8E8E8E8F0F0",
+"{.	c #80809898C8C8",
+"}.	c #70709090C8C8",
+"|.	c #48488080C8C8",
+" X	c #30307878B8B8",
+".X	c #7070A0A0B0B0",
+"XX	c #8888B0B0B0B0",
+"oX	c #8080B0B0B0B0",
+"OX	c #58589898D8D8",
+"+X	c #30307878C8C8",
+"@X	c #8080A8A8D8D8",
+"#X	c #B8B8C8C8E0E0",
+"$X	c #C8C8D8D8E8E8",
+"%X	c #9090A8A8D0D0",
+"&X	c #A0A0B0B0D8D8",
+"*X	c #58588080C0C0",
+"=X	c #20205858B0B0",
+"-X	c #8080A0A0D0D0",
+";X	c #68689090C8C8",
+":X	c #48488080B8B8",
+">X	c #38387878B8B8",
+",X	c #8888B0B0E0E0",
+"<X	c #70709898D0D0",
+"1X	c #68688888C0C0",
+"2X	c #10104040A0A0",
+"3X	c #48487878C0C0",
+"4X	c #20206060B0B0",
+"5X	c #28286868C0C0",
+"6X	c #A0A0B8B8E0E0",
+"7X	c #28286060B0B0",
+"8X	c #000038389898",
+"9X	c #18184848A8A8",
+"0X	c #A0A0B8B8D8D8",
+"qX	c #B0B0C8C8E0E0",
+"wX	c #58588888C8C8",
+"eX	c #9090A8A8D8D8",
+"rX	c #9090B0B0D8D8",
+"tX	c #48487070B8B8",
+"yX	c #30306060B8B8",
+"uX	c #60608888C8C8",
+"iX	c #18185050A8A8",
+"pX	c #00003838A0A0",
+"                                                                ",
+"                                                                ",
+"                                                      .         ",
+"                  X   o O O X +                                 ",
+"                  @ # $ % & * = - ; : >                         ",
+"            X , < 1 2 3 & 4 = 5 6 7 : 8 8 >                     ",
+"          o 9 0 q w e r t = - 6 y 8 u > i y p                   ",
+"        @ a s d f g 3 * 4 h j k l z x + p z c v                 ",
+"      X b n m M N B V C Z - A S u D       F G H J               ",
+"      K L P q I U V 3 3 Y T R > D       E W G H 6 K             ",
+"    X Q ! ~ q ^ / 3 ( ) = _ A S ` ' + ] D W G H _ [             ",
+"    X { } m |  ...3 X.) = - 6 o.O.W +.+.x @.o.#.- Z   K         ",
+"    X $.n m |  .%.&.X.*.=.h _ -.;.:.>.>.F ,.H <.h Z 1.          ",
+"    X 2.3.4.|  .5.6.7.8.( = - 9.0.q.w.e.c r.<.- t.y.u.          ",
+"    X } i.p.a.w s.% 7.d.*.=.h f.g.q.#.#.[ [ - h.j.k.l.          ",
+"    X } z.x.N N $ c.v.X.8.( =.h <.b.- - n.Y ; m.M.*.N.          ",
+"    X B.z.m q V.C.B 3 Z.A.( *.( M.Z h.m.R B S.( *.8.Z O         ",
+"    X B.z.~ q | 5.&.C D.j.F.G.G.T F.u.S.; H.*.*.d.d.J.O         ",
+"    X } } P m | V.N K.L.v.P.I.U.*.*.*.*.3 Y.d.d.7.v.s.O         ",
+"    X { } z.~ q T.N R.K.E.W.Q.Q.!.d.d.d.3 N.7.v.~.K.^.          ",
+"    X a /.} z.~ (.N U w )._._.`.'.v.v.8.3 A.L.K.R.].[.          ",
+"      X {.}.P z.q 3.|.^  X.XXXoX).K.K.OX&.+XR.R. at X#X            ",
+"      $X%X/.&X*X=X-X;Xq | 1 :X>XR.w w %.,XU V.$ <X,             ",
+"        K 1X2X< 3.3.#X3X4XI | | ^ 5XT.V 6XN -X7X#XK             ",
+"            { 8X9X/.b 0X0X6Xa qX6X6Xp.$XwX=Xq 0X                ",
+"              eX! 8XL %X} z.z.P P P rXtX} yX^.                  ",
+"              O o uXiX}.{ 8XpX} } 1X}.7XeX  O                   ",
+"                    o qXp.# 0 0 eXqX^.K                         ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/share/metview/icons/RETRIEVE.xpm b/share/metview/icons/RETRIEVE.xpm
new file mode 100644
index 0000000..9afb8c7
--- /dev/null
+++ b/share/metview/icons/RETRIEVE.xpm
@@ -0,0 +1,45 @@
+/* XPM */
+static char * RETRIEVE_icon[] = {
+"32 32 10 1",
+" 	c #FFFFFFFFFFFF",
+".	c #555555555555",
+"X	c #B2B2B2B2B2B2",
+"o	c #25250000FFFF",
+"O	c #000000000000",
+"+	c #0000FFFFFFFF",
+"@	c #000073734B4B",
+"#	c #6C6CA6A63131",
+"$	c #00008C8C3030",
+"%	c #999915150707",
+"                                ",
+"             .......            ",
+"          ...XXXXXXX...         ",
+"        ..XXXX     XXXX..       ",
+"       .XX             XX.      ",
+"      .X                 X.     ",
+"     .X                   X.    ",
+"    .X                     X.   ",
+"   .X                       X.  ",
+"   .X                       X.  ",
+"  .X                         X. ",
+"  .X          ooooo          X. ",
+"  .X         ooooooo         X. ",
+" .XX        ooo   ooo         X.",
+" .X  X.OOOO.Xo     ooo        X.",
+" .X .O++@@@+O.      oo        X.",
+" .XO+@# + @++ at O     oo        X.",
+" .O at +#$ + $+ @@O    oo        X.",
+" .@#$ $$  + $@@@.  ooo        X.",
+"XO@#$$$ $$  $@@@OXooo         X.",
+".+@#$$ $$$+ +$+ +.oo         X. ",
+"O+@#$$$$+   ++@@@Oo          X. ",
+"O+@#$$$$  + +#@@@O           X. ",
+"O+@#$$$$+   +#@@@O          X.  ",
+"O++ $$$ $$+ +@@@@O          X.  ",
+".+++ $$ +  + +@@@.         X.   ",
+"XO+ + $$$$$ + ++OX        X.    ",
+" .++ +@@@@@+ +++.        X.     ",
+"  O++ +@@@+++++O       XX.      ",
+"   O++ @@@++++O     XXX..%%%%%%%",
+"    .O+@@@++O.XXXXXX...%%%%%%%%%",
+"     X.OOOO.X.......            "};
diff --git a/share/metview/icons/RETRIEVE_TIGGE.xpm b/share/metview/icons/RETRIEVE_TIGGE.xpm
new file mode 100644
index 0000000..279db9f
--- /dev/null
+++ b/share/metview/icons/RETRIEVE_TIGGE.xpm
@@ -0,0 +1,172 @@
+/* XPM */
+static char *RETRIEVE_TIGGE[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 134 2",
+"   c black",
+".  c #0C0C0C",
+"X  c #0E0E0E",
+"o  c #121213",
+"O  c gray8",
+"+  c #151515",
+"@  c #161616",
+"#  c #1A1B1C",
+"$  c #1D1D1F",
+"%  c gray12",
+"&  c #212123",
+"*  c #282828",
+"=  c #292A2C",
+"-  c #2A2B2D",
+";  c #2C2D2F",
+":  c gray19",
+">  c #313131",
+",  c #323336",
+"<  c #353639",
+"1  c #393939",
+"2  c #393A3D",
+"3  c #3E3E3E",
+"4  c #00734B",
+"5  c gray28",
+"6  c #444548",
+"7  c #484848",
+"8  c #494949",
+"9  c #4B4B4B",
+"0  c #494B4E",
+"q  c #4A4C4F",
+"w  c #4F5154",
+"e  c #505050",
+"r  c #555555",
+"t  c #55565A",
+"y  c gray36",
+"u  c #5D5D5D",
+"i  c #5F5F5F",
+"p  c #5D5F63",
+"a  c #5E6064",
+"s  c #5F6165",
+"d  c #626262",
+"f  c gray39",
+"g  c gray40",
+"h  c #64666B",
+"j  c #686868",
+"k  c DimGray",
+"l  c #6E7075",
+"z  c #727272",
+"x  c #707277",
+"c  c #72757A",
+"v  c #73767B",
+"b  c #76797E",
+"n  c #797979",
+"m  c gray49",
+"M  c #7F7F7F",
+"N  c #991507",
+"B  c #008C30",
+"V  c #6CA631",
+"C  c #7B7D83",
+"Z  c #2500FF",
+"A  c #846FFF",
+"S  c cyan",
+"D  c #838383",
+"F  c gray53",
+"G  c #85888E",
+"H  c #8E8E8E",
+"J  c gray56",
+"K  c #878A90",
+"L  c #8C8F96",
+"P  c #8E9198",
+"I  c gray57",
+"U  c #929292",
+"Y  c gray62",
+"T  c #9F9F9F",
+"R  c #9699A0",
+"E  c #979BA2",
+"W  c #9C9FA7",
+"Q  c #9DA0A8",
+"!  c #9EA1A9",
+"~  c gray63",
+"^  c gray64",
+"/  c #A4A4A4",
+"(  c #A3A6AE",
+")  c #A4A7AF",
+"_  c gray67",
+"`  c gray68",
+"'  c #A6AAB2",
+"]  c #A8ACB4",
+"[  c #AAAEB6",
+"{  c #B2B2B2",
+"}  c #B7B7B7",
+"|  c #B0B3BC",
+" . c #B5B9C1",
+".. c #B8BCC4",
+"X. c #BABEC6",
+"o. c #B5A9FF",
+"O. c #C0C0C0",
+"+. c #C5C5C5",
+"@. c #C6C6C6",
+"#. c #C0C4CD",
+"$. c #C1C5CE",
+"%. c #CDCDCD",
+"&. c #C8CCD5",
+"*. c #CCD0D9",
+"=. c #CCD1DA",
+"-. c LightGray",
+";. c gray83",
+":. c gray84",
+">. c #D0D5DE",
+",. c gray85",
+"<. c #D4D8E2",
+"1. c #CBD9F8",
+"2. c #DBE0EA",
+"3. c #DEE3ED",
+"4. c #E1E1E1",
+"5. c #E2E2E2",
+"6. c #E4E4E4",
+"7. c gray90",
+"8. c #E7E7E7",
+"9. c gray91",
+"0. c #EFEFEF",
+"q. c #E1E6F0",
+"w. c #E2E7F1",
+"e. c #E3E8F2",
+"r. c #E5E9F4",
+"t. c #E7ECF7",
+"y. c #E2EAFB",
+"u. c #EAEFFA",
+"i. c #EBF0FB",
+"p. c #EDF2FD",
+"a. c gray95",
+"s. c #FDFDFD",
+"d. c #FEFEFE",
+"f. c gray100",
+/* pixels */
+"f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.",
+"f.f.f.f.f.f.f.f.f.f.f.f.f. at .+.@. at .@. at .@.f.f.d.f.f.f.f.f.f.f.f.f.",
+"f.:.% % % % % 8 O.g @. at .Y > X O y ,.7.4.u @ . : { f.` % % % % 5.",
+"f.s.0.0.9 _ 0.a.H 3 7.%.+ ^ i.q.C &.p.j 5 -.6.~ f f.~ i 0.0.0.s.",
+"f.f.f.f.e } f. at ./ 7 p.x v p.p.p.p.p.e.o 2.p.p.7.7. at .~ g f.f.f.f.",
+"f.f.f.f.e } @.7.[ q p.6 ] p.p.p.p.p.#.; p.p.p.p.p.7.m 1 J J U f.",
+"f.f.f.f.e H 7.p.[ q p.,  .p.>.$ $ ( | 2 p.p.l $ < p.I * M M D f.",
+"f.f.f.f.3 / p.p.[ q p.w ! p.i.3.a E =.& p.p.r.<.# p.R y @.f.f.f.",
+"f.f.f. at .7 [ p.p.[ q p.P 0 p.p.p.h E u.& X.p.p.w.# p.R s 7. at .f.f.",
+"f.f.f. at .7 [ p.p.[ q p.t., t Q R = ' p.) # K ( c - p.R , n k F 9.",
+"f.f. at .7.W *.p.p.*.W p.p.t.L a l ..p.p.p.#.c p G w.p.$.b b z d 8.",
+"f.f. at .7.p.p.p.p.p.p.p.p.p.p.o.o.o.o.o.p.p.p.p.p.p.p.p.p.p.7.@.f.",
+"f.f.T ;.y.y.y.y.y.y.y.y.y.A A A A A A A y.y.y.y.y.y.y.y.y.;.T f.",
+"f.r { { 1.1.1.1.1.1.1.1.Z Z Z f.f.f.Z Z Z 1.1.1.1.1.1.1.1.1.{ r ",
+"f.r { 1.1.{ r         r { Z f.f.f.f.f.Z Z Z 1.1.1.1.1.1.1.1.{ r ",
+"f.r { 1.r   S S 4 4 4 S   r f.f.f.f.f.f.Z Z 1.1.1.1.1.1.1.1.{ r ",
+"f.r {   S 4 V f.S f.4 S S 4   f.f.f.f.f.Z Z 1.1.1.1.1.1.1.1.{ r ",
+"f.r   4 S V B f.S f.B S f.4 4   f.f.f.f.Z Z 1.1.1.1.1.1.1.1.{ r ",
+"f.r 4 V B f.B B f.f.S f.B 4 4 4 r f.f.Z Z Z 1.1.1.1.1.1.1.1.{ r ",
+"{   4 V B B B f.B B f.f.B 4 4 4   { Z Z Z 1.1.1.1.1.1.1.1.1.{ r ",
+"r S 4 V B B f.B B B S f.S B S f.S r Z Z 1.1.1.1.1.1.1.1.1.{ r f.",
+"  S 4 V B B B B S f.f.f.S S 4 4 4   Z 1.1.1.1.1.1.1.1.1.1.{ r f.",
+"  S 4 V B B B B f.f.S f.S V 4 4 4   1.1.1.1.1.1.1.1.1.1.1.{ r f.",
+"  S 4 V B B B B S f.f.f.S V 4 4 4   1.1.1.1.1.1.1.1.1.1.{ r f.f.",
+"  S S f.B B B f.B B S f.S 4 4 4 4   1.1.1.1.1.1.1.1.1.1.{ r f.f.",
+"r S S S f.B B f.S f.f.S f.S 4 4 4 r 1.1.1.1.1.1.1.1.1.{ r f.f.f.",
+"{   S f.S f.B B B B B f.S f.S S   { 1.1.1.1.1.1.1.1.{ r f.f.f.f.",
+"f.r S S f.S 4 4 4 4 4 S f.S S S r 1.1.1.1.1.1.1.1.{ r f.f.f.f.f.",
+"f.f.  S S f.S 4 4 4 S S S S S   1.1.1.1.1.1.1.{ { r f.f.f.f.f.f.",
+"f.f.f.  S S f.4 4 4 S S S S   1.1.1.1.1.{ { { r r N N N N N N N ",
+"f.f.f.f.r   S 4 4 4 S S   r { { { { { { r r r N N N N N N N N N ",
+"f.f.f.f.f.{ r         r { r r r r r r r f.f.f.f.f.f.f.f.f.f.f.f."
+};
diff --git a/share/metview/icons/SCM_INPUT_DATA.xpm b/share/metview/icons/SCM_INPUT_DATA.xpm
new file mode 100644
index 0000000..ff19498
--- /dev/null
+++ b/share/metview/icons/SCM_INPUT_DATA.xpm
@@ -0,0 +1,230 @@
+/* XPM */
+static char *SCM_INPUT_DATA[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 192 2",
+"   c #213F46",
+".  c #324D55",
+"X  c #355057",
+"o  c #38525A",
+"O  c #38535A",
+"+  c #3D575D",
+"@  c #215C6B",
+"#  c #2B6472",
+"$  c #2D6573",
+"%  c #326977",
+"&  c #356B78",
+"*  c #376C7A",
+"=  c #465E65",
+"-  c #656060",
+";  c #797474",
+":  c #7D7878",
+">  c #7F7B7B",
+",  c #827D7D",
+"<  c #457783",
+"1  c #135DCD",
+"2  c #0055D4",
+"3  c #0F5FD7",
+"4  c #2D69C3",
+"5  c #2063C8",
+"6  c #326DC4",
+"7  c #246CD8",
+"8  c #266DD8",
+"9  c #286FD8",
+"0  c #2B71D9",
+"q  c #0066FF",
+"w  c #146FF9",
+"e  c #1D77FE",
+"r  c #2673E4",
+"t  c #2276F4",
+"y  c #2079FF",
+"u  c #247BFD",
+"i  c #2B7FFD",
+"p  c #2A7FFF",
+"a  c #307DF0",
+"s  c #53818C",
+"d  c #6A929C",
+"f  c #6E959F",
+"g  c #7C9FA8",
+"h  c #7EA1A9",
+"j  c #3B86F6",
+"k  c #3685FC",
+"l  c #3C8AFF",
+"z  c #4280DC",
+"x  c #5287D6",
+"c  c #5287D7",
+"v  c #5288D6",
+"b  c #6090D8",
+"n  c #5C95EB",
+"m  c #478EFA",
+"M  c #4F92F6",
+"N  c #4891FF",
+"B  c #4991FF",
+"V  c #4A92FF",
+"C  c #5497FD",
+"Z  c #5598FB",
+"A  c #5699FF",
+"S  c #71A0E7",
+"D  c #61A0FF",
+"F  c #6AA6FF",
+"G  c #6CA6FE",
+"H  c #75A7F2",
+"J  c #848080",
+"K  c #888484",
+"L  c #8B8787",
+"P  c #8D8A8A",
+"I  c #8E8B8B",
+"U  c #908C8C",
+"Y  c #928F8F",
+"T  c #829F99",
+"R  c #939090",
+"E  c #959191",
+"W  c #9A9696",
+"Q  c #9D9898",
+"!  c #9F9B9B",
+"~  c #A09C9C",
+"^  c #A29E9E",
+"/  c #87A39E",
+"(  c #8F9EA2",
+")  c #8BA7A1",
+"_  c #8CA7A2",
+"`  c #8FAAA5",
+"'  c #97A5A8",
+"]  c #92AFB6",
+"[  c #93B0B7",
+"{  c #A6A2A2",
+"}  c #AAA7A7",
+"|  c #ADAAAA",
+" . c #A1B7B2",
+".. c #A6BBB6",
+"X. c #A7BCB8",
+"o. c #A8BCB8",
+"O. c #A8BCB9",
+"+. c #AABEB9",
+"@. c #B3B1B1",
+"#. c #B5B3B3",
+"$. c #B6B4B4",
+"%. c #B9B7B7",
+"&. c #BDBCBC",
+"*. c #ACC0BC",
+"=. c #87AADE",
+"-. c #89ABDF",
+";. c #8AACDF",
+":. c #97B9EA",
+">. c #99B9E8",
+",. c #99BAEC",
+"<. c #9FBFEF",
+"1. c #8BB4F3",
+"2. c #8EB7F6",
+"3. c #A3BEE6",
+"4. c #A2BFEB",
+"5. c #B4C5C2",
+"6. c #B9C9C6",
+"7. c #B9CAC6",
+"8. c #BECCC9",
+"9. c #B4CAEA",
+"0. c #A7CAFF",
+"q. c #ABCBFA",
+"w. c #B0CAF2",
+"e. c #B1D0FF",
+"r. c #B3D1FF",
+"t. c #B8D4FF",
+"y. c #B9D5FF",
+"u. c #C2C0C0",
+"i. c #C5C3C3",
+"p. c #C6C3C3",
+"a. c #C7C4C4",
+"s. c #C9C7C7",
+"d. c #CBC9C9",
+"f. c #CDCBCB",
+"g. c #CECCCC",
+"h. c #C5D2D0",
+"j. c #C0D1D5",
+"k. c #CAD6D4",
+"l. c #C7D6D9",
+"z. c #D4D2D2",
+"x. c #D7D6D6",
+"c. c #D0DCD9",
+"v. c #D9D8D8",
+"b. c #DAD8D8",
+"n. c #DBD9D9",
+"m. c #DCDADA",
+"M. c #DEDDDD",
+"N. c #C2D4EE",
+"B. c #D2DEE1",
+"V. c #C6D7F0",
+"C. c #D2DFF3",
+"Z. c #D9E1E0",
+"A. c #D9E2E0",
+"S. c #DBE4E2",
+"D. c #DDE5E3",
+"F. c #DFE6E4",
+"G. c #D4E4FD",
+"H. c #DDE8F9",
+"J. c #E2E0E0",
+"K. c #E4E3E3",
+"L. c #E1E7E6",
+"P. c #E5E4E4",
+"I. c #E7E7E7",
+"U. c #E1E8E6",
+"Y. c #E4EAEA",
+"T. c #E5EBEB",
+"R. c #E7EDEB",
+"E. c #E8E8E8",
+"W. c #E8EEEC",
+"Q. c #E9EFED",
+"!. c #EDEDED",
+"~. c #EEEEEE",
+"^. c #EBF0EF",
+"/. c #E6EDF8",
+"(. c #EDF2F1",
+"). c #E9F1FB",
+"_. c #F3F3F3",
+"`. c #F1F4F4",
+"'. c #F3F6F6",
+"]. c #F7F6F6",
+"[. c #F0F4FB",
+"{. c #F3F7FC",
+"}. c #F6F8F8",
+"|. c #F7F9F9",
+" X c #F4F8FD",
+".X c #F9F9F9",
+"XX c #F9FAFA",
+"oX c #FAFBFB",
+"OX c #FBFCFB",
+"+X c #FBFCFC",
+"@X c #FDFCFC",
+"#X c #FFFFFF",
+/* pixels */
+"#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"#X/.N.3.9.C.[.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"2.>.;.=.=.=.-.,.G.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"N l C 1.:.H k p y.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"N l N A F p p p y.#X#X#XXX#X X X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"N l N A F p p p t.#X#X#X( s s ; ' #Xl.d d d f W.XX*.......7.#X#X",
+"N l N A F p p p t.#XXX.X. .     o #Xg @ @ @ # j.^.) T T T ) #X#X",
+"N l N A F p p p t. at X@X_.. .     o #Xg @ @ @ $ j.^.) T T T ) #X#X",
+"N l N A F p p p r.#X#X#X. .     o #Xg @ @ @ $ j.^./ / T T ) #X#X",
+"N l N A F p p p r.#X#X#X+ . . . = #X] $ % & $ B.'./ ) / / ` #X#X",
+"N l N A F p i i r.#X#X#X#X].XXXX at X#X#X#X#X#X at X@X#X#XXXOXXX#X#X#X",
+"p C G D F N A y 0.#X#X#Xd < < < [ #XA.5.6.*.*.E.#XQ.L.U.U.^.#X#X",
+"u w t a Z q q q 0.#X#X#X& @ @ @ s #X8. . . . .c.#XF.S.S.S.L.#X#X",
+"u w t a m q q q 0.#X#X#X& @ @ @ s #X8. . . . .c.#XL.S.S.S.L.#X#X",
+"u w t a m q q q 0.#X#X#X& @ @ @ s #X8. .[ ..[ c.#XL.S.S.S.F.#X#X",
+"u w t a m q q q 0.#X#X#Xs & * * h #Xk...+.+.+.A.#XR.F.F.F.R.#X#X",
+"u w t a m q q q 0.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#XXX|.|.XXXX#X#X",
+"u w t a m q q q 0.#X#XXX..O.X...+.#X`.D.D.D.D.#X#XT.D.T.T.D.#X#X",
+"u w t a m q q q 0.#X#X}.O. . . ...#X(.S.S.S.F.XX#XY.D.T.F.L.#X#X",
+"M u t a m q q e q.#X#X}.+. . . .+.#X(.S.S.S.F.XX#XT.L.F.F.F.#X#X",
+"7 1 z n M j r 2 4.#X#X}.o. . . .X.#X(.A.D.S.D.XX#XY.D.L.T.U.#X#X",
+"8 1 5 4 c 2 2 2 <.#X#X+X8.6.7.7.h.#X}.Q.W.Q.Q.#X#X|.].`.(.).#X#X",
+"8 1 5 4 c 2 2 2 <.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"8 1 5 4 c 2 2 2 <.#X#X#X#X#X#X#X#Xf.#Xn.L I I.i., J %.#XE K K v.",
+"9 1 5 4 c 2 2 2 <.#XM.s.!.#Xb.K.].; E.> @X_.} $.x.#XI K.I #X#X#X",
+"9 1 5 4 c 2 2 2 <.#X- g.I f.| ! M.J m.^ #X#X#X$.x.#Xi.&.> W W #X",
+"0 1 5 4 c 2 2 2 <.#XI #XY W E Y s.R _.E #X#Xm.#.x.#Xi.i.L !.W.#X",
+"0 1 5 4 c 2 2 2 w.#XR #XY &.s.f.m.U XX, K.d.! #.i.M.; _.I #X#X#X",
+").4.b 6 c 3 S H.#X#Xs.#Xa.#X%. at .#Xa.z.!.{ #.XXb.~ { J.#Xi.#X#X#X",
+"#X#X#X[.N.XX#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X"
+};
diff --git a/share/metview/icons/SCM_OUTPUT_DATA.xpm b/share/metview/icons/SCM_OUTPUT_DATA.xpm
new file mode 100644
index 0000000..cae1cfc
--- /dev/null
+++ b/share/metview/icons/SCM_OUTPUT_DATA.xpm
@@ -0,0 +1,230 @@
+/* XPM */
+static char *SCM_OUTPUT_DATA[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 192 2",
+"   c #213F46",
+".  c #324D55",
+"X  c #355057",
+"o  c #38525A",
+"O  c #38535A",
+"+  c #3D575D",
+"@  c #215C6B",
+"#  c #2B6472",
+"$  c #2D6573",
+"%  c #326977",
+"&  c #356B78",
+"*  c #376C7A",
+"=  c #465E65",
+"-  c #656060",
+";  c #797474",
+":  c #7D7878",
+">  c #7F7B7B",
+",  c #827D7D",
+"<  c #457783",
+"1  c #135DCD",
+"2  c #0055D4",
+"3  c #0F5FD7",
+"4  c #2D69C3",
+"5  c #2063C8",
+"6  c #326DC4",
+"7  c #246CD8",
+"8  c #266DD8",
+"9  c #286FD8",
+"0  c #2B71D9",
+"q  c #0066FF",
+"w  c #146FF9",
+"e  c #1D77FE",
+"r  c #2673E4",
+"t  c #2276F4",
+"y  c #2079FF",
+"u  c #247BFD",
+"i  c #2B7FFD",
+"p  c #2A7FFF",
+"a  c #307DF0",
+"s  c #53818C",
+"d  c #6A929C",
+"f  c #6E959F",
+"g  c #7C9FA8",
+"h  c #7EA1A9",
+"j  c #3B86F6",
+"k  c #3685FC",
+"l  c #3C8AFF",
+"z  c #4280DC",
+"x  c #5287D6",
+"c  c #5287D7",
+"v  c #5288D6",
+"b  c #6090D8",
+"n  c #5C95EB",
+"m  c #478EFA",
+"M  c #4F92F6",
+"N  c #4891FF",
+"B  c #4991FF",
+"V  c #4A92FF",
+"C  c #5497FD",
+"Z  c #5598FB",
+"A  c #5699FF",
+"S  c #71A0E7",
+"D  c #61A0FF",
+"F  c #6AA6FF",
+"G  c #6CA6FE",
+"H  c #75A7F2",
+"J  c #848080",
+"K  c #888484",
+"L  c #8B8787",
+"P  c #8D8A8A",
+"I  c #8E8B8B",
+"U  c #908C8C",
+"Y  c #928F8F",
+"T  c #829F99",
+"R  c #939090",
+"E  c #959191",
+"W  c #9A9696",
+"Q  c #9D9898",
+"!  c #9F9B9B",
+"~  c #A09C9C",
+"^  c #A29E9E",
+"/  c #87A39E",
+"(  c #8F9EA2",
+")  c #8BA7A1",
+"_  c #8CA7A2",
+"`  c #8FAAA5",
+"'  c #97A5A8",
+"]  c #92AFB6",
+"[  c #93B0B7",
+"{  c #A6A2A2",
+"}  c #AAA7A7",
+"|  c #ADAAAA",
+" . c #A1B7B2",
+".. c #A6BBB6",
+"X. c #A7BCB8",
+"o. c #A8BCB8",
+"O. c #A8BCB9",
+"+. c #AABEB9",
+"@. c #B3B1B1",
+"#. c #B5B3B3",
+"$. c #B6B4B4",
+"%. c #B9B7B7",
+"&. c #BDBCBC",
+"*. c #ACC0BC",
+"=. c #87AADE",
+"-. c #89ABDF",
+";. c #8AACDF",
+":. c #97B9EA",
+">. c #99B9E8",
+",. c #99BAEC",
+"<. c #9FBFEF",
+"1. c #8BB4F3",
+"2. c #8EB7F6",
+"3. c #A3BEE6",
+"4. c #A2BFEB",
+"5. c #B4C5C2",
+"6. c #B9C9C6",
+"7. c #B9CAC6",
+"8. c #BECCC9",
+"9. c #B4CAEA",
+"0. c #A7CAFF",
+"q. c #ABCBFA",
+"w. c #B0CAF2",
+"e. c #B1D0FF",
+"r. c #B3D1FF",
+"t. c #B8D4FF",
+"y. c #B9D5FF",
+"u. c #C2C0C0",
+"i. c #C5C3C3",
+"p. c #C6C3C3",
+"a. c #C7C4C4",
+"s. c #C9C7C7",
+"d. c #CBC9C9",
+"f. c #CDCBCB",
+"g. c #CECCCC",
+"h. c #C5D2D0",
+"j. c #C0D1D5",
+"k. c #CAD6D4",
+"l. c #C7D6D9",
+"z. c #D4D2D2",
+"x. c #D7D6D6",
+"c. c #D0DCD9",
+"v. c #D9D8D8",
+"b. c #DAD8D8",
+"n. c #DBD9D9",
+"m. c #DCDADA",
+"M. c #DEDDDD",
+"N. c #C2D4EE",
+"B. c #D2DEE1",
+"V. c #C6D7F0",
+"C. c #D2DFF3",
+"Z. c #D9E1E0",
+"A. c #D9E2E0",
+"S. c #DBE4E2",
+"D. c #DDE5E3",
+"F. c #DFE6E4",
+"G. c #D4E4FD",
+"H. c #DDE8F9",
+"J. c #E2E0E0",
+"K. c #E4E3E3",
+"L. c #E1E7E6",
+"P. c #E5E4E4",
+"I. c #E7E7E7",
+"U. c #E1E8E6",
+"Y. c #E4EAEA",
+"T. c #E5EBEB",
+"R. c #E7EDEB",
+"E. c #E8E8E8",
+"W. c #E8EEEC",
+"Q. c #E9EFED",
+"!. c #EDEDED",
+"~. c #EEEEEE",
+"^. c #EBF0EF",
+"/. c #E6EDF8",
+"(. c #EDF2F1",
+"). c #E9F1FB",
+"_. c #F3F3F3",
+"`. c #F1F4F4",
+"'. c #F3F6F6",
+"]. c #F7F6F6",
+"[. c #F0F4FB",
+"{. c #F3F7FC",
+"}. c #F6F8F8",
+"|. c #F7F9F9",
+" X c #F4F8FD",
+".X c #F9F9F9",
+"XX c #F9FAFA",
+"oX c #FAFBFB",
+"OX c #FBFCFB",
+"+X c #FBFCFC",
+"@X c #FDFCFC",
+"#X c #FFFFFF",
+/* pixels */
+"#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"#X/.N.3.9.C.[.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"2.>.;.=.=.=.-.,.G.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"N l C 1.:.H k p y.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"N l N A F p p p y.#X#X#XXX#X X X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"N l N A F p p p t.#X#X#X( s s ; ' #Xl.d d d f W.XX*.......7.#X#X",
+"N l N A F p p p t.#XXX.X. .     o #Xg @ @ @ # j.^.) T T T ) #X#X",
+"N l N A F p p p t. at X@X_.. .     o #Xg @ @ @ $ j.^.) T T T ) #X#X",
+"N l N A F p p p r.#X#X#X. .     o #Xg @ @ @ $ j.^./ / T T ) #X#X",
+"N l N A F p p p r.#X#X#X+ . . . = #X] $ % & $ B.'./ ) / / ` #X#X",
+"N l N A F p i i r.#X#X#X#X].XXXX at X#X#X#X#X#X at X@X#X#XXXOXXX#X#X#X",
+"p C G D F N A y 0.#X#X#Xd < < < [ #XA.5.6.*.*.E.#XQ.L.U.U.^.#X#X",
+"u w t a Z q q q 0.#X#X#X& @ @ @ s #X8. . . . .c.#XF.S.S.S.L.#X#X",
+"u w t a m q q q 0.#X#X#X& @ @ @ s #X8. . . . .c.#XL.S.S.S.L.#X#X",
+"u w t a m q q q 0.#X#X#X& @ @ @ s #X8. .[ ..[ c.#XL.S.S.S.F.#X#X",
+"u w t a m q q q 0.#X#X#Xs & * * h #Xk...+.+.+.A.#XR.F.F.F.R.#X#X",
+"u w t a m q q q 0.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#XXX|.|.XXXX#X#X",
+"u w t a m q q q 0.#X#XXX..O.X...+.#X`.D.D.D.D.#X#XT.D.T.T.D.#X#X",
+"u w t a m q q q 0.#X#X}.O. . . ...#X(.S.S.S.F.XX#XY.D.T.F.L.#X#X",
+"M u t a m q q e q.#X#X}.+. . . .+.#X(.S.S.S.F.XX#XT.L.F.F.F.#X#X",
+"7 1 z n M j r 2 4.#X#X}.o. . . .X.#X(.A.D.S.D.XX#XY.D.L.T.U.#X#X",
+"8 1 5 4 c 2 2 2 <.#X#X+X8.6.7.7.h.#X}.Q.W.Q.Q.#X#X|.].`.(.).#X#X",
+"8 1 5 4 c 2 2 2 <.#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"8 1 5 4 c 2 2 2 <.#X#X#X#X#X#X#X#Xf.#Xn.L I I.i., J %.#XE K K v.",
+"9 1 5 4 c 2 2 2 <.#XM.s.!.#Xb.K.].; E.> @X_.} $.x.#XI K.I #X#X#X",
+"9 1 5 4 c 2 2 2 <.#X- g.I f.| ! M.J m.^ #X#X#X$.x.#Xi.&.> W W #X",
+"0 1 5 4 c 2 2 2 <.#XI #XY W E Y s.R _.E #X#Xm.#.x.#Xi.i.L !.W.#X",
+"0 1 5 4 c 2 2 2 w.#XR #XY &.s.f.m.U XX, K.d.! #.i.M.; _.I #X#X#X",
+").4.b 6 c 3 S H.#X#Xs.#Xa.#X%. at .#Xa.z.!.{ #.XXb.~ { J.#Xi.#X#X#X",
+"#X#X#X[.N.XX#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X",
+"#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X#X"
+};
diff --git a/share/metview/icons/SCM_RUN.xpm b/share/metview/icons/SCM_RUN.xpm
new file mode 100644
index 0000000..fb2ad3a
--- /dev/null
+++ b/share/metview/icons/SCM_RUN.xpm
@@ -0,0 +1,160 @@
+/* XPM */
+static char *SCM_RUN[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 122 2",
+"   c #7B7B7B",
+".  c #49789E",
+"X  c #5478A1",
+"o  c #657EA2",
+"O  c #0C5ACF",
+"+  c #155ECC",
+"@  c #0055D4",
+"#  c #0F5FD7",
+"$  c #1E62C8",
+"%  c #2866C5",
+"&  c #316AC1",
+"*  c #3D74C7",
+"=  c #3771C8",
+"-  c #3975D0",
+";  c #3477DC",
+":  c #3678DC",
+">  c #3B7BDD",
+",  c #1D6BE1",
+"<  c #0066FF",
+"1  c #0D6CFB",
+"2  c #1670F8",
+"3  c #1B74FB",
+"4  c #347FEF",
+"5  c #2075F5",
+"6  c #2A7AF2",
+"7  c #2A7FFF",
+"8  c #4477C7",
+"9  c #4679C5",
+"0  c #4C7CC2",
+"q  c #4F8CA5",
+"w  c #5881A6",
+"e  c #6B82A2",
+"r  c #619AAD",
+"t  c #738CB3",
+"y  c #718EB8",
+"u  c #669DB0",
+"i  c #7391BD",
+"p  c #7892B9",
+"a  c #3881F0",
+"s  c #3384FE",
+"d  c #3E8BFF",
+"f  c #5782C1",
+"g  c #4E82D0",
+"h  c #5084D2",
+"j  c #5A8FDE",
+"k  c #648AC3",
+"l  c #7292C3",
+"z  c #7D9AC5",
+"x  c #6B95D7",
+"c  c #4F8DEA",
+"v  c #568EE3",
+"b  c #5D97EC",
+"n  c #448BF5",
+"m  c #448EFC",
+"M  c #4F93F7",
+"N  c #4790FF",
+"B  c #4992FF",
+"V  c #5498FF",
+"C  c #599BFF",
+"Z  c #6195E3",
+"A  c #69A4FC",
+"S  c #76A9F5",
+"D  c #71AAFE",
+"F  c #7AAEFD",
+"G  c #858585",
+"H  c #8D8D8D",
+"J  c #929292",
+"K  c #9B9B9B",
+"L  c #8B95A5",
+"P  c #8393A9",
+"I  c #959BA3",
+"U  c #929AA8",
+"Y  c #839ABC",
+"T  c #9BA3AE",
+"R  c #99A3B3",
+"E  c #93A2B9",
+"W  c #A2A2A2",
+"Q  c #A2A5AB",
+"!  c #AAAAAA",
+"~  c #A2A7B0",
+"^  c #A6AAB1",
+"/  c #AAACB1",
+"(  c #A2ACB9",
+")  c #B3B3B3",
+"_  c #B0B4B9",
+"`  c #B9B9B9",
+"'  c #92A6C3",
+"]  c #8BB2C2",
+"[  c #98BAC8",
+"{  c #87AADE",
+"}  c #89ABDF",
+"|  c #B7BBC1",
+" . c #95B5E5",
+".. c #9CB9E5",
+"X. c #91B6EC",
+"o. c #94B8EF",
+"O. c #81B1FA",
+"+. c #A2C1EF",
+"@. c #B3C9EA",
+"#. c #BACFEC",
+"$. c #BFD9FF",
+"%. c #C1C1C1",
+"&. c #CDCDCD",
+"*. c #D5D5D5",
+"=. c #DCDCDC",
+"-. c #C5D7F2",
+";. c #C7DAF6",
+":. c #C9D9F0",
+">. c #C5DCFD",
+",. c #C9DEFF",
+"<. c #CDE1FF",
+"1. c #D8E4F4",
+"2. c #D3E3F9",
+"3. c #DEE9F9",
+"4. c #E5E5E5",
+"5. c #EBEBEB",
+"6. c #E1EAF7",
+"7. c #E7EDF8",
+"8. c #EBF1FB",
+"9. c #F5F5F5",
+"0. c #F5F9FD",
+"q. c #FFFFFF",
+/* pixels */
+"q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"q.q.q.q.7.1.8.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"2.#...} { { { } .. at .:.6.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"V m S o...} { }  .X.S m <.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"V s d N B C O.s 7 7 7 7 <.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"V s d N V C D 7 7 7 7 7 <.q.q.q.q.q.q.q.q.q.5.%.%.*.4.9.q.q.q.q.",
+"V d d N B C D 7 7 7 7 7 <.q.q.q.q.q.q.9.&.! K K K W W ! ) %.=.q.",
+"V s d B V C D 7 7 7 7 7 ,.q.q.q.q.=.) H J J K K K W W ! ! ` ) q.",
+"V s m N B C D 7 7 7 7 7 >.q.q.*.W G H J J K K K W W W ) K W ` q.",
+"V s d N V C D s 7 7 7 7 >.q.q.%.! ! ) W K J K K W W J J K W ) q.",
+"V s d N V C D 7 7 7 7 7 >.q.q.| W ! ! ) ) ) ` ` W G G J K W ` q.",
+"A V m N B C D 7 7 7 m B >.q.q.k 0 y R ! ) ) ) ` K   G J K W ` q.",
+"s 1 2 n A F S V N 3 < < $.q.q.' 0 = = 9 f k i Y U   G J K W ` q.",
+"s 1 2 5 4 4 M < < < < < $.q.q.%.! T l w 0 * = = t   G J K W ` q.",
+"s 1 2 3 6 4 M < < < < < $.q.q.z p R / ) ! ) _ ( I   G J K W ` q.",
+"s 1 2 3 6 4 M < < < < < $.q.q.l = = 0 y Y E ( _ W   G H K W ` q.",
+"s 1 2 5 6 4 M < < < < < $.q.q.%.U y 0 * * = = = t   G J K W ` q.",
+"s 1 2 5 6 4 M < < < < < $.q.q.%.! ! ! ^ ~ Y Y l P   G H K W ` q.",
+"s 1 2 5 6 4 M < < < < < $.q.q.%.! ! ! ) / ) ) ` W   G J K W ` q.",
+"s 1 2 3 6 4 M < < < < < $.q.q.| W ! Q Q ) ) ` ) K   G H K W ` q.",
+"c a n 4 6 a M < < 1 s a ;.q.q.%.! L X . e ) ` ` K   G H J W ` q.",
+"- O + $ - j b a , @ @ @ ;.q.q.%.! o ] r . / ) ) W   G H K W ` q.",
+"; O + $ % & h @ @ @ @ @ ;.q.q.%.! o [ u . ~ ) ` K   G H J W %.q.",
+": # + $ % & h @ @ @ @ @ ;.q.q.%.W L X q X ) ` ` W   G H K W %.q.",
+"> O + $ % & g @ @ @ @ @ ;.q.q.%.! ! U e / ) ) ` W   G H J %.q.q.",
+"> O + $ % & g @ @ @ @ @ ;.q.q.%.W ! ! ) ) ) ) ` K   G J =.q.q.q.",
+"> O + $ % & h @ @ @ @ @ ;.q.q.4.%.! ) ! ) ) ) ` W   W 9.q.q.q.q.",
+"> O + % % & g @ @ @ @ @ ;.q.q.q.q.9.=.&.%.` ) ` W %.q.q.q.q.q.q.",
+"Z O + $ % & g @ @ @ @ > 3.q.q.q.q.q.q.q.q.q.q.9.9.q.q.q.q.q.q.q.",
+"q.0.-. .x 8 g # v +.8.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"q.q.q.q.q.q.7.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.",
+"q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q."
+};
diff --git a/share/metview/icons/SCM_VIS.xpm b/share/metview/icons/SCM_VIS.xpm
new file mode 100644
index 0000000..0ff8a03
--- /dev/null
+++ b/share/metview/icons/SCM_VIS.xpm
@@ -0,0 +1,212 @@
+/* XPM */
+static char *SCM_VIS[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 174 2",
+"   c #464F5F",
+".  c #485467",
+"X  c #565C64",
+"o  c #5B616A",
+"O  c #5F6670",
+"+  c #5A677C",
+"@  c #5C697D",
+"#  c #626971",
+"$  c #6F747B",
+"%  c #ED1F2D",
+"&  c #CE2330",
+"*  c #C52934",
+"=  c #DB2935",
+"-  c #D42D38",
+";  c #E92432",
+":  c #E3313E",
+">  c #CB3742",
+",  c #B75259",
+"<  c #AD7379",
+"1  c #B87A7F",
+"2  c #DC4D58",
+"3  c #C7515A",
+"4  c #D5565F",
+"5  c #DA555E",
+"6  c #D85B64",
+"7  c #E15D67",
+"8  c #C8636B",
+"9  c #D56068",
+"0  c #CE757C",
+"q  c #E4656F",
+"w  c #5C6A81",
+"e  c #5D769F",
+"r  c #67758C",
+"t  c #6A778A",
+"y  c #6C7A8F",
+"u  c #707682",
+"i  c #797E85",
+"p  c #707C8F",
+"a  c #6E7B91",
+"s  c #60789F",
+"d  c #707D93",
+"f  c #637BA1",
+"g  c #0C5ACF",
+"h  c #165ECC",
+"j  c #0055D4",
+"k  c #0558D5",
+"l  c #1F62C8",
+"z  c #2866C5",
+"x  c #2265CB",
+"c  c #316AC1",
+"v  c #2C72DA",
+"b  c #3175DB",
+"n  c #3678DC",
+"m  c #0066FF",
+"M  c #076AFF",
+"N  c #0D6CFB",
+"B  c #1771F8",
+"V  c #2572E5",
+"C  c #347FEE",
+"Z  c #2176F5",
+"A  c #2579F5",
+"S  c #2A7AF2",
+"D  c #2278F8",
+"F  c #297EFE",
+"G  c #79818E",
+"H  c #738095",
+"J  c #778398",
+"K  c #788599",
+"L  c #7E8A9D",
+"P  c #6C84AA",
+"I  c #7285A1",
+"U  c #7E8DA4",
+"Y  c #3783F3",
+"T  c #3A85F5",
+"R  c #3586FF",
+"E  c #3F8AFE",
+"W  c #4582DC",
+"Q  c #5285D4",
+"!  c #5888D2",
+"~  c #4F8EED",
+"^  c #5E94E3",
+"/  c #448AF3",
+"(  c #408BFF",
+")  c #4C92FC",
+"_  c #5A96F0",
+"`  c #5196FD",
+"'  c #599BFF",
+"]  c #65A2FF",
+"[  c #7FADF1",
+"{  c #70A9FE",
+"}  c #78ADFE",
+"|  c #868E9C",
+" . c #9B9495",
+".. c #9F999A",
+"X. c #A29697",
+"o. c #A89293",
+"O. c #A39D9E",
+"+. c #808CA0",
+"@. c #8390A4",
+"#. c #8D98A8",
+"$. c #939DAD",
+"%. c #909FB6",
+"&. c #A39EA0",
+"*. c #96A1AF",
+"=. c #9BA4B2",
+"-. c #9FA9B6",
+";. c #A7A3A4",
+":. c #A9A4A6",
+">. c #A2A9B6",
+",. c #A4AEB9",
+"<. c #A6B1BC",
+"1. c #A9B3BD",
+"2. c #B2B2B5",
+"3. c #BCBBBC",
+"4. c #D48E94",
+"5. c #D8979C",
+"6. c #E38C93",
+"7. c #D89CA1",
+"8. c #D2A2A7",
+"9. c #D3A9AD",
+"0. c #DDADB1",
+"q. c #D4B3B7",
+"w. c #87AADE",
+"e. c #88ABDE",
+"r. c #ADB6C0",
+"t. c #A3B3CB",
+"y. c #B4BBC5",
+"u. c #ACBAD0",
+"i. c #93B3E2",
+"p. c #91B5EB",
+"a. c #98B9EC",
+"s. c #82AFF3",
+"d. c #87B4F7",
+"f. c #D7BEC0",
+"g. c #BCC3CD",
+"h. c #BAC5D7",
+"j. c #A9C2E7",
+"k. c #AAC3E8",
+"l. c #B0C9EE",
+"z. c #BFD2EE",
+"x. c #C2C4C4",
+"c. c #C5C7CA",
+"v. c #DEC6C9",
+"b. c #C1C6D0",
+"n. c #C4C9D2",
+"m. c #C9CED6",
+"M. c #C4CDDE",
+"N. c #CBD2D6",
+"B. c #CFD7DA",
+"V. c #DCD0D2",
+"C. c #D3D7D8",
+"Z. c #D9D6D8",
+"A. c #D5DBDC",
+"S. c #DADADC",
+"D. c #C2D4EE",
+"F. c #D8DDE0",
+"G. c #CFDFF7",
+"H. c #C7DDFF",
+"J. c #CCDFFC",
+"K. c #DAE1E2",
+"L. c #CDE1FF",
+"P. c #D5E1F3",
+"I. c #D8E3F5",
+"U. c #D3E5FF",
+"Y. c #DBE7F9",
+"T. c #DDE8F9",
+"R. c #E2E6EC",
+"E. c #E4EAF4",
+"W. c #E0EAF9",
+"Q. c #EDF2FA",
+"!. c #F3F5F7",
+"~. c #F1F5FA",
+"^. c #F7FAFD",
+"/. c #FFFFFF",
+/* pixels */
+"/./././././././././././././././././././././././././././././././.",
+"/./././.~.E.^./././././././././././././././././././././././././.",
+"Y.D.k.i.w.w.w.i.j.z.P.Q././././././././././././././././././././.",
+") ` s.a.i.e.w.w.i.p.[ ` U./././././././././././././././././././.",
+") R E ( ` ] d.E F F F F U./././././././././././././././././././.",
+"` R E ) ` ' { F F F F F U././././.^././././././././././././././.",
+") R E ) ) ' { F F F F F U./.!.b.*.H K -.c.R././././././././././.",
+") R E ) ) ' { F F F F R L./.g.w y d d p a a J $.=.>.,.<.r.y.y.N.",
+"` R E ) ` ' { B R R R B L./.g.1.B.-.K d r y a d d a a a a d d i ",
+") R E ( ` ' { R R B R R L./.g.r.K.K.K.K.c.1.$. at .K J K J J d @ $ ",
+") R E ) ` ' { D B R B R L./.h.1.K.K.K.K.&.K.K.K.K.K.K.K.K.A.+ $ ",
+"] ` E ) ` ' { R R R R ) J./.c.1.K.K.K.K.O.2 5 K.K.K.K.K.K.A.@ $ ",
+"R m A ` { } { ` E R m m H./.n.<.K.K.K.K.3 5 = Z.K.K.K.K.K.F.@ $ ",
+"R N B A S Y ` m m m m m H./.n.<.K.K.K.0.= Z.6 7.K.K.K.K.K.F.@ $ ",
+"B N B B S Y ~ m m m m m H./.n.<.v.6.S.: 1 F.7.9 K.K.f.S.K.F.@ $ ",
+"R N B B S Y ~ m m m m m H./.n.,.V.% q 7 :.A.S.- S.9.* 8.K.K.@ $ ",
+"F N B Z S C ~ m m m m m H./.n.,.x.5 ; V.:.A.K.4 4.> 0 8 K.K.@ $ ",
+"F N B Z S Y ) m m m m m H./.m.,.K.3.X.;. .C.K.5.& 4.K.* S.K.@ $ ",
+"F N B Z S C ` m m m m m H./.m.$.K.K.K.A. ...O.O.o.&.&., < K.@ $ ",
+"F N B Z S C ) m m m m m H./.^.-.H *.N.K.2.C.K.K.K.K.K.q.9.K.@ $ ",
+"~ / T S S C ~ m m M F Y G././././.F.$.L t <.g.N.A.K.K.K.K.K.@ 1.",
+"v g h x W ^ _ T V j j j G./././././.~.M.O   . + a L L L L L >./.",
+"v g h l z c Q j j j j j G././././.t.f I o X o G *.E././././././.",
+"b g h l z c Q j j j j j G././././.f $.$.# X o G %.f t./././././.",
+"b g h l z c Q j j j j j G././././.h.s %.#.G u | $.$.e ^././././.",
+"b g h l z c Q j j j j j G./././././.I.U f I U +.U J P /././././.",
+"n g h l z c Q j j j j j G././././././././.M.u.t.t.M././././././.",
+"n g h l z c Q j j j j j G./././././././././././././././././././.",
+"W g h l z c Q j j j j v W./././././././././././././././././././.",
+"/.T.l.w.! c ! k W p.T./././././././././././././././././././././.",
+"/././././.^.P.~././././././././././././././././././././././././.",
+"/./././././././././././././././././././././././././././././././."
+};
diff --git a/share/metview/icons/SERVICE.xpm b/share/metview/icons/SERVICE.xpm
new file mode 100644
index 0000000..4c63cb4
--- /dev/null
+++ b/share/metview/icons/SERVICE.xpm
@@ -0,0 +1,251 @@
+/* XPM */
+static char * SERVICE_xpm[] = {
+"32 32 216 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #EFF3F8",
+"@ 	c #A9BFDB",
+"# 	c #4C82BB",
+"$ 	c #1E68AD",
+"% 	c #3274B3",
+"& 	c #7BA0C9",
+"* 	c #DAE4EF",
+"= 	c #FCFDFE",
+"- 	c #D9E2EF",
+"; 	c #82A4CC",
+"> 	c #3373B2",
+", 	c #206AAF",
+"' 	c #467EB8",
+") 	c #A5BCD9",
+"! 	c #EEF2F8",
+"~ 	c #C0D1E5",
+"{ 	c #3B76B3",
+"] 	c #477FB8",
+"^ 	c #D4DFED",
+"/ 	c #F1F5F9",
+"( 	c #7EA0C9",
+"_ 	c #1D79BB",
+": 	c #0B8BCE",
+"< 	c #0596D9",
+"[ 	c #0792D5",
+"} 	c #1180C4",
+"| 	c #4881BA",
+"1 	c #A4BBD8",
+"2 	c #4F86BD",
+"3 	c #127EC3",
+"4 	c #0990D3",
+"5 	c #0597D9",
+"6 	c #0B8CCF",
+"7 	c #1B77BB",
+"8 	c #7C9EC8",
+"9 	c #F0F3F8",
+"0 	c #F3F6FA",
+"a 	c #598CC0",
+"b 	c #0C8ACD",
+"c 	c #0D89CD",
+"d 	c #6894C3",
+"e 	c #98B2D3",
+"f 	c #1D7BBE",
+"g 	c #039ADC",
+"h 	c #00A0E2",
+"i 	c #019FE1",
+"j 	c #2C6DB0",
+"k 	c #019EE0",
+"l 	c #029BDE",
+"m 	c #1B7BBF",
+"n 	c #95B1D3",
+"o 	c #FDFEFE",
+"p 	c #D0DCEB",
+"q 	c #267FBE",
+"r 	c #009FE1",
+"s 	c #2A78B8",
+"t 	c #DEE6F1",
+"u 	c #2D78B8",
+"v 	c #029CDE",
+"w 	c #2C79B9",
+"x 	c #D3DEEC",
+"y 	c #8FADD1",
+"z 	c #0A8CD0",
+"A 	c #029DDF",
+"B 	c #387AB8",
+"C 	c #0F89CC",
+"D 	c #0597DA",
+"E 	c #0D87CB",
+"F 	c #0A8DD0",
+"G 	c #098FD2",
+"H 	c #0D87CA",
+"I 	c #89ABD0",
+"J 	c #F6F8FB",
+"K 	c #508BC0",
+"L 	c #0598DA",
+"M 	c #0694D7",
+"N 	c #7599C5",
+"O 	c #5989BE",
+"P 	c #0498DA",
+"Q 	c #2374B7",
+"R 	c #6391C2",
+"S 	c #407BB7",
+"T 	c #0C88CC",
+"U 	c #0B8ACD",
+"V 	c #3D7AB6",
+"W 	c #6A96C5",
+"X 	c #226EB1",
+"Y 	c #029BDD",
+"Z 	c #0399DC",
+"` 	c #4F8AC0",
+" .	c #D2DDEC",
+"..	c #2781C1",
+"+.	c #1682C5",
+"@.	c #B3C6DF",
+"#.	c #2677B9",
+"$.	c #1783C5",
+"%.	c #A6BDD9",
+"&.	c #4079B5",
+"*.	c #3A7EBA",
+"=.	c #DFE7F1",
+"-.	c #FEFEFF",
+";.	c #AFC4DD",
+">.	c #137CC0",
+",.	c #2080C1",
+"'.	c #C5D4E6",
+").	c #94B0D2",
+"!.	c #367DBA",
+"~.	c #1874B8",
+"{.	c #3684C0",
+"].	c #E0E8F2",
+"^.	c #85A4CB",
+"/.	c #0793D6",
+"(.	c #75A0CB",
+"_.	c #F8FAFC",
+":.	c #3578B6",
+"<.	c #8DACD0",
+"[.	c #F9FBFC",
+"}.	c #4C85BD",
+"|.	c #0498DB",
+"1.	c #749CC8",
+"2.	c #4488C1",
+"3.	c #92ADD0",
+"4.	c #0891D4",
+"5.	c #8CAFD3",
+"6.	c #7C9FC9",
+"7.	c #4E89BF",
+"8.	c #D9E3EF",
+"9.	c #2580C0",
+"0.	c #1883C6",
+"a.	c #B2C5DE",
+"b.	c #4689C1",
+"c.	c #92AED1",
+"d.	c #1A81C3",
+"e.	c #2081C1",
+"f.	c #C3D2E5",
+"g.	c #0C8BCE",
+"h.	c #3981BD",
+"i.	c #F2F5FA",
+"j.	c #397EBA",
+"k.	c #039BDD",
+"l.	c #8DABCF",
+"m.	c #4983BB",
+"n.	c #6E98C6",
+"o.	c #779CC7",
+"p.	c #0499DB",
+"q.	c #4A86BD",
+"r.	c #FBFCFD",
+"s.	c #2078BB",
+"t.	c #B5C7DF",
+"u.	c #BFCFE4",
+"v.	c #1B81C3",
+"w.	c #1E80C1",
+"x.	c #C7D5E7",
+"y.	c #0C8BCF",
+"z.	c #3C84BE",
+"A.	c #E7EDF5",
+"B.	c #3E83BD",
+"C.	c #0C8DD0",
+"D.	c #8DAACE",
+"E.	c #5285BB",
+"F.	c #719BC8",
+"G.	c #789EC9",
+"H.	c #3876B4",
+"I.	c #2076B9",
+"J.	c #1482C6",
+"K.	c #B7CAE1",
+"L.	c #C0D0E4",
+"M.	c #1B81C2",
+"N.	c #147ABE",
+"O.	c #3D82BD",
+"P.	c #E4EBF3",
+"Q.	c #EBF0F7",
+"R.	c #3E83BE",
+"S.	c #739DC9",
+"T.	c #FCFCFE",
+"U.	c #719BC7",
+"V.	c #1082C5",
+"W.	c #B5C8E0",
+"X.	c #2873B5",
+"Y.	c #039BDE",
+"Z.	c #518BC1",
+"`.	c #AABFDB",
+" +	c #1283C6",
+".+	c #0F85C9",
+"++	c #A1BAD8",
+"@+	c #197FC2",
+"#+	c #3A80BB",
+"$+	c #1878BD",
+"%+	c #1F77BA",
+"&+	c #99B5D5",
+"*+	c #407CB7",
+"=+	c #147CC0",
+"-+	c #3E7EB9",
+";+	c #DDE5F0",
+">+	c #4184BE",
+",+	c #759EC9",
+"'+	c #FAFBFD",
+")+	c #EAF0F6",
+"!+	c #B0C4DD",
+"~+	c #F0F4F9",
+"{+	c #CFDBEB",
+"]+	c #A3BAD8",
+"^+	c #1082C6",
+"/+	c #B1C6DF",
+"(+	c #C4D3E6",
+"_+	c #187DC0",
+":+	c #357AB7",
+"<+	c #E9EEF6",
+"[+	c #4180BB",
+"}+	c #0B8ACE",
+"|+	c #799DC7",
+"1+	c #ABC1DC",
+"2+	c #296CAE",
+"3+	c #3573B2",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . + @ # $ % & * = - ; > , ' ) ! . . . . . . . . . ~ { ] ^ . ",
+". . / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 . . . . . . . 0 a b c d . ",
+". . e f g h h h i 6 j c k h h h l m n o . . . . . . p q r k s . ",
+". t u l h h h h h h l r h h h h h v w x . . . . . . y z h A B . ",
+". e C h h D E F r h h h i G H < h h b I . . . . . J K L h M N . ",
+". O g h P Q R S T h h h U V W X Y h Z ` 0 . . . .  ...i h +. at .. ",
+". #.k h $.%.. + &.A h l *.=.-.;.>.h h ,.'.. . . . ).b h l !.J . ",
+". ~.i h {.].. -.^.5 h /.(.. . _.:.A h 6 <.. . . [.}.|.h /.1.. . ",
+". ~.i h 2.! . . 3.M h 4.5.. . . 6.4.h P 7._.. . 8.9.i h 0.a.. . ",
+". ~.i h b.9 . . c.M h 4.5.. . . '.d.r h e.f.. . c.g.h v h.+ . . ",
+". ~.i h b.9 . . 3.M h 4.5.. . . i.j.k.h F l.. . m.Z h [ n.. . . ",
+". ~.i h b.9 . . 3.M h 4.5.. . . . o./.h p.q.r.].s.k h +.t.. . . ",
+". ~.i h b.9 . . c.M h 4.5.. . . . u.v.h r w.x.c.y.h A z.A.. . . ",
+". ~.i h b.9 . . c.M h 4.5.. . . . + B.k.h C.D.E.v h 4.F.o . . . ",
+". ~.i h b.9 . . 3.M h 4.5.. . . . . G.[ h g H.I.r h J.K.. . . . ",
+". ~.i h b.9 . . 3.M h 4.5.. . . . . L.M.h r N.: h k O.P.. . . . ",
+". ~.i h b.9 . . c.M h 4.5.. . . . . Q.R.v h 4.v h 4.S.T.. . . . ",
+". ~.i h b.9 . . 3.M h 4.5.. . . . . -.U.4.h i h h V.W.. . . . . ",
+". X.Y.|.Z.0 . . `. +i .+++. . . . . . f. at +h h h k #+A.. . . . . ",
+". ( $+%+&+. . . P.*+=+-+;+. . . . . . A.>+A h h /.,+'+. . . . . ",
+". )+`.!+~+. . . . {+]+p = . . . . . . T.S.4.h h ^+/+. . . . . . ",
+". . . . . . . . . . . . . . . . . . . . (+_+h r :+! . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . <+[+4.}+|+'+. . . . . . ",
+". . . . . . . . . . . . . . . . . . . . T.1+2+3+* . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/SHELL.xpm b/share/metview/icons/SHELL.xpm
new file mode 100644
index 0000000..d4478af
--- /dev/null
+++ b/share/metview/icons/SHELL.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char * SHELL_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 3 1",
+/* colors */
+" 	c white",
+".	c #7F7F00",
+"X	c #FFFFE2E2ABAB",
+/* pixels */
+"             .....              ",
+"        .....XX.XX.....         ",
+"       ..XXXXXX.XXXXX.X.        ",
+"     ..X.XXXXXX.XXXX.XXX..      ",
+"    .XXXX.XXXXX.XXXX.XXXXX.     ",
+"   .XXXXX.XXXXX.XXXX.XXXXX..    ",
+"  .XXXXXX.XXXXX.XXXX.XXXXX.X.   ",
+"  ..XXXXX.XXXXX.XXXX.XXXX.XX.   ",
+" .X.XXXXXX.XXXX.XXX.XXXXX.XXX.  ",
+" .XX.XXXXX.XXXX.XXX.XXXX.XXXX.  ",
+".XXX.XXXXX.XXXX.XXX.XXXX.XXXXX. ",
+".XXXX.XXXX.XXXX.XXX.XXX.XXXXXX. ",
+".XXXX.XXXXX.XXX.XX.XXXX.XXXXX.. ",
+"..XXXX.XXXX.XXX.XX.XXXX.XXXX.XX.",
+".X.XXXX.XXX.XXX.XX.XXX.XXXX.XXX.",
+".XX.XXX.XXX.XXX.XX.XXX.XXXX.XXX.",
+".XXX.XXX.XXX.XX.XX.XX.XXXX.XXX. ",
+" .XXX.XX.XXX.XX.X.XXX.XXX.XXX.  ",
+"  .XXX.XX.XX.XX.X.XX.XXX.XXX.   ",
+"   .XXX.X.XX.XX.X.XX.XX.XXX.    ",
+"    .XX.XX.XX.X.X.XX.X.XXX.     ",
+"     .XX.XX.X.X.X.X.X.XXX.      ",
+"      .XX.X.X.X..XX..XXX.       ",
+"       .XX.X..X..X..XXXX.       ",
+"       .XXX...X..X..XXX.        ",
+"        .XXX.......XXX.         ",
+"        .XXXXXXXXXXXXX.         ",
+"        .XXXXXXXXXXXXX.         ",
+"        .XXXXXXXXXXXXX.         ",
+"        .XXXXXXXXXXXXX.         ",
+"        .XXXXXXXXXXXXX.         ",
+"        ...............         "};
diff --git a/share/metview/icons/SIMPLE_FORMULA.xpm b/share/metview/icons/SIMPLE_FORMULA.xpm
new file mode 100644
index 0000000..2f7060e
--- /dev/null
+++ b/share/metview/icons/SIMPLE_FORMULA.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * some_icon[] = {
+"32 32 8 1",
+"A  c #ffffffffffff",
+"B  c #333333336666",
+"C  c #66666666cccc",
+"D  c #ccccccccffff",
+"E  c #cccc99996666",
+"F  c #ffffcccc9999",
+"G  c #ffff66663333",
+"H  c #aaaaaaaaaaaa",
+"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
+"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAFEEAAAFEEAAAFEEAAAFEEAAAEE",
+"EEAAAFFEEGAFFEEGAFFEEGAFFEEGAAEE",
+"EEHHHFFEEGHFFEEGHFFEEGHFFEEGHHEE",
+"EEAAAFFEEGAFFEEGAFFEEGAFFEEGAAEE",
+"EEAAAAFEEAAAFEEAAAFEEAAAFEEAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
+"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAFEEAAAFEEAAAAAAAAAAAFEEAAAEE",
+"EEAFFEEGAFFEEGAAAAAAAAAFFEEGAAEE",
+"EEHFFEEGHFFEEGHHHHHHHHHFFEEGHHEE",
+"EEAFFEEGAFFEEGAAAAAAAAAFFEEGAAEE",
+"EEAAFEEAAAFEEAAAAAAAAAAAFEEAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE",
+"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
+"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"};
diff --git a/share/metview/icons/SQL.xpm b/share/metview/icons/SQL.xpm
new file mode 100644
index 0000000..1b269e3
--- /dev/null
+++ b/share/metview/icons/SQL.xpm
@@ -0,0 +1,157 @@
+/* XPM */
+static char *SQL[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 119 2",
+"   c #010101",
+".  c #060708",
+"X  c #07090A",
+"o  c #0A0B0C",
+"O  c #0D0F10",
+"+  c #111416",
+"@  c #131619",
+"#  c #16181B",
+"$  c #1A1D1F",
+"%  c #1A1E22",
+"&  c #1D2125",
+"*  c #212326",
+"=  c #22282D",
+"-  c #252B30",
+";  c #2B3136",
+":  c #2D353D",
+">  c #333333",
+",  c #33363A",
+"<  c #333B42",
+"1  c #3A3F43",
+"2  c #3D4247",
+"3  c #3C454D",
+"4  c #434B52",
+"5  c #494E53",
+"6  c #454F58",
+"7  c #495057",
+"8  c #46515B",
+"9  c #4B5259",
+"0  c #5B5C5D",
+"q  c #4B5763",
+"w  c #4E5A66",
+"e  c #4F5E6D",
+"r  c #535C64",
+"t  c #525E6A",
+"y  c #596067",
+"u  c #5B6672",
+"i  c #5B6976",
+"p  c #5A6A79",
+"a  c #656566",
+"s  c #62686F",
+"d  c #636C74",
+"f  c #636E79",
+"g  c #697077",
+"h  c #6E747A",
+"j  c #777778",
+"k  c #677583",
+"l  c #697682",
+"z  c #6C7985",
+"x  c #6D7B8A",
+"c  c #73808C",
+"v  c #7B838A",
+"b  c #728291",
+"n  c #7C8A97",
+"m  c #768BA0",
+"M  c #7890A7",
+"N  c #7E96AE",
+"B  c #808284",
+"V  c #808A91",
+"C  c #828E99",
+"Z  c #8C959D",
+"A  c #9A9A9A",
+"S  c #8594A2",
+"D  c #8B98A4",
+"F  c #859EB8",
+"G  c #8FA2B3",
+"H  c #8DA3BA",
+"J  c #93A5B5",
+"K  c #9AA9B7",
+"L  c #97A8B9",
+"P  c #9BACBC",
+"I  c #A3ACB4",
+"U  c #A1B0BF",
+"Y  c #9DB1C4",
+"T  c #9EB6CD",
+"R  c #99B4D0",
+"E  c #A7B7C7",
+"W  c #ADBCCB",
+"Q  c #B4BFC9",
+"!  c #A5BCD2",
+"~  c #A9BED3",
+"^  c #BFC6CD",
+"/  c #ACC2D6",
+"(  c #B3C5D6",
+")  c #BAC8D5",
+"_  c #B1C6DA",
+"`  c #B4C9DE",
+"'  c #BCCEDF",
+"]  c #A4C4E4",
+"[  c #AAC7E4",
+"{  c #ABC9E6",
+"}  c #ADCBE8",
+"|  c #B4CBE2",
+" . c #BACEE1",
+".. c #B5CFE9",
+"X. c #BCD2E6",
+"o. c #BDD3E9",
+"O. c #C4CCD2",
+"+. c #C8D4DF",
+"@. c #D5D7D9",
+"#. c #C3D5E6",
+"$. c #CAD7E3",
+"%. c #C6D8E7",
+"&. c #C4D7E8",
+"*. c #C6D8E9",
+"=. c #CCDBE9",
+"-. c #D3DDE5",
+";. c #D1DEE9",
+":. c #D4E0EB",
+">. c #DAE4ED",
+",. c #E6E6E6",
+"<. c #E0E9EF",
+"1. c #EDEDED",
+"2. c #E5ECF2",
+"3. c #E9EFF4",
+"4. c #EDF2F5",
+"5. c #F3F5F7",
+"6. c #F2F5F9",
+"7. c #F7F9FB",
+"8. c #FFFFFF",
+/* pixels */
+"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.7.7.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.8.8.8.8.8.6.3.>.>.>.>.>.<.2.4.8.8.8.8.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.8.8.8.3.>.:.;.;.;.;.;.;.;.;.:.>.3.7.8.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.8.6.>.;.;.;.=.=.=.=.=.=.=.=.=.;.;.>.4.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.3.:.;.;.=.=.=.*.*.*.$.$.*.*.=.;.;.;.;.2.7.8.8.8.8.8.",
+"8.8.8.8.8.2.;.=.;.=.=.*.*.*.*.&.%.*.*.*.$.*.=.=.;.;.2.8.8.8.8.8.",
+"8.8.8.8.3.:.;.=.*.*.*.#.%.#.#.#.#.#.#.#.*.*.*.=.=.;.;.2.8.8.8.8.",
+"8.8.8.6.>.:.;.=.*.*.#.#.#.#.&.&.o.o.o.#.#.*.*.*.*.=.;.;.4.8.8.8.",
+"8.8.5.I v v U +.%.#.#.o. .L x z S / X.X.#.( P W $.=.=.;.>.7.8.8.",
+"8.1.a o     + f ' #.o._ u +     o < P X.o.n + 9 #.*.=.;.;.2.8.8.",
+"8.A   O 1 > . o S #.X.f .   & - o   < ! o.b   6 X.%.$.=.;.>.7.8.",
+"7.0   j #.) 5   r X.Y $   w T ! b + . x o.b   4 ' %.*.=.=.:.4.8.",
+"5.0   g +.=.P d S X.x   = ! } } { e   3 | b   4  .%.*.*.=.;.2.8.",
+"8.B   o 2 c E #.o...t   q [ [ [ { m X & ! b   4  .%.*.$.=.;.>.8.",
+"8.O.,       % f _ | 7   i } ] ] ] F O + T b   4  .#.%.*.=.;.>.7.",
+"8.>.Q s * .   . l | 6   p } ] ] ] F O + T b   4 | #.*.$.=.=.>.7.",
+"7.;.+.$.( C ,   ; ~ w   e { ] ] ] M X % ! x   4 ..#.%.%.=.=.>.7.",
+",.0 5 ) *.=.K o @ ! k   < R R e N p   < [ b   4  .#.%.%.=.;.>.7.",
+",.> . V =.*.D o & ~ J O o b H % @ #   p ..x   4 ` #.#.$.%.-.>.8.",
+"8.j   # y s *   7 ` { 6   @ 8 :     + H o.b   $ 7 9 9 9 v =.2.8.",
+"8. at .>         * L o.o.Y <           . w ! x .           5 $.5.8.",
+"8.8.^ h 5 5 f U #.X.X.X.! x 7 4 p k % O G Y d i d d d f Z -.7.8.",
+"8.8.4.:.$.$.*.*.%.X.X.X.X...| | ..o.G k ( o.#.*.*.=.:.:.:.2.8.8.",
+"8.8.8.>.;.;.=.%.%.%.o.X.X.X.X.X.X. .o.o.#.#.#.%.*.*.=.;.>.7.8.8.",
+"8.8.8.6.:.;.=.=.*.*.%.#.o.o.o.X.o.X.o.#.#.%.*.$.=.=.=.:.4.8.8.8.",
+"8.8.8.8.3.;.;.=.=.*.$.*.#.%.#.#.#.#.#.*.#.%.*.=.=.;.;.2.8.8.8.8.",
+"8.8.8.8.7.2.;.;.=.=.=.$.%.%.%.*.%.%.*.*.*.*.=.=.;.;.2.8.8.8.8.8.",
+"8.8.8.8.8.8.4.:.;.;.=.=.*.=.$.*.$.%.$.=.=.=.=.;.:.2.7.8.8.8.8.8.",
+"8.8.8.8.8.8.8.6.>.:.;.=.;.=.=.=.=.=.=.=.=.;.;.>.4.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.8.8.7.4.>.:.;.;.;.=.=.;.;.:.:.>.4.7.8.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.8.8.8.8.7.6.3.<.>.>.>.>.2.2.6.7.8.8.8.8.8.8.8.8.8.8.",
+"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.7.7.7.8.8.8.8.8.8.8.8.8.8.8.8.8.8."
+};
diff --git a/share/metview/icons/STATIONS.xpm b/share/metview/icons/STATIONS.xpm
new file mode 100644
index 0000000..df5cd50
--- /dev/null
+++ b/share/metview/icons/STATIONS.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char * STATIONS_icon[] = {
+"32 32 7 1",
+" 	c #FFFFFFFFFFFF",
+".	c #0000C7C70000",
+"X	c #000000000000",
+"o	c #BFBF46460000",
+"O	c #DADA85850808",
+"+	c #00000000FFFF",
+"@	c #0000FFFFFFFF",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"               ..  ..           ",
+"               .  .  .          ",
+"           ..X ... ...          ",
+"XX XX     .. ..........         ",
+"  X        ........   .         ",
+"          ..  . .....           ",
+"          . ... .. ...          ",
+"  XX XX    ..  . oo  ..         ",
+"    X      .   . oo             ",
+"           .  .   oo            ",
+"              .   oo            ",
+"        O          oo           ",
+"       OOO         oo           ",
+"      OOOOO         oo          ",
+"     OOOOOOO         oo         ",
+"    OOOOOOOOO        oo         ",
+"   OOOOOOOOOOO        ooo       ",
+"  OO         OO       ooo       ",
+"   X   XXX   X        oooo      ",
+"   X   XXX   X       XoooooX    ",
+" XXXXXXXXXXXXXXXXXXXX  XXXXXX   ",
+" X  XX X  X  X  X  XXXXX X XX   ",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXX   ",
+" X X X X X X XXX XXXXXXXXXXXX   ",
+"+@@@+@@@+@@@+@@@+@@@+ at XXXXX     ",
+"@@+@@@+@@@+@@@+@@@+@@@          ",
+"@@@@@@@@@@@@@@@@@@@@@           "};
diff --git a/share/metview/icons/SUBPAGEDETAILS.xpm b/share/metview/icons/SUBPAGEDETAILS.xpm
new file mode 100644
index 0000000..9ae6c44
--- /dev/null
+++ b/share/metview/icons/SUBPAGEDETAILS.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static char * SUBPAGEDETAILS_xpm[] = {
+"32 32 4 1",
+" 	c #FFFFFFFFFFFF",
+".	c #373737373737",
+"X	c #808080808080",
+"o	c #8F8F8F8F8F8F",
+"    ........................    ",
+"    .                      .    ",
+"    .                      .    ",
+"    . XXXXXXXXXXXXXXXXXXXX .    ",
+"    . X                  X .    ",
+"    . X ooooooooooooooo  X .    ",
+"    . X ooooooooooooooo  X .    ",
+"    . XXXXXXXXXXXXXXXXXXXX .    ",
+"    .                      .    ",
+"    . XXXXXXXXXX XXXXXXXXX .    ",
+"    . X        X X       X .    ",
+"    . X        X X       X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X  oooo  X X oooo  X .    ",
+"    . X        X X oooo  X .    ",
+"    . XXXXXXXXXX X oooo  X .    ",
+"    .            X oooo  X .    ",
+"    . XXXXXXXXXX X oooo  X .    ",
+"    . X        X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X oooo  X .    ",
+"    . X oooooo X X       X .    ",
+"    . X oooooo X X       X .    ",
+"    . X        X X       X .    ",
+"    . XXXXXXXXXX XXXXXXXXX .    ",
+"    .                      .    ",
+"    ........................    "};
diff --git a/share/metview/icons/SUPERPAGE.xpm b/share/metview/icons/SUPERPAGE.xpm
new file mode 100644
index 0000000..a062870
--- /dev/null
+++ b/share/metview/icons/SUPERPAGE.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char * SUPERPAGE_icon[] = {
+"32 32 7 1",
+" 	c #666666666666",
+".	c #FFFFFFFFFFFF",
+"X	c #DADAF6F6FFFF",
+"o	c #7C7CBDBD7676",
+"O	c #FFFF00000000",
+"+	c #00000000FFFF",
+"@	c #000000000000",
+"                                ",
+" .............................. ",
+" .                            . ",
+" . XXXXXXXoooXXXXXXXXXXXXoXoo . ",
+" . XXXXXXXXoooXXXXXXXXXXooooo . ",
+" . XXXXXXXXXoooXXXXXXXXXooooo . ",
+" . XXXXoooXXXoooXXXXXXXXooooo . ",
+" . XXXooooXXXoooXXXXXXXoooooo . ",
+" . XXXooooXXooooooXXoXooooooo . ",
+" . XXXoXXXXXoooooXXoooooooooo . ",
+" . XXXXXXXXooXXXXoooooooooooo . ",
+" . XXXXXXXXXXXXXooooooooooooo . ",
+" . XXXXXXXXXXXooooooooooooooo . ",
+" . XXXXXXXXXooooooooooooooooo . ",
+" . XXXXXXXXXXXooooooooooooooo . ",
+" .                            . ",
+" .............................. ",
+" .              .             . ",
+" . ............ . ........... . ",
+" . .O....++.... . .@@@..@@@.. . ",
+" . .O....++.... . ........... . ",
+" . .O....++.... . .@@@. at .@@@. . ",
+" . .O.++.++.... . ........... . ",
+" . .O.++.++.... . . at .@.@@@@.. . ",
+" . .O.++.++.... . ........... . ",
+" . .O.++.++.... . .@@@@. at .@.. . ",
+" . .O.++.++.... . ........... . ",
+" . .OOOOOOOOO.. . .@@. at .@@@@. . ",
+" . ............ . ........... . ",
+" .              .             . ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/SVG.xpm b/share/metview/icons/SVG.xpm
new file mode 100644
index 0000000..fc5063c
--- /dev/null
+++ b/share/metview/icons/SVG.xpm
@@ -0,0 +1,168 @@
+/* XPM */
+static char *SVG[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 130 2",
+"   c #BF7A31",
+".  c #B3793B",
+"X  c #C07A30",
+"o  c #EB8D2B",
+"O  c #EC9336",
+"+  c #ED953A",
+"@  c #BC8448",
+"#  c #918576",
+"$  c #938A7F",
+"%  c #B49574",
+"&  c #CE8B44",
+"*  c #D28F49",
+"=  c #D39049",
+"-  c #EE9A44",
+";  c #EE9E4B",
+":  c #EFA04E",
+">  c #EFA253",
+",  c #F0A65A",
+"<  c #F0A85E",
+"1  c #F0AA62",
+"2  c #F1AE6A",
+"3  c #F1B16E",
+"4  c #F2B575",
+"5  c #F3B87B",
+"6  c #969088",
+"7  c #9C948B",
+"8  c #8E8F91",
+"9  c #999594",
+"0  c #AC9982",
+"q  c #AB9C89",
+"w  c #B09E89",
+"e  c #BBA78C",
+"r  c #A5A19E",
+"t  c #B3A696",
+"y  c #BDAB93",
+"u  c #B2A59A",
+"i  c #BBAD9A",
+"p  c #A4A1AA",
+"a  c #AFACA9",
+"s  c #B3ACA5",
+"d  c #BAB1AA",
+"f  c #AEACBC",
+"g  c #B4B3B3",
+"h  c #BBB6B1",
+"j  c #BFBBB7",
+"k  c #BDBCBB",
+"l  c #C4AC8D",
+"z  c #D9B588",
+"x  c #DAB88D",
+"c  c #C6AD93",
+"v  c #CBAF90",
+"b  c #C1B09B",
+"n  c #D4B793",
+"m  c #DBBC96",
+"M  c #D3B79A",
+"N  c #DABB99",
+"B  c #F3BB82",
+"V  c #C7B9A7",
+"C  c #C1B6A9",
+"Z  c #DDBDA3",
+"A  c #C4BDB2",
+"S  c #C2BDBA",
+"D  c #E9C08F",
+"F  c #F4C18C",
+"G  c #E5C195",
+"H  c #ECC291",
+"J  c #E1C099",
+"K  c #E8C49A",
+"L  c #F4C593",
+"P  c #F4C995",
+"I  c #FECF96",
+"U  c #F6CA9C",
+"Y  c #FED196",
+"T  c #CBC1B5",
+"R  c #C3C2BE",
+"E  c #C8C1BD",
+"W  c #E9C6A4",
+"Q  c #EEC9A5",
+"!  c #F6CEA4",
+"~  c #F7D0A6",
+"^  c #F7D2AC",
+"/  c #F8D4AF",
+"(  c #F7D5B1",
+")  c #F8D7B3",
+"_  c #F9DBBC",
+"`  c #BBBBC9",
+"'  c #BBBAD8",
+"]  c #BEBEE2",
+"[  c #C2BBD3",
+"{  c #C5C4C3",
+"}  c #C8C6C3",
+"|  c #CCCBC4",
+" . c #C7C7C8",
+".. c #CDCDCD",
+"X. c #D2CBC3",
+"o. c #D3D3CC",
+"O. c #D5D5D4",
+"+. c #D9D7D5",
+"@. c #DAD9D6",
+"#. c #D7D8D8",
+"$. c #DEDEDE",
+"%. c #F9DEC2",
+"&. c #F9E0C6",
+"*. c #FAE3CC",
+"=. c #E1E0DF",
+"-. c #FBE7D2",
+";. c #FBE8D4",
+":. c #FCECDC",
+">. c #C5C4E5",
+",. c #C8C4E0",
+"<. c #C8C8E9",
+"1. c #D5D5EC",
+"2. c #D7D8EF",
+"3. c #D8D8EF",
+"4. c #DCDCF1",
+"5. c #E3E3E3",
+"6. c #E8E8E7",
+"7. c #E4E4E9",
+"8. c #E9E9E9",
+"9. c #FCEFE1",
+"0. c #FDF1E5",
+"q. c #FDF5ED",
+"w. c #E6E6F4",
+"e. c #EFEFF8",
+"r. c #F4F5F5",
+"t. c #FDF7F1",
+"y. c #FEF9F5",
+"u. c #F4F4FB",
+"i. c #F7F8F8",
+"p. c #FEFDFD",
+/* pixels */
+"p.p.e.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.i.p.",
+"p.i.%   X   X X                                   X       . X.p.",
+"p.r.% & * * = = = = * * = = = & * & = = & = * * = = * * = @ E p.",
+"p.i. .8.r.e.r.r.e.r.r.r.r.e.r.r.r.r.r.r.r.e.r.r.r.r.e.r.r.O.=.p.",
+"p.i...i.y.p.y.*.! _ q.p.:.:.p.p.p.p.:.:.p.p.:./ ~ ;.p.p.p.$.$.p.",
+"p.i...i.p.y.4 - 2 ; < 0.U < y.p.p.t.< ( p.U - , 1 + L p.p.5.5.p.",
+"p.i...r.p.;.+ *.p.9., / :.+ -.p.p.&.- 0.%.+ ) y.y._ - ;.p.$.$.p.",
+"p.i...i.p.;.O ( q.p.:.:.p.1 L p.p.B 4 p.4 4 p.p.p.p.&.0.p.$.5.p.",
+"p.i...i.p.p.L + - 5 &.p.p.! , t.q.> _ y., U p.p.;.*.*.0.p.$.$.p.",
+"p.i...r.p.p.p.:.! 1 O ) p.0.; -.%.> t.y.: U p.t.4 ; o F p.5.5.p.",
+"p.i...i.p._ ~ p.p.p.B 2 p.p.4 L 5 F p.p.4 3 p.p.q.q.2 B p.$.$.p.",
+"p.i...i.p.^ O %.t.0.2 5 p.p.) : : *.p.p.&.+ ! q.t.*.- F p.$.5.p.",
+"p.i...i.p.y.5 O : - : ;.p.p.q.; 1 y.p.p.p.^ - : : O 2 9.p.$.$.p.",
+"p.i...r.p.p.y.;.) %.q.p.p.p.p.:.0.p.p.p.p.p.0._ ) ;.p.p.p.5.5.p.",
+"p.i...i.p.w.4.4.4.4.4.4.4.4.4.4.4.4.4.4.3.4.4.4.4.4.4.e.p.$.$.p.",
+"p.i...i.u.] 1.4.4.4.4.2.4.4.3.2.3.3.4.4.4.2.1.1.4.4.<.>.p.$.5.p.",
+"p.i...r.u.] j T A h ..S a g 8.p.i.O.{ j h S E S h h ` >.p.3.=.p.",
+"p.i...i.u.' 6 0 z D J # # q #.} d M K G D H P L D c p >.p.=.=.p.",
+"p.i...i.u.<.w.$.y P G t R ..5.8 w Y Y Y Y Y I Y n S 7.<.p.$.=.p.",
+"p.i...r.u.<.p.p.O.e 6 #.p.p.p.} v Y I J N K I m S i.e.<.p.$.=.p.",
+"p.i...i.u.<.u.p.i.k $ y R r.p.{ c I P d g 9 t s r.p.e.<.p.$.5.p.",
+"p.i...i.u.>.p.p.p.i.C P c o.p.i.S m m  .i.r.O.r O.p.e.<.p.=.$.p.",
+"p.i...i.u.<.p.p.p.p.h x y 5.p.p.8.u d r.p.p. .y u r.e.<.p.5.5.p.",
+"p.i...i.u.<.p.p.p.p.R 7 $.p.p.p.p.5.5.p.p.p.i.+...i.e.<.p.$.$.p.",
+"p.i...i.u.<.u.r.8.8.3.k 6.6.#...o. at .=.$. at .+.O...R @.7.>.p.$.$.p.",
+"p.i...i.i.' T V b i l y e l m J m m n n m m J c i i a ` #.g 5.p.",
+"p.i...i.u.[ Z W Q Q Q Q Q Q K Q ! W Q Q Q Q Q c | o.o.o.k ..p.p.",
+"p.i...i.p.2.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.f | o.o.R $.p.p.p.",
+"p.i...i.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.o.| o.{ 5.p.p.p.p.",
+"p.i...i.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.O.R  .8.p.p.p.p.p.",
+"p.i.} ..O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.#.g } r.p.p.p.p.p.p.",
+"p.p.8.6.8.6.8.8.6.6.8.6.8.8.6.6.8.6.8.8.6.6.6.6.i.p.p.p.p.p.p.p."
+};
diff --git a/share/metview/icons/SVGOUTPUT.xpm b/share/metview/icons/SVGOUTPUT.xpm
new file mode 100644
index 0000000..98cfaca
--- /dev/null
+++ b/share/metview/icons/SVGOUTPUT.xpm
@@ -0,0 +1,240 @@
+/* XPM */
+static char * PSDRIVER_xpm[] = {
+"32 32 205 2",
+"  	c #FFFFFFFFFFFF",
+". 	c #10107070A8A8",
+"X 	c #E5E5E5E5E5E5",
+"o 	c #999999999999",
+"O 	c #E8E8E8E8E8E8",
+"+ 	c #D0D0D0D0E0E0",
+"@ 	c #C8C8C8C8D8D8",
+"# 	c #C0C0C0C0D0D0",
+"$ 	c #B8B8B8B8C8C8",
+"% 	c #F8F8F8F8F8F8",
+"& 	c #C0C0C8C8D8D8",
+"* 	c #C0C0C0C0D8D8",
+"= 	c #E0E0E0E0E8E8",
+"- 	c #F0F0F0F0F0F0",
+"; 	c #E0E0E0E0F0F0",
+": 	c #D8D8E0E0F0F0",
+"> 	c #D8D8D8D8E8E8",
+", 	c #C8C8C8C8D0D0",
+"< 	c #E0E0E0E0F8F8",
+"1 	c #E0E0E8E8F8F8",
+"2 	c #D0D0D0D0D8D8",
+"3 	c #E8E8E8E8F0F0",
+"4 	c #D8D8D8D8E0E0",
+"5 	c #D0D0D8D8E8E8",
+"6 	c #D0D0D8D8D8D8",
+"7 	c #E0E0E8E8F0F0",
+"8 	c #D0D0D0D0E8E8",
+"9 	c #C0C0C0C0C8C8",
+"0 	c #F0F0F0F0F8F8",
+"q 	c #909090909898",
+"w 	c #A0A0A8A8A8A8",
+"e 	c #888890909090",
+"r 	c #C8C8D8D8E8E8",
+"t 	c #C0C0D0D0E8E8",
+"y 	c #D8D8D8D8F0F0",
+"u 	c #F0F0F8F8F8F8",
+"i 	c #D0D0E0E0F0F0",
+"p 	c #A0A0C8C8E0E0",
+"a 	c #9090C0C0D8D8",
+"s 	c #8888B8B8D8D8",
+"d 	c #7878B0B0D0D0",
+"f 	c #7070A0A0D0D0",
+"g 	c #A0A0C0C0E0E0",
+"h 	c #D0D0D8D8F0F0",
+"j 	c #E8E8F0F0F8F8",
+"k 	c #B0B0D0D0E0E0",
+"l 	c #7070A8A8D0D0",
+"z 	c #7878B0B0E0E0",
+"x 	c #8080C0C0E8E8",
+"c 	c #7878B8B8E0E0",
+"v 	c #6060A0A0D0D0",
+"b 	c #C8C8D0D0E8E8",
+"n 	c #C0C0C8C8E8E8",
+"m 	c #D8D8E8E8F0F0",
+"M 	c #A8A8C8C8E0E0",
+"N 	c #8080B0B0D0D0",
+"B 	c #6868A8A8D0D0",
+"V 	c #7878B8B8E8E8",
+"C 	c #8888C8C8F0F0",
+"Z 	c #8080B8B8E8E8",
+"A 	c #A8A8C0C0E0E0",
+"S 	c #B0B0C0C0E0E0",
+"D 	c #8080A8A8D0D0",
+"F 	c #9090A0A0C0C0",
+"G 	c #9898C0C0E0E0",
+"H 	c #7070A8A8D8D8",
+"J 	c #6868A8A8D8D8",
+"K 	c #8080B0B0D8D8",
+"L 	c #5858A0A0D0D0",
+"P 	c #8080C0C0F0F0",
+"I 	c #9090C8C8F8F8",
+"U 	c #7878A8A8D0D0",
+"Y 	c #6060A0A0C8C8",
+"T 	c #60608888B0B0",
+"R 	c #E8E8E8E8F8F8",
+"E 	c #9090B8B8D8D8",
+"W 	c #6060A8A8E0E0",
+"Q 	c #7070B0B0F0F0",
+"! 	c #6868B0B0E0E0",
+"~ 	c #5858A0A0D8D8",
+"^ 	c #6868B0B0E8E8",
+"/ 	c #8080C0C0F8F8",
+"( 	c #8888C8C8F8F8",
+") 	c #7070B0B0E0E0",
+"_ 	c #7878B0B0D8D8",
+"` 	c #8888C0C0E8E8",
+"' 	c #8080B8B8E0E0",
+"] 	c #50509898C0C0",
+"[ 	c #58589898D0D0",
+"{ 	c #5050A0A0E0E0",
+"} 	c #6060B0B0F0F0",
+"| 	c #6868B0B0F8F8",
+" .	c #6868B0B0F0F0",
+"..	c #7070B8B8F0F0",
+"X.	c #7070B8B8F8F8",
+"o.	c #7878B8B8F8F8",
+"O.	c #7878C0C0F8F8",
+"+.	c #8888C0C0F0F0",
+"@.	c #9898C8C8F0F0",
+"#.	c #9898C8C8F8F8",
+"$.	c #20208080B8B8",
+"%.	c #D0D0D8D8E0E0",
+"&.	c #B8B8D0D0E8E8",
+"*.	c #40409090C8C8",
+"=.	c #5050A0A0E8E8",
+"-.	c #6060B0B0F8F8",
+";.	c #6060A8A8F0F0",
+":.	c #5858A8A8E8E8",
+">.	c #5858A0A0E0E0",
+",.	c #5858A8A8E0E0",
+"<.	c #6060A8A8E8E8",
+"1.	c #7878B8B8F0F0",
+"2.	c #8888C0C0F8F8",
+"3.	c #9898D0D0F8F8",
+"4.	c #6060A8A8D8D8",
+"5.	c #38388888C0C0",
+"6.	c #10107070B0B0",
+"7.	c #50509898D0D0",
+"8.	c #38389090D0D0",
+"9.	c #4848A0A0E8E8",
+"0.	c #5858A8A8F8F8",
+"q.	c #50509898D8D8",
+"w.	c #6060A0A0D8D8",
+"e.	c #50509090C0C0",
+"r.	c #48488080A8A8",
+"t.	c #B0B0C8C8E0E0",
+"y.	c #40409090E0E0",
+"u.	c #40409898E8E8",
+"i.	c #48489898E8E8",
+"p.	c #5050A8A8F8F8",
+"a.	c #5858A8A8F0F0",
+"s.	c #B0B0C8C8E8E8",
+"d.	c #9898B8B8E0E0",
+"f.	c #58589090B8B8",
+"g.	c #50508080A8A8",
+"h.	c #48489898D8D8",
+"j.	c #40409898F0F0",
+"k.	c #4848A0A0F8F8",
+"l.	c #5050A0A0F8F8",
+"z.	c #7878A8A8D8D8",
+"x.	c #B8B8C8C8E8E8",
+"c.	c #58589898C8C8",
+"v.	c #48488888B8B8",
+"b.	c #30308080B8B8",
+"n.	c #40409090D8D8",
+"m.	c #38389898E8E8",
+"M.	c #6060A8A8D0D0",
+"N.	c #28288080B8B8",
+"B.	c #8888B0B0D8D8",
+"V.	c #38388888D0D0",
+"C.	c #30308888D8D8",
+"Z.	c #6868A8A8E0E0",
+"A.	c #7070B0B0E8E8",
+"S.	c #6868A0A0D0D0",
+"D.	c #50509090C8C8",
+"F.	c #38389090E0E0",
+"G.	c #5050A0A0F0F0",
+"H.	c #48489898C8C8",
+"J.	c #9898B8B8D8D8",
+"K.	c #6868A8A8E8E8",
+"L.	c #6060A8A8F8F8",
+"P.	c #48489090C8C8",
+"I.	c #68689898C8C8",
+"U.	c #58589090C0C0",
+"Y.	c #40408888C0C0",
+"T.	c #C0C0D8D8E8E8",
+"R.	c #B8B8C8C8E0E0",
+"E.	c #38388888D8D8",
+"W.	c #30309090E8E8",
+"Q.	c #38389898F8F8",
+"!.	c #40409898F8F8",
+"~.	c #40409898E0E0",
+"^.	c #48488888C8C8",
+"/.	c #78789898C0C0",
+"(.	c #80809090B8B8",
+").	c #58588888B0B0",
+"_.	c #C8C8D0D0E0E0",
+"`.	c #28288080D0D0",
+"'.	c #38389090F8F8",
+"].	c #38389090F0F0",
+"[.	c #30309090E0E0",
+"{.	c #38389090D8D8",
+"}.	c #30309090D8D8",
+"|.	c #4848A0A0F0F0",
+" X	c #40408080B8B8",
+".X	c #C8C8D8D8E0E0",
+"XX	c #A8A8B0B0C8C8",
+"oX	c #68689090B8B8",
+"OX	c #30308080C0C0",
+"+X	c #20208080D0D0",
+"@X	c #28288888E8E8",
+"#X	c #30309090F0F0",
+"$X	c #20208080D8D8",
+"%X	c #10107878C0C0",
+"&X	c #10107070B8B8",
+"*X	c #20208080C8C8",
+"=X	c #28288888D0D0",
+"-X	c #28287878B8B8",
+";X	c #18187878C8C8",
+":X	c #18188080D0D0",
+">X	c #28288888D8D8",
+",X	c #28288888C8C8",
+"<X	c #08087070B0B0",
+"1X	c #00006868B0B0",
+"2X	c #08087070B8B8",
+"                      . . . . . . X . . . . . .                 ",
+"                      . . . . . . X . . . . . .                 ",
+"                  o o . . O X . . X . .                         ",
+"                o + + . . X X . . X . .                         ",
+"              o @ # + . . . . . . X . . . . . . o o o o o o o   ",
+"            o $ + O % . . . . . . % . . . . . . @ & & * & o o o ",
+"          o $ = - % % . . % % % % % % % % % . . ; ; ; ; : > > o ",
+"        o , O % % % % . . % % % %       % % . . < < < 1 1 ; > o ",
+"      o 2 3 % % % % % . . % % % %   . . . . . . ; ; < < < : > o ",
+"    o 4 - % % % % % % . . % % % %   . . . . . . ; ; ; ; ; 5 > o ",
+"  o 4 - % % % % % % % % % % % % % % % % % % 6 7 ; : : ; ; 8 > o ",
+"o $ O % % % % % % % % % % % % % % % % % % % 9 1 : : : : : > o o ",
+"o o 4 0 % % % % % % % % % % % % % % % q w e : r t r y : y > o   ",
+"  o @ 3 % % % % % % % % u u u u u u 0 i p a s d f g h : y > o   ",
+"  o @ + 0 % u u u u u u u u u j : 1 j k l z x c v g b b n > o   ",
+"    o @ = 0 u u u u u u 0 0 m M N g i k B V C Z l A S D D F     ",
+"    o @ @ 3 0 0 u 0 0 0 j i G H J B s K L P I c v N U B Y T     ",
+"      o @ > 0 0 0 j R R : E v W Q ! ~ ~ ^ / ( P ) J _ ` ' ]     ",
+"      o @ @ 7 j R 1 1 1 h E [ { } | }  ...X.o.O.P +. at .#.+.L $.  ",
+"        o @ %.R 1 < < : &.g l *.=.-.| ;.:.>.,.<.1.2.3.` 4.5.6.  ",
+"        o @ @ ; 1 ; ; t l [ 7.8.9.0.=.q.J K K w.W o.( ) e.r.    ",
+"          o @ + ; ; : t.7.y.u.i.p.a.q.K s.r b d.~  ./ ) f.g.    ",
+"          o @ @ : < : g h.j.k.l.0.W z.x.y : y A ~ ;.o.V c.v.b.. ",
+"            o @ 8 ; y d.n.m.j.k.| J E b y y h E ~ } o.+.x ' M.N.",
+"            o @ & : y B.V.C.C.u.} Z.K x.h b g l W -. .A.1.P J % ",
+"              o @ 5 y E c.S.D.F.G.^ v U B.U B )  .;.h.*.h.W H.p ",
+"              o @ @ y t A J.[ C.j.0.K.w.v 4.!  .L.9.P.I.U.Y.b.T.",
+"                o @ > y R.S.E.W.Q.!.l.:.<.:.a.0.p.~.^./.(.).    ",
+"                o @ _.: S e.`.W.'.Q.].[.{.}.F.k.l.|.V. X% .X    ",
+"                  o @ & XXoXOX+X at X#X$X%XX &X*Xm.j.u.=X-Xk       ",
+"                  o @ @ % .Xk % ;X:X%XX X X %X>X>X,X% % j       ",
+"                    o o 0 % u j % <XX X X X 1X2X% p m           "};
diff --git a/share/metview/icons/SYSTEM.xpm b/share/metview/icons/SYSTEM.xpm
new file mode 100644
index 0000000..f5539e5
--- /dev/null
+++ b/share/metview/icons/SYSTEM.xpm
@@ -0,0 +1,176 @@
+/* XPM */
+static char *SYSTEM[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 138 2",
+"   c #671E1E",
+".  c #6E1F1F",
+"X  c #6D2626",
+"o  c #7D2525",
+"O  c #773636",
+"+  c #7B3A3A",
+"@  c #6A4444",
+"#  c #674C4C",
+"$  c #784C4C",
+"%  c #775555",
+"&  c #785D5D",
+"*  c #736870",
+"=  c #802626",
+"-  c #802B2B",
+";  c #9C2F2F",
+":  c #833232",
+">  c #8A3535",
+",  c #863C3C",
+"<  c #8C3D3D",
+"1  c #953636",
+"2  c #9B3535",
+"3  c #923A3A",
+"4  c #A33232",
+"5  c #AC3434",
+"6  c #B43535",
+"7  c #BB3737",
+"8  c #B43A3A",
+"9  c #BC3939",
+"0  c #C53C3C",
+"q  c #C93C3C",
+"w  c #874242",
+"e  c #894242",
+"r  c #834D4D",
+"t  c #8B4B4B",
+"y  c #934444",
+"u  c #944949",
+"i  c #9A4B4B",
+"p  c #875454",
+"a  c #8C5454",
+"s  c #8B5D5D",
+"d  c #955151",
+"f  c #9B5353",
+"g  c #9B5E5E",
+"h  c #A24646",
+"j  c #AD4A4A",
+"k  c #B54242",
+"l  c #BB4444",
+"z  c #B34C4C",
+"x  c #A25555",
+"c  c #AB5555",
+"v  c #AA5A5A",
+"b  c #B45555",
+"n  c #BC5353",
+"m  c #BC5A5A",
+"M  c #8B6565",
+"N  c #8E6B6B",
+"B  c #946565",
+"V  c #946868",
+"C  c #9C6B6B",
+"Z  c #947171",
+"A  c #9E7070",
+"S  c #967979",
+"D  c #997D7D",
+"F  c #AD6161",
+"G  c #B26464",
+"H  c #BB6262",
+"J  c #B56B75",
+"K  c #B57373",
+"L  c #C74141",
+"P  c #C84545",
+"I  c #CC4C4C",
+"U  c #C55656",
+"Y  c #CE5252",
+"T  c #C05B5B",
+"R  c #CD5D5D",
+"E  c #D15555",
+"W  c #D35B5B",
+"Q  c #C56464",
+"!  c #C26B6B",
+"~  c #CD6B6B",
+"^  c #D56464",
+"/  c #D86262",
+"(  c #D76969",
+")  c #DB6C6C",
+"_  c #CD7575",
+"`  c #CD7C7C",
+"'  c #D57676",
+"]  c #DD7373",
+"[  c #D47C7C",
+"{  c #E27C7B",
+"}  c #294F88",
+"|  c #1352AE",
+" . c #014CB3",
+".. c #566D8F",
+"X. c #486695",
+"o. c #59619C",
+"O. c #767482",
+"+. c #4B65B1",
+"@. c #0054C7",
+"#. c #0557C9",
+"$. c #1B5CC0",
+"%. c #826D9D",
+"&. c #8B73A0",
+"*. c #C07B8D",
+"=. c #D97E82",
+"-. c #8A8888",
+";. c #9A8383",
+":. c #9C8B8B",
+">. c #878F9C",
+",. c #A49696",
+"<. c #AB9D9D",
+"1. c #9A9DA4",
+"2. c #ADA2A2",
+"3. c #ABAAAA",
+"4. c #B0A6A6",
+"5. c #B5AEAE",
+"6. c #AAADB5",
+"7. c #BAB3B3",
+"8. c #BFBABA",
+"9. c #D48787",
+"0. c #DE8485",
+"q. c #E58383",
+"w. c #E58A8A",
+"e. c #E98D8D",
+"r. c #EB9292",
+"t. c #C2BDBD",
+"y. c #C6C2C2",
+"u. c #CAC6C6",
+"i. c #CBC9C9",
+"p. c #D1CFCF",
+"a. c #D4D3D3",
+"s. c #DADADA",
+"d. c #E2E3E3",
+"f. c #E7E9E9",
+"g. c #EBECEB",
+"h. c #EEF0F0",
+"j. c #F4F5F4",
+"k. c #FFFFFF",
+/* pixels */
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.",
+"k.k.k.k.k.k.k.j.a.f.j.k.k.k.k.g.g.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.",
+"k.k.k.k.k.k.k.s.% V :.7.d.j.f...X.>.6.s.j.k.k.k.k.k.k.k.k.k.k.k.",
+"k.j.s.g.k.k.k.5.v ) ! F B D O.| @. .| } 1.k.k.k.k.k.k.k.k.k.k.k.",
+"k.g.& s :.t.f.:.T ) ] ] ] _ J %.+.$.#. .>.k.k.k.k.k.k.k.k.k.k.k.",
+"k.j.V l z i a @ y m ^ ) ] ] { { =.*.&.o.* 7.s.j.k.k.k.k.k.k.k.k.",
+"k.j.S l I E Y n h , < y Q ) ] ] ] q.q.q._ K C S ,.8.s.j.j.k.k.k.",
+"k.k.:.8 P I I E W W U y y ) ) ) ] ] { =.q.w.w.q.` K A D ,.5.f.k.",
+"k.k.:.5 L P I I Y Y W z O b R ) ) ~ x ! ' { w.w.e.e.r.w.9.V y.k.",
+"k.k.<.4 q q L P I I Y Y j < , y b u w u t d G _ 0.w.w.e.r.A s.k.",
+"k.k.7.2 0 0 0 0 P P I Y E E U z y + Q ) ( H f t a ' w.w.w.Z f.k.",
+"k.k.i.3 0 0 0 0 L P P P I Y Y R W R ^ ^ ) ) ] ] d v q.q.[ ;.j.k.",
+"k.k.s.e q 0 0 0 0 0 L L P I Y Y E W W / ^ ( ) ) c c { { ! ,.k.k.",
+"k.k.d., 0 0 0 0 0 0 0 0 L P P I I E Y W W ^ ^ ) c x ) { G 5.k.k.",
+"k.k.f.t 0 0 0 0 0 0 0 0 0 0 L P I I Y Y W W W / c i ) { g a.k.k.",
+"k.k.h.s 7 0 0 0 0 0 0 0 0 0 0 L L P I Y Y Y W W b y ( ) s d.k.k.",
+"k.k.j.C 7 0 0 0 0 0 0 0 0 9 0 0 q L P P I Y Y Y z e / R Z j.k.k.",
+"k.k.k.;.6 0 0 0 0 0 0 0 0 0 0 0 0 0 L L P I I Y l , W n :.k.k.k.",
+"k.k.k.;.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 L L P I k : E j 2.k.k.k.",
+"k.k.k.,.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 q L P k : Y i u.k.k.k.",
+"k.k.k.y.r 2 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 q 8 - P t d.k.k.k.",
+"k.k.k.k.d.,.t 2 7 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 8 - 8 s g.k.k.k.",
+"k.k.k.k.k.k.d.<.p 2 7 0 q 0 0 0 0 0 0 0 0 0 0 0 9 o 5 D k.k.k.k.",
+"k.k.k.k.k.k.k.k.f.4.p 1 6 q 0 0 0 0 0 0 0 0 0 0 9 - ; ,.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.g.5.s 1 6 0 0 0 0 0 0 0 0 0 9 o > t.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.h.7.M 1 6 0 0 0 0 0 0 0 0 = + s.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.j.8.N > 6 0 0 0 0 0 9 o $ g.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.j.y.Z > 5 0 0 0 0 . * k.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.j.i.S e 5 0 q   -.k.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.j.p.;.e 5 X 3.k.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.a.:.# a.k.k.k.k.k.",
+"k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.j.d.j.k.k.k.k.k."
+};
diff --git a/share/metview/icons/TABLE.xpm b/share/metview/icons/TABLE.xpm
new file mode 100644
index 0000000..b5e519b
--- /dev/null
+++ b/share/metview/icons/TABLE.xpm
@@ -0,0 +1,103 @@
+/* XPM */
+static char *TABLE[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 65 1",
+"  c #5E5F5F",
+". c #676767",
+"X c #686868",
+"o c #757576",
+"O c #7C7C7C",
+"+ c #797D84",
+"@ c #858585",
+"# c #808690",
+"$ c #868B92",
+"% c #8F9398",
+"& c #939496",
+"* c #97989A",
+"= c #9B9B9B",
+"- c #969AA2",
+"; c #9A9FA7",
+": c #9EA1A6",
+"> c #9DA2AB",
+", c #A5A6A6",
+"< c #A3A8AF",
+"1 c #ACACAC",
+"2 c #A1A7B0",
+"3 c #A4AAB3",
+"4 c #AAAFB6",
+"5 c #A6AEBA",
+"6 c #A9AFB8",
+"7 c #ABB0B7",
+"8 c #ACB2BA",
+"9 c #B3B3B3",
+"0 c #B2B6BD",
+"q c #BDBDBE",
+"w c #B1B7C0",
+"e c #B3B9C2",
+"r c #BABFC7",
+"t c #B7BFCC",
+"y c #B9BFC9",
+"u c #BFC0C2",
+"i c #BCC2CA",
+"p c #C1C2C2",
+"a c #C1C5CD",
+"s c #C4C9CF",
+"d c #CECECE",
+"f c #C1C7D1",
+"g c #C5CBD5",
+"h c #C9CED5",
+"j c #C7CDD8",
+"k c #CFD4DB",
+"l c #D1D6DE",
+"z c #D3D8DF",
+"x c #DEDEDE",
+"c c #CED5E1",
+"v c #D5DAE2",
+"b c #DADFE6",
+"n c #DBE0E7",
+"m c #DEE3EA",
+"M c #E1E6ED",
+"N c #E3E8EF",
+"B c #E8E8E8",
+"V c #E4EBF5",
+"C c #E9EEF5",
+"Z c #E5EDF8",
+"A c #EAEFF8",
+"S c #EBF0F7",
+"D c #EDF2F9",
+"F c #F6F6F6",
+"G c #FFFFFF",
+/* pixels */
+"DDSSDDDDDDDDDDDDSCCDFCDDDVVDDDDD",
+"ZVVVVCVVVVirVVVVf<3gVVNVg33gCNVV",
+"ZCCCCCbiSM:;mSan08r3CbaM>vvhCibZ",
+"ZVCCCCz4Sg;;iS4v0-;4Cz4b<VCMC4vV",
+"ZCVZCCz7C<77:V8ve0h;Mv7N<ga6C4vV",
+"ZVSZCSv8ViVCyM7vh34sCv5Dv0ebA8vA",
+"ZVctti5#e0w0ww#<w8wee2#eeeeee#2e",
+"VZciii2ouuqrqpo,uqrqu,opqqqquo,r",
+"VZVSSSj*GGGGGG=xGGGGGx=GGGGGG=xG",
+"VZChnSj*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZCh$hSg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZCm7gSg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZCS0hSg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZVSilSg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"Zbhsgh7 at xxxxxB@qxxxxxu at xxxxxx@pG",
+"Zi&%&%+ ====== @=====@.====== =F",
+"VCvrvDj*GGGGGG=xGGGGGx=GGGGGG=xG",
+"VNea3Vg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZCNa4Vg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZCa<bCg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"Zm-:rVg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZVMmMSh*GGGGGG=xGGGGGx=GGGGGG=xG",
+"Vg::,;#.111111X&11111&X111111X,F",
+"Zv:%7i>OddddddO9ddddd9OddddddOqF",
+"ZMi00Dj*GGGGGG=xGGGGGx*GGGGGG=xG",
+"VVM<0Cg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZNkh2Vg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZMw4iAg*GGGGGG=xGGGGGx=GGGGGG=xG",
+"VCVmCCg=GGGGGG=xGGGGGx=GGGGGG=xG",
+"ZVVZVCk0GGGGGGqBGGGGGBqGGGGGGqBG",
+"CDASDSDFGGGGGGFGGGGGGGFGGGGGGFFG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"
+};
diff --git a/share/metview/icons/TABLEREADER.xpm b/share/metview/icons/TABLEREADER.xpm
new file mode 100644
index 0000000..d038642
--- /dev/null
+++ b/share/metview/icons/TABLEREADER.xpm
@@ -0,0 +1,105 @@
+/* XPM */
+static char *TABLEREADER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 67 1",
+"  c #010101",
+". c #0B0B0B",
+"X c #111111",
+"o c #2D2D2D",
+"O c #303030",
+"+ c #3D3D3D",
+"@ c #555555",
+"# c #595959",
+"$ c #626465",
+"% c #65686C",
+"& c #696969",
+"* c #696C71",
+"= c #707070",
+"- c #73767A",
+"; c #7C7C7B",
+": c #7A7D82",
+"> c #838383",
+", c #8C8C8C",
+"< c #8B8D91",
+"1 c #8F9398",
+"2 c #969696",
+"3 c #92969B",
+"4 c #93989F",
+"5 c #9D9D9D",
+"6 c #9FA2A7",
+"7 c #9FA4AB",
+"8 c #A4A4A4",
+"9 c #A2A6AC",
+"0 c #ACACAC",
+"q c #A6ABB1",
+"w c #AAAEB3",
+"e c #AEB3BA",
+"r c #B4B4B4",
+"t c #B2B6BC",
+"y c #B6B9BE",
+"u c #BCBCBC",
+"i c #B4BAC2",
+"p c #BABDC2",
+"a c #B9BFC8",
+"s c #BCC2CA",
+"d c #C2C2C2",
+"f c #C1C6CD",
+"g c #CBCBCB",
+"h c #C3C9D1",
+"j c #C9CED5",
+"k c #CCD0D6",
+"l c #CCD1D9",
+"z c #D4D4D4",
+"x c #D0D6DE",
+"c c #DDDDDD",
+"v c #D1D7E0",
+"b c #D6DBE3",
+"n c #D9DFE8",
+"m c #DEE3EB",
+"M c #DFE7F3",
+"N c #E4E4E4",
+"B c #E1E6EE",
+"V c #EAEAEA",
+"C c #E0E7F0",
+"Z c #E5EBF4",
+"A c #E9EEF5",
+"S c #EBF0F7",
+"D c #EFF3FA",
+"F c #F5F5F4",
+"G c #F0F4FB",
+"H c #F7F8FB",
+"J c #FFFFFF",
+/* pixels */
+"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ",
+"JHVNNNNNVNNNNHJJJJJJJJJJJJJJJJJJ",
+"JV52222222225cJJJJJJJJJJJJJJJJJJ",
+"JFczczcczczccFJJJJJJJJJJJJJJJJJJ",
+"JV62222222225NJJJJJJJJJJJJJJJJJJ",
+"JHcccccNcNNccFJJJJJJJJJJJJJJJJJJ",
+"JN5222222,=25NJJJJJJJJJJJJJJJJJJ",
+"JHNccNcNcz;0NFJJJJJJJJJJJJJJJJJJ",
+"JN52222222,&$cJJJJJJJJJJJJJJJJJJ",
+"JHNcccNccNNz>0HJJJJJJJJJJJJJJJJJ",
+"JN52222222222,0HJJJJJJJJJJJJJJJJ",
+"JJJJJJJJHJJJJF08FJJJJJJJJJJJJJJJ",
+"JJJJJJJJJHDDDDA93BGGSmmDDDAmZDDG",
+"JJJJJJJJJDZAAZvZ<-nbv9wbnnsslBvA",
+"JJJJJJJJJGZAAmsmq::el7wljjinbbsS",
+"JJJJJJJJJGZCmmslhl3*aiehflhihvaM",
+"JJJJJJJJJDMhai4ripp-$79%39pypw1p",
+"JJJJJJJJJDABmnyVFFFrr,rO;zFFFcrF",
+"JJJJJJJJJDZfjMuHJJJrzd&.OzJJJNuJ",
+"JJJJJJJJJGAjsmsFJJJ0;+X .,JJJNuJ",
+"JJJJJJJJJGAnkZpHJJJucu#X ozJJNuJ",
+"JJJJJJJJJGjww9,ruuu,0dr;o. at uu02H",
+"JJJJJJJJJGmyskwNVVV0zVVVr2#0Vz0J",
+"JJJJJJJJJDZhimsFJJJuVJJJgcVVJNuJ",
+"JJJJJJJJJGmtjmpFJJJuNJJJgcJJJNuJ",
+"JJJJJJJJJGnihxrVFVFrcVFFdgFFFzrJ",
+"JJJJJJJJJGj909<ruuu,0dud28uud02H",
+"JJJJJJJJJDmtinyFFHHrNHHHdcHHHcrJ",
+"JJJJJJJJJGZftmuHJJJrNJJJgcJJJNuJ",
+"JJJJJJJJJGmfkBpFJJJuVJJJgcJJJNuJ",
+"JJJJJJJJJGAAZBkHJJJgVJJJzNJJJVzJ",
+"JJJJJJJJJHGGGGHJJJJJJJJJJJJJJJHJ"
+};
diff --git a/share/metview/icons/TABLEVISUALISER.xpm b/share/metview/icons/TABLEVISUALISER.xpm
new file mode 100755
index 0000000..f16a0ed
--- /dev/null
+++ b/share/metview/icons/TABLEVISUALISER.xpm
@@ -0,0 +1,210 @@
+/* XPM */
+static char *TABLEVISUALISER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 172 2",
+"   c #1DE520DE1B00",
+".  c #2BB72DC02937",
+"X  c #2D7932112D50",
+"o  c #30E936543193",
+"O  c #362E3BE33723",
+"+  c #3A553CD73790",
+"@  c #3B683DEC387B",
+"#  c #3D2D40D73B1C",
+"$  c #3F4044E54069",
+"%  c #3E46455D5610",
+"&  c #455D47724174",
+"*  c #42F9484543A6",
+"=  c #497F4BCC45DF",
+"-  c #4C154E96494B",
+";  c #4BA450E34C9A",
+":  c #510D536D4E06",
+">  c #53CA565650CF",
+",  c #5441581E538D",
+"<  c #588659C2567F",
+"1  c #5B475D3E5B4D",
+"2  c #5E6B5FF459E5",
+"3  c #607C62575D5B",
+"4  c #4EBE54F5636B",
+"5  c #5065567064EF",
+"6  c #589C5E506B76",
+"7  c #591162EC61B6",
+"8  c #637C65746441",
+"9  c #68756ACD66B1",
+"0  c #612A6638726F",
+"q  c #73427512752B",
+"w  c #7A017B3475FC",
+"e  c #7ADF7C857AFD",
+"r  c #E60935B0354F",
+"t  c #E6253CB83C47",
+"y  c #E63D4D354C62",
+"u  c #E65650554F8C",
+"i  c #E6635351526D",
+"p  c #E66A5C435B0E",
+"a  c #E6C060925F96",
+"s  c #E68B62C3613F",
+"d  c #E67F6DEA6C84",
+"f  c #E6AE70746EBE",
+"g  c #E6BB78477675",
+"h  c #E6AD7ABD790A",
+"j  c #7ED780F97D27",
+"k  c #E6EE81197F03",
+"l  c #6DD675AD81D0",
+"z  c #6D98791D8B11",
+"x  c #76D682BB83F2",
+"c  c #7B8981E48BC0",
+"v  c #80A7825A8517",
+"b  c #85FC881584A0",
+"n  c #8923891D83AF",
+"m  c #8DC78F038BC3",
+"M  c #8F1390498D0D",
+"N  c #8F7C94019A90",
+"B  c #8E849BD09EDB",
+"V  c #90CE91069082",
+"C  c #97FA99CF96BA",
+"Z  c #949896CB9A1C",
+"A  c #95C2997C9FBA",
+"S  c #9C639C849C4B",
+"D  c #A319A2289D2A",
+"F  c #8EE09A78AC58",
+"G  c #96BC9BA2A378",
+"H  c #993A9D42A45B",
+"J  c #9596A000AFF8",
+"K  c #8E0A9D5BB536",
+"L  c #9272A02CA36D",
+"P  c #9F0EA20DA73A",
+"I  c #9D77A265AA25",
+"U  c #9C0FA5DFB52C",
+"Y  c #9F1AAAA0BCA5",
+"T  c #A459A58BA6EA",
+"R  c #A858A765A25B",
+"E  c #AABAA9F3A517",
+"W  c #A37CA657AC53",
+"Q  c #AD50AD5FADD3",
+"!  c #A544AA3AB1E4",
+"~  c #AB9FAF0AB476",
+"^  c #A309AD25BCE3",
+"/  c #AC2BB117B817",
+"(  c #A79CB6C8BB9D",
+")  c #AA97B555BBB2",
+"_  c #B102B0F7B177",
+"`  c #B2CCB6BDBCE1",
+"'  c #BD38BE3DBF7C",
+"]  c #E6C385D883BA",
+"[  c #E6E1899D87A4",
+"{  c #E7168E0F8C0B",
+"}  c #E72391FE8FD3",
+"|  c #E8879602938A",
+" . c #E7159EE49C44",
+".. c #E6F3A2B89FF1",
+"X. c #E74AA7FEA55C",
+"o. c #E9E0A847A57D",
+"O. c #E74DABE5A929",
+"+. c #E956ADA7AA99",
+"@. c #E837B7FDB4DF",
+"#. c #E77BB8F9B603",
+"$. c #E77ABC22B8FF",
+"%. c #9E0EAE04C6DF",
+"&. c #AB2AB642C768",
+"*. c #AA73B6DAC9B8",
+"=. c #B4EFB9F0C17B",
+"-. c #BCB1BF4FC359",
+";. c #B4BFBE3ACD1A",
+":. c #B8D1C025CBDF",
+">. c #B2C0BF77D310",
+",. c #BEAEC0D8C3C3",
+"<. c #BF5BC44FCB56",
+"1. c #B467C136D4FC",
+"2. c #BD1FC76FD731",
+"3. c #B373C355DC09",
+"4. c #B9B4C73FDC5B",
+"5. c #BF8CCB7BDE10",
+"6. c #C6B9C64DC4D4",
+"7. c #C87EC94DC7BF",
+"8. c #C165C632CD99",
+"9. c #C417C88DCF21",
+"0. c #CDDBCDFECD50",
+"q. c #D507D00BCE84",
+"w. c #D376D1AED022",
+"e. c #C082C7D6D375",
+"r. c #C64DCB8ED31C",
+"t. c #C8C3CDC3D545",
+"y. c #C85CCFAFDB45",
+"u. c #CB70D075D7F3",
+"i. c #CE26D3B7DC23",
+"p. c #D3A4D220D0A7",
+"a. c #D158D676DE00",
+"s. c #D3BCD8A4DFF1",
+"d. c #DE5ADDB4DC9D",
+"f. c #E783C652C2F1",
+"g. c #E78DCB61C7E9",
+"h. c #E79ACEF7CB7A",
+"j. c #E7B5D2B5CF0A",
+"k. c #E7B5D6E4D313",
+"l. c #EA5FD7BBD42D",
+"z. c #E7C1DA6FD6AB",
+"x. c #E7C8DE04DA2A",
+"c. c #EA70DE39DA66",
+"v. c #E73FE300DF37",
+"b. c #E8FFE3AFDF97",
+"n. c #CF88D76CE389",
+"m. c #D598DAE4E292",
+"M. c #D97EDEB8E642",
+"N. c #D477DE00ECE6",
+"B. c #CDF2DC6AF2E0",
+"V. c #D205DF57F428",
+"C. c #DC10E103E810",
+"Z. c #DD4FE312EB84",
+"A. c #D6C0E1D4F2D8",
+"S. c #DB55E52BF488",
+"D. c #DF62E8CAF7B7",
+"F. c #E7A8E590E1C3",
+"G. c #E9EBE719E308",
+"H. c #EC0AE972E57B",
+"J. c #E199E6F6EEBF",
+"K. c #E3D8E8CBEFCD",
+"L. c #ECFAED3AECA1",
+"P. c #F04AF080EFFB",
+"I. c #E15EE7ACF0C1",
+"U. c #E526EB9BF516",
+"Y. c #EA4FEF7AF6BC",
+"T. c #E6ECEE40F967",
+"R. c #EA09F022F8E0",
+"E. c #EC2DF11BF803",
+"W. c #ED43F245F951",
+"Q. c #F2A4F2DBF265",
+"!. c #F758F888FA6F",
+"~. c #FFA8FFB0FFBB",
+/* pixels */
+"U.D.D.D.D.D.D.D.D.D.S.S.D.D.D.D.S.N.A.D.D.D.D.D.D.N.n.S.D.D.D.D.",
+"B.A.S.S.S.S.A.A.S.S.&.U A.S.A.S.2.F U ;.S.A.A.S.;.J U ;.S.A.A.B.",
+"B.U.Y.Y.Y.Y.C.<.E.K.W G m.E.<.Z.8.W -.W Y.C.<.J.I m.U.J.Y.<.C.A.",
+"B.U.Y.Y.Y.Y.m.~ W.u.I ~ =.W.~ m.8.N I ~ U.m./ C.I K.E.Y.E.~ m.A.",
+"B.U.Y.Y.Y.Y.m./ E.~ I ! H I./ m.8.~ i.H J.m./ U.W 8.m.s.E./ m.A.",
+"B.D.U.U.U.T.n.^ I.:.Z.U.:.Z.^ m.i.U ^ e.U.n.^ T.m.) ^ y.T.^ n.A.",
+"B.B.3.%.%.%.K z ^ Y ^ ^ Y ^ z F ^ Y Y ^ ^ F z ^ ^ ^ ^ ^ ^ z F Y ",
+"B.V.5.&.*.*.F q ,.' ' ' ' ,.q T -.-.' ' -.T q ,.' ' ' ' ,.q T -.",
+"B.U.Y.W.E.R.1.Z ~.~.~.~.~.~.S d.~.~.~.~.~.d.S ~.~.~.~.~.~.S d.~.",
+"B.T.a./ m.R.>.Z ~.~.~.~.~.~.S d.~.~.~.~.~.d.S ~.~.~.~.~.~.S d.~.",
+"B.U.M.I 9.R.>.Z ~.~.~.~.~.~.S d.~.~.~.~.~.d.S ~.~.~.~.~.~.S d.~.",
+"B.U.W.` 9.R.>.Z ~.~.~.~.!.Q.V 0.L.L.L.L.L.0.V P.L.L.L.L.P.V d.~.",
+"B.U.Y./ 8.R.>.Z ~.~.~.H.j : + = : : : : : = + : : : : : : + 8 7.",
+"B.T.m.G W Z.1.Z ~.~.~.S & D Q E E E E E E E E E E E E E E E 2 < ",
+"B.M.9.,.,.r.U v d.d.d.9 w 6.W v.G.G.G.c.o.l.G.G.G.G.G.G.G.H.R # ",
+"V.<.Z Z Z N l 1 S S S - w P 0 d.F.F.F...r X.G.F.F.F.F.F.F.G.R # ",
+"B.U.r./ t.R.1.Z ~.~.~.w w T 0 d.F.F.j.p t k F.F.z.b.F.F.F.G.R # ",
+"B.U.m.i.I C.>.Z ~.~.~.w w T 0 d.F.F.{ a } s k. .p  .v.F.F.G.R # ",
+"B.U.E.i.W J.>.Z ~.~.~.w w T 0 d.G.f.u O.f.y f i k i [ x.F.G.R # ",
+"B.U.a.I a.Y.>.Z ~.~.~.w w W 0 d.b.h d x.z.p i #.F.#.p g z.G.R # ",
+"B.U.! G ` Z.>.Z ~.~.~.w w W 0 d. at .y $.F.F.f.g.F.F.F.f.] h.H.R # ",
+"B.U.K.Z.Z.Y.1.Z ~.~.~.w w W 0 d.+.| b.G.G.G.G.G.G.G.G.b.F.H.R # ",
+"B.r.P P P P c 8 Q Q Q > w W 6 7.q.q.p.p.p.p.p.p.w.w.w.p.w.d.R # ",
+"B.a.A c H -.F e p.0.0.3 w Q % 4 5 5 5 5 4 4 4 4 4 4 4 4 4 G E # ",
+"B.U.C.r.I J.1.Z ~.~.~.b 3 6.~ Q Q Q Q Q Q ~ ~ _ _ _ _ _ _ 6.n & ",
+"B.U.J.! I I.>.Z ~.~.~.0.= = ; : > > > - = = = = : > > > > = @ C ",
+"B.U.I.m.H M.>.Z ~.~.~.~.F.E < e m m M -   X .   9 M m m m 1 ' !.",
+"B.I.-.! ! J.>.Z ~.~.~.~.6.> O $ * * * O X o o X # * * * * o e Q.",
+"B.U.Z.M.U.Y.>.Z ~.~.~.~.q 7 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( L # 6.",
+"B.S.I.U.I.D.4.` ~.~.~.~.j ; B B B B B B B B B B B B B B B x # 0.",
+"S.S.S.S.S.S.S.!.~.~.~.~.d.q , , , , , , , , , , , , , , , 1 T !.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.!.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.Q.~.~."
+};
diff --git a/share/metview/icons/TAR.xpm b/share/metview/icons/TAR.xpm
new file mode 100644
index 0000000..80ccce8
--- /dev/null
+++ b/share/metview/icons/TAR.xpm
@@ -0,0 +1,474 @@
+/* XPM */
+static char * TAR_xpm[] = {
+"32 32 439 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #CFCFCF",
+"@ 	c #DBDCDD",
+"# 	c #DBDBDD",
+"$ 	c #DADADC",
+"% 	c #D9DADB",
+"& 	c #D8D9DB",
+"* 	c #D8D9DA",
+"= 	c #D7D8DA",
+"- 	c #D6D8D9",
+"; 	c #D6D7D9",
+"> 	c #D6D7D8",
+", 	c #D5D6D8",
+"' 	c #D4D5D7",
+") 	c #D4D5D6",
+"! 	c #D3D4D6",
+"~ 	c #D2D4D6",
+"{ 	c #D2D3D5",
+"] 	c #D1D3D5",
+"^ 	c #D1D2D4",
+"/ 	c #D0D1D3",
+"( 	c #CFD1D3",
+"_ 	c #CED0D2",
+": 	c #CECFD1",
+"< 	c #CDCFD1",
+"[ 	c #BFBFBF",
+"} 	c #DCDCDE",
+"| 	c #BACFF9",
+"1 	c #C7D8F9",
+"2 	c #ABC5F6",
+"3 	c #9FBDF3",
+"4 	c #B0C9F4",
+"5 	c #B2CAF3",
+"6 	c #80A8EB",
+"7 	c #7BA5E9",
+"8 	c #75A1E7",
+"9 	c #709EE5",
+"0 	c #6A9AE3",
+"a 	c #6596E1",
+"b 	c #5F92DF",
+"c 	c #5A8EDD",
+"d 	c #548BDB",
+"e 	c #4F87D9",
+"f 	c #4A84D7",
+"g 	c #4480D5",
+"h 	c #3F7CD3",
+"i 	c #3978D1",
+"j 	c #3375CF",
+"k 	c #2E71CD",
+"l 	c #296ECB",
+"m 	c #246BC9",
+"n 	c #1E67C7",
+"o 	c #1964C5",
+"p 	c #C7CED7",
+"q 	c #A4C0F7",
+"r 	c #C8D9F9",
+"s 	c #CEDDF9",
+"t 	c #CADAF8",
+"u 	c #CDDDF8",
+"v 	c #D4E1F9",
+"w 	c #7DA6EB",
+"x 	c #76A2E8",
+"y 	c #709EE6",
+"z 	c #6B9AE4",
+"A 	c #6596E2",
+"B 	c #6093E0",
+"C 	c #5A8EDE",
+"D 	c #548ADC",
+"E 	c #4F87DA",
+"F 	c #4984D8",
+"G 	c #4480D6",
+"H 	c #3E7CD4",
+"I 	c #3878D2",
+"J 	c #3374D0",
+"K 	c #2D70CE",
+"L 	c #276DCC",
+"M 	c #226ACA",
+"N 	c #1C66C8",
+"O 	c #1762C6",
+"P 	c #125FC4",
+"Q 	c #C6CDD7",
+"R 	c #DBDBDC",
+"S 	c #A0BDF7",
+"T 	c #B9CEF8",
+"U 	c #C0D3F8",
+"V 	c #BDD2F7",
+"W 	c #AFC8F3",
+"X 	c #7EA6EB",
+"Y 	c #74A0E8",
+"Z 	c #6E9CE6",
+"` 	c #6899E4",
+" .	c #6294E2",
+"..	c #5D91E0",
+"+.	c #578CDE",
+"@.	c #5188DC",
+"#.	c #4C85DA",
+"$.	c #4682D8",
+"%.	c #407ED5",
+"&.	c #3B7AD3",
+"*.	c #3576D1",
+"=.	c #3072CF",
+"-.	c #2A6ECD",
+";.	c #246ACB",
+">.	c #1E67C9",
+",.	c #1964C7",
+"'.	c #1360C5",
+").	c #0F5DC3",
+"!.	c #C5CDD7",
+"~.	c #DCDCDD",
+"{.	c #EFF4FE",
+"].	c #EDF3FD",
+"^.	c #ECF2FD",
+"/.	c #EBF1FC",
+"(.	c #EAF1FC",
+"_.	c #EAF0FC",
+":.	c #E9F0FB",
+"<.	c #E8EFFB",
+"[.	c #E7EEFB",
+"}.	c #E6EEFA",
+"|.	c #E5EDF9",
+"1.	c #E3ECF8",
+"2.	c #E2EAF7",
+"3.	c #E0E9F6",
+"4.	c #DFE8F5",
+"5.	c #DDE7F4",
+"6.	c #DCE5F3",
+"7.	c #DAE4F2",
+"8.	c #D9E3F1",
+"9.	c #D7E1F0",
+"0.	c #D5E0EF",
+"a.	c #D4DFEE",
+"b.	c #D2DEED",
+"c.	c #D0DCEC",
+"d.	c #CFDBEB",
+"e.	c #CDDAEA",
+"f.	c #DCDCDC",
+"g.	c #FEFEFE",
+"h.	c #FDFDFD",
+"i.	c #FCFBFA",
+"j.	c #F4E6D0",
+"k.	c #FAFBFB",
+"l.	c #FAFAFA",
+"m.	c #F9F9F9",
+"n.	c #F8F8F8",
+"o.	c #F7F7F7",
+"p.	c #F6F6F6",
+"q.	c #F5F5F5",
+"r.	c #F4F4F4",
+"s.	c #F3F3F3",
+"t.	c #F2F2F2",
+"u.	c #EFEFEF",
+"v.	c #DBDBDB",
+"w.	c #F4E1C4",
+"x.	c #E8BC75",
+"y.	c #EAC781",
+"z.	c #E6C491",
+"A.	c #F9F9F8",
+"B.	c #ECECEC",
+"C.	c #F8ECD9",
+"D.	c #EAC07B",
+"E.	c #F2D89C",
+"F.	c #FFFEDC",
+"G.	c #FAEFC2",
+"H.	c #F3E2AF",
+"I.	c #DEB984",
+"J.	c #F7F7F6",
+"K.	c #F1F1F1",
+"L.	c #EAEAEA",
+"M.	c #FBF3E7",
+"N.	c #ECC486",
+"O.	c #F0D08E",
+"P.	c #FEFBD6",
+"Q.	c #FFFFDB",
+"R.	c #FDF9D2",
+"S.	c #F8EEC0",
+"T.	c #F4E8BA",
+"U.	c #D6AE77",
+"V.	c #F4F2EE",
+"W.	c #EDEDED",
+"X.	c #FDF9F3",
+"Y.	c #EECC95",
+"Z.	c #EEC67C",
+"`.	c #FDF2C5",
+" +	c #FFF8CF",
+".+	c #F8E9B9",
+"++	c #F7E9B9",
+"@+	c #CEA56C",
+"#+	c #F1EDE8",
+"$+	c #F0F0F0",
+"%+	c #EBEBEB",
+"&+	c #DADADA",
+"*+	c #F3D9B1",
+"=+	c #EBBC6C",
+"-+	c #F8DFA1",
+";+	c #FBE6AC",
+">+	c #F9E2A6",
+",+	c #F8DE9F",
+"'+	c #F8DE9E",
+")+	c #F6DA99",
+"!+	c #EDCB86",
+"~+	c #F6DC9F",
+"{+	c #FEEFBB",
+"]+	c #FFF0BC",
+"^+	c #F8E7B0",
+"/+	c #C89E65",
+"(+	c #EBE5DD",
+"_+	c #EEEEEE",
+":+	c #ECC27B",
+"<+	c #FEF1BE",
+"[+	c #FEE5A7",
+"}+	c #FFE7A9",
+"|+	c #FFE8AB",
+"1+	c #FFE8AC",
+"2+	c #FDE3A3",
+"3+	c #E2A544",
+"4+	c #DCA54D",
+"5+	c #DEB268",
+"6+	c #E6C584",
+"7+	c #F5DB9E",
+"8+	c #FAE3A5",
+"9+	c #C59B61",
+"0+	c #E5DBD1",
+"a+	c #D9D9D9",
+"b+	c #ECC37B",
+"c+	c #FFF1BB",
+"d+	c #FFEEB6",
+"e+	c #FFDE97",
+"f+	c #FFDE96",
+"g+	c #F6CE7F",
+"h+	c #F0C270",
+"i+	c #EFC577",
+"j+	c #E8BD72",
+"k+	c #DFB36B",
+"l+	c #D5AA66",
+"m+	c #D4AD6C",
+"n+	c #E2C080",
+"o+	c #B7894F",
+"p+	c #EEEDEB",
+"q+	c #ECC27A",
+"r+	c #FFEDB1",
+"s+	c #FFECAD",
+"t+	c #FFE9AB",
+"u+	c #FFD687",
+"v+	c #FFD583",
+"w+	c #EEBC66",
+"x+	c #FED482",
+"y+	c #FFD684",
+"z+	c #FFD785",
+"A+	c #FFD37A",
+"B+	c #C8984E",
+"C+	c #ECE9E7",
+"D+	c #EABF78",
+"E+	c #FFEAA7",
+"F+	c #FFE8A3",
+"G+	c #FFE7A1",
+"H+	c #FFE5A0",
+"I+	c #FFD078",
+"J+	c #FFCC70",
+"K+	c #EEB85D",
+"L+	c #FFCC71",
+"M+	c #FFD077",
+"N+	c #FFCE71",
+"O+	c #FFCC6D",
+"P+	c #FFD176",
+"Q+	c #C69650",
+"R+	c #ECEAE8",
+"S+	c #D8D8D8",
+"T+	c #E7BD77",
+"U+	c #FFE69E",
+"V+	c #FFE49A",
+"W+	c #FFE398",
+"X+	c #FFE295",
+"Y+	c #FFE195",
+"Z+	c #FFC96A",
+"`+	c #FFC35D",
+" @	c #F1B452",
+".@	c #FFC969",
+"+@	c #FFC866",
+"@@	c #FFC561",
+"#@	c #FFCA69",
+"$@	c #FFCF72",
+"%@	c #FFD47B",
+"&@	c #C39653",
+"*@	c #EDEBE9",
+"=@	c #E5BA75",
+"-@	c #FFE091",
+";@	c #FFDF8F",
+">@	c #FFDE8C",
+",@	c #FFDD89",
+"'@	c #FFDD8A",
+")@	c #FAC362",
+"!@	c #FBBF59",
+"~@	c #FFBE54",
+"{@	c #FFC35C",
+"]@	c #FFCD6F",
+"^@	c #FFD277",
+"/@	c #FFD780",
+"(@	c #C19555",
+"_@	c #EEECEA",
+":@	c #D7D7D7",
+"<@	c #FCFCFC",
+"[@	c #E2B773",
+"}@	c #FFDF8C",
+"|@	c #FFDD88",
+"1@	c #FFDC85",
+"2@	c #FFDB82",
+"3@	c #FFDA80",
+"4@	c #FFD87D",
+"5@	c #FEDF8D",
+"6@	c #FFBA4C",
+"7@	c #FFBC50",
+"8@	c #FFC159",
+"9@	c #FFC662",
+"0@	c #FFCB6B",
+"a@	c #FFD074",
+"b@	c #FFD57D",
+"c@	c #FFDA86",
+"d@	c #BF9557",
+"e@	c #EEECEB",
+"f@	c #F4F5F6",
+"g@	c #DDB472",
+"h@	c #FFDB83",
+"i@	c #FFD97F",
+"j@	c #FFD87C",
+"k@	c #FFD77A",
+"l@	c #FFD677",
+"m@	c #FFD574",
+"n@	c #FFBA4D",
+"o@	c #FFBF56",
+"p@	c #FFC45E",
+"q@	c #FFC967",
+"r@	c #FFCE70",
+"s@	c #FFD882",
+"t@	c #FFDD8B",
+"u@	c #BC9458",
+"v@	c #EFEDEC",
+"w@	c #D6D6D6",
+"x@	c #F5F6F7",
+"y@	c #D7AC6C",
+"z@	c #FDD77B",
+"A@	c #FFD676",
+"B@	c #FFD473",
+"C@	c #FFD370",
+"D@	c #FFD26E",
+"E@	c #FFD16B",
+"F@	c #FFD577",
+"G@	c #FFBD52",
+"H@	c #FFC25B",
+"I@	c #FFC764",
+"J@	c #FFCC6C",
+"K@	c #FFD67F",
+"L@	c #FFDB88",
+"M@	c #FFE090",
+"N@	c #BA9358",
+"O@	c #F0EEEC",
+"P@	c #ECE2D4",
+"Q@	c #D3A55D",
+"R@	c #FCD171",
+"S@	c #FFD06A",
+"T@	c #FFCF68",
+"U@	c #FFCE65",
+"V@	c #FFCD62",
+"W@	c #FFC157",
+"X@	c #FFC560",
+"Y@	c #FFD984",
+"Z@	c #FFDE8D",
+"`@	c #FFE192",
+" #	c #B89259",
+".#	c #F0EEED",
+"+#	c #D5D5D5",
+"@#	c #EEE7DE",
+"##	c #CC9F5F",
+"$#	c #F9CA66",
+"%#	c #FFCC5F",
+"&#	c #FFCA5C",
+"*#	c #FFC959",
+"=#	c #FFC45D",
+"-#	c #FFCD6E",
+";#	c #FFD781",
+">#	c #FFDC8A",
+",#	c #FDE090",
+"'#	c #C8A669",
+")#	c #A7876C",
+"!#	c #F3F2F2",
+"~#	c #F1ECE7",
+"{#	c #C79D66",
+"]#	c #F4C55F",
+"^#	c #FFC752",
+"/#	c #FFC64F",
+"(#	c #FFCE63",
+"_#	c #D4B16E",
+":#	c #9C7A5A",
+"<#	c #B8ACA5",
+"[#	c #CDCDCD",
+"}#	c #CBCBCB",
+"|#	c #CACACA",
+"1#	c #AEAEAE",
+"2#	c #F3F0ED",
+"3#	c #C29C6E",
+"4#	c #EEBC58",
+"5#	c #FFC246",
+"6#	c #FFCC5D",
+"7#	c #FFC968",
+"8#	c #FFD379",
+"9#	c #E1B96E",
+"0#	c #AD875F",
+"a#	c #D0C1B7",
+"b#	c #DDDDDD",
+"c#	c #B7B7B7",
+"d#	c #F6F5F4",
+"e#	c #BF9E79",
+"f#	c #E6B453",
+"g#	c #FFC957",
+"h#	c #ECBF6C",
+"i#	c #B48B5A",
+"j#	c #C8B4A6",
+"k#	c #F6F5F5",
+"l#	c #CECECE",
+"m#	c #FBFBFB",
+"n#	c #B4B4B4",
+"o#	c #D4D4D4",
+"p#	c #F9F8F8",
+"q#	c #BFA286",
+"r#	c #D3AB5E",
+"s#	c #BA8E54",
+"t#	c #BFA693",
+"u#	c #F4F2F0",
+"v#	c #CCCCCC",
+"w#	c #D1BFB1",
+"x#	c #EFEBE7",
+"y#	c #E8E8E8",
+"z#	c #D0D0D0",
+"A#	c #E9E9E9",
+"B#	c #B2B2B2",
+"C#	c #D1D1D1",
+"D#	c #C5C5C5",
+"E#	c #A3A3A3",
+"F#	c #B1B1B1",
+". . + @ # $ % % & * = - ; > , ' ) ! ~ { ] ^ / / ( _ : < < [ . . ",
+". . } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p . . ",
+". . @ q r s t u v w x y z A B C D E F G H I J K L M N O P Q . . ",
+". . R S T U V 4 W X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.. . ",
+". . ~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.& . . ",
+". . f.. . . . . . . . . g.g.h.i.j.k.l.m.n.o.p.p.q.r.s.t.u.v.. . ",
+". . f.. . . . . . . . . g.h.w.x.y.z.A.n.n.o.p.q.r.r.s.t.B.v.. . ",
+". . v.. . . . . . . . g.C.D.E.F.G.H.I.J.o.p.p.q.r.s.t.K.L.v.. . ",
+". . v.. . . . . . . M.N.O.P.Q.R.S.Q.T.U.V.p.q.r.s.s.t.W.L.v.. . ",
+". . v.. . . . . X.Y.Z.`. + + +.+.+ + +++ at +#+q.r.s.t.$+%+B.v.. . ",
+". . &+. . . . *+=+-+;+>+,+'+)+!+~+{+]+]+^+/+(+s.s.t._+B.B.v.. . ",
+". . &+. . . . :+<+[+}+|+1+|+|+2+3+4+5+6+7+8+9+0+t.u.W.W._+f.. . ",
+". . a+. . . . b+c+d+e+f+f+f+f+g+h+i+j+k+l+m+n+o+p+_+_+_+_+f.. . ",
+". . a+. . . . q+r+s+t+u+v+v+v+w+x+v+v+v+y+z+A+B+C+u.u.u.u.f.. . ",
+". . a+. . . . D+E+F+G+H+I+J+J+K+J+J+L+M+N+O+P+Q+R+$+$+$+$+f.. . ",
+". . S+. . . . T+U+V+W+X+Y+Z+`+ @`+. at +@@@#@$@%@&@*@K.K.K.K.f.. . ",
+". . S+g.. . g.=@X+-@;@>@,@'@)@!@`+~@{@+@]@^@/@(@_ at t.t.t.t.f.. . ",
+". . :@s.n.<@g.[@}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@e at t.t.t.s.f.. . ",
+". . :@s.r.s.f at g@h at i@j at k@l at m@4 at n@o at p@q at r@A+s at t@u at v@r.r.r.r.f.. . ",
+". . w at r.r.r.x@y at z@A at B@C at D@E at F@G at H@I at J@P+K at L@M at N@O at r.r.r.r.f.. . ",
+". . w at q.q.q.q.P@Q at R@S at T@U at V@C at W@X@#@$@%@Y at Z@`@ #.#q.q.q.q.f.. . ",
+". . +#p.p.p.p.p.@###$#%#&#*#S@=#+ at -#^@;#>#,#'#)#!#q.q.q.q.f.. . ",
+". . +#p.o.o.o.o.o.~#{#]#^#/#(#9 at 0@a at b@c at _#:#<#+ [#}#|#|#|#1#. . ",
+". . +#o.n.n.n.n.n.n.2#3#4#5#6#7#r at 8#9#0#a#+ <@h.g.. . . b#c#. . ",
+". . +#n.n.n.n.n.n.n.n.d#e#f#g#O+h#i#j#k#n.l#n.n.l.m#<@f.n#g.. . ",
+". . o#m.m.m.m.m.m.m.m.m.p#q#r#s#t#u#m.m.l.v#r.s.r.q.:@n#g.. . . ",
+". . o#m.l.l.l.l.l.l.l.l.l.l.w#x#l.l.l.l.l.|#K._+u.o#n#g.. . . . ",
+". . o#l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.m#|#W.y#z#n#g.. . . . . ",
+". . o#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#<@|#A#v#B#g.. . . . . . ",
+". . o#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#<@|#C#1#g.. . . . . . . ",
+". . B#D#D#D#D#D#D#D#D#D#D#D#D#D#D#D#D#D#D#E#F#g.. . . . . . . . ",
+". . g.m#m#m#m#o.s.s.s.s.s.s.s.s.s.s.s.s.s.q.. . . . . . . . . . "};
diff --git a/share/metview/icons/TIFF.xpm b/share/metview/icons/TIFF.xpm
new file mode 100644
index 0000000..b0bff4c
--- /dev/null
+++ b/share/metview/icons/TIFF.xpm
@@ -0,0 +1,293 @@
+/* XPM */
+static char *TIFF___[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 255 2",
+"   c #0D9A2E820882",
+".  c #088E3A200495",
+"X  c #0CF3328F0826",
+"o  c #12F7312A0DCB",
+"O  c #06FA462A03BE",
+"+  c #05F2516301D2",
+"@  c #0B3A550A06F9",
+"#  c #0B4F5C840428",
+"$  c #14C968FE0964",
+"%  c #156368850AB7",
+"&  c #1B3C73740B7C",
+"*  c #22157D800EE9",
+"=  c #23CB7D711165",
+"-  c #58997C970000",
+";  c #DFF03E7C23B2",
+":  c #E7463F7624D3",
+">  c #EB963F43238A",
+",  c #990A4DCF3A2C",
+"<  c #BD7C46C32E17",
+"1  c #A44D4C5C3574",
+"2  c #AD084AAD32CC",
+"3  c #B4D749583100",
+"4  c #B98A48822FDD",
+"5  c #A06750BD3B5A",
+"6  c #C4B7465D2D7C",
+"7  c #CCA744D92B7E",
+"8  c #D092415D278E",
+"9  c #DEE24142270D",
+"0  c #D45C43FD2A64",
+"q  c #DA9E422D2825",
+"w  c #C1014AA132AA",
+"e  c #E38D404B25E6",
+"r  c #EF4541712363",
+"t  c #F16B454B2363",
+"y  c #F27F4BBE23AA",
+"u  c #F2D155482408",
+"i  c #F2C45D472784",
+"p  c #F24563652645",
+"a  c #F1906B802736",
+"s  c #F12F7345282B",
+"d  c #F0C37B792926",
+"f  c #91E64F814070",
+"g  c #8EFD4FDD440F",
+"h  c #8AE1506A4B99",
+"j  c #84AA4E32592E",
+"k  c #876E51735947",
+"l  c #84AE5082651D",
+"z  c #83F5504E6BFD",
+"x  c #829D4FB47987",
+"c  c #8355502A7313",
+"v  c #828B4FE27E7C",
+"b  c #2831849D124D",
+"n  c #2D3089E512F3",
+"m  c #31908D1513FB",
+"M  c #3C6E92921697",
+"N  c #39BC9187199E",
+"B  c #5C2E88B804D1",
+"V  c #447495E21819",
+"C  c #4B11980418F6",
+"Z  c #59D59CBA1AB4",
+"A  c #63459EB119CD",
+"S  c #6607A6731E68",
+"D  c #71BCA2C61F06",
+"F  c #62DFAF9A23CA",
+"G  c #7B64A5912245",
+"H  c #6108B07621FA",
+"J  c #6499BEE52EE6",
+"K  c #62A8C0B02DC2",
+"L  c #6398C94A33BE",
+"P  c #658ECD9E38D4",
+"I  c #68EAD6D144A6",
+"U  c #6A4BD9F54AE8",
+"Y  c #6F22E0915C2F",
+"T  c #744FE39E687D",
+"R  c #7817E6D77529",
+"E  c #86F8A8212260",
+"W  c #96A1ABD724A9",
+"Q  c #A535AF5226C3",
+"!  c #AE6FB1722835",
+"~  c #B9F7B3E729BC",
+"^  c #F05486752A81",
+"/  c #F0098B632AFB",
+"(  c #F08680E726E6",
+")  c #F09283152C12",
+"_  c #EFBA938C2BFE",
+"`  c #EF409CC42D2C",
+"'  c #C4FBB61C2BBD",
+"]  c #CBA5B6D62C55",
+"[  c #D4BAB7612D41",
+"{  c #DC69B6B32E3B",
+"}  c #EE40A4832E0B",
+"|  c #EBB0ABC62DE8",
+" . c #E49DB3C82EAF",
+".. c #EC91ACB93293",
+"X. c #A75CB9F9791C",
+"o. c #A8B2BB1D7B17",
+"O. c #7F0F4C82965F",
+"+. c #7FF54E7BA4C0",
+"@. c #7F5D4E29AC17",
+"#. c #7E644DBAB7D8",
+"$. c #62B97574AA64",
+"%. c #7D1B4D33C89F",
+"&. c #7B6A4C55D883",
+"*. c #7E8C5035D47F",
+"=. c #5EA56344C454",
+"-. c #66D86B38C71B",
+";. c #6CB270DFC8A7",
+":. c #77337B0ECC06",
+">. c #7B1A7EDACD9B",
+",. c #7B634D61E2D3",
+"<. c #7AF34E5BEBC2",
+"1. c #7AE74FBDF1A7",
+"2. c #7AFD5141F56F",
+"3. c #7B4354C6FAE1",
+"4. c #7D515BB3FDA9",
+"5. c #7EC3638FFEE9",
+"6. c #82204F878367",
+"7. c #81A84F658AAB",
+"8. c #81334F2B9222",
+"9. c #805F4ED69D91",
+"0. c #832A523C9861",
+"q. c #80BB6C87FE75",
+"w. c #836C7472FDB4",
+"e. c #84AD7BB3FD2E",
+"r. c #7F848BB0AE2E",
+"t. c #7BD38ACFB52E",
+"y. c #76898AF2C4CD",
+"u. c #7E4381ECCEB9",
+"i. c #61888A36FFFF",
+"p. c #68588F89FFAF",
+"a. c #6A5390B8FF9C",
+"s. c #710F962AFFEE",
+"d. c #75D59A12FFE9",
+"f. c #7C499E10FFA0",
+"g. c #7E56A05EFFE7",
+"h. c #BC31A27EB159",
+"j. c #BD9BBD9BBD9B",
+"k. c #DF009B868EF7",
+"l. c #D5249ECB91D9",
+"z. c #EADC99E48C46",
+"x. c #C390A24A9927",
+"c. c #F386A0458B33",
+"v. c #F329B4498D90",
+"b. c #A9A7CAB58652",
+"n. c #AA7BD75C8F80",
+"m. c #AB24DBD0929C",
+"M. c #838EEDF294AF",
+"N. c #AC94E49B9AC1",
+"B. c #B7BEC635B698",
+"V. c #B951C3B0B75E",
+"C. c #B73ACC2DB63D",
+"Z. c #BAADC6C0B880",
+"A. c #BAD9D49DB5A3",
+"S. c #BC32D3E8B879",
+"D. c #879BF058A08A",
+"F. c #8AA4F262AAD4",
+"G. c #8FA6F559BB25",
+"H. c #B09DE8E7AA8E",
+"J. c #C64CD0B88D8F",
+"K. c #F22CC9279021",
+"L. c #E7C9D63F9075",
+"P. c #C663DAD1B8F9",
+"I. c #E7C2C768BEC2",
+"U. c #F5FFC751BD9E",
+"Y. c #FB3DD2DBBF3C",
+"T. c #D424E56ABF15",
+"R. c #811484A6CFA1",
+"E. c #86DB97E9C824",
+"W. c #8DEB9114D37F",
+"Q. c #96B999A3D6D2",
+"!. c #98C79BA4D7C3",
+"~. c #90D4A538DFDC",
+"^. c #B8EAA078CFFD",
+"/. c #A277A502DA72",
+"(. c #A881AAE4DD01",
+"). c #A2D1B2C9E024",
+"_. c #B1E8B3F7DF2C",
+"`. c #868F8366FCA3",
+"'. c #87B2880BFC52",
+"]. c #88658C4FFC27",
+"[. c #82C99F7FF18E",
+"{. c #8ABB92E4FBB1",
+"}. c #8C689BA9FB29",
+"|. c #8B28A2CEE585",
+" X c #969CAC34E968",
+".X c #83DFA451FFE4",
+"XX c #8CE5A4F4FC13",
+"oX c #8C06AA38FFF1",
+"OX c #936FACB1F33A",
+"+X c #9193ADDBFD20",
+"@X c #939CB46DFB62",
+"#X c #96DFB9F8FBD9",
+"$X c #B749A086ED84",
+"%X c #B4A2B6AFE1C8",
+"&X c #BB5EBD28E2CB",
+"*X c #A67FBC16F942",
+"=X c #BB3FB144F898",
+"-X c #93AAF672C3B4",
+";X c #96A3F757CCEC",
+":X c #98FDF78CD68C",
+">X c #BB84EFDBC7ED",
+",X c #968CC41BF955",
+"<X c #9890CCD3F8D5",
+"1X c #99BAD511F7AD",
+"2X c #9C50DD4EF6A1",
+"3X c #BD86CE83FF52",
+"4X c #9DA2EDFFEEE9",
+"5X c #9DBFF430E763",
+"6X c #9D5FE6A2F3A1",
+"7X c #C63CC63CC63C",
+"8X c #CE15CE15CE15",
+"9X c #D7F6C815CD0F",
+"0X c #D52CD52CD52C",
+"qX c #DD6ADD47DD7E",
+"wX c #FB47DF49C159",
+"eX c #C24DF29EDF7A",
+"rX c #EC3EE9D1C8ED",
+"tX c #CC33CF39E798",
+"yX c #CA6FC6DCEE72",
+"uX c #CC2FD1ECE28E",
+"iX c #DE0FDFF8E56B",
+"pX c #D5FCD6F0EB03",
+"aX c #D852DBC7EB2D",
+"sX c #DB4CDDAAEC29",
+"dX c #D368C96EF4C9",
+"fX c #C7D0D7F7FA3B",
+"gX c #D540D44BF47B",
+"hX c #D320DC75F5B4",
+"jX c #D47BDF59FB87",
+"kX c #E119DF7DE1B8",
+"lX c #C547EFC6ED22",
+"zX c #DF23E159E7A1",
+"xX c #DE9AE1B4ECA8",
+"cX c #C844F41FECFB",
+"vX c #C3A1E2A6F088",
+"bX c #D639E255FE89",
+"nX c #DB5CE689FFFB",
+"mX c #DF73E888FFFF",
+"MX c #E4BDE483E530",
+"NX c #E8C4E860E73E",
+"BX c #E8E8E87BE84D",
+"VX c #E2C9E3F4EC42",
+"CX c #E5ADE9E1EF09",
+"ZX c #ED1EECDCEDC7",
+"AX c #F101EFB9EFCF",
+"SX c #E6D8E75AF1FC",
+"DX c #E83DEAECF259",
+"FX c #EC2BECC3F207",
+"GX c #E4F9EBC3FFFF",
+"HX c #E9D6EF62FFFF",
+"JX c #EE56F354FFCC",
+"KX c #F493F4A6F55E",
+"LX c #F995F981F7CF",
+"PX c #F7ABF7B9F8DC",
+"IX c #FD88FD87FD7A",
+/* pixels */
+"IXMXCXVXiXVXzXzXiXxXxXxXxXxXxXxXsXsXsXsXsXsXaXaXaXaXaXsXqXKXIXIX",
+"IXMXfX).r.E.t.E.t. X#X at X+XoXoX.X.Xf.f.f.f.f.f.f.f.f.f.oXuXNXIXIX",
+"IXMX3X*XE.y.$.y.$.[..X.Xf.d.s.a.p.i.i.i.i.i.i.i.i.i.i.s.uXNXIXIX",
+"IXMXfX*X X~.|.OX|.+XoXoX.Xg.f.d.s.a.a.a.a.a.a.a.a.a.p.d.uXNXIXIX",
+"IXMXJXJXJXJXJXHXHXGXGXGXmXnXnXnXbXbXbXjXjXjXhXhXhXhXhXhXqXNXIXIX",
+"IXMXZXZ.V.Z.C.S.P.P.T.rXwXwXY.U.U.U.I.I.9X9XtXdXdXgXhXCXqXNXIXIX",
+"IXBXV.o X . @ % = N G ' ..) i t e 0 w 5 k 0.*.4.w.{. at XvXqXNXIXIX",
+"IXBXV.  . O # & b Z Q  ._ a y : q 7 2 g x #.<.5.`.XX1XlXqXNXIXIX",
+"IXBXV.X . + $ * M G ] | ( u r 9 7 < , k 9.&.3.w.{.#X4XeXqXNXIXIX",
+"IXBXV.. O # & n Z Q  ._ a t : 0 6 2 h v #.1.5.`.XX1X:X>XqXNXIXIX",
+"IXNXB.O + $ * M E ] } d u > 9 7 4 , l 9.&.4.w.{.#X4XF.H.qXNXIXIX",
+"IXNXB.O # & n Z !  ._ p t e 0 6 2 h 6.%.2.q.'.XX2X:XR N.kXNXIXIX",
+"IXNXC.@ $ = V E [ } d u > 9 7 4 , l +.,.4.e.{.,X4XF.U m.kXNXIXIX",
+"IXMXC.% & n A ~  ./ p t e 0 6 1 h 7.%.2.q.'.+X2X;XR P n.kXNXIXIX",
+"IXMXS.& b V W [ ` s y > q 7 4 , z @.,.4.e.}.,X5XD.U K b.MXNXIXIX",
+"IXMXS.= m D ~ | / p r e 0 6 1 k 7.%.3.q.].+X6X;XT P H b.MXNXIXIX",
+"IXMXS.b C W { ` s y > q 7 3 f c @.<.4.e.}.<X5XM.U J Z o.MXNXIXIX",
+"IXMXA.N D ~ | ^ i r e 0 6 1 k 8.*.3.q.]. at X6X-XT P F B o.MXNXIXIX",
+"IXMXA.Z W { ` s y : q 7 3 g c #.<.5.e.}.<X5XM.I J A B o.MXNXIXIX",
+"IXMXP.G ' | ( u > ; 8 < , j O.&.3.q.]. at X6XG.Y L S B - o.MXNXIXIX",
+"IXMXqXJ.L.K.v.c.z.z.k.l.x.h.^.$X=X=XyXfXcX>XN.m.b.o.X.P.MXNXIXIX",
+"IXqXKXsXaXsXaXVXFXDXKXxXaXsXFXCXsXaXVXKXAXZXZXZXZXZXZXFXqXNXIXIX",
+"IXqXSXW.:.=.>./.&X/.VX;.u.R.pX/.;.u./.KXqX0X0X0X0X0X0X0Xj.ZXIXIX",
+"IXqXKXKXpXu.DXKX&XQ.sX>.VXFXKXQ._.FXFXKX0XKXIXIXIXIXIXqXqXIXIXIX",
+"LXqXPXPXsXR.KXLX&X!.xX=.u.W.FXQ.-.u.&XPX0XZXLXLXIXIXqXqXIXIXIXIX",
+"LXqXPXPXsXR.KXLX&X!.sX>.pXsXKXQ.(.sXDXPX0XBXKXKXKX0XqXIXIXIXIXIX",
+"LXqXPXLXsXu.KXLX&X!.sXu.KXLXLXQ.&XLXPXPX0XNXZXZX0XqXIXIXIXIXIXIX",
+"LXqXLXLXSX/.KXLXtX%XSX/.KXPXLX%XtXLXPXPX0XMXBX8XqXIXIXIXIXIXIXIX",
+"LXqXLXLXLXPXLXLXPXPXLXPXLXLXLXPXPXLXLXLX0XqX8XqXIXIXIXIXIXIXIXIX",
+"LXqXLXLXLXLXLXLXLXLXLXLXLXLXLXLXLXLXLXLX0X7XqXIXIXIXIXIXIXIXIXIX",
+"IXqXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMXMX8XqXIXIXIXIXIXIXIXIXIXIX",
+"IXIXLXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXLXIXIXIXIXIXIXIXIXIXIXIXIX"
+};
diff --git a/share/metview/icons/VELSTR.xpm b/share/metview/icons/VELSTR.xpm
new file mode 100644
index 0000000..7e42e25
--- /dev/null
+++ b/share/metview/icons/VELSTR.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static char * VELSTR_xpm[] = {
+"32 32 4 1",
+" 	c #AFAFAFAFAFAF",
+".	c #FFFFFFFFFFFF",
+"X	c #555555555555",
+"o	c #B2B2B2B2B2B2",
+"                                ",
+" .............................. ",
+" ......Xo...................... ",
+" ......Xo...................... ",
+" ......Xo...................... ",
+" .Xo...Xo...oX................. ",
+" .Xo...Xo...oX................. ",
+" .Xo...Xo...oX................. ",
+" .Xo...Xo...oX................. ",
+" .Xo...Xo...oX................. ",
+" ..Xo..Xo..oX.................. ",
+" ...Xo.Xo.oX................... ",
+" ....XooooX.................... ",
+" .....XXXX..................... ",
+" ......Xo...................... ",
+" ......Xo...................... ",
+" ......Xo...................... ",
+" ......Xo.......XXX.........Xo. ",
+" ......Xo.......XooXX......Xo.. ",
+" ..................oX.....Xo... ",
+" ...................oX...Xo.... ",
+" ...................oX..Xo..... ",
+" ....................oXXo...... ",
+" .....................Xo....... ",
+" ....................XoXo...... ",
+" ...................Xo..Xo..... ",
+" ..................Xo...Xo..... ",
+" .................Xo.....Xo.... ",
+" ................Xo......XXooX. ",
+" ...............Xo.........XXX. ",
+" .............................. ",
+"                                "};
diff --git a/share/metview/icons/VPROFILE.xpm b/share/metview/icons/VPROFILE.xpm
new file mode 100755
index 0000000..fde1380
--- /dev/null
+++ b/share/metview/icons/VPROFILE.xpm
@@ -0,0 +1,45 @@
+/* XPM */
+static char * VPROF_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" 	c white",
+".	c magenta",
+"X	c #777777",
+"o	c #CCCCFF",
+"O	c black",
+"+	c #00007F7FFFFF",
+"@	c #D9D9B7B77777",
+/* pixels */
+"         .                      ",
+"          .                     ",
+"           .                    ",
+"            ..                  ",
+"              .                 ",
+"              ..                ",
+"               ...              ",
+"         XXXXXXXX.XXXXX         ",
+"     XXXXoooooooo.oooooXXXX     ",
+"  XXXoooooooooooo.oooooooooXXX  ",
+" Xooooooooooooooo.ooooooooooooX ",
+"Xoooooooooooooooo.oooooooooooooX",
+"oooooooooXXXXXX...XXXXXooooooooo",
+"oooooXXXXooooo..oooooooXXXXooooo",
+"ooXXXoooooo....ooooooooooooXXXoo",
+"oXooooooooo.ooooooooooooooooooXo",
+"Xoooooooooo.oooooooooooooooooooX",
+"oooooooooXX.XXXXXXXXXXXooooooooo",
+"oooooXXXXoo..ooooooooooXXXXooooo",
+"ooXXXooooooo...ooooooooooooXXXoo",
+"oXooooooooooooo....oooooooooooXo",
+"Xooooooooooooooooo...ooooooooooX",
+"oooooooooXXXXXXXXXXX...ooooooooo",
+"oooooXXXXooooooooooooo..XXXooooo",
+"ooXXXoooooooooooooooooo..ooXXXoo",
+"oXoooooooooooooooooooooo.oooooXo",
+"Xooooooooooooooooooooooo.ooooooX",
+"oooooooooOOOOOOOOOOOOOOo.ooooooo",
+"oooooOOOO++++++@@@@@@@@OOOOOoooo",
+"ooOOO+++++++++@@@@@@@@@@@@@OOOoo",
+"oO++++++++++@@@@@@@@@@@@@@@@@@Oo",
+"O++++++++++@@@@@@@@@@@@@@@@@@@@O"};
diff --git a/share/metview/icons/WASTEBASKET.xpm b/share/metview/icons/WASTEBASKET.xpm
new file mode 100644
index 0000000..31832b1
--- /dev/null
+++ b/share/metview/icons/WASTEBASKET.xpm
@@ -0,0 +1,149 @@
+/* XPM */
+static char *WASTEBASKET[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 111 2",
+"   c #000101",
+".  c #030304",
+"X  c #030404",
+"o  c #060607",
+"O  c #070707",
+"+  c #080809",
+"@  c #080909",
+"#  c #090A0B",
+"$  c #0A0A0B",
+"%  c #0B0C0C",
+"&  c #0E0E0F",
+"*  c #0E0F10",
+"=  c #0F1011",
+"-  c #111214",
+";  c #121314",
+":  c #131415",
+">  c #141516",
+",  c #141617",
+"<  c #17191A",
+"1  c #191A1C",
+"2  c #191B1C",
+"3  c #1E1F21",
+"4  c #1F2123",
+"5  c #222426",
+"6  c #232527",
+"7  c #28292C",
+"8  c #2D2F31",
+"9  c #2E3033",
+"0  c #313335",
+"q  c #313336",
+"w  c #37393C",
+"e  c #3A3C3F",
+"r  c #404346",
+"t  c #424447",
+"y  c #424547",
+"u  c #44474A",
+"i  c #474B4F",
+"p  c #484B4F",
+"a  c #484C50",
+"s  c #4C5054",
+"d  c #4F5155",
+"f  c #52555A",
+"g  c #54575C",
+"h  c #55585D",
+"j  c #5A5E62",
+"k  c #5C5F64",
+"l  c #5D6065",
+"z  c #61656A",
+"x  c #676A70",
+"c  c #6A6E74",
+"v  c #6E7175",
+"b  c #6E7276",
+"n  c #6E7278",
+"m  c #73777B",
+"M  c #76797E",
+"N  c #767A7E",
+"B  c #777C84",
+"V  c #777D84",
+"C  c #777D85",
+"Z  c #7F8288",
+"A  c #83868A",
+"S  c #84878B",
+"D  c #83878C",
+"F  c #8B8E92",
+"G  c #8C9095",
+"H  c #8F9299",
+"J  c #90949A",
+"K  c #94979B",
+"L  c #93969C",
+"P  c #94989B",
+"I  c #95989C",
+"U  c #989CA2",
+"Y  c #9CA2A9",
+"T  c #A2A7AD",
+"R  c #A4A7AC",
+"E  c #A4AAB0",
+"W  c #ACAFB4",
+"Q  c #AEB2B9",
+"!  c #B7BAC1",
+"~  c #B9BCC3",
+"^  c #BFC2C6",
+"/  c #BEC1C8",
+"(  c #C0C3C9",
+")  c #C5C8D0",
+"_  c #C7CAD1",
+"`  c #C9CCD0",
+"'  c #D1D4DB",
+"]  c #D4D7DE",
+"[  c #D6D9DD",
+"{  c #DDDFE5",
+"}  c #DFE1E7",
+"|  c #E2E4E7",
+" . c #E3E5E7",
+".. c #E0E1E8",
+"X. c #E1E3EA",
+"o. c #E4E6E9",
+"O. c #E6E7EE",
+"+. c #E7E8EF",
+"@. c #EBEDEF",
+"#. c #EAEBF1",
+"$. c #EDEEF0",
+"%. c #EDEDF3",
+"&. c #EEEEF4",
+"*. c #EEF0F1",
+"=. c #F1F2F4",
+"-. c #F6F8F9",
+";. c #F7F8F9",
+":. c #FAFAFB",
+">. c #FBFBFC",
+",. c #FBFCFC",
+"<. c #FFFFFF",
+/* pixels */
+"<.<.<.<.<.<.<.<.<.<.<.<.>.:.>.;.>.;.>.,.<.<.<.<.<.<.<.<.<.<.<.<.",
+"<.<.<.<.<.<.<.<.<.<.<.;.T v v v v v m ^ <.<.<.<.<.<.<.<.<.<.<.<.",
+"<.<.<.<.<.<.>.:.,.:.>.%.A a a a a i s T ;.,.>.,.:.>.<.<.<.<.<.<.",
+"<.<.<.<.,.` D M M M M M v c c c c c c m M M M M M G [ <.<.<.<.<.",
+"<.<.<.<. at .h                                         v ;.<.<.<.<.",
+"<.<.<.<.=.m < : > > > > > > > : > > : : > > : : : 4 G :.<.<.<.<.",
+"<.<.<.<.<.o.Y V B B B V C C B B V V V V V V V V V E %.<.<.<.<.<.",
+"<.<.<.<.<.<.F ; & & & ; * = & & = = * * = = * & > U <.<.<.<.<.<.",
+"<.<.<.<.<.<.A .                                 + P <.<.<.<.<.<.",
+"<.<.<.<.<.,.D X 8 x w       1 z a o     + f k : o I <.<.<.<.<.<.",
+"<.<.<.<.<.<.A = U O.E ;     x X.) 0     y ' { h o P <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ~ &.( 5   + J #.} f     l O.O.m @ P <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ~ &.( 6   @ L #.} h     l O.O.V @ K <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 1 ~ &.( 6   @ L #.X.f     k O.O.M $ K <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 1 ~ %./ 5   @ L #.} g     k O.+.V $ I <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ~ &.( 5   @ L +.X.f     k O.O.M @ I <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 2 ~ &.( 6   @ L #.} g     l +.O.B @ K <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 2 ~ &.( 6   @ L O.} g     j O.O.M @ K <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 2 ~ &.( 5   O L #.} g     l O.O.B $ P <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 2 ~ &./ 5   + L #.} f     j O.O.M $ P <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ~ &./ 5   O L #...g     l O.O.m @ K <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 1 ~ #.( 6   $ L #...g     j O.O.B @ L <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ~ &.( 6   O L #...g     l +.O.M @ I <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 1 ~ &.( 6   O L #...g     l +.O.M @ I <.<.<.<.<.<.",
+"<.<.<.<.<.<.A 1 ~ &./ 6   @ L #.} g     k O.O.M $ I <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ~ %./ 5   @ L #.} h     k O.O.M $ I <.<.<.<.<.<.",
+"<.<.<.<.<.,.A 1 ! %.~ 5   o F %.{ s     j O.+.m @ I <.<.<.<.<.<.",
+"<.<.<.<.<.<.D @ A ] J %     g ` Q 5     0 ~ ) u o I <.<.<.<.<.<.",
+"<.<.<.<.<.,.D   - r 1       @ e 7         9 w o o K <.<.<.<.<.<.",
+"<.<.<.<.<.<.A X                                 o L <.<.<.<.<.<.",
+"<.<.<.<.<.,.R y t t t t t t t t t t r t t t t t i W <.<.<.<.<.<.",
+"<.<.<.<.<.<.&. .| | | | | | | | | | | o.| | | | | *.<.<.<.<.<.<."
+};
diff --git a/share/metview/icons/WCS_CLIENT.xpm b/share/metview/icons/WCS_CLIENT.xpm
new file mode 100755
index 0000000..1e0c454
--- /dev/null
+++ b/share/metview/icons/WCS_CLIENT.xpm
@@ -0,0 +1,293 @@
+/* XPM */
+static char *WCS_CLIENT[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 255 2",
+"   c #3AA64C896BB8",
+".  c #38E458CE6667",
+"X  c #44024CCE5CF8",
+"o  c #5AC566C55798",
+"O  c #424A4F806E2D",
+"+  c #49F953946729",
+"@  c #56095B196795",
+"#  c #49BA569C741E",
+"$  c #50845D417A5C",
+"%  c #49B0609D66B1",
+"&  c #59E265AE6A24",
+"*  c #4C0E7ACB6F29",
+"=  c #5B5B77DF692D",
+"-  c #4DD461C37098",
+";  c #5A926A21761C",
+":  c #6224669C6C59",
+">  c #690F6ADD6F40",
+",  c #69E87B026EAD",
+"<  c #61746BC575AA",
+"1  c #67AD746173AA",
+"2  c #73F379F67A07",
+"3  c #9B307A6636E9",
+"4  c #8E767C14562C",
+"5  c #95887FC25339",
+"6  c #916A7F73592F",
+"7  c #4E5683E97EDF",
+"8  c #5BC083E77C00",
+"9  c #5D34997B76BF",
+"0  c #659981737DE3",
+"q  c #B44D8ACA3684",
+"w  c #DACEA2CE3888",
+"e  c #E40EA9523BD3",
+"r  c #9D0E82CE4F8C",
+"t  c #860D84165549",
+"y  c #9644804B5583",
+"u  c #98E8835855ED",
+"i  c #A9BB899F4F93",
+"p  c #BE96963F4AF9",
+"a  c #A1B2886F5689",
+"s  c #B025913259B8",
+"d  c #B8D8969D59D8",
+"f  c #8B1481C36D90",
+"g  c #923A89147028",
+"h  c #B4999E906DE8",
+"j  c #B700A14072A9",
+"k  c #BCD0A5337553",
+"l  c #B714A6D67D6C",
+"z  c #C2309A495C2B",
+"x  c #D991A3D245E0",
+"c  c #D8C6A5C25722",
+"v  c #E21FA953458E",
+"b  c #E14BAA4C4EDA",
+"n  c #E10FAB4D584E",
+"m  c #C58DA4EB6EEA",
+"M  c #D82BA78063F4",
+"N  c #E000AC4D61C3",
+"B  c #DE3CAD376C45",
+"V  c #D49CAC8F72FB",
+"C  c #DE83AFD97477",
+"Z  c #DF24B04E74EE",
+"A  c #DBB8B3127BD2",
+"S  c #E088AD0864E0",
+"D  c #23F56E3799E7",
+"F  c #26F070389B06",
+"G  c #2AF872459BF4",
+"H  c #339376189D5F",
+"J  c #355F78F29E7E",
+"K  c #39B77B479F0F",
+"L  c #34567966A137",
+"P  c #3B447C89A286",
+"I  c #5B63678F83B9",
+"U  c #50AC71B08E74",
+"Y  c #434D7CB3A005",
+"T  c #5276739C907D",
+"R  c #56947A339404",
+"E  c #76B07D7A832D",
+"W  c #6DF478C79251",
+"Q  c #40747C92A0E2",
+"!  c #5C7980358972",
+"~  c #4BC184999F7C",
+"^  c #5CF183ED96AC",
+"/  c #604B8BD08D53",
+"(  c #7DD283D78A22",
+")  c #78A085A488B9",
+"_  c #70CB9A388014",
+"`  c #7EC294ED8EF2",
+"'  c #650085F49EAA",
+"]  c #65888EB09962",
+"[  c #7AE48816923D",
+"{  c #77DB89599C9F",
+"}  c #6E1B98939DDF",
+"|  c #7EA39A7C9614",
+" . c #758DA049833B",
+".. c #43B4807BA481",
+"X. c #4D8D84D2A451",
+"o. c #4BE687E5AA77",
+"O. c #53AE84DFA3E0",
+"+. c #58048A5AA5F6",
+"@. c #53EA8D5EAD91",
+"#. c #5BBC91DBADD4",
+"$. c #66548606A036",
+"%. c #665D8A06A391",
+"&. c #6B368D00A4FB",
+"*. c #686E8E7EA8AD",
+"=. c #6C37923EAAEC",
+"-. c #6D259950AC2C",
+";. c #73E99330AB54",
+":. c #7A55976CA95A",
+">. c #7E269A3DAE48",
+",. c #6AF09B93B5E5",
+"<. c #7E019C3BB2AB",
+"1. c #7C92A1D3AFB8",
+"2. c #7A1EA2F2B678",
+"3. c #84AA89218C57",
+"4. c #918F8D268524",
+"5. c #82D291B58B64",
+"6. c #81C29C1E8EB3",
+"7. c #8A2F8E0A959A",
+"8. c #83508B069C36",
+"9. c #8DA6933B950B",
+"0. c #8B849B619B70",
+"q. c #9346961C960A",
+"w. c #98009B799629",
+"e. c #938E94F79AB8",
+"r. c #94939AA99A59",
+"t. c #9D959D4F9D18",
+"y. c #A02B9FCC9F7E",
+"u. c #88DFA79A9670",
+"i. c #9213A7B79AC2",
+"p. c #9BDCA49D9D2E",
+"a. c #A251ABBC8E1E",
+"s. c #BFCEABA7816D",
+"d. c #84158BF0A0ED",
+"f. c #8A5A92C8A672",
+"g. c #8B129957A76A",
+"h. c #82C69BB5AD8F",
+"j. c #96859ABCA702",
+"k. c #91909E34A652",
+"l. c #91FE9A40AD17",
+"z. c #83999E0CB1D7",
+"x. c #973F9EA1B095",
+"c. c #8455AC86AD16",
+"v. c #936EA451A46B",
+"b. c #9C90A4BEA384",
+"n. c #968FA3DDAA41",
+"m. c #9AEAB5C7A67A",
+"M. c #9A8CB683A8A6",
+"N. c #8597A3E5B4CE",
+"B. c #8A52A320B3C4",
+"V. c #8ADCA408B90E",
+"C. c #8105A9E5BEE0",
+"Z. c #8C9EAC3FBCE9",
+"A. c #9319A59EB52C",
+"S. c #9AE7A2A2B407",
+"D. c #9370AC75BD94",
+"F. c #98CCAAC1B842",
+"G. c #9BE8B511BDBE",
+"H. c #A105A418A0F6",
+"J. c #A693ADBDAAED",
+"K. c #AA4AAA02A9B6",
+"L. c #AB49B181AC3A",
+"P. c #A435BCD1ABC3",
+"I. c #A037A625B47C",
+"U. c #A096A741B8CB",
+"Y. c #A5B3ADA5BC3E",
+"T. c #AB52AFBEB8F0",
+"R. c #A386B66DB386",
+"E. c #A302B34EBC96",
+"W. c #ACCAB7E9BB2E",
+"Q. c #B30AB711B65F",
+"!. c #B2E7B893B6F0",
+"~. c #B3ABB5B2BD59",
+"^. c #B30FBC91BA09",
+"/. c #BCB5BC7FBBA2",
+"(. c #C9B9B0018102",
+"). c #C833B4EA8CC1",
+"_. c #DAFEB76984EF",
+"`. c #D7BAB9C08AE4",
+"'. c #D993BBF88DFC",
+"]. c #D72EBF82961A",
+"[. c #A37DC30BB3BE",
+"{. c #A7ACCA77BC5C",
+"}. c #B599C265BD6D",
+"|. c #D710C25F9BC3",
+" X c #CF45CF7BBA49",
+".X c #D867CD48B549",
+"XX c #DB77D351BE21",
+"oX c #8ABFB013C266",
+"OX c #9446B5B3C4D3",
+"+X c #9BA2B352C3E8",
+"@X c #93B6B8E5C81A",
+"#X c #9D00B926C6E0",
+"$X c #98CABAE1C993",
+"%X c #A338B6B1C787",
+"&X c #AE56B446C407",
+"*X c #A481BB7AC3F2",
+"=X c #AE6ABB08C335",
+"-X c #A267BF4DCBD4",
+";X c #AC75BE58CD88",
+":X c #B30DB827C09B",
+">X c #B68DB93BC0BE",
+",X c #B63FBB86CA6E",
+"<X c #9E85C272CE51",
+"1X c #AB25C709CC2A",
+"2X c #B875C7B1C5CA",
+"3X c #BD61CC0FC51A",
+"4X c #BBE6C273CCF2",
+"5X c #BBE4D45DC8A3",
+"6X c #AAD9C6EAD1AC",
+"7X c #B4BDC42ED1B4",
+"8X c #BEA9CAB5D593",
+"9X c #B981D71DD9F0",
+"0X c #BF9EE196DD8E",
+"qX c #BE73DF57E482",
+"wX c #C6C7CB8DCC29",
+"eX c #DF4AD909C6CF",
+"rX c #C3E0C846D556",
+"tX c #C506C942D6A5",
+"yX c #CC7CCFE4DC79",
+"uX c #C988D6D7D9B7",
+"iX c #C624DF85D881",
+"pX c #D2A6D63DD74D",
+"aX c #DB97DC5BDCAF",
+"sX c #E1F8DD6DCD5C",
+"dX c #E6C4DFEAD0B5",
+"fX c #C869E33FDDBA",
+"gX c #D858E248DF96",
+"hX c #E908E51ADAC4",
+"jX c #CFD9DA92E411",
+"kX c #D3D9DD18E534",
+"lX c #DBFADF65E156",
+"zX c #C3C6E53FE290",
+"xX c #C8E1E456E8AE",
+"cX c #CE13ED2AEEB2",
+"vX c #D6BFE68AE5E4",
+"bX c #DE60E57AEBBD",
+"nX c #D22AEDD4EF57",
+"mX c #CF26EEBBF0B8",
+"MX c #D3F1EF84F11A",
+"NX c #D015F074F252",
+"BX c #D65EF0EAF256",
+"VX c #DBF2F28CF3A0",
+"CX c #E896E7A5E6B8",
+"ZX c #EA87E94BE81F",
+"AX c #E58BEB18EFDB",
+"SX c #F27DEF1AE6EE",
+"DX c #F4FBF36EEEF6",
+"FX c #EA83EF34F2EE",
+"GX c #E073F4E6F663",
+"HX c #EED9F26EF579",
+"JX c #F525F672F763",
+"KX c #F957F87CF6AA",
+"LX c #F4F3F741F95E",
+"PX c #F817F9D6FB60",
+"IX c #FFA6FFB4FFBF",
+/* pixels */
+"IXIXIXIXIXIXIXIXIXIXIXIXIXIXPXLXJXPXIXIXIXIXIXIXIXIXIXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXIXIXLXbX;XD.V.<.<.V.D.7XbXPXIXIXIXIXIXIXIXIXIXIX",
+"IXIXIXIXIXIXPXKXFX7X;.' :.D.%X6X6X#XD.:.$.>.8XJXKXKXKXKXKXKXPXIX",
+"IXIXIXIXIXaXt.9.E ; < ) 9.9.9.9.9.q.q.3.) < & E q.w.w.w.w.w.t.aX",
+"IXIXIXIXIXK.9.g.B.3XwXE.*XwX4XG.2XwXW.| :.n.b.n.g.B.D.=XpXpXK.H.",
+"IXIXIXIXPX9.0.1.P 6XuXP @.aX$XP *XR.~ H J K B.F.P H P o.uXZX/.t.",
+"IXIXIXIX;X- b.*XG oX1XL L 8X2.H M.+.F z.E.A.F.;.D ;.A.+XlXZX/.t.",
+"IXIXIXuXR ; b.^.K ,.2. at .o.OX@.X.R.K X.:X>X~.~.z.G J +.N.pXZX/.t.",
+"IXIXHX&.7 1 i.}.#... at .C.,.#.J -.3XK X.:X>X~.~.T.>.O.G F V.CX/.t.",
+"IXIX7X^ 9 = J.gXC.D L G.1.G F B.^.O.G A.~.Y.Y.F.S.S.;.D =.yX/.t.",
+"IXJX;.<XzX0.!.vX-XF J R.F.G G E.wXF.P H ..Q B.>.J Y H H h.=XQ.t.",
+"IXkX*.qXNXk.!.vXuX at XOX}.^.N.#X3X}.4XR.Z.1.>.T.Y.>.*.*.h.I.Y.J.y.",
+"IX%X2.cXmXv.q.!.!.!.J.p.p.L./.Q.p.r.H.!.w.r.e.e.e.e.9.7.7.7.3.K.",
+"PXV. at XcXcX9Xn.v.5.2 3.3.( 2 , r.b.b.5.& : : & @ @ @ + + X X ; aX",
+"LX>.c.zXcXcXBXcXm.2XtX4X,X&Xv.i.iX5X6.[ { W W W I I $ # O   R FX",
+"HX&.8 u.zXcXMX9Xm.yXrX4X,X&XY.n.` ` 8.d.( 2 2 1 > : & # O   T AX",
+"HX' } _ 1XmXMX[.}.yXrX4X,X&XY.U.S.l.f.8.4 q q q q q 3 @ O   U bX",
+"JX&./  .0XcXMX[.}.yXrX4X,X&XY.S.S.l.f.8.5 w e e e e q o O   R FX",
+"PXN.* {.cXcXMX9Xm.yXtX4X,X&XY.U.S.l.f.8.5 x v v v v p a.%   ' HX",
+"IX%X] zXcXcXnXcXm.R.4X4X,X&XY.S.S.l.f.8.y x b b b b p  X= . >.PX",
+"IXkX*.qXcXcXnXMXzX{.m.i.i.v.Y.U.S.l.f.8.y c n n n n p eX3X! ;XIX",
+"IXJX;.<XcXcXcXnXMXBXnXfXiXM.0.U.S.l.f.8.y c S N N S d sXFX;.kXIX",
+"IXIX;X=.xXcXcXnXMXMXBXVXVXvXu.S.x.j.7.3.5 M B B B S d XX=X:.DXIX",
+"IXIXHX;.$XcXnXnXMXMXBXVXVXVXm.k.j.6 r a i B C C C Z z s a u XXIX",
+"IXIXIX8X%.9XMXnXMXMXBXVXVXVXM.k.S.4.i V A A A A A A A V d ).KXIX",
+"IXIXIXIX%X=.qXMXMXMXBXVXVXGXP.k.S.l.g s _._._._._._._.m s.DXIXIX",
+"IXIXIXIXLXD.=.9XBXBXBXVXVXVX2X0.S.l.f.f d `.'.'.'.'.m k SXIXIXIX",
+"IXIXIXIXIXJX+X%.6XnXVXVXVXVXiX6.x.l.f.[ t k ].].|.(.j hXIXIXIXIX",
+"IXIXIXIXIXIXPX7X&.<.9XnXVXGXVX[.` f.f.) P.l k |.).h dXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXAX+X&.:.OX9XxXvX2X| 0 8 h.{ g l h eXIXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXIXIXAX7XV.;.&.;.;.%.^ :.%XjXhXj .XIXIXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXIXIXIXIXPXHXAXkXkXbXFXLXIXIXIXDXPXIXIXIXIXIXIXIX"
+};
diff --git a/share/metview/icons/WEBACCESS.xpm b/share/metview/icons/WEBACCESS.xpm
new file mode 100755
index 0000000..ceeb71b
--- /dev/null
+++ b/share/metview/icons/WEBACCESS.xpm
@@ -0,0 +1,643 @@
+/* XPM */
+static char * WEBACCESS_xpm[] = {
+"32 32 608 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #10217B",
+"@ 	c #1A73C7",
+"# 	c #409FA8",
+"$ 	c #6DB9D2",
+"% 	c #9EDBE7",
+"& 	c #A3DDEA",
+"* 	c #90C9F7",
+"= 	c #1D79D0",
+"- 	c #3672CA",
+"; 	c #0E6EA1",
+"> 	c #331E7E",
+", 	c #166DC5",
+"' 	c #80B7CA",
+") 	c #81B9C9",
+"! 	c #83C0EC",
+"~ 	c #6FBAD3",
+"{ 	c #9CDAE6",
+"] 	c #A3DEEA",
+"^ 	c #98D5E7",
+"/ 	c #6AB4D5",
+"( 	c #5FABD0",
+"_ 	c #5EA7CA",
+": 	c #1B6F99",
+"< 	c #204B67",
+"[ 	c #3168C5",
+"} 	c #1790CA",
+"| 	c #7FB8E9",
+"1 	c #69B4D1",
+"2 	c #6FB6CF",
+"3 	c #6EB5CF",
+"4 	c #73BAD3",
+"5 	c #9CD9E6",
+"6 	c #A3DEE9",
+"7 	c #9BD9E6",
+"8 	c #71BBD5",
+"9 	c #87C1EE",
+"0 	c #639AC9",
+"a 	c #61739C",
+"b 	c #C6B06A",
+"c 	c #D4D318",
+"d 	c #303A45",
+"e 	c #EC9A47",
+"f 	c #07629B",
+"g 	c #2F6CC4",
+"h 	c #5AA7CC",
+"i 	c #69AFC8",
+"j 	c #75B1C4",
+"k 	c #74AFBF",
+"l 	c #8EA0A4",
+"m 	c #72B7CE",
+"n 	c #9BD8E5",
+"o 	c #A0DCE7",
+"p 	c #99D8E5",
+"q 	c #71BAD4",
+"r 	c #6BB3D1",
+"s 	c #689BCA",
+"t 	c #5B91B0",
+"u 	c #527789",
+"v 	c #5C5C3E",
+"w 	c #E4A21D",
+"x 	c #EAB115",
+"y 	c #F7A111",
+"z 	c #E48C3B",
+"A 	c #DF7427",
+"B 	c #2E4764",
+"C 	c #244B92",
+"D 	c #2A7298",
+"E 	c #6392AC",
+"F 	c #6F96A5",
+"G 	c #D69950",
+"H 	c #C89B63",
+"I 	c #5C8BA6",
+"J 	c #8DC5CA",
+"K 	c #8FCCD1",
+"L 	c #72CDF1",
+"M 	c #8DCAD3",
+"N 	c #6EB9D2",
+"O 	c #6DA6CF",
+"P 	c #89C0CA",
+"Q 	c #5082A6",
+"R 	c #426E71",
+"S 	c #C7C760",
+"T 	c #E0D957",
+"U 	c #F1E370",
+"V 	c #F8AD13",
+"W 	c #F7A50D",
+"X 	c #CF9080",
+"Y 	c #DE7632",
+"Z 	c #DB6E21",
+"` 	c #D99960",
+" .	c #CF9A67",
+"..	c #D09C67",
+"+.	c #D39D63",
+"@.	c #D6812E",
+"#.	c #CE8438",
+"$.	c #58776B",
+"%.	c #6AB0C0",
+"&.	c #69C6CA",
+"*.	c #6BCACE",
+"=.	c #6BC9CF",
+"-.	c #6BBAD3",
+";.	c #6DC7ED",
+">.	c #8EC8CE",
+",.	c #8CC4CA",
+"'.	c #65B5BD",
+").	c #414E71",
+"!.	c #404363",
+"~.	c #323341",
+"{.	c #DFD81B",
+"].	c #F4E94F",
+"^.	c #FDEF06",
+"/.	c #D15114",
+"(.	c #D76A17",
+"_.	c #E58934",
+":.	c #F59254",
+"<.	c #E58E3B",
+"[.	c #DF7B20",
+"}.	c #DD791C",
+"|.	c #DE7617",
+"1.	c #CC741E",
+"2.	c #579287",
+"3.	c #68ACBF",
+"4.	c #67C6CB",
+"5.	c #67C8CC",
+"6.	c #67B9CF",
+"7.	c #69B9D1",
+"8.	c #89C8CF",
+"9.	c #6DC8CF",
+"0.	c #6DBACE",
+"a.	c #85BAC3",
+"b.	c #3D4E7A",
+"c.	c #172F62",
+"d.	c #1B2368",
+"e.	c #4D5262",
+"f.	c #E4C416",
+"g.	c #F2D90D",
+"h.	c #FDD10D",
+"i.	c #FFF785",
+"j.	c #C8490F",
+"k.	c #E0781C",
+"l.	c #E1761E",
+"m.	c #E07719",
+"n.	c #E1761F",
+"o.	c #DF751C",
+"p.	c #DF731A",
+"q.	c #DE7212",
+"r.	c #D46F16",
+"s.	c #B75222",
+"t.	c #78A2AB",
+"u.	c #77ABB6",
+"v.	c #71B1BE",
+"w.	c #6BC1C5",
+"x.	c #69B8CF",
+"y.	c #69B8D0",
+"z.	c #66C5CA",
+"A.	c #67B6CC",
+"B.	c #64AFC8",
+"C.	c #5FA4C2",
+"D.	c #37699A",
+"E.	c #4981AB",
+"F.	c #5388A4",
+"G.	c #5A785F",
+"H.	c #E6B111",
+"I.	c #F6BE15",
+"J.	c #FEF45A",
+"K.	c #E8923E",
+"L.	c #E17A1B",
+"M.	c #DE7413",
+"N.	c #DF731B",
+"O.	c #DF7319",
+"P.	c #DA6C11",
+"Q.	c #C4511C",
+"R.	c #D36727",
+"S.	c #CA6D34",
+"T.	c #BD6F3C",
+"U.	c #68BABE",
+"V.	c #62B0CA",
+"W.	c #62B0CB",
+"X.	c #5EACC7",
+"Y.	c #3E9AA5",
+"Z.	c #59A5C2",
+"`.	c #59A3C2",
+" +	c #4E8EB5",
+".+	c #4F90B7",
+"++	c #548EAE",
+"@+	c #607F8D",
+"#+	c #E09A1F",
+"$+	c #F3AA19",
+"%+	c #FDF056",
+"&+	c #E69038",
+"*+	c #E38020",
+"=+	c #DE7819",
+"-+	c #DD7416",
+";+	c #DD6F1A",
+">+	c #CA5319",
+",+	c #E9CB98",
+"'+	c #D49B68",
+")+	c #535472",
+"!+	c #5B94B2",
+"~+	c #5DA9C7",
+"{+	c #1E5584",
+"]+	c #5299BD",
+"^+	c #336A99",
+"/+	c #114979",
+"(+	c #174E7D",
+"_+	c #4D8EB5",
+":+	c #5191B8",
+"<+	c #528BAD",
+"[+	c #998055",
+"}+	c #A57C41",
+"|+	c #F9EB76",
+"1+	c #FBE016",
+"2+	c #F8AB0D",
+"3+	c #E4862D",
+"4+	c #E9943E",
+"5+	c #DE7618",
+"6+	c #DE731D",
+"7+	c #DA802D",
+"8+	c #C0956A",
+"9+	c #5E83A0",
+"0+	c #5A92B3",
+"a+	c #62AAC8",
+"b+	c #59A2C3",
+"c+	c #154A9A",
+"d+	c #293D72",
+"e+	c #093C8E",
+"f+	c #06396E",
+"g+	c #3A6D9A",
+"h+	c #4988B0",
+"i+	c #4D8DB4",
+"j+	c #4E86A9",
+"k+	c #323D4E",
+"l+	c #E3C064",
+"m+	c #F9F078",
+"n+	c #FBE117",
+"o+	c #FBDD05",
+"p+	c #ECA35A",
+"q+	c #E38022",
+"r+	c #E07617",
+"s+	c #DF741D",
+"t+	c #E28129",
+"u+	c #D48B3F",
+"v+	c #56748B",
+"w+	c #63A4BE",
+"x+	c #5595BC",
+"y+	c #63ADCC",
+"z+	c #5CA5C7",
+"A+	c #154A7C",
+"B+	c #093A71",
+"C+	c #05356B",
+"D+	c #04366B",
+"E+	c #0B3D6F",
+"F+	c #437DA7",
+"G+	c #4681AA",
+"H+	c #154572",
+"I+	c #4C7383",
+"J+	c #E2E224",
+"K+	c #FEF577",
+"L+	c #F8C61A",
+"M+	c #FDCE07",
+"N+	c #E48937",
+"O+	c #E27E29",
+"P+	c #E27B1C",
+"Q+	c #DC701A",
+"R+	c #D96B19",
+"S+	c #D66718",
+"T+	c #D26A1E",
+"U+	c #D2843B",
+"V+	c #C49155",
+"W+	c #4A7476",
+"X+	c #508FB3",
+"Y+	c #5495BC",
+"Z+	c #619AC8",
+"`+	c #5D95C4",
+" @	c #4785AE",
+".@	c #295C8D",
+"+@	c #043367",
+"@@	c #023064",
+"#@	c #053366",
+"$@	c #0D285B",
+"%@	c #132653",
+"&@	c #466C90",
+"*@	c #55755D",
+"=@	c #EAC81B",
+"-@	c #FEF554",
+";@	c #FEF154",
+">@	c #F7BC0F",
+",@	c #C1240E",
+"'@	c #E17F2E",
+")@	c #DE7515",
+"!@	c #AA3C07",
+"~@	c #A51604",
+"{@	c #9D1D0F",
+"]@	c #57655D",
+"^@	c #547992",
+"/@	c #4F7C9F",
+"(@	c #4F8DB2",
+"_@	c #5191B9",
+":@	c #5392BA",
+"<@	c #5291B9",
+"[@	c #4B87B0",
+"}@	c #103F71",
+"|@	c #0A2459",
+"1@	c #062054",
+"2@	c #071E52",
+"3@	c #061543",
+"4@	c #172449",
+"5@	c #67667D",
+"6@	c #BF8C2E",
+"7@	c #ECB712",
+"8@	c #FDF32F",
+"9@	c #FEF451",
+"0@	c #F9AB14",
+"a@	c #BE1D0B",
+"b@	c #D96916",
+"c@	c #DD751D",
+"d@	c #DF741B",
+"e@	c #DE711B",
+"f@	c #D76717",
+"g@	c #A61604",
+"h@	c #B52308",
+"i@	c #AE2C11",
+"j@	c #4F5F5D",
+"k@	c #4D7697",
+"l@	c #4979A3",
+"m@	c #4A7CA6",
+"n@	c #508EB5",
+"o@	c #528EB5",
+"p@	c #508CB3",
+"q@	c #4674A0",
+"r@	c #2F3C6D",
+"s@	c #0B2356",
+"t@	c #071C50",
+"u@	c #071A4E",
+"v@	c #081644",
+"w@	c #212845",
+"x@	c #D5CA58",
+"y@	c #ED9D14",
+"z@	c #F5A80C",
+"A@	c #FDED09",
+"B@	c #FBE013",
+"C@	c #FECE34",
+"D@	c #BC1C09",
+"E@	c #D76816",
+"F@	c #E4862E",
+"G@	c #DF741C",
+"H@	c #CE5710",
+"I@	c #BE2F0B",
+"J@	c #C03709",
+"K@	c #C63C09",
+"L@	c #C66A27",
+"M@	c #556B82",
+"N@	c #5C7791",
+"O@	c #5D7993",
+"P@	c #5D7B94",
+"Q@	c #5E7B94",
+"R@	c #6E7091",
+"S@	c #4B6C8E",
+"T@	c #476A8E",
+"U@	c #111A45",
+"V@	c #051040",
+"W@	c #050F3F",
+"X@	c #0A1745",
+"Y@	c #45617B",
+"Z@	c #DC9320",
+"`@	c #F6A111",
+" #	c #F6B508",
+".#	c #FAD605",
+"+#	c #F9AF14",
+"@#	c #FEEE7B",
+"##	c #A81506",
+"$#	c #DD7122",
+"%#	c #DF751D",
+"&#	c #DA6A18",
+"*#	c #C6420B",
+"=#	c #CF450A",
+"-#	c #D9540A",
+";#	c #D46A1D",
+">#	c #CD6F26",
+",#	c #CA732C",
+"'#	c #CB732D",
+")#	c #CA712D",
+"!#	c #BF6E30",
+"~#	c #A79E7D",
+"{#	c #805435",
+"]#	c #0E1640",
+"^#	c #010435",
+"/#	c #090F3F",
+"(#	c #47637B",
+"_#	c #E3993C",
+":#	c #FCA52C",
+"<#	c #F7B60C",
+"[#	c #F6B60D",
+"}#	c #F8AA19",
+"|#	c #FDCA5C",
+"1#	c #BE1E0D",
+"2#	c #DE7624",
+"3#	c #DF7515",
+"4#	c #DD6E19",
+"5#	c #D34F0D",
+"6#	c #DD560A",
+"7#	c #DC570A",
+"8#	c #AE4006",
+"9#	c #D56818",
+"0#	c #D46A18",
+"a#	c #D46A19",
+"b#	c #CE681C",
+"c#	c #AB4218",
+"d#	c #251716",
+"e#	c #110E35",
+"f#	c #080633",
+"g#	c #030436",
+"h#	c #0E0B34",
+"i#	c #181D43",
+"j#	c #534C57",
+"k#	c #E4DB39",
+"l#	c #FCE74B",
+"m#	c #F8AA13",
+"n#	c #F7BB17",
+"o#	c #FDED79",
+"p#	c #F9A71D",
+"q#	c #E28330",
+"r#	c #DE7415",
+"s#	c #DF7119",
+"t#	c #DF6E18",
+"u#	c #DF5B0B",
+"v#	c #DD5A0A",
+"w#	c #DB6011",
+"x#	c #A21E07",
+"y#	c #983809",
+"z#	c #8F350B",
+"A#	c #90370D",
+"B#	c #8A3510",
+"C#	c #3D2E4F",
+"D#	c #0C0632",
+"E#	c #010131",
+"F#	c #010133",
+"G#	c #0A0835",
+"H#	c #3D3351",
+"I#	c #C37D1B",
+"J#	c #64564D",
+"K#	c #EACF13",
+"L#	c #FADC14",
+"M#	c #F9B11D",
+"N#	c #FEF261",
+"O#	c #FFF683",
+"P#	c #DC722D",
+"Q#	c #DD6F1B",
+"R#	c #DC6D12",
+"S#	c #DE7112",
+"T#	c #DE7012",
+"U#	c #DF7017",
+"V#	c #DA6D14",
+"W#	c #CF6519",
+"X#	c #3C1A28",
+"Y#	c #2A142C",
+"Z#	c #241233",
+"`#	c #372C59",
+" $	c #11093B",
+".$	c #060337",
+"+$	c #020133",
+"@$	c #0B0632",
+"#$	c #1D1233",
+"$$	c #97602E",
+"%$	c #D28511",
+"&$	c #EB990D",
+"*$	c #F3BE07",
+"=$	c #F8AD11",
+"-$	c #FDF18F",
+";$	c #FFFA5F",
+">$	c #FFFF63",
+",$	c #C1310C",
+"'$	c #CE530E",
+")$	c #DB6910",
+"!$	c #DB6F14",
+"~$	c #DF7318",
+"{$	c #D56E1A",
+"]$	c #CB691C",
+"^$	c #BC6720",
+"/$	c #312C49",
+"($	c #423377",
+"_$	c #3C1059",
+":$	c #190C33",
+"<$	c #190D31",
+"[$	c #27142F",
+"}$	c #BF631F",
+"|$	c #D26F1D",
+"1$	c #DF7D18",
+"2$	c #E69007",
+"3$	c #F3AF0C",
+"4$	c #F7AC16",
+"5$	c #FEF415",
+"6$	c #FFFC14",
+"7$	c #BA1307",
+"8$	c #CA3203",
+"9$	c #BF2009",
+"0$	c #D96818",
+"a$	c #DD6F19",
+"b$	c #DE7213",
+"c$	c #DD7212",
+"d$	c #D56F1C",
+"e$	c #CD6D22",
+"f$	c #C46726",
+"g$	c #A1582A",
+"h$	c #743A30",
+"i$	c #BC611F",
+"j$	c #CB681D",
+"k$	c #D46E1C",
+"l$	c #DE721B",
+"m$	c #DF7317",
+"n$	c #E47E06",
+"o$	c #E88D0D",
+"p$	c #FDED66",
+"q$	c #FBE40D",
+"r$	c #FBE605",
+"s$	c #BA0F07",
+"t$	c #C82E03",
+"u$	c #BE1B0A",
+"v$	c #DD7022",
+"w$	c #DC6B19",
+"x$	c #DC6C12",
+"y$	c #DA6C12",
+"z$	c #DC6D10",
+"A$	c #DC7011",
+"B$	c #DC7012",
+"C$	c #DC741D",
+"D$	c #D7701D",
+"E$	c #D76F1D",
+"F$	c #D96F1C",
+"G$	c #DF711B",
+"H$	c #DF7118",
+"I$	c #E2640A",
+"J$	c #E47208",
+"K$	c #FAE60A",
+"L$	c #FDED28",
+"M$	c #FDD00A",
+"N$	c #B80D07",
+"O$	c #BA1208",
+"P$	c #BD1B0C",
+"Q$	c #DB702A",
+"R$	c #C0200B",
+"S$	c #CC3805",
+"T$	c #DA6816",
+"U$	c #C7470E",
+"V$	c #DB6C19",
+"W$	c #DF761B",
+"X$	c #E07922",
+"Y$	c #E07B24",
+"Z$	c #E0640A",
+"`$	c #E57F06",
+" %	c #F7CE04",
+".%	c #FAE704",
+"+%	c #F5BB07",
+"@%	c #F7A30B",
+"#%	c #9F0202",
+"$%	c #B70B07",
+"%%	c #BA1109",
+"&%	c #BB1309",
+"*%	c #BB1207",
+"=%	c #BC1608",
+"-%	c #BF2E0C",
+";%	c #DA7229",
+">%	c #C5410E",
+",%	c #C5430D",
+"'%	c #DA6A19",
+")%	c #DC6D19",
+"!%	c #DD7118",
+"~%	c #D7770A",
+"{%	c #E28B07",
+"]%	c #F0AB05",
+"^%	c #F4CE06",
+"/%	c #E89D07",
+"(%	c #E79707",
+"_%	c #B80B07",
+":%	c #B80F07",
+"<%	c #BC240B",
+"[%	c #BB1709",
+"}%	c #BB1909",
+"|%	c #BC2A0A",
+"1%	c #C23C0B",
+"2%	c #C5430B",
+"3%	c #D0580F",
+"4%	c #D5670D",
+"5%	c #D67709",
+"6%	c #E28C07",
+"7%	c #D59A02",
+"8%	c #E49408",
+"9%	c #E08028",
+"0%	c #B60B07",
+"a%	c #A20302",
+"b%	c #BA1D09",
+"c%	c #BA1E09",
+"d%	c #BA2209",
+"e%	c #BB2709",
+"f%	c #C23A09",
+"g%	c #CD480A",
+"h%	c #D05A0E",
+"i%	c #D66A0B",
+"j%	c #E18B07",
+"k%	c #DF7916",
+"l%	c #B81007",
+"m%	c #BA2509",
+"n%	c #C13909",
+"o%	c #CD460A",
+"p%	c #CF4B0B",
+"q%	c #DA7118",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . + @ # $ % & * = - ; . . . . . . . . . . . . ",
+". . . . . . . . > , ' ) ! ~ { ] ^ / ( _ : < . . . . . . . . . . ",
+". . . . . . . [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . . . . . ",
+". . . e . . f g h i j k l m n o p q r s t u v w x y . . . . . . ",
+". . . z A B C D E F G H I J K L M N O P Q R S T U V W . . . . . ",
+". . X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^.. . . . . ",
+". . /.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.. . . ",
+". . j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.. . . ",
+". . K.L.M.p.N.N.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++ at +#+$+%+. . . ",
+". &+*+=+-+N.N.N.N.N.;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+. . ",
+". 3+4+5+p.N.N.N.N.N.6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+. . ",
+". p+q+r+N.N.N.N.N.s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+. . ",
+". N+O+P+p.N.Q+R+S+T+U+V+W+X+Y+Z+`+ @. at +@@@#@$@%@&@*@=@-@;@>@. . ",
+". ,@'@)@N.N.R+!@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@. . ",
+". a at b@c at d@e at f@g at h@i at j@k at l@m at n@o at p@q at r@s at t@u at v@w at x@y at z@A at B@C at . . ",
+". D at E@F at G@e at H@I at J@K at L@M at N@O at P@Q at R@S at T@U at V@W at X@Y at Z@`@ #.#+#@#. . ",
+". ##$#%#d at e@&#*#=#-#;#>#,#'#'#)#!#~#{#]#^#^#/#(#_#:#<#[#}#|#. . ",
+". 1#2#3#p.N.4#5#6#7#8#9#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#. . ",
+". . q#r#O.p.s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#. . . ",
+". . P#Q#R#S#O.s#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$. . . ",
+". . . ,$'$)$!$O.q.~$q.{$]$^$/$($_$:$<$[$}$|$1$2$3$4$5$6$. . . . ",
+". . . 7$8$9$0$a$b$q.~$q.c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$. . . . ",
+". . . . s$t$u$v$w$x$y$z$A$B$-+C$D$E$F$l$G$H$I$J$K$L$M$. . . . . ",
+". . . . . N$O$P$Q$R$S$T$U$V$W$X$Y$N.N.p.~$Z$`$ %.%+%@%. . . . . ",
+". . . . . #%$%%%%%&%*%=%-%;%>%,%'%)%a$!%~%{%]%^%/%(%. . . . . . ",
+". . . . . . . _%$%$%$%:%<%[%}%|%1%2%3%4%5%6%7%8%9%. . . . . . . ",
+". . . . . . . . 0%a%0%N$b%:%c%d%e%f%g%h%i%j%k%. . . . . . . . . ",
+". . . . . . . . . . 0%N$N$N$N$l%m%n%o%p%q%. . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/share/metview/icons/WMS_CLIENT.xpm b/share/metview/icons/WMS_CLIENT.xpm
new file mode 100755
index 0000000..0cb0e6d
--- /dev/null
+++ b/share/metview/icons/WMS_CLIENT.xpm
@@ -0,0 +1,290 @@
+/* XPM */
+static char *WMS_CLIENT[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 252 2",
+"   c #3AA64C896BB8",
+".  c #38E458CE6667",
+"X  c #44024CCE5CF8",
+"o  c #5AC566C55798",
+"O  c #424A4F806E2D",
+"+  c #49F953946729",
+"@  c #56095B196795",
+"#  c #4D1F59EE773D",
+"$  c #4ADF6DB46AED",
+"%  c #59BD65ED6A5E",
+"&  c #5B5B77DF692D",
+"*  c #4DD461C37098",
+"=  c #5A5F6A347635",
+"-  c #647268076D51",
+";  c #69E87B026EAD",
+":  c #60EA6B9B75A6",
+">  c #67AD746173AA",
+",  c #73F379F67A07",
+"<  c #DCD5251B3B6E",
+"1  c #DC1E291E3E5F",
+"2  c #9B307A6636E9",
+"3  c #DAE82D36427A",
+"4  c #D7F1320946C2",
+"5  c #D99F31C8459C",
+"6  c #D96933A8485C",
+"7  c #D6513A0C4D58",
+"8  c #DB8C3A124D59",
+"9  c #DA5B3DDD50F5",
+"0  c #8E767C14562C",
+"q  c #95887FC25339",
+"w  c #916A7F73592F",
+"e  c #B84261786B38",
+"r  c #BEC669FF7A3C",
+"t  c #D52F3FDB4F7E",
+"y  c #CDCC46A95988",
+"u  c #D57F42245521",
+"i  c #D71646875910",
+"p  c #DE14467E588F",
+"a  c #CA8C5A206980",
+"s  c #D1005537603D",
+"d  c #DB7C5378644F",
+"f  c #DC3E5B456AB5",
+"g  c #E24C50D86206",
+"h  c #CDD662696CE2",
+"j  c #CBB1651274B6",
+"k  c #D41E64FA7227",
+"l  c #D0A66EB477C5",
+"z  c #DB4E71997E2A",
+"x  c #4E5683E97EDF",
+"c  c #5BC083E77C00",
+"v  c #5D34997B76BF",
+"b  c #659981737DE3",
+"n  c #B44D8ACA3684",
+"m  c #DACEA2CE3888",
+"M  c #E40EA9523BD3",
+"N  c #9D0E82CE4F8C",
+"B  c #860D84165549",
+"V  c #979681D255B8",
+"C  c #A9BB899F4F93",
+"Z  c #BE96963F4AF9",
+"A  c #A1B2886F5689",
+"S  c #B025913259B8",
+"D  c #B8D8969D59D8",
+"F  c #8FD886A46F4B",
+"G  c #B4999E906DE8",
+"H  c #BCD0A5337553",
+"J  c #B70AA40B780A",
+"K  c #C2309A495C2B",
+"L  c #D991A3D245E0",
+"P  c #D8C6A5C25722",
+"I  c #E21FA953458E",
+"U  c #E14BAA4C4EDA",
+"Y  c #E10FAB4D584E",
+"T  c #C58DA4EB6EEA",
+"R  c #DD64AAB3627E",
+"E  c #DE3CAD376C45",
+"W  c #D49CAC8F72FB",
+"Q  c #DE83AFD97477",
+"!  c #DF24B04E74EE",
+"~  c #DBB8B3127BD2",
+"^  c #E088AD0864E0",
+"/  c #5B63678F83B9",
+"(  c #50AC71B08E74",
+")  c #5276739C907D",
+"_  c #56947A339404",
+"`  c #755E7EA68467",
+"'  c #6DF478C79251",
+"]  c #A6E27F058AE6",
+"[  c #B8687DC98A05",
+"{  c #C58D767584D1",
+"}  c #DE6A77D883FA",
+"|  c #5C7980358972",
+" . c #5CF183ED96AC",
+".. c #604B8BD08D53",
+"X. c #77A885208884",
+"o. c #7D3184138A71",
+"O. c #70CB9A388014",
+"+. c #7EC294ED8EF2",
+"@. c #650085F49EAA",
+"#. c #65888EB09962",
+"$. c #795F88B7976E",
+"%. c #6E1B98939DDF",
+"&. c #7ECC9C999083",
+"*. c #758DA049833B",
+"=. c #66548606A036",
+"-. c #665D8A06A391",
+";. c #6B368D00A4FB",
+":. c #6D7C92A1AAD6",
+">. c #73F792EEAB7B",
+",. c #7A1F96EAAB53",
+"<. c #7E55999BAF10",
+"1. c #7E019C3BB2AB",
+"2. c #7C52A1FAB66E",
+"3. c #842C892F8C78",
+"4. c #918F8D268524",
+"5. c #824A96EA8D0B",
+"6. c #874C8C469670",
+"7. c #83508B069C36",
+"8. c #89DA93309708",
+"9. c #8D459383958D",
+"0. c #8BED9C279D4A",
+"q. c #9329974496F2",
+"w. c #92339A9A95AB",
+"e. c #931796B89BA7",
+"r. c #966F9A8199D8",
+"t. c #9DF49E279DFF",
+"y. c #B804845F8EDE",
+"u. c #BBBF866492B5",
+"i. c #B0B58F6993C9",
+"p. c #B6678B13978C",
+"a. c #A46A97449A97",
+"s. c #88DFA79A9670",
+"d. c #91E8A7C79AD6",
+"f. c #9BA3A4B59D4D",
+"g. c #A251ABBC8E1E",
+"h. c #BFCEABA7816D",
+"j. c #8A5A92C8A672",
+"k. c #8DAA9548A8C1",
+"l. c #895A9951A839",
+"z. c #95BA9B82A618",
+"x. c #91FE9A40AD17",
+"c. c #AC549C72A794",
+"v. c #BA559CFCA1DE",
+"b. c #BE5E9E5CA8A3",
+"n. c #8455AC86AD16",
+"m. c #936EA451A46B",
+"M. c #9DE7A40BA2BA",
+"N. c #947BA06DA94E",
+"B. c #9AEAB5C7A67A",
+"V. c #991CB7CEA64F",
+"C. c #8812A1FAB691",
+"Z. c #8ADCA408B90E",
+"A. c #9AB4A1CDB3F9",
+"S. c #9062A7D6BC0F",
+"D. c #92ABAC1FBE3E",
+"F. c #A923A673A850",
+"G. c #A603AD6EAAC8",
+"H. c #B77BA8E2A9B3",
+"J. c #A648B783ABD9",
+"K. c #A478A991B6A0",
+"L. c #A096A741B8CB",
+"P. c #A70BAD90BE21",
+"I. c #AC0AB801B52C",
+"U. c #B2AEB0D0B064",
+"Y. c #B22AB773B5FD",
+"T. c #BB53BAD5B3A0",
+"R. c #B4E5BC46BAF9",
+"E. c #B98DB9E6BB4D",
+"W. c #C48689018D07",
+"Q. c #CA5C8E81944B",
+"!. c #D9E488BA931A",
+"~. c #C11599349A75",
+"^. c #D7F1954A9D12",
+"/. c #C9B9B0018102",
+"(. c #C833B4EA8CC1",
+"). c #DAFEB76984EF",
+"_. c #D7BAB9C08AE4",
+"`. c #D993BBF88DFC",
+"'. c #D72EBF82961A",
+"]. c #C66F9ABEA4D8",
+"[. c #D7D09D5DA3C8",
+"{. c #C910A6A8A9D3",
+"}. c #D617A625A9CA",
+"|. c #D975ACAEB25A",
+" X c #CA77B0C2B395",
+".X c #D560B613B98E",
+"XX c #E6C3B088B5DE",
+"oX c #A37DC30BB3BE",
+"OX c #A7ACCA77BC5C",
+"+X c #B641C303BDFD",
+"@X c #D710C25F9BC3",
+"#X c #CF45CF7BBA49",
+"$X c #D867CD48B549",
+"%X c #DB77D351BE21",
+"&X c #9B0AB319C441",
+"*X c #9986BA38C84F",
+"=X c #A338B6B1C787",
+"-X c #AE56B446C407",
+";X c #A60DBA8EC551",
+":X c #AC75BE58CD88",
+">X c #B6FFBD56C11E",
+",X c #B63FBB86CA6E",
+"<X c #CB93BF51C0B8",
+"1X c #E738BE5DC264",
+"2X c #9E85C272CE51",
+"3X c #AC9DC8D1CBBE",
+"4X c #B654CA75C32F",
+"5X c #BBF7C11ACE08",
+"6X c #B4BDC42ED1B4",
+"7X c #BF8AC97FD59C",
+"8X c #B981D71DD9F0",
+"9X c #BF9EE196DD8E",
+"0X c #BE73DF57E482",
+"qX c #C44FC479C7BA",
+"wX c #C74FCA15C700",
+"eX c #DB20C7B1CA61",
+"rX c #CBE7D120CAF4",
+"tX c #DF4AD909C6CF",
+"yX c #C3E0C846D556",
+"uX c #C506C942D6A5",
+"iX c #CC7CCFE4DC79",
+"pX c #C624DF85D881",
+"aX c #D957D4D1D5D4",
+"sX c #DBD1DBA8DC13",
+"dX c #E1F8DD6DCD5C",
+"fX c #E56CCF48D118",
+"gX c #E6C4DFEAD0B5",
+"hX c #C869E33FDDBA",
+"jX c #E908E51ADAC4",
+"kX c #CFD9DA92E411",
+"lX c #D3D9DD18E534",
+"zX c #C3C6E53FE290",
+"xX c #C8E1E456E8AE",
+"cX c #CE13ED2AEEB2",
+"vX c #D5EDE61DE534",
+"bX c #DE60E57AEBBD",
+"nX c #D22AEDD4EF57",
+"mX c #CF26EEBBF0B8",
+"MX c #D3F1EF84F11A",
+"NX c #D015F074F252",
+"BX c #D65EF0EAF256",
+"VX c #DBF2F28CF3A0",
+"CX c #E58BEB18EFDB",
+"ZX c #F27DEF1AE6EE",
+"AX c #F4FBF36EEEF6",
+"SX c #EA83EF34F2EE",
+"DX c #E073F4E6F663",
+"FX c #EED9F26EF579",
+"GX c #F525F672F763",
+"HX c #F4F3F741F95E",
+"JX c #F8B7F929F905",
+"KX c #FFA6FFB4FFBF",
+/* pixels */
+"KXKXKXKXKXKXKXKXKXKXKXKXKXKXJXHXGXJXKXKXKXKXKXKXKXKXKXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXKXKXHXbX:XD.Z.1.1.Z.D.6XbXJXKXKXKXKXKXKXKXKXKXKX",
+"KXKXKXKXKXKXJXJXSX6X>. at .,.D.=X3X3X*XD.,.=.<.7XGXJXJXJXJXJXJXJXKX",
+"KXKXKXKXKXsXr.9.` = : X.8.9.9.9.9.q.q.3.X.: % ` 9.r.r.r.r.r.t.aX",
+"KXKXKXKXKXG.9.a.v.wXrX{. XrXqX{.<X X~.a.G.U.i.] z.>X.X[.^.|.F.F.",
+"KXKXKXKXJX8.0.W.9 .XeXp f sX[.p }.l 1 h E.v.7 6 p.c.d 9 p g v.M.",
+"KXKXKXKX:X* M.{.5 ^.|.8 8 eX} 7 H.h < 7 b.{ 1 3 u.[ 3 !.fX1XH.t.",
+"KXKXKXiX_ = M.T.t z !.f d ^.f s T.k 7 i j y y 4 u.p.4 u } XXT.t.",
+"KXKXFX;.x > d.+Xk p f !.z k 8 l rXh u { 3 u { 4 u.K.y.a 4 6 [ M.",
+"KXKX6X .v & G.vX!.1 8 {.W.5 3 Q.R.a u b.u j u.5 u.c.c.c.[ 3 e M.",
+"KXGX>.2XzX8.Y.vX|.3 8 H.~.3 6 {.qXk u H.H.U.u.4 u.y.7 y 7 8 y.M.",
+"KXlX;.0XNXz.Y.vXaX[.[.T.T.Q.}.wXE.].W.rXwXI.H.{ H.F.[ r r p.F.t.",
+"KX=X2.cXmXm.q.Y.Y.Y.G.f.f.J.R.Y.f.r.M.Y.w.e.e.e.e.9.9.8.6.8.3.F.",
+"JXZ.*XcXcX8Xm.m.5., 3.3.o., ; w.M.M.5.% - - % @ @ @ + + X X = sX",
+"HX<.n.zXcXcXBXcXV.4XuX5X,X-Xm.d.pX4X5.$.$.' ' ' / / # # O   _ SX",
+"FX;.c s.zXcXMX8XB.iXyX5X,X-XP.N.+.+.7.7.o., , > - - % # O   ) CX",
+"FX at .%.O.3XmXMXoX+XiXyX5X,X-XP.L.A.x.j.7.0 n n n n n 2 @ O   ( bX",
+"GX;...*.9XcXMXoX+XiXyX5X,X-XP.A.A.x.j.7.q m M M M M n o O   _ SX",
+"JXC.$ OXcXcXMX8XB.iXuX5X,X-XP.L.A.x.j.7.q L I I I I Z g.*   @.FX",
+"KX=X#.zXcXcXnXcXV.J.5X5X,X-XP.A.A.x.j.7.V L U U U U Z #X& . <.JX",
+"KXlX;.0XcXcXnXMXzXOXV.d.d.m.P.L.A.x.j.7.V P Y Y Y Y Z tX4X| :XKX",
+"KXGX>.2XcXcXcXnXMXBXnXhXpXV.0.L.A.x.j.7.V P ^ R R ^ D dXSX>.lXKX",
+"KXKX:X:.xXcXcXnXMXMXBXVXVXvXs.A.x.k.8.3.q R E E E ^ D %X;X,.AXKX",
+"KXKXFX>.*XcXnXnXMXMXBXVXVXVXV.z.z.w N A C E Q Q Q ! K S A N %XKX",
+"KXKXKX7X-.8XMXnXMXMXBXVXVXVXV.z.A.4.C W ~ ~ ~ ~ ~ ~ ~ W D (.JXKX",
+"KXKXKXKX=X:.0XMXMXMXBXVXVXDXJ.z.A.x.F S ).).).).).).).T h.AXKXKX",
+"KXKXKXKXHXS.:.8XBXBXBXVXVXVX4X0.A.x.j.F D _.`.`.`.`.T H ZXKXKXKX",
+"KXKXKXKXKXGX&X-.3XnXVXVXVXVXpX5.A.x.j.$.B H '.'. at X/.J jXKXKXKXKX",
+"KXKXKXKXKXKXJX6X;.1.8XnXVXDXVXoX+.j.j.X.J.J H @X(.G gXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXCX&X;.,.*X8XxXvX4X&.b c l.$.F H G tXKXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXKXKXCX6XZ.>.;.>.>.-. .,.=XkXjXJ $XKXKXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXKXKXKXKXJXFXCXlXlXbXSXHXKXKXKXAXKXKXKXKXKXKXKXKX"
+};
diff --git a/share/metview/icons/XAVERAGE.xpm b/share/metview/icons/XAVERAGE.xpm
new file mode 100755
index 0000000..8ad63af
--- /dev/null
+++ b/share/metview/icons/XAVERAGE.xpm
@@ -0,0 +1,45 @@
+/* XPM */
+static char * AVERAGE_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" 	c white",
+".	c #777777",
+"X	c #CCCCFF",
+"o	c magenta",
+"O	c black",
+"+	c #00007F7FFFFF",
+"@	c #D9D9B7B77777",
+/* pixels */
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"         ..............         ",
+"     ....XXXXXXXXXXXXXX....     ",
+"  ...XXXXXXXXXXXXXXXXXXXXXX...  ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXoXXXXXXXXoXXXXXXXXXX.",
+"XXXXXXXXX..oo......oo..XXXXXXXXX",
+"XXXXX....XXoooXXXXoooXX....XXXXX",
+"XXoooooooooooooXXooooooooooooo.X",
+"X.XXXXXXXXXoooXXXXoooXXXXXXXXX.X",
+".XXXXXXXXXXooXXXXXXooXXXXXXXXXX.",
+"XXXXXXXXX..o........o..XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXXOOOOOOOOOOOOOOXXXXXXXXX",
+"XXXXXOOOO++++++@@@@@@@@OOOOOXXXX",
+"XXOOO+++++++++@@@@@@@@@@@@@OOOXX",
+"XO++++++++++@@@@@@@@@@@@@@@@@@OX",
+"O++++++++++@@@@@@@@@@@@@@@@@@@@O"};
diff --git a/share/metview/icons/XSECTION.xpm b/share/metview/icons/XSECTION.xpm
new file mode 100755
index 0000000..48837cb
--- /dev/null
+++ b/share/metview/icons/XSECTION.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * XSECT_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 6 1",
+/* colors */
+" 	c white",
+".	c #777777",
+"X	c #CCCCFF",
+"o	c black",
+"O	c #00007F7FFFFF",
+"+	c #D9D9B7B77777",
+/* pixels */
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"         ..............         ",
+"     ....XXXXXXXXXXXXXX....     ",
+"  ...XXXXXXXXXXXXXXXXXXXXXX...  ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXXooooooooooooooXXXXXXXXX",
+"XXXXXooooOOOOOO++++++++oooooXXXX",
+"XXoooOOOOOOOOO+++++++++++++oooXX",
+"XoOOOOOOOOOO++++++++++++++++++oX",
+"oOOOOOOOOOO++++++++++++++++++++o"};
diff --git a/share/metview/icons/fix_last_line b/share/metview/icons/fix_last_line
new file mode 100755
index 0000000..a8d7772
--- /dev/null
+++ b/share/metview/icons/fix_last_line
@@ -0,0 +1,14 @@
+#!/bin/ksh
+#                                        030109/vk
+# On some platforms 'convert' is broken
+# and is not able to read xpm files that
+# end with
+#   ..."};
+# Most Metview icons are written like that!
+# 'sed' is used to break the last line into:
+#   ..."
+# };
+
+sed -e 's/"};/"\
+};/' $1 > fixed.xpm
+
diff --git a/share/metview/icons/help_area.xpm b/share/metview/icons/help_area.xpm
new file mode 100755
index 0000000..e27d00c
--- /dev/null
+++ b/share/metview/icons/help_area.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static char * help_area_icon[] = {
+"16 16 3 1",
+" 	c #DADAF6F6FFFF",
+".	c #7C7CBDBD7676",
+"X	c #FFFF00000000",
+"   ...          ",
+"    ...         ",
+"     ...        ",
+"...   ...       ",
+".XXXXXXXXXXXXXX ",
+".X.   ...     X.",
+" X   .....  ..X.",
+" X  ..    ....X.",
+" X       .....X.",
+" X    ........X.",
+" X  ..........X.",
+" X    ........X.",
+" XXXXXXXXXXXXXX.",
+"      ..........",
+" ...............",
+"............... "};
diff --git a/share/metview/icons/help_line.xpm b/share/metview/icons/help_line.xpm
new file mode 100755
index 0000000..fb53e06
--- /dev/null
+++ b/share/metview/icons/help_line.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static char * help_line_icon[] = {
+"16 16 3 1",
+" 	c #DADAF6F6FFFF",
+".	c #7C7CBDBD7676",
+"X	c #FFFF00000000",
+"   ...          ",
+"  X ...         ",
+"  XX ...        ",
+"...XX ...       ",
+"... XX...       ",
+"...  XX....  . .",
+"     .XX..  ....",
+"    ...XX ......",
+"        XX......",
+"       ..XX.....",
+"     .....XX....",
+"       ....XX...",
+"       .....XX..",
+"      .......XX.",
+" ...............",
+"............... "};
diff --git a/share/metview/icons/help_map.xpm b/share/metview/icons/help_map.xpm
new file mode 100755
index 0000000..e27d00c
--- /dev/null
+++ b/share/metview/icons/help_map.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static char * help_area_icon[] = {
+"16 16 3 1",
+" 	c #DADAF6F6FFFF",
+".	c #7C7CBDBD7676",
+"X	c #FFFF00000000",
+"   ...          ",
+"    ...         ",
+"     ...        ",
+"...   ...       ",
+".XXXXXXXXXXXXXX ",
+".X.   ...     X.",
+" X   .....  ..X.",
+" X  ..    ....X.",
+" X       .....X.",
+" X    ........X.",
+" X  ..........X.",
+" X    ........X.",
+" XXXXXXXXXXXXXX.",
+"      ..........",
+" ...............",
+"............... "};
diff --git a/share/metview/icons/help_point.xpm b/share/metview/icons/help_point.xpm
new file mode 100755
index 0000000..8f48883
--- /dev/null
+++ b/share/metview/icons/help_point.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static char * help_point_icon[] = {
+"16 16 3 1",
+" 	c #DADAF6F6FFFF",
+".	c #7C7CBDBD7676",
+"X	c #FFFF00000000",
+"   ...          ",
+"    ...         ",
+"     ...        ",
+"...   ...       ",
+"...   ...       ",
+"...  ......  . .",
+"     .XXX.  ....",
+"    .XXXXX......",
+"     XXXXX......",
+"     XXXXX......",
+"     .XXX.......",
+"       .........",
+"       .........",
+"      ..........",
+" ...............",
+"............... "};
diff --git a/share/metview/icons/help_station.xpm b/share/metview/icons/help_station.xpm
new file mode 100755
index 0000000..c2ab228
--- /dev/null
+++ b/share/metview/icons/help_station.xpm
@@ -0,0 +1,46 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"16 16 23 1",
+/* colors */
+"` c #000000",
+"a c #B23300",
+"b c #BFA468",
+"c c #00FFFF",
+"d c #00FF00",
+"e c #E06C00",
+"f c #333333",
+"g c #6CA632",
+"h c #BEBEBE",
+"i c #681000",
+"j c #00734B",
+"k c #7E7E7E",
+"l c #A76136",
+"m c #000080",
+"n c #D9B777",
+"o c #520300",
+"p c #B8F0B9",
+"q c #FFFFFF",
+"r c #947A4A",
+"s c #1CB8A6",
+"t c #7CBD76",
+"u c #FFE2AB",
+"v c #6C7B8B",
+/* pixels */
+"qqqqqqqqqqqqqqqq",
+"qqqqqqqqqqqqqqqq",
+"qqqqqqqppppqqqqq",
+"qqqqqpttttgqqqqq",
+"kkhqqggddgttqqqq",
+"qqqqqgttdggqqqqq",
+"qkkhqtptnnppqqqq",
+"qqqqqpqtqaqqqqqq",
+"qqqubqqqqnnqqqqq",
+"qqueebqqqqluqqqq",
+"queeeebqqquluqqq",
+"qrqhkqbuqqqalqqq",
+"hfkf`kfkkkkliohq",
+"fk`fkffkff``ffkq",
+"vsvsvsvjvjm``fhq",
+"cccccccccccqqqqq"
+};
diff --git a/share/metview/icons/lock_icon.xpm b/share/metview/icons/lock_icon.xpm
new file mode 100644
index 0000000..4b342fa
--- /dev/null
+++ b/share/metview/icons/lock_icon.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static char * lock_icon_icon[] = {
+"16 16 5 1",
+" 	c #FFFFFFFFFFFF",
+".	c #DADAD7D7CACA",
+"X	c #424240403333",
+"o	c #A5A59F9F8080",
+"O	c #000000000000",
+"        ...     ",
+"       .XXX.    ",
+"     ..X   X..  ",
+"    .oX     Xo. ",
+"    .X       X. ",
+"   .X         X.",
+"              X.",
+"   ............X",
+"   .oooooooooooX",
+"   .ooooOOOooooX",
+"   .ooooOOOooooX",
+"   .oooooOoooooX",
+"   .oooooOoooooX",
+"   .oooooOoooooX",
+"   .oooooooooooX",
+"   XXXXXXXXXXXXX"};
diff --git a/share/metview/icons/svg2xpm b/share/metview/icons/svg2xpm
new file mode 100755
index 0000000..27b48cb
--- /dev/null
+++ b/share/metview/icons/svg2xpm
@@ -0,0 +1,10 @@
+#!/usr/bin/sh
+
+for arg in "$@"
+do
+   inkscape --export-png=${arg}.png --export-background-opacity=1.0 --export-background=white ${arg}
+   xpm_name="`basename ${arg} .svg`.xpm"
+   convert -geometry 32x32 ${arg}.png ${xpm_name}
+   rm -f ${arg}.png
+   sed 's/#FEFEFE/#FFFFFF/g'  ${xpm_name} > ${xpm_name}.temp && mv -f ${xpm_name}.temp ${xpm_name}
+done
diff --git a/src/AppMod/Makefile.am b/src/AppMod/Makefile.am
new file mode 100644
index 0000000..c0280ca
--- /dev/null
+++ b/src/AppMod/Makefile.am
@@ -0,0 +1,61 @@
+
+bin_PROGRAMS = bin/savepool  bin/exampool  bin/mvnews  bin/mvmail  bin/checkdisplay
+
+
+bin_savepool_SOURCES  = savepool.cc
+bin_savepool_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_savepool_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS) $(FDBLIB)
+
+if METVIEW_MARS_ODB
+bin_savepool_LDFLAGS = $(ODB_LDFLAGS)
+bin_savepool_LDADD += $(ODB_LIBS)
+endif
+
+
+
+bin_exampool_SOURCES  = examcback.cc exammain.c examwidgets.h
+bin_exampool_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_exampool_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+
+bin_mvnews_SOURCES  = newsmain.c newscback.c maill.c
+bin_mvnews_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_mvnews_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS) $(FDBLIB)
+bin_mvnews_LINK     = $(CXXLINK)
+
+
+bin_mvmail_SOURCES  = mailmain.c mailcback.c
+bin_mvmail_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_mvmail_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_mvmail_LINK     = $(CXXLINK)
+
+
+bin_checkdisplay_SOURCES  = checkdisplay.cc
+bin_checkdisplay_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_checkdisplay_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+
+maill.c : maill.l
+	$(LEX) $(LFLAGS) maill.l
+	sed -e s/yy/mail/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+
+
+# a note about cleaning: in order that the end user does not need to
+# install lex and yacc, we distribute the generated source files. We also
+# don't want these to be cleaned during a normal clean, because the end user
+# would then need to have lex and yacc installed... so we don't clean
+# these by default, but instead have a separate target, 'cleanall' which
+# remove the lex/yacc generated source.
+
+clean-all: clean
+	-rm -f maill.c
+
+
+EXTRA_DIST = maill.l
+
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/AppMod/Makefile.in b/src/AppMod/Makefile.in
new file mode 100644
index 0000000..ea689ad
--- /dev/null
+++ b/src/AppMod/Makefile.in
@@ -0,0 +1,900 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/savepool$(EXEEXT) bin/exampool$(EXEEXT) \
+	bin/mvnews$(EXEEXT) bin/mvmail$(EXEEXT) \
+	bin/checkdisplay$(EXEEXT)
+ at METVIEW_MARS_ODB_TRUE@am__append_1 = $(ODB_LIBS)
+subdir = src/AppMod
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_checkdisplay_OBJECTS = bin_checkdisplay-checkdisplay.$(OBJEXT)
+bin_checkdisplay_OBJECTS = $(am_bin_checkdisplay_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_checkdisplay_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_exampool_OBJECTS = bin_exampool-examcback.$(OBJEXT) \
+	bin_exampool-exammain.$(OBJEXT)
+bin_exampool_OBJECTS = $(am_bin_exampool_OBJECTS)
+bin_exampool_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_bin_mvmail_OBJECTS = bin_mvmail-mailmain.$(OBJEXT) \
+	bin_mvmail-mailcback.$(OBJEXT)
+bin_mvmail_OBJECTS = $(am_bin_mvmail_OBJECTS)
+bin_mvmail_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_bin_mvnews_OBJECTS = bin_mvnews-newsmain.$(OBJEXT) \
+	bin_mvnews-newscback.$(OBJEXT) bin_mvnews-maill.$(OBJEXT)
+bin_mvnews_OBJECTS = $(am_bin_mvnews_OBJECTS)
+bin_mvnews_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_bin_savepool_OBJECTS = bin_savepool-savepool.$(OBJEXT)
+bin_savepool_OBJECTS = $(am_bin_savepool_OBJECTS)
+ at METVIEW_MARS_ODB_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+bin_savepool_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_2)
+bin_savepool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_savepool_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_checkdisplay_SOURCES) $(bin_exampool_SOURCES) \
+	$(bin_mvmail_SOURCES) $(bin_mvnews_SOURCES) \
+	$(bin_savepool_SOURCES)
+DIST_SOURCES = $(bin_checkdisplay_SOURCES) $(bin_exampool_SOURCES) \
+	$(bin_mvmail_SOURCES) $(bin_mvnews_SOURCES) \
+	$(bin_savepool_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_savepool_SOURCES = savepool.cc
+bin_savepool_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_savepool_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) \
+	$(METVIEW_UTIL_LIB) $(FLIBS) $(FDBLIB) $(am__append_1)
+ at METVIEW_MARS_ODB_TRUE@bin_savepool_LDFLAGS = $(ODB_LDFLAGS)
+bin_exampool_SOURCES = examcback.cc exammain.c examwidgets.h
+bin_exampool_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_exampool_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_mvnews_SOURCES = newsmain.c newscback.c maill.c
+bin_mvnews_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_mvnews_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS) $(FDBLIB)
+bin_mvnews_LINK = $(CXXLINK)
+bin_mvmail_SOURCES = mailmain.c mailcback.c
+bin_mvmail_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_mvmail_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_mvmail_LINK = $(CXXLINK)
+bin_checkdisplay_SOURCES = checkdisplay.cc
+bin_checkdisplay_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_checkdisplay_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+EXTRA_DIST = maill.l
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/AppMod/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/AppMod/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/checkdisplay$(EXEEXT): $(bin_checkdisplay_OBJECTS) $(bin_checkdisplay_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/checkdisplay$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_checkdisplay_OBJECTS) $(bin_checkdisplay_LDADD) $(LIBS)
+bin/exampool$(EXEEXT): $(bin_exampool_OBJECTS) $(bin_exampool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/exampool$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_exampool_OBJECTS) $(bin_exampool_LDADD) $(LIBS)
+bin/mvmail$(EXEEXT): $(bin_mvmail_OBJECTS) $(bin_mvmail_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/mvmail$(EXEEXT)
+	$(AM_V_GEN)$(bin_mvmail_LINK) $(bin_mvmail_OBJECTS) $(bin_mvmail_LDADD) $(LIBS)
+bin/mvnews$(EXEEXT): $(bin_mvnews_OBJECTS) $(bin_mvnews_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/mvnews$(EXEEXT)
+	$(AM_V_GEN)$(bin_mvnews_LINK) $(bin_mvnews_OBJECTS) $(bin_mvnews_LDADD) $(LIBS)
+bin/savepool$(EXEEXT): $(bin_savepool_OBJECTS) $(bin_savepool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/savepool$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_savepool_LINK) $(bin_savepool_OBJECTS) $(bin_savepool_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_checkdisplay-checkdisplay.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_exampool-examcback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_exampool-exammain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvmail-mailcback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvmail-mailmain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvnews-maill.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvnews-newscback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvnews-newsmain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_savepool-savepool.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bin_exampool-exammain.o: exammain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_exampool-exammain.o -MD -MP -MF $(DEPDIR)/bin_exampool-exammain.Tpo -c -o bin_exampool-exammain.o `test -f 'exammain.c' || echo '$(srcdir)/'`exammain.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_exampool-exammain.Tpo $(DEPDIR)/bin_exampool-exammain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='exammain.c' object='bin_exampool-exammain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_exampool-exammain.o `test -f 'exammain.c' || echo '$(srcdir)/'`exammain.c
+
+bin_exampool-exammain.obj: exammain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_exampool-exammain.obj -MD -MP -MF $(DEPDIR)/bin_exampool-exammain.Tpo -c -o bin_exampool-exammain.obj `if test -f 'exammain.c'; then $(CYGPATH_W) 'exammain.c'; else $(CYGPATH_W) '$(srcdir)/exammain.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_exampool-exammain.Tpo $(DEPDIR)/bin_exampool-exammain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='exammain.c' object='bin_exampool-exammain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_exampool-exammain.obj `if test -f 'exammain.c'; then $(CYGPATH_W) 'exammain.c'; else $(CYGPATH_W) '$(srcdir)/exammain.c'; fi`
+
+bin_mvmail-mailmain.o: mailmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvmail-mailmain.o -MD -MP -MF $(DEPDIR)/bin_mvmail-mailmain.Tpo -c -o bin_mvmail-mailmain.o `test -f 'mailmain.c' || echo '$(srcdir)/'`mailmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmail-mailmain.Tpo $(DEPDIR)/bin_mvmail-mailmain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mailmain.c' object='bin_mvmail-mailmain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvmail-mailmain.o `test -f 'mailmain.c' || echo '$(srcdir)/'`mailmain.c
+
+bin_mvmail-mailmain.obj: mailmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvmail-mailmain.obj -MD -MP -MF $(DEPDIR)/bin_mvmail-mailmain.Tpo -c -o bin_mvmail-mailmain.obj `if test -f 'mailmain.c'; then $(CYGPATH_W) 'mailmain.c'; else $(CYGPATH_W) '$(srcdir)/mailmain.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmail-mailmain.Tpo $(DEPDIR)/bin_mvmail-mailmain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mailmain.c' object='bin_mvmail-mailmain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvmail-mailmain.obj `if test -f 'mailmain.c'; then $(CYGPATH_W) 'mailmain.c'; else $(CYGPATH_W) '$(srcdir)/mailmain.c'; fi`
+
+bin_mvmail-mailcback.o: mailcback.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvmail-mailcback.o -MD -MP -MF $(DEPDIR)/bin_mvmail-mailcback.Tpo -c -o bin_mvmail-mailcback.o `test -f 'mailcback.c' || echo '$(srcdir)/'`mailcback.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmail-mailcback.Tpo $(DEPDIR)/bin_mvmail-mailcback.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mailcback.c' object='bin_mvmail-mailcback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvmail-mailcback.o `test -f 'mailcback.c' || echo '$(srcdir)/'`mailcback.c
+
+bin_mvmail-mailcback.obj: mailcback.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvmail-mailcback.obj -MD -MP -MF $(DEPDIR)/bin_mvmail-mailcback.Tpo -c -o bin_mvmail-mailcback.obj `if test -f 'mailcback.c'; then $(CYGPATH_W) 'mailcback.c'; else $(CYGPATH_W) '$(srcdir)/mailcback.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmail-mailcback.Tpo $(DEPDIR)/bin_mvmail-mailcback.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mailcback.c' object='bin_mvmail-mailcback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmail_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvmail-mailcback.obj `if test -f 'mailcback.c'; then $(CYGPATH_W) 'mailcback.c'; else $(CYGPATH_W) '$(srcdir)/mailcback.c'; fi`
+
+bin_mvnews-newsmain.o: newsmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvnews-newsmain.o -MD -MP -MF $(DEPDIR)/bin_mvnews-newsmain.Tpo -c -o bin_mvnews-newsmain.o `test -f 'newsmain.c' || echo '$(srcdir)/'`newsmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvnews-newsmain.Tpo $(DEPDIR)/bin_mvnews-newsmain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='newsmain.c' object='bin_mvnews-newsmain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvnews-newsmain.o `test -f 'newsmain.c' || echo '$(srcdir)/'`newsmain.c
+
+bin_mvnews-newsmain.obj: newsmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvnews-newsmain.obj -MD -MP -MF $(DEPDIR)/bin_mvnews-newsmain.Tpo -c -o bin_mvnews-newsmain.obj `if test -f 'newsmain.c'; then $(CYGPATH_W) 'newsmain.c'; else $(CYGPATH_W) '$(srcdir)/newsmain.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvnews-newsmain.Tpo $(DEPDIR)/bin_mvnews-newsmain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='newsmain.c' object='bin_mvnews-newsmain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvnews-newsmain.obj `if test -f 'newsmain.c'; then $(CYGPATH_W) 'newsmain.c'; else $(CYGPATH_W) '$(srcdir)/newsmain.c'; fi`
+
+bin_mvnews-newscback.o: newscback.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvnews-newscback.o -MD -MP -MF $(DEPDIR)/bin_mvnews-newscback.Tpo -c -o bin_mvnews-newscback.o `test -f 'newscback.c' || echo '$(srcdir)/'`newscback.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvnews-newscback.Tpo $(DEPDIR)/bin_mvnews-newscback.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='newscback.c' object='bin_mvnews-newscback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvnews-newscback.o `test -f 'newscback.c' || echo '$(srcdir)/'`newscback.c
+
+bin_mvnews-newscback.obj: newscback.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvnews-newscback.obj -MD -MP -MF $(DEPDIR)/bin_mvnews-newscback.Tpo -c -o bin_mvnews-newscback.obj `if test -f 'newscback.c'; then $(CYGPATH_W) 'newscback.c'; else $(CYGPATH_W) '$(srcdir)/newscback.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvnews-newscback.Tpo $(DEPDIR)/bin_mvnews-newscback.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='newscback.c' object='bin_mvnews-newscback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvnews-newscback.obj `if test -f 'newscback.c'; then $(CYGPATH_W) 'newscback.c'; else $(CYGPATH_W) '$(srcdir)/newscback.c'; fi`
+
+bin_mvnews-maill.o: maill.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvnews-maill.o -MD -MP -MF $(DEPDIR)/bin_mvnews-maill.Tpo -c -o bin_mvnews-maill.o `test -f 'maill.c' || echo '$(srcdir)/'`maill.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvnews-maill.Tpo $(DEPDIR)/bin_mvnews-maill.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='maill.c' object='bin_mvnews-maill.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvnews-maill.o `test -f 'maill.c' || echo '$(srcdir)/'`maill.c
+
+bin_mvnews-maill.obj: maill.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvnews-maill.obj -MD -MP -MF $(DEPDIR)/bin_mvnews-maill.Tpo -c -o bin_mvnews-maill.obj `if test -f 'maill.c'; then $(CYGPATH_W) 'maill.c'; else $(CYGPATH_W) '$(srcdir)/maill.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvnews-maill.Tpo $(DEPDIR)/bin_mvnews-maill.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='maill.c' object='bin_mvnews-maill.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvnews_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvnews-maill.obj `if test -f 'maill.c'; then $(CYGPATH_W) 'maill.c'; else $(CYGPATH_W) '$(srcdir)/maill.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_checkdisplay-checkdisplay.o: checkdisplay.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_checkdisplay_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_checkdisplay-checkdisplay.o -MD -MP -MF $(DEPDIR)/bin_checkdisplay-checkdisplay.Tpo -c -o bin_checkdisplay-checkdisplay.o `test -f 'checkdisplay.cc' || echo '$(srcdir)/'`checkdisplay.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_checkdisplay-checkdisplay.Tpo $(DEPDIR)/bin_checkdisplay-checkdisplay.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='checkdisplay.cc' object='bin_checkdisplay-checkdisplay.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_checkdisplay_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_checkdisplay-checkdisplay.o `test -f 'checkdisplay.cc' || echo '$(srcdir)/'`checkdisplay.cc
+
+bin_checkdisplay-checkdisplay.obj: checkdisplay.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_checkdisplay_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_checkdisplay-checkdisplay.obj -MD -MP -MF $(DEPDIR)/bin_checkdisplay-checkdisplay.Tpo -c -o bin_checkdisplay-checkdisplay.obj `if test -f 'checkdisplay.cc'; then $(CYGPATH_W) 'checkdisplay.cc'; else $(CYGPATH_W) '$(srcdir)/checkdisplay.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_checkdisplay-checkdisplay.Tpo $(DEPDIR)/bin_checkdisplay-checkdisplay.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='checkdisplay.cc' object='bin_checkdisplay-checkdisplay.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_checkdisplay_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_checkdisplay-checkdisplay.obj `if test -f 'checkdisplay.cc'; then $(CYGPATH_W) 'checkdisplay.cc'; else $(CYGPATH_W) '$(srcdir)/checkdisplay.cc'; fi`
+
+bin_exampool-examcback.o: examcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_exampool-examcback.o -MD -MP -MF $(DEPDIR)/bin_exampool-examcback.Tpo -c -o bin_exampool-examcback.o `test -f 'examcback.cc' || echo '$(srcdir)/'`examcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_exampool-examcback.Tpo $(DEPDIR)/bin_exampool-examcback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='examcback.cc' object='bin_exampool-examcback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_exampool-examcback.o `test -f 'examcback.cc' || echo '$(srcdir)/'`examcback.cc
+
+bin_exampool-examcback.obj: examcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_exampool-examcback.obj -MD -MP -MF $(DEPDIR)/bin_exampool-examcback.Tpo -c -o bin_exampool-examcback.obj `if test -f 'examcback.cc'; then $(CYGPATH_W) 'examcback.cc'; else $(CYGPATH_W) '$(srcdir)/examcback.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_exampool-examcback.Tpo $(DEPDIR)/bin_exampool-examcback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='examcback.cc' object='bin_exampool-examcback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_exampool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_exampool-examcback.obj `if test -f 'examcback.cc'; then $(CYGPATH_W) 'examcback.cc'; else $(CYGPATH_W) '$(srcdir)/examcback.cc'; fi`
+
+bin_savepool-savepool.o: savepool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_savepool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_savepool-savepool.o -MD -MP -MF $(DEPDIR)/bin_savepool-savepool.Tpo -c -o bin_savepool-savepool.o `test -f 'savepool.cc' || echo '$(srcdir)/'`savepool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_savepool-savepool.Tpo $(DEPDIR)/bin_savepool-savepool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='savepool.cc' object='bin_savepool-savepool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_savepool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_savepool-savepool.o `test -f 'savepool.cc' || echo '$(srcdir)/'`savepool.cc
+
+bin_savepool-savepool.obj: savepool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_savepool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_savepool-savepool.obj -MD -MP -MF $(DEPDIR)/bin_savepool-savepool.Tpo -c -o bin_savepool-savepool.obj `if test -f 'savepool.cc'; then $(CYGPATH_W) 'savepool.cc'; else $(CYGPATH_W) '$(srcdir)/savepool.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_savepool-savepool.Tpo $(DEPDIR)/bin_savepool-savepool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='savepool.cc' object='bin_savepool-savepool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_savepool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_savepool-savepool.obj `if test -f 'savepool.cc'; then $(CYGPATH_W) 'savepool.cc'; else $(CYGPATH_W) '$(srcdir)/savepool.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+maill.c : maill.l
+	$(LEX) $(LFLAGS) maill.l
+	sed -e s/yy/mail/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+
+# a note about cleaning: in order that the end user does not need to
+# install lex and yacc, we distribute the generated source files. We also
+# don't want these to be cleaned during a normal clean, because the end user
+# would then need to have lex and yacc installed... so we don't clean
+# these by default, but instead have a separate target, 'cleanall' which
+# remove the lex/yacc generated source.
+
+clean-all: clean
+	-rm -f maill.c
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/AppMod/README b/src/AppMod/README
new file mode 100644
index 0000000..05ba7cd
--- /dev/null
+++ b/src/AppMod/README
@@ -0,0 +1,99 @@
+Applications Programming in /AppMod
+
+Data Generation Applications
+----------------------------
+
+The applications:
+
+relhum.cc
+totrain.cc
+
+belong to a group called DataGen. They derive some meteorological
+parameter from other parameters retrieved from Mars. Basically
+they prepare a Mars request, send it to mars service, process
+the data retrieved from Mars and send back a GRIB command.
+They are based on functions that may be found in file Util/DataGen.cc.
+These functions hide most of the common work necessary to this
+application group.
+These applications have the following basic structure :
+
+void main(int argc,char **argv)
+{
+        InitDataGen (argc, argv, "totrain", "TOTRAIN");
+}
+
+void PrepareRequest (request *mars)
+{
+...
+}
+
+int ExecuteRequest (request *orig, request *mars)
+{
+...
+}
+
+- InitDataGen creates the service and register a callback for the
+associated command.
+
+- PrepareRequest is specific for each application and must prepare
+the suitable Mars request. The incoming request "mars" is a RETRIEVE
+command that contains the values defined by the user in GenApp or
+in a macro.
+If the application needs the parameter LNSP, function AskLNSP is
+provided for the insertion of Mars parameters in request "mars".
+
+- ExecuteRequest is also specific for each application and must
+process the data retrieved from Mars and write the result into
+a given file.
+Request "orig" contains the original request received by the
+application. A parameter PATH was included in this command and
+contains the name of the temporary file where the result must
+be written.
+Request "mars" is a list of requests, where the first request
+contains the request returned by Mars and the other requests
+contain the description of each field, one field per request.
+
+
+Data Visualisation Applications
+-------------------------------
+
+The applications:
+
+xsect.cc
+average.cc
+vertprof.cc
+
+belong to a group called DataVis. They process fields defined by the
+subrequest contained in DATA parameter of incoming request, and generate
+a specific output command.
+These applications are based on functions that may be found in file 
+Util/DataVis.cc. These functions hide most of the common work necessary
+to this application group.
+These applications have the following basic structure :
+
+void main(int argc,char **argv)
+{
+        InitDataVis (argc, argv, "vertprof", "VPROF");
+}
+
+
+int ExecuteRequest (request *orig, request *mars, request* reply)
+{
+...
+}
+
+- InitDataVis creates the service and register a callback for the
+associated command.
+
+- ExecuteRequest is specific for each application and must process
+the incoming data and generate the reply request.
+Request "orig" contains the original request received by the
+application. A parameter PATH was included in this command and
+contains the name of the temporary file where the result must
+be written.
+Request "mars" is a list of requests, where the first request
+contains the subrequest extracted from request "orig" (DATA parameter)
+and the other requests contain the description of each field, one 
+field per request.
+Request "reply" must be filled with the data description generated
+by the application. 
diff --git a/src/AppMod/checkdisplay.cc b/src/AppMod/checkdisplay.cc
new file mode 100644
index 0000000..ad417ef
--- /dev/null
+++ b/src/AppMod/checkdisplay.cc
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Chek if X-display is available (vk 950819, idea by br)
+
+#include <X11/Xlib.h>
+#include <iostream>
+#include <stdlib.h>
+
+using namespace std;
+
+main()
+{
+	Display *toBeOrNotToBe;
+	if( toBeOrNotToBe = XOpenDisplay( 0 ) )  // NULL == $DISPLAY (if POSIX!)
+	{
+		XCloseDisplay( toBeOrNotToBe );
+		exit( EXIT_SUCCESS );
+	}
+	else
+	{
+		cerr << " [checkdisplay] Oops! Unable to open display!" << endl;
+		exit( EXIT_FAILURE );
+	}
+}
diff --git a/src/AppMod/examcback.cc b/src/AppMod/examcback.cc
new file mode 100644
index 0000000..ba63614
--- /dev/null
+++ b/src/AppMod/examcback.cc
@@ -0,0 +1,556 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Xm/FileSB.h>
+#include <Xm/SelectioB.h>
+#include <Xm/ToggleB.h>
+#include <mars.h>
+#include <Drag.h>
+#include <ctype.h>
+#include <math.h>
+#include <sys/wait.h>
+
+#include "progress.h"
+#include "inc_iostream.h"
+
+extern "C" {
+#include <xec.h>
+#include <drop.h>
+#include "examwidgets.h"
+
+void  drag_send_callback(Widget w, XtPointer cd, DragCallbackStruct *cb);
+void  drag_drop_callback(Widget w, XtPointer cd, DragCallbackStruct *cb);
+void  drag_click_callback(Widget w, XtPointer cd, DragCallbackStruct *cb);
+void  options_callback(Widget,XtPointer,XtPointer);
+void  help_callback(Widget,XtPointer,XtPointer);
+
+};
+
+
+
+XtAppContext app_context;
+Display      *display;
+svc          *s = NULL;
+int          ac;
+char       **av;
+
+struct {
+	const char *param;
+	int  number;
+	int  on;
+	int  folder;
+	int  cnt;
+	const char *val;
+} names[] = {
+	{"TYPE",    0,0, 1,},
+	{"LEVTYPE", 0,0, 1,},
+	{"DATE",    1,0, 1,},
+	{"TIME",    1,0, 1,},
+	{"STEP",    1,0, 1,},
+	{"PARAM",   1,1, 0,},
+	{"LEVELIST",1,1, 0,},
+	{"NUMBER",  1,1, 0,},
+};
+
+class CIcon {
+public:
+	virtual request* getRequest() { return NULL; };
+	virtual void Open(void)		= 0;
+	virtual ~CIcon()               {};
+};
+
+
+class FieldIcon : public CIcon {
+	Widget  grib;
+	Widget  form;
+	request *req;
+public:
+	request* getRequest()                         { return req; }
+	virtual void Open(void);
+	FieldIcon(request *r) : req(r),grib(0)      {};
+	~FieldIcon()                                { free_all_requests(req); };
+};
+
+class FolderIcon : public CIcon {
+	Widget top;
+	Widget form;
+	Widget drag;
+public:
+	virtual void Open(void)                     {
+	XtManageChild(form);
+	XRaiseWindow(XtDisplay(top),XtWindow(top));};
+	FolderIcon(Widget t,Widget f,Widget d) : top(t),form(f),drag(d) {}
+	~FolderIcon()    { XtDestroyWidget(top);};
+};
+
+//==============================================
+
+static char *nameof(request *r)
+{
+	static	char name[80];
+	static	char unknown[] = "???";
+	const char   *a;
+
+	*name = 0;
+	for(int i = 0;i<NUMBER(names);i++)
+		if(names[i].on && (a = get_value(r,names[i].param,0)))
+		{
+			if(*name) strcat(name,"-");
+			strcat(name,a);
+		}
+
+	if(!*name)
+	   return unknown;
+
+	return name;
+}
+
+
+void help_callback(Widget,XtPointer,XtPointer)
+{
+}
+
+void options_callback(Widget,XtPointer,XtPointer)
+{
+}
+
+void drag_send_callback(Widget, XtPointer, DragCallbackStruct *)
+{
+}
+
+void drag_drop_callback(Widget, XtPointer, DragCallbackStruct*)
+{
+}
+
+
+void FieldIcon::Open(void)
+{
+
+	if(grib == NULL)
+	{
+		char  *tmp = marstmp();
+		char buf[1024];
+
+		const char* cv = get_value(req,"OFFSET",0);
+		int offset = atoi( cv ) + 1; //-- adjust MARS offset for 'tail' cmd
+
+		cv = get_value(req,"LENGTH",0);
+		int length = atoi( cv );
+
+		freopen(tmp,"w",stdout);
+
+		//-- build cmd line to call script mv_grib_dump
+		sprintf(buf,"$METVIEW_BIN/mv_grib_dump \"%s\" %d %d 2>&1",
+			get_value(req,"PATH",0), offset, length );
+
+		system(buf);
+
+		create_text_top(top);
+		grib = text;
+		form = text_form;
+		XtVaSetValues(text_top,XmNtitle,nameof(req),NULL);
+		xec_LoadText(grib,tmp,false);
+		unlink(tmp);
+	}
+	XtManageChild(form);
+}
+
+
+void drag_click_callback(Widget, XtPointer, DragCallbackStruct *cb)
+{
+	CIcon *c = (CIcon*)cb->icon_data;
+	c->Open();
+}
+
+
+static int sortmax;
+static int sortcnt;
+
+static int comp(const void *a,const void *b)
+{
+	request **r = (request**)a;
+	request **s = (request**)b;
+
+	progress_value(++sortcnt);
+
+	for(int j = 0; j<NUMBER(names);j++)
+	{
+		const char *x = get_value(*r,names[j].param,0);
+		const char *y = get_value(*s,names[j].param,0);
+
+		int c = 0;
+
+		if(x && y) { if(names[j].number) c = atol(x) - atol(y) ; else c = strcmp(x,y); }
+		else if(x) c = 1;
+		else if(y) c = -1;
+
+		if(c) return c;
+	}
+	return 0;
+}
+
+static void dropSourceCB(Widget,dropid *id,void*)
+{
+	request *r = clone_all_requests(id->header);
+	request *t = r;
+	int i;
+
+	switch(id->action)
+	{
+		case DROP_ACTION_NAME_AND_CLASS:
+			/* Should report error here .... */
+			break;
+
+		case DROP_ACTION_DEFINITION:
+		case DROP_ACTION_RESOLVE:
+			for(i = 0 ; i < id->count ; i++)
+			{
+				CIcon   *c = (CIcon*)id->cb[i].icon_data;
+				request *s = clone_all_requests(c->getRequest());
+
+				if(t == NULL)
+					r = t = s;
+				else
+				{
+					request *q = t;
+					while(t) { q = t; t = t->next; }
+					q->next = s;
+					t = s;
+				}
+			}
+			break;
+	}
+
+	printf("Sending to %s\n",id->service);
+	print_all_requests(r);
+	call_service(id->s,id->service,r,NULL);
+
+}
+
+static void dropTargetCB(Widget w,dropid *id,void*)
+{
+	id->action = DROP_ACTION_RESOLVE;
+
+	/* id->mode   = empty_request("METGRAM"); */
+
+	id->header = empty_request("DROP");
+	set_value(id->header,"WIDGET","%s",XtName(w));
+}
+
+static void install(Widget w,request **p,int& n,int max,int j,const char *q)
+{
+	const char *x = NULL;
+	const char *y = NULL;
+
+	RegisterDropSource(s, w, dropSourceCB,NULL);
+	RegisterDropTarget(s, w, dropTargetCB,NULL);
+	while(names[j].folder && !names[j].cnt) j++;
+
+	while(n<max)
+	{
+		request *r = p[n];
+
+		if( q && (x = get_value(r,q,0)))
+			if(y == NULL) y = x;
+			else if(x != y) break;
+
+		if(names[j].cnt && names[j].folder)
+		{
+			const char *a = get_value(r,names[j].param,0);
+			create_folder_top(top);
+			XtVaSetValues(folder_top,XmNtitle,a?a:"???",NULL);
+			Widget f = folder_drag;
+			DragAddIcon(w,"Folder",
+				a ? a : "???",
+				(XtPointer)new FolderIcon(folder_top,folder_form,folder_drag),
+				0,0);
+			install(f,p,n,max,j+1,names[j].param);
+			DragCleanUpIcons(f);
+		}
+		else
+		{
+			const char *a = get_value(r,"REPRES",0);
+			DragAddIcon(w,
+			    a ? a : "LL",
+			    nameof(r),
+			    (XtPointer)new FieldIcon(r),
+				0,0);
+			n++;
+			progress_value(n);
+		}
+	}
+}
+
+#define MAXFILEDS      2048
+#define SMALL_BUF_LEN  1024
+
+//-- possible return codes from 'readany' function:
+#define READANY_OK                0
+#define READANY_EOF              -1
+#define READANY_BUFFER_TOO_SMALL -3
+#define READANY_MISPLACED_7777   -5
+
+void build_drag(char *name,char *clss,char *path,request *filter)
+{
+	typedef request* reqp;
+	char buf[1024];
+	char small_buf[SMALL_BUF_LEN];
+
+print_all_requests(filter);
+
+	reqp *p = new reqp[MAXFILEDS];
+
+	sprintf(buf,"Examine %s: Reading file",name);
+	progress_init(top);
+	progress_start(buf,3);
+
+	int  cnt = 0;
+	int i;
+
+	int offsets = count_values(filter,"OFFSET");
+	int indexes = count_values(filter,"INDEX");
+
+	const char* c_offset = "OFFSET";
+	const char* c_index  = "INDEX";
+	const char *param    = c_offset;
+	int   count = offsets;
+
+	if(indexes) {
+		param = c_index;
+		count = indexes;
+	}
+
+	long *vals = new long[count];
+	for(i = 0;i<count;i++)
+		vals[i] = atol(get_value(filter,param,i));
+
+
+	FILE *f = fopen(path,"r");
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",path);
+		marsexit(1);
+	}
+
+	fseek(f,0,SEEK_END);
+	long filesize = ftell(f);
+	rewind(f);
+
+	progress_start(buf,filesize);
+	int n = 0;
+
+	long offset   = 0;
+	if(offsets)
+	{
+		offset = vals[0];
+		fseek(f,offset,SEEK_SET);
+	}
+
+	bool endOfFile = false;
+	while((cnt < MAXFILEDS) && !endOfFile )
+	{
+		long curPos = ftell(f);      //-- store the current file pos
+
+		//-- call 'readany' with a small (but big enough) buffer,
+		//-- 'readany' returns the true length in 3rd argument
+		long msg_length = SMALL_BUF_LEN;
+		err e = _readany(f, small_buf, &msg_length);
+		if( e == READANY_EOF )
+		    break;
+
+cout << "msg_length = " << msg_length << endl;
+
+		//-- now go back and read to a buffer of the right size
+		fseek(f,curPos,SEEK_SET);    //-- go back to the stored file pos
+		char* grib_buf = new char[msg_length];
+		e = _readany(f,grib_buf, &msg_length);
+		if( e != READANY_OK ) {
+			if( e == READANY_MISPLACED_7777 )
+			    marslog(LOG_EROR, "Missing/misplaced 7777 (end-of-msg)");
+			else
+			    marslog(LOG_EROR|LOG_PERR,"Read error: 'readany' returns %d", e);
+			marsexit(1);
+		}
+
+		boolean ok = true;
+		n++;
+
+		if(indexes) {
+			ok = false;
+			for(i=0; i<count; i++)
+				if(n == vals[i]) {
+					ok = true;
+					break;
+				}
+		}
+
+		if(ok) {
+			request *r = empty_request("GRIB");
+			grib_to_request(r,grib_buf,msg_length);
+			offset = ftell(f) - msg_length;
+
+			set_value(r,"OFFSET","%d",offset);
+			set_value(r,"LENGTH","%d",msg_length);
+			set_value(r,"PATH","%s",path);
+			set_value(r,"TYPE","GRIB");
+			set_value(r,"_NAME", "%s/Field %d of %s",name,cnt+1,mbasename(name));
+			set_value(r,"_CLASS","%s",clss);
+
+			// set the REPRES parameter. If any of this fails, then
+			// REPRES wil not be set, and a default of LL will be used.
+
+			grib_handle *g = grib_handle_new_from_message(0,grib_buf,msg_length);
+
+			if (g) {
+				const size_t cMaxBuf = 99;
+				char strbuf[ cMaxBuf+1 ];
+				size_t slen = cMaxBuf;
+
+				int  err = grib_get_string(g, "gridType", strbuf, &slen);
+				if (!err) {
+					     if (!strcmp (strbuf, "reduced_gg")) set_value(r,"REPRES", "GG");
+					else if (!strcmp (strbuf, "regular_gg")) set_value(r,"REPRES", "GG");
+					else if (!strcmp (strbuf, "regular_ll")) set_value(r,"REPRES", "LL");
+					else if (!strcmp (strbuf, "rotated_ll")) set_value(r,"REPRES", "LL");
+					else if (!strcmp (strbuf, "sh"))         set_value(r,"REPRES", "SH");
+					else if (!strcmp (strbuf, "space_view")) set_value(r,"REPRES", "SV");
+
+					// "lambert", "mercator" grids not catered for;
+				}
+			}
+
+			for(int j = 0; j<NUMBER(names);j++)
+			{
+				const char *p;
+				if(!names[j].val)
+					names[j].val = get_value(r,names[j].param,0);
+				else if(!names[j].cnt && (p = get_value(r,names[j].param,0)))
+					names[j].cnt = p != names[j].val;
+			}
+
+			p[cnt++] = r;
+		}
+
+		offset += msg_length;
+
+		progress_value(offset);
+
+		if(offsets) {
+			if(n >= offsets) break;
+			offset = vals[n];
+			fseek(f,offset,SEEK_SET);
+		}
+
+		delete [] grib_buf;
+	}
+	progress_stop();
+	progress_value(1);
+
+	fclose(f);
+	delete[] vals;
+
+	if(cnt)
+	{
+
+		sprintf(buf,"Examine %s: Sorting fileds",name);
+
+		double dcnt = (double)cnt;
+		sortmax = log(dcnt)/log(2.0)*dcnt; /* best guess */
+		sortcnt = 0;
+
+		progress_start(buf,sortmax);
+		qsort(p,cnt,sizeof(request*),comp);
+		progress_stop();
+
+
+		progress_value(1);
+		sprintf(buf,"Examine %s: Building interface",name);
+		progress_start(buf,cnt);
+		int n = 0;
+		install(drag,p,n,cnt,0,NULL);
+		XtRealizeWidget(top);
+		DragCleanUpIcons(drag);
+		progress_stop();
+	}
+	progress_stop();
+
+
+	delete[] p;
+
+}
+
+
+void drop(svcid *id,request *r,void *)
+{
+	printf("Got drop: \n");
+	mars.debug = true;
+	print_all_requests(r);
+	mars.debug = false;
+	send_reply(id,NULL);
+}
+
+//==============================================
+
+void exam(svcid *id,request *r,void *)
+{
+
+	char buf[1024];
+	r = clone_all_requests(r);
+	char *p = strcache(get_value(r,"PATH",0));
+	char *n = strcache(get_value(r,"_NAME",0));
+	char *c = strcache(get_value(r,"_CLASS",0));
+
+	if(fork_service(id)>0) return;
+
+
+	send_reply(id,NULL);
+
+	XtToolkitInitialize ();
+	app_context = XtCreateApplicationContext ();
+	display=XtOpenDisplay(app_context,0,mbasename(av[0]),
+		"Metview",0,0,
+#if (XmVersion >= 1002)
+		&ac,
+#else
+		(Cardinal*)&ac,
+#endif
+		av);
+	if (!display) marslog(LOG_EXIT,"can't open display, exiting...");
+
+	create_top(display, av[0], ac, av );
+	sprintf(buf,"Data in %s",n);
+
+	XtVaSetValues(top,XmNtitle,buf,NULL);
+
+	build_drag(n,c,p,r);
+	free_all_requests(r);
+
+	ListenToService(app_context,s);
+	XtRealizeWidget(top);
+
+	XtAppMainLoop(app_context);
+}
+
+
+int main(int argc,char **argv)
+{
+    marsinit(&argc,argv,0,0,0);
+
+	ac = argc;
+	av = argv;
+
+	s = create_service(progname());
+	add_service_callback(s, "GRIB", exam,  NULL);
+	add_service_callback(s, "IMAGE",exam,  NULL);
+	add_service_callback(s, "DROP", drop,  NULL);
+	service_run(s);
+
+	return 0;
+}
diff --git a/src/AppMod/exammain.c b/src/AppMod/exammain.c
new file mode 100644
index 0000000..b63a941
--- /dev/null
+++ b/src/AppMod/exammain.c
@@ -0,0 +1,264 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer 
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Text.h>
+#include <Drag.h>
+
+#define XtNfontList XmNfontList
+
+extern void XDmanage_link ( );
+extern void XDunmanage_link ( );
+extern void XDpopup_link ( );
+extern void XDpopdown_link ( );
+extern void XDmap_link ( );
+extern void XDunmap_link ( );
+extern void XDenable_link ( );
+extern void XDdisable_link ( );
+
+extern void drag_click_callback ();
+extern void options_callback ();
+extern void help_callback ();
+
+Widget text_top = (Widget)NULL;
+Widget text_form = (Widget)NULL;
+Widget text = (Widget)NULL;
+
+Widget folder_top = (Widget)NULL;
+Widget folder_form = (Widget)NULL;
+Widget folder_drag = (Widget)NULL;
+
+Widget top = (Widget)NULL;
+Widget form = (Widget)NULL;
+Widget drag = (Widget)NULL;
+
+
+void create_text_top (parent)
+Widget parent;
+{
+	Display *display = XtDisplay ( parent );
+	Widget children[3];      /* Children to manage */
+	Arg al[64];           /* Arg List */
+	register int ac = 0;      /* Arg Count */
+	char from_s [256];    /* For font list conversion */
+	XrmValue from_value, to_value; /* ditto */
+	int fg, bg;           /* colour values for pixmaps */ 
+	XmString *list_items; /* For list items */
+	int list_item;        /* Index for list_items */
+	XmString xmstrings[15];    /* temporary storage for XmStrings */
+	Widget widget2 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	text_top = XmCreateDialogShell ( parent, "text_top", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 450); ac++;
+	XtSetArg(al[ac], XmNheight, 600); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	text_form = XmCreateForm ( text_top, "text_form", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNcursorPositionVisible, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	text = XmCreateScrolledText ( text_form, "text", al, ac );
+	ac = 0;
+	widget2 = XtParent ( text );
+
+	XtSetArg(al[ac], XmNwidth, 450); ac++;
+	XtSetArg(al[ac], XmNheight, 600); ac++;
+        XtSetValues ( widget2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+        XtSetValues ( widget2,al, ac );
+	ac = 0;
+	XtManageChild(text);
+}
+
+
+
+void create_folder_top (parent)
+Widget parent;
+{
+	Display *display = XtDisplay ( parent );
+	Widget children[3];      /* Children to manage */
+	Arg al[64];           /* Arg List */
+	register int ac = 0;      /* Arg Count */
+	char from_s [256];    /* For font list conversion */
+	XrmValue from_value, to_value; /* ditto */
+	int fg, bg;           /* colour values for pixmaps */ 
+	XmString *list_items; /* For list items */
+	int list_item;        /* Index for list_items */
+	XmString xmstrings[15];    /* temporary storage for XmStrings */
+	Widget widget8 = (Widget)NULL;
+	Widget widget9 = (Widget)NULL;
+	Widget widget10 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	folder_top = XmCreateDialogShell ( parent, "folder_top", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 529); ac++;
+	XtSetArg(al[ac], XmNheight, 327); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	folder_form = XmCreateForm ( folder_top, "folder_form", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	widget8 = XmCreateScrolledWindow ( folder_form, "widget8", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &widget9 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &widget10 ); ac++;
+	XtGetValues(widget8, al, ac );
+	ac = 0;
+#if 0
+	sprintf ( from_s, "-*-*-*-i-*-*-*-*-*-*-*-*-*-*" );
+	from_value.size = strlen(from_s)+1;
+	from_value.addr = from_s;
+	XtConvert(widget8, XmRString, &from_value, XmRFontList, &to_value);
+	XtSetArg(al[ac], XtNfontList, *(int *)to_value.addr); ac++;
+#endif
+	XtSetArg(al[ac], XmNwidth, 500); ac++;
+	XtSetArg(al[ac], XmNheight, 300); ac++;
+	folder_drag = XtCreateWidget ( "examin_drag", dragWidgetClass, widget8, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+        XtSetValues ( widget8,al, ac );
+	ac = 0;
+	XtAddCallback (folder_drag, XtNdblClickCallback, drag_click_callback,NULL);
+	children[ac++] = folder_drag;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(widget8, widget9, widget10, folder_drag );
+	children[ac++] = widget8;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+
+
+void create_top (display, app_name, app_argc, app_argv)
+Display *display;
+char *app_name;
+int app_argc;
+char **app_argv;
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];           /* Arg List */
+	register int ac = 0;      /* Arg Count */
+	char from_s [256];    /* For font list conversion */
+	XrmValue from_value, to_value; /* ditto */
+	int fg, bg;           /* colour values for pixmaps */ 
+	XmString *list_items; /* For list items */
+	int list_item;        /* Index for list_items */
+	XmString xmstrings[15];    /* temporary storage for XmStrings */
+	Widget widget14 = (Widget)NULL;
+	Widget widget15 = (Widget)NULL;
+	Widget widget16 = (Widget)NULL;
+	Widget widget17 = (Widget)NULL;
+	Widget widget18 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	top = XtAppCreateShell ( app_name, "Metview", applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 532); ac++;
+	XtSetArg(al[ac], XmNheight, 357); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form = XmCreateForm ( top, "form", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	widget14 = XmCreateRowColumn ( form, "widget14", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR("Options...", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	widget15 = XmCreatePushButton ( widget14, "widget15", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNwidth, 532); ac++;
+	XtSetArg(al[ac], XmNheight, 329); ac++;
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	widget16 = XmCreateScrolledWindow ( form, "widget16", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &widget17 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &widget18 ); ac++;
+	XtGetValues(widget16, al, ac );
+	ac = 0;
+#if 0
+	sprintf ( from_s, "-*-*-*-i-*-*-*-*-*-*-*-*-*-*" );
+	from_value.size = strlen(from_s)+1;
+	from_value.addr = from_s;
+	XtConvert(widget16, XmRString, &from_value, XmRFontList, &to_value);
+	XtSetArg(al[ac], XtNfontList, *(int *)to_value.addr); ac++;
+#endif
+	XtSetArg(al[ac], XmNwidth, 500); ac++;
+	XtSetArg(al[ac], XmNheight, 300); ac++;
+	drag = XtCreateWidget ( "examin_drag", dragWidgetClass, widget16, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+        XtSetValues ( widget14,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, widget14); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+        XtSetValues ( widget16,al, ac );
+	ac = 0;
+	XtAddCallback (widget15, XmNactivateCallback, options_callback,NULL);
+	children[ac++] = widget15;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (drag, XmNhelpCallback, help_callback,NULL);
+	XtAddCallback (drag, XtNdblClickCallback, drag_click_callback,NULL);
+	children[ac++] = drag;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(widget16, widget17, widget18, drag );
+	children[ac++] = widget14;
+	children[ac++] = widget16;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form);
+}
+
+
diff --git a/src/AppMod/examwidgets.h b/src/AppMod/examwidgets.h
new file mode 100644
index 0000000..6957f57
--- /dev/null
+++ b/src/AppMod/examwidgets.h
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+/*
+** Generated by X-Designer 
+*/
+
+extern Widget text_top;
+extern Widget text_form;
+extern Widget text;
+
+extern Widget folder_top;
+extern Widget folder_form;
+extern Widget folder_drag;
+
+extern Widget top;
+extern Widget form;
+extern Widget drag;
+
+extern void create_text_top (Widget);
+extern void create_folder_top (Widget);
+extern void create_top (Display *, char *, int, char **);
diff --git a/src/AppMod/mailcback.c b/src/AppMod/mailcback.c
new file mode 100644
index 0000000..def0c8c
--- /dev/null
+++ b/src/AppMod/mailcback.c
@@ -0,0 +1,296 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Xm/List.h>
+#include <Xm/Text.h>
+#include <Xm/PushB.h>
+#include <mars.h>
+#include <Drag.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <xec.h>
+#include <drop.h>
+
+typedef struct data {
+	char *to;
+	char *subject;
+} data;
+
+static option opts[] = {
+	{"to",NULL,NULL,"metview at ecmwf.int",
+	t_str,sizeof(char*),OFFSET(data,to),},
+	{"subject",NULL,NULL,"Metview Bug Report",
+	t_str,sizeof(char*),OFFSET(data,subject),},
+};
+
+data setup;
+
+
+Boolean bug = False;
+svc *s;
+extern Widget top,text_to,text_subject,text_msg,list_icons,
+remove_button,menu_to;
+
+XtAppContext app_context;
+Display      *display;
+
+void out(int lvl,const char *message)
+{
+	static request *r = NULL;
+	if(r == NULL) r = empty_request("USER_MESSAGE");
+	set_value(r,"INFO","%s",message);
+	send_message(s,r);
+}
+
+int execute(char *buf)
+{
+	char line[1024];
+	FILE *f = popen(buf,"r");
+	if(!f) {
+		marslog(LOG_EROR|LOG_PERR,"popen(%s) failed",buf);
+		return -1;
+	}
+
+	while(fgets(line,sizeof(line),f))
+		marslog(LOG_INFO,"%s",line);
+
+	if(pclose(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"pclose(%s) failed",buf);
+		return -1;
+	}
+	return 0;
+}
+
+void add_addresses(char *add)
+{
+	char line[1024];
+	if(add)
+	{
+		if(*add)
+			XtManageChild(XmCreatePushButton(menu_to,add,0,0));
+	}
+	else
+	{
+		FILE *f = popen("sort -u $METVIEW_USER_DIRECTORY/..mail","r");
+		if(!f) return;
+		while(fgets(line,sizeof(line),f))
+		{
+			if(*line) line[strlen(line)-1] = 0;
+			if(*line) XtManageChild(XmCreatePushButton(menu_to,line,0,0));
+		}
+		pclose(f);
+	}
+}
+
+void save_addresses()
+{
+	char buf[1024];
+	FILE *f;
+	Widget *children;
+	int count,i;
+
+	sprintf(buf,"%s/..mail",getenv("METVIEW_USER_DIRECTORY"));
+	f = fopen(buf,"w");
+	if(!f) return;
+
+	XtVaGetValues(menu_to,
+		XmNchildren,&children,
+		XmNnumChildren,&count,NULL);
+
+	for(i=0;i<count;i++)
+		fprintf(f,"%s\n",XtName(children[i]));
+
+	fclose(f);
+}
+
+void drag_callback( Widget w , XtPointer cd , DragCallbackStruct* cb )
+{
+	/* cb->accept_it = True; */
+	/* printf("drag_callback\n"); */
+}
+
+void send_callback (Widget w, XtPointer cd, XmAnyCallbackStruct *cb )
+{
+	char  cmd[10240];
+	char  buf[1024];
+	XmString *items;
+	int       item_count,i;
+	char *tmp = marstmp();
+	char *p;
+
+
+	xec_SaveText(text_msg,tmp);
+
+	sprintf(cmd,"%s/metview-mail -s ",getenv("METVIEW_BIN"));
+
+	sprintf(buf,"\"%s\" ",p=XmTextGetString(text_to)) ; XtFree((XtPointer)p);
+	strcat(cmd,buf);
+	sprintf(buf,"\"%s\" ",p=XmTextGetString(text_subject));XtFree((XtPointer)p);
+	strcat(cmd,buf);
+	sprintf(buf,"\"%s\" ",tmp);
+	strcat(cmd,buf);
+
+	XtVaGetValues(list_icons,XmNitems,&items,XmNitemCount,&item_count,NULL);
+	for(i=0;i<item_count;i++)
+	{
+		sprintf(buf,"\"%s\" ",p=xec_GetString(items[i]));XtFree((XtPointer)p);
+		strcat(cmd,buf);
+	}
+
+
+	add_addresses(p = XmTextGetString(text_to));XtFree((XtPointer)p);
+	save_addresses();
+
+	strcat(cmd," 2>&1");
+
+	if(execute(cmd) == 0)
+	{
+		marslog(LOG_INFO,"Mail sent...");
+		exit(0);
+	}
+	marslog(LOG_INFO,"Error while sending mail...");
+}
+
+void cancel_callback (Widget w, XtPointer cd, XmAnyCallbackStruct *cb )
+{
+	marsexit(0);
+}
+
+void browse_callback (Widget w, XtPointer cd, XmListCallbackStruct *cb )
+{
+	XtSetSensitive(remove_button,cb->selected_item_count>0);
+}
+
+void remove_callback (Widget w, XtPointer cd, XmAnyCallbackStruct *cb )
+{
+	XmString *items;
+	int       item_count;
+
+	XtVaGetValues(list_icons,
+	    XmNselectedItems,&items,
+	    XmNselectedItemCount,&item_count,NULL);
+	XmListDeleteItems(list_icons,items,item_count);
+	XtSetSensitive(remove_button,False);
+}
+
+void entry_callback (Widget w, XtPointer cd, XmRowColumnCallbackStruct *cb )
+{
+	XmTextSetString(text_to,XtName(cb->widget));
+}
+
+void init(request *r)
+{
+	const char *p;
+	int n = 0;
+
+	if(XtIsRealized(top)) XMapRaised(XtDisplay(top),XtWindow(top));
+
+	p = get_value(r,"TO",0);
+	XmTextSetString(text_to,(char*)(p?p:""));
+	p = get_value(r,"SUBJECT",0);
+	XmTextSetString(text_subject,(char*)(p?p:""));
+	p = get_value(r,"MESSAGE",0);
+	XmTextSetString(text_msg,(char*)(p?p:""));
+
+	xec_ClearList(list_icons);
+	XtSetSensitive(remove_button,False);
+
+	/* while(p = get_value(r,"SELECTION",n++)) xec_AddListItem(list_icons,p);*/
+}
+
+/* rename 'mail' to 'email' because 'mail' conflicts with './Mars/tools.c' */
+void email(svcid *id,request *r,void *v)
+{
+	init(r);
+	bug = False;
+	send_reply(id,NULL);
+}
+
+void bugs(svcid *id,request *r,void *v)
+{
+	init(r);
+	bug = True;
+	XmTextSetString(text_to,setup.to);
+	XmTextSetString(text_subject,setup.subject);
+	send_reply(id,NULL);
+}
+
+void state(svcid *id,request *r,void *v)
+{
+	mars.debug = 1;
+	print_all_requests(r);
+	r = empty_request("MAIL");
+	send_reply(id,r);
+	free_all_requests(r);
+}
+
+void drop(svcid *id,request *r,void *v)
+{
+	while(r)
+	{
+        const char *p = get_value(r,"NAME",0);
+        if(p) xec_AddListItem(list_icons,p);
+		r = r->next;
+	}
+	send_reply(id,0);
+}
+
+void receive(Widget w, dropid *id  , void *data)
+{
+	int i;
+	for(i=0;i<id->count;i++)
+		printf("receive --- %s %s\n",id->cb[i].icon_name,id->cb[i].icon_class);
+
+	id->header = empty_request("DROP");
+	id->action = DROP_ACTION_NAME_AND_CLASS;
+}
+
+
+
+int main (int argc, char **argv)
+{
+	marsinit(&argc,argv,&setup,NUMBER(opts),opts);
+
+
+	XtToolkitInitialize ();
+	app_context = XtCreateApplicationContext ();
+	display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+	    NULL, 0, &argc, argv);
+	if (!display)
+	{
+		printf("%s: can't open display, exiting...\n", argv[0]);
+		exit (-1);
+	}
+	/* Register converters, just in case you are really unlucky !! */
+	XmRegisterConverters();
+	/* String to unit type doesn't get added !! */
+	XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
+	create_top ( display, argv[0], argc, argv );
+
+
+	s = RegisterService(app_context,progname());
+
+	mars.outproc = out;
+
+	add_service_callback(s,"MAIL", email, NULL);
+	add_service_callback(s,"BUGS", bugs, NULL);
+	add_service_callback(s,"DROP", drop, NULL);
+
+	RegisterDropTarget(s,list_icons,receive,NULL);
+	XtRealizeWidget (top);
+
+	add_addresses(NULL);
+
+	XtAppMainLoop (app_context);
+	exit (0);
+}
diff --git a/src/AppMod/maill.c b/src/AppMod/maill.c
new file mode 100644
index 0000000..bbcf68c
--- /dev/null
+++ b/src/AppMod/maill.c
@@ -0,0 +1,1856 @@
+
+#line 3 "lex.mail.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 33
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define mailconst const
+#else
+#define mailconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (mail_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((mail_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE mailrestart(mailin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(mail_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct mail_buffer_state *YY_BUFFER_STATE;
+#endif
+
+extern int mailleng;
+
+extern FILE *mailin, *mailout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    /* Note: We specifically omit the test for mail_rule_can_match_eol because it requires
+     *       access to the local variable mail_act. Since mailless() is a macro, it would break
+     *       existing scanners that call mailless() from OUTSIDE maillex. 
+     *       One obvious solution it to make mail_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-maillineno scanner, because mail_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int maill;\
+                for ( maill = n; maill < mailleng; ++maill )\
+                    if ( mailtext[maill] == '\n' )\
+                        --maillineno;\
+            }while(0)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define mailless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up mailtext. */ \
+        int mailless_macro_arg = (n); \
+        YY_LESS_LINENO(mailless_macro_arg);\
+		*mail_cp = (mail_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(mail_c_buf_p) = mail_cp = mail_bp + mailless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up mailtext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) mailunput( c, (mailtext_ptr)  )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef unsigned int mail_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct mail_buffer_state
+	{
+	FILE *mail_input_file;
+
+	char *mail_ch_buf;		/* input buffer */
+	char *mail_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	mail_size_t mail_buf_size;
+
+	/* Number of characters read into mail_ch_buf, not including EOB
+	 * characters.
+	 */
+	int mail_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int mail_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int mail_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int mail_at_bol;
+
+    int mail_bs_lineno; /**< The line count. */
+    int mail_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int mail_fill_buffer;
+
+	int mail_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via mailrestart()), so that the user can continue scanning by
+	 * just pointing mailin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t mail_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t mail_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * mail_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (mail_buffer_stack) \
+                          ? (mail_buffer_stack)[(mail_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (mail_buffer_stack)[(mail_buffer_stack_top)]
+
+/* mail_hold_char holds the character lost when mailtext is formed. */
+static char mail_hold_char;
+static int mail_n_chars;		/* number of characters read into mail_ch_buf */
+int mailleng;
+
+/* Points to current character in buffer. */
+static char *mail_c_buf_p = (char *) 0;
+static int mail_init = 0;		/* whether we need to initialize */
+static int mail_start = 0;	/* start state number */
+
+/* Flag which is used to allow mailwrap()'s to do buffer switches
+ * instead of setting up a fresh mailin.  A bit of a hack ...
+ */
+static int mail_did_buffer_switch_on_eof;
+
+void mailrestart (FILE *input_file  );
+void mail_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE mail_create_buffer (FILE *file,int size  );
+void mail_delete_buffer (YY_BUFFER_STATE b  );
+void mail_flush_buffer (YY_BUFFER_STATE b  );
+void mailpush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void mailpop_buffer_state (void );
+
+static void mailensure_buffer_stack (void );
+static void mail_load_buffer_state (void );
+static void mail_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER mail_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE mail_scan_buffer (char *base,mail_size_t size  );
+YY_BUFFER_STATE mail_scan_string (mailconst char *mail_str  );
+YY_BUFFER_STATE mail_scan_bytes (mailconst char *bytes,int len  );
+
+void *mailalloc (mail_size_t  );
+void *mailrealloc (void *,mail_size_t  );
+void mailfree (void *  );
+
+#define mail_new_buffer mail_create_buffer
+
+#define mail_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        mailensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            mail_create_buffer(mailin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->mail_is_interactive = is_interactive; \
+	}
+
+#define mail_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        mailensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            mail_create_buffer(mailin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->mail_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->mail_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *mailin = (FILE *) 0, *mailout = (FILE *) 0;
+
+typedef int mail_state_type;
+
+#define YY_FLEX_LEX_COMPAT
+extern int maillineno;
+
+int maillineno = 1;
+
+extern char mailtext[];
+
+static mail_state_type mail_get_previous_state (void );
+static mail_state_type mail_try_NUL_trans (mail_state_type current_state  );
+static int mail_get_next_buffer (void );
+static void mail_fatal_error (mailconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up mailtext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(mailtext_ptr) = mail_bp; \
+	mailleng = (size_t) (mail_cp - mail_bp); \
+	(mail_hold_char) = *mail_cp; \
+	*mail_cp = '\0'; \
+	if ( mailleng + (mail_more_offset) >= YYLMAX ) \
+		YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
+	mail_flex_strncpy( &mailtext[(mail_more_offset)], (mailtext_ptr), mailleng + 1 ); \
+	mailleng += (mail_more_offset); \
+	(mail_prev_more_offset) = (mail_more_offset); \
+	(mail_more_offset) = 0; \
+	(mail_c_buf_p) = mail_cp;
+
+#define YY_NUM_RULES 8
+#define YY_END_OF_BUFFER 9
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct mail_trans_info
+	{
+	flex_int32_t mail_verify;
+	flex_int32_t mail_nxt;
+	};
+static mailconst flex_int16_t mail_acclist[27] =
+    {   0,
+        9,    8,    8,    8,    8,    8,    8,16387,16389,16387,
+     8195,16389, 8197,16388,16388, 8196,16386,16385,16386, 8194,
+    16385, 8193,16390, 8198,16391, 8199
+    } ;
+
+static mailconst flex_int16_t mail_accept[67] =
+    {   0,
+        1,    1,    1,    2,    3,    4,    5,    6,    7,    8,
+        8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
+        8,    8,    8,    8,    8,    8,    9,   10,   10,   10,
+       10,   11,   12,   13,   14,   14,   14,   14,   14,   14,
+       14,   14,   15,   15,   15,   16,   17,   17,   17,   17,
+       17,   18,   19,   19,   20,   21,   22,   23,   23,   23,
+       24,   25,   25,   26,   27,   27
+    } ;
+
+static mailconst flex_int32_t mail_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    3,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    4,    1,    1,
+        1,    1,    1,    1,    1,    1,    5,    6,    7,    8,
+        1,    1,    9,    1,    1,    1,   10,   11,   12,    1,
+        1,    1,   13,   14,    1,   15,   16,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,   17,   18,   19,   20,
+
+       21,    1,   22,    1,    1,   23,    1,    1,   24,    1,
+       25,    1,    1,   26,   27,   28,   29,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static mailconst flex_int32_t mail_meta[30] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1
+    } ;
+
+static mailconst flex_int16_t mail_base[72] =
+    {   0,
+        0,    0,   67,   68,   63,   48,   38,   42,   33,   51,
+       32,   34,   31,   39,   49,   34,   30,   26,   29,   37,
+       46,   45,   31,   26,   31,   43,   42,   21,   23,   32,
+       38,   68,   37,   68,   17,    9,   29,   32,   30,   17,
+       23,   29,   27,    1,   27,   68,   19,   23,   22,   20,
+       22,   21,   10,   18,   68,   17,   68,    7,    4,    2,
+       68,   13,   13,   68,   68,   13,   11,   10,    8,    1,
+        0
+    } ;
+
+static mailconst flex_int16_t mail_def[72] =
+    {   0,
+       66,   66,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   67,   68,   65,   65,   65,
+       67,   65,   68,   65,   65,   65,   65,   65,   65,   65,
+       65,   69,   65,   65,   69,   65,   65,   65,   65,   65,
+       70,   71,   65,   70,   65,   71,   65,   65,   65,   65,
+       65,   65,   65,   65,    0,   65,   65,   65,   65,   65,
+       65
+    } ;
+
+static mailconst flex_int16_t mail_nxt[98] =
+    {   0,
+       56,   54,    5,   61,   62,    6,   48,    7,   45,    8,
+       33,   31,    9,    4,   64,   63,   60,   59,   57,   55,
+       49,   58,   57,   55,   53,   52,   51,   50,   46,   47,
+       46,   44,   43,   42,   41,   40,   39,   38,   34,   32,
+       37,   36,   35,   34,   32,   30,   29,   28,   27,   26,
+       25,   24,   23,   22,   21,   20,   19,   18,   17,   16,
+       15,   14,   13,   12,   11,   10,   65,    3,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65
+
+    } ;
+
+static mailconst flex_int16_t mail_chk[98] =
+    {   0,
+       71,   70,    2,   60,   60,    2,   44,    2,   69,    2,
+       68,   67,    2,   66,   63,   62,   59,   58,   56,   54,
+       44,   53,   52,   51,   50,   49,   48,   47,   45,   43,
+       42,   41,   40,   39,   38,   37,   36,   35,   33,   31,
+       30,   29,   28,   27,   26,   25,   24,   23,   22,   21,
+       20,   19,   18,   17,   16,   15,   14,   13,   12,   11,
+       10,    9,    8,    7,    6,    5,    3,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65
+
+    } ;
+
+/* Table of booleans, true if rule could match eol. */
+static mailconst flex_int32_t mail_rule_can_match_eol[9] =
+    {   0,
+0, 0, 0, 0, 0, 0, 0, 0,     };
+
+extern int mail_flex_debug;
+int mail_flex_debug = 0;
+
+static mail_state_type *mail_state_buf=0, *mail_state_ptr=0;
+static char *mail_full_match;
+static int mail_lp;
+static int mail_looking_for_trail_begin = 0;
+static int mail_full_lp;
+static int *mail_full_state;
+#define YY_TRAILING_MASK 0x2000
+#define YY_TRAILING_HEAD_MASK 0x4000
+#define REJECT \
+{ \
+*mail_cp = (mail_hold_char); /* undo effects of setting up mailtext */ \
+mail_cp = (mail_full_match); /* restore poss. backed-over text */ \
+(mail_lp) = mail_full_lp; /* restore orig. accepting pos. */ \
+(mail_state_ptr) = mail_full_state; /* restore orig. state */ \
+mail_current_state = *(mail_state_ptr); /* restore curr. state */ \
+++(mail_lp); \
+goto find_rule; \
+}
+
+static int mail_more_offset = 0;
+static int mail_prev_more_offset = 0;
+#define mailmore() ((mail_more_offset) = mail_flex_strlen( mailtext ))
+#define YY_NEED_STRLEN
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET \
+	{ \
+	(mail_more_offset) = (mail_prev_more_offset); \
+	mailleng -= (mail_more_offset); \
+	}
+#ifndef YYLMAX
+#define YYLMAX 8192
+#endif
+
+char mailtext[YYLMAX];
+char *mailtext_ptr;
+#line 1 "maill.l"
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+#line 558 "lex.mail.c"
+
+#define INITIAL 0
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int mail_init_globals (void );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int mailwrap (void );
+#else
+extern int mailwrap (void );
+#endif
+#endif
+
+    static void mailunput (int c,char *buf_ptr  );
+    
+#ifndef mailtext_ptr
+static void mail_flex_strncpy (char *,mailconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int mail_flex_strlen (mailconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int mailinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( mailtext, mailleng, 1, mailout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->mail_is_interactive ) \
+		{ \
+		int c = '*'; \
+		size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( mailin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( mailin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, mailin))==0 && ferror(mailin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(mailin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "mailterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef mailterminate
+#define mailterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) mail_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int maillex (void);
+
+#define YY_DECL int maillex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after mailtext and mailleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	if ( mailleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->mail_at_bol = \
+				(mailtext[mailleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register mail_state_type mail_current_state;
+	register char *mail_cp, *mail_bp;
+	register int mail_act;
+    
+#line 10 "maill.l"
+
+#line 716 "lex.mail.c"
+
+	if ( !(mail_init) )
+		{
+		(mail_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! (mail_state_buf) )
+            (mail_state_buf) = (mail_state_type *)mailalloc(YY_STATE_BUF_SIZE  );
+
+		if ( ! (mail_start) )
+			(mail_start) = 1;	/* first start state */
+
+		if ( ! mailin )
+			mailin = stdin;
+
+		if ( ! mailout )
+			mailout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			mailensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				mail_create_buffer(mailin,YY_BUF_SIZE );
+		}
+
+		mail_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		mail_cp = (mail_c_buf_p);
+
+		/* Support of mailtext. */
+		*mail_cp = (mail_hold_char);
+
+		/* mail_bp points to the position in mail_ch_buf of the start of
+		 * the current run.
+		 */
+		mail_bp = mail_cp;
+
+		mail_current_state = (mail_start);
+		mail_current_state += YY_AT_BOL();
+
+		(mail_state_ptr) = (mail_state_buf);
+		*(mail_state_ptr)++ = mail_current_state;
+
+mail_match:
+		do
+			{
+			register YY_CHAR mail_c = mail_ec[YY_SC_TO_UI(*mail_cp)];
+			while ( mail_chk[mail_base[mail_current_state] + mail_c] != mail_current_state )
+				{
+				mail_current_state = (int) mail_def[mail_current_state];
+				if ( mail_current_state >= 66 )
+					mail_c = mail_meta[(unsigned int) mail_c];
+				}
+			mail_current_state = mail_nxt[mail_base[mail_current_state] + (unsigned int) mail_c];
+			*(mail_state_ptr)++ = mail_current_state;
+			++mail_cp;
+			}
+		while ( mail_base[mail_current_state] != 68 );
+
+mail_find_action:
+		mail_current_state = *--(mail_state_ptr);
+		(mail_lp) = mail_accept[mail_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( (mail_lp) && (mail_lp) < mail_accept[mail_current_state + 1] )
+				{
+				mail_act = mail_acclist[(mail_lp)];
+				if ( mail_act & YY_TRAILING_HEAD_MASK ||
+				     mail_looking_for_trail_begin )
+					{
+					if ( mail_act == mail_looking_for_trail_begin )
+						{
+						mail_looking_for_trail_begin = 0;
+						mail_act &= ~YY_TRAILING_HEAD_MASK;
+						break;
+						}
+					}
+				else if ( mail_act & YY_TRAILING_MASK )
+					{
+					mail_looking_for_trail_begin = mail_act & ~YY_TRAILING_MASK;
+					mail_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
+					(mail_full_match) = mail_cp;
+					mail_full_state = (mail_state_ptr);
+					mail_full_lp = (mail_lp);
+					}
+				else
+					{
+					(mail_full_match) = mail_cp;
+					mail_full_state = (mail_state_ptr);
+					mail_full_lp = (mail_lp);
+					break;
+					}
+				++(mail_lp);
+				goto find_rule;
+				}
+			--mail_cp;
+			mail_current_state = *--(mail_state_ptr);
+			(mail_lp) = mail_accept[mail_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+		if ( mail_act != YY_END_OF_BUFFER && mail_rule_can_match_eol[mail_act] )
+			{
+			int maill;
+			for ( maill = (mail_prev_more_offset); maill < mailleng; ++maill )
+				if ( mailtext[maill] == '\n' )
+					   
+    maillineno++;
+;
+			}
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( mail_act )
+	{ /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+#line 11 "maill.l"
+mail_message_id(mailtext+9);
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 12 "maill.l"
+mail_message_id(mailtext+9);
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 13 "maill.l"
+mail_date(mailtext+11);   
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 14 "maill.l"
+mail_subject(mailtext+9);
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 15 "maill.l"
+mail_from(mailtext+6);  
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 16 "maill.l"
+mail_start_icon(); 
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 17 "maill.l"
+mail_end_icon();
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 18 "maill.l"
+ECHO;
+	YY_BREAK
+#line 880 "lex.mail.c"
+			case YY_STATE_EOF(INITIAL):
+				mailterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int mail_amount_of_matched_text = (int) (mail_cp - (mailtext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*mail_cp = (mail_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->mail_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed mailin at a new source and called
+			 * maillex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(mail_n_chars) = YY_CURRENT_BUFFER_LVALUE->mail_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->mail_input_file = mailin;
+			YY_CURRENT_BUFFER_LVALUE->mail_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for mail_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since mail_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (mail_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[(mail_n_chars)] )
+			{ /* This was really a NUL. */
+			mail_state_type mail_next_state;
+
+			(mail_c_buf_p) = (mailtext_ptr) + mail_amount_of_matched_text;
+
+			mail_current_state = mail_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * mail_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			mail_next_state = mail_try_NUL_trans( mail_current_state );
+
+			mail_bp = (mailtext_ptr) + YY_MORE_ADJ;
+
+			if ( mail_next_state )
+				{
+				/* Consume the NUL. */
+				mail_cp = ++(mail_c_buf_p);
+				mail_current_state = mail_next_state;
+				goto mail_match;
+				}
+
+			else
+				{
+				mail_cp = (mail_c_buf_p);
+				goto mail_find_action;
+				}
+			}
+
+		else switch ( mail_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(mail_did_buffer_switch_on_eof) = 0;
+
+				if ( mailwrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * mail_get_next_buffer() to have set up
+					 * mailtext, we can now set up
+					 * mail_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(mail_c_buf_p) = (mailtext_ptr) + YY_MORE_ADJ;
+
+					mail_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (mail_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(mail_c_buf_p) =
+					(mailtext_ptr) + mail_amount_of_matched_text;
+
+				mail_current_state = mail_get_previous_state(  );
+
+				mail_cp = (mail_c_buf_p);
+				mail_bp = (mailtext_ptr) + YY_MORE_ADJ;
+				goto mail_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(mail_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[(mail_n_chars)];
+
+				mail_current_state = mail_get_previous_state(  );
+
+				mail_cp = (mail_c_buf_p);
+				mail_bp = (mailtext_ptr) + YY_MORE_ADJ;
+				goto mail_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of maillex */
+
+/* mail_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int mail_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->mail_ch_buf;
+	register char *source = (mailtext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (mail_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[(mail_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->mail_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (mail_c_buf_p) - (mailtext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((mail_c_buf_p) - (mailtext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->mail_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->mail_n_chars = (mail_n_chars) = 0;
+
+	else
+		{
+			int num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->mail_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[number_to_move]),
+			(mail_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->mail_n_chars = (mail_n_chars);
+		}
+
+	if ( (mail_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			mailrestart(mailin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->mail_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	(mail_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[(mail_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[(mail_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(mailtext_ptr) = &YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[0];
+
+	return ret_val;
+}
+
+/* mail_get_previous_state - get the state just before the EOB char was reached */
+
+    static mail_state_type mail_get_previous_state (void)
+{
+	register mail_state_type mail_current_state;
+	register char *mail_cp;
+    
+	mail_current_state = (mail_start);
+	mail_current_state += YY_AT_BOL();
+
+	(mail_state_ptr) = (mail_state_buf);
+	*(mail_state_ptr)++ = mail_current_state;
+
+	for ( mail_cp = (mailtext_ptr) + YY_MORE_ADJ; mail_cp < (mail_c_buf_p); ++mail_cp )
+		{
+		register YY_CHAR mail_c = (*mail_cp ? mail_ec[YY_SC_TO_UI(*mail_cp)] : 1);
+		while ( mail_chk[mail_base[mail_current_state] + mail_c] != mail_current_state )
+			{
+			mail_current_state = (int) mail_def[mail_current_state];
+			if ( mail_current_state >= 66 )
+				mail_c = mail_meta[(unsigned int) mail_c];
+			}
+		mail_current_state = mail_nxt[mail_base[mail_current_state] + (unsigned int) mail_c];
+		*(mail_state_ptr)++ = mail_current_state;
+		}
+
+	return mail_current_state;
+}
+
+/* mail_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = mail_try_NUL_trans( current_state );
+ */
+    static mail_state_type mail_try_NUL_trans  (mail_state_type mail_current_state )
+{
+	register int mail_is_jam;
+    
+	register YY_CHAR mail_c = 1;
+	while ( mail_chk[mail_base[mail_current_state] + mail_c] != mail_current_state )
+		{
+		mail_current_state = (int) mail_def[mail_current_state];
+		if ( mail_current_state >= 66 )
+			mail_c = mail_meta[(unsigned int) mail_c];
+		}
+	mail_current_state = mail_nxt[mail_base[mail_current_state] + (unsigned int) mail_c];
+	mail_is_jam = (mail_current_state == 65);
+	if ( ! mail_is_jam )
+		*(mail_state_ptr)++ = mail_current_state;
+
+	return mail_is_jam ? 0 : mail_current_state;
+}
+
+    static void mailunput (int c, register char * mail_bp )
+{
+	register char *mail_cp;
+    
+    mail_cp = (mail_c_buf_p);
+
+	/* undo effects of setting up mailtext */
+	*mail_cp = (mail_hold_char);
+
+	if ( mail_cp < YY_CURRENT_BUFFER_LVALUE->mail_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = (mail_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->mail_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->mail_ch_buf )
+			*--dest = *--source;
+
+		mail_cp += (int) (dest - source);
+		mail_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->mail_n_chars =
+			(mail_n_chars) = YY_CURRENT_BUFFER_LVALUE->mail_buf_size;
+
+		if ( mail_cp < YY_CURRENT_BUFFER_LVALUE->mail_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--mail_cp = (char) c;
+
+    if ( c == '\n' ){
+        --maillineno;
+    }
+
+	(mailtext_ptr) = mail_bp;
+	(mail_hold_char) = *mail_cp;
+	(mail_c_buf_p) = mail_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int mailinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(mail_c_buf_p) = (mail_hold_char);
+
+	if ( *(mail_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* mail_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (mail_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->mail_ch_buf[(mail_n_chars)] )
+			/* This was really a NUL. */
+			*(mail_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			int offset = (mail_c_buf_p) - (mailtext_ptr);
+			++(mail_c_buf_p);
+
+			switch ( mail_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because mail_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					mailrestart(mailin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( mailwrap( ) )
+						return EOF;
+
+					if ( ! (mail_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return mailinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(mail_c_buf_p) = (mailtext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (mail_c_buf_p);	/* cast for 8-bit char's */
+	*(mail_c_buf_p) = '\0';	/* preserve mailtext */
+	(mail_hold_char) = *++(mail_c_buf_p);
+
+	YY_CURRENT_BUFFER_LVALUE->mail_at_bol = (c == '\n');
+	if ( YY_CURRENT_BUFFER_LVALUE->mail_at_bol )
+		   
+    maillineno++;
+;
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void mailrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        mailensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            mail_create_buffer(mailin,YY_BUF_SIZE );
+	}
+
+	mail_init_buffer(YY_CURRENT_BUFFER,input_file );
+	mail_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void mail_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		mailpop_buffer_state();
+	 *		mailpush_buffer_state(new_buffer);
+     */
+	mailensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(mail_c_buf_p) = (mail_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->mail_buf_pos = (mail_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->mail_n_chars = (mail_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	mail_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (mailwrap()) processing, but the only time this flag
+	 * is looked at is after mailwrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(mail_did_buffer_switch_on_eof) = 1;
+}
+
+static void mail_load_buffer_state  (void)
+{
+    	(mail_n_chars) = YY_CURRENT_BUFFER_LVALUE->mail_n_chars;
+	(mailtext_ptr) = (mail_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->mail_buf_pos;
+	mailin = YY_CURRENT_BUFFER_LVALUE->mail_input_file;
+	(mail_hold_char) = *(mail_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE mail_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) mailalloc(sizeof( struct mail_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in mail_create_buffer()" );
+
+	b->mail_buf_size = size;
+
+	/* mail_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->mail_ch_buf = (char *) mailalloc(b->mail_buf_size + 2  );
+	if ( ! b->mail_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in mail_create_buffer()" );
+
+	b->mail_is_our_buffer = 1;
+
+	mail_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with mail_create_buffer()
+ * 
+ */
+    void mail_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->mail_is_our_buffer )
+		mailfree((void *) b->mail_ch_buf  );
+
+	mailfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a mailrestart() or at EOF.
+ */
+    static void mail_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	mail_flush_buffer(b );
+
+	b->mail_input_file = file;
+	b->mail_fill_buffer = 1;
+
+    /* If b is the current buffer, then mail_init_buffer was _probably_
+     * called from mailrestart() or through mail_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->mail_bs_lineno = 1;
+        b->mail_bs_column = 0;
+    }
+
+        b->mail_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void mail_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->mail_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->mail_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->mail_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->mail_buf_pos = &b->mail_ch_buf[0];
+
+	b->mail_at_bol = 1;
+	b->mail_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		mail_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void mailpush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	mailensure_buffer_stack();
+
+	/* This block is copied from mail_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(mail_c_buf_p) = (mail_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->mail_buf_pos = (mail_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->mail_n_chars = (mail_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(mail_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from mail_switch_to_buffer. */
+	mail_load_buffer_state( );
+	(mail_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void mailpop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	mail_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((mail_buffer_stack_top) > 0)
+		--(mail_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		mail_load_buffer_state( );
+		(mail_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void mailensure_buffer_stack (void)
+{
+	int num_to_alloc;
+    
+	if (!(mail_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(mail_buffer_stack) = (struct mail_buffer_state**)mailalloc
+								(num_to_alloc * sizeof(struct mail_buffer_state*)
+								);
+		
+		memset((mail_buffer_stack), 0, num_to_alloc * sizeof(struct mail_buffer_state*));
+				
+		(mail_buffer_stack_max) = num_to_alloc;
+		(mail_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((mail_buffer_stack_top) >= ((mail_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (mail_buffer_stack_max) + grow_size;
+		(mail_buffer_stack) = (struct mail_buffer_state**)mailrealloc
+								((mail_buffer_stack),
+								num_to_alloc * sizeof(struct mail_buffer_state*)
+								);
+
+		/* zero only the new slots.*/
+		memset((mail_buffer_stack) + (mail_buffer_stack_max), 0, grow_size * sizeof(struct mail_buffer_state*));
+		(mail_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE mail_scan_buffer  (char * base, mail_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) mailalloc(sizeof( struct mail_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in mail_scan_buffer()" );
+
+	b->mail_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->mail_buf_pos = b->mail_ch_buf = base;
+	b->mail_is_our_buffer = 0;
+	b->mail_input_file = 0;
+	b->mail_n_chars = b->mail_buf_size;
+	b->mail_is_interactive = 0;
+	b->mail_at_bol = 1;
+	b->mail_fill_buffer = 0;
+	b->mail_buffer_status = YY_BUFFER_NEW;
+
+	mail_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to maillex() will
+ * scan from a @e copy of @a str.
+ * @param str a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       mail_scan_bytes() instead.
+ */
+YY_BUFFER_STATE mail_scan_string (mailconst char * mailstr )
+{
+    
+	return mail_scan_bytes(mailstr,strlen(mailstr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to maillex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE mail_scan_bytes  (mailconst char * mailbytes, int  _mailbytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	mail_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _mailbytes_len + 2;
+	buf = (char *) mailalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in mail_scan_bytes()" );
+
+	for ( i = 0; i < _mailbytes_len; ++i )
+		buf[i] = mailbytes[i];
+
+	buf[_mailbytes_len] = buf[_mailbytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = mail_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in mail_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->mail_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void mail_fatal_error (mailconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine mailless() so it works in section 3 code. */
+
+#undef mailless
+#define mailless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up mailtext. */ \
+        int mailless_macro_arg = (n); \
+        YY_LESS_LINENO(mailless_macro_arg);\
+		mailtext[mailleng] = (mail_hold_char); \
+		(mail_c_buf_p) = mailtext + mailless_macro_arg; \
+		(mail_hold_char) = *(mail_c_buf_p); \
+		*(mail_c_buf_p) = '\0'; \
+		mailleng = mailless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int mailget_lineno  (void)
+{
+        
+    return maillineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *mailget_in  (void)
+{
+        return mailin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *mailget_out  (void)
+{
+        return mailout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+int mailget_leng  (void)
+{
+        return mailleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *mailget_text  (void)
+{
+        return mailtext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void mailset_lineno (int  line_number )
+{
+    
+    maillineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see mail_switch_to_buffer
+ */
+void mailset_in (FILE *  in_str )
+{
+        mailin = in_str ;
+}
+
+void mailset_out (FILE *  out_str )
+{
+        mailout = out_str ;
+}
+
+int mailget_debug  (void)
+{
+        return mail_flex_debug;
+}
+
+void mailset_debug (int  bdebug )
+{
+        mail_flex_debug = bdebug ;
+}
+
+static int mail_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from maillex_destroy(), so don't allocate here.
+     */
+
+    /* We do not touch maillineno unless the option is enabled. */
+    maillineno =  1;
+    
+    (mail_buffer_stack) = 0;
+    (mail_buffer_stack_top) = 0;
+    (mail_buffer_stack_max) = 0;
+    (mail_c_buf_p) = (char *) 0;
+    (mail_init) = 0;
+    (mail_start) = 0;
+
+    (mail_state_buf) = 0;
+    (mail_state_ptr) = 0;
+    (mail_full_match) = 0;
+    (mail_lp) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    mailin = stdin;
+    mailout = stdout;
+#else
+    mailin = (FILE *) 0;
+    mailout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * maillex_init()
+     */
+    return 0;
+}
+
+/* maillex_destroy is for both reentrant and non-reentrant scanners. */
+int maillex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		mail_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		mailpop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	mailfree((mail_buffer_stack) );
+	(mail_buffer_stack) = NULL;
+
+    mailfree ( (mail_state_buf) );
+    (mail_state_buf)  = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * maillex() is called, initialization will occur. */
+    mail_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef mailtext_ptr
+static void mail_flex_strncpy (char* s1, mailconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int mail_flex_strlen (mailconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *mailalloc (mail_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *mailrealloc  (void * ptr, mail_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void mailfree (void * ptr )
+{
+	free( (char *) ptr );	/* see mailrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "mailtables"
+
+#line 18 "maill.l"
+
+
+
diff --git a/src/AppMod/maill.l b/src/AppMod/maill.l
new file mode 100644
index 0000000..a793635
--- /dev/null
+++ b/src/AppMod/maill.l
@@ -0,0 +1,18 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+%%
+^Message-Id:.*$              mail_message_id(yytext+9);
+^Message-ID:.*$              mail_message_id(yytext+9);
+^Date:.*$                    mail_date(yytext+11);   
+^Subject:.*$                 mail_subject(yytext+9);
+^From:.*$                    mail_from(yytext+6);  
+^--METVIEW-ICONS$            mail_start_icon(); 
+^--METVIEW-ICONS--$          mail_end_icon();
+%%
diff --git a/src/AppMod/mailmain.c b/src/AppMod/mailmain.c
new file mode 100644
index 0000000..b0157c4
--- /dev/null
+++ b/src/AppMod/mailmain.c
@@ -0,0 +1,319 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer 
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/CascadeB.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/List.h>
+#include <Xm/PanedW.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+extern void send_callback ();
+extern void cancel_callback ();
+extern void entry_callback ();
+extern void browse_callback ();
+extern void remove_callback ();
+
+Widget top = (Widget)NULL;
+Widget form = (Widget)NULL;
+Widget text_subject = (Widget)NULL;
+Widget text_to = (Widget)NULL;
+Widget menu_to = (Widget)NULL;
+Widget text_msg = (Widget)NULL;
+Widget list_icons = (Widget)NULL;
+Widget remove_button = (Widget)NULL;
+
+
+void create_top (display, app_name, app_argc, app_argv)
+Display *display;
+char *app_name;
+int app_argc;
+char **app_argv;
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];           /* Arg List */
+	register int ac = 0;      /* Arg Count */
+	char from_s [256];    /* For font list conversion */
+	XrmValue from_value, to_value; /* ditto */
+	int fg, bg;           /* colour values for pixmaps */ 
+	XmString *list_items; /* For list items */
+	int list_item;        /* Index for list_items */
+	XmString xmstrings[15];    /* temporary storage for XmStrings */
+	Widget widget2 = (Widget)NULL;
+	Widget widget3 = (Widget)NULL;
+	Widget widget4 = (Widget)NULL;
+	Widget widget5 = (Widget)NULL;
+	Widget widget6 = (Widget)NULL;
+	Widget widget7 = (Widget)NULL;
+	Widget widget9 = (Widget)NULL;
+	Widget widget11 = (Widget)NULL;
+	Widget widget12 = (Widget)NULL;
+	Widget widget14 = (Widget)NULL;
+	Widget widget18 = (Widget)NULL;
+	Widget widget19 = (Widget)NULL;
+	Widget widget24 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Metview-Mail"); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	top = XtAppCreateShell ( app_name, "Metview", applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form = XmCreateForm ( top, "form", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringCreateLtoR("Send", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	widget2 = XmCreatePushButton ( form, "widget2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR("Cancel", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	widget3 = XmCreatePushButton ( form, "widget3", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	widget4 = XmCreatePanedWindow ( form, "widget4", al, ac );
+	widget5 = XmCreateForm ( widget4, "widget5", al, ac );
+	widget6 = XmCreateForm ( widget5, "widget6", al, ac );
+	xmstrings[0] = XmStringCreateLtoR("Subject:", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	widget7 = XmCreateLabel ( widget6, "widget7", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	text_subject = XmCreateText ( widget6, "text_subject", al, ac );
+	widget9 = XmCreateForm ( widget5, "widget9", al, ac );
+	text_to = XmCreateText ( widget9, "text_to", al, ac );
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	widget11 = XmCreateMenuBar ( widget9, "widget11", al, ac );
+	ac = 0;
+	menu_to = XmCreatePulldownMenu ( widget11, "menu_to", al, ac );
+	xmstrings[0] = XmStringCreateLtoR("To:", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNsubMenuId, menu_to); ac++;
+	widget12 = XmCreateCascadeButton ( widget11, "widget12", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNcolumns, 48); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 13); ac++;
+	text_msg = XmCreateScrolledText ( widget5, "text_msg", al, ac );
+	ac = 0;
+	widget14 = XtParent ( text_msg );
+
+	widget18 = XmCreateForm ( widget4, "widget18", al, ac );
+	XtSetArg(al[ac], XmNvisibleItemCount, 6); ac++;
+	XtSetArg(al[ac], XmNselectionPolicy, XmEXTENDED_SELECT); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmCONSTANT); ac++;
+	list_icons = XmCreateScrolledList ( widget18, "list_icons", al, ac );
+	ac = 0;
+	widget19 = XtParent ( list_icons );
+
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR("Remove", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	remove_button = XmCreatePushButton ( widget18, "remove_button", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR("Attachments (drop any icon here):", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	widget24 = XmCreateLabel ( widget18, "widget24", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+        XtSetValues ( widget2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+        XtSetValues ( widget3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, widget2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+        XtSetValues ( widget4,al, ac );
+	ac = 0;
+	XtAddCallback (widget2, XmNactivateCallback, send_callback,NULL);
+	XtAddCallback (widget3, XmNactivateCallback, cancel_callback,NULL);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNtopWidget, widget9); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( widget6,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( widget9,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNtopWidget, widget6); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( widget14,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+        XtSetValues ( widget7,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftWidget, widget7); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( text_subject,al, ac );
+	ac = 0;
+	children[ac++] = widget7;
+	children[ac++] = text_subject;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftWidget, widget11); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( text_to,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+        XtSetValues ( widget11,al, ac );
+	ac = 0;
+	XtAddCallback (menu_to, XmNentryCallback, entry_callback,NULL);
+	children[ac++] = widget12;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = text_to;
+	children[ac++] = widget11;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild(text_msg);
+	children[ac++] = widget6;
+	children[ac++] = widget9;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNtopWidget, remove_button); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( widget19,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+        XtSetValues ( remove_button,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+        XtSetValues ( widget24,al, ac );
+	ac = 0;
+	XtAddCallback (list_icons, XmNsingleSelectionCallback, browse_callback,NULL);
+	XtAddCallback (list_icons, XmNmultipleSelectionCallback, browse_callback,NULL);
+	XtAddCallback (list_icons, XmNextendedSelectionCallback, browse_callback,NULL);
+	XtAddCallback (list_icons, XmNdefaultActionCallback, browse_callback,NULL);
+	XtAddCallback (list_icons, XmNbrowseSelectionCallback, browse_callback,NULL);
+	XtManageChild(list_icons);
+	XtAddCallback (remove_button, XmNactivateCallback, remove_callback,NULL);
+	children[ac++] = remove_button;
+	children[ac++] = widget24;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = widget5;
+	children[ac++] = widget18;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = widget2;
+	children[ac++] = widget3;
+	children[ac++] = widget4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form);
+}
+
+
diff --git a/src/AppMod/newscback.c b/src/AppMod/newscback.c
new file mode 100644
index 0000000..e8fe473
--- /dev/null
+++ b/src/AppMod/newscback.c
@@ -0,0 +1,608 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Xm/List.h>
+#include <mars.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <xec.h>
+
+svc *s;
+
+typedef struct article {
+	struct article *next;
+	char   *title;
+	char   *note;
+	char   *examples;
+	time_t  date;
+	boolean seen;
+	boolean mail;
+} article;
+
+extern Widget top,article_list,article_text,form,delete_button,save_button;
+
+XtAppContext app_context;
+Display      *display;
+
+article      *news    = NULL;
+article      *current = NULL;
+
+struct  {
+	int  mode;
+	char id[80];
+	char subject[80];
+	char from[80];
+	char date[80];
+	char *msgtmp;
+	char *tartmp;
+} mailbuf = {
+	0,};
+
+void load_seen(void)
+{
+}
+
+FILE *tarfile,*msgfile,*nulfile;
+extern FILE *mailout,*mailin;
+
+void scan_mail(int mode)
+{
+	char *mail = getenv("MAIL");
+
+	mailbuf.mode = mode;
+	mailout = nulfile = fopen("/dev/null","w");
+
+	if(!nulfile)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Canot open /dev/null");
+		return;
+	}
+
+	mailin  = fopen(mail,"r");
+	if(!mailin)
+	{
+		fclose(nulfile);
+		marslog(LOG_EROR|LOG_PERR,"Canot open mailbox %s",mail);
+		return;
+	}
+
+	maillex();
+
+	fclose(mailin);
+	fclose(nulfile);
+}
+
+void load_mail(article *a)
+{
+	strcpy(mailbuf.id,a->examples);
+	scan_mail(1);
+	a->note     = strcache(mailbuf.msgtmp);
+	a->examples = strcache(mailbuf.tartmp);
+}
+
+boolean was_seen(article *a)
+{
+	return false;
+}
+
+void mark_seen(article *a)
+{
+}
+
+void created(const char *name,const char *kind)
+{
+	request *u = empty_request("STATUS");
+	set_value(u,"NAME",   *name == '/' ? "%s" : "/%s", name);
+	set_value(u,"CLASS",  "%s", kind);
+	set_value(u,"STATUS", "CREATED");
+	send_message(s,u);
+	free_all_requests(u);
+}
+
+void copyicon(char *a,char *b)
+{
+	FILE *g = fopen(b,"w");
+	request *r = read_request_file(a);
+	if(r == NULL)
+	{
+		r=empty_request("NOTE");
+		set_value(r,"ICON_CLASS","NOTE");
+	}
+	set_value(r,"X","0");
+	set_value(r,"Y","0");
+	if(g) {
+		save_all_requests(g,r);
+		fclose(g);
+	}
+	free_all_requests(r);
+}
+
+void browse_callback (Widget w, XtPointer cd, XmListCallbackStruct *cb )
+{
+	char *p = xec_GetString(cb->item);
+	article *a = news;
+
+	while(a)
+	{
+		if(strcmp(p,a->title) == 0)
+		{
+			if(a->mail && !a->note) load_mail(a);
+			current = a;
+			xec_LoadText(article_text,a->note,0);
+			/* XtSetSensitive(delete_button,True); */
+			XtSetSensitive(save_button,a->examples != NULL);
+		}
+		a = a->next;
+	}
+
+	XtFree(p);
+
+}
+
+boolean isdir(char *p)
+{
+	struct stat s;
+	if(stat(p,&s)<0) return false;
+	return (S_ISDIR(s.st_mode) != 0);
+}
+
+void delete_callback (Widget w, XtPointer cd, XmAnyCallbackStruct *cb )
+{
+	if(current)
+	{
+		xec_RemoveListItem(article_list,current->title);
+		XtSetSensitive(save_button,False);
+		XtSetSensitive(delete_button,False);
+		XmTextSetString(article_text,NULL);
+		mark_seen(current);
+	}
+	current = NULL;
+}
+
+void copy(char *p,char *dir)
+{
+	const char *d = dirname(p);
+	const char *b = mbasename(p);
+
+	if(isdir(p))
+		copyfile(p,dir);
+	else
+	{
+		char f1[1024];
+		char f2[1024];
+
+		sprintf(f1,"%s/%s",d,b);
+		sprintf(f2,"%s/%s",dir,b);
+		copydata(f1,f2);
+		sprintf(f1,"%s/.%s",d,b);
+		sprintf(f2,"%s/.%s",dir,b);
+		copyicon(f1,f2);
+	}
+}
+
+void copy_mail(article *a,char *dir)
+{
+	char buf[1024];
+	if(chdir(dir))
+		marslog(LOG_EROR|LOG_PERR,"Cannot chdir(%s)",dir);
+	sprintf(buf,"$METVIEW_BIN/metview-mail -x '%s'", a->examples);
+	system(buf);
+}
+
+void save_callback (Widget w, XtPointer cd, XmAnyCallbackStruct *cb )
+{
+	char *u = getenv("METVIEW_USER_DIRECTORY");
+
+	if(current)
+	{
+		int n = 0;
+		char dir[1024];
+
+		xec_SetWatchCursor(top);
+
+		sprintf(dir,"%s/%s %s", u,
+		    current->mail?"Mail":"Examples",
+		    current->title);
+		while(access(dir,0) == 0)
+			sprintf(dir,"%s/%s %s (%d)", u,
+			    current->mail?"Mail":"Examples",
+			    current->title,++n);
+
+		if(mkdir(dir,0777) == 0)
+		{
+			if(current->mail)
+			{
+				char buf[1024];
+				FILE *f;
+
+				sprintf(buf,"%s/%s",dir,current->title);
+				copydata(current->note,buf);
+
+
+                /* create a 'dot' file to tell Metview this is a NOTE icon */
+
+				sprintf(buf,"%s/.%s",dir,current->title);
+
+				f = fopen(buf,"w");
+				if(f)
+				{
+					fprintf(f,"USER_INTERFACE,ICON_CLASS=NOTE\n");
+					fclose(f);
+				}
+				printf("%s\n",buf);
+
+
+
+
+				copy_mail(current,dir);
+			}
+			else
+			{
+				copy(current->note,dir);
+				copy(current->examples,dir);
+			}
+			created(mbasename(dir),"FOLDER");
+		}
+		else marslog(LOG_EROR|LOG_PERR,"mkdir(%s)",dir);
+
+		xec_ResetCursor(top);
+
+	}
+}
+
+void close_callback (Widget w, XtPointer cd, XmAnyCallbackStruct *cb )
+{
+	marsexit(0);
+}
+
+
+
+void mail_message_id(char *id)
+{
+	switch(mailbuf.mode)
+	{
+	case 0:
+		strcpy(mailbuf.id,id);
+		break;
+
+	case 1:
+		if(strcmp(mailbuf.id,id) == 0)
+		{
+			mailbuf.mode = 2;
+			if(mailout != nulfile)
+				fclose(mailout);
+			strfree(mailbuf.msgtmp);
+			mailbuf.msgtmp = strcache(marstmp());
+			mailout = fopen(mailbuf.msgtmp,"w");
+			if(!mailout)
+			{
+				marslog(LOG_EROR|LOG_PERR,"Cannot open %s",mailbuf.msgtmp);
+				mailout = nulfile;
+			}
+		}
+		break;
+
+	case 2:
+		mailbuf.mode = 1;
+		break;
+	}
+}
+
+void mail_date(char *date)
+{
+	if(mailbuf.mode == 0)
+    {
+        strcpy(mailbuf.date,date);
+        
+        if (strlen(mailbuf.date) > 11) /* crop the date to avoid the time-of-day */
+        {
+            mailbuf.date[11] = '\0';
+        }
+    }
+}
+
+void mail_subject(char *sub)
+{
+	if(mailbuf.mode == 0) 
+    {
+        strcpy(mailbuf.subject,sub);
+
+        if (strlen(mailbuf.subject) > 16) /* crop the subject line */
+        {
+            mailbuf.subject[16] = '\0';
+        }
+    }
+}
+
+void mail_from(char *from)
+{
+	if(mailbuf.mode == 0)
+    {
+        char tmp[256] = "";
+        char *pchsrc, *pchdest;
+        int  copying = 0;
+        int  i = 0;
+
+        strcpy(mailbuf.from,from);
+
+
+        /* try to find the 'real' name, e.g. cgk at ecmwf.int (Fernando Ii)
+           has the 'real' name in brackets */
+
+        pchsrc = mailbuf.from;
+        pchdest = tmp;
+
+        while (pchsrc != NULL && *pchsrc != '\0')
+        {
+            if (copying)
+                pchdest[i++] = *pchsrc;
+
+            if (*pchsrc == '(' || *pchsrc == '<')
+                copying = 1;
+            else if (*pchsrc == ')' || *pchsrc == '>')
+                copying = 0;
+            
+            pchsrc++;
+        }
+        
+        if (i > 0) i--;   /* remove closing bracket */
+        pchdest[i] = '\0';
+        
+        if (i > 0)
+            strcpy (mailbuf.from, tmp);
+    }
+}
+
+void mail_start_icon()
+{
+	char *p;
+	char buf[1024];
+	article *a;
+	article *b = news;
+	article *c = NULL;
+
+	switch(mailbuf.mode)
+	{
+	case 0:
+		sprintf(buf,"%s (%s, %s)",mailbuf.subject,mailbuf.from,mailbuf.date);
+/*		sprintf(buf,"%s (%s)",mailbuf.subject,mailbuf.from);*/
+		p = buf;
+		while(*p)
+		{
+			if(*p == '/' || *p == '@' || *p == '?' || *p == '*' || *p == '<' || *p == '>' || *p == '#')
+			   *p = '-';
+			p++;
+		}
+
+		a = NEW_CLEAR(article);
+		a->date     = time(0);
+		a->title    = strcache(buf);
+		a->note     = NULL;
+		a->examples = strcache(mailbuf.id);
+		a->seen = 0;
+		a->mail = true;
+
+		while(b)
+		{
+			if(b->date > a->date) c = b;
+			b = b->next;
+		}
+
+		if(c) {
+			a->next = c->next;
+			c->next = a;
+		}
+		else
+		{
+			a->next = news;
+			news = a;
+		}
+		break;
+
+	case 1:
+		break;
+
+	case 2:
+		if(mailout != nulfile)
+			fclose(mailout);
+		strfree(mailbuf.tartmp);
+		mailbuf.tartmp = strcache(marstmp());
+		mailout = fopen(mailbuf.tartmp,"w");
+		if(!mailout)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot open %s",mailbuf.tartmp);
+			mailout = nulfile;
+		}
+		break;
+	}
+}
+
+void mail_end_icon()
+{
+	if(mailbuf.mode == 2)
+	{
+		if(mailout != nulfile)
+			fclose(mailout);
+		mailout = nulfile;
+	}
+}
+
+void mail_message(char *text)
+{
+	printf("%s",text);
+}
+
+int mailwrap() {
+	return 1;
+}
+
+
+void build_list(void)
+{
+	request *r;
+	struct dirent *e;
+	DIR *d;
+	article *a;
+	char *dir = getenv("METVIEW_NEWS");
+
+	scan_mail(0);
+	load_seen();
+
+
+	d = opendir(dir);
+	if(!d) {
+		marslog(LOG_EROR|LOG_PERR,"opendir %s",dir);
+		return;
+	}
+
+	while(e = readdir(d))
+	{
+		if(*e->d_name != '.')
+		{
+			char buf[1024];
+			const char *n,*m;
+			sprintf(buf,"%s/.%s",dir,e->d_name);
+			if(access(buf,0) == 0)
+			{
+				request *s = read_request_file(buf);
+				n = get_value(s,"ICON_CLASS",0);
+				if(n && (strcmp(n,"ARTICLE") == 0))
+				{
+					struct stat st = {
+						0																																								};
+
+					sprintf(buf,"%s/%s",dir,e->d_name);
+					r = read_request_file(buf);
+
+					stat(buf,&st); /* Get date */
+
+					n = get_value(r,"NOTE",0);
+					m = get_value(r,"EXAMPLES",0);
+
+					if(n)
+					{
+						article *b = news;
+						article *c = NULL;
+
+						a = NEW_CLEAR(article);
+						a->date  = st.st_mtime;
+						a->title = strcache(e->d_name);
+						a->note  = strcache(makepath(dirname(buf),n));
+						if(m) a->examples = strcache(makepath(dirname(buf),m));
+						a->seen = was_seen(a);
+
+						while(b)
+						{
+							if(b->date > a->date) c = b;
+							b = b->next;
+						}
+
+						if(c) {
+							a->next = c->next;
+							c->next = a;
+						}
+						else
+						{
+							a->next = news;
+							news = a;
+						}
+					}
+
+
+					free_all_requests(r);
+				}
+				free_all_requests(s);
+			}
+		}
+	}
+
+	closedir(d);
+
+	a = news;
+	while(a)
+	{
+		if(!a->seen) xec_AddListItem(article_list,a->title);
+		a = a->next;
+	}
+}
+
+void clean_up()
+{
+	article *a = news;
+	while(a)
+	{
+		article *b = a->next;
+		if(a->mail && a->note)
+		{
+			if(a->note) unlink(a->note);
+			if(a->examples) unlink(a->examples);
+		}
+		strfree(a->title);
+		strfree(a->note);
+		strfree(a->examples);
+		FREE(a);
+		a = b;
+	}
+	news = NULL;
+}
+
+void refresh_callback(Widget w,XtPointer cd,XtPointer cb)
+{
+	clean_up();
+	xec_ClearList(article_list);
+	XtSetSensitive(save_button,False);
+	XmTextSetString(article_text,"");
+	build_list();
+}
+
+void serve(svcid *id,request *r,void *v)
+{
+	if(XtIsRealized(top))
+		/* XRaiseWindow(XtDisplay(top),XtWindow(top)); */
+		XMapRaised(XtDisplay(top),XtWindow(top));
+	send_reply(id,NULL);
+}
+
+static void panic(int code,void *data)
+{
+	clean_up();
+}
+
+int main (int argc, char **argv)
+{
+	marsinit(&argc,argv,0,0,0);
+	install_exit_proc(panic,NULL);
+
+	XtToolkitInitialize ();
+	app_context = XtCreateApplicationContext ();
+	display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+	    NULL, 0, &argc, argv);
+	if (!display)
+	{
+		printf("%s: can't open display, exiting...\n", argv[0]);
+		exit (-1);
+	}
+	/* Register converters, just in case you are really unlucky !! */
+	XmRegisterConverters();
+	/* String to unit type doesn't get added !! */
+	XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
+	create_top ( display, argv[0], argc, argv );
+	build_list();
+	XtRealizeWidget (top);
+
+	s = RegisterService(app_context,progname());
+	add_service_callback(s,NULL, serve, NULL);
+
+
+	XtAppMainLoop (app_context);
+	exit (0);
+}
diff --git a/src/AppMod/newsmain.c b/src/AppMod/newsmain.c
new file mode 100644
index 0000000..574f04b
--- /dev/null
+++ b/src/AppMod/newsmain.c
@@ -0,0 +1,191 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer 
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/List.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+extern void XDmanage_link ( );
+extern void XDunmanage_link ( );
+extern void XDpopup_link ( );
+extern void XDpopdown_link ( );
+extern void XDmap_link ( );
+extern void XDunmap_link ( );
+extern void XDenable_link ( );
+extern void XDdisable_link ( );
+
+extern void browse_callback ();
+extern void delete_callback ();
+extern void save_callback ();
+extern void refresh_callback ();
+extern void close_callback ();
+
+Widget top = (Widget)NULL;
+Widget form = (Widget)NULL;
+Widget article_list = (Widget)NULL;
+Widget article_text = (Widget)NULL;
+Widget delete_button = (Widget)NULL;
+Widget save_button = (Widget)NULL;
+Widget close_button = (Widget)NULL;
+
+
+void create_top (display, app_name, app_argc, app_argv)
+Display *display;
+char *app_name;
+int app_argc;
+char **app_argv;
+{
+	Widget children[4];      /* Children to manage */
+	Arg al[64];           /* Arg List */
+	register int ac = 0;      /* Arg Count */
+	char from_s [256];    /* For font list conversion */
+	XrmValue from_value, to_value; /* ditto */
+	int fg, bg;           /* colour values for pixmaps */ 
+	XmString *list_items; /* For list items */
+	int list_item;        /* Index for list_items */
+	XmString xmstrings[15];    /* temporary storage for XmStrings */
+	Widget widget2 = (Widget)NULL;
+	Widget widget6 = (Widget)NULL;
+	Widget widget10 = (Widget)NULL;
+	Widget widget13 = (Widget)NULL;
+	Widget widget15 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Metview Icon Inbox"); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	top = XtAppCreateShell ( app_name, "Metview", applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form = XmCreateForm ( top, "form", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNvisibleItemCount, 5); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	article_list = XmCreateScrolledList ( form, "article_list", al, ac );
+	ac = 0;
+	widget2 = XtParent ( article_list );
+
+	XtSetArg(al[ac], XmNcolumns, 60); ac++;
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 24); ac++;
+	XtSetArg(al[ac], XmNwordWrap, TRUE); ac++;
+	XtSetArg(al[ac], XmNscrollHorizontal, FALSE); ac++;
+	article_text = XmCreateScrolledText ( form, "article_text", al, ac );
+	ac = 0;
+	widget6 = XtParent ( article_text );
+
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	widget10 = XmCreateRowColumn ( form, "widget10", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR("Delete article", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	delete_button = XmCreatePushButton ( widget10, "delete_button", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR("Install examples", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	save_button = XmCreatePushButton ( widget10, "save_button", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	widget13 = XmCreateRowColumn ( form, "widget13", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringCreateLtoR("Refresh", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	widget15 = XmCreatePushButton ( widget13, "widget15", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR("Close", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	close_button = XmCreatePushButton ( widget13, "close_button", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+        XtSetValues ( widget2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNtopWidget, widget2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, widget10); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+        XtSetValues ( widget6,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+        XtSetValues ( widget10,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+        XtSetValues ( widget13,al, ac );
+	ac = 0;
+	XtAddCallback (article_list, XmNbrowseSelectionCallback, browse_callback,NULL);
+	XtManageChild(article_list);
+	XtManageChild(article_text);
+	XtAddCallback (delete_button, XmNactivateCallback, delete_callback,NULL);
+	XtAddCallback (save_button, XmNactivateCallback, save_callback,NULL);
+	children[ac++] = delete_button;
+	children[ac++] = save_button;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (widget15, XmNactivateCallback, refresh_callback,NULL);
+	XtAddCallback (close_button, XmNactivateCallback, close_callback,NULL);
+	children[ac++] = widget15;
+	children[ac++] = close_button;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = widget10;
+	children[ac++] = widget13;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form);
+}
+
+
diff --git a/src/AppMod/savepool.cc b/src/AppMod/savepool.cc
new file mode 100644
index 0000000..a02174a
--- /dev/null
+++ b/src/AppMod/savepool.cc
@@ -0,0 +1,430 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- hack of savemain.c + savecback.cc, 010312/vk
+//-- (undebuggable crash inside X11 on Linux)
+
+#include <iostream>
+
+#include <Xm/Xm.h>
+#include <Xm/FileSB.h>
+#include <Xm/Form.h>
+#include <Xm/SelectioB.h>
+#include <Xm/ToggleB.h>
+
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h> 
+
+#include <unistd.h> 
+
+#include "mars.h"
+#include "xec.h"
+
+static int    gac;
+static char** gav;
+static svc*   gs = NULL;
+
+static XtAppContext  app_context;
+static svcid        *s_id = NULL;
+static const char   *path = NULL;
+static const char   *nam  = NULL;
+static char         *cptr = NULL;
+static Boolean       boo  = false;
+
+static Widget topw = (Widget)NULL;
+static Widget frmw = (Widget)NULL;
+static Widget fsb  = (Widget)NULL;
+
+static Widget create_toggle = (Widget)NULL;
+
+
+
+void create_top( char*, int, char** );
+void cleanup( char* file );
+static char *lower(char *s);
+
+extern "C" 
+{
+  void fsb_ok_callback       ( Widget, XtPointer, XtPointer );
+  void fsb_cancel_callback   ( Widget, XtPointer, XtPointer );
+  void create_toggle_callback( Widget, XtPointer, XtPointer );
+
+  void save( svcid* id, request* r, void* );
+}
+
+
+//_____________________________________________________________________
+
+void cleanup( char* file )
+{
+  char pth[1024];
+  char buf[1024];
+
+  if( s_id )
+    {
+      if( file )
+	{
+	  err err_code = 0;
+	  if( cptr && strcmp( cptr, "GRIB" ) == 0 )
+	    {
+	      request *r = empty_request("WRITE");
+	      set_value(r,"TARGET",  "%s",file);
+	      set_value( r, "FIELDSET", "%s", nam );
+	      err_code = handle_write(r,NULL);
+	      free_all_requests(r);
+	    }
+	  else
+	    {
+	      err_code = copyfile( path, file );
+	    }
+
+	  if( err_code == 0 )
+	    {
+				// If icon in metview directory
+	      
+	      strcpy(pth,dirname(makepath(dirname(file),"dummy")));
+	      strcpy(buf,dirname(makepath(getenv("METVIEW_USER_DIRECTORY"),
+					  "dummy")));
+
+				// patch for /tmp_mnt
+
+	      char *q = pth; if(strncmp(q,"/tmp_mnt",8)==0) q += 8;
+	      char *t = buf; if(strncmp(t,"/tmp_mnt",8)==0) t += 8;
+
+	      printf("%s\n%s\n",q,t);
+
+	      if( cptr && ( strcmp(q,t) == 0 ) )
+		{
+		  request *u = empty_request("STATUS");
+
+		  q = file;
+		  if( strncmp( q, "/tmp_mnt", 8) == 0 )
+		  {
+		    q += 8;
+		  }
+		  q += strlen(t);
+
+		  set_value( u, "NAME",      "%s", q);
+		  set_value( u, "CLASS",     "%s", cptr);
+		  set_value( u, "TYPE",      "%s", cptr);
+		  set_value( u, "ICON_CLASS","%s", cptr);
+		  set_value( u, "STATUS",    "CREATED");
+		  send_message( gs, u );
+		  free_all_requests(u);
+		}
+
+	      if( boo )
+		{
+		  int cnt = 2;
+		  request *r = empty_request("READ");
+		  set_value(r,"SOURCE","%s",file);
+
+
+		  sprintf( buf, "%s (saved)", nam );
+		  sprintf(pth,"%s/%s",getenv("METVIEW_USER_DIRECTORY"),buf);
+
+		  while(access(pth,0) == 0)
+		    {
+		      sprintf( buf, "%s (saved %d)", nam, cnt++ );
+		      sprintf(pth,"%s/%s",
+			      getenv("METVIEW_USER_DIRECTORY"),buf);
+		    }
+
+		  FILE *f = fopen(pth,"w");
+		  if(f)
+		    {
+		      save_all_requests(f,r);
+		      fclose(f);
+
+		      request *u = empty_request("STATUS");
+		      set_value(u,"NAME", "%s", buf);
+		      set_value(u,"CLASS","READ");
+		      set_value(u,"TYPE","READ");
+		      set_value(u,"ICON_CLASS","READ");
+		      set_value(u,"STATUS","CREATED");
+		      send_message( gs, u );
+		      free_all_requests(u);
+		    }
+		  else  //-- !f
+		    {
+		      set_svc_msg( s_id, "Cannot add icon" );
+		    }
+
+		  free_all_requests(r);
+		  
+		}      //-- boo
+		
+	    }          //-- err_code == 0
+
+	  set_svc_msg( s_id, "Data from %s saved in %s", nam, file);
+	}
+      else             //-- !file
+	{
+	  set_svc_msg( s_id, "Data from %s not saved", nam );
+	}
+
+      send_reply( s_id, NULL );
+
+      s_id  = NULL;
+      path = NULL;
+      nam = NULL;
+    }
+}
+
+//_____________________________________________________________________
+
+void fsb_ok_callback( Widget
+                    , XtPointer
+		    , XtPointer cb )  // XmFileSelectionBoxCallbackStruct* cb )
+{
+  //struct stat s;
+
+  char* f   = xec_GetString( ((XmFileSelectionBoxCallbackStruct*)cb)->value );
+  char* dir = xec_GetString( ((XmFileSelectionBoxCallbackStruct*)cb)->dir );
+
+  char filename[1024];
+  strcpy( filename, makepath( dir, f ) );
+
+  XtFree( f );
+  XtFree( dir );
+
+  // if ( (stat(filename,&s) == 0) && S_ISDIR(s.st_mode))
+  //   strcat(filename,name);
+
+  cleanup(filename);
+  XtPopdown(topw);
+  XtUnmanageChild(frmw);
+  exit(0);
+}
+
+//_____________________________________________________________________
+
+void fsb_cancel_callback( Widget 
+                        , XtPointer
+			, XtPointer )  // XmFileSelectionBoxCallbackStruct* )
+{
+  cleanup(NULL);
+  XtPopdown(topw);
+  XtUnmanageChild(frmw);
+  exit(0);
+}
+
+//_____________________________________________________________________
+
+void create_toggle_callback( Widget 
+                           , XtPointer
+                           , XtPointer cb )
+{
+  boo = ((XmToggleButtonCallbackStruct*)cb)->set;
+}
+
+
+//_____________________________________________________________________
+
+static char *lower(char *s)
+{
+  static char buf[2];
+  int i = 0;
+
+  while(*s)
+    {
+      if (isupper(*s))
+	buf[i++] = tolower(*s);
+      else
+	buf[i++] = *s;
+      s++;
+    }
+  buf[i]= 0;
+
+  return buf;
+}
+
+//_____________________________________________________________________
+
+void save( svcid*   id
+         , request* r
+         , void* )
+{
+
+  if( fork_service(id) > 0 )
+    return;
+ 
+  s_id = id;
+
+  const char *verb=request_verb(r);
+  if( ! verb )
+    {
+      set_svc_err(id, 1);
+      set_svc_msg(id, "This data cannot be saved");
+      return;
+    }
+
+  printf("verb=%s\n",verb);	
+
+  char *pathStr;
+
+  if(strcmp(verb,"ODB_GEO_POINTS") == 0 || strcmp(verb,"ODB_GEO_VECTORS") == 0 ||
+     strcmp(verb,"ODB_XY_POINTS") == 0  || strcmp(verb,"ODB_XY_VECTORS") == 0 ||  
+     strcmp(verb,"ODB_XY_BINNING") == 0 )
+  {	
+	pathStr = (char *)get_value( r, "ODB_FILENAME",  0 );	
+   } 	
+  else
+  {
+  	pathStr = (char*) get_value( r, "PATH",  0 );
+  	/*nam  = get_value( r, "_NAME", 0 );
+  	cptr = r->name;*/
+  }
+
+  nam  = get_value( r, "_NAME", 0 );
+  cptr = r->name;
+
+  path=pathStr;	
+	
+  if( ! pathStr )
+    {
+      printf("no path\n");
+      set_svc_err(id, 1);
+      set_svc_msg(id, "This data cannot be saved");
+      return;
+    }
+
+  if( strcmp( cptr, "GRIB" ) == 0 )
+    {
+      new_variable( nam, request_to_fieldset(r), 0 );
+    } 
+   if( strcmp( cptr, "PRASTER" ) == 0 )
+    {
+        cptr = (char*) get_value( r, "IMPORT_FILE_TYPE",  0 );
+        boo = false;
+    }
+
+  Arg al[64];               /* Arg List */
+  int ac = 0;               /* Arg Count */
+  XmString xmstrings[15];   /* temporary storage for XmStrings */
+  Widget   children[13];    /* Children to manage */
+
+  topw = XtVaAppInitialize( &app_context, "Metview", NULL, 0, &gac, gav, NULL, NULL );
+
+  ac = 0;
+  XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+  frmw = XmCreateForm ( topw, "form", al, ac );
+
+  fsb  = XmCreateFileSelectionDialog( frmw, "Save", NULL, 0 );
+ 
+  /* Find out initial directory	*/ 
+
+  char *mvDir=getenv("METVIEW_USER_DIRECTORY");
+  if(mvDir)	
+  { 	
+	/*printf("mvDir %s \n",mvDir);*/
+
+	const char* buf=dirname(nam);
+	if(buf)
+	{
+		/*printf("buf %s \n",buf);*/
+
+		char namDir[600];
+		sprintf(namDir,"%s/%s",mvDir,buf);	
+  		/*printf("namDir %s \n",namDir);*/
+
+		struct stat namDirStat;
+  		if(stat(namDir,&namDirStat) >=0 && namDirStat.st_mode & S_IFDIR)
+		{	
+	 		XmString s = XmStringCreateSimple(namDir );
+			XtVaSetValues( fsb, XmNdirectory, s, NULL );
+			XmStringFree( s );
+		}
+	}
+
+  }
+
+  ac = 0;
+  xmstrings[0] = XmStringCreateLtoR("Create a Metview icon", (XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+  XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+  XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+
+  create_toggle = XmCreateToggleButton ( frmw, "create_toggle", al, ac );
+  XmStringFree ( xmstrings [ 0 ] );
+
+  ac = 0;
+  XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+  XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+  XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+  XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+  XtSetArg(al[ac], XmNbottomWidget, create_toggle); ac++;
+  XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+  XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+  XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+  XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+  XtSetValues ( fsb, al, ac );
+
+  ac = 0;
+  XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+  XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+  XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+  XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+  XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+  XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+  XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+  XtSetValues ( create_toggle,al, ac );
+
+  XtAddCallback( fsb, XmNcancelCallback, fsb_cancel_callback, (XtPointer)0 );
+  XtAddCallback( fsb, XmNokCallback,     fsb_ok_callback,     (XtPointer)0 );
+  XtAddCallback( create_toggle, XmNvalueChangedCallback, create_toggle_callback, (XtPointer)0 );
+
+  ac = 0;
+  children[ac++] = fsb;
+  children[ac++] = create_toggle;
+  XtManageChildren(children, ac);
+
+  XtManageChild ( frmw );
+
+  char name[512];
+	char* pname = name;
+  //	sprintf( pname, "Save data from %s", nam );
+  //	XtVaSetValues(topw,XmNtitle,pname,NULL);
+
+
+	sprintf( pname, "%s", mbasename( nam ) );
+	char* pp = pname;
+	while( *pp ) { if(!isalnum(*pp)) *pp = '_'; pp++; };
+	strcat( pname, "." );
+	strcat( pname, lower( cptr ) );
+
+	printf("pname: %s\n",pname);
+
+	XmString s = XmStringCreateSimple( pname );
+	XtVaSetValues( fsb, XmNdirSpec, s, NULL );
+	XmStringFree( s );
+
+	//	if(!XtIsRealized(topw))
+	//		XtRealizeWidget(topw);
+
+	//	XtPopup( topw, XtGrabNone );
+
+  XtAppMainLoop( app_context );
+}
+
+//_____________________________________________________________________
+
+int main( int argc, char** argv )
+{
+  marsinit( &argc, argv, 0, 0, 0 );
+
+  gac = argc;
+  gav = argv;
+
+  gs  = create_service( progname() );
+  add_service_callback( gs, NULL, save,  NULL );
+
+  service_run( gs );
+}
+
diff --git a/src/BufrExaminer/BufrExaminer.cc b/src/BufrExaminer/BufrExaminer.cc
new file mode 100644
index 0000000..876e9ed
--- /dev/null
+++ b/src/BufrExaminer/BufrExaminer.cc
@@ -0,0 +1,612 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QCloseEvent>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QLabel>
+#include <QSpinBox>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QString>
+#include <QStringList>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "BufrExaminer.h"
+
+#include "BufrMetaData.h"
+#include "MvKeyProfile.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQAbout.h"
+#include "MvQBufrDumpModel.h"
+
+#include "MvQKeyManager.h"
+#include "MvQKeyProfileModel.h"
+#include "MvQKeyProfileTree.h" 
+#include "MvQTreeViewSearchLine.h"
+#include "MvQTreeView.h"
+
+BufrExaminer::BufrExaminer(QWidget *parent) : MvQAbstractMessageExaminer("BufrExaminer",parent)
+{
+	setAttribute(Qt::WA_DeleteOnClose);
+	
+	setWindowTitle("Metview - Bufr Examiner");
+
+	//Initial size
+	setInitialSize(1100,800);
+		
+	//Init
+	messageType_="BUFR";
+
+	ignoreMessageSpinChangeSignal_=false;
+	ignoreSubsetSpinChangeSignal_=false;
+	messageCanBeDecoded_=false;
+
+	sectionDumpModel_=0;
+	dataDumpModel_=0;
+	bitmapDumpModel_=0;
+
+	//Set up goto panel
+	setupGotoPanel();
+		
+	//Set up bufr dump boxes
+	setupDumpBox();
+	
+	//Build ui
+	
+	QWidget *w;
+
+	//----------------------
+	// Main splitter
+	//----------------------
+
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+
+        mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+	
+	//-----------------------------------------------------
+	// The main layout (the upper part of mainSplitter)
+	//-----------------------------------------------------
+  
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(0);
+	w=new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	//------------------
+	// File info label
+	//------------------
+      
+ 	//Add to layout 
+	mainLayout->addWidget(fileInfoLabel_);
+	mainLayout->addWidget(gotoPanel_);
+	
+	//---------------------
+	// Central splitter
+	//---------------------
+
+	centralSplitter_ = new QSplitter(this); 
+	centralSplitter_->setOpaqueResize(false);	
+	mainLayout->addWidget(centralSplitter_,1);
+
+	//-------------------------
+	// Populate central splitter
+	//-------------------------
+	
+	centralSplitter_->addWidget(messagePanel_);
+	centralSplitter_->addWidget(dumpPanel_);
+			
+	//--------------------------
+	// Find widget
+	//--------------------------
+	
+	mainLayout->addWidget(findPanel_);
+
+	//--------------------------
+	// Log Area
+	//--------------------------
+
+	mainSplitter_->addWidget(logPanel_);
+	mainSplitter_->setCollapsible(1,false);
+	
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+	
+	//Status bar	
+ 	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+
+	connect(this,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+
+	//-------------------------
+	// Settings
+	//-------------------------
+
+	readSettings();
+	
+}
+ 
+BufrExaminer::~BufrExaminer()
+{	
+	writeSettings();
+	
+	if(sectionDumpModel_) delete sectionDumpModel_;
+	if(dataDumpModel_) delete dataDumpModel_;
+	if(bitmapDumpModel_) delete bitmapDumpModel_;
+}
+
+void BufrExaminer::closeEvent (QCloseEvent * event)
+{
+	close();
+	event->accept();
+}
+
+void BufrExaminer::setupGotoPanel()
+{
+	QHBoxLayout *msgSpinLayout=new  QHBoxLayout;
+
+	//Combo box for key profile selection
+	QLabel *spinLabel = new QLabel(tr("Go to &message:"));
+	messageSpin_ = new QSpinBox;
+	spinLabel->setBuddy(messageSpin_);
+
+	msgSpinLayout->addWidget(spinLabel);
+	msgSpinLayout->addWidget(messageSpin_);
+	msgSpinLayout->addSpacing(5);
+	
+	spinLabel = new QLabel(tr("Go to &subset:"));
+	subsetSpin_ = new QSpinBox;
+	spinLabel->setBuddy(subsetSpin_);
+
+	msgSpinLayout->addWidget(spinLabel);
+	msgSpinLayout->addWidget(subsetSpin_);
+	
+	subsetLabel_=new QLabel("");
+	msgSpinLayout->addWidget(subsetLabel_);
+	msgSpinLayout->addStretch(1);
+	
+	gotoPanel_=new QWidget;
+	gotoPanel_->setLayout(msgSpinLayout);
+}
+
+void BufrExaminer::setupDumpBox()
+{
+	QWidget* w;
+	QVBoxLayout *vb;
+  
+  	dumpPanel_=new QWidget;
+	QVBoxLayout *dumpLayout = new QVBoxLayout;
+	dumpLayout->setContentsMargins(0,0,0,0);
+	dumpPanel_->setLayout(dumpLayout);	
+
+	//Tab
+	dumpTab_ = new QTabWidget;
+	dumpLayout->addWidget(dumpTab_);
+
+ 	//--------------------------------
+	// Section 0-3 dump
+	//--------------------------------
+
+	w=new QWidget;
+	vb=new QVBoxLayout;
+	vb->setContentsMargins(0,0,0,0);
+	w->setLayout(vb);
+	
+	sectionDumpTree_= new MvQTreeView;
+	sectionDumpModel_= new MvQBufrSectionDumpModel;
+	sectionDumpTree_->setModel(sectionDumpModel_);
+	sectionDumpTree_->setObjectName("sectionDumpTree");
+	sectionDumpTree_->setProperty("mvStyle",1);
+	sectionDumpTree_->setAlternatingRowColors(true);
+	sectionDumpTree_->setAllColumnsShowFocus(true);
+	sectionDumpTree_->setDragDropMode(QAbstractItemView::DragOnly);
+	vb->addWidget(sectionDumpTree_);
+
+	sectionDumpSearch_= new MvQTreeViewSearchLine(sectionDumpTree_,1,"");
+	findPanel_->addSearchLineToRight(sectionDumpSearch_,w);
+	
+	dumpTab_->addTab(w,tr("Section 0-3"));
+
+	//--------------------------------
+	// Data dump
+	//--------------------------------
+	
+	w=new QWidget;
+	vb=new QVBoxLayout;
+	vb->setContentsMargins(0,0,0,0);
+	w->setLayout(vb);
+	
+	dataDumpTree_= new MvQTreeView;
+	dataDumpModel_= new MvQBufrDataDumpModel;
+	dataDumpTree_->setModel(dataDumpModel_);
+	dataDumpTree_->setObjectName("dataDumpTree");
+	dataDumpTree_->setProperty("mvStyle",1);
+	dataDumpTree_->setAlternatingRowColors(true);
+	dataDumpTree_->setAllColumnsShowFocus(true);
+	dataDumpTree_->setRootIsDecorated(false);
+	vb->addWidget(dataDumpTree_);
+
+	dataDumpSearch_= new MvQTreeViewSearchLine(dataDumpTree_,1,"");
+	findPanel_->addSearchLineToRight(dataDumpSearch_,w);
+
+	//dataDumpTree_->setDragDropMode(QAbstractItemView::DragOnly);
+
+	dumpTab_->addTab(w,tr("Data"));	
+
+	//--------------------------------
+	// Bitmap dump
+	//--------------------------------
+
+	w=new QWidget;
+	vb=new QVBoxLayout;
+	w->setLayout(vb);
+	
+	bitmapDumpTree_= new MvQTreeView;
+	bitmapDumpModel_= new MvQBufrBitmapDumpModel;
+	bitmapDumpTree_->setModel(bitmapDumpModel_);
+	bitmapDumpTree_->setObjectName("bitmapDumpTree");
+	bitmapDumpTree_->setProperty("mvStyle",1);
+	bitmapDumpTree_->setAlternatingRowColors(true);
+	bitmapDumpTree_->setAllColumnsShowFocus(true);
+	bitmapDumpTree_->setRootIsDecorated(false);
+	vb->addWidget(bitmapDumpTree_);
+	
+	bitmapDumpSearch_ = new MvQTreeViewSearchLine(bitmapDumpTree_,1,"");
+	findPanel_->addSearchLineToRight(bitmapDumpSearch_,w);
+	
+	//dataDumpTree_->setDragDropMode(QAbstractItemView::DragOnly);
+
+	dumpTab_->addTab(w,tr("Data, bitmaps expanded"));
+	
+
+	connect(dumpTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotCurrentDumpChanged(int)));
+	
+}
+void BufrExaminer::initDumps()
+{
+	sectionDumpTree_->setFocus(Qt::OtherFocusReason);
+
+	connect(messageSpin_, SIGNAL(valueChanged(int)),
+                this, SLOT(slotMessageSpinChanged(int)));
+
+	connect(subsetSpin_, SIGNAL(valueChanged(int)),
+                this, SLOT(slotSubsetSpinChanged(int)));
+}
+
+void BufrExaminer::initAllKeys()
+{
+	//Get all keys
+	MvKeyProfile *prof=new MvKeyProfile("Metview keys");
+	prof->addKey(new MvKey("MV_Index","Index","Message index"));
+	allKeys_ << prof;
+
+	vector<MvKeyProfile*> allKeyProf;
+	keyManager_->loadAllKeys(allKeyProf);
+	for(vector<MvKeyProfile*>::iterator it=allKeyProf.begin(); it != allKeyProf.end(); it++)
+	{
+		allKeys_ << *it;
+	}
+
+	sectionDumpModel_->setAllKeys(allKeys_);
+}
+
+void BufrExaminer::loadKeyProfile(MvKeyProfile *prof)
+{	
+	MvQAbstractMessageExaminer::loadKeyProfile(prof);
+
+	ignoreMessageSpinChangeSignal_=true;
+	messageSpin_->setMinimum(1);
+	messageSpin_->setMaximum(data_->messageNum());
+	ignoreMessageSpinChangeSignal_=false;
+}
+
+void BufrExaminer::loadDumps()
+{
+	BufrMetaData *bufr=static_cast<BufrMetaData*>(data_);
+
+
+	bool expandSectionDumpTree=false;
+	QModelIndexList indexLst;
+        QModelIndexList expandLst;
+
+	//If the dumpData is not yet loaded 
+	if(!sectionDumpModel_->dumpData())
+	{
+		expandSectionDumpTree=true;
+	}
+	else
+	{
+		//Save the expand state of the current sectionDumpTree
+		indexLst=sectionDumpModel_->match(sectionDumpModel_->index(0,0),
+			    Qt::DisplayRole,"*",-1,
+		            Qt::MatchWildcard | Qt::MatchRecursive);
+	
+	
+		foreach(QModelIndex index,indexLst)
+		{
+			if(sectionDumpTree_->isExpanded(index))
+				expandLst << index;
+		}	
+	}
+
+	ignoreMessageSpinChangeSignal_=true;
+	messageSpin_->setValue(currentMessageNo_+1);	
+	ignoreMessageSpinChangeSignal_=false;
+
+	ignoreSubsetSpinChangeSignal_=true;
+	int subsetNum=bufr->subsetNum(currentMessageNo_+1);
+	int currentSubset=subsetSpin_->value();
+	subsetSpin_->setMinimum(1);
+	subsetSpin_->setMaximum(subsetNum);
+	if(currentSubset >=  subsetNum)
+	{
+		subsetSpin_->setValue(1);
+	}	
+	ignoreSubsetSpinChangeSignal_=false;
+
+	subsetLabel_->setText(tr("  (Number of subsets: ") + QString::number(subsetNum) + ")");
+
+	messageCanBeDecoded_=false;
+
+	//Generate and read bufr dumps
+	loadSectionDump();
+	loadDataDump();
+	loadBitmapDump();	
+
+	if(expandSectionDumpTree==true)
+	{
+		expandLst=sectionDumpModel_->match(sectionDumpModel_->index(0,0),
+			    Qt::DisplayRole,"*",-1,
+		            Qt::MatchWildcard | Qt::MatchRecursive);
+	}
+	
+	//Try to restore the expand state of the sectionDumpTree
+	foreach(QModelIndex index,expandLst)
+	{
+		if(sectionDumpModel_->hasChildren(index))
+		{
+			sectionDumpTree_->setExpanded(index,true);
+		}
+	}	
+
+	for(int i=0;i < sectionDumpModel_->columnCount()-1; i++)
+	{ 
+		sectionDumpTree_->resizeColumnToContents(i);
+	}
+}
+
+void BufrExaminer::loadSectionDump()
+{	
+	int msgCnt=currentMessageNo_+1;
+
+	BufrSectionDump* currentDump=sectionDumpModel_->dumpData();
+
+	BufrSectionDump* dump = new BufrSectionDump;
+	
+	messageCanBeDecoded_=dump->read(data_->fileName(),msgCnt);
+	
+	sectionDumpModel_->dataIsAboutToChange();
+	sectionDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < sectionDumpModel_->columnCount()-1; i++)
+	{ 
+		sectionDumpTree_->resizeColumnToContents(i);
+	}
+
+	if(currentDump != 0)
+		delete currentDump;
+
+       	//sectionDumpBrowser_->setPlainText(QString(msg->text().c_str()));*/
+}
+
+
+void BufrExaminer::loadDataDump()
+{	
+	int msgCnt=currentMessageNo_+1;
+	int subsetCnt=subsetSpin_->value();
+
+	BufrDataDump* currentDump=dataDumpModel_->dumpData();
+
+	BufrDataDump* dump = new BufrDataDump;
+
+	if(messageCanBeDecoded_)
+	{
+		dump->read(data_->fileName(),msgCnt,subsetCnt);	
+	}
+
+	dataDumpModel_->dataIsAboutToChange();
+	dataDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < dataDumpModel_->columnCount()-1; i++)
+	{ 
+		dataDumpTree_->resizeColumnToContents(i);
+	}
+
+	if(currentDump != 0)
+		delete currentDump;
+
+
+       	//sectionDumpBrowser_->setPlainText(QString(msg->text().c_str()));*/
+}
+
+void BufrExaminer::loadBitmapDump()
+{	
+	int msgCnt=currentMessageNo_+1;
+	int subsetCnt=subsetSpin_->value();
+
+	BufrBitmapDump* currentDump=bitmapDumpModel_->dumpData();
+
+	BufrBitmapDump* dump = new BufrBitmapDump;
+	if(messageCanBeDecoded_)
+	{
+		dump->read(data_->fileName(),msgCnt,subsetCnt);	
+	}
+
+	bitmapDumpModel_->dataIsAboutToChange();
+	bitmapDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < bitmapDumpModel_->columnCount()-1; i++)
+	{ 
+		bitmapDumpTree_->resizeColumnToContents(i);
+	}
+
+	if(currentDump != 0)
+		delete currentDump;
+
+	bitmapDumpSearch_->slotUpdateColumns();
+
+	//sectionDumpBrowser_->setPlainText(QString(msg->text().c_str()));*/
+}
+
+void BufrExaminer::slotMessageSpinChanged(int value)
+{
+	if(ignoreMessageSpinChangeSignal_)
+		return;
+
+	//Override cursor
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	slotSelectMessage(value-1);
+	
+	QApplication::restoreOverrideCursor();
+
+}
+
+void BufrExaminer::slotSubsetSpinChanged(int /*value*/)
+{
+	if(ignoreSubsetSpinChangeSignal_)
+		return;
+
+	//Override cursor
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	//Generate and read bufr dumps
+	loadDataDump();
+	loadBitmapDump();
+
+	QApplication::restoreOverrideCursor();
+
+}
+
+void BufrExaminer::slotCurrentDumpChanged(int index)
+{
+	findPanel_->setCurrentSearchLineById(dumpTab_->widget(index));
+} 
+  
+void BufrExaminer::slotShowAboutBox()
+{
+	MvQAbout about("BufrExaminer","", MvQAbout::MetviewVersion );
+	about.exec();
+}
+
+void BufrExaminer::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+}
+
+void BufrExaminer::updateFileInfoLabel()
+{
+	fileInfoLabel_->setBufrTextLabel(QString(data_->fileName().c_str()),data_->totalMessageNum());
+}
+
+void BufrExaminer::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-BufrExaminer");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.endGroup();
+  
+  	settings.beginGroup("BufrExaminer");
+	settings.setValue("actionFileInfoStatus",actionFileInfo_->isChecked());
+	settings.setValue("keyProfileName",keyCombo_->currentText());
+	settings.setValue("dumpTabIndex",dumpTab_->currentIndex());
+	settings.setValue("actionLogStatus",actionLog_->isChecked());
+	settings.endGroup();
+}
+
+void BufrExaminer::readSettings()
+{
+	QVariant value;
+
+	QSettings settings("ECMWF","MV4-BufrExaminer");
+	
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+	settings.endGroup();
+
+  	settings.beginGroup("BufrExaminer");
+
+	QString txt; 
+	int ival;
+
+	if(settings.value("actionFileInfoStatus").isNull())
+	{
+		actionFileInfo_->setChecked(true);
+	}
+	else
+	{
+		actionFileInfo_->setChecked(settings.value("actionFileInfoStatus").toBool());
+	}
+
+	if(settings.value("actionLogStatus").isNull())
+	{
+		//Hidden by default
+		actionLog_->setChecked(false);
+	}
+	else
+	{
+		actionLog_->setChecked(settings.value("actionLogStatus").toBool());
+	}
+
+	//Init key combo
+	//It is empty at this stage!!
+	savedKeyProfileName_=settings.value("keyProfileName").toString();
+	/*for(int i=0; i < keyCombo_->count(); i++)
+	{
+		if(keyCombo_->itemText(i) == txt)
+		{
+			keyCombo_->setCurrentIndex(i);
+			break;
+		}
+	}*/
+
+
+	//Init tabs
+	ival=settings.value("dumpTabIndex").toInt();
+	if(ival == dumpTab_->currentIndex())
+	{
+		slotCurrentDumpChanged(ival);
+	}	
+	else
+	{  
+		dumpTab_->setCurrentIndex(ival);
+	}
+	
+	settings.endGroup();
+}
diff --git a/src/BufrExaminer/BufrExaminer.h b/src/BufrExaminer/BufrExaminer.h
new file mode 100644
index 0000000..914fe8b
--- /dev/null
+++ b/src/BufrExaminer/BufrExaminer.h
@@ -0,0 +1,101 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef BufrExaminer_H
+#define BufrExaminer_H
+
+#include "MvQAbstractMessageExaminer.h"
+
+class QComboBox;
+class QLabel;
+class QSpinBox;
+class QSplitter;
+class QStackedLayout;
+class QTabWidget;
+class QTextBrowser;
+class QToolButton;
+class QTreeView;
+class QVBoxLayout;
+
+class MvQBufrBitmapDumpModel;
+class MvQBufrSectionDumpModel;
+class MvQBufrDataDumpModel;
+class MvQBufrDumpSortFilterModel;
+class MvQTreeViewSearchLine;
+class MvQTreeView;
+
+class BufrExaminer : public MvQAbstractMessageExaminer
+{
+    Q_OBJECT
+
+public:
+    	BufrExaminer(QWidget *parent = 0);
+    	~BufrExaminer();
+	
+public slots:
+	void slotMessageSpinChanged(int);
+	void slotSubsetSpinChanged(int);
+	void slotShowAboutBox();
+	void slotCurrentDumpChanged(int);
+	void slotStatusMessage(QString);
+	
+protected:
+	void closeEvent(QCloseEvent *);
+  
+private:
+	void setupGotoPanel();
+	void setupDumpBox();
+ 
+	void initDumps();
+	void initAllKeys();
+
+	void loadKeyProfile(MvKeyProfile *);
+
+	void loadDumps();
+	void loadSectionDump();
+	void loadDataDump();
+	void loadBitmapDump();
+	
+	void updateFileInfoLabel();
+	
+	void writeSettings();
+	void readSettings();
+	
+	QSplitter*   centralSplitter_;
+	QSplitter*   mainSplitter_;
+	QLabel *statusMessageLabel_;
+	
+	QTabWidget*    dumpTab_;	
+	
+	QTreeView*     sectionDumpTree_;
+	MvQBufrSectionDumpModel* sectionDumpModel_;
+	MvQTreeViewSearchLine* sectionDumpSearch_;
+
+	QTreeView*     dataDumpTree_;
+	MvQBufrDataDumpModel* dataDumpModel_;
+	MvQTreeViewSearchLine* dataDumpSearch_;
+
+	QTreeView*     bitmapDumpTree_;
+	MvQBufrBitmapDumpModel* bitmapDumpModel_;
+	MvQTreeViewSearchLine* bitmapDumpSearch_;
+
+	QSpinBox *messageSpin_;
+	QSpinBox *subsetSpin_;
+	QLabel *subsetLabel_;
+	MvQTreeViewSearchLine* messageSearch_;
+
+	bool ignoreMessageSpinChangeSignal_;
+	bool ignoreSubsetSpinChangeSignal_;
+	bool messageCanBeDecoded_;
+	
+	QWidget* gotoPanel_;
+};
+
+#endif
+
diff --git a/src/BufrExaminer/BufrMetaData.cc b/src/BufrExaminer/BufrMetaData.cc
new file mode 100644
index 0000000..5f3dcbb
--- /dev/null
+++ b/src/BufrExaminer/BufrMetaData.cc
@@ -0,0 +1,714 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <BufrMetaData.h>
+
+#include "MvException.h"
+#include "MvKeyProfile.h"
+
+#include <LogHandler.h>
+
+std::map<string,string> BufrMetaData::rdbKey_;
+
+BufrSection::~BufrSection()
+{
+	for(vector<BufrSectionItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		delete *it;
+	}
+}
+
+
+//=====================================
+//
+// BufrSectionDump
+//
+//=====================================
+
+BufrSectionDump::~BufrSectionDump()
+{
+	clear();
+}
+
+void BufrSectionDump::clear()
+{
+	for(vector<BufrSection*>::iterator it=section_.begin(); it != section_.end(); it++)
+	{
+		if(*it !=0)
+			delete *it;
+	}
+	section_.clear();
+
+	text_.clear();
+}
+
+
+bool BufrSectionDump::read(const string& fname, int msgCnt)
+{
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating BUFR Section (0,1,2,3) dump for message: <b>" << msgCnt << "</b>";
+	log->description(sst.str());
+	log->method("BUFREX subroutines: BUPRS0, BUPRS1, BUPRS2, BUPRS3");
+
+	MvObsSet oset(fname.c_str());
+	MvObsSetIterator iter(oset);
+        MvObs obs;
+
+        bool found=false;
+	while(obs = iter())
+	{
+		if(iter.msgNumber() == msgCnt)
+        	{
+			found=true;
+			break;
+		}
+        }
+
+        if(!found)
+	{
+            	log->error("Message not found!");
+		return false;
+	}
+
+	BufrSection *asec=0;
+	ostringstream oss[4];
+
+	//------------------------
+	//  Section 0
+	//------------------------
+
+	asec = new BufrSection("Section 0");
+	section_.push_back(asec);
+
+	if(obs.printSection0(oss[0])== false)
+	{
+		log->error("Section 0 dump failed!");
+		//clear();
+		return false;
+	}
+
+	asec->setText(oss[0].str());
+
+	//------------------------
+	//  Section 1
+	//------------------------
+
+	asec = new BufrSection("Section 1");
+	section_.push_back(asec);
+
+        if(obs.printSection1(oss[1]) == false)
+	{
+		log->error("Section 1 dump failed!");
+		//clear();
+		return false;
+	}
+
+        asec->setText(oss[1].str());
+
+	//------------------------
+	//  Section 2
+	//------------------------
+
+	if(obs.hasSection2())
+	{
+                asec = new BufrSection("Section 2");
+		section_.push_back(asec);
+
+		if(obs.printSection2(oss[2])== false)
+		{
+            		log->error("Section 2 dump failed!");
+			//clear();
+			return false;
+		}
+
+		asec->setText(oss[2].str());
+	}
+
+	//------------------------
+	//  Section 3
+	//------------------------
+
+	try
+	{
+		asec = new BufrSection("Section 3");
+		section_.push_back(asec);
+
+		if(obs.printSection3(oss[3]) == false)
+		{
+			log->error("Section 3 dump failed!");
+			//clear();
+			return false;
+		}
+       		asec->setText(oss[3].str());
+	}
+	catch(MvException e)
+	{
+		log->error("Section 3 dump failed!\n");
+		log->error(e.what());
+
+		return false;
+	}
+
+	return true;
+}
+
+
+//=====================================
+//
+// BufrDataDump
+//
+//=====================================
+
+BufrDataDump::~BufrDataDump()
+{
+	clear();
+}
+
+void BufrDataDump::clear()
+{
+	for(vector<BufrDataItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		if(*it !=0)
+			delete *it;
+	}
+	item_.clear();
+
+	text_.clear();
+}
+
+
+void BufrDataDump::read(const string& fname, int msgCnt,int subsetCnt)
+{
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating BUFR data dump for message: <b>" << subsetCnt << "</b> and for subset: <b>" <<
+                subsetCnt << "</b>";
+
+	log->description(sst.str());
+	log->method("BUFRX");
+
+	MvObsSet oset(fname.c_str());
+	MvObsSetIterator iter(oset);
+        MvObs obs;
+
+        bool found=false;
+	while(obs = iter())
+	{
+		if(iter.msgNumber() == msgCnt)
+        	{
+			found=true;
+			break;
+		}
+        }
+
+        if(!found)
+        {
+		log->error("Message not found!");
+		return;
+	}
+
+	if(subsetCnt >= 1 && subsetCnt <= obs.msgSubsetCount())
+	{
+		int index=1;
+		while(index != subsetCnt && obs.Advance())
+		{
+			index++;
+		}
+	}
+
+	bool dataToRead=obs.setFirstDescriptor();
+
+	while(dataToRead)
+	{
+		BufrDataItem *item = new BufrDataItem;
+
+		stringstream in;
+		in.width(5);
+		in.fill('0');
+		in << obs.currentDescriptor();
+
+		item->descriptor(in.str());
+		item->value(obs.stringValue());
+		item->unit(obs.unit());
+		item->name(obs.name());
+
+		item_.push_back(item);
+
+		dataToRead=obs.setNextDescriptor();
+	}
+}
+
+//=====================================
+//
+// BufrBitmapDump
+//
+//=====================================
+
+BufrBitmapDump::~BufrBitmapDump()
+{
+	clear();
+}
+
+void BufrBitmapDump::clear()
+{
+	/*for(vector<BufrDataItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		if(*it !=0)
+			delete *it;
+	}*/
+	item_.clear();
+}
+
+
+void BufrBitmapDump::read(const string& fname, int msgCnt,int subsetCnt)
+{
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating BUFR bitmap dump for message: <b>" << subsetCnt << "</b> and for subset: <b>" <<
+                subsetCnt << "</b>";
+	log->description(sst.str());
+	log->method("BUFRX");
+
+	MvObsSet oset(fname.c_str());
+	MvObsSetIterator iter(oset);
+        MvObs obs;
+
+  	bool found=false;
+	while(obs = iter())
+	{
+		if(iter.msgNumber() == msgCnt)
+        	{
+			found=true;
+			break;
+		}
+        }
+
+        if(!found)
+	{
+            	log->error("Message not found!");
+		return;
+	}
+
+	if(subsetCnt >= 1 && subsetCnt <= obs.msgSubsetCount())
+	{
+		int index=1;
+		while(index != subsetCnt && obs.Advance())
+		{
+			index++;
+		}
+	}
+
+	int rowNum;
+	int dataColNum;
+	obs.getBufrBoxSize(rowNum,dataColNum);
+
+	colNum_=dataColNum+2;
+
+	double val;
+	string sval;
+    	for(int i=0; i < rowNum; i++)
+	{
+		vector<string> txt(colNum_);
+
+		txt[0]=obs.feedbackItemName(i+1);
+		txt[1]=obs.feedbackItemUnit(i+1);
+
+		for(int j=0; j < dataColNum; j++)
+		{
+			val=obs.feedbackValue(i+1,j+1);
+			stringstream out;
+			out << val;
+			txt[j+2]=out.str();
+		}
+		item_.push_back(txt);
+	}
+}
+
+//=====================================
+//
+// BufrMetaData
+//
+//=====================================
+
+BufrMetaData::BufrMetaData()
+{
+	messageNum_=0;	
+}
+
+BufrMetaData::~BufrMetaData()
+{
+
+}
+bool BufrMetaData::useMessageSizeForProgressIndicator()
+{
+	return true;;
+}
+
+int BufrMetaData::getEstimatedMessageNum()
+{	
+  	return messageNum_;
+}
+
+void BufrMetaData::getKeyList(string section,MvKeyProfile* prof)
+{
+	for(vector<MvKey*>::iterator it=allKey_->begin(); it != allKey_->end(); it++)
+	{
+		if((*it)->metaData("section") == section)
+		{
+			prof->addKey((*it)->clone());
+		}
+	}
+}
+
+void BufrMetaData::setFileName(string fname)
+{
+	fileName_=fname;
+	messageNum_=0;
+}
+
+
+void BufrMetaData::loadKeyProfile(MvKeyProfile *prof)
+{
+        prof->clearKeyData();
+        readMessages(prof);
+}
+
+int BufrMetaData::subsetNum(int msgCnt)
+{
+	MvObsSet oset(fileName_.c_str());
+	MvObsSetIterator iter(oset);
+        MvObs obs;
+
+	bool found=false;
+	while(obs = iter())
+	{
+		if(iter.msgNumber() == msgCnt)
+        	{
+			found=true;
+			break;
+		}
+        }
+
+        if(!found)
+            return 0;
+
+	return obs.msgSubsetCount();
+
+}
+
+void BufrMetaData::readMessages(MvKeyProfile *prof)
+{
+	TDynamicTime otime(19980922,0);
+	MvObsSet oset(fileName_.c_str());
+	MvObsSetIterator iter(oset);
+
+	//iter.setTime(otime);
+	//iter.setWmoStation(11520);
+
+	MvObs obs;
+
+	//int index=1;
+
+    	messageNum_=0;
+	totalMessageNum_=0;
+	int bytesRead=0;
+
+   	while(obs = iter())
+    	{
+ 		if(iter.subsetNumber() != 1)
+		{
+			continue;
+		}
+	
+		map<string,string> section2;	
+		bool section2Decoded=false;
+		bool section2Available=false;
+
+	       	for(unsigned int i=0; i< prof->size(); i++)
+        	{
+
+			string name = prof->at(i)->name();
+            		string stmp;
+			//name="originatingCentre";
+
+			if(name == "MV_Index")
+			{
+				stringstream in;
+				in << messageNum_+1;
+				prof->at(i)->addValue(in.str().c_str());
+			}
+
+			else
+			{
+				int section;
+				std::istringstream iss(prof->at(i)->metaData("section"));
+  				iss >> section;
+
+            			switch(section)
+            			{
+
+		        	case 0:
+                			if(name == "totalLength")          
+						prof->at(i)->addValue(intToString(obs.messageTotalLen()));
+                			else if(name == "editionNumber")
+						prof->at(i)->addValue(intToString(obs.editionNumber()));
+					else
+						prof->at(i)->addValue("N/A");
+					break;
+
+            			case 1:
+                 		{
+					if(name == "editionNumber")
+						prof->at(i)->addValue(intToString(obs.editionNumber()));
+					else if(name == "masterTable")
+						prof->at(i)->addValue(intToString(obs.masterTable()));
+					else if(name == "masterTableVersion")
+						prof->at(i)->addValue(intToString(obs.masterTableVersion()));
+					else if(name == "localTableVersion")
+						prof->at(i)->addValue(intToString(obs.localTableVersion()));
+					else if(name == "messageType")
+						prof->at(i)->addValue(intToString(obs.messageType()));
+					else if(name == "messageSubType")
+						prof->at(i)->addValue(intToString(obs.messageSubtype()));
+					else if(name == "originatingCentre")
+						prof->at(i)->addValue(intToString(obs.originatingCentre()));
+					else if(name == "hasSection2")
+						prof->at(i)->addValue((obs.hasSection2()==true)?"y":"n");
+
+					else if(name == "date")
+					{
+						TDynamicTime t=obs.msgTime(); 
+						prof->at(i)->addValue(t.CharDate());		
+					}
+					else if(name == "time")
+					{
+						TDynamicTime t=obs.msgTime(); 
+						prof->at(i)->addValue(t.CharHhMm());		
+					}
+					else if(name == "year")
+					{
+						TDynamicTime t=obs.msgTime();  
+						string s=intToString(t.GetYear());
+						prof->at(i)->addValue(s);		
+					}
+					else if(name == "month")
+					{
+						TDynamicTime t=obs.msgTime();  
+						string s=intToString(t.GetMonth());
+						prof->at(i)->addValue(s);		
+					}
+					else if(name == "day")
+					{
+						TDynamicTime t=obs.msgTime();  
+						string s=intToString(t.GetDay());
+						prof->at(i)->addValue(s);		
+					}
+					else if(name == "hour")
+					{
+						TDynamicTime t=obs.msgTime();  
+						string s=intToString(t.GetHour());
+						prof->at(i)->addValue(s);		
+					}
+					else if(name == "minute")
+					{
+						TDynamicTime t=obs.msgTime();  
+						string s=intToString(t.GetMin());
+						prof->at(i)->addValue(s);		
+					}
+					else
+						prof->at(i)->addValue("N/A");
+					break;
+				}
+            			case 2:
+                 		{
+					if(obs.originatingCentre() != 98)
+					{
+						prof->at(i)->addValue("N/A");
+						break;
+					}
+
+					if(section2Decoded==false && obs.hasSection2())
+					{       	      						
+               					section2Available=obs.getDataFromSection2(section2);		
+						section2Decoded=true;
+
+					}
+
+					if(!section2Available)
+					{
+						prof->at(i)->addValue("N/A");
+						break;
+					}
+
+					if(name == "date:98")
+					{
+						if(section2.find("YEAR") != section2.end() &&
+						   section2.find("MONTH") != section2.end() &&
+						   section2.find("DAY") != section2.end())
+						{
+							string s=formatDate(section2["YEAR"],
+								section2["MONTH"],
+								section2["DAY"]);
+							prof->at(i)->addValue(s);
+						}
+						else
+						{	
+							prof->at(i)->addValue("N/A");
+						}	
+		
+					}
+					else if(name == "time:98")
+					{						
+						if(section2.find("HOUR") != section2.end() &&
+						   section2.find("MINUTE") != section2.end() &&
+						   section2.find("SECOND") != section2.end())
+
+						{
+							string s=formatTime(section2["HOUR"],
+								section2["MINUTE"],
+								section2["SECOND"]);
+							prof->at(i)->addValue(s);
+						}
+						else
+						{	
+							prof->at(i)->addValue("N/A");
+						}
+					}
+					else
+					{
+						string s=prof->at(i)->metaData("dumpId");
+						if(section2.find(s) != section2.end())
+						{
+							prof->at(i)->addValue(section2[s]);
+						}
+						else
+						{	
+							prof->at(i)->addValue("N/A");
+						}
+					}
+					break;
+				}
+				case 3:
+                 		{
+					if(name == "msgSubsetCount")
+						prof->at(i)->addValue(intToString(obs.msgSubsetCount()));
+
+					else
+						prof->at(i)->addValue("N/A");
+					break;
+				}
+               			default:
+                  			prof->at(i)->addValue("N/A");
+			 		break;
+
+                		}
+            		}
+		}
+
+            	messageNum_++;
+
+		//observer_->messageScanStepChanged(messageNum_);
+		bytesRead+=obs.messageTotalLen();
+		observer_->messageScanStepChanged(bytesRead);
+	}
+
+	totalMessageNum_=messageNum_;
+}
+
+string BufrSection::itemValue(string itemName)
+{
+	for(int i=0; i < static_cast<int>(item_.size()); i++)
+	{
+		if(item_[i]->name() ==  itemName)
+		{
+			return item_[i]->value();
+		}
+	}
+	return "N/A";
+}
+
+
+void BufrSection::setText(const string& txt)
+{
+        text_=txt;
+
+        istringstream in(text_);
+	string c;
+	while(getline(in,c))
+	{
+		stringstream ss(c);
+		string s, name;
+		vector<string> sv;
+
+		s=c;
+		if(s.size() > 1 && s.find("BUFR SECTION") == string::npos )
+		{
+			while(ss >> s )
+			{
+				sv.push_back(s);
+			}
+
+			BufrSectionItem *item = new BufrSectionItem;
+
+			for(unsigned int i=0; i< sv.size()-1; i++)
+			{
+				name.append(sv[i]);
+				if(i != sv.size()-2)
+					name.append(" ");
+			}
+			item->name(name);
+			item->value(sv[sv.size()-1]);
+
+			//cout << c << endl ;
+                        addItem(item);
+		}
+	}
+}
+
+string BufrMetaData::intToString(int i)
+{
+	stringstream out;
+	out << i;
+	return out.str();
+}
+
+string BufrMetaData::formatDate(string y, string m, string d)
+{
+	string res=y;
+	res.append((m.size() == 1)?"0" + m : m);
+	res.append((d.size() == 1)?"0" + d : d);
+
+	if(res.find("N/A") != string::npos)
+		res="N/A";
+
+	return res;
+}
+
+string BufrMetaData::formatTime(string h, string m, string s)
+{
+	string res=(h.size() == 1)?"0" + h : h;
+	res.append((m.size() == 1)?"0" + m : m);
+	res.append((s.size() == 1)?"0" + s : s);
+
+	if(res.find("N/A") != string::npos)
+		res="N/A";
+
+	return res;
+}
diff --git a/src/BufrExaminer/BufrMetaData.h b/src/BufrExaminer/BufrMetaData.h
new file mode 100644
index 0000000..871ac54
--- /dev/null
+++ b/src/BufrExaminer/BufrMetaData.h
@@ -0,0 +1,184 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef BufrMetaData_H
+#define BufrMetaData_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+#include <assert.h>
+
+#include <Metview.h>
+#include "MvMessageMetaData.h"
+#include "MvObs.h"
+
+using namespace std;
+
+class MvKeyProfile;
+
+class BufrDataItem
+{
+public:
+	BufrDataItem() {};
+
+	const string& descriptor() {return descriptor_;}
+	const string& name() {return name_;}
+	const string& value() {return value_;}
+	const string& unit() {return unit_;}
+
+	void descriptor(string s) {descriptor_=s;}
+	void name(string s) {name_=s;}
+	void value(string s) {value_=s;}
+	void unit(string s) {unit_=s;}
+
+
+protected:
+	string descriptor_;
+	string name_;
+	string value_;
+	string unit_;
+};
+
+
+class BufrKey
+{
+public:
+	BufrKey(string id, string n, string sn) : id_(id), name_(n), shortName_(sn) {};
+	string& id() {return id_;};
+	string& shortName() {return shortName_;};
+	string& name() {return name_;};
+	bool status() {return status_;};
+
+	void shortName(string s) {shortName_=s;};
+	void name(string s) {name_=s;};
+	void status(bool b) {status_=b;};
+	void addToCounter(string);
+	map<string,int>& counter() {return counter_;};
+
+protected:
+	string id_;
+	string name_;
+	string shortName_;
+	bool status_;
+	map<string,int> counter_;
+};
+
+class BufrSectionItem
+{
+public:
+	void name(string s) {name_=s;};
+	string name() {return name_;};
+	void value(string s) {value_=s;};
+	string value() {return value_;};
+
+protected:
+	string name_;
+	string value_;
+};
+
+
+class BufrSection
+{
+public:
+ 	BufrSection(string name) : name_(name) {};
+	~BufrSection();
+	string name() {return name_;};
+	void setText(const string& c);
+	string text() {return text_;};
+	void addItem(BufrSectionItem* i) {item_.push_back(i);};
+	const vector<BufrSectionItem*>& item() {return item_;};
+	int itemNum() {return item_.size();}
+	string itemValue(string);
+
+protected:
+	string name_;
+	string text_;
+	vector<BufrSectionItem*> item_;
+};
+
+class BufrSectionDump
+{
+public:
+	BufrSectionDump() {};
+	~BufrSectionDump();
+	void clear();
+	bool read(const string&, int);
+	int  sectionNum() const {return section_.size();}
+	const string& text() const {return text_;}
+	const vector<BufrSection*>& section() {return section_;}
+
+protected:
+	vector<BufrSection*> section_;
+	string text_;
+};
+
+class BufrDataDump
+{
+public:
+	BufrDataDump() {};
+	~BufrDataDump();
+	void clear();
+	void read(const string&, int,int);
+	int  itemNum() const {return item_.size();}
+	const string& text() const {return text_;}
+	const vector<BufrDataItem*>& item() {return item_;}
+
+protected:
+	vector<BufrDataItem*> item_;
+	string text_;
+};
+
+class BufrBitmapDump
+{
+public:
+	BufrBitmapDump() : colNum_(0) {};
+	~BufrBitmapDump();
+	void clear();
+	void read(const string&, int,int);
+	int  itemNum() const {return item_.size();}
+	const vector<vector<string> >& item() {return item_;}
+	int colNum() {return colNum_;}
+
+protected:
+	int colNum_;
+	vector<vector<string> > item_;
+
+};
+
+
+class BufrMetaData : public MvMessageMetaData
+{
+public:
+	BufrMetaData();
+	~BufrMetaData();
+	void setFileName(string);
+	int  subsetNum(int);
+	void loadKeyProfile(MvKeyProfile *);
+	void getKeyList(string,MvKeyProfile*);
+	int getEstimatedMessageNum();
+	bool useMessageSizeForProgressIndicator();
+
+private:
+	void readMessages(MvKeyProfile *);
+	void readSection(BufrSection*,char*);
+	string intToString(int);
+	string formatDate(string, string, string);
+	string formatTime(string, string, string);
+	
+	string tmpFile_;
+
+	map<int,vector<BufrKey> > items_;
+	static std::map<string,string> rdbKey_;
+	MvKeyProfile *allKey_;
+};
+
+
+#endif
diff --git a/src/BufrExaminer/Makefile.am b/src/BufrExaminer/Makefile.am
new file mode 100755
index 0000000..a1f379c
--- /dev/null
+++ b/src/BufrExaminer/Makefile.am
@@ -0,0 +1,35 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+bin_PROGRAMS = bin/BufrExaminer
+bin_BufrExaminer_SOURCES = MvMain.cc BufrMetaData.cc BufrExaminer.cc \
+                           MvQBufrDumpModel.cc \
+                           BufrExaminer.h BufrMetaData.h MvQBufrDumpModel.h
+			   
+		
+nodist_bin_BufrExaminer_SOURCES = BufrExaminer.moc.cpp 
+
+bin_BufrExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_BufrExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_BufrExaminer_LDFLAGS  = $(QT_LDFLAGS)
+bin_BufrExaminer_LDADD    = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_BufrExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+BUILT_SOURCES = bin BufrExaminer.moc.cpp
+              
+
+EXTRA_DIST = 
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/BufrExaminer *.o *.moc.cpp *.qrc.cpp
+
+
diff --git a/src/BufrExaminer/Makefile.in b/src/BufrExaminer/Makefile.in
new file mode 100644
index 0000000..c1f8e8b
--- /dev/null
+++ b/src/BufrExaminer/Makefile.in
@@ -0,0 +1,887 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/BufrExaminer$(EXEEXT)
+subdir = src/BufrExaminer
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_BufrExaminer_OBJECTS = bin_BufrExaminer-MvMain.$(OBJEXT) \
+	bin_BufrExaminer-BufrMetaData.$(OBJEXT) \
+	bin_BufrExaminer-BufrExaminer.$(OBJEXT) \
+	bin_BufrExaminer-MvQBufrDumpModel.$(OBJEXT)
+nodist_bin_BufrExaminer_OBJECTS =  \
+	bin_BufrExaminer-BufrExaminer.moc.$(OBJEXT)
+bin_BufrExaminer_OBJECTS = $(am_bin_BufrExaminer_OBJECTS) \
+	$(nodist_bin_BufrExaminer_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_BufrExaminer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) \
+	$(bin_BufrExaminer_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_BufrExaminer_SOURCES) \
+	$(nodist_bin_BufrExaminer_SOURCES)
+DIST_SOURCES = $(bin_BufrExaminer_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_BufrExaminer_SOURCES = MvMain.cc BufrMetaData.cc BufrExaminer.cc \
+                           MvQBufrDumpModel.cc \
+                           BufrExaminer.h BufrMetaData.h MvQBufrDumpModel.h
+
+nodist_bin_BufrExaminer_SOURCES = BufrExaminer.moc.cpp 
+bin_BufrExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_BufrExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_BufrExaminer_LDFLAGS = $(QT_LDFLAGS)
+bin_BufrExaminer_LDADD = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_BufrExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+BUILT_SOURCES = bin BufrExaminer.moc.cpp
+EXTRA_DIST = 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/BufrExaminer/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/BufrExaminer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/BufrExaminer$(EXEEXT): $(bin_BufrExaminer_OBJECTS) $(bin_BufrExaminer_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/BufrExaminer$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_BufrExaminer_LINK) $(bin_BufrExaminer_OBJECTS) $(bin_BufrExaminer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_BufrExaminer-BufrExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_BufrExaminer-BufrMetaData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_BufrExaminer-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_BufrExaminer-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-MvMain.o -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-MvMain.Tpo -c -o bin_BufrExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-MvMain.Tpo $(DEPDIR)/bin_BufrExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_BufrExaminer-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_BufrExaminer-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-MvMain.Tpo -c -o bin_BufrExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-MvMain.Tpo $(DEPDIR)/bin_BufrExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_BufrExaminer-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_BufrExaminer-BufrMetaData.o: BufrMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-BufrMetaData.o -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-BufrMetaData.Tpo -c -o bin_BufrExaminer-BufrMetaData.o `test -f 'BufrMetaData.cc' || echo '$(srcdir)/'`BufrMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-BufrMetaData.Tpo $(DEPDIR)/bin_BufrExaminer-BufrMetaData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrMetaData.cc' object='bin_BufrExaminer-BufrMetaData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-BufrMetaData.o `test -f 'BufrMetaData.cc' || echo '$(srcdir)/'`BufrMetaData.cc
+
+bin_BufrExaminer-BufrMetaData.obj: BufrMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-BufrMetaData.obj -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-BufrMetaData.Tpo -c -o bin_BufrExaminer-BufrMetaData.obj `if test -f 'BufrMetaData.cc'; then $(CYGPATH_W) 'BufrMetaData.cc'; else $(CYGPATH_W) '$(srcdir)/BufrMetaData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-BufrMetaData.Tpo $(DEPDIR)/bin_BufrExaminer-BufrMetaData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrMetaData.cc' object='bin_BufrExaminer-BufrMetaData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-BufrMetaData.obj `if test -f 'BufrMetaData.cc'; then $(CYGPATH_W) 'BufrMetaData.cc'; else $(CYGPATH_W) '$(srcdir)/BufrMetaData.cc'; fi`
+
+bin_BufrExaminer-BufrExaminer.o: BufrExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-BufrExaminer.o -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-BufrExaminer.Tpo -c -o bin_BufrExaminer-BufrExaminer.o `test -f 'BufrExaminer.cc' || echo '$(srcdir)/'`BufrExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-BufrExaminer.Tpo $(DEPDIR)/bin_BufrExaminer-BufrExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrExaminer.cc' object='bin_BufrExaminer-BufrExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-BufrExaminer.o `test -f 'BufrExaminer.cc' || echo '$(srcdir)/'`BufrExaminer.cc
+
+bin_BufrExaminer-BufrExaminer.obj: BufrExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-BufrExaminer.obj -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-BufrExaminer.Tpo -c -o bin_BufrExaminer-BufrExaminer.obj `if test -f 'BufrExaminer.cc'; then $(CYGPATH_W) 'BufrExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/BufrExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-BufrExaminer.Tpo $(DEPDIR)/bin_BufrExaminer-BufrExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrExaminer.cc' object='bin_BufrExaminer-BufrExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-BufrExaminer.obj `if test -f 'BufrExaminer.cc'; then $(CYGPATH_W) 'BufrExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/BufrExaminer.cc'; fi`
+
+bin_BufrExaminer-MvQBufrDumpModel.o: MvQBufrDumpModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-MvQBufrDumpModel.o -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Tpo -c -o bin_BufrExaminer-MvQBufrDumpModel.o `test -f 'MvQBufrDumpModel.cc' || echo '$(srcdir)/'`MvQBufrDumpModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Tpo $(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQBufrDumpModel.cc' object='bin_BufrExaminer-MvQBufrDumpModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-MvQBufrDumpModel.o `test -f 'MvQBufrDumpModel.cc' || echo '$(srcdir)/'`MvQBufrDumpModel.cc
+
+bin_BufrExaminer-MvQBufrDumpModel.obj: MvQBufrDumpModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-MvQBufrDumpModel.obj -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Tpo -c -o bin_BufrExaminer-MvQBufrDumpModel.obj `if test -f 'MvQBufrDumpModel.cc'; then $(CYGPATH_W) 'MvQBufrDumpModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQBufrDumpModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Tpo $(DEPDIR)/bin_BufrExaminer-MvQBufrDumpModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQBufrDumpModel.cc' object='bin_BufrExaminer-MvQBufrDumpModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-MvQBufrDumpModel.obj `if test -f 'MvQBufrDumpModel.cc'; then $(CYGPATH_W) 'MvQBufrDumpModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQBufrDumpModel.cc'; fi`
+
+bin_BufrExaminer-BufrExaminer.moc.o: BufrExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-BufrExaminer.moc.o -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Tpo -c -o bin_BufrExaminer-BufrExaminer.moc.o `test -f 'BufrExaminer.moc.cpp' || echo '$(srcdir)/'`BufrExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Tpo $(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrExaminer.moc.cpp' object='bin_BufrExaminer-BufrExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-BufrExaminer.moc.o `test -f 'BufrExaminer.moc.cpp' || echo '$(srcdir)/'`BufrExaminer.moc.cpp
+
+bin_BufrExaminer-BufrExaminer.moc.obj: BufrExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_BufrExaminer-BufrExaminer.moc.obj -MD -MP -MF $(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Tpo -c -o bin_BufrExaminer-BufrExaminer.moc.obj `if test -f 'BufrExaminer.moc.cpp'; then $(CYGPATH_W) 'BufrExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/BufrExaminer.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Tpo $(DEPDIR)/bin_BufrExaminer-BufrExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrExaminer.moc.cpp' object='bin_BufrExaminer-BufrExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_BufrExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_BufrExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_BufrExaminer-BufrExaminer.moc.obj `if test -f 'BufrExaminer.moc.cpp'; then $(CYGPATH_W) 'BufrExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/BufrExaminer.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/BufrExaminer *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/BufrExaminer/MvMain.cc b/src/BufrExaminer/MvMain.cc
new file mode 100644
index 0000000..db079c2
--- /dev/null
+++ b/src/BufrExaminer/MvMain.cc
@@ -0,0 +1,97 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include "BufrExaminer.h"
+
+#include <iostream>
+#include "Metview.h"
+#include "MvQService.h"
+#include "MvQKeyManager.h"
+#include "BufrMetaData.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService
+{
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvBufrExaminer : public Base
+{
+public:
+	MvBufrExaminer() : Base("BUFR") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvBufrExaminer::serve( MvRequest& in, MvRequest& /*out*/)
+{
+  	cout << "--------------MvBufrExaminer::serve()--------------" << endl;
+  	in.print();
+
+	//Get bufr file name
+	const char* tmpc = in("PATH");
+
+	//Set bufr file name
+	string fbufr(tmpc);
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(keyDialog);
+	Q_INIT_RESOURCE(window);
+	Q_INIT_RESOURCE(find);
+
+	//Create the bufr key manager and initialize it
+	MvQKeyManager *manager = new MvQKeyManager(MvQKeyManager::BufrType);
+	manager->loadProfiles();
+
+	//Create the bufr metadata object and initialize it
+	BufrMetaData *bufr = new BufrMetaData;
+	bufr->setFileName(fbufr);
+
+	//Create the bufr browser and initialize it
+	BufrExaminer *browser = new BufrExaminer;
+	browser->init(bufr,manager);
+
+   	browser->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI (but not to MvExamineManager)
+	// To turn icon to green; otherwise, it will stay orange
+	if( strcmp( getenv("METVIEW_MODE"), "examine" ) != 0 )
+	{
+	    MvRequest req;
+	    sendReplyFromInteractive(req);
+	}
+
+	//Enter the app loop
+ 	app.exec();
+}
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+  	av = argv;
+
+	MvApplication theApp( argc, argv );
+
+    	MvBufrExaminer bufr;
+
+    	theApp.run();
+}
diff --git a/src/BufrExaminer/MvQBufrDumpModel.cc b/src/BufrExaminer/MvQBufrDumpModel.cc
new file mode 100644
index 0000000..77e0b1a
--- /dev/null
+++ b/src/BufrExaminer/MvQBufrDumpModel.cc
@@ -0,0 +1,521 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQBufrDumpModel.h"
+#include "BufrMetaData.h"
+#include "MvKeyProfile.h"
+
+#include "MvQKeyMimeData.h"
+
+bool MvQBufrDumpSortFilterModel::lessThan ( const QModelIndex &left, const QModelIndex &right) const
+{
+ 	QString leftData = sourceModel()->data(left).toString();
+     	QString rightData = sourceModel()->data(right).toString();
+
+	//Sort as int
+	if(QString::number(leftData.toInt()) == leftData)
+	{
+		return leftData.toInt() < rightData.toInt();
+	}
+	else
+	{
+		return QString::localeAwareCompare(leftData, rightData) < 0;	
+	}
+}
+
+
+MvQBufrSectionDumpModel::MvQBufrSectionDumpModel()
+{
+	data_=0;
+}
+
+void MvQBufrSectionDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQBufrSectionDumpModel::setDumpData(BufrSectionDump *dump)
+{	
+	data_=dump;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+void MvQBufrSectionDumpModel::setAllKeys(QList<MvKeyProfile*>& allKeys)
+{
+	allKeys_=allKeys;
+}
+
+int MvQBufrSectionDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 3;
+}
+
+int MvQBufrSectionDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(parent.isValid() )
+	{
+		int id=parent.internalId();
+		if(idToLevel(id) == 0)
+		{
+			return data_->section().at(id)->itemNum();			
+		}
+		else
+		{
+			return 0;
+		}
+	}
+	//Root
+	else
+	{
+		return data_->sectionNum();
+	}
+}
+
+Qt::ItemFlags MvQBufrSectionDumpModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled | Qt::ItemIsSelectable;		
+     		
+       	int id=index.internalId();
+	if(idToLevel(id) == 0)
+		return defaultFlags;
+	else
+		return Qt::ItemIsDragEnabled | defaultFlags;	
+}
+
+QVariant MvQBufrSectionDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || role != Qt::DisplayRole)
+        {			
+		return QVariant();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		BufrSection *item = data_->section().at(id);
+		return label(item,index.column());
+	}
+	else if(idToLevel(id) == 1)
+	{
+		int parentRow=idToParentRow(id);
+		BufrSection *sec = data_->section().at(parentRow);
+		BufrSectionItem *item = sec->item().at(index.row());	
+		return label(item,index.column());
+	}
+	
+	return  QVariant();
+
+}
+
+
+QVariant MvQBufrSectionDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return QObject::tr("Section");
+  	case 1: return QObject::tr("Name");
+	case 2: return QObject::tr("Value");
+   	}
+
+    	return QVariant();
+}
+
+
+QString MvQBufrSectionDumpModel::label(BufrSection *section,const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString(section->name().c_str());
+	}
+	default:
+        	return QString();
+    	}
+}
+
+QString MvQBufrSectionDumpModel::label(BufrSectionItem* item, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		//return QString(item->pos().c_str());
+		return QString();
+	}
+     	case 1: 
+	{
+		return QString(item->name().c_str());
+	}
+    	case 2: 
+	{
+		return QString(item->value().c_str());
+	}
+	default:
+        	return QString();
+    	}
+}
+
+
+QModelIndex MvQBufrSectionDumpModel::index( int row, int column, const QModelIndex & parent ) const
+{
+	if(!data_ || row < 0 || column < 0 || parent.column() > 3)
+	{
+		return QModelIndex();
+	}
+	
+	//Parent is non-root -> level-1 items: id is the (parent row number +1)*1000
+	if(parent.isValid() )
+	{
+		int id=(parent.row()+1)*1000;
+		return createIndex(row, column, id); 
+	}
+	//Parent is root -> level-0 items: id is the row number
+	else
+	{
+		return createIndex(row, column, row); 
+	}
+
+}
+
+QModelIndex MvQBufrSectionDumpModel::parent( const QModelIndex & index ) const
+{		
+	if(!index.isValid() )
+	{
+		return QModelIndex();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		return QModelIndex();
+	}
+	else 
+	{
+		int parentRow=idToParentRow(id);
+		return createIndex(parentRow,0,parentRow);
+	}
+
+	return QModelIndex();
+
+}
+
+int MvQBufrSectionDumpModel::idToLevel(int id) const
+{
+	if(id >=0 && id < 1000)
+		return 0;
+	else
+		return 1;
+}
+
+
+int MvQBufrSectionDumpModel::idToParentRow(int id) const
+{
+	if(idToLevel(id) == 0)
+		return -1;
+	else
+		return id/1000-1;
+}
+
+Qt::DropActions MvQBufrSectionDumpModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQBufrSectionDumpModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvkey";
+    	return types;
+ }
+
+QMimeData* MvQBufrSectionDumpModel::mimeData(const QModelIndexList &indexes) const
+ {
+     	MvQKeyMimeData *mimeData = new MvQKeyMimeData(this);
+     	
+	QList<int> procRows;
+
+    	foreach (QModelIndex index, indexes) 
+	{
+	       	int id=index.internalId();
+		if(idToLevel(id) == 1 && index.isValid() && 
+		    procRows.indexOf(index.row()) == -1) 
+		{
+			int parentRow=idToParentRow(id);
+			BufrSection *sec = data_->section().at(parentRow);
+			BufrSectionItem *item = sec->item().at(index.row());	
+				
+			string dumpId=item->name();
+			
+			foreach(MvKeyProfile* prof,allKeys_)
+			{
+				bool found=false;
+				for(int i=0; i < static_cast<int>(prof->size()); i++)
+				{
+					MvKey *key=prof->at(i);
+					if(key->metaData("dumpId") == dumpId)
+					{						
+						mimeData->addKey(key,index.row());
+						procRows << index.row();
+						found=true;
+						break;
+					}
+				}
+				if(found)
+					break;
+			}
+         	}
+     	}
+
+     	return mimeData;
+}
+
+bool MvQBufrSectionDumpModel::dropMimeData(const QMimeData* /*data*/,
+     Qt::DropAction /*action*/, int /*row*/, int /*column*/, const QModelIndex& /*parent*/)
+{
+        return false;
+}
+
+//=====================================
+//
+// MvQBufDataDumpModel
+//
+//=====================================
+
+MvQBufrDataDumpModel::MvQBufrDataDumpModel()
+{
+	data_=0;
+}
+
+void MvQBufrDataDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+
+void MvQBufrDataDumpModel::setDumpData(BufrDataDump *dump)
+{	
+	data_=dump;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+
+int MvQBufrDataDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 5;
+}
+
+int MvQBufrDataDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(parent.isValid() )
+	{		
+		return 0;
+	}
+	//Root
+	else
+	{
+		return data_->itemNum();
+	}
+}
+
+
+QVariant MvQBufrDataDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || role != Qt::DisplayRole)
+        {			
+		return QVariant();
+	}
+	
+	BufrDataItem *item = data_->item().at(index.row());			
+	return label(item,index.row(),index.column());
+}
+
+
+QVariant MvQBufrDataDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return QObject::tr("Index");
+  	case 1: return QObject::tr("Descriptor");
+	case 2: return QObject::tr("Name");
+	case 3: return QObject::tr("Value");
+	case 4: return QObject::tr("Units");
+   	}
+
+    	return QVariant();
+}
+
+
+QString MvQBufrDataDumpModel::label(BufrDataItem *item, const int row, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString::number(row);
+	}
+     	case 1: 
+	{
+		return QString(item->descriptor().c_str());
+	}
+	case 2: 
+	{
+		return QString(item->name().c_str());
+	}
+    	case 3: 
+	{
+		return QString(item->value().c_str());
+	}
+	case 4: 
+	{
+		return QString(item->unit().c_str());
+	}
+
+	default:
+        	return QString();
+    	}
+}
+
+
+QModelIndex MvQBufrDataDumpModel::index( int row, int column, const QModelIndex & /*parent*/ ) const
+{
+	return createIndex(row, column, row); 
+
+}
+
+QModelIndex MvQBufrDataDumpModel::parent( const QModelIndex & /*index*/ ) const
+{		
+	return QModelIndex();
+}
+
+//=====================================
+//
+// MvQBufrBitmapDumpModel
+//
+//=====================================
+
+MvQBufrBitmapDumpModel::MvQBufrBitmapDumpModel()
+{
+	data_=0;
+}
+
+void MvQBufrBitmapDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+
+void MvQBufrBitmapDumpModel::setDumpData(BufrBitmapDump *dump)
+{	
+	data_=dump;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+
+int MvQBufrBitmapDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+ 	if(data_ && data_->colNum() > 0)
+ 	 	return data_->colNum()+1;
+	else
+		return 0;
+}
+
+int MvQBufrBitmapDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(parent.isValid() )
+	{		
+		return 0;
+	}
+	//Root
+	else
+	{
+		return data_->itemNum();
+	}
+}
+
+
+QVariant MvQBufrBitmapDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || role != Qt::DisplayRole)
+        {			
+		return QVariant();
+	}
+	
+	if(index.column() ==0)
+	{
+		return QString::number(index.row());
+	}
+	else if(index.column() < data_->colNum()+1)
+	{
+		return QString::fromStdString(data_->item().at(index.row()).at(index.column()-1));
+	}
+	else
+		return QVariant();
+}
+
+
+QVariant MvQBufrBitmapDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || (role != Qt::DisplayRole &&  role != Qt::ToolTipRole))
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+
+ 	if(section == 0) 
+		return QObject::tr("Index");
+	else if(section == 1) 
+  		return QObject::tr("Name");
+	else if(section == 2)
+		return QObject::tr("Units");
+	else if(section == 3)
+		return QObject::tr("Value");
+	else
+		return QObject::tr("Appl ") + QString::number(section-3);
+
+   	return QVariant();
+}
+
+
+QModelIndex MvQBufrBitmapDumpModel::index( int row, int column, const QModelIndex & /*parent*/ ) const
+{
+	return createIndex(row, column, row); 
+
+}
+
+QModelIndex MvQBufrBitmapDumpModel::parent( const QModelIndex & /*index*/ ) const
+{		
+	return QModelIndex();
+}
diff --git a/src/BufrExaminer/MvQBufrDumpModel.h b/src/BufrExaminer/MvQBufrDumpModel.h
new file mode 100644
index 0000000..2df4b4b
--- /dev/null
+++ b/src/BufrExaminer/MvQBufrDumpModel.h
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQBufrDumpModel_H
+#define MvQBufrDumpModel_H
+
+#include <QAbstractItemModel>
+#include <QSortFilterProxyModel>
+#include <QStringList>
+
+#include "BufrMetaData.h" 
+
+class GribWmoDump;
+class GribSection;
+class GribItem;
+
+class MvQBufrDumpSortFilterModel : public QSortFilterProxyModel
+{
+public:
+	MvQBufrDumpSortFilterModel(QObject *parent=0) : QSortFilterProxyModel(parent) {};
+
+protected:
+	bool lessThan ( const QModelIndex &, const QModelIndex &) const;
+};
+
+
+class MvQBufrSectionDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQBufrSectionDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(BufrSectionDump*);
+	BufrSectionDump* dumpData() {return data_;}
+
+	void setAllKeys(QList<MvKeyProfile*>&);
+	
+	Qt::ItemFlags flags ( const QModelIndex & index) const;
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+protected:
+	QString label(BufrSection*,const int) const;
+	QString label(BufrSectionItem*,const int) const;
+
+	int idToLevel(int) const;
+	int idToParentRow(int) const;
+
+private:
+	BufrSectionDump* data_;
+	QList<MvKeyProfile*> allKeys_;
+	
+};
+
+
+class MvQBufrDataDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQBufrDataDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(BufrDataDump*);
+	BufrDataDump* dumpData() {return data_;}
+
+protected:
+	QString label(BufrDataItem*,const int,const int) const;
+	
+private:
+	BufrDataDump* data_;
+	
+};
+
+class MvQBufrBitmapDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQBufrBitmapDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(BufrBitmapDump*);
+	BufrBitmapDump* dumpData() {return data_;}
+	
+private:
+	BufrBitmapDump* data_;
+	
+};
+
+
+
+
+#endif
\ No newline at end of file
diff --git a/src/CptecAccess/CPTECACCESS.xpm b/src/CptecAccess/CPTECACCESS.xpm
new file mode 100644
index 0000000..360cd30
--- /dev/null
+++ b/src/CptecAccess/CPTECACCESS.xpm
@@ -0,0 +1,244 @@
+/* XPM */
+static char * icone_1_xpm[] = {
+"32 32 209 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #555555",
+"@ 	c #B2B2B2",
+"# 	c #2500FF",
+"$ 	c #A6A6A6",
+"% 	c #323232",
+"& 	c #3D3D3D",
+"* 	c #434343",
+"= 	c #4A4A4A",
+"- 	c #4B4B4B",
+"; 	c #4E4E4E",
+"> 	c #1B1349",
+", 	c #1D154B",
+"' 	c #292157",
+") 	c #4F4F4F",
+"! 	c #ACACAC",
+"~ 	c #AD9FFF",
+"{ 	c #BDBDBD",
+"] 	c #8E8E8E",
+"^ 	c #AAAAAA",
+"/ 	c #7B7B7B",
+"( 	c #737373",
+"_ 	c #747474",
+": 	c #767676",
+"< 	c #6D6D6D",
+"[ 	c #3B3B3B",
+"} 	c #7E7E7E",
+"| 	c #C3C3C3",
+"1 	c #A9A9A9",
+"2 	c #BCBCBC",
+"3 	c #535353",
+"4 	c #929292",
+"5 	c #AFAFAF",
+"6 	c #7F7F7F",
+"7 	c #787878",
+"8 	c #414141",
+"9 	c #8B8B8B",
+"0 	c #AEAEAE",
+"a 	c #8F8F8F",
+"b 	c #C7C7C7",
+"c 	c #B5B5B5",
+"d 	c #545454",
+"e 	c #C1C1C1",
+"f 	c #919191",
+"g 	c #757575",
+"h 	c #777777",
+"i 	c #7A7A7A",
+"j 	c #3A3A3A",
+"k 	c #ADADAD",
+"l 	c #CCCCCC",
+"m 	c #7C7C7C",
+"n 	c #C6C6C6",
+"o 	c #B0B0B0",
+"p 	c #B7B7B7",
+"q 	c #464646",
+"r 	c #363636",
+"s 	c #A5A5A5",
+"t 	c #B3B3B3",
+"u 	c #707070",
+"v 	c #727272",
+"w 	c #CACACA",
+"x 	c #858585",
+"y 	c #C0C0C0",
+"z 	c #9A9A9A",
+"A 	c #BEBEBE",
+"B 	c #999999",
+"C 	c #A4A4A4",
+"D 	c #251D53",
+"E 	c #B6B6B6",
+"F 	c #C7C6C6",
+"G 	c #D1D0D0",
+"H 	c #D2D2D2",
+"I 	c #CECDCD",
+"J 	c #C8C8C8",
+"K 	c #C9C9C9",
+"L 	c #C5C5C5",
+"M 	c #BFBFBF",
+"N 	c #B4B4B4",
+"O 	c #444444",
+"P 	c #C2C3C3",
+"Q 	c #BBB2B2",
+"R 	c #94979B",
+"S 	c #515959",
+"T 	c #515250",
+"U 	c #767575",
+"V 	c #A59B9C",
+"W 	c #999898",
+"X 	c #929393",
+"Y 	c #939393",
+"Z 	c #9D9D9D",
+"` 	c #494949",
+" .	c #BCB3B6",
+"..	c #4F7377",
+"+.	c #218770",
+"@.	c #29C6BB",
+"#.	c #1A6F54",
+"$.	c #00A194",
+"%.	c #20706F",
+"&.	c #7A7675",
+"*.	c #B1AEAF",
+"=.	c #A6A7A6",
+"-.	c #A7A7A7",
+";.	c #C2C2C2",
+">.	c #403B3D",
+",.	c #445A4C",
+"'.	c #0FB899",
+").	c #52AA50",
+"!.	c #8AF2DD",
+"~.	c #A8FAF2",
+"{.	c #23DEC3",
+"].	c #4EC8B1",
+"^.	c #043E21",
+"/.	c #878786",
+"(.	c #BBBABA",
+"_.	c #42474B",
+":.	c #1B6F36",
+"<.	c #3BA43D",
+"[.	c #40AC6B",
+"}.	c #6AB67C",
+"|.	c #63C18F",
+"1.	c #BDFDF5",
+"2.	c #188642",
+"3.	c #077E57",
+"4.	c #305D53",
+"5.	c #B3AEB0",
+"6.	c #B3B2B2",
+"7.	c #26868B",
+"8.	c #1CA26C",
+"9.	c #1D8D1F",
+"0.	c #3BA45E",
+"a.	c #26A965",
+"b.	c #47BE8B",
+"c.	c #C4FFFF",
+"d.	c #0CDDC5",
+"e.	c #29BDA3",
+"f.	c #339E90",
+"g.	c #6F7777",
+"h.	c #0A6A6F",
+"i.	c #21A86E",
+"j.	c #258F21",
+"k.	c #00801C",
+"l.	c #28B071",
+"m.	c #E4FFFF",
+"n.	c #BCFFFF",
+"o.	c #3EE6BD",
+"p.	c #0F773C",
+"q.	c #004E2A",
+"r.	c #585757",
+"s.	c #127B7C",
+"t.	c #35E7D6",
+"u.	c #52AC64",
+"v.	c #018627",
+"w.	c #66CDA5",
+"x.	c #64D0AA",
+"y.	c #B1FFFF",
+"z.	c #32D1B5",
+"A.	c #056A36",
+"B.	c #005934",
+"C.	c #5D5E5E",
+"D.	c #4E8483",
+"E.	c #20EFF2",
+"F.	c #97F9F5",
+"G.	c #41A660",
+"H.	c #49BB86",
+"I.	c #56B982",
+"J.	c #81E5D2",
+"K.	c #87FDFF",
+"L.	c #18C8B8",
+"M.	c #056754",
+"N.	c #9B9292",
+"O.	c #473939",
+"P.	c #15B4B4",
+"Q.	c #6BFFFF",
+"R.	c #49D8CB",
+"S.	c #006A35",
+"T.	c #006E39",
+"U.	c #1FD8C8",
+"V.	c #5EFFFF",
+"W.	c #02F1F3",
+"X.	c #4D7E81",
+"Y.	c #BCB1B1",
+"Z.	c #991507",
+"`.	c #534F4F",
+" +	c #8F8E8E",
+".+	c #1BB2B2",
+"++	c #63EBED",
+"@+	c #1A8A65",
+"#+	c #009573",
+"$+	c #00FFFF",
+"%+	c #00D5D5",
+"&+	c #438282",
+"*+	c #BCADAD",
+"=+	c #CECECE",
+"-+	c #D1D1D1",
+";+	c #B8B8B8",
+">+	c #383838",
+",+	c #868787",
+"'+	c #635F5F",
+")+	c #483A3A",
+"!+	c #548282",
+"~+	c #12483A",
+"{+	c #0A4134",
+"]+	c #2C8787",
+"^+	c #484747",
+"/+	c #473D3D",
+"(+	c #484949",
+"_+	c #505050",
+":+	c #797979",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . + + + + + + + . . . . . . . . . . . . ",
+". . . . . . . . . . + + + @ @ @ @ @ @ @ + + + . . . . . . . . . ",
+". . . . . . . . + + @ @ @ @ . . . . . @ @ @ @ + + . . . . . . . ",
+". . . . . . . + @ @ . . . . . . . . . . . . . @ @ + . . . . . . ",
+". . . . . . + @ . . . . . . . . . . . . . . . . . @ + . . . . . ",
+". . . . . + @ . . . . . . . . . . . . . . . . . . . @ + . . . . ",
+". . . . + @ . . . . . . . . . . . . . . . . . . . . . @ + . . . ",
+". . . + @ . . . . . . . . . . . . . . . . . . . . . . . @ + . . ",
+". . . + @ . . . . . . . . . . . . . . . . . . . . . . . @ + . . ",
+". . + @ . . . . . . . . . . . . . . . . . . . . . . . . . @ + . ",
+". . + @ . . . . . . . . . . # # # # # . . . . . . . . . . @ + . ",
+". . + @ . . . . . . . . . # # # # # # # . . . . . . . . . @ + . ",
+"$ % & * = = = = = - ; - > , ' ) ! . ~ # # . . . . . . . . . @ + ",
+"- { ] ^ / ( _ _ : < [ ; : } | 1 + 2 . # # # . . . . . . . . @ + ",
+"3 | 4 5 6 : 7 7 / 8 9 0 a } b c ! + ^ . # # . . . . . . . . @ + ",
+"d e f 0 } g h h i j k l f m n o p ^ q . # # . . . . . . . . @ + ",
+"d e f 0 } g h h i r s n f m n o t o d . # # . . . . . . . . @ + ",
+"d e a ! i u v v ( 3 2 w x 7 n o t 0 3 # # # . . . . . . . . @ + ",
+") y z A ^ a 4 4 f B 1 C a ! l 5 t 0 D # # . . . . . . . . . @ + ",
+"= A E F G H I J w K L n K w M N t 0 D # . . . . . . . . . @ + . ",
+"O P Q R S T U V W X Y Y Y Y Y Z c 0 D . . . . . . . . . . @ + . ",
+"`  ...+. at .#.$.%.&.*.=.-.-.-.C E ;.! 3 . . . . . . . . . . @ + . ",
+">.,.'.).!.~.{.].^./.(.N N N @ ;.| ! 3 . . . . . . . . . @ + . . ",
+"_.:.<.[.}.|.1.2.3.4.5.6.@ @ o y | ! 3 . . . . . . . . . @ + . . ",
+"7.8.9.0.a.b.c.d.e.f.g.(.@ @ o y | ! 3 . . . . . . . . @ + . . . ",
+"h.i.j.k.l.m.n.o.p.q.r.M @ @ o y | ! 3 . . . . . . . @ + . . . . ",
+"s.t.u.v.w.x.y.z.A.B.C.A @ @ o y | ! 3 . . . . . . @ + . . . . . ",
+"D.E.F.G.H.I.J.K.L.M.N.E @ @ o y | ! 3 . . . . @ @ + . . . . . . ",
+"O.P.Q.R.S.T.U.V.W.X.Y.@ @ @ o y | ! 3 . @ @ @ + + Z.Z.Z.Z.Z.Z.Z.",
+"`. +.+++ at +#+$+%+&+*+P M M M { =+-+;+>+@ + + + Z.Z.Z.Z.Z.Z.Z.Z.Z.",
+",+'+)+!+~+{+]+^+/+(+O = ) = ` ) _+= :++ . . . . . . . . . . . . "};
diff --git a/src/CptecAccess/CptecAccess.cc b/src/CptecAccess/CptecAccess.cc
new file mode 100755
index 0000000..350983a
--- /dev/null
+++ b/src/CptecAccess/CptecAccess.cc
@@ -0,0 +1,238 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "CptecAccess.h"
+
+//#include <string.h>
+
+void CptecAccess::serve(MvRequest& in,MvRequest& out)
+{
+cout << "Entry CPTEC Access::serve..." << endl;
+in.print();
+
+   int i;
+
+   // Build the path
+   string spath;
+   if ( !buildPath(in,spath) )
+      return;
+
+   // Build the filename(s)
+   vector <string> vfiles;
+   if ( !buildFilenames(in,vfiles) )
+      return;
+
+   // Get the requested PARAMs
+   const char* caux;
+   int nparams = in.iterInit( "PARAMETER" );
+   map <string, int> params;
+   string param;
+   for ( i = 0; i < nparams; ++i )
+   {
+      in.iterGetNextValue( caux );
+      param = caux;
+      params[param] = 1;
+   }
+
+   // Get the requested LEVELs
+   int nlevels = in.iterInit( "LEVEL_LIST" );
+   map <long, int> levels;
+   double dlevel;
+   for ( i = 0; i < nlevels; ++i )
+   {
+     in.iterGetNextValue( dlevel );
+     levels[(long)dlevel] = 1;
+   }
+	
+   // Build the requested fieldset
+   // For each input file filter the requested fields by PARAM/LEVEL
+   // and add them to the output GRIB file
+
+   // Auxilliary variables for GribApi
+   char shortName[20];
+   size_t len;
+   int error=0;	
+   grib_handle* h=NULL;
+   grib_context* c=grib_context_get_default();
+
+   // Create the output file name
+   string outname(marstmp());
+   for ( i = 0; i < vfiles.size(); ++i )
+   {
+        // Full filename
+        string ffile = spath + vfiles[i];
+
+        // Open the input file
+        FILE* f = fopen(ffile.c_str(),"r");
+        if ( !f )
+        {
+             string error = "FILE NOT FOUND: ";
+             error += ffile.c_str();
+             setError(1, error.c_str());
+             return;
+        }
+
+        // Loop on all GRIB messages in file
+        long level;
+        while ((h=grib_handle_new_from_file(c,f,&error))!=NULL)
+        {
+            len=20;
+            grib_get_string(h,"shortName",shortName,&len);
+            param = string(shortName);
+            grib_get_long(h,"level",&level);
+            if (params.find(param) != params.end())
+            {
+                if (levels.find(level) != levels.end())
+                {
+                   cout << "Found PARAM " << param << " LEVEL " << level << " in " <<  vfiles[i] << endl;
+                   grib_write_message(h,outname.c_str(),"a");
+                }
+            }
+
+            grib_handle_delete(h);
+        }
+
+        fclose(f);
+   }
+
+   // Create output request
+   out.setVerb("GRIB");
+   out("PATH") = outname.c_str();
+out.print();
+
+   return;
+}
+
+bool CptecAccess::buildPath ( MvRequest& in, string& spath )
+{
+   // Build the path
+   // 1. Date/time related string
+   const char* date = in("DATE");
+   const char* time = in("TIME");
+   string yyyymm(date,6);
+   string dd(date,6,2);
+   string hh(time,2);
+   string sdate = yyyymm + '/' + dd + hh;
+
+//eta 20
+// /rede/eva01/modoper/tempo/regional/etap_20km/grbctl/2012/Jan/11
+
+//eta 15 - 1h
+// /rede/contg02/stornext/oper/tempo/Eta/ams_15km/temp/201201/1100/grib
+
+   // 2. Fixed part of the path. Try to get it from the 
+   // environment variable: METVIEW_CPTEC_ACCESS_PATH. 
+   // If not defined, use a default value.
+   const char* fpath = getenv("METVIEW_CPTEC_ACCESS_PATH");
+//   spath = fpath ? fpath : "/rede/tupa_tempo/";
+   spath = fpath ? fpath : "/mnt/";
+
+   // 3. Part of the path related to the model
+   const char* model = in("MODEL");
+   if ( strcmp(model,"ETA153") == 0 )
+     spath += "Eta/ams_15km/" + sdate + "/grbctl/";
+   else if ( strcmp(model,"ETA151") == 0 )
+//     spath += "Eta/ams_15km/temp/" + sdate + "/grib/";
+     spath += "eta15/stornext/oper/tempo/Eta/ams_15km/temp/" + sdate + "/grib/";
+   else if ( strcmp(model,"ETA20") == 0 )
+     spath += "eta20/modoper/tempo/regional/etap_20km/grbctl/";
+   else if ( strcmp(model,"GLOBAL") == 0 )
+     spath += "/";
+   else
+   {
+        string error = "ERROR: MODEL not recognized ";
+        setError(1, error.c_str());
+        return false;
+   }
+
+   return true;
+}
+
+bool CptecAccess::buildFilenames ( MvRequest& in, vector <string>& vfn )
+{
+   int i,j,k;
+
+   // Part of the filename related to the model
+   string smodel;
+   const char* model = in("MODEL");
+   if ( strcmp(model,"ETA153") == 0 || strcmp(model,"ETA151") == 0 )
+      smodel = "eta_15km_";
+   else if ( strcmp(model,"ETA20") == 0 )
+      smodel = "";
+   else if ( strcmp(model,"GLOBAL") == 0 )
+      smodel = "ll20gfsa";
+   else
+   {
+        string error = "ERROR: MODEL not recognized ";
+        setError(1, error.c_str());
+        return false;
+   }
+
+   // Get all values related to parameters DATE/TIME/STEP
+   double xx;
+   int ndates = in.iterInit( "DATE" );
+   vector <double> dates;
+   dates.reserve(ndates);
+   for ( i = 0; i < ndates; ++i )
+   {
+      in.iterGetNextValue( xx );
+      dates.push_back(xx);
+   }
+
+   int ntimes = in.iterInit( "TIME" );
+   vector <double> times;
+   times.reserve(ntimes);
+   for ( i = 0; i < ntimes; ++i )
+   {
+      in.iterGetNextValue( xx );
+      times.push_back(xx/100.); //hhmm
+   }
+
+   int nsteps = in.iterInit( "STEP" );
+   vector <double> steps;
+   steps.reserve(nsteps);
+   for ( i = 0; i < nsteps; ++i )
+   {
+      in.iterGetNextValue( xx );
+      steps.push_back(xx);
+   }
+
+   // Build all filenames
+   char buf[12];
+   for ( i = 0; i < ndates; i++ )
+   {
+      MvDate dd(dates[i]);
+      for ( j = 0; j < ntimes; j++ )
+      {
+         // Analise time stamp string
+	 MvDate danal = dd + times[j]/24.;
+	 danal.Format("yyyymmddHH",buf);
+         string cs = smodel + buf + '+';
+
+         // Forecast time stamp string
+         for ( k = 0; k < nsteps; k++ )
+         {
+            // Forecast date
+	    MvDate dfore = danal + steps[k]/24.;
+	    dfore.Format("yyyymmddHH",buf);
+            vfn.push_back(cs + buf + ".grb");
+	 }
+      }
+   }
+
+   return true;
+}
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	CptecAccess data("CPTEC_ACCESS");
+
+	theApp.run();
+}
diff --git a/src/CptecAccess/CptecAccess.h b/src/CptecAccess/CptecAccess.h
new file mode 100755
index 0000000..e87fbb8
--- /dev/null
+++ b/src/CptecAccess/CptecAccess.h
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef CPTECACCESS_H
+#define CPTECACCESS_H
+
+/************************************************************
+  Application CptecAccess
+
+  Access GRIB/BUFR data from CPTEC's storage directories
+************************************************************/
+#include <Metview.h>
+//#include <sys/types.h>
+//#include <sys/stat.h>
+
+class CptecAccess : public MvService {
+public:
+
+     CptecAccess(char *name) : MvService(name) {};
+     void serve(MvRequest&,MvRequest&);
+
+     // Build the path
+     bool buildPath(MvRequest&, string&);
+
+     // Build the filenames
+     bool buildFilenames(MvRequest&, vector <string>& );
+};
+
+#endif
diff --git a/src/CptecAccess/CptecAccessDef b/src/CptecAccess/CptecAccessDef
new file mode 100755
index 0000000..051b778
--- /dev/null
+++ b/src/CptecAccess/CptecAccessDef
@@ -0,0 +1,70 @@
+#
+#          CPTEC ACCESS EDITOR: definition file
+#
+CPTEC_ACCESS
+{
+  MODEL
+  {
+    ETA_15Km_1h    ; ETA151
+    ETA_15Km_3h    ; ETA153
+    ETA_20Km       ; ETA20
+    GLOBAL         ; GLOBAL
+  } = ETA_15Km_1h
+
+  LEVTYPE
+  {
+    SURFACE        ;  01
+    10_METER       ; 105
+    PRESSURE_LEVEL ; 100
+    MODEL_LEVEL    ; 107
+  } = 100
+
+  LEVELIST
+  {
+    *
+    /
+  } = 1000/850/700/500/300
+
+  PARAM
+  {
+    @
+    /
+  } = Z
+
+  DATE
+  {
+     JANUARY      ;   JAN
+     FEBRUARY     ;   FEB
+     MARCH        ;   MAR
+     APRIL        ;   APR
+     MAY          ;   MAY
+     JUNE         ;   JUN
+     JULY         ;   JUL
+     AUGUST       ;   AUG
+     SEPTEMBER    ;   SEP
+     OCTOBER      ;   OCT
+     NOVEMBER     ;   NOV
+     DECEMBER     ;   DEC
+     *   
+     CURRENT DATE ; 0
+     YESTERDAY    ; -1
+     TO           ; TO
+     BY           ; BY
+     /
+     OFF
+  } = CURRENT DATE
+
+  TIME
+  {
+    *
+    /
+  } = 0
+
+  STEP
+  {
+    TO  ;   TO
+    BY  ;   BY    
+    /
+    *   
+    } = 00
+}
diff --git a/src/CptecAccess/CptecAccessRules b/src/CptecAccess/CptecAccessRules
new file mode 100755
index 0000000..932b798
--- /dev/null
+++ b/src/CptecAccess/CptecAccessRules
@@ -0,0 +1 @@
+# Empty file
diff --git a/src/CptecAccess/Makefile.am b/src/CptecAccess/Makefile.am
new file mode 100755
index 0000000..6166f7a
--- /dev/null
+++ b/src/CptecAccess/Makefile.am
@@ -0,0 +1,36 @@
+bin_PROGRAMS = bin/CptecAccess
+
+bin_CptecAccess_SOURCES  = CptecAccess.cc CptecAccess.h
+bin_CptecAccess_CPPFLAGS = -I../libUtil
+bin_CptecAccess_LDFLAGS =
+bin_CptecAccess_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_CptecAccess_DEPENDENCIES =
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.CptecAccess \
+                 $(local_sharedir)/CptecAccessDef $(local_sharedir)/CptecAccessRules
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+
+icons:
+	${INSTALL} CPTECACCESS.xpm $(local_iconsdir)
+
+
+CLEANFILES = $(share_DATA) \
+             $(local_iconsdir)/CPTECACCESS.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.CptecAccess \
+             CPTECACCESS.xpm CptecAccessDef CptecAccessRules
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/CptecAccess/Makefile.in b/src/CptecAccess/Makefile.in
new file mode 100644
index 0000000..ea5bd59
--- /dev/null
+++ b/src/CptecAccess/Makefile.in
@@ -0,0 +1,732 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/CptecAccess$(EXEEXT)
+subdir = src/CptecAccess
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_CptecAccess_OBJECTS = bin_CptecAccess-CptecAccess.$(OBJEXT)
+bin_CptecAccess_OBJECTS = $(am_bin_CptecAccess_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_CptecAccess_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_CptecAccess_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_CptecAccess_SOURCES)
+DIST_SOURCES = $(bin_CptecAccess_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_CptecAccess_SOURCES = CptecAccess.cc CptecAccess.h
+bin_CptecAccess_CPPFLAGS = -I../libUtil
+bin_CptecAccess_LDFLAGS = 
+bin_CptecAccess_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_CptecAccess_DEPENDENCIES = 
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.CptecAccess \
+                 $(local_sharedir)/CptecAccessDef $(local_sharedir)/CptecAccessRules
+
+CLEANFILES = $(share_DATA) \
+             $(local_iconsdir)/CPTECACCESS.xpm
+
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.CptecAccess \
+             CPTECACCESS.xpm CptecAccessDef CptecAccessRules
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/CptecAccess/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/CptecAccess/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/CptecAccess$(EXEEXT): $(bin_CptecAccess_OBJECTS) $(bin_CptecAccess_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/CptecAccess$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_CptecAccess_LINK) $(bin_CptecAccess_OBJECTS) $(bin_CptecAccess_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_CptecAccess-CptecAccess.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_CptecAccess-CptecAccess.o: CptecAccess.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_CptecAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_CptecAccess-CptecAccess.o -MD -MP -MF $(DEPDIR)/bin_CptecAccess-CptecAccess.Tpo -c -o bin_CptecAccess-CptecAccess.o `test -f 'CptecAccess.cc' || echo '$(srcdir)/'`CptecAccess.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_CptecAccess-CptecAccess.Tpo $(DEPDIR)/bin_CptecAccess-CptecAccess.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CptecAccess.cc' object='bin_CptecAccess-CptecAccess.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_CptecAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_CptecAccess-CptecAccess.o `test -f 'CptecAccess.cc' || echo '$(srcdir)/'`CptecAccess.cc
+
+bin_CptecAccess-CptecAccess.obj: CptecAccess.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_CptecAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_CptecAccess-CptecAccess.obj -MD -MP -MF $(DEPDIR)/bin_CptecAccess-CptecAccess.Tpo -c -o bin_CptecAccess-CptecAccess.obj `if test -f 'CptecAccess.cc'; then $(CYGPATH_W) 'CptecAccess.cc'; else $(CYGPATH_W) '$(srcdir)/CptecAccess.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_CptecAccess-CptecAccess.Tpo $(DEPDIR)/bin_CptecAccess-CptecAccess.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CptecAccess.cc' object='bin_CptecAccess-CptecAccess.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_CptecAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_CptecAccess-CptecAccess.obj `if test -f 'CptecAccess.cc'; then $(CYGPATH_W) 'CptecAccess.cc'; else $(CYGPATH_W) '$(srcdir)/CptecAccess.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} CPTECACCESS.xpm $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/CptecAccess/ObjectSpec.CptecAccess b/src/CptecAccess/ObjectSpec.CptecAccess
new file mode 100755
index 0000000..a714557
--- /dev/null
+++ b/src/CptecAccess/ObjectSpec.CptecAccess
@@ -0,0 +1,22 @@
+object,
+    class            = CPTEC_ACCESS,
+    type             = Data,
+    can_be_created   = True,
+    definition_file  = '$METVIEW_DIR_SHARE/etc/CptecAccessDef',
+    rules_file       = '$METVIEW_DIR_SHARE/etc/CptecAccessRules',
+    default_name     = 'CPTEC Access',
+    macro            = cptec_access,
+    expand           = 528,  #EXPAND_DEFAULTS|EXPAND_2ND_NAME
+    editor_type      = SimpleEditor,
+    pixmap           = '$METVIEW_DIR_SHARE/icons/CPTECACCESS.icon'
+
+state,
+    class            = CPTEC_ACCESS,
+    output_class     = GRIB/BUFR/IMAGE,
+    service          = CptecAccess
+
+service,
+    timeout  = $timeout,
+    cmd      = '$metview_command $METVIEW_BIN/CptecAccess',
+    name     = 'CptecAccess',
+    fullname = CptecAccess
diff --git a/src/Datacoverage/Datacoverage.cc b/src/Datacoverage/Datacoverage.cc
new file mode 100644
index 0000000..194643f
--- /dev/null
+++ b/src/Datacoverage/Datacoverage.cc
@@ -0,0 +1,653 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Datacoverage.h"
+
+
+/////////// Checks whether an obs is satelite or not.
+int is_sat(int subtype)
+{
+  return  ( (subtype >= 61 && subtype <= 65) ||
+	   (subtype >= 71 && subtype <= 75)  ||
+	   (subtype >= 82 && subtype <= 88)  ||
+	   (subtype >= 121 && subtype <= 127)  ||
+	   subtype == 51 || subtype == 53 );
+}
+
+// Default constructor.
+CoverageService::CoverageService() : MvService("DATACOVERAGE"),
+				     nr_total(0),
+				     cutoff(0),
+				     check_time(),
+				     in_time(),
+				     numbers(10,0),
+				     plot_ss(1),
+				     subtype_nrs(),
+				     descriptors(),
+				     late_check(0)
+{}
+
+
+void CoverageService::serve(MvRequest& in, MvRequest& out)
+{
+  char *fname = marstmp();
+  Cached plotss;
+  long ymd,hour;
+  int i = 0;
+
+  // Print incoming request.
+  in.print();
+
+  MvObsSet *in_set;
+  MvRequest symb;
+  MvRequest mars_in;
+  MvRequest data_req;
+
+  // Reset members to defaults.
+  descriptors.erase(descriptors.begin(),descriptors.end() );
+  subtype_nrs.erase(subtype_nrs.begin(),subtype_nrs.end() );
+  plot_ss = 1;
+  nr_total = cutoff = late_check = 0;
+
+
+  in_req = in;
+
+  // Get any types given by user. This is useful if data is
+  // read from a file containing types that should not be
+  // processed ( could be filtered by ObsFilter instead).
+  long mytype = -1;
+  if  ( in_req.countValues("SUBTYPE") > 0 )
+    {
+      sendProgress("Filtering by SUBTYPE field is no longer supported.");
+      sendProgress("Use ObsFilter prior to calling Datacoverage");
+    }
+  in_req.getValue(data_req, "DATA");
+
+  // Get the symbol values.
+  symb = in_req.getSubrequest("SYMBOL");
+  const char* verb = symb.getVerb();
+  if( ! verb )
+    {
+      symb = MvRequest( "PSYMB" );
+      symb( "SYMBOL_TYPE" ) = "MARKER";
+    }
+
+
+  // Check if reference date, time and and cutoff for plotting late obs. is given.
+  const char *chour,*cymd;
+  chour   = in_req("CHECKING_TIME");
+  cymd    = in_req("CHECKING_DATE");
+
+  if ( chour && cymd )
+    {
+      hour = atol(chour);
+      ymd  = atol(cymd);
+      late_check = 1;
+      TDynamicTime tmp_time(ymd,hour);
+      in_time = tmp_time;
+      cutoff = (int)in("CUTOFF_TIME_IN_MINUTES");
+      if ( cutoff > 0 )
+	{
+	  check_time = in_time;
+	  check_time.ChangeByMinutes(cutoff);
+	}
+    }
+  else
+    {
+      sendProgress("Datacoverage: Late observations not plotted.");
+      sendProgress("Datacoverage: To plot late obs, set values for \
+'Checking Date/Time' and Cutoff.");
+    }
+
+
+  // Check if all subsets should be plotted for multi subset messages.
+  in_req.getValue(plotss,"PLOT_SUBSETS");
+  if ( plotss == Cached("OFF") ) plot_ss = 0;
+
+
+  // Check if any descriptors is given for quality checking. Default is
+  // to plot the lowest in the whole message. If any descriptors are given,
+  // only the quality of these will be checked, and the lowest value used.
+  for ( i = 0; i < in_req.countValues("DESCRIPTORS_TO_CHECK");i++ )
+    descriptors.push_back((long)in_req("DESCRIPTORS_TO_CHECK",i));
+
+
+
+  // Construct the MvObsSet from the data request.
+  in_set = new MvObsSet( data_req );
+
+  // If write_values is OK, complete the out request.
+  if ( write_values(fname,*in_set) )
+    {
+      MvRequest geo( "GEOPOINTS" );
+      geo( "TEMPORARY" ) = 1;
+      geo( "PATH" ) = fname;
+      geo("ORIGINAL_BUFR_FILE") = data_req("PATH");
+
+      generate_info_str(geo,"TITLE");
+
+      if ( (const char *)in_req("_NAME") )
+	geo("_NAME") = in_req("_NAME");
+
+      set_legend_values(symb);
+
+      // Add some text to output request.
+      MvRequest text("PTEXT");
+      text( "TEXT_AUTOMATIC" ) = Cached( "NO");
+      text( "TEXT_USER" )      = Cached( "YES");
+      text( "TEXT_COLOUR" )  = "BLACK";
+
+      generate_info_str(text, "TEXT_LINE_1");
+
+      text("LEGEND_TEXT_MAXIMUM_HEIGHT") = 0.2;
+      text("LEGEND_TEXT_QUALITY") = "MEDIUM";
+
+      int columnCount = in_req( "LEGEND_COLUMN_COUNT" );
+      if( columnCount > 0 )
+	text( "LEGEND_COLUMN_COUNT" ) = columnCount;
+
+      out = geo + symb + text;
+
+    }
+
+  // Print outgoing request
+  out.print();
+} //------------------------------------------------ End serve
+
+//------------------------------------------------------------------ write_values
+// Writes values to geopoints file.
+int CoverageService::write_values(char *fname,MvObsSet &obs_set)
+{
+  MvObsSetIterator obs_iter (obs_set);
+  MvObs obs;
+  ofstream outfile;
+  int nr_subsets;
+  int i;
+
+  outfile.open(fname,ios::out);
+  outfile << "#GEO" << endl;
+  outfile << "#DATA" << endl;
+
+  const long lat_fine  = 5001;
+  const long lat_coarse = 5002;
+  const long lon_fine = 6001;
+  const long lon_coarse = 6002;
+  fortfloat f_long, f_lat;
+
+  int symbol;
+  int sec2_msg = 0;
+  while ( obs = obs_iter(NR_returnMsg) )
+    {
+
+      ObsValues values(obs,cutoff,check_time,plot_ss,descriptors,late_check);
+
+      if ( !sec2_msg && !obs.hasSection2() )
+     	{
+	  sendProgress("Datacoverage: Some messages have no section 2, plotted as Unknown");
+	  sec2_msg = 1;
+	}
+
+      if ( plot_ss )
+	nr_subsets = obs.msgSubsetCount();
+      else
+	nr_subsets = 1;
+
+      i = 1;
+
+      for(;;)
+	{
+	  // Use descriptor for coarse or fine lat/lon, whatever is found.
+	  if ( (f_lat = obs.value(lat_fine) ) ==  kBufrMissingValue)
+	    f_lat = obs.value(lat_coarse);
+      	  if ( (f_long = obs.value(lon_fine) ) ==  kBufrMissingValue)
+	    f_long = obs.value(lon_coarse);
+
+
+	  symbol = values.get_symbol(obs,subtype_nrs);
+	  numbers[symbol]++;
+
+	  //cout << f_lat << "\t\t" << f_long << "\t\t" << symbol << endl;
+	  outfile << f_lat << " " << f_long ;
+	  outfile << " 0  0 0 " << symbol << endl;
+	  nr_total++;
+	  if ( i++ == nr_subsets ) break;
+	  obs = obs_iter();
+	}
+    }
+
+  // Close geopoints file.
+  outfile.close();
+  return 1;
+} //------------------------------------------------------ End write_values
+
+
+//-------------------------------------------------------- set_legend_values
+// Set the legend values based on what the subtypes are.
+void CoverageService::set_legend_values(MvRequest &s)
+{
+  char buf[150],lg_txt_buf[30];
+
+  s("LEGEND") = "ON";
+  s("LEGEND_TITLE") = "OFF";
+  s("LEGEND_TEXT_COLOUR") = "BLACK";
+  s("LEGEND_TEXT_QUALITY")= "HIGH";
+  s("LEGEND_TEXT_COMPOSITION")= "USER_TEXT_ONLY";
+
+
+  int txt_nr = 0;
+
+  // Check is late observations are plotted.
+  if ( late_check )
+    sprintf(buf,"LATE : %d",numbers[LATE]);
+  else
+    sprintf(buf,"LATE NOT PLOTTED");
+
+  sprintf(lg_txt_buf,"LEGEND_USER_TEXT_%d",++txt_nr);
+  s(lg_txt_buf)= buf;
+
+
+  // Check the subtype values to see if all is well.
+  map<int,int,less<int> >::iterator ii = subtype_nrs.begin();
+  int stype = (*ii).first;
+  int found_sat = 0, found_conv = 0;
+
+  for (; ii != subtype_nrs.end(); ii++ )
+    {
+
+      if ( is_sat((*ii).first) ) found_sat = 1;
+      else found_conv = 1;
+    }
+
+  if ( found_sat && found_conv )
+    {
+      sendProgress("Datacoverage: Plotting of satelite and conventional together not supported");
+      sendProgress("Datacoverage: Results are not meaningful, satelite data plotted by ident");
+    }
+
+
+  // Use the type of the first type found when generating the legend.
+  if ( is_sat(stype ) )
+    {
+      // Satelite, loop thru info from headerfile to plot the legend.
+      for (int i = 0; i < NUMBER(ident_info); i++ )
+	{
+	  if ( stype >= ident_info[i].st_min &&
+	      stype <= ident_info[i].st_max )
+	    {
+	      sprintf(lg_txt_buf,"LEGEND_USER_TEXT_%d",ident_info[i].flag);
+	      sprintf(buf," %s : %d",ident_info[i].txt,
+		      numbers[ident_info[i].flag]);
+	      s(lg_txt_buf)= buf;
+	      txt_nr++;
+	    }
+	}
+    }
+  else
+    {
+      // Conventional, legends should have qc ranges.
+      s("LEGEND_TITLE") = "ON";
+      if ( descriptors.size() > 0 )
+	{
+	  char tmpstr[10];
+	  sprintf(buf,"Confidence values for data descriptors : ");
+	  for (int i = 0; i < descriptors.size();i++)
+	    {
+	      if ( i > 0 ) strcat(buf,"/");
+	      sprintf(tmpstr,"%d",descriptors[i]);
+	      strcat(buf,tmpstr);
+	    }
+	}
+      else
+	sprintf(buf,"Confidence values for all descriptors");
+
+      s("LEGEND_TITLE_TEXT") = buf;
+
+      sprintf(buf,"%% CONF GT 70: %d",numbers[2]);txt_nr++;
+      s("LEGEND_USER_TEXT_2") = buf;
+      sprintf(buf,"%% CONF 70-50: %d",numbers[3]);txt_nr++;
+      s("LEGEND_USER_TEXT_3") = buf;
+      sprintf(buf,"%% CONF 50-30: %d",numbers[4]);txt_nr++;
+      s("LEGEND_USER_TEXT_4") = buf;
+      sprintf(buf,"%% CONF LT 30: %d",numbers[5]);txt_nr++;
+      s("LEGEND_USER_TEXT_5") = buf;
+    }
+
+
+  // Fill all legend entries up to UNKNOWN with text not used.
+  for (int j = txt_nr; j < (UNKNOWN -1 );j++)
+    {
+      sprintf(buf,"(not used)");
+      sprintf(lg_txt_buf,"LEGEND_USER_TEXT_%d",++txt_nr);
+      s(lg_txt_buf)= buf;
+    }
+  sprintf(buf,"UNKNOWN : %d",numbers[UNKNOWN]);
+  sprintf(lg_txt_buf,"LEGEND_USER_TEXT_%d",++txt_nr);
+  s(lg_txt_buf)= buf;
+
+  check_symbol_table_modes( s, txt_nr );
+
+ } //----------------------------------------------- End set_legend_values
+
+//----------------------------------------------------- check_symbol_table_mode
+
+void CoverageService::check_symbol_table_modes( MvRequest& symb, int table_size )
+{
+  cout << "original PSYMB:" << endl;
+  symb.print();
+  MvRequest s = symb;
+
+  int cnt = symb.countValues( "SYMBOL_TABLE_MODE" );
+  if( cnt==0 )
+    {
+      s( "SYMBOL_TABLE_MODE" ) = "ON";
+      sendProgress( "SYMBOL_TABLE_MODE not set, using default values" );
+    }
+
+  check_one_symbol_table( s, symb, "SYMBOL_MIN_TABLE", default_min_table, table_size );
+  check_one_symbol_table( s, symb, "SYMBOL_MAX_TABLE", default_max_table, table_size );
+  check_one_symbol_table( s, symb, "SYMBOL_MARKER_TABLE", default_marker_table, table_size );
+  check_one_symbol_table( s, symb, "SYMBOL_HEIGHT_TABLE", default_height_table, table_size );
+
+  cnt = symb.countValues( "SYMBOL_COLOUR_TABLE" );
+  if( cnt != table_size )
+    {
+      if( cnt > 0 )
+	s.setValue( "SYMBOL_COLOUR_TABLE", (const char*)symb("SYMBOL_COLOUR_TABLE") );
+      else
+	s.setValue( "SYMBOL_COLOUR_TABLE", default_colour_table[0] );
+
+      //-- not to access beyond table size --
+      int def_size = sizeof( default_min_table ) / sizeof( default_min_table[0] );
+
+      for( int i=1; i < table_size; ++i )
+	{
+	  if( i < cnt )
+	    s.addValue( "SYMBOL_COLOUR_TABLE", (const char*)symb("SYMBOL_COLOUR_TABLE", i) );
+	  else
+	    s.addValue( "SYMBOL_COLOUR_TABLE", default_colour_table[ i % def_size ] );
+	}
+    }
+
+  symb = s;
+  cout << "adjusted PSYMB:" << endl;
+  symb.print();
+}
+
+void CoverageService::check_one_symbol_table( MvRequest& new_req,
+					      MvRequest& old_req,
+					      const char* param,
+					      double* defaults,
+					      int table_size )
+{
+  int cnt = old_req.countValues( param );
+  if( cnt != table_size )
+    {
+      if( cnt > 0 )
+	new_req.setValue( param, (double)old_req(param) );
+      else
+	new_req.setValue( param, defaults[0] );
+
+      //-- not to access beyond table size --
+      int def_size = sizeof( default_min_table ) / sizeof( default_min_table[0] );
+
+      for( int i=1; i < table_size; ++i )
+	{
+	  if( i < cnt )
+	    new_req.addValue( param, (double)old_req(param, i) );
+	  else
+	    new_req.addValue( param, defaults[ i % def_size ] );
+	}
+    }
+}
+
+//------------------------------------------------------- generate_info_str
+// Generate the title string.
+void CoverageService::generate_info_str(MvRequest &t,char *mag_dir)
+{
+
+  char buf[300];
+  ostrstream ost(buf,300);
+  int i = 0;
+
+  // If checking time given, print time and cutoff.
+  if ( late_check )
+    ost << "Ref.date: " << format_date(in_time) << " Cutoff : " << cutoff;
+  else
+    ost << "No ref.date ";
+
+  ost << " Types : " ;
+
+
+  // Plot the obs.types. Only types having data are plotted( with nr. of values).
+  map<int,int,less<int> >::iterator ii;
+  for (i=0,ii = subtype_nrs.begin();ii != subtype_nrs.end();ii++,i++)
+    {
+      if (i > 0 ) ost << "/";
+      ost << (*ii).first << "(" << (*ii).second << ")";
+    }
+
+  ost << "  Total : " << nr_total << " Plotted at ";
+  TDynamicTime current;
+  ost << format_date(current) << ends;
+
+  t(mag_dir)  = buf;
+} //------------------------------------------------ End generate_info_str
+
+//--------------------------------------------------------- format_date
+// Return a date as a formatted string.
+char * CoverageService::format_date(const TDynamicTime &tt)
+{
+  static char buf[30];
+
+  sprintf(buf,"%d-%02d-%02d %02d:%02d", tt.GetYear(), tt.GetMonth(),
+      tt.GetDay(), tt.GetHour(), tt.GetMin() ); //-- ISO date format
+  return buf;
+} //-------------------------------------------------------- End format_date
+
+
+//////////////////////////////// Class ObsValues //////////////////
+ObsValues::ObsValues( MvObs &obs,int cutoff,TDynamicTime c_time,int pss,
+		     vector<long> &descs,int late_check) : check_time(c_time),
+		     plot_ss(pss),descriptors(descs)
+
+{
+  long bword = 32;
+  long wordnr,dd,hh,mm,ss,qc;
+  long skip,extract,ierr;
+
+  itype = obs.messageType();
+  isbtype = obs.messageSubtype();
+  const long satid_desc = 1007;
+  ident = 0;
+  sec2_conf = -1;
+  late = 0;
+
+  if (  obs.hasSection2() )
+    {
+      long *sec2 = ( long *)obs.section2Ptr();
+
+      if (is_sat(isbtype) )
+	ident = obs.value(satid_desc);
+      else
+	ident = obs.WmoIdentNumber();
+
+      // Unpack needed values from section 2.
+      // Day,hour,minute and sec
+      wordnr = 9; skip = 16;extract = 6;
+      unpack(bword,sec2 + wordnr,&dd,wordnr,skip,extract,ierr);
+      extract = 5;
+      unpack(bword,sec2 + wordnr,&hh,wordnr,skip,extract,ierr);
+      extract = 6;
+      unpack(bword,sec2 + wordnr,&mm,wordnr,skip,extract,ierr);
+      unpack(bword,sec2 + wordnr,&ss,wordnr,skip,extract,ierr);
+
+      // Lowest quality control.
+      wordnr = 12; skip = 0; extract = 8;
+      unpack(bword,sec2 + wordnr,&qc,wordnr,skip,extract,ierr);
+      sec2_conf = (int)qc;
+      //cout << "QC from sec 2 is " << sec2_conf << endl;
+
+
+      if ( late_check && cutoff > 0 )
+	{
+	  TDynamicTime obs_time = obs.msgTime();
+	  TDynamicTime reb_time(obs_time.GetYear(),obs_time.GetMonth(),dd,hh,mm,ss);
+	  if ( reb_time.GetHour() < obs_time.GetHour() &&
+	      obs_time.DifferenceInMinutes(reb_time) > 10 )
+	    reb_time.ChangeByDays(1);
+
+	  //cout << "Obs_time "; obs_time.Print();
+	  //cout << " Reb time "; reb_time.Print(); cout  << endl;
+
+	  if ( reb_time > check_time )
+	    {
+	      late = 1;
+	    }
+	}
+    }
+
+}
+
+int ObsValues::get_symbol( MvObs &obs,map<int,int,less<int> > & stypes)
+{
+  int iflag = UNKNOWN;
+
+  // Update the numbers for all subsets.
+  stypes[isbtype]++;
+
+  if ( late )
+    return LATE;
+
+  if( is_sat( isbtype ) )
+    {
+      // match subtype and ident against the satelite types
+      // and set iflag to matching flag.
+      for ( int i = 0; i < NUMBER(ident_info); i++ )
+	{
+	  if ( isbtype >= ident_info[i].st_min &&
+	       isbtype <= ident_info[i].st_max )
+	    {
+	      if ( ident >= ident_info[i].i_min &&
+		   ident <= ident_info[i].i_max )
+		{
+		  iflag = ident_info[i].flag;
+		  break;
+		}
+	    }
+	}
+    }
+  else
+    {
+      // Not a satelite type, plotting conf. values.
+      int qc = get_conf_value(obs);
+      if ( qc < 0 ) iflag = UNKNOWN;
+      else if ( qc >= 70 ) iflag = 2;
+      else if (qc < 70 && qc >= 50 ) iflag=3;
+      else if (qc < 50 && qc >= 30 ) iflag=4;
+      else if (qc < 30 && qc >= 0  ) iflag=5;
+    }
+
+  return iflag;
+
+} //------------------------------------------------------- End get_symbol
+
+// Get the confidence value to use, either for given descriptors or for whole
+// message.
+int ObsValues::get_conf_value( MvObs &obs)
+{
+  int lowest = 101,tmp_val;
+
+  if ( !plot_ss && sec2_conf >= 0 )
+    lowest = sec2_conf;
+
+  else if ( descriptors.size() > 0 )
+    {
+      int found = 0;
+      for ( int i = 0; i < descriptors.size();i++ )
+	{
+	  // Just used to set current descriptor.
+	  obs.elementValueType(descriptors[i]);
+
+	  if ( obs.hasConfidences() )
+	    tmp_val = obs.confidence();
+
+	  if ( tmp_val < lowest && tmp_val >= 0 )
+	    {
+	      found = 1;
+	      lowest = tmp_val;
+	    }
+	}
+
+      if ( !found ) // The given descriptor(s) does not exist,plot as unknown.
+	lowest = -1;
+
+    }
+  else  // No descriptors given, plot lowest in message.
+    {
+      boolean ok = obs.setFirstDescriptor();
+
+      while( ok )
+	{
+
+	  if ( obs.hasConfidences() )
+	    tmp_val = obs.confidence();
+
+	  if ( tmp_val < lowest && tmp_val >= 0 )
+	    lowest = tmp_val;
+
+	  ok = obs.setNextDescriptor();
+	}
+    }
+
+  if ( lowest > 100 )   // No confidences found, use one from sec2;
+    lowest = sec2_conf;
+
+  return lowest;
+}
+
+//--------------------------------------------------------- unpack
+// Unpack section 2 key values
+void ObsValues::unpack(long &bword,long *src,long *target,
+                          long &wordnr, long &skip,long &extract,
+                          long &ierr)
+{
+  long kw;
+
+  if ( extract > bword )
+    {
+      cerr << "Number of bits to extract longer than computer word" << endl;
+      ierr = 3;
+      return;
+    }
+
+  gbyte_(src,target,skip,extract);
+
+  skip += extract;
+
+  if ( skip > bword)
+    {
+      kw = skip / bword;
+      skip = skip - ( kw * bword);
+      wordnr += kw;
+    }
+} //------------------------------------------------------- End unpack
+
+//////////////////////////////////////////////////////////////////////// main
+int main (int argc, char **argv)
+{
+  MvApplication theApp(argc, argv);
+
+  CoverageService Datacoverage;
+
+  Datacoverage.saveToPool(false);
+
+  theApp.run();
+
+  return 0;
+}
diff --git a/src/Datacoverage/Datacoverage.h b/src/Datacoverage/Datacoverage.h
new file mode 100644
index 0000000..5ac7562
--- /dev/null
+++ b/src/Datacoverage/Datacoverage.h
@@ -0,0 +1,190 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// -*-C++-*- ( needed by emacs to go to c++ mode)
+#ifndef DATACOVERAGE_H
+#define DATACOVERAGE_H
+/*
+   DATACOVERAGE
+
+   This program gets the data from a mars request or file.
+   If the user specifies checking time/date and cutoff,
+   the data will be plotted as late against the cutoff time.
+   If not, the arrival time is ignored, and quality control
+   values( for conv. data) or idents ( for sat.data) will be
+   plotted.
+   Plotting of late arrivals override qc or ident values.
+
+   The retrieved data is processed using the MvObs* classes.
+   All the obs. are processed, and for each obs ( and subset
+   if that is switched on) a line in a geopoints are produced.
+   The symbol in the geopoints file are based on the contents
+   of the obs. Late obs are marked, and for non-satelite data
+   the data are grouped by % confidence. Satelite data are
+   grouped by satelite id.
+
+   If the data contains both satelite and conv. data, they will
+   both be processed. The legend will reflect the values for
+   the first type in the field, so for data not matching this
+   main type ( satelite vs conv), the legend will be wrong. A
+   message is printed saying that satelite and conv. data should
+   not be printed together.
+*/
+
+#include <inc_iostream.h>
+#include <inc_stl.h>
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <Metview.h>
+#include <unistd.h>
+#include <time.h>
+#include "MvObs.h"
+
+#define NUMBER(a)    (sizeof(a)/sizeof(a[0]))
+enum {LATE = 1,UNKNOWN = 7 };
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define gbyte_ gbyte
+#endif
+
+
+struct Ident_info
+{
+  int st_min,st_max;
+  int i_min,i_max;
+  int flag;
+  char *txt;
+};
+
+// Change here to add new subtypes/idents for satelite data.
+// The fields are :
+// subtype_min,subtype_max,ident_min,ident_max,flag,text
+
+// subtype_min and subtype_max are often the same, if given
+// as a range it's inclusive ( same for idents).
+// Flag is a value from 2 upwards ( 1 is used for late data).
+
+// Note that if more than 4 ident ranges is given for the
+// same subtype range, the UNKNOWN value above must be
+// increased. Currently late is plotted with flag 1, qc values
+// or idents from flag 2-5, and unknown as flag 6.
+// More symbol markers/colors should also be added to the editor's
+// attached symbol plot.
+//
+
+Ident_info  ident_info[] =
+{
+  { 51,53,206,206,2, "SAT 206 NOAA-14" },
+  { 51,53,202,202,3, "SAT 202 NOAA-12" },
+  { 51,53,201,201,4, "SAT 201 NOAA-11" },
+
+  { 61,63,239,239,2, "SAT 206 NOAA-14" },
+  { 61,63,237,237,3, "SAT 202 NOAA-12" },
+  { 61,63,236,236,4, "SAT 201 NOAA-11" },
+
+  { 71,73,245,245,2, "SAT 245 DMSP-12" },
+  { 71,73,246,246,3, "SAT 246 DMSP-13" },
+
+
+  { 82,88,0,   99,2, "METEOSAT" },
+  { 82,88,100,199,3, "HIMAWARI"},
+  { 82,88,200,299,4, "GOES"},
+  { 82,88,400,499,5, "INSAT"},
+//Sylvie Lamy-Thepaut : add setting for MODIS...
+// Increase the value of the unknown ... Change the default symbol
+// to add an entry...
+  { 87,87,783,784,6, "MODIS"},
+
+  {121,124,2,2,2, "ERS-2" },
+
+  {126,126,204,204,2, "SAT 204" },
+  {126,126,246,246,3, "SAT 246 DMSP" },
+
+
+  {127,127,246,246,2, "SAT 246 DMSP" },
+  {127,127,245,245,3, "SAT 245 DMSP" },
+};
+
+//-- symbol_table goes with the one in DatacoverageDef.
+//-- These values will be used if user PSYMB contains
+//-- too few table values                (030929/vk)
+
+double default_min_table[]    = {1,2,3,4,5,  6,7,8, 9,10,  11,12,13,14,15};
+double default_max_table[]    = {2,3,4,5,6,  7,8,9,10,11,  12,13,14,15,16};
+
+double default_marker_table[] = { 0,18, 2, 6, 5,
+				  3, 7, 9,10,15,
+				 17,19,20,12, 8};
+
+double default_height_table[] = {0.18,0.12,0.12,0.12,0.12,
+				 0.12,0.12,0.12,0.12,0.12,
+				 0.12,0.12,0.12,0.12,0.12};
+
+char*  default_colour_table[] = {"RED","BLUE","BLACK","MAGENTA","ORANGE",
+				 "EVERGREEN","GREY","BRICK","BLUE_PURPLE","GOLD",
+				 "GREENISH_BLUE","LAVENDER","MUSTARD","REDDISH_PURPLE","TANGERINE"};
+
+
+// The program unpacks the key manually.
+extern "C" {
+int gbyte_(long*,long*,long&,long&);
+}
+
+//--------------------------------------------- CoverageService ----
+class CoverageService : public MvService {
+public:
+  CoverageService();
+  void serve (MvRequest&, MvRequest&);
+
+private:
+  // Process data and generate geopoints file.
+  int write_values(char *,MvObsSet& );
+
+  // Set data related MAGICS values for plot.
+  void check_symbol_table_modes( MvRequest&, int );
+  void check_one_symbol_table( MvRequest&, MvRequest&, const char*, double*, int );
+  void set_legend_values(MvRequest &);
+  void generate_info_str(MvRequest &,char *);
+  char *format_date(const TDynamicTime &);
+
+
+  // Data members.
+  MvRequest in_req;
+  vector<int> numbers;
+  int cutoff,nr_total,plot_ss;
+  map<int,int,less<int> > subtype_nrs;
+  vector<long> descriptors;
+  TDynamicTime check_time,in_time;
+  int late_check;
+};
+//--------------------------------------------------------------------------------
+
+
+//------------------------------------------------ Utility class ObsValues
+// Called for every message that needs to be processed.
+class ObsValues
+{
+
+public:
+  ObsValues( MvObs &,int,TDynamicTime,int,vector<long>&,int );  // Called at start of a msg.
+  int get_symbol( MvObs &obs,map<int,int,less<int> > & );  // Called for each subset.
+
+private:
+  TDynamicTime check_time;
+  int sec2_conf,itype,isbtype,ident,late,plot_ss;
+  vector<long> &descriptors;
+
+  int get_conf_value( MvObs &obs);
+  void unpack(long & ,long*,long*, long &,long&,long&,long&);
+
+};
+#endif
diff --git a/src/Datacoverage/Makefile.am b/src/Datacoverage/Makefile.am
new file mode 100644
index 0000000..e35de79
--- /dev/null
+++ b/src/Datacoverage/Makefile.am
@@ -0,0 +1,11 @@
+
+bin_PROGRAMS = bin/Datacoverage
+
+bin_Datacoverage_SOURCES  = Datacoverage.cc Datacoverage.h
+
+bin_Datacoverage_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Datacoverage/Makefile.in b/src/Datacoverage/Makefile.in
new file mode 100644
index 0000000..5e699a8
--- /dev/null
+++ b/src/Datacoverage/Makefile.in
@@ -0,0 +1,646 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Datacoverage$(EXEEXT)
+subdir = src/Datacoverage
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Datacoverage_OBJECTS = Datacoverage.$(OBJEXT)
+bin_Datacoverage_OBJECTS = $(am_bin_Datacoverage_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Datacoverage_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Datacoverage_SOURCES)
+DIST_SOURCES = $(bin_Datacoverage_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Datacoverage_SOURCES = Datacoverage.cc Datacoverage.h
+bin_Datacoverage_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Datacoverage/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Datacoverage/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Datacoverage$(EXEEXT): $(bin_Datacoverage_OBJECTS) $(bin_Datacoverage_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Datacoverage$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_Datacoverage_OBJECTS) $(bin_Datacoverage_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Datacoverage.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/DebugTools/Makefile.am b/src/DebugTools/Makefile.am
new file mode 100644
index 0000000..311dfaf
--- /dev/null
+++ b/src/DebugTools/Makefile.am
@@ -0,0 +1,18 @@
+
+bin_PROGRAMS = bin/mvmon  bin/xserv
+
+
+bin_mvmon_SOURCES  = moncback.cc mvmon.c
+bin_mvmon_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_mvmon_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS_NO_UTIL)
+
+
+bin_xserv_SOURCES  = xserv.c cback.c
+bin_xserv_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_xserv_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS_NO_UTIL)
+
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/DebugTools/Makefile.in b/src/DebugTools/Makefile.in
new file mode 100644
index 0000000..795972d
--- /dev/null
+++ b/src/DebugTools/Makefile.in
@@ -0,0 +1,748 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/mvmon$(EXEEXT) bin/xserv$(EXEEXT)
+subdir = src/DebugTools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_mvmon_OBJECTS = bin_mvmon-moncback.$(OBJEXT) \
+	bin_mvmon-mvmon.$(OBJEXT)
+bin_mvmon_OBJECTS = $(am_bin_mvmon_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_mvmon_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_xserv_OBJECTS = bin_xserv-xserv.$(OBJEXT) \
+	bin_xserv-cback.$(OBJEXT)
+bin_xserv_OBJECTS = $(am_bin_xserv_OBJECTS)
+bin_xserv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_mvmon_SOURCES) $(bin_xserv_SOURCES)
+DIST_SOURCES = $(bin_mvmon_SOURCES) $(bin_xserv_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_mvmon_SOURCES = moncback.cc mvmon.c
+bin_mvmon_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_mvmon_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS_NO_UTIL)
+bin_xserv_SOURCES = xserv.c cback.c
+bin_xserv_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_xserv_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS_NO_UTIL)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/DebugTools/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/DebugTools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/mvmon$(EXEEXT): $(bin_mvmon_OBJECTS) $(bin_mvmon_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/mvmon$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_mvmon_OBJECTS) $(bin_mvmon_LDADD) $(LIBS)
+bin/xserv$(EXEEXT): $(bin_xserv_OBJECTS) $(bin_xserv_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/xserv$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(bin_xserv_OBJECTS) $(bin_xserv_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvmon-moncback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_mvmon-mvmon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_xserv-cback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_xserv-xserv.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bin_mvmon-mvmon.o: mvmon.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvmon-mvmon.o -MD -MP -MF $(DEPDIR)/bin_mvmon-mvmon.Tpo -c -o bin_mvmon-mvmon.o `test -f 'mvmon.c' || echo '$(srcdir)/'`mvmon.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmon-mvmon.Tpo $(DEPDIR)/bin_mvmon-mvmon.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mvmon.c' object='bin_mvmon-mvmon.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvmon-mvmon.o `test -f 'mvmon.c' || echo '$(srcdir)/'`mvmon.c
+
+bin_mvmon-mvmon.obj: mvmon.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_mvmon-mvmon.obj -MD -MP -MF $(DEPDIR)/bin_mvmon-mvmon.Tpo -c -o bin_mvmon-mvmon.obj `if test -f 'mvmon.c'; then $(CYGPATH_W) 'mvmon.c'; else $(CYGPATH_W) '$(srcdir)/mvmon.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmon-mvmon.Tpo $(DEPDIR)/bin_mvmon-mvmon.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mvmon.c' object='bin_mvmon-mvmon.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_mvmon-mvmon.obj `if test -f 'mvmon.c'; then $(CYGPATH_W) 'mvmon.c'; else $(CYGPATH_W) '$(srcdir)/mvmon.c'; fi`
+
+bin_xserv-xserv.o: xserv.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_xserv-xserv.o -MD -MP -MF $(DEPDIR)/bin_xserv-xserv.Tpo -c -o bin_xserv-xserv.o `test -f 'xserv.c' || echo '$(srcdir)/'`xserv.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_xserv-xserv.Tpo $(DEPDIR)/bin_xserv-xserv.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='xserv.c' object='bin_xserv-xserv.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_xserv-xserv.o `test -f 'xserv.c' || echo '$(srcdir)/'`xserv.c
+
+bin_xserv-xserv.obj: xserv.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_xserv-xserv.obj -MD -MP -MF $(DEPDIR)/bin_xserv-xserv.Tpo -c -o bin_xserv-xserv.obj `if test -f 'xserv.c'; then $(CYGPATH_W) 'xserv.c'; else $(CYGPATH_W) '$(srcdir)/xserv.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_xserv-xserv.Tpo $(DEPDIR)/bin_xserv-xserv.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='xserv.c' object='bin_xserv-xserv.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_xserv-xserv.obj `if test -f 'xserv.c'; then $(CYGPATH_W) 'xserv.c'; else $(CYGPATH_W) '$(srcdir)/xserv.c'; fi`
+
+bin_xserv-cback.o: cback.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_xserv-cback.o -MD -MP -MF $(DEPDIR)/bin_xserv-cback.Tpo -c -o bin_xserv-cback.o `test -f 'cback.c' || echo '$(srcdir)/'`cback.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_xserv-cback.Tpo $(DEPDIR)/bin_xserv-cback.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cback.c' object='bin_xserv-cback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_xserv-cback.o `test -f 'cback.c' || echo '$(srcdir)/'`cback.c
+
+bin_xserv-cback.obj: cback.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_xserv-cback.obj -MD -MP -MF $(DEPDIR)/bin_xserv-cback.Tpo -c -o bin_xserv-cback.obj `if test -f 'cback.c'; then $(CYGPATH_W) 'cback.c'; else $(CYGPATH_W) '$(srcdir)/cback.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_xserv-cback.Tpo $(DEPDIR)/bin_xserv-cback.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cback.c' object='bin_xserv-cback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_xserv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_xserv-cback.obj `if test -f 'cback.c'; then $(CYGPATH_W) 'cback.c'; else $(CYGPATH_W) '$(srcdir)/cback.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_mvmon-moncback.o: moncback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_mvmon-moncback.o -MD -MP -MF $(DEPDIR)/bin_mvmon-moncback.Tpo -c -o bin_mvmon-moncback.o `test -f 'moncback.cc' || echo '$(srcdir)/'`moncback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmon-moncback.Tpo $(DEPDIR)/bin_mvmon-moncback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='moncback.cc' object='bin_mvmon-moncback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_mvmon-moncback.o `test -f 'moncback.cc' || echo '$(srcdir)/'`moncback.cc
+
+bin_mvmon-moncback.obj: moncback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_mvmon-moncback.obj -MD -MP -MF $(DEPDIR)/bin_mvmon-moncback.Tpo -c -o bin_mvmon-moncback.obj `if test -f 'moncback.cc'; then $(CYGPATH_W) 'moncback.cc'; else $(CYGPATH_W) '$(srcdir)/moncback.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_mvmon-moncback.Tpo $(DEPDIR)/bin_mvmon-moncback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='moncback.cc' object='bin_mvmon-moncback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_mvmon_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_mvmon-moncback.obj `if test -f 'moncback.cc'; then $(CYGPATH_W) 'moncback.cc'; else $(CYGPATH_W) '$(srcdir)/moncback.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/DebugTools/cback.c b/src/DebugTools/cback.c
new file mode 100644
index 0000000..dc06e5a
--- /dev/null
+++ b/src/DebugTools/cback.c
@@ -0,0 +1,73 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Xm/PushB.h>
+#include "mars.h"
+
+extern XtAppContext app_context;
+extern Widget row;
+
+static svc *s;
+
+typedef struct {
+	String *table;
+} Dtype,*Dptr;
+
+Dtype Data;
+
+static  XtResource  resources[] = {
+	{"A","A",XmRStringTable,sizeof(String*),XtOffset(Dptr,table),
+	XmRImmediate,NULL,},
+};
+
+void click(Widget w,void *a,void *b)
+{
+	request *r = empty_request("START");
+	set_value(r,"NAME","%s",XtName(w));
+	call_switchboard(s,r);
+	free_all_requests(r);
+}
+
+void fill(svcid *id,request *r,void *data)
+{
+	Widget w;
+
+
+	while(r)
+	{
+		if(strcmp(r->name,"service")==0)
+		{
+			w = (Widget)XmCreatePushButton(row,
+				no_quotes(get_value(r,"name",0)),NULL,0);
+			XtAddCallback(w,XmNactivateCallback,(XtCallbackProc) click, NULL);
+			XtManageChild(w);
+		}
+		r = r->next;
+	}
+}
+
+init(int argc,char **argv)
+{
+	extern Widget widget0;
+	request *t = empty_request("GETINFO");
+
+	marsinit(&argc,argv,0,0,0);
+
+	XtGetApplicationResources(widget0,(XtPointer)&Data,
+			resources,XtNumber(resources),NULL,0);
+	s = RegisterService(app_context,mbasename(argv[0]));
+	add_reply_callback(s,NULL,fill,NULL);
+
+	call_switchboard(s,t);
+
+	free_all_requests(t);
+
+
+}
diff --git a/src/DebugTools/moncback.cc b/src/DebugTools/moncback.cc
new file mode 100644
index 0000000..350f698
--- /dev/null
+++ b/src/DebugTools/moncback.cc
@@ -0,0 +1,641 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <iostream>
+#include <Xm/Xm.h>
+#include <Xm/List.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Text.h>
+#include <sys/types.h>
+#include <signal.h>
+#include <Drag.h>
+#include "mars.h"
+
+using namespace std;
+
+extern "C" {
+#include "xec.h"
+#include "drop.h"
+void debug_callback(Widget,XtPointer,XmAnyCallbackStruct*);
+void kill_callback(Widget,XtPointer,XmAnyCallbackStruct*);
+void info_callback(Widget,XtPointer,XmAnyCallbackStruct*);
+void open_icon_callback(Widget,XtPointer,DragCallbackStruct*);
+void create_request_top(Widget);
+void create_top ( Display*, char*, int, char** );
+void create_action_menu(Widget);
+void exit_callback(Widget,XtPointer,XmAnyCallbackStruct*);
+void module_callback(Widget,XtPointer,XmAnyCallbackStruct*);
+}
+
+extern Widget top;
+extern Widget drag_service,drag_wait,drag_request;
+extern Widget info_label,progress_list;
+XtAppContext app_context;
+Display *display;       /*  Display             */
+
+extern Widget service_top, service_form, service_drag;
+extern Widget request_top, request_form, request_text;
+extern Widget action_menu;
+extern Widget name_label;
+
+static svc *s;
+request *status  = NULL;
+
+const char *_service  = strcache("service");
+const char *_object   = strcache("object");
+const char *_REPLY    = strcache("REPLY");
+const char *_WAIT     = strcache("WAIT");
+const char *_REGISTER = strcache("REGISTER");
+const char *_SERVICE  = strcache("SERVICE");
+const char *_EXIT     = strcache("EXIT");   
+const char *_PROGRESS = strcache("PROGRESS");   
+const char *_FOLLOWUP = strcache("FOLLOWUP");   
+const char *_BUSY     = strcache("BUSY");   
+
+
+class Info {
+	static Info *head;
+	Info *next;
+	long    id;
+protected:
+
+	Icon    icon;
+	char    *name;
+	static Info *curr;
+
+public:
+
+	Info(long);
+	virtual ~Info();
+
+	virtual void Open();
+	virtual void Kill()              = 0;
+	virtual void Debug()             = 0;
+	virtual void Update(request*)    {};
+	virtual void Update(long)        {};
+
+static Info* Find(long);
+};
+
+class Service : public Info{
+
+	char    *host;
+	char    *user;
+	long    pid;
+	long    ref;
+	int     kill_level;
+
+	void Kill();
+	void Debug();
+	void Open();
+public:
+
+	Service(long,request*);
+	~Service();
+
+};
+
+class Request : public Info{
+	request *r;
+	long from;
+	long to;
+	void Kill();
+	void Debug();
+	void Update(request*);
+	void Update(long t)     { to = t; }
+	void Open();
+public:
+	Request(long,long,long,request*,int);
+	~Request();
+};
+
+class Wait : public Info{
+	request *r;
+	long from;
+	char *to;
+	void Kill()  {           }
+	void Debug() {           }
+	void Open();
+public:
+	Wait(long,long,const char*,request*);
+	~Wait();
+};
+
+Info *Info::head = NULL;
+Info *Info::curr = NULL;
+
+Info::Info(long ref) : id(ref)
+{
+	next        = head;
+	head        = this;
+	icon        = 0 ;
+	name        = 0;
+}
+
+void reset_request_window()
+{
+	xec_ClearList(progress_list);
+	XmTextSetString(request_text,"");
+	xec_SetLabel(info_label,"-");
+}
+
+const char *nice_name(const char *name)
+{
+	request *s  = mars.setup;
+	while(s)
+	{
+		if( s->name == _service )
+		{
+			const char *n = get_value(s,"name",0);
+			if(n == name)
+			{
+				const char *p = get_value(s,"fullname",0);
+				if(p) return p;
+			}
+		}
+		s = s->next;
+	}
+	return name;
+}
+
+Service::Service(long ref,request *r) : Info(ref)
+{
+	
+	name        = strcache(get_value(r,"NAME",0));
+
+	// Look for  @
+	int at  = 0;
+	const char *p = name;
+	while(*p) { if(*p == '@') at++; p++; }
+
+	host        = strcache(get_value(r,"HOST",0));
+	user        = strcache(get_value(r,"USER",0));
+	pid         = atol(get_value(r,"PID",0));
+
+    const char *refp = get_value(r,"REF",0);
+    if( refp ) ref = atol( refp );
+	else       ref = 0;
+
+	name        = strcache(nice_name(name));
+	if(!at) icon  = DragAddIcon(drag_service,"SERVICE",name,this,0,0);
+	kill_level  = 0;
+}
+
+Request::Request(long ref,long f,long t,request *s,int sync) : 
+	Info(ref),from(f),to(t)
+{
+	r       = clone_all_requests(s);
+	const char *c = get_value(r,"_CLASS",0);
+	const char *n = mbasename(get_value(r,"_NAME",0));
+
+	if(!c || !*c) c = "REQUEST";
+	if(!n || !*n) n = r->name;
+
+	if(sync)
+	{
+		char buf[1024];
+		sprintf(buf,"%s (synchrone)",n);
+		name = strcache(buf);
+	}
+	else name = strcache(n);
+
+	icon    = DragAddIcon(drag_request,c,name,this,0,0);
+}
+
+Request::~Request()
+{
+	free_all_requests(r);
+}
+
+void Request::Update(request* s)
+{
+	const char *p;
+	int n = 0;
+	while(p = get_value(s,"PROGRESS",n++))
+	{
+		add_value(r,"_MONITOR_PROGRESS","%s",p);
+		if(curr == this)
+			xec_AddListItem(progress_list,p);
+	}
+}
+
+Wait::Wait(long ref,long f,const char *t,request *s) : 
+	Info(ref),from(f),to(strcache(t))
+{
+	r       = clone_all_requests(s);
+	const char *c = get_value(r,"_CLASS",0);
+	const char *n = mbasename(get_value(r,"_NAME",0));
+
+	char buf[1024];
+	sprintf(buf,"%s waiting for %s",n?n:r->name,nice_name(to));
+	n = buf;
+
+	if(!c || !*c) c = "REQUEST";
+	if(!n || !*n) n = r->name;
+	name = strcache(n);
+	icon    = DragAddIcon(drag_wait,c,n,this,0,0);
+}
+
+Wait::~Wait()
+{
+	strfree(to);
+	free_all_requests(r);
+}
+
+Info *active = NULL;
+
+Info::~Info()
+{
+	Info *s = head;
+	Info *t = 0;
+
+	while(s)
+	{
+		if(s == this)
+		{
+			if(t) t->next = s->next;
+			else  head    = s->next;
+			break;
+		}
+		t = s;
+		s = s->next;
+	}
+	if(icon) DragDeleteIcon(DragIconToWidget(icon),icon);
+	strfree(name);
+
+	if(curr == this)
+	{
+		curr = 0;
+		reset_request_window();
+	}		
+
+	if(active == this)
+		active = 0;
+}
+
+Service::~Service()
+{
+	strfree(user);
+	strfree(host);
+}
+
+
+Info* Info::Find(long r)
+{
+	Info *s = head;
+	while(s)
+	{
+		if(s->id == r) return s;
+		s = s->next;
+	}
+	return 0;
+}
+
+void Service::Debug()
+{
+	kill(pid,SIGUSR2);
+}
+
+void Service::Kill()
+{
+	int sig;
+	switch(kill_level++)
+	{
+		case 0:  sig = 15; break;
+		default: sig = 9;  break;
+	}
+	kill(pid,sig);
+}
+
+void Request::Debug()
+{
+	Info *p = Find(to);
+	if(p) p->Debug();
+}
+
+void Request::Kill()
+{
+	Info *p = Find(to);
+	if(p) p->Kill();
+}
+
+
+void Info::Open()
+{
+	curr = this;
+	reset_request_window();
+	XtManageChild(request_form);
+	xec_SetLabel(info_label,name);
+}
+
+
+void Service::Open()
+{
+	Info::Open();
+	char buf[1024];
+	sprintf(buf,"Host: %s\nUser: %s\nPID : %d",
+		host,user,pid);
+		XmTextSetString(request_text,buf);
+}
+
+void Request::Open()
+{
+	Info::Open();
+	const char *p;
+	int n = 0;
+	while(p = get_value(r,"_MONITOR_PROGRESS",n++))
+			xec_AddListItem(progress_list,p);
+	p = request2string(r);
+	XmTextSetString(request_text,(char*)p);
+}
+
+void Wait::Open()
+{
+	Info::Open();
+	char *p = request2string(r);
+	XmTextSetString(request_text,p);
+}
+
+
+void monitor()
+{
+	request *t = empty_request("MONITOR");
+	call_switchboard(s,t);
+	free_all_requests(t);
+}
+
+
+void draw(Widget w,XRectangle *r,Pixmap pix,GC gc,XtPointer)
+{
+	XFillRectangles(XtDisplay(w),
+		pix,
+		gc,
+		r,1);
+}
+
+void open_icon_callback(Widget,XtPointer,DragCallbackStruct *cb)
+{
+	/* DropObjectFromSource(w,cb->event,0,0,20,20,draw,NULL); */
+	Info *s = (Info*)cb->icon_data;
+	s->Open();
+}
+
+
+void info_callback(Widget,XtPointer,XmAnyCallbackStruct*)
+{
+	if(active) active->Open();
+}
+
+void kill_callback(Widget,XtPointer,XmAnyCallbackStruct*)
+{
+	if(active) active->Kill();
+}
+
+void debug_callback(Widget,XtPointer,XmAnyCallbackStruct*)
+{
+	if(active) active->Debug();
+}
+
+
+void exit_callback(Widget,XtPointer,XmAnyCallbackStruct*)
+{
+	exit(0);
+}
+
+void start_module(const char *name)
+{
+	request *r = empty_request("START"); 
+	set_value(r,"NAME","%s",name); 
+	call_switchboard(s,r);
+	free_all_requests(r);
+}
+
+void module_callback(Widget w,XtPointer,XmAnyCallbackStruct*)
+{
+	const char *name = (char*)xec_GetUserData(w);
+	start_module(name);
+}
+
+
+void input(Widget w,XtPointer,XEvent *ev,Boolean*)
+{
+	Icon icon = DragFindIconByPosition(w,ev->xbutton.x, ev->xbutton.y);
+
+	switch(ev->xbutton.button)
+	{
+	case 2:
+		if(icon)
+		{
+			active = (Info*)DragGetIconData(w,icon);
+			//active->ShowRelations();
+		}
+		break;
+
+	case 3:
+
+		XtSetSensitive(action_menu,icon != NULL);
+		if(icon)
+		{
+			xec_SetLabel(name_label,DragGetIconName(w,icon));
+			active = (Info*)DragGetIconData(w,icon);
+		}
+		else
+		{
+			active = NULL;
+			xec_SetLabel(name_label,"-");
+		}
+
+		XmMenuPosition(action_menu,(XButtonPressedEvent*)ev);
+		XtManageChild(action_menu);
+		break;
+	}
+}
+
+
+
+void info(svcid *id,request *r,void *)
+{	
+	long ref   = atol(get_value(id->r,"REF",0));
+	//const char *name = get_value(id->r,"NAME",0);
+	const char *mode = get_value(id->r,"MODE",0);
+
+
+	if(mode == _REPLY)
+	{
+		long reqid = atol(get_value(r,"REQ_ID",    0));
+		Info *p = Info::Find(reqid);
+		delete p;
+	}
+	else if(mode == _WAIT)
+	{
+		long reqid = atol(get_value(r,"REQ_ID",    0));
+		long from  = atol(get_value(r,"SOURCE_REF",0));
+		const char *to   = get_value(r,"TARGET",0);
+
+		Info *p = Info::Find(reqid);
+		delete p;
+		new Wait(reqid,from,to,r->next);
+	}
+	else if(mode == _REGISTER)
+	{
+		Info *p = Info::Find(ref);
+		delete p;
+		new Service(ref,r);
+	}
+	else if(mode == _BUSY)
+	{
+		r = r->next;		
+		long reqid = atol(get_value(r,"REQ_ID",    0));
+		Info *p = Info::Find(reqid);
+		delete p;
+	}
+	else if(mode == _SERVICE)
+	{
+		long reqid = atol(get_value(r,"REQ_ID",    0));
+		long from  = atol(get_value(r,"SOURCE_REF",0));
+
+		const char *x   = get_value(r,"WAITMODE",0);
+		int sync  = x?atoi(x):0;
+
+		Info *p = Info::Find(reqid);
+		delete p;
+		if( r->next )  //-- Q&D, 000810/vk
+		    new Request(reqid,from,ref,r->next,sync);
+	} 
+	else if(mode == _EXIT)
+	{
+		Info *p = Info::Find(ref);
+		delete p;
+	}
+	else if(mode == _PROGRESS)
+	{
+		long reqid = atol(get_value(r,"REQ_ID",    0));
+		Info *p = Info::Find(reqid);
+		if(p) p->Update(r);
+	}
+	else if(mode == _FOLLOWUP)
+	{
+		long reqid = atol(get_value(r,"REQ_ID",    0));
+		Info *p = Info::Find(reqid);
+		if(p) p->Update(ref);
+	}
+
+}
+
+static void dropSourceCB(Widget,dropid *,void*)
+{
+}
+
+static void dropTargetCB(Widget,dropid *id,void*)
+{
+	id->action = DROP_ACTION_RESOLVE;
+	id->header = empty_request("MONITOR");
+}
+
+void dummy(svcid *id,request *,void *)
+{
+	if(XtIsRealized(top))
+		XMapRaised(XtDisplay(top),XtWindow(top));
+	send_reply(id,NULL);
+}
+
+void load_resources()
+{
+	XrmDatabase database = XtDatabase(display);
+	char res[1024];
+
+	request *r = mars.setup;
+
+	while(r)
+	{
+		if(strcmp(r->name,"object") == 0)
+		{
+			const char *p = get_value(r,"class",0);
+			const char *q = get_value(r,"pixmap",0);
+			if(p && q)
+			{
+				sprintf(res, "Metview*%s.iconLargeBitmap", p);
+				XrmPutStringResource(&database, res,  q);
+			}
+		}
+		r = r->next;
+	}
+
+}
+
+static void init_drag(Widget drag)
+{
+	XtAddEventHandler(drag,ButtonPressMask,False,input,NULL);
+	XtAddCallback(drag,XtNdblClickCallback,
+		(XtCallbackProc)open_icon_callback,NULL);
+
+	RegisterDropSource(s, drag, dropSourceCB,NULL);
+	RegisterDropTarget(s, drag, dropTargetCB,NULL);
+	DragUseSmallIcons(drag,True);
+}
+
+static int xerror(Display *d, XErrorEvent *e)
+{
+  cout << "\nXlib error encountered!!!" << endl;
+  cout << "   To find the originating location in the source code, i.e." << endl;
+  cout << "   to get a proper call stack, run 'mvmon' in a debugger" << endl;
+  cout << "   with run-time flag '-synchronous' (otherwise call stack" << endl;
+  cout << "   may not correspond to the originating error location).\n" << endl;
+
+  char buf[1024];
+  XGetErrorText(d,e->error_code,buf,sizeof(buf));
+  cout << "xerror: " << buf << "\n" << endl;
+
+  abort();
+  return 0;    //-- we could use this for non-fatal errors...
+}
+
+int main (int argc,char **argv)
+{
+	marsinit(&argc,argv,0,0,0);
+	XtToolkitInitialize ();
+	app_context = XtCreateApplicationContext ();
+	display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+	                         NULL, 0, &argc, argv);
+
+	if (!display)
+	{
+	    printf("%s: can't open display, exiting...\n", argv[0]);
+	    exit (-1);
+	}
+
+#if (XmVersion < 2000)
+	/* Register converters, just in case you are really unlucky !! */
+	XmRegisterConverters();
+#endif
+
+	/* String to unit type doesn't get added !! */
+	XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
+	create_top ( display, argv[0], argc, argv );
+	create_action_menu(drag_service);
+	create_request_top(drag_service);
+	XtRealizeWidget (top);
+
+	s = RegisterService(app_context,progname());
+	add_service_callback(s,NULL,dummy,NULL);
+	add_progress_callback(s,NULL,info,NULL);
+
+	XSetErrorHandler(xerror);
+
+	load_resources();
+	init_drag(drag_service);
+	init_drag(drag_wait);
+	init_drag(drag_request);
+	monitor();
+
+	XtAppMainLoop (app_context);
+	exit (0);
+}
+
+
diff --git a/src/DebugTools/mvmon.c b/src/DebugTools/mvmon.c
new file mode 100644
index 0000000..1be2f7c
--- /dev/null
+++ b/src/DebugTools/mvmon.c
@@ -0,0 +1,431 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/List.h>
+#include <Xm/PanedW.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Separator.h>
+#include <Xm/Text.h>
+
+#include <Array.h>
+#include <Drag.h>
+#define XmCreateDrawingArea CreateDragWidget
+
+extern void exit_callback(Widget, XtPointer, XtPointer) ;
+extern void info_callback(Widget, XtPointer, XtPointer) ;
+extern void kill_callback(Widget, XtPointer, XtPointer) ;
+extern void debug_callback(Widget, XtPointer, XtPointer) ;
+
+static Widget xd_links [ 1 ];
+
+void XDmanage_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtManageChild(*(Widget *) client_data);
+}
+
+void XDunmanage_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtUnmanageChild(*(Widget *) client_data);
+}
+
+void XDpopup_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtPopup(*(Widget *) client_data, XtGrabNone);
+}
+
+void XDpopdown_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtPopdown(*(Widget *) client_data);
+}
+
+void XDmap_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtMapWidget(*(Widget *) client_data);
+}
+
+void XDunmap_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtUnmapWidget(*(Widget *) client_data);
+}
+
+void XDenable_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtSetSensitive(*(Widget *) client_data, TRUE);
+}
+
+void XDdisable_link( Widget w, XtPointer client_data, XtPointer call_data)
+{
+	if (client_data && *(Widget *) client_data)
+		XtSetSensitive(*(Widget *) client_data, FALSE);
+}
+
+Widget top = (Widget) NULL;
+Widget from = (Widget) NULL;
+Widget drag_service = (Widget) NULL;
+Widget action_menu = (Widget) NULL;
+Widget name_label = (Widget) NULL;
+Widget info_menu = (Widget) NULL;
+Widget kill_menu = (Widget) NULL;
+Widget debug_menu = (Widget) NULL;
+Widget drag_request = (Widget) NULL;
+Widget drag_wait = (Widget) NULL;
+Widget request_top = (Widget) NULL;
+Widget request_form = (Widget) NULL;
+Widget request_text = (Widget) NULL;
+Widget progress_list = (Widget) NULL;
+Widget info_label = (Widget) NULL;
+
+
+
+void create_action_menu (Widget parent)
+{
+	Widget children[6];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XtPointer tmp_value;             /* ditto */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget separator6 = (Widget)NULL;
+	Widget separator7 = (Widget)NULL;
+
+	action_menu = XmCreatePopupMenu ( parent, (char *) "action_menu", al, ac );
+	name_label = XmCreateLabel ( action_menu, (char *) "name_label", al, ac );
+	separator6 = XmCreateSeparator ( action_menu, (char *) "separator6", al, ac );
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Info", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNfillOnArm, FALSE); ac++;
+	info_menu = XmCreatePushButton ( action_menu, (char *) "info_menu", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Abort", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	kill_menu = XmCreatePushButton ( action_menu, (char *) "kill_menu", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	separator7 = XmCreateSeparator ( action_menu, (char *) "separator7", al, ac );
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Debug", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	debug_menu = XmCreatePushButton ( action_menu, (char *) "debug_menu", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	if (info_menu)
+		XtAddCallback( info_menu, XmNactivateCallback, info_callback, (XtPointer) 0 );
+	if (kill_menu)
+		XtAddCallback( kill_menu, XmNactivateCallback, kill_callback, (XtPointer) 0 );
+	if (debug_menu)
+		XtAddCallback( debug_menu, XmNactivateCallback, debug_callback, (XtPointer) 0 );
+	if ((children[ac] = name_label) != (Widget) 0) { ac++; }
+	if ((children[ac] = separator6) != (Widget) 0) { ac++; }
+	if ((children[ac] = info_menu) != (Widget) 0) { ac++; }
+	if ((children[ac] = kill_menu) != (Widget) 0) { ac++; }
+	if ((children[ac] = separator7) != (Widget) 0) { ac++; }
+	if ((children[ac] = debug_menu) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+}
+
+void create_top (Display *display, char *app_name, int app_argc, char **app_argv)
+{
+	Widget children[6];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XtPointer tmp_value;             /* ditto */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget button1 = (Widget)NULL;
+	Widget panedWindow2 = (Widget)NULL;
+	Widget frame3 = (Widget)NULL;
+	Widget scrolledWin3 = (Widget)NULL;
+	Widget scrollbar4 = (Widget)NULL;
+	Widget scrollbar5 = (Widget)NULL;
+	Widget label6 = (Widget)NULL;
+	Widget frame2 = (Widget)NULL;
+	Widget scrolledWin8 = (Widget)NULL;
+	Widget scrollbar9 = (Widget)NULL;
+	Widget scrollbar10 = (Widget)NULL;
+	Widget label4 = (Widget)NULL;
+	Widget frame1 = (Widget)NULL;
+	Widget scrolledWin11 = (Widget)NULL;
+	Widget scrollbar12 = (Widget)NULL;
+	Widget scrollbar13 = (Widget)NULL;
+	Widget label3 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Metview Process Monitor"); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	top = XtAppCreateShell(app_name, (char *) "Metview", applicationShellWidgetClass, display, al, ac);
+
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 520); ac++;
+	XtSetArg(al[ac], XmNheight, 520); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	from = XmCreateForm ( top, (char *) "from", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Close", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button1 = XmCreatePushButton ( from, (char *) "button1", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	panedWindow2 = XmCreatePanedWindow ( from, (char *) "panedWindow2", al, ac );
+	XtSetArg(al[ac], XmNpaneMinimum, 1); ac++;
+	XtSetArg(al[ac], XmNheight, 200); ac++;
+	frame3 = XmCreateFrame ( panedWindow2, (char *) "frame3", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 140); ac++;
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin3 = XmCreateScrolledWindow ( frame3, (char *) "scrolledWin3", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar4); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar5); ac++;
+	XtGetValues(scrolledWin3, al, ac );
+	ac = 0;
+	drag_service = XmCreateDrawingArea ( scrolledWin3, (char *) "drag_service", al, ac );
+	XtSetArg(al[ac], XmNframeChildType, XmFRAME_TITLE_CHILD); ac++;
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Modules in Memory", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	label6 = XmCreateLabel ( frame3, (char *) "label6", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNheight, 200); ac++;
+	frame2 = XmCreateFrame ( panedWindow2, (char *) "frame2", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 140); ac++;
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin8 = XmCreateScrolledWindow ( frame2, (char *) "scrolledWin8", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar9); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar10); ac++;
+	XtGetValues(scrolledWin8, al, ac );
+	ac = 0;
+	drag_request = XmCreateDrawingArea ( scrolledWin8, (char *) "drag_request", al, ac );
+	XtSetArg(al[ac], XmNframeChildType, XmFRAME_TITLE_CHILD); ac++;
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Active Processes", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	label4 = XmCreateLabel ( frame2, (char *) "label4", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNheight, 200); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 12); ac++;
+	frame1 = XmCreateFrame ( panedWindow2, (char *) "frame1", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 140); ac++;
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin11 = XmCreateScrolledWindow ( frame1, (char *) "scrolledWin11", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar12); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar13); ac++;
+	XtGetValues(scrolledWin11, al, ac );
+	ac = 0;
+	drag_wait = XmCreateDrawingArea ( scrolledWin11, (char *) "drag_wait", al, ac );
+	XtSetArg(al[ac], XmNframeChildType, XmFRAME_TITLE_CHILD); ac++;
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Pending Processes", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	label3 = XmCreateLabel ( frame1, (char *) "label3", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( button1, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, button1); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( panedWindow2, al, ac );
+	ac = 0;
+	if (button1)
+		XtAddCallback( button1, XmNactivateCallback, exit_callback, (XtPointer) 0 );
+	if ((children[ac] = drag_service) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	XtVaSetValues(scrolledWin3,
+	              XmNhorizontalScrollBar, scrollbar4,
+	              XmNverticalScrollBar, scrollbar5,
+	              XmNworkWindow, drag_service,
+	              NULL);
+	if ((children[ac] = scrolledWin3) != (Widget) 0) { ac++; }
+	if ((children[ac] = label6) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if ((children[ac] = drag_request) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	XtVaSetValues(scrolledWin8,
+	              XmNhorizontalScrollBar, scrollbar9,
+	              XmNverticalScrollBar, scrollbar10,
+	              XmNworkWindow, drag_request,
+	              NULL);
+	if ((children[ac] = scrolledWin8) != (Widget) 0) { ac++; }
+	if ((children[ac] = label4) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if ((children[ac] = drag_wait) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	XtVaSetValues(scrolledWin11,
+	              XmNhorizontalScrollBar, scrollbar12,
+	              XmNverticalScrollBar, scrollbar13,
+	              XmNworkWindow, drag_wait,
+	              NULL);
+	if ((children[ac] = scrolledWin11) != (Widget) 0) { ac++; }
+	if ((children[ac] = label3) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if ((children[ac] = frame3) != (Widget) 0) { ac++; }
+	if ((children[ac] = frame2) != (Widget) 0) { ac++; }
+	if ((children[ac] = frame1) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if ((children[ac] = button1) != (Widget) 0) { ac++; }
+	if ((children[ac] = panedWindow2) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if (from != (Widget) 0) { XtManageChild ( from); }
+}
+
+
+void create_request_top (Widget parent)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XtPointer tmp_value;             /* ditto */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget button14 = (Widget)NULL;
+	Widget panedWindow15 = (Widget)NULL;
+	Widget scrolledText16 = (Widget)NULL;
+	Widget scrollbar18 = (Widget)NULL;
+	Widget scrollbar19 = (Widget)NULL;
+	Widget scrolledList17 = (Widget)NULL;
+	Widget scrollbar21 = (Widget)NULL;
+	Widget scrollbar22 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Info"); ac++;
+	XtSetArg(al[ac], XmNtransient, TRUE); ac++;
+	request_top = XmCreateDialogShell ( parent, (char *) "request_top", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	request_form = XmCreateForm ( request_top, (char *) "request_form", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringGenerate ( (XtPointer) "Close", XmFONTLIST_DEFAULT_TAG, XmCHARSET_TEXT, NULL );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button14 = XmCreatePushButton ( request_form, (char *) "button14", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	panedWindow15 = XmCreatePanedWindow ( request_form, (char *) "panedWindow15", al, ac );
+	XtSetArg(al[ac], XmNcolumns, 51); ac++;
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 19); ac++;
+	request_text = XmCreateScrolledText ( panedWindow15, (char *) "request_text", al, ac );
+	ac = 0;
+	scrolledText16 = XtParent ( request_text );
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar18); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar19); ac++;
+	XtGetValues(scrolledText16, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNvisibleItemCount, 3); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmCONSTANT); ac++;
+	progress_list = XmCreateScrolledList ( panedWindow15, (char *) "progress_list", al, ac );
+	ac = 0;
+	scrolledList17 = XtParent ( progress_list );
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar21); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar22); ac++;
+	XtGetValues(scrolledList17, al, ac );
+	ac = 0;
+	info_label = XmCreateLabel ( request_form, (char *) "info_label", al, ac );
+	xd_links [0] = request_form;
+
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( button14, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNtopWidget, info_label); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, button14); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( panedWindow15, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( info_label, al, ac );
+	ac = 0;
+	XtAddCallback (button14, XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[0] );
+	if (request_text != (Widget) 0) { XtManageChild(request_text); }
+	if (progress_list != (Widget) 0) { XtManageChild(progress_list); }
+	if ((children[ac] = button14) != (Widget) 0) { ac++; }
+	if ((children[ac] = panedWindow15) != (Widget) 0) { ac++; }
+	if ((children[ac] = info_label) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+}
+
diff --git a/src/DebugTools/xserv.c b/src/DebugTools/xserv.c
new file mode 100644
index 0000000..79095cc
--- /dev/null
+++ b/src/DebugTools/xserv.c
@@ -0,0 +1,152 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer 
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/RowColumn.h>
+#include <stdio.h>
+
+void XDmanage_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtManageChild ( *client_data );
+}
+
+void XDunmanage_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtUnmanageChild ( *client_data );
+}
+
+void XDpopup_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtPopup ( *client_data, XtGrabNone );
+}
+
+void XDpopdown_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtPopdown ( *client_data );
+}
+
+void XDmap_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtMapWidget (*client_data);
+}
+
+void XDunmap_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtUnmapWidget (*client_data);
+}
+
+void XDenable_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtSetSensitive (*client_data, TRUE);
+}
+
+void XDdisable_link (w, client_data, call_data)
+Widget w;		/*  widget id           */
+Widget *client_data;	/*  data from application   */
+caddr_t call_data;      /*  data from widget class  */
+{
+    XtSetSensitive (*client_data, FALSE);
+}
+
+
+
+Widget widget0 = (Widget)NULL;
+Widget row = (Widget)NULL;
+
+
+void create_widget0 (display, app_name, app_argc, app_argv)
+Display *display;
+char *app_name;
+int app_argc;
+char **app_argv;
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];           /* Arg List */
+	register int ac = 0;      /* Arg Count */
+	char from_s [256];    /* For font list conversion */
+	XrmValue from_value, to_value; /* ditto */
+	int fg, bg;           /* colour values for pixmaps */ 
+	XmString *list_items; /* For list items */
+	int list_item;        /* Index for list_items */
+	XmString xmstrings[15];    /* temporary storage for XmStrings */
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	widget0 = XtAppCreateShell ( app_name, "XApplication", applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
+	row = XmCreateRowColumn ( widget0, "row", al, ac );
+	ac = 0;
+init(app_argc,app_argv);
+	XtManageChild ( row);
+}
+
+
+
+
+XtAppContext app_context;
+Display *display;       /*  Display             */
+
+int main (argc,argv)
+int    argc;
+char            **argv;
+{
+	XtToolkitInitialize ();
+	app_context = XtCreateApplicationContext ();
+	display = XtOpenDisplay (app_context, NULL, argv[0], "XApplication",
+	                         NULL, 0, &argc, argv);
+	if (!display)
+	{
+	    printf("%s: can't open display, exiting...\n", argv[0]);
+	    exit (-1);
+	}
+	/* Register converters, just in case you are really unlucky !! */
+	XmRegisterConverters();
+	/* String to unit type doesn't get added !! */
+	XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
+	create_widget0 ( display, argv[0], argc, argv );
+	XtRealizeWidget (widget0);
+	XtAppMainLoop (app_context);
+	exit (0);
+}
+
diff --git a/src/Divrot/Divrot.cc b/src/Divrot/Divrot.cc
new file mode 100644
index 0000000..5b87b7f
--- /dev/null
+++ b/src/Divrot/Divrot.cc
@@ -0,0 +1,291 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Divrot.h"
+
+
+void Divrot :: serve(MvRequest& in,MvRequest& out)
+{
+	cout << "\n---> Entering Divrot::serve..." << endl;
+	in.print();
+
+	 // Get data
+	if (!GetData(in)) return;
+
+	// Compute output field
+	if (!Apply(out)) return;
+
+	cout << "<--- Done OK! Leaving Divrot::serve.\n" << endl;
+}
+
+int Divrot :: GetField (MvRequest& grib, int param, MvFieldSet& fs)
+{
+	MvFilter		filter("PARAM");	// filter
+	MvFieldSet		fset(grib);		// field set
+	MvFieldSetIterator 	fsiter(fset);		// field set iterator
+	MvField			field;			// auxiliary field
+	int			nfields;		// number of fields
+
+	// Get fields
+
+	nfields = 0;
+	fsiter.setFilter(filter == param);
+	while(field=fsiter())
+	{
+		nfields++;
+		fs += field;
+	}
+
+	return nfields;
+}
+
+bool Divrot :: GetDataGen(MvRequest& in)
+{
+	// Get spectral truncation, smoothing indicator and constants
+
+	if(strcmp(in("TRUNCATION"),"AV") == 0)
+	   DtruncOut = 0.;
+	else
+	   DtruncOut = (double)in("TRUNCATION");
+
+	strcpy(Dsmoothing,in("SMOOTHING"));
+
+	if ((const char*)in("FLTC"))
+	   Dfltc = (double)in("FLTC");
+	else
+	   Dfltc = 19.4;
+
+	if ((const char*)in("MFLTEXP"))
+	   Dmfltexp = (double)in("MFLTEXP");
+	else
+	   Dmfltexp = 2.;
+
+	return true;
+}
+
+bool Divrot :: Apply(MvRequest& out)
+{
+#if 0
+	MvFortran	divrotf("Divrot");	// fortran subroutine
+
+	// Call the fortran routines
+	divrotf.addParameter(Dfieldset);	// setup fortran params
+	divrotf.addParameter(Dtrunc);
+	divrotf.addParameter(Dsmoothing);
+	divrotf.addParameter(Dfltc);
+	divrotf.addParameter(Dmfltexp);
+
+	putenv("VELSTR_ENV=OK");
+	divrot_();
+	char* penv=getenv("VELSTR_ENV");
+	if(strcmp(penv,"OK"))
+	{
+		setError(1,penv);
+		return false;
+	}
+
+	// Get the result
+
+	out = divrotf.getResult();
+#endif
+
+  convert_DIVROT( out );
+  out.print();
+
+  return true;
+}
+
+bool
+Divrot::appendWindComponent( grib_handle* gh )
+{
+    int ret = 0;
+//    char *packingType = "spectral_simple";
+//    size_t packtype   = strlen(packingType);
+
+                                            //-- ensure output truncation is right
+//    ret += grib_set_long  ( gh, "pentagonalResolutionParameterJ", DtruncOut );
+//    ret += grib_set_long  ( gh, "pentagonalResolutionParameterK", DtruncOut );
+//    ret += grib_set_long  ( gh, "pentagonalResolutionParameterM", DtruncOut );
+//    ret += grib_set_string( gh, "packingType", packingType,  &packtype);
+    ret += grib_set_long  ( gh, "generatingProcessIdentifier",    254 );
+    badRetVal( ret, "grib_set_long/generatingProcessIdentifier", "Divrot::appendWindComponent" );
+//    badRetVal( ret, "grib_set_long/truncVals", "Divrot::appendWindComponent" );
+
+/*
+    size_t len = 0;                         // data values count
+    ret = grib_get_size( gh, "values", &len );
+    badRetVal (ret, "grib_get_size", "appendWindComponent");
+
+    double* values = new double[len];       // allocate array for values
+    ret = grib_get_double_array( gh, "values", values, &len );  // get the values
+    badRetVal (ret, "grib_get_double_array", "appendWindComponent");
+
+                                             //-- encode wind component
+    ret = grib_set_double_array( gh, "values", values, len );
+    badRetVal( ret, "grib_set_double_array", "Divrot::appendWindComponent" );
+*/
+
+
+   if( Dsmoothing[0] == 'Y' )                //-- is smoothing requested?
+      smooth_BPPSMTH( gh );
+
+   size_t      buflen   = 0;                 //-- get the GRIB msg into 'buffer'
+   const void* buffer = NULL;
+   ret = grib_get_message( gh, &buffer, &buflen );
+   badRetVal( ret, "grib_get_message", "Divrot::appendWindComponent" );
+
+                                             //-- open output file in append mode
+   FILE* gribFile = fopen( DfileOut.c_str(), "a" );
+   if( ! gribFile )
+   {
+      marslog(LOG_EROR|LOG_PERR,"Cannot open %s",DfileOut.c_str());
+      return false;
+   }
+                                             //-- append 'buffer' to output file
+   if( fwrite(buffer,1,buflen,gribFile) != buflen )
+   {
+      marslog(LOG_EROR|LOG_PERR,"fwrite(%s) failed",DfileOut.c_str());
+      return false;
+   }
+                                             //-- close and double check
+   if( fclose(gribFile) )
+   {
+      marslog(LOG_EROR|LOG_PERR,"fclose(%s) failed",DfileOut.c_str());
+      return false;
+   }
+   
+   return true;
+}
+
+
+bool Rotwind :: GetData(MvRequest& in)
+{
+	MvRequest 	grib;			// grib file
+
+    DresultParam = eRotational;
+
+
+	 // Get data from request
+
+	in.getValue(grib,"DATA");
+
+	// Get vorticity fields
+
+	Dnfield = GetField(grib,VORTICITY,Dfieldset);
+	if(Dnfield == 0)
+	{
+		setError(1,"Field is not Vorticity..");
+		return false;
+	}
+
+	// get general data
+	if (!GetDataGen(in)) return false;
+
+	return true;
+}
+
+bool Divwind :: GetData(MvRequest& in)
+{
+	MvRequest 	grib;			// grib file
+
+    DresultParam = eDivergent;
+
+
+	 // Get data from request
+
+	in.getValue(grib,"DATA");
+
+	// Get divergence fields
+
+	Dnfield = GetField(grib,DIVERGENCE,Dfieldset);
+	if(Dnfield == 0)
+	{
+		setError(1,"Field is not Divergence..");
+		return false;
+	}
+
+	// get general data
+	if (!GetDataGen(in)) return false;
+
+	return true;
+}
+
+bool UVwind :: GetData(MvRequest& in)
+{
+    MvRequest grib;            // grib data
+
+    DresultParam = eUV;
+
+
+     // Get data from request
+
+    in.getValue(grib,"DATA");
+
+
+    // Get vorticity fields
+
+    Dnfield = GetField(grib, VORTICITY, Dfieldset);
+    if(Dnfield == 0)
+    {
+        setError(1,"No vorticity fields in data.");
+        return false;
+    }
+
+
+    // Get divergence fields
+
+    Dnfield2 = GetField(grib, DIVERGENCE, Dfieldset2);
+    if(Dnfield2 == 0)
+    {
+        setError(1,"No divergence fields in data.");
+        return false;
+    }
+
+
+    // check that we have the same number of DIV and VOR fields
+
+    if (Dnfield != Dnfield2)
+    {
+        setError(1,"Should be the same number of vorticity and divergence fields - there are %d and %d.", Dnfield, Dnfield2);
+        return false;
+    }
+
+
+
+    // get general data
+    if (!GetDataGen(in)) return false;
+
+    return true;
+}
+
+
+bool
+Divrot::badRetVal( int ret, const char* gribApiFunc, const char* MvFunc )
+{
+  if( ret != 0 )
+  {
+     sendProgress( ">>> %s returned %d in %s", gribApiFunc, ret, MvFunc );
+     cerr << ">>> '" << gribApiFunc << "' returned " << ret
+          << " in '" << MvFunc << "'" << endl;
+
+     return true;
+  }
+  else
+     return false;
+}
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	Rotwind rotw("ROTWIND");
+	Divwind divw("DIVWIND");
+	UVwind uvw("UVWIND");
+
+	theApp.run();
+}
diff --git a/src/Divrot/Divrot.h b/src/Divrot/Divrot.h
new file mode 100644
index 0000000..707bb40
--- /dev/null
+++ b/src/Divrot/Divrot.h
@@ -0,0 +1,107 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//--
+
+#ifndef DIVROT_H
+#define DIVROT_H
+
+#include "Metview.h"
+
+#define VORTICITY    138
+#define DIVERGENCE   155
+
+
+extern "C"
+void vod2uv_( fortfloat* VOR
+            , fortfloat* DIV
+            , fortint*   KTIN
+            , fortfloat* U
+            , fortfloat* V
+            , fortint*   KTOUT
+            );
+
+const string cVORTICITY ( "138.128" );
+const string cDIVERGENCE( "155.128" );
+const string cSPECTRAL( "sh" );
+
+enum eParam
+{
+   eVorticity,
+   eDivergence,
+   eVorticityAndDivergence,
+   eUnknown
+};
+
+enum eResultParam  // what we would like to compute
+{
+    eRotational,
+    eDivergent,
+    eUV,
+    eResultUnknown
+};
+
+
+class Divrot : public MvService {
+protected :
+    char         Dsmoothing[4];   // smoothing (1 Yes/0 No)
+    eParam       Dparam;          // eVorticity or eDivergence
+    eResultParam DresultParam;    // eRotational, eDivergent or eUV
+    int          DtruncIn;        // truncation of input field
+    int          DtruncOut;       // output truncation
+    double       Dfltc;           // constant
+    double       Dmfltexp;        // exponent
+    int          Dnfield;         // number of fields
+    int          Dnfield2;        // number of fields (used if deriving U/V)
+    MvFieldSet   Dfieldset;       // Vorticity or divergence field set
+    MvFieldSet   Dfieldset2;      // Vorticity or divergence field set (used if deriving U/V)
+    string       DfileOut;        // tmp output file name
+    long         DoutputValsLen;  // nr of (truncated) U/V values
+
+public:
+    Divrot(char* a) : MvService(a) {}
+    ~Divrot() {}
+    void serve(MvRequest&,MvRequest&);
+
+    virtual bool GetData(MvRequest&) = 0;
+    bool GetDataGen(MvRequest&);
+    bool Apply(MvRequest&);
+    int  GetField (MvRequest&, int, MvFieldSet&);
+
+    bool isValidData_DVVALID( grib_handle* gh );
+    bool checkOutputTruncation( grib_handle* gh );
+    bool convert_DIVROT( MvRequest& out );
+    bool smooth_BPPSMTH( grib_handle* gh );
+    bool appendWindComponent( grib_handle* gh );
+    bool badRetVal( int ret, const char* gribApiFunc, const char* MvFunc );
+};
+
+class Rotwind : public Divrot
+{
+public :
+    Rotwind(char* a) : Divrot(a) {}
+    virtual bool GetData(MvRequest&);
+};
+
+class Divwind : public Divrot
+{
+public :
+    Divwind(char* a) : Divrot(a) {}
+    virtual bool GetData(MvRequest&);
+};
+
+class UVwind : public Divrot
+{
+public :
+    UVwind(char* a) : Divrot(a) {}
+    virtual bool GetData(MvRequest&);
+};
+
+#endif
+//-- DIVROT_H
diff --git a/src/Divrot/Makefile.am b/src/Divrot/Makefile.am
new file mode 100644
index 0000000..34488f0
--- /dev/null
+++ b/src/Divrot/Makefile.am
@@ -0,0 +1,11 @@
+
+bin_PROGRAMS = bin/Divrot
+
+bin_Divrot_SOURCES  = Divrot.cc divrot-exFortran.cc Divrot.h
+
+bin_Divrot_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB)
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Divrot/Makefile.in b/src/Divrot/Makefile.in
new file mode 100644
index 0000000..3fe4fe7
--- /dev/null
+++ b/src/Divrot/Makefile.in
@@ -0,0 +1,647 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Divrot$(EXEEXT)
+subdir = src/Divrot
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Divrot_OBJECTS = Divrot.$(OBJEXT) divrot-exFortran.$(OBJEXT)
+bin_Divrot_OBJECTS = $(am_bin_Divrot_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Divrot_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Divrot_SOURCES)
+DIST_SOURCES = $(bin_Divrot_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Divrot_SOURCES = Divrot.cc divrot-exFortran.cc Divrot.h
+bin_Divrot_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Divrot/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Divrot/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Divrot$(EXEEXT): $(bin_Divrot_OBJECTS) $(bin_Divrot_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Divrot$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_Divrot_OBJECTS) $(bin_Divrot_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Divrot.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/divrot-exFortran.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Divrot/divrot-exFortran.cc b/src/Divrot/divrot-exFortran.cc
new file mode 100644
index 0000000..21e4486
--- /dev/null
+++ b/src/Divrot/divrot-exFortran.cc
@@ -0,0 +1,663 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <math.h>
+#include "Divrot.h"
+
+#if 0
+      SUBROUTINE DIVROT
+C
+C          COMPUTE ROTATIONAL WIND IF VORTICITY SUPPLIED
+C          COMPUTE DIVERGENT WIND IF DIVERGENCE SUPPLIED
+C
+C        Input:
+C          Fieldset of vorticity or divergence (spherical harmonics)
+C          Spectral truncation required
+C          Indicator for whether spatial smoothing required
+C          Smoothing constants
+C
+C        Output:
+C          Fieldset of rotational or divergent wind u-v components
+C           (spherical harmonics)
+C
+C        Author:
+C          B. Norris,  October 1996
+C
+C
+#include <grbsh.h>
+#include <grbsec.h>
+
+      integer cputenv
+
+#ifdef __alpha
+      INTEGER*8 IGRIB1,ICNT,IGRIB2,JMGRIBB,IWORD
+#endif
+
+C      PARAMETER (JMTRUNC=213)
+C      PARAMETER (JMUAF=(JMTRUNC+1)*(JMTRUNC+2))
+C      PARAMETER (JMGRIB=(JMUAF/2)+1000)
+C      PARAMETER (JSEC0=2,JSEC1=255,JSEC2=1000,JSEC3=2,JSEC4=100)
+C      PARAMETER (JPSEC2=96,JPSEC3=2)
+
+      DIMENSION IGRIB(JMGRIB)
+      DIMENSION ISEC0(JSEC0)
+      DIMENSION ISEC1(JSEC1)
+      DIMENSION ISEC2(JSEC2)
+      DIMENSION ISEC3(JSEC3)
+      DIMENSION ISEC4(JSEC4)
+      DIMENSION ZSEC2(JPSEC2)
+      DIMENSION ZSEC3(JPSEC3)
+      DIMENSION DV1(JMUAF),DV2(JMUAF),DU(JMUAF),DV(JMUAF)
+      LOGICAL NLSMTH
+      CHARACTER*4 YSMTH
+      DATA DV2/JMUAF*0.0/
+
+c -------------------------------------------------------------------
+c
+C     GET FIRST ARGUMENT AS A FIELDSET OF VORTICITY OR DIVERGENCE
+C               ICNT IS THE NUMBER OF FIELDS
+
+      CALL MGETG(IGRIB1,ICNT)
+
+C        GET USER OPTIONS
+C
+C           Spectral truncation
+      CALL MGETN (RTOUT)
+C           Smoothing indicator and constants
+      CALL MGETS (YSMTH)
+      NLSMTH=.FALSE.
+      IF(YSMTH(1:2).EQ.'on') NLSMTH=.TRUE.
+      CALL MGETN (FLTC)
+      CALL MGETN (RFLTEXP)
+      MFLTEXP = NINT (RFLTEXP)
+      WRITE (*,*) ' RTOUT,NLSMTH,FLTC,MFLTEXP '
+      WRITE (*,*)   RTOUT,NLSMTH,FLTC,MFLTEXP
+      WRITE (*,'(A,A)') ' YSMTH ',YSMTH
+
+C     CREATE A NEW FIELDSET
+
+      CALL MNEWG(IGRIB2)
+C
+c -------------------------------------------------------------------
+c
+C     LOOP ON FIELDS
+
+      DO 10 I=1,ICNT
+
+C       GET NEXT FIELD FROM FIELDSET
+
+        JMGRIBB = JMGRIB	!POINTERS BETWEEN C AND FORTRAN MUST BE 8 BYTES
+        CALL MLOADG(IGRIB1,IGRIB,JMGRIBB)
+
+C       EXPAND
+
+        IPNTS = JMUAF
+        IERR = 0
+        CALL GRIBEX (ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,
+     C             DV1,IPNTS,IGRIB,JMGRIB,IWORD,'D',IERR)
+
+C           VALIDATE
+
+        CALL DVVALID (ISEC1,ISEC2,IERROR)
+	IF(IERROR.NE.0) RETURN
+
+C           COMPUTE DIVERGENT OR ROTATIONAL WIND
+
+        ITIN = ISEC2(2)
+        NTOUT = NINT (RTOUT)
+        IF (NTOUT.GT.ITIN) THEN
+	  JJ = cputenv
+     X    ('VELSTR_ENV=OUTPUT TRUNCATION GREATER THAN INPUT TRUNCATION')
+	 RETURN
+	ENDIF
+        IF (NTOUT.EQ.0) NTOUT=ITIN
+        IF(ISEC1(6).EQ.138) THEN
+C             IF(I.EQ.1) CALL MSETS ('rot')
+             CALL VOD2UV (DV1,DV2,ITIN,DU,DV,NTOUT)
+        ELSE
+C             IF(I.EQ.1) CALL MSETS ('div')
+             CALL VOD2UV (DV2,DV1,ITIN,DU,DV,NTOUT)
+        ENDIF
+
+C           SMOOTHING
+
+        ITIN = NTOUT
+        NPREL4 = ITIN+1
+        I1 = JMUAF
+        IF(NLSMTH) THEN
+             CALL BPPSMTH (DU,I1,FLTC,MFLTEXP,NPREL4)
+             CALL BPPSMTH (DV,I1,FLTC,MFLTEXP,NPREL4)
+        ENDIF
+
+C          REPACK U COMPONENT
+
+        IPNTS = (NTOUT+1)*(NTOUT+2)
+        ISEC1(6) = 131
+        ISEC2(2) = NTOUT
+        ISEC2(3) = NTOUT
+        ISEC2(4) = NTOUT
+C        IF(ISEC2(6).EQ.2) CALL GRSMKP (1)
+C           FORCE SIMPLE PACKING
+        ISEC2(6) = 1
+        ISEC4(1) = IPNTS
+        DO 201 K4=3,JSEC4
+        ISEC4(K4) = 0
+  201   CONTINUE
+
+        IF(I.EQ.1) THEN
+C             CALL GRPRS0 (ISEC0)
+C             CALL GRPRS1 (ISEC0,ISEC1)
+C             CALL GRPRS2 (ISEC0,ISEC2,ZSEC2)
+C             CALL GRPRS3 (ISEC0,ISEC3,ZSEC3)
+C             CALL GRPRS4 (ISEC0,ISEC4,DU)
+C             WRITE (*,'(1H /(1H ,4(2X,E12.3)))')
+C     X             (DU(KD),KD=1,IPNTS,100)
+        ENDIF
+
+        RMIN=1.0E10
+        RMAX=-1.0E10
+        DO 202 KD=1,IPNTS
+        IF(DU(KD).LT.RMIN) RMIN=DU(KD)
+        IF(DU(KD).GT.RMAX) RMAX=DU(KD)
+  202   CONTINUE
+        WRITE (*,*) ' RMIN ',RMIN,' RMAX ',RMAX
+
+        IERR = 0
+        CALL GRIBEX (ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,
+     C             DU,IPNTS,IGRIB,JMGRIB,IWORD,'C',IERR)
+
+C          ADD TO FIELDSET
+
+        CALL MSAVEG(IGRIB2,IGRIB,IWORD)
+
+C          REPACK V COMPONENT
+
+        RMIN=1.0E10
+        RMAX=-1.0E10
+        DO 203 KD=1,IPNTS
+        IF(DV(KD).LT.RMIN) RMIN=DV(KD)
+        IF(DV(KD).GT.RMAX) RMAX=DV(KD)
+  203   CONTINUE
+        WRITE (*,*) ' RMIN ',RMIN,' RMAX ',RMAX
+
+        ISEC1(6) = 132
+        IERR = 0
+        CALL GRIBEX (ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,
+     C             DV,IPNTS,IGRIB,JMGRIB,IWORD,'C',IERR)
+
+C          ADD TO FIELDSET
+
+        CALL MSAVEG(IGRIB2,IGRIB,IWORD)
+
+
+10    CONTINUE
+
+c --------------------------------------------------------------------
+
+C     SET RESULT
+      CALL MSETG(IGRIB2)
+
+      WRITE (*,'(A)') '  END OF DIVROT '
+
+      RETURN
+      END
+#endif
+
+
+
+// from libMars/emos.c
+extern "C" {
+fortint int2_intout(const char* param,fortint iv[],fortfloat dv[],const char* cv);
+fortint intout_(const char*, fortint[], fortfloat[], const char*, fortint, fortint);
+fortint intin_(const char*, fortint[], fortfloat[], const char*, fortint, fortint);
+}
+
+/*
+// --------------------------------------------------------------------------------
+// repackGribValues
+// does what it says... this is because if we want to change the bitsPerValue, then
+// we also need to get grib_api to repack the data with the new resolution.
+// --------------------------------------------------------------------------------
+
+static void repackGribValues (grib_handle *gh, int bitsPerValue)
+{
+    size_t len = 0;                                        // data values count
+    int ret = grib_get_size( gh, "values", &len );
+//    badRetVal (ret, "grib_get_size", "repackGribValues");
+
+    double* values = new double[len];                             // allocate array for values
+    ret = grib_get_double_array( gh, "values", values, &len );  // get the values
+//    badRetVal (ret, "grib_get_double_array", "repackGribValues");
+
+    ret = grib_set_long (gh, "numberOfBitsContainingEachPackedValue", bitsPerValue);  // set bitsPerValue
+
+
+    ret = grib_set_double_array(gh, "values", values, len );  // set the values
+//    badRetVal (ret, "grib_set_double_array", "repackGribValues");
+}
+*/
+
+
+bool
+Divrot::convert_DIVROT( MvRequest& out )
+{
+   DfileOut = marstmp();                     //-- file for computed fields
+
+   for( int f = 0; f < Dnfield; ++f )        //-- loop over input fields
+   {
+/*
+      MvField myField = Dfieldset[ f ];      //-- get grib handle for this field
+      grib_handle* gh = myField.getGribHandle();
+
+
+      if( ! isValidData_DVVALID( gh ) )      //-- must be vorticity or divergence
+      {
+         marslog(LOG_EROR,"Divrot: invalid data");
+         return false;
+      }
+
+      checkOutputTruncation( gh );           //-- ensure output truncation
+
+      size_t len = 0;                        //-- data values count
+      int ret = grib_get_size( gh, "values", &len );
+      badRetVal( ret, "grib_get_size", "Divrot::convert_DIVROT" );
+
+                                             //-- input array for div/vor
+      double* divOrVor = new double[len];
+                                             //-- empty array (only zeroes)
+      double* zero = new double[len];
+      memset( zero, 0, sizeof(double)*len );
+
+                                             //-- create output arrays for U and V
+      DoutputValsLen = (DtruncOut+1)*(DtruncOut+2);
+      double* U = new double[DoutputValsLen];
+      double* V = new double[DoutputValsLen];
+
+      fortint inwords  = (len            * sizeof(double)) / sizeof(fortint);
+      fortint outwords = (DoutputValsLen * sizeof(double)) / sizeof(fortint);
+
+
+      ret = grib_get_double_array( gh, "values", divOrVor, &len );
+      badRetVal( ret, "grib_get_double_array", "Divrot::convert_DIVROT" );
+*/
+
+      char* bufferVorticity   = NULL;
+      char* bufferDivergence  = NULL;
+      size_t sizeVorticity = 0, sizeDivergence = 0;
+      int ret;
+      err marsRet;
+
+      MvField myField = Dfieldset[ f ];      //-- get grib handle for this field
+      grib_handle *ghVorticity;
+      grib_handle *ghDivergence;
+      grib_handle *ghZero = NULL;
+      size_t voValuesLength = 0, divValuesLength = 0;   //-- data values count
+      double* zero = NULL;
+
+      // note: vorticity->rotwind, divergence->divwind, both->uvwind
+
+      switch (DresultParam)
+      {
+        case eRotational:
+        {
+            ghVorticity  = myField.getGribHandle();
+            ghDivergence = grib_handle_clone (ghVorticity);  // create an all-zero valued GRIB for divergence
+            ghZero       = ghDivergence;                     // this is the one we will zero
+            break;
+        }
+
+        case eDivergent:
+        {
+            ghDivergence = myField.getGribHandle();
+            ghVorticity  = grib_handle_clone (ghDivergence);   // create an all-zero valued GRIB for vorticity
+            ghZero       = ghVorticity;                        // this is the one we will zero
+            break;
+        }
+
+        case eUV:
+        {
+            MvField myField2 = Dfieldset2[ f ];     //-- get grib handle for 'the other' field
+            ghVorticity  = myField.getGribHandle();
+            ghDivergence = myField2.getGribHandle();
+            break;
+        }
+        
+        default:
+        {
+            marslog(LOG_EROR,"Divrot: params should be vorticity or divergence");
+            return false;
+        }
+      }
+      
+
+
+
+      if( ! isValidData_DVVALID( ghVorticity ) )      //-- must be vorticity or divergence
+      {
+         marslog(LOG_EROR,"Divrot: invalid vorticity data");
+         return false;
+      }
+
+      if( ! isValidData_DVVALID( ghDivergence ) )      //-- must be vorticity or divergence
+      {
+         marslog(LOG_EROR,"Divrot: invalid divergence data");
+         return false;
+      }
+
+
+
+      checkOutputTruncation( ghVorticity );           //-- ensure output truncation
+      checkOutputTruncation( ghDivergence );          //-- ensure output truncation
+
+
+
+      // get the data array lengths and ensure they are the same
+
+      ret = grib_get_size( ghVorticity, "values", &voValuesLength );  //-- get the data array size
+      badRetVal( ret, "grib_get_size vorticity values", "Divrot::convert_DIVROT" );
+
+      ret = grib_get_size( ghDivergence, "values", &divValuesLength );  //-- get the data array size
+      badRetVal( ret, "grib_get_size divergence values", "Divrot::convert_DIVROT" );
+
+
+     if (voValuesLength != divValuesLength)
+     {
+        marslog(LOG_EROR,"Divrot: vorticity and divergence fields should have the same number of points (%d, %d)",
+                voValuesLength, divValuesLength);
+        return false;
+     }
+
+
+
+      // set the 'zero' GRIB values to zero
+      
+      if (ghZero != NULL)
+      {
+          zero = new double[voValuesLength];
+          memset( zero, 0, sizeof(double)*voValuesLength );
+
+          ret = grib_set_double_array (ghZero, "values", zero, voValuesLength);	 
+          badRetVal( ret, "grib_set_double_array", "Divrot::convert_DIVROT" );
+      }
+
+
+
+      // get the input GRIB message into a char buffer, because this is
+      // what makeuv() wants
+
+      ret = grib_get_message(ghVorticity,  (const void **)&bufferVorticity,  &sizeVorticity);
+      ret = grib_get_message(ghDivergence, (const void **)&bufferDivergence, &sizeDivergence);
+
+
+      // compute the size of the output buffers
+
+      DoutputValsLen = voValuesLength*3 + 4096;//(DtruncOut+1)*(DtruncOut+2) + 4096;
+      char *u = new char[DoutputValsLen * sizeof(double)];
+      char *v = new char[DoutputValsLen * sizeof(double)];
+
+
+      // set the output truncation in emoslib
+
+      fortfloat realv[4];
+      fortint truncout = DtruncOut;
+      fortint e;
+      char *int_parameter = "truncation";
+      //char *text = "";
+      //fortint   intv[4];
+      //XXXXintv[0] = DtruncOut;
+      //XXXX COMMENTED OUT WITH NEW MARS CLIENT, 21/10/2010 int2_intout("truncation",intv,realv,text);
+
+
+      //int2_intout("truncation",intv,realv,text);
+      e  = intout_(C2FORT(int_parameter),&truncout,realv,C2FORT(0),0,strlen(int_parameter));
+      e += intin_ (C2FORT(int_parameter),&truncout,realv,C2FORT(0),0,strlen(int_parameter));
+
+      if (e != 0)
+      {
+          marslog(LOG_EROR,"Divrot: error when setting output truncation");
+          return false;
+      }
+
+
+      // derive u/v using the libMars function
+
+      // err makeuv(char *vo, char *d, long inlen, char *u, char *v, long *outlen);
+      marsRet = makeuv(bufferVorticity, bufferDivergence, sizeVorticity, u, v, &DoutputValsLen);
+
+      if (marsRet != 0)
+      {
+          marslog(LOG_EROR,"Divrot: error converting from VO/D");
+          return false;
+      }
+
+
+
+      grib_handle *ghU = grib_handle_new_from_message(0, u, DoutputValsLen);
+      grib_handle *ghV = grib_handle_new_from_message(0, v, DoutputValsLen);
+
+//      repackGribValues (ghU, 24);
+//      repackGribValues (ghV, 24);
+
+      appendWindComponent( ghU );     //-- (normal) wind U comp
+      appendWindComponent( ghV );     //-- (normal) wind V comp
+
+
+/*
+      if( Dparam == eVorticity )
+      {                                      //-- vod2uv_ is in Emoslib
+//         vod2uv_( divOrVor, zero, &DtruncIn, U, V, &DtruncOut );
+         int2_intuvu( divOrVor, zero, inwords, U, V, &outwords );
+
+//       appendWindComponent( gh, U, 13 );   //-- rotational wind U comp
+//       appendWindComponent( gh, V, 14 );   //-- rotational wind V comp
+      }
+      else // eDivergence
+      {                                      //-- vod2uv_ is in Emoslib
+//         vod2uv_( zero, divOrVor, &DtruncIn, U, V, &DtruncOut );
+         int2_intuvu( zero, divOrVor, inwords, U, V, &outwords );
+
+//       appendWindComponent( gh, U, 11 );   //-- divergent wind U comp
+//       appendWindComponent( gh, V, 12 );   //-- divergent wind V comp
+      }
+
+
+      appendWindComponent( gh, U, 131 );     //-- (normal) wind U comp
+      appendWindComponent( gh, V, 132 );     //-- (normal) wind V comp
+*/
+
+//      delete [] divOrVor;                    //-- delete dynamic arrays
+      if (zero) delete [] zero;
+      if (u)    delete [] u;
+      if (v)    delete [] v;
+
+      grib_handle_delete (ghU);
+      grib_handle_delete (ghV);
+
+   }
+                                             //-- file to FieldSet and to Request
+   MvFieldSet fs( DfileOut.c_str() );
+   out = fs.getRequest();
+
+  return true;
+}
+
+//_____________________________________________________________________________
+//--
+//-- This is a copy of Velstr::isValidData_DVVALID.
+//-- The original Fortran code is still left in file
+//-- ../Velstr/velstr-exFortran.cc
+//--
+bool
+Divrot::isValidData_DVVALID( grib_handle* gh )
+{
+  const int cBUFLEN = 50;
+  char charBuf[ cBUFLEN+1 ];
+
+  size_t len = cBUFLEN;                      //-- is spectral or not?
+  int ret = grib_get_string( gh, "gridType", charBuf, &len );
+  badRetVal( ret, "grib_get_string/gridType"
+           , "Divrot::isValidData_DVVALID" );
+
+  if( string(charBuf) != cSPECTRAL )
+  {
+     marslog(LOG_EROR,"Divrot: data is '%s', must be spectral ('%s')"
+            ,charBuf
+            ,cSPECTRAL.c_str() );
+     return false;
+  }
+
+  long param;
+  ret = grib_get_long( gh, "mars.param", &param );
+  badRetVal( ret, "grib_get_string/mars.param", "Divrot::isValidData_DVVALID" );
+
+  if ( param == atol(cVORTICITY.c_str()) )
+  {
+     Dparam = eVorticity;
+     return true;
+  }
+
+  if ( param == atol(cDIVERGENCE.c_str()) )
+  {
+     Dparam = eDivergence;
+     return true;
+  }
+
+  marslog(LOG_EROR
+         ,"Divrot: param is '%s', must be vorticity (%s) or divergence (%s)"
+         ,charBuf
+         ,cVORTICITY.c_str()
+         ,cDIVERGENCE.c_str() );
+  return false;
+}
+//_____________________________________________________________________________
+//--
+//-- This is a copy of Velstr::smooth_BPPSMTH.
+//-- The original Fortran code is still left in file
+//-- ../Velstr/velstr-exFortran.cc
+//--
+bool
+Divrot::smooth_BPPSMTH( grib_handle* gh )
+{
+  size_t len = 0;                              //-- data values count
+  int ret = grib_get_size( gh, "values", &len );
+  badRetVal( ret, "grib_get_size", "Divrot::smooth_BPPSMTH" );
+
+  double* data = new double[len];            //-- get data values
+  ret = grib_get_double_array( gh, "values", data, &len );
+  badRetVal( ret, "grib_get_double_array", "Divrot::smooth_BPPSMTH" );
+#if 0
+  long DtruncIn = 0;                          //-- get truncation
+  ret = grib_get_long( gh, "pentagonalResolutionParameterJ", &DtruncIn );
+  badRetVal( ret, "pentagonalResolutionParameterJ", "Divrot::smooth_BPPSMTH" );
+#endif
+                                             //-- prepare smoothing stuff
+  double fltcons = -1./pow( Dfltc*(Dfltc+1), Dmfltexp );
+  sendProgress( "Spatial smoothing, Fltc = %g, Mfltexp = %g"
+              , Dfltc, Dmfltexp );
+  cout << "Spatial smoothing, Fltc = " << Dfltc
+       << ",  Mfltexp = " << Dmfltexp << endl;
+
+  long itinp1 = DtruncOut;  //-- NPREL4
+  double* dummy = new double[ itinp1 ];      //-- compute final smoothing coefficients
+  dummy[0] = 1.0;
+  for( int n=1; n<itinp1; ++n )
+  {
+     dummy[ n ] = exp( fltcons * pow( (double)(n*(n+1)), Dmfltexp ) );
+  }
+
+  int i  = 0;                                //-- do the smoothing
+  int ii = 0;
+  for( int m=0; m<itinp1; ++m )
+  for( int n=m; n<itinp1; ++n )
+  {
+     data[ ii   ] = dummy[ n ] * data[ i   ];
+     data[ ii+1 ] = dummy[ n ] * data[ i+1 ];
+     i  += 2;
+     ii += 2;
+  }
+                                             //-- put back the smoothed data
+  ret = grib_set_double_array( gh, "values", data, len );
+  badRetVal( ret, "grib_set_double_array", "Divrot::smooth_BPPSMTH" );
+
+  delete [] dummy;
+  delete [] data;
+
+  return true;
+}
+
+bool
+Divrot::checkOutputTruncation( grib_handle* gh )
+{
+  long myTtruncIn = 0;                          //-- get truncation
+  int ret = grib_get_long( gh, "pentagonalResolutionParameterJ", &myTtruncIn );
+  badRetVal( ret, "pentagonalResolutionParameterJ", "Divrot::checkOutputTruncation" );
+
+  DtruncIn = myTtruncIn;
+
+  if( DtruncOut > DtruncIn )
+  {
+     marslog( LOG_EROR, "Oops, requested output truncation %d greater than input %d..."
+            , DtruncOut, (int)DtruncIn );
+     marslog( LOG_EROR, "... setting output truncation to %d", (int)DtruncIn );
+     cerr << "Oops, requested output truncation " << DtruncOut
+          << " greater than input " << DtruncIn << endl
+          << "... setting output truncation to " << DtruncIn << endl;
+
+     DtruncOut = DtruncIn;                       //-- fall back to input truncation
+
+     return false;
+  }
+  else
+     return true;
+
+
+
+
+
+/*
+
+ useful code?
+
+in MARS:
+
+ACTUALLY
+
+int2_intout("truncation",intv,realv,text))
+
+ only 1st element of intv1 is used.
+
+
+NOT:
+fortint int2_intin(const char* param,fortint iv[],fortfloat dv[],const char* cv)
+ {
+         if(!cv) cv = "";
+         return intin_(param,iv,dv,cv,strlen(param),strlen(cv));
+ }
+ 
+ 
+ Called by MARS:intuvs2, where intv is 1279, realv is unset, text is ""
+                 if(err = int2_intin("truncation",intv,realv,text))
+                 {
+                         fprintf(stderr,"INTUVS2: Truncation  setup INTIN failed %d\n",err);
+                         goto cleanup;
+                 }
+
+ 
+*/
+
+
+
+
+
+
+
+
+}
+
diff --git a/src/Ecfile/Ecfs.cc b/src/Ecfile/Ecfs.cc
new file mode 100755
index 0000000..452e593
--- /dev/null
+++ b/src/Ecfile/Ecfs.cc
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Modified from Baudouin's 'Ecfile.cc' by vk/961115
+
+#include <inc_iostream.h>
+
+#include <Metview.h>
+
+//______________________________________________________
+
+class Ecfs : public MvService {
+public:
+	Ecfs() : MvService("ECFS") {}
+	void serve(MvRequest&,MvRequest&);
+};
+//______________________________________________________
+
+void Ecfs::serve(MvRequest& in,MvRequest& out)
+{
+	const char *path = in("FILE_NAME");
+	const char *domain = in("ECFS_DOMAIN");
+	char buf[1024];
+	char ecfs_cmd[1024];
+	char *tmp = marstmp();
+
+	in.print();
+
+	sprintf( ecfs_cmd, "ecp -o %s%s %s", domain, path, tmp );
+
+	//sprintf(buf,"csh -exec \'Ecp ec:%s %s 2>&1\'",path,tmp);
+	//sprintf(buf,"csh -exec \'Ecp -o ec:%s %s\'",path,tmp);
+	sprintf(buf,"ksh -c \' . $HOME/.kshrc ; set -e ; %s\'", ecfs_cmd );
+	cout << "\n command: " << buf << endl;
+
+	FILE *f = popen(buf,"r");;
+	if(f == 0)
+	{
+		setError(1,"call to Ecfs failed");
+		return;
+	}
+	cout << " command started ok" << endl;
+
+	while(fgets(buf,sizeof(buf),f))
+	{
+		if(*buf) buf[strlen(buf)-1] = 0;
+		marslog(LOG_INFO,"%s",buf);	
+	}
+
+	int e;
+	if(e = pclose(f))
+	{
+		marslog( LOG_EROR, "%s", ecfs_cmd );	
+		setError(1,"Ecfs call returned error code %d",e);
+		return;
+	}
+
+	 MvRequest grib    = guess_class(tmp);
+	 grib("PATH")      = tmp;
+	 grib("TEMPORARY") = 1;
+	 out = grib;
+}
+//______________________________________________________
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	Ecfs  myEcfs;
+	theApp.run();
+}
diff --git a/src/Ecfile/Makefile.am b/src/Ecfile/Makefile.am
new file mode 100644
index 0000000..54111af
--- /dev/null
+++ b/src/Ecfile/Makefile.am
@@ -0,0 +1,10 @@
+bin_PROGRAMS = bin/Ecfs
+
+bin_Ecfs_SOURCES  = Ecfs.cc
+
+bin_Ecfs_LDADD    = $(STANDARD_METVIEW_LIBS)
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Ecfile/Makefile.in b/src/Ecfile/Makefile.in
new file mode 100644
index 0000000..aa3f9bd
--- /dev/null
+++ b/src/Ecfile/Makefile.in
@@ -0,0 +1,629 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Ecfs$(EXEEXT)
+subdir = src/Ecfile
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Ecfs_OBJECTS = Ecfs.$(OBJEXT)
+bin_Ecfs_OBJECTS = $(am_bin_Ecfs_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Ecfs_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Ecfs_SOURCES)
+DIST_SOURCES = $(bin_Ecfs_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Ecfs_SOURCES = Ecfs.cc
+bin_Ecfs_LDADD = $(STANDARD_METVIEW_LIBS)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Ecfile/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Ecfile/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Ecfs$(EXEEXT): $(bin_Ecfs_OBJECTS) $(bin_Ecfs_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Ecfs$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_Ecfs_OBJECTS) $(bin_Ecfs_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Ecfs.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Event/Event.cc b/src/Event/Event.cc
new file mode 100644
index 0000000..fa4465c
--- /dev/null
+++ b/src/Event/Event.cc
@@ -0,0 +1,315 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+*/
+
+#include <signal.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <setjmp.h>
+#include <string.h>
+#include <strings.h>
+
+#include "Event.h"
+#include "MvDebugPrintControl.h"
+
+
+static option opts[] = {
+	{"startup",NULL,"-startup","xserv",
+	t_str,sizeof(char*),OFFSET(Options,startup),},
+	{"exit",NULL,"-exit",NULL,
+	t_str,sizeof(char*),OFFSET(Options,exit),},
+	{"port","EVENT_PORT","-port","0",
+	t_int,sizeof(int),OFFSET(Options,port)},
+	{"environment",NULL,"-environment",NULL,
+	t_str,sizeof(char*),OFFSET(Options,env)},
+};
+
+long    Event::gUniqID = 0;
+fd_set  Event::gFiles;
+Options Event::gOpt  = { 0,};
+
+//==============================================================================
+
+void Event::NewService(int soc)
+{
+	struct sockaddr_in from;
+	int     snew;
+	int     fromlen;
+
+	fromlen = sizeof(from);
+#if defined(Sgi) || defined(Hpux) || defined(__alpha) 
+	if((snew = accept(soc, (sockaddr*)&from, &fromlen))<0)
+#else
+	if( (snew = accept(soc, (sockaddr*)&from, (socklen_t *)&fromlen)) < 0 )
+#endif
+	{
+		/* Interrupted system call : got on SIGCHLD signals */
+		if(errno != EINTR) marslog(LOG_WARN|LOG_PERR,"accept");
+		return;
+	}
+
+	marslog(LOG_INFO,"Got connection");
+	if(from.sin_family == AF_INET)
+	{
+		char *net = inet_ntoa(from.sin_addr);
+		struct hostent  *remote;
+
+		remote = gethostbyaddr((char*)&from.sin_addr,
+		    sizeof(from.sin_addr),
+		    from.sin_family);
+
+			if(remote)
+				marslog(LOG_INFO,"incoming host is %s (%s)",
+					remote->h_name,net);
+			else
+				marslog(LOG_INFO,"incoming address is %s",net);
+
+	}
+	else
+	{
+		marslog(LOG_INFO,"connection is not from internet");
+		close(snew);
+		return;
+	}
+
+	if(fcntl(snew,F_SETFD,FD_CLOEXEC)<0)
+			marslog(LOG_EROR|LOG_PERR,"fcntl");
+	Service *s = new Service(snew);
+	s->ProcessIncoming();
+
+}
+
+//==============================================================================
+
+void Event::CheckQueues(void)
+{
+	WaitingQueue::Process();
+	OutputQueue::Process();
+}
+
+//==============================================================================
+
+void Event::CheckTimeout(void)
+{
+	int alive = Service::CheckTimeout();
+
+	// If exit module is given, return
+	if(gOpt.exit) return;
+
+	// Else, no 'alive' modules
+
+	if(alive == 0               &&
+	   WaitingQueue::Empty()    && 
+	   ProcessingQueue::Empty() && 
+	   OutputQueue::Empty())
+	   {
+	         mars.warning = true;
+
+		 marslog(LOG_WARN,"+--------------------------------------------+");
+		 marslog(LOG_WARN,"|   No more modules - Event will quit...     |");
+		 marslog(LOG_WARN,"| Quitting kills the communication port and  |");
+		 marslog(LOG_WARN,"| this will stop all the remaining modules.  |");
+		 marslog(LOG_WARN,"| Ignore FATAL messages caused by Dead Port! |");
+		 marslog(LOG_WARN,"+--------------------------------------------+");
+
+		 marsexit(0);
+	    }
+}
+
+//==============================================================================
+
+void Event::Startup()
+{
+	char buf[1024];
+	char host[1024];
+
+	if( getenv( "METVIEW_LOCALHOST" ) )
+	  {
+	    strcpy( buf, "localhost" );   //-- for network safe demo on portable pc
+	    marslog(LOG_INFO, "NOTE: $EVENT_HOST is now \'localhost\'!" );
+	  }
+	else
+	  {
+	    gethostname(host,sizeof(host));
+	    sprintf(buf,"EVENT_HOST=%s",host);
+	  }
+	putenv(strdup(buf));
+
+	sprintf(buf,"EVENT_PORT=%d",gOpt.port);
+	putenv(strdup(buf));
+
+	if(gOpt.startup)
+	{
+		sprintf(buf,"%s &",gOpt.startup);
+		if(system(buf))
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot start %s",gOpt.startup);
+			marslog(LOG_EXIT,"Bye...");
+		}
+
+	}
+}
+
+//==============================================================================
+
+void Event::CleanUp(int ,void *)
+{
+	if(gOpt.env) unlink(gOpt.env);
+}
+
+//==============================================================================
+
+void Event::Loop()
+{
+
+	fd_set  fds;
+	static struct timeval smalltime = { 0, 100,  };
+	static struct timeval bigtime   = { 60,  0,  };
+	int soc;
+
+	/* Start real server */
+
+	if((soc = tcp_server(gOpt.port))<0)
+		marslog(LOG_EXIT,"Exiting server");
+
+	
+	gOpt.port = port_of(addr_of(soc));
+	marslog(LOG_INFO,"Starting server: port is %d",gOpt.port);
+
+	if(gOpt.env)
+	{
+		FILE *f = fopen(gOpt.env,"w");
+		if(f == NULL)
+			marslog(LOG_EXIT|LOG_PERR,"Cannot open %s",gOpt.env);
+		fprintf(f,"EVENT_PORT=%d\n",gOpt.port);
+		fprintf(f,";TMPDIR=%s\n",getenv("TMPDIR"));
+		fclose(f);
+	}
+	
+
+	if(fcntl(soc,F_SETFD,FD_CLOEXEC)<0)
+		marslog(LOG_EROR|LOG_PERR,"fcntl");
+
+	FD_ZERO(&gFiles);
+	FD_SET(soc,&gFiles);
+
+	Startup();
+
+	for(;;)
+	{
+		struct timeval curr_delay = bigtime; //-- create a copy
+
+		if(!OutputQueue::Empty() || !WaitingQueue::Empty())
+			curr_delay = smalltime;
+
+		//-- use a copy to safeguard original structs!
+		struct timeval *delay = &curr_delay;
+
+		fds = gFiles;
+
+#ifdef hpux
+//		Feedback from UkMet/SGI:
+//		- HP should be happy now with the 'standard' parameters!
+//        - but not at ECMWF workstation!!
+		switch(select(FD_SETSIZE,(int*)&fds,NULL,NULL,delay) )
+#else
+		switch(select(FD_SETSIZE,&fds,NULL,NULL,delay) )
+#endif
+		{
+
+		case -1:
+			if(errno != EINTR)
+				/* Interrupted system call : got on SIGCHLD signals */
+				marslog(LOG_EXIT|LOG_PERR,"select");
+			break;
+
+		case 0: /* time out */
+			break;
+
+		default:
+			if(FD_ISSET(soc,&fds)) /* new service */
+				NewService(soc);
+			else
+				Service::DispatchInput(fds);
+			break;
+		}
+
+		CheckQueues();
+		CheckTimeout();
+	}
+}
+
+//==============================================================================
+
+void Event::EndOfModule(const char *name)
+{
+	if(name && gOpt.exit == name)
+		marslog(LOG_EXIT,"%s exited, closing all lines",name);
+}
+
+//==============================================================================
+
+void Event::AbortIfBatch( const char* )
+{
+  const char* mode = getenv( "MV_BATCH_NOABORT" );
+  if(mode)
+    {
+      marslog(LOG_INFO,"AbortIfBatch: MV_BATCH_NOABORT set, no abort!");
+      return;                                //-- NO ABORT requested by user
+    }
+
+  mode = getenv( "METVIEW_MODE" );
+  if( mode && strcmp(mode,"batch") == 0 )    //-- abort only batch macros!
+    {
+      mars.warning = true;
+
+      marslog(LOG_WARN,"+--------------------------------------------+");
+      marslog(LOG_WARN,"| A Metview module has crashed in batch mode |");
+      marslog(LOG_WARN,"| this will force your batch macro to abort! |");
+      marslog(LOG_WARN,"|       Bailing out - Good Bye World!        |");
+      marslog(LOG_WARN,"+--------------------------------------------+");
+      marslog(LOG_WARN,"PS: set env.var. MV_BATCH_NOABORT if you do not want to abort!");
+
+      marsexit(1);
+    }
+
+  marslog(LOG_INFO,"AbortIfBatch: not batch, no abort!");
+}
+
+//==============================================================================
+
+void Event::Init(int argc,char **argv)
+{
+	marsinit(&argc,argv,&gOpt,NUMBER(opts),opts);
+	install_exit_proc(CleanUp,NULL);
+	mvSetMarslogLevel();
+}
+
+//==============================================================================
+
+int main(int argc,char **argv)
+{
+	Event::Init(argc,argv);
+	Event::Loop();
+	return 0;
+}
diff --git a/src/Event/Makefile.am b/src/Event/Makefile.am
new file mode 100755
index 0000000..1bb84e7
--- /dev/null
+++ b/src/Event/Makefile.am
@@ -0,0 +1,12 @@
+
+bin_PROGRAMS = bin/event
+
+bin_event_SOURCES  = Event.cc OutputQueue.cc ProcessingQueue.cc Queue.cc Service.cc WaitingQueue.cc \
+                     include/Event.h include/OutputQueue.h include/ProcessingQueue.h include/Queue.h include/Service.h include/WaitingQueue.h
+bin_event_CPPFLAGS = -Iinclude 
+bin_event_LDADD    = $(STANDARD_METVIEW_LIBS)
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Event/Makefile.in b/src/Event/Makefile.in
new file mode 100644
index 0000000..6f3646e
--- /dev/null
+++ b/src/Event/Makefile.in
@@ -0,0 +1,752 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/event$(EXEEXT)
+subdir = src/Event
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_event_OBJECTS = bin_event-Event.$(OBJEXT) \
+	bin_event-OutputQueue.$(OBJEXT) \
+	bin_event-ProcessingQueue.$(OBJEXT) bin_event-Queue.$(OBJEXT) \
+	bin_event-Service.$(OBJEXT) bin_event-WaitingQueue.$(OBJEXT)
+bin_event_OBJECTS = $(am_bin_event_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_event_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_event_SOURCES)
+DIST_SOURCES = $(bin_event_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_event_SOURCES = Event.cc OutputQueue.cc ProcessingQueue.cc Queue.cc Service.cc WaitingQueue.cc \
+                     include/Event.h include/OutputQueue.h include/ProcessingQueue.h include/Queue.h include/Service.h include/WaitingQueue.h
+
+bin_event_CPPFLAGS = -Iinclude 
+bin_event_LDADD = $(STANDARD_METVIEW_LIBS)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Event/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Event/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/event$(EXEEXT): $(bin_event_OBJECTS) $(bin_event_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/event$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_event_OBJECTS) $(bin_event_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_event-Event.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_event-OutputQueue.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_event-ProcessingQueue.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_event-Queue.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_event-Service.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_event-WaitingQueue.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_event-Event.o: Event.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-Event.o -MD -MP -MF $(DEPDIR)/bin_event-Event.Tpo -c -o bin_event-Event.o `test -f 'Event.cc' || echo '$(srcdir)/'`Event.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-Event.Tpo $(DEPDIR)/bin_event-Event.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Event.cc' object='bin_event-Event.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-Event.o `test -f 'Event.cc' || echo '$(srcdir)/'`Event.cc
+
+bin_event-Event.obj: Event.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-Event.obj -MD -MP -MF $(DEPDIR)/bin_event-Event.Tpo -c -o bin_event-Event.obj `if test -f 'Event.cc'; then $(CYGPATH_W) 'Event.cc'; else $(CYGPATH_W) '$(srcdir)/Event.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-Event.Tpo $(DEPDIR)/bin_event-Event.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Event.cc' object='bin_event-Event.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-Event.obj `if test -f 'Event.cc'; then $(CYGPATH_W) 'Event.cc'; else $(CYGPATH_W) '$(srcdir)/Event.cc'; fi`
+
+bin_event-OutputQueue.o: OutputQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-OutputQueue.o -MD -MP -MF $(DEPDIR)/bin_event-OutputQueue.Tpo -c -o bin_event-OutputQueue.o `test -f 'OutputQueue.cc' || echo '$(srcdir)/'`OutputQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-OutputQueue.Tpo $(DEPDIR)/bin_event-OutputQueue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputQueue.cc' object='bin_event-OutputQueue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-OutputQueue.o `test -f 'OutputQueue.cc' || echo '$(srcdir)/'`OutputQueue.cc
+
+bin_event-OutputQueue.obj: OutputQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-OutputQueue.obj -MD -MP -MF $(DEPDIR)/bin_event-OutputQueue.Tpo -c -o bin_event-OutputQueue.obj `if test -f 'OutputQueue.cc'; then $(CYGPATH_W) 'OutputQueue.cc'; else $(CYGPATH_W) '$(srcdir)/OutputQueue.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-OutputQueue.Tpo $(DEPDIR)/bin_event-OutputQueue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputQueue.cc' object='bin_event-OutputQueue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-OutputQueue.obj `if test -f 'OutputQueue.cc'; then $(CYGPATH_W) 'OutputQueue.cc'; else $(CYGPATH_W) '$(srcdir)/OutputQueue.cc'; fi`
+
+bin_event-ProcessingQueue.o: ProcessingQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-ProcessingQueue.o -MD -MP -MF $(DEPDIR)/bin_event-ProcessingQueue.Tpo -c -o bin_event-ProcessingQueue.o `test -f 'ProcessingQueue.cc' || echo '$(srcdir)/'`ProcessingQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-ProcessingQueue.Tpo $(DEPDIR)/bin_event-ProcessingQueue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ProcessingQueue.cc' object='bin_event-ProcessingQueue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-ProcessingQueue.o `test -f 'ProcessingQueue.cc' || echo '$(srcdir)/'`ProcessingQueue.cc
+
+bin_event-ProcessingQueue.obj: ProcessingQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-ProcessingQueue.obj -MD -MP -MF $(DEPDIR)/bin_event-ProcessingQueue.Tpo -c -o bin_event-ProcessingQueue.obj `if test -f 'ProcessingQueue.cc'; then $(CYGPATH_W) 'ProcessingQueue.cc'; else $(CYGPATH_W) '$(srcdir)/ProcessingQueue.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-ProcessingQueue.Tpo $(DEPDIR)/bin_event-ProcessingQueue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ProcessingQueue.cc' object='bin_event-ProcessingQueue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-ProcessingQueue.obj `if test -f 'ProcessingQueue.cc'; then $(CYGPATH_W) 'ProcessingQueue.cc'; else $(CYGPATH_W) '$(srcdir)/ProcessingQueue.cc'; fi`
+
+bin_event-Queue.o: Queue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-Queue.o -MD -MP -MF $(DEPDIR)/bin_event-Queue.Tpo -c -o bin_event-Queue.o `test -f 'Queue.cc' || echo '$(srcdir)/'`Queue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-Queue.Tpo $(DEPDIR)/bin_event-Queue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Queue.cc' object='bin_event-Queue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-Queue.o `test -f 'Queue.cc' || echo '$(srcdir)/'`Queue.cc
+
+bin_event-Queue.obj: Queue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-Queue.obj -MD -MP -MF $(DEPDIR)/bin_event-Queue.Tpo -c -o bin_event-Queue.obj `if test -f 'Queue.cc'; then $(CYGPATH_W) 'Queue.cc'; else $(CYGPATH_W) '$(srcdir)/Queue.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-Queue.Tpo $(DEPDIR)/bin_event-Queue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Queue.cc' object='bin_event-Queue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-Queue.obj `if test -f 'Queue.cc'; then $(CYGPATH_W) 'Queue.cc'; else $(CYGPATH_W) '$(srcdir)/Queue.cc'; fi`
+
+bin_event-Service.o: Service.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-Service.o -MD -MP -MF $(DEPDIR)/bin_event-Service.Tpo -c -o bin_event-Service.o `test -f 'Service.cc' || echo '$(srcdir)/'`Service.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-Service.Tpo $(DEPDIR)/bin_event-Service.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Service.cc' object='bin_event-Service.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-Service.o `test -f 'Service.cc' || echo '$(srcdir)/'`Service.cc
+
+bin_event-Service.obj: Service.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-Service.obj -MD -MP -MF $(DEPDIR)/bin_event-Service.Tpo -c -o bin_event-Service.obj `if test -f 'Service.cc'; then $(CYGPATH_W) 'Service.cc'; else $(CYGPATH_W) '$(srcdir)/Service.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-Service.Tpo $(DEPDIR)/bin_event-Service.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Service.cc' object='bin_event-Service.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-Service.obj `if test -f 'Service.cc'; then $(CYGPATH_W) 'Service.cc'; else $(CYGPATH_W) '$(srcdir)/Service.cc'; fi`
+
+bin_event-WaitingQueue.o: WaitingQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-WaitingQueue.o -MD -MP -MF $(DEPDIR)/bin_event-WaitingQueue.Tpo -c -o bin_event-WaitingQueue.o `test -f 'WaitingQueue.cc' || echo '$(srcdir)/'`WaitingQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-WaitingQueue.Tpo $(DEPDIR)/bin_event-WaitingQueue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='WaitingQueue.cc' object='bin_event-WaitingQueue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-WaitingQueue.o `test -f 'WaitingQueue.cc' || echo '$(srcdir)/'`WaitingQueue.cc
+
+bin_event-WaitingQueue.obj: WaitingQueue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_event-WaitingQueue.obj -MD -MP -MF $(DEPDIR)/bin_event-WaitingQueue.Tpo -c -o bin_event-WaitingQueue.obj `if test -f 'WaitingQueue.cc'; then $(CYGPATH_W) 'WaitingQueue.cc'; else $(CYGPATH_W) '$(srcdir)/WaitingQueue.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_event-WaitingQueue.Tpo $(DEPDIR)/bin_event-WaitingQueue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='WaitingQueue.cc' object='bin_event-WaitingQueue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_event_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_event-WaitingQueue.obj `if test -f 'WaitingQueue.cc'; then $(CYGPATH_W) 'WaitingQueue.cc'; else $(CYGPATH_W) '$(srcdir)/WaitingQueue.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Event/OutputQueue.cc b/src/Event/OutputQueue.cc
new file mode 100644
index 0000000..3f3d9a3
--- /dev/null
+++ b/src/Event/OutputQueue.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Event.h"
+
+Queue OutputQueue::gQueue;
+QIter OutputQueue::gIter;
+
+//==============================================================================
+
+OElem::OElem(request *r,Service *s) : QElem(r),svc_(s)
+{
+}
+
+//==============================================================================
+
+OElem::~OElem()
+{
+}
+
+//==============================================================================
+
+void OutputQueue::Append(request *r,Service *s)
+{
+	Append(new OElem(r,s));
+}
+
+//==============================================================================
+
+void OutputQueue::Insert(request *r,Service *s)
+{
+	Insert(new OElem(r,s));
+}
+
+//==============================================================================
+
+void OutputQueue::Process()
+{
+	OElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{
+		Service *s = q->Module();
+		request *r = q->Request();
+#ifdef USE_THREADS
+		s->EncodeRequest(q);
+		Dequeue(q);
+#else
+		if(s->EncodeRequest(r) == 0)
+			Remove(q);
+		else
+			break;
+#endif
+			
+	}
+}
+
+//==============================================================================
+
+void OutputQueue::RemoveAll(Service *s)
+{
+	OElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+		if(q->Module() == s)
+		{
+			// Requeue in Waiting queue
+			WaitingQueue::Append(q->Request(),q->Module()->Name());	
+			Remove(q);
+		}
+}
diff --git a/src/Event/ProcessingQueue.cc b/src/Event/ProcessingQueue.cc
new file mode 100644
index 0000000..7d80ac7
--- /dev/null
+++ b/src/Event/ProcessingQueue.cc
@@ -0,0 +1,110 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Event.h"
+
+Queue ProcessingQueue::gQueue;
+QIter ProcessingQueue::gIter;
+
+//==============================================================================
+
+PElem::PElem(request *r,Service *s) : QElem(r),svc_(s)
+{
+}
+
+//==============================================================================
+
+PElem::~PElem()
+{
+}
+
+//==============================================================================
+
+void ProcessingQueue::Append(request *r,Service *s)
+{
+	Append(new PElem(r,s));
+}
+
+//==============================================================================
+
+// When a module exits, remove all refernec to it and
+// send an error to the calling modules.
+
+void ProcessingQueue::RemoveAll(Service *s)
+{
+	PElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{		
+		if(q->Module() == s)
+		{
+		        marslog(LOG_INFO,"Service %s died before completing the request",s->Name());
+			Service::ReplyFail("Service %s died before completing the request",
+				s->Name(),
+				q->Request());
+			Remove(q);
+			Event::AbortIfBatch("ProcessingQueue::RemoveAll()");
+		}
+		
+	}
+}
+
+//==============================================================================
+
+void ProcessingQueue::NotifyMonitor()
+{
+	PElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{
+		Service *s = q->Module();
+		s->NotifyMonitor("SERVICE",q->Request());
+	}
+}
+
+//==============================================================================
+
+// A request has completed, remove it from the queue
+
+void ProcessingQueue::Remove(request *r)
+{
+	const char *reqid = get_value(r,"REQ_ID",0);
+	PElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{		
+		const char *id = get_value(q->Request(),"REQ_ID",0);
+		if(id == reqid)
+			Remove(q);
+	}
+}
+
+//==============================================================================
+
+Service* ProcessingQueue::Followup(request *r,Service *s)
+{
+	const char *reqid = get_value(r,"REQ_ID",0);
+	PElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{		
+		const char *id = get_value(q->Request(),"REQ_ID",0);
+		if(id == reqid)
+		{
+			Service *a = q->Module();
+			q->Reparent(s);
+			return a;
+		}
+	}
+	return 0;
+}
diff --git a/src/Event/Queue.cc b/src/Event/Queue.cc
new file mode 100644
index 0000000..18b98fd
--- /dev/null
+++ b/src/Event/Queue.cc
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Event.h"
+
+//==============================================================================
+
+QElem::QElem(request* req) : req_(clone_all_requests(req)),next_(0)
+{
+}
+
+//==============================================================================
+
+QElem::~QElem()
+{
+	free_all_requests(req_);
+}
+
+//==============================================================================
+
+QElem* QIter::operator()()
+{
+	if(!q_)
+	    return 0;
+	
+	QElem* q = q_;
+	q_ = q_->next_;
+	return q;
+}
+
+//==============================================================================
+
+QIter::QIter(Queue& q)
+{
+	q_ = q.head_;
+}
+
+//==============================================================================
+
+void QIter::Rewind(Queue& q)
+{
+	q_ = q.head_;
+}
+
+//==============================================================================
+
+Queue::Queue() : head_(0),tail_(0)
+{
+}
+
+//==============================================================================
+
+void Queue::Append(QElem *q)
+{
+	q->next_ = 0;
+	if(head_) 
+		tail_->next_ = q;
+	else 
+		head_ = q;
+	tail_    = q;
+}
+
+//==============================================================================
+
+void Queue::Insert(QElem *q)
+{
+	q->next_ = head_;
+	head_    = q;
+	if(!tail_)
+	    tail_ = q;
+}
+
+//==============================================================================
+
+QElem* Queue::Pop()
+{
+	QElem *p = head_;
+	if(p)
+	    Dequeue(p);
+	return p;
+}
+
+void Queue::Dequeue(QElem *q)
+{
+	QElem *p = head_;
+	QElem *s = 0;
+	while(p)
+	{
+		if(p == q)
+		{
+		    if(s)
+		    	s->next_ = q->next_;
+		    if(q == tail_)
+		    	tail_ = s;
+		    if(q == head_)
+		    	head_ = q->next_;
+
+		    q->next_ = 0;
+
+		    return;
+
+		}
+		s = p;
+		p = p->next_;
+	}
+}
+
+void Queue::Remove(QElem *q)
+{
+	Dequeue(q);
+	delete q;
+}
+
+void Queue::RemoveAll()
+{
+	while(head_)
+	    Remove(head_);
+}
diff --git a/src/Event/Service.cc b/src/Event/Service.cc
new file mode 100644
index 0000000..17a982b
--- /dev/null
+++ b/src/Event/Service.cc
@@ -0,0 +1,909 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <setjmp.h>
+#include <string.h>
+#include <strings.h>
+#include <signal.h>
+
+#ifdef NO_CHEADERS
+# include <sys/time.h>
+#else
+# include <ctime>
+#endif
+
+#include "Event.h"
+
+
+Service *Service::gHead = 0;
+Service *Service::gMonitor =0;
+
+//==============================================================================
+
+typedef int (*pvoid) ();
+
+Service::Service(int soc)
+{
+	next_ = gHead;
+	gHead = this;
+
+	soc_ = soc;
+	
+	Event::AddInput(soc);
+
+//#if defined(sun) || defined(__alpha) ...and Linux/GNU...
+	xdrrec_create(&x_, 0,0,(char*)&soc_,(mxdrproc)readtcp,(mxdrproc)writetcp);
+//#else
+// 	xdrrec_create(&x_, 0,0,(void*)&soc_,(mxdrproc)readtcp,(mxdrproc)writetcp);
+//#endif
+
+	name_          = 0;
+	host_          = 0;
+	user_          = 0;
+	ref_           = -1;
+	timeout_       = 0;
+	alive_         = 0;
+	outstanding_   = 0;
+	want_progress_ = 0;
+	want_message_  = 0;
+	valid_         = 0;
+	maximum_       = 1;
+
+#ifdef USE_THREADS
+
+	pthread_mutex_init(&mutex_,0);
+	pthread_cond_init(&cond_,0);
+
+	stop_          = 0;
+	running_       = 0;
+	threaded_      = 0;
+
+
+#endif
+}
+
+#ifdef USE_THREADS
+void* Service::StartThread(void *self)
+{
+	((Service*)self)->ThreadProc();
+	return 0;
+}
+
+void Service::ThreadProc()
+{
+	// Notify start
+
+	pthread_mutex_lock(&mutex_);
+
+	marslog(LOG_INFO,"Thread started for %s",name_);
+
+
+	running_ = 1;
+	pthread_cond_signal(&cond_);
+	pthread_mutex_unlock(&mutex_);
+
+	int more = 1;
+	while(more)
+	{
+		QElem* q = 0;
+		pthread_mutex_lock(&mutex_);
+		while(!stop_ && queue_.Empty())
+		{
+			marslog(LOG_INFO,"Thread pthread_cond_wait for %s",name_);
+			pthread_cond_wait(&cond_,&mutex_);
+		}
+
+
+		if(stop_)
+		{
+			marslog(LOG_INFO,"Thread stop received %s",name_);
+			more = 0;
+		}
+		else {
+			q = queue_.Pop();
+			if( q->Request() )
+			   marslog(LOG_INFO,"Thread work for %s %p %s",name_,q,q?q->Request()->name:"");
+			else
+			{
+			   marslog(LOG_INFO,"Thread work for %s %p [empty request => discarded!!!]",name_,q);
+			   q = 0;
+			}
+		}
+
+		pthread_mutex_unlock(&mutex_);
+
+		if(q) 
+		{
+
+			marslog(LOG_INFO,"Thread --> encode_request for %s %p",name_,this);
+
+//print_all_requests(q->Request());
+
+			request* r = q->Request();
+
+			encode_request(r,&x_);
+
+			marslog(LOG_INFO,"Thread <-- encode_request for %s",name_);
+
+			pthread_mutex_lock(&mutex_);
+			// Because libmars is not reentrant, don;t delete the requests here
+			done_.Append(q);
+			pthread_mutex_unlock(&mutex_);
+		}
+	}
+	
+	
+}
+
+#endif
+
+//==============================================================================
+
+int Service::Busy()
+{
+	return maximum_ != 0 && outstanding_ >= maximum_;
+}
+
+//==============================================================================
+
+void Service::HandleRegister(request *r)
+{
+	static char *service = strcache("service");
+	const char *name = get_value(r,"NAME",0);
+
+	if(Find(name))
+	{
+		marslog(LOG_WARN,"Service %s is already registered",name);
+		return;
+	}
+
+	ref_       = Event::UniqueID();
+	name_      = strcache(get_value(r,"NAME",0));
+	user_      = strcache(get_value(r,"USER",0));
+	host_      = strcache(get_value(r,"HOST",0));
+	pid_       = atol(get_value(r,"PID",0));
+	lastcall_  = time(0);
+	valid_     = 1;
+
+	marslog(LOG_INFO,"Register: %s %s %s %d as ref %d",
+		name_,
+	    user_,
+	    host_,
+	    pid_,
+		ref_);
+
+	/* Check for options */
+	
+	request *u = mars.setup;
+	while(u)
+	{
+		if(u->name == service)
+		{
+			const char *nme = get_value(u,"name",0);
+			if(nme && (name == nme))
+			{
+				const char *alive   = get_value(u,"alive",0);
+				const char *timeout = get_value(u,"timeout",0);
+				const char *maximum = get_value(u,"maximum",0);
+
+				if(timeout)  timeout_ = atol(timeout)*60;
+				if(alive)    alive_   = atoi(alive);
+				if(maximum)  maximum_ = atoi(maximum);
+
+				marslog(LOG_INFO,"%s : Timeout = %d Alive = %d, Max = %d",
+					name_,timeout_,alive_,maximum_);
+
+			}
+		}
+		u = u->next;
+	}
+
+#ifdef USE_THREADS
+
+	pthread_attr_t attr;
+	pthread_attr_init(&attr);
+
+	const size_t size = 8*1024*1024;
+	pthread_attr_setstacksize(&attr,size);
+
+	if(pthread_create(&thread_,&attr,StartThread,this))
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot start thread");
+		threaded_ = 0;
+	}
+	else
+	{
+		// Wait for thread to be running
+		pthread_mutex_lock(&mutex_);
+		while(!running_)
+			pthread_cond_wait(&cond_,&mutex_);
+		pthread_mutex_unlock(&mutex_);
+
+		threaded_ = 1;
+		marslog(LOG_INFO,"Thread ok for %s",name_);
+	}
+#endif
+
+	NotifyMonitor("REGISTER",r);
+	u = empty_request("BIRTH");
+	reqcpy(u,r);
+	BroadcastMessage(u);
+	free_all_requests(u);
+
+
+}
+
+//==============================================================================
+
+Service::~Service()
+{
+
+#ifdef USE_THREADS
+	
+	marslog(LOG_INFO,"Delete service %s",name_);
+
+	if(threaded_)
+	{
+		pthread_mutex_lock(&mutex_);
+		stop_ = 1;
+		pthread_cond_signal(&cond_);
+		pthread_mutex_unlock(&mutex_);
+
+		void *data = 0;
+	marslog(LOG_INFO,"pthread_join service %s",name_);
+		pthread_join(thread_,&data);
+	}
+
+	pthread_mutex_destroy(&mutex_);
+	pthread_cond_destroy(&cond_);
+
+	queue_.RemoveAll();
+	done_.RemoveAll();
+
+#endif
+	
+	
+	Service *s = gHead;
+	Service *t = 0;
+
+	// Remove self for the list
+	while(s)
+	{
+		if(s == this)
+		{
+			if(t) t->next_ = next_;
+			else  gHead    = next_;
+			break;
+		}
+		t = s;
+		s = s->next_;
+	}
+
+	// Check if monitor
+
+	if(this == gMonitor)
+		gMonitor = 0;
+
+	marslog(LOG_INFO,"Closing service %s",name_?name_:"(null)");
+	marslog(LOG_INFO,"%d outstanding replies",outstanding_);
+
+	// Send missing replies
+
+	ProcessingQueue::RemoveAll(this);
+
+	// Kill Output requests
+	OutputQueue::RemoveAll(this);
+
+	if(name_)
+	{
+		NotifyMonitor("EXIT",0);
+		request *r = empty_request("DEATH");
+		set_value(r,"NAME","%s",name_);
+		set_value(r,"USER","%s",user_);
+		set_value(r,"HOST","%s",host_);
+		set_value(r,"PID","%ld",pid_);
+		BroadcastMessage(r);
+		free_all_requests(r);
+		Event::EndOfModule(name_);
+	}
+
+	xdr_destroy(&x_);
+	strfree(name_);
+	strfree(host_);
+	strfree(user_);
+	Event::RemoveInput(soc_);
+	close(soc_);
+
+}
+
+//==============================================================================
+
+void Service::DispatchInput(fd_set& fds)
+{
+	Service *s = gHead;
+	while(s)
+	{
+		Service *n = s->next_;
+		if(FD_ISSET(s->soc_,&fds))
+			s->ProcessIncoming();
+		s = n;
+	}
+}
+
+//==============================================================================
+
+void Service::HandleService (request *r)
+{
+	const char *target = get_value(r,"TARGET",0);
+
+	// Append request info
+	if(get_value(r,"SOURCE",0) == 0)
+	{
+		set_value(r,"REQ_ID",    "%ld",Event::UniqueID());
+		set_value(r,"SOURCE",    "%s", name_);
+		set_value(r,"SOURCE_REF","%ld",ref_);
+	}
+
+
+	Service *s = Find(target);
+	if(s && !s->Busy()) // Pass to the target service
+		s->CallService(r);
+	else {
+		// Put in waiting queue
+		NotifyMonitor("WAIT",r);
+		WaitingQueue::Append(r,target);
+	}
+}
+
+//==============================================================================
+
+static jmp_buf env;
+
+//#if (defined(__cplusplus) || defined(c_plusplus) || !defined(__alpha))
+//static void catch_alarm(...)
+//#else
+//static void catch_alarm(int)
+//#endif
+
+// Sun, HP and Alpha have (int) as parameter!
+#ifdef sgimips
+static void catch_alarm(...)
+#else
+static void catch_alarm(int)
+#endif
+{
+	marslog(LOG_WARN,"Too many requests : alarm");
+	longjmp(env,1);
+}
+
+//==============================================================================
+
+#ifdef USE_THREADS
+
+int Service::EncodeRequest(QElem *q)
+{
+	pthread_mutex_lock(&mutex_);
+	marslog(LOG_INFO,"--> Thread EncodeRequest for %s",name_);
+
+	done_.RemoveAll();
+	queue_.Append(q);
+
+	pthread_cond_signal(&cond_);
+	pthread_mutex_unlock(&mutex_);
+
+	marslog(LOG_INFO,"<-- Thread EncodeRequest for %s",name_);
+		
+	return 0;
+}
+
+#else
+int Service::EncodeRequest(request* r)
+{
+	fd_set fds;
+	int ret = 0;
+	
+	FD_ZERO(&fds);
+	FD_SET(soc_,&fds);
+	static struct timeval timeout = { 0,10,};
+
+	if(setjmp(env)==0)
+	{
+		signal(SIGALRM,catch_alarm);
+		alarm(20);
+
+//
+// 1) Commented out G.A. Gcc does not want this, on HP.
+// 2) feedback from UkMet/SGI:
+//     - HP should now be happy with "standard" parameters!
+// 3) but at ECMWF we do need this ifdef...??!!
+//
+#if defined(hpux) && !defined(__GNU__)
+		switch(select(FD_SETSIZE,0,(int*)&fds,NULL,&timeout))
+#else
+		switch(select(FD_SETSIZE,0,&fds,NULL,&timeout))
+#endif
+		{
+			case 0:
+				// this can be if the module does not listen, especialy messages
+				marslog(LOG_EROR,"Timeout sending to %s",name_);
+				ret = 1;
+				break;
+
+			case -1:
+				marslog(LOG_EROR|LOG_PERR,"Error sending to %s",name_);
+				ret = 1;
+				break;
+
+			default:
+				encode_request(r,&x_);
+				ret = 0;
+				break;
+		}
+			
+		alarm(0);
+	} else ret = 1;
+	return ret;
+}
+#endif
+
+//==============================================================================
+
+void Service::SendRequest(request *r)
+{
+	static char *MESSAGE  = strcache("MESSAGE");
+	static char *PROGRESS = strcache("PROGRESS");
+	/* check if the module is interested ... */
+
+	if(r)
+	{
+	
+		if((r->name == MESSAGE)  && (want_message_ == 0))
+			return;
+	
+		if((r->name == PROGRESS) && (want_progress_ == 0))
+			return;
+
+	}
+	OutputQueue::Append(r,this);
+}
+
+//==============================================================================
+
+void Service::GotReply(request *r)
+{
+	SendRequest(r);
+}
+
+//==============================================================================
+
+void Service::HandleReply(request *r)
+{
+	const char *x  = get_value(r,"SOURCE_REF",0);
+	long ref = x?atol(x):-1;
+
+	NotifyMonitor("REPLY",r);
+
+	Service *s = Find(ref);
+	if(s) s->GotReply(r);
+
+	outstanding_--;
+
+	lastcall_ = time(0);
+
+	// Remove from queue
+	
+	ProcessingQueue::Remove(r);
+
+}
+
+//==============================================================================
+
+void Service::HandleTimeout(request *r)
+{
+	const char *t = get_value(r,"TIMEOUT",0);
+	timeout_ = (t?atol(t):0) * 60;
+	marslog(LOG_INFO,"Timeout for %s : %d seconds",name_,timeout_);
+}
+
+//==============================================================================
+
+void Service::HandleAlive(request *r)
+{
+	const char *t = get_value(r,"ALIVE",0);
+	alive_ = t?atoi(t):0;
+	marslog(LOG_INFO,"Alive value for %s : %s ", name_,alive_?"on":"off");
+}
+
+//==============================================================================
+
+void Service::HandleStop(request *r)
+{
+	const char *t = get_value(r,"STOP",0);
+	int stop = t?atoi(t):0;
+	marslog(LOG_INFO,"Stop %d requested by service %s",stop,name_);
+	marslog(LOG_INFO,"%s",get_value(r,"INFO",0));
+	marsexit(stop);
+}
+
+//==============================================================================
+void Service::NotifyMonitor(const char *mode,request *r,long ref,const char *name)
+{
+	static request *u = 0;
+	if(!u) u = empty_request("PROGRESS");
+
+	if(gMonitor)
+	{
+		u->next = r;
+		set_value(u,"NAME","%s", name?name:"?");
+		set_value(u,"REF", "%ld",ref);
+		set_value(u,"MODE","%s",mode);
+		gMonitor->SendRequest(u);
+	}
+	
+}
+
+//==============================================================================
+
+void Service::NotifyMonitor(const char *mode,request *r)
+{
+	NotifyMonitor(mode,r,ref_,name_);
+}
+
+//==============================================================================
+
+void Service::HandleMonitor(request *r)
+{
+	gMonitor = this;
+	marslog(LOG_INFO,"%s is a monitor",name_);
+
+
+	// Loop through services
+
+	r = empty_request("REGISTER");
+
+	Service *s = gHead;
+	while(s)
+	{
+		set_value(r,"NAME","%s", s->name_);
+		set_value(r,"HOST","%s", s->host_);
+		set_value(r,"USER","%s", s->user_);
+		set_value(r,"PID", "%ld",s->pid_);
+		set_value(r,"REF", "%ld",s->ref_);
+		s->NotifyMonitor("REGISTER",r);
+		s = s->next_;
+	}
+	
+	free_all_requests(r);
+
+	// Loop through queues.
+	WaitingQueue::NotifyMonitor();
+	ProcessingQueue::NotifyMonitor();
+}
+
+//==============================================================================
+
+void Service::HandleWant(request *r)
+{
+	static char *MESSAGE  = strcache("MESSAGE");
+	static char *PROGRESS = strcache("PROGRESS");
+	const char *kind = get_value(r,"TYPE",0);
+	
+	if (kind == MESSAGE)  want_message_++;
+	if (kind == PROGRESS) want_progress_++;
+}
+
+//==============================================================================
+
+void Service::HandleProgress(request *r)
+{
+	const char *x = get_value(r,"SOURCE_REF",0);
+	long ref = x?atol(x):-1;
+
+	NotifyMonitor("PROGRESS",r);
+	Service *s = Find(ref);
+	if(s) s->SendRequest(r);
+}
+
+//==============================================================================
+
+void Service::HandleLater(request *r)
+{
+	r = r->next;
+
+	marslog(LOG_INFO,"Module %s refuses request",name_);
+
+	// Remove from queue
+	outstanding_--;
+	ProcessingQueue::Remove(r);
+
+	// Re queue
+	NotifyMonitor("WAIT",r);
+	WaitingQueue::Later(r,name_);
+}
+
+//==============================================================================
+
+void Service::Broadcast(request *r)
+{
+	Service *s = gHead;
+	while(s)
+	{
+		s->SendRequest(r);
+		s = s->next_;
+	}
+}
+
+//==============================================================================
+
+void Service::BroadcastMessage(request *r)
+{
+	static request *u = 0;
+	if(!u) u = empty_request("MESSAGE");
+	u->next = r;
+	Broadcast(u);
+}
+
+//==============================================================================
+
+void Service::CallService(request *r)
+{
+	NotifyMonitor("SERVICE",r);
+	SendRequest(r);
+	ProcessingQueue::Append(r,this);
+	outstanding_++;
+}
+
+//==============================================================================
+
+void Service::HandleDrop(request *r)
+{
+	const char *target = get_value(r,"TARGET",0);
+
+	if(get_value(r,"SOURCE",0) == 0)
+	{
+		set_value(r,"SOURCE",    "%s",name_);
+		set_value(r,"SOURCE_REF","%ld",ref_);
+	}
+
+	Service *s = Find(target);
+	if(s) s->SendRequest(r);
+}
+
+//==============================================================================
+
+void Service::HandleMessage(request *r)
+{
+	if(get_value(r,"SOURCE",0) == NULL)
+	{
+		set_value(r,"SOURCE",    "%s",name_);
+		set_value(r,"SOURCE_REF","%ld",ref_);
+	}
+	Broadcast(r);
+}
+
+//==============================================================================
+
+void Service::HandleGetInfo(request *)
+{
+	static request *u = NULL;
+	if(u == NULL) u = empty_request("REPLY");
+	u->next = mars.setup;
+	SendRequest(u);
+}
+
+//==============================================================================
+
+void Service::ReplyFail(const char *fmt,const char *name,request *r)
+{
+   const char    *x = get_value(r,"SOURCE_REF",0);
+   long   ref = x?atol(x):-1;
+
+   Service *a = Service::Find(ref);
+   
+   request *u = empty_request("REPLY"); 
+   reqcpy(u,r); 
+   set_value(u,"ERR_CODE","-42"); 
+   set_value(u,"ERROR", fmt,name);
+
+   if(a) {
+	   a->NotifyMonitor("REPLY",u); 
+	   a->GotReply(u);
+   }
+   else NotifyMonitor("REPLY",u,ref,get_value(r,"SOURCE",0));
+
+   free_all_requests(u); 
+}
+
+//==============================================================================
+
+void Service::HandleStart(request *r)
+{
+	const char *name = get_value(r,"NAME",0);
+	const char *cmd  = get_value(r,"CMD",0);
+	if(cmd)
+	{
+		char buf[1024];
+		marslog(LOG_INFO,"Starting command: %s",cmd);
+		sprintf(buf,"%s 2>&1 < /dev/null&",no_quotes(cmd));
+		system(buf);
+	}
+	else
+		WaitingQueue::StartModule(name);
+	SendRequest(NULL);
+}
+
+//==============================================================================
+
+void Service::HandleFollowup(request *r)
+{
+	Service *s = ProcessingQueue::Followup(r,this);
+
+	if(s) s->outstanding_--;
+	outstanding_++;
+	NotifyMonitor("FOLLOWUP",r);
+}
+
+//==============================================================================
+
+Service *Service::Find(const char *name)
+{
+	Service *s = gHead;
+	while(s)
+	{
+		if(s->name_ == name)
+			return s;
+		s = s->next_;
+	}
+	return 0;
+}
+
+//==============================================================================
+
+Service *Service::Find(long ref)
+{
+	Service *s = gHead;
+	while(s)
+	{
+		if(s->ref_ == ref)
+			return s;
+		s = s->next_;
+	}
+	return 0;
+}
+
+//==============================================================================
+
+void Service::HandleExit(request*)
+{
+	valid_ = 0;
+}
+
+//==============================================================================
+
+void Service::HandleMaximum(request *r)
+{
+	const char *t = get_value(r,"MAXIMUM",0);
+	maximum_ = t?atoi(t):0;
+	marslog(LOG_INFO,"Maximum value for %s : %d ", name_,maximum_);
+}
+
+//==============================================================================
+
+int Service::CheckTimeout()
+{
+	time_t now = time(0);
+	int alive = 0;
+
+	Service *s = gHead;
+	while(s)
+	{
+		if(s->alive_) alive++;
+		
+		if(s->outstanding_ == 0 && 
+			s->timeout_ != 0 && now - s->lastcall_ > s->timeout_)
+		{
+			marslog(LOG_INFO,"Service %s has timed out",s->name_);
+			delete s;
+			return 1;
+		}
+
+		s = s->next_;
+	}
+	return alive;
+}
+
+//==============================================================================
+
+void Service::UserMessage(const char* fmt, ...)
+{
+	va_list al;
+	request *r = empty_request("USER_MESSAGE");
+	char buf[1024];
+
+	va_start(al, fmt);
+	vsprintf(buf, fmt, al);
+	va_end(al);
+
+	set_value(r,"INFO","%s",buf);
+
+	BroadcastMessage(r);
+	free_all_requests(r);
+}
+
+//==============================================================================
+
+typedef void (Service::*reqproc)(request*);
+
+struct {
+	char    *name;
+	reqproc proc;
+} handlers[] = {
+
+	{"EXIT",      &Service::HandleExit,    },
+	{"REGISTER",  &Service::HandleRegister,},
+	{"FOLLOWUP",  &Service::HandleFollowup,},
+	{"SERVICE",   &Service::HandleService, },
+	{"MESSAGE",   &Service::HandleMessage, },
+	{"REPLY",     &Service::HandleReply,   },
+	{"DROP",      &Service::HandleDrop,    },
+	{"PROGRESS",  &Service::HandleProgress,},
+	{"GETINFO",   &Service::HandleGetInfo, },
+	{"MONITOR",   &Service::HandleMonitor, },
+	{"TIMEOUT",   &Service::HandleTimeout, },
+	{"START",     &Service::HandleStart,   },
+	{"WANT",      &Service::HandleWant,    },
+	{"LATER",     &Service::HandleLater,   },
+	{"ALIVE",     &Service::HandleAlive,   },
+	{"STOP" ,     &Service::HandleStop,    },
+	{"MAXIMUM",   &Service::HandleMaximum, },
+
+};
+
+//==============================================================================
+
+void Service::Dispatch(request *r)
+{
+	lastcall_ = time(NULL);
+	for(int i=0;i<NUMBER(handlers);i++)
+		if(handlers[i].name == r->name)
+			(this->*handlers[i].proc)(r);
+}
+
+//==============================================================================
+
+void Service::ProcessIncoming()
+{
+	request *r =  NULL;
+	static int first = 1;
+	
+	if(first)
+	{
+		for(int i=0;i<NUMBER(handlers);i++)
+			handlers[i].name = strcache(handlers[i].name);
+		first = 0;
+	}
+
+	do{
+		r = decode_request(&x_);
+
+		if(r == (void*)-1) /* connection is lost */
+			valid_ = 0;
+		else {
+
+marslog(LOG_DBUG,"Service::ProcessIncoming(), dispatch request:");
+if(mars.debug) print_all_requests(r);
+
+			Dispatch(r);
+			free_all_requests(r);
+		}
+	} while(ref_ >=0 && !xdrrec_eof(&x_));
+
+	if(!valid_)
+		delete this;
+}
diff --git a/src/Event/WaitingQueue.cc b/src/Event/WaitingQueue.cc
new file mode 100644
index 0000000..3d42c99
--- /dev/null
+++ b/src/Event/WaitingQueue.cc
@@ -0,0 +1,203 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <time.h>
+
+#include "Event.h"
+
+Queue WaitingQueue::gQueue;
+QIter WaitingQueue::gIter;
+
+//==============================================================================
+
+WElem::WElem(request *r,const char *name) : 
+	QElem(r),
+	name_(strcache(name)),
+	when_(0),
+	fail_(0),
+	late_(0),
+	start_(time(0))
+{
+}
+
+//==============================================================================
+
+void WElem::Update()
+{
+	when_ = time(0);
+	if(when_ - start_ > 60*5)  // 5 Minutes
+		fail_ = 1;
+}
+
+//==============================================================================
+
+WElem::~WElem()
+{
+	strfree(name_);
+}
+
+//==============================================================================
+
+void WaitingQueue::Append(request *r,const char *name)
+{
+	WElem *q;
+
+	// Check if a request for the same module in in
+
+	int in = 0;
+	if(Service::Find(name) == 0)
+	{
+		Rewind();
+		while( (q = Next()) != 0 )
+			if(q->Name() == name)
+				in = 1;
+	}
+
+	
+	Append(q = new WElem(r,name));
+	if(in) q->Update();
+}
+
+//==============================================================================
+
+void WaitingQueue::Later(request *r,const char *name)
+{
+	WElem *p = new WElem(r,name);
+	p->Update();
+	p->Late(1);
+	Append(p);
+}
+
+//==============================================================================
+
+void WaitingQueue::Process()
+{
+	WElem *q;
+	
+	// First check for modules that are now running
+
+	time_t now = time(0);
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{
+		Service *s = Service::Find(q->Name());
+
+		if(s  && !s->Busy())
+		{
+			if(!q->Late() || (now - q->When() > 2)) // 2 sec.
+			{
+				s->CallService(q->Request());
+				Remove(q);
+			}
+		}
+
+	}
+	
+	// Now look for modules to start
+
+	Rewind();
+	while( (q = Next()) != 0 )
+		if(Service::Find(q->Name()) == 0)
+		{
+			if(now - q->When() > 5) // 5 sec.
+			{
+				// Update other requests for the same moduel
+
+				QIter iter(gQueue);
+				WElem *p;
+
+				while( (p = (WElem*)iter()) != 0 )
+					if( p->Name() == q->Name())
+						p->Update();
+
+				if(StartModule(q->Name()) != 0)
+					 q->Fail(1);
+
+			}
+		}
+
+	// Look for failed requests
+
+	Rewind();
+	while( (q = Next()) != 0 )
+	{
+		if(q->Fail())
+		{
+			Service::ReplyFail("Cannot start service %s",
+				q->Name(),q->Request());
+			Remove(q);
+		}
+	}
+	
+}
+
+//==============================================================================
+
+void WaitingQueue::NotifyMonitor()
+{
+	WElem *q;
+	
+	Rewind();
+	while( (q = Next()) != 0 )
+	{
+		const char *x  = get_value(q->Request(),"SOURCE_REF",0);
+		long ref = x?atol(x):-1;
+		Service *s = Service::Find(ref);
+		if(s) s->NotifyMonitor("WAIT",q->Request());
+	}
+}
+
+//==============================================================================
+
+int WaitingQueue::StartModule(const char *name)
+{
+	static char *service = strcache("service");
+	request *r = mars.setup;
+	
+	while(r)
+	{
+		if(r->name == service)
+		{
+			const char *nme = get_value(r,"name",0);
+			const char *cmd = get_value(r,"cmd",0);
+			if(nme && cmd && (name == nme))
+			{
+				char buf[1024];
+				marslog(LOG_INFO,"Starting service: %s",nme);
+				marslog(LOG_INFO,"With command    : %s",cmd);
+
+				const char* mvSlog = getenv("MV_SLOG");
+				if( mvSlog && strcmp(mvSlog,"yes")==0 )
+				  {
+				    //-- do not block module output --//
+				    sprintf(buf,"exec %s </dev/null &", no_quotes(cmd));
+				  }
+				else
+				  {
+				    //-- redirect module output to /dev/null --//
+				    sprintf(buf,"exec %s >/dev/null 2>&1 </dev/null &",
+					    no_quotes(cmd));
+				  }
+
+				if(system(buf) != 0)
+				{
+					Service::UserMessage("Failed to start service %s"
+					" with command %s",name,buf);
+					return 1;
+				}
+				return 0;
+			}
+		}
+		r = r->next;
+	}
+	marslog(LOG_EROR,"Cannot find service %s",name);
+	Service::UserMessage("Cannot find service %s",name);
+	return 1;
+}
diff --git a/src/Event/include/Event.h b/src/Event/include/Event.h
new file mode 100644
index 0000000..cbf62f3
--- /dev/null
+++ b/src/Event/include/Event.h
@@ -0,0 +1,47 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "mars.h"
+#include "Queue.h"
+#include "Service.h"
+#include "ProcessingQueue.h"
+#include "OutputQueue.h"
+#include "WaitingQueue.h"
+
+
+struct Options {
+	int     port;
+	char    *startup;
+	char    *exit;
+	char    *env;
+};
+
+class Event {
+	static long    gUniqID;
+	static fd_set  gFiles;
+	static Options gOpt;
+	
+public:
+	static long UniqueID() { return ++gUniqID; }
+	
+	static void Loop();
+	static void Init(int,char**);
+	static void Startup();
+	static void NewService(int);
+	static void CleanUp(int ,void *);
+	static void CheckQueues();
+	static void CheckTimeout();
+	static void EndOfModule(const char*);
+	static void AbortIfBatch(const char*);
+	
+	static void AddInput(int soc)    { FD_SET(soc,&gFiles);          }
+	static void RemoveInput(int soc) { FD_CLR(soc,&gFiles);          }
+	static int  IsInput(int soc)     { return FD_ISSET(soc,&gFiles); }
+};
+
diff --git a/src/Event/include/OutputQueue.h b/src/Event/include/OutputQueue.h
new file mode 100644
index 0000000..e8d40e0
--- /dev/null
+++ b/src/Event/include/OutputQueue.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Queue of requests to be sent
+class OElem : public QElem {
+
+	Service *svc_;  // Service to send the request to
+	
+	~OElem();
+	
+public:
+	OElem(request*,Service*);
+	Service *Module()		              { return svc_;           }
+};
+
+class OutputQueue {
+	
+	static Queue gQueue;
+	static QIter gIter;
+	
+	static  void  Rewind()                { gIter.Rewind(gQueue);  }
+	static OElem *Next()                  { return (OElem*)gIter();}
+	static void   Remove(OElem* e)        { gQueue.Remove(e);      }
+	static void   Dequeue(OElem* e)       { gQueue.Dequeue(e);      }
+	static void   Append(OElem* e)        { gQueue.Append(e);      }
+	static void   Insert(OElem* e)        { gQueue.Insert(e);      }
+	   
+public:
+	static void Process();
+	static void Append(request*,Service*);
+	static void Insert(request*,Service*);
+	static void RemoveAll(Service*);
+	static int  Empty()				      { return gQueue.Empty(); }
+};
diff --git a/src/Event/include/ProcessingQueue.h b/src/Event/include/ProcessingQueue.h
new file mode 100644
index 0000000..7966d24
--- /dev/null
+++ b/src/Event/include/ProcessingQueue.h
@@ -0,0 +1,41 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Queue of processed requests
+
+class PElem : public QElem {
+	
+	Service* svc_; // Module handling the request
+	~PElem();
+	
+public:
+	PElem(request*,Service*);
+	Service* Module()	                        { return svc_;           }
+	void Reparent(Service *s)                   { svc_ = s;              }
+};
+
+class ProcessingQueue {
+	
+	static Queue gQueue;
+	static QIter gIter;
+	
+	static void  Rewind()                       { gIter.Rewind(gQueue);  }
+	static PElem *Next()                        { return (PElem*)gIter();}
+	static void   Remove(PElem* e)              { gQueue.Remove(e);      }
+	static void   Append(PElem* e)              { gQueue.Append(e);      }
+	   	
+public:
+	static void Append(request*,Service*);
+	static void RemoveAll(Service*);
+	static void Remove(request*);
+	static Service* Followup(request*,Service*);
+	static int  Empty()				            { return gQueue.Empty(); }
+	static void NotifyMonitor();
+
+};
diff --git a/src/Event/include/Queue.h b/src/Event/include/Queue.h
new file mode 100644
index 0000000..0034278
--- /dev/null
+++ b/src/Event/include/Queue.h
@@ -0,0 +1,74 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Queue_H
+#define Queue_H
+
+class QElem {
+	friend class Queue;
+	friend class QIter;
+	
+	QElem   *next_;
+	request *req_;
+
+	// No copy
+	QElem(const QElem&);
+	QElem operator=(const QElem&);
+
+
+protected:
+	QElem(request*);
+	virtual ~QElem();
+
+public:
+	request *Request() { return req_; }
+	
+};
+
+class Queue {
+	friend class QIter;
+	
+	QElem *head_;
+	QElem *tail_;
+	
+	// No copy
+	Queue(const Queue&);
+	Queue operator=(const Queue&);
+	
+	// No destructor
+	//~Queue() {}
+
+public:
+	Queue();
+	int Empty()                        { return head_ == 0;}
+	void Append(QElem*);
+	void Insert(QElem*);
+	void Remove(QElem*);
+	void Dequeue(QElem*);
+	void RemoveAll();
+
+	QElem* Pop();
+	
+};
+
+class QIter {
+	QElem *q_;
+	
+	// No copy
+	QIter(const QIter&);
+	QIter operator=(const QIter&);
+	
+public:
+	QIter() 					{ q_ = 0; }
+	QIter(Queue&);
+	void Rewind(Queue&);
+	QElem *operator()();
+};
+
+#endif
diff --git a/src/Event/include/Service.h b/src/Event/include/Service.h
new file mode 100644
index 0000000..0845a44
--- /dev/null
+++ b/src/Event/include/Service.h
@@ -0,0 +1,118 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Service_H
+#define Service_H
+
+//--#--define USE_THREADS
+
+#ifdef USE_THREADS
+#include <pthread.h>
+#include "Queue.h"
+#endif
+
+class Service {
+
+static Service *gHead;
+static Service *gMonitor;
+
+	Service *next_;
+
+	int	    soc_;
+	int     valid_;
+	char    *name_;
+	char    *host_;
+	char    *user_;
+	long    pid_;
+	XDR     x_;
+
+	long    ref_;
+	int     ready_;
+
+	time_t  timeout_;
+	time_t  lastcall_;
+
+	int     want_message_;
+	int     want_progress_;
+
+	int     alive_;
+
+	int     outstanding_;
+	int     maximum_;
+
+#ifdef USE_THREADS
+
+	pthread_t       thread_;
+	pthread_mutex_t mutex_;
+	pthread_cond_t  cond_;
+	int             stop_;
+	int             running_;
+	int             threaded_;
+
+	Queue           queue_;
+	Queue           done_;
+
+	void ThreadProc();
+static void* StartThread(void*);
+#endif
+
+
+public:
+	void SendRequest(request*);
+	void CallService(request*);
+	void GotReply(request*);
+
+	 void HandleReply    (request *r);
+	 void HandleProgress (request *r);
+	 void HandleExit     (request *r);
+	 void HandleService  (request *r);
+	 void HandleFollowup (request *r);
+	 void HandleMessage  (request *r);
+	 void HandleRegister (request *r);
+	 void HandleGetInfo  (request *r);
+	 void HandleStart    (request *r);
+	 void HandleWant     (request *r);
+	 void HandleDrop     (request *r);
+	 void HandleTimeout  (request *r);
+	 void HandleAlive    (request *r);
+	 void HandleMonitor  (request *r);
+	 void HandleMaximum  (request *r);
+	 void HandleLater    (request *r);
+	 void HandleStop     (request *r);
+	 void Dispatch       (request *r);
+
+	Service(int);
+	~Service();
+
+static Service *Find(long);
+static Service *Find(const char*);
+static void     DispatchInput(fd_set&);
+static void     StartService(const char*);
+static void     ReplyFail(const char*,const char*,request*);
+static void     UserMessage(const char *,...);
+static void     Broadcast(request*);
+static void     BroadcastMessage(request*);
+static int      CheckTimeout();
+
+	void NotifyMonitor(const char*,request*);
+static void NotifyMonitor(const char*,request*,long,const char*);
+
+	void ProcessIncoming();
+#ifdef USE_THREADS
+	int EncodeRequest(QElem*);
+#else
+	int EncodeRequest(request*);
+#endif
+
+
+	const char *Name()    { return name_;  }
+	int   Busy();
+};
+
+#endif
diff --git a/src/Event/include/WaitingQueue.h b/src/Event/include/WaitingQueue.h
new file mode 100644
index 0000000..8c8805c
--- /dev/null
+++ b/src/Event/include/WaitingQueue.h
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Queue of requests waiting for a module to start
+
+class WElem : public QElem {
+
+	int    fail_;
+	int    late_;
+	time_t start_;
+	time_t when_;	// Last time event tried to started the module
+	char  *name_;	// Name of the module to start
+	
+	~WElem();
+	
+public:
+	WElem(request*,const char*);
+	void   Update();
+	time_t When()		                   { return when_;          }
+	time_t Start()		                   { return start_;         }
+	const char  *Name()			               { return name_;          }
+	int    Fail()                          { return fail_;          }
+	void   Fail(int f)                     { fail_ = f;             }
+	void   Late(int l)                     { late_ = l;             }
+	int    Late()                          { return late_;          }
+};
+
+class WaitingQueue {
+	
+	static Queue gQueue;
+	static QIter gIter;
+	
+	static void  Rewind()                  { gIter.Rewind(gQueue);  }
+	static WElem *Next()                   { return (WElem*)gIter();}
+	static void   Remove(WElem* e)         { gQueue.Remove(e);      }
+	static void   Append(WElem* e)         { gQueue.Append(e);      }
+	   
+public:
+	static void Process();
+	static void Append(request *r,const char *n);
+	static void Later(request *r,const char *n);
+	static int  StartModule(const char*);
+	static int  Empty()				       { return gQueue.Empty(); }
+	static void NotifyMonitor();
+};
+
diff --git a/src/ExamineManager/Makefile.am b/src/ExamineManager/Makefile.am
new file mode 100644
index 0000000..0af6f69
--- /dev/null
+++ b/src/ExamineManager/Makefile.am
@@ -0,0 +1,12 @@
+
+bin_PROGRAMS = bin/MvExamineManager
+
+bin_MvExamineManager_SOURCES  = MvExamineManager.cc
+bin_MvExamineManager_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+
+
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/ExamineManager/Makefile.in b/src/ExamineManager/Makefile.in
new file mode 100644
index 0000000..7e9d8f2
--- /dev/null
+++ b/src/ExamineManager/Makefile.in
@@ -0,0 +1,630 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/MvExamineManager$(EXEEXT)
+subdir = src/ExamineManager
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_MvExamineManager_OBJECTS = MvExamineManager.$(OBJEXT)
+bin_MvExamineManager_OBJECTS = $(am_bin_MvExamineManager_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_MvExamineManager_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_MvExamineManager_SOURCES)
+DIST_SOURCES = $(bin_MvExamineManager_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_MvExamineManager_SOURCES = MvExamineManager.cc
+bin_MvExamineManager_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ExamineManager/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/ExamineManager/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/MvExamineManager$(EXEEXT): $(bin_MvExamineManager_OBJECTS) $(bin_MvExamineManager_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/MvExamineManager$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_MvExamineManager_OBJECTS) $(bin_MvExamineManager_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvExamineManager.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ExamineManager/MvExamineManager.cc b/src/ExamineManager/MvExamineManager.cc
new file mode 100644
index 0000000..1938681
--- /dev/null
+++ b/src/ExamineManager/MvExamineManager.cc
@@ -0,0 +1,149 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// ExamineManager.cc                                        May2011/vk
+//
+//  Metview runs this MvExamineManager when Metview session is started
+//  with flag '-e' plus two parameters (first is the data type, the
+//  second is the path to the input file).
+//
+//  Input parameters are used for creating a suitable Metview request,
+//  which is then sent to the right examiner using a MvServiceTask
+//  object.
+//
+//  Data type is converted to capital letters, thus e.g. for type GRIB
+//  values 'GRIB', 'grib' and 'Grib' are acceptable.
+//
+//  This code is heavily based on example file src/libMetview/Demo.cc.
+//
+
+#include <Metview.h>
+#include <MvServiceTask.h>
+#include <locale>
+
+
+class MvExamineManager : public MvApplication, public MvClient
+{
+	virtual void endOfTask(MvTask *from);
+	virtual void progress(char*);
+	bool examGrib( const string& fileName );
+	bool examBufr( const string& fileName );
+	bool examNetCDF( const string& fileName );
+	bool examOdb( const string& fileName );
+//	bool examXXX( const string& fileName );
+public:
+	MvExamineManager(int argc, char **argv);
+};
+
+
+void MvExamineManager::endOfTask(MvTask *from)
+{
+// WARNING: The examiner module should not send REPLY after starting up!
+//          See for instance GribExaminer MvMain.cc (METVIEW_MODE examine)
+//
+	printf("Got reply from %s: err=%d\n", from->taskName(), from->getError());
+	exit(0);
+}
+
+void MvExamineManager::progress(char *p)
+{
+	printf("Got progress %s\n",p);
+}
+
+bool
+MvExamineManager::examGrib( const string& fileName )
+{
+	MvRequest mvReq( "GRIB" );           //-- build a GRIB request
+	mvReq.setValue( "PATH", fileName.c_str() );
+	                                     //-- send request to GribExaminer
+	MvTask* task = new MvServiceTask( this, "GribExaminer", mvReq );
+	task->run();
+
+	return true;
+}
+
+bool
+MvExamineManager::examBufr( const string& fileName )
+{
+	MvRequest mvReq( "BUFR" );           //-- build a BUFR request
+	mvReq.setValue( "PATH", fileName.c_str() );
+	mvReq.print();
+	                                     //-- send request to BufrExaminer
+	MvTask* task = new MvServiceTask( this, "BufrExaminer", mvReq );
+	task->run();
+
+	return true;
+}
+
+bool
+MvExamineManager::examNetCDF( const string& ) // fileName )
+{
+	//-- ERROR MSGS SHOULD BE GIVEN IN POP-UP WINDOWS !!!!!
+	cerr << "MvExamineManager::examNetCDF not yet implemented" << endl;
+	return false;
+}
+
+bool
+MvExamineManager::examOdb( const string& fileName )
+{
+	MvRequest mvReq( "ODB_DB" );           //-- build n ODB_DB request
+	mvReq.setValue( "PATH", fileName.c_str() );
+	                                     //-- send request toOdbExaminer
+	MvTask* task = new MvServiceTask( this, "OdbExaminer", mvReq );
+	task->run();
+
+	return true;
+}
+
+MvExamineManager::MvExamineManager(int argc,char **argv)
+	:MvApplication(argc,argv)
+{
+	string dataType( argv[1] );          //-- convert type to upper case
+	for( size_t i=0; i<dataType.length(); ++i )
+	   dataType[i] = std::toupper(dataType[i], std::locale());
+
+	string fileName( argv[2] );          //-- 2. arg is data file name
+
+	bool status = false;
+	if( dataType == "GRIB" )
+	{
+	   status = examGrib( fileName );    //-- GRIB examiner
+	}
+	else if( dataType == "BUFR" )
+	{
+	   status = examBufr( fileName );    //-- BUFR examiner
+	}
+	else if( dataType == "NETCDF" )
+	{
+	   status = examNetCDF( fileName );  //-- NetCDF examiner
+	}	
+	else if( dataType == "ODB" )
+	{
+	   status = examOdb( fileName );  //-- ODB examiner
+	}
+	else
+	{
+	   //-- ERROR MSGS SHOULD BE GIVEN IN POP-UP WINDOWS !!!!!
+	   cerr << "Unknown data type: " << dataType << endl;
+	   exit(13);
+	}
+
+	if( ! status )
+	{
+	   //-- ERROR MSGS SHOULD BE GIVEN IN POP-UP WINDOWS !!!!!
+	   cerr << "Could not examine data. " << endl;
+	   exit(13);
+	}
+}
+
+int main(int argc, char **argv)
+{
+	MvExamineManager app(argc,argv);
+	app.run();
+}
diff --git a/src/Flextra/FLEXTRA_FILE.xpm b/src/Flextra/FLEXTRA_FILE.xpm
new file mode 100644
index 0000000..1800045
--- /dev/null
+++ b/src/Flextra/FLEXTRA_FILE.xpm
@@ -0,0 +1,500 @@
+/* XPM */
+static char * FLEXTRA_FILE_xpm[] = {
+"32 32 465 2",
+"  	c None",
+". 	c #557FC8",
+"+ 	c #6086CA",
+"@ 	c #537DC7",
+"# 	c #9DB1D9",
+"$ 	c #9DB1DA",
+"% 	c #9EB2DA",
+"& 	c #9DB2DA",
+"* 	c #9EB2DB",
+"= 	c #9FB3DB",
+"- 	c #9FB3DA",
+"; 	c #A0B3DB",
+"> 	c #A0B4DB",
+", 	c #8DA4D4",
+"' 	c #6388CB",
+") 	c #C8CFE4",
+"! 	c #668ACC",
+"~ 	c #E0E5F0",
+"{ 	c #E2E7F2",
+"] 	c #E4E8F3",
+"^ 	c #E6EAF3",
+"/ 	c #E8EBF5",
+"( 	c #EAEDF6",
+"_ 	c #ECEEF6",
+": 	c #EEF0F7",
+"< 	c #EFF1F8",
+"[ 	c #F1F3F9",
+"} 	c #F2F4F9",
+"| 	c #F4F5FA",
+"1 	c #F5F6FB",
+"2 	c #F6F7FB",
+"3 	c #F7F9FC",
+"4 	c #F9FAFC",
+"5 	c #FAFAFD",
+"6 	c #FBFBFD",
+"7 	c #FCFCFE",
+"8 	c #FDFDFE",
+"9 	c #FDFEFE",
+"0 	c #A4B7DC",
+"a 	c #C9D0E5",
+"b 	c #CAD0E5",
+"c 	c #668BCC",
+"d 	c #6389CB",
+"e 	c #CAD1E5",
+"f 	c #CBD1E5",
+"g 	c #CBD2E5",
+"h 	c #CBD2E6",
+"i 	c #CCD2E6",
+"j 	c #CCD3E6",
+"k 	c #CDD4E6",
+"l 	c #678CCD",
+"m 	c #CBD3E7",
+"n 	c #BCC9DD",
+"o 	c #BDCADC",
+"p 	c #BCCADC",
+"q 	c #BDCADD",
+"r 	c #C8D0E4",
+"s 	c #CFD5E8",
+"t 	c #678CCC",
+"u 	c #276A7C",
+"v 	c #216778",
+"w 	c #8DABBD",
+"x 	c #CFD6E8",
+"y 	c #6289CB",
+"z 	c #CDD4E7",
+"A 	c #8AA9BB",
+"B 	c #759CAE",
+"C 	c #498092",
+"D 	c #88A9BA",
+"E 	c #B5C6D7",
+"F 	c #D1D7E9",
+"G 	c #EBEDF6",
+"H 	c #D0D9E5",
+"I 	c #AFBFCF",
+"J 	c #8CA4BA",
+"K 	c #6D8DA7",
+"L 	c #86A0B7",
+"M 	c #AEBECF",
+"N 	c #D6DFE8",
+"O 	c #F5F8FB",
+"P 	c #6288CB",
+"Q 	c #CDD4E8",
+"R 	c #CED5E8",
+"S 	c #AFC2D5",
+"T 	c #6794A5",
+"U 	c #D1D8EA",
+"V 	c #D2D8EA",
+"W 	c #6585A2",
+"X 	c #547998",
+"Y 	c #7495AE",
+"Z 	c #91B0C1",
+"` 	c #ACC5D3",
+" .	c #98B2C4",
+"..	c #7493AB",
+"+.	c #4F7592",
+"@.	c #456D84",
+"#.	c #B9C7C9",
+"$.	c #D0D5E8",
+"%.	c #B1C3D5",
+"&.	c #6894A4",
+"*.	c #D2D9EA",
+"=.	c #D3D9EA",
+"-.	c #D4DAEA",
+";.	c #E6E9F3",
+">.	c #709499",
+",.	c #416A88",
+"'.	c #85A9B5",
+").	c #D2EBEF",
+"!.	c #D4ECF0",
+"~.	c #D8EEF1",
+"{.	c #DAEDF0",
+"].	c #87AA90",
+"^.	c #3E6E3C",
+"/.	c #3C6D39",
+"(.	c #3A6853",
+"_.	c #3C6682",
+":.	c #608388",
+"<.	c #F7F8FB",
+"[.	c #D0D7E8",
+"}.	c #B2C3D5",
+"|.	c #6894A6",
+"1.	c #D4D9EA",
+"2.	c #D4DBEB",
+"3.	c #5F8A86",
+"4.	c #396978",
+"5.	c #387949",
+"6.	c #7AAD8D",
+"7.	c #789D80",
+"8.	c #2F642A",
+"9.	c #7D8A98",
+"0.	c #748191",
+"a.	c #6A7789",
+"b.	c #5F6C86",
+"c.	c #3F6776",
+"d.	c #618390",
+"e.	c #CFD6E9",
+"f.	c #B1C4D5",
+"g.	c #D4DAEB",
+"h.	c #D5DBEB",
+"i.	c #D6DBEB",
+"j.	c #688DCD",
+"k.	c #C0CDD9",
+"l.	c #3A6780",
+"m.	c #558871",
+"n.	c #28732F",
+"o.	c #B0D4CA",
+"p.	c #CCE4E5",
+"q.	c #67916D",
+"r.	c #3C6E39",
+"s.	c #346830",
+"t.	c #858EA3",
+"u.	c #7A8399",
+"v.	c #6E7890",
+"w.	c #626D87",
+"x.	c #53627B",
+"y.	c #3D6780",
+"z.	c #9AB0B1",
+"A.	c #6188CB",
+"B.	c #D1D8E9",
+"C.	c #D2D8E9",
+"D.	c #D3DAEB",
+"E.	c #D6DCEC",
+"F.	c #D7DCED",
+"G.	c #678DCD",
+"H.	c #E1E5F1",
+"I.	c #557A95",
+"J.	c #286947",
+"K.	c #347C3F",
+"L.	c #A1CAB9",
+"M.	c #CFEAED",
+"N.	c #88AE96",
+"O.	c #386B35",
+"P.	c #557B58",
+"Q.	c #557D59",
+"R.	c #698576",
+"S.	c #7A8994",
+"T.	c #768193",
+"U.	c #56627D",
+"V.	c #455C71",
+"W.	c #3E6782",
+"X.	c #E9EEF0",
+"Y.	c #D0D7E9",
+"Z.	c #7FA2B3",
+"`.	c #3C7889",
+" +	c #417B8C",
+".+	c #5F8FA0",
+"++	c #C8D2E3",
+"@+	c #D8DEED",
+"#+	c #C5CFDF",
+"$+	c #537B98",
+"%+	c #BCE0DE",
+"&+	c #C9E9EB",
+"*+	c #CDEAED",
+"=+	c #4D7B4D",
+"-+	c #31662D",
+";+	c #457545",
+">+	c #467448",
+",+	c #7C8E90",
+"'+	c #366832",
+")+	c #366833",
+"!+	c #687687",
+"~+	c #4B5774",
+"{+	c #3E6574",
+"]+	c #839EA0",
+"^+	c #6288CA",
+"/+	c #6F98AB",
+"(+	c #789FB0",
+"_+	c #6996A6",
+":+	c #7DA3B3",
+"<+	c #D9DEED",
+"[+	c #A3B5C9",
+"}+	c #6E95AC",
+"|+	c #C8E8EB",
+"1+	c #CAE9EC",
+"2+	c #719B7B",
+"3+	c #7FA488",
+"4+	c #81A58A",
+"5+	c #33662F",
+"6+	c #477846",
+"7+	c #3C6A3B",
+"8+	c #687686",
+"9+	c #3B5B6C",
+"0+	c #527880",
+"a+	c #6287CA",
+"b+	c #78A0B0",
+"c+	c #6795A5",
+"d+	c #8DADBD",
+"e+	c #D9DFEE",
+"f+	c #688DCE",
+"g+	c #7292A5",
+"h+	c #507C73",
+"i+	c #B1D5CD",
+"j+	c #91B6A3",
+"k+	c #618764",
+"l+	c #BFC4D1",
+"m+	c #B0B7C4",
+"n+	c #628468",
+"o+	c #538055",
+"p+	c #4C794C",
+"q+	c #507755",
+"r+	c #73808F",
+"s+	c #3E536D",
+"t+	c #3E677C",
+"u+	c #6F99AB",
+"v+	c #337283",
+"w+	c #588A9B",
+"x+	c #D7DDEC",
+"y+	c #DADFEE",
+"z+	c #4E7585",
+"A+	c #3A6B4E",
+"B+	c #467942",
+"C+	c #517F53",
+"D+	c #BAC3C7",
+"E+	c #C0C5D2",
+"F+	c #B4BAC9",
+"G+	c #A9AFBF",
+"H+	c #829493",
+"I+	c #778B89",
+"J+	c #848EA2",
+"K+	c #6D7E85",
+"L+	c #51715E",
+"M+	c #566B71",
+"N+	c #526274",
+"O+	c #3D4F66",
+"P+	c #3D6688",
+"Q+	c #FBFDFD",
+"R+	c #6F99AA",
+"S+	c #ABBFCF",
+"T+	c #447D8E",
+"U+	c #23687A",
+"V+	c #B5C8D6",
+"W+	c #DBE0EE",
+"X+	c #688CCE",
+"Y+	c #587F84",
+"Z+	c #366656",
+"`+	c #6E9B77",
+" @	c #4C7B4C",
+".@	c #B7C1C3",
+"+@	c #9DA4B6",
+"@@	c #9199AC",
+"#@	c #838DA1",
+"$@	c #386A35",
+"%@	c #689069",
+"&@	c #376933",
+"*@	c #376935",
+"=@	c #3A585D",
+"-@	c #416A83",
+";@	c #6187CA",
+">@	c #ACC2D2",
+",@	c #9EB9C9",
+"'@	c #598C9C",
+")@	c #DCE1EF",
+"!@	c #96ACB8",
+"~@	c #45707A",
+"{@	c #C3E5E6",
+"]@	c #89B09A",
+"^@	c #59815A",
+"/@	c #97AAA3",
+"(@	c #A3AFB5",
+"_@	c #A8AEBD",
+":@	c #4E7454",
+"<@	c #406C43",
+"[@	c #698F6C",
+"}@	c #F0F7FA",
+"|@	c #9CB69D",
+"1@	c #366553",
+"2@	c #618393",
+"3@	c #BACADA",
+"4@	c #A7BDCE",
+"5@	c #CCD6E6",
+"6@	c #D7DDED",
+"7@	c #ACC1D0",
+"8@	c #ABC1D1",
+"9@	c #CAD3E1",
+"0@	c #4B7292",
+"a@	c #C7E8EA",
+"b@	c #CAE7E9",
+"c@	c #9FC1B2",
+"d@	c #6A9371",
+"e@	c #4D7A4D",
+"f@	c #748190",
+"g@	c #426F43",
+"h@	c #C2D4C9",
+"i@	c #EAF2F0",
+"j@	c #698A96",
+"k@	c #A6B8C9",
+"l@	c #D3D9EB",
+"m@	c #C9D4E4",
+"n@	c #6B96A7",
+"o@	c #6D98A8",
+"p@	c #D5DCEA",
+"q@	c #DAE0EE",
+"r@	c #6A8AA7",
+"s@	c #87ABBE",
+"t@	c #4B794B",
+"u@	c #939EA9",
+"v@	c #547462",
+"w@	c #86A78A",
+"x@	c #EDF6F9",
+"y@	c #DBE4EB",
+"z@	c #4C7193",
+"A@	c #E2E7ED",
+"B@	c #D0D8E9",
+"C@	c #D2D9EB",
+"D@	c #90AEC0",
+"E@	c #A2BCCA",
+"F@	c #DDE2F0",
+"G@	c #D4DBE8",
+"H@	c #4B7192",
+"I@	c #B0D2DA",
+"J@	c #608A65",
+"K@	c #88989B",
+"L@	c #838DA0",
+"M@	c #3D6E3B",
+"N@	c #D8E6E4",
+"O@	c #EDF5F8",
+"P@	c #6686A2",
+"Q@	c #AABCCC",
+"R@	c #4F8595",
+"S@	c #317282",
+"T@	c #6090A1",
+"U@	c #DBE0EF",
+"V@	c #DDE2EF",
+"W@	c #ABBCCE",
+"X@	c #527997",
+"Y@	c #B1D0D9",
+"Z@	c #759D7D",
+"`@	c #7B908B",
+" #	c #6D8281",
+".#	c #668D69",
+"+#	c #E9F4F6",
+"@#	c #E8F2F6",
+"##	c #87A1B6",
+"$#	c #708EA7",
+"%#	c #FBFBFE",
+"&#	c #C1CDDF",
+"*#	c #236879",
+"=#	c #79A0B1",
+"-#	c #6593A3",
+";#	c #276B7C",
+">#	c #D2DBEA",
+",#	c #ABBBCE",
+"'#	c #4B7193",
+")#	c #85A7BA",
+"!#	c #CEE7ED",
+"~#	c #9ABBA8",
+"{#	c #567D5A",
+"]#	c #8D97A6",
+"^#	c #667F77",
+"/#	c #80A385",
+"(#	c #BFD2DC",
+"_#	c #577B9A",
+":#	c #819BB3",
+"<#	c #EDF1F5",
+"[#	c #6187CB",
+"}#	c #CFD7E8",
+"|#	c #83A6B7",
+"1#	c #367485",
+"2#	c #327283",
+"3#	c #98B5C3",
+"4#	c #DDE3EF",
+"5#	c #DAE1EB",
+"6#	c #718EA9",
+"7#	c #4C7393",
+"8#	c #6E90AA",
+"9#	c #8DACBE",
+"0#	c #71958F",
+"a#	c #3E6B5C",
+"b#	c #3E696A",
+"c#	c #587B95",
+"d#	c #527695",
+"e#	c #C1CEDA",
+"f#	c #6086CB",
+"g#	c #2B6E7E",
+"h#	c #7BA1B1",
+"i#	c #568A9A",
+"j#	c #D8DFE9",
+"k#	c #B2C2D3",
+"l#	c #8BA4BA",
+"m#	c #6A8AA5",
+"n#	c #7C97AF",
+"o#	c #A2B5C5",
+"p#	c #C7D2DE",
+"q#	c #F0F2F7",
+"r#	c #C9D1E5",
+"s#	c #789FB1",
+"t#	c #92B0C0",
+"u#	c #8BACBC",
+"v#	c #82A6B5",
+"w#	c #DCE2EF",
+"x#	c #698ECD",
+"y#	c #5F86CA",
+"z#	c #CED5E7",
+"A#	c #D9DEEC",
+"B#	c #D1D9E9",
+"C#	c #D4DBEA",
+"D#	c #D6DDEC",
+"E#	c #D8DFEC",
+"F#	c #DAE1EE",
+"G#	c #698DCD",
+"H#	c #5F85CA",
+"I#	c #CED6E7",
+"J#	c #D1D8E8",
+"K#	c #D3DAEA",
+"L#	c #D5DCEB",
+"M#	c #D8DEEC",
+"N#	c #DAE0ED",
+"O#	c #5E85CA",
+"P#	c #CDD5E7",
+"Q#	c #D7DEEC",
+"R#	c #D9DFED",
+"S#	c #527DC7",
+"T#	c #507CC7",
+"U#	c #A0B3DA",
+"V#	c #A1B4DB",
+"W#	c #A1B5DC",
+"X#	c #A1B4DC",
+"Y#	c #A2B5DB",
+"Z#	c #A2B5DC",
+"`#	c #A3B6DC",
+" $	c #A3B7DC",
+".$	c #A4B6DC",
+"+$	c #A3B7DD",
+"@$	c #A4B7DD",
+"#$	c #8EA5D4",
+". + + + + + + + + @ # # # # $ % & % % % * = = - ; ; ; > ; > > , ",
+"' ) ) ) ) ) ) ) ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"' a a a a a a a b c ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d e e e e f g g g c ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d h h h i j j j k l ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d m n o p p q r s t ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"d j u v v v v w x t ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"y z A B v C D E F l ~ { ] ^ / ( G H I J K L M N O 4 5 6 7 8 9 0 ",
+"P Q R S v T U V V l ~ { ] ^ / H W X Y Z `  ...+. at .#.5 6 7 8 9 0 ",
+"P R $.%.v &.*.=.-.l ~ { ] ;.>.,.'.).!.~.{.].^./.(._.:.<.7 8 9 0 ",
+"P s [.}.v |.1.-.2.l ~ { ] 3.4.5.6.).!.~.7.8.9.0.a.b.c.d.7 8 9 0 ",
+"P e.F f.v |.g.h.i.j.~ { k.l.m.n.o.).p.q.r.s.t.u.v.w.x.y.z.8 9 0 ",
+"A.e.B.C.D.g.h.E.F.G.~ H.I.J.K.L.M.N.O.P.Q.R.S.T.v.w.U.V.W.X.9 0 ",
+"A.Y.Z.`.`. +.+++ at +G.~ #+$+%+&+*+M.=+-+;+>+,+'+)+!+w.U.~+{+]+9 0 ",
+"^+Y./+v (+_+v :+<+G.~ [+}+|+1+*+2+r.O.3+4+5+6+7+8+w.U.~+9+0+9 0 ",
+"a+F /+v b+c+v d+e+f+~ g+h+i+1+j+k+l+m+n+o+p+q+r+v.w.U.~+s+t+9 0 ",
+"a+F u+v v+v w+x+y+f+~ z+A+B+1+C+D+E+F+G+H+I+J+K+L+M+N+~+O+P+Q+0 ",
+"a+B.R+v S+T+U+V+W+X+~ Y+Z+`+1+ @. at E+F+G++@@@#@$@%@&@^.*@=@- at 9 0 ",
+";@B.R+v >@, at v '@)@f+~ !@~@{@1+]@^@/@(@_ at +@@@t.:@<@[@}@|@1 at 2@9 0 ",
+";@B.3 at 4@5 at 6@7 at 8@W+f+~ 9 at 0@a at 1+b@c at d@e at n++@@@t.f at g@h@}@i at j@k at 9 0 ",
+";@B.l at m@n at o@p at q@)@f+~ { r at s@1+*+M.).!.t at u@@@t.v at w@x@}@y at z@A at 9 0 ",
+"+ B at C@D at v v E at q@F at f+~ { G at H@I@*+M.).!.J at K@@@L at M@N at x@O at P@Q at 8 9 0 ",
+"+ [.*.R at T+S@T at U@V at f+~ { ] W at X@Y at M.).!.Z@`@@@ #.#+#@###$#%#8 9 0 ",
+"+ [.&#*#=#-#;#>#V at f+~ { ] ^ ,#'#)#!#!.~#{#]#^#/#(#_#:#<#7 8 9 0 ",
+"[#}#|#v 1#2#v 3#4#j.~ { ] ^ / 5#6#7#8#9#0#a#b#c#d#e#5 6 7 8 9 0 ",
+"f#x T+g#h#h#U+i#F at j.~ { ] ^ / ( _ j#k#l#m#n#o#p#q#4 5 6 7 8 9 0 ",
+"+ r#s#t#h.6 at u#v#w#x#~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"y#z#Y.*.2.x+A#W+V at x#~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"y#z }#B#C#D#E#F#V at G#~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"H#j I#J#K#L#M#N#V at j.~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"O#h P#[.*.h.Q#R#)@j.~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 ",
+"S#H#H#H#H#O#O#y#y#T#U#; > > ; V#W#W#X#Y#Z#Z#`#`#`#`# $.$+$@$0 #$"};
diff --git a/src/Flextra/FLEXTRA_PREPARE.xpm b/src/Flextra/FLEXTRA_PREPARE.xpm
new file mode 100644
index 0000000..6942789
--- /dev/null
+++ b/src/Flextra/FLEXTRA_PREPARE.xpm
@@ -0,0 +1,377 @@
+/* XPM */
+static char * FLEXTRA_PREPARE_xpm[] = {
+"32 32 342 2",
+"  	c None",
+". 	c #527DC7",
+"+ 	c #6489CB",
+"@ 	c #537DC7",
+"# 	c #9DB1D9",
+"$ 	c #9DB1DA",
+"% 	c #9DB2DA",
+"& 	c #9EB2DA",
+"* 	c #9EB2DB",
+"= 	c #9FB3DB",
+"- 	c #9FB3DA",
+"; 	c #A0B3DB",
+"> 	c #A0B4DB",
+", 	c #8BA3D3",
+"' 	c #C8CFE4",
+") 	c #658ACC",
+"! 	c #E0E5F0",
+"~ 	c #E2E7F2",
+"{ 	c #E4E9F3",
+"] 	c #E6EAF4",
+"^ 	c #E8ECF5",
+"/ 	c #EAEEF6",
+"( 	c #ECEFF6",
+"_ 	c #EEF1F7",
+": 	c #EFF1F8",
+"< 	c #F1F3F9",
+"[ 	c #F2F4F9",
+"} 	c #F4F5FA",
+"| 	c #F5F6FB",
+"1 	c #F6F8FB",
+"2 	c #F8F9FC",
+"3 	c #F9FAFC",
+"4 	c #FAFBFD",
+"5 	c #FBFBFD",
+"6 	c #FCFCFE",
+"7 	c #FDFDFE",
+"8 	c #FDFEFE",
+"9 	c #9CB1DA",
+"0 	c #C9D0E5",
+"a 	c #CAD0E5",
+"b 	c #668BCC",
+"c 	c #6488CB",
+"d 	c #CAD1E5",
+"e 	c #CBD1E5",
+"f 	c #CBD2E5",
+"g 	c #668CCC",
+"h 	c #CBD2E6",
+"i 	c #CCD2E6",
+"j 	c #CCD3E6",
+"k 	c #CDD4E6",
+"l 	c #678CCC",
+"m 	c #CBD3E7",
+"n 	c #BDC9DC",
+"o 	c #BDCADC",
+"p 	c #BCCADC",
+"q 	c #BDCADD",
+"r 	c #C9D1E5",
+"s 	c #CFD5E8",
+"t 	c #6388CB",
+"u 	c #CAD2E4",
+"v 	c #216778",
+"w 	c #96B1C3",
+"x 	c #CFD6E8",
+"y 	c #EAECF3",
+"z 	c #CAC0AB",
+"A 	c #CABFA9",
+"B 	c #CABFA7",
+"C 	c #C9BEA5",
+"D 	c #CABEA3",
+"E 	c #C9BCA0",
+"F 	c #CFC4AC",
+"G 	c #87A8B9",
+"H 	c #6F99AA",
+"I 	c #508596",
+"J 	c #88A9BA",
+"K 	c #B8C8D9",
+"L 	c #D1D7E9",
+"M 	c #668CCD",
+"N 	c #E6E7EA",
+"O 	c #8E6F2A",
+"P 	c #8F702B",
+"Q 	c #91722C",
+"R 	c #93722E",
+"S 	c #93742E",
+"T 	c #94752F",
+"U 	c #91732C",
+"V 	c #9A7E40",
+"W 	c #CED4E8",
+"X 	c #A8BCCF",
+"Y 	c #6F9AAB",
+"Z 	c #D1D8EA",
+"` 	c #D2D8EA",
+" .	c #D3D8EA",
+"..	c #E5E6E9",
+"+.	c #CA9835",
+"@.	c #E2A83A",
+"#.	c #BA8D32",
+"$.	c #9A7C3D",
+"%.	c #6389CB",
+"&.	c #CED5E8",
+"*.	c #D0D5E9",
+"=.	c #A8BDCF",
+"-.	c #719AAC",
+";.	c #D4D9EB",
+">.	c #D4DAEB",
+",.	c #E6E6E8",
+"'.	c #CA983B",
+").	c #E2A841",
+"!.	c #BA8D36",
+"~.	c #9A7C3E",
+"{.	c #D0D7E8",
+"].	c #A9BECF",
+"^.	c #719AAB",
+"/.	c #D4D9EA",
+"(.	c #D4DAEA",
+"_.	c #D4DBEB",
+":.	c #678DCD",
+"<.	c #E5E5E7",
+"[.	c #CA9940",
+"}.	c #E1A949",
+"|.	c #BA8E3A",
+"1.	c #6289CB",
+"2.	c #CFD6E9",
+"3.	c #D5DBEB",
+"4.	c #D6DBEB",
+"5.	c #E4E5E6",
+"6.	c #CA9946",
+"7.	c #E1AA51",
+"8.	c #BA8E3F",
+"9.	c #D1D8E9",
+"0.	c #D2D8E9",
+"a.	c #D3DAEB",
+"b.	c #D5DBEC",
+"c.	c #D6DCEC",
+"d.	c #D7DCED",
+"e.	c #E5E4E5",
+"f.	c #C99A4B",
+"g.	c #E0AB58",
+"h.	c #B98F42",
+"i.	c #6288CB",
+"j.	c #779EAF",
+"k.	c #3C7889",
+"l.	c #427D8D",
+"m.	c #6391A2",
+"n.	c #CCD6E6",
+"o.	c #D8DEED",
+"p.	c #E4E4E5",
+"q.	c #C99B51",
+"r.	c #E0AC60",
+"s.	c #B98F47",
+"t.	c #6694A5",
+"u.	c #7DA3B3",
+"v.	c #6392A2",
+"w.	c #87A9B9",
+"x.	c #D9DFED",
+"y.	c #688DCE",
+"z.	c #E4E4E4",
+"A.	c #C89B56",
+"B.	c #DFAD68",
+"C.	c #B9904B",
+"D.	c #9A7C3F",
+"E.	c #6291A2",
+"F.	c #96B4C2",
+"G.	c #D9DFEE",
+"H.	c #E2E5ED",
+"I.	c #B5A583",
+"J.	c #B3A17C",
+"K.	c #B19E76",
+"L.	c #C89C5C",
+"M.	c #DFAE6F",
+"N.	c #B9904F",
+"O.	c #937431",
+"P.	c #B9A67F",
+"Q.	c #BAA77F",
+"R.	c #CABB9D",
+"S.	c #6188CB",
+"T.	c #337283",
+"U.	c #5F8FA0",
+"V.	c #DADFEE",
+"W.	c #688CCE",
+"X.	c #C7BFAD",
+"Y.	c #957531",
+"Z.	c #A2803E",
+"`.	c #A17F3D",
+" +	c #CEA468",
+".+	c #DEB177",
+"++	c #C29A5C",
+"@+	c #A1803E",
+"#+	c #A3803F",
+"$+	c #917330",
+"%+	c #E8E4D8",
+"&+	c #6794A4",
+"*+	c #B1C4D5",
+"=+	c #3D7989",
+"-+	c #24697A",
+";+	c #BCCDDB",
+">+	c #DBE1EE",
+",+	c #B3A27D",
+"'+	c #91722E",
+")+	c #D0A971",
+"!+	c #DCB47E",
+"~+	c #C29D62",
+"{+	c #D3C8B0",
+"]+	c #B7C7D8",
+"^+	c #96B3C3",
+"/+	c #6091A1",
+"(+	c #E5E9F0",
+"_+	c #A08953",
+":+	c #9C7C3C",
+"<+	c #D8B481",
+"[+	c #DBB785",
+"}+	c #CFAC77",
+"|+	c #91732F",
+"1+	c #BAA880",
+"2+	c #6187CA",
+"3+	c #B9C8D9",
+"4+	c #A7BECE",
+"5+	c #CDD6E6",
+"6+	c #D6DDEC",
+"7+	c #ABC1D1",
+"8+	c #AEC3D2",
+"9+	c #DCE1EF",
+"0+	c #DEDEDD",
+"a+	c #947636",
+"b+	c #A8894C",
+"c+	c #D9BA8C",
+"d+	c #D6B788",
+"e+	c #9A7D3D",
+"f+	c #A38A54",
+"g+	c #F7F8F8",
+"h+	c #6087CA",
+"i+	c #C5D2E1",
+"j+	c #6B96A7",
+"k+	c #709BAA",
+"l+	c #DBE0EE",
+"m+	c #DDE2EF",
+"n+	c #D2CBBC",
+"o+	c #B99D67",
+"p+	c #D8BE93",
+"q+	c #A78A4E",
+"r+	c #957837",
+"s+	c #ECE9E4",
+"t+	c #D0D8E9",
+"u+	c #D2DAEA",
+"v+	c #86A8BA",
+"w+	c #DDE2F0",
+"x+	c #BCAF8E",
+"y+	c #8F702C",
+"z+	c #C7B082",
+"A+	c #D6C19A",
+"B+	c #B79E6A",
+"C+	c #8F702A",
+"D+	c #DAD1C1",
+"E+	c #D0D7E9",
+"F+	c #D2D9EA",
+"G+	c #467F90",
+"H+	c #4A8292",
+"I+	c #2A6D7E",
+"J+	c #6A96A6",
+"K+	c #DBE0EF",
+"L+	c #DCE2F0",
+"M+	c #EDEFF5",
+"N+	c #A7915F",
+"O+	c #957938",
+"P+	c #D0BE98",
+"Q+	c #C5B186",
+"R+	c #C2B392",
+"S+	c #6086CA",
+"T+	c #B9C9D9",
+"U+	c #81A6B7",
+"V+	c #5B8D9D",
+"W+	c #2D6E80",
+"X+	c #D7DDEB",
+"Y+	c #DEE2EF",
+"Z+	c #688DCD",
+"`+	c #E7E7E7",
+" @	c #977C3E",
+".@	c #A0864C",
+"+@	c #967838",
+"@@	c #AA9463",
+"#@	c #F5F7F9",
+"$@	c #CFD7E8",
+"%@	c #7AA0B1",
+"&@	c #397786",
+"*@	c #317182",
+"=@	c #A1BBC9",
+"-@	c #DDE3EF",
+";@	c #DAD5CA",
+">@	c #8F712C",
+",@	c #987C3F",
+"'@	c #EEECEB",
+")@	c #3C788A",
+"!@	c #307181",
+"~@	c #7BA1B0",
+"{@	c #77A0B0",
+"]@	c #C9BDA3",
+"^@	c #DED9CE",
+"/@	c #5F86CA",
+"(@	c #C5CFE2",
+"_@	c #799FB0",
+":@	c #96B2C3",
+"<@	c #D7DDED",
+"[@	c #87A9BA",
+"}@	c #85A9B8",
+"|@	c #DDE3F0",
+"1@	c #698ECD",
+"2@	c #5F85C9",
+"3@	c #D5DCEB",
+"4@	c #D7DDEC",
+"5@	c #D9DEED",
+"6@	c #CDD5E7",
+"7@	c #D2D9E9",
+"8@	c #D4DBEA",
+"9@	c #D8DFED",
+"0@	c #698DCD",
+"a@	c #5E85C9",
+"b@	c #CCD4E6",
+"c@	c #CED6E7",
+"d@	c #D1D8E8",
+"e@	c #D3DAEA",
+"f@	c #D6DCEB",
+"g@	c #DBE0ED",
+"h@	c #CBD3E6",
+"i@	c #CED5E7",
+"j@	c #D3D9EA",
+"k@	c #D7DEED",
+"l@	c #DADFED",
+"m@	c #5F85CA",
+"n@	c #5E85CA",
+"o@	c #557FC7",
+"p@	c #A0B3DA",
+"q@	c #A1B4DB",
+"r@	c #A1B5DC",
+"s@	c #A1B4DC",
+"t@	c #A2B5DB",
+"u@	c #A2B5DC",
+"v@	c #A3B6DC",
+"w@	c #A4B6DC",
+"x@	c #A3B7DC",
+"y@	c #A4B7DD",
+"z@	c #A4B7DC",
+"A@	c #8CA4D3",
+". + + + + + + + + @ # # # # $ % % & & & * = = - ; ; ; > ; > > , ",
+"+ ' ' ' ' ' ' ' ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"+ 0 0 0 0 0 0 0 a b ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"c d d d d e f f f g ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"c h h h i j j j k l ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"c m n o p p q r s g ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"t u v v v v v w x g ! ~ { ] ^ / y z A B C C D E F 3 4 5 6 7 8 9 ",
+"t j G H v I J K L M ! ~ { ] ^ / N O P Q R S T U V 3 4 5 6 7 8 9 ",
+"t W s X v Y Z `  .M ! ~ { ] ^ / ..O +. at .@. at .@.#.$.3 4 5 6 7 8 9 ",
+"%.&.*.=.v -.` ;.>.M ! ~ { ] ^ / ,.O '.).).).).!.~.3 4 5 6 7 8 9 ",
+"%.s {.].v ^./.(._.:.! ~ { ] ^ / <.O [.}.}.}.}.|.~.3 4 5 6 7 8 9 ",
+"1.2.L ].v -.>.3.4.:.! ~ { ] ^ / 5.O 6.7.7.7.7.8.~.3 4 5 6 7 8 9 ",
+"1.2.9.0.a.>.b.c.d.:.! ~ { ] ^ / e.O f.g.g.g.g.h.~.3 4 5 6 7 8 9 ",
+"i.L j.k.k.l.m.n.o.:.! ~ { ] ^ / p.O q.r.r.r.r.s.~.3 4 5 6 7 8 9 ",
+"i.L t.v u.v.v w.x.y.! ~ { ] ^ / z.O A.B.B.B.B.C.D.3 4 5 6 7 8 9 ",
+"i.L t.v u.E.v F.G.y.! ~ H.I.J.J.K.O L.M.M.M.M.N.O.P.Q.Q.R.7 8 9 ",
+"S.9.t.v T.v U.x.V.W.! ~ { X.O Y.Z.`. +.+.+.+.+++ at +#+Q $+%+7 8 9 ",
+"S.9.&+v *+=+-+;+>+y.! ~ { ] ,+'+)+!+!+!+!+!+!+!+!+~+O {+6 7 8 9 ",
+"S.9.&+v ]+^+v /+>+y.! ~ { ] (+_+:+<+[+[+[+[+[+[+}+|+1+5 6 7 8 9 ",
+"2+9.3+4+5+6+7+8+9+y.! ~ { ] ^ 0+a+b+c+c+c+c+c+d+e+f+g+5 6 7 8 9 ",
+"h+9.a.i+j+k+o.l+m+y.! ~ { ] ^ / n+P o+p+p+p+p+q+r+s+4 5 6 7 8 9 ",
+"2+t+u+v+v v 7+l+w+y.! ~ { ] ^ / ( x+y+z+A+A+B+C+D+3 4 5 6 7 8 9 ",
+"2+E+F+G+H+I+J+K+L+y.! ~ { ] ^ / ( M+N+O+P+Q+y+R+2 3 4 5 6 7 8 9 ",
+"S+{.T+v U+V+W+X+Y+Z+! ~ { ] ^ / ( _ `+ @. at +@@@#@2 3 4 5 6 7 8 9 ",
+"S+$@%@v &@*@v =@- at Z+! ~ { ] ^ / ( _ : ;@>@,@'@1 2 3 4 5 6 7 8 9 ",
+"S+x )@!@~@{@v U.w+Z+! ~ { ] ^ / ( _ : < ]@^@| 1 2 3 4 5 6 7 8 9 ",
+"/@(@_@:@3.<@[@}@|@1@! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"2@&.E+u+3 at 4@5 at l+m+1@! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"2 at 6@$@7 at 8@6+9@>+m+0@! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"a at b@c at d@e at f@o.g at m+Z+! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+"a at h@i@{.j at 3@k at l@9+Z+! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
+". m at m@m at m@n at n@/@/@o at p@; > > ; q at r@r at s@t at u@u at v@v at v@w at x@w at y@y at z@A@"};
diff --git a/src/Flextra/FLEXTRA_RUN.xpm b/src/Flextra/FLEXTRA_RUN.xpm
new file mode 100644
index 0000000..fe08da7
--- /dev/null
+++ b/src/Flextra/FLEXTRA_RUN.xpm
@@ -0,0 +1,399 @@
+/* XPM */
+static char * FLEXTRA_RUN_xpm[] = {
+"32 32 364 2",
+"  	c None",
+". 	c #537DC7",
+"+ 	c #6488CB",
+"@ 	c #6489CB",
+"# 	c #5780C8",
+"$ 	c #9DB1D9",
+"% 	c #9DB1DA",
+"& 	c #9EB2DA",
+"* 	c #9DB2DA",
+"= 	c #9EB2DB",
+"- 	c #9FB3DB",
+"; 	c #9FB3DA",
+"> 	c #A0B3DB",
+", 	c #A0B4DB",
+"' 	c #8EA5D4",
+") 	c #6186CA",
+"! 	c #C8CFE4",
+"~ 	c #6A8ECD",
+"{ 	c #E0E4F0",
+"] 	c #E2E6F2",
+"^ 	c #E4E8F3",
+"/ 	c #E6EAF3",
+"( 	c #E8EBF5",
+"_ 	c #EAEDF6",
+": 	c #ECEEF6",
+"< 	c #EEF0F7",
+"[ 	c #EFF1F8",
+"} 	c #F1F3F9",
+"| 	c #F2F4F9",
+"1 	c #F4F5FA",
+"2 	c #F5F6FB",
+"3 	c #F6F7FB",
+"4 	c #F7F9FC",
+"5 	c #F9FAFC",
+"6 	c #FAFAFD",
+"7 	c #FBFBFD",
+"8 	c #FCFCFD",
+"9 	c #FDFDFE",
+"0 	c #FDFEFE",
+"a 	c #A7BADE",
+"b 	c #C9D0E5",
+"c 	c #CAD0E5",
+"d 	c #6086CA",
+"e 	c #CAD1E5",
+"f 	c #CBD1E5",
+"g 	c #CBD2E5",
+"h 	c #CBD2E6",
+"i 	c #CCD2E6",
+"j 	c #CCD3E6",
+"k 	c #CDD4E6",
+"l 	c #CBD3E7",
+"m 	c #BCC9DD",
+"n 	c #BDCADC",
+"o 	c #BCCADC",
+"p 	c #BDCADD",
+"q 	c #C8D0E5",
+"r 	c #CFD5E8",
+"s 	c #216778",
+"t 	c #92B0C1",
+"u 	c #CFD6E8",
+"v 	c #6B8FCD",
+"w 	c #CED0DF",
+"x 	c #8787AC",
+"y 	c #8282A7",
+"z 	c #8284A8",
+"A 	c #8283A8",
+"B 	c #8384A8",
+"C 	c #8485A9",
+"D 	c #8586AA",
+"E 	c #8787AA",
+"F 	c #8888AB",
+"G 	c #8889AC",
+"H 	c #8485A8",
+"I 	c #9899B7",
+"J 	c #CDD4E7",
+"K 	c #87A9B9",
+"L 	c #729AAB",
+"M 	c #4E8395",
+"N 	c #88A9BA",
+"O 	c #B8C7D8",
+"P 	c #D1D7E9",
+"Q 	c #6B8FCE",
+"R 	c #E0E3EE",
+"S 	c #999BB9",
+"T 	c #74759D",
+"U 	c #454F8C",
+"V 	c #38458A",
+"W 	c #414D8F",
+"X 	c #495594",
+"Y 	c #535E99",
+"Z 	c #5A669E",
+"` 	c #636FA4",
+" .	c #6C76AA",
+"..	c #767EAD",
+"+.	c #787DA7",
+"@.	c #7476A0",
+"#.	c #8F8FAF",
+"$.	c #CDD4E8",
+"%.	c #CED5E8",
+"&.	c #A9BECF",
+"*.	c #6D98A9",
+"=.	c #D1D8EA",
+"-.	c #D2D8EA",
+";.	c #BABDD1",
+">.	c #7979A0",
+",.	c #5A6194",
+"'.	c #344287",
+").	c #313F86",
+"!.	c #334187",
+"~.	c #3C498C",
+"{.	c #435090",
+"].	c #4D5996",
+"^.	c #56609B",
+"/.	c #5E69A1",
+"(.	c #6B72A2",
+"_.	c #73749E",
+":.	c #5F669A",
+"<.	c #646DA1",
+"[.	c #9192B2",
+"}.	c #D0D5E8",
+"|.	c #AABED0",
+"1.	c #6E98AA",
+"2.	c #D2D9EA",
+"3.	c #D3D9EA",
+"4.	c #D4DAEA",
+"5.	c #DADDEB",
+"6.	c #77779E",
+"7.	c #7679A0",
+"8.	c #7879A2",
+"9.	c #777BA3",
+"0.	c #797CA3",
+"a.	c #797BA3",
+"b.	c #7B7DA4",
+"c.	c #7C7EA4",
+"d.	c #7D7FA5",
+"e.	c #7F81A6",
+"f.	c #7B7CA2",
+"g.	c #646897",
+"h.	c #475391",
+"i.	c #535F9A",
+"j.	c #5F85CA",
+"k.	c #D0D7E8",
+"l.	c #ABBED0",
+"m.	c #D4D9EA",
+"n.	c #D4DBEB",
+"o.	c #6C8FCE",
+"p.	c #8589AC",
+"q.	c #395A8F",
+"r.	c #456497",
+"s.	c #536F9D",
+"t.	c #5F7AA6",
+"u.	c #6B84AD",
+"v.	c #7A8FB5",
+"w.	c #879ABC",
+"x.	c #93A5C2",
+"y.	c #A0B0C9",
+"z.	c #8C94B5",
+"A.	c #4A5490",
+"B.	c #455191",
+"C.	c #CFD6E9",
+"D.	c #ABC0D1",
+"E.	c #6F98AA",
+"F.	c #D4DAEB",
+"G.	c #D5DBEB",
+"H.	c #D6DBEB",
+"I.	c #D1D8E9",
+"J.	c #D2D8E9",
+"K.	c #D3DAEB",
+"L.	c #D6DCEC",
+"M.	c #D7DCED",
+"N.	c #0F1622",
+"O.	c #090C12",
+"P.	c #0B0E13",
+"Q.	c #0B0F14",
+"R.	c #0E1115",
+"S.	c #0F1116",
+"T.	c #3A424E",
+"U.	c #5F86CA",
+"V.	c #D0D7E9",
+"W.	c #799FB1",
+"X.	c #3C7889",
+"Y.	c #417B8C",
+"Z.	c #6190A1",
+"`.	c #CAD4E4",
+" +	c #D8DEED",
+".+	c #6C90CF",
+"++	c #1E2D43",
+"@+	c #1F293A",
+"#+	c #242E3E",
+"$+	c #283141",
+"%+	c #2D3543",
+"&+	c #333A46",
+"*+	c #535E6E",
+"=+	c #6995A6",
+"-+	c #7BA1B2",
+";+	c #6593A3",
+">+	c #83A7B7",
+",+	c #D9DEED",
+"'+	c #8E94B5",
+")+	c #5E86CA",
+"!+	c #6A95A6",
+"~+	c #7BA2B1",
+"{+	c #6493A2",
+"]+	c #92B1C1",
+"^+	c #D9DFEE",
+"/+	c #3B5782",
+"(+	c #465D85",
+"_+	c #50678B",
+":+	c #5A7092",
+"<+	c #667898",
+"[+	c #71829E",
+"}+	c #8494AF",
+"|+	c #337283",
+"1+	c #5D8F9F",
+"2+	c #D8DDEC",
+"3+	c #DADFEE",
+"4+	c #6D90CF",
+"5+	c #05080D",
+"6+	c #000000",
+"7+	c #333843",
+"8+	c #8C93B4",
+"9+	c #B0C3D3",
+"0+	c #3F7A8A",
+"a+	c #236879",
+"b+	c #BACBDA",
+"c+	c #DBE0EE",
+"d+	c #304568",
+"e+	c #354867",
+"f+	c #3F506C",
+"g+	c #475671",
+"h+	c #4F5E76",
+"i+	c #57657A",
+"j+	c #728097",
+"k+	c #5E85CA",
+"l+	c #6996A6",
+"m+	c #B3C6D6",
+"n+	c #99B5C5",
+"o+	c #5E8F9F",
+"p+	c #DBE1EE",
+"q+	c #B9C9D8",
+"r+	c #A6BECE",
+"s+	c #CDD6E7",
+"t+	c #D5DDEC",
+"u+	c #ABC1D0",
+"v+	c #ADC3D2",
+"w+	c #DCE1EF",
+"x+	c #446694",
+"y+	c #52719A",
+"z+	c #5E7BA3",
+"A+	c #6B86AB",
+"B+	c #5D85CA",
+"C+	c #D3D9EB",
+"D+	c #C7D2E2",
+"E+	c #6A95A7",
+"F+	c #6F99AA",
+"G+	c #D7DEEC",
+"H+	c #DAE0EE",
+"I+	c #DDE2EF",
+"J+	c #3CA04A",
+"K+	c #50B944",
+"L+	c #50BB45",
+"M+	c #4B9D65",
+"N+	c #5D85C9",
+"O+	c #D0D8E9",
+"P+	c #D2D9EB",
+"Q+	c #8AAABC",
+"R+	c #A8C0CF",
+"S+	c #DDE2F0",
+"T+	c #48AD49",
+"U+	c #74F030",
+"V+	c #4DA062",
+"W+	c #4A8192",
+"X+	c #488091",
+"Y+	c #2D6F80",
+"Z+	c #6695A4",
+"`+	c #DBE0EF",
+" @	c #3EA449",
+".@	c #57C53E",
+"+@	c #57C63E",
+"@@	c #4D9F64",
+"#@	c #5D84C9",
+"$@	c #BBCADB",
+"%@	c #226879",
+"&@	c #7EA4B4",
+"*@	c #5F8FA0",
+"=@	c #2B6E7F",
+"-@	c #D5DCEB",
+";@	c #6D90CE",
+">@	c #436B8D",
+",@	c #4E7491",
+"'@	c #597D99",
+")@	c #6887A6",
+"!@	c #686FA0",
+"~@	c #8889AB",
+"{@	c #5C84C9",
+"]@	c #CFD7E8",
+"^@	c #7DA2B3",
+"/@	c #397786",
+"(@	c #327183",
+"_@	c #9FBAC7",
+":@	c #DDE3EF",
+"<@	c #475392",
+"[@	c #676C9C",
+"}@	c #8385A9",
+"|@	c #E1E2EA",
+"1@	c #3E7A8B",
+"2@	c #2E7081",
+"3@	c #7AA1B1",
+"4@	c #79A0B1",
+"5@	c #5C8D9E",
+"6@	c #8B91B3",
+"7@	c #555D92",
+"8@	c #7477A0",
+"9@	c #B5B7CE",
+"0@	c #C7D0E3",
+"a@	c #799FB0",
+"b@	c #95B1C2",
+"c@	c #D7DDED",
+"d@	c #83A6B6",
+"e@	c #DDE3F0",
+"f@	c #DCE0ED",
+"g@	c #8788AB",
+"h@	c #8083A7",
+"i@	c #8285A8",
+"j@	c #8386A9",
+"k@	c #8486A9",
+"l@	c #8689AA",
+"m@	c #8689AB",
+"n@	c #898AAB",
+"o@	c #898CAD",
+"p@	c #888AAE",
+"q@	c #EBECF2",
+"r@	c #5C83C9",
+"s@	c #CED5E7",
+"t@	c #D7DDEC",
+"u@	c #D9DEEC",
+"v@	c #D1D9E9",
+"w@	c #D4DBEA",
+"x@	c #D6DDEC",
+"y@	c #D8DFEC",
+"z@	c #DAE1EE",
+"A@	c #CED6E7",
+"B@	c #D1D8E8",
+"C@	c #D3DAEA",
+"D@	c #D8DEEC",
+"E@	c #DAE0ED",
+"F@	c #CDD5E7",
+"G@	c #D9DFED",
+"H@	c #507BC6",
+"I@	c #537EC7",
+"J@	c #A0B3DA",
+"K@	c #A1B4DB",
+"L@	c #A1B5DC",
+"M@	c #A1B4DC",
+"N@	c #A2B5DB",
+"O@	c #A2B5DC",
+"P@	c #A2B6DC",
+"Q@	c #A3B6DC",
+"R@	c #A3B7DC",
+"S@	c #A4B6DC",
+"T@	c #A3B7DD",
+"U@	c #A4B7DD",
+"V@	c #A4B7DC",
+"W@	c #8FA6D5",
+". + + + + + @ @ @ # $ $ $ $ % & * & & & = - - ; > > > , > , , ' ",
+") ! ! ! ! ! ! ! ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+") b b b b b b b c ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d e e e e f g g g ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d h h h i j j j k ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d l m n o o p q r ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"d j s s s s s t u v { ] ^ / ( _ w x y z A B C D E F G H I 9 0 a ",
+"d J K L s M N O P Q { ] ^ / R S T U V W X Y Z `  ...+. at .#.9 0 a ",
+"d $.%.&.s *.=.-.-.Q { ] ^ ;.>.,.'.).!.~.{.].^./.(._.:.<.[.9 0 a ",
+"d %.}.|.s 1.2.3.4.v { ] 5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.<.[.9 0 a ",
+"j.r k.l.s 1.m.4.n.o.{ ] 5.p.q.r.s.t.u.v.w.x.y.z.A.B.i.<.[.9 0 a ",
+"j.C.P D.s E.F.G.H.o.{ ] 5.p.q.r.s.t.u.v.w.x.y.z.A.B.i.<.[.9 0 a ",
+"j.C.I.J.K.F.G.L.M.o.{ ] 5.p.q.N.O.P.Q.R.S.T.y.z.A.B.i.<.[.9 0 a ",
+"U.V.W.X.X.Y.Z.`. +.+{ ] 5.p.q.++ at +#+$+%+&+*+y.z.A.B.i.<.[.9 0 a ",
+"U.V.=+s -+;+s >+,+.+{ ] 5.p.q.r.s.t.u.v.w.x.y.'+A.B.i.<.[.9 0 a ",
+")+P !+s ~+{+s ]+^+.+{ ] 5.p.q./+(+_+:+<+[+}+y.'+A.B.i.<.[.9 0 a ",
+")+P !+s |+s 1+2+3+4+{ ] 5.p.q.5+6+6+6+6+6+7+y.8+A.B.i.<.[.9 0 a ",
+")+I.=+s 9+0+a+b+c+4+{ ] 5.p.q.d+e+f+g+h+i+j+y.8+A.B.i.<.[.9 0 a ",
+"k+I.l+s m+n+s o+p+4+{ ] 5.p.q.r.s.t.u.v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"k+I.q+r+s+t+u+v+w+.+{ ] 5.p.q.x+y+z+A+v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"B+I.C+D+E+F+G+H+I+.+{ ] 5.p.q.J+K+L+M+v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"N+O+P+Q+s s R+H+S+.+{ ] 5.p.q.T+U+U+V+v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"N+k.2.W+X+Y+Z+`+I+.+{ ] 5.p.q. @. at +@@@v.w.x.y.8+A.B.i.<.[.9 0 a ",
+"#@k.$@%@&@*@=@- at I+;@{ ] 5.p.q.>@,@'@)@v.w.x.y.8+A.B.i.!@~@9 0 a ",
+"{@]@^@s /@(@s _@:@;@{ ] 5.p.q.r.s.t.u.v.w.x.y.8+A.<@[@}@|@9 0 a ",
+"{@u 1 at 2@3 at 4@%@5 at S+;@{ ] 5.p.q.r.s.t.u.v.w.x.y.6 at 7@8 at 9@7 8 9 0 a ",
+"#@0 at a@b at G.c@N d at e@4+{ ] f at g@h at i@j at k@l at m@~@n at o@g at p@q at 6 7 8 9 0 a ",
+"r at s@V.2.n.t at u@c+I+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"r at J ]@v at w@x at y@z at I+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"r at j A at B@C at -@D at E@I+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"r at h F at k.2.G.G+G@w+4+{ ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+"H at j.j.j.j.k+k+U.U.I@J@; , , > K at L@L at M@N at O@P at O@Q at Q@Q at R@S at T@U at V@W@"};
diff --git a/src/Flextra/FLEXTRA_VISUALISER.xpm b/src/Flextra/FLEXTRA_VISUALISER.xpm
new file mode 100644
index 0000000..c6e95c2
--- /dev/null
+++ b/src/Flextra/FLEXTRA_VISUALISER.xpm
@@ -0,0 +1,419 @@
+/* XPM */
+static char * FLEXTRA_VISUALISER_xpm[] = {
+"32 32 384 2",
+"  	c None",
+". 	c #507CC7",
+"+ 	c #6186CA",
+"@ 	c #6187CA",
+"# 	c #547EC7",
+"$ 	c #A3B5DC",
+"% 	c #A3B5DB",
+"& 	c #A3B6DC",
+"* 	c #A3B7DC",
+"= 	c #A4B6DC",
+"- 	c #A4B7DC",
+"; 	c #A5B7DD",
+"> 	c #A6B8DD",
+", 	c #A5B8DD",
+"' 	c #A6B9DD",
+") 	c #A7B9DE",
+"! 	c #A7B9DD",
+"~ 	c #A7BADE",
+"{ 	c #A8BADE",
+"] 	c #8EA5D4",
+"^ 	c #C8CFE4",
+"/ 	c #6A8ECD",
+"( 	c #E0E5F0",
+"_ 	c #E2E7F2",
+": 	c #E4E9F3",
+"< 	c #E6EAF4",
+"[ 	c #E8ECF5",
+"} 	c #EAEEF6",
+"| 	c #ECEEF6",
+"1 	c #EEF0F7",
+"2 	c #EFF1F8",
+"3 	c #F1F3F9",
+"4 	c #F2F4F9",
+"5 	c #F4F5FA",
+"6 	c #F5F6FB",
+"7 	c #F6F8FB",
+"8 	c #F7F9FC",
+"9 	c #F9FAFC",
+"0 	c #FAFBFD",
+"a 	c #FBFBFD",
+"b 	c #FCFCFE",
+"c 	c #FDFDFE",
+"d 	c #FDFEFE",
+"e 	c #A0B4DB",
+"f 	c #C9D0E5",
+"g 	c #CAD0E5",
+"h 	c #6086CA",
+"i 	c #CAD1E5",
+"j 	c #CBD1E5",
+"k 	c #CBD2E5",
+"l 	c #CBD2E6",
+"m 	c #CCD2E6",
+"n 	c #CCD3E6",
+"o 	c #CDD4E6",
+"p 	c #CBD3E7",
+"q 	c #BDC9DD",
+"r 	c #BDCADC",
+"s 	c #BCCADC",
+"t 	c #BDCADD",
+"u 	c #C8D0E5",
+"v 	c #CFD5E8",
+"w 	c #226879",
+"x 	c #216778",
+"y 	c #93AFC1",
+"z 	c #CFD6E8",
+"A 	c #6B8FCD",
+"B 	c #CDD4E7",
+"C 	c #87A9B9",
+"D 	c #719AAB",
+"E 	c #4E8394",
+"F 	c #88A9BA",
+"G 	c #B8C7D8",
+"H 	c #D1D7E9",
+"I 	c #6B8FCE",
+"J 	c #CED4E8",
+"K 	c #ABBED0",
+"L 	c #6C98A8",
+"M 	c #D1D8EA",
+"N 	c #D2D8EA",
+"O 	c #D3D8EA",
+"P 	c #CFD3DB",
+"Q 	c #757979",
+"R 	c #606463",
+"S 	c #616363",
+"T 	c #616563",
+"U 	c #626563",
+"V 	c #636563",
+"W 	c #636664",
+"X 	c #646764",
+"Y 	c #646664",
+"Z 	c #656765",
+"` 	c #656764",
+" .	c #666865",
+"..	c #7F817F",
+"+.	c #E3E3E4",
+"@.	c #CED5E8",
+"#.	c #D0D5E8",
+"$.	c #ABBFD0",
+"%.	c #6D98A9",
+"&.	c #D2D9EA",
+"*.	c #D4D9EA",
+"=.	c #D4DAEA",
+"-.	c #5D6160",
+";.	c #5A5C56",
+">.	c #969691",
+",.	c #5C5E58",
+"'.	c #5F625E",
+").	c #D0D7E8",
+"!.	c #ACBFD1",
+"~.	c #D4DBEB",
+"{.	c #6C8FCE",
+"].	c #373A35",
+"^.	c #B8B6B2",
+"/.	c #71757F",
+"(.	c #E7E4E0",
+"_.	c #E6ADAA",
+":.	c #E7DBD7",
+"<.	c #BFBDB8",
+"[.	c #393D37",
+"}.	c #5F85CA",
+"|.	c #CFD6E9",
+"1.	c #ACC1D1",
+"2.	c #6E98A9",
+"3.	c #D4DAEB",
+"4.	c #D5DBEB",
+"5.	c #D6DBEB",
+"6.	c #20293D",
+"7.	c #E6E3DF",
+"8.	c #E7B5B2",
+"9.	c #E52626",
+"0.	c #E6A3A1",
+"a.	c #D1D8E9",
+"b.	c #D2D8E9",
+"c.	c #D3DAEB",
+"d.	c #D5DBEC",
+"e.	c #D6DCEC",
+"f.	c #D7DCED",
+"g.	c #21293D",
+"h.	c #E5E3DF",
+"i.	c #E55050",
+"j.	c #E54C4B",
+"k.	c #E67473",
+"l.	c #E7B7B4",
+"m.	c #E7CECA",
+"n.	c #5F86CA",
+"o.	c #D0D7E9",
+"p.	c #799FB1",
+"q.	c #3C7889",
+"r.	c #417B8C",
+"s.	c #6190A2",
+"t.	c #CAD4E4",
+"u.	c #D8DEED",
+"v.	c #6C90CF",
+"w.	c #212A3E",
+"x.	c #E5E2DE",
+"y.	c #E6A9A6",
+"z.	c #E54645",
+"A.	c #E7B9B6",
+"B.	c #E54544",
+"C.	c #E68F8D",
+"D.	c #E53939",
+"E.	c #E53B3A",
+"F.	c #E7C2BF",
+"G.	c #6996A7",
+"H.	c #7BA1B2",
+"I.	c #6493A3",
+"J.	c #83A7B7",
+"K.	c #D9DEED",
+"L.	c #222B3F",
+"M.	c #E4E1DD",
+"N.	c #E7E3DF",
+"O.	c #E6ABA9",
+"P.	c #E7E0DC",
+"Q.	c #E52D2D",
+"R.	c #E54847",
+"S.	c #E7D1CE",
+"T.	c #E6A8A5",
+"U.	c #E53838",
+"V.	c #6995A7",
+"W.	c #7BA2B1",
+"X.	c #6493A2",
+"Y.	c #93B1C1",
+"Z.	c #D9DFEE",
+"`.	c #232C3F",
+" +	c #E3E0DD",
+".+	c #E69D9B",
+"++	c #E55352",
+"@+	c #E7C1BE",
+"#+	c #E7D8D4",
+"$+	c #E67675",
+"%+	c #5E86CA",
+"&+	c #6997A7",
+"*+	c #337283",
+"=+	c #5C8E9E",
+"-+	c #D8DEEC",
+";+	c #DADFEE",
+">+	c #6D90CF",
+",+	c #242C40",
+"'+	c #E2E0DC",
+")+	c #E69290",
+"!+	c #E7BFBC",
+"~+	c #B0C3D3",
+"{+	c #3F7A8A",
+"]+	c #236879",
+"^+	c #BBCBDA",
+"/+	c #DBE1EE",
+"(+	c #232C40",
+"_+	c #ABABAE",
+":+	c #AEAEB1",
+"<+	c #ADADB0",
+"[+	c #ACADB0",
+"}+	c #ABACAF",
+"|+	c #AAAAAE",
+"1+	c #A9AAAD",
+"2+	c #B1B1B4",
+"3+	c #5E85CA",
+"4+	c #B2C6D5",
+"5+	c #99B6C5",
+"6+	c #5E8F9F",
+"7+	c #B7B6B1",
+"8+	c #616572",
+"9+	c #575D6A",
+"0+	c #585E6B",
+"a+	c #595F6C",
+"b+	c #5A5F6C",
+"c+	c #5B606D",
+"d+	c #5B616E",
+"e+	c #5C626E",
+"f+	c #5D626F",
+"g+	c #6E727D",
+"h+	c #BDBBB7",
+"i+	c #393C36",
+"j+	c #BAC9D8",
+"k+	c #A7BECE",
+"l+	c #CDD6E7",
+"m+	c #D5DDEC",
+"n+	c #ABC1D1",
+"o+	c #ADC2D1",
+"p+	c #DCE1EF",
+"q+	c #666B6B",
+"r+	c #484A44",
+"s+	c #82827D",
+"t+	c #74756F",
+"u+	c #50524C",
+"v+	c #61635D",
+"w+	c #4C4E48",
+"x+	c #6C6F6B",
+"y+	c #C6D3E3",
+"z+	c #6A95A7",
+"A+	c #6F99AA",
+"B+	c #D7DEED",
+"C+	c #DBE0EE",
+"D+	c #DDE2EF",
+"E+	c #D9DDE7",
+"F+	c #8B8F92",
+"G+	c #747878",
+"H+	c #757978",
+"I+	c #767A79",
+"J+	c #777A79",
+"K+	c #5B5F5B",
+"L+	c #222520",
+"M+	c #3B3D39",
+"N+	c #313430",
+"O+	c #333531",
+"P+	c #7A7D7B",
+"Q+	c #7C7E7C",
+"R+	c #7C7F7C",
+"S+	c #7C7F7B",
+"T+	c #969997",
+"U+	c #EFEFF1",
+"V+	c #5D85C9",
+"W+	c #D0D8E9",
+"X+	c #D2DAEA",
+"Y+	c #8AABBB",
+"Z+	c #A7BFCF",
+"`+	c #DDE2F0",
+" @	c #767A7C",
+".@	c #1E221D",
+"+@	c #191F18",
+"@@	c #1A1F18",
+"#@	c #171C15",
+"$@	c #161A13",
+"%@	c #161A14",
+"&@	c #171B15",
+"*@	c #1B2019",
+"=@	c #1C201A",
+"-@	c #595C59",
+";@	c #FAFAFC",
+">@	c #4A8192",
+",@	c #478091",
+"'@	c #2D6F80",
+")@	c #6695A5",
+"!@	c #DBE0EF",
+"~@	c #DCE2F0",
+"{@	c #6D91CF",
+"]@	c #D5D9E3",
+"^@	c #1C201B",
+"/@	c #ACBCC1",
+"(@	c #B6C6CC",
+"_@	c #B2C2C8",
+":@	c #373C37",
+"<@	c #BFC0BF",
+"[@	c #BBCADB",
+"}@	c #7EA4B4",
+"|@	c #5F8FA0",
+"1@	c #2A6D7E",
+"2@	c #D5DCEB",
+"3@	c #6D91CE",
+"4@	c #E2E7F1",
+"5@	c #282C27",
+"6@	c #5B6362",
+"7@	c #687272",
+"8@	c #636D6C",
+"9@	c #1F241E",
+"0@	c #CFD7E8",
+"a@	c #7EA2B4",
+"b@	c #387686",
+"c@	c #327183",
+"d@	c #9EB9C7",
+"e@	c #DDE3EF",
+"f@	c #6D90CE",
+"g@	c #CCD0D8",
+"h@	c #898D8F",
+"i@	c #848688",
+"j@	c #858788",
+"k@	c #868889",
+"l@	c #868989",
+"m@	c #878989",
+"n@	c #888A8A",
+"o@	c #898B8B",
+"p@	c #8A8C8A",
+"q@	c #8A8C8B",
+"r@	c #8B8C8B",
+"s@	c #8B8D8B",
+"t@	c #8E908E",
+"u@	c #CECFCE",
+"v@	c #5C84C9",
+"w@	c #3E7A8B",
+"x@	c #2E7081",
+"y@	c #7AA1B1",
+"z@	c #79A0B1",
+"A@	c #5D8D9E",
+"B@	c #5D84C9",
+"C@	c #C7D0E3",
+"D@	c #799FB0",
+"E@	c #96B2C2",
+"F@	c #D7DDED",
+"G@	c #88A9BB",
+"H@	c #83A6B6",
+"I@	c #DDE3F0",
+"J@	c #D7DDEC",
+"K@	c #CDD5E7",
+"L@	c #D2D9E9",
+"M@	c #D4DBEA",
+"N@	c #D6DDEC",
+"O@	c #D8DFED",
+"P@	c #5C83C9",
+"Q@	c #CCD4E6",
+"R@	c #CED6E7",
+"S@	c #D1D8E8",
+"T@	c #D3DAEA",
+"U@	c #DBE0ED",
+"V@	c #CBD3E6",
+"W@	c #CED5E7",
+"X@	c #DADFED",
+"Y@	c #507BC6",
+"Z@	c #5B83C8",
+"`@	c #5B82C8",
+" #	c #537DC7",
+".#	c #99AED8",
+"+#	c #99AFD8",
+"@#	c #9AAED9",
+"##	c #9AAFD9",
+"$#	c #9BB0D9",
+"%#	c #9BAFD9",
+"&#	c #9BAFDA",
+"*#	c #9CB0D9",
+"=#	c #9BB1D9",
+"-#	c #9BB0DA",
+";#	c #9CB1DA",
+">#	c #9CB0DA",
+",#	c #9DB1D9",
+"'#	c #9DB1DA",
+")#	c #8BA3D3",
+". + + + + + @ @ @ # $ % & * = - - ; ; > , > ' > ) ) ! ~ { { ~ ] ",
+"+ ^ ^ ^ ^ ^ ^ ^ ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"+ f f f f f f f g / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h i i i i j k k k / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h l l l m n n n o / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h p q r s s t u v / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h n w x x x x y z A ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h B C D x E F G H I ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"h J v K x L M N O I ( _ P Q R S T U V V W X Y Z `  . ...+.c d e ",
+"h @.#.$.x %.&.*.=.A ( _ -.;.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.c d e ",
+"h v ).!.x %.*.=.~.{.( _ ].^./.(.(.(.(._.:.(.(.(.(.(.(.<.[.c d e ",
+"}.|.H 1.x 2.3.4.5.{.( _ ].^.6.7.(.(.8.9.0.(.(.(.(.(.(.<.[.c d e ",
+"}.|.a.b.c.3.d.e.f.{.( _ ].^.g.h.(.(.i.j.k.(.l.m.(.(.(.<.[.c d e ",
+"n.o.p.q.q.r.s.t.u.v.( _ ].^.w.x.(.y.z.A.B.C.D.E.F.(.(.<.[.c d e ",
+"n.H G.x H.I.x J.K.v.( _ ].^.L.M.N.z.O.P.Q.R.S.T.U.l.(.<.[.c d e ",
+"n.H V.x W.X.x Y.Z.v.( _ ].^.`. +.+++(.(. at +#+(.(.l.$+(.<.[.c d e ",
+"%+a.&+x *+x =+-+;+>+( _ ].^.,+'+)+!+(.(.(.(.(.(.(.(.(.<.[.c d e ",
+"%+a.&+x ~+{+]+^+/+>+( _ ].^.(+_+:+<+<+[+[+}+_+_+|+1+2+<.[.c d e ",
+"3+a.&+x 4+5+x 6+/+>+( _ ].7+8+9+0+a+a+b+b+c+d+d+e+f+g+h+i+c d e ",
+"3+a.j+k+l+m+n+o+p+v.( _ q+r+s+s+s+s+t+u+u+u+v+s+s+s+s+w+x+c d e ",
+"3+a.c.y+z+A+B+C+D+v.( _ E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+c d e ",
+"V+W+X+Y+x x Z+C+`+v.( _ :  @. at +@@@@@#@$@%@%@&@@@@@*@=@-@;@c d e ",
+"V+o.&.>@,@'@)@!@~@{@( _ ]@^@/@(@(@(@(@(@(@(@(@(@(@(@_@:@<@c d e ",
+"V+).[@w }@|@1 at 2@D+3@( _ 4 at 5@6 at 7@7 at 7@7 at 7@7 at 7@7 at 7@7 at 7@8 at 9@+.c d e ",
+"V+0 at a@x b at c@x d at e@f@( _ : g at h@i at j@k at l@m at n@o at p@q at r@s at t@u at b c d e ",
+"v at z w at x@y at z@w A@`+f@( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"B at C@D at E@4.F at G@H at I@>+( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"B@@.o.X+~.J at K.C+D+>+( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"v at K@0 at L@M at N@O@/+D+>+( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"P at Q@R at S@T at 2@u.U at D+{@( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"P at V@W@).&.4.B+X at p+{@( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e ",
+"Y at Z@Z at Z@Z@`@P at P@P@ #.#+#@#########$#%#&#$#*#=#$#*#-#;#>#;#,#'#)#"};
diff --git a/src/Flextra/FlexpartRun.cc b/src/Flextra/FlexpartRun.cc
new file mode 100644
index 0000000..f1aca31
--- /dev/null
+++ b/src/Flextra/FlexpartRun.cc
@@ -0,0 +1,1311 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "Metview.h"
+
+#include "MvDate.h"
+#include "Tokenizer.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+
+using namespace std;
+
+#define FLEXPART_CHK(str) if(!(str)) return false
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class FlexpartRun: public Base {	
+public:
+	FlexpartRun() : Base("FLEXPART_RUN") {initIds();}
+	void serve(MvRequest&,MvRequest&);
+
+  protected:	
+	void initIds();
+	bool getMvDate(const string& dd,const string& tt,MvDate&);
+	bool getDate(const string& dd,string& res, const string&);
+	bool getTime(const string& dd,string& res, const string&);
+	bool getTimeLen(const string& tt,string& res, const string&,bool);
+	bool getParamValueId(string&,MvRequest&,string,const map<string,string>&);
+	bool getParamValue(string&,MvRequest&,string,bool);
+	bool getParamValue(vector<string>&,MvRequest&,string);
+	bool generateTmpPath(string&);
+	bool generatePathnamesFile(const string&,MvRequest&,const string&,const string&);
+	bool generateCommandFile(const string&,MvRequest&);
+	bool generateOutGridFile(const string&,MvRequest& in);
+	
+	bool generateStartPointsFile(const string&,MvRequest&);
+	bool generateStartCetFile(const string&,MvRequest&);
+	bool generateStartFlightFile(const string& fStart,MvRequest& in);
+	bool getDateRange(MvDate& rangeStart,MvDate& rangeEnd,MvRequest& in);
+	bool getPredefInputPath(const string&,const MvDate&,const MvDate&,string &);
+	
+	map<string,string> outputIds_;
+	map<string,string> particleDumpIds_;
+	map<string,string> onOffIds_;
+	map<string,string> sourceUnitsIds_;
+	map<string,string> receptorUnitsIds_;
+	map<string,string> writeInitIds_;
+	
+	
+	map<string,string> directionIds_;
+	map<string,string> modeIds_;
+	map<string,string> intervalIds_;
+	map<string,string> cetTypeIds_;
+	map<string,string> cetLevelUnitsIds_;
+	map<string,string> flightTypeIds_;
+	map<string,string> flightLevelUnitsIds_;
+};
+
+void FlexpartRun::initIds()
+{
+	directionIds_["FORWARD"]="1";
+        directionIds_["BACKWARD"]="-1";
+                
+        outputIds_["CONCENTRATION"]="1"; 
+        outputIds_["MIXING RATIO"]="2";
+	outputIds_["BOTH"]="3";
+	outputIds_["PLUME"]="4";
+	outputIds_["CONCENTRATION AND PLUME"]="5";
+	
+	particleDumpIds_["NO"]="0"; 
+        particleDumpIds_["AT OUTPUT"]="1";
+	particleDumpIds_["AT END"]="2";
+	
+	onOffIds_["ON"]="1"; 
+	onOffIds_["OFF"]="0";
+	
+	sourceUnitsIds_["MASS"]=1;
+	sourceUnitsIds_["MASS MIXING RATIO"]=2;
+	
+	receptorUnitsIds_["MASS"]=1;
+	receptorUnitsIds_["MASS MIXING RATIO"]=2;
+	
+	writeInitIds_["NO"]=1;
+	writeInitIds_["MASS"]=1;
+	writeInitIds_["MASS MIXING RATIO"]=2;
+	
+	
+	
+	
+	
+	
+	modeIds_["NORMAL"]="1"; 
+        modeIds_["CET"]="2";
+	modeIds_["FLIGHT"]="3";
+	
+	intervalIds_["ORIGINAL"]="0";
+        intervalIds_["INTERVAL"]="1";
+	intervalIds_["BOTH"]="2";	
+	
+	cetTypeIds_["3D"]="1"; 
+        cetTypeIds_["MODEL LEVEL"]="2";
+	cetTypeIds_["ISOBARIC"]="4";
+	cetTypeIds_["ISENTROPIC"]="5";
+		
+	cetLevelUnitsIds_["METRES ASL"]="1"; 
+        cetLevelUnitsIds_["METRES AGL"]="2";
+	cetLevelUnitsIds_["HPA"]="3";
+	
+	flightTypeIds_["3D"]="1"; 
+        flightTypeIds_["MODEL LEVEL"]="2";
+	flightTypeIds_["ISOBARIC"]="4";
+	flightTypeIds_["ISENTROPIC"]="5";
+	
+	flightLevelUnitsIds_["METRES ASL"]="1"; 
+        flightLevelUnitsIds_["METRES AGL"]="2";
+	flightLevelUnitsIds_["HPA"]="3";
+}	
+
+bool FlexpartRun::getMvDate(const string& dd,const string& tt,MvDate& res)
+{
+	if(dd.size() != 8 || tt.size() != 6)
+	  	return false;
+  
+  	string sDate=dd.substr(0,4) + "-" + dd.substr(4,2) + "-" + dd.substr(6,2);
+	string sTime=tt.substr(0,2) + ":" + tt.substr(2,2) + ":" + dd.substr(4,2);
+
+	string s=sDate + " " + sTime;
+
+	res=MvDate(s.c_str());  
+
+	return true;
+}  
+
+
+bool FlexpartRun::getDate(const string& dd,string& res,const string& parName)
+{ 
+  	res=dd;
+	
+	if(dd.size() < 8)
+	{
+		istringstream iss(dd);
+ 		double d;
+		iss >> d; 
+		char buf[9];
+		MvDate md(julian_to_date(today() + d,1));
+		md.Format("yyyymmdd", buf);
+		res=string(buf);
+	}
+	
+	bool retVal=(res.size() == 8)?true:false;
+	
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid date format used for paramater: %s",parName.c_str());
+		setError(13);
+	}	
+		
+	return retVal;
+}  
+
+bool FlexpartRun::getTime(const string& tt,string& res,const string& parName)
+{ 
+  	string hh, mm="00", ss="00";
+	bool retVal=true;
+	
+	vector<string> tok;
+	Tokenizer parse(":");
+	parse(tt,tok);
+		
+	if(tok.size() > 0)
+	{	
+		if(tok[0].size() == 1)	
+	  		hh = "0" + tok[0];
+		else
+		  	hh=tok[0];
+		
+		if(hh.size() !=  2)
+			retVal=false;
+	}
+	if(tok.size() > 1)
+	{	
+		mm = tok[1];
+		if(mm.size() !=  2)
+			retVal=false;
+	}
+
+	if(tok.size() > 2)
+	{	
+		ss = tok[2];
+		if(ss.size() !=  2)
+			retVal=false;
+	}	
+	
+	res=hh + mm + ss;
+	
+	retVal=(res.size() == 6)?true:false;
+
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid time format used for paramater: %s",parName.c_str());
+		setError(13);
+	}	
+		
+	return retVal;
+}  
+
+
+bool FlexpartRun::getTimeLen(const string& tt,string& res,const string& parName,bool inSeconds)
+{ 
+  	string hh, mm="00", ss="00";
+	bool retVal=true;
+	
+	vector<string> tok;
+	Tokenizer parse(":");
+	parse(tt,tok);
+	
+	if(tok.size() > 0)
+	{	
+		if(tok[0].size() == 1)
+			hh = "00" + tok[0];
+		else if(tok[0].size() == 2)	
+	  		hh = "0" + tok[0];
+		else
+		  	hh=tok[0];
+		
+		if(hh.size() !=  3)
+			retVal=false;
+	}
+	if(tok.size() > 1)
+	{	
+		mm = tok[1];
+		if(mm.size() !=  2)
+			retVal=false;
+	}
+
+	if(tok.size() > 2)
+	{	
+		ss = tok[2];
+		if(ss.size() !=  2)
+			retVal=false;
+	}	
+	
+	if(inSeconds)
+	{
+	  	int sec,i;
+		istringstream ish(hh);
+		ish >> i;
+		sec=i*3600;
+		istringstream ism(mm);
+		ism >> i;
+		sec+=i*60;
+		istringstream iss(ss);
+		iss >> i;
+		sec+=i;
+		
+		stringstream sst;
+		sst << sec;	
+		res=sst.str();
+		retVal=true;		
+	}	
+	else
+	{  	
+		res=hh + mm + ss;
+		retVal=(res.size() == 7)?true:false;
+	}
+
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid time lenght format used for paramater: %s",parName.c_str());
+		setError(13);
+	}	
+
+	return retVal;
+}  
+
+bool FlexpartRun::getParamValueId(string& value,MvRequest& in,string parName,const map<string,string>& idMap)
+{	
+	value.clear();
+	
+	const char *cval=in(parName.c_str());
+	
+	if(cval)
+  	{
+		value=string(cval);		
+		
+		if(idMap.empty() == false)
+		{
+		  	map<string,string>::const_iterator it=idMap.find(value); 
+		  	if(it != idMap.end())
+				value=it->second;
+			else
+			  	value.clear();
+		}	
+		
+	}
+	
+	if(value.empty())
+	{
+		marslog(LOG_EROR,"No value found for paramater: %s",parName.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;	
+}
+
+
+bool FlexpartRun::getParamValue(string& value,MvRequest& in,string parName,bool canBeMissing=false)
+{
+	value.clear();
+	
+	const char *cval=in(parName.c_str());
+	
+	if(cval)
+  	{
+		value=string(cval);		
+	}
+	
+	if(!canBeMissing && value.empty())
+	{
+		marslog(LOG_EROR,"No value found for paramater: %s",parName.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;	
+}
+
+bool FlexpartRun::getParamValue(vector<string>& value,MvRequest& in,string parName)
+{
+	value.clear();
+	
+	int cnt = in.countValues(parName.c_str());
+	
+	if(cnt == 1)
+	{
+	  	const char *cval=in(parName.c_str());
+		if(cval)
+  		{		
+			value.push_back(string(cval)); 
+		}
+	}
+	else
+	{  
+		string val;
+		for( int i=0; i<cnt; i++)
+	     	{
+	      		const char *cval = in(parName.c_str(),i );
+			if(cval)
+			{					
+				value.push_back(string(cval));
+			}						
+		}
+	}
+	
+	return true;
+}
+
+bool FlexpartRun::generateTmpPath(string& tmpPath)
+{
+ 	string tmpRoot;
+	
+	char *mvtmp=getenv("METVIEW_TMPDIR");
+	if (mvtmp == 0)  
+	{	
+		marslog(LOG_EROR,"No env variable METVIEW_TMPDIR is not defined!");
+		setError(13);
+		return false;
+	}
+	else
+	{
+		tmpRoot=string(mvtmp);
+	}
+
+	time_t sec=time(NULL);
+  	srand (sec);
+  	int rNum = rand() % 1000 + 1;
+
+ 	std::stringstream out;
+  	out << tmpRoot << "/flexpart_" << sec << "_" << rNum; 
+	tmpPath=out.str();
+	
+	if(mkdir(tmpPath.c_str(),0777) != 0)
+	{
+		marslog(LOG_EROR,"Could not genarate work directory for FLEXPART run: %s",tmpPath.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;
+}  
+
+
+bool FlexpartRun::generatePathnamesFile(const string& fPathnames,MvRequest& in,const string& optionsPath,const string& outPath)
+{
+	string inPath,fAvailable;
+		
+	const char *input_mode=in("FLEXPART_INPUT_MODE");	
+	if(!input_mode)
+	{
+	  	marslog(LOG_EROR,"No parameter FLEXPART_INPUT_MODE is defined!");
+		setError(13);	
+		return false;
+	}
+	  
+	if(strcmp(input_mode,"ICON") == 0)
+	{
+		MvRequest dataR=in("FLEXPART_INPUT_DATA");
+		const char* iconType=dataR.getVerb();
+		//If no icon is specified
+		if(!iconType || strcmp(iconType,"FLEXPART_INPUT") != 0)
+		{
+			marslog(LOG_EROR,"No FLEXPART_INPUT icon is specified!");
+			setError(13);
+			return false;
+		}
+
+		FLEXPART_CHK(getParamValue(inPath,dataR,"INPUT_DATA_PATH"));
+		FLEXPART_CHK(getParamValue(fAvailable,dataR,"AVAILABLE_FILE_PATH"));
+	}	
+	else if(strcmp(input_mode,"PATH") == 0) 
+	{
+	  	FLEXPART_CHK(getParamValue(inPath,in,"FLEXPART_INPUT_PATH"));
+		FLEXPART_CHK(getParamValue(fAvailable,in,"FLEXPART_AVAILABLE_FILE_PATH"));
+
+		if(fAvailable == "SAME_AS_INPUT_PATH")
+		{
+			fAvailable = inPath + "/AVAILABLE";
+		}	
+	}
+	else if(strcmp(input_mode,"EC_EUROPE") == 0 || strcmp(input_mode,"EC_GLOBAL") == 0)
+	{
+		string envVar=(strcmp(input_mode,"EC_EUROPE") == 0)?"MV_FLEXPART_INPUT_EUROPE":"MV_FLEXPART_INPUT_GLOBAL";
+		  
+	  	char *predefPath=getenv(envVar.c_str());
+		if(predefPath == 0)  
+		{	
+			marslog(LOG_EROR,"No %s env variable is defined! Cannot find data for input mode \"%s\"!",envVar.c_str(),input_mode);
+			setError(13);
+			return false;			
+		}
+		
+		string rootPath(predefPath);
+	  	MvDate startDate,endDate;
+		if(!getDateRange(startDate,endDate,in))
+		{  	
+		  	marslog(LOG_EROR,"No data is found for input mode \"%s\"!",input_mode);
+			setError(13);
+			return false;
+		}
+		if(!getPredefInputPath(rootPath,startDate,endDate,inPath))
+		{
+		  	marslog(LOG_EROR,"No data is found for input mode \"%s\"!",input_mode);
+			setError(13);
+			return false;
+		}	
+		fAvailable = inPath + "/AVAILABLE";
+		marslog(LOG_INFO,"Input data path set to: %s",inPath.c_str());
+		
+	}
+	else
+	{
+		marslog(LOG_EROR,"Invalid value for parameter FLEXPART_INPUT_MODE: %s",input_mode);
+		setError(13);
+		return false;
+	}
+	
+	//Pathnames file	
+	ofstream out(fPathnames.c_str());	
+	out << optionsPath << "/" << endl;
+	out << outPath << "/" << endl;
+	out << inPath << "/" << endl;
+	out << fAvailable << endl;
+	out << "================================================" << endl;
+	out << " ";
+	out.close();
+	
+	return true;
+}
+	
+bool FlexpartRun::generateCommandFile(const string& fCmd,MvRequest& in)
+{
+	ofstream out(fCmd.c_str());	
+	
+	string str,str2,trMode;
+		
+	//Find outrun mode. It is needed for the starting dates
+	FLEXPART_CHK(getParamValueId(trMode,in,"FLEXPART_RUN_MODE",modeIds_));
+	
+out << "****************************************************************\n\
+					     \n\
+  Input file for the Lagrangian particle dispersion  model FLEXPART\n\
+                       Please specify your options \n\
+ 					     \n\
+*******************************************************************\n\n";
+
+	//FLEXPART_CHK(getParamValue(str,in,"FLEXPART_RUN_LABEL"));
+	//out << str << endl;
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_SIMULATION_DIRECTION",directionIds_));
+	out << str << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_STARTING_DATE"));
+	FLEXPART_CHK(getDate(str,str2,"FLEXPART_STARTING_DATE"));	
+	out << str2 << " ";
+		
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_STARTING_TIME"));
+	FLEXPART_CHK(getTime(str,str2,"FLEXPART_STARTING_TIME"));
+	out << str2 << endl;
+		
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_ENDING_DATE"));
+	FLEXPART_CHK(getDate(str,str2,"FLEXPART_ENDING_DATE"));	
+	out << str2 << " ";
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_ENDING_TIME"));
+	FLEXPART_CHK(getTime(str,str2,"FLEXPART_ENDING_TIME"));
+	out << str2 << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_OUTPUT_INTERVAL"));
+	FLEXPART_CHK(getTimeLen(str,str2,"FLEXPART_OUTPUT_INTERVAL",true));
+	out << str2 << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_OUTPUT_AVERAGING_INTERVAL"));
+	FLEXPART_CHK(getTimeLen(str,str2,"FLEXPART_OUTPUT_AVERAGING_INTERVAL",true));
+	out << str2 << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_OUTPUT_SAMPLING_INTERVAL"));
+	FLEXPART_CHK(getTimeLen(str,str2,"FLEXPART_OUTPUT_SAMPLING_INTERVAL",true));
+	out << str2 << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_PARTICLE_SPLITTING_INTERVAL"));
+	FLEXPART_CHK(getTimeLen(str,str2,"FLEXPART_PARTICLE_SPLITTING_INTERVAL",true));
+	out << str2 << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_SYNC_INTERVAL"));
+	FLEXPART_CHK(getTimeLen(str,str2,"FLEXPART_SYNC_INTERVAL",true));
+	out << str2 << endl;
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_CTL"));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_VERT_REDUCTION"));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_OUTPUT_FORM",outputIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_DUMP_PARTICLE_POSITIONS",particleDumpIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_SUBGRID_TERRAIN",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_CONVECTION",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_AGE_SPECTRA",onOffIds_));
+	out << str << " ";
+		
+	//Cont simulation with dumped particle data
+	out << "0" << " ";
+		
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_OUTPUT_FOR_EACH_RELEASE",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_COMPUTE_FLUXES",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_DOMAIN_FILL",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_SOURCE_UNIT",sourceUnitsIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_RECEPTOR_UNITS",receptorUnitsIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_TRACK_PARTICLES",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_NESTED_OUTPUT",onOffIds_));
+	out << str << " ";
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_WRITE_INITIAL_CONDITIONS",writeInitIds_));
+	out << str << " ";
+	
+	
+	
+	FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_OUTPUT_INTERVAL_MODE",intervalIds_));
+	out << str << " ";
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_OUTPUT_INTERVAL_VALUE"));
+	
+	if(str.find("0") != string::npos &&  str.find_first_not_of("0") == string::npos)
+	{
+		marslog(LOG_EROR,"Invalid value specified for FLEXPART_OUTPUT_INTERVAL_VALUE: %s",str.c_str());		
+		marslog(LOG_EROR,"It has to be greater than 0!");
+		setError(13);
+		return false;	
+	}  
+	
+	FLEXPART_CHK(getTimeLen(str,str2,"FLEXPART_OUTPUT_INTERVAL_VALUE",true));
+	out << str2 << endl;
+	
+	//It might be disabled in the inteface (for CET and FLIGHT modes) 
+	getParamValue(str,in,"FLEXPART_UNCERTAINTY_TRAJECTORIES",true);
+	if(str == "ON")
+	{	
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_UNCERTAINTY_TRAJECTORY_NUMBER"));
+		out << str << " ";
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_UNCERTAINTY_TRAJECTORY_DISTANCE"));
+		out << str << " ";	
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_UNCERTAINTY_TRAJECTORY_TIME_CONSTANT"));
+		out << str << " ";
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_U_RANDOM_ERROR"));
+		out << str << " ";
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_V_RANDOM_ERROR"));
+		out << str << " ";
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_W_RANDOM_ERROR"));
+		out << str << endl;
+	}
+	else
+	{
+	   out << "0 0.5 2.0 0.08 0.08 0.08" << endl;
+	  
+	}  
+	
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_INTERPOLATION_TYPE"));
+	out << str << endl;	
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_CFL_SPATIAL"));
+	out << str << endl;	
+	
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_CFL_TEMPORAL"));
+	out << str << endl;
+	
+	//FLEXPART_CHK(getParamValueId(str,in,"FLEXPART_RUN_MODE",modeIds_));
+	out << trMode << endl;
+	
+	out.close();
+	
+	return true;
+}	
+	
+bool FlexpartRun::generateStartPointsFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+	string str;
+	
+
+out << "**********************************************************************\n\
+*                                                                    *\n\
+*                 TRAJECTORY MODEL                                   *\n\
+*                 DEFINITION OF STARTING/ENDING POINTS               *\n\
+*                                                                    *\n\
+*  The first 7 characters of the comment are also used as filenames. *\n\
+*  Therefore, they cannot be blank and they must be different for    *\n\
+*  each starting point.                                              *\n\
+*                                                                    *\n\
+*  Kind of trajectory: 1 = 3 dimensional                             *\n\
+*                      2 = on model layers                           *\n\
+*                      3 = mixing layer                              *\n\
+*                      4 = isobaric                                  *\n\
+*                      5 = isentropic                                *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+*                                                                    *\n\
+*  Unit of z coordinate: 1 = Meters above sea level                  *\n\
+*                        2 = Meters above ground                     *\n\
+*                        3 = Hectopascal                             *\n\
+*                                                                    *\n\
+*  For mixing layer trajectories (kind 3), the z coordinate must be  *\n\
+*  given in m.a.g.l. (option 2)                                      *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
+
+	getParamValue(str,in,"FLEXPART_RUN_MODE");
+
+	vector<string> type,name,lat,lon,lev,levUnit;
+	
+	FLEXPART_CHK(getParamValue(type,in,"FLEXPART_NORMAL_TYPES"));
+	FLEXPART_CHK(getParamValue(name,in,"FLEXPART_NORMAL_NAMES"));
+	FLEXPART_CHK(getParamValue(lat,in,"FLEXPART_NORMAL_LATITUDES"));
+	FLEXPART_CHK(getParamValue(lon,in,"FLEXPART_NORMAL_LONGITUDES"));
+	FLEXPART_CHK(getParamValue(lev,in,"FLEXPART_NORMAL_LEVELS"));
+	FLEXPART_CHK(getParamValue(levUnit,in,"FLEXPART_NORMAL_LEVEL_UNITS"));
+	
+	unsigned int cnt=type.size();	
+	if(cnt ==0)
+	{
+		marslog(LOG_EROR,"No values specified for parameter FLEXPART_NORMAL_TYPES!");
+	 	setError(13);
+		return false; 
+	}
+	
+	string errTxt="Incosistent number of items specified for parameter: FLEXPART_NORMAL_";
+	if(name.size() != cnt)
+		errTxt+="NAMES!";
+	else if(lat.size() != cnt)
+		errTxt+="LATITUDES!";	
+	else if(lon.size() != cnt)
+		errTxt+="LONGITUDES!";
+	else if(lev.size() != cnt)
+		errTxt+="LEVELS!";  
+	else if(levUnit.size() != cnt)
+		errTxt+="LEVEL_UNITS!"; 
+	
+	if(errTxt.find("!") != string::npos) 
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false; 
+	}
+	
+	for(unsigned int i=0; i < cnt; i++)
+	{	  
+		out << lon[i] << endl;
+		out << lat[i] << endl;
+		out << type[i] << endl;
+		out << levUnit[i] << endl;
+		out << lev[i] << endl;
+		out << name[i] << endl;
+		out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+	}
+
+	out.close();
+	
+	return true;
+}	
+
+
+bool FlexpartRun::generateOutGridFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+out << "****************************************************************\n\
+					     \n\
+  Input file for the Lagrangian particle dispersion  model FLEXPART\n\
+                       Please specify your output grid \n\
+ 					     \n\
+*******************************************************************\n\n";
+
+
+	string type,name,levUnit,dx,dy,dz,levTop,levBottom;
+	FLEXPART_CHK(getParamValueId(type,in,"FLEXPART_CET_TYPE",cetTypeIds_));
+	FLEXPART_CHK(getParamValue(name,in,"FLEXPART_GRID_LON_MIN"));
+	FLEXPART_CHK(getParamValueId(levUnit,in,"FLEXPART_CET_LEVEL_UNITS",cetLevelUnitsIds_));
+	FLEXPART_CHK(getParamValue(dx,in,"FLEXPART_CET_DX"));
+	FLEXPART_CHK(getParamValue(dy,in,"FLEXPART_CET_DY"));
+	FLEXPART_CHK(getParamValue(dz,in,"FLEXPART_CET_DZ"));
+	FLEXPART_CHK(getParamValue(levTop,in,"FLEXPART_CET_TOP_LEVEL"));
+	FLEXPART_CHK(getParamValue(levBottom,in,"FLEXPART_CET_BOTTOM_LEVEL"));
+	
+	int cnt = in.countValues("FLEXPART_CET_AREA");
+	if(cnt != 4)
+	{
+	  	marslog(LOG_EROR,"No paramater FLEXPART_CET_AREA is specified!");
+		setError(13);
+		return false;	
+	}  
+	  
+	double dval; 
+	vector<double> areaL;
+	for(int i=0; i< cnt; i++)
+	{
+		in.getValue(dval,"FLEXPART_CET_AREA",i);
+	 	areaL.push_back(dval);
+	}	
+	out << areaL[1] << endl;
+	out << areaL[0] << endl;
+	out << areaL[3] << endl;
+	out << areaL[2] << endl;
+	out << dx << endl;
+	out << dy << endl;
+	out << type << endl;
+	out << levUnit << endl;
+	out << levBottom << endl;
+	out << levTop << endl;
+	out << dz << endl;
+	out << name << endl;
+	out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+	
+	out.close();
+	
+	return true;
+}	
+
+
+
+
+bool FlexpartRun::generateStartCetFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+	string str;
+	
+
+	
+out << "**********************************************************************\n\
+*                                                                    *\n\
+*                 TRAJECTORY MODEL                                   *\n\
+*                 DEFINITION OF THE CET DOMAIN                       *\n\
+*  A CET STARTING DOMAIN IS DEFINED BY THE LOWER LEFT AND UPPER RIGHT*\n\
+*  CORNER IN A LATITUDE/LONGITUDE COORDINATE SYSTEM, AND BY A LOWER  *\n\
+*  AND UPPER LEVEL. TRAJECTORIES ARE STARTED AT DISTANCES DX, DY AND *\n\
+*  DZ WITHIN THIS DOMAIN.                                            *\n\
+*                                                                    *\n\
+*  Kind of trajectory: 1 = 3 dimensional                             *\n\
+*                      2 = on model layers                           *\n\
+*                      3 = not allowed in CET mode                   *\n\
+*                      4 = isobaric                                  *\n\
+*                      5 = isentropic                                *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+*                                                                    *\n\
+*  Unit of z coordinate: 1 = Meters above sea level                  *\n\
+*                        2 = Meters above ground                     *\n\
+*                        3 = Hectopascal                             *\n\
+*                                                                    *\n\
+*  The vertical distance DZ between the trajectories must be         *\n\
+*  given in the same units.                                          *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
+
+	string type,name,levUnit,dx,dy,dz,levTop,levBottom;
+	FLEXPART_CHK(getParamValueId(type,in,"FLEXPART_CET_TYPE",cetTypeIds_));
+	FLEXPART_CHK(getParamValue(name,in,"FLEXPART_CET_NAME"));
+	FLEXPART_CHK(getParamValueId(levUnit,in,"FLEXPART_CET_LEVEL_UNITS",cetLevelUnitsIds_));
+	FLEXPART_CHK(getParamValue(dx,in,"FLEXPART_CET_DX"));
+	FLEXPART_CHK(getParamValue(dy,in,"FLEXPART_CET_DY"));
+	FLEXPART_CHK(getParamValue(dz,in,"FLEXPART_CET_DZ"));
+	FLEXPART_CHK(getParamValue(levTop,in,"FLEXPART_CET_TOP_LEVEL"));
+	FLEXPART_CHK(getParamValue(levBottom,in,"FLEXPART_CET_BOTTOM_LEVEL"));
+	
+	int cnt = in.countValues("FLEXPART_CET_AREA");
+	if(cnt != 4)
+	{
+	  	marslog(LOG_EROR,"No paramater FLEXPART_CET_AREA is specified!");
+		setError(13);
+		return false;	
+	}  
+	  
+	double dval; 
+	vector<double> areaL;
+	for(int i=0; i< cnt; i++)
+	{
+		in.getValue(dval,"FLEXPART_CET_AREA",i);
+	 	areaL.push_back(dval);
+	}	
+	out << areaL[1] << endl;
+	out << areaL[0] << endl;
+	out << areaL[3] << endl;
+	out << areaL[2] << endl;
+	out << dx << endl;
+	out << dy << endl;
+	out << type << endl;
+	out << levUnit << endl;
+	out << levBottom << endl;
+	out << levTop << endl;
+	out << dz << endl;
+	out << name << endl;
+	out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+	
+	out.close();
+	
+	return true;
+}	
+
+bool FlexpartRun::generateStartFlightFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+	string str;
+	
+
+out << "**********************************************************************\n\
+*              TRAJECTORY MODEL                                      *\n\
+*              DEFINITION OF STARTING/ENDING POINTS IN FLIGHT MODE   *\n\
+*  This file defines starting points separated non-uniformly in      *\n\
+*  space as well as in time. Thus, both starting times AND starting  *\n\
+*  coordinates must be given.                                        *\n\
+*  The starting times must be strictly in temporal order.            *\n\
+*  For backward trajectories, the temporal order must be reversed.   *\n\
+*  In line #28 of this file, the name of the output file must be     *\n\
+*  indicated. Lines #29 and #30 must contain kind of trajectory and  *\n\
+*  the unit of the z coordinate to be used. Line #31 is arbitrary,   *\n\
+*  then follows a sequence of points.                                *\n\
+*  Kind of trajectory: 1 = 3 dimensional                             *\n\
+*                      2 = on model layers                           *\n\
+*                      3 = mixing layer                              *\n\
+*                      4 = isobaric                                  *\n\
+*                      5 = isentropic                                *\n\
+**********************************************************************\n\
+*                                                                    *\n\
+*  Unit of z coordinate: 1 = Meters above sea level                  *\n\
+*                        2 = Meters above ground                     *\n\
+*                        3 = Hectopascal                             *\n\
+*                                                                    *\n\
+*  For mixing layer trajectories (kind 3), the z coordinate must be  *\n\
+*  given in m.a.g.l. (option 2)                                      *\n\
+*                                                                    *\n\
+**********************************************************************\n";
+
+	string type,name,levUnit;
+	FLEXPART_CHK(getParamValueId(type,in,"FLEXPART_FLIGHT_TYPE",flightTypeIds_));
+	FLEXPART_CHK(getParamValue(name,in,"FLEXPART_FLIGHT_NAME"));
+	FLEXPART_CHK(getParamValueId(levUnit,in,"FLEXPART_FLIGHT_LEVEL_UNITS",flightLevelUnitsIds_));
+
+
+	vector<string> lat,lon,lev,startDate,startTime;	
+	FLEXPART_CHK(getParamValue(lat,in,"FLEXPART_FLIGHT_LATITUDES"));
+	FLEXPART_CHK(getParamValue(lon,in,"FLEXPART_FLIGHT_LONGITUDES"));
+	FLEXPART_CHK(getParamValue(lev,in,"FLEXPART_FLIGHT_LEVELS"));
+	FLEXPART_CHK(getParamValue(startDate,in,"FLEXPART_FLIGHT_STARTING_DATES"));
+	FLEXPART_CHK(getParamValue(startTime,in,"FLEXPART_FLIGHT_STARTING_TIMES"));
+	
+	unsigned int cnt=lat.size();	
+	if(cnt ==0)
+	{
+		marslog(LOG_EROR,"No values specified for parameter FLEXPART_FLIGHT_LATITUDES!");
+	 	setError(13);
+		return false; 
+	}
+	
+	string errTxt="Incosistent number of items specified for parameter: FLEXPART_FLIGHT_";
+	if(lon.size() != cnt)
+		errTxt+="LONGITUDES!";
+	else if(lev.size() != cnt)
+		errTxt+="LEVELS!";  
+	else if(startDate.size() != cnt)
+		errTxt+="STARTING_DATES!";	
+	else if(startTime.size() != cnt)
+		errTxt+="STARTING_TIMES!";
+	
+	if(errTxt.find("!") != string::npos) 
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false; 
+	}
+		
+	out << name << endl;
+	out << type << endl;
+	out << levUnit << endl;	
+	out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+	for(unsigned int i=0; i < cnt; i++)
+	{	  
+		string tStr, dStr;
+	  	FLEXPART_CHK(getDate(startDate[i],dStr,"FLEXPART_FLIGHT_STARTING_DATES"));
+		FLEXPART_CHK(getTime(startTime[i],tStr,"FLEXPART_FLIGHT_STARTING_TIMES"));
+		
+		out << dStr << " " << tStr << endl;		
+		out << lon[i] << endl;
+		out << lat[i] << endl;
+		out << lev[i] << endl;
+		out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+	}
+
+	out.close();
+	
+	return true;
+}
+
+
+//---------------------------------------------------
+// Find out the time range the trajectories cover
+//---------------------------------------------------
+
+bool FlexpartRun::getDateRange(MvDate& rangeStart,MvDate& rangeEnd,MvRequest& in)
+{
+	string str,dStr,tStr,trMode;
+	int lenSec;
+	MvDate startDate1,startDate2;
+	
+	//Find outrun mode. It is needed for the starting dates
+	FLEXPART_CHK(getParamValueId(trMode,in,"FLEXPART_RUN_MODE",modeIds_));
+		
+	FLEXPART_CHK(getParamValue(str,in,"FLEXPART_TRAJECTORY_LENGTH"));
+	FLEXPART_CHK(getTimeLen(str,tStr,"FLEXPART_TRAJECTORY_LENGTH",true));
+	istringstream iss(tStr);
+	iss >> lenSec;
+	
+
+	if(trMode != "3")
+	{
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_FIRST_STARTING_DATE"));
+		FLEXPART_CHK(getDate(str,dStr,"FLEXPART_FIRST_STARTING_DATE"));	
+				
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_FIRST_STARTING_TIME"));
+		FLEXPART_CHK(getTime(str,tStr,"FLEXPART_FIRST_STARTING_TIME"));
+		
+		if(!getMvDate(dStr,tStr,startDate1))
+			return false;  
+						
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_LAST_STARTING_DATE"));
+		FLEXPART_CHK(getDate(str,dStr,"FLEXPART_LAST_STARTING_DATE"));	
+			
+		FLEXPART_CHK(getParamValue(str,in,"FLEXPART_LAST_STARTING_TIME"));
+		FLEXPART_CHK(getTime(str,tStr,"FLEXPART_LAST_STARTING_TIME"));
+		
+		if(!getMvDate(dStr,tStr,startDate2))
+			return false;  
+				
+	}
+
+	//In FLIGHT mode the starting date,time and interval are disabled in the 
+	//user interface beause FLEXTRA does not use them for the trajectory 
+	//computations. However FLEXTRA does need a proper date here, otherwise it crashes.
+	//So we use the first date and time from the FLIGHT starting points here.
+	else
+	{
+	  	vector<string> startDate,startTime;		
+		FLEXPART_CHK(getParamValue(startDate,in,"FLEXPART_FLIGHT_STARTING_DATES"));
+		FLEXPART_CHK(getParamValue(startTime,in,"FLEXPART_FLIGHT_STARTING_TIMES"));
+		int cnt=startDate.size();
+		
+		if(cnt > 0 && static_cast<int>(startTime.size()) == cnt)
+		{
+			FLEXPART_CHK(getDate(startDate[0],dStr,"FLEXPART_FLIGHT_STARTING_DATES"));
+			FLEXPART_CHK(getTime(startTime[0],tStr,"FLEXPART_FLIGHT_STARTING_TIMES"));
+		  	
+			if(!getMvDate(dStr,tStr,startDate1))
+				return false;  			
+			
+			FLEXPART_CHK(getDate(startDate[cnt-1],dStr,"FLEXPART_FLIGHT_STARTING_DATES"));
+			FLEXPART_CHK(getTime(startTime[cnt-1],tStr,"FLEXPART_FLIGHT_STARTING_TIMES"));
+		  	
+			if(!getMvDate(dStr,tStr,startDate2))
+				return false;  
+		}	
+	}
+	
+	
+	rangeStart=startDate1;
+	rangeEnd=startDate2 + static_cast<double>(lenSec)/86400.;
+	
+	return true;
+}
+
+bool FlexpartRun::getPredefInputPath(const string& rootPath,const MvDate& startDate,const MvDate& /*endDate*/,string &resDir)
+{
+	//Scan rootpath for FLEXTRA input directories   
+	DIR *dp;
+    	struct dirent *dirp;
+    	if((dp  = opendir(rootPath.c_str())) == NULL) 
+    	{
+        	marslog(LOG_EROR,"Failed to open directory: %s",rootPath.c_str());
+        	return false;
+    	}
+
+	vector<MvDate> dateVec;
+	vector<string> pathVec;
+
+    	string::size_type pos;
+    	while ((dirp = readdir(dp)) != NULL) 
+    	{
+		string name(dirp->d_name);
+		if(name.size() == 13 && (pos=name.find("_")) != string::npos )
+		{  
+		  	string s;
+			string sDate=name.substr(0,8);
+			string sTime=name.substr(9,4);
+		
+			s=sDate;
+			sDate=s.substr(0,4) + "-" + s.substr(4,2) + "-" + s.substr(6,2);
+			
+			s=sTime;
+			sTime=s.substr(0,2) + ":" + s.substr(2,4) + ":00";
+			
+			s=sDate + " " + sTime;
+
+			MvDate cDate(s.c_str());
+			
+			if(cDate <= startDate)
+			{
+			  	dateVec.push_back(cDate);
+				pathVec.push_back(name);
+			}	
+		}	
+	} 	
+
+   	closedir(dp);
+   
+	if(pathVec.size() > 0)
+	{
+	  	resDir=rootPath + "/" + pathVec.back();
+		return true;
+	}	
+	
+	return false;
+}  
+	
+
+void FlexpartRun::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------FlexpartRun::serve()--------------" << endl;
+  	in.print();
+
+	//Find out flexpart script path
+	string flexpartScript;
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate script mv_flexpart_run!");
+		setError(13);
+		return;
+	}
+	else
+	{
+		flexpartScript=string(mvbin) +"/mv_flexpart_run";
+	}
+	
+
+	//Create  tmp dir for the flexpart run
+	string tmpPath;
+	if(!generateTmpPath(tmpPath))
+	{
+		return;
+	}
+	
+	//Genarate pathnames  file
+	string fPathnames=tmpPath + "/pathnames";
+	string optionsPath=tmpPath;
+	string outPath=tmpPath;
+	if(!generatePathnamesFile(fPathnames,in,optionsPath,outPath))
+	{
+	  	return;
+	}	
+	
+	//Generate COMMAND file
+	string fCmd=tmpPath + "/COMMAND";
+	if(!generateCommandFile(fCmd,in))
+	{
+	  	return;
+	}
+	
+	//Get FLEXTRA RUN MODE
+	string trMode;
+	getParamValueId(trMode,in,"FLEXPART_RUN_MODE",modeIds_);	
+	
+	if(trMode  == "1")
+	{
+	  	string fStart=tmpPath + "/STARTPOINTS";
+		if(!generateStartPointsFile(fStart,in))
+		{
+		  	return;
+		}	
+	}
+	else if(trMode  == "2")
+	{
+	  	string fStart=tmpPath + "/STARTCET";
+		if(!generateStartCetFile(fStart,in))
+		{
+		  	return;
+		}	
+	}
+	else if(trMode  == "3")
+	{
+	  	string fStart=tmpPath + "/STARTFLIGHT";
+		if(!generateStartFlightFile(fStart,in))
+		{
+		  	return;
+		}	
+	}
+
+	//-----------------------
+	// Run FLEXTRA
+	//-----------------------
+	
+	//Find out the directory where the Flexpart Run icon is located
+	/*string callerDir;
+	const char* callerIcon=in("_NAME");
+	if(callerIcon)
+	{
+	  	callerDir=string(callerIcon);
+	  	
+		char *mvudir=getenv("METVIEW_USER_DIRECTORY");
+		if(mvudir)  
+		{
+	  		callerDir=string(mvudir) + "/" + callerDir;
+		}	
+	  	
+	  	string::size_type pos=callerDir.find_last_of("/");
+	 	if(pos != string::npos)
+		{
+		 	callerDir=callerDir.substr(0,pos);
+		}	
+	}
+	  
+	//Set the output path where the resulting files will be coupied
+	string userOutPath;
+	if(!getParamValue(userOutPath,in,"OUTPUT_PATH") || userOutPath.empty())
+	{
+	  	marslog(LOG_EROR,"No parameter OUTPUT_PATH is defined!");
+		setError(13);	
+		return;
+	}
+	
+	if(userOutPath == "CURRENT_FOLDER")
+	{
+	  	if(callerDir.empty()) 
+		{
+		  	marslog(LOG_EROR,"Could not set OUTPUT_PATH properly to \"CURRENT_DIR\"!");
+			setError(13);	
+			return;
+		}  		  
+		userOutPath=callerDir;		  
+	}  
+	*/
+
+	string trModeName;
+	if(trMode  == "1")
+		trModeName="NORMAL";
+	if(trMode  == "2")
+		trModeName="CET";
+	if(trMode  == "3")
+		trModeName="FLIGHT";
+
+	string resFileName="res.txt";
+	string logFileName="log.txt";
+	
+	//Run the flexpart script
+	string cmd = flexpartScript + " " + tmpPath + " " + trModeName + " " + resFileName + " " + logFileName; 
+
+	//marslog(LOG_INFO,"Execute command: %s",cmd.c_str());
+	cout << "Execute command: " << cmd << endl;
+	
+	int ret=system(cmd.c_str());	
+	
+	//If the script failed read log file and
+	//write it into LOG_EROR
+	if(ret == -1 || WEXITSTATUS(ret) != 0)
+	{
+		string logFile=tmpPath + "/" + logFileName;		
+		ifstream in(logFile.c_str());
+		string line;
+
+		if(WEXITSTATUS(ret) == 255)
+		{
+		  	marslog(LOG_WARN,"Warnings generated during FLEXPART run!");
+			while(getline(in,line))
+			{
+				marslog(LOG_WARN,"%s",line.c_str());
+			}
+			in.close();
+			//setError(13);
+		}  		
+		else if(WEXITSTATUS(ret) == 1)
+		{		
+			marslog(LOG_EROR,"Failed to perform FLEXPART run!");
+			while(getline(in,line))
+			{
+				marslog(LOG_EROR,"%s",line.c_str());
+			}
+			in.close();
+			setError(13);
+			return;
+		}
+		else if(WEXITSTATUS(ret) > 1)
+		{		
+			marslog(LOG_EROR,"FLEXPART run failed with exit code: %d !",WEXITSTATUS(ret));
+			while(getline(in,line))
+			{
+				marslog(LOG_EROR,"%s",line.c_str());
+			}
+			in.close();
+			setError(13);
+			return;
+		}
+		
+	}
+	
+	string resFile= tmpPath + "/" + resFileName;
+		
+	out=MvRequest("FLEXPART_FILE");
+	out("PATH")=resFile.c_str();
+	
+	out.print();	
+}
+
+  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv,"FlexpartRun");
+
+    	FlexpartRun flexpartRun;	
+	
+    	theApp.run();
+}
+
+
diff --git a/src/Flextra/FlexpartRunDef b/src/Flextra/FlexpartRunDef
new file mode 100644
index 0000000..a82c66a
--- /dev/null
+++ b/src/Flextra/FlexpartRunDef
@@ -0,0 +1,176 @@
+
+FLEXPART_RUN; Flextra_run; experimental
+{	
+	FLEXPART_EXE
+{
+		@
+	}  = ''
+
+	FLEXPART_INPUT_MODE [interface = option_menu ]
+	{
+		ICON  ; ICON 
+                PATH ; PATH
+	} = ICON 	
+
+	FLEXPART_INPUT_DATA
+		[ interface = icon, class = FLEXPART_INPUT, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	FLEXPART_INPUT_PATH
+	{
+		@
+	}  = ''
+
+	FLEXPART_AVAILABLE_FILE_PATH
+	{
+		@
+	}  = 'SAME_AS_INPUT_PATH'
+
+	FLEXPART_RUN_LABEL
+	{
+		@	
+	} = 'FLEXTRA RUN'
+
+	FLEXPART_RUN_MODE [interface = option_menu ]
+	{
+		NORMAL  ; NORMAL 
+                CET ; CET
+		FLIGHT ; FLIGHT
+	} = NORMAL
+
+	FLEXPART_SIMULATION_DIRECTION [interface = option_menu ]
+	{
+		FORWARD  ; FORWARD 
+                BACKWARD ; BACKWARD
+	} = FORWARD	
+
+	FLEXPART_STARTING_DATE
+	{
+	  @
+	} =''
+
+	FLEXPART_ENDING_DATE
+	{
+	  @
+	} =''
+
+	FLEXPART_OUTPUT_INTERVAL
+	{
+	  	@
+	} = '3'
+
+	FLEXPART_OUTPUT_AVERAGING_INTERVAL
+	{
+	  	@
+	} = '3'
+
+	FLEXPART_OUTPUT_SAMPLING_INTERVAL
+	{
+	  	@
+	} = '1'
+	
+	FLEXPART_PARTICLE_SPLITTING_INTERVAL
+	{
+		*
+	} = 0.08
+
+	FLEXPART_SYNC_INTERVAL
+	{
+	  	@
+	} = '1'
+	FLEXPART_CTL
+	{
+		*
+	} = 2.0
+
+	FLEXPART_VERT_REDUCTION
+	{
+		*
+	} = 4.0
+
+	FLEXPART_OUTPUT_FORM [interface = option_menu ]
+	{
+		CONCENTRATION  ; CONCENTRATION 
+                MIXING RATIO ; MINXING RATIO
+		BOTH ; BOTH
+		PLUME ; PLUME
+	} = CONCENTRATION
+
+	FLEXPART_DUMP_PARTICLE_POSITIONS [interface = option_menu ]
+	{
+		NO  ; NO 
+                AT OUTPUT ; AT OUTPUT
+		AT END ; AT END 
+	} = AT END
+	
+	FLEXPART_SUBGRID_TERRAIN [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_CONVECTION [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_AGE_SPECTRA [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_OUTPUT_FOR_EACH_RELEASE [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_COMPUTE_FLUXES [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_DOMAIN_FILL [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_SOURCE_UNITS [interface = option_menu ]
+	{
+		MASS  ; MASS 
+                MASS MIXING RATIO ; MASS MIXING RATIO
+	} = MASS
+
+	FLEXPART_RECEPTOR_UNITS [interface = option_menu ]
+	{
+		MASS  ; MASS 
+                MASS MIXING RATIO ; MASS MIXING RATIO
+	} = MASS
+
+	FLEXPART_TRACK_PARTICLES [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_NESTED_OUTPUT [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXPART_WRITE_INITIAL_CONDITIONS [interface = option_menu ]
+	{
+		NO ; NO
+		MASS  ; MASS 
+                MASS MIXING RATIO ; MASS MIXING RATIO
+		
+	} = NO
+}
diff --git a/src/Flextra/FlexpartRunRules b/src/Flextra/FlexpartRunRules
new file mode 100644
index 0000000..386bb45
--- /dev/null
+++ b/src/Flextra/FlexpartRunRules
@@ -0,0 +1,6 @@
+%if FLEXPART_INPUT_MODE  = ICON %then 
+		%unset FLEXPART_INPUT_PATH
+		%unset FLEXPART_AVAILABLE_FILE_PATH
+
+%if FLEXPART_INPUT_MODE  = PATH %then 
+		%unset FLEXPART_INPUT_DATA
diff --git a/src/Flextra/FlexpartToGrib.cc b/src/Flextra/FlexpartToGrib.cc
new file mode 100644
index 0000000..8dd7b10
--- /dev/null
+++ b/src/Flextra/FlexpartToGrib.cc
@@ -0,0 +1,13 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+int main()
+{
+
+}
\ No newline at end of file
diff --git a/src/Flextra/FlextraPrepare.cc b/src/Flextra/FlextraPrepare.cc
new file mode 100644
index 0000000..c1bec92
--- /dev/null
+++ b/src/Flextra/FlextraPrepare.cc
@@ -0,0 +1,436 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+#include "MvPath.hpp"
+#include "MvDate.h"
+#include "Tokenizer.h"
+
+#include <iostream>
+#include <stdexcept>
+#include <algorithm>
+
+using namespace std;
+		
+#define FLEXTRA_CHK(str) if(!(str)) return
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class FlextraPrep: public Base {	
+public:
+	FlextraPrep() : Base("FLEXTRA_PREPARE") {};
+	void serve(MvRequest&,MvRequest&);
+
+  protected:	
+	bool getDate(const string& dd,string& res,const string& parName);
+	bool getParamValue(string &resVal,MvRequest& in,const string& parMv,bool);
+	bool checkGeometry(const string& areaStr,const string& gridStr);
+};
+
+
+bool FlextraPrep::getDate(const string& dd,string& res,const string& parName)
+{ 
+  	res=dd;
+	
+	if(dd.size() < 8)
+	{
+		istringstream iss(dd);
+ 		double d;
+		iss >> d; 
+		char buf[9];
+		MvDate md(julian_to_date(today() + d,1));
+		md.Format("yyyymmdd", buf);
+		res=string(buf);
+	}
+	
+	bool retVal=(res.size() == 8)?true:false;
+	
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid date format used for parameter: %s",parName.c_str());
+		setError(13);
+	}	
+		
+	return retVal;
+}  
+
+bool FlextraPrep::getParamValue(string& resVal,MvRequest& in,const string& parMv,bool isDate=false)
+{
+	int cnt = in.countValues(parMv.c_str());
+
+	if(cnt == 1)
+	{
+	  	const char *cval=in(parMv.c_str());
+		if(cval) 
+			resVal=string(cval);
+	}
+	else
+	{
+		vector<string> vals;
+		int toIndex=-1;
+		int byIndex=-1;
+		for( int i=0; i<cnt; i++)
+	     	{
+	      		const char *cval = in(parMv.c_str(),i );
+			if(cval)
+			{
+			  	vals.push_back(string(cval));
+				if(strcmp(cval,"TO") == 0)
+				 	toIndex=static_cast<int>(vals.size())-1;
+				else if(strcmp(cval,"BY") == 0)
+				 	byIndex=static_cast<int>(vals.size())-1;  
+			}	
+		}
+	
+	
+		if(vals.size() == 0)
+		{
+			marslog(LOG_EROR,"No value found for parameter: %s",parMv.c_str());
+			setError(13);
+			return false;
+		}
+		if(toIndex==1 && byIndex==3 && static_cast<int>(vals.size()) == 5)
+		{
+			int fromValue;
+			istringstream issF(vals[0]);
+			issF >> fromValue;  	
+		  	
+			int toValue;
+			istringstream issT(vals[2]);
+			issT >> toValue;
+					
+			int byValue;
+			istringstream issB(vals[4]);
+			issB >> byValue;
+			
+		 	if(fromValue >=0 && fromValue < 500 &&
+			   toValue >= fromValue && toValue < 500 &&
+			   byValue > 0 && byValue<=6)
+			  
+			{
+				int currentValue=fromValue;
+				resVal=vals[0];
+				currentValue+=byValue;
+				while(currentValue <= toValue)
+				{				  	
+					stringstream sst;
+					sst << currentValue;
+					resVal.append("/" + sst.str());
+					currentValue+=byValue;
+				}
+			}
+		}	
+		else if(toIndex != -1 || byIndex != -1)	
+		{
+			marslog(LOG_EROR,"Incorrect syntax used for parameter: %s",parMv.c_str());
+			setError(13);
+			return false; 
+		}		
+		else
+		{  
+			resVal=vals[0]; 
+			for(unsigned int i=1; i< vals.size(); i++)
+			{
+			  	resVal.append("/" + vals[i]);
+			}
+		}
+	}
+	
+	if(isDate)
+	{
+		string s;
+		if(getDate(resVal,s,parMv))
+		{
+			  resVal=s;
+		}
+		else
+			resVal.clear();
+	}	
+	
+	
+	
+	if(!resVal.empty())
+	{	  	
+		return true;
+	}
+	else
+	{
+	  	marslog(LOG_EROR,"No value found for parameter: %s",parMv.c_str());
+		setError(13);
+		return false;
+	}	
+	
+}
+
+bool FlextraPrep::checkGeometry(const string& areaStr,const string& gridStr)
+{
+	vector<string> vArea;
+	Tokenizer parseA("/");
+	parseA(areaStr,vArea);
+	
+	vector<string> vGrid;
+	Tokenizer parseG("/");
+	parseG(gridStr,vGrid);
+	
+	if(vArea.size() != 4 || vGrid.size() != 2)
+		return false;
+	
+	vector<float> area;
+	for(unsigned int i=0; i < 4; i++)
+	{  
+		istringstream iss(vArea[i]);
+ 		float d;
+		iss >> d;
+		area.push_back(d);
+	}
+	
+	vector<float> grid;
+	for(unsigned int i=0; i < 2; i++)
+	{  
+		istringstream iss(vGrid[i]);
+ 		float d;
+		iss >> d;
+		if(d <= 0.)
+		  	return false;
+		  
+		grid.push_back(d);
+	}
+	
+	double trVal;
+	
+	float nx=(area[2]-area[0])/grid[1];
+	trVal=trunc(nx);
+        if(nx != trVal  ||  static_cast<float>(static_cast<int>(trVal)) != trVal)
+		return false;
+	
+	float ny=(area[3]-area[1])/grid[0];
+	trVal=trunc(ny);
+        if(ny != trVal  ||  static_cast<float>(static_cast<int>(trVal)) != trVal)
+		return false;		
+	
+
+	return true;
+}  
+
+
+void FlextraPrep::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------FlextraPrepare::serve()--------------" << endl;
+  	in.print();
+
+	//Etadot is not stored in MARS for dates earlier than this
+	MvDate etaDotDate("20080604");
+		
+	string flextraMacro;
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate mv_flextra_prep.mv macro!");
+		setError(13);
+		return;
+	}
+	else
+	{
+		flextraMacro=string(mvbin) +"/mv_flextra_prep.mv";
+	}
+
+	vector<string> param;
+	string str;
+		
+	//Add perparation mode 
+	string prepMode;
+	FLEXTRA_CHK(getParamValue(prepMode,in,"FLEXTRA_PREPARE_MODE"));	
+	if(prepMode == "FORECAST")
+	{	  	
+		param.push_back("fc");
+	}
+	else
+	{
+		param.push_back("period");
+	}
+	
+	//Add reuse(check) input status
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_REUSE_INPUT"));
+	if(str == "ON")
+	{	  	
+		param.push_back("1");
+	}
+	else
+	{
+	  	param.push_back("0");
+	}
+		
+	//Add outpath
+	string outPath;
+	FLEXTRA_CHK(getParamValue(outPath,in,"FLEXTRA_OUTPUT_PATH"));
+	param.push_back(outPath);
+	
+	//Add Available file
+	string fAvailable=outPath + "/AVAILABLE";
+	param.push_back(fAvailable);
+
+	
+	//Add area
+	string area;
+	FLEXTRA_CHK(getParamValue(area,in,"FLEXTRA_AREA"));
+	param.push_back(area);
+	
+	//Add grid resolution
+	string grid;
+	FLEXTRA_CHK(getParamValue(grid,in,"FLEXTRA_GRID"));
+	param.push_back(grid);
+	
+	//Add top level
+	string topL;
+	FLEXTRA_CHK(getParamValue(topL,in,"FLEXTRA_TOP_LEVEL"));
+	param.push_back(topL);
+	
+	string topUnits;
+	FLEXTRA_CHK(getParamValue(topUnits,in,"FLEXTRA_TOP_LEVEL_UNITS"));
+	param.push_back(topUnits);	
+		
+	if(!checkGeometry(area,grid))
+	{
+	  	marslog(LOG_EROR,"Inconsistency between grid area and resolution!");
+		setError(13);
+		return;
+	}  	
+			
+	if(prepMode == "FORECAST")
+	{  
+		//Add mars expver
+		string marsExpver;
+		FLEXTRA_CHK(getParamValue(marsExpver,in,"FLEXTRA_FC_MARS_EXPVER"));
+		param.push_back(marsExpver);	
+	
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_DATE",true));
+		param.push_back(str);
+		MvDate md(str.c_str());
+		if(md < etaDotDate)
+		{
+			marslog(LOG_EROR,"Cannot prepare data for the date specified in FLEXTRA_DATE: %s",str.c_str());			
+			marslog(LOG_EROR,"Etadot is not avaliable in MARS for this date! It has only been archived since 4 June 2008.");	
+			setError(13);
+			return;
+		}
+		
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_TIME"));
+		param.push_back(str);
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_STEP"));
+		param.push_back(str);
+		
+		
+		
+	}
+	else
+	{
+		//Add mars expver
+		string marsExpver;
+		FLEXTRA_CHK(getParamValue(marsExpver,in,"FLEXTRA_FC_MARS_EXPVER"));
+		param.push_back(marsExpver);	
+	  
+		//Add mars expver
+		string marsAnExpver;
+		FLEXTRA_CHK(getParamValue(marsAnExpver,in,"FLEXTRA_AN_MARS_EXPVER"));
+		param.push_back(marsAnExpver);	
+			
+	  	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_PERIOD_START_DATE",true));
+		param.push_back(str);
+		MvDate mdStart(str.c_str());
+		if(mdStart < etaDotDate)
+		{
+			marslog(LOG_EROR,"Cannot prepare data for the date specified in FLEXTRA_PERIOD_START_DATE: %s",str.c_str());			
+			marslog(LOG_EROR,"Etadot is not avaliable in MARS for this date! It has only been archived since 4 June 2008.");	
+			setError(13);
+			return;
+		}
+		
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_PERIOD_START_TIME"));
+		param.push_back(str);
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_PERIOD_END_DATE",true));
+		param.push_back(str);
+		MvDate mdEnd(str.c_str());
+		if(mdEnd < etaDotDate)
+		{
+			marslog(LOG_EROR,"Cannot prepare data for the date specified in FLEXTRA_PERIOD_END_DATE: %s",str.c_str());			
+			marslog(LOG_EROR,"Etadot is not avaliable in MARS for this date! It has only been archived since 4 June 2008.");	
+			setError(13);
+			return;
+		}
+						
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_PERIOD_END_TIME"));
+		param.push_back(str);
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_PERIOD_STEP"));
+		param.push_back(str);
+		
+		if(mdEnd < mdStart)
+		{
+			marslog(LOG_EROR,"Inconsistency in period definition! FLEXTRA_PERIOD_END_DATE precedes FLEXTRA_PERIOD_START_DATE!"); 	
+			setError(13);
+			return;
+		}	
+	}		
+	
+	//Build request to be sent to Macro
+	MvRequest req("MACRO");
+
+	string processName = MakeProcessName("FlextraPrepare");
+	MvRequest macroReq("MACRO");
+	req("PATH") = flextraMacro.c_str();
+	req("_CLASS") = "MACRO";
+	req("_ACTION") = "execute";
+	req("_REPLY") = processName.c_str();
+	
+	//Define argument list for the macro!
+	for(vector<string>::iterator it=param.begin(); it != param.end(); it++)
+	{
+		req.addValue("_ARGUMENTS",(*it).c_str());			   			     
+	}
+		
+	//Run macro
+	int error;	
+	marslog(LOG_INFO,"Execute macro: %s",flextraMacro.c_str());
+	MvRequest reply = MvApplication::waitService("macro",req,error);
+
+	//Call myself to process the macro reply request
+	if(!error && reply)
+	{
+		const char* myname = reply("_REPLY");
+		MvApplication::callService(myname,reply,0);
+	}
+	else
+	{
+	  	marslog(LOG_EROR,"Failed to run FLEXTRA input preparation! Macro failed!");
+		setError(13);
+		return;
+	}  
+	  
+	reply.print();
+	
+	out=MvRequest("FLEXTRA_INPUT");
+	out("INPUT_DATA_PATH")=outPath.c_str();
+	out("AVAILABLE_FILE_PATH")=fAvailable.c_str();
+	
+	out.print();
+}
+	
+	  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv,"FlextraPrepare");
+
+    	FlextraPrep flextra;	
+	
+    	theApp.run();
+}
+
+
diff --git a/src/Flextra/FlextraPrepareDef b/src/Flextra/FlextraPrepareDef
new file mode 100644
index 0000000..dbb4db8
--- /dev/null
+++ b/src/Flextra/FlextraPrepareDef
@@ -0,0 +1,102 @@
+FLEXTRA_PREPARE; Flextra_prepare
+{
+	FLEXTRA_PREPARE_MODE [interface = option_menu ]
+	{
+		FORECAST ; FORECAST
+		PERIOD ; PERIOD
+	} = FORECAST
+
+
+	FLEXTRA_FC_MARS_EXPVER
+	{
+	  @
+	} ='1'
+
+	FLEXTRA_AN_MARS_EXPVER
+	{
+	  @
+	} ='1'
+
+	FLEXTRA_DATE
+	{
+	  @
+	} =''
+
+	FLEXTRA_TIME
+	{
+	  @
+	} =''
+
+	FLEXTRA_STEP
+	{
+	  @
+	  /
+	} =''
+
+	FLEXTRA_PERIOD_START_DATE
+	{
+	  @
+	} =''
+
+	FLEXTRA_PERIOD_START_TIME
+	{
+	  @
+	} =''
+
+	FLEXTRA_PERIOD_END_DATE
+	{
+	  @INTERVAL
+	} =''
+
+	FLEXTRA_PERIOD_END_TIME
+	{
+	  @
+	} =''
+
+	FLEXTRA_PERIOD_STEP [interface = option_menu ]
+	{
+	       3  ; 3 
+               6 ; 6
+	} = 3
+
+	FLEXTRA_AREA 
+        [
+                help = help_input,
+                help_icon = 'help_map',
+                input_type = map,
+                input_window = '/Metview/Defaults/Input Window'
+        ]
+  	{
+                *
+                /
+        } = -90./-180./90./180
+	FLEXTRA_GRID
+	{
+	  *
+	  /
+	} = 1/1
+
+	FLEXTRA_TOP_LEVEL
+	{
+	  *
+	} = '1'
+
+        FLEXTRA_TOP_LEVEL_UNITS [interface = option_menu ]
+	{
+	  	MODEL_LEVELS ; ML 
+		HPA ; HPA
+	} = 'ML'
+    
+
+	FLEXTRA_REUSE_INPUT [interface = option_menu ]
+	{
+	       ON  ; ON 
+               OFF ; OFF
+	} = ON
+
+	FLEXTRA_OUTPUT_PATH
+	{
+	  @
+	} = ''
+	
+}	
diff --git a/src/Flextra/FlextraPrepareRules b/src/Flextra/FlextraPrepareRules
new file mode 100644
index 0000000..f6806fa
--- /dev/null
+++ b/src/Flextra/FlextraPrepareRules
@@ -0,0 +1,12 @@
+%if FLEXTRA_PREPARE_MODE = FORECAST %then 
+ 		%unset FLEXTRA_PERIOD_START_DATE
+		%unset FLEXTRA_PERIOD_START_TIME
+		%unset FLEXTRA_PERIOD_END_DATE
+		%unset FLEXTRA_PERIOD_END_TIME
+		%unset FLEXTRA_PERIOD_STEP
+		%unset FLEXTRA_AN_MARS_EXPVER
+
+%if FLEXTRA_PREPARE_MODE = PERIOD %then 
+ 		%unset FLEXTRA_DATE
+		%unset FLEXTRA_TIME
+		%unset FLEXTRA_STEP
diff --git a/src/Flextra/FlextraRun.cc b/src/Flextra/FlextraRun.cc
new file mode 100644
index 0000000..409f51f
--- /dev/null
+++ b/src/Flextra/FlextraRun.cc
@@ -0,0 +1,1121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "Metview.h"
+
+#include "MvDate.h"
+#include "Tokenizer.h"
+#include "MvMiscelaneous.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+
+using namespace std;
+
+#define FLEXTRA_CHK(str) if(!(str)) return false
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class FlextraRun: public Base {	
+public:
+	FlextraRun() : Base("FLEXTRA_RUN") {initIds();}
+	void serve(MvRequest&,MvRequest&);
+
+  protected:	
+	void initIds();
+	bool getMvDate(const string& dd,const string& tt,MvDate&);
+	bool getDate(const string& dd,string& res, const string&);
+	bool getTime(const string& dd,string& res, const string&);
+	bool getTimeLen(const string& tt,string& res, const string&,bool);
+	bool getParamValueId(string&,MvRequest&,string,const map<string,string>&);
+	bool getParamValue(string&,MvRequest&,string,bool);
+	bool getParamValue(vector<string>&,MvRequest&,string);
+	
+	bool generatePathnamesFile(const string&,MvRequest&,const string&,const string&);
+	bool generateCommandFile(const string&,MvRequest&);
+	bool generateStartPointsFile(const string&,MvRequest&);
+	bool generateStartCetFile(const string&,MvRequest&);
+	bool generateStartFlightFile(const string& fStart,MvRequest& in);
+	bool getDateRange(MvDate& rangeStart,MvDate& rangeEnd,MvRequest& in);
+	bool getPredefInputPath(const string&,const MvDate&,const MvDate&,string &);
+	
+	
+	map<string,string> directionIds_;
+	map<string,string> modeIds_;
+	map<string,string> intervalIds_;
+	map<string,string> cetTypeIds_;
+	map<string,string> cetLevelUnitsIds_;
+	map<string,string> flightTypeIds_;
+	map<string,string> flightLevelUnitsIds_;
+};
+
+void FlextraRun::initIds()
+{
+	directionIds_["FORWARD"]="1";
+        directionIds_["BACKWARD"]="-1";
+                
+        modeIds_["NORMAL"]="1"; 
+        modeIds_["CET"]="2";
+	modeIds_["FLIGHT"]="3";
+	
+	intervalIds_["ORIGINAL"]="0";
+        intervalIds_["INTERVAL"]="1";
+	intervalIds_["BOTH"]="2";	
+	
+	cetTypeIds_["3D"]="1"; 
+        cetTypeIds_["MODEL LEVEL"]="2";
+	cetTypeIds_["ISOBARIC"]="4";
+	cetTypeIds_["ISENTROPIC"]="5";
+		
+	cetLevelUnitsIds_["METRES ASL"]="1"; 
+        cetLevelUnitsIds_["METRES AGL"]="2";
+	cetLevelUnitsIds_["HPA"]="3";
+	
+	flightTypeIds_["3D"]="1"; 
+        flightTypeIds_["MODEL LEVEL"]="2";
+	flightTypeIds_["ISOBARIC"]="4";
+	flightTypeIds_["ISENTROPIC"]="5";
+	
+	flightLevelUnitsIds_["METRES ASL"]="1"; 
+        flightLevelUnitsIds_["METRES AGL"]="2";
+	flightLevelUnitsIds_["HPA"]="3";
+}	
+
+bool FlextraRun::getMvDate(const string& dd,const string& tt,MvDate& res)
+{
+	if(dd.size() != 8 || tt.size() != 6)
+	  	return false;
+  
+  	string sDate=dd.substr(0,4) + "-" + dd.substr(4,2) + "-" + dd.substr(6,2);
+	string sTime=tt.substr(0,2) + ":" + tt.substr(2,2) + ":" + dd.substr(4,2);
+
+	string s=sDate + " " + sTime;
+
+	res=MvDate(s.c_str());  
+
+	return true;
+}  
+
+
+bool FlextraRun::getDate(const string& dd,string& res,const string& parName)
+{ 
+  	res=dd;
+	
+	if(dd.size() < 8)
+	{
+		istringstream iss(dd);
+ 		double d;
+		iss >> d; 
+		char buf[9];
+		MvDate md(julian_to_date(today() + d,1));
+		md.Format("yyyymmdd", buf);
+		res=string(buf);
+	}
+	
+	bool retVal=(res.size() == 8)?true:false;
+	
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid date format used for paramater: %s",parName.c_str());
+		setError(13);
+	}	
+		
+	return retVal;
+}  
+
+bool FlextraRun::getTime(const string& tt,string& res,const string& parName)
+{ 
+  	string hh, mm="00", ss="00";
+	bool retVal=true;
+	
+	vector<string> tok;
+	Tokenizer parse(":");
+	parse(tt,tok);
+		
+	if(tok.size() > 0)
+	{	
+		if(tok[0].size() == 1)	
+	  		hh = "0" + tok[0];
+		else
+		  	hh=tok[0];
+		
+		if(hh.size() !=  2)
+			retVal=false;
+	}
+	if(tok.size() > 1)
+	{	
+		mm = tok[1];
+		if(mm.size() !=  2)
+			retVal=false;
+	}
+
+	if(tok.size() > 2)
+	{	
+		ss = tok[2];
+		if(ss.size() !=  2)
+			retVal=false;
+	}	
+	
+	res=hh + mm + ss;
+	
+	retVal=(res.size() == 6)?true:false;
+
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid time format used for paramater: %s",parName.c_str());
+		setError(13);
+	}	
+		
+	return retVal;
+}  
+
+
+bool FlextraRun::getTimeLen(const string& tt,string& res,const string& parName,bool inSeconds)
+{ 
+  	string hh, mm="00", ss="00";
+	bool retVal=true;
+	
+	vector<string> tok;
+	Tokenizer parse(":");
+	parse(tt,tok);
+	
+	if(tok.size() > 0)
+	{	
+		if(tok[0].size() == 1)
+			hh = "00" + tok[0];
+		else if(tok[0].size() == 2)	
+	  		hh = "0" + tok[0];
+		else
+		  	hh=tok[0];
+		
+		if(hh.size() !=  3)
+			retVal=false;
+	}
+	if(tok.size() > 1)
+	{	
+		mm = tok[1];
+		if(mm.size() !=  2)
+			retVal=false;
+	}
+
+	if(tok.size() > 2)
+	{	
+		ss = tok[2];
+		if(ss.size() !=  2)
+			retVal=false;
+	}	
+	
+	if(inSeconds)
+	{
+	  	int sec,i;
+		istringstream ish(hh);
+		ish >> i;
+		sec=i*3600;
+		istringstream ism(mm);
+		ism >> i;
+		sec+=i*60;
+		istringstream iss(ss);
+		iss >> i;
+		sec+=i;
+		
+		stringstream sst;
+		sst << sec;	
+		res=sst.str();
+		retVal=true;		
+	}	
+	else
+	{  	
+		res=hh + mm + ss;
+		retVal=(res.size() == 7)?true:false;
+	}
+
+	if(!retVal)
+	{
+		marslog(LOG_EROR,"Invalid time lenght format used for paramater: %s",parName.c_str());
+		setError(13);
+	}	
+
+	return retVal;
+}  
+
+bool FlextraRun::getParamValueId(string& value,MvRequest& in,string parName,const map<string,string>& idMap)
+{	
+	bool canBeEmpty=true;
+	string errTxt;
+  	if(!in.getValueId(parName.c_str(),value,idMap,canBeEmpty,errTxt))
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;
+}
+
+bool FlextraRun::getParamValue(string& value,MvRequest& in,string parName,bool canBeEmpty=false)
+{
+	string errTxt;
+  	if(!in.getValue(parName.c_str(),value,canBeEmpty,errTxt))
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;
+}
+
+bool FlextraRun::getParamValue(vector<string>& value,MvRequest& in,string parName)
+{
+	string errTxt;
+	if(!in.getValue(parName.c_str(),value,false,errTxt))
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;
+}
+
+bool FlextraRun::generatePathnamesFile(const string& fPathnames,MvRequest& in,const string& optionsPath,const string& outPath)
+{
+	string inPath,fAvailable;
+		
+	const char *input_mode=in("FLEXTRA_INPUT_MODE");	
+	if(!input_mode)
+	{
+	  	marslog(LOG_EROR,"No parameter FLEXTRA_INPUT_MODE is defined!");
+		setError(13);	
+		return false;
+	}
+	  
+	if(strcmp(input_mode,"ICON") == 0)
+	{
+		MvRequest dataR=in("FLEXTRA_INPUT_DATA");
+		const char* iconType=dataR.getVerb();
+		//If no icon is specified
+		if(!iconType || strcmp(iconType,"FLEXTRA_INPUT") != 0)
+		{
+			marslog(LOG_EROR,"No FLEXTRA_INPUT icon is specified!");
+			setError(13);
+			return false;
+		}
+
+		FLEXTRA_CHK(getParamValue(inPath,dataR,"INPUT_DATA_PATH"));
+		FLEXTRA_CHK(getParamValue(fAvailable,dataR,"AVAILABLE_FILE_PATH"));
+	}	
+	else if(strcmp(input_mode,"PATH") == 0) 
+	{
+	  	FLEXTRA_CHK(getParamValue(inPath,in,"FLEXTRA_INPUT_PATH"));
+		FLEXTRA_CHK(getParamValue(fAvailable,in,"FLEXTRA_AVAILABLE_FILE_PATH"));
+
+		if(fAvailable == "SAME_AS_INPUT_PATH")
+		{
+			fAvailable = inPath + "/AVAILABLE";
+		}	
+	}
+	else if(strcmp(input_mode,"EC_EUROPE") == 0 || strcmp(input_mode,"EC_GLOBAL") == 0)
+	{
+		string envVar=(strcmp(input_mode,"EC_EUROPE") == 0)?"MV_FLEXTRA_INPUT_EUROPE":"MV_FLEXTRA_INPUT_GLOBAL";
+		  
+	  	char *predefPath=getenv(envVar.c_str());
+		if(predefPath == 0)  
+		{	
+			marslog(LOG_EROR,"No %s env variable is defined! Cannot find data for input mode \"%s\"!",envVar.c_str(),input_mode);
+			setError(13);
+			return false;			
+		}
+		
+		string rootPath(predefPath);
+	  	MvDate startDate,endDate;
+		if(!getDateRange(startDate,endDate,in))
+		{  	
+		  	marslog(LOG_EROR,"No data is found for input mode \"%s\"!",input_mode);
+			setError(13);
+			return false;
+		}
+		if(!getPredefInputPath(rootPath,startDate,endDate,inPath))
+		{
+		  	marslog(LOG_EROR,"No data is found for input mode \"%s\"!",input_mode);
+			setError(13);
+			return false;
+		}	
+		fAvailable = inPath + "/AVAILABLE";
+		marslog(LOG_INFO,"Input data path set to: %s",inPath.c_str());
+		
+	}
+	else
+	{
+		marslog(LOG_EROR,"Invalid value for parameter FLEXTRA_INPUT_MODE: %s",input_mode);
+		setError(13);
+		return false;
+	}
+	
+	//Pathnames file	
+	ofstream out(fPathnames.c_str());	
+	out << optionsPath << "/" << endl;
+	out << outPath << "/" << endl;
+	out << inPath << "/" << endl;
+	out << fAvailable << endl;
+	out << "================================================" << endl;
+	out << " ";
+	out.close();
+	
+	return true;
+}
+	
+bool FlextraRun::generateCommandFile(const string& fCmd,MvRequest& in)
+{
+	ofstream out(fCmd.c_str());	
+	
+	string str,str2,trMode;
+		
+	//Find outrun mode. It is needed for the starting dates
+	FLEXTRA_CHK(getParamValueId(trMode,in,"FLEXTRA_RUN_MODE",modeIds_));
+	
+out << "**********************************************\n\
+					     \n\
+  Input file for the trajectory model FLEXTRA\n\
+ 					     \n\
+*********************************************\n\n";
+
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_RUN_LABEL"));
+	out << str << endl;
+	
+	FLEXTRA_CHK(getParamValueId(str,in,"FLEXTRA_TRAJECTORY_DIRECTION",directionIds_));
+	out << str << endl;
+		
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_TRAJECTORY_LENGTH"));
+	FLEXTRA_CHK(getTimeLen(str,str2,"FLEXTRA_TRAJECTORY_LENGTH",false));
+	out << str2 << endl;
+	
+	if(trMode != "3")
+	{
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_FIRST_STARTING_DATE"));
+		FLEXTRA_CHK(getDate(str,str2,"FLEXTRA_FIRST_STARTING_DATE"));	
+		out << str2 << " ";
+		
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_FIRST_STARTING_TIME"));
+		FLEXTRA_CHK(getTime(str,str2,"FLEXTRA_FIRST_STARTING_TIME"));
+		out << str2 << endl;
+		
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_LAST_STARTING_DATE"));
+		FLEXTRA_CHK(getDate(str,str2,"FLEXTRA_LAST_STARTING_DATE"));	
+		out << str2 << " ";
+	
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_LAST_STARTING_TIME"));
+		FLEXTRA_CHK(getTime(str,str2,"FLEXTRA_LAST_STARTING_TIME"));
+		out << str2 << endl;
+	
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_STARTING_TIME_INTERVAL"));
+		FLEXTRA_CHK(getTimeLen(str,str2,"FLEXTRA_STARTING_TIME_INTERVAL",false));
+		out << str2 << endl;
+	}
+
+	//In FLIGHT mode the starting date,time and interval are disabled in the 
+	//user interface beause FLEXTRA does not use them for the trajectory 
+	//computations. However FLEXTRA does need a proper date here, otherwise it crashes.
+	//So we use the first date and time from the FLIGHT starting points here.
+	else
+	{
+	  	vector<string> startDate,startTime;		
+		FLEXTRA_CHK(getParamValue(startDate,in,"FLEXTRA_FLIGHT_STARTING_DATES"));
+		FLEXTRA_CHK(getParamValue(startTime,in,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		int cnt=startDate.size();
+		
+		if(cnt > 0 && static_cast<int>(startTime.size()) == cnt)
+		{
+			string dStr,tStr;
+			FLEXTRA_CHK(getDate(startDate[0],dStr,"FLEXTRA_FLIGHT_STARTING_DATES"));
+			FLEXTRA_CHK(getTime(startTime[0],tStr,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		  	out << dStr << " " << tStr << endl;
+			
+			FLEXTRA_CHK(getDate(startDate[cnt-1],dStr,"FLEXTRA_FLIGHT_STARTING_DATES"));
+			FLEXTRA_CHK(getTime(startTime[cnt-1],tStr,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		  	out << dStr << " " << tStr << endl;
+			
+	 	 	out << "030000" << endl;
+		}	
+	}	 
+	
+	FLEXTRA_CHK(getParamValueId(str,in,"FLEXTRA_OUTPUT_INTERVAL_MODE",intervalIds_));
+	out << str << " ";
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_OUTPUT_INTERVAL_VALUE"));
+	
+	if(str.find("0") != string::npos &&  str.find_first_not_of("0") == string::npos)
+	{
+		marslog(LOG_EROR,"Invalid value specified for FLEXTRA_OUTPUT_INTERVAL_VALUE: %s",str.c_str());		
+		marslog(LOG_EROR,"It has to be greater than 0!");
+		setError(13);
+		return false;	
+	}  
+	
+	FLEXTRA_CHK(getTimeLen(str,str2,"FLEXTRA_OUTPUT_INTERVAL_VALUE",true));
+	out << str2 << endl;
+	
+	//It might be disabled in the inteface (for CET and FLIGHT modes) 
+	getParamValue(str,in,"FLEXTRA_UNCERTAINTY_TRAJECTORIES",true);
+	if(str == "ON")
+	{	
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_UNCERTAINTY_TRAJECTORY_NUMBER"));
+		out << str << " ";
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_UNCERTAINTY_TRAJECTORY_DISTANCE"));
+		out << str << " ";	
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_UNCERTAINTY_TRAJECTORY_TIME_CONSTANT"));
+		out << str << " ";
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_U_RANDOM_ERROR"));
+		out << str << " ";
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_V_RANDOM_ERROR"));
+		out << str << " ";
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_W_RANDOM_ERROR"));
+		out << str << endl;
+	}
+	else
+	{
+	   out << "0 0.5 2.0 0.08 0.08 0.08" << endl;
+	  
+	}  
+	
+	
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_INTERPOLATION_TYPE"));
+	out << str << endl;	
+	
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_CFL_SPATIAL"));
+	out << str << endl;	
+	
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_CFL_TEMPORAL"));
+	out << str << endl;
+	
+	//FLEXTRA_CHK(getParamValueId(str,in,"FLEXTRA_RUN_MODE",modeIds_));
+	out << trMode << endl;
+	
+	out.close();
+	
+	return true;
+}	
+	
+bool FlextraRun::generateStartPointsFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+	string str;
+	
+
+out << "**********************************************************************\n\
+*                                                                    *\n\
+*                 TRAJECTORY MODEL                                   *\n\
+*                 DEFINITION OF STARTING/ENDING POINTS               *\n\
+*                                                                    *\n\
+*  The first 7 characters of the comment are also used as filenames. *\n\
+*  Therefore, they cannot be blank and they must be different for    *\n\
+*  each starting point.                                              *\n\
+*                                                                    *\n\
+*  Kind of trajectory: 1 = 3 dimensional                             *\n\
+*                      2 = on model layers                           *\n\
+*                      3 = mixing layer                              *\n\
+*                      4 = isobaric                                  *\n\
+*                      5 = isentropic                                *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+*                                                                    *\n\
+*  Unit of z coordinate: 1 = Meters above sea level                  *\n\
+*                        2 = Meters above ground                     *\n\
+*                        3 = Hectopascal                             *\n\
+*                                                                    *\n\
+*  For mixing layer trajectories (kind 3), the z coordinate must be  *\n\
+*  given in m.a.g.l. (option 2)                                      *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
+
+	getParamValue(str,in,"FLEXTRA_RUN_MODE");
+
+	vector<string> type,name,lat,lon,lev,levUnit;
+	
+	FLEXTRA_CHK(getParamValue(type,in,"FLEXTRA_NORMAL_TYPES"));
+	FLEXTRA_CHK(getParamValue(name,in,"FLEXTRA_NORMAL_NAMES"));
+	FLEXTRA_CHK(getParamValue(lat,in,"FLEXTRA_NORMAL_LATITUDES"));
+	FLEXTRA_CHK(getParamValue(lon,in,"FLEXTRA_NORMAL_LONGITUDES"));
+	FLEXTRA_CHK(getParamValue(lev,in,"FLEXTRA_NORMAL_LEVELS"));
+	FLEXTRA_CHK(getParamValue(levUnit,in,"FLEXTRA_NORMAL_LEVEL_UNITS"));
+	
+	unsigned int cnt=type.size();	
+	if(cnt ==0)
+	{
+		marslog(LOG_EROR,"No values specified for parameter FLEXTRA_NORMAL_TYPES!");
+	 	setError(13);
+		return false; 
+	}
+	
+	string errTxt="Incosistent number of items specified for parameter: FLEXTRA_NORMAL_";
+	if(name.size() != cnt)
+		errTxt+="NAMES!";
+	else if(lat.size() != cnt)
+		errTxt+="LATITUDES!";	
+	else if(lon.size() != cnt)
+		errTxt+="LONGITUDES!";
+	else if(lev.size() != cnt)
+		errTxt+="LEVELS!";  
+	else if(levUnit.size() != cnt)
+		errTxt+="LEVEL_UNITS!"; 
+	
+	if(errTxt.find("!") != string::npos) 
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false; 
+	}
+	
+	for(unsigned int i=0; i < cnt; i++)
+	{	  
+		out << lon[i] << endl;
+		out << lat[i] << endl;
+		out << type[i] << endl;
+		out << levUnit[i] << endl;
+		out << lev[i] << endl;
+		out << name[i] << endl;
+		out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+	}
+
+	out.close();
+	
+	return true;
+}	
+
+bool FlextraRun::generateStartCetFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+	string str;
+	
+
+	
+out << "**********************************************************************\n\
+*                                                                    *\n\
+*                 TRAJECTORY MODEL                                   *\n\
+*                 DEFINITION OF THE CET DOMAIN                       *\n\
+*  A CET STARTING DOMAIN IS DEFINED BY THE LOWER LEFT AND UPPER RIGHT*\n\
+*  CORNER IN A LATITUDE/LONGITUDE COORDINATE SYSTEM, AND BY A LOWER  *\n\
+*  AND UPPER LEVEL. TRAJECTORIES ARE STARTED AT DISTANCES DX, DY AND *\n\
+*  DZ WITHIN THIS DOMAIN.                                            *\n\
+*                                                                    *\n\
+*  Kind of trajectory: 1 = 3 dimensional                             *\n\
+*                      2 = on model layers                           *\n\
+*                      3 = not allowed in CET mode                   *\n\
+*                      4 = isobaric                                  *\n\
+*                      5 = isentropic                                *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+*                                                                    *\n\
+*  Unit of z coordinate: 1 = Meters above sea level                  *\n\
+*                        2 = Meters above ground                     *\n\
+*                        3 = Hectopascal                             *\n\
+*                                                                    *\n\
+*  The vertical distance DZ between the trajectories must be         *\n\
+*  given in the same units.                                          *\n\
+*                                                                    *\n\
+**********************************************************************\n\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
+
+	string type,name,levUnit,dx,dy,dz,levTop,levBottom;
+	FLEXTRA_CHK(getParamValueId(type,in,"FLEXTRA_CET_TYPE",cetTypeIds_));
+	FLEXTRA_CHK(getParamValue(name,in,"FLEXTRA_CET_NAME"));
+	FLEXTRA_CHK(getParamValueId(levUnit,in,"FLEXTRA_CET_LEVEL_UNITS",cetLevelUnitsIds_));
+	FLEXTRA_CHK(getParamValue(dx,in,"FLEXTRA_CET_DX"));
+	FLEXTRA_CHK(getParamValue(dy,in,"FLEXTRA_CET_DY"));
+	FLEXTRA_CHK(getParamValue(dz,in,"FLEXTRA_CET_DZ"));
+	FLEXTRA_CHK(getParamValue(levTop,in,"FLEXTRA_CET_TOP_LEVEL"));
+	FLEXTRA_CHK(getParamValue(levBottom,in,"FLEXTRA_CET_BOTTOM_LEVEL"));
+	
+	int cnt = in.countValues("FLEXTRA_CET_AREA");
+	if(cnt != 4)
+	{
+	  	marslog(LOG_EROR,"No paramater FLEXTRA_CET_AREA is specified!");
+		setError(13);
+		return false;	
+	}  
+	  
+	double dval; 
+	vector<double> areaL;
+	for(int i=0; i< cnt; i++)
+	{
+		in.getValue(dval,"FLEXTRA_CET_AREA",i);
+	 	areaL.push_back(dval);
+	}	
+	out << areaL[1] << endl;
+	out << areaL[0] << endl;
+	out << areaL[3] << endl;
+	out << areaL[2] << endl;
+	out << dx << endl;
+	out << dy << endl;
+	out << type << endl;
+	out << levUnit << endl;
+	out << levBottom << endl;
+	out << levTop << endl;
+	out << dz << endl;
+	out << name << endl;
+	out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+	
+	out.close();
+	
+	return true;
+}	
+
+bool FlextraRun::generateStartFlightFile(const string& fStart,MvRequest& in)
+{
+	ofstream out(fStart.c_str());	
+	
+	string str;
+	
+
+out << "**********************************************************************\n\
+*              TRAJECTORY MODEL                                      *\n\
+*              DEFINITION OF STARTING/ENDING POINTS IN FLIGHT MODE   *\n\
+*  This file defines starting points separated non-uniformly in      *\n\
+*  space as well as in time. Thus, both starting times AND starting  *\n\
+*  coordinates must be given.                                        *\n\
+*  The starting times must be strictly in temporal order.            *\n\
+*  For backward trajectories, the temporal order must be reversed.   *\n\
+*  In line #28 of this file, the name of the output file must be     *\n\
+*  indicated. Lines #29 and #30 must contain kind of trajectory and  *\n\
+*  the unit of the z coordinate to be used. Line #31 is arbitrary,   *\n\
+*  then follows a sequence of points.                                *\n\
+*  Kind of trajectory: 1 = 3 dimensional                             *\n\
+*                      2 = on model layers                           *\n\
+*                      3 = mixing layer                              *\n\
+*                      4 = isobaric                                  *\n\
+*                      5 = isentropic                                *\n\
+**********************************************************************\n\
+*                                                                    *\n\
+*  Unit of z coordinate: 1 = Meters above sea level                  *\n\
+*                        2 = Meters above ground                     *\n\
+*                        3 = Hectopascal                             *\n\
+*                                                                    *\n\
+*  For mixing layer trajectories (kind 3), the z coordinate must be  *\n\
+*  given in m.a.g.l. (option 2)                                      *\n\
+*                                                                    *\n\
+**********************************************************************\n";
+
+	string type,name,levUnit;
+	FLEXTRA_CHK(getParamValueId(type,in,"FLEXTRA_FLIGHT_TYPE",flightTypeIds_));
+	FLEXTRA_CHK(getParamValue(name,in,"FLEXTRA_FLIGHT_NAME"));
+	FLEXTRA_CHK(getParamValueId(levUnit,in,"FLEXTRA_FLIGHT_LEVEL_UNITS",flightLevelUnitsIds_));
+
+
+	vector<string> lat,lon,lev,startDate,startTime;	
+	FLEXTRA_CHK(getParamValue(lat,in,"FLEXTRA_FLIGHT_LATITUDES"));
+	FLEXTRA_CHK(getParamValue(lon,in,"FLEXTRA_FLIGHT_LONGITUDES"));
+	FLEXTRA_CHK(getParamValue(lev,in,"FLEXTRA_FLIGHT_LEVELS"));
+	FLEXTRA_CHK(getParamValue(startDate,in,"FLEXTRA_FLIGHT_STARTING_DATES"));
+	FLEXTRA_CHK(getParamValue(startTime,in,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+	
+	unsigned int cnt=lat.size();	
+	if(cnt ==0)
+	{
+		marslog(LOG_EROR,"No values specified for parameter FLEXTRA_FLIGHT_LATITUDES!");
+	 	setError(13);
+		return false; 
+	}
+	
+	string errTxt="Incosistent number of items specified for parameter: FLEXTRA_FLIGHT_";
+	if(lon.size() != cnt)
+		errTxt+="LONGITUDES!";
+	else if(lev.size() != cnt)
+		errTxt+="LEVELS!";  
+	else if(startDate.size() != cnt)
+		errTxt+="STARTING_DATES!";	
+	else if(startTime.size() != cnt)
+		errTxt+="STARTING_TIMES!";
+	
+	if(errTxt.find("!") != string::npos) 
+	{
+	  	marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return false; 
+	}
+		
+	out << name << endl;
+	out << type << endl;
+	out << levUnit << endl;	
+	out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+	for(unsigned int i=0; i < cnt; i++)
+	{	  
+		string tStr, dStr;
+	  	FLEXTRA_CHK(getDate(startDate[i],dStr,"FLEXTRA_FLIGHT_STARTING_DATES"));
+		FLEXTRA_CHK(getTime(startTime[i],tStr,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		
+		out << dStr << " " << tStr << endl;		
+		out << lon[i] << endl;
+		out << lat[i] << endl;
+		out << lev[i] << endl;
+		out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+	}
+
+	out.close();
+	
+	return true;
+}
+
+
+//---------------------------------------------------
+// Find out the time range the trajectories cover
+//---------------------------------------------------
+
+bool FlextraRun::getDateRange(MvDate& rangeStart,MvDate& rangeEnd,MvRequest& in)
+{
+	string str,dStr,tStr,trMode;
+	int lenSec;
+	MvDate startDate1,startDate2;
+	
+	//Find outrun mode. It is needed for the starting dates
+	FLEXTRA_CHK(getParamValueId(trMode,in,"FLEXTRA_RUN_MODE",modeIds_));
+		
+	FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_TRAJECTORY_LENGTH"));
+	FLEXTRA_CHK(getTimeLen(str,tStr,"FLEXTRA_TRAJECTORY_LENGTH",true));
+	istringstream iss(tStr);
+	iss >> lenSec;
+	
+
+	if(trMode != "3")
+	{
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_FIRST_STARTING_DATE"));
+		FLEXTRA_CHK(getDate(str,dStr,"FLEXTRA_FIRST_STARTING_DATE"));	
+				
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_FIRST_STARTING_TIME"));
+		FLEXTRA_CHK(getTime(str,tStr,"FLEXTRA_FIRST_STARTING_TIME"));
+		
+		if(!getMvDate(dStr,tStr,startDate1))
+			return false;  
+						
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_LAST_STARTING_DATE"));
+		FLEXTRA_CHK(getDate(str,dStr,"FLEXTRA_LAST_STARTING_DATE"));	
+			
+		FLEXTRA_CHK(getParamValue(str,in,"FLEXTRA_LAST_STARTING_TIME"));
+		FLEXTRA_CHK(getTime(str,tStr,"FLEXTRA_LAST_STARTING_TIME"));
+		
+		if(!getMvDate(dStr,tStr,startDate2))
+			return false;  
+				
+	}
+
+	//In FLIGHT mode the starting date,time and interval are disabled in the 
+	//user interface beause FLEXTRA does not use them for the trajectory 
+	//computations. However FLEXTRA does need a proper date here, otherwise it crashes.
+	//So we use the first date and time from the FLIGHT starting points here.
+	else
+	{
+	  	vector<string> startDate,startTime;		
+		FLEXTRA_CHK(getParamValue(startDate,in,"FLEXTRA_FLIGHT_STARTING_DATES"));
+		FLEXTRA_CHK(getParamValue(startTime,in,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		int cnt=startDate.size();
+		
+		if(cnt > 0 && static_cast<int>(startTime.size()) == cnt)
+		{
+			FLEXTRA_CHK(getDate(startDate[0],dStr,"FLEXTRA_FLIGHT_STARTING_DATES"));
+			FLEXTRA_CHK(getTime(startTime[0],tStr,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		  	
+			if(!getMvDate(dStr,tStr,startDate1))
+				return false;  			
+			
+			FLEXTRA_CHK(getDate(startDate[cnt-1],dStr,"FLEXTRA_FLIGHT_STARTING_DATES"));
+			FLEXTRA_CHK(getTime(startTime[cnt-1],tStr,"FLEXTRA_FLIGHT_STARTING_TIMES"));
+		  	
+			if(!getMvDate(dStr,tStr,startDate2))
+				return false;  
+		}	
+	}
+	
+	
+	rangeStart=startDate1;
+	rangeEnd=startDate2 + static_cast<double>(lenSec)/86400.;
+	
+	return true;
+}
+
+bool FlextraRun::getPredefInputPath(const string& rootPath,const MvDate& startDate,const MvDate& /*endDate*/,string &resDir)
+{
+	//Scan rootpath for FLEXTRA input directories   
+	DIR *dp;
+    	struct dirent *dirp;
+    	if((dp  = opendir(rootPath.c_str())) == NULL) 
+    	{
+        	marslog(LOG_EROR,"Failed to open directory: %s",rootPath.c_str());
+        	return false;
+    	}
+
+	vector<MvDate> dateVec;
+	vector<string> pathVec;
+
+    	string::size_type pos;
+    	while ((dirp = readdir(dp)) != NULL) 
+    	{
+		string name(dirp->d_name);
+		if(name.size() == 13 && (pos=name.find("_")) != string::npos )
+		{  
+		  	string s;
+			string sDate=name.substr(0,8);
+			string sTime=name.substr(9,4);
+		
+			s=sDate;
+			sDate=s.substr(0,4) + "-" + s.substr(4,2) + "-" + s.substr(6,2);
+			
+			s=sTime;
+			sTime=s.substr(0,2) + ":" + s.substr(2,4) + ":00";
+			
+			s=sDate + " " + sTime;
+
+			MvDate cDate(s.c_str());
+			
+			if(cDate <= startDate)
+			{
+			  	dateVec.push_back(cDate);
+				pathVec.push_back(name);
+			}	
+		}	
+	} 	
+
+   	closedir(dp);
+   
+	if(pathVec.size() > 0)
+	{
+	  	resDir=rootPath + "/" + pathVec.back();
+		return true;
+	}	
+	
+	return false;
+}  
+	
+
+void FlextraRun::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------FlextraRun::serve()--------------" << endl;
+  	in.print();
+
+	string errTxt;
+	
+	//Find out flextra script path
+	string flextraScript;
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate script mv_flextra_run!");
+		setError(13);
+		return;
+	}
+	else
+	{
+		flextraScript=string(mvbin) +"/mv_flextra_run";
+	}
+	
+
+	//Create  tmp dir for the flextra run
+	string tmpPath;
+	if(!metview::createWorkDir("flextra",tmpPath,errTxt))
+	{
+		marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return;
+	}
+	
+	//FlextraRun exe
+	string exe;	
+	if(!in.getPath("FLEXTRA_EXE_PATH",exe,true,errTxt))
+	{
+		marslog(LOG_EROR,"%s",errTxt.c_str());
+		setError(13);
+		return;
+	}	
+	if(exe.empty())
+	{
+	  	exe="_UNDEF_";
+	}	
+	
+			
+	//Genarate pathnames  file
+	string fPathnames=tmpPath + "/pathnames";
+	string optionsPath=tmpPath;
+	string outPath=tmpPath;
+	if(!generatePathnamesFile(fPathnames,in,optionsPath,outPath))
+	{
+	  	return;
+	}	
+	
+	//Generate COMMAND file
+	string fCmd=tmpPath + "/COMMAND";
+	if(!generateCommandFile(fCmd,in))
+	{
+	  	return;
+	}
+	
+	//Get FLEXTRA RUN MODE
+	string trMode;
+	getParamValueId(trMode,in,"FLEXTRA_RUN_MODE",modeIds_);	
+	
+	if(trMode  == "1")
+	{
+	  	string fStart=tmpPath + "/STARTPOINTS";
+		if(!generateStartPointsFile(fStart,in))
+		{
+		  	return;
+		}	
+	}
+	else if(trMode  == "2")
+	{
+	  	string fStart=tmpPath + "/STARTCET";
+		if(!generateStartCetFile(fStart,in))
+		{
+		  	return;
+		}	
+	}
+	else if(trMode  == "3")
+	{
+	  	string fStart=tmpPath + "/STARTFLIGHT";
+		if(!generateStartFlightFile(fStart,in))
+		{
+		  	return;
+		}	
+	}
+
+	//-----------------------
+	// Run FLEXTRA
+	//-----------------------
+	
+	//Find out the directory where the Flextra Run icon is located
+	/*string callerDir;
+	const char* callerIcon=in("_NAME");
+	if(callerIcon)
+	{
+	  	callerDir=string(callerIcon);
+	  	
+		char *mvudir=getenv("METVIEW_USER_DIRECTORY");
+		if(mvudir)  
+		{
+	  		callerDir=string(mvudir) + "/" + callerDir;
+		}	
+	  	
+	  	string::size_type pos=callerDir.find_last_of("/");
+	 	if(pos != string::npos)
+		{
+		 	callerDir=callerDir.substr(0,pos);
+		}	
+	}
+	  
+	//Set the output path where the resulting files will be coupied
+	string userOutPath;
+	if(!getParamValue(userOutPath,in,"OUTPUT_PATH") || userOutPath.empty())
+	{
+	  	marslog(LOG_EROR,"No parameter OUTPUT_PATH is defined!");
+		setError(13);	
+		return;
+	}
+	
+	if(userOutPath == "CURRENT_FOLDER")
+	{
+	  	if(callerDir.empty()) 
+		{
+		  	marslog(LOG_EROR,"Could not set OUTPUT_PATH properly to \"CURRENT_DIR\"!");
+			setError(13);	
+			return;
+		}  		  
+		userOutPath=callerDir;		  
+	}  
+	*/
+
+	string trModeName;
+	if(trMode  == "1")
+		trModeName="NORMAL";
+	if(trMode  == "2")
+		trModeName="CET";
+	if(trMode  == "3")
+		trModeName="FLIGHT";
+
+	string resFileName="res.txt";
+	string logFileName="log.txt";
+	
+	//Run the flextra script
+	string cmd = flextraScript + " \"" + tmpPath + "\" \"" + exe + "\" \"" + trModeName + "\" \"" + resFileName + "\" \"" + logFileName + "\""; 
+
+	//marslog(LOG_INFO,"Execute command: %s",cmd.c_str());
+	cout << "Execute command: " << cmd << endl;
+	
+	int ret=system(cmd.c_str());	
+	
+	//If the script failed read log file and
+	//write it into LOG_EROR
+	if(ret == -1 || WEXITSTATUS(ret) != 0)
+	{
+		string logFile=tmpPath + "/" + logFileName;		
+		ifstream in(logFile.c_str());
+		string line;
+
+		if(WEXITSTATUS(ret) == 255)
+		{
+		  	marslog(LOG_WARN,"Warnings generated during FLEXTRA run!");
+			while(getline(in,line))
+			{
+				marslog(LOG_WARN,"%s",line.c_str());
+			}
+			in.close();
+			//setError(13);
+		}  		
+		else if(WEXITSTATUS(ret) == 1)
+		{		
+			marslog(LOG_EROR,"Failed to perform FLEXTRA run!");
+			while(getline(in,line))
+			{
+				marslog(LOG_EROR,"%s",line.c_str());
+			}
+			in.close();
+			setError(13);
+			return;
+		}
+		else if(WEXITSTATUS(ret) > 1)
+		{		
+			marslog(LOG_EROR,"FLEXTRA run failed with exit code: %d !",WEXITSTATUS(ret));
+			while(getline(in,line))
+			{
+				marslog(LOG_EROR,"%s",line.c_str());
+			}
+			in.close();
+			setError(13);
+			return;
+		}
+		
+	}
+	
+	string resFile= tmpPath + "/" + resFileName;
+		
+	out=MvRequest("FLEXTRA_FILE");
+	out("PATH")=resFile.c_str();
+	
+	out.print();	
+}
+
+  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv,"FlextraRun");
+
+    	FlextraRun flextraRun;	
+	
+    	theApp.run();
+}
+
+
diff --git a/src/Flextra/FlextraRunDef b/src/Flextra/FlextraRunDef
new file mode 100644
index 0000000..07ab079
--- /dev/null
+++ b/src/Flextra/FlextraRunDef
@@ -0,0 +1,273 @@
+
+FLEXTRA_RUN; Flextra_run; experimental
+{
+	FLEXTRA_EXE_PATH
+        {
+                @
+        } = ''
+
+	FLEXTRA_INPUT_MODE [interface = option_menu ]
+	{
+		ICON  ; ICON 
+                PATH ; PATH
+	} = ICON 	
+
+	FLEXTRA_INPUT_DATA
+		[ interface = icon, class = FLEXTRA_INPUT, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	FLEXTRA_INPUT_PATH
+	{
+		@
+	}  = ''
+
+	FLEXTRA_AVAILABLE_FILE_PATH
+	{
+		@
+	}  = 'SAME_AS_INPUT_PATH'
+
+	FLEXTRA_RUN_LABEL
+	{
+		@	
+	} = 'FLEXTRA RUN'
+
+	FLEXTRA_RUN_MODE [interface = option_menu ]
+	{
+		NORMAL  ; NORMAL 
+                CET ; CET
+		FLIGHT ; FLIGHT
+	} = NORMAL
+
+	FLEXTRA_TRAJECTORY_DIRECTION [interface = option_menu ]
+	{
+		FORWARD  ; FORWARD 
+                BACKWARD ; BACKWARD
+	} = FORWARD	
+
+	FLEXTRA_TRAJECTORY_LENGTH
+	{
+	  @
+	} = '48'
+
+	FLEXTRA_FIRST_STARTING_DATE
+	{
+	  @
+	} =''
+
+	FLEXTRA_FIRST_STARTING_TIME
+	{
+	  @
+	} =''
+
+	FLEXTRA_LAST_STARTING_DATE
+	{
+	  @
+	} =''
+
+	FLEXTRA_LAST_STARTING_TIME
+	{
+	  @
+	} =''	
+
+	FLEXTRA_STARTING_TIME_INTERVAL
+	{
+	  @
+	} ='6'	
+
+	FLEXTRA_OUTPUT_INTERVAL_MODE [interface = option_menu ]
+	{
+		ORIGINAL  ; ORIGINAL 
+                INTERVAL ; INTERVAL
+		BOTH ; BOTH
+	} = INTERVAL
+
+	FLEXTRA_OUTPUT_INTERVAL_VALUE
+	{
+	  	@
+	} = '3'
+
+	FLEXTRA_NORMAL_TYPES
+	{ 		
+		/
+		*
+	} 
+
+	FLEXTRA_NORMAL_NAMES 
+	{ 
+		/
+		@ 
+	}
+	FLEXTRA_NORMAL_LATITUDES
+	{
+		/
+		*
+	}
+	FLEXTRA_NORMAL_LONGITUDES
+	{	
+		/
+		*
+	}
+	FLEXTRA_NORMAL_LEVELS
+	{
+		/
+		*
+	}
+	FLEXTRA_NORMAL_LEVEL_UNITS
+	{ 
+		/
+		*
+	}
+	
+	FLEXTRA_CET_TYPE [interface = option_menu ]
+	{
+		3D  ; 3D 
+                MODEL LEVEL ; MODEL LEVEL
+		ISOBARIC ; ISOBARIC
+		ISENTROPIC ; ISENTROPIC
+	} = 3D
+
+	FLEXTRA_CET_NAME 
+	{ 
+		@ 
+	} = ''
+
+	FLEXTRA_CET_AREA 
+        [
+                help = help_input,
+                help_icon = 'help_map',
+                input_type = map,
+                input_window = '/Metview/Defaults/Input Window'
+        ]
+  	{
+                *
+                /
+        } = -90./-180./90./180
+
+	FLEXTRA_CET_DX 
+	{
+		*
+	}
+	FLEXTRA_CET_DY 
+	{
+		*
+	}
+	FLEXTRA_CET_TOP_LEVEL 
+	{
+		*
+	}
+	FLEXTRA_CET_BOTTOM_LEVEL
+	{
+		*
+	}
+	FLEXTRA_CET_DZ
+	{
+		*
+	}
+	FLEXTRA_CET_LEVEL_UNITS {
+		METRES ASL ; METRES ASL 
+                METRES AGL ; METRES AGL
+		HPA ; HPA
+	} = HPA
+
+
+	FLEXTRA_FLIGHT_TYPE [interface = option_menu ]
+	{
+		3D  ; 3D 
+                MODEL LEVEL ; MODEL LEVEL
+		ISOBARIC ; ISOBARIC
+		ISENTROPIC ; ISENTROPIC
+	} = 3D
+
+	FLEXTRA_FLIGHT_NAME 
+	{ 
+		@ 
+	} = ''
+
+	FLEXTRA_FLIGHT_LATITUDES
+	{
+		/
+		*
+	}
+	FLEXTRA_FLIGHT_LONGITUDES
+	{	
+		/
+		*
+	}
+	FLEXTRA_FLIGHT_LEVELS
+	{
+		/
+		*
+	}
+	
+	FLEXTRA_FLIGHT_LEVEL_UNITS {
+		METRES ASL ; METRES ASL 
+                METRES AGL ; METRES AGL
+		HPA ; HPA
+	} = HPA
+
+	FLEXTRA_FLIGHT_STARTING_DATES
+	{
+		/
+		@
+	}
+
+	FLEXTRA_FLIGHT_STARTING_TIMES
+	{
+		/
+		@
+	}
+
+	FLEXTRA_INTERPOLATION_TYPE {
+		@
+	} = '1'
+
+	FLEXTRA_CFL_SPATIAL
+	{
+		*
+	} = 2.0
+
+	FLEXTRA_CFL_TEMPORAL
+	{
+		*
+	} = 2.0
+
+	FLEXTRA_UNCERTAINTY_TRAJECTORIES [interface = option_menu ]
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	FLEXTRA_UNCERTAINTY_TRAJECTORY_NUMBER
+	{
+		*
+	} = 0
+
+	FLEXTRA_UNCERTAINTY_TRAJECTORY_DISTANCE 
+	{
+		*
+	} = 0.5
+	
+	FLEXTRA_UNCERTAINTY_TRAJECTORY_TIME_CONSTANT
+	{
+		*
+	} = 2.0
+ 	
+	FLEXTRA_U_RANDOM_ERROR
+	{
+		*
+	} = 0.08
+	 
+	FLEXTRA_V_RANDOM_ERROR
+	{
+		*
+	} = 0.08
+
+	FLEXTRA_W_RANDOM_ERROR
+	{
+		*
+	} = 0.08
+
+}
diff --git a/src/Flextra/FlextraRunRules b/src/Flextra/FlextraRunRules
new file mode 100644
index 0000000..c813702
--- /dev/null
+++ b/src/Flextra/FlextraRunRules
@@ -0,0 +1,78 @@
+%if FLEXTRA_INPUT_MODE  = ICON %then 
+		%unset FLEXTRA_INPUT_PATH
+		%unset FLEXTRA_AVAILABLE_FILE_PATH
+
+%if FLEXTRA_INPUT_MODE  = PATH %then 
+		%unset FLEXTRA_INPUT_DATA
+
+%if FLEXTRA_UNCERTAINTY_TRAJECTORIES = OFF %then
+		%unset FLEXTRA_UNCERTAINTY_TRAJECTORY_NUMBER
+		%unset FLEXTRA_UNCERTAINTY_TRAJECTORY_DISTANCE 	
+		%unset FLEXTRA_UNCERTAINTY_TRAJECTORY_TIME_CONSTANT	
+		%unset FLEXTRA_U_RANDOM_ERROR	
+		%unset FLEXTRA_V_RANDOM_ERROR	
+		%unset FLEXTRA_W_RANDOM_ERROR
+
+%if FLEXTRA_RUN_MODE = NORMAL %then 
+ 		%unset FLEXTRA_CET_TYPE
+		%unset FLEXTRA_CET_NAME
+                %unset FLEXTRA_CET_AREA
+		%unset FLEXTRA_CET_DX
+		%unset FLEXTRA_CET_DY
+		%unset FLEXTRA_CET_TOP_LEVEL
+		%unset FLEXTRA_CET_BOTTOM_LEVEL
+		%unset FLEXTRA_CET_DZ
+		%unset FLEXTRA_CET_LEVEL_UNITS
+		%unset FLEXTRA_FLIGHT_TYPE
+		%unset FLEXTRA_FLIGHT_NAME
+		%unset FLEXTRA_FLIGHT_LATITUDES
+		%unset FLEXTRA_FLIGHT_LONGITUDES
+		%unset FLEXTRA_FLIGHT_LEVELS
+		%unset FLEXTRA_FLIGHT_LEVEL_UNITS
+		%unset FLEXTRA_FLIGHT_STARTING_DATES
+		%unset FLEXTRA_FLIGHT_STARTING_TIMES
+
+%if FLEXTRA_RUN_MODE = CET %then 
+ 		%unset FLEXTRA_NORMAL_TYPES
+		%unset FLEXTRA_NORMAL_NAMES
+                %unset FLEXTRA_NORMAL_LATITUDES
+		%unset FLEXTRA_NORMAL_LONGITUDES
+		%unset FLEXTRA_NORMAL_LEVELS
+		%unset FLEXTRA_NORMAL_LEVEL_UNITS
+		%unset FLEXTRA_FLIGHT_TYPE
+		%unset FLEXTRA_FLIGHT_NAME
+		%unset FLEXTRA_FLIGHT_LATITUDES
+		%unset FLEXTRA_FLIGHT_LONGITUDES
+		%unset FLEXTRA_FLIGHT_LEVELS
+		%unset FLEXTRA_FLIGHT_LEVEL_UNITS
+		%unset FLEXTRA_FLIGHT_STARTING_DATES
+		%unset FLEXTRA_FLIGHT_STARTING_TIMES
+		%unset FLEXTRA_UNCERTAINTY_TRAJECTORIES
+
+%if FLEXTRA_RUN_MODE = FLIGHT %then 
+		%unset FLEXTRA_FIRST_STARTING_DATE	
+		%unset FLEXTRA_FIRST_STARTING_TIME
+		%unset FLEXTRA_LAST_STARTING_DATE	
+		%unset FLEXTRA_LAST_STARTING_TIME	
+		%unset FLEXTRA_STARTING_TIME_INTERVAL
+ 		%unset FLEXTRA_CET_TYPE
+		%unset FLEXTRA_CET_NAME
+                %unset FLEXTRA_CET_AREA
+		%unset FLEXTRA_CET_DX
+		%unset FLEXTRA_CET_DY
+		%unset FLEXTRA_CET_TOP_LEVEL
+		%unset FLEXTRA_CET_BOTTOM_LEVEL
+		%unset FLEXTRA_CET_DZ
+		%unset FLEXTRA_CET_LEVEL_UNITS
+		%unset FLEXTRA_NORMAL_TYPES
+		%unset FLEXTRA_NORMAL_NAMES
+                %unset FLEXTRA_NORMAL_LATITUDES
+		%unset FLEXTRA_NORMAL_LONGITUDES
+		%unset FLEXTRA_NORMAL_LEVELS
+		%unset FLEXTRA_NORMAL_LEVEL_UNITS
+		%unset FLEXTRA_UNCERTAINTY_TRAJECTORIES
+
+%if FLEXTRA_OUTPUT_INTERVAL_MODE = ORIGINAL %then
+		%unset FLEXTRA_OUTPUT_INTERVAL_VALUE
+
+	
\ No newline at end of file
diff --git a/src/Flextra/FlextraVisualiser.cc b/src/Flextra/FlextraVisualiser.cc
new file mode 100644
index 0000000..2ba0f1c
--- /dev/null
+++ b/src/Flextra/FlextraVisualiser.cc
@@ -0,0 +1,463 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+
+#include "MvFlextra.h"
+
+#include <iostream>
+#include <stdexcept>
+#include <fstream>
+
+using namespace std;
+
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+
+class FlextraVisualiser: public Base {	
+public:
+	FlextraVisualiser(char* a) : Base(a) {};
+	void serve(MvRequest&,MvRequest&);	
+};
+
+void FlextraVisualiser::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------FlextraVisualiser::serve()--------------" << endl;
+  	in.print();
+		
+	MvRequest inR=in;
+	string inFile;		
+	string verb=in.getVerb();
+
+	//------------------------------------------
+	// Find out the input filename
+	//------------------------------------------	
+	
+	MvRequest dataR=inR("FLEXTRA_DATA");
+	const char* iconType=dataR.getVerb();
+	
+	//If no icon is specified
+	if(!iconType)
+	{
+		//If no path is there either
+		const char *path=inR("FLEXTRA_FILENAME");
+		if(!path || strcmp(path,"OFF") == 0)
+		{
+			marslog(LOG_EROR,"No data icon or path is specified!");
+			setError(13);
+			return;
+		}
+		else
+		{
+		  	inFile=string(path);
+		}
+	}
+	else
+	{
+	  	const char *path=dataR("PATH");
+		if(!path)
+		{
+			marslog(LOG_EROR,"No path is specified for FLEXTRA_FILE icon!");
+			setError(13);
+			return;
+		}
+		
+		inFile=string(path);
+	}
+	
+
+	const char *plot_type=inR("FLEXTRA_PLOT_TYPE");
+	if(!plot_type)
+	{
+	  	marslog(LOG_EROR,"No parameter FLEXTRA_PLOT_TYPE is specified!");
+		setError(13);
+		return;
+	}	
+
+	const char *plot_mode=inR("FLEXTRA_PLOT_CONTENT");
+	if(!plot_mode)
+	{
+	  	marslog(LOG_EROR,"No parameter FLEXTRA_PLOT_MODE is specified!");
+		setError(13);
+		return;
+	}	
+
+
+	//----------------------------------
+	// Decode
+	//----------------------------------
+	
+	MvFlextra flextra(inFile);
+	
+	int blockNum=flextra.blockNum();
+	
+	if(blockNum == 0)
+	{
+	  	marslog(LOG_EROR,"No trajectories were found in input file!");
+		setError(13);
+		return;
+	}	
+	
+	//----------------------------------
+	// Select block
+	//----------------------------------
+	
+	MvFlextraBlock *data=0;	
+	const char *blockIdChar=inR("FLEXTRA_GROUP_INDEX");
+	if(blockIdChar)
+	{
+		int blockId=atoi(blockIdChar)-1;
+		if(blockId >= 0 && blockId < blockNum)
+		{
+			data=flextra.blocks().at(blockId);	
+		}
+		else
+		{
+			marslog(LOG_EROR,"Could not find the specified block (%d) in trajectory file!",blockId+1);
+			setError(13);
+			return;	
+		}
+	}
+	else
+	{
+	  	marslog(LOG_EROR,"No parameter FLEXTRA_GROUP_INDEX is specified!");
+		setError(13);
+		return;	
+	}  
+	  
+  	//----------------------------------
+	// Check trajectory num
+	//----------------------------------
+  	
+	int trNum=data->itemNum();
+	if(trNum == 0)
+	{
+	  	marslog(LOG_EROR,"No trajectories were found in selected block!");
+		setError(13);
+		return;
+	}	
+		
+	//----------------------------------
+	// Points file
+	//----------------------------------	
+	
+	string outFilePoints(marstmp());
+	int metaDataCntPoints=0;
+
+	//data->writeAll(outFilePoints,metaDataCntPoints);
+				
+	//Requests
+	
+	if(strcmp(plot_type,"GEO_POINTS") == 0)
+	{  		
+	  	if(strcmp(plot_mode,"TRAJECTORY") == 0)
+		{  	  
+			data->writeAll(outFilePoints,metaDataCntPoints);
+		  
+		  	MvRequest req("TABLE_GEO_POINTS");
+			req("TABLE_PLOT_TYPE")="GEO_POINTS";	
+			req("TABLE_FILENAME")=outFilePoints.c_str();
+			req("TABLE_VARIABLE_IDENTIFIER_TYPE")="INDEX";
+			req("TABLE_LONGITUDE_VARIABLE")=4;
+			req("TABLE_LATITUDE_VARIABLE")=5;
+			req("TABLE_VALUE_VARIABLE")=1;
+			req("TABLE_DELIMITER")=",";
+			req("TABLE_COMBINE_DELIMITERS")="OFF";
+			req("TABLE_HEADER_ROW") = 0;
+			req("TABLE_DATA_ROW_OFFSET") =  metaDataCntPoints+1;//3;
+			
+			for(int i=0; i < metaDataCntPoints; i++)
+			{
+				req.addValue("TABLE_META_DATA_ROWS",i+1);	
+			}	
+					
+			out=req;
+			
+    			MvRequest vdef("MSYMB");
+			vdef("LEGEND") = "ON";
+			vdef("SYMBOL_TYPE") = "MARKER";
+			vdef("SYMBOL_TABLE_MODE") = "ADVANCED";
+			vdef("SYMBOL_ADVANCED_TABLE_SELECTION_TYPE") = "INTERVAL";
+			vdef("SYMBOL_ADVANCED_TABLE_MIN_VALUE") = 1;
+			vdef("SYMBOL_ADVANCED_TABLE_MAX_VALUE") = trNum+1; //!!
+			vdef("SYMBOL_ADVANCED_TABLE_INTERVAL") = 1;
+
+			for(int i=0; i < 9; i++)
+			{
+				vdef.addValue("SYMBOL_ADVANCED_TABLE_MARKER_LIST",i);	
+			}	
+					
+			vdef("SYMBOL_ADVANCED_TABLE_HEIGHT_LIST") = 0.3;	
+    			vdef("SYMBOL_CONNECT_LINE") = "ON";
+			vdef("SYMBOL_CONNECT_AUTOMATIC_LINE_COLOUR") = "ON";
+			vdef("SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION") = "CLOCKWISE";	
+			vdef("_CLASS")="MSYMB";
+			vdef("_NAME")="MSYMB0";
+
+			out=out+vdef;
+		}
+		else if(strcmp(plot_mode,"LABEL") == 0)
+		{			
+			vector<string> labels;
+			data->writeLabels(outFilePoints,metaDataCntPoints,"6h",labels);
+						
+			MvRequest req("TABLE_GEO_POINTS");
+			req("TABLE_PLOT_TYPE")="GEO_POINTS";	
+			req("TABLE_FILENAME")=outFilePoints.c_str();
+			req("TABLE_VARIABLE_IDENTIFIER_TYPE")="INDEX";
+			req("TABLE_LONGITUDE_VARIABLE")=3;
+			req("TABLE_LATITUDE_VARIABLE")=4;
+			req("TABLE_VALUE_VARIABLE")="";
+			req("TABLE_DELIMITER")=",";
+			req("TABLE_COMBINE_DELIMITERS")="OFF";
+			req("TABLE_HEADER_ROW") = 0;
+			req("TABLE_DATA_ROW_OFFSET") =  metaDataCntPoints+1;//3;
+			
+			for(int i=0; i < metaDataCntPoints; i++)
+			{
+				req.addValue("TABLE_META_DATA_ROWS",i+1);	
+			}	
+					
+			out=req;
+			
+    			MvRequest vdef("MSYMB");
+			vdef("LEGEND") = "OFF";
+			//vdef("SYMBOL_TYPE") = "NUMBER";
+			//vdef("FORMAT") = "(F4.2)";
+			//vdef("_CLASS")="MSYMB";
+			//vdef("_NAME")="MSYMB0";
+			
+			vdef("SYMBOL_TYPE") = "TEXT";
+			vdef("SYMBOL_TABLE_MODE") = "ADVANCED";
+			/*vdef("SYMBOL_ADVANCED_TABLE_SELECTION_TYPE") = "INTERVAL";
+			vdef("SYMBOL_ADVANCED_TABLE_MIN_VALUE") = 1;
+			vdef("SYMBOL_ADVANCED_TABLE_MAX_VALUE") = trNum+1; //!!
+			vdef("SYMBOL_ADVANCED_TABLE_INTERVAL") = 1;*/
+			
+			for(int i=0; i < static_cast<int>(labels.size()); i++)
+			{
+				vdef.addValue("SYMBOL_ADVANCED_TABLE_TEXT_LIST",labels[i].c_str());	
+			}	
+					
+			vdef("SYMBOL_ADVANCED_TABLE_TEXT_HEIGHT") = 0.3;
+			vdef("SYMBOL_ADVANCED_TABLE_TEXT_HEIGHT") = 0.3;
+			 			
+			vdef("SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION") = "CLOCKWISE";	
+			vdef("_CLASS")="MSYMB";
+			vdef("_NAME")="MSYMB0";
+
+			out=out+vdef;
+		  
+		  	/*const char *period=inR("FLEXTRA_LABEL_PERIOD");
+	  		string periodStr(period);	
+		
+			string outFileLabels(marstmp());
+			int metaDataCnt=0;
+
+			data->writeLabels(outFileLabels,metaDataCnt,period);
+	
+			
+			MvRequest req("TABLE_GEO_POINTS");
+			req("TABLE_PLOT_TYPE")="GEO_POINTS";	
+			req("TABLE_FILENAME")=outFileLabels.c_str();
+			req("TABLE_VARIABLE_IDENTIFIER_TYPE")="INDEX";
+			req("TABLE_LONGITUDE_VARIABLE")=3;
+			req("TABLE_LATITUDE_VARIABLE")=4;
+			req("TABLE_VALUE_VARIABLE")=1;
+			req("TABLE_DELIMITER")=",";
+			req("TABLE_COMBINE_DELIMITERS")="OFF";
+			req("TABLE_HEADER_ROW") = 0;
+			req("TABLE_DATA_ROW_OFFSET") =  metaDataCnt+1;//3;
+				
+			out=req;		
+			
+			
+			
+			
+			MvRequest vdef("MSYMB");
+			vdef("LEGEND") = "OFF";
+			vdef("SYMBOL_TYPE") = "NUMBER";
+				
+			out=out+vdef;*/	
+		}
+		
+		out("_VERB")="TABLE_GEO_POINTS";	
+	}
+	
+	else if(strcmp(plot_type,"XY_POINTS") == 0)
+	{  
+		const char *x_var=inR("FLEXTRA_X_VARIABLE");
+		const char *y_var=inR("FLEXTRA_Y_VARIABLE");
+		
+		if(!x_var || !y_var)
+		{
+		  	setError(13);
+			return;
+		}		
+		
+		
+		if(strcmp(plot_mode,"TRAJECTORY") == 0)
+		{  		
+			data->writeAll(outFilePoints,metaDataCntPoints);
+			
+			map<string,int> parId;
+			parId["DATE"]=2;
+			parId["LATITUDE"]=4;
+			parId["LONGITUDE"]=5;		
+			parId["ETA"]=6;
+			parId["PRESSURE"]=7;
+			parId["HEIGHT"]=8;
+			parId["HEIGHT_AGL"]=9;
+			parId["PV"]=10;	
+			
+			MvRequest req("TABLE_XY_POINTS");
+			req("TABLE_PLOT_TYPE")="XY_POINTS";	
+			req("TABLE_FILENAME")=outFilePoints.c_str();
+			req("TABLE_VARIABLE_IDENTIFIER_TYPE")="INDEX";
+			
+			if(strcmp(x_var,"DATE") == 0)
+			{
+			  	req("TABLE_X_TYPE")="DATE";
+			}			
+			req("TABLE_X_VARIABLE")=parId[string(x_var)];
+			
+			if(strcmp(y_var,"DATE") == 0)
+			{
+			  	req("TABLE_Y_TYPE")="DATE";
+			}			
+			req("TABLE_Y_VARIABLE")=parId[string(y_var)];
+			
+			req("TABLE_VALUE_VARIABLE")="1";
+			req("TABLE_DELIMITER")=",";
+			req("TABLE_COMBINE_DELIMITERS")="OFF";
+			req("TABLE_HEADER_ROW") = 0;
+			req("TABLE_DATA_ROW_OFFSET") =  metaDataCntPoints+1;
+			for(int i=0; i < metaDataCntPoints; i++)
+			{
+				req.addValue("TABLE_META_DATA_ROWS",i+1);	
+			}		
+		
+			out=req;
+		
+			MvRequest vdef("MSYMB");
+			vdef("LEGEND") = "ON";
+			vdef("SYMBOL_TYPE") = "MARKER";
+			vdef("SYMBOL_TABLE_MODE") = "ADVANCED";
+			vdef("SYMBOL_ADVANCED_TABLE_SELECTION_TYPE") = "INTERVAL";
+			vdef("SYMBOL_ADVANCED_TABLE_MIN_VALUE") = 1;
+			vdef("SYMBOL_ADVANCED_TABLE_MAX_VALUE") = trNum+1; //!!
+			vdef("SYMBOL_ADVANCED_TABLE_INTERVAL") = 1;
+
+			for(int i=0; i < 9; i++)
+			{
+				vdef.addValue("SYMBOL_ADVANCED_TABLE_MARKER_LIST",i);	
+			}	
+					
+			vdef("SYMBOL_ADVANCED_TABLE_HEIGHT_LIST") = 0.3;	
+    			vdef("SYMBOL_CONNECT_LINE") = "ON";
+			vdef("SYMBOL_CONNECT_AUTOMATIC_LINE_COLOUR") = "ON";
+			vdef("SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION") = "CLOCKWISE";	
+			vdef("_CLASS")="MSYMB";
+			vdef("_NAME")="MSYMB0";
+			
+			out=out+vdef;
+			
+			/*MvRequest vdef("MGRAPH");
+			vdef("LEGEND") = "ON";
+			vdef("GRAPH_LINE") = "ON";
+			out=out+vdef;*/
+		}	
+		
+		out("_VERB")="TABLE_XY_POINTS";	
+	}
+
+	//----------------------------------
+	// Symbol highlight
+	//----------------------------------	
+
+	/*const char *highlight=in("FLEXTRA_SYMBOL_HIGHLIGHT");
+	
+	if(highlight && strcmp(highlight,"ON") == 0)
+	{  
+	  	const char *period=inR("FLEXTRA_SYMBOL_HIGHLIGHT_PERIOD");
+	  	string periodStr(period);	  	
+	 
+	  	string outFileHighlight(marstmp());
+		int metaDataCnt=0;
+
+		data->writeHighlightPoints(outFileHighlight,metaDataCnt,periodStr);
+	
+		//Requests
+
+		if(strcmp(plot_type,"GEO_POINTS") == 0)
+		{	  		
+			MvRequest req("TABLE_GEO_POINTS");
+			req("TABLE_PLOT_TYPE")="GEO_POINTS";	
+			req("TABLE_FILENAME")=outFileHighlight.c_str();
+			req("TABLE_VARIABLE_IDENTIFIER_TYPE")="INDEX";
+			req("TABLE_LONGITUDE_VARIABLE")=3;
+			req("TABLE_LATITUDE_VARIABLE")=4;
+			req("TABLE_VALUE_VARIABLE")=1;
+			req("TABLE_DELIMITER")=",";
+			req("TABLE_COMBINE_DELIMITERS")="OFF";
+			req("TABLE_HEADER_ROW") = 0;
+			req("TABLE_DATA_ROW_OFFSET") =  metaDataCnt+1;//3;
+			
+			
+			MvRequest vdef("MSYMB");
+			//vdef("LEGEND") = "ON";
+			vdef("SYMBOL_TYPE") = "MARKER";
+			vdef("SYMBOL_TABLE_MODE") = "ADVANCED";
+			//vdef("SYMBOL_OUTLINE") = "ON";
+			vdef("SYMBOL_ADVANCED_TABLE_SELECTION_TYPE") = "INTERVAL";
+			vdef("SYMBOL_ADVANCED_TABLE_MIN_VALUE") = 1;
+			vdef("SYMBOL_ADVANCED_TABLE_MAX_VALUE") = trNum+1;
+			vdef("SYMBOL_ADVANCED_TABLE_INTERVAL") = 1;
+			for(int i=0; i < 9; i++)
+			{
+				vdef.addValue("SYMBOL_ADVANCED_TABLE_MARKER_LIST",i);	
+			}	
+		
+			//vdef("SYMBOL_ADVANCED_TABLE_MARKER_LIST") = 15;				
+			vdef("SYMBOL_ADVANCED_TABLE_HEIGHT_LIST") = 0.6;
+			vdef("SYMBOL_ADVANCED_TABLE_COLOUR_DIRECTION") = "CLOCKWISE";
+		
+			out=out+req;
+			out=out+vdef;
+		}
+	}		
+	*/
+	
+	MvRequest legReq("MLEGEND");
+	legReq("LEGEND_DISPLAY_TYPE")="DISJOINT";
+	
+	out=out+legReq;
+	
+	out.print();
+	
+	
+	//system(cmd.c_str());
+
+}
+
+	  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv );
+
+	FlextraVisualiser flextra("FLEXTRA_VISUALISER");
+	
+    	theApp.run();
+}
+
+
diff --git a/src/Flextra/FlextraVisualiserDef b/src/Flextra/FlextraVisualiserDef
new file mode 100644
index 0000000..6915c67
--- /dev/null
+++ b/src/Flextra/FlextraVisualiserDef
@@ -0,0 +1,80 @@
+FLEXTRA_VISUALISER; Flextra Visualiser
+{
+	FLEXTRA_PLOT_TYPE [interface = option_menu ] 
+	{
+		GEO_POINTS	; GEO_POINTS	
+     		XY_POINTS 	; XY_POINTS
+	}=GEO_POINTS
+
+	FLEXTRA_PLOT_CONTENT [interface = option_menu ] 
+	{	
+		TRAJECTORY ; TRAJECTORY
+		LABEL ; LABEL
+	} = TRAJECTORY
+
+
+	FLEXTRA_FILENAME
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	FLEXTRA_DATA
+		[ interface = icon, class = FLEXTRA_FILE, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	FLEXTRA_GROUP_INDEX
+	{
+		*
+	} = 1
+
+	FLEXTRA_X_VARIABLE [interface = option_menu ] 
+	{
+		DATE ; DATE
+		LATITUDE ; LATITUDE
+		LONGITUDE ; LONGITUDE
+		ETA ; ETA
+		PRESSURE ; PRESSURE
+		HEIGHT ; HEIGHT
+		HEIGHT_AGL ; HEGHT_AGL
+		PV ; PV
+		THETA ; THETA	
+	} = DATE
+
+	FLEXTRA_Y_VARIABLE [interface = option_menu ] 
+	{
+		DATE ; DATE
+		LATITUDE ; LATITUDE
+		LONGITUDE ; LONGITUDE
+		ETA ; ETA
+		PRESSURE ; PRESSURE
+		HEIGHT ; HEIGHT
+		HEIGHT_AGL ; HEGHT_AGL
+		PV ; PV
+		THETA ; THETA	
+	} = PRESSURE
+
+	FLEXTRA_LABEL_VARIABLE 
+	{	
+	     TIME ; TIME
+	     LATITUDE ; LATITUDE
+	     LONGITUDE ; LONGITUDE
+	     ETA ; ETA
+	     PRESSURE ; PRESSURE
+	     HEIGHT ; HEIGHT
+             HEIGHT_AGL ; HEGHT_AGL
+	     PV ; PV
+             THETA ; THETA	
+        } = TIME
+
+	FLEXTRA_LABEL_PERIOD 
+	{	
+              6h ; 6h
+             12h ;  12h
+	     24h ; 24h
+	     48h ; 48h		
+        } = 12h
+}
diff --git a/src/Flextra/FlextraVisualiserRules b/src/Flextra/FlextraVisualiserRules
new file mode 100644
index 0000000..e921376
--- /dev/null
+++ b/src/Flextra/FlextraVisualiserRules
@@ -0,0 +1,8 @@
+%if FLEXTRA_PLOT_TYPE = GEO_POINTS %then			
+	%unset FLEXTRA_X_VARIABLE
+	%unset FLEXTRA_Y_VARIABLE
+
+%if FLEXTRA_PLOT_CONTENT = TRAJECTORY %then			
+	%unset FLEXTRA_LABEL_VARIABLE
+	%unset FLEXTRA_LABEL_PERIOD
+
diff --git a/src/Flextra/Makefile.am b/src/Flextra/Makefile.am
new file mode 100644
index 0000000..a798330
--- /dev/null
+++ b/src/Flextra/Makefile.am
@@ -0,0 +1,82 @@
+
+bin_PROGRAMS      = bin/FlextraPrepare  bin/FlextraRun bin/FlextraVisualiser \
+	  	    bin/FlexpartRun bin/FlexpartToGrib
+
+#-------------------------------------------------
+
+bin_FlextraPrepare_SOURCES = FlextraPrepare.cc
+	
+bin_FlextraPrepare_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlextraPrepare_LDFLAGS  = 
+bin_FlextraPrepare_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+
+bin_FlextraRun_SOURCES = FlextraRun.cc
+	
+bin_FlextraRun_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlextraRun_LDFLAGS  = 
+bin_FlextraRun_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+
+#-------------------------------------------------
+
+bin_FlextraVisualiser_SOURCES = FlextraVisualiser.cc
+	
+bin_FlextraVisualiser_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlextraVisualiser_LDFLAGS  = 
+bin_FlextraVisualiser_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+
+bin_FlexpartRun_SOURCES = FlexpartRun.cc
+	
+bin_FlexpartRun_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlexpartRun_LDFLAGS  = 
+bin_FlexpartRun_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+
+bin_FlexpartToGrib_SOURCES = FlexpartToGrib.cc
+	
+bin_FlexpartToGrib_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlexpartToGrib_LDFLAGS  = 
+bin_FlexpartToGrib_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Flextra \
+	     $(local_sharedir)/FlextraPrepareDef  $(local_sharedir)/FlextraPrepareRules \
+	     $(local_sharedir)/FlextraRunDef  $(local_sharedir)/FlextraRunRules \
+	     $(local_sharedir)/FlextraVisualiserDef  $(local_sharedir)/FlextraVisualiserRules \
+	     $(local_sharedir)/ObjectSpec.Flexpart \
+             $(local_sharedir)/FlexpartRunDef  $(local_sharedir)/FlexpartRunRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons =  $(local_iconsdir)/FLEXTRA_PREPARE.xpm $(local_iconsdir)/FLEXTRA_RUN.xpm \
+         $(local_iconsdir)/FLEXTRA_VISUALISER.xpm  $(local_iconsdir)/FLEXTRA_FILE.xpm
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin $(icons)
+
+EXTRA_DIST = FLEXTRA_PREPARE.xpm FLEXTRA_RUN.xpm \
+             FLEXTRA_VISUALISER.xpm FLEXTRA_FILE.xpm ObjectSpec.Flextra  \
+             FlextraPrepareDef FlextraPrepareRules \
+	     FlextraRunDef FlextraRunRules \
+             FlextraVisualiserDef FlextraVisualiserRules \
+             FlexpartRunDef FlexpartRunRules ObjectSpec.Flexpart
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Flextra/Makefile.in b/src/Flextra/Makefile.in
new file mode 100644
index 0000000..f3309cc
--- /dev/null
+++ b/src/Flextra/Makefile.in
@@ -0,0 +1,873 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/FlextraPrepare$(EXEEXT) bin/FlextraRun$(EXEEXT) \
+	bin/FlextraVisualiser$(EXEEXT) bin/FlexpartRun$(EXEEXT) \
+	bin/FlexpartToGrib$(EXEEXT)
+subdir = src/Flextra
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_FlexpartRun_OBJECTS = bin_FlexpartRun-FlexpartRun.$(OBJEXT)
+bin_FlexpartRun_OBJECTS = $(am_bin_FlexpartRun_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_FlexpartRun_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	../../lib/libUtil.a $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_FlexpartRun_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_FlexpartRun_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_FlexpartToGrib_OBJECTS =  \
+	bin_FlexpartToGrib-FlexpartToGrib.$(OBJEXT)
+bin_FlexpartToGrib_OBJECTS = $(am_bin_FlexpartToGrib_OBJECTS)
+bin_FlexpartToGrib_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	../../lib/libUtil.a $(am__DEPENDENCIES_1)
+bin_FlexpartToGrib_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_FlexpartToGrib_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_bin_FlextraPrepare_OBJECTS =  \
+	bin_FlextraPrepare-FlextraPrepare.$(OBJEXT)
+bin_FlextraPrepare_OBJECTS = $(am_bin_FlextraPrepare_OBJECTS)
+bin_FlextraPrepare_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	../../lib/libUtil.a $(am__DEPENDENCIES_1)
+bin_FlextraPrepare_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_FlextraPrepare_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_bin_FlextraRun_OBJECTS = bin_FlextraRun-FlextraRun.$(OBJEXT)
+bin_FlextraRun_OBJECTS = $(am_bin_FlextraRun_OBJECTS)
+bin_FlextraRun_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	../../lib/libUtil.a $(am__DEPENDENCIES_1)
+bin_FlextraRun_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_FlextraRun_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_bin_FlextraVisualiser_OBJECTS =  \
+	bin_FlextraVisualiser-FlextraVisualiser.$(OBJEXT)
+bin_FlextraVisualiser_OBJECTS = $(am_bin_FlextraVisualiser_OBJECTS)
+bin_FlextraVisualiser_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	../../lib/libUtil.a $(am__DEPENDENCIES_1)
+bin_FlextraVisualiser_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_FlextraVisualiser_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_FlexpartRun_SOURCES) $(bin_FlexpartToGrib_SOURCES) \
+	$(bin_FlextraPrepare_SOURCES) $(bin_FlextraRun_SOURCES) \
+	$(bin_FlextraVisualiser_SOURCES)
+DIST_SOURCES = $(bin_FlexpartRun_SOURCES) \
+	$(bin_FlexpartToGrib_SOURCES) $(bin_FlextraPrepare_SOURCES) \
+	$(bin_FlextraRun_SOURCES) $(bin_FlextraVisualiser_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#-------------------------------------------------
+bin_FlextraPrepare_SOURCES = FlextraPrepare.cc
+bin_FlextraPrepare_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlextraPrepare_LDFLAGS = 
+bin_FlextraPrepare_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+bin_FlextraRun_SOURCES = FlextraRun.cc
+bin_FlextraRun_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlextraRun_LDFLAGS = 
+bin_FlextraRun_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+bin_FlextraVisualiser_SOURCES = FlextraVisualiser.cc
+bin_FlextraVisualiser_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlextraVisualiser_LDFLAGS = 
+bin_FlextraVisualiser_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+bin_FlexpartRun_SOURCES = FlexpartRun.cc
+bin_FlexpartRun_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlexpartRun_LDFLAGS = 
+bin_FlexpartRun_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+
+#-------------------------------------------------
+bin_FlexpartToGrib_SOURCES = FlexpartToGrib.cc
+bin_FlexpartToGrib_CPPFLAGS = -I../libUtil -I../libMetview
+bin_FlexpartToGrib_LDFLAGS = 
+bin_FlexpartToGrib_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Flextra \
+	     $(local_sharedir)/FlextraPrepareDef  $(local_sharedir)/FlextraPrepareRules \
+	     $(local_sharedir)/FlextraRunDef  $(local_sharedir)/FlextraRunRules \
+	     $(local_sharedir)/FlextraVisualiserDef  $(local_sharedir)/FlextraVisualiserRules \
+	     $(local_sharedir)/ObjectSpec.Flexpart \
+             $(local_sharedir)/FlexpartRunDef  $(local_sharedir)/FlexpartRunRules
+
+icons = $(local_iconsdir)/FLEXTRA_PREPARE.xpm $(local_iconsdir)/FLEXTRA_RUN.xpm \
+         $(local_iconsdir)/FLEXTRA_VISUALISER.xpm  $(local_iconsdir)/FLEXTRA_FILE.xpm
+
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin $(icons)
+EXTRA_DIST = FLEXTRA_PREPARE.xpm FLEXTRA_RUN.xpm \
+             FLEXTRA_VISUALISER.xpm FLEXTRA_FILE.xpm ObjectSpec.Flextra  \
+             FlextraPrepareDef FlextraPrepareRules \
+	     FlextraRunDef FlextraRunRules \
+             FlextraVisualiserDef FlextraVisualiserRules \
+             FlexpartRunDef FlexpartRunRules ObjectSpec.Flexpart
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Flextra/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Flextra/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/FlexpartRun$(EXEEXT): $(bin_FlexpartRun_OBJECTS) $(bin_FlexpartRun_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/FlexpartRun$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_FlexpartRun_LINK) $(bin_FlexpartRun_OBJECTS) $(bin_FlexpartRun_LDADD) $(LIBS)
+bin/FlexpartToGrib$(EXEEXT): $(bin_FlexpartToGrib_OBJECTS) $(bin_FlexpartToGrib_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/FlexpartToGrib$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_FlexpartToGrib_LINK) $(bin_FlexpartToGrib_OBJECTS) $(bin_FlexpartToGrib_LDADD) $(LIBS)
+bin/FlextraPrepare$(EXEEXT): $(bin_FlextraPrepare_OBJECTS) $(bin_FlextraPrepare_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/FlextraPrepare$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_FlextraPrepare_LINK) $(bin_FlextraPrepare_OBJECTS) $(bin_FlextraPrepare_LDADD) $(LIBS)
+bin/FlextraRun$(EXEEXT): $(bin_FlextraRun_OBJECTS) $(bin_FlextraRun_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/FlextraRun$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_FlextraRun_LINK) $(bin_FlextraRun_OBJECTS) $(bin_FlextraRun_LDADD) $(LIBS)
+bin/FlextraVisualiser$(EXEEXT): $(bin_FlextraVisualiser_OBJECTS) $(bin_FlextraVisualiser_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/FlextraVisualiser$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_FlextraVisualiser_LINK) $(bin_FlextraVisualiser_OBJECTS) $(bin_FlextraVisualiser_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlexpartRun-FlexpartRun.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraRun-FlextraRun.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_FlexpartRun-FlexpartRun.o: FlexpartRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlexpartRun-FlexpartRun.o -MD -MP -MF $(DEPDIR)/bin_FlexpartRun-FlexpartRun.Tpo -c -o bin_FlexpartRun-FlexpartRun.o `test -f 'FlexpartRun.cc' || echo '$(srcdir)/'`FlexpartRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlexpartRun-FlexpartRun.Tpo $(DEPDIR)/bin_FlexpartRun-FlexpartRun.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlexpartRun.cc' object='bin_FlexpartRun-FlexpartRun.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlexpartRun-FlexpartRun.o `test -f 'FlexpartRun.cc' || echo '$(srcdir)/'`FlexpartRun.cc
+
+bin_FlexpartRun-FlexpartRun.obj: FlexpartRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlexpartRun-FlexpartRun.obj -MD -MP -MF $(DEPDIR)/bin_FlexpartRun-FlexpartRun.Tpo -c -o bin_FlexpartRun-FlexpartRun.obj `if test -f 'FlexpartRun.cc'; then $(CYGPATH_W) 'FlexpartRun.cc'; else $(CYGPATH_W) '$(srcdir)/FlexpartRun.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlexpartRun-FlexpartRun.Tpo $(DEPDIR)/bin_FlexpartRun-FlexpartRun.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlexpartRun.cc' object='bin_FlexpartRun-FlexpartRun.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlexpartRun-FlexpartRun.obj `if test -f 'FlexpartRun.cc'; then $(CYGPATH_W) 'FlexpartRun.cc'; else $(CYGPATH_W) '$(srcdir)/FlexpartRun.cc'; fi`
+
+bin_FlexpartToGrib-FlexpartToGrib.o: FlexpartToGrib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartToGrib_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlexpartToGrib-FlexpartToGrib.o -MD -MP -MF $(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Tpo -c -o bin_FlexpartToGrib-FlexpartToGrib.o `test -f 'FlexpartToGrib.cc' || echo '$(srcdir)/'`FlexpartToGrib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Tpo $(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlexpartToGrib.cc' object='bin_FlexpartToGrib-FlexpartToGrib.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartToGrib_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlexpartToGrib-FlexpartToGrib.o `test -f 'FlexpartToGrib.cc' || echo '$(srcdir)/'`FlexpartToGrib.cc
+
+bin_FlexpartToGrib-FlexpartToGrib.obj: FlexpartToGrib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartToGrib_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlexpartToGrib-FlexpartToGrib.obj -MD -MP -MF $(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Tpo -c -o bin_FlexpartToGrib-FlexpartToGrib.obj `if test -f 'FlexpartToGrib.cc'; then $(CYGPATH_W) 'FlexpartToGrib.cc'; else $(CYGPATH_W) '$(srcdir)/FlexpartToGrib.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Tpo $(DEPDIR)/bin_FlexpartToGrib-FlexpartToGrib.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlexpartToGrib.cc' object='bin_FlexpartToGrib-FlexpartToGrib.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlexpartToGrib_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlexpartToGrib-FlexpartToGrib.obj `if test -f 'FlexpartToGrib.cc'; then $(CYGPATH_W) 'FlexpartToGrib.cc'; else $(CYGPATH_W) '$(srcdir)/FlexpartToGrib.cc'; fi`
+
+bin_FlextraPrepare-FlextraPrepare.o: FlextraPrepare.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraPrepare_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraPrepare-FlextraPrepare.o -MD -MP -MF $(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Tpo -c -o bin_FlextraPrepare-FlextraPrepare.o `test -f 'FlextraPrepare.cc' || echo '$(srcdir)/'`FlextraPrepare.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Tpo $(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraPrepare.cc' object='bin_FlextraPrepare-FlextraPrepare.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraPrepare_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraPrepare-FlextraPrepare.o `test -f 'FlextraPrepare.cc' || echo '$(srcdir)/'`FlextraPrepare.cc
+
+bin_FlextraPrepare-FlextraPrepare.obj: FlextraPrepare.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraPrepare_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraPrepare-FlextraPrepare.obj -MD -MP -MF $(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Tpo -c -o bin_FlextraPrepare-FlextraPrepare.obj `if test -f 'FlextraPrepare.cc'; then $(CYGPATH_W) 'FlextraPrepare.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraPrepare.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Tpo $(DEPDIR)/bin_FlextraPrepare-FlextraPrepare.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraPrepare.cc' object='bin_FlextraPrepare-FlextraPrepare.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraPrepare_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraPrepare-FlextraPrepare.obj `if test -f 'FlextraPrepare.cc'; then $(CYGPATH_W) 'FlextraPrepare.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraPrepare.cc'; fi`
+
+bin_FlextraRun-FlextraRun.o: FlextraRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraRun-FlextraRun.o -MD -MP -MF $(DEPDIR)/bin_FlextraRun-FlextraRun.Tpo -c -o bin_FlextraRun-FlextraRun.o `test -f 'FlextraRun.cc' || echo '$(srcdir)/'`FlextraRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraRun-FlextraRun.Tpo $(DEPDIR)/bin_FlextraRun-FlextraRun.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraRun.cc' object='bin_FlextraRun-FlextraRun.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraRun-FlextraRun.o `test -f 'FlextraRun.cc' || echo '$(srcdir)/'`FlextraRun.cc
+
+bin_FlextraRun-FlextraRun.obj: FlextraRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraRun-FlextraRun.obj -MD -MP -MF $(DEPDIR)/bin_FlextraRun-FlextraRun.Tpo -c -o bin_FlextraRun-FlextraRun.obj `if test -f 'FlextraRun.cc'; then $(CYGPATH_W) 'FlextraRun.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraRun.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraRun-FlextraRun.Tpo $(DEPDIR)/bin_FlextraRun-FlextraRun.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraRun.cc' object='bin_FlextraRun-FlextraRun.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraRun-FlextraRun.obj `if test -f 'FlextraRun.cc'; then $(CYGPATH_W) 'FlextraRun.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraRun.cc'; fi`
+
+bin_FlextraVisualiser-FlextraVisualiser.o: FlextraVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraVisualiser-FlextraVisualiser.o -MD -MP -MF $(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Tpo -c -o bin_FlextraVisualiser-FlextraVisualiser.o `test -f 'FlextraVisualiser.cc' || echo '$(srcdir)/'`FlextraVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Tpo $(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraVisualiser.cc' object='bin_FlextraVisualiser-FlextraVisualiser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraVisualiser-FlextraVisualiser.o `test -f 'FlextraVisualiser.cc' || echo '$(srcdir)/'`FlextraVisualiser.cc
+
+bin_FlextraVisualiser-FlextraVisualiser.obj: FlextraVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraVisualiser-FlextraVisualiser.obj -MD -MP -MF $(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Tpo -c -o bin_FlextraVisualiser-FlextraVisualiser.obj `if test -f 'FlextraVisualiser.cc'; then $(CYGPATH_W) 'FlextraVisualiser.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraVisualiser.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Tpo $(DEPDIR)/bin_FlextraVisualiser-FlextraVisualiser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraVisualiser.cc' object='bin_FlextraVisualiser-FlextraVisualiser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraVisualiser-FlextraVisualiser.obj `if test -f 'FlextraVisualiser.cc'; then $(CYGPATH_W) 'FlextraVisualiser.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraVisualiser.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Flextra/ObjectSpec.Flexpart b/src/Flextra/ObjectSpec.Flexpart
new file mode 100644
index 0000000..f1fc818
--- /dev/null
+++ b/src/Flextra/ObjectSpec.Flexpart
@@ -0,0 +1,43 @@
+################################################################################
+#
+#	ObjectSpec.Flexpart
+#
+
+
+#-----------------------
+# Computation
+#-----------------------
+
+object,
+	class               = FLEXPART_RUN,
+ 	can_be_created      = False,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/FlexpartRunDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/FlexpartRunRules',
+	default_name        = 'Flexpart Run',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = flexpart_run,
+	editor_type	    = SimpleEditor,	
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/FLEXTRA_RUN.icon'
+
+
+#-----------------------
+# States + services
+#-----------------------
+
+state,
+	class        = FLEXPART_RUN,
+	action       = execute,
+	service      = FlexpartRun
+
+#state,
+#	class		    = FLEXTRA_RUN,
+#	output_class        = FLEXTRA_FILE,
+#       service		    = FlextraRun
+
+
+service,
+	cmd           = '$METVIEW_CMD $METVIEW_BIN/FlexpartRun',
+	name          =  'FlexpartRun'
+
+
diff --git a/src/Flextra/ObjectSpec.Flextra b/src/Flextra/ObjectSpec.Flextra
new file mode 100644
index 0000000..bfd99a3
--- /dev/null
+++ b/src/Flextra/ObjectSpec.Flextra
@@ -0,0 +1,135 @@
+################################################################################
+#
+#	ObjectSpec.Flextra
+#
+
+#-----------------------
+# Data
+#-----------------------
+
+object,
+	class		= FLEXTRA_FILE,
+	can_be_created  = False,
+	check           = False,
+	default_object  = False,
+	type		= File,
+	default_name    = 'Flextra File',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/FLEXTRA_FILE.icon',
+	editor_type     = QtMacroEditor 
+
+#state,
+#	class    = FLEXTRA,
+#	action	 = examine,
+#	service  = OdbExaminer
+
+#-----------------------
+# Preparation
+#-----------------------
+
+object,
+	class               = FLEXTRA_PREPARE,
+ 	can_be_created      = True,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/FlextraPrepareDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/FlextraPrepareRules',
+	default_name        = 'Flextra Prepare',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = flextra_prepare,
+	editor_type	    = SimpleEditor,	
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/FLEXTRA_PREPARE.icon'
+
+
+#-----------------------
+# Computation
+#-----------------------
+
+object,
+	class               = FLEXTRA_RUN,
+ 	can_be_created      = True,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/FlextraRunDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/FlextraRunRules',
+	default_name        = 'Flextra Run',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = flextra_run,
+	editor_type	    = SimpleEditor,	
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/FLEXTRA_RUN.icon'
+
+#-----------------------
+# Visualiser
+#-----------------------
+
+object,
+	class               = FLEXTRA_VISUALISER,
+ 	can_be_created      = True,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/FlextraVisualiserDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/FlextraVisualiserRules',
+	default_name        = 'Flextra Visualiser',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = flextra_visualiser,
+	editor_type	    = SimpleEditor,	
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/FLEXTRA_VISUALISER.icon'
+
+#-----------------------
+# States + services
+#-----------------------
+
+
+state,
+	class		    = FLEXTRA_FILE,
+	action		    = save,
+        service		    = savepool
+
+state,
+	class		    = FLEXTRA_FILE,
+	action		    = examine,
+        service		    = FlextraExaminer
+
+state,
+	class		    = FLEXTRA_PREPARE,
+	action		    = execute,
+        service		    = FlextraPrepare
+
+state,
+	class		    = FLEXTRA_PREPARE,
+	output_class        = FLEXTRA_INPUT,
+        service		    = FlextraPrepare
+
+state,
+	class        = FLEXTRA_RUN,
+	action       = execute,
+	service      = FlextraRun
+
+state,
+	class		    = FLEXTRA_RUN,
+	output_class        = FLEXTRA_FILE,
+        service		    = FlextraRun
+
+state,
+	class		    = FELXTRA_VISUALISER,
+	action		    = execute,
+        service		    = FlextraVisualiser
+
+state,
+	class		    = FLEXTRA_VISUALISER,
+	output_class	    = TABLE_GEO_POINTS,
+        service		    = FlextraVisualiser
+
+service,
+	cmd           = '$METVIEW_CMD $METVIEW_BIN/FlextraExaminer -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS',
+	name          =  FlextraExaminer
+
+service,
+	cmd           = '$METVIEW_CMD $METVIEW_BIN/FlextraPrepare',
+	name          =  FlextraPrepare
+
+service,
+	cmd           = '$METVIEW_CMD $METVIEW_BIN/FlextraRun',
+	name          =  'FlextraRun'
+
+service,
+	timeout		    = $timeout,
+        name		    = FlextraVisualiser,
+	fullname	    = Flextra Visualiser,
+        cmd		    = '$metview_command $METVIEW_BIN/FlextraVisualiser'
diff --git a/src/FlextraExaminer/FlextraExaminer.cc b/src/FlextraExaminer/FlextraExaminer.cc
new file mode 100644
index 0000000..8bcb56a
--- /dev/null
+++ b/src/FlextraExaminer/FlextraExaminer.cc
@@ -0,0 +1,490 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QDebug>
+#include <QFile>
+#include <QFileDialog>
+#include <QMenu>
+#include <QPlainTextEdit>
+#include <QPushButton>
+#include <QSettings>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+#include <QVBoxLayout>
+
+#include "FlextraExaminer.h"
+#include "LogHandler.h"
+
+#include "mars.h"
+
+#include "MvFlextra.h"
+#include "MvQAbout.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQHighlighter.h"
+#include "MvQLogBrowser.h"
+#include "MvQPlainTextEditSearchLine.h"
+
+FlextraExaminer::FlextraExaminer(QWidget *parent) :
+		MvQMainWindow(parent),
+		data_(0),actionFileInfo_(0), actionLog_(0)
+	
+{
+	// Initializations
+ 	setAttribute(Qt::WA_DeleteOnClose);	
+	setWindowTitle(tr("Metview - FLEXTRA Examiner"));
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	setupBlockPanel();
+	setupDumpPanel();
+	setupLogArea();
+
+	// Main splitter
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+	mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+	
+	// The main layout (the upper part of mainSplitter)
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+	mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	QWidget* w = new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	// File info area
+	fileInfoLabel_= new MvQFileInfoLabel;
+	mainLayout->addWidget(fileInfoLabel_);
+		
+	// Central splitter
+	centralSplitter_= new QSplitter;
+	centralSplitter_->setOrientation(Qt::Horizontal);
+	centralSplitter_->setOpaqueResize(false);
+	mainLayout->addWidget(centralSplitter_);
+	
+	centralSplitter_->addWidget(blockPanel_);
+	centralSplitter_->addWidget(dumpPanel_);
+	centralSplitter_->setCollapsible(1,false);
+	QList<int> splitterSize;
+	splitterSize << 200 << 900;
+	centralSplitter_->setSizes(splitterSize);
+	
+	//Log
+	mainSplitter_->addWidget(logPanel_);
+
+	// Initialize user interface actions
+	setupEditActions();
+	setupViewActions();
+	setupHelpActions();
+
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+	
+	// Status bar
+ 	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+
+	// Signals and slots
+	connect(this,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+
+	// Setup previous main layout
+	readSettings();
+}
+ 
+FlextraExaminer::~FlextraExaminer()
+{
+	// Save settings
+	writeSettings();
+
+	// Clean memory
+	if(data_) delete data_;
+}
+
+
+void FlextraExaminer::setupEditActions()
+{
+	QAction *actionFind_=MvQMainWindow::createAction(MvQMainWindow::FindAction,this);
+	connect(actionFind_,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(setHidden(bool)));
+				
+	QAction *actionFindNext=MvQMainWindow::createAction(MvQMainWindow::FindNextAction,this);
+	connect(actionFindNext,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindNext(bool)));	
+		
+	QAction *actionFindPrev=MvQMainWindow::createAction(MvQMainWindow::FindPreviousAction,this);
+	connect(actionFindPrev,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindPrev(bool)));
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::EditMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFind_,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindNext,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindPrev,MvQMenuItem::MenuTarget));
+}
+
+void FlextraExaminer::setupViewActions()
+{
+	actionFileInfo_ = new QAction(this);
+	actionFileInfo_->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo_->setText(tr("File info"));
+	actionFileInfo_->setCheckable(true);
+	actionFileInfo_->setChecked(true);
+	actionFileInfo_->setToolTip(tr("View file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/fileInfo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo_->setIcon(icon);	
+
+	actionLog_=MvQMainWindow::createAction(MvQMainWindow::LogAction,this);
+	
+	logPanel_->hide(); // hide log area
+	
+	// Signals and slots
+	connect(actionFileInfo_,SIGNAL(toggled(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));
+}
+
+void FlextraExaminer::setupHelpActions()
+{
+    	// About
+    	QAction *actionAbout=MvQMainWindow::createAction(MvQMainWindow::AboutAction,this);
+	actionAbout->setText(tr("&About FLEXTRA Examiner"));
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+
+void FlextraExaminer::setupLogArea()
+{
+	// Log Area
+	QVBoxLayout *logLayout = new QVBoxLayout;
+	logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	logLayout->setSpacing(1);
+	logPanel_= new QWidget;
+	logPanel_->setMinimumHeight(100);
+	logPanel_->setLayout(logLayout);
+	//mainSplitter_->addWidget(logPanel_);
+
+	// Define header layout
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);
+
+	// Add label to the header
+	QLabel* label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	hb->addWidget(label,1);
+
+	// Add Clear button to the header
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+
+	// Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	// Signals and slots
+	connect ( clearPb,SIGNAL(clicked(bool)), this,SLOT(slotClearLog(bool)) );
+}
+
+void FlextraExaminer::setupDumpPanel()
+{	
+        // Build a layout
+        QVBoxLayout* dumpLayout = new QVBoxLayout;
+        dumpLayout->setContentsMargins(0,0,0,0);
+        dumpPanel_ = new QWidget;
+        dumpPanel_->setLayout(dumpLayout);
+            
+        dumpText_ = new QPlainTextEdit;
+        dumpText_->setReadOnly(true);
+        dumpText_->setLineWrapMode(QPlainTextEdit::NoWrap);
+        //dumpText_->setProperty("mvStyle","fileContents");
+ 
+	//We need a fixedpitch font!!
+	QFont font=dumpText_->font();
+        font.setFamily("Courier");
+        font.setFixedPitch(true);
+	font.setPointSize(12);
+	dumpText_->setFont(font);
+		
+	MvQHighlighter* hl;
+	hl=new MvQHighlighter(dumpText_->document());
+	
+	dumpLayout->addWidget(dumpText_);
+
+        //Build the search widget
+        findPanel_= new MvQPlainTextEditSearchLine(dumpText_,tr("&Find:"));
+        dumpLayout->addWidget(findPanel_);
+	findPanel_->hide();	
+}
+	
+void FlextraExaminer::setupBlockPanel()
+{			
+	QVBoxLayout* blockLayout = new QVBoxLayout;
+	blockLayout->setContentsMargins(0,0,0,0);
+	blockPanel_ = new QWidget;
+	blockPanel_->setLayout(blockLayout);
+	
+	// Build a tree to show the data representation
+        blockTree_ = new QTreeWidget;
+        blockTree_->setObjectName("ncTreeParam");
+        blockTree_->setProperty("mvStyle",0);
+        blockTree_->setAlternatingRowColors(true);
+        blockTree_->setAllColumnsShowFocus(true);
+	blockTree_->setColumnCount(4);
+        blockTree_->setUniformRowHeights(true);
+	blockTree_->setRootIsDecorated(false);
+	
+	QStringList hdr;
+	hdr << tr("Index") << tr("Name") << tr("Step type") << tr("U");
+	blockTree_->setHeaderLabels(hdr);
+	
+	
+	QTreeWidgetItem *header=blockTree_->headerItem();
+	header->setData(3,Qt::ToolTipRole,tr("Uncertainty trajectory"));
+	
+	blockTree_->setContextMenuPolicy(Qt::CustomContextMenu);
+	
+	blockLayout->addWidget(blockTree_);
+	
+	//connect(blockTree_,SIGNAL(itemActivated(QTreeWidgetItem*,int)),
+	//	this,SLOT(slotBlockSelected(QTreeWidgetItem*,int)));
+		
+	connect(blockTree_,SIGNAL(customContextMenuRequested(const QPoint &)),
+                this,SLOT(slotContextMenu(const QPoint &)));	
+}
+
+
+bool FlextraExaminer::initData(const string& filename,const string& icon)
+{
+	iconPath_=icon;
+  
+  	// Clean data if already exists
+	if ( data_ )
+	{
+		delete data_;
+		data_ = 0;
+	}
+
+	// Write initial message in the log area
+	LogItem *log = new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Loading file");
+	log->method("MvFlextra API");
+
+	// Initialize Flextra object
+	data_ = new MvFlextra(filename);
+	
+	// Update File info label
+	updateFileInfoLabel();
+	
+	if(data_->blockNum() == 0)
+	{
+	  	delete data_;
+		data_ = 0;
+		log->error("Could not open geopoints file");
+		slotUpdateLogOutput();
+		QString buf = tr("<b>Status: </b><font color=red>FAILED</font>");
+		emit statusMessage(buf);
+		return false;
+	}   
+	else if(data_->blockNum() == 1)
+	{
+		QFile file(QString::fromStdString(filename));
+		if(file.open(QIODevice::ReadOnly | QIODevice::Text))
+		{
+			QString str,line;
+			QTextStream in(&file);
+    			while(!in.atEnd())
+    			{
+        			line=in.readLine();
+				str+=line+'\n';				
+    			}		  		  		  
+			dumpText_->setPlainText(str); 
+		}
+		file.close();
+		blockPanel_->hide();
+	}	
+	else
+	{
+		QTreeWidgetItem *firstItem=0;
+		
+		for(int i=0; i < data_->blockNum(); i++)
+		{
+			QTreeWidgetItem *item = new QTreeWidgetItem(blockTree_);			
+			QString comment=QString::fromStdString(data_->blocks().at(i)->comment());			
+			QString step=(data_->blocks().at(i)->constantStep())?tr("Constant"):tr("Flexible");
+			QString utr=(data_->blocks().at(i)->uncertaintyTr())?tr("y"):tr("n"); 
+			
+			item->setData(0,Qt::DisplayRole,QString::number(i+1));
+			item->setData(1,Qt::DisplayRole,comment);
+			item->setData(2,Qt::DisplayRole,step);
+			item->setData(3,Qt::DisplayRole,utr);
+			
+			if(!firstItem)
+			  	firstItem=item;
+		}
+		blockTree_->resizeColumnToContents(0);
+		blockTree_->resizeColumnToContents(1); 
+		blockTree_->resizeColumnToContents(2); 			
+		
+		connect(blockTree_,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
+			this,SLOT(slotBlockSelected(QTreeWidgetItem*,QTreeWidgetItem*)));
+		
+		if(firstItem)
+		{  	
+		  	blockTree_->setCurrentItem(firstItem);
+		}	
+	}
+	
+	
+	slotUpdateLogOutput();
+	QString buf = tr("<b>Status:</b> <font color=green>OK</font>");
+	emit statusMessage(buf);
+
+	return true;
+}
+
+void FlextraExaminer::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void FlextraExaminer::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+void FlextraExaminer::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+}
+
+void FlextraExaminer::updateFileInfoLabel()
+{
+	fileInfoLabel_->setFlextraTextLabel(QString::fromStdString(data_->fileName()),QString::fromStdString(iconPath_),data_->blockNum());
+}
+
+void FlextraExaminer::slotShowAboutBox()
+{
+	MvQAbout about("FLEXTRA Examiner","",MvQAbout::MetviewVersion );
+	about.exec();
+}
+
+void FlextraExaminer::slotBlockSelected(QTreeWidgetItem* item,QTreeWidgetItem*)
+{
+	int row=item->data(0,Qt::DisplayRole).toString().toInt();	  
+	row--;
+	if(row >= 0 && row < data_->blockNum())
+	{
+		if(tmpFilePath_.empty())
+		{
+			tmpFilePath_=string(marstmp());
+			
+		}
+		data_->write(tmpFilePath_,row);
+		
+		QFile file(QString::fromStdString(tmpFilePath_));
+		if(file.open(QIODevice::ReadOnly | QIODevice::Text))
+		{
+			QString str,line;
+			QTextStream in(&file);
+    			while(!in.atEnd())
+    			{
+        			line=in.readLine();
+				str+=line+'\n';				
+    			}		  		  		  
+			dumpText_->setPlainText(str); 
+		}
+		file.close();
+	}
+	else
+	{
+		dumpText_->clear();
+	}	
+}  
+
+
+void FlextraExaminer::slotContextMenu(const QPoint &position)
+{
+	QTreeWidgetItem *item=blockTree_->itemAt(position); 
+	int row=item->data(0,Qt::DisplayRole).toString().toInt();	  
+	row--;
+	if(row < 0 || row >= data_->blockNum())
+	 	return; 
+	  
+	QList<QAction*> actions;
+
+	//Inser new key
+	QAction *actionSave = new QAction(this);
+        actionSave->setObjectName(QString::fromUtf8("actionSave"));
+	actionSave->setText(tr("Save"));
+	actions.append(actionSave);
+
+	if(QMenu::exec(actions,blockTree_->mapToGlobal(position)) == actionSave) 
+	{
+		QString offeredName=QString::fromStdString(iconPath_).section('/',0,-2)  + 
+		                    "/res_" + item->data(1,Qt::DisplayRole).toString() + ".txt";		
+	  	QString fileName = QFileDialog::getSaveFileName(this,
+     				tr("Save Data To File"),offeredName, QString());  
+	  					
+		data_->write(fileName.toStdString(),row);						
+	}  
+		
+	delete actionSave;
+}
+	
+void FlextraExaminer::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-FlextraExaminer");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.setValue("actionFileInfoStatus",actionFileInfo_->isChecked());
+	settings.endGroup();
+}
+
+void FlextraExaminer::readSettings()
+{
+	QSettings settings("ECMWF","MV4-FlextraExaminer");
+
+	QVariant value;
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+	
+	if(settings.value("actionFileInfoStatus").isNull())
+		actionFileInfo_->setChecked(true);
+	else
+		actionFileInfo_->setChecked(settings.value("actionFileInfoStatus").toBool());
+
+	settings.endGroup();
+}
diff --git a/src/FlextraExaminer/FlextraExaminer.h b/src/FlextraExaminer/FlextraExaminer.h
new file mode 100644
index 0000000..dc3d416
--- /dev/null
+++ b/src/FlextraExaminer/FlextraExaminer.h
@@ -0,0 +1,86 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FlextraExaminer_H
+#define FlextraExaminer_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+class QPlainTextEdit;
+class QSplitter;
+class QTreeWidget;
+class QTreeWidgetItem;
+
+class MvFlextra;
+class MvQFileInfoLabel;
+class MvQLogBrowser;
+class MvQPlainTextEditSearchLine;
+
+using namespace std;
+
+class FlextraExaminer : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+    	FlextraExaminer(QWidget *parent = 0);
+	~FlextraExaminer();
+    	bool initData(const string&,const string&);
+	void updateFileInfoLabel();
+
+public slots:
+	void slotShowAboutBox();
+	void slotUpdateLogOutput();
+	void slotClearLog(bool);
+	void slotStatusMessage(QString);		
+	void slotBlockSelected(QTreeWidgetItem*,QTreeWidgetItem*);
+	void slotContextMenu(const QPoint &);
+
+signals:
+	void statusMessage(QString);
+
+private:
+	void setupEditActions();
+	void setupViewActions();
+	void setupHelpActions();
+	void setupBlockPanel();
+	void setupDumpPanel();
+	void setupFindPanel();
+	void setupLogArea();
+
+	void readSettings();
+	void writeSettings();
+
+	MvFlextra *data_;
+	string tmpFilePath_;
+	string iconPath_;
+	
+	MvQMainWindow::MenuItemMap menuItems_;
+	MvQFileInfoLabel*  fileInfoLabel_;
+
+	QAction* actionFileInfo_;
+	QSplitter* mainSplitter_;
+	QSplitter* centralSplitter_;
+	MvQLogBrowser* logBrowser_;
+	QWidget* logPanel_;
+	QAction* actionLog_;
+	QLabel* statusMessageLabel_;
+	MvQPlainTextEditSearchLine* findPanel_;
+	
+	QWidget* blockPanel_;
+	QWidget* dumpPanel_;
+	QPlainTextEdit* dumpText_;
+	QTreeWidget* blockTree_;	
+};
+
+#endif
diff --git a/src/FlextraExaminer/Makefile.am b/src/FlextraExaminer/Makefile.am
new file mode 100755
index 0000000..981173a
--- /dev/null
+++ b/src/FlextraExaminer/Makefile.am
@@ -0,0 +1,32 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+bin_PROGRAMS = bin/FlextraExaminer
+bin_FlextraExaminer_SOURCES = MvMain.cc FlextraExaminer.cc MvQHighlighter.cc \
+          FlextraExaminer.h MvQHighlighter.h
+                          		
+nodist_bin_FlextraExaminer_SOURCES = FlextraExaminer.moc.cpp
+
+bin_FlextraExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_FlextraExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_FlextraExaminer_LDADD    = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_FlextraExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+BUILT_SOURCES = bin FlextraExaminer.moc.cpp
+              
+
+EXTRA_DIST = 
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/FlextraExaminer *.o *.moc.cpp *.qrc.cpp
+
+
diff --git a/src/FlextraExaminer/Makefile.in b/src/FlextraExaminer/Makefile.in
new file mode 100644
index 0000000..b7d28d8
--- /dev/null
+++ b/src/FlextraExaminer/Makefile.in
@@ -0,0 +1,867 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/FlextraExaminer$(EXEEXT)
+subdir = src/FlextraExaminer
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_FlextraExaminer_OBJECTS = bin_FlextraExaminer-MvMain.$(OBJEXT) \
+	bin_FlextraExaminer-FlextraExaminer.$(OBJEXT) \
+	bin_FlextraExaminer-MvQHighlighter.$(OBJEXT)
+nodist_bin_FlextraExaminer_OBJECTS =  \
+	bin_FlextraExaminer-FlextraExaminer.moc.$(OBJEXT)
+bin_FlextraExaminer_OBJECTS = $(am_bin_FlextraExaminer_OBJECTS) \
+	$(nodist_bin_FlextraExaminer_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_FlextraExaminer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_FlextraExaminer_SOURCES) \
+	$(nodist_bin_FlextraExaminer_SOURCES)
+DIST_SOURCES = $(bin_FlextraExaminer_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_FlextraExaminer_SOURCES = MvMain.cc FlextraExaminer.cc MvQHighlighter.cc \
+          FlextraExaminer.h MvQHighlighter.h
+
+nodist_bin_FlextraExaminer_SOURCES = FlextraExaminer.moc.cpp
+bin_FlextraExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_FlextraExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_FlextraExaminer_LDADD = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_FlextraExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+BUILT_SOURCES = bin FlextraExaminer.moc.cpp
+EXTRA_DIST = 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/FlextraExaminer/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/FlextraExaminer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/FlextraExaminer$(EXEEXT): $(bin_FlextraExaminer_OBJECTS) $(bin_FlextraExaminer_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/FlextraExaminer$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_FlextraExaminer_LINK) $(bin_FlextraExaminer_OBJECTS) $(bin_FlextraExaminer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraExaminer-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_FlextraExaminer-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-MvMain.o -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-MvMain.Tpo -c -o bin_FlextraExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-MvMain.Tpo $(DEPDIR)/bin_FlextraExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_FlextraExaminer-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_FlextraExaminer-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-MvMain.Tpo -c -o bin_FlextraExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-MvMain.Tpo $(DEPDIR)/bin_FlextraExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_FlextraExaminer-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_FlextraExaminer-FlextraExaminer.o: FlextraExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-FlextraExaminer.o -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Tpo -c -o bin_FlextraExaminer-FlextraExaminer.o `test -f 'FlextraExaminer.cc' || echo '$(srcdir)/'`FlextraExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Tpo $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraExaminer.cc' object='bin_FlextraExaminer-FlextraExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-FlextraExaminer.o `test -f 'FlextraExaminer.cc' || echo '$(srcdir)/'`FlextraExaminer.cc
+
+bin_FlextraExaminer-FlextraExaminer.obj: FlextraExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-FlextraExaminer.obj -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Tpo -c -o bin_FlextraExaminer-FlextraExaminer.obj `if test -f 'FlextraExaminer.cc'; then $(CYGPATH_W) 'FlextraExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Tpo $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraExaminer.cc' object='bin_FlextraExaminer-FlextraExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-FlextraExaminer.obj `if test -f 'FlextraExaminer.cc'; then $(CYGPATH_W) 'FlextraExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/FlextraExaminer.cc'; fi`
+
+bin_FlextraExaminer-MvQHighlighter.o: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-MvQHighlighter.o -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Tpo -c -o bin_FlextraExaminer-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Tpo $(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='bin_FlextraExaminer-MvQHighlighter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+
+bin_FlextraExaminer-MvQHighlighter.obj: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-MvQHighlighter.obj -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Tpo -c -o bin_FlextraExaminer-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Tpo $(DEPDIR)/bin_FlextraExaminer-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='bin_FlextraExaminer-MvQHighlighter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+
+bin_FlextraExaminer-FlextraExaminer.moc.o: FlextraExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-FlextraExaminer.moc.o -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Tpo -c -o bin_FlextraExaminer-FlextraExaminer.moc.o `test -f 'FlextraExaminer.moc.cpp' || echo '$(srcdir)/'`FlextraExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Tpo $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraExaminer.moc.cpp' object='bin_FlextraExaminer-FlextraExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-FlextraExaminer.moc.o `test -f 'FlextraExaminer.moc.cpp' || echo '$(srcdir)/'`FlextraExaminer.moc.cpp
+
+bin_FlextraExaminer-FlextraExaminer.moc.obj: FlextraExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_FlextraExaminer-FlextraExaminer.moc.obj -MD -MP -MF $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Tpo -c -o bin_FlextraExaminer-FlextraExaminer.moc.obj `if test -f 'FlextraExaminer.moc.cpp'; then $(CYGPATH_W) 'FlextraExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/FlextraExaminer.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Tpo $(DEPDIR)/bin_FlextraExaminer-FlextraExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FlextraExaminer.moc.cpp' object='bin_FlextraExaminer-FlextraExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_FlextraExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_FlextraExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_FlextraExaminer-FlextraExaminer.moc.obj `if test -f 'FlextraExaminer.moc.cpp'; then $(CYGPATH_W) 'FlextraExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/FlextraExaminer.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/FlextraExaminer *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/FlextraExaminer/MvMain.cc b/src/FlextraExaminer/MvMain.cc
new file mode 100644
index 0000000..26ef9c0
--- /dev/null
+++ b/src/FlextraExaminer/MvMain.cc
@@ -0,0 +1,94 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <iostream>
+
+#include "FlextraExaminer.h"
+#include "Metview.h"
+#include "MvQService.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService
+{
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvFlextraExaminer : public Base
+{	
+public:
+	MvFlextraExaminer() : Base("FLEXTRA_FILE") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvFlextraExaminer::serve( MvRequest& in, MvRequest& )
+{
+cout << "--------------FlextraExaminer::serve()--------------" << endl;
+in.print();
+
+	string iconPath;
+	char *mvdir=getenv("METVIEW_USER_DIRECTORY");
+	if(mvdir)
+	{
+		iconPath=string(mvdir);
+		const char* iconName=in("_NAME");
+		if(iconName)
+		{
+		  	iconPath=string(mvdir) + "/" + iconName;
+		}		  
+	}
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(window);
+	Q_INIT_RESOURCE(find);
+
+	// Get Flextra file name
+	const char* name = in("PATH");
+
+	//Create the flextra browser, initialize it and show it
+	FlextraExaminer *browser = new FlextraExaminer;
+	browser->initData(name,iconPath);
+	browser->show();
+	
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI
+	// To turn icon to green; otherwise, it will stay orange
+	if( strcmp( getenv("METVIEW_MODE"), "examine" ) != 0 )
+	{
+	  	MvRequest req;
+		sendReplyFromInteractive(req);
+	}
+	
+	//Enter the app loop
+	app.exec();
+}
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+	av = argv;
+	
+	MvApplication theApp( argc, argv );
+
+	MvFlextraExaminer lextra;
+	
+	theApp.run();
+}
diff --git a/src/FlextraExaminer/MvQHighlighter.cc b/src/FlextraExaminer/MvQHighlighter.cc
new file mode 100644
index 0000000..aea7b83
--- /dev/null
+++ b/src/FlextraExaminer/MvQHighlighter.cc
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QRegExp>
+#include <QStringList>
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include "MvQHighlighter.h"
+
+using namespace std;
+
+MvQHighlighter::MvQHighlighter(QTextDocument *parent)
+     : QSyntaxHighlighter(parent)
+ {
+	HighlightingRule rule;
+
+  	//Keywords
+     	QTextCharFormat keywordFormat;
+
+	keywordFormat.setForeground(Qt::darkBlue);
+     	keywordFormat.setFontWeight(QFont::Bold);
+ 
+    	QStringList keywordPatterns;
+      	keywordPatterns << "DATE" << "TIME" << "STOP INDEX" << "# OF POINTS"; 
+	
+	foreach (QString pattern, keywordPatterns)
+	{
+         	//rule.pattern = QRegExp(pattern,Qt::CaseInsensitive);
+    		//QString s=pattern + "(?==)";
+		QString s=pattern + "(?=:)";
+		rule.pattern = QRegExp(s,Qt::CaseInsensitive);    		
+		rule.format = keywordFormat;
+         	highlightingRules.append(rule);
+	}
+
+	//Data keywords
+	QTextCharFormat dataKeyFormat;
+
+	dataKeyFormat.setForeground(QColor(224,138,33));
+	//dataKeyFormat.setForeground(QColor(255,119,119));
+     	dataKeyFormat.setFontWeight(QFont::Bold);
+ 
+    	QStringList dataKeyPatterns;
+      	dataKeyPatterns << " SECS " << " LONGIT " << " LATIT "  << " ETA " << " PRESS " <<
+      	                   "  Z " << " Z-ORO " << " PV " << " THETA " << " Q";
+
+	foreach (QString pattern, dataKeyPatterns)
+	{
+         	//rule.pattern = QRegExp(pattern,Qt::CaseInsensitive);
+    		//QString s=pattern + "(?==)";
+		QString s=pattern;
+		rule.pattern = QRegExp(s,Qt::CaseInsensitive);    		
+		rule.format = dataKeyFormat;
+         	highlightingRules.append(rule);
+	}
+
+	//Comments
+   	QTextCharFormat singleLineCommentFormat;
+	
+	singleLineCommentFormat.setFontItalic(true);
+    	singleLineCommentFormat.setForeground(Qt::darkGreen);
+ 	QRegExp rx("\\*[^\n]*");
+	rx.setPatternSyntax(QRegExp::WildcardUnix);
+	rule.pattern = rx;
+    	rule.format = singleLineCommentFormat;
+    	highlightingRules.append(rule);
+
+    //Server (URL)
+     	/*QTextCharFormat serverFormat;
+
+	serverFormat.setForeground(Qt::red);
+     	serverFormat.setFontWeight(QFont::Bold);
+ 
+	rule.pattern = QRegExp("\\*\?\\b");
+        rule.format = serverFormat;
+        highlightingRules.append(rule);*/
+
+
+ }
+
+ void MvQHighlighter::highlightBlock(const QString &text)
+ {
+     foreach (HighlightingRule rule, highlightingRules) 
+	{
+         QRegExp expression(rule.pattern);
+         int index = text.indexOf(expression);
+         while (index >= 0) 
+	{
+             int length = expression.matchedLength();
+             setFormat(index, length, rule.format);
+             index = text.indexOf(expression, index + length);
+         }
+     }
+     setCurrentBlockState(0);
+
+    /* int startIndex = 0;
+     if (previousBlockState() != 1)
+         startIndex = text.indexOf(commentStartExpression);
+
+     while (startIndex >= 0) 
+	{
+         int endIndex = text.indexOf(commentEndExpression, startIndex);
+         int commentLength;
+         if (endIndex == -1) 
+	{
+             setCurrentBlockState(1);
+             commentLength = text.length() - startIndex;
+         } 
+	else 
+	{
+             commentLength = endIndex - startIndex
+                             + commentEndExpression.matchedLength();
+         }
+         setFormat(startIndex, commentLength, multiLineCommentFormat);
+         startIndex = text.indexOf(commentStartExpression,
+                                                 startIndex + commentLength);
+     }*/
+ }
diff --git a/src/FlextraExaminer/MvQHighlighter.h b/src/FlextraExaminer/MvQHighlighter.h
new file mode 100644
index 0000000..b886207
--- /dev/null
+++ b/src/FlextraExaminer/MvQHighlighter.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQHighlighter_H
+#define MvQHighlighter_H
+
+#include <QSyntaxHighlighter>
+
+#include <QHash>
+#include <QTextCharFormat>
+
+class QTextDocument;
+
+class MvQHighlighter : public QSyntaxHighlighter
+ {
+ public:
+    MvQHighlighter(QTextDocument *parent = 0);
+
+ protected:
+     void highlightBlock(const QString &text);
+
+ private:
+     struct HighlightingRule
+     {
+         QRegExp pattern;
+         QTextCharFormat format;
+     };
+
+     QVector<HighlightingRule> highlightingRules;
+ };
+
+
+#endif
diff --git a/src/GeopExaminer/GeopExaminer.cc b/src/GeopExaminer/GeopExaminer.cc
new file mode 100644
index 0000000..0127b35
--- /dev/null
+++ b/src/GeopExaminer/GeopExaminer.cc
@@ -0,0 +1,425 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QPushButton>
+#include <QSettings>
+#include <QSortFilterProxyModel>
+#include <QSpinBox>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QVBoxLayout>
+
+#include "GeopExaminer.h"
+#include "LogHandler.h"
+#include "MvGeoPoints.h"
+#include "MvQAbout.h"
+#include "MvQFileInfoLabel.h"
+#include "MvGeoPointsModel.h"
+#include "MvQLogBrowser.h"
+#include "MvQSearchLinePanel.h"
+#include "MvQTreeView.h"
+#include "MvQTreeViewSearchLine.h"
+
+GeopExaminer::GeopExaminer(QWidget *parent) :
+		MvQMainWindow(parent),
+		data_ (0),
+		gpModel_ (0),
+		actionFileInfo_ (0),
+		treeData_ (0), ignoreDataRowSpinChangeSignal_(false)
+{
+	// Initializations
+ 	setAttribute(Qt::WA_DeleteOnClose);	
+	setWindowTitle(tr("Metview - Geopoints Examiner"));
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	setupDataBox();
+	setupFindBox();
+	setupLogArea();
+
+	// Main splitter
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+	mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+
+	// The main layout (the upper part of mainSplitter)
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+	mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	QWidget* w = new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+//?	mainSplitter_->setCollapsible(1,false);
+
+	// File info area
+	fileInfoLabel_= new MvQFileInfoLabel;
+	mainLayout->addWidget(fileInfoLabel_);
+
+	// Central tab
+	metaTab_= new QTabWidget;	
+	mainLayout->addWidget(metaTab_,1);
+
+	metaTab_->addTab(dataPanel_,tr("Meta data"));	
+	mainLayout->addWidget(findPanel_);
+	mainSplitter_->addWidget(logPanel_);
+
+	// Initialize user interface actions
+	setupEditActions();
+	setupViewActions();
+	setupHelpActions();
+
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+	
+	// Status bar
+ 	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+
+	// Signals and slots
+	connect(this,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+
+	// Setup previous main layout
+	readSettings();
+}
+ 
+GeopExaminer::~GeopExaminer()
+{
+	// Save settings
+	writeSettings();
+
+	// Clean memory
+	delete data_;
+	delete gpModel_;
+}
+
+
+void GeopExaminer::setupEditActions()
+{
+	QAction *actionFind_=MvQMainWindow::createAction(MvQMainWindow::FindAction,this);
+	connect(actionFind_,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(setHidden(bool)));
+				
+	QAction *actionFindNext=MvQMainWindow::createAction(MvQMainWindow::FindNextAction,this);
+	connect(actionFindNext,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindNext(bool)));	
+		
+	QAction *actionFindPrev=MvQMainWindow::createAction(MvQMainWindow::FindPreviousAction,this);
+	connect(actionFindPrev,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindPrev(bool)));
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::EditMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFind_,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindNext,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindPrev,MvQMenuItem::MenuTarget));
+}
+
+void GeopExaminer::setupViewActions()
+{
+	actionFileInfo_ = new QAction(this);
+	actionFileInfo_->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo_->setText(tr("File info"));
+	actionFileInfo_->setCheckable(true);
+	actionFileInfo_->setChecked(true);
+	actionFileInfo_->setToolTip(tr("View file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/fileInfo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo_->setIcon(icon);	
+
+	actionLog_ = new QAction(this);
+	actionLog_->setObjectName(QString::fromUtf8("actionLog"));
+	actionLog_->setText(tr("&Log"));
+	actionLog_->setCheckable(true);
+	actionLog_->setChecked(false);
+	actionLog_->setToolTip(tr("View log"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/examiner/log.svg")), QIcon::Normal, QIcon::Off);
+ 	actionLog_->setIcon(icon1);
+
+	logPanel_->hide(); // hide log area
+	
+	// Signals and slots
+	connect(actionFileInfo_,SIGNAL(toggled(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));
+}
+
+void GeopExaminer::setupHelpActions()
+{
+    	// About
+    	QAction *actionAbout = new QAction(this);
+    	actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
+    	QIcon icon;
+    	icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+    	actionAbout->setIcon(icon);
+    	actionAbout->setText(tr("&About Geopoints Examiner"));
+
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+
+void GeopExaminer::setupDataBox()
+{
+	// Build a box layout
+	QVBoxLayout* dataLayout = new QVBoxLayout;
+	dataLayout->setContentsMargins(0,0,0,0);
+	dataPanel_ = new QWidget;
+	dataPanel_->setLayout(dataLayout);
+
+	// Combo box for index selection
+	QLabel *spinLabel = new QLabel(tr("Go to row:"));
+	dataRowSpin_ = new QSpinBox;
+	spinLabel->setBuddy(dataRowSpin_);
+	QHBoxLayout* msgSpinLayout = new QHBoxLayout;
+	msgSpinLayout->addWidget(spinLabel);
+	msgSpinLayout->addWidget(dataRowSpin_);
+	msgSpinLayout->addStretch(1);
+	dataLayout->addLayout(msgSpinLayout);
+	
+	// Signals and slots
+	connect(dataRowSpin_, SIGNAL(valueChanged(int)),
+		this, SLOT(slotDataRowSpinChanged(int)));
+		
+	// Instantiate the model
+	gpModel_ = new MvQGeoPointsDataModel;
+
+	// Instantiate the sort model
+	gpSortModel_= new QSortFilterProxyModel;
+	gpSortModel_->setSourceModel(gpModel_);
+	gpSortModel_->setDynamicSortFilter(true);
+
+	// Build a tree to show the meta data
+	treeData_ = new MvQTreeView;
+	treeData_->setObjectName("geopTreeData");
+	treeData_->setProperty("mvStyle",0);
+	treeData_->setAlternatingRowColors(true);
+	treeData_->setAllColumnsShowFocus(true);
+	treeData_->setUniformRowHeights(true);
+	treeData_->setRootIsDecorated(false);
+	treeData_->setActvatedByKeyNavigation(true);
+
+	// Set the sort model
+	treeData_->setModel(gpSortModel_);
+	treeData_->setSortingEnabled(true);
+
+	connect(treeData_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectDataRow(QModelIndex)));
+
+	connect(treeData_,SIGNAL(activated(const QModelIndex&)),
+		this,SLOT(slotSelectDataRow(const QModelIndex&)));
+		
+	dataLayout->addWidget(treeData_,1);	   		   
+}
+
+void GeopExaminer::setupFindBox()
+{	
+	dataFind_= new MvQTreeViewSearchLine(treeData_,1,"");
+
+	findPanel_=new MvQSearchLinePanel;
+	findPanel_->addSearchLine(dataFind_,treeData_);
+	findPanel_->hide();
+}
+
+bool GeopExaminer::initMetaData( const string& filename )
+{
+	// Clean metadata if already exists
+	if ( data_ )
+	{
+		delete data_;
+		data_ = 0;
+	}
+
+	// Write inicial message in the log area
+	LogItem *log = new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Loading file");
+	log->method("MvGeoPoints API");
+
+	// Initialize netcdf metadata object
+	data_ = new MvGeoPoints();
+	bool ok = data_->load( filename.c_str() );
+
+	// Update File info label
+	updateFileInfoLabel();
+
+	// Check if it is a valid geopoints file
+	if ( !ok )
+	{
+		delete data_;
+		data_ = 0;
+		log->error("Could not open geopoints file");
+		slotUpdateLogOutput();
+		QString buf = tr("<b>Status: </b><font color=red>FAILED</font>");
+		emit statusMessage(buf);
+		return false;
+	}
+	slotUpdateLogOutput();
+	QString buf = tr("<b>Status:</b> <font color=green>OK</font>");
+	emit statusMessage(buf);
+
+	// Instantiate the model
+	/*gpModel_ = new MvQGeoPointsDataModel;
+
+	// Instantiate the sort model
+	gpSortModel_= new QSortFilterProxyModel;
+	gpSortModel_->setSourceModel(gpModel_);
+	gpSortModel_->setDynamicSortFilter(true);
+
+	// Set the sort model
+	treeData_->setModel(gpSortModel_);
+	treeData_->setSortingEnabled(true);*/
+
+	// Load data
+	gpModel_->dataIsAboutToChange();
+	gpModel_->setData(data_);
+
+	// Sort the first column
+	treeData_->sortByColumn (0,Qt::AscendingOrder);
+
+	// Set min/max values
+	dataRowSpin_->setRange(1,data_->count());
+
+#if 0   // rezise according to the column contents
+	for(int i=0;i < gpModel_->columnCount()-1; i++)
+	{ 
+		treeData_->resizeColumnToContents(i);
+	}
+#endif
+
+	return true;
+}
+
+void GeopExaminer::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void GeopExaminer::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+void GeopExaminer::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+}
+
+void GeopExaminer::updateFileInfoLabel()
+{
+	fileInfoLabel_->setGeopTextLabel( QString::fromStdString(data_->path()), QString::fromStdString(data_->sFormat()), data_->count() );
+}
+
+void GeopExaminer::slotShowAboutBox()
+{
+	MvQAbout about("Geopoints Examiner","",MvQAbout::MetviewVersion );
+	about.exec();
+}
+
+void GeopExaminer::setupLogArea()
+{
+	// Log Area
+	QVBoxLayout *logLayout = new QVBoxLayout;
+	logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	logLayout->setSpacing(1);
+	logPanel_= new QWidget;
+	logPanel_->setMinimumHeight(100);
+	logPanel_->setLayout(logLayout);
+	//mainSplitter_->addWidget(logPanel_);
+
+	// Define header layout
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);
+
+	// Add label to the header
+	QLabel* label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	hb->addWidget(label,1);
+
+	// Add Clear button to the header
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+
+	// Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	// Signals and slots
+	connect ( clearPb,SIGNAL(clicked(bool)), this,SLOT(slotClearLog(bool)) );
+}
+
+void GeopExaminer::slotDataRowSpinChanged(int msgNumber)
+{
+	if(ignoreDataRowSpinChangeSignal_)
+		return;
+	
+	QModelIndex srcIndex = gpModel_->index(msgNumber-1,0);
+	treeData_->setCurrentIndex(gpSortModel_->mapFromSource(srcIndex));
+}
+
+void GeopExaminer::slotSelectDataRow(const QModelIndex &index)
+{
+	QModelIndex srcIndex=gpSortModel_->mapToSource(index);
+	
+  	int cnt=gpModel_->data(gpModel_->index(srcIndex.row(),0)).toInt();
+	if(cnt > 0)
+	{
+		ignoreDataRowSpinChangeSignal_=true;
+		dataRowSpin_->setValue(cnt);
+		ignoreDataRowSpinChangeSignal_=false;
+	}
+}  
+
+void GeopExaminer::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-GeopExaminer");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+//	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.setValue("actionFileInfoStatus",actionFileInfo_->isChecked());
+	settings.endGroup();
+}
+
+void GeopExaminer::readSettings()
+{
+	QSettings settings("ECMWF","MV4-GeopExaminer");
+
+	QVariant value;
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+//	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+	
+	if(settings.value("actionFileInfoStatus").isNull())
+		actionFileInfo_->setChecked(true);
+	else
+		actionFileInfo_->setChecked(settings.value("actionFileInfoStatus").toBool());
+
+	settings.endGroup();
+}
diff --git a/src/GeopExaminer/GeopExaminer.h b/src/GeopExaminer/GeopExaminer.h
new file mode 100644
index 0000000..0ab6e83
--- /dev/null
+++ b/src/GeopExaminer/GeopExaminer.h
@@ -0,0 +1,87 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GeopExaminer_H
+#define GeopExaminer_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+class QSpinBox;
+class QSplitter;
+class QSortFilterProxyModel;
+
+class MvGeoPoints;
+class MvQFileInfoLabel;
+class MvQLogBrowser;
+class MvQGeoPointsDataModel;
+class MvQSearchLinePanel;
+class MvQTreeView;
+class MvQTreeViewSearchLine;
+
+using namespace std;
+
+class GeopExaminer : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+    	GeopExaminer(QWidget *parent = 0);
+	~GeopExaminer();
+    	bool initMetaData(const string&);
+	void updateFileInfoLabel();
+
+public slots:
+	void slotShowAboutBox();
+	void slotUpdateLogOutput();
+	void slotClearLog(bool);
+	void slotStatusMessage(QString);
+	void slotDataRowSpinChanged(int);
+	void slotSelectDataRow(const QModelIndex&);
+
+signals:
+	void statusMessage(QString);
+
+private:
+	void setupEditActions();
+	void setupViewActions();
+	void setupHelpActions();
+	void setupDataBox();
+	void setupFindBox();
+	void setupLogArea();
+
+	void readSettings();
+	void writeSettings();
+
+	MvGeoPoints *data_;
+	MvQGeoPointsDataModel* gpModel_;
+	QSortFilterProxyModel* gpSortModel_;
+	MvQMainWindow::MenuItemMap menuItems_;
+	MvQFileInfoLabel*  fileInfoLabel_;
+
+	QAction* actionFileInfo_;
+	QSplitter* mainSplitter_;
+	QTabWidget* metaTab_;
+	MvQLogBrowser* logBrowser_;
+	MvQTreeView* treeData_;
+	QWidget* logPanel_;
+	QAction* actionLog_;
+	QLabel* statusMessageLabel_;
+	bool ignoreDataRowSpinChangeSignal_;
+	QSpinBox* dataRowSpin_;
+	QWidget* dataPanel_;
+	
+	MvQSearchLinePanel* findPanel_;
+	MvQTreeViewSearchLine* dataFind_;
+};
+
+#endif
diff --git a/src/GeopExaminer/Makefile.am b/src/GeopExaminer/Makefile.am
new file mode 100644
index 0000000..4357da3
--- /dev/null
+++ b/src/GeopExaminer/Makefile.am
@@ -0,0 +1,28 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+bin_PROGRAMS = bin/GeopExaminer
+bin_GeopExaminer_SOURCES = MvMain.cc GeopExaminer.cc GeopExaminer.h MvGeoPointsModel.cc MvGeoPointsModel.h
+
+nodist_bin_GeopExaminer_SOURCES = GeopExaminer.moc.cpp
+
+bin_GeopExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_GeopExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_GeopExaminer_LDFLAGS  = $(QT_LDFLAGS)
+bin_GeopExaminer_LDADD    = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_GeopExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+BUILT_SOURCES = bin GeopExaminer.moc.cpp MvGeoPointsModel.moc.cpp
+
+EXTRA_DIST =
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/GeopExaminer *.o *.moc.cpp *.qrc.cpp
diff --git a/src/GeopExaminer/Makefile.in b/src/GeopExaminer/Makefile.in
new file mode 100644
index 0000000..a231e40
--- /dev/null
+++ b/src/GeopExaminer/Makefile.in
@@ -0,0 +1,866 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/GeopExaminer$(EXEEXT)
+subdir = src/GeopExaminer
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_GeopExaminer_OBJECTS = bin_GeopExaminer-MvMain.$(OBJEXT) \
+	bin_GeopExaminer-GeopExaminer.$(OBJEXT) \
+	bin_GeopExaminer-MvGeoPointsModel.$(OBJEXT)
+nodist_bin_GeopExaminer_OBJECTS =  \
+	bin_GeopExaminer-GeopExaminer.moc.$(OBJEXT)
+bin_GeopExaminer_OBJECTS = $(am_bin_GeopExaminer_OBJECTS) \
+	$(nodist_bin_GeopExaminer_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_GeopExaminer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) \
+	$(bin_GeopExaminer_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_GeopExaminer_SOURCES) \
+	$(nodist_bin_GeopExaminer_SOURCES)
+DIST_SOURCES = $(bin_GeopExaminer_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_GeopExaminer_SOURCES = MvMain.cc GeopExaminer.cc GeopExaminer.h MvGeoPointsModel.cc MvGeoPointsModel.h
+nodist_bin_GeopExaminer_SOURCES = GeopExaminer.moc.cpp
+bin_GeopExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_GeopExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_GeopExaminer_LDFLAGS = $(QT_LDFLAGS)
+bin_GeopExaminer_LDADD = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_GeopExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+BUILT_SOURCES = bin GeopExaminer.moc.cpp MvGeoPointsModel.moc.cpp
+EXTRA_DIST = 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/GeopExaminer/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/GeopExaminer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/GeopExaminer$(EXEEXT): $(bin_GeopExaminer_OBJECTS) $(bin_GeopExaminer_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/GeopExaminer$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_GeopExaminer_LINK) $(bin_GeopExaminer_OBJECTS) $(bin_GeopExaminer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeopExaminer-GeopExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeopExaminer-MvMain.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_GeopExaminer-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-MvMain.o -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-MvMain.Tpo -c -o bin_GeopExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-MvMain.Tpo $(DEPDIR)/bin_GeopExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_GeopExaminer-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_GeopExaminer-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-MvMain.Tpo -c -o bin_GeopExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-MvMain.Tpo $(DEPDIR)/bin_GeopExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_GeopExaminer-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_GeopExaminer-GeopExaminer.o: GeopExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-GeopExaminer.o -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-GeopExaminer.Tpo -c -o bin_GeopExaminer-GeopExaminer.o `test -f 'GeopExaminer.cc' || echo '$(srcdir)/'`GeopExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-GeopExaminer.Tpo $(DEPDIR)/bin_GeopExaminer-GeopExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopExaminer.cc' object='bin_GeopExaminer-GeopExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-GeopExaminer.o `test -f 'GeopExaminer.cc' || echo '$(srcdir)/'`GeopExaminer.cc
+
+bin_GeopExaminer-GeopExaminer.obj: GeopExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-GeopExaminer.obj -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-GeopExaminer.Tpo -c -o bin_GeopExaminer-GeopExaminer.obj `if test -f 'GeopExaminer.cc'; then $(CYGPATH_W) 'GeopExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/GeopExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-GeopExaminer.Tpo $(DEPDIR)/bin_GeopExaminer-GeopExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopExaminer.cc' object='bin_GeopExaminer-GeopExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-GeopExaminer.obj `if test -f 'GeopExaminer.cc'; then $(CYGPATH_W) 'GeopExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/GeopExaminer.cc'; fi`
+
+bin_GeopExaminer-MvGeoPointsModel.o: MvGeoPointsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-MvGeoPointsModel.o -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Tpo -c -o bin_GeopExaminer-MvGeoPointsModel.o `test -f 'MvGeoPointsModel.cc' || echo '$(srcdir)/'`MvGeoPointsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Tpo $(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvGeoPointsModel.cc' object='bin_GeopExaminer-MvGeoPointsModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-MvGeoPointsModel.o `test -f 'MvGeoPointsModel.cc' || echo '$(srcdir)/'`MvGeoPointsModel.cc
+
+bin_GeopExaminer-MvGeoPointsModel.obj: MvGeoPointsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-MvGeoPointsModel.obj -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Tpo -c -o bin_GeopExaminer-MvGeoPointsModel.obj `if test -f 'MvGeoPointsModel.cc'; then $(CYGPATH_W) 'MvGeoPointsModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvGeoPointsModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Tpo $(DEPDIR)/bin_GeopExaminer-MvGeoPointsModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvGeoPointsModel.cc' object='bin_GeopExaminer-MvGeoPointsModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-MvGeoPointsModel.obj `if test -f 'MvGeoPointsModel.cc'; then $(CYGPATH_W) 'MvGeoPointsModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvGeoPointsModel.cc'; fi`
+
+bin_GeopExaminer-GeopExaminer.moc.o: GeopExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-GeopExaminer.moc.o -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Tpo -c -o bin_GeopExaminer-GeopExaminer.moc.o `test -f 'GeopExaminer.moc.cpp' || echo '$(srcdir)/'`GeopExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Tpo $(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopExaminer.moc.cpp' object='bin_GeopExaminer-GeopExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-GeopExaminer.moc.o `test -f 'GeopExaminer.moc.cpp' || echo '$(srcdir)/'`GeopExaminer.moc.cpp
+
+bin_GeopExaminer-GeopExaminer.moc.obj: GeopExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GeopExaminer-GeopExaminer.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Tpo -c -o bin_GeopExaminer-GeopExaminer.moc.obj `if test -f 'GeopExaminer.moc.cpp'; then $(CYGPATH_W) 'GeopExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GeopExaminer.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Tpo $(DEPDIR)/bin_GeopExaminer-GeopExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopExaminer.moc.cpp' object='bin_GeopExaminer-GeopExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeopExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GeopExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeopExaminer-GeopExaminer.moc.obj `if test -f 'GeopExaminer.moc.cpp'; then $(CYGPATH_W) 'GeopExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GeopExaminer.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/GeopExaminer *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/GeopExaminer/MvGeoPointsModel.cc b/src/GeopExaminer/MvGeoPointsModel.cc
new file mode 100644
index 0000000..a96e536
--- /dev/null
+++ b/src/GeopExaminer/MvGeoPointsModel.cc
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvGeoPointsModel.h"
+#include "MvGeoPoints.h"
+
+
+MvQGeoPointsDataModel::MvQGeoPointsDataModel()
+{
+	data_=0;
+}
+
+void MvQGeoPointsDataModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQGeoPointsDataModel::setData(MvGeoPoints* data)
+{		
+	data_=data;
+
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+int MvQGeoPointsDataModel::columnCount( const QModelIndex& ) const
+{
+	if (data_ != 0)
+		return data_->ncols() + 1;
+
+	return 0;
+}
+
+int MvQGeoPointsDataModel::rowCount( const QModelIndex& parent) const
+{
+	//Non-root
+	if(parent.isValid() )
+		return 0;
+
+	//Root
+	if (data_ != 0)
+		return data_->count();
+
+	return 0;	
+}
+
+QVariant MvQGeoPointsDataModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || role != Qt::DisplayRole)		
+		return QVariant();
+
+	if(index.column() < 0 || index.column() >= data_->ncols()+1)
+		return QVariant();
+
+	if(index.column() == 0)
+		return index.row()+1;
+
+	// Get an specific row and column element
+	int type;
+	QString val = QString::fromStdString(data_->value(index.row(),index.column(),type));
+	if ( type == eGeoVDouble )
+		return val.toDouble();
+	else if ( type == eGeoVLong )
+		return val.toInt();
+
+	return val;
+}
+
+QVariant MvQGeoPointsDataModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole)
+		return QAbstractItemModel::headerData( section, orient, role );
+
+ 	if(section < 0 || (data_ && section >= data_->ncols()+1))
+		return QVariant();
+	
+	if (section == 0)
+		return QString(tr("Index"));
+
+	// Get an specific column name
+	return QString::fromStdString(data_->scol(section-1));
+}
+
+QModelIndex MvQGeoPointsDataModel::index( int row, int column, const QModelIndex& ) const
+{
+	if(data_ == 0 || data_->count() <= 0 || column < 0)
+		return QModelIndex();
+	
+	return createIndex(row, column, 0); 
+}
+
+
+QModelIndex MvQGeoPointsDataModel::parent( const QModelIndex& ) const
+{			
+	return QModelIndex();
+}
diff --git a/src/GeopExaminer/MvGeoPointsModel.h b/src/GeopExaminer/MvGeoPointsModel.h
new file mode 100644
index 0000000..4aad7ef
--- /dev/null
+++ b/src/GeopExaminer/MvGeoPointsModel.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQGeoPointsModel_H
+#define MvQGeoPointsModel_H
+
+#include <QAbstractItemModel>
+
+class MvGeoPoints;
+
+class MvQGeoPointsDataModel : public QAbstractItemModel
+{
+
+public:
+   	MvQGeoPointsDataModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setData(MvGeoPoints*);
+	
+private:
+	MvGeoPoints* data_;
+
+};
+
+#endif
diff --git a/src/GeopExaminer/MvMain.cc b/src/GeopExaminer/MvMain.cc
new file mode 100644
index 0000000..dad8b13
--- /dev/null
+++ b/src/GeopExaminer/MvMain.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <iostream>
+
+#include "GeopExaminer.h"
+#include "Metview.h"
+#include "MvQService.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService
+{
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvGeopExaminer : public Base
+{	
+public:
+	MvGeopExaminer() : Base("GEOPOINTS") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvGeopExaminer::serve( MvRequest& in, MvRequest& )
+{
+cout << "--------------GeopExaminer::serve()--------------" << endl;
+in.print();
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(window);
+	Q_INIT_RESOURCE(find);
+
+	// Get Geopoints file name
+	const char* name = in("PATH");
+
+	//Create the geopoints browser, initialize it and show it
+	GeopExaminer *browser = new GeopExaminer;
+	browser->initMetaData(name);
+	browser->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI
+	// To turn icon to green; otherwise, it will stay orange
+	MvRequest req;
+	sendReplyFromInteractive(req);
+
+	//Enter the app loop
+	app.exec();
+}
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+	av = argv;
+	
+	MvApplication theApp( argc, argv );
+
+	MvGeopExaminer geo;
+	
+	theApp.run();
+}
diff --git a/src/GribExaminer/GribExaminer.cc b/src/GribExaminer/GribExaminer.cc
new file mode 100644
index 0000000..780ea4e
--- /dev/null
+++ b/src/GribExaminer/GribExaminer.cc
@@ -0,0 +1,858 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QAction>
+#include <QCloseEvent>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QFile>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QSettings>
+#include <QSpinBox>
+#include <QSplitter>
+#include <QStackedWidget>
+#include <QStatusBar>
+#include <QString>
+#include <QStringList>
+#include <QTextBrowser>
+#include <QVBoxLayout>
+
+#include "GribExaminer.h"
+
+#include "GribMetaData.h"
+#include "MvKeyProfile.h"
+
+#include "MvQAbout.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQGribDumpModel.h"
+#include "MvQKeyProfileModel.h"
+#include "MvQKeyProfileTree.h"
+#include "MvQTextEditSearchLine.h"
+#include "MvQTreeView.h"
+#include "MvQTreeViewSearchLine.h"
+
+GribExaminer::GribExaminer(QWidget *parent) : MvQAbstractMessageExaminer("GribExaminer",parent)
+{	
+	setAttribute(Qt::WA_DeleteOnClose);
+
+	setWindowTitle("Metview - Grib Examiner");
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	//Init
+	messageType_="GRIB";
+
+	gribNameSpace_ << "Default" << "geography" << "ls" << "mars" 
+			<< "parameter" << "time" << "vertical";
+
+	mvDumpModel_=0;
+	stdDumpModel_=0;
+	wmoDumpModel_=0;
+	valueDumpModel_=0;
+
+	fileInfoLabelNeedsUpdating_=true;
+	ignoreValueRowSpinChangeSignal_=false;
+
+	//Set up grib dump boxes
+	setupDumpBox();
+
+	//Build ui
+
+	QWidget *w;
+
+	//----------------------
+	// Main splitter
+	//----------------------
+
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+
+        mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+	
+	//-----------------------------------------------------
+	// The main layout (the upper part of mainSplitter)
+	//-----------------------------------------------------
+  
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	w=new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	//------------------
+	// File info label
+	//------------------
+      
+ 	//Add to layout 
+	mainLayout->addWidget(fileInfoLabel_);
+
+	//---------------------
+	// Central splitter
+	//---------------------
+
+	centralSplitter_ = new QSplitter(this); 
+	centralSplitter_->setOpaqueResize(false);	
+	mainLayout->addWidget(centralSplitter_,1);
+
+	//-------------------------
+	// Populate central splitter
+	//-------------------------
+	
+	centralSplitter_->addWidget(messagePanel_);
+	centralSplitter_->addWidget(dumpPanel_);
+
+	//--------------------------
+	// Find widget
+	//--------------------------
+	
+	mainLayout->addWidget(findPanel_);
+	
+	//--------------------------
+	// Log Area
+	//--------------------------
+
+	mainSplitter_->addWidget(logPanel_);
+	mainSplitter_->setCollapsible(1,false);
+
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+
+	//Status bar	
+ 	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+	
+	connect(this,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+	
+	//-------------------------
+	// Settings
+	//-------------------------
+	
+	readSettings();
+}
+ 
+GribExaminer::~GribExaminer()
+{	
+	writeSettings();
+	
+	if(mvDumpModel_) delete mvDumpModel_;
+	if(stdDumpModel_) delete stdDumpModel_;
+	if(wmoDumpModel_) delete wmoDumpModel_;
+	if(valueDumpModel_) delete valueDumpModel_;	
+}
+
+void GribExaminer::closeEvent (QCloseEvent * event)
+{
+	close();
+	event->accept();
+}
+
+
+void GribExaminer::setupDumpBox()
+{
+	dumpPanel_=new QWidget;
+	QVBoxLayout *dumpLayout = new QVBoxLayout;
+	dumpLayout->setContentsMargins(0,0,0,0);
+	dumpPanel_->setLayout(dumpLayout);	
+
+	//------------------------------
+	// Dump combo
+	//------------------------------
+	
+	QHBoxLayout *dumpComboLayout=new  QHBoxLayout;
+
+	//Combo box for key profile selection
+	QLabel *dumpLabel = new QLabel(tr("Dump mode:"));
+	dumpCombo_ = new QComboBox;
+	dumpLabel->setBuddy(dumpCombo_);
+
+	dumpComboLayout->addWidget(dumpLabel);
+	dumpComboLayout->addWidget(dumpCombo_);
+	dumpComboLayout->addStretch(1);
+		
+	dumpCombo_->addItem(tr("Namespace"));
+	dumpCombo_->addItem(tr("Standard"));
+	dumpCombo_->addItem(tr("Values"));
+	dumpCombo_->addItem(tr("WMO-style"));
+	dumpCombo_->setCurrentIndex(-1);
+	
+	dumpLayout->addLayout(dumpComboLayout);
+
+	//---------------------------------
+	// Stacked widget for dump modes
+	//---------------------------------
+
+	dumpStacked_ = new QStackedWidget;
+	dumpLayout->addWidget(dumpStacked_);
+
+	//---------------------------------
+	// Mv dump
+	//--------------------------------
+		
+	//Layout
+	QVBoxLayout *mvDumpLayout=new QVBoxLayout;	
+	QWidget *w = new QWidget;
+	w->setLayout(mvDumpLayout);
+	dumpStacked_->addWidget(w);
+
+	QHBoxLayout *nsComboLayout=new  QHBoxLayout;
+
+	QLabel *nsLabel = new QLabel(tr("GRIB API Namespace:"));
+	nsCombo_ = new QComboBox;
+	nsLabel->setBuddy(nsCombo_);
+
+	nsComboLayout->addWidget(nsLabel);
+	nsComboLayout->addWidget(nsCombo_);
+	nsComboLayout->addStretch(1);
+
+	nsCombo_->addItems(gribNameSpace_);
+	nsCombo_->setCurrentIndex(-1);
+	mvDumpLayout->addLayout(nsComboLayout);
+
+	//Message tree
+	mvDumpModel_= new MvQGribMvDumpModel;
+	mvDumpSortModel_= new QSortFilterProxyModel;
+        mvDumpSortModel_->setSourceModel(mvDumpModel_);
+	mvDumpSortModel_->setDynamicSortFilter(true);
+	mvDumpSortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	mvDumpSortModel_->setFilterFixedString("1");
+	mvDumpSortModel_->setFilterKeyColumn(0);
+
+	mvDumpTree_= new MvQTreeView;
+	mvDumpTree_->setObjectName("mvDumpTree");
+	mvDumpTree_->setProperty("mvStyle",1);
+	mvDumpTree_->setSortingEnabled(true);
+	mvDumpTree_->sortByColumn (0,Qt::AscendingOrder); 
+	mvDumpTree_->setAlternatingRowColors(true);
+	mvDumpTree_->setAllColumnsShowFocus(true);
+	mvDumpTree_->setModel(mvDumpSortModel_);
+	mvDumpTree_->setRootIsDecorated(false);
+
+	mvDumpTree_->setDragDropMode(QAbstractItemView::DragOnly);
+
+	mvDumpLayout->addWidget(mvDumpTree_);
+	
+	mvDumpSearch_= new MvQTreeViewSearchLine(mvDumpTree_,0,"");
+	findPanel_->addSearchLineToRight(mvDumpSearch_,w);
+		
+	//---------------------------------
+	// Std dump
+	//--------------------------------
+
+	//Tab
+	stdDumpTab_ = new QTabWidget;	
+	//stdDumpLayout->addWidget(stdTab);
+	dumpStacked_->addWidget(stdDumpTab_);
+
+	stdDumpTree_= new MvQTreeView;
+	stdDumpModel_= new MvQGribStdDumpModel;
+	stdDumpTree_->setModel(stdDumpModel_);
+	stdDumpTree_->setObjectName("stdDumpTree");
+	stdDumpTree_->setProperty("mvStyle",1);
+	stdDumpTree_->setAlternatingRowColors(true);
+	stdDumpTree_->setAllColumnsShowFocus(true);
+	stdDumpTree_->setDragDropMode(QAbstractItemView::DragOnly);
+	
+	stdDumpTab_->addTab(stdDumpTree_,tr("Tree view"));
+
+	stdDumpBrowser_=new QTextBrowser;
+	stdDumpBrowser_->setProperty("mvStyle","fileContents");
+	stdDumpTab_->addTab(stdDumpBrowser_,tr("Plain text"));
+
+	stdDumpSearch_= new MvQTreeViewSearchLine(stdDumpTree_,0,"");
+	findPanel_->addSearchLineToRight(stdDumpSearch_,stdDumpTree_);
+
+	stdDumpTextSearch_= new MvQTextEditSearchLine(stdDumpBrowser_,"");
+	findPanel_->addSearchLineToRight(stdDumpTextSearch_,stdDumpBrowser_);
+
+	connect(stdDumpTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotCurrentStdDumpChanged(int)));
+		
+	//---------------------------------	
+	// Value dump
+	//--------------------------------
+
+	QVBoxLayout *valueDumpLayout=new QVBoxLayout;	
+	w=new QWidget();
+	w->setLayout(valueDumpLayout);
+		
+	//Spin box for index selection
+	QLabel *spinLabel = new QLabel(tr("Go to row:"));
+	valueRowSpin_ = new QSpinBox;
+	spinLabel->setBuddy(valueRowSpin_);
+	QHBoxLayout* valueSpinLayout = new QHBoxLayout;
+	valueSpinLayout->addWidget(spinLabel);
+	valueSpinLayout->addWidget(valueRowSpin_);
+			
+	valueDumpLabel_= new QLabel;
+	valueSpinLayout->addWidget(valueDumpLabel_);
+	valueSpinLayout->addStretch(1);	
+	
+	valueDumpLayout->addLayout(valueSpinLayout);
+	
+	// Signals and slots
+	connect(valueRowSpin_, SIGNAL(valueChanged(int)),
+		this, SLOT(slotValueRowSpinChanged(int)));
+	
+	valueDumpModel_= new MvQGribValueDumpModel;
+	valueDumpSortModel_= new QSortFilterProxyModel;
+        valueDumpSortModel_->setSourceModel(valueDumpModel_);
+	valueDumpSortModel_->setDynamicSortFilter(true);
+	valueDumpSortModel_->setSortRole(Qt::UserRole);
+	
+	valueDumpTree_= new MvQTreeView;
+	valueDumpTree_->setObjectName("valueDumpTree");
+	valueDumpTree_->setProperty("mvStyle",1);
+	valueDumpTree_->setSortingEnabled(true);
+	valueDumpTree_->sortByColumn (0,Qt::AscendingOrder);
+	valueDumpTree_->setAlternatingRowColors(true);
+	valueDumpTree_->setAllColumnsShowFocus(true);
+	valueDumpTree_->setModel(valueDumpSortModel_);
+	valueDumpTree_->setRootIsDecorated(false);
+	valueDumpTree_->setUniformRowHeights(true);
+	valueDumpTree_->setActvatedByKeyNavigation(true);
+	
+	valueDumpLayout->addWidget(valueDumpTree_);
+	
+	connect(valueDumpTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectValueRow(QModelIndex)));
+
+	connect(valueDumpTree_,SIGNAL(activated(const QModelIndex&)),
+		this,SLOT(slotSelectValueRow(const QModelIndex&)));
+	
+	dumpStacked_->addWidget(w);
+
+	valueDumpSearch_= new MvQTreeViewSearchLine(valueDumpTree_,0,"");
+	findPanel_->addSearchLineToRight(valueDumpSearch_,valueDumpTree_);
+
+	//---------------------------------	
+	// Wmo dump
+	//--------------------------------
+	
+	//Tab
+	wmoDumpTab_ = new QTabWidget;	
+	//wmoDumpLayout->addWidget(wmoTab);
+	dumpStacked_->addWidget(wmoDumpTab_);
+
+	wmoDumpTree_= new MvQTreeView;
+	wmoDumpModel_= new MvQGribWmoDumpModel;
+	wmoDumpTree_->setModel(wmoDumpModel_);
+	wmoDumpTree_->setObjectName("wmoDumpTree");
+ 	wmoDumpTree_->setProperty("mvStyle",1);
+	wmoDumpTree_->setAlternatingRowColors(true);
+	wmoDumpTree_->setAllColumnsShowFocus(true);	
+	
+	wmoDumpTree_->setDragDropMode(QAbstractItemView::DragOnly);
+	wmoDumpTree_->setColumnToDrag(1);;
+
+	wmoDumpTab_->addTab(wmoDumpTree_,tr("Tree view"));
+
+	wmoDumpBrowser_=new QTextBrowser;
+	wmoDumpBrowser_->setProperty("mvStyle","fileContents");
+	wmoDumpTab_->addTab(wmoDumpBrowser_,tr("Plain text"));
+
+	wmoDumpSearch_= new MvQTreeViewSearchLine(wmoDumpTree_,1,"");
+	findPanel_->addSearchLineToRight(wmoDumpSearch_,wmoDumpTree_);
+
+	wmoDumpTextSearch_= new MvQTextEditSearchLine(wmoDumpBrowser_,"");
+	findPanel_->addSearchLineToRight(wmoDumpTextSearch_,wmoDumpBrowser_);
+
+	connect(wmoDumpTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotCurrentWmoDumpChanged(int)));			
+	
+	//Search
+	//QHBoxLayout *wmoSearchLayout = new QHBoxLayout;	
+	//wmoDumpSearch_ = new MvQSearchLineBase(wmoSearchLayout,tr("Search for key:"));
+	//wmoDumpLayout->addLayout(wmoSearchLayout );
+}
+
+void GribExaminer::initDumps()
+{
+	//Init dump combo
+	int currentIndex=dumpCombo_->currentIndex();
+	if(currentIndex == -1) currentIndex=3; //Default is wmo-dump
+	dumpCombo_->setCurrentIndex(-1);
+
+	connect(dumpCombo_, SIGNAL(currentIndexChanged(int)),
+                dumpStacked_, SLOT(setCurrentIndex(int)));
+	
+	connect(dumpCombo_, SIGNAL(currentIndexChanged(int)),
+                this, SLOT(slotChangeCurrentDump(int)));
+
+	dumpCombo_->setCurrentIndex(currentIndex);
+
+	//Init ns combo
+	currentIndex=nsCombo_->currentIndex();
+	if(currentIndex == -1) currentIndex=2; //Default is namesapce "ls"
+	nsCombo_->setCurrentIndex(-1);
+
+	connect(nsCombo_, SIGNAL(currentIndexChanged(const QString&)),
+                this, SLOT(slotSetGribNameSpace(const QString &)));
+
+	connect(nsCombo_, SIGNAL(currentIndexChanged(const QString&)),
+                this, SLOT(slotSetGribNameSpace(const QString &)));
+
+	nsCombo_->setCurrentIndex(currentIndex);
+	
+	/*//Synchronize the dump mode		
+	if(dumpCombo_->currentIndex() == 0)
+	{
+		dumpStacked_->setCurrentIndex(0);
+	}
+	dumpCombo_->setCurrentIndex(0);*/
+
+	//Set tree focus
+	wmoDumpTree_->setFocus(Qt::OtherFocusReason);
+}
+
+void GribExaminer::initAllKeys()
+{
+	//Get all keys
+	MvKeyProfile *prof=new MvKeyProfile("Metview keys");
+	prof->addKey(new MvKey("MV_Index","Index","Message index"));
+	allKeys_ << prof;
+
+	GribMetaData *grib=static_cast<GribMetaData*>(data_);
+
+	foreach(QString ns,gribNameSpace_)
+	{
+		QString pname="Namespace: " + ns;
+		MvKeyProfile *prof=new MvKeyProfile(pname.toStdString());
+		grib->getKeyList(1,ns.toStdString().c_str(),prof);
+		allKeys_ << prof;
+	}		
+}
+
+
+
+void GribExaminer::loadDumps()
+{
+	//At this point the first message scan has finished so we know the real  message
+	//number. It is not known at the beginning because for multi message fields
+	//grib_count_in_file thta we use to estimate the message number does not 
+	//count the sub messages. So we need to updeate the file info label now.
+	if(fileInfoLabelNeedsUpdating_)
+	{
+	  	updateFileInfoLabel();
+		fileInfoLabelNeedsUpdating_=false;
+	}	
+	
+	//Save the expand state of the current wmoDumpTree
+	QModelIndexList indexLst=wmoDumpModel_->match(wmoDumpModel_->index(0,0),
+			    Qt::DisplayRole,"*",-1,
+		            Qt::MatchWildcard | Qt::MatchRecursive);
+	
+	QModelIndexList expandLst;
+	foreach(QModelIndex index,indexLst)
+	{
+		if(wmoDumpTree_->isExpanded(index))
+			expandLst << index;
+	}	
+
+	mvDumpLoaded_=false;
+	wmoDumpLoaded_=false;
+	stdDumpLoaded_=false;
+	
+	//Unload value dump
+	GribValueDump* valueDump=valueDumpModel_->dumpData();
+	if(valueDump) 
+	{
+		valueDumpModel_->dataIsAboutToChange();
+		valueDumpModel_->setDumpData(0);
+		delete valueDump;
+	}	
+	valueDumpLoaded_=false;
+
+	//Generate and read grib dumps
+	switch(dumpCombo_->currentIndex())
+	{
+	case 0:
+		loadMvDump();
+		break;
+	case 1:
+		loadStdDump();
+		break;
+	case 2:
+		loadValueDump();
+		break;
+	case 3:
+		loadWmoDump();
+		break;
+	default:
+		break;
+	}
+
+	//Try to restore the expand state of the wmoDumpTree
+	foreach(QModelIndex index,expandLst)
+	{
+		if(wmoDumpModel_->hasChildren(index))
+		{
+			wmoDumpTree_->setExpanded(index,true);
+		}
+	}	
+}
+
+
+void GribExaminer::slotSetGribNameSpace(const QString &ns)
+{
+	if(mvDumpModel_)
+		mvDumpModel_->setGribNameSpace(ns);
+}
+
+
+void GribExaminer::loadMvDump()
+{	
+	if(mvDumpLoaded_) 
+		return;
+
+	slotStatusMessage(tr("Load namespace dump ..."));
+
+	int cnt=currentMessageNo_;
+
+	GribMvDump* currentDump=mvDumpModel_->dumpData();
+
+	//Generate and read grib dump
+	GribMvDump* dump = new GribMvDump;
+	dump->read(data_->fileName(),data_->unfilteredMessageCnt(cnt));	
+
+	mvDumpModel_->dataIsAboutToChange();
+	mvDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < mvDumpModel_->columnCount()-1; i++)
+	{ 
+		mvDumpTree_->resizeColumnToContents(i);
+	}
+
+	if(currentDump != 0)
+		delete currentDump;
+
+	mvDumpLoaded_=true;
+}
+
+
+void GribExaminer::loadWmoDump()
+{	
+	if(wmoDumpLoaded_) 
+		return;
+
+	slotStatusMessage(tr("Load wmo dump ..."));
+
+	int cnt=currentMessageNo_;
+
+	GribWmoDump* currentDump=wmoDumpModel_->dumpData();
+
+	//Generate and read grib dump
+	GribWmoDump* dump = new GribWmoDump;
+	dump->read(data_->fileName(),data_->unfilteredMessageCnt(cnt));	
+
+	wmoDumpModel_->dataIsAboutToChange();
+	wmoDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < wmoDumpModel_->columnCount()-1; i++)
+	{ 
+		wmoDumpTree_->resizeColumnToContents(i);
+	}
+
+       	wmoDumpBrowser_->setPlainText(QString(dump->text().c_str()));
+
+	if(currentDump != 0)
+		delete currentDump;
+
+	wmoDumpLoaded_=true;
+}
+
+void GribExaminer::loadStdDump()
+{		
+	if(stdDumpLoaded_) 
+		return;
+
+	slotStatusMessage(tr("Load default dump ..."));
+
+	int cnt=currentMessageNo_;
+
+	GribStdDump* currentDump=stdDumpModel_->dumpData();
+
+	//Generate and read grib dump
+	GribStdDump* dump = new GribStdDump;
+	dump->read(data_->fileName(),data_->unfilteredMessageCnt(cnt));	
+
+	stdDumpModel_->dataIsAboutToChange();
+	stdDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < stdDumpModel_->columnCount()-1; i++)
+	{ 
+		stdDumpTree_->resizeColumnToContents(i);
+	}
+	
+	// Text view for the dump
+        stdDumpBrowser_->setPlainText(QString(dump->text().c_str()));
+
+	if(currentDump != 0)
+		delete currentDump;
+
+	stdDumpLoaded_=true;
+}
+
+void GribExaminer::loadValueDump()
+{		
+	if(valueDumpLoaded_) 
+		return;
+
+	slotStatusMessage(tr("Load value dump ..."));
+
+	int cnt=currentMessageNo_;
+
+	GribValueDump* currentDump=valueDumpModel_->dumpData();
+
+	//Generate and read grib dump
+	GribValueDump* dump = new GribValueDump;
+	dump->read(data_->fileName(),data_->unfilteredMessageCnt(cnt));	
+
+	valueDumpModel_->dataIsAboutToChange();
+	valueDumpModel_->setDumpData(dump);
+
+	for(int i=0;i < valueDumpModel_->columnCount()-1; i++)
+	{ 
+		valueDumpTree_->resizeColumnToContents(i);
+	}
+	
+	// Set min/max values for spinbox
+	valueRowSpin_->setRange(1,dump->num());
+	
+	//Update info
+	QString info=" (Number of points: " + QString::number(dump->num()) + ")";
+	//info+="  <b>Average:</b> " + QString::number(dump->average());
+	//info+="  <b>Stdev:</b> " + QString::number(dump->stdev());
+	//info+=" <b>Skewness:</b> " + QString::number(dump->skewness()); 
+	//info+=" <b>Kurtosis:</b> " + QString::number(dump->kurtosis());
+	
+	valueDumpLabel_->setText(info);
+	
+	if(currentDump != 0)
+		delete currentDump;
+
+	valueDumpLoaded_=true;
+}
+
+
+void GribExaminer::slotChangeCurrentDump(int index)
+{
+	//Generate and read grib dumps
+	switch(index)
+	{
+	case 0:
+		loadMvDump();
+		break;
+	case 1:
+		loadStdDump();
+		break;
+	case 2:
+		loadValueDump();
+		break;	
+	case 3:
+		loadWmoDump();
+		break;		
+	default:
+		break;
+	}
+
+	emit logOutputChanged();
+
+	dumpStacked_->setCurrentIndex(index);
+	
+	switch(index)
+	{
+	case 0:
+		findPanel_->setCurrentSearchLineById(dumpStacked_->widget(index));
+		break;
+	case 1:
+		slotCurrentStdDumpChanged(stdDumpTab_->currentIndex());
+		break;
+	case 2:
+		findPanel_->setCurrentSearchLineById(valueDumpTree_);
+		break;
+	case 3:
+		slotCurrentWmoDumpChanged(wmoDumpTab_->currentIndex());
+		break;
+	default:
+		break;
+	}
+	
+	
+}
+
+void GribExaminer::slotCurrentStdDumpChanged(int index)
+{
+	findPanel_->setCurrentSearchLineById(stdDumpTab_->widget(index));
+} 
+  
+void GribExaminer::slotCurrentWmoDumpChanged(int index)
+{
+	findPanel_->setCurrentSearchLineById(wmoDumpTab_->widget(index));
+} 
+
+void GribExaminer::slotValueRowSpinChanged(int rowNumber)
+{
+	if(ignoreValueRowSpinChangeSignal_)
+		return;
+	
+	QModelIndex srcIndex = valueDumpModel_->index(rowNumber-1,0);
+	valueDumpTree_->setCurrentIndex(valueDumpSortModel_->mapFromSource(srcIndex));
+}
+
+void GribExaminer::slotSelectValueRow(const QModelIndex &index)
+{
+	QModelIndex srcIndex=valueDumpSortModel_->mapToSource(index);
+	
+  	int cnt=valueDumpModel_->data(valueDumpModel_->index(srcIndex.row(),0)).toInt();
+	if(cnt > 0)
+	{
+		ignoreValueRowSpinChangeSignal_=true;
+		valueRowSpin_->setValue(cnt);
+		ignoreValueRowSpinChangeSignal_=false;
+	}
+}  
+
+
+void GribExaminer::slotShowAboutBox()
+{
+	MvQAbout about("GribExaminer","",MvQAbout::GribApiVersion | MvQAbout::MetviewVersion);
+	about.exec();
+}
+
+void GribExaminer::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+}
+
+void GribExaminer::updateFileInfoLabel()
+{
+	GribMetaData *grib=static_cast<GribMetaData*>(data_);
+	
+	fileInfoLabel_->setGribTextLabel(QString(data_->fileName().c_str()),data_->totalMessageNum(),
+					 data_->isFilterEnabled(),data_->messageNum(),grib->hasMultiMessage());
+}
+
+void GribExaminer::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-GribExaminer");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.endGroup();
+	
+	settings.beginGroup("GribExaminer");
+	settings.setValue("actionFileInfoStatus",actionFileInfo_->isChecked());
+	settings.setValue("keyProfileName",keyCombo_->currentText());
+	settings.setValue("dumpMode",dumpCombo_->currentText());
+	settings.setValue("gribNameSpace",nsCombo_->currentText());
+	settings.setValue("stdDumpTabIndex",stdDumpTab_->currentIndex());
+	settings.setValue("wmoDumpTabIndex",wmoDumpTab_->currentIndex());
+	settings.setValue("actionLogStatus",actionLog_->isChecked());
+	settings.endGroup();
+}
+
+void GribExaminer::readSettings()
+{
+	QVariant value;
+
+	QSettings settings("ECMWF","MV4-GribExaminer");
+	
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+
+	settings.endGroup();
+
+
+	settings.beginGroup("GribExaminer");
+
+	QString txt; 
+	int ival;
+
+	if(settings.value("actionFileInfoStatus").isNull())
+	{
+		actionFileInfo_->setChecked(true);
+	}
+	else
+	{
+		actionFileInfo_->setChecked(settings.value("actionFileInfoStatus").toBool());
+	}
+
+	if(settings.value("actionLogStatus").isNull())
+	{
+		//By default it should be false
+		actionLog_->setChecked(false);
+	}
+	else
+	{
+		actionLog_->setChecked(settings.value("actionLogStatus").toBool());
+	}
+
+	//Init key combo
+	//It is empty at this stage!!
+	savedKeyProfileName_=settings.value("keyProfileName").toString();
+	/*for(int i=0; i < keyCombo_->count(); i++)
+	{
+		if(keyCombo_->itemText(i) == txt)
+		{
+			keyCombo_->setCurrentIndex(i);
+			break;
+		}
+	}*/
+
+	//Init dump combo
+	txt=settings.value("dumpMode").toString();
+	for(int i=0; i < dumpCombo_->count(); i++)
+	{
+		if(dumpCombo_->itemText(i) == txt)
+		{
+			dumpCombo_->setCurrentIndex(i);
+			break;
+		}
+	}
+
+	//Init grib namsepace
+	txt=settings.value("gribNameSpace").toString();
+	for(int i=0; i < nsCombo_->count(); i++)
+	{
+		if(nsCombo_->itemText(i) == txt)
+		{
+			nsCombo_->setCurrentIndex(i);
+			break;
+		}
+	}
+	
+	//Init tabs
+	ival=settings.value("stdDumpTabIndex").toInt();
+	stdDumpTab_->setCurrentIndex(ival);
+
+	//Init tabs
+	ival=settings.value("wmoDumpTabIndex").toInt();
+	wmoDumpTab_->setCurrentIndex(ival);
+
+
+	settings.endGroup();
+}
diff --git a/src/GribExaminer/GribExaminer.h b/src/GribExaminer/GribExaminer.h
new file mode 100644
index 0000000..0e8fd64
--- /dev/null
+++ b/src/GribExaminer/GribExaminer.h
@@ -0,0 +1,116 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GribExaminer_H
+#define GribExaminer_H
+
+#include <QStringList> 
+
+#include "MvQAbstractMessageExaminer.h"
+
+class QComboBox;
+class QLabel;
+class QSpinBox;
+class QSplitter;
+class QStackedWidget;
+class QTabWidget;
+class QTextBrowser;
+
+class MvQGribMvDumpModel;
+class MvQGribWmoDumpModel;
+class MvQGribStdDumpModel;
+class MvQGribValueDumpModel;
+class MvQTextEditSearchLine;
+class MvQTreeView;
+class MvQTreeViewSearchLine;
+
+class GribExaminer : public MvQAbstractMessageExaminer
+{
+    Q_OBJECT
+
+public:
+    	GribExaminer(QWidget *parent = 0);
+    	~GribExaminer();
+  
+public slots:	
+	void slotChangeCurrentDump(int);	
+	void slotSetGribNameSpace(const QString &);
+	void slotCurrentStdDumpChanged(int);
+	void slotCurrentWmoDumpChanged(int);
+	void slotValueRowSpinChanged(int);
+	void slotSelectValueRow(const QModelIndex &);
+	void slotShowAboutBox();
+	void slotStatusMessage(QString);
+	
+protected:
+	void closeEvent(QCloseEvent *);
+	void setupDumpBox();
+ 	
+	void initDumps();
+	void initAllKeys();
+
+	void loadDumps();
+	void loadMvDump();
+	void loadWmoDump();
+	void loadStdDump();
+	void loadValueDump();
+	
+	void updateFileInfoLabel();
+	void settatusMessage(QString);
+	
+	void writeSettings();
+	void readSettings();
+	
+	QSplitter*   centralSplitter_;
+	QSplitter*   mainSplitter_;
+	
+	QLabel *statusMessageLabel_;
+	QString lastKeyProfileName_;
+	
+	QStackedWidget* dumpStacked_;
+	QComboBox*   dumpCombo_;
+
+	QComboBox*   nsCombo_;
+	QStringList  gribNameSpace_;
+
+	MvQTreeView*   mvDumpTree_;
+	MvQGribMvDumpModel* mvDumpModel_;
+	QSortFilterProxyModel* mvDumpSortModel_;
+	bool mvDumpLoaded_;
+	MvQTreeViewSearchLine* mvDumpSearch_;
+
+	QTabWidget*   stdDumpTab_;
+	MvQTreeView*   stdDumpTree_;
+	MvQGribStdDumpModel* stdDumpModel_;
+	QTextBrowser*  stdDumpBrowser_;
+	bool stdDumpLoaded_;
+	MvQTreeViewSearchLine* stdDumpSearch_;
+	MvQTextEditSearchLine* stdDumpTextSearch_;
+
+	QTabWidget*   wmoDumpTab_;
+	MvQTreeView*   wmoDumpTree_;
+	MvQGribWmoDumpModel* wmoDumpModel_;
+	QTextBrowser*  wmoDumpBrowser_;
+	bool wmoDumpLoaded_;
+	MvQTreeViewSearchLine* wmoDumpSearch_;
+	MvQTextEditSearchLine* wmoDumpTextSearch_;
+	
+	QSpinBox* valueRowSpin_;
+	QLabel* valueDumpLabel_;
+	MvQTreeView*   valueDumpTree_;
+	MvQGribValueDumpModel* valueDumpModel_;
+	QSortFilterProxyModel* valueDumpSortModel_;
+	bool valueDumpLoaded_;
+	MvQTreeViewSearchLine* valueDumpSearch_;
+	bool ignoreValueRowSpinChangeSignal_;
+		
+	bool fileInfoLabelNeedsUpdating_;
+};
+
+#endif
diff --git a/src/GribExaminer/Makefile.am b/src/GribExaminer/Makefile.am
new file mode 100755
index 0000000..c2a3438
--- /dev/null
+++ b/src/GribExaminer/Makefile.am
@@ -0,0 +1,32 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+bin_PROGRAMS = bin/GribExaminer
+bin_GribExaminer_SOURCES =  MvMain.cc GribExaminer.cc  MvQGribDumpModel.cc \
+			    GribExaminer.h MvQGribDumpModel.h
+
+nodist_bin_GribExaminer_SOURCES =  GribExaminer.moc.cpp
+
+bin_GribExaminer_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_GribExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_GribExaminer_LDFLAGS  = $(QT_LDFLAGS)
+bin_GribExaminer_LDADD    = $(LDADD)  ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a  $(STANDARD_METVIEW_LIBS) $(QT_LIBS)
+bin_GribExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+BUILT_SOURCES = bin GribExaminer.moc.cpp
+
+EXTRA_DIST = 
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/GribExaminer *.o *.moc.cpp *.qrc.cpp
+
+
+
diff --git a/src/GribExaminer/Makefile.in b/src/GribExaminer/Makefile.in
new file mode 100644
index 0000000..9e7c022
--- /dev/null
+++ b/src/GribExaminer/Makefile.in
@@ -0,0 +1,868 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/GribExaminer$(EXEEXT)
+subdir = src/GribExaminer
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_GribExaminer_OBJECTS = bin_GribExaminer-MvMain.$(OBJEXT) \
+	bin_GribExaminer-GribExaminer.$(OBJEXT) \
+	bin_GribExaminer-MvQGribDumpModel.$(OBJEXT)
+nodist_bin_GribExaminer_OBJECTS =  \
+	bin_GribExaminer-GribExaminer.moc.$(OBJEXT)
+bin_GribExaminer_OBJECTS = $(am_bin_GribExaminer_OBJECTS) \
+	$(nodist_bin_GribExaminer_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_GribExaminer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) \
+	$(bin_GribExaminer_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_GribExaminer_SOURCES) \
+	$(nodist_bin_GribExaminer_SOURCES)
+DIST_SOURCES = $(bin_GribExaminer_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_GribExaminer_SOURCES = MvMain.cc GribExaminer.cc  MvQGribDumpModel.cc \
+			    GribExaminer.h MvQGribDumpModel.h
+
+nodist_bin_GribExaminer_SOURCES = GribExaminer.moc.cpp
+bin_GribExaminer_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_GribExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_GribExaminer_LDFLAGS = $(QT_LDFLAGS)
+bin_GribExaminer_LDADD = $(LDADD)  ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a  $(STANDARD_METVIEW_LIBS) $(QT_LIBS)
+bin_GribExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+BUILT_SOURCES = bin GribExaminer.moc.cpp
+EXTRA_DIST = 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/GribExaminer/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/GribExaminer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/GribExaminer$(EXEEXT): $(bin_GribExaminer_OBJECTS) $(bin_GribExaminer_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/GribExaminer$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_GribExaminer_LINK) $(bin_GribExaminer_OBJECTS) $(bin_GribExaminer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GribExaminer-GribExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GribExaminer-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_GribExaminer-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-MvMain.o -MD -MP -MF $(DEPDIR)/bin_GribExaminer-MvMain.Tpo -c -o bin_GribExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-MvMain.Tpo $(DEPDIR)/bin_GribExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_GribExaminer-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_GribExaminer-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_GribExaminer-MvMain.Tpo -c -o bin_GribExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-MvMain.Tpo $(DEPDIR)/bin_GribExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_GribExaminer-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_GribExaminer-GribExaminer.o: GribExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-GribExaminer.o -MD -MP -MF $(DEPDIR)/bin_GribExaminer-GribExaminer.Tpo -c -o bin_GribExaminer-GribExaminer.o `test -f 'GribExaminer.cc' || echo '$(srcdir)/'`GribExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-GribExaminer.Tpo $(DEPDIR)/bin_GribExaminer-GribExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribExaminer.cc' object='bin_GribExaminer-GribExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-GribExaminer.o `test -f 'GribExaminer.cc' || echo '$(srcdir)/'`GribExaminer.cc
+
+bin_GribExaminer-GribExaminer.obj: GribExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-GribExaminer.obj -MD -MP -MF $(DEPDIR)/bin_GribExaminer-GribExaminer.Tpo -c -o bin_GribExaminer-GribExaminer.obj `if test -f 'GribExaminer.cc'; then $(CYGPATH_W) 'GribExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/GribExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-GribExaminer.Tpo $(DEPDIR)/bin_GribExaminer-GribExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribExaminer.cc' object='bin_GribExaminer-GribExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-GribExaminer.obj `if test -f 'GribExaminer.cc'; then $(CYGPATH_W) 'GribExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/GribExaminer.cc'; fi`
+
+bin_GribExaminer-MvQGribDumpModel.o: MvQGribDumpModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-MvQGribDumpModel.o -MD -MP -MF $(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Tpo -c -o bin_GribExaminer-MvQGribDumpModel.o `test -f 'MvQGribDumpModel.cc' || echo '$(srcdir)/'`MvQGribDumpModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Tpo $(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGribDumpModel.cc' object='bin_GribExaminer-MvQGribDumpModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-MvQGribDumpModel.o `test -f 'MvQGribDumpModel.cc' || echo '$(srcdir)/'`MvQGribDumpModel.cc
+
+bin_GribExaminer-MvQGribDumpModel.obj: MvQGribDumpModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-MvQGribDumpModel.obj -MD -MP -MF $(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Tpo -c -o bin_GribExaminer-MvQGribDumpModel.obj `if test -f 'MvQGribDumpModel.cc'; then $(CYGPATH_W) 'MvQGribDumpModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQGribDumpModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Tpo $(DEPDIR)/bin_GribExaminer-MvQGribDumpModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGribDumpModel.cc' object='bin_GribExaminer-MvQGribDumpModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-MvQGribDumpModel.obj `if test -f 'MvQGribDumpModel.cc'; then $(CYGPATH_W) 'MvQGribDumpModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQGribDumpModel.cc'; fi`
+
+bin_GribExaminer-GribExaminer.moc.o: GribExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-GribExaminer.moc.o -MD -MP -MF $(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Tpo -c -o bin_GribExaminer-GribExaminer.moc.o `test -f 'GribExaminer.moc.cpp' || echo '$(srcdir)/'`GribExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Tpo $(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribExaminer.moc.cpp' object='bin_GribExaminer-GribExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-GribExaminer.moc.o `test -f 'GribExaminer.moc.cpp' || echo '$(srcdir)/'`GribExaminer.moc.cpp
+
+bin_GribExaminer-GribExaminer.moc.obj: GribExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_GribExaminer-GribExaminer.moc.obj -MD -MP -MF $(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Tpo -c -o bin_GribExaminer-GribExaminer.moc.obj `if test -f 'GribExaminer.moc.cpp'; then $(CYGPATH_W) 'GribExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GribExaminer.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Tpo $(DEPDIR)/bin_GribExaminer-GribExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribExaminer.moc.cpp' object='bin_GribExaminer-GribExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GribExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_GribExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_GribExaminer-GribExaminer.moc.obj `if test -f 'GribExaminer.moc.cpp'; then $(CYGPATH_W) 'GribExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GribExaminer.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/GribExaminer *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/GribExaminer/MvMain.cc b/src/GribExaminer/MvMain.cc
new file mode 100644
index 0000000..579e161
--- /dev/null
+++ b/src/GribExaminer/MvMain.cc
@@ -0,0 +1,139 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include "GribExaminer.h"
+
+#include <iostream>
+#include "Metview.h"
+#include "MvQService.h"
+#include "MvQKeyManager.h"
+#include "GribMetaData.h"
+
+string ftmp;
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService
+{
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvGribExaminer : public Base
+{
+public:
+	MvGribExaminer() : Base("GRIB") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvGribExaminer::serve( MvRequest& in, MvRequest& /*out*/)
+{
+  	cout << "--------------MvGribBrowser::serve()--------------" << endl;
+  	in.print();
+
+	//Get grib file name
+	const char* tmpc = in("PATH");
+
+	//Set grib file name
+	string fgrib(tmpc);
+
+	//Set tmpfile name
+	ftmp=marstmp();
+
+	//Filter
+	const char* temporary= (const char*)in("TEMPORARY");
+
+	//const char *offset=in("TEMPORARY");
+
+	//Reading the offset values following the techique
+	// used in function  "_request_to_fieldset" in field.c in MARS
+	int cnt = in.countValues("OFFSET");
+	vector<file_offset> offset;
+	for(int i=0; i< cnt; i++)
+	{
+		const char* cval;
+		in.getValue(cval,"OFFSET",i);
+#ifdef LARGE_FILES_SUPPORT
+		offset.push_back(atoll(cval));
+#else
+		offset.push_back(atol(cval));
+#endif
+	}
+
+	cnt = in.countValues("LENGTH");
+	vector<int> len;
+	for(int i=0; i< cnt; i++)
+	{
+		int ival;
+		in.getValue(ival,"LENGTH",i);
+		len.push_back(ival);
+	}
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(keyDialog);
+	Q_INIT_RESOURCE(window);
+	Q_INIT_RESOURCE(find);
+
+	//Create the grib key manager and initialize it
+	MvQKeyManager *manager = new MvQKeyManager(MvQKeyManager::GribType);
+	manager->loadProfiles();
+
+	//Create the grib metadata object and initialize it
+	GribMetaData *grib = new GribMetaData;
+	grib->setFileName(fgrib);
+
+	if(temporary && strcmp(temporary,"0") == 0 &&
+	   offset.size() > 0)
+	{
+		grib->setFilter(offset,len);
+	}
+
+	//Create the grib browser and initialize it
+	GribExaminer *browser = new GribExaminer;
+	browser->init(grib,manager);
+   	browser->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI (but not to MvExamineManager)
+	// To turn icon to green; otherwise, it will stay orange
+	if( strcmp( getenv("METVIEW_MODE"), "examine" ) != 0 )
+	{
+	    MvRequest req;	   
+	    sendReplyFromInteractive(req);
+	}
+
+	//Enter the app loop
+ 	app.exec();
+}
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+  	av = argv;
+
+	MvApplication theApp( argc, argv );
+
+    	MvGribExaminer grib;
+
+    	theApp.run();
+}
+
+
+
diff --git a/src/GribExaminer/MvQGribDumpModel.cc b/src/GribExaminer/MvQGribDumpModel.cc
new file mode 100644
index 0000000..2260570
--- /dev/null
+++ b/src/GribExaminer/MvQGribDumpModel.cc
@@ -0,0 +1,933 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQGribDumpModel.h"
+
+#include "MvQKeyMimeData.h"
+
+#include "GribMetaData.h"
+#include "MvKeyProfile.h"
+
+//=====================================
+//
+//MvQGribMvDumpModel
+//
+//=====================================
+
+
+MvQGribMvDumpModel::MvQGribMvDumpModel()
+{
+	data_=0;
+}
+
+void MvQGribMvDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQGribMvDumpModel::setDumpData(GribMvDump *dump)
+{	
+	data_=dump;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+void MvQGribMvDumpModel::setGribNameSpace(QString ns)
+{	
+	gribNameSpace_=ns;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+int MvQGribMvDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 3;
+}
+
+int MvQGribMvDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(!parent.isValid() )
+	{
+		return data_->itemNum();
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+
+QVariant MvQGribMvDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || 
+	    (role != Qt::DisplayRole && role != Qt::UserRole))
+        {			
+		return QVariant();
+	}
+
+	if(role == Qt::UserRole) 
+	{
+		if(index.column() != 0)
+			return QVariant();
+
+		GribItem *item = data_->item().at(index.row());
+		if(gribNameSpace_ == "Default")
+		{
+			if(QString::fromStdString(item->name()).contains(".") == false)
+			{
+				return QString::number(1);
+			}
+			else
+			{
+				return QString::number(0);
+			}
+		}
+		else
+		{
+			if(QString::fromStdString(item->name()).startsWith(gribNameSpace_ + "."))
+			{
+				return QString::number(1);
+			}
+			else
+			{
+				return QString::number(0);
+			}
+		}
+		
+	}
+	else
+	{
+
+		GribItem *item = data_->item().at(index.row());
+		return label(item,index.column());
+	}
+}
+
+
+QVariant MvQGribMvDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return "Key name (GRIB API)";
+	case 1: return "Key type";
+	case 2: return "Value";
+   	}
+
+    	return QVariant();
+}
+
+
+QString MvQGribMvDumpModel::label(GribItem *item,const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString(item->name().c_str());
+	}
+	case 1: 
+	{
+		return QString(item->type().c_str());
+	}
+	case 2: 
+	{
+		return QString(item->value().c_str());
+	}
+	default:
+        	return QString();
+    	}
+}
+
+
+QModelIndex MvQGribMvDumpModel::index( int row, int column, const QModelIndex & /*parent*/ ) const
+{
+	return createIndex(row,column,0);
+}
+
+
+QModelIndex MvQGribMvDumpModel::parent( const QModelIndex & /*index*/ ) const
+{		
+	 return QModelIndex();
+
+}
+
+Qt::ItemFlags MvQGribMvDumpModel::flags ( const QModelIndex & /*index*/) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable;
+
+	return Qt::ItemIsDragEnabled | defaultFlags;
+}
+
+Qt::DropActions MvQGribMvDumpModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQGribMvDumpModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvkey";
+    	return types;
+ }
+
+QMimeData* MvQGribMvDumpModel::mimeData(const QModelIndexList &indexes) const
+ {
+     	MvQKeyMimeData *mimeData = new MvQKeyMimeData(this);
+     	
+	QList<int> procRows;
+
+    	foreach (QModelIndex index, indexes) 
+	{
+	       	if (index.isValid() && 
+		    procRows.indexOf(index.row()) == -1) 
+		{
+			GribItem *item = data_->item().at(index.row());
+			MvKey *key=new MvKey(item->name(),item->name());
+			mimeData->addKey(key,index.row());
+			procRows << index.row();
+         	}
+     	}
+
+     	return mimeData;
+}
+
+bool MvQGribMvDumpModel::dropMimeData(const QMimeData*/*data*/,
+     Qt::DropAction /*action*/, int /*row*/, int /*column*/, const QModelIndex& /*parent*/)
+{
+        return false;
+}
+
+//=====================================
+//
+// MvQGribWmoDumpModel
+//
+//=====================================
+
+
+MvQGribWmoDumpModel::MvQGribWmoDumpModel()
+{
+	data_=0;
+}
+
+void MvQGribWmoDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQGribWmoDumpModel::setDumpData(GribWmoDump *dump)
+{	
+	data_=dump;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+
+int MvQGribWmoDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 3;
+}
+
+int MvQGribWmoDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(parent.isValid() )
+	{
+		int id=parent.internalId();
+		if(idToLevel(id) == 0)
+		{
+			return data_->section().at(id)->itemNum();			
+		}
+		if(idToLevel(id) == 1)
+		{	
+			int parentRow=idToParentRow(id);
+			int row=parent.row();
+			int num=data_->section().at(parentRow)->item().at(row)->arrayData().size();
+			return num;			
+		}
+
+		else
+		{
+			return 0;
+		}
+	}
+	//Root
+	else
+	{
+		return data_->sectionNum();
+	}
+}
+
+
+QVariant MvQGribWmoDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || (role != Qt::DisplayRole && role != Qt::ToolTipRole))
+        {			
+		return QVariant();
+	}
+	
+	int id=index.internalId();
+
+	int level=idToLevel(id);
+
+	if(level == 0)
+	{
+		GribSection *section = data_->section().at(id);
+		return label(section,index.column());
+	}
+	else if(level == 1)
+	{
+		int parentRow=idToParentRow(id);
+		GribSection *section = data_->section().at(parentRow);	
+		GribItem *item= section->item().at(index.row());
+		return label(item,index.column());
+	}
+	else if(level == 2)
+	{
+		//int parentId=index.parent().internalId();
+		//int grandParentRow=idToParentRow(parentId);
+
+		int grandParentRow=idToGrandParentRow(id);
+		GribSection *section = data_->section().at(grandParentRow);	
+
+		int parentRow=idToParentRow(id);
+		GribItem *item= section->item().at(parentRow);
+
+		QString value(item->arrayData().at(index.row()).c_str());
+
+		return label(value,index.column());
+	}
+	
+	return  QVariant();
+}
+
+
+QVariant MvQGribWmoDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return "Position";
+  	case 1: return "Key name (GRIB API)";
+	case 2: return "Value";
+   	}
+
+    	return QVariant();
+}
+
+
+QString MvQGribWmoDumpModel::label(GribSection *section,const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString(section->name().c_str());
+	}
+	default:
+        	return QString();
+    	}
+}
+
+QString MvQGribWmoDumpModel::label(GribItem* item, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString(item->pos().c_str());
+	}
+     	case 1: 
+	{
+		return QString(item->name().c_str());
+	}
+    	case 2: 
+	{
+		return QString(item->value().c_str());
+	}
+	default:
+        	return QString();
+    	}
+}
+
+QString MvQGribWmoDumpModel::label(QString value,const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 2: 
+	{
+		return value;
+	}
+	default:
+        	return QString();
+    	}
+}
+
+QModelIndex MvQGribWmoDumpModel::index( int row, int column, const QModelIndex & parent ) const
+{
+	if(!data_ || row < 0 || column < 0 || parent.column() > 3)
+	{
+		return QModelIndex();
+	}
+	
+	//Parent is non-root -> level-1 items: id is the parent row (number+1)*1000
+	if(parent.isValid() )
+	{
+		int id;
+		int parentId=parent.internalId();
+		int parentLevel=idToLevel(parentId);
+
+		if(parentLevel == 0)
+		{
+			id=(parent.row()+1)*1000;
+		}
+		else if(parentLevel == 1)
+		{	
+			id=parentId+(parent.row()+1);
+		}
+		else
+		{
+			return QModelIndex();
+		}
+
+		return createIndex(row, column, id); 
+	}
+	//Parent is root -> level-0 items: id is the row number
+	else
+	{
+		return createIndex(row, column, row); 
+	}
+}
+
+QModelIndex MvQGribWmoDumpModel::parent( const QModelIndex & index ) const
+{		
+	if(!index.isValid() )
+	{
+		return QModelIndex();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		return QModelIndex();
+	}
+	else if(idToLevel(id) == 1)
+	{
+		int parentRow=idToParentRow(id);
+		return createIndex(parentRow,0,parentRow);
+	}
+	else if(idToLevel(id) == 2)
+	{
+		int parentRow=idToParentRow(id);
+		int grandParentRow=idToGrandParentRow(id);		
+		return createIndex(parentRow,0,(grandParentRow+1)*1000);
+	}
+
+	return QModelIndex();
+}
+
+int MvQGribWmoDumpModel::idToLevel(int id) const
+{
+	if(id >=0 && id < 1000)
+		return 0;
+	else if(id % 1000 ==0)		
+		return 1;
+	else
+		return 2;
+}
+
+int MvQGribWmoDumpModel::idToParentRow(int id) const
+{
+	int level =idToLevel(id);
+
+	if(level == 0)
+		return -1;
+	else if(level == 1)
+		return id/1000-1;
+	else if(level == 2)
+		return id-(id/1000)*1000-1;
+	
+	return -1;
+}
+
+int MvQGribWmoDumpModel::idToGrandParentRow(int id) const
+{
+	int level =idToLevel(id);
+
+	if(level == 0)
+		return -1;
+	else if(level == 1)
+		return -1;
+	else if(level == 2)
+		return id/1000-1;
+	
+	return -1;
+}
+
+Qt::ItemFlags MvQGribWmoDumpModel::flags (const QModelIndex& /*index*/) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable;
+
+	return Qt::ItemIsDragEnabled | defaultFlags;
+}
+
+Qt::DropActions MvQGribWmoDumpModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQGribWmoDumpModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvkey";
+    	return types;
+ }
+
+QMimeData* MvQGribWmoDumpModel::mimeData(const QModelIndexList &indexes) const
+ {
+     	MvQKeyMimeData *mimeData = new MvQKeyMimeData(this);
+     	
+	QList<int> procRows;
+
+    	foreach (QModelIndex index, indexes) 
+	{
+	       	int id=index.internalId();
+		if (index.isValid() && idToLevel(id) == 1 &&
+		    procRows.indexOf(index.row()) == -1) 
+		{
+			//Index to the second column!!!
+			QModelIndex col=createIndex(index.row(),1,id);
+
+			string keyName=data(col).toString().toStdString();
+			MvKey *key=new MvKey(keyName,keyName);
+			mimeData->addKey(key,index.row());
+			procRows << index.row();
+         	}
+     	}
+
+     	return mimeData;
+}
+
+bool MvQGribWmoDumpModel::dropMimeData(const QMimeData* /*data*/,
+     Qt::DropAction /*action*/, int /*row*/, int /*column*/, const QModelIndex& /*parent*/)
+{
+        return false;
+}
+
+//=====================================
+//
+// MvQGribStdDumpModel
+//
+//=====================================
+
+MvQGribStdDumpModel::MvQGribStdDumpModel()
+{
+	data_=0;
+}
+
+void MvQGribStdDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQGribStdDumpModel::setDumpData(GribStdDump *dump)
+{	
+	data_=dump;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+int MvQGribStdDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 3;
+}
+
+int MvQGribStdDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(parent.isValid() )
+	{
+		int id=parent.internalId();
+		if(idToLevel(id) == 0)
+		{
+			return data_->item().at(id)->arrayData().size();			
+		}
+		else
+		{
+			return 0;
+		}
+	}
+	//Root
+	else
+	{
+		return data_->itemNum();
+	}
+}
+
+
+QVariant MvQGribStdDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || role != Qt::DisplayRole)
+        {			
+		return QVariant();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		GribItem *item = data_->item().at(id);
+		return label(item,index.column());
+	}
+	else if(idToLevel(id) == 1)
+	{
+		int parentRow=idToParentRow(id);
+		GribItem *item = data_->item().at(parentRow);	
+		string value = item->arrayData().at(index.row());
+		return label(value,index.column());
+	}
+	
+	return  QVariant();
+}
+
+
+QVariant MvQGribStdDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return "Key name (GRIB API)";
+  	case 1: return "Value";
+	case 2: return "Description";
+   	}
+
+    	return QVariant();
+}
+
+
+QString MvQGribStdDumpModel::label(GribItem *item,const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString(item->name().c_str());
+	}
+	case 1: 
+	{
+		return QString(item->value().c_str());
+	}
+	case 2: 
+	{
+		return QString(item->description().c_str());
+	}
+
+	default:
+        	return QString();
+    	}
+}
+
+QString MvQGribStdDumpModel::label(string value, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return QString(value.c_str());
+	}
+    
+	default:
+        	return QString();
+    	}
+}
+
+QModelIndex MvQGribStdDumpModel::index( int row, int column, const QModelIndex & parent ) const
+{
+	if(!data_ || row < 0 || column < 0 || parent.column() > 3)
+	{
+		return QModelIndex();
+	}
+	
+	//Parent is non-root -> level-1 items: id is the (parent row number +1)*1000
+	if(parent.isValid() )
+	{
+		int id=(parent.row()+1)*1000;
+		return createIndex(row, column, id); 
+	}
+	//Parent is root -> level-0 items: id is the row number
+	else
+	{
+		return createIndex(row, column, row); 
+	}
+}
+
+
+QModelIndex MvQGribStdDumpModel::parent( const QModelIndex & index ) const
+{		
+	if(!index.isValid() )
+	{
+		return QModelIndex();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		return QModelIndex();
+	}
+	else 
+	{
+		int parentRow=idToParentRow(id);
+		return createIndex(parentRow,0,parentRow);
+	}
+
+	return QModelIndex();
+}
+
+int MvQGribStdDumpModel::idToLevel(int id) const
+{
+	if(id >=0 && id < 1000)
+		return 0;
+	else
+		return 1;
+}
+
+int MvQGribStdDumpModel::idToParentRow(int id) const
+{
+	if(idToLevel(id) == 0)
+		return -1;
+	else
+		return id/1000-1;
+}
+
+
+Qt::ItemFlags MvQGribStdDumpModel::flags (const QModelIndex& /*index*/) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable;
+
+	return Qt::ItemIsDragEnabled | defaultFlags;
+}
+
+Qt::DropActions MvQGribStdDumpModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQGribStdDumpModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvkey";
+    	return types;
+ }
+
+QMimeData* MvQGribStdDumpModel::mimeData(const QModelIndexList &indexes) const
+ {
+     	MvQKeyMimeData *mimeData = new MvQKeyMimeData(this);
+     	
+	QList<int> procRows;
+
+    	foreach (QModelIndex index, indexes) 
+	{
+	       	int id=index.internalId();
+		if (index.isValid() && idToLevel(id) == 0 &&
+		    procRows.indexOf(index.row()) == -1) 
+		{
+			//Index to the first column!!!
+			QModelIndex col=createIndex(index.row(),0,id);
+
+			string keyName=data(index).toString().toStdString();
+			MvKey *key=new MvKey(keyName,keyName);
+			mimeData->addKey(key,index.row());
+			procRows << index.row();
+         	}
+     	}
+
+     	return mimeData;
+}
+
+bool MvQGribStdDumpModel::dropMimeData(const QMimeData* /*data*/,
+     Qt::DropAction /*action*/, int /*row*/, int /*column*/, const QModelIndex& /*parent*/)
+{
+        return false;
+}
+
+
+//=====================================
+//
+//MvQGribValueDumpModel
+//
+//=====================================
+
+MvQGribValueDumpModel::MvQGribValueDumpModel()
+{
+	data_=0;
+	minValAsDecimal_=0.001;
+}
+
+void MvQGribValueDumpModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQGribValueDumpModel::setDumpData(GribValueDump *dump)
+{	
+	data_=dump;
+	
+	if(data_)
+	{	
+		if(data_->decimalPlaces() > 0)
+		{
+			minValAsDecimal_=0.0001;
+		}
+		else
+		{
+	  		minValAsDecimal_=pow(10.,data_->decimalPlaces()-4);
+		}	
+	}
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+int MvQGribValueDumpModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 4;
+}
+
+int MvQGribValueDumpModel::rowCount( const QModelIndex& parent) const
+{
+	if(!data_)
+		return 0;
+
+	//Non-root
+	if(!parent.isValid() )
+	{
+		return data_->num();
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+
+QVariant MvQGribValueDumpModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || (role != Qt::DisplayRole && role != Qt::UserRole))
+        {			
+		return QVariant();
+	}
+
+	if(role == Qt::DisplayRole) 
+	{
+		switch (index.column())
+		{
+			case 0: 
+				return index.row()+1;
+			case 1: 
+				return QString::number(data_->latitude()[index.row()],'f',3);
+			case 2: 
+				return QString::number(data_->longitude()[index.row()],'f',3);	
+			case 3: 
+				if(fabs(data_->value()[index.row()]) > minValAsDecimal_)
+				{  
+			  		return QString::number(data_->value()[index.row()],'f',data_->decimalPlaces()+4);
+				}
+				else
+				{
+				  	return QString::number(data_->value()[index.row()],'e',4);
+				}
+				break;
+			default:
+				return QVariant();
+		}				
+	}
+	
+	//Will be used for sorting
+	else if(role == Qt::UserRole) 
+	{
+		switch (index.column())
+		{
+			case 0: 
+				return index.row()+1;
+			case 1: 
+				return data_->latitude()[index.row()];
+			case 2: 
+				return data_->longitude()[index.row()];	
+			case 3: 
+				return data_->value()[index.row()];	
+			default:
+				return QVariant();
+		}				
+	}
+	
+	
+	
+	return QVariant();
+}
+
+
+QVariant MvQGribValueDumpModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return tr("Index");
+	case 1: return tr("Latitude");
+	case 2: return tr("Longitude");
+	case 3: return tr("Value");
+   	}
+
+    	return QVariant();
+}
+
+
+
+QModelIndex MvQGribValueDumpModel::index( int row, int column, const QModelIndex & /*parent*/ ) const
+{
+	return createIndex(row,column,0);
+}
+
+
+QModelIndex MvQGribValueDumpModel::parent( const QModelIndex & /*index*/ ) const
+{		
+	 return QModelIndex();
+
+}
diff --git a/src/GribExaminer/MvQGribDumpModel.h b/src/GribExaminer/MvQGribDumpModel.h
new file mode 100644
index 0000000..9be1bd7
--- /dev/null
+++ b/src/GribExaminer/MvQGribDumpModel.h
@@ -0,0 +1,164 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQGribDumpModel_H
+#define MvQGribDumpModel_H
+
+#include <QAbstractItemModel>
+
+#include "GribMetaData.h" 
+
+class GribItem;
+class GribMvDump;
+class GribStdDump;
+class GribWmoDump;
+class GribValueDump;
+
+class MvQGribMvDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQGribMvDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(GribMvDump*);
+	GribMvDump* dumpData() {return data_;}
+	void setGribNameSpace(QString);
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+protected:
+	QString label(GribItem*,const int) const;
+
+private:
+	GribMvDump* data_;
+	QString gribNameSpace_;
+	
+};
+
+class MvQGribWmoDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQGribWmoDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(GribWmoDump*);
+	GribWmoDump* dumpData() {return data_;}
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+protected:
+	QString label(GribSection*,const int) const;
+	QString label(GribItem*,const int) const;
+	QString label(QString,const int) const;
+	int idToLevel(int) const;
+	int idToParentRow(int) const;
+	int idToGrandParentRow(int) const;
+
+private:
+	GribWmoDump* data_;
+	
+};
+
+class MvQGribStdDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQGribStdDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(GribStdDump*);
+	GribStdDump* dumpData() {return data_;}
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+protected:
+	QString label(GribItem*,const int) const;
+	QString label(string,const int) const;
+	int idToLevel(int) const;
+	int idToParentRow(int) const;
+
+private:
+	GribStdDump* data_;
+	
+};
+
+class MvQGribValueDumpModel : public QAbstractItemModel
+{
+
+public:
+   	MvQGribValueDumpModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setDumpData(GribValueDump*);
+	GribValueDump* dumpData() {return data_;}
+	
+
+private:
+	GribValueDump* data_;
+	double minValAsDecimal_;
+	
+};
+
+#endif
diff --git a/src/GribVectors/GRIBVECTORS.xpm b/src/GribVectors/GRIBVECTORS.xpm
new file mode 100644
index 0000000..d47693e
--- /dev/null
+++ b/src/GribVectors/GRIBVECTORS.xpm
@@ -0,0 +1,47 @@
+/* XPM */
+static char * VECTORS_icon[] = {
+"32 32 12 1",
+" 	c #FFFFFFFFFFFF",
+".	c #00000000DDDD",
+"X	c #9999FFFFFFFF",
+"o	c #00009999FFFF",
+"O	c #555555555555",
+"+	c #EEEEEEEEEEEE",
+"@	c #3333FFFF9999",
+"#	c #333399996666",
+"$	c #0000BBBB0000",
+"%	c #FFFFCCCC9999",
+"&	c #FFFF66663333",
+"*	c #DDDD00000000",
+"    .                           ",
+"   Xo.                          ",
+"  XXo..OOOOOOOOOOOOOOOOOOOOOOO  ",
+" XXooo..+++++++++++++++++++++O  ",
+"XXooooo..++++++++++++++++++++O  ",
+" O+Xo.++++++++++++++@@@@@@#++O  ",
+" O+Xo.+++++++++++++++@@@$$#++O  ",
+" O+Xo.++++++++++++++++$$$$#++O  ",
+" O+Xo.++++++++++++++++@$$##++O  ",
+" O+Xo.+++++++++++++++@$#$##++O  ",
+" O+Xo.++++++++++++++@$#++##++O  ",
+" O+Xo.+++++++++++++@$#++++#++O  ",
+" O+Xo.++++++++++++@$#++++++++O  ",
+" O+Xo.+++++++++++@$#+++++++++O  ",
+" O+Xo.++++++++++@$#++++++++++O  ",
+" O+Xo.+++++++++@$#+++++++++++O  ",
+" O+Xo.++++++++@$#++++++++++++O  ",
+" O+Xo.+++++++@$#+++++++++++++O  ",
+" O+Xo.++++++@$#++++++++++++++O  ",
+" O+Xo.+++++@$#+++++++++++++++O  ",
+" O+Xo.++++@$#++++++++++++++++O  ",
+" O+Xo.+++@$#+++++++++++++++++O  ",
+" O+Xo.++@$#++++++++++++++++++O  ",
+" O+Xo.+@$#+++++++++++++++++%+O  ",
+" O+Xo.@$#++++++++++++++++++%%O  ",
+" O+Xo@$#+++++++++++++++++++&%%  ",
+"%%%%@$#%%%%%%%%%%%%%%%%%%%%&&%% ",
+"&&&@$#&&&&&&&&&&&&&&&&&&&&&&&&&*",
+"**@$#**********************&&** ",
+" @$#o.+++++++++++++++++++++&**  ",
+"@$#Xo.OOOOOOOOOOOOOOOOOOOOO**   ",
+"$# Xo.                     *    "};
diff --git a/src/GribVectors/GribVectorsDef b/src/GribVectors/GribVectorsDef
new file mode 100644
index 0000000..e46965e
--- /dev/null
+++ b/src/GribVectors/GribVectorsDef
@@ -0,0 +1,67 @@
+GRIB_VECTORS_APP; APPLICATION
+{
+   TYPE
+   {
+      VECTOR_FIELD
+      POLAR_FIELD
+   } = VECTOR_FIELD
+
+   U_COMPONENT
+      [ interface = icon, class = GRIB , exclusive = true,
+        help = help_data,help_directory  = '/System/Defaults',
+        help_name       = U component for Vectors,
+        help_class      = RETRIEVE,
+        help_definition = ( RETRIEVE,  LEVTYPE = PL,
+                            LEVELIST = 1000, PARAM = U,
+                            DATE = '-1', GRID = 1.5/1.5 )
+      ]
+   { @ }
+
+   V_COMPONENT
+      [ interface = icon, class = GRIB , exclusive = true,
+        help = help_data,help_directory  = '/System/Defaults',
+        help_name       = V component for Vectors,
+        help_class      = RETRIEVE,
+        help_definition = ( RETRIEVE,  LEVTYPE = PL,
+                            LEVELIST = 1000, PARAM = V,
+                            DATE = '-1', GRID = 1.5/1.5 )
+      ]
+   { @ }
+
+   INTENSITY
+      [ interface = icon, class = GRIB ,
+        help = help_data,help_directory  = '/System/Defaults',
+        help_name       = Intensity for Vectors,
+        help_class      = RETRIEVE,
+        help_definition = ( RETRIEVE, TYPE = AN,
+                            STREAM = WV, LEVTYPE = SFC,
+                            REPRES = LL, PARAM = SWH,
+                            DATE = '-1', GRID = 1.5/1.5 )
+      ]
+   { @ }
+
+   DIRECTION
+      [ interface = icon, class = GRIB ,
+        help = help_data,help_directory  = '/System/Defaults',
+        help_name       = Direction for Vectors,
+        help_class      = RETRIEVE,
+        help_definition = ( RETRIEVE, TYPE = AN,
+                            STREAM = WV, LEVTYPE = SFC,
+                            REPRES = LL, PARAM = MWD,
+                            DATE = '-1', GRID = 1.5/1.5 )
+      ]
+   { @ }
+
+   COLOURING_FIELD
+      [ interface = icon, class = GRIB,
+        exclusive = true,
+        help = help_data,
+        help_directory  = '/System/Defaults',
+        help_name       = Colouring field,
+        help_class      = RETRIEVE,
+        help_definition = ( RETRIEVE, LEVTYPE = PL,
+                            LEVELIST = 1000, PARAM = T,
+                            DATE = '-1', GRID = 1.5/1.5 )
+      ]
+   { @ }
+}
diff --git a/src/GribVectors/GribVectorsRules b/src/GribVectors/GribVectorsRules
new file mode 100644
index 0000000..70125af
--- /dev/null
+++ b/src/GribVectors/GribVectorsRules
@@ -0,0 +1,7 @@
+%if TYPE = VECTOR_FIELD %then
+     %unset INTENSITY
+     %unset DIRECTION
+
+%if TYPE = POLAR_FIELD %then
+     %unset U_COMPONENT
+     %unset V_COMPONENT
diff --git a/src/GribVectors/Makefile.am b/src/GribVectors/Makefile.am
new file mode 100644
index 0000000..406ef62
--- /dev/null
+++ b/src/GribVectors/Makefile.am
@@ -0,0 +1,30 @@
+bin_PROGRAMS = bin/GribVectors
+bin_GribVectors_SOURCES  = Vectors.cc Vectors.h
+bin_GribVectors_LDFLAGS = $(LDFLAGS)
+bin_GribVectors_LDADD = $(LDADD) $(STANDARD_METVIEW_LIBS)
+bin_GribVectors_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.GribVectors \
+                 $(local_sharedir)/GribVectorsDef $(local_sharedir)/GribVectorsRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} GRIBVECTORS.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/GRIBVECTORS.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.GribVectors \
+             GRIBVECTORS.xpm GribVectorsDef GribVectorsRules
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/GribVectors/Makefile.in b/src/GribVectors/Makefile.in
new file mode 100644
index 0000000..08571bc
--- /dev/null
+++ b/src/GribVectors/Makefile.in
@@ -0,0 +1,713 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/GribVectors$(EXEEXT)
+subdir = src/GribVectors
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_GribVectors_OBJECTS = Vectors.$(OBJEXT)
+bin_GribVectors_OBJECTS = $(am_bin_GribVectors_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_GribVectors_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_GribVectors_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_GribVectors_SOURCES)
+DIST_SOURCES = $(bin_GribVectors_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_GribVectors_SOURCES = Vectors.cc Vectors.h
+bin_GribVectors_LDFLAGS = $(LDFLAGS)
+bin_GribVectors_LDADD = $(LDADD) $(STANDARD_METVIEW_LIBS)
+bin_GribVectors_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.GribVectors \
+                 $(local_sharedir)/GribVectorsDef $(local_sharedir)/GribVectorsRules
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/GRIBVECTORS.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.GribVectors \
+             GRIBVECTORS.xpm GribVectorsDef GribVectorsRules
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/GribVectors/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/GribVectors/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/GribVectors$(EXEEXT): $(bin_GribVectors_OBJECTS) $(bin_GribVectors_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/GribVectors$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_GribVectors_LINK) $(bin_GribVectors_OBJECTS) $(bin_GribVectors_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Vectors.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} GRIBVECTORS.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/GribVectors/ObjectSpec.GribVectors b/src/GribVectors/ObjectSpec.GribVectors
new file mode 100644
index 0000000..3d520bc
--- /dev/null
+++ b/src/GribVectors/ObjectSpec.GribVectors
@@ -0,0 +1,29 @@
+object,
+    class             = GRIB_VECTORS_APP,
+    can_be_created    = True,
+    icon_box          = To be organised,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/GribVectorsDef',
+    rules_file      = '$METVIEW_DIR_SHARE/etc/GribVectorsRules',
+    default_name      = Grib Vectors,
+    help_page         = Grib_Vectors,
+    type              = Data,
+    macro             = grib_vectors,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    editor_type       = SimpleEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/GRIBVECTORS.icon'
+
+state,
+     class   = GRIB_VECTORS_APP,
+     action  = execute/visualise/prepare/drop,
+     service = GribVectors
+
+state,
+    class   = GRIB_VECTORS,
+    action  = visualise,
+    service = uPlotManager
+
+service,
+    timeout  = $timeout,
+    name     = 'GribVectors',
+    fullname = GribVectors,
+    cmd      = "$metview_command $METVIEW_BIN/GribVectors"
diff --git a/src/GribVectors/Vectors.cc b/src/GribVectors/Vectors.cc
new file mode 100644
index 0000000..96cdfae
--- /dev/null
+++ b/src/GribVectors/Vectors.cc
@@ -0,0 +1,108 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Vectors.h"
+
+GribVectors::GribVectors(const char* kw): MvService(kw)
+{
+}
+
+void GribVectors::serve(MvRequest& in,MvRequest& out)
+{
+cout << "GribVectors::serve in" << endl;
+in.print();
+
+    // Get input info
+    // Get plotting type info
+    bool polar = false;
+    if ( (const char*)in("TYPE") && strcmp((const char*)in("TYPE"),"POLAR_FIELD") == 0 )
+        polar = true;
+
+    // Get the two field requests
+    MvRequest grib_u;
+    MvRequest grib_v;
+    if(polar)
+    {
+        in.getValue(grib_u,"INTENSITY");
+        in.getValue(grib_v,"DIRECTION");
+    }
+    else
+    {
+        in.getValue(grib_u,"U_COMPONENT");
+        in.getValue(grib_v,"V_COMPONENT");
+    }
+
+    // Get the colouring field request, if it exists
+    MvRequest grib_t;
+    in.getValue(grib_t,"COLOURING_FIELD");
+
+    // Associate field requests to fieldsets
+    MvFieldSet          fs_t(grib_t);
+    MvFieldSetIterator  iter_t(fs_t);
+    MvFieldSet          fs_u(grib_u);
+    MvFieldSetIterator  iter_u(fs_u);
+    MvFieldSet          fs_v(grib_v);
+    MvFieldSetIterator  iter_v(fs_v);
+
+    // Check consistencies
+    if(fs_u.countFields() != fs_v.countFields())
+    {
+        setError(1,"Error: Incompatible Number of U and V Fields....%d %d", fs_u.countFields(),fs_v.countFields());
+        return;
+    }
+
+    int nColourFields = fs_t.countFields();
+    if( nColourFields > 1 && nColourFields != fs_v.countFields() )
+        setError(1,"Error: Incompatible Number of Colour Fields...");
+
+    // Get the colouring field data, if it exists
+    const char* strDim = nColourFields ? "3" : "2";
+    MvField f_t = iter_t();
+
+    // Main loop
+    //Concatenate the field requests in triples: u[i]/v[i]/t[i]
+    out.setVerb("GRIB_VECTORS");
+    MvFieldSet fs_out;
+    MvField f_u,f_v;
+    while( (f_u = iter_u()) && (f_v = iter_v()) )
+    {
+        // Concatenate fields
+        fs_out += f_u;
+        fs_out += f_v;
+        if ( f_t )
+            fs_out += f_t;
+
+       // Get the next colouring field, if it exists
+        if ( nColourFields > 1 )
+            f_t = iter_t();
+
+        // Add dimension info
+        out.addValue("GRIB_DIMENSION",strDim);
+    }
+
+    out("GRIB_WIND_MODE") = polar ? "SD" : "UV";
+    out("GRIB") = fs_out.getRequest();
+    out("_CLASS") = "GRIB_VECTORS";
+    out("_VERB")  = "GRIB_VECTORS";
+
+cout << "GribVectors::serve out" << endl;
+out.print();
+    return ;
+}
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+    MvApplication theApp(argc,argv);
+
+    GribVectors gv("GRIB_VECTORS_APP");
+
+    theApp.run();
+}
diff --git a/src/GribVectors/Vectors.h b/src/GribVectors/Vectors.h
new file mode 100644
index 0000000..91a9a7a
--- /dev/null
+++ b/src/GribVectors/Vectors.h
@@ -0,0 +1,34 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GRIBVECTORS_H
+#define GRIBVECTORS_H
+
+/************************************
+  Application GribVectors
+
+  Manager grib vectors plotting
+************************************/
+
+#include "Metview.h"
+
+class GribVectors : public MvService {
+
+public:
+
+   // Constructor
+   GribVectors(const char* kw);
+
+   // Destructor
+   ~GribVectors() {}
+
+   void serve(MvRequest&,MvRequest&);
+};
+
+#endif
diff --git a/src/Hovmoeller/Factory.cc b/src/Hovmoeller/Factory.cc
new file mode 100644
index 0000000..e8e7f67
--- /dev/null
+++ b/src/Hovmoeller/Factory.cc
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*! \file Factory.cc
+    \brief Definition of Parameter base class.
+    
+    Magics Team - ECMWF 2004
+    
+    Started: Jan 2004
+    
+    Changes:
+    
+*/
+
+//F using namespace magics;
+//F using namespace std;   // to run on AIX
+
+template<class B>
+map<string, SimpleFactory<B>* >* SimpleFactory<B>::map_ = 0;
+
+template<class B>
+SimpleFactory<B>::SimpleFactory(const string& name): name_(name)
+{
+	if (!map_) map_ = new map<string, SimpleFactory<B>* >();
+	(*map_)[name_] = this; 
+}
+
+template<class B>
+SimpleFactory<B>::~SimpleFactory()
+{
+	
+}
+
+template<class B>
+B* SimpleFactory<B>::create(const string& name)
+{
+	SimpleFactory<B>* maker = get(name);
+	if (maker) {
+		B* object =(*maker).make();
+		return object;
+	}
+#ifdef MAGICS_EXCEPTION
+	throw NoFactoryException(name);
+#else 
+	return 0;
+#endif	
+} 
+	
+template<class B>
+SimpleFactory<B>* SimpleFactory<B>::get(const string& name)
+{	 
+//	ensure(map_);
+	typename map<string, SimpleFactory<B>*>::iterator maker = (*map_).find(name);
+	if (maker != (*map_).end()) return  (*maker).second;
+#ifdef MAGICS_EXCEPTION
+	throw NoFactoryException(name);
+#else 
+	return 0;
+#endif
+}
diff --git a/src/Hovmoeller/Factory.h b/src/Hovmoeller/Factory.h
new file mode 100644
index 0000000..b38c39e
--- /dev/null
+++ b/src/Hovmoeller/Factory.h
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*! \file Factory.h
+    \brief Definition of Factory  class.
+    
+    Magics Team - ECMWF 2004
+    
+    Started: Jan 2004
+    
+    Changes:
+    
+*/
+#ifndef MvFactory_H
+#define MvFactory_H
+
+//#include "magics.h"
+//#include "Exception.h" 
+//#include "Log.h"
+
+// namespace magics {
+
+#if 0
+class NoFactoryException : public MagicsException
+{
+public:
+	NoFactoryException( const string& factory ):
+		MagicsException("Factory (" +  factory + ") not found") {}
+	NoFactoryException():
+		MagicsException("Factory not found") {}
+}; 
+#endif
+
+
+template<class B> 
+class SimpleFactory {
+public:
+// -- Contructors
+	SimpleFactory(const string& name);
+	virtual ~SimpleFactory();
+// methods
+	static B*  create(const string& name);
+	virtual B* make() const  = 0;
+// -- Members
+	static map<string, SimpleFactory<B>* >* map_;
+	static SimpleFactory<B>* get(const string& name);
+	string name_;	 
+};
+
+template <class A, class B=A>
+class SimpleObjectMaker : public SimpleFactory<B>
+{
+public :
+	SimpleObjectMaker(const string& name) : SimpleFactory<B>(name) 
+        {}
+	B* make() const {  return new A(); }
+};
+
+
+//F } // namespace magics
+
+#include "Factory.cc"
+
+#endif
diff --git a/src/Hovmoeller/HOVMOELLERDATA.xpm b/src/Hovmoeller/HOVMOELLERDATA.xpm
new file mode 100644
index 0000000..5fd516b
--- /dev/null
+++ b/src/Hovmoeller/HOVMOELLERDATA.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *HOVMOELLERDATA[]={
+"32 32 7 1",
+"c c #000000",
+"d c #007fff",
+"a c #777777",
+"b c #ccccff",
+"e c #d9b777",
+"# c #ff00ff",
+". c #ffffff",
+"................................",
+"................................",
+"................................",
+"................................",
+".....###........................",
+"......###.......................",
+"........###.....................",
+".........###aaaaaaaaaaa.........",
+".....aaaabb###bbbbbbbbbaaaa.....",
+"..aaabbbbbbbb##bbbbbbbbbbbbaaa..",
+".abbbbbbbbbbbb##bbbbbbbbbbbbbba.",
+"abbbbbbbbbbbbbb##bbbbbbbbbbbbbba",
+"bbbbbbbbbaaaaaaa##aaaaabbbbbbbbb",
+"bbbbbaaaabbbbbbbb##bbbbaaaabbbbb",
+"bbaaabbbbbbbbbbbbb##bbbbbbbaaabb",
+"babbbbbbbbbbbbbbbbb##bbbbbbbbbab",
+"abbbbbbbbbbbbbbbbbbb##bbbbbbbbba",
+"bbbbbbbbbaaaaaaaaaaaa#abbbbbbbbb",
+"bbbbbaaaabbbbbbbbbbbb##aaaabbbbb",
+"bbaaabbbbbbbbbbbbbbbbb##bbbaaabb",
+"babbbbbbbbbbbbbbbbbbbbb##bb#bbab",
+"abbbbbbbbbbbbbbbbbbbbbb##b##bbba",
+"bbbbbbbbbaaaaaaaaaaaaaa#####bbbb",
+"bbbbbaaaabbbbbbbbbbbbbbb####bbbb",
+"bbaaabbbbbbbbbbbbbbbbbb#####aabb",
+"babbbbbbbbbbbbbbbbbbbb######bbab",
+"abbbbbbbbbbbbbbbbbbbb#######bbba",
+"bbbbbbbbbccccccccccccccbbbbbbbbb",
+"bbbbbccccddddddeeeeeeeecccccbbbb",
+"bbcccdddddddddeeeeeeeeeeeeecccbb",
+"bcddddddddddeeeeeeeeeeeeeeeeeecb",
+"cddddddddddeeeeeeeeeeeeeeeeeeeec"};
diff --git a/src/Hovmoeller/HovToolkit.cc b/src/Hovmoeller/HovToolkit.cc
new file mode 100644
index 0000000..688749a
--- /dev/null
+++ b/src/Hovmoeller/HovToolkit.cc
@@ -0,0 +1,1899 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "HovToolkit.h"
+#include <inc_iostream.h>
+#include "MvRequestUtil.hpp"
+
+HovToolkit::HovToolkit(): timeDir_(HOV_TIMEFOR),
+			  heightDir_(HOV_HEIGHTBACK),
+			  swapAxes_(false),
+			  secondAuxiliaryAxis_(true),
+			  netcdf_(0),
+			  netcdfIn_(0),
+			  gcoord1_(0),
+			  gcoord2_(0),
+			  xint_(0)
+{
+//empty
+}
+
+HovToolkit::~HovToolkit()
+{
+	ReleaseMemory();
+}
+
+void HovToolkit::ReleaseMemory()
+{
+	if (xint_)    { delete [] xint_; xint_=0; }
+	if (gcoord1_) { delete [] gcoord1_; gcoord1_=0; }
+	if (gcoord2_) { delete [] gcoord2_; gcoord2_=0; }
+	if (netcdf_)  { delete netcdf_; netcdf_=0; }
+
+	if (params_.size())
+	{ 
+		ParamIterator paramIter;
+		for (paramIter = params_.begin(); paramIter != params_.end(); paramIter++)
+			delete (*paramIter).second;
+
+		params_.clear();
+	}
+
+	NcClosePreviousFile();
+
+	return;
+}
+
+// Main function. It is called from the Expand option
+bool HovToolkit::Compute(string& netfnameIn,MvRequest& data,string& netfnameOut)
+{
+        nrIndexesIn_ = -1; //option is Expand
+
+        // Free previous memory
+	ReleaseMemory();
+
+	// Open input netcdf file
+	netfnameIn_ = netfnameIn;
+	NcOpenPreviousFile();
+
+	// Initialize HovToolkit object from a netcdf file
+	if ( !GetInputInfo(netcdfIn_) )
+	{
+		NcClosePreviousFile();
+		return false;
+	}
+	NcClosePreviousFile();
+
+	// Create Param Info from the fieldset
+	if ( !CreateParamInfo(data) )
+	{
+		ReleaseMemory();
+		return false;
+	}
+
+	// Generate data
+	if ( !NcGenerateData(data) )
+	{
+		ReleaseMemory();
+		return false;
+	}
+
+        // Free memory
+	ReleaseMemory();
+
+	// Return netcdf filename
+	netfnameOut = ncdfPath_.c_str();
+
+	return true;
+}
+
+// Main function. It is called from the basic option (Line,Area,Height)
+bool HovToolkit::Compute(MvRequest& in,MvRequest& out)
+{
+        nrIndexesIn_ = 0; //option is not Expand
+
+        // Free previous memory
+	ReleaseMemory();
+
+	// Initialize HovToolkit object from the user interface
+        if ( !GetInputInfo(in) ) return false;
+
+	// Create Param Info from the fieldset
+	if ( !CreateParamInfo(dataRequest_) )
+	{
+		ReleaseMemory();
+		return false;
+	}
+
+	// Compute number of points
+        if( EvaluateNPoints() == 0 )
+        {
+		ReleaseMemory();
+        	marslog(LOG_EROR, "Invalid Area!");
+                return false;
+        }
+
+	// Initialize reference time
+	SetRefTime(minTime_);
+
+        // Generate data
+	if ( !NcGenerateData(dataRequest_) ) 
+	{
+		ReleaseMemory();
+		return false;
+	}
+
+	// Create output request
+	const char* name = (const char *)in("_NAME");
+	CreateOutputRequest(out,name);
+#if 0
+	MvRequest cdfreq("NETCDF");
+	cdfreq("PATH") = ncdfPath_.c_str();
+	out = out + cdfreq;
+	if ( (const char *)in("_NAME") )
+		out("_NAME") = in("_NAME");
+#endif
+        // Free memory
+	ReleaseMemory();
+
+	return true;
+}
+
+void HovToolkit::CreateOutputRequest(MvRequest& out, const char* name)
+{
+     // Currently, the netcdf file contains only one parameter.
+     // Update this code for more than one parameter
+     ParamIterator ii = params_.begin();
+     ParamInfo *par   = (*ii).second;
+     const char* expver = par->ExpVer();
+     ostrstream oss;
+     oss << setfill( '0' )
+         << setw( 1 ) << 'p'
+         << setw( 3 ) << par->Parameter()
+         << setw( 4 ) << par->Level()
+         << setw( 4 ) << ( expver ? expver : "_" )
+         << ends;
+
+     // Create output request
+     MvRequest req("NETCDF");
+     req("PATH") = ncdfPath_.c_str();
+     out.setVerb("NETCDF_XY_MATRIX");
+	out("NETCDF_PLOT_TYPE") = "XY_MATRIX";
+	out("NETCDF_DATA") = req;
+     const char *xAxisType, *yAxisType;
+     if ( verticalAxis_ == HOV_TIME )
+     {
+          out("NETCDF_Y_VARIABLE") = "time";
+          out("NETCDF_X_VARIABLE") = GetSecondAxisName();
+          if ( SecondAuxiliaryAxis() )
+          {
+               out("NETCDF_X_AUXILIARY_VARIABLE") = GetSecondAuxiliaryAxisName();
+               xAxisType = "geoline";
+          }
+          else
+               xAxisType = "regular";
+
+          yAxisType = "date";
+     }
+     else
+     {
+          out("NETCDF_X_VARIABLE") = "time";
+          out("NETCDF_Y_VARIABLE") = GetSecondAxisName();
+          if ( SecondAuxiliaryAxis() )
+          {
+               out("NETCDF_Y_AUXILIARY_VARIABLE") = GetSecondAuxiliaryAxisName();
+               yAxisType = "geoline";
+          }
+          else
+               yAxisType = "regular";
+
+          xAxisType = "date";
+     }
+
+//	out1("NETCDF_X_VARIABLE") = (verticalAxis_ == HOV_TIME) ? "longitude" : "time";  //HOV_TIME; //(swapAxes_) ? "time"         : "geographical";
+//	out1("NETCDF_Y_VARIABLE") = (verticalAxis_ == HOV_GEO)  ? "longitude" : "time"; //(swapAxes_) ? "geographical" : "time";
+	//if (verticalAxis_ == HOV_GEO)
+	//	out1("NETCDF_X_AUXILIARY_VARIABLE") = ;
+     out("NETCDF_VALUE_VARIABLE") = oss.str();
+     out("_VERB") = "NETCDF_XY_MATRIX";
+     if ( name )
+          out("_NAME") = name;
+
+     MvRequest viewReq("CARTESIANVIEW");  // Create view subrequest
+     viewReq("X_AXIS_TYPE") = xAxisType;  // AXIS_TYPE *must* be in the request
+     viewReq("X_AUTOMATIC") = "on";
+     viewReq("Y_AXIS_TYPE") = yAxisType;  // AXIS_TYPE *must* be in the request
+     viewReq("Y_AUTOMATIC") = "on";
+
+     out("_VIEW") = "CARTESIANVIEW";    // add the view specification to the request
+     out("_VIEW_REQUEST") = viewReq;    // add the view specification to the request
+
+cout << "request OUT" << endl;
+out.print();
+
+     return;
+}
+
+bool HovToolkit::GetInputCommonInfo(MvRequest& in)
+{
+     // Get data
+     in.getValue(dataRequest_,"DATA");
+     if ( !in.countValues("DATA") ) {
+          marslog(LOG_EROR, "No Data files specified");
+          return false;
+     }
+
+	// Get time axis direction
+	timeDir_ = ( (const char*)in("TIME_AXIS_DIRECTION") && strcmp(in("TIME_AXIS_DIRECTION"),"BACKWARD") == 0 ) ? HOV_TIMEBACK : HOV_TIMEFOR;
+
+       // Initialize Time axis
+        in.getValue(timeAxis_,"TIME_AXIS");
+	if ( !in.countValues("TIME_AXIS") )
+		timeAxis_.setVerb("PAXIS");   //axis not defined in the user interface
+
+	return true;
+}
+
+bool HovToolkit::GetInputInfo(MvNetCDF* netcdf )
+{
+	// Retrieve information from the 'time' variable
+	MvNcVar *var = netcdf->getVariable("time");
+	long *edges = var->edges();
+	nrIndexesIn_ = edges[0];
+	MvNcAtt *tmpatt = var->getAttribute("reference_date");
+	if ( !tmpatt )
+	{
+          marslog(LOG_EROR, "Netcdf file: attribute reference_date not found");
+          return false;
+	}
+	MvDate d1 (tmpatt->as_string(0));
+	refTime_= d1.YyyyMmDd_r();
+
+	// Retrieve information from the second axis variable
+	var = netcdf->getVariable(GetSecondAxisName());
+	edges = var->edges();
+	nrPoints_ = edges[0];
+	if ( nrIndexesIn_ <= 0 || nrPoints_ <= 0 )
+	{
+        marslog(LOG_EROR, "Netcdf file: invalid dimension for variables 'time' and/or 'geographical'");
+		return false;
+	}
+
+	// Retrieve attributes values
+	// Retrieve Grid values
+	MvRequest req = netcdf->getRequest();
+	const char* cp = (const char*)req("GRID");
+	if ( cp == NULL )
+	{
+        marslog(LOG_EROR, "Netcdf file: attribute GRID not found");
+		return false;
+	}
+	string str = cp;
+	gridEW_ = atof(strtok((char*)str.c_str(),"/"));
+	gridNS_ = atof( strtok(NULL,"/"));
+
+	// Retrieve Coordinates values
+	cp = (const char*)req("COORDINATES");
+	if ( cp == NULL )
+	{
+        marslog(LOG_EROR, "Netcdf file: attribute COORDINATES not found");
+		return false;
+	}
+	str = cp;
+	y1_ = atof(strtok((char*)str.c_str(),"/"));
+	x1_ = atof(strtok(NULL,"/"));
+	y2_ = atof(strtok(NULL,"/"));
+	x2_ = atof(strtok(NULL,"/"));
+
+	// Retrieve Direction value
+     cp = (const char*)req("DIRECTION");
+	if ( cp == NULL )
+	{
+        marslog(LOG_EROR, "Netcdf file: attribute DIRECTION not found");
+		return false;
+	}
+	geoDir_ = ( strcmp(cp,"NORTH_SOUTH") == 0 ) ? HOV_NS : HOV_EW;
+
+	// Retrieve Time Direction value
+     cp = (const char*)req("T_DIRECTION");
+	if ( cp == NULL )
+	{
+        marslog(LOG_EROR, "Netcdf file: attribute T_DIRECTION not found");
+		return false;
+	}
+	timeDir_ = ( strcmp(cp,"BACKWARD") == 0 ) ? HOV_TIMEBACK : HOV_TIMEFOR;
+
+	// Retrieve Time Axis Direction value
+     cp = (const char*)req("T_AXIS_DIRECTION");
+	if ( cp == NULL )
+	{
+        marslog(LOG_EROR, "Netcdf file: attribute T_AXIS_DIRECTION not found");
+		return false;
+	}
+	verticalAxis_ = ( strcmp(cp,"VERTICAL") == 0 ) ? HOV_TIME : HOV_GEO;
+
+	// Retrieve Height Direction value
+     cp = (const char*)req("H_DIRECTION");
+	heightDir_ = ( cp && strcmp(cp,"FORWARD") == 0 ) ? HOV_HEIGHTFOR : HOV_HEIGHTBACK;
+
+	// Retrieve Height Axis Type value
+     cp = (const char*)req("H_AXIS_TYPE");
+	heightAxisType_ = ( cp && strcmp(cp,"PRESSURE") == 0 ) ? HOV_PRESSURE : HOV_ASINDATA;
+
+	// Initialize axes
+	InitializeAxes(req);
+
+	return true;
+}
+
+bool HovToolkit::CreateParamInfo(MvRequest& data)
+{
+	// Clean param info structure
+	if (params_.size())
+	{ 
+		ParamIterator iter;
+		for (iter = params_.begin(); iter != params_.end(); iter++)
+			delete (*iter).second;
+
+		params_.clear();
+	}
+	
+	// Initialize fieldset and level list structure
+     MvFieldSet fs(data);
+	MvFieldSetIterator iter(fs);
+	iter.rewind();
+        InitializeLevelList(fs.countFields());
+
+	// Check data level type: model or pressure level
+	MvField field;
+	iter.rewind();
+	field = iter();
+	CheckDataLevelType(field);
+
+	// Retrieve basic information from the fieldset
+	bool first=true;
+     string keystr,timekey;
+	int iparam;
+	double level;
+	const char* expver = 0;
+	iter.rewind();
+	while( field = iter() )
+	{
+  		// MvFieldExpander	x(field);
+		MvRequest rq=field.getRequest();
+
+		iparam = rq("PARAM");
+		level  = rq("LEVELIST",0);
+		string pn = (const char*)field.magicsName();
+		expver = rq("EXPVER");
+		string ev = expver ? expver : "_";
+
+		// Save basic information
+		GenerateKey(keystr,rq);
+		GenerateTimeKey(timekey,rq);
+		UpdateLevelList(field,level);
+
+		MvDate dd = GetDate(field);
+		double d1 = dd.YyyyMmDd_r();
+
+          // compute min/max time values
+          if ( first )
+          {
+               first = false;
+               minTime_ = maxTime_ = d1;
+          }
+          else
+          {
+               if ( minTime_ > d1 ) minTime_ = d1;
+               if ( maxTime_ < d1 ) maxTime_ = d1;
+          }
+
+          ParamInsertPair inserted = params_.insert(ParamPair(keystr,new ParamInfo(iparam,d1,level,ev,pn) ) );
+          ParamInfo *pp = (*(inserted.first)).second;
+          pp->AddIndex(timekey);
+     }
+
+     // Check if basic information was retrieved
+     if (params_.size() == 0 )
+     {
+          marslog(LOG_EROR, "GRIB file invalid, no parameters found.");
+          return false;
+     }
+
+     // Maybe this restriction should be removed in the future
+     if ( params_.size() > 1 )
+     {
+          marslog(LOG_EROR, "Creation of Hovmoeller diagrams from multiple parameters is not yet supported. This data has %d parameters.", params_.size());
+          return false;
+     }
+
+     return true;
+}
+
+void HovToolkit::GenerateKey(string &str, MvRequest& rq)
+{
+     int par = rq("PARAM");
+     int level  = rq("LEVELIST",0);
+     const char* expver = rq("EXPVER");
+     char key[16];
+
+     ostrstream oss( key, sizeof( key ) );
+
+     oss << setfill( '0' )
+	    << setw( 1 ) << 'p'
+	    << setw( 3 ) << par 
+	    << setw( 4 ) << level
+	    << setw( 4 ) << ( expver ? expver : "_" )
+	    << ends;
+
+
+     str = key;
+
+     return;
+}
+ 
+void HovToolkit::GenerateTimeKey(string &str, MvRequest& rq)
+{
+	int  istep  = rq("STEP");
+	long idate  = rq("DATE");
+	int  itime  = rq("TIME");
+
+     char key[20];
+	ostrstream oss( key, sizeof( key ) );
+
+	oss << setfill( '0' )
+	    << setw( 8 ) << idate
+	    << setw( 4 ) << itime
+	    << setw( HOV_STEPSIZE ) << istep
+	    << ends;
+
+     str = key;
+
+	return;
+}
+
+double HovToolkit::GetDateDif(string& timekey)
+{
+	// Extract date information
+	double ddate = atof(timekey.substr(0,8).c_str());
+	double dhour = atof(timekey.substr(8,2).c_str());
+	double dmin  = atof(timekey.substr(10,2).c_str());
+	double dstep = atof(timekey.substr(12,HOV_STEPSIZE).c_str());
+
+	// Compute hour+min+step in fraction of days
+	double frac = dhour*3600./86400. + dmin*60./86400. + dstep*3600./86400.;
+
+	// If it is a monthly mean parameter, add 1 to original date
+	if ( fmod(ddate,100)== 0. ) ddate++;
+
+	// Compute new date
+	MvDate ndate(ddate);
+	ndate += frac;
+
+	// Compute the difference from the reference date
+	MvDate ref(GetRefTime());
+	double dif = ref.time_interval_hours(ndate);
+
+	return dif;
+}
+
+MvDate HovToolkit::GetDate(MvField& field)
+{
+     // Compute initial date
+     MvDate d1(field.yyyymmddFoh());
+
+     // Add step
+     double d2 = field.stepFoh();
+
+     return (d1+d2);
+}
+
+int HovToolkit::EvaluateNrIndexes( ParamMap& params )
+{
+	// All params should have the same matrix size
+	ParamIterator ii = params.begin();
+	ParamInfo *par   = (*ii).second;
+	nrIndexes_ = par->NrIndexes();
+
+	return nrIndexes_;
+}
+
+bool HovToolkit::InitAllocVariables(ParamMap &params)
+{
+	// Compute number of indexes from the input data
+	EvaluateNrIndexes( params );
+
+	// Create temporary netcdf file name
+	ncdfPath_ = marstmp();
+	if ( netcdf_ )
+		delete netcdf_;
+
+	netcdf_ = new MvNetCDF();
+	netcdf_->init(ncdfPath_,'w');
+
+	// Add common variables
+	if ( !NcAddCommonVariables(params) ) return false;
+
+	// Allocate memory
+     if (xint_) delete [] xint_;
+	if (gcoord1_) delete [] gcoord1_;
+	if (gcoord2_) delete [] gcoord2_;
+
+	int nrIndexes = EvaluateNrIndexes();
+	xint_    = new double [ nrPoints_ ];
+     gcoord1_ = new double [ nrPoints_ ];
+     gcoord2_ = new double [ nrPoints_ ];
+	if (vtime_.size())
+		vtime_.erase(vtime_.begin(),vtime_.end());
+	else
+		vtime_.reserve(nrIndexes);
+
+	return true;
+}
+
+bool HovToolkit::NcGenerateData(MvRequest& data)
+{
+	// Initialize/Allocate internal variables
+	if ( !InitAllocVariables(params_) ) return false;
+
+	// Sort data by level, expver and param
+     MvFieldSet fs(data);
+	MvFieldSetIterator iter(fs);
+	iter.rewind();
+	iter.sort("LEVELIST");
+	iter.sort("EXPVER");
+	iter.sort("PARAM");
+
+	// Generate data
+	int currentGenerated = 0, lastNrGenerated = -1;
+	string timekey,keystr;
+	string lastKey = "FIRSTFIELD";
+	MvField field, lastField;
+	ParamIterator paramIter;
+
+	while( field = iter() )
+	{
+		currentGenerated++;
+
+		// Create keys
+		MvRequest rq = field.getRequest();
+		GenerateKey(keystr,rq);
+		GenerateTimeKey(timekey,rq);
+
+		// Compute data
+          if ( !ComputeValues(field) ) return false;
+
+		// Save data in the ParamInfo structure
+		if ( ( paramIter = params_.find(keystr) ) == params_.end() )
+		{
+			cout << "Something strange ??" << endl;
+			continue;
+		}
+		else 
+			(*paramIter).second->FillIndex(xint_,timekey,nrPoints_);
+      
+		// Write out data, if it can be grouped together
+		if ( lastKey != keystr && lastKey != string("FIRSTFIELD") )
+		{
+			NcWriteData(params_,lastField,lastKey);
+			lastNrGenerated = currentGenerated;
+		}
+      
+		lastKey = keystr;
+		lastField = field;
+	}
+
+	// Write out the data in the netcdf file
+	if ( lastNrGenerated <=  currentGenerated )
+	{
+		if ( ! NcWriteData(params_,lastField,lastKey) )
+		{
+               marslog(LOG_EROR, "Could not generate NETCDF data");
+               return false;
+		}
+	}
+	netcdf_->close();
+
+	return true;
+}
+
+bool HovToolkit::NcAddCommonVariables(ParamMap &params)
+{
+	// Write main attributes
+	netcdf_->addAttribute("_VIEW","HOVMOELLERVIEW");
+	NcAddType();
+	NcAddCoords();
+	NcAddDirection();
+
+	// Create time and the second variables/axes
+	MvNcVar *tncvar;
+//	if ( verticalAxis_ == HOV_TIME )
+//	{
+		tncvar = netcdf_->addVariable("time",ncDouble,EvaluateNrIndexes());
+		NcAddSecondAxis();
+//	}
+//	else
+//	{
+//		NcAddSecondAxis();
+//		tncvar = netcdf_->addVariable("time",ncDouble,EvaluateNrIndexes());
+//	}
+
+	MvDate d1(GetRefTime());
+	char buf[128];
+	d1.Format(d1.StringFormat(),buf);
+	tncvar->addAttribute("MV_VERB","AUX");
+	tncvar->addAttribute("reference_date",buf);
+	tncvar->addAttribute("units","hours");
+
+	// Create matrix variable (number of matrixes)
+	if ( params.size() > 1 )
+	{
+          // Not supported yet
+          marslog(LOG_EROR, "Creation of Hovmoeller diagrams from multiple parameters is not yet supported. This data has %d parameters.", params_.size());
+          return false;
+//		ncvar = netcdf_.addVariable("matrixes",ncChar,params.size());
+//		ParamIterator ii;
+//		for ( ii = params.begin(); ii != params.end(); ii++ )
+			
+//	if ( ii == params.end() )
+//	     return false;
+
+//	ParamInfo *par = (*ii).second;
+	}
+
+	return true;
+}
+
+void HovToolkit::NcAddSecondAxis()
+{
+     // Add second axis
+     MvNcVar *gncvar;
+     gncvar = netcdf_->addVariable(GetSecondAxisName(),ncDouble,nrPoints_);
+
+     // Add attributes
+	gncvar->addAttribute("MV_VERB","AUX");
+	if ( geoDir_ == HOV_EW )
+		gncvar->addAttribute("units","degrees_south");
+	else
+		gncvar->addAttribute("units","degrees_east");
+
+     // Add second auxiliary axis
+     if ( SecondAuxiliaryAxis() )
+     {
+          MvNcVar *gncvar1;
+          gncvar1 = netcdf_->addVariable(GetSecondAuxiliaryAxisName(),ncDouble,nrPoints_);
+
+          // Add attributes
+          gncvar1->addAttribute("MV_VERB","AUX");
+          gncvar1->addAttribute("units","degrees");
+     }
+}
+
+void HovToolkit::NcAddCoords(MvNcVar *var)
+{
+	if (var)
+	{
+		//backward compatibility
+		double area[4];
+		area[0] = y1_; area[2] = y2_;
+		area[1] = x1_; area[3] = x2_;
+		var->addAttribute("AREA",4,area);
+	}
+	else
+	{
+		char area[32];
+		sprintf(area,"%7.2f/%7.2f/%7.2f/%7.2f",y1_,x1_,y2_,x2_);
+		netcdf_->addAttribute("COORDINATES",area);
+	}
+
+	if (var)
+	{
+		//backward compatibility
+		double grid[2];
+		grid[0] = gridEW_; grid[1] = gridNS_;
+		var->addAttribute("GRID",2,grid);
+	}
+	else
+	{
+		char grid[12];
+		sprintf(grid,"%5.2f/%5.2f",gridEW_,gridNS_);
+		netcdf_->addAttribute("GRID",grid);
+	}
+}
+
+void HovToolkit::NcAddDirection(MvNcVar *ncvar)
+{
+	// Check average direction
+	string adir;
+	if ( geoDir_ == HOV_NS )
+		adir = "NORTH_SOUTH";
+	else if ( geoDir_ == HOV_EW )
+		adir = "EAST_WEST";
+	else adir = "NULL";
+
+	// Check time direction and time axis orientation
+	string tdir,taxis;
+	tdir  = (timeDir_ == HOV_TIMEFOR) ? "FORWARD" : "BACKWARD";
+	taxis = (verticalAxis_ == HOV_TIME) ? "VERTICAL" : "HORIZONTAL";
+
+	// Check height direction
+	string hdir;
+	if ( heightDir_ == HOV_HEIGHTFOR )
+		hdir = "FORWARD";
+	else if ( heightDir_ == HOV_HEIGHTBACK )
+		hdir = "BACKWARD";
+	else hdir = "NULL";
+
+	// Check height axis type
+	string haxisType;
+	if ( heightAxisType_ == HOV_PRESSURE )
+		haxisType = "PRESSURE";
+	else if ( heightAxisType_ == HOV_ASINDATA )
+		haxisType = "AS_IN_DATA";
+	else haxisType = "NULL";
+
+	// Add average and time direction
+	if (ncvar)
+	{
+		ncvar->addAttribute("DIRECTION",adir.c_str());
+		ncvar->addAttribute("T_DIRECTION",tdir.c_str());
+		ncvar->addAttribute("T_AXIS_DIRECTION",taxis.c_str());
+		ncvar->addAttribute("H_DIRECTION",hdir.c_str());
+		ncvar->addAttribute("H_AXIS_TYPE",haxisType.c_str());
+	}
+	else
+	{
+		netcdf_->addAttribute("DIRECTION",adir.c_str());
+		netcdf_->addAttribute("T_DIRECTION",tdir.c_str());
+		netcdf_->addAttribute("T_AXIS_DIRECTION",taxis.c_str());
+		netcdf_->addAttribute("H_DIRECTION",hdir.c_str());
+		netcdf_->addAttribute("H_AXIS_TYPE",haxisType.c_str());
+	}
+}
+
+// We have all the values for one set of data
+// Call functions to write the values to netcdf file
+bool HovToolkit::NcWriteData(ParamMap &params, MvField&, const string& key)
+{
+	// Get initial values
+	ParamIterator ii = params.find(key);
+	if ( ii == params.end() )
+	     return false;
+
+	ParamInfo *par = (*ii).second;
+
+	// Generate the CDF variable
+	MvNcVar *ncvar;
+	vector<long> vdim(2);
+	vector<string> vname(2);
+	int nrIndexes = EvaluateNrIndexes();
+	if ( verticalAxis_ == HOV_TIME )
+	{
+		// These 4 commands should be common for both if/else
+		// They are here for backward compatibility
+		// Analyse them again when PlotMod is replaced by DispMod
+		vdim[0]  = nrIndexes;
+		vdim[1]  = nrPoints_;
+		vname[0] = "time";
+		vname[1] = GetSecondAxisName();
+		ncvar = netcdf_->addVariable(key.c_str(),ncDouble,vdim,vname);
+	}
+	else
+	{
+		vdim[0]  = nrPoints_;
+		vdim[1]  = nrIndexes;
+		vname[0] = GetSecondAxisName();
+		vname[1] = "time";
+		ncvar = netcdf_->addVariable(key.c_str(),ncDouble,vdim,vname);
+	}
+
+	// Write some attributes in the netcdf file
+	NcAddMetadata(ncvar,par,key);
+
+	// Write matrix in the netcdf file
+	NcFillValues(ncvar,par);
+
+	// Update time axis values
+	MvNcVar *tncvar = netcdf_->getVariable("time");
+	tncvar->put(vtime_,nrIndexes);
+
+	// Update the second axis values
+	MvNcVar *gncvar = netcdf_->getVariable(GetSecondAxisName());
+	gncvar->put(gcoord1_,nrPoints_);
+
+     // Update the second auxiliary axis values
+     if ( SecondAuxiliaryAxis() )
+     {
+          MvNcVar *gncvar1 = netcdf_->getVariable(GetSecondAuxiliaryAxisName());
+          gncvar1->put(gcoord2_,nrPoints_);
+     }
+
+     return true;
+}
+
+void HovToolkit::NcAddMetadata(MvNcVar *ncvar, ParamInfo *par, const string &key)
+{
+	ncvar->addAttribute("MV_VERB","PCONT");
+
+	// Split the string back into individual components.
+	ncvar->addAttribute("PARAM",key.substr(0,4).c_str());
+	ncvar->addAttribute("LEVEL",key.substr(4,4).c_str());
+	ncvar->addAttribute("EXPVER",key.substr(8,4).c_str());
+
+	// Write area, grid, direction, title and axes
+	NcAddCoords(ncvar);
+	NcAddDirection(ncvar);
+	NcAddTitle(ncvar, par);
+	NcAddAxes(ncvar);
+
+	return;
+}
+
+void HovToolkit::SetAxes()
+{
+	SetTimeAxis();
+	SetSecondAxis();
+}
+
+void HovToolkit::SetTimeAxis()
+{
+        // Set orientation
+	timeAxis_("AXIS_ORIENTATION") = (verticalAxis_ == HOV_TIME) ? "VERTICAL" : "HORIZONTAL";
+
+	// Set min/max values
+	double minTime = GetRefTime();
+	timeAxis_("AXIS_TYPE") = "DATE";
+	if ( timeDir_ == HOV_TIMEBACK )
+	{
+		timeAxis_("AXIS_DATE_MIN_VALUE") = MvDate(maxTime_);
+		timeAxis_("AXIS_DATE_MAX_VALUE") = MvDate(minTime);
+	}
+	else
+	{
+		timeAxis_("AXIS_DATE_MIN_VALUE") = MvDate(minTime);
+		timeAxis_("AXIS_DATE_MAX_VALUE") = MvDate(maxTime_);
+	}
+
+#if 0 //It does not work if user wants the default value
+	// Try to find a better default value
+	if ( !(const char*)timeAxis_("AXIS_DATE_TYPE") )
+	{
+		long diff = (long)(maxTime_ - minTime);
+		if ( diff < 200L )
+		{
+			timeAxis_("AXIS_DATE_TYPE")  = "DAYS";
+			timeAxis_("AXIS_DAYS_LABEL") = "NUMBER";
+		}
+		else if ( diff < 20000L ) timeAxis_("AXIS_DATE_TYPE") = "MONTHS";
+		else                      timeAxis_("AXIS_DATE_TYPE") = "YEARS";
+	}
+#endif
+
+	return;
+}
+
+void HovToolkit::CheckAxis(double minValue, double maxValue, int axisType, MvRequest &axis)
+{
+	if ( abs( (int)(maxValue - minValue) ) > 0 )
+	{
+		axis("AXIS_TICK") = "ON";
+		axis("AXIS_TICK_LABEL") = "ON";
+		if ( !IsParameterSet(axis,"AXIS_MIN_VALUE") )
+			axis("AXIS_MIN_VALUE") = minValue;
+
+		if ( !IsParameterSet(axis,"AXIS_MAX_VALUE") )
+			axis("AXIS_MAX_VALUE") = maxValue;
+
+	}
+	else    // Generate a title for the point
+	{
+		char buf[10];
+		axis("AXIS_TICK_LABEL") = "OFF";
+		axis("AXIS_TICK") = "OFF";
+		sprintf(buf,"%01.1f",minValue);
+		if ( axisType == HOV_AXISLAT )
+			strcat(buf, (minValue > 0) ? "N" : "S");
+		else if ( axisType == HOV_AXISLONG )
+			strcat(buf, (minValue > 0) ? "E" : "W");
+		else
+			strcat(buf, "ERROR?");
+
+		axis("AXIS_TITLE_TEXT") = buf;
+	}
+	return;
+}
+
+// Internal data organization: 
+//   .each line contains a set of averaged lat/long values related to
+//    an especific time
+//   .first line is related to the earliest time
+// Output data organization:
+//   .the matrix coordinates (0,0) corresponds to top/left corner
+//   .4 output layouts:
+//
+//      A)           min lng     max lng    B)           min lng     max lng
+//         max time  -------------------       min time  -------------------
+//                   ...................                 ...................
+//         min time  -------------------       max time  -------------------
+//
+//
+//      C)           min time   max time    D)           max time   min time
+//         max lat   -------------------       max lat   -------------------
+//                   ...................                 ...................
+//         min lat   -------------------       min lat   -------------------
+//
+void HovToolkit::NcFillValues(MvNcVar *ncvar, ParamInfo *par)
+{
+	// Create data matrix according to the input parameters
+	// Write matrix to the netcdf file
+	IndexesMap lmap = par->Indexes();
+	int i,k;
+	string timekey;
+	double dd;
+
+	if ( verticalAxis_ == HOV_TIME ) //vertical time axis
+	{
+          if ( timeDir_ == HOV_TIMEFOR )  //option A
+          {
+               ReverseIndexIterator ii;
+               for (ii = lmap.rbegin(), k = 0; ii != lmap.rend(); ii++, k++ )
+               {
+                    timekey = (*ii).first;
+                    dd = GetDateDif(timekey);
+                    vtime_.push_back(dd);
+
+                    IndexesInfo *lInfo = (*ii).second;
+                    NcWriteValues (ncvar, lInfo, k );
+               }
+
+               // 'Expand' option: write previous values
+               NcFillPreviousValues(ncvar,k);
+          }
+          else  //option B
+          {
+               // 'Expand' option: write previous values first
+               int pos=0;
+               NcFillPreviousValues(ncvar,pos);
+
+               IndexIterator ii;
+               for (ii = lmap.begin(), k = 0; ii != lmap.end(); ii++, k++ )
+               {
+                    timekey = (*ii).first;
+                    dd = GetDateDif(timekey);
+                    vtime_.push_back(dd);
+
+                    IndexesInfo *lInfo = (*ii).second;
+                    NcWriteValues (ncvar, lInfo, k+pos );
+               }
+          }
+     }
+     else    //vertical geo/height axis: transpose values
+     {
+          // Retrieve all values from the internal structure
+          int j=0;
+          vector <double> mat(nrIndexes_ * nrPoints_);
+          vector <double> vaux;
+          vaux.reserve(nrIndexes_);
+          IndexIterator ii;
+          for (ii = lmap.begin(), k = 0; ii != lmap.end(); ii++, k++ )
+          {
+               timekey = (*ii).first;
+               dd = GetDateDif(timekey);
+               vaux.push_back(dd);
+
+               IndexesInfo *lInfo = (*ii).second;
+               for (i = 0; i < nrPoints_; i++ )
+                    mat[j++] = lInfo->Values()[i];
+          }
+
+          // Initialize indexes according to Time forward or backward
+          int ind,step,pos,posEx;
+          if ( timeDir_ == HOV_TIMEFOR) //option C
+          {
+               ind   = 0;
+               step  = 1;
+               pos   = nrIndexesIn_;
+               posEx = 0;
+          }
+          else                          //option D
+          {
+               ind   = nrIndexes_-1;
+               step  = -1;
+               pos   = 0;
+               posEx = nrIndexes_;
+          }
+
+          // 'Expand' option: open input netCDF file
+          NcOpenPreviousFile();
+
+          // Write matrix data to the netcdf file
+          int nrIndexes = EvaluateNrIndexes();
+          vector <double> cp(nrIndexes);
+          for (i = 0; i < nrPoints_; i++ )
+          {
+               for (j = i, k = ind; j < nrIndexes_*nrPoints_; j+=nrPoints_, k+=step )
+                    cp[k+pos] = mat[j];
+
+               // 'Expand' option: write previous values
+               if ( !NcFillPreviousValues(ncvar,i,cp,posEx) ) return;
+
+               ncvar->setCurrent(i);
+               ncvar->put(cp,1,(long)nrIndexes);
+          }
+
+          // Save time values
+          if ( timeDir_ == HOV_TIMEFOR )
+               if ( !NcFillPreviousTimeValues() )
+                    return;
+
+          k = ind;
+          for (i = 0;  i < nrIndexes_; i++ )
+          {
+               vtime_.push_back(vaux[k]);
+               k += step;
+          }
+
+          if ( timeDir_ == HOV_TIMEBACK )
+               if ( !NcFillPreviousTimeValues() )
+                    return;
+
+          // 'Expand' option: close input netCDF file
+          NcClosePreviousFile();
+     }
+}
+
+void HovToolkit::NcOpenPreviousFile()
+{
+	// Return if option is not Expand
+	if ( nrIndexesIn_ == 0 ) return;
+
+	// Initialize the input netcdf file
+	if ( netcdfIn_ ) delete netcdfIn_;
+	netcdfIn_ = new MvNetCDF();
+	netcdfIn_->init(netfnameIn_,'r');
+
+	return;
+}
+
+void HovToolkit::NcClosePreviousFile()
+{
+	if ( netcdfIn_ )
+	{
+		delete netcdfIn_;
+		netcdfIn_ = 0;
+	}
+
+	return;
+}
+
+void HovToolkit::NcFillPreviousValues(MvNcVar *ncvar,int& pos)
+{
+	// Return if option is not Expand
+	if ( nrIndexesIn_ == 0 ) return;
+
+	// Open input netcdf file
+     NcOpenPreviousFile();
+
+	// Copy 'time' values from the input file
+	vector<double> vals;
+     MvNcVar *tvar = netcdfIn_->getVariable("time");
+	long *edges = tvar->edges();
+	tvar->get(vals,edges);
+	for ( unsigned int i = 0; i < vals.size(); i++)
+	       vtime_.push_back(vals[i]);
+
+	// Copy values from the input netcdf file
+	string key = ncvar->name();  //get variable name
+	MvNcVar *ncvarIn = netcdfIn_->getVariable(key.c_str());
+	edges = ncvarIn->edges();
+	ncvarIn->get(vals,edges);
+	ncvar->setCurrent(pos);
+	ncvar->put(vals,edges[0],edges[1]);
+     pos += edges[0];
+
+	NcClosePreviousFile();
+
+	return;
+}
+
+
+bool HovToolkit::NcFillPreviousValues(MvNcVar *ncvar,int pos,vector<double>& cp,int ind )
+{
+	// Return if option is not Expand
+	if ( nrIndexesIn_ == 0 ) return true;
+
+	// Check input file
+	if ( !netcdfIn_ ) 
+	{
+          marslog(LOG_EROR, "Input NetCDF file not accessible");
+          return false;
+	}
+	
+	// Get values from the input netcdf file
+	vector<double> vals;
+	string key = ncvar->name();  //get variable name
+	MvNcVar *ncvarIn = netcdfIn_->getVariable(key.c_str());
+	long* edges = ncvarIn->edges();
+	ncvarIn->setCurrent(pos);
+	ncvarIn->get(vals,1,edges[1]);
+
+	// Copy values
+	for (unsigned int i = 0; i < vals.size(); i++)
+		cp[ind+i] = vals[i];
+
+	return true;
+}
+
+bool HovToolkit::NcFillPreviousTimeValues()
+{
+	// Return if option is not Expand
+	if ( nrIndexesIn_ == 0 ) return true;
+
+	// Check input file
+	if ( !netcdfIn_ ) 
+	{
+          marslog(LOG_EROR, "Input NetCDF file not accessible");
+          return false;
+	}
+
+	// Copy 'time' values from the input file
+	vector<double> vals;
+     MvNcVar *tvar = netcdfIn_->getVariable("time");
+	long *edges = tvar->edges();
+	tvar->get(vals,edges);
+	for ( unsigned int i = 0; i < vals.size(); i++)
+		vtime_.push_back(vals[i]);
+
+	return true;
+}
+
+void HovToolkit::NcWriteValues (MvNcVar *ncvar, IndexesInfo *lInfo, int pos )
+{
+	 vector <double> cp(nrPoints_);
+
+	 // Get values from the structure
+	 for (int i = 0; i < nrPoints_; i++ )
+		  cp[i] = lInfo->Values()[i];
+
+	 // Write values to a netcdf file
+	 ncvar->setCurrent(pos);
+	 ncvar->put(cp,1,(long)nrPoints_);
+}
+
+MvRequest HovToolkit::GetVariableData(MvRequest& req)
+{
+	// It assumes that there is only one variable data to be processed
+	// and it corresponds to a subrequest whose name starts with character
+	// 'p' followed by a number (e.g. p22800000001). If not found, an 
+	// empty structure is returned.
+	MvRequest reqVar = req("VARIABLES");
+	for ( int i = 0; i < reqVar.countParameters(); i++ )
+	{
+		const char* parname = reqVar.getParameter(i);
+		if ( parname[0] == 'p' && isdigit(parname[1]) )
+		{
+			MvRequest vv = reqVar.getSubrequest(parname);
+			return vv;
+		}
+	}
+
+	return MvRequest();
+}
+
+void HovToolkit::InitializeAxes(MvRequest& req)
+{
+	// Default axes
+	timeAxis_.setVerb ("PAXIS");
+     geoAxis_.setVerb ("PAXIS");
+     geo2Axis_.setVerb ("PAXIS");
+
+	// Retrieve information from the data variable
+	MvRequest reqVar = GetVariableData(req);
+
+	// Initialize axes
+	if ( reqVar )
+	{
+		// Initialize time axis
+		const char* str = reqVar("TIME_AXIS");
+		if ( str )
+			timeAxis_ = string2request(str);
+
+		// Initialize geo axis
+		str = reqVar("GEO_AXIS");
+		if ( str )
+			geoAxis_ = string2request(str);
+
+		// Initialize second geo axis
+		str = reqVar("GEO2_AXIS");
+		if ( str )
+			geo2Axis_ = string2request(str);
+	}
+}
+
+//--------------------------------------------------------------
+
+void HovLineToolkit::NcAddType()
+{
+	netcdf_->addAttribute("TYPE","LINE");
+}
+
+bool HovLineToolkit::ComputeValues(MvField &field)
+{
+	// Initialize variables
+	MvFieldExpander x(field);
+	double dx = double( x2_ - x1_ ) / double(nrPoints_ -1);
+	double dy = double( y2_ - y1_ ) / double(nrPoints_ -1);
+	double lon = x1_;
+	double lat = y1_;
+
+	// Interpolatate along a line
+	for ( int k = 0; k < nrPoints_; k++)
+	{
+		 xint_[k] = field.interpolateAt(lon, lat);
+		 gcoord1_[k] = lon;
+		 gcoord2_[k] = lat;
+		 lon += dx;
+		 lat += dy;
+	}
+	return true;
+}
+
+void HovLineToolkit::NcAddTitle(MvNcVar *var, ParamInfo *par)
+{
+	char title[512];
+	sprintf( title,"Hovmoeller of %s %d %s",
+		 par->ParamName().c_str(), par->Level(),par->ExpVerTitle().c_str() );
+
+	var->addAttribute("MV_TITLE",title);
+
+	return;
+}
+
+void HovLineToolkit::NcAddAxes(MvNcVar *ncvar)
+{
+	SetAxes();
+	char* creq = request2string(timeAxis_);
+	ncvar->addAttribute("TIME_AXIS",creq);
+	creq = request2string(geoAxis_);
+	ncvar->addAttribute("GEO_AXIS",creq);
+	creq = request2string(geo2Axis_);
+	ncvar->addAttribute("GEO2_AXIS",creq);
+}
+
+void HovLineToolkit::SetSecondAxis()
+{
+        // Set orientation
+        if ( verticalAxis_ == HOV_GEO )
+	{
+		geoAxis_("AXIS_ORIENTATION")  = "VERTICAL";
+		geo2Axis_("AXIS_ORIENTATION") = "VERTICAL";
+	}
+	else
+	{
+		geoAxis_("AXIS_ORIENTATION")  = "HORIZONTAL";
+		geo2Axis_("AXIS_ORIENTATION") = "HORIZONTAL";
+	}
+
+	// Set lat/long axis type
+        geoAxis_("AXIS_TICK_LABEL_TYPE")  = "LATITUDE";
+        geo2Axis_("AXIS_TICK_LABEL_TYPE") = "LONGITUDE";
+
+	// Set geographical min/max values
+	if ( verticalAxis_ == HOV_GEO ) // vertical geographical axes
+	{
+		CheckAxis(y2_,y1_,HOV_AXISLAT,geoAxis_);
+		CheckAxis(x2_,x1_,HOV_AXISLONG,geo2Axis_);
+	}
+	else                            // horizontal geographical axes
+	{
+		CheckAxis(y1_,y2_,HOV_AXISLAT,geoAxis_);
+		CheckAxis(x1_,x2_,HOV_AXISLONG,geo2Axis_);
+	}
+
+	return;
+}
+
+//--------------------------------------------------------------
+
+void HovAreaToolkit::NcAddType()
+{
+	netcdf_->addAttribute("TYPE","AREA");
+}
+
+bool HovAreaToolkit::ComputeValues(MvField &field)
+{
+	MvFieldExpander x(field);
+  
+	// Average over area
+	// AverageAlong() does not know array size. If it fails then return
+	// array remains empty, thus fill with missing values here.
+	// gridNS_ or gridEW_ have the same value
+	bool interp=false; //set bilinear interpolation
+	if ( !field.averageAlong(xint_,x1_,y1_,x2_,y2_,geoDir_,nrPoints_,gridNS_,interp,gcoord1_) )
+	{
+		for (int i = 0; i < nrPoints_; i++ )
+			xint_[i] = DBL_MAX;
+
+		return false;
+	}
+
+	return true;
+}
+
+void HovAreaToolkit::NcAddTitle(MvNcVar *var, ParamInfo *par) 
+{
+	char  title[512];
+	if ( geoDir_ == HOV_EW )
+		sprintf(title,"Hovmoeller of %s %d %s (%.1f%s-%.1f%s)",
+			par->ParamName().c_str(), par->Level(),
+			par->ExpVerTitle().c_str(),
+			(x1_< 0) ? -x1_ : x1_, (x1_<0) ? "W" : "E",
+			(x2_< 0) ? -x2_ : x2_, (x2_<0) ? "W" : "E" );
+	else
+		sprintf(title,"Hovmoeller of %s %d %s (%.1f%s-%.1f%s)",
+			par->ParamName().c_str(), par->Level(),
+			par->ExpVerTitle().c_str(),
+			(y1_< 0) ? -y1_ : y1_, (y1_<0) ? "S" : "N",
+			(y2_< 0) ? -y2_ : y2_, (y2_<0) ? "S" : "N" );
+
+	var->addAttribute("MV_TITLE",title);
+
+	return;
+}
+
+void HovAreaToolkit::NcAddAxes(MvNcVar *ncvar)
+{
+	SetAxes();
+	char* creq = request2string(timeAxis_);
+	ncvar->addAttribute("TIME_AXIS",creq);
+	creq = request2string(geoAxis_);
+	ncvar->addAttribute("GEO_AXIS",creq);
+}
+
+void HovAreaToolkit::SetSecondAxis()
+{
+        // Set orientation
+        geoAxis_("AXIS_ORIENTATION")  = (verticalAxis_ == HOV_GEO) ? "VERTICAL" : "HORIZONTAL";
+
+	// Set lat/long axis type according to the direction
+        geoAxis_("AXIS_TICK_LABEL_TYPE") = (geoDir_ == HOV_NS) ? "LONGITUDE" : "LATITUDE";
+
+	// Set geographical min/max values
+	double min,max;
+	if ( strcmp((const char*)geoAxis_("AXIS_TICK_LABEL_TYPE"),"LONGITUDE") )
+	{
+		if ( verticalAxis_ == HOV_GEO ) // latitude vertical
+		{
+			min = y2_;
+			max = y1_;
+		}
+		else                            //latitude horizontal
+		{
+			min = y1_;
+			max = y2_;
+		}
+	}
+	else
+	{
+		if ( verticalAxis_ == HOV_GEO ) // longitude vertical
+		{
+			min = x2_;
+			max = x1_;
+		}
+		else                            //longitude horizontal
+		{
+			min = x1_;
+			max = x2_;
+		}
+	}
+	CheckAxis(min,max,geoDir_,geoAxis_);
+
+	return;
+}
+
+//--------------------------------------------------------------
+
+void HovHeightToolkit::GenerateKey(string &str, MvRequest& rq)
+{
+	// The level value is ignored to build the key
+	int par = rq("PARAM");
+	int level = 0;
+	const char* expver = rq("EXPVER");
+        char key[16];
+
+	ostrstream oss( key, sizeof( key ) );
+
+	oss << setfill( '0' )
+	    << setw( 1 ) << 'p'
+	    << setw( 3 ) << par 
+	    << setw( 4 ) << level
+	    << setw( 4 ) << ( expver ? expver : "_" )
+	    << ends;
+
+        str = key;
+
+	return;
+}
+
+void HovHeightToolkit::InitializeLevelList(int size)
+{
+	vlevels_.clear();
+	vlevels_.reserve(size);
+}
+
+void HovHeightToolkit::UpdateLevelList(MvField& field, double ilevel)
+{
+	// Check if conversion from model level to pressure level is needed
+	double level = (heightAxisType_ == HOV_PRESSURE) ? field.meanML_to_Pressure_bySP(double(HOV_SP*100.),(int)ilevel)/100. : ilevel;
+
+	vector<double>::iterator iter = find(vlevels_.begin(),vlevels_.end(),level     );
+	if ( iter == vlevels_.end() )
+		vlevels_.push_back(level);
+}
+
+bool HovHeightToolkit::ComputeValues(MvField &field)
+{
+	MvFieldExpander x(field);
+	hgtVal_ = field.integrate( y1_,x1_,y2_,x2_);
+
+	return true;
+}
+
+bool HovHeightToolkit::NcGenerateData(MvRequest& data)
+{
+	// Initialize/Allocate internal variables
+	if ( !InitAllocVariables(params_) ) return false;
+
+	// Check level list order
+	char order;
+	if ( heightDir_ == HOV_HEIGHTFOR ) 
+	{
+		// the diagram should show values starting from the
+		// lowest to the highest. However, in the internal matrix
+		// representation, which fits the diagram, the first 
+		// point/line is on the top left corner of the diagram.
+		// Therefore, the first point to be calculated should be
+		// the highest level
+		order = '>';
+          sort(vlevels_.begin(),vlevels_.end());
+	}
+	else
+	{
+		order = '<';
+          sort(vlevels_.rbegin(),vlevels_.rend());
+	}
+
+     for ( int i = 0; i < nrPoints_; i++)
+		gcoord1_[nrPoints_-1-i] = vlevels_[i];
+
+	// Sort data by level, expver and param
+     MvFieldSet fs(data);
+	MvFieldSetIterator iter(fs);
+	iter.rewind();
+	iter.sort("LEVELIST",order);
+	iter.sort("STEP");
+	iter.sort("TIME");
+	iter.sort("DATE");
+	iter.sort("EXPVER");
+	iter.sort("PARAM");
+
+	// Generate data
+	int currentGenerated = 0, lastNrGenerated = -1;
+	int ind=0;
+	string sfirst = "FIRSTFIELD";
+	string timeKey,keystr;
+	string lastTimeKey = sfirst;
+	string lastKey = sfirst;
+	MvField field, lastField;
+	ParamIterator paramIter;
+
+	while( field = iter() )
+	{
+		currentGenerated++;
+
+		// Create keys
+		MvRequest rq = field.getRequest();
+		GenerateKey(keystr,rq);
+		GenerateTimeKey(timeKey,rq);
+
+		// Compute data
+          if ( !ComputeValues(field) ) return false;
+
+		// Save computed value
+		xint_[ind++] = hgtVal_;
+
+		// Get all the computed level values for each time
+		if ( ind < nrPoints_ )
+		{
+			// Extra check
+			if ( lastTimeKey != timeKey && lastTimeKey != sfirst )
+			{
+                    marslog(LOG_EROR, "Input data not consistent. Probably number of levels is not the same for all time stamps");
+                    return false;
+			}
+			lastTimeKey = timeKey;
+			continue;
+		}
+
+		// Make sure the time stamps are the same
+		if ( lastTimeKey != timeKey)
+		{
+               marslog(LOG_EROR, "Input data not consistent. Probably number of levels is not the same for all time stamps");
+               return false;
+		}
+
+		// Save data in the ParamInfo structure
+		if ( ( paramIter = params_.find(keystr) ) == params_.end() )
+		{
+               marslog(LOG_EROR, "Internal wrong key: %s", keystr.c_str());
+               return false;
+		}
+		else 
+			(*paramIter).second->FillIndex(xint_,timeKey,nrPoints_);
+      
+		// Write out data, if it can be grouped together
+		if ( lastKey != keystr && lastKey != sfirst )
+		{
+			NcWriteData(params_,lastField,lastKey);
+			lastNrGenerated = currentGenerated;
+		}
+      
+		lastKey = keystr;
+		lastField = field;
+		lastTimeKey = sfirst;
+		ind = 0;
+	}
+
+	// Write out the data in the netcdf file
+	if ( lastNrGenerated <=  currentGenerated )
+	{
+		if ( ! NcWriteData(params_,lastField,lastKey) )
+		{
+               marslog(LOG_EROR, "Could not generate NETCDF data");
+               return false;
+		}
+	}
+	netcdf_->close();
+
+	return true;
+}
+
+void HovHeightToolkit::NcAddType()
+{
+	netcdf_->addAttribute("TYPE","HEIGHT");
+}
+
+void HovHeightToolkit::NcAddSecondAxis()
+{
+     MvNcVar *gncvar;
+     gncvar = netcdf_->addVariable(GetSecondAxisName(),ncDouble,nrPoints_);
+
+	gncvar->addAttribute("MV_VERB","AUX");
+	gncvar->addAttribute("units","numbers");
+}
+
+void HovHeightToolkit::NcAddTitle(MvNcVar *var, ParamInfo *par)
+{
+	char  title[512];
+	sprintf(title,"Hovmoeller of %s %s (%.1f%s/%.1f%s/%.1f%s/%.1f%s)",
+		par->ParamName().c_str(),par->ExpVerTitle().c_str(),
+		(y1_< 0) ? -y1_ : y1_, (y1_<0) ? "S" : "N",
+		(x1_< 0) ? -x1_ : x1_, (x1_<0) ? "W" : "E",
+	        (y2_< 0) ? -y2_ : y2_, (y2_<0) ? "S" : "N",
+		(x2_< 0) ? -x2_ : x2_, (x2_<0) ? "W" : "E" );
+
+	var->addAttribute("MV_TITLE",title);
+
+	return;
+}
+
+void HovHeightToolkit::NcAddAxes(MvNcVar *ncvar)
+{
+	SetAxes();
+	char* creq = request2string(timeAxis_);
+	ncvar->addAttribute("TIME_AXIS",creq);
+	creq = request2string(geoAxis_);
+	ncvar->addAttribute("GEO_AXIS",creq);
+}
+
+void HovHeightToolkit::SetSecondAxis()
+{
+       // Set orientation
+        geoAxis_("AXIS_ORIENTATION")  = (verticalAxis_ == HOV_GEO) ? "VERTICAL" : "HORIZONTAL";
+
+	// Set axis type
+     geoAxis_("AXIS_TICK_LABEL_TYPE") = "NUMBER";
+
+	// Set min/max values
+	double min = vlevels_[0];
+	double max = vlevels_[vlevels_.size()-1];
+
+	CheckAxis(min,max,geoDir_,geoAxis_);
+
+	return;
+}
+
+void HovHeightToolkit::CheckDataLevelType(MvField& field)
+{
+	// Verify if option HeightAxisType and input data are compatible
+	if ( field.isPressureLevel() && heightAxisType_ == HOV_PRESSURE )
+	{
+          marslog(LOG_INFO,"Warning: input parameter HEIGHT_AXIS_TYPE switched to AS_IN_DATA, since input data is in pressure levels");
+          heightAxisType_ = HOV_ASINDATA;
+	}
+}
+
+void HovHeightToolkit::CreateOutputRequest(MvRequest& out, const char* name)
+{
+	// Currently, the netcdf file contains only
+	// one parameter. Update this code for
+	// more than one parameter
+	ParamIterator ii = params_.begin();
+	ParamInfo *par   = (*ii).second;
+	const char* expver = par->ExpVer();
+	ostrstream oss;
+	oss << setfill( '0' )
+	    << setw( 1 ) << 'p'
+	    << setw( 3 ) << par->Parameter()
+	    << setw( 4 ) << 0
+	    << setw( 4 ) << ( expver ? expver : "_" )
+	    << ends;
+
+	// Create netcdf subrequest
+	MvRequest req("NETCDF");
+	req("PATH") = ncdfPath_.c_str();
+
+	// Create view subrequest
+	MvRequest viewReq("CARTESIANVIEW");
+	viewReq("X_AXIS_TYPE") = "date";
+	viewReq("Y_AXIS_TYPE") = "logarithmic";
+	viewReq("X_AUTOMATIC") = "on";
+	viewReq("Y_AUTOMATIC") = "on";
+	viewReq("MAP_PROJECTION") = "cartesian";
+
+	// Create output request
+     out.setVerb("NETCDF_XY_MATRIX");
+     out("NETCDF_DATA") = req;
+     out("NETCDF_Y_VARIABLE") = GetSecondAxisName();
+     out("NETCDF_X_VARIABLE") = "time";
+     out("NETCDF_VALUE_VARIABLE") = oss.str();
+     out("_VIEW") = "CARTESIANVIEW";
+     out("_VIEW_REQUEST") = viewReq;
+     out("_VERB") = "NETCDF_XY_MATRIX";
+     if ( name )
+          out("_NAME") = name;
+
+cout << "request OUT" << endl;
+out.print();
+
+     return;
+}
+
+//--------------------------------------------------------------
+
+AreaHovmoeller::AreaHovmoeller() : Hovmoeller("AREA_HOV")
+{
+//empty
+}
+
+void AreaHovmoeller::serve (MvRequest& in, MvRequest& out)
+{
+     // Compute Hovmoeller diagram
+     if (!Compute(in,out))
+          setError(1, "Failed to generate Hovmoeller.");
+}
+
+bool AreaHovmoeller::GetInputInfo(MvRequest& in)
+{
+     // Get common information from user interface
+     if ( !GetInputCommonInfo(in) ) return false;
+
+     // Get area
+	y1_ = in("AREA",0);
+	x1_ = in("AREA",1);
+	y2_ = in("AREA",2);
+	x2_ = in("AREA",3);
+
+	// Check if coordinates follow Mars rules (n/w/s/e)
+	if ( x1_ > x2_ )
+	{
+		double W = x1_;
+		x1_ = x2_;
+		x2_ = W;
+	}
+	if( y2_ > y1_ )
+	{
+		double W = y1_;
+		y1_ = y2_;
+		y2_ = W;
+	}
+
+     // Get direction
+     geoDir_ = ((const char*)in("AVERAGE_DIRECTION") && strcmp(in("AVERAGE_DIRECTION"),"NORTH_SOUTH" ) == 0 ) ? HOV_NS : HOV_EW;
+
+     // Get swap axes flag
+     swapAxes_ = ( (const char*)in("SWAP_AXES") && strcmp(in("SWAP_AXES"),"YES") == 0 ) ? true : false;
+
+	// Set axes orientation
+	if ( (swapAxes_ && geoDir_ == HOV_EW) || (!swapAxes_ && geoDir_ == HOV_NS) )
+		verticalAxis_ = HOV_TIME;
+	else
+		verticalAxis_ = HOV_GEO;
+
+     // Initialize Geo axis
+     in.getValue(geoAxis_,"GEO_AXIS");
+	if ( !in.countValues("GEO_AXIS") ) 
+		geoAxis_.setVerb ("PAXIS"); //axis not defined in the user interface
+
+	// Initialize x/y resolution
+	gridNS_= in("RESOLUTION");
+	gridEW_= in("RESOLUTION");
+
+	return true;
+}
+
+int AreaHovmoeller::EvaluateNPoints()
+{
+     if ( y1_ > 90. || y1_ < -90. || y2_ > 90. || y2_ < -90.) return 0;
+
+	if ( geoDir_ == HOV_EW )
+	       nrPoints_ = (int)( fabs( (y1_-y2_)/gridNS_ ) ) + 1;
+	else
+	       nrPoints_ = (int)( fabs( (x2_-x1_)/gridEW_ ) ) + 1;
+
+	return nrPoints_;
+}
+
+//--------------------------------------------------------------
+
+LineHovmoeller::LineHovmoeller() : Hovmoeller("LINE_HOV")
+{
+//empty
+}
+
+void LineHovmoeller::serve (MvRequest& in, MvRequest& out)
+{
+	// Compute Hovmoeller diagram
+	if (!Compute(in,out))
+	{
+		setError(1, "Failed to generate Hovmoeller.");
+	}
+
+	return;
+}
+
+bool LineHovmoeller::GetInputInfo(MvRequest& in)
+{
+     // Get common information from user interface
+     if ( !GetInputCommonInfo(in) ) return false;
+
+        // Get line
+	y1_ = in("LINE",0);
+	x1_ = in("LINE",1);
+	y2_ = in("LINE",2);
+	x2_ = in("LINE",3);
+
+	// Check if coordinates follow Mars rules (n/w/s/e)
+	if ( x1_ > x2_ )
+	{
+		double W = x1_;
+		x1_ = x2_;
+		x2_ = W;
+	}
+	if( y2_ > y1_ )
+	{
+		double W = y1_;
+		y1_ = y2_;
+		y2_ = W;
+	}
+
+     // Get swap axes flag
+     swapAxes_ = ( (const char*)in("SWAP_AXES") && strcmp(in("SWAP_AXES"),"YES") == 0 ) ? true : false;
+
+     // Initialize Geo axis
+     in.getValue(geoAxis_,"GEO_AXIS");
+	if ( !in.countValues("GEO_AXIS") ) 
+		geoAxis_.setVerb ("PAXIS"); //axis not defined in the user interface
+
+	// Initialize Geo2 axis
+     in.getValue(geo2Axis_,"GEO2_AXIS");
+	if ( !in.countValues("GEO2_AXIS") ) 
+		geo2Axis_.setVerb ("PAXIS"); //axis not defined in the user interface
+
+	// Set axes orientation
+	verticalAxis_ = swapAxes_ ? HOV_GEO : HOV_TIME;
+
+	// Initialize x/y resolution
+	gridNS_= in("RESOLUTION");
+	gridEW_= in("RESOLUTION");
+
+	geoDir_ = -1;  // average direction not applied
+
+	return true;
+}
+
+int LineHovmoeller::EvaluateNPoints()
+{
+     if ( y1_ > 90. || y1_ < -90. || y2_ > 90. || y2_ < -90.) return 0;
+
+	double	dellat = ABS(y2_-y1_), dellon = ABS(x2_-x1_);
+	int i = int( sqrt( dellon*dellon + dellat*dellat )/MAX(gridNS_,gridEW_));
+
+	nrPoints_ = MAX(i,64); //64->arbitrary minimum number of points
+
+	return nrPoints_;
+}
+
+//--------------------------------------------------------------
+
+HeightHovmoeller::HeightHovmoeller() : Hovmoeller("HEIGHT_HOV")
+{
+//empty
+}
+
+void HeightHovmoeller::serve (MvRequest& in, MvRequest& out)
+{
+     // Compute Hovmoeller diagram
+     if (!Compute(in,out))
+          setError(1, "Failed to generate Hovmoeller.");
+}
+
+bool HeightHovmoeller::GetInputInfo(MvRequest& in)
+{
+     // Get common information from user interface
+     if ( !GetInputCommonInfo(in) ) return false;
+
+     // Get area
+	y1_ = in("AREA",0);
+	x1_ = in("AREA",1);
+	y2_ = in("AREA",2);
+	x2_ = in("AREA",3);
+
+	// Check if coordinates follow Mars rules (n/w/s/e)
+	if ( x1_ > x2_ )
+	{
+		double W = x1_;
+		x1_ = x2_;
+		x2_ = W;
+	}
+	if( y2_ > y1_ )
+	{
+		double W = y1_;
+		y1_ = y2_;
+		y2_ = W;
+	}
+
+	// Get height axis direction
+	heightDir_ = ( (const char*)in("HEIGHT_AXIS_DIRECTION") && strcmp(in("HEIGHT_AXIS_DIRECTION"),"FORWARD") == 0 ) ? HOV_HEIGHTFOR : HOV_HEIGHTBACK;
+
+ 	// Get height axis type
+	heightAxisType_ = ( (const char*)in("HEIGHT_AXIS_TYPE") && strcmp(in("HEIGHT_AXIS_TYPE"),"PRESSURE") == 0 ) ? HOV_PRESSURE : HOV_ASINDATA;
+
+     // Initialize Height axis
+     in.getValue(geoAxis_,"HEIGHT_AXIS");
+	if ( !in.countValues("HEIGHT_AXIS") ) 
+		geoAxis_.setVerb ("PAXIS"); //axis not defined in the user interface
+
+	// Set axes orientation
+	verticalAxis_ = HOV_GEO;
+	geoDir_ = -1;  // average direction not applied
+
+	// Initialize x/y resolution  ??? Do we need this ???
+	gridNS_= 1;   //in("RESOLUTION");
+	gridEW_= 1;   //in("RESOLUTION");
+
+	return true;
+}
+
+int HeightHovmoeller::EvaluateNPoints()
+{
+	nrPoints_ = vlevels_.size();
+
+	return nrPoints_;
+}
diff --git a/src/Hovmoeller/HovToolkit.h b/src/Hovmoeller/HovToolkit.h
new file mode 100644
index 0000000..9e59fcf
--- /dev/null
+++ b/src/Hovmoeller/HovToolkit.h
@@ -0,0 +1,302 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef HOVTOOLKIT_H
+#define HOVTOOLKIT_H
+
+#include "Metview.h"
+#include "Factory.h"
+#include "MvFieldSet.h"
+#include "MvDate.h"
+#include "MvHovmFrame.h"
+#include "Hovmoeller.h"
+
+// Constants 
+enum { HOV_AREA, HOV_LINE, HOV_HEIGHT }; //application option: AREA,LINE or HEIGHT
+enum { HOV_NS, HOV_EW };                 //average direction: North-South or East-West
+enum { HOV_TIME, HOV_GEO };              //vertical axis: time or 'second' axis
+enum { HOV_TIMEFOR, HOV_TIMEBACK };      //time axis direction: Forward or Backward
+enum { HOV_HEIGHTFOR, HOV_HEIGHTBACK };  //height axis direction: Forward or Backward
+enum { HOV_AXISLONG, HOV_AXISLAT };      //axis type: latitude or longitude (used for title)
+enum { HOV_ASINDATA, HOV_PRESSURE };     //height axis type options
+
+#define HOV_SP  1013.25                 // stardard pressure
+
+class HovToolkit {
+
+public:
+
+	HovToolkit();
+	virtual ~HovToolkit();
+
+	// Release memory
+        void ReleaseMemory();
+
+	// Initialize common variables from user interface
+	bool GetInputCommonInfo(MvRequest& in);
+
+	// Initialize variables from user interface
+	virtual bool GetInputInfo(MvRequest&) { 
+		cout << "Should not be here" << endl;
+	        return false;
+	}
+
+	// Initialize variables from the netcdf file
+	virtual bool GetInputInfo(MvNetCDF*);
+
+	// Compute Hovmoeller diagram (main routine)
+	// Create a new netcdf file
+	virtual bool Compute(MvRequest&,MvRequest&);
+
+	// Compute Hovmoeller diagram (main routine)
+	// Used to expand a existing netcdf file
+	virtual bool Compute(string&,MvRequest&,string&);
+
+	// Compute diagram values
+	virtual bool ComputeValues(MvField&) = 0;
+
+	// Create output request
+	virtual void CreateOutputRequest(MvRequest&, const char*);
+
+	// Initialize Param Info structure
+	bool CreateParamInfo(MvRequest&);
+
+        // Create access keys
+	virtual void GenerateKey(string&, MvRequest&);
+	void GenerateTimeKey(string&, MvRequest&);
+
+	// Access time/date information
+	double GetRefTime() { return refTime_; }
+	void   SetRefTime( double ref ) { refTime_ = ref; }
+	MvDate GetDate(MvField& field);
+	double GetDateDif(string& timekey);
+
+	// Compute axes sizes - number of points/indexes(time values)
+	virtual int EvaluateNPoints() {
+		cout << "Should not be here" << endl;
+	        return 0;
+	}
+
+	int EvaluateNrIndexes() { return nrIndexes_ + nrIndexesIn_;}
+	int EvaluateNrIndexes( ParamMap& );
+
+	// Initialize initial variables and the netcdf file
+	bool InitAllocVariables(ParamMap& params);
+
+	// Functions to handle list of levels
+	virtual void InitializeLevelList (int) { }
+	virtual void UpdateLevelList (MvField&,double) { }
+	virtual void CheckDataLevelType(MvField&) { }
+
+	// Functions to handle the netcdf file
+	virtual bool NcGenerateData(MvRequest&);
+	bool NcAddCommonVariables(ParamMap&);
+	void NcAddCoords(MvNcVar* var=0);
+	void NcAddDirection(MvNcVar* var=0);
+	bool NcWriteData(ParamMap&, MvField&, const string& key);
+	void NcAddMetadata(MvNcVar*, ParamInfo*, const string&);
+	virtual void NcAddSecondAxis ();
+	virtual void NcAddType () {
+		cout << "Should not be here" << endl;
+	}
+	virtual void NcAddTitle(MvNcVar*, ParamInfo*) {
+		cout << "Should not be here" << endl;
+	}
+	virtual void NcAddAxes(MvNcVar*) {
+		cout << "Should not be here" << endl;
+	}
+
+	// Update output matrix of values
+	void NcFillValues(MvNcVar*, ParamInfo*);
+	void NcWriteValues (MvNcVar*, IndexesInfo*, int);
+
+	// Functions to handle the Expand option
+	void NcOpenPreviousFile();
+	void NcClosePreviousFile();
+	void NcFillPreviousValues(MvNcVar *ncvar, int&);
+	bool NcFillPreviousValues(MvNcVar *ncvar, int, vector<double>&, int);
+	bool NcFillPreviousTimeValues();
+	MvRequest GetVariableData(MvRequest&);
+	void InitializeAxes(MvRequest&);
+
+	// Functions to handle axes parameters
+	virtual const char* GetSecondAxisName() = 0;  // the first axis name is "time"
+     virtual const char* GetSecondAuxiliaryAxisName() = 0;
+     virtual bool SecondAuxiliaryAxis() = 0;
+	virtual void SetAxes();
+	virtual void SetTimeAxis();
+	virtual void SetSecondAxis() {
+		cout << "Should not be here" << endl;
+	}
+	void CheckAxis(double min, double max, int axisType, MvRequest&);
+
+protected:
+
+     // variables
+     double x1_, x2_, y1_, y2_;  // geographical coordinates
+	double gridNS_, gridEW_;    // grid interval
+	int verticalAxis_;          // Time axis or Geo axis
+	int timeDir_;               // Time direction (HOV_TIMEFOR or HOV_TIMEBACK)
+	int heightDir_;             // height direction (HOV_HEIGHTFOR or HOV_HEIGHTBACK)
+	int heightAxisType_;        // Flag to indicate the type of the height axis
+	int geoDir_;                // average direction: East-West or North-South
+	MvRequest dataRequest_;     // grib data
+	MvRequest timeAxis_;        // time axis
+	MvRequest geoAxis_;         // geographical/height axis
+	MvRequest geo2Axis_;        // geographical second axis
+	int nrPoints_;              // number of points of the second axis
+	int nrIndexes_;             // number of points of the time axis
+	int nrIndexesIn_;           // number of initial time points (Expand option)
+	string netfnameIn_;         // input Netcdf filename (Expand option)
+	double refTime_;            // reference Time value
+	double minTime_,maxTime_;   // min/max Time values
+	bool swapAxes_;             // swap default axes
+     bool secondAuxiliaryAxis_;  // flag to indicate if second auxiliary axis exists
+	MvNetCDF *netcdf_;          // Netcdf structure
+	MvNetCDF *netcdfIn_;        // Input Netcdf structure (Expand option)
+	string ncdfPath_;           // NetCDF file path
+
+     // auxiliary variables
+     ParamMap params_;           // structure holding computed values
+     double *gcoord1_;           // geographical coordinate values
+     double *gcoord2_;           // second geographical coordinate values
+     double *xint_;              // point values
+     vector<double> vtime_;      // time values
+};
+
+class HovLineToolkit : public HovToolkit
+{
+
+public:
+	// Common functions
+	void NcAddType();
+	void NcAddTitle(MvNcVar*, ParamInfo*);
+	void NcAddAxes(MvNcVar*);
+	const char* GetSecondAxisName() { return "longitude"; }
+     const char* GetSecondAuxiliaryAxisName() { return "latitude"; }
+     bool SecondAuxiliaryAxis() { return true; }
+	void SetSecondAxis();
+
+	// Calculate diagram values
+	bool ComputeValues(MvField&);
+};
+
+class HovAreaToolkit : public HovToolkit
+{
+
+public:
+	// Common functions
+	void NcAddType();
+	void NcAddTitle(MvNcVar*, ParamInfo*);
+	void NcAddAxes(MvNcVar*);
+     const char* GetSecondAxisName() { return "longitude"; }
+     const char* GetSecondAuxiliaryAxisName() { return "latitude"; }
+     bool SecondAuxiliaryAxis() { return true; }
+	void SetSecondAxis();
+
+	// Calculate diagram values
+	bool ComputeValues(MvField&);
+};
+
+class HovHeightToolkit : public HovToolkit
+{
+
+public:
+	// Common functions
+	bool NcGenerateData(MvRequest&);
+	void NcAddType();
+	void NcAddTitle(MvNcVar*, ParamInfo*);
+	void NcAddAxes(MvNcVar*);
+	void NcAddSecondAxis();
+	const char* GetSecondAxisName() { return "height"; }
+     const char* GetSecondAuxiliaryAxisName() { return " "; }
+     bool SecondAuxiliaryAxis() { return false; }
+	void SetSecondAxis();
+
+	// Functions to handle list of levels
+	void InitializeLevelList (int size);
+	void UpdateLevelList (MvField&,double);
+	void CheckDataLevelType(MvField& field);
+
+	// Calculate diagram values
+	bool ComputeValues(MvField&);
+
+	// Create output request
+	void CreateOutputRequest(MvRequest&, const char*);
+
+        // Create access keys
+	void GenerateKey(string&, MvRequest&);
+
+protected:
+
+	
+	double hgtVal_;            // Auxiliary value
+	vector<double> vlevels_;  // List of levels
+};
+
+class LineHovmoeller : public HovLineToolkit, public Hovmoeller
+{
+
+public:
+
+	LineHovmoeller();
+	~LineHovmoeller() {};
+
+	// Entry point
+	void serve (MvRequest& in, MvRequest& out);
+
+	// Initialize variables from user interface
+	bool GetInputInfo(MvRequest& in);
+
+	// Compute number of points
+	int EvaluateNPoints();
+};
+
+
+class AreaHovmoeller : public HovAreaToolkit, public Hovmoeller
+{
+
+public:
+        AreaHovmoeller();
+        ~AreaHovmoeller() {};
+
+	// Entry point
+	void serve (MvRequest& in, MvRequest& out);
+
+	// Initialize variables from user interface
+	bool GetInputInfo(MvRequest& in);
+
+	// Compute number of points
+	int EvaluateNPoints();
+};
+
+class HeightHovmoeller : public HovHeightToolkit, public Hovmoeller
+{
+
+public:
+
+        HeightHovmoeller();
+        ~HeightHovmoeller() {};
+
+	// Entry point
+	void serve(MvRequest&, MvRequest&);
+
+	// Initialize variables from user interface
+	bool GetInputInfo(MvRequest& in);
+
+	// Compute number of points
+	int EvaluateNPoints();
+};
+
+
+static SimpleObjectMaker <HovLineToolkit,HovToolkit> line ("LINE");
+static SimpleObjectMaker <HovAreaToolkit,HovToolkit> area ("AREA");
+static SimpleObjectMaker <HovHeightToolkit,HovToolkit> height ("HEIGHT");
+
+#endif
diff --git a/src/Hovmoeller/Hovmoeller.cc b/src/Hovmoeller/Hovmoeller.cc
new file mode 100644
index 0000000..63bda2f
--- /dev/null
+++ b/src/Hovmoeller/Hovmoeller.cc
@@ -0,0 +1,138 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Hovmoeller.h"
+#include "MvHovmFrame.h"
+#include <inc_iostream.h> 
+
+#include <HovToolkit.h>
+
+Hovmoeller::Hovmoeller(const char* kw): MvService(kw)
+{
+//empty
+}
+
+ExpandHovmoeller::ExpandHovmoeller() : Hovmoeller("EXPAND_HOV")
+{
+//empty
+}
+
+void ExpandHovmoeller::serve(MvRequest& in,MvRequest& out)
+{
+cout << "Hovmoeller::serve in" << endl;
+in.print();
+
+	// Initialize object from the user interface
+        if ( !GetInputInfo(in) ) return;
+
+	// Instantiate the related HovToolkit
+	HovToolkit* hov = SimpleObjectMaker<HovToolkit>::create(hovTypeIn_.c_str());
+
+	// Compute the Hovmoeller diagram
+	string netfnameOut;
+	if ( !hov->Compute(netfnameIn_,dataRequestIn_,netfnameOut) ) return;
+
+	// Update output request
+	MvRequest cdfreq("NETCDF");
+	cdfreq("PATH") = netfnameOut.c_str();
+	out = out + cdfreq;
+	if ( (const char *)in("_NAME") )
+		out("_NAME") = in("_NAME");
+
+cout << "Hovmoeller::serve out" << endl;
+out.print();
+
+	return;
+}
+
+bool ExpandHovmoeller::GetInputInfo(MvRequest& in)
+{
+	// Get netcdf information from UI
+	if ( (const char*)in("NETCDF_PATH") && (strcmp((const char*)in("NETCDF_PATH"),"OFF") && strcmp((const char*)in("NETCDF_PATH"),"off")) )
+		netfnameIn_ = (const char*)in("NETCDF_PATH");
+	else
+	{
+		// Get information from the icon
+		MvRequest req;
+		in.getValue(req,"NETCDF_DATA");
+		if ( !in.countValues("NETCDF_DATA") || !req.countValues("PATH") ) {
+			setError(1, "No Netcdf Data files specified...");
+			return false;
+		}
+		netfnameIn_ = (const char*)req("PATH");
+	}
+
+        // Get fieldset information from UI
+	string str;
+	if ( (const char*)in("DATA_PATH")  && (strcmp((const char*)in("DATA_PATH"),"OFF") && strcmp((const char*)in("DATA_PATH"),"off"))  )
+	{
+		str = (const char*)in("DATA_PATH");
+		dataRequestIn_.setVerb("GRIB");
+		dataRequestIn_("PATH") = str.c_str();
+	}
+	else
+	{
+		// Get information from the icon
+		in.getValue(dataRequestIn_,"DATA");
+		if ( !in.countValues("DATA") || !dataRequestIn_.countValues("PATH") )
+		{
+			setError(1, "No Data files specified...");
+			return false;
+		}
+	}
+
+	// Extract information from the input netcdf file
+	// Open netcdf file
+	MvNetCDF* netcdfIn = new MvNetCDF();
+	netcdfIn->init(netfnameIn_,'r');
+	reqIn_ = netcdfIn->getRequest();
+
+        // Check netcdf file: attributes _VIEW and TYPE
+	MvNcAtt *tmpatt = netcdfIn->getAttribute("_VIEW");
+	if ( !tmpatt )
+	{
+		setError(1, "Netcdf file: missing attribute _VIEW");
+		delete netcdfIn;
+		return false;
+	}
+
+	tmpatt = netcdfIn->getAttribute("TYPE");
+	if ( tmpatt )
+	    hovTypeIn_ = tmpatt->as_string(0);
+	else
+	{
+	       setError(0,"Netcdf file: missing attribute TYPE");
+	       delete netcdfIn;
+	       return false;
+	}
+
+	delete netcdfIn;
+	return true;
+}
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	LineHovmoeller lhov;
+	AreaHovmoeller ahov;
+  	ExpandHovmoeller ehov;
+  	HeightHovmoeller hhov;
+
+	// The applications don't try to read or write from pool, this
+	// should not be done with the new PlotMod.
+	//a.addModeService("GRIB", "DATA");
+        lhov.saveToPool(false);
+        ahov.saveToPool(false);
+        ehov.saveToPool(false);
+        hhov.saveToPool(false);
+
+	theApp.run();
+}
diff --git a/src/Hovmoeller/Hovmoeller.h b/src/Hovmoeller/Hovmoeller.h
new file mode 100644
index 0000000..7a84c49
--- /dev/null
+++ b/src/Hovmoeller/Hovmoeller.h
@@ -0,0 +1,86 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef HOVMOELLER_H
+#define HOVMOELLER_H
+
+/**************
+  Application for Hovmoeller (similar to XSection, Average).
+  It takes a GRIB file as input (in addition to the values
+  given by the user),  and produces an NetCDF
+  file as output. There is no metadata on output request, 
+  only the path to NetCDF file.
+
+  First the GRIB while is read, and info about all
+  parameters and level are stored. Then several
+  flags is set, based on the data and the input 
+  request, to determine how the application should
+  run.
+
+  The file is rewound, and sorted by param, date,
+  time, step and expver. All fields with the
+  same values for the sorting parameters are
+  one plot. If any of these values change, all
+  data are written out as netcdf variables with
+  names put together from the sorting values, and
+  an attribute telling PlotMod how to show these
+  data.
+
+  This application needs to be revised after the new visualisation
+  module (DispMod) takes over PlotMod. Since Magics++ does not use the 
+  data matrix as a 'input_field_organization=fitted' (as in Magics), the 
+  application does not need to care about the organization of the matrix. 
+  The application should produce a netcdf file with a unique organization 
+  and the visualisation module should be in charge to plot it according 
+  to user input parameters.
+***************/
+
+#include "Metview.h"
+#include "MvFieldSet.h"
+#include "MvDate.h"
+#include "MvHovmFrame.h"
+
+class Hovmoeller : public MvService {
+
+public:
+
+	// Constructor
+	Hovmoeller(const char* kw);
+
+	// Destructor
+	virtual ~Hovmoeller() {};
+
+	virtual void serve(MvRequest&,MvRequest&) {
+		cout << "ERROR: should not be here" << endl; }
+};
+
+class ExpandHovmoeller : public Hovmoeller {
+
+public:
+
+	// Constructor/destructor
+	ExpandHovmoeller();
+	~ExpandHovmoeller() {};
+
+	// Main function
+	void serve(MvRequest&,MvRequest&);
+
+	// Initialize variables from user interface
+	bool GetInputInfo(MvRequest& in);
+
+private:
+
+	// Variables are related to the input netcdf file
+	string    hovTypeIn_;        // Hovmoeller type
+	string    netfnameIn_;       // Input Netcdf filename
+	MvRequest dataRequestIn_;    // grib data
+	MvRequest reqIn_;            // Copy of the input Netcdf structure
+};
+
+#endif
diff --git a/src/Hovmoeller/HovmoellerDataDef b/src/Hovmoeller/HovmoellerDataDef
new file mode 100644
index 0000000..728a978
--- /dev/null
+++ b/src/Hovmoeller/HovmoellerDataDef
@@ -0,0 +1,285 @@
+HOVMOELLERDATA_FAMILY; APPLICATION
+{
+	APPLICATION
+	{
+		LINE_HOV
+		AREA_HOV
+		HEIGHT_HOV
+		EXPAND_HOV
+	} = LINE_HOV
+}
+
+#---------------------------------------------------------------------
+
+LINE_HOV; Hovmoeller Line Application
+{
+	LINE
+	[
+		help = help_input,
+		help_icon = 'help_line',
+		input_type = line,
+		input_window = '/Metview/Defaults/Input Window'
+	]
+	{
+		*
+		/
+	} = 0./-180./0./180.
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data for Hovmoeller,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,  TYPE = FORECAST,
+					 LEVELIST = 1000,
+					 PARAM = T, 
+					 STEP = 12/TO/36/BY/6,
+					 GRID = 1.5/1.5 )  ]
+	{ @ / }
+
+	TIME_AXIS_DIRECTION
+	{
+		FORWARD
+		BACKWARD
+	} = FORWARD
+
+	SWAP_AXES
+	{
+		NO
+		YES
+	} = NO
+
+	TIME_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Time Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_TYPE=DATE )
+				]
+	{
+		@
+	}
+
+	GEO_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Geo Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_ORIENTATION=VERTICAL,
+				      AXIS_TICK_LABEL_TYPE=LATITUDE )
+				]
+	{
+		@
+	}
+
+	GEO2_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Geo2 Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_ORIENTATION=VERTICAL,
+				      AXIS_TICK_LABEL_TYPE=LONGITUDE )
+				]
+	{
+		@
+	}
+
+	RESOLUTION
+	{
+		*
+	} = 1.0
+}
+
+#----------------------------------------------------------------------
+
+AREA_HOV; Hovmoeller AREA Application
+{
+	AREA
+        [
+                help = help_input,
+		help_icon = 'help_area',
+                input_type = area,
+                input_window = '/Metview/Defaults/Input Window'
+        ]
+	{
+		*
+		/
+	} = 30./-30./-30./30.
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data for Hovmoeller,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,  TYPE = FORECAST,
+					 LEVELIST = 1000,
+					 PARAM = T, 
+					 STEP = 12/TO/36/BY/6,
+					 GRID = 1.5/1.5 )  ]
+	{ @ / }
+
+	AVERAGE_DIRECTION
+	{
+		EAST_WEST
+		NORTH_SOUTH
+	} = EAST_WEST
+
+	TIME_AXIS_DIRECTION
+	{
+		FORWARD
+		BACKWARD
+	} = FORWARD
+
+	SWAP_AXES
+	{
+		NO
+		YES
+	} = NO
+
+	TIME_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Time Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_TYPE=DATE )
+				]
+	{
+		@
+	}
+
+	GEO_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Geo Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_ORIENTATION=VERTICAL )
+				]
+	{
+		@
+	}
+
+	RESOLUTION
+	{
+		*
+	} = 1.0
+}
+
+#----------------------------------------------------------------------
+
+EXPAND_HOV; Hovmoeller Expand Application
+{
+	NETCDF_PATH
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	NETCDF_DATA
+		[ interface = icon, class = NETCDF, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	DATA_PATH
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data for Hovmoeller,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,  TYPE = FORECAST,
+					 LEVELIST = 1000,
+					 PARAM = T, 
+					 STEP = 12/TO/36/BY/6,
+					 GRID = 1.5/1.5 )  ]
+	{ @ / }
+}
+
+#----------------------------------------------------------------------
+
+HEIGHT_HOV; Hovmoeller HEIGHT Application
+{
+	AREA
+        [
+                help = help_input,
+		help_icon = 'help_area',
+                input_type = area,
+                input_window = '/Metview/Defaults/Input Window'
+        ]
+	{
+		*
+		/
+	} = 30./-30./-30./30.
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data for Hovmoeller,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,
+					 TYPE = FORECAST,
+					 PARAM = T, 
+					 STEP = 12/TO/36/BY/6,
+					 GRID = 1.5/1.5 )  ]
+	{ @ / }
+
+	TIME_AXIS_DIRECTION
+	{
+		FORWARD
+		BACKWARD
+	} = FORWARD
+
+	HEIGHT_AXIS_DIRECTION
+	{
+		FORWARD
+		BACKWARD
+	} = BACKWARD
+
+	HEIGHT_AXIS_TYPE [ visible = false ]
+	{
+		AS_IN_DATA
+		PRESSURE
+	} = AS_IN_DATA
+
+	SWAP_AXES [ visible = false ]
+	{
+		NO
+		YES
+	} = NO
+
+	TIME_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Time Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_TYPE=DATE )
+				]
+	{
+		@
+	}
+
+	HEIGHT_AXIS [visible = false, interface = icon, class = PAXIS, missing = ignored,
+		  help            = help_data,
+		  help_name       = Height Axis,
+		  help_directory  = '/Metview/Defaults',
+		  help_class      = PAXIS,
+		  help_definition = ( PAXIS,AXIS_ORIENTATION=VERTICAL )
+				]
+	{
+		@
+	}
+
+	RESOLUTION [ visible = false ]
+	{
+		*
+	} = 1.0
+}
diff --git a/src/Hovmoeller/Makefile.am b/src/Hovmoeller/Makefile.am
new file mode 100644
index 0000000..07b9f4e
--- /dev/null
+++ b/src/Hovmoeller/Makefile.am
@@ -0,0 +1,29 @@
+bin_PROGRAMS = bin/Hovmoeller
+
+bin_Hovmoeller_SOURCES  = MvHovmFrame.cc HovToolkit.cc Hovmoeller.cc HovToolkit.h Hovmoeller.h MvHovmFrame.h Factory.h
+bin_Hovmoeller_CPPFLAGS = $(METVIEW_NETCDF_FLAGS)
+bin_Hovmoeller_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB)
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.Hovmoeller \
+		 $(local_sharedir)/HovmoellerDataDef
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} HOVMOELLERDATA.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/HOVMOELLERDATA.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = Factory.cc HOVMOELLERDATA.xpm ObjectSpec.Hovmoeller HovmoellerDataDef
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Hovmoeller/Makefile.in b/src/Hovmoeller/Makefile.in
new file mode 100644
index 0000000..20e9f7d
--- /dev/null
+++ b/src/Hovmoeller/Makefile.in
@@ -0,0 +1,760 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Hovmoeller$(EXEEXT)
+subdir = src/Hovmoeller
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Hovmoeller_OBJECTS = bin_Hovmoeller-MvHovmFrame.$(OBJEXT) \
+	bin_Hovmoeller-HovToolkit.$(OBJEXT) \
+	bin_Hovmoeller-Hovmoeller.$(OBJEXT)
+bin_Hovmoeller_OBJECTS = $(am_bin_Hovmoeller_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Hovmoeller_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Hovmoeller_SOURCES)
+DIST_SOURCES = $(bin_Hovmoeller_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Hovmoeller_SOURCES = MvHovmFrame.cc HovToolkit.cc Hovmoeller.cc HovToolkit.h Hovmoeller.h MvHovmFrame.h Factory.h
+bin_Hovmoeller_CPPFLAGS = $(METVIEW_NETCDF_FLAGS)
+bin_Hovmoeller_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Hovmoeller \
+		 $(local_sharedir)/HovmoellerDataDef
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/HOVMOELLERDATA.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = Factory.cc HOVMOELLERDATA.xpm ObjectSpec.Hovmoeller HovmoellerDataDef
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Hovmoeller/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Hovmoeller/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Hovmoeller$(EXEEXT): $(bin_Hovmoeller_OBJECTS) $(bin_Hovmoeller_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Hovmoeller$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_Hovmoeller_OBJECTS) $(bin_Hovmoeller_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Hovmoeller-HovToolkit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Hovmoeller-Hovmoeller.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_Hovmoeller-MvHovmFrame.o: MvHovmFrame.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Hovmoeller-MvHovmFrame.o -MD -MP -MF $(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Tpo -c -o bin_Hovmoeller-MvHovmFrame.o `test -f 'MvHovmFrame.cc' || echo '$(srcdir)/'`MvHovmFrame.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Tpo $(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvHovmFrame.cc' object='bin_Hovmoeller-MvHovmFrame.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Hovmoeller-MvHovmFrame.o `test -f 'MvHovmFrame.cc' || echo '$(srcdir)/'`MvHovmFrame.cc
+
+bin_Hovmoeller-MvHovmFrame.obj: MvHovmFrame.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Hovmoeller-MvHovmFrame.obj -MD -MP -MF $(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Tpo -c -o bin_Hovmoeller-MvHovmFrame.obj `if test -f 'MvHovmFrame.cc'; then $(CYGPATH_W) 'MvHovmFrame.cc'; else $(CYGPATH_W) '$(srcdir)/MvHovmFrame.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Tpo $(DEPDIR)/bin_Hovmoeller-MvHovmFrame.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvHovmFrame.cc' object='bin_Hovmoeller-MvHovmFrame.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Hovmoeller-MvHovmFrame.obj `if test -f 'MvHovmFrame.cc'; then $(CYGPATH_W) 'MvHovmFrame.cc'; else $(CYGPATH_W) '$(srcdir)/MvHovmFrame.cc'; fi`
+
+bin_Hovmoeller-HovToolkit.o: HovToolkit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Hovmoeller-HovToolkit.o -MD -MP -MF $(DEPDIR)/bin_Hovmoeller-HovToolkit.Tpo -c -o bin_Hovmoeller-HovToolkit.o `test -f 'HovToolkit.cc' || echo '$(srcdir)/'`HovToolkit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Hovmoeller-HovToolkit.Tpo $(DEPDIR)/bin_Hovmoeller-HovToolkit.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='HovToolkit.cc' object='bin_Hovmoeller-HovToolkit.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Hovmoeller-HovToolkit.o `test -f 'HovToolkit.cc' || echo '$(srcdir)/'`HovToolkit.cc
+
+bin_Hovmoeller-HovToolkit.obj: HovToolkit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Hovmoeller-HovToolkit.obj -MD -MP -MF $(DEPDIR)/bin_Hovmoeller-HovToolkit.Tpo -c -o bin_Hovmoeller-HovToolkit.obj `if test -f 'HovToolkit.cc'; then $(CYGPATH_W) 'HovToolkit.cc'; else $(CYGPATH_W) '$(srcdir)/HovToolkit.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Hovmoeller-HovToolkit.Tpo $(DEPDIR)/bin_Hovmoeller-HovToolkit.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='HovToolkit.cc' object='bin_Hovmoeller-HovToolkit.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Hovmoeller-HovToolkit.obj `if test -f 'HovToolkit.cc'; then $(CYGPATH_W) 'HovToolkit.cc'; else $(CYGPATH_W) '$(srcdir)/HovToolkit.cc'; fi`
+
+bin_Hovmoeller-Hovmoeller.o: Hovmoeller.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Hovmoeller-Hovmoeller.o -MD -MP -MF $(DEPDIR)/bin_Hovmoeller-Hovmoeller.Tpo -c -o bin_Hovmoeller-Hovmoeller.o `test -f 'Hovmoeller.cc' || echo '$(srcdir)/'`Hovmoeller.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Hovmoeller-Hovmoeller.Tpo $(DEPDIR)/bin_Hovmoeller-Hovmoeller.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Hovmoeller.cc' object='bin_Hovmoeller-Hovmoeller.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Hovmoeller-Hovmoeller.o `test -f 'Hovmoeller.cc' || echo '$(srcdir)/'`Hovmoeller.cc
+
+bin_Hovmoeller-Hovmoeller.obj: Hovmoeller.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Hovmoeller-Hovmoeller.obj -MD -MP -MF $(DEPDIR)/bin_Hovmoeller-Hovmoeller.Tpo -c -o bin_Hovmoeller-Hovmoeller.obj `if test -f 'Hovmoeller.cc'; then $(CYGPATH_W) 'Hovmoeller.cc'; else $(CYGPATH_W) '$(srcdir)/Hovmoeller.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Hovmoeller-Hovmoeller.Tpo $(DEPDIR)/bin_Hovmoeller-Hovmoeller.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Hovmoeller.cc' object='bin_Hovmoeller-Hovmoeller.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Hovmoeller_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Hovmoeller-Hovmoeller.obj `if test -f 'Hovmoeller.cc'; then $(CYGPATH_W) 'Hovmoeller.cc'; else $(CYGPATH_W) '$(srcdir)/Hovmoeller.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} HOVMOELLERDATA.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Hovmoeller/MvHovmFrame.cc b/src/Hovmoeller/MvHovmFrame.cc
new file mode 100644
index 0000000..45c3c81
--- /dev/null
+++ b/src/Hovmoeller/MvHovmFrame.cc
@@ -0,0 +1,84 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include "MvHovmFrame.h"
+
+// ParamInfo constructor 1
+ParamInfo::ParamInfo(): param_(0),date_(0.),level_(0)
+{
+// empty
+}
+
+// ParamInfo constructor 2
+ParamInfo::ParamInfo(int i1,double i2,int i5,string& ev,string& pn) :
+                     param_(i1),date_(i2), level_(i5),expver_(ev),paramName_(pn)
+{
+// empty
+}
+
+// Deletes all info about a parameter, including all space used
+// for the level data.
+ParamInfo::~ParamInfo()
+{
+	IndexIterator ii;
+
+	for ( ii = indexes_.begin();ii != indexes_.end(); ii++ )
+	{
+		if ((*ii).second ) 
+			delete [] (*ii).second->values_;
+	}
+}
+
+string ParamInfo::ExpVerTitle()
+{
+	if( expver_ == "_" )      //-- missing ExpVer is stored as "_"
+		return string("");
+	else
+		return string( "Expver " ) + expver_;
+}
+
+// Fill in data related to an index/entry in the IndexesMap. Generate
+// the values if needed, and delete any old values from the entry.
+void ParamInfo::FillIndex(double* x, const string& index, int n)
+{
+	// Save data for one entry
+	IndexIterator ii = indexes_.find(index);
+  
+	if ( ii == indexes_.end() )
+	{
+	        double ind = atof(index.substr(12,HOV_STEPSIZE).c_str());
+		indexes_[ index ] = new IndexesInfo( ind );
+		ii = indexes_.find(index);
+	}
+	else 
+	{
+		if ( (*ii).second->values_ )
+		{
+			delete [] (*ii).second->values_;
+			(*ii).second->values_ = 0;
+		}
+	}
+     
+	if (  (*ii).second->values_ == 0 ) 
+		(*ii).second->values_ = new double[n];
+
+	double *xx = (*ii).second->values_;
+	for (int i = 0; i<n; i++)
+		xx[i] = x[i];
+}
+
+void ParamInfo::AddIndex(string& index) 
+{
+	if ( indexes_.find(index) == indexes_.end() )
+	{
+	      double ind = atof(index.substr(12,HOV_STEPSIZE).c_str());
+	      indexes_[ index ] = new IndexesInfo(ind);
+	}
+}
diff --git a/src/Hovmoeller/MvHovmFrame.h b/src/Hovmoeller/MvHovmFrame.h
new file mode 100644
index 0000000..a208a17
--- /dev/null
+++ b/src/Hovmoeller/MvHovmFrame.h
@@ -0,0 +1,95 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// -*-C++-*-
+// Header file for Hovmoeller application
+
+
+#ifndef MVHOVMFRAME_H
+#define MVHOVMFRAME_H
+
+#include <math.h>
+
+#include <string.h>
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#include "Metview.h"
+#include "MvNetCDF.h"
+#include "MvDate.h"
+
+#define HOV_STEPSIZE 6   // number of characters to represent parameter STEP
+
+// Holds info about the values for one entry in
+// the matrix (e.g. values for one time or level)
+class IndexesInfo
+{
+public:
+
+	double* Values() { return values_; }
+	double  Index()  { return index_; }
+
+private:
+	friend class ParamInfo;
+
+	IndexesInfo(double index) : values_(0), index_(index) {}
+
+	double *values_;
+	double index_;
+};
+
+typedef map<string, IndexesInfo* > IndexesMap;
+typedef IndexesMap::iterator IndexIterator;
+typedef IndexesMap::reverse_iterator ReverseIndexIterator;
+
+// Info about a parameter at one level and expver
+// Contains  a IndexesMap with info about the times (date+time+step)
+class ParamInfo
+{
+public:
+
+	ParamInfo();
+	ParamInfo(int p,double d,int l,string& ev,string& pn);
+
+        ~ParamInfo();
+
+	MvDate& Date()       { return date_;}
+	int Parameter()      { return param_; }
+	int Level()          { return level_; }
+	string ParamName()   { return paramName_; }
+        const char *ExpVer() { return expver_.c_str(); }
+
+	string ExpVerTitle();
+	void ExpVer(const char *xx) { expver_ = xx; }
+	void FillIndex(double*, const string&, int);
+	IndexesMap& Indexes() { return indexes_; }
+
+	void AddIndex(string& index);
+	int NrIndexes() { return indexes_.size(); }
+
+	friend int operator<(const ParamInfo &p1, const ParamInfo &p2)
+	{
+		return ( p1.param_ < p2.param_ || p1.date_ < p2.date_ 
+	              || p1.level_ < p2.level_ );
+	}
+
+private:
+	int param_, level_;
+	MvDate date_;
+	string paramName_;
+	string expver_;
+	IndexesMap indexes_;
+};
+
+typedef map<string,ParamInfo * > ParamMap;
+typedef ParamMap::iterator ParamIterator;
+typedef pair<ParamIterator,bool> ParamInsertPair;
+typedef pair<const string,ParamInfo*> ParamPair;
+
+#endif
diff --git a/src/Hovmoeller/ObjectSpec.Hovmoeller b/src/Hovmoeller/ObjectSpec.Hovmoeller
new file mode 100644
index 0000000..9ffc99e
--- /dev/null
+++ b/src/Hovmoeller/ObjectSpec.Hovmoeller
@@ -0,0 +1,88 @@
+
+object,
+    class             = HOVMOELLERDATA_FAMILY,
+    can_be_created    = True,
+    icon_box          = To be organised,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/HovmoellerDataDef',
+    default_name      = Hovmoeller Data,
+    help_page         = Hovmoeller_Data,
+    type              = Family,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    editor_type       = FamilyEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/HOVMOELLERDATA.icon'
+
+object,
+    class             = LINE_HOV,
+    can_be_created    = False,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/HovmoellerDataDef',
+    default_name      = Line Hovmoeller Data,
+    type              = Data,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    macro             = hovmoeller_line,
+    editor_type       = SimpleEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/HOVMOELLERDATA.icon'
+
+object,
+    class             = AREA_HOV,
+    can_be_created    = False,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/HovmoellerDataDef',
+    default_name      = Area Hovmoeller Data,
+    type              = Data,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    macro             = hovmoeller_area,
+    editor_type       = SimpleEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/HOVMOELLERDATA.icon'
+
+object,
+    class             = EXPAND_HOV,
+    can_be_created    = False,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/HovmoellerDataDef',
+    default_name      = Expand Hovmoeller Data,
+    type              = Data,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    macro             = hovmoeller_expand,
+    editor_type       = SimpleEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/HOVMOELLERDATA.icon'
+
+object,
+    class             = HEIGHT_HOV,
+    can_be_created    = False,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/HovmoellerDataDef',
+    default_name      = Height Hovmoeller Data,
+    type              = Data,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    macro             = hovmoeller_height,
+    editor_type       = SimpleEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/HOVMOELLERDATA.icon'
+
+state,
+    class   = HOVMOELLERDATA_FAMILY,
+    action  = visualise/hardcopy/prepare/drop,
+    service = Hovmoeller
+
+state,
+	class    = AREA_HOV,
+	output_class = NETCDF,
+        service  = Hovmoeller
+
+state,
+	class    = LINE_HOV,
+	output_class = NETCDF,
+        service  = Hovmoeller
+
+state,
+	class    = EXPAND_HOV,
+	output_class = NETCDF,
+        service  = Hovmoeller
+
+state,
+	class    = HEIGHT_HOV,
+	output_class = NETCDF,
+        service  = Hovmoeller
+
+service,
+	timeout  = $timeout,
+        name     = 'Hovmoeller',
+	fullname = Hovmoeller,
+        cmd      = "$metview_command $METVIEW_BIN/Hovmoeller"
+
diff --git a/src/KML/GeoToKML.cc b/src/KML/GeoToKML.cc
new file mode 100644
index 0000000..9ac0b50
--- /dev/null
+++ b/src/KML/GeoToKML.cc
@@ -0,0 +1,352 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*!
+
+ \file GeoToKML.cc
+ \brief Implementation of ...
+ \author Graphics Section, ECMWF
+
+ Started: Jan-2009
+
+ \todo Fill this skeleton for new Metview module with life!
+*/
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+
+#include "Metview.h"
+#include "MvGeoPoints.h"
+#include "MvStopWatch.h"
+
+//! For generating KMZ files
+/*extern "C"{
+#include <sys/stat.h>
+#include "minizip/zip.h"
+#define MAXFILENAME 256
+#define WRITEBUFFERSIZE 16384
+}
+*/
+
+/*!
+ \class GeoToKML
+ \brief Definiton of class GeoToKML
+ \sa MvService
+*/
+class GeoToKML : public MvService
+{
+private:
+  GeoToKML( const GeoToKML& );
+  void operator= ( const GeoToKML& );
+
+public:
+  GeoToKML();
+  ~GeoToKML();
+
+  void serve(MvRequest& in, MvRequest& out );
+};
+
+/*!
+ \brief Contructor of GeoToKML
+ \sa MvService
+*/
+GeoToKML::GeoToKML() : MvService("GeoToKML")
+{
+}
+
+/*!
+ \brief Destructor of GeoToKML
+ \sa MvService
+*/
+GeoToKML::~GeoToKML(void)
+{
+}
+
+class ToPlacemark 
+{
+	MvGeoPoints GPoints;
+
+	double      North;
+	double      South;
+	double      West;
+	double      East;
+
+public:
+	ToPlacemark(MvRequest&);
+	void write(std::string, MvRequest&);
+};
+
+ToPlacemark::ToPlacemark(MvRequest& def)
+{
+/*	North     = def("AREA", 0);
+	West      = def("AREA", 1);
+	South     = def("AREA", 2);
+	East      = def("AREA", 3);
+
+	if(North < South)
+	{
+		double tmp = North;
+		North      = South;
+		South      = tmp;
+	}
+*/
+	MvRequest data;
+	def.getValue(data,"GEOPOINTS");
+	const char* path = data("PATH");
+	GPoints.load(path);
+}
+
+void ToPlacemark::write(std::string name, MvRequest& def)
+{
+  ofstream pFile_;
+  if(strcmp(def("OUTPUT_FORMAT"),"KMZ") == 0)
+    pFile_.open("doc.kml");
+  else
+  pFile_.open(name.c_str());
+  
+  if(!pFile_)
+  {
+  	  cerr << "GeoToKML - write() --> Cannot open KML output file: " << name << "!\n";
+  	  exit(1);
+  }
+
+  pFile_ << "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+  	  << "<kml xmlns=\"http://www.opengis.net/kml/2.2\" \n"
+	  << "    xmlns:gx=\"http://www.google.com/kml/ext/2.2\"\n"
+  	  << "     xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"
+	  << "<Folder>\n"<< " <name>Metview GeoToKML output</name>\n"
+	  << " <open>1</open>\n"
+	  << " <description>\n"
+  	  << " <![CDATA[This KML file was generated by Metview 4 using the GeoToKML module.]]>\n"
+	  << " </description>\n";
+
+  // Write data as loose Placemarks
+  if( strcmp(def("OUTPUT_MODE"),"POI") == 0)
+  {
+   for (int s = 0; s < GPoints.count(); s++)
+   { 
+      const double value = GPoints[s].value();
+      const long   time  = GPoints[s].time();
+      const long   date  = GPoints[s].date();
+      std::stringstream out;
+      out << date;
+      const std::string da = out.str();
+      const  double lon = (GPoints[s].lon_x() > 180) ? GPoints[s].lon_x() - 360 : GPoints[s].lon_x();
+
+      pFile_  << "  <Placemark>\n"
+              << "   <name>"<<value<<"</name>\n"
+              << "   <description><![CDATA[</p><p>Date: "<<da.substr(0,4)<<"-"<<da.substr(4,2)<<"-"<<da.substr(6,2)<<"</p><p>Time: "<<time<<"</p>]]></description>\n"
+              << "   <TimeStamp>\n"
+              << "     <when>"<<da.substr(0,4)<<"-"<<da.substr(4,2)<<"-"<<da.substr(6,2)<<"T";
+              if(int(time/100)<10) pFile_ <<"0";
+	      pFile_ <<int(time/100)<<":";
+	      if(int(time%100) <10) pFile_ <<"0";
+	      pFile_ <<int(time%100)<<":00Z</when>\n"
+              << "   </TimeStamp>\n"
+              << "   <Point>\n"
+              << "     <coordinates>"<<lon<<","<<GPoints[s].lat_y()<<","<<GPoints[s].height()<<"</coordinates>\n"
+              << "   </Point>\n"
+              << "  </Placemark>\n";
+  }
+  }
+  else if ( strcmp(def("OUTPUT_MODE"),"TRA") == 0)     // tracks
+  {
+   std::stringstream coords;
+   for (int s = 0; s < GPoints.count(); s++)
+   { 
+      const double value = GPoints[s].value();
+      const long   time  = GPoints[s].time();
+      const long   date  = GPoints[s].date();
+      std::stringstream out;
+      out << date;
+      const std::string da = out.str();
+      const  double lon = (GPoints[s].lon_x() > 180) ? GPoints[s].lon_x() - 360 : GPoints[s].lon_x();
+
+      if(s==0)
+      {
+        pFile_  << "  <Placemark>\n"
+                << "   <name>Metview4 track</name>\n"
+                << "   <description>Date: "<<da<<" T:"<<time<<"</description>\n"
+                << "  <gx:Track>\n";  
+      }
+
+      pFile_ << "   <when>"<<da.substr(0,4)<<"-"<<da.substr(4,2)<<"-"<<da.substr(6,2)<<"T";
+      if(int(time/100)<10) pFile_ <<"0";
+      pFile_ <<int(time/100)<<":";
+      if(int(time%100) <10) pFile_ <<"0";
+      pFile_ <<int(time%100)<<":00Z</when>\n";
+      coords << "   <gx:coord>"<<lon<<" "<<GPoints[s].lat_y()<<" "<<GPoints[s].height()*1000<<"</gx:coord>\n";
+   }
+   pFile_ << coords.str() <<"\n  </gx:Track>\n </Placemark>\n";
+  }
+  // Write data as loose Placemarks
+  else if( strcmp(def("OUTPUT_MODE"),"POL") == 0)
+  {
+   for (int s = 0; s < GPoints.count(); s++)
+   { 
+      const double value = GPoints[s].value();
+      const long   time  = GPoints[s].time();
+      const long   date  = GPoints[s].date();
+      std::stringstream out;
+      out << date;
+      const std::string da = out.str();
+     if(s==0)
+     {
+          pFile_  << "  <Placemark>\n"
+              << "   <name>Metview4 polygon</name>\n"
+              << "   <description><![CDATA[</p><p>Date: "<<da.substr(0,4)<<"-"<<da.substr(4,2)<<"-"<<da.substr(6,2)<<"</p><p>Time: "<<time<<"</p>]]></description>\n"
+              << "   <Polygon>\n <extrude>1</extrude>\n <altitudeMode>relativeToGround</altitudeMode>\n <outerBoundaryIs><LinearRing>\n"
+              << "     <coordinates>\n";     
+     }
+     
+      const  double lon = (GPoints[s].lon_x() > 180) ? GPoints[s].lon_x() - 360 : GPoints[s].lon_x();
+
+      pFile_  << "  "<<lon<<","<<GPoints[s].lat_y()<<","<<GPoints[s].height()<<"\n";
+   }
+
+   pFile_  <<" </coordinates>\n"
+              << "   </LinearRing></outerBoundaryIs>\n</Polygon>\n"
+              << "  </Placemark>\n";
+  }
+
+pFile_  << "</Folder>\n</kml>\n";
+  pFile_.close();
+  
+  
+  // KMZ
+/*  if(strcmp(def("OUTPUT_FORMAT"),"KMZ") == 0)
+  {
+	   zipFile zf;
+	   int err=0;
+
+	   zf = zipOpen(fileName_.c_str(),0);
+           if (zf == 0)
+           {
+               printf("ERROR opening zip file %s\n",fileName_.c_str());
+               err= ZIP_ERRNO;
+           }
+           else
+	   {
+		int size_buf = WRITEBUFFERSIZE;
+		void* buf = (void*)malloc(size_buf);
+		if (buf==0)
+		{
+			Log::error() <<"Error allocating memory for KMZ generation!"<<endl;
+			return;
+		}
+		stringarray::iterator it    = kml_output_resource_list_.begin();
+		stringarray::iterator itend = kml_output_resource_list_.end();
+		for(; it != itend; it++)
+		{
+			if(getDebug()) Log::dev()<< "KMLDriver.close() > Start adding file " <<  *it << " to KMZ file.\n";
+			FILE * fin;
+			int size_read;
+
+			const char *filename = (*it).c_str();
+
+			err = zipOpenNewFileInZip(zf,filename, 0, 0, 0, 0, 0, 0, Z_DEFLATED, Z_DEFAULT_COMPRESSION);
+
+			if(err != ZIP_OK)
+				Log::error() << "Could NOT open ... KMZ file!" << endl;
+			else
+			{
+			  fin = fopen(filename,"rb");
+			  if(fin==0)
+			  {
+			     Log::fatal() << "Open file "<<filename<<" to be added to KMZ FAILED!"<< endl;
+			     return;
+			  }
+			  else
+			  {
+			    do{
+				err=ZIP_OK;
+				size_read = (int)fread(buf,1,size_buf,fin);
+				if (size_read < size_buf)
+				  if (feof(fin)==0)
+				  {
+					Log::error() << "Could NOT add "<<(*it) << endl;
+					err = ZIP_ERRNO;
+				  }
+
+				if (size_read>0)
+				{
+				  err = zipWriteInFileInZip(zf,buf,size_read);
+				  if (err<0)
+				  {
+					Log::error() << "Could NOT write KMZ file "<< fileName_<< endl;
+				  }
+				}
+			     } while ((err==ZIP_OK) && (size_read>0));
+			  }
+			  if (fin)
+				fclose(fin);
+			}
+
+			if (err<0)
+				err=ZIP_ERRNO;
+			else
+			{
+				err = zipCloseFileInZip(zf);
+				if (err!=ZIP_OK)
+					printf("error in closing xxxx in the zipfile\n");
+			}
+//				delete [] filename;
+		}
+		free(buf);
+
+		err = zipClose(zf,0);
+		if (err != ZIP_OK)
+			printf("error in closing %s\n",fileName_.c_str());
+		else if (!getDebug())
+		{
+			stringarray::iterator it = kml_output_resource_list_.begin();
+			stringarray::iterator itend = kml_output_resource_list_.end();
+			for(; it != itend; it++)
+			{
+				remove((*it).c_str());
+			}
+			printOutputName("KML kmz "+fileName_);
+}
+	   }// Zipping ---> K M Z
+	}
+*/
+}
+
+
+/*!
+ \brief Method to process requests
+ \sa MvRequest
+*/
+void
+GeoToKML::serve( MvRequest& in, MvRequest& out )
+{
+  std::string outname = marstmp();
+  outname += ".kmz";
+  ToPlacemark placemarks(in);
+  placemarks.write(outname, in);
+
+  MvRequest kml    = "KML";
+  kml("PATH")      = outname.c_str();
+  kml("TEMPORARY") = 1;
+
+  out = kml;
+}
+
+/*!
+ \brief Main program of module GeoToKML
+*/
+int
+main( int argc, char **argv )
+{
+	MvApplication theApp( argc, argv );
+	GeoToKML module;
+
+	theApp.run();
+}
diff --git a/src/KML/GeoToKML.xpm b/src/KML/GeoToKML.xpm
new file mode 100644
index 0000000..557d24f
--- /dev/null
+++ b/src/KML/GeoToKML.xpm
@@ -0,0 +1,446 @@
+/* XPM */
+static char * GeoToKML_xpm[] = {
+"32 32 411 2",
+"  	c #FFFFFF",
+". 	c #003400",
+"+ 	c #253F8A",
+"@ 	c #3144A1",
+"# 	c #375184",
+"$ 	c #000000",
+"% 	c #FFF7F7",
+"& 	c #C3BFD9",
+"* 	c #BFB9D3",
+"= 	c #C3BDD3",
+"- 	c #BEB7CF",
+"; 	c #B1B3D0",
+"> 	c #979BC4",
+", 	c #727AB5",
+"' 	c #3D4AA3",
+") 	c #263893",
+"! 	c #253C72",
+"~ 	c #7CBAD2",
+"{ 	c #4082B8",
+"] 	c #8585BE",
+"^ 	c #9997C5",
+"/ 	c #BAB4CE",
+"( 	c #D4D3DE",
+"_ 	c #E9E6E5",
+": 	c #EEEAE5",
+"< 	c #E0DDDC",
+"[ 	c #B6B6C9",
+"} 	c #6169A6",
+"| 	c #2F3C96",
+"1 	c #2E4568",
+"2 	c #84C1D6",
+"3 	c #145AAB",
+"4 	c #145AA9",
+"5 	c #155AA8",
+"6 	c #363EA0",
+"7 	c #434FA7",
+"8 	c #787FB8",
+"9 	c #BBBCD0",
+"0 	c #E8E3E0",
+"a 	c #E4E0DD",
+"b 	c #D7D3D5",
+"c 	c #AAAAC0",
+"d 	c #3D4794",
+"e 	c #243791",
+"f 	c #00F76C",
+"g 	c #175DAE",
+"h 	c #1A55AB",
+"i 	c #2939A6",
+"j 	c #23339C",
+"k 	c #213095",
+"l 	c #636BAA",
+"m 	c #BCBCCD",
+"n 	c #E0DBD9",
+"o 	c #DDD8D8",
+"p 	c #D0CBCE",
+"q 	c #7276A2",
+"r 	c #233176",
+"s 	c #175EB2",
+"t 	c #1B57B0",
+"u 	c #2B3CAD",
+"v 	c #2839A4",
+"w 	c #27369D",
+"x 	c #223092",
+"y 	c #394596",
+"z 	c #B4B3C6",
+"A 	c #DDD8D7",
+"B 	c #D9D4D4",
+"C 	c #D3CECF",
+"D 	c #696D9A",
+"E 	c #212F70",
+"F 	c #FF0000",
+"G 	c #5B9AC5",
+"H 	c #2A70B9",
+"I 	c #1A5BB3",
+"J 	c #2C41B3",
+"K 	c #2A3CAC",
+"L 	c #2939A4",
+"M 	c #26359A",
+"N 	c #233191",
+"O 	c #2D3A8C",
+"P 	c #A0A0BB",
+"Q 	c #DAD5D4",
+"R 	c #D5D0D0",
+"S 	c #D0CACB",
+"T 	c #6F729A",
+"U 	c #1E2D77",
+"V 	c #7DB9CE",
+"W 	c #7DB8CD",
+"X 	c #6AA7C8",
+"Y 	c #04360B",
+"Z 	c #2B44B9",
+"` 	c #2B3DB1",
+" .	c #2A3AA9",
+"..	c #27379E",
+"+.	c #253496",
+"@.	c #1F2D89",
+"#.	c #37418C",
+"$.	c #CEC9CD",
+"%.	c #D6D1D0",
+"&.	c #D3CDCD",
+"*.	c #C7C1C4",
+"=.	c #383F7E",
+"-.	c #22319F",
+";.	c #7BB6CB",
+">.	c #6AA8C6",
+",.	c #4A6CC2",
+"'.	c #2A3EB6",
+").	c #2B3CAE",
+"!.	c #2838A3",
+"~.	c #23318F",
+"{.	c #1C2983",
+"].	c #696E9E",
+"^.	c #D1CBCD",
+"/.	c #D1CBCC",
+"(.	c #CEC8C8",
+"_.	c #9C9AAA",
+":.	c #252E71",
+"<.	c #7BB6CC",
+"[.	c #7AB5CB",
+"}.	c #7AB5C9",
+"|.	c #87B1CD",
+"1.	c #4256BD",
+"2.	c #283BB0",
+"3.	c #2939A5",
+"4.	c #27369C",
+"5.	c #243291",
+"6.	c #212E88",
+"7.	c #293481",
+"8.	c #9F9EB5",
+"9.	c #CBC5C6",
+"0.	c #C0BBBC",
+"a.	c #555883",
+"b.	c #1D217A",
+"c.	c #7BB7CC",
+"d.	c #79B4CA",
+"e.	c #78B3C9",
+"f.	c #82B8CA",
+"g.	c #ACBFD3",
+"h.	c #5E6ABD",
+"i.	c #2637A7",
+"j.	c #27369E",
+"k.	c #243393",
+"l.	c #222F89",
+"m.	c #1C297C",
+"n.	c #2E377D",
+"o.	c #BCB8C0",
+"p.	c #CBC5C5",
+"q.	c #C4BFBE",
+"r.	c #9F9BA6",
+"s.	c #1A2370",
+"t.	c #64A5D0",
+"u.	c #73B0CB",
+"v.	c #7AB5CA",
+"w.	c #77B2C8",
+"x.	c #76B1C6",
+"y.	c #8FBBCA",
+"z.	c #C7CAD6",
+"A.	c #515EB3",
+"B.	c #24349E",
+"C.	c #1F2B7E",
+"D.	c #192473",
+"E.	c #545988",
+"F.	c #BDB8BD",
+"G.	c #C2BDBC",
+"H.	c #BBB5B5",
+"I.	c #272E66",
+"J.	c #0000FF",
+"K.	c #63A2C8",
+"L.	c #76B1C8",
+"M.	c #77B2C6",
+"N.	c #76B0C5",
+"O.	c #FE0505",
+"P.	c #F06968",
+"Q.	c #D2D1D5",
+"R.	c #777EB6",
+"S.	c #243293",
+"T.	c #202E89",
+"U.	c #1D2774",
+"V.	c #172167",
+"W.	c #383E72",
+"X.	c #9593A1",
+"Y.	c #77768B",
+"Z.	c #131A52",
+"`.	c #1F2986",
+" +	c #4C8EC3",
+".+	c #74AFC5",
+"++	c #FA1F1F",
+"@+	c #E1BBBB",
+"#+	c #D6D1D4",
+"$+	c #787DAF",
+"%+	c #243189",
+"&+	c #1E2A7D",
+"*+	c #1C2773",
+"=+	c #192268",
+"-+	c #151D5D",
+";+	c #1D2358",
+">+	c #181E52",
+",+	c #131950",
+"'+	c #172066",
+")+	c #286FBD",
+"!+	c #3075BB",
+"~+	c #ED6464",
+"{+	c #D7D2D2",
+"]+	c #D8D2D1",
+"^+	c #A8A6BC",
+"/+	c #353E85",
+"(+	c #1A2570",
+"_+	c #192266",
+":+	c #171F5D",
+"<+	c #141A51",
+"[+	c #13194E",
+"}+	c #13194F",
+"|+	c #131A56",
+"1+	c #2A71BE",
+"2+	c #256CBB",
+"3+	c #1E65B7",
+"4+	c #1C63B4",
+"5+	c #91B8C6",
+"6+	c #D6D0D1",
+"7+	c #D4CECF",
+"8+	c #D4CECE",
+"9+	c #ADABBA",
+"0+	c #505689",
+"a+	c #131D61",
+"b+	c #151D5A",
+"c+	c #141A50",
+"d+	c #121850",
+"e+	c #77B5D2",
+"f+	c #286EBC",
+"g+	c #2369B9",
+"h+	c #1F65B7",
+"i+	c #1960B4",
+"j+	c #175DB0",
+"k+	c #1B5FA9",
+"l+	c #578BB4",
+"m+	c #C8C4CB",
+"n+	c #D0C9CA",
+"o+	c #CBC4C5",
+"p+	c #C8C2C1",
+"q+	c #818098",
+"r+	c #343969",
+"s+	c #10174D",
+"t+	c #12184E",
+"u+	c #2E74BC",
+"v+	c #1C63B5",
+"w+	c #1960B3",
+"x+	c #165CAD",
+"y+	c #155BA8",
+"z+	c #1459A4",
+"A+	c #19529E",
+"B+	c #4D579D",
+"C+	c #A7A5BA",
+"D+	c #CFC8C8",
+"E+	c #C7C2C2",
+"F+	c #C1BBBC",
+"G+	c #BCB6B6",
+"H+	c #A5A1A7",
+"I+	c #66667F",
+"J+	c #343861",
+"K+	c #191E51",
+"L+	c #131954",
+"M+	c #175EB0",
+"N+	c #175DAF",
+"O+	c #165CAC",
+"P+	c #1358A1",
+"Q+	c #164C98",
+"R+	c #202D87",
+"S+	c #1D297D",
+"T+	c #454C87",
+"U+	c #918FA5",
+"V+	c #B1ADB2",
+"W+	c #B9B3B2",
+"X+	c #B3ADAD",
+"Y+	c #AFA9A8",
+"Z+	c #ABA6A4",
+"`+	c #6B6A7E",
+" @	c #171E5F",
+".@	c #165BAA",
+"+@	c #155AA7",
+"@@	c #13579D",
+"#@	c #174894",
+"$@	c #202C82",
+"%@	c #1D2978",
+"&@	c #19246F",
+"*@	c #20286A",
+"=@	c #3D4272",
+"-@	c #78778C",
+";@	c #9D999F",
+">@	c #ACA7A3",
+",@	c #585973",
+"'@	c #192376",
+")@	c #145AA4",
+"!@	c #1458A2",
+"~@	c #1357A0",
+"{@	c #12569C",
+"]@	c #125599",
+"^@	c #16458E",
+"/@	c #1E2A7A",
+"(@	c #1C2771",
+"_@	c #1A246A",
+":@	c #182061",
+"<@	c #151C58",
+"[@	c #0E154D",
+"}@	c #141B4F",
+"|@	c #31355F",
+"1@	c #4B4D6D",
+"2@	c #252A59",
+"3@	c #1358A0",
+"4@	c #13579E",
+"5@	c #115598",
+"6@	c #115495",
+"7@	c #144489",
+"8@	c #1D2773",
+"9@	c #1A246B",
+"0@	c #192164",
+"a@	c #161E5B",
+"b@	c #141B53",
+"c@	c #12194E",
+"d@	c #141B59",
+"e@	c #3072AB",
+"f@	c #12569A",
+"g@	c #115496",
+"h@	c #105393",
+"i@	c #105290",
+"j@	c #134282",
+"k@	c #182163",
+"l@	c #171F5C",
+"m@	c #141B54",
+"n@	c #18215C",
+"o@	c #5E9DC1",
+"p@	c #145797",
+"q@	c #105394",
+"r@	c #105392",
+"s@	c #0F518F",
+"t@	c #0E508C",
+"u@	c #B40C23",
+"v@	c #151C55",
+"w@	c #11174D",
+"x@	c #0F154C",
+"y@	c #171C50",
+"z@	c #7DBAD0",
+"A@	c #417FA8",
+"B@	c #236497",
+"C@	c #1A5B92",
+"D@	c #13558C",
+"E@	c #9B0F2B",
+"F@	c #19205C",
+"G@	c #181E55",
+"H@	c #181F52",
+"I@	c #1E2354",
+"J@	c #292D5A",
+"K@	c #444768",
+"L@	c #666679",
+"M@	c #2E325D",
+"N@	c #16216D",
+"O@	c #74B0C5",
+"P@	c #5F99B1",
+"Q@	c #5792AC",
+"R@	c #4E89A6",
+"S@	c #C13B45",
+"T@	c #79788C",
+"U@	c #777688",
+"V@	c #7B7A88",
+"W@	c #85838C",
+"X@	c #8E8B90",
+"Y@	c #969392",
+"Z@	c #606075",
+"`@	c #131B51",
+" #	c #639EB2",
+".#	c #5E98AD",
+"+#	c #5D96AC",
+"@#	c #6798A9",
+"##	c #B9908E",
+"$#	c #A7A2A0",
+"%#	c #A19D9B",
+"&#	c #959293",
+"*#	c #848289",
+"=#	c #51526D",
+"-#	c #181F5A",
+";#	c #609CB5",
+">#	c #508BA4",
+",#	c #598DA3",
+"'#	c #80919E",
+")#	c #928E95",
+"!#	c #88868F",
+"~#	c #717181",
+"{#	c #595A73",
+"]#	c #383B62",
+"^#	c #232756",
+"/#	c #151C59",
+"(#	c #508EAF",
+"_#	c #0A4475",
+":#	c #102E61",
+"<#	c #141B50",
+"[#	c #12184D",
+"}#	c #0F164C",
+"|#	c #0E144B",
+"1#	c #12184F",
+"2#	c #151D52",
+"3#	c #1E517E",
+"4#	c #102256",
+"5#	c #1B2270",
+"6#	c #80BDD3",
+"7#	c #395D87",
+"8#	c #131A4F",
+"9#	c #12194F",
+"0#	c #151C5A",
+"a#	c #18215B",
+"b#	c #536E5F",
+"c#	c #151D5E",
+"d#	c #1C2578",
+"                        . . . . . + @ # $ $                     ",
+"                  . . . % & * = - ; > , ' ) ! $                 ",
+"              . . . . . ~ { ] ^ / ( _ : < [ } | 1 $             ",
+"            . . . . 2 . . 3 4 5 6 7 8 9 0 a b c d e $           ",
+"          . . f . 2 2 . . . . g h i j k l m n o p q r $         ",
+"        . f . . 2 2 2 . f . . s t u v w x y z A B C D E $       ",
+"      . . . . F F . . . . . G H I J K L M N O P Q R S T U $     ",
+"    . . % . F F F F . . . V W X Y Z `  ...+. at .#.$.%.&.*.=.-.    ",
+"    . % . . F F F F . . V . . ;.>.,.'.).!.M ~.{.].^./.(._.:.$   ",
+"  . . % . . . F F f f . . . <.[.}.|.1.2.3.4.5.6.7.8.&.9.0.a.b.  ",
+"  . . . % . . f . f . . . c.[.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.$ ",
+"  . 2 . . . . . f . f . t.u.v.e.w.x.y.z.A.B.k.l.C.D.E.F.G.H.I.$ ",
+". 2 2 . . . . . . . . . J.J.K.L.M.N.O.P.Q.R.S.T.C.U.V.W.X.Y.Z.`.",
+". 2 2 2 . . . 2 2 2 2 J.J.J.J. +.+F F ++ at +#+$+%+&+*+=+-+;+>+,+'+",
+". 2 2 2 2 . . 2 2 2 2 J.J.J.J.)+!+F F F ~+{+]+^+/+(+_+:+<+[+}+|+",
+". 2 J.J.2 2 . . 2 2 2 2 J.J.1+2+3+4+F F 5+6+7+8+9+0+a+b+c+[+[+d+",
+". J.J.J.J.2 2 . . . . . e+f+g+h+i+j+3 k+l+m+8+n+o+p+q+r+[+s+t+d+",
+". J.J.J.J.. . . . . . . . u+v+w+j+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+",
+". 2 J.J.2 . . % . . f . . . M+N+O+y+z+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @",
+". 2 2 2 2 . . % . . . . f . . . at +@z+P+@@#@$@%@&@*@=@-@;@Z+>@,@'@",
+"  . 2 2 2 2 . . % . . . f . . )@!@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@$ ",
+"  . 2 2 2 2 2 2 . % . . f . . 3 at 4@{@5 at 6@7 at 8@9 at 0@a at b@[+c at s+s+d@$ ",
+"  . 2 2 2 2 F F . . % . . . e at f@5 at g@h at i@j at 9@k at l@m@}+[+[+[+[+n@  ",
+"    . 2 2 F F F F . % . . . o at p@q at r@s at t@u at 0@l at v@}+[+w at x@y at t+$   ",
+"    . . 2 F F F F . % . . 2 z at A@B at C@D at F E at F@G at H@I at J@K at L@M at N@    ",
+"      . 2 2 F F 2 . . . 2 2 2 O at P@Q at R@F S at T@U at V@W at X@Y at Z@`@$     ",
+"        . 2 2 2 2 . . 2 2 J.J.c. #.#+#@###Z+$#%#&#*#=#-#$       ",
+"          . 2 2 2 . . 2 J.J.J.J.;#>#,#'#)#!#~#{#]#^#/#$         ",
+"            . . 2 2 . 2 J.J.J.J.(#_#:#<#[#}#|#x at 1#2#$           ",
+"              . . 2 2 2 2 J.J.2 z at 3#4#c@[+[+[+t+5#$             ",
+"                  . . . 2 2 2 2 6#7#8#[+9#0#a#$                 ",
+"                        . . . . . b#c#d#$ $                     "};
diff --git a/src/KML/GeoToKMLDef b/src/KML/GeoToKMLDef
new file mode 100644
index 0000000..ed0ceec
--- /dev/null
+++ b/src/KML/GeoToKMLDef
@@ -0,0 +1,40 @@
+GeoToKML ; Transform Geopoints to KML ; metview
+{
+	GEOPOINTS 
+	[ interface = icon, class = GEOPOINTS, exclusive = true,
+	  help            = help_data,
+	  help_name       = Geopoints to KML,
+	  help_directory  = '/Metview/Defaults',
+	  help_class      = OBSFILTER ,
+	  help_definition = (OBSFILTER,OUTPUT = GEOPOINTS)
+	]
+	{
+		@ 
+	}
+
+	OUTPUT_MODE
+	{
+		Points  ;  POI 
+		Tracks  ;  TRA
+		Polygon  ;  POL
+	} = POI
+
+	OUTPUT_FORMAT
+	{
+		KMZ  ;  KMZ
+		KML ;  KML 
+	} = KML
+
+
+	AREA
+	[
+        	help = help_input,
+        	input_type = area,
+        	input_window = '/Metview/Defaults/Input Window'
+	]
+	{	
+        	*
+        	/
+	} = 90/-180/-90/180
+
+}
diff --git a/src/KML/GeoToKMLRules b/src/KML/GeoToKMLRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/KML/GeoToKMLRules
@@ -0,0 +1 @@
+
diff --git a/src/KML/Makefile.am b/src/KML/Makefile.am
new file mode 100644
index 0000000..fb9d5a4
--- /dev/null
+++ b/src/KML/Makefile.am
@@ -0,0 +1,31 @@
+AUTOMAKE_OPTIONS = foreign
+bin_PROGRAMS = bin/GeoToKML
+
+bin_GeoToKML_SOURCES = GeoToKML.cc
+bin_GeoToKML_CPPFLAGS = 
+bin_GeoToKML_LDADD = $(STANDARD_METVIEW_LIBS)
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA  = $(local_sharedir)/ObjectSpec.GeoToKML $(local_sharedir)/GeoToKMLDef  \
+	      $(local_sharedir)/GeoToKMLRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons: 
+	${INSTALL} GeoToKML.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/GeoToKML.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.GeoToKML GeoToKMLDef GeoToKMLRules GeoToKML.xpm
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/KML/Makefile.in b/src/KML/Makefile.in
new file mode 100644
index 0000000..ebc64b0
--- /dev/null
+++ b/src/KML/Makefile.in
@@ -0,0 +1,709 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/GeoToKML$(EXEEXT)
+subdir = src/KML
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_GeoToKML_OBJECTS = bin_GeoToKML-GeoToKML.$(OBJEXT)
+bin_GeoToKML_OBJECTS = $(am_bin_GeoToKML_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_GeoToKML_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_GeoToKML_SOURCES)
+DIST_SOURCES = $(bin_GeoToKML_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign
+bin_GeoToKML_SOURCES = GeoToKML.cc
+bin_GeoToKML_CPPFLAGS = 
+bin_GeoToKML_LDADD = $(STANDARD_METVIEW_LIBS)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.GeoToKML $(local_sharedir)/GeoToKMLDef  \
+	      $(local_sharedir)/GeoToKMLRules
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/GeoToKML.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.GeoToKML GeoToKMLDef GeoToKMLRules GeoToKML.xpm
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/KML/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/KML/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/GeoToKML$(EXEEXT): $(bin_GeoToKML_OBJECTS) $(bin_GeoToKML_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/GeoToKML$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_GeoToKML_OBJECTS) $(bin_GeoToKML_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoToKML-GeoToKML.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_GeoToKML-GeoToKML.o: GeoToKML.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToKML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoToKML-GeoToKML.o -MD -MP -MF $(DEPDIR)/bin_GeoToKML-GeoToKML.Tpo -c -o bin_GeoToKML-GeoToKML.o `test -f 'GeoToKML.cc' || echo '$(srcdir)/'`GeoToKML.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoToKML-GeoToKML.Tpo $(DEPDIR)/bin_GeoToKML-GeoToKML.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoToKML.cc' object='bin_GeoToKML-GeoToKML.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToKML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoToKML-GeoToKML.o `test -f 'GeoToKML.cc' || echo '$(srcdir)/'`GeoToKML.cc
+
+bin_GeoToKML-GeoToKML.obj: GeoToKML.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToKML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoToKML-GeoToKML.obj -MD -MP -MF $(DEPDIR)/bin_GeoToKML-GeoToKML.Tpo -c -o bin_GeoToKML-GeoToKML.obj `if test -f 'GeoToKML.cc'; then $(CYGPATH_W) 'GeoToKML.cc'; else $(CYGPATH_W) '$(srcdir)/GeoToKML.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoToKML-GeoToKML.Tpo $(DEPDIR)/bin_GeoToKML-GeoToKML.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoToKML.cc' object='bin_GeoToKML-GeoToKML.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToKML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoToKML-GeoToKML.obj `if test -f 'GeoToKML.cc'; then $(CYGPATH_W) 'GeoToKML.cc'; else $(CYGPATH_W) '$(srcdir)/GeoToKML.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons: 
+	${INSTALL} GeoToKML.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/KML/ObjectSpec.GeoToKML b/src/KML/ObjectSpec.GeoToKML
new file mode 100644
index 0000000..503ef3a
--- /dev/null
+++ b/src/KML/ObjectSpec.GeoToKML
@@ -0,0 +1,33 @@
+################################################################################
+#
+#	ObjectSpec.GeoToKML
+#
+
+object,
+	class		= GeoToKML,
+	icon_box        = Filters,
+ 	can_be_created	= True,
+	definition_file	= '$METVIEW_DIR/share/metview/etc/GeoToKMLDef',
+	rules_file	= '$METVIEW_DIR/share/metview/etc/GeoToKMLRules',
+	default_name	= Geopoints to KML,
+	help_page	= Geopoints_to_KML,
+	type		= Data,
+	expand		= 75,
+	macro		= geo_to_kml,
+	editor_type	= SimpleEditor,
+        pixmap		= '$METVIEW_DIR/share/metview/icons/GeoToKML.icon'
+
+#state,
+#	class		= GeoToKML,
+#	action		= examine,
+#	service		= '(xterm -e view \"%s\")'
+
+state,
+	class		= GeoToKML,
+	output_class	= KML,
+	service		= GeoToKML
+
+service,
+	cmd		= '$METVIEW_CMD $METVIEW_BIN/GeoToKML',
+	name		=  GeoToKML
+
diff --git a/src/Macro/Makefile.am b/src/Macro/Makefile.am
new file mode 100644
index 0000000..a5c3706
--- /dev/null
+++ b/src/Macro/Makefile.am
@@ -0,0 +1,105 @@
+
+bin_PROGRAMS = bin/macro  bin/beautify  bin/perlaccess  bin/mvimport
+
+
+AR=ar
+RPCGEN  = rpcgen
+SOURCES_lex = macroy.y
+SRCS_cc = \
+    value.cc code.cc variable.cc context.cc script.cc files.cc \
+    misc.cc number.cc stack.cc date.cc mstring.cc request.cc \
+    Unix.cc grib.cc mlist.cc module.cc remote.cc function.cc \
+    matrix.cc image.cc arith.cc extern.cc mvector.cc mtable.cc library.cc \
+    debug.cc bufr.cc compute.cc main.cc vismod.cc vis5d.cc \
+    netcdf.cc object.cc pngjpeg.cc \
+    mflextra.cc \
+    beau.h include/arith.h include/cbufr.h include/cnetcdf.h include/codb.h include/ctable.h \
+    include/code.h include/cpngjpeg.h include/date.h include/macro.h include/node.h \
+    include/opcodes.h include/script.h include/value.h include/widgets.h 
+#    netcdf.cc object.cc pngjpeg.cc MvNetCDF.cc gribex_compat.cc
+
+
+bin_macro_SOURCES  = $(SOURCES_lex) $(SRCS_cc)
+bin_macro_CPPFLAGS = -Iinclude $(METVIEW_NETCDF_FLAGS)
+bin_macro_LDFLAGS  = 
+bin_macro_LDADD    =$(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB)  $(STANDARD_METVIEW_LIBS) $(FLIBS)
+
+bin_macro_DEPENDENCIES = ../../lib/libUtil.a  ../../lib/libMetview.a
+
+
+if METVIEW_ODB 
+bin_macro_SOURCES += codb.cc
+bin_macro_CPPFLAGS += $(ODB_CPPFLAGS)
+bin_macro_LDFLAGS  += $(ODB_LDFLAGS)
+bin_macro_LDADD += $(ODB_LIBS)
+endif
+
+bin_beautify_SOURCES  = beauy.y beautify.c
+bin_beautify_LDADD    = $(STANDARD_METVIEW_LIBS_NO_UTIL) # C/C++ compilation issue otherwise
+
+bin_perlaccess_SOURCES  = perlaccess.cc
+bin_perlaccess_LDADD    = $(STANDARD_METVIEW_LIBS)
+
+bin_mvimport_SOURCES  = mvimport.c
+bin_mvimport_LDADD    = $(STANDARD_METVIEW_LIBS_NO_UTIL) # C/C++ compilation issue otherwise
+
+
+
+
+macroy.c : macrol.c
+macrol.c : macrol.l
+	$(LEX) $(LFLAGS) macrol.l
+	sed -e s/yy/zz/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+macroy.c : macroy.y
+	$(YACC) $(YFLAGS) macroy.y
+	sed -e s/yy/zz/g < y.tab.c > $@
+	$(RM) y.tab.c
+
+
+beauy.c : beaul.c
+beaul.c : beaul.l
+	$(LEX) $(LFLAGS) beaul.l
+	sed -e s/yy/zz/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+beauy.c : beauy.y
+	$(YACC) $(YFLAGS) beauy.y
+	sed -e s/yy/zz/g < y.tab.c > $@
+	$(RM) y.tab.c
+
+
+./beau.h : beau.ps
+	sed -e 's/\(.*\)/\"\1\",/' < beau.ps > beau.h
+
+beautify.o : beau.ps ./beau.h
+
+
+
+# a note about cleaning: in order that the end user does not need to
+# install lex and yacc, we distribute the generated source files. We also
+# don't want these to be cleaned during a normal clean, because the end user
+# would then need to have lex and yacc installed... so we don't clean
+# these by default, but instead have a separate target, 'cleanall' which
+# remove the lex/yacc generated source.
+
+clean-all: clean
+	-rm -f macroy.c macrol.c beauy.c beaul.c beau.h
+
+
+# ensure we clean up all the lexical files
+CLEANFILES = lex.yy.c y.tab.c y.output y.tab.h \
+             lex.yy.c y.tab.c y.output y.tab.h
+
+
+EXTRA_DIST = macrol.l macrol.c macroy.y beaul.l beaul.c beauy.y beau.ps
+
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
+
+# do not distribute certain files in the tarball...
+#dist-hook:
+#	rm -f $(distdir)/macroy.c $(distdir)/macrol.c $(distdir)/beauy.c $(distdir)/beaul.c
+
diff --git a/src/Macro/Makefile.in b/src/Macro/Makefile.in
new file mode 100644
index 0000000..782ccc5
--- /dev/null
+++ b/src/Macro/Makefile.in
@@ -0,0 +1,1445 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/macro$(EXEEXT) bin/beautify$(EXEEXT) \
+	bin/perlaccess$(EXEEXT) bin/mvimport$(EXEEXT)
+ at METVIEW_ODB_TRUE@am__append_1 = codb.cc
+ at METVIEW_ODB_TRUE@am__append_2 = $(ODB_CPPFLAGS)
+ at METVIEW_ODB_TRUE@am__append_3 = $(ODB_LDFLAGS)
+ at METVIEW_ODB_TRUE@am__append_4 = $(ODB_LIBS)
+subdir = src/Macro
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in beauy.c \
+	macroy.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_beautify_OBJECTS = beauy.$(OBJEXT) beautify.$(OBJEXT)
+bin_beautify_OBJECTS = $(am_bin_beautify_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_beautify_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+am__bin_macro_SOURCES_DIST = macroy.y value.cc code.cc variable.cc \
+	context.cc script.cc files.cc misc.cc number.cc stack.cc \
+	date.cc mstring.cc request.cc Unix.cc grib.cc mlist.cc \
+	module.cc remote.cc function.cc matrix.cc image.cc arith.cc \
+	extern.cc mvector.cc mtable.cc library.cc debug.cc bufr.cc \
+	compute.cc main.cc vismod.cc vis5d.cc netcdf.cc object.cc \
+	pngjpeg.cc mflextra.cc beau.h include/arith.h include/cbufr.h \
+	include/cnetcdf.h include/codb.h include/ctable.h \
+	include/code.h include/cpngjpeg.h include/date.h \
+	include/macro.h include/node.h include/opcodes.h \
+	include/script.h include/value.h include/widgets.h codb.cc
+am__objects_1 = bin_macro-macroy.$(OBJEXT)
+am__objects_2 = bin_macro-value.$(OBJEXT) bin_macro-code.$(OBJEXT) \
+	bin_macro-variable.$(OBJEXT) bin_macro-context.$(OBJEXT) \
+	bin_macro-script.$(OBJEXT) bin_macro-files.$(OBJEXT) \
+	bin_macro-misc.$(OBJEXT) bin_macro-number.$(OBJEXT) \
+	bin_macro-stack.$(OBJEXT) bin_macro-date.$(OBJEXT) \
+	bin_macro-mstring.$(OBJEXT) bin_macro-request.$(OBJEXT) \
+	bin_macro-Unix.$(OBJEXT) bin_macro-grib.$(OBJEXT) \
+	bin_macro-mlist.$(OBJEXT) bin_macro-module.$(OBJEXT) \
+	bin_macro-remote.$(OBJEXT) bin_macro-function.$(OBJEXT) \
+	bin_macro-matrix.$(OBJEXT) bin_macro-image.$(OBJEXT) \
+	bin_macro-arith.$(OBJEXT) bin_macro-extern.$(OBJEXT) \
+	bin_macro-mvector.$(OBJEXT) bin_macro-mtable.$(OBJEXT) \
+	bin_macro-library.$(OBJEXT) bin_macro-debug.$(OBJEXT) \
+	bin_macro-bufr.$(OBJEXT) bin_macro-compute.$(OBJEXT) \
+	bin_macro-main.$(OBJEXT) bin_macro-vismod.$(OBJEXT) \
+	bin_macro-vis5d.$(OBJEXT) bin_macro-netcdf.$(OBJEXT) \
+	bin_macro-object.$(OBJEXT) bin_macro-pngjpeg.$(OBJEXT) \
+	bin_macro-mflextra.$(OBJEXT)
+ at METVIEW_ODB_TRUE@am__objects_3 = bin_macro-codb.$(OBJEXT)
+am_bin_macro_OBJECTS = $(am__objects_1) $(am__objects_2) \
+	$(am__objects_3)
+bin_macro_OBJECTS = $(am_bin_macro_OBJECTS)
+ at METVIEW_ODB_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+bin_macro_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_macro_LDFLAGS) $(LDFLAGS) -o $@
+am_bin_mvimport_OBJECTS = mvimport.$(OBJEXT)
+bin_mvimport_OBJECTS = $(am_bin_mvimport_OBJECTS)
+bin_mvimport_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_bin_perlaccess_OBJECTS = perlaccess.$(OBJEXT)
+bin_perlaccess_OBJECTS = $(am_bin_perlaccess_OBJECTS)
+bin_perlaccess_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+AM_V_YACC = $(am__v_YACC_$(V))
+am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY))
+am__v_YACC_0 = @echo "  YACC  " $@;
+YLWRAP = $(top_srcdir)/config/ylwrap
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_beautify_SOURCES) $(bin_macro_SOURCES) \
+	$(bin_mvimport_SOURCES) $(bin_perlaccess_SOURCES)
+DIST_SOURCES = $(bin_beautify_SOURCES) $(am__bin_macro_SOURCES_DIST) \
+	$(bin_mvimport_SOURCES) $(bin_perlaccess_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = ar
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+RPCGEN = rpcgen
+SOURCES_lex = macroy.y
+SRCS_cc = \
+    value.cc code.cc variable.cc context.cc script.cc files.cc \
+    misc.cc number.cc stack.cc date.cc mstring.cc request.cc \
+    Unix.cc grib.cc mlist.cc module.cc remote.cc function.cc \
+    matrix.cc image.cc arith.cc extern.cc mvector.cc mtable.cc library.cc \
+    debug.cc bufr.cc compute.cc main.cc vismod.cc vis5d.cc \
+    netcdf.cc object.cc pngjpeg.cc \
+    mflextra.cc \
+    beau.h include/arith.h include/cbufr.h include/cnetcdf.h include/codb.h include/ctable.h \
+    include/code.h include/cpngjpeg.h include/date.h include/macro.h include/node.h \
+    include/opcodes.h include/script.h include/value.h include/widgets.h 
+
+#    netcdf.cc object.cc pngjpeg.cc MvNetCDF.cc gribex_compat.cc
+bin_macro_SOURCES = $(SOURCES_lex) $(SRCS_cc) $(am__append_1)
+bin_macro_CPPFLAGS = -Iinclude $(METVIEW_NETCDF_FLAGS) $(am__append_2)
+bin_macro_LDFLAGS = $(am__append_3)
+bin_macro_LDADD = $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB) \
+	$(STANDARD_METVIEW_LIBS) $(FLIBS) $(am__append_4)
+bin_macro_DEPENDENCIES = ../../lib/libUtil.a  ../../lib/libMetview.a
+bin_beautify_SOURCES = beauy.y beautify.c
+bin_beautify_LDADD = $(STANDARD_METVIEW_LIBS_NO_UTIL) # C/C++ compilation issue otherwise
+bin_perlaccess_SOURCES = perlaccess.cc
+bin_perlaccess_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_mvimport_SOURCES = mvimport.c
+bin_mvimport_LDADD = $(STANDARD_METVIEW_LIBS_NO_UTIL) # C/C++ compilation issue otherwise
+
+# ensure we clean up all the lexical files
+CLEANFILES = lex.yy.c y.tab.c y.output y.tab.h \
+             lex.yy.c y.tab.c y.output y.tab.h
+
+EXTRA_DIST = macrol.l macrol.c macroy.y beaul.l beaul.c beauy.y beau.ps
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj .y
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Macro/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Macro/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/beautify$(EXEEXT): $(bin_beautify_OBJECTS) $(bin_beautify_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/beautify$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(bin_beautify_OBJECTS) $(bin_beautify_LDADD) $(LIBS)
+bin/macro$(EXEEXT): $(bin_macro_OBJECTS) $(bin_macro_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/macro$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_macro_LINK) $(bin_macro_OBJECTS) $(bin_macro_LDADD) $(LIBS)
+bin/mvimport$(EXEEXT): $(bin_mvimport_OBJECTS) $(bin_mvimport_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/mvimport$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(bin_mvimport_OBJECTS) $(bin_mvimport_LDADD) $(LIBS)
+bin/perlaccess$(EXEEXT): $(bin_perlaccess_OBJECTS) $(bin_perlaccess_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/perlaccess$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_perlaccess_OBJECTS) $(bin_perlaccess_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/beautify.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/beauy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-Unix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-arith.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-bufr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-codb.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-code.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-compute.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-context.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-date.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-debug.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-extern.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-files.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-function.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-grib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-image.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-library.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-macroy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-matrix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-mflextra.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-misc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-mlist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-module.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-mstring.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-mtable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-mvector.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-netcdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-number.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-object.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-pngjpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-remote.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-request.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-script.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-stack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-value.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-variable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-vis5d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_macro-vismod.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mvimport.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/perlaccess.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bin_macro-macroy.o: macroy.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_macro-macroy.o -MD -MP -MF $(DEPDIR)/bin_macro-macroy.Tpo -c -o bin_macro-macroy.o `test -f 'macroy.c' || echo '$(srcdir)/'`macroy.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-macroy.Tpo $(DEPDIR)/bin_macro-macroy.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='macroy.c' object='bin_macro-macroy.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_macro-macroy.o `test -f 'macroy.c' || echo '$(srcdir)/'`macroy.c
+
+bin_macro-macroy.obj: macroy.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_macro-macroy.obj -MD -MP -MF $(DEPDIR)/bin_macro-macroy.Tpo -c -o bin_macro-macroy.obj `if test -f 'macroy.c'; then $(CYGPATH_W) 'macroy.c'; else $(CYGPATH_W) '$(srcdir)/macroy.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-macroy.Tpo $(DEPDIR)/bin_macro-macroy.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='macroy.c' object='bin_macro-macroy.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_macro-macroy.obj `if test -f 'macroy.c'; then $(CYGPATH_W) 'macroy.c'; else $(CYGPATH_W) '$(srcdir)/macroy.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_macro-value.o: value.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-value.o -MD -MP -MF $(DEPDIR)/bin_macro-value.Tpo -c -o bin_macro-value.o `test -f 'value.cc' || echo '$(srcdir)/'`value.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-value.Tpo $(DEPDIR)/bin_macro-value.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='value.cc' object='bin_macro-value.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-value.o `test -f 'value.cc' || echo '$(srcdir)/'`value.cc
+
+bin_macro-value.obj: value.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-value.obj -MD -MP -MF $(DEPDIR)/bin_macro-value.Tpo -c -o bin_macro-value.obj `if test -f 'value.cc'; then $(CYGPATH_W) 'value.cc'; else $(CYGPATH_W) '$(srcdir)/value.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-value.Tpo $(DEPDIR)/bin_macro-value.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='value.cc' object='bin_macro-value.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-value.obj `if test -f 'value.cc'; then $(CYGPATH_W) 'value.cc'; else $(CYGPATH_W) '$(srcdir)/value.cc'; fi`
+
+bin_macro-code.o: code.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-code.o -MD -MP -MF $(DEPDIR)/bin_macro-code.Tpo -c -o bin_macro-code.o `test -f 'code.cc' || echo '$(srcdir)/'`code.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-code.Tpo $(DEPDIR)/bin_macro-code.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='code.cc' object='bin_macro-code.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-code.o `test -f 'code.cc' || echo '$(srcdir)/'`code.cc
+
+bin_macro-code.obj: code.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-code.obj -MD -MP -MF $(DEPDIR)/bin_macro-code.Tpo -c -o bin_macro-code.obj `if test -f 'code.cc'; then $(CYGPATH_W) 'code.cc'; else $(CYGPATH_W) '$(srcdir)/code.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-code.Tpo $(DEPDIR)/bin_macro-code.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='code.cc' object='bin_macro-code.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-code.obj `if test -f 'code.cc'; then $(CYGPATH_W) 'code.cc'; else $(CYGPATH_W) '$(srcdir)/code.cc'; fi`
+
+bin_macro-variable.o: variable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-variable.o -MD -MP -MF $(DEPDIR)/bin_macro-variable.Tpo -c -o bin_macro-variable.o `test -f 'variable.cc' || echo '$(srcdir)/'`variable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-variable.Tpo $(DEPDIR)/bin_macro-variable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='variable.cc' object='bin_macro-variable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-variable.o `test -f 'variable.cc' || echo '$(srcdir)/'`variable.cc
+
+bin_macro-variable.obj: variable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-variable.obj -MD -MP -MF $(DEPDIR)/bin_macro-variable.Tpo -c -o bin_macro-variable.obj `if test -f 'variable.cc'; then $(CYGPATH_W) 'variable.cc'; else $(CYGPATH_W) '$(srcdir)/variable.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-variable.Tpo $(DEPDIR)/bin_macro-variable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='variable.cc' object='bin_macro-variable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-variable.obj `if test -f 'variable.cc'; then $(CYGPATH_W) 'variable.cc'; else $(CYGPATH_W) '$(srcdir)/variable.cc'; fi`
+
+bin_macro-context.o: context.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-context.o -MD -MP -MF $(DEPDIR)/bin_macro-context.Tpo -c -o bin_macro-context.o `test -f 'context.cc' || echo '$(srcdir)/'`context.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-context.Tpo $(DEPDIR)/bin_macro-context.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='context.cc' object='bin_macro-context.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-context.o `test -f 'context.cc' || echo '$(srcdir)/'`context.cc
+
+bin_macro-context.obj: context.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-context.obj -MD -MP -MF $(DEPDIR)/bin_macro-context.Tpo -c -o bin_macro-context.obj `if test -f 'context.cc'; then $(CYGPATH_W) 'context.cc'; else $(CYGPATH_W) '$(srcdir)/context.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-context.Tpo $(DEPDIR)/bin_macro-context.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='context.cc' object='bin_macro-context.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-context.obj `if test -f 'context.cc'; then $(CYGPATH_W) 'context.cc'; else $(CYGPATH_W) '$(srcdir)/context.cc'; fi`
+
+bin_macro-script.o: script.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-script.o -MD -MP -MF $(DEPDIR)/bin_macro-script.Tpo -c -o bin_macro-script.o `test -f 'script.cc' || echo '$(srcdir)/'`script.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-script.Tpo $(DEPDIR)/bin_macro-script.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='script.cc' object='bin_macro-script.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-script.o `test -f 'script.cc' || echo '$(srcdir)/'`script.cc
+
+bin_macro-script.obj: script.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-script.obj -MD -MP -MF $(DEPDIR)/bin_macro-script.Tpo -c -o bin_macro-script.obj `if test -f 'script.cc'; then $(CYGPATH_W) 'script.cc'; else $(CYGPATH_W) '$(srcdir)/script.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-script.Tpo $(DEPDIR)/bin_macro-script.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='script.cc' object='bin_macro-script.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-script.obj `if test -f 'script.cc'; then $(CYGPATH_W) 'script.cc'; else $(CYGPATH_W) '$(srcdir)/script.cc'; fi`
+
+bin_macro-files.o: files.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-files.o -MD -MP -MF $(DEPDIR)/bin_macro-files.Tpo -c -o bin_macro-files.o `test -f 'files.cc' || echo '$(srcdir)/'`files.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-files.Tpo $(DEPDIR)/bin_macro-files.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='files.cc' object='bin_macro-files.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-files.o `test -f 'files.cc' || echo '$(srcdir)/'`files.cc
+
+bin_macro-files.obj: files.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-files.obj -MD -MP -MF $(DEPDIR)/bin_macro-files.Tpo -c -o bin_macro-files.obj `if test -f 'files.cc'; then $(CYGPATH_W) 'files.cc'; else $(CYGPATH_W) '$(srcdir)/files.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-files.Tpo $(DEPDIR)/bin_macro-files.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='files.cc' object='bin_macro-files.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-files.obj `if test -f 'files.cc'; then $(CYGPATH_W) 'files.cc'; else $(CYGPATH_W) '$(srcdir)/files.cc'; fi`
+
+bin_macro-misc.o: misc.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-misc.o -MD -MP -MF $(DEPDIR)/bin_macro-misc.Tpo -c -o bin_macro-misc.o `test -f 'misc.cc' || echo '$(srcdir)/'`misc.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-misc.Tpo $(DEPDIR)/bin_macro-misc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc.cc' object='bin_macro-misc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-misc.o `test -f 'misc.cc' || echo '$(srcdir)/'`misc.cc
+
+bin_macro-misc.obj: misc.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-misc.obj -MD -MP -MF $(DEPDIR)/bin_macro-misc.Tpo -c -o bin_macro-misc.obj `if test -f 'misc.cc'; then $(CYGPATH_W) 'misc.cc'; else $(CYGPATH_W) '$(srcdir)/misc.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-misc.Tpo $(DEPDIR)/bin_macro-misc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc.cc' object='bin_macro-misc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-misc.obj `if test -f 'misc.cc'; then $(CYGPATH_W) 'misc.cc'; else $(CYGPATH_W) '$(srcdir)/misc.cc'; fi`
+
+bin_macro-number.o: number.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-number.o -MD -MP -MF $(DEPDIR)/bin_macro-number.Tpo -c -o bin_macro-number.o `test -f 'number.cc' || echo '$(srcdir)/'`number.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-number.Tpo $(DEPDIR)/bin_macro-number.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='number.cc' object='bin_macro-number.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-number.o `test -f 'number.cc' || echo '$(srcdir)/'`number.cc
+
+bin_macro-number.obj: number.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-number.obj -MD -MP -MF $(DEPDIR)/bin_macro-number.Tpo -c -o bin_macro-number.obj `if test -f 'number.cc'; then $(CYGPATH_W) 'number.cc'; else $(CYGPATH_W) '$(srcdir)/number.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-number.Tpo $(DEPDIR)/bin_macro-number.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='number.cc' object='bin_macro-number.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-number.obj `if test -f 'number.cc'; then $(CYGPATH_W) 'number.cc'; else $(CYGPATH_W) '$(srcdir)/number.cc'; fi`
+
+bin_macro-stack.o: stack.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-stack.o -MD -MP -MF $(DEPDIR)/bin_macro-stack.Tpo -c -o bin_macro-stack.o `test -f 'stack.cc' || echo '$(srcdir)/'`stack.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-stack.Tpo $(DEPDIR)/bin_macro-stack.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='stack.cc' object='bin_macro-stack.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-stack.o `test -f 'stack.cc' || echo '$(srcdir)/'`stack.cc
+
+bin_macro-stack.obj: stack.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-stack.obj -MD -MP -MF $(DEPDIR)/bin_macro-stack.Tpo -c -o bin_macro-stack.obj `if test -f 'stack.cc'; then $(CYGPATH_W) 'stack.cc'; else $(CYGPATH_W) '$(srcdir)/stack.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-stack.Tpo $(DEPDIR)/bin_macro-stack.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='stack.cc' object='bin_macro-stack.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-stack.obj `if test -f 'stack.cc'; then $(CYGPATH_W) 'stack.cc'; else $(CYGPATH_W) '$(srcdir)/stack.cc'; fi`
+
+bin_macro-date.o: date.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-date.o -MD -MP -MF $(DEPDIR)/bin_macro-date.Tpo -c -o bin_macro-date.o `test -f 'date.cc' || echo '$(srcdir)/'`date.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-date.Tpo $(DEPDIR)/bin_macro-date.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='date.cc' object='bin_macro-date.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-date.o `test -f 'date.cc' || echo '$(srcdir)/'`date.cc
+
+bin_macro-date.obj: date.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-date.obj -MD -MP -MF $(DEPDIR)/bin_macro-date.Tpo -c -o bin_macro-date.obj `if test -f 'date.cc'; then $(CYGPATH_W) 'date.cc'; else $(CYGPATH_W) '$(srcdir)/date.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-date.Tpo $(DEPDIR)/bin_macro-date.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='date.cc' object='bin_macro-date.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-date.obj `if test -f 'date.cc'; then $(CYGPATH_W) 'date.cc'; else $(CYGPATH_W) '$(srcdir)/date.cc'; fi`
+
+bin_macro-mstring.o: mstring.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mstring.o -MD -MP -MF $(DEPDIR)/bin_macro-mstring.Tpo -c -o bin_macro-mstring.o `test -f 'mstring.cc' || echo '$(srcdir)/'`mstring.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mstring.Tpo $(DEPDIR)/bin_macro-mstring.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mstring.cc' object='bin_macro-mstring.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mstring.o `test -f 'mstring.cc' || echo '$(srcdir)/'`mstring.cc
+
+bin_macro-mstring.obj: mstring.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mstring.obj -MD -MP -MF $(DEPDIR)/bin_macro-mstring.Tpo -c -o bin_macro-mstring.obj `if test -f 'mstring.cc'; then $(CYGPATH_W) 'mstring.cc'; else $(CYGPATH_W) '$(srcdir)/mstring.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mstring.Tpo $(DEPDIR)/bin_macro-mstring.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mstring.cc' object='bin_macro-mstring.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mstring.obj `if test -f 'mstring.cc'; then $(CYGPATH_W) 'mstring.cc'; else $(CYGPATH_W) '$(srcdir)/mstring.cc'; fi`
+
+bin_macro-request.o: request.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-request.o -MD -MP -MF $(DEPDIR)/bin_macro-request.Tpo -c -o bin_macro-request.o `test -f 'request.cc' || echo '$(srcdir)/'`request.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-request.Tpo $(DEPDIR)/bin_macro-request.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='request.cc' object='bin_macro-request.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-request.o `test -f 'request.cc' || echo '$(srcdir)/'`request.cc
+
+bin_macro-request.obj: request.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-request.obj -MD -MP -MF $(DEPDIR)/bin_macro-request.Tpo -c -o bin_macro-request.obj `if test -f 'request.cc'; then $(CYGPATH_W) 'request.cc'; else $(CYGPATH_W) '$(srcdir)/request.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-request.Tpo $(DEPDIR)/bin_macro-request.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='request.cc' object='bin_macro-request.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-request.obj `if test -f 'request.cc'; then $(CYGPATH_W) 'request.cc'; else $(CYGPATH_W) '$(srcdir)/request.cc'; fi`
+
+bin_macro-Unix.o: Unix.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-Unix.o -MD -MP -MF $(DEPDIR)/bin_macro-Unix.Tpo -c -o bin_macro-Unix.o `test -f 'Unix.cc' || echo '$(srcdir)/'`Unix.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-Unix.Tpo $(DEPDIR)/bin_macro-Unix.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Unix.cc' object='bin_macro-Unix.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-Unix.o `test -f 'Unix.cc' || echo '$(srcdir)/'`Unix.cc
+
+bin_macro-Unix.obj: Unix.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-Unix.obj -MD -MP -MF $(DEPDIR)/bin_macro-Unix.Tpo -c -o bin_macro-Unix.obj `if test -f 'Unix.cc'; then $(CYGPATH_W) 'Unix.cc'; else $(CYGPATH_W) '$(srcdir)/Unix.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-Unix.Tpo $(DEPDIR)/bin_macro-Unix.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Unix.cc' object='bin_macro-Unix.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-Unix.obj `if test -f 'Unix.cc'; then $(CYGPATH_W) 'Unix.cc'; else $(CYGPATH_W) '$(srcdir)/Unix.cc'; fi`
+
+bin_macro-grib.o: grib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-grib.o -MD -MP -MF $(DEPDIR)/bin_macro-grib.Tpo -c -o bin_macro-grib.o `test -f 'grib.cc' || echo '$(srcdir)/'`grib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-grib.Tpo $(DEPDIR)/bin_macro-grib.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='grib.cc' object='bin_macro-grib.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-grib.o `test -f 'grib.cc' || echo '$(srcdir)/'`grib.cc
+
+bin_macro-grib.obj: grib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-grib.obj -MD -MP -MF $(DEPDIR)/bin_macro-grib.Tpo -c -o bin_macro-grib.obj `if test -f 'grib.cc'; then $(CYGPATH_W) 'grib.cc'; else $(CYGPATH_W) '$(srcdir)/grib.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-grib.Tpo $(DEPDIR)/bin_macro-grib.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='grib.cc' object='bin_macro-grib.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-grib.obj `if test -f 'grib.cc'; then $(CYGPATH_W) 'grib.cc'; else $(CYGPATH_W) '$(srcdir)/grib.cc'; fi`
+
+bin_macro-mlist.o: mlist.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mlist.o -MD -MP -MF $(DEPDIR)/bin_macro-mlist.Tpo -c -o bin_macro-mlist.o `test -f 'mlist.cc' || echo '$(srcdir)/'`mlist.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mlist.Tpo $(DEPDIR)/bin_macro-mlist.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mlist.cc' object='bin_macro-mlist.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mlist.o `test -f 'mlist.cc' || echo '$(srcdir)/'`mlist.cc
+
+bin_macro-mlist.obj: mlist.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mlist.obj -MD -MP -MF $(DEPDIR)/bin_macro-mlist.Tpo -c -o bin_macro-mlist.obj `if test -f 'mlist.cc'; then $(CYGPATH_W) 'mlist.cc'; else $(CYGPATH_W) '$(srcdir)/mlist.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mlist.Tpo $(DEPDIR)/bin_macro-mlist.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mlist.cc' object='bin_macro-mlist.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mlist.obj `if test -f 'mlist.cc'; then $(CYGPATH_W) 'mlist.cc'; else $(CYGPATH_W) '$(srcdir)/mlist.cc'; fi`
+
+bin_macro-module.o: module.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-module.o -MD -MP -MF $(DEPDIR)/bin_macro-module.Tpo -c -o bin_macro-module.o `test -f 'module.cc' || echo '$(srcdir)/'`module.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-module.Tpo $(DEPDIR)/bin_macro-module.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='module.cc' object='bin_macro-module.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-module.o `test -f 'module.cc' || echo '$(srcdir)/'`module.cc
+
+bin_macro-module.obj: module.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-module.obj -MD -MP -MF $(DEPDIR)/bin_macro-module.Tpo -c -o bin_macro-module.obj `if test -f 'module.cc'; then $(CYGPATH_W) 'module.cc'; else $(CYGPATH_W) '$(srcdir)/module.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-module.Tpo $(DEPDIR)/bin_macro-module.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='module.cc' object='bin_macro-module.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-module.obj `if test -f 'module.cc'; then $(CYGPATH_W) 'module.cc'; else $(CYGPATH_W) '$(srcdir)/module.cc'; fi`
+
+bin_macro-remote.o: remote.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-remote.o -MD -MP -MF $(DEPDIR)/bin_macro-remote.Tpo -c -o bin_macro-remote.o `test -f 'remote.cc' || echo '$(srcdir)/'`remote.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-remote.Tpo $(DEPDIR)/bin_macro-remote.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='remote.cc' object='bin_macro-remote.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-remote.o `test -f 'remote.cc' || echo '$(srcdir)/'`remote.cc
+
+bin_macro-remote.obj: remote.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-remote.obj -MD -MP -MF $(DEPDIR)/bin_macro-remote.Tpo -c -o bin_macro-remote.obj `if test -f 'remote.cc'; then $(CYGPATH_W) 'remote.cc'; else $(CYGPATH_W) '$(srcdir)/remote.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-remote.Tpo $(DEPDIR)/bin_macro-remote.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='remote.cc' object='bin_macro-remote.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-remote.obj `if test -f 'remote.cc'; then $(CYGPATH_W) 'remote.cc'; else $(CYGPATH_W) '$(srcdir)/remote.cc'; fi`
+
+bin_macro-function.o: function.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-function.o -MD -MP -MF $(DEPDIR)/bin_macro-function.Tpo -c -o bin_macro-function.o `test -f 'function.cc' || echo '$(srcdir)/'`function.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-function.Tpo $(DEPDIR)/bin_macro-function.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='function.cc' object='bin_macro-function.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-function.o `test -f 'function.cc' || echo '$(srcdir)/'`function.cc
+
+bin_macro-function.obj: function.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-function.obj -MD -MP -MF $(DEPDIR)/bin_macro-function.Tpo -c -o bin_macro-function.obj `if test -f 'function.cc'; then $(CYGPATH_W) 'function.cc'; else $(CYGPATH_W) '$(srcdir)/function.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-function.Tpo $(DEPDIR)/bin_macro-function.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='function.cc' object='bin_macro-function.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-function.obj `if test -f 'function.cc'; then $(CYGPATH_W) 'function.cc'; else $(CYGPATH_W) '$(srcdir)/function.cc'; fi`
+
+bin_macro-matrix.o: matrix.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-matrix.o -MD -MP -MF $(DEPDIR)/bin_macro-matrix.Tpo -c -o bin_macro-matrix.o `test -f 'matrix.cc' || echo '$(srcdir)/'`matrix.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-matrix.Tpo $(DEPDIR)/bin_macro-matrix.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='matrix.cc' object='bin_macro-matrix.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-matrix.o `test -f 'matrix.cc' || echo '$(srcdir)/'`matrix.cc
+
+bin_macro-matrix.obj: matrix.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-matrix.obj -MD -MP -MF $(DEPDIR)/bin_macro-matrix.Tpo -c -o bin_macro-matrix.obj `if test -f 'matrix.cc'; then $(CYGPATH_W) 'matrix.cc'; else $(CYGPATH_W) '$(srcdir)/matrix.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-matrix.Tpo $(DEPDIR)/bin_macro-matrix.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='matrix.cc' object='bin_macro-matrix.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-matrix.obj `if test -f 'matrix.cc'; then $(CYGPATH_W) 'matrix.cc'; else $(CYGPATH_W) '$(srcdir)/matrix.cc'; fi`
+
+bin_macro-image.o: image.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-image.o -MD -MP -MF $(DEPDIR)/bin_macro-image.Tpo -c -o bin_macro-image.o `test -f 'image.cc' || echo '$(srcdir)/'`image.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-image.Tpo $(DEPDIR)/bin_macro-image.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='image.cc' object='bin_macro-image.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-image.o `test -f 'image.cc' || echo '$(srcdir)/'`image.cc
+
+bin_macro-image.obj: image.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-image.obj -MD -MP -MF $(DEPDIR)/bin_macro-image.Tpo -c -o bin_macro-image.obj `if test -f 'image.cc'; then $(CYGPATH_W) 'image.cc'; else $(CYGPATH_W) '$(srcdir)/image.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-image.Tpo $(DEPDIR)/bin_macro-image.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='image.cc' object='bin_macro-image.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-image.obj `if test -f 'image.cc'; then $(CYGPATH_W) 'image.cc'; else $(CYGPATH_W) '$(srcdir)/image.cc'; fi`
+
+bin_macro-arith.o: arith.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-arith.o -MD -MP -MF $(DEPDIR)/bin_macro-arith.Tpo -c -o bin_macro-arith.o `test -f 'arith.cc' || echo '$(srcdir)/'`arith.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-arith.Tpo $(DEPDIR)/bin_macro-arith.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='arith.cc' object='bin_macro-arith.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-arith.o `test -f 'arith.cc' || echo '$(srcdir)/'`arith.cc
+
+bin_macro-arith.obj: arith.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-arith.obj -MD -MP -MF $(DEPDIR)/bin_macro-arith.Tpo -c -o bin_macro-arith.obj `if test -f 'arith.cc'; then $(CYGPATH_W) 'arith.cc'; else $(CYGPATH_W) '$(srcdir)/arith.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-arith.Tpo $(DEPDIR)/bin_macro-arith.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='arith.cc' object='bin_macro-arith.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-arith.obj `if test -f 'arith.cc'; then $(CYGPATH_W) 'arith.cc'; else $(CYGPATH_W) '$(srcdir)/arith.cc'; fi`
+
+bin_macro-extern.o: extern.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-extern.o -MD -MP -MF $(DEPDIR)/bin_macro-extern.Tpo -c -o bin_macro-extern.o `test -f 'extern.cc' || echo '$(srcdir)/'`extern.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-extern.Tpo $(DEPDIR)/bin_macro-extern.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='extern.cc' object='bin_macro-extern.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-extern.o `test -f 'extern.cc' || echo '$(srcdir)/'`extern.cc
+
+bin_macro-extern.obj: extern.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-extern.obj -MD -MP -MF $(DEPDIR)/bin_macro-extern.Tpo -c -o bin_macro-extern.obj `if test -f 'extern.cc'; then $(CYGPATH_W) 'extern.cc'; else $(CYGPATH_W) '$(srcdir)/extern.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-extern.Tpo $(DEPDIR)/bin_macro-extern.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='extern.cc' object='bin_macro-extern.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-extern.obj `if test -f 'extern.cc'; then $(CYGPATH_W) 'extern.cc'; else $(CYGPATH_W) '$(srcdir)/extern.cc'; fi`
+
+bin_macro-mvector.o: mvector.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mvector.o -MD -MP -MF $(DEPDIR)/bin_macro-mvector.Tpo -c -o bin_macro-mvector.o `test -f 'mvector.cc' || echo '$(srcdir)/'`mvector.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mvector.Tpo $(DEPDIR)/bin_macro-mvector.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mvector.cc' object='bin_macro-mvector.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mvector.o `test -f 'mvector.cc' || echo '$(srcdir)/'`mvector.cc
+
+bin_macro-mvector.obj: mvector.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mvector.obj -MD -MP -MF $(DEPDIR)/bin_macro-mvector.Tpo -c -o bin_macro-mvector.obj `if test -f 'mvector.cc'; then $(CYGPATH_W) 'mvector.cc'; else $(CYGPATH_W) '$(srcdir)/mvector.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mvector.Tpo $(DEPDIR)/bin_macro-mvector.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mvector.cc' object='bin_macro-mvector.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mvector.obj `if test -f 'mvector.cc'; then $(CYGPATH_W) 'mvector.cc'; else $(CYGPATH_W) '$(srcdir)/mvector.cc'; fi`
+
+bin_macro-mtable.o: mtable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mtable.o -MD -MP -MF $(DEPDIR)/bin_macro-mtable.Tpo -c -o bin_macro-mtable.o `test -f 'mtable.cc' || echo '$(srcdir)/'`mtable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mtable.Tpo $(DEPDIR)/bin_macro-mtable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mtable.cc' object='bin_macro-mtable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mtable.o `test -f 'mtable.cc' || echo '$(srcdir)/'`mtable.cc
+
+bin_macro-mtable.obj: mtable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mtable.obj -MD -MP -MF $(DEPDIR)/bin_macro-mtable.Tpo -c -o bin_macro-mtable.obj `if test -f 'mtable.cc'; then $(CYGPATH_W) 'mtable.cc'; else $(CYGPATH_W) '$(srcdir)/mtable.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mtable.Tpo $(DEPDIR)/bin_macro-mtable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mtable.cc' object='bin_macro-mtable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mtable.obj `if test -f 'mtable.cc'; then $(CYGPATH_W) 'mtable.cc'; else $(CYGPATH_W) '$(srcdir)/mtable.cc'; fi`
+
+bin_macro-library.o: library.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-library.o -MD -MP -MF $(DEPDIR)/bin_macro-library.Tpo -c -o bin_macro-library.o `test -f 'library.cc' || echo '$(srcdir)/'`library.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-library.Tpo $(DEPDIR)/bin_macro-library.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='library.cc' object='bin_macro-library.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-library.o `test -f 'library.cc' || echo '$(srcdir)/'`library.cc
+
+bin_macro-library.obj: library.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-library.obj -MD -MP -MF $(DEPDIR)/bin_macro-library.Tpo -c -o bin_macro-library.obj `if test -f 'library.cc'; then $(CYGPATH_W) 'library.cc'; else $(CYGPATH_W) '$(srcdir)/library.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-library.Tpo $(DEPDIR)/bin_macro-library.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='library.cc' object='bin_macro-library.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-library.obj `if test -f 'library.cc'; then $(CYGPATH_W) 'library.cc'; else $(CYGPATH_W) '$(srcdir)/library.cc'; fi`
+
+bin_macro-debug.o: debug.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-debug.o -MD -MP -MF $(DEPDIR)/bin_macro-debug.Tpo -c -o bin_macro-debug.o `test -f 'debug.cc' || echo '$(srcdir)/'`debug.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-debug.Tpo $(DEPDIR)/bin_macro-debug.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='debug.cc' object='bin_macro-debug.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-debug.o `test -f 'debug.cc' || echo '$(srcdir)/'`debug.cc
+
+bin_macro-debug.obj: debug.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-debug.obj -MD -MP -MF $(DEPDIR)/bin_macro-debug.Tpo -c -o bin_macro-debug.obj `if test -f 'debug.cc'; then $(CYGPATH_W) 'debug.cc'; else $(CYGPATH_W) '$(srcdir)/debug.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-debug.Tpo $(DEPDIR)/bin_macro-debug.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='debug.cc' object='bin_macro-debug.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-debug.obj `if test -f 'debug.cc'; then $(CYGPATH_W) 'debug.cc'; else $(CYGPATH_W) '$(srcdir)/debug.cc'; fi`
+
+bin_macro-bufr.o: bufr.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-bufr.o -MD -MP -MF $(DEPDIR)/bin_macro-bufr.Tpo -c -o bin_macro-bufr.o `test -f 'bufr.cc' || echo '$(srcdir)/'`bufr.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-bufr.Tpo $(DEPDIR)/bin_macro-bufr.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='bufr.cc' object='bin_macro-bufr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-bufr.o `test -f 'bufr.cc' || echo '$(srcdir)/'`bufr.cc
+
+bin_macro-bufr.obj: bufr.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-bufr.obj -MD -MP -MF $(DEPDIR)/bin_macro-bufr.Tpo -c -o bin_macro-bufr.obj `if test -f 'bufr.cc'; then $(CYGPATH_W) 'bufr.cc'; else $(CYGPATH_W) '$(srcdir)/bufr.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-bufr.Tpo $(DEPDIR)/bin_macro-bufr.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='bufr.cc' object='bin_macro-bufr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-bufr.obj `if test -f 'bufr.cc'; then $(CYGPATH_W) 'bufr.cc'; else $(CYGPATH_W) '$(srcdir)/bufr.cc'; fi`
+
+bin_macro-compute.o: compute.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-compute.o -MD -MP -MF $(DEPDIR)/bin_macro-compute.Tpo -c -o bin_macro-compute.o `test -f 'compute.cc' || echo '$(srcdir)/'`compute.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-compute.Tpo $(DEPDIR)/bin_macro-compute.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='compute.cc' object='bin_macro-compute.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-compute.o `test -f 'compute.cc' || echo '$(srcdir)/'`compute.cc
+
+bin_macro-compute.obj: compute.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-compute.obj -MD -MP -MF $(DEPDIR)/bin_macro-compute.Tpo -c -o bin_macro-compute.obj `if test -f 'compute.cc'; then $(CYGPATH_W) 'compute.cc'; else $(CYGPATH_W) '$(srcdir)/compute.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-compute.Tpo $(DEPDIR)/bin_macro-compute.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='compute.cc' object='bin_macro-compute.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-compute.obj `if test -f 'compute.cc'; then $(CYGPATH_W) 'compute.cc'; else $(CYGPATH_W) '$(srcdir)/compute.cc'; fi`
+
+bin_macro-main.o: main.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-main.o -MD -MP -MF $(DEPDIR)/bin_macro-main.Tpo -c -o bin_macro-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-main.Tpo $(DEPDIR)/bin_macro-main.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='bin_macro-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+bin_macro-main.obj: main.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-main.obj -MD -MP -MF $(DEPDIR)/bin_macro-main.Tpo -c -o bin_macro-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-main.Tpo $(DEPDIR)/bin_macro-main.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='bin_macro-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+bin_macro-vismod.o: vismod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-vismod.o -MD -MP -MF $(DEPDIR)/bin_macro-vismod.Tpo -c -o bin_macro-vismod.o `test -f 'vismod.cc' || echo '$(srcdir)/'`vismod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-vismod.Tpo $(DEPDIR)/bin_macro-vismod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='vismod.cc' object='bin_macro-vismod.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-vismod.o `test -f 'vismod.cc' || echo '$(srcdir)/'`vismod.cc
+
+bin_macro-vismod.obj: vismod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-vismod.obj -MD -MP -MF $(DEPDIR)/bin_macro-vismod.Tpo -c -o bin_macro-vismod.obj `if test -f 'vismod.cc'; then $(CYGPATH_W) 'vismod.cc'; else $(CYGPATH_W) '$(srcdir)/vismod.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-vismod.Tpo $(DEPDIR)/bin_macro-vismod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='vismod.cc' object='bin_macro-vismod.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-vismod.obj `if test -f 'vismod.cc'; then $(CYGPATH_W) 'vismod.cc'; else $(CYGPATH_W) '$(srcdir)/vismod.cc'; fi`
+
+bin_macro-vis5d.o: vis5d.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-vis5d.o -MD -MP -MF $(DEPDIR)/bin_macro-vis5d.Tpo -c -o bin_macro-vis5d.o `test -f 'vis5d.cc' || echo '$(srcdir)/'`vis5d.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-vis5d.Tpo $(DEPDIR)/bin_macro-vis5d.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='vis5d.cc' object='bin_macro-vis5d.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-vis5d.o `test -f 'vis5d.cc' || echo '$(srcdir)/'`vis5d.cc
+
+bin_macro-vis5d.obj: vis5d.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-vis5d.obj -MD -MP -MF $(DEPDIR)/bin_macro-vis5d.Tpo -c -o bin_macro-vis5d.obj `if test -f 'vis5d.cc'; then $(CYGPATH_W) 'vis5d.cc'; else $(CYGPATH_W) '$(srcdir)/vis5d.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-vis5d.Tpo $(DEPDIR)/bin_macro-vis5d.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='vis5d.cc' object='bin_macro-vis5d.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-vis5d.obj `if test -f 'vis5d.cc'; then $(CYGPATH_W) 'vis5d.cc'; else $(CYGPATH_W) '$(srcdir)/vis5d.cc'; fi`
+
+bin_macro-netcdf.o: netcdf.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-netcdf.o -MD -MP -MF $(DEPDIR)/bin_macro-netcdf.Tpo -c -o bin_macro-netcdf.o `test -f 'netcdf.cc' || echo '$(srcdir)/'`netcdf.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-netcdf.Tpo $(DEPDIR)/bin_macro-netcdf.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='netcdf.cc' object='bin_macro-netcdf.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-netcdf.o `test -f 'netcdf.cc' || echo '$(srcdir)/'`netcdf.cc
+
+bin_macro-netcdf.obj: netcdf.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-netcdf.obj -MD -MP -MF $(DEPDIR)/bin_macro-netcdf.Tpo -c -o bin_macro-netcdf.obj `if test -f 'netcdf.cc'; then $(CYGPATH_W) 'netcdf.cc'; else $(CYGPATH_W) '$(srcdir)/netcdf.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-netcdf.Tpo $(DEPDIR)/bin_macro-netcdf.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='netcdf.cc' object='bin_macro-netcdf.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-netcdf.obj `if test -f 'netcdf.cc'; then $(CYGPATH_W) 'netcdf.cc'; else $(CYGPATH_W) '$(srcdir)/netcdf.cc'; fi`
+
+bin_macro-object.o: object.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-object.o -MD -MP -MF $(DEPDIR)/bin_macro-object.Tpo -c -o bin_macro-object.o `test -f 'object.cc' || echo '$(srcdir)/'`object.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-object.Tpo $(DEPDIR)/bin_macro-object.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='object.cc' object='bin_macro-object.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-object.o `test -f 'object.cc' || echo '$(srcdir)/'`object.cc
+
+bin_macro-object.obj: object.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-object.obj -MD -MP -MF $(DEPDIR)/bin_macro-object.Tpo -c -o bin_macro-object.obj `if test -f 'object.cc'; then $(CYGPATH_W) 'object.cc'; else $(CYGPATH_W) '$(srcdir)/object.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-object.Tpo $(DEPDIR)/bin_macro-object.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='object.cc' object='bin_macro-object.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-object.obj `if test -f 'object.cc'; then $(CYGPATH_W) 'object.cc'; else $(CYGPATH_W) '$(srcdir)/object.cc'; fi`
+
+bin_macro-pngjpeg.o: pngjpeg.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-pngjpeg.o -MD -MP -MF $(DEPDIR)/bin_macro-pngjpeg.Tpo -c -o bin_macro-pngjpeg.o `test -f 'pngjpeg.cc' || echo '$(srcdir)/'`pngjpeg.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-pngjpeg.Tpo $(DEPDIR)/bin_macro-pngjpeg.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='pngjpeg.cc' object='bin_macro-pngjpeg.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-pngjpeg.o `test -f 'pngjpeg.cc' || echo '$(srcdir)/'`pngjpeg.cc
+
+bin_macro-pngjpeg.obj: pngjpeg.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-pngjpeg.obj -MD -MP -MF $(DEPDIR)/bin_macro-pngjpeg.Tpo -c -o bin_macro-pngjpeg.obj `if test -f 'pngjpeg.cc'; then $(CYGPATH_W) 'pngjpeg.cc'; else $(CYGPATH_W) '$(srcdir)/pngjpeg.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-pngjpeg.Tpo $(DEPDIR)/bin_macro-pngjpeg.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='pngjpeg.cc' object='bin_macro-pngjpeg.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-pngjpeg.obj `if test -f 'pngjpeg.cc'; then $(CYGPATH_W) 'pngjpeg.cc'; else $(CYGPATH_W) '$(srcdir)/pngjpeg.cc'; fi`
+
+bin_macro-mflextra.o: mflextra.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mflextra.o -MD -MP -MF $(DEPDIR)/bin_macro-mflextra.Tpo -c -o bin_macro-mflextra.o `test -f 'mflextra.cc' || echo '$(srcdir)/'`mflextra.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mflextra.Tpo $(DEPDIR)/bin_macro-mflextra.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mflextra.cc' object='bin_macro-mflextra.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mflextra.o `test -f 'mflextra.cc' || echo '$(srcdir)/'`mflextra.cc
+
+bin_macro-mflextra.obj: mflextra.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-mflextra.obj -MD -MP -MF $(DEPDIR)/bin_macro-mflextra.Tpo -c -o bin_macro-mflextra.obj `if test -f 'mflextra.cc'; then $(CYGPATH_W) 'mflextra.cc'; else $(CYGPATH_W) '$(srcdir)/mflextra.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-mflextra.Tpo $(DEPDIR)/bin_macro-mflextra.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mflextra.cc' object='bin_macro-mflextra.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-mflextra.obj `if test -f 'mflextra.cc'; then $(CYGPATH_W) 'mflextra.cc'; else $(CYGPATH_W) '$(srcdir)/mflextra.cc'; fi`
+
+bin_macro-codb.o: codb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-codb.o -MD -MP -MF $(DEPDIR)/bin_macro-codb.Tpo -c -o bin_macro-codb.o `test -f 'codb.cc' || echo '$(srcdir)/'`codb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-codb.Tpo $(DEPDIR)/bin_macro-codb.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='codb.cc' object='bin_macro-codb.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-codb.o `test -f 'codb.cc' || echo '$(srcdir)/'`codb.cc
+
+bin_macro-codb.obj: codb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_macro-codb.obj -MD -MP -MF $(DEPDIR)/bin_macro-codb.Tpo -c -o bin_macro-codb.obj `if test -f 'codb.cc'; then $(CYGPATH_W) 'codb.cc'; else $(CYGPATH_W) '$(srcdir)/codb.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_macro-codb.Tpo $(DEPDIR)/bin_macro-codb.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='codb.cc' object='bin_macro-codb.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_macro_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_macro-codb.obj `if test -f 'codb.cc'; then $(CYGPATH_W) 'codb.cc'; else $(CYGPATH_W) '$(srcdir)/codb.cc'; fi`
+
+.y.c:
+	$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-rm -f beauy.c
+	-rm -f macroy.c
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+macroy.c : macrol.c
+macrol.c : macrol.l
+	$(LEX) $(LFLAGS) macrol.l
+	sed -e s/yy/zz/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+macroy.c : macroy.y
+	$(YACC) $(YFLAGS) macroy.y
+	sed -e s/yy/zz/g < y.tab.c > $@
+	$(RM) y.tab.c
+
+beauy.c : beaul.c
+beaul.c : beaul.l
+	$(LEX) $(LFLAGS) beaul.l
+	sed -e s/yy/zz/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+beauy.c : beauy.y
+	$(YACC) $(YFLAGS) beauy.y
+	sed -e s/yy/zz/g < y.tab.c > $@
+	$(RM) y.tab.c
+
+./beau.h : beau.ps
+	sed -e 's/\(.*\)/\"\1\",/' < beau.ps > beau.h
+
+beautify.o : beau.ps ./beau.h
+
+# a note about cleaning: in order that the end user does not need to
+# install lex and yacc, we distribute the generated source files. We also
+# don't want these to be cleaned during a normal clean, because the end user
+# would then need to have lex and yacc installed... so we don't clean
+# these by default, but instead have a separate target, 'cleanall' which
+# remove the lex/yacc generated source.
+
+clean-all: clean
+	-rm -f macroy.c macrol.c beauy.c beaul.c beau.h
+
+bin:
+	ln -s ../../bin bin
+
+# do not distribute certain files in the tarball...
+#dist-hook:
+#	rm -f $(distdir)/macroy.c $(distdir)/macrol.c $(distdir)/beauy.c $(distdir)/beaul.c
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Macro/Unix.cc b/src/Macro/Unix.cc
new file mode 100644
index 0000000..ed664e0
--- /dev/null
+++ b/src/Macro/Unix.cc
@@ -0,0 +1,207 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+class ShellFunction : public Function {
+public:
+	ShellFunction(char *n) : Function(n) //,1,tstring)
+	{ info="Execute a shell command";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ShellFunction::Execute(int arity,Value *arg)
+{
+        int ret_code;
+	const char *p;
+	char buf[2048],shell_cmd[600];
+	buf[0] = shell_cmd[0] = 0;
+
+	for(int i = 0; i<arity;i++)
+	{
+		arg[i].GetValue(p);
+		strcat(shell_cmd,p);
+	}
+
+	strcat(shell_cmd," 2>&1");
+
+	FILE *f = popen(shell_cmd,"r");
+	if(!f) return Error("Cannot execute shell command: %s",shell_cmd);
+
+	while(fgets(buf,sizeof(buf),f))
+		cout << buf;
+
+	cout << flush;
+
+	if ( (ret_code = pclose(f)) != 0 )
+	  {
+	    marslog(LOG_INFO,"Warning : Shell command '%s' returned %d",
+		    shell_cmd,ret_code);
+	  }
+
+	return Value(ret_code);
+}
+
+
+class GetenvFunction : public Function {
+public:
+	GetenvFunction(char *n) : Function(n,1,tstring)
+	{ info = "Return the value of a shell variable";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GetenvFunction::Execute(int ,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+	p=getenv(p);
+	p=p?p:"";
+
+	if(isdate(p))
+		return Value(Date(p));
+	else if(is_number(p))
+		return Value(atof(p));
+	else return Value(p);
+}
+
+
+class Getenv2Function : public Function {
+public:
+	Getenv2Function(char *n) : Function(n,2,tstring,tnumber)
+	{ info = "Return the value of a shell variable";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value Getenv2Function::Execute(int ,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+	p=getenv(p);
+	p=p?p:"";
+
+	int convert;
+	arg[1].GetValue(convert);
+
+	if(!convert)
+		return Value(p);
+
+
+	if(isdate(p))
+		return Value(Date(p));
+	else if(is_number(p))
+		return Value(atof(p));
+	else return Value(p);
+}
+
+
+class PutenvFunction : public Function {
+public:
+	PutenvFunction(char *n) : Function(n,2,tstring,tstring)
+	{info = "Sets the value of an environment variable.";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value PutenvFunction::Execute(int ,Value *arg)
+{
+	const char *p = NULL
+	         , *q = NULL;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(q);
+	if( !p && !q )
+	  return Value((char *) NULL);
+
+	char *buf = new char[strlen(p)+strlen(q)+2];  //memory leak!!!
+	sprintf(buf, "%s=%s",p,q);
+	putenv(buf);
+	return Value(buf);
+}
+
+
+class SleepFunction : public Function {
+public:
+	SleepFunction(char *n) : Function(n,1,tnumber)
+	{ info = "Sleep (number of seconds)";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value SleepFunction::Execute(int ,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+	return Value(sleep((unsigned int)d));
+}
+
+
+class NiceFunction : public Function {
+public:
+	NiceFunction(char *n) : Function(n,1,tnumber)
+	{ info = "Nice (nice value)";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value NiceFunction::Execute(int ,Value *arg)
+{
+	int d;
+	arg[0].GetValue(d);
+	return Value(nice(d));
+}
+
+
+class PauseFunction : public Function {
+public:
+	PauseFunction(char *n) : Function(n,0) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value PauseFunction::Execute(int,Value*)
+{
+	return Value(pause());
+}
+
+
+class TempFileFunction : public Function {
+public:
+	TempFileFunction(char *n) : Function(n,0)
+            { info = "Return a unique filename for a temporary file.";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TempFileFunction::Execute(int,Value*)
+{
+   char nam[1024]; //-- std::string cannot be used: mkstemp requires char array
+
+   strcpy(nam,getenv("METVIEW_TMPDIR"));
+   strcat(nam,"/macrotmp_XXXXXX");
+
+   int ret = mkstemp(nam);                   //-- filename created + file opened
+
+   if( ret != -1 )
+      close(ret);                            //-- success, close created file
+   else
+      marslog(LOG_EROR,"tmpfile: unable to create a unique name!");
+
+   return Value(nam);
+}
+
+
+static void install(Context *c)
+{
+	c->AddFunction(new ShellFunction("shell"));
+	c->AddFunction(new SleepFunction("sleep"));
+	c->AddFunction(new NiceFunction("nice"));
+	c->AddFunction(new PauseFunction("pause"));
+	c->AddFunction(new GetenvFunction("getenv"));
+	c->AddFunction(new Getenv2Function("getenv"));
+	c->AddFunction(new PutenvFunction("putenv"));
+	c->AddFunction(new TempFileFunction("tmpfile"));
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/arith.cc b/src/Macro/arith.cc
new file mode 100644
index 0000000..fa14644
--- /dev/null
+++ b/src/Macro/arith.cc
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "arith.h"
+
+double b_add(double a,double b) {
+	return a+b;
+}
+double b_sub(double a,double b) {
+	return a-b;
+}
+double b_div(double a,double b) {
+	return a/b;
+}
+double b_mul(double a,double b) {
+	return a*b;
+}
+double b_gt(double a,double b) {
+	return a>b;
+}
+double b_lt(double a,double b) {
+	return a<b;
+}
+double b_eq(double a,double b) {
+	return a==b;
+}
+double b_ne(double a,double b) {
+	return a!=b;
+}
+double b_ge(double a,double b) {
+	return a>=b;
+}
+double b_le(double a,double b) {
+	return a<=b;
+}
+double b_and(double a,double b) {
+	return a && b;
+}
+double b_or(double a,double b) {
+	return a || b;
+}
+double b_mod(double a,double b) {
+	return long(a) % long(b);
+}
+double b_idiv(double a,double b) {
+	return long(long(a) / long(b));
+}
+double m_max(double a,double b) {
+	return a>b?a:b;
+}
+double m_min(double a,double b) {
+	return a<b?a:b;
+}
+double u_neg(double a) {
+	return -a;
+}
+double u_not(double a) {
+	return !a;
+}
+double u_ent(double a) {
+	return (long)a;
+}
+double u_sgn(double a) {
+	if(a>0.0) return 1.0;
+	if(a<0.0) return -1.0;
+	return 0;
+}
+
+
+binop BinOps[]  = {
+	{"+",  b_add ,"",},
+	{"-",  b_sub ,"",},
+	{"/",  b_div ,"",},
+	{"*",  b_mul ,"",},
+	{"^",  pow   ,"",},
+	{">" , b_gt  ,"",},
+	{"<",  b_lt  ,"",},
+	{">=", b_ge  ,"",},
+	{"<=", b_le  ,"",},
+	{"=",  b_eq  ,"",},
+	{"<>", b_ne  ,"",},
+	{"and",b_and ,"",},
+	{"or", b_or  ,"",},
+	{"mod",b_mod ,"",},
+	{"div",b_idiv,"",},
+	{0,0,0,},
+};
+
+
+mulop MulOps[] = {
+	{"max", m_max,"",},
+	{"min", m_min,"",},
+	{"sum", b_add,"",},
+	{0,0,0,},
+};
+
+
+
+
+uniop UniOps[] = {
+	{"neg",u_neg ,"",},
+	{"not",u_not ,"",},
+	{"sgn",u_sgn ,"",},
+	{"int",u_ent ,"",},
+	{"log10",log10 ,"",},
+	{"log",log ,"",},
+	{"exp",exp ,"",},
+	{"sqrt",sqrt ,"",},
+	{"sin",sin ,"",},
+	{"cos",cos ,"",},
+	{"tan",tan ,"",},
+	{"asin",asin ,"",},
+	{"acos",acos ,"",},
+	{"atan",atan ,"",},
+	{"abs",fabs ,"",},
+	{0,0,0,},
+};
diff --git a/src/Macro/beau.h b/src/Macro/beau.h
new file mode 100644
index 0000000..b827375
--- /dev/null
+++ b/src/Macro/beau.h
@@ -0,0 +1,114 @@
+"%!",
+"% Metview m,acro",
+"",
+"/bd { bind def } bind def ",
+"/d {def} bd ",
+"/df { exch d } bd ",
+"",
+"% Get page sizes",
+"",
+"/GetPageSizes { ",
+"	clippath pathbbox pop pop translate clippath pathbbox ",
+"	/page_height df ",
+"	/page_width  df ",
+"	pop pop ",
+"} bd",
+"",
+"%",
+"",
+"/L { /y y sz sub",
+"	d y ma fo add le {NP} if x y moveto } d ",
+"	",
+"/GetSizes ",
+"	{clippath pathbbox pop pop translate",
+"	clippath pathbbox /h df /w df pop pop } d ",
+"",
+"/Z ",
+"	{gsave dup stringwidth pop w ma sub",
+"	neg add neg y moveto show grestore } d /C ",
+"	{gsave dup stringwidth pop w ma sub ma",
+"	sub sub neg 2 div ma add y moveto show grestore } ",
+"	d /F {findfont sz scalefont",
+"	setfont } bd /S {show} bd /B {/Courier-Bold F} bd ",
+"	/I {/Courier-Oblique F} bd /R",
+"	{/Courier F} bd ",
+"	",
+"/lp {initclip newpath 0 0 moveto page_width 2 div 0 lineto page_width 2 div page_height",
+"	lineto 0 page_height lineto clip newpath} d ",
+"",
+"/rg {initclip newpath page_width 2 div 0 moveto page_width 0",
+"	lineto page_width page_height lineto page_width 2 div page_height lineto clip newpath} d ",
+"",
+"/SP {pc 2 mod 0 eq {rg}",
+"	{showpage rot lp} ifelse} d /rot{ GetPageSizes ls {90 ",
+"	rotate 0 page_height neg translate GetPageSizes} if} d",
+"	/NP {/pc pc 1 add d tp {SP}{showpage}ifelse IP} ",
+"	d /ts 80 string d ",
+"",
+"/IP {GetSizes /fo sz",
+"	4 add d /he h sz 4 add sub d /y he 2 add d ",
+"	/x ma d B x y moveto da S nm Z newpath",
+"	ma he moveto w ma sub he lineto stroke newpath ",
+"	ma fo moveto w ma sub fo lineto",
+"	stroke /y fo sz sub 2 sub d /x ma d B x y moveto pc ",
+"	ts cvs C newpath ma 0 moveto",
+"	w ma sub 0 lineto w ma sub h lineto 0 h lineto clip ",
+"	/y he ma sub d /x ma d x y",
+"	moveto R} d ",
+"",
+"/IJ{/tp df /ls df /sz df /ma df } d ",
+"/NF{/da df /nm df ",
+"",
+"	/pc 1 d rot tp",
+"	{lp} if IP } d /EF{showpage} bd /Y {/s df /n df 1 ",
+"	1 n {pop s S} for} bd",
+"",
+"/start_icon {  ",
+"%",
+"%   xo yo width height",
+"%  llx lly urx ury      (the BoundingBox from the PS-file",
+"%",
+"  /icon_saved save def",
+"  /showpage { } def",
+"  /ury     df   /urx     df   /lly    df   /llx     df",
+"  /height  df   /width   df   /yorigo df   /xorigo  df",
+"  %",
+"  %  Calculate the scale needed from the bouning box and",
+"  %  desired box size",
+"  %",
+"  %  box_width / ( urx - llx )  ,  box_height / ( ury - lly )",
+"  %",
+"  /sx width  urx llx sub div def",
+"  /sy height ury lly sub div def",
+"  %",
+"  %  Move the origo to the lower-left corner of the desired box",
+"  %",
+"  xorigo yorigo translate",
+"  %",
+"  %  Scale in the moved origo",
+"  %",
+"  sx sy scale",
+"  %",
+"  %  Move the origo in opposite direction for the amount",
+"  %  specified in the BB of the icons lower-left",
+"  %",
+"  llx neg lly neg translate",
+"  %",
+"  %  Include the ps file",
+"  %  and call end_icon",
+"} def",
+"",
+"/end_icon {",
+"%",
+"% Just resotre from the saves state and carry on",
+"%",
+"  icon_saved restore",
+"} def",
+"",
+"100 50 32 32 290 365 321 396",
+"start_icon",
+"",
+"% Icon here",
+"",
+"end_icon",
+"",
diff --git a/src/Macro/beau.ps b/src/Macro/beau.ps
new file mode 100644
index 0000000..01b5fc0
--- /dev/null
+++ b/src/Macro/beau.ps
@@ -0,0 +1,114 @@
+%!
+% Metview m,acro
+
+/bd { bind def } bind def 
+/d {def} bd 
+/df { exch d } bd 
+
+% Get page sizes
+
+/GetPageSizes { 
+	clippath pathbbox pop pop translate clippath pathbbox 
+	/page_height df 
+	/page_width  df 
+	pop pop 
+} bd
+
+%
+
+/L { /y y sz sub
+	d y ma fo add le {NP} if x y moveto } d 
+	
+/GetSizes 
+	{clippath pathbbox pop pop translate
+	clippath pathbbox /h df /w df pop pop } d 
+
+/Z 
+	{gsave dup stringwidth pop w ma sub
+	neg add neg y moveto show grestore } d /C 
+	{gsave dup stringwidth pop w ma sub ma
+	sub sub neg 2 div ma add y moveto show grestore } 
+	d /F {findfont sz scalefont
+	setfont } bd /S {show} bd /B {/Courier-Bold F} bd 
+	/I {/Courier-Oblique F} bd /R
+	{/Courier F} bd 
+	
+/lp {initclip newpath 0 0 moveto page_width 2 div 0 lineto page_width 2 div page_height
+	lineto 0 page_height lineto clip newpath} d 
+
+/rg {initclip newpath page_width 2 div 0 moveto page_width 0
+	lineto page_width page_height lineto page_width 2 div page_height lineto clip newpath} d 
+
+/SP {pc 2 mod 0 eq {rg}
+	{showpage rot lp} ifelse} d /rot{ GetPageSizes ls {90 
+	rotate 0 page_height neg translate GetPageSizes} if} d
+	/NP {/pc pc 1 add d tp {SP}{showpage}ifelse IP} 
+	d /ts 80 string d 
+
+/IP {GetSizes /fo sz
+	4 add d /he h sz 4 add sub d /y he 2 add d 
+	/x ma d B x y moveto da S nm Z newpath
+	ma he moveto w ma sub he lineto stroke newpath 
+	ma fo moveto w ma sub fo lineto
+	stroke /y fo sz sub 2 sub d /x ma d B x y moveto pc 
+	ts cvs C newpath ma 0 moveto
+	w ma sub 0 lineto w ma sub h lineto 0 h lineto clip 
+	/y he ma sub d /x ma d x y
+	moveto R} d 
+
+/IJ{/tp df /ls df /sz df /ma df } d 
+/NF{/da df /nm df 
+
+	/pc 1 d rot tp
+	{lp} if IP } d /EF{showpage} bd /Y {/s df /n df 1 
+	1 n {pop s S} for} bd
+
+/start_icon {  
+%
+%   xo yo width height
+%  llx lly urx ury      (the BoundingBox from the PS-file
+%
+  /icon_saved save def
+  /showpage { } def
+  /ury     df   /urx     df   /lly    df   /llx     df
+  /height  df   /width   df   /yorigo df   /xorigo  df
+  %
+  %  Calculate the scale needed from the bouning box and
+  %  desired box size
+  %
+  %  box_width / ( urx - llx )  ,  box_height / ( ury - lly )
+  %
+  /sx width  urx llx sub div def
+  /sy height ury lly sub div def
+  %
+  %  Move the origo to the lower-left corner of the desired box
+  %
+  xorigo yorigo translate
+  %
+  %  Scale in the moved origo
+  %
+  sx sy scale
+  %
+  %  Move the origo in opposite direction for the amount
+  %  specified in the BB of the icons lower-left
+  %
+  llx neg lly neg translate
+  %
+  %  Include the ps file
+  %  and call end_icon
+} def
+
+/end_icon {
+%
+% Just resotre from the saves state and carry on
+%
+  icon_saved restore
+} def
+
+100 50 32 32 290 365 321 396
+start_icon
+
+% Icon here
+
+end_icon
+
diff --git a/src/Macro/beaul.c b/src/Macro/beaul.c
new file mode 100644
index 0000000..e317369
--- /dev/null
+++ b/src/Macro/beaul.c
@@ -0,0 +1,2295 @@
+
+#line 3 "lex.zz.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 33
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define zzconst const
+#else
+#define zzconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (zz_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((zz_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE zzrestart(zzin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(zz_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct zz_buffer_state *YY_BUFFER_STATE;
+#endif
+
+extern int zzleng;
+
+extern FILE *zzin, *zzout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    /* Note: We specifically omit the test for zz_rule_can_match_eol because it requires
+     *       access to the local variable zz_act. Since zzless() is a macro, it would break
+     *       existing scanners that call zzless() from OUTSIDE zzlex. 
+     *       One obvious solution it to make zz_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-zzlineno scanner, because zz_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int zzl;\
+                for ( zzl = n; zzl < zzleng; ++zzl )\
+                    if ( zztext[zzl] == '\n' )\
+                        --zzlineno;\
+            }while(0)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define zzless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up zztext. */ \
+        int zzless_macro_arg = (n); \
+        YY_LESS_LINENO(zzless_macro_arg);\
+		*zz_cp = (zz_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(zz_c_buf_p) = zz_cp = zz_bp + zzless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up zztext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) zzunput( c, (zztext_ptr)  )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef unsigned int zz_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct zz_buffer_state
+	{
+	FILE *zz_input_file;
+
+	char *zz_ch_buf;		/* input buffer */
+	char *zz_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	zz_size_t zz_buf_size;
+
+	/* Number of characters read into zz_ch_buf, not including EOB
+	 * characters.
+	 */
+	int zz_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int zz_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int zz_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int zz_at_bol;
+
+    int zz_bs_lineno; /**< The line count. */
+    int zz_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int zz_fill_buffer;
+
+	int zz_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via zzrestart()), so that the user can continue scanning by
+	 * just pointing zzin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t zz_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t zz_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * zz_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (zz_buffer_stack) \
+                          ? (zz_buffer_stack)[(zz_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (zz_buffer_stack)[(zz_buffer_stack_top)]
+
+/* zz_hold_char holds the character lost when zztext is formed. */
+static char zz_hold_char;
+static int zz_n_chars;		/* number of characters read into zz_ch_buf */
+int zzleng;
+
+/* Points to current character in buffer. */
+static char *zz_c_buf_p = (char *) 0;
+static int zz_init = 0;		/* whether we need to initialize */
+static int zz_start = 0;	/* start state number */
+
+/* Flag which is used to allow zzwrap()'s to do buffer switches
+ * instead of setting up a fresh zzin.  A bit of a hack ...
+ */
+static int zz_did_buffer_switch_on_eof;
+
+void zzrestart (FILE *input_file  );
+void zz_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE zz_create_buffer (FILE *file,int size  );
+void zz_delete_buffer (YY_BUFFER_STATE b  );
+void zz_flush_buffer (YY_BUFFER_STATE b  );
+void zzpush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void zzpop_buffer_state (void );
+
+static void zzensure_buffer_stack (void );
+static void zz_load_buffer_state (void );
+static void zz_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER zz_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE zz_scan_buffer (char *base,zz_size_t size  );
+YY_BUFFER_STATE zz_scan_string (zzconst char *zz_str  );
+YY_BUFFER_STATE zz_scan_bytes (zzconst char *bytes,int len  );
+
+void *zzalloc (zz_size_t  );
+void *zzrealloc (void *,zz_size_t  );
+void zzfree (void *  );
+
+#define zz_new_buffer zz_create_buffer
+
+#define zz_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        zzensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            zz_create_buffer(zzin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->zz_is_interactive = is_interactive; \
+	}
+
+#define zz_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        zzensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            zz_create_buffer(zzin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->zz_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->zz_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *zzin = (FILE *) 0, *zzout = (FILE *) 0;
+
+typedef int zz_state_type;
+
+#define YY_FLEX_LEX_COMPAT
+extern int zzlineno;
+
+int zzlineno = 1;
+
+extern char zztext[];
+
+static zz_state_type zz_get_previous_state (void );
+static zz_state_type zz_try_NUL_trans (zz_state_type current_state  );
+static int zz_get_next_buffer (void );
+static void zz_fatal_error (zzconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up zztext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(zztext_ptr) = zz_bp; \
+	zzleng = (size_t) (zz_cp - zz_bp); \
+	(zz_hold_char) = *zz_cp; \
+	*zz_cp = '\0'; \
+	if ( zzleng + (zz_more_offset) >= YYLMAX ) \
+		YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
+	zz_flex_strncpy( &zztext[(zz_more_offset)], (zztext_ptr), zzleng + 1 ); \
+	zzleng += (zz_more_offset); \
+	(zz_prev_more_offset) = (zz_more_offset); \
+	(zz_more_offset) = 0; \
+	(zz_c_buf_p) = zz_cp;
+
+#define YY_NUM_RULES 55
+#define YY_END_OF_BUFFER 56
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct zz_trans_info
+	{
+	flex_int32_t zz_verify;
+	flex_int32_t zz_nxt;
+	};
+static zzconst flex_int16_t zz_acclist[248] =
+    {   0,
+       52,   51,   52,   56,   54,   55,   52,   54,   55,   53,
+       55,   45,   54,   55,   44,   54,   55,   54,   55,   54,
+       55,   50,   54,   55,   54,   55,   54,   55,   48,   54,
+       55,   48,   54,   55,   48,   54,   55,   48,   54,   55,
+       48,   54,   55,   48,   54,   55,   48,   54,   55,   48,
+       54,   55,   48,   54,   55,   48,   54,   55,   48,   54,
+       55,   48,   54,   55,   48,   54,   55,   48,   54,   55,
+       48,   54,   55,   48,   54,   55,   51,   52,   54,   55,
+        3,   55,    2,    3,   55,    4,   55,    3,   55,   52,
+       44,   43,   42,   38,   50,   50,   41,   39,   40,   48,
+
+       48,   48,   20,   48,   48,   16,   48,   48,   48,   48,
+       48,   48,   48,    5,   48,   48,   21,   48,   48,   48,
+       48,   48,   22,   48,   17,   48,   10,   48,   48,   48,
+       48,   48,   48,   19,   48,   48,   48,   51,   52,    2,
+       50,   50,   49,    8,   48,   48,   48,   13,   48,   48,
+       48,   18,   48,   48,   48,   48,   48,   48,   48,   33,
+       48,    9,   48,   48,   48,   48,   48,   48,   48,   48,
+       48,   48,   48,   23,   48,    7,   48,   48,   48,   48,
+       48,   48,   48,   48,   27,   48,   48,   48,   48,   48,
+       32,   48,   31,   48,    6,   48,   48,   28,   48,   48,
+
+       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
+       48,   26,   48,   14,   48,   36,   48,   30,   48,   48,
+       15,   48,   35,   48,   48,   48,   34,   48,   48,   25,
+       48,   12,   48,   48,   29,   48,   37,   48,   11,   48,
+       48,   24,   48,    1,    1,   47,   46
+    } ;
+
+static zzconst flex_int16_t zz_accept[200] =
+    {   0,
+        1,    2,    4,    4,    4,    5,    7,   10,   12,   15,
+       18,   20,   22,   25,   27,   29,   32,   35,   38,   41,
+       44,   47,   50,   53,   56,   59,   62,   65,   68,   71,
+       74,   77,   81,   83,   86,   88,   90,   91,   92,   93,
+       94,   95,   96,   97,   97,   98,   99,  100,  101,  102,
+      103,  105,  106,  108,  109,  110,  111,  112,  113,  114,
+      116,  117,  119,  120,  121,  122,  123,  125,  127,  129,
+      130,  131,  132,  133,  134,  136,  137,  138,  140,  141,
+      141,  142,  142,  143,  143,  143,  144,  146,  147,  148,
+      150,  151,  152,  154,  155,  156,  157,  158,  159,  160,
+
+      162,  164,  165,  166,  167,  168,  169,  170,  171,  172,
+      173,  174,  174,  174,  174,  176,  178,  179,  180,  181,
+      182,  183,  184,  185,  187,  188,  189,  190,  191,  193,
+      195,  197,  198,  200,  201,  201,  201,  201,  202,  203,
+      204,  205,  206,  207,  208,  209,  210,  211,  212,  214,
+      216,  216,  216,  216,  218,  220,  221,  223,  225,  226,
+      227,  229,  230,  232,  234,  234,  234,  234,  235,  237,
+      237,  238,  239,  239,  239,  239,  241,  242,  242,  242,
+      242,  244,  244,  244,  244,  245,  245,  245,  246,  246,
+      246,  246,  247,  247,  247,  247,  247,  248,  248
+
+    } ;
+
+static zzconst flex_int32_t zz_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    4,    5,    1,    1,    1,    6,    1,
+        1,    7,    8,    1,    9,   10,    1,   11,   11,   11,
+       11,   11,   11,   11,   11,   11,   11,   12,    1,   13,
+       14,   15,    1,    1,   16,   16,   16,   16,   17,   16,
+       16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
+       16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
+        1,    1,    1,    1,   16,    1,   18,   19,   20,   21,
+
+       22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
+       32,   33,   16,   34,   35,   36,   37,   16,   38,   39,
+       40,   16,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static zzconst flex_int32_t zz_meta[41] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        2,    1,    1,    1,    1,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2
+    } ;
+
+static zzconst flex_int16_t zz_base[203] =
+    {   0,
+        0,  357,   39,   41,  358,  360,  355,  360,  360,  353,
+      348,  339,   35,   33,  339,  341,   38,   39,   40,   42,
+       44,   45,   43,   55,   48,   65,   70,   49,   77,   53,
+       83,  349,  360,  348,  360,  318,  346,  344,  360,  360,
+      360,  100,  103,   59,  360,  360,  360,    0,  335,   79,
+      334,   81,  333,   92,  107,   96,   85,  110,   94,  332,
+       54,  113,  112,  119,  120,  123,  331,  330,  329,  124,
+      125,  127,  126,  129,  328,  128,  141,  336,  335,  315,
+      143,  324,  158,  323,  162,  322,  321,  135,  155,  320,
+      142,  161,  319,  165,  167,  168,  170,  171,  173,  318,
+
+      317,  176,  179,  180,  177,  181,  178,  182,  184,  185,
+      183,  325,  315,  314,  313,  312,  192,  193,  194,  197,
+      200,  206,  207,  311,  208,  210,  211,  212,  310,  309,
+      308,  213,  307,  209,  223,  308,  305,  221,  222,  224,
+      225,  226,  230,  234,  228,  229,  236,  237,  304,  303,
+      282,  301,  300,  299,  298,  241,  297,  296,  244,  258,
+      295,  248,  294,  293,  274,  291,  289,  247,  289,  268,
+      360,  252,  273,  287,  286,  285,  254,  264,  283,  282,
+      281,  264,  274,  272,  281,  271,  270,  278,  270,  266,
+      264,  360,  148,  138,  134,  132,  360,  360,  287,  289,
+
+       96,   60
+    } ;
+
+static zzconst flex_int16_t zz_def[203] =
+    {   0,
+      198,    1,  199,  199,  198,  198,  198,  198,  198,  200,
+      198,  198,  198,  198,  198,  201,  201,  201,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+      201,  198,  198,  198,  198,  198,  198,  200,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  202,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  201,  201,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+      201,  198,  198,  198,  201,  201,  201,  201,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+      201,  201,  201,  201,  198,  198,  198,  201,  201,  201,
+      201,  201,  201,  201,  201,  201,  201,  201,  201,  201,
+      198,  198,  198,  201,  201,  201,  201,  201,  201,  201,
+      201,  201,  201,  201,  198,  198,  198,  201,  201,  198,
+      198,  201,  198,  198,  198,  201,  201,  198,  198,  198,
+      201,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,    0,  198,  198,
+
+      198,  198
+    } ;
+
+static zzconst flex_int16_t zz_nxt[401] =
+    {   0,
+        6,    7,    8,    9,   10,    9,   11,    6,   12,    6,
+       13,    6,   14,    6,   15,   16,   16,   17,   18,   19,
+       20,   21,   22,   23,   16,   24,   16,   16,   25,   16,
+       26,   27,   16,   28,   16,   29,   30,   31,   16,   16,
+       34,   35,   34,   35,   42,   43,   45,   46,   48,   48,
+       48,   44,   48,   48,   48,   48,   44,   52,   48,   48,
+       36,   48,   36,   48,   48,   48,   85,   85,   50,   86,
+       71,   59,   54,   53,   55,   48,   57,   60,   51,   63,
+       48,   58,   56,   76,   61,   62,   96,   48,   66,   48,
+       64,   48,   67,   48,   72,   48,   65,   49,   73,   87,
+
+       68,   74,   48,   69,   48,   70,   48,   77,   75,   42,
+       81,   82,   42,   83,   84,   88,   44,   48,   93,   44,
+       48,   44,   48,   48,   44,   95,   89,   90,   91,   48,
+       48,   92,   97,   48,   48,   48,   48,   48,   48,   48,
+       94,   98,  197,   99,  196,   48,  195,  100,  103,  102,
+      108,   48,   48,   81,  107,  101,  115,  104,  194,   44,
+      105,  106,  110,  109,   44,   48,  111,   42,   83,   85,
+       85,   48,   86,  117,   44,   48,  116,   48,   48,   44,
+       48,   48,  118,   48,  119,  120,   48,   48,   48,   48,
+       48,   48,   48,   48,   48,   48,  123,  125,  122,  121,
+
+      126,  127,   48,   48,   48,  124,  130,   48,  129,  132,
+       48,  134,  131,  128,  141,  133,   48,   48,   48,   48,
+       48,   48,   48,   48,  135,  138,  139,  145,  147,  140,
+      150,   48,   48,  142,   48,   48,   48,  144,   48,   48,
+       48,  149,  143,  146,   48,  148,   48,   48,  151,  156,
+      159,   48,  155,  157,   48,  160,  154,   48,   48,  170,
+      171,  158,   48,  161,   48,  169,  162,  164,   48,  170,
+      171,  163,  168,  172,  193,  181,  192,  176,  191,  188,
+      190,  189,  188,  187,  186,  185,  177,   33,   33,   38,
+       38,   48,  184,  183,  182,   48,  180,  179,  178,   48,
+
+      175,  174,  173,   48,   48,   48,   48,   48,   48,   48,
+      167,  166,  165,   48,   48,  153,  152,   48,   48,   48,
+       48,   48,   48,   48,  137,  136,  135,   48,   48,   48,
+       48,   48,   86,  114,  113,  112,   79,   78,   48,   48,
+       48,   48,   48,   48,   48,   48,   39,   37,   80,   79,
+       78,   48,   47,   41,   40,   39,   37,  198,   32,    5,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198
+
+    } ;
+
+static zzconst flex_int16_t zz_chk[401] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        3,    3,    4,    4,   13,   13,   14,   14,   17,   18,
+       19,   13,   20,   23,   21,   22,   13,   19,   25,   28,
+        3,  202,    4,   30,   61,   24,   44,   44,   17,   44,
+       28,   23,   21,   20,   21,   26,   22,   24,   18,   25,
+       27,   22,   21,   30,   24,   24,   61,   29,   27,   50,
+       26,   52,   27,   31,   29,   57,   26,  201,   29,   50,
+
+       27,   29,   54,   27,   59,   27,   56,   31,   29,   42,
+       42,   43,   43,   43,   43,   52,   42,   55,   57,   43,
+       58,   42,   63,   62,   43,   59,   54,   55,   56,   64,
+       65,   56,   62,   66,   70,   71,   73,   72,   76,   74,
+       58,   62,  196,   63,  195,   88,  194,   64,   70,   66,
+       74,   77,   91,   81,   73,   65,   88,   71,  193,   81,
+       71,   72,   77,   76,   81,   89,   77,   83,   83,   85,
+       85,   92,   85,   91,   83,   94,   89,   95,   96,   83,
+       97,   98,   92,   99,   94,   95,  102,  105,  107,  103,
+      104,  106,  108,  111,  109,  110,   98,  102,   97,   96,
+
+      103,  104,  117,  118,  119,   99,  107,  120,  106,  109,
+      121,  111,  108,  105,  120,  110,  122,  123,  125,  134,
+      126,  127,  128,  132,  135,  117,  118,  125,  127,  119,
+      134,  138,  139,  121,  140,  141,  142,  123,  145,  146,
+      143,  132,  122,  126,  144,  128,  147,  148,  135,  140,
+      143,  156,  139,  141,  159,  144,  138,  168,  162,  160,
+      160,  142,  172,  145,  177,  159,  146,  148,  160,  170,
+      170,  147,  156,  162,  191,  177,  190,  168,  189,  188,
+      187,  186,  185,  184,  183,  182,  172,  199,  199,  200,
+      200,  181,  180,  179,  178,  176,  175,  174,  173,  169,
+
+      167,  166,  165,  164,  163,  161,  158,  157,  155,  154,
+      153,  152,  151,  150,  149,  137,  136,  133,  131,  130,
+      129,  124,  116,  115,  114,  113,  112,  101,  100,   93,
+       90,   87,   86,   84,   82,   80,   79,   78,   75,   69,
+       68,   67,   60,   53,   51,   49,   38,   37,   36,   34,
+       32,   16,   15,   12,   11,   10,    7,    5,    2,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  198,  198,  198,  198,  198
+
+    } ;
+
+/* Table of booleans, true if rule could match eol. */
+static zzconst flex_int32_t zz_rule_can_match_eol[56] =
+    {   0,
+0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
+    0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,     };
+
+extern int zz_flex_debug;
+int zz_flex_debug = 0;
+
+static zz_state_type *zz_state_buf=0, *zz_state_ptr=0;
+static char *zz_full_match;
+static int zz_lp;
+#define REJECT \
+{ \
+*zz_cp = (zz_hold_char); /* undo effects of setting up zztext */ \
+zz_cp = (zz_full_match); /* restore poss. backed-over text */ \
+++(zz_lp); \
+goto find_rule; \
+}
+
+static int zz_more_offset = 0;
+static int zz_prev_more_offset = 0;
+#define zzmore() ((zz_more_offset) = zz_flex_strlen( zztext ))
+#define YY_NEED_STRLEN
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET \
+	{ \
+	(zz_more_offset) = (zz_prev_more_offset); \
+	zzleng -= (zz_more_offset); \
+	}
+#ifndef YYLMAX
+#define YYLMAX 8192
+#endif
+
+char zztext[YYLMAX];
+char *zztext_ptr;
+#line 1 "beaul.l"
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+#line 11 "beaul.l"
+
+#include <setjmp.h>
+#include <stdarg.h>
+static jmp_buf env;
+#define exit(a)    jumpexit(a)
+#define fprintf    jumpprtf
+
+static void jumpexit(int n)
+{
+	longjmp(env,1);
+}
+
+static void jumpprtf(FILE *f,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	int len;
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	len = strlen(buf);
+	if(len && buf[len-1] == '\n')
+		buf[len-1] = 0;
+
+	zzerror(buf);
+}
+
+#define _k(x) (keyword(zztext),(x))
+#define _w(x) (plainword(zztext),(x))
+
+static void kword(char *p)
+{
+    char buf[10];
+    int i = 0;
+
+    while(*p)
+    {
+        switch(*p)
+        {
+        case ' ':
+        case '\t':
+            buf[i] = 0;
+            if(i) keyword(buf);
+            buf[0] = *p;
+            buf[1] = 0;
+            space(buf);
+            i = 0;
+            break;
+
+        case '\n':
+            buf[i] = 0;
+            if(i) keyword(buf);
+            cr(buf);
+            i = 0;
+            break;
+
+        default:
+            buf[i++] = *p;
+            break;
+        }
+        p++;
+    }
+    buf[i] = 0;
+    keyword(buf);
+}
+
+#line 756 "lex.zz.c"
+
+#define INITIAL 0
+#define SOURCE 1
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int zz_init_globals (void );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int zzwrap (void );
+#else
+extern int zzwrap (void );
+#endif
+#endif
+
+    static void zzunput (int c,char *buf_ptr  );
+    
+#ifndef zztext_ptr
+static void zz_flex_strncpy (char *,zzconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int zz_flex_strlen (zzconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int zzinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( zztext, zzleng, 1, zzout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_is_interactive ) \
+		{ \
+		int c = '*'; \
+		size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( zzin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( zzin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, zzin))==0 && ferror(zzin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(zzin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "zzterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef zzterminate
+#define zzterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) zz_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int zzlex (void);
+
+#define YY_DECL int zzlex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after zztext and zzleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	if ( zzleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->zz_at_bol = \
+				(zztext[zzleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register zz_state_type zz_current_state;
+	register char *zz_cp, *zz_bp;
+	register int zz_act;
+    
+#line 96 "beaul.l"
+
+
+#line 916 "lex.zz.c"
+
+	if ( !(zz_init) )
+		{
+		(zz_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! (zz_state_buf) )
+            (zz_state_buf) = (zz_state_type *)zzalloc(YY_STATE_BUF_SIZE  );
+
+		if ( ! (zz_start) )
+			(zz_start) = 1;	/* first start state */
+
+		if ( ! zzin )
+			zzin = stdin;
+
+		if ( ! zzout )
+			zzout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			zzensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				zz_create_buffer(zzin,YY_BUF_SIZE );
+		}
+
+		zz_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		zz_cp = (zz_c_buf_p);
+
+		/* Support of zztext. */
+		*zz_cp = (zz_hold_char);
+
+		/* zz_bp points to the position in zz_ch_buf of the start of
+		 * the current run.
+		 */
+		zz_bp = zz_cp;
+
+		zz_current_state = (zz_start);
+		zz_current_state += YY_AT_BOL();
+
+		(zz_state_ptr) = (zz_state_buf);
+		*(zz_state_ptr)++ = zz_current_state;
+
+zz_match:
+		do
+			{
+			register YY_CHAR zz_c = zz_ec[YY_SC_TO_UI(*zz_cp)];
+			while ( zz_chk[zz_base[zz_current_state] + zz_c] != zz_current_state )
+				{
+				zz_current_state = (int) zz_def[zz_current_state];
+				if ( zz_current_state >= 199 )
+					zz_c = zz_meta[(unsigned int) zz_c];
+				}
+			zz_current_state = zz_nxt[zz_base[zz_current_state] + (unsigned int) zz_c];
+			*(zz_state_ptr)++ = zz_current_state;
+			++zz_cp;
+			}
+		while ( zz_base[zz_current_state] != 360 );
+
+zz_find_action:
+		zz_current_state = *--(zz_state_ptr);
+		(zz_lp) = zz_accept[zz_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( (zz_lp) && (zz_lp) < zz_accept[zz_current_state + 1] )
+				{
+				zz_act = zz_acclist[(zz_lp)];
+					{
+					(zz_full_match) = zz_cp;
+					break;
+					}
+				}
+			--zz_cp;
+			zz_current_state = *--(zz_state_ptr);
+			(zz_lp) = zz_accept[zz_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+		if ( zz_act != YY_END_OF_BUFFER && zz_rule_can_match_eol[zz_act] )
+			{
+			int zzl;
+			for ( zzl = (zz_prev_more_offset); zzl < zzleng; ++zzl )
+				if ( zztext[zzl] == '\n' )
+					   
+    zzlineno++;
+;
+			}
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( zz_act )
+	{ /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+#line 98 "beaul.l"
+{ BEGIN INITIAL; kword(zztext); return ENDINLINE;}
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 99 "beaul.l"
+space(zztext);
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 100 "beaul.l"
+inlineword(zztext);
+	YY_BREAK
+case 4:
+/* rule 4 can match eol */
+YY_RULE_SETUP
+#line 101 "beaul.l"
+cr(zztext);
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 103 "beaul.l"
+return _k(IF);
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 104 "beaul.l"
+return _k(THEN);
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 105 "beaul.l"
+return _k(ELSE);
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 106 "beaul.l"
+return _k(AND);
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 107 "beaul.l"
+return _k(NOT);
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 108 "beaul.l"
+return _k(OR);
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 109 "beaul.l"
+return _k(FUNCTION);
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 110 "beaul.l"
+return _k(RETURN);
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 111 "beaul.l"
+return _k(END);
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 112 "beaul.l"
+return _k(WHILE);
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 113 "beaul.l"
+return _k(GLOBAL);
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 114 "beaul.l"
+return _k(DO);
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 115 "beaul.l"
+return _k(ON);
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 116 "beaul.l"
+return _k(FOR);
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 117 "beaul.l"
+return _k(TO);
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 118 "beaul.l"
+return _k(BY);
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 119 "beaul.l"
+return _k(IN);
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 120 "beaul.l"
+return _k(OF);
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 121 "beaul.l"
+return _k(CASE);
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 122 "beaul.l"
+return _k(OTHERWISE);
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 123 "beaul.l"
+return _k(REPEAT);
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 124 "beaul.l"
+return _k(UNTIL);
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 125 "beaul.l"
+return _k(LOOP);
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 126 "beaul.l"
+return _k(WHEN);
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 127 "beaul.l"
+return _k(INCLUDE);
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 128 "beaul.l"
+return _k(EXTERN);
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 129 "beaul.l"
+return _k(TELL);
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 130 "beaul.l"
+return _k(TASK);
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 131 "beaul.l"
+return _k(NIL);
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 132 "beaul.l"
+return _k(OBJECT);
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 133 "beaul.l"
+return _k(IMPORT);
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 134 "beaul.l"
+return _k(EXPORT);
+	YY_BREAK
+case 37:
+/* rule 37 can match eol */
+YY_RULE_SETUP
+#line 135 "beaul.l"
+{ BEGIN SOURCE; kword(zztext);return INLINE;}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 138 "beaul.l"
+return _w(ARROW);
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 139 "beaul.l"
+return _w(NE);
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 140 "beaul.l"
+return _w(GE);
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 141 "beaul.l"
+return _w(LE);
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 142 "beaul.l"
+return _w('^');
+	YY_BREAK
+case 43:
+/* rule 43 can match eol */
+YY_RULE_SETUP
+#line 144 "beaul.l"
+{ zztext[zzleng-1] = 0; comment(zztext);}
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 145 "beaul.l"
+comment(zztext);
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 147 "beaul.l"
+{ 
+					   int c,q = zztext[0]; 
+
+					   zzleng = 1;
+
+					   while((c = input()) && c != q && c != '\n') 
+					   {
+						   if(c == '\\') {
+								zztext[zzleng++] = c;
+								zztext[zzleng++] = input();
+							} else zztext[zzleng++] =  c;
+					   }
+
+					   zztext[zzleng++] = c;
+					   zztext[zzleng++] = 0;
+					   return _w(STRING);
+					 }
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 165 "beaul.l"
+return _w(DATE);
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 166 "beaul.l"
+return _w(TIME);
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 167 "beaul.l"
+return _w(WORD); 
+	YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 168 "beaul.l"
+return _w(NUMBER); 
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 169 "beaul.l"
+return _w(NUMBER); 
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 171 "beaul.l"
+leading(zztext);
+	YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 172 "beaul.l"
+space(zztext);
+	YY_BREAK
+case 53:
+/* rule 53 can match eol */
+YY_RULE_SETUP
+#line 173 "beaul.l"
+cr(zztext);
+	YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 174 "beaul.l"
+return _w(*zztext); 
+	YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 175 "beaul.l"
+ECHO;
+	YY_BREAK
+#line 1312 "lex.zz.c"
+			case YY_STATE_EOF(INITIAL):
+			case YY_STATE_EOF(SOURCE):
+				zzterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int zz_amount_of_matched_text = (int) (zz_cp - (zztext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*zz_cp = (zz_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->zz_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed zzin at a new source and called
+			 * zzlex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(zz_n_chars) = YY_CURRENT_BUFFER_LVALUE->zz_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->zz_input_file = zzin;
+			YY_CURRENT_BUFFER_LVALUE->zz_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for zz_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since zz_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (zz_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)] )
+			{ /* This was really a NUL. */
+			zz_state_type zz_next_state;
+
+			(zz_c_buf_p) = (zztext_ptr) + zz_amount_of_matched_text;
+
+			zz_current_state = zz_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * zz_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			zz_next_state = zz_try_NUL_trans( zz_current_state );
+
+			zz_bp = (zztext_ptr) + YY_MORE_ADJ;
+
+			if ( zz_next_state )
+				{
+				/* Consume the NUL. */
+				zz_cp = ++(zz_c_buf_p);
+				zz_current_state = zz_next_state;
+				goto zz_match;
+				}
+
+			else
+				{
+				zz_cp = (zz_c_buf_p);
+				goto zz_find_action;
+				}
+			}
+
+		else switch ( zz_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(zz_did_buffer_switch_on_eof) = 0;
+
+				if ( zzwrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * zz_get_next_buffer() to have set up
+					 * zztext, we can now set up
+					 * zz_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(zz_c_buf_p) = (zztext_ptr) + YY_MORE_ADJ;
+
+					zz_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (zz_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(zz_c_buf_p) =
+					(zztext_ptr) + zz_amount_of_matched_text;
+
+				zz_current_state = zz_get_previous_state(  );
+
+				zz_cp = (zz_c_buf_p);
+				zz_bp = (zztext_ptr) + YY_MORE_ADJ;
+				goto zz_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(zz_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)];
+
+				zz_current_state = zz_get_previous_state(  );
+
+				zz_cp = (zz_c_buf_p);
+				zz_bp = (zztext_ptr) + YY_MORE_ADJ;
+				goto zz_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of zzlex */
+
+/* zz_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int zz_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->zz_ch_buf;
+	register char *source = (zztext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (zz_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (zz_c_buf_p) - (zztext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((zz_c_buf_p) - (zztext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars) = 0;
+
+	else
+		{
+			int num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->zz_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[number_to_move]),
+			(zz_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars);
+		}
+
+	if ( (zz_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			zzrestart(zzin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->zz_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	(zz_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(zztext_ptr) = &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[0];
+
+	return ret_val;
+}
+
+/* zz_get_previous_state - get the state just before the EOB char was reached */
+
+    static zz_state_type zz_get_previous_state (void)
+{
+	register zz_state_type zz_current_state;
+	register char *zz_cp;
+    
+	zz_current_state = (zz_start);
+	zz_current_state += YY_AT_BOL();
+
+	(zz_state_ptr) = (zz_state_buf);
+	*(zz_state_ptr)++ = zz_current_state;
+
+	for ( zz_cp = (zztext_ptr) + YY_MORE_ADJ; zz_cp < (zz_c_buf_p); ++zz_cp )
+		{
+		register YY_CHAR zz_c = (*zz_cp ? zz_ec[YY_SC_TO_UI(*zz_cp)] : 1);
+		while ( zz_chk[zz_base[zz_current_state] + zz_c] != zz_current_state )
+			{
+			zz_current_state = (int) zz_def[zz_current_state];
+			if ( zz_current_state >= 199 )
+				zz_c = zz_meta[(unsigned int) zz_c];
+			}
+		zz_current_state = zz_nxt[zz_base[zz_current_state] + (unsigned int) zz_c];
+		*(zz_state_ptr)++ = zz_current_state;
+		}
+
+	return zz_current_state;
+}
+
+/* zz_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = zz_try_NUL_trans( current_state );
+ */
+    static zz_state_type zz_try_NUL_trans  (zz_state_type zz_current_state )
+{
+	register int zz_is_jam;
+    
+	register YY_CHAR zz_c = 1;
+	while ( zz_chk[zz_base[zz_current_state] + zz_c] != zz_current_state )
+		{
+		zz_current_state = (int) zz_def[zz_current_state];
+		if ( zz_current_state >= 199 )
+			zz_c = zz_meta[(unsigned int) zz_c];
+		}
+	zz_current_state = zz_nxt[zz_base[zz_current_state] + (unsigned int) zz_c];
+	zz_is_jam = (zz_current_state == 198);
+	if ( ! zz_is_jam )
+		*(zz_state_ptr)++ = zz_current_state;
+
+	return zz_is_jam ? 0 : zz_current_state;
+}
+
+    static void zzunput (int c, register char * zz_bp )
+{
+	register char *zz_cp;
+    
+    zz_cp = (zz_c_buf_p);
+
+	/* undo effects of setting up zztext */
+	*zz_cp = (zz_hold_char);
+
+	if ( zz_cp < YY_CURRENT_BUFFER_LVALUE->zz_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = (zz_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->zz_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->zz_ch_buf )
+			*--dest = *--source;
+
+		zz_cp += (int) (dest - source);
+		zz_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars =
+			(zz_n_chars) = YY_CURRENT_BUFFER_LVALUE->zz_buf_size;
+
+		if ( zz_cp < YY_CURRENT_BUFFER_LVALUE->zz_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--zz_cp = (char) c;
+
+    if ( c == '\n' ){
+        --zzlineno;
+    }
+
+	(zztext_ptr) = zz_bp;
+	(zz_hold_char) = *zz_cp;
+	(zz_c_buf_p) = zz_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int zzinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(zz_c_buf_p) = (zz_hold_char);
+
+	if ( *(zz_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* zz_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (zz_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)] )
+			/* This was really a NUL. */
+			*(zz_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			int offset = (zz_c_buf_p) - (zztext_ptr);
+			++(zz_c_buf_p);
+
+			switch ( zz_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because zz_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					zzrestart(zzin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( zzwrap( ) )
+						return EOF;
+
+					if ( ! (zz_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return zzinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(zz_c_buf_p) = (zztext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (zz_c_buf_p);	/* cast for 8-bit char's */
+	*(zz_c_buf_p) = '\0';	/* preserve zztext */
+	(zz_hold_char) = *++(zz_c_buf_p);
+
+	YY_CURRENT_BUFFER_LVALUE->zz_at_bol = (c == '\n');
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_at_bol )
+		   
+    zzlineno++;
+;
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void zzrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        zzensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            zz_create_buffer(zzin,YY_BUF_SIZE );
+	}
+
+	zz_init_buffer(YY_CURRENT_BUFFER,input_file );
+	zz_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void zz_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		zzpop_buffer_state();
+	 *		zzpush_buffer_state(new_buffer);
+     */
+	zzensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(zz_c_buf_p) = (zz_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->zz_buf_pos = (zz_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	zz_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (zzwrap()) processing, but the only time this flag
+	 * is looked at is after zzwrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(zz_did_buffer_switch_on_eof) = 1;
+}
+
+static void zz_load_buffer_state  (void)
+{
+    	(zz_n_chars) = YY_CURRENT_BUFFER_LVALUE->zz_n_chars;
+	(zztext_ptr) = (zz_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->zz_buf_pos;
+	zzin = YY_CURRENT_BUFFER_LVALUE->zz_input_file;
+	(zz_hold_char) = *(zz_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE zz_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) zzalloc(sizeof( struct zz_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_create_buffer()" );
+
+	b->zz_buf_size = size;
+
+	/* zz_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->zz_ch_buf = (char *) zzalloc(b->zz_buf_size + 2  );
+	if ( ! b->zz_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_create_buffer()" );
+
+	b->zz_is_our_buffer = 1;
+
+	zz_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with zz_create_buffer()
+ * 
+ */
+    void zz_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->zz_is_our_buffer )
+		zzfree((void *) b->zz_ch_buf  );
+
+	zzfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a zzrestart() or at EOF.
+ */
+    static void zz_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	zz_flush_buffer(b );
+
+	b->zz_input_file = file;
+	b->zz_fill_buffer = 1;
+
+    /* If b is the current buffer, then zz_init_buffer was _probably_
+     * called from zzrestart() or through zz_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->zz_bs_lineno = 1;
+        b->zz_bs_column = 0;
+    }
+
+        b->zz_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void zz_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->zz_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->zz_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->zz_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->zz_buf_pos = &b->zz_ch_buf[0];
+
+	b->zz_at_bol = 1;
+	b->zz_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		zz_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void zzpush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	zzensure_buffer_stack();
+
+	/* This block is copied from zz_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(zz_c_buf_p) = (zz_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->zz_buf_pos = (zz_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(zz_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from zz_switch_to_buffer. */
+	zz_load_buffer_state( );
+	(zz_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void zzpop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	zz_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((zz_buffer_stack_top) > 0)
+		--(zz_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		zz_load_buffer_state( );
+		(zz_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void zzensure_buffer_stack (void)
+{
+	int num_to_alloc;
+    
+	if (!(zz_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(zz_buffer_stack) = (struct zz_buffer_state**)zzalloc
+								(num_to_alloc * sizeof(struct zz_buffer_state*)
+								);
+		
+		memset((zz_buffer_stack), 0, num_to_alloc * sizeof(struct zz_buffer_state*));
+				
+		(zz_buffer_stack_max) = num_to_alloc;
+		(zz_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((zz_buffer_stack_top) >= ((zz_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (zz_buffer_stack_max) + grow_size;
+		(zz_buffer_stack) = (struct zz_buffer_state**)zzrealloc
+								((zz_buffer_stack),
+								num_to_alloc * sizeof(struct zz_buffer_state*)
+								);
+
+		/* zero only the new slots.*/
+		memset((zz_buffer_stack) + (zz_buffer_stack_max), 0, grow_size * sizeof(struct zz_buffer_state*));
+		(zz_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE zz_scan_buffer  (char * base, zz_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) zzalloc(sizeof( struct zz_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_scan_buffer()" );
+
+	b->zz_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->zz_buf_pos = b->zz_ch_buf = base;
+	b->zz_is_our_buffer = 0;
+	b->zz_input_file = 0;
+	b->zz_n_chars = b->zz_buf_size;
+	b->zz_is_interactive = 0;
+	b->zz_at_bol = 1;
+	b->zz_fill_buffer = 0;
+	b->zz_buffer_status = YY_BUFFER_NEW;
+
+	zz_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to zzlex() will
+ * scan from a @e copy of @a str.
+ * @param str a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       zz_scan_bytes() instead.
+ */
+YY_BUFFER_STATE zz_scan_string (zzconst char * zzstr )
+{
+    
+	return zz_scan_bytes(zzstr,strlen(zzstr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to zzlex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE zz_scan_bytes  (zzconst char * zzbytes, int  _zzbytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	zz_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _zzbytes_len + 2;
+	buf = (char *) zzalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_scan_bytes()" );
+
+	for ( i = 0; i < _zzbytes_len; ++i )
+		buf[i] = zzbytes[i];
+
+	buf[_zzbytes_len] = buf[_zzbytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = zz_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in zz_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->zz_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void zz_fatal_error (zzconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine zzless() so it works in section 3 code. */
+
+#undef zzless
+#define zzless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up zztext. */ \
+        int zzless_macro_arg = (n); \
+        YY_LESS_LINENO(zzless_macro_arg);\
+		zztext[zzleng] = (zz_hold_char); \
+		(zz_c_buf_p) = zztext + zzless_macro_arg; \
+		(zz_hold_char) = *(zz_c_buf_p); \
+		*(zz_c_buf_p) = '\0'; \
+		zzleng = zzless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int zzget_lineno  (void)
+{
+        
+    return zzlineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *zzget_in  (void)
+{
+        return zzin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *zzget_out  (void)
+{
+        return zzout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+int zzget_leng  (void)
+{
+        return zzleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *zzget_text  (void)
+{
+        return zztext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void zzset_lineno (int  line_number )
+{
+    
+    zzlineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see zz_switch_to_buffer
+ */
+void zzset_in (FILE *  in_str )
+{
+        zzin = in_str ;
+}
+
+void zzset_out (FILE *  out_str )
+{
+        zzout = out_str ;
+}
+
+int zzget_debug  (void)
+{
+        return zz_flex_debug;
+}
+
+void zzset_debug (int  bdebug )
+{
+        zz_flex_debug = bdebug ;
+}
+
+static int zz_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from zzlex_destroy(), so don't allocate here.
+     */
+
+    /* We do not touch zzlineno unless the option is enabled. */
+    zzlineno =  1;
+    
+    (zz_buffer_stack) = 0;
+    (zz_buffer_stack_top) = 0;
+    (zz_buffer_stack_max) = 0;
+    (zz_c_buf_p) = (char *) 0;
+    (zz_init) = 0;
+    (zz_start) = 0;
+
+    (zz_state_buf) = 0;
+    (zz_state_ptr) = 0;
+    (zz_full_match) = 0;
+    (zz_lp) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    zzin = stdin;
+    zzout = stdout;
+#else
+    zzin = (FILE *) 0;
+    zzout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * zzlex_init()
+     */
+    return 0;
+}
+
+/* zzlex_destroy is for both reentrant and non-reentrant scanners. */
+int zzlex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		zz_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		zzpop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	zzfree((zz_buffer_stack) );
+	(zz_buffer_stack) = NULL;
+
+    zzfree ( (zz_state_buf) );
+    (zz_state_buf)  = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * zzlex() is called, initialization will occur. */
+    zz_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef zztext_ptr
+static void zz_flex_strncpy (char* s1, zzconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int zz_flex_strlen (zzconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *zzalloc (zz_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *zzrealloc  (void * ptr, zz_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void zzfree (void * ptr )
+{
+	free( (char *) ptr );	/* see zzrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "zztables"
+
+#line 175 "beaul.l"
+
+
+
+int beau_parse()
+{
+	if(setjmp(env)) return 1;
+	return zzparse();
+}
+
diff --git a/src/Macro/beaul.l b/src/Macro/beaul.l
new file mode 100644
index 0000000..1f32c30
--- /dev/null
+++ b/src/Macro/beaul.l
@@ -0,0 +1,181 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+%{
+
+#include <setjmp.h>
+#include <stdarg.h>
+static jmp_buf env;
+#define exit(a)    jumpexit(a)
+#define fprintf    jumpprtf
+
+static void jumpexit(int n)
+{
+	longjmp(env,1);
+}
+
+static void jumpprtf(FILE *f,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	int len;
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	len = strlen(buf);
+	if(len && buf[len-1] == '\n')
+		buf[len-1] = 0;
+
+	yyerror(buf);
+}
+
+#define _k(x) (keyword(yytext),(x))
+#define _w(x) (plainword(yytext),(x))
+
+static void kword(char *p)
+{
+    char buf[10];
+    int i = 0;
+
+    while(*p)
+    {
+        switch(*p)
+        {
+        case ' ':
+        case '\t':
+            buf[i] = 0;
+            if(i) keyword(buf);
+            buf[0] = *p;
+            buf[1] = 0;
+            space(buf);
+            i = 0;
+            break;
+
+        case '\n':
+            buf[i] = 0;
+            if(i) keyword(buf);
+            cr(buf);
+            i = 0;
+            break;
+
+        default:
+            buf[i++] = *p;
+            break;
+        }
+        p++;
+    }
+    buf[i] = 0;
+    keyword(buf);
+}
+%}
+
+IDENT   [_A-Za-z]+[_0-9A-Za-z]*
+NUMB    [0-9]+[\.]*[0-9]*
+EXP     [eE][+\-]*[0-9]+ 
+
+TIME1   [0-9][0-9]:[0-9][0-9]
+TIME2   [0-9][0-9]:[0-9][0-9]:[0-9][0-9]
+TIME    {TIME1}{TIME2}
+
+DATE1   [0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+DATE2   [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+DATE3   [0-9][0-9]-[0-9][0-9][0-9]
+DATE4   [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9]
+DATE    {DATE1}{DATE2}
+
+
+%s SOURCE
+
+%%
+
+<SOURCE>end[ \t]+inline[ \t]* { BEGIN INITIAL; kword(yytext); return ENDINLINE;}
+<SOURCE>[ \t]+          space(yytext);
+<SOURCE>.               inlineword(yytext);
+<SOURCE>\n              cr(yytext);
+
+<INITIAL>if        return _k(IF);
+<INITIAL>then      return _k(THEN);
+<INITIAL>else      return _k(ELSE);
+<INITIAL>and       return _k(AND);
+<INITIAL>not       return _k(NOT);
+<INITIAL>or        return _k(OR);
+<INITIAL>function  return _k(FUNCTION);
+<INITIAL>return    return _k(RETURN);
+<INITIAL>end       return _k(END);
+<INITIAL>while     return _k(WHILE);
+<INITIAL>global    return _k(GLOBAL);
+<INITIAL>do        return _k(DO);
+<INITIAL>on        return _k(ON);
+<INITIAL>for       return _k(FOR);
+<INITIAL>to        return _k(TO);
+<INITIAL>by        return _k(BY);
+<INITIAL>in        return _k(IN);
+<INITIAL>of        return _k(OF);
+<INITIAL>case      return _k(CASE);
+<INITIAL>otherwise return _k(OTHERWISE);
+<INITIAL>repeat    return _k(REPEAT);
+<INITIAL>until     return _k(UNTIL);
+<INITIAL>loop      return _k(LOOP);
+<INITIAL>when      return _k(WHEN);
+<INITIAL>include   return _k(INCLUDE);
+<INITIAL>extern    return _k(EXTERN);
+<INITIAL>tell      return _k(TELL);
+<INITIAL>task      return _k(TASK);
+<INITIAL>nil       return _k(NIL);
+<INITIAL>object    return _k(OBJECT);
+<INITIAL>import    return _k(IMPORT);
+<INITIAL>export    return _k(EXPORT);
+<INITIAL>inline[ \t]*\n  { BEGIN SOURCE; kword(yytext);return INLINE;}
+
+
+<INITIAL>"->"       return _w(ARROW);
+<INITIAL>"<>"       return _w(NE);
+<INITIAL>">="       return _w(GE);
+<INITIAL>"<="       return _w(LE);
+<INITIAL>"\*\*"     return _w('^');
+
+<INITIAL>\#.*\n     { yytext[yyleng-1] = 0; comment(yytext);}
+<INITIAL>\#.*       comment(yytext);
+
+<INITIAL>\"|\'      { 
+					   int c,q = yytext[0]; 
+
+					   yyleng = 1;
+
+					   while((c = input()) && c != q && c != '\n') 
+					   {
+						   if(c == '\\') {
+								yytext[yyleng++] = c;
+								yytext[yyleng++] = input();
+							} else yytext[yyleng++] =  c;
+					   }
+
+					   yytext[yyleng++] = c;
+					   yytext[yyleng++] = 0;
+					   return _w(STRING);
+					 }
+
+<INITIAL>{DATE}      return _w(DATE);
+<INITIAL>{TIME}      return _w(TIME);
+<INITIAL>{IDENT}     return _w(WORD); 
+<INITIAL>{NUMB}{EXP} return _w(NUMBER); 
+<INITIAL>{NUMB}      return _w(NUMBER); 
+
+<INITIAL>^[ \t]*     leading(yytext);
+<INITIAL>[ \t]*      space(yytext);
+<INITIAL>\n          cr(yytext);
+<INITIAL>.           return _w(*yytext); 
+%%
+
+int beau_parse()
+{
+	if(setjmp(env)) return 1;
+	return yyparse();
+}
diff --git a/src/Macro/beautify.c b/src/Macro/beautify.c
new file mode 100644
index 0000000..ac92186
--- /dev/null
+++ b/src/Macro/beautify.c
@@ -0,0 +1,467 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <mars.h>
+#include <stdio.h>
+#include <time.h>
+/* #ifndef hp */
+/* #include <getopt.h> */
+/* #endif */
+#include <sys/stat.h>
+
+static int beau      = 0; /* Beautify of ps_ output */
+static int margin    = 25;
+static int size      = 9;
+static int count     = 0;
+static int tab       = 4;
+static int landscape = 0;
+static int twopages  = 0;
+
+static int braket    = 0;
+static int ketbra    = 0;
+static int force     = 0;
+
+#define MAXBUF 1024
+
+static char buffer[MAXBUF];
+static char word[MAXBUF];
+static int  bufidx = 0;
+
+static void ps_setfont(char);
+static void ps_outchar(char);
+static void ps_outtext(const char*);
+static void ps_newline(void);
+static void ps_newpage(void);
+static void ps_space(const char*);
+static void ps_flush(void);
+static void ps_process(FILE*,const char*);
+
+#define ROMAN	 ps_setfont('R')
+#define BOLD	 ps_setfont('B')
+#define ITALIC	 ps_setfont('I')
+
+
+void keyword(const char*);
+
+static char *ps[] = {
+#include "beau.h"
+};
+
+static char *ps_bool[] = {
+	"false",
+	"true",
+};
+
+void ps_outtext(const char *p)
+{
+	int len = strlen(p);
+	if(len + bufidx + 1 >= MAXBUF) ps_flush();
+
+	strcpy(buffer+bufidx,p);
+	bufidx += len;
+	count  += len;
+}
+
+/* Select a new font */
+
+void ps_setfont(char f)
+{
+	static char last_font = 0;
+	if(last_font != f)
+	{
+		ps_flush();
+		last_font = f;
+		printf("%c\n",f);
+	}
+}
+
+void leading(const char *p)
+{
+	if(!beau) ps_space(p);
+}
+
+/* Output a string */
+
+void ps_string(const char *p)
+{
+	putchar('(');
+	while(*p)
+	{
+		switch(*p)
+		{
+		case '(':
+		case ')':
+		case '\\':
+			putchar('\\');
+			putchar(*p);
+			break;
+
+		default:
+			if(isprint(*p))
+				putchar(*p);
+			else
+				printf("\\%03o",*p);
+			break;
+		}
+		p++;
+	}
+	putchar(')');
+}
+
+void ps_flush(void)
+{
+	if(!bufidx) return;
+	ps_string(buffer);
+	printf("S\n");
+	*buffer = 0;
+	bufidx  = 0;
+}
+
+void ps_space(const char *w)
+{
+	int n = count/tab*tab+tab-count;
+	int i;
+
+	while(*w)
+	{ 
+		if(*w == '\t') for(i=0;i<n;i++) ps_outchar(' ');
+		else ps_outchar(' ');
+		w++;
+	}
+}
+
+void ps_outchar(char c)
+{
+	char buf[2];
+	buf[0] = c;
+	buf[1] = 0;
+	ps_outtext(buf);
+}
+
+void ps_icon(const char *icon)
+{
+	printf("100 50 9 9 290 365 321 396\n");
+	printf("start_icon\n");
+	fflush(NULL);
+	system("cat /cc/od/graphics/icons/MACRO.ps");
+	printf("end_icon\n");
+}
+
+void ps_header(void)
+{
+	int i;
+	for(i=0;i<sizeof(ps)/sizeof(char*);i++) printf("%s\n",ps[i]);
+	printf("%d %d %s %s IJ\n", margin,size,ps_bool[landscape],ps_bool[twopages]);
+	/* ps_icon("MACRO"); */
+}
+
+void ps_newpage(void)
+{
+	ps_flush();
+	count = 0;
+	printf("NP\n");
+	ROMAN;
+}
+
+void ps_newline(void)
+{
+	ps_flush();
+	count = 0;
+	printf("L\n");
+}
+
+void newpage(void)
+{
+	if(!beau) ps_newpage();
+}
+
+
+
+void process(FILE *f,const char *name)
+{
+	extern FILE *zzin;
+	struct stat s;
+
+	count = 0;
+	ROMAN;
+	zzin = f;
+
+	if(fstat(fileno(f),&s)<0)
+		time(&s.st_mtime);
+
+	ps_string(name);
+	ps_string(ctime(&s.st_mtime));
+	printf("NF\n");
+	while(zzlex());
+}
+
+zzwrap()
+{
+	if(!beau)
+	{
+		count = 0;
+		printf("EF\n");
+		ROMAN;
+	}
+	return 1;
+}
+/*===============================================================*/
+
+
+
+void dumpline()
+{
+	int i;
+	char *p,*q;
+	p = buffer;
+
+	if(!*p)  return; 
+
+	for(i=0;i<tab;i++) putchar('\t');
+
+	q = p+strlen(p) - 1;
+	while(q != p && (*q == ' ' || *q == '\t')) *q-- = 0;
+	printf("%s\n",p);
+	strcpy(buffer,word);
+	*word = 0;
+}
+
+void tabs(int n)
+{
+	if(beau) tab += n;
+}
+
+
+void newline(int sync)
+{
+	if(beau) {
+		force = 1;
+		if(sync) keyword("");
+		dumpline();
+	}
+}
+
+
+void keyword(const char* w)
+{
+	if(beau)
+	{
+		strcat(buffer,word);
+		strcpy(word,w);
+	}
+	else
+	{
+		BOLD;
+		ps_outtext(w);
+		ROMAN;
+	}
+}
+
+void inlineword(const char *w)
+{
+	char buf[2];
+	if(beau) {
+		printf("%s",w);
+	}
+	else switch(*w)
+	{
+		case '\t':
+		case ' ':
+			buf[0] = *w;
+			buf[1] = 0;
+			ps_space(buf);
+			break;
+
+		case '\n':
+			ps_newline();
+			break;
+
+		default:
+			ps_outtext(w);
+			break;
+	}
+}
+
+void plainword(const char *w)
+{
+	if(beau) keyword(w);
+	else ps_outtext(w);
+}
+
+void space(const char *w)
+{
+	if(beau)
+	{
+		if(*buffer || *word) strcat(word,w);
+	}
+	else ps_space(w);
+}
+
+void bsync()
+{
+	if(beau)
+		keyword("");
+}
+
+void bra() { bsync(); braket++;}
+void ket() { bsync(); braket--; }
+
+void cr(const char *w)
+{
+	if(beau)
+	{
+		bsync();
+		if(*buffer)
+		{
+			newline(1);
+			if(braket != ketbra)
+			{
+				tabs( (braket-ketbra) * 2);
+				ketbra = braket;
+			}
+		} else if(!force) putchar('\n');
+		force = 0;
+	}
+	else ps_newline();
+}
+
+void comment(const char* w)
+{
+	if(beau)
+	{
+		keyword(w);
+		cr("\n");
+	}
+	else {
+		ITALIC;
+		ps_outtext(w);
+		ps_newline();
+		ROMAN;
+	}
+
+}
+
+void zzerror(char* msg)
+{
+	extern int zzlineno;
+	fprintf(stderr,"Line %d: %s\n",zzlineno,msg);
+	exit(1);
+}
+
+void theend()
+{
+	if(*word || *buffer) newline(0);
+}
+
+void usage(const char *me)
+{
+	fprintf(stderr,
+	    "usage: %s -[+2l] -m margin -s size -t tabs [filename [...]] \n",me);
+	fprintf(stderr,"          -+          : c++ mode\n");
+	fprintf(stderr,"          -2          : two columns\n");
+	fprintf(stderr,"          -l          : landscape\n");
+	fprintf(stderr,"          -m margin   : margin size (default 25 points)\n");
+	fprintf(stderr,"          -s font     : font size   (default 9 points)\n");
+	fprintf(stderr,"          -t tabs     : tab size    (default 4 spaces)\n");
+	exit(1);
+}
+
+#ifdef YYDEBUG
+ extern
+#endif
+ int zzdebug;
+
+void main(int argc,char **argv)
+{
+	int c;
+	char *name = NULL;
+	*buffer = *word = 0;
+
+	/* zzdebug = 1; */
+
+	while((c=getopt(argc,argv,"dbz:+m:s:l2t:i:n:f:g:")) != -1)
+	{
+		switch(c)
+		{
+		case 'd':
+		        zzdebug = 1; /* need to define YYDEBUG, also for beauy.c */
+			break;
+
+		case 'b':
+			beau = 1;
+			tab = 0;
+			break;
+
+		case '2':
+			twopages = 1;
+			break;
+
+		case 'l':
+			landscape = 1;
+			break;
+
+		case 'n':
+			name = optarg;
+			break;
+
+		case 'm':
+			margin    = atoi(optarg);
+			if(margin<2) margin = 2;
+			break;
+
+		case 's':
+			size      = atoi(optarg);
+			if(size<2) size = 2;
+			break;
+
+		case 't':
+			tab = atoi(optarg);
+			if(tab<2) tab = 2;
+			break;
+
+		case 'f':
+			freopen(optarg,"r",stdin);
+			break;
+
+		case 'g':
+			freopen(optarg,"w",stdout);
+			break;
+
+		case '?':
+			usage(argv[0]);
+			break;
+		}
+	}
+
+	if(beau)
+	{
+		beau_parse();
+	}
+	else {
+
+		ps_header();
+
+		if(optind == argc)
+			process(stdin,name?name:"stdin");
+		else
+			for(;optind<argc;optind++)
+			{
+				FILE *f = fopen(argv[optind],"r");
+				if(!f)
+				{
+					perror(argv[optind]);
+					exit(1);
+				}
+				process(f,mbasename(name?name:argv[optind]));
+				fclose(f);
+			}
+	}
+
+	exit(0);
+}
diff --git a/src/Macro/beauy.c b/src/Macro/beauy.c
new file mode 100644
index 0000000..70c5596
--- /dev/null
+++ b/src/Macro/beauy.c
@@ -0,0 +1,2243 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with zz or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum zztokentype {
+     IF = 258,
+     AND = 259,
+     NOT = 260,
+     OR = 261,
+     THEN = 262,
+     ELSE = 263,
+     END = 264,
+     RETURN = 265,
+     DO = 266,
+     FUNCTION = 267,
+     ON = 268,
+     GLOBAL = 269,
+     VECTOR = 270,
+     WHILE = 271,
+     INCLUDE = 272,
+     EXTERN = 273,
+     GE = 274,
+     LE = 275,
+     NE = 276,
+     FOR = 277,
+     TO = 278,
+     BY = 279,
+     NIL = 280,
+     OBJECT = 281,
+     IMPORT = 282,
+     EXPORT = 283,
+     INLINE = 284,
+     ENDINLINE = 285,
+     CASE = 286,
+     OTHERWISE = 287,
+     OF = 288,
+     IN = 289,
+     REPEAT = 290,
+     UNTIL = 291,
+     LOOP = 292,
+     WHEN = 293,
+     TELL = 294,
+     TASK = 295,
+     WORD = 296,
+     STRING = 297,
+     NUMBER = 298,
+     DATE = 299,
+     TIME = 300,
+     ARROW = 301
+   };
+#endif
+/* Tokens.  */
+#define IF 258
+#define AND 259
+#define NOT 260
+#define OR 261
+#define THEN 262
+#define ELSE 263
+#define END 264
+#define RETURN 265
+#define DO 266
+#define FUNCTION 267
+#define ON 268
+#define GLOBAL 269
+#define VECTOR 270
+#define WHILE 271
+#define INCLUDE 272
+#define EXTERN 273
+#define GE 274
+#define LE 275
+#define NE 276
+#define FOR 277
+#define TO 278
+#define BY 279
+#define NIL 280
+#define OBJECT 281
+#define IMPORT 282
+#define EXPORT 283
+#define INLINE 284
+#define ENDINLINE 285
+#define CASE 286
+#define OTHERWISE 287
+#define OF 288
+#define IN 289
+#define REPEAT 290
+#define UNTIL 291
+#define LOOP 292
+#define WHEN 293
+#define TELL 294
+#define TASK 295
+#define WORD 296
+#define STRING 297
+#define NUMBER 298
+#define DATE 299
+#define TIME 300
+#define ARROW 301
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 10 "beauy.y"
+
+#include <stdlib.h>
+#include <stdio.h>
+extern void newline(int);
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define zzstype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+#line 204 "y.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 zztype_uint8;
+#else
+typedef unsigned char zztype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 zztype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char zztype_int8;
+#else
+typedef short int zztype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 zztype_uint16;
+#else
+typedef unsigned short int zztype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 zztype_int16;
+#else
+typedef short int zztype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined zzoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined zzoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined zzoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union zzalloc
+{
+  zztype_int16 zzss;
+  YYSTYPE zzvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union zzalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (zztype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T zzi;				\
+	  for (zzi = 0; zzi < (Count); zzi++)	\
+	    (To)[zzi] = (From)[zzi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T zznewbytes;						\
+	YYCOPY (&zzptr->Stack, Stack, zzsize);				\
+	Stack = &zzptr->Stack;						\
+	zznewbytes = zzstacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	zzptr += zznewbytes / sizeof (*zzptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  121
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   564
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  65
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  94
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  202
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  348
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   301
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? zztranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const zztype_uint8 zztranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    62,     2,
+      52,    53,    59,    61,    50,    57,    51,    60,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    49,    47,
+      64,    48,    63,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    54,     2,    55,    58,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    56,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const zztype_uint16 zzprhs[] =
+{
+       0,     0,     3,     5,     7,     9,    11,    14,    16,    18,
+      20,    22,    24,    26,    28,    30,    32,    34,    37,    42,
+      45,    49,    54,    57,    60,    63,    66,    69,    72,    76,
+      80,    82,    85,    89,    91,    94,    96,   100,   102,   104,
+     107,   111,   114,   117,   120,   122,   126,   128,   132,   133,
+     137,   139,   141,   143,   145,   147,   149,   151,   154,   158,
+     165,   171,   177,   179,   181,   183,   185,   187,   189,   191,
+     193,   194,   195,   205,   206,   207,   215,   216,   217,   224,
+     226,   229,   230,   236,   237,   238,   248,   250,   253,   254,
+     260,   262,   263,   269,   270,   271,   278,   279,   292,   294,
+     297,   298,   299,   308,   309,   316,   317,   321,   322,   327,
+     328,   336,   338,   340,   342,   344,   346,   350,   356,   359,
+     364,   369,   371,   373,   378,   382,   386,   393,   400,   403,
+     405,   407,   409,   413,   415,   419,   423,   425,   429,   433,
+     437,   440,   443,   445,   449,   453,   455,   458,   460,   462,
+     465,   467,   469,   471,   475,   477,   479,   481,   483,   486,
+     488,   490,   494,   496,   500,   504,   506,   510,   514,   518,
+     520,   524,   528,   532,   536,   540,   544,   548,   553,   556,
+     558,   560,   562,   564,   566,   568,   570,   572,   574,   576,
+     578,   580,   582,   584,   586,   588,   590,   593,   597,   599,
+     603,   605,   607
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const zztype_int16 zzrhs[] =
+{
+      66,     0,    -1,    67,    -1,    68,    -1,   158,    -1,    69,
+      -1,    68,    69,    -1,    91,    -1,    78,    -1,    94,    -1,
+      71,    -1,    72,    -1,    74,    -1,    75,    -1,    76,    -1,
+      47,    -1,    41,    -1,    14,    70,    -1,    14,    70,    48,
+     157,    -1,    73,    84,    -1,    73,    84,    42,    -1,    73,
+      84,    42,    77,    -1,    18,    90,    -1,    27,    70,    -1,
+      28,    70,    -1,    17,    42,    -1,    17,    70,    -1,    29,
+      30,    -1,    79,    67,    88,    -1,    85,    80,    81,    -1,
+     158,    -1,   131,   132,    -1,   131,    86,   132,    -1,   158,
+      -1,    49,    82,    -1,    83,    -1,    82,    50,    83,    -1,
+     136,    -1,   158,    -1,   131,   132,    -1,   131,    86,   132,
+      -1,    12,    90,    -1,    13,    90,    -1,    26,    90,    -1,
+      87,    -1,    86,    50,    87,    -1,    70,    -1,    70,    49,
+      70,    -1,    -1,     9,    89,    90,    -1,    70,    -1,   154,
+      -1,    93,    -1,   136,    -1,    92,    -1,    70,    -1,    10,
+      -1,    10,   157,    -1,    70,    48,   157,    -1,    70,   133,
+     139,   134,    48,   157,    -1,    70,    51,    70,    48,   157,
+      -1,    70,    51,    43,    48,   157,    -1,   124,    -1,   121,
+      -1,   118,    -1,   115,    -1,   107,    -1,    95,    -1,   101,
+      -1,    98,    -1,    -1,    -1,    37,    70,    34,   157,    96,
+      67,     9,    97,    37,    -1,    -1,    -1,    39,   157,    99,
+      67,     9,   100,    39,    -1,    -1,    -1,    38,   102,   104,
+       9,   103,    38,    -1,   105,    -1,   104,   105,    -1,    -1,
+     157,    49,   106,    67,     9,    -1,    -1,    -1,    31,   157,
+      33,   108,   110,   113,     9,   109,    31,    -1,   111,    -1,
+     110,   111,    -1,    -1,   139,    49,   112,    67,     9,    -1,
+     158,    -1,    -1,    32,    49,   114,    67,     9,    -1,    -1,
+      -1,    35,   116,    67,    36,   117,   157,    -1,    -1,    22,
+      70,    48,   157,    23,   157,   120,    11,   119,    67,     9,
+      22,    -1,   158,    -1,    24,   157,    -1,    -1,    -1,    16,
+     157,    11,   122,    67,     9,   123,    16,    -1,    -1,     3,
+     157,     7,   125,    67,   126,    -1,    -1,     9,   127,     3,
+      -1,    -1,   130,   128,    67,   126,    -1,    -1,   130,     3,
+     157,     7,   129,    67,   126,    -1,     8,    -1,    52,    -1,
+      53,    -1,    54,    -1,    55,    -1,   131,   142,   132,    -1,
+     131,   140,    50,   139,   132,    -1,   131,   132,    -1,    70,
+     131,   138,   132,    -1,    70,   131,   142,   132,    -1,   135,
+      -1,   137,    -1,   148,   133,   139,   134,    -1,   148,    51,
+      70,    -1,   148,    51,    43,    -1,    70,    46,    70,   131,
+     138,   132,    -1,    70,    46,    70,   131,   142,   132,    -1,
+      70,    77,    -1,   158,    -1,   139,    -1,   140,    -1,   140,
+      50,   139,    -1,   157,    -1,    70,    49,   157,    -1,    42,
+      49,   157,    -1,   141,    -1,   141,    50,   140,    -1,   141,
+      50,   142,    -1,   140,    50,   142,    -1,   145,   145,    -1,
+     143,   145,    -1,   143,    -1,    56,   139,    56,    -1,   133,
+     138,   134,    -1,    43,    -1,    57,    43,    -1,    70,    -1,
+      42,    -1,    44,    45,    -1,    44,    -1,    45,    -1,   136,
+      -1,   131,   157,   132,    -1,   146,    -1,   145,    -1,   144,
+      -1,    25,    -1,    57,   148,    -1,   148,    -1,   147,    -1,
+     149,    58,   150,    -1,   149,    -1,   151,    59,   150,    -1,
+     151,    60,   150,    -1,   150,    -1,   152,    61,   151,    -1,
+     152,    57,   151,    -1,   152,    62,   151,    -1,   151,    -1,
+     153,    63,   152,    -1,   153,    48,   152,    -1,   153,    64,
+     152,    -1,   153,    19,   152,    -1,   153,    20,   152,    -1,
+     153,    21,   152,    -1,   153,    34,   152,    -1,   153,     5,
+      34,   152,    -1,     5,   153,    -1,   152,    -1,    63,    -1,
+      48,    -1,    64,    -1,    19,    -1,    20,    -1,    21,    -1,
+      34,    -1,     5,    -1,    58,    -1,    59,    -1,    60,    -1,
+      61,    -1,    57,    -1,    62,    -1,     4,    -1,     6,    -1,
+      54,    55,    -1,   155,     4,   153,    -1,   153,    -1,   156,
+       6,   155,    -1,   155,    -1,   156,    -1,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const zztype_uint16 zzrline[] =
+{
+       0,    71,    71,    74,    75,    78,    79,    82,    83,    84,
+      85,    86,    87,    88,    89,    90,    94,    96,    97,   100,
+     101,   102,   105,   108,   111,   114,   115,   118,   123,   126,
+     129,   130,   131,   134,   135,   138,   139,   142,   145,   146,
+     147,   150,   151,   152,   155,   156,   159,   160,   163,   163,
+     166,   167,   173,   174,   175,   176,   179,   180,   184,   185,
+     186,   187,   192,   193,   194,   195,   196,   197,   198,   199,
+     204,   206,   204,   211,   213,   211,   218,   220,   218,   222,
+     223,   226,   226,   231,   234,   231,   237,   238,   241,   241,
+     245,   246,   246,   252,   254,   252,   260,   259,   265,   266,
+     271,   273,   271,   278,   278,   283,   283,   284,   284,   285,
+     285,   288,   291,   294,   297,   300,   304,   305,   306,   310,
+     311,   312,   313,   314,   315,   316,   317,   318,   321,   327,
+     328,   331,   332,   335,   338,   339,   342,   343,   344,   345,
+     348,   349,   352,   355,   358,   361,   362,   365,   366,   367,
+     368,   369,   370,   371,   372,   373,   374,   375,   376,   379,
+     380,   385,   386,   389,   390,   391,   394,   395,   396,   397,
+     400,   401,   402,   403,   404,   405,   406,   407,   408,   409,
+     412,   413,   414,   415,   416,   417,   418,   419,   420,   421,
+     422,   423,   424,   425,   426,   427,   428,   431,   432,   435,
+     436,   439,   442
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const zztname[] =
+{
+  "$end", "error", "$undefined", "IF", "AND", "NOT", "OR", "THEN", "ELSE",
+  "END", "RETURN", "DO", "FUNCTION", "ON", "GLOBAL", "VECTOR", "WHILE",
+  "INCLUDE", "EXTERN", "GE", "LE", "NE", "FOR", "TO", "BY", "NIL",
+  "OBJECT", "IMPORT", "EXPORT", "INLINE", "ENDINLINE", "CASE", "OTHERWISE",
+  "OF", "IN", "REPEAT", "UNTIL", "LOOP", "WHEN", "TELL", "TASK", "WORD",
+  "STRING", "NUMBER", "DATE", "TIME", "ARROW", "';'", "'='", "':'", "','",
+  "'.'", "'('", "')'", "'['", "']'", "'|'", "'-'", "'^'", "'*'", "'/'",
+  "'+'", "'&'", "'>'", "'<'", "$accept", "script", "block", "lines",
+  "line", "name", "declare", "extern", "extern_name", "import", "export",
+  "include", "inline", "function", "beginfunction", "param_declare",
+  "super_declare", "super_list", "super", "extern_param_declare",
+  "functionheader", "param_list", "param", "endfunction", "@1", "fname",
+  "statement", "return", "assignement", "control", "loop", "@2", "@3",
+  "tell", "@4", "@5", "when", "@6", "@7", "selections", "selection", "@8",
+  "case", "@9", "@10", "choices", "choice", "@11", "otherwise", "@12",
+  "repeat", "@13", "@14", "for", "@15", "by", "while", "@16", "@17", "if",
+  "@18", "closeif", "@19", "@20", "@21", "else", "rbra", "rket", "sbra",
+  "sket", "definition", "function_call", "inline_object", "param_or_empty",
+  "parameters", "parameter", "attribute", "attribute_list", "vector_list",
+  "matrix", "vector", "list", "number", "atom", "atom_or_number", "power",
+  "factor", "term", "condition", "operator", "conjonction", "disjonction",
+  "expression", "empty", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const zztype_uint16 zztoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295,   296,   297,   298,   299,   300,   301,    59,    61,    58,
+      44,    46,    40,    41,    91,    93,   124,    45,    94,    42,
+      47,    43,    38,    62,    60
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const zztype_uint8 zzr1[] =
+{
+       0,    65,    66,    67,    67,    68,    68,    69,    69,    69,
+      69,    69,    69,    69,    69,    69,    70,    71,    71,    72,
+      72,    72,    73,    74,    75,    76,    76,    77,    78,    79,
+      80,    80,    80,    81,    81,    82,    82,    83,    84,    84,
+      84,    85,    85,    85,    86,    86,    87,    87,    89,    88,
+      90,    90,    91,    91,    91,    91,    92,    92,    93,    93,
+      93,    93,    94,    94,    94,    94,    94,    94,    94,    94,
+      96,    97,    95,    99,   100,    98,   102,   103,   101,   104,
+     104,   106,   105,   108,   109,   107,   110,   110,   112,   111,
+     113,   114,   113,   116,   117,   115,   119,   118,   120,   120,
+     122,   123,   121,   125,   124,   127,   126,   128,   126,   129,
+     126,   130,   131,   132,   133,   134,   135,   135,   135,   136,
+     136,   136,   136,   136,   136,   136,   136,   136,   137,   138,
+     138,   139,   139,   140,   141,   141,   142,   142,   142,   142,
+     143,   143,   144,   145,   146,   147,   147,   148,   148,   148,
+     148,   148,   148,   148,   148,   148,   148,   148,   148,   149,
+     149,   150,   150,   151,   151,   151,   152,   152,   152,   152,
+     153,   153,   153,   153,   153,   153,   153,   153,   153,   153,
+     154,   154,   154,   154,   154,   154,   154,   154,   154,   154,
+     154,   154,   154,   154,   154,   154,   154,   155,   155,   156,
+     156,   157,   158
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const zztype_uint8 zzr2[] =
+{
+       0,     2,     1,     1,     1,     1,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     2,     4,     2,
+       3,     4,     2,     2,     2,     2,     2,     2,     3,     3,
+       1,     2,     3,     1,     2,     1,     3,     1,     1,     2,
+       3,     2,     2,     2,     1,     3,     1,     3,     0,     3,
+       1,     1,     1,     1,     1,     1,     1,     2,     3,     6,
+       5,     5,     1,     1,     1,     1,     1,     1,     1,     1,
+       0,     0,     9,     0,     0,     7,     0,     0,     6,     1,
+       2,     0,     5,     0,     0,     9,     1,     2,     0,     5,
+       1,     0,     5,     0,     0,     6,     0,    12,     1,     2,
+       0,     0,     8,     0,     6,     0,     3,     0,     4,     0,
+       7,     1,     1,     1,     1,     1,     3,     5,     2,     4,
+       4,     1,     1,     4,     3,     3,     6,     6,     2,     1,
+       1,     1,     3,     1,     3,     3,     1,     3,     3,     3,
+       2,     2,     1,     3,     3,     1,     2,     1,     1,     2,
+       1,     1,     1,     3,     1,     1,     1,     1,     2,     1,
+       1,     3,     1,     3,     3,     1,     3,     3,     3,     1,
+       3,     3,     3,     3,     3,     3,     3,     4,     2,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     2,     3,     1,     3,
+       1,     1,     0
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const zztype_uint8 zzdefact[] =
+{
+     202,     0,    56,     0,     0,     0,     0,     0,     0,     0,
+     157,     0,     0,     0,     0,    93,     0,    76,     0,    16,
+     148,   150,   151,    15,   112,   114,     0,     0,     0,     2,
+       3,     5,    55,    10,    11,   202,    12,    13,    14,     8,
+     202,   202,     7,    54,    52,     9,    67,    69,    68,    66,
+      65,    64,    63,    62,     0,   202,   121,    53,   122,   142,
+     156,   155,   154,     0,     4,     0,   145,     0,   147,   152,
+     160,   159,   162,   165,   169,   179,   198,   200,   201,     0,
+      57,   194,   187,   195,   183,   184,   185,   186,   181,     0,
+     192,   188,   189,   190,   191,   193,   180,   182,    50,    41,
+      51,    42,    17,     0,    25,    26,    22,     0,    43,    23,
+      24,     0,   202,     0,     0,    73,   149,     0,   131,   133,
+     158,     1,     6,     0,     0,     0,     0,   128,   202,     0,
+      19,     0,    38,     0,   202,     0,    30,   148,   113,   147,
+     118,     0,   136,     0,   133,     0,   130,   129,   141,   140,
+       0,     0,   178,   146,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     103,   196,     0,   100,     0,    83,     0,     0,     0,    79,
+       0,   202,   143,     0,    27,     0,    58,     0,     0,     0,
+     131,     0,     0,    20,    46,     0,    44,    39,    48,    28,
+       0,    29,    33,     0,    31,     0,     0,     0,     0,   116,
+     153,   115,   144,   125,   124,     0,   161,   163,   164,   167,
+     166,   168,     0,   173,   174,   175,   176,   171,   170,   172,
+     197,   199,   202,    18,   202,     0,     0,    94,    70,    77,
+      80,    81,     0,   132,   202,     0,     0,   119,     0,   120,
+       0,    21,     0,     0,    40,     0,    34,    35,    37,    32,
+     135,   134,     0,   139,   137,   138,   123,   177,     0,     0,
+       0,   202,    86,     0,     0,   202,     0,   202,    74,     0,
+       0,    61,    60,     0,    47,    45,    49,     0,   117,     0,
+     111,   105,   104,   107,   101,   202,     0,    87,     0,    90,
+      88,    95,     0,    78,     0,     0,   126,   127,    59,    36,
+       0,     0,     0,   202,     0,     0,     0,    98,    91,    84,
+     202,    71,    82,    75,   106,     0,     0,   102,    99,    96,
+     202,     0,     0,     0,   109,   108,   202,     0,    85,    89,
+      72,   202,     0,    92,     0,     0,   110,    97
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const zztype_int16 zzdefgoto[] =
+{
+      -1,    28,    29,    30,    31,    68,    33,    34,    35,    36,
+      37,    38,   127,    39,    40,   134,   201,   256,   257,   130,
+      41,   195,   196,   199,   255,    99,    42,    43,    44,    45,
+      46,   275,   333,    47,   181,   305,    48,   114,   276,   178,
+     179,   277,    49,   236,   331,   271,   272,   320,   298,   330,
+      50,   112,   274,    51,   336,   316,    52,   234,   314,    53,
+     232,   292,   311,   313,   341,   293,    54,   140,    55,   212,
+      56,    69,    58,   145,   146,   118,   142,   263,    59,    60,
+      61,    62,    70,    71,    72,    73,    74,    75,    76,   100,
+      77,    78,   119,    64
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -303
+static const zztype_int16 zzpact[] =
+{
+     406,   486,   486,   344,   344,   -16,   486,    55,   344,   -16,
+    -303,   344,   -16,   -16,   486,  -303,   -16,  -303,   486,  -303,
+    -303,   -12,  -303,  -303,  -303,  -303,   486,     7,    29,  -303,
+     406,  -303,   114,  -303,  -303,    -6,  -303,  -303,  -303,  -303,
+     406,    -6,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,
+    -303,  -303,  -303,  -303,   424,   486,  -303,     9,  -303,   -18,
+    -303,   -18,  -303,    18,  -303,   486,  -303,   169,    27,  -303,
+    -303,    18,    53,  -303,    46,    42,    81,    63,    79,   118,
+    -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,    83,
+    -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,
+    -303,  -303,    91,   130,  -303,  -303,  -303,   104,  -303,  -303,
+    -303,   120,   406,   121,   486,  -303,  -303,   101,   108,  -303,
+      18,  -303,  -303,   129,   -16,   486,    34,  -303,   507,   486,
+     119,   -19,  -303,   160,   126,   -19,  -303,   127,  -303,    88,
+    -303,   123,   133,   117,   117,   122,  -303,  -303,  -303,  -303,
+      73,   486,    81,  -303,   239,   239,   239,   239,   239,   239,
+     145,   239,   239,   239,   239,   239,   239,   239,   486,   486,
+    -303,  -303,   486,  -303,   486,  -303,   144,   486,   430,  -303,
+     135,   406,  -303,   486,  -303,    -6,  -303,   137,   138,   117,
+     140,   117,   122,   158,   139,    21,  -303,  -303,  -303,  -303,
+       7,  -303,  -303,    21,  -303,   486,   486,   507,   507,  -303,
+    -303,  -303,  -303,  -303,  -303,   122,  -303,  -303,  -303,    46,
+      46,    46,   239,    42,    42,    42,    42,    42,    42,    42,
+      81,    63,   406,  -303,   406,   168,   486,  -303,  -303,  -303,
+    -303,  -303,   184,  -303,   507,   486,   486,  -303,   507,  -303,
+     147,  -303,   -16,   -16,  -303,   344,   149,  -303,     9,  -303,
+    -303,  -303,   117,  -303,   152,  -303,  -303,    42,   124,   194,
+     486,   465,  -303,   156,   486,   406,   171,   406,  -303,   117,
+     117,  -303,  -303,   486,  -303,  -303,  -303,     7,  -303,   507,
+    -303,  -303,  -303,   203,  -303,   192,   170,  -303,   208,  -303,
+    -303,  -303,   213,  -303,   215,   189,  -303,  -303,  -303,  -303,
+     152,   226,   486,   406,   214,   486,   220,  -303,  -303,  -303,
+     406,  -303,  -303,  -303,  -303,   230,   124,  -303,  -303,  -303,
+     406,   209,   234,   217,  -303,  -303,   406,   241,  -303,  -303,
+    -303,   406,   242,  -303,   124,   235,  -303,  -303
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const zztype_int16 zzpgoto[] =
+{
+    -303,  -303,   -14,  -303,   228,     0,  -303,  -303,  -303,  -303,
+    -303,  -303,    66,  -303,  -303,  -303,  -303,  -303,   -31,  -303,
+    -303,   125,    13,  -303,  -303,    10,  -303,  -303,  -303,  -303,
+    -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,
+      89,  -303,  -303,  -303,  -303,  -303,    -3,  -303,  -303,  -303,
+    -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,  -303,
+    -303,  -302,  -303,  -303,  -303,  -303,    12,  -108,   -13,  -153,
+    -303,    15,  -303,  -122,    -9,   -44,  -303,   -52,  -303,  -303,
+      60,  -303,  -303,     1,  -303,   -46,   -11,   -73,   -45,  -303,
+     102,  -303,    64,     2
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -153
+static const zztype_int16 zztable[] =
+{
+      32,    63,   143,    98,    98,   102,   189,   105,    98,   107,
+     141,    98,   109,   110,   101,    57,   113,   117,   106,   129,
+     152,   108,    19,   197,   335,    19,   133,   204,   120,   121,
+      32,    63,    10,   116,   138,   209,   210,   132,    26,   250,
+      32,    63,   346,   136,   128,    57,    24,   131,    19,    20,
+     151,    21,    22,   135,   139,    57,   123,   147,   151,    24,
+    -152,    25,   266,    26,    27,    79,    80,   168,   120,   150,
+     103,   253,    25,   124,   138,    19,   191,   187,   111,    24,
+     128,   247,   115,   249,   190,   169,   160,   254,   223,   224,
+     225,   226,   227,   228,   229,   259,    19,   104,   176,   157,
+     161,   162,   163,   158,   159,   155,   156,   151,   216,   217,
+     218,   154,    32,    63,    19,   164,   213,   123,   144,   148,
+     192,   149,   279,   230,   185,   170,   188,    57,   139,   165,
+     147,   194,   290,   291,   124,   194,   202,   206,   171,   172,
+      24,   173,   215,   123,   166,   167,   219,   220,   221,   267,
+     214,   128,   174,   175,   288,   177,   265,   182,   183,   184,
+     124,   193,   125,   190,   264,   126,    24,   242,    25,   198,
+     138,   306,   307,   207,   243,   200,   205,   211,   180,   222,
+     237,    32,    63,   208,   241,   245,   246,   123,   252,   186,
+     248,   270,   280,   278,    10,   283,    57,   244,   262,   287,
+     190,    63,   289,   294,   190,   300,   312,   139,   139,   303,
+      19,    20,   153,    21,    22,   258,   315,   319,   268,   318,
+     269,    24,   321,    25,   322,    26,    27,   273,   323,   324,
+     327,   329,    32,    63,    32,    63,   233,   334,   235,   243,
+     338,   238,   180,   339,   139,   310,   147,    57,   139,    57,
+     343,   345,   284,   194,   340,    98,   309,   347,   122,   251,
+     203,   302,   273,   304,    10,   286,   285,   240,   297,   260,
+     261,   231,     0,   299,     0,    32,    63,    32,    63,     0,
+      19,    20,    66,    21,    22,     0,     0,     0,    63,   139,
+      57,    24,    57,    25,     0,    26,    67,   317,     0,   326,
+       0,     0,   258,     0,     0,     0,   332,     0,     0,   281,
+     282,     0,     0,    32,    63,     0,   337,     0,     0,     0,
+      32,    63,   342,     0,     0,     0,     0,   344,    57,     0,
+      32,    63,     0,     0,   295,    57,    32,    63,   301,     0,
+       0,    32,    63,     0,     0,    57,     0,   308,    81,    82,
+      83,    57,     0,     0,     0,     0,    57,     0,     0,     0,
+       0,     0,     0,    84,    85,    86,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   325,     0,    87,   328,
+       0,     0,     0,     0,     0,    19,     0,     0,     0,     0,
+       0,     0,    88,     0,     0,     0,     0,     0,    89,     0,
+       0,    90,    91,    92,    93,    94,    95,    96,    97,     1,
+       0,     0,     0,     0,     0,     0,     2,     0,     3,     4,
+       5,     0,     6,     7,     8,     0,     0,     0,     9,    65,
+       0,    10,    11,    12,    13,    65,     0,    14,     0,   239,
+       0,    15,     0,    16,    17,    18,     0,    19,    20,    10,
+      21,    22,     0,    23,     0,    10,     0,     0,    24,     0,
+      25,     0,    26,    27,     0,    19,   137,    66,    21,    22,
+      65,    19,    20,    66,    21,    22,    24,   138,    25,     0,
+      26,    67,    24,     0,    25,     0,    26,    67,     0,     0,
+      10,    65,     0,     0,     0,     0,     0,   296,     0,     0,
+       0,     0,     0,     0,     0,     0,    19,    20,    66,    21,
+      22,    10,    65,     0,     0,     0,     0,    24,     0,    25,
+       0,    26,    67,     0,     0,     0,     0,    19,    20,    66,
+      21,    22,    10,     0,     0,     0,     0,     0,    24,     0,
+      25,     0,    26,    67,     0,     0,     0,     0,    19,   137,
+      66,    21,    22,     0,     0,     0,     0,     0,     0,    24,
+       0,    25,     0,    26,    67
+};
+
+static const zztype_int16 zzcheck[] =
+{
+       0,     0,    54,     3,     4,     5,   128,     7,     8,     9,
+      54,    11,    12,    13,     4,     0,    16,    26,     8,    32,
+      65,    11,    41,   131,   326,    41,    40,   135,    27,     0,
+      30,    30,    25,    45,    53,   143,   144,    35,    56,   192,
+      40,    40,   344,    41,    32,    30,    52,    35,    41,    42,
+      63,    44,    45,    41,    54,    40,    29,    55,    71,    52,
+      51,    54,   215,    56,    57,     1,     2,     4,    67,    51,
+       6,    50,    54,    46,    53,    41,   128,    43,    14,    52,
+      68,   189,    18,   191,   128,     6,     5,   195,   161,   162,
+     163,   164,   165,   166,   167,   203,    41,    42,   112,    57,
+      19,    20,    21,    61,    62,    59,    60,   120,   154,   155,
+     156,    58,   112,   112,    41,    34,    43,    29,    54,    59,
+     129,    61,   244,   168,   124,     7,   126,   112,   128,    48,
+     128,   131,     8,     9,    46,   135,   134,    49,    55,    48,
+      52,    11,   151,    29,    63,    64,   157,   158,   159,   222,
+     150,   139,    48,    33,   262,    34,   208,    56,    50,    30,
+      46,    42,    48,   207,   208,    51,    52,   181,    54,     9,
+      53,   279,   280,    50,   183,    49,    49,    55,   114,    34,
+      36,   181,   181,    50,    49,    48,    48,    29,    49,   125,
+      50,    23,   244,     9,    25,    48,   181,   185,   207,    50,
+     244,   200,    50,     9,   248,    49,     3,   207,   208,    38,
+      41,    42,    43,    44,    45,   200,    24,     9,   232,    49,
+     234,    52,     9,    54,     9,    56,    57,   236,    39,     3,
+      16,    11,   232,   232,   234,   234,   172,     7,   174,   248,
+      31,   177,   178,     9,   244,   289,   244,   232,   248,   234,
+       9,     9,   252,   253,    37,   255,   287,    22,    30,   193,
+     135,   275,   271,   277,    25,   255,   253,   178,   271,   205,
+     206,   169,    -1,   271,    -1,   275,   275,   277,   277,    -1,
+      41,    42,    43,    44,    45,    -1,    -1,    -1,   287,   289,
+     275,    52,   277,    54,    -1,    56,    57,   295,    -1,   313,
+      -1,    -1,   287,    -1,    -1,    -1,   320,    -1,    -1,   245,
+     246,    -1,    -1,   313,   313,    -1,   330,    -1,    -1,    -1,
+     320,   320,   336,    -1,    -1,    -1,    -1,   341,   313,    -1,
+     330,   330,    -1,    -1,   270,   320,   336,   336,   274,    -1,
+      -1,   341,   341,    -1,    -1,   330,    -1,   283,     4,     5,
+       6,   336,    -1,    -1,    -1,    -1,   341,    -1,    -1,    -1,
+      -1,    -1,    -1,    19,    20,    21,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   312,    -1,    34,   315,
+      -1,    -1,    -1,    -1,    -1,    41,    -1,    -1,    -1,    -1,
+      -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,    54,    -1,
+      -1,    57,    58,    59,    60,    61,    62,    63,    64,     3,
+      -1,    -1,    -1,    -1,    -1,    -1,    10,    -1,    12,    13,
+      14,    -1,    16,    17,    18,    -1,    -1,    -1,    22,     5,
+      -1,    25,    26,    27,    28,     5,    -1,    31,    -1,     9,
+      -1,    35,    -1,    37,    38,    39,    -1,    41,    42,    25,
+      44,    45,    -1,    47,    -1,    25,    -1,    -1,    52,    -1,
+      54,    -1,    56,    57,    -1,    41,    42,    43,    44,    45,
+       5,    41,    42,    43,    44,    45,    52,    53,    54,    -1,
+      56,    57,    52,    -1,    54,    -1,    56,    57,    -1,    -1,
+      25,     5,    -1,    -1,    -1,    -1,    -1,    32,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    41,    42,    43,    44,
+      45,    25,     5,    -1,    -1,    -1,    -1,    52,    -1,    54,
+      -1,    56,    57,    -1,    -1,    -1,    -1,    41,    42,    43,
+      44,    45,    25,    -1,    -1,    -1,    -1,    -1,    52,    -1,
+      54,    -1,    56,    57,    -1,    -1,    -1,    -1,    41,    42,
+      43,    44,    45,    -1,    -1,    -1,    -1,    -1,    -1,    52,
+      -1,    54,    -1,    56,    57
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const zztype_uint8 zzstos[] =
+{
+       0,     3,    10,    12,    13,    14,    16,    17,    18,    22,
+      25,    26,    27,    28,    31,    35,    37,    38,    39,    41,
+      42,    44,    45,    47,    52,    54,    56,    57,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    78,
+      79,    85,    91,    92,    93,    94,    95,    98,   101,   107,
+     115,   118,   121,   124,   131,   133,   135,   136,   137,   143,
+     144,   145,   146,   148,   158,     5,    43,    57,    70,   136,
+     147,   148,   149,   150,   151,   152,   153,   155,   156,   157,
+     157,     4,     5,     6,    19,    20,    21,    34,    48,    54,
+      57,    58,    59,    60,    61,    62,    63,    64,    70,    90,
+     154,    90,    70,   157,    42,    70,    90,    70,    90,    70,
+      70,   157,   116,    70,   102,   157,    45,   139,   140,   157,
+     148,     0,    69,    29,    46,    48,    51,    77,   131,   133,
+      84,   131,   158,    67,    80,   131,   158,    42,    53,    70,
+     132,   140,   141,   142,   157,   138,   139,   158,   145,   145,
+      51,   133,   153,    43,    58,    59,    60,    57,    61,    62,
+       5,    19,    20,    21,    34,    48,    63,    64,     4,     6,
+       7,    55,    48,    11,    48,    33,    67,    34,   104,   105,
+     157,    99,    56,    50,    30,    70,   157,    43,    70,   138,
+     140,   142,   139,    42,    70,    86,    87,   132,     9,    88,
+      49,    81,   158,    86,   132,    49,    49,    50,    50,   132,
+     132,    55,   134,    43,    70,   139,   150,   150,   150,   151,
+     151,   151,    34,   152,   152,   152,   152,   152,   152,   152,
+     153,   155,   125,   157,   122,   157,   108,    36,   157,     9,
+     105,    49,    67,   139,   131,    48,    48,   132,    50,   132,
+     134,    77,    49,    50,   132,    89,    82,    83,   136,   132,
+     157,   157,   139,   142,   140,   142,   134,   152,    67,    67,
+      23,   110,   111,   139,   117,    96,   103,   106,     9,   138,
+     142,   157,   157,    48,    70,    87,    90,    50,   132,    50,
+       8,     9,   126,   130,     9,   157,    32,   111,   113,   158,
+      49,   157,    67,    38,    67,   100,   132,   132,   157,    83,
+     140,   127,     3,   128,   123,    24,   120,   158,    49,     9,
+     112,     9,     9,    39,     3,   157,    67,    16,   157,    11,
+     114,   109,    67,    97,     7,   126,   119,    67,    31,     9,
+      37,   129,    67,     9,    67,     9,   126,    22
+};
+
+#define zzerrok		(zzerrstatus = 0)
+#define zzclearin	(zzchar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto zzacceptlab
+#define YYABORT		goto zzabortlab
+#define YYERROR		goto zzerrorlab
+
+
+/* Like YYERROR except do call zzerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto zzerrlab
+
+#define YYRECOVERING()  (!!zzerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (zzchar == YYEMPTY && zzlen == 1)				\
+    {								\
+      zzchar = (Token);						\
+      zzlval = (Value);						\
+      zztoken = YYTRANSLATE (zzchar);				\
+      YYPOPSTACK (1);						\
+      goto zzbackup;						\
+    }								\
+  else								\
+    {								\
+      zzerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `zzlex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX zzlex (YYLEX_PARAM)
+#else
+# define YYLEX zzlex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (zzdebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (zzdebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      zz_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_symbol_value_print (FILE *zzoutput, int zztype, YYSTYPE const * const zzvaluep)
+#else
+static void
+zz_symbol_value_print (zzoutput, zztype, zzvaluep)
+    FILE *zzoutput;
+    int zztype;
+    YYSTYPE const * const zzvaluep;
+#endif
+{
+  if (!zzvaluep)
+    return;
+# ifdef YYPRINT
+  if (zztype < YYNTOKENS)
+    YYPRINT (zzoutput, zztoknum[zztype], *zzvaluep);
+# else
+  YYUSE (zzoutput);
+# endif
+  switch (zztype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_symbol_print (FILE *zzoutput, int zztype, YYSTYPE const * const zzvaluep)
+#else
+static void
+zz_symbol_print (zzoutput, zztype, zzvaluep)
+    FILE *zzoutput;
+    int zztype;
+    YYSTYPE const * const zzvaluep;
+#endif
+{
+  if (zztype < YYNTOKENS)
+    YYFPRINTF (zzoutput, "token %s (", zztname[zztype]);
+  else
+    YYFPRINTF (zzoutput, "nterm %s (", zztname[zztype]);
+
+  zz_symbol_value_print (zzoutput, zztype, zzvaluep);
+  YYFPRINTF (zzoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| zz_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_stack_print (zztype_int16 *bottom, zztype_int16 *top)
+#else
+static void
+zz_stack_print (bottom, top)
+    zztype_int16 *bottom;
+    zztype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (zzdebug)							\
+    zz_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_reduce_print (YYSTYPE *zzvsp, int zzrule)
+#else
+static void
+zz_reduce_print (zzvsp, zzrule)
+    YYSTYPE *zzvsp;
+    int zzrule;
+#endif
+{
+  int zznrhs = zzr2[zzrule];
+  int zzi;
+  unsigned long int zzlno = zzrline[zzrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     zzrule - 1, zzlno);
+  /* The symbols being reduced.  */
+  for (zzi = 0; zzi < zznrhs; zzi++)
+    {
+      fprintf (stderr, "   $%d = ", zzi + 1);
+      zz_symbol_print (stderr, zzrhs[zzprhs[zzrule] + zzi],
+		       &(zzvsp[(zzi + 1) - (zznrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (zzdebug)				\
+    zz_reduce_print (zzvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int zzdebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+

+
+#if YYERROR_VERBOSE
+
+# ifndef zzstrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define zzstrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+zzstrlen (const char *zzstr)
+#else
+static YYSIZE_T
+zzstrlen (zzstr)
+    const char *zzstr;
+#endif
+{
+  YYSIZE_T zzlen;
+  for (zzlen = 0; zzstr[zzlen]; zzlen++)
+    continue;
+  return zzlen;
+}
+#  endif
+# endif
+
+# ifndef zzstpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define zzstpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+zzstpcpy (char *zzdest, const char *zzsrc)
+#else
+static char *
+zzstpcpy (zzdest, zzsrc)
+    char *zzdest;
+    const char *zzsrc;
+#endif
+{
+  char *zzd = zzdest;
+  const char *zzs = zzsrc;
+
+  while ((*zzd++ = *zzs++) != '\0')
+    continue;
+
+  return zzd - 1;
+}
+#  endif
+# endif
+
+# ifndef zztnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for zzerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from zztname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+zztnamerr (char *zzres, const char *zzstr)
+{
+  if (*zzstr == '"')
+    {
+      YYSIZE_T zzn = 0;
+      char const *zzp = zzstr;
+
+      for (;;)
+	switch (*++zzp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++zzp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (zzres)
+	      zzres[zzn] = *zzp;
+	    zzn++;
+	    break;
+
+	  case '"':
+	    if (zzres)
+	      zzres[zzn] = '\0';
+	    return zzn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! zzres)
+    return zzstrlen (zzstr);
+
+  return zzstpcpy (zzres, zzstr) - zzres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+zzsyntax_error (char *zzresult, int zzstate, int zzchar)
+{
+  int zzn = zzpact[zzstate];
+
+  if (! (YYPACT_NINF < zzn && zzn <= YYLAST))
+    return 0;
+  else
+    {
+      int zztype = YYTRANSLATE (zzchar);
+      YYSIZE_T zzsize0 = zztnamerr (0, zztname[zztype]);
+      YYSIZE_T zzsize = zzsize0;
+      YYSIZE_T zzsize1;
+      int zzsize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *zzarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int zzx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *zzfmt;
+      char const *zzf;
+      static char const zzunexpected[] = "syntax error, unexpected %s";
+      static char const zzexpecting[] = ", expecting %s";
+      static char const zzor[] = " or %s";
+      char zzformat[sizeof zzunexpected
+		    + sizeof zzexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof zzor - 1))];
+      char const *zzprefix = zzexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int zzxbegin = zzn < 0 ? -zzn : 0;
+
+      /* Stay within bounds of both zzcheck and zztname.  */
+      int zzchecklim = YYLAST - zzn + 1;
+      int zzxend = zzchecklim < YYNTOKENS ? zzchecklim : YYNTOKENS;
+      int zzcount = 1;
+
+      zzarg[0] = zztname[zztype];
+      zzfmt = zzstpcpy (zzformat, zzunexpected);
+
+      for (zzx = zzxbegin; zzx < zzxend; ++zzx)
+	if (zzcheck[zzx + zzn] == zzx && zzx != YYTERROR)
+	  {
+	    if (zzcount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		zzcount = 1;
+		zzsize = zzsize0;
+		zzformat[sizeof zzunexpected - 1] = '\0';
+		break;
+	      }
+	    zzarg[zzcount++] = zztname[zzx];
+	    zzsize1 = zzsize + zztnamerr (0, zztname[zzx]);
+	    zzsize_overflow |= (zzsize1 < zzsize);
+	    zzsize = zzsize1;
+	    zzfmt = zzstpcpy (zzfmt, zzprefix);
+	    zzprefix = zzor;
+	  }
+
+      zzf = YY_(zzformat);
+      zzsize1 = zzsize + zzstrlen (zzf);
+      zzsize_overflow |= (zzsize1 < zzsize);
+      zzsize = zzsize1;
+
+      if (zzsize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (zzresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *zzp = zzresult;
+	  int zzi = 0;
+	  while ((*zzp = *zzf) != '\0')
+	    {
+	      if (*zzp == '%' && zzf[1] == 's' && zzi < zzcount)
+		{
+		  zzp += zztnamerr (zzp, zzarg[zzi++]);
+		  zzf += 2;
+		}
+	      else
+		{
+		  zzp++;
+		  zzf++;
+		}
+	    }
+	}
+      return zzsize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+

+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zzdestruct (const char *zzmsg, int zztype, YYSTYPE *zzvaluep)
+#else
+static void
+zzdestruct (zzmsg, zztype, zzvaluep)
+    const char *zzmsg;
+    int zztype;
+    YYSTYPE *zzvaluep;
+#endif
+{
+  YYUSE (zzvaluep);
+
+  if (!zzmsg)
+    zzmsg = "Deleting";
+  YY_SYMBOL_PRINT (zzmsg, zztype, zzvaluep, zzlocationp);
+
+  switch (zztype)
+    {
+
+      default:
+	break;
+    }
+}
+

+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int zzparse (void *YYPARSE_PARAM);
+#else
+int zzparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int zzparse (void);
+#else
+int zzparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int zzchar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE zzlval;
+
+/* Number of syntax errors so far.  */
+int zznerrs;
+
+
+
+/*----------.
+| zzparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+zzparse (void *YYPARSE_PARAM)
+#else
+int
+zzparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+zzparse (void)
+#else
+int
+zzparse ()
+
+#endif
+#endif
+{
+  
+  int zzstate;
+  int zzn;
+  int zzresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int zzerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int zztoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char zzmsgbuf[128];
+  char *zzmsg = zzmsgbuf;
+  YYSIZE_T zzmsg_alloc = sizeof zzmsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `zzss': related to states,
+     `zzvs': related to semantic values,
+     `zzls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow zzoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  zztype_int16 zzssa[YYINITDEPTH];
+  zztype_int16 *zzss = zzssa;
+  zztype_int16 *zzssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE zzvsa[YYINITDEPTH];
+  YYSTYPE *zzvs = zzvsa;
+  YYSTYPE *zzvsp;
+
+
+
+#define YYPOPSTACK(N)   (zzvsp -= (N), zzssp -= (N))
+
+  YYSIZE_T zzstacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE zzval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int zzlen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  zzstate = 0;
+  zzerrstatus = 0;
+  zznerrs = 0;
+  zzchar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  zzssp = zzss;
+  zzvsp = zzvs;
+
+  goto zzsetstate;
+
+/*------------------------------------------------------------.
+| zznewstate -- Push a new state, which is found in zzstate.  |
+`------------------------------------------------------------*/
+ zznewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  zzssp++;
+
+ zzsetstate:
+  *zzssp = zzstate;
+
+  if (zzss + zzstacksize - 1 <= zzssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T zzsize = zzssp - zzss + 1;
+
+#ifdef zzoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *zzvs1 = zzvs;
+	zztype_int16 *zzss1 = zzss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if zzoverflow is a macro.  */
+	zzoverflow (YY_("memory exhausted"),
+		    &zzss1, zzsize * sizeof (*zzssp),
+		    &zzvs1, zzsize * sizeof (*zzvsp),
+
+		    &zzstacksize);
+
+	zzss = zzss1;
+	zzvs = zzvs1;
+      }
+#else /* no zzoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto zzexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= zzstacksize)
+	goto zzexhaustedlab;
+      zzstacksize *= 2;
+      if (YYMAXDEPTH < zzstacksize)
+	zzstacksize = YYMAXDEPTH;
+
+      {
+	zztype_int16 *zzss1 = zzss;
+	union zzalloc *zzptr =
+	  (union zzalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (zzstacksize));
+	if (! zzptr)
+	  goto zzexhaustedlab;
+	YYSTACK_RELOCATE (zzss);
+	YYSTACK_RELOCATE (zzvs);
+
+#  undef YYSTACK_RELOCATE
+	if (zzss1 != zzssa)
+	  YYSTACK_FREE (zzss1);
+      }
+# endif
+#endif /* no zzoverflow */
+
+      zzssp = zzss + zzsize - 1;
+      zzvsp = zzvs + zzsize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) zzstacksize));
+
+      if (zzss + zzstacksize - 1 <= zzssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", zzstate));
+
+  goto zzbackup;
+
+/*-----------.
+| zzbackup.  |
+`-----------*/
+zzbackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  zzn = zzpact[zzstate];
+  if (zzn == YYPACT_NINF)
+    goto zzdefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (zzchar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      zzchar = YYLEX;
+    }
+
+  if (zzchar <= YYEOF)
+    {
+      zzchar = zztoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      zztoken = YYTRANSLATE (zzchar);
+      YY_SYMBOL_PRINT ("Next token is", zztoken, &zzlval, &zzlloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  zzn += zztoken;
+  if (zzn < 0 || YYLAST < zzn || zzcheck[zzn] != zztoken)
+    goto zzdefault;
+  zzn = zztable[zzn];
+  if (zzn <= 0)
+    {
+      if (zzn == 0 || zzn == YYTABLE_NINF)
+	goto zzerrlab;
+      zzn = -zzn;
+      goto zzreduce;
+    }
+
+  if (zzn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (zzerrstatus)
+    zzerrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", zztoken, &zzlval, &zzlloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (zzchar != YYEOF)
+    zzchar = YYEMPTY;
+
+  zzstate = zzn;
+  *++zzvsp = zzlval;
+
+  goto zznewstate;
+
+
+/*-----------------------------------------------------------.
+| zzdefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+zzdefault:
+  zzn = zzdefact[zzstate];
+  if (zzn == 0)
+    goto zzerrlab;
+  goto zzreduce;
+
+
+/*-----------------------------.
+| zzreduce -- Do a reduction.  |
+`-----------------------------*/
+zzreduce:
+  /* zzn is the number of a rule to reduce with.  */
+  zzlen = zzr2[zzn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  zzval = zzvsp[1-zzlen];
+
+
+  YY_REDUCE_PRINT (zzn);
+  switch (zzn)
+    {
+        case 2:
+#line 71 "beauy.y"
+    { theend(); }
+    break;
+
+  case 7:
+#line 82 "beauy.y"
+    { newline(0); }
+    break;
+
+  case 10:
+#line 85 "beauy.y"
+    { newline(0); }
+    break;
+
+  case 11:
+#line 86 "beauy.y"
+    { newline(1); }
+    break;
+
+  case 12:
+#line 87 "beauy.y"
+    { newline(1); }
+    break;
+
+  case 13:
+#line 88 "beauy.y"
+    { newline(1); }
+    break;
+
+  case 14:
+#line 89 "beauy.y"
+    { newline(1); }
+    break;
+
+  case 30:
+#line 129 "beauy.y"
+    { newline(0); tabs(1); }
+    break;
+
+  case 31:
+#line 130 "beauy.y"
+    { newline(1); tabs(1); }
+    break;
+
+  case 32:
+#line 131 "beauy.y"
+    { newline(1); tabs(1); }
+    break;
+
+  case 48:
+#line 163 "beauy.y"
+    { tabs(-1); }
+    break;
+
+  case 49:
+#line 163 "beauy.y"
+    { newline(1); }
+    break;
+
+  case 70:
+#line 204 "beauy.y"
+    { newline(0); tabs(1);}
+    break;
+
+  case 71:
+#line 206 "beauy.y"
+    { tabs(-1); }
+    break;
+
+  case 72:
+#line 206 "beauy.y"
+    { newline(1);}
+    break;
+
+  case 73:
+#line 211 "beauy.y"
+    { newline(0); tabs(1);}
+    break;
+
+  case 74:
+#line 213 "beauy.y"
+    { tabs(-1); }
+    break;
+
+  case 75:
+#line 213 "beauy.y"
+    { newline(1);}
+    break;
+
+  case 76:
+#line 218 "beauy.y"
+    { newline(1); tabs(1);}
+    break;
+
+  case 77:
+#line 220 "beauy.y"
+    {tabs(-1); }
+    break;
+
+  case 78:
+#line 220 "beauy.y"
+    { newline(1);}
+    break;
+
+  case 81:
+#line 226 "beauy.y"
+    { newline(1); tabs(1);}
+    break;
+
+  case 82:
+#line 227 "beauy.y"
+    { newline(1); tabs(-1);}
+    break;
+
+  case 83:
+#line 231 "beauy.y"
+    { newline(1); tabs(1);}
+    break;
+
+  case 84:
+#line 234 "beauy.y"
+    { tabs(-1); }
+    break;
+
+  case 85:
+#line 234 "beauy.y"
+    { newline(1);}
+    break;
+
+  case 88:
+#line 241 "beauy.y"
+    { newline(1); tabs(1);}
+    break;
+
+  case 89:
+#line 242 "beauy.y"
+    { newline(1); tabs(-1);}
+    break;
+
+  case 91:
+#line 246 "beauy.y"
+    { newline(1); tabs(1);}
+    break;
+
+  case 92:
+#line 247 "beauy.y"
+    { newline(1); tabs(-1);}
+    break;
+
+  case 93:
+#line 252 "beauy.y"
+    { newline(1); tabs(1);}
+    break;
+
+  case 94:
+#line 254 "beauy.y"
+    { tabs(-1); }
+    break;
+
+  case 95:
+#line 254 "beauy.y"
+    { newline(0);}
+    break;
+
+  case 96:
+#line 260 "beauy.y"
+    { newline(1);tabs(1);}
+    break;
+
+  case 97:
+#line 262 "beauy.y"
+    {tabs(-1); newline(1); }
+    break;
+
+  case 100:
+#line 271 "beauy.y"
+    { newline(1); tabs(1); }
+    break;
+
+  case 101:
+#line 273 "beauy.y"
+    { tabs(-1); }
+    break;
+
+  case 102:
+#line 273 "beauy.y"
+    { newline(1);}
+    break;
+
+  case 103:
+#line 278 "beauy.y"
+    { newline(1); tabs(1); }
+    break;
+
+  case 105:
+#line 283 "beauy.y"
+    { tabs(-1);}
+    break;
+
+  case 106:
+#line 283 "beauy.y"
+    { newline(1);}
+    break;
+
+  case 107:
+#line 284 "beauy.y"
+    { newline(0); tabs(1);}
+    break;
+
+  case 109:
+#line 285 "beauy.y"
+    { newline(1); tabs(1); }
+    break;
+
+  case 111:
+#line 288 "beauy.y"
+    { tabs(-1);}
+    break;
+
+  case 112:
+#line 291 "beauy.y"
+    { bra(); }
+    break;
+
+  case 113:
+#line 294 "beauy.y"
+    { ket(); }
+    break;
+
+  case 114:
+#line 297 "beauy.y"
+    { bra(); }
+    break;
+
+  case 115:
+#line 300 "beauy.y"
+    { ket(); }
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+#line 2026 "y.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", zzr1[zzn], &zzval, &zzloc);
+
+  YYPOPSTACK (zzlen);
+  zzlen = 0;
+  YY_STACK_PRINT (zzss, zzssp);
+
+  *++zzvsp = zzval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  zzn = zzr1[zzn];
+
+  zzstate = zzpgoto[zzn - YYNTOKENS] + *zzssp;
+  if (0 <= zzstate && zzstate <= YYLAST && zzcheck[zzstate] == *zzssp)
+    zzstate = zztable[zzstate];
+  else
+    zzstate = zzdefgoto[zzn - YYNTOKENS];
+
+  goto zznewstate;
+
+
+/*------------------------------------.
+| zzerrlab -- here on detecting error |
+`------------------------------------*/
+zzerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!zzerrstatus)
+    {
+      ++zznerrs;
+#if ! YYERROR_VERBOSE
+      zzerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T zzsize = zzsyntax_error (0, zzstate, zzchar);
+	if (zzmsg_alloc < zzsize && zzmsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T zzalloc = 2 * zzsize;
+	    if (! (zzsize <= zzalloc && zzalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      zzalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (zzmsg != zzmsgbuf)
+	      YYSTACK_FREE (zzmsg);
+	    zzmsg = (char *) YYSTACK_ALLOC (zzalloc);
+	    if (zzmsg)
+	      zzmsg_alloc = zzalloc;
+	    else
+	      {
+		zzmsg = zzmsgbuf;
+		zzmsg_alloc = sizeof zzmsgbuf;
+	      }
+	  }
+
+	if (0 < zzsize && zzsize <= zzmsg_alloc)
+	  {
+	    (void) zzsyntax_error (zzmsg, zzstate, zzchar);
+	    zzerror (zzmsg);
+	  }
+	else
+	  {
+	    zzerror (YY_("syntax error"));
+	    if (zzsize != 0)
+	      goto zzexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (zzerrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (zzchar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (zzchar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  zzdestruct ("Error: discarding",
+		      zztoken, &zzlval);
+	  zzchar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto zzerrlab1;
+
+
+/*---------------------------------------------------.
+| zzerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+zzerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label zzerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto zzerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (zzlen);
+  zzlen = 0;
+  YY_STACK_PRINT (zzss, zzssp);
+  zzstate = *zzssp;
+  goto zzerrlab1;
+
+
+/*-------------------------------------------------------------.
+| zzerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+zzerrlab1:
+  zzerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      zzn = zzpact[zzstate];
+      if (zzn != YYPACT_NINF)
+	{
+	  zzn += YYTERROR;
+	  if (0 <= zzn && zzn <= YYLAST && zzcheck[zzn] == YYTERROR)
+	    {
+	      zzn = zztable[zzn];
+	      if (0 < zzn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (zzssp == zzss)
+	YYABORT;
+
+
+      zzdestruct ("Error: popping",
+		  zzstos[zzstate], zzvsp);
+      YYPOPSTACK (1);
+      zzstate = *zzssp;
+      YY_STACK_PRINT (zzss, zzssp);
+    }
+
+  if (zzn == YYFINAL)
+    YYACCEPT;
+
+  *++zzvsp = zzlval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", zzstos[zzn], zzvsp, zzlsp);
+
+  zzstate = zzn;
+  goto zznewstate;
+
+
+/*-------------------------------------.
+| zzacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+zzacceptlab:
+  zzresult = 0;
+  goto zzreturn;
+
+/*-----------------------------------.
+| zzabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+zzabortlab:
+  zzresult = 1;
+  goto zzreturn;
+
+#ifndef zzoverflow
+/*-------------------------------------------------.
+| zzexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+zzexhaustedlab:
+  zzerror (YY_("memory exhausted"));
+  zzresult = 2;
+  /* Fall through.  */
+#endif
+
+zzreturn:
+  if (zzchar != YYEOF && zzchar != YYEMPTY)
+     zzdestruct ("Cleanup: discarding lookahead",
+		 zztoken, &zzlval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (zzlen);
+  YY_STACK_PRINT (zzss, zzssp);
+  while (zzssp != zzss)
+    {
+      zzdestruct ("Cleanup: popping",
+		  zzstos[*zzssp], zzvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef zzoverflow
+  if (zzss != zzssa)
+    YYSTACK_FREE (zzss);
+#endif
+#if YYERROR_VERBOSE
+  if (zzmsg != zzmsgbuf)
+    YYSTACK_FREE (zzmsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (zzresult);
+}
+
+
+#line 445 "beauy.y"
+
+#include "beaul.c"
+
+
diff --git a/src/Macro/beauy.y b/src/Macro/beauy.y
new file mode 100644
index 0000000..881b63e
--- /dev/null
+++ b/src/Macro/beauy.y
@@ -0,0 +1,447 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+%{
+#include <stdlib.h>
+#include <stdio.h>
+extern void newline(int);
+%}
+
+%start script
+
+%token IF
+%token AND
+%token NOT
+%token OR
+%token THEN
+%token ELSE
+%token END
+%token RETURN
+%token DO
+%token FUNCTION
+%token ON
+%token GLOBAL
+%token VECTOR
+%token WHILE
+%token INCLUDE
+%token EXTERN
+%token GE
+%token LE
+%token NE
+%token FOR
+%token TO
+%token BY
+%token NIL
+%token OBJECT
+%token IMPORT
+%token EXPORT
+%token INLINE
+%token ENDINLINE
+
+%token CASE
+%token OTHERWISE
+%token OF
+
+%token IN
+
+%token REPEAT
+%token UNTIL
+%token LOOP
+%token WHEN
+%token TELL
+%token TASK
+
+%token WORD
+%token STRING
+%token NUMBER
+%token DATE
+%token TIME
+
+%token ARROW
+
+
+%%
+
+script  : block { theend(); } 
+        ;
+
+block   : lines
+        | empty
+        ;
+
+lines   : line       
+        | lines line
+        ;
+
+line    : statement  { newline(0); }
+        | function 
+        | control   
+        | declare    { newline(0); }
+        | extern     { newline(1); }
+        | import     { newline(1); }
+        | export     { newline(1); }
+        | include    { newline(1); }
+        | ';'
+        ;
+
+
+name    : WORD;
+
+declare : GLOBAL name
+        | GLOBAL name '=' expression
+        ;
+
+extern  : extern_name extern_param_declare
+        | extern_name extern_param_declare  STRING
+        | extern_name extern_param_declare  STRING inline
+        ;
+
+extern_name : EXTERN fname 
+            ;
+
+import      : IMPORT name
+            ;
+
+export      : EXPORT name
+            ;
+
+include     : INCLUDE STRING
+            | INCLUDE name
+            ;
+
+inline      : INLINE  ENDINLINE
+            ;
+
+/*======================================================================*/
+
+function : beginfunction block  endfunction
+         ;
+
+beginfunction : functionheader  param_declare super_declare
+			;
+
+param_declare : empty                    { newline(0); tabs(1); } 
+              | rbra rket                { newline(1); tabs(1); } 
+              | rbra param_list rket     { newline(1); tabs(1); } 
+              ;
+
+super_declare   : empty
+				| ':' super_list
+				;
+
+super_list : super
+			| super_list ',' super
+			;
+
+super : function_call 
+	;
+
+extern_param_declare : empty
+                     | rbra rket
+                     | rbra param_list rket
+                     ;
+
+functionheader : FUNCTION fname  
+               | ON       fname 
+			   | OBJECT   fname
+               ;
+
+param_list     : param                      
+               | param_list ',' param       
+               ;
+
+param          : name                       
+               | name ':' name              
+               ;
+
+endfunction    : END { tabs(-1); } fname            { newline(1); }
+             ;
+
+fname          : name
+			   | operator
+			   ;
+
+
+/*======================================================================*/
+
+statement   : assignement  
+            | function_call
+            | return  
+            | name   
+            ;
+
+return      : RETURN                        
+            | RETURN expression             
+
+/*======================================================================*/
+
+assignement : name '=' expression       
+            | name sbra parameters sket '=' expression       
+            | name '.' name   '='  expression
+            | name '.' NUMBER '='  expression
+            ;
+
+/*======================================================================*/
+
+control     : if   
+            | while 
+            | for   
+            | repeat
+            | case   
+            | loop   
+            | when   
+            | tell   
+            ;
+
+/*======================================================================*/
+
+loop        : LOOP name IN expression      { newline(0); tabs(1);}
+                block 
+              END { tabs(-1); } LOOP       { newline(1);}
+            ;
+
+
+/*======================================================================*/
+tell       : TELL expression               { newline(0); tabs(1);}
+                  block
+             END { tabs(-1); } TELL        { newline(1);}
+           ;
+
+/*======================================================================*/
+
+when        : WHEN                         { newline(1); tabs(1);} 
+                selections
+              END {tabs(-1); } WHEN        { newline(1);} 
+
+selections  : selection
+            | selections selection
+            ;
+
+selection   : expression ':'                 { newline(1); tabs(1);}
+                block END                    { newline(1); tabs(-1);}
+
+/*======================================================================*/
+
+case        : CASE expression OF          { newline(1); tabs(1);} 
+                choices
+                otherwise
+              END { tabs(-1); } CASE      { newline(1);} 
+            ;
+
+choices     : choice 
+            | choices choice
+            ;
+
+choice      :   parameters ':'            { newline(1); tabs(1);} 
+                         block END        { newline(1); tabs(-1);} 
+            ;
+
+otherwise   :   empty                    
+            |   OTHERWISE  ':'            { newline(1); tabs(1);}
+                         block END        { newline(1); tabs(-1);}
+            ;
+            
+
+/*======================================================================*/
+repeat      : REPEAT                           { newline(1); tabs(1);}     
+                 block
+              UNTIL { tabs(-1); } expression   { newline(0);}
+            ;
+
+/*======================================================================*/
+
+for         :  FOR name '=' expression TO expression by 
+					DO  { newline(1);tabs(1);}
+                      block
+               END FOR  {tabs(-1); newline(1); }
+            ;
+            
+by          : empty         
+            | BY expression 
+            ;
+
+/*======================================================================*/
+
+while       : WHILE expression DO          { newline(1); tabs(1); } 
+                 block
+              END { tabs(-1); } WHILE      { newline(1);} 
+            ;
+
+/*======================================================================*/
+
+if          : IF expression THEN           { newline(1); tabs(1); }
+                 block 
+              closeif                      
+            ;
+
+closeif     : END  { tabs(-1);} IF           { newline(1);}
+            | else { newline(0); tabs(1);}  block closeif 
+            | else IF expression THEN { newline(1); tabs(1); } block closeif                
+            ;
+
+else        : ELSE { tabs(-1);}
+/*======================================================================*/
+
+rbra : '('  { bra(); }
+     ;
+
+rket : ')'  { ket(); }
+     ;
+
+sbra : '['  { bra(); }
+     ;
+
+sket : ']'  { ket(); }
+     ;
+
+
+definition : rbra attribute_list rket
+           | rbra parameter ',' parameters rket
+		   | rbra rket
+           ;
+
+                
+function_call   : name rbra param_or_empty rket
+                | name rbra attribute_list rket
+                | definition
+				| inline_object
+                | atom sbra parameters sket
+                | atom '.' name           
+                | atom '.' NUMBER
+				| name ARROW name rbra param_or_empty rket
+				| name ARROW name rbra attribute_list rket
+                ;
+
+inline_object : name inline
+			;
+
+/*======================================================================*/
+
+
+param_or_empty  : empty                         
+                | parameters
+                ;
+
+parameters  : parameter                     
+            | parameter ',' parameters      
+            ;
+
+parameter   : expression
+            ;
+
+attribute   : name ':' expression
+            | STRING ':' expression
+            ;
+
+attribute_list : attribute                    
+               | attribute ',' parameter      
+               | attribute ',' attribute_list 
+               | parameter ',' attribute_list 
+               ;
+
+vector_list : vector vector           
+            | vector_list vector      
+            ;
+
+matrix      : vector_list               
+            ;
+
+vector      : '|' parameters '|'        
+            ;
+
+list        : sbra param_or_empty sket
+            ;
+
+number      : NUMBER                
+            | '-' NUMBER            
+            ;
+
+atom        : name                  
+            | STRING                
+            | DATE TIME             
+            | DATE                  
+            | TIME                  
+            | function_call
+            | rbra expression rket
+            | list
+            | vector
+            | matrix
+            | NIL                   
+            | '-' atom              
+            ;
+
+atom_or_number: atom
+              | number
+              ;
+
+
+/* note: a^b^c -> a^(b^c) as in fortran */
+power       : atom_or_number '^' power        
+            | atom_or_number
+            ;
+
+factor      : factor '*' power      
+            | factor '/' power      
+            | power
+            ;
+
+term        : term '+' factor       
+            | term '-' factor       
+            | term '&' factor       
+            | factor
+            ;
+
+condition   : condition '>' term         
+            | condition '=' term         
+            | condition '<' term         
+            | condition  GE term         
+            | condition  LE term         
+            | condition  NE term         
+            | condition  IN term         
+            | condition  NOT IN term     
+            | NOT condition              
+            | term
+            ;
+
+operator    : '>'
+			| '=' 
+			| '<'
+			| GE
+			| LE 
+			| NE
+			| IN
+			| NOT
+			| '^'
+			| '*'
+			| '/'
+			| '+'
+			| '-'
+			| '&'
+			| AND
+			| OR
+			| '[' ']'
+			;
+
+conjonction : conjonction AND condition    
+            | condition
+            ;
+
+disjonction : disjonction OR conjonction 
+            | conjonction
+            ;
+
+expression  : disjonction
+            ;
+
+empty       :
+            ;
+
+%%
+#include "beaul.c"
+
diff --git a/src/Macro/bufr.cc b/src/Macro/bufr.cc
new file mode 100644
index 0000000..a50fc79
--- /dev/null
+++ b/src/Macro/bufr.cc
@@ -0,0 +1,2295 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+#include <ctype.h>
+#include <float.h>
+#include <string.h>
+#include "macro.h"
+#include "arith.h"
+#include "cbufr.h"
+#include "MvFieldSet.h"
+#include "inc_stl.h"
+#include "MvPath.hpp"
+
+// should include MvFieldSet.h, but it requires other header files...
+//double interpolateValue( field* Grib, double lat, double lon );
+
+
+// To do : filter(geo,area)
+// Rms = sqrt(geo*geo/2)
+// Mean
+// distance(ab) = R*acos(sin(latA)*sin(latB)+cos(latA)*cos(latB)*cos(lonA-LonB))
+
+//===========================================================================
+
+
+// used in function GeoGetFieldFunction
+enum eGeoptFieldType
+{
+    GPT_VALUE =  0,
+    GPT_VALUE2,
+    GPT_LAT,
+    GPT_LON,
+    GPT_DATE,
+	GPT_TIME,
+	GPT_LEVEL
+};
+
+
+CBufr::CBufr(request *s) : InPool(tbufr,s)
+{
+	r = clone_all_requests(s);
+}
+
+CBufr::~CBufr()
+{
+	mars.debug = true;
+	print_all_requests(r);
+	mars.debug = false;
+
+	const char *t = get_value(r,"TEMPORARY",0);
+	const char *p = get_value(r,"PATH",0);
+	if(t && p)
+	{
+		if(atoi(t)) {
+			unlink(p);
+		}
+	}
+	free_all_requests(r);
+}
+
+const char *CBufr::GetFileName()
+{
+	return get_value(r,"PATH",0);
+}
+
+void CBufr::ToRequest(request* &s)
+{
+	s = r;
+}
+
+int CBufr::Write(FILE* f)
+{
+	return CopyFile(get_value(r,"PATH",0),f);
+}
+
+CBufr::CBufr(const char  *p,int temp) : InPool(tbufr)
+{
+	r = empty_request("BUFR");
+	//set_value(r,"PATH","%s",p);
+	set_value(r,"PATH","%s",FullPathName(p).c_str() );
+	set_value(r,"TEMPORARY","%d",temp);
+}
+
+//===========================================================================
+class MergeBufrFunction : public Function {
+public:
+	MergeBufrFunction (const char *n) : Function(n,2,tbufr,tbufr) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MergeBufrFunction::Execute(int,Value *arg)
+{
+	CBufr *a;
+	CBufr *b;
+
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+
+	char *tmp = marstmp();
+
+	char buf[2048];
+	sprintf(buf,"cat %s %s > %s",a->GetFileName(),
+			b->GetFileName(),tmp);
+	system(buf);
+
+	return Value(new CBufr(tmp,1));
+
+}
+
+//===========================================================================
+//===========================================================================
+
+void CGeopts::load(void)
+{
+	if( gpts.count() > 0 )
+	  return;
+
+	if( r )
+	  {
+	    const char* path = get_value(r,"PATH",0);
+	    gpts.load( path );
+	  }
+	//else
+	//  is probably a geopoints structure in memory, or with zero count!
+}
+
+void CGeopts::unload(void)
+{
+//	if( gpts.count() > 0 || (r == NULL))
+//	  {
+	    if(r == NULL)
+	      {
+		char* path = marstmp();
+		gpts.write( path );
+
+		r = empty_request("GEOPOINTS");
+		set_value(r,"TEMPORARY","1");
+		set_value(r,"PATH","%s",path);
+	      }
+
+	    gpts.unload();
+//	  }
+}
+
+int CGeopts::Write(FILE* f)
+{
+	unload();
+	return CopyFile(get_value(r,"PATH",0),f);
+}
+
+CGeopts::CGeopts(request *s) : InPool(tgeopts,s)
+{
+	r = clone_all_requests(s);
+}
+
+CGeopts::CGeopts(const char  *p,int temp) : InPool(tgeopts)
+{
+	r = empty_request("GEOPOINTS");
+	//set_value(r,"PATH","%s",p);
+	set_value(r,"PATH","%s",FullPathName(p).c_str());
+	set_value(r,"TEMPORARY","%d",temp);
+}
+
+CGeopts::CGeopts(long count) : InPool(tgeopts)
+{
+	r = NULL;
+	gpts.newReservedSize (count);
+}
+
+
+CGeopts::CGeopts(CGeopts  *p) : InPool(tgeopts)
+{
+	r = NULL;
+	p->load();
+	gpts = p->gpts;
+}
+
+
+CGeopts::CGeopts( CGeopts* p, fieldset* v, int n, bool nearest)  : InPool(tgeopts)
+{
+	r = NULL;
+	p->load();
+	gpts.newReservedSize( p->gpts.count() );
+	gpts.format( p->gpts.format() );
+
+	field* g = get_field(v,n,expand_mem);
+	MvField fld( g );
+
+	//-- get date/time/level metadata from the GRIB field
+	MvDate base( fld.yyyymmddFoh() );  //-- base (analysis) date
+	double step = fld.stepFoh();       //-- forecast step
+	MvDate valid = base + step;        //-- valid date
+	long dat = valid.YyyyMmDd();
+	long tim = valid.Hour()*100 + valid.Minute();
+	double level = fld.level();
+
+	n = 0;
+	for( int i=0; i < p->gpts.count(); i++ )
+	{
+		double x;
+		if( nearest )
+		{
+			x = fld.nearestGridpoint( (*p)[i].lon_x(), (*p)[i].lat_y() );
+		}
+		else
+		{
+			x = fld.interpolateAt( (*p)[i].lon_x(), (*p)[i].lat_y() );
+		}
+
+		MvGeoP1 pt = p->gpts[ i ];
+
+		if(x != DBL_MAX && x != mars.grib_missing_value)
+		{
+			pt.value( x );
+		}
+		else
+		{
+			// x will be DBL_MAX if there is no valid corresponding grid value.
+			pt.set_value_missing();
+		}
+
+		pt.date( dat );
+		pt.time( tim );
+		pt.height( level );
+
+		gpts[ n ] = pt;
+		n++;
+	}
+
+	release_field(g);
+}
+
+
+//CGeopts::CGeopts(fieldset *v,int n) : InPool(tgeopts)
+CGeopts::CGeopts(fieldset*, int ) : InPool(tgeopts)
+{
+#if 0
+	r = NULL;
+	field *g = get_field(v,n,expand_mem);
+
+	count  = g->sec4len;
+	pts    = new geopt[count];
+
+	float *lats = new float[count];
+	float *lons = new float[count];
+
+	fortint len    = g->length;
+	fortint incnt  = count;
+	fortint outcnt = count;
+	fortint ret    = 0;
+
+	getfld_(g->buffer,&len,lats,lons,&incnt,&outcnt,&ret);
+
+	for(int i=0;i<count;i++)
+	{
+		pts[i].latitude  = lats[i];
+		pts[i].longitude = lons[i];
+		pts[i].value     = g->rsec4[i];
+		pts[i].height    = 0;
+		pts[i].date      = 0;
+		pts[i].time      = 0;
+	}
+
+	release_field(g);
+
+	delete[] lats;
+	delete[] lons;
+#endif
+}
+
+CGeopts::~CGeopts()
+{
+	if(r)
+	{
+		const char *t = get_value(r,"TEMPORARY",0);
+		const char *p = get_value(r,"PATH",0);
+		if(t && p)
+		{
+			if(atoi(t)) {
+				unlink(p);
+			}
+		}
+	}
+	//if(count) delete[] pts;
+	free_all_requests(r);
+}
+
+void CGeopts::ToRequest(request* &s)
+{
+	unload();
+	s = r;
+}
+
+//===========================================================================
+class CountGeoFunction : public Function {
+public:
+	CountGeoFunction (const char *n) : Function(n,1,tgeopts) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value CountGeoFunction::Execute(int,Value *arg)
+{
+	CGeopts *g;
+	arg[0].GetValue(g);
+	g->load();
+	return Value(g->Count());
+}
+
+//===========================================================================
+class MaxGeoFunction : public Function {
+	int usemax;
+public:
+	MaxGeoFunction(const char *n,int m) : Function(n,1,tgeopts),usemax(m) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MaxGeoFunction::Execute(int,Value *arg)
+{
+	long i;
+	long nFirstValid;
+	double x;
+	CGeopts *g;
+	arg[0].GetValue(g);
+	g->load();
+	if(g->Count() == 0) return Value();
+
+
+	// Get the index of the first valid point. If -1 is returned,
+	// then there are no valid points.
+
+	nFirstValid = g->indexOfFirstValidPoint();
+
+	if (nFirstValid == -1)
+	{
+		return Value();
+	}
+
+
+	// store the first valid value, then replace it with each successive
+	// greater or smaller value
+
+	x = (*g)[nFirstValid].value();
+
+	if (usemax)
+	{
+		for (i = nFirstValid + 1; i <g->Count(); i++)
+ 		{
+			if (!(*g)[i].value_missing())	// only consider non-missing values
+				if ((*g)[i].value() > x)
+					x = (*g)[i].value();
+		}
+	}
+	else
+	{
+		for (i = nFirstValid + 1; i<g->Count(); i++)
+		{
+			if (!(*g)[i].value_missing())	// only consider non-missing values
+				if ((*g)[i].value() < x )
+					x = (*g)[i].value();
+		}
+	}
+
+	return Value(x);
+}
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+class FilterBoxFunction : public Function {
+public:
+	FilterBoxFunction (const char *n) : Function(n) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+Value FilterBoxFunction::Execute(int arity,Value *arg)
+{
+	CGeopts *g;
+	arg[0].GetValue(g);
+
+	double d[4];  //-- get area and normalize it with MvGeoBox
+	if(arity == 2)
+    {
+            CList *l;
+            arg[1].GetValue(l);
+            for(int i = 0;i<4;i++)
+                (*l)[i].GetValue(d[i]);
+    }
+	else
+	{
+	    for(int i = 0;i<4;i++)
+        arg[i+1].GetValue(d[i]);
+	}
+	MvGeoBox myArea( d[0], d[1], d[2], d[3] );
+
+	g->load();
+	CGeopts *x = new CGeopts(g);
+
+	int n = 0;
+	for(int i=0; i<g->Count(); i++ )
+	{
+		if( myArea.isInside( (*g)[i].lat_y(), (*g)[i].lon_x() ) )
+		{
+			(*x)[n++] = (*g)[i];
+	}
+	}
+
+	x->SetSize(n);
+
+	g->unload();
+	x->unload();
+
+	return Value(x);
+}
+int FilterBoxFunction::ValidArguments(int arity,Value *arg)
+{
+    int i;
+    CList *l;
+
+    if(arity<1) return false;
+    if(arg[0].GetType() != tgeopts)   return false;
+
+    switch(arity)
+    {
+        case 5:
+            for(i = 1;i<5;i++) if(arg[i].GetType() != tnumber) return false;
+            break;
+        case 2:
+            switch(arg[1].GetType())
+            {
+                case tlist:
+                    arg[1].GetValue(l);
+                    if(l->Count() != 4) return false;
+                    for(i = 0;i<4;i++)
+                        if((*l)[i].GetType() != tnumber)
+							return false;
+                    return true;
+
+                default:
+                    return false;
+            }
+
+            /* break; */
+
+        case 1:
+            break;
+
+        default:
+            return false;
+
+    }
+    return true;
+}
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+class FilterLevelFunction : public Function {
+public:
+	FilterLevelFunction (const char *n) : Function(n) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+Value FilterLevelFunction::Execute(int arity,Value *arg)
+{
+	CGeopts *g;
+	arg[0].GetValue(g);
+
+	int    i;
+	float  f[2];      //-- geopt.height is float
+	float& l1 = f[0];
+	float& l2 = f[1];
+
+	if(arity == 2)
+	  {
+		if(arg[1].GetType() == tnumber)
+		  {
+		    double dd;
+		    arg[1].GetValue(dd);
+		    l2 = l1 = (float)dd;
+		  }
+		else
+		  {
+		    CList *l;
+		    arg[1].GetValue(l);
+		    double dd;
+		    for(i = 0;i<2;i++)
+		      {
+			(*l)[i].GetValue(dd);
+			f[i] = (float)dd;
+		      }
+		  }
+	  }
+	else
+	  {
+	    for(i = 0;i<2;i++)
+	      {
+		double dd;
+		arg[i+1].GetValue(dd);
+		f[i] = dd;
+	      }
+	  }
+
+	g->load();
+
+	CGeopts *x = new CGeopts(g);
+
+	int n = 0;
+
+	for(i=0;i<g->Count();i++)
+	  {
+	    if( l1 <= (*g)[i].height() && (*g)[i].height() <= l2 )
+	      {
+		(*x)[n++] = (*g)[i];
+	      }
+	  }
+
+	x->SetSize(n);
+
+	g->unload();
+	x->unload();
+
+	return Value(x);
+}
+int FilterLevelFunction::ValidArguments(int arity,Value *arg)
+{
+    int i;
+    CList *l;
+
+    if(arity<1) return false;
+    if(arg[0].GetType() != tgeopts)   return false;
+
+    switch(arity)
+    {
+        case 3:
+            for(i = 1;i<3;i++) if(arg[i].GetType() != tnumber) return false;
+            break;
+        case 2:
+            switch(arg[1].GetType())
+            {
+                case tlist:
+                    arg[1].GetValue(l);
+                    if(l->Count() != 2) return false;
+                    for(i = 0;i<2;i++)
+                        if((*l)[i].GetType() != tnumber)
+							return false;
+                    return true;
+				case tnumber:
+                    return true;
+
+                default:
+                    return false;
+            }
+
+            /* break; */
+
+        case 1:
+            break;
+
+        default:
+            return false;
+
+    }
+    return true;
+}
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+class FilterDateFunction : public Function {
+public:
+	FilterDateFunction (const char *n) : Function(n) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+Value FilterDateFunction::Execute(int arity,Value *arg)
+{
+	CGeopts *g;
+	arg[0].GetValue(g);
+
+   	Date d[4];
+
+    Date& d1 = d[0];
+    Date& d2 = d[1];
+
+	int	   i;
+
+	if(arity == 2)
+    {
+		if(arg[1].GetType() == tdate)
+		{
+			arg[1].GetValue(d1);
+			d2 = d1;
+		}
+		else
+		{
+            CList *l;
+            arg[1].GetValue(l);
+            for(i = 0;i<2;i++)
+                (*l)[i].GetValue(d[i]);
+		}
+    }
+    else for(i = 0;i<2;i++)
+        arg[i+1].GetValue(d[i]);
+
+	g->load();
+
+	CGeopts *x = new CGeopts(g);
+
+	int n = 0;
+
+	for(i=0;i<g->Count();i++)  {
+		Date date((*g)[i].date(), (*g)[i].time());
+		if( d1 <= date && date <= d2 )
+			(*x)[n++] = (*g)[i];
+	}
+
+	x->SetSize(n);
+
+	g->unload();
+	x->unload();
+
+	return Value(x);
+}
+
+int FilterDateFunction::ValidArguments(int arity,Value *arg)
+{
+    int i;
+    CList *l;
+
+    if(arity<1)
+       return false;
+
+    if(arg[0].GetType() != tgeopts)
+       return false;
+
+    switch(arity)
+    {
+        case 3:
+            for(i = 1;i<3;i++)
+               if(arg[i].GetType() != tdate)
+                  return false;
+
+            break;
+
+        case 2:
+            switch(arg[1].GetType())
+            {
+                case tlist:
+                    arg[1].GetValue(l);
+
+                    if(l->Count() != 2)
+                       return false;
+
+                    for(i = 0;i<2;i++)
+                        if((*l)[i].GetType() != tdate)
+                           return false;
+
+                    return true;
+
+                case tdate:
+                    return true;
+
+                default:
+                    return false;
+            }
+
+            /* break; */
+
+        case 1:
+            break;
+
+        default:
+            return false;
+
+    }
+    return true;
+}
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+
+/*******************************************************************************
+ *
+ * Class        : RemoveMissingValuesFunction : Function
+ *
+ * Description  : Macro function that creates a new set of geopoints based on
+ *                an input set of geopoints but with all the missing values
+ *                removed. Both value and value2 are considered.
+ *
+ ******************************************************************************/
+
+
+class RemoveMissingValuesFunction : public Function {
+public:
+	RemoveMissingValuesFunction (const char *n) : Function(n,1,tgeopts)
+	{  info = "Copies a set of geopoints, removing missing values"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value RemoveMissingValuesFunction::Execute(int ,Value *arg)
+{
+	CGeopts *g;
+	arg[0].GetValue(g);
+	int n = 0;
+	int i;
+
+
+	// load the input geopoints and create a new set based on those
+
+	g->load();
+
+	CGeopts *x = new CGeopts(g);
+
+
+	// for each input geopoint, only copy it over if it is not missing
+
+	for (i = 0; i < g->Count(); i++)
+	{
+		if ( !(*g)[i].any_missing() )
+		{
+			(*x)[n++] = (*g)[i];
+		}
+	}
+
+	x->SetSize(n);
+
+
+	// unload the data and return the result
+
+	g->unload();
+	x->unload();
+
+	return Value (x);
+}
+
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+/*******************************************************************************
+ *
+ * Function      : GeoIntBits
+ *
+ * Description   : For each geopoint, converts the value into an integer and then returns
+ *                 the value of a given bit or bits, starting from the least
+ *                 significant. For example, intbits (4, 1) = 0,
+ *                 intbits (4, 2) = 0, intbits (4, 3) = 1, intbits (4, 4) = 0,
+ *                 ... The user can also specify the number of bits to extract,
+ *                 for example intbits (3, 1, 2): this extracts the first
+ *                 2 bits from the number 3, returning the result of 3.
+ *                 As another example, intbits (12, 3, 2) = 3.
+ *                 This function was originally written to help with ODB
+ *                 access.
+ *
+ ******************************************************************************/
+
+class GeoIntBits : public Function {
+
+public:
+	GeoIntBits (const char *n) : Function (n)
+	{info = "Returns ranges of bits in a geopoints variable";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int GeoIntBits::ValidArguments(int arity,Value *arg)
+{
+	if ( arity != 2 && arity != 3)      // only accept 2- and 3-argument calls
+		return false;
+
+	if ( arg[0].GetType() != tgeopts )  // first argument must be a geopoints
+		return false;
+
+	if ( arg[1].GetType() != tnumber )  // second argument must be a number
+		return false;
+
+	if ( (arity == 3) && (arg[2].GetType() != tnumber) )
+		return false;                     // argument 3, if supplied, must be a number
+
+    return true;
+}
+
+Value GeoIntBits::Execute(int arity, Value *arg)
+{
+	int    value, bitindex;
+	//int    integervalue;
+	int    bitmask = 0;
+	int    bits;
+	int    i;
+	int    num_bits = 1;
+	int    max_bits_in_long;
+	CGeopts *geo, *geonew;
+	arg[0].GetValue(geo);
+	arg[1].GetValue(bitindex);
+
+
+	// how many bits can we hold in a 'long'?
+
+	max_bits_in_long = sizeof (long) * 8;
+
+
+	// get the number of bits we want to retrieve
+
+	if (arity == 3)
+	{
+		arg[2].GetValue(num_bits);
+	}
+
+
+	// sensible numbers of bits only, please
+
+	if (num_bits < 1)
+	{
+		return Error("The number of bits must be between 1 and %d inclusive.", max_bits_in_long);
+	}
+
+
+	// we cannot handle bit indexes outside of a sensible range
+
+	if (bitindex < 1 || (bitindex + num_bits - 1) > max_bits_in_long)
+	{
+		return Error("The bit indexes must be between 1 and %d inclusive.", max_bits_in_long);
+	}
+
+
+
+	// load the input geopoints and create a new set based on those
+
+	geo->load();
+
+	geonew = new CGeopts(geo);
+
+
+
+	// compute the bitmask we will use to isolate the desired bit(s)
+
+	for (i = 0; i < num_bits; i++)
+	{
+		bitmask = bitmask | (int) pow (2.0, (bitindex - 1 + i));
+	}
+
+
+	// isolate the desired bits using the bitmask
+
+	for (i = 0; i < geo->Count(); i++)
+	{
+		value = (int) (*geo)[i].value();  // take input value as an integer
+		bits  = value & bitmask;    // mask off the bits we want
+
+		// shift the result down. For instance, if the 5th bit is set, we
+		// just want the result to be 1 when checking for that bit. If
+		// we are checking bits 10 and 11, then we want a result between
+		// 0 and 3 inclusive. So what we want is the position-independent
+		// value of the bit(s).
+
+		(*geonew)[i].value( bits >> (bitindex - 1) );
+	}
+
+
+	// unload the data and return the result
+
+	geo->unload();
+	geonew->unload();
+
+	return Value (geonew);
+}
+
+
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+class GeoGetFieldFunction : public Function {
+	eGeoptFieldType fieldtype;
+	bool deprecated;
+	const char *fieldName;
+	const char *newName;
+	char expandedInfo[100];
+public:
+	GeoGetFieldFunction (const char *n, eGeoptFieldType field, bool d, const char *fieldn, const char *nn = NULL) : Function(n,1,tgeopts), fieldtype(field), deprecated(d), fieldName(fieldn), newName(nn)
+	{
+		sprintf (expandedInfo, "Returns a list/vector of %ss from the given geopoints.", fieldName);
+		info = expandedInfo;//"Returns a list of heights from the given geopoints.";
+    }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoGetFieldFunction::Execute(int,Value *arg)
+{
+    DeprecatedMessage (deprecated, "geopoints", newName);
+
+	CGeopts *g;
+	arg[0].GetValue(g);
+
+	g->load();
+
+	int i;
+
+	switch (fieldtype)  // which column do we wish to extract?
+	{
+		case GPT_LEVEL:
+		{
+			CVector *v = new CVector(g->Count());
+
+			for(i=0;i<g->Count();i++)
+				(*v)[i] = (*g)[i].height();
+
+			return Value(v);
+			break;
+		}
+
+		case GPT_LAT:
+		{
+			CVector *v = new CVector(g->Count());
+
+			for(i=0;i<g->Count();i++)
+				(*v)[i] = (*g)[i].lat_y();
+
+			return Value(v);
+			break;
+		}
+
+		case GPT_LON:
+		{
+			CVector *v = new CVector(g->Count());
+
+			for(i=0;i<g->Count();i++)
+				(*v)[i] = (*g)[i].lon_x();
+
+			return Value(v);
+			break;
+		}
+
+		case GPT_DATE:
+		{
+			CList *v = new CList(g->Count());
+
+			for(i=0;i<g->Count();i++)  {
+				Date d((*g)[i].date(), (*g)[i].time() );
+				(*v)[i] = Value(d);
+			}
+
+			return Value(v);
+			break;
+		}
+
+
+		case GPT_VALUE:
+		{
+    		// strings are put into a list
+    		if( g->Format() == eGeoString )
+    		{
+        		CList *v = new CList(g->Count());
+        		for(i=0;i<g->Count();i++)
+        		{
+            		MvGeoP1 gp = (*g)[i];
+            		(*v)[i] = gp.strValue().c_str();
+        		}
+ 	    		return Value(v);
+    		}
+    		// numbers are put into a vector
+    		else
+    		{
+        		CVector *v = new CVector(g->Count());
+        		for(i=0;i<g->Count();i++)
+        		{
+            		MvGeoP1 gp = (*g)[i];
+            		double value = gp.value();
+
+            		(*v)[i] = (value != GEOPOINTS_MISSING_VALUE) ? value : VECTOR_MISSING_VALUE;
+        		}
+ 	    		return Value(v);
+    		}
+			break;
+		}
+
+		case GPT_VALUE2:
+		{
+    		CVector *v = new CVector(g->Count());
+
+    		for(i=0;i<g->Count();i++)
+    		{
+        		MvGeoP1 gp = (*g)[i];
+        		double value = gp.direc();
+
+        		(*v)[i] = (value != GEOPOINTS_MISSING_VALUE) ? value : VECTOR_MISSING_VALUE;
+    		}
+
+    		return Value(v);
+		}
+
+		default:
+		{
+			// should never get here
+			return Error("Cannot extract this field  (%d) from geopoints", fieldtype);
+		}
+	}
+}
+
+
+//===========================================================================
+class GeoFilterFunction : public Function {
+public:
+	GeoFilterFunction (const char *n) : Function(n,2,tgeopts,tgeopts) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoFilterFunction::Execute(int,Value *arg)
+{
+	CGeopts *g;
+	CGeopts *h;
+	arg[0].GetValue(g);
+	arg[1].GetValue(h);
+
+	g->load();
+	h->load();
+	if(g->Count() != h->Count())
+		return Error("The two geopoints have different sizes");
+
+	CGeopts *x = new CGeopts(g);
+
+	int n = 0;
+
+	for(int i=0;i<g->Count();i++)
+		if((*h)[i].value() )
+			(*x)[n++] = (*g)[i];
+
+	x->SetSize(n);
+
+	g->unload();
+	h->unload();
+	x->unload();
+
+	return Value(x);
+}
+
+//===========================================================================
+class GeoVectorFunction : public Function {
+public:
+	GeoVectorFunction (const char *n) : Function(n,2,tgeopts,tgeopts) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual eGeoFormat vectorType() = 0;
+};
+
+class GeoPolarVectorFunction : public GeoVectorFunction {
+public:
+	GeoPolarVectorFunction (const char *n) : GeoVectorFunction(n)
+	{  info = "Combines two 1-parameter geopoints variables into polar vector style"; };
+	virtual eGeoFormat vectorType(){ return eGeoVectorPolar; }
+};
+
+class GeoXYVectorFunction : public GeoVectorFunction {
+public:
+	GeoXYVectorFunction (const char *n) : GeoVectorFunction(n)
+	{ info = "Combines two 1-parameter geopoints variables into u/v vector style"; };
+	virtual eGeoFormat vectorType(){ return eGeoVectorXY; }
+};
+
+Value GeoVectorFunction::Execute(int,Value *arg)
+{
+	CGeopts *g;
+	CGeopts *h;
+	arg[0].GetValue(g);
+	arg[1].GetValue(h);
+
+	g->load();
+	h->load();
+	if(g->Count() != h->Count())
+		return Error("The two geopoints have different sizes");
+
+	CGeopts* cgpts = new CGeopts( g );
+
+	for( int p=0; p<g->Count(); ++p )
+	  {
+	    MvGeoP1 gp1 = (*g)[ p ];
+	    MvGeoP1 gp2 = (*h)[ p ];
+
+	    gp1.direc( gp2.value() );
+
+	    (*cgpts)[ p ] = gp1;
+	  }
+
+	cgpts->SetFormat( vectorType() );
+
+	g->unload();
+	h->unload();
+	cgpts->unload();
+
+	return Value(cgpts);
+}
+
+//===========================================================================
+//                                                      this one interpolates
+class GeoFromGribFunction1 : public Function {
+public:
+	GeoFromGribFunction1 (const char *n) : Function(n,2,tgrib,tgeopts) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoFromGribFunction1::Execute(int,Value *arg)
+{
+	fieldset *v;
+	CGeopts  *g;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(g);
+
+	return Value(new CGeopts(g,v,0));
+}
+
+//===========================================================================
+//                                          this one looks for nearest points
+class GeoFromGribFunction2 : public Function {
+public:
+	GeoFromGribFunction2 (const char *n) : Function(n,2,tgrib,tgeopts) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoFromGribFunction2::Execute(int,Value *arg)
+{
+	fieldset *v;
+	CGeopts  *g;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(g);
+
+	return Value(new CGeopts(g,v,0,true));
+}
+
+#if 0
+
+//===========================================================================
+//                                               use grib-to-geo app instead!
+class GeoFromGribFunction3 : public Function {
+public:
+	GeoFromGribFunction3(char *n) : Function(n,1,tgrib) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoFromGribFunction3::Execute(int,Value *arg)
+{
+	fieldset *v;
+
+	arg[0].GetValue(v);
+
+	return Value(new CGeopts(v,0));
+}
+#endif
+
+//===========================================================================
+//===========================================================================
+class SubGeoFunction : public Function {
+public:
+	SubGeoFunction (const char *n) : Function(n,2,tgeopts,tnumber) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value SubGeoFunction::Execute(int,Value *arg)
+{
+	CGeopts *p;
+	long n;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(n);
+
+	p->load();
+
+	request *r = empty_request(NULL);
+	MvGeoP1& g = (*p)[n];
+
+	set_value(r,"latitude",		"%g",	g.lat_y() );
+	set_value(r,"longitude",	"%g",	g.lon_x() );
+	set_value(r,"height",		"%g",	g.height() );
+	set_value(r,"date",			"%ld",	g.date() );
+	set_value(r,"time",			"%ld",	g.time() );
+	set_value(r,"value",		"%g",	g.value() );
+	set_value(r,"value_missing","%d",	g.value_missing() ? 1 : 0);
+
+	//-- valid only for geovectors
+	set_value(r,"value2",		"%g",	g.direc() );
+	set_value(r,"value2_missing","%g",	g.direc_missing()  ? 1 : 0);
+
+	return Value(r);
+}
+
+//===========================================================================
+// These are single-argument functions such as sin, cos, abs...
+
+class GeoUnOp : public Function {
+
+	uniproc F_;
+
+public:
+	GeoUnOp(const char *n,uniproc f) : Function(n,1,tgeopts) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoUnOp::Execute(int,Value *arg)
+{
+	CGeopts *g;	// original  geopoints
+	CGeopts *p;	// resultant geopoints
+
+	arg[0].GetValue(g);
+	g->load();
+
+	p = new CGeopts(g);
+
+	for(int i = 0; i< g->Count();i++)
+	{
+		if ((*g)[i].value_missing())		// if the input value is missing
+			(*p)[i].set_value_missing();	// set the output value to missing
+		else					// otherwise, compute with (first) value
+			(*p)[i].value( F_((*g)[i].value() ) );
+
+		if( g->Format() == eGeoVectorXY )	// if XY vectors then operate second value too
+			(*p)[i].value2( F_((*g)[i].value2() ) );
+	}
+
+
+	return Value(p);
+}
+
+//===========================================================================
+// Grib + Geopoint
+
+class GribGeoBinOp : public Function {
+
+	binproc F_;
+
+public:
+	GribGeoBinOp(const char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+Value GribGeoBinOp::Execute(int,Value *arg)
+{
+	fieldset *v;
+	CGeopts  *g;
+
+	if(arg[0].GetType() == tgrib)
+	{
+		arg[0].GetValue(v);
+		arg[1].GetValue(g);
+
+		CGeopts *p = new CGeopts(g,v,0);
+
+
+		// for each point,
+		//   if either input value is missing
+		//     set the output value to missing
+		//   otherwise, compute
+
+		for (int i = 0; i< g->Count();i++)
+			if ((*g)[i].value_missing() || (*p)[i].value_missing())
+				(*p)[i].set_value_missing();
+			else
+				(*p)[i].value( F_((*p)[i].value(), (*g)[i].value() ) );
+
+		return Value(p);
+	}
+	else
+	{
+		arg[0].GetValue(g);
+		arg[1].GetValue(v);
+
+		CGeopts *p = new CGeopts(g,v,0);
+
+
+		// for each point,
+		//   if either input value is missing
+		//     set the output value to missing
+		//   otherwise, compute
+
+		for (int i = 0; i< g->Count();i++)
+			if ((*g)[i].value_missing() || (*p)[i].value_missing())
+				(*p)[i].set_value_missing();
+			else
+				(*p)[i].value( F_((*g)[i].value(),(*p)[i].value() ) );
+
+		return Value(p);
+	}
+}
+
+int GribGeoBinOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[0].GetType() == tgrib && arg[1].GetType() == tgeopts)
+		return true;
+	if(arg[1].GetType() == tgrib && arg[0].GetType() == tgeopts)
+		return true;
+	return false;
+}
+
+//===========================================================================
+// Number + Geopoint
+
+class NumGeoBinOp : public Function {
+
+	binproc F_;
+
+public:
+	NumGeoBinOp(const char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+Value NumGeoBinOp::Execute(int,Value *arg)
+{
+	if(arg[0].GetType() == tnumber)
+	{
+		double  d;
+		CGeopts *g;
+
+		arg[0].GetValue(d);
+		arg[1].GetValue(g);
+
+		CGeopts *p = new CGeopts(g);
+
+		// for each point,
+		//   if the geopoint value is missing
+		//     set the output value to missing
+		//   otherwise, compute
+		//   if XY geovector then compute also with the second value
+
+		for(int i = 0; i< g->Count();i++)
+		{
+			if ((*g)[i].value_missing())
+				(*p)[i].set_value_missing();
+			else
+				(*p)[i].value( F_( d, (*g)[i].value() ) );
+
+			if( g->Format() == eGeoVectorXY )
+				(*p)[i].value2( F_( d, (*g)[i].value2() ) );
+		}
+
+		return Value(p);
+	}
+	else
+	{
+		double  d;
+		CGeopts *g;
+
+		arg[0].GetValue(g);
+		arg[1].GetValue(d);
+
+		CGeopts *p = new CGeopts(g);
+
+
+		// for each point,
+		//   if the geopoint value is missing
+		//     set the output value to missing
+		//   otherwise, compute
+
+		for(int i = 0; i< g->Count();i++)
+			if ((*g)[i].value_missing())
+				(*p)[i].set_value_missing();
+			else
+				(*p)[i].value( F_((*g)[i].value(), d ) );
+
+		return Value(p);
+	}
+}
+
+int NumGeoBinOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[0].GetType() == tnumber && arg[1].GetType() == tgeopts)
+		return true;
+	if(arg[1].GetType() == tnumber && arg[0].GetType() == tgeopts)
+		return true;
+	return false;
+}
+
+//===========================================================================
+// Geopoint + Geopoint
+
+class GeoGeoBinOp : public Function {
+
+	binproc F_;
+
+public:
+	GeoGeoBinOp(const char *n,binproc f) : Function(n,2,tgeopts,tgeopts) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoGeoBinOp::Execute(int,Value *arg)
+{
+	CGeopts *g;
+	CGeopts *h;
+
+	arg[0].GetValue(g);
+	arg[1].GetValue(h);
+
+	g->load();
+	h->load();
+
+	if(g->Count() != h->Count())
+		return Error("geopoints are not identical");
+
+	CGeopts *p = new CGeopts(g);
+
+	for(int i = 0;i<g->Count();i++)
+	{
+#if 0
+		if(h->Lat(i) != g->Lat(i)
+		|| h->Lon(i) != h->Lon(i))
+			// Not yet, || h->Height() != g->Height())
+			return Error("geopoints are not identical");
+#endif
+
+		if ((*g)[i].value_missing() || (*h)[i].value_missing())
+			(*p)[i].set_value_missing();
+		else
+			(*p)[i].value( F_( (*g)[i].value(), (*h)[i].value() ) );
+
+		if( g->Format() == eGeoVectorXY )
+			(*p)[i].value2( F_( (*g)[i].value2(), (*h)[i].value2() ) );
+	}
+
+	return Value(p);
+}
+
+//===========================================================================
+//===========================================================================
+
+/* Commented out by Iain Russell, 17/12/2004.
+   This class/function appears to not be called by anything, so it has been
+   commented out to avoid confusion.
+
+class GeoMulOp : public Function {
+
+	typedef double (*binproc)(double,double);
+	binproc F_;
+
+public:
+	GeoMulOp(char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int  ValidArguments(int arity,Value *arg);
+};
+
+int GeoMulOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity < 1) return false;
+	for(int i = 0;i<arity;i++)
+		if(arg[i].GetType() != tnumber)
+			return false;
+	return true;
+}
+
+Value GeoMulOp::Execute(int arity,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+
+	for(int i = 1 ; i < arity; i++)
+	{
+		double x;
+		arg[i].GetValue(x);
+		d = F_(d,x);
+	}
+
+	return Value(d);
+}
+ */
+
+
+
+class MeanGeoFunction : public Function {
+	int compute_mean;
+public:
+	MeanGeoFunction(const char *n,int m) : Function(n,1,tgeopts),compute_mean(m)
+	{ info="Returns the sum or mean of the values in a geopoints variable"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MeanGeoFunction::Execute(int,Value *arg)
+{
+	CGeopts *g;
+	double dSum = 0.0;
+	int nNumValid = 0;
+
+	arg[0].GetValue(g);
+
+	g->load();
+
+	for (int i = 0;i<g->Count();i++)
+	{
+		if (!((*g)[i].value_missing()))
+		{
+			dSum += (*g)[i].value();
+			nNumValid++;
+		}
+	}
+
+	g->unload();
+
+
+	if (nNumValid > 0)
+	{
+		if (compute_mean)
+			return Value(dSum / nNumValid);
+		else
+			return Value(dSum);
+	}
+	else
+		return Value();
+}
+
+
+
+//-------------------------------------------------------------------
+class GeoDistanceFunction : public Function {
+public:
+	GeoDistanceFunction (const char *n) : Function(n) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+Value GeoDistanceFunction::Execute(int arity,Value *arg)
+{
+  CGeopts *g;
+  arg[0].GetValue(g);
+
+  double d[2];
+  double lat, lon;
+  int	   i;
+
+  if(arity == 2)
+    {
+      CList *l;
+      arg[1].GetValue(l);
+      for( i = 0; i < 2; ++i )
+	(*l)[i].GetValue(d[i]);
+    }
+    else
+      {
+	for( i = 0; i < 2; ++i )
+	  arg[i+1].GetValue(d[i]);
+      }
+
+  MvLocation centre( d[0], d[1] );
+  MvLocation point;
+
+  g->load();
+
+  CGeopts *x = new CGeopts(g);
+
+  int n = 0;
+
+  for( i=0; i<g->Count(); i++ )
+    {
+      lat = (*g)[i].lat_y();
+      lon = (*g)[i].lon_x();
+      point.set( lat, lon );
+      double dist = point.distanceInMeters( centre );
+      (*x)[n++].value( dist );
+    }
+
+  x->SetSize(n);
+
+  g->unload();
+  x->unload();
+
+  return Value(x);
+}
+
+int GeoDistanceFunction::ValidArguments(int arity,Value *arg)
+{
+    int i;
+    CList *l;
+
+    if( arity < 2 )
+      return false;
+
+    if( arg[0].GetType() != tgeopts )
+      return false;
+
+    switch( arity )
+    {
+        case 3:
+            for( i = 1; i<3; ++i )
+	      if( arg[i].GetType() != tnumber )
+		return false;
+            break;
+
+        case 2:
+            switch( arg[1].GetType() )
+            {
+                case tlist:
+                    arg[1].GetValue(l);
+                    if( l->Count() != 2 )
+		      return false;
+
+                    for( i = 0; i < 2; ++i )
+                        if( (*l)[i].GetType() != tnumber )
+			  return false;
+
+                    return true;
+
+                default:
+                    return false;
+            }
+
+        default:
+            return false;
+
+    }
+    return true;
+}
+
+
+
+//-------------------------------------------------------------------
+
+/*******************************************************************************
+ *
+ * Class        : GeoMergeFunction : Function
+ *
+ * Description  : Macro function that merges two geopoints variables. The second
+ *                set is simply appended to the first.
+ *
+ ******************************************************************************/
+
+
+class GeoMergeFunction : public Function {
+public:
+    GeoMergeFunction (const char *n) : Function(n, 2, tgeopts, tgeopts)
+    { info = "Merges 2 sets of geopoints"; };
+    virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoMergeFunction::Execute(int,Value *arg)
+{
+	CGeopts *g1;
+	CGeopts *g2;
+	CGeopts *gmerged;
+	int n, i;
+
+	// load up our input geopoints
+
+	arg[0].GetValue(g1);
+	arg[1].GetValue(g2);
+
+	g1->load();
+	g2->load();
+
+
+	// we can only merge two geopoints if they are in the same format
+
+	if(g1->Format() != g2->Format())
+		return Error ("The two geopoints have different formats");
+
+	// create a new set of geopoints large enough to hold both sets
+
+	gmerged = new CGeopts(g1->Count() + g2->Count());
+	gmerged->SetFormat( g1->Format() );
+
+
+	// copy the first set, followed by the second set
+
+	n = 0;
+
+	for (i = 0; i < g1->Count(); i++)
+		(*gmerged)[n++] = (*g1)[i];
+
+	for (i = 0; i < g2->Count(); i++)
+		(*gmerged)[n++] = (*g2)[i];
+
+
+	// unload the data and return the result
+
+	g1->unload();
+	g2->unload();
+	gmerged->unload();
+
+	return Value(gmerged);
+}
+
+//-------------------------------------------------------------------
+
+/*******************************************************************************
+ *
+ * Class        : GeoCreateFunction : Function
+ *
+ * Description  : Macro function that creates a new geopoints variable
+ *
+ ******************************************************************************/
+
+
+class GeoCreateFunction : public Function {
+    bool type_specified;
+public:
+	GeoCreateFunction (const char *n) : Function(n)
+    { info = "Creates a new set of geopoints"; };
+	virtual Value Execute(int arity,Value *arg);
+    virtual int ValidArguments(int arity,Value *arg);
+};
+
+int GeoCreateFunction::ValidArguments(int arity,Value *arg)
+{
+	if ( arity != 1 && arity != 2)      // only accept 1- and 2-argument calls
+		return false;
+
+	if ( arg[0].GetType() != tnumber )  // first argument must be a number
+		return false;
+
+	if ( (arity == 2) && (arg[1].GetType() != tstring) )
+		return false;                     // argument 2, if supplied, must be a string
+
+    return true;
+}
+
+
+
+Value GeoCreateFunction::Execute(int arity,Value *arg)
+{
+    CGeopts *gnew;
+    int n;
+    const char *type = "";
+
+
+    arg[0].GetValue(n);
+
+    if (arity == 2) arg[1].GetValue(type);
+
+
+    // create a new set of geopoints
+
+    gnew = new CGeopts(n);
+
+
+    // set the format according to the supplied string
+
+    if (type[0] != '\0')
+    {
+             if ( strcmp ( type, "polar_vector") == 0 ) gnew->SetFormat (eGeoVectorPolar);
+        else if ( strcmp ( type, "xy_vector")    == 0 ) gnew->SetFormat (eGeoVectorXY);
+        else if ( strcmp ( type, "xyv")          == 0 ) gnew->SetFormat (eGeoXYV);
+        else return Error("create_geo: format %s not recognised", type);
+    }
+
+    return Value(gnew);
+}
+
+//===========================================================================
+class GeoSortFunction : public Function {
+public:
+	GeoSortFunction (const char *n) : Function(n,1,tgeopts)
+	{ info = "Sorts the geopoints North to South and West to East"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoSortFunction::Execute(int,Value *arg)
+{
+  CGeopts* g;
+  arg[0].GetValue(g);
+
+  g->load();
+  g->sort();
+
+  CGeopts* x = new CGeopts(g);
+
+  int n = 0;
+  for( int i=0; i < g->Count() ; ++i )
+    {
+      (*x)[n++] = (*g)[i];
+    }
+
+  g->unload();
+  x->unload();
+
+  return Value(x);
+}
+
+//===========================================================================
+class GeoSubsampleFunction : public Function {
+public:
+	GeoSubsampleFunction (const char *n) : Function(n,2,tgeopts,tgeopts)
+	{ info = "Filters from the first geopoints variable points that exist in the second"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoSubsampleFunction::Execute(int,Value *arg)
+{
+  CGeopts* g1;
+  arg[0].GetValue(g1);                 //-- geopoints to filter
+
+  CGeopts* g2;
+  arg[1].GetValue(g2);                 //-- geopoints to define subsample
+
+  g1->load();
+  g2->load();
+
+  g1->sort();
+  g2->sort();
+
+  CGeopts* x = new CGeopts(g2);
+
+  int count_g1 = g1->Count();
+  int count_g2 = g2->Count();
+  int ix  = 0;
+  int ig1 = 0;
+  for( int ig2=0; ig2 < count_g2 ; ++ig2 )
+    {
+      while( ig1 < count_g1 && (*g1)[ig1] < (*g2)[ig2] )
+	++ig1;
+
+      if( ig1 < count_g1 && (*g1)[ig1].sameLocation( (*g2)[ig2] ) )
+	{
+	  (*x)[ix] = (*g1)[ig1++];      //-- g2 location exists in g1
+	}
+      else
+	{
+	  (*x)[ix] = (*g2)[ig2];        //-- g2 location missing in g1
+	  (*x)[ix].set_value_missing();
+	  (*x)[ix].set_direc_missing();
+	}
+
+      ++ix;
+    }
+
+  g1->unload();
+  g2->unload();
+  x->unload();
+
+  return Value(x);
+}
+
+//===========================================================================
+// Maybe this could/should be a functionality in visualisation...
+//
+class GeoOffsetFunction : public Function
+{
+	double dlat, dlon;
+public:
+	GeoOffsetFunction (const char *n) : Function(n)
+	{ info = "Offsets the locations of geopoints"; };
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int GeoOffsetFunction::ValidArguments(int arity,Value *arg)
+{
+  int i;
+  //CList *l;
+
+  if( arity < 2 )
+     return false;
+
+  if( arg[0].GetType() != tgeopts)
+     return false;
+
+  switch( arity )
+  {
+  case 3:                              //-- lat/lon given as two numbers
+     if( arg[1].GetType() != tnumber )
+         return false;
+     if( arg[2].GetType() != tnumber )
+         return false;
+
+     arg[1].GetValue( dlat );
+     arg[2].GetValue( dlon );
+
+     break;
+
+  case 2:                              //-- lat/lon given as a list of 2 numbers
+     if( arg[1].GetType() == tlist )
+     {
+        CList* lst;
+        arg[1].GetValue(lst);
+        if( lst->Count() != 2 )
+            return false;
+
+        for( i = 0; i < 2; ++i )
+            if((*lst)[i].GetType() != tnumber)
+                return false;
+
+        (*lst)[0].GetValue( dlat );
+        (*lst)[1].GetValue( dlon );
+     }
+     else
+        return false;
+
+     break;
+
+  default:
+        return false;
+  }
+
+  return true;
+}
+
+Value GeoOffsetFunction::Execute( int, Value* arg )
+{
+  CGeopts* g;
+  arg[0].GetValue( g );
+  g->load();
+
+  CGeopts* x = new CGeopts( g );
+
+  g->unload();
+
+  x->offset( dlat, dlon );
+
+  x->unload();
+
+  return Value( x );
+}
+
+//===========================================================================
+class GeoRemoveDuplicatesFunction : public Function {
+public:
+	GeoRemoveDuplicatesFunction (const char *n) : Function(n,1,tgeopts)
+	{ info = "Removes geopoint duplicates"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GeoRemoveDuplicatesFunction::Execute(int,Value *arg)
+{
+  CGeopts* g;
+  arg[0].GetValue(g);
+
+  g->load();
+  g->removeDuplicates();
+
+  CGeopts* x = new CGeopts(g);
+
+  int n = 0;
+  for( int i=0; i < g->Count() ; ++i )
+    {
+      (*x)[n++] = (*g)[i];
+    }
+
+  g->unload();
+  x->unload();
+
+  return Value(x);
+}
+
+//===========================================================================
+class GeoSetFunction : public Function
+{
+	eGeoptFieldType  col;
+	bool isList;
+    bool isVector;
+	bool deprecated;
+	const char *fieldName;
+	const char *newName;
+	eGeoptFieldType fieldtype;
+	char expandedInfo[100];
+public:
+	GeoSetFunction(const char* n, eGeoptFieldType c, bool d, const char *fieldn, const char *nn = NULL) : Function(n), col(c), deprecated(d), fieldName(fieldn), newName(nn)
+	{
+		sprintf (expandedInfo, "Sets the %s column in the geopoints variable.", fieldName);
+		info = expandedInfo;
+    }
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int GeoSetFunction::ValidArguments(int arity,Value *arg)
+{
+    if( arity != 2 )                   // only accept 2-argument calls
+        return false;
+
+    if( arg[0].GetType() != tgeopts )  // first argument must be a geopoints
+        return false;
+
+
+    isList   = false;
+    isVector = false;
+
+    if( arg[1].GetType() == tnumber )  // second argument can be a number, a list or a vector
+    {
+        return true;
+    }
+
+    if( arg[1].GetType() == tlist )    // second argument can be a number, a list or a vector
+    {
+        isList = true;
+        return true;
+    }
+
+    if( arg[1].GetType() == tvector )  // second argument can be a number, a list or a vector
+    {
+        isVector = true;
+        return true;
+    }
+
+  return false;
+}
+
+Value GeoSetFunction::Execute(int,Value *arg)
+{
+  DeprecatedMessage (deprecated, "geopoints", newName);
+
+  CGeopts* g;
+  arg[0].GetValue(g);                //-- get geopoints
+
+  CList*   lst;
+  CVector* vector;
+  int inputCount;
+  double val = GEOPOINTS_MISSING_VALUE; //-- used if list contains non-numbers
+  if( isList )
+  {
+    arg[1].GetValue(lst);
+    inputCount = lst->Count();
+  }
+  
+  else if ( isVector )
+  {
+    arg[1].GetValue(vector);
+    inputCount = vector->Count();
+  }
+  else
+  {
+    arg[1].GetValue(val);
+  }
+
+  g->load();
+  CGeopts* x = new CGeopts(g);       //-- create a copy of input geopoints
+
+  int cnt = g->Count();              //-- count is the count of geopoints
+                                     //-- unless a list/vector and list/vector is shorter
+  if( (isList || isVector) && inputCount < cnt)
+    cnt = inputCount;
+
+
+  for( int i=0; i < cnt ; ++i )
+  {
+    double cur = val;                //-- if list then cur is initialised as missing_value
+    if( isList && (*lst)[i].GetType() == tnumber )
+    {
+      (*lst)[i].GetValue( cur );     //-- if list and current list element is number
+    }
+    else if( isVector )
+    {
+      cur = (*vector)[i];     //-- if vector
+
+      if (cur == VECTOR_MISSING_VALUE)  //-- convert missing value indicators
+        cur = GEOPOINTS_MISSING_VALUE;
+    }
+
+    switch( col )
+    {
+      case GPT_LAT:
+        ((*x)[i]).lat_y( cur );
+        break;
+
+      case GPT_LON:
+        ((*x)[i]).lon_x( cur );
+        break;
+
+      case GPT_LEVEL:
+        ((*x)[i]).height( cur );
+        break;
+
+      case GPT_DATE:
+        ((*x)[i]).date( (long)cur );
+        break;
+
+      case GPT_TIME:
+        ((*x)[i]).time( (long)cur );
+        break;
+
+      case GPT_VALUE:
+        ((*x)[i]).value( cur );
+        break;
+
+      case GPT_VALUE2:
+        ((*x)[i]).value2( cur );
+        break;
+    }
+  }
+
+  g->unload();
+  x->unload();
+
+  return Value(x);
+}
+
+
+//===========================================================================
+class GeoDbFunction : public Function {
+
+public:
+	GeoDbFunction (const char *n) : Function(n)
+	{info = "Returns a string of the database from the given geopoints.";};
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int GeoDbFunction::ValidArguments(int arity,Value *arg)
+{
+  if( arity != 2 && arity != 3 )                   // only accept 2-argument calls
+    return false;
+
+  if( arg[0].GetType() != tgeopts )  // first argument must be a geopoints
+    return false;
+
+  if( arg[1].GetType() == tstring )  // second argument must be a string
+  {
+      	if(arity == 3)
+	{
+		const char *cval;
+		arg[1].GetValue(cval);
+		string db_item=cval;
+
+		if(arg[2].GetType() == tstring &&
+                  (db_item == "column" || db_item == "alias"))
+		{
+			return true;
+		}
+		return false;
+	}
+
+	return true;
+  }
+
+  return false;
+}
+
+Value GeoDbFunction::Execute(int,Value *arg)
+{
+	CGeopts *g;
+	arg[0].GetValue(g);
+
+	g->load();
+
+	const char *cval;
+	string db_item;
+	arg[1].GetValue(cval);
+
+	db_item=cval;
+
+	if(db_item == "name")
+	{
+		return Value(g->dbSystem().c_str());
+	}
+	else if(db_item == "column")
+	{
+		const char *col;
+		arg[2].GetValue(col);
+
+		return Value(g->dbColumn(col).c_str());;
+	}
+	else if(db_item == "alias")
+	{
+		const char *col;
+		arg[2].GetValue(col);
+
+		return Value(g->dbColumnAlias(col).c_str());
+	}
+	else if(db_item == "path")
+	{
+		return Value(g->dbPath().c_str());
+	}
+	else if(db_item == "query")
+	{
+		int n=g->dbQuery().size();
+
+		CList *v = new CList(n);
+
+		for(unsigned int i=0; i < g->dbQuery().size(); i++)
+		{
+			(*v)[i]= g->dbQuery().at(i).c_str();
+		}
+
+		return Value(v);
+	}
+
+	return Value(" ");
+}
+
+
+//-------------------------------------------------------------------
+//===========================================================================
+
+static void install(Context *c)
+{
+	c->AddGlobal  (new Variable("geo_missing_value", Value(GEOPOINTS_MISSING_VALUE)));
+
+	c->AddFunction(new MergeBufrFunction("&"));
+	c->AddFunction(new MergeBufrFunction("merge"));
+
+	c->AddFunction(new CountGeoFunction("count"));
+	c->AddFunction(new SubGeoFunction("[]"));
+
+	c->AddFunction(new GeoMergeFunction("&"));
+	c->AddFunction(new GeoMergeFunction("merge"));
+
+	int i;
+
+	// Binary op
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new GeoGeoBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new NumGeoBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new GribGeoBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+	// Mult op as Binary op
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new GeoGeoBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new NumGeoBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new GribGeoBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+	// Unary op
+
+	for(i=0;UniOps[i].symb;i++)
+		c->AddFunction(new GeoUnOp(UniOps[i].symb,UniOps[i].proc ));
+
+	c->AddFunction(new GeoFromGribFunction1("interpolate"));
+	c->AddFunction(new GeoFromGribFunction2("nearest_gridpoint"));
+//	c->AddFunction(new GeoFromGribFunction3("geopoints"));
+	c->AddFunction(new GeoFilterFunction("filter"));
+	c->AddFunction(new GeoSortFunction("geosort"));
+	c->AddFunction(new GeoSubsampleFunction("subsample"));
+	c->AddFunction(new GeoPolarVectorFunction("polar_vector"));
+	c->AddFunction(new GeoXYVectorFunction("xy_vector"));
+	c->AddFunction(new MaxGeoFunction("maxvalue",1));
+	c->AddFunction(new MaxGeoFunction("minvalue",0));
+	c->AddFunction(new MeanGeoFunction("mean",1));
+	c->AddFunction(new MeanGeoFunction("sum",0));
+
+
+    // 'new' versions of geopoints column extraction functions
+	//                                       fn name      field    deprecated  name-of-field
+	c->AddFunction(new GeoGetFieldFunction ("dates",      GPT_DATE,   false, "date"));
+	c->AddFunction(new GeoGetFieldFunction ("levels",     GPT_LEVEL,  false, "height"));
+	c->AddFunction(new GeoGetFieldFunction ("latitudes",  GPT_LAT,    false, "latitude"));
+	c->AddFunction(new GeoGetFieldFunction ("longitudes", GPT_LON,    false, "longitude"));
+	c->AddFunction(new GeoGetFieldFunction ("values",     GPT_VALUE,  false, "value"));
+	c->AddFunction(new GeoGetFieldFunction ("value2s",    GPT_VALUE2, false, "2nd value"));
+
+	// deprecated versions of the above
+	//                                      fn name       field  deprecated  name-of-field, name-of-new-version
+	c->AddFunction(new GeoGetFieldFunction ("date",      GPT_DATE,   true, "date",         "dates"));
+	c->AddFunction(new GeoGetFieldFunction ("level",     GPT_LEVEL,  true, "height",       "levels"));
+	c->AddFunction(new GeoGetFieldFunction ("latitude",  GPT_LAT,    true, "latitude",     "latitudes"));
+	c->AddFunction(new GeoGetFieldFunction ("longitude", GPT_LON,    true, "longitude",    "longitudes"));
+	c->AddFunction(new GeoGetFieldFunction ("value",     GPT_VALUE,  true, "value",        "values"));
+	c->AddFunction(new GeoGetFieldFunction ("value2",    GPT_VALUE2, true, "2nd value",    "value2s"));
+
+
+    // 'new' versions of geopoints column extraction functions
+	//                                     fn name      field  deprecated  name-of-field
+	c->AddFunction(new GeoSetFunction("set_latitudes", GPT_LAT,    false, "latitude"));
+	c->AddFunction(new GeoSetFunction("set_longitudes",GPT_LON,    false, "longitude"));
+	c->AddFunction(new GeoSetFunction("set_levels",    GPT_LEVEL,  false, "level"));
+	c->AddFunction(new GeoSetFunction("set_dates",     GPT_DATE,   false, "date"));
+	c->AddFunction(new GeoSetFunction("set_times",     GPT_TIME,   false, "time"));
+	c->AddFunction(new GeoSetFunction("set_values",    GPT_VALUE,  false, "value"));
+	c->AddFunction(new GeoSetFunction("set_value2s",   GPT_VALUE2, false, "value2"));
+
+	// deprecated versions of the above
+	//                                    fn name       field  deprecated  name-of-field, name-of-new-version
+	c->AddFunction(new GeoSetFunction("set_latitude",  GPT_LAT,    true, "latitude",  "set_latitudes"));
+	c->AddFunction(new GeoSetFunction("set_longitude", GPT_LON,    true, "longitude", "set_longitudes"));
+	c->AddFunction(new GeoSetFunction("set_level",     GPT_LEVEL,  true, "level",     "set_levels"));
+	c->AddFunction(new GeoSetFunction("set_date",      GPT_DATE,   true, "date",      "set_dates"));
+	c->AddFunction(new GeoSetFunction("set_time",      GPT_TIME,   true, "time",      "set_times"));
+	c->AddFunction(new GeoSetFunction("set_value",     GPT_VALUE,  true, "value",     "set_values"));
+	c->AddFunction(new GeoSetFunction("set_value2",    GPT_VALUE2, true, "value2",    "set_value2s"));
+
+
+	c->AddFunction(new GeoDistanceFunction("distance"));
+	c->AddFunction(new GeoCreateFunction("create_geo"));
+
+	c->AddFunction(new FilterBoxFunction("filter"));
+	c->AddFunction(new FilterLevelFunction("filter"));
+	c->AddFunction(new FilterDateFunction("filter"));
+	c->AddFunction(new GeoOffsetFunction("offset"));
+	c->AddFunction(new GeoRemoveDuplicatesFunction("remove_duplicates"));
+	c->AddFunction(new RemoveMissingValuesFunction("remove_missing_values"));
+	c->AddFunction(new GeoIntBits("intbits"));
+
+	c->AddFunction(new GeoDbFunction("db_info"));
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/codb.cc b/src/Macro/codb.cc
new file mode 100644
index 0000000..244ff28
--- /dev/null
+++ b/src/Macro/codb.cc
@@ -0,0 +1,264 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+#include <ctype.h>
+#include <float.h>
+#include <string.h>
+#include "macro.h"
+#include "arith.h"
+#include "inc_stl.h"
+#include "MvPath.hpp"
+#include "codb.h"
+#include "MvOdb.h"
+
+
+//===========================================================================
+//===========================================================================
+
+COdb::COdb(request *s) : InPool(todb,s)
+{
+	odb_=0;
+	r = clone_all_requests(s);
+
+	if(r)
+	{
+		const char* path = get_value(r,"PATH",0);
+	    	odb_= MvOdbFactory::make(path);
+	}
+
+	IsIcon(true); // so that InPool won't touch the data - we control its deletion in Macro
+}
+
+COdb::COdb(const char  *p,int temp) : InPool(todb)
+{
+	odb_=0;
+
+	r = empty_request("ODB_DB");
+	//set_value(r,"PATH","%s",p);
+	set_value(r,"PATH","%s",FullPathName(p).c_str());
+	set_value(r,"TEMPORARY","%d",temp);
+
+	if(r)
+	{
+		const char* path = get_value(r,"PATH",0);
+	    	odb_= MvOdbFactory::make(path);		
+	}
+}
+
+/*COdb::COdb(const char  *p,int temp) : InPool(tgeopts)
+{
+	odb_=0;
+	r = empty_request("ODB_DB");
+	//set_value(r,"PATH","%s",p);
+	set_value(r,"PATH","%s",FullPathName(p).c_str());
+	set_value(r,"TEMPORARY","%d",temp);
+}*/
+
+
+long COdb::Count()
+{ 	
+	if(odb_)
+	{
+		return odb_->rowNum();	
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+void COdb::load(void)
+{
+	if(odb_)
+		return;
+
+	if(r)
+	{
+		const char* path = get_value(r,"PATH",0);
+	    	odb_= MvOdbFactory::make(path);
+	}
+	//else
+	//  is probably a geopoints structure in memory, or with zero count!
+}
+
+void COdb::unload(void)
+{
+//	if( gpts.count() > 0 || (r == NULL))
+//	  {
+/*	    if(r == NULL)
+	      {
+		char* path = marstmp();
+		gpts.write( path );
+
+		r = empty_request("GEOPOINTS");
+		set_value(r,"TEMPORARY","1");
+		set_value(r,"PATH","%s",path);
+	      }
+
+	    gpts.unload();
+//	  }*/
+
+	if(odb_)
+	{
+		delete odb_;
+		odb_=0;
+	}
+}
+
+int COdb::Write(FILE* f)
+{
+	return CopyFile(get_value(r,"PATH",0),f);
+}
+
+
+/*CGeopts::CGeopts(long count) : InPool(tgeopts)
+{
+	r = NULL;
+	gpts.newReservedSize (count);
+}*/
+
+
+/*CGeopts::CGeopts(CGeopts  *p) : InPool(tgeopts)
+{
+	r = NULL;
+	p->load();
+	gpts = p->gpts;
+}*/
+
+
+COdb::~COdb()
+{
+	if(r)
+	{
+		const char *t = get_value(r,"TEMPORARY",0);
+		const char *p = get_value(r,"PATH",0);
+		if(t && p)
+		{
+			if(atoi(t)) {
+				unlink(p);
+			}
+		}
+	}
+	//if(count) delete[] pts;
+	free_all_requests(r);
+
+	if(odb_)
+		delete odb_;
+}
+
+void COdb::ToRequest(request* &s)
+{
+	unload();
+	s = r;
+}
+
+//===========================================================================
+class OdbCountFunction : public Function {
+public:
+	OdbCountFunction (const char *n) : Function(n,1,todb) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value OdbCountFunction::Execute(int,Value *arg)
+{
+	COdb *g;
+	arg[0].GetValue(g);
+	//g->load();
+	return Value(g->Count());
+}
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+class OdbValueFunction : public Function {
+	bool deprecated;
+	const char *newName;
+public:
+	OdbValueFunction (const char *n, bool d, const char *nn = NULL) : Function(n,2,todb,tstring), deprecated(d), newName(nn)
+	{info = "Returns a list of values from the given ODB column.";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value OdbValueFunction::Execute(int,Value *arg)
+{
+    DeprecatedMessage (deprecated, "odb", newName);
+
+	COdb *codb;
+	arg[0].GetValue(codb);
+
+	const char *cval;
+	arg[1].GetValue(cval);
+	string columnName(cval);
+	
+	//codb->load();
+
+	MvAbstractOdb *odb=codb->odb();
+	
+	if(!odb)
+		return Value();	
+
+	const MvOdbColumn *col=odb->loadColumn(columnName);
+
+	if(!col)
+		return Value();	
+	
+
+	if(col->rowNum() <=0)
+		return Value();
+
+	Content *c = 0;
+
+	if(col->type() == MvOdbColumn::Float ||
+	   col->type() == MvOdbColumn::Bitfield)
+	{
+	    	CVector *v = new CVector(col->rowNum());  // vectors can only hold numbers
+        	c = v;
+		for(int i=0; i < col->rowNum(); i++)
+		{
+			(*v)[i] = col->floatData().at(i);
+		}
+	}
+	if(col->type() == MvOdbColumn::Int)
+	{
+	    	CVector *v = new CVector(col->rowNum());  // vectors can only hold numbers
+        	c = v;
+		for(int i=0; i < col->rowNum(); i++)
+		{
+			(*v)[i] = col->intData().at(i);
+		}
+	}
+	
+	else if (col->type() == MvOdbColumn::String)
+	{
+	    	CList *v = new CList(col->rowNum());     // we need a list to hold strings
+       	 	c = v;
+		for(int i=0; i < col->rowNum(); i++)
+		{
+			(*v)[i] = col->stringData().at(i).c_str();
+		}
+	}	
+
+	odb->unloadColumn(columnName);
+
+	return Value(c);
+}
+
+//-------------------------------------------------------------------
+//===========================================================================
+
+static void install(Context *c)
+{
+	c->AddFunction(new OdbCountFunction("count"));
+	c->AddFunction(new OdbValueFunction("values", false));           // new version
+	c->AddFunction(new OdbValueFunction("value",  true, "values"));  // deprecated version
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/code.cc b/src/Macro/code.cc
new file mode 100644
index 0000000..64c94d2
--- /dev/null
+++ b/src/Macro/code.cc
@@ -0,0 +1,312 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "code.h"
+#include "opcodes.h"
+#include "values.h"
+
+Step *OpPush::Execute(void)
+{
+	Context *s = Owner();
+
+	marslog(LOG_DBUG,"Push %s",Name);
+
+	switch(type)
+	{
+        case PUSH_TIME: 
+        {
+            int h = 0,m = 0,z = 0;
+            sscanf(Name,"%d:%d:%d",&h,&m,&z);
+            s->Push( Value( (h*3600+m*60+z) / 86400.0 ) );
+        }
+        break;
+
+        case PUSH_DATE: 
+        { // sgi needs the {
+            Date d(Name);
+            s->Push(Value(d));
+        }
+        break;
+                        
+
+		case PUSH_NUMBER:	
+			s->Push(Value(atof(Name)));
+			break;
+
+		case PUSH_NEGATIVE:	
+			s->Push(Value(-atof(Name)));
+			break;
+
+		case PUSH_IDENT:
+			s->Push(s->Fetch(Name));
+			break;
+
+		case PUSH_STRING:
+			s->Push(Value(Name));
+			break;
+
+		case PUSH_NIL:
+			s->Push(Value());
+			break;
+
+	}
+	return Next();
+}
+
+Step *OpPop::Execute(void)
+{
+	Context *s = Owner();
+	s->Pop();
+	return Next();
+}
+
+Step *OpCall::Execute(void)
+{
+	Context *s = Owner();
+	marslog(LOG_DBUG,"Call %s %d",Name,Arity);
+	s->CallFunction(Name,Arity);
+	return Next();
+}
+
+Step *OpGoto::Execute(void)
+{
+	marslog(LOG_DBUG,"Goto");
+	return Branch;
+}
+
+
+bool OpTest::Pass(Value &v)   // determines whether the given value passes for true/false
+{
+	double   d;
+
+	switch(v.GetType())
+	{
+		case tnil:
+			d = 0;
+			break;
+
+		case tnumber:
+			v.GetValue(d);
+			break;
+
+		case tlist:					// a list is false if any element is false
+			CList *list;
+			v.GetValue(list);
+			if (list->Count())
+			{
+				bool all_pass = true;
+				int count = list->Count(); 
+				for (int i = 0;i<count;i++)
+				{
+					 all_pass = all_pass && Pass((*list)[i]);  // recursive call to test the element
+
+					 if (!all_pass)  // short-circuit
+					 	break;
+				}
+
+				d = all_pass;
+			}
+			else
+				d = 0;  // empty list means 'false'
+			break;
+
+		default:    /* all other are true */
+			d = 1;
+			break;
+
+		// Maybe compare with []
+
+	}
+	
+	return (d != 0);
+}
+
+
+
+Step *OpTest::Execute(void)
+{
+	Value    v = Owner()->Pop();
+
+	marslog(LOG_DBUG,"Test");
+
+	if(Pass(v))
+		return Next();
+	else
+		return OpGoto::Execute();
+}
+
+Step *OpReturn::Execute(void)
+{
+	marslog(LOG_DBUG,"Return");
+	return 0; // No more lines 
+}
+
+Step *OpStore::Execute(void)
+{
+	Context *s = Owner();
+	marslog(LOG_DBUG,"Store %s [%d]",Name,Count);
+	s->Store(Name,s->Pop(),Count);
+	return Next();
+}
+
+Step *OpParam::Execute(void)
+{
+	Context *s = Owner();
+
+	marslog(LOG_DBUG,"Param %s",Name);
+// Make sure argument masks global variables
+
+	//s->AddLocal(new Variable(Name,Value(0.0)));
+	//s->Store(Name,s->NextParameter(),0);
+	s->AddParameter(Name);
+	return Next();
+}
+
+Value UserFunction::Execute(int arity,Value *a)
+{
+	return Address->Run(0,arity,a);
+}
+
+Value ObjectFunction::Execute(int arity,Value *a)
+{
+	Value v = Address->Run(0,arity,a);
+	// What shall we do with v?
+	return Value(new CObject(Name(),Address));
+}
+
+void Context::AddExtern(const char *nam,const char *cmd)
+{
+	Context *c  = new Context(nam,0);
+	ExternFunction *f = new ExternFunction(nam,c);
+	AddContext(c); 
+	AddFunction(f); 
+	f->SetCommand(cmd,0);
+}
+
+extern "C" {
+
+void update_branch(void *a,void *b)
+{
+	OpGoto *g = (OpGoto*)a;
+	Step   *s = (OpGoto*)b;
+	g->SetBranch(s);
+	Context::Current->NewStep(0);
+	if(mars.debug) printf("---- update branch from %d to %d\n",g->line,g->line);
+}
+
+
+void new_context(const char *name,int handler,int user,int oo)
+{
+	Context *c  = new Context(name,oo);
+	Function *f;
+	
+	if(oo)        f = new ObjectFunction(name,c);
+	else if(user) f = new UserFunction(name,c);
+	else          f = new ExternFunction(name,c);
+
+	c->Macro    = f;
+
+	Context::Current->AddContext(c);
+
+	if(handler)
+		Context::Current->AddHandler(f);
+	else
+		Context::Current->AddFunction(f);
+
+	Context::Current = c;
+
+	if(mars.debug) printf("---- new_context %s\n",name);
+}
+
+
+void start_global(char *name)
+{
+	Context::Current->AddGlobal(new Variable(name,Value(0.0)));
+
+	// Select the Init context
+
+    Context *c = Context::Current->FindContext(Context::InitGlobals);
+	if(c) 
+		Context::Current = c;
+	else
+		new_context(Context::InitGlobals,0,1,0);
+
+	if(mars.debug) printf("---- stat_global %s\n",name);
+}
+
+void end_global(char *s)
+{
+	// Restore the current context
+	Context::Current = (Context*)Context::Current->Owner();
+	if(mars.debug) printf("---- end_global %s\n",s);
+}
+void argument_count(int n)
+{
+	UserFunction *f = (UserFunction*)Context::Current->Macro;
+	if(n == 0) f->SetTypes(0,0);
+	if(mars.debug) printf("---- argument_count %d\n",n);
+}
+
+void extern_command(char *s,char *p)
+{
+	ExternFunction *f = (ExternFunction*)Context::Current->Macro;
+	f->SetCommand(s,p);
+	if(mars.debug) printf("---- extern_command %s %s\n",s,p);
+}
+
+void argument_type(char *s)
+{
+	extern int zzerror(char*);
+	UserFunction *f = (UserFunction*)Context::Current->Macro;
+
+	vtype t = Value::NameType(s);
+	if(t == tnone) zzerror("Bad argumenent type");
+	else f->AddType(t);
+
+	if(mars.debug) printf("---- argument_type %s\n",s);
+}
+
+void end_context(char *s)
+{
+	Context::Current = (Context*)Context::Current->Owner();
+	if(mars.debug) printf("---- end_context %s\n",s);
+}
+
+void *new_code(int opcode,char *carg,int iarg,int line)
+{
+
+	Step *s;
+
+	switch(opcode)
+	{
+		case OP_NOP      : s = new Step;     		       break;
+		case OP_PUSH     : s = new OpPush(carg,iarg);      break;
+		case OP_POP      : s = new OpPop;                  break;
+		case OP_CALL     : s = new OpCall(carg,iarg);      break;
+		case OP_GOTO     : s = new OpGoto;                 break;
+		case OP_TEST     : s = new OpTest;                 break;
+		case OP_RETURN   : s = new OpReturn;               break;
+		case OP_STORE    : s = new OpStore(carg,iarg);     break;
+		case OP_PARAM    : s = new OpParam(carg);          break;
+	}
+
+	if(mars.debug) {
+		printf("%04d ",line + 1);
+		s->Print();
+	}
+
+	s->line = line + 1;
+	s->ref  =  opcode;
+
+	Context::Current->AddStep(s);
+	return s;
+}
+
+} // extern C
diff --git a/src/Macro/compute.cc b/src/Macro/compute.cc
new file mode 100644
index 0000000..1a0dc4a
--- /dev/null
+++ b/src/Macro/compute.cc
@@ -0,0 +1,197 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <ctype.h>
+#include <script.h>
+
+void Compute::rename(math *m,char *name,const char *sub)
+{
+	if(m)
+	{
+		if(m->name && (m->arity<=0) && (name == m->name) )
+		{
+			strfree(name);
+			m->name = strcache(sub);
+		}
+		rename(m->left,name,sub);
+		rename(m->right,name,sub);
+	}
+}
+
+// Import all the relevent names
+
+void Compute::import(FILE *f,math *m,request *r)
+{
+	static int n = 0;
+	if(m)
+	{
+		import(f,m->left,r);
+		import(f,m->right,r);
+
+		if(m->name && m->arity<=0)
+			if(!is_number(m->name) && (m->name[0] != '.') )
+			{
+				char buf[1024];
+				const char *p = buf;
+
+				sprintf(buf,"%s",m->name);
+
+				// Get rid of quotes
+				if(*buf == '"' || *buf =='\'')
+				{
+					p = buf+1;
+					buf[strlen(buf)-1] = 0;
+				}
+
+				p = makepath(dirname(Name()),p);
+
+				fprintf(f,"x%d = metview(\"%s\")\n",n,p);
+
+				// Add a dummy subrequest, so pool_link_objects
+				// do its work
+				request *u = empty_request("DUMMY");
+				/* sprintf(buf,".x%d",n); */
+				set_value(u,"_NAME","%s",p);
+				sprintf(buf,"PARAMETER_%d",n);
+				set_subrequest(r,buf,u);
+				free_all_requests(u);
+
+				//
+
+				char *s = strcache(m->name);
+				sprintf(buf,".x%d",n);
+				rename(Math,s,buf);
+				strfree(s);
+				n++;
+
+			}
+	}
+}
+
+void Compute::write(FILE *f,math *m)
+{
+	if(m)
+	{
+		if(m->name)
+			if(m->arity <= 0)
+			{
+				if(is_number(m->name))
+					fprintf(f,"%s",m->name);
+				else
+					fprintf(f,"%s",m->name + 1);
+
+				if(m->arity < 0)
+				{
+					fprintf(f,"[");
+					write(f,m->left);
+					fprintf(f,"]");
+				}
+			}
+			else
+			{
+				fprintf(f,"(");
+				if(isalpha(m->name[0]))
+				{
+					fprintf(f,"%s(",m->name);
+					write(f,m->left);
+					fprintf(f,")");
+				}
+				else 
+				{
+					write(f,m->left);
+					fprintf(f," %s ",m->name);
+					write(f,m->right);
+				}
+				fprintf(f,")");
+			}
+		else {
+			write(f,m->left);
+			if(m->right) fprintf(f,",");
+			write(f,m->right);
+		}
+	}
+}
+
+// Free form formula
+
+Compute::Compute(const char *name,request *r) : Script(name)
+{
+	const char *form = get_value(r,"FORMULA",0);
+	char *file = marstmp();
+	FILE *f = fopen(file,"w");
+	if(!f) marslog(LOG_EROR|LOG_PERR,"Cannot open %s",file);
+	else {
+
+		if((Math = compmath(form)) == 0)
+			fprintf(f,"return error('Invalid formula')\n");
+		else {
+			import(f,Math,r);
+			fprintf(f,"x =  ");
+			write(f,Math);
+			fprintf(f,"\n");
+			fprintf(f,"return x");
+		}
+		fclose(f);
+
+	}
+	Compile(file);
+	unlink(file);
+}
+
+Compute::~Compute()
+{
+	free_math(Math);
+}
+
+// Simple formula
+
+Formula::Formula(const char *name,request *r) : Script(name)
+{
+
+	char *file = marstmp();
+
+
+	FILE *f = fopen(file,"w");
+	if(!f) marslog(LOG_EROR|LOG_PERR,"Cannot open %s",file);
+	else {
+		const char *p;
+		if(mars.debug) fprintf(f,"trace(1)\n");
+		fprintf(f,"x = arguments()\n");
+		fprintf(f,"x = x[1]\n");
+		if(p = get_value(r,"FUNCTION",0))
+		{
+			fprintf(f,"return %s(",p);
+			if(p = get_value(r,"PARAMETER_2",0))
+				fprintf(f,"x['PARAMETER_1'],x['PARAMETER_2']");
+			else
+				fprintf(f,"x['PARAMETER']");
+			fprintf(f,")");
+		}
+		if(p = get_value(r,"OPERATOR",0))
+			fprintf(f,"return x['PARAMETER_1'] %s x['PARAMETER_2']\n",p);
+
+		fclose(f);
+	}
+	if(mars.debug)
+	{
+		char line[1024];
+		f = fopen(file,"r");
+		while(fgets(line,sizeof(line),f))
+			cout << line;
+		fclose(f);
+		cout << endl;
+	}
+	Compile(file);
+	unlink(file);
+}
+
+
+Formula::~Formula()
+{
+}
diff --git a/src/Macro/context.cc b/src/Macro/context.cc
new file mode 100644
index 0000000..a225e12
--- /dev/null
+++ b/src/Macro/context.cc
@@ -0,0 +1,552 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "script.h"
+#include <stdarg.h>
+
+boolean  Context::stop             = false;
+int      Context::trace            = 0;
+int      Context::waitmode         = 0;
+int      Context::sendlines        = 0;
+int      Context::pause            = 0;
+Context *Context::Current          = 0;
+Step    *Context::Instruction      = 0;
+Linkage *Linkage::Links            = 0;
+const char    *Context::InitGlobals      = strcache(".init_globals");
+const int      UN_BUFSIZ = 300;
+
+const char *Context::UniqueName(void)
+{
+	static char buf[ UN_BUFSIZ ];
+	static int n = 0;
+	Context *c = Current;
+	while(c && c->Owner()) c = c->Owner();
+	const char *name = (c && c->Name()) ? c->Name() : "?macro?";
+	int cnt = sprintf(buf,"/Process@%d/%s, line %d:%d",getpid(),name,
+		Instruction?Instruction->line:0,n++);
+	if( cnt >= UN_BUFSIZ )
+	    marslog( LOG_EXIT, "Buffer overflow in Context::UniqueName()" );
+	return buf;
+}
+
+static const char *modes[] =  {
+
+    "edit",      0,
+
+    "hardcopy",  "batch",
+    "batch",     "execute",
+    "execute",   0,
+
+    "prepare",   "visualise",
+    "examine",   "visualise",
+    "save",      "visualise",
+    "drop",      "visualise",
+    "visualise", "execute",
+
+};
+
+
+const char *Context::FallBackHandler(const char *name)
+{
+	static boolean first = true;
+
+	if(!name) return 0;
+
+	if(first)
+	{
+		for(unsigned int i=0;i<NUMBER(modes);i++)
+			modes[i] = strcache(modes[i]);
+		first = false;	
+	}
+
+	for(unsigned int i=0;i<NUMBER(modes); i += 2)
+		if(name == modes[i])
+			return modes[i+1];
+
+	return 0;
+}
+
+Value Context::Run(const char *handler,int ac,Value *av)
+{
+	argn  = 0;
+	argc  = ac;
+	argv  = av;
+	stop  = false;
+
+	if(!inited)
+	{
+		inited = 1;
+		Function *f = FindFunction(InitGlobals,0,0);
+		if(f && f->Owner() == this) {
+			// Because InitGlobals does not return, push a value on the stack
+			Push(Value(0.0));
+			f->Execute(0,0);
+		}
+	}
+
+	Context *savedContext = Current;  // save the previous context
+	Current = this; // ?????
+
+	SetError(0);
+
+	if(handler)
+	{
+		Function *f = FindHandler(handler,argc,argv);
+		if(f) return f->Execute(argc,argv);
+	}
+
+	// Save locals
+	List there;
+
+	Locals.Save(there);
+
+	Instruction = FirstStep();
+
+	while(Instruction && (GetError() == 0) && !Stopped())
+	{
+		if (Context::SendLines())  // should we send line numbers to the macero editor?
+		{
+			static char lineMessage[64];
+			static int line = -1;
+
+			if (Instruction->line != line)
+			{
+            	line = Instruction->line;
+				sprintf (lineMessage, "MACROEDITOR: LINE %d", line);
+				Script::PutMessage(0, lineMessage);  // first param is unused
+
+				if (Script::PauseBetweenLines())  // optional pause between lines?
+					sleep(PauseBetweenLines());
+			}
+		}
+		Instruction = Instruction->Execute();
+	}
+
+	Locals.Empty();
+	Locals.Restore(there);
+
+	Current = savedContext;  // restore the pointer to the previous context
+	return Pop();
+}
+
+Context *Context::FindContext(const char *name)
+{
+	return (Context*)Contexts.Find(name,0);
+}
+
+Function *Context::WhichFunction(const char *name,int arity,Value *arg,int method)
+{
+
+	// Make sure that all the ASync are up to date
+//	for(int i=0;i<arity;i++) arg[i].Sync();
+
+
+	Function *v = FindMethod(name,arity,arg,GetObject());
+
+	if(!method)
+	{
+		if(v == 0)
+			v = FindInDictionary(name,arity,arg);
+
+		if(v == 0)
+			v = FindFunction(name,arity,arg);
+
+		if(!method && v == 0)
+			v = FindFallback(name,arity,arg);
+
+		if(v == 0)
+			v = FindHandler(name,arity,arg);
+
+		if(v == 0)
+			v = FindLibrary(name,arity,arg);
+	}
+
+	if(v == 0) {
+
+		char buf[1024];
+		if(method)
+			strcpy(buf,"Method not found: ");
+		else
+			strcpy(buf,"Function not found: ");
+		strcat(buf,name);
+		if(arity)  { 
+			strcat(buf,"(");
+			for(int i=0;i<arity;i++)
+			{
+				const char *p;
+				arg[i].GetType(&p);
+				strcat(buf,p);
+				if(i<arity-1) strcat(buf,",");
+			}
+			strcat(buf,")");
+		}
+		Error(buf);
+
+	}
+	return v;
+}
+
+void Context::CallFunction(const char *name,int arity,int method)
+{
+	
+	Function *v = WhichFunction(name,arity,GetParameters(arity),method);
+	Value  u;
+	int i;
+	int line = CurrentLine();
+
+	if(trace && v)
+	{
+
+		if(trace == 1)
+		{
+			cout << "# Line " << line;
+			cout << ": Calling " << v->Name() << '(';
+		}
+		else
+		{
+			cout << "call('" << v->Name() << "',\n";
+		}
+
+		Value *e = GetParameters(arity);
+
+		for(i=0;i<arity;i++)
+		{
+			e[i].Dump(trace);		
+			if (i != arity - 1) cout << ',';
+		}
+		if(trace == 1)
+			cout << ')' << endl;
+		else
+			cout << ");" << endl;
+	}
+
+	if(v) u = v->Execute(arity,GetParameters(arity));
+
+	// Pop parameters
+
+	while(arity--) Pop();
+
+	// Push result
+
+	if((trace || waitmode) && v)
+	{
+		if(trace == 1)
+		{
+			cout << "# Line " << line;
+			cout << ": " << v->Name() << " returns ";
+			u.Dump(trace);
+		}
+
+		if(waitmode || trace > 1)
+		{
+			u.Sync();
+		}
+
+		if(trace > 1)
+		{
+			cout << "result('" << v->Name() << "',\n";
+			u.Dump(trace);
+			cout << ");";
+		}
+
+		if (trace)
+			cout << endl;
+	}
+
+	Push(u);
+
+}
+
+Variable  *Context::FindGlobal(const char *name)
+{
+	Variable *v = (Variable*)Globals.Find(name);
+	if(v) return v;
+	if(Owner()) return Owner()->FindGlobal(name);
+	return 0;
+}
+
+Variable  *Context::FindVariable(const char *name)
+{
+	Variable *v = (Variable*)Locals.Find(name);
+	if(v) return v;
+	return FindGlobal(name);
+}
+
+Value Context::ImportVariable(const char *name)
+{
+	Context *c = this;
+	Variable *v = (Variable*)Locals.Find(name);
+
+	if(v)
+	{
+		Error("Cannot import '%s', the name is"
+		" already defined at this level", name);
+		return v->GetValue();
+	}
+
+	while(c)
+	{
+		Variable *v = c->FindVariable(name);
+		if(v) 
+		{
+			if(v->IsExported())
+				Locals.Append(new Variable(name,v));
+				
+			return v->GetValue();
+		}
+		c = c->Owner();
+	}
+
+	return Error("Cannot import '%s', variable not found", name);
+}
+
+Value Context::ExportVariable(const char *name)
+{
+	Variable *v = (Variable*)Locals.Find(name);
+
+	if(!v) return Error("Cannot export '%s', variable not found", name);
+
+	v->Export();
+	return v->GetValue();
+}
+
+Function  *Context::FindFunction(const char *name,int arity,Value *arg)
+{
+	Function *v = 0;
+	
+	while(v = ((Function*)Functions.Find(name,v)) )
+	{
+		if(v->ValidArguments(arity,arg))
+			return v;
+	}
+	if(Owner()) return Owner()->FindFunction(name,arity,arg);
+	return 0;
+}
+
+Function  *Context::FindMethod(const char *name,int arity,Value *arg)
+{
+	Function *v = 0;
+	
+	while(v = ((Function*)Methods.Find(name,v)) )
+	{
+		if(v->ValidArguments(arity,arg))
+			return v;
+	}
+
+	if(Owner()) return Owner()->FindMethod(name,arity,arg);
+	return 0;
+}
+
+Function  *Context::FindMethod(const char *name,int arity,Value *arg,CObject* obj)
+{
+	if(!obj)
+		return 0;
+
+	Context* code[1024];
+	int n = 0;
+	obj->GetInheritance(code,n);
+
+	if(n > 1024)
+		Error("Inheritance is too deep");
+	
+	for(int i = 0; i < n; i++)
+	{
+		Function* f = code[i]->FindMethod(name,arity,arg);
+		if(f) return f;
+	}
+
+	return 0;
+}
+
+Function  *Context::FindFallback(const char *name,int arity,Value *arg)
+{
+	Function *v = 0;
+	
+	while(v = ((Function*)Fallbacks.Find(name,v)) )
+	{
+		if(v->ValidArguments(arity,arg))
+			return v;
+	}
+	if(Owner()) return Owner()->FindFallback(name,arity,arg);
+	return 0;
+}
+
+Function  *Context::FindHandler(const char *name,int arity,Value *arg)
+{
+	const char *handler = name;
+
+	while(name)
+	{
+		Function *v = 0;
+		while(v = (Function*)(Handlers.Find(name,v)) )
+		{
+			if(v->ValidArguments(arity,arg))
+				return v;
+		}
+		name = FallBackHandler(name);
+	}
+
+	if(Owner()) return Owner()->FindHandler(handler,arity,arg);
+
+	return 0;
+}
+
+void Context::Store(const char *name,Value x,int arity)
+{
+	Variable *v = FindVariable(name);
+	if(v) {
+		v->SetValue(x,arity,GetParameters(arity));
+		while(arity--) Pop();
+	}
+	else {
+		if(arity == 0)
+			Locals.Append(new Variable(name,x));
+		else
+			Error("Variable not found: %s",name);
+	}
+
+}
+
+Value& Context::Fetch(const char *name)
+{
+	Variable *v = FindVariable(name);
+
+	if(v) return v->GetValue();
+
+	char buf[80];
+	sprintf(buf,"Variable not found: %s",name);
+	return Error(buf);
+}
+
+void Context::RuntimeError(const char *msg,int line)
+{
+	const char* mname = Current->Name();
+	if(*msg == '-')
+		marslog(LOG_EROR|LOG_PERR,"Line %d in '%s': %s",line,mname,msg+1);
+	else
+		marslog(LOG_EROR,"Line %d in '%s': %s",line,mname,msg);
+}
+
+
+Value& Context::Error(const char *msg,...)
+{
+	va_list list;
+	char buf[1024];
+	va_start(list,msg);
+	vsprintf(buf, msg, list);
+	va_end(list);
+
+	if(Owner()) 
+		Owner()->Error("%s",buf);
+	else 
+	{
+		if(msg)  {
+			int line = Instruction?Instruction->line:0;
+			RuntimeError(buf,line);
+		}
+	}
+	SetError(1);
+
+	static Value e;
+
+	object = 0;
+
+	e = Value(1,buf);
+	return e;
+}
+
+Context::Context(const char *name,int o) : Node(name), oo(o)
+{
+	error   = 0;
+	argc    = 0; 
+	argv    = 0; 
+	argn    = 0; 
+	Macro   = 0;
+	inited  = 0;
+	object  = 0;
+
+	if(oo) AddGlobal(new Variable(".super",Value(new CList(0))));
+}
+
+Context::~Context()
+{
+	Methods.Empty();
+	Functions.Empty();
+	Handlers.Empty();
+	Steps.Empty();
+	Locals.Empty();
+	Globals.Empty();
+	Contexts.Empty();
+}
+
+Value Context::NextParameter(void)
+{
+    if(argn >= argc)
+		return Error("Function was called with too few parameters");
+	else
+		return argv[argn++];
+
+}
+
+void Context::AddParameter(const char* name)
+{
+	if(oo)
+	{
+		Variable *v = FindGlobal(name);
+		if(!v || v->Owner() != this)
+			AddGlobal(new Variable(name,Value(0.0)));
+	}
+	else
+		AddLocal(new Variable(name,Value(0.0)));
+	Store(name,NextParameter(),0);
+}
+
+CList  *Context::GetGlobals()
+{
+	Variable *v = (Variable*)Globals.Head();
+
+	int n = 0;
+	while(v)
+	{
+		n++;
+		v = (Variable*)v->Next();
+	}
+
+	CList* c = new CList(n);
+
+	n = 0;
+	v = (Variable*)Globals.Head();
+	while(v)
+	{
+		(*c)[n] = v->GetValue();
+		n++;
+		v = (Variable*)v->Next();
+	}
+	return c;
+}
+
+void Context::SetGlobals(CList* c)
+{
+	Variable *v = (Variable*)Globals.Head();
+
+	int n = 0;
+	while(v)
+	{
+		v->SetValue((*c)[n++],0,0);
+		v = (Variable*)v->Next();
+	}
+}
+
+CObject* Context::GetObject()
+{
+	if(object) return object;
+	if(Owner()) return Owner()->GetObject();
+	return 0;
+}
diff --git a/src/Macro/date.cc b/src/Macro/date.cc
new file mode 100644
index 0000000..5631cf5
--- /dev/null
+++ b/src/Macro/date.cc
@@ -0,0 +1,770 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <time.h>
+#include "MvApplication.h"
+#include "macro.h"
+
+
+const char *Date::stringFormat = "yyyy-mm-dd HH:MM:SS";
+const char *Date::numberFormat = "yyyymmdd";
+
+const double cSecEpsilon = 0.000001157; //-- 0.1 sec
+
+const char *_mvmonth[12][2] = {
+	{ "Jan","January",},
+	{ "Feb","February",},
+	{ "Mar","March",},
+	{ "Apr","April",},
+	{ "May","May",},
+	{ "Jun","June",},
+	{ "Jul","July",},
+	{ "Aug","August",},
+	{ "Sep","September",},
+	{ "Oct","October",},
+	{ "Nov","November",},
+	{ "Dec","December",},
+};
+
+const char *_mvday[7][2] = {
+	{ "Mon", "Monday", },
+	{ "Tue", "Tuesday", },
+	{ "Wed", "Wednesday", },
+	{ "Thu", "Thursday", },
+	{ "Fri", "Friday", },
+	{ "Sat", "Saturday", },
+	{ "Sun", "Sunday", },
+};
+
+//============================================================================
+
+void CDate::ToNumber(double &x)
+{
+	char buf[1024];
+	date.Format(Date::NumberFormat(),buf);
+	x = atof(buf);
+}
+
+void CDate::ToString(const char* &x)
+{
+	static char buf[20];
+	date.Format(Date::StringFormat(),buf);
+	x = buf;
+}
+
+void CDate::Dump2()
+{
+	cout << "date(" << date._julian() << "," << date._second() << ")";
+}
+
+//============================================================================
+
+int Date::Julian() {
+	Date jan1(Year()*10000 + 100 + 1);
+	return (int)(*this - jan1 + 1);
+}
+
+static request *pref()
+{
+	static request *p = 0;
+	static MvRequest r;  // declare locally to avoid the destructor removing it
+
+	if(p == 0)
+	{
+		r = MvApplication::getPreferences();
+		p = r;
+	}
+	return p;
+}
+
+const char *Date::MonthName(int n, boolean full)
+{
+	request *p = pref();
+	const char *s = get_value(p,
+		full?"MONTH_LONG_NAMES":"MONTH_SHORT_NAMES",n-1);
+	return s?s:_mvmonth[n-1][int(full)];
+}
+
+const char *Date::DayName(int n, boolean full)
+{
+	request *p = pref();
+	const char *s = get_value(p,full?"DAY_LONG_NAMES":"DAY_SHORT_NAMES",n-1);
+	return s?s:_mvday[n-1][int(full)];
+}
+
+const char *Date::StringFormat(void)
+{
+	request *p = pref();
+	const char *s = no_quotes(get_value(p,"STRING_DATE_FORMAT",0));
+	return s?s:stringFormat;
+}
+
+const char *Date::NumberFormat(void)
+{
+	request *p = pref();
+	const char    *s = no_quotes(get_value(p,"NUMBER_DATE_FORMAT",0));
+	return s?s:numberFormat;
+}
+
+void Date::Print(void)
+{
+	char buf[1024];
+	Format(StringFormat(),buf);
+    cout << buf ;
+}
+
+
+Date::Date(double n)
+{
+	julian   = (long)n;
+	double s = n - (double)julian;
+
+	if( s < 0.0 )
+	  { //-- 'n' is a negative decimal value; decimal part thus
+	    //-- protrudes into the previous julian day; also we need
+	    //-- to "reverse" decimal part, e.g.: -1.25 => -2 + 0.75
+	    julian--;
+	    second = (long)( (1.0 - (-s) + cSecEpsilon) * 86400.0 );
+	  }
+	else
+	  { //-- 'n' is an integer, or a positive decimal value
+	    second = (long)((n-julian+cSecEpsilon)*86400.0);
+	  }
+
+	julian = date_to_julian(julian);
+
+	while(second < 0)     { second += 86400; julian++; }
+	while(second > 86399) { second -= 86400; julian--; }
+}
+
+Date::Date(long d, long t)
+{
+	julian  = date_to_julian(d);
+
+	second = (( t/100 ) * 60 + (t % 100)) * 60;
+	while(second < 0)     { second += 86400; julian++; }
+	while(second > 86399) { second -= 86400; julian--; }
+}
+
+Date::Date(const char *s)
+{
+	boolean dum;
+	if(!parsedate(s,&julian,&second,&dum))
+	{
+		julian = date_to_julian(atol(s));
+		second = 0;
+	}
+}
+
+
+Date Date::operator+(double &n)
+{
+	Date date;
+	double secEps = n < 0.0 ? -cSecEpsilon : cSecEpsilon;
+
+	long j = (long)n;
+	long s = (long)(((n - (double)j) + secEps)*86400.0);
+
+	date.julian = julian +j;
+	date.second = second +s;
+
+	while(date.second < 0)     { date.second += 86400; date.julian--; }
+	while(date.second > 86399) { date.second -= 86400; date.julian++; }
+
+	return date;
+}
+
+Date Date::operator-(double& n)
+{
+	double m = -n;
+	return operator+(m);
+}
+
+double Date::operator-(Date& d)
+{
+	return (double)(julian - d.julian) + (double)(second - d.second)/86400.0;
+}
+
+//=============================================================================
+
+static int collect(const char* &f,char *buf,int& i,char &c)
+{
+	int n;
+	c = 0;
+	while(*f)
+	switch(*f)
+	{
+		case 'y':
+		case 'm':
+		case 'd':
+		case 'D':
+		case 'H':
+		case 'M':
+		case 'S':
+			c = *f;
+			n = 1;
+			while(*++f == c) n++;
+			return n;
+			// break;
+
+		default:
+			buf[i++] = *f++;
+			break;
+	}
+	return -1;
+}
+
+static void copy(char *buf,int& i,int n,char c)
+{
+	for(int j= 0;j<n;j++)
+		buf[i++] = c;
+}
+
+static void copy(char *buf,int& i,const char *f,int n)
+{
+	char tmp[20];
+	char *p = tmp;
+
+	sprintf(tmp,f,n);
+
+	while(*p) buf[i++] = *p++;
+}
+
+static void copy(char *buf,int& i,const char *p)
+{
+	while(*p) buf[i++] = *p++;
+}
+
+void Date::Format(const char *f,char *buf)
+{
+	int  i = 0;
+	char c = 0;
+
+	for(;;)
+	{
+		int n = collect(f,buf,i,c);
+		switch(c)
+		{
+			case 'y':
+					switch(n)
+					{
+						case 2:
+							copy(buf,i,"%02d",Year() % 100);
+							break;
+
+						case 4:
+							copy(buf,i,"%04d",Year());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'm':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Month());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Month());
+							break;
+
+						case 3:
+							copy(buf,i,MonthName(Month(),false));
+							break;
+
+						case 4:
+							copy(buf,i,MonthName(Month(),true));
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'd':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Day());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Day());
+							break;
+
+						case 3:
+							copy(buf,i,DayName(DayOfWeek(),false));
+							break;
+
+						case 4:
+							copy(buf,i,DayName(DayOfWeek(),true));
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'D':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Julian());
+							break;
+
+						case 3:
+							copy(buf,i,"%03d",Julian());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'H':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Hour());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Hour());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'M':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Minute());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Minute());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'S':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Second());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Second());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+		}
+
+		if(n < 0 ) break;
+
+	}
+
+	buf[i] = 0;
+
+}
+
+//=============================================================================
+
+class TimeDateFunction : public Function {
+	char type;
+public:
+	TimeDateFunction(const char *n,char t) : type(t),Function(n,1,tnumber)
+	{ info = "Converts a number to a value suitable for date computations";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TimeDateFunction::Execute(int ,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+
+	switch(type)
+	{
+		case 'd': d *= 86400;  break;
+		case 'h': d *= 3600;   break;
+		case 'm': d *= 60;     break;
+		case 's':              break;
+	}
+	return Value(d/86400);
+}
+//=============================================================================
+
+class DateTimeFunction : public Function {
+	char type;
+public:
+	DateTimeFunction(const char *n,char t) : type(t),Function(n,1,tdate)
+	{ info = "Extract a date component"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value DateTimeFunction::Execute(int ,Value *arg)
+{
+	Date d;
+	arg[0].GetValue(d);
+	int n;
+
+	switch(type)
+	{
+		case 'y': n = d.Year();      break;
+		case 'M': n = d.Month();     break;
+		case 'd': n = d.Day();       break;
+		case 'h': n = d.Hour();      break;
+		case 'm': n = d.Minute();    break;
+		case 's': n = d.Second();    break;
+		case 'w': n = d.DayOfWeek(); break;
+		case 'a': n = d.YyMmDd();    break;
+		case 'b': n = d.YyyyMmDd();  break;
+		case 'j': n = d.Julian();    break;
+		case 'J': n = int(d._julian());   break;
+		case '1': n = d.Hour()*100 + d.Minute();                     break;
+		case '2': n = d.Hour()*10000 + d.Minute()*100+d.Second();    break;
+
+	}
+	return Value(n);
+}
+
+//=============================================================================
+
+class DateStringFunction : public Function {
+	boolean do_string;
+public:
+	DateStringFunction(const char *n,boolean s) : Function(n),
+		do_string(s) {}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+Value DateStringFunction::Execute(int arity,Value *arg)
+{
+	Date d;
+	const char *f = do_string?Date::StringFormat():Date::NumberFormat();
+	char buf[1024];
+
+	arg[0].GetValue(d);
+
+	if(arity == 2) arg[1].GetValue(f);
+
+	d.Format(f,buf);
+
+	return do_string?Value(buf):Value(atof(buf));
+
+}
+
+int DateStringFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 1 && arity != 2) return false;
+	if(arg[0].GetType() != tdate) return false;
+	if(arity == 2 && arg[1].GetType() != tstring) return false;
+	return true;
+}
+
+//=============================================================================
+
+class DateFunction : public Function {
+public:
+	DateFunction(const char *n) : Function(n)
+	{ info = "Creates a date from a number or a string";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+class DateNowFunction : public Function {
+public:
+	DateNowFunction(const char *n) : Function(n)
+	{ info = "Returns the current date and time";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+class DateAddFunction : public Function {
+public:
+	DateAddFunction(const char *n) : Function(n,2,tdate,tnumber)
+	{ info = "Adds a number to a date";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class DateSubFunction : public Function {
+public:
+	DateSubFunction(const char *n) : Function(n,2,tdate,tnumber|tdate) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class DateCmpFunction : public Function {
+	typedef int (*cproc)(Date*,Date*);
+	cproc F_;
+public:
+	DateCmpFunction(const char *n,cproc c) : Function(n,2,tdate,tdate) { F_ = c;};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+//=============================================================================
+
+int DateFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	if(arity != 1 && arity != 3 && arity != 6 )
+		return 0;
+
+	switch(arg[0].GetType())
+	{
+		case tnumber:
+			for(i=1;i<arity;i++)
+				if(arg[i].GetType() != tnumber)
+					return 0;
+			return 1;
+			/* break; */
+
+		case tstring:
+			return arity == 1;
+			/* break; */
+
+		default:
+			return 0;
+			/* break; */
+	}
+}
+
+Value DateFunction::Execute(int arity,Value *arg)
+{
+
+	if(arg[0].GetType() == tnumber)
+	{
+		double date;
+		double yy,mm,dd,HH,MM,SS;
+
+		switch(arity)
+		{
+			case 1:
+				arg[0].GetValue(date);
+				break;
+
+			case 3:
+				arg[0].GetValue(yy);
+				arg[1].GetValue(mm);
+				arg[2].GetValue(dd);
+				date = yy*10000+mm*100+dd;
+				break;
+
+			case 6:
+				arg[0].GetValue(yy);
+				arg[1].GetValue(mm);
+				arg[2].GetValue(dd);
+				arg[3].GetValue(HH);
+				arg[4].GetValue(MM);
+				arg[5].GetValue(SS);
+				date = yy*10000+mm*100+dd+
+					HH/24.0+MM/24.0/60.0+SS/24.0/60.0/60.0;
+				break;
+		}
+
+		Date x(date);
+		return Value(x);
+	}
+	else
+	{
+		const char *s;
+		arg[0].GetValue(s);
+		Date x(s);
+		return Value(x);
+	}
+
+}
+
+int DateNowFunction::ValidArguments(int arity,Value *arg)
+{
+  if(arity == 0 )
+    return 1;
+  else
+    return 0;
+}
+
+Value DateNowFunction::Execute( int, Value* )
+{
+  time_t     tTime;
+  struct tm* xTime;
+
+  (void)time (&tTime);
+  xTime = localtime (&tTime);
+
+  double myDate = (xTime->tm_year + 1900)*10000 + (xTime->tm_mon + 1)*100 + xTime->tm_mday;
+  double mySecs = (xTime->tm_hour)*3600 + (xTime->tm_min)*60 + xTime->tm_sec;
+
+  Date   myD( myDate + mySecs/86400.0 );
+
+  return Value(myD);
+}
+
+Value DateAddFunction::Execute(int ,Value *arg)
+{
+	Date   d;
+	double  n;
+
+	arg[0].GetValue(d);
+	arg[1].GetValue(n);
+
+	d = d + n;
+
+	return Value(d);
+}
+
+
+Value DateSubFunction::Execute(int ,Value *arg)
+{
+	Date    d;
+	Date    p;
+	double  n;
+
+	arg[0].GetValue(d);
+
+	if(arg[1].GetType() == tnumber)
+	{
+		arg[1].GetValue(n);
+		p = d - n;
+		return Value(p);
+	}
+	else
+	{
+		arg[1].GetValue(p);
+		n = d - p;
+		return Value(n);
+	}
+}
+
+//=============================================================================
+
+static int d_gt(Date* a,Date* b) { return *a>*b; }
+static int d_lt(Date* a,Date* b) { return *a<*b; }
+static int d_eq(Date* a,Date* b) { return *a==*b; }
+static int d_ne(Date* a,Date* b) { return *a!=*b; }
+static int d_ge(Date* a,Date* b) { return *a>=*b; }
+static int d_le(Date* a,Date* b) { return *a<=*b; }
+
+
+Value DateCmpFunction::Execute(int ,Value *arg)
+{
+	Date   d1;
+	Date   d2;
+
+	arg[0].GetValue(d1);
+	arg[1].GetValue(d2);
+
+	return Value(F_(&d1,&d2));
+}
+
+
+//=============================================================================
+
+class DateAddMonthsFunction : public Function {
+public:
+	DateAddMonthsFunction(const char *n) : Function(n,2,tdate,tnumber)
+	{ info = "Adds months to a date";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value DateAddMonthsFunction::Execute(int ,Value *arg)
+{
+  Date   di;
+  arg[0].GetValue(di);
+  int    y = di.Year();
+  int    m = di.Month();
+  int    d = di.Day();
+
+  int    n;
+  arg[1].GetValue(n);
+
+  m = m + n;
+
+  if( n < 0 )
+    {
+      while( m < 0 )
+	{
+	  --y;
+	  m = m + 12;
+	}
+    }
+  else
+    {
+      while( m > 12 )
+	{
+	  ++y;
+	  m = m - 12;
+	}
+    }
+
+  return Value( Date( y*10000.0 + m*100.0 + d ) );
+}
+
+//=============================================================================
+
+static void install(Context *c)
+{
+	c->AddFunction(new TimeDateFunction("hour",  'h'));
+	c->AddFunction(new TimeDateFunction("minute",'m'));
+	c->AddFunction(new TimeDateFunction("second",'s'));
+	c->AddFunction(new TimeDateFunction("day",   'd'));
+
+	c->AddFunction(new DateTimeFunction("hour",    'h'));
+	c->AddFunction(new DateTimeFunction("minute",  'm'));
+	c->AddFunction(new DateTimeFunction("second",  's'));
+	c->AddFunction(new DateTimeFunction("day",     'd'));
+	c->AddFunction(new DateTimeFunction("month",   'M'));
+	c->AddFunction(new DateTimeFunction("year",    'y'));
+	c->AddFunction(new DateTimeFunction("dow",     'w'));
+	c->AddFunction(new DateTimeFunction("yymmdd",  'a'));
+	c->AddFunction(new DateTimeFunction("yyyymmdd",'b'));
+	c->AddFunction(new DateTimeFunction("hhmm",    '1'));
+	c->AddFunction(new DateTimeFunction("hhmmss",  '2'));
+	c->AddFunction(new DateTimeFunction("julday",  'j'));
+	c->AddFunction(new DateTimeFunction("juldate", 'J'));
+
+	c->AddFunction(new DateFunction("date"));
+	c->AddFunction(new DateNowFunction("now"));
+	c->AddFunction(new DateSubFunction("-"));
+	c->AddFunction(new DateAddFunction("+"));
+	c->AddFunction(new DateAddMonthsFunction("addmonths"));
+	c->AddFunction(new DateStringFunction("string",true));
+	c->AddFunction(new DateStringFunction("number",false));
+
+	c->AddFunction(new DateCmpFunction(">", d_gt));
+	c->AddFunction(new DateCmpFunction("<", d_lt));
+	c->AddFunction(new DateCmpFunction(">=",d_ge));
+	c->AddFunction(new DateCmpFunction("<=",d_le));
+	c->AddFunction(new DateCmpFunction("=",d_eq));
+	c->AddFunction(new DateCmpFunction("<>",d_ne));
+
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/debug.cc b/src/Macro/debug.cc
new file mode 100644
index 0000000..f22168e
--- /dev/null
+++ b/src/Macro/debug.cc
@@ -0,0 +1,273 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include <malloc.h>
+#include <inc_iostream.h>
+#include <MvStopWatch.h>
+
+
+void Context::Dump(int level)
+{
+
+	cout << "### Dump of context " << Name() << endl;
+
+	if(argc) cout << "# Arguments:\n";
+
+	for(int i = 0;i<argc;i++)
+	{
+		cout << "# ";
+		argv[i].Dump(level); cout << endl;
+	}
+
+	Variable *v = (Variable*)Locals.Head();
+
+	if(v) cout << "# Local variables:\n";
+
+	while(v)
+	{
+		if(v->Name()[0] != '.')
+		{
+			cout << "# ";
+			v->Dump(level); cout << endl;
+		}
+		v = (Variable*)v->Next();
+	}
+
+	v = (Variable*)Globals.Head();
+	if(v) cout << "# Global variables:\n";
+
+	while(v)
+	{
+		cout << "# ";
+		v->Dump(level); cout << endl;
+		v = (Variable*)v->Next();
+	}
+}
+
+//=============================================================================
+
+class TraceFunction : public Function {
+public:
+	TraceFunction(char *n) : Function(n,1,tnumber)
+    {info = "Sets program execution tracing on/off";}
+	virtual Value Execute(int,Value*);
+};
+
+Value TraceFunction::Execute(int,Value *arg)
+{
+	int n = Context::Trace();
+	int m;
+
+	arg[0].GetValue(m);
+	Context::Trace(m);
+
+	return Value(n);
+}
+
+//=============================================================================
+
+class TraceFileFunction : public Function {
+public:
+	TraceFileFunction(char *n) : Function(n,1,tstring) {}
+	virtual Value Execute(int,Value*);
+};
+
+Value TraceFileFunction::Execute(int,Value *arg)
+{
+	const char *m;
+	arg[0].GetValue(m);
+
+	ofstream* f = new ofstream(m);
+
+	cout.rdbuf( f->rdbuf() ); // Memory leeak here
+
+	return Value(m);
+}
+
+//=============================================================================
+//=============================================================================
+
+class TimerFunction : public Function {
+public:
+	TimerFunction(char *n) : Function(n,1,tnumber) {}
+	virtual Value Execute(int,Value*);
+};
+
+Value TimerFunction::Execute(int,Value *arg)
+{
+	int m;
+	arg[0].GetValue(m);
+
+	if(m)
+	{
+		start_timer();
+		return Value();
+	}
+	else
+	{
+		char info[1024];
+		stop_timer(info);
+		if (*info)
+			return Value(info);
+		else
+			return Value("Time interval to small (less than 1 sec)");
+	}
+}
+//=============================================================================
+
+class StopWatchFunction : public Function {
+public:
+	StopWatchFunction(char* n, int a) : action(a), Function(n)
+			 { info = "Provides stopwatch timings"; }
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int,Value*);
+private:
+	int action;
+	static MvStopWatch* watch;
+};
+
+MvStopWatch* StopWatchFunction::watch = 0;
+
+int StopWatchFunction::ValidArguments(int arity,Value *arg)
+{
+	if( arity > 1 )
+	    return false;
+	if( action!=4 && arg[0].GetType() != tstring )
+	   return false;
+	return true;
+}
+
+Value StopWatchFunction::Execute(int,Value *arg)
+{
+	const char* txt;
+	arg[0].GetValue(txt);
+
+	switch( action )
+	{
+	  case 1:                    //-- stopwatch_start
+		if( watch )
+		{
+		   marslog(LOG_WARN,"stopwatch_start - watch already running, replace old watch!");
+		   delete watch;
+		}
+		watch = new MvStopWatch( txt );
+		break;
+
+	  case 2:                    //-- stopwatch_laptime
+		if( ! watch )
+		{
+		   marslog(LOG_WARN,"stopwatch_laptime - watch not running, starting now!");
+		   watch = new MvStopWatch( "tictac" );
+		}
+		else
+		   watch->lapTime( txt );
+		break;
+
+	  case 3:                    //-- stopwatch_reset
+		if( ! watch )
+		{
+		   marslog(LOG_WARN,"stopwatch_reset - watch not running, starting now!");
+		   watch = new MvStopWatch( "tictac" );
+		}
+		else
+		   watch->reset( txt );
+		break;
+
+	  case 4:                    //-- stopwatch_stop
+		if( watch )
+		{
+		   delete watch;
+		   watch = 0;
+		}
+		else
+		   marslog(LOG_WARN,"stopwatch_stop - no watch running!");
+		break;
+
+	}
+	return Value("");
+}
+
+//=============================================================================
+
+class DumpFunction : public Function {
+public:
+	DumpFunction(char *n) : Function(n) {}
+	virtual Value Execute(int,Value*);
+};
+
+
+Value DumpFunction::Execute(int arity,Value *arg)
+{
+	if(arity)
+	{
+		for(int i=0;i<arity;i++)
+		  {
+			cout << "dump : "; arg[i].Dump(1); cout << endl;
+		  }
+	}
+	else
+	{
+		Context *c = (Context*)Context::Instruction->Owner();
+		while(c)
+		{
+			c->Dump(1);
+			c = (Context*)c->Owner();
+		}
+	}
+
+	return Value(0.0);
+}
+
+//=============================================================================
+
+class MemFunction : public Function {
+public:
+	MemFunction(char *n) : Function(n,0) {}
+	virtual Value Execute(int,Value*);
+};
+
+/* extern "C" void print_alloc(FILE*,int,int); */
+
+Value MemFunction::Execute(int ,Value *)
+{
+
+	static long last = 0;
+	struct mallinfo minfo = mallinfo();
+
+	long used = minfo.uordblks + minfo.usmblks;
+
+	request *r = empty_request(0);
+
+	set_value(r,"total","%d",minfo.arena);
+	set_value(r,"used","%d",used);
+	set_value(r,"free","%d",minfo.arena-used);
+	set_value(r,"delta","%d",used - last);
+
+	last = used;
+
+	return Value(r);
+}
+
+
+static void install(Context *c)
+{
+	c->AddFunction(new DumpFunction("dump"));
+	c->AddFunction(new TraceFunction("trace"));
+	c->AddFunction(new TraceFileFunction("tracefile"));
+	c->AddFunction(new TimerFunction("timer"));
+	c->AddFunction(new MemFunction("memory"));
+	c->AddFunction(new StopWatchFunction("stopwatch_start",  1));
+	c->AddFunction(new StopWatchFunction("stopwatch_laptime",2));
+	c->AddFunction(new StopWatchFunction("stopwatch_reset",  3));
+	c->AddFunction(new StopWatchFunction("stopwatch_stop",   4));
+}
+
+static Linkage Link(install);
+
diff --git a/src/Macro/extern.cc b/src/Macro/extern.cc
new file mode 100644
index 0000000..e2bae5c
--- /dev/null
+++ b/src/Macro/extern.cc
@@ -0,0 +1,165 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "code.h"
+#include <signal.h>
+
+ExternFunction::ExternFunction(const char *nam,Context *s) : UserFunction(nam,s) 
+{ 
+	cmd      = 0;
+	file     = 0;
+	compiled = 0;
+}
+
+
+ExternFunction::~ExternFunction()
+{
+	if(file) unlink(file);
+	strfree(cmd);
+	strfree(file);
+}
+
+Value ExternFunction::Execute(int arity,Value *arg)
+{
+	const char *p;
+	request *r = 0;
+	request *s = 0;
+	request *u = 0;
+
+	if(Compile() != 0)
+		return Error("Failed to compile inline");
+
+	for(int i=0;i<arity;i++)
+	{
+		switch(arg[i].GetType(&p))
+		{
+			case tnumber:
+			case tstring:
+			case tgrib:
+//			case tbufr:
+			case timage:
+			case tvector:
+				arg[i].GetValue(u);
+				if(u = clone_all_requests(u))
+				{
+					if(r == 0) r = u; else s->next = u;
+					while(u) { s = u; u = u->next; }
+				}
+				break;
+
+			default:
+				free_all_requests(r);
+				return Error("Type '%s' is not yet supported"
+					     " for external Fortran functions", p );
+		}
+	}
+
+	char *tmp = marstmp();
+	char buf[1024];
+
+	FILE *f = fopen(tmp,"w");
+	save_all_requests(f,r);
+	fclose(f);
+	free_all_requests(r);
+
+	const char* FortranDbg = getenv( "MACRO_FORTRAN_DBG" );
+	int n = -1;
+
+	if( FortranDbg )
+	  {
+	    marslog(LOG_INFO,"MACRO_FORTRAN_DBG is set to %s", FortranDbg);
+	    marslog(LOG_INFO,"Now starting %s, get ready...", FortranDbg);
+
+	    sprintf(buf,"env PATH=$PATH:$METVIEW_BIN MNAME=%s MREQUEST=%s %s %s 2>&1",
+		    Name(), tmp, FortranDbg, cmd?cmd:Name());
+
+	    signal(SIGCLD,SIG_DFL);
+
+	    n = system( buf ); //-- return value from debugger?
+	  }
+	else
+	  {
+	    sprintf(buf,"env PATH=$PATH:$METVIEW_BIN MNAME=%s MREQUEST=%s %s 2>&1",
+		    Name(),tmp,cmd?cmd:Name());
+
+	    signal(SIGCLD,SIG_DFL);
+
+	    f = popen(buf,"r");
+
+	    if(f)
+	      {
+		while(fgets(buf,sizeof(buf),f))
+			cout << buf;
+		/* note: if SIGCLD has been trapped, pclose will always return -1 */
+		cout << flush;
+		n = pclose(f);
+	      }
+	  }
+
+	r = read_request_file(tmp);
+	unlink(tmp);
+
+	if(n) 
+	{
+		free_all_requests(r);
+		return Error("Error %d when executing external Fortran function %s",
+			      n, Name() );
+	}
+
+	Value v;
+	v.SetContent(r);
+
+	free_all_requests(r);
+	return v;
+	
+}
+
+void ExternFunction::SetCommand(const char *c,const char *f)
+{
+	strfree(cmd);  cmd  = strcache(c); 
+	strfree(file); file = strcache(f); 
+}
+
+int ExternFunction::Compile(void)
+{
+	if(compiled) return 0;
+
+	compiled = 1;
+	if(file == 0) return 0;
+
+	char buf[2048];
+	char *newcmd = marstmp();
+
+	sprintf(buf,"$METVIEW_BIN/compile %s \"%s\" %s %s 2>&1",
+		(Context::Trace()>0)?"-d":"",
+		cmd,file,newcmd);
+
+	FILE *f = popen(buf,"r");
+	if(!f) {
+		marslog(LOG_EROR|LOG_PERR,"command %s failed",buf);
+		return 1;
+	}
+
+	while(fgets(buf,sizeof(buf),f))
+		cout << buf;
+
+	cout << flush;
+
+	if(pclose(f) != 0)
+		return 1;
+
+	if( getenv( "MACRO_FORTRAN_DBG" ) )
+	  marslog(LOG_INFO,"Source code not removed - be be used for debugging!");
+	else
+	  unlink(file);
+
+	SetCommand(newcmd,newcmd);
+	return 0;
+}
diff --git a/src/Macro/files.cc b/src/Macro/files.cc
new file mode 100644
index 0000000..1075254
--- /dev/null
+++ b/src/Macro/files.cc
@@ -0,0 +1,407 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "cbufr.h"
+#include "cnetcdf.h"
+#include "ctable.h"
+#include "cpngjpeg.h"
+
+#ifdef METVIEW_ODB
+#include "codb.h"
+#endif
+
+#include "MvFlextra.cc"
+
+#include "LLMatrixToGRIB.h"
+#include "MvScanFileType.h"
+//=============================================================================
+
+
+class CFile : public Content {
+
+	typedef int (*closeproc)(FILE*);
+
+	char *name;
+	int  rmode; // read mode
+	FILE *f;
+	closeproc closef;
+
+
+	virtual void ToFile(CFile* &x)  { x = this; };
+	virtual void Print();
+public:
+	CFile(const char *n) : Content(tfile)
+		{ f = NULL; name = strcache(n); rmode = 1;}
+	~CFile();
+
+	//
+
+	FILE *File(char *m);
+};
+
+CFile::~CFile()
+{
+	if(f != NULL && closef(f) != 0 )
+		Error("-Error while closing file %s",name);
+	strfree(name);
+}
+
+void CFile::Print()
+{
+	cout << "<file " << name;
+	if(f) {
+		const char *p = rmode?"(read)":"(write)";
+		cout << ' ' << p;
+	}
+	cout << '>';
+}
+
+FILE *CFile::File(char *m)
+{
+	int r = *m == 'r';
+
+	if(f == NULL)
+	{
+		if(*name == '|')
+		{
+			f = popen(name+1,m);
+			closef = pclose;
+		}
+		else
+		{
+			f = fopen(name,m);
+			closef = fclose;
+		}
+		if(f == NULL)
+			Error("Cannot open file %s",name);
+		rmode = r;
+		return f;
+	}
+	else if( r != rmode )
+	{
+		Error("File %s in open in '%s' mode",name,rmode?"read":"write");
+		return NULL;
+	}
+	return f;
+}
+
+//=============================================================================
+
+class FileFunction : public Function {
+public:
+	FileFunction(char *n) : Function(n,1,tstring)
+	{info = "Returns a file handler for the specified filename. args: (string)"; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value FileFunction::Execute(int,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+	return Value(new CFile(p));
+}
+
+//=============================================================================
+class Write1Function : public Function {
+public:
+	Write1Function(char *n) : Function(n)
+	{info = "Writes/appends the given data to file. args: (string, any)";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int Write1Function::ValidArguments(int arity,Value *arg)
+{
+	if(arity < 2) return false;
+	if(arg[0].GetType() != tstring) return false;
+	if(arg[0].GetType() == tvis5d) return false; // vis5d is a special case
+	return true;
+}
+
+Value Write1Function::Execute(int arity,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+
+	// Get mode from function name
+	char mode[2];
+	mode [0] = Name()[0];
+	mode [1] = 0;
+
+	FILE *f = *p == '|' ? popen(p+1,mode) : fopen(p,mode);
+	if(!f)  return Error("-Cannot open file %s",p);
+
+	int e = 0;
+
+	for(int i = 1;i<arity;i++)
+	{
+		arg[i].Sync(); // This will force sync
+		
+		//Flextra related part
+		if(arg[i].GetType() == trequest)
+		{
+		  	request *r;
+			arg[i].GetValue(r);
+	
+			if(r && strcmp(r->name,"FLEXTRA_FILE")==0)
+			{
+				const char* path=get_value(r,"PATH",0);
+				if(!path)
+				{  
+					e=1;
+					break;
+				}
+	  	 	  	
+				string s(path);
+				MvFlextra flx(s);
+				flx.write(f);
+			}
+			else if(e = arg[i].Write(f))
+				break;
+		}
+		
+		//Any other type
+		else if(e = arg[i].Write(f))
+			break;
+	}
+
+	int c = *p == '|' ? pclose(f) : fclose(f);
+	if(c)
+		return Error("-Error while closing %s",p);
+
+	if(e) return Error("Write failed");
+
+	return Value(0.0);
+}
+
+//=============================================================================
+class Write2Function : public Function {
+public:
+	Write2Function(char *n) : Function(n)
+	{info = "Writes/appends the given data to file. args: (filehandler, any)";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int Write2Function::ValidArguments(int arity,Value *arg)
+{
+	if(arity < 2) return false;
+	if(arg[0].GetType() != tfile) return false;
+	return true;
+}
+
+Value Write2Function::Execute(int arity,Value *arg)
+{
+	CFile *file;
+	arg[0].GetValue(file);
+
+	// Get mode from function name
+	char mode[2];
+	mode [0] = Name()[0];
+	mode [1] = 0;
+
+	FILE *f = file->File(mode);
+	if(!f) return Error("Invalid file");
+
+	int e = 0;
+
+	for(int i = 1;i<arity;i++)
+	{
+		arg[i].Sync(); // This will force sync
+
+		//Flextra related part
+		if(arg[i].GetType() == trequest)
+		{
+		  	request *r;
+			arg[i].GetValue(r);
+	
+			if(r && strcmp(r->name,"FLEXTRA_FILE")==0)
+			{
+				const char* path=get_value(r,"PATH",0);
+				if(!path)
+				{  
+					e=1;
+					break;
+				}
+	  	 	  	
+				string s(path);
+				MvFlextra flx(s);
+				flx.write(f);
+			}
+			else if(e = arg[i].Write(f))
+				break;
+		}
+		
+		if(e = arg[i].Write(f))
+			break;
+	}
+
+	if(e) return Error("Write failed");
+
+	return Value(0.0);
+}
+
+//=============================================================================
+
+class TmpNameFunction : public Function {
+public:
+	TmpNameFunction(char *n) : Function(n,0)
+	{info = "Returns a new, unique temporary filename. args: none";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TmpNameFunction::Execute(int,Value *)
+{
+	return marstmp();
+}
+
+//=============================================================================
+
+class ExistFunction : public Function {
+public:
+	ExistFunction(char *n) : Function(n,1,tstring)
+	{info = "Determines whether the given file exists. Returns 1 or 0. args: (string)";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ExistFunction::Execute(int,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+	return access(p,F_OK) == 0;
+}
+
+//=============================================================================
+
+class ReadFunction : public Function {
+public:
+	ReadFunction(char *n) : Function(n,1,tstring)
+	{info = "Reads the given file and returns a variable of the appropriate type. args: (string)";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ReadFunction::Execute(int,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+
+	if(*p == '|')
+		return Error("Pipe not yet supported in read()");
+
+	string kind = ScanFileType(p);
+
+	Content *c = NULL;
+	// Try to guess
+
+	if( kind == "GRIB" )
+		// Here, check for images
+		c = new CGrib(p);
+
+	if( kind == "BUFR" )
+		c = new CBufr(p);
+
+	if( kind == "GEOPOINTS" )
+	  c = new CGeopts(p);
+
+	if( kind == "NETCDF" || kind == "SCM_INPUT_DATA" || kind == "SCM_OUTPUT_DATA")
+		c = new CNetCDF(p);
+
+	if( kind == "TABLE" )
+		c = new CTable(p);
+
+	if( kind == "LLMATRIX" )
+	{
+		char *tmp = marstmp();
+		if(LLMatrixToGRIB(p,tmp) == 0)
+			c = new CGrib(tmp);
+		else
+			return Error("LLMatrix-to-GRIB failed");
+	}
+
+	if( kind == "PNG" || kind == "JPEG" )
+	  c = new CPngJpeg(p,kind);
+
+	if( kind == "NOTE" || kind == "MACRO" )
+	{
+		string line;
+		ifstream f(p);
+		if ( !f ) {
+			marslog(LOG_EROR|LOG_PERR,"Cannot open %s",p);
+			return  Error("Open failed");
+		}
+
+		int cnt = 0;
+		while(getline(f,line))
+			cnt++;
+
+		f.clear();
+		f.seekg(0, ios::beg);
+
+		CList *l = new CList(cnt);
+		for(int i=0;i<cnt;i++)
+		{
+			getline(f,line);
+
+			if(isdate(line.c_str()))
+				(*l)[i] = Value(Date(line.c_str()));
+			else if(is_number(line.c_str()))
+				(*l)[i] = Value(atof(line.c_str()));
+			else
+				(*l)[i] = Value(line.c_str());
+		}
+
+		c = l;
+
+		f.close();
+
+	}
+
+#ifdef METVIEW_ODB	
+	if( kind == "ODB_DB" )
+	 	 c = new COdb(p);
+#endif
+
+	if( kind == "FLEXTRA_FILE" )
+	{
+		request *r = empty_request("FLEXTRA_FILE");
+		
+		const char* pwd=getenv("PWD"); 
+		if(pwd)
+		{
+		  	string str(pwd);
+			str+="/" + string(p);
+			set_value(r,"PATH",str.c_str());
+		}	
+		else
+		{
+		  	set_value(r,"PATH",p);
+		}
+		c = new CRequest(r);
+	}	
+	  	
+	return c ? Value(c) : Error("Cannot read %s. Type %s is not supported.",
+		p, kind.c_str() );
+}
+
+//=============================================================================
+
+static void install(Context *c)
+{
+	c->AddFunction(new Write1Function("write"));
+	c->AddFunction(new Write2Function("write"));
+	c->AddFunction(new Write1Function("append"));
+	c->AddFunction(new Write2Function("append"));
+	c->AddFunction(new FileFunction("file"));
+	c->AddFunction(new ExistFunction("exist"));
+	c->AddFunction(new ReadFunction("read"));
+	c->AddFunction(new TmpNameFunction("tmpname"));
+}
+
+static Linkage Link(install);
diff --git a/src/Macro/function.cc b/src/Macro/function.cc
new file mode 100644
index 0000000..6fe17df
--- /dev/null
+++ b/src/Macro/function.cc
@@ -0,0 +1,89 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include <stdarg.h>
+
+Function::Function(const char *n,int arity,...) : Node(n)
+{
+	info  = 0;
+	types = 0;
+	cnt   = arity;
+	if(cnt > 0)
+	{
+		va_list list;
+
+		types = new vtype[cnt];
+
+		va_start(list,arity);
+
+		for(int i = 0 ; i< cnt; i++)
+			types[i]  = va_arg(list,vtype);
+		va_end(list);
+
+	}
+}
+
+int  Function::ValidArguments(int arity,Value *arg)
+{
+	if(cnt<0) return true;
+	if(arity != cnt ) return false;
+	for(int i = 0; i< arity;i++)
+		if((arg[i].GetType() & types[i]) == 0 ) return false;
+	return true;
+}
+
+Value &Function::Error(const char *fmt,...)
+{
+    va_list list;
+	char buf[1024];
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	return Owner()->Error("%s",buf);
+}
+
+void Function::AddType(vtype t)
+{
+	if(cnt < 0) cnt = 0;
+	vtype *s = new vtype[cnt+1];
+	for(int i=0;i<cnt;i++) s[i] = types[i];
+	s[cnt++] = t;
+	delete[] types;
+	types = s;
+}
+
+
+void Function::Print(void)
+{
+	cout.setf(ios::left,ios::adjustfield);
+	cout.width(10);
+	cout << Name() << " : ";
+	cout << (char*)(Info()?Info():"Not yet documented");
+	cout << '\n';
+}
+
+
+Value Function::ToString(void)
+{
+	char func_string[1024];
+	sprintf(func_string, "%s : %s", Name(), (char*)(Info()?Info():"Not yet documented"));
+	return Value(func_string);
+}
+
+
+
+void Function::DeprecatedMessage(bool isDeprecated, const char *type, const char *newName)
+{
+    if (isDeprecated)
+        marslog (LOG_WARN, "Function '%s(%s)' is deprecated (but still working); please use the equivalent '%s(%s)' instead.",
+                 Name(), type, newName, type);
+}
+
diff --git a/src/Macro/grib.cc b/src/Macro/grib.cc
new file mode 100644
index 0000000..0905bec
--- /dev/null
+++ b/src/Macro/grib.cc
@@ -0,0 +1,5624 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include <math.h>
+#include <ctype.h>
+#include <assert.h>
+#include "MvGrid.h"
+#include "cbufr.h"
+#include "inc_stl.h"
+#include "MvException.h"
+#include "MvFieldSet.h"
+#include "MvPath.hpp"
+
+#define NO_MVGRID 0
+
+
+// used in function GribHeaderFunctionR
+enum eGribHeaderType
+{
+    GRIB_LONG =  0,
+    GRIB_DOUBLE,
+    GRIB_STRING,
+    GRIB_DOUBLE_ARRAY,
+    GRIB_LONG_ARRAY
+};
+
+
+// used in function GridLatLonsFunction
+enum eGridLatLonsType
+{
+    GLL_LATS = 0,
+    GLL_LONS
+};
+
+
+double CovarFunc( field*, field*, const MvGeoBox& );
+
+static math Math =  {0,0,0,};
+
+static char *parameterKey = "paramId";
+
+hypercube* CGrib::get_cube()
+{
+	if(cube)
+		return cube;
+
+	request *s = empty_request(0);
+
+	for(int i=0;i<fs->count;i++)
+	{
+		field *g = get_field(fs,i,packed_mem);
+		request *r = empty_request(0);
+		//grib_to_request(r,g->buffer,g->length);
+		/*int e = */handle_to_request( r, g->handle, NULL );
+		release_field(g);
+#if 0
+
+		hypercube* c = new_hypercube(r);
+
+		if(cube)
+		{
+			hypercube* a = add_cube(cube,c);
+			free_hypercube(cube);
+			free_hypercube(c);
+			c = a;
+		}
+
+		cube = c;
+#else
+		reqmerge(s,r);
+#endif
+
+		free_all_requests(r);
+
+
+	}
+
+	cube = new_hypercube(s);
+
+
+	return cube;
+}
+
+void CGrib::Dump2()
+{
+	cout << "\n";
+	if(fs->count > 1)  cout << "[\n";
+
+	for(int i=0;i<fs->count;i++)
+	{
+		field *g = get_field(fs,i,packed_mem);
+
+//		-- Q&D fix (040625/vk):
+//		-- field g has not been expanded and g == NULL
+//		-- g->buffer is deleted if we expand, and g->buffer is needed later,
+//		-- thus, where is ksec1[2] equivalent original GRIB octet:
+//		-- ksec[2] == 6th octet in the original Section 1
+//		-- Sec0 is 8 octets + Sec1 6th octet = 14th octet from the start
+//		request *r = empty_request((g->ksec1[2] != mars.computeflg)
+
+		//request *r = empty_request((g->buffer[13] != mars.computeflg)
+		//	? "GRIB" : "COMPUTED");
+		//grib_to_request(r,g->buffer,g->length);
+
+		request *r = empty_request("GRIB"); //-- simplified gribapi port
+		/*int e = */handle_to_request( r, g->handle, NULL );
+		release_field(g);
+		Perl(r);
+		cout << "\n";
+		free_all_requests(r);
+	}
+
+	cout << "\n";
+	if(fs->count > 1) cout << "]\n";
+}
+
+int CGrib::Write(FILE *f)
+{
+	err e = 0;
+	int i;
+
+	for(i=0;i<fs->count;i++)
+	{
+		field *g = fs->fields[i];
+		set_field_state(g,packed_mem);
+		e = e?e:write_field(f,g);
+		release_field(g);
+	}
+
+	return e;
+}
+
+void CGrib::Print(void)
+{
+	cout << '<' << fs->count << " field";
+	if(fs->count>1) cout << 's';
+	cout << '>';
+}
+
+void CGrib::SetSubValue(Value& v,int arity,Value *arg)
+{
+	if(!Check(1,v,arity,arg,tgrib,1,tnumber))
+		return;
+
+	int  n;
+	arg[0].GetValue(n);
+
+	fieldset *f;
+	v.GetValue(f);
+
+	if(n < 1 || n > fs->count)
+	{
+		Error("CGrib::SetSubValue: Fieldset index [%d] is out of range (fieldset is %d long)",
+			n,fs->count);
+		return;
+	}
+
+	if(f->count > 1)
+	{
+		Error("CGrib::SetSubValue: Cannot assign fieldset with more than 1 field "
+		"(Fieldset is %d long)",
+			f->count);
+		return;
+	}
+
+	if(f->count == 0)
+	{
+		Error("CGrib::SetSubValue: Cannot assign empty fieldset");
+		return;
+	}
+
+	set_field(fs,f->fields[0],n-1);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : FieldsetContainsMissingValues
+ *
+ * Description   : Returns true if any of the fieldset's fields contain
+ *                 missing values (determined by checking the .bitmap member).
+ *
+ ******************************************************************************/
+
+static boolean FieldsetContainsMissingValues (fieldset *fs)
+{
+	int i;
+	field *f;
+	boolean bContainsMissingVals = false;
+
+	for (i = 0; i < fs->count; i++)
+	{
+		f = fs->fields[i];
+
+		if (FIELD_HAS_BITMAP(f))
+		{
+			bContainsMissingVals = true;
+			break;
+		}
+	}
+
+	return bContainsMissingVals;
+}
+
+/* End of function "FieldsetContainsMissingValues" */
+
+
+/*******************************************************************************
+ *
+ * Function      : SetFieldElementToMissingValue
+ *
+ * Description   : Sets the element at the given index of the field to
+ *                 'missing value'. Also sets the 'bitmap' member to true.
+ *
+ ******************************************************************************/
+
+static inline void SetFieldElementToMissingValue (field *f, int i)
+{
+	f->values[i] = mars.grib_missing_value;
+	f->bitmap   = true;
+}
+
+/* End of function "SetFieldElementToMissingValue" */
+
+
+/*******************************************************************************
+ * Function      : GetIndexedFieldWithAtLeastPackedMem
+ *
+ * Description   : Returns the i'th field from the given fieldset, and ensures
+ *                 that its shape is at least 'packed_mem'. If it is currently
+ *                 expand_mem, then there is no point in changing it back to
+ *                 packed_mem.
+ *
+ ******************************************************************************/
+
+static field *GetIndexedFieldWithAtLeastPackedMem (fieldset *fs, int i)
+{
+	field *f;
+
+    if (i >= fs->count || i < 0)
+{
+        marslog(LOG_WARN,"GetIndexedFieldWithAtLeastPackedMem: index %d not valid (%d fields in fieldset)", i, fs->count);
+        return NULL;
+    }
+
+	f = fs->fields[i];
+
+    if (f->shape == packed_file)
+        set_field_state (f, packed_mem);
+
+    // if packed_mem or expand_mem, then it's already ok
+
+
+	return f;
+}
+
+/* End of function "GetIndexedFieldWithAtLeastPackedMem" */
+
+
+
+
+//=============================================================================
+
+class SubGribFunction : public Function {
+public:
+	SubGribFunction(const char *n) : Function(n) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int SubGribFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2 && arity != 3 && arity != 4) return false;
+
+	for(int i=1;i<arity;i++)
+		if(arg[i].GetType() != tnumber)
+			return false;
+
+	if(arg[0].GetType() != tgrib)
+		return false;
+
+	return true;
+}
+
+extern int vcnt;
+
+Value SubGribFunction::Execute(int arity ,Value *arg)
+{
+	int from=0,to=0,step=0;
+	fieldset *v;
+
+	arg[0].GetValue(v);
+
+	arg[1].GetValue(from);
+	if(arity>2) arg[2].GetValue(to);
+	if(arity>3) arg[3].GetValue(step);
+
+	fieldset *w = sub_fieldset(v,from,to,step);
+	if(!w)
+	   return Error("fs[]: Cannot extract sub-fieldset");
+	return Value(w);
+}
+
+//=============================================================================
+
+class CubeFunction : public Function {
+public:
+	CubeFunction(const char *n) : Function(n,2,tgrib,trequest) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value CubeFunction::Execute(int ,Value *arg)
+{
+	CGrib *v;
+	arg[0].GetValue(v);
+	request *r;
+	arg[1].GetValue(r);
+
+	hypercube *c = v->get_cube();
+	return Value(cube_order(c,r));
+}
+
+//=============================================================================
+
+class GenerateFunction : public Function {
+public:
+	GenerateFunction(const char *n) : Function(n) { info = "Generate fields"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int GenerateFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2 && arity != 3)    return false;
+	if(arg[0].GetType() != tgrib)   return false;
+	if(arg[1].GetType() != tstring) return false;
+	return true;
+}
+
+Value GenerateFunction::Execute(int arity,Value *arg)
+{
+nontested_grib_api_port("GenerateFunction::Execute");
+
+// re-write using MvGrid => works with all fields!
+   fieldset   *v;
+   arg[0].GetValue(v);
+
+   const char *nam;
+   arg[1].GetValue(nam);
+
+   Value  param[4];
+   param[0] = Value(0.0);
+   param[1] = Value(0.0);
+   param[2] = Value(0.0);
+   if(arity == 3)
+      param[3] = arg[2];
+
+   arity++;
+
+   Function *f = Owner()->WhichFunction(nam,arity,param);
+   if(!f)
+   return Error("Function %s not found",nam);
+
+   fieldset *w = copy_fieldset(v,v->count,false);
+
+
+   for(int i = 0; i < v->count ;i++)
+    {
+      field *g = get_field(v,i,expand_mem);
+      field *h = get_field(w,i,expand_mem);
+
+      auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
+      if( ! grd->hasLocationInfo() )
+         return Error("GenerateFunction: unimplemented or spectral data - unable to extract location data");
+      auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
+
+      bool cont = true;
+      while( cont )                          //-- process current field
+       {
+         param[0] = Value( grd->lat_y() );
+         param[1] = Value( grd->lon_x() );
+         param[2] = Value( grd->value() );
+
+         Value u = f->Execute(arity,param);
+
+         double d;
+         u.GetValue(d);
+         grdOut->value( d );
+
+         grdOut->advance();
+         cont = grd->advance();
+       }
+
+      if( ((i+1) % 10) == 0)
+         save_fieldset(w);
+
+      release_field(g);
+    }
+
+   return Value(w);
+
+#if 0
+		if( grd->getLong("gridDefinition") != GRIB_LAT_LONG ) // s2->data_rep != GRIB_LAT_LONG)
+			return Error("generate: Field is not lat/long");
+
+		double x0   = grd->getDouble("longitudeOfFirstGridPoint // sec2_[cGridFirstLon] / cGridScaling;"); // s2->limit_west /GRIB_FACTOR;
+		double y0   = grd->getDouble("latitudeOfFirstGridPoint // sec2_[cGridFirstLon] / cGridScaling;"); // s2->limit_north/GRIB_FACTOR;
+		double maxx = grd->getDouble("longitudeOfLastGridPoint // sec2_[cGridFirstLon] / cGridScaling;"); // s2->limit_east /GRIB_FACTOR;
+
+		if(x0 > maxx) x0 -= 360;
+
+		double dx = grd->getDouble("numberOfPointsAlongAParallel"); //  s2->grid_ew/GRIB_FACTOR;
+		double dy = grd->getDouble("numberOfPointsAlongAMeridian"); // -s2->grid_ns/GRIB_FACTOR;
+
+		double x  = x0;
+		double y  = y0;
+
+		for( int j=0; j<grd->("value_count"); ++j ) //  j<g->sec4len;j++)
+		{
+			param[0] = Value(y);
+			param[1] = Value(x);
+			param[2] = Value( (*grd)[j] ) // (double)g->rsec4[j]);
+
+			Value u = f->Execute(arity,param);
+
+/*
+			if(u.GetType() != tnumber)
+			{
+				char *kind;
+				u.GetType(&kind);
+				return Error(
+					"Bad type (%s) returned by function %s"
+					" (should be a number)", kind, nam);
+			}
+*/
+
+			double d;
+			u.GetValue(d);
+			grd->value(j) = d; // h->rsec4[j] = d;
+
+			x += dx; if(x > maxx) { x = x0; y += dy; }
+
+		}
+
+		if( ((i+1) % 10) == 0) save_fieldset(w);
+
+		release_field(g);
+	}
+#endif
+}
+
+//=============================================================================
+
+class MaskFunction : public Function {
+public:
+	MaskFunction (const char *n) : Function(n) { info = "Generate masks"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int MaskFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	CList *l;
+
+	switch(arity)
+	{
+		case 5:
+			if(arg[0].GetType() != tgrib)   return false;
+			for(i = 1;i<5;i++) if(arg[i].GetType() != tnumber) return false;
+			break;
+
+		case 2:
+			if(arg[0].GetType() != tgrib)   return false;
+			if(arg[1].GetType() != tlist)   return false;
+
+			arg[1].GetValue(l);
+			if(l->Count() != 4) return false;
+			for(i = 0;i<4;i++) if((*l)[i].GetType() != tnumber) return false;
+
+			break;
+
+		default:
+			return false;
+
+	}
+
+	return true;
+}
+
+Value MaskFunction::Execute(int arity,Value *arg)
+{
+	fieldset *v;
+	int i;
+
+	double d[4];
+
+	double& n = d[0];
+	double& w = d[1];
+	double& s = d[2];
+	double& e = d[3];
+
+	arg[0].GetValue(v);
+
+	if(arity == 2)
+	{
+		CList *l;
+		arg[1].GetValue(l);
+		for(i = 0;i<4;i++) (*l)[i].GetValue(d[i]);
+	}
+	else
+		for(i = 0;i<4;i++) arg[i+1].GetValue(d[i]);
+
+	while(w > e) w -= 360.0;
+	MvGeoBox geoArea( n, w, s, e );
+
+	fieldset *z = copy_fieldset(v,v->count,false);
+
+
+	for(i = 0; i < v->count ;i++)
+	{
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+		if(! grd->hasLocationInfo() )
+		  return Error( "mask: unimplemented or spectral data - unable to extract location data" );
+
+		auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
+
+		for( int j=0; j < grd->length(); ++j )
+		{
+		  newGrd->value( geoArea.isInside( grd->lat_y(), grd->lon_x() ) );
+		  grd->advance();
+		  newGrd->advance();
+		}
+
+//F This is causing problems to Emoslib, if the fieldset
+//F is greater than 10. Vesa is checking ...
+//F		if( ((i+1) % 10) == 0)
+//F		  save_fieldset(z);
+	}
+
+	//-- do we need to release 'z' ???
+
+	return Value(z);
+}
+
+//=============================================================================
+//----------------------   rmask - "round mask" alias "radius mask" (020805/vk)
+
+class RMaskFunction : public Function {
+public:
+	RMaskFunction (const char *n) : Function(n) { info = "Generate rmask"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int RMaskFunction::ValidArguments(int arity,Value *arg)
+{
+  int i;
+  CList *l;
+
+  switch(arity)
+    {
+    case 4:			           //-- rmask( fieldset, lat, lon, radius )
+      if(arg[0].GetType() != tgrib)
+	return false;
+
+      for(i = 1;i<4;i++)
+	if(arg[i].GetType() != tnumber)
+	  return false;
+
+      break;
+
+    case 2:				   //-- rmask( fieldset, [ lat, lon, radius ] )
+      if(arg[0].GetType() != tgrib)
+	return false;
+
+      if(arg[1].GetType() != tlist)
+	return false;
+
+      arg[1].GetValue(l);
+      if(l->Count() != 3)
+	return false;
+
+      for(i = 0;i<3;i++)
+	if((*l)[i].GetType() != tnumber)
+	  return false;
+
+      break;
+
+    default:
+      return false;
+
+    }
+
+  return true;
+}
+
+Value RMaskFunction::Execute( int arity, Value *arg )
+{
+  fieldset *v;
+  double d[3];
+  int i;
+
+  arg[0].GetValue( v );                    //-- get parameters...
+
+  if( arity == 2 )
+    {
+      CList* l;                            //-- extract 3 numeric values from a list
+      arg[1].GetValue(l);
+      for( i = 0; i<3; i++ )
+	(*l)[i].GetValue(d[i]);
+    }
+  else
+    for( i = 0; i<3; i++ )                 //-- extract 3 numeric values
+      arg[i+1].GetValue(d[i]);
+
+  MvLocation center( d[0], d[1] );         //-- mask center, lat/lon
+  double     rad_m = d[2];                 //-- mask radius, metres
+  MvLocation gridpointLoc;                 //-- for grid point locations
+
+  fieldset* z = copy_fieldset( v, v->count, false );
+
+  for( i = 0; i < v->count; i++ )          //-- for all fields in a fieldset
+    {
+      auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
+
+      if(! newGrd->hasLocationInfo() )
+	return Error( "rmask: unimplemented or spectral data - unable to extract location data" );
+
+      do                                   //-- process current field
+	{
+	  gridpointLoc.set( newGrd->lat_y(), newGrd->lon_x() );
+	  double  distance_m = gridpointLoc.distanceInMeters( center );
+	  newGrd->value( distance_m > rad_m ? 0.0 : 1.0 );
+	}
+      while( newGrd->advance() );
+    }
+
+  //-- do we need to release 'z' ???
+  return Value(z);
+}
+
+//=============================================================================
+//-----------------------------------------------------   distance  (020816/vk)
+
+class GridDistanceFunction : public Function {
+public:
+	GridDistanceFunction (const char *n) : Function(n) { info = "Compute distances from a point"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int GridDistanceFunction::ValidArguments(int arity,Value *arg)
+{
+  int i;
+  CList *l;
+
+  switch(arity)
+    {
+    case 3:			           //-- distance( fieldset, lat, lon )
+      if(arg[0].GetType() != tgrib)
+	return false;
+
+      for(i = 1;i<3;i++)
+	if(arg[i].GetType() != tnumber)
+	  return false;
+
+      break;
+
+    case 2:				   //-- distance( fieldset, [ lat, lon ] )
+      if(arg[0].GetType() != tgrib)
+	return false;
+
+      if(arg[1].GetType() != tlist)
+	return false;
+
+      arg[1].GetValue(l);
+      if(l->Count() != 2)
+	return false;
+
+      for(i = 0;i<2;i++)
+	if((*l)[i].GetType() != tnumber)
+	  return false;
+
+      break;
+
+    default:
+      return false;
+
+    }
+
+  return true;
+}
+
+Value GridDistanceFunction::Execute( int arity, Value *arg )
+{
+  fieldset *v;
+  double d[2];
+  int i;
+
+  arg[0].GetValue( v );                    //-- get parameters...
+
+  if( arity == 2 )
+    {
+      CList* l;                            //-- extract 2 numeric values from a list
+      arg[1].GetValue(l);
+      for( i = 0; i<2; i++ )
+	(*l)[i].GetValue(d[i]);
+    }
+  else
+    for( i = 0; i<2; i++ )                 //-- extract 3 numeric values
+      arg[i+1].GetValue(d[i]);
+
+  MvLocation ref_point( d[0], d[1] );      //-- reference point, lat/lon
+  MvLocation gridpointLoc;                 //-- for grid point locations
+
+  fieldset* z = copy_fieldset( v, v->count, false );
+
+  for( i = 0; i < v->count; i++ )          //-- for all fields in a fieldset
+    {
+      auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
+
+      if(! newGrd->hasLocationInfo() )
+	return Error( "distance: unimplemented or spectral data - unable to extract location data" );
+
+      do                                   //-- process current field
+	{
+	  gridpointLoc.set( newGrd->lat_y(), newGrd->lon_x() );
+	  double  distance_m = gridpointLoc.distanceInMeters( ref_point );
+	  newGrd->value( distance_m );
+	}
+      while( newGrd->advance() );
+    }
+
+  //-- do we need to release 'z' ???
+  return Value(z);
+}
+
+//=============================================================================
+
+class DistributionFunction : public Function {
+public:
+	DistributionFunction (const char *n) :
+		Function(n,1,tgrib)
+			{ info = "Calculate EPS distributions"; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value DistributionFunction::Execute(int, Value *arg)
+{
+//nontested_grib_api_port("DistributionFunction::Execute");
+
+#if 0
+	fieldset *v;
+
+
+	arg[0].GetValue(v);
+
+	int save = mars.computeflg;
+	mars.computeflg = 0;
+	int acc = mars.accuracy;
+
+	fieldset *z = copy_fieldset(v,v->count,true);
+
+	vector<field*> f(z->count);
+	f[0] = get_field(z,0,expand_mem);
+	fortint size = f[0]->sec4len;
+	for (int i = 1; i < z->count ;i++)
+	{
+		f[i] = get_field(z,i,expand_mem);
+		if (f[i] == 0)
+			return Error("distribution: cannot read field");
+		fortint s = f[i]->sec4len;
+		if (s != size)
+			return Error("distribution: the fields do not have the same size");
+
+	}
+
+	vector<fortfloat> array(z->count);
+	for (int i = 0; i < size ;i++)
+	{
+		for (int j = 0; j < z->count; j++)
+			array[j] = f[j]->rsec4[i];
+		sort(array.begin(),array.end());
+		for (int j = 0; j < z->count; j++)
+			f[j]->rsec4[i] = array[j];
+	}
+
+	for (int i = 0; i < z->count; i++)
+	{
+		// Ensemble distribution
+		f[i]->ksec1[39-1] = 23;
+
+		// Number
+		f[i]->ksec1[42-1] = i + 1;
+	}
+
+   	mars.accuracy = f[0]->ksec4[1];
+
+	Value res(z);
+	mars.computeflg = save;
+    mars.accuracy = acc;
+
+	return res;
+#else
+	fieldset *v;
+
+	arg[0].GetValue(v);
+
+	int save = mars.computeflg;
+	mars.computeflg = 0;
+	int acc = mars.accuracy;
+
+	fieldset *z = copy_fieldset(v,v->count,true);
+
+	vector<field*> f(z->count);
+	f[0] = get_field(z,0,expand_mem);
+	size_t size = f[0]->value_count;
+	for (int i = 1; i < z->count ;i++)
+	{
+		f[i] = get_field(z,i,expand_mem);
+		if (f[i] == 0)
+			return Error("distribution: cannot read field");
+		size_t s = f[i]->value_count;
+		if (s != size)
+			return Error("distribution: the fields do not have the same size");
+	}
+
+	vector<double> array(z->count);
+	for (size_t i = 0; i < size ;i++)
+	{
+		for (int j = 0; j < z->count; j++)
+			array[j] = f[j]->values[i];
+		sort(array.begin(),array.end());
+		for (int j = 0; j < z->count; j++)
+			f[j]->values[i] = array[j];
+	}
+
+	int  err = 0;
+	for (int i = 0; i < z->count; i++)
+	{
+		// Ensemble distribution
+		//f[i]->ksec1[39-1] = 23;
+		err = grib_set_long( f[i]->handle, "mars.type", 23 );
+		// Number
+		//f[i]->ksec1[42-1] = i + 1;
+		//err = grib_set_long( f[i]->handle, "mars.number", i+1 );
+		err = grib_set_long( f[i]->handle, "perturbationNumber", i+1 );
+	}
+
+	//mars.accuracy = f[0]->ksec4[1];
+	long acc0;
+//	err = grib_get_long( f[0]->handle, "setDecimalPrecision", &acc0 );
+	err = grib_get_long( f[0]->handle, "numberOfBitsContainingEachPackedValue", &acc0 );
+	if( err == 0 )
+		mars.accuracy = (int)acc0;
+	else
+		cerr << ">>> DistributionFunction::Execute() - unable to get 'numberOfBitsContainingEachPackedValue'"
+		     << endl;
+
+	Value res(z);
+	mars.computeflg = save;
+	mars.accuracy = acc;
+
+	return res;
+#endif
+}
+
+
+
+
+//=============================================================================
+
+/*******************************************************************************
+ *
+ * Function      : GribHeaderFunctionR
+ *
+ * Description   : Reads an element from the GRIB header.
+ *
+ ******************************************************************************/
+
+class GribHeaderFunctionR : public Function {
+    eGribHeaderType type;
+public:
+    GribHeaderFunctionR(const char *n, eGribHeaderType t) :
+        Function(n,2,tgrib,tstring),
+        type(t)
+            { info = "Read GRIB headers using GRIB API keys"; }
+    virtual Value Execute(int arity,Value *arg);
+};
+
+
+
+/*
+*  GetGribHeaderValue: Used by GribHeaderFunctionR and GribHeaderFunctionRGeneric
+   to obtain the value of a particular key.
+*/
+
+Value GetGribHeaderValue(MvField *mvfield, const char *key, eGribHeaderType type)
+{
+    Value value;
+
+    switch (type)
+    {
+        case GRIB_LONG:
+        {
+            long n = mvfield->getGribKeyValueLong (key);
+            value = n;
+            break;
+        }
+
+        case GRIB_DOUBLE:
+        {
+            double r = mvfield->getGribKeyValueDouble (key);
+            value = r;
+            break;
+        }
+
+        case GRIB_STRING:
+        {
+            string str = mvfield->getGribKeyValueString (key);
+            value = str.c_str();
+            break;
+        }
+
+        case GRIB_LONG_ARRAY:
+        {
+            long *lvals = NULL;
+            long num_vals = mvfield->getGribKeyArrayLong (key, &lvals);
+
+            if ((lvals != NULL) && (num_vals > 0))
+            {
+                CVector *v = new CVector(num_vals);
+
+                for (int j = 0; j < num_vals; j++)
+                {
+                    (*v)[j] = lvals[j];
+                }
+
+                value = v;
+
+                free (lvals);
+            }
+
+            break;
+        }
+
+        case GRIB_DOUBLE_ARRAY:
+        {
+            double *dvals = NULL;
+            long num_vals = mvfield->getGribKeyArrayDouble (key, &dvals);
+
+            if ((dvals != NULL) && (num_vals > 0))
+            {
+                CVector *v = new CVector(num_vals);
+
+                for (int j = 0; j < num_vals; j++)
+                {
+                    (*v)[j] = dvals[j];
+                }
+
+                value = v;
+
+                free (dvals);
+            }
+
+            break;
+        }
+
+        default:
+        {
+            return Value();
+        }
+    }
+
+    return value;
+}
+
+
+
+Value GribHeaderFunctionR::Execute(int, Value *arg)
+{
+    fieldset *fs;
+    const char *key;
+
+    arg[0].GetValue(fs);   // get the fieldset variable
+    arg[1].GetValue(key);  // get the GRB API key name variable
+
+
+    CList *l = new CList(fs->count);
+
+    for(int i = 0; i < fs->count ;i++)
+    {
+        field  *h = GetIndexedFieldWithAtLeastPackedMem(fs,i);
+        MvField *mvfield = new MvField(h);
+        Value value = GetGribHeaderValue(mvfield, key, type);
+
+
+        (*l)[i] = value;
+
+
+        // note: mvfield must be created with 'new' and not on the stack. This is
+        // because if it is on the stack, it will be destroyed after release_field()
+        // is called, and in its destructor it reverts the field to its previous
+        // shape, which is packed_mem, i.e. it re-reads and allocates the field!
+        // In the new version of the code, we delete the mvfield first which causes
+        // no change in its shape (packed_mem->packed_mem) and then release it, which
+        // really does get rid of it.
+
+        delete mvfield;
+        release_field(h);
+    }
+
+    if (l->Count() > 1)
+        return Value(l);
+    else
+        return Value((*l)[0]);
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : GribHeaderFunctionRGeneric
+ *
+ * Description   : Reads an element from the GRIB header.
+ *
+ ******************************************************************************/
+
+class GribHeaderFunctionRGeneric : public Function {
+
+    enum GroupingType
+    {
+        GROUP_BY_FIELD = 0,
+        GROUP_BY_KEY
+    };
+
+
+public:
+    GribHeaderFunctionRGeneric(const char *n) :
+        Function(n,2,tgrib,tstring)
+        { info = "Read GRIB headers using GRIB API keys"; }
+    virtual Value Execute(int arity,Value *arg);
+    virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+int GribHeaderFunctionRGeneric::ValidArguments(int arity,Value *arg)
+{
+    // valid arguments are:
+    //  fieldset, list
+    //  fieldset, list, string
+
+    if (arity != 2 && arity != 3)                               return false;
+    if (arg[0].GetType() != tgrib || arg[1].GetType() != tlist) return false;
+    if (arity == 3 && arg[2].GetType() != tstring)              return false;
+
+    return true;
+}
+
+
+Value GribHeaderFunctionRGeneric::Execute(int arity, Value *arg)
+{
+    fieldset *fs;
+    CList  *keys;
+    const char *groupingString;
+    GroupingType grouping = GROUP_BY_FIELD;  // default behaviour
+
+
+    arg[0].GetValue(fs);    // get the fieldset variable
+    arg[1].GetValue(keys);  // get the list of GRB API key names
+
+    if (arity == 3)
+    {
+        arg[2].GetValue(groupingString);
+        if (groupingString && !strcmp(groupingString, "key"))
+            grouping = GROUP_BY_KEY;
+        else if (groupingString && !strcmp(groupingString, "field"))
+            grouping = GROUP_BY_FIELD;
+        else
+            return Error("grib_get: 3rd parameter should be 'field' or 'key'; %s is not valid.", groupingString);
+      
+    }
+
+
+
+
+    CList *fieldValues = NULL;
+    CList *keyValues   = NULL;
+
+    if (grouping == GROUP_BY_FIELD)
+        fieldValues = new CList(fs->count);      // top-level list is the fields
+    else
+        keyValues   = new CList(keys->Count());  // top-level list is the keys
+
+
+    for (int i = 0; i < fs->count; i++)
+    {
+        field  *h = GetIndexedFieldWithAtLeastPackedMem(fs,i);
+        MvField *mvfield = new MvField(h);
+
+        if (grouping == GROUP_BY_FIELD)
+            keyValues = new CList(keys->Count());  // for each field there will be a list of key values
+
+
+        for (int k = 0 ; k < keys->Count(); k++)
+        {
+            eGribHeaderType dataType = GRIB_STRING;  // default type
+            char typeString[5] = "";
+            const char *origKey;
+            char *key;
+            (*keys)[k].GetValue(origKey);
+            key = strdup(origKey);
+
+            if (grouping == GROUP_BY_KEY)
+            {
+                if (i ==0)  // first field, group-by-key
+                {
+                    fieldValues = new CList(fs->count);
+                    (*keyValues)[k] = fieldValues;
+                }
+                else
+                {
+                    (*keyValues)[k].GetValue(fieldValues);
+                }
+            }
+
+
+
+            // the keys are formatted as 'key[:t]' where t specifies
+            // the type of data we are supposed to return. If omitted,
+            // we will return as a string
+
+            size_t len = strlen(key);
+            for (size_t p = len-1; p > 0; p--)
+            {
+                if (key[p] == ':')
+                {
+                    if (p < len-1)
+                    {
+                        strcpy(typeString, &key[p+1]);
+                        key[p] = '\0';
+                        break;
+                    }
+                }
+            }
+
+
+            // convert the type string into our enumerated type
+
+            if (typeString[0] != '\0')
+            {
+                     if (!strcmp(typeString, "l"))  dataType = GRIB_LONG;
+                else if (!strcmp(typeString, "d"))  dataType = GRIB_DOUBLE;
+                else if (!strcmp(typeString, "s"))  dataType = GRIB_STRING;
+                else if (!strcmp(typeString, "da")) dataType = GRIB_DOUBLE_ARRAY;
+                else if (!strcmp(typeString, "la")) dataType = GRIB_LONG_ARRAY;
+                else return Error("grib_get: type specifier must be one of 'l', 'd', 's', 'da', 'la'. It is '%s'", typeString);
+            }
+
+
+            Value value = GetGribHeaderValue(mvfield, key, dataType);
+
+
+            if (grouping == GROUP_BY_FIELD)
+                (*keyValues)[k] = value;
+            else
+                (*fieldValues)[i] = value;
+
+            free (key);
+
+        } // for each key
+
+
+        if (grouping == GROUP_BY_FIELD)
+            (*fieldValues)[i] = keyValues;
+
+
+        // note: mvfield must be created with 'new' and not on the stack. This is
+        // because if it is on the stack, it will be destroyed after release_field()
+        // is called, and in its destructor it reverts the field to its previous
+        // shape, which is packed_mem, i.e. it re-reads and allocates the field!
+        // In the new version of the code, we delete the mvfield first which causes
+        // no change in its shape (packed_mem->packed_mem) and then release it, which
+        // really does get rid of it.
+
+        delete mvfield;
+        release_field(h);
+
+    }  // for each field
+
+
+
+    if (grouping == GROUP_BY_FIELD)
+        return fieldValues;
+    else
+        return keyValues;
+
+
+
+//    if (fieldValues->Count() > 1)
+//        return Value(fieldValues);
+//    else
+//        return Value((*fieldValues)[0]);
+}
+
+
+
+//=============================================================================
+
+/*******************************************************************************
+ *
+ * Function      : GribHeaderFunctionW
+ *
+ * Description   : Writes an element to the GRIB header.
+ *
+ ******************************************************************************/
+
+class GribHeaderFunctionW : public Function {
+	eGribHeaderType type;
+public:
+	GribHeaderFunctionW(const char *n, eGribHeaderType t) :
+		Function(n,2,tgrib,tlist),
+		type(t)
+		{ info = "Write GRIB headers using GRIB API keys"; }
+
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value GribHeaderFunctionW::Execute(int, Value *arg)
+{
+    fieldset *v;
+    CList *l;
+    int i;
+
+    arg[0].GetValue(v);
+    arg[1].GetValue(l);
+
+    if((l->Count() % 2) != 0)
+        return Error("grib_get: the list does not contain an even number of values");
+
+
+    int save = mars.computeflg;
+    mars.computeflg = 0;
+    int acc = mars.accuracy;
+
+
+    fieldset *z = copy_fieldset(v,v->count,true);
+
+
+	// for each field, apply the changes
+
+    for(i = 0; i < v->count ;i++)
+    {
+        field  *h = GetIndexedFieldWithAtLeastPackedMem(z,i);
+        MvField mvfield (h);
+
+        switch (type)
+        {
+            case GRIB_LONG:
+            {
+                for(int j = 0; j < l->Count(); j +=2)
+                {
+                    long value; const char *key;
+                    (*l)[j].GetValue(key);
+                    (*l)[j+1].GetValue(value);
+                    mvfield.setGribKeyValueLong (key, value);
+                }
+                break;
+            }
+
+            case GRIB_DOUBLE:
+            {
+                for(int j = 0; j < l->Count(); j +=2)
+                {
+                    double value; const char *key;
+                    (*l)[j].GetValue(key);
+                    (*l)[j+1].GetValue(value);
+                    mvfield.setGribKeyValueDouble (key, value);
+                }
+                break;
+            }
+
+            case GRIB_STRING:
+            {
+                for(int j = 0; j < l->Count(); j +=2)
+                {
+                    const char *value; const char *key;
+                    (*l)[j].GetValue(key);
+                    (*l)[j+1].GetValue(value);
+                    string valuestring = string(value);
+                    mvfield.setGribKeyValueString (key, valuestring);
+                }
+                break;
+            }
+
+            default:
+
+            {
+                return Error("GribHeaderFunctionW: bad key type (%d)", type);
+            }
+        }
+
+//        mars.accuracy = h->ksec4[1];  // do we need this line?
+//        save_fieldset(z);  // was already commented out in the original putksec function
+//        release_field(h);  // was already commented out in the original putksec function
+    }
+
+
+    Value x(z);
+
+    mars.computeflg = save;
+    mars.accuracy   = acc;
+
+
+    return x;
+}
+
+
+
+//=============================================================================
+
+class GribMinMaxFunction : public Function {
+	boolean min;
+public:
+	GribMinMaxFunction(const char *n,boolean m) : Function(n,1,tgrib),min(m) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GribMinMaxFunction::Execute(int,Value *arg)
+{
+	fieldset *v;
+	arg[0].GetValue(v);
+	boolean b_any_missing = false;
+
+
+	fieldset *z = copy_fieldset(v,1,false);
+	field  *h = get_field(z,0,expand_mem);
+	field  *g = get_field(v,0,expand_mem);
+
+
+	for(size_t j=0;j<g->value_count;j++)
+		h->values[j] = g->values[j];
+
+	release_field(g);
+
+
+	b_any_missing = FieldsetContainsMissingValues(v);
+
+	for(int i = 1; i < v->count ;i++)
+	{
+		field  *g = get_field(v,i,expand_mem);
+
+		/* For performance, we have two versions of these comparison loops -
+		   one that considers missing values (only called if there are any)
+		   and one that does not (called if there are none). */
+
+		if(min)		// Get the minimum
+		{
+			if (b_any_missing)		// slower version, avoiding missing values
+			{
+				for (size_t j=0;j<g->value_count;j++)
+				{
+					if (!MISSING_VALUE(g->values[j]) && !MISSING_VALUE(h->values[j]))
+					{
+						if (g->values[j] < h->values[j])
+							h->values[j] = g->values[j];
+					}
+					else
+					{
+						SetFieldElementToMissingValue (h, j);
+					}
+				}
+			}
+
+			else				// faster version, ignoring missing values
+			{
+				for(size_t j=0;j<g->value_count;j++)
+					if(g->values[j]<h->values[j])
+						h->values[j] = g->values[j];
+			}
+		}
+		else		// Get the maximum
+		{
+			if (b_any_missing)		// slower version, avoiding missing values
+			{
+				for (size_t j=0;j<g->value_count;j++)
+				{
+					if (!MISSING_VALUE(g->values[j]) && !MISSING_VALUE(h->values[j]))
+					{
+						if (g->values[j] > h->values[j])
+							h->values[j] = g->values[j];
+					}
+					else
+					{
+						SetFieldElementToMissingValue (h, j);
+					}
+				}
+			}
+
+			else				// faster version, ignoring missing values
+			{
+				for(size_t j=0;j<g->value_count;j++)
+					if(g->values[j]>h->values[j])
+						h->values[j] = g->values[j];
+			}
+		}
+
+		release_field(g);
+	}
+
+	release_field(h);
+	return Value(z);
+}
+
+//=============================================================================
+class DumpGribFunction : public Function{
+public:
+	DumpGribFunction(const char *n) : Function(n,1,tgrib)
+		{ info = "Dump a fieldset";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value DumpGribFunction::Execute(int ,Value *arg)
+{
+	Value x;
+	fieldset *v;
+	CList *l;
+
+	arg[0].GetValue(v);
+
+	if(v->count > 1)
+	   l = new CList(v->count);
+
+	for(int i=0;i<v->count;i++)
+	{
+		field *g = get_field(v,i,packed_mem);
+		request *r = empty_request(0);
+		//grib_to_request(r,g->buffer,g->length);
+		/*int e = */handle_to_request( r, g->handle, NULL );
+		release_field(g);
+
+		if(v->count > 1)
+			(*l)[i] = Value(r);
+		else
+			x = Value(r);
+		free_all_requests(r);
+	}
+
+	if(v->count > 1) x = Value(l);
+
+	return x;
+}
+
+//=============================================================================
+class SortGribFunction : public Function{
+
+	typedef request*    reqp;
+	typedef field* grbp;
+	typedef char*       chrp;
+
+public:
+	SortGribFunction (const char *n) : Function(n)
+		{ info = "Sort a fieldset"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+	static void sort(char*,request**,int*,int,char*);
+	static char **extract(Value&,int&);
+	static char **up(int,const char * = "<");
+};
+
+void SortGribFunction::sort(char *parm,
+	request **reqs,
+	int     *indix,
+	int     count,
+	char    *order)
+{
+
+	int down = (*order == '>');
+	double cmp;
+
+	int i = 0;
+
+	while(i<count-1)
+	{
+		request *r1       = reqs[indix[i]];
+		const char *p1    = get_value(r1,parm,0);
+		if(p1 == 0) p1 = "";
+
+		int j = i;
+		do
+		{
+		j++;
+			request *r2       = reqs[indix[j]];
+			const char *p2   = get_value(r2,parm,0);
+			if(p2 == 0) p2 = "";
+
+			if(is_number(p1) && is_number(p2))
+				cmp = atof(p1)-atof(p2);
+			else
+				cmp = strcmp(p1,p2);
+			if (down) cmp = -cmp;
+
+
+		} while(cmp <= 0 && j < count - 1);
+
+		if(cmp > 0)
+		{
+			int x = indix[j];
+			for(int k=j;k>i;k--)
+				indix[k] = indix[k-1];
+			indix[i] = x;
+
+		}
+		else i++;
+
+	}
+}
+
+static char *_up(const char *t)
+{
+	char buf[1024];
+	strncpy(buf,t,sizeof(buf)-1);
+	char *s = buf;
+	while(*s)
+	{
+		if(islower(*s)) *s = toupper(*s);
+		s++;
+	}
+	return strcache(buf);
+}
+
+char **SortGribFunction::extract(Value& v,int& n)
+{
+	if(v.GetType() == tstring)
+	{
+		const char *s;
+		v.GetValue(s);
+		n = 1;
+
+		chrp *p = new chrp[n];
+		p[0] = _up(s);
+		return p;
+
+	}
+
+	// It's a list
+	CList *l;
+	v.GetValue(l);
+
+	n = l->Count();
+
+	chrp *p = new chrp[n];
+	for(int i = 0; i<n ; i++)
+	{
+		const char *s;
+		(*l)[i].GetValue(s);
+		p[i] = _up(s);
+	}
+	return p;
+}
+
+char **SortGribFunction::up(int n,const char *x)
+{
+	chrp *p = new chrp[n];
+	for(int i = 0; i<n ; i++)
+		p[i] = strcache(x);
+	return p;
+}
+
+int SortGribFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity<1 || arity > 3)       return false;
+	if(arg[0].GetType() != tgrib)  return false;
+
+	if(arity > 1)
+	{
+		if(arg[1].GetType() != tstring && arg[1].GetType() != tlist)
+			return false;
+		if(arity > 2)
+		{
+			if(arg[2].GetType() != tstring && arg[2].GetType() != tlist)
+				return false;
+
+			if(arg[2].GetType() == tlist)
+			{
+				if(arg[1].GetType() == tstring) return false;
+
+				CList *l1,*l2;
+
+				arg[1].GetValue(l1);
+				arg[2].GetValue(l2);
+
+				if(l2->Count() != 1 && l2->Count() != l1->Count())
+					return false;
+			}
+		}
+	}
+	return true;
+
+}
+
+/* This should be the one in request.c in libmars */
+
+static char *_names[] = {
+	"DATE",
+	"TIME",
+	"STEP",
+	"NUMBER",
+	"LEVELIST",
+	"PARAM",
+};
+
+
+Value SortGribFunction::Execute(int arity,Value *arg)
+{
+	fieldset *v,*w;
+
+	arg[0].GetValue(v);
+	w = copy_fieldset(v,v->count,true);
+
+	request        **r   = new reqp [v->count];
+	int            *n    = new int  [v->count];
+	field     **g   = new grbp [v->count];
+
+	int i;
+	for( i=0;i<w->count;i++)
+	{
+		g[i] = get_field(w,i,packed_mem);
+		n[i] = i;
+		r[i] = empty_request(0);
+		//grib_to_request(r[i],g[i]->buffer,g[i]->length);
+		/*int e = */handle_to_request( r[i], g[i]->handle, NULL );
+		release_field(g[i]);
+	}
+
+	char **names;
+	char **order;
+	int count;
+
+	switch(arity)
+	{
+		case 1:
+			names = _names;
+			count = NUMBER(_names);
+			order = up(count);
+			break;
+
+		case 2:
+			names = extract(arg[1],count);
+			order = up(count);
+			break;
+
+		case 3:
+			names = extract(arg[1],count);
+			if(arg[2].GetType() == tstring)
+			{
+				const char *p;
+				arg[2].GetValue(p);
+				order = up(count,p);
+			}
+			else
+				order = extract(arg[2],count);
+			break;
+	}
+
+	i = count;
+	while( --i >= 0)
+		sort(names[i],r,n,v->count,order[i]);
+
+	for(i=0;i<v->count;i++)
+		free_all_requests(r[i]);
+
+	for(i=0;i<w->count;i++)
+		w->fields[i]    = g[n[i]];
+
+	delete[] r;
+	delete[] n;
+	delete[] g;
+
+	for(i=0;i<count;i++)
+	{
+		strfree(order[i]);
+		if(arity != 1) strfree(names[i]);
+	}
+	delete[] order;
+	if(arity != 1) delete[] names;
+
+	return Value(w);
+}
+
+
+//=============================================================================
+
+class CosLatFunction : public Function {
+public:
+	CosLatFunction(const char *n) : Function(n,1,tgrib)
+		{ info = "Generate a field of cos(latitude)"; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value CosLatFunction::Execute(int,Value *arg)
+{
+	fieldset *v;
+	int i;
+
+	arg[0].GetValue(v);
+	fieldset *z = copy_fieldset(v,v->count,false);
+
+
+	for(i = 0; i < v->count ;i++)
+	{
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+		if(! grd->hasLocationInfo() )
+		  return Error( "coslat: unimplemented or spectral data - unable to extract location data" );
+
+		auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
+
+		for( int j=0; j < grd->length(); ++j )
+		  {
+		    newGrd->value(cos(grd->lat_y() * M_PI/180.0 ) );
+		    grd->advance();
+		    newGrd->advance();
+		  }
+
+//F This is causing problems to Emoslib, if the fieldset
+//F is greater than 10. Vesa is checking ...
+//F		if( ((i+1) % 10) == 0)
+//F		  save_fieldset(z);
+	}
+
+	return Value(z);
+}
+
+//=============================================================================
+
+class SinLatFunction : public Function {
+public:
+	SinLatFunction(const char *n) : Function(n,1,tgrib)
+		{ info = "Generate a field of sin(latitude)"; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value SinLatFunction::Execute(int,Value *arg)
+{
+	fieldset *v;
+	int i;
+
+	arg[0].GetValue(v);
+	fieldset *z = copy_fieldset(v,v->count,false);
+
+
+	for(i = 0; i < v->count ;i++)
+	{
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+		if(! grd->hasLocationInfo() )
+		  return Error( "sinlat: unimplemented or spectral data - unable to extract location data" );
+
+		auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
+
+		for( int j=0; j < grd->length(); ++j )
+		  {
+		    newGrd->value(sin(grd->lat_y() * M_PI/180.0 ) );
+		    grd->advance();
+		    newGrd->advance();
+		  }
+
+//F This is causing problems to Emoslib, if the fieldset
+//F is greater than 10. Vesa is checking ...
+//F		if( ((i+1) % 10) == 0)
+//F		  save_fieldset(z);
+	}
+
+	return Value(z);
+}
+
+//=============================================================================
+
+class GridValsFunction : public Function {
+	bool deprecated;
+	const char *newName;
+public:
+	GridValsFunction(const char *n, bool d, const char *nn = NULL) : Function(n,1,tgrib), deprecated(d), newName(nn)
+	{info = "Returns the grid point values as a vector (or list of vectors).";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value GridValsFunction::Execute(int /*arity*/,Value *arg)
+{
+    DeprecatedMessage (deprecated, "fieldset", newName);
+
+    fieldset *fs;
+    int i;
+    CList   *l = 0;
+    Value   d;
+
+    arg[0].GetValue(fs);  // the first argument is the fieldset
+
+
+    // if more than 1 field, then the result will be a list of vectors
+
+    if( fs->count > 1)
+        l = new CList(fs->count);
+
+
+    for(i = 0; i < fs->count ;i++)  // for each field...
+    {
+        field *g   = get_field(fs,i,expand_mem);
+        CVector *z = new CVector( g->value_count );
+
+        for(size_t j=0;j<g->value_count;j++)
+            (*z)[j] = g->values[j];
+        release_field(g);
+        if( fs->count > 1)
+            (*l)[i] = Value(z);
+        else
+            d = Value(z);
+    }
+
+    if( fs->count > 1)
+        return Value(l);
+
+    return d;
+}
+
+
+//=============================================================================
+
+class GridLatLonsFunction : public Function {
+    eGridLatLonsType type;
+	bool deprecated;
+	const char *newName;
+public:
+	GridLatLonsFunction(const char *n, eGridLatLonsType t, bool d, const char *nn = NULL) : Function(n,1,tgrib), type(t), deprecated(d), newName(nn)
+	{info = "Returns the grid point latitudes/longitudes as a vector (or list of vectors).";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value GridLatLonsFunction::Execute(int /*arity*/,Value *arg)
+{
+    DeprecatedMessage (deprecated, "fieldset", newName);
+
+    fieldset *fs;
+    int i;
+    CList   *l = 0;
+    Value   d;
+
+    arg[0].GetValue(fs);  // the first argument is the fieldset
+
+
+    // if more than 1 field, then the result will be a list of vectors
+
+    if( fs->count > 1)
+        l = new CList(fs->count);
+
+
+    for(i = 0; i < fs->count ;i++)  // for each field...
+    {
+		auto_ptr<MvGridBase> grid( MvGridFactory( fs->fields[i] ) );
+		if(! grid->hasLocationInfo() )
+			return Error( "gridlats/gridlons: unimplemented or spectral data - unable to extract location data" );
+
+        CVector *z = new CVector( grid->length() );
+
+		for( int j=0; j < grid->length(); ++j )
+        {
+            if (type == GLL_LATS)
+                (*z)[j] = grid->lat_y();
+            else
+                (*z)[j] = grid->lon_x();
+            grid->advance();  // move to the next point
+        }
+
+        if( fs->count > 1)
+            (*l)[i] = Value(z);
+        else
+            d = Value(z);
+    }
+
+
+    if( fs->count > 1)
+        return Value(l);
+
+    return d;
+}
+
+
+//=============================================================================
+
+class SetGridValsFunction : public Function {
+    bool deprecated;
+    const char *newName;
+	bool option_given;  // did the user supply a string option parameter?
+public:
+    SetGridValsFunction(const char *n, bool d, const char *nn = NULL) : Function(n), deprecated(d), newName(nn)
+    {info = "Sets the grid point values from a vector (or list of vectors).";}
+    virtual Value Execute(int arity,Value *arg);
+    int ValidArguments(int arity, Value *arg);
+};
+
+
+int SetGridValsFunction::ValidArguments( int arity, Value *arg )
+{
+  option_given = false;
+
+  if( arity != 2 && arity != 3)
+    return false;
+
+  if(arg[0].GetType() != tgrib)     //-- 1. argument: fieldset
+    return false;
+
+  if(arg[1].GetType() != tlist && arg[1].GetType() != tvector)     //-- 2. argument: list or vector
+    return false;
+
+  if(arity == 3)
+  {
+    if (arg[2].GetType() == tstring)
+    {
+      option_given = true;
+      return true;
+    }
+    else
+        return false;
+  }
+
+  return true;
+}
+
+
+// SetGridValsFunction
+// input is a fieldset and either a vector or a list of vectors
+//   if a single vector, then its values are applied to all the fields;
+//   if a list, then the number of component vectors must be the same as
+//     the number of fields, list[1] goes into fs[1], and so on.
+
+Value SetGridValsFunction::Execute(int /*arity*/,Value *arg)
+{
+    DeprecatedMessage (deprecated, "fieldset", newName);
+
+    fieldset *fs;
+    CVector  *v_in;
+    int i;
+    CList *list = 0;
+    Value d;
+    argtype input_type = tvector;
+    const char *option_name;
+    bool resize = false;
+
+    if (option_given)
+    {
+        arg[2].GetValue(option_name);
+        if (strcmp(option_name, "resize"))
+        {
+            return Error("set_gridvals: if supplied, the third parameter must be 'resize'; it is '%s'", option_name);
+        }
+        else
+        {
+            resize = true;
+        }
+    }
+
+
+
+    arg[0].GetValue(fs);  // the first argument is the fieldset
+
+
+    if (arg[1].GetType() == tlist)
+    {
+        arg[1].GetValue(list);   // the first argument is a list of vectors
+
+        if (list->Count() != fs->count)  // only perform if num vectors is num fields
+        {
+			return Error( "set_gridvals: list of input vectors (%d) should have same number as fieldset has fields (%d).",  list->Count(), fs->count);
+        }
+        
+        input_type = tlist;
+    }
+    else
+    {
+        arg[1].GetValue(v_in);   // the first argument is a single vector
+    }
+
+
+    fieldset *z = copy_fieldset(fs,fs->count,false);  // the output fieldset - intitially a copy of the input
+
+
+    for(i = 0; i < fs->count ;i++)  // for each input field...
+    {
+        CVector *v;
+
+        if (input_type == tvector)
+        {
+            v = v_in;  // use the same vector for all fields
+        }
+        else    // must be tlist; get the i'th element and check it's a vector
+        {
+            Value &val = (*list)[i];
+            
+            if (val.GetType() == tvector)
+                val.GetValue(v);
+            else
+			    return Error( "set_gridvals: element (%d) of input list is not a vector.",  i+1);
+        }
+
+
+        // now that 'v' is a vector, check that it has the same number of elements as the field
+        // - is this check necessary? Perhaps the user might want to only push a certain
+        //   number of points not the whole lot...
+
+        field *h = get_field(z ,i,expand_mem);
+
+        // if the user wants to resize the array of values in the GRIB, then we will allow that here
+
+        if (resize)
+        {
+            h->value_count = v->Count();
+            release_mem(h->values);
+            h->values   = (double*)reserve_mem(sizeof(double)*h->value_count);
+        }
+        else if (v->Count() != h->value_count)  // otherwise, issue an error
+        {
+			return Error( "set_gridvals: input vector has %d points, field has %d - they should be the same.",  v->Count(), h->value_count);
+        }
+
+
+        // now push its values into the field
+
+        for(size_t j=0;j<h->value_count;j++)
+        {
+            h->values[j] = (*v)[j];
+
+            if (!h->bitmap && MISSING_VALUE(h->values[j]))  // ensure the bitmap flag is set
+                h->bitmap = true;
+        }
+
+        release_field(h);
+    }
+
+
+	return Value(z);  // return the resultant fieldset
+}
+
+
+
+//=============================================================================
+
+class AccumulateFunction : public Function {
+	boolean average;
+public:
+	AccumulateFunction(const char *n,boolean a) : Function(n,1,tgrib) , average(a)
+		{ info = "Sum/Average the values of the grid points"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value AccumulateFunction::Execute(int,Value *arg)
+{
+	fieldset *v;
+	int i;
+	int nNumValidPoints;
+	CList *l;
+	double d;
+    Value returnValue;
+
+	arg[0].GetValue(v);
+
+	if( v->count > 1)
+		l = new CList(v->count);
+
+	for(i = 0; i < v->count ;i++)
+	{
+		field *g = get_field(v,i,expand_mem);
+
+		d = 0;
+		nNumValidPoints = 0;
+
+		for(size_t j=0;j<g->value_count;j++)
+		{
+			if (!MISSING_VALUE(g->values[j]))
+			{
+				d += g->values[j];
+				nNumValidPoints++;
+			}
+		}
+
+
+		if(average)
+		{
+			if (nNumValidPoints != 0)
+                returnValue = Value(d/nNumValidPoints);
+			else
+                returnValue = Value(); // nil
+		}
+		else
+		{
+			if (nNumValidPoints == 0)
+                returnValue = Value(); // nil
+            else
+                returnValue = Value(d);
+		}
+
+
+		release_field(g);
+
+		if( v->count > 1)
+			(*l)[i] = returnValue;
+	}
+
+	if( v->count > 1)
+		return Value(l);
+
+	return returnValue;
+}
+
+//============================================================
+
+class LookupFunction : public Function {
+public:
+	LookupFunction (const char *n) : Function(n,2,tgrib,tlist)
+	{info = "Builds an output fieldset using the values in the first as indices into the second.";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value LookupFunction::Execute(int,Value *arg)
+{
+	fieldset *v;
+	CList *l;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(l);
+
+	fieldset *z = copy_fieldset(v,v->count,false);
+
+	int count = l->Count();
+	double* values = new double[l->Count()];
+	int i;
+	for( i = 0; i < count; i++)
+		(*l)[i].GetValue(values[i]);
+
+	for(i = 0; i < v->count ;i++)
+	{
+		field *g = get_field(v,i,expand_mem);
+		field *h = get_field(z,i,expand_mem);
+
+		for(size_t j=0;j<g->value_count;j++)
+		{
+			int n = (int)(g->values[j]);
+			if(n<0 || n>=count)
+			{
+				delete[] values;
+				return Error("lookup: value out of range");
+			}
+			h->values[j] = values[n];
+		}
+
+		release_field(g);
+		if( ((i+1) % 10) == 0)
+			save_fieldset(z);
+	}
+
+	save_fieldset(z);
+
+	delete[] values;
+	return Value(z);
+}
+
+//=============================================================================
+//============================================================
+
+class LookupFunction2 : public Function {
+public:
+	LookupFunction2 (const char *n) : Function(n,2,tgrib,tgrib)  {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value LookupFunction2::Execute(int,Value *arg)
+{
+	fieldset *v;
+	fieldset *w;
+	int i;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(w);
+
+	fieldset *z = copy_fieldset(v,v->count,false);
+	int count = w->count;
+
+	for(i = 0; i < v->count ;i++)
+	{
+		field *g = get_field(v,i,expand_mem);
+		field *h = get_field(z,i,expand_mem);
+
+		for(size_t j=0;j<g->value_count;j++)
+		{
+			int n = (int)(g->values[j]);
+			if(n<0 || n>=count)
+			{
+				return Error("lookup: value out of range");
+			}
+			field *k =  get_field(w,n,expand_mem);
+			if(j >= k->value_count)
+			{
+				return Error("lookup: fields mismatch");
+			}
+			h->values[j] = k->values[j];
+			release_field(k);
+		}
+
+		release_field(g);
+		if( ((i+1) % 10) == 0) save_fieldset(z);
+	}
+
+	save_fieldset(z);
+
+	return Value(z);
+}
+
+//============================================================
+
+
+/*
+  FindIndexesFunction
+
+  Example: if these are our inputs:
+
+  GRIB:  10, 20, 30, 40     VECTOR:  | 5, 10, 15, 20, 25, 30  |
+         15, 25, 35, 45
+          8, 4,  20, 11
+
+
+  then our output would be a new GRIB, with values equal to the input values'
+  positions in the input vector (zero-based, for consistency with 'lookup'
+  function).
+  The input vector MUST be sorted in ascending order.
+  Values outside the range of the vector's values will be set to the min(0)
+  or max index.
+  A value lying between two values in the vector will use the index of the nearest
+  value; if equidistant, then the higher value is used.
+
+  GRIB:  1, 3, 5, 5     
+         2, 4, 5, 5
+         1, 0, 3, 1
+
+  A missing value in the input field will result in a missing value in
+  the output field.
+
+*/
+
+
+class FindIndexesFunction : public Function {
+public:
+	FindIndexesFunction (const char *n) : Function(n,2,tgrib,tvector)
+	{info = "Builds an output fieldset containing each gridpoint's indexed position in the given vector";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value FindIndexesFunction::Execute(int,Value *arg)
+{
+	fieldset *fs;
+	CVector  *v;
+	int i;
+
+	arg[0].GetValue(fs);
+	arg[1].GetValue(v);
+
+	fieldset *z = copy_fieldset(fs,fs->count,false);
+
+	for(i = 0; i < fs->count ;i++)
+	{
+		field *f = get_field(fs,i,expand_mem);  // input field
+		field *g = get_field(z, i,expand_mem);  // output field
+
+		for(size_t j=0;j<f->value_count;j++)
+		{
+			int    vindex;
+			int    result = v->Count()-1;  // if we don't find it, then choose the last value
+			double d = f->values[j];
+
+            if (!MISSING_VALUE(d))
+            {
+			    // find this point's position in the vector
+
+			    for (vindex = 0; vindex < v->Count(); vindex++)
+			    {
+				    double dvector = (*v)[vindex];
+
+				    // have we gone past this value in the vector?
+
+				    if (dvector >= d)
+				    {
+					    if (vindex == 0)  // only at the first value in the vector?
+					    {
+						    result = 0;
+					    }
+					    else
+					    {
+						    // find the closest point - the current or the previous one
+
+						    double d1 = d - (*v)[vindex-1];
+						    double d2 = dvector - d;
+
+						    if (d1 < d2)
+							    result = vindex - 1;
+						    else
+							    result = vindex;
+					    }
+
+					    // we found the value, so we can exit this inner loop and move
+					    // to the next point in the GRIB field
+
+					    break;
+				    }
+			    }
+    
+    			g->values[j] = result;  // put the resulting index into the output field
+            }
+    
+            else  // input field point is missing value, so set result to missing
+            {
+                SetFieldElementToMissingValue (g, j);
+            }
+		}
+
+		release_field(f);
+
+		if( ((i+1) % 10) == 0) save_fieldset(z);
+	}
+
+	save_fieldset(z);
+
+	return Value(z);
+}
+//=============================================================================
+
+class IntegrateFunction : public Function {
+public:
+	IntegrateFunction (const char *n) : Function(n)
+		{ info = "Integrate a field"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int IntegrateFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	CList *l;
+
+	if(arity<1)
+		return false;
+	if(arg[0].GetType() != tgrib)
+		return false;
+
+	switch(arity)
+	{
+		case 5:
+			for(i = 1;i<5;i++) if(arg[i].GetType() != tnumber)
+				return false;
+			break;
+
+		case 2:
+			switch(arg[1].GetType())
+			{
+				case tlist:
+					arg[1].GetValue(l);
+					if(l->Count() != 4)
+						return false;
+					for(i = 0;i<4;i++)
+						if((*l)[i].GetType() != tnumber)
+							return false;
+					return true;
+
+				case tgrib:
+					return true;
+
+				default:
+					return false;
+			}
+
+			/* break; */
+
+		case 1:
+			break;
+
+		default:
+			return false;
+
+	}
+	return true;
+}
+
+
+Value IntegrateFunction::Execute(int arity,Value *arg)
+{
+	fieldset *v;
+	fieldset *z = 0;
+	int i;
+	CList *l;
+
+	double d[4];
+
+	double& n = d[0];
+	double& w = d[1];
+	double& s = d[2];
+	double& e = d[3];
+
+	arg[0].GetValue(v);
+
+	if(arity == 1)
+	{
+		n =  90;
+		s = -90;
+		w = 0;
+		e = 360;
+
+	}
+	else if(arity == 2)
+	{
+		if(arg[1].GetType() == tgrib)
+		{
+			arg[1].GetValue(z);
+		}
+		else
+		{
+			CList *l;
+			arg[1].GetValue(l);
+			for(i = 0;i<4;i++)
+				(*l)[i].GetValue(d[i]);
+		}
+	}
+	else for(i = 0;i<4;i++)
+		arg[i+1].GetValue(d[i]);
+
+	while(w > e) w -= 360.0;
+	MvGeoBox geoArea( n, w, s, e );
+
+
+	if(z && z->count != 1 && z->count != v->count)
+		return Error("integrate: wrong number of fields in mask argument %d, "
+		"it should be 1 or %d",z->count,v->count);
+
+	if( v->count > 1)
+		l = new CList(v->count);
+
+	double val;
+    Value  returnVal;
+
+	for(i = 0; i < v->count ;i++)
+	{
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+		if(! grd->hasLocationInfo() )
+			return Error( "integrate: unimplemented or spectral data - unable to extract location data" );
+
+		auto_ptr<MvGridBase> maskgrd;
+		if( z )
+		  {
+		    auto_ptr<MvGridBase> tmp( MvGridFactory( z->fields[ z->count>1 ? i : 0 ] ) );
+		    maskgrd = tmp;
+		  }
+
+		if( maskgrd.get() && ! maskgrd->isEqual( grd.get() ) )
+			return Error("integrate: field and mask don't match");
+
+		val = 0;
+		double wght = 0;
+		double sum  = 0;
+		int    pcnt = 0;
+
+		for( int j=0; j < grd->length(); ++j )
+		{
+			int pointOk;
+			if( maskgrd.get() )
+				pointOk = grd->hasValue() && maskgrd->value() != 0.0;
+			else
+				pointOk = grd->hasValue()
+				        && geoArea.isInside( grd->lat_y(), grd->lon_x() );
+
+			if( pointOk )
+			  {
+			    double w1 = grd->weight();  //-- for dbg
+			    double v1 = grd->value();   //-- for dbg
+
+			    wght += w1;
+			    sum  += w1*v1;
+			    ++pcnt;
+			  }
+
+			grd->advance();
+			if( maskgrd.get() )
+				maskgrd->advance();
+		}
+
+
+		if( wght )
+        {
+			val = sum / wght;
+            returnVal = Value(val);
+        }
+		else
+		{
+			returnVal = Value(); // nil
+			marslog(LOG_WARN,"integrate: unable to integrate the field");
+		}
+
+		if( v->count > 1)         // multiple fields? add value to a list
+			(*l)[i] = returnVal;
+
+		//cout << " integrated over " << pcnt << " points" << endl;
+	}  // end 'for each field'
+
+	if( v->count > 1)
+		return Value(l);
+
+	return returnVal;
+}
+
+class MinMaxAreaFunction : public Function {
+  boolean min;
+
+public:
+  MinMaxAreaFunction(const char *n, boolean m) : Function(n),min(m)
+    { info = "Min/max in a given area"; };
+
+  virtual Value Execute(int arity,Value *arg);
+  virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+int MinMaxAreaFunction::ValidArguments(int arity,Value *arg)
+{
+
+  if(arity != 2) return false;
+  if(arg[0].GetType() != tgrib)   return false;
+  if ( arg[1].GetType() != tlist ) return false;
+
+  return true;
+}
+
+
+Value MinMaxAreaFunction::Execute(int, Value *arg)
+{
+  fieldset *v;
+  int i;
+  CList *l;
+
+  double d[4];
+
+  double& n = d[0];
+  double& w = d[1];
+  double& s = d[2];
+  double& e = d[3];
+
+  arg[0].GetValue(v);
+
+
+  arg[1].GetValue(l);
+  for(i = 0;i<4;i++)
+    (*l)[i].GetValue(d[i]);
+
+  while(w > e) w -= 360.0;
+  MvGeoBox geoArea( n, w, s, e );
+
+
+  double val = DBL_MAX;
+  boolean first_found = true;
+  int pointOk;
+
+  for(i = 0; i < v->count ;i++)
+  {
+    auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+    if(! grd->hasLocationInfo() )
+        return Error( "minvalue/maxvalue: unimplemented or spectral data - unable to extract location data" );
+
+    for ( int j =0; j < grd->length(); ++j )
+    {
+        pointOk = grd->hasValue()
+                  && geoArea.isInside( grd->lat_y(), grd->lon_x() );
+
+        if( pointOk )
+        {
+            if ( first_found )
+            {
+                val = grd->value();
+                first_found = false;
+            }
+
+            if ( min )
+            {
+                if( grd->value() < val )
+                    val = grd->value();
+            }
+            else
+            {
+                if( grd->value() > val )
+                    val = grd->value();
+            }
+        }
+
+        grd->advance();
+
+     }
+  }
+
+  if (val == DBL_MAX) return Value(); // nil, because there were no valid values
+  else                return Value(val);
+}
+//=============================================================================
+
+class InterpolateFunction : public Function {
+public:
+	InterpolateFunction (const char *n) : Function(n)
+		{ info = "Interpolate a field"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int InterpolateFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	CList *l;
+
+	if(arity<1) return false;
+	if(arg[0].GetType() != tgrib)   return false;
+
+	switch(arity)
+	{
+		case 3:
+			for(i = 1;i<3;i++) if(arg[i].GetType() != tnumber) return false;
+			break;
+
+		case 2:
+			switch(arg[1].GetType())
+			{
+				case tlist:
+					arg[1].GetValue(l);
+					if(l->Count() != 2) return false;
+					for(i = 0;i<2;i++)
+						if((*l)[i].GetType() != tnumber)
+							return false;
+					return true;
+
+				default:
+					return false;
+			}
+
+			/* break; */
+
+		default:
+			return false;
+
+	}
+	return true;
+}
+
+
+Value InterpolateFunction::Execute(int arity,Value *arg)
+{
+	extern double interpolate(field *Grib, double y, double x);
+
+	fieldset *v;
+	int i;
+	CList *l;
+
+	double d[2];
+	double a;
+    Value returnVal;
+
+	double& lat = d[0];
+	double& lon = d[1];
+
+	arg[0].GetValue(v);
+
+	if(arity == 2)
+	{
+		CList *l;
+		arg[1].GetValue(l);
+		for(i = 0;i<2;i++)
+			(*l)[i].GetValue(d[i]);
+	}
+	else for(i = 0;i<2;i++)
+		arg[i+1].GetValue(d[i]);
+
+	if( v->count > 1)
+		l = new CList(v->count);
+
+	for(i = 0; i < v->count ;i++)
+	{
+#if NO_MVGRID
+		field *g = get_field(v,i,expand_mem);
+		gribsec2_ll *s2 = (gribsec2_ll*) &g->ksec2[0];
+
+		if(s2->data_rep != GRIB_LAT_LONG)
+			return Error("interpolate: Field is not lat/long");
+
+		a = interpolate(g,lat,lon);
+
+
+		// a will be DBL_MAX if there is no valid corresponding grid value.
+
+		if (a == DBL_MAX)
+            returnVal = Value(); // nil
+        else
+            returnVal = Value(a);
+
+
+		if( v->count > 1)
+			(*l)[i] = returnVal;
+
+		release_field(g);
+#else
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+
+		if( ! grd->hasLocationInfo() )
+		{
+			return Error("interpolate: unimplemented or spectral data - unable to extract location data");
+		}
+
+		a = grd->interpolatePoint( lat, lon );
+
+
+		// a will be DBL_MAX if there is no valid corresponding grid value.
+
+		if (a == DBL_MAX)
+            returnVal = Value(); // nil
+        else
+            returnVal = Value(a);
+
+
+		if( v->count > 1)
+		{
+			(*l)[i] = returnVal;
+		}
+#endif
+	}
+
+	if( v->count > 1)
+		return Value(l);
+
+	return returnVal;
+}
+
+//=============================================================================
+
+class NearestGridpointFunction : public Function {
+	bool loc_info;
+public:
+	NearestGridpointFunction(const char *n,bool loc_info) : Function(n), loc_info(loc_info)
+		{ info = "Interpolate (get nearest grid point of) a field"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NearestGridpointFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	CList *l;
+
+	if( arity < 1 )
+	  return false;
+	if( arg[0].GetType() != tgrib )
+	  return false;
+
+	switch(arity)
+	{
+		case 3:
+			if (arg[1].GetType() == tnumber && arg[2].GetType() == tnumber)
+				return true;
+			if (arg[1].GetType() == tvector && arg[2].GetType() == tvector && !loc_info)
+				return true;
+			return false;  // not both numbers or vectors? Then not valid.
+			break;
+
+		case 2:
+			switch(arg[1].GetType())
+			{
+				case tlist:
+					arg[1].GetValue(l);
+					if(l->Count() != 2)
+					  return false;
+					for(i = 0;i<2;i++)
+						if((*l)[i].GetType() != tnumber)
+							return false;
+					return true;
+			}
+			return false;
+
+		default:
+			return false;
+
+	}
+	return true;
+}
+
+
+Value NearestGridpointFunction::Execute(int arity,Value *arg)
+{
+	fieldset *v;
+	int       i, j;
+	CList    *l;
+	request  *r = empty_request(NULL);
+
+	double  d[2];        // if single coordinates
+	double& lat = d[0];  // if single coordinates
+	double& lon = d[1];  // if single coordinates
+	CVector *vd[2];      // if vector of coordinates
+	CVector *vlat;       // if vector of coordinates
+	CVector *vlon;       // if vector of coordinates
+	CVector *vvals;      // if vector of coordinates
+
+    Value returnVal, returnLocVal;
+	vtype input_type = tnumber;
+
+	arg[0].GetValue(v);
+
+	if(arity == 2)
+	{
+		CList *l;
+		arg[1].GetValue(l);
+		for(i = 0;i<2;i++)
+			(*l)[i].GetValue(d[i]);
+	}
+	else
+	{
+		input_type = arg[1].GetType();
+
+		if (input_type == tnumber)      // get 2 coordinates as numbers
+			for(i = 0;i<2;i++)
+				arg[i+1].GetValue(d[i]);
+		else                            // get 2 vectors of  coordinates
+		{
+			for(i = 0;i<2;i++)
+				arg[i+1].GetValue(vd[i]);
+
+			vlat  = vd[0];
+			vlon  = vd[1];
+
+			if (vlat->Count() != vlon->Count())
+			{
+				return Error("nearest_gridpoint: latitude (%d) and longitude (%d) vectors are of different size; they must be the same.",
+							vlat->Count(), vlon->Count());
+			}
+		}
+	}
+
+
+	// if a single input coordinate, then put it into 1-element vectors so that we can
+	// use the same code to access the coordinates whether they are given as numbers
+	// or vectors
+
+	if (input_type == tnumber)
+	{
+		vlat = new CVector(1);
+		vlon = new CVector(1);
+		
+		(*vlat)[0] = lat;
+		(*vlon)[0] = lon;
+	}
+
+
+
+	// if more than one field, then the result will be a list
+
+	if( v->count > 1 || loc_info)
+		l = new CList(v->count);
+
+
+	MvGridPoint gp;
+
+	for(i = 0; i < v->count ;i++)
+	{
+
+		if (input_type == tvector)    // create a new output vector for this field?
+			vvals = new CVector(vlat->Count());
+
+
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+
+		if( ! grd->hasLocationInfo() )
+		{
+			return Error("nearest_gridpoint: unimplemented or spectral data - unable to extract location data");
+		}
+
+		for (j = 0; j < vlat->Count(); j++)
+		{
+
+			gp = grd->nearestGridpoint((*vlat)[j], (*vlon)[j]);
+
+
+			// a will be DBL_MAX if there is no valid corresponding grid value.
+
+			if (gp.value_ == DBL_MAX)    // no grid point
+			{
+				if( loc_info )
+                	returnLocVal = Value(); // nil
+				else
+					if (input_type == tvector)
+						(*vvals)[j] = VECTOR_MISSING_VALUE;
+					else
+                		returnVal = Value();    // nil
+			}
+			else if (gp.value_ == mars.grib_missing_value)   // grid point exists, but missing value
+			{
+				if( loc_info )
+				{
+					unset_value(r,"value");  // nil
+					set_value(r,"latitude",  "%g", gp.loc_.latitude());
+					set_value(r,"longitude", "%g", gp.loc_.longitude());
+                	returnLocVal = Value(r);
+				}
+				else
+					if (input_type == tvector)
+						(*vvals)[j] = VECTOR_MISSING_VALUE;
+					else
+                		returnVal = Value(); // nil
+			}
+			else  // grid point exists, value ok
+			{
+				if( loc_info )
+				{
+					set_value(r,"value",     "%g", gp.value_);
+					set_value(r,"latitude",  "%g", gp.loc_.latitude());
+					set_value(r,"longitude", "%g", gp.loc_.longitude());
+                	returnLocVal = Value(r);
+				}
+				else
+					if (input_type == tvector)
+						(*vvals)[j] = gp.value_;
+					else
+						returnVal = Value(gp.value_);
+			}
+
+		}   // end input coordinate loop
+
+
+		if (input_type == tvector)
+			returnVal = Value(vvals);
+
+
+		if (loc_info)
+		{
+			(*l)[i] = returnLocVal;
+		}
+		else if (v->count > 1)
+		{
+			(*l)[i] = returnVal;
+		}
+
+	}   // end fieldset loop
+
+
+
+	if (input_type == tnumber)  // cleanup
+	{
+		delete vlat;
+		delete vlon;
+	}
+
+
+	if (v->count > 1 || loc_info)
+		return Value(l);
+
+	return returnVal;
+}
+
+//=============================================================================
+
+class FindFunction : public Function {
+public:
+	FindFunction (const char *n) : Function(n)
+		{ info = "Find values in field"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int FindFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	CList *l;
+
+	if(arity<2)
+	  return false;
+
+	if(arg[0].GetType() != tgrib)
+	  return false;
+
+	if(arg[1].GetType() != tnumber && arg[1].GetType() != tlist)
+	  return false;
+
+	if(arg[1].GetType() == tlist)
+	  {
+	    arg[1].GetValue(l);
+	    if(l->Count() != 2)
+	      return false;
+
+	    for(i = 0;i<2;i++)
+	      {
+		if((*l)[i].GetType() != tnumber)
+		  return false;
+	      }
+	  }
+
+	switch(arity)
+	{
+		case 6:
+			for(i = 2;i<6;i++)
+			  if(arg[i].GetType() != tnumber)
+			    return false;
+			break;
+
+		case 3:
+			switch(arg[2].GetType())
+			{
+				case tlist:
+					arg[2].GetValue(l);
+					if(l->Count() != 4) return false;
+					for(i = 0;i<4;i++)
+						if((*l)[i].GetType() != tnumber)
+							return false;
+					return true;
+
+				case tgrib:
+					return true;
+
+				default:
+					return false;
+			}
+
+			/* break; */
+
+		case 2:
+			break;
+
+		default:
+			return false;
+
+	}
+	return true;
+}
+
+
+Value FindFunction::Execute(int arity,Value *arg)
+{
+	fieldset *z = 0;
+	int    i;
+	CList *l;
+
+	double min = 1;
+	double max = 1;
+
+	double  d[4];
+	double& n = d[0];
+	double& w = d[1];
+	double& s = d[2];
+	double& e = d[3];
+
+	fieldset *v;
+	arg[0].GetValue(v);
+
+	if(arg[1].GetType() == tlist)
+	{
+		CList *l;
+		arg[1].GetValue(l);
+		(*l)[0].GetValue(min);
+		(*l)[1].GetValue(max);
+	}
+	else
+	{
+		arg[1].GetValue(min);
+		max = min;
+	}
+
+	if(arity == 2)
+	{
+		n =  90;
+		s = -90;
+		w = 0;
+		e = 360;
+
+	}
+	else if(arity == 3)
+	{
+		if(arg[2].GetType() == tgrib)
+		{
+			arg[2].GetValue(z);
+		}
+		else
+		{
+			CList *l;
+			arg[2].GetValue(l);
+			for(i = 0;i<4;i++)
+				(*l)[i].GetValue(d[i]);
+		}
+	}
+	else
+	  for(i = 0;i<4;i++)
+		arg[i+2].GetValue(d[i]);
+
+	while(w > e)
+	  w -= 360.0;
+
+	MvGeoBox geoArea( n, w, s, e );
+
+	CList *p = 0;
+
+	if( v->count > 1)
+		l = new CList(v->count);
+
+	for(i = 0; i < v->count ;i++)
+	  {
+	    auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+	    if(! grd->hasLocationInfo() )
+	      return Error( "find: unimplemented or spectral data - unable to extract location data" );
+
+	    auto_ptr<MvGridBase> maskgrd;
+	    if( z )
+	      {
+		auto_ptr<MvGridBase> tmp( MvGridFactory( z->fields[ z->count>1 ? i : 0 ] ) );
+		maskgrd = tmp;
+	      }
+
+	    if( maskgrd.get() && ! maskgrd->isEqual( grd.get() ) )
+	      return Error("find: field and mask don't match");
+
+	    CList **q = new CList*[ grd->length() ];
+	    int   cnt = 0;
+	    int     j;
+
+	    for( j=0; j < grd->length() ; ++j )
+	      {
+		bool b;
+
+		if( maskgrd.get() )
+		  b = ( maskgrd->value() != 0.0 );
+		else
+		  b = geoArea.isInside( grd->lat_y(), grd->lon_x() );
+
+		b = b && grd->hasValue();
+
+		if( b )
+		  {
+		    if( grd->value() >= min && grd->value() <= max )
+		      {
+			CList *z = new CList(2);
+			(*z)[0]  = grd->lat_y();
+			(*z)[1]  = grd->lon_x();
+			q[cnt++] = z;
+		      }
+		  }
+
+		grd->advance();
+		if( maskgrd.get() )
+		  maskgrd->advance();
+	      }
+
+
+	    CList *a = new CList(cnt);
+	    for(j = 0; j < cnt; j++)
+	      (*a)[j] = q[j];
+
+	    p = a;
+
+	    delete[] q;
+
+	    if( v->count > 1)
+	      (*l)[i] = Value(a);
+	  }
+
+	if( v->count > 1)
+		return Value(l);
+
+	return Value(p);
+}
+
+//=============================================================================
+// new function added 1998-11-09/br (overwriting 'find')
+// renamed as 'pick'  1999-03-24/vk (and restore original 'find')
+// renamed as 'gfind' 2003-04-10/vk ('pick' was never activated!)
+//
+//  geopoints = gfind( fieldset, value, tolerance = 0 )
+//
+
+class GFindFunction : public Function {
+public:
+	GFindFunction (const char *n) : Function(n)
+		{ info = "Find values in field into geopoints"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int GFindFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2 && arity != 3)
+	  return false;
+
+	if(arg[0].GetType() != tgrib)
+	  return false;
+
+	if(arg[1].GetType() != tnumber)
+	  return false;
+
+	if(arity == 3 && arg[2].GetType() != tnumber)
+	  return false;
+
+	return true;
+}
+
+Value GFindFunction::Execute(int arity,Value *arg)
+{
+	char *path = marstmp();
+	FILE *f = fopen(path,"w");
+	if(!f)
+	  return  Error("gfind: cannot open %s",path);
+
+	fprintf(f,"#GEO\n");
+	fprintf(f,"#DATA\n");
+
+
+	fieldset *v;
+	double value = 0;
+	double epsilon = 0;
+
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(value);
+	if(arity == 3)
+		arg[2].GetValue(epsilon);
+
+	for(int i = 0; i < v->count ;i++)
+	  {
+	    auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+	    if(! grd->hasLocationInfo() )
+	      return Error( "gfind: unimplemented or spectral data - unable to extract location data" );
+
+	    for( int j=0; j < grd->length(); ++j )
+	      {
+		bool pointOk = grd->hasValue();
+
+		if( pointOk )
+		  {
+		    double d = grd->value() - value;
+		    if(d < 0 )
+		      d = -d;
+
+		    if(d <= epsilon)
+		      {
+			fprintf(f,"%g\t%g\t%g\t%ld\t%ld\t%g\n",
+					grd->lat_y(),
+					grd->lon_x(),
+					0.0, // level
+					0, // date
+					0, // time
+					grd->value() );
+		      }
+		  }
+
+		grd->advance();
+	      }
+	  }
+
+	fclose(f);
+
+	return Value(new CGeopts(path,1));
+}
+
+//=============================================================================
+
+class VertIntFunction : public Function {
+public:
+	VertIntFunction (const char *n) : Function(n)
+	{ info = "Vertical integration"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int VertIntFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity<1)
+		return 0;
+	if(arity > 0) if(arg[0].GetType() != tgrib)
+		return false;
+	if(arity > 1) if(arg[1].GetType() != tgrib)
+		return false;
+	if(arity > 2)
+		return false;
+
+	return true;
+}
+
+Value VertIntFunction::Execute(int arity,Value *arg)
+{
+	fieldset* v;
+	field*    lnsp = 0;
+	fortint   datarep;
+
+	if( arity == 1 )
+	{
+		arg[0].GetValue(v);	//-- we need to find lnsp
+		int n = -1;
+
+		for(int i = 0; (i < v->count) && (n == -1); i++)
+		{
+			field *g  = GetIndexedFieldWithAtLeastPackedMem (v,i);
+			//gribsec1   *s1 = (gribsec1*)&g->ksec1[0];
+			auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
+			//if(s1->parameter == 152) n = i;
+			if( grd->getLong(parameterKey) == 152 )
+			    n = i;
+			release_field(g);
+		}
+		if(n == -1)
+			 return Error("vertint: LNSP (152) not found");
+
+		lnsp = get_field(v,n,expand_mem);
+	}
+	else
+	{
+		fieldset *p;
+		arg[0].GetValue(p);
+		arg[1].GetValue(v);
+		lnsp = get_field(p,0,expand_mem);
+	}
+#if 0
+	for( j=0;j<lnsp->sec4len;j++)
+		if (! MISSING_VALUE(lnsp->rsec4[j]))
+		  lnsp->rsec4[j] = exp(lnsp->rsec4[j]); //-- lost if lnsp among other fields!
+#endif
+	MvField F_lnsp( lnsp );
+	MvFieldExpander expa_lnsp( F_lnsp );
+
+	datarep = F_lnsp.dataRepres(); //s2->data_rep;
+	if( datarep != GRIB_LAT_LONG && datarep != GRIB_GAUSSIAN )
+		return Error("vertint: Field is not lat/long nor Gaussian!");
+
+	if( ! F_lnsp.isModelLevel() )  // GRIB_MODEL_LEVEL )
+		return Error("vertint: Field is not model level");
+
+	if( (int)(F_lnsp.parameter()) != 152 )
+		return Error("vertint: Field is not LNSP (152)");
+
+	fieldset *z = copy_fieldset(v,1,false); //-- this releases lnsp memory (if same field)
+	field    *h = get_field(z,0,expand_mem);
+
+	set_field_state( lnsp, expand_mem );    //-- restore into memory (may have been released)
+	set_field_state( h, expand_mem );
+
+	assert( h->value_count );
+	for( size_t j=0; j<h->value_count; j++ )
+	  {
+	    h->values[j] = 0;
+	    if (! MISSING_VALUE(lnsp->values[j]))
+	      lnsp->values[j] = exp(lnsp->values[j]);
+	  }
+
+	for( int i = 0; i < v->count; i++ )
+	{
+		field *g = get_field(v,i,expand_mem);
+		if( g != lnsp )
+		{
+			MvField F_g( g );
+			MvFieldExpander expa_lnsp( F_g );
+
+			if( F_g.dataRepres() != datarep )
+				return Error("vertint: Field has different representation than LNSP!");
+
+			if( ! F_g.isModelLevel() )
+				return Error("vertint: Field is not model level");
+
+			if( g->value_count != lnsp->value_count)
+				return Error("vertint: Field and LNSP are different");
+
+
+			int level = (int)F_g.level(); // (int)s1->top_level;
+
+			double C11, C12, C21, C22;
+			F_g.vertCoordCoefs( level-1, C11, C12 );
+			F_g.vertCoordCoefs( level,   C21, C22 );
+
+			for( size_t j=0; j<g->value_count; j++ )
+			{
+				// We only calculate for this gridpoint if the input values
+				// are valid and we have not already invalidated this gridpoint.
+
+				if (!(MISSING_VALUE (g->values[j]))    &&
+				    !(MISSING_VALUE (lnsp->values[j])) &&
+					!(MISSING_VALUE (h->values[j])))
+				{
+					double pkpd = C21 + C22 * lnsp->values[j];
+					double pkmd = C11 + C12 * lnsp->values[j];
+
+					double dp = pkpd - pkmd;
+					h->values[j] += g->values[j] * dp;
+				}
+				else
+				{
+					SetFieldElementToMissingValue (h, j);
+				}
+			}
+			release_field(g);
+		}
+	}
+
+	for( size_t j=0; j<h->value_count; j++ )
+		if( ! MISSING_VALUE(h->values[j]) )
+			h->values[j] /= 9.80665;
+
+	release_field(h);
+	release_field(lnsp);
+
+	return Value(z);
+
+#if 0
+	fieldset *v;
+	field    *lnsp = 0;
+	fortint   datarep;
+
+	if(arity == 1)
+	{
+		// we need to find lnsp
+		arg[0].GetValue(v);
+		int n = -1;
+
+		for(int i = 0; (i < v->count) && (n == -1) ;i++)
+		{
+			field *g  = get_field(v,i,expand_mem);
+			gribsec1   *s1 = (gribsec1*)&g->ksec1[0];
+			if(s1->parameter == 152) n = i;
+			release_field(g);
+		}
+		if(n == -1)
+			 return Error("vertint: LNSP not found");
+
+		lnsp = get_field(v,n,expand_mem);
+	}
+	else
+	{
+		fieldset *p;
+		arg[0].GetValue(p);
+		arg[1].GetValue(v);
+		lnsp = get_field(p,0,expand_mem);
+	}
+	int j;
+#if 0
+	for( j=0;j<lnsp->sec4len;j++)
+		if (! MISSING_VALUE(lnsp->rsec4[j]))
+		  lnsp->rsec4[j] = exp(lnsp->rsec4[j]); //-- lost if lnsp among other fields!
+#endif
+	gribsec1    *s1 = (gribsec1*)    &lnsp->ksec1[0];
+	gribsec2_ll *s2 = (gribsec2_ll*) &lnsp->ksec2[0];
+
+	datarep = s2->data_rep;
+	if( datarep != GRIB_LAT_LONG && datarep != GRIB_GAUSSIAN )
+		return Error("vertint: Field is not lat/long nor Gaussian!");
+
+	if(s1->level_type != GRIB_MODEL_LEVEL)
+		return Error("vertint: Field is not model level");
+
+	if(s1->parameter != 152)
+		return Error("vertint: Field is not LNSP");
+
+	fortfloat *aa = &lnsp->rsec2[10];
+	fortfloat *bb = &lnsp->rsec2[10 + s2->vertical/2];
+
+	//cout << "LNSP level = " << s1->top_level << ", C1 & C2: " << aa[0] << ", " << bb[0] << endl;
+
+	fieldset *z = copy_fieldset(v,1,false); //-- this releases lnsp memory (if same field)
+	field    *h = get_field(z,0,expand_mem);
+
+	set_field_state( lnsp, expand_mem );    //-- restore into memory (may have been released)
+
+	for(j=0;j<h->sec4len;j++)
+	  {
+	    h->rsec4[j] = 0;
+	    if (! MISSING_VALUE(lnsp->rsec4[j]))
+	      lnsp->rsec4[j] = exp(lnsp->rsec4[j]);
+	  }
+
+	for(int i = 0; i < v->count ;i++)
+	{
+		field *g = get_field(v,i,expand_mem);
+		if(g != lnsp)
+		{
+			gribsec1    *s1 = (gribsec1*)    &g->ksec1[0];
+			gribsec2_ll *s2 = (gribsec2_ll*) &g->ksec2[0];
+
+			if( s2->data_rep != datarep )
+				return Error("vertint: Field has different representation than LNSP!");
+
+			if(s1->level_type != GRIB_MODEL_LEVEL)
+				return Error("vertint: Field is not model level");
+
+			if(g->sec4len != lnsp->sec4len)
+				return Error("vertint: Field and LNSP are different");
+
+
+			int level = (int)s1->top_level;
+			//cout << "Level = " << level << ", C1 & C2: " << aa[level] << ", " << bb[level] << endl;
+
+			for(int j=0;j<g->sec4len;j++)
+			{
+				/* We only calculate for this gridpoint if the input values
+				   are valid and we have not already invalidated this gridpoint. */
+
+				if (!(MISSING_VALUE (g->rsec4[j]))    &&
+				    !(MISSING_VALUE (lnsp->rsec4[j])) &&
+					!(MISSING_VALUE (h->rsec4[j])))
+				{
+					double pkpd = aa[level]   + bb[level]   * lnsp->rsec4[j];
+					double pkmd = aa[level-1] + bb[level-1] * lnsp->rsec4[j];
+					double dp = pkpd - pkmd;
+					h->rsec4[j] += g->rsec4[j] * dp;
+				}
+				else
+				{
+					SetFieldElementToMissingValue (h, j);
+				}
+			}
+			release_field(g);
+		}
+	}
+
+	for(j=0;j<h->sec4len;j++)
+		if (!MISSING_VALUE(h->rsec4[j]))
+			h->rsec4[j] /= 9.80665;
+
+	release_field(h);
+	release_field(lnsp);
+
+	return Value(z);
+#endif
+}
+//=============================================================================
+
+class UniVertIntFunction : public Function {
+public:
+  UniVertIntFunction (const char *n) : Function(n), lnsp_(152)
+     { info = "Universal vertical integration, also for sparse vertical data"; }
+  virtual Value Execute(int arity,Value *arg);
+  virtual int ValidArguments(int arity,Value *arg);
+  const char* fs_name( fieldset* fs );
+protected:
+  int lnsp_;
+  int nrfs_;
+  bool limitedRange;
+  int  top_;
+  int  bottom_;
+};
+
+int UniVertIntFunction::ValidArguments(int arity,Value *arg)
+{
+  if(arity<1)
+    return 0;
+
+  if(arg[0].GetType() != tgrib)            //-- 1st param must be fieldset
+    return false;
+
+  limitedRange = false;
+  top_         =  0;
+  bottom_      = -1;
+  CList *l;
+
+  int valid = true;
+  switch(arity)
+    {
+    case 1:
+      nrfs_ = 1;                           //-- single fieldset
+      break;
+
+    case 2:
+      if(arg[1].GetType() == tgrib)
+	{
+	  nrfs_ = 2;                       //-- two fieldsets
+	}
+      else
+	{
+	  if(arg[1].GetType() == tnumber)
+	    {
+	      nrfs_ = 1;
+	      arg[1].GetValue(lnsp_);        //-- single fieldset + lnsp code
+	    }
+	  else
+	    valid = false;
+	}
+      break;
+
+    case 3:
+      if( arg[1].GetType() != tgrib )
+	  valid = false;
+
+      nrfs_ = 2;
+
+      if( arg[2].GetType() == tnumber )
+	{
+	  arg[2].GetValue(lnsp_);           //-- two fieldsets + lnsp code
+	}
+      else if( arg[2].GetType() == tlist )
+	{
+	  arg[2].GetValue(l);               //-- two fieldsets + [top,bottom]
+	  if( l->Count() != 2 )
+	      valid = false;
+	  else
+	    {
+	      (*l)[0].GetValue(top_);
+	      (*l)[1].GetValue(bottom_);
+	      limitedRange = true;
+	    }
+	}
+      else
+	  valid = false;
+      break;
+
+    default:
+      valid = false;
+    }
+
+  return valid;
+}
+
+const char* UniVertIntFunction::fs_name( fieldset* fs )
+{
+  return fs->fields[0]->file->fname;
+}
+
+Value UniVertIntFunction::Execute(int /*arity*/,Value *arg)
+{
+  const double cSuspicious = 20000.0; //-- suspicious pressure layer > 200 hPa
+
+  fieldset* fs_data;
+  fieldset* fs_lnsp = 0;
+
+  if(nrfs_ == 1)
+    arg[0].GetValue(fs_data);               //-- single fieldset: lnsp + data together
+  else
+  {
+      arg[0].GetValue(fs_lnsp);             //-- 1st param is supposed to contain lnsp
+      arg[1].GetValue(fs_data);             //-- 2nd param is supposed to be the data
+  }
+
+  field*   f_lnsp_orig;
+  int      n_lnsp = -1;
+
+  if(nrfs_ == 1)                            //-- single fieldset - we need to find lnsp
+  {
+    for(int i = 0; (i < fs_data->count) && (n_lnsp == -1) ; ++i)
+    {
+      f_lnsp_orig = GetIndexedFieldWithAtLeastPackedMem(fs_data,i);
+      auto_ptr<MvGridBase> grd( MvGridFactory( f_lnsp_orig ) );
+      if( grd->getLong(parameterKey) == lnsp_ )
+      {
+        n_lnsp = i;                   //-- lnsp found - stop the loop
+      }
+      else
+        release_field(f_lnsp_orig);
+    }
+
+    if( n_lnsp == -1 )                    //-- did we find lnsp?
+      return Error( "univertint: LNSP not found" );
+  }
+  else                                      //-- two fieldsets - lnsp & data
+  {
+    f_lnsp_orig = get_field( fs_lnsp, 0, expand_mem );
+  }
+
+  field*  f_lnsp = copy_field( f_lnsp_orig, true ); //-- make copy, not to modify original field
+
+  fieldset *z = copy_fieldset(fs_data,1,false); //-- create output field...
+  field    *h = get_field( z, 0, expand_mem );
+  for( size_t jj=0; jj < h->value_count; ++jj )        //-- ...with all values zeroed
+  {
+    h->values[jj] = 0;
+  }
+
+  MvField F_sp( f_lnsp );
+  MvFieldExpander expa_lnsp( F_sp );            //-- input is lnsp...
+
+  for(int j=0; j < F_sp.countValues(); ++j )    //-- ...but we need sp: lnsp -> sp
+    if (! MISSING_VALUE(F_sp[j]))
+      F_sp[j] = exp( F_sp[j] );
+
+
+                                                //-- confirm lnsp/sp data is ok
+  if( (int)F_sp.parameter() != lnsp_ )
+    return Error( "univertint: Field is not LNSP" );
+
+  int datarep = F_sp.dataRepres();
+  if( datarep != GRIB_LAT_LONG && datarep != GRIB_GAUSSIAN )
+    return Error("univertint: Data is not lat/long nor Gaussian!");
+
+  if( ! F_sp.isModelLevel() )
+    return Error("univertint: Data is not model level");
+
+
+  int upmost = top_ ? top_ - 1 : 0;             //-- top_ != 0 if limited range
+  double prevC1, prevC2;                        //-- for computing pressure level
+  if( ! F_sp.vertCoordCoefs( upmost, prevC1, prevC2 ) ) //-- for top level
+  {
+    prevC1 = prevC2 = 0;
+    marslog( LOG_INFO, "univertint: Top level coefficients set to zeros" );
+  }
+
+
+  for( int fi = 0; fi < fs_data->count ; ++fi ) //-- loop all (vertical) data...
+  {
+    if( fi != n_lnsp )                        //-- ...but skip if lnsp field
+    {
+      field* g = get_field(fs_data,fi,expand_mem);
+
+      MvField F( g );
+      if( F.dataRepres() != datarep )
+        return Error("univertint: Data has different representation than LNSP!");
+
+      if( ! F.isModelLevel() )
+        return Error("univertint: Data is not model level");
+
+      if( F.countValues() != F_sp.countValues() )
+        return Error("univertint: Data and LNSP are different");
+
+      int currLev = (int)F.level();
+      if( limitedRange && ( currLev < top_ || currLev > bottom_ ) )
+      {
+        continue;          //-- limited range and level not inside the range!
+      }
+
+      double currC1, currC2;
+      F.vertCoordCoefs( currC1, currC2 );
+
+      bool errMsgIssued = false;
+
+      for( int gp=0; gp < F.countValues(); ++gp )
+      {
+        if( MISSING_VALUE(F[gp]) || MISSING_VALUE(F_sp[gp]) || MISSING_VALUE(h->values[gp]) )
+        {
+          SetFieldElementToMissingValue( h, gp );
+        }
+        else
+        {
+          double pkpd = currC1 + currC2 * F_sp[gp];
+          double pkmd = prevC1 + prevC2 * F_sp[gp];
+          double dp = pkpd - pkmd;
+          if( (dp < 0 || dp > cSuspicious) && ! errMsgIssued )
+          {
+            if( dp < 0 )
+              Error( "univertint: Data produces negative layer %d hPa (%d-%d)",
+                (int)(dp/100), (int)(pkpd/100),(int)(pkmd/100) );
+            else
+              marslog( LOG_WARN,
+                "univertint: suspiciously thick layer %d hPa (%d-%d)",
+                (int)(dp/100), (int)(pkpd/100),(int)(pkmd/100) );
+
+            errMsgIssued = true;
+          }
+          h->values[gp] += F[gp] * dp;
+        }
+      }  // end for values
+
+      prevC1 = currC1;
+      prevC2 = currC2;
+
+      release_field(g);
+    } // end if not lnsp
+  }  // end for fields
+
+  for( size_t ij=0; ij<h->value_count; ++ij )
+    if (!MISSING_VALUE(h->values[ij]))
+      h->values[ij] /= 9.80665;
+
+  release_field(h);
+  release_field(f_lnsp);
+
+  return Value(z);
+}
+
+//=============================================================================
+
+class ThicknessFunction : public Function {
+	boolean pressure;
+public:
+	ThicknessFunction(const char *n,boolean p) : Function(n),pressure(p)
+	{info = "Creates fields of pressure or thickness (input in lat/lon only).";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int ThicknessFunction::ValidArguments(int arity,Value *arg)
+{
+	CList *l;
+	int i;
+
+	if(arity<1)
+		return false;
+
+	if(arity > 0)
+		if(arg[0].GetType() != tgrib)
+			return false;
+
+	if(arity > 1)
+	{
+		switch(arg[1].GetType())
+		{
+			case tnumber:
+			case tgrib:
+				break;
+
+			case tlist:
+				arg[1].GetValue(l);
+				if(l->Count() < 1)
+					return false;
+				for(i = 0;i<l->Count();i++)
+					if((*l)[i].GetType() != tnumber)
+						return false;
+				break;
+
+			default:
+				return false;
+		}
+	}
+
+	if(arity > 2)
+		return false;
+
+	return true;
+}
+
+Value ThicknessFunction::Execute(int arity,Value *arg)
+{
+	fieldset *v;
+	int *levels = 0;
+	int n = 0, l = 0, m = 0;
+	int count;
+
+
+	arg[0].GetValue(v);
+
+	if(arity == 2)
+	{
+		CList *l;
+		int i;
+		switch(arg[1].GetType())
+		{
+			case tnumber:
+				count = 1;
+				levels = new int[1];
+				arg[1].GetValue(levels[0]);
+				break;
+
+			case tlist:
+				arg[1].GetValue(l);
+				count = l->Count();
+				levels = new int[count];
+				for(i = 0;i<count;i++)
+					(*l)[i].GetValue(levels[i]);
+				break;
+
+			case tgrib:
+				fieldset *w;
+				arg[1].GetValue(w);
+
+				count = w->count;
+				levels = new int[w->count];
+
+				for(i = 0; i < w->count ;i++)
+				{
+					field* g = GetIndexedFieldWithAtLeastPackedMem(w,i);
+					MvField* f = new MvField( g );
+					if( f->dataRepres() != GRIB_LAT_LONG )
+					   ++l;
+					if( ! f->isModelLevel() )
+					   ++m;
+					levels[i] = (int)f->level();
+					delete f;
+					release_field(g);
+				}
+				break;
+		}
+	}
+
+
+	fieldset *z = new_fieldset(0);
+
+
+	for(int i = 0; i < v->count ;i++)
+	{
+		field *g     = get_field(v,i,expand_mem);
+		MvField* F_g = new MvField( g );
+		int levcount = F_g->vertCoordCoefPairCount();
+
+		if( (int)F_g->parameter() == 152 )
+		   ++n;
+		if( F_g->dataRepres() != GRIB_LAT_LONG )
+		   ++l;
+		if( ! F_g->isModelLevel() )
+		   ++m;
+
+		if(arity == 1)
+		{
+			delete[] levels;
+
+			count = levcount - 1;
+			levels = new int[count];
+			for(int k = 0;k<count;k++)
+				levels[k] = k+1;
+		}
+
+		for(int k = 0 ; k < count; k++)
+		{
+			int level = levels[k];
+			field* h  = copy_field(g,false);
+
+			MvField F_h( h );
+			double C11, C12, C21, C22;
+			F_h.vertCoordCoefs( level-1, C11, C12 );
+			F_h.vertCoordCoefs( level,   C21, C22 );
+
+			if(pressure)
+				for( size_t j=0; j<g->value_count; j++ )
+				{
+					if(! MISSING_VALUE(g->values[j]))
+					{
+						double e = exp(g->values[j]);
+						double a = (C11 + C21)/2.0;
+						double b = (C12 + C22)/2.0;
+						h->values[j] = a + b * e;
+					}
+					else
+					{
+						SetFieldElementToMissingValue (h, j);
+					}
+				}
+			else
+				for( size_t j=0; j<g->value_count; j++ )
+				{
+					if (!MISSING_VALUE(g->values[j]))
+					{
+						double e = exp(g->values[j]);
+						double pkpd = C21 + C22 * e;
+						double pkmd = C11 + C12 * e;
+						double dpg  = pkpd - pkmd;
+						h->values[j] = dpg;
+					}
+					else
+					{
+						SetFieldElementToMissingValue (h, j);
+					}
+				}
+
+
+			/*int err = */grib_set_long( h->handle, "level", (long)level );
+
+			add_field(z,h);
+		}
+
+		delete F_g;
+		release_field(g);
+	}
+
+	delete [] levels;
+
+	Value r(z);
+
+	if(n != v->count)
+		 return Error("pressure/thickness: Not all fields are LSNP");
+	if(m)
+		 return Error("pressure/thickness: Not all fields are model level");
+	if(l)
+		 return Error("pressure/thickness: Not all fields are lat/long");
+
+
+	return r;
+
+#if 0
+	fieldset *v;
+	int *levels = 0;
+	int n = 0, l = 0, m = 0;
+	int count;
+
+
+	arg[0].GetValue(v);
+
+	if(arity == 2)
+	{
+		CList *l;
+		int i;
+		switch(arg[1].GetType())
+		{
+			case tnumber:
+				count = 1;
+				levels = new int[1];
+				arg[1].GetValue(levels[0]);
+				break;
+
+			case tlist:
+				arg[1].GetValue(l);
+				count = l->Count();
+				levels = new int[count];
+				for(i = 0;i<count;i++)
+					(*l)[i].GetValue(levels[i]);
+				break;
+
+			case tgrib:
+				fieldset *w;
+				arg[1].GetValue(w);
+
+				count = w->count;
+				levels = new int[w->count];
+
+				for(i = 0; i < w->count ;i++)
+				{
+					field *g = get_field(w,i,expand_mem);
+					gribsec1   *s1  = (gribsec1*)&g->ksec1[0];
+					gribsec2_ll *s2 = (gribsec2_ll*) &g->ksec2[0];
+					if(s2->data_rep   != GRIB_LAT_LONG)    l++;
+					if(s1->level_type != GRIB_MODEL_LEVEL) m++;
+					levels[i] = (int)s1->top_level;
+					release_field(g);
+				}
+				break;
+		}
+	}
+
+
+	fieldset *z = new_fieldset(0);
+
+
+	for(int i = 0; i < v->count ;i++)
+	{
+		field *g        = get_field(v,i,expand_mem);
+		gribsec1   *s1  = (gribsec1*)&g->ksec1[0];
+		gribsec2_ll *s2 = (gribsec2_ll*) &g->ksec2[0];
+		int    levcount = (int)s2->vertical/2;
+
+		fortfloat *aa   = &g->rsec2[10];
+		fortfloat *bb   = &g->rsec2[10 + levcount];
+
+		if(s1->parameter  == 152)              n++;
+		if(s2->data_rep   != GRIB_LAT_LONG)    l++;
+		if(s1->level_type != GRIB_MODEL_LEVEL) m++;
+
+		if(arity == 1)
+		{
+			delete[] levels;
+
+			count = levcount - 1;
+			levels = new int[count];
+			for(int k = 0;k<count;k++)
+				levels[k] = k+1;
+		}
+
+		for(int k = 0 ; k < count; k++)
+		{
+			int level = levels[k];
+			int j;
+
+			field *h = copy_field(g,false);
+
+			if(pressure)
+				for(j=0;j<g->sec4len;j++)
+				{
+					if (!MISSING_VALUE(g->rsec4[j]))
+					{
+						double e = exp(g->rsec4[j]);
+						double a = (aa[level] + aa[level-1])/2.0;
+						double b = (bb[level] + bb[level-1])/2.0;
+						h->rsec4[j] = a + b * e;
+					}
+					else
+					{
+						SetFieldElementToMissingValue (h, j);
+					}
+				}
+			else
+				for(j=0;j<g->sec4len;j++)
+				{
+					if (!MISSING_VALUE(g->rsec4[j]))
+					{
+						double e = exp(g->rsec4[j]);
+						double pkpd = aa[level]   + bb[level]   * e;
+						double pkmd = aa[level-1] + bb[level-1] * e;
+						double dpg  = pkpd - pkmd;
+						h->rsec4[j] = dpg;
+					}
+					else
+					{
+						SetFieldElementToMissingValue (h, j);
+					}
+				}
+
+
+			gribsec1   *s1  = (gribsec1*)&h->ksec1[0];
+			s1->top_level = level;
+
+			add_field(z,h);
+		}
+
+		release_field(g);
+	}
+
+	delete[] levels;
+
+	Value r(z);
+
+	if(n != v->count)
+		 return Error("pressure/thickness: Not all fields are LSNP");
+	if(m)
+		 return Error("pressure/thickness: Not all fields are model level");
+	if(l)
+		 return Error("pressure/thickness: Not all fields are lat/long");
+
+
+	return r;
+#endif
+}
+
+//=============================================================================
+
+class UniThicknessAndPressureFunction : public Function {
+	boolean pressure;
+	int arity_;
+	int lnsp_;
+public:
+	UniThicknessAndPressureFunction(const char *n,boolean p) : Function(n),pressure(p)
+	{info = "Create fields of pressure or thickness (accepts several grid types)";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int UniThicknessAndPressureFunction::ValidArguments(int arity_in,Value *arg)
+{
+	CList *l;
+	int i;
+
+	arity_ = arity_in;     //-- we may change the-number-of-parameters value!
+	lnsp_  = 152;          //-- default ECMWF 'lnsp' code value, in table 2 version 128
+
+	if(arity_<1)
+	   return false;
+
+	if(arity_ > 0)
+	{
+	   if(arg[0].GetType() != tgrib)
+	      return false;
+
+	   if( arity_ > 1 )    //-- if 'lnsp' code given, it is the last param and a number
+	   {
+	      if( arg[arity_-1].GetType() == tnumber ) //-- 'arity_-1' = last index
+	      {
+	         arg[arity_-1].GetValue(lnsp_);
+	         --arity_;     //-- lnsp stored, ignore from now on
+	      }
+	   }
+	}
+
+	if( arity_ > 2 )
+		return false;
+
+	if( arity_ == 2 )
+	{
+		switch(arg[1].GetType())
+		{
+			case tgrib:
+				break;
+
+			case tlist:
+				arg[1].GetValue(l);
+				if(l->Count() < 1)
+					return false;
+				for(i = 0;i<l->Count();i++)
+					if((*l)[i].GetType() != tnumber)
+						return false;
+				break;
+
+			case tnumber:
+				return false; //-- cannot be 'lnsp' number any more
+
+			default:
+				return false;
+		}
+	}
+
+	return true;
+}
+
+Value UniThicknessAndPressureFunction::Execute(int, Value* arg)
+{
+	fieldset* v;
+	int* levels = 0;
+	int  count;
+
+
+	arg[0].GetValue(v);
+
+	if(arity_ == 2)
+	{
+		CList *l;
+		int i;
+		switch(arg[1].GetType())
+		{
+			case tlist:
+				arg[1].GetValue(l);
+				count = l->Count();
+				levels = new int[count];
+				for(i = 0;i<count;i++)
+					(*l)[i].GetValue(levels[i]);
+				break;
+
+			case tgrib:
+				fieldset *w;
+				arg[1].GetValue(w);
+
+				count = w->count;
+				levels = new int[w->count];
+
+				for(i = 0; i < w->count ;i++)
+				{
+					field *g = GetIndexedFieldWithAtLeastPackedMem(w,i);
+					auto_ptr<MvField> fld( new MvField( g ) );
+					levels[i] = (int)fld->level();
+					release_field(g);
+				}
+				break;
+		}
+	}
+
+
+	fieldset *z = new_fieldset(0);
+
+
+	for(int i = 0; i < v->count ;i++)
+	{
+	   auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+	   if(! grd->isValid() )
+	      return Error( "unipressure/unithickness: cannot process this type of grid!" );
+	  long param = grd->getLong(parameterKey);
+	  if( param != lnsp_ )
+	      return Error( "unipressure/unithickness: lnsp [%d] required, found %d", lnsp_, param );
+
+	   int  levcount = (int)grd->vertCoordCoefPairCount();
+
+	   if(arity_ == 1)
+	   {
+		delete [] levels;
+		count = levcount - 1;
+		levels = new int[count];
+		for(int k = 0;k<count;k++)
+			levels[k] = k+1;
+	   }
+
+	   field* g = get_field(v,i,expand_mem);
+
+	   for(int k = 0 ; k < count; k++)
+	   {
+		int level = levels[k];
+		if( level < 1 || level >= levcount )
+		   return Error( "unipressure/unithickness: non-existing level %d!", level );
+
+		grd->init();
+
+		field* h = copy_field(g,false);
+		auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
+
+		double a1, b1, a0, b0;
+		if( ! grd->vertCoordCoefs( a1, b1, level ) )
+		    return Error( "unipressure/unithickness: no coefficients for level %d!"
+		                , level );
+		if( ! grd->vertCoordCoefs( a0, b0, level-1 ) )
+		    return Error( "unipressure/unithickness: no coefficients for level %d!"
+		                , level-1 );
+
+		if(pressure)
+		{
+			double a = (a1 + a0)/2.0;
+			double b = (b1 + b0)/2.0;
+
+			for(int j=0;j<grd->length();j++)
+			{
+				if( grd->hasValue() )
+				{
+					double e = exp( grd->value() );
+					grdOut->value( a + b * e );
+				}
+				else
+				{
+					grdOut->value( grd->missingValue() );
+				}
+				grd->advance();
+				grdOut->advance();
+			}
+		}
+		else
+		{
+			for(int j=0;j<grd->length();j++)
+			{
+				if ( grd->hasValue() )
+				{
+					double e = exp( grd->value() );
+					double pkpd = a1 + b1 * e;
+					double pkmd = a0 + b0 * e;
+					double dpg  = pkpd - pkmd;
+					grdOut->value( dpg );
+				}
+				else
+				{
+					grdOut->value( grd->missingValue() );
+				}
+				grd->advance();
+				grdOut->advance();
+			}
+		}
+
+		//-- PARAMETER CODE VALUE NEEDS TO BE CHANGED TOO!!!
+#if 0
+		//-- change parameter code number for the new computed fields
+		gribsec1* s1  = (gribsec1*)&h->ksec1[0];
+		s1->top_level = level;
+		if( pressure )
+		{                       //-- change parameter to 'pressure':
+		   s1->parameter =  54; //-- 'pressure' is parameter 54 ...
+		   s1->version   = 128; //-- ... in GRIB-Table-2 version 128
+		}
+		else
+		{
+		   //-- is there a param code for thickness? (i have not found one)
+		   s1->parameter =  54; //-- use 'pressure' again...
+		   s1->version   = 128;
+		}
+#else
+		//-- Q&D: this may/will not work for GRIB2:
+		grdOut->setLong(parameterKey,54);
+		grdOut->setLong("level",(long)level);
+#endif
+		add_field(z,h);
+	   }
+
+	   release_field(g);
+	}
+
+	delete [] levels;
+
+	Value r(z);
+
+	return r;
+}
+
+
+//=============================================================================
+
+/*******************************************************************************
+ *
+ * Class        : DataInfoFunction : Function
+ *
+ * Description  : Macro function that returns information about the missing
+ *                values in a fieldset.
+ *
+ ******************************************************************************/
+
+
+class DataInfoFunction : public Function {
+public:
+	DataInfoFunction (const char *n) : Function(n)
+	{info = "Returns information on missing values in fieldsets";}
+	virtual Value Execute        (int arity, Value *arg);
+	virtual int   ValidArguments (int arity, Value *arg);
+};
+
+
+int DataInfoFunction::ValidArguments(int arity,Value *arg)
+{
+	/* We accept only a fieldset as a single argument */
+
+	if ((arity == 1) && arg[0].GetType() == tgrib)
+		return true;
+	else
+		return false;
+}
+
+
+Value DataInfoFunction::Execute(int /*arity*/,Value *arg)
+{
+	fieldset *fs;
+	field    *f;
+	request  *r;
+	CList    *list;
+	int       nNumPresent;
+	int       nNumMissing;
+	double    dProportionPresent;
+	double    dProportionMissing;
+	int       nNumFields;
+	int       i;
+    size_t    j;
+
+
+	arg[0].GetValue(fs);
+
+
+	// note the number of fields and create a list to hold the result
+
+	nNumFields = fs->count;
+
+	list = new CList (nNumFields);
+
+
+	// loop through the fields, noting the statistics for each one
+
+	for (i = 0; i < nNumFields; i++)
+	{
+		f = get_field (fs, i, expand_mem);
+		r = empty_request (NULL);
+
+		nNumPresent = 0;
+		nNumMissing = 0;
+		dProportionPresent = 0.0;
+		dProportionMissing = 0.0;
+
+		// If field has missing values, then we need to check them all
+
+		if (FIELD_HAS_BITMAP(f))
+		{
+			for (j = 0; j < f->value_count; j++)
+			{
+				if (MISSING_VALUE(f->values[j]))
+					nNumMissing++;
+				else
+					nNumPresent++;
+			}
+
+			if (f->value_count != 0)
+			{
+				dProportionPresent = (double) nNumPresent / f->value_count;
+				dProportionMissing = (double) nNumMissing / f->value_count;
+			}
+		}
+
+		else
+		{
+			// field has no missing values - we can take a shortcut
+
+			nNumPresent        = f->value_count;
+			nNumMissing        = 0;
+			dProportionPresent = 1.0;
+			dProportionMissing = 0.0;
+		}
+
+		release_field(f);
+
+
+		// store that field's statistics definintion in a list
+
+		set_value(r, "index",              "%d", i + 1);
+		set_value(r, "number_present",     "%d", nNumPresent);
+		set_value(r, "number_missing",     "%d", nNumMissing);
+		set_value(r, "proportion_present", "%g", dProportionPresent);
+		set_value(r, "proportion_missing", "%g", dProportionMissing);
+
+		(*list)[i] = Value (r);
+	}
+
+
+	return Value(list);
+}
+
+
+//=============================================================================
+
+
+class GribMatrixFunction : public Function {
+public:
+	GribMatrixFunction (const char *n) : Function(n,1,tgrib)
+	{ info = "Convert a fieldset to a matrx";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value GribMatrixFunction::Execute(int,Value *arg)
+{
+    fieldset *v;
+    CList *l;
+    CMatrix *m;
+    int fields_processed = 0;
+
+    arg[0].GetValue(v);
+
+    if( v->count > 1)
+        l = new CList(v->count);
+
+
+
+    for(int i = 0; i < v->count ;i++)
+    {
+        field *g = get_field(v,i,expand_mem);
+	//gribsec2_ll *s2 = (gribsec2_ll*) &g->ksec2[0];
+        auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
+        string gridType = grd->gridType();
+
+        if ((gridType != cLatLonGrid) && (gridType != cSatelliteImage))
+        {
+			marslog(LOG_WARN,
+                    "Warning: matrix() function only works on regular grids. Field %d (indexes start at 1) has grid of type %s and will not be processed.",
+                    i+1, gridType.c_str());
+            continue;
+        }
+
+        //int x = (int)s2->points_meridian;
+        //int y = (int)s2->points_parallel;
+        int x = (int)grd->getLong("numberOfPointsAlongAParallel");
+        int y = (int)grd->getLong("numberOfPointsAlongAMeridian");
+
+        m = new CMatrix(y, x);
+
+        for(int ix = 0; ix < x; ix++)
+            for(int iy = 0; iy < y; iy++)
+                (*m)(iy, ix) = g->values[ix + iy*x];
+
+        if( v->count > 1)
+            (*l)[i] = Value(m);
+        release_field(g);
+
+        fields_processed++;
+    }
+
+    if (fields_processed > 0)
+    {
+
+    if( v->count > 1)
+        return Value(l);
+
+    return Value(m);
+}
+    else
+    {
+        return Value(); // nil
+    }
+}
+
+//=============================================================================
+
+class GribDirectionFunction : public Function
+{
+ public:
+  GribDirectionFunction (const char *n)
+    : Function(n,2,tgrib,tgrib) { info = "Compute direction using U and V"; }
+  virtual Value Execute(int arity, Value* arg);
+};
+
+Value GribDirectionFunction::Execute(int /*arity*/,Value *arg)
+{
+  //-- code copied from function 'xy2sd' in MagicsCalls.cc --//
+
+  const double cRad2Deg  = 180/M_PI;
+  const double cEpsilon  = 0.00001;
+  const double c270inRad = 270/cRad2Deg;
+
+  fieldset* u;  arg[0].GetValue(u);
+  fieldset* v;  arg[1].GetValue(v);
+
+  if( u->count != v->count )
+    return Error( "direction: U and V: different number of fields!" );
+
+  fieldset* dir = copy_fieldset(u,u->count,false);
+
+  for(int i = 0; i < u->count ;i++)
+    {
+      auto_ptr<MvGridBase> gu( MvGridFactory( u->fields[i] ) );
+      if( gu->gridType() == "NA" )
+	return Error( "direction: U: cannot process this type of field!" );
+
+      auto_ptr<MvGridBase> gv( MvGridFactory( v->fields[i] ) );
+      if( gv->gridType() == "NA" )
+	return Error( "direction: V: cannot process this type of field!" );
+
+      if( ! gu->isEqual( gv.get() ) )
+	return Error( "direction: U and V: different grids!" );
+
+      auto_ptr<MvGridBase> gdir( MvGridFactory( dir->fields[i] ) );
+
+      for( int j=0; j < gu->length(); ++j )
+	{
+	  double u = gu->value();
+	  double v = gv->value();
+
+	  //double s = sqrt( u*u + v*v ); //this would be for speed
+	  double d = 0;
+
+	  if( fabs(u) < cEpsilon )          //-- v only: North or South
+	    {
+	      if( v > 0 )
+		d = M_PI;                   //-- from South
+	      else
+		d = 0;                      //-- from North
+	    }
+	  else
+	    {
+	      d = atan( v/fabs(u) );        //-- ok for Westerly winds
+	      if( u < 0 )
+		{
+		  d = M_PI - d;             //-- fix for Easterly winds
+		}
+
+	      d = c270inRad - d;            //-- rotate 0 from North & reverse direction
+	    }
+
+	  d *= cRad2Deg;                    //-- rad-to-degrees
+	  gdir->value( d );
+
+	  gu->advance();                    //-- next grid point
+	  gv->advance();
+	  gdir->advance();
+	}
+
+      //dir->fields[i]->ksec1[0] =  2;        //-- GRIB Table 2 version: version 2 (WMO)
+      //dir->fields[i]->ksec1[5] = 31;        //-- Wind direction in Table 2 version 2
+      //gdir->setLong( "gribTablesVersionNo", 2 );  // not necessary
+      gdir->setLong( parameterKey, 31 );
+    }
+
+  return Value(dir);
+}
+
+//=============================================================================
+
+class MeanEwFunction : public Function {
+public:
+	MeanEwFunction (const char *n) : Function(n,1,tgrib)
+		{ info = "Generate a fieldset out of East-West means"; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value MeanEwFunction::Execute(int,Value *arg)
+{
+	fieldset *v;
+	arg[0].GetValue(v);
+
+	fieldset *z = copy_fieldset(v,v->count,false);
+
+	for( int i = 0; i < v->count; i++ )
+	  {
+	    auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+
+	    if(! grd->hasLocationInfo() )
+	      return Error( "mean_ew: unimplemented grid type: %s", grd->gridType().c_str() );
+
+	    if( grd->gridType() != cLatLonGrid &&
+		grd->gridType() != cMercatorGrid &&
+		grd->gridType() != cGaussianGrid &&
+		grd->gridType() != cGaussianReducedGrid )
+	      return Error( "mean_ew: unsuitable grid type: %s", grd->gridType().c_str() );
+
+	    auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
+
+	    double currentLatRow = grd->lat_y();
+	    bool   cont = true;
+
+	    while( cont )
+	      {
+		double sum = 0;
+		int    cnt = 0;
+
+		//-- compute mean of one lat row --//
+		while( cont && (grd->lat_y() == currentLatRow) )
+		  {
+		    if( grd->hasValue() )
+		      {
+			//-- missing values are ignored, hopefully this is ok!
+			double val = grd->value();
+			sum += val;
+			cnt++;
+		      }
+		    cont = grd->advance();
+		  }
+
+		double meanVal = cnt ? sum/cnt : grd->missingValue();
+
+		//-- in output, fill the whole row with the mean value --//
+		bool   contNew = true;
+		while( contNew && (newGrd->lat_y() == currentLatRow) )
+		  {
+		    newGrd->value( meanVal );
+		    contNew = newGrd->advance();
+		  }
+
+		currentLatRow = grd->lat_y(); //-- next latitude row
+	      }
+	  }
+
+	return Value(z);
+}
+//=============================================================================
+
+class LatLonAverageFunction : public Function {
+
+public:
+  LatLonAverageFunction(const char *n, bool isEW) : Function(n,1,tgrib), isEW_(isEW)
+	{info = "Returns meridional or zonal averages as a list (or list of lists) of numbers.";}
+  virtual int   ValidArguments( int arity, Value *arg );
+  virtual Value Execute( int arity, Value *arg );
+
+private:
+  double area_[4];
+  double grid_;
+  bool   isEW_;
+};
+
+int
+LatLonAverageFunction::ValidArguments( int arity, Value *arg )
+{
+  if( arity != 3 )
+    return false;
+
+  if(arg[0].GetType() != tgrib)     //-- 1. argument: fieldset
+    return false;
+
+  if(arg[1].GetType() != tlist)     //-- 2. argument: list of 4 numbers
+    return false;
+
+  if(arg[2].GetType() != tnumber)   //-- 3. argument: number
+    return false;
+
+  arg[2].GetValue( grid_ );
+
+  return true;
+}
+
+Value
+LatLonAverageFunction::Execute(int,Value *arg)
+{
+                                 //-- check input parameter values
+    if( grid_ <= 0 )
+        return Error("average_xx: grid interval negative or zero");
+
+    CList *l;  arg[1].GetValue(l); //-- list of area values
+
+    if( l->Count() != 4 )
+        return Error( "average_xx: area list must contain 4 values!" );
+
+    for(int i = 0; i<l->Count(); i++)
+    {
+        if( (*l)[i].GetType() == tnumber )
+            (*l)[i].GetValue( area_[i] );
+        else
+            return Error( "average_xx: area list must contain numbers!" );
+    }
+
+    Value  lst1;                   //-- single: will store a list of numbers
+    CList *lst2 = 0;               //-- double: will store a list of lists of numbers
+
+    fieldset *fs;  arg[0].GetValue(fs);
+
+    if( fs->count > 1)
+        lst2 = new CList(fs->count); //-- list size: will store one list per each field
+
+    for( int fi = 0; fi < fs->count; fi++ ) //-- loop over fields in fieldset
+    {
+        auto_ptr<MvGridBase> grd( MvGridFactory( fs->fields[fi] ) );
+        if(! grd->hasLocationInfo() )
+            return Error( "average_xx: unimplemented grid type: %s", grd->gridType().c_str() );
+
+        vector<double> vals;
+        try
+        {
+            vals = grd->averageCalc( isEW_, area_[0], area_[1], area_[2], area_[3], grid_ );
+        }
+        catch ( MvException& e )
+        {
+            return Error( "average_xx: %s", e.what() );
+        }
+
+        int    listSize = vals.size();
+        CVector* z        = new CVector( listSize );
+
+        for( int iv=0; iv<listSize; ++iv )
+        {
+            (*z)[iv] = vals[iv];
+        }
+
+        if( fs->count > 1 )
+            (*lst2)[fi] = Value(z);
+        else
+            lst1 = Value(z);
+    }
+
+
+    if( fs->count > 1)
+        return Value(lst2);
+
+    return lst1;
+}
+
+//=============================================================================
+
+class GribFunction : public Function {
+	func *F_;
+public:
+	GribFunction(const char *n,func *f) : Function(n) { F_ = f; info = f->info;};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int GribFunction::ValidArguments(int arity,Value *arg)
+{
+	int g=0;
+	int n=0;
+	int o=0;
+
+	if(F_->arity > -1 && F_->arity != arity) return false;
+
+	for(int i=0;i<arity;i++)
+		switch(arg[i].GetType())
+		{
+			case tgrib  : g++; break;
+			case tnumber: n++; break;
+			default     : o++; break;
+		}
+
+	return (g>0) && (o==0);
+}
+
+Value GribFunction::Execute(int arity ,Value *arg)
+{
+	funcproc  f = F_->addr;
+	mathproc  d = F_->proc;
+	Value     p;
+
+	for(int i=0;i<arity;i++)
+		switch(arg[i].GetType())
+		{
+			case tgrib  :
+				fieldset *s;
+				arg[i].GetValue(s);
+				if(s == 0)
+				  return Error("GribFunction: cannot get fieldset");
+				push_named_fieldset("field",s);
+				break;
+
+			case tnumber:
+				double d;
+				arg[i].GetValue(d);
+				push_named_scalar("scalar",d);
+				break;
+		}
+
+	Math.name  = (char*)Name();
+	Math.arity = arity;
+
+	f(&Math,d);
+	variable *v = pop();
+
+	if(!v)
+	  return Error("GribFunction: error computing fields");
+
+	if(v->scalar)
+    {
+        if (v->val != mars.grib_missing_value)
+		    p = Value(v->val);
+		else
+            p = Value();  // nil
+    }
+	else
+	{
+		/* v->fs->refcnt++; */
+		p = Value(v->fs);
+	}
+
+	return p;
+}
+
+//=============================================================================
+
+class GribSetBitsFunction : public Function {
+public:
+	GribSetBitsFunction (const char *n)
+	  : Function(n,1,tnumber)
+          { info = "Sets GRIB packing bit width";}
+
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value GribSetBitsFunction::Execute(int,Value *arg)
+{
+    int  rv = mars.accuracy;
+
+    int  iv;
+    arg[0].GetValue(iv);
+    mars.accuracy = iv;
+
+    return Value( rv );
+}
+
+//=============================================================================
+//-----------------------------------------------------   to_float  (Mar06/vk)
+
+class GribIntToFloatFunction : public Function {
+public:
+	GribIntToFloatFunction (const char *n) : Function(n)
+			 { info = "Convert int GRIB to float GRIB"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+private:
+   int marsAccuracy;
+};
+
+int GribIntToFloatFunction::ValidArguments( int arity, Value* arg )
+{
+  if( arity < 1 || arity > 2 )
+     return false;
+
+  if( arg[0].GetType() != tgrib) // && arg[0].GetType() != timage)
+     return false;
+
+  if( arity == 2 && arg[1].GetType() != tnumber )
+     return false;
+
+  if( arity == 2 )                           //-- second param: bits per value
+     arg[1].GetValue( marsAccuracy );
+  else
+     marsAccuracy = -1;
+
+  return true;
+}
+
+Value GribIntToFloatFunction::Execute( int /*arity*/, Value *arg )
+{
+  fieldset *v;
+  arg[0].GetValue( v );                      //-- get parameters...
+
+  int prevAcc = mars.accuracy;
+  if( marsAccuracy > 1 )                     //-- second param: bits per value
+  {
+     mars.accuracy = marsAccuracy;
+     marslog(LOG_INFO, "float: bits-per-value requested to be %d", marsAccuracy );
+  }
+
+  fieldset* z = copy_fieldset( v, v->count, false );
+
+  for( int i = 0; i < v->count; ++i )        //-- for all fields in a fieldset
+    {
+      field *g = get_field(v,i,expand_mem);
+      auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
+      if(! grd->isValid() )
+         return Error( "float: unimplemented grid type: %s", grd->gridType().c_str() );
+
+      field *h = get_field(z,i,expand_mem);
+      auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
+      if(! grdOut->isValid() )
+         return Error( "float: unimplemented grid type: %s", grdOut->gridType().c_str() );
+
+      if( grd->getLong("integerPointValues") )   //-- if integer values
+      {
+        grdOut->setLong("integerPointValues",0);
+        grdOut->setDouble("missingValue",(double)grd->getDouble("missingValue") );
+      }
+
+      for( size_t j = 0; j < h->value_count; ++j )  //-- copy all values
+          grdOut->valueAt( j, (double)(grd->valueAt(j)) );
+
+      release_field(g);
+    }
+
+  save_fieldset(z);
+
+  mars.accuracy = prevAcc;
+
+  //-- do we need to release 'z' ???
+  return Value(z);
+}
+
+//=============================================================================
+//-----------------------------------------------------   to_int  (Jan07/fi)
+
+class GribFloatToIntFunction : public Function {
+public:
+	GribFloatToIntFunction (const char *n) : Function(n)
+			 { info = "Convert float GRIB to int GRIB"; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+private:
+   int marsAccuracy;
+};
+
+int GribFloatToIntFunction::ValidArguments( int arity, Value* arg )
+{
+  if( arity < 1 || arity > 2 )
+     return false;
+
+  if( arg[0].GetType() != tgrib) // && arg[0].GetType() != timage)
+     return false;
+
+  if( arity == 2 && arg[1].GetType() != tnumber )
+     return false;
+
+  if( arity == 2 )                           //-- second param: bits per value
+     arg[1].GetValue( marsAccuracy );
+  else
+     marsAccuracy = -1;
+
+  return true;
+}
+
+Value GribFloatToIntFunction::Execute( int /*arity*/, Value *arg )
+{
+  fieldset *v;
+  arg[0].GetValue( v );                      //-- get parameters...
+
+  int prevAcc = mars.accuracy;
+  if( marsAccuracy > 1 )                     //-- second param: bits per value
+  {
+     mars.accuracy = marsAccuracy;
+     marslog(LOG_INFO, "integer: bits-per-value requested to be %d", marsAccuracy );
+  }
+
+  fieldset* z = copy_fieldset( v, v->count, false );
+
+  for( int i = 0; i < v->count; ++i )        //-- for all fields in a fieldset
+    {
+      field *g = get_field(v,i,expand_mem);  //-- input field
+      auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
+      if(! grd->isValid() )
+         return Error( "integer: unimplemented grid type: %s", grd->gridType().c_str() );
+
+      field *h = get_field(z,i,expand_mem);  //-- output field
+      auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
+      if(! grdOut->isValid() )
+         return Error( "integer: unimplemented grid type: %s", grdOut->gridType().c_str() );
+
+      if( ! grd->getLong("integerPointValues") )  //-- if float values
+      {
+        grdOut->setLong("integerPointValues",1);  //-- change to integer values
+        grdOut->setLong("missingValue",LONG_MAX );//-- set missing value indicator
+      }
+
+      for (size_t j = 0;j < h->value_count; j++)
+      {
+        if( MISSING_VALUE(grd->valueAt(j)) )
+           grdOut->valueAt( j, (double)LONG_MAX );
+        else
+           grdOut->valueAt( j, (double)( (long)(grd->valueAt(j)) ) );
+      }
+
+      release_field(g);
+    }
+
+  save_fieldset(z);
+
+  mars.accuracy = prevAcc;
+
+  //-- do we need to release 'z' ???
+  return Value(z);
+}
+//=============================================================================
+
+class CovarianceFunction : public Function {
+	int type_;
+public:
+	CovarianceFunction(const char* n, int t) : Function(n), type_(t)
+		{ info = "Covariance/variance/std deviation/correlation for field(s)"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int CovarianceFunction::ValidArguments(int arity,Value *arg)
+{
+   if( arity < 1 )
+      return false;
+
+   if(arg[0].GetType() != tgrib)             //-- 1st always fieldset
+      return false;
+
+   if( type_ < 2 )                        //-- type_ 0 = corr_a, 1 = covar_a --//
+    {
+      if( arity < 2 || arity > 3 )
+         return false;
+
+      if(arg[1].GetType() != tgrib)          //-- 2nd is a fieldset
+         return false;
+
+      if( arity == 3 )
+       {
+         if(arg[2].GetType() != tlist)       //-- 3rd is an optional area list
+            return false;
+       }
+    }
+   else                                   //-- type_ 2 = var_a, 3 = stdev_a --//
+    {
+      if( arity > 2 )
+         return false;
+
+      if( arity == 2 )
+       {
+         if(arg[1].GetType() != tlist)       //-- 2nd is an optional area list
+            return false;
+       }
+    }
+
+   return true;
+}
+
+
+Value CovarianceFunction::Execute(int arity,Value *arg)
+{
+   string funk[5] = { "corr_a", "covar_a", "var_a", "stdev_a", "UPDATE REQUIRED!" };
+
+   double  geo[4];
+   double& n = geo[0];
+   double& w = geo[1];
+   double& s = geo[2];
+   double& e = geo[3];
+
+   n = 90;   s = -90;                        //-- default area limits = full globe
+   w =  0;   e = 360;
+
+   fieldset* v1 = 0;
+   arg[0].GetValue(v1);                      //-- 1st fieldset always
+
+   fieldset* v2 = 0;
+   if( type_ < 2 )
+      arg[1].GetValue(v2);                   //-- 2nd fieldset only for covar_a and corr_a
+
+   if( (type_ < 2 && arity == 3) || (type_ > 1 && arity == 2 ) )
+    {
+      CList* ls;
+      arg[arity-1].GetValue(ls);             //-- get area limits list if given
+      for( int i = 0; i < 4; i++ )
+         (*ls)[i].GetValue(geo[i]);
+    }
+
+   MvGeoBox geoArea( n, w, s, e );             //-- define area limits
+
+   if( type_ < 2 && (v1->count != v2->count) )
+      return Error("%s: different number of fields in input fieldsets", funk[type_].c_str());
+
+   CList* lis;
+   if( v1->count > 1 )
+      lis = new CList(v1->count);            //-- several values => return a list
+
+   double val = 0;
+
+   for( int i = 0; i < v1->count; i++ )      //-- loop all fields in fieldset(s)
+    {
+      try                                    //-- do the computations
+       {
+         if( type_ < 2 )
+            val = CovarFunc( v1->fields[i], v2->fields[i], geoArea ); //-- covar_a (corr_a)
+         else
+            val = CovarFunc( v1->fields[i], v1->fields[i], geoArea ); //-- var_a (stdev_a)
+
+         if( type_ == 0 )
+          {
+            double std1 = sqrt( CovarFunc( v1->fields[i], v1->fields[i], geoArea ) );
+            double std2 = sqrt( CovarFunc( v2->fields[i], v2->fields[i], geoArea ) );
+
+            val = val/(std1*std2);                                    //-- corr_a
+          }
+         else if( type_ == 3 )
+          {
+            val = sqrt(val);                                          //-- final stdev_a
+          }
+       }
+      catch( MvException& e )                //-- catch possible computing problems
+       {
+         return Error( "%s: %s", funk[type_].c_str(), e.what() );
+       }
+
+      if( v1->count > 1)
+         (*lis)[i] = Value(val);             //-- several values => add this value into list
+    }
+
+   if( v1->count > 1 )
+      return Value(lis);                     //-- return a list
+
+   return Value(val);                        //-- return a single value
+}
+
+//=============================================================================
+
+double CovarFunc( field* f1, field* f2, const MvGeoBox& area )
+{
+   auto_ptr<MvGridBase> grd1( MvGridFactory( f1 ) );
+   if(! grd1->hasLocationInfo() )
+      throw MvException( "Unimplemented or spectral data - unable to extract location data" );
+
+   auto_ptr<MvGridBase> grd2( MvGridFactory( f2 ) );
+   if(! grd2->hasLocationInfo() )
+      throw MvException( "Unimplemented or spectral data - unable to extract location data" );
+
+   if( ! grd1->isEqual( grd2.get() ) )
+      throw MvException( "fields are in different grids!" );
+
+   double wght  = 0;
+   double sum1  = 0;
+   double sum2  = 0;
+   double sum12 = 0;
+
+   for( int j=0; j < grd1->length(); ++j )
+    {
+      int pointOk1 = grd1->hasValue() && area.isInside( grd1->lat_y(), grd1->lon_x() );
+      int pointOk2 = grd2->hasValue() && area.isInside( grd2->lat_y(), grd2->lon_x() );
+
+      if( pointOk1 && pointOk2 )
+       {
+         double w1 = grd1->weight();
+         double v1 = grd1->value();
+         double v2 = grd2->value();
+
+         sum1  += w1*v1;
+         sum2  += w1*v2;
+         sum12 += w1*v1*v2;
+         wght  += w1;
+       }
+
+      grd1->advance();
+      grd2->advance();
+    }
+
+   if( ! wght )
+      throw MvException( "No points to compute" );
+
+   return (sum12/wght) - (sum1/wght)*(sum2/wght);
+}
+//=============================================================================
+
+CGrib::CGrib(fieldset *v) : InPool(tgrib), cube(0)
+{
+
+	static int done = 0;
+	if(!done)
+	{
+		//check_precision(); //-- was needed previously for Fortran REAL interface
+		done = 1;
+	}
+
+	save_fieldset(v);
+	fs = v;
+}
+
+CGrib::CGrib(request *r) : InPool(tgrib,r), cube(0)
+{
+	fs = request_to_fieldset(r);
+
+	// Make sure all path are temporaty
+	while(r)
+	{
+		if(get_value(r,"PATH",0))
+		{
+			const char *p = get_value(r,"TEMPORARY",0);
+			if(!p) return;
+			if(atoi(p) == 0) return;
+		}
+		r = r->next;
+	}
+
+	// We will handle the unlinking of temp file ourselves
+	if(!IsIcon())
+	{
+		IsIcon(true); // InPool won't touch the data
+		SetFileTempFlag(true);
+	}
+
+}
+
+CGrib::CGrib(const char *fname) : InPool(tgrib), cube(0)
+{
+	//fs = read_fieldset(fname,0);
+	fs = read_fieldset(FullPathName(fname).c_str(),0);
+}
+
+CGrib::~CGrib()
+{
+
+	// Check if we have more that one ref
+
+	if(fs->refcnt>1) isIcon = true;
+
+	for(int i=0;i<fs->count;i++)
+	{
+		 field *g = fs->fields[i];
+		 if(g->refcnt > 1)       isIcon = true;
+		 if(g->file && g->file->refcnt > 1) isIcon = true;
+	}
+
+	free_fieldset(fs);
+	if(cube) free_hypercube(cube);
+
+}
+
+
+void CGrib::ToRequest(request* &s)
+{
+	static request *r = 0;
+
+	free_all_requests(r);
+
+	r = fieldset_to_request(fs);
+
+	set_value(r,"_CLASS","MACRO");
+	set_value(r,"_NAME","%s",GetName());
+
+
+
+	// fieldset_to_request() sets the 'temp' member of the gribfile for each
+	// field to 'false', meaning that even if this is supposed to be a temporary
+	// file, it would not be deleted when it's finished with. We correct that here,
+	// because there is other code in place to ensure that temporary files are
+	// deleted at the right time.
+
+	// however... if the original fieldset contains more than one
+	// GRIB files (e.g. if it's the result of a merge), then
+	// fieldset_to_request will write it as a combined temporary
+	// GRIB file and set the temporary flag to 'true'. This has
+	// dangerous implications because it could then result in a
+	// 'permanent' GRIB file being deleted later on because it is
+	// marked as temporary. We check for this condition by seeing
+	// if the PATH in the resulting request matches the PATH
+	// of our original fieldset.
+
+	if (fs->count > 0)
+	{
+		char *oldPath = fs->fields[0]->file->fname;
+		if (oldPath)
+		{
+			const char *newPath = get_value(r, "PATH", 0);
+
+			// if old and new paths are the same, then reset the flag;
+			// in the case where they are not the same, then fieldset_to_request
+			// has created a temporary file with its own flag, and it will
+			// actually be this that is passed on, not our original.
+
+			if (newPath)
+			{
+				if (!strcmp(oldPath, newPath))  // path has been unaltered?
+				{
+					const char* ctemp = get_value(r,"TEMPORARY",0);
+					int itemp = atoi(ctemp);
+					if(itemp)
+					{
+						IsIcon(true); // InPool won't touch the data
+						SetFileTempFlag(true);
+					}
+				}
+			}
+		}
+	}
+
+
+
+	// Temp fix : Some one want the path, so don't delete it
+	//Attach();
+	s = r;
+}
+
+
+Content *CGrib::Clone(void)
+{
+	CGrib *g = new CGrib(merge_fieldsets(fs,0));
+	return g;
+}
+
+
+
+
+// sets the flags necessary to ensure that the physical file behind this
+// class is not deleted (if perm=true)
+
+void CGrib::SetFileTempFlag(boolean temp)
+{
+	for(int i=0;i<fs->count;i++)
+	{
+		field *g = fs->fields[i];
+		g->file->temp = temp;
+	}
+}
+
+
+//=============================================================================
+
+class FrequenciesFunction : public Function {
+
+public:
+	FrequenciesFunction (const char *n) : Function(n)
+		{ info = "Compute frequencies of a field"; };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int FrequenciesFunction::ValidArguments(int arity,Value *arg)
+{
+	int i;
+	CList *l;
+
+	// Initial checks
+	if(arity<2)
+		return false;
+	if(arg[0].GetType() != tgrib)  //fieldset
+		return false;
+	if(arg[1].GetType() != tlist)  //intervals
+		return false;
+
+	// Check area values
+	switch(arity)
+	{
+		case 3:
+			arg[2].GetValue(l);
+			if(l->Count() != 4)
+				return false;
+			for(i = 0;i<4;i++)
+				if((*l)[i].GetType() != tnumber)
+				       return false;
+
+			return true;
+
+	        case 2:
+		        return true;
+
+		default:
+			return false;
+	}
+	return true;
+}
+
+
+Value FrequenciesFunction::Execute(int arity,Value *arg)
+{
+	fieldset *v;
+	int i,j,k;
+	Value  lst1;     //single: will store a list of numbers
+	CList *lst2 = 0; //double: will store a list of lists of numbers
+
+	// Get fieldset
+	arg[0].GetValue(v);
+
+	// Get list of intervals
+	CList *l;
+	arg[1].GetValue(l);
+	int nint = l->Count();
+	vector<double> vint(nint);
+	for(i = 0;i < nint; i++)
+		(*l)[i].GetValue(vint[i]);
+
+	// Get area
+	double d[4];
+	double& n = d[0];
+	double& w = d[1];
+	double& s = d[2];
+	double& e = d[3];
+	if(arity == 2)               //default area
+	{
+		n =  90;
+		s = -90;
+		w = 0;
+		e = 360;
+	}
+	else if(arity == 3)          //area given as a list
+	{
+		arg[2].GetValue(l);
+		for(i = 0;i<4;i++)
+		      (*l)[i].GetValue(d[i]);
+	}
+        else for(i = 0; i < 4; i++)  //area given as 4 numbers
+		arg[i+1].GetValue(d[i]);
+
+	while(w > e) w -= 360.0;
+	MvGeoBox geoArea( n, w, s, e );
+
+	// Variables initialization
+	// List size: will store one list per each field
+	if( v->count > 1)
+		lst2 = new CList(v->count);
+
+        // Frequencies counter: size = number of intervals plus 1
+	vector<long> vfreq(nint+1,0L);
+
+	// Loop fieldset
+	double v1;
+	bool found;
+	for(i = 0; i < v->count ;i++)
+	{
+		auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
+		if(! grd->hasLocationInfo() )
+			return Error( "frequencies: unimplemented or spectral data - unable to extract location data" );
+
+		// loop gridpoints
+		for( j = 0; j < grd->length(); ++j )
+		{
+		       // Check if it is a valid point
+		       if ( grd->hasValue() && geoArea.isInside(grd->lat_y(),grd->lon_x()) )
+		       {
+			     // Compute frequency
+			     v1 = grd->value();
+			     found = false;
+			     for (k = 0; k < nint; k++)
+			     {
+				if ( v1 < vint[k] )
+				{
+					vfreq[k]++;
+					found = true;
+					break;
+				}
+			     }
+			     if (!found)
+				     vfreq[nint]++;
+		       }
+		       grd->advance();
+		}
+
+		// Save result
+		CList* z = new CList( nint+1 );
+		for( k = 0; k < nint+1; k++  )
+			(*z)[k] = vfreq[k];
+
+		if( v->count > 1 )
+			(*lst2)[i] = Value(z);
+		else
+			lst1 = Value(z);
+	}
+
+	if( v->count > 1)
+		return Value(lst2);
+
+	return lst1;
+}
+
+//=============================================================================
+
+static void install(Context *c)
+{
+	func *f = mars_functions();
+
+	c->AddGlobal  (new Variable("grib_missing_value", Value(mars.grib_missing_value)));
+
+	c->AddFunction(new DumpGribFunction("dumpgrib"));
+	c->AddFunction(new SortGribFunction("sort"));
+	c->AddFunction(new IntegrateFunction("integrate"));
+	c->AddFunction(new InterpolateFunction("interpolate"));
+	c->AddFunction(new NearestGridpointFunction("nearest_gridpoint",false));
+	c->AddFunction(new NearestGridpointFunction("nearest_gridpoint_info",true));
+	c->AddFunction(new AccumulateFunction("accumulate",false));
+	c->AddFunction(new AccumulateFunction("average",true));
+	c->AddFunction(new LatLonAverageFunction("average_ew",true));
+	c->AddFunction(new LatLonAverageFunction("average_ns",false));
+	c->AddFunction(new CosLatFunction("coslat"));
+	c->AddFunction(new SinLatFunction("sinlat"));
+	c->AddFunction(new GridDistanceFunction("distance"));
+	c->AddFunction(new MaskFunction("mask"));
+	c->AddFunction(new RMaskFunction("rmask"));
+	c->AddFunction(new GenerateFunction("generate"));
+	c->AddFunction(new SubGribFunction("[]"));
+	c->AddFunction(new GribMatrixFunction("matrix"));
+	c->AddFunction(new GribDirectionFunction("direction"));
+	c->AddFunction(new MeanEwFunction("mean_ew"));
+
+	c->AddFunction(new CovarianceFunction("corr_a", 0));
+	c->AddFunction(new CovarianceFunction("covar_a",1));
+	c->AddFunction(new CovarianceFunction( "var_a", 2));
+	c->AddFunction(new CovarianceFunction("stdev_a",3));
+
+	c->AddFunction(new VertIntFunction("vertint"));
+	c->AddFunction(new UniVertIntFunction("univertint"));
+	c->AddFunction(new ThicknessFunction("thickness",false));
+	c->AddFunction(new ThicknessFunction("pressure",true));
+	c->AddFunction(new UniThicknessAndPressureFunction("unithickness",false));
+	c->AddFunction(new UniThicknessAndPressureFunction("unipressure",true));
+	c->AddFunction(new GribMinMaxFunction("min",true));
+	c->AddFunction(new GribMinMaxFunction("max",false));
+	c->AddFunction(new MinMaxAreaFunction("minvalue",true));
+	c->AddFunction(new MinMaxAreaFunction("maxvalue",false));
+
+	c->AddFunction(new LookupFunction("lookup"));
+	c->AddFunction(new LookupFunction2("lookup"));
+	c->AddFunction(new FindIndexesFunction("indexes"));
+
+	c->AddFunction(new FindFunction("find"));
+	c->AddFunction(new GFindFunction("gfind"));
+
+	c->AddFunction(new GridValsFunction("values",   false));            // new version
+	c->AddFunction(new GridValsFunction("gridvals", true, "values"));   // deprecated version
+
+	c->AddFunction(new GridLatLonsFunction("latitudes", GLL_LATS, false));             // new version
+	c->AddFunction(new GridLatLonsFunction("gridlats",  GLL_LATS, true, "latitudes")); // deprecated version
+
+	c->AddFunction(new GridLatLonsFunction("longitudes", GLL_LONS, false));              // new version
+	c->AddFunction(new GridLatLonsFunction("gridlons",   GLL_LONS, true, "longitudes")); // deprecated version
+
+
+	c->AddFunction(new SetGridValsFunction("set_values",   false));                // new version
+	c->AddFunction(new SetGridValsFunction("set_gridvals", true, "set_values"));   // deprecated version
+
+#if 0
+	c->AddFunction(new SpectrumFunction("spectrum"));
+#endif
+	c->AddFunction(new DataInfoFunction("datainfo"));
+
+	for(int i = 0; f[i].name; i++)
+		c->AddFunction(new GribFunction(f[i].name,&f[i]));
+
+	c->AddFunction(new GribSetBitsFunction("gribsetbits"));
+
+	c->AddFunction(new DistributionFunction("distribution"));
+	c->AddFunction(new CubeFunction("cube"));
+
+	c->AddFunction(new GribIntToFloatFunction("float"));
+	c->AddFunction(new GribFloatToIntFunction("integer"));
+	c->AddFunction(new FrequenciesFunction("frequencies"));
+
+	c->AddFunction(new GribHeaderFunctionR("grib_get_long",   GRIB_LONG));
+	c->AddFunction(new GribHeaderFunctionR("grib_get_double", GRIB_DOUBLE));
+	c->AddFunction(new GribHeaderFunctionR("grib_get_string", GRIB_STRING));
+
+	c->AddFunction(new GribHeaderFunctionR("grib_get_long_array",   GRIB_LONG_ARRAY));
+	c->AddFunction(new GribHeaderFunctionR("grib_get_double_array", GRIB_DOUBLE_ARRAY));
+	c->AddFunction(new GribHeaderFunctionRGeneric("grib_get"));
+
+	c->AddFunction(new GribHeaderFunctionW("grib_set_long",   GRIB_LONG));
+	c->AddFunction(new GribHeaderFunctionW("grib_set_double", GRIB_DOUBLE));
+	c->AddFunction(new GribHeaderFunctionW("grib_set_string", GRIB_STRING));
+
+
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/image.cc b/src/Macro/image.cc
new file mode 100644
index 0000000..a17897f
--- /dev/null
+++ b/src/Macro/image.cc
@@ -0,0 +1,672 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- What should we do with these functions?         (vk/Sep09)
+//--
+//-- The old code used memory mapping for images, accessing each
+//-- 8-bit pixel values directly, without any need to decode.
+//-- This required 'offset' variable to tell where the data started...
+//--
+//-- With GRIB_API there is no method to get 'offset' (at least
+//-- I have not spotted such a method)...
+//--
+
+#include "macro.h"
+#include "grib_api.h"
+#include "arith.h"
+#include <math.h>
+#include <sys/types.h>
+/* Stupid hp as no extern C */
+extern "C" {
+#include <sys/mman.h>
+}
+
+//-- this one only while grib_api_port_missing() is called!
+#include "MvFieldSet.h"
+
+//-- to have an easy switch between gribex (1) and gribapi (0)
+#define USE_OLD_GRIBEX_CODE 0
+
+// 'round' clashes with math.h on hpux 11 => rename as 'l_round':
+inline long l_round(double a) { return ((long)((a) + (((a)>=0) ? 0.5 : -0.5)));}
+
+inline unsigned char scale(double d)
+{
+	d *= 255;
+	if(d<0)   d = 0;
+	if(d>255) d = 255;
+	return  (unsigned char)d;
+}
+
+inline double  scale(unsigned char c)
+{
+	return (double)c / 255.0;
+}
+
+
+class Image {
+
+	long  nx;		//-- pixels along x-axis
+	long  ny;		//-- pixels along y-axis
+	char *name;		//-- unique name for Macro prints/debugs
+	char *path;		//-- path to satellite GRIB file
+
+//-- DO WE NEED TO USE MEMORY MAPPING ALSO WITH GRIB_API????
+
+	unsigned char *buffer;	//-- memory mapped GRIB file/msg
+	unsigned char *data;	//-- data part in memory mapped GRIB msg
+	int length;		//-- length of the GRIB file/msg
+	long offset;		//-- start of data in memory mapped GRIB msg
+	size_t count;		//-- total number of pixel values
+	int mapped;		//-- OBSOLETE? only set, not checked at all!!!?
+
+	FILE *file;		//-- store file descr between Map() and Unmap()
+
+public:
+	int Count(void) { return count; };
+	int Nx(void)    { return nx; };
+	int Ny(void)    { return ny; };
+
+	void Map(void);
+	void Unmap(void);
+	unsigned char& operator [](int n)       { return data[n];      };
+	unsigned char& operator ()(int i,int j) { return data[i+nx*j]; };
+
+	const char *Path() { return path; }
+	void ToRequest(request* &);
+	Image(Image*);
+	Image(Image*,long);
+	Image(const char *p,const char *n);
+	~Image();
+
+};
+
+#if USE_OLD_GRIBEX_CODE
+//-- you also need to link with libMars-old.a !!!
+extern "C" {
+err cgribex(fortint ksec0[], fortint ksec1[], fortint ksec2[], fortfloat rsec2[], fortint ksec3[], fortfloat rsec3[], fortint ksec4[], fortfloat rsec4[], fortint sec4len, char *buffer, fortint *buflen, char *op);
+}
+#endif
+
+Image::Image(const char *p, const char *n)
+{
+#if USE_OLD_GRIBEX_CODE
+	name   = n?strcache(n):strcache(Context::UniqueName());
+	path   = strcache(p);
+	buffer = 0;
+	length = 0;
+	offset = 0;
+	mapped = 0;
+	file   = 0;
+	nx     = 0;
+	ny     = 0;
+	count  = 0;
+
+	fortint  ksec0[ISECTION_0];
+	fortint  ksec1[ISECTION_1];
+	fortint  ksec2[ISECTION_2];
+	fortfloat zsec2[RSECTION_2];
+	fortint  ksec3[ISECTION_3];
+	fortfloat zsec3[RSECTION_3];
+	fortint  ksec4[ISECTION_4];
+	fortfloat zsec4[20];
+	int   len4 = 20;
+
+	Map();
+	fortint len = length;
+    	err e = cgribex( ksec0,ksec1,
+			ksec2,zsec2, ksec3,zsec3,
+			ksec4, zsec4, len4, (char*)buffer, &len, "G");
+
+	offset = (int)ksec4[33]/8;
+	count  = (int)ksec4[0];
+	nx     = (int)ksec2[1];
+	ny     = (int)ksec2[2];
+	Unmap();
+#else
+
+	name   = n?strcache(n):strcache(Context::UniqueName());
+	path   = strcache(p);
+
+	FILE* in = fopen( path, "r" );
+	if( ! in )
+	   marslog( LOG_EROR, "Image::Image - unable to open input file" );
+
+	int ret = 0;
+	grib_handle *h = grib_handle_new_from_file( 0, in, &ret );
+	if( ! h )
+	   marslog( LOG_EROR, "Image::Image - unable to get grib_handle" );
+
+	//ret = grib_get_long( h, "x", &offset ); //-- do we need offset with grib_api???
+	//if( ! ret ) ...
+	ret = grib_get_size( h, "values", &count );
+	if( ret != 0 )
+	   marslog( LOG_EROR, "Image::Image - unable to read image size" );
+
+	ret = grib_get_long( h, "numberOfPointsAlongXAxis", &nx );
+	if( ret != 0 )
+	   marslog( LOG_EROR, "Image::Image - unable to read numberOfPointsAlongXAxis" );
+
+	ret = grib_get_long( h, "numberOfPointsAlongYAxis", &ny );
+	if( ret != 0 )
+	   marslog( LOG_EROR, "Image::Image - unable to read numberOfPointsAlongYAxis" );
+
+return;
+
+#endif
+}
+
+Image::Image(Image *i)
+{
+	name   = strcache(Context::UniqueName());
+	path   = strcache(marstmp());
+	buffer = 0;
+	length = i->length;
+	offset = i->offset;
+	count  = i->count ;
+	nx     = i->nx;
+	ny     = i->ny;
+	mapped = 0;
+
+
+	file = fopen(path,"r+");
+	fseek(file,length-1,0);
+	char c = 0;
+	fwrite(&c,1,1,file);
+	fclose(file);
+
+	Map();  i->Map();
+
+/*
+	memcpy(buffer,i->buffer,length);
+	*/
+
+	memcpy(buffer,i->buffer,offset);
+	memcpy(buffer+offset+count,
+	    i->buffer+offset+count,
+		length-offset-count);
+	Unmap(); i->Unmap();
+
+	data = buffer + offset;
+}
+
+Image::~Image()
+{
+	strfree(path);
+	strfree(name);
+}
+
+void Image::Map(void)
+{
+	file = fopen(path,"r+");
+	if(file == 0)
+		marslog(LOG_EXIT|LOG_PERR,"%s",path);
+
+	fseek(file,0,2);
+	length = (int)ftell(file);
+
+	buffer = (unsigned char*)mmap(0,length,
+		PROT_READ|PROT_WRITE,MAP_SHARED,fileno(file),0);
+
+	if(buffer == 0)
+		marslog(LOG_EXIT|LOG_PERR,"mmap");
+
+	data = buffer + offset;
+}
+
+void Image::Unmap(void)
+{
+	munmap((caddr_t)buffer,length);
+	fclose(file);
+}
+
+
+void Image::ToRequest(request* &s)
+{
+	static request *r = 0;
+	free_all_requests(r);
+	r = empty_request("IMAGE");
+	set_value(r,"PATH","%s",path);
+	set_value(r,"_NAME","%s",name);
+	set_value(r,"_CLASS","MACRO");
+	s = r;
+}
+
+int CImage::Write(FILE* f)
+{
+	return CopyFile(image->Path(),f);
+}
+
+void CImage::ToRequest(request* &s)
+{
+	image->ToRequest(s);
+	// Temp fix : Some one want the path, so don't delete it
+	Attach();
+}
+
+CImage::CImage(Image *i) : InPool(timage)
+{
+	image = i;
+}
+
+
+/*
+gribex 'g' opt:
+psec4(1)  -> ref value;
+psec4(2)  -> scale value;
+ksec4(34) -> bit pointer
+*/
+
+CImage::CImage(request *r) : InPool(timage,r)
+{
+	const char *path   = get_value(r,"PATH",0);
+	image = new Image(path,GetName());
+}
+
+CImage::~CImage()
+{
+	delete image;
+}
+
+//=============================================================
+
+class ImageConvol : public Function {
+public:
+	ImageConvol(char *n) : Function(n)
+	{info = "Applies a convolution matrix to an image.";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int  ValidArguments(int arity,Value *arg);
+};
+
+int  ImageConvol::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[0].GetType() != timage) return false;
+	if(arg[1].GetType() != tlist ) return false;
+
+	CList *l;
+	arg[1].GetValue(l);
+
+	if(l->Count() != 9) return false;
+	for(int i = 0 ; i< 9 ; i++)
+		if((*l)[i].GetType() != tnumber) return false;
+	return true;
+}
+
+Value ImageConvol::Execute(int,Value *arg)
+{
+	Image *p;
+	CList *l;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(l);
+
+	double a[9];
+
+	int n;
+	for( n = 0;n<9;n++)
+		(*l)[n].GetValue(a[n]);
+
+	double d = 0;
+	for(n = 0;n<9;n++)
+		d += a[n];
+
+	if(fabs(d) < 1e-10) d = 1;
+
+	d *= 255;
+	for(n = 0;n<9;n++)
+		a[n] /= d;
+
+	Image *q = new Image(p);
+
+	p->Map(); q->Map();
+
+	for(int i=1;i<p->Nx()-1;i++)
+		for(int j=1;j<p->Ny()-1;j++)
+			(*q)(i,j) = scale(
+
+					(*p)(i-1,j-1) * a[0] +
+					(*p)(i-1,j  ) * a[1] +
+					(*p)(i-1,j+1) * a[2] +
+					(*p)(i  ,j-1) * a[3] +
+					(*p)(i  ,j  ) * a[4] +
+					(*p)(i  ,j+1) * a[5] +
+					(*p)(i+1,j-1) * a[6] +
+					(*p)(i+1,j  ) * a[7] +
+					(*p)(i+1,j+1) * a[8]
+
+				);
+
+	p->Unmap(); q->Unmap();
+
+	return Value(new CImage(q));
+}
+
+//=============================================================
+
+class ImageLut : public Function {
+public:
+	ImageLut(char *n) : Function(n)
+	{info = "Remaps an image's pixel values.";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int  ValidArguments(int arity,Value *arg);
+};
+
+int  ImageLut::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[0].GetType() != timage) return false;
+	if(arg[1].GetType() != tlist ) return false;
+
+	CList *l;
+	arg[1].GetValue(l);
+
+	if(l->Count() != 256) return false;
+	for(int i = 0 ; i< 256 ; i++)
+	{
+		if((*l)[i].GetType() != tnumber) return false;
+		double d;
+		(*l)[i].GetValue(d);
+		if(d<0 || d > 255) return false;
+	}
+	return true;
+}
+
+Value ImageLut::Execute(int,Value *arg)
+{
+	Image *p;
+	CList *l;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(l);
+
+	unsigned char a[256];
+
+	for(int n = 0;n<256;n++)
+	{
+		double d;
+		(*l)[n].GetValue(d);
+		a[n] = (unsigned char)d;
+	}
+
+	Image *q = new Image(p);
+
+	p->Map(); q->Map();
+
+	for(int i=0;i<p->Count();i++)
+		(*q)[i] = a[ (*p)[i] ];
+
+	p->Unmap(); q->Unmap();
+
+	return Value(new CImage(q));
+}
+
+//=============================================================
+//=============================================================
+
+class ImageUnOp : public Function {
+
+	uniproc F_;
+
+public:
+	ImageUnOp(char *n,uniproc f) : Function(n,1,timage) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class ImageBinOp : public Function {
+
+	binproc F_;
+
+public:
+	ImageBinOp(char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int  ValidArguments(int arity,Value *arg);
+};
+
+class ImageMulOp : public Function {
+
+	typedef double (*binproc)(double,double);
+	binproc F_;
+
+public:
+	ImageMulOp(char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int  ValidArguments(int arity,Value *arg);
+};
+
+//=============================================================
+
+Value ImageBinOp::Execute(int,Value *arg)
+{
+
+	if(arg[0].GetType() == timage && arg[1].GetType() == timage)
+	{
+		Image *a,*b,*c;
+		arg[0].GetValue(a);
+		arg[1].GetValue(b);
+
+		c = new Image(a);
+		a->Map();b->Map();c->Map();
+		for(int i=0;i<a->Count();i++)
+			(*c)[i] = scale(F_(scale((*a)[i]),scale((*b)[i])));
+		a->Unmap();b->Unmap();c->Unmap();
+
+		return Value(new CImage(c));
+	}
+	else if(arg[0].GetType() == tnumber)
+	{
+		Image *b,*c;
+		double d;
+		arg[0].GetValue(d);
+		arg[1].GetValue(b);
+
+		c = new Image(b);
+		b->Map();c->Map();
+		for(int i=0;i<b->Count();i++)
+			(*c)[i] = scale(F_(d,scale((*b)[i])));
+		b->Unmap();c->Unmap();
+
+		return Value(new CImage(c));
+	}
+	else
+	{
+		Image *a,*c;
+		double d;
+		arg[0].GetValue(a);
+		arg[1].GetValue(d);
+
+		c = new Image(a);
+		a->Map();c->Map();
+		for(int i=0;i<a->Count();i++)
+			(*c)[i] = scale(F_(scale((*a)[i]),d));
+		a->Unmap();c->Unmap();
+
+		return Value(new CImage(c));
+	}
+
+}
+
+int ImageBinOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2 ) return false;
+
+	int image = 0;
+
+	for(int i = 0;i<arity;i++)
+		switch(arg[i].GetType())
+		{
+			case timage:
+				image++;
+				break;
+
+			case tnumber:
+				break;
+
+			default:
+				return false;
+		}
+	return image != 0;
+}
+
+Value ImageUnOp::Execute(int,Value *arg)
+{
+	Image *p;
+	arg[0].GetValue(p);
+
+	Image *q = new Image(p);
+
+	p->Map(); q->Map();
+
+	for(int i=0;i<p->Count();i++)
+		(*q)[i] = scale(F_(scale((*p)[i])));
+
+	p->Unmap(); q->Unmap();
+
+	return Value(new CImage(q));
+}
+
+int ImageMulOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity < 1) return false;
+	for(int i = 0;i<arity;i++)
+		if(arg[i].GetType() != timage)
+			return false;
+	return true;
+}
+
+Value ImageMulOp::Execute(int arity,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+
+	for(int i = 1 ; i < arity; i++)
+	{
+		double x;
+		arg[i].GetValue(x);
+		d = F_(d,x);
+	}
+
+	return Value(d);
+}
+
+//=============================================================
+
+/* height of Meteosat above earth centre devided by earth radius */
+#define MSATALT         6.610839
+
+Image::Image(Image*i,long scale)
+{
+#if USE_OLD_GRIBEX_CODE
+	fortint  ksec0[ISECTION_0];	fortint  ksec1[ISECTION_1];	fortint  ksec2[ISECTION_2];
+	fortfloat zsec2[RSECTION_2];	fortint  ksec3[ISECTION_3];	fortfloat zsec3[RSECTION_3];
+	fortint  ksec4[ISECTION_4];	fortfloat zsec4[20];		int   len4 = 20;
+
+	// Get info from gribex
+	i->Map();	fortint len = i->length;
+	cgribex( ksec0,ksec1,ksec2,zsec2,ksec3,zsec3,ksec4,zsec4,len4,(char*)i->buffer, &len,"G");
+	i->Unmap();
+
+	//Get scaled pict
+
+	/* nx/ny: number of points along x/y-axis */
+	ksec2[1] = ksec2[1] / scale;	ksec2[2] = ksec2[1];
+
+	/* dx/y-apparent diameter of the earth in grid lenght in the x/y dir */
+	double r = (M_PI/10.0)/(double)ksec2[1];
+	ksec2[6] = l_round((double)2.0*asin((double)(1.0/(double)MSATALT))/r);	ksec2[7] = ksec2[6];
+
+	/* x/yp: x/y-coordinate of sub-satellite point: ksec2[1]/2 */
+	ksec2[8] = l_round((double)ksec2[1] / (double)2.0);	ksec2[9] = ksec2[8];
+
+
+	/* # of data values in psec4: columns x rows */
+	ksec4[0]=ksec2[1]*ksec2[2];
+
+	name   = strcache(Context::UniqueName());	path   = strcache(marstmp());
+	buffer = 0;
+	count  = (int)ksec4[0];
+	length = i->length - i->count + count;
+	offset = i->offset;
+	mapped = 0;	file   = 0;
+	nx     = (int)ksec2[1];		ny = (int)ksec2[2];
+
+
+	file = fopen(path,"r+");	fseek(file,length-1,0);
+	char c = 0;
+	fwrite(&c,1,1,file);		fclose(file);
+
+	Map();  i->Map();
+
+	len = length;
+
+	len4 = count;
+	fortfloat *sec4 = new fortfloat[len4];
+
+	cgribex(ksec0,ksec1,ksec2,zsec2,ksec3,zsec3,ksec4,sec4,len4,(char*)buffer,&len,"C");
+
+	delete[] sec4;
+
+	data = buffer + offset;
+
+	for(int j = 0;j<nx;j++)
+		for(int k = 0;k<ny;k++)
+			(*this)(j,k) = (*i)(j*scale,k*scale);
+
+	Unmap(); i->Unmap();
+#else
+
+grib_api_port_missing("Image::Image(Image*,long)");
+return;
+
+#endif
+}
+
+//=============================================================
+
+class ImageReduce : public Function {
+public:
+	ImageReduce(char *n) : Function(n,2,timage,tnumber)
+	{info = "Reduces the size of an image by a given scaling factor.";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ImageReduce::Execute(int ,Value *arg)
+{
+	Image *i;
+	double d;
+	arg[0].GetValue(i);
+	arg[1].GetValue(d);
+	return Value(new CImage(new Image(i,d)));
+}
+
+//=============================================================
+
+static void install(Context *c)
+{
+
+	int i;
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new ImageBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+// Note : MulOps for BinOp
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new ImageBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+	for(i=0;UniOps[i].symb;i++)
+		c->AddFunction(new ImageUnOp(UniOps[i].symb,UniOps[i].proc ));
+
+	c->AddFunction(new ImageConvol("convolution"));
+	c->AddFunction(new ImageReduce("reduce"));
+	c->AddFunction(new ImageLut("filter"));
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/include/arith.h b/src/Macro/include/arith.h
new file mode 100644
index 0000000..064c1f4
--- /dev/null
+++ b/src/Macro/include/arith.h
@@ -0,0 +1,23 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include <math.h>
+
+typedef double (*uniproc)(double);
+typedef double (*binproc)(double,double);
+
+struct binop { char *symb; binproc proc; char *info; };
+struct mulop { char *symb; binproc proc; char *info; };
+struct uniop { char *symb; uniproc proc; char *info; };
+
+extern binop BinOps[];
+extern mulop MulOps[];
+extern uniop UniOps[];
+
diff --git a/src/Macro/include/cbufr.h b/src/Macro/include/cbufr.h
new file mode 100644
index 0000000..c1460d3
--- /dev/null
+++ b/src/Macro/include/cbufr.h
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//=============================================================================
+
+#include "Cached.h"
+#include "MvGeoPoints.h"
+
+
+class CBufr  : public InPool {
+	request *r;
+	virtual void ToRequest(request* &);
+	virtual int  Write(FILE*);
+	virtual void ToBufr(CBufr* &x)  { x = this; }
+public:
+	CBufr(request  *r);
+	CBufr(const char *name,int temp = 0);
+	~CBufr();
+
+	const char *GetFileName();
+};
+
+class CGeopts  : public InPool
+{
+
+	MvGeoPoints gpts;
+
+	request *r;
+	virtual void ToRequest(request* &);
+	virtual void ToGeopts(CGeopts*   &x) { x = this; }
+	virtual int  Write(FILE*);
+
+public:
+
+	void load(void);
+	void unload(void);
+	void sort(){ gpts.sort(); }
+	void removeDuplicates(){ gpts.removeDuplicates(); }
+	void offset( double dlat, double dlon ){ gpts.offset( dlat, dlon ); }
+
+	void SetSize(int n)        { gpts.count( n );    }
+	long Count(void)           { return gpts.count();}
+	long indexOfFirstValidPoint(void) {return gpts.indexOfFirstValidPoint();}
+	MvGeoP1& operator[](long n){ return gpts[ n ];   }
+	void SetFormat( eGeoFormat f ){ gpts.format( f );   }
+	eGeoFormat Format(void)    { return gpts.format();  }
+
+	string dbSystem() 	   { return gpts.dbSystem();}
+	string dbPath() 	   { return gpts.dbPath();}
+	string dbColumn(string c)  { return gpts.dbColumn(c);}
+	string dbColumnAlias(string c)  { return gpts.dbColumnAlias(c);}
+	const vector<string>&  dbQuery() { return gpts.dbQuery();}
+
+	CGeopts(request  *r);
+	CGeopts(long count);
+	CGeopts(CGeopts *);
+	CGeopts(fieldset*,int);
+	CGeopts(CGeopts *,fieldset*,int, bool nearest=false);
+	CGeopts(const char *name,int temp = 0);
+	~CGeopts();
+};
+
diff --git a/src/Macro/include/cnetcdf.h b/src/Macro/include/cnetcdf.h
new file mode 100644
index 0000000..2594083
--- /dev/null
+++ b/src/Macro/include/cnetcdf.h
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-*-c++-*-
+#ifndef CNETCDF_H
+#define CNETCDF_H
+#include "MvNetCDF.h"
+class request;
+class CList;
+class MvRequest;
+class CNetCDF  : public InPool 
+{
+public:
+  CNetCDF(request  *r);
+  CNetCDF(const char *name,int temp = 0,const char mode ='r');
+  ~CNetCDF();
+  const char *GetFileName();
+
+  void load(void);
+  void unload(void);
+
+  CList *Variables();
+  MvRequest Attributes(bool global);
+
+  void Current(int xx) { current_ = xx; }
+  int Current() { return current_; }
+
+  MvNcVar *GetVar()       { load(); return netCDF_->getVariable(current_ -1); }
+  MvNcVar *GetGlobalVar() { load(); return netCDF_->getVariable(-1); }  // '-1' means 'get me the global variable'
+  void Flush(Value * = 0) { netCDF_->sync(); }
+
+private:
+  request *r_;
+  MvNetCDF *netCDF_;
+  int current_;
+  char mode_;
+
+  virtual void ToRequest(request* &);
+  virtual int  Write(FILE*);
+  virtual void ToNetCDF(CNetCDF* &x)  { x = this; }
+};
+
+#endif
diff --git a/src/Macro/include/codb.h b/src/Macro/include/codb.h
new file mode 100644
index 0000000..02f1d3f
--- /dev/null
+++ b/src/Macro/include/codb.h
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef COdb_INC
+#define COdb_INC
+
+#include "Cached.h"
+
+class MvAbstractOdb;
+
+class COdb  : public InPool
+{
+	MvAbstractOdb *odb_;
+
+	request *r;
+	virtual void ToRequest(request* &);
+	virtual void ToOdb(COdb*   &x) { x = this; }
+	virtual int  Write(FILE*);
+
+public:
+
+	void load();
+	void unload();
+	//void sort(){ gpts.sort(); }
+	//void removeDuplicates(){ gpts.removeDuplicates(); }
+	//void offset( double dlat, double dlon ){ gpts.offset( dlat, dlon ); }	
+
+	MvAbstractOdb* odb() {return odb_;} 
+
+	long Count();	
+
+	//string dbSystem() 	   { return gpts.dbSystem();}
+	//string dbPath() 	   { return gpts.dbPath();}
+	//string dbColumn(string c)  { return gpts.dbColumn(c);}
+	//string dbColumnAlias(string c)  { return gpts.dbColumnAlias(c);}
+	//const vector<string>&  dbQuery() { return gpts.dbQuery();}
+
+	COdb(request  *r);
+	//COdb(long count);
+	//COdb(CGeopts *);
+	//COdb(fieldset*,int);
+	//COdb(CGeopts *,fieldset*,int, bool nearest=false);
+	COdb(const char *name,int temp = 0);
+	~COdb();
+};
+
+
+#endif
diff --git a/src/Macro/include/code.h b/src/Macro/include/code.h
new file mode 100644
index 0000000..035b7a8
--- /dev/null
+++ b/src/Macro/include/code.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _H_CODE_
+#define _H_CODE_
+
+class UserFunction : public Function {
+	virtual Value Execute(int arity,Value* arg);
+protected:
+	Context *Address;
+public:
+	UserFunction(const char *nam,Context *s) : Function (nam) { Address = s; };
+};
+
+class ObjectFunction : public UserFunction {
+	virtual Value Execute(int arity,Value* arg);
+public:
+	ObjectFunction(const char *nam,Context *s) : UserFunction (nam,s) {}
+};
+
+class ExternFunction : public UserFunction {
+	char *cmd;
+	char *file;
+
+	int    compiled;
+	int    Compile(void);
+	virtual Value Execute(int arity,Value* arg);
+public:
+	void SetCommand(const char *c,const char *f);
+	ExternFunction(const char *name,Context *s);
+	~ExternFunction();
+};
+
+class OpPop    : public Step { 
+	virtual void Print(void) { printf("pop\n"); };
+	virtual Step *Execute(void); 
+};
+
+
+class OpStore  : public Step 
+{ 
+	virtual Step *Execute(void); 
+
+protected:
+	int   Count;
+	char *Name;
+	virtual void Print(void) { printf("store %s [%d]\n",Name?Name:"(null)",Count); };
+
+public:
+	OpStore(const char *nam,int n=0) { Name = strcache(nam); Count = n;}
+	~OpStore()                { strfree(Name);                   }
+};
+
+
+class OpPush   : public OpStore { 
+
+	int type;
+
+	virtual Step *Execute(void); 
+	virtual void Print(void) { printf("push %s\n",Name?Name:"(null)"); };
+public:
+	OpPush(const char *nam,int t)  : OpStore(nam) { type=t;};
+};
+
+class OpParam  : public OpStore 
+{ 
+	virtual Step *Execute(void);
+	virtual void Print(void) { printf("param %s\n",Name?Name:"(null)"); };
+public:
+	OpParam(const char *nam) : OpStore(nam) {};
+};
+
+class OpCall  : public OpStore { 
+
+	int  Arity;
+	virtual Step *Execute(void); 
+	virtual void Print(void) { printf("call %s %d\n",Name?Name:"(null)",Arity); };
+
+public:
+	OpCall(const char *nam,int arity) : OpStore(nam) { Arity = arity; };
+};
+
+class OpGoto   : public Step 
+{ 
+	Step   *Branch;
+	virtual void Print(void) { printf("goto\n"); };
+public:
+	OpGoto() {Branch = NULL; };
+	virtual Step *Execute(void);
+	void SetBranch(Step *b) { Branch = b; }
+	virtual int Ready(void) { return Branch != NULL; };
+};
+
+class OpTest   : public OpGoto { 
+	virtual void Print(void) { printf("test\n"); };
+	virtual Step *Execute(void); 
+public:
+    bool Pass(Value &);
+};
+
+class OpReturn : public Step { 
+	virtual void Print(void) { printf("return\n"); };
+	virtual Step *Execute(void);
+};
+#endif
diff --git a/src/Macro/include/cpngjpeg.h b/src/Macro/include/cpngjpeg.h
new file mode 100644
index 0000000..8afbb9c
--- /dev/null
+++ b/src/Macro/include/cpngjpeg.h
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- cpngjpeg.h  -- Jun05/vk
+//
+//  Minimal class to plot png and jpeg images (from a file) in Import View.
+//
+//  Tested: reading a png file and plotting it in Import View - OK!
+
+
+#include <string>
+#include "Metview.h"
+#include "value.h"
+
+
+class CPngJpeg : public Content
+{
+public:
+  CPngJpeg(const char* fileName, const string& kind);
+
+  virtual void ToRequest(request* &);
+  virtual void Print();
+
+private:
+  string fileName_;
+  string kind_;
+};
diff --git a/src/Macro/include/ctable.h b/src/Macro/include/ctable.h
new file mode 100644
index 0000000..3d843bb
--- /dev/null
+++ b/src/Macro/include/ctable.h
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef CTable_INC
+#define CTable_INC
+
+#include "Cached.h"
+
+#include <MvTable.h>
+
+
+
+
+class CTable  : public InPool
+{
+
+    MvTable table_;
+
+    request *r;
+    virtual void ToRequest(request* &);
+    virtual void ToTable(CTable*   &x) { x = this; }
+    virtual int  Write(FILE*);
+
+public:
+
+    int Count(void)                      {return table_.numColumns();}
+    void load(void);
+    MvTableColumn* column (int index)    {return table_.column(index);}
+    MvTableColumn* column (string &name) {return table_.column(name);}
+    map<string, string> userMetaData()   {return table_.userMetaData();}
+
+
+    bool constructedOk(void)   {return ok_;}
+    
+
+
+/*    void unload(void);
+    void sort(){ gpts.sort(); }
+    void removeDuplicates(){ gpts.removeDuplicates(); }
+    void offset( double dlat, double dlon ){ gpts.offset( dlat, dlon ); }
+
+    void SetSize(int n)        { gpts.count( n );    }
+    long Count(void)           { return gpts.count();}
+    long indexOfFirstValidPoint(void) {return gpts.indexOfFirstValidPoint();}
+    MvGeoP1& operator[](long n){ return gpts[ n ];   }
+    void SetFormat( eGeoFormat f ){ gpts.format( f );   }
+    eGeoFormat Format(void)    { return gpts.format();  }
+
+    string dbSystem()        { return gpts.dbSystem();}
+    string dbPath()        { return gpts.dbPath();}
+    string dbColumn(string c)  { return gpts.dbColumn(c);}
+    string dbColumnAlias(string c)  { return gpts.dbColumnAlias(c);}
+    const vector<string>&  dbQuery() { return gpts.dbQuery();}
+
+    CGeopts(request  *r);
+    CGeopts(long count);
+    CGeopts(CGeopts *);
+    CGeopts(fieldset*,int);
+    CGeopts(CGeopts *,fieldset*,int, bool nearest=false);
+    CGeopts(const char *name,int temp = 0);
+    ~CGeopts();
+*/
+
+    CTable(request  *r);
+    CTable(const char *name,int temp = 0);
+    ~CTable();
+
+private:
+    bool loaded_;
+    bool ok_;      // used when the constructor detects a problem and the table is not loaded properly
+};
+
+
+#endif
diff --git a/src/Macro/include/date.h b/src/Macro/include/date.h
new file mode 100644
index 0000000..bb78a34
--- /dev/null
+++ b/src/Macro/include/date.h
@@ -0,0 +1,62 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _H_DATE_
+#define _H_DATE_
+
+class Date {
+
+static const char *stringFormat;
+static const char *numberFormat;
+
+	long julian;
+	long second;
+
+	int compare(Date& d) 
+		{ return julian!=d.julian?julian-d.julian:second-d.second;};
+public:
+	Date(double n = 0);
+	Date(long d, long t);
+	Date(const Date& d) { julian = d.julian; second = d.second;   };
+	Date(const char*);
+
+	long _julian() { return julian; };
+	long _second() { return second; };
+
+	Date   operator-(double&  );
+	Date   operator+(double&  );
+	double operator-(Date& );
+	int    operator>(Date& d)  { return compare(d) >  0; };
+	int    operator<(Date& d)  { return compare(d) <  0; };
+	int    operator>=(Date& d) { return compare(d) >= 0; };
+	int    operator<=(Date& d) { return compare(d) <= 0; };
+	int    operator==(Date& d) { return compare(d) == 0; };
+	int    operator!=(Date& d) { return compare(d) != 0; };
+
+	void Print(void);
+	int  YyMmDd(void)         { return julian_to_date(julian,false); }
+	int  YyyyMmDd(void)       { return julian_to_date(julian,true); }
+
+	int  Year(void)      { return YyyyMmDd() / 10000;       };
+	int  Month(void)     { return (YyyyMmDd() / 100) % 100; };
+	int  Day(void)       { return YyyyMmDd() % 100;         };
+	int  Hour(void)      { return second / 3600;            };
+	int  Minute(void)    { return (second / 60) %60;        };
+	int  Second(void)    { return second % 60;              };
+	int  Julian(void);
+	int  DayOfWeek(void) { return julian % 7 + 1;           };
+	void Format(const char*,char*);
+
+	static const char *StringFormat();
+	static const char *NumberFormat();
+	static const char *MonthName(int,boolean);
+	static const char *DayName(int,boolean);
+
+};
+#endif
diff --git a/src/Macro/include/macro.h b/src/Macro/include/macro.h
new file mode 100644
index 0000000..399c7e9
--- /dev/null
+++ b/src/Macro/include/macro.h
@@ -0,0 +1,280 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _H_MACRO_
+#define _H_MACRO_
+
+#include <inc_iostream.h>
+#include <stdio.h>
+#include <mars.h>
+
+#include "value.h"
+#include "node.h"
+
+static const char* M_UPLOT = "uPlotManager";
+
+class Context;
+class CObject;
+
+class Step : public Node {
+public:
+
+
+	Context      *Owner()       { return (Context*)Node::Owner(); }
+	Step         *Next()        { return (Step*)Node::Next(); }
+	virtual Step *Execute(void) { return Next();              };
+	virtual int   Ready(void)   { return 1;                   };
+
+	int ref;
+	int line;
+
+//===============================================================
+	void* operator new(size_t s)   { return fast_new(s,permanent_mem); }
+	void  operator delete(void *p) { fast_delete(p,permanent_mem);     }
+
+};
+
+//======================================================================
+
+class Function : public Node{
+
+	int   cnt;
+	vtype *types;
+
+protected:
+	const char  *info;
+
+
+	Value&    Error(const char *,...);
+
+public:
+	Context      *Owner()               { return (Context*)Node::Owner(); }
+
+	Function(const char *n, int = -1,...);
+	~Function()                         { delete[] types; }
+
+	int GetArity(void)               { return cnt; };
+	vtype *GetTypes(void)            { return types; };
+	void SetTypes(int n,vtype *t)    { delete[] types; types = t; cnt = n;};
+	void AddType(vtype t);
+	void DeprecatedMessage(bool isDeprecated, const char *oldName, const char *newName);
+
+	virtual int       ValidArguments(int,Value*);
+	virtual Value     Execute(int,Value*)        { return Value(0.0); };
+	virtual const char*     Info(void)                 { return info; }
+	virtual void      Print(void);
+	Value ToString(void);
+
+//===============================================================
+	void* operator new(size_t s)   { return fast_new(s,permanent_mem); }
+	void  operator delete(void *p) { fast_delete(p,permanent_mem);     }
+
+};
+
+class Variable : public Node {
+
+	Value     value;
+	int       export_;
+	Variable *import_;
+
+public:
+
+	Variable(const char*,Value);
+	Variable(const char*,Variable*);
+
+	void   SetValue(Value& v,int arity,Value*);
+	Value& GetValue(void);
+	void   Dump(int);
+
+	void   Export(void)       { export_ = 1;    }
+	int    IsExported(void)	  { return export_; }
+};
+
+//====================
+class Context : public Node{
+
+	void      AddNode(List &l,Node *n) { l.Append(n); n->SetOwner(this); };
+
+static List       DictionaryStack;
+static List       DictionaryCache;
+
+	Function  *FindInDictionary(const char *name,int arity,Value *arg);
+
+	List	  Methods;
+	List	  Functions;
+	List	  Fallbacks; // Functions to search last
+	List	  Handlers;
+	List	  Steps;
+	List	  Locals;
+	List	  Globals;
+	List	  Contexts;
+
+	int       inited;
+	int       oo;
+	CObject*  object;
+
+	int       error;
+	int       argn;
+	int       argc;
+	Value     *argv;
+	static  int trace;
+	static  int waitmode;   // 0=asynchronous, 1=synchronous module calls
+	static  int sendlines;  // 1=send currently-executing line number to the macro editor
+	static  int pause;      // number of seconds to wait between executing lines of code
+
+
+
+public:
+	Variable  *FindGlobal(const char *name);
+	Variable  *FindVariable(const char *name);
+	Function  *FindMethod(const char *name,int arity,Value *arg);
+	Function  *FindMethod(const char *name,int arity,Value *arg,CObject*);
+	Function  *FindFunction(const char *name,int arity,Value *arg);
+	Function  *FindFallback(const char *name,int arity,Value *arg);
+	Function  *FindLibrary(const char *name,int arity,Value *arg);
+	Function  *FindHandler(const char *name,int arity,Value *arg);
+	Value     *GetParameters(int count);
+static void    EmptyStack();
+
+
+public:
+
+static int     Trace(void)   { return trace; }
+static void    Trace(int n)  { trace = n; }
+static int     WaitMode(void)   { return waitmode; }
+static void    WaitMode(int n)  { waitmode = n; }
+static int     SendLines(void)   { return sendlines; }
+static void    SendLines(int n)  { sendlines = n; }
+static int     PauseBetweenLines(void)   { return pause; }
+static void    PauseBetweenLines(int n)  { pause = n; }
+
+	Context   *FindContext(const char *name);
+	static const char* FallBackHandler(const char *name);
+	int        HasHandler(const char *nam,int arity=0,Value *arg = NULL)
+				{ return FindHandler(nam,arity,arg) != NULL; };
+
+	int        Argc(void)  { return argc; };
+	Value      *Argv(void) { return argv; };
+
+	List       *Dictionaries(void)  { return &DictionaryStack; };
+    Function   *Macro;             // If the context is a user function
+
+	void       PushDictionary(const char *name);
+	void       PopDictionary(void);
+	void       Dump(int);
+	Value      ImportVariable(const char *name);
+	Value      ExportVariable(const char *name);
+
+static  const char    *UniqueName(void);
+static  Context *Current;          // Context beeing compiled
+static  Step    *Instruction;      // current step
+static  int     CurrentLine(void) { return Instruction?Instruction->line:0;}
+static  const char    *InitGlobals;
+static  boolean  stop;
+
+static  Value   Metview(const char *);  // Execute a metview icon
+
+	    Context(const char *name,int = 0);
+	    ~Context();
+
+
+	    Context    *Owner()   { return (Context*)Node::Owner(); }
+
+
+virtual Value   Run(const char *handler = NULL,int argc = 0,Value *argv = NULL);
+
+	    void      Store(const char*,Value,int);
+	    Value&    Fetch(const char*);
+
+	    void 	  Push(Value);
+	    Value     Pop(void);
+
+virtual void      RuntimeError(const char*,int);
+	    Value&    Error(const char *,...);
+
+static	void      Stop(void)      { stop = true; }
+static  boolean   Stopped(void)   { return stop; }
+
+	    int       GetError(void)  { return error; }
+	    void      SetError(int e) { error = e;    }
+
+		Function *WhichFunction(const char*,int,Value*,int = 0);
+	    void      CallFunction(const char*,int,int = 0);
+	    void      CallHandler(const char*,int);
+
+	    void      AddExtern(const char*name,const char*cmd);
+	    void      AddFunction(Function *f)   { AddNode(oo?Methods:Functions,f); }
+	    void      AddFallback(Function *f)   { AddNode(Fallbacks,f); }
+	    void      AddHandler(Function *f)    { AddNode(Handlers,f); }
+
+	    void      AddLocal(Variable *v)      { AddNode(Locals,v); }
+	    void      AddGlobal(Variable *v)     { AddNode(Globals,v); }
+
+virtual void      NewStep(Step *)            {};
+	    void      AddStep(Step *s)           { AddNode(Steps,s); NewStep(s); }
+	    void      AddContext(Context *c)     { AddNode(Contexts,c); }
+
+		void      AddParameter(const char*);
+
+	    Value	  NextParameter(void);
+
+		Function *FirstFunction(void) { return (Function*)Functions.Head(); };
+virtual	Step *FirstStep(void)         { return (Step*)Steps.Head(); };
+
+//===============================================================
+	void* operator new(size_t s)   { return fast_new(s,permanent_mem); }
+	void  operator delete(void *p) { fast_delete(p,permanent_mem);     }
+
+//===============================================================
+
+		CList*   GetGlobals();
+		void     SetGlobals(CList*);
+
+		CObject* GetObject()           ;
+		void     SetObject(CObject* o) { object = o; }
+
+
+};
+
+class Linkage {
+
+	typedef void (*cproc)(Context*);
+
+	Linkage *next;
+	cproc 	proc;
+
+	static Linkage *Links;
+	void Run(Context *c) { proc(c); if(next) next->Run(c);};
+
+public :
+
+
+	Linkage(cproc p)     { proc=p; next=Links; Links=this;};
+	Linkage  *Next(void) { return next; };
+
+static	void Install(Context *c)   { Links->Run(c); }
+};
+
+//======================================================================
+
+class PlotterFunction : public Function {
+
+	static char* plotter;
+        static boolean setbyuser;
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+
+public:
+	PlotterFunction(const char *n);
+	static char* Plotter();
+	static void SetPlotter( const char* p );
+	static void Init();
+};
+
+#endif
diff --git a/src/Macro/include/node.h b/src/Macro/include/node.h
new file mode 100644
index 0000000..64fa621
--- /dev/null
+++ b/src/Macro/include/node.h
@@ -0,0 +1,107 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+class List;
+
+class Node {
+	Node *owner;
+	char *name;
+	Node *next;
+
+public:
+
+	Node(const char *n = NULL)         { owner = NULL; name = strcache(n); }
+	virtual ~Node()              { strfree(name); };
+
+	Node  *Next()                { return next;  }
+	Node  *Owner()               { return owner; }
+	const char  *Name()                { return name;  }
+	void   Rename(const char*n)        { strfree(name); name = strcache(n); };
+
+	const char  *FullName(char* buf)      { 
+									*buf = 0;
+									if(owner) {
+										char b[1024];
+										strcat(buf,owner->FullName(b));
+										strcat(buf,".");
+									}
+									strcat(buf,name);
+									return buf;
+		}
+
+	void  SetOwner(Node *s)      { owner = s; }
+
+	virtual void Print(void)     {} ;
+	virtual Value ToString(void) {} ;
+
+	friend class List;
+
+	void* operator new(size_t s)   { return fast_new(s,transient_mem); }
+	void  operator delete(void *p) { fast_delete(p,transient_mem);     }
+
+};
+
+class List : public Node {
+	Node *head;
+	Node *tail;
+
+public:
+	List(const char *n = NULL) : Node(n)   { head = tail = NULL; };
+	void Append(Node *o)   { o->next = NULL;
+					if(tail) tail->next = o; else head = o; tail = o; };
+
+	void Insert(Node *o)   { o->next = head;head = o;
+					        if(tail == NULL)  tail = o; };
+
+	void Remove(Node *o)   { Node *p = head,*q = NULL;
+							while(p) { if(p == o)
+								{if(q) q->next = p->next;
+								else head = p->next;if(tail == p)
+								tail = q;
+								}; q = p;p = p->next;}};
+
+	Node *Find(const char *n,Node *from = NULL)    
+	{
+	    Node *o = from?from->next:head;
+	    while(o) 
+	    {
+		if(n == o->Name())
+		    return o;
+		o=o->next;
+	    }
+	    return NULL;
+	 }
+	void Print(void)       { Node *o = head; while(o){o->Print();o=o->next;};};
+	Node *Head()           { return head; }
+	void Empty(void)       
+				{ Node *o = head; 
+					while(o){ Node *p=o->next;delete o;o=p;}
+					head = tail = NULL;
+				};
+
+	void Save(List& l)   { l.head = head; l.tail = tail ; head = tail = NULL; };
+	void Restore(List& l){ head = l.head; tail = l.tail ; l.head=l.tail= NULL;};
+};
+
+class Cache : public List {
+
+	class CachedNode : public Node {
+	public:
+		void *data;
+		CachedNode(const char *n,void *d) : Node(n) { data = d;};
+	};
+
+public:
+	void *Find(const char *n) { CachedNode *c = (CachedNode*)List::Find(n); 
+								return c?c->data:NULL;};
+	void Set(const char *n,void *d) 
+		{ CachedNode *c; if(c = (CachedNode*)List::Find(n)) Remove(c);  
+						Append(new CachedNode(n,d)); };
+};
diff --git a/src/Macro/include/opcodes.h b/src/Macro/include/opcodes.h
new file mode 100644
index 0000000..745d700
--- /dev/null
+++ b/src/Macro/include/opcodes.h
@@ -0,0 +1,26 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#define OP_NOP		0
+#define OP_PUSH		1
+#define OP_POP		2
+#define OP_CALL		3
+#define OP_GOTO		4
+#define OP_TEST		5
+#define OP_RETURN	6
+#define OP_STORE	7
+#define OP_PARAM	8
+
+#define PUSH_NUMBER	0
+#define PUSH_IDENT	1
+#define PUSH_STRING	2
+#define PUSH_DATE   3
+#define PUSH_TIME   4
+#define PUSH_NIL    5
+#define PUSH_NEGATIVE    6
diff --git a/src/Macro/include/script.h b/src/Macro/include/script.h
new file mode 100644
index 0000000..9a73802
--- /dev/null
+++ b/src/Macro/include/script.h
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef SCRIPT_H__
+#define SCRIPT_H__
+
+//#pragma once
+
+#include "macro.h"
+#include "MvRequest.h"
+
+
+class Script : public Context {
+
+       char*   runmode;
+static char*   macropath;
+static char*   macroMainPath;
+
+public:
+
+// It contains the last macro function that has been compiled
+static void     MacroPath(const char*p) 
+		{ strfree(macropath); macropath = strcache(p); }
+static const char    *MacroPath() { return macropath; }
+
+// It contains the full path of the macro
+static void     MacroMainPath(const char*p) 
+		{ strfree(macroMainPath); macroMainPath = strcache(p); }
+static const char    *MacroMainPath() { return macroMainPath; }
+
+static Value   Driver;   //-- uPlot
+static Value   Output;   //-- PlotMod
+static Value   Device;   //-- VisMod
+static MvRequest PlotReq;	//-- Plot request
+static Script* Compiled;
+static svcid*  SvcId;
+static void    PutMessage(int,const char*);
+
+	   virtual void CompileError(const char*,int);
+	   int Compile(const char * = NULL);
+
+	   Script(const char*);
+	   ~Script();
+
+	   void SetRunMode(const char *m) { strfree(runmode);runmode = strcache(m); }
+	   const char *GetRunMode(void)   { return runmode;        }
+};
+
+//============================================================================
+
+class Terminal : public Script {
+
+	Step    *last;
+	virtual void    NewStep(Step *s);
+	virtual Step *FirstStep(void) { return last; };
+
+public:
+	Terminal(const char *n) : Script(n) {last = NULL; SetRunMode("interactive");};
+};
+
+
+//============================================================================
+
+class Module : public Script {
+
+	svc *Svc;
+	static void Serve(svcid*,request*,void*);
+
+public:
+
+	Module(const char *name);
+	void Dispatch(svcid*,request*);
+
+virtual Value   Run(const char *handler,int argc = 0,Value *argv = NULL);
+
+};
+
+//============================================================================
+
+class Compute :  public Script {
+
+	math *Math;
+
+	void rename(math*,char*,const char*);
+	void import(FILE*,math*,request*);
+	void write(FILE*,math*);
+
+
+public:
+	Compute(const char *name,request *r);	
+	~Compute();
+};
+
+//============================================================================
+class Formula :  public Script {
+public:
+	Formula(const char *name,request *r);	
+	~Formula();
+};
+
+//============================================================================
+
+class Batch : public Script {
+	svc *batch;
+	virtual void CompileError(const char*,int);
+	virtual void RuntimeError(const char*,int);
+static  void 	  BatchError(int,void*);
+public:
+	Batch(const char *name);
+	~Batch();
+};
+
+#endif
+//SCRIPT_H__
diff --git a/src/Macro/include/value.h b/src/Macro/include/value.h
new file mode 100644
index 0000000..6ce1b64
--- /dev/null
+++ b/src/Macro/include/value.h
@@ -0,0 +1,603 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef VALUE_H__
+#define VALUE_H__
+
+//#pragma once
+
+#include <inc_iostream.h>
+#include <vector>
+#include "date.h"
+/* #define USEMARS */
+
+// Define needed on Solaris
+#define vtype _vtype
+
+//GNU 2.96: type clash!
+//typedef argtype _vtype; // from mars.h
+typedef int _vtype;
+
+class Value;
+
+//=============================================================================
+
+class Notify {
+public:
+	virtual void trigger(void*) = 0;
+};
+
+class Reference {
+	int     count;
+	Notify  *notify;
+
+	void suicide()    {  if(notify) notify->trigger(this); delete this; }
+
+public:
+	int RefCount(void)        { return count;                 }
+	Reference()               { count = 0; notify = 0;        }
+	void Attach(void)         { count++;                      }
+	void Detach(void)         { 
+		if(--count <= 0) 
+			suicide();  
+	}
+	void SetNotify(Notify *n) { notify = n;                   }
+	virtual ~Reference() {};
+
+//============================================================================
+	void* operator new(size_t s)   { return fast_new(s,transient_mem); }
+	void  operator delete(void *p) { fast_delete(p,transient_mem);     }
+
+};
+
+//=============================================================================
+
+class CNil;
+class CList;
+class CGrib;
+class CImage;
+class CMatrix;
+class CVector;
+class CBufr;
+class CGeopts;
+class CFile;
+class CVis5D;
+class Image;
+class CNetCDF;
+class CTable;
+class CObject;
+#ifdef METVIEW_ODB
+class COdb;
+#endif
+
+class Content : public Reference {
+
+	// No copy
+	Content(const Content&);	
+	void operator=(const Content&);
+
+	const char *TypeName(void);
+	vtype type;
+
+	void Fail(const char *s) ;
+
+protected:
+	// Utility
+	static int  CopyFile(const char *fname,FILE *to);
+	static int  Error(const char *fmt,...);
+
+public:
+
+	static void Perl(request*);
+
+	virtual void Sync(Value*)     {};
+
+	Content(vtype t)  : type(t)     { }
+
+
+	virtual int  Write(FILE*);
+	virtual vtype GetType(const char**n) { if(n) *n = TypeName();return type; };
+//	virtual void Print(void)       { cout << form("<%s>",TypeName());};
+	virtual void Print(void)       { cout << TypeName();}
+	virtual Content* Clone(void)   { Fail("Clone");return this; };
+
+	virtual void ToNumber(double     &x) { Fail("double")   ; x=0;};
+	virtual void ToDate(Date         &x) { Fail("date")     ; x=0.0;};
+	virtual void ToString(const char*      &x) { Fail("string")   ; x=0;};
+	virtual void ToRequest(request*  &x) { Fail("request")  ; x=0;};
+	virtual void ToFieldset(fieldset*&x) { Fail("fieldset") ; x=0;};
+	virtual void ToList(CList*       &x) { Fail("list")     ; x=0;};
+	virtual void ToGrib(CGrib*       &x) { Fail("grib")     ; x=0;};
+	virtual void ToBufr(CBufr*       &x) { Fail("bufr")     ; x=0;};
+	virtual void ToGeopts(CGeopts*   &x) { Fail("geopoints"); x=0;};
+	virtual void ToImage(Image*      &x) { Fail("image")    ; x=0;};
+	virtual void ToMatrix(CMatrix*   &x) { Fail("matrix")   ; x=0;};
+	virtual void ToVector(CVector*   &x) { Fail("vector")   ; x=0;};
+	virtual void ToFile(CFile*       &x) { Fail("file")     ; x=0;};
+	virtual void ToVis5D(CVis5D*     &x) { Fail("vis5d")    ; x=0;};
+	virtual void ToNetCDF(CNetCDF*   &x) { Fail("netcdf")   ; x=0;};
+	virtual void ToTable(CTable*     &x) { Fail("table")    ; x=0;};
+	virtual void ToObject(CObject*   &x) { Fail("object")   ; x=0;};
+#ifdef METVIEW_ODB 
+	virtual void ToOdb(COdb*   &x) { Fail("odb"); x=0;};
+#endif
+	virtual void Dump(int);
+	virtual void Dump1() { Print(); }
+	virtual void Dump2() { Print(); }
+
+	int Check(int,Value&,int,Value*,vtype,int,...);
+	virtual void SetSubValue(Value&,int,Value*) { Fail("Index");};
+	//
+};
+
+//=============================================================================
+// Classes that are in pool, like grib or other
+
+class InPool : public Content {
+
+protected:
+	boolean isIcon; // If it is an icon form MetviewUI
+	char    *iconName;
+
+public:
+
+	InPool(vtype t,request *r);
+	InPool(vtype t,const char    *n = NULL);
+	~InPool();
+
+	//SetName(char *n);
+	const char *GetName(void)    { return iconName;}
+	boolean IsIcon()       { return isIcon; }
+	void IsIcon(boolean n) { isIcon = n;}
+};
+
+//=============================================================================
+class CNumber : public Content {
+	double number;
+	static long sPrec;
+	static long sDefaultPrec;
+	virtual void ToRequest(request* &);
+	virtual void ToString(const char* &);
+	virtual void ToNumber(double &x) { x = number; };
+//	virtual void Print(void)  { cout << form("%g",number); };
+	virtual void Print(void); //  { cout << number;            };
+	virtual int  Write(FILE*);
+public:
+	CNumber(double d) : Content(tnumber) { number = d; };
+	static void SetPrecision(long p) { sPrec = p; };
+	static long GetPrecision() { return sPrec; };
+	static long GetDefaultPrecision() { return sDefaultPrec; };
+};
+//=============================================================================
+class CDate : public Content {
+	Date date;
+	virtual void ToNumber(double &);
+	virtual void ToString(const char* &);
+	virtual void ToDate(Date &x) { x = date; };
+	virtual void Dump2();
+	virtual void Print(void)  { date.Print(); };
+public:
+	CDate(Date d) : Content(tdate) { date = d; };
+};
+//=============================================================================
+class CString : public Content {
+	char *string;
+	virtual void ToRequest(request* &);
+	virtual void ToString(const char* &x) { x = string; };
+	virtual void Print(void)  { cout << string; };
+	virtual void Dump1();
+	virtual void Dump2();
+	virtual int  Write(FILE*);
+public:
+	CString(const char* s) : Content(tstring) { string = strcache(s); };
+	~CString() { strfree(string); };
+};
+
+//=============================================================================
+// Should maybe be a InPool
+
+class CRequest : public Content
+{
+	request *r;
+	virtual void ToRequest(request* &x) { x = r; };
+	virtual void Print(void);
+	virtual void Dump2(void);
+	virtual Content *Clone(void)       { return new CRequest(r); };
+	virtual void SetSubValue(Value&,int,Value*);
+	virtual int  Write(FILE*);
+
+public:
+
+	void SetRequest(request *s)             {free_all_requests(r);
+											 r = clone_all_requests(s);};
+	request *GetRequest(void)               { return r;                  };
+	CRequest(request *s):Content(trequest)  { r = clone_all_requests(s); };
+	~CRequest()                             { free_all_requests(r);      };
+};
+
+//=============================================================================
+class CError : public Content {
+
+	err error;
+	char *msg;
+
+	virtual void Print(void);
+	virtual void ToRequest(request* &x);
+
+public:
+	CError(err e,const  char *m) : Content(terror) 
+		{ error = e; msg = strcache(m);};
+	~CError()               { strfree(msg); }
+};
+
+//=============================================================================
+class CNil : public Content {
+	 virtual void ToRequest(request* &x) { x = NULL; }
+	 virtual void Dump2();
+public:
+	CNil() : Content(tnil) {};
+};
+
+//=============================================================================
+
+class CGrib  : public InPool {
+	fieldset  *fs;
+	hypercube *cube;
+	virtual void ToFieldset(fieldset* &x) { x = fs; };
+	virtual void ToRequest(request* &);
+	virtual void ToGrib(CGrib*       &x) { x = this;};
+	virtual void Print(void);
+	virtual int  Write(FILE*);
+	virtual Content *Clone(void);
+	virtual void SetSubValue(Value&,int,Value*);
+	virtual void Dump2();
+
+
+public:
+	CGrib(const char *);
+	CGrib(request  *);
+	CGrib(fieldset  *);
+	fieldset *GetFieldset(void)       { return fs; };
+	void SetFileTempFlag(boolean);
+	~CGrib();
+	hypercube* get_cube();
+};
+
+
+//=============================================================================
+
+class Image;
+class CImage  : public InPool {
+/*
+	int   temp;
+	const char *path;
+	char *buffer;
+	long length;
+	long offset;
+	long size;
+	long width;
+	long height;
+	*/
+	Image *image;
+	virtual void ToRequest(request* &);
+	//virtual void ToImage(CImage* &x)   { x = this; };
+	virtual void ToImage(Image* &x)   { x = image; };
+	virtual int  Write(FILE*);
+public:
+	//CImage(CImage*);
+	CImage(Image*);
+	CImage(request  *r);
+	~CImage();
+};
+
+//=============================================================================
+
+class ASync : public CRequest {
+
+	friend class Value;
+
+	static void Input(svcid*,request*,void*);
+	static void Reply(svcid*,request*,void*);
+	static void Definition(svcid*,request*,void*);
+	static void Progress(svcid*,request*,void*);
+
+	boolean Ready;
+	virtual void Sync(Value*);
+	void   Print(void) { cout << "<waiting>"; };
+
+public:
+
+	static svc  *Svc;
+	static int   RequestMax;
+	static int   RequestCnt;
+	static char *Name;
+
+	static void Connect(void);
+	static void IconStatus(const char *,const char *,const char * = NULL);
+	static void Disconnect(void) { if(Svc) destroy_service(Svc); Svc = NULL;};
+	static void     Store(const char *name,request *r);
+	static request *Fetch(const char *name);
+
+	ASync(const char *n,request *s);
+	request *Wait(void);
+	void SetAttachedContent(std::vector<Content *> v) {attachedContent = v;};
+    void AvoidDuplication(Content *c);
+
+	virtual void ToRequest(request* &x) { x = Wait();};
+
+private:
+
+	// asynchronous requests require a bit more effort for cleaning up any
+	// temporary files that they use; if data is passed to another module,
+	// Macro should not delete the underlying data until it knows that the
+	// module has finished with it, ie the module has finished. So for each
+	// asynchronous request, we store a list of data (Content *) which has been
+	// passed to it; this can then be destroyed (or at least have its reference
+	// counter decremented) when the module returns. GRIB presents an additional
+	// problem because the GRIB filter module can return data which is itself
+	// dependent on the input data - we still do not deal with this correctly,
+	// so we simply allow that data to remain.
+
+	std::vector<Content *> attachedContent;
+
+};
+
+//=============================================================================
+
+class CList;
+
+//=============================================================================
+
+class Value {
+
+	Content *c;
+
+	void CleanUp(void);
+	void Copy(const Value&);
+
+	void _s(void) { c->Sync(this); }
+public:
+
+	Value()               { c = new CNil;       c->Attach(); }
+	Value(double x)       { c = new CNumber(x); c->Attach(); }
+	Value(const Date& d)  { c = new CDate(d);   c->Attach(); }
+	Value(request *r)     { c = new CRequest(r);c->Attach(); }
+	Value(fieldset *v)    { c = new CGrib(v);   c->Attach(); }
+	Value(const char *p)        { c = new CString(p); c->Attach(); }
+	Value(Content *x)     { c = x;              c->Attach(); }
+	Value(err e,const char* m)  { c = new CError(e,m);c->Attach(); }
+
+	Value(const char*,request*);
+	Value(const char*,request*,std::vector<Content *>);
+	Value(const Value&);
+	void SetContent(Content *x); 
+	void SetContent(request *r); 
+	Content *GetContent(void)  { return c; };
+
+	void Write(void)  { if(c->RefCount()>1) SetContent(c->Clone()); };
+
+	~Value();
+
+	void   Sync() { _s(); }
+
+	Value& operator=(const Value&);
+	void   SetSubValue(Value& a,int b,Value* v){Write();c->SetSubValue(a,b,v); }
+	vtype  GetType(const char**name = NULL) { _s();return c->GetType(name);};
+
+	void GetValue(int       &x) { double d;c->ToNumber(d); x = (int)d;  };
+	void GetValue(long      &x) { double d;c->ToNumber(d); x = (long)d; };
+	void GetValue(double    &x) { c->ToNumber(x);  };
+	void GetValue(Date      &x) { c->ToDate(x);    };
+	void GetValue(const char* &x) { c->ToString(x);};
+	void GetValue(request*  &x) { c->ToRequest(x); };
+	void GetValue(fieldset* &x) { c->ToFieldset(x);};
+	void GetValue(CList*    &x) { c->ToList(x);    };
+	void GetValue(CGrib*    &x) { c->ToGrib(x);    };
+	void GetValue(CBufr*    &x) { c->ToBufr(x);    };
+	void GetValue(CGeopts*  &x) { c->ToGeopts(x);  };
+	void GetValue(CMatrix*  &x) { c->ToMatrix(x);  };
+	void GetValue(CVis5D*   &x) { c->ToVis5D(x);   };
+	void GetValue(CNetCDF*  &x) { c->ToNetCDF(x);  };
+	void GetValue(CTable*   &x) { c->ToTable(x);   };
+	void GetValue(CObject*  &x) { c->ToObject(x);  };
+	void GetValue(CVector*  &x) { c->ToVector(x);  };
+	void GetValue(Image*    &x) { c->ToImage(x);   };
+	void GetValue(CFile*    &x) { c->ToFile(x);    };
+#ifdef METVIEW_ODB
+	void GetValue(COdb*  &x) { c->ToOdb(x);  };
+#endif
+	void Print(void)    { c->Print(); };
+	void Dump(int trace)     { c->Dump(trace); };
+	int  Write(FILE* f) { return c->Write(f); }
+
+	static const char *TypeName(vtype);
+	static vtype NameType(const char*);
+
+};
+
+//============================================================================
+
+class CList : public Content {
+	int    count;
+	Value *values;
+
+	void Copy(const CList&);
+	void CleanUp(void)       { delete[] values;                 };
+	virtual void ToList(CList* &x) { x = this; };
+	virtual void ToRequest(request* &);
+	virtual int  Write(FILE*);
+	virtual Content* Clone(void);
+	virtual void SetSubValue(Value&,int,Value*);
+
+public:
+
+	CList(const CList&);
+	CList& operator=(const CList&);
+
+	CList(int n) :Content(tlist)         { count = n; values = new Value[n]; };
+	~CList()                 { CleanUp();                        };
+	Value& operator[](int n) { return values[n];                 };
+
+	int    Count(void)       { return count;  };
+	Value* Values(void)      { return values; };
+	void   Add(const Value& v);
+
+	void Print(void);
+	void Dump2(void);
+};
+
+//============================================================================
+
+// A note about VECTOR_MISSING_VALUE: this is currently set to 
+// mars.grib_missing_value so that we can efficiently copy field values
+// directly to a vector without having to do any conversion on the missing
+// values. The macro functions gridvals() and set_gridvals() make this
+// assumption; therefore, if VECTOR_MISSING_VALUE is changed, then we would
+// need to revise these functions so that they consider missing values
+// more carefully. Functions that convert geopoints values into vectors
+// already have to do a conversion.
+
+#define VECTOR_MISSING_VALUE  mars.grib_missing_value
+
+class CVector : public Content {
+	int     size;
+	double *values;
+	void    Copy(const CVector&);
+	void    CleanUp(void)                 { if (values) delete[] values; };
+
+	virtual int  Write(FILE*);
+	virtual void Dump(int);
+	virtual void Print(void);
+	virtual void ToRequest(request* &);
+	virtual void ToVector(CVector* &x)    { x = this; };
+	virtual Content *Clone(void)       { return new CVector(*this); };
+	virtual void SetSubValue(Value&,int,Value*);
+
+public:
+	CVector(int n, bool zeroValues = false);
+	CVector(request *r);
+	~CVector() {  CleanUp(); }
+	CVector(const CVector& x) : Content(tvector),values(0) { Copy(x);};
+	CVector&  operator=(const CVector& x) { CleanUp(); Copy(x); return *this;};
+	void CopyValues(int targetIndex, const CVector& source, int sourceIndex, int numValues);
+	int IndexOfFirstValidValue();
+	void Resize(int newSize);
+	void Sort(char op);
+    void SortIndices(char op);
+
+	double&  operator[](int n)            { return values[n]; };
+	int      Count(void) const            { return size;      };
+
+};
+
+//============================================================================
+
+class Vis5D;
+class CVis5D : public Content {
+
+	
+	Vis5D*  vis5d;
+
+	void    Copy(const CVis5D&);
+	void    CleanUp(void);
+
+	virtual void Dump(int);
+	virtual void Print(void);
+	virtual void ToVis5D(CVis5D* &x)    { x = this; };
+	virtual Content *Clone(void)       { return new CVis5D(*this); };
+	virtual void SetSubValue(Value&,int,Value*);
+	virtual void ToRequest(request* &);
+
+public:
+
+	CVis5D(Vis5D*);
+	~CVis5D() {  CleanUp(); }
+	CVis5D(const CVis5D& x) : Content(tvis5d) { Copy(x);};
+	CVis5D&  operator=(const CVis5D& x) { CleanUp(); Copy(x); return *this;};
+	Vis5D* GetVis5D() { return vis5d; }
+
+};
+
+//============================================================================
+
+class CMatrix : public Content {
+	int     row;
+	int     col;
+	double *values;
+
+	void    Copy(const CMatrix&x);
+	void    CleanUp(void)              { delete[] values;  };
+	virtual void ToMatrix(CMatrix* &x) { x = this; };
+
+	virtual Content *Clone(void)       { return new CMatrix(*this); };
+	virtual void SetSubValue(Value&,int,Value*);
+
+public:
+	virtual void Print(void);
+	virtual void Dump(int);
+	CMatrix(int r,int c);
+	CMatrix(const CMatrix& x) : Content(tmatrix) { Copy(x);};
+	CMatrix& operator=(const CMatrix& x)   { CleanUp(); Copy(x); return *this;};
+	~CMatrix()                                   { CleanUp(); };
+
+#if 0
+	double&  operator()(int r,int c)    { return values[r+c*row]; };
+#else
+	double&  operator()(int r,int c)    { 
+	if(r<0 || r>=row) {marslog(LOG_INFO,"Bad row %d",r);abort();}
+	if(c<0 || c>=col) {marslog(LOG_INFO,"Bad col %d",c);abort();}
+	int x = r+c*row;
+	if(x < 0 || x>= row*col) {marslog(LOG_INFO,"Bad x %d",x);abort();}
+	return values[r+c*row]; };
+#endif
+	int      Row(void)                  { return row;     };
+	int      Col(void)                  { return col;     };
+	virtual int  Write(FILE*);
+};
+
+//=============================================================================
+
+class Context;
+class CObject  : public Content {
+
+	char*    name;
+	Context* context;
+
+	Value    members;
+	Value    defaults;
+	Value super();
+	Context* code() { return context; }
+
+
+
+	void SetContext(CObject*);
+	void GetContext();
+
+	// virtual void ToRequest(request* &);
+	virtual void Print(void);
+	virtual Content *Clone(void);
+	// virtual void Dump2();
+
+	virtual void ToObject(CObject*     &x) { x = this;  }
+
+public:
+	CObject(const char *,Context*);
+	~CObject();
+
+	CObject(const CObject&);
+	CObject& operator=(const CObject&);
+
+	Value Method(const char*,int,Value*);
+
+	void GetInheritance(Context**,int& count);
+};
+
+#endif
+//VALUE_H__
+
diff --git a/src/Macro/include/widgets.h b/src/Macro/include/widgets.h
new file mode 100644
index 0000000..1b35ab5
--- /dev/null
+++ b/src/Macro/include/widgets.h
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+/*
+** Generated by X-Designer 
+*/
+
+extern Widget run_top;
+extern Widget run_form;
+extern Widget run_text;
+
+extern Widget top_widget;
+extern Widget form_widget;
+extern Widget text;
+extern Widget file_menu;
+extern Widget help_button;
+extern Widget macro_menu;
+extern Widget record_menu;
+extern Widget edit_menu;
+
diff --git a/src/Macro/library.cc b/src/Macro/library.cc
new file mode 100644
index 0000000..35f3b65
--- /dev/null
+++ b/src/Macro/library.cc
@@ -0,0 +1,67 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "script.h"
+#include <unistd.h>
+
+Function  *Context::FindLibrary(const char *name,int arity,Value *arg)
+{
+  char *path = getenv("METVIEW_MACRO_PATH");
+  char buf[1024];
+
+  if(!path)
+    return 0;
+
+  Script *s = (Script*)Current;
+  while(s->Owner())
+    s = (Script*)s->Owner();
+
+  while(*path)
+    {
+      char *p = path;
+      while(*path && (*path != ':'))
+	path++;
+
+      char q = *path;
+      *path = 0;
+      sprintf(buf,"%s/%s",p,name);
+      *path = q;
+
+      if(access(buf,R_OK)==0)   //-- file exists?
+	{                       //-- yes but is it of executable type?
+
+	  //-- here we rely that 'file' returns word 'executable'
+	  //-- as part of the reply when target is a real executable
+
+	  char checkCmd[ 1024 ];
+	  sprintf( checkCmd, "file %s | grep executable", buf );
+	  int ret = system( checkCmd );
+
+	  if( access(buf,X_OK) == 0 && ret == 0 )
+	    {
+	      s->AddExtern(name,buf);  //-- A Fortran extern
+	    }
+	  else
+	    {
+	      s->Compile(buf);         //-- A script
+	    }
+
+	  Function *v = ((Context*)s)->FindFunction(name,arity,arg);
+	  if(v)
+	    return v;
+	}
+
+      if(*path)
+	path++;
+
+    }
+
+  return 0;
+}
diff --git a/src/Macro/macrol.c b/src/Macro/macrol.c
new file mode 100644
index 0000000..3e037ce
--- /dev/null
+++ b/src/Macro/macrol.c
@@ -0,0 +1,2356 @@
+
+#line 3 "lex.zz.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 33
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define zzconst const
+#else
+#define zzconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (zz_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((zz_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE zzrestart(zzin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(zz_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct zz_buffer_state *YY_BUFFER_STATE;
+#endif
+
+extern int zzleng;
+
+extern FILE *zzin, *zzout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    /* Note: We specifically omit the test for zz_rule_can_match_eol because it requires
+     *       access to the local variable zz_act. Since zzless() is a macro, it would break
+     *       existing scanners that call zzless() from OUTSIDE zzlex. 
+     *       One obvious solution it to make zz_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-zzlineno scanner, because zz_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int zzl;\
+                for ( zzl = n; zzl < zzleng; ++zzl )\
+                    if ( zztext[zzl] == '\n' )\
+                        --zzlineno;\
+            }while(0)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define zzless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up zztext. */ \
+        int zzless_macro_arg = (n); \
+        YY_LESS_LINENO(zzless_macro_arg);\
+		*zz_cp = (zz_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(zz_c_buf_p) = zz_cp = zz_bp + zzless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up zztext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) zzunput( c, (zztext_ptr)  )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef unsigned int zz_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct zz_buffer_state
+	{
+	FILE *zz_input_file;
+
+	char *zz_ch_buf;		/* input buffer */
+	char *zz_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	zz_size_t zz_buf_size;
+
+	/* Number of characters read into zz_ch_buf, not including EOB
+	 * characters.
+	 */
+	int zz_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int zz_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int zz_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int zz_at_bol;
+
+    int zz_bs_lineno; /**< The line count. */
+    int zz_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int zz_fill_buffer;
+
+	int zz_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via zzrestart()), so that the user can continue scanning by
+	 * just pointing zzin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t zz_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t zz_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * zz_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (zz_buffer_stack) \
+                          ? (zz_buffer_stack)[(zz_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (zz_buffer_stack)[(zz_buffer_stack_top)]
+
+/* zz_hold_char holds the character lost when zztext is formed. */
+static char zz_hold_char;
+static int zz_n_chars;		/* number of characters read into zz_ch_buf */
+int zzleng;
+
+/* Points to current character in buffer. */
+static char *zz_c_buf_p = (char *) 0;
+static int zz_init = 0;		/* whether we need to initialize */
+static int zz_start = 0;	/* start state number */
+
+/* Flag which is used to allow zzwrap()'s to do buffer switches
+ * instead of setting up a fresh zzin.  A bit of a hack ...
+ */
+static int zz_did_buffer_switch_on_eof;
+
+void zzrestart (FILE *input_file  );
+void zz_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE zz_create_buffer (FILE *file,int size  );
+void zz_delete_buffer (YY_BUFFER_STATE b  );
+void zz_flush_buffer (YY_BUFFER_STATE b  );
+void zzpush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void zzpop_buffer_state (void );
+
+static void zzensure_buffer_stack (void );
+static void zz_load_buffer_state (void );
+static void zz_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER zz_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE zz_scan_buffer (char *base,zz_size_t size  );
+YY_BUFFER_STATE zz_scan_string (zzconst char *zz_str  );
+YY_BUFFER_STATE zz_scan_bytes (zzconst char *bytes,int len  );
+
+void *zzalloc (zz_size_t  );
+void *zzrealloc (void *,zz_size_t  );
+void zzfree (void *  );
+
+#define zz_new_buffer zz_create_buffer
+
+#define zz_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        zzensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            zz_create_buffer(zzin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->zz_is_interactive = is_interactive; \
+	}
+
+#define zz_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        zzensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            zz_create_buffer(zzin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->zz_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->zz_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *zzin = (FILE *) 0, *zzout = (FILE *) 0;
+
+typedef int zz_state_type;
+
+#define YY_FLEX_LEX_COMPAT
+extern int zzlineno;
+
+int zzlineno = 1;
+
+extern char zztext[];
+
+static zz_state_type zz_get_previous_state (void );
+static zz_state_type zz_try_NUL_trans (zz_state_type current_state  );
+static int zz_get_next_buffer (void );
+static void zz_fatal_error (zzconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up zztext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(zztext_ptr) = zz_bp; \
+	zzleng = (size_t) (zz_cp - zz_bp); \
+	(zz_hold_char) = *zz_cp; \
+	*zz_cp = '\0'; \
+	if ( zzleng + (zz_more_offset) >= YYLMAX ) \
+		YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
+	zz_flex_strncpy( &zztext[(zz_more_offset)], (zztext_ptr), zzleng + 1 ); \
+	zzleng += (zz_more_offset); \
+	(zz_prev_more_offset) = (zz_more_offset); \
+	(zz_more_offset) = 0; \
+	(zz_c_buf_p) = zz_cp;
+
+#define YY_NUM_RULES 51
+#define YY_END_OF_BUFFER 52
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct zz_trans_info
+	{
+	flex_int32_t zz_verify;
+	flex_int32_t zz_nxt;
+	};
+static zzconst flex_int16_t zz_acclist[251] =
+    {   0,
+       52,   50,   51,   49,   50,   51,   49,   51,   43,   50,
+       51,   42,   50,   51,   50,   51,   50,   51,   50,   51,
+       47,   50,   51,   47,   50,   51,   47,   50,   51,   50,
+       51,   50,   51,   46,   50,   51,   46,   50,   51,   46,
+       50,   51,   46,   50,   51,   46,   50,   51,   46,   50,
+       51,   46,   50,   51,   46,   50,   51,   46,   50,   51,
+       46,   50,   51,   46,   50,   51,   46,   50,   51,   46,
+       50,   51,   46,   50,   51,   46,   50,   51,   46,   50,
+       51,    2,   51,    2,    3,   51,    3,   51,    2,   51,
+       49,   41,   37,   47,   47,   47,   47,   47,   40,   38,
+
+       39,   46,   46,   46,   19,   46,   46,   15,   46,   46,
+       46,   46,   46,   46,   46,    4,   46,   46,   20,   46,
+       46,   46,   46,   46,   21,   46,   16,   46,    9,   46,
+       46,   46,   46,   46,   46,   18,   46,   46,   46,    3,
+       47,   48,   47,    7,   46,   46,   46,   12,   46,   46,
+       46,   17,   46,   46,   46,   46,   46,   46,   46,   32,
+       46,    8,   46,   46,   46,   46,   46,   46,   46,   46,
+       46,   46,   46,   48,   48,   47,   22,   46,    6,   46,
+       46,   46,   46,   46,   46,   46,   46,   26,   46,   46,
+       46,   46,   46,   31,   46,   30,   46,    5,   46,   46,
+
+       27,   46,   46,   45,   46,   46,   46,   46,   46,   46,
+       46,   46,   46,   46,   46,   25,   46,   13,   46,   35,
+       46,   29,   46,   46,   14,   46,   34,   46,   46,   46,
+       33,   46,   46,   24,   46,   11,   46,   46,   28,   46,
+       36,   46,   45,   44,   10,   46,   46,   23,   46,    1
+    } ;
+
+static zzconst flex_int16_t zz_accept[195] =
+    {   0,
+        1,    1,    1,    1,    1,    2,    4,    7,    9,   12,
+       15,   17,   19,   21,   24,   27,   30,   32,   34,   37,
+       40,   43,   46,   49,   52,   55,   58,   61,   64,   67,
+       70,   73,   76,   79,   82,   84,   87,   89,   91,   92,
+       93,   94,   95,   96,   97,   97,   98,   99,  100,  101,
+      102,  103,  104,  105,  107,  108,  110,  111,  112,  113,
+      114,  115,  116,  118,  119,  121,  122,  123,  124,  125,
+      127,  129,  131,  132,  133,  134,  135,  136,  138,  139,
+      140,  141,  141,  141,  142,  142,  142,  142,  143,  144,
+      146,  147,  148,  150,  151,  152,  154,  155,  156,  157,
+
+      158,  159,  160,  162,  164,  165,  166,  167,  168,  169,
+      170,  171,  172,  173,  174,  174,  174,  175,  175,  176,
+      176,  177,  179,  181,  182,  183,  184,  185,  186,  187,
+      188,  190,  191,  192,  193,  194,  196,  198,  200,  201,
+      203,  204,  204,  205,  205,  206,  207,  208,  209,  210,
+      211,  212,  213,  214,  215,  216,  218,  220,  220,  220,
+      220,  220,  222,  224,  225,  227,  229,  230,  231,  233,
+      234,  236,  238,  238,  238,  238,  238,  239,  241,  241,
+      242,  243,  243,  244,  244,  245,  247,  248,  248,  248,
+      250,  250,  251,  251
+
+    } ;
+
+static zzconst flex_int32_t zz_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    4,    5,    1,    1,    1,    6,    1,
+        1,    7,    8,    1,    9,   10,    1,   11,   12,   13,
+       14,   15,   15,   16,   16,   16,   16,   17,    1,   18,
+       19,   20,    1,    1,   21,   21,   21,   21,   22,   21,
+       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
+       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
+        1,    1,    1,    1,   21,    1,   23,   24,   25,   26,
+
+       27,   28,   29,   30,   31,   32,   33,   34,   35,   36,
+       37,   38,   21,   39,   40,   41,   42,   21,   43,   44,
+       45,   21,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static zzconst flex_int32_t zz_meta[46] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    2,    3,    4,
+        5,    5,    5,    5,    5,    5,    6,    1,    1,    1,
+        7,    8,    7,    7,    7,    7,    8,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7
+    } ;
+
+static zzconst flex_int16_t zz_base[208] =
+    {   0,
+        0,    0,   44,   46,  485,  486,   48,   50,  486,  486,
+      477,  463,   43,   50,   52,   53,   45,  463,   70,   76,
+       25,   70,   30,   60,   61,   42,   72,   32,   74,   85,
+       87,   92,  445,   65,  486,  114,  128,  444,  130,  486,
+      486,   98,  112,  125,  128,  128,  462,  486,  486,  486,
+        0,  442,  115,  441,  104,  440,  113,  120,  121,   63,
+      439,  124,  438,  127,  133,  134,  130,  107,  136,  437,
+      436,  435,  143,  139,  138,  147,   91,  434,  146,  157,
+      183,  443,  181,  169,  186,  186,  191,  197,  204,  432,
+      188,  189,  431,  181,  192,  430,  196,  198,  193,  199,
+
+      205,  201,  429,  428,  211,  213,  215,  208,  187,  209,
+      426,  217,  423,  218,  253,  246,  252,  258,  264,  270,
+      278,  422,  418,  252,  253,  257,  267,  258,  260,  414,
+      409,  274,  265,  277,  269,  406,  401,  397,  273,  396,
+      279,  309,  412,  305,  284,  392,  290,  288,  287,  301,
+      302,  294,  296,  295,  388,  385,  384,  380,  330,  335,
+      341,  379,  375,  297,  374,  356,  331,  357,  355,  330,
+      353,  347,  348,  357,  356,  363,  328,  278,  360,  486,
+      344,  215,  486,  374,  486,  191,  354,  156,  383,  140,
+      127,  486,  486,  399,  404,  409,  414,  418,  422,  426,
+
+      433,  435,  439,  446,  450,  452,  458
+    } ;
+
+static zzconst flex_int16_t zz_def[208] =
+    {   0,
+      193,    1,  194,  194,  193,  193,  193,  193,  193,  193,
+      193,  193,  193,  195,  196,  197,  193,  193,  198,  198,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,  193,  193,  193,  193,  193,  193,
+      193,  199,  200,  197,  201,  202,   44,  193,  193,  193,
+      203,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+      193,  193,  204,  200,  205,  193,  193,  193,  206,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,  193,  193,  193,  193,  193,  193,
+       44,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,  193,  193,  193,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,  193,  193,  193,
+      193,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,  193,  193,  207,  193,   20,   20,  193,  193,
+       20,  193,  193,  193,  193,   20,   20,  193,  193,   20,
+      193,  193,    0,  193,  193,  193,  193,  193,  193,  193,
+
+      193,  193,  193,  193,  193,  193,  193
+    } ;
+
+static zzconst flex_int16_t zz_nxt[532] =
+    {   0,
+        6,    7,    8,    9,   10,    9,   11,    6,   12,   13,
+       14,   15,   15,   16,   16,   16,    6,   17,    6,   18,
+       19,   19,   20,   21,   22,   23,   24,   25,   26,   19,
+       27,   19,   19,   28,   19,   29,   30,   19,   31,   19,
+       32,   33,   34,   19,   19,   36,   37,   36,   37,   39,
+       39,   39,   39,   42,   42,   42,   42,   42,   42,   43,
+       52,   43,   43,   48,   49,   52,   56,   52,   66,   54,
+       38,   45,   38,   45,   45,   62,   45,   52,   45,   45,
+       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
+       51,   51,   55,   57,   80,   58,   52,   60,   52,   63,
+
+       52,   96,   61,   59,   67,   52,   64,   65,   69,   52,
+       68,   53,   70,   74,   75,   81,   81,  111,   76,   83,
+       71,   77,   52,   72,   83,   73,   52,   52,   78,   81,
+       81,   39,   39,   85,   43,   87,   87,   43,   85,   52,
+       90,   86,   52,   91,   86,   93,   45,  104,   52,   45,
+       52,   45,   92,  192,   45,   52,   52,  100,   94,   52,
+       98,   95,   52,  103,   99,   52,  101,  105,   52,   52,
+      102,   52,  106,   52,   52,   52,  107,  109,   52,  108,
+      110,   52,   52,  113,   81,   81,  112,  114,  116,  116,
+       45,  191,   52,  118,  118,   45,  120,  120,  120,  120,
+
+      120,   88,   88,   88,   88,   88,   88,   88,   88,   88,
+       88,   88,   88,   43,  122,  123,   52,  124,  125,  136,
+      126,  127,   52,   52,   52,   45,   52,   52,   52,  128,
+       45,   52,  129,   52,   52,  130,   52,  132,  131,  133,
+       52,  134,  137,   52,   52,  188,   52,  139,   52,  135,
+       52,  141,   52,   52,  142,  142,  117,  117,  117,  117,
+      117,  117,  117,  117,  117,  117,  117,  117,  119,  119,
+      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
+      143,  143,  143,  143,  143,  143,  144,   52,   52,  148,
+      145,  146,   52,   52,  193,   52,  149,  147,  152,  154,
+
+       52,  150,   52,  153,   52,  157,  156,  155,   52,   52,
+      142,  142,   52,   52,   52,  160,  160,  161,  161,   52,
+      164,  165,   52,   52,  162,   52,  167,  166,  168,   52,
+       52,   52,   52,  177,  169,  171,   52,   52,  170,  158,
+      174,  174,  174,  174,  174,  175,  175,  175,  175,  175,
+      175,  176,  176,  176,  176,  176,  176,  178,  179,  180,
+      181,  179,  180,  186,  184,   52,   52,  183,  183,  183,
+      183,  183,  183,  185,  185,  185,  185,  185,  185,   52,
+      190,  182,   52,  187,  189,  189,  189,  189,   52,   52,
+       52,   52,   52,  185,  185,  185,  185,  185,  185,   35,
+
+       35,   35,   35,   35,   35,   35,   35,   44,   44,   52,
+       52,   44,   46,   46,   52,  173,   46,   47,   47,   52,
+       52,   47,   52,  172,   52,   52,   42,  163,  159,   42,
+       84,   52,   52,   84,   88,   88,   52,   88,   89,   89,
+       89,   52,   89,   51,   52,   51,   51,  117,  117,  151,
+      117,  119,  119,   52,  119,  121,  121,   52,  140,  121,
+      185,  138,  185,   52,   52,   52,   52,   52,  115,   52,
+       52,   52,   52,   52,   97,   52,   52,   52,  193,   82,
+       79,   50,   41,   40,  193,    5,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+      193
+    } ;
+
+static zzconst flex_int16_t zz_chk[532] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    3,    3,    4,    4,    7,
+        7,    8,    8,   13,   13,   13,   13,   13,   13,   14,
+       21,   15,   16,   17,   17,   23,   23,   28,   28,   21,
+        3,   14,    4,   15,   16,   26,   14,   26,   15,   16,
+       19,   19,   19,   19,   19,   19,   20,   20,   20,   20,
+       20,   20,   22,   24,   34,   24,   25,   25,   60,   27,
+
+       34,   60,   25,   24,   29,   22,   27,   27,   30,   29,
+       29,   20,   30,   31,   32,   36,   36,   77,   32,   42,
+       30,   32,   31,   30,   42,   30,   77,   32,   32,   37,
+       37,   39,   39,   43,   44,   45,   45,   46,   43,   55,
+       53,   44,   68,   55,   46,   58,   44,   68,   57,   46,
+       53,   44,   57,  191,   46,   58,   59,   65,   59,   62,
+       62,   59,   64,   67,   64,   67,   65,   69,   65,   66,
+       66,   69,   73,   75,   74,  190,   74,   75,   73,   74,
+       76,   79,   76,   80,   81,   81,   79,   80,   83,   83,
+       84,  188,   80,   85,   85,   84,   86,   86,   86,   86,
+
+       86,   87,   87,   87,   87,   87,   87,   88,   88,   88,
+       88,   88,   88,   89,   91,   92,   94,   94,   95,  109,
+       97,   98,  109,   91,   92,   89,  186,   95,   99,   99,
+       89,   97,  100,   98,  100,  101,  102,  105,  102,  106,
+      101,  107,  110,  108,  110,  182,  105,  112,  106,  108,
+      107,  114,  112,  114,  115,  115,  116,  116,  116,  116,
+      116,  116,  117,  117,  117,  117,  117,  117,  118,  118,
+      118,  118,  118,  118,  119,  119,  119,  119,  119,  119,
+      120,  120,  120,  120,  120,  120,  121,  124,  125,  127,
+      124,  125,  126,  128,  121,  129,  128,  126,  132,  134,
+
+      133,  129,  127,  133,  135,  141,  139,  135,  139,  132,
+      142,  142,  134,  178,  141,  144,  144,  144,  144,  145,
+      147,  148,  149,  148,  145,  147,  150,  149,  151,  152,
+      154,  153,  164,  164,  152,  154,  150,  151,  153,  142,
+      159,  159,  159,  159,  159,  160,  160,  160,  160,  160,
+      160,  161,  161,  161,  161,  161,  161,  167,  168,  168,
+      170,  179,  179,  177,  175,  170,  167,  174,  174,  174,
+      174,  174,  174,  176,  176,  176,  176,  176,  176,  181,
+      187,  173,  172,  181,  184,  184,  184,  184,  171,  187,
+      169,  166,  168,  189,  189,  189,  189,  189,  189,  194,
+
+      194,  194,  194,  194,  194,  194,  194,  195,  195,  165,
+      163,  195,  196,  196,  162,  158,  196,  197,  197,  157,
+      156,  197,  198,  155,  198,  198,  199,  146,  143,  199,
+      200,  140,  138,  200,  201,  201,  137,  201,  202,  202,
+      202,  136,  202,  203,  131,  203,  203,  204,  204,  130,
+      204,  205,  205,  123,  205,  206,  206,  122,  113,  206,
+      207,  111,  207,  104,  103,   96,   93,   90,   82,   78,
+       72,   71,   70,   63,   61,   56,   54,   52,   47,   38,
+       33,   18,   12,   11,    5,  193,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
+      193
+    } ;
+
+/* Table of booleans, true if rule could match eol. */
+static zzconst flex_int32_t zz_rule_can_match_eol[52] =
+    {   0,
+1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,     };
+
+extern int zz_flex_debug;
+int zz_flex_debug = 0;
+
+static zz_state_type *zz_state_buf=0, *zz_state_ptr=0;
+static char *zz_full_match;
+static int zz_lp;
+#define REJECT \
+{ \
+*zz_cp = (zz_hold_char); /* undo effects of setting up zztext */ \
+zz_cp = (zz_full_match); /* restore poss. backed-over text */ \
+++(zz_lp); \
+goto find_rule; \
+}
+
+static int zz_more_offset = 0;
+static int zz_prev_more_offset = 0;
+#define zzmore() ((zz_more_offset) = zz_flex_strlen( zztext ))
+#define YY_NEED_STRLEN
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET \
+	{ \
+	(zz_more_offset) = (zz_prev_more_offset); \
+	zzleng -= (zz_more_offset); \
+	}
+#ifndef YYLMAX
+#define YYLMAX 8192
+#endif
+
+char zztext[YYLMAX];
+char *zztext_ptr;
+#line 1 "macrol.l"
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+#line 11 "macrol.l"
+#include <setjmp.h>
+#include <stdarg.h>
+
+static char blank[256];
+static int  blanks;
+static FILE *file;
+static char *tmp;
+extern char* marstmp();
+
+static jmp_buf env;
+#define exit(a)        jumpexit(a)
+#define fprintf        jumpprtf
+
+static void jumpexit(int n)
+{
+	longjmp(env,1);
+}
+
+static void jumpprtf(FILE *f,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	int len;
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	len = strlen(buf);
+	if(len && buf[len-1] == '\n')
+		buf[len-1] = 0;
+	zzerror(buf);
+}
+
+#line 753 "lex.zz.c"
+
+#define INITIAL 0
+#define SOURCE 1
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int zz_init_globals (void );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int zzwrap (void );
+#else
+extern int zzwrap (void );
+#endif
+#endif
+
+    static void zzunput (int c,char *buf_ptr  );
+    
+#ifndef zztext_ptr
+static void zz_flex_strncpy (char *,zzconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int zz_flex_strlen (zzconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int zzinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( zztext, zzleng, 1, zzout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_is_interactive ) \
+		{ \
+		int c = '*'; \
+		size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( zzin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( zzin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, zzin))==0 && ferror(zzin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(zzin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "zzterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef zzterminate
+#define zzterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) zz_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int zzlex (void);
+
+#define YY_DECL int zzlex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after zztext and zzleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register zz_state_type zz_current_state;
+	register char *zz_cp, *zz_bp;
+	register int zz_act;
+    
+#line 63 "macrol.l"
+
+
+#line 910 "lex.zz.c"
+
+	if ( !(zz_init) )
+		{
+		(zz_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! (zz_state_buf) )
+            (zz_state_buf) = (zz_state_type *)zzalloc(YY_STATE_BUF_SIZE  );
+
+		if ( ! (zz_start) )
+			(zz_start) = 1;	/* first start state */
+
+		if ( ! zzin )
+			zzin = stdin;
+
+		if ( ! zzout )
+			zzout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			zzensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				zz_create_buffer(zzin,YY_BUF_SIZE );
+		}
+
+		zz_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		zz_cp = (zz_c_buf_p);
+
+		/* Support of zztext. */
+		*zz_cp = (zz_hold_char);
+
+		/* zz_bp points to the position in zz_ch_buf of the start of
+		 * the current run.
+		 */
+		zz_bp = zz_cp;
+
+		zz_current_state = (zz_start);
+
+		(zz_state_ptr) = (zz_state_buf);
+		*(zz_state_ptr)++ = zz_current_state;
+
+zz_match:
+		do
+			{
+			register YY_CHAR zz_c = zz_ec[YY_SC_TO_UI(*zz_cp)];
+			while ( zz_chk[zz_base[zz_current_state] + zz_c] != zz_current_state )
+				{
+				zz_current_state = (int) zz_def[zz_current_state];
+				if ( zz_current_state >= 194 )
+					zz_c = zz_meta[(unsigned int) zz_c];
+				}
+			zz_current_state = zz_nxt[zz_base[zz_current_state] + (unsigned int) zz_c];
+			*(zz_state_ptr)++ = zz_current_state;
+			++zz_cp;
+			}
+		while ( zz_base[zz_current_state] != 486 );
+
+zz_find_action:
+		zz_current_state = *--(zz_state_ptr);
+		(zz_lp) = zz_accept[zz_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( (zz_lp) && (zz_lp) < zz_accept[zz_current_state + 1] )
+				{
+				zz_act = zz_acclist[(zz_lp)];
+					{
+					(zz_full_match) = zz_cp;
+					break;
+					}
+				}
+			--zz_cp;
+			zz_current_state = *--(zz_state_ptr);
+			(zz_lp) = zz_accept[zz_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+		if ( zz_act != YY_END_OF_BUFFER && zz_rule_can_match_eol[zz_act] )
+			{
+			int zzl;
+			for ( zzl = (zz_prev_more_offset); zzl < zzleng; ++zzl )
+				if ( zztext[zzl] == '\n' )
+					   
+    zzlineno++;
+;
+			}
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( zz_act )
+	{ /* beginning of action switch */
+case 1:
+/* rule 1 can match eol */
+YY_RULE_SETUP
+#line 65 "macrol.l"
+{
+                            BEGIN INITIAL;
+                            fclose(file);
+                            zzlval.str = tmp;
+                            return ENDINLINE;
+                            }
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 72 "macrol.l"
+fwrite(zztext,1,zzleng,file);
+	YY_BREAK
+case 3:
+/* rule 3 can match eol */
+YY_RULE_SETUP
+#line 73 "macrol.l"
+fwrite(zztext,1,zzleng,file);
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 75 "macrol.l"
+return IF;
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 76 "macrol.l"
+return THEN;
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 77 "macrol.l"
+return ELSE;
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 78 "macrol.l"
+return AND;
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 79 "macrol.l"
+return NOT;
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 80 "macrol.l"
+return OR;
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 81 "macrol.l"
+return FUNCTION;
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 82 "macrol.l"
+return RETURN;
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 83 "macrol.l"
+return END;
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 84 "macrol.l"
+return WHILE;
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 85 "macrol.l"
+return GLOBAL;
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 86 "macrol.l"
+return DO;
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 87 "macrol.l"
+return ON;
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 88 "macrol.l"
+return FOR;
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 89 "macrol.l"
+return TO;
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 90 "macrol.l"
+return BY;
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 91 "macrol.l"
+return IN;
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 92 "macrol.l"
+return OF;
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 93 "macrol.l"
+return CASE;
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 94 "macrol.l"
+return OTHERWISE;
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 95 "macrol.l"
+return REPEAT;
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 96 "macrol.l"
+return UNTIL;
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 97 "macrol.l"
+return LOOP;
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 98 "macrol.l"
+return WHEN;
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 99 "macrol.l"
+return INCLUDE;
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 100 "macrol.l"
+return EXTERN;
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 101 "macrol.l"
+return TELL;
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 102 "macrol.l"
+return TASK;
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 103 "macrol.l"
+return NIL;
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 104 "macrol.l"
+return OBJECT;
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 105 "macrol.l"
+return IMPORT;
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 106 "macrol.l"
+return EXPORT;
+	YY_BREAK
+case 36:
+/* rule 36 can match eol */
+YY_RULE_SETUP
+#line 107 "macrol.l"
+{
+                        BEGIN SOURCE;
+                        tmp  = (char*)strdup(marstmp());
+                        file = fopen(tmp,"w");
+                        return INLINE;
+                     }
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 113 "macrol.l"
+return ARROW;
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 114 "macrol.l"
+return NE;
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 115 "macrol.l"
+return GE;
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 116 "macrol.l"
+return LE;
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 117 "macrol.l"
+return '^';
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 119 "macrol.l"
+{
+                        int c;
+                        while((c = input()) && (c != '\n') && (c != EOF) )
+                            ;
+                     }
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 126 "macrol.l"
+{
+                        int c,q = zztext[0];
+
+                        zzleng = 0;
+
+                        while((c = input()) && c != q && c != '\n' && c != EOF)
+                        {
+                            if(c == '\\') zztext[zzleng++] = input();
+                            else zztext[zzleng++] =  c;
+                        }
+
+
+                        zztext[zzleng++] = 0;
+                        zzlval.str = (char*)strdup(zztext);
+                        return STRING;
+                     }
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 143 "macrol.l"
+{ zzlval.str = (char*)strdup(zztext); return DATE; }
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 144 "macrol.l"
+{ zzlval.str = (char*)strdup(zztext); return TIME; }
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 145 "macrol.l"
+{ zzlval.str = (char*)strdup(zztext); return WORD; }
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 146 "macrol.l"
+{ zzlval.str = (char*)strdup(zztext); return NUMBER; }
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 147 "macrol.l"
+{ zzlval.str = (char*)strdup(zztext); return NUMBER; }
+	YY_BREAK
+case 49:
+/* rule 49 can match eol */
+YY_RULE_SETUP
+#line 148 "macrol.l"
+;
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 149 "macrol.l"
+return *zztext;
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 150 "macrol.l"
+ECHO;
+	YY_BREAK
+#line 1298 "lex.zz.c"
+			case YY_STATE_EOF(INITIAL):
+			case YY_STATE_EOF(SOURCE):
+				zzterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int zz_amount_of_matched_text = (int) (zz_cp - (zztext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*zz_cp = (zz_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->zz_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed zzin at a new source and called
+			 * zzlex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(zz_n_chars) = YY_CURRENT_BUFFER_LVALUE->zz_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->zz_input_file = zzin;
+			YY_CURRENT_BUFFER_LVALUE->zz_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for zz_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since zz_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (zz_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)] )
+			{ /* This was really a NUL. */
+			zz_state_type zz_next_state;
+
+			(zz_c_buf_p) = (zztext_ptr) + zz_amount_of_matched_text;
+
+			zz_current_state = zz_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * zz_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			zz_next_state = zz_try_NUL_trans( zz_current_state );
+
+			zz_bp = (zztext_ptr) + YY_MORE_ADJ;
+
+			if ( zz_next_state )
+				{
+				/* Consume the NUL. */
+				zz_cp = ++(zz_c_buf_p);
+				zz_current_state = zz_next_state;
+				goto zz_match;
+				}
+
+			else
+				{
+				zz_cp = (zz_c_buf_p);
+				goto zz_find_action;
+				}
+			}
+
+		else switch ( zz_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(zz_did_buffer_switch_on_eof) = 0;
+
+				if ( zzwrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * zz_get_next_buffer() to have set up
+					 * zztext, we can now set up
+					 * zz_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(zz_c_buf_p) = (zztext_ptr) + YY_MORE_ADJ;
+
+					zz_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (zz_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(zz_c_buf_p) =
+					(zztext_ptr) + zz_amount_of_matched_text;
+
+				zz_current_state = zz_get_previous_state(  );
+
+				zz_cp = (zz_c_buf_p);
+				zz_bp = (zztext_ptr) + YY_MORE_ADJ;
+				goto zz_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(zz_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)];
+
+				zz_current_state = zz_get_previous_state(  );
+
+				zz_cp = (zz_c_buf_p);
+				zz_bp = (zztext_ptr) + YY_MORE_ADJ;
+				goto zz_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of zzlex */
+
+/* zz_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int zz_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->zz_ch_buf;
+	register char *source = (zztext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (zz_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (zz_c_buf_p) - (zztext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((zz_c_buf_p) - (zztext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->zz_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars) = 0;
+
+	else
+		{
+			int num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->zz_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[number_to_move]),
+			(zz_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars);
+		}
+
+	if ( (zz_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			zzrestart(zzin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->zz_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	(zz_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(zztext_ptr) = &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[0];
+
+	return ret_val;
+}
+
+/* zz_get_previous_state - get the state just before the EOB char was reached */
+
+    static zz_state_type zz_get_previous_state (void)
+{
+	register zz_state_type zz_current_state;
+	register char *zz_cp;
+    
+	zz_current_state = (zz_start);
+
+	(zz_state_ptr) = (zz_state_buf);
+	*(zz_state_ptr)++ = zz_current_state;
+
+	for ( zz_cp = (zztext_ptr) + YY_MORE_ADJ; zz_cp < (zz_c_buf_p); ++zz_cp )
+		{
+		register YY_CHAR zz_c = (*zz_cp ? zz_ec[YY_SC_TO_UI(*zz_cp)] : 1);
+		while ( zz_chk[zz_base[zz_current_state] + zz_c] != zz_current_state )
+			{
+			zz_current_state = (int) zz_def[zz_current_state];
+			if ( zz_current_state >= 194 )
+				zz_c = zz_meta[(unsigned int) zz_c];
+			}
+		zz_current_state = zz_nxt[zz_base[zz_current_state] + (unsigned int) zz_c];
+		*(zz_state_ptr)++ = zz_current_state;
+		}
+
+	return zz_current_state;
+}
+
+/* zz_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = zz_try_NUL_trans( current_state );
+ */
+    static zz_state_type zz_try_NUL_trans  (zz_state_type zz_current_state )
+{
+	register int zz_is_jam;
+    
+	register YY_CHAR zz_c = 1;
+	while ( zz_chk[zz_base[zz_current_state] + zz_c] != zz_current_state )
+		{
+		zz_current_state = (int) zz_def[zz_current_state];
+		if ( zz_current_state >= 194 )
+			zz_c = zz_meta[(unsigned int) zz_c];
+		}
+	zz_current_state = zz_nxt[zz_base[zz_current_state] + (unsigned int) zz_c];
+	zz_is_jam = (zz_current_state == 193);
+	if ( ! zz_is_jam )
+		*(zz_state_ptr)++ = zz_current_state;
+
+	return zz_is_jam ? 0 : zz_current_state;
+}
+
+    static void zzunput (int c, register char * zz_bp )
+{
+	register char *zz_cp;
+    
+    zz_cp = (zz_c_buf_p);
+
+	/* undo effects of setting up zztext */
+	*zz_cp = (zz_hold_char);
+
+	if ( zz_cp < YY_CURRENT_BUFFER_LVALUE->zz_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = (zz_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->zz_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->zz_ch_buf )
+			*--dest = *--source;
+
+		zz_cp += (int) (dest - source);
+		zz_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars =
+			(zz_n_chars) = YY_CURRENT_BUFFER_LVALUE->zz_buf_size;
+
+		if ( zz_cp < YY_CURRENT_BUFFER_LVALUE->zz_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--zz_cp = (char) c;
+
+    if ( c == '\n' ){
+        --zzlineno;
+    }
+
+	(zztext_ptr) = zz_bp;
+	(zz_hold_char) = *zz_cp;
+	(zz_c_buf_p) = zz_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int zzinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(zz_c_buf_p) = (zz_hold_char);
+
+	if ( *(zz_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* zz_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (zz_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->zz_ch_buf[(zz_n_chars)] )
+			/* This was really a NUL. */
+			*(zz_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			int offset = (zz_c_buf_p) - (zztext_ptr);
+			++(zz_c_buf_p);
+
+			switch ( zz_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because zz_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					zzrestart(zzin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( zzwrap( ) )
+						return EOF;
+
+					if ( ! (zz_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return zzinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(zz_c_buf_p) = (zztext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (zz_c_buf_p);	/* cast for 8-bit char's */
+	*(zz_c_buf_p) = '\0';	/* preserve zztext */
+	(zz_hold_char) = *++(zz_c_buf_p);
+
+	if ( c == '\n' )
+		   
+    zzlineno++;
+;
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void zzrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        zzensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            zz_create_buffer(zzin,YY_BUF_SIZE );
+	}
+
+	zz_init_buffer(YY_CURRENT_BUFFER,input_file );
+	zz_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void zz_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		zzpop_buffer_state();
+	 *		zzpush_buffer_state(new_buffer);
+     */
+	zzensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(zz_c_buf_p) = (zz_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->zz_buf_pos = (zz_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	zz_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (zzwrap()) processing, but the only time this flag
+	 * is looked at is after zzwrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(zz_did_buffer_switch_on_eof) = 1;
+}
+
+static void zz_load_buffer_state  (void)
+{
+    	(zz_n_chars) = YY_CURRENT_BUFFER_LVALUE->zz_n_chars;
+	(zztext_ptr) = (zz_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->zz_buf_pos;
+	zzin = YY_CURRENT_BUFFER_LVALUE->zz_input_file;
+	(zz_hold_char) = *(zz_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE zz_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) zzalloc(sizeof( struct zz_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_create_buffer()" );
+
+	b->zz_buf_size = size;
+
+	/* zz_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->zz_ch_buf = (char *) zzalloc(b->zz_buf_size + 2  );
+	if ( ! b->zz_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_create_buffer()" );
+
+	b->zz_is_our_buffer = 1;
+
+	zz_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with zz_create_buffer()
+ * 
+ */
+    void zz_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->zz_is_our_buffer )
+		zzfree((void *) b->zz_ch_buf  );
+
+	zzfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a zzrestart() or at EOF.
+ */
+    static void zz_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	zz_flush_buffer(b );
+
+	b->zz_input_file = file;
+	b->zz_fill_buffer = 1;
+
+    /* If b is the current buffer, then zz_init_buffer was _probably_
+     * called from zzrestart() or through zz_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->zz_bs_lineno = 1;
+        b->zz_bs_column = 0;
+    }
+
+        b->zz_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void zz_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->zz_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->zz_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->zz_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->zz_buf_pos = &b->zz_ch_buf[0];
+
+	b->zz_at_bol = 1;
+	b->zz_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		zz_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void zzpush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	zzensure_buffer_stack();
+
+	/* This block is copied from zz_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(zz_c_buf_p) = (zz_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->zz_buf_pos = (zz_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->zz_n_chars = (zz_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(zz_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from zz_switch_to_buffer. */
+	zz_load_buffer_state( );
+	(zz_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void zzpop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	zz_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((zz_buffer_stack_top) > 0)
+		--(zz_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		zz_load_buffer_state( );
+		(zz_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void zzensure_buffer_stack (void)
+{
+	int num_to_alloc;
+    
+	if (!(zz_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(zz_buffer_stack) = (struct zz_buffer_state**)zzalloc
+								(num_to_alloc * sizeof(struct zz_buffer_state*)
+								);
+		
+		memset((zz_buffer_stack), 0, num_to_alloc * sizeof(struct zz_buffer_state*));
+				
+		(zz_buffer_stack_max) = num_to_alloc;
+		(zz_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((zz_buffer_stack_top) >= ((zz_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (zz_buffer_stack_max) + grow_size;
+		(zz_buffer_stack) = (struct zz_buffer_state**)zzrealloc
+								((zz_buffer_stack),
+								num_to_alloc * sizeof(struct zz_buffer_state*)
+								);
+
+		/* zero only the new slots.*/
+		memset((zz_buffer_stack) + (zz_buffer_stack_max), 0, grow_size * sizeof(struct zz_buffer_state*));
+		(zz_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE zz_scan_buffer  (char * base, zz_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) zzalloc(sizeof( struct zz_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_scan_buffer()" );
+
+	b->zz_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->zz_buf_pos = b->zz_ch_buf = base;
+	b->zz_is_our_buffer = 0;
+	b->zz_input_file = 0;
+	b->zz_n_chars = b->zz_buf_size;
+	b->zz_is_interactive = 0;
+	b->zz_at_bol = 1;
+	b->zz_fill_buffer = 0;
+	b->zz_buffer_status = YY_BUFFER_NEW;
+
+	zz_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to zzlex() will
+ * scan from a @e copy of @a str.
+ * @param str a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       zz_scan_bytes() instead.
+ */
+YY_BUFFER_STATE zz_scan_string (zzconst char * zzstr )
+{
+    
+	return zz_scan_bytes(zzstr,strlen(zzstr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to zzlex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE zz_scan_bytes  (zzconst char * zzbytes, int  _zzbytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	zz_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _zzbytes_len + 2;
+	buf = (char *) zzalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in zz_scan_bytes()" );
+
+	for ( i = 0; i < _zzbytes_len; ++i )
+		buf[i] = zzbytes[i];
+
+	buf[_zzbytes_len] = buf[_zzbytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = zz_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in zz_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->zz_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void zz_fatal_error (zzconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine zzless() so it works in section 3 code. */
+
+#undef zzless
+#define zzless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up zztext. */ \
+        int zzless_macro_arg = (n); \
+        YY_LESS_LINENO(zzless_macro_arg);\
+		zztext[zzleng] = (zz_hold_char); \
+		(zz_c_buf_p) = zztext + zzless_macro_arg; \
+		(zz_hold_char) = *(zz_c_buf_p); \
+		*(zz_c_buf_p) = '\0'; \
+		zzleng = zzless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int zzget_lineno  (void)
+{
+        
+    return zzlineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *zzget_in  (void)
+{
+        return zzin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *zzget_out  (void)
+{
+        return zzout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+int zzget_leng  (void)
+{
+        return zzleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *zzget_text  (void)
+{
+        return zztext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void zzset_lineno (int  line_number )
+{
+    
+    zzlineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see zz_switch_to_buffer
+ */
+void zzset_in (FILE *  in_str )
+{
+        zzin = in_str ;
+}
+
+void zzset_out (FILE *  out_str )
+{
+        zzout = out_str ;
+}
+
+int zzget_debug  (void)
+{
+        return zz_flex_debug;
+}
+
+void zzset_debug (int  bdebug )
+{
+        zz_flex_debug = bdebug ;
+}
+
+static int zz_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from zzlex_destroy(), so don't allocate here.
+     */
+
+    /* We do not touch zzlineno unless the option is enabled. */
+    zzlineno =  1;
+    
+    (zz_buffer_stack) = 0;
+    (zz_buffer_stack_top) = 0;
+    (zz_buffer_stack_max) = 0;
+    (zz_c_buf_p) = (char *) 0;
+    (zz_init) = 0;
+    (zz_start) = 0;
+
+    (zz_state_buf) = 0;
+    (zz_state_ptr) = 0;
+    (zz_full_match) = 0;
+    (zz_lp) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    zzin = stdin;
+    zzout = stdout;
+#else
+    zzin = (FILE *) 0;
+    zzout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * zzlex_init()
+     */
+    return 0;
+}
+
+/* zzlex_destroy is for both reentrant and non-reentrant scanners. */
+int zzlex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		zz_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		zzpop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	zzfree((zz_buffer_stack) );
+	(zz_buffer_stack) = NULL;
+
+    zzfree ( (zz_state_buf) );
+    (zz_state_buf)  = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * zzlex() is called, initialization will occur. */
+    zz_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef zztext_ptr
+static void zz_flex_strncpy (char* s1, zzconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int zz_flex_strlen (zzconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *zzalloc (zz_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *zzrealloc  (void * ptr, zz_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void zzfree (void * ptr )
+{
+	free( (char *) ptr );	/* see zzrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "zztables"
+
+#line 150 "macrol.l"
+
+
+
+#ifndef BEAUTIFY
+
+#define MAXINCLUDE 10
+
+/* FLEX scanner modification according */
+/* to Linux 'flex' man page section    */
+/* titled 'MULTIPLE INPUT BUFFERS'.    */
+/*                         (010810/vk) */
+
+#ifdef FLEX_SCANNER
+static YY_BUFFER_STATE fstack[MAXINCLUDE];
+#else
+static FILE *fstack[MAXINCLUDE];
+#endif
+
+static int   ftop = 0;
+
+
+static void include(char *name)
+{
+   FILE* fin;
+
+   if( ftop == MAXINCLUDE )
+     {
+        zzerror( "Includes nested too deeply" );
+        return;
+     }
+
+#ifdef FLEX_SCANNER
+   fin = fopen( name, "r" );
+   if ( fin )
+     {
+        fstack[ftop++] = YY_CURRENT_BUFFER;
+        zzin = fin;
+        zz_switch_to_buffer(zz_create_buffer(zzin,YY_BUF_SIZE ) );
+        BEGIN(INITIAL);
+     }
+   else
+     {
+	perror(name);
+        zzerror( "Cannot include file" );
+     }
+#else
+    fstack[ftop++] = zzin;
+    zzin = fopen(name,"r");
+    if(zzin == NULL)
+	{
+		perror(name);
+		zzerror("Cannot include file");
+		zzin = fstack[--ftop];
+	}
+#endif
+}
+
+zzwrap()
+{
+    if(ftop)
+    {
+#ifdef FLEX_SCANNER
+        zz_delete_buffer(YY_CURRENT_BUFFER );
+        zz_switch_to_buffer(fstack[--ftop] );
+#else
+        zzin = fstack[--ftop];
+#endif
+        return 0;
+    }
+    return 1;
+}
+
+
+start_inline()
+{
+}
+
+int parse_macro(void)
+{
+	if(setjmp(env))
+		return 1;
+	return zzparse();
+}
+
+#endif
+
diff --git a/src/Macro/macrol.l b/src/Macro/macrol.l
new file mode 100644
index 0000000..d052083
--- /dev/null
+++ b/src/Macro/macrol.l
@@ -0,0 +1,233 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+%{
+#include <setjmp.h>
+#include <stdarg.h>
+
+static char blank[256];
+static int  blanks;
+static FILE *file;
+static char *tmp;
+extern char* marstmp();
+
+static jmp_buf env;
+#define exit(a)        jumpexit(a)
+#define fprintf        jumpprtf
+
+static void jumpexit(int n)
+{
+	longjmp(env,1);
+}
+
+static void jumpprtf(FILE *f,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	int len;
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	len = strlen(buf);
+	if(len && buf[len-1] == '\n')
+		buf[len-1] = 0;
+	yyerror(buf);
+}
+%}
+
+BLANK   [ \t\n]+
+IDENT   [_A-Za-z]+[_0-9A-Za-z]*
+NUMB1   [0-9]+[\.]?[0-9]*
+NUMB2   [0-9]*[\.]?[0-9]+
+EXP     [eE][+\-]?[0-9]+
+NUMB    {NUMB1}|{NUMB2}
+EXPNUMB {NUMB1}{EXP}|{NUMB2}{EXP}
+
+TIME1   [0-2][0-9]:[0-5][0-9]
+TIME2   [0-2][0-9]:[0-5][0-9]:[0-5][0-9]
+TIME    {TIME1}|{TIME2}
+
+DATE2   [12][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]
+DATE4   [12][0-9][0-9][0-9]-[0-3][0-9][0-9]
+DATE    {DATE2}|{DATE4}
+
+%s SOURCE
+
+%%
+
+<SOURCE>end{BLANK}inline  {
+                            BEGIN INITIAL;
+                            fclose(file);
+                            yylval.str = tmp;
+                            return ENDINLINE;
+                            }
+
+<SOURCE>.            fwrite(yytext,1,yyleng,file);
+<SOURCE>{BLANK}      fwrite(yytext,1,yyleng,file);
+
+<INITIAL>"if"        return IF;
+<INITIAL>"then"      return THEN;
+<INITIAL>"else"      return ELSE;
+<INITIAL>"and"       return AND;
+<INITIAL>"not"       return NOT;
+<INITIAL>"or"        return OR;
+<INITIAL>"function"  return FUNCTION;
+<INITIAL>"return"    return RETURN;
+<INITIAL>"end"       return END;
+<INITIAL>"while"     return WHILE;
+<INITIAL>"global"    return GLOBAL;
+<INITIAL>"do"        return DO;
+<INITIAL>"on"        return ON;
+<INITIAL>"for"       return FOR;
+<INITIAL>"to"        return TO;
+<INITIAL>"by"        return BY;
+<INITIAL>"in"        return IN;
+<INITIAL>"of"        return OF;
+<INITIAL>"case"      return CASE;
+<INITIAL>"otherwise" return OTHERWISE;
+<INITIAL>"repeat"    return REPEAT;
+<INITIAL>"until"     return UNTIL;
+<INITIAL>"loop"      return LOOP;
+<INITIAL>"when"      return WHEN;
+<INITIAL>"include"   return INCLUDE;
+<INITIAL>"extern"    return EXTERN;
+<INITIAL>"tell"      return TELL;
+<INITIAL>"task"      return TASK;
+<INITIAL>"nil"       return NIL;
+<INITIAL>"object"    return OBJECT;
+<INITIAL>"import"    return IMPORT;
+<INITIAL>"export"    return EXPORT;
+<INITIAL>inline[ \t]*\n  {
+                        BEGIN SOURCE;
+                        tmp  = (char*)strdup(marstmp());
+                        file = fopen(tmp,"w");
+                        return INLINE;
+                     }
+<INITIAL>"->"        return ARROW;
+<INITIAL>"<>"        return NE;
+<INITIAL>">="        return GE;
+<INITIAL>"<="        return LE;
+<INITIAL>"\*\*"      return '^';
+
+<INITIAL>\#          {
+                        int c;
+                        while((c = input()) && (c != '\n') && (c != EOF) )
+                            ;
+                     }
+
+
+<INITIAL>\"|\'       {
+                        int c,q = yytext[0];
+
+                        yyleng = 0;
+
+                        while((c = input()) && c != q && c != '\n' && c != EOF)
+                        {
+                            if(c == '\\') yytext[yyleng++] = input();
+                            else yytext[yyleng++] =  c;
+                        }
+
+
+                        yytext[yyleng++] = 0;
+                        yylval.str = (char*)strdup(yytext);
+                        return STRING;
+                     }
+
+<INITIAL>{DATE}      { yylval.str = (char*)strdup(yytext); return DATE; }
+<INITIAL>{TIME}      { yylval.str = (char*)strdup(yytext); return TIME; }
+<INITIAL>{IDENT}     { yylval.str = (char*)strdup(yytext); return WORD; }
+<INITIAL>{NUMB}      { yylval.str = (char*)strdup(yytext); return NUMBER; }
+<INITIAL>{EXPNUMB}   { yylval.str = (char*)strdup(yytext); return NUMBER; }
+<INITIAL>{BLANK}     ;
+<INITIAL>.           return *yytext;
+%%
+
+#ifndef BEAUTIFY
+
+#define MAXINCLUDE 10
+
+/* FLEX scanner modification according */
+/* to Linux 'flex' man page section    */
+/* titled 'MULTIPLE INPUT BUFFERS'.    */
+/*                         (010810/vk) */
+
+#ifdef FLEX_SCANNER
+static YY_BUFFER_STATE fstack[MAXINCLUDE];
+#else
+static FILE *fstack[MAXINCLUDE];
+#endif
+
+static int   ftop = 0;
+
+
+static void include(char *name)
+{
+   FILE* fin;
+
+   if( ftop == MAXINCLUDE )
+     {
+        yyerror( "Includes nested too deeply" );
+        return;
+     }
+
+#ifdef FLEX_SCANNER
+   fin = fopen( name, "r" );
+   if ( fin )
+     {
+        fstack[ftop++] = YY_CURRENT_BUFFER;
+        yyin = fin;
+        yy_switch_to_buffer( yy_create_buffer( yyin, YY_BUF_SIZE ) );
+        BEGIN(INITIAL);
+     }
+   else
+     {
+	perror(name);
+        yyerror( "Cannot include file" );
+     }
+#else
+    fstack[ftop++] = yyin;
+    yyin = fopen(name,"r");
+    if(yyin == NULL)
+	{
+		perror(name);
+		yyerror("Cannot include file");
+		yyin = fstack[--ftop];
+	}
+#endif
+}
+
+yywrap()
+{
+    if(ftop)
+    {
+#ifdef FLEX_SCANNER
+        yy_delete_buffer( YY_CURRENT_BUFFER );
+        yy_switch_to_buffer( fstack[--ftop] );
+#else
+        yyin = fstack[--ftop];
+#endif
+        return 0;
+    }
+    return 1;
+}
+
+
+start_inline()
+{
+}
+
+int parse_macro(void)
+{
+	if(setjmp(env))
+		return 1;
+	return yyparse();
+}
+
+#endif
diff --git a/src/Macro/macroy.c b/src/Macro/macroy.c
new file mode 100644
index 0000000..f45b625
--- /dev/null
+++ b/src/Macro/macroy.c
@@ -0,0 +1,3057 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with zz or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum zztokentype {
+     IF = 258,
+     AND = 259,
+     NOT = 260,
+     OR = 261,
+     THEN = 262,
+     ELSE = 263,
+     END = 264,
+     RETURN = 265,
+     DO = 266,
+     FUNCTION = 267,
+     ON = 268,
+     GLOBAL = 269,
+     VECTOR = 270,
+     WHILE = 271,
+     INCLUDE = 272,
+     EXTERN = 273,
+     GE = 274,
+     LE = 275,
+     NE = 276,
+     FOR = 277,
+     TO = 278,
+     BY = 279,
+     NIL = 280,
+     OBJECT = 281,
+     IMPORT = 282,
+     EXPORT = 283,
+     INLINE = 284,
+     CASE = 285,
+     OTHERWISE = 286,
+     OF = 287,
+     IN = 288,
+     REPEAT = 289,
+     UNTIL = 290,
+     LOOP = 291,
+     WHEN = 292,
+     TELL = 293,
+     TASK = 294,
+     ARROW = 295,
+     WORD = 296,
+     STRING = 297,
+     NUMBER = 298,
+     DATE = 299,
+     TIME = 300,
+     ENDINLINE = 301
+   };
+#endif
+/* Tokens.  */
+#define IF 258
+#define AND 259
+#define NOT 260
+#define OR 261
+#define THEN 262
+#define ELSE 263
+#define END 264
+#define RETURN 265
+#define DO 266
+#define FUNCTION 267
+#define ON 268
+#define GLOBAL 269
+#define VECTOR 270
+#define WHILE 271
+#define INCLUDE 272
+#define EXTERN 273
+#define GE 274
+#define LE 275
+#define NE 276
+#define FOR 277
+#define TO 278
+#define BY 279
+#define NIL 280
+#define OBJECT 281
+#define IMPORT 282
+#define EXPORT 283
+#define INLINE 284
+#define CASE 285
+#define OTHERWISE 286
+#define OF 287
+#define IN 288
+#define REPEAT 289
+#define UNTIL 290
+#define LOOP 291
+#define WHEN 292
+#define TELL 293
+#define TASK 294
+#define ARROW 295
+#define WORD 296
+#define STRING 297
+#define NUMBER 298
+#define DATE 299
+#define TIME 300
+#define ENDINLINE 301
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 10 "macroy.y"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "opcodes.h"
+
+extern int   zzlineno;
+extern void  update_branch(void *a,void *b);
+extern void *new_code(int opcode,char *carg,int iarg,int line);
+extern void  new_context(char *name,int handler,int user,int oo);
+extern void  start_global(char *name);
+extern void  end_global(char *name);
+extern void  end_context(char *name);
+extern void  argument_count(int);
+extern void  argument_type(char*);
+extern void  extern_command(char*,char*);
+extern char *strdup(const char*);
+
+static void *stack[1024];
+static int  top = 0;
+
+static int  tmpdepth = 0;
+
+static void include(char*);
+static void begin_function(char *name,int handler,int user,int oo)
+{
+	/* extern int zzdebug; zzdebug = 1; */
+	new_context(name,handler,user,oo);
+}
+
+static void return_function(int has_value)
+{
+	if(!has_value) new_code(OP_PUSH,NULL,PUSH_NIL,zzlineno);
+	new_code(OP_RETURN,NULL,0,zzlineno);
+}
+
+static void end_function(char *name)
+{
+	new_code(OP_PUSH,NULL,PUSH_NIL,zzlineno);
+	new_code(OP_RETURN,NULL,0,zzlineno);
+
+	end_context(name);
+}
+
+static void begin_while()
+{
+	stack[top++] = new_code(OP_NOP,NULL,0,zzlineno);
+}
+
+static void end_while()
+{
+	void *l1 = stack[--top];
+	void *l2 = stack[--top];
+	update_branch(new_code(OP_GOTO,NULL,0,zzlineno),l2);
+	update_branch(l1,new_code(OP_NOP,NULL,0,zzlineno));
+}
+
+static void begin_repeat()
+{
+	stack[top++] = new_code(OP_NOP,NULL,0,zzlineno);
+}
+
+static void end_until()
+{
+	void *l = stack[--top];
+	update_branch(new_code(OP_TEST,NULL,0,zzlineno),l);
+}
+
+static void do_while()
+{
+	stack[top++] = new_code(OP_TEST,NULL,0,zzlineno);
+}
+
+
+static void begin_if()
+{
+	stack[top++] = new_code(OP_TEST,NULL,0,zzlineno);
+}
+
+static void else_if()
+{
+	void *l = stack[--top];
+
+	stack[top++] = new_code(OP_GOTO,NULL,0,zzlineno);
+	update_branch(l,new_code(OP_NOP,NULL,0,zzlineno));
+}
+
+static void end_if()
+{
+	void *l = stack[--top];
+	update_branch(l,new_code(OP_NOP,NULL,0,zzlineno));
+}
+
+static void push(char *name,int type)
+{
+	new_code(OP_PUSH,name,type,zzlineno);
+}
+
+
+static void param(char *name,char *type)
+{
+	new_code(OP_PARAM,name,0,zzlineno);
+	argument_type(type);
+}
+
+static void pop(char *name,int n)
+{
+	if(name)
+		new_code(OP_STORE,name,n,zzlineno);
+	else
+		new_code(OP_POP,NULL,n,zzlineno);
+}
+
+static void call(char *name,int arity)
+{
+	new_code(OP_CALL,name,arity,zzlineno);
+}
+
+/*===========================================================================*/
+
+static void begin_case(void)
+{
+	void *l1,*l2,*l3;
+	char tmp[20];
+
+	sprintf(tmp,".tmp.%d",tmpdepth++);
+	pop(tmp,0);
+
+	l1 = new_code(OP_GOTO,NULL,0,zzlineno);
+	l2 = new_code(OP_GOTO,NULL,0,zzlineno); /* endcase case */
+	l3 = new_code(OP_NOP, NULL,0,zzlineno);
+
+	update_branch(l1,l3);
+	stack[top++] = l2;
+}
+
+static void end_case(void)
+{
+	void *l = stack[--top];
+	update_branch(l,new_code(OP_NOP,NULL,0,zzlineno));
+	tmpdepth--;
+}
+
+static void begin_choice(int count)
+{
+	char tmp1[20];
+	char tmp2[20];
+
+	sprintf(tmp1,".tmp.%d",tmpdepth-1);
+
+	if(count == 1) /* faster */
+	{
+		push(tmp1,PUSH_IDENT);
+		call("=", 2);
+	}
+	else
+	{
+		int i;
+		for(i=0;i<count;i++)  /* copy all cases */
+		{
+			sprintf(tmp2,".tmp.%d",tmpdepth+i);
+			pop(tmp2,0);
+		}
+
+		for(i=0;i<count;i++)  /* = all cases */
+		{
+			sprintf(tmp2,".tmp.%d",tmpdepth+i);
+			push(tmp1,PUSH_IDENT);
+			push(tmp2,PUSH_IDENT);
+			call("=", 2);
+		}
+
+		for(i=0;i<count-1;i++)  /* or all cases */
+			call("or",2);
+	}
+
+	stack[top++] = new_code(OP_TEST,NULL,0,zzlineno);
+
+}
+
+static void end_choice(void)
+{
+	void *l1 = stack[--top]; /* OP_TEST */
+	void *l2 = stack[top-1]; /* begin_case l2 */
+
+	update_branch(new_code(OP_GOTO,NULL,0,zzlineno),l2);
+	update_branch(l1,new_code(OP_NOP ,NULL,0,zzlineno));
+}
+
+/*===========================================================================*/
+
+static begin_for(char *name,int by)
+{
+	char tmp1[20];
+	char tmp2[20];
+
+	sprintf(tmp1,".tmp.%d",tmpdepth++);
+	sprintf(tmp2,".tmp.%d",tmpdepth++);
+
+	if(by == 0) push("1",PUSH_NUMBER); /* default by */
+
+	pop(tmp2,0);             /* by is on top */
+
+	push(name,PUSH_IDENT); /*  end - start (end is on stack)  */
+	call("-",2);
+
+	push(tmp2,PUSH_IDENT); /*  end - start + by */
+	call("+",2);
+
+	push(tmp2,PUSH_IDENT); /*  (end - start + 1)/by */
+	call("/",2);
+	call("int",1);
+	pop(tmp1,0);             /* into tmp var */
+
+	begin_while();         /* while tmp > 0 */
+
+	push(tmp1,PUSH_IDENT);
+	push("0",PUSH_NUMBER);
+	call(">",2);
+
+	do_while();
+
+}
+
+static end_for(char *name)
+{
+	char tmp1[20];
+	char tmp2[20];
+
+	sprintf(tmp2,".tmp.%d",--tmpdepth);
+	sprintf(tmp1,".tmp.%d",--tmpdepth);
+
+	push(name,PUSH_IDENT); /* name = name + by */
+	push(tmp2,PUSH_IDENT);
+	call("+",2);
+	pop(name,0);
+
+	push(tmp1,PUSH_IDENT); /* tmp = tmp - 1 */
+	push("1",PUSH_NUMBER);
+	call("-",2);
+	pop(tmp1,0);
+
+	end_while();
+
+/* pmit at up*/
+}
+
+/*===========================================================================*/
+
+static begin_loop(char *name)
+{
+	char tmp1[20];
+	char tmp2[20];
+	char tmp3[20];
+
+	sprintf(tmp1,".tmp.%d",tmpdepth++);
+	sprintf(tmp2,".tmp.%d",tmpdepth++);
+	sprintf(tmp3,".tmp.%d",tmpdepth++);
+
+	pop(tmp2,0);             /* get list */
+	push(tmp2,PUSH_IDENT);
+	call("count",1);       /* count */
+
+	pop(tmp1,0);             /* into tmp var */
+
+	push("1",PUSH_NUMBER);
+	pop(tmp3,0);
+
+	begin_while();         /* while tmp > 0 */
+
+	push(tmp1,PUSH_IDENT);
+	push("0",PUSH_NUMBER);
+	call(">",2);
+
+	do_while();
+
+	push(tmp2,PUSH_IDENT);	
+	push(tmp3,PUSH_IDENT);	
+	call("[]",2);
+	pop(name,0);
+
+}
+
+static end_loop()
+{
+	char tmp1[20];
+	char tmp2[20];
+	char tmp3[20];
+
+	sprintf(tmp3,".tmp.%d",--tmpdepth);
+	sprintf(tmp2,".tmp.%d",--tmpdepth);
+	sprintf(tmp1,".tmp.%d",--tmpdepth);
+
+	push(tmp1,PUSH_IDENT); /* tmp = tmp - 1 */
+	push("1",PUSH_NUMBER);
+	call("-",2);
+	pop(tmp1,0);
+
+	push(tmp3,PUSH_IDENT); /* tmp = tmp + 1 */
+	push("1",PUSH_NUMBER);
+	call("+",2);
+	pop(tmp3,0);
+
+	end_while();
+
+}
+
+/*===========================================================================*/
+
+static void begin_when(void)
+{
+	void *l1,*l2,*l3;
+
+	l1 = new_code(OP_GOTO,NULL,0,zzlineno);
+	l2 = new_code(OP_GOTO,NULL,0,zzlineno); /* endcase when */
+	l3 = new_code(OP_NOP, NULL,0,zzlineno);
+
+	update_branch(l1,l3);
+	stack[top++] = l2;
+}
+
+static void end_when(void)
+{
+	void *l = stack[--top];
+	update_branch(l,new_code(OP_NOP,NULL,0,zzlineno));
+}
+
+static void begin_selection(void)
+{
+	stack[top++] = new_code(OP_TEST,NULL,0,zzlineno);
+}
+
+static void end_selection(void)
+{
+	void *l1 = stack[--top]; /* OP_TEST */
+	void *l2 = stack[top-1]; /* begin_when l2 */
+
+	update_branch(new_code(OP_GOTO,NULL,0,zzlineno),l2);
+	update_branch(l1,new_code(OP_NOP ,NULL,0,zzlineno));
+}
+
+/*===========================================================================*/
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 353 "macroy.y"
+{
+	char       *str;
+	long		num;
+}
+/* Line 187 of yacc.c.  */
+#line 536 "y.tab.c"
+	YYSTYPE;
+# define zzstype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+#line 549 "y.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 zztype_uint8;
+#else
+typedef unsigned char zztype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 zztype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char zztype_int8;
+#else
+typedef short int zztype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 zztype_uint16;
+#else
+typedef unsigned short int zztype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 zztype_int16;
+#else
+typedef short int zztype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined zzoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined zzoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined zzoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union zzalloc
+{
+  zztype_int16 zzss;
+  YYSTYPE zzvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union zzalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (zztype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T zzi;				\
+	  for (zzi = 0; zzi < (Count); zzi++)	\
+	    (To)[zzi] = (From)[zzi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T zznewbytes;						\
+	YYCOPY (&zzptr->Stack, Stack, zzsize);				\
+	Stack = &zzptr->Stack;						\
+	zznewbytes = zzstacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	zzptr += zznewbytes / sizeof (*zzptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  128
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   592
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  65
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  86
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  192
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  336
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   301
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? zztranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const zztype_uint8 zztranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    62,     2,
+      49,    50,    59,    61,    52,    57,    55,    60,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    51,    47,
+      64,    48,    63,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    53,     2,    54,    58,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    56,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const zztype_uint16 zzprhs[] =
+{
+       0,     0,     3,     5,     7,     9,    11,    14,    16,    18,
+      20,    22,    24,    26,    28,    30,    32,    34,    37,    38,
+      44,    47,    50,    53,    57,    62,    65,    68,    71,    74,
+      80,    82,    85,    89,    92,    95,    98,   100,   103,   105,
+     109,   111,   113,   117,   119,   123,   126,   128,   130,   132,
+     134,   136,   138,   140,   143,   147,   154,   155,   162,   163,
+     170,   172,   174,   176,   178,   180,   182,   184,   186,   187,
+     196,   197,   204,   205,   211,   213,   216,   217,   223,   224,
+     233,   235,   238,   239,   245,   247,   252,   253,   259,   260,
+     261,   275,   277,   280,   281,   282,   291,   292,   299,   302,
+     303,   308,   309,   310,   319,   323,   329,   332,   337,   342,
+     344,   346,   351,   355,   359,   366,   373,   376,   378,   380,
+     382,   386,   388,   389,   394,   395,   400,   402,   406,   410,
+     414,   417,   420,   422,   426,   430,   432,   435,   437,   439,
+     442,   444,   446,   448,   452,   454,   456,   458,   460,   463,
+     465,   467,   471,   473,   477,   481,   483,   487,   491,   495,
+     497,   501,   505,   509,   513,   517,   521,   525,   530,   533,
+     535,   539,   541,   545,   547,   549,   551,   553,   555,   557,
+     559,   561,   563,   565,   567,   569,   571,   573,   575,   577,
+     579,   581,   584
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const zztype_int16 zzrhs[] =
+{
+      66,     0,    -1,    67,    -1,    68,    -1,   150,    -1,    69,
+      -1,    68,    69,    -1,    89,    -1,    79,    -1,    94,    -1,
+      71,    -1,    75,    -1,    73,    -1,    74,    -1,    77,    -1,
+      47,    -1,    41,    -1,    14,    70,    -1,    -1,    14,    70,
+      48,    72,   148,    -1,    27,    70,    -1,    28,    70,    -1,
+      76,    80,    -1,    76,    80,    42,    -1,    76,    80,    42,
+      78,    -1,    18,    88,    -1,    17,    42,    -1,    17,    70,
+      -1,    29,    46,    -1,    81,    80,    82,    67,    87,    -1,
+     150,    -1,    49,    50,    -1,    49,    85,    50,    -1,    12,
+      88,    -1,    13,    88,    -1,    26,    88,    -1,   150,    -1,
+      51,    83,    -1,    84,    -1,    83,    52,    84,    -1,   126,
+      -1,    86,    -1,    85,    52,    86,    -1,    70,    -1,    70,
+      51,    70,    -1,     9,    88,    -1,    70,    -1,   149,    -1,
+      91,    -1,   126,    -1,    90,    -1,    70,    -1,    10,    -1,
+      10,   148,    -1,    70,    48,   148,    -1,    70,    53,   129,
+      54,    48,   148,    -1,    -1,    70,    55,    70,    48,    92,
+     148,    -1,    -1,    70,    55,    43,    48,    93,   148,    -1,
+     119,    -1,   116,    -1,   112,    -1,   110,    -1,   104,    -1,
+      95,    -1,    99,    -1,    97,    -1,    -1,    36,    70,    33,
+     148,    96,    67,     9,    36,    -1,    -1,    38,   148,    98,
+      67,     9,    38,    -1,    -1,    37,   100,   101,     9,    37,
+      -1,   102,    -1,   101,   102,    -1,    -1,   148,    51,   103,
+      67,     9,    -1,    -1,    30,   148,    32,   105,   106,   109,
+       9,    30,    -1,   107,    -1,   106,   107,    -1,    -1,   129,
+      51,   108,    67,     9,    -1,   150,    -1,    31,    51,    67,
+       9,    -1,    -1,    34,   111,    67,    35,   148,    -1,    -1,
+      -1,    22,    70,    48,   148,   113,    23,   148,   115,    11,
+     114,    67,     9,    22,    -1,   150,    -1,    24,   148,    -1,
+      -1,    -1,    16,   117,   148,    11,   118,    67,     9,    16,
+      -1,    -1,     3,   148,     7,   120,    67,   121,    -1,     9,
+       3,    -1,    -1,     8,   122,    67,   121,    -1,    -1,    -1,
+       8,     3,   123,   148,     7,   124,    67,   121,    -1,    49,
+     134,    50,    -1,    49,   130,    52,   129,    50,    -1,    49,
+      50,    -1,    70,    49,   128,    50,    -1,    70,    49,   134,
+      50,    -1,   125,    -1,   127,    -1,   140,    53,   129,    54,
+      -1,   140,    55,    70,    -1,   140,    55,    43,    -1,    70,
+      40,    70,    49,   128,    50,    -1,    70,    40,    70,    49,
+     134,    50,    -1,    70,    78,    -1,   150,    -1,   129,    -1,
+     130,    -1,   130,    52,   129,    -1,   148,    -1,    -1,    70,
+     132,    51,   148,    -1,    -1,    42,   133,    51,   148,    -1,
+     131,    -1,   131,    52,   130,    -1,   131,    52,   134,    -1,
+     130,    52,   134,    -1,   137,   137,    -1,   135,   137,    -1,
+     135,    -1,    56,   129,    56,    -1,    53,   128,    54,    -1,
+      43,    -1,    57,    43,    -1,    70,    -1,    42,    -1,    44,
+      45,    -1,    44,    -1,    45,    -1,   126,    -1,    49,   148,
+      50,    -1,   138,    -1,   137,    -1,   136,    -1,    25,    -1,
+      57,   140,    -1,   140,    -1,   139,    -1,   141,    58,   142,
+      -1,   141,    -1,   143,    59,   142,    -1,   143,    60,   142,
+      -1,   142,    -1,   144,    61,   143,    -1,   144,    57,   143,
+      -1,   144,    62,   143,    -1,   143,    -1,   145,    63,   144,
+      -1,   145,    48,   144,    -1,   145,    64,   144,    -1,   145,
+      19,   144,    -1,   145,    20,   144,    -1,   145,    21,   144,
+      -1,   145,    33,   144,    -1,   145,     5,    33,   144,    -1,
+       5,   145,    -1,   144,    -1,   146,     4,   145,    -1,   145,
+      -1,   147,     6,   146,    -1,   146,    -1,   147,    -1,    63,
+      -1,    48,    -1,    64,    -1,    19,    -1,    20,    -1,    21,
+      -1,    33,    -1,     5,    -1,    58,    -1,    59,    -1,    60,
+      -1,    61,    -1,    57,    -1,    62,    -1,     4,    -1,     6,
+      -1,    53,    54,    -1,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const zztype_uint16 zzrline[] =
+{
+       0,   426,   426,   429,   430,   433,   434,   437,   438,   439,
+     440,   441,   442,   443,   444,   445,   448,   450,   452,   452,
+     456,   460,   464,   465,   468,   472,   475,   476,   479,   484,
+     487,   488,   489,   492,   493,   494,   497,   498,   504,   505,
+     508,   511,   512,   515,   516,   519,   521,   522,   528,   529,
+     530,   531,   534,   535,   539,   540,   545,   545,   551,   551,
+     561,   562,   563,   564,   565,   566,   567,   568,   573,   573,
+     580,   580,   587,   587,   591,   592,   595,   595,   600,   600,
+     606,   607,   610,   610,   614,   615,   621,   621,   628,   629,
+     628,   634,   635,   640,   641,   640,   648,   648,   653,   654,
+     654,   655,   656,   655,   663,   664,   665,   669,   670,   671,
+     672,   673,   674,   678,   682,   689,   700,   710,   711,   714,
+     715,   718,   721,   721,   722,   722,   725,   726,   727,   728,
+     731,   732,   735,   738,   740,   743,   744,   747,   748,   749,
+     751,   752,   753,   754,   755,   756,   757,   758,   759,   762,
+     763,   768,   769,   772,   773,   774,   777,   778,   779,   780,
+     783,   784,   785,   786,   787,   788,   789,   790,   791,   792,
+     795,   796,   799,   800,   803,   806,   807,   808,   809,   810,
+     811,   812,   813,   814,   815,   816,   817,   818,   819,   820,
+     821,   822,   825
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const zztname[] =
+{
+  "$end", "error", "$undefined", "IF", "AND", "NOT", "OR", "THEN", "ELSE",
+  "END", "RETURN", "DO", "FUNCTION", "ON", "GLOBAL", "VECTOR", "WHILE",
+  "INCLUDE", "EXTERN", "GE", "LE", "NE", "FOR", "TO", "BY", "NIL",
+  "OBJECT", "IMPORT", "EXPORT", "INLINE", "CASE", "OTHERWISE", "OF", "IN",
+  "REPEAT", "UNTIL", "LOOP", "WHEN", "TELL", "TASK", "ARROW", "WORD",
+  "STRING", "NUMBER", "DATE", "TIME", "ENDINLINE", "';'", "'='", "'('",
+  "')'", "':'", "','", "'['", "']'", "'.'", "'|'", "'-'", "'^'", "'*'",
+  "'/'", "'+'", "'&'", "'>'", "'<'", "$accept", "script", "block", "lines",
+  "line", "name", "declare", "@1", "import", "export", "extern",
+  "extern_name", "include", "inline", "function", "param_declare",
+  "functionheader", "super_declare", "super_list", "super", "param_list",
+  "param", "endfunction", "fname", "statement", "return", "assignement",
+  "@2", "@3", "control", "loop", "@4", "tell", "@5", "when", "@6",
+  "selections", "selection", "@7", "case", "@8", "choices", "choice", "@9",
+  "otherwise", "repeat", "@10", "for", "@11", "@12", "by", "while", "@13",
+  "@14", "if", "@15", "closeif", "@16", "@17", "@18", "definition",
+  "function_call", "inline_object", "param_or_empty", "parameters",
+  "parameter", "attribute", "@19", "@20", "attribute_list", "vector_list",
+  "matrix", "vector", "list", "number", "atom", "atom_or_number", "power",
+  "factor", "term", "condition", "conjonction", "disjonction",
+  "expression", "operator", "empty", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const zztype_uint16 zztoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295,   296,   297,   298,   299,   300,   301,    59,    61,    40,
+      41,    58,    44,    91,    93,    46,   124,    45,    94,    42,
+      47,    43,    38,    62,    60
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const zztype_uint8 zzr1[] =
+{
+       0,    65,    66,    67,    67,    68,    68,    69,    69,    69,
+      69,    69,    69,    69,    69,    69,    70,    71,    72,    71,
+      73,    74,    75,    75,    75,    76,    77,    77,    78,    79,
+      80,    80,    80,    81,    81,    81,    82,    82,    83,    83,
+      84,    85,    85,    86,    86,    87,    88,    88,    89,    89,
+      89,    89,    90,    90,    91,    91,    92,    91,    93,    91,
+      94,    94,    94,    94,    94,    94,    94,    94,    96,    95,
+      98,    97,   100,    99,   101,   101,   103,   102,   105,   104,
+     106,   106,   108,   107,   109,   109,   111,   110,   113,   114,
+     112,   115,   115,   117,   118,   116,   120,   119,   121,   122,
+     121,   123,   124,   121,   125,   125,   125,   126,   126,   126,
+     126,   126,   126,   126,   126,   126,   127,   128,   128,   129,
+     129,   130,   132,   131,   133,   131,   134,   134,   134,   134,
+     135,   135,   136,   137,   138,   139,   139,   140,   140,   140,
+     140,   140,   140,   140,   140,   140,   140,   140,   140,   141,
+     141,   142,   142,   143,   143,   143,   144,   144,   144,   144,
+     145,   145,   145,   145,   145,   145,   145,   145,   145,   145,
+     146,   146,   147,   147,   148,   149,   149,   149,   149,   149,
+     149,   149,   149,   149,   149,   149,   149,   149,   149,   149,
+     149,   149,   150
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const zztype_uint8 zzr2[] =
+{
+       0,     2,     1,     1,     1,     1,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     2,     0,     5,
+       2,     2,     2,     3,     4,     2,     2,     2,     2,     5,
+       1,     2,     3,     2,     2,     2,     1,     2,     1,     3,
+       1,     1,     3,     1,     3,     2,     1,     1,     1,     1,
+       1,     1,     1,     2,     3,     6,     0,     6,     0,     6,
+       1,     1,     1,     1,     1,     1,     1,     1,     0,     8,
+       0,     6,     0,     5,     1,     2,     0,     5,     0,     8,
+       1,     2,     0,     5,     1,     4,     0,     5,     0,     0,
+      13,     1,     2,     0,     0,     8,     0,     6,     2,     0,
+       4,     0,     0,     8,     3,     5,     2,     4,     4,     1,
+       1,     4,     3,     3,     6,     6,     2,     1,     1,     1,
+       3,     1,     0,     4,     0,     4,     1,     3,     3,     3,
+       2,     2,     1,     3,     3,     1,     2,     1,     1,     2,
+       1,     1,     1,     3,     1,     1,     1,     1,     2,     1,
+       1,     3,     1,     3,     3,     1,     3,     3,     3,     1,
+       3,     3,     3,     3,     3,     3,     3,     4,     2,     1,
+       3,     1,     3,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     2,     0
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const zztype_uint8 zzdefact[] =
+{
+     192,     0,    52,     0,     0,     0,    93,     0,     0,     0,
+     147,     0,     0,     0,     0,    86,     0,    72,     0,    16,
+     138,   140,   141,    15,     0,   192,     0,     0,     0,     2,
+       3,     5,    51,    10,    12,    13,    11,   192,    14,     8,
+     192,     7,    50,    48,     9,    65,    67,    66,    64,    63,
+      62,    61,    60,   109,    49,   110,   132,   146,   145,   144,
+       0,     4,     0,   135,     0,   137,   142,   150,   149,   152,
+     155,   159,   169,   171,   173,   174,     0,    53,   189,   182,
+     190,   178,   179,   180,   181,   176,     0,   187,   183,   184,
+     185,   186,   188,   175,   177,    46,    33,    47,    34,    17,
+       0,    26,    27,    25,     0,    35,    20,    21,     0,   192,
+       0,     0,    70,   139,   138,   106,   137,     0,   126,     0,
+     121,     0,   118,   119,   121,   117,     0,   148,     1,     6,
+       0,     0,     0,   192,     0,     0,   116,     0,    22,    30,
+     192,   131,   130,     0,     0,   168,   136,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    96,   191,    18,     0,     0,    78,     0,
+       0,     0,    74,     0,   192,     0,     0,     0,     0,   104,
+     143,   134,     0,   133,    28,     0,    54,     0,   119,     0,
+       0,     0,     0,    31,    43,     0,    41,    23,     0,   192,
+      36,     0,   113,   112,   151,   153,   154,   157,   156,   158,
+       0,   163,   164,   165,   166,   161,   160,   162,   170,   172,
+     192,     0,    94,    88,     0,     0,    68,     0,    75,    76,
+       0,     0,     0,     0,   129,   127,   128,   120,   192,   107,
+       0,   108,     0,    58,    56,     0,    32,     0,    24,    37,
+      38,    40,     0,   111,   167,     0,    19,   192,     0,   192,
+      80,     0,    87,   192,    73,   192,     0,   125,   123,   105,
+       0,     0,     0,     0,     0,     0,    44,    42,     0,     0,
+      29,    99,     0,    97,     0,     0,     0,    81,     0,    84,
+      82,     0,     0,    71,     0,   114,   115,    55,    59,    57,
+      39,    45,   101,   192,    98,     0,   192,   192,     0,   192,
+       0,    77,     0,     0,    95,     0,     0,    91,     0,    79,
+       0,    69,     0,   100,    92,    89,    85,    83,   102,   192,
+     192,     0,     0,     0,   103,    90
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const zztype_int16 zzdefgoto[] =
+{
+      -1,    28,    29,    30,    31,    65,    33,   221,    34,    35,
+      36,    37,    38,   136,    39,   138,    40,   199,   249,   250,
+     195,   196,   280,    96,    41,    42,    43,   275,   274,    44,
+      45,   263,    46,   174,    47,   111,   171,   172,   265,    48,
+     224,   259,   260,   309,   288,    49,   109,    50,   258,   329,
+     316,    51,   100,   257,    52,   220,   283,   303,   312,   330,
+      53,    66,    55,   121,   122,   123,   118,   176,   175,   234,
+      56,    57,    58,    59,    67,    68,    69,    70,    71,    72,
+      73,    74,    75,   124,    97,    61
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -279
+static const zztype_int16 zzpact[] =
+{
+     417,   466,   466,   355,   355,   -15,  -279,    16,   355,   -15,
+    -279,   355,   -15,   -15,   466,  -279,   -15,  -279,   466,  -279,
+    -279,    -7,  -279,  -279,    34,   466,   466,   535,    68,  -279,
+     417,  -279,    59,  -279,  -279,  -279,  -279,    23,  -279,  -279,
+      23,  -279,  -279,  -279,  -279,  -279,  -279,  -279,  -279,  -279,
+    -279,  -279,  -279,  -279,    27,  -279,    33,  -279,    33,  -279,
+     -19,  -279,   466,  -279,   508,    24,  -279,  -279,   -19,    37,
+    -279,   -37,    -1,    22,    96,    95,    97,  -279,  -279,  -279,
+    -279,  -279,  -279,  -279,  -279,  -279,    61,  -279,  -279,  -279,
+    -279,  -279,  -279,  -279,  -279,  -279,  -279,  -279,  -279,    72,
+     466,  -279,  -279,  -279,    73,  -279,  -279,  -279,    84,   417,
+      93,   466,  -279,  -279,    74,  -279,    94,    77,    78,    82,
+      86,    85,  -279,    88,  -279,  -279,    90,   -19,  -279,  -279,
+     101,   -15,   466,   487,   466,    28,  -279,   -21,    99,  -279,
+      91,  -279,  -279,   466,    51,    22,  -279,   529,   529,   529,
+     529,   529,   529,   115,   529,   529,   529,   529,   529,   529,
+     529,   466,   466,  -279,  -279,  -279,   138,   466,  -279,   116,
+     466,   113,  -279,   102,   417,   108,   109,   487,   487,  -279,
+    -279,  -279,   466,  -279,  -279,   114,  -279,   100,   112,   117,
+     111,   120,   127,  -279,   125,    46,  -279,   151,   535,   417,
+    -279,   128,  -279,  -279,  -279,  -279,  -279,   -37,   -37,   -37,
+     529,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    22,    96,
+     417,   466,  -279,  -279,   466,   466,  -279,   144,  -279,  -279,
+     174,   466,   466,   135,  -279,   134,  -279,  -279,   487,  -279,
+     487,  -279,   139,  -279,  -279,   -15,  -279,   -15,  -279,   136,
+    -279,    27,   182,  -279,    -1,    54,  -279,   417,   169,   444,
+    -279,   142,  -279,   417,  -279,   417,   156,  -279,  -279,  -279,
+     487,   146,   147,   466,   466,   466,  -279,  -279,   535,   355,
+    -279,   195,   199,  -279,   194,   466,   153,  -279,   196,  -279,
+    -279,   197,   198,  -279,   134,  -279,  -279,  -279,  -279,  -279,
+    -279,  -279,  -279,   417,  -279,   200,   186,   417,   187,   417,
+     176,  -279,   466,    54,  -279,   466,   207,  -279,   210,  -279,
+     212,  -279,   215,  -279,  -279,  -279,  -279,  -279,  -279,   417,
+     417,   214,    54,   202,  -279,  -279
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const zztype_int16 zzpgoto[] =
+{
+    -279,  -279,    92,  -279,   201,     0,  -279,  -279,  -279,  -279,
+    -279,  -279,  -279,    29,  -279,   185,  -279,  -279,  -279,   -51,
+    -279,   -18,  -279,    17,  -279,  -279,  -279,  -279,  -279,  -279,
+    -279,  -279,  -279,  -279,  -279,  -279,  -279,    57,  -279,  -279,
+    -279,  -279,   -22,  -279,  -279,  -279,  -279,  -279,  -279,  -279,
+    -279,  -279,  -279,  -279,  -279,  -279,  -278,  -279,  -279,  -279,
+    -279,    15,  -279,  -132,    18,    -6,  -279,  -279,  -279,    -5,
+    -279,  -279,    55,  -279,  -279,    10,  -279,  -116,   -85,  -108,
+     -56,    81,  -279,    79,  -279,   -23
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -143
+static const zztype_int16 zztable[] =
+{
+      32,   187,   125,    95,    95,    99,   145,   102,    95,   104,
+      60,    95,   106,   107,   139,    54,   110,   139,   117,   119,
+      19,    98,   148,   149,   116,   103,    19,   153,   105,   193,
+      32,   204,   205,   206,   143,   323,   144,   127,   113,    62,
+      60,   154,   155,   156,   126,    54,   211,   212,   213,   214,
+     215,   216,   217,   130,   334,   157,   150,    19,   101,    10,
+     151,   152,   281,   282,   131,   207,   208,   209,   128,    19,
+     158,   191,   137,   133,   127,    19,   114,    63,    21,    22,
+      76,    77,  -142,    24,   115,   159,   160,    25,   130,    26,
+      26,    64,    19,   108,   202,   147,   246,   112,   247,   131,
+     161,   162,   254,   120,   163,   218,   271,   132,   133,    32,
+     125,   141,   134,   142,   135,   164,   168,   200,    62,    60,
+     165,   167,   227,   130,    54,  -124,   170,   188,   189,   177,
+     178,   185,   179,   116,   131,   192,   180,   194,    10,   181,
+     182,   197,   198,   133,   203,  -122,   183,   184,   210,   222,
+     239,   225,   190,   229,    19,    20,    63,    21,    22,   231,
+     232,   201,    24,   238,   240,   242,    25,   241,   243,    26,
+      64,   188,   235,   236,    32,   244,   245,   116,   116,   166,
+     130,   264,   253,   266,    60,   269,   270,   273,   278,    54,
+     173,   279,   285,   290,   293,   233,   295,   296,   302,    32,
+     237,   169,   304,   305,   307,   308,   310,   311,    60,    60,
+     315,   186,   321,   251,    54,   125,   314,   319,   325,   326,
+      32,   327,   328,   333,   335,   140,   248,   300,   228,   277,
+      60,   129,   188,   272,   188,    54,   289,   287,   116,     0,
+     116,     0,   261,   219,     0,   276,   223,   194,     0,   226,
+     173,     0,     0,     0,     0,     0,     0,    32,   237,     0,
+       0,     0,     0,    32,   294,    32,   230,    60,     0,     0,
+     116,     0,    54,    60,     0,    60,     0,   261,    54,    95,
+      54,     0,     0,   317,     0,     0,     0,     0,    60,     0,
+       0,   252,     0,   251,     0,     0,   301,     0,     0,     0,
+     256,     0,     0,    32,   262,     0,     0,    32,     0,    32,
+     267,   268,   255,    60,     0,     0,     0,    60,    54,    60,
+       0,     0,    54,     0,    54,     0,     0,     0,     0,    32,
+      32,     0,     0,     0,     0,     0,     0,     0,     0,    60,
+      60,     0,     0,     0,    54,    54,     0,     0,     0,   284,
+       0,     0,   297,   298,   299,   291,     0,   292,     0,    78,
+      79,    80,     0,     0,   306,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    81,    82,    83,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    84,     0,
+       0,   322,     0,     0,   324,   313,    19,     0,     0,   318,
+       0,   320,     0,    85,     0,     0,     0,     0,    86,     0,
+       0,     0,    87,    88,    89,    90,    91,    92,    93,    94,
+       1,   331,   332,     0,     0,     0,     0,     2,     0,     3,
+       4,     5,     0,     6,     7,     8,     0,     0,     0,     9,
+       0,     0,    10,    11,    12,    13,     0,    14,     0,    62,
+       0,    15,     0,    16,    17,    18,     0,     0,    19,    20,
+       0,    21,    22,     0,    23,     0,    24,     0,     0,    10,
+      25,    62,     0,    26,    27,   286,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    19,    20,    63,    21,    22,
+       0,    10,    62,    24,     0,     0,     0,    25,     0,     0,
+      26,    64,     0,     0,     0,     0,     0,    19,    20,    63,
+      21,    22,    10,     0,     0,    24,     0,     0,     0,    25,
+       0,     0,    26,    64,     0,     0,     0,     0,    19,   114,
+      63,    21,    22,    10,     0,     0,    24,     0,     0,     0,
+      25,     0,     0,    26,    64,     0,     0,     0,     0,    19,
+      20,   146,    21,    22,    10,     0,     0,    24,     0,     0,
+      10,    25,     0,     0,    26,    27,     0,     0,     0,     0,
+      19,    20,    63,    21,    22,     0,    19,    20,    24,    21,
+      22,     0,    25,     0,    24,    26,    64,     0,    25,     0,
+       0,    26,    27
+};
+
+static const zztype_int16 zzcheck[] =
+{
+       0,   133,    25,     3,     4,     5,    62,     7,     8,     9,
+       0,    11,    12,    13,    37,     0,    16,    40,    24,    24,
+      41,     4,    59,    60,    24,     8,    41,     5,    11,    50,
+      30,   147,   148,   149,    53,   313,    55,    27,    45,     5,
+      30,    19,    20,    21,    26,    30,   154,   155,   156,   157,
+     158,   159,   160,    29,   332,    33,    57,    41,    42,    25,
+      61,    62,     8,     9,    40,   150,   151,   152,     0,    41,
+      48,    43,    49,    49,    64,    41,    42,    43,    44,    45,
+       1,     2,    55,    49,    50,    63,    64,    53,    29,    56,
+      56,    57,    41,    14,    43,    58,    50,    18,    52,    40,
+       4,     6,   210,    24,     7,   161,   238,    48,    49,   109,
+     133,    56,    53,    58,    55,    54,    32,   140,     5,   109,
+      48,    48,     9,    29,   109,    51,    33,   133,   133,    52,
+      52,   131,    50,   133,    40,   135,    50,   137,    25,    54,
+      52,    42,    51,    49,   144,    51,    56,    46,    33,    11,
+      50,    35,   134,    51,    41,    42,    43,    44,    45,    51,
+      51,   143,    49,    49,    52,    54,    53,    50,    48,    56,
+      57,   177,   178,   178,   174,    48,    51,   177,   178,   100,
+      29,    37,    54,     9,   174,    50,    52,    48,    52,   174,
+     111,     9,    23,    51,    38,   177,    50,    50,     3,   199,
+     182,   109,     3,     9,    51,     9,     9,     9,   198,   199,
+      24,   132,    36,   198,   199,   238,    16,    30,    11,     9,
+     220,     9,     7,     9,    22,    40,   197,   278,   171,   247,
+     220,    30,   238,   238,   240,   220,   259,   259,   238,    -1,
+     240,    -1,   224,   162,    -1,   245,   167,   247,    -1,   170,
+     171,    -1,    -1,    -1,    -1,    -1,    -1,   257,   240,    -1,
+      -1,    -1,    -1,   263,   270,   265,   174,   257,    -1,    -1,
+     270,    -1,   257,   263,    -1,   265,    -1,   259,   263,   279,
+     265,    -1,    -1,   306,    -1,    -1,    -1,    -1,   278,    -1,
+      -1,   199,    -1,   278,    -1,    -1,   279,    -1,    -1,    -1,
+     221,    -1,    -1,   303,   225,    -1,    -1,   307,    -1,   309,
+     231,   232,   220,   303,    -1,    -1,    -1,   307,   303,   309,
+      -1,    -1,   307,    -1,   309,    -1,    -1,    -1,    -1,   329,
+     330,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   329,
+     330,    -1,    -1,    -1,   329,   330,    -1,    -1,    -1,   257,
+      -1,    -1,   273,   274,   275,   263,    -1,   265,    -1,     4,
+       5,     6,    -1,    -1,   285,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    19,    20,    21,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,    -1,
+      -1,   312,    -1,    -1,   315,   303,    41,    -1,    -1,   307,
+      -1,   309,    -1,    48,    -1,    -1,    -1,    -1,    53,    -1,
+      -1,    -1,    57,    58,    59,    60,    61,    62,    63,    64,
+       3,   329,   330,    -1,    -1,    -1,    -1,    10,    -1,    12,
+      13,    14,    -1,    16,    17,    18,    -1,    -1,    -1,    22,
+      -1,    -1,    25,    26,    27,    28,    -1,    30,    -1,     5,
+      -1,    34,    -1,    36,    37,    38,    -1,    -1,    41,    42,
+      -1,    44,    45,    -1,    47,    -1,    49,    -1,    -1,    25,
+      53,     5,    -1,    56,    57,    31,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    41,    42,    43,    44,    45,
+      -1,    25,     5,    49,    -1,    -1,    -1,    53,    -1,    -1,
+      56,    57,    -1,    -1,    -1,    -1,    -1,    41,    42,    43,
+      44,    45,    25,    -1,    -1,    49,    -1,    -1,    -1,    53,
+      -1,    -1,    56,    57,    -1,    -1,    -1,    -1,    41,    42,
+      43,    44,    45,    25,    -1,    -1,    49,    -1,    -1,    -1,
+      53,    -1,    -1,    56,    57,    -1,    -1,    -1,    -1,    41,
+      42,    43,    44,    45,    25,    -1,    -1,    49,    -1,    -1,
+      25,    53,    -1,    -1,    56,    57,    -1,    -1,    -1,    -1,
+      41,    42,    43,    44,    45,    -1,    41,    42,    49,    44,
+      45,    -1,    53,    -1,    49,    56,    57,    -1,    53,    -1,
+      -1,    56,    57
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const zztype_uint8 zzstos[] =
+{
+       0,     3,    10,    12,    13,    14,    16,    17,    18,    22,
+      25,    26,    27,    28,    30,    34,    36,    37,    38,    41,
+      42,    44,    45,    47,    49,    53,    56,    57,    66,    67,
+      68,    69,    70,    71,    73,    74,    75,    76,    77,    79,
+      81,    89,    90,    91,    94,    95,    97,    99,   104,   110,
+     112,   116,   119,   125,   126,   127,   135,   136,   137,   138,
+     140,   150,     5,    43,    57,    70,   126,   139,   140,   141,
+     142,   143,   144,   145,   146,   147,   148,   148,     4,     5,
+       6,    19,    20,    21,    33,    48,    53,    57,    58,    59,
+      60,    61,    62,    63,    64,    70,    88,   149,    88,    70,
+     117,    42,    70,    88,    70,    88,    70,    70,   148,   111,
+      70,   100,   148,    45,    42,    50,    70,   130,   131,   134,
+     148,   128,   129,   130,   148,   150,   129,   140,     0,    69,
+      29,    40,    48,    49,    53,    55,    78,    49,    80,   150,
+      80,   137,   137,    53,    55,   145,    43,    58,    59,    60,
+      57,    61,    62,     5,    19,    20,    21,    33,    48,    63,
+      64,     4,     6,     7,    54,    48,   148,    48,    32,    67,
+      33,   101,   102,   148,    98,   133,   132,    52,    52,    50,
+      50,    54,    52,    56,    46,    70,   148,   128,   130,   134,
+     129,    43,    70,    50,    70,    85,    86,    42,    51,    82,
+     150,   129,    43,    70,   142,   142,   142,   143,   143,   143,
+      33,   144,   144,   144,   144,   144,   144,   144,   145,   146,
+     120,    72,    11,   148,   105,    35,   148,     9,   102,    51,
+      67,    51,    51,   129,   134,   130,   134,   129,    49,    50,
+      52,    50,    54,    48,    48,    51,    50,    52,    78,    83,
+      84,   126,    67,    54,   144,    67,   148,   118,   113,   106,
+     107,   129,   148,    96,    37,   103,     9,   148,   148,    50,
+      52,   128,   134,    48,    93,    92,    70,    86,    52,     9,
+      87,     8,     9,   121,    67,    23,    31,   107,   109,   150,
+      51,    67,    67,    38,   130,    50,    50,   148,   148,   148,
+      84,    88,     3,   122,     3,     9,   148,    51,     9,   108,
+       9,     9,   123,    67,    16,    24,   115,   150,    67,    30,
+      67,    36,   148,   121,   148,    11,     9,     9,     7,   114,
+     124,    67,    67,     9,   121,    22
+};
+
+#define zzerrok		(zzerrstatus = 0)
+#define zzclearin	(zzchar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto zzacceptlab
+#define YYABORT		goto zzabortlab
+#define YYERROR		goto zzerrorlab
+
+
+/* Like YYERROR except do call zzerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto zzerrlab
+
+#define YYRECOVERING()  (!!zzerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (zzchar == YYEMPTY && zzlen == 1)				\
+    {								\
+      zzchar = (Token);						\
+      zzlval = (Value);						\
+      zztoken = YYTRANSLATE (zzchar);				\
+      YYPOPSTACK (1);						\
+      goto zzbackup;						\
+    }								\
+  else								\
+    {								\
+      zzerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `zzlex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX zzlex (YYLEX_PARAM)
+#else
+# define YYLEX zzlex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (zzdebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (zzdebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      zz_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_symbol_value_print (FILE *zzoutput, int zztype, YYSTYPE const * const zzvaluep)
+#else
+static void
+zz_symbol_value_print (zzoutput, zztype, zzvaluep)
+    FILE *zzoutput;
+    int zztype;
+    YYSTYPE const * const zzvaluep;
+#endif
+{
+  if (!zzvaluep)
+    return;
+# ifdef YYPRINT
+  if (zztype < YYNTOKENS)
+    YYPRINT (zzoutput, zztoknum[zztype], *zzvaluep);
+# else
+  YYUSE (zzoutput);
+# endif
+  switch (zztype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_symbol_print (FILE *zzoutput, int zztype, YYSTYPE const * const zzvaluep)
+#else
+static void
+zz_symbol_print (zzoutput, zztype, zzvaluep)
+    FILE *zzoutput;
+    int zztype;
+    YYSTYPE const * const zzvaluep;
+#endif
+{
+  if (zztype < YYNTOKENS)
+    YYFPRINTF (zzoutput, "token %s (", zztname[zztype]);
+  else
+    YYFPRINTF (zzoutput, "nterm %s (", zztname[zztype]);
+
+  zz_symbol_value_print (zzoutput, zztype, zzvaluep);
+  YYFPRINTF (zzoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| zz_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_stack_print (zztype_int16 *bottom, zztype_int16 *top)
+#else
+static void
+zz_stack_print (bottom, top)
+    zztype_int16 *bottom;
+    zztype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (zzdebug)							\
+    zz_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zz_reduce_print (YYSTYPE *zzvsp, int zzrule)
+#else
+static void
+zz_reduce_print (zzvsp, zzrule)
+    YYSTYPE *zzvsp;
+    int zzrule;
+#endif
+{
+  int zznrhs = zzr2[zzrule];
+  int zzi;
+  unsigned long int zzlno = zzrline[zzrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     zzrule - 1, zzlno);
+  /* The symbols being reduced.  */
+  for (zzi = 0; zzi < zznrhs; zzi++)
+    {
+      fprintf (stderr, "   $%d = ", zzi + 1);
+      zz_symbol_print (stderr, zzrhs[zzprhs[zzrule] + zzi],
+		       &(zzvsp[(zzi + 1) - (zznrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (zzdebug)				\
+    zz_reduce_print (zzvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int zzdebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+

+
+#if YYERROR_VERBOSE
+
+# ifndef zzstrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define zzstrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+zzstrlen (const char *zzstr)
+#else
+static YYSIZE_T
+zzstrlen (zzstr)
+    const char *zzstr;
+#endif
+{
+  YYSIZE_T zzlen;
+  for (zzlen = 0; zzstr[zzlen]; zzlen++)
+    continue;
+  return zzlen;
+}
+#  endif
+# endif
+
+# ifndef zzstpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define zzstpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+zzstpcpy (char *zzdest, const char *zzsrc)
+#else
+static char *
+zzstpcpy (zzdest, zzsrc)
+    char *zzdest;
+    const char *zzsrc;
+#endif
+{
+  char *zzd = zzdest;
+  const char *zzs = zzsrc;
+
+  while ((*zzd++ = *zzs++) != '\0')
+    continue;
+
+  return zzd - 1;
+}
+#  endif
+# endif
+
+# ifndef zztnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for zzerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from zztname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+zztnamerr (char *zzres, const char *zzstr)
+{
+  if (*zzstr == '"')
+    {
+      YYSIZE_T zzn = 0;
+      char const *zzp = zzstr;
+
+      for (;;)
+	switch (*++zzp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++zzp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (zzres)
+	      zzres[zzn] = *zzp;
+	    zzn++;
+	    break;
+
+	  case '"':
+	    if (zzres)
+	      zzres[zzn] = '\0';
+	    return zzn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! zzres)
+    return zzstrlen (zzstr);
+
+  return zzstpcpy (zzres, zzstr) - zzres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+zzsyntax_error (char *zzresult, int zzstate, int zzchar)
+{
+  int zzn = zzpact[zzstate];
+
+  if (! (YYPACT_NINF < zzn && zzn <= YYLAST))
+    return 0;
+  else
+    {
+      int zztype = YYTRANSLATE (zzchar);
+      YYSIZE_T zzsize0 = zztnamerr (0, zztname[zztype]);
+      YYSIZE_T zzsize = zzsize0;
+      YYSIZE_T zzsize1;
+      int zzsize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *zzarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int zzx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *zzfmt;
+      char const *zzf;
+      static char const zzunexpected[] = "syntax error, unexpected %s";
+      static char const zzexpecting[] = ", expecting %s";
+      static char const zzor[] = " or %s";
+      char zzformat[sizeof zzunexpected
+		    + sizeof zzexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof zzor - 1))];
+      char const *zzprefix = zzexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int zzxbegin = zzn < 0 ? -zzn : 0;
+
+      /* Stay within bounds of both zzcheck and zztname.  */
+      int zzchecklim = YYLAST - zzn + 1;
+      int zzxend = zzchecklim < YYNTOKENS ? zzchecklim : YYNTOKENS;
+      int zzcount = 1;
+
+      zzarg[0] = zztname[zztype];
+      zzfmt = zzstpcpy (zzformat, zzunexpected);
+
+      for (zzx = zzxbegin; zzx < zzxend; ++zzx)
+	if (zzcheck[zzx + zzn] == zzx && zzx != YYTERROR)
+	  {
+	    if (zzcount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		zzcount = 1;
+		zzsize = zzsize0;
+		zzformat[sizeof zzunexpected - 1] = '\0';
+		break;
+	      }
+	    zzarg[zzcount++] = zztname[zzx];
+	    zzsize1 = zzsize + zztnamerr (0, zztname[zzx]);
+	    zzsize_overflow |= (zzsize1 < zzsize);
+	    zzsize = zzsize1;
+	    zzfmt = zzstpcpy (zzfmt, zzprefix);
+	    zzprefix = zzor;
+	  }
+
+      zzf = YY_(zzformat);
+      zzsize1 = zzsize + zzstrlen (zzf);
+      zzsize_overflow |= (zzsize1 < zzsize);
+      zzsize = zzsize1;
+
+      if (zzsize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (zzresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *zzp = zzresult;
+	  int zzi = 0;
+	  while ((*zzp = *zzf) != '\0')
+	    {
+	      if (*zzp == '%' && zzf[1] == 's' && zzi < zzcount)
+		{
+		  zzp += zztnamerr (zzp, zzarg[zzi++]);
+		  zzf += 2;
+		}
+	      else
+		{
+		  zzp++;
+		  zzf++;
+		}
+	    }
+	}
+      return zzsize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+

+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+zzdestruct (const char *zzmsg, int zztype, YYSTYPE *zzvaluep)
+#else
+static void
+zzdestruct (zzmsg, zztype, zzvaluep)
+    const char *zzmsg;
+    int zztype;
+    YYSTYPE *zzvaluep;
+#endif
+{
+  YYUSE (zzvaluep);
+
+  if (!zzmsg)
+    zzmsg = "Deleting";
+  YY_SYMBOL_PRINT (zzmsg, zztype, zzvaluep, zzlocationp);
+
+  switch (zztype)
+    {
+
+      default:
+	break;
+    }
+}
+

+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int zzparse (void *YYPARSE_PARAM);
+#else
+int zzparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int zzparse (void);
+#else
+int zzparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int zzchar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE zzlval;
+
+/* Number of syntax errors so far.  */
+int zznerrs;
+
+
+
+/*----------.
+| zzparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+zzparse (void *YYPARSE_PARAM)
+#else
+int
+zzparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+zzparse (void)
+#else
+int
+zzparse ()
+
+#endif
+#endif
+{
+  
+  int zzstate;
+  int zzn;
+  int zzresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int zzerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int zztoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char zzmsgbuf[128];
+  char *zzmsg = zzmsgbuf;
+  YYSIZE_T zzmsg_alloc = sizeof zzmsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `zzss': related to states,
+     `zzvs': related to semantic values,
+     `zzls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow zzoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  zztype_int16 zzssa[YYINITDEPTH];
+  zztype_int16 *zzss = zzssa;
+  zztype_int16 *zzssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE zzvsa[YYINITDEPTH];
+  YYSTYPE *zzvs = zzvsa;
+  YYSTYPE *zzvsp;
+
+
+
+#define YYPOPSTACK(N)   (zzvsp -= (N), zzssp -= (N))
+
+  YYSIZE_T zzstacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE zzval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int zzlen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  zzstate = 0;
+  zzerrstatus = 0;
+  zznerrs = 0;
+  zzchar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  zzssp = zzss;
+  zzvsp = zzvs;
+
+  goto zzsetstate;
+
+/*------------------------------------------------------------.
+| zznewstate -- Push a new state, which is found in zzstate.  |
+`------------------------------------------------------------*/
+ zznewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  zzssp++;
+
+ zzsetstate:
+  *zzssp = zzstate;
+
+  if (zzss + zzstacksize - 1 <= zzssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T zzsize = zzssp - zzss + 1;
+
+#ifdef zzoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *zzvs1 = zzvs;
+	zztype_int16 *zzss1 = zzss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if zzoverflow is a macro.  */
+	zzoverflow (YY_("memory exhausted"),
+		    &zzss1, zzsize * sizeof (*zzssp),
+		    &zzvs1, zzsize * sizeof (*zzvsp),
+
+		    &zzstacksize);
+
+	zzss = zzss1;
+	zzvs = zzvs1;
+      }
+#else /* no zzoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto zzexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= zzstacksize)
+	goto zzexhaustedlab;
+      zzstacksize *= 2;
+      if (YYMAXDEPTH < zzstacksize)
+	zzstacksize = YYMAXDEPTH;
+
+      {
+	zztype_int16 *zzss1 = zzss;
+	union zzalloc *zzptr =
+	  (union zzalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (zzstacksize));
+	if (! zzptr)
+	  goto zzexhaustedlab;
+	YYSTACK_RELOCATE (zzss);
+	YYSTACK_RELOCATE (zzvs);
+
+#  undef YYSTACK_RELOCATE
+	if (zzss1 != zzssa)
+	  YYSTACK_FREE (zzss1);
+      }
+# endif
+#endif /* no zzoverflow */
+
+      zzssp = zzss + zzsize - 1;
+      zzvsp = zzvs + zzsize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) zzstacksize));
+
+      if (zzss + zzstacksize - 1 <= zzssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", zzstate));
+
+  goto zzbackup;
+
+/*-----------.
+| zzbackup.  |
+`-----------*/
+zzbackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  zzn = zzpact[zzstate];
+  if (zzn == YYPACT_NINF)
+    goto zzdefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (zzchar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      zzchar = YYLEX;
+    }
+
+  if (zzchar <= YYEOF)
+    {
+      zzchar = zztoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      zztoken = YYTRANSLATE (zzchar);
+      YY_SYMBOL_PRINT ("Next token is", zztoken, &zzlval, &zzlloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  zzn += zztoken;
+  if (zzn < 0 || YYLAST < zzn || zzcheck[zzn] != zztoken)
+    goto zzdefault;
+  zzn = zztable[zzn];
+  if (zzn <= 0)
+    {
+      if (zzn == 0 || zzn == YYTABLE_NINF)
+	goto zzerrlab;
+      zzn = -zzn;
+      goto zzreduce;
+    }
+
+  if (zzn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (zzerrstatus)
+    zzerrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", zztoken, &zzlval, &zzlloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (zzchar != YYEOF)
+    zzchar = YYEMPTY;
+
+  zzstate = zzn;
+  *++zzvsp = zzlval;
+
+  goto zznewstate;
+
+
+/*-----------------------------------------------------------.
+| zzdefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+zzdefault:
+  zzn = zzdefact[zzstate];
+  if (zzn == 0)
+    goto zzerrlab;
+  goto zzreduce;
+
+
+/*-----------------------------.
+| zzreduce -- Do a reduction.  |
+`-----------------------------*/
+zzreduce:
+  /* zzn is the number of a rule to reduce with.  */
+  zzlen = zzr2[zzn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  zzval = zzvsp[1-zzlen];
+
+
+  YY_REDUCE_PRINT (zzn);
+  switch (zzn)
+    {
+        case 2:
+#line 426 "macroy.y"
+    {return_function(0);}
+    break;
+
+  case 17:
+#line 450 "macroy.y"
+    { start_global((zzvsp[(2) - (2)].str)); push("0",PUSH_NUMBER); 
+						pop((zzvsp[(2) - (2)].str),0); end_global((zzvsp[(2) - (2)].str));free((zzvsp[(2) - (2)].str)); }
+    break;
+
+  case 18:
+#line 452 "macroy.y"
+    { start_global((zzvsp[(2) - (3)].str));}
+    break;
+
+  case 19:
+#line 453 "macroy.y"
+    { pop((zzvsp[(2) - (5)].str),0); end_global((zzvsp[(2) - (5)].str));free((zzvsp[(2) - (5)].str)); }
+    break;
+
+  case 20:
+#line 456 "macroy.y"
+    { push((zzvsp[(2) - (2)].str),PUSH_STRING); 
+					   call("import",1); pop((zzvsp[(2) - (2)].str),0); free((zzvsp[(2) - (2)].str)); }
+    break;
+
+  case 21:
+#line 460 "macroy.y"
+    { push((zzvsp[(2) - (2)].str),PUSH_STRING);call("export",1); 
+						pop(NULL,0);free((zzvsp[(2) - (2)].str)); }
+    break;
+
+  case 22:
+#line 464 "macroy.y"
+    { end_function(NULL);}
+    break;
+
+  case 23:
+#line 466 "macroy.y"
+    { extern_command((zzvsp[(3) - (3)].str),NULL); end_function(NULL); free((zzvsp[(3) - (3)].str));}
+    break;
+
+  case 24:
+#line 469 "macroy.y"
+    { extern_command((zzvsp[(3) - (4)].str),(zzvsp[(4) - (4)].str)); end_function(NULL);free((zzvsp[(3) - (4)].str));free((zzvsp[(4) - (4)].str));}
+    break;
+
+  case 25:
+#line 472 "macroy.y"
+    { begin_function((zzvsp[(2) - (2)].str),0,0,0); free((zzvsp[(2) - (2)].str)); }
+    break;
+
+  case 26:
+#line 475 "macroy.y"
+    { include((zzvsp[(2) - (2)].str)); free((zzvsp[(2) - (2)].str));}
+    break;
+
+  case 27:
+#line 476 "macroy.y"
+    { include((zzvsp[(2) - (2)].str)); free((zzvsp[(2) - (2)].str));}
+    break;
+
+  case 28:
+#line 479 "macroy.y"
+    { (zzval.str) = (zzvsp[(2) - (2)].str); }
+    break;
+
+  case 30:
+#line 487 "macroy.y"
+    { argument_count(-1); }
+    break;
+
+  case 31:
+#line 488 "macroy.y"
+    { argument_count(0);  }
+    break;
+
+  case 32:
+#line 489 "macroy.y"
+    { argument_count((zzvsp[(2) - (3)].num)); }
+    break;
+
+  case 33:
+#line 492 "macroy.y"
+    { begin_function((zzvsp[(2) - (2)].str),0,1,0); free((zzvsp[(2) - (2)].str));}
+    break;
+
+  case 34:
+#line 493 "macroy.y"
+    { begin_function((zzvsp[(2) - (2)].str),1,1,0); free((zzvsp[(2) - (2)].str));}
+    break;
+
+  case 35:
+#line 494 "macroy.y"
+    { begin_function((zzvsp[(2) - (2)].str),1,1,1); free((zzvsp[(2) - (2)].str));}
+    break;
+
+  case 37:
+#line 498 "macroy.y"
+    { 
+						call("list",(zzvsp[(2) - (2)].num));
+						pop(".super",0);
+						}
+    break;
+
+  case 38:
+#line 504 "macroy.y"
+    { (zzval.num) = 1; }
+    break;
+
+  case 39:
+#line 505 "macroy.y"
+    { (zzval.num) = (zzvsp[(1) - (3)].num) + 1; }
+    break;
+
+  case 41:
+#line 511 "macroy.y"
+    { (zzval.num) = 1;      }
+    break;
+
+  case 42:
+#line 512 "macroy.y"
+    { (zzval.num) = (zzvsp[(1) - (3)].num) + 1; }
+    break;
+
+  case 43:
+#line 515 "macroy.y"
+    { param((zzvsp[(1) - (1)].str),NULL); free((zzvsp[(1) - (1)].str)); }
+    break;
+
+  case 44:
+#line 516 "macroy.y"
+    { param((zzvsp[(1) - (3)].str),(zzvsp[(3) - (3)].str)); free((zzvsp[(1) - (3)].str));free((zzvsp[(3) - (3)].str));}
+    break;
+
+  case 45:
+#line 519 "macroy.y"
+    { end_function((zzvsp[(2) - (2)].str));free((zzvsp[(2) - (2)].str)); }
+    break;
+
+  case 49:
+#line 529 "macroy.y"
+    { pop(NULL,0); }
+    break;
+
+  case 51:
+#line 531 "macroy.y"
+    { call((zzvsp[(1) - (1)].str),0);pop(NULL,0);free((zzvsp[(1) - (1)].str));}
+    break;
+
+  case 52:
+#line 534 "macroy.y"
+    { return_function(0); }
+    break;
+
+  case 53:
+#line 535 "macroy.y"
+    { return_function(1); }
+    break;
+
+  case 54:
+#line 539 "macroy.y"
+    { pop((zzvsp[(1) - (3)].str),0);free((zzvsp[(1) - (3)].str)); }
+    break;
+
+  case 55:
+#line 541 "macroy.y"
+    { 
+											   pop((zzvsp[(1) - (6)].str),(zzvsp[(3) - (6)].num));
+											   free((zzvsp[(1) - (6)].str));
+											 }
+    break;
+
+  case 56:
+#line 545 "macroy.y"
+    { push((zzvsp[(3) - (4)].str),PUSH_STRING); }
+    break;
+
+  case 57:
+#line 546 "macroy.y"
+    { 
+											   pop((zzvsp[(1) - (6)].str),1);
+											   free((zzvsp[(1) - (6)].str));
+											   free((zzvsp[(3) - (6)].str));
+											 }
+    break;
+
+  case 58:
+#line 551 "macroy.y"
+    { push((zzvsp[(3) - (4)].str),PUSH_NUMBER); }
+    break;
+
+  case 59:
+#line 552 "macroy.y"
+    { 
+											   pop((zzvsp[(1) - (6)].str),1);
+											   free((zzvsp[(1) - (6)].str));
+											   free((zzvsp[(3) - (6)].str));
+											 }
+    break;
+
+  case 68:
+#line 573 "macroy.y"
+    { begin_loop((zzvsp[(2) - (4)].str)); }
+    break;
+
+  case 69:
+#line 575 "macroy.y"
+    { end_loop();     }
+    break;
+
+  case 70:
+#line 580 "macroy.y"
+    { call(".push.dict",1);pop(NULL,0); }
+    break;
+
+  case 71:
+#line 582 "macroy.y"
+    { call(".pop.dict",0);pop(NULL,0);  }
+    break;
+
+  case 72:
+#line 587 "macroy.y"
+    { begin_when(); }
+    break;
+
+  case 73:
+#line 589 "macroy.y"
+    { end_when(); }
+    break;
+
+  case 76:
+#line 595 "macroy.y"
+    { begin_selection(); }
+    break;
+
+  case 77:
+#line 596 "macroy.y"
+    { end_selection(); }
+    break;
+
+  case 78:
+#line 600 "macroy.y"
+    { begin_case();    }
+    break;
+
+  case 79:
+#line 603 "macroy.y"
+    { end_case();      }
+    break;
+
+  case 82:
+#line 610 "macroy.y"
+    { begin_choice((zzvsp[(1) - (2)].num));  }
+    break;
+
+  case 83:
+#line 611 "macroy.y"
+    { end_choice();    }
+    break;
+
+  case 86:
+#line 621 "macroy.y"
+    { begin_repeat(); }
+    break;
+
+  case 87:
+#line 623 "macroy.y"
+    { end_until();    }
+    break;
+
+  case 88:
+#line 628 "macroy.y"
+    { pop((zzvsp[(2) - (4)].str),0); }
+    break;
+
+  case 89:
+#line 629 "macroy.y"
+    { begin_for((zzvsp[(2) - (9)].str),(zzvsp[(8) - (9)].num)); }
+    break;
+
+  case 90:
+#line 631 "macroy.y"
+    { end_for((zzvsp[(2) - (13)].str)); free((zzvsp[(2) - (13)].str)); }
+    break;
+
+  case 91:
+#line 634 "macroy.y"
+    { (zzval.num) = 0 ; }
+    break;
+
+  case 92:
+#line 635 "macroy.y"
+    { (zzval.num) = 1;  }
+    break;
+
+  case 93:
+#line 640 "macroy.y"
+    { begin_while(); }
+    break;
+
+  case 94:
+#line 641 "macroy.y"
+    { do_while();    }
+    break;
+
+  case 95:
+#line 643 "macroy.y"
+    { end_while() ;  }
+    break;
+
+  case 96:
+#line 648 "macroy.y"
+    { begin_if();    }
+    break;
+
+  case 98:
+#line 653 "macroy.y"
+    { end_if();      }
+    break;
+
+  case 99:
+#line 654 "macroy.y"
+    { else_if(); }
+    break;
+
+  case 101:
+#line 655 "macroy.y"
+    { else_if();}
+    break;
+
+  case 102:
+#line 656 "macroy.y"
+    { begin_if();    }
+    break;
+
+  case 103:
+#line 658 "macroy.y"
+    { end_if();      }
+    break;
+
+  case 104:
+#line 663 "macroy.y"
+    { call("definition",(zzvsp[(2) - (3)].num));  }
+    break;
+
+  case 105:
+#line 664 "macroy.y"
+    { call("definition",1+(zzvsp[(4) - (5)].num));}
+    break;
+
+  case 106:
+#line 665 "macroy.y"
+    { call("definition",0);   }
+    break;
+
+  case 107:
+#line 669 "macroy.y"
+    { call((zzvsp[(1) - (4)].str),(zzvsp[(3) - (4)].num));free((zzvsp[(1) - (4)].str)); }
+    break;
+
+  case 108:
+#line 670 "macroy.y"
+    { call((zzvsp[(1) - (4)].str),(zzvsp[(3) - (4)].num));free((zzvsp[(1) - (4)].str)); }
+    break;
+
+  case 111:
+#line 673 "macroy.y"
+    { call("[]",(zzvsp[(3) - (4)].num)+1);}
+    break;
+
+  case 112:
+#line 674 "macroy.y"
+    { push((zzvsp[(3) - (3)].str),PUSH_STRING);
+										 	call("[]",2);
+										 	free((zzvsp[(3) - (3)].str));
+										 	}
+    break;
+
+  case 113:
+#line 678 "macroy.y"
+    { push((zzvsp[(3) - (3)].str),PUSH_NUMBER);
+										 	call("[]",2);
+										 	free((zzvsp[(3) - (3)].str));
+										 	}
+    break;
+
+  case 114:
+#line 682 "macroy.y"
+    { 
+														push((zzvsp[(1) - (6)].str),PUSH_IDENT);
+														push((zzvsp[(3) - (6)].str),PUSH_STRING);
+														  call("method",(zzvsp[(5) - (6)].num)+2);
+														  free((zzvsp[(1) - (6)].str));
+														  free((zzvsp[(3) - (6)].str));
+														 }
+    break;
+
+  case 115:
+#line 689 "macroy.y"
+    { 
+														push((zzvsp[(1) - (6)].str),PUSH_IDENT);
+														push((zzvsp[(3) - (6)].str),PUSH_STRING);
+														call("method",(zzvsp[(5) - (6)].num)+2);
+														free((zzvsp[(1) - (6)].str));
+														free((zzvsp[(3) - (6)].str));
+														}
+    break;
+
+  case 116:
+#line 700 "macroy.y"
+    { push((zzvsp[(1) - (2)].str),PUSH_STRING); 
+							  push((zzvsp[(2) - (2)].str),PUSH_STRING);
+							  call("inline",2);
+							  free((zzvsp[(1) - (2)].str));free((zzvsp[(2) - (2)].str));
+							 }
+    break;
+
+  case 117:
+#line 710 "macroy.y"
+    { (zzval.num) = 0; }
+    break;
+
+  case 119:
+#line 714 "macroy.y"
+    { (zzval.num) = 1;      }
+    break;
+
+  case 120:
+#line 715 "macroy.y"
+    { (zzval.num) = (zzvsp[(3) - (3)].num) + 1; }
+    break;
+
+  case 122:
+#line 721 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_STRING); }
+    break;
+
+  case 123:
+#line 721 "macroy.y"
+    { free((zzvsp[(1) - (4)].str)); }
+    break;
+
+  case 124:
+#line 722 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_STRING); }
+    break;
+
+  case 125:
+#line 722 "macroy.y"
+    { free((zzvsp[(1) - (4)].str)); }
+    break;
+
+  case 126:
+#line 725 "macroy.y"
+    { (zzval.num) = 2;      }
+    break;
+
+  case 127:
+#line 726 "macroy.y"
+    { (zzval.num) = 3;      }
+    break;
+
+  case 128:
+#line 727 "macroy.y"
+    { (zzval.num) = (zzvsp[(3) - (3)].num) + 2; }
+    break;
+
+  case 129:
+#line 728 "macroy.y"
+    { (zzval.num) = (zzvsp[(3) - (3)].num) + 1; }
+    break;
+
+  case 130:
+#line 731 "macroy.y"
+    { (zzval.num) = 2;      }
+    break;
+
+  case 131:
+#line 732 "macroy.y"
+    { (zzval.num) = (zzvsp[(1) - (2)].num) + 1; }
+    break;
+
+  case 132:
+#line 735 "macroy.y"
+    { call("_matrix",(zzvsp[(1) - (1)].num));     }
+    break;
+
+  case 133:
+#line 738 "macroy.y"
+    { call("_vector",(zzvsp[(2) - (3)].num)); }
+    break;
+
+  case 134:
+#line 740 "macroy.y"
+    { call("list",(zzvsp[(2) - (3)].num));    }
+    break;
+
+  case 135:
+#line 743 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_NUMBER); free((zzvsp[(1) - (1)].str));}
+    break;
+
+  case 136:
+#line 744 "macroy.y"
+    { push((zzvsp[(2) - (2)].str),PUSH_NEGATIVE);free((zzvsp[(2) - (2)].str)); }
+    break;
+
+  case 137:
+#line 747 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_IDENT);  free((zzvsp[(1) - (1)].str));}
+    break;
+
+  case 138:
+#line 748 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_STRING); free((zzvsp[(1) - (1)].str));}
+    break;
+
+  case 139:
+#line 749 "macroy.y"
+    { push((zzvsp[(1) - (2)].str),PUSH_DATE);push((zzvsp[(2) - (2)].str),PUSH_TIME);
+									  call("+",2);free((zzvsp[(1) - (2)].str));free((zzvsp[(2) - (2)].str));}
+    break;
+
+  case 140:
+#line 751 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_DATE);   free((zzvsp[(1) - (1)].str));}
+    break;
+
+  case 141:
+#line 752 "macroy.y"
+    { push((zzvsp[(1) - (1)].str),PUSH_TIME);   free((zzvsp[(1) - (1)].str));}
+    break;
+
+  case 147:
+#line 758 "macroy.y"
+    { push(NULL,PUSH_NIL); }
+    break;
+
+  case 148:
+#line 759 "macroy.y"
+    { call("neg",1); }
+    break;
+
+  case 151:
+#line 768 "macroy.y"
+    { call("^",2); }
+    break;
+
+  case 153:
+#line 772 "macroy.y"
+    { call("*",2); }
+    break;
+
+  case 154:
+#line 773 "macroy.y"
+    { call("/",2); }
+    break;
+
+  case 156:
+#line 777 "macroy.y"
+    { call("+",2); }
+    break;
+
+  case 157:
+#line 778 "macroy.y"
+    { call("-",2); }
+    break;
+
+  case 158:
+#line 779 "macroy.y"
+    { call("&",2); }
+    break;
+
+  case 160:
+#line 783 "macroy.y"
+    { call(">",2); }
+    break;
+
+  case 161:
+#line 784 "macroy.y"
+    { call("=",2); }
+    break;
+
+  case 162:
+#line 785 "macroy.y"
+    { call("<",2); }
+    break;
+
+  case 163:
+#line 786 "macroy.y"
+    { call(">=",2); }
+    break;
+
+  case 164:
+#line 787 "macroy.y"
+    { call("<=",2); }
+    break;
+
+  case 165:
+#line 788 "macroy.y"
+    { call("<>",2); }
+    break;
+
+  case 166:
+#line 789 "macroy.y"
+    { call("in",2); }
+    break;
+
+  case 167:
+#line 790 "macroy.y"
+    { call("in",2); call("not",1);}
+    break;
+
+  case 168:
+#line 791 "macroy.y"
+    { call("not",1); }
+    break;
+
+  case 170:
+#line 795 "macroy.y"
+    { call("and",2); }
+    break;
+
+  case 172:
+#line 799 "macroy.y"
+    { call("or",2); }
+    break;
+
+  case 175:
+#line 806 "macroy.y"
+    { (zzval.str) = strdup(">"); }
+    break;
+
+  case 176:
+#line 807 "macroy.y"
+    { (zzval.str) = strdup("="); }
+    break;
+
+  case 177:
+#line 808 "macroy.y"
+    { (zzval.str) = strdup("<"); }
+    break;
+
+  case 178:
+#line 809 "macroy.y"
+    { (zzval.str) = strdup(">=");}
+    break;
+
+  case 179:
+#line 810 "macroy.y"
+    { (zzval.str) = strdup("<=");}
+    break;
+
+  case 180:
+#line 811 "macroy.y"
+    { (zzval.str) = strdup("<>");}
+    break;
+
+  case 181:
+#line 812 "macroy.y"
+    { (zzval.str) = strdup("in");}
+    break;
+
+  case 182:
+#line 813 "macroy.y"
+    { (zzval.str) = strdup("not");}
+    break;
+
+  case 183:
+#line 814 "macroy.y"
+    { (zzval.str) = strdup("^");}
+    break;
+
+  case 184:
+#line 815 "macroy.y"
+    { (zzval.str) = strdup("*");}
+    break;
+
+  case 185:
+#line 816 "macroy.y"
+    { (zzval.str) = strdup("/");}
+    break;
+
+  case 186:
+#line 817 "macroy.y"
+    { (zzval.str) = strdup("+");}
+    break;
+
+  case 187:
+#line 818 "macroy.y"
+    { (zzval.str) = strdup("-");}
+    break;
+
+  case 188:
+#line 819 "macroy.y"
+    { (zzval.str) = strdup("&");}
+    break;
+
+  case 189:
+#line 820 "macroy.y"
+    { (zzval.str) = strdup("and");}
+    break;
+
+  case 190:
+#line 821 "macroy.y"
+    { (zzval.str) = strdup("or");}
+    break;
+
+  case 191:
+#line 822 "macroy.y"
+    { (zzval.str) = strdup("[]"); }
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+#line 2840 "y.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", zzr1[zzn], &zzval, &zzloc);
+
+  YYPOPSTACK (zzlen);
+  zzlen = 0;
+  YY_STACK_PRINT (zzss, zzssp);
+
+  *++zzvsp = zzval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  zzn = zzr1[zzn];
+
+  zzstate = zzpgoto[zzn - YYNTOKENS] + *zzssp;
+  if (0 <= zzstate && zzstate <= YYLAST && zzcheck[zzstate] == *zzssp)
+    zzstate = zztable[zzstate];
+  else
+    zzstate = zzdefgoto[zzn - YYNTOKENS];
+
+  goto zznewstate;
+
+
+/*------------------------------------.
+| zzerrlab -- here on detecting error |
+`------------------------------------*/
+zzerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!zzerrstatus)
+    {
+      ++zznerrs;
+#if ! YYERROR_VERBOSE
+      zzerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T zzsize = zzsyntax_error (0, zzstate, zzchar);
+	if (zzmsg_alloc < zzsize && zzmsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T zzalloc = 2 * zzsize;
+	    if (! (zzsize <= zzalloc && zzalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      zzalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (zzmsg != zzmsgbuf)
+	      YYSTACK_FREE (zzmsg);
+	    zzmsg = (char *) YYSTACK_ALLOC (zzalloc);
+	    if (zzmsg)
+	      zzmsg_alloc = zzalloc;
+	    else
+	      {
+		zzmsg = zzmsgbuf;
+		zzmsg_alloc = sizeof zzmsgbuf;
+	      }
+	  }
+
+	if (0 < zzsize && zzsize <= zzmsg_alloc)
+	  {
+	    (void) zzsyntax_error (zzmsg, zzstate, zzchar);
+	    zzerror (zzmsg);
+	  }
+	else
+	  {
+	    zzerror (YY_("syntax error"));
+	    if (zzsize != 0)
+	      goto zzexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (zzerrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (zzchar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (zzchar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  zzdestruct ("Error: discarding",
+		      zztoken, &zzlval);
+	  zzchar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto zzerrlab1;
+
+
+/*---------------------------------------------------.
+| zzerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+zzerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label zzerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto zzerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (zzlen);
+  zzlen = 0;
+  YY_STACK_PRINT (zzss, zzssp);
+  zzstate = *zzssp;
+  goto zzerrlab1;
+
+
+/*-------------------------------------------------------------.
+| zzerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+zzerrlab1:
+  zzerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      zzn = zzpact[zzstate];
+      if (zzn != YYPACT_NINF)
+	{
+	  zzn += YYTERROR;
+	  if (0 <= zzn && zzn <= YYLAST && zzcheck[zzn] == YYTERROR)
+	    {
+	      zzn = zztable[zzn];
+	      if (0 < zzn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (zzssp == zzss)
+	YYABORT;
+
+
+      zzdestruct ("Error: popping",
+		  zzstos[zzstate], zzvsp);
+      YYPOPSTACK (1);
+      zzstate = *zzssp;
+      YY_STACK_PRINT (zzss, zzssp);
+    }
+
+  if (zzn == YYFINAL)
+    YYACCEPT;
+
+  *++zzvsp = zzlval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", zzstos[zzn], zzvsp, zzlsp);
+
+  zzstate = zzn;
+  goto zznewstate;
+
+
+/*-------------------------------------.
+| zzacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+zzacceptlab:
+  zzresult = 0;
+  goto zzreturn;
+
+/*-----------------------------------.
+| zzabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+zzabortlab:
+  zzresult = 1;
+  goto zzreturn;
+
+#ifndef zzoverflow
+/*-------------------------------------------------.
+| zzexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+zzexhaustedlab:
+  zzerror (YY_("memory exhausted"));
+  zzresult = 2;
+  /* Fall through.  */
+#endif
+
+zzreturn:
+  if (zzchar != YYEOF && zzchar != YYEMPTY)
+     zzdestruct ("Cleanup: discarding lookahead",
+		 zztoken, &zzlval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (zzlen);
+  YY_STACK_PRINT (zzss, zzssp);
+  while (zzssp != zzss)
+    {
+      zzdestruct ("Cleanup: popping",
+		  zzstos[*zzssp], zzvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef zzoverflow
+  if (zzss != zzssa)
+    YYSTACK_FREE (zzss);
+#endif
+#if YYERROR_VERBOSE
+  if (zzmsg != zzmsgbuf)
+    YYSTACK_FREE (zzmsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (zzresult);
+}
+
+
+#line 828 "macroy.y"
+
+#include "macrol.c"
+
+
diff --git a/src/Macro/macroy.y b/src/Macro/macroy.y
new file mode 100644
index 0000000..e8f1f78
--- /dev/null
+++ b/src/Macro/macroy.y
@@ -0,0 +1,830 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include "opcodes.h"
+
+extern int   yylineno;
+extern void  update_branch(void *a,void *b);
+extern void *new_code(int opcode,char *carg,int iarg,int line);
+extern void  new_context(char *name,int handler,int user,int oo);
+extern void  start_global(char *name);
+extern void  end_global(char *name);
+extern void  end_context(char *name);
+extern void  argument_count(int);
+extern void  argument_type(char*);
+extern void  extern_command(char*,char*);
+extern char *strdup(const char*);
+
+static void *stack[1024];
+static int  top = 0;
+
+static int  tmpdepth = 0;
+
+static void include(char*);
+static void begin_function(char *name,int handler,int user,int oo)
+{
+	/* extern int yydebug; yydebug = 1; */
+	new_context(name,handler,user,oo);
+}
+
+static void return_function(int has_value)
+{
+	if(!has_value) new_code(OP_PUSH,NULL,PUSH_NIL,yylineno);
+	new_code(OP_RETURN,NULL,0,yylineno);
+}
+
+static void end_function(char *name)
+{
+	new_code(OP_PUSH,NULL,PUSH_NIL,yylineno);
+	new_code(OP_RETURN,NULL,0,yylineno);
+
+	end_context(name);
+}
+
+static void begin_while()
+{
+	stack[top++] = new_code(OP_NOP,NULL,0,yylineno);
+}
+
+static void end_while()
+{
+	void *l1 = stack[--top];
+	void *l2 = stack[--top];
+	update_branch(new_code(OP_GOTO,NULL,0,yylineno),l2);
+	update_branch(l1,new_code(OP_NOP,NULL,0,yylineno));
+}
+
+static void begin_repeat()
+{
+	stack[top++] = new_code(OP_NOP,NULL,0,yylineno);
+}
+
+static void end_until()
+{
+	void *l = stack[--top];
+	update_branch(new_code(OP_TEST,NULL,0,yylineno),l);
+}
+
+static void do_while()
+{
+	stack[top++] = new_code(OP_TEST,NULL,0,yylineno);
+}
+
+
+static void begin_if()
+{
+	stack[top++] = new_code(OP_TEST,NULL,0,yylineno);
+}
+
+static void else_if()
+{
+	void *l = stack[--top];
+
+	stack[top++] = new_code(OP_GOTO,NULL,0,yylineno);
+	update_branch(l,new_code(OP_NOP,NULL,0,yylineno));
+}
+
+static void end_if()
+{
+	void *l = stack[--top];
+	update_branch(l,new_code(OP_NOP,NULL,0,yylineno));
+}
+
+static void push(char *name,int type)
+{
+	new_code(OP_PUSH,name,type,yylineno);
+}
+
+
+static void param(char *name,char *type)
+{
+	new_code(OP_PARAM,name,0,yylineno);
+	argument_type(type);
+}
+
+static void pop(char *name,int n)
+{
+	if(name)
+		new_code(OP_STORE,name,n,yylineno);
+	else
+		new_code(OP_POP,NULL,n,yylineno);
+}
+
+static void call(char *name,int arity)
+{
+	new_code(OP_CALL,name,arity,yylineno);
+}
+
+/*===========================================================================*/
+
+static void begin_case(void)
+{
+	void *l1,*l2,*l3;
+	char tmp[20];
+
+	sprintf(tmp,".tmp.%d",tmpdepth++);
+	pop(tmp,0);
+
+	l1 = new_code(OP_GOTO,NULL,0,yylineno);
+	l2 = new_code(OP_GOTO,NULL,0,yylineno); /* endcase case */
+	l3 = new_code(OP_NOP, NULL,0,yylineno);
+
+	update_branch(l1,l3);
+	stack[top++] = l2;
+}
+
+static void end_case(void)
+{
+	void *l = stack[--top];
+	update_branch(l,new_code(OP_NOP,NULL,0,yylineno));
+	tmpdepth--;
+}
+
+static void begin_choice(int count)
+{
+	char tmp1[20];
+	char tmp2[20];
+
+	sprintf(tmp1,".tmp.%d",tmpdepth-1);
+
+	if(count == 1) /* faster */
+	{
+		push(tmp1,PUSH_IDENT);
+		call("=", 2);
+	}
+	else
+	{
+		int i;
+		for(i=0;i<count;i++)  /* copy all cases */
+		{
+			sprintf(tmp2,".tmp.%d",tmpdepth+i);
+			pop(tmp2,0);
+		}
+
+		for(i=0;i<count;i++)  /* = all cases */
+		{
+			sprintf(tmp2,".tmp.%d",tmpdepth+i);
+			push(tmp1,PUSH_IDENT);
+			push(tmp2,PUSH_IDENT);
+			call("=", 2);
+		}
+
+		for(i=0;i<count-1;i++)  /* or all cases */
+			call("or",2);
+	}
+
+	stack[top++] = new_code(OP_TEST,NULL,0,yylineno);
+
+}
+
+static void end_choice(void)
+{
+	void *l1 = stack[--top]; /* OP_TEST */
+	void *l2 = stack[top-1]; /* begin_case l2 */
+
+	update_branch(new_code(OP_GOTO,NULL,0,yylineno),l2);
+	update_branch(l1,new_code(OP_NOP ,NULL,0,yylineno));
+}
+
+/*===========================================================================*/
+
+static begin_for(char *name,int by)
+{
+	char tmp1[20];
+	char tmp2[20];
+
+	sprintf(tmp1,".tmp.%d",tmpdepth++);
+	sprintf(tmp2,".tmp.%d",tmpdepth++);
+
+	if(by == 0) push("1",PUSH_NUMBER); /* default by */
+
+	pop(tmp2,0);             /* by is on top */
+
+	push(name,PUSH_IDENT); /*  end - start (end is on stack)  */
+	call("-",2);
+
+	push(tmp2,PUSH_IDENT); /*  end - start + by */
+	call("+",2);
+
+	push(tmp2,PUSH_IDENT); /*  (end - start + 1)/by */
+	call("/",2);
+	call("int",1);
+	pop(tmp1,0);             /* into tmp var */
+
+	begin_while();         /* while tmp > 0 */
+
+	push(tmp1,PUSH_IDENT);
+	push("0",PUSH_NUMBER);
+	call(">",2);
+
+	do_while();
+
+}
+
+static end_for(char *name)
+{
+	char tmp1[20];
+	char tmp2[20];
+
+	sprintf(tmp2,".tmp.%d",--tmpdepth);
+	sprintf(tmp1,".tmp.%d",--tmpdepth);
+
+	push(name,PUSH_IDENT); /* name = name + by */
+	push(tmp2,PUSH_IDENT);
+	call("+",2);
+	pop(name,0);
+
+	push(tmp1,PUSH_IDENT); /* tmp = tmp - 1 */
+	push("1",PUSH_NUMBER);
+	call("-",2);
+	pop(tmp1,0);
+
+	end_while();
+
+/* pmit at up*/
+}
+
+/*===========================================================================*/
+
+static begin_loop(char *name)
+{
+	char tmp1[20];
+	char tmp2[20];
+	char tmp3[20];
+
+	sprintf(tmp1,".tmp.%d",tmpdepth++);
+	sprintf(tmp2,".tmp.%d",tmpdepth++);
+	sprintf(tmp3,".tmp.%d",tmpdepth++);
+
+	pop(tmp2,0);             /* get list */
+	push(tmp2,PUSH_IDENT);
+	call("count",1);       /* count */
+
+	pop(tmp1,0);             /* into tmp var */
+
+	push("1",PUSH_NUMBER);
+	pop(tmp3,0);
+
+	begin_while();         /* while tmp > 0 */
+
+	push(tmp1,PUSH_IDENT);
+	push("0",PUSH_NUMBER);
+	call(">",2);
+
+	do_while();
+
+	push(tmp2,PUSH_IDENT);	
+	push(tmp3,PUSH_IDENT);	
+	call("[]",2);
+	pop(name,0);
+
+}
+
+static end_loop()
+{
+	char tmp1[20];
+	char tmp2[20];
+	char tmp3[20];
+
+	sprintf(tmp3,".tmp.%d",--tmpdepth);
+	sprintf(tmp2,".tmp.%d",--tmpdepth);
+	sprintf(tmp1,".tmp.%d",--tmpdepth);
+
+	push(tmp1,PUSH_IDENT); /* tmp = tmp - 1 */
+	push("1",PUSH_NUMBER);
+	call("-",2);
+	pop(tmp1,0);
+
+	push(tmp3,PUSH_IDENT); /* tmp = tmp + 1 */
+	push("1",PUSH_NUMBER);
+	call("+",2);
+	pop(tmp3,0);
+
+	end_while();
+
+}
+
+/*===========================================================================*/
+
+static void begin_when(void)
+{
+	void *l1,*l2,*l3;
+
+	l1 = new_code(OP_GOTO,NULL,0,yylineno);
+	l2 = new_code(OP_GOTO,NULL,0,yylineno); /* endcase when */
+	l3 = new_code(OP_NOP, NULL,0,yylineno);
+
+	update_branch(l1,l3);
+	stack[top++] = l2;
+}
+
+static void end_when(void)
+{
+	void *l = stack[--top];
+	update_branch(l,new_code(OP_NOP,NULL,0,yylineno));
+}
+
+static void begin_selection(void)
+{
+	stack[top++] = new_code(OP_TEST,NULL,0,yylineno);
+}
+
+static void end_selection(void)
+{
+	void *l1 = stack[--top]; /* OP_TEST */
+	void *l2 = stack[top-1]; /* begin_when l2 */
+
+	update_branch(new_code(OP_GOTO,NULL,0,yylineno),l2);
+	update_branch(l1,new_code(OP_NOP ,NULL,0,yylineno));
+}
+
+/*===========================================================================*/
+%}
+
+%union {
+	char       *str;
+	long		num;
+};
+
+%start script
+
+%token IF
+%token AND
+%token NOT
+%token OR
+%token THEN
+%token ELSE
+%token END
+%token RETURN
+%token DO
+%token FUNCTION
+%token ON
+%token GLOBAL
+%token VECTOR
+%token WHILE
+%token INCLUDE
+%token EXTERN
+%token GE
+%token LE
+%token NE
+%token FOR
+%token TO
+%token BY
+%token NIL
+%token OBJECT
+%token IMPORT
+%token EXPORT
+
+%token INLINE
+
+%token CASE
+%token OTHERWISE
+%token OF
+
+%token IN
+
+%token REPEAT
+%token UNTIL
+%token LOOP
+%token WHEN
+%token TELL
+%token TASK
+
+%token ARROW
+
+%token <str>WORD
+%token <str>STRING
+%token <str>NUMBER
+%token <str>DATE
+%token <str>TIME
+%token <str>ENDINLINE
+
+%type <str>name;
+%type <str>fname;
+%type <str>operator;
+%type <num>parameters;
+%type <num>attribute_list;
+%type <num>param_or_empty;
+%type <num>param_list;
+%type <num>vector_list;
+%type <num>by;
+%type <str>inline;
+
+%type <num>super_list;
+
+%%
+
+script 	: block {return_function(0);};
+		;
+
+block	: lines	
+		| empty
+		;
+
+lines   : line 
+		| lines line 
+		;
+
+line	: statement 
+		| function
+		| control
+		| declare  
+		| extern  
+		| import
+		| export
+		| include
+		| ';'
+		;
+
+name		: WORD;
+
+declare : GLOBAL name { start_global($2); push("0",PUSH_NUMBER); 
+						pop($2,0); end_global($2);free($2); }
+        | GLOBAL name '=' { start_global($2);} expression 
+						  { pop($2,0); end_global($2);free($2); }
+		;
+
+import  : IMPORT name { push($2,PUSH_STRING); 
+					   call("import",1); pop($2,0); free($2); }
+		;
+
+export  : EXPORT name { push($2,PUSH_STRING);call("export",1); 
+						pop(NULL,0);free($2); }
+		;
+
+extern  : extern_name param_declare          { end_function(NULL);}
+		| extern_name param_declare STRING   
+			 { extern_command($3,NULL); end_function(NULL); free($3);}
+
+		| extern_name param_declare STRING inline 
+			 { extern_command($3,$4); end_function(NULL);free($3);free($4);}
+		;
+
+extern_name : EXTERN fname { begin_function($2,0,0,0); free($2); }
+            ;
+
+include : INCLUDE STRING { include($2); free($2);}
+        | INCLUDE name   { include($2); free($2);}
+        ;
+
+inline  : INLINE ENDINLINE { $$ = $2; }
+		;
+
+/*======================================================================*/
+
+function : functionheader  param_declare super_declare block  endfunction
+		 ;
+
+param_declare : empty              { argument_count(-1); }
+              | '(' ')'            { argument_count(0);  }
+			  | '(' param_list ')' { argument_count($2); };
+			  ;
+
+functionheader : FUNCTION fname				   { begin_function($2,0,1,0); free($2);}
+               | ON       fname                { begin_function($2,1,1,0); free($2);}
+               | OBJECT   fname                { begin_function($2,1,1,1); free($2);}
+			   ;
+
+super_declare   : empty          
+				| ':' super_list { 
+						call("list",$2);
+						pop(".super",0);
+						}
+				;
+
+super_list : super  { $$ = 1; } 
+			| super_list ',' super { $$ = $1 + 1; }
+			;
+
+super: function_call
+	;
+
+param_list     : param						{ $$ = 1;      }
+			   | param_list ',' param		{ $$ = $1 + 1; }
+			   ;
+
+param          : name                       { param($1,NULL); free($1); }
+			   | name ':' name              { param($1,$3); free($1);free($3);}
+			   ;
+
+endfunction	   : END fname					{ end_function($2);free($2); }
+
+fname          : name
+			   | operator
+			   ;
+
+
+/*======================================================================*/
+
+statement 	: assignement
+			| function_call                 { pop(NULL,0); }
+			| return
+			| name                          { call($1,0);pop(NULL,0);free($1);}
+			;
+
+return		: RETURN						{ return_function(0); }
+			| RETURN expression				{ return_function(1); }
+
+/*======================================================================*/
+
+assignement 	: name '=' expression       { pop($1,0);free($1); }
+            	| name '[' parameters ']' '=' expression       
+							                { 
+											   pop($1,$3);
+											   free($1);
+											 }
+            	| name '.' name  '=' { push($3,PUSH_STRING); } expression
+											  { 
+											   pop($1,1);
+											   free($1);
+											   free($3);
+											 }
+            	| name '.' NUMBER  '=' { push($3,PUSH_NUMBER); } expression
+											  { 
+											   pop($1,1);
+											   free($1);
+											   free($3);
+											 }
+				;
+
+/*======================================================================*/
+
+control 	: if
+			| while
+			| for
+			| repeat
+			| case
+			| loop
+			| when
+			| tell
+			;
+
+/*======================================================================*/
+
+loop        : LOOP name IN expression      { begin_loop($2); }
+				block 
+			  END LOOP                     { end_loop();     }
+            ;
+
+
+/*======================================================================*/
+tell       : TELL expression               { call(".push.dict",1);pop(NULL,0); }
+				  block
+			 END TELL                      { call(".pop.dict",0);pop(NULL,0);  }
+		   ;
+
+/*======================================================================*/
+
+when        : WHEN                          { begin_when(); }
+				selections
+			  END WHEN                      { end_when(); }
+
+selections  : selection
+			| selections selection
+			;
+
+selection   : expression ':'                 { begin_selection(); }
+				block END                    { end_selection(); }
+
+/*======================================================================*/
+
+case        : CASE expression OF           { begin_case();    }
+				choices
+				otherwise
+			  END CASE                     { end_case();      }
+			;
+
+choices     : choice 
+			| choices choice
+			;
+
+choice      :   parameters ':'             { begin_choice($1);  }
+						 block END         { end_choice();    }
+            ;
+
+otherwise   :   empty                    
+			|	OTHERWISE  ':' 
+					     block END 
+            ;
+			
+
+/*======================================================================*/
+repeat      : REPEAT           { begin_repeat(); }
+			     block
+              UNTIL expression { end_until();    }
+			;
+
+/*======================================================================*/
+
+for         :  FOR name '=' expression { pop($2,0); }
+			       TO expression by DO { begin_for($2,$8); }
+				      block
+				   END FOR             { end_for($2); free($2); }
+            ;
+            
+by          : empty         { $$ = 0 ; }
+			| BY expression { $$ = 1;  }
+			;
+
+/*======================================================================*/
+
+while       : WHILE							{ begin_while(); }
+                    expression DO           { do_while();    }
+			     block
+			  END WHILE                     { end_while() ;  }
+			;
+
+/*======================================================================*/
+
+if          : IF expression THEN            { begin_if();    } 
+				 block 
+			  closeif
+			;
+
+closeif     : END IF                        { end_if();      }
+            | ELSE    { else_if(); } block closeif
+			| ELSE IF { else_if();} 
+					 expression THEN        { begin_if();    } 
+					    block 
+					 closeif                { end_if();      }
+			;
+
+/*======================================================================*/
+
+definition : '(' attribute_list ')'           { call("definition",$2);  }
+		   | '(' parameter ',' parameters ')' { call("definition",1+$4);}
+		   | '(' ')'						  { call("definition",0);   }
+           ;
+
+				
+function_call 	: name '(' param_or_empty ')'   { call($1,$3);free($1); }
+				| name '(' attribute_list ')'   { call($1,$3);free($1); }
+				| definition
+				| inline_object
+				| atom '[' parameters ']' { call("[]",$3+1);}
+				| atom '.' name          { push($3,PUSH_STRING);
+										 	call("[]",2);
+										 	free($3);
+										 	}
+				| atom '.' NUMBER          { push($3,PUSH_NUMBER);
+										 	call("[]",2);
+										 	free($3);
+										 	}
+				| name ARROW name '(' param_or_empty ')'  { 
+														push($1,PUSH_IDENT);
+														push($3,PUSH_STRING);
+														  call("method",$5+2);
+														  free($1);
+														  free($3);
+														 }
+				| name ARROW name '(' attribute_list ')'  { 
+														push($1,PUSH_IDENT);
+														push($3,PUSH_STRING);
+														call("method",$5+2);
+														free($1);
+														free($3);
+														}
+				;
+
+
+
+inline_object : name inline { push($1,PUSH_STRING); 
+							  push($2,PUSH_STRING);
+							  call("inline",2);
+							  free($1);free($2);
+							 }
+			  ;
+
+/*======================================================================*/
+
+
+param_or_empty  : empty                         { $$ = 0; }
+                | parameters
+		     	;
+
+parameters  : parameter                     { $$ = 1;      }
+			| parameter ',' parameters      { $$ = $3 + 1; }
+			;
+
+parameter	: expression
+			;
+
+attribute   : name   { push($1,PUSH_STRING); } ':' expression  { free($1); }
+			| STRING { push($1,PUSH_STRING); } ':' expression  { free($1); }
+			;
+
+attribute_list : attribute                    { $$ = 2;      }
+			   | attribute ',' parameter      { $$ = 3;      }
+			   | attribute ',' attribute_list { $$ = $3 + 2; }
+			   | parameter ',' attribute_list { $$ = $3 + 1; }
+			   ;
+
+vector_list : vector vector           { $$ = 2;      }
+			| vector_list vector      { $$ = $1 + 1; }
+			;
+
+matrix      : vector_list               { call("_matrix",$1);     }
+            ;
+
+vector      : '|' parameters '|'        { call("_vector",$2); }
+			;
+list        : '[' param_or_empty ']'    { call("list",$2);    }
+			;
+
+number      : NUMBER                { push($1,PUSH_NUMBER); free($1);}
+			| '-' NUMBER            { push($2,PUSH_NEGATIVE);free($2); }
+			;
+
+atom   		: name					{ push($1,PUSH_IDENT);  free($1);}
+			| STRING                { push($1,PUSH_STRING); free($1);}
+			| DATE TIME             { push($1,PUSH_DATE);push($2,PUSH_TIME);
+									  call("+",2);free($1);free($2);}
+			| DATE                  { push($1,PUSH_DATE);   free($1);}
+			| TIME                  { push($1,PUSH_TIME);   free($1);}
+	   		| function_call
+	   		| '(' expression ')'
+			| list
+			| vector
+			| matrix
+			| NIL                   { push(NULL,PUSH_NIL); }
+			| '-' atom              { call("neg",1); }
+	   		;
+
+atom_or_number: atom
+              | number
+			  ;
+
+
+/* note: a^b^c -> a^(b^c) as in fortran */
+power  		: atom_or_number '^' power        { call("^",2); }
+	   		| atom_or_number
+	   		;
+
+factor 		: factor '*' power      { call("*",2); }
+	   		| factor '/' power      { call("/",2); }
+	   		| power
+	   		;
+
+term   		: term '+' factor  		{ call("+",2); }
+	   		| term '-' factor  		{ call("-",2); }
+	   		| term '&' factor  		{ call("&",2); }
+	  	 	| factor
+	  		;
+
+condition 	: condition '>' term		 { call(">",2); }
+	 		| condition '=' term         { call("=",2); }
+	 		| condition '<' term         { call("<",2); }
+	 		| condition  GE term         { call(">=",2); }
+	 		| condition  LE term         { call("<=",2); }
+	 		| condition  NE term         { call("<>",2); }
+	 		| condition  IN term         { call("in",2); }
+	 		| condition  NOT IN term     { call("in",2); call("not",1);}
+	 		| NOT condition              { call("not",1); }
+			| term
+	 		;
+
+conjonction : conjonction AND condition    { call("and",2); }
+			| condition
+			;
+
+disjonction	: disjonction OR conjonction { call("or",2); }
+			| conjonction
+			;
+
+expression 	: disjonction
+			;
+
+operator    : '>'   { $$ = strdup(">"); }
+			| '='   { $$ = strdup("="); }
+			| '<'   { $$ = strdup("<"); }
+			| GE    { $$ = strdup(">=");}
+			| LE    { $$ = strdup("<=");}
+			| NE    { $$ = strdup("<>");}
+			| IN    { $$ = strdup("in");}
+			| NOT    { $$ = strdup("not");}
+			| '^'    { $$ = strdup("^");}
+			| '*'    { $$ = strdup("*");}
+			| '/'    { $$ = strdup("/");}
+			| '+'    { $$ = strdup("+");}
+			| '-'    { $$ = strdup("-");}
+			| '&'    { $$ = strdup("&");}
+			| AND    { $$ = strdup("and");}
+			| OR    { $$ = strdup("or");}
+			| '[' ']' { $$ = strdup("[]"); }
+			;
+
+empty		:
+			;
+
+%%
+#include "macrol.c"
+
diff --git a/src/Macro/main.cc b/src/Macro/main.cc
new file mode 100644
index 0000000..92d3b1e
--- /dev/null
+++ b/src/Macro/main.cc
@@ -0,0 +1,565 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <new>
+#include <cstdio>
+#include <cctype>
+#include "script.h"
+#include "MvDebugPrintControl.h"
+
+typedef struct data {
+	boolean serve;
+	boolean module;
+	char    *name;
+	char    *script;
+	char    *args;
+} data;
+
+static option opts[] = {
+
+	{"serve",0,"-serve","0",
+	t_boolean,sizeof(boolean),OFFSET(data,serve),},
+
+	{"module",0,"-module","0",
+	t_boolean,sizeof(boolean),OFFSET(data,module),},
+
+	{"name",0,"-name","0",
+	t_str,sizeof(char*),OFFSET(data,name),},
+
+	{"script",0,"-script",0,
+	t_str,sizeof(char*),OFFSET(data,script),},
+
+	{"args",0,"-args",0,
+	t_str,sizeof(char*),OFFSET(data,args),},
+};
+
+static data setup;
+svc   *service = 0;
+
+static void out_of_memory(void)
+{
+	marslog(LOG_EXIT,"Out of memory");
+}
+
+// This class redirect cout to Script::PutMessage
+
+class sbuf : public streambuf { // 76830942
+
+	char line[1024];
+	int  n;
+
+
+// Oops, SUN says streambuf::seekoff(long,ios::seek_dir,int) undefined ????
+//#ifdef sun
+//	virtual long seekoff(long,ios::seek_dir,int) { return 0;};
+//#endif
+
+	virtual int sync(void)
+	{
+		if(n) {
+
+			line[n] = 0;
+			marslog(LOG_INFO,"%s",line);
+			n = 0;
+		}
+		return 0;
+	}
+
+	virtual int overflow(int c=EOF)
+	{
+		if(n >= sizeof(line)-2) sync();
+		if( (line[n++] = c) == '\n' ) { n--; sync(); }
+		return 0;
+	}
+
+
+public:
+	sbuf() : n(0) { };
+};
+
+
+static Value *args_from_file(char *file,int& n)
+{
+	n = 0;
+	if(!file) return 0;
+
+	FILE *f = fopen(file,"r");
+	int max = 20;
+
+	if(f == 0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",file);
+		return 0;
+	}
+
+	// Waring unlink file
+	unlink(file);
+
+	Value *v = new Value[max];
+	char line[1024];
+
+	while(fgets(line,sizeof(line),f))
+	{
+		if(*line) line[strlen(line) - 1] = 0;
+		if(isdate(line))
+			v[n] = Value(Date(line));
+		else if(is_number(line))
+			v[n] = Value(atof(line));
+		else
+			v[n] = Value(line);
+
+		n++;
+
+		if(n == max )
+		{
+			max += n / 2;
+			Value *w = new Value[max];
+			for(int i = 0;i < n; i++)
+				w[i] = v[i];
+
+			delete[] v;
+			v = w;
+		}
+	}
+
+	fclose(f);
+	return v;
+}
+
+static void serve_macro(svcid *id,request *r,void *data)
+{
+	int   forked = fork_service(id);
+	if(forked > 0) return;
+
+	if(forked == -1 && mars.nofork == false)
+	{
+		send_later(id);
+		return;
+	}
+
+	request *param   = (request*)data;
+	const char     *path   = get_value(r,"PATH",0);
+	const char     *name   = get_value(r,"_NAME",0);
+	const char     *action = get_value(r,"_ACTION",0);
+	const char     *trace  = get_value(r,"_TRACE",0);
+	const char     *wait   = get_value(r,"_WAITMODE",0);
+	const char     *lines  = get_value(r,"_SENDLINES",0);
+	const char     *pause  = get_value(r,"_PAUSE",0);
+	const char     *print  = get_value(r,"_RETURN",0);
+
+	request  *output = get_subrequest(r,"_DEVICE_DRIVER",0); //-- uPlot/PlotMod
+	request  *device = get_subrequest(r,"_DEVICE",0);        //-- VisMod
+	
+	//Arguments to be passed to the Macro (not allowed in param mode!)
+	int argNum=count_values(r,"_ARGUMENTS");	
+	Value *argVal=0;
+	if(!param && argNum > 0 && argNum < 32)
+	{	  
+		argVal=new Value[argNum];
+		for(int i=0; i < argNum; i++)
+		{
+			const char *t = get_value(r,"_ARGUMENTS",i);
+			argVal[i] = Value(t); 
+		}
+	} 
+	else
+	{
+	  	argNum=0;
+	}	
+	
+	request  *reply  = 0;
+	Value    w;
+
+	marslog(LOG_INFO,"Starting %s %s %s",path,name,action);
+
+	Script::SvcId = id;
+	mars.outproc  = Script::PutMessage;
+
+	char save[1024];
+	getcwd(save,sizeof(save)-1);
+
+
+//	chdir(getenv("METVIEW_USER_DIRECTORY"));
+//	chdir(dirname(name)+1);
+
+	chdir(dirname(path));  // to ensure we always get the dir that the
+                           // macro is in, even if run from the editor
+	setenv("PWD",dirname(path),1); // change env variable too
+
+
+
+	start_timer();
+
+	Script *s = new Script(mbasename(name));
+
+	if(output)                             //-- uPlot/PlotMod
+	{
+		Script::Output = Value(output);
+		free_all_requests(output);
+	}
+	if(device)                             //-- VisMod
+	{
+		Script::Device = Value(device);
+		free_all_requests(device);
+	}
+
+	if(s->Compile(path) == 0)
+	{
+
+		Value v(param);
+	        	
+		// Because the macro editor uses a temp file,
+		// we need to set the MacroPath here again
+
+		char buf[1024];
+		sprintf(buf,"%s/%s",getenv("METVIEW_USER_DIRECTORY"),name);
+		Script::MacroPath(buf);    //It can be updated according to the
+		                           // last function compiled
+		Script::MacroMainPath(buf);
+
+		s->SetRunMode(action);
+		Context::Trace(trace?atoi(trace):0);
+		Context::WaitMode(wait?atoi(wait):0);
+		Context::SendLines(lines?atoi(lines):0);
+		Context::PauseBetweenLines(pause?atoi(pause):0);
+
+		int handler = s->HasHandler(action,param?1:0,&v);
+
+		if(strcmp(action,"syntax") == 0) // check only
+			marslog(LOG_INFO,"# Syntax is OK");
+
+		else if( (strcmp(action,"edit") == 0) && !handler)
+			marslog(LOG_EROR,"Macro has no 'edit' handler");
+
+		else if( (strcmp(action,"check") == 0) && !handler)
+			;
+
+		else {
+
+			if(param) {
+				// Support for new MetviewUI
+				print_all_requests(param);
+			}
+
+			if(!param && argNum > 0)
+			{
+				w = s->Run(action,argNum,argVal);	  	
+			}
+			else
+			{
+			  	w = s->Run(action,param?1:0,&v);
+			}
+			
+			w.Sync();
+
+			if(print)
+			{
+				cout << "# Macro returns: ";
+				w.Print();
+				cout << '\n';
+			}
+
+			w.GetValue(reply);
+		}
+	}
+
+	// Flush previous plot commands
+	if ( Script::PlotReq )
+	{
+		// Concatenate Output Driver and Plot request
+		request* reqdrive;
+		Script::Output.GetValue(reqdrive);
+		MvRequest req(reqdrive);
+		req = req + Script::PlotReq;
+
+		// Flush
+		Value v(PlotterFunction::Plotter(),req);
+		v.Sync(); // Force sync
+
+		// empty request
+		Script::PlotReq.clean();
+	}
+	
+	set_svc_err(id,s->GetError());
+
+	delete s;
+	if(argVal) delete [] argVal;
+
+	mars.outproc  = 0;
+	Script::SvcId  = 0;
+
+	char info[1024];
+	stop_timer(info);
+
+	marslog(LOG_INFO,"Compile+run = %s",info);
+	marslog(LOG_INFO,"End of %s %s %s",path,name,action);
+
+	send_reply(id,reply);
+	// Don't free reply, it's go when the Value is destroyed
+
+	chdir(save);
+	if(forked != -1)
+	{
+		destroy_service(id->s);
+		marsexit(0);
+	}
+}
+
+static void serve_param(svcid *id,request *r,void*)
+{
+	request  *macro = get_subrequest(r,"MACRO",0);
+	set_value(macro,"_ACTION","%s",get_value(r,"_ACTION",0));
+
+	request  *output = get_subrequest(r,"_DEVICE_DRIVER",0);
+	if (output) {
+		set_subrequest(macro, "_DEVICE_DRIVER", output); //-- uPlot/PlotMod
+		free_all_requests(output);
+	}
+	else
+	{
+		request  *device = get_subrequest(r,"_DEVICE",0);
+		if (device) {
+			set_subrequest(macro, "_DEVICE", device); //-- VisMod
+			free_all_requests(device);
+		}
+	}
+
+	serve_macro(id,macro,(void*)r->next);
+	free_all_requests(macro);
+}
+
+static void serve_compute(svcid *id,request *r,void*)
+{
+	int   forked = fork_service(id);
+	if(forked > 0) return;
+
+	if(forked == -1 && mars.nofork == false)
+	{
+		send_later(id);
+		return;
+	}
+
+
+	request  *reply  = 0;
+	Value    w;
+
+	const char *name = get_value(r,"_NAME",0);
+
+	if( (reply = pool_fetch(id->s,name,r->name)) )
+	{
+		send_reply(id,reply);
+		free_all_requests(reply);
+		if(forked != -1)
+		{
+			destroy_service(id->s);
+			marsexit(0);
+		}
+	}
+
+	Script::SvcId         = id;
+	mars.outproc  = Script::PutMessage;
+
+	Compute s(name,r);
+
+	if(s.GetError() == 0)
+	{
+		w = s.Run();
+		w.GetValue(reply);
+	}
+
+	set_svc_err(id,s.GetError());
+
+
+	if(s.GetError() == 0)
+	{
+		set_value(reply,"_NAME","%s",name);
+		set_value(reply,"_CLASS","%s",r->name);
+		pool_store(id->s,name,r->name,reply);
+		pool_link_objects(id->s,r);
+	}
+
+	send_reply(id,reply);
+
+	mars.outproc  = 0;
+	Script::SvcId         = 0;
+
+	if(forked != -1)
+	{
+		destroy_service(id->s);
+		marsexit(0);
+	}
+
+
+}
+
+static void serve_help(svcid *id,request *r,void*)
+{
+	static int n = 0;
+	print_all_requests(r);
+	r = empty_request("HELP");
+	set_value(r,"TEXT","%s%d", " Some {text} form macro...\n"
+		"%text=moretext at xxx"
+	,n++);
+	send_reply(id,r);
+	free_all_requests(r);
+}
+
+static void serve_formula(svcid *id,request *r,void*)
+{
+	int   forked = fork_service(id);
+	if(forked > 0) return;
+
+	if(forked == -1 && mars.nofork == false)
+	{
+		send_later(id);
+		return;
+	}
+
+	request  *reply  = 0;
+	Value    w;
+
+	const char *name = get_value(r,"_NAME",0);
+
+	if( (reply = pool_fetch(id->s,name,r->name)) )
+	{
+		send_reply(id,reply);
+		free_all_requests(reply);
+		if(forked != -1)
+		{
+			destroy_service(id->s);
+			marsexit(0);
+		}
+	}
+
+	Script::SvcId         = id;
+	mars.outproc  = Script::PutMessage;
+
+	Formula s(name,r);
+
+	if(s.GetError() == 0)
+	{
+		Value v(r);
+		w = s.Run(0,1,&v);
+		w.GetValue(reply);
+	}
+
+	set_svc_err(id,s.GetError());
+
+	if(s.GetError() == 0)
+	{
+		set_value(reply,"_NAME","%s",name);
+		set_value(reply,"_CLASS","%s",r->name);
+		pool_store(id->s,name,r->name,reply);
+		pool_link_objects(id->s,r);
+	}
+
+	send_reply(id,reply);
+
+	if(forked != -1)
+	{
+		destroy_service(id->s);
+		marsexit(0);
+	}
+
+	mars.outproc  = 0;
+	Script::SvcId = 0;
+
+}
+
+int main(int argc,char **argv)
+{
+	extern int zzdebug;
+
+	marsinit(&argc,argv,&setup,NUMBER(opts),opts);
+
+	mvSetMarslogLevel();  //-- if "quiet log"
+
+	std::set_new_handler(out_of_memory);
+
+	CNumber::SetPrecision( CNumber::GetDefaultPrecision() ); //-- print precision in digits
+
+	if(setup.serve)  //interactive mode
+	{
+		// Send prints to caller
+
+		sbuf buf;
+		ostream out(&buf);
+		cout.rdbuf( out.rdbuf() );
+
+		service = create_service("macro"); // progname());
+		add_service_callback(service,"HELP",      serve_help,     0);
+		add_service_callback(service,"MACRO",     serve_macro,    0);
+		add_service_callback(service,"WMACRO",    serve_macro,    0);
+		add_service_callback(service,"MACROPARAM",serve_param,    0);
+		add_service_callback(service,"COMPUTE",   serve_compute,  0);
+		add_service_callback(service,"SAMPLE_FORMULA_DOD",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_DON",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_NOD",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_NON",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_FD",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_FN",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_FDD",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_FDN",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_FND",serve_formula,0);
+		add_service_callback(service,"SAMPLE_FORMULA_FNN",serve_formula,0);
+
+		// One macro at a time, for more we use fork()
+		set_maximum(service,1);
+
+		service_run(service);
+
+	}
+	else if(!setup.script && isatty(0))
+	{
+		marslog(LOG_INFO,"Terminal mode");
+		Script *s = new Terminal("Terminal mode");
+		if(s->Compile() == 0)
+			s->Run();
+		delete s;
+	}
+	else //batch mode
+	{
+	  //Script *s = setup.module ? (Script*)new Module(setup.name)
+	  //			     : (Script*)new Batch(setup.name);
+
+		//-- Here we rely on $MACRO_STARTUP, set up by Metview startup script:
+		//--   argv: 0:'macro' 1:'-script' 2:filename 3:'-args' 4:arglist...
+		const char* mname = mbasename(argv[2]);
+
+		Script *s = setup.module ? (Script*)new Module(mname)
+					 : (Script*)new Batch(mname);
+
+		int n = 0;
+		Value *v = args_from_file(setup.args,n);
+
+		if(s->Compile(setup.script) == 0)
+			s->Run(s->GetRunMode(),n,v);
+
+		// Flush previous plot commands
+		if ( Script::PlotReq )
+		{
+			// Concatenate Output Driver and Plot request
+			request* reqdrive;
+			Script::Output.GetValue(reqdrive);
+			MvRequest req(reqdrive);
+			req = req + Script::PlotReq;
+
+			// Flush
+			Value v(PlotterFunction::Plotter(),req);
+			v.Sync(); // Force sync
+
+			// empty request
+			Script::PlotReq.clean();
+		}
+	
+		delete s;
+		if(v) delete[] v;
+	}
+	return 0;
+}
diff --git a/src/Macro/matrix.cc b/src/Macro/matrix.cc
new file mode 100644
index 0000000..b8d6c84
--- /dev/null
+++ b/src/Macro/matrix.cc
@@ -0,0 +1,490 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+static double Det(CMatrix& m)
+{
+	// Assumes that m is square
+	double d = 0,p1,p2,p3;
+	int n = m.Col();
+
+    for (int i=0;i<n;i++)
+    {
+        p1 = p2 = 1.0;
+        p3 = m(0,i);
+
+        int k  = i;
+
+        for (int j=1;j<n;j++)
+        {
+            k  = (k+1)%n;
+            p1 *= m(j,k);
+            p2 *= m(n-j,k);
+        }
+        p3 *= (p1-p2);
+        d += p3;
+    }
+    return d;
+}
+
+static int Solve(CMatrix& m)
+{
+	int i,j,k;
+	int rows = m.Row();
+	int cols = m.Col();
+
+	for(i=0;i<rows;i++)
+	{
+		for(j=i;j<rows && m(j,j) == 0.0;j++)
+			;
+
+		if(j == rows) return 1; // Cannot solve
+
+		if (j!=i)
+		{
+			for (k=0;k<cols;k++)
+			{
+				double d = m(i,k);
+				m(i,k)   = m(j,k);
+				m(j,k)   = d;
+			}
+		}
+		for (j=cols-1;j>=0;j--)
+			m(i,j) /= m(i,i);
+
+		for (j=i+1;j<rows;j++)
+		{
+			for (k=cols-1;k>=i;k--)
+				m(j,k) -= m(j,i) * m(i,k);
+		}
+	}
+	for (i=rows-2;i>=0;i--)
+	{
+		for (j=cols-2;j>i;j--)
+		{
+			m(i,cols-1) -= m(i,j) * m(j,cols-1);
+			m(i,j)       = 0;
+		}
+	}
+	return 0;
+}
+
+static int Invert(CMatrix& sm,CMatrix& dm)
+{
+	int i,j,k;
+	int n = sm.Row();
+
+	if(Det(sm)==0.0) return 1;
+
+	CMatrix d(n,n+1);
+
+	for (i=0;i<n;i++)
+	{
+		int nrow=i-1;
+		int ncol=i-1;
+		for (j=0;j<n;j++)
+		{
+			nrow=(nrow+1)%n;
+
+			d(j,n) = (j == 0.0);
+
+			for (k=0;k<n;k++)
+			{
+				ncol=(ncol+1)%n;
+				d(j,k) = sm(nrow,ncol);
+			}
+		}
+
+		if(Solve(d))
+			return 1;
+		else
+		{
+			nrow=i-1;
+			for (j=0;j<n;j++)
+			{
+				nrow=(nrow+1)%n;
+				dm(nrow,i)= d(j,n);
+			}
+		}
+	}
+	return 0;
+}
+
+static void Multiply(CMatrix& a,CMatrix& b,CMatrix& c)
+{
+	for(int i = 0;i<a.Row();i++)
+		for(int j = 0;j<b.Col();j++)
+		{
+			double d = 0;
+			for(int k = 0;k<a.Col();k++)
+				d += a(i,k)*b(k,j);
+			c(i,j) = d;
+		}
+}
+
+
+CMatrix::CMatrix(int r,int c) : Content(tmatrix)
+{
+
+	row = r>0?r:1;
+	col = c>0?c:1;
+
+	int size = row*col;
+
+	values = new double[size];
+	for(int i=0;i<size;i++) values[i] = 0.0;
+}
+
+void CMatrix::Copy(const CMatrix& v)
+{
+	row  = v.row;
+	col  = v.col;
+
+	int size = col*row;
+
+	values = new double[size];
+
+	for(int i = 0; i< size; i++) 
+		values[i] = v.values[i];
+}
+
+void CMatrix::Dump(int)
+{
+	cout << "matrix(" << row << ',' << col << ')';
+}
+
+void CMatrix::Print(void)
+{
+	for(int i = 0; i< row; i++) 
+	{
+		cout << '|';
+		for(int j = 0; j< col; j++) 
+		{
+			cout << values[i+row*j];
+			if(j != col - 1) cout << ',';
+		}
+		cout << '|' << '\n';
+	}
+}
+int CMatrix::Write(FILE* file)
+{
+	for(int i = 0; i< row; i++) 
+	{
+		for(int j = 0; j< col; j++) 
+		{
+			fprintf(file, "%g", values[i+row*j]);
+			if(j != col - 1) fprintf(file, ",");
+		}
+		fprintf(file, "\n");
+	}
+	return ferror(file);
+}
+
+void CMatrix::SetSubValue(Value& v,int arity,Value *arg)
+{
+
+	if(!Check(1,v,arity,arg,tnumber,2,tnumber,tnumber))
+		return;
+
+	int  a,b;
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+
+	double d;
+	v.GetValue(d);
+
+	CMatrix& m = *this;
+
+	if(a<1 || a>m.Row() || b<1 || b>m.Col()) 
+	{
+		Error("Matrix index [%d,%d] is out of range."
+			" Matrix is %d x %d.",a,b,m.Row(),m.Col());
+		return;
+	}
+
+	m(a-1,b-1) = d;
+}
+
+//==============================================================================
+
+class Matrix1Function : public Function {
+public:
+	Matrix1Function(char *n) : Function(n) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value Matrix1Function::Execute(int arity ,Value *arg)
+{
+	CMatrix *m;
+	int n = 1;
+
+	int i;
+	for( i=0;i<arity;i++) 
+	{
+		CVector *v;
+		arg[i].GetValue(v);
+		if(v->Count() > n) n = v->Count();
+	}
+
+	m = new CMatrix(arity,n);
+
+	for(i=0;i<arity;i++) 
+	{	
+		CVector *v;
+		arg[i].GetValue(v);
+
+		for(int j=0;j<v->Count();j++)
+			(*m)(i,j) = (*v)[j];
+	}
+
+	return Value(m);
+}
+
+//==============================================================================
+
+class Matrix2Function : public Function {
+public:
+	Matrix2Function(char *n) : Function(n,2,tnumber,tnumber) 
+	{info = "Builds a new matrix given ist dimensions";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value Matrix2Function::Execute(int,Value *arg)
+{
+	int a,b;
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+	return Value(new CMatrix(a,b));
+}
+
+//==============================================================================
+
+class MatrixMulFunction : public Function {
+public:
+	MatrixMulFunction(char *n) : Function(n,2,tmatrix,tmatrix) 
+	{info = "Matrix multiplication";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixMulFunction::Execute(int,Value *arg)
+{
+	CMatrix *a,*b;
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+
+	if(a->Col() != b->Row())
+		return Error("Cannot multiply a %d x %d matrix by a %d x %d matrix",
+			a->Row(),a->Col(),b->Row(),b->Col());
+
+	CMatrix *c = new CMatrix(a->Row(),b->Col());
+
+	Multiply(*a,*b,*c);
+
+	return Value(c);
+}
+
+//==============================================================================
+
+class MatrixAddFunction : public Function {
+public:
+	MatrixAddFunction(char *n) : Function(n,2,tmatrix,tmatrix) 
+	{info = "Matrix addition";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixAddFunction::Execute(int,Value *arg)
+{
+	CMatrix *a,*b;
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+
+	if(a->Col() != b->Col() || a->Row() != b->Row())
+		return Error("Cannot add a %d x %d matrix by a %d x %d matrix",
+			a->Row(),a->Col(),b->Row(),b->Col());
+
+	CMatrix *c = new CMatrix(a->Row(),a->Col());
+
+	for(int i = 0;i<a->Row();i++)
+		for(int j = 0;j<a->Col();j++)
+			(*c)(i,j) = (*a)(i,j) + (*b)(i,j);
+
+	return Value(c);
+}
+
+//==============================================================================
+
+class MatrixSubFunction : public Function {
+public:
+	MatrixSubFunction(char *n) : Function(n,2,tmatrix,tmatrix) 
+	{info = "Matrix addition";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixSubFunction::Execute(int,Value *arg)
+{
+	CMatrix *a,*b;
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+
+	if(a->Col() != b->Col() || a->Row() != b->Row())
+		return Error("Cannot substract a %d x %d matrix by a %d x %d matrix",
+			a->Row(),a->Col(),b->Row(),b->Col());
+
+	CMatrix *c = new CMatrix(a->Row(),a->Col());
+
+	for(int i = 0;i<a->Row();i++)
+		for(int j = 0;j<a->Col();j++)
+			(*c)(i,j) = (*a)(i,j) - (*b)(i,j);
+
+	return Value(c);
+}
+
+//==============================================================================
+
+class MatrixNegFunction : public Function {
+public:
+	MatrixNegFunction(char *n) : Function(n,1,tmatrix) 
+	{info = "Matrix negation";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixNegFunction::Execute(int,Value *arg)
+{
+	CMatrix *a;
+	arg[0].GetValue(a);
+
+	CMatrix *c = new CMatrix(a->Row(),a->Col());
+
+	for(int i = 0;i<a->Row();i++)
+		for(int j = 0;j<a->Col();j++)
+			(*c)(i,j) = -(*a)(i,j);
+
+	return Value(c);
+}
+
+//==============================================================================
+
+class MatrixInvFunction : public Function {
+public:
+	MatrixInvFunction(char *n) : Function(n,1,tmatrix) 
+	{info = "Matrix invertion";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixInvFunction::Execute(int,Value *arg)
+{
+	CMatrix *a;
+	arg[0].GetValue(a);
+
+
+	if(a->Col() != a->Row())
+		return Error("Cannot inverse %d x %d matrix. Matrix must by square",
+			a->Row(),a->Col());
+
+	CMatrix *c = new CMatrix(a->Row(),a->Col());
+
+	if(Invert(*a,*c))
+	{
+		delete c;
+		return Error("Matrix is singular. It cannot be inverted");
+	}
+
+	return Value(c);
+}
+
+//==============================================================================
+
+class MatrixDetFunction : public Function {
+public:
+	MatrixDetFunction(char *n) : Function(n,1,tmatrix) 
+	{info = "Matrix determinant";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixDetFunction::Execute(int ,Value *arg)
+{
+	CMatrix *a;
+	arg[0].GetValue(a);
+
+
+	if(a->Col() != a->Row())
+		return Error("Cannot get determinat of a %d x %d matrix. Matrix must by square",
+			a->Row(),a->Col());
+
+	return Value(Det(*a));
+}
+
+//==============================================================================
+
+class MatrixTransFunction : public Function {
+public:
+	MatrixTransFunction(char *n) : Function(n,1,tmatrix) 
+	{info = "Transpose a matrix";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MatrixTransFunction::Execute(int ,Value *arg)
+{
+	CMatrix *a;
+	arg[0].GetValue(a);
+
+	CMatrix *b = new CMatrix(a->Col(),a->Row());
+
+	for(int i = 0 ; i < a->Row(); i++)
+		for(int j = 0 ; j < a->Col(); j++)
+			(*b)(j,i) = (*a)(i,j);
+
+	return Value(b);
+}
+
+
+//==============================================================================
+
+class MatrixGetElemFunction : public Function {
+public:
+	MatrixGetElemFunction(char *n) : 
+		Function(n,3,tmatrix,tnumber,tnumber) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value MatrixGetElemFunction::Execute(int,Value *arg)
+{
+	CMatrix *m;
+	int a,b;
+
+	arg[0].GetValue(m);
+	arg[1].GetValue(a);
+	arg[2].GetValue(b);
+
+	if(a<1 || a>m->Row() || b<1 || b>m->Col()) 
+		return Error("Matrix index [%d,%d] is out of range."
+			" Matrix is %d x %d.",a,b,m->Row(),m->Col());
+
+	return Value((*m)(a-1,b-1));
+}
+
+static void install(Context *c)
+{
+	c->AddFunction(new Matrix1Function("_matrix"));
+	c->AddFunction(new Matrix2Function("matrix"));
+	c->AddFunction(new MatrixGetElemFunction("[]"));
+
+	c->AddFunction(new MatrixMulFunction("*"));
+	//c->AddFunction(new MatrixProdFunction("*"));
+	c->AddFunction(new MatrixAddFunction("+"));
+	c->AddFunction(new MatrixSubFunction("-"));
+	c->AddFunction(new MatrixNegFunction("-"));
+	c->AddFunction(new MatrixInvFunction("inverse"));
+	c->AddFunction(new MatrixDetFunction("det"));
+	c->AddFunction(new MatrixTransFunction("transpose"));
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/mflextra.cc b/src/Macro/mflextra.cc
new file mode 100644
index 0000000..c88158d
--- /dev/null
+++ b/src/Macro/mflextra.cc
@@ -0,0 +1,396 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdlib.h>
+#include <time.h>
+#include <MvRequest.h>
+
+#include "macro.h"
+#include "script.h"
+
+#include "MvFlextra.h"
+
+//===========================================================================
+
+class FlextraCountFunction : public Function {
+public:
+	FlextraCountFunction(char *n) : Function(n,1,tnumber)
+    {info = "Causes Macro to always wait(1)/not wait(0) for functions to complete before continuing.";}
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int,Value*);
+};
+
+int FlextraCountFunction::ValidArguments(int arity,Value *arg)
+{
+        // arguments can be: (FLEXTRA_FILE definition)
+
+	if(arity !=1 ) 
+		return false;
+     
+   	if(arg[0].GetType() != trequest) 
+      		return false;
+	
+	request *r;
+	arg[0].GetValue(r);
+	
+	if(r && strcmp(r->name,"FLEXTRA_FILE")==0)
+			return true;
+	
+	return false;
+}
+
+Value FlextraCountFunction::Execute(int /*arity*/,Value *arg)
+{
+	request *r;
+	arg[0].GetValue(r);
+	const char* path=get_value(r,"PATH",0);
+	
+	if(path)
+	{
+	  	string s(path);
+	  	MvFlextra flx(s);
+		return Value(flx.blockNum());
+	}	
+  
+  	int zero=0;
+	return Value(zero);
+}
+
+//===========================================================================
+
+class FlextraGroupGetFunction : public Function {
+    
+ public:
+	FlextraGroupGetFunction(const char *n) : Function(n,3,tnumber)
+	{info = "Returns a list of available meta data keys for the given table";}
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int FlextraGroupGetFunction::ValidArguments(int arity,Value *arg)
+{
+        // arguments can be: (FLEXTRA_FILE definition, number)const map
+	
+	if(arity !=2) 
+		return false;
+     
+   	if(arg[0].GetType() != trequest)   //first must be a request
+      		return false;
+		
+	if(arg[1].GetType() != tstring && arg[1].GetType() != tlist) 
+    	{
+        	return false;
+    	}
+   	
+	request *r;
+	arg[0].GetValue(r);
+	
+	if(r && strcmp(r->name,"FLEXTRA_FILE")==0)
+			return true;
+	
+	return false;
+}
+
+Value FlextraGroupGetFunction::Execute(int /*arity*/,Value *arg)
+{
+	request *r;
+	arg[0].GetValue(r);
+	const char* path=get_value(r,"PATH",0);
+	
+	if(!path)
+		return Value();	
+	  	 	  
+	string s(path);
+	MvFlextra flx(s);
+	
+	if(flx.blockNum() ==0)
+		return Value();
+	
+	int id=0;	
+	if(id <0 || id >= flx.blockNum())
+		return Value();	
+	
+	const map<string,string> &metaData = flx.blocks().at(id)->metaData();
+	
+	map<string,string>::const_iterator it;
+	
+	if(arg[1].GetType() == tstring)
+	{
+	  	const char *key;
+        	arg[1].GetValue(key);
+		if((it=metaData.find(key)) != metaData.end())
+			return Value((*it).second.c_str());
+	}
+	else if(arg[1].GetType() == tlist) 
+	{
+		CList *keys;
+        	arg[1].GetValue(keys);
+        	CList *values = new CList (keys->Count());
+
+        	for(int i=0;i< keys->Count();i++)
+        	{
+            		const char *key;
+            		(*keys)[i].GetValue(key);
+			if((it=metaData.find(key)) != metaData.end())
+				(*values)[i]=Value((*it).second.c_str());
+        	}  
+        	     	
+        	return values;
+	}
+	
+  	return Value();
+}
+
+//===========================================================================
+
+class FlextraTrGetFunction : public Function {
+    
+ public:
+	FlextraTrGetFunction(const char *n) : Function(n,3,tnumber)
+	{info = "Returns a list of available meta data keys for the given table";}
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int FlextraTrGetFunction::ValidArguments(int arity,Value *arg)
+{
+        // arguments can be: (FLEXTRA_FILE definition, number)
+	
+	if(arity !=3) 
+		return false;
+     
+   	if(arg[0].GetType() != trequest)   //first must be a request
+      		return false;
+		
+	if(arg[1].GetType() != tnumber)   //second must be a number
+	     return false;
+	
+	if(arg[2].GetType() != tstring && arg[2].GetType() != tlist) 
+    	{
+        	return false;
+    	}
+   	
+	request *r;
+	arg[0].GetValue(r);
+	
+	if(r && strcmp(r->name,"FLEXTRA_FILE")==0)
+			return true;
+	
+	return false;
+}
+
+Value FlextraTrGetFunction::Execute(int /*arity*/,Value *arg)
+{
+	request *r;
+	arg[0].GetValue(r);
+	const char* path=get_value(r,"PATH",0);
+	
+	if(!path)
+		return Value();	
+	  	 	  
+	string s(path);
+	MvFlextra flx(s);
+	
+	if(flx.blockNum() ==0)
+		return Value();
+	
+	int trId;
+	arg[1].GetValue(trId);
+	trId--;			   
+	
+	if(trId < 0 || trId >= flx.blocks().at(0)->itemNum())
+		return Value();
+
+	MvFlextraItem *item=flx.blocks().at(0)->items().at(trId);
+	
+	const map<string,string> &metaData = item->metaData();
+	
+	map<string,string>::const_iterator it;
+		
+	//A single key is specified
+	if(arg[2].GetType() == tstring)
+	{
+	  	const char *key;
+        	arg[2].GetValue(key);
+		if((it=metaData.find(key)) != metaData.end())
+			return Value((*it).second.c_str());
+		else
+		{
+		  	vector<string> vec;
+			MvFlextraItem::DataType type;
+			item->pointData(key,vec,type);
+			if(vec.size() > 0)
+			{
+        			if(type == MvFlextraItem::IntType || 
+				   type == MvFlextraItem::FloatType )
+				{
+					CVector *values = new CVector(vec.size());	  
+			  		for(unsigned int i=0;i< vec.size() ;i++)
+        				{
+						istringstream iss(vec.at(i));
+ 						double d;
+						iss >> d; 
+					  	(*values)[i]=d;
+					}
+					
+					return values;
+				}	
+				else if(type == MvFlextraItem::DateType)		
+				{
+			  		CList *values = new CList (vec.size());
+					for(unsigned int i=0;i< vec.size() ;i++)
+        				{
+						Date d(vec.at(i).c_str());
+						(*values)[i]=Value(d);
+					}						
+					return values;								
+				}	
+			}
+		}
+	}	
+		
+	else if(arg[2].GetType() == tlist) 
+	{
+		CList *keys;
+        	arg[2].GetValue(keys);
+        	CList *values = new CList (keys->Count());
+
+        	for(int i=0;i< keys->Count();i++)
+        	{
+            		const char *key;
+            		(*keys)[i].GetValue(key);
+			if((it=metaData.find(key)) != metaData.end())
+				(*values)[i]=Value((*it).second.c_str());
+			
+			else
+			{
+			  	vector<string> vec;
+				MvFlextraItem::DataType type;
+				item->pointData(key,vec,type);
+				
+				if(type == MvFlextraItem::IntType || 
+				   type == MvFlextraItem::FloatType )
+				{
+					CVector *data = new CVector(vec.size());	  
+			  		for(unsigned int j=0;j< vec.size() ;j++)
+        				{
+						istringstream iss(vec.at(j));
+ 						double d;
+						iss >> d; 
+					  	(*data)[j]=d;
+					}
+					
+					(*values)[i]=data;
+				}	
+				else if(type == MvFlextraItem::DateType)		
+				{
+			  		CList *data = new CList (vec.size());
+					for(unsigned int j=0;j< vec.size() ;j++)
+        				{
+						Date d(vec.at(j).c_str());
+						(*data)[j]=Value(d);
+					}						
+					(*values)[i]=data;								
+				}				  
+			}
+        	}  
+        	     	
+        	return values;
+	}
+	
+  	return Value();
+}
+
+//=============================================================================
+
+class FlextraElemFunction : public Function {
+public:
+	FlextraElemFunction(char *n) : Function(n,2,tlist,tnumber) {};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int FlextraElemFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) 
+	  	return false;
+
+	if(arg[0].GetType() != trequest) 
+	  	return false;
+
+	if(arg[1].GetType() != tnumber) 
+	  	return false;
+	
+	request *r;
+	arg[0].GetValue(r);
+	
+	if(r && strcmp(r->name,"FLEXTRA_FILE")==0)
+			return true;
+	
+	return false;
+}
+
+Value FlextraElemFunction::Execute(int arity,Value *arg)
+{
+	request *r;
+	arg[0].GetValue(r);
+	const char* path=get_value(r,"PATH",0);
+	
+	if(!path)
+		return Value();	
+	  	 	  
+	string s(path);
+	MvFlextra flx(s);
+	
+	if(flx.blockNum() ==0)
+		return Value();
+	
+ 	int id;
+	if(arity == 1)
+		id=0;	
+	else if(arity == 2)
+	{
+		arg[1].GetValue(id);
+		id--;			  
+	} 
+	
+	if(id <0 || id >= flx.blockNum())
+		return Value();
+	
+	if(id ==0 && flx.blockNum() == 1)
+	{
+	 	return Value(r);
+	}	
+	else
+	{  
+		string outfile(marstmp());	
+		flx.write(outfile,id);
+	
+		request *outr = empty_request("FLEXTRA_FILE");
+		set_value(outr,"PATH",outfile.c_str());
+		
+		return Value(outr);
+	}
+	
+	return Value();
+}
+
+
+//=============================================================================
+
+static void install(Context *c)
+{	
+	c->AddFunction(new FlextraCountFunction("count"));
+	c->AddFunction(new FlextraGroupGetFunction("flextra_group_get"));
+	c->AddFunction(new FlextraTrGetFunction("flextra_tr_get"));
+	c->AddFunction(new FlextraElemFunction("[]"));
+}
+
+static Linkage Link(install);
+
diff --git a/src/Macro/misc.cc b/src/Macro/misc.cc
new file mode 100644
index 0000000..5d27e17
--- /dev/null
+++ b/src/Macro/misc.cc
@@ -0,0 +1,865 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdlib.h>
+#include <time.h>
+#include <MvRequest.h>
+#include <MvVersionInfo.h>
+
+
+#include "macro.h"
+#include "script.h"
+#include "cbufr.h"
+
+//=============================================================================
+
+class NilFunction : public Function {
+public:
+	NilFunction(char *n) : Function(n,0) {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value NilFunction::Execute(int,Value*)
+{
+	return Value();
+}
+
+//=============================================================================
+
+class NilAppendFunction : public Function {
+public:
+	NilAppendFunction(char *n) : Function(n) {}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NilAppendFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;	
+	if(arg[0].GetType() == tnil || arg[1].GetType() == tnil)
+		return true;
+	return false;
+}
+
+Value NilAppendFunction::Execute(int,Value *arg)
+{
+	return arg[0].GetType() == tnil ? arg[1] : arg[0];
+}
+
+//=============================================================================
+
+class NilCompareFunction : public Function {
+	int equal;
+public:
+	NilCompareFunction(char *n,int e) : Function(n) { equal = e;}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NilCompareFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;	
+	if(arg[0].GetType() == tnil || arg[1].GetType() == tnil)
+		return true;
+	return false;
+}
+
+Value NilCompareFunction::Execute(int,Value *arg)
+{
+	int cmp;
+	if(arg[0].GetType() == tnil && arg[1].GetType() == tnil)
+		cmp = 1;	
+	else
+		cmp = 0;
+	return Value(cmp == equal);
+}
+
+
+class NilCountFunction : public Function {
+public:
+	NilCountFunction(char *n) : Function(n,1,tnil) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value NilCountFunction::Execute(int,Value *arg)
+{
+    int zero = 0;
+	return Value(zero);
+}
+
+
+
+//=============================================================================
+//=============================================================================
+
+class TypeFunction : public Function {
+public:
+	TypeFunction(char *n) : Function(n,1,tany) 
+	{info = "Returns the type of an expression";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TypeFunction::Execute(int,Value *arg)
+{
+	const char *p;
+
+	arg[0].GetType(&p);
+
+	Value v = Value(p);
+
+	return v;
+}
+
+//=============================================================================
+class CmpFallback : public Function {
+	boolean equal;
+public:
+	CmpFallback(char *n,boolean eq) : Function(n) { equal = eq;}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int CmpFallback::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[0].GetType() == arg[1].GetType()) return false;
+	return true;
+}
+
+Value CmpFallback::Execute(int ,Value *)
+{
+	int d = equal?0:1;	
+	return Value(d);
+}
+//=============================================================================
+class SubFallback : public Function {
+public:
+	SubFallback(char *n) : Function(n) { }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int SubFallback::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[1].GetType() != tnumber) return false;
+	int n;
+	arg[1].GetValue(n);
+	return n == 1;
+}
+
+Value SubFallback::Execute(int ,Value *arg)
+{
+	return arg[0];
+}
+//=============================================================================
+class CountFallback : public Function {
+public:
+	CountFallback(char *n) : Function(n,1,tany) { }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value CountFallback::Execute(int ,Value *)
+{
+	return Value(1);
+}
+//=============================================================================
+class RandomFunction : public Function {
+public:
+	RandomFunction(char *n) : Function(n,0) { info="Generat random";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value RandomFunction::Execute(int,Value*)
+{
+	static int first = 1;
+
+	if(first)
+	{
+		srand48(getpid()*time(0));
+		first = 0;
+	}
+
+	return Value(drand48());
+}
+
+//=============================================================================
+
+class PrintFunction : public Function {
+public:
+	PrintFunction(char *n) : Function(n) { info="Prints all its arguments";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class FailFunction : public PrintFunction {
+public:
+	FailFunction(char *n) : PrintFunction(n) 
+	{ info="Prints all its arguments and stop in error";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class StopFunction : public PrintFunction {
+public:
+	StopFunction(char *n) : PrintFunction(n) 
+	{ info="Prints all its arguments and stop the macro";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value PrintFunction::Execute(int arity,Value *arg)
+{
+	if(Context::Trace() >= 2) return Value(0.0);
+
+	for(int i = 0;i<arity;i++)
+	{
+		arg[i].Sync(); // This will force sync
+		arg[i].Print();
+	}
+	cout << '\n' << flush;
+	return Value(0.0);
+}
+
+class ImportFunction : public Function {
+public:
+	ImportFunction(char *n) : Function(n,1,tstring) {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ImportFunction::Execute(int ,Value *arg)
+{
+	const char *p;
+	Context *c = Context::Instruction->Owner();
+	arg[0].GetValue(p);
+	return c->ImportVariable(p);
+}
+
+class ExportFunction : public Function {
+public:
+	ExportFunction(char *n) : Function(n,1,tstring) {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ExportFunction::Execute(int ,Value *arg)
+{
+	const char *p;
+	Context *c = Context::Instruction->Owner();
+	arg[0].GetValue(p);
+	return c->ExportVariable(p);
+}
+
+class DescribeFunction : public Function {
+	bool actionSpecified;
+public:
+	DescribeFunction(char *n) : Function(n) 
+	{info = "Describes available function";};
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int DescribeFunction::ValidArguments(int arity,Value *arg)
+{
+	actionSpecified = false;
+
+	if (arity == 1 && arg[0].GetType() == tstring)
+		return true;
+
+	if (arity == 2 && arg[0].GetType() == tstring && arg[1].GetType() == tstring)
+	{
+		actionSpecified = true;
+		return true;
+	}
+
+	return false;
+}
+
+
+Value DescribeFunction::Execute(int ,Value *arg)
+{
+	const char *p;
+	Context *c = Context::Instruction->Owner();
+	int num_matches = 0;
+
+	arg[0].GetValue(p);
+
+	if (actionSpecified)  // action can currently only be 'as_value', meaning return the description(s) as a value
+	{
+		const char *second_arg;
+		arg[1].GetValue(second_arg);
+		if (strcmp(second_arg, "as_value"))
+			return Error("The second argument, if supplied, must be 'as_value'.");
+	}
+
+	CList *outList;
+	if (actionSpecified)
+		outList = new CList(1); // 1 to start with because we don't know how big it wikll grow to
+
+
+	List *l = (List*)c->Dictionaries()->Head();
+	while(l)
+	{
+		Function *n = (Function*)l->Head();
+		while(n)
+		{
+			if(p == n->Name())
+			{
+				num_matches++;
+				if (actionSpecified)
+					if (num_matches > 1)
+						outList->Add(n->ToString());
+					else
+						(*outList)[0] = n->ToString();
+				else
+					n->Print();
+			}
+			n = (Function*)n->Next();
+		}
+		l = (List*)l->Next();
+	}
+
+	while(c)
+	{
+		Node *n = c->FirstFunction();
+		while(n)
+		{
+			if(p == n->Name())
+			{
+				num_matches++;
+				if (actionSpecified)
+					if (num_matches > 1)
+						outList->Add(n->ToString());
+					else
+						(*outList)[0] = n->ToString();
+				else
+					n->Print();
+			}
+			n = n->Next();
+		}
+		c = c->Owner();
+	}
+
+	if (actionSpecified)
+		return outList;
+	else
+		return Value(0.0);
+}
+
+//===========================================================
+
+class StoreFunction : public Function {
+public:
+	StoreFunction(char *n) : Function(n,2,tstring,tany)
+	{info = "Saves the data in a cache under the given name. args: (string, any)";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value StoreFunction::Execute(int ,Value* arg)
+{
+	request *r;const char *name;
+	arg[0].GetValue(name);
+	arg[1].GetValue(r);
+
+	ASync::Store(name,r);
+
+
+	// for some file types, we need to manually set some flags to indicate
+	// that the underlying files should not be deleted
+
+	if (arg[1].GetType() == tgrib)
+	{
+		CGrib *c;
+		arg[1].GetValue(c);
+		c->IsIcon(true); // so that InPool won't touch the data
+		c->SetFileTempFlag(false);
+	}
+	else if (arg[1].GetType() == tbufr)
+	{
+		CBufr *c;
+		arg[1].GetValue(c);
+		c->IsIcon(true); // so that InPool won't touch the data
+	}
+
+	set_value(r,"TEMPORARY","%d",0);  // store/fetch should have permanent files
+
+	return Value();
+}
+
+class FetchFunction : public Function {
+public:
+	FetchFunction(char *n) : Function(n,1,tstring)
+	{info = "Returns the item stored in the named cache (or nil). args: (string)";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value FetchFunction::Execute(int,Value* arg)
+{
+	const char *name;
+	arg[0].GetValue(name);
+	request *r = ASync::Fetch(name);
+	set_value(r,"TEMPORARY","%d",0);  // store/fetch should have permanent files
+	Value v;
+	v.SetContent(r);
+
+
+	// for some file types, we need to manually set some flags to indicate
+	// that the underlying files should not be deleted
+
+	Content *content = v.GetContent();
+
+	if (content->GetType(NULL) == tgrib)
+	{
+		CGrib *c = (CGrib *)content;
+		c->IsIcon(true); // so that InPool won't touch the data
+		c->SetFileTempFlag(false);
+	}
+	else if (content->GetType(NULL) == tbufr)
+	{
+		CBufr *c = (CBufr *)content;
+		c->IsIcon(true); // so that InPool won't touch the data
+	}
+
+	return v;
+}
+
+//===========================================================
+
+class NameFunction : public Function {
+public:
+	NameFunction(char *n) : Function(n,0)
+	{info = "Returns the path/name of the macro being executed. args: none";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value NameFunction::Execute(int,Value*)
+{
+	return Value(Script::MacroPath());
+}
+
+//===========================================================
+
+class InlineFunction : public Function {
+public:
+	InlineFunction(char *n) : Function(n,2,tstring,tstring) {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value InlineFunction::Execute(int,Value *arg)
+{
+	const char *t,*p;
+	FILE *f;
+	long len;
+	void *buffer = 0;
+	char *q = 0;
+
+	arg[0].GetValue(t);
+	arg[1].GetValue(p);
+
+	switch(Value::NameType(t))
+	{
+		case tstring:
+			f = fopen(p,"r");
+			if(!f)
+			{
+				marslog(LOG_EROR|LOG_PERR,"Cannot open %s",p);
+				return Error("Inline: internal error");
+			}
+
+			// Should check more here,,,
+			fseek(f,0,SEEK_END);
+			len = ftell(f);
+			buffer = MALLOC(int(len+1));
+			q = (char*)buffer;
+			rewind(f);
+			fread(buffer,1,(unsigned int)len,f);
+			fclose(f);
+			q[len] = 0;
+			break;
+
+		case tnone:
+		case tany:
+			return Error("Invalid type name '%s'",t);
+			/* break; */
+
+		default:
+			return Error("Inline data not supported for type %s",t);
+			/* break; */
+	}
+
+	Value v = q;
+	FREE(buffer);
+	return v;
+}
+
+//===========================================================
+
+class ArgsFunction : public Function {
+public:
+	ArgsFunction(char *n) : Function(n,0) 
+	{ info = "Returns the list of the calling arguments of the current function";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ArgsFunction::Execute(int,Value*)
+{
+	Context *c = Context::Instruction->Owner();
+	int    n = c->Argc();
+	Value *v = c->Argv();
+
+	CList *l = new CList(n);
+
+	for(int i = 0;i<n;i++)
+		(*l)[i] = v[i];
+
+	return Value(l);
+}
+
+
+
+class DictionaryFunction : public Function {
+public:
+	DictionaryFunction(char *n) : Function(n) 
+	{ info = "Returns the list of all the documented functions";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+static int cmp(const void *a,const void *b)
+{
+	char **x = (char**)a;
+	char **y = (char**)b;
+	return strcmp(*x,*y);
+}
+
+Value DictionaryFunction::Execute(int arity,Value *)
+{
+	typedef const char* charp;
+	Context *c = Context::Instruction->Owner();
+	int count;
+	int all = arity > 0;
+
+	count = 0;
+
+	List *l = (List*)c->Dictionaries()->Head();
+	while(l)
+	{
+		Function *n = (Function*)l->Head();
+		while(n)
+		{
+			if(all || n->Info()) count++;
+			n = (Function*)n->Next();
+		}
+		l = (List*)l->Next();
+	}
+
+
+	while(c)
+	{
+		Function *n = c->FirstFunction();
+		while(n)
+		{
+			if(all || n->Info()) count++;
+			n = (Function*)n->Next();
+		}
+		c = c->Owner();
+	}
+
+	charp *names = new charp[count];
+
+	count = 0;
+	l = (List*)c->Dictionaries()->Head();
+	while(l)
+	{
+		Function *n = (Function*)l->Head();
+		while(n)
+		{
+			if(n->Info()) 
+				names[count++] = n->Name();
+			n = (Function*)n->Next();
+		}
+		l = (List*)l->Next();
+	}
+
+	c = Context::Instruction->Owner();
+	while(c)
+	{
+		Function *n = c->FirstFunction();
+		while(n)
+		{
+			if(n->Info())
+				names[count++] = n->Name();
+			n = (Function*)n->Next();
+		}
+		c = c->Owner();
+	}
+
+	qsort(names,count,sizeof(charp),cmp);
+	int m = 0;
+	int i;
+	for( i=1;i<count;i++)
+		if(names[m] != names[i]) 
+			names[++m] = names[i];
+	count = m+1;
+
+    CList *v = new CList(count);
+	for(i = 0;i<count;i++)
+			(*v)[i] = Value(names[i]);
+	delete[] names;
+	return Value(v);
+}
+
+Value FailFunction::Execute(int arity,Value *arg)
+{
+	Context::Stop();
+	PrintFunction::Execute(arity,arg);
+	return Error("Macro failed");
+}
+
+Value StopFunction::Execute(int arity,Value *arg)
+{
+	Context::Stop();
+	PrintFunction::Execute(arity,arg);
+	return Value(0.0);
+}
+
+
+
+
+//=============================================================================
+
+
+class MagMLFunction : public Function {
+public:
+	MagMLFunction(char *n) : Function(n,1,tstring) {"Executes MagML code";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value MagMLFunction::Execute(int ,Value *arg)
+{
+	const char *magml_file;
+	arg[0].GetValue(magml_file);
+    MvRequest out;
+    Value v;
+
+    // create a new request to send to the MagML module
+
+    MvRequest r;
+    r.setVerb ("MAGML");
+    r("PATH")   = magml_file;
+    r("_MODE")  = "MACRO";
+    r("PATH")   = magml_file;
+	r("_MACRO") = Script::MacroPath();
+	r("_PATH")  = Script::MacroMainPath();
+
+
+    // call the MagML service directly with this request
+
+	v = Value("MagML",r);
+
+	return v;
+}
+
+
+
+
+
+//=============================================================================
+
+class MemoryFunction : public Function {
+public:
+	MemoryFunction(char *n) : Function(n,0) {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MemoryFunction::Execute(int,Value*)
+{
+	memory_info();
+	return Value();
+}
+
+//=============================================================================
+
+class CallFunction : public Function {
+public:
+	CallFunction(char *n) : Function(n) {}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *) { return arity>0; }
+};
+
+Value CallFunction::Execute(int arity,Value* argv)
+{
+	const char* name;
+	argv[0].GetValue(name);
+
+	for(int i = 1; i < arity; i++)
+		Owner()->Push(argv[i]);
+
+	Owner()->CallFunction(name,arity-1);
+	return Owner()->Pop();
+}
+
+//=============================================================================
+
+class CallArgsFunction : public Function {
+public:
+	CallArgsFunction(char *n) : Function(n,2,tstring,tlist) {}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value CallArgsFunction::Execute(int arity,Value* argv)
+{
+	const char* name;
+	argv[0].GetValue(name);
+
+	CList *l;
+	argv[1].GetValue(l);
+
+	for(int i = 0; i < l->Count(); i++)
+		Owner()->Push((*l)[i]);
+
+	Owner()->CallFunction(name,l->Count());
+	return Owner()->Pop();
+}
+
+
+//=============================================================================
+
+/*******************************************************************************
+ *
+ * Class        : MetviewVersionFunction : Function
+ *
+ * Description  : Macro function that returns version information about Metview
+ *
+ ******************************************************************************/
+
+extern "C" {
+
+#ifdef FORTRAN_NO_UNDERSCORE
+	#define EMOSNUM emosnum
+#else
+	#define EMOSNUM emosnum_
+#endif
+
+fortint EMOSNUM (fortint *KONOFF);
+
+}
+
+
+class MetviewVersionFunction : public Function {
+public:
+	MetviewVersionFunction (const char *n) : Function(n, 0)
+	{info = "Returns version information about Metview";}
+	virtual Value Execute        (int arity, Value *arg);
+};
+
+
+Value MetviewVersionFunction::Execute(int arity,Value *arg)
+{
+	request  *r;
+	long grib_api_version;
+	long mars_version;
+	fortint emos_version, konoff=1;
+    MvVersionInfo mvInfo;  // the constructor populates the class with information
+	
+
+	// the return value will be a request whose elements we will populate below
+    r = empty_request (NULL);
+
+
+	if (mvInfo.infoFound())
+	{
+		set_value(r, "metview_version", "%d", mvInfo.version());
+		set_value(r, "metview_major",   "%d", mvInfo.majorVersion());
+		set_value(r, "metview_minor",   "%d", mvInfo.minorVersion());
+	}
+	
+	else
+	{
+        char  msg [1024];
+        strncpy (msg, mvInfo.errorMessage().c_str(), 1023);
+		marslog(LOG_EROR, msg);
+	}
+
+
+	grib_api_version = grib_get_api_version();
+	set_value(r, "grib_api_version", "%d", grib_api_version);
+
+	mars_version = marsversion();
+	set_value(r, "mars_version", "%d", mars_version);
+
+	emos_version = emosnum_(&konoff);
+	set_value(r, "emos_version", "%d", emos_version);
+
+	return Value(r);
+}
+
+
+
+//=============================================================================
+
+class WaitModeFunction : public Function {
+public:
+	WaitModeFunction(char *n) : Function(n,1,tnumber)
+    {info = "Causes Macro to always wait(1)/not wait(0) for functions to complete before continuing.";}
+	virtual Value Execute(int,Value*);
+};
+
+Value WaitModeFunction::Execute(int,Value *arg)
+{
+	int n = Context::WaitMode();
+	int m;
+
+	arg[0].GetValue(m);
+	Context::WaitMode(m);
+
+	return Value(n);
+}
+
+
+
+
+//=============================================================================
+
+static void install(Context *c)
+{
+	c->AddFunction(new PrintFunction("print"));
+	c->AddFunction(new FailFunction("fail"));
+	c->AddFunction(new StopFunction("stop"));
+	c->AddFunction(new ImportFunction("import"));
+	c->AddFunction(new ExportFunction("export"));
+	c->AddFunction(new TypeFunction("type"));
+	c->AddFunction(new DescribeFunction("describe"));
+	c->AddFunction(new DictionaryFunction("dictionary"));
+	c->AddFunction(new ArgsFunction("arguments"));
+	c->AddFunction(new NilFunction("nil"));
+	c->AddFunction(new NilAppendFunction("&"));
+	c->AddFunction(new NilCompareFunction("=",1));
+	c->AddFunction(new NilCompareFunction("<>",0));
+	c->AddFunction(new NilCountFunction("count"));
+	c->AddFunction(new NameFunction("name"));
+	c->AddFunction(new StoreFunction("store"));
+	c->AddFunction(new FetchFunction("fetch"));
+	c->AddFunction(new InlineFunction("inline"));
+	c->AddFunction(new RandomFunction("random"));
+	c->AddFunction(new WaitModeFunction("waitmode"));
+
+	c->AddFunction(new MagMLFunction("magml"));
+
+	c->AddFunction(new CallFunction("call"));
+	c->AddFunction(new CallArgsFunction("callargs"));
+
+	c->AddFunction(new MemoryFunction("memory_info"));
+	c->AddFunction(new MetviewVersionFunction("version_info"));
+
+	c->AddFallback(new CountFallback("count"));
+	c->AddFallback(new SubFallback("[]"));
+	c->AddFallback(new CmpFallback("=",true));
+	c->AddFallback(new CmpFallback("<>",false));
+}
+
+static Linkage Link(install);
+
diff --git a/src/Macro/mlist.cc b/src/Macro/mlist.cc
new file mode 100644
index 0000000..a063ada
--- /dev/null
+++ b/src/Macro/mlist.cc
@@ -0,0 +1,767 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "arith.h"
+#include "code.h"
+#include "inc_stl.h"
+
+
+//=============================================================================
+
+int CList::Write(FILE *f)
+{
+	int e = 0;
+	for(int i = 0; i< count; i++)
+		if(values[i].Write(f)) e++;
+	return e;
+}
+
+void CList::ToRequest(request* &x)
+{
+	static request *r = 0;
+	free_all_requests(r);
+	r = 0;
+	request *s=0,*t = 0;
+
+	for(int i = 0; i< count; i++)
+	{
+		request *u;
+		values[i].GetValue(u);
+		u = clone_all_requests(u);
+
+		if(s == 0) s = u; else t->next = u;
+		t = u;
+		while(t && t->next) t = t->next;
+
+	}
+	x = r = s;
+}
+
+void CList::SetSubValue(Value& v,int arity,Value *arg)
+{
+	if(!Check(1,v,arity,arg,tany,1,tnumber))
+		return;
+
+	int  n;
+	arg[0].GetValue(n);
+
+	if(n < 1 || n > count)
+	{
+		Error("List index [%d] is out of range (list is %d long)",
+			n,count);
+		return;
+	}
+
+	values[n-1] = v;
+}
+
+//=============================================================================
+
+void CList::Copy(const CList& v)
+{
+	count  = v.count;
+	values = new Value[count];
+
+	for(int i = 0; i< count; i++)
+		values[i] = v.values[i];
+}
+
+void CList::Add(const Value& v)
+{
+	count++;
+    Value *new_values = new Value[count];
+
+	for(int i = 0; i < count-1; i++)  // copy the existing values across
+		new_values[i] = values[i];
+
+    new_values[count-1] = v;  // add the new value
+
+	values = new_values;
+}
+
+CList& CList::operator=(const CList& v)
+{
+	CleanUp();
+	Copy(v);
+	return *this;
+}
+
+CList::CList(const CList& v) : Content(tlist)
+{
+	Copy(v);
+}
+
+void CList::Print(void)
+{
+	cout << '[';
+	for(int i=0;i<count;i++)
+	{
+		values[i].Print();
+		if(i != count-1) cout << ',';
+	}
+	cout << ']';
+}
+
+void CList::Dump2(void)
+{
+	cout << "[\n";
+	for(int i=0;i<count;i++)
+	{
+		values[i].Dump(2);
+		cout << ",\n";
+	}
+	cout << "]\n";
+}
+
+Content *CList::Clone(void)
+{
+	CList *list = new CList(*this);
+	return list;
+}
+
+//=============================================================================
+
+class ListFunction : public Function {
+public:
+	ListFunction(char *n) : Function(n)
+	{info = "Builds a list from its arguments";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+
+Value ListFunction::Execute(int arity ,Value *arg)
+{
+	CList *v = new CList(arity);
+
+	for(int i=0;i<arity;i++)
+		(*v)[i] = arg[i];
+
+	return Value(v);
+}
+//=============================================================================
+
+
+class ListCountFunction : public Function {
+public:
+	ListCountFunction(char *n) : Function(n,1,tlist) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ListCountFunction::Execute(int,Value *arg)
+{
+	CList *v;
+	arg[0].GetValue(v);
+	return Value(v->Count());
+}
+
+//=============================================================================
+
+
+class ListElemFunction : public Function {
+public:
+	ListElemFunction(char *n) : Function(n,2,tlist,tnumber) {};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int ListElemFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity<2 || arity > 4) return false;
+	if(arg[0].GetType() != tlist) return false;
+
+	for(int i=1;i<arity;i++)
+		if(arg[i].GetType() != tnumber)
+			return false;
+
+	return true;
+}
+
+Value ListElemFunction::Execute(int arity,Value *arg)
+{
+	CList *v;
+	int  n;
+	int  m = 0;
+	int  s = 0;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(n);
+	if(arity>2) arg[2].GetValue(m);
+	if(arity>3) arg[3].GetValue(s);
+
+	if(m <  n) m = n;
+	if(m >  v->Count()) m = v->Count();
+	if(s <= 0) s = 1;
+
+	if(n <1 || n>v->Count())
+		return Error("Index out of range. Index is %d, list size is %d",
+			n,v->Count());
+
+	if(m == n ) return (*v)[n-1];
+
+
+	int c = (m-n)/s+1;
+	CList *l = new CList(c);
+	int i,j;
+
+	for(i = 0, j = n-1 ; i < c ; i++, j += s)
+		(*l)[i] = (*v)[j];
+
+	return Value(l);
+}
+
+//=============================================================================
+
+class ListAddFunction : public Function {
+public:
+	ListAddFunction(char *n) : Function(n,2,tlist,tlist) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value ListAddFunction::Execute(int,Value *arg)
+{
+	CList *v1;
+	CList *v2;
+
+	arg[0].GetValue(v1);
+	arg[1].GetValue(v2);
+
+
+	CList *v = new CList(v1->Count() + v2->Count());
+
+	int i,n = 0;
+
+	for(i=0;i<v1->Count();i++)
+		(*v)[n++] = (*v1)[i];
+
+	for(i=0;i<v2->Count();i++)
+		(*v)[n++] = (*v2)[i];
+
+	return Value(v);
+}
+
+//=============================================================================
+
+class ListInFunction : public Function {
+public:
+	ListInFunction(char *n) : Function(n,2,tany,tlist)
+	{ info="Test if a value is in a list";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value ListInFunction::Execute(int,Value *arg)
+{
+	CList *v;
+	vtype t = arg[0].GetType();
+	char *eq = strcache("=");
+	int   x = 0;
+
+	arg[1].GetValue(v);
+	OpTest test;
+
+	for(int i=0;i<v->Count();i++)
+		if((*v)[i].GetType() == t)
+		{
+			Owner()->Push((*v)[i]);
+			Owner()->Push(arg[0]);
+			Owner()->CallFunction(eq,2);
+			Value y = Owner()->Pop();
+			if (test.Pass(y))
+			{
+				x = 1;
+				break;
+			}
+		}
+
+	strfree(eq);
+	return Value(x);
+}
+
+//=============================================================================
+
+class ListFindFunction : public Function {
+public:
+	ListFindFunction(char *n) : Function(n,2,tany,tlist)
+	{ info="Find where an item occurs in a list";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+int ListFindFunction::ValidArguments(int arity,Value *arg)
+{
+    if(arity != 2 && arity != 3)  return false;
+	if(arg[0].GetType() != tlist) return false;                    // first arg must be a list
+                                                                   // second arg can be anything
+	if((arity == 3) && arg[2].GetType() != tstring) return false;  // third (optional) arg must be a string
+	return true;
+}
+
+
+Value ListFindFunction::Execute(int arity,Value *arg)
+{
+    CList *v;
+    vtype t = arg[1].GetType();
+    char *eq = strcache("=");
+    int   x = 0;
+    bool findAll = false;
+
+    if (arity == 3)
+    {
+        const char *s;
+        arg[2].GetValue(s);
+        if (s && !strcmp(s, "all"))
+            findAll = true;
+        else
+            marslog(LOG_WARN, "find(any, list, string) only accepts 'all' as its last argument. Supplied: '%s'", s);
+    }
+
+    arg[0].GetValue(v);
+
+
+    vector<int> results;  // only need a vector if we're looking for more than 1 result
+
+    for(int i=0;i<v->Count();i++)
+    {
+        if((*v)[i].GetType() == t)
+        {
+            Owner()->Push((*v)[i]);
+            Owner()->Push(arg[1]);
+            Owner()->CallFunction(eq,2);
+            Value y = Owner()->Pop();
+            y.GetValue(x);
+            if(x)                              // did it match?
+            {
+                if (findAll)
+                {
+                    results.push_back(i+1);    // we want 'all', so add to our list
+                }
+                else
+                {
+                    strfree(eq);
+                    return Value(i+1);         // we want just the first, to return it
+                }
+            }
+        }
+    }
+
+
+    strfree(eq);
+
+    if (findAll)
+    {
+        if (results.size() > 0)
+        {
+            CList *outlist = new CList(results.size());
+
+            for(int i=0; i < results.size(); i++)
+            {
+                (*outlist)[i] = results[i];
+            }
+            return Value(outlist);
+        }
+        else
+        {
+            return Value();  // looked for all the values, but did not find any - return nil
+        }
+    }
+    else  // looked for the first value, but did not find it - return nil
+    {
+        return Value();
+    }
+}
+
+//=============================================================================
+class ListSortFunction : public Function
+{
+	int  	 ReturnType;
+
+	static CList*  	 SortList;
+	static const char*  	 SortFunc;
+	static Context*  SortCtxt;
+
+	static int Sort(const void *x,const void *y);
+
+public:
+	ListSortFunction(char* n,int t) : Function(n), ReturnType(t)
+	       {info="Sorts a list or indices (sort/sort_indices/sort_and_indices)";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+CList *ListSortFunction::SortList = 0;
+const char  *ListSortFunction::SortFunc = 0;
+Context*  ListSortFunction::SortCtxt = 0;
+
+int ListSortFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 1 && arity != 2)                 return false;
+	if(arg[0].GetType() != tlist)                return false;
+	if(arity ==2 && arg[1].GetType() != tstring) return false;
+	return true;
+}
+
+int ListSortFunction::Sort(const void *x,const void *y)
+{
+	int *a = (int*)x;
+	int *b = (int*)y;
+
+	Value& v1 = (*SortList)[*b];
+	Value& v2 = (*SortList)[*a];
+
+	SortCtxt->Push(v1);
+	SortCtxt->Push(v2);
+	SortCtxt->CallFunction(SortFunc,2);
+	Value v = SortCtxt->Pop();
+
+	int z;
+	v.GetValue(z);
+	return z?1:-1;
+}
+
+Value ListSortFunction::Execute(int arity,Value *arg)
+{
+	static char *lt = 0;
+	if(lt == 0) lt = strcache("<");
+
+	SortCtxt = Owner();
+	arg[0].GetValue(SortList);
+
+	if(arity == 1)
+		SortFunc = lt;
+	else
+		arg[1].GetValue(SortFunc);
+
+
+	//int *x = (int*)NEW_ARRAY(int,SortList->Count()); // new int seems to crash !!!
+	int *x = new int[SortList->Count()];
+
+	int i;
+	for( i=0;i<SortList->Count();i++) x[i] = i;
+
+	qsort(x,SortList->Count(),sizeof(int),Sort);
+
+	CList *c = new CList(SortList->Count());
+
+	switch( ReturnType )
+	  {
+	  case 1:                          //-- 'sorted list'
+	    for( i=0; i<SortList->Count(); i++ )
+	      (*c)[i] = (*SortList)[x[i]];
+	    break;
+
+	  case 2:                          //-- 'sorted indices'
+	    for( i=0; i<SortList->Count(); i++ )
+	      (*c)[i] = Value( x[i] + 1 ); //- indices from 1: 1,2,3,...
+	    break;
+
+	  case 3:                          //-- 'sorted list and indices'
+	    for( i=0; i<SortList->Count(); i++ )
+	      {
+		CList* pair = new CList(2);//- memory leak here!?
+		(*pair)[0] = (*SortList)[x[i]];
+		(*pair)[1] = x[i] + 1;     //- indices from 1: 1,2,3,...
+
+		(*c)[i] = Value(pair);
+	      }
+	    break;
+	  }
+
+	delete[] x;
+
+	return Value(c);
+}
+
+
+//=============================================================================
+
+class ListUniqueFunction : public Function {
+public:
+	ListUniqueFunction(char *n) : Function(n,1,tlist)
+	{ info="Returns a list with all the unique items in the input list";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value ListUniqueFunction::Execute(int arity,Value *arg)
+{
+    CList *v;
+    char *in = strcache("in");
+    int   x = 0;
+
+
+    arg[0].GetValue(v);
+
+    CList *list = new CList(0);  // start with an empty list and add one element at a time
+
+    Value list_as_value(list);
+
+    for(int i=0;i<v->Count();i++)
+    {
+        Owner()->Push((*v)[i]);        // call "element in u"
+        Owner()->Push(list_as_value);  // call "element in u"
+        Owner()->CallFunction(in,2);   // call "element in u"
+        Value y = Owner()->Pop();      // call "element in u"
+        y.GetValue(x);
+
+        if (!x)                        // was it not in u?
+        {
+            list->Add((*v)[i]);
+        }
+    }
+
+    strfree(in);
+
+    return list_as_value;
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * Function      : ListListBinOp
+ *
+ * Description   : Generic function for performing an arithmetic operation
+ *                 between two lists; operation is performed for each pair
+ *                 of elements. An error is returned if the lists are of
+ *                 different sizes.
+ *
+ ******************************************************************************/
+
+class ListListBinOp : public Function {
+
+	binproc F_;
+
+public:
+	ListListBinOp(const char *n,binproc f) : Function(n,2,tlist,tlist) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ListListBinOp::Execute(int,Value *arg)
+{
+	CList *v;
+	CList *w;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(w);
+
+	char *funcname = strcache(Name());
+
+	if(v->Count() != w->Count())
+    {
+	    //marslog(LOG_WARN, "lists have different numbers of elements (%d and %d) - '%s' returning nil", v->Count(), w->Count(), funcname);
+		return Value();
+	}
+
+	CList *p = new CList(v->Count());
+
+	int count = v->Count(); 
+	for (int i = 0;i<count;i++)
+	{
+		Owner()->Push((*v)[i]);
+		Owner()->Push((*w)[i]);
+		Owner()->CallFunction(funcname,2);
+		Value y = Owner()->Pop();
+        (*p)[i] = y;
+	}
+
+	return Value(p);
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * Function      : NumListBinOp
+ *
+ * Description   : Generic function for performing an arithmetic operation
+ *                 between a list and a number (or a date)
+ *
+ ******************************************************************************/
+
+class NumListBinOp : public Function {
+
+	binproc F_;
+
+public:
+	NumListBinOp(const char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NumListBinOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[1].GetType() == tlist && (arg[0].GetType() == tnumber || arg[0].GetType() == tdate))
+		return true;
+	if(arg[0].GetType() == tlist && (arg[1].GetType() == tnumber || arg[1].GetType() == tdate))
+		return true;
+	return false;
+}
+
+
+Value NumListBinOp::Execute(int,Value *arg)
+{
+    char *funcname = strcache(Name());
+    bool listFirst = arg[0].GetType() == tlist; // is the list the first argument?
+    bool isDate;                                // is the other argument a date?
+    double n;
+    Date   d;
+    CList *v;
+    
+
+    if(!listFirst)
+    {
+        isDate = arg[0].GetType() == tdate;
+        if (isDate) arg[0].GetValue(d);
+        else        arg[0].GetValue(n);
+        arg[1].GetValue(v);
+
+        CList *p = new CList(v->Count());
+
+        // for each point, compute
+
+        int count = v->Count();
+        for (int i = 0; i< count;i++)
+        {
+            if (isDate) Owner()->Push(d);
+            else        Owner()->Push(n);
+            Owner()->Push((*v)[i]);
+            Owner()->CallFunction(funcname,2);
+            Value y = Owner()->Pop();
+            (*p)[i] = y;
+        }
+
+        return Value(p);
+    }
+    else
+    {
+        isDate = arg[1].GetType() == tdate;
+        arg[0].GetValue(v);
+        if (isDate) arg[1].GetValue(d);
+        else        arg[1].GetValue(n);
+
+        CList *p = new CList(v->Count());
+
+
+        // for each point, compute
+
+        int count = v->Count();
+        for (int i = 0; i< count;i++)
+        {
+            Owner()->Push((*v)[i]);
+            if (isDate) Owner()->Push(d);
+            else        Owner()->Push(n);
+            Owner()->CallFunction(funcname,2);
+            Value y = Owner()->Pop();
+            (*p)[i] = y;
+        }
+
+        return Value(p);
+    }
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : ListUniOp
+ *
+ * Description   : Generic function for performing an arithmetic operation
+ *                 on a list
+ *
+ ******************************************************************************/
+
+class ListUniOp : public Function {
+
+	uniproc F_;
+
+public:
+	ListUniOp(const char *n,uniproc f) : Function(n,1,tlist) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value ListUniOp::Execute(int,Value *arg)
+{
+	CList *v;	// original  list
+	CList *p;	// resultant list
+	char *funcname = strcache(Name());
+
+	arg[0].GetValue(v);
+
+	p = new CList(v->Count());
+
+    int count = v->Count();
+	for (int i = 0; i< count;i++)
+	{
+		Owner()->Push((*v)[i]);
+		Owner()->CallFunction(funcname,1);
+		Value y = Owner()->Pop();
+       	(*p)[i] = y;
+	}
+
+	return Value(p);
+}
+
+
+
+
+
+static void install(Context *c)
+{
+	int i;
+
+	c->AddFunction(new ListFunction("list"));
+	c->AddFunction(new ListCountFunction("count"));
+	c->AddFunction(new ListElemFunction("[]"));
+	c->AddFunction(new ListAddFunction("&"));
+	c->AddFunction(new ListInFunction("in"));
+	c->AddFunction(new ListFindFunction("find"));
+	c->AddFunction(new ListSortFunction("sort",1));
+	c->AddFunction(new ListSortFunction("sort_indices",2));
+	c->AddFunction(new ListSortFunction("sort_and_indices",3));
+	c->AddFunction(new ListUniqueFunction("unique"));
+
+
+    // binary operations
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new ListListBinOp(BinOps[i].symb,BinOps[i].proc));
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new NumListBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+
+	// Mult op as Binary op
+    // (the above comment is from bufr.cc, but it's not exactly clear how these
+    // operations differ from the BinOps ones)
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new ListListBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new NumListBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+
+	// Unary operations
+
+	for(i=0;UniOps[i].symb;i++)
+		c->AddFunction(new ListUniOp(UniOps[i].symb,UniOps[i].proc ));
+
+
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/module.cc b/src/Macro/module.cc
new file mode 100644
index 0000000..7449ded
--- /dev/null
+++ b/src/Macro/module.cc
@@ -0,0 +1,74 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <ctype.h>
+#include "script.h"
+
+Value Module::Run(const char*,int,Value *)
+{
+	service_run(Svc);
+	return Value();
+}
+
+Module::Module(const char *name) : Script(name)
+{
+	Svc = create_service(name);
+	add_service_callback(Svc,0,Serve,this);
+	SetRunMode("server");
+}
+
+void Module::Serve(svcid *id,request *r,void *t)
+{
+	Module *m = (Module*)t;
+	m->Dispatch(id,r);
+}
+
+void Module::Dispatch(svcid *id,request *r)
+{
+	SvcId = id;
+	mars.outproc  = PutMessage;
+
+	Value v;
+	Value w;
+
+	v.SetContent(r);
+
+	const char *action = get_value(r,"_ACTION",0);
+	/* change to lower ... */
+	char *n = NEW_STRING(r->name);
+	char *p = n; while(*p) { if(isupper(*p)) *p = tolower(*p); p++;}
+
+	p = strcache(n); free(n);
+
+	
+	
+	Function *f = action?FindHandler(action,1,&v):0;
+
+	if(f == 0) f = FindHandler(p,1,&v);
+
+	if(f == 0) 
+	{
+		set_svc_err(id,1);
+		set_svc_msg(id,"No handler for %s",p);
+		send_reply(id,0);
+	}
+	else
+	{
+		w = f->Execute(1,&v);
+		set_svc_err(id,GetError());
+		w.GetValue(r);
+		send_reply(id,r);
+	}
+
+	SvcId = 0;
+	mars.outproc = 0;
+
+	strfree(p);
+
+}
diff --git a/src/Macro/mstring.cc b/src/Macro/mstring.cc
new file mode 100644
index 0000000..983630b
--- /dev/null
+++ b/src/Macro/mstring.cc
@@ -0,0 +1,449 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include <string>
+#include <ctype.h>
+#include <string.h>
+
+using std::string;
+
+//=============================================================================
+
+int CString::Write(FILE *f)
+{
+	fprintf(f,"%s",string);
+	return ferror(f);
+}
+
+void CString::ToRequest(request* &x)
+{
+    static request *r = 0;
+	if(r == 0) r = empty_request("STRING");
+	set_value(r,"VALUE","%s",string);
+	x = r;
+}
+
+class StringFunction : public Function {
+public:
+	StringFunction(char *n) : Function(n,1,tany) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+void CString::Dump1()
+{
+    if ( !string ) return;
+
+	char *p = string;
+	while(*p)
+	{
+		if(isprint(*p)) cout << *p;
+		else cout << '<' << (int)*p << '>';
+		p++;
+	}
+}
+
+void CString::Dump2()
+{
+	cout << "'";
+	Dump1();
+	cout << "'";
+}
+
+
+
+Value StringFunction::Execute(int ,Value *arg)
+{
+	const char *p;
+	arg[0].GetValue(p);
+	return Value(p);
+}
+
+class ParseFunction : public Function {
+public:
+	ParseFunction(char *n) : Function(n)
+	{info = "Splits a string into tokens.";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+int ParseFunction::ValidArguments(int arity,Value *arg)
+{
+
+    /* Note that it is not clear why this function accepts non-strings
+       as a second parameter - when would this be useful?
+       It can accept numbers and dates as strings to be split
+       - you can probably do most of the date-splitting functionality
+       with other macro functions, but there could be a use for
+       splitting a number on a dot, for instance.
+
+       ir/2007-08-15.
+    */
+
+	if(arity != 1 && arity != 2 && arity != 3) return false;
+
+	if (arity == 3)  // type parameter specified?
+	{
+		if (arg[2].GetType() != tstring)  // yes, but it has to be a string
+			return false;
+
+		arity--;  // 3rd param ok, but no need to check this parameter again
+	}
+
+
+	for(int i=0;i<arity;i++)
+		switch(arg[i].GetType())
+		{
+			case tnumber:
+			case tstring:
+			case tdate:
+				break;
+
+			default:
+				return false;
+		}
+	return true;
+}
+
+
+Value ParseFunction::Execute(int arity,Value *arg)
+{
+  const char *p;
+  const char *q = " \t";
+  const char *type;
+  bool asString = false;
+  arg[0].GetValue(p);
+
+  if(arity>1)
+    arg[1].GetValue(q);
+
+
+  if (arity > 2)    // did the user specify that the results should all be
+  {                 // of a particular type?
+    arg[2].GetValue(type);
+    if (!strcmp(type, "string"))
+      asString = true;
+    else
+      return Error("the parse() function currently only accepts 'string' as its third argument. It was given '%s'", type);
+  }
+
+  CList *l = 0;
+
+  if( *q == '\0' )    //-- empty delimiter => split into single chars
+    {
+      char chr[2];
+      chr[1] = '\0';
+
+      int cnt = strlen(p);
+      l = new CList(cnt);
+
+      for( int i=0; i<cnt; ++i )
+	{
+	  chr[0] = p[i];
+	  (*l)[i] = Value(chr);
+	}
+    }
+  else
+    {
+	char *s = new char[strlen(p)+1];
+	char *t = s;
+	strcpy(s,p);
+
+	int cnt = 0;
+	while(strtok(t,q))
+	{
+		cnt++;
+		t = 0;
+	}
+
+	t = s;
+	strcpy(s,p);
+	int i = 0;
+	char *a;
+	l = new CList(cnt);
+
+	while(a = strtok(t,q))
+	{
+		if(!asString && isdate(a))
+			(*l)[i] = Value(Date(a));
+		else if(!asString && is_number(a))
+			(*l)[i] = Value(atof(a));
+		else
+			(*l)[i] = Value(a);
+		t = 0;
+		i++;
+	}
+
+	delete[] s;
+    }
+
+  return Value(l);
+}
+
+
+class SubstringFunction : public Function {
+public:
+	SubstringFunction(char *n) : Function(n)
+	{info = "Returns a substring.";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int SubstringFunction::ValidArguments(int arity,Value *arg)
+{
+  if( arity != 3 )
+    return false;
+
+  if( arg[0].GetType() != tstring )
+    return false;
+
+  for(int i=1; i<arity; ++i)
+    if( arg[i].GetType() != tnumber )
+      return false;
+
+  return true;
+}
+Value SubstringFunction::Execute(int arity,Value *arg)
+{
+  const char* s;
+  arg[0].GetValue(s);              //-- original string
+
+  int c1, c2;
+  arg[1].GetValue(c1);             //-- first char index (1,..,n)
+  arg[2].GetValue(c2);             //-- last char index
+
+  Value v;                         //-- return value
+
+  if( c1 > strlen( s ) || c1 < 1 || c2 < c1 )
+    {
+      v = "\0";                    //-- no such substring!!!
+    }
+  else
+    {
+      int sslen = c2 - c1 + 1;     //-- substring length
+      char* ss = new char[ sslen + 1 ];
+
+      strncpy( ss, (s+c1-1), sslen );
+      ss[ sslen ] = '\0';          //-- make sure ss is terminated
+
+      v = ss;
+      delete[] ss;
+    }
+
+  return v;
+}
+
+
+class StringSearchFunction : public Function {
+public:
+	StringSearchFunction(char *n) : Function(n,2,tstring,tstring)
+	   {info = "Search for a given substring.";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value StringSearchFunction::Execute(int arity,Value *arg)
+{
+  const int cNotFound = -1;
+
+  const char* os;
+  arg[0].GetValue(os);             //-- get original string
+
+  const char* ss;
+  arg[1].GetValue(ss);             //-- get search string
+
+  if( !ss || !os )
+     return Value(cNotFound);      //-- cannot search with NULL ptrs
+
+  int oslen = strlen(os);
+  int sslen = strlen(ss);
+
+  if( oslen==0 || sslen==0 || sslen>oslen )
+     return Value(cNotFound);       //-- empty string or search string too long
+
+  const char* ssloc = strstr(os,ss);//-- look for search string
+
+  if( ! ssloc )
+     return Value(cNotFound);       //-- string not found
+
+  int loca = ssloc - os + 1;        //-- string found - calculate location of 1st char
+
+  return Value(loca);
+}
+
+
+
+class StringAddFunction : public Function {
+public:
+	StringAddFunction(char *n) : Function(n,2,tstring|tnumber|tdate,
+		tstring|tnumber|tdate) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value StringAddFunction::Execute(int ,Value *arg)
+{
+	const char *c;
+
+	arg[0].GetValue(c);
+	string s = c;
+
+	arg[1].GetValue(c);
+	string s2 = c;
+
+	s = s + s2;
+
+	Value v( s.c_str() );
+	return v;
+}
+
+
+class LengthFunction : public Function {
+public:
+	LengthFunction(char *n) : Function(n,1,tstring)
+	{info = "Returns the length of a string.";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value LengthFunction::Execute(int ,Value *arg)
+{
+	const char *p = 0;
+	arg[0].GetValue(p);
+	return Value(p?strlen(p):0);
+}
+
+
+class AsciiFunction : public Function {
+public:
+	AsciiFunction(char *n) : Function(n,1,tnumber)
+	   {info = "Returns the corresponding ASCII character";}
+	virtual Value Execute(int arity, Value *arg);
+};
+
+Value AsciiFunction::Execute(int ,Value *arg)
+{
+  static char cbuf[2] = { '?', '\0' };
+
+	int p = 0;
+	arg[0].GetValue(p);
+	cbuf[0] = (char)p;
+	return Value(cbuf);
+}
+
+
+class StringCaseFunction : public Function {
+	boolean upper;
+public:
+	StringCaseFunction(char *n, boolean up)
+	  : Function(n,1,tstring),
+	    upper(up)
+	    {info = "Sets to unique case of letters";}
+	virtual Value Execute(int arity, Value *arg);
+};
+
+Value StringCaseFunction::Execute(int ,Value *arg)
+{
+  const char* s;
+  arg[0].GetValue(s);              //-- original string
+  Value v;                         //-- return value
+
+  int len = strlen(s);
+  if( len > 0 )
+    {
+      char* ss = strdup(s);
+
+      for( int c=0; c<len; ++c )
+	{
+	  if( upper )
+	    ss[c] = (char)toupper( (int)ss[c] );
+	  else
+	    ss[c] = (char)tolower( (int)ss[c] );
+	}
+
+      v = ss;
+
+      free(ss);
+    }
+  else
+    v = "\0";
+
+  return v;
+}
+
+class NumberFunction : public Function {
+public:
+	NumberFunction(char *n) : Function(n,1,tstring)
+	{info = "Returns the number represented by the string";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value NumberFunction::Execute(int ,Value *arg)
+{
+	const char *p = 0;
+	arg[0].GetValue(p);
+    double d = atof(p);
+	return Value(d);
+}
+
+
+//=============================================================================
+
+static int s_gt(const char* a,const char* b) { return strcmp(a,b) >  0; }
+static int s_lt(const char* a,const char* b) { return strcmp(a,b) <  0; }
+static int s_eq(const char* a,const char* b) { return strcmp(a,b) == 0; }
+static int s_ne(const char* a,const char* b) { return strcmp(a,b) != 0; }
+static int s_ge(const char* a,const char* b) { return strcmp(a,b) >= 0; }
+static int s_le(const char* a,const char* b) { return strcmp(a,b) <= 0; }
+
+//=============================================================================
+
+class StringCmpFunction : public Function {
+	typedef int (*cproc)(const char*,const char*);
+	cproc F_;
+public:
+	StringCmpFunction(char *n,cproc f) : F_(f), Function(n,2,tstring,tstring) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value StringCmpFunction::Execute(int ,Value *arg)
+{
+	const char *p;
+	const char *q;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(q);
+
+	return Value( F_(p,q) );
+}
+
+static void install(Context *c)
+{
+	c->AddGlobal(new Variable("newline", Value("\n") ));
+	c->AddGlobal(new Variable("tab", Value("\t") ));
+
+	c->AddFunction(new StringFunction("string"));
+	c->AddFunction(new StringAddFunction("&"));
+
+	c->AddFunction(new StringCmpFunction(">", s_gt));
+	c->AddFunction(new StringCmpFunction("<", s_lt));
+	c->AddFunction(new StringCmpFunction(">=",s_ge));
+	c->AddFunction(new StringCmpFunction("<=",s_le));
+	c->AddFunction(new StringCmpFunction("=", s_eq));
+	c->AddFunction(new StringCmpFunction("<>",s_ne));
+
+	c->AddFunction(new StringCaseFunction("lowercase",false));
+	c->AddFunction(new StringCaseFunction("uppercase",true));
+
+	c->AddFunction(new AsciiFunction("ascii"));
+	c->AddFunction(new ParseFunction("parse"));
+	c->AddFunction(new LengthFunction("length"));
+	c->AddFunction(new SubstringFunction("substring"));
+	c->AddFunction(new StringSearchFunction("search"));
+	c->AddFunction(new NumberFunction("number"));
+}
+
+static Linkage Link(install);
+
diff --git a/src/Macro/mtable.cc b/src/Macro/mtable.cc
new file mode 100644
index 0000000..faa5314
--- /dev/null
+++ b/src/Macro/mtable.cc
@@ -0,0 +1,711 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+#include <ctype.h>
+#include <float.h>
+#include <string.h>
+#include "macro.h"
+#include "arith.h"
+#include "inc_stl.h"
+#include "MvPath.hpp"
+#include "ctable.h"
+//#include "MvOdb.h"
+
+
+
+
+
+
+
+
+//===========================================================================
+//===========================================================================
+
+CTable::CTable (request *s) : InPool(ttable,s), loaded_(false), ok_(true)
+{
+    //odb_=0;
+    r = clone_all_requests(s);
+
+    if(r)
+    {
+        printf ("CTable::CTable(request *s)\n");
+
+        ok_ = table_.setReaderParameters(r);
+        print_all_requests(r);
+/*
+        const char* path = get_value(r,"PATH",0);
+        string s(path);
+        table_.setPath(s);        */
+    }
+}
+
+
+CTable::CTable (const char  *p,int temp) : InPool(ttable), loaded_(false), ok_(true)
+{
+
+    r = empty_request("TABLE");
+    set_value(r,"PATH","%s",FullPathName(p).c_str());
+    set_value(r,"TEMPORARY","%d",temp);
+
+    if (r)
+    {
+        const char *path = get_value(r,"PATH",0);
+        string s(path);
+        table_.setPath(s);        
+/*
+        const char *delimiter = get_value(r,"DELIMITER",0);
+        if (delimiter)
+            table_setDelimiter(delimiter);*/
+
+
+    }
+}
+
+
+
+void CTable::load ()
+{
+    if (!loaded_)
+    {
+        table_.setDoubleMissingValue(VECTOR_MISSING_VALUE);
+        table_.setStringMissingValue("");
+        if (!table_.read())
+        {
+            Error("CTable::load() - could not read table file.");
+        }
+        loaded_ = true;
+    }
+}
+
+
+/*
+void CTable::unload(void)
+{
+    if(loaded_)
+    {
+        delete odb_;
+        odb_=0;
+    }
+}
+*/
+
+/*CTable::CTable(const char  *p,int temp) : InPool(tgeopts)
+{
+    odb_=0;
+    r = empty_request("ODB_DB");
+    //set_value(r,"PATH","%s",p);
+    set_value(r,"PATH","%s",FullPathName(p).c_str());
+    set_value(r,"TEMPORARY","%d",temp);
+}*/
+
+/*
+long CTable::Count()
+{     
+    if(odb_)
+    {
+        return odb_->rowNum();    
+    }
+    else
+    {
+        return -1;
+    }
+}
+*/
+
+/*
+void CTable::load(void)
+{
+    if(odb_)
+        return;
+
+    if(r)
+    {
+        const char* path = get_value(r,"PATH",0);
+            odb_= MvOdbFactory::make(path);
+    }
+    //else
+    //  is probably a geopoints structure in memory, or with zero count!
+}
+*/
+
+
+
+
+int CTable::Write(FILE* /*f*/)
+{
+    //unload();
+    //return CopyFile(get_value(r,"PATH",0),f);
+    printf ("CTable::Write\n");
+    return 1;
+}
+
+
+/*CGeopts::CGeopts(long count) : InPool(tgeopts)
+{
+    r = NULL;
+    gpts.newReservedSize (count);
+}*/
+
+
+/*CGeopts::CGeopts(CGeopts  *p) : InPool(tgeopts)
+{
+    r = NULL;
+    p->load();
+    gpts = p->gpts;
+}*/
+
+
+CTable::~CTable()
+{
+/*
+    if(r)
+    {
+        const char *t = get_value(r,"TEMPORARY",0);
+        const char *p = get_value(r,"PATH",0);
+        if(t && p)
+        {
+            if(atoi(t)) {
+                unlink(p);
+            }
+        }
+    }
+    //if(count) delete[] pts;
+    free_all_requests(r);
+
+    if(odb_)
+        delete odb_; */
+}
+
+void CTable::ToRequest(request* &/*s*/)
+{
+        Attach(); // Temp fix: if someone want the request
+    //unload();
+    //s = r;
+}
+
+//===========================================================================
+
+
+bool same_string(const char *p,const char *q)
+{
+    while(*p)
+    {
+        int x = islower(*p)?toupper(*p):*p;
+        int y = islower(*q)?toupper(*q):*q;
+
+		//-- '/' chars have been converted: ignore them!
+		if( x != y) 
+            return 0;
+
+		p++;
+		q++;
+	}
+
+	return true;
+}
+
+
+const char *upper_string(const char *s)
+{
+    static char upper[2048];
+    char *u = upper;  // pointer to first element
+
+    while(*s)
+    {
+        *u = islower(*s)?toupper(*s):*s;
+		s++;
+		u++;
+	}
+    *u = '\0';  // terminate the string
+
+	return upper;
+}
+
+
+class TableReadWithParamsFunction : public Function {
+public:
+	TableReadWithParamsFunction (const char *n) : Function(n)
+	{info = "Reads a table file with parameters for parsing it.";}
+	virtual Value Execute(int arity,Value *arg);
+    int ValidArguments(int arity, Value *arg);
+};
+
+int TableReadWithParamsFunction::ValidArguments( int /*arity*/, Value */*arg*/ )
+{
+    return true;
+}
+
+
+
+static void SimpleListToRequestParameter (request *r, const char *param, CList *list)
+{
+    if (!r || !list || !param)
+        return;
+
+
+    for (int i = 0; i < list->Count(); i++)
+    {
+        const char *val;
+        (*list)[i].GetValue(val);
+        add_value (r, param, val);
+    }
+
+}
+
+
+Value TableReadWithParamsFunction::Execute(int arity, Value *arg)
+{
+    // the user supplies a request such as 
+    //
+    // my_table = read_table
+    // (
+    //     filename : '/home/graphics/cgi/metview//Tests/Tables/sample3.csv',
+    //     delimiter : 'q',
+    //     columns   : 6,
+    //     combine_delimiters : 'on'
+    // )
+    //
+    // we get this as a set of arguments, in this case 8.
+
+
+    // first sanity check: ensure that there are an even number of arguments
+    // - this is probably impossible, but just in case...
+    
+    if (arity % 2 != 0)
+    {
+        return Error("read_table: incorrect input parameters");
+    }
+
+
+
+    // create an empty request - we will fill it with the user's parameters
+    // and then pass it to the CTable constructor
+
+    request *r = empty_request("TABLE");
+
+
+    // loop through the supplied parameters, 2 at a time
+
+    int i;
+    const char *param;
+   
+    for (i = 0; i < arity ; i+=2)
+    {
+        const char *value;
+        CList *list;
+
+        // get the parameter name
+
+        if (arg[0].GetType() != tstring)
+            return Error("read_table: incorrect input parameters");
+
+        arg[i].GetValue(param);
+
+
+
+        // get the value - we know it will be there because we already checked
+        // that we have an even number of parameters
+
+        vtype type = arg[i+1].GetType();
+
+        if (type == tstring || type == tnumber)
+            arg[i+1].GetValue(value);
+        else if (type == tlist)
+            arg[i+1].GetValue(list);
+
+
+
+        // which parameter is it?
+        const char *upper_param = upper_string(param);
+
+        if (!strcmp(upper_param, "TABLE_FILENAME"))
+            set_value(r, "PATH", value);
+
+        else if (!strcmp(upper_param, "TABLE_DELIMITER"))
+            set_value(r, upper_string(param), value);
+
+        else if (!strcmp(upper_param, "TABLE_COMBINE_DELIMITERS"))
+            set_value(r, upper_param, value);
+
+        else if (!strcmp(upper_param, "TABLE_HEADER_ROW"))
+            set_value(r, upper_param, value);
+
+        else if (!strcmp(upper_param, "TABLE_DATA_ROW_OFFSET"))
+            set_value(r, upper_param, value);
+
+        else if (!strcmp(upper_param, "TABLE_COLUMNS"))
+            if (type == tlist)
+                SimpleListToRequestParameter (r, upper_param, list);
+                //set_list(r, upper_param, list);
+            else
+                set_value(r, upper_param, value);
+
+        else if (!strcmp(upper_param, "TABLE_COLUMN_TYPES"))
+            if (type == tlist)
+                SimpleListToRequestParameter (r, upper_param, list);
+                //set_list(r, upper_param, list);
+            else
+            {
+                char paramCopy[1024];
+                strcpy (paramCopy, upper_param);
+                set_value(r, paramCopy, upper_string(value));
+            }
+
+        else if (!strcmp(upper_param, "TABLE_META_DATA_ROWS"))
+            if (type == tlist)
+                SimpleListToRequestParameter (r, upper_param, list);
+                //set_list(r, upper_param, list);
+            else
+                set_value(r, upper_param, value);
+
+        else
+            return Error("read_table: %s is not a valid input parameter", param);
+    }
+
+    // find the file that we want to load
+
+    //const char *p = get_value(request,"FILENAME",0);
+    CTable *table = new CTable(r);
+
+    if (!table->constructedOk())
+    {
+        return Error("read_table: could not read table because of previous error");
+    }
+
+
+    return Value(table);
+
+
+
+}
+
+
+//===========================================================================
+
+class TableCountFunction : public Function {
+public:
+	TableCountFunction (const char *n) : Function(n,1,ttable) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TableCountFunction::Execute(int,Value *arg)
+{
+	CTable *t;
+	arg[0].GetValue(t);
+	t->load();
+	return Value(t->Count());
+}
+
+
+//===========================================================================
+
+class TableValuesFunction : public Function {
+
+    bool fieldFromName_;
+
+public:
+	TableValuesFunction (const char *n) : Function(n)
+	{info = "Returns a list of values from the given table column.";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+int TableValuesFunction::ValidArguments(int arity,Value *arg)
+{
+    if (arity != 2)
+      return false;
+
+    if (arg[0].GetType() != ttable)   // first arg should always be a table
+      return false;
+
+    if (arg[1].GetType() == tnumber)  // second arg could be a number
+    {
+        fieldFromName_ = false;
+        return true;
+    }
+
+    if (arg[1].GetType() == tstring)  // second arg could be a string
+    {
+        fieldFromName_ = true;
+        return true;
+    }
+
+    return false;
+}
+
+
+
+Value TableValuesFunction::Execute(int,Value *arg)
+{
+    CTable *ctable;
+    arg[0].GetValue(ctable);    // first arg is a table
+    MvTableColumn* col;
+	ctable->load();
+
+
+    if (fieldFromName_)
+    {
+        const char *colName;
+        arg[1].GetValue(colName);    // second arg is the name of the desired column
+        string strColName(colName);
+        col = ctable->column(strColName);  // get the relevant column
+
+        if (!col)
+        {
+            return Error("Table has no column named %s.", colName);
+        }
+    }
+    
+    else
+    {
+        int colNum;
+        arg[1].GetValue(colNum);    // second arg is the index of the desired column
+        int colIndex = colNum - 1;  // our indexes are zero-based
+
+
+        if (colIndex < 0 || colIndex > ctable->Count()-1)  // index bounds check
+        {
+            return Error("Table has column indexes 1 to %d - cannot access column %d.", ctable->Count(), colNum);
+        }
+
+
+        col = ctable->column(colIndex);  // get the relevant column
+    }
+
+
+
+    if (!col || col->count() <=0)  // no column? no values? return 'nil'
+        return Value();
+
+
+    // now fill either a vector of numbers or a list of strings
+
+    Content *c = 0;
+
+    if (col->type() == MvTableColumn::COL_NUMBER)
+    {
+        CVector *v = new CVector(col->count());  // vectors can only hold numbers
+        c = v;
+        for(int i=0; i < col->count(); i++)
+        {
+            (*v)[i] = col->dVals().at(i);
+        }
+    }
+    else if (col->type() == MvTableColumn::COL_STRING)
+    {
+        CList *v = new CList(col->count());     // we need a list to hold strings
+        c = v;
+        for(int i=0; i < col->count(); i++)
+        {
+            (*v)[i] = col->sVals().at(i).c_str();
+        }
+    }    
+
+
+    return Value(c);
+}
+
+
+//===========================================================================
+
+class TableNameFunction : public Function {
+public:
+	TableNameFunction (const char *n) : Function(n,2,ttable,tnumber)
+	{info = "Returns the name of the given table column.";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TableNameFunction::Execute(int,Value *arg)
+{
+    CTable *ctable;
+    arg[0].GetValue(ctable);    // first arg is a table
+	ctable->load();
+
+    int colNum;
+    arg[1].GetValue(colNum);    // second arg is the index of the desired column
+    int colIndex = colNum - 1;  // our indexes are zero-based
+
+
+    if (colIndex < 0 || colIndex > ctable->Count()-1)  // index bounds check
+    {
+        return Error("Table has column indexes 1 to %d - cannot access column %d.", ctable->Count(), colNum);
+    }
+
+
+    MvTableColumn *col = ctable->column(colIndex);  // get the relevant column
+
+    if(!col || col->name().empty())  // no name? return 'nil'
+        return Value();
+
+
+    // now return the name of the column
+
+    return Value(col->name().c_str());
+}
+
+
+//===========================================================================
+
+class TableMetaDataKeysFunction : public Function {
+public:
+	TableMetaDataKeysFunction (const char *n) : Function(n,1,ttable)
+	{info = "Returns a list of available meta data keys for the given table";}
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value TableMetaDataKeysFunction::Execute(int,Value *arg)
+{
+    CTable *ctable;
+    arg[0].GetValue(ctable);    // first arg is a table
+	ctable->load();
+
+    map<string, string> metadata = ctable->userMetaData();
+
+
+    if(metadata.empty())  // no meta-data? return 'nil'
+        return Value();
+
+
+    // now construct a list of keys from the meta-data
+
+    CList *v = new CList(metadata.size());     // we need a list to hold strings
+
+    map<string, string>::iterator iter     = metadata.begin();
+    map<string, string>::iterator iter_end = metadata.end();
+
+    int i = 0;
+    while (iter != iter_end)
+    {
+        (*v)[i++] = (*iter).first.c_str();
+        iter++;
+    }
+
+    return v;
+}
+
+
+//===========================================================================
+
+class TableMetaDataValueFunction : public Function {
+
+    map<string, string> metadata_;
+    enum eModeType {SINGLE, LIST};
+    eModeType mode;
+
+public:
+	TableMetaDataValueFunction (const char *n) : Function(n,2,ttable, tstring)
+	{info = "Returns the value of then given meta data key for a table";}
+    Value GetMetaDataFromKey (const char *key);
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+int TableMetaDataValueFunction::ValidArguments(int arity,Value *arg)
+{
+    // arguments can be: (table, string)  OR  (table, [list of strings])
+
+    if (arg[0].GetType() != ttable)   // first arg should always be a table
+      return false;
+
+    if (arity !=2 )  // must have two arguments
+    {
+        return false;
+    }
+
+    if (arg[1].GetType() == tstring)  // second arg could be a string
+    {
+        mode = SINGLE;
+        return true;
+    }
+
+    if (arg[1].GetType() == tlist)  // second arg could be a list
+    {
+        mode = LIST;
+        return true;
+    }
+
+    return false;
+}
+
+
+Value TableMetaDataValueFunction::GetMetaDataFromKey (const char *key)
+{
+    string value;
+    
+    if (metadata_.count(key))
+    {
+        value = metadata_[string(key)];
+        return Value(value.c_str());
+    }
+    else
+    {
+        marslog(LOG_WARN, "Table has no metadata associated with key '%s'", key);
+        return Value();   // return 'nil'
+    }
+
+}
+
+Value TableMetaDataValueFunction::Execute(int,Value *arg)
+{
+    CTable *ctable;
+    arg[0].GetValue(ctable);    // first arg is a table
+	ctable->load();
+
+    metadata_ = ctable->userMetaData();
+
+
+    if(metadata_.empty())  // no meta-data? return 'nil'
+    {
+        marslog(LOG_WARN, "Table has no metadata");
+        return Value();
+    }
+
+
+    if (mode == SINGLE)         // returning a single value from a single key
+    {
+        const char *key;
+        arg[1].GetValue(key);
+        return GetMetaDataFromKey(key);
+    }
+    
+    else /*if (mode == LIST)*/      // returning a list of values from a list of keys
+    {
+        CList *keys;
+        arg[1].GetValue(keys);
+        CList *values = new CList (keys->Count());
+
+        for (int i = 0 ; i < keys->Count(); i++)
+        {
+            const char *key;
+            (*keys)[i].GetValue(key);
+            (*values)[i] = GetMetaDataFromKey(key);
+        }
+        return values;
+    }
+ }
+
+
+//===========================================================================
+
+
+static void install(Context *c)
+{
+    c->AddFunction(new TableReadWithParamsFunction("read_table"));
+    c->AddFunction(new TableCountFunction("count"));
+    c->AddFunction(new TableValuesFunction("values"));
+    c->AddFunction(new TableNameFunction("name"));
+    c->AddFunction(new TableMetaDataKeysFunction("metadata_keys"));
+    c->AddFunction(new TableMetaDataValueFunction("metadata_value"));
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/mvector.cc b/src/Macro/mvector.cc
new file mode 100644
index 0000000..1323bbd
--- /dev/null
+++ b/src/Macro/mvector.cc
@@ -0,0 +1,1551 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <utility>
+#include <algorithm>
+#include <vector>
+
+
+#include "macro.h"
+#include "arith.h"
+
+/*
+
+  To do:  (o = to do, * = done)
+  
+    * allow nil & vector
+    * allow vector & vector
+    * vector op vector
+    * vector op number
+    * fun(vector)  , e.g. abs()
+    * cater for missing values - vector_missing_value?
+    * custom function: gridsetvals()
+    * allow nil & number  -> vector
+      - NO, nil & number -> number already
+      - BUT nil & vector -> vector
+    * allow vector & number
+    * vector->list-of-numbers  ; tolist(vector)
+    * bitmap(), nobitmap() functions
+    * loop on vector elements (already available)
+    * vector subsets, e.g. vector[1, 10]
+    * list-of-numbers -> vector
+    o set a grib array, e.g. grib_set_double_array
+    o parse a string , e.g. '1,2,3' into a vector?
+    o consider CSV format - list of vectors, or matrix?
+    o consider row(matrix,1), col(matrix,1) to return vector
+
+*/
+
+
+/*
+    A note about missing values in vectors.
+    We use mars.grib_missing_value as the missing value indicator.
+    This is because we will often be populating vectors with GRIB values,
+    and if we use the same missing value indicator, then we don't need to
+    perform a conversion from mars.grib_missing_value to vector_missing_value.
+    VECTOR_MISSING_VALUE is defined to be mars.grib_missing_value, but changing
+    this would not be sufficient, as some code will assume that it is the same as
+    mars.grib_missing_value (for efficiency).
+*/
+
+enum eVectorSortType
+{
+    VSORT_VALUES,
+    VSORT_INDICES
+};
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::CVector(int)
+ *
+ * Description   : Creates a new vector of given size and sets all elements
+ *                 to 0.0 if zeroValues is true.
+ *
+ ******************************************************************************/
+
+CVector::CVector(int n, bool zeroValues) : Content(tvector)
+{
+    values = 0;
+
+    if(n<1)
+    {
+        marslog( LOG_WARN, "Vector size 0, forcing size to 1" );
+        n = 1;
+    }
+	size   = n;
+	values = new double[size];
+    
+    if (zeroValues)
+	    for(int i=0;i<size;i++) values[i] = 0.0;
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::CVector(request*)
+ *
+ * Description   : Creates a new vector from the given request, with size and
+ *                 elements taken from the SIZE and VALUES parameters respectively.
+ *
+ ******************************************************************************/
+
+CVector::CVector(request* r) : Content(tvector)
+{
+	const char *path;
+	char buf[20] = "";
+	FILE *f;
+	int read;
+
+	path = get_value( r, "PATH", 0 );     /* get the path to the storage file */
+
+	f = fopen(path, "r");
+
+	if (!f)
+	{
+		Error("read_vector_from_request: unable to load file %s", path);
+	}
+	else
+	{
+		fread (buf, sizeof(char), 14, f);
+		buf[14] = '\0';
+
+		if (strcmp(buf, "METVIEW_VECTOR"))
+			Error ("CVector::CVector: start of vector file should be METVIEW_VECTOR. Is: %s", buf);
+
+		read = fread (&size, sizeof(int),    1,    f);  /* read the number of values */
+
+		if (size < 1)
+		{
+			marslog( LOG_WARN, "Zero sized vector, forcing size to 1" );
+			size = 1;
+		}
+
+		values = new double[ size ];
+		if( !values )
+			Error( "CVector::CVector: unable to get memory for %d elements" ,size );
+
+		read = fread (values, sizeof(double), size, f);  /* read the values */
+
+		if (read != size)
+			Error ("CVector::CVector: tried to write %d elements - managed %d.", size, read);
+
+		fclose (f);
+	}
+} 
+
+
+/*
+
+	int err = read_vector_from_request(r, double** vec, int* length )
+
+    const char* c = get_value( r, "SIZE", 0 );
+    size = (fortint)atoi(c);
+
+    if( size < 1 )
+    {
+        marslog( LOG_WARN, "Zero sized vector, forcing size to 1" );
+        size = 1;
+    }
+
+    values = new double[ size ];
+
+    for( int i=0; i<size; ++i )
+    {
+        //-- 'msetv' returns one value even if size 0
+        c = get_value( r, "VALUES", i );
+        values[i] = atof(c);
+    }
+}
+*/
+
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::Write
+ *
+ * Description   : Writes the vector to the given file handle.
+ *
+ ******************************************************************************/
+
+int CVector::Write(FILE *f)
+{
+	size_t written;
+
+	fprintf (f, "METVIEW_VECTOR");
+	written = fwrite (&size,   sizeof(int),    1,    f);  // write the number of values
+	written = fwrite (values,  sizeof(double), size, f);  // write the values
+
+	if (written != size)
+	{
+		Error("Tried to write %d elements - managed %d.", size, written);
+	}
+
+	return ferror(f);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::Read
+ *
+ * Description   : Writes the vector to the given file handle.
+ *
+ ******************************************************************************/
+/*
+int CVector::Read(FILE *f)
+{
+	size_t read;
+	int size;
+	char buf[20];
+
+	fread (buf, sizeof(char), 14, f);
+	buf[14] = '\0';
+
+	if (strcmp(buf, "METVIEW_VECTOR"))
+	{
+		Error("Start of vector file should be METVIEW_VECTOR.");
+	}
+
+
+	read = fread (&size,   sizeof(int),    1,    f);  // write the number of values
+	written = fwrite (values,  sizeof(double), size, f);  // write the values
+
+	if (written != size)
+	{
+		Error("Tried to write %d elements - managed %d.", size, written);
+	}
+
+	return ferror(f);
+}
+*/
+
+/*******************************************************************************
+ *
+ * Function      : CVector::ToRequest
+ *
+ * Description   : Creates a request from the vector, setting SIZE and VALUES.
+ *
+ ******************************************************************************/
+
+void CVector::ToRequest(request* &x)
+{
+	static request *r = 0;
+
+	if (r == 0)
+		r = empty_request("VECTOR");
+
+	char *path = marstmp();
+	FILE *f = fopen (path, "w");
+
+	if (f)
+	{
+		Write(f);
+		fclose (f);
+		set_value(r,"TEMPORARY","1");
+		set_value(r,"PATH","%s",path);
+		x = r;
+		if (mars.debug)
+			print_all_requests(r);
+		//Attach(); // Temp fix: if someone want the request
+	}
+	else
+	{
+		Error("Failed to open temporary file for writing: %s", path);
+	}
+
+
+/*	static request *r = 0;
+	if(r == 0)
+	  r = empty_request("VECTOR");
+
+	set_value( r, "SIZE", "%d", size );
+	set_value( r, "VALUES", "%g", size > 0 ? values[0] : 0 );
+	for( int i = 1; i < size; ++i )
+	{
+		add_value( r, "VALUES", "%g", values[i] );
+	}
+
+	if (mars.debug)
+			print_all_requests(r);
+	x = r;*/
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::CopyValues
+ *
+ * Description   : Copies a number of values from one vector into another.
+ *                 Indexes are zero-based.
+ *
+ ******************************************************************************/
+
+void CVector::CopyValues(int targetIndex, const CVector& source, int sourceIndex, int numValues)
+{
+    // basic error checks
+    
+    if (targetIndex + numValues > Count())
+        Error("Cannot copy %d values into vector at position %d", numValues, targetIndex);
+
+    if (sourceIndex + numValues > source.Count())
+        Error("Cannot copy %d values from vector at position %d", numValues, sourceIndex);
+
+
+    // perform the copy
+
+    memcpy (&values[targetIndex], &source.values[sourceIndex], numValues * sizeof(double));
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::Copy
+ *
+ * Description   : Copies one vector into another
+ *
+ ******************************************************************************/
+
+void CVector::Copy(const CVector& v)
+{
+    size   = v.size;
+
+    CleanUp();
+
+    values = new double[size];
+    
+    CopyValues (0, v, 0, v.size);
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::Resize
+ *
+ * Description   : Resizes a vector to a given number of elements. For
+ *                 efficiency, the strategy is that if we are reducing the size
+ *                 of the vector by a small amount, we don't re-allocate & copy
+ *                 but instead just set the size variable to the new size.
+ *                 Otherwise, if we can make a decent memory saving, we will
+ *                 reallocate.
+ *
+ ******************************************************************************/
+
+void CVector::Resize(int newSize)
+{
+    const int memorySavingThreshold = 1024*1024;  // we will resize if it will save us this much memory (bytes)
+    const int numElementsThreshold = memorySavingThreshold/sizeof(double);  // expressed as number of elements
+
+    if (newSize == size)    // shortcut for the trivial case
+        return;
+
+    // need more memory, or need significantly less memory?
+    if ((newSize > size) || ((size-newSize) > numElementsThreshold))
+    {
+        double *newValues = new double[newSize];
+        memcpy (newValues, values, newSize * sizeof(double));
+        delete[] values; 
+        values = newValues;
+
+        for(int i=size;i<newSize;i++)   // pad extra elements with zeros
+            values[i] = 0.0;
+    }
+
+    size = newSize;
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::Dump/Print
+ *
+ * Description   : Output functions
+ *
+ ******************************************************************************/
+
+void CVector::Dump(int)
+{
+	cout << "<vector(" << size << ')';
+}
+
+void CVector::Print(void)
+{
+	cout << '|';
+	for(int i = 0; i< size; i++)
+	{
+        if (values[i] != VECTOR_MISSING_VALUE)
+		    cout << values[i];
+        else
+            cout << "x";
+		if(i != size-1) cout << ',';
+	}
+	cout << '|';
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::SetSubValue
+ *
+ * Description   : Sets the value of a given element
+ *
+ ******************************************************************************/
+
+void CVector::SetSubValue(Value& val,int arity,Value *arg)
+{
+    // Note: Check() returns 1 if ok, 0 if fail
+    //       first argument is 1 if we want the function to abort on failure
+
+    // assigning a number?
+
+    if(Check(0,val,arity,arg,tnumber,1,tnumber))
+    {
+	    int  n;
+	    arg[0].GetValue(n);
+
+	    double d;
+	    val.GetValue(d);
+
+	    if(n < 1 || n > size) 
+	    {
+		    Error("Vector index [%d] is out of range (vector is %d long)",
+			    n,size);
+		    return;
+	    }
+
+	    values[n-1] = d;
+    }
+    
+    // assigning a vector? e.g. v1[i] = v2 will copy all elements
+    // of v2 into v1 starting at position i.
+
+    else if(Check(1,val,arity,arg,tvector,1,tnumber))
+    {
+	    int  n;
+	    arg[0].GetValue(n);
+
+	    CVector *v2;
+	    val.GetValue(v2);
+
+	    if(n < 1 || n+v2->Count()-1 > size) 
+	    {
+		    Error("Vector indexes from %d to %d are out of range (vector is %d long)",
+			    n,n+v2->Count()-1,size);
+		    return;
+	    }
+
+        CopyValues(n-1, *v2, 0, v2->Count());
+    }
+    
+    else // arguments did not match
+        return;
+
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::IndexOfFirstValidValue
+ *
+ * Description   : Returns the index of the first valid value. If there are no
+ *                 valid values, then returns -1.
+ *
+ ******************************************************************************/
+
+int CVector::IndexOfFirstValidValue()
+{
+	for (int i = 0; i < size; i++)
+	{
+		if (values[i] != VECTOR_MISSING_VALUE)
+			return i;
+	}
+
+
+	// did not find one
+
+	return -1;
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : SortFnAscending
+ *
+ * Description   : Sort function ('less than') used in CVector::Sort
+ *
+ ******************************************************************************/
+
+int SortFnAscending(const void *v1, const void *v2)
+{
+    double difference = (*((double *)v1) - *((double *)v2));
+
+    // can't return the result directly because the difference between
+    // two doubles could be outwith the range of an int
+
+    if (difference == 0.0)
+        return 0;
+    else if (difference < 0.0)
+        return -1;
+    else return 1;
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : SortFnDescending
+ *
+ * Description   : Sort function ('greater than') used in CVector::Sort
+ *
+ ******************************************************************************/
+
+int SortFnDescending(const void *v1, const void *v2)
+{
+    double difference = (*((double *)v2) - *((double *)v1));
+
+
+    // can't return the result directly because the difference between
+    // two doubles could be outwith the range of an int
+
+    if (difference == 0.0)
+        return 0;
+    else if (difference < 0.0)
+        return -1;
+    else return 1;
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::Sort
+ *
+ * Description   : Sort the given vector according to the operation '<' or'>'
+ *
+ ******************************************************************************/
+
+void CVector::Sort(char op)
+{
+    if (op == '<')
+        qsort (values, size, sizeof(double), SortFnAscending);
+    else
+        qsort (values, size, sizeof(double), SortFnDescending);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : CVector::SortIndices
+ *
+ * Description   : Sort the given vector according to the operation '<' or'>'.
+ *                 The result is a sorted set of indices, not the actual values.
+ *
+ ******************************************************************************/
+
+typedef std::pair<double, int> ValueIndexPair;  // type to hold a value and its index
+
+// comparison function to pass to the std::sort routine
+bool ComparePairsDescending (ValueIndexPair p1, ValueIndexPair p2)
+{
+    return (p1>p2);
+}
+
+void CVector::SortIndices(char op)
+{
+    // in order to sort the array of values and keep the sorted
+    // indexes, we create a vector of <value, index> pairs. When sorted,
+    // the .first will be used as the first comparison key, then .second.
+    // In this way, as long as the value is the first item in the pair,
+    // we will get the correct sorting.
+
+    std::vector<ValueIndexPair> valuesAndIndices;   // will hold a list of these pairs
+
+    valuesAndIndices.reserve(Count()); // initialise the vector of pairs
+    for (int i=0; i<Count(); i++)      // populate it
+    {
+        valuesAndIndices.push_back(std::make_pair(values[i], i));
+    }
+
+    // perform the actual sort
+    if (op == '<')
+        std::sort(valuesAndIndices.begin(), valuesAndIndices.end()); // ascending is default
+    else
+        std::sort(valuesAndIndices.begin(), valuesAndIndices.end(), ComparePairsDescending);
+
+
+    // set the values in the CVector to be the sorted indexes
+    for (int i=0; i<Count(); i++)
+        values[i] = valuesAndIndices[i].second + 1;  // Macro wants indexes to start at 1
+}
+
+//=============================================================================
+
+/*
+class VectorProductFunction : public Function {
+public:
+	VectorProductFunction(char *n) : Function(n,2,tvector,tvector) 
+	{info = "Vector product";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value VectorProductFunction::Execute(int ,Value *arg)
+{
+	CVector *a;
+	CVector *b;
+	CVector *c;
+
+	arg[0].GetValue(a);
+	arg[1].GetValue(b);
+
+	if(a->Count() != b->Count())
+		return Error("Cannot multiply vectors of different sizes: %d <> %d",
+			a->Count(),b->Count());
+
+	c = new CVector(a->Count());
+
+	for(int i=0;i<a->Count();i++)
+		;
+		
+	return Value(c);
+}
+*/
+
+/*******************************************************************************
+ *
+ * Function      : Vector1Function
+ *
+ * Description   : Creates a new vector, where each element is a different
+ *                 input argument. From macro: a = |1,2,3|
+ *
+ ******************************************************************************/
+
+class Vector1Function : public Function {
+public:
+	Vector1Function(char *n) : Function(n) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value Vector1Function::Execute(int arity,Value *arg)
+{
+	CVector *v = new CVector(arity);
+	for(int i = 0; i< arity;i++)
+	{
+		double d;
+		arg[i].GetValue(d);
+		(*v)[i] = d;
+	}
+	return Value(v);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : Vector2Function
+ *
+ * Description   : Creates a new vector of a given number of elements (all will
+ *                 be initialised to 0.0). Macro: a = vector(5)
+ *
+ ******************************************************************************/
+
+class Vector2Function : public Function {
+    bool fromList;
+public:
+	Vector2Function(char *n) : Function(n,1,tnumber) 
+	{info = "Builds a new vector either with 'n' zero elements or populated from a list";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int Vector2Function::ValidArguments(int arity,Value *arg)
+{
+	if (arity != 1) return false;
+
+	     if (arg[0].GetType() == tlist)    fromList = true;
+    else if (arg[0].GetType() == tnumber)  fromList = false;
+    else return false;
+
+	return true;
+}
+
+
+Value Vector2Function::Execute(int ,Value *arg)
+{
+    if (fromList)  // input argument is a list - create a new vector with the same elements
+    {
+        CList *elements;
+        arg[0].GetValue(elements);
+        int numElements = elements->Count();
+
+        if (numElements == 0)  // empty list - return nil. Is this the best solution?
+        {
+            marslog (LOG_WARN, "vector: input list has zero elements - returning nil.");
+            return Value();
+        }
+
+        CVector *v = new CVector(numElements, false);  // no need to zero the elements
+
+        for (int i = 0; i < numElements; i++)          // copy the values across
+        {
+            double d;
+            vtype type = (*elements)[i].GetType();
+            if (type == tnil)                          // nil variables are convert to missing values
+            {
+                (*v)[i] = VECTOR_MISSING_VALUE;
+            }
+            else
+            {
+                (*elements)[i].GetValue(d);           // everything else - try to convert - GetValue will fail
+                (*v)[i] = d;                          // if the element cannot be converted to a double
+            }
+        }
+        return v;
+    }
+    
+    else   // input argument is a number - just create a new vector with 'n' elements
+    {
+	    double d;
+	    arg[0].GetValue(d);
+	    return Value(new CVector((int)d, true));
+    }
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorGetElemFunction
+ *
+ * Description   : Gets a specific indexed element (user supplies an index
+ *                 starting from 1). A second argument is the index of the
+ *                 last element to be extracted - if supplied, then a vector
+ *                 is returned. A third argument is an optional step size.
+ *                 A fourth argument tells us how many elements to extract
+ *                 at each step.
+ *
+ ******************************************************************************/
+
+class VectorGetElemFunction : public Function {
+public:
+	VectorGetElemFunction(char *n) : Function(n,2,tvector,tnumber) {};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int VectorGetElemFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity<2 || arity > 5) return false;
+	if(arg[0].GetType() != tvector) return false;
+
+	for(int i=1;i<arity;i++) // all arguments after the first one must be numbers
+		if(arg[i].GetType() != tnumber)
+			return false;
+
+	return true;
+}
+
+
+Value VectorGetElemFunction::Execute(int arity,Value *arg)
+{
+    CVector *v;
+    int  first;
+    int  last   = 0; // index of first element
+    int  step   = 0; // step
+    int  length = 1; // how many we extract at each step
+
+    arg[0].GetValue(v);
+    arg[1].GetValue(first);
+    if (arity>2) arg[2].GetValue(last);
+    if (arity>3) arg[3].GetValue(step);
+    if (arity>4) arg[4].GetValue(length);
+
+    if (last <  first) last = first;
+    if (step <= 0) step = 1;
+
+    if (last+length-step >  v->Count())
+       return Error("last element out of range. last is %d, vector size is %d",
+            last+length-step,v->Count());
+
+    if (first <1 || first>v->Count())
+        return Error("first out of range. first is %d, vector size is %d",
+            first,v->Count());
+
+    if ((last == first) && (length == 1))
+        return (*v)[first-1];
+
+
+    int c = ((last-first)/step+1) * length;
+    CVector *vnew = new CVector(c);
+    int i,j;
+
+    for (i = 0, j = first-1 ; i < c ; i+=length, j += step)
+        vnew->CopyValues(i, *v, j, length);
+
+    return Value(vnew);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorCountFunction
+ *
+ * Description   : Returns the number of elements in the vector
+ *
+ ******************************************************************************/
+
+class VectorCountFunction : public Function {
+public:
+	VectorCountFunction(char *n) : Function(n,1,tvector) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value VectorCountFunction::Execute(int,Value *arg)
+{
+	CVector *m;
+	arg[0].GetValue(m);
+
+	return Value( m->Count() );
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorVectorBinOp
+ *
+ * Description   : Generic function for performing an arithmetic operation
+ *                 between two vectors
+ *
+ ******************************************************************************/
+
+class VectorVectorBinOp : public Function {
+
+	binproc F_;
+
+public:
+	VectorVectorBinOp(const char *n,binproc f) : Function(n,2,tvector,tvector) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value VectorVectorBinOp::Execute(int,Value *arg)
+{
+	CVector *v;
+	CVector *w;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(w);
+
+	if(v->Count() != w->Count())
+		return Error("vectors have different numbers of points (%d and %d)", v->Count(), w->Count());
+
+
+	CVector *p = new CVector(v->Count());
+
+    int count = v->Count(); 
+	for (int i = 0;i<count;i++)
+	{
+		if ((*v)[i] == VECTOR_MISSING_VALUE || (*w)[i] == VECTOR_MISSING_VALUE)
+			(*p)[i] = VECTOR_MISSING_VALUE;
+		else
+            (*p)[i] = F_( (*v)[i], (*w)[i]);
+	}
+
+	return Value(p);
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : NumVectorBinOp
+ *
+ * Description   : Generic function for performing an arithmetic operation
+ *                 between a vector and a number
+ *
+ ******************************************************************************/
+
+class NumVectorBinOp : public Function {
+
+	binproc F_;
+
+public:
+	NumVectorBinOp(const char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NumVectorBinOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 2) return false;
+	if(arg[0].GetType() == tnumber && arg[1].GetType() == tvector)
+		return true;
+	if(arg[1].GetType() == tnumber && arg[0].GetType() == tvector)
+		return true;
+	return false;
+}
+
+
+Value NumVectorBinOp::Execute(int,Value *arg)
+{
+	if(arg[0].GetType() == tnumber)
+	{
+		double  d;
+		CVector *v;
+
+		arg[0].GetValue(d);
+		arg[1].GetValue(v);
+
+		CVector *p = new CVector(v->Count());
+
+		// for each point,
+		//   if the vector value is missing
+		//     set the output value to missing
+		//   otherwise, compute
+
+        int count = v->Count();
+		for (int i = 0; i< count;i++)
+		{
+			if ((*v)[i] == VECTOR_MISSING_VALUE)
+				(*p)[i] = VECTOR_MISSING_VALUE;
+			else
+				(*p)[i] = F_( d, (*v)[i] );
+		}
+
+		return Value(p);
+	}
+	else
+	{
+		double  d;
+		CVector *v;
+
+		arg[0].GetValue(v);
+		arg[1].GetValue(d);
+
+		CVector *p = new CVector(v->Count());
+
+
+		// for each point,
+		//   if the vector value is missing
+		//     set the output value to missing
+		//   otherwise, compute
+
+        int count = v->Count();
+		for (int i = 0; i< count;i++)
+			if ((*v)[i] == VECTOR_MISSING_VALUE)
+				(*p)[i] = VECTOR_MISSING_VALUE;
+			else
+				(*p)[i] = F_((*v)[i], d );
+
+		return Value(p);
+	}
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorUniOp
+ *
+ * Description   : Generic function for performing an arithmetic operation
+ *                 between a vector and a number
+ *
+ ******************************************************************************/
+
+class VectorUniOp : public Function {
+
+	uniproc F_;
+
+public:
+	VectorUniOp(const char *n,uniproc f) : Function(n,1,tvector) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value VectorUniOp::Execute(int,Value *arg)
+{
+	CVector *v;	// original  vector
+	CVector *p;	// resultant vector
+
+	arg[0].GetValue(v);
+
+	p = new CVector(v->Count());
+
+    int count = v->Count();
+	for (int i = 0; i< count;i++)
+	{
+		if ((*v)[i] == VECTOR_MISSING_VALUE)   // if the input value is missing
+			(*p)[i] = VECTOR_MISSING_VALUE;    // set the output value to missing
+		else                                   // otherwise, compute with (first) value
+			(*p)[i] = F_((*v)[i]);
+	}
+
+	return Value(p);
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * Class        : VectorMergeFunction : Function
+ *
+ * Description  : Macro function that concatenates two vector variables. The second
+ *                vector is simply appended to the first.
+ *
+ ******************************************************************************/
+
+
+class VectorMergeFunction : public Function {
+public:
+    VectorMergeFunction (const char *n) : Function(n, 2, tvector, tvector)
+    { info = "Merges 2 vectors"; };
+    virtual Value Execute(int arity,Value *arg);
+};
+
+Value VectorMergeFunction::Execute(int,Value *arg)
+{
+	CVector *v1;
+	CVector *v2;
+	CVector *vmerged;
+
+	// get our input vectors
+
+	arg[0].GetValue(v1);
+	arg[1].GetValue(v2);
+
+
+	// create a new vector large enough to hold both sets
+
+	vmerged = new CVector(v1->Count() + v2->Count());
+
+
+	// copy the first set, followed by the second set
+
+    vmerged->CopyValues (0,           *v1, 0, v1->Count());
+    vmerged->CopyValues (v1->Count(), *v2, 0, v2->Count());
+
+
+	// return the result
+
+	return Value(vmerged);
+}
+
+
+/*******************************************************************************
+ *
+ * Class        : VectorMergeNumberFunction : Function
+ *
+ * Description  : Macro function that appends a number to a vector variable.
+ *
+ ******************************************************************************/
+
+
+class VectorMergeNumberFunction : public Function {
+public:
+    VectorMergeNumberFunction (const char *n) : Function(n, 2, tvector, tnumber)
+    { info = "Appends a number to a vector"; };
+    virtual Value Execute(int arity,Value *arg);
+};
+
+Value VectorMergeNumberFunction::Execute(int,Value *arg)
+{
+	CVector *v;
+	double   d;
+	CVector *vmerged;
+
+	// get our input vectors
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(d);
+
+
+	// create a new vector large enough to hold the original plus 1
+
+	vmerged = new CVector(v->Count() + 1);
+
+
+	// copy the first set, followed by the appended number
+
+    vmerged->CopyValues (0, *v, 0, v->Count());
+    (*vmerged)[v->Count()] = d;
+
+
+	// return the result
+
+	return Value(vmerged);
+}
+
+//-------------------------------------------------------------------
+
+
+
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorToListFunction
+ *
+ * Description   : Converts a vector to a list of numbers. Missing values are
+ *                 converted to 'nil'. If the input is already a list, then
+ *                 we simply return a copy of the list.
+ *
+ ******************************************************************************/
+
+class VectorToListFunction : public Function {
+
+public:
+	VectorToListFunction(const char *n) : Function(n)
+    { info = "Converts a vector into a list of numbers"; };
+
+	virtual Value Execute(int arity,Value *arg);
+    virtual int ValidArguments(int arity,Value *arg);
+private:
+    vtype inputType_;
+};
+
+int VectorToListFunction::ValidArguments(int arity,Value *arg)
+{
+    // we accept: a vector or a list
+
+    if (arity == 1)
+    {
+        inputType_ = arg[0].GetType();
+        if (inputType_ == tvector || inputType_ == tlist)
+            return true;
+    }
+
+    return false;
+}
+
+Value VectorToListFunction::Execute(int,Value *arg)
+{
+
+    // special case - an input list means we simply return a copy of it
+    if (inputType_ == tlist)
+    {
+        CList *l;
+        arg[0].GetValue(l);
+        CList *l2 = new CList(*l);
+        return Value(l2);
+    }
+
+
+	CVector *v;     // input  vector
+
+	arg[0].GetValue(v);
+ 
+
+    int count = v->Count();
+    
+	CList *l = new CList(count); // resultant list
+
+	for (int i = 0; i< count;i++)
+	{
+		if ((*v)[i] == VECTOR_MISSING_VALUE)   // if the input value is missing
+			(*l)[i] = Value();                 // set the output value to nil
+		else                                   // otherwise, insert the value
+			(*l)[i] = (*v)[i];
+	}
+
+	return Value(l);
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorBitmap
+ *
+ * Description   : Returns a copy of a vector with all elements equal to a
+ *                 certain value converted to missing values
+ *
+ ******************************************************************************/
+
+class VectorBitmap : public Function {
+
+public:
+	VectorBitmap(const char *n) : Function(n, 2, tvector, tnumber)
+    { info = "Converts numbers to missing values in a vector"; };
+
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value VectorBitmap::Execute(int,Value *arg)
+{
+	double  d;
+	CVector *v;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(d);
+
+    int count = v->Count();
+
+	CVector *p = new CVector(count);
+
+	for (int i = 0; i< count;i++)            // for each element
+	{
+		if ((*v)[i] == d)                    // if the value is the given number
+			(*p)[i] = VECTOR_MISSING_VALUE;  // then set the output to missing
+		else
+			(*p)[i] = (*v)[i];               // otherwise use the original value
+	}
+
+	return Value(p);
+}
+
+/*******************************************************************************
+ *
+ * Function      : VectorNoBitmap
+ *
+ * Description   : Returns a copy of a vector with all missing values converted
+ *                 to a given value
+ *
+ ******************************************************************************/
+
+class VectorNoBitmap : public Function {
+
+public:
+	VectorNoBitmap(const char *n) : Function(n, 2, tvector, tnumber)
+    { info = "Converts missing values to numbers in a vector"; };
+
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value VectorNoBitmap::Execute(int,Value *arg)
+{
+	double  d;
+	CVector *v;
+
+	arg[0].GetValue(v);
+	arg[1].GetValue(d);
+
+    int count = v->Count();
+
+	CVector *p = new CVector(count);
+
+	for (int i = 0; i< count;i++)             // for each element
+	{
+		if ((*v)[i] == VECTOR_MISSING_VALUE)  // if the value is the missing value
+			(*p)[i] = d;                      // then set the output to given number
+		else
+			(*p)[i] = (*v)[i];                // otherwise use the original value
+	}
+
+	return Value(p);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorFilter
+ *
+ * Description   : Takes two vectors, and returns a new vector containing only
+ *                 the values of the first vector where the second vector's
+ *                 values are non-zero.
+ *
+ ******************************************************************************/
+
+class VectorFilter : public Function {
+
+public:
+	VectorFilter(const char *n) : Function(n, 2, tvector, tvector)
+    { info = "Filters a vector according to the values of a second vector"; };
+
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value VectorFilter::Execute(int,Value *arg)
+{
+    CVector *v1, *v2;
+
+    arg[0].GetValue(v1);  // v1 is the vector whose subset we want to retain
+    arg[1].GetValue(v2);  // v2 is the vector whose values we will test
+
+    int count = v1->Count();
+
+    if(count != v2->Count())
+        return Error("vectors have different numbers of points (%d and %d)", count, v2->Count());
+
+
+    CVector *r = new CVector(count);         // set the result to the biggest it will have to be
+
+    int n = 0;
+    for (int i = 0; i< count;i++)            // for each element
+    {
+        if ((*v2)[i] && (*v2)[i] != VECTOR_MISSING_VALUE)
+            (*r)[n++] = (*v1)[i];
+    }
+
+
+    if (n == 0)             // result has no elements? return nil
+        return Value();
+
+
+
+    r->Resize(n);
+
+    return Value(r);
+}
+
+
+/*******************************************************************************
+ *
+ * Function      : VectorSort
+ *
+ * Description   : Takes a vector and an optional sorting operator and returns
+ *                 a sorted version of the input vector. Missing values are
+ *                 not taken specifically into account - in what sense can we
+ *                 sort missing values? The result is that missing values are
+ *                 simply treated according to their numerical value, which at
+ *                 the time of writing is very large.
+ *
+ ******************************************************************************/
+
+class VectorSort : public Function {
+
+    eVectorSortType type;
+
+public:
+	VectorSort(const char *n, eVectorSortType t) : Function(n, 2, tvector, tstring),
+                                                   type(t)
+    { info = "Sorts a vector according to an operator '<' (default) or '>'"; };
+
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+    int SortFnLt(const void *v1, const void *v2);
+};
+
+
+int VectorSort::ValidArguments(int arity,Value *arg)
+{
+	if (arity > 0)
+    {
+        if (arg[0].GetType() == tvector)
+        {
+            if (arity == 1) return true;
+
+            if (arity == 2 && arg[1].GetType() == tstring)
+            {
+                return true;
+            }
+        }
+    }
+
+    // ... otherwise not valid
+	return false;
+}
+
+
+
+
+Value VectorSort::Execute(int arity,Value *arg)
+{
+    CVector *v1;
+    char op = '<'; // default sort operator
+    const char *user_op;
+
+    arg[0].GetValue(v1);        // v1 is the input (unsorted) vector
+
+    if (arity == 2)
+    {
+        arg[1].GetValue(user_op);   // user_op is the user-supplied operator
+
+        if (!strcmp(user_op, "<") || !strcmp(user_op, ">"))
+            op = user_op[0];
+        else
+            return Error("vector sort function should be either '<' or '>', not '%s'", user_op);
+    }
+
+
+    // create a copy of the input vector and sort it
+
+    CVector *v2 = new CVector(*v1);
+
+    if (type == VSORT_VALUES)
+        v2->Sort(op);
+    else
+        v2->SortIndices(op);
+
+    return Value(v2);
+}
+
+
+
+//===========================================================================
+class MinMaxValueVectorFunction : public Function {
+	int usemax;
+public:
+	MinMaxValueVectorFunction(const char *n,int m) : Function(n,1,tvector),usemax(m) { };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MinMaxValueVectorFunction::Execute(int,Value *arg)
+{
+	long i;
+	long nFirstValid;
+	double x;
+	CVector *v;
+	arg[0].GetValue(v);
+
+	if(v->Count() == 0) return Value();
+
+
+	// Get the index of the first valid point. If -1 is returned,
+	// then there are no valid points.
+
+	nFirstValid = v->IndexOfFirstValidValue();
+
+	if (nFirstValid == -1)
+	{
+		return Value();
+	}
+
+
+    int count = v->Count();
+
+
+	// store the first valid value, then replace it with each successive
+	// greater or smaller value
+
+	x = (*v)[nFirstValid];
+
+	if (usemax)
+	{
+		for (i = nFirstValid + 1; i <count; i++)
+ 		{
+			if ((*v)[i] != VECTOR_MISSING_VALUE)	// only consider non-missing values
+				if ((*v)[i] > x)
+					x = (*v)[i];
+		}
+	}
+	else
+	{
+		for (i = nFirstValid + 1; i<count; i++)
+		{
+			if ((*v)[i] != VECTOR_MISSING_VALUE)	// only consider non-missing values
+				if ((*v)[i] < x )
+					x = (*v)[i];
+		}
+	}
+
+	return Value(x);
+}
+
+
+//=============================================================================
+
+class MeanVectorFunction : public Function {
+	int compute_mean;
+public:
+	MeanVectorFunction(const char *n,int m) : Function(n,1,tvector),compute_mean(m)
+	{ info="Returns the sum or mean of the values in a vector variable"; };
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value MeanVectorFunction::Execute(int,Value *arg)
+{
+	CVector *g;
+	double dSum = 0.0;
+	int nNumValid = 0;
+
+	arg[0].GetValue(g);
+
+    int count = g->Count();
+	for (int i = 0;i<count;i++)
+	{
+		if (((*g)[i] != VECTOR_MISSING_VALUE))
+		{
+			dSum += (*g)[i];
+			nNumValid++;
+		}
+	}
+
+
+	if (nNumValid > 0)
+	{
+		if (compute_mean)
+			return Value(dSum / nNumValid);
+		else
+			return Value(dSum);
+	}
+	else
+		return Value();
+}
+
+
+
+
+//=============================================================================
+
+static void install(Context *c)
+{
+	int i;
+
+    c->AddGlobal  (new Variable("vector_missing_value", Value(VECTOR_MISSING_VALUE)));
+
+
+	c->AddFunction(new Vector1Function("_vector"));
+	c->AddFunction(new Vector2Function("vector"));
+	c->AddFunction(new VectorCountFunction("count"));
+	c->AddFunction(new VectorGetElemFunction("[]"));
+	//c->AddFunction(new VectorProductFunction("^"));
+ 
+ 	c->AddFunction(new VectorMergeFunction("&"));
+	c->AddFunction(new VectorMergeFunction("merge"));
+
+ 	c->AddFunction(new VectorMergeNumberFunction("&"));
+	c->AddFunction(new VectorMergeNumberFunction("merge"));
+
+	c->AddFunction(new VectorToListFunction("tolist"));
+	c->AddFunction(new VectorBitmap("bitmap"));
+	c->AddFunction(new VectorNoBitmap("nobitmap"));
+	c->AddFunction(new VectorFilter("filter"));
+	c->AddFunction(new VectorSort("sort",         VSORT_VALUES));
+	c->AddFunction(new VectorSort("sort_indices", VSORT_INDICES));
+
+	c->AddFunction(new MinMaxValueVectorFunction("maxvalue",1));
+	c->AddFunction(new MinMaxValueVectorFunction("minvalue",0));
+	c->AddFunction(new MeanVectorFunction("mean",1));
+	c->AddFunction(new MeanVectorFunction("sum",0));
+
+    // binary operations
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new VectorVectorBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new NumVectorBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+
+	// Mult op as Binary op
+    // (the above comment is from bufr.cc, but it's not exactly clear how these
+    // operations differ from the BinOps ones)
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new VectorVectorBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new NumVectorBinOp(MulOps[i].symb,MulOps[i].proc ));
+
+
+	// Unary operations
+
+	for(i=0;UniOps[i].symb;i++)
+		c->AddFunction(new VectorUniOp(UniOps[i].symb,UniOps[i].proc ));
+
+
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/mvimport.c b/src/Macro/mvimport.c
new file mode 100644
index 0000000..027da69
--- /dev/null
+++ b/src/Macro/mvimport.c
@@ -0,0 +1,1180 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <mars.h>
+#include <ctype.h>
+
+typedef struct data {
+	boolean serve;
+} data;
+
+static option opts[] = {
+	{"serve",NULL,"-serve","0",
+	t_boolean,sizeof(boolean),OFFSET(data,serve),},
+};
+
+static data setup;
+
+const char *reserved[] = {
+	"if",
+	"then",
+	"else",
+	"and",
+	"not",
+	"or",
+	"function",
+	"return",
+	"end",
+	"while",
+	"global",
+	"do",
+	"on",
+	"for",
+	"to",
+	"by",
+	"in",
+	"of",
+	"case",
+	"otherwise",
+	"repeat",
+	"until",
+	"loop",
+	"when",
+	"include",
+	"extern",
+	"tell",
+	"task",
+	"nil",
+	"object",
+	"import",
+	"export",
+	"inline",
+};
+
+const char *import(FILE *f, const char *icon);
+static void formula1(FILE *f,const char *ref,math *m,math *p);
+static void formula2(FILE *f,math *m);
+static int need_case(request *r,parameter *p,value *v);
+static int value_need_case(value *w,value *v);
+static request *link1(FILE*,request *);
+
+static cvtdates = 0;
+
+static char tab[256] = "";  /* either a tab string or else a row of spaces, set in main() */
+static boolean spaces = false;
+
+static void putdate(FILE *f,long date)
+{
+	if(date > 0)
+		fprintf(f,"%ld",date);
+	else 
+		fprintf(f,"today - %ld",-date);
+}
+
+static request *find_object(const char *name)
+{
+	request *u = mars.setup;
+	const char    *c;
+
+	if(!name) return NULL;
+
+	while(u)
+	{
+		if(strcmp(u->name,"object") == 0 && 
+		    (c = get_value(u,"class",0)) &&
+		    strcmp(c,name)==0)
+			return u;
+		u = u->next;
+	}
+
+	return NULL;
+}
+
+static const char *ascii(char a)
+{
+	static char buf[5];
+	if(isspace(a) || a == '_' ) return "_";
+	sprintf(buf,"_%02x_",(unsigned char)a);
+	return buf;
+}
+
+
+static const char *low(const char *s,int under,int clean)
+{
+	static char buf[1024];
+	int i = 0;
+	int c = 0;
+	buf[0] = 0;
+
+	if(under && !isalpha(*s))
+	{
+		const char *p = ascii(*s);
+		while(*p) buf[i++] = *p++;
+		s++;
+	}
+
+	while(*s)
+	{
+		if(*s >= 'A' && *s <= 'Z')
+		    buf[i++] = *s - 'A' + 'a';
+		else
+		  {
+			c = (unsigned char)(*s);
+			if( (under && !isalnum(c)) || (c > 127) )
+			{
+				const char *p = ascii(*s);
+				while(*p)
+				    buf[i++] = *p++;
+			}
+			else buf[i++] = *s;
+		  }
+		s++;
+	}
+
+	buf[i] = 0;
+
+	if(clean)
+	{
+		for(i=0;i<NUMBER(reserved);i++)
+			if(strcmp(reserved[i],buf)==0)
+				strcat(buf,"_");
+	}
+	return buf;
+}
+
+static void importing(FILE *f, const char *icon)
+{
+	static char *tag = NULL;
+	if(!tag) tag = getenv("MVIMPORT_TAG");
+	if(!tag) tag = "# Importing : ";
+	fprintf(f,"%s%s\n\n",tag,icon);
+}
+
+static boolean import_link(FILE *f, const char *icon,request *r)
+{
+	request *s = link1(f,r);
+	int i,j,c=0,m,n;
+
+	importing(f,icon);
+	fprintf(f,"%s = ",low(mbasename(icon),1,1));
+
+	fprintf(f,"[");
+
+	n = count_values(s,"Window");
+
+	for(i=0;i<n;i++)
+	{
+		if(c) fprintf(f,",");
+		fprintf(f,"%s",get_value(s,"Window",i));
+		c++;
+	}
+
+	m = count_values(s,"Visdef");
+	n = count_values(s,"File");
+
+	for(i=0;i<n;i++)
+	{
+		if(c) fprintf(f,",");
+		fprintf(f,"%s",get_value(s,"File",i));
+		c++;
+		for(j=0;j<m;j++)
+		{
+			if(c) fprintf(f,",");
+			fprintf(f,"%s",get_value(s,"Visdef",j));
+			c++;
+		}
+	}
+
+	n = count_values(s,"Data");
+
+	for(i=0;i<n;i++)
+	{
+		if(c) fprintf(f,",");
+		fprintf(f,"%s",get_value(s,"Data",i));
+		c++;
+		for(j=0;j<m;j++)
+		{
+			if(c) fprintf(f,",");
+			fprintf(f,"%s",get_value(s,"Visdef",j));
+			c++;
+		}
+	}
+
+
+	fprintf(f,"]\n\n");
+
+	free_all_requests(s);
+	return true;
+}
+
+static boolean import_compute(FILE *f, const char *icon,request *r)
+{
+	math *m;
+	if(m = compmath(no_quotes(get_value(r,"FORMULA",0))))
+	{
+		formula1(f,icon,m,m);
+		importing(f,icon);
+		fprintf(f,"%s = ",low(mbasename(icon),1,1));
+		formula2(f,m);
+		free_math(m);
+		fprintf(f,"\n\n");
+		return true;
+	}
+	return false;
+}
+
+typedef struct cache {
+	struct cache      *next;
+	const char       *name;
+	request    *lang;
+}cache;
+
+static request *get_language(const char *name)
+{
+	static cache *langs = NULL;
+	cache *c;
+	char *obj = strcache("object");
+	request *r = mars.setup;
+	const char *file = NULL;
+
+	while(r)
+	{
+		if(r->name == obj)
+		{
+			const char *p = get_value(r,"class",0);
+			if(p == name)
+			{
+				file = get_value(r,"definition_file",0);
+				break;
+			}
+		}
+		r = r->next;
+	}
+
+	strfree(obj);
+
+	if(!file) return NULL;
+
+	c = langs;
+	while(c)
+	{
+		if(c->name == file) break;
+		c = c->next;
+	}
+
+	if(c == NULL)
+	{
+		c       = NEW_CLEAR(cache);
+		c->next = langs;
+		langs   = c;
+		c->name = strcache(file);
+		c->lang = read_language_file(file);
+	}
+
+	return c->lang;
+
+}
+
+static int value_need_case(value *w,value *v)
+{
+	while(w)
+	{
+		if(w->ref)
+		{
+			if(value_need_case(w->ref,v) == 0)
+				return 0;
+		}
+		else
+		{
+			value *o = w->other_names;
+			if(w->name == v->name) return 0;
+
+			while(o)
+			{
+				if(o->name == v->name) return 0;
+				o = o->next;
+			}
+
+		}
+		w = w->next;
+	}
+	return 1;
+}
+
+static int need_case(request *r,parameter *p,value *v)
+{
+	request *l = get_language(r->name);
+	while(l)
+	{
+		if(l->name == r->name)
+		{
+			parameter *q = l->params;
+			while(q)
+			{
+				if(q->name == p->name)
+					return value_need_case(q->values,v);
+				q = q->next;
+			}
+		}
+		l = l->next;
+	}
+	return 0;
+}
+
+static void import_sub_objects(FILE *f,const char *icon,request *r,request *dot)
+{
+	parameter *p;
+	int n;
+
+	/* Look for references */
+	request *l = get_language(r->name);
+
+	while(l && (l->name != r->name))
+		l = l->next;
+
+	if(l)
+	{
+		p = l->params;
+		while(p)
+		{
+			const char *i = get_value(p->interface,"interface",0);
+			if(i && (strcmp(i,"icon") == 0))
+			{
+				int i = 0;
+				const char *q ;
+				unset_value(r,"_temp");
+				while( q = get_value(r,p->name,i++) ){
+					q = makepath(dirname(icon),q);
+					add_value(r,"_temp",".%s",import(f,q));
+				}
+				unset_value(r,p->name);
+				i = 0;
+				while( q = get_value(r,"_temp",i++) )
+					add_value(r,p->name,"%s",q);
+				unset_value(r,"_temp");
+			}
+
+			p = p->next;
+		}
+	}
+
+	/* Check in dot fil for macroparmas */
+
+
+	if(n = count_values(dot,"references"))
+	{
+		int i = 0;
+		const char *s;
+		while(s = get_value(dot,"references",i++))
+		{
+			int i = 0;
+			const char *q ;
+			unset_value(r,"_temp");
+			while( q = get_value(r,s,i++) ){
+				q = makepath(dirname(icon),q);
+				add_value(r,"_temp",".%s",import(f,q));
+			}
+			unset_value(r,s);
+			i = 0;
+			while( q = get_value(r,"_temp",i++) )
+				add_value(r,s,"%s",q);
+			unset_value(r,"_temp");
+
+		}
+	}
+}
+
+
+static void import_values(FILE *f,request *r,parameter *p)
+{
+	value *v = p->values;
+	int flg = v && v->next;
+	int dateflg = 0;
+
+	if(strcmp(p->name,"DATE") == 0 && cvtdates)
+		dateflg = 1;
+
+	if(flg) fprintf(f,"[");
+	
+	while(v)
+	{
+		/*Handling multi-line text for ODB query */		
+		if(strcmp(p->name,"ODB_QUERY") == 0 || strcmp(p->name,"ODB_WHERE") == 0)	
+		{						
+			if(strstr(v->name,"\n") == 0)
+			{
+				fprintf(f,"\"%s\"",v->name);
+			}
+			else
+			{									
+ 				char * pch;
+				int len=strlen(v->name);
+				if(len>0)
+				{
+					char *buff=(char*) calloc(len+1,sizeof(char));
+					sprintf(buff,"%s",v->name);					
+  					pch = strtok (buff,"\n");
+					fprintf(f,"\"%s \"",pch);
+		
+ 					while (pch != NULL)
+ 					{   				
+						pch = strtok (NULL, "\n");					
+						if(pch != NULL)
+						{
+							fprintf(f," &\n",pch);
+							fprintf(f,"%s%s%s%s%s\"%s \"",tab,tab,tab,tab,tab,pch);
+						}
+
+					}
+						
+					free(buff);
+				}
+  				/*fprintf(f,"\n",pch);*/
+
+				/*fprintf(f,"string inline\n");
+				fprintf(f,"%s\n",v->name);
+				fprintf(f,"%s%s%stend inline", tab, tab, tab);*/	
+
+			}			
+			
+		}				
+		else if(isdate(v->name))
+			fprintf(f,"%s",v->name);
+		else if(is_number(v->name))
+			if(dateflg)
+				putdate(f,atof(v->name));
+			else
+			  fprintf(f,"%s",v->name); /*-- do not convert to number --*/
+		else if(v->name[0] == '.')
+			fprintf(f,"%s",v->name+1);
+		else 
+			if(*v->name == '"')
+				fprintf(f,"%s",v->name);
+			else if(need_case(r,p,v))
+				fprintf(f,"\"%s\"",v->name);
+			else
+				fprintf(f,"\"%s\"",low(v->name,0,0));
+		if(v->next)
+			fprintf(f,",");
+		v = v->next;
+	}
+
+	if(flg) fprintf(f,"]");
+}
+
+static boolean import_simple_formula(FILE *f,const char *icon,request *r)
+{
+
+	request *lang,*s;
+	import_sub_objects(f,icon,r,NULL);
+
+	lang = get_language(r->name);
+	expand_flags(0);
+	s = r;
+	r = expand_all_requests(lang,NULL,r);
+	if(!r) return false;
+
+	{
+		parameter *p0 = find_parameter(r,"PARAMETER");
+		parameter *p1 = find_parameter(r,"PARAMETER_1");
+		parameter *p2 = find_parameter(r,"PARAMETER_2");
+		const char *fn = get_value(r,"FUNCTION",0);
+		const char *op = get_value(r,"OPERATOR",0);
+
+		if(!(p0 || (p1 && p2 ))) return false;
+		importing(f,icon);
+		fprintf(f,"%s = ",low(mbasename(icon),1,1));
+
+		if(fn)
+		{
+			fprintf(f,"%s(",fn);
+			if(p1 && p2)
+			{
+				import_values(f,r,p1);
+				fprintf(f,",");
+				import_values(f,r,p2);
+			}
+			else if(p0) import_values(f,r,p0);
+			fprintf(f,")");
+		} else if(op)
+		{
+			import_values(f,r,p1);
+			fprintf(f," %s",op);
+			if(op[strlen(op)-1] != ' ')
+				fprintf(f," ");
+			import_values(f,r,p2);
+		}
+		else return false;
+		fprintf(f,"\n");
+		return true;
+	}
+	free_all_requests(r);
+}
+
+const char *clean(const char *p)
+{
+	static char buf[1024];
+	int quote = 0;
+	int i;
+	const char *q = p;
+
+	for(i=0;i<NUMBER(reserved);i++)
+		if(strcmp(reserved[i],p) == 0)
+			quote++;
+
+
+	if(*p != '_' && !isalpha(*p))
+		quote++;
+
+	while(*q)
+	{
+		if(*q != '_' && !isalnum(*q))
+			quote++;
+		q++;
+	}
+
+	if(quote)
+	{
+		char c = '\'';
+		q = p;
+		while(*q) if(*q++ == '\'') c = '"';
+
+		i = 0;
+		buf[i++] = c;
+		q = p;
+		while(*q)
+		{
+			if(*q == c) buf[i++] = '\\';
+			buf[i++] = *q++;
+		}
+		buf[i++] = c;
+		buf[i++] = 0;
+		return buf;
+	}
+	return p;
+}
+
+static boolean import_request(FILE *f,const char *icon,request *r,request *u)
+{
+
+	const char *m = NULL;
+	parameter *p;
+
+	if(strncmp(r->name,"SAMPLE_FORMULA",strlen("SAMPLE_FORMULA"))==0)
+		return import_simple_formula(f,icon,r);
+
+
+	/* Note: TABLE_READER does not have an associated macro in
+	ObjecList because we want to over-ride it here. */
+
+	if (strncmp(r->name,"TABLE_READER",strlen("TABLE_READER"))==0)
+		m = "read_table";
+
+	u = u?u:find_object(r->name);
+
+	if(u != NULL && (m || ( m = get_value(u,"macro",0)))) 
+	{
+		size_t maxlen = 1;
+
+		import_sub_objects(f,icon,r,u);
+
+		importing(f,icon);
+		fprintf(f,"%s = ",low(mbasename(icon),1,1));
+
+		fprintf(f,"%s(\n",m);
+
+		p = r->params;
+
+		/* if using spaces, then we can be more clever in how we align
+		   the colons after the parameter names; start by finding the length
+		   of the longest parameter name. */
+		if (spaces)
+		{
+			while(p)
+			{
+				char *str = clean(low(p->name,0,0));
+				size_t thislen = strlen(str);
+				if (thislen > maxlen)
+					maxlen = thislen;
+
+				p = p->next;
+			}
+		}
+
+
+		p = r->params; /* reset p */
+
+		while(p)
+		{
+			char *str = clean(low(p->name,0,0));
+			size_t thislen = strlen(str);
+			size_t i;
+			fprintf(f,"%s%s",tab,clean(low(p->name,0,0)));
+			if (spaces)
+			{
+				for (i = 0; i < (maxlen-thislen)+1; i++)
+				{
+					fprintf(f, " ");
+				}
+				fprintf(f,": ");
+			}
+			else
+			{
+				fprintf(f,"%s:%s",tab,tab);  /* not using spaces, just put param<tab>colon */
+			}
+			import_values(f,r,p);
+
+			if(p->next) fprintf(f,",");
+			fprintf(f,"\n");
+			p = p->next;
+		}
+
+		fprintf(f,"%s)\n\n", tab);
+		return true;
+	}
+	return false;
+}
+
+static boolean import_all_requests(FILE *f,const char *icon,request *r,request *u)
+{
+	const char *p;
+	if(r->next == NULL) return import_request(f,icon,r,u);
+
+	fprintf(f,"%s = []\n",
+	    low(mbasename(icon),1,1));
+
+	while(r)
+	{
+		import_request(f,"tmp",r,u);
+		fprintf(f,"%s = %s & [tmp]\n",
+		    low(mbasename(icon),1,1),
+		    low(mbasename(icon),1,1));
+		r = r->next;
+	}
+
+}
+
+static boolean import_macro(FILE *f, const char *icon, const char *file)
+{
+	char line[1024];
+	FILE *g = fopen(file,"r");
+	importing(f,icon);
+
+	if(g)
+	{
+		int c,last = -1;
+		fprintf(f,"##### Start of macro %s\n",icon);
+
+		while( (c = fgetc(g)) != -1)
+		{
+			last = c;
+			fputc(c,f);
+		}
+		fclose(g);
+		if(last != '\n') fputc('\n',f);
+		fprintf(f,"##### End of macro %s\n",icon);
+	}
+	else
+		fprintf(f,"# Cannot read file %s\n",file);
+
+
+	return true;
+}
+
+static boolean import_file(FILE *f, const char *icon, const char *file)
+{
+	char line[1024];
+	importing(f,icon);
+	fprintf(f,"%s = read(\"%s\")\n\n",low(mbasename(icon),1,1),file);
+	return true;
+}
+
+static boolean import_macroparam(FILE *f, const char *icon, request *r,request *dot)
+{
+	char buf[1024];
+	char name[1024];
+	const char *p;
+
+	strcpy(name,low(mbasename(icon),1,1));
+	set_value(dot,"macro","");
+	import_request(f,icon,r->next,dot);
+
+	fprintf(f,"# NOTE: You may want to change the execute to visualize\n");
+	fprintf(f,"%s = execute(%s)\n\n",name,name);
+
+
+	sprintf(buf,"%s%s",
+	    getenv("METVIEW_USER_DIRECTORY"),
+	    makepath(dirname(icon),get_value(r,"MACRO",0)));
+	import_macro(f,get_value(r,"MACRO",0),buf);
+
+	return true;
+}
+
+static boolean import_shell(FILE *f, const char *icon, const char *file)
+{
+	importing(f,icon);
+	fprintf(f,"%s = shell(\"%s\")\n\n",low(mbasename(icon),1,1),file);
+	return true;
+}
+
+static boolean import_magml(FILE *f, const char *icon, const char *file)
+{
+	importing(f,icon);
+	fprintf(f,"%s = magml(\"%s\")\n\n",low(mbasename(icon),1,1),file);
+	return true;
+}
+
+static boolean import_note(FILE *f, const char *icon, const char *file)
+{
+	FILE *g = fopen(file,"r");
+	importing(f,icon);
+
+	if(g)
+	{
+		int c,last = -1;
+		fprintf(f,"%s = string inline\n",low(mbasename(icon),1,1));
+		while( (c = fgetc(g)) != -1)
+		{
+			last = c;
+			fputc(c,f);
+		}
+		if(last != '\n') fputc('\n',f);
+		fprintf(f,"end inline\n");
+		fclose(g);
+	}
+	else
+		fprintf(f,"# Cannot read file %s\n",file);
+
+	return true;
+}
+
+boolean import_read(FILE *f,const char *icon,request *r)
+{
+	/* if only PATH is set, use the read function */
+	parameter *p = r->params;
+	const char *path   = get_value(r,"SOURCE",0);
+	int n = 0;
+
+	while(p)
+	{
+		if(*p->name != '_') n++;
+		p = p->next;
+	}
+
+	if(path && (n == 1))
+	{
+		importing(f,icon);
+		fprintf(f,"%s = read(\"%s\")\n\n",low(mbasename(icon),1,1),no_quotes(path));
+		return true;
+	}
+
+	return import_request(f,icon,r,NULL);
+}
+
+
+
+boolean import_table_reader(FILE *f,const char *icon,request *r)
+{
+	/* DATA is set, then it will be more efficient to change it to SOURCE */
+
+	const char *data = get_value(r,"DATA",0);
+
+	if (data != NULL)
+	{
+		set_value(r, "TABLE_FILENAME", data);
+		unset_value(r, "DATA");
+	}
+
+
+	return import_request(f,icon,r,NULL);
+}
+
+boolean import_table_visualiser(FILE *f,const char *icon,request *r)
+{
+	/* TABLE_DATA is set, then it will be more efficient to change it to SOURCE */
+
+	const char *data = get_value(r,"TABLE_DATA",0);
+
+	if (data != NULL)
+	{
+		set_value(r, "TABLE_FILENAME", data);
+		unset_value(r, "TABLE_DATA");
+	}
+
+
+	return import_request(f,icon,r,NULL);
+}
+
+const char *import(FILE *f, const char *name)
+{
+	char buf[1024];
+	char dot[1024];
+	char icon[1024];
+	boolean ok = false;
+	const char *c;
+	request *r,*u;
+
+	strcpy(icon,name);
+
+	sprintf(buf,"%s/%s",getenv("METVIEW_USER_DIRECTORY"),icon);
+	sprintf(dot,"%s/.%s",dirname(buf),mbasename(buf));
+
+	r = read_request_file(buf);
+	u = read_request_file(dot);
+
+	if(u && (c = get_value(u,"ICON_CLASS",0)))
+	{
+		if(strcmp(c,"NOTE")==0)
+			ok = import_note(f,icon,buf);
+		else if(strcmp(c,"SHELL")==0)
+			ok = import_shell(f,icon,buf);
+		else if(strcmp(c,"MAGML")==0)
+			ok = import_magml(f,icon,buf);
+		else if(strcmp(c,"READ")==0)
+			ok = import_read(f,icon,r);
+		else if(strcmp(c,"GEOPOINTS")==0)
+			ok = import_file(f,icon,buf);
+		else if(strcmp(c,"MACROPARAM")==0)
+			ok = import_macroparam(f,icon,r,u);
+		else if(strcmp(c,"TABLE_READER")==0)
+			ok = import_table_reader(f,icon,r);
+		else if(strcmp(c,"TABLE_VISUALISER")==0)
+			ok = import_table_visualiser(f,icon,r);
+	}
+
+	if(!ok && (r != NULL || c != NULL))
+	{
+		request *u = find_object(r?r->name:c);
+		const char    *t = u?get_value(u,"type",0):NULL;
+
+		if(t)
+		{
+			if(strcmp(t,"Macro")==0)
+				ok = import_macro(f,icon,buf);
+			else if(strcmp(t,"Family")==0 || strcmp(t,"FamilyWindow") == 0)
+				ok = import_request(f,icon,r?r->next:NULL,NULL);
+			else if(strcmp(t,"File")==0)
+				ok = import_file(f,icon,buf);
+			else
+				;
+			/* printf("Type is %s\n",t); */
+		}
+	}
+
+	if(!ok && (r != NULL) && (c = r->name ))
+	{
+		if(strcmp(c,"LINK")==0)
+			ok = import_link(f,icon,r);
+		else if(strcmp(c,"COMPUTE")==0)
+			ok = import_compute(f,icon,r);
+		else
+			ok = import_request(f,icon,r,NULL);
+	}
+
+	if(!ok)
+	{
+		importing(f,icon);
+		fprintf(f,"# Warning: cannot import : %s\n",icon);
+		fprintf(f,"# Using the metview function, not available in batch\n\n");
+		fprintf(f,"%s = metview(\"%s\")\n\n",low(mbasename(icon),1,1),icon);
+		/* print_all_requests(r); */
+		/* print_all_requests(u); */
+	}
+
+	free_all_requests(r);
+	free_all_requests(u);
+	return low(mbasename(icon),1,1);
+}
+
+static void formula3(math *m,char *name,const char *sub)
+{
+	if(m)
+	{
+		if(m->name && (m->arity<=0) && (name == m->name) )
+		{
+			strfree(name);
+			m->name = strcache(sub);
+		}
+		formula3(m->left,name,sub);
+		formula3(m->right,name,sub);
+	}
+}
+
+static void formula1(FILE *f,const char *ref,math *m,math *x)
+{
+	if(m)
+	{
+		formula1(f,ref,m->left,x);
+		formula1(f,ref,m->right,x);
+		if(m->name)
+			if(m->arity<=0)
+				if(!is_number(m->name) && (m->name[0] != '.') )
+				{
+					char buf[1024];
+					char *y,*name;
+					const char *p = buf;
+					char *o;
+					sprintf(buf,"%s",m->name);
+
+					if(*buf == '"' || *buf =='\'')
+					{
+						p = buf+1;
+						buf[strlen(buf)-1] = 0;
+					}
+
+					if(*p != '/')
+						p = makepath(dirname(ref),p);
+
+					o = strcache(p);
+					y  = strcache(import(f,o));
+					strfree(o);
+
+					name = strcache(m->name);
+					sprintf(buf,".%s",y);
+					formula3(x,name,buf);
+					strfree(name);
+					strfree(y);
+
+				}
+	}
+}
+
+static void formula2(FILE *f,math *m)
+{
+	if(m)
+	{
+		if(m->name)
+			if(m->arity <= 0)
+			{
+				if(is_number(m->name))
+					fprintf(f,"%.12g",atof(m->name));
+				else
+				{
+					fprintf(f,"%s",m->name + 1);
+				}
+				if(m->arity < 0)
+				{
+					fprintf(f,"[");
+					formula2(f,m->left);
+					fprintf(f,"]");
+				}
+			}
+			else
+			{
+				fprintf(f,"(");
+				if(isalpha(m->name[0]))
+				{
+					fprintf(f,"%s(",m->name);
+					formula2(f,m->left);
+					fprintf(f,")");
+				}
+				else 
+				{
+					formula2(f,m->left);
+					fprintf(f," %s ",m->name);
+					formula2(f,m->right);
+				}
+				fprintf(f,")");
+			}
+		else {
+			formula2(f,m->left);
+			if(m->right) fprintf(f,",");
+			formula2(f,m->right);
+		}
+	}
+}
+
+
+static request *link1(FILE *f,request *r)
+{
+	request *s = empty_request(NULL);
+	r = r->next;
+	while(r)
+	{
+		request *u = find_object(get_value(r,"CLASS",0));
+		if(u) add_value(s,get_value(u,"type",0),"%s",
+		    import(f,get_value(r,"NAME",0)));
+		r = r->next;
+	}
+	return s;
+}
+
+
+static void import_window(FILE *f,request *r)
+{
+	const char *user = getenv("METVIEW_USER_DIRECTORY");
+	char icon[1024];
+	int m  = 0;
+	int i  = 0;
+	const char   *p;
+
+	while(r)
+	{
+		int w = strcmp(r->name,"PLOTWINDOW")==0||strcmp(r->name,"CAROUSEL")==0;
+
+		strcpy(icon,"y");
+
+		if(w) fprintf(f,"if not retval then # Don't create windows\n");
+
+		/* It's an object */
+		if(p = get_value(r,"_NAME",0))
+		{
+			char buf[1024];
+			sprintf(buf,"%s/%s",user,p);
+			if(access(buf,0) == 0)
+			{
+				fprintf(f,"if use_objects then\n");
+				fprintf(f,"  %s = metview(\"%s\")\n",icon,p);
+				fprintf(f,"else\n");
+				fprintf(f,"	%s = %s\n",icon,import(f,p));
+				fprintf(f,"end if\n");
+			}
+			else p = NULL;
+		}
+		if(!p)
+		{
+			if(!import_request(f,icon,r,NULL))
+			{
+				/* The request is not known */
+				request *u = empty_request(NULL);
+				set_value(u,"macro","");
+				set_value(r,"_VERB","%s",r->name);
+				import_request(f,icon,r,u);
+				free_all_requests(u);
+			}
+		}
+		fprintf(f,"x = x & [%s]\n",icon);
+
+		if(w) fprintf(f,"end if\n");
+
+		r = r->next;
+	}
+}
+
+static void serve(svcid *id,request *r,void *misc)
+{
+	char name[1024];
+	char icon[1024];
+	FILE *f;
+	request *u;
+	const char *p;
+	int n = 0;
+	const char *userd = getenv("METVIEW_USER_DIRECTORY");
+	long now = julian_to_date(date_to_julian(0),1);
+
+	/* mars.debug = 1; */
+	/* print_all_requests(r); */
+	/* mars.debug = 0; */
+
+	p = get_value(r,"TITLE",0);
+	if(!p) p = "Plot Window";
+
+	sprintf(name,"%s/Content of %s",userd,p);
+	while(access(name,0)==0)
+		sprintf(name,"%s/Content of %s (%d)",userd,p,++n);
+
+	if(r && strcmp(r->name,"VISTOOL") == 0)
+		r = r->next;
+
+	cvtdates = 1;
+
+	sprintf(icon,"%s/.%s",userd,mbasename(name));
+	f = fopen(icon,"w");
+	fprintf(f,"USER_INTERFACE,ICON_CLASS=WMACRO\n");
+	fclose(f);
+
+	f = fopen(name,"w");
+	fprintf(f,"# This macro was gererated automagicaly\n");
+	fprintf(f,"# by %s the %d\n",user(),now);
+	fprintf(f,"# The metview user directory was %s",userd);
+	fprintf(f,"\n\n");
+	fprintf(f,"# You can control the playback of the macro by changing\n");
+	fprintf(f,"# the two following variables (set to 0 or 1):\n\n");
+
+	fprintf(f,"use_objects = 1 # Use the original icon definitions.\n");
+	fprintf(f,"rel_dates   = 1 # Make date relatives to today.\n");
+
+	fprintf(f,"\n#\n\n");
+	fprintf(f,"retval = runmode(\"visualise\")\n\n");
+	fprintf(f,"if rel_dates then\n");
+	fprintf(f,"   today = 0\n");
+	fprintf(f,"else\n");
+	fprintf(f,"   today = %ld\n",now);
+	fprintf(f,"end if\n\n");
+
+	fprintf(f,"if use_objects then\n");
+	fprintf(f,"   putenv(METVIEW_USER_DIRECTORY : '%s' )\n",userd);
+	fprintf(f,"end if\n\n");
+
+	fprintf(f,"x = []\n\n");
+
+	/* Mode ? */
+	if(u = get_subrequest(r,"_MODE",0))
+	{
+		import_window(f,u);
+		free_all_requests(u);
+	}
+	else import_window(f,r);
+
+	fprintf(f,"\n");
+	fprintf(f,"if retval then\n");
+	fprintf(f,"   return x\nelse\n   plot(x)\nend if\n");
+
+	fclose(f);
+
+
+	u = empty_request("STATUS");
+	set_value(u,"NAME", "/%s", mbasename(name));
+	set_value(u,"CLASS",  "WMACRO");
+	set_value(u,"STATUS", "CREATED");
+	send_message(id->s,u);
+	free_all_requests(u);
+
+	u = empty_request("USER_MESSAGE");
+	set_value(u,"INFO","Window content saved in '%s'",mbasename(name));
+	send_message(id->s,u);
+	free_all_requests(u);
+
+	u = empty_request("STRING");
+	set_value(u,"VALUE","Window content saved in '%s'",mbasename(name));
+	send_reply(id,u);
+	free_all_requests(u);
+}
+
+int main(int argc,char **argv)
+{
+	marsinit(&argc,argv,&setup,NUMBER(opts),opts);
+	if(setup.serve)
+	{
+		svc *s = create_service(progname());
+		add_service_callback(s,NULL,serve,NULL);
+		service_run(s);
+	}
+	else
+		/*
+		argv[1]: path to icon file
+		argv[2]: path to output file
+		argv[3]: number of spaces to use instead of tabs (optional) */
+        
+		if (argc > 3)
+		{
+			int num_spaces = atoi(argv[3]);
+			int i;
+			spaces = true;
+			for (i = 0; i < num_spaces; i++)
+				tab[i] = ' ';
+			tab[i] = '\0';
+		}
+		else
+			strcpy(tab, "\t");
+
+		import(fopen(argv[2],"w"),argv[1]);
+	return 0;
+}
diff --git a/src/Macro/netcdf.cc b/src/Macro/netcdf.cc
new file mode 100644
index 0000000..e5107a0
--- /dev/null
+++ b/src/Macro/netcdf.cc
@@ -0,0 +1,646 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "arith.h"
+#include "cnetcdf.h"
+#include "MvNetCDF.h"
+#include <math.h>
+#include <limits.h>
+#include "MvPath.hpp"
+
+//===========================================================================
+
+CNetCDF::CNetCDF(request *s) : InPool(tnetcdf,s), netCDF_(0),
+  current_(1), mode_('r')
+{
+  r_ = clone_all_requests(s);
+}
+
+CNetCDF::~CNetCDF()
+{
+  mars.debug = true;
+  print_all_requests(r_);
+  mars.debug = false;
+
+  const char *t = get_value(r_,"TEMPORARY",0);
+  const char *p = get_value(r_,"PATH",0);
+
+  if(t && p)
+    {
+      if(atoi(t)) {
+	unlink(p);
+      }
+    }
+  free_all_requests(r_);
+  unload();
+}
+
+const char *CNetCDF::GetFileName()
+{
+  return get_value(r_,"PATH",0);
+}
+
+void CNetCDF::ToRequest(request* &s)
+{
+  Attach(); // Temp fix: if someone want the request
+  s = r_;
+}
+
+int CNetCDF::Write(FILE* f)
+{
+  return CopyFile(get_value(r_,"PATH",0),f);
+}
+
+CNetCDF::CNetCDF(const char  *p,int temp,const char mode) :
+  InPool(tnetcdf), netCDF_(0),current_(1),mode_(mode)
+{
+
+  r_ = empty_request("NETCDF");
+  //set_value(r_,"PATH","%s",p);
+  set_value(r_,"PATH","%s",FullPathName(p).c_str());
+  set_value(r_,"TEMPORARY","%d",temp);
+}
+
+void CNetCDF::load()
+{
+  if ( netCDF_ )
+    return;
+
+  netCDF_ = new MvNetCDF(r_, mode_);
+}
+
+void CNetCDF::unload()
+{
+  delete netCDF_;
+}
+
+CList* CNetCDF::Variables()
+{
+  load();
+
+  int count = netCDF_->getNumberOfVariables();
+  CList *l = new CList(count);
+
+  for ( int i = 0 ; i < count; i++)
+    (*l)[i] = netCDF_->getVariable(i)->name();
+
+
+  return l;
+}
+
+MvRequest CNetCDF::Attributes(bool global)
+{
+  MvNcVar *var = global ? GetGlobalVar() : GetVar();
+
+  MvRequest req("ATTRIBUTES");
+  // Add any attributes to subrequest.
+  int num_attr = var->getNumberOfAttributes();
+  if ( num_attr > 0 )
+  {
+    for ( int j = 0; j < num_attr; j++ )
+    {
+      MvNcAtt *tmpatt = var->getAttribute(j);
+
+      if (tmpatt->type() == ncChar )
+        req.addValue(tmpatt->name(),tmpatt->as_string(0));
+      else
+        for (int  k = 0; k < tmpatt->getNumberOfValues();k++ )
+          req.addValue(tmpatt->name(),tmpatt->as_string(k));
+    }
+  }
+
+  return req;
+}
+
+class CDFCurrentFunction : public Function
+{
+public:
+  CDFCurrentFunction(char *n) : Function(n,2,tnetcdf,tnumber)
+  {info = "Sets the variable number on which netcdf functions will operate.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFCurrentFunction::Execute(int,Value *arg)
+{
+  CNetCDF *cdf;
+  int number;
+
+  arg[0].GetValue(cdf);
+  arg[1].GetValue(number);
+
+  cdf->Current(number);
+
+  return Value(number);
+}
+
+/////////////////////////////// Function classes. //////////////////////
+
+class CDFVarFunction : public Function
+{
+public:
+  CDFVarFunction(char *n) : Function(n,1,tnetcdf)
+  {info = "Returns a list of the names of the given netcdf file's variables.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFVarFunction::Execute(int,Value *arg)
+{
+  CNetCDF *cdf;
+
+  arg[0].GetValue(cdf);
+
+  return Value(cdf->Variables());
+}
+
+class CDFAttFunction: public Function
+{
+public:
+  CDFAttFunction(char *n) : Function(n,1,tnetcdf)
+  {info = "Returns a definition variable holding the netcdf's metadata.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFAttFunction::Execute(int,Value *arg)
+{
+  CNetCDF *cdf;
+
+  arg[0].GetValue(cdf);
+  return Value(cdf->Attributes(false));  // get the current variable's attributes
+}
+
+
+class CDFGlobalAttFunction: public Function
+{
+public:
+  CDFGlobalAttFunction(char *n) : Function(n,1,tnetcdf)
+  {info = "Returns a definition variable holding the netcdf's global metadata.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFGlobalAttFunction::Execute(int,Value *arg)
+{
+  CNetCDF *cdf;
+
+  arg[0].GetValue(cdf);
+  return Value(cdf->Attributes(true));  // get the global variable's attributes
+}
+
+
+
+class CDFValuesFunction: public Function
+{
+  bool listOfDims;
+
+public:
+  CDFValuesFunction(char *n) : Function(n)
+  {info = "Returns a list containing all the values for the current netcdf variable.";};
+  virtual Value Execute(int arity,Value *arg);
+  virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+int CDFValuesFunction::ValidArguments(int arity,Value *arg)
+{
+  listOfDims = false;
+
+  if( arity < 1)
+    return false;
+
+  if( arg[0].GetType() != tnetcdf )
+    return false;
+
+  if( arity == 2 )
+  {
+    listOfDims = true;
+    
+    if (arg[1].GetType() != tlist)
+      return false;
+  }
+
+  return true;
+}
+
+
+
+Value CDFValuesFunction::Execute(int,Value *arg)
+{
+    CNetCDF *a;
+
+    arg[0].GetValue(a);
+    MvNcVar *aVar = a->GetVar();
+
+    if( ! aVar->isValid() )
+    {
+        return Error("CDFValuesFunction::Execute: invalid variable");
+    }
+
+    int  nr_dims = aVar->getNumberOfDimensions();
+
+    if ( nr_dims >  0 )                           //-- arrays of data
+    {                                           
+        long  num_values = 1;
+        long* dim        = aVar->edges();         //-- ~MvNcVar deletes!
+
+        if (aVar->type() == ncChar)               //-- string (char) data - we will return a list of strings
+        {
+            if (listOfDims)
+                return Error("values(netcdf, list) syntax not yet implemented for ncChar variables.");
+
+            for( int d=0; d < nr_dims-1; ++d )    //-- e.g. 5 strings of 10 chars are stored as var(5,10)
+                num_values *= dim[d];             //-- count nr of elements
+
+            long string_length = dim[nr_dims-1];  //-- the length of each string
+            char str[string_length+1];
+            str[string_length] = '\0';            //-- terminating NULL
+
+            CList *list = new CList(num_values);  //-- we need a list to hold strings
+
+            long elem = 0;
+            for (long string=0; string < num_values; ++string)  //-- for each string...
+            {
+                int index = 0;
+                for (long j=0; j < string_length; ++j)
+                {
+                    str[index++] = aVar->as_char(elem++); //-- padding spaces at the end seem to be automagically removed,
+                }                                         //-- so we don't need to worry about them!
+                (*list)[string] = str;
+            }
+
+            return Value(list);
+        }
+
+        else         //-- vector (numeric) data
+        {
+            // say, input list is [0, 1, 1]
+
+            /*
+                Two syntaxes for retrieving the values for a variable:
+                1) listOfDims=false: simply get all the values for the current variable and
+                                     return as a vector
+                2) listOfDims=true:  a list specifying the positions along each dimension is
+                                     supplied; if one (and only one) of the positions is zero,
+                                     then that is the dimension for which we will extract all
+                                     the values (and return as a vector); otherwise we will
+                                     return just the number at the given position.
+                                     e.g. if the position list is given as [0,4,6] for a 3-d
+                                     variable, then we will return a vector of all the values
+                                     at position (n,4,6) (the user will supply 1-based indexes).
+            */
+
+            if (listOfDims)
+            {
+                vector<long> vPositionList;
+                CList *positions;                       // user-supplied list of position indexes
+                arg[1].GetValue(positions);
+
+                if (positions->Count() != nr_dims)
+                    return Error("values(netcdf, list): size of position list (%d) must be the same as the number of dimensions (%d)",
+                                  positions->Count(), nr_dims);
+
+                long indexOfSelectedDimension = -1;
+
+                for (long i = 0;i<positions->Count();i++)    // extract the elements from the list of positions
+                {
+                    long pos;
+
+                    if ((*positions)[i].GetType() == tstring)  // passing a string?
+                    {
+                        const char *str;
+                        (*positions)[i].GetValue(str);
+                        if (!strcmp(str, "all"))    // only accept "all"
+                            pos = 0;                // note that we want all the values for this one
+                        else
+                            return Error("values(netcdf, list): the only string value allowed in the position list is 'all' ('%s' has been passed).", str);
+                    }
+                    else if ((*positions)[i].GetType() == tnumber)
+                    {
+                        (*positions)[i].GetValue(pos);
+                        
+                        if (pos < 1 || pos > dim[i])
+                            return Error("values(netcdf, list): dimension %d should be in the range 1 to %d; %d has been supplied.", i, dim[i],pos);
+                    }
+                    else
+                        return Error("values(netcdf, list): Only numbers and strings are allowed in the input list.");
+
+
+                    if (pos == 0)                       // selected dimension?
+                    {
+                        indexOfSelectedDimension = i;
+                        pos = 1;                        // we will start at the first element of this dimension
+                    }
+
+                    vPositionList.push_back(pos - 1);  // user supplies 1-based indexes, we want 0-based
+                }
+
+
+                for( int d=0; d < nr_dims; ++d )                    //-- count nr of elements required
+                    num_values *= (indexOfSelectedDimension != d) ? 1 : dim[d];
+
+                CVector *vec = new CVector( num_values );           // output vector
+                vector<double> vd;
+
+                aVar->setCurrent(&(vPositionList[0]));
+                aVar->get(vd, num_values,1,1 );
+
+                for ( long elem=0; elem < num_values; ++elem )
+                    (*vec)[elem] = vd[elem];
+
+                return Value(vec);
+            }
+
+            else
+            {
+                for( int d=0; d < nr_dims; ++d )
+                    num_values *= dim[d];               //-- count nr of elements
+
+                CVector *vec = new CVector( num_values );
+
+                for ( long elem=0; elem < num_values; ++elem )
+                {
+                    double v     = aVar->as_double( elem );
+                    (*vec)[elem] = v;
+                }
+                return Value(vec);
+            }
+
+        }
+    }
+
+    else
+    {                                       //-- scalar data
+        double v = aVar->as_double( 0 );
+        return Value( v );
+    }
+}
+
+class CDFValFunction: public Function
+{
+public:
+  CDFValFunction(char *n) : Function(n,2,tnetcdf,tnumber)
+  {info = "Returns the n:th value from the current netcdf variable.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFValFunction::Execute(int,Value *arg)
+{
+    CNetCDF *a;
+    long     elem;
+
+    arg[0].GetValue(a);
+    arg[1].GetValue(elem);
+    MvNcVar *aVar = a->GetVar();
+
+    if( ! aVar->isValid() )
+    {
+        return Error("CDFValFunction::Execute: invalid variable!");
+    }
+
+    long  num_values = 1;
+    int   nr_dims    = aVar->getNumberOfDimensions();
+    long* dim        = aVar->edges();     //-- ~MvNcVar deletes!
+
+    if (aVar->type() == ncChar)               //-- string (char) data - we will return a list of strings
+    {
+        for( int d=0; d < nr_dims-1; ++d )    //-- e.g. 5 strings of 10 chars are stored as var(5,10)
+            num_values *= dim[d];             //-- count nr of elements
+
+        if( elem < 1 || elem > num_values )
+        {
+            return Error("value(netcdf,%d): index out-of-range!", elem);
+        }
+
+        long string_length = dim[nr_dims-1];  //-- the length of each string
+        char str[string_length+1];
+        str[string_length] = '\0';            //-- terminating NULL
+
+        int index = 0;
+        elem = string_length * (elem-1);
+        for (long j=0; j < string_length; ++j)
+        {
+            str[index++] = aVar->as_char(elem++); //-- padding spaces at the end seem to be automagically removed,
+        }                                         //-- so we don't need to worry about them!
+
+        return Value(str);
+    }
+    else
+    {
+        for( int d=0; d < nr_dims; ++d )
+            num_values *= dim[d];               //-- count nr of elements
+
+        if( elem < 1 || elem > num_values )
+        {
+            return Error("value(netcdf,%d): index out-of-range!", elem);
+        }
+
+        double d = aVar->as_double( elem-1 );
+
+        return Value( d );
+    }
+}
+
+
+class CDFDimFunction: public Function
+{
+public:
+  CDFDimFunction(char *n) : Function(n,1,tnetcdf)
+  {info = "Returns a list of the netcdf's dimensions.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFDimFunction::Execute(int,Value *arg)
+{
+  CNetCDF *a;
+
+  arg[0].GetValue(a);
+  MvNcVar *aVar = a->GetVar();
+
+  long *edges = aVar->edges();
+  int nrDims = aVar->getNumberOfDimensions();
+  CList *l = new CList(nrDims);
+
+  for( int i = 0; i < nrDims ; i++ )
+    (*l)[i] = edges[i];
+
+  return Value(l);
+
+}
+
+class CDFDimNamesFunction: public Function
+{
+public:
+  CDFDimNamesFunction(char *n) : Function(n,1,tnetcdf)
+  {info = "Returns a list of the netcdf's dimension names.";};
+  virtual Value Execute(int arity,Value *arg);
+};
+
+Value CDFDimNamesFunction::Execute(int,Value *arg)
+{
+  CNetCDF *a;
+
+  arg[0].GetValue(a);
+  MvNcVar *aVar = a->GetVar();
+
+  long *edges = aVar->edges();
+  int nrDims = aVar->getNumberOfDimensions();
+  CList *l = new CList(nrDims);
+
+  for( int i = 0; i < nrDims ; i++ )
+    (*l)[i] = aVar->getDimension(i)->name();
+
+  return Value(l);
+
+}
+
+// NetCDF  + NetCDF
+
+class CdfCdfBinOp : public Function {
+
+	binproc F_;
+
+public:
+	CdfCdfBinOp(char *n,binproc f) : Function(n,2,tnetcdf,tnetcdf) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value CdfCdfBinOp::Execute(int,Value *arg)
+{
+  CNetCDF *a;
+  CNetCDF *b;
+
+  arg[0].GetValue(a);
+  arg[1].GetValue(b);
+
+  const char *newName = marstmp();
+  copyfile(a->GetFileName(), newName);
+
+  CNetCDF *c = new CNetCDF(newName,1,'u');
+  c->Current(a->Current());
+
+  // Get the variables
+  MvNcVar *aVar = a->GetVar();
+  MvNcVar *bVar = b->GetVar();
+  MvNcVar *cVar = c->GetVar();
+
+  vector<double> aValues,bValues;
+
+  aVar->get(aValues,aVar->edges() );
+  bVar->get(bValues,aVar->edges() );
+
+  if ( aValues.size() != bValues.size() )
+    return Error("Different dimensions on NetCDF variables");
+
+  double *cValues  = new double[aValues.size()];
+  for ( unsigned int i = 0; i < aValues.size(); i++ )
+    cValues[i] = F_(aValues[i],bValues[i]);
+
+  cVar->put(cValues,cVar->edges());
+  delete [] cValues;
+
+  c->Flush();
+  return Value(c);
+
+}
+
+///// NetCDF + number
+class NumCdfBinOp : public Function
+{
+  binproc F_;
+
+public:
+  NumCdfBinOp(char *n,binproc f) : Function(n) { F_ = f; }
+  virtual Value Execute(int arity,Value *arg);
+  virtual int ValidArguments(int arity,Value *arg);
+};
+
+Value NumCdfBinOp::Execute(int,Value *arg)
+{
+  double  d;
+  CNetCDF *a;
+  if(arg[0].GetType() == tnumber)
+    {
+      arg[0].GetValue(d);
+      arg[1].GetValue(a);
+    }
+  else
+    {
+      arg[0].GetValue(a);
+      arg[1].GetValue(d);
+    }
+
+  const char *newName = marstmp();
+  copyfile(a->GetFileName(), newName);
+  CNetCDF *b = new CNetCDF(newName,1,'u');
+  b->Current(a->Current());
+
+  // Get the variables
+  MvNcVar *aVar = a->GetVar();
+  MvNcVar *bVar = b->GetVar();
+
+  vector<double> aValues;
+  aVar->get(aValues,aVar->edges() );
+
+  double *bValues  = new double[aValues.size()];
+
+  for ( unsigned int i = 0; i < aValues.size(); i++ )
+    {
+      if ( arg[0].GetType() == tnumber)
+	bValues[i] = F_(d,aValues[i]);
+      else
+	bValues[i] = F_(aValues[i],d);
+    }
+
+  bVar->put(bValues,bVar->edges());
+  delete [] bValues;
+
+  b->Flush();
+
+  return Value(b);
+}
+
+int NumCdfBinOp::ValidArguments(int arity,Value *arg)
+{
+  if(arity != 2) return false;
+  if(arg[0].GetType() == tnumber && arg[1].GetType() == tnetcdf)
+    return true;
+  if(arg[1].GetType() == tnumber && arg[0].GetType() == tnetcdf)
+    return true;
+  return false;
+}
+
+
+static void install(Context *c)
+{
+
+  // NetCDF specific functions
+  c->AddFunction(new CDFVarFunction("variables"));
+  c->AddFunction(new CDFAttFunction("attributes"));
+  c->AddFunction(new CDFGlobalAttFunction("global_attributes"));
+  c->AddFunction(new CDFCurrentFunction("setcurrent"));
+  c->AddFunction(new CDFValuesFunction("values"));
+  c->AddFunction(new CDFValFunction("value"));
+  c->AddFunction(new CDFDimFunction("dimensions"));
+  c->AddFunction(new CDFDimNamesFunction("dimension_names"));
+
+  // Binary op
+  int i;
+  for(i=0;BinOps[i].symb;i++)
+    c->AddFunction(new CdfCdfBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+  for(i=0;BinOps[i].symb;i++)
+    c->AddFunction(new NumCdfBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+  // Mult op as Binary op
+  for(i=0;MulOps[i].symb;i++)
+    c->AddFunction(new CdfCdfBinOp(MulOps[i].symb,MulOps[i].proc ));
+  for(i=0;MulOps[i].symb;i++)
+    c->AddFunction(new NumCdfBinOp(MulOps[i].symb,MulOps[i].proc ));
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/number.cc b/src/Macro/number.cc
new file mode 100644
index 0000000..4299ded
--- /dev/null
+++ b/src/Macro/number.cc
@@ -0,0 +1,366 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <inc_iostream.h>
+#include <math.h>
+#include "macro.h"
+#include "arith.h"
+
+
+long CNumber::sPrec = 0;            //-- cout precision, default set in serve_macro(...)
+long CNumber::sDefaultPrec = 12;
+
+
+void CNumber::Print(void)
+{
+  const char* s;
+  ToString( s );
+  cout << s;
+}
+
+int CNumber::Write(FILE *f)
+{
+  const char* s;
+  ToString( s );
+  fprintf(f,"%s",s);
+  return ferror(f);
+}
+
+void CNumber::ToString(const char* &x)
+{
+  static char buf[ 127 ];
+  ostrstream os( buf, sizeof( buf ) );
+
+  if( floor(number) == number )
+      os.precision( sDefaultPrec );      //-- integer values as integers
+  else
+      os.precision( sPrec );             //-- changed by precision(p)
+
+  os << number << ends;
+
+  x = buf;
+}
+
+void CNumber::ToRequest(request* &x)
+{
+	static request *r = 0;
+	if(r == 0)
+	  r = empty_request("NUMBER");
+
+	const char* s;
+	ToString( s );
+	set_value( r, "VALUE", "%s", s );
+	x = r;
+}
+
+class UnOp : public Function {
+
+	uniproc F_;
+
+public:
+	UnOp(char *n,uniproc f) : Function(n,1,tnumber) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class BinOp : public Function {
+
+	binproc F_;
+
+public:
+	BinOp(char *n,binproc f) : Function(n,2,tnumber,tnumber) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+};
+
+class MulOp : public Function {
+
+	typedef double (*binproc)(double,double);
+	binproc F_;
+
+public:
+	MulOp(char *n,binproc f) : Function(n) { F_ = f; }
+	virtual Value Execute(int arity,Value *arg);
+	virtual int  ValidArguments(int arity,Value *arg);
+};
+
+
+Value BinOp::Execute(int,Value *arg)
+{
+	double d1,d2;
+
+	arg[0].GetValue(d1);
+	arg[1].GetValue(d2);
+
+	return Value(F_(d1,d2));
+}
+
+Value UnOp::Execute(int,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+	return Value(F_(d));
+}
+
+int MulOp::ValidArguments(int arity,Value *arg)
+{
+	if(arity < 1) return false;
+	for(int i = 0;i<arity;i++)
+		if(arg[i].GetType() != tnumber)
+			return false;
+	return true;
+}
+
+Value MulOp::Execute(int arity,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+
+	for(int i = 1 ; i < arity; i++)
+	{
+		double x;
+		arg[i].GetValue(x);
+		d = F_(d,x);
+	}
+
+	return Value(d);
+}
+
+//==================================================================
+class SampleF : public Function {
+
+public:
+	SampleF(char *n) : Function(n,1,tnumber) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value SampleF::Execute(int,Value *arg)
+{
+	double d;
+	arg[0].GetValue(d);
+
+	return Value(2*d);
+}
+
+//==================================================================
+class NumberRoundOff : public Function {
+
+public:
+	NumberRoundOff(char *n) : Function(n,2,tnumber,tnumber)
+	{info = "Rounds spurious decimals in a value.";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NumberRoundOff::ValidArguments(int arity,Value *arg)
+{
+    if( arity != 2 )
+      return false;
+
+    if( (arg[0].GetType() != tnumber) || (arg[1].GetType() != tnumber) )
+      return false;
+
+    return true;
+}
+
+Value NumberRoundOff::Execute(int,Value *arg)
+{
+  double v, r;
+  int    d;
+  arg[0].GetValue(v);
+  arg[1].GetValue(d);
+
+  double sgn = v < 0 ? -1.0 : 1.0;
+  double e1 = pow(10.0,d);
+
+  if( v < 0 )
+      v = -v;
+
+#if 0
+  double dd = (v + 0.5/e1) * e1;        //-- for debugging
+  double df = floor(dd);
+  r = df / e1;
+#else
+  r = floor( (v + 0.5/e1) * e1 ) / e1;
+#endif
+
+  return Value(sgn*r);
+}
+
+//==================================================================
+class NumberPrecision : public Function {
+
+public:
+	NumberPrecision(char *n) : Function(n,1,tnumber)
+	{info = "Sets the printing precision for floating point values.";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NumberPrecision::ValidArguments(int arity,Value *arg)
+{
+    if( arity == 0 )
+      return true;
+
+    if( arity > 1 )
+      return false;
+
+    if( (arg[0].GetType() != tnumber) )
+      return false;
+
+    return true;
+}
+
+Value NumberPrecision::Execute(int arity, Value *arg)
+{
+  long oldPrec = CNumber::GetPrecision();
+  long prec    = CNumber::GetDefaultPrecision(); //-- precision not given
+  if( arity == 1 )
+    arg[0].GetValue( prec );                     //-- precision given
+
+  CNumber::SetPrecision( prec );
+
+  return Value( oldPrec );
+}
+
+
+
+/*******************************************************************************
+ *
+ * Function      : NumberIntBits
+ *
+ * Description   : Converts the given number into an integer and then returns
+ *                 the value of a given bit or bits, starting from the least
+ *                 significant. For example, intbits (4, 1) = 0,
+ *                 intbits (4, 2) = 0, intbits (4, 3) = 1, intbits (4, 4) = 0,
+ *                 ... The user can also specify the number of bits to extract,
+ *                 for example intbits (3, 1, 2): this extracts the first
+ *                 2 bits from the number 3, returning the result of 3.
+ *                 As another example, intbits (12, 3, 2) = 3.
+ *                 This function was originally written to help with ODB
+ *                 access.
+ *
+ ******************************************************************************/
+
+class NumberIntBits : public Function {
+
+public:
+	NumberIntBits(char *n) : Function (n)
+	{info = "Returns value of a given range of bits in an integer";}
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int NumberIntBits::ValidArguments(int arity,Value *arg)
+{
+    if ( arity != 2 && arity != 3)  // only accept 2- and 3-argument calls
+      return false;
+
+    if ( (arg[0].GetType() != tnumber) || (arg[1].GetType() != tnumber) )
+      return false;                 // arguments 1 and 2 must be numbers
+
+    if ( (arity == 3) && (arg[2].GetType() != tnumber) )
+      return false;                 // argument 3, if supplied, must be a number
+
+    return true;
+}
+
+Value NumberIntBits::Execute(int arity, Value *arg)
+{
+  int    value, bitindex;
+  int    integervalue;
+  int    bitmask = 0;
+  int    bits;
+  int    i;
+  int    num_bits = 1;
+  int    max_bits_in_long;
+  arg[0].GetValue(value);
+  arg[1].GetValue(bitindex);
+  
+
+  // how many bits can we hold in a 'long'?
+
+  max_bits_in_long = sizeof (long) * 8;
+  
+
+  // get the number of bits we want to retrieve
+  
+  if (arity == 3)
+  {
+    arg[2].GetValue(num_bits);
+  }
+
+  
+  // sensible numbers of bits only, please
+  
+  if (num_bits < 1)
+  {
+    return Error("The number of bits must be between 1 and %d inclusive.", max_bits_in_long);
+  }
+
+
+  // we cannot handle bit indexes outside of a sensible range
+  
+  if (bitindex < 1 || (bitindex + num_bits - 1) > max_bits_in_long)
+  {
+    return Error("The bit indexes must be between 1 and %d inclusive.", max_bits_in_long);
+  }
+
+
+
+  // compute the bitmask we will use to isolate the desired bit(s)
+  
+  for (i = 0; i < num_bits; i++)
+  {
+    bitmask = bitmask | (int) pow (2.0, (bitindex - 1 + i));
+  }
+  
+  
+  // isolate the desired bits using the bitmask
+  
+  bits = value & bitmask;
+  
+
+  // shift the result down. For instance, if the 5th bit is set, we
+  // just want the result to be 1 when checking for that bit. If
+  // we are checking bits 10 and 11, then we want a result between
+  // 0 and 3 inclusive. So what we want is the position-independent
+  // value of the bit(s).
+
+  return Value (bits >> (bitindex - 1));
+}
+
+
+
+//==================================================================
+
+static void install(Context *c)
+{
+	c->AddGlobal(new Variable("e", Value(M_E) ));
+	c->AddGlobal(new Variable("pi",Value(M_PI)));
+
+	int i;
+
+	for(i=0;BinOps[i].symb;i++)
+		c->AddFunction(new BinOp(BinOps[i].symb,BinOps[i].proc ));
+
+	for(i=0;MulOps[i].symb;i++)
+		c->AddFunction(new MulOp(MulOps[i].symb,MulOps[i].proc ));
+
+	for(i=0;UniOps[i].symb;i++)
+		c->AddFunction(new UnOp(UniOps[i].symb,UniOps[i].proc ));
+
+	c->AddFunction(new NumberRoundOff  ("round"));
+	c->AddFunction(new NumberPrecision ("precision"));
+	c->AddFunction(new NumberIntBits   ("intbits"));
+
+	c->AddFunction(new SampleF("twice"));
+
+}
+
+static Linkage Link(install);
+
diff --git a/src/Macro/object.cc b/src/Macro/object.cc
new file mode 100644
index 0000000..a70b255
--- /dev/null
+++ b/src/Macro/object.cc
@@ -0,0 +1,174 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+CObject::CObject(const char* nam,Context* c):
+	Content(tobject),
+	name(strcache(nam)),
+	context(c),
+	members(context->GetGlobals()),
+	defaults(context->GetGlobals())
+{
+}
+
+CObject::CObject(const CObject& other):
+	Content(tobject),
+	members(other.members),
+	defaults(other.defaults),
+	name(strcache(other.name)),
+	context(other.context)
+{
+}
+
+CObject::~CObject()
+{
+	strfree(name);
+}
+
+// void CObject::ToRequest(request* &)
+// {
+// }
+
+void CObject::Print(void)
+{
+	cout << "<" << name << ">";
+	members.Print();
+	cout <<"";
+}
+
+Content *CObject::Clone(void)
+{
+	return new CObject(*this);
+}
+
+Value CObject::super()
+{
+	static char *s = strcache(".super");
+	return context->FindGlobal(s)->GetValue();
+}
+
+void CObject::SetContext(CObject* instance)
+{
+	// Restore context
+	CList* c;
+	members.GetValue(c);
+	context->SetGlobals(c);
+	context->SetObject(instance);
+
+	// Set context for super class
+	super().GetValue(c);
+	for(int i = 0; i < c->Count(); i++)
+	{
+		CObject *o; (*c)[i].GetValue(o);
+		o->SetContext(instance);
+	}
+}
+
+void CObject::GetContext()
+{
+	CList* c;
+	// Save context
+	members = Value(context->GetGlobals());
+
+	// Restort defaults
+	defaults.GetValue(c);
+	context->SetGlobals(c);
+	context->SetObject(0);
+
+	// Set context for super class
+	super().GetValue(c);
+	for(int i = 0; i < c->Count(); i++)
+	{
+		CObject *o; (*c)[i].GetValue(o);
+		o->GetContext();
+	}
+}
+
+Value CObject::Method(const char* name,int arity,Value* arg)
+{
+
+	SetContext(this);
+
+	for(int i = 0; i < arity; i++)
+		context->Push(arg[i]);
+
+	context->CallFunction(name,arity,1);
+
+	Value v = context->Pop();
+
+	GetContext();
+
+	return v;
+}
+
+void CObject::GetInheritance(Context** x,int& n) 
+{
+	CList* c;
+
+	x[n++] = context;
+
+	super().GetValue(c);
+	for(int i = 0; i < c->Count(); i++)
+	{
+		CObject *o; (*c)[i].GetValue(o);
+		o->GetInheritance(x,n);
+	}
+
+}
+
+//=============================================================================
+
+class MemberCallFunction : public Function {
+public:
+	MemberCallFunction(char *n) : Function(n) { };
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int MemberCallFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity < 2 ) return false;
+	if(arg[arity-2].GetType() != tobject) return false;
+	if(arg[arity-1].GetType() != tstring) return false;
+	
+	return true;
+}
+
+Value MemberCallFunction::Execute(int arity ,Value *arg)
+{
+	CObject* o;       arg[arity-2].GetValue(o);
+	const char* name; arg[arity-1].GetValue(name);
+	return o->Method(name,arity-2,arg);
+}
+
+//=============================================================================
+
+
+static void install(Context *c)
+{
+
+	c->AddFunction(new MemberCallFunction("method"));
+
+  // Binary op
+ // int i;
+  //for(i=0;BinOps[i].symb;i++)
+   // c->AddFunction(new CdfCdfBinOp(BinOps[i].symb,BinOps[i].proc ));
+  
+ // for(i=0;BinOps[i].symb;i++)
+  //  c->AddFunction(new NumCdfBinOp(BinOps[i].symb,BinOps[i].proc ));
+
+  // Mult op as Binary op
+ // for(i=0;MulOps[i].symb;i++)
+  //  c->AddFunction(new CdfCdfBinOp(MulOps[i].symb,MulOps[i].proc ));
+ // for(i=0;MulOps[i].symb;i++)
+  //  c->AddFunction(new NumCdfBinOp(MulOps[i].symb,MulOps[i].proc ));
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/perlaccess.cc b/src/Macro/perlaccess.cc
new file mode 100644
index 0000000..9c88e79
--- /dev/null
+++ b/src/Macro/perlaccess.cc
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <mars.h>
+#include <inc_iostream.h>
+
+
+void perl(request* r)
+{
+	
+
+	request   *s = r;
+	cout << "[\n";
+
+	while(s)
+	{
+		parameter *p = s->params;
+		cout << "bless({\n";
+		while(p)
+		{
+			if(*p->name != '_')
+			{
+				cout << p->name << " => ";
+				value *v = p->values;
+				if(v && v->next) cout << '[';
+				value *w = v;
+				int vflg = 0;
+
+				while(w)
+				{
+					if(vflg) cout << ',';
+					cout <<  "'" <<  w->name << "'" ;
+					vflg++;
+					w = w->next;	
+				}
+
+				if(v && v->next) cout << ']';
+				cout << ",\n";
+			}
+			p = p->next;
+		}
+		cout << "}, 'metview::" << s->name << "'),\n";
+		s = s->next;
+	}
+	cout << "]\n";
+}
+
+void reply(svcid *id,request *r,void *data)
+{
+	if(r) perl(r);
+	exit(0);
+}
+
+int main(int argc,char **argv)
+{
+	marsinit(&argc,argv,0,0,0);
+
+	const char *path = (argc > 1) ? argv[1] : "/dev/null";
+	const char *mode = (argc > 2) ? argv[2] : "edit";
+	const char *req  = (argc > 3) ? argv[3] : "/dev/null";
+
+	svc* s   = create_service(progname());
+
+	add_reply_callback(s,NULL,reply,NULL);
+
+	request *u = read_request_file(req);
+	request *r = empty_request("MACRO");
+	set_value(r,"PATH","%s",path);
+
+	if(argc > 3)
+	{
+		request *v = empty_request("MACROPARAM");
+		set_subrequest(v,"MACRO",r);
+		r = v;
+		r->next = u;
+	}
+
+	set_value(r,"_ACTION","%s",mode);
+	set_value(r,"_NAME","%s",path);
+
+	call_service(s,"macro",r,0);
+	service_run(s);
+
+}
diff --git a/src/Macro/pngjpeg.cc b/src/Macro/pngjpeg.cc
new file mode 100644
index 0000000..c336cc4
--- /dev/null
+++ b/src/Macro/pngjpeg.cc
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- pngjpeg.cc  -- Jun05/vk
+
+
+#include "cpngjpeg.h"
+
+//___________________________________________________________________________
+
+CPngJpeg::CPngJpeg(const char* fileName, const string& kind) : Content( tany )
+  , fileName_( fileName )
+  , kind_( kind )
+{
+}
+
+//___________________________________________________________________________
+
+void
+CPngJpeg::ToRequest(request* &r)
+{
+  r = empty_request( kind_.c_str() );
+  add_value( r, "PATH", "%s", fileName_.c_str() );
+}
+
+//___________________________________________________________________________
+
+void
+CPngJpeg::Print()
+{
+  cout << kind_.c_str();
+}
diff --git a/src/Macro/remote.cc b/src/Macro/remote.cc
new file mode 100644
index 0000000..15bdec2
--- /dev/null
+++ b/src/Macro/remote.cc
@@ -0,0 +1,166 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+List Context::DictionaryStack;
+List Context::DictionaryCache;
+
+
+class RemoteFunction : public Function {
+	char    *service;
+	request *args;
+public:
+	RemoteFunction(const char *n,const char *s,request *r);
+	~RemoteFunction();
+	virtual Value Execute(int,Value *arg);
+};
+
+RemoteFunction::RemoteFunction(const char *n,const char *s,request *r) : Function(n)
+{
+	service = strcache(s);
+	args    = clone_all_requests(r);
+
+	int    m  = count_values(r,"_types");
+	vtype  *t = new vtype[m];
+	for(int i = 0; i < m ; i++)
+		t[i] = (vtype)atoi(get_value(r,"_types",i));
+	SetTypes(m,t);
+
+	unset_value(args,"_types");
+	unset_value(args,"_info");
+	unset_value(args,"_reply");
+
+	info = strcache(get_value(r,"_info",0));
+
+}
+
+RemoteFunction::~RemoteFunction()
+{
+	strfree(service);
+//	strfree(info); //-- ~Function() should do this!?
+	free_all_requests(args);
+}
+
+
+Value RemoteFunction::Execute(int arity,Value *arg)
+{
+	request *s = empty_request(Name());
+	parameter *p;
+	const char *q;
+	int i;
+
+	reqcpy(s,args);
+
+	i = 0;
+	p = args->params;
+
+	while((i < arity) && p)
+	{
+		if(*p->name != '_')
+		{
+			arg[i++].GetValue(q);
+			set_value(s,p->name,"%s",q);
+		}
+		p = p->next;
+	}
+
+
+	Value  v(service,s);
+
+	free_all_requests(s);
+
+	// For sync
+
+	v.Sync();
+
+	return v;
+}
+
+void Context::PopDictionary(void)
+{
+	DictionaryStack.Remove(DictionaryStack.Head());
+}
+
+void Context::PushDictionary(const char *nam)
+{
+
+	List *l = (List*)DictionaryCache.Find(nam);
+
+	if(l == 0)
+	{
+		request *r = empty_request("_dictionary");
+		Value v(nam,r);
+		free_all_requests(r);
+
+		v.Sync();
+		v.GetValue(r);
+
+		l = new List(nam);
+
+		while(r)
+		{
+			l->Append(new RemoteFunction(r->name,nam,r));
+			r = r->next;
+		}
+
+		DictionaryCache.Insert(l);
+	}
+
+	DictionaryStack.Insert(l);
+
+}
+
+Function *Context::FindInDictionary(const char *nam,int arity,Value *arg)
+{
+	List *l = (List*)DictionaryStack.Head();
+
+	while(l)
+	{
+		Function *v = 0;
+
+		while(v = (Function*)l->Find(nam,v))
+		{
+			if(v->ValidArguments(arity,arg))
+				return v;
+		}
+
+		l = (List*)l->Next();
+	}
+	return 0;
+}
+
+class PushDictFunction : public Function {
+public:
+	PushDictFunction(const char *n) : Function(n) {};
+	virtual Value Execute(int,Value *arg)
+	{
+		const char *p;
+		arg[0].GetValue(p);
+		Owner()->PushDictionary(p);
+		return Value(0.0);
+	}
+};
+
+class PopDictFunction : public Function {
+public:
+	PopDictFunction(const char *n) : Function(n) {};
+	virtual Value Execute(int,Value *)
+	{ Owner()->PopDictionary();return Value(0.0); }
+};
+
+
+static void install(Context *c)
+{
+	c->AddFunction(new PushDictFunction(".push.dict"));
+	c->AddFunction(new PopDictFunction(".pop.dict"));
+}
+
+static Linkage Link(install);
+
diff --git a/src/Macro/request.cc b/src/Macro/request.cc
new file mode 100644
index 0000000..425c9cd
--- /dev/null
+++ b/src/Macro/request.cc
@@ -0,0 +1,1476 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <ctype.h>
+#include <string.h>
+#include <vector>
+#include "macro.h"
+#include "script.h"
+#include "value.h"
+#include "MvRequest.h"
+#include "MvApplication.h"
+
+using std::vector;
+
+static Cache LangCache;
+static Cache TestCache;
+static Cache ObjsCache;
+
+static const char *find_service(const char *verb,const char *mode)
+{
+	char *state = strcache("state");
+	request *u = mars.setup;
+	const char *service = 0;
+
+	while(u && !service)
+	{
+		if(u->name == state)
+		{
+			int n = 0;
+			const char *x ;
+
+			while((x = get_value(u,"class",n++)) || (x == 0 && n==1))
+			{
+				if(x == verb || x == 0)
+				{
+					int m = 0;
+					const char *y;
+					while( (y = get_value(u,"action",m++)) ||
+						  ( y == 0 && m==1))
+						if((y == 0) || (strcmp(y,"prepare") == 0))
+						{
+							const char *z = get_value(u,"context",0);
+
+							if(z == 0 || strcmp(z,"macro") == 0)
+							{
+								if(mode)
+								{
+									const char *w; int k = 0;
+									while( (w = get_value(u,"mode",k++)) )
+										if(w == mode)
+											service = get_value(u,"service",0);
+								}
+								else {
+									if(get_value(u,"mode",0) == 0)
+										service = get_value(u,"service",0);
+								}
+							}
+						}
+
+				}
+			}
+		}
+		u = u->next;
+	}
+	return service;
+}
+
+int CRequest::Write(FILE *f)
+{
+	// If the first request is one of a certain set of types (e.g. PSFILE)
+	// and it contains a PATH parameter, then we save (i.e. copy) that file
+	// to the destination file.
+	// Otherwise we just do what we always did, which is to save all the
+	// requests into a text file.
+
+	if (!strcmp (r->name, "PSFILE") ||
+//	    !strcmp (r->name, "GRIB")   ||
+	    !strcmp (r->name, "PNG")    ||
+	    !strcmp (r->name, "JPEG")   ||
+	    !strcmp (r->name, "GIF")    ||
+	    !strcmp (r->name, "PDF")    ||
+	    !strcmp (r->name, "SVG"))
+	{
+		const char *path = get_value(r,"PATH",0); // Get the PATH from request.
+
+		if (path != NULL)
+		{
+			return CopyFile(path,f);
+		}
+	}
+
+
+	save_all_requests(f,r);
+	return ferror(f);
+}
+
+void CRequest::Dump2(void)
+{
+	Perl(r);
+}
+
+void CRequest::Print(void)
+{
+	request   *s = r;
+
+	while(s)
+	{
+
+		int pflg = 0;
+		parameter *p = s->params;
+
+		if(*s->name != '_') cout << s->name;
+		cout << '(';
+		while(p)
+		{
+			if(*p->name != '_')
+			{
+				if(pflg) cout << ',';
+				cout << p->name << ":";
+				pflg++;
+
+				value *v = p->values;
+				if(v && v->next) cout << '[';
+				value *w = v;
+				int vflg = 0;
+
+				while(w)
+				{
+					if(vflg) cout << ',';
+					cout <<  w->name ;
+					vflg++;
+					w = w->next;
+				}
+
+				if(v && v->next) cout << ']';
+			}
+			p = p->next;
+		}
+		cout << ')';
+		s = s->next;
+	}
+}
+
+static void SetValue(request *r,const char *param,Value &val)
+{
+
+	double sd;
+	const char  *sv;
+	Date  d;
+	CList *v;
+	Value *x;
+	request *u,*p,*q;
+	int j;
+	char buf[80];
+
+	switch(val.GetType())
+	{
+		case tnumber:
+			val.GetValue(sd);
+			set_value(r,param,"%.12g",sd);
+			break;
+
+		case tstring:
+			val.GetValue(sv);
+#if 0
+			if(*sv != '/')
+				set_list(r,param,sv);
+			else
+#endif
+				set_value(r,param,"%s",sv);
+			break;
+
+		case tdate:
+			val.GetValue(d);
+			d.Format("yyyy-mm-dd HH:MM:SS",buf);
+			set_value(r,param,"%s",buf);
+			break;
+
+		case tlist:
+			u = p = q = 0;
+
+			val.GetValue(v);
+			x = v->Values();
+
+			unset_value(r,param);
+
+			for(j=0;j<v->Count();j++)
+				switch(x[j].GetType())
+				{
+					case tnumber:
+						x[j].GetValue(sd);
+						add_value(r,param,"%.12g",sd);
+						break;
+
+					case tstring:
+						x[j].GetValue(sv);
+						add_value(r,param,"%s",sv);
+						break;
+
+					case tdate:
+						x[j].GetValue(d);
+						d.Format("yyyy-mm-dd HH:MM:SS",buf);
+						add_value(r,param,"%s",buf);
+						break;
+
+					default:
+						x[j].GetValue(p);
+						if( (p = clone_all_requests(p)) )
+						{
+							if(u == 0) u = p; else q->next = p;
+							while(p) { q = p; p = p->next; };
+						}
+						break;
+				}
+
+			if(u) {
+				set_subrequest(r,param,u);
+				free_all_requests(u);
+			}
+
+			break;
+
+
+		case tnil:
+			unset_value(r,param);
+			break;
+
+		default:
+			val.GetValue(u);
+			set_subrequest(r,param,u);
+			break;
+
+		}
+}
+
+//=============================================================================
+class PrintRequestFunction : public Function {
+public:
+	PrintRequestFunction(const char *n) : Function(n,1,trequest|tgrib|timage|tgeopts)
+	{ info = "Prints a definition";};
+	virtual Value Execute(int ,Value *arg)
+	{
+		request *r;
+		arg[0].GetValue(r);
+		print_all_requests(r);
+		return Value(0.0);
+	}
+};
+
+//=============================================================================
+
+class SimpleRequestFunction : public Function {
+
+	typedef struct { CList *v;int n; } lk;
+
+	request *def;
+
+protected:
+	request *GetRequest(int arity ,Value *arg);
+	void     QuickDirtyFix( request* r );
+	const char *verb;
+	const char *service;
+	vector<Content *> attachedContent; // to build up a list of content which will need to be destroyed after an async call - see comments for attachedContent in value.h.
+
+static void LookUpCnt(char*, void *d);
+static void LookUpLst(char*n,void *d);
+
+public:
+	SimpleRequestFunction(request *r,const char *n);
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+	Value Language(const char *,const char *);
+
+	request *Expand(request *,long flags = 0);
+	request *GetLanguage(void);
+	rule    *GetRules(void);
+};
+
+void SimpleRequestFunction::LookUpCnt(char*p, void *d)
+{
+	int *n = (int*)d;
+	if(isalnum(*p)) (*n)++;
+}
+
+void SimpleRequestFunction::LookUpLst(char*n,void *d)
+{
+	lk *l = (lk*)d;
+	if(isalnum(*n)) (*(l->v))[l->n++]=Value(n);
+}
+
+SimpleRequestFunction::SimpleRequestFunction(request *r,const char *n):
+	Function(n)
+{
+	def     = r;
+	verb    = get_value(r,"class",  0);
+	info    = strcache(get_value(r,"info",0));
+	service = find_service(verb,0);
+
+	if(verb == 0) verb = get_value(r,"_VERB",0);
+	if(verb == 0) verb = "_";
+	if(info == 0) info = "Metview object";
+}
+
+request *SimpleRequestFunction::GetLanguage(void)
+{
+	const char *q;
+	request *lang = 0;
+
+	if( (q = get_value(def,"definition_file",0)) )
+	{
+		lang = (request *)LangCache.Find(q);
+		if(lang == 0)
+			LangCache.Set(q,lang = read_language_file(q));
+	}
+	return lang;
+}
+
+rule *SimpleRequestFunction::GetRules(void)
+{
+	const char *p;
+	rule *test = 0;
+	if( (p = get_value(def,"rules_file",0)) )
+	{
+		test = (rule*)TestCache.Find(p);
+		if(test == 0)
+			TestCache.Set(p,test = read_check_file(p));
+	}
+	return test;
+}
+
+
+Value SimpleRequestFunction::Language(const char *v,const char *p)
+{
+
+	request *lang = GetLanguage();
+
+	if(lang == 0) return Value(); // Return nil
+
+	int n = 0;
+	loopuk_language(lang,v,p,LookUpCnt,&n);
+
+	lk k;
+
+	k.v = new CList(n);
+	k.n = 0;
+
+	loopuk_language(lang,v,p,LookUpLst,&k);
+
+	return Value(k.v);
+
+
+}
+//=============================================================================
+
+
+int SimpleRequestFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity == 0) return true;
+	int i =0;
+
+	while(i < arity)
+	{
+		switch(arg[i].GetType())
+		{
+			case tstring:
+				if(i == arity-1) return false;
+				i++;
+				/* we should check the type of arguments there */
+				break;
+
+			case trequest:
+				break;
+
+			case tlist:
+				CList *v;
+				arg[i].GetValue(v);
+
+				if(!ValidArguments(v->Count(),v->Values()))
+					return false;
+
+				break;
+
+			case tnil:
+				break;
+
+			default:
+				return false;
+				//break;
+		}
+		i++;
+	}
+
+	return true;
+}
+
+request *SimpleRequestFunction::GetRequest(int arity ,Value *arg)
+{
+	request *r = empty_request(verb);
+	const char *q;
+	CList *v;
+
+
+	// Build request from arguments
+
+	int i =0;
+	while(i < arity)
+	{
+		switch(arg[i].GetType())
+		{
+			case tstring:
+			{
+				// e.g. data: gpts
+				// see comments for attachedContent in value.h. for explaination of why we store these
+				// in fact, we only need to store certain variable types here (e.g. odb, geopoints), but
+				// that might make the code less generic. Another option could be to have a virtual
+				// function in Value which says which variable types have underlying data files; but
+				// perhaps the overhead of another entry in the vtable would almost outweigh the savings?
+
+				arg[i].GetValue(q);
+				SetValue(r,q,arg[++i]);
+				Content *c = arg[i].GetContent();
+				attachedContent.push_back(c);  // we will need to detach these later - see comments for attachedContent in value.h.
+				c->Attach(); // attach because the data will be passed to another module, so we shouldn't allow it to be deleted yet
+				break;
+			}
+
+			case tnil:
+				break;
+
+			case trequest:
+				request *u;
+				arg[i].GetValue(u);
+				reqcpy(r,u);
+				break;
+
+			case tlist:
+				arg[i].GetValue(v);
+				u = GetRequest(v->Count(),v->Values());
+				reqcpy(r,u);
+				free_all_requests(u);
+				break;
+		}
+		i++;
+	}
+
+	return Expand(r);
+
+}
+
+
+void SimpleRequestFunction::QuickDirtyFix( request* r )
+{
+  //-- 010912/vk:
+  //--   Old macros created by PlotMod contained
+  //--   an undocumented, hidden, now obsolete(!)
+  //--   parameter PRINT_SELECTION => remove if found!
+  //-- 010920/vk:
+  //--   warn about PATH parameter (to be removed!!!???)
+  if( r && ( strcmp( r->name, "DEVICE_DRIVER" ) == 0 ) )
+    {
+      const char* p = get_value( r, "PRINT_SELECTION", 0 );
+      if( p )
+	{
+	  marslog( LOG_INFO, "PRINT_SELECTION ignored in macro output(...)" );
+	  unset_value( r, "PRINT_SELECTION" );
+	}
+
+      p = get_value( r, "PATH", 0 );
+      if( p )
+	{
+	  marslog( LOG_INFO, "PATH obsolete, use FILE_NAME in output(...)" );
+	  unset_value( r, "PATH" );
+	}
+    }
+}
+
+request *SimpleRequestFunction::Expand(request *r,long flags)
+{
+	// Expand it
+
+	const char    *p     = 0;
+	request *lang  = GetLanguage();
+	rule    *test  = GetRules();
+	long     flag  = EXPAND_MARS;
+
+	if(lang == 0 && (verb == 0 || *verb == '_') )
+	{
+		const char *c = get_value(r,"_CLASS",0);
+		if(c) {
+			strfree(r->name);
+			r->name = strcache(c);
+		}
+		return r;
+	}
+
+	// Get flags from config file
+
+	if( (p = get_value(def,"expand",0)) )
+		flag = atol(p);
+
+	if(flags) flag &= flags; // Used as mask
+
+	if(lang)
+	{
+		QuickDirtyFix( r ); //-- Device driver
+		long f = expand_flags(flag);
+		reset_language(lang);
+		request *z = expand_all_requests(lang,test,r);
+		unset_value(z, "_UNSET");  // for efficiency - we don't need this param
+		free_all_requests(r);
+		expand_flags(f);
+		r = z;
+	}
+
+	set_value(r,"_NAME",Context::UniqueName() );
+	if(verb) set_value(r,"_CLASS",verb);
+
+	return r;
+
+}
+
+Value SimpleRequestFunction::Execute(int arity ,Value *arg)
+{
+	Value v;
+	request *r = GetRequest(arity,arg);
+	request *s = 0;
+
+	if(service) // Passes the device to modules, needed for VisMod...
+	{
+	   if( strcmp( service, M_UPLOT ) == 0 )
+	   {
+		Script::Output.GetValue(s);
+		set_subrequest(r,"_DEVICE_DRIVER",s);  //-- directly for uPlot
+	   }
+#if 0 //Remove this code later. We decided not to use a translator anymore.
+	   else if( strcmp( service, "VisModTrans" ) == 0 )
+	   {
+//		Script::Driver.GetValue(s);
+		Script::Output.GetValue(s);
+		if ( s )
+		{
+			set_subrequest(r,"_DRIVER",s);
+			service = M_UPLOT; //-- directly to uPlot
+		}
+		else
+		{
+			Script::Output.GetValue(s);
+			if ( s )
+				set_subrequest(r,"_DEVICE_DRIVER",s);  //-- directly for PlotMod
+			else
+			{
+				Script::Device.GetValue(s);
+				if ( s )
+					set_subrequest(r,"_DEVICE",s);  //-- for old VisMod, via translator
+				else
+				{
+					// There is no "device" definition, so plot on screen.
+					// Because PlotMod and uPlot share the same
+					// PLOT_SUPERPAGE command and in order to avoid
+					// uPlot having to call the translator all the time,
+					// the command below is needed (not nice,
+					// but it would require several changes elsewhere)
+					if ( strcmp(r->name,"PLOT_SUPERPAGE") == 0 )
+					{
+						// Get preferences
+						MvRequest myPref = MvApplication::getPreferences();
+
+						// Get preferred plot module name
+						const char* myPlotModule = myPref( "DEFAULT_PLOT_MODULE" );
+
+						// Set output function
+						if( myPlotModule && ( strcmp( myPlotModule, M_UPLOT ) == 0 ) )
+							service = M_UPLOT;
+					}
+				}
+			}
+
+            		// Ok, we know it's VisModTrans, but check if the
+            		// plotter() function has been set.
+            		service = PlotterFunction::Plotter();
+		}
+	   }
+	   else if( strcmp( service, "PlotMod" ) == 0 )  //D Remove later
+	   {
+		Script::Output.GetValue(s);
+		set_subrequest(r,"_DEVICE_DRIVER",s);  //-- directrly for new PlotMod
+	   }
+#endif
+	   set_value(r,"_MACRO","%s",Script::MacroPath());
+	   set_value(r,"_PATH","%s",Script::MacroMainPath());
+	}
+
+	v = service ? Value(service,r,attachedContent) : Value(r);
+
+	free_all_requests(r);
+
+	attachedContent.clear();
+
+	return v;
+}
+
+//=============================================================================
+// Note : the metview function need the GUI
+
+Value Context::Metview(const char *name)
+{
+	request *r = empty_request("RESOLVE");
+	set_value(r,"NAME","%s",name);
+	request *s = empty_request("MACRO");
+	set_value(r,"_MODE", "MACRO");
+	set_value(r,"_CALLED_FROM_MACRO", "0");
+	Value v("MetviewUI",r);
+	free_all_requests(s);
+	free_all_requests(r);
+	return v;
+}
+
+class MetviewRequestFunction : public Function {
+public:
+	MetviewRequestFunction(const char *n) : Function(n,1,tstring)
+		{};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value MetviewRequestFunction::Execute(int,Value *arg)
+{
+	const char *p;
+	Value v;
+	arg[0].GetValue(p);
+	return Context::Metview(p);
+}
+
+//=============================================================================
+
+class ValuesFunction : public Function {
+public:
+	ValuesFunction(const char *n) : Function(n) {};
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+int ValuesFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity != 1 && arity != 2) return false;
+	for(int i = 0;i<arity;i++)
+		if(arg[0].GetType() != tstring)
+			return false;
+	return true;
+}
+
+Value ValuesFunction::Execute(int arity,Value *arg)
+{
+	const char *p,*q = 0;
+
+	arg[0].GetValue(p);
+	if(arity == 2) arg[1].GetValue(q);
+
+	SimpleRequestFunction *f = (SimpleRequestFunction*)ObjsCache.Find(p);
+
+	if(f) return f->Language(p,q);
+
+	return Value();
+
+}
+
+//=============================================================================
+char*   PlotterFunction::plotter   = strcache(NULL);
+boolean PlotterFunction::setbyuser = false;
+
+//-- list for plotters given by numbers (starting from 0)
+static const char *plotters[] = {
+	"PlotMod",      //-- 0
+	"VisModTrans",  //-- 1
+	M_UPLOT,        //-- 2
+};
+
+//-- list of pairs for plotter aliases
+//-- for each "pair" the first item is the alias, the second one the corresponding plotter
+static const char *aliases[] = {
+	"magics",	"PlotMod",
+	"magics6",	"PlotMod",
+	"magics++",	M_UPLOT,
+	"mag++",	M_UPLOT,
+};
+
+PlotterFunction::PlotterFunction(const char *n) : Function(n)
+{
+		 setbyuser = false;
+		 plotter = 0;
+}
+
+void PlotterFunction::Init()
+{
+	if (plotter)
+	{
+		strfree(plotter);
+		plotter = 0;
+	}
+	setbyuser = false;
+}
+
+int PlotterFunction::ValidArguments(int arity,Value *arg)
+{
+	return (arity == 0) || ( arity == 1 &&
+		(arg[0].GetType() == tstring || arg[0].GetType() == tnumber));
+}
+
+Value PlotterFunction::Execute(int arity,Value *arg)
+{
+
+	char* prev = strcache(plotter);
+
+	if(arity == 1)
+	{
+
+		if(arg[0].GetType() == tstring )
+		{
+			const char    *p;
+			arg[0].GetValue(p);
+			boolean found = false;
+
+			//-- is it a valid plotter name?
+			for( int i=0; i < (signed)NUMBER(plotters); ++i )
+			{
+			   if( strcmp( p, plotters[i] ) == 0 )
+			   {
+			      strfree(plotter);
+			      plotter = strcache(p);
+			      found = true;
+			   }
+			}
+
+			if( ! found )
+			{
+			   //-- not a plotter name, then is it an alias name?
+			   for( int i=0; i < (signed)NUMBER(aliases); )
+			   {
+			      if( strcmp( p, aliases[i] ) == 0 )
+			      {
+			         strfree(plotter);
+			         plotter = strcache(aliases[i+1]);
+			         found = true;
+			      }
+			      i = i + 2;
+			   }
+			}
+			if( ! found )
+			   return Error("Unknown plotter alias %s", p );
+		}
+
+		if(arg[0].GetType() == tnumber)
+		{
+			int n;
+			arg[0].GetValue(n);
+
+			if(n < 1 || n > (signed)NUMBER(plotters))
+			   return Error("Invalid plotter id %d, should be between 1 and %d",
+				n, NUMBER(plotters));
+
+			strfree(plotter);
+			plotter = strcache(plotters[n-1]);
+		}
+	}
+    
+    setbyuser = true;
+
+	Value v(prev);
+	strfree(prev);
+	return v;
+}
+
+char* PlotterFunction::Plotter()
+{
+	if(plotter == 0)
+		plotter = strcache(M_UPLOT);   //default value
+
+	return plotter;
+}
+
+void PlotterFunction::SetPlotter( const char* p )
+{
+    // only set the plotter if the user has not specified which one to use
+    
+    if (!setbyuser)
+    {
+	    strfree(plotter);
+	    plotter = strcache(p);
+    }
+}
+
+//=============================================================================
+
+class RequestGetElemFunction : public Function {
+public:
+	RequestGetElemFunction(const char *n) : Function(n,2,trequest,tstring) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value RequestGetElemFunction::Execute(int,Value *arg)
+{
+	const char    *p;
+	request *r,*s = 0;
+	CList   *l;
+
+	arg[0].GetValue(r);
+	arg[1].GetValue(p);
+
+
+	if ((s = get_subrequest(r,p,0)) )
+	{
+		Value v;
+		v.SetContent(s);          // This will force expension of "DATA",..
+		v.GetContent()->Attach(); // Subrequests are parameters,
+								  // they must be saved ....
+		free_all_requests(s);
+		return v;
+	}
+
+	// If the request has a language file
+	// first expand the parameter name and get the defaults
+
+	SimpleRequestFunction *f = (SimpleRequestFunction*)ObjsCache.Find(r->name);
+	if(f != 0)
+	{
+		s = empty_request(r->name);
+		s = f->Expand(s,~EXPAND_NO_DEFAULT & ~EXPAND_NO_OFF);
+
+		// Make sure the parameter name is right
+
+		parameter *q = closest_parameter(
+			closest_verb(f->GetLanguage(),r->name),
+			p);
+
+		if(q) p = q->name;
+
+	}
+
+
+	int n = count_values(r,p);
+
+	if(n == 0 && s != 0)
+	{
+		// Use language
+		r = s;
+		n = count_values(r,p);
+	}
+
+	if(n == 0) return Value(); // return nil
+	if(n >  1) l = new CList(n);
+
+	Date d;
+
+	parameter *par = find_parameter(r,p);
+	if(par == NULL) return Value();
+	value *vi = par->values;
+
+	for(int i = 0; i <n ;i++)
+	{
+		const char *q = vi->name;
+		Value v;
+
+		if(strcmp(p,"DATE")==0 && is_number(q))
+		{
+			d =  Date(atof(q));
+			v =  Value(d);
+		}
+		else if(isdate(q))
+			v =  Value(Date(q));
+		else if(is_number(q))
+			v =  Value(atof(q));
+		else
+			v =  Value(q);
+
+		if(n == 1)
+		{
+			free_all_requests(s);
+			return v;
+		}
+		(*l)[i] = v;
+
+		vi = vi->next;
+	}
+
+	free_all_requests(s);
+	return Value(l);
+
+}
+//=============================================================================
+
+class ComplexRequestFunction : public Function{
+	char *service;
+	virtual request *Header(void) { return 0; };
+	virtual char *Service()   { return service; }
+public:
+	ComplexRequestFunction(const char *n,const char *s) : Function(n)
+		{ service = strcache(s); };
+	virtual int ValidArguments(int arity,Value *arg);
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+int ComplexRequestFunction::ValidArguments(int arity,Value*)
+{
+	if(arity == 0) return false;
+	return true;
+
+#if 0
+	if(arity == 1 && arg[0].GetType() == tlist)
+	{
+
+		CList *v;
+		arg[0].GetValue(v);
+
+		if(!ValidArguments(v->Count(),v->Values()))
+				return false;
+
+		return true;
+	}
+
+	for(int i = 0; i< arity; i++)
+	{
+		vtype t = arg[i].GetType();
+		if(t == tlist)
+		{
+			CList *v;
+			arg[0].GetValue(v);
+			if(!ValidArguments(v->Count(),v->Values()))
+				return false;
+
+		}
+		else if( (t & (trequest|tgrib|timage|tbufr|tgeopts)) !=0) return false;
+	}
+
+	return true;
+#endif
+}
+
+// This function used to handle requests such as EDIT, NEWPAGE and PLOT.
+// First, it was updated to handle the new uPlot plot command. Then, these changes
+// were too specific and two new function were created:
+// PlotFunction::ExecuteComplexRequestFunction (to handle plot command)
+// PageFunction::Execute (to handle newpage command)
+Value ComplexRequestFunction::Execute(int arity ,Value *arg)
+{
+    request *p = 0, *q = 0;
+
+    if(arity == 1 && arg[0].GetType() == tlist)
+    {
+        CList *v;
+        arg[0].GetValue(v);
+        return Execute(v->Count(),v->Values());
+    }
+
+    q = p = Header();
+    set_value(q,"_NAME",Context::UniqueName());
+
+    // Loop over parameters
+    for(int i=0;i<arity;i++)
+    {
+        request *u;
+        arg[i].GetValue(u);
+        if( (u = clone_all_requests(u)) )
+        {
+            if(get_value(u,"_CLASS",0) == 0)
+                set_value(u,"_CLASS",u->name);
+
+            set_value(u,"_NAME", Context::UniqueName() );
+
+            if(p == 0) p = u; else q->next = u;
+            while(u) { q = u; u = u->next; };
+        }
+    }
+
+    set_value(p,"_MACRO","%s",Script::MacroPath());
+    set_value(p,"_PATH","%s",Script::MacroMainPath());
+
+    Value v(Service(),p);
+    free_all_requests(p);
+    v.Sync(); // Force sync
+
+    return v;
+}
+
+//=============================================================================
+
+class PlotFunction : public ComplexRequestFunction{
+	virtual request *Header(void);
+	virtual Value Execute(int arity,Value *arg);
+	Value ExecuteComplexRequestFunction(int arity,Value *arg);
+	virtual char* Service() { return PlotterFunction::Plotter(); }
+public:
+	PlotFunction(const char *n) : ComplexRequestFunction(n,"VisModTrans") {};
+};
+
+Value PlotFunction::Execute(int arity ,Value *arg)
+{
+	if(arity == 1 && arg[0].GetType() == tlist)
+		return ComplexRequestFunction::Execute(arity,arg);
+
+
+	if(arity < 1)
+		return Value();
+
+	request *r;
+	arg[0].GetValue(r);
+
+	// Check for a 'mode' in the first argument
+
+	request *mode = get_subrequest(r,"_MODE",0);
+
+	if(mode && r->name && strcmp(r->name,"DROP") == 0)
+	{
+		for(int i = 1; i< arity; i++)
+		{
+			request *u;
+			arg[i].GetValue(u);
+			const char *service = find_service(u->name,mode->name);
+			if(service)
+			{
+				// Send it to the proper place
+				request *t = clone_all_requests(u);
+				set_subrequest(t,"_MODE",mode);
+				Value v(service,t);
+				v.Sync(); // Force sync
+				arg[i] = v; // I don't know it this is safe
+				free_all_requests(t);
+			}
+
+		}
+		free_all_requests(mode);
+	}
+
+	return ExecuteComplexRequestFunction(arity,arg);
+
+}
+
+Value PlotFunction::ExecuteComplexRequestFunction(int arity ,Value *arg)
+{
+	request *p = 0, *q = 0;
+
+	if(arity == 1 && arg[0].GetType() == tlist)
+	{
+		CList *v;
+		arg[0].GetValue(v);
+		return Execute(v->Count(),v->Values());
+	}
+
+	// Loop over parameters
+	MvRequest preq;
+	for(int i=0;i<arity;i++)
+	{
+		request *u;
+		arg[i].GetValue(u);
+		Content *c = arg[i].GetContent();
+		c->Attach();  // arguments will be popped off the stack and destroyed after use, so preserve them here
+
+		if( (u = clone_all_requests(u)) )
+		{
+			// Save driver requests
+			const char* cval = (const char*)get_value(u,"CLASS",0);
+			if( cval && strcmp(cval,"DRIVER") == 0 )
+			{
+				preq = preq + u;
+				continue;
+			}
+
+			if(p == 0) p = u; else q->next = u;
+			while(u) { q = u; u = u->next; };
+		}
+	}
+
+	set_value(p,"_MACRO","%s",Script::MacroPath());
+	set_value(p,"_PATH","%s",Script::MacroMainPath());
+	set_value(p,"_NAME",Context::UniqueName());
+
+	// Define output requests according to the following rules/priorities:
+	// 1. Drivers defined in the "plot" command have top priority (overwrite "setoutput")
+	// 2. Drivers defined in the "setoutput" command have second priority
+	// 3. If neither 1 or 2 is defined then output goes to "screen"
+    if ( preq )       	   //drivers defined in the plot command
+	{
+		// Set output function
+		PlotterFunction::SetPlotter("uPlotBatch");
+
+        MvRequest req("PRINTER_MANAGER");
+        req.setValue("OUTPUT_DEVICES",preq);
+        Script::Output = Value(req);
+    }
+
+	// Concatenate all requests
+	if ( Script::PlotReq )
+		Script::PlotReq = Script::PlotReq + p;
+	else
+		Script::PlotReq = p;
+
+	return Value((request*)0);
+}
+
+// Get the current device
+
+request *PlotFunction::Header(void)
+{
+	request *r = 0;
+
+	Script::Output.GetValue(r);
+
+	if( !r )
+		Script::Device.GetValue(r);
+
+	r =  clone_all_requests(r);
+	return r;
+}
+
+//=============================================================================
+
+class PageFunction : public ComplexRequestFunction{
+	virtual request *Header(void);
+    virtual Value Execute(int arity,Value *arg);
+	virtual char* Service() { return PlotterFunction::Plotter(); }
+public:
+	PageFunction(const char *n) : ComplexRequestFunction(n,"VisModTrans") {};
+};
+
+Value PageFunction::Execute(int ,Value*)
+{
+    // Get header info
+    MvRequest hreq = Header();
+    if ( hreq )
+    {
+        // Concatenate all requests
+        if ( Script::PlotReq )
+            Script::PlotReq = Script::PlotReq + hreq;
+       else
+            Script::PlotReq = hreq;
+    }
+
+     return Value((request*)0);
+}
+
+request *PageFunction::Header(void)
+{
+	return empty_request("NEWPAGE");
+}
+
+//=============================================================================
+//=============================================================================
+
+class DialogFunction : public ComplexRequestFunction{
+	virtual request *Header(void);
+public:
+	DialogFunction(const char *n,const char *s) : ComplexRequestFunction(n,s) {};
+};
+
+
+request *DialogFunction::Header(void)
+{
+	return empty_request("EDIT");
+}
+
+//=============================================================================
+
+class ServiceFunction : public Function {
+public:
+	ServiceFunction(const char *n) : Function(n) {};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+int ServiceFunction::ValidArguments(int arity,Value *arg)
+{
+	if(arity<2) return false;
+	if(arg[0].GetType() != tstring) return false;
+	for(int i = 1;i<arity;i++)
+		if(arg[i].GetType() != trequest) return false;
+	return true;
+}
+
+Value ServiceFunction::Execute(int arity ,Value *arg)
+{
+	request *s = 0;
+	request *t = 0;
+
+	const char *serv;
+	arg[0].GetValue(serv);
+
+	for(int i = 1; i< arity;i++)
+	{
+		request *r;
+		arg[i].GetValue(r);
+		r = clone_all_requests(r);
+		if(t) t->next = r; else s = r;
+		while(r)
+		{
+			t = r;
+			r = r->next;
+		}
+	}
+
+	Value v(serv,s);
+
+	free_all_requests(s);
+
+	return v;
+
+}
+
+//=============================================================================
+
+class RequestFunction : public Function {
+public:
+	RequestFunction(const char *n) : Function(n,2,tstring,trequest) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value RequestFunction::Execute(int ,Value *arg)
+{
+
+	const char *p;
+	request *r;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(r);
+
+	request *s = empty_request(p);
+	reqcpy(s,r);
+
+	Value v(s);
+
+	free_all_requests(s);
+
+	return v;
+
+}
+
+//=============================================================================
+class VerbFunction : public Function {
+public:
+	VerbFunction(const char *n) : Function(n,1,trequest) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value VerbFunction::Execute(int,Value *arg)
+{
+	request *r = 0;
+
+	arg[0].GetValue(r);
+	if(r == 0)
+		return "";
+	return Value(r->name);
+
+}
+
+//=============================================================================
+class KeyFunction : public Function {
+public:
+	KeyFunction(const char *n) : Function(n,1,trequest) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value KeyFunction::Execute(int,Value *arg)
+{
+	request *r = 0;
+
+	arg[0].GetValue(r);
+	if (r == 0)
+		return"";
+
+	parameter* p = r->params;
+	int count = 0;
+	while (p)
+	{
+		count++;
+		p = p->next;
+	}
+	CList *l = new CList(count);
+	p = r->params;
+	int n = 0;
+	while (p)
+	{
+		(*l)[n++] = p->name;
+		p = p->next;
+	}
+
+	return Value(l);
+
+}
+//=========================================================================
+class OrderFunction : public Function {
+public:
+	OrderFunction(const char *n) : Function(n,0) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value OrderFunction::Execute(int,Value*)
+{
+	int count = mars_order_count();
+	CList *l = new CList(count);
+	char **order = mars_order();
+	for (int i = 0; i < count; i++)
+		(*l)[i] = order[i];
+
+	return Value(l);
+
+}
+//=========================================================================
+
+
+void CRequest::SetSubValue(Value& v,int arity,Value *arg)
+{
+	if(!Check(1,v,arity,arg,tany,1,tnumber|tstring))
+		return;
+
+	const char    *p;
+
+	arg[0].GetValue(p);
+
+	SetValue(r,p,v);
+
+	// If needed, expand request
+	SimpleRequestFunction *f = (SimpleRequestFunction*)ObjsCache.Find(r->name);
+
+	if(f)
+	{
+		request *s = f->Expand(clone_all_requests(r));
+		if(s) free_all_requests(r);
+		r = s;
+	}
+
+}
+
+//=============================================================================
+
+class PlotSuperpageFunction : public Function {
+public:
+	PlotSuperpageFunction(const char *n) : Function(n,2,tstring,trequest) {};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+	request *GetRequest(int arity ,Value *arg);
+};
+
+int PlotSuperpageFunction::ValidArguments(int arity,Value*)
+{
+	return (arity < 2 ? false : true);
+}
+
+Value PlotSuperpageFunction::Execute(int arity ,Value *arg)
+{
+	// Get full request
+	MvRequest r = GetRequest(arity,arg);
+
+	// Expand request to make sure that all parameters
+	// are defined in capital letters
+	r = r.ExpandRequest("PlotSuperPageDef","PlotSuperPageRules",EXPAND_NO_DEFAULT);
+
+	// Remove PAGES request
+	MvRequest superpage = r;
+	superpage.unsetParam("PAGES");
+
+	// Get pages requests
+	MvRequest pages = r.getSubrequest("PAGES");
+
+	// Build list of requests (superpage+page[i])
+	int npages = count_requests(pages);
+	CList* lreq = new CList(npages);
+	for ( int i = 0; i < npages; i++ )
+	{
+	    MvRequest page = pages.justOneRequest();
+	    MvRequest oneReq = superpage;
+	    oneReq("PAGES") = page;
+	    (*lreq)[i] = Value(oneReq);
+	    pages.advance();
+	}
+
+	return Value(lreq);
+}
+
+request *PlotSuperpageFunction::GetRequest(int arity ,Value *arg)
+{
+	request *r = empty_request("PLOT_SUPERPAGE");
+	const char *q;
+	CList *v;
+
+	// Build request from arguments
+	int i =0;
+	while(i < arity)
+	{
+		switch(arg[i].GetType())
+		{
+			case tstring:
+				arg[i].GetValue(q);
+				SetValue(r,q,arg[++i]);
+				break;
+
+			case tnil:
+				break;
+
+			case trequest:
+				request *u;
+				arg[i].GetValue(u);
+				reqcpy(r,u);
+				break;
+
+			case tlist:
+				arg[i].GetValue(v);
+				u = GetRequest(v->Count(),v->Values());
+				reqcpy(r,u);
+				free_all_requests(u);
+				break;
+		}
+		i++;
+	}
+	
+	return r;
+}
+
+//=============================================================================
+
+static void install(Context *c)
+{
+	request *r = mars.setup;
+
+	c->AddFunction(new MetviewRequestFunction("metview"));
+	c->AddFunction(new SimpleRequestFunction(0,"definition"));
+
+	char *object = strcache("object");
+
+	while(r)
+	{
+		if(r->name == object)
+		{
+			const char *n = get_value(r,"macro",0);
+			if ( n && strcmp(n,"plot_superpage") == 0 )
+			{
+			      r = r->next;
+			      continue;
+			}
+			
+			const char *m = get_value(r,"class",0);
+			if(n) {
+				Function *f = new SimpleRequestFunction(r,n);
+
+				ObjsCache.Set(n,f);
+				if(m) ObjsCache.Set(m,f);
+
+				c->AddFunction(f);
+			}
+		}
+		r = r->next;
+	}
+
+	strfree(object);
+
+	c->AddFunction(new PlotFunction("plot"));
+	c->AddFunction(new PageFunction("newpage"));
+	c->AddFunction(new DialogFunction("dialog","MetviewUI"));
+	c->AddFunction(new RequestGetElemFunction("[]"));
+	c->AddFunction(new ValuesFunction("values"));
+	c->AddFunction(new PrintRequestFunction("printdef"));
+	c->AddFunction(new ServiceFunction("service"));
+	c->AddFunction(new RequestFunction("request"));
+	c->AddFunction(new PlotterFunction("plotter"));
+	c->AddFunction(new VerbFunction("verb"));
+	c->AddFunction(new VerbFunction("class"));
+	c->AddFunction(new KeyFunction("keywords"));
+	c->AddFunction(new OrderFunction("marsorder"));
+	c->AddFunction(new PlotSuperpageFunction("plot_superpage"));
+}
+
+static Linkage linkage(install);
diff --git a/src/Macro/script.cc b/src/Macro/script.cc
new file mode 100644
index 0000000..68ca1ea
--- /dev/null
+++ b/src/Macro/script.cc
@@ -0,0 +1,307 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "script.h"
+#include "Cached.h"
+#include "MvRequest.h"
+
+svcid   *Script::SvcId      = 0;
+Script  *Script::Compiled   = 0;
+Value    Script::Output =  (request*)0;		// Default uPlot output/device
+Value    Script::Device =  (request*)0;		// Default VisMod device/output
+MvRequest Script::PlotReq;				// Plot request
+char    *Script::macropath  = 0;
+char    *Script::macroMainPath  = 0;
+
+extern "C" {
+
+int parse_macro(void);
+void zzerror(char *msg)
+{
+	extern int zzlineno;
+	Script::Compiled->CompileError(msg,zzlineno+1);
+}
+
+}
+
+void Script::PutMessage(int /*code*/,const char *msg)
+{
+	if(Script::SvcId)
+	{
+		//if(code != LOG_INFO) set_svc_msg(Script::SvcId,msg);
+		send_progress(Script::SvcId,msg,0);
+	}
+	printf("%s\n", msg);
+}
+
+void Script::CompileError(const char *msg,int line)
+{
+	marslog(LOG_EROR,"Line %d: %s",line,msg);
+	SetError(1);
+}
+
+Script::Script(const char *name) : Context(name)
+{
+	runmode = 0;
+	Linkage::Install(this);
+	SetRunMode("batch");
+}
+
+int Script::Compile(const char *filename)
+{
+	extern FILE *zzin;
+	extern int zzlineno;
+//	extern int zzdebug;
+	/* zzdebug = 1; */
+
+	Cached oldDir( MacroMainPath() );   //-- save previous path
+
+	char pwd[1024];
+	getcwd(pwd,sizeof(pwd)-1);
+
+	MacroPath(makepath(pwd,filename));
+	MacroMainPath(makepath(pwd,filename));  //-- E.Monreal INM. 2003-02-26
+
+	if(filename) zzin = fopen(filename,"r");
+	else         zzin = stdin;
+
+	if(zzin == 0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",filename);
+		SetError(1);
+		return GetError();
+	}
+
+	zzlineno    = 0;
+
+	Step *i = Instruction; Context *c = Current; Script *s = Compiled;
+	Instruction = 0;
+	Current = Compiled = this;
+	parse_macro();
+	Instruction = i; Current = c; Compiled = s;
+	fclose(zzin);
+
+	MacroMainPath( (const char*)oldDir ); //-- revert to previous path
+
+	return GetError();
+}
+
+Script::~Script()
+{
+	EmptyStack();
+	strfree(runmode);
+	ASync::Disconnect();
+
+	// Clean output request
+	Script::Output = (request*)0;
+}
+
+//============================================================================
+
+void Batch::CompileError(const char* p,int n)
+{
+	Script::CompileError(p,n);
+	stop_all(batch,"Syntax error in macro",1);
+}
+
+void Batch::RuntimeError(const char* p,int n)
+{
+	Script::RuntimeError(p,n);
+	stop_all(batch,"Runtime error in macro",1);
+}
+
+void Batch::BatchError(int err, void* data)
+{
+	if (err)
+	{
+		cout << "Macro Batch::BatchError: fatal error encountered!" << endl;
+
+		int li = CurrentLine();
+		cout << "Macro Batch::BatchError: error around line " << li << endl;
+
+		((Batch*)data)->RuntimeError("Panic, aborting",li);
+	}
+}
+
+Batch::Batch(const char *name) : Script(name)
+{
+	install_exit_proc(BatchError,this);
+
+	// In batch, connect to event so we are known
+	svc_connect(batch = create_service("batch"));
+}
+
+Batch::~Batch()
+
+{
+	remove_exit_proc(BatchError,this);
+}
+
+//============================================================================
+
+void Terminal::NewStep(Step *s)
+{
+	if(last == 0) { last = s; s = 0;}
+	while((Instruction = last) && last->Ready()) last = last->Execute();
+	if(last == 0) last = s;
+}
+
+//============================================================================
+
+class RunMode1Function : public Function {
+public:
+	RunMode1Function(char *n) : Function(n,0)
+    {info = "Returns a string describing the current run mode";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value RunMode1Function::Execute(int,Value*)
+{
+	Node *n = Owner();
+	while(n->Owner()) n = n->Owner();
+	Script *s = (Script*)n;
+	return Value(s->GetRunMode());
+}
+
+//============================================================================
+
+class RunMode2Function : public Function {
+public:
+	RunMode2Function(char *n) : Function(n,1,tstring) {};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value RunMode2Function::Execute(int,Value *arg)
+{
+	Node *n = Owner();
+	while(n->Owner()) n = n->Owner();
+	Script *s = (Script*)n;
+
+	const char *m1;
+	arg[0].GetValue(m1);
+
+	const char *m2;
+	m2 = s->GetRunMode();
+
+	int m = strcasecmp(m1,m2) == 0;
+
+	while(!m)
+	{
+		m2 = Context::FallBackHandler(m2);
+		if(m2 == 0) break;
+	    m = strcasecmp(m1,m2) == 0;
+	}
+
+	return Value(m);
+}
+
+
+//============================================================================
+//                                                              for old VisMod
+class GetDeviceFunction : public Function {
+public:
+	GetDeviceFunction(char *n) : Function(n,0) {};
+	virtual Value Execute(int,Value *)         { return Script::Device; };
+};
+
+//============================================================================
+
+class SetDeviceFunction : public Function {
+public:
+	SetDeviceFunction(char *n) : Function(n) {};
+	virtual Value Execute(int,Value *arg);
+};
+
+Value SetDeviceFunction::Execute(int arity,Value *arg)
+{
+	PlotterFunction::SetPlotter("VisModTrans");
+	Value v = Script::Device;
+	if(arity)
+	Script::Device = arg[0];
+	else
+	Script::Device = (request*)0;
+	return v;
+}
+
+//============================================================================
+//                                                             for new PlotMod
+class GetOutputFunction : public Function {
+public:
+	GetOutputFunction(char *n) : Function(n,0) {};
+	virtual Value Execute(int,Value *)         { return Script::Output; };
+};
+
+//============================================================================
+
+class SetOutputFunction : public Function {
+public:
+	SetOutputFunction(char *n) : Function(n) {};
+	virtual Value Execute(int,Value *arg);
+};
+
+Value SetOutputFunction::Execute(int arity,Value *arg)
+{
+        // Get preferences
+//	MvRequest myPref = MvApplication::getPreferences();
+//	const char* myPlotModule = myPref( "DEFAULT_PLOT_MODULE" );
+
+	// Flush previous plot commands
+	if ( Script::PlotReq )
+	{
+		// Concatenate Output Driver and Plot request
+		request* reqdrive;
+		Script::Output.GetValue(reqdrive);
+		MvRequest req(reqdrive);
+		req = req + Script::PlotReq;
+
+		// Flush
+		Value v(PlotterFunction::Plotter(),req);
+		v.Sync(); // Force sync
+
+		// empty request
+		Script::PlotReq.clean();
+	}
+	
+       // Set output function
+        PlotterFunction::SetPlotter("uPlotBatch");
+
+	Value v = Script::Output;
+	if(arity)
+	{
+		MvRequest req("PRINTER_MANAGER");
+		MvRequest reqdev;
+		request* s;
+		for (int i = 0; i < arity; i++)
+		{
+			arg[i].GetValue(s);
+			reqdev = reqdev + s;
+		}
+		req.setValue("OUTPUT_DEVICES",reqdev);
+		Script::Output = Value(req);
+	}
+	else
+	  Script::Output = (request*)0;
+
+	return v;
+}
+
+//============================================================================
+
+static void install(Context *c)
+{
+	c->AddFunction(new SetDeviceFunction("setdevice")); //-- old VisMod DEVICE
+	c->AddFunction(new GetDeviceFunction("getdevice"));
+	c->AddFunction(new SetOutputFunction("setoutput")); //-- new PlotMod DEVICE_DRIVER
+	c->AddFunction(new GetOutputFunction("getoutput"));
+	c->AddFunction(new RunMode1Function("runmode"));
+	c->AddFunction(new RunMode2Function("runmode"));
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/stack.cc b/src/Macro/stack.cc
new file mode 100644
index 0000000..bdfeb70
--- /dev/null
+++ b/src/Macro/stack.cc
@@ -0,0 +1,67 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#define STACK	250
+
+static Value stack[STACK+1];
+static int   top = 0;
+
+Value* Context::GetParameters(int count)
+{
+	if(top - count <0)
+	{
+		Error("Stack is empty (GetParameters)");
+		return &stack[0];
+	}
+	return &stack[top-count];
+}
+
+void Context::EmptyStack()
+{
+	for(int i=0;i<top;i++)
+		stack[i] = Value(0.0);
+}
+
+void Context::Push(Value v)
+{
+	if(top == STACK)
+		Error("Stack is full");
+	else
+		stack[top++] = v;
+}
+
+Value Context::Pop(void)
+{
+	if(top == 0) return Error("Stack is empty (pop)");
+	Value v = stack[--top];
+	stack[top] = Value(0.0);
+	return v;
+}
+
+class PStack : public Function {
+public:
+	PStack(char *n) : Function(n) {};
+	virtual Value Execute(int ,Value *)
+	{
+		for(int i=0;i<top;i++)
+			stack[i].Print();
+		return Value(0.0);
+	}
+};
+
+static void install(Context *c)
+{
+	c->AddFunction(new PStack("pstack"));
+}
+
+static Linkage Link(install);
+
+
+
diff --git a/src/Macro/value.cc b/src/Macro/value.cc
new file mode 100644
index 0000000..582330b
--- /dev/null
+++ b/src/Macro/value.cc
@@ -0,0 +1,682 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+#include "cbufr.h"
+#include "cnetcdf.h"
+#include "ctable.h"
+
+#ifdef METVIEW_ODB
+#include "codb.h"
+#endif
+
+#include <math.h>
+#include <ctype.h>
+#include <stdarg.h>
+
+static struct { vtype t;const char *n;} types[] =  {
+	{tnumber, "number",    },
+	{tstring, "string",    },
+	{tdate,   "date",      },
+	{tgrib,   "fieldset",  },
+	{tbufr,   "observations",},
+	{tmatrix, "matrix",    },
+	{tlist,   "list",      },
+	{trequest,"definition",},
+	{tfile,   "file",      },
+	{tdefered,"defered",   },
+	{terror,  "error",     },
+	{timage,  "image",     },
+	{tvector, "vector",    },
+	{tgeopts, "geopoints", },
+	{tvis5d,  "vis5d",     },
+	{tnetcdf, "netcdf",    },
+	{tobject, "object",    },
+	{tnil  ,  "nil",       },
+	{todb  ,  "odb",       },
+	{ttable,  "table",     },
+};
+//=============================================================================
+
+class SimpleNotify : public Notify {
+	char *module;
+	char *notify;
+	virtual void trigger(void*);
+public:
+	SimpleNotify(const char*,const char*);
+	~SimpleNotify();
+};
+
+SimpleNotify::SimpleNotify(const char *m,const char *n)
+{
+	module = strcache(m);
+	notify = strcache(n);
+}
+
+SimpleNotify::~SimpleNotify()
+{
+	strfree(module);
+	strfree(notify);
+}
+
+void SimpleNotify::trigger(void *data)
+{
+	Content *c = (Content*)data;
+
+	request *r = 0;
+	request *s = empty_request(notify);
+
+	c->ToRequest(r);
+
+	s->next = r;
+
+	Value v(module,s); // Notify module
+
+	s->next = 0;
+	free_all_requests(s);
+
+	delete this;
+}
+
+//=============================================================================
+
+int Content::Check(int fail,Value& v,int arity,Value* arg,vtype t,int cnt,...)
+{
+	int ok = 1;
+	const char *p;
+
+	if(arity != cnt)
+	{
+		if(fail)
+		Error("Wrong number of indices for a %s, number is %d and should be %d",
+			TypeName(),arity,cnt);
+		return 0;
+	}
+
+	if((v.GetType(&p) & t) == 0)
+	{
+		if(fail)
+		Error("Values of type '%s' cannot assigned to a %s element",
+			p,TypeName());
+		return 0;
+	}
+
+	va_list list;
+	va_start(list,cnt);
+
+	for(int i = 0 ; i< cnt; i++)
+	{
+		vtype t = va_arg(list,vtype);
+		if((arg[i].GetType(&p) & t) == 0)
+		{
+		if(fail)
+			Error("Values of type '%s' cannot be used as an index to a %s",
+				p,TypeName());
+			ok = 0;
+		}
+	}
+
+	va_end(list);
+	return ok;
+}
+
+int Content::CopyFile(const char *fname,FILE *to)
+{
+	FILE *from = fopen(fname,"r");
+	if(!from) return Error("-Cannot open file %s",fname);
+
+	int n;
+	char buf[10240];
+	while((n = fread(buf,1,sizeof(buf),from))>0)
+		fwrite(buf,1,n,to);
+
+	int e = ferror(from) || ferror(to);
+	fclose(from);
+	return e;
+}
+
+int Content::Error(const char *msg,...)
+{
+    va_list list;
+	char buf[1024];
+	va_start(list,msg);
+	vsprintf(buf, msg, list);
+	va_end(list);
+	if(Context::Current)
+		Context::Current->Error("%s",buf);
+	else
+		marslog(LOG_EROR|LOG_PERR,"%s",buf);
+	return -1;
+}
+
+int Content::Write(FILE*)
+{
+	return Error("Cannot write a %s",TypeName());
+}
+
+void Content::Fail(const char *s)
+{
+	if(isupper(*s))
+		Error("Oops... can't %s a %s",TypeName());
+	else
+		Error("Oops... can't convert %s to %s",TypeName(),s);
+}
+
+//=============================================================================
+
+InPool::InPool(vtype t,const char *n) : Content(t)
+{
+	iconName = strcache(n?n:Context::UniqueName());
+	isIcon   = false;
+}
+
+InPool::InPool(vtype t,request *r) : Content(t)
+{
+	iconName = strcache(get_value(r,"_NAME",0));
+	isIcon = true; // This comes from MetviewUI
+
+	if( iconName == 0)
+		iconName = strcache(Context::UniqueName());
+
+	// Check if we asked this data to be created
+	const char *p = get_value(r,"_CALLED_FROM_MACRO",0);
+	if(p) isIcon = boolean(!atoi(p));
+}
+
+InPool::~InPool()
+{
+	if(iconName && !isIcon)
+		ASync::IconStatus(iconName,"MODIFIED");
+	strfree(iconName);
+}
+
+//=============================================================================
+
+void CError::Print(void)
+{
+	cout << "<error: " << msg << ">";
+}
+
+void CError::ToRequest(request* &x)
+{
+	static request *s = 0;
+	if(!s) s = empty_request("ERROR");
+	set_value(s,"MESSAGE","%s",msg);
+	set_value(s,"CODE","%d",error);
+	x = s;
+}
+
+//=============================================================================
+svc *ASync::Svc       = 0;
+int ASync::RequestMax = 3;
+int ASync::RequestCnt = 0;
+char *ASync::Name     = 0;
+
+void ASync::Connect(void)
+{
+	if(Svc == 0)
+	{
+		Name = strcache(Context::UniqueName());
+		Svc = create_service(Name);
+		add_reply_callback  (Svc,0,        Reply,     0);
+		add_service_callback(Svc,"DEFINITION",Definition,0);
+		keep_alive(Svc,1); // Stay alive until macro dies
+//		add_progress_callback(Svc,0,Progress,0);
+	}
+}
+
+void ASync::Store(const char *name,request *r)
+{
+	Connect();
+	pool_store(Svc,name,"macro",r);
+}
+
+request *ASync::Fetch(const char *name)
+{
+	Connect();
+	return pool_fetch(Svc,name,"macro");
+}
+
+void ASync::IconStatus(const char *name,const char *status,const char *icon)
+{
+	Connect();
+	if(Svc)
+	{
+		static request *r = 0;
+		if(r == 0) r = empty_request("STATUS");
+		set_value(r,"NAME","%s",name);
+		set_value(r,"STATUS","%s",status);
+		if(icon)  set_value(r,"ICON_NAME","%s",icon);
+		send_message(Svc,r);
+	}
+}
+
+void ASync::Progress(svcid* id,request*,void*)
+{
+    int n = 0;
+	const char *p;
+
+	// marslog(LOG_INFO,"Progress from %s:", get_svc_target(id));
+	while((p = get_svc_msg(id,n++)))
+		marslog(LOG_INFO,"%s",p);
+
+}
+
+void ASync::Definition(svcid* id,request *s,void*)
+{
+	print_all_requests(s);
+	set_svc_err(id,1);
+	send_reply(id,0);
+}
+
+
+
+void ASync::Reply(svcid* id,request *s,void*)
+{
+	ASync *a = (ASync*)get_svc_ref(id);
+
+	RequestCnt--;
+
+	if(mars.debug)
+	{
+		printf("Got reply from %s\n",get_svc_target(id));
+		print_all_requests(s);
+	}
+
+	if(a)
+	{
+		err e;
+
+		if((e = get_svc_err(id)))
+		{
+			request *r = empty_request("ERROR");
+			const char *msg;
+			int n = 0;
+
+			set_value(r,"CODE","%d",e);
+
+			while((msg = get_svc_msg(id,n++)))
+				add_value(r,"MESSAGE","%s",msg);
+
+			a->SetRequest(r);
+
+			free_all_requests(r);
+		}
+		else
+		{
+			const char *p = get_value(s,"_NOTIFY",0);
+			if(p) set_value(s,"_FROM","%s",get_svc_target(id));
+			a->SetRequest(s);
+		}
+
+		a->Ready = true;
+		a->Detach();
+	}
+}
+
+request *ASync::Wait(void)
+{
+	if(!Ready && Context::Trace())
+		cout << "# Line " << Context::CurrentLine()
+			 << ": Waiting for asynchronious request" << endl;
+
+	while(!Ready && service_sync(Svc))
+		;
+
+	return GetRequest();
+}
+
+ASync::ASync(const char *n,request *s) : CRequest(s)
+{
+	Ready = false;
+	Connect();
+
+	while(RequestCnt >= RequestMax)
+	{
+		if(Context::Trace())
+			cout << "# Line " << Context::CurrentLine()
+					 << ": " << RequestCnt << " request" <<
+					 (RequestCnt>1?"s ":" ")
+					 << "out. Maximum is "<<RequestMax <<
+					 ", waiting..." << endl;
+		service_sync(Svc);
+	}
+
+	// add a line to tell the module which directory to run from
+	char cd[1024];
+	getcwd(cd, 1024);
+	set_value(s,"_CWD",cd);
+
+
+	if(mars.debug)
+	{
+		printf("Sending to %s\n",n);
+		print_all_requests(s);
+	}
+
+	if(!get_value(s,"_CALLED_FROM_MACRO",0))
+		set_value(s,"_CALLED_FROM_MACRO","1"); // Mark it as being  ours
+
+	RequestCnt++;
+	call_service(Svc,n,s,(long)this);
+	Attach(); // 1 for the ref in call_service
+}
+
+//=============================================================================
+
+Value::Value(const char *name,request *r)
+{
+	c = new ASync(name,r);
+	c->Attach();
+}
+
+Value::Value(const char *name,request *r,std::vector<Content *> attachedContent)
+{
+	c = new ASync(name,r);
+	c->Attach();
+	ASync *async = (ASync *)c;
+	async->SetAttachedContent(attachedContent);  // - see comments for attachedContent in value.h.
+}
+
+void Value::Copy(const Value& v)
+{
+	c = v.c; c->Attach();
+}
+
+void Value::SetContent(Content *x)
+{
+	Content *y = c;
+	c = x;
+	c->Attach();
+	y->Detach();
+}
+
+void ASync::Sync(Value *v)
+{
+	request *s = Wait();
+	Content *vc = v->GetContent();
+	vc->Attach();  // so we don't lose it in the next line
+	v->SetContent(s);
+
+
+	// check for consistency of field->gribfile pointers
+
+	AvoidDuplication(v->GetContent());
+
+
+	// detach any data which was an input to the computation for this variable
+	// (meaning in reality that we've called another module to do the computation
+	// and we now want to release the input data)
+	// - see comments for attachedContent in value.h.
+
+	for (vector<Value *>::size_type i = 0 ; i < attachedContent.size(); i++)
+	{
+		Content *c = attachedContent[i];
+		c->Detach();
+	}
+
+	vc->Detach();  // now we can delete it
+}
+
+void ASync::AvoidDuplication(Content *c)
+{
+
+	// A problem we can have with temporary files is that when we pass
+	// a GRIB to the READ module, both fieldsets (input, stored in the
+	// attached content, and output, the result of the command) will have
+	// different gribfile objects contained in their fieldsets, but both
+	// will point to the same file. This can be an issue when it comes to
+	// deleting temporary files because one fieldset can 'think' that it has
+	// finished with the gribfile when it is destroyed, and it will remove
+	// the file without realising that the other fieldset still needs it.
+	// If we want the reference counting to work properly, then we need
+	// to ensure that if two fieldsets use the same (temporary) GRIB file,
+	// then they should be using the same gribfile object. The problem
+	// comes from the fact that the result fieldset is constructed from
+	// a request, and knows nothing of other fieldsets or gribfiles.
+
+	if (c->GetType(NULL) == tgrib)
+	{
+		// loop through all the attached content and only consider GRIBs
+
+		for (vector<Value *>::size_type i = 0 ; i < attachedContent.size(); i++)
+		{
+			Content *a = attachedContent[i];
+
+			if ((a) && a->GetType(NULL) == tgrib)  // both are GRIB
+			{
+				CGrib *cg1 = (CGrib *)c;  // the returned data
+				CGrib *cg2 = (CGrib *)a;  // the attached (input) data
+
+				fieldset *fs1 = cg1->GetFieldset();
+				fieldset *fs2 = cg2->GetFieldset();
+
+				// loop through the fields to compare the gribfile members
+				// Since we're doing this mainly for the situation where we've
+				// passed a GRIB file to the GRIB Filter module, the result
+				// should be smaller (less fields) than the input, so we should
+				// loop on the result first (assuming that we are likely to
+				// find the corresponding gribfile quicky).
+
+				for (int i=0; i<fs1->count; i++)
+				{
+					field *f1 = fs1->fields[i];
+					gribfile *g1 = f1->file;
+
+					for (int j=0; j<fs2->count; j++)
+					{
+						gribfile *g2 = fs2->fields[j]->file;
+						if (!strcmp(g2->fname, g1->fname)) // point to the same physical file?
+						{
+							// point f1 to g2
+							g2->refcnt++;
+							g1->refcnt--;
+							f1->file = g2;
+							break;  // don't need to search fs1 any further
+						}
+					}
+				}
+
+			}	// both are GRIB
+
+		}	// for each attached content
+	}
+}
+
+
+void Value::CleanUp(void)
+{
+	c->Detach();
+}
+
+Value& Value::operator=(const Value& v)
+{
+	SetContent(v.c);
+	return *this;
+}
+
+Value::Value(const Value& v)
+{
+	Copy(v);
+}
+
+Value::~Value()
+{
+	CleanUp();
+}
+
+const char *Value::TypeName(vtype t)
+{
+	for(int i = 0;i<NUMBER(types);i++)
+		if(types[i].t == t)
+			return types[i].n;
+	return "unknown";
+}
+
+vtype Value::NameType(const char *n)
+{
+	if(n == 0) return tany;
+	for(int i = 0;i<NUMBER(types);i++)
+		if(strcmp(types[i].n,n) == 0)
+			return types[i].t;
+	return tnone;
+}
+
+void Value::SetContent(request *r)
+{
+	request *s = r;
+
+	if(r == 0)
+	{
+		SetContent(new CNil);
+		return;
+	}
+
+
+	if(strcmp(r->name,"ERROR") == 0)
+	{
+		int n = count_values(r,"MESSAGE");
+		for(int i=0 ; i<n ; i++)
+			Context::Current->Error("%s",get_value(r,"MESSAGE",i));
+		SetContent(new CError(1,get_value(r,"MESSAGE",0)));
+		return;
+	}
+
+	char *from   = strcache(get_value(r,"_FROM",  0));
+	char *notify = strcache(get_value(r,"_NOTIFY",0));
+
+	unset_value(r,"_NOTIFY");
+	unset_value(r,"_FROM");
+
+	int n = 0;
+	while(s) { s = s->next; n++;};
+
+	Content *c;
+	CList   *l = 0;
+
+	if( n != 1) l = new CList(n);
+
+	int i = 0;
+	while(r)
+	{
+
+		// If a requests returns more that once item
+		// then should all have a different name ...
+
+		if(n > 1) set_value(r,"_NAME","%s",Context::UniqueName());
+
+		s = r->next;
+		r->next = 0;
+
+		char *p = r->name;
+
+		if(p && strcasecmp(p,"GRIB")==0)
+			c = new CGrib(r);
+		else  if(p && strcasecmp(p,"BUFR")==0)
+			c = new CBufr(r);
+		else if(p && strcasecmp(p,"GEOPOINTS")==0)
+			c = new CGeopts(r);
+		else if(p && strcasecmp(p,"NETCDF")==0)
+			c = new CNetCDF(r);
+		else if(p && strcasecmp(p,"IMAGE")==0)
+			c = new CImage(r);
+		else if(p && strcasecmp(p,"NUMBER")==0)
+			c = new CNumber(atof(get_value(r,"VALUE",0)));
+		else if(p && strcasecmp(p,"STRING")==0)
+			c = new CString(get_value(r,"VALUE",0));
+		else if(p && strcasecmp(p,"VECTOR")==0)
+			c = new CVector(r);
+		else if(p && strcasecmp(p,"TABLE")==0)
+			c = new CTable(r);
+#ifdef METVIEW_ODB
+		else if(p && strcasecmp(p,"ODB_DB")==0)
+			c = new COdb(r);
+#endif
+		else if(p && (strcasecmp(p,"SCM_INPUT_DATA")==0 || strcasecmp(p,"SCM_OUTPUT_DATA")==0))
+			c = new CNetCDF(r);
+		else c = new CRequest(r);
+
+		r->next = s;
+		r       = s;
+
+		if(n != 1) (*l)[i++] = Value(c);
+	}
+
+	if(n != 1) c = l;
+
+
+	if(from && notify)
+		c->SetNotify(new SimpleNotify(from,notify));
+
+	strfree(from);
+	strfree(notify);
+
+	SetContent(c);
+}
+
+const char *Content::TypeName(void)
+{
+	return Value::TypeName(type);
+}
+
+void Content::Dump(int level)
+{
+	if(level == 1)
+		Dump1();
+	else
+		Dump2();
+}
+
+void Content::Perl(request* r)
+{
+
+	request   *s = r;
+	cout << "\n";
+	if(r->next) cout << "[\n";
+
+	while(s)
+	{
+		parameter *p = s->params;
+		cout << "bless({\n";
+		while(p)
+		{
+			if( *p->name != '_')
+			{
+				cout << p->name << " => ";
+
+
+				value *v = p->values;
+				if(v && v->next) cout << '[';
+				value *w = v;
+				int vflg = 0;
+
+				while(w)
+				{
+					if(vflg) cout << ',';
+					cout <<  "'" <<  w->name << "'" ;
+					vflg++;
+					w = w->next;
+				}
+
+				if(v && v->next) cout << ']';
+				cout << ",\n";
+			}
+			p = p->next;
+		}
+		cout << "}, 'metview::" << s->name << "'),\n";
+		s = s->next;
+	}
+	if(r->next) cout << "\n]";
+	cout << "\n";
+}
+
+void CNil::Dump2()
+{
+	cout << "undef";
+}
diff --git a/src/Macro/variable.cc b/src/Macro/variable.cc
new file mode 100644
index 0000000..917acce
--- /dev/null
+++ b/src/Macro/variable.cc
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+Variable::Variable(const char *n,Value v) : Node(n),value(v),export_(0),import_(0)
+{
+		
+}
+
+Variable::Variable(const char *n,Variable *v) : Node(n),export_(0),import_(v)
+{
+		
+}
+
+void Variable::SetValue(Value& v,int arity,Value* args)
+{
+	if(import_) 
+		import_->SetValue(v,arity,args);
+	else {
+		// If a[1,2] = b
+		if(arity)
+			value.SetSubValue(v,arity,args);
+		else
+		{
+			value = v; 
+		}
+	}
+}
+
+Value& Variable::GetValue(void)
+{
+	if(import_)
+		return import_->GetValue();
+	else
+	{
+		value.Sync();  // Force to synchronise
+		return value; 
+	}
+}
+
+void Variable::Dump(int level)
+{
+	if(import_)
+		import_->Dump(level);
+	else
+	{
+		cout << Name() << " = ";
+		value.Dump(level);
+	}
+}
diff --git a/src/Macro/vis5d.cc b/src/Macro/vis5d.cc
new file mode 100644
index 0000000..fd5563d
--- /dev/null
+++ b/src/Macro/vis5d.cc
@@ -0,0 +1,281 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+class Vis5D {
+public:
+
+	Value name;
+	Value date;
+	Value level;
+	Value grib;
+
+	Vis5D* next;
+
+	Vis5D(Value& n,Value& d,Value& l,Value& g,Vis5D* x):
+		name(n),date(d),level(l),grib(g),next(x) {}
+
+	~Vis5D() { delete next; }
+
+	Vis5D* Clone() { return new Vis5D(name,date,level,grib,next?next->Clone():0); }
+
+	void Append(Vis5D* v) {
+		Vis5D* x = this;
+		Vis5D* p = NULL;
+		while(x)
+		{
+			p = x;
+			x = x->next;
+		}
+		p->next = v;
+
+	}
+
+private:
+	Vis5D(const Vis5D&);
+	Vis5D operator=(const Vis5D&);
+};
+
+CVis5D::CVis5D(Vis5D* v) : Content(tvis5d), vis5d(v)
+{
+}
+
+void CVis5D::CleanUp()
+{
+	delete vis5d;
+	vis5d = 0;
+}
+
+void CVis5D::Copy(const CVis5D& v)
+{
+	vis5d = v.vis5d?v.vis5d->Clone():0;
+}
+
+void CVis5D::Dump(int)
+{
+	cout << "<vis5d>";
+}
+
+void CVis5D::Print(void)
+{
+	cout << "vis5d";
+}
+
+void CVis5D::SetSubValue(Value& v,int arity,Value *arg)
+{
+	if(!Check(1,v,arity,arg,tgrib,3,tstring,tdate,tnumber))
+		return;
+
+
+	fieldset *f;
+	v.GetValue(f);
+	if(f->count != 1)
+	{
+		Error("Only one grib at a time can be added to a vis5d object");
+		return;
+	}
+
+
+	vis5d = new Vis5D(arg[0],arg[1],arg[2],v,vis5d);
+}
+
+void CVis5D::ToRequest(request*& r)
+{
+	r          = empty_request("vis5d");
+	request *d = NULL;
+	request *z = NULL;
+	Vis5D*   v = vis5d;
+	while(v)
+	{
+		const char *p;
+
+		v->date.GetValue(p);  add_value(r,"DATE","%s",p);
+		v->level.GetValue(p); add_value(r,"LEVEL","%s",p);
+		v->name.GetValue(p);  add_value(r,"NAME","%s",p);
+		
+		request *g = NULL;
+		v->grib.GetValue(g);
+
+		g  = clone_all_requests(g);
+
+		if(z) z->next = g; else d = g;
+		z  = g;
+
+		v = v->next;
+	}
+
+	set_subrequest(r,"DATA",d);
+}
+
+//=============================================================================
+
+
+class Vis5DMergeFunction : public Function {
+public:
+	Vis5DMergeFunction(char *n) : Function(n) 
+		{info = "Merge 2 vis5d";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+Value Vis5DMergeFunction::Execute(int arity,Value *arg)
+{
+	Vis5D *v = NULL;
+	for(int i = arity-1; i > 0; i--)
+	{
+		CVis5D *w;
+		arg[i].GetValue(w);	
+		Vis5D *k = w->GetVis5D();
+
+		if(v == NULL)
+			v = k?k->Clone():0;
+		else if(k)
+			v->Append(k->Clone());
+	}
+
+	return Value(new CVis5D(v));
+}
+
+int Vis5DMergeFunction::ValidArguments(int arity,Value *arg)
+{
+	for(int i = 0; i< arity; i++)
+		if(arg[i].GetType() != tvis5d)
+			return false;
+	return true;
+}
+
+//=============================================================================
+
+
+class Vis5DWriteFunction : public Function {
+public:
+	Vis5DWriteFunction(char *n) : Function(n,2,tstring,tvis5d) 
+		{info = "writes a vis5d";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value Vis5DWriteFunction::Execute(int arity,Value *arg)
+{
+	const char *p;
+	request *r;
+
+	arg[0].GetValue(p);
+	arg[1].GetValue(r);
+	set_value(r,"PATH","%s",p);
+	set_value(r,"_ACTION","save");
+	
+    Value v("Vis5D",r);
+	free_all_requests(r);
+	return v;
+}
+
+//=============================================================================
+
+
+class Vis5DFunction1 : public Function {
+public:
+	Vis5DFunction1(char *n) : Function(n,0) 
+		{info = "Builds an empty vis5d matrix";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+
+Value Vis5DFunction1::Execute(int ,Value *arg)
+{
+	return Value(new CVis5D(0));
+}
+
+class Vis5DFunction2 : public Function {
+public:
+	Vis5DFunction2(char *n) : Function(n,4,tlist,tlist,tlist,tgrib) 
+		{info = "Builds an empty vis5d matrix";};
+	virtual Value Execute(int arity,Value *arg);
+	virtual int ValidArguments(int arity,Value *arg);
+};
+
+
+Value Vis5DFunction2::Execute(int ,Value *arg)
+{
+	int i;
+
+	CList *names,*dates,*levels;
+
+	arg[0].GetValue(names);
+	arg[1].GetValue(dates);
+	arg[2].GetValue(levels);
+
+	fieldset *grib;
+	arg[3].GetValue(grib);
+
+	int count = grib->count;
+
+	Vis5D* v = 0;
+
+	for(i = count-1; i >= 0 ; i--)
+	{
+		int ni = names->Count() == 1 ? 0 : i;
+		int di = dates->Count() == 1 ? 0 : i;
+		int li = levels->Count() == 1 ? 0 : i;
+		Value g(sub_fieldset(grib,i+1,i+1,1));
+		v = new Vis5D(	(*names)[ni], (*dates)[di], (*levels)[li] , g, v);
+	}
+
+	return Value(new CVis5D(v));
+}
+
+int Vis5DFunction2::ValidArguments(int arity,Value *arg)
+{
+	int i;
+
+	if(!Function::ValidArguments(arity,arg))
+		return false;
+
+	CList *names,*dates,*levels;
+
+	arg[0].GetValue(names);
+	arg[1].GetValue(dates);
+	arg[2].GetValue(levels);
+
+	fieldset *grib;
+	arg[3].GetValue(grib);
+
+	for(i = 0; i< names->Count(); i++)
+		if((*names)[i].GetType() != tstring)
+			return false;
+		
+	for(i = 0; i< dates->Count(); i++)
+		if((*dates)[i].GetType() != tdate)
+			return false;
+
+	for(i = 0; i< levels->Count(); i++)
+		if((*levels)[i].GetType() != tnumber)
+			return false;
+
+	int count = grib->count;
+	if(names->Count() != 1 && names->Count() != count) return false;
+	if(dates->Count() != 1 && dates->Count() != count) return false;
+	if(levels->Count() != 1 && levels->Count() != count) return false;
+
+	return true;
+}
+
+static void install(Context *c)
+{
+	c->AddFunction(new Vis5DFunction1("vis5d"));
+	c->AddFunction(new Vis5DFunction2("vis5d"));
+	c->AddFunction(new Vis5DMergeFunction("merge"));
+	c->AddFunction(new Vis5DMergeFunction("&"));
+	c->AddFunction(new Vis5DWriteFunction("write"));
+}
+
+static Linkage linkage(install);
+
diff --git a/src/Macro/vismod.cc b/src/Macro/vismod.cc
new file mode 100644
index 0000000..961815c
--- /dev/null
+++ b/src/Macro/vismod.cc
@@ -0,0 +1,112 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "macro.h"
+
+//=============================================================================
+
+static Value   reply = 0.0;
+static boolean ready = false;
+
+
+
+static void info_cb(svcid* id,request* r,void* data)
+{
+
+	char *p = (char*)data;
+	print_all_requests(r);
+	ready = true;
+
+	request *e = empty_request("STRING");
+	set_value(e,"VALUE","%s",p);
+
+
+	e->next = r->next;
+	reply.SetContent(e);
+
+	e->next = 0;
+	free_all_requests(e);
+
+	send_reply(id,0);
+}
+
+static void close_cb(svcid* id,request* r,void*)
+{
+	print_all_requests(r);
+	ready = true;
+	reply = Value(); // Nil
+	send_reply(id,0);
+}
+
+//=============================================================================
+
+class InputFunction : public Function {
+public:
+	InputFunction(char *n) : Function(n,1,trequest)
+	{info = "Wait for user input";};
+	virtual Value Execute(int arity,Value *arg);
+};
+
+Value InputFunction::Execute(int,Value *arg)
+{
+	static int first = 1;
+	if(first)
+	{
+		ASync::Connect();
+		add_service_callback(ASync::Svc,"WINDOW_INFO",   info_cb, (void*)"input");
+		add_service_callback(ASync::Svc,"CHANGE_WINDOW", info_cb, (void*)"change");
+		//add_service_callback(ASync::Svc,"MOVE_CURSOR",   info_cb,0);
+		//add_service_callback(ASync::Svc,"CONTENTS",      info_cb,0);
+		add_service_callback(ASync::Svc,"CLOSE_WINDOW",  close_cb,0);
+		first = 0;
+	}
+
+	request *r;
+	arg[0].GetValue(r);
+
+	const char *id = get_value(r,"VISTOOL_ID",0);
+
+	if(id == 0)
+	{
+
+		request *e = empty_request("REGISTER");
+
+
+		set_value(e,"SERVICE","%s",ASync::Name);
+		set_subrequest(e,"WINDOW",r);
+
+		add_value(e,"interest","POSITION");
+		add_value(e,"interest","MOVE_CURSOR");
+		add_value(e,"interest","CHANGE_WINDOW");
+		add_value(e,"interest","CONTENTS"); 
+		add_value(e,"interest","CLOSE_WINDOW");
+		Value v = Value("VisModTrans",e);
+		free_all_requests(e);
+		v.Sync();
+
+		set_value(r,"VISTOOL_ID","%s",id);
+	}
+
+
+	while(!ready)
+		process_service(ASync::Svc);
+
+	ready = false;
+	return reply;
+
+}
+
+//=============================================================================
+static void install(Context *c)
+{
+	c->AddFunction(new InputFunction("input"));
+}
+
+static Linkage Link(install);
+
diff --git a/src/MacroEditor/CodeTemplateDialog.cc b/src/MacroEditor/CodeTemplateDialog.cc
new file mode 100644
index 0000000..6d7c62a
--- /dev/null
+++ b/src/MacroEditor/CodeTemplateDialog.cc
@@ -0,0 +1,177 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "CodeTemplateDialog.h"
+
+
+CodeTemplateDialog::CodeTemplateDialog(QString &templateListFilePath, QWidget *parent) : QDialog(parent)
+{
+
+    setupUi(this); // this sets up GUI
+
+
+    QPushButton *insertButton = new QPushButton(tr("&Insert Template"));
+    insertButton->setDefault(true);
+    buttonBox->addButton(insertButton, QDialogButtonBox::ActionRole);
+
+
+    connect (insertButton, SIGNAL(clicked()), this, SLOT(onInsertButtonClicked()));
+
+
+
+    // store the file path
+
+    templateListFilePath_ = templateListFilePath;
+}
+
+
+void CodeTemplateDialog::reloadCodeTemplates (TabsSettings &tabSettings)
+{
+
+    // load the template list
+
+    QFile file(templateListFilePath_);
+
+    if (file.open(QFile::ReadOnly | QFile::Text))  // try to open in read-only mode
+    {
+        int index = 0;
+        QString body = "";
+        QTextStream in(&file);
+        QString spaces = "";
+
+
+        // reset our list of code bodies
+
+        templateCodeBodies_.clear();
+        templateListWidget->clear();
+        previewPlainTextEdit->clear();
+
+
+        // does the user like spaces instead of tabs? If so, get ready to replace tabs with spaces
+
+        if (tabSettings.useSpacesForTabs)
+        {
+            spaces.fill(' ', tabSettings.numSpacesInTab);
+        }
+
+
+
+        while (!file.atEnd())   // each line in the file is a function name to add to the list
+        {
+            QListWidgetItem *item;
+            QString s = file.readLine();
+
+            // is this the heading of a new template?
+            
+            if (s.startsWith("{") && s.endsWith("}\n"))
+            {
+                // add the previous template body to our list?
+                if (index > 0)
+                {
+                    templateCodeBodies_.append(body);
+                    body = "";
+                }
+                
+                QString title = s.mid(1, s.count() - 3);  // remove the curly brackets and the newline
+                item = new QListWidgetItem(title, templateListWidget);  // create a new item for the tree
+                item->setData(Qt::UserRole, index);  // set the index
+                index++;
+            }
+            
+            else
+            {
+                QString bodyline = s;
+                
+                if (tabSettings.useSpacesForTabs)
+                {
+                    bodyline.replace("\t", spaces);
+                }
+                body.append(bodyline);
+            }
+        }
+
+
+        // add the last template body to our list?
+
+        if (index > 0)
+        {
+            templateCodeBodies_.append(body);
+            body = "";
+        }
+    }
+    
+    else
+    {
+        // could not load the function list file
+
+        QMessageBox::warning(this, tr("Template List"),
+                             tr("Cannot read file %1:\n%2.")
+                             .arg(templateListFilePath_)
+                             .arg(file.errorString()));
+    }
+
+
+    // set up a fixed-pitch font for the preview pane
+    QFont font;
+    font.setFamily("Courier Std");
+    font.setFixedPitch(true);
+    //font.setPointSize(newSize);
+    previewPlainTextEdit-> setFont(font);
+    QFontMetrics fm(font);
+    previewPlainTextEdit-> setTabStopWidth(fm.width(QLatin1Char(' ')) *tabSettings.numSpacesInTab);
+
+    previewPlainTextEdit->setLineWrapMode (QPlainTextEdit::NoWrap);  // we don't allow line wrapping
+
+
+
+
+    // set up the signal/slot connections
+
+    //connect (insertButton, SIGNAL(clicked()), this, SLOT(onInsertButtonClicked()));
+    //connect (treeWidget,   SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(onItemDoubleClicked(QTreeWidgetItem*, int)));
+    connect (templateListWidget,   SIGNAL(currentItemChanged (QListWidgetItem*, QListWidgetItem*)), this, SLOT(onItemChanged(QListWidgetItem*, QListWidgetItem*)));
+
+}
+
+
+
+
+
+// ---------------------------------------------------------------------------
+// CodeTemplateDialog::onItemChanged
+// triggered when the selected item is changed
+// ---------------------------------------------------------------------------
+
+void CodeTemplateDialog::onItemChanged(QListWidgetItem *item, QListWidgetItem *previous)
+{
+//    emit insertFunctionName (item->text(0)); // emit a signal with the function name
+//    close();
+    if (item != NULL)
+    {
+        int index =  item->data(Qt::UserRole).toInt();
+        previewPlainTextEdit->clear();
+        previewPlainTextEdit->insertPlainText(templateCodeBodies_.at(index));
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// CodeTemplateDialog::onInsertButtonClicked
+// triggered when the user clicks the Insert button
+// ---------------------------------------------------------------------------
+
+void CodeTemplateDialog::onInsertButtonClicked()
+{
+    emit insertCodeTemplate (previewPlainTextEdit->toPlainText ()); // emit a signal with the code template
+    close();
+}
+
diff --git a/src/MacroEditor/CodeTemplateDialog.h b/src/MacroEditor/CodeTemplateDialog.h
new file mode 100644
index 0000000..7b57ea0
--- /dev/null
+++ b/src/MacroEditor/CodeTemplateDialog.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef CodeTemplateDialog_H
+#define CodeTemplateDialog_H
+
+
+#include <vector>
+#include <map>
+using namespace std;
+
+
+#include "CodeTemplateDialog.ui.h"
+#include "CodeTemplateDialog.h"
+#include "TabsSettings.h"
+
+
+
+
+// VerbFunctionHelpDialog
+// the dialog class itself 
+
+class CodeTemplateDialog : public QDialog, private Ui::CodeTemplateDialog
+{
+    Q_OBJECT
+
+public:
+    CodeTemplateDialog(QString &templateListFilePath, QWidget *parent = 0);
+    ~CodeTemplateDialog(){};
+
+    void reloadCodeTemplates ( TabsSettings &tabSettings);
+
+
+signals:
+    void insertCodeTemplate (QString code);
+
+
+public slots:
+    void onItemChanged   (QListWidgetItem *item, QListWidgetItem *previous);
+    void onInsertButtonClicked ();
+
+
+private:
+    QString     templateListFilePath_;
+    QStringList templateCodeBodies_;
+
+};
+
+
+
+#endif
+
diff --git a/src/MacroEditor/CodeTemplateDialog.ui b/src/MacroEditor/CodeTemplateDialog.ui
new file mode 100644
index 0000000..d5b9457
--- /dev/null
+++ b/src/MacroEditor/CodeTemplateDialog.ui
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CodeTemplateDialog</class>
+ <widget class="QDialog" name="CodeTemplateDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>637</width>
+    <height>462</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Insert Code Template</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
+    <widget class="QLabel" name="noteLabel">
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>16</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>Note: the tabs in the code templates will follow the settings you specify in the Tab Settings dialog.</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QSplitter" name="splitter">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <widget class="QWidget" name="layoutWidget">
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QLabel" name="templatesLabel">
+         <property name="text">
+          <string>Templates</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QListWidget" name="templateListWidget"/>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="layoutWidget">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QLabel" name="previewLabel">
+         <property name="text">
+          <string>Preview</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPlainTextEdit" name="previewPlainTextEdit">
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>CodeTemplateDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>CodeTemplateDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/MacroEditor/FindTextDialog.cc b/src/MacroEditor/FindTextDialog.cc
new file mode 100644
index 0000000..ee3af33
--- /dev/null
+++ b/src/MacroEditor/FindTextDialog.cc
@@ -0,0 +1,199 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "FindTextDialog.h"
+
+
+FindTextDialog::FindTextDialog(QWidget *parent)
+     : QDialog(parent)
+{
+       //setAttribute(Qt::WA_DeleteOnClose);
+    
+    setupUi(this); // this sets up GUI// setupFileMenu();
+    findComboBox->setInsertPolicy (QComboBox::InsertAtTop);
+    hasPerformedFind_ = false;
+
+    connect (findButton,                  SIGNAL(clicked()),                        this, SLOT(accept()));
+    connect (replaceButton,               SIGNAL(clicked()),                        this, SLOT(onReplaceButtonClicked()));
+    connect (replaceAllInSelectionButton, SIGNAL(clicked()),                        this, SLOT(onReplaceSelectedButtonClicked()));
+    connect (replaceAllInFileButton,      SIGNAL(clicked()),                        this, SLOT(onReplaceAllButtonClicked()));
+    connect (buttonBox,                   SIGNAL(rejected()),                       this, SLOT(reject()));
+    connect (findComboBox,                SIGNAL(editTextChanged(const QString &)), this, SLOT(setFindButtonStatus()));
+
+}
+
+FindTextDialog::~FindTextDialog()
+{
+
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::isBackwards
+// tells whether the user has the 'Find backwards' box checked
+// ---------------------------------------------------------------------------
+
+bool FindTextDialog::isBackwards()
+{
+    return checkBox_backward->isChecked();
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::findFlags
+// returns the 'find flags' as selected by the user
+// ---------------------------------------------------------------------------
+
+QTextDocument::FindFlags FindTextDialog::findFlags()
+{
+    QTextDocument::FindFlags flags;
+
+    if(checkBox_backward->checkState() == Qt::Checked)
+    {
+        flags = QTextDocument::FindBackward;
+    }
+    if(checkBox_case->checkState() == Qt::Checked) 
+    {
+        flags = flags | QTextDocument::FindCaseSensitively;
+    }
+    if(checkBox_word->checkState() == Qt::Checked)
+    {
+        flags = flags | QTextDocument::FindWholeWords;
+    }
+
+    return flags;
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::accept
+// called when the user clicks the 'Find' button - sets some flags and
+// emits a signal to tell the text editor to search for the text.
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::accept()
+{
+    emit find(findComboBox->currentText(), findFlags());
+
+    hasPerformedFind_ = true;    
+}
+
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::setFindButtonStatus
+// if there is text in the 'find' box, then we can activate the 'Find' button,
+// otherwise we should disable it. This function is called each time the text
+// in the box is changed.
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::setFindButtonStatus()
+{
+    if (findComboBox->currentText().isEmpty())
+    {
+        findButton->setEnabled(false);
+    }
+    else
+    {
+        findButton->setEnabled(true);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::onReplaceButtonClicked
+// triggered when the 'Replace Once' button is clicked
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::onReplaceButtonClicked()
+{
+    emit replace(findComboBox->currentText(), replaceComboBox->currentText(), findFlags());
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::onReplaceSelectedButtonClicked
+// triggered when the 'Replace all in selection' button is clicked
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::onReplaceSelectedButtonClicked()
+{
+    emit replaceInSelected(findComboBox->currentText(), replaceComboBox->currentText(), findFlags());
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::onReplaceAllButtonClicked
+// triggered when the 'Replace all in file' button is clicked
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::onReplaceAllButtonClicked()
+{
+    emit replaceAll(findComboBox->currentText(), replaceComboBox->currentText(), findFlags());
+}
+
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::setupUIBeforeShow
+// sets up UI elements before the dialog is displayed.
+//   findText:�string - if not empty, then it will be set as the current
+//                      search string
+//  showReplaceOptions: bool - says whether to include the 'replace' controls
+//                             in the dialog
+//  isSelection: bool - says whether there is selected text in the document
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::setupUIBeforeShow(const QString &findText, bool showReplaceOptions, bool isSelection)
+{
+    findComboBox->setFocus(Qt::OtherFocusReason);
+    findButton->setDefault(true);
+    
+    setFindButtonStatus();
+
+    if (!findText.isEmpty())
+    {
+        findComboBox->addItem(findText);
+        findComboBox->setCurrentIndex(findComboBox->count()-1);
+    }
+
+    replaceButton       ->setVisible (showReplaceOptions);
+    replaceLabel        ->setVisible (showReplaceOptions);
+    replaceComboBox     ->setVisible (showReplaceOptions);
+    replaceAllInGroupBox->setVisible (showReplaceOptions);
+
+    replaceAllInSelectionButton->setEnabled (showReplaceOptions && isSelection);
+    
+
+/*    if (showReplaceOptions)
+    {
+        replaceAllInGroupBox->setSize(replaceAllInGroupBox->sizeHint());
+//        replaceAllInGroupBox->setMinimumSize(replaceAllInGroupBox->sizeHint());
+    }
+    else
+    {
+        replaceAllInGroupBox->setSize(0, 0);
+//        replaceAllInGroupBox->setMinimumSize(0, 0);
+    } 
+
+    resize(sizeHint()); */
+}
+
+
+// ---------------------------------------------------------------------------
+// FindTextDialog::repeatLastFind
+// repeats the last-executed 'find' operation
+// ---------------------------------------------------------------------------
+
+void FindTextDialog::repeatLastFind()
+{
+    accept(); // just do the same as when the user clicks the 'Find' button
+}
diff --git a/src/MacroEditor/FindTextDialog.h b/src/MacroEditor/FindTextDialog.h
new file mode 100644
index 0000000..8aaddf4
--- /dev/null
+++ b/src/MacroEditor/FindTextDialog.h
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FindTextDialog_H
+#define FindTextDialog_H
+
+#include <QTextDocument>
+
+#include <iostream>
+#include "FindTextDialog.ui.h"
+
+using namespace std;
+
+
+class FindTextDialog : public QDialog, private Ui::Dialog
+{
+    Q_OBJECT
+
+public:
+    FindTextDialog(QWidget *parent = 0);
+    ~FindTextDialog();
+    
+    void setupUIBeforeShow(const QString &findText, bool showReplaceOptions, bool isSelection);
+    bool isBackwards();
+    bool hasPerformedFind() {return hasPerformedFind_;}
+    void repeatLastFind();
+
+signals:    
+    void find    (const QString &,QTextDocument::FindFlags);                 // emitted when the user clicks 'find'
+    void replace (const QString &,const QString &,QTextDocument::FindFlags); // emitted when the user clicks 'replace'
+    void replaceInSelected (const QString &,const QString &,QTextDocument::FindFlags); // emitted when the user clicks 'replace all in selected'
+    void replaceAll (const QString &,const QString &,QTextDocument::FindFlags); // emitted when the user clicks 'replace all in file'
+    void closed  ();                                                         // emitted when the dialog is closed
+  
+public slots:
+    void accept();
+    void setFindButtonStatus();
+    void onReplaceButtonClicked();
+    void onReplaceSelectedButtonClicked();
+    void onReplaceAllButtonClicked();
+
+
+private:
+    bool hasPerformedFind_;
+    QTextDocument::FindFlags findFlags();
+
+};
+
+#endif
diff --git a/src/MacroEditor/FindTextDialog.ui b/src/MacroEditor/FindTextDialog.ui
new file mode 100644
index 0000000..776d04d
--- /dev/null
+++ b/src/MacroEditor/FindTextDialog.ui
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>345</width>
+    <height>276</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>338</width>
+    <height>175</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Find Text</string>
+  </property>
+  <layout class="QVBoxLayout">
+   <item>
+    <layout class="QVBoxLayout">
+     <item>
+      <layout class="QVBoxLayout">
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>String to &Find</string>
+         </property>
+         <property name="buddy">
+          <cstring>findComboBox</cstring>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QComboBox" name="findComboBox">
+         <property name="editable">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="replaceLabel">
+         <property name="text">
+          <string>Replace &with</string>
+         </property>
+         <property name="buddy">
+          <cstring>replaceComboBox</cstring>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QComboBox" name="replaceComboBox">
+         <property name="editable">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QCheckBox" name="checkBox_case">
+           <property name="text">
+            <string>&Case Sensitive</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="checkBox_backward">
+           <property name="text">
+            <string>Find &Backward</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QCheckBox" name="checkBox_word">
+           <property name="text">
+            <string>Wh&ole Words</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>66</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="replaceAllInGroupBox">
+       <property name="title">
+        <string>Replace all in</string>
+       </property>
+       <layout class="QHBoxLayout" name="horizontalLayout_5">
+        <item>
+         <widget class="QPushButton" name="replaceAllInFileButton">
+          <property name="text">
+           <string>F&ile</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="replaceAllInSelectionButton">
+          <property name="text">
+           <string>&Selection</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_3">
+       <item>
+        <widget class="QPushButton" name="findButton">
+         <property name="text">
+          <string>&Find Next</string>
+         </property>
+         <property name="default">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="replaceButton">
+         <property name="text">
+          <string>&Replace Next</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QDialogButtonBox" name="buttonBox">
+         <property name="standardButtons">
+          <set>QDialogButtonBox::Close</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/MacroEditor/FunctionListDialog.cc b/src/MacroEditor/FunctionListDialog.cc
new file mode 100644
index 0000000..c5a1ae8
--- /dev/null
+++ b/src/MacroEditor/FunctionListDialog.cc
@@ -0,0 +1,122 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "FunctionListDialog.h"
+
+
+FunctionListDialog::FunctionListDialog(QString &functionListFilePath, QWidget *parent) : QDialog(parent)
+{
+    setupUi(this); // this sets up GUI// setupFileMenu();
+
+
+    // load the fucntion list
+
+    QFile file(functionListFilePath);
+
+    if (file.open(QFile::ReadOnly | QFile::Text))  // try to open in read-only mode
+    {
+        QTextStream in(&file);
+
+        while (!file.atEnd())   // each line in the file is a function name to add to the list
+        {
+            QTreeWidgetItem *item;
+            QString s = file.readLine();
+            s = s.trimmed();  // note: the Qt docs say that trimmed() should not be necessary, but it is!
+
+            item = new QTreeWidgetItem(treeWidget);  // create a new item for the tree
+            item->setText (0, s);                    // set its label
+        }
+
+        treeWidget->sortItems(0, Qt::AscendingOrder);  // items should start alphabetically sorted (a->z)
+    }
+    
+    else
+    {
+        // could not load the function list file
+
+        QMessageBox::warning(this, tr("Function List"),
+                             tr("Cannot read file %1:\n%2.")
+                             .arg(functionListFilePath)
+                             .arg(file.errorString()));
+    }
+
+
+    // set up the signal/slot connections
+
+    connect (insertButton, SIGNAL(clicked()), this, SLOT(onInsertButtonClicked()));
+    connect (treeWidget,   SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(onItemDoubleClicked(QTreeWidgetItem*, int)));
+}
+
+
+FunctionListDialog::~FunctionListDialog()
+{
+
+}
+
+
+
+// ---------------------------------------------------------------------------
+// FunctionListDialog::setupUIBeforeShow
+// sets up UI elements before the dialog is displayed.
+// ---------------------------------------------------------------------------
+
+void FunctionListDialog::setupUIBeforeShow ()
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// FunctionListDialog::setFont
+// sets the font used in the selection box
+// ---------------------------------------------------------------------------
+
+void FunctionListDialog::setFont(const QFont &font)
+{
+    treeWidget->setFont(font);
+    insertButton->setFont(font);
+    buttonBox->setFont(font);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// FunctionListDialog::onItemDoubleClicked
+// triggered when the user double-clicks on an item
+// ---------------------------------------------------------------------------
+
+void FunctionListDialog::onItemDoubleClicked(QTreeWidgetItem *item, int)
+{
+    emit insertFunctionName (item->text(0)); // emit a signal with the function name
+    close();
+}
+
+
+
+// ---------------------------------------------------------------------------
+// FunctionListDialog::onInsertButtonClicked
+// triggered when the user clicks the Insert button
+// ---------------------------------------------------------------------------
+
+void FunctionListDialog::onInsertButtonClicked()
+{
+    // which row is selected?
+
+    QList<QTreeWidgetItem  *> selectedItems = treeWidget->selectedItems();
+
+    if (selectedItems.size() > 0)
+    {
+        QTreeWidgetItem *item = selectedItems[0];
+        emit insertFunctionName (item->text(0)); // emit a signal with the function name
+        close();
+    }
+}
+
+
diff --git a/src/MacroEditor/FunctionListDialog.h b/src/MacroEditor/FunctionListDialog.h
new file mode 100644
index 0000000..1506fb4
--- /dev/null
+++ b/src/MacroEditor/FunctionListDialog.h
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FunctionListDialog_H
+#define FunctionListDialog_H
+
+#include "FunctionListDialog.ui.h"
+
+
+class FunctionListDialog : public QDialog, private Ui::FunctionListDialog
+{
+    Q_OBJECT
+
+public:
+    FunctionListDialog(QString &functionListFilePath, QWidget *parent = 0);
+    ~FunctionListDialog();
+    void setupUIBeforeShow();
+    void setFont(const QFont &font);
+
+signals:
+    void insertFunctionName (QString name);
+
+public slots:
+    void onItemDoubleClicked   (QTreeWidgetItem *item, int column);
+    void onInsertButtonClicked ();
+
+};
+
+#endif
diff --git a/src/MacroEditor/FunctionListDialog.ui b/src/MacroEditor/FunctionListDialog.ui
new file mode 100644
index 0000000..94d36cb
--- /dev/null
+++ b/src/MacroEditor/FunctionListDialog.ui
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FunctionListDialog</class>
+ <widget class="QDialog" name="FunctionListDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Function List</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QTreeWidget" name="treeWidget">
+       <property name="indentation">
+        <number>0</number>
+       </property>
+       <property name="sortingEnabled">
+        <bool>true</bool>
+       </property>
+       <column>
+        <property name="text">
+         <string>Function</string>
+        </property>
+       </column>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QPushButton" name="insertButton">
+         <property name="text">
+          <string>Insert</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QDialogButtonBox" name="buttonBox">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="standardButtons">
+          <set>QDialogButtonBox::Cancel</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>FunctionListDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>FunctionListDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/MacroEditor/GotoLineDialog.cc b/src/MacroEditor/GotoLineDialog.cc
new file mode 100644
index 0000000..faef658
--- /dev/null
+++ b/src/MacroEditor/GotoLineDialog.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "GotoLineDialog.h"
+
+
+GotoLineDialog::GotoLineDialog(QWidget *parent) : QDialog(parent)
+{
+    setupUi(this); // this sets up GUI// setupFileMenu();
+
+
+    connect (buttonBox, SIGNAL(accepted()),                   this, SLOT(done()));
+    connect (buttonBox, SIGNAL(rejected()),                   this, SLOT(reject()));
+    connect (lineEdit,  SIGNAL(textChanged(const QString &)), this, SLOT(setButtonStatus()));
+}
+
+
+GotoLineDialog::~GotoLineDialog()
+{
+
+}
+
+
+// ---------------------------------------------------------------------------
+// GotoLineDialog::setButtonStatus
+// if there is text in the input box, then we can activate the 'OK' button,
+// otherwise we should disable it. This function is called each time the text
+// in the box is changed.
+// ---------------------------------------------------------------------------
+
+void GotoLineDialog::setButtonStatus()
+{
+    QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
+
+    if (lineEdit->text().isEmpty())
+    {
+        okButton->setEnabled(false);
+    }
+    else
+    {
+        okButton->setEnabled(true);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// GotoLineDialog::setupUIBeforeShow
+// sets up UI elements before the dialog is displayed.
+// ---------------------------------------------------------------------------
+
+void GotoLineDialog::setupUIBeforeShow()
+{
+    lineEdit->setFocus(Qt::OtherFocusReason);
+    buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
+    
+    setButtonStatus();
+}
+
+
+// ---------------------------------------------------------------------------
+// GotoLineDialog::accept
+// called when the user clicks the 'OK' button - emits a signal to tell the
+// text editor to go to the chosen line
+// ---------------------------------------------------------------------------
+
+void GotoLineDialog::done()
+{
+    int line = lineEdit->text().toInt();
+    emit gotoLine(line);
+    close();
+}
diff --git a/src/MacroEditor/GotoLineDialog.h b/src/MacroEditor/GotoLineDialog.h
new file mode 100644
index 0000000..826037f
--- /dev/null
+++ b/src/MacroEditor/GotoLineDialog.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GotoLineDialog_H
+#define GotoLineDialog_H
+
+#include "GotoLineDialog.ui.h"
+
+using namespace std;
+
+
+class GotoLineDialog : public QDialog, private Ui::GotoLineDialogQ
+{
+    Q_OBJECT
+
+public:
+    GotoLineDialog(QWidget *parent = 0);
+    ~GotoLineDialog();
+    void setupUIBeforeShow();
+
+signals:
+    void gotoLine(int line);   // emitted when the user says 'ok'
+
+
+public slots:
+    void done();
+    void setButtonStatus();
+
+};
+
+#endif
diff --git a/src/MacroEditor/GotoLineDialog.ui b/src/MacroEditor/GotoLineDialog.ui
new file mode 100644
index 0000000..5976abf
--- /dev/null
+++ b/src/MacroEditor/GotoLineDialog.ui
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>GotoLineDialogQ</class>
+ <widget class="QDialog" name="GotoLineDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>186</width>
+    <height>113</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>20</y>
+     <width>162</width>
+     <height>79</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout_2">
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Goto Line:</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit"/>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QDialogButtonBox" name="buttonBox">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="standardButtons">
+       <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <zorder>buttonBox</zorder>
+  <zorder>lineEdit</zorder>
+  <zorder>label</zorder>
+  <zorder>label</zorder>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/MacroEditor/Highlighter.cc b/src/MacroEditor/Highlighter.cc
new file mode 100644
index 0000000..2a3e553
--- /dev/null
+++ b/src/MacroEditor/Highlighter.cc
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include "Highlighter.h"
+
+using namespace std;
+
+
+Highlighter::Highlighter(QTextDocument *parent)
+     : QSyntaxHighlighter(parent)
+{
+}
+
+
+
+void Highlighter::highlightBlock(const QString &text)
+{
+}
+
diff --git a/src/MacroEditor/Highlighter.h b/src/MacroEditor/Highlighter.h
new file mode 100644
index 0000000..8ca9421
--- /dev/null
+++ b/src/MacroEditor/Highlighter.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef HIGHLIGHTER_H
+#define HIGHLIGHTER_H
+
+#include <QSyntaxHighlighter>
+
+#include <QHash>
+#include <QTextCharFormat>
+
+class QTextDocument;
+
+
+class Highlighter : public QSyntaxHighlighter
+ {
+     Q_OBJECT
+
+ public:
+     Highlighter(QTextDocument *parent = 0);
+
+ protected:
+     virtual void highlightBlock(const QString &text);
+
+     struct HighlightingRule
+     {
+         QRegExp pattern;
+         QTextCharFormat format;
+     };
+     QVector<HighlightingRule> highlightingRules;
+ };
+
+#endif
diff --git a/src/MacroEditor/LanguageHelper.cc b/src/MacroEditor/LanguageHelper.cc
new file mode 100644
index 0000000..d2da06a
--- /dev/null
+++ b/src/MacroEditor/LanguageHelper.cc
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include "LanguageHelper.h" 
+
+
+
+// ---------------------------------------------------------------------------
+// LanguageHelper::commentBlock
+// performs the most common form of comment blocking, which will be suitable
+// for Macro, Shell Script and Plain Text. Placed in the base class so that
+// it can be used by all these classes.
+// ---------------------------------------------------------------------------
+
+QString LanguageHelper::commentBlock(const QString &text)
+{
+    QString result;
+    QStringList lines = text.split("\n");   // put separate lines into a list of strings
+
+    for (int i = 0; i < lines.size(); i++)  // each line will be pre-pended with a '#'
+    {
+        result += "#" + lines.at(i) + "\n";
+    }
+
+    return result;
+}
+
+
diff --git a/src/MacroEditor/LanguageHelper.h b/src/MacroEditor/LanguageHelper.h
new file mode 100644
index 0000000..dcb1e2e
--- /dev/null
+++ b/src/MacroEditor/LanguageHelper.h
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LanguageHelper_H
+#define LanguageHelper_H
+
+#include "Highlighter.h"
+#include "VerbFunctionHelp.h"
+
+/* -----------------------------------------------------------------------
+    class LanguageHelper
+
+    Base class. There will be one derived class for each programming
+    language that the editor will be able to handle.
+    The helper classes will provide the editor with any language-specific
+    functionality (e.g. syntax highlighting, how to execute, etc.)
+   ----------------------------------------------------------------------- */
+
+
+class QTextDocument;
+
+
+class LanguageHelper
+{
+public:
+    LanguageHelper() {};
+    virtual ~LanguageHelper(){}
+
+
+    virtual Highlighter *createHighlighter(QTextDocument *parent = 0) = 0;
+    virtual bool canCheckSyntax() = 0;
+    virtual bool canRun() = 0;
+    virtual bool canDebug() = 0;
+    virtual bool runAsService() = 0;
+    virtual bool isHelpAvailableForFunction(const QString &function) = 0;
+    virtual QString pathToFunctionList() {return QString("");};
+    virtual QString pathToTemplateList() {return QString("");};
+
+    virtual QString commentBlock(const QString &text);                // makes the text lines into a comment block
+    virtual bool isHeaderLine(const QString &) {return false;};       // is the text a header line (e.g. "# Metview Macro")?
+    virtual QString requiredHeaderLine()       {return QString("");}; // required header line to be added automatically
+    virtual bool isAutoLicenceTextAllowed()    {return true;};        // is 'auto licence text' allowed for this language?
+
+
+    QString name()        {return languageName_;}
+    QString className()   {return className_;}
+    QString serviceName() {return serviceName_;}
+    
+    // convenience function to test whether the given string matches any of the language's names
+    bool isLanguageName(const QString &testName) {return name() == testName || className() == testName;}
+
+    VerbFunctionHelp *verbFunctionHelp() {return verbFunctionHelp_;}
+
+
+
+protected:
+    QString languageName_;
+    QString className_;
+    QString serviceName_;
+    VerbFunctionHelp *verbFunctionHelp_;
+};
+
+
+#endif
diff --git a/src/MacroEditor/LanguageHelperFactory.cc b/src/MacroEditor/LanguageHelperFactory.cc
new file mode 100644
index 0000000..f174690
--- /dev/null
+++ b/src/MacroEditor/LanguageHelperFactory.cc
@@ -0,0 +1,73 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "LanguageHelperFactory.h"
+#include "MacroHelper.h"
+#include "MagMLHelper.h"
+#include "ShellHelper.h"
+#include "PlainTextHelper.h"
+
+
+// ---------------------------------------------------------------------------
+// LanguageHelperFactory::LanguageHelperFactory
+// constructor. Here, we populate the list of available language helpers
+// ---------------------------------------------------------------------------
+
+LanguageHelperFactory::LanguageHelperFactory()
+{
+    languageHelpers_.push_back(new MacroHelper);
+    languageHelpers_.push_back(new MagMLHelper);
+    languageHelpers_.push_back(new ShellHelper);
+    languageHelpers_.push_back(new PlainTextHelper);
+}
+
+
+// ---------------------------------------------------------------------------
+// LanguageHelperFactory::~LanguageHelperFactory
+// destructor
+// ---------------------------------------------------------------------------
+
+LanguageHelperFactory::~LanguageHelperFactory()
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// LanguageHelperFactory::languageHelpers
+// returns a list of the registered language helpers
+// ---------------------------------------------------------------------------
+
+vector<LanguageHelper *> &LanguageHelperFactory::languageHelpers()
+{
+    return languageHelpers_;
+}
+
+
+
+// ---------------------------------------------------------------------------
+// LanguageHelperFactory::languageHelper
+// returns a language helper corresponding to the given name
+// ---------------------------------------------------------------------------
+
+LanguageHelper *LanguageHelperFactory::languageHelper(const QString &languageName)
+{
+    // go through the list of available language helpers until we find the right one
+
+    for (size_t i = 0; i < languageHelpers_.size(); i++)
+    {
+        if (languageHelpers_[i]->isLanguageName(languageName))
+        {
+            return languageHelpers_[i];
+        }
+    }
+
+    return new PlainTextHelper;  // default
+}
+
+ 
diff --git a/src/MacroEditor/LanguageHelperFactory.h b/src/MacroEditor/LanguageHelperFactory.h
new file mode 100644
index 0000000..7bb9552
--- /dev/null
+++ b/src/MacroEditor/LanguageHelperFactory.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef HelperFactory_H
+#define HelperFactory_H
+
+#include <vector>
+#include <string>
+
+#include "LanguageHelper.h"
+
+using std::vector;
+using std::string;
+
+
+// -----------------------------------------------------------------------------------
+// class LanguageHelperFactory
+// A simple object factory which handles a set of programming language helper objects.
+// -----------------------------------------------------------------------------------
+
+class LanguageHelperFactory
+{
+public:
+   LanguageHelperFactory();
+   ~LanguageHelperFactory();
+
+
+    vector<LanguageHelper *> &languageHelpers();                  // returns a list of language helper objects
+    LanguageHelper *languageHelper(const QString &languageName);  // returns a specified language helper object
+
+
+private:
+    vector<LanguageHelper *> languageHelpers_;
+};
+
+
+#endif
diff --git a/src/MacroEditor/MacroEdit.cc b/src/MacroEditor/MacroEdit.cc
new file mode 100644
index 0000000..3894d86
--- /dev/null
+++ b/src/MacroEditor/MacroEdit.cc
@@ -0,0 +1,2902 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+#include <QX11Info>
+
+#include "MacroEdit.h"
+#include "FindTextDialog.h"
+#include "GotoLineDialog.h"
+#include "TabsDialog.h"
+#include "RunDialog.h"
+#include "FunctionListDialog.h"
+#include "CodeTemplateDialog.h"
+#include "mvplaintextedit.h"
+#include <Path.h>
+#include <Metview.h>
+#include <QThread>
+#include <MvPath.hpp>
+
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+
+
+// ---------------------------------------------------------------------------
+// MacroRunTask::MacroRunTask
+// This class is instantiated in a new thread. Its purpose is to start the
+// macro service and 'listen' for messages from it (it is a ReplyObsever).
+// ---------------------------------------------------------------------------
+
+
+//MacroRunTask::MacroRunTask(MacroEditor& editor,const Action& action,IconObject* o,bool trace):
+MacroRunTask::MacroRunTask(MacroEdit *editor, QString &macro, MacroRunOptions options):
+    editor_(editor),
+    macro_(macro),
+//    object_(o),
+    options_(options)
+{
+
+    // to enable communication between the thread which runs the macro
+    // and the thread that contains the editor, we need to use
+    // signals and slots. We will be passing the std::string type,
+    // so we first need to tell Qt that we will use it.
+
+    qRegisterMetaType<string>("string");
+
+    connect (this, SIGNAL(sendMessageToLog(const string &)),
+             editor_, SLOT(logMessage(const string &)));
+
+    connect (this, SIGNAL(sendMacroFinishedMsg(int)),
+             editor_, SLOT(macroFinished(int)));
+
+    connect (this, SIGNAL(sendCurrentLineNumber(int)),
+             editor_, SLOT(stepLineNumber(int)));
+
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroRunTask::~MacroRunTask
+// Destructor.
+// ---------------------------------------------------------------------------
+
+MacroRunTask::~MacroRunTask()
+{
+//    cout << "MacroRunTask::~MacroRunTask " << *object_ << endl;
+//    cout << "MacroRunTask::~MacroRunTask " << endl;
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroRunTask::start
+// Calls the macro service with a path to the macro to be run.
+// ---------------------------------------------------------------------------
+
+void MacroRunTask::start()
+{
+    MvRequest r(editor_->languageHelper()->className().toUtf8().constData());  // is this the right string to use?
+
+    r("PATH")       = macro_.toUtf8().constData();   // path to macro
+    r("_NAME")      = macro_.toUtf8().constData();   // path to macro
+    r("_CLASS")     = editor_->languageHelper()->className().toUtf8().constData();  // class name
+    r("_ACTION")    = options_.runMode_.c_str();     // e.g. "prepare" or "syntax"
+    r("_SERVICE")   = editor_->languageHelper()->serviceName().toUtf8().constData();  // service name
+    r("_TRACE")     = options_.trace_;
+    r("_WAITMODE")  = options_.waitMode_;
+    r("_SENDLINES") = options_.sendLines_;
+    r("_PAUSE")     = options_.pause_;
+
+    r.print();
+
+
+    // do we want to run this as a standard Metview service?
+
+    if (editor_->languageHelper()->runAsService())
+    {
+        callService(editor_->languageHelper()->serviceName().toUtf8().constData(), r);
+    }
+
+    // otherwise, use popen() and run the command on the system
+
+    else
+    {
+        // the command might have '%s' substrings in it - these should be replaced
+        // by the path to the icon file
+
+        char servicecall[1024];
+        char pathToIcon[1024];
+        sprintf (pathToIcon, macro_.toUtf8().constData());
+        sprintf (servicecall, editor_->languageHelper()->serviceName().toUtf8().constData(), pathToIcon, pathToIcon, pathToIcon, pathToIcon);
+        strcat (servicecall, " 2>&1");
+
+
+        // start running the process
+
+        FILE *processfile = popen(servicecall,"r");
+        if(!processfile)
+        {
+            emit sendMacroFinishedMsg(1);
+            //editor_->statusMessage("Failed to start task");
+            return;
+        }
+
+
+        // loop through the output until it has finished
+
+        const int OUTBUFFERSIZE = 1024;
+        char outbuf[OUTBUFFERSIZE];
+        while (fgets(outbuf, OUTBUFFERSIZE, processfile) != NULL)
+        {
+            // remove a trailing newline char
+            size_t linelen = strlen(outbuf);
+
+            if (outbuf[linelen-1] == '\n')
+            {
+                outbuf[linelen-1] = '\0';
+            }
+
+            // send this output line to the message log
+
+            string msg (outbuf);
+            emit sendMessageToLog(msg);
+        }
+
+        // tell the editor that the process has finished
+
+        int returnCode;
+        returnCode = pclose (processfile);
+        emit sendMacroFinishedMsg(returnCode);
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroRunTask::reply
+// Called automatically when the macro service sends a REPLY message. Since
+// we are running in a separate thread, we have to communicate with the
+// parent thread through slots and signals. Here, we simply want to tell
+// the editor that the macro has finished.
+// ---------------------------------------------------------------------------
+
+void MacroRunTask::reply(const MvRequest&,int err)
+{
+    emit sendMacroFinishedMsg (err);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroRunTask::progress
+// Called automatically when the macro service sends a PROGRESS message.
+// Not sure if this ever happens, or what the contents of such a message are.
+// ---------------------------------------------------------------------------
+
+void MacroRunTask::progress(const MvRequest&)
+{
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroRunTask::message
+// Called automatically when the macro service sends a MESSAGE message. Since
+// we are running in a separate thread, we have to communicate with the
+// parent thread through slots and signals. Here, we just pass the given
+// message string to the editor's message log.
+// ---------------------------------------------------------------------------
+
+void MacroRunTask::message(const string& msg)
+{
+    // Macro can encode special messages which only the Macro Editor will interpret
+    // They start with 'MACROEDITOR:' and are followed by a command and possibly
+    // followed by a space-separated parameters.
+    // Currently, we support
+    //  MACROEDITOR:LINE x
+    //    where x is the current line number being executed
+
+
+    char command[64] = "";
+    char param   [8] = "";
+
+    if (sscanf(msg.c_str(), "MACROEDITOR:%s %s", command, param) == 2)
+    {
+        // special message for the macro editor - which message is it?
+
+        if (!strcmp(command, "LINE"))    // line number
+        {
+            int line = atoi(param);
+            emit sendCurrentLineNumber(line);
+        }
+    }
+    else
+    {
+        // standard message - send it to the log area
+
+        emit sendMessageToLog(msg);
+    }
+}
+
+
+
+void MacroRunTask::print(ostream&) const
+{
+ /*     s << "MacroRunTask[" 
+      << action_.name() 
+      << ","  
+      << action_.mode() 
+      << ","
+      << *object_ 
+      << "]";
+*/
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+//=================================================================
+class ReplyHandler : public MvReply {
+    virtual void callback(MvRequest&);
+};
+
+void ReplyHandler::callback(MvRequest& in)
+{
+    ReplyObserverH *s = (ReplyObserverH*)getReference();
+    if(s == 0) return;
+
+    const char *p;
+    int i = 0;
+    while ((p = getMessage(i++)))
+        (*s)->message(p);
+
+    (*s)->reply(in,getError());
+
+    delete s;
+}
+
+//=================================================================
+
+class ProgressHandler : public MvProgress {
+    virtual void callback(MvRequest& r);
+};
+
+void ProgressHandler::callback(MvRequest& in)
+{
+    ReplyObserverH *s = (ReplyObserverH*)getReference();
+    if(s == 0) return;
+
+    const char *p;
+    int i = 0;
+    while((p = getMessage(i++)))
+        (*s)->message(p);
+
+    (*s)->progress(in);
+
+}
+
+//=================================================================
+
+ReplyObserver::ReplyObserver()
+{
+    // This will install the handler on creation of the first instance
+    static ProgressHandler progressHandler;
+    static ReplyHandler    replyHandler;
+    
+    
+//    MvRequest dummy;
+//    replyHandler.callback(dummy);
+}
+
+ReplyObserver::~ReplyObserver()
+{
+}
+
+void ReplyObserver::callService(const string& service,const MvRequest& r)
+{
+    MvApplication::callService(service.c_str(),r,new ReplyObserverH(this));
+}
+
+
+
+///////////////////////// class runMacroThread ///////////////////////////////////////
+
+
+// ---------------------------------------------------------------------------
+// runMacroThread::runMacroThread
+// This class is a QThread class for running the macro reply observer
+// whilst the main thread processes Qt events normally.
+// ---------------------------------------------------------------------------
+
+//runMacroThread::runMacroThread(MacroEdit *editor) : editor_(editor)
+//runMacroThread::runMacroThread(QString &filename) : filename_(filename)
+runMacroThread::runMacroThread(MacroEdit *editor, QString &filename, MacroRunOptions options) : editor_(editor), filename_(filename), options_(options)
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// runMacroThread::run
+// Starts a new MacroRunTask, then performs the Metview event-processing
+// loop. This is performed in a separate thread from the editor itself,
+// so it must communicate with the editor via slots and signals.
+// ---------------------------------------------------------------------------
+
+void runMacroThread::run()
+{
+
+    task_ = new MacroRunTask(editor_, filename_, options_);
+    task_->start();
+
+
+    // do the standard Metview event processing loop
+
+    for(;;)
+    {
+        //editor_->eventLoop_.processEvents();  // was causing it to crash
+
+        svc_connect(MvApplication::getService());
+        if (process_service(MvApplication::getService()))
+            break; // Timeout
+    }
+
+    emit sendThreadFinishedMsg();
+}
+
+
+
+
+
+
+
+/////////////////////////////////// class MacroEdit ////////////////////////////////
+
+QString MacroEdit::emptyString_ ;  // used as a default argument to findString()
+
+
+MacroEdit::MacroEdit(QString &appName, QWidget *parent, QString *fileToLoad)
+     : QMainWindow(parent), appName_(appName)
+//     : QMainWindow(parent), MacroRunTask(*this, true)
+{
+//    setAttribute(Qt::WA_DeleteOnClose);
+
+
+    findDialog_             = 0;
+    gotoLineDialog_         = 0;
+    tabsDialog_             = 0;
+    runDialog_              = 0;
+    functionListDialog_     = 0;
+    codeTemplateDialog_     = 0;
+    verbFunctionHelpDialog_ = 0;
+    rowColLabel_            = 0;
+    messageLabel_           = 0;
+    languageHelper_         = 0;
+    highlighter_            = 0;
+    runThread_              = 0;
+    fontSize_               = 11;
+//    task_                 = 0;
+
+
+    setupUi(this); // this sets up GUI// setupFileMenu();
+
+    //setupHelpMenu();
+    setupEditor();
+
+    // read the user's settings from a file
+    readSettings();
+
+
+    // load the text file if specified
+    if (fileToLoad != NULL)
+    {
+        fileName_ = *fileToLoad;
+        loadTextFile (fileName_);
+    }
+
+   //setCentralWidget(editor);
+   setWindowTitle(tr("Metview Macro Editor [*]"));
+}
+
+
+
+MacroEdit::~MacroEdit()
+{
+
+    // write the user's settings to a file
+    writeSettings();
+
+    // delete any memory we've allocated
+    if (findDialog_)             delete findDialog_;
+    if (gotoLineDialog_)         delete gotoLineDialog_;
+    if (tabsDialog_)             delete tabsDialog_;
+    if (runDialog_)              delete runDialog_;
+    if (functionListDialog_)     delete functionListDialog_;
+    if (codeTemplateDialog_)     delete codeTemplateDialog_;
+    if (verbFunctionHelpDialog_) delete verbFunctionHelpDialog_;
+    if (rowColLabel_)            delete rowColLabel_;
+    if (messageLabel_)           delete messageLabel_;
+    if (languageHelper_)         delete languageHelper_;
+    if (highlighter_)            delete highlighter_;
+    if (runThread_)              delete runThread_;
+
+
+//    if (task_)         delete task_;
+//    MvQApplication *app_;
+
+}
+
+
+
+void MacroEdit::setupEditor()
+{
+     // --- Save ---
+
+    // if the document is modifed, then enable the 'save' action
+    connect(textEditor->document(), SIGNAL(modificationChanged(bool)), actionSave, SLOT(setEnabled(bool)));
+
+    // if the document is modifed, then tell this window about it
+    connect(textEditor->document(), SIGNAL(modificationChanged(bool)), this, SLOT(setWindowModified(bool)));
+
+
+    actionSave->setShortcut(QKeySequence::Save);
+    connect(actionSave,              SIGNAL(triggered()), this, SLOT(save()));
+    connect(actionSave_As,           SIGNAL(triggered()), this, SLOT(saveAs()));
+    connect(action_Reload_from_file, SIGNAL(triggered()), this, SLOT(reload()));
+
+
+    connect(textEditor->document(), SIGNAL(contentsChanged()), this, SLOT(documentWasModified()));
+
+
+    // was the cursor position changed?
+    connect(textEditor, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionWasChanged()));
+
+
+    // have we regained or lost focus?
+    connect(textEditor, SIGNAL(focusRegained()), this, SLOT(onFocusRegained()));
+    connect(textEditor, SIGNAL(focusLost()),     this, SLOT(onFocusLost()));
+
+
+    // --- Exit ---
+    connect(actionExit, SIGNAL(triggered()), this, SLOT(close()));
+
+
+
+    // --- Undo, redo ---
+    connect(textEditor->document(), SIGNAL(undoAvailable(bool)),
+             actionUndo, SLOT(setEnabled(bool)));
+    connect(textEditor->document(), SIGNAL(redoAvailable(bool)),
+             actionRedo, SLOT(setEnabled(bool)));
+
+    setWindowModified(textEditor->document()->isModified());
+
+    actionSave->setEnabled(textEditor->document()->isModified());
+    actionUndo->setEnabled(textEditor->document()->isUndoAvailable());
+    actionRedo->setEnabled(textEditor->document()->isRedoAvailable());
+
+    connect(actionUndo, SIGNAL(triggered()), textEditor, SLOT(undo()));
+    connect(actionRedo, SIGNAL(triggered()), textEditor, SLOT(redo()));
+
+    actionUndo->setShortcut(QKeySequence::Undo);
+    actionRedo->setShortcut(QKeySequence::Redo);
+
+
+    // --- Cut, copy, paste ---
+    actionCut->setEnabled(false);
+         actionCopy->setEnabled(false);
+    actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
+
+    connect(actionCut,   SIGNAL(triggered()),  textEditor, SLOT(cut()));
+    connect(actionCopy,  SIGNAL(triggered()), textEditor, SLOT(copy()));
+    connect(actionPaste, SIGNAL(triggered()), textEditor, SLOT(paste()));
+
+    connect(textEditor, SIGNAL(copyAvailable(bool)), actionCut, SLOT(setEnabled(bool)));
+    connect(textEditor, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool)));
+
+
+    // --- Clipboard ---
+    connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
+
+
+    // --- Drop ---
+    connect(QApplication::instance(), SIGNAL(sendDropInfo(MvQIconDropItem* )),
+            this, SLOT(processDrop(MvQIconDropItem*)));
+
+    actionCut->setShortcut(QKeySequence::Cut);
+    actionCopy->setShortcut(QKeySequence::Copy);
+    actionPaste->setShortcut(QKeySequence::Paste);
+
+
+    // --- Select ---
+    connect(actionSelect_All, SIGNAL(triggered()), textEditor, SLOT(selectAll()));
+    actionSelect_All->setShortcut(QKeySequence::SelectAll);
+
+
+    // --- Find, replace ---
+    connect(actionFind,           SIGNAL(triggered()), this, SLOT(findDialog()));    
+    connect(actionFind_Next,      SIGNAL(triggered()), this, SLOT(findNext()));    
+    connect(actionFind_Selection, SIGNAL(triggered()), this, SLOT(findSelection()));    
+    connect(actionReplace,        SIGNAL(triggered()), this, SLOT(findReplaceDialog()));    
+
+
+    // for the 'find next' functionality, although Qt (at the time of writing) uses
+    // both F3 and CTRL-G for most platforms, this is not true for Linux. Therefore,
+    // we have to add CTRL-G ourselves.
+
+    QKeySequence ctrlg(tr("Ctrl+G"));
+    QList <QKeySequence> qks;
+    qks.push_back (ctrlg);
+    qks.push_back (QKeySequence::FindNext);
+    actionFind_Next->setShortcuts(qks);
+
+    actionFind->setShortcut(QKeySequence::Find);
+    actionFind_Previous->setShortcut(QKeySequence::FindPrevious);
+    actionReplace->setShortcut(QKeySequence::Replace);
+
+
+
+    //  --- Go to line ---
+    connect(actionGo_To_Line, SIGNAL(triggered()), this, SLOT(gotoLine()));
+
+
+	// --- Indent lines ---
+    connect(actionIndent_Lines, SIGNAL(triggered()), this, SLOT(onIndentLines()));
+
+
+    // --- Settings menu ---
+    connect(actionTabs, SIGNAL(triggered()), this, SLOT(tabsDialog()));
+
+
+    // --- Run menu ---
+    connect(actionRun_Options, SIGNAL(triggered()), this, SLOT(runDialog()));
+
+
+    // --- Insert menu ---
+    connect(action_Built_in_Function,   SIGNAL(triggered()), this, SLOT(functionListDialog()));
+    connect(actionCode_Template,        SIGNAL(triggered()), this, SLOT(codeTemplateDialog()));
+    connect(actionVerb_Function_Help,   SIGNAL(triggered()), this, SLOT(verbFunctionHelpDialog()));
+    connect(action_Licence_Text,        SIGNAL(triggered()), this, SLOT(insertLicenceText()));
+    connect(actionAutoInsertLicenceOn,  SIGNAL(triggered()), this, SLOT(setAutoInsertLicenceOn()));
+    connect(actionAutoInsertLicenceOff, SIGNAL(triggered()), this, SLOT(setAutoInsertLicenceOff()));
+
+    autoInsertLicenceGroup_ = new QActionGroup(this);                   // group the 'auto insert licence' actions
+    autoInsertLicenceGroup_->addAction(actionAutoInsertLicenceOn);      // group the 'auto insert licence' actions
+    autoInsertLicenceGroup_->addAction(actionAutoInsertLicenceOff);     // group the 'auto insert licence' actions
+
+
+
+    // --- Font size ---
+    connect(actionEnlarge_Font, SIGNAL(triggered()), this, SLOT(enlargeFont()));
+    connect(actionShrink_Font,  SIGNAL(triggered()), this, SLOT(shrinkFont()));
+    connect(actionNormal_Font,  SIGNAL(triggered()), this, SLOT(normalFont()));
+    connect(actionLarge_Font,   SIGNAL(triggered()), this, SLOT(largeFont()));
+
+    actionEnlarge_Font->setShortcut(QKeySequence::ZoomIn);
+    actionShrink_Font->setShortcut(QKeySequence::ZoomOut);
+
+    changeFontSize (0); // set the font: '0' means 'change the size by 0'
+    QCoreApplication::processEvents();  // we need to do this in order for the font settings to be properly
+                                        // registered before the line numbering is rendered
+
+
+    textEditor->setLineWrapMode (QPlainTextEdit::NoWrap);  // we don't allow line wrapping
+
+
+    // --- show line numbers ---
+    connect(actionShow_Line_Numbers, SIGNAL(toggled(bool)), this, SLOT(showLineNumbers(bool)));
+    actionShow_Line_Numbers->setCheckable(true);
+
+
+
+    // --- the Language menu ---
+
+    // get a list of all the available programming languages
+
+    vector<LanguageHelper*> languageHelpers = languageHelperFactory_.languageHelpers();
+
+    for (size_t i = 0; i < languageHelpers.size(); i++)
+    {
+        QAction *actionLang = new QAction(this);
+        actionLang->setObjectName("action_" + languageHelpers[i]->name());
+        actionLang->setText(languageHelpers[i]->name());
+        actionLang->setCheckable(true);
+        menu_Language->addAction(actionLang);
+        languageActions_.push_back(actionLang);
+    }
+
+
+    // every action in the language menu will share a common signal/slot, with a pointer
+    // to the particular chosen action being sent in order to identify which was chosen
+
+    connect(menu_Language, SIGNAL(triggered(QAction *)), this, SLOT(languageChosen(QAction *)));
+
+
+    // the Help menu
+    actionVerb_Function_Help->setEnabled(false);
+
+
+
+    // some defaults for the toolbars - these will be over-ridden by the user's preferences
+    fileToolBar->setVisible(false);
+    findToolBar->setVisible(false);
+    editToolBar->setVisible(false);
+    insertItemToolBar->setVisible(false);
+
+    actionStop->setVisible(false);
+
+
+    // This message label will show the main messages in the status bar.
+    // We ensure that the user can select & copy the text in case they
+    // need to send it to us.
+    messageLabel_ = new QLabel("");
+    messageLabel_->setTextInteractionFlags(Qt::TextSelectableByMouse);
+    //messageLabel_->setMinimumSize(messageLabel_->sizeHint());
+    statusBar()->addPermanentWidget(messageLabel_, 1);  // '1' means 'please stretch me when resized'
+
+
+    // row/col indicator on the status bar
+    // - ensure that it is updated when the cursor is moved
+    rowColLabel_=  new QLabel ("L: 9999, C: 999");
+    rowColLabel_->setMinimumSize(rowColLabel_->sizeHint());
+    statusBar()->addPermanentWidget(rowColLabel_);
+    connect(textEditor, SIGNAL(cursorPositionChanged()), this, SLOT(updateRowColLabel()));
+
+
+    // ensure that the user cannot write to the message log
+    logMessages->setReadOnly (true);
+
+
+    // we do not want a line to be highlighted initially
+
+    highlightedLine_ = -1;
+
+}
+
+
+
+// -------------------------------------------------------
+// MacroEdit::loadTextFile
+// Loads the given file into the editor and sets the title
+// -------------------------------------------------------
+
+void MacroEdit::loadTextFile(const QString &fileToLoad)
+{
+    QFile file(fileToLoad);  // set the file to be loaded
+
+    if (file.open(QFile::ReadOnly | QFile::Text))  // try to open in read-only mode
+    {
+        QTextStream in(&file);
+        QApplication::setOverrideCursor(Qt::WaitCursor);
+        textEditor->setPlainText(in.readAll());
+        QApplication::restoreOverrideCursor();
+
+        textEditor->document()->setModified(false);
+        setWindowModified(false);
+
+        setCurrentFile(fileToLoad);
+        statusMessage(tr("File loaded"), 2000);
+    }
+    
+    else
+    {
+        QMessageBox::warning(this, appName_,
+                             tr("Cannot read file %1:\n%2.")
+                             .arg(fileToLoad)
+                             .arg(file.errorString()));
+        return;
+    }
+}
+
+
+
+bool MacroEdit::saveTextFile(const QString &fileToSave)
+{
+    QFile file(fileToSave);
+
+    if (!file.open(QFile::WriteOnly | QFile::Text))
+    {
+        QMessageBox::warning(this, appName_,
+                             tr("Cannot write file %1:\n%2.")
+                             .arg(fileToSave)
+                             .arg(file.errorString()));
+        return false;
+    }
+
+    {
+        // inside its own block to ensure that the text stream is flushed before we call setCurrentFile()
+        QTextStream out(&file);
+        QApplication::setOverrideCursor(Qt::WaitCursor);
+        out << textEditor->toPlainText();
+    }
+    QApplication::restoreOverrideCursor();
+    textEditor->document()->setModified(false);
+    setWindowModified(false);
+    setCurrentFile (fileToSave);
+    statusMessage(tr("File saved"), 2000);
+    return true;
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::setCurrentFile
+// Tells the editor that it has a new file or its current file status
+// has been changed (e.g. saved). Things like the window title and
+// read-only status are updated.
+// If lastSaveTimeOnly is true, then only the last save time will be updated.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::setCurrentFile(const QString &fileName, bool lastSaveTimeOnly)
+{
+    QString title;
+    QFileInfo fi (fileName);
+    fileName_ = fileName;
+
+    if (!lastSaveTimeOnly)
+    {
+        if (fileName_.isEmpty())
+            title = "untitled.txt";
+        else
+            title = strippedFileName(fileName_) + "[*]";  // the '*' will only appear when the document is modified
+
+        if (!fi.isWritable())
+        {
+            readOnly_ = true;
+            textEditor->setReadOnly (true);
+            title += tr(" (Read only)");
+            //onReadOnlyStatusChanged (true);
+        }
+        else
+        {
+            readOnly_ = false;
+            textEditor->setReadOnly (false);
+            //onReadOnlyStatusChanged (false);
+        }
+
+        title += " - " + fileName_;
+
+        setWindowTitle(title);
+    }
+
+    lastSaveTime_ = fi.lastModified();  // store the time it was last modified/saved
+
+
+//    setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Application")));
+
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::strippedFileName
+// Takes a filename and returns just the filename with no path.
+// ---------------------------------------------------------------------------
+
+QString MacroEdit::strippedFileName(const QString &fullFileName)
+{
+    return QFileInfo(fullFileName).fileName();
+}
+
+
+
+void MacroEdit::closeEvent(QCloseEvent *event)
+{
+    if (AskToSave())
+    {
+        //writeSettings();
+        event->accept();
+        eventLoop_.exit();
+    }
+
+    else
+    {
+        event->ignore();
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::wordUnderCursor
+// returns the word currently under the cursor. Specifically, this is used to
+// get the name of the function currently under the cursor, and if the cursor
+// is on an open bracket, then the word to the left of the cursor is returned.
+// THIS IS QUITE LANGUAGE-SPECIFIC, AND MAY NEED TO BE REVISED FOR
+// NON-MACRO LANGUAGES.
+// ---------------------------------------------------------------------------
+
+QString MacroEdit::wordUnderCursor()
+{
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+    cursor.select(QTextCursor::WordUnderCursor);     // select the current word
+    QString currentWord = cursor.selectedText();
+
+
+    // if the text is 'pcont(', and the user has selected the 'pcont', then the
+    // 'word-under-cursor' will be '(' for some reason; therefore we will go back
+    // two words and try again... This won't affect the editor, because we will
+    // not send the cursor back to the editor.
+
+    if (currentWord == "(" || currentWord == "()")
+    {
+        cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::MoveAnchor, 2);  // move it left two words
+        cursor.select(QTextCursor::WordUnderCursor);     // select the current word
+        currentWord = cursor.selectedText();
+    }
+
+    return currentWord;
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::AskToSave
+// If the document has been modified, then ask the user whether to save it
+// or not - if they say 'yes', then save it.
+// ---------------------------------------------------------------------------
+
+bool MacroEdit::AskToSave()
+{
+    if (textEditor->document()->isModified())
+    {
+        int ret = QMessageBox::warning(this, appName_,
+                     tr("The document has been modified.\n"
+                        "Do you want to save your changes?"),
+                     QMessageBox::Yes | QMessageBox::Default,
+                     QMessageBox::No,
+                     QMessageBox::Cancel | QMessageBox::Escape);
+        if (ret == QMessageBox::Yes)
+            return save();
+        else if (ret == QMessageBox::Cancel)
+            return false;
+    }
+
+    return true;
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::save
+// triggered when the user asks to save the document. If it currently
+// has an assigned filename, then we use that - otherwise as the user.
+// - returns true if it happens, false if the user cancels the operation.
+// ---------------------------------------------------------------------------
+
+bool MacroEdit::save ()
+{
+    if (fileName_.isEmpty())
+    {
+        return saveAs();
+    }
+    else
+    {
+        return saveTextFile(fileName_);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::saveAs
+// triggered when the user asks to save the document under a new name
+// - returns true if it happens, false if the user cancels the operation.
+// ---------------------------------------------------------------------------
+
+bool MacroEdit::saveAs (void)
+{
+    QString fileName = QFileDialog::getSaveFileName(this);
+    if (fileName.isEmpty())
+        return false;
+
+    saveTextFile (fileName);
+    return true;
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::reload
+// triggered when the user asks to reload the document
+// - returns true if it happens ok.
+// ---------------------------------------------------------------------------
+
+bool MacroEdit::reload (void)
+{
+
+    QTextCursor cursor = textEditor->textCursor();  // note the current text cursor position
+    int pos = cursor.position();                    // note the current text cursor position
+    loadTextFile(fileName_);                        // reload the file
+    cursor.setPosition(pos);                        // restore the cursor position
+    textEditor->setTextCursor(cursor);              // send the cursor back to the document
+
+    return true;
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::documentWasModified
+// triggered when the document is modified by something (proably the user!)
+// ---------------------------------------------------------------------------
+
+void MacroEdit::documentWasModified()
+{
+    setWindowModified(textEditor->document()->isModified());
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::clipboardDataChanged
+// triggered when the clipboard data has been changed
+// ---------------------------------------------------------------------------
+
+void MacroEdit::clipboardDataChanged()
+{
+     actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::cursorPositionWasChanged
+// triggered when the cursor position is changed
+// ---------------------------------------------------------------------------
+
+void MacroEdit::cursorPositionWasChanged()
+{
+    if (languageHelper_)
+    {
+        QString currentWord = wordUnderCursor();
+
+        actionVerb_Function_Help->setEnabled(!readOnly_ && languageHelper_->isHelpAvailableForFunction(currentWord));
+    }
+
+
+    // remove a highlighted line if there is one
+    
+    if (highlightedLine_ != -1)
+        highlightLine(-1);
+
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::findDialog
+// triggered when the user tries to activate the Find dialog.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::findDialog()
+{
+     showFindDialog(false);
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::findReplaceDialog
+// triggered when the user tries to activate the Replace dialog.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::findReplaceDialog()
+{
+     showFindDialog(true);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::showFindDialog
+// displays the Find/Replace dialog.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::showFindDialog(bool showReplaceOptions)
+{
+    // create the dialog if it does not already exist
+
+    if (!findDialog_) 
+    {
+        findDialog_ = new FindTextDialog(this);
+
+        connect(findDialog_, SIGNAL(find(const QString &,QTextDocument::FindFlags)),
+                this, SLOT(findString(const QString &,QTextDocument::FindFlags)));
+
+        connect(findDialog_, SIGNAL(replace(const QString &,const QString &,QTextDocument::FindFlags)),
+                this, SLOT(replaceString(const QString &,const QString &,QTextDocument::FindFlags)));
+
+        connect(findDialog_, SIGNAL(replaceInSelected(const QString &,const QString &,QTextDocument::FindFlags)),
+                this, SLOT(replaceStringInSelectedText(const QString &,const QString &,QTextDocument::FindFlags)));
+
+        connect(findDialog_, SIGNAL(replaceAll(const QString &,const QString &,QTextDocument::FindFlags)),
+                this, SLOT(replaceStringInFile(const QString &,const QString &,QTextDocument::FindFlags)));
+
+        connect(findDialog_, SIGNAL(rejected()), this, SLOT(findClosed()));
+    }
+
+
+    // if created, set it up and display it
+
+    if (findDialog_) 
+    {
+        QString selected("");
+        bool isSelection = false;
+
+        // if there is user-selected text, then use that as the search string
+
+        if (textEditor->textCursor().hasSelection())
+        {
+            selected = textEditor->textCursor().selectedText();
+            isSelection = true;
+        }
+            
+        // - but not if it spans multiple lines
+
+        if (selected.contains(QChar::ParagraphSeparator))
+            selected = "";
+
+
+        // set up the dialog box and display it
+
+        findDialog_->setupUIBeforeShow(selected, showReplaceOptions, isSelection);
+        findDialog_->show();
+        findDialog_->raise();
+        findDialog_->activateWindow();
+        statusMessage("", 0); // reset the status message
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::findNext
+// triggered when the user re-executes the previous Find command
+// ---------------------------------------------------------------------------
+
+void MacroEdit::findNext()
+{
+    if (!lastFindString_.isEmpty())
+    {
+        findString (lastFindString_, lastFindFlags_);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::findSelection
+// triggered when the user tries to 'find' the currently selected text
+// ---------------------------------------------------------------------------
+
+void MacroEdit::findSelection()
+{
+    // if there is user-selected text, then use that as the search string
+
+    if (textEditor->textCursor().hasSelection())
+    {
+        QString selected = textEditor->textCursor().selectedText();
+        
+        findString (selected, 0);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::findString(...)
+// 1) triggered from the Find dialog when the user wants to perform the search
+// 2) called from the other 'find' functions. Actually performs the search.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::findString(const QString &s,QTextDocument::FindFlags flags, bool replace, const QString &r)
+{
+
+    lastFindString_ = s;      // store for repeat searches
+    lastFindFlags_  = flags;  // store for repeat searches
+    bool found = false;
+
+    if (textEditor->find(s,flags))  // find and select the string - were we successful?
+    {
+        statusMessage("", 0);
+        found = true;
+    }
+    else    // did not find the string
+    {
+        if (1)  // 'wraparound' search - on by default, we can add a user option if it might be useful to turn it off
+        {
+            QTextCursor original_cursor = textEditor->textCursor();   // get the document's cursor
+            QTextCursor cursor(original_cursor);
+
+            if (flags & QTextDocument::FindBackward)        // move to the start or end of the document to continue the search
+                cursor.movePosition(QTextCursor::End);
+            else
+                cursor.movePosition(QTextCursor::Start);
+
+            textEditor->setTextCursor(cursor);              // send the cursor back to the document
+
+            if (textEditor->find(s,flags))                  // search again, from the new position
+            {
+                statusMessage("", 0);
+                found = true;
+            }
+            else
+            {
+                textEditor->setTextCursor(original_cursor);  // not found - restore the cursor to its original position
+            }
+        }
+    }
+
+
+    if (found)
+    {
+        if (replace)
+        {
+            // perform the 'replace'
+            textEditor->insertPlainText (r);
+            
+            // highlight the replaced text - the current text cursor will be
+            // at the end of the replaced text, so we move it back to the start
+            // (anchored so that the text is selected)
+            QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+            cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor, r.length());
+            textEditor->setTextCursor(cursor);               // send the cursor back to the document
+        }
+    }
+
+    else
+    {
+        statusMessage(tr("Searched whole file, string not found"), 5000);
+    }
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::replaceString(...)
+// triggered from the Find dialog when the user wants to perform the s/r
+//   's' is the string to search for, 'r' is the string to replace it with
+// ---------------------------------------------------------------------------
+
+void MacroEdit::replaceString(const QString &s,const QString &r,QTextDocument::FindFlags flags)
+{
+    findString(s, flags, true, r);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::replaceStringInSelectedText(...)
+// triggered from the Find dialog when the user wants to perform the s/r
+// on all the selected text
+//   's' is the string to search for, 'r' is the string to replace it with
+// ---------------------------------------------------------------------------
+
+void MacroEdit::replaceStringInSelectedText(const QString &s,const QString &r,QTextDocument::FindFlags flags)
+{
+    int numReplacements = 0;
+
+    // create a new (temporary) text document to hold the selected text
+    // - we will perform the search/replace on this document, then replace
+    // our actual document's selected text with this.
+
+    QPlainTextEdit tempEdit(textEditor->textCursor().selectedText());
+
+
+    // do the search/replace in the temporary editor
+
+    while (tempEdit.find(s,flags))
+    {
+        // perform the 'replace'
+        tempEdit.insertPlainText (r);
+        numReplacements++;
+    }
+
+
+    // copy the result back to our actual document - insertText will overwrite
+    // the currently selected text, which is what we want. Clever, eh?
+
+    QString tempAsString(tempEdit.toPlainText());
+    textEditor->insertPlainText (tempAsString);
+
+
+    // highlight the replaced text - the current text cursor will be
+    // at the end of the replaced text, so we move it back to the start
+    // (anchored so that the text is selected)
+
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+    cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor, tempAsString.length());
+    textEditor->setTextCursor(cursor);               // send the cursor back to the document
+
+
+    // tell the user how many instances of the string we replaced
+
+    QString msg = QString(tr("Replaced %1 instances")).arg(numReplacements);
+    statusMessage(msg, 5000);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::replaceStringInFile(...)
+// triggered from the Find dialog when the user wants to perform the s/r
+// on all the whole file
+//   's' is the string to search for, 'r' is the string to replace it with
+// ---------------------------------------------------------------------------
+
+void MacroEdit::replaceStringInFile(const QString &s,const QString &r,QTextDocument::FindFlags flags)
+{
+    // select the whole document, then do a 's/r on selected text'
+
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+    cursor.select(QTextCursor::Document);            // select the whole document
+    textEditor->setTextCursor(cursor);               // send the cursor back to the document
+
+    // perform the search/replace on the selected text
+    
+    replaceStringInSelectedText (s, r, flags);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::findClosed
+// triggered when the 'find' dialog is closed.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::findClosed()
+{
+    // reset the status message if we put something there
+
+    statusMessage("", 0);
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::gotoLine
+// triggered when the user asks to bring up the 'go to line' dialog
+// ---------------------------------------------------------------------------
+
+void MacroEdit::gotoLine()
+{
+    // create the dialog if it does not already exist
+
+    if (!gotoLineDialog_) 
+    {
+        gotoLineDialog_ = new GotoLineDialog(this);
+
+        connect(gotoLineDialog_, SIGNAL(gotoLine(int)), this, SLOT(gotoLine(int)));
+    }
+
+
+    // if created, set it up and display it
+
+    if (gotoLineDialog_) 
+    {
+        gotoLineDialog_->show();
+        gotoLineDialog_->raise();
+        gotoLineDialog_->activateWindow();
+        gotoLineDialog_->setupUIBeforeShow();
+    }
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::gotoLine
+// triggered from the GotoLine dialog when the user wants to go to that line
+// ---------------------------------------------------------------------------
+
+void MacroEdit::gotoLine(int line)
+{
+    int bn = 0;
+    QTextBlock b;
+
+    if (line <= textEditor->document()->blockCount())
+    {
+        for (b = textEditor->document()->begin(); b != textEditor->document()->end(); b = b.next())
+        {
+            if (bn == line-1)
+            {
+                QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+                cursor.setPosition (b.position());               // set it to the right position
+                cursor.select(QTextCursor::LineUnderCursor);     // select the whole line
+                textEditor->setTextCursor(cursor);               // send the cursor back to the document
+                break;
+            }
+            bn++;
+        }
+    }
+    
+    else
+    {
+        statusMessage(tr("Line not in document"), 0);
+    }
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onIndentLines
+// triggered when the user asks to indent the selected lines of code
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onIndentLines()
+{
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+
+
+    // if no line is currently selected, then first select the current line
+
+    if (!textEditor->textCursor().hasSelection())
+    {
+        cursor.select(QTextCursor::LineUnderCursor);
+        textEditor->setTextCursor(cursor);               // send the cursor back to the document
+    }
+
+
+    // find the number of lines in the selection - yes - all this code to do that!
+
+    int selStart = cursor.selectionStart();
+    int selEnd   = cursor.selectionEnd();
+    QTextBlock bStart = textEditor->document()->findBlock(selStart);
+    QTextBlock bEnd   = textEditor->document()->findBlock(selEnd);
+    int lineStart = bStart.firstLineNumber();
+    int lineEnd   = bEnd.firstLineNumber();
+    int numLines = (lineEnd - lineStart) + 1;
+
+
+    // if the user selected the text from bottom to top, then the cursor will be at the top
+    // of the selection - for ease of coding, we will ensure that the cursor is at the bottom
+    // of the selection.
+    
+    cursor.setPosition(selEnd);
+
+
+    // if the cursor is at the very start of a line, then we assume that the user does not want
+    // to indent this line, and so we move it up one line
+
+    QTextBlock cb = cursor.block();
+    int column = (cursor.position() - cb.position()) + 1;
+
+    if (column == 1)
+    {
+        cursor.movePosition(QTextCursor::Up, QTextCursor::MoveAnchor);
+        numLines--;
+    }
+
+
+
+    cursor.beginEditBlock();  // this should be seen as a single operation for 'undo' purposes
+
+        for (int i = 0; i < numLines; i++)
+        {
+            cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);  // move it to the start of the line
+            textEditor->setTextCursor(cursor);                                       // send the cursor back to the document
+            textEditor->insertTextIndent(cursor, false);                             // indent the line (needs document cursor)
+            cursor.movePosition(QTextCursor::Up, QTextCursor::MoveAnchor);           // move it to the start of the line
+        }
+
+        cursor.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor);             // move it down a line
+
+    cursor.endEditBlock();  // this should be seen as a single operation for 'undo' purposes
+
+
+    // select the entire blocks again in case the user wants to indent again
+    // - the cursor will be on the first line of the block now
+
+    cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);              // move the anchor to the start of the line
+    cursor.movePosition(QTextCursor::Down,        QTextCursor::KeepAnchor, numLines-1);  // move the cursor to the last line
+    cursor.movePosition(QTextCursor::EndOfLine,   QTextCursor::KeepAnchor);              // move the cursor to the end of the last line
+    textEditor->setTextCursor(cursor);                                                   // send the cursor back to the document
+
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::tabsDialog
+// triggered when the user asks to bring up the 'tabs' dialog
+// ---------------------------------------------------------------------------
+
+void MacroEdit::tabsDialog()
+{
+    // create the dialog if it does not already exist
+
+    if (!tabsDialog_) 
+    {
+        tabsDialog_ = new TabsDialog(this);
+
+        connect(tabsDialog_, SIGNAL(tabsSettingsChanged(TabsSettings)), this, SLOT(onTabsSettingsChanged(TabsSettings)));
+    }
+
+
+    // if created, set it up and display it
+
+    if (tabsDialog_) 
+    {
+        tabsDialog_->show();
+        tabsDialog_->raise();
+        tabsDialog_->activateWindow();
+        tabsDialog_->setupUIBeforeShow(textEditor->tabsSettings());
+    }
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::runDialog
+// triggered when the user asks to bring up the 'run' dialog
+// ---------------------------------------------------------------------------
+
+void MacroEdit::runDialog()
+{
+    // create the dialog if it does not already exist
+
+    if (!runDialog_) 
+    {
+        runDialog_ = new RunDialog(this);
+
+        connect(runDialog_, SIGNAL(runOptionsChanged(MacroRunOptions)), this, SLOT(onRunOptionsChanged(MacroRunOptions)));
+    }
+
+
+    // if created, set it up and display it
+
+    if (runDialog_) 
+    {
+        runDialog_->show();
+        runDialog_->raise();
+        runDialog_->activateWindow();
+        runDialog_->setupUIBeforeShow(runOptions_);
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onTabsSettingsChanged
+// triggered from the Tabs dialog when the user has changed the settings
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onTabsSettingsChanged (TabsSettings settings)
+{
+
+    // display tabs and spaces?
+
+    textEditor->setDisplayTabsAndSpaces(settings.displayTabsAndSpaces);
+
+
+    // has the number of spaces per tab changed?
+
+    bool changeFont = (textEditor->numSpacesInTab() != settings.numSpacesInTab);
+
+
+    // store the new settings
+
+    textEditor->setUseSpacesForTabs    (settings.useSpacesForTabs);
+    textEditor->setNumSpacesInTab      (settings.numSpacesInTab);
+    textEditor->setUseSpacesForDrops   (settings.useSpacesForDrops);
+    textEditor->setDisplayTabsAndSpaces(settings.displayTabsAndSpaces);
+    textEditor->setAutoIndent          (settings.autoIndent);
+
+
+
+    // if the number of spaces per tab has changed, then we need to update the font
+
+    if (changeFont)
+    {
+        changeFontSize(0);
+    }
+
+
+    // also, if the user has already instantiated the code template dialog, then
+    // we should recreate it in order to reflect the new tab settings
+
+    if (codeTemplateDialog_)
+    {
+        codeTemplateDialog_->reloadCodeTemplates(textEditor->tabsSettings());
+    }
+
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onRunOptionsChanged
+// triggered from the Run Options dialog when the user has changed the settings
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onRunOptionsChanged (MacroRunOptions options)
+{
+    // store the new settings
+
+    runOptions_ = options;
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onReadOnlyStatusChanged
+// triggered when the read-only status of the current file changes
+// (XXX NOTE: this is not yet detected, but this function will be used
+// when it is; in the meantime, it can be used in the setup).
+// ---------------------------------------------------------------------------
+/*
+void MacroEdit::onReadOnlyStatusChanged (bool readOnly)
+{
+    action_Built_in_Function->setEnabled(!readOnly);
+    action_List_of_available_functions->setEnabled(!readOnly);
+    actionVerb_Function_Help->setEnabled(!readOnly);
+    actionCode_Template->setEnabled(!readOnly);
+}
+*/
+
+// ---------------------------------------------------------------------------
+// MacroEdit::functionListDialog
+// triggered when the user asks to bring up the 'function list' dialog
+// ---------------------------------------------------------------------------
+
+void MacroEdit::functionListDialog()
+{
+    // create the dialog if it does not already exist
+
+    if (!functionListDialog_) 
+    {
+        // we will give the dialog the path to the file containing the function names
+
+        QString path = languageHelper_->pathToFunctionList();
+        functionListDialog_ = new FunctionListDialog(path, this);
+
+        connect(functionListDialog_, SIGNAL(insertFunctionName(QString)), this, SLOT(onInsertFunctionName(QString)));
+    }
+
+
+    // if created, set it up and display it
+
+    if (functionListDialog_) 
+    {
+        functionListDialog_->setupUIBeforeShow();
+        functionListDialog_->setFont(textEditor->font());
+        functionListDialog_->show();
+        functionListDialog_->raise();
+        functionListDialog_->activateWindow();
+    }
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::codeTemplateDialog
+// triggered when the user asks to bring up the 'code template' dialog
+// ---------------------------------------------------------------------------
+
+void MacroEdit::codeTemplateDialog()
+{
+
+    // no point in even trying if file is read-only
+
+    if (textEditor->isReadOnly())
+    {
+        QMessageBox::warning(this, appName_,
+                             tr("File is read-only."));
+        return;
+    }
+
+
+
+    // create the dialog if it does not already exist
+
+    if (!codeTemplateDialog_) 
+    {
+        // we will give the dialog the path to the file containing the function names
+
+        QString path = languageHelper_->pathToTemplateList();
+        codeTemplateDialog_ = new CodeTemplateDialog(path, this);
+
+        connect(codeTemplateDialog_, SIGNAL(insertCodeTemplate(QString)), this, SLOT(onInsertCodeTemplate(QString)));
+    }
+
+
+    // if created, set it up and display it
+
+    if (codeTemplateDialog_) 
+    {
+        //functionListDialog_->setFont(textEditor->font());
+        codeTemplateDialog_->reloadCodeTemplates(textEditor->tabsSettings());
+        codeTemplateDialog_->show();
+        codeTemplateDialog_->raise();
+        codeTemplateDialog_->activateWindow();
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onInsertFunctionName
+// triggered from the Function List dialog when the user has selected a function
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onInsertFunctionName (QString function)
+{
+    QString text = function + "()";         // eg: stdev()
+    textEditor->insertPlainText (text);
+
+    // move the cursor to inside the brackets
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+    cursor.movePosition(QTextCursor::Left, QTextCursor::MoveAnchor, 1);  // move it left one space
+    textEditor->setTextCursor(cursor);               // send the cursor back to the document
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onInsertCodeTemplate
+// triggered from the Code Template dialog when the user has selected a template
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onInsertCodeTemplate (QString codeTemplate)
+{
+    textEditor->insertPlainText (codeTemplate);
+
+
+    // move the cursor to just after the new code
+//    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+//    cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, codeTemplate.count());
+//    textEditor->setTextCursor(cursor);               // send the cursor back to the document
+}
+
+
+// ---------------------------------------------------------------------------------
+// MacroEdit::onInsertTextIntoFunctionCall
+// triggered from dialogs when text is to be inserted into the current function call
+// ---------------------------------------------------------------------------------
+
+void MacroEdit::onInsertTextIntoFunctionCall (QString text)
+{
+
+    // here we ASSUME that function calls are of the form:
+    //    func_name <optional whitespace> (<parameters>)
+    // e.g. pcont(contour:'on')
+    // but the user may not have yet typed the opening bracket...
+    // so we have to search.
+    // NOTE that this will have to change when we have this sort of help available
+    // for MagML - more of this intelligence will have to go into the LanguageHelper classes.
+
+    QString preString;
+    QString postString;
+
+
+
+
+    
+    // first, ensure we are past the function name
+
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+
+    cursor.beginEditBlock();  // this should be seen as a single operation for 'undo' purposes
+
+    int lastPosition = cursor.position();            // store the cursor's current position, because we will want to restore it
+    cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor, 2);  // move it to the end of the word
+    textEditor->setTextCursor(cursor);               // send the cursor back to the document
+
+
+    // qDebug() << "char: " << textEditor->characterBehindCursor();
+
+    // if the cursor is now just ahead of an open bracket, then good; otherwise
+    // we may be just ahead of a closed bracket e.g. pcont(), and we need to go
+    // back a space; otherwise we should insert an open bracket.
+
+    QChar charBehindCursor = textEditor->characterBehindCursor();
+
+    if (charBehindCursor != QChar('('))
+    {
+        if (charBehindCursor == QChar(')'))  // we are just in front of ')'
+        {
+            // move the cursor back one place
+            cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::MoveAnchor, 1);
+            textEditor->setTextCursor(cursor);
+        }
+        else
+        {
+            // no function brackets - we must insert these ourself (and move
+            // the cursor between them)
+            textEditor->insertPlainText ("()");
+            cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::MoveAnchor, 1);
+            textEditor->setTextCursor(cursor);
+        }
+    }
+
+
+    // check whether the next character is a closed bracket - if it is, then
+    // we will not want to put an ending comma and new line
+
+    cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor, 2);  // move it to the end of the word
+
+    if (textEditor->characterBehindCursor(&cursor) != QChar(')'))
+    {
+        postString = ",\n";
+    }
+
+
+    textEditor->insertPlainText (text + postString);
+
+
+    // restore the cursor's original position
+
+    cursor.setPosition(lastPosition);
+    textEditor->setTextCursor(cursor);               // send the cursor back to the document
+
+
+    cursor.endEditBlock();  // this should be seen as a single operation for 'undo' purposes
+
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::insertLicenceText
+// triggered from the Insert Licence Text action
+// ---------------------------------------------------------------------------
+
+void MacroEdit::insertLicenceText ()
+{
+    if (licenceText_.isEmpty())
+    {
+        string licenceTextPath = MakeSystemEtcPath("licence_for_macros.txt");
+
+        QFile file(licenceTextPath.c_str());
+        if (file.open(QIODevice::ReadOnly))
+        {
+            // read the file into a string, and replace the year placeholder with the real thing
+            int year = QDateTime::currentDateTime ().date().year();
+            QString yearString = QString::number(year);
+            QTextStream ts(&file);
+            licenceText_ = ts.readAll();
+            licenceText_.replace("[YEAR]", yearString);
+        }
+        else
+        {
+            QMessageBox::warning(this, appName_,
+                                 tr("Cannot read file %1:\n%2.")
+                                 .arg(licenceTextPath.c_str())
+                                 .arg(file.errorString()));
+            return;
+        }
+    }
+
+
+    // we want to put the text at the top of the file, but if there is a Metview Macro
+    // header, then we should put the licence text AFTER that.
+
+    const int numLinesToLookForHeader = 3;
+    int line = 0;
+    QTextBlock b;
+    QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+    
+    cursor.beginEditBlock();  // this should be seen as a single operation for 'undo' purposes
+
+    // search the first few lines
+
+    for (b = textEditor->document()->begin();
+         (line < numLinesToLookForHeader) && (b != textEditor->document()->end());
+         b = b.next(), line++)
+    {
+        cursor.setPosition(b.position());
+        QString lineText = cursor.block().text();
+
+        if (languageHelper_->isHeaderLine(lineText))
+        {
+            // move the cursor onto the next line, then insert a newline
+
+            cursor.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor);
+            textEditor->setTextCursor(cursor);  // send the cursor back to the document
+            textEditor->insertPlainText("\n");  // add the newline
+            break;  // do not need to check the other lines
+        }
+    }
+
+
+    // not found? then put the text at the start of the document
+
+    if (line == numLinesToLookForHeader || b == textEditor->document()->end())
+    {
+        cursor.movePosition(QTextCursor::Start);
+        textEditor->setTextCursor(cursor);  // send the cursor back to the document
+
+        QString requiredHeader = languageHelper_->requiredHeaderLine();
+        if (!requiredHeader.isEmpty())
+        {
+            textEditor->insertPlainText(requiredHeader);
+        }
+    }
+
+    textEditor->insertPlainText (languageHelper_->commentBlock(licenceText_)); // add the text at the current cursor position
+
+    cursor.endEditBlock();  // this should be seen as a single operation for 'undo' purposes
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::verbFunctionHelpDialog
+// triggered when the user asks to bring up the verb function help dialog
+// ---------------------------------------------------------------------------
+
+void MacroEdit::verbFunctionHelpDialog()
+{
+    // create the dialog if it does not already exist
+
+    if (!verbFunctionHelpDialog_) 
+    {
+        // we will give the dialog the path to the file containing the function names
+
+        //QString etcDir = getenv ("METVIEW_DIR_SHARE");
+
+        //if (!etcDir.isEmpty())
+        //    etcDir += "/";
+
+        //QString fileName = etcDir + "etc/macro_built_in_functions.txt";
+
+        verbFunctionHelpDialog_ = new VerbFunctionHelpDialog;//(fileName, this);
+
+        //connect(functionListDialog_, SIGNAL(insertFunctionName(QString)), this, SLOT(onInsertFunctionName(QString)));
+        connect(verbFunctionHelpDialog_, SIGNAL(sendTextToBeInsertedIntoFunctionCall(QString)), this, SLOT(onInsertTextIntoFunctionCall(QString)));
+    }
+
+
+    // if created, set it up and display it
+
+
+    if (verbFunctionHelpDialog_) 
+    {
+        QString currentWord = wordUnderCursor();
+        
+        verbFunctionHelpDialog_->helpForFunction (languageHelper_->verbFunctionHelp(), currentWord);
+
+        //functionListDialog_->setupUIBeforeShow();
+        //functionListDialog_->setFont(textEditor->font());
+    } 
+}
+
+
+
+
+
+
+void MacroEdit::processDrop(MvQIconDropItem* drop)
+{
+    // create a temporary file
+    Path temp(::marstmp());
+    QString outpath(temp.str().c_str());
+    QString iconPath(drop->fullName().c_str());
+    
+    // convert icon information to a Macro language text
+
+    QString num = "";  // default, meaning 'use tabs, not spaces'
+    if (textEditor->useSpacesForTabs() && textEditor->useSpacesForDrops() && textEditor->numSpacesInTab())
+        num = QString::number(textEditor->numSpacesInTab()); // use spaces, not tabs
+
+    QString st = "$METVIEW_BIN/mvimport \"" + iconPath + "\" " + outpath + " " + num;
+//cout << "string " << st.c_str() << endl;
+    system(st.toUtf8().constData());
+
+
+    // we know where the drop occurred, so get a new text cursor at that location
+    // so that the generated text will be inserted there
+    //QTextCursor currentCursor = textEditor->textCursor();
+    QPoint p(drop->x(), drop->y());
+    QTextCursor tempCursor(textEditor->cursorForPosition (p));
+    textEditor->setTextCursor(tempCursor);
+
+    // insert text to the Macro editor
+    QFile file(temp.str().c_str());
+    if (file.open(QIODevice::ReadOnly | QIODevice::Text))
+         textEditor->insertPlainText(file.readAll());
+
+    //textEditor->setTextCursor(currentCursor);
+
+
+    // delete temporary file
+    temp.remove();
+}
+
+//==============================
+// Drag and drop from Metview
+//==============================
+
+void MacroEdit::metview_dnd()
+{
+    Atom CanDropAtom   = XInternAtom(QX11Info::display(),"ICON_CAN_DRAG_DROP",False);
+    string atomname="qtMv_MacroEdit widget";
+
+    XChangeProperty(
+        QX11Info::display(),
+        textEditor->winId(),
+        CanDropAtom,
+        XA_WINDOW,
+        8,
+        PropModeReplace,
+        (unsigned char *) atomname.c_str(),
+        strlen(atomname.c_str())+1);
+
+      {
+        Atom  type;
+        int format;
+        unsigned long nitems, left;
+        unsigned char *retdata;
+
+        int atomnum=0;
+        Atom *atomlist=XListProperties(QX11Info::display(),textEditor->winId(),&atomnum);
+        int i;
+        for(i=0; i< atomnum; i++)
+        {
+            char *s =XGetAtomName(QX11Info::display(), atomlist[i]); 
+            XGetWindowProperty(QX11Info::display(),textEditor->winId(),atomlist[i]
+            , 0,4,False,AnyPropertyType,
+                    &type, &format, &nitems,&left,&retdata);
+
+            if(strcmp(s,"_NET_WM_NAME") == 0)
+            {                
+                printf("  data: %s\n",retdata);
+            }    
+            XFree(s);
+        }
+        XFree(atomlist);
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::run
+// triggered when the user clicks 'Run'
+// ---------------------------------------------------------------------------
+
+void MacroEdit::run(void)
+{
+    runMacro (runOptions_);
+}
+
+
+
+/*
+// ---------------------------------------------------------------------------
+// MacroEdit::debug
+// triggered when the user clicks 'Debug'
+// ---------------------------------------------------------------------------
+
+void MacroEdit::debug(void)
+{
+    MacroRunOptions options(runOptions_);
+    options.trace_ = true;    // 'true' == generate debug output
+    runMacro (options);
+}
+*/
+
+void MacroEdit::stop(void)
+{
+/*    QString monitorProgPath = getenv ("METVIEW_BIN");
+
+    if (!monitorProgPath.isEmpty())
+    {
+        monitorProgPath += "/mvmon";
+    }
+*/
+
+    MvRequest r;
+    MvApplication::callService("mvmon",r,NULL);
+
+
+/*
+    MvRequest r("MACRO");
+
+    r("PATH")     = fileName_.toUtf8().constData();// path to macro
+    r("_NAME")    = fileName_.toUtf8().constData();// path to macro
+    r("_CLASS")   = "MACRO";
+    r("_ACTION")  = "prepare";
+    r("_SERVICE") = "macro";
+    r("_TRACE")   = 0;
+
+    logMessages->clear();
+
+//    cout << " ---> send " << *this << endl;
+    r.print();
+
+//    app_->callService("macro", r, NULL);
+    callService("macro", r);
+
+//    cout << " <--- send " << *this << endl;
+*/
+
+//    task_ = new MacroRunTask(*this,a,temp_,trace);
+
+    logMessages->insertPlainText ("STOPPED!");
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::monitor
+// Called when the user clicks on the Process Monitor button
+// ---------------------------------------------------------------------------
+
+
+void MacroEdit::monitor(void)
+{
+    MvRequest r;
+    MvApplication::callService("mvmon", r, NULL);
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::external
+// called when the user clicks to open the file in an external editor
+// ---------------------------------------------------------------------------
+
+void MacroEdit::external(void)
+{
+    QString command = getenv ("METVIEW_EDITOR");
+    QString quote = "\"";
+
+    command += " " + quote + fileName_ + quote;
+
+    QProcess runExternal;
+    QString  msg;
+    
+    if (runExternal.startDetached (command))
+        msg = tr("Started ");
+    else
+        msg = tr("<font color=red>Could not start</font> ");
+
+    statusMessage(msg + "'" + command + "'", 5000);
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::runMacro
+// Runs the macro, optionally with debug output.
+// The actual running of the macro is performed in a new thread, which
+// processes any Metview messages passed by the macro.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::runMacro(MacroRunOptions options)
+{
+
+    // if the document has been modified, then save - currently, we do not
+    // ask the user first - should we?
+
+    if (textEditor->document()->isModified())
+    {
+        save();
+    }
+
+
+    // reset the message log
+
+    logMessages->clear();
+    logMessages->show();
+
+
+    // for a macro with lots of output messages, it can be quite inefficient to visually
+    // update the message log widget for each and every line of output. Therefore, we
+    // set a timer to update the widget at regular intervals. It is also updated when
+    // the macro finishes, so for quick macros, the user will not see any difference.
+    
+    logMessages->setUpdatesEnabled(false);
+    logTimer_.setInterval(500);
+    connect(&logTimer_, SIGNAL(timeout()), this, SLOT(updateMessageLog()) );
+    logTimer_.start();  // start the interval timer we use to update the message log
+
+
+    // tell the user that we are starting, and grey out the 'run' buttons
+    // and anything else that should not be touched whilst the macro is running
+
+    statusMessage(tr("Program running..."), 0);
+    enableRunActions (false);
+
+
+    time_.start();   // start the timer we use to determine how long the macro took
+
+
+    // before creating the new thread, delete the old one
+
+    if (runThread_)
+        delete runThread_;
+
+
+   // start the macro running in a new thread
+   
+    runThread_ = new runMacroThread(this, fileName_, options);
+    runThread_->start();
+}
+
+
+
+
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::macroFinished
+// Called when the macro has finished
+// ---------------------------------------------------------------------------
+
+void MacroEdit::macroFinished (int errorCode)
+{
+    QString elapsedMsg;
+
+    int ms = time_.elapsed();  // get the elapsed time since the macro was started
+    QString finishedTime(tr(" [Finished at ") + time_.toString() + "]");
+
+    double seconds = ms / 1000.0;
+    int wholeSeconds = (int) seconds;
+    
+    if (wholeSeconds > 0 )
+    {
+        double minutes      = seconds / 60.0;
+        int    wholeMinutes = (int) minutes;
+        
+        if (wholeMinutes > 0)
+        {
+            int remainingSeconds = seconds - (wholeMinutes*60);
+            elapsedMsg = QString("%1 m, %2 s").arg(wholeMinutes).arg(remainingSeconds, 2);
+        }
+        else
+        {
+            elapsedMsg = QString("%1 s").arg(seconds, 0, 'g', 4);
+        }
+    }
+    else
+    {
+        elapsedMsg = QString("%1 ms").arg(ms, 2);
+    }
+
+
+    if(errorCode)
+    {
+        statusMessage(tr("Program finished <font color=red>(FAILED)</font> : ") + elapsedMsg + finishedTime);
+        highlightLine(-2);  // set a warning colour on the highlight line
+        //editor_.logMessage("FAILED");
+        //Task::failure();
+    }
+    else
+    {
+        statusMessage(tr("Program finished <font color=green>(OK)</font> : ") + elapsedMsg + finishedTime);
+        highlightLine(-1);  // un-highlight the highlight line
+        //editor_.logMessage("RUN OK");
+        //Task::success(r);
+    }
+
+    updateMessageLog();
+    logMessages->setUpdatesEnabled(true);
+    logTimer_.stop();
+
+
+    // terminate the thread which handles the Metview message processing
+    // - otherwise it will continue indefinitely
+    // XXX is there a nicer way to do this? Perhaps passing some message
+    // into the Metview message queue??
+
+    runThread_->terminate();
+
+//    while (runThread_->isRunning())
+//    {
+//        eventLoop_.processEvents();
+//    }
+    
+//    threadFinished();
+
+
+
+    // wait a little bit before enabling the 'run' buttons
+    // - to make absolutely sure that there is no change of the thread
+    // being run twice simultaneously.
+    // it also gives the user a little feedback if their macro has run very quickly
+
+    buttonTimer_.setInterval(250);
+    connect(&buttonTimer_, SIGNAL(timeout()), this, SLOT(threadFinished()) );
+    buttonTimer_.start();  // start the interval timer we use to update the message log
+
+
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::threadFinished
+// Called when the thread has finished
+// ---------------------------------------------------------------------------
+
+void MacroEdit::threadFinished ()
+{
+    enableRunActions (true);
+    buttonTimer_.stop();
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::logMessage
+// Writes the string to the log area. The string is parsed in case it
+// contains an error message and will be printed differently if it does.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::logMessage(const string &s)
+{
+    static const QString cr("\n");
+
+    // Check for errors
+    if (checkForErrorMessage(s))
+    {
+        // if true, then we'll have an HTML string to add to the log...
+        // ... but the message string might have characters that are 'special' in
+        // HTML, so we need to do some translation...
+        // Note that for some reason we need to add an extra space after closing the <b>
+        // directive, because otherwise it does not seem to register that it's been closed
+        // and every subsequent string will be displayed in bold...
+        QString qs (s.c_str());
+        qs.replace ("<", "<");
+        qs.replace (">", ">");
+        qs =  "<b>" + qs + "</b> ";
+        logMessages->appendHtml (qs);
+    }
+    
+    else
+    {
+        // otherwise, we just have plain text
+        QString qs (s.c_str());
+        logMessages->appendPlainText (qs);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::stepLineNumber
+// Called when the macro steps onto a new line, supplied as the argument
+// ---------------------------------------------------------------------------
+
+void MacroEdit::stepLineNumber(const int line)
+{
+    highlightLine(line);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::checkForErrorMessage
+// Parses the given string to see whether it is an error message or not.
+// ---------------------------------------------------------------------------
+
+bool MacroEdit::checkForErrorMessage(const string &s)
+{
+    int len = s.length();
+
+    // Check for errors
+    // Error messages are of the form:
+    // "Line xx: blah blah"
+    // or
+    // "Line xx in 'file': blah blah"
+    if( 
+        len  > 6    &&
+        s[0] == 'L' &&
+        s[1] == 'i' &&
+        s[2] == 'n' &&
+        s[3] == 'e' &&
+        s[4] == ' ')
+    {
+        int n = 5;
+        int m = 0;
+        while(n < len && isdigit(s[n]))
+        {
+            m *= 10;
+            m += s[n] - '0';
+            n++;
+        }
+        if (s[n] == ':' || (s[n++] == ' ' && s[n++] == 'i' && s[n++] == 'n'))
+        {
+            gotoLine (m);
+//            s = "<a href='silly'>" + s + "</a>";
+            return true;  // we found an error message
+        }
+    }
+    
+    return false;  // no errors
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::updateRowColLabel
+// Called when the cursor's position is changed in the editor. The row/col
+// indicator is updated with the current coordinates.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::updateRowColLabel()
+{
+    int line, column;
+
+    textEditor->cursorRowCol(&line, &column);
+
+    QString status = QString("L: %1, C: %2")
+                     .arg(line).arg(column);
+    rowColLabel_->setText (status);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::updateMessageLog
+// Although messages are (potentially) being added to the log all the time,
+// we do not update its display as soon as we can, because this can
+// degrade performance. Instead, we periodically update the display - this
+// is that function.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::updateMessageLog()
+{
+//    static int i = 0;
+//    static bool locked = false;
+    
+//    if (locked && !necessary) {logMessages->insertPlainText ("LOCKED!\n"); return;}
+    
+//    locked = true;
+//    QString status = QString("%1").arg(i++);
+//    rowColLabel_->setText(status);
+    logMessages->setUpdatesEnabled(true);
+//    logMessages->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
+//    logMessages->ensureCursorVisible();
+    logMessages->show();
+    logMessages->setUpdatesEnabled(false);
+//    locked = false;
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::statusMessage
+// Sets the message on the status bar. In theory, we might like to only
+// display a message for a set time, but this functionality is currently
+// not operational because we can't use the standard function to update
+// the status bar because we want to display html text on it and therefore
+// have a custom label there instead which cannot have a 'timed' display.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::statusMessage(const QString &msg, int)
+{
+    // second parameter is 'timeToDisplay', but that function is not
+    // currently active, so we remove the name to avoid compiler warnings
+
+//    if (timeToDisplay != 0)
+//        statusBar()->showMessage (msg, timeToDisplay);
+//    else
+        messageLabel_->setText (msg);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::print
+// Provides a print dialog and lets the user print the document.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::print(void)
+{
+    // let the user select a printer
+
+    QPrinter printer;
+    QPrintDialog *dialog = new QPrintDialog(&printer, this);
+
+    dialog->setWindowTitle(tr("Print Document"));
+
+
+    // give the option to only print the current selection?
+
+    if (textEditor->textCursor().hasSelection())
+        dialog->addEnabledOption(QAbstractPrintDialog::PrintSelection);
+
+    if (dialog->exec() != QDialog::Accepted)
+        return;
+
+
+    // now do the actual printing
+
+    textEditor->document()->print(&printer);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::check_syntax
+// Called when the user clicks the 'Check Syntax' button.
+// Functionality is very similar to runMacro(), so see the comments there
+// for more information.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::check_syntax(void)
+{
+    // save the document first?
+
+    if (textEditor->document()->isModified())
+    {
+        save();
+    }
+
+
+    logMessages->clear();
+    logMessages->show();
+
+    statusMessage(tr("Checking syntax running..."), 0);
+    enableRunActions(false);
+
+    time_.start();   // start the timer we use to determine how long the macro took
+
+
+    if (runThread_)
+        delete runThread_;
+
+    MacroRunOptions options;
+    options.runMode_ = "syntax";
+    runThread_ = new runMacroThread(this, fileName_, options);   // start the macro running in a new thread
+    runThread_->start();
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::enableRunActions
+// Enables (true) or disables (false) the actions which should not be
+// possible whilst the macro is running.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::enableRunActions(bool enable)
+{
+    enableActionsForCurrentLanguage(enable);  // takes care of run, debug and syntax checking
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onFocusRegained
+// Called when we regain focus
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onFocusRegained ()
+{
+    if (!haveFocus_)
+    {
+        QFileInfo fi (fileName_);
+        QDateTime dt = fi.lastModified();
+
+
+        // if the read-only status has changed, then we WILL update the editor
+
+        if (fi.isWritable() == readOnly_)  // ie, if the read-only status is different
+        {
+            setCurrentFile(fileName_);
+        }
+
+
+        // has the file been modified since we loaded it or saved it?
+
+        if (dt > lastSaveTime_)
+        {
+            // yes - ask the user if they want to reload the document from disk
+
+            int ret = QMessageBox::warning(this, appName_,
+                       tr("The document has been externally modified (%1).\n"
+                         "Do you want to reload from disk?\n")
+                         .arg(dt.toString(Qt::SystemLocaleShortDate)),
+                       QMessageBox::Yes | QMessageBox::Default,
+                       QMessageBox::No  | QMessageBox::Escape);
+
+            if (ret == QMessageBox::Yes)
+            {
+                reload();   // reload the file
+            }
+
+            else  // user has selected not to reload the file from disk
+            {
+                setCurrentFile(fileName_, true);  // note the current save time so we don't
+                                                  // issue this message until it's changed again
+
+
+                // to force the editor to save the current macro; otherwise it will run
+                // the exernally saved version, which is not the version in the editor
+                // and this will cause all sorts of confusion...
+
+                textEditor->document()->setModified(true);
+                setWindowModified(true);
+            }
+        }
+
+        haveFocus_ = true;
+    }
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::onFocusRegained
+// Called when we lose focus. Note that this might just mean that we are
+// displaying a dialog box.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::onFocusLost ()
+{
+   // we've only *really* lost focus if none of our widgets have it
+
+    if (QApplication::focusWidget () == 0)
+        haveFocus_ = false;
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::setFontSize
+// Sets the size of the font used in the editor
+// ---------------------------------------------------------------------------
+
+void MacroEdit::setFontSize(int newSize)
+{
+    if (newSize > 2 && newSize < 64)
+    {
+        QFont font;
+        font.setFamily("Courier");
+        font.setFixedPitch(true);
+        font.setPointSize(newSize);
+        textEditor-> setFont(font);
+        logMessages->setFont(font);
+        QFontMetrics fm(font);
+        textEditor-> setTabStopWidth(fm.width(QLatin1Char(' ')) * textEditor->numSpacesInTab()); // ensure the tab stops (in pixels)
+        logMessages->setTabStopWidth(fm.width(QLatin1Char(' ')) * textEditor->numSpacesInTab()); // match the equivalent number of spaces
+        
+        fontSize_ = newSize;
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::changeFontSize
+// Changes the size of the font used in the editor by the specified amount
+// ---------------------------------------------------------------------------
+
+void MacroEdit::changeFontSize(int amount)
+{
+    setFontSize (fontSize_ + amount);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::enlargeFont
+// Increases the size of the font used in the editor
+// ---------------------------------------------------------------------------
+
+void MacroEdit::enlargeFont()
+{
+    changeFontSize(1);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::shrinkFont
+// Reduces the size of the font used in the editor
+// ---------------------------------------------------------------------------
+
+void MacroEdit::shrinkFont()
+{
+    changeFontSize(-1);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::normalFont
+// Sets the size of the font used in the editor to the 'normal' size
+// ---------------------------------------------------------------------------
+
+void MacroEdit::normalFont()
+{
+    setFontSize(11);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::largeFont
+// Sets the size of the font used in the editor to the 'large' size
+// (mainly for presentations)
+// ---------------------------------------------------------------------------
+
+void MacroEdit::largeFont()
+{
+    setFontSize(30);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::showLineNumbers
+// Toggles whether we show the line numbers or not
+// ---------------------------------------------------------------------------
+
+void MacroEdit::showLineNumbers(bool show)
+{
+    textEditor->setShowLineNumbers(show);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::highlightLine
+// Highlights the given line. Supply -1 to remove the highlight.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::highlightLine(int line)
+{
+    int bn = 0;
+    QTextBlock b;
+    QColor highlightColour(202, 225, 255);
+
+
+    // trivial case - do not re-highlight the same line again
+
+    if (line == highlightedLine_)
+        return;
+
+
+    // special case: -1 means 'un-highlight' the line
+    
+    if (line == -1)
+    {
+        QList<QTextEdit::ExtraSelection> empty;
+        textEditor->setExtraSelections(empty);
+        highlightedLine_ = line;
+        return;
+    }
+    
+
+    // another special case: -2 means 're-highlight the current line in a warning colour'
+
+    if (line == -2)
+    {
+        highlightColour.setRgb(255, 220, 220);
+    }
+    
+    else
+    {
+        highlightedLine_ = line;
+    }
+
+    if (line <= textEditor->document()->blockCount())
+    {
+        for (b = textEditor->document()->begin(); b != textEditor->document()->end(); b = b.next())
+        {
+            if (bn == highlightedLine_-1)
+            {
+                QTextEdit::ExtraSelection highlight;
+                highlight.cursor = textEditor->textCursor();
+                highlight.cursor.setPosition (b.position());
+                highlight.format.setProperty(QTextFormat::FullWidthSelection, true);
+//                    highlight.format.setBackground(QColor(232, 232, 255));
+                highlight.format.setBackground(highlightColour);
+
+                QList<QTextEdit::ExtraSelection> extras;
+                extras << highlight;
+                textEditor->setExtraSelections( extras );
+                break;
+
+                //QTextCursor cursor = textEditor->textCursor();   // get the document's cursor
+                //cursor.setPosition (b.position());               // set it to the right position
+                //cursor.select(QTextCursor::LineUnderCursor);     // select the whole line
+                //textEditor->setTextCursor(cursor);               // send the cursor back to the document
+                //break;
+            }
+            bn++;
+        }
+    }
+
+    else
+    {
+        //statusMessage(tr("Line not in document"), 0);
+    }
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::languageChosen
+// Called when a programming language is chosen. We call setLanguage()
+// to use the language corresponding to the given action
+// ---------------------------------------------------------------------------
+
+void MacroEdit::languageChosen(QAction *action)
+{
+    QString language = action ->iconText();
+
+    setLanguage (language);
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::setLanguage
+// Sets the programming language to specialise the editor for. We use the
+// factory to create a new language helper corresponding to the given name
+// ---------------------------------------------------------------------------
+
+void MacroEdit::setLanguage(const QString &language)
+{
+    languageHelper_ = languageHelperFactory_.languageHelper(language);
+
+    if (highlighter_) delete highlighter_;
+
+    highlighter_ = languageHelper_->createHighlighter(textEditor->document());
+
+    highlighter_->rehighlight();
+
+    setLanguageMenuCheckedStatus();
+
+
+    // update the menus for the new language
+
+    enableActionsForCurrentLanguage(true);
+
+
+    // does this language provide a list of built-in functions or code templates?
+
+    action_Built_in_Function->setEnabled (!readOnly_ && !languageHelper_->pathToFunctionList().isEmpty());
+    actionCode_Template     ->setEnabled (!readOnly_ && !languageHelper_->pathToTemplateList().isEmpty());
+
+    //action_List_of_available_functions->setEnabled(!readOnly_);
+
+
+
+    // window title
+
+    QString langName = languageHelper_->name();
+    //setWindowTitle(tr("Metview ") + langName + tr("Macro Editor [*]"));
+}
+
+// ---------------------------------------------------------------------------
+// MacroEdit::enableActionsForCurrentLanguage
+// Enables the actions which are valid for the current language
+// ---------------------------------------------------------------------------
+
+void MacroEdit::enableActionsForCurrentLanguage(bool enable)
+{
+    actionRun        ->setEnabled (enable && languageHelper_->canRun());
+    //actionDebug      ->setEnabled (enable && languageHelper_->canDebug());
+    actionCheckSyntax->setEnabled (enable && languageHelper_->canCheckSyntax());
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::setLanguageMenuCheckedStatus
+// Unchecks all the language menu items, then checks the currently selected one
+// ---------------------------------------------------------------------------
+
+void MacroEdit::setLanguageMenuCheckedStatus()
+{
+    // loop through the language menu items
+    // - uncheck the ones that are not the current language
+    // - check the one that is
+
+    for (size_t i = 0; i < languageActions_.size(); i++)
+    {
+        QString language = languageActions_[i]->iconText();
+        languageActions_[i]->setChecked(languageHelper_->isLanguageName(language));
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::setAutoInsertLicence
+// Sets the status of the flag to say whether we want to automatically insert
+// the licence text when we open an empty file. Ensures that the menu options
+// are correctly set.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::setAutoInsertLicence(bool setting)
+{
+    autoInsertLicence_ = setting;
+
+    if (autoInsertLicence_)
+    {
+        if (!actionAutoInsertLicenceOn->isChecked())
+            actionAutoInsertLicenceOn->setChecked(true);
+    }
+    else
+    {
+        if (!actionAutoInsertLicenceOff->isChecked())
+            actionAutoInsertLicenceOff->setChecked(true);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::autoInsertLicence
+// If set, automatically insert the licence text if this is an empty file.
+// ---------------------------------------------------------------------------
+
+void MacroEdit::autoInsertLicence()
+{
+    if (autoInsertLicence_ && languageHelper_->isAutoLicenceTextAllowed())
+    {
+        if (textEditor->document()->isEmpty())
+        {
+            insertLicenceText();
+            statusMessage(tr("Licence text automatically added. See the Settings menu to change this behaviour."), 2000);
+
+        }
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::writeSettings
+// Saves the editor's settings (such as font size, window size)
+// ---------------------------------------------------------------------------
+
+void MacroEdit::writeSettings()
+{
+
+    QSettings settings; // no parameters required because they are in MvMain
+	
+    settings.beginGroup ("mainWindow");
+        settings.setValue ("geometry",             saveGeometry());
+        settings.setValue ("state",                saveState());
+        settings.setValue ("splitter",             splitter->saveState());
+        settings.setValue ("fontSize",             fontSize_);
+        settings.setValue ("useSpacesForTabs",     textEditor->useSpacesForTabs());
+        settings.setValue ("numSpacesInTab",       textEditor->numSpacesInTab());
+        settings.setValue ("useSpacesForDrops",    textEditor->useSpacesForDrops());
+        settings.setValue ("displayTabsAndSpaces", textEditor->displayTabsAndSpaces());
+        settings.setValue ("autoIndent",           textEditor->autoIndent());
+        settings.setValue ("showLineNumbers",      textEditor->showLineNumbers());
+        settings.setValue ("autoInsertLicence",    autoInsertLicence_);
+    settings.endGroup();
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroEdit::readSettings
+// Reads the editor's settings (such as font size, window size)
+// ---------------------------------------------------------------------------
+
+void MacroEdit::readSettings()
+{
+    QSettings settings; // no parameters required because they are in MvMain
+    int  newFontSize, numSpacesInTab;
+    bool useSpacesForTabs, useSpacesForDrops, displayTabsAndSpaces, autoIndent, visLineNumbers,
+         autoInsertLicence;
+	
+    settings.beginGroup ("mainWindow");
+        restoreGeometry        (settings.value("geometry").toByteArray());
+        restoreState           (settings.value("state").toByteArray());
+        splitter->restoreState (settings.value("splitter").toByteArray());
+        newFontSize          =  settings.value("fontSize").toInt();
+        useSpacesForTabs     =  settings.value("useSpacesForTabs",     true).toBool();
+        numSpacesInTab       =  settings.value("numSpacesInTab",       4).toInt();
+        useSpacesForDrops    =  settings.value("useSpacesForDrops",    true).toBool();
+        displayTabsAndSpaces =  settings.value("displayTabsAndSpaces", false).toBool();
+        autoIndent           =  settings.value("autoIndent",           true).toBool();
+        visLineNumbers       =  settings.value("showLineNumbers",      true).toBool();
+        autoInsertLicence    =  settings.value("autoInsertLicence",    false).toBool();
+    settings.endGroup();
+
+    textEditor->setUseSpacesForTabs(useSpacesForTabs);
+    textEditor->setNumSpacesInTab(numSpacesInTab);
+    textEditor->setUseSpacesForDrops(useSpacesForDrops);
+    textEditor->setDisplayTabsAndSpaces(displayTabsAndSpaces);
+    textEditor->setAutoIndent(autoIndent);
+    actionShow_Line_Numbers->setChecked(visLineNumbers);
+    setAutoInsertLicence(autoInsertLicence);
+    setFontSize(newFontSize);
+}
+
+
+
diff --git a/src/MacroEditor/MacroEdit.h b/src/MacroEditor/MacroEdit.h
new file mode 100644
index 0000000..386fa05
--- /dev/null
+++ b/src/MacroEditor/MacroEdit.h
@@ -0,0 +1,351 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MacroEdit_H
+#define MacroEdit_H
+
+#include <iostream>
+#include <MvRequest.h>
+#include <MvQDragDrop.h>
+#include "MacroEdit.ui.h"
+#include "Highlighter.h"
+#include "LanguageHelper.h"
+#include "LanguageHelperFactory.h"
+#include "VerbFunctionHelpDialog.h"
+#include "MacroRunOptions.h"
+
+
+#include <QStandardItemModel>
+#include <QPixmap>
+#include <QPalette>
+#include <QLabel>
+#include <QTimer>
+#include <QTime>
+#include <QThread>
+
+using namespace std;
+
+class FindTextDialog;
+class GotoLineDialog;
+class TabsDialog;
+class RunDialog;
+class FunctionListDialog;
+class CodeTemplateDialog;
+
+
+
+template<class T>
+class Handle {
+	T* ptr_;
+public:
+      
+	Handle(T* ptr = 0) : ptr_(ptr) 
+		{ /*if(ptr_) ptr_->attach();*/ }
+
+	virtual ~Handle()   
+		{ /*if(ptr_) ptr_->detach();*/ }
+
+	Handle(const Handle<T>& other): ptr_(other.ptr_) 
+		{ /*if(ptr_) ptr_->attach();*/ }
+
+	Handle<T>& operator=(const Handle<T>& other) 
+	{
+		if(ptr_ != other.ptr_)
+		{
+			/*if(ptr_) ptr_->detach();*/
+			ptr_ = other.ptr_;
+			/*if(ptr_) ptr_->attach();*/
+		}
+		return *this;
+	}
+
+	T* operator->() const { return ptr_; }
+	T& operator*()  const { return *ptr_; }
+
+	operator T*() const { return ptr_; }
+
+	bool operator<(const Handle<T>& other) const
+		{ return ptr_ < other.ptr_; }
+	
+};
+
+
+
+
+//class Request;
+
+//class ReplyObserver : public virtual Counted  {
+class ReplyObserver : public QObject{
+
+Q_OBJECT
+
+public:
+
+	ReplyObserver();
+	virtual ~ReplyObserver(); // Change to virtual if base class
+
+	virtual void reply(const MvRequest&,int) = 0;
+	virtual void progress(const MvRequest&) = 0;
+	virtual void message(const string&) = 0;
+    void attach();   //ir
+    void detach();   //ir
+
+protected:
+
+	void callService(const string&,const MvRequest&);
+
+private:
+
+// No copy allowed
+
+	ReplyObserver(const ReplyObserver&);
+	ReplyObserver& operator=(const ReplyObserver&);
+
+};
+
+
+class ReplyObserverH : public Handle<ReplyObserver> {
+public:
+	ReplyObserverH(ReplyObserver* o) : Handle<ReplyObserver>(o) {}
+};
+
+
+
+
+
+
+class MacroEdit;
+
+
+//class MacroRunTask : public Task, public ReplyObserver {
+class MacroRunTask : public ReplyObserver {
+
+Q_OBJECT
+
+public:
+
+	MacroRunTask (MacroEdit *editor, QString &macro, MacroRunOptions options);
+	virtual ~MacroRunTask(); // Change to virtual if base class
+	virtual void start();
+
+
+// we need signals/slots to communicate between threads
+signals:
+    void sendMessageToLog      (const string &s);
+    void sendMacroFinishedMsg  (int err);
+    void sendCurrentLineNumber (int line);
+
+
+protected:
+
+	 void print(ostream&) const; // Change to virtual if base class	
+
+private:
+
+// No copy allowed
+    MacroRunTask(const MacroRunTask&);
+	MacroRunTask& operator=(const MacroRunTask&);
+
+	MacroEdit   *editor_;
+    QString     &macro_;
+//	Action      action_;
+//	IconObjectH object_;
+	MacroRunOptions options_;
+
+// -- Overridden methods
+
+	// From Task
+	// From ReplyObserver
+	virtual void reply(const MvRequest&, int);
+	virtual void progress(const MvRequest&);  
+	virtual void message(const string&);
+};
+
+
+
+
+class runMacroThread : public QThread
+{
+
+Q_OBJECT
+
+public:
+//    runMacroThread(MacroEdit *editor);
+//    runMacroThread(QString &filename);
+    runMacroThread(MacroEdit *editor, QString &filename, MacroRunOptions options);
+    ~runMacroThread() {};
+    void run();
+    
+private:
+    MacroEdit      *editor_;
+    QString         filename_;
+	MacroRunOptions options_;
+    MacroRunTask   *task_;
+
+signals:
+    void sendThreadFinishedMsg ();
+
+};
+
+
+/*
+class MvPlainTextEdit : public QPlainTextEdit
+{
+    Q_OBJECT
+
+public:
+    MvPlainTextEdit(QWidget * parent = 0);
+	~MvPlainTextEdit() {};
+};
+*/
+
+
+
+//class MacroEdit : public QMainWindow, private Ui::MainWindow, public MacroRunTask
+class MacroEdit : public QMainWindow, private Ui::MainWindow
+{
+    Q_OBJECT
+
+public:
+    MacroEdit(QString &appName, QWidget *parent = 0, QString *fileToLoad = NULL);
+    ~MacroEdit();
+    void metview_dnd   ();
+    void loadTextFile  (const QString &fileToLoad);
+    bool saveTextFile  (const QString &fileToSave);
+    void setLanguage   (const QString &language);
+    void autoInsertLicence();
+    LanguageHelper*  languageHelper() {return languageHelper_;}
+
+        //void init(OdbMetaData*);
+    QEventLoop      eventLoop_;   // xxxx should really be private!
+
+public slots:
+    //void searchInColTree(QString);
+    //void searchInTableTree(QString);
+    //void mousePressedInTableGraph(int,int);
+    //void selectTableFromList(QModelIndex);
+    void findDialog();
+    void findReplaceDialog();
+    void findNext();
+    void findSelection();
+    void findString(const QString &,QTextDocument::FindFlags,bool replace=false,const QString &r=emptyString_);
+    void replaceString(const QString &,const QString &,QTextDocument::FindFlags);
+    void replaceStringInSelectedText(const QString &,const QString &,QTextDocument::FindFlags);
+    void replaceStringInFile(const QString &,const QString &,QTextDocument::FindFlags);
+    void findClosed();
+    void gotoLine();
+    void gotoLine(int line);
+    void onIndentLines();
+    void tabsDialog();
+    void runDialog();
+    void functionListDialog();
+    void codeTemplateDialog();
+    void verbFunctionHelpDialog();
+    //void onReadOnlyStatusChanged (bool readOnly);
+    void onTabsSettingsChanged (TabsSettings settings);
+    void onRunOptionsChanged (MacroRunOptions options);
+    void onInsertFunctionName (QString);
+    void onInsertCodeTemplate (QString);
+    void onInsertTextIntoFunctionCall (QString);
+    void clipboardDataChanged();
+    void processDrop(MvQIconDropItem*);
+    void run();
+    //void debug();
+    void stop();
+    void monitor();
+    void external();
+    bool save();
+    bool saveAs();
+    bool reload();
+    void print();
+    void check_syntax();
+    void documentWasModified();
+    void cursorPositionWasChanged();
+    void updateRowColLabel();
+    void updateMessageLog();
+    void logMessage      (const string &s);
+    void macroFinished   (int errorCode);
+    void stepLineNumber  (int line);
+    void threadFinished  ();
+    void enlargeFont();
+    void shrinkFont ();
+    void normalFont();
+    void largeFont ();
+    void showLineNumbers (bool show);
+    void languageChosen(QAction *);
+    void onFocusRegained();
+    void onFocusLost();
+    void insertLicenceText();
+    void setAutoInsertLicenceOn()  {setAutoInsertLicence(true);};
+    void setAutoInsertLicenceOff() {setAutoInsertLicence(false);};
+
+private:
+    void setupEditor();
+    bool AskToSave();
+    void closeEvent(QCloseEvent *event);
+    void setCurrentFile(const QString &fileName, bool lastSaveTimeOnly = false);
+    QString strippedFileName(const QString &fullFileName);
+    QString wordUnderCursor();
+    void runMacro(MacroRunOptions options);
+    void statusMessage(const QString &msg, int timeToDisplay = 0);
+    bool checkForErrorMessage(const string &s);
+    void enableRunActions(bool enable);
+    void changeFontSize(int amount);
+    void setFontSize(int newSize);
+    void highlightLine(int line);
+    void writeSettings();
+    void readSettings();
+    void showFindDialog(bool showReplaceOptions);
+    void setLanguageMenuCheckedStatus();
+    void enableActionsForCurrentLanguage(bool enable);
+    void setAutoInsertLicence(bool setting);
+//    void reply(const MvRequest& r,int err);
+
+    /*void getTablePos(int,int,int&,int&);
+    bool setSelectedTable(int,int);
+    void renderTableGraph();
+    void buildTableModel();
+    bool searchInTree(QString,QTreeView*);
+    void centreTableGraph(); */
+
+    QString                  lastFindString_;
+    QTextDocument::FindFlags lastFindFlags_;
+    static QString           emptyString_;
+
+    int                     fontSize_;
+    int                     highlightedLine_;
+    bool                    readOnly_;
+    bool                    haveFocus_;
+    bool                    autoInsertLicence_;
+	MacroRunOptions         runOptions_;
+    runMacroThread         *runThread_;
+    QString                 appName_;
+    FindTextDialog         *findDialog_;
+    GotoLineDialog         *gotoLineDialog_;
+    TabsDialog             *tabsDialog_;
+    RunDialog              *runDialog_;
+    FunctionListDialog     *functionListDialog_;
+    CodeTemplateDialog     *codeTemplateDialog_;
+    VerbFunctionHelpDialog *verbFunctionHelpDialog_;
+    QString                 fileName_;
+    QDateTime               lastSaveTime_;
+    QLabel                 *rowColLabel_;
+    QLabel                 *messageLabel_;
+    LanguageHelperFactory   languageHelperFactory_;
+    LanguageHelper         *languageHelper_;
+    Highlighter            *highlighter_;
+    QTimer                  logTimer_;
+    QTimer                  buttonTimer_;
+    QTime                   time_;
+    vector<QAction*>        languageActions_;
+    QString                 licenceText_;
+    QActionGroup           *autoInsertLicenceGroup_;
+};
+
+#endif
diff --git a/src/MacroEditor/MacroEdit.qrc b/src/MacroEditor/MacroEdit.qrc
new file mode 100644
index 0000000..d5755c3
--- /dev/null
+++ b/src/MacroEditor/MacroEdit.qrc
@@ -0,0 +1,22 @@
+<RCC>
+  <qresource prefix="macroEditor">
+    <file alias="run_options.svg">../images/run_options.svg</file>
+    <file alias="wizard.svg">../images/wizard.svg</file>
+    <file alias="check_syntax.svg">../images/check_syntax.svg</file>
+    <file alias="print.svg">../images/print.svg</file>
+    <file alias="monitor.svg">../images/monitor.svg</file>
+    <file alias="player_stop.svg">../images/player_stop.svg</file>
+    <file alias="edit.svg">../images/edit.svg</file>
+    <file alias="editcopy.svg">../images/editcopy.svg</file>
+    <file alias="editcut.svg">../images/editcut.svg</file>
+    <file alias="editpaste.svg">../images/editpaste.svg</file>
+    <file alias="redo.svg">../images/redo.svg</file>
+    <file alias="undo.svg">../images/undo.svg</file>
+    <file alias="exit.svg">../images/exit.svg</file>
+    <file alias="player_play.svg">../images/player_play.svg</file>
+    <file alias="filesave.svg">../images/filesave.svg</file>
+    <file alias="filesaveas.svg">../images/filesaveas.svg</file>
+    <file alias="search.svg">../images/search.svg</file>
+    <file alias="insert_licence.svg">../images/insert_licence.svg</file>
+  </qresource>
+</RCC>
diff --git a/src/MacroEditor/MacroEdit.ui b/src/MacroEditor/MacroEdit.ui
new file mode 100644
index 0000000..c9f96a1
--- /dev/null
+++ b/src/MacroEditor/MacroEdit.ui
@@ -0,0 +1,840 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>959</width>
+    <height>938</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Macro Editor</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QSplitter" name="splitter">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <widget class="MvPlainTextEdit" name="textEditor" native="true">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>7</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="palette">
+        <palette>
+         <active>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </active>
+         <inactive>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </inactive>
+         <disabled>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </disabled>
+        </palette>
+       </property>
+      </widget>
+      <widget class="QPlainTextEdit" name="logMessages">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="palette">
+        <palette>
+         <active>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>246</red>
+             <green>245</green>
+             <blue>236</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </active>
+         <inactive>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>246</red>
+             <green>245</green>
+             <blue>236</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </inactive>
+         <disabled>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </disabled>
+        </palette>
+       </property>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>959</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&File</string>
+    </property>
+    <addaction name="separator"/>
+    <addaction name="actionSave"/>
+    <addaction name="actionSave_As"/>
+    <addaction name="action_Reload_from_file"/>
+    <addaction name="separator"/>
+    <addaction name="actionPrint"/>
+    <addaction name="separator"/>
+    <addaction name="actionExit"/>
+    <addaction name="separator"/>
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>&Edit</string>
+    </property>
+    <addaction name="separator"/>
+    <addaction name="actionUndo"/>
+    <addaction name="actionRedo"/>
+    <addaction name="separator"/>
+    <addaction name="actionCut"/>
+    <addaction name="actionCopy"/>
+    <addaction name="actionPaste"/>
+    <addaction name="separator"/>
+    <addaction name="actionSelect_All"/>
+    <addaction name="separator"/>
+    <addaction name="actionFind"/>
+    <addaction name="actionFind_Next"/>
+    <addaction name="actionFind_Previous"/>
+    <addaction name="actionFind_Selection"/>
+    <addaction name="actionReplace"/>
+    <addaction name="separator"/>
+    <addaction name="actionGo_To_Line"/>
+    <addaction name="separator"/>
+    <addaction name="actionIndent_Lines"/>
+   </widget>
+   <widget class="QMenu" name="menuView">
+    <property name="title">
+     <string>&View</string>
+    </property>
+    <addaction name="actionNormal_Font"/>
+    <addaction name="actionLarge_Font"/>
+    <addaction name="separator"/>
+    <addaction name="actionEnlarge_Font"/>
+    <addaction name="actionShrink_Font"/>
+    <addaction name="separator"/>
+    <addaction name="actionShow_Line_Numbers"/>
+   </widget>
+   <widget class="QMenu" name="menuProgram">
+    <property name="title">
+     <string>&Program</string>
+    </property>
+    <addaction name="actionRun"/>
+    <addaction name="actionRun_Options"/>
+    <addaction name="actionStop"/>
+    <addaction name="actionOpen_in_External_editor"/>
+    <addaction name="actionCheckSyntax"/>
+    <addaction name="actionProcess_Monitor"/>
+   </widget>
+   <widget class="QMenu" name="menuSettings">
+    <property name="title">
+     <string>&Settings</string>
+    </property>
+    <widget class="QMenu" name="menu_Language">
+     <property name="title">
+      <string>&Language</string>
+     </property>
+    </widget>
+    <widget class="QMenu" name="menu_Auto_Insert_Licence">
+     <property name="toolTip">
+      <string>Automatically insert licence text when opening an empty file</string>
+     </property>
+     <property name="title">
+      <string>&Auto Insert Licence</string>
+     </property>
+     <addaction name="actionAutoInsertLicenceOn"/>
+     <addaction name="actionAutoInsertLicenceOff"/>
+    </widget>
+    <addaction name="actionTabs"/>
+    <addaction name="menu_Language"/>
+    <addaction name="menu_Auto_Insert_Licence"/>
+   </widget>
+   <widget class="QMenu" name="menu_Insert">
+    <property name="title">
+     <string>&Insert</string>
+    </property>
+    <addaction name="action_Built_in_Function"/>
+    <addaction name="actionCode_Template"/>
+    <addaction name="action_Licence_Text"/>
+   </widget>
+   <widget class="QMenu" name="menu_Help">
+    <property name="title">
+     <string>&Help</string>
+    </property>
+    <addaction name="actionVerb_Function_Help"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuView"/>
+   <addaction name="menu_Insert"/>
+   <addaction name="menuProgram"/>
+   <addaction name="menuSettings"/>
+   <addaction name="menu_Help"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar">
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+     <horstretch>5</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+  </widget>
+  <widget class="QToolBar" name="fileToolBar">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="windowTitle">
+    <string>File Toolbar</string>
+   </property>
+   <property name="toolButtonStyle">
+    <enum>Qt::ToolButtonIconOnly</enum>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionExit"/>
+   <addaction name="actionSave"/>
+   <addaction name="actionSave_As"/>
+  </widget>
+  <widget class="QToolBar" name="printToolBar">
+   <property name="windowTitle">
+    <string>Print Toolbar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionPrint"/>
+  </widget>
+  <widget class="QToolBar" name="editToolBar">
+   <property name="windowTitle">
+    <string>Edit Toolbar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionCopy"/>
+   <addaction name="actionPaste"/>
+   <addaction name="actionCut"/>
+   <addaction name="actionRedo"/>
+   <addaction name="actionUndo"/>
+  </widget>
+  <widget class="QToolBar" name="findToolBar">
+   <property name="windowTitle">
+    <string>Find Toolbar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionFind"/>
+   <addaction name="actionFind_Next"/>
+   <addaction name="actionFind_Previous"/>
+   <addaction name="actionEnlarge_Font"/>
+   <addaction name="actionShrink_Font"/>
+  </widget>
+  <widget class="QToolBar" name="programToolBar">
+   <property name="windowTitle">
+    <string>Program Toolbar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionRun"/>
+   <addaction name="actionRun_Options"/>
+   <addaction name="actionStop"/>
+   <addaction name="actionCheckSyntax"/>
+   <addaction name="actionProcess_Monitor"/>
+   <addaction name="actionOpen_in_External_editor"/>
+   <addaction name="actionVerb_Function_Help"/>
+  </widget>
+  <widget class="QToolBar" name="insertItemToolBar">
+   <property name="windowTitle">
+    <string>Insert ToolBar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="action_Licence_Text"/>
+  </widget>
+  <action name="actionSave">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/filesave.svg</normaloff>:/macroEditor/filesave.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Save</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionExit">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/exit.svg</normaloff>:/macroEditor/exit.svg</iconset>
+   </property>
+   <property name="text">
+    <string>E&xit</string>
+   </property>
+  </action>
+  <action name="actionCopy">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/editcopy.svg</normaloff>:/macroEditor/editcopy.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Copy</string>
+   </property>
+  </action>
+  <action name="actionPaste">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/editpaste.svg</normaloff>:/macroEditor/editpaste.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Paste</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+V</string>
+   </property>
+  </action>
+  <action name="actionCut">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/editcut.svg</normaloff>:/macroEditor/editcut.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Cu&t</string>
+   </property>
+  </action>
+  <action name="actionFind">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/search.svg</normaloff>:/macroEditor/search.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Find</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+F</string>
+   </property>
+  </action>
+  <action name="actionSelect_All">
+   <property name="text">
+    <string>Select &All</string>
+   </property>
+  </action>
+  <action name="actionFind_Next">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/search.svg</normaloff>:/macroEditor/search.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Find &Next</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+G</string>
+   </property>
+  </action>
+  <action name="actionFind_Previous">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/search.svg</normaloff>:/macroEditor/search.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Find &Previous</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Shift+G</string>
+   </property>
+  </action>
+  <action name="actionReplace">
+   <property name="text">
+    <string>&Replace</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+R</string>
+   </property>
+  </action>
+  <action name="actionGo_To_Line">
+   <property name="text">
+    <string>Go To &Line</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+L</string>
+   </property>
+  </action>
+  <action name="actionUndo">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/undo.svg</normaloff>:/macroEditor/undo.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Undo</string>
+   </property>
+  </action>
+  <action name="actionRedo">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/redo.svg</normaloff>:/macroEditor/redo.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Redo</string>
+   </property>
+  </action>
+  <action name="actionDeselect">
+   <property name="text">
+    <string>Deselect</string>
+   </property>
+  </action>
+  <action name="actionSave_As">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/filesaveas.svg</normaloff>:/macroEditor/filesaveas.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Save &As</string>
+   </property>
+  </action>
+  <action name="actionEnlarge_Font">
+   <property name="icon">
+    <iconset>
+     <normaloff>:/macroEditor/find.png</normaloff>:/macroEditor/find.png</iconset>
+   </property>
+   <property name="text">
+    <string>Enlarge Font</string>
+   </property>
+  </action>
+  <action name="actionShrink_Font">
+   <property name="icon">
+    <iconset>
+     <normaloff>:/macroEditor/find.png</normaloff>:/macroEditor/find.png</iconset>
+   </property>
+   <property name="text">
+    <string>Shrink Font</string>
+   </property>
+  </action>
+  <action name="actionDynamic_Word_Wrap">
+   <property name="text">
+    <string>Dynamic Word Wrap</string>
+   </property>
+  </action>
+  <action name="actionShow_Line_Numbers">
+   <property name="text">
+    <string>Show Line Numbers</string>
+   </property>
+   <property name="shortcut">
+    <string>F11</string>
+   </property>
+  </action>
+  <action name="actionRun">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/player_play.svg</normaloff>:/macroEditor/player_play.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Run</string>
+   </property>
+   <property name="toolTip">
+    <string>Run the program (F9)</string>
+   </property>
+   <property name="shortcut">
+    <string>F9</string>
+   </property>
+  </action>
+  <action name="actionCheckSyntax">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/check_syntax.svg</normaloff>:/macroEditor/check_syntax.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Check Syntax</string>
+   </property>
+  </action>
+  <action name="actionTooltip">
+   <property name="text">
+    <string>Tooltip</string>
+   </property>
+  </action>
+  <action name="actionStop">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/player_stop.svg</normaloff>:/macroEditor/player_stop.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Stop</string>
+   </property>
+   <property name="toolTip">
+    <string>Stop the program</string>
+   </property>
+   <property name="iconVisibleInMenu">
+    <bool>false</bool>
+   </property>
+  </action>
+  <action name="actionProcess_Monitor">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/monitor.svg</normaloff>:/macroEditor/monitor.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Process &Monitor</string>
+   </property>
+  </action>
+  <action name="actionPrint">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/print.svg</normaloff>:/macroEditor/print.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Print...</string>
+   </property>
+  </action>
+  <action name="actionOpen_in_External_editor">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/edit.svg</normaloff>:/macroEditor/edit.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Open in &External editor</string>
+   </property>
+  </action>
+  <action name="actionNormal_Font">
+   <property name="icon">
+    <iconset>
+     <normaloff>:/macroEditor/find.png</normaloff>:/macroEditor/find.png</iconset>
+   </property>
+   <property name="text">
+    <string>Normal Font</string>
+   </property>
+   <property name="toolTip">
+    <string>Normal Font Size</string>
+   </property>
+  </action>
+  <action name="actionLarge_Font">
+   <property name="icon">
+    <iconset>
+     <normaloff>:/macroEditor/find.png</normaloff>:/macroEditor/find.png</iconset>
+   </property>
+   <property name="text">
+    <string>Large Font</string>
+   </property>
+   <property name="toolTip">
+    <string>Large Font Size</string>
+   </property>
+  </action>
+  <action name="actionFind_Selection">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/search.svg</normaloff>:/macroEditor/search.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Find &Selection</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+H</string>
+   </property>
+  </action>
+  <action name="actionTabs">
+   <property name="checkable">
+    <bool>false</bool>
+   </property>
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>&Tabs...</string>
+   </property>
+   <property name="toolTip">
+    <string>Tabs and spaces settings</string>
+   </property>
+  </action>
+  <action name="action_Built_in_Function">
+   <property name="text">
+    <string>&Built-in Function</string>
+   </property>
+   <property name="shortcut">
+    <string>F2</string>
+   </property>
+  </action>
+  <action name="actionIndent_Lines">
+   <property name="text">
+    <string>&Indent Lines</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+)</string>
+   </property>
+  </action>
+  <action name="action_List_of_available_functions">
+   <property name="text">
+    <string>&List of available functions</string>
+   </property>
+  </action>
+  <action name="actionVerb_Function_Help">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/wizard.svg</normaloff>:/macroEditor/wizard.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Icon function parameter help</string>
+   </property>
+   <property name="shortcut">
+    <string>F5</string>
+   </property>
+  </action>
+  <action name="actionCode_Template">
+   <property name="text">
+    <string>Code &Template</string>
+   </property>
+   <property name="shortcut">
+    <string>F4</string>
+   </property>
+  </action>
+  <action name="action_Reload_from_file">
+   <property name="text">
+    <string>&Reload from file</string>
+   </property>
+  </action>
+  <action name="actionRun_Options">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/run_options.svg</normaloff>:/macroEditor/run_options.svg</iconset>
+   </property>
+   <property name="text">
+    <string>Run &Options...</string>
+   </property>
+   <property name="toolTip">
+    <string>Run Options (F10)</string>
+   </property>
+   <property name="shortcut">
+    <string>F10</string>
+   </property>
+  </action>
+  <action name="action_Licence_Text">
+   <property name="icon">
+    <iconset resource="MacroEdit.qrc">
+     <normaloff>:/macroEditor/insert_licence.svg</normaloff>:/macroEditor/insert_licence.svg</iconset>
+   </property>
+   <property name="text">
+    <string>&Licence Text</string>
+   </property>
+   <property name="shortcut">
+    <string>F12</string>
+   </property>
+  </action>
+  <action name="action_Auto_Insert_Licence">
+   <property name="text">
+    <string>&Auto Insert Licence</string>
+   </property>
+  </action>
+  <action name="actionGhgh">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>ghgh</string>
+   </property>
+  </action>
+  <action name="actionAutoInsertLicenceOn">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>O&n</string>
+   </property>
+  </action>
+  <action name="actionAutoInsertLicenceOff">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Of&f</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>MvPlainTextEdit</class>
+   <extends>QWidget</extends>
+   <header>mvplaintextedit.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="MacroEdit.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>actionRun</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>run()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>478</x>
+     <y>468</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionStop</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>stop()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>478</x>
+     <y>468</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionProcess_Monitor</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>monitor()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>478</x>
+     <y>468</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionPrint</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>print()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>478</x>
+     <y>468</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionOpen_in_External_editor</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>external()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>478</x>
+     <y>468</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionCheckSyntax</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_syntax()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>478</x>
+     <y>468</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>run()</slot>
+ </slots>
+</ui>
diff --git a/src/MacroEditor/MacroHelper.cc b/src/MacroEditor/MacroHelper.cc
new file mode 100644
index 0000000..638055f
--- /dev/null
+++ b/src/MacroEditor/MacroHelper.cc
@@ -0,0 +1,314 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+#include <QFile>
+#include <QTextStream>
+ 
+#include "LanguageHelper.h" 
+#include "MacroHelper.h" 
+#include "Highlighter.h"
+
+
+
+// -----------------------------------------------------------------------
+// ------------------- Syntax highlighter code ---------------------------
+//        this class is used by the MacroHelper object, defined below
+// -----------------------------------------------------------------------
+
+class MacroHighlighter : public Highlighter
+{
+public:
+     MacroHighlighter(QString &pathToFunctionList, QString &pathToMacroDeprecatedFunctionList, QTextDocument *parent = 0);
+    ~MacroHighlighter(){}
+
+     virtual void highlightBlock(const QString &text);
+
+private:
+    void LoadKeywordsFromFile (QString &fileName, QTextCharFormat &format);
+
+protected:
+     QTextCharFormat keywordFormat;
+     QTextCharFormat classFormat;
+     QTextCharFormat singleLineCommentFormat;
+     QTextCharFormat quotationFormat;
+     QTextCharFormat functionFormat; 
+     QTextCharFormat numberFormat;
+     QTextCharFormat builtinFunctionFormat;
+     QTextCharFormat deprecatedFunctionFormat;
+
+
+};
+
+
+MacroHighlighter::MacroHighlighter(QString &pathToFunctionList, QString &pathToMacroDeprecatedFunctionList, QTextDocument *parent)
+     : Highlighter(parent)
+{
+    HighlightingRule rule;
+
+/*
+        From NEdit:
+
+        InlineString:"string inline":"end inline"::MvString1::\n\
+        Comment:"#":"$"::MvComment::\n\
+        DoubleQuoteString:"""":""""::MvString1::\n\
+        SingleQuoteString:"'":"'"::MvString1::\n\
+        Keywords:"<(and|by|export|for|function|global|extern|import|in|include|inline|nil|not|object|of|on|or|otherwise|repeat|task|tell|to|until|when|return|if|then|else|switch|case|while|end|do|loop|extern)>":::MvKeyword::\n\
+        BuiltinFunctions:"<(|&|\\*|\\+|-|^|abs|accumulate|acos|addmonths|annotation|any|append|area|arguments|ascii|asin|atan|atan2|attributes|average|average_ew|average_ns|averageview|bar|bitmap|budget|bufr_timeseries|carousel|cleanfile|color|colour|colour_polar_field|colour_vector_field|compute|convolution|corr_a|cos|coslat|count|covar|covar_a|create_geo|cross_sect|curve|curveview|datacov_data|datacoverage|datainfo|date|day|definition|describe|det|device|dictionary|dimensions|direction [...]
+        Numeric:"<((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?>":::MVNumericConst::\n\
+        MacroLib:"<mml_\\w*>":::MvMacroLib::\n\
+*/
+
+
+    // Note that the order in which these highlighting rules are given
+    // DOES matter! The rules seem to be applied in the order in which
+    // they are given.
+
+    //Functions - user defined
+    /*functionFormat.setFontWeight(QFont::Bold);
+    functionFormat.setForeground(QColor(236,47,33));
+    rule.pattern = QRegExp("\\b[A-Za-z0-9_]+(?=\\()");
+    rule.format = functionFormat;
+    highlightingRules.append(rule);*/
+
+
+    //Numerics
+    //numberFormat.setForeground(QColor(193,63,65));
+    numberFormat.setForeground(QColor(0,0,255));
+    rule.pattern = QRegExp("\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b");
+    rule.format = numberFormat;
+    highlightingRules.append(rule);
+
+
+
+    //Built in functions - these are stored in a text file, so we read it in and parse it
+    builtinFunctionFormat.setFontWeight(QFont::Bold);
+    builtinFunctionFormat.setForeground(QColor(255,119,119));
+
+
+    LoadKeywordsFromFile (pathToFunctionList, builtinFunctionFormat);
+
+
+
+    // Deprecated functions - these are stored in a text file, so we read it in and parse it
+    // - the font will be a bit darker than that for 'normal' functions, and also underlined
+    deprecatedFunctionFormat = builtinFunctionFormat;
+    deprecatedFunctionFormat.setForeground(builtinFunctionFormat.foreground().color().darker(115));
+    deprecatedFunctionFormat.setUnderlineStyle(QTextCharFormat::SpellCheckUnderline	);
+    deprecatedFunctionFormat.setToolTip(tr("Deprecated function"));  // the tool top seems not to work...
+
+    LoadKeywordsFromFile (pathToMacroDeprecatedFunctionList, deprecatedFunctionFormat);
+
+
+
+
+      //Keywords
+    keywordFormat.setForeground(Qt::darkBlue);
+    keywordFormat.setFontWeight(QFont::Bold);
+ 
+    QStringList keywords;
+
+    keywords << "and" << "by" << "export" << "for" << "function" << "global" << "extern" <<
+                "import" << "in" << "include" << "inline" << "nil" <<
+                "not" << "object" << "of" << "\\bon\\b" << "\\bor\\b" << "otherwise" << "repeat" << "task" <<
+                "tell" << "to" << "until" << "when" << "return" << "if" << "then" << "else" << "switch" << 
+                "case" << "while" << "end" << "do" << "loop" << "extern";
+
+    foreach (QString word, keywords)
+    {
+        QString pattern = "\\b" + word + "\\b";
+        rule.pattern = QRegExp(pattern);
+        rule.format = keywordFormat;
+        highlightingRules.append(rule);
+    }
+
+
+
+
+    // strings
+    quotationFormat.setForeground(Qt::darkRed);
+    rule.pattern = QRegExp("(\"[^\"]*\")|(\'[^\']*\')");
+    rule.format = quotationFormat;
+    highlightingRules.append(rule);
+
+
+    //Comments
+    singleLineCommentFormat.setFontItalic(true);
+    singleLineCommentFormat.setForeground(Qt::darkGreen);
+    rule.pattern = QRegExp("#[^\n]*");
+    rule.format = singleLineCommentFormat;
+    highlightingRules.append(rule);
+
+}
+
+
+
+void MacroHighlighter::highlightBlock(const QString &text)
+{
+    foreach (HighlightingRule rule, highlightingRules) 
+    {
+        QRegExp expression(rule.pattern);
+        int index = text.indexOf(expression);
+        while (index >= 0) 
+        {
+            int length = expression.matchedLength();
+            setFormat(index, length, rule.format);
+            index = text.indexOf(expression, index + length);
+        }
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroHighlighter::LoadKeywordsFromFile
+// Loads a set of keywords from a given file, assuming one word per line.
+// These are added to a new highlighting rule with the given char format.
+// ---------------------------------------------------------------------------
+
+void MacroHighlighter::LoadKeywordsFromFile (QString &fileName, QTextCharFormat &format)
+{
+    QFile file(fileName);
+
+    if (file.open(QFile::ReadOnly | QFile::Text))  // try to open in read-only mode
+    {
+        HighlightingRule rule;
+        QTextStream in(&file);
+
+        string s;
+        while (!file.atEnd())
+        {
+            QString s = file.readLine();
+            s="\\b" + s.trimmed() + "\\b";  // note: the Qt docs say that trimmed() should not be necessary, but it is!
+            rule.pattern = QRegExp(s);
+            rule.format = format;
+            highlightingRules.append(rule);
+        }
+    }
+    
+    else
+    {
+        /* QMessageBox::warning(this, tr("Application"),
+                             tr("Cannot read file %1:\n%2.")
+                             .arg(fileName)
+                             .arg(file.errorString())); */
+    }
+}
+
+
+// -----------------------------------------------------------------------
+// -------------------------- MacroHelper code ---------------------------
+// -----------------------------------------------------------------------
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::MacroHelper
+// constructor
+// ---------------------------------------------------------------------------
+
+MacroHelper::MacroHelper()
+{
+    languageName_ = "Macro";
+    className_    = "MACRO";
+    serviceName_  = "macro";
+
+
+    QString etcDir = getenv ("METVIEW_DIR_SHARE");
+
+    if (!etcDir.isEmpty())
+        etcDir += "/etc/";
+
+    pathToMacroFunctionList_           = etcDir + "macro_built_in_functions.txt";
+    pathToMacroDeprecatedFunctionList_ = etcDir + "macro_deprecated_functions.txt";
+    pathToMacroTemplateList_           = etcDir + "macro_templates.txt";
+    QString xmlParamFilename           = etcDir + "macro_icon_function_help.xml";
+
+    verbFunctionHelp_ = new VerbFunctionHelp(xmlParamFilename);
+
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::~MacroHelper
+// destructor
+// ---------------------------------------------------------------------------
+
+MacroHelper::~MacroHelper()
+{
+    delete verbFunctionHelp_;
+}
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::createHighlighter
+// creates a new syntax highlighter object
+// ---------------------------------------------------------------------------
+
+Highlighter *MacroHelper::createHighlighter(QTextDocument *parent)
+{
+    return new MacroHighlighter(pathToMacroFunctionList_, pathToMacroDeprecatedFunctionList_, parent);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::isHelpAvailableForFunction
+// returns a bool depending on whether the given string is the name of a
+// function for which we have some help available
+// ---------------------------------------------------------------------------
+
+bool MacroHelper::isHelpAvailableForFunction(const QString &function)
+{
+//    return (function == "pcont");
+
+    return verbFunctionHelp_->isHelpAvailableForFunction(function);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::pathToFunctionList
+// returns the path to where our list of macro functions is. This is generated
+// in the constructor.
+// ---------------------------------------------------------------------------
+
+QString MacroHelper::pathToFunctionList()
+{
+    return pathToMacroFunctionList_;
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::pathToTemplateList
+// returns the path to where our list of macro templates is. This is generated
+// in the constructor.
+// ---------------------------------------------------------------------------
+
+QString MacroHelper::pathToTemplateList()
+{
+    return pathToMacroTemplateList_;
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MacroHelper::isHeaderLine
+// decides whether the given line is a Macro header line
+// ---------------------------------------------------------------------------
+
+bool MacroHelper::isHeaderLine(const QString &text)
+{
+    return (text.contains("#") && 
+            text.contains("Metview") &&
+            text.contains("Macro"));
+}
+
diff --git a/src/MacroEditor/MacroHelper.h b/src/MacroEditor/MacroHelper.h
new file mode 100644
index 0000000..1a1cab5
--- /dev/null
+++ b/src/MacroEditor/MacroHelper.h
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MacroHelper_H
+#define MacroHelper_H
+
+
+// --------------------------------------------------
+// class MacroHelper
+// A language helper specific to the Macro language
+// --------------------------------------------------
+
+class MacroHelper : public LanguageHelper
+{
+public:
+    MacroHelper();
+    virtual ~MacroHelper();
+
+    Highlighter *createHighlighter(QTextDocument *parent = 0);
+    bool canCheckSyntax() {return true;}
+    bool canDebug()       {return true;}
+    bool canRun()         {return true;}
+    bool runAsService()   {return true;}
+    bool isHelpAvailableForFunction(const QString &function);
+    bool isHeaderLine(const QString &text);       // is the text a header line (e.g. "# Metview Macro")?
+    QString requiredHeaderLine()  {return QString("# Metview Macro\n\n");}; // required header line to be added automatically
+    QString pathToFunctionList();
+    QString pathToTemplateList();
+
+private:
+    QString pathToMacroFunctionList_;
+    QString pathToMacroDeprecatedFunctionList_;
+    QString pathToMacroTemplateList_;
+
+};
+
+
+
+
+#endif
diff --git a/src/MacroEditor/MacroRunOptions.h b/src/MacroEditor/MacroRunOptions.h
new file mode 100644
index 0000000..60f0fca
--- /dev/null
+++ b/src/MacroEditor/MacroRunOptions.h
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MacroRunOptions_H
+#define MacroRunOptions_H
+
+#include <string>
+
+// convenience class to hold the macro run options. We won't bother encapsulating the
+// members...
+class MacroRunOptions
+{
+public:
+    bool   trace_;
+	bool   sendLines_;
+    int    waitMode_;
+	int    pause_;
+    std::string runMode_;
+
+	MacroRunOptions() : trace_(false), sendLines_(false), waitMode_(0), pause_(0), runMode_("prepare") {};
+
+};
+
+
+#endif
diff --git a/src/MacroEditor/MagMLHelper.cc b/src/MacroEditor/MagMLHelper.cc
new file mode 100644
index 0000000..33a18fb
--- /dev/null
+++ b/src/MacroEditor/MagMLHelper.cc
@@ -0,0 +1,202 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+
+#include "LanguageHelper.h" 
+#include "MagMLHelper.h" 
+#include "Highlighter.h"
+
+
+
+// -----------------------------------------------------------------------
+// ------------------- Syntax highlighter code ---------------------------
+//        this class is used by the MagMLHelper object, defined below
+// -----------------------------------------------------------------------
+
+
+class MagMLHighlighter : public Highlighter
+{
+public:
+     MagMLHighlighter(QTextDocument *parent = 0);
+    ~MagMLHighlighter(){}
+
+     virtual void highlightBlock(const QString &text);
+
+protected:
+
+     QRegExp commentStartExpression;
+     QRegExp commentEndExpression;
+
+     QTextCharFormat tagNameFormat;
+     QTextCharFormat attributeNameFormat;
+     QTextCharFormat tagSymbolsFormat;
+     QTextCharFormat quotationFormat;
+     QTextCharFormat multiLineCommentFormat;
+};
+
+
+MagMLHighlighter::MagMLHighlighter(QTextDocument *parent)
+     : Highlighter(parent)
+{
+    HighlightingRule rule;
+
+
+    // Note that the order in which these highlighting rules are given
+    // DOES matter! The rules seem to be applied in the order in which
+    // they are given.
+
+    // tag names
+    tagNameFormat.setForeground(Qt::darkBlue);
+    rule.pattern = QRegExp("(<\\w*)|(</\\w*>)|(>)");
+    rule.format = tagNameFormat;
+    highlightingRules.append(rule);
+
+
+    // tag symbols
+    rule.pattern = QRegExp("(<)|(</)|(>)");
+    rule.format = tagSymbolsFormat;
+    highlightingRules.append(rule);
+
+
+    // attribute names
+    attributeNameFormat.setForeground(Qt::red);
+    rule.pattern = QRegExp("(\\w+\\s*)(?==)");  // (?==) means 'true if '=', but don't match it'
+    rule.format = attributeNameFormat;
+    highlightingRules.append(rule);
+
+
+    // strings
+    quotationFormat.setForeground(Qt::darkRed);
+    rule.pattern = QRegExp("(\"[^\"]*\")|(\'[^\']*\')");
+    rule.format = quotationFormat;
+    highlightingRules.append(rule);
+
+
+    // multi-line comments
+    commentStartExpression = QRegExp("<!--");
+    commentEndExpression = QRegExp("-->");
+    multiLineCommentFormat.setFontItalic(true);
+    multiLineCommentFormat.setForeground(Qt::darkGreen);
+
+}
+
+
+
+void MagMLHighlighter::highlightBlock(const QString &text)
+{
+    foreach (HighlightingRule rule, highlightingRules) 
+    {
+        QRegExp expression(rule.pattern);
+        int index = text.indexOf(expression);
+        while (index >= 0) 
+        {
+            int length = expression.matchedLength();
+            setFormat(index, length, rule.format);
+            index = text.indexOf(expression, index + length);
+        }
+    }
+
+
+    // multi-line comments
+
+    setCurrentBlockState(0);
+
+    int startIndex = 0;
+    if (previousBlockState() != 1)
+        startIndex = text.indexOf(commentStartExpression);
+
+    while (startIndex >= 0) 
+    {
+        int endIndex = text.indexOf(commentEndExpression, startIndex);
+        int commentLength;
+        if (endIndex == -1) 
+        {
+            setCurrentBlockState(1);
+            commentLength = text.length() - startIndex;
+        } 
+        else 
+        {
+            commentLength = endIndex - startIndex
+                            + commentEndExpression.matchedLength();
+        }
+        setFormat(startIndex, commentLength, multiLineCommentFormat);
+        startIndex = text.indexOf(commentStartExpression,
+                                  startIndex + commentLength);
+    }
+
+
+}
+
+
+
+
+
+// -----------------------------------------------------------------------
+// -------------------------- MagMLHelper code ---------------------------
+// -----------------------------------------------------------------------
+
+
+// ---------------------------------------------------------------------------
+// MagMLHelper::MagMLHelper
+// constructor
+// ---------------------------------------------------------------------------
+
+MagMLHelper::MagMLHelper()
+{
+    languageName_ = "MagML";
+    className_    = "MAGML";
+    serviceName_  = "MagML";
+}
+
+
+// ---------------------------------------------------------------------------
+// MagMLHelper::~MagMLHelper
+// destructor
+// ---------------------------------------------------------------------------
+
+MagMLHelper::~MagMLHelper()
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// MagMLHelper::~createHighlighter
+// creates a new syntax highlighter object
+// ---------------------------------------------------------------------------
+
+Highlighter *MagMLHelper::createHighlighter(QTextDocument *parent)
+{
+    return new MagMLHighlighter(parent);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MagMLHelper::commentBlock
+// puts the text into an XML comment block
+// ---------------------------------------------------------------------------
+
+QString MagMLHelper::commentBlock(const QString &text)
+{
+    QString result("<!--\n");
+
+    result += text + "-->\n";
+
+    return result;
+}
+
+
+
+
+
+
+
diff --git a/src/MacroEditor/MagMLHelper.h b/src/MacroEditor/MagMLHelper.h
new file mode 100644
index 0000000..8d6e332
--- /dev/null
+++ b/src/MacroEditor/MagMLHelper.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MagMLHelper_H
+#define MagMLHelper_H
+
+// --------------------------------------------------
+// class MagMLHelper
+// A language helper specific to the MagML language
+// --------------------------------------------------
+
+class MagMLHelper : public LanguageHelper
+{
+public:
+    MagMLHelper();
+    virtual ~MagMLHelper();
+
+    Highlighter *createHighlighter(QTextDocument *parent = 0);
+    bool canCheckSyntax() {return false;}
+    bool canDebug()       {return false;}
+    bool canRun()         {return true;}
+    bool runAsService()   {return true;}
+    bool isHelpAvailableForFunction(const QString &/*function*/) {return false;}
+    QString commentBlock(const QString &text);    // makes the text lines into a comment block
+    bool isHeaderLine(const QString &text)    {return text.contains("<magics");};       // is the text a header line (e.g. "# Metview Macro")?
+};
+
+
+
+
+#endif
diff --git a/src/MacroEditor/Makefile.am b/src/MacroEditor/Makefile.am
new file mode 100644
index 0000000..571e6a3
--- /dev/null
+++ b/src/MacroEditor/Makefile.am
@@ -0,0 +1,35 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+bin_PROGRAMS = bin/MacroEditor
+
+
+bin_MacroEditor_SOURCES  = MvMain.cc Highlighter.cc MacroEdit.cc CodeTemplateDialog.cc FindTextDialog.cc GotoLineDialog.cc RunDialog.cc TabsDialog.cc FunctionListDialog.cc VerbFunctionHelpDialog.cc mvplaintextedit.cc\
+                           MacroHelper.cc MagMLHelper.cc ShellHelper.cc PlainTextHelper.cc LanguageHelper.cc LanguageHelperFactory.cc VerbFunctionHelp.cc \
+                           CodeTemplateDialog.h FindTextDialog.h FunctionListDialog.h GotoLineDialog.h Highlighter.h \
+                           LanguageHelper.h LanguageHelperFactory.h MacroEdit.h MacroHelper.h MagMLHelper.h ShellHelper.h MvMain.h \
+                           PlainTextHelper.h RunDialog.h MacroRunOptions.h TabsDialog.h TabsSettings.h VerbFunctionHelp.h VerbFunctionHelpDialog.h \
+                           mvplaintextedit.h
+
+nodist_bin_MacroEditor_SOURCES = MvMain.moc.cpp FindTextDialog.moc.cpp Highlighter.moc.cpp MacroEdit.moc.cpp FunctionListDialog.moc.cpp mvplaintextedit.moc.cpp \
+                                 CodeTemplateDialog.moc.cpp GotoLineDialog.moc.cpp RunDialog.moc.cpp TabsDialog.moc.cpp VerbFunctionHelpDialog.moc.cpp MacroEdit.qrc.cpp
+
+bin_MacroEditor_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui
+bin_MacroEditor_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_MacroEditor_LDADD    = $(LDADD)  $(STANDARD_METVIEW_LIBS) $(FLIBS) -lMvQtGui -lUtil $(QT_LIBS)
+bin_MacroEditor_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+
+BUILT_SOURCES = bin MvMain.moc.cpp FindTextDialog.moc.cpp Highlighter.moc.cpp MacroEdit.moc.cpp GotoLineDialog.moc.cpp RunDialog.moc.cpp TabsDialog.moc.cpp mvplaintextedit.moc.cpp \
+	CodeTemplateDialog.moc.cpp FunctionListDialog.moc.cpp VerbFunctionHelpDialog.moc.cpp CodeTemplateDialog.ui.h FunctionListDialog.ui.h VerbFunctionHelpDialog.ui.h \
+	FindTextDialog.ui.h MacroEdit.ui.h GotoLineDialog.ui.h RunDialog.ui.h TabsDialog.ui.h MacroEdit.qrc.cpp 
+
+EXTRA_DIST = CodeTemplateDialog.ui FindTextDialog.ui FunctionListDialog.ui GotoLineDialog.ui MacroEdit.ui RunDialog.ui TabsDialog.ui VerbFunctionHelpDialog.ui MacroEdit.qrc
+            
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.ui.h *.moc.cpp *.qrc.cpp	
diff --git a/src/MacroEditor/Makefile.in b/src/MacroEditor/Makefile.in
new file mode 100644
index 0000000..03b0a3b
--- /dev/null
+++ b/src/MacroEditor/Makefile.in
@@ -0,0 +1,1339 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/MacroEditor$(EXEEXT)
+subdir = src/MacroEditor
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_MacroEditor_OBJECTS = bin_MacroEditor-MvMain.$(OBJEXT) \
+	bin_MacroEditor-Highlighter.$(OBJEXT) \
+	bin_MacroEditor-MacroEdit.$(OBJEXT) \
+	bin_MacroEditor-CodeTemplateDialog.$(OBJEXT) \
+	bin_MacroEditor-FindTextDialog.$(OBJEXT) \
+	bin_MacroEditor-GotoLineDialog.$(OBJEXT) \
+	bin_MacroEditor-RunDialog.$(OBJEXT) \
+	bin_MacroEditor-TabsDialog.$(OBJEXT) \
+	bin_MacroEditor-FunctionListDialog.$(OBJEXT) \
+	bin_MacroEditor-VerbFunctionHelpDialog.$(OBJEXT) \
+	bin_MacroEditor-mvplaintextedit.$(OBJEXT) \
+	bin_MacroEditor-MacroHelper.$(OBJEXT) \
+	bin_MacroEditor-MagMLHelper.$(OBJEXT) \
+	bin_MacroEditor-ShellHelper.$(OBJEXT) \
+	bin_MacroEditor-PlainTextHelper.$(OBJEXT) \
+	bin_MacroEditor-LanguageHelper.$(OBJEXT) \
+	bin_MacroEditor-LanguageHelperFactory.$(OBJEXT) \
+	bin_MacroEditor-VerbFunctionHelp.$(OBJEXT)
+nodist_bin_MacroEditor_OBJECTS = bin_MacroEditor-MvMain.moc.$(OBJEXT) \
+	bin_MacroEditor-FindTextDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-Highlighter.moc.$(OBJEXT) \
+	bin_MacroEditor-MacroEdit.moc.$(OBJEXT) \
+	bin_MacroEditor-FunctionListDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-mvplaintextedit.moc.$(OBJEXT) \
+	bin_MacroEditor-CodeTemplateDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-GotoLineDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-RunDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-TabsDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-VerbFunctionHelpDialog.moc.$(OBJEXT) \
+	bin_MacroEditor-MacroEdit.qrc.$(OBJEXT)
+bin_MacroEditor_OBJECTS = $(am_bin_MacroEditor_OBJECTS) \
+	$(nodist_bin_MacroEditor_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_MacroEditor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_MacroEditor_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_MacroEditor_SOURCES) $(nodist_bin_MacroEditor_SOURCES)
+DIST_SOURCES = $(bin_MacroEditor_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_MacroEditor_SOURCES = MvMain.cc Highlighter.cc MacroEdit.cc CodeTemplateDialog.cc FindTextDialog.cc GotoLineDialog.cc RunDialog.cc TabsDialog.cc FunctionListDialog.cc VerbFunctionHelpDialog.cc mvplaintextedit.cc\
+                           MacroHelper.cc MagMLHelper.cc ShellHelper.cc PlainTextHelper.cc LanguageHelper.cc LanguageHelperFactory.cc VerbFunctionHelp.cc \
+                           CodeTemplateDialog.h FindTextDialog.h FunctionListDialog.h GotoLineDialog.h Highlighter.h \
+                           LanguageHelper.h LanguageHelperFactory.h MacroEdit.h MacroHelper.h MagMLHelper.h ShellHelper.h MvMain.h \
+                           PlainTextHelper.h RunDialog.h MacroRunOptions.h TabsDialog.h TabsSettings.h VerbFunctionHelp.h VerbFunctionHelpDialog.h \
+                           mvplaintextedit.h
+
+nodist_bin_MacroEditor_SOURCES = MvMain.moc.cpp FindTextDialog.moc.cpp Highlighter.moc.cpp MacroEdit.moc.cpp FunctionListDialog.moc.cpp mvplaintextedit.moc.cpp \
+                                 CodeTemplateDialog.moc.cpp GotoLineDialog.moc.cpp RunDialog.moc.cpp TabsDialog.moc.cpp VerbFunctionHelpDialog.moc.cpp MacroEdit.qrc.cpp
+
+bin_MacroEditor_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui
+bin_MacroEditor_LDFLAGS = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_MacroEditor_LDADD = $(LDADD)  $(STANDARD_METVIEW_LIBS) $(FLIBS) -lMvQtGui -lUtil $(QT_LIBS)
+bin_MacroEditor_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+BUILT_SOURCES = bin MvMain.moc.cpp FindTextDialog.moc.cpp Highlighter.moc.cpp MacroEdit.moc.cpp GotoLineDialog.moc.cpp RunDialog.moc.cpp TabsDialog.moc.cpp mvplaintextedit.moc.cpp \
+	CodeTemplateDialog.moc.cpp FunctionListDialog.moc.cpp VerbFunctionHelpDialog.moc.cpp CodeTemplateDialog.ui.h FunctionListDialog.ui.h VerbFunctionHelpDialog.ui.h \
+	FindTextDialog.ui.h MacroEdit.ui.h GotoLineDialog.ui.h RunDialog.ui.h TabsDialog.ui.h MacroEdit.qrc.cpp 
+
+EXTRA_DIST = CodeTemplateDialog.ui FindTextDialog.ui FunctionListDialog.ui GotoLineDialog.ui MacroEdit.ui RunDialog.ui TabsDialog.ui VerbFunctionHelpDialog.ui MacroEdit.qrc
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/MacroEditor/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/MacroEditor/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/MacroEditor$(EXEEXT): $(bin_MacroEditor_OBJECTS) $(bin_MacroEditor_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/MacroEditor$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_MacroEditor_LINK) $(bin_MacroEditor_OBJECTS) $(bin_MacroEditor_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-FindTextDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-FunctionListDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-GotoLineDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-Highlighter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-Highlighter.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-LanguageHelper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MacroEdit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MacroHelper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MagMLHelper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-MvMain.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-PlainTextHelper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-RunDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-RunDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-ShellHelper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-TabsDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-mvplaintextedit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_MacroEditor-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MvMain.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MvMain.Tpo -c -o bin_MacroEditor-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MvMain.Tpo $(DEPDIR)/bin_MacroEditor-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_MacroEditor-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_MacroEditor-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MvMain.Tpo -c -o bin_MacroEditor-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MvMain.Tpo $(DEPDIR)/bin_MacroEditor-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_MacroEditor-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_MacroEditor-Highlighter.o: Highlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-Highlighter.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-Highlighter.Tpo -c -o bin_MacroEditor-Highlighter.o `test -f 'Highlighter.cc' || echo '$(srcdir)/'`Highlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-Highlighter.Tpo $(DEPDIR)/bin_MacroEditor-Highlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Highlighter.cc' object='bin_MacroEditor-Highlighter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-Highlighter.o `test -f 'Highlighter.cc' || echo '$(srcdir)/'`Highlighter.cc
+
+bin_MacroEditor-Highlighter.obj: Highlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-Highlighter.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-Highlighter.Tpo -c -o bin_MacroEditor-Highlighter.obj `if test -f 'Highlighter.cc'; then $(CYGPATH_W) 'Highlighter.cc'; else $(CYGPATH_W) '$(srcdir)/Highlighter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-Highlighter.Tpo $(DEPDIR)/bin_MacroEditor-Highlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Highlighter.cc' object='bin_MacroEditor-Highlighter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-Highlighter.obj `if test -f 'Highlighter.cc'; then $(CYGPATH_W) 'Highlighter.cc'; else $(CYGPATH_W) '$(srcdir)/Highlighter.cc'; fi`
+
+bin_MacroEditor-MacroEdit.o: MacroEdit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroEdit.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroEdit.Tpo -c -o bin_MacroEditor-MacroEdit.o `test -f 'MacroEdit.cc' || echo '$(srcdir)/'`MacroEdit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroEdit.Tpo $(DEPDIR)/bin_MacroEditor-MacroEdit.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEdit.cc' object='bin_MacroEditor-MacroEdit.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroEdit.o `test -f 'MacroEdit.cc' || echo '$(srcdir)/'`MacroEdit.cc
+
+bin_MacroEditor-MacroEdit.obj: MacroEdit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroEdit.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroEdit.Tpo -c -o bin_MacroEditor-MacroEdit.obj `if test -f 'MacroEdit.cc'; then $(CYGPATH_W) 'MacroEdit.cc'; else $(CYGPATH_W) '$(srcdir)/MacroEdit.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroEdit.Tpo $(DEPDIR)/bin_MacroEditor-MacroEdit.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEdit.cc' object='bin_MacroEditor-MacroEdit.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroEdit.obj `if test -f 'MacroEdit.cc'; then $(CYGPATH_W) 'MacroEdit.cc'; else $(CYGPATH_W) '$(srcdir)/MacroEdit.cc'; fi`
+
+bin_MacroEditor-CodeTemplateDialog.o: CodeTemplateDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-CodeTemplateDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Tpo -c -o bin_MacroEditor-CodeTemplateDialog.o `test -f 'CodeTemplateDialog.cc' || echo '$(srcdir)/'`CodeTemplateDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Tpo $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CodeTemplateDialog.cc' object='bin_MacroEditor-CodeTemplateDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-CodeTemplateDialog.o `test -f 'CodeTemplateDialog.cc' || echo '$(srcdir)/'`CodeTemplateDialog.cc
+
+bin_MacroEditor-CodeTemplateDialog.obj: CodeTemplateDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-CodeTemplateDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Tpo -c -o bin_MacroEditor-CodeTemplateDialog.obj `if test -f 'CodeTemplateDialog.cc'; then $(CYGPATH_W) 'CodeTemplateDialog.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTemplateDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Tpo $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CodeTemplateDialog.cc' object='bin_MacroEditor-CodeTemplateDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-CodeTemplateDialog.obj `if test -f 'CodeTemplateDialog.cc'; then $(CYGPATH_W) 'CodeTemplateDialog.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTemplateDialog.cc'; fi`
+
+bin_MacroEditor-FindTextDialog.o: FindTextDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FindTextDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FindTextDialog.Tpo -c -o bin_MacroEditor-FindTextDialog.o `test -f 'FindTextDialog.cc' || echo '$(srcdir)/'`FindTextDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FindTextDialog.Tpo $(DEPDIR)/bin_MacroEditor-FindTextDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FindTextDialog.cc' object='bin_MacroEditor-FindTextDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FindTextDialog.o `test -f 'FindTextDialog.cc' || echo '$(srcdir)/'`FindTextDialog.cc
+
+bin_MacroEditor-FindTextDialog.obj: FindTextDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FindTextDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FindTextDialog.Tpo -c -o bin_MacroEditor-FindTextDialog.obj `if test -f 'FindTextDialog.cc'; then $(CYGPATH_W) 'FindTextDialog.cc'; else $(CYGPATH_W) '$(srcdir)/FindTextDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FindTextDialog.Tpo $(DEPDIR)/bin_MacroEditor-FindTextDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FindTextDialog.cc' object='bin_MacroEditor-FindTextDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FindTextDialog.obj `if test -f 'FindTextDialog.cc'; then $(CYGPATH_W) 'FindTextDialog.cc'; else $(CYGPATH_W) '$(srcdir)/FindTextDialog.cc'; fi`
+
+bin_MacroEditor-GotoLineDialog.o: GotoLineDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-GotoLineDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-GotoLineDialog.Tpo -c -o bin_MacroEditor-GotoLineDialog.o `test -f 'GotoLineDialog.cc' || echo '$(srcdir)/'`GotoLineDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-GotoLineDialog.Tpo $(DEPDIR)/bin_MacroEditor-GotoLineDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GotoLineDialog.cc' object='bin_MacroEditor-GotoLineDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-GotoLineDialog.o `test -f 'GotoLineDialog.cc' || echo '$(srcdir)/'`GotoLineDialog.cc
+
+bin_MacroEditor-GotoLineDialog.obj: GotoLineDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-GotoLineDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-GotoLineDialog.Tpo -c -o bin_MacroEditor-GotoLineDialog.obj `if test -f 'GotoLineDialog.cc'; then $(CYGPATH_W) 'GotoLineDialog.cc'; else $(CYGPATH_W) '$(srcdir)/GotoLineDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-GotoLineDialog.Tpo $(DEPDIR)/bin_MacroEditor-GotoLineDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GotoLineDialog.cc' object='bin_MacroEditor-GotoLineDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-GotoLineDialog.obj `if test -f 'GotoLineDialog.cc'; then $(CYGPATH_W) 'GotoLineDialog.cc'; else $(CYGPATH_W) '$(srcdir)/GotoLineDialog.cc'; fi`
+
+bin_MacroEditor-RunDialog.o: RunDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-RunDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-RunDialog.Tpo -c -o bin_MacroEditor-RunDialog.o `test -f 'RunDialog.cc' || echo '$(srcdir)/'`RunDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-RunDialog.Tpo $(DEPDIR)/bin_MacroEditor-RunDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RunDialog.cc' object='bin_MacroEditor-RunDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-RunDialog.o `test -f 'RunDialog.cc' || echo '$(srcdir)/'`RunDialog.cc
+
+bin_MacroEditor-RunDialog.obj: RunDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-RunDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-RunDialog.Tpo -c -o bin_MacroEditor-RunDialog.obj `if test -f 'RunDialog.cc'; then $(CYGPATH_W) 'RunDialog.cc'; else $(CYGPATH_W) '$(srcdir)/RunDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-RunDialog.Tpo $(DEPDIR)/bin_MacroEditor-RunDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RunDialog.cc' object='bin_MacroEditor-RunDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-RunDialog.obj `if test -f 'RunDialog.cc'; then $(CYGPATH_W) 'RunDialog.cc'; else $(CYGPATH_W) '$(srcdir)/RunDialog.cc'; fi`
+
+bin_MacroEditor-TabsDialog.o: TabsDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-TabsDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-TabsDialog.Tpo -c -o bin_MacroEditor-TabsDialog.o `test -f 'TabsDialog.cc' || echo '$(srcdir)/'`TabsDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-TabsDialog.Tpo $(DEPDIR)/bin_MacroEditor-TabsDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TabsDialog.cc' object='bin_MacroEditor-TabsDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-TabsDialog.o `test -f 'TabsDialog.cc' || echo '$(srcdir)/'`TabsDialog.cc
+
+bin_MacroEditor-TabsDialog.obj: TabsDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-TabsDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-TabsDialog.Tpo -c -o bin_MacroEditor-TabsDialog.obj `if test -f 'TabsDialog.cc'; then $(CYGPATH_W) 'TabsDialog.cc'; else $(CYGPATH_W) '$(srcdir)/TabsDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-TabsDialog.Tpo $(DEPDIR)/bin_MacroEditor-TabsDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TabsDialog.cc' object='bin_MacroEditor-TabsDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-TabsDialog.obj `if test -f 'TabsDialog.cc'; then $(CYGPATH_W) 'TabsDialog.cc'; else $(CYGPATH_W) '$(srcdir)/TabsDialog.cc'; fi`
+
+bin_MacroEditor-FunctionListDialog.o: FunctionListDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FunctionListDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FunctionListDialog.Tpo -c -o bin_MacroEditor-FunctionListDialog.o `test -f 'FunctionListDialog.cc' || echo '$(srcdir)/'`FunctionListDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FunctionListDialog.Tpo $(DEPDIR)/bin_MacroEditor-FunctionListDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FunctionListDialog.cc' object='bin_MacroEditor-FunctionListDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FunctionListDialog.o `test -f 'FunctionListDialog.cc' || echo '$(srcdir)/'`FunctionListDialog.cc
+
+bin_MacroEditor-FunctionListDialog.obj: FunctionListDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FunctionListDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FunctionListDialog.Tpo -c -o bin_MacroEditor-FunctionListDialog.obj `if test -f 'FunctionListDialog.cc'; then $(CYGPATH_W) 'FunctionListDialog.cc'; else $(CYGPATH_W) '$(srcdir)/FunctionListDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FunctionListDialog.Tpo $(DEPDIR)/bin_MacroEditor-FunctionListDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FunctionListDialog.cc' object='bin_MacroEditor-FunctionListDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FunctionListDialog.obj `if test -f 'FunctionListDialog.cc'; then $(CYGPATH_W) 'FunctionListDialog.cc'; else $(CYGPATH_W) '$(srcdir)/FunctionListDialog.cc'; fi`
+
+bin_MacroEditor-VerbFunctionHelpDialog.o: VerbFunctionHelpDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-VerbFunctionHelpDialog.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Tpo -c -o bin_MacroEditor-VerbFunctionHelpDialog.o `test -f 'VerbFunctionHelpDialog.cc' || echo '$(srcdir)/'`VerbFunctionHelpDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Tpo $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VerbFunctionHelpDialog.cc' object='bin_MacroEditor-VerbFunctionHelpDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-VerbFunctionHelpDialog.o `test -f 'VerbFunctionHelpDialog.cc' || echo '$(srcdir)/'`VerbFunctionHelpDialog.cc
+
+bin_MacroEditor-VerbFunctionHelpDialog.obj: VerbFunctionHelpDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-VerbFunctionHelpDialog.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Tpo -c -o bin_MacroEditor-VerbFunctionHelpDialog.obj `if test -f 'VerbFunctionHelpDialog.cc'; then $(CYGPATH_W) 'VerbFunctionHelpDialog.cc'; else $(CYGPATH_W) '$(srcdir)/VerbFunctionHelpDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Tpo $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VerbFunctionHelpDialog.cc' object='bin_MacroEditor-VerbFunctionHelpDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-VerbFunctionHelpDialog.obj `if test -f 'VerbFunctionHelpDialog.cc'; then $(CYGPATH_W) 'VerbFunctionHelpDialog.cc'; else $(CYGPATH_W) '$(srcdir)/VerbFunctionHelpDialog.cc'; fi`
+
+bin_MacroEditor-mvplaintextedit.o: mvplaintextedit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-mvplaintextedit.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-mvplaintextedit.Tpo -c -o bin_MacroEditor-mvplaintextedit.o `test -f 'mvplaintextedit.cc' || echo '$(srcdir)/'`mvplaintextedit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-mvplaintextedit.Tpo $(DEPDIR)/bin_MacroEditor-mvplaintextedit.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mvplaintextedit.cc' object='bin_MacroEditor-mvplaintextedit.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-mvplaintextedit.o `test -f 'mvplaintextedit.cc' || echo '$(srcdir)/'`mvplaintextedit.cc
+
+bin_MacroEditor-mvplaintextedit.obj: mvplaintextedit.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-mvplaintextedit.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-mvplaintextedit.Tpo -c -o bin_MacroEditor-mvplaintextedit.obj `if test -f 'mvplaintextedit.cc'; then $(CYGPATH_W) 'mvplaintextedit.cc'; else $(CYGPATH_W) '$(srcdir)/mvplaintextedit.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-mvplaintextedit.Tpo $(DEPDIR)/bin_MacroEditor-mvplaintextedit.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mvplaintextedit.cc' object='bin_MacroEditor-mvplaintextedit.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-mvplaintextedit.obj `if test -f 'mvplaintextedit.cc'; then $(CYGPATH_W) 'mvplaintextedit.cc'; else $(CYGPATH_W) '$(srcdir)/mvplaintextedit.cc'; fi`
+
+bin_MacroEditor-MacroHelper.o: MacroHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroHelper.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroHelper.Tpo -c -o bin_MacroEditor-MacroHelper.o `test -f 'MacroHelper.cc' || echo '$(srcdir)/'`MacroHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroHelper.Tpo $(DEPDIR)/bin_MacroEditor-MacroHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroHelper.cc' object='bin_MacroEditor-MacroHelper.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroHelper.o `test -f 'MacroHelper.cc' || echo '$(srcdir)/'`MacroHelper.cc
+
+bin_MacroEditor-MacroHelper.obj: MacroHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroHelper.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroHelper.Tpo -c -o bin_MacroEditor-MacroHelper.obj `if test -f 'MacroHelper.cc'; then $(CYGPATH_W) 'MacroHelper.cc'; else $(CYGPATH_W) '$(srcdir)/MacroHelper.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroHelper.Tpo $(DEPDIR)/bin_MacroEditor-MacroHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroHelper.cc' object='bin_MacroEditor-MacroHelper.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroHelper.obj `if test -f 'MacroHelper.cc'; then $(CYGPATH_W) 'MacroHelper.cc'; else $(CYGPATH_W) '$(srcdir)/MacroHelper.cc'; fi`
+
+bin_MacroEditor-MagMLHelper.o: MagMLHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MagMLHelper.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MagMLHelper.Tpo -c -o bin_MacroEditor-MagMLHelper.o `test -f 'MagMLHelper.cc' || echo '$(srcdir)/'`MagMLHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MagMLHelper.Tpo $(DEPDIR)/bin_MacroEditor-MagMLHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagMLHelper.cc' object='bin_MacroEditor-MagMLHelper.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MagMLHelper.o `test -f 'MagMLHelper.cc' || echo '$(srcdir)/'`MagMLHelper.cc
+
+bin_MacroEditor-MagMLHelper.obj: MagMLHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MagMLHelper.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MagMLHelper.Tpo -c -o bin_MacroEditor-MagMLHelper.obj `if test -f 'MagMLHelper.cc'; then $(CYGPATH_W) 'MagMLHelper.cc'; else $(CYGPATH_W) '$(srcdir)/MagMLHelper.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MagMLHelper.Tpo $(DEPDIR)/bin_MacroEditor-MagMLHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagMLHelper.cc' object='bin_MacroEditor-MagMLHelper.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MagMLHelper.obj `if test -f 'MagMLHelper.cc'; then $(CYGPATH_W) 'MagMLHelper.cc'; else $(CYGPATH_W) '$(srcdir)/MagMLHelper.cc'; fi`
+
+bin_MacroEditor-ShellHelper.o: ShellHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-ShellHelper.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-ShellHelper.Tpo -c -o bin_MacroEditor-ShellHelper.o `test -f 'ShellHelper.cc' || echo '$(srcdir)/'`ShellHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-ShellHelper.Tpo $(DEPDIR)/bin_MacroEditor-ShellHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ShellHelper.cc' object='bin_MacroEditor-ShellHelper.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-ShellHelper.o `test -f 'ShellHelper.cc' || echo '$(srcdir)/'`ShellHelper.cc
+
+bin_MacroEditor-ShellHelper.obj: ShellHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-ShellHelper.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-ShellHelper.Tpo -c -o bin_MacroEditor-ShellHelper.obj `if test -f 'ShellHelper.cc'; then $(CYGPATH_W) 'ShellHelper.cc'; else $(CYGPATH_W) '$(srcdir)/ShellHelper.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-ShellHelper.Tpo $(DEPDIR)/bin_MacroEditor-ShellHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ShellHelper.cc' object='bin_MacroEditor-ShellHelper.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-ShellHelper.obj `if test -f 'ShellHelper.cc'; then $(CYGPATH_W) 'ShellHelper.cc'; else $(CYGPATH_W) '$(srcdir)/ShellHelper.cc'; fi`
+
+bin_MacroEditor-PlainTextHelper.o: PlainTextHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-PlainTextHelper.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-PlainTextHelper.Tpo -c -o bin_MacroEditor-PlainTextHelper.o `test -f 'PlainTextHelper.cc' || echo '$(srcdir)/'`PlainTextHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-PlainTextHelper.Tpo $(DEPDIR)/bin_MacroEditor-PlainTextHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlainTextHelper.cc' object='bin_MacroEditor-PlainTextHelper.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-PlainTextHelper.o `test -f 'PlainTextHelper.cc' || echo '$(srcdir)/'`PlainTextHelper.cc
+
+bin_MacroEditor-PlainTextHelper.obj: PlainTextHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-PlainTextHelper.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-PlainTextHelper.Tpo -c -o bin_MacroEditor-PlainTextHelper.obj `if test -f 'PlainTextHelper.cc'; then $(CYGPATH_W) 'PlainTextHelper.cc'; else $(CYGPATH_W) '$(srcdir)/PlainTextHelper.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-PlainTextHelper.Tpo $(DEPDIR)/bin_MacroEditor-PlainTextHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlainTextHelper.cc' object='bin_MacroEditor-PlainTextHelper.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-PlainTextHelper.obj `if test -f 'PlainTextHelper.cc'; then $(CYGPATH_W) 'PlainTextHelper.cc'; else $(CYGPATH_W) '$(srcdir)/PlainTextHelper.cc'; fi`
+
+bin_MacroEditor-LanguageHelper.o: LanguageHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-LanguageHelper.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-LanguageHelper.Tpo -c -o bin_MacroEditor-LanguageHelper.o `test -f 'LanguageHelper.cc' || echo '$(srcdir)/'`LanguageHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-LanguageHelper.Tpo $(DEPDIR)/bin_MacroEditor-LanguageHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LanguageHelper.cc' object='bin_MacroEditor-LanguageHelper.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-LanguageHelper.o `test -f 'LanguageHelper.cc' || echo '$(srcdir)/'`LanguageHelper.cc
+
+bin_MacroEditor-LanguageHelper.obj: LanguageHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-LanguageHelper.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-LanguageHelper.Tpo -c -o bin_MacroEditor-LanguageHelper.obj `if test -f 'LanguageHelper.cc'; then $(CYGPATH_W) 'LanguageHelper.cc'; else $(CYGPATH_W) '$(srcdir)/LanguageHelper.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-LanguageHelper.Tpo $(DEPDIR)/bin_MacroEditor-LanguageHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LanguageHelper.cc' object='bin_MacroEditor-LanguageHelper.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-LanguageHelper.obj `if test -f 'LanguageHelper.cc'; then $(CYGPATH_W) 'LanguageHelper.cc'; else $(CYGPATH_W) '$(srcdir)/LanguageHelper.cc'; fi`
+
+bin_MacroEditor-LanguageHelperFactory.o: LanguageHelperFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-LanguageHelperFactory.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Tpo -c -o bin_MacroEditor-LanguageHelperFactory.o `test -f 'LanguageHelperFactory.cc' || echo '$(srcdir)/'`LanguageHelperFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Tpo $(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LanguageHelperFactory.cc' object='bin_MacroEditor-LanguageHelperFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-LanguageHelperFactory.o `test -f 'LanguageHelperFactory.cc' || echo '$(srcdir)/'`LanguageHelperFactory.cc
+
+bin_MacroEditor-LanguageHelperFactory.obj: LanguageHelperFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-LanguageHelperFactory.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Tpo -c -o bin_MacroEditor-LanguageHelperFactory.obj `if test -f 'LanguageHelperFactory.cc'; then $(CYGPATH_W) 'LanguageHelperFactory.cc'; else $(CYGPATH_W) '$(srcdir)/LanguageHelperFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Tpo $(DEPDIR)/bin_MacroEditor-LanguageHelperFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LanguageHelperFactory.cc' object='bin_MacroEditor-LanguageHelperFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-LanguageHelperFactory.obj `if test -f 'LanguageHelperFactory.cc'; then $(CYGPATH_W) 'LanguageHelperFactory.cc'; else $(CYGPATH_W) '$(srcdir)/LanguageHelperFactory.cc'; fi`
+
+bin_MacroEditor-VerbFunctionHelp.o: VerbFunctionHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-VerbFunctionHelp.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Tpo -c -o bin_MacroEditor-VerbFunctionHelp.o `test -f 'VerbFunctionHelp.cc' || echo '$(srcdir)/'`VerbFunctionHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Tpo $(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VerbFunctionHelp.cc' object='bin_MacroEditor-VerbFunctionHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-VerbFunctionHelp.o `test -f 'VerbFunctionHelp.cc' || echo '$(srcdir)/'`VerbFunctionHelp.cc
+
+bin_MacroEditor-VerbFunctionHelp.obj: VerbFunctionHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-VerbFunctionHelp.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Tpo -c -o bin_MacroEditor-VerbFunctionHelp.obj `if test -f 'VerbFunctionHelp.cc'; then $(CYGPATH_W) 'VerbFunctionHelp.cc'; else $(CYGPATH_W) '$(srcdir)/VerbFunctionHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Tpo $(DEPDIR)/bin_MacroEditor-VerbFunctionHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VerbFunctionHelp.cc' object='bin_MacroEditor-VerbFunctionHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-VerbFunctionHelp.obj `if test -f 'VerbFunctionHelp.cc'; then $(CYGPATH_W) 'VerbFunctionHelp.cc'; else $(CYGPATH_W) '$(srcdir)/VerbFunctionHelp.cc'; fi`
+
+bin_MacroEditor-MvMain.moc.o: MvMain.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MvMain.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MvMain.moc.Tpo -c -o bin_MacroEditor-MvMain.moc.o `test -f 'MvMain.moc.cpp' || echo '$(srcdir)/'`MvMain.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MvMain.moc.Tpo $(DEPDIR)/bin_MacroEditor-MvMain.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.moc.cpp' object='bin_MacroEditor-MvMain.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MvMain.moc.o `test -f 'MvMain.moc.cpp' || echo '$(srcdir)/'`MvMain.moc.cpp
+
+bin_MacroEditor-MvMain.moc.obj: MvMain.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MvMain.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MvMain.moc.Tpo -c -o bin_MacroEditor-MvMain.moc.obj `if test -f 'MvMain.moc.cpp'; then $(CYGPATH_W) 'MvMain.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvMain.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MvMain.moc.Tpo $(DEPDIR)/bin_MacroEditor-MvMain.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.moc.cpp' object='bin_MacroEditor-MvMain.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MvMain.moc.obj `if test -f 'MvMain.moc.cpp'; then $(CYGPATH_W) 'MvMain.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvMain.moc.cpp'; fi`
+
+bin_MacroEditor-FindTextDialog.moc.o: FindTextDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FindTextDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Tpo -c -o bin_MacroEditor-FindTextDialog.moc.o `test -f 'FindTextDialog.moc.cpp' || echo '$(srcdir)/'`FindTextDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FindTextDialog.moc.cpp' object='bin_MacroEditor-FindTextDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FindTextDialog.moc.o `test -f 'FindTextDialog.moc.cpp' || echo '$(srcdir)/'`FindTextDialog.moc.cpp
+
+bin_MacroEditor-FindTextDialog.moc.obj: FindTextDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FindTextDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Tpo -c -o bin_MacroEditor-FindTextDialog.moc.obj `if test -f 'FindTextDialog.moc.cpp'; then $(CYGPATH_W) 'FindTextDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/FindTextDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-FindTextDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FindTextDialog.moc.cpp' object='bin_MacroEditor-FindTextDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FindTextDialog.moc.obj `if test -f 'FindTextDialog.moc.cpp'; then $(CYGPATH_W) 'FindTextDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/FindTextDialog.moc.cpp'; fi`
+
+bin_MacroEditor-Highlighter.moc.o: Highlighter.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-Highlighter.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-Highlighter.moc.Tpo -c -o bin_MacroEditor-Highlighter.moc.o `test -f 'Highlighter.moc.cpp' || echo '$(srcdir)/'`Highlighter.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-Highlighter.moc.Tpo $(DEPDIR)/bin_MacroEditor-Highlighter.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Highlighter.moc.cpp' object='bin_MacroEditor-Highlighter.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-Highlighter.moc.o `test -f 'Highlighter.moc.cpp' || echo '$(srcdir)/'`Highlighter.moc.cpp
+
+bin_MacroEditor-Highlighter.moc.obj: Highlighter.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-Highlighter.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-Highlighter.moc.Tpo -c -o bin_MacroEditor-Highlighter.moc.obj `if test -f 'Highlighter.moc.cpp'; then $(CYGPATH_W) 'Highlighter.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/Highlighter.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-Highlighter.moc.Tpo $(DEPDIR)/bin_MacroEditor-Highlighter.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Highlighter.moc.cpp' object='bin_MacroEditor-Highlighter.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-Highlighter.moc.obj `if test -f 'Highlighter.moc.cpp'; then $(CYGPATH_W) 'Highlighter.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/Highlighter.moc.cpp'; fi`
+
+bin_MacroEditor-MacroEdit.moc.o: MacroEdit.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroEdit.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Tpo -c -o bin_MacroEditor-MacroEdit.moc.o `test -f 'MacroEdit.moc.cpp' || echo '$(srcdir)/'`MacroEdit.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Tpo $(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEdit.moc.cpp' object='bin_MacroEditor-MacroEdit.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroEdit.moc.o `test -f 'MacroEdit.moc.cpp' || echo '$(srcdir)/'`MacroEdit.moc.cpp
+
+bin_MacroEditor-MacroEdit.moc.obj: MacroEdit.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroEdit.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Tpo -c -o bin_MacroEditor-MacroEdit.moc.obj `if test -f 'MacroEdit.moc.cpp'; then $(CYGPATH_W) 'MacroEdit.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MacroEdit.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Tpo $(DEPDIR)/bin_MacroEditor-MacroEdit.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEdit.moc.cpp' object='bin_MacroEditor-MacroEdit.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroEdit.moc.obj `if test -f 'MacroEdit.moc.cpp'; then $(CYGPATH_W) 'MacroEdit.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MacroEdit.moc.cpp'; fi`
+
+bin_MacroEditor-FunctionListDialog.moc.o: FunctionListDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FunctionListDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Tpo -c -o bin_MacroEditor-FunctionListDialog.moc.o `test -f 'FunctionListDialog.moc.cpp' || echo '$(srcdir)/'`FunctionListDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FunctionListDialog.moc.cpp' object='bin_MacroEditor-FunctionListDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FunctionListDialog.moc.o `test -f 'FunctionListDialog.moc.cpp' || echo '$(srcdir)/'`FunctionListDialog.moc.cpp
+
+bin_MacroEditor-FunctionListDialog.moc.obj: FunctionListDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-FunctionListDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Tpo -c -o bin_MacroEditor-FunctionListDialog.moc.obj `if test -f 'FunctionListDialog.moc.cpp'; then $(CYGPATH_W) 'FunctionListDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/FunctionListDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-FunctionListDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FunctionListDialog.moc.cpp' object='bin_MacroEditor-FunctionListDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-FunctionListDialog.moc.obj `if test -f 'FunctionListDialog.moc.cpp'; then $(CYGPATH_W) 'FunctionListDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/FunctionListDialog.moc.cpp'; fi`
+
+bin_MacroEditor-mvplaintextedit.moc.o: mvplaintextedit.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-mvplaintextedit.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Tpo -c -o bin_MacroEditor-mvplaintextedit.moc.o `test -f 'mvplaintextedit.moc.cpp' || echo '$(srcdir)/'`mvplaintextedit.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Tpo $(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mvplaintextedit.moc.cpp' object='bin_MacroEditor-mvplaintextedit.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-mvplaintextedit.moc.o `test -f 'mvplaintextedit.moc.cpp' || echo '$(srcdir)/'`mvplaintextedit.moc.cpp
+
+bin_MacroEditor-mvplaintextedit.moc.obj: mvplaintextedit.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-mvplaintextedit.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Tpo -c -o bin_MacroEditor-mvplaintextedit.moc.obj `if test -f 'mvplaintextedit.moc.cpp'; then $(CYGPATH_W) 'mvplaintextedit.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/mvplaintextedit.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Tpo $(DEPDIR)/bin_MacroEditor-mvplaintextedit.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mvplaintextedit.moc.cpp' object='bin_MacroEditor-mvplaintextedit.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-mvplaintextedit.moc.obj `if test -f 'mvplaintextedit.moc.cpp'; then $(CYGPATH_W) 'mvplaintextedit.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/mvplaintextedit.moc.cpp'; fi`
+
+bin_MacroEditor-CodeTemplateDialog.moc.o: CodeTemplateDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-CodeTemplateDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Tpo -c -o bin_MacroEditor-CodeTemplateDialog.moc.o `test -f 'CodeTemplateDialog.moc.cpp' || echo '$(srcdir)/'`CodeTemplateDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CodeTemplateDialog.moc.cpp' object='bin_MacroEditor-CodeTemplateDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-CodeTemplateDialog.moc.o `test -f 'CodeTemplateDialog.moc.cpp' || echo '$(srcdir)/'`CodeTemplateDialog.moc.cpp
+
+bin_MacroEditor-CodeTemplateDialog.moc.obj: CodeTemplateDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-CodeTemplateDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Tpo -c -o bin_MacroEditor-CodeTemplateDialog.moc.obj `if test -f 'CodeTemplateDialog.moc.cpp'; then $(CYGPATH_W) 'CodeTemplateDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/CodeTemplateDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-CodeTemplateDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CodeTemplateDialog.moc.cpp' object='bin_MacroEditor-CodeTemplateDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-CodeTemplateDialog.moc.obj `if test -f 'CodeTemplateDialog.moc.cpp'; then $(CYGPATH_W) 'CodeTemplateDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/CodeTemplateDialog.moc.cpp'; fi`
+
+bin_MacroEditor-GotoLineDialog.moc.o: GotoLineDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-GotoLineDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Tpo -c -o bin_MacroEditor-GotoLineDialog.moc.o `test -f 'GotoLineDialog.moc.cpp' || echo '$(srcdir)/'`GotoLineDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GotoLineDialog.moc.cpp' object='bin_MacroEditor-GotoLineDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-GotoLineDialog.moc.o `test -f 'GotoLineDialog.moc.cpp' || echo '$(srcdir)/'`GotoLineDialog.moc.cpp
+
+bin_MacroEditor-GotoLineDialog.moc.obj: GotoLineDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-GotoLineDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Tpo -c -o bin_MacroEditor-GotoLineDialog.moc.obj `if test -f 'GotoLineDialog.moc.cpp'; then $(CYGPATH_W) 'GotoLineDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GotoLineDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-GotoLineDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GotoLineDialog.moc.cpp' object='bin_MacroEditor-GotoLineDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-GotoLineDialog.moc.obj `if test -f 'GotoLineDialog.moc.cpp'; then $(CYGPATH_W) 'GotoLineDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GotoLineDialog.moc.cpp'; fi`
+
+bin_MacroEditor-RunDialog.moc.o: RunDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-RunDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-RunDialog.moc.Tpo -c -o bin_MacroEditor-RunDialog.moc.o `test -f 'RunDialog.moc.cpp' || echo '$(srcdir)/'`RunDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-RunDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-RunDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RunDialog.moc.cpp' object='bin_MacroEditor-RunDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-RunDialog.moc.o `test -f 'RunDialog.moc.cpp' || echo '$(srcdir)/'`RunDialog.moc.cpp
+
+bin_MacroEditor-RunDialog.moc.obj: RunDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-RunDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-RunDialog.moc.Tpo -c -o bin_MacroEditor-RunDialog.moc.obj `if test -f 'RunDialog.moc.cpp'; then $(CYGPATH_W) 'RunDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/RunDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-RunDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-RunDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RunDialog.moc.cpp' object='bin_MacroEditor-RunDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-RunDialog.moc.obj `if test -f 'RunDialog.moc.cpp'; then $(CYGPATH_W) 'RunDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/RunDialog.moc.cpp'; fi`
+
+bin_MacroEditor-TabsDialog.moc.o: TabsDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-TabsDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Tpo -c -o bin_MacroEditor-TabsDialog.moc.o `test -f 'TabsDialog.moc.cpp' || echo '$(srcdir)/'`TabsDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TabsDialog.moc.cpp' object='bin_MacroEditor-TabsDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-TabsDialog.moc.o `test -f 'TabsDialog.moc.cpp' || echo '$(srcdir)/'`TabsDialog.moc.cpp
+
+bin_MacroEditor-TabsDialog.moc.obj: TabsDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-TabsDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Tpo -c -o bin_MacroEditor-TabsDialog.moc.obj `if test -f 'TabsDialog.moc.cpp'; then $(CYGPATH_W) 'TabsDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/TabsDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-TabsDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TabsDialog.moc.cpp' object='bin_MacroEditor-TabsDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-TabsDialog.moc.obj `if test -f 'TabsDialog.moc.cpp'; then $(CYGPATH_W) 'TabsDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/TabsDialog.moc.cpp'; fi`
+
+bin_MacroEditor-VerbFunctionHelpDialog.moc.o: VerbFunctionHelpDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-VerbFunctionHelpDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Tpo -c -o bin_MacroEditor-VerbFunctionHelpDialog.moc.o `test -f 'VerbFunctionHelpDialog.moc.cpp' || echo '$(srcdir)/'`VerbFunctionHelpDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VerbFunctionHelpDialog.moc.cpp' object='bin_MacroEditor-VerbFunctionHelpDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-VerbFunctionHelpDialog.moc.o `test -f 'VerbFunctionHelpDialog.moc.cpp' || echo '$(srcdir)/'`VerbFunctionHelpDialog.moc.cpp
+
+bin_MacroEditor-VerbFunctionHelpDialog.moc.obj: VerbFunctionHelpDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-VerbFunctionHelpDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Tpo -c -o bin_MacroEditor-VerbFunctionHelpDialog.moc.obj `if test -f 'VerbFunctionHelpDialog.moc.cpp'; then $(CYGPATH_W) 'VerbFunctionHelpDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/VerbFunctionHelpDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Tpo $(DEPDIR)/bin_MacroEditor-VerbFunctionHelpDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VerbFunctionHelpDialog.moc.cpp' object='bin_MacroEditor-VerbFunctionHelpDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-VerbFunctionHelpDialog.moc.obj `if test -f 'VerbFunctionHelpDialog.moc.cpp'; then $(CYGPATH_W) 'VerbFunctionHelpDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/VerbFunctionHelpDialog.moc.cpp'; fi`
+
+bin_MacroEditor-MacroEdit.qrc.o: MacroEdit.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroEdit.qrc.o -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Tpo -c -o bin_MacroEditor-MacroEdit.qrc.o `test -f 'MacroEdit.qrc.cpp' || echo '$(srcdir)/'`MacroEdit.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Tpo $(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEdit.qrc.cpp' object='bin_MacroEditor-MacroEdit.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroEdit.qrc.o `test -f 'MacroEdit.qrc.cpp' || echo '$(srcdir)/'`MacroEdit.qrc.cpp
+
+bin_MacroEditor-MacroEdit.qrc.obj: MacroEdit.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MacroEditor-MacroEdit.qrc.obj -MD -MP -MF $(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Tpo -c -o bin_MacroEditor-MacroEdit.qrc.obj `if test -f 'MacroEdit.qrc.cpp'; then $(CYGPATH_W) 'MacroEdit.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/MacroEdit.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Tpo $(DEPDIR)/bin_MacroEditor-MacroEdit.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEdit.qrc.cpp' object='bin_MacroEditor-MacroEdit.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MacroEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MacroEditor-MacroEdit.qrc.obj `if test -f 'MacroEdit.qrc.cpp'; then $(CYGPATH_W) 'MacroEdit.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/MacroEdit.qrc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.ui.h *.moc.cpp *.qrc.cpp	
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/MacroEditor/MvMain.cc b/src/MacroEditor/MvMain.cc
new file mode 100644
index 0000000..566b411
--- /dev/null
+++ b/src/MacroEditor/MvMain.cc
@@ -0,0 +1,186 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include <Metview.h>
+#include "MvQService.h"
+#include "MvQX11Application.h"
+#include "MacroEdit.h"
+#include "MvMain.h"
+
+using namespace std;
+
+
+class MacroEditorApplication;
+
+// Globals
+
+int          ac;
+char       **av;
+
+
+
+
+// ----------------------------------------------------------------------
+// MacroEditorApplication
+// This is the main application class for the macro editor. It is a
+// standard MvApplication because we don't need any Qt user interface
+// at this point - that is created when the service is called.
+// ----------------------------------------------------------------------
+
+class MacroEditorApplication : public MvApplication
+{
+public:
+    // Constructor
+    MacroEditorApplication(int& ac, char** av, const char* name=NULL);
+
+    // Destructor
+    virtual ~MacroEditorApplication() {};
+};
+
+
+MacroEditorApplication::MacroEditorApplication (int& ac, char** av, const char* name)
+ : MvApplication(ac, av, name)
+{
+//    setQuitOnLastWindowClosed (false);
+}
+
+
+
+
+// ==========================================================================================
+
+
+
+// -------------------------------------------------------------------------
+// MacroEditorService
+// This is service for the macro editor. When serve() called, we create an
+// MvQX11Application and pass it the path to the file we have been given.
+// We then start its event loop. When the editor is quit, it will exit the
+// serve() function.
+// -------------------------------------------------------------------------
+
+class MacroEditorService : public MvQService {
+
+public:
+
+    // Constructor
+    MacroEditorService(const char *name);
+
+    // Destructor
+    ~MacroEditorService();
+
+    void serve(MvRequest&,MvRequest&);
+};
+
+
+MacroEditorService::MacroEditorService(const char *name) : MvQService(name)
+{
+}
+
+
+MacroEditorService::~MacroEditorService()
+{
+}
+
+void MacroEditorService::serve(MvRequest &in, MvRequest &out)
+{
+    cout << "--------------MacroEditorService::serve()--------------" << endl;
+    in.print();    
+
+
+    // create the qt application
+
+    MvQX11Application app(ac, av);
+
+
+
+    // set up some parameters so that the application settings can be
+    // loaded and saved consistently. If we do this, then we do not need
+    // to do anything in the QSettings constructor.
+
+    QCoreApplication::setOrganizationName   ("ECMWF");
+    QCoreApplication::setOrganizationDomain ("ecmwf.int");
+    QCoreApplication::setApplicationName    ("MacroEditor");
+
+    QString appName("Metview Macro Editor");
+    QString fileName;
+    QString language;
+  
+    //Get verb
+    string verb = in.getVerb();    
+   
+    if(verb == "MACROEDIT")
+    {        
+        const char *cFileName = in("PATH");  // get the path to the macro from the request
+        fileName=QString(cFileName);
+
+        const char *cLanguage = in("LANGUAGE");  // get the programming language
+        language=QString(cLanguage);
+    }
+    else
+    {
+        const char *cFileName = in("PATH");  // get the path to the macro from the request
+        if(cFileName)
+            fileName=QString(cFileName);    
+        else
+            return;
+
+        if(verb == "KML")
+            language="MAGML";
+        else
+            language="NOTE";
+    }
+
+        
+    MacroEdit editor (appName);         // create the editor instance itself
+
+    editor.loadTextFile(fileName);
+    editor.setLanguage(language);
+    editor.autoInsertLicence();
+    editor.show();
+    editor.metview_dnd();
+	
+    //Listen to the mars event loop!
+    //setupSocketNotifier();
+    
+    //Enter the app loop
+
+    app.exec();    
+}
+
+
+
+
+// -------------------------------------------------------------------------
+// main
+// The program entry point. Start an MacroEditorApplication and the
+// MacroEditorService.
+// -------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+    ac = argc;
+    av = argv;
+    
+    MacroEditorApplication app(argc, argv, "macroedit");
+
+    QString fileName = "";
+
+    if (argc > 1)
+    {
+        fileName = argv[argc-1]; // take the last thing on the command line as the file to load
+    }
+
+    MacroEditorService service("MACROEDIT");  // create the service
+    MacroEditorService service1("KML");
+
+    app.run();    
+}
diff --git a/src/MacroEditor/MvMain.h b/src/MacroEditor/MvMain.h
new file mode 100644
index 0000000..0070602
--- /dev/null
+++ b/src/MacroEditor/MvMain.h
@@ -0,0 +1,12 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvMain_H
+#define MvMain_H
+#endif
diff --git a/src/MacroEditor/PlainTextHelper.cc b/src/MacroEditor/PlainTextHelper.cc
new file mode 100644
index 0000000..cfe3932
--- /dev/null
+++ b/src/MacroEditor/PlainTextHelper.cc
@@ -0,0 +1,109 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+
+#include "LanguageHelper.h" 
+#include "PlainTextHelper.h" 
+#include "Highlighter.h"
+
+
+
+// -----------------------------------------------------------------------
+// ------------------- Syntax highlighter code ---------------------------
+//        this class is used by the PlainTextHelper object, defined below
+// -----------------------------------------------------------------------
+
+
+class PlainTextHighlighter : public Highlighter
+{
+public:
+     PlainTextHighlighter(QTextDocument *parent = 0);
+    ~PlainTextHighlighter(){}
+
+     virtual void highlightBlock(const QString &text);
+
+};
+
+
+PlainTextHighlighter::PlainTextHighlighter(QTextDocument *parent)
+     : Highlighter(parent)
+{
+}
+
+
+
+void PlainTextHighlighter::highlightBlock(const QString &text)
+{
+    foreach (HighlightingRule rule, highlightingRules) 
+    {
+        QRegExp expression(rule.pattern);
+        int index = text.indexOf(expression);
+        while (index >= 0) 
+        {
+            int length = expression.matchedLength();
+            setFormat(index, length, rule.format);
+            index = text.indexOf(expression, index + length);
+        }
+    }
+}
+
+
+
+
+
+// -----------------------------------------------------------------------
+// -------------------------- PlainTextHelper code ---------------------------
+// -----------------------------------------------------------------------
+
+
+// ---------------------------------------------------------------------------
+// PlainTextHelper::PlainTextHelper
+// constructor
+// ---------------------------------------------------------------------------
+
+PlainTextHelper::PlainTextHelper()
+{
+    languageName_ = "Plain Text";
+    className_    = "NOTE";
+    serviceName_  = "none";
+}
+
+
+// ---------------------------------------------------------------------------
+// PlainTextHelper::~PlainTextHelper
+// destructor
+// ---------------------------------------------------------------------------
+
+PlainTextHelper::~PlainTextHelper()
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// PlainTextHelper::createHighlighter
+// creates a new syntax highlighter object
+// ---------------------------------------------------------------------------
+
+Highlighter *PlainTextHelper::createHighlighter(QTextDocument *parent)
+{
+    return new PlainTextHighlighter(parent);
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MacroEditor/PlainTextHelper.h b/src/MacroEditor/PlainTextHelper.h
new file mode 100644
index 0000000..607320b
--- /dev/null
+++ b/src/MacroEditor/PlainTextHelper.h
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef PlainTextHelper_H
+#define PlainTextHelper_H
+
+// --------------------------------------------------
+// class MagMLHelper
+// A language helper specific to the MagML language
+// --------------------------------------------------
+
+class PlainTextHelper : public LanguageHelper
+{
+public:
+    PlainTextHelper();
+    virtual ~PlainTextHelper();
+
+    Highlighter *createHighlighter(QTextDocument *parent = 0);
+    bool canCheckSyntax() {return false;}
+    bool canDebug()       {return false;}
+    bool canRun()         {return false;}
+    bool runAsService()   {return false;}
+    bool isAutoLicenceTextAllowed()  {return false;}
+    bool isHelpAvailableForFunction(const QString &/*function*/) {return false;}
+};
+
+
+
+
+#endif
diff --git a/src/MacroEditor/RunDialog.cc b/src/MacroEditor/RunDialog.cc
new file mode 100644
index 0000000..7af49b7
--- /dev/null
+++ b/src/MacroEditor/RunDialog.cc
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "RunDialog.h"
+
+
+RunDialog::RunDialog(QWidget *parent) : QDialog(parent)
+{
+    setupUi(this);
+
+    connect (buttonBox, SIGNAL(accepted()),                this, SLOT(done()));
+    connect (buttonBox, SIGNAL(rejected()),                this, SLOT(reject()));
+//    connect (useSpacesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(onUseSpacesChanged()));
+
+}
+
+
+RunDialog::~RunDialog()
+{
+
+}
+
+
+
+// ---------------------------------------------------------------------------
+// RunDialog::setupUIBeforeShow
+// sets up UI elements before the dialog is displayed.
+// ---------------------------------------------------------------------------
+
+void RunDialog::setupUIBeforeShow (MacroRunOptions &options)
+{
+    QString pause = QString::number(options.pause_);
+
+    highlightLineCheckBox->setChecked(options.sendLines_);
+    waitCheckBox->setChecked(options.waitMode_);
+    traceCheckBox->setChecked(options.trace_);
+    RunModeComboBox->setEditText(QString(options.runMode_.c_str()));
+    PauseComboBox->setEditText(pause);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// RunDialog::done
+// called when the user clicks the 'OK' button - emits a signal to tell the
+// editor to change its settings
+// ---------------------------------------------------------------------------
+
+void RunDialog::done()
+{
+    MacroRunOptions options;
+
+    options.sendLines_ = highlightLineCheckBox->isChecked();
+    options.waitMode_  = waitCheckBox->isChecked();
+    options.trace_     = traceCheckBox->isChecked();
+
+
+    if (PauseComboBox->currentIndex () == 0)
+        options.pause_ = 0;
+    else
+    {
+        QStringList strlist = PauseComboBox->currentText().split(" ");
+        options.pause_ = strlist[0].toInt();
+    }
+
+
+    // run mode. At the time of writing, the first entry is
+    // 'Prepare (default)' - we want to catch this case and only
+    // take the first part of the string.
+
+    options.runMode_ = RunModeComboBox->currentText().toStdString();
+    
+    QStringList strlist = RunModeComboBox->currentText().split(" ");
+
+    if (strlist.count() > 1)
+        options.runMode_ = strlist[0].toStdString();
+
+
+    emit runOptionsChanged(options);
+
+    close();
+}
diff --git a/src/MacroEditor/RunDialog.h b/src/MacroEditor/RunDialog.h
new file mode 100644
index 0000000..6d49de1
--- /dev/null
+++ b/src/MacroEditor/RunDialog.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef RunDialog_H
+#define RunDialog_H
+
+#include "RunDialog.ui.h"
+#include "MacroRunOptions.h"
+
+
+class RunDialog : public QDialog, private Ui::RunDialog
+{
+    Q_OBJECT
+
+public:
+    RunDialog(QWidget *parent = 0);
+    ~RunDialog();
+    void setupUIBeforeShow(MacroRunOptions &options);
+
+signals:
+    // emitted when the user says 'ok'
+    // probably better to send the whole structure, not just a reference
+    void runOptionsChanged(MacroRunOptions options);
+
+
+public slots:
+    void done();
+    //void setButtonStatus();
+    //void onUseSpacesChanged();
+
+};
+
+#endif
diff --git a/src/MacroEditor/RunDialog.ui b/src/MacroEditor/RunDialog.ui
new file mode 100644
index 0000000..a01bd2d
--- /dev/null
+++ b/src/MacroEditor/RunDialog.ui
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>RunDialog</class>
+ <widget class="QDialog" name="RunDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>357</width>
+    <height>298</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Run Options</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>-30</x>
+     <y>240</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>10</y>
+     <width>411</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Note: these settings are not remembered when 
+you close the Macro editor</string>
+   </property>
+  </widget>
+  <widget class="QGroupBox" name="groupBox">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>60</y>
+     <width>291</width>
+     <height>171</height>
+    </rect>
+   </property>
+   <property name="autoFillBackground">
+    <bool>false</bool>
+   </property>
+   <property name="title">
+    <string>Settings</string>
+   </property>
+   <widget class="QWidget" name="">
+    <property name="geometry">
+     <rect>
+      <x>21</x>
+      <y>32</y>
+      <width>235</width>
+      <height>124</height>
+     </rect>
+    </property>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QCheckBox" name="highlightLineCheckBox">
+       <property name="toolTip">
+        <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
+<tr>
+<td style="border: none;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lines of code are highlighted in the editor as they are executed.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">May not be accurate when executing functions from external files.</span></p></td></tr></table></body></html></string>
+       </property>
+       <property name="text">
+        <string>&Highlight active line</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="waitCheckBox">
+       <property name="toolTip">
+        <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
+<tr>
+<td style="border: none;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Calls to 'icon-functions' normally return immediately; Macro only waits for them when their result is actually used. This can help efficiency but can sometimes be confusing to users who are trying to profile their code. This mode forces Macro to wait for each icon-function call, and is the equivalent of calling <span style=" color:#aa0000;"&g [...]
+       </property>
+       <property name="text">
+        <string>&Wait for asynchronous calls</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="traceCheckBox">
+       <property name="toolTip">
+        <string>Causes program execution information to be printed</string>
+       </property>
+       <property name="text">
+        <string>&Trace</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="RunModeLabel">
+         <property name="toolTip">
+          <string>Runs the macro in a different 'run mode' to help test macros run in different ways</string>
+         </property>
+         <property name="text">
+          <string>&Run mode</string>
+         </property>
+         <property name="buddy">
+          <cstring>RunModeComboBox</cstring>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QComboBox" name="RunModeComboBox">
+         <item>
+          <property name="text">
+           <string>prepare (default)</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>execute</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>visualise</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>save</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>batch</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>examine</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <widget class="QLabel" name="PauseLabel">
+         <property name="toolTip">
+          <string>Forces Macro to pause between lines of execution.
+Can be helpful when combined with 'Highlight active line'
+to visually see program execution.</string>
+         </property>
+         <property name="text">
+          <string>&Pause Between Lines</string>
+         </property>
+         <property name="buddy">
+          <cstring>PauseComboBox</cstring>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QComboBox" name="PauseComboBox">
+         <item>
+          <property name="text">
+           <string>None</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>1 second</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>3 seconds</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>RunDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>RunDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/MacroEditor/ShellHelper.cc b/src/MacroEditor/ShellHelper.cc
new file mode 100644
index 0000000..a493198
--- /dev/null
+++ b/src/MacroEditor/ShellHelper.cc
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+
+#include "LanguageHelper.h" 
+#include "ShellHelper.h" 
+#include "Highlighter.h"
+
+
+
+// -----------------------------------------------------------------------
+// ------------------- Syntax highlighter code ---------------------------
+//        this class is used by the MagMLHelper object, defined below
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+// ------------------- Syntax highlighter code ---------------------------
+//        this class is used by the PlainTextHelper object, defined below
+// -----------------------------------------------------------------------
+
+
+class ShellHighlighter : public Highlighter
+{
+public:
+     ShellHighlighter(QTextDocument *parent = 0);
+    ~ShellHighlighter(){}
+
+     virtual void highlightBlock(const QString &text);
+
+};
+
+
+ShellHighlighter::ShellHighlighter(QTextDocument *parent)
+     : Highlighter(parent)
+{
+}
+
+
+
+void ShellHighlighter::highlightBlock(const QString &text)
+{
+    foreach (HighlightingRule rule, highlightingRules) 
+    {
+        QRegExp expression(rule.pattern);
+        int index = text.indexOf(expression);
+        while (index >= 0) 
+        {
+            int length = expression.matchedLength();
+            setFormat(index, length, rule.format);
+            index = text.indexOf(expression, index + length);
+        }
+    }
+}
+
+
+
+
+
+
+// -----------------------------------------------------------------------
+// -------------------------- ShellHelper code ---------------------------
+// -----------------------------------------------------------------------
+
+
+// ---------------------------------------------------------------------------
+// ShellHelper::ShellHelper
+// constructor
+// ---------------------------------------------------------------------------
+
+ShellHelper::ShellHelper()
+{
+    languageName_ = "Shell";
+    className_    = "SHELL";
+    serviceName_  = "(x=`dirname \"%s\"`;cd \"$x\" ; sh \"%s\")";
+}
+
+
+// ---------------------------------------------------------------------------
+// ShellHelper::~ShellHelper
+// destructor
+// ---------------------------------------------------------------------------
+
+ShellHelper::~ShellHelper()
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// ShellHelper::~createHighlighter
+// creates a new syntax highlighter object
+// ---------------------------------------------------------------------------
+
+Highlighter *ShellHelper::createHighlighter(QTextDocument *parent)
+{
+    return new ShellHighlighter(parent);
+}
+
+
+// ---------------------------------------------------------------------------
+// ShellHelper::isHeaderLine
+// decides whether the given line is a shell script header line
+// ---------------------------------------------------------------------------
+
+bool ShellHelper::isHeaderLine(const QString &text)
+{
+    return (text.contains("#") && 
+            text.contains("bin") &&
+            (text.contains("sh") || text.contains("ksh") || text.contains("csh")));
+}
+
+
+
+
+
+
+
+
+
diff --git a/src/MacroEditor/ShellHelper.h b/src/MacroEditor/ShellHelper.h
new file mode 100644
index 0000000..efd0d15
--- /dev/null
+++ b/src/MacroEditor/ShellHelper.h
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ShellHelper_H
+#define ShellHelper_H
+
+// --------------------------------------------------
+// class MagMLHelper
+// A language helper specific to the MagML language
+// --------------------------------------------------
+
+class ShellHelper : public LanguageHelper
+{
+public:
+    ShellHelper();
+    virtual ~ShellHelper();
+
+    Highlighter *createHighlighter(QTextDocument *parent = 0);
+    bool canCheckSyntax() {return false;}
+    bool canDebug()       {return false;}
+    bool canRun()         {return true;}
+    bool runAsService()   {return false;}
+    bool isHelpAvailableForFunction(const QString &/*function*/) {return false;}
+    bool isHeaderLine(const QString &text);       // is the text a header line (e.g. "# Metview Macro")?
+};
+
+
+
+
+#endif
diff --git a/src/MacroEditor/TabsDialog.cc b/src/MacroEditor/TabsDialog.cc
new file mode 100644
index 0000000..1d44fcf
--- /dev/null
+++ b/src/MacroEditor/TabsDialog.cc
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "TabsDialog.h"
+
+
+TabsDialog::TabsDialog(QWidget *parent) : QDialog(parent)
+{
+    setupUi(this); // this sets up GUI// setupFileMenu();
+
+/*
+    connect (buttonBox, SIGNAL(accepted()),                   this, SLOT(done()));
+    connect (buttonBox, SIGNAL(rejected()),                   this, SLOT(reject()));
+    connect (lineEdit,  SIGNAL(textChanged(const QString &)), this, SLOT(setButtonStatus()));*/
+
+
+    connect (buttonBox, SIGNAL(accepted()),                this, SLOT(done()));
+    connect (buttonBox, SIGNAL(rejected()),                this, SLOT(reject()));
+    connect (useSpacesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(onUseSpacesChanged()));
+
+}
+
+
+TabsDialog::~TabsDialog()
+{
+
+}
+
+/*
+// ---------------------------------------------------------------------------
+// GotoLineDialog::setButtonStatus
+// if there is text in the input box, then we can activate the 'OK' button,
+// otherwise we should disable it. This function is called each time the text
+// in the box is changed.
+// ---------------------------------------------------------------------------
+
+void GotoLineDialog::setButtonStatus()
+{
+    QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
+
+    if (lineEdit->text().isEmpty())
+    {
+        okButton->setEnabled(false);
+    }
+    else
+    {
+        okButton->setEnabled(true);
+    }
+}
+
+*/
+// ---------------------------------------------------------------------------
+// GotoLineDialog::setupUIBeforeShow
+// sets up UI elements before the dialog is displayed.
+// ---------------------------------------------------------------------------
+
+void TabsDialog::setupUIBeforeShow (TabsSettings &settings)
+{
+    QString spaces = QString::number(settings.numSpacesInTab);
+
+    useSpacesCheckBox->setChecked(settings.useSpacesForTabs);
+    numSpacesLineEdit->setEnabled(settings.useSpacesForTabs);
+    numSpacesLineEdit->setText(spaces);
+    droppedIconSpacesCheckBox->setChecked(settings.useSpacesForDrops);
+    droppedIconSpacesCheckBox->setEnabled(settings.useSpacesForTabs);
+    displayTabsAndSpacesCheckBox->setChecked(settings.displayTabsAndSpaces);
+    autoIndentCheckBox->setChecked(settings.autoIndent);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// TabsDialog::onUseSpacesChanged
+// called when the user clicks the button to say whether to use spaces
+// instead of tabs or not - we just update the GUI when this happens.
+// ---------------------------------------------------------------------------
+
+void TabsDialog::onUseSpacesChanged ()
+{
+    numSpacesLineEdit        ->setEnabled(useSpacesCheckBox->isChecked());
+    droppedIconSpacesCheckBox->setEnabled(useSpacesCheckBox->isChecked());
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// TabsDialog::done
+// called when the user clicks the 'OK' button - emits a signal to tell the
+// text editor to change its settings
+// ---------------------------------------------------------------------------
+
+void TabsDialog::done()
+{
+    TabsSettings settings;
+    int numSpaces = numSpacesLineEdit->text().toInt();
+
+    settings.useSpacesForTabs     = useSpacesCheckBox->isChecked();
+    settings.numSpacesInTab       = numSpaces;
+    settings.useSpacesForDrops    = droppedIconSpacesCheckBox->isChecked();
+    settings.displayTabsAndSpaces = displayTabsAndSpacesCheckBox->isChecked();
+    settings.autoIndent           = autoIndentCheckBox->isChecked();
+
+    emit tabsSettingsChanged(settings);
+    close();
+}
diff --git a/src/MacroEditor/TabsDialog.h b/src/MacroEditor/TabsDialog.h
new file mode 100644
index 0000000..7428ffb
--- /dev/null
+++ b/src/MacroEditor/TabsDialog.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TabsDialog_H
+#define TabsDialog_H
+
+#include "TabsDialog.ui.h"
+#include "TabsSettings.h"
+
+
+class TabsDialog : public QDialog, private Ui::TabsDialog
+{
+    Q_OBJECT
+
+public:
+    TabsDialog(QWidget *parent = 0);
+    ~TabsDialog();
+    void setupUIBeforeShow(TabsSettings &settings);
+
+signals:
+    // emitted when the user says 'ok'
+    // probably better to send the whole structure, not just a reference
+    void tabsSettingsChanged(TabsSettings settings);
+
+
+public slots:
+    void done();
+    //void setButtonStatus();
+    void onUseSpacesChanged();
+
+};
+
+#endif
diff --git a/src/MacroEditor/TabsDialog.ui b/src/MacroEditor/TabsDialog.ui
new file mode 100644
index 0000000..2ea177b
--- /dev/null
+++ b/src/MacroEditor/TabsDialog.ui
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TabsDialog</class>
+ <widget class="QDialog" name="TabsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>478</width>
+    <height>161</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>90</x>
+     <y>110</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>20</y>
+     <width>406</width>
+     <height>97</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QCheckBox" name="useSpacesCheckBox">
+        <property name="text">
+         <string>Use &spaces intead of tabs</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="numspacesLabel">
+          <property name="text">
+           <string>&Number of spaces</string>
+          </property>
+          <property name="buddy">
+           <cstring>numSpacesLineEdit</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="numSpacesLineEdit"/>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QCheckBox" name="droppedIconSpacesCheckBox">
+      <property name="text">
+       <string>Use spaces in &dropped icon code</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QCheckBox" name="autoIndentCheckBox">
+      <property name="text">
+       <string>&Auto indent</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QCheckBox" name="displayTabsAndSpacesCheckBox">
+      <property name="text">
+       <string>Display tabs and spaces &visually</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/MacroEditor/TabsSettings.h b/src/MacroEditor/TabsSettings.h
new file mode 100644
index 0000000..7c4ebd0
--- /dev/null
+++ b/src/MacroEditor/TabsSettings.h
@@ -0,0 +1,25 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TabsSettings_H
+#define TabsSettings_H
+
+
+typedef struct _TabsSettings
+{
+    bool useSpacesForTabs;
+    int  numSpacesInTab;
+    bool useSpacesForDrops;
+    bool displayTabsAndSpaces;
+    bool autoIndent;
+
+} TabsSettings;
+
+
+#endif
diff --git a/src/MacroEditor/VerbFunctionHelp.cc b/src/MacroEditor/VerbFunctionHelp.cc
new file mode 100644
index 0000000..a2fa7ec
--- /dev/null
+++ b/src/MacroEditor/VerbFunctionHelp.cc
@@ -0,0 +1,142 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "VerbFunctionHelp.h"
+
+
+VerbFunctionHelp::VerbFunctionHelp(QString &path)
+{
+
+    // load up the XML file containing the Verb function/parameter/values details
+
+//    QString xmlParamFilename = "/home/graphics/cgi/metview/Tests/Macro Editor/Verb-param-help/params.xml";
+
+    QFile file(path);
+
+    if (!file.open(QFile::ReadOnly | QFile::Text))  // try to open in read-only mode
+    {
+        QString app("App");
+        //QMessageBox::warning(0, app, path);
+        QMessageBox::warning(0, QObject::tr("Verb Function Help"),
+                             QObject::tr("Cannot read file %1:\n%2.\nThe editor will still work, but some help functions will be disabled.\n"
+                             "Please report this error message to your Metview administrator.")
+                             .arg(path)
+                             .arg(file.errorString()));
+        return;
+    }
+
+
+    // create a new XML reader object to read the file
+
+    QXmlStreamReader reader(&file);
+
+
+     VerbFunctionHelpFunction *function = NULL;
+
+     while (!reader.atEnd())
+     {
+         reader.readNext();
+
+         if (reader.isStartElement())
+         {
+            QString functionName;
+            QString paramName;
+            QString values;
+            VerbFunctionHelpParam *param = NULL;
+
+            if (reader.name() == "function")
+            {
+                // if we're starting the second or subsequent function, then store the previous one
+                
+                if (function != NULL)
+                {
+                    addFunction (function);
+                }
+
+                //title = reader.readElementText();
+                function = new VerbFunctionHelpFunction;
+                functionName = reader.attributes().value("name").toString();
+//                qDebug() << functionName;
+                function->setName(functionName);
+
+                //QTreeWidgetItem *item;
+
+                //item = new QTreeWidgetItem(paramTree);  // create a new item for the tree
+                //item->setText (0, functionName);        // set its label
+
+            }
+            else if(reader.name() == "param")
+            {
+                param = new VerbFunctionHelpParam;
+                paramName = reader.attributes().value("name").toString();
+                param->setName(paramName);
+                
+                values = reader.attributes().value("values").toString();
+
+                if (!values.isEmpty())
+                {
+                    QStringList valueList = values.split("/");
+
+
+                    for (int i = 0; i < valueList.size(); ++i)
+                    {
+                        param->addValue(new QString (valueList.at(i)));
+                    }
+                }
+                
+                function->addParameter(param);
+
+
+//                qDebug() << "  " << paramName;
+//                qDebug() << "    " << values;
+
+                //links.append(reader.attributes().value("href").toString());
+//            else if(reader.name() == "p")
+//                ++paragraphCount;
+            }
+        }
+    }
+    
+
+    // store the last function
+
+    if (function != NULL)
+    {
+        addFunction (function);
+    }
+
+
+    // check for parsing errors
+
+    if (reader.hasError())
+    {
+        qDebug() << "  The HTML file isn't well-formed: " << reader.errorString()
+                 << endl << endl << endl;
+        return;
+    }
+
+//    helpForFunction(fun);
+}
+
+
+
+bool VerbFunctionHelp::isHelpAvailableForFunction(const QString &function)
+{
+    // can we find the given function name in the map?
+    
+    VerbFunctionHelpFunction *foundFunction = functions[function];
+
+    return (foundFunction != NULL);
+}
+
+
+
+
diff --git a/src/MacroEditor/VerbFunctionHelp.h b/src/MacroEditor/VerbFunctionHelp.h
new file mode 100644
index 0000000..60a5e00
--- /dev/null
+++ b/src/MacroEditor/VerbFunctionHelp.h
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef VerbFunctionHelp_H
+#define VerbFunctionHelp_H
+
+
+#include <vector>
+#include <map>
+using namespace std;
+
+
+/* ---------------------------------------------------------------------------------------------
+
+    The classes defined here are for the purpose of storing the information required to
+    give the user help for specific functions which follow the pattern of verb-parameters-values.
+    For example, in the Macro languate, we have things such as:
+      pcont (contour : 'on')
+
+    and we want to be able to provide the user with in-editor help for these functions.
+
+   --------------------------------------------------------------------------------------------- */
+
+
+
+
+//-------------------------------------------------------------------------------------
+// VerbFunctionHelpParam
+// class to store all the information associated with a parameter
+//-------------------------------------------------------------------------------------
+
+class VerbFunctionHelpParam
+{
+public:
+    VerbFunctionHelpParam() {};
+    ~VerbFunctionHelpParam(){values.clear();};
+
+    void addValue(QString *value) {values.push_back(value);}
+    
+    QString name()                          {return name_;}
+    void    setName(const QString &newName) {name_ = newName;}
+
+    int numValues() {return values.size();}
+    QString valueName(int i) {return *values[i];}
+
+
+private:
+    vector<QString *> values;
+    QString name_;
+};
+
+
+
+//-------------------------------------------------------------------------------------
+// VerbFunctionHelpFunction
+// class to store all the information associated with a function
+//-------------------------------------------------------------------------------------
+
+class VerbFunctionHelpFunction
+{
+public:
+    VerbFunctionHelpFunction() {};
+    ~VerbFunctionHelpFunction(){parameters.clear();};
+
+//    void addParameter(VerbFunctionHelpParam *parameter) {parameters.push_back(parameter);};
+    void addParameter(VerbFunctionHelpParam *parameter) {paramList.push_back(parameter); parameters[parameter->name()] = parameter;};
+
+    QString name()                          {return name_;}
+    void    setName(const QString &newName) {name_ = newName;}
+
+//    void addParam(VerbFunctionHelpParam *param) {parameters[param->name()] = param;};
+    int numParams() {return paramList.size();}
+    QString paramName(int i) {return paramList[i]->name();}
+    
+    VerbFunctionHelpParam *paramFromName(QString &name) {return parameters[name];}
+
+    VerbFunctionHelpParam *param(int i) {return paramList[i];}
+
+private:
+    vector<VerbFunctionHelpParam *> paramList;
+    map<QString, VerbFunctionHelpParam *> parameters;
+    QString name_;
+};
+
+
+
+//-------------------------------------------------------------------------------------
+//    The VerbFunctionHelp class allows the loading of a specially-prepared XML file with
+//    all the function definitions in it (this is in its constructor). It also provides
+//    the ability to query whether the given string is the name of a function for which
+//    we have help available, and an accessor function to get a VerbFunctionHelpFunction
+//    pointer from a given name.
+//-------------------------------------------------------------------------------------
+
+
+class VerbFunctionHelp
+{
+public:
+    VerbFunctionHelp(QString &path);
+    ~VerbFunctionHelp(){functions.clear();};
+
+    bool isHelpAvailableForFunction(const QString &function);
+    VerbFunctionHelpFunction *function(QString &functionName) {return functions[functionName];};
+
+
+private:
+
+    void addFunction(VerbFunctionHelpFunction *function) {functions[function->name()] = function;};
+
+    //vector<IconFunctionHelpFunction> functions;
+    map<QString, VerbFunctionHelpFunction *> functions;
+    VerbFunctionHelpFunction *currentHelpFunction;
+
+};
+
+
+#endif
+
diff --git a/src/MacroEditor/VerbFunctionHelpDialog.cc b/src/MacroEditor/VerbFunctionHelpDialog.cc
new file mode 100644
index 0000000..c333fde
--- /dev/null
+++ b/src/MacroEditor/VerbFunctionHelpDialog.cc
@@ -0,0 +1,201 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include "VerbFunctionHelpDialog.h"
+
+
+VerbFunctionHelpDialog::VerbFunctionHelpDialog()
+{
+
+    setupUi(this); // this sets up GUI
+
+    connect (paramTree,    SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(onParameterSelected(QTreeWidgetItem*, QTreeWidgetItem*)));
+    connect (insertButton, SIGNAL(clicked()),                                              this, SLOT(onInsertButtonClicked()));
+
+
+//    helpForFunction(fun);
+}
+
+
+
+void VerbFunctionHelpDialog::helpForFunction(VerbFunctionHelp *help, QString &functionName)
+{
+    // find the given function name in the map
+    
+    VerbFunctionHelpFunction *function = help->function(functionName);
+
+    if (function != NULL)
+    {
+        // populate the parameter tree with the available parameters
+
+        paramTree->clear();
+        valueTree->clear();
+
+        for (int i = 0; i < function->numParams(); i++)
+        {
+            QTreeWidgetItem *item;
+
+            item = new QTreeWidgetItem(paramTree);        // create a new item for the tree
+            item->setText (0, function->paramName(i));    // set its label
+            
+//            if (i == 0)
+//                paramTree->setCurrentItem (item);
+        }
+        
+
+        currentHelpFunction = function;
+        
+        functionLabel->setText (tr("Function: ") + functionName);
+
+        show();
+        raise();
+        activateWindow();
+    }
+    
+    else
+    {
+        QMessageBox::warning(this, tr("Verb Function Help"),
+                             tr("Cannot find function '%1'.")
+                             .arg(functionName));
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// FunctionListDialog::onParameterSelected
+// triggered when the user selects a parameter
+// Note: the second parameter is a pointer to the previous item selected - 
+// its name has been removed because we don't use it and we want to avoid
+// compiler warnings.
+// ---------------------------------------------------------------------------
+
+void VerbFunctionHelpDialog::onParameterSelected(QTreeWidgetItem *item,  QTreeWidgetItem*)
+{
+
+    //int paramIndex = paramTree->indexOfTopLevelItem(item);
+
+    // populate the 'possible values' box with the values for this parameter
+            //qDebug() << " paramIndex: " << paramIndex;
+
+    //if (paramIndex != -1)
+    if (item != NULL)
+    {
+        QString itemName = item->text(0);
+        VerbFunctionHelpParam *param = currentHelpFunction->paramFromName(itemName);
+        //currentHelpFunction->param(paramIndex);
+
+        valueTree->clear();
+
+        for (int i = 0; i < param->numValues(); i++)
+        {
+            QTreeWidgetItem *item;
+
+            item = new QTreeWidgetItem(valueTree);     // create a new item for the tree
+            item->setText (0, param->valueName(i));    // set its label
+        }
+
+
+        if (param->numValues() == 0)
+        {
+            QTreeWidgetItem *item;
+
+            item = new QTreeWidgetItem(valueTree);     // create a new item for the tree
+            item->setText (0, "No value list for this parameter");    // set its label
+            valueTree->setSelectionMode(QAbstractItemView::NoSelection);
+        }
+        
+        else
+        {
+            valueTree->setSelectionMode(QAbstractItemView::ExtendedSelection);
+        }
+
+        //emit insertFunctionName (item->text(0)); // emit a signal with the function name
+        //close();
+    }
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// VerbFunctionHelpDialog::onInsertButtonClicked
+// triggered when the user clicks the Insert button
+// ---------------------------------------------------------------------------
+
+void VerbFunctionHelpDialog::onInsertButtonClicked()
+{
+    // which parameter is selected?
+    
+    QString param;
+    QList<QTreeWidgetItem  *> selectedItems = paramTree->selectedItems();
+
+    if (selectedItems.size() > 0)
+    {
+        QTreeWidgetItem *item = selectedItems[0];
+        param = item->text(0);
+
+
+        // which value is selected?
+        
+        QString value;
+        QList<QTreeWidgetItem  *> selectedItems = valueTree->selectedItems();
+
+        QString values;  // will contain either a single value or a list of values
+        int numItems = selectedItems.size();
+
+        if (numItems > 0)
+        {
+            if (numItems > 1)
+                values = "[";
+                
+            for (int i = 0; i < numItems; i++)
+            {
+                QTreeWidgetItem *item = selectedItems[i];
+                value = item->text(0);
+                value = "\"" + value + "\"";
+
+                values += value;  // add to the list
+
+                if ((numItems > 1) && (i < numItems))
+                    values += ",";
+            }
+
+            if (numItems > 1)
+                values += "]";
+         }
+
+
+
+        // construct the text to be sent to the document (and consider the user options)
+
+        QString textToSend = param + " : " + values;
+
+        if (upperCaseCheckBox->isChecked())
+            textToSend = textToSend;
+        else
+            textToSend = textToSend.toLower();
+
+
+        // send the text to the document
+
+        emit sendTextToBeInsertedIntoFunctionCall (textToSend); // emit a signal with the text to be inserted
+
+        close();
+    }
+}
+
+
+
+
+
+
+
diff --git a/src/MacroEditor/VerbFunctionHelpDialog.h b/src/MacroEditor/VerbFunctionHelpDialog.h
new file mode 100644
index 0000000..137c5bc
--- /dev/null
+++ b/src/MacroEditor/VerbFunctionHelpDialog.h
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef VerbFunctionHelpDialog_H
+#define VerbFunctionHelpDialog_H
+
+
+#include <vector>
+#include <map>
+using namespace std;
+
+
+#include "VerbFunctionHelpDialog.ui.h"
+#include "VerbFunctionHelp.h"
+
+
+
+// VerbFunctionHelpDialog
+// the dialog class itself 
+
+class VerbFunctionHelpDialog : public QDialog, private Ui::VerbFunctionHelpDialog
+{
+    Q_OBJECT
+
+public:
+    VerbFunctionHelpDialog();
+    ~VerbFunctionHelpDialog(){};
+
+    void helpForFunction(VerbFunctionHelp *help, QString &functionName);
+
+
+signals:
+    void sendTextToBeInsertedIntoFunctionCall (QString text);
+
+
+public slots:
+    void onParameterSelected (QTreeWidgetItem *item,  QTreeWidgetItem  *previous);
+    void onInsertButtonClicked ();
+
+
+private:
+    VerbFunctionHelpFunction *currentHelpFunction;
+};
+
+
+
+#endif
+
diff --git a/src/MacroEditor/VerbFunctionHelpDialog.ui b/src/MacroEditor/VerbFunctionHelpDialog.ui
new file mode 100644
index 0000000..e7f177a
--- /dev/null
+++ b/src/MacroEditor/VerbFunctionHelpDialog.ui
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VerbFunctionHelpDialog</class>
+ <widget class="QDialog" name="VerbFunctionHelpDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>749</width>
+    <height>535</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Verb Function Help</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QLabel" name="functionLabel">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>TextLabel</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QTreeWidget" name="paramTree">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+         <horstretch>1</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>262</width>
+         <height>176</height>
+        </size>
+       </property>
+       <property name="indentation">
+        <number>0</number>
+       </property>
+       <property name="sortingEnabled">
+        <bool>false</bool>
+       </property>
+       <column>
+        <property name="text">
+         <string>Parameters</string>
+        </property>
+       </column>
+      </widget>
+     </item>
+     <item>
+      <widget class="QTreeWidget" name="valueTree">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+         <horstretch>1</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>262</width>
+         <height>176</height>
+        </size>
+       </property>
+       <property name="indentation">
+        <number>0</number>
+       </property>
+       <property name="sortingEnabled">
+        <bool>false</bool>
+       </property>
+       <column>
+        <property name="text">
+         <string>Possible Values</string>
+        </property>
+       </column>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="optionsGroupBox">
+     <property name="title">
+      <string>Options</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QCheckBox" name="upperCaseCheckBox">
+        <property name="text">
+         <string>Uppercase</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QPushButton" name="insertButton">
+       <property name="text">
+        <string>Insert</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>VerbFunctionHelpDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>VerbFunctionHelpDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/MacroEditor/mvplaintextedit.cc b/src/MacroEditor/mvplaintextedit.cc
new file mode 100644
index 0000000..48bc189
--- /dev/null
+++ b/src/MacroEditor/mvplaintextedit.cc
@@ -0,0 +1,396 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+/////////////////////////////////// class MvPlainTextEdit ////////////////////////////////
+
+#include "mvplaintextedit.h"
+
+//#include <QtGui>
+#include <QTextBlock>
+#include <QPainter>
+
+MvPlainTextEdit::MvPlainTextEdit(QWidget * parent) :
+    QPlainTextEdit(parent)
+{
+    setUseSpacesForTabs (false);
+    setNumSpacesInTab   (4);
+    setUseSpacesForDrops(false);
+    showLineNumbers_   = false;
+
+
+    lineNumberArea = new LineNumberArea(this);
+
+    connect(this, SIGNAL(blockCountChanged(int)),   this,           SLOT(updateLineNumberAreaWidth(int)));
+    connect(this, SIGNAL(updateRequest(QRect,int)), this,           SLOT(updateLineNumberArea(QRect,int)));
+    connect(this, SIGNAL(cursorPositionChanged()),  lineNumberArea, SLOT(update()));
+
+    updateLineNumberAreaWidth(0);
+}
+
+
+MvPlainTextEdit::~MvPlainTextEdit()
+{
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::keyPressEvent
+// triggered each time the user presses a key. We want to intercept
+// certain keystrokes.
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::keyPressEvent(QKeyEvent *e)
+{
+    int key = e->key();
+
+    if (key == Qt::Key_Tab)
+    {
+        QTextCursor cursor = textCursor();
+        insertTextIndent(cursor, true);
+        return;
+    }
+    
+    else if ((key == Qt::Key_Return || key == Qt::Key_Enter) && autoIndent())
+    {
+        autoIndentNewLine();
+    }
+
+    else
+    {
+        // we are not interested in other keypresses - they should be handled normally
+        QPlainTextEdit::keyPressEvent(e);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::insertTextIndent
+// inserts appropriate tab or spaces at the given cursor location
+// if 'intelligentIndent' is true, then if spaces are used, only enough
+// to supply padding will be inserted; otherwise, the full number will
+// 'blindly' be added.
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::insertTextIndent(QTextCursor &cursor, bool intelligentIndent)
+{
+    if (useSpacesForTabs())
+    {
+        // we want to insert enough spaces to bring us to the next 'tab stop'
+        // e.g. if tab_spaces == 4 and we are at column 1, then we add 3 spaces
+
+        int row, col;
+        cursorRowCol(&row, &col);
+        int spaces = numSpacesInTab() - ((col-1) % numSpacesInTab());
+
+        // create a string with 'n' spaces and insert it
+        QString spacesString(spaces, ' ');
+        cursor.insertText(spacesString);
+    }
+    else
+    {
+        insertPlainText("\t");  // just insert a tab
+    }
+}
+
+
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::cursorRowCol
+// returns the row and column position of the cursor
+//  - note that the first row and column are (1,1)
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::cursorRowCol(int *row, int *col)
+{
+    const QTextCursor cursor = textCursor();
+
+    QTextBlock cb, b;
+    int column, line = 1;
+    cb = cursor.block();
+    column = (cursor.position() - cb.position()) + 1;
+
+    // find the line number - is there a better way than this?
+
+    for (b = document()->begin(); b != document()->end(); b = b.next())
+    {
+        if( b==cb ) break;
+        line++;
+    }
+
+    *row = line;
+    *col = column;
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::characterBehindCursor
+// returns the character to the left of the text cursor
+// ---------------------------------------------------------------------------
+
+QChar MvPlainTextEdit::characterBehindCursor(QTextCursor *cursor)
+{
+    QTextCursor docTextCursor = textCursor();
+    QTextCursor *theCursor = (cursor == 0) ? &docTextCursor : cursor;
+    return document()->characterAt(theCursor->position() - 1);
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::autoIndentNewLine
+// when the user presses RETURN, we want to create a new line with an indent
+// equal to that in the line above.
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::autoIndentNewLine()
+{
+    int i;
+    QTextCursor cursor = textCursor();
+    QString indent("\n");  // start with a newline
+
+
+
+    // get the current line as a string (we have not yet moved to a new line)
+
+    QTextBlock block = cursor.block();
+    QString lineText = block.text();
+    int cursorColumn = (cursor.position() - block.position()) + 1;
+
+
+    // keep moving to the right until we hit either the end of the line or a non-whitespace character
+    // (or we get to the point where the cursor is)
+
+    for (i = 0; i < lineText.length(); i++)
+    {
+        if (!lineText.at(i).isSpace() || lineText.at(i) == QChar('\n') || (i == cursorColumn-1))
+            break;
+
+        indent += lineText.at(i);  // add this character to the indent string
+    }
+
+
+    // insert the text into the document
+
+    cursor.insertText(indent);
+
+
+    // ensure the cursor has not gone off the bottom of the screen
+    
+    ensureCursorVisible();
+}
+
+
+
+void MvPlainTextEdit::setDisplayTabsAndSpaces(bool show)
+{
+    QTextDocument *doc = document();
+    QTextOption opt = doc->defaultTextOption();
+
+    if (show)
+        opt.setFlags(opt.flags() |  QTextOption::ShowTabsAndSpaces);
+    else
+        opt.setFlags(opt.flags() & ~QTextOption::ShowTabsAndSpaces);
+
+    doc->setDefaultTextOption(opt);
+    tabsSettings_.displayTabsAndSpaces = show;
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::lineNumberAreaWidth
+// returns the required width to display the line numbers. This adapts to the
+// maximum number of digits we need to display.
+// ---------------------------------------------------------------------------
+
+int MvPlainTextEdit::lineNumberAreaWidth()
+{
+    if (showLineNumbers())
+    {
+        int digits = 1;
+        int max = qMax(1, blockCount());
+        while (max >= 10)
+        {
+            max /= 10;
+            ++digits;
+        }
+
+        int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits;
+
+        return space;
+    }
+    else
+    {
+        return 0;
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::updateLineNumberAreaWidth
+// called when the number of lines in the document changes. The argument is
+// the new number of lines (blocks).
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::updateLineNumberAreaWidth(int)
+{
+    setViewportMargins(lineNumberAreaWidth(), 0, 0, 0);
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::updateLineNumberArea
+// called when the editor is updated. We want to ensure that the line number
+// widget stays in sync with it.
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::updateLineNumberArea(const QRect &rect, int dy)
+{
+    if (dy)
+        lineNumberArea->scroll(0, dy);
+    else
+        lineNumberArea->update(0, rect.y(), lineNumberArea->width(), rect.height());
+
+    if (rect.contains(viewport()->rect()))
+        updateLineNumberAreaWidth(0);
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::resizeEvent
+// called when a resize event is triggered. Reset the size of the line widget.
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::resizeEvent(QResizeEvent *e)
+{
+    QPlainTextEdit::resizeEvent(e);
+
+    QRect cr = contentsRect();
+    lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height()));
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::focusInEvent
+// called when the widget gains input focus
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::focusInEvent(QFocusEvent *event)
+{
+    emit focusRegained();
+    QPlainTextEdit::focusInEvent(event);
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::focusOutEvent
+// called when the widget loses input focus
+
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::focusOutEvent(QFocusEvent *event)
+{
+    emit focusLost();
+    QPlainTextEdit::focusOutEvent(event);
+}
+
+
+// ---------------------------------------------------------------------------
+// MvPlainTextEdit::lineNumberAreaPaintEvent
+// called when the line number widget needs to be repainted. This is where we
+// actually draw the numbers on the widget.
+// ---------------------------------------------------------------------------
+
+void MvPlainTextEdit::lineNumberAreaPaintEvent(QPaintEvent *event)
+{
+    int currentRow, currentCol;
+    cursorRowCol (&currentRow, &currentCol);  // get the current line number so we can highlight it
+
+
+    QPainter painter(lineNumberArea);
+    painter.fillRect(event->rect(), QColor(240, 240, 240));  // light grey background
+
+
+    QTextBlock block = firstVisibleBlock();
+    int blockNumber = block.blockNumber();
+    int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top();
+    int bottom = top + (int) blockBoundingRect(block).height();
+    QFont fontNormal(font());   // the font to use for most line numbers
+    QFont fontBold(fontNormal);  // the font to use for the current line number
+    fontBold.setBold(true);
+    painter.setPen(Qt::blue);
+
+    painter.setFont(fontNormal);
+
+    while (block.isValid() && top <= event->rect().bottom())
+    {
+        if (block.isVisible() && bottom >= event->rect().top())
+        {
+            QString number = QString::number(blockNumber + 1);
+
+            if (blockNumber == currentRow-1)  // is this the current line?
+            {
+                painter.setFont(fontBold);
+                painter.fillRect(0, top, lineNumberArea->width(), fontMetrics().height(), QColor(212, 212, 255));  // highlight the background
+            }
+
+
+            painter.drawText(0, top, lineNumberArea->width(), fontMetrics().height(),  // draw the line number
+                             Qt::AlignRight, number);
+
+
+            if (blockNumber == currentRow-1)  // is this the current line?
+            {
+                painter.setFont(fontNormal);  // reset the font to normal
+            }
+        }
+
+        block = block.next();
+        top = bottom;
+        bottom = top + (int) blockBoundingRect(block).height();
+        ++blockNumber;
+    }
+}
+
+
+
+/*
+bool MvPlainTextEdit::event(QEvent* event)
+{
+    if (event->type() == QEvent::ToolTip)
+    {
+        QHelpEvent* helpEvent = static_cast<QHelpEvent*>(event);
+        QTextCursor cursor = cursorForPosition(helpEvent->pos());
+        cursor.select(QTextCursor::WordUnderCursor);
+        if (!cursor.selectedText().isEmpty())
+        {
+            bool modified = document()->isModified();
+
+            QTextCharFormat underline;
+            underline.setFontUnderline(true);
+            underline.setUnderlineStyle(QTextCharFormat::DashUnderline);
+            //mergeCurrentCharFormat (underline);
+            cursor.mergeCharFormat (underline);
+
+            QToolTip::showText(helpEvent->globalPos(), cursor.selectedText());
+            //qDebug() << "1: " << cursor.selectedText();
+            document()->setModified(modified);
+        }
+        else
+            QToolTip::hideText();
+            //qDebug() << "NO";
+        return true;
+    }
+
+    return QPlainTextEdit::event(event);
+}
+*/
diff --git a/src/MacroEditor/mvplaintextedit.h b/src/MacroEditor/mvplaintextedit.h
new file mode 100644
index 0000000..809c032
--- /dev/null
+++ b/src/MacroEditor/mvplaintextedit.h
@@ -0,0 +1,105 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvPlainTextEdit_H
+#define MvPlainTextEdit_H
+
+#include <QtGui/QPlainTextEdit>
+
+#include "TabsSettings.h"
+
+class LineNumberArea;
+
+
+// ----------------------------------------------------------------------------
+// MvPlainTextEdit
+// This class extends the QPlainTextEdit with the following abilities:
+//  o allow user-configurable behaviour when the TAB key is pressed
+//    (insert tab character or multiple spaces)
+//  o auto-indent when RETURN is pressed
+//  o line number widget down the left-hand side (code adapted from Qt example)
+// ----------------------------------------------------------------------------
+
+class MvPlainTextEdit : public QPlainTextEdit
+{
+    Q_OBJECT
+
+public:
+    MvPlainTextEdit(QWidget * parent = 0);
+	~MvPlainTextEdit();
+
+    void lineNumberAreaPaintEvent(QPaintEvent *event);
+    int  lineNumberAreaWidth();
+
+
+    bool useSpacesForTabs()                {return tabsSettings_.useSpacesForTabs;}
+    void setUseSpacesForTabs(bool use)     {tabsSettings_.useSpacesForTabs = use;}
+
+    int numSpacesInTab()                   {return tabsSettings_.numSpacesInTab;}
+    void setNumSpacesInTab (int num)       {tabsSettings_.numSpacesInTab = num;}
+
+    bool useSpacesForDrops()               {return tabsSettings_.useSpacesForDrops;}
+    void setUseSpacesForDrops(bool use)    {tabsSettings_.useSpacesForDrops = use;}
+
+    bool displayTabsAndSpaces()            {return tabsSettings_.displayTabsAndSpaces;}
+    void setDisplayTabsAndSpaces(bool yes);
+
+    bool autoIndent()                      {return tabsSettings_.autoIndent;}
+    void setAutoIndent(bool yes)           {tabsSettings_.autoIndent = yes;}
+
+    TabsSettings &tabsSettings()           {return tabsSettings_;}
+
+    bool showLineNumbers()                 {return showLineNumbers_;}
+    void setShowLineNumbers(bool yes)      {showLineNumbers_ = yes; lineNumberArea->setVisible(yes); updateLineNumberAreaWidth(0);}
+
+    void insertTextIndent(QTextCursor &cursor, bool intelligentIndent);
+    void cursorRowCol(int *row, int *col);
+    QChar characterBehindCursor(QTextCursor *cursor=0);
+
+
+ private slots:
+     void updateLineNumberAreaWidth(int newBlockCount);
+     void updateLineNumberArea(const QRect &, int);
+
+signals:
+    void focusRegained ();
+    void focusLost ();
+
+
+protected:
+    void keyPressEvent(QKeyEvent *e);
+    void resizeEvent(QResizeEvent *event);
+    void focusInEvent(QFocusEvent *event);
+    void focusOutEvent(QFocusEvent *event);
+
+private:
+    void autoIndentNewLine ();
+    TabsSettings tabsSettings_;
+    bool showLineNumbers_;
+    QWidget *lineNumberArea;
+};
+
+
+
+class LineNumberArea : public QWidget
+{
+public:
+    LineNumberArea(MvPlainTextEdit *editor) : QWidget(editor) {textEditor = editor;}
+    QSize sizeHint() const {return QSize(textEditor->lineNumberAreaWidth(), 0);}
+
+protected:
+    void paintEvent(QPaintEvent *event) { textEditor->lineNumberAreaPaintEvent(event);}
+
+private:
+    MvPlainTextEdit *textEditor;
+};
+
+
+
+#endif
diff --git a/src/MagML/MAGML.xpm b/src/MagML/MAGML.xpm
new file mode 100644
index 0000000..695ecbe
--- /dev/null
+++ b/src/MagML/MAGML.xpm
@@ -0,0 +1,268 @@
+/* XPM */
+static char *MAGML[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 230 2",
+"   c gray20",
+".  c #343434",
+"X  c gray22",
+"o  c #393939",
+"O  c #3C3C3C",
+"+  c gray24",
+"@  c gray25",
+"#  c gray26",
+"$  c #434343",
+"%  c #444444",
+"&  c #464646",
+"*  c gray28",
+"=  c #494949",
+"-  c #4C4C4C",
+";  c gray30",
+":  c #4E4E4E",
+">  c #505050",
+",  c gray32",
+"<  c #535353",
+"1  c gray33",
+"2  c #555555",
+"3  c #565656",
+"4  c #585858",
+"5  c gray35",
+"6  c #5A5A5A",
+"7  c #5B5B5B",
+"8  c gray36",
+"9  c #5D5D5D",
+"0  c gray37",
+"q  c #5F5F5F",
+"w  c #626262",
+"e  c gray39",
+"r  c #646464",
+"t  c #656565",
+"y  c gray40",
+"u  c #676767",
+"i  c #686868",
+"p  c DimGray",
+"a  c #6A6A6A",
+"s  c gray42",
+"d  c #6C6C6C",
+"f  c #6F6F6F",
+"g  c gray44",
+"h  c #717171",
+"j  c #747474",
+"k  c gray46",
+"l  c #767676",
+"z  c #777777",
+"x  c #797979",
+"c  c gray49",
+"v  c #7F7F7F",
+"b  c #B31200",
+"n  c #B41605",
+"m  c #B51907",
+"M  c #B71E0F",
+"N  c #BA2518",
+"B  c #BA2D1D",
+"V  c #BB2E1E",
+"C  c #BD2D22",
+"Z  c #BC3122",
+"A  c #BC3324",
+"S  c #BF382B",
+"D  c #C0342B",
+"F  c #C23C35",
+"G  c #C24034",
+"H  c #C5473D",
+"J  c #C84D45",
+"K  c #C8504A",
+"L  c #C9544E",
+"P  c #D26A69",
+"I  c #D26B6A",
+"U  c #D26F6A",
+"Y  c #D4716F",
+"T  c #D77477",
+"R  c #D77E7B",
+"E  c #D87F7D",
+"W  c #D87D7E",
+"Q  c #D87B80",
+"!  c #808080",
+"~  c #818181",
+"^  c gray51",
+"/  c #838383",
+"(  c #848484",
+")  c gray52",
+"_  c gray53",
+"`  c #888888",
+"'  c #898989",
+"]  c gray54",
+"[  c #8B8B8B",
+"{  c #8E8E8E",
+"}  c #909090",
+"|  c gray57",
+" . c gray58",
+".. c #959595",
+"X. c gray59",
+"o. c #979797",
+"O. c #989898",
+"+. c #9A9A9A",
+"@. c #9B9B9B",
+"#. c #9D9D9D",
+"$. c #9F9F9F",
+"%. c gray63",
+"&. c #A2A2A2",
+"*. c gray64",
+"=. c #A4A4A4",
+"-. c #A5A5A5",
+";. c gray65",
+":. c #A7A7A7",
+">. c gray66",
+",. c #AAAAAA",
+"<. c #ACACAC",
+"1. c gray68",
+"2. c #AEAEAE",
+"3. c gray69",
+"4. c #B2B2B2",
+"5. c #B4B4B4",
+"6. c gray71",
+"7. c #B6B6B6",
+"8. c #B7B7B7",
+"9. c gray72",
+"0. c #B9B9B9",
+"q. c gray73",
+"w. c #BBBBBB",
+"e. c #BCBCBC",
+"r. c gray74",
+"t. c gray",
+"y. c gray75",
+"u. c #D98482",
+"i. c #DB8188",
+"p. c #DC8889",
+"a. c #DC8C89",
+"s. c #DD8C8D",
+"d. c #DD8C90",
+"f. c #DE8D91",
+"g. c #E1919A",
+"h. c #E2969D",
+"j. c #E29E9D",
+"k. c #E399A1",
+"l. c #DEB3AE",
+"z. c #E4A2A4",
+"x. c #E5A1A8",
+"c. c #E5A3A9",
+"v. c #E6A0AB",
+"b. c #E5A4A9",
+"n. c #E5A6A8",
+"m. c #E0B2AD",
+"M. c #E1B3AE",
+"N. c #E2B4AF",
+"B. c #E8ABB2",
+"V. c #E9ABB4",
+"C. c #E3B5B0",
+"Z. c #E4B6B1",
+"A. c #E5B7B2",
+"S. c #E6B9B4",
+"D. c #E7BBB7",
+"F. c #E9B4B8",
+"G. c #E8BDBA",
+"H. c #E9C1BE",
+"J. c #EDBAC2",
+"K. c #C0C0C0",
+"L. c #C1C1C1",
+"P. c gray76",
+"I. c gray77",
+"U. c #C5C5C5",
+"Y. c gray78",
+"T. c #C8C8C8",
+"R. c #CACACA",
+"E. c #CBCBCB",
+"W. c gray80",
+"Q. c gray81",
+"!. c #D0D0D0",
+"~. c gray82",
+"^. c #D2D2D2",
+"/. c #D5D5D5",
+"(. c gray84",
+"). c #D7D7D7",
+"_. c #D8D8D8",
+"`. c gray85",
+"'. c #DADADA",
+"]. c gray86",
+"[. c gainsboro",
+"{. c #DDDDDD",
+"}. c gray87",
+"|. c #DFDFDF",
+" X c #EBC4C1",
+".X c #EDC7C5",
+"XX c #EEC9C8",
+"oX c #EFCCCB",
+"OX c #F0CECE",
+"+X c #EFCDD3",
+"@X c #F1D0D1",
+"#X c #F1D3D8",
+"$X c #F3D7D9",
+"%X c #F4D8D9",
+"&X c #F4D9DB",
+"*X c #F4DADB",
+"=X c #F5DBDE",
+"-X c #F6DDE1",
+";X c gray88",
+":X c #E1E1E1",
+">X c #E2E2E2",
+",X c gray89",
+"<X c #E4E4E4",
+"1X c gray90",
+"2X c #E6E6E6",
+"3X c #E7E7E7",
+"4X c gray91",
+"5X c #E9E9E9",
+"6X c #EAEAEA",
+"7X c gray92",
+"8X c #ECECEC",
+"9X c gray93",
+"0X c #EEEEEE",
+"qX c #EFEFEF",
+"wX c #F7EDEF",
+"eX c gray94",
+"rX c #F1F1F1",
+"tX c gray95",
+"yX c #F3F3F3",
+"uX c #F4F4F4",
+"iX c gray96",
+"pX c #F6F6F6",
+"aX c gray97",
+"sX c #F8F8F8",
+"dX c #F9F9F9",
+"fX c gray98",
+"gX c #FBFBFB",
+"hX c gray99",
+"jX c #FDFDFD",
+"kX c gray100",
+/* pixels */
+"kX6X3X3X2X2X2X1X1X1X1X<X<X<X,X,X,X>X>X>X>X:X:X:X;X;X;X;X;X~.kXkX",
+"kX3X#XV.k.h.i.Q T p.I E U L J H G S Z V V V V V V V B B A :XkXkX",
+"kX3X+XJ.B.c.F.f.z.s.j.u.R F D C N M n b b b b b b b b b m :XkXkX",
+"kX2X+Xv.g.x.b.d.n.W P Y a.K D C N M n b b b b b b b b b m :XkXkX",
+"kX2XwX-X=X&X$X%X*X at XOXoXXX.X XH.G.D.S.A.Z.Z.C.N.N.M.M.m.l.;XkXkX",
+"kX2XsX3X;X{.5X}.}.pXdX].2X2X,X`.[.8X2XaXaXpXiXuXyXtXrXrX8X;XkXkX",
+"kX1XdX>X}.4X>X`.|.>X`.6X4X<X|.9XdXdXsXaXpXiXuXuXyXtXrXeX5X;XkXkX",
+"kX1XtX`.5XkXkXkXjX`.,XjXhXhXgXfXdXsXaXpXpXiXuXyXtXrXrX0X4X;XkXkX",
+"kX1X/.  2 iXtXeXe.  i uX9XeX9XuXeX,XuX8X7X5X0X0X<X7X0X6X5X;XkXkX",
+"kX1X/.o 4 R.sXqXk w s 8XsX7X}.'.qX4X6X6XtX5X~.1X|.:X7X5X6X;XkXkX",
+"kX<X/.o $.) hX2X% $.d rXpX7 3 < # w.1X0Xy.@ : = j c <X6X7X;XkXkX",
+"kX<X(.o 3X& pX*.! >.i 0XrX{.yX3X>.> 7X2X; X.1X].% v 7X7X8X;XkXkX",
+"kX<X(.o rXg 9.0 W.>.u 9XtX).,.^ j . }.^.. {.0X>Xh x <X8X9X;XkXkX",
+"kX,X(.X tX6.5 , tX&.i tX9X* { 8.r.  {.Q.X ,X4XqX( v 9X9X9X;XkXkX",
+"kX,X(.o kXhXw <.jX,.d fXK.9 sXaX0.  3XqXO L.eX0X2 v 0X0X0X;XkXkX",
+"kX,X(.X sXdXtXtXeX%.d fX4XO :.=.e . 3XyX at .@ ' q 5 ! qXqXqX;XkXkX",
+"kX>X5XX.uXsXrXrX0XE.,.pXyXI._ | ).} _.:X(.4...t.f [ 7XeXeX;XkXkX",
+"kX>XfXtXyXpXqXuXsXh 8 W.0X8XtXQ.6 r 2X6X .f [.5.+ P.1X0XrX;XkXkX",
+"kX>XdX}.0X7XuX7X8Xt 9 ' 5X}.;X .7 5 ,X3X~ - $ > #.;X|.qXtX;XkXkX",
+"kX>XdXrXtXtXtXtXtXt o.3 8XtXrXq O.5 tXtX%.a tXrXeXtXtXtXtX;XkXkX",
+"kX:XfX_.:X2X0X3X2Xw -.j 6.yXU.y t.5 yXyX&.a yXyXyXyXyXyXyX;XkXkX",
+"kX:XfXuXuXuXuXyXuXt 1.7.z uX` =.y.5 uXuX&.a uXuXuXuXuXuXuX;XkXkX",
+"kX:XfX{.).;X].2X3Xw %.~.2 U.1 {.3.4 8X9XO.t }.;X`.>X<X8X8X'.kXkX",
+"kX;XgX).<X5X;X:X,Xt $.,X/ p k 1Xq.5 :X9Xo.w /.~.!.[.}.}.[.8.kXkX",
+"kX;XhX7X5X;X,XqX5Xr ;.6XP.8 2.1X7.5 6X,X+.t 3X7X7XuXkXjX!.jXkXkX",
+"kX;XhX`.tXyX4X2X5Xr 2.iXaXpXaXaXL.5 aXaX=.8 e.e.r.r.[.Q.jXkXkXkX",
+"kX;XhXsXsXsXsXsXsX] L.sXsXsXsXsXQ.~ sXsX0.f l l l l $.jXkXkXkXkX",
+"kX;XhX/.(.3XrX5X9XsXsXsXsXsXsXsXsXsXsXsXsX(.9X7X7XE.jXkXkXkXkXkX",
+"kX;XhXaXsXsXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdX(.4X1XT.jXkXkXkXkXkXkX",
+"kX;XhXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdXdX).,XU.jXkXkXkXkXkXkXkX",
+"kX;XjXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfXfX/.I.jXkXkXkXkXkXkXkXkX",
+"kX5X|.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.Y.gXkXkXkXkXkXkXkXkXkX"
+};
diff --git a/src/MagML/MagML.cc b/src/MagML/MagML.cc
new file mode 100644
index 0000000..71e2117
--- /dev/null
+++ b/src/MagML/MagML.cc
@@ -0,0 +1,303 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <XmlMagics.h>
+#undef ABS
+#include "Metview.h"
+#include "MvPath.hpp"
+
+#include <XmlTree.h>
+#include <XmlNode.h>
+#include <XmlReader.h>
+#include <MagException.h>
+
+
+//#include "iostream.h"
+
+
+
+using namespace std;
+using namespace magics;
+
+
+
+
+string DirectoryFromPath (const string &path)
+{
+
+    // find the last slash
+
+    string::size_type pos = path.find_last_of("/");
+
+    if (pos != string::npos)
+    {
+        string dir = path.substr(0,pos);
+        return dir;
+    }
+    
+    else
+    {
+        // no slash, so this must just be a filename; therefore the directory is nothing
+
+        return "";
+    }
+}
+
+
+
+
+
+/********************************************************************************
+    MagMLNodeVisitor: derived from the Magics++ XmlNodeVisitor, this is used
+                      to parse the <drivers> tag so that we know whether the
+                      user has specified their own outputs (in which case we
+                      use them) or not (in which case we write our own PS file).
+                      Although in theory we could just quickly scan the MagML
+                      file for the <drivers> string, that would not detect
+                      if it had been commented out.
+
+********************************************************************************/
+
+class MagMLNodeVisitor : public XmlNodeVisitor
+{
+public:
+    MagMLNodeVisitor() : hasDriversNode(false) {};
+    void interpret(const string&);
+    void visit(const XmlNode&);
+    bool hasDriversNode;
+private:
+};
+
+
+void MagMLNodeVisitor::interpret(const string& path)
+{
+    XmlReader parser(false);
+	XmlTree tree;
+    
+	try {
+		parser.interpret(path, &tree);		
+		tree.visit(*this);
+	}
+	catch (MagicsException& e) {
+			cout << e.what() << endl;
+	}
+}
+
+
+// this function will be called for each node in the XML file
+
+void MagMLNodeVisitor::visit(const XmlNode& node)
+{
+    if (node.name() == "drivers")
+    {
+        hasDriversNode    = true;
+    }
+    
+    node.visit(*this);
+}
+
+
+
+
+
+/********************************************************************************
+    MagicsLogObserver: derived from the Magics MagicsObserver, this is 
+                       created so that we can receive callbacks whenever
+                       Magics logs any messages.
+
+********************************************************************************/
+
+class MagicsLogObserver : public magics::MagicsObserver
+{
+public:
+
+    MagicsLogObserver()  {};
+    ~MagicsLogObserver() {};
+
+
+private:
+
+	void warningMessage (const string& msg)  {char msg_c[1024]; strncpy(msg_c, msg.c_str(), 1023);marslog(LOG_WARN, msg_c);};
+	void errorMessage   (const string& msg)  {char msg_c[1024]; strncpy(msg_c, msg.c_str(), 1023);marslog(LOG_EROR, msg_c);};
+	void infoMessage    (const string& msg)  {char msg_c[1024]; strncpy(msg_c, msg.c_str(), 1023);marslog(LOG_INFO, msg_c);};
+};
+
+
+
+
+//
+//_____________________________________________________________________
+
+class MagMLService : public MvService {
+public:
+	MagMLService();
+	void serve(MvRequest&,MvRequest&);
+protected:
+    XmlMagics  manager_;
+    string     magml_;
+
+    // we will not need to do anything with this observer object - it will
+    // automatically be registered when it is created; just creating it is
+    // enough to get the callbacks.
+    MagicsLogObserver magicsLogObserver_;
+};
+
+//_____________________________________________________________________
+
+MagMLService::MagMLService() :  MvService("MAGML")
+{
+    // this means that if the user re-executes the icon, it will be run again,
+    // even if it is green.
+
+    saveToPool(false);
+}
+
+static 
+void substitute(string& xml, const string& var, const string& val)
+{
+	string name = "$" + var;
+	size_t index = xml.find(name);
+	int last = 0;
+	
+	while ( index != string::npos) {
+		xml.replace(index, name.length(), val);
+		last = index + val.length();
+        std::cout << "[" << name << "]" << "\n";
+		index = xml.find(name, last);
+        }
+
+	std::cout << "[" << xml << "]" << "\n";
+}
+
+void MagMLService::serve( MvRequest& in, MvRequest& out )
+{
+  cout << "--------------MagMLService::serve()--------------" << endl;
+  in.print();
+  
+  const char* magml = in("template");
+  map<string, string> variables;
+  
+  if ( !magml ) { 
+  	magml = in("PATH");
+  	if ( !magml ) { 
+  		cout << "No MagML template to interpret" << endl;
+  		sendProgress("No MagML template to interpret"); 
+  		return;
+  	}
+  }
+
+
+  // check whether the file can be opened
+
+  if (!FileCanBeOpened(magml, "r"))
+  {
+    setError(1, "Could not open MagML file '%s'", magml);
+    return;
+  }
+
+
+
+  // parse the MagML file to see whether the user has specified a <drivers> tag
+  // or not (see class definition of MagMLNodeVisitor, above, for rationale).
+
+  MagMLNodeVisitor magml_visitor;
+  magml_visitor.interpret (magml);
+
+  
+  string xml = marstmp();
+  string ps = (magml_visitor.hasDriversNode) ? "" : marstmp();
+
+  if (!ps.empty())
+  {
+    ParameterManager::set("output_fullname", ps);
+    marslog(LOG_INFO, "Using temporary PostScript file: %s", ps.c_str());
+  }
+  else
+  {
+    // change the current directory to be the same as the MagML icon so that
+    // any outputs with relative filenames will be relative to the icon
+
+    string path = DirectoryFromPath (magml);
+    chdir (path.c_str());
+    marslog(LOG_INFO, "Using outputs defined in <drivers> tag - will not return result to Metview.");
+    marslog(LOG_INFO, "If outputs have relative paths, they will be relative to: '%s'.", path.c_str());
+  }
+
+
+
+    
+  try {
+		ifstream from(magml);
+        ofstream to(xml.c_str());
+		if (!from)
+		{			
+			return;
+		}
+		static string s; 
+		s = "";
+        
+		char c;
+		while(from.get(c))
+		{
+			s+=c;
+            
+		}
+	    
+        cout << s << endl;
+        
+        int i = 0;
+  		while( i < in.countParameters() ) {
+  	          const char* param = in.getParameter(i++);
+  	          const char* value = in(param);
+  	         
+  	          substitute(s, param, value);
+        }
+        
+        to << s;
+        
+		from.close();
+        to.close();
+        
+       
+       // WebInterpretor::magml(xml);
+        manager_.execute(xml);
+               
+	}
+	catch (exception e)
+	{
+		cout << e.what() << endl;
+	}
+
+
+    // the Magics log messages are not broadcast until the next log event - therefore, the
+    // last log message will not be broadcast. We fix that by flushing the message streams
+    // - we only need to do one of them, and all will be flushed behind the scenes.
+
+    MagLog::info().flush();
+    
+
+    if (!ps.empty())
+    {
+        MvRequest data("PSFILE");
+	    data("PATH") = ps.c_str();
+        data("TEMPORARY") = 1;
+	    data.print();
+	    out = data;
+    }
+}
+//_____________________________________________________________________
+
+int main( int argc, char** argv )
+{
+    MvApplication theApp( argc, argv );
+    MagMLService tool;
+    theApp.run();
+}
+
+
diff --git a/src/MagML/Makefile.am b/src/MagML/Makefile.am
new file mode 100644
index 0000000..d8a8b0d
--- /dev/null
+++ b/src/MagML/Makefile.am
@@ -0,0 +1,32 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+bin_PROGRAMS = bin/MagML
+
+bin_MagML_SOURCES  = MagML.cc
+bin_MagML_CPPFLAGS = $(MAGPLUS_CPPFLAGS) $(ODB_CPPFLAGS) $(QT_CPPFLAGS)
+bin_MagML_LDADD    = $(MAGPLUS_LIB) $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB) $(ODB_LDFLAGS) $(ODB_LIBS) $(QT_LIBS)
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.MagML
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} MAGML.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/MAGML.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = MAGML.xpm ObjectSpec.MagML
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/MagML/Makefile.in b/src/MagML/Makefile.in
new file mode 100644
index 0000000..1645c33
--- /dev/null
+++ b/src/MagML/Makefile.in
@@ -0,0 +1,819 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/MagML$(EXEEXT)
+subdir = src/MagML
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_MagML_OBJECTS = bin_MagML-MagML.$(OBJEXT)
+bin_MagML_OBJECTS = $(am_bin_MagML_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_MagML_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_MagML_SOURCES)
+DIST_SOURCES = $(bin_MagML_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_MagML_SOURCES = MagML.cc
+bin_MagML_CPPFLAGS = $(MAGPLUS_CPPFLAGS) $(ODB_CPPFLAGS) $(QT_CPPFLAGS)
+bin_MagML_LDADD = $(MAGPLUS_LIB) $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB) $(ODB_LDFLAGS) $(ODB_LIBS) $(QT_LIBS)
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.MagML
+CLEANFILES = $(share_DATA) $(local_iconsdir)/MAGML.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = MAGML.xpm ObjectSpec.MagML
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/MagML/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/MagML/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/MagML$(EXEEXT): $(bin_MagML_OBJECTS) $(bin_MagML_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/MagML$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_MagML_OBJECTS) $(bin_MagML_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MagML-MagML.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_MagML-MagML.o: MagML.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MagML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MagML-MagML.o -MD -MP -MF $(DEPDIR)/bin_MagML-MagML.Tpo -c -o bin_MagML-MagML.o `test -f 'MagML.cc' || echo '$(srcdir)/'`MagML.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MagML-MagML.Tpo $(DEPDIR)/bin_MagML-MagML.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagML.cc' object='bin_MagML-MagML.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MagML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MagML-MagML.o `test -f 'MagML.cc' || echo '$(srcdir)/'`MagML.cc
+
+bin_MagML-MagML.obj: MagML.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MagML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MagML-MagML.obj -MD -MP -MF $(DEPDIR)/bin_MagML-MagML.Tpo -c -o bin_MagML-MagML.obj `if test -f 'MagML.cc'; then $(CYGPATH_W) 'MagML.cc'; else $(CYGPATH_W) '$(srcdir)/MagML.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MagML-MagML.Tpo $(DEPDIR)/bin_MagML-MagML.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagML.cc' object='bin_MagML-MagML.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MagML_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MagML-MagML.obj `if test -f 'MagML.cc'; then $(CYGPATH_W) 'MagML.cc'; else $(CYGPATH_W) '$(srcdir)/MagML.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} MAGML.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/MagML/ObjectSpec.MagML b/src/MagML/ObjectSpec.MagML
new file mode 100644
index 0000000..60ca668
--- /dev/null
+++ b/src/MagML/ObjectSpec.MagML
@@ -0,0 +1,22 @@
+
+object,
+    class              = MAGML,
+    check              = False,
+    can_be_created     = True,
+    type               = File,
+    default_object     = False,
+    default_name       = MagML File,
+    macro              = magml,
+    doubleclick_method = Visualise,
+    editor_type        = QtMacroEditor,
+    pixmap             = '$METVIEW_DIR_SHARE/icons/MAGML.icon'
+
+state,
+    class        = MAGML,
+    output_class = PSFILE,
+    service      = MagML
+
+service,
+    cmd  = 'env MAGPLUS_DEV=off env MAGPLUS_DEBUG=off env LD_LIBRARY_PATH=$MAGPLUS_HOME/lib:$LD_LIBRARY_PATH $METVIEW_CMD $METVIEW_BIN/MagML',
+    name = 'MagML'
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100755
index 0000000..02eab9f
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,100 @@
+AUTOMAKE_OPTIONS	= foreign
+
+
+if METVIEW_ODB
+MV_ODB_DIR 		= Odb
+if METVIEW_QT
+MV_ODB_DIR 		+= OdbExaminer
+endif
+#if METVIEW_GUI
+#MV_ODB_DIR 	       += OdbBrowser
+#endif
+endif
+
+
+
+
+if METVIEW_OBSTAT
+MV_OBSTAT_DIR 		= Obstat
+if METVIEW_QT
+MV_OBSTAT_DIR 		+= Obstat ObstatCurveTool ObstatScatterTool
+endif
+endif
+
+if METVIEW_QT
+MV_QT_DIR 		= libMvQtGui libMvQtUtil GeopExaminer GribExaminer MacroEditor \
+			  NcExaminer OgcClient FlextraExaminer ScmEditor images
+endif
+
+if METVIEW_MAGICS
+MV_MAGICS_DIR 		= uPlot MagML Reprojection
+if !METVIEW_EXTERNAL
+MV_MAGICS_DIR	       += Meteogram
+endif
+endif
+
+if METVIEW_GUI
+MV_GUI_DIR 		= libMvMotif AppMod MetviewUI Stations VisTools DebugTools WebAccess
+endif
+
+if METVIEW_EXTERNAL
+MV_EXTERNAL_DIR 	= #DataAccess
+endif
+
+if METVIEW_EMOS
+if METVIEW_QT
+MV_BUFR_DIR 		= BufrExaminer
+endif
+endif
+
+if METVIEW_MARS_CATALOG
+if METVIEW_QT
+MV_MARS_CATALOG_DIR 	= MarsCatalog
+endif
+endif
+
+if METVIEW_INPE
+MV_INPE_DIR            = CptecAccess
+endif
+
+if METVIEW_OPERA
+MV_OPERA_DIR           = OperaRadar
+endif
+
+
+#if METVIEW_TRAJ
+#MV_TRAJ_DIR 		= Traj
+#endif
+
+SUBDIRS			= libMars libUtil libMetview libMvNetCDF libFTimeUtil \
+                          Datacoverage Divrot Ecfile Event ExamineManager Flextra \
+                          GribVectors Hovmoeller KML \
+                          Macro MvApp ObsFilter Percentile PottF Scm StdAppManager \
+                          Velstr XSection \
+			  ${MV_QT_DIR} ${MV_GUI_DIR} ${MV_MAGICS_DIR} \
+			  ${MV_ODB_DIR} ${MV_OBSTAT_DIR} \
+			  ${MV_EXTERNAL_DIR} ${MV_BUFR_DIR} ${MV_OPERA_DIR} \
+			  ${MV_MARS_CATALOG_DIR} ${MV_QTUI_DIR} \
+			  ${MV_INPE_DIR} 
+
+# Curve Hovmoeller PM_Tephigram Relhum Spectra TimeSeries TropCycTrack
+# ${MV_TRAJ_DIR}
+
+check_SUBDIRS		=
+
+#AM_CPPFLAGS		= ${GRIBAPI_CXXFLAGS} -I$(top_srcdir)/src/common -I$(top_srcdir)/src/drivers -I$(top_srcdir)/src/decoders -I$(top_srcdir)/src/visualisers -I$(top_srcdir)/src/terralib/kernel
+
+include_H		= metview_config.h
+
+include_HEADERS =
+noinst_HEADERS	= $(include_H)
+
+quiet:
+	make --quiet install
+
+#cleanall::
+#	-for d in $(SUBDIRS); do (cd $$d; $(MAKE) cleanall ; echo "MAKE CLEANALL > $$d" ); done
+#	-rm -f */*.moc.*
+
+check:
+	echo "Nothing to check here ;-)"
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..85d6c27
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,778 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ at METVIEW_ODB_TRUE@@METVIEW_QT_TRUE at am__append_1 = OdbExaminer
+ at METVIEW_OBSTAT_TRUE@@METVIEW_QT_TRUE at am__append_2 = Obstat ObstatCurveTool ObstatScatterTool
+ at METVIEW_EXTERNAL_FALSE@@METVIEW_MAGICS_TRUE at am__append_3 = Meteogram
+subdir = src
+DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/metview_config.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(includedir)"
+HEADERS = $(include_HEADERS) $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = libMars libUtil libMetview libMvNetCDF libFTimeUtil \
+	Datacoverage Divrot Ecfile Event ExamineManager Flextra \
+	GribVectors Hovmoeller KML Macro MvApp ObsFilter Percentile \
+	PottF Scm StdAppManager Velstr XSection libMvQtGui libMvQtUtil \
+	GeopExaminer GribExaminer MacroEditor NcExaminer OgcClient \
+	FlextraExaminer ScmEditor images libMvMotif AppMod MetviewUI \
+	Stations VisTools DebugTools WebAccess uPlot MagML \
+	Reprojection Meteogram Odb OdbExaminer Obstat ObstatCurveTool \
+	ObstatScatterTool BufrExaminer OperaRadar MarsCatalog \
+	CptecAccess
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign
+ at METVIEW_ODB_TRUE@MV_ODB_DIR = Odb $(am__append_1)
+#if METVIEW_GUI
+#MV_ODB_DIR 	       += OdbBrowser
+#endif
+ at METVIEW_OBSTAT_TRUE@MV_OBSTAT_DIR = Obstat $(am__append_2)
+ at METVIEW_QT_TRUE@MV_QT_DIR = libMvQtGui libMvQtUtil GeopExaminer GribExaminer MacroEditor \
+ at METVIEW_QT_TRUE@			  NcExaminer OgcClient FlextraExaminer ScmEditor images
+
+ at METVIEW_MAGICS_TRUE@MV_MAGICS_DIR = uPlot MagML Reprojection \
+ at METVIEW_MAGICS_TRUE@	$(am__append_3)
+ at METVIEW_GUI_TRUE@MV_GUI_DIR = libMvMotif AppMod MetviewUI Stations VisTools DebugTools WebAccess
+ at METVIEW_EXTERNAL_TRUE@MV_EXTERNAL_DIR = #DataAccess
+ at METVIEW_EMOS_TRUE@@METVIEW_QT_TRUE at MV_BUFR_DIR = BufrExaminer
+ at METVIEW_MARS_CATALOG_TRUE@@METVIEW_QT_TRUE at MV_MARS_CATALOG_DIR = MarsCatalog
+ at METVIEW_INPE_TRUE@MV_INPE_DIR = CptecAccess
+ at METVIEW_OPERA_TRUE@MV_OPERA_DIR = OperaRadar
+
+#if METVIEW_TRAJ
+#MV_TRAJ_DIR 		= Traj
+#endif
+SUBDIRS = libMars libUtil libMetview libMvNetCDF libFTimeUtil \
+                          Datacoverage Divrot Ecfile Event ExamineManager Flextra \
+                          GribVectors Hovmoeller KML \
+                          Macro MvApp ObsFilter Percentile PottF Scm StdAppManager \
+                          Velstr XSection \
+			  ${MV_QT_DIR} ${MV_GUI_DIR} ${MV_MAGICS_DIR} \
+			  ${MV_ODB_DIR} ${MV_OBSTAT_DIR} \
+			  ${MV_EXTERNAL_DIR} ${MV_BUFR_DIR} ${MV_OPERA_DIR} \
+			  ${MV_MARS_CATALOG_DIR} ${MV_QTUI_DIR} \
+			  ${MV_INPE_DIR} 
+
+
+# Curve Hovmoeller PM_Tephigram Relhum Spectra TimeSeries TropCycTrack
+# ${MV_TRAJ_DIR}
+check_SUBDIRS = 
+
+#AM_CPPFLAGS		= ${GRIBAPI_CXXFLAGS} -I$(top_srcdir)/src/common -I$(top_srcdir)/src/drivers -I$(top_srcdir)/src/decoders -I$(top_srcdir)/src/visualisers -I$(top_srcdir)/src/terralib/kernel
+include_H = metview_config.h
+include_HEADERS = 
+noinst_HEADERS = $(include_H)
+all: metview_config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+metview_config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/metview_config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/metview_config.h
+$(srcdir)/metview_config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f metview_config.h stamp-h1
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) metview_config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) metview_config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) metview_config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) metview_config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS) metview_config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+	ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-includeHEADERS install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-includeHEADERS
+
+
+quiet:
+	make --quiet install
+
+#cleanall::
+#	-for d in $(SUBDIRS); do (cd $$d; $(MAKE) cleanall ; echo "MAKE CLEANALL > $$d" ); done
+#	-rm -f */*.moc.*
+
+check:
+	echo "Nothing to check here ;-)"
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/MarsCatalog/MARS_CATALOG.xpm b/src/MarsCatalog/MARS_CATALOG.xpm
new file mode 100644
index 0000000..cf4ee6b
--- /dev/null
+++ b/src/MarsCatalog/MARS_CATALOG.xpm
@@ -0,0 +1,758 @@
+/* XPM */
+static char * MARS_CATALOG_xpm[] = {
+"31 32 723 2",
+"  	c #FFFFF8",
+". 	c #FFFFF1",
+"+ 	c #FFFFF2",
+"@ 	c #FEFFF1",
+"# 	c #FFFEF1",
+"$ 	c #FEFEF1",
+"% 	c #FFFFFA",
+"& 	c #FFFFF3",
+"* 	c #FCFDF1",
+"= 	c #FAFAEF",
+"- 	c #F6F6EB",
+"; 	c #F1F1E6",
+"> 	c #EDEDE2",
+", 	c #E9E9DD",
+"' 	c #E6E5D7",
+") 	c #F2F1E6",
+"! 	c #FFFFF9",
+"~ 	c #FFFFF7",
+"{ 	c #FFFFF5",
+"] 	c #FEFEF3",
+"^ 	c #FFFEF3",
+"/ 	c #FEFFF3",
+"( 	c #FEFEF4",
+"_ 	c #FEFFF5",
+": 	c #FFFEF4",
+"< 	c #FFFFF4",
+"[ 	c #DFDDD4",
+"} 	c #B7B8B4",
+"| 	c #91958F",
+"1 	c #737270",
+"2 	c #686765",
+"3 	c #636260",
+"4 	c #5E5B5C",
+"5 	c #565853",
+"6 	c #636050",
+"7 	c #726A66",
+"8 	c #8B8C8C",
+"9 	c #C0BFBB",
+"0 	c #F4F2F2",
+"a 	c #FFFFFF",
+"b 	c #FFFFFE",
+"c 	c #FDFFF9",
+"d 	c #FDFEFC",
+"e 	c #FFFEFA",
+"f 	c #FDFFFB",
+"g 	c #FEFFFA",
+"h 	c #FFFEF9",
+"i 	c #FDFDFA",
+"j 	c #FBFCE6",
+"k 	c #F8F7F0",
+"l 	c #FBF9F6",
+"m 	c #FDFFFC",
+"n 	c #D7D7CB",
+"o 	c #C7C6B3",
+"p 	c #DEDDD6",
+"q 	c #ABADAE",
+"r 	c #666469",
+"s 	c #626061",
+"t 	c #615F60",
+"u 	c #6D696D",
+"v 	c #585A57",
+"w 	c #65614E",
+"x 	c #605551",
+"y 	c #363839",
+"z 	c #393738",
+"A 	c #494446",
+"B 	c #828075",
+"C 	c #B4B5B3",
+"D 	c #F7F7F8",
+"E 	c #FFFEFF",
+"F 	c #FDFEFD",
+"G 	c #FEFEFE",
+"H 	c #FDFDFF",
+"I 	c #FEFCE9",
+"J 	c #E1CF89",
+"K 	c #CECAC4",
+"L 	c #D4D9C8",
+"M 	c #7D7C84",
+"N 	c #D1D1D0",
+"O 	c #FFFFFB",
+"P 	c #D8D8CD",
+"Q 	c #EEEEE1",
+"R 	c #C9C7B1",
+"S 	c #EFECE4",
+"T 	c #A8A7A7",
+"U 	c #787575",
+"V 	c #737172",
+"W 	c #7E7C7D",
+"X 	c #928E92",
+"Y 	c #6B6D67",
+"Z 	c #605C47",
+"` 	c #807770",
+" .	c #757776",
+"..	c #535154",
+"+.	c #4B4844",
+"@.	c #52533C",
+"#.	c #2C2E27",
+"$.	c #2C2D2E",
+"%.	c #757264",
+"&.	c #B7B4AA",
+"*.	c #F3F6F6",
+"=.	c #FEFEFD",
+"-.	c #FCFEFF",
+";.	c #F9F5EA",
+">.	c #78613E",
+",.	c #575258",
+"'.	c #4B4B47",
+").	c #333432",
+"!.	c #585858",
+"~.	c #F7F7ED",
+"{.	c #FEFEF0",
+"].	c #BBBBB2",
+"^.	c #CECBB8",
+"/.	c #EDEBE5",
+"(.	c #C1C0C0",
+"_.	c #8D8989",
+":.	c #848081",
+"<.	c #7D7B79",
+"[.	c #7D7C7A",
+"}.	c #696E60",
+"|.	c #636049",
+"1.	c #807871",
+"2.	c #787A77",
+"3.	c #6E6E6E",
+"4.	c #4F4C44",
+"5.	c #6D6B58",
+"6.	c #6E6D69",
+"7.	c #302F2F",
+"8.	c #5E593C",
+"9.	c #6E655C",
+"0.	c #848785",
+"a.	c #D1D0C0",
+"b.	c #FFFEF7",
+"c.	c #FDFBFC",
+"d.	c #C8C4BA",
+"e.	c #81807A",
+"f.	c #585459",
+"g.	c #5A5B59",
+"h.	c #CDCDCC",
+"i.	c #FFFFF6",
+"j.	c #CECBB9",
+"k.	c #EAE7E1",
+"l.	c #C4C3C5",
+"m.	c #8E898A",
+"n.	c #787670",
+"o.	c #5A5954",
+"p.	c #797A75",
+"q.	c #69705E",
+"r.	c #67654D",
+"s.	c #807971",
+"t.	c #7A7B79",
+"u.	c #656663",
+"v.	c #46453A",
+"w.	c #514F3E",
+"x.	c #4C4B49",
+"y.	c #4B4B49",
+"z.	c #65613C",
+"A.	c #7E7276",
+"B.	c #D5D8D4",
+"C.	c #F6F3D7",
+"D.	c #FAF9F0",
+"E.	c #ECECED",
+"F.	c #797979",
+"G.	c #444544",
+"H.	c #989898",
+"I.	c #FEFEF5",
+"J.	c #FAFAED",
+"K.	c #F1F1E5",
+"L.	c #D1CEBB",
+"M.	c #EBE8E2",
+"N.	c #B3B2B4",
+"O.	c #797677",
+"P.	c #74746F",
+"Q.	c #70736A",
+"R.	c #7E8377",
+"S.	c #666F5A",
+"T.	c #5C5A43",
+"U.	c #7F7971",
+"V.	c #7B7D7A",
+"W.	c #6B6D6A",
+"X.	c #454338",
+"Y.	c #42422B",
+"Z.	c #40423D",
+"`.	c #434542",
+" +	c #6E6D48",
+".+	c #70696E",
+"++	c #C7CAC1",
+"@+	c #F7F1D6",
+"#+	c #FBF8F0",
+"$+	c #959596",
+"%+	c #2D2D2E",
+"&+	c #E2E2E3",
+"*+	c #FBFBEE",
+"=+	c #F3F3E8",
+"-+	c #D3D0BC",
+";+	c #E7E5DE",
+">+	c #C7C7C8",
+",+	c #A2A2A4",
+"'+	c #7F847D",
+")+	c #7A8170",
+"!+	c #666D5A",
+"~+	c #606756",
+"{+	c #65624C",
+"]+	c #857E76",
+"^+	c #7C7E7C",
+"/+	c #595A57",
+"(+	c #3A3931",
+"_+	c #454534",
+":+	c #4E4F4B",
+"<+	c #373A35",
+"[+	c #666640",
+"}+	c #655D5C",
+"|+	c #C6CBBF",
+"1+	c #F7F3D6",
+"2+	c #FBF9EE",
+"3+	c #F2F2F1",
+"4+	c #E6E7E5",
+"5+	c #7D7D78",
+"6+	c #605D51",
+"7+	c #EFEEE6",
+"8+	c #D2D0BB",
+"9+	c #E5E3DA",
+"0+	c #B9BCBA",
+"a+	c #858884",
+"b+	c #767D6D",
+"c+	c #4B533F",
+"d+	c #5B5F56",
+"e+	c #71756D",
+"f+	c #74705B",
+"g+	c #7D756D",
+"h+	c #7B7D7B",
+"i+	c #4F504C",
+"j+	c #30312C",
+"k+	c #393B35",
+"l+	c #51524D",
+"m+	c #4D4B40",
+"n+	c #636135",
+"o+	c #72705F",
+"p+	c #C8CDC7",
+"q+	c #F9F3E2",
+"r+	c #E0DFD4",
+"s+	c #EEEEEC",
+"t+	c #E1E2DD",
+"u+	c #949492",
+"v+	c #5A5851",
+"w+	c #615B47",
+"x+	c #5C594D",
+"y+	c #FDFDF0",
+"z+	c #D5D3BE",
+"A+	c #D1D0C7",
+"B+	c #C1C3C2",
+"C+	c #A1A29F",
+"D+	c #7E8275",
+"E+	c #575A4F",
+"F+	c #626161",
+"G+	c #6C6F6A",
+"H+	c #756F60",
+"I+	c #736B5F",
+"J+	c #6A6E66",
+"K+	c #5B5C58",
+"L+	c #3C3D36",
+"M+	c #333830",
+"N+	c #464943",
+"O+	c #514E42",
+"P+	c #6A6547",
+"Q+	c #7E7A83",
+"R+	c #BEC1BD",
+"S+	c #F4EDD7",
+"T+	c #CFCDC1",
+"U+	c #A6A6A5",
+"V+	c #9FA09A",
+"W+	c #888888",
+"X+	c #AAA9A9",
+"Y+	c #A6A4A1",
+"Z+	c #807F7C",
+"`+	c #FAFAF9",
+" @	c #FCFCEF",
+".@	c #C1C1B7",
+"+@	c #D6D3BF",
+"@@	c #CECDC5",
+"#@	c #E4E6E5",
+"$@	c #B6B5B6",
+"%@	c #999998",
+"&@	c #9C9C97",
+"*@	c #888786",
+"=@	c #888B88",
+"-@	c #837E71",
+";@	c #746D5F",
+">@	c #70736D",
+",@	c #7D7D7A",
+"'@	c #70706A",
+")@	c #5F5E53",
+"!@	c #62615F",
+"~@	c #7C7C7C",
+"{@	c #8D886E",
+"]@	c #ADA6A4",
+"^@	c #ADB1AB",
+"/@	c #B0AAA1",
+"(@	c #F3F2EB",
+"_@	c #D6D6D5",
+":@	c #8C8E89",
+"<@	c #DEDEDB",
+"[@	c #AAAAA9",
+"}@	c #949595",
+"|@	c #B4B5B5",
+"1@	c #B1B1B0",
+"2@	c #E8E8DC",
+"3@	c #777771",
+"4@	c #DAD7C6",
+"5@	c #E5E4DE",
+"6@	c #929192",
+"7@	c #757375",
+"8@	c #747373",
+"9@	c #7C7A7B",
+"0@	c #808485",
+"a@	c #6D6B59",
+"b@	c #686355",
+"c@	c #747678",
+"d@	c #797876",
+"e@	c #595650",
+"f@	c #62604A",
+"g@	c #757474",
+"h@	c #6F6F70",
+"i@	c #78714F",
+"j@	c #A69A9A",
+"k@	c #F2F5EE",
+"l@	c #CAC4B9",
+"m@	c #A09E9A",
+"n@	c #747474",
+"o@	c #E8E9E8",
+"p@	c #9C9C9D",
+"q@	c #C6C6C6",
+"r@	c #696968",
+"s@	c #E8E8DF",
+"t@	c #C3C3B9",
+"u@	c #DBD8C7",
+"v@	c #E1DFD9",
+"w@	c #A1A2A0",
+"x@	c #959491",
+"y@	c #807F7D",
+"z@	c #747270",
+"A@	c #6E7270",
+"B@	c #74715C",
+"C@	c #615C4C",
+"D@	c #727474",
+"E@	c #6A6A64",
+"F@	c #47443C",
+"G@	c #5C5B41",
+"H@	c #7D7C7B",
+"I@	c #666764",
+"J@	c #706A47",
+"K@	c #968C8E",
+"L@	c #FEFFF7",
+"M@	c #F1EDD2",
+"N@	c #E4E2DA",
+"O@	c #B8B8B8",
+"P@	c #D4D4D4",
+"Q@	c #B7B7B7",
+"R@	c #FCFCFC",
+"S@	c #CCCCCB",
+"T@	c #F3F3E9",
+"U@	c #DDDAC9",
+"V@	c #E0DED8",
+"W@	c #A9A8A7",
+"X@	c #868581",
+"Y@	c #6A6965",
+"Z@	c #595753",
+"`@	c #6D716C",
+" #	c #76735C",
+".#	c #625D4A",
+"+#	c #717470",
+"@#	c #696961",
+"##	c #434136",
+"$#	c #575639",
+"%#	c #747470",
+"&#	c #5E5F5A",
+"*#	c #65623A",
+"=#	c #8E8789",
+"-#	c #F2ECD5",
+";#	c #FAF8F0",
+">#	c #DEDEDE",
+",#	c #FDFDFD",
+"'#	c #E0DBCC",
+")#	c #9C9B9C",
+"!#	c #82807E",
+"~#	c #6E6E6B",
+"{#	c #66685E",
+"]#	c #6D756C",
+"^#	c #717259",
+"/#	c #5D5A45",
+"(#	c #737772",
+"_#	c #66695D",
+":#	c #434337",
+"<#	c #5A583F",
+"[#	c #797972",
+"}#	c #60625D",
+"|#	c #6A6942",
+"1#	c #95908F",
+"2#	c #FFFFFC",
+"3#	c #E8E3D7",
+"4#	c #F4F3EE",
+"5#	c #FAFAFA",
+"6#	c #DBDBDB",
+"7#	c #9E9E9E",
+"8#	c #DCDCDC",
+"9#	c #E0DCCD",
+"0#	c #DDDBD4",
+"a#	c #A9A7AC",
+"b#	c #989798",
+"c#	c #818579",
+"d#	c #737965",
+"e#	c #60675D",
+"f#	c #706F5A",
+"g#	c #696551",
+"h#	c #757977",
+"i#	c #6C7166",
+"j#	c #48483F",
+"k#	c #5A5844",
+"l#	c #777870",
+"m#	c #5F605E",
+"n#	c #6B6944",
+"o#	c #7D7976",
+"p#	c #DDDFD8",
+"q#	c #CFCBC3",
+"r#	c #F3F3EF",
+"s#	c #E1E1E1",
+"t#	c #8F8F8F",
+"u#	c #575757",
+"v#	c #727272",
+"w#	c #E2DED0",
+"x#	c #E0DDD7",
+"y#	c #B6B6B8",
+"z#	c #959990",
+"A#	c #737C63",
+"B#	c #4F5843",
+"C#	c #626560",
+"D#	c #807B6A",
+"E#	c #766F5F",
+"F#	c #737578",
+"G#	c #5F645F",
+"H#	c #43423E",
+"I#	c #504D3D",
+"J#	c #3D3D37",
+"K#	c #363838",
+"L#	c #676542",
+"M#	c #8F8A87",
+"N#	c #CDCDC7",
+"O#	c #DBD7CF",
+"P#	c #F3F2EF",
+"Q#	c #E5E5E5",
+"R#	c #6A6A6A",
+"S#	c #2D2D2D",
+"T#	c #A1A1A1",
+"U#	c #E0DECF",
+"V#	c #A4A29A",
+"W#	c #A7A9A9",
+"X#	c #6E6D6D",
+"Y#	c #5D5E56",
+"Z#	c #585C4F",
+"`#	c #3E4039",
+" $	c #4D4F4E",
+".$	c #5E584B",
+"+$	c #4A4134",
+"@$	c #292A2E",
+"#$	c #2D2F2E",
+"$$	c #2E2C2C",
+"%$	c #494737",
+"&$	c #555454",
+"*$	c #565757",
+"=$	c #656440",
+"-$	c #747071",
+";$	c #F0F3EB",
+">$	c #E3E0D6",
+",$	c #F2F2EE",
+"'$	c #BBBBBB",
+")$	c #FDFDFC",
+"!$	c #E3E2D6",
+"~$	c #D6D5CA",
+"{$	c #FDFEFF",
+"]$	c #D0CECE",
+"^$	c #ACA9AB",
+"/$	c #8F8D8F",
+"($	c #6D6A6B",
+"_$	c #4F4A3C",
+":$	c #5C5547",
+"<$	c #616262",
+"[$	c #6D6B69",
+"}$	c #454442",
+"|$	c #5A5A46",
+"1$	c #7D7B7E",
+"2$	c #646664",
+"3$	c #686643",
+"4$	c #7C7A7C",
+"5$	c #ECF0E9",
+"6$	c #E2E0D6",
+"7$	c #F2F2ED",
+"8$	c #BABABA",
+"9$	c #E4E3D7",
+"0$	c #D6D4CA",
+"a$	c #989696",
+"b$	c #716F70",
+"c$	c #7A7778",
+"d$	c #7D7E7F",
+"e$	c #6D675A",
+"f$	c #6B6356",
+"g$	c #747574",
+"h$	c #6F6E68",
+"i$	c #43433D",
+"j$	c #5F6049",
+"k$	c #7D7C7C",
+"l$	c #5F615C",
+"m$	c #65643E",
+"n$	c #716F71",
+"o$	c #EDF0E9",
+"p$	c #E2DFD5",
+"q$	c #B9B9B9",
+"r$	c #767676",
+"s$	c #E7E6D9",
+"t$	c #D2D1C6",
+"u$	c #ADABAB",
+"v$	c #9D9C9B",
+"w$	c #7E7D7C",
+"x$	c #706F6D",
+"y$	c #707372",
+"z$	c #726E5D",
+"A$	c #676150",
+"B$	c #6F716D",
+"C$	c #6B6B61",
+"D$	c #424339",
+"E$	c #5C5F44",
+"F$	c #5D605A",
+"G$	c #64633E",
+"H$	c #7A7578",
+"I$	c #EFF3EB",
+"J$	c #E2DFD6",
+"K$	c #6C6C6C",
+"L$	c #F6F6F6",
+"M$	c #EAE8DC",
+"N$	c #D4D3C9",
+"O$	c #B3B0AF",
+"P$	c #858482",
+"Q$	c #5F605B",
+"R$	c #4F5249",
+"S$	c #676F67",
+"T$	c #73735D",
+"U$	c #65634D",
+"V$	c #6E726E",
+"W$	c #67685E",
+"X$	c #404235",
+"Y$	c #5A5D3F",
+"Z$	c #777973",
+"`$	c #626662",
+" %	c #646241",
+".%	c #645C60",
+"+%	c #C3C8C0",
+"@%	c #D1D0C8",
+"#%	c #F4F2EF",
+"$%	c #A6A6A6",
+"%%	c #505050",
+"&%	c #F2F2F2",
+"*%	c #F8F8EB",
+"=%	c #C9C9BE",
+"-%	c #EAE9DC",
+";%	c #D0CFC4",
+">%	c #A8A5A4",
+",%	c #7F7E7B",
+"'%	c #777972",
+")%	c #6D7167",
+"!%	c #6F786C",
+"~%	c #6F6F59",
+"{%	c #63604D",
+"]%	c #727572",
+"^%	c #66665C",
+"/%	c #3E3F38",
+"(%	c #5C5F46",
+"_%	c #60615E",
+":%	c #424543",
+"<%	c #545233",
+"[%	c #3F383B",
+"}%	c #7E837A",
+"|%	c #C9C7BF",
+"1%	c #F5F4F1",
+"2%	c #C8C8C8",
+"3%	c #9F9F9F",
+"4%	c #D8D8CC",
+"5%	c #61615C",
+"6%	c #ECEBDF",
+"7%	c #CFCEC3",
+"8%	c #B9B7B6",
+"9%	c #B0AFAC",
+"0%	c #82857C",
+"a%	c #6C7164",
+"b%	c #636C5E",
+"c%	c #74745F",
+"d%	c #6E6B5B",
+"e%	c #6E716E",
+"f%	c #5A5B53",
+"g%	c #333431",
+"h%	c #454532",
+"i%	c #3B3C3B",
+"j%	c #636666",
+"k%	c #9A967A",
+"l%	c #FCF8F8",
+"m%	c #E2E0D8",
+"n%	c #F2F1EE",
+"o%	c #CDCECC",
+"p%	c #A0A29D",
+"q%	c #E3E3D7",
+"r%	c #82827B",
+"s%	c #ECEBDE",
+"t%	c #D1D0C6",
+"u%	c #9B989B",
+"v%	c #797974",
+"w%	c #6F7561",
+"x%	c #4B5241",
+"y%	c #5B6259",
+"z%	c #736F67",
+"A%	c #605A4D",
+"B%	c #3B3B38",
+"C%	c #212124",
+"D%	c #545352",
+"E%	c #7E7B69",
+"F%	c #CDCCCB",
+"G%	c #FDFEFE",
+"H%	c #E2DCC1",
+"I%	c #FDFCFB",
+"J%	c #F9FAF5",
+"K%	c #DEDCD4",
+"L%	c #F1F1ED",
+"M%	c #CCCCCE",
+"N%	c #9F9EA5",
+"O%	c #FCFBFC",
+"P%	c #EBEBDF",
+"Q%	c #86857B",
+"R%	c #6D6E70",
+"S%	c #4C4B4B",
+"T%	c #464643",
+"U%	c #3C3E36",
+"V%	c #31322C",
+"W%	c #2F3432",
+"X%	c #3E3933",
+"Y%	c #433E2F",
+"Z%	c #585852",
+"`%	c #C2C2C4",
+" &	c #EFEFEA",
+".&	c #B5B19E",
+"+&	c #DCD5BC",
+"@&	c #FBFAF9",
+"#&	c #FBFBF6",
+"$&	c #F1EEEA",
+"%&	c #F9F9F7",
+"&&	c #CBCDCB",
+"*&	c #9DA195",
+"=&	c #FCFDF4",
+"-&	c #F0EFE2",
+";&	c #CCCAC0",
+">&	c #FBFBFA",
+",&	c #E3E2DD",
+"'&	c #BEBBB2",
+")&	c #D0D3D0",
+"!&	c #C2BDB8",
+"~&	c #B7B3A0",
+"{&	c #E9EBE1",
+"]&	c #BBB7A3",
+"^&	c #DDD7BE",
+"/&	c #FBFAFA",
+"(&	c #FCFEF5",
+"_&	c #FFFCFF",
+":&	c #FEFFFE",
+"<&	c #FBFFFB",
+"[&	c #C9CBCC",
+"}&	c #A79D9C",
+"|&	c #FCF9F2",
+"1&	c #F2F0E8",
+"2&	c #CBCAB8",
+"3&	c #F2F2EB",
+"4&	c #DBDBCD",
+"5&	c #FFFBF5",
+"6&	c #C0BCA7",
+"7&	c #FEFDFD",
+"8&	c #BABBA5",
+"9&	c #FCFAF0",
+"0&	c #FEFEFB",
+"a&	c #FFFDFF",
+"b&	c #FAF5EB",
+"c&	c #CFBC7F",
+"d&	c #BAA030",
+"e&	c #A8964F",
+"f&	c #FDFBF4",
+"g&	c #FEFFF6",
+"h&	c #F4F2EC",
+"i&	c #CBCAB3",
+"j&	c #FFFEFE",
+"k&	c #F7F8F3",
+"l&	c #ECEDE4",
+"m&	c #FDFFFD",
+"n&	c #FBF8F1",
+"o&	c #C0BBA7",
+"p&	c #FFFFFD",
+"q&	c #C6C9B9",
+"r&	c #FEFEFF",
+"s&	c #FEFDFC",
+"t&	c #CEC6A1",
+"u&	c #816B28",
+"v&	c #735C1C",
+"w&	c #91825E",
+"x&	c #F0ECE8",
+"y&	c #F5F2EC",
+"z&	c #C7C6AF",
+"A&	c #FCFEFD",
+"B&	c #C0BAA7",
+"C&	c #F6F6F3",
+"D&	c #EAE9E3",
+"E&	c #CECCC7",
+"F&	c #C9CAC5",
+"G&	c #EDEFE9",
+"H&	c #F8F7F4",
+"I&	c #D9D9CD",
+"J&	c #FCFEFC",
+"K&	c #FCF8F3",
+"L&	c #C0BAA8",
+"M&	c #FFFDFE",
+"N&	c #FDFCFD",
+"  . + + + + + + + + . @ @ . . @ # . @ . . $ . . . @ . . $ + + ",
+"% & * = - ; > , ' ) ! ~ { & ] ^ / / & ] ] + ( _ ( : + ] + + < ",
+"[ } | 1 2 3 4 5 6 7 8 9 0 a a b c d e f g h i j k l m b ( & n ",
+"o p q r s t u v w x y z A B C D a a E F G H I J K L M N O P Q ",
+"R S T U V W X Y Z `  ...+. at .#.$.%.&.*.F =.-.;.>.,.'.).!.~.{.].",
+"^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.F c.d.e.f.g.h.% . i.",
+"j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.a a E.F.G.H.a I.J.K.",
+"L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++ at +#+a a a $+%+&+b { *+=+",
+"-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+G 3+4+5+6+7+=.{ . + ",
+"8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+a ( + y+",
+"z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+{  @.@",
+"+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1 at a 2 at 3@",
+"4 at 5@a 6 at 7@8 at 9@0 at a@b at c@d at e@f at g@h at i@j at k@l at m@n at o@a h.p at q@r at s@+ t@",
+"u at v@a w at x@y at z@A at B@C at D@E at F@G at H@I at J@K at L@M at N@O at a a P at Q@R at S@T at + $ ",
+"U at V@a W at X@Y at Z@`@ #.#+#@###$#%#&#*#=#g -#;#a G a >#q@,#a { $ + ",
+"'#V at a )#!#~#{#]#^#/#(#_#:#<#[#}#|#1#2#3#4#a G 5#6#7#8#a ( . + ",
+"9#0#a a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#a a s#t#u#v#a ( . + ",
+"w#x#a y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#a a Q#R#S#T#a { . + ",
+"U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$a G a '$R#,#)$I.. + ",
+"!$~${$]$^$/$($*$_$:$<$[$}$|$1$2$3$4$5$6$7$a G a 8$n@,#=.{ $ + ",
+"9$0$a a$b$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$,$a G a q$r$G =.{ . + ",
+"s$t$a u$v$w$x$y$z$A$B$C$D$E$, at F$G$H$I$J$,$a G a Q at K$L$=.{ + i.",
+"M$N$a O$P$Q$R$S$T$U$V$W$X$Y$Z$`$ %.%+%@%#%a G a $%%%&%=.{ *%=%",
+"-%;%a >%,%'%)%!%~%{%]%^%/%(%_%:%<%[%}%|%1%a G a 2%3%,#=.  4%5%",
+"6%7%a 8%9%0%a%b%c%d%e%f%g%h%i%j%k%l%b m%n%a G a o%p%d =.~ q%r%",
+"s%t%a u%v%w%x%y%z%A%B%C%D%E%F%G%H%I%J%K%L%a G a M%N%O%=.{ y+P%",
+"s%Q%R%S%T%U%V%W%X%Y%Z%`% &.&a a +&@&#&$&%&a G a &&*&=&=.{ . + ",
+"-&;&a G >&,&'&)&!&~&{&a 2#]&a a ^&/&(&_&E :&G <&[&}&|&)$I.. + ",
+"1&2&a =.a 3&4&a 5&6&a 7&O 8&b a 9&=.0&a&b E G b&c&d&e&f&g&. + ",
+"h&i&a j&G k&l&m&n&o&a a p&q&b r&b a a :&E a s&t&u&v&w&x&~ . + ",
+"y&z&a j&r&b 2#A&n&B&a a b C&b a b b a a a a G D&E&F&G&E I.. + ",
+"H&I&b j&a a 2#J&K&L&a a r&a r&b a a a a a a G ,#,#M&N&=.< $ + "};
diff --git a/src/MarsCatalog/Makefile.am b/src/MarsCatalog/Makefile.am
new file mode 100644
index 0000000..049e67d
--- /dev/null
+++ b/src/MarsCatalog/Makefile.am
@@ -0,0 +1,69 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+bin_PROGRAMS = bin/MarsCatalog
+
+bin_MarsCatalog_SOURCES  = MvMain.cc \
+	MvQMarsBrowser.cc \
+	MvQMarsCatalog.cc \
+	json_spirit_reader.cpp \
+	json_spirit_value.cpp \
+	json_spirit_writer.cpp \
+	json_spirit.h \
+	MvQMarsBrowser.h \
+	MvQMarsCatalog.h \
+	json_spirit_reader.h \
+	json_spirit_value.h \
+	json_spirit_writer.h \
+	mars.qrc
+	   
+nodist_bin_MarsCatalog_SOURCES =  MvQMarsBrowser.moc.cpp MvQMarsCatalog.moc.cpp mars.qrc.cpp
+
+bin_MarsCatalog_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_MarsCatalog_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_MarsCatalog_LDADD    = $(LDADD)  -lMvQtGui -lMvQtUtil  $(STANDARD_METVIEW_LIBS) $(QT_LIBS)
+bin_MarsCatalog_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.MarsCatalog
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: % 
+	${INSTALL} $<  $(local_sharedir)
+
+icons = $(local_iconsdir)/MARS_CATALOG.xpm
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+#Copy the webmars python interface to bin
+webmars: 
+	cp -RfH WebMars  bin
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin $(icons) webmars MvQMarsBrowser.moc.cpp MvQMarsCatalog.moc.cpp mars.qrc.cpp
+
+EXTRA_DIST = MARS_CATALOG.xpm ObjectSpec.MarsCatalog mars.qrc
+
+
+# Internally at ECMWF, WebMars is a relative link to an external directory,
+# and this does not work when put into the tarball. Therefore, we perform
+# a more 'manual' copying of this directory into the tarball. The 'dist-hook'
+# target is executed after the 'dist' target.
+# HOWEVER: we don't want to distribute this yet, so we comment it out...
+#dist-hook:
+#	cp -L -r WebMars/ $(distdir)/
+
+
+bin:
+	ln -s ../../bin bin
+
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp
diff --git a/src/MarsCatalog/Makefile.in b/src/MarsCatalog/Makefile.in
new file mode 100644
index 0000000..edaccd8
--- /dev/null
+++ b/src/MarsCatalog/Makefile.in
@@ -0,0 +1,1035 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/MarsCatalog$(EXEEXT)
+subdir = src/MarsCatalog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_MarsCatalog_OBJECTS = bin_MarsCatalog-MvMain.$(OBJEXT) \
+	bin_MarsCatalog-MvQMarsBrowser.$(OBJEXT) \
+	bin_MarsCatalog-MvQMarsCatalog.$(OBJEXT) \
+	bin_MarsCatalog-json_spirit_reader.$(OBJEXT) \
+	bin_MarsCatalog-json_spirit_value.$(OBJEXT) \
+	bin_MarsCatalog-json_spirit_writer.$(OBJEXT)
+nodist_bin_MarsCatalog_OBJECTS =  \
+	bin_MarsCatalog-MvQMarsBrowser.moc.$(OBJEXT) \
+	bin_MarsCatalog-MvQMarsCatalog.moc.$(OBJEXT) \
+	bin_MarsCatalog-mars.qrc.$(OBJEXT)
+bin_MarsCatalog_OBJECTS = $(am_bin_MarsCatalog_OBJECTS) \
+	$(nodist_bin_MarsCatalog_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_MarsCatalog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_MarsCatalog_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_MarsCatalog_SOURCES) $(nodist_bin_MarsCatalog_SOURCES)
+DIST_SOURCES = $(bin_MarsCatalog_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_MarsCatalog_SOURCES = MvMain.cc \
+	MvQMarsBrowser.cc \
+	MvQMarsCatalog.cc \
+	json_spirit_reader.cpp \
+	json_spirit_value.cpp \
+	json_spirit_writer.cpp \
+	json_spirit.h \
+	MvQMarsBrowser.h \
+	MvQMarsCatalog.h \
+	json_spirit_reader.h \
+	json_spirit_value.h \
+	json_spirit_writer.h \
+	mars.qrc
+
+nodist_bin_MarsCatalog_SOURCES = MvQMarsBrowser.moc.cpp MvQMarsCatalog.moc.cpp mars.qrc.cpp
+bin_MarsCatalog_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_MarsCatalog_LDFLAGS = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_MarsCatalog_LDADD = $(LDADD)  -lMvQtGui -lMvQtUtil  $(STANDARD_METVIEW_LIBS) $(QT_LIBS)
+bin_MarsCatalog_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.MarsCatalog
+icons = $(local_iconsdir)/MARS_CATALOG.xpm
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin $(icons) webmars MvQMarsBrowser.moc.cpp MvQMarsCatalog.moc.cpp mars.qrc.cpp
+EXTRA_DIST = MARS_CATALOG.xpm ObjectSpec.MarsCatalog mars.qrc
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/MarsCatalog/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/MarsCatalog/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/MarsCatalog$(EXEEXT): $(bin_MarsCatalog_OBJECTS) $(bin_MarsCatalog_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/MarsCatalog$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_MarsCatalog_LINK) $(bin_MarsCatalog_OBJECTS) $(bin_MarsCatalog_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-json_spirit_value.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MarsCatalog-mars.qrc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_MarsCatalog-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvMain.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvMain.Tpo -c -o bin_MarsCatalog-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvMain.Tpo $(DEPDIR)/bin_MarsCatalog-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_MarsCatalog-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_MarsCatalog-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvMain.Tpo -c -o bin_MarsCatalog-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvMain.Tpo $(DEPDIR)/bin_MarsCatalog-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_MarsCatalog-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_MarsCatalog-MvQMarsBrowser.o: MvQMarsBrowser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsBrowser.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Tpo -c -o bin_MarsCatalog-MvQMarsBrowser.o `test -f 'MvQMarsBrowser.cc' || echo '$(srcdir)/'`MvQMarsBrowser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsBrowser.cc' object='bin_MarsCatalog-MvQMarsBrowser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsBrowser.o `test -f 'MvQMarsBrowser.cc' || echo '$(srcdir)/'`MvQMarsBrowser.cc
+
+bin_MarsCatalog-MvQMarsBrowser.obj: MvQMarsBrowser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsBrowser.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Tpo -c -o bin_MarsCatalog-MvQMarsBrowser.obj `if test -f 'MvQMarsBrowser.cc'; then $(CYGPATH_W) 'MvQMarsBrowser.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMarsBrowser.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsBrowser.cc' object='bin_MarsCatalog-MvQMarsBrowser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsBrowser.obj `if test -f 'MvQMarsBrowser.cc'; then $(CYGPATH_W) 'MvQMarsBrowser.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMarsBrowser.cc'; fi`
+
+bin_MarsCatalog-MvQMarsCatalog.o: MvQMarsCatalog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsCatalog.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Tpo -c -o bin_MarsCatalog-MvQMarsCatalog.o `test -f 'MvQMarsCatalog.cc' || echo '$(srcdir)/'`MvQMarsCatalog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsCatalog.cc' object='bin_MarsCatalog-MvQMarsCatalog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsCatalog.o `test -f 'MvQMarsCatalog.cc' || echo '$(srcdir)/'`MvQMarsCatalog.cc
+
+bin_MarsCatalog-MvQMarsCatalog.obj: MvQMarsCatalog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsCatalog.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Tpo -c -o bin_MarsCatalog-MvQMarsCatalog.obj `if test -f 'MvQMarsCatalog.cc'; then $(CYGPATH_W) 'MvQMarsCatalog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMarsCatalog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsCatalog.cc' object='bin_MarsCatalog-MvQMarsCatalog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsCatalog.obj `if test -f 'MvQMarsCatalog.cc'; then $(CYGPATH_W) 'MvQMarsCatalog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMarsCatalog.cc'; fi`
+
+bin_MarsCatalog-json_spirit_reader.o: json_spirit_reader.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-json_spirit_reader.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Tpo -c -o bin_MarsCatalog-json_spirit_reader.o `test -f 'json_spirit_reader.cpp' || echo '$(srcdir)/'`json_spirit_reader.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Tpo $(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='json_spirit_reader.cpp' object='bin_MarsCatalog-json_spirit_reader.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-json_spirit_reader.o `test -f 'json_spirit_reader.cpp' || echo '$(srcdir)/'`json_spirit_reader.cpp
+
+bin_MarsCatalog-json_spirit_reader.obj: json_spirit_reader.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-json_spirit_reader.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Tpo -c -o bin_MarsCatalog-json_spirit_reader.obj `if test -f 'json_spirit_reader.cpp'; then $(CYGPATH_W) 'json_spirit_reader.cpp'; else $(CYGPATH_W) '$(srcdir)/json_spirit_reader.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Tpo $(DEPDIR)/bin_MarsCatalog-json_spirit_reader.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='json_spirit_reader.cpp' object='bin_MarsCatalog-json_spirit_reader.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-json_spirit_reader.obj `if test -f 'json_spirit_reader.cpp'; then $(CYGPATH_W) 'json_spirit_reader.cpp'; else $(CYGPATH_W) '$(srcdir)/json_spirit_reader.cpp'; fi`
+
+bin_MarsCatalog-json_spirit_value.o: json_spirit_value.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-json_spirit_value.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-json_spirit_value.Tpo -c -o bin_MarsCatalog-json_spirit_value.o `test -f 'json_spirit_value.cpp' || echo '$(srcdir)/'`json_spirit_value.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-json_spirit_value.Tpo $(DEPDIR)/bin_MarsCatalog-json_spirit_value.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='json_spirit_value.cpp' object='bin_MarsCatalog-json_spirit_value.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-json_spirit_value.o `test -f 'json_spirit_value.cpp' || echo '$(srcdir)/'`json_spirit_value.cpp
+
+bin_MarsCatalog-json_spirit_value.obj: json_spirit_value.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-json_spirit_value.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-json_spirit_value.Tpo -c -o bin_MarsCatalog-json_spirit_value.obj `if test -f 'json_spirit_value.cpp'; then $(CYGPATH_W) 'json_spirit_value.cpp'; else $(CYGPATH_W) '$(srcdir)/json_spirit_value.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-json_spirit_value.Tpo $(DEPDIR)/bin_MarsCatalog-json_spirit_value.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='json_spirit_value.cpp' object='bin_MarsCatalog-json_spirit_value.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-json_spirit_value.obj `if test -f 'json_spirit_value.cpp'; then $(CYGPATH_W) 'json_spirit_value.cpp'; else $(CYGPATH_W) '$(srcdir)/json_spirit_value.cpp'; fi`
+
+bin_MarsCatalog-json_spirit_writer.o: json_spirit_writer.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-json_spirit_writer.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Tpo -c -o bin_MarsCatalog-json_spirit_writer.o `test -f 'json_spirit_writer.cpp' || echo '$(srcdir)/'`json_spirit_writer.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Tpo $(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='json_spirit_writer.cpp' object='bin_MarsCatalog-json_spirit_writer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-json_spirit_writer.o `test -f 'json_spirit_writer.cpp' || echo '$(srcdir)/'`json_spirit_writer.cpp
+
+bin_MarsCatalog-json_spirit_writer.obj: json_spirit_writer.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-json_spirit_writer.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Tpo -c -o bin_MarsCatalog-json_spirit_writer.obj `if test -f 'json_spirit_writer.cpp'; then $(CYGPATH_W) 'json_spirit_writer.cpp'; else $(CYGPATH_W) '$(srcdir)/json_spirit_writer.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Tpo $(DEPDIR)/bin_MarsCatalog-json_spirit_writer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='json_spirit_writer.cpp' object='bin_MarsCatalog-json_spirit_writer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-json_spirit_writer.obj `if test -f 'json_spirit_writer.cpp'; then $(CYGPATH_W) 'json_spirit_writer.cpp'; else $(CYGPATH_W) '$(srcdir)/json_spirit_writer.cpp'; fi`
+
+bin_MarsCatalog-MvQMarsBrowser.moc.o: MvQMarsBrowser.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsBrowser.moc.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Tpo -c -o bin_MarsCatalog-MvQMarsBrowser.moc.o `test -f 'MvQMarsBrowser.moc.cpp' || echo '$(srcdir)/'`MvQMarsBrowser.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsBrowser.moc.cpp' object='bin_MarsCatalog-MvQMarsBrowser.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsBrowser.moc.o `test -f 'MvQMarsBrowser.moc.cpp' || echo '$(srcdir)/'`MvQMarsBrowser.moc.cpp
+
+bin_MarsCatalog-MvQMarsBrowser.moc.obj: MvQMarsBrowser.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsBrowser.moc.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Tpo -c -o bin_MarsCatalog-MvQMarsBrowser.moc.obj `if test -f 'MvQMarsBrowser.moc.cpp'; then $(CYGPATH_W) 'MvQMarsBrowser.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMarsBrowser.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsBrowser.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsBrowser.moc.cpp' object='bin_MarsCatalog-MvQMarsBrowser.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsBrowser.moc.obj `if test -f 'MvQMarsBrowser.moc.cpp'; then $(CYGPATH_W) 'MvQMarsBrowser.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMarsBrowser.moc.cpp'; fi`
+
+bin_MarsCatalog-MvQMarsCatalog.moc.o: MvQMarsCatalog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsCatalog.moc.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Tpo -c -o bin_MarsCatalog-MvQMarsCatalog.moc.o `test -f 'MvQMarsCatalog.moc.cpp' || echo '$(srcdir)/'`MvQMarsCatalog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsCatalog.moc.cpp' object='bin_MarsCatalog-MvQMarsCatalog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsCatalog.moc.o `test -f 'MvQMarsCatalog.moc.cpp' || echo '$(srcdir)/'`MvQMarsCatalog.moc.cpp
+
+bin_MarsCatalog-MvQMarsCatalog.moc.obj: MvQMarsCatalog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-MvQMarsCatalog.moc.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Tpo -c -o bin_MarsCatalog-MvQMarsCatalog.moc.obj `if test -f 'MvQMarsCatalog.moc.cpp'; then $(CYGPATH_W) 'MvQMarsCatalog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMarsCatalog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Tpo $(DEPDIR)/bin_MarsCatalog-MvQMarsCatalog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMarsCatalog.moc.cpp' object='bin_MarsCatalog-MvQMarsCatalog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-MvQMarsCatalog.moc.obj `if test -f 'MvQMarsCatalog.moc.cpp'; then $(CYGPATH_W) 'MvQMarsCatalog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMarsCatalog.moc.cpp'; fi`
+
+bin_MarsCatalog-mars.qrc.o: mars.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-mars.qrc.o -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-mars.qrc.Tpo -c -o bin_MarsCatalog-mars.qrc.o `test -f 'mars.qrc.cpp' || echo '$(srcdir)/'`mars.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-mars.qrc.Tpo $(DEPDIR)/bin_MarsCatalog-mars.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mars.qrc.cpp' object='bin_MarsCatalog-mars.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-mars.qrc.o `test -f 'mars.qrc.cpp' || echo '$(srcdir)/'`mars.qrc.cpp
+
+bin_MarsCatalog-mars.qrc.obj: mars.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MarsCatalog-mars.qrc.obj -MD -MP -MF $(DEPDIR)/bin_MarsCatalog-mars.qrc.Tpo -c -o bin_MarsCatalog-mars.qrc.obj `if test -f 'mars.qrc.cpp'; then $(CYGPATH_W) 'mars.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/mars.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MarsCatalog-mars.qrc.Tpo $(DEPDIR)/bin_MarsCatalog-mars.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='mars.qrc.cpp' object='bin_MarsCatalog-mars.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MarsCatalog_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MarsCatalog-mars.qrc.obj `if test -f 'mars.qrc.cpp'; then $(CYGPATH_W) 'mars.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/mars.qrc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: % 
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+#Copy the webmars python interface to bin
+webmars: 
+	cp -RfH WebMars  bin
+
+# Internally at ECMWF, WebMars is a relative link to an external directory,
+# and this does not work when put into the tarball. Therefore, we perform
+# a more 'manual' copying of this directory into the tarball. The 'dist-hook'
+# target is executed after the 'dist' target.
+# HOWEVER: we don't want to distribute this yet, so we comment it out...
+#dist-hook:
+#	cp -L -r WebMars/ $(distdir)/
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/MarsCatalog/MvMain.cc b/src/MarsCatalog/MvMain.cc
new file mode 100644
index 0000000..eb8fe5a
--- /dev/null
+++ b/src/MarsCatalog/MvMain.cc
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+
+#include <iostream>
+#include "Metview.h"
+
+#include "MvQMarsBrowser.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvService
+{
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class MvMarsCatalog : public Base
+{
+public:
+	MvMarsCatalog(char* a) : Base(a) {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvMarsCatalog::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------MvMarsCatalog::serve()--------------" << endl;
+  	in.print();
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(keyDialog);
+	Q_INIT_RESOURCE(window);
+
+	MvQMarsBrowser *browser = new MvQMarsBrowser;
+	//browser->init();
+	
+   	browser->show();
+		
+	//Create the bufr key manager and initialize it
+	/*MvQKeyManager *manager = new MvQKeyManager(MvQKeyManager::BufrType);
+	manager->loadProfiles();
+
+	//Create the bufr metadata object and initialize it
+	BufrMetaData *bufr = new BufrMetaData;
+	bufr->setFileName(fbufr);
+
+	//Create the bufr browser and initialize it
+	BufrExaminer *browser = new BufrExaminer;
+	browser->init(bufr,manager);
+
+   	browser->show();
+
+	// Send reply to MetviewUI (but not to MvExamineManager)
+	// To turn icon to green; otherwise, it will stay orange
+	if( strcmp( getenv("METVIEW_MODE"), "examine" ) != 0 )
+	{
+	    MvRequest req;
+	    sendReply(req);
+	}*/
+
+	//Enter the app loop
+ 	app.exec();
+}
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+  	av = argv;
+
+	MvApplication theApp( argc, argv,"marscatalog");
+
+    	MvMarsCatalog mc("MARSCATALOG");
+	
+    	theApp.run();
+}
diff --git a/src/MarsCatalog/MvQMarsBrowser.cc b/src/MarsCatalog/MvQMarsBrowser.cc
new file mode 100644
index 0000000..4e5b238
--- /dev/null
+++ b/src/MarsCatalog/MvQMarsBrowser.cc
@@ -0,0 +1,590 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QComboBox>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QInputDialog>
+#include <QLabel>
+#include <QListWidget>
+#include <QPlainTextEdit>
+#include <QProgressBar>
+#include <QPushButton>
+#include <QSettings>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QTabWidget>
+#include <QTreeWidget>
+#include <QVBoxLayout>
+
+#include "MvQMarsBrowser.h"
+
+#include "LogHandler.h"
+#include "MvQAbout.h"
+#include "MvQLogBrowser.h"
+#include "MvQMarsCatalog.h"
+
+MvQMarsBrowser::MvQMarsBrowser(QWidget *parent) : MvQMainWindow(parent)
+{
+	data_ = new MvQMarsCatalogData;
+	catalog_= new MvQMarsCatalog;
+	
+	setAttribute(Qt::WA_DeleteOnClose);	
+
+	setWindowTitle(tr("Metview - MARS Catalog Browser"));
+
+	//Initial size
+	setInitialSize(800,600);
+
+	//----------------------
+	// Main splitter
+	//----------------------
+
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+
+        mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+
+	//-----------------------------------------------------
+	// Tabs (the upper part of mainSplitter)
+	//-----------------------------------------------------
+
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	
+	QWidget *w=new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+		
+ 	mainTab_ = new QTabWidget;	
+  	mainLayout->addWidget(mainTab_);
+
+	//-----------------------------------------------------
+	// Tab: navigate 
+	//----------------------------------------------------- 	
+
+	/*QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	
+	QWidget *w=new QWidget;
+	w->setLayout(mainLayout);
+	mainTab_->addTab(w,tr("Navigate"));*/
+
+	w=new QWidget;
+	QVBoxLayout *navLayout=new QVBoxLayout;
+	w->setLayout(navLayout);
+	mainTab_->addTab(w,tr("Navigate"));
+	
+	centralSplitter_ = new QSplitter(this); 
+	centralSplitter_->setOpaqueResize(false);	
+	navLayout->addWidget(centralSplitter_);
+	//mainLayout->addWidget(centralSplitter_);
+	
+	nodeTree_=new QTreeWidget;
+	nodeTree_->setColumnCount(2);
+	nodeTree_->setRootIsDecorated(false);
+	nodeTree_->setUniformRowHeights(true);
+	nodeTree_->setProperty("mvStyle",0);
+	nodeTree_->setAlternatingRowColors(true);
+	
+	centralSplitter_->addWidget(nodeTree_);
+	QStringList headers;
+	headers << tr("Parameter") << tr("Selection");
+	nodeTree_->setHeaderLabels(headers);
+		
+	itemList_ = new QListWidget;
+	itemList_->setUniformItemSizes(true);
+	itemList_->setProperty("mvStyle",1);
+	itemList_->setAlternatingRowColors(true);
+	centralSplitter_->addWidget(itemList_);
+	
+	//axis
+	axisLayout_ = new QHBoxLayout;
+	navLayout->addLayout(axisLayout_);
+	
+	//-----------------------------------------------------
+	// Tab: Request
+	//----------------------------------------------------- 	
+
+	requestTe_= new QPlainTextEdit;
+	requestTe_->setLineWrapMode(QPlainTextEdit::NoWrap);
+	mainTab_->addTab(requestTe_,tr("Request"));
+	
+	macroTe_= new QPlainTextEdit;
+	macroTe_->setLineWrapMode(QPlainTextEdit::NoWrap);
+	mainTab_->addTab(macroTe_,tr("Macro"));
+
+	//-------------------------------------------------------
+	// Push buttons
+	//-------------------------------------------------------
+
+	/*QHBoxLayout *pbLayout=new QHBoxLayout;
+	mainLayout->addLayout(pbLayout);
+	
+	QPushButton *pb=new QPushButton(tr("Create MARS Retrieval icon"),this);
+	mainLayout->addWidget(pb);*/
+	
+	//--------------------------
+	// Log Area
+	//--------------------------
+
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	
+	logPanel_=new QWidget;
+	logPanel_->setMinimumHeight(110);
+	logPanel_->setLayout(logLayout);
+
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);	
+	
+	//Label
+	QLabel *label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	hb->addWidget(label,1);
+	
+	//Clear button
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+	
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	connect(clearPb,SIGNAL(clicked(bool)),
+		this,SLOT(slotClearLog(bool)));
+		
+	mainSplitter_->addWidget(logPanel_);
+	mainSplitter_->setCollapsible(1,false);
+
+	//-------------------
+	// Statusbar
+	//-------------------
+
+	loadProgress_=new QProgressBar;
+	loadProgress_->setRange(0,0);
+	statusBar()->addPermanentWidget(loadProgress_);
+	loadProgress_->hide();
+	
+ 	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when 	
+	
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+		
+	connect(catalog_,SIGNAL(fetchFinished(QString,bool)),
+		this,SLOT(slotFetchFinished(QString,bool)));
+		
+	//connect(nodeTree_,SIGNAL(itemClicked(QTreeWidgetItem*,int)),
+	//	this,SLOT(slotNodeSelected(QTreeWidgetItem*,int)));
+	
+	connect(nodeTree_,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
+		this,SLOT(slotNodeSelected(QTreeWidgetItem*,QTreeWidgetItem*)));
+
+	connect(itemList_,SIGNAL(itemClicked(QListWidgetItem *)),
+		this,SLOT(slotValueSelected(QListWidgetItem *)));
+
+	connect(catalog_,SIGNAL(statusMessage(QString)),
+		statusMessageLabel_,SLOT(setText(QString)));
+
+	connect(catalog_,SIGNAL(logUpdated()),
+		this,SLOT(slotUpdateLogOutput()));	
+		
+	setupViewActions();
+	setupControlsActions();
+	setupHelpActions();
+	
+	setupMenus(menuItems_);
+	
+	//Initialise
+	init();
+	
+	readSettings();
+} 
+
+MvQMarsBrowser::~MvQMarsBrowser()
+{
+  	writeSettings();
+}
+
+
+void MvQMarsBrowser::setupViewActions()
+{	
+  	actionLog_=createAction(MvQMainWindow::LogAction,this);
+		
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+		
+	logPanel_->hide();
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));	
+}
+
+void MvQMarsBrowser::setupControlsActions()
+{
+	//Combo box
+	//We will add items + signal/slots later in "init"!
+	QHBoxLayout *hb=new  QHBoxLayout;
+
+	//Combo box for database
+	QLabel *dbLabel = new QLabel(tr("Database:"));
+	dbCombo_ = new QComboBox;
+	dbLabel->setBuddy(dbCombo_);
+
+	hb->addWidget(dbLabel);
+	hb->addWidget(dbCombo_);
+	QWidget* wh=new QWidget;
+	wh->setLayout(hb);
+
+	//Create retrieval icon
+	QAction *iconAction = new QAction(this);
+	iconAction->setObjectName(QString::fromUtf8("actionCreate")); 
+    	iconAction->setIcon(QIcon(QPixmap(QString::fromUtf8(":/mars/create_mars.svg"))));
+	
+	iconAction->setText("&Create icon");
+	iconAction->setToolTip(tr("Create MARS Rertieval icon"));
+
+	connect(iconAction, SIGNAL(triggered()), 
+		this, SLOT(slotCreateMarsIcon()));
+		
+	//MvQMenuItem::MenuTarget
+	MvQMainWindow::MenuType menuType=MvQMainWindow::SettingsMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(wh));
+	menuItems_[menuType].push_back(new MvQMenuItem(iconAction));
+}
+
+void MvQMarsBrowser::setupHelpActions()
+{			
+	QAction *action;
+	
+	action=createAction(MvQMainWindow::AboutAction,this);
+	action->setText(tr("About MARS Catalog Browser"));
+	connect(action, SIGNAL(triggered()), 
+		this, SLOT(slotShowAboutBox()));	
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(action,MvQMenuItem::MenuTarget));	
+}
+
+void MvQMarsBrowser::init()
+{
+  	//Init db combo
+   	//int currentIndex=0;
+	dbCombo_->addItem("ERA");
+	
+	//keyCombo_->setCurrentIndex(-1);
+	
+	//connect(keyCombo_, SIGNAL(currentIndexChanged(int)),  
+	//	this,SLOT(slotLoadKeyProfile(int))); 
+	
+	//Fetch data
+	fetch();
+}  
+
+void MvQMarsBrowser::reset()
+{
+	data_->clear();
+	data_->init();
+	updateUi();
+}
+
+void MvQMarsBrowser::updateUi()
+{
+  	nodeTree_->clear();
+ 	itemList_->clear();
+	
+	QTreeWidgetItem *currentItem=0;	
+  	QList<QTreeWidgetItem *> items;
+	foreach(MvQMarsCatalogNode* node, data_->data())
+	{
+		//qDebug() << "node" <<  node->name();
+		QTreeWidgetItem *item=new QTreeWidgetItem;
+		item->setData(0,Qt::DisplayRole,node->name());
+		item->setData(1,Qt::DisplayRole,node->selection());
+		items << item;
+	
+		if(node->isAxis())
+		{  
+			item->setData(0,Qt::ForegroundRole,Qt::red);
+			item->setData(1,Qt::ForegroundRole,Qt::red);
+			
+			createAxisWidget(node);
+		}		
+		currentItem=item;
+	}
+		
+	nodeTree_->insertTopLevelItems(0,items); 
+	nodeTree_->setCurrentItem(currentItem,0);
+	
+	requestTe_->setPlainText(data_->catalogPathToRequest());
+	macroTe_->setPlainText(data_->catalogPathToMacro());
+	
+	
+	
+}
+
+void MvQMarsBrowser::fetchStarted()
+{
+	loadProgress_->setRange(0,0);
+	loadProgress_->show();
+}
+
+void MvQMarsBrowser::fetchFinished()
+{
+	loadProgress_->hide();
+	loadProgress_->setRange(0,1);
+	loadProgress_->setValue(1);
+}
+
+void MvQMarsBrowser::fetch()
+{
+  	//fetchStarted();
+	catalog_->fetch(data_);  
+}  
+  
+void MvQMarsBrowser::slotFetchFinished(QString str,bool status)
+{
+ 	//fetchFinished();
+
+	if(!status)
+	{  
+		reset();
+		return;
+	}	
+	
+	data_->update(str);
+	updateUi();	
+	
+	
+	
+	QTreeWidgetItem* nodeItem=nodeTree_->currentItem();	
+	if(!nodeItem)
+	  	return;
+ 
+	QString nodeName=nodeItem->data(0,Qt::DisplayRole).toString();  
+	MvQMarsCatalogNode* node=data_->node(nodeName);
+	
+	if(node->isAxis() == false && 
+	   itemList_->count() == 1)
+	{
+		slotValueSelected(itemList_->item(0));	
+	}
+	
+}  
+
+//"{"class" : "mc","expver" : "0099","stream" : "oper","type" : "ef","year" : "2010","month" : "jul","levtype" : "sfc"}" 
+
+void MvQMarsBrowser::slotNodeSelected(QTreeWidgetItem* item,int /*column*/)
+{
+	if(!item) return;
+  
+  	QString name=item->data(0,Qt::DisplayRole).toString();  
+  	MvQMarsCatalogNode* node=data_->node(name);
+	if(node)
+	{
+		/*if(data_->data().count() == 1 &&
+		  node->name() == "class" && 
+		  node->items().count() == 0)
+		{
+		  	fetch();
+			return;
+		}*/
+		
+		itemList_->clear();
+		itemList_->insertItems(0,node->items());
+		if(node->isAxis())
+		{
+		  	QStringList lst=node->selection().split("/");
+		  	for(int i=0; i < itemList_->count(); i++)
+			{
+			  	QListWidgetItem *item=itemList_->item(i);
+				item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsSelectable |Qt::ItemIsEnabled);
+				if(lst.indexOf(item->text()) != -1)
+				{  
+					item->setCheckState(Qt::Checked);
+				}
+				else
+				{  
+					item->setCheckState(Qt::Unchecked);
+				}	
+			}
+		}	
+				
+		itemList_->setCurrentRow(node->selectionIndex());
+
+		qDebug() << "node" << node->name() << node->items();
+		
+		/*if(node->isAxis() == false && 
+		   node->items().count() == 0)
+		{
+			slotValueSelected(itemList_[0]);	
+		}*/
+	}
+}	
+
+void MvQMarsBrowser::slotNodeSelected(QTreeWidgetItem* current,QTreeWidgetItem* /*next*/)
+{
+	slotNodeSelected(current,0);
+}	
+
+void MvQMarsBrowser::slotValueSelected(QListWidgetItem *item)
+{	
+  	if(catalog_->isFetchRunning())
+		return;
+	
+ 	QTreeWidgetItem* nodeItem=nodeTree_->currentItem();	
+	if(!nodeItem)
+	  	return;
+ 
+	QString nodeName=nodeItem->data(0,Qt::DisplayRole).toString();  
+	MvQMarsCatalogNode* node=data_->node(nodeName);
+	
+	if(node)
+	{  	
+		if(node->isAxis())
+		{
+  			QStringList lst;
+		  	for(int i=0; i < itemList_->count(); i++)
+			{
+			  	if(itemList_->item(i)->checkState() == Qt::Checked)
+			  	{
+			    		lst << itemList_->item(i)->text();
+				}
+			}
+			
+			QString value=lst.join("/");	
+  			nodeItem->setData(1,Qt::DisplayRole,value);
+			node->setSelection(value);
+			requestTe_->setPlainText(data_->catalogPathToRequest());
+			macroTe_->setPlainText(data_->catalogPathToMacro());
+		}
+		else
+		{
+  			QString value=item->text();	
+			node->setSelection(value);
+			fetch();
+		}
+	}
+}
+
+void MvQMarsBrowser::createAxisWidget(MvQMarsCatalogNode* node)
+{
+ 	if(!node->isAxis())
+	return;
+	
+	QWidget *w=new QWidget(this);
+	QVBoxLayout *vb=new QVBoxLayout;
+	w->setLayout(vb);
+	
+	QLabel *label=new QLabel(node->name(),w);
+	vb->addWidget(label);
+	
+	QListWidget *aw=new QListWidget;
+	aw->setUniformItemSizes(true);
+	aw->setProperty("mvStyle",1);
+	aw->setAlternatingRowColors(true);
+	aw->insertItems(0,node->items());
+	QStringList lst=node->selection().split("/");
+	for(int i=0; i < aw->count(); i++)
+	{
+		QListWidgetItem *item=aw->item(i);
+		item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsSelectable |Qt::ItemIsEnabled);
+		if(lst.indexOf(item->text()) != -1)
+		{  
+			item->setCheckState(Qt::Checked);
+		}
+		else
+		{  
+			item->setCheckState(Qt::Unchecked);
+		}	
+	}
+	vb->addWidget(aw,1);	
+	axisList_ << aw;
+			
+	axisLayout_->addWidget(w);
+}
+
+			
+void MvQMarsBrowser::slotCreateMarsIcon()
+{
+  	bool ok;
+     	QString text = QInputDialog::getText(0, tr("Create icon"),
+                                          tr("Icon name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        {
+	 	//MvKeyProfile *prof=keyManager_->addProfile(text.toStdString());		
+		//keyCombo_->addItem(text);
+		//keyCombo_->setCurrentIndex(keyCombo_->count()-1);
+		//actionSave_->setEnabled(false);
+	}
+}
+
+
+void MvQMarsBrowser::slotShowAboutBox()
+{
+	MvQAbout about("MARS Catalog Browser","",MvQAbout::MetviewVersion );
+}
+
+void MvQMarsBrowser::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void MvQMarsBrowser::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+void MvQMarsBrowser::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-MvQMarsBrowser");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.setValue("actionLogStatus",actionLog_->isChecked());		
+	settings.endGroup();	
+}
+
+void MvQMarsBrowser::readSettings()
+{
+	QVariant value;
+
+	QSettings settings("ECMWF","MV4-MvQMarsBrowser");
+	
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+
+	if(settings.value("actionLogStatus").isNull())
+	{
+		actionLog_->setChecked(false);
+	}
+	else
+	{
+		actionLog_->setChecked(settings.value("actionLogStatus").toBool());
+	}
+	
+	settings.endGroup();
+}
+
diff --git a/src/MarsCatalog/MvQMarsBrowser.h b/src/MarsCatalog/MvQMarsBrowser.h
new file mode 100644
index 0000000..9488a1c
--- /dev/null
+++ b/src/MarsCatalog/MvQMarsBrowser.h
@@ -0,0 +1,93 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMarsBrowser_H
+#define MvQMarsBrowser_H
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+class QAction;
+class QComboBox;
+class QHBoxLayout;
+class QLabel;
+class QListWidget;
+class QListWidgetItem;
+class QProgressBar;
+class QSplitter;
+class QPlainTextEdit;
+class QTabWidget;
+class QTreeWidget;
+class QTreeWidgetItem;
+
+class MvQLogBrowser;
+class MvQMarsCatalog;
+class MvQMarsCatalogData;
+class MvQMarsCatalogNode;
+
+class MvQMarsBrowser : public MvQMainWindow
+{
+	Q_OBJECT
+  
+public:
+	MvQMarsBrowser(QWidget *parent=0);
+	~MvQMarsBrowser();
+	void init();
+
+public slots:
+	void slotFetchFinished(QString,bool);
+	void slotNodeSelected(QTreeWidgetItem* item,int column);
+	void slotNodeSelected(QTreeWidgetItem*,QTreeWidgetItem*);
+	void slotValueSelected(QListWidgetItem*);
+	void slotCreateMarsIcon();
+	void slotShowAboutBox();
+	void slotClearLog(bool);
+	void slotUpdateLogOutput();
+	
+protected:
+	void setupViewActions();
+	void setupControlsActions();
+  	void setupHelpActions();
+	void fetchStarted();
+	void fetchFinished();
+	void fetch();
+	void reset();
+	void updateUi();
+	void readSettings();
+	void writeSettings();
+	
+	void createAxisWidget(MvQMarsCatalogNode*);
+  	
+	QComboBox*  dbCombo_;
+  	QTreeWidget* nodeTree_;
+	QListWidget* itemList_;
+	
+	MvQMarsCatalog* catalog_;
+	MvQMarsCatalogData* data_;
+	
+	QTabWidget*  mainTab_;
+	QSplitter*   mainSplitter_;
+	QSplitter*   centralSplitter_;
+	QAction*     actionLog_;
+	QWidget*     logPanel_;
+	MvQLogBrowser* logBrowser_;
+	QProgressBar* loadProgress_;
+	QLabel* statusMessageLabel_;
+	QPlainTextEdit*   requestTe_;
+	QPlainTextEdit*   macroTe_;
+	
+	MvQMainWindow::MenuItemMap menuItems_;
+	
+	QHBoxLayout* axisLayout_;
+	QList<QListWidget*> axisList_;
+	
+    
+};
+
+#endif
\ No newline at end of file
diff --git a/src/MarsCatalog/MvQMarsCatalog.cc b/src/MarsCatalog/MvQMarsCatalog.cc
new file mode 100644
index 0000000..c09913c
--- /dev/null
+++ b/src/MarsCatalog/MvQMarsCatalog.cc
@@ -0,0 +1,411 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQMarsCatalog.h"
+
+#include "json_spirit.h"
+
+using namespace json_spirit;
+
+#include "Metview.h"
+#include "LogHandler.h"
+
+//================================
+//
+//MvQMarsCatalogNode
+//
+//================================
+
+void MvQMarsCatalogNode::setItems(QStringList items)
+{
+  	items_=items;
+	if(items_.indexOf(selection_) == -1)
+		selection_.clear();    
+}  
+
+void MvQMarsCatalogNode::setSelection(QString s)
+{
+ 	selection_=s;
+}
+
+bool MvQMarsCatalogNode::isSelectionValid()
+{
+  	return (items_.indexOf(selection_) != -1);
+}	
+  	
+//================================
+//
+// MvQMarsCatalogData
+//
+//================================
+
+MvQMarsCatalogData::MvQMarsCatalogData()
+{
+  	init(); 
+}
+
+MvQMarsCatalogData::~MvQMarsCatalogData()
+{
+  	clear();
+}  
+
+void MvQMarsCatalogData::init()
+{
+  	MvQMarsCatalogNode* node=new MvQMarsCatalogNode("class");
+	data_ << node;
+}
+
+void MvQMarsCatalogData::clear()
+{
+  	foreach(MvQMarsCatalogNode* d, data_)
+	{
+	  	delete d;
+	}
+	data_.clear();
+}
+
+void MvQMarsCatalogData::setSelection(QString nodeName,QString value)
+{
+ 	MvQMarsCatalogNode* node=this->node(nodeName);
+	if(node)
+	{
+	  	node->setSelection(value);
+	}	
+} 
+
+MvQMarsCatalogNode*  MvQMarsCatalogData::node(QString name)
+{
+	foreach(MvQMarsCatalogNode *node,data_)
+	{
+		if(node->name() == name)
+		{
+			return node;
+		}
+	}
+	
+	return 0;
+}
+
+//Failing for this
+//"{"class" : "mc","expver" : "0099","stream" : "oper","type" : "ef","year" : "2010","month" : "jul","levtype" : "sfc"}" 
+
+void MvQMarsCatalogData::update(QString json_str)
+{
+	qDebug() << "json" <<  json_str; 
+
+	//Clear the data
+	clear();	
+	
+	Value value;	 
+	json_spirit::read(json_str.toStdString(),value);
+
+	if(value.type()  != obj_type)
+		return;
+	
+	qDebug() << "top type:"  <<  value.type();
+
+	Object obj = value.get_obj();
+	Object::const_iterator it;
+
+	//Tree
+	for(it=obj.begin(); it != obj.end(); it++)
+	{
+	 	if((*it).name_ == "tree" && (*it).value_.type()  == array_type)
+		{	
+			decodeJson_tree((*it).value_.get_array());
+			break;
+		}	
+	}  
+	  
+	//Axis
+	for(it=obj.begin(); it != obj.end(); it++)
+	{
+	 	if((*it).name_ == "axis" && (*it).value_.type()  == obj_type)
+		{
+			decodeJson_axis((*it).value_.get_obj());
+			break;
+		}	
+	}  
+	
+	//Choices
+	for(it=obj.begin(); it != obj.end(); it++)
+	{
+	 	if((*it).name_ == "choices" && (*it).value_.type()  == obj_type)
+		{		
+			decodeJson_choices((*it).value_.get_obj());
+			break;
+		}	
+	}  	
+}
+
+void MvQMarsCatalogData::decodeJson_tree(const Array &array)
+{						
+	for(Array::const_iterator it=array.begin(); it != array.end(); it++)
+	{ 
+  		const Array &arB=(*it).get_array();
+			
+		QStringList tvals;
+		for(Array::const_iterator itB = arB.begin(); itB != arB.end(); itB++)
+		{
+			tvals << QString::fromStdString((*itB).get_str());
+		}
+				
+		if(tvals.count() == 2)
+		{
+			MvQMarsCatalogNode *node=new MvQMarsCatalogNode(tvals[0]);
+			node->setSelection(tvals[1]);
+			data_ << node;
+		}
+	}
+}	
+
+void MvQMarsCatalogData::decodeJson_choices(const Object &obj)
+{							
+	for(Object::const_iterator it=obj.begin(); it != obj.end(); it++)
+	{		  			
+		QString name=QString::fromStdString((*it).name_);
+				
+		qDebug() << "choices:" << name;
+				
+		MvQMarsCatalogNode *node=this->node(name);				
+				
+		const Array &ar=(*it).value_.get_array();
+		  		
+		QStringList lst;
+		for(json_spirit::Array::const_iterator itB = ar.begin(); itB != ar.end(); itB++)
+		 {
+		    	lst << QString::fromStdString((*itB).get_str());
+		}
+					
+		qDebug() << "choices list:" << lst;	
+					
+		if(node)
+		{
+			node->setItems(lst);
+		}		
+	}			
+}
+
+void MvQMarsCatalogData::decodeJson_axis(const Object &obj)
+{		
+	for(Object::const_iterator it=obj.begin(); it != obj.end(); it++)
+	{		  			
+		QString name=QString::fromStdString((*it).name_);
+
+		MvQMarsCatalogNode *node=new MvQMarsCatalogNode(name);
+		node->setAxis(true);
+		//node->setSelection(tvals[1]);
+		data_ << node;			
+				
+		const Array &ar=(*it).value_.get_array();
+		  		
+		QStringList lst;
+		for(json_spirit::Array::const_iterator itB = ar.begin(); itB != ar.end(); itB++)
+		{
+			lst << QString::fromStdString((*itB).get_str());
+		}
+				
+		node->setItems(lst);				
+	}
+}	
+		
+		
+QString MvQMarsCatalogData::catalogPathToJason()
+{
+	QString s="{";
+  	foreach(MvQMarsCatalogNode *node, data_)
+	{
+	  	if(s.size() > 1)
+		{
+		  	s+=",";
+		}	
+		  
+		s+="\"" + node->name() + "\"" + 
+	  	" : " +
+	  	"\"" + node->selection() + "\"";
+	}
+	s+="}";
+	
+	return s;	  	 
+}  
+
+QString MvQMarsCatalogData::catalogPathToRequest()
+{
+	QString s="retrieve";
+  	foreach(MvQMarsCatalogNode *node, data_)
+	{	  	
+		s+=",\n";
+		s+="\t" + node->name() + " = " + node->selection();
+	}	
+	return s;	  	 
+}  
+
+QString MvQMarsCatalogData::catalogPathToMacro()
+{
+	QString s="res = retrieve(\n";
+  	int cnt=0;
+	foreach(MvQMarsCatalogNode *node, data_)
+	{	  	
+		if(cnt > 0)
+		{
+		  	s+=",\n";
+		}
+		s+="\t" + node->name() + " = " + node->selection();
+		cnt++;
+	}
+	s+=")";
+	return s;	  	 
+}  
+
+
+//================================
+//
+// MvQMarsCatalog
+//
+//================================
+
+MvQMarsCatalog::MvQMarsCatalog()
+{
+	proc_=0;
+	
+	char *pcom=getenv("MV_PYTHON_COMMAND");
+	if(pcom)
+	{
+	  	procCommand_=QString(pcom);
+	}
+	if(procCommand_.isEmpty())
+	{
+	  	 procCommand_="python";
+	}
+	
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate mv_mars_catalog.py script!");
+		return;
+	}
+	else
+	{
+		procScript_ = QString(mvbin) + "/mv_mars_catalog.py";		  	
+		apiPath_ = QString(mvbin) + "/WebMars";
+	}
+	
+  	//procCommand_ = "/var/tmp/cgr/PERFORCE/development/metview/src/MarsCatalog/mars_catalog.py";
+	//cat req.json | /usr/local/bin/python ./mars_catalog.py
+}
+
+void MvQMarsCatalog::fetch(MvQMarsCatalogData* data)
+{
+	qDebug() <<  "MvQMarsCatalog::fetch";
+  
+  	//path_="{\"class\" : \"en\" , \"}";
+	QString path=data->catalogPathToJason();
+	
+	QStringList args;
+	args << procScript_;
+	
+	if(!proc_)
+	{
+		proc_ = new QProcess(this);
+
+		QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ 		env.insert("PYTHONPATH", apiPath_); 
+ 		proc_->setProcessEnvironment(env);
+ 
+ 		connect(proc_,SIGNAL(finished(int,QProcess::ExitStatus)),
+			this,SLOT(slotFetchFinished(int,QProcess::ExitStatus)));
+			
+		connect(proc_,SIGNAL(error(QProcess::ProcessError)),
+			this,SLOT(slotFetchError(QProcess::ProcessError)));
+			
+		//connect(proc_,SIGNAL(readyReadStandardOutput()),
+		//	this,SLOT(slotready()));
+	}
+
+	qDebug() << procCommand_ << path;
+   
+	//Start fetch-script
+  	proc_->start(procCommand_,args);
+
+	//Send json object to the scripts stdin
+	std::string str=path.toStdString();
+	if(str.size() != proc_->write(str.c_str(),str.size()))
+	{
+		//marslog(LOG_WARN,"MvQMarsCatalog::fetch() ---> Cannot write to the script's stdin!");
+		qDebug() << "MvQMarsCatalog::fetch() ---> Cannot write to the script's stdin!";
+		proc_->close();
+	}	
+	
+	//Finish writing to the stdin
+	proc_->closeWriteChannel();
+	
+}
+
+void MvQMarsCatalog::slotFetchFinished(int exitCode,QProcess::ExitStatus exitStatus)
+{	
+	bool failed=false;
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Fetch");
+	
+	QString msg;
+	
+	if(exitStatus != QProcess::NormalExit)
+	{
+		failed=true;
+		msg=tr("Script crashed");
+		log->error(msg.toStdString() + "\n");		
+	}	
+		
+  	if(exitCode !=0)
+	{
+		failed=true;
+		msg=tr("Script exited with code: ") + QString::number(exitCode);
+		log->error(msg.toStdString() + "\n");	
+	}
+		
+	QByteArray stderr=proc_->readAllStandardError();
+	if(stderr.size() > 0)
+	{
+		failed=true;
+		msg=tr("Stderr: ") + "\n" + QString(stderr);
+		log->error(msg.toStdString());	
+	}
+
+	if(!failed)
+	{  
+		QByteArray ba=proc_->readAllStandardOutput();
+		qDebug() << "slotFetchFinished --> json" <<  ba; 
+		
+		QString str(ba);
+		emit fetchFinished(str,true);
+		emit statusMessage(tr("Fetch <font color=green>(OK)</font>"));		
+	}
+	else
+	{
+	  	emit fetchFinished(QString(),false);	
+		emit statusMessage(tr("Fetch <font color=red>(FAILED)</font>"));
+	}
+	
+	emit logUpdated();
+}
+
+void MvQMarsCatalog::slotFetchError(QProcess::ProcessError error)
+{
+ 	qDebug() << "Error:" << error;
+	proc_->close();
+} 
+
+void MvQMarsCatalog::slotready()
+{
+ 	qDebug() << "ready";
+}
diff --git a/src/MarsCatalog/MvQMarsCatalog.h b/src/MarsCatalog/MvQMarsCatalog.h
new file mode 100644
index 0000000..7b8fa81
--- /dev/null
+++ b/src/MarsCatalog/MvQMarsCatalog.h
@@ -0,0 +1,94 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMarsCatalog_H
+#define MvQMarsCatalog_H
+
+#include <QObject>
+#include <QProcess>
+
+#include "json_spirit.h"
+
+class MvQMarsCatalogNode
+{
+public:
+	MvQMarsCatalogNode(QString name) : name_(name), axis_(false){};
+
+	QString name() {return name_;}
+	QStringList items() {return items_;}
+	QString selection() {return selection_;}
+	void setItems(QStringList);
+	void setSelection(QString);
+	bool isSelectionValid();
+	int selectionIndex() {return items_.indexOf(selection_);}
+	void setAxis(bool b) {axis_=b;}
+	bool isAxis() {return axis_;}
+	
+protected:
+	QString name_;
+	QStringList items_;
+	QString selection_;
+	bool axis_;
+};    
+
+
+class MvQMarsCatalogData
+{
+public:
+    	MvQMarsCatalogData();
+	~MvQMarsCatalogData();	
+
+	void init();
+	void setSelection(QString node,QString value);
+	MvQMarsCatalogNode* node(QString);
+	void clear();
+	void update(QString);
+	QString catalogPathToJason();
+	QString catalogPathToRequest();
+	QString catalogPathToMacro();
+	QList<MvQMarsCatalogNode*> data() {return data_;}
+
+protected:  
+	void decodeJson_tree(const json_spirit::Array&);
+	void decodeJson_axis(const json_spirit::Object&);
+	void decodeJson_choices(const json_spirit::Object&);
+	
+	QList<MvQMarsCatalogNode*> data_;
+};
+
+
+
+class MvQMarsCatalog : public QObject
+{
+	Q_OBJECT  
+  
+public:
+	MvQMarsCatalog();
+	void fetch(MvQMarsCatalogData *);
+	bool isFetchRunning() {if(proc_ && proc_->state() != QProcess::NotRunning) 
+				return true; else return false;}
+ 	
+public slots:  
+	void slotFetchFinished(int,QProcess::ExitStatus); 
+	void slotFetchError(QProcess::ProcessError); 
+	void slotready();	
+
+signals:
+	void fetchFinished(QString,bool);
+	void logUpdated();
+	void statusMessage(QString);
+	
+protected:  
+	QString procCommand_;
+	QString procScript_;
+	QProcess* proc_;
+	QString apiPath_;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/MarsCatalog/ObjectSpec.MarsCatalog b/src/MarsCatalog/ObjectSpec.MarsCatalog
new file mode 100644
index 0000000..c3cfc27
--- /dev/null
+++ b/src/MarsCatalog/ObjectSpec.MarsCatalog
@@ -0,0 +1,26 @@
+
+object,
+ 	class		= MARSCATALOG,
+  	can_be_created	= True,
+#	default_name	= 'MarsCatalog',
+#	help_page	= MarsCatalog,
+ 	type		= File,
+# 	expand		= 75,
+# 	macro		= wmsclient,
+#	editor_type	= ExternalServiceEditor,
+# 	editor_type	= QtOgcClientEditor,
+	editor_type     = NoEditor,
+        pixmap		= '$METVIEW_DIR/share/metview/icons/MARS_CATALOG.icon'
+
+state,
+	class		= MARSCATALOG,
+	action		= examine,
+	service         = marscatalog
+
+service,
+	name	= marscatalog,
+	timeout  = $timeout,
+	fullname = Mars Catalog,
+	cmd		= '$metview_command $METVIEW_BIN/MarsCatalog -maxforks 25 -style plastique -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss'
+	
+
diff --git a/src/MarsCatalog/json_spirit.h b/src/MarsCatalog/json_spirit.h
new file mode 100644
index 0000000..46f0936
--- /dev/null
+++ b/src/MarsCatalog/json_spirit.h
@@ -0,0 +1,20 @@
+#ifndef JASON_SPIRIT
+#define JASON_SPIRIT
+
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+// json spirit version 4.00
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include "json_spirit_value.h"
+#include "json_spirit_reader.h"
+#include "json_spirit_writer.h"
+#include "json_spirit_utils.h"
+
+#endif
diff --git a/src/MarsCatalog/json_spirit_reader.cpp b/src/MarsCatalog/json_spirit_reader.cpp
new file mode 100644
index 0000000..3f8f180
--- /dev/null
+++ b/src/MarsCatalog/json_spirit_reader.cpp
@@ -0,0 +1,755 @@
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+// json spirit version 4.00
+
+#include "json_spirit_reader.h"
+#include "json_spirit_value.h"
+
+//#define BOOST_SPIRIT_THREADSAFE  // uncomment for multithreaded use, requires linking to boost.thead
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+#include <boost/version.hpp>
+
+#if BOOST_VERSION >= 103800
+    #include <boost/spirit/include/classic_core.hpp>
+    #include <boost/spirit/include/classic_confix.hpp>
+    #include <boost/spirit/include/classic_escape_char.hpp>
+    #include <boost/spirit/include/classic_multi_pass.hpp>
+    #include <boost/spirit/include/classic_position_iterator.hpp>
+    using namespace boost::spirit::classic;
+#else
+    #include <boost/spirit/core.hpp>
+    #include <boost/spirit/utility/confix.hpp>
+    #include <boost/spirit/utility/escape_char.hpp>
+    #include <boost/spirit/iterator/multi_pass.hpp>
+    #include <boost/spirit/iterator/position_iterator.hpp>
+    using namespace boost::spirit;
+#endif
+
+using namespace json_spirit;
+using namespace std;
+using namespace boost;
+
+//
+
+Error_position::Error_position()
+:   line_( 0 )
+,   column_( 0 )
+{
+}
+
+Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
+:   line_( line )
+,   column_( column )
+,   reason_( reason )
+{
+}
+
+bool Error_position::operator==( const Error_position& lhs ) const
+{
+    if( this == &lhs ) return true;
+
+    return ( reason_ == lhs.reason_ ) &&
+           ( line_   == lhs.line_ ) &&
+           ( column_ == lhs.column_ ); 
+}
+
+//
+
+namespace
+{
+    const int_parser < int64_t >  int64_p  = int_parser < int64_t  >();
+    const uint_parser< uint64_t > uint64_p = uint_parser< uint64_t >();
+
+    template< class Iter_type >
+    bool is_eq( Iter_type first, Iter_type last, const char* c_str )
+    {
+        for( Iter_type i = first; i != last; ++i, ++c_str )
+        {
+            if( *c_str == 0 ) return false;
+
+            if( *i != *c_str ) return false;
+        }
+
+        return true;
+    }
+
+    template< class Char_type >
+    Char_type hex_to_num( const Char_type c )
+    {
+        if( ( c >= '0' ) && ( c <= '9' ) ) return c - '0';
+        if( ( c >= 'a' ) && ( c <= 'f' ) ) return c - 'a' + 10;
+        if( ( c >= 'A' ) && ( c <= 'F' ) ) return c - 'A' + 10;
+        return 0;
+    }
+
+    template< class Char_type, class Iter_type >
+    Char_type hex_str_to_char( Iter_type& begin )
+    {
+        const Char_type c1( *( ++begin ) );
+        const Char_type c2( *( ++begin ) );
+
+        return ( hex_to_num( c1 ) << 4 ) + hex_to_num( c2 );
+    }       
+
+    template< class Char_type, class Iter_type >
+    Char_type unicode_str_to_char( Iter_type& begin )
+    {
+        const Char_type c1( *( ++begin ) );
+        const Char_type c2( *( ++begin ) );
+        const Char_type c3( *( ++begin ) );
+        const Char_type c4( *( ++begin ) );
+
+        return ( hex_to_num( c1 ) << 12 ) + 
+               ( hex_to_num( c2 ) <<  8 ) + 
+               ( hex_to_num( c3 ) <<  4 ) + 
+               hex_to_num( c4 );
+    }
+
+    template< class String_type >
+    void append_esc_char_and_incr_iter( String_type& s, 
+                                        typename String_type::const_iterator& begin, 
+                                        typename String_type::const_iterator end )
+    {
+        typedef typename String_type::value_type Char_type;
+             
+        const Char_type c2( *begin );
+
+        switch( c2 )
+        {
+            case 't':  s += '\t'; break;
+            case 'b':  s += '\b'; break;
+            case 'f':  s += '\f'; break;
+            case 'n':  s += '\n'; break;
+            case 'r':  s += '\r'; break;
+            case '\\': s += '\\'; break;
+            case '/':  s += '/';  break;
+            case '"':  s += '"';  break;
+            case 'x':  
+            {
+                if( end - begin >= 3 )  //  expecting "xHH..."
+                {
+                    s += hex_str_to_char< Char_type >( begin );  
+                }
+                break;
+            }
+            case 'u':  
+            {
+                if( end - begin >= 5 )  //  expecting "uHHHH..."
+                {
+                    s += unicode_str_to_char< Char_type >( begin );  
+                }
+                break;
+            }
+        }
+    }
+
+    template< class String_type >
+    String_type substitute_esc_chars( typename String_type::const_iterator begin, 
+                                   typename String_type::const_iterator end )
+    {
+        typedef typename String_type::const_iterator Iter_type;
+
+        if( end - begin < 2 ) return String_type( begin, end );
+
+        String_type result;
+        
+        result.reserve( end - begin );
+
+        const Iter_type end_minus_1( end - 1 );
+
+        Iter_type substr_start = begin;
+        Iter_type i = begin;
+
+        for( ; i < end_minus_1; ++i )
+        {
+            if( *i == '\\' )
+            {
+                result.append( substr_start, i );
+
+                ++i;  // skip the '\'
+             
+                append_esc_char_and_incr_iter( result, i, end );
+
+                substr_start = i + 1;
+            }
+        }
+
+        result.append( substr_start, end );
+
+        return result;
+    }
+
+    template< class String_type >
+    String_type get_str_( typename String_type::const_iterator begin, 
+                       typename String_type::const_iterator end )
+    {
+        assert( end - begin >= 2 );
+
+        typedef typename String_type::const_iterator Iter_type;
+
+        Iter_type str_without_quotes( ++begin );
+        Iter_type end_without_quotes( --end );
+
+        return substitute_esc_chars< String_type >( str_without_quotes, end_without_quotes );
+    }
+
+    string get_str( string::const_iterator begin, string::const_iterator end )
+    {
+        return get_str_< string >( begin, end );
+    }
+
+    wstring get_str( wstring::const_iterator begin, wstring::const_iterator end )
+    {
+        return get_str_< wstring >( begin, end );
+    }
+    
+    template< class String_type, class Iter_type >
+    String_type get_str( Iter_type begin, Iter_type end )
+    {
+        const String_type tmp( begin, end );  // convert multipass iterators to string iterators
+
+        return get_str( tmp.begin(), tmp.end() );
+    }
+
+    // this class's methods get called by the spirit parse resulting
+    // in the creation of a JSON object or array
+    //
+    // NB Iter_type could be a std::string iterator, wstring iterator, a position iterator or a multipass iterator
+    //
+    template< class Value_type, class Iter_type >
+    class Semantic_actions 
+    {
+    public:
+
+        typedef typename Value_type::Config_type Config_type;
+        typedef typename Config_type::String_type String_type;
+        typedef typename Config_type::Object_type Object_type;
+        typedef typename Config_type::Array_type Array_type;
+        typedef typename String_type::value_type Char_type;
+
+        Semantic_actions( Value_type& value )
+        :   value_( value )
+        ,   current_p_( 0 )
+        {
+        }
+
+        void begin_obj( Char_type c )
+        {
+            assert( c == '{' );
+
+            begin_compound< Object_type >();
+        }
+
+        void end_obj( Char_type c )
+        {
+            assert( c == '}' );
+
+            end_compound();
+        }
+
+        void begin_array( Char_type c )
+        {
+            assert( c == '[' );
+     
+            begin_compound< Array_type >();
+       }
+
+        void end_array( Char_type c )
+        {
+            assert( c == ']' );
+
+            end_compound();
+        }
+
+        void new_name( Iter_type begin, Iter_type end )
+        {
+            assert( current_p_->type() == obj_type );
+
+            name_ = get_str< String_type >( begin, end );
+        }
+
+        void new_str( Iter_type begin, Iter_type end )
+        {
+            add_to_current( get_str< String_type >( begin, end ) );
+        }
+
+        void new_true( Iter_type begin, Iter_type end )
+        {
+            assert( is_eq( begin, end, "true" ) );
+
+            add_to_current( true );
+        }
+
+        void new_false( Iter_type begin, Iter_type end )
+        {
+            assert( is_eq( begin, end, "false" ) );
+
+            add_to_current( false );
+        }
+
+        void new_null( Iter_type begin, Iter_type end )
+        {
+            assert( is_eq( begin, end, "null" ) );
+
+            add_to_current( Value_type() );
+        }
+
+        void new_int( int64_t i )
+        {
+            add_to_current( i );
+        }
+
+        void new_uint64( uint64_t ui )
+        {
+            add_to_current( ui );
+        }
+
+        void new_real( double d )
+        {
+            add_to_current( d );
+        }
+
+    private:
+
+        Value_type* add_first( const Value_type& value )
+        {
+            assert( current_p_ == 0 );
+
+            value_ = value;
+            current_p_ = &value_;
+            return current_p_;
+        }
+
+        template< class Array_or_obj >
+        void begin_compound()
+        {
+            if( current_p_ == 0 )
+            {
+                add_first( Array_or_obj() );
+            }
+            else
+            {
+                stack_.push_back( current_p_ );
+
+                Array_or_obj new_array_or_obj;   // avoid copy by building new array or object in place
+
+                current_p_ = add_to_current( new_array_or_obj );
+            }
+        }
+
+        void end_compound()
+        {
+            if( current_p_ != &value_ )
+            {
+                current_p_ = stack_.back();
+                
+                stack_.pop_back();
+            }    
+        }
+
+        Value_type* add_to_current( const Value_type& value )
+        {
+            if( current_p_ == 0 )
+            {
+                return add_first( value );
+            }
+            else if( current_p_->type() == array_type )
+            {
+                current_p_->get_array().push_back( value );
+
+                return &current_p_->get_array().back(); 
+            }
+            
+            assert( current_p_->type() == obj_type );
+
+            return &Config_type::add( current_p_->get_obj(), name_, value );
+        }
+
+        Value_type& value_;             // this is the object or array that is being created
+        Value_type* current_p_;         // the child object or array that is currently being constructed
+
+        vector< Value_type* > stack_;   // previous child objects and arrays
+
+        String_type name_;              // of current name/value pair
+    };
+
+    template< typename Iter_type >
+    void throw_error( position_iterator< Iter_type > i, const std::string& reason )
+    {
+        throw Error_position( i.get_position().line, i.get_position().column, reason );
+    }
+
+    template< typename Iter_type >
+    void throw_error( Iter_type i, const std::string& reason )
+    {
+       throw reason;
+    }
+
+    // the spirit grammer 
+    //
+    template< class Value_type, class Iter_type >
+    class Json_grammer : public grammar< Json_grammer< Value_type, Iter_type > >
+    {
+    public:
+
+        typedef Semantic_actions< Value_type, Iter_type > Semantic_actions_t;
+
+        Json_grammer( Semantic_actions_t& semantic_actions )
+        :   actions_( semantic_actions )
+        {
+        }
+
+        static void throw_not_value( Iter_type begin, Iter_type /*end*/ )
+        {
+    	    throw_error( begin, "not a value" );
+        }
+
+        static void throw_not_array( Iter_type begin, Iter_type /*end*/ )
+        {
+    	    throw_error( begin, "not an array" );
+        }
+
+        static void throw_not_object( Iter_type begin, Iter_type /*end*/ )
+        {
+    	    throw_error( begin, "not an object" );
+        }
+
+        static void throw_not_pair( Iter_type begin, Iter_type /*end*/ )
+        {
+    	    throw_error( begin, "not a pair" );
+        }
+
+        static void throw_not_colon( Iter_type begin, Iter_type /*end*/ )
+        {
+    	    throw_error( begin, "no colon in pair" );
+        }
+
+        static void throw_not_string( Iter_type begin, Iter_type /*end*/ )
+        {
+    	    throw_error( begin, "not a string" );
+        }
+
+        template< typename ScannerT >
+        struct definition
+        {
+            definition( const Json_grammer& self )
+            {
+                typedef typename Value_type::String_type::value_type Char_type;
+
+                // first we convert the semantic action class methods to functors with the 
+                // parameter signature expected by spirit
+
+                typedef function< void( Char_type )            > Char_action;
+                typedef function< void( Iter_type, Iter_type ) > Str_action;
+                typedef function< void( double )               > Real_action;
+                typedef function< void( int64_t )              > Int_action;
+                typedef function< void( uint64_t )             > Uint64_action;
+
+                Char_action   begin_obj  ( bind( &Semantic_actions_t::begin_obj,   &self.actions_, _1 ) );
+                Char_action   end_obj    ( bind( &Semantic_actions_t::end_obj,     &self.actions_, _1 ) );
+                Char_action   begin_array( bind( &Semantic_actions_t::begin_array, &self.actions_, _1 ) );
+                Char_action   end_array  ( bind( &Semantic_actions_t::end_array,   &self.actions_, _1 ) );
+                Str_action    new_name   ( bind( &Semantic_actions_t::new_name,    &self.actions_, _1, _2 ) );
+                Str_action    new_str    ( bind( &Semantic_actions_t::new_str,     &self.actions_, _1, _2 ) );
+                Str_action    new_true   ( bind( &Semantic_actions_t::new_true,    &self.actions_, _1, _2 ) );
+                Str_action    new_false  ( bind( &Semantic_actions_t::new_false,   &self.actions_, _1, _2 ) );
+                Str_action    new_null   ( bind( &Semantic_actions_t::new_null,    &self.actions_, _1, _2 ) );
+                Real_action   new_real   ( bind( &Semantic_actions_t::new_real,    &self.actions_, _1 ) );
+                Int_action    new_int    ( bind( &Semantic_actions_t::new_int,     &self.actions_, _1 ) );
+                Uint64_action new_uint64 ( bind( &Semantic_actions_t::new_uint64,  &self.actions_, _1 ) );
+
+                // actual grammer
+
+                json_
+                    = value_ | eps_p[ &throw_not_value ]
+                    ;
+
+                value_
+                    = string_[ new_str ] 
+                    | number_ 
+                    | object_ 
+                    | array_ 
+                    | str_p( "true" ) [ new_true  ] 
+                    | str_p( "false" )[ new_false ] 
+                    | str_p( "null" ) [ new_null  ]
+                    ;
+
+                object_ 
+                    = ch_p('{')[ begin_obj ]
+                    >> !members_
+                    >> ( ch_p('}')[ end_obj ] | eps_p[ &throw_not_object ] )
+                    ;
+
+                members_
+                    = pair_ >> *( ',' >> pair_ )
+                    ;
+
+                pair_
+                    = string_[ new_name ]
+                    >> ( ':' | eps_p[ &throw_not_colon ] )
+                    >> ( value_ | eps_p[ &throw_not_value ] )
+                    ;
+
+                array_
+                    = ch_p('[')[ begin_array ]
+                    >> !elements_
+                    >> ( ch_p(']')[ end_array ] | eps_p[ &throw_not_array ] )
+                    ;
+
+                elements_
+                    = value_ >> *( ',' >> value_ )
+                    ;
+
+                string_ 
+                    = lexeme_d // this causes white space inside a string to be retained
+                      [
+                          confix_p
+                          ( 
+                              '"', 
+                              *lex_escape_ch_p,
+                              '"'
+                          ) 
+                      ]
+                    ;
+
+                number_
+                    = strict_real_p[ new_real   ] 
+                    | int64_p      [ new_int    ]
+                    | uint64_p     [ new_uint64 ]
+                    ;
+            }
+
+            rule< ScannerT > json_, object_, members_, pair_, array_, elements_, value_, string_, number_;
+
+            const rule< ScannerT >& start() const { return json_; }
+        };
+
+        Semantic_actions_t& actions_;
+    };
+
+    template< class Iter_type, class Value_type >
+    Iter_type read_range_or_throw( Iter_type begin, Iter_type end, Value_type& value )
+    {
+        Semantic_actions< Value_type, Iter_type > semantic_actions( value );
+     
+        const parse_info< Iter_type > info = parse( begin, end, 
+                                                    Json_grammer< Value_type, Iter_type >( semantic_actions ), 
+                                                    space_p );
+
+        if( !info.hit )
+        {
+            assert( false ); // in theory exception should already have been thrown
+            throw_error( info.stop, "error" );
+        }
+
+        return info.stop;
+    }
+
+    template< class Iter_type, class Value_type >
+    void add_posn_iter_and_read_range_or_throw( Iter_type begin, Iter_type end, Value_type& value )
+    {
+        typedef position_iterator< Iter_type > Posn_iter_t;
+
+        const Posn_iter_t posn_begin( begin, end );
+        const Posn_iter_t posn_end( end, end );
+     
+        read_range_or_throw( posn_begin, posn_end, value );
+    }
+
+    template< class Iter_type, class Value_type >
+    bool read_range( Iter_type& begin, Iter_type end, Value_type& value )
+    {
+        try
+        {
+            begin = read_range_or_throw( begin, end, value );
+
+            return true;
+        }
+        catch( ... )
+        {
+            return false;
+        }
+    }
+
+    template< class String_type, class Value_type >
+    void read_string_or_throw( const String_type& s, Value_type& value )
+    {
+        add_posn_iter_and_read_range_or_throw( s.begin(), s.end(), value );
+    }
+
+    template< class String_type, class Value_type >
+    bool read_string( const String_type& s, Value_type& value )
+    {
+        typename String_type::const_iterator begin = s.begin();
+
+        return read_range( begin, s.end(), value );
+    }
+
+    template< class Istream_type >
+    struct Multi_pass_iters
+    {
+        typedef typename Istream_type::char_type Char_type;
+        typedef istream_iterator< Char_type, Char_type > istream_iter;
+        typedef multi_pass< istream_iter > multi_pass_iter;
+
+        Multi_pass_iters( Istream_type& is )
+        {
+            is.unsetf( ios::skipws );
+
+            begin_ = make_multi_pass( istream_iter( is ) );
+            end_   = make_multi_pass( istream_iter() );
+        }
+
+        multi_pass_iter begin_;
+        multi_pass_iter end_;
+    };
+
+    template< class Istream_type, class Value_type >
+    bool read_stream( Istream_type& is, Value_type& value )
+    {
+        Multi_pass_iters< Istream_type > mp_iters( is );
+
+        return read_range( mp_iters.begin_, mp_iters.end_, value );
+    }
+
+    template< class Istream_type, class Value_type >
+    void read_stream_or_throw( Istream_type& is, Value_type& value )
+    {
+        const Multi_pass_iters< Istream_type > mp_iters( is );
+
+        add_posn_iter_and_read_range_or_throw( mp_iters.begin_, mp_iters.end_, value );
+    }
+}
+
+bool json_spirit::read( const std::string& s, Value& value )
+{
+    return read_string( s, value );
+}
+
+void json_spirit::read_or_throw( const std::string& s, Value& value )
+{
+    read_string_or_throw( s, value );
+}
+
+bool json_spirit::read( std::istream& is, Value& value )
+{
+    return read_stream( is, value );
+}
+
+void json_spirit::read_or_throw( std::istream& is, Value& value )
+{
+    read_stream_or_throw( is, value );
+}
+
+bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
+{
+    return read_range( begin, end, value );
+}
+
+void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
+{
+    begin = read_range_or_throw( begin, end, value );
+}
+
+#ifndef BOOST_NO_STD_WSTRING
+
+bool json_spirit::read( const std::wstring& s, wValue& value )
+{
+    return read_string( s, value );
+}
+
+void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
+{
+    read_string_or_throw( s, value );
+}
+
+bool json_spirit::read( std::wistream& is, wValue& value )
+{
+    return read_stream( is, value );
+}
+
+void json_spirit::read_or_throw( std::wistream& is, wValue& value )
+{
+    read_stream_or_throw( is, value );
+}
+
+bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
+{
+    return read_range( begin, end, value );
+}
+
+void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
+{
+    begin = read_range_or_throw( begin, end, value );
+}
+
+#endif
+
+bool json_spirit::read( const std::string& s, mValue& value )
+{
+    return read_string( s, value );
+}
+
+void json_spirit::read_or_throw( const std::string& s, mValue& value )
+{
+    read_string_or_throw( s, value );
+}
+
+bool json_spirit::read( std::istream& is, mValue& value )
+{
+    return read_stream( is, value );
+}
+
+void json_spirit::read_or_throw( std::istream& is, mValue& value )
+{
+    read_stream_or_throw( is, value );
+}
+
+bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
+{
+    return read_range( begin, end, value );
+}
+
+void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
+{
+    begin = read_range_or_throw( begin, end, value );
+}
+
+#ifndef BOOST_NO_STD_WSTRING
+
+bool json_spirit::read( const std::wstring& s, wmValue& value )
+{
+    return read_string( s, value );
+}
+
+void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
+{
+    read_string_or_throw( s, value );
+}
+
+bool json_spirit::read( std::wistream& is, wmValue& value )
+{
+    return read_stream( is, value );
+}
+
+void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
+{
+    read_stream_or_throw( is, value );
+}
+
+bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
+{
+    return read_range( begin, end, value );
+}
+
+void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
+{
+    begin = read_range_or_throw( begin, end, value );
+}
+
+#endif
diff --git a/src/MarsCatalog/json_spirit_reader.h b/src/MarsCatalog/json_spirit_reader.h
new file mode 100644
index 0000000..6f4917a
--- /dev/null
+++ b/src/MarsCatalog/json_spirit_reader.h
@@ -0,0 +1,77 @@
+#ifndef JASON_SPIRIT_READER
+#define JASON_SPIRIT_READER
+
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   json spirit version 4.00
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include "json_spirit_value.h"
+#include <iostream>
+
+namespace json_spirit
+{
+    // An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
+    // Note the "read_or_throw" functions are around 3 times slower than the standard functions "read" 
+    // functions that return a bool.
+    //
+    struct Error_position
+    {
+        Error_position();
+        Error_position( unsigned int line, unsigned int column, const std::string& reason );
+        bool operator==( const Error_position& lhs ) const;
+        unsigned int line_;
+        unsigned int column_;
+        std::string reason_;
+    };
+
+    // functions to reads a JSON values
+
+    bool read( const std::string& s, Value& value );
+    bool read( std::istream&  is,    Value& value );
+    bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
+
+    void read_or_throw( const std::string& s, Value& value );  
+    void read_or_throw( std::istream&  is,    Value& value );
+    void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
+
+#ifndef BOOST_NO_STD_WSTRING
+
+    bool read( const std::wstring& s, wValue& value );
+    bool read( std::wistream&  is,    wValue& value );
+    bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );    
+
+    void read_or_throw( const std::wstring& s, wValue& value );
+    void read_or_throw( std::wistream&  is,    wValue& value );
+    void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
+
+#endif
+
+    bool read( const std::string& s, mValue& value );
+    bool read( std::istream&  is,    mValue& value );
+    bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
+
+    void read_or_throw( const std::string& s, mValue& value );  
+    void read_or_throw( std::istream&  is,    mValue& value );
+    void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
+
+#ifndef BOOST_NO_STD_WSTRING
+
+    bool read( const std::wstring& s, wmValue& value );
+    bool read( std::wistream&  is,    wmValue& value );
+    bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );    
+
+    void read_or_throw( const std::wstring& s, wmValue& value );
+    void read_or_throw( std::wistream&  is,    wmValue& value );
+    void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
+
+#endif
+}
+
+#endif
diff --git a/src/MarsCatalog/json_spirit_value.cpp b/src/MarsCatalog/json_spirit_value.cpp
new file mode 100644
index 0000000..dd5b50e
--- /dev/null
+++ b/src/MarsCatalog/json_spirit_value.cpp
@@ -0,0 +1,8 @@
+/* Copyright (c) 2007 John W Wilkinson
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+// json spirit version 2.00
+
+#include "json_spirit_value.h"
diff --git a/src/MarsCatalog/json_spirit_value.h b/src/MarsCatalog/json_spirit_value.h
new file mode 100644
index 0000000..3a0acab
--- /dev/null
+++ b/src/MarsCatalog/json_spirit_value.h
@@ -0,0 +1,558 @@
+#ifndef JASON_SPIRIT_VALUE
+#define JASON_SPIRIT_VALUE
+
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+// json spirit version 4.00
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <vector>
+#include <map>
+#include <string>
+#include <cassert>
+#include <boost/config.hpp> 
+#include <boost/cstdint.hpp> 
+#include <boost/shared_ptr.hpp> 
+
+namespace json_spirit
+{
+    enum Value_type{ obj_type, array_type, str_type, bool_type, int_type, real_type, null_type };
+
+    template< class Config >    // Config determines whether the value uses std::string or std::wstring and
+                                // whether JSON Objects are represented as vectors or maps
+    class Value_impl
+    {
+    public:
+
+        typedef Config Config_type;
+        typedef typename Config::String_type String_type;
+        typedef typename Config::Object_type Object;
+        typedef typename Config::Array_type Array;
+        typedef typename String_type::const_pointer Const_str_ptr;  // eg const char*
+
+        Value_impl();  // creates null value
+        Value_impl( Const_str_ptr      value ); 
+        Value_impl( const String_type& value );
+        Value_impl( const Object&      value );
+        Value_impl( const Array&       value );
+        Value_impl( bool               value );
+        Value_impl( int                value );
+        Value_impl( boost::int64_t     value );
+        Value_impl( boost::uint64_t    value );
+        Value_impl( double             value );
+
+        Value_impl( const Value_impl& other );
+
+        bool operator==( const Value_impl& lhs ) const;
+
+        Value_impl& operator=( const Value_impl& lhs );
+
+        Value_type type() const;
+
+        bool is_uint64() const;
+        bool is_null() const;
+
+        const String_type& get_str()    const;
+        const Object&      get_obj()    const;
+        const Array&       get_array()  const;
+        bool               get_bool()   const;
+        int                get_int()    const;
+        boost::int64_t     get_int64()  const;
+        boost::uint64_t    get_uint64() const;
+        double             get_real()   const;
+
+        Object& get_obj();
+        Array&  get_array();
+
+        template< typename T > T get_value() const;  // example usage: int    i = value.get_value< int >();
+                                                     // or             double d = value.get_value< double >();
+
+        static const Value_impl null;
+
+    private:
+
+        Value_type type_;
+
+        typedef boost::shared_ptr< Object > Object_ptr;
+        typedef boost::shared_ptr< Array > Array_ptr;
+
+        String_type str_;
+        Object_ptr obj_p_;
+        Array_ptr array_p_;
+        union
+        {
+           bool bool_;
+           boost::int64_t i_;
+           double d_;
+        };
+        bool is_uint64_;
+    };
+
+    // vector objects
+
+    template< class Config >
+    struct Pair_impl
+    {
+        typedef typename Config::String_type String_type;
+        typedef typename Config::Value_type Value_type;
+
+        Pair_impl( const String_type& name, const Value_type& value );
+
+        bool operator==( const Pair_impl& lhs ) const;
+
+        String_type name_;
+        Value_type value_;
+    };
+
+    template< class String >
+    struct Config_vector
+    {
+        typedef String String_type;
+        typedef Value_impl< Config_vector > Value_type;
+        typedef Pair_impl < Config_vector > Pair_type;
+        typedef std::vector< Value_type > Array_type;
+        typedef std::vector< Pair_type > Object_type;
+
+        static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value )
+        {
+            obj.push_back( Pair_type( name , value ) );
+
+            return obj.back().value_;
+        }
+                
+        static String_type get_name( const Pair_type& pair )
+        {
+            return pair.name_;
+        }
+                
+        static Value_type get_value( const Pair_type& pair )
+        {
+            return pair.value_;
+        }
+    };
+
+    // typedefs for ASCII
+
+    typedef Config_vector< std::string > Config;
+
+    typedef Config::Value_type  Value;
+    typedef Config::Pair_type   Pair;
+    typedef Config::Object_type Object;
+    typedef Config::Array_type  Array;
+
+    // typedefs for Unicode
+
+#ifndef BOOST_NO_STD_WSTRING
+
+    typedef Config_vector< std::wstring > wConfig;
+
+    typedef wConfig::Value_type  wValue;
+    typedef wConfig::Pair_type   wPair;
+    typedef wConfig::Object_type wObject;
+    typedef wConfig::Array_type  wArray;
+#endif
+
+    // map objects
+
+    template< class String >
+    struct Config_map
+    {
+        typedef String String_type;
+        typedef Value_impl< Config_map > Value_type;
+        typedef std::vector< Value_type > Array_type;
+        typedef std::map< String_type, Value_type > Object_type;
+        typedef typename Object_type::value_type Pair_type;
+
+        static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value )
+        {
+            return obj[ name ] = value;
+        }
+                
+        static String_type get_name( const Pair_type& pair )
+        {
+            return pair.first;
+        }
+                
+        static Value_type get_value( const Pair_type& pair )
+        {
+            return pair.second;
+        }
+    };
+
+    // typedefs for ASCII
+
+    typedef Config_map< std::string > mConfig;
+
+    typedef mConfig::Value_type  mValue;
+    typedef mConfig::Object_type mObject;
+    typedef mConfig::Array_type  mArray;
+
+    // typedefs for Unicode
+
+#ifndef BOOST_NO_STD_WSTRING
+
+    typedef Config_map< std::wstring > wmConfig;
+
+    typedef wmConfig::Value_type  wmValue;
+    typedef wmConfig::Object_type wmObject;
+    typedef wmConfig::Array_type  wmArray;
+
+#endif
+
+    ///////////////////////////////////////////////////////////////////////////////////////////////
+    //
+    // implementation
+
+    template< class Config >
+    const Value_impl< Config > Value_impl< Config >::null;
+
+    template< class Config >
+    Value_impl< Config >::Value_impl()
+    :   type_( null_type )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( const Const_str_ptr value )
+    :   type_( str_type )
+    ,   str_( value )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( const String_type& value )
+    :   type_( str_type )
+    ,   str_( value )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( const Object& value )
+    :   type_( obj_type )
+    ,   obj_p_( new Object( value ) )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( const Array& value )
+    :   type_( array_type )
+    ,   array_p_( new Array( value ) )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( bool value )
+    :   type_( bool_type )
+    ,   bool_( value )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( int value )
+    :   type_( int_type )
+    ,   i_( value )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( boost::int64_t value )
+    :   type_( int_type )
+    ,   i_( value )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( boost::uint64_t value )
+    :   type_( int_type )
+    ,   i_( static_cast< boost::int64_t >( value ) )
+    ,   is_uint64_( true )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( double value )
+    :   type_( real_type )
+    ,   d_( value )
+    ,   is_uint64_( false )
+    {
+    }
+
+    template< class Config >
+    Value_impl< Config >::Value_impl( const Value_impl< Config >& other )
+    :   type_( other.type() )
+    ,   is_uint64_( other.is_uint64_ )
+    {
+        switch( type_ )
+        {
+            case str_type:   str_     = other.get_str();                               break;
+            case obj_type:   obj_p_   = Object_ptr( new Object( other.get_obj() ) );   break;
+            case array_type: array_p_ = Array_ptr ( new Array ( other.get_array() ) ); break;
+            case bool_type:  bool_    = other.get_bool();                              break;
+            case int_type:   i_       = other.get_int64();                             break;
+            case real_type:  d_       = other.get_real();                              break;
+            case null_type:                                                            break;
+            default: assert( false );
+        };
+    }
+
+    template< class Config >
+    Value_impl< Config >& Value_impl< Config >::operator=( const Value_impl& lhs )
+    {
+        Value_impl tmp( lhs );
+
+        std::swap( type_, tmp.type_ );
+        str_    .swap( tmp.str_ );
+        obj_p_  .swap( tmp.obj_p_ );
+        array_p_.swap( tmp.array_p_ );
+        std::swap( is_uint64_, tmp.is_uint64_ );
+
+        switch( type_ )
+        {
+            case bool_type:  std::swap( bool_,      tmp.bool_ );      break;
+            case int_type:   std::swap( i_,         tmp.i_ );         break;
+            case real_type:  std::swap( d_,         tmp.d_ );         break;
+            default: break;
+        };
+
+        return *this;
+    }
+
+    template< class Config >
+    bool Value_impl< Config >::operator==( const Value_impl& lhs ) const
+    {
+        if( this == &lhs ) return true;
+
+        if( type() != lhs.type() ) return false;
+
+        switch( type_ )
+        {
+            case str_type:   return get_str()   == lhs.get_str();
+            case obj_type:   return get_obj()   == lhs.get_obj();
+            case array_type: return get_array() == lhs.get_array();
+            case bool_type:  return get_bool()  == lhs.get_bool();
+            case int_type:   return ( get_int64() == lhs.get_int64() ) &&
+                                    ( is_uint64() == lhs.is_uint64() );
+            case real_type:  return get_real()  == lhs.get_real();
+            case null_type:  return true;
+        };
+
+        assert( false );
+
+        return false; 
+    }
+
+    template< class Config >
+    Value_type Value_impl< Config >::type() const
+    {
+        return type_;
+    }
+
+    template< class Config >
+    bool Value_impl< Config >::is_uint64() const
+    {
+        return is_uint64_;
+    }
+
+    template< class Config >
+    bool Value_impl< Config >::is_null() const
+    {
+        return type() == null_type;
+    }
+
+    template< class Config >
+    const typename Config::String_type& Value_impl< Config >::get_str() const
+    {
+        assert( type() == str_type );
+
+        return str_;
+    }
+
+    template< class Config >
+    const typename Value_impl< Config >::Object& Value_impl< Config >::get_obj() const
+    {
+        assert( type() == obj_type );
+
+        return *obj_p_;
+    }
+     
+    template< class Config >
+    const typename Value_impl< Config >::Array& Value_impl< Config >::get_array() const
+    {
+        assert( type() == array_type );
+
+        return *array_p_;
+    }
+     
+    template< class Config >
+    bool Value_impl< Config >::get_bool() const
+    {
+        assert( type() == bool_type );
+
+        return bool_;
+    }
+     
+    template< class Config >
+    int Value_impl< Config >::get_int() const
+    {
+        assert( type() == int_type );
+
+        return static_cast< int >( i_ );
+    }
+    
+    template< class Config >
+    boost::int64_t Value_impl< Config >::get_int64() const
+    {
+        assert( type() == int_type );
+
+        return i_;
+    }
+    
+    template< class Config >
+    boost::uint64_t Value_impl< Config >::get_uint64() const
+    {
+        assert( type() == int_type );
+
+        return static_cast< boost::uint64_t >( i_ );
+    }
+
+    template< class Config >
+    double Value_impl< Config >::get_real() const
+    {
+        if( type() == int_type )
+        {
+            return is_uint64() ? static_cast< double >( get_uint64() )
+                               : static_cast< double >( get_int64() );
+        }
+
+        assert( type() == real_type );
+
+        return d_;
+    }
+
+    template< class Config >
+    typename Value_impl< Config >::Object& Value_impl< Config >::get_obj()
+    {
+        assert( type() == obj_type );
+
+        return *obj_p_;
+    }
+
+    template< class Config >
+    typename Value_impl< Config >::Array& Value_impl< Config >::get_array()
+    {
+        assert( type() == array_type );
+
+        return *array_p_;
+    }
+
+    template< class Config >
+    Pair_impl< Config >::Pair_impl( const String_type& name, const Value_type& value )
+    :   name_( name )
+    ,   value_( value )
+    {
+    }
+
+    template< class Config >
+    bool Pair_impl< Config >::operator==( const Pair_impl< Config >& lhs ) const
+    {
+        if( this == &lhs ) return true;
+
+        return ( name_ == lhs.name_ ) && ( value_ == lhs.value_ );
+    }
+
+    // converts a C string, ie. 8 bit char array, to a string object
+    //
+    template < class String_type >
+    String_type to_str( const char* c_str )
+    {
+        String_type result;
+
+        for( const char* p = c_str; *p != 0; ++p )
+        {
+            result += *p;
+        }
+
+        return result;
+    }
+
+    //
+
+    namespace internal_
+    {
+        template< typename T >
+        struct Type_to_type
+        {
+        };
+
+        template< class Value > 
+        int get_value( const Value& value, Type_to_type< int > )
+        {
+            return value.get_int();
+        }
+       
+        template< class Value > 
+        boost::int64_t get_value( const Value& value, Type_to_type< boost::int64_t > )
+        {
+            return value.get_int64();
+        }
+       
+        template< class Value > 
+        boost::uint64_t get_value( const Value& value, Type_to_type< boost::uint64_t > )
+        {
+            return value.get_uint64();
+        }
+       
+        template< class Value > 
+        double get_value( const Value& value, Type_to_type< double > )
+        {
+            return value.get_real();
+        }
+       
+        template< class Value > 
+        typename Value::String_type get_value( const Value& value, Type_to_type< typename Value::String_type > )
+        {
+            return value.get_str();
+        }
+       
+        template< class Value > 
+        typename Value::Array get_value( const Value& value, Type_to_type< typename Value::Array > )
+        {
+            return value.get_array();
+        }
+       
+        template< class Value > 
+        typename Value::Object get_value( const Value& value, Type_to_type< typename Value::Object > )
+        {
+            return value.get_obj();
+        }
+       
+        template< class Value > 
+        bool get_value( const Value& value, Type_to_type< bool > )
+        {
+            return value.get_bool();
+        }
+    }
+
+    template< class Config >
+    template< typename T > 
+    T Value_impl< Config >::get_value() const
+    {
+        return internal_::get_value( *this, internal_::Type_to_type< T >() );
+    }
+}
+
+#endif
diff --git a/src/MarsCatalog/json_spirit_writer.cpp b/src/MarsCatalog/json_spirit_writer.cpp
new file mode 100644
index 0000000..e8c75d7
--- /dev/null
+++ b/src/MarsCatalog/json_spirit_writer.cpp
@@ -0,0 +1,329 @@
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+// json spirit version 4.00
+
+#include "json_spirit_writer.h"
+#include "json_spirit_value.h"
+
+#include <cassert>
+#include <sstream>
+#include <iomanip>
+
+using namespace json_spirit;
+using namespace std;
+
+namespace
+{
+    template< typename Char_type >
+    Char_type to_hex( Char_type c )
+    {
+        assert( c <= 0xF );
+
+        if( c < 10 ) return '0' + c;
+
+        return 'A' + c - 10;
+    }
+
+    template< class String_type >
+    String_type non_printable_to_string( unsigned int c )
+    {
+        String_type result( 6, '\\' );
+
+        result[1] = 'u';
+
+        result[ 5 ] = to_hex( c & 0x000F ); c >>= 4;
+        result[ 4 ] = to_hex( c & 0x000F ); c >>= 4;
+        result[ 3 ] = to_hex( c & 0x000F ); c >>= 4;
+        result[ 2 ] = to_hex( c & 0x000F );
+
+        return result;
+    }
+
+    template< typename Char_type, class String_type >
+    bool add_esc_char( Char_type c, String_type& s )
+    {
+        switch( c )
+        {
+            case '"':  s += to_str< String_type >( "\\\"" ); return true;
+            case '\\': s += to_str< String_type >( "\\\\" ); return true;
+            case '\b': s += to_str< String_type >( "\\b"  ); return true;
+            case '\f': s += to_str< String_type >( "\\f"  ); return true;
+            case '\n': s += to_str< String_type >( "\\n"  ); return true;
+            case '\r': s += to_str< String_type >( "\\r"  ); return true;
+            case '\t': s += to_str< String_type >( "\\t"  ); return true;
+        }
+
+        return false;
+    }
+
+    template< class String_type >
+    String_type add_esc_chars( const String_type& s )
+    {
+        typedef typename String_type::const_iterator Iter_type;
+        typedef typename String_type::value_type     Char_type;
+
+        String_type result;
+
+        const Iter_type end( s.end() );
+
+        for( Iter_type i = s.begin(); i != end; ++i )
+        {
+            const Char_type c( *i );
+
+            if( add_esc_char( c, result ) ) continue;
+
+            const wint_t unsigned_c( ( c >= 0 ) ? c : 256 + c );
+
+            if( iswprint( unsigned_c ) )
+            {
+                result += c;
+            }
+            else
+            {
+                result += non_printable_to_string< String_type >( unsigned_c );
+            }
+        }
+
+        return result;
+    }
+
+    // this class generates the JSON text,
+    // it keeps track of the indentation level etc.
+    //
+    template< class Value_type, class Ostream_type >
+    class Generator
+    {
+        typedef typename Value_type::Config_type Config_type;
+        typedef typename Config_type::String_type String_type;
+        typedef typename Config_type::Object_type Object_type;
+        typedef typename Config_type::Array_type Array_type;
+        typedef typename String_type::value_type Char_type;
+        typedef typename Object_type::value_type Obj_member_type;
+
+    public:
+
+        Generator( const Value_type& value, Ostream_type& os, bool pretty )
+        :   os_( os )
+        ,   indentation_level_( 0 )
+        ,   pretty_( pretty )
+        {
+            output( value );
+        }
+
+    private:
+
+        void output( const Value_type& value )
+        {
+            switch( value.type() )
+            {
+                case obj_type:   output( value.get_obj() );   break;
+                case array_type: output( value.get_array() ); break;
+                case str_type:   output( value.get_str() );   break;
+                case bool_type:  output( value.get_bool() );  break;
+                case int_type:   output_int( value );         break;
+                case real_type:  os_ << showpoint << setprecision( 16 ) 
+                                     << value.get_real();     break;
+                case null_type:  os_ << "null";               break;
+                default: assert( false );
+            }
+        }
+
+        void output( const Object_type& obj )
+        {
+            output_array_or_obj( obj, '{', '}' );
+        }
+
+        void output( const Array_type& arr )
+        {
+            output_array_or_obj( arr, '[', ']' );
+        }
+
+        void output( const Obj_member_type& member )
+        {
+            output( Config_type::get_name( member ) ); space(); 
+            os_ << ':'; space(); 
+            output( Config_type::get_value( member ) );
+        }
+
+        void output_int( const Value_type& value )
+        {
+            if( value.is_uint64() )
+            {
+                os_ << value.get_uint64();
+            }
+            else
+            {
+               os_ << value.get_int64();
+            }
+        }
+
+        void output( const String_type& s )
+        {
+            os_ << '"' << add_esc_chars( s ) << '"';
+        }
+
+        void output( bool b )
+        {
+            os_ << to_str< String_type >( b ? "true" : "false" );
+        }
+
+        template< class T >
+        void output_array_or_obj( const T& t, Char_type start_char, Char_type end_char )
+        {
+            os_ << start_char; new_line();
+
+            ++indentation_level_;
+            
+            for( typename T::const_iterator i = t.begin(); i != t.end(); ++i )
+            {
+                indent(); output( *i );
+
+                typename T::const_iterator next = i;
+
+                if( ++next != t.end())
+                {
+                    os_ << ',';
+                }
+
+                new_line();
+            }
+
+            --indentation_level_;
+
+            indent(); os_ << end_char;
+        }
+        
+        void indent()
+        {
+            if( !pretty_ ) return;
+
+            for( int i = 0; i < indentation_level_; ++i )
+            { 
+                os_ << "    ";
+            }
+        }
+
+        void space()
+        {
+            if( pretty_ ) os_ << ' ';
+        }
+
+        void new_line()
+        {
+            if( pretty_ ) os_ << '\n';
+        }
+
+        Ostream_type& os_;
+        int indentation_level_;
+        bool pretty_;
+    };
+
+    template< class Value_type, class Ostream_type >
+    void write_( const Value_type& value, Ostream_type& os, bool pretty )
+    {
+        Generator< Value_type, Ostream_type >( value, os, pretty );
+    }
+
+    template< class Value_type >
+    typename Value_type::String_type write_( const Value_type& value, bool pretty )
+    {
+        typedef typename Value_type::String_type::value_type Char_type;
+
+        basic_ostringstream< Char_type > os;
+
+        write_( value, os, pretty );
+
+        return os.str();
+    }
+}
+
+void json_spirit::write( const Value& value, std::ostream& os )
+{
+    write_( value, os, false );
+}
+
+void json_spirit::write_formatted( const Value& value, std::ostream& os )
+{
+    write_( value, os, true );
+}
+
+std::string json_spirit::write( const Value& value )
+{
+    return write_( value, false );
+}
+
+std::string json_spirit::write_formatted( const Value& value )
+{
+    return write_( value, true );
+}
+
+#ifndef BOOST_NO_STD_WSTRING
+
+void json_spirit::write( const wValue& value, std::wostream& os )
+{
+    write_( value, os, false );
+}
+
+void json_spirit::write_formatted( const wValue& value, std::wostream& os )
+{
+    write_( value, os, true );
+}
+
+std::wstring json_spirit::write( const wValue&  value )
+{
+    return write_( value, false );
+}
+
+std::wstring json_spirit::write_formatted( const wValue&  value )
+{
+    return write_( value, true );
+}
+
+#endif
+
+void json_spirit::write( const mValue& value, std::ostream& os )
+{
+    write_( value, os, false );
+}
+
+void json_spirit::write_formatted( const mValue& value, std::ostream& os )
+{
+    write_( value, os, true );
+}
+
+std::string json_spirit::write( const mValue& value )
+{
+    return write_( value, false );
+}
+
+std::string json_spirit::write_formatted( const mValue& value )
+{
+    return write_( value, true );
+}
+
+#ifndef BOOST_NO_STD_WSTRING
+
+void json_spirit::write( const wmValue& value, std::wostream& os )
+{
+    write_( value, os, false );
+}
+
+void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
+{
+    write_( value, os, true );
+}
+
+std::wstring json_spirit::write( const wmValue&  value )
+{
+    return write_( value, false );
+}
+
+std::wstring json_spirit::write_formatted( const wmValue&  value )
+{
+    return write_( value, true );
+}
+
+#endif
diff --git a/src/MarsCatalog/json_spirit_writer.h b/src/MarsCatalog/json_spirit_writer.h
new file mode 100644
index 0000000..d76011c
--- /dev/null
+++ b/src/MarsCatalog/json_spirit_writer.h
@@ -0,0 +1,52 @@
+#ifndef JASON_SPIRIT_WRITER
+#define JASON_SPIRIT_WRITER
+
+/* Copyright (c) 2007-2009 John W Wilkinson
+
+   This source code can be used for any purpose as long as
+   this comment is retained. */
+
+// json spirit version 4.00
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include "json_spirit_value.h"
+#include <iostream>
+
+namespace json_spirit
+{
+    // functions to convert JSON Values to text, 
+    // the "formatted" versions add whitespace to format the output nicely
+
+    void         write          ( const Value& value, std::ostream&  os );
+    void         write_formatted( const Value& value, std::ostream&  os );
+    std::string  write          ( const Value& value );
+    std::string  write_formatted( const Value& value );
+
+#ifndef BOOST_NO_STD_WSTRING
+
+    void         write          ( const wValue& value, std::wostream& os );
+    void         write_formatted( const wValue& value, std::wostream& os );
+    std::wstring write          ( const wValue& value );
+    std::wstring write_formatted( const wValue& value );
+
+#endif
+
+    void         write          ( const mValue& value, std::ostream&  os );
+    void         write_formatted( const mValue& value, std::ostream&  os );
+    std::string  write          ( const mValue& value );
+    std::string  write_formatted( const mValue& value );
+
+#ifndef BOOST_NO_STD_WSTRING
+
+    void         write          ( const wmValue& value, std::wostream& os );
+    void         write_formatted( const wmValue& value, std::wostream& os );
+    std::wstring write          ( const wmValue& value );
+    std::wstring write_formatted( const wmValue& value );
+
+#endif
+}
+
+#endif
diff --git a/src/MarsCatalog/mars.qrc b/src/MarsCatalog/mars.qrc
new file mode 100644
index 0000000..db20f3d
--- /dev/null
+++ b/src/MarsCatalog/mars.qrc
@@ -0,0 +1,5 @@
+<RCC>
+  <qresource prefix="mars" > 
+    <file alias="create_mars.svg">../images/create_mars.svg</file>
+  </qresource>
+</RCC>
\ No newline at end of file
diff --git a/src/Meteogram/Makefile.am b/src/Meteogram/Makefile.am
new file mode 100644
index 0000000..dcc7617
--- /dev/null
+++ b/src/Meteogram/Makefile.am
@@ -0,0 +1,39 @@
+bin_PROGRAMS = bin/MetPlus
+
+bin_MetPlus_SOURCES  = MetPlus.cc
+bin_MetPlus_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+
+share_DATA     = $(local_sharedir)/ObjectSpec.Meteogram \
+		 $(local_sharedir)/MetPlusDef \
+		 $(local_sharedir)/MetPlusRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} MetPlus.xpm  $(local_iconsdir)
+
+
+bin_SCRIPTS = metgram_client
+
+metgram_client: $(MAGPLUS_HOME)/bin/metgram
+	${INSTALL} $(MAGPLUS_HOME)/bin/metgram   metgram_client
+	${INSTALL} $(MAGPLUS_HOME)/bin/metgram   bin/metgram_client
+
+
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/MetPlus.xpm metgram_client
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = MetPlus.xpm MetPlusDef MetPlusRules ObjectSpec.Meteogram
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Meteogram/Makefile.in b/src/Meteogram/Makefile.in
new file mode 100644
index 0000000..30c7ff9
--- /dev/null
+++ b/src/Meteogram/Makefile.in
@@ -0,0 +1,735 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/MetPlus$(EXEEXT)
+subdir = src/Meteogram
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
+	"$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_MetPlus_OBJECTS = MetPlus.$(OBJEXT)
+bin_MetPlus_OBJECTS = $(am_bin_MetPlus_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_MetPlus_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+SCRIPTS = $(bin_SCRIPTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_MetPlus_SOURCES)
+DIST_SOURCES = $(bin_MetPlus_SOURCES)
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_MetPlus_SOURCES = MetPlus.cc
+bin_MetPlus_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Meteogram \
+		 $(local_sharedir)/MetPlusDef \
+		 $(local_sharedir)/MetPlusRules
+
+bin_SCRIPTS = metgram_client
+CLEANFILES = $(share_DATA) $(local_iconsdir)/MetPlus.xpm metgram_client
+BUILT_SOURCES = bin icons
+EXTRA_DIST = MetPlus.xpm MetPlusDef MetPlusRules ObjectSpec.Meteogram
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Meteogram/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Meteogram/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/MetPlus$(EXEEXT): $(bin_MetPlus_OBJECTS) $(bin_MetPlus_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/MetPlus$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_MetPlus_OBJECTS) $(bin_MetPlus_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MetPlus.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+	uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-shareDATA install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-binSCRIPTS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} MetPlus.xpm  $(local_iconsdir)
+
+metgram_client: $(MAGPLUS_HOME)/bin/metgram
+	${INSTALL} $(MAGPLUS_HOME)/bin/metgram   metgram_client
+	${INSTALL} $(MAGPLUS_HOME)/bin/metgram   bin/metgram_client
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Meteogram/MetPlus.cc b/src/Meteogram/MetPlus.cc
new file mode 100644
index 0000000..c1e5f0d
--- /dev/null
+++ b/src/Meteogram/MetPlus.cc
@@ -0,0 +1,586 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+//#define Box braz_box
+
+#include <inc_iostream.h>
+#include <stdlib.h>
+#include <Metview.h>
+#include <MvPath.hpp>
+
+
+
+using namespace std;
+
+
+
+//
+//_____________________________________________________________________
+
+class MetPlus : public MvService {
+public:
+	MetPlus();
+	void serve(MvRequest&,MvRequest&);
+protected:
+	map<string, string> databases_;
+    
+};
+
+//_____________________________________________________________________
+
+MetPlus::MetPlus() :  MvService("MetPlus")
+{
+     
+     MvRequest setup = mars.setup;
+     setup.rewind();
+     saveToPool(false);
+     
+     while ( setup )
+     { 
+        
+		if ( setup.getVerb() == Cached("MetPlus")  ) {
+			databases_["10_days_epsgram"]              = "10_days";
+  			databases_["15_days_epsgram"]              = "15_days";
+ 			databases_["10_days_metgram"]              = "10_days_metgram";
+ 			databases_["10_days_wave_epsgram"]         = "10_days_wave";
+ 			databases_["15_days_epsgram_with_climate"] = "15_days_with_clim";
+
+            break;
+		}
+		setup.advance();
+     }
+
+}
+
+static 
+void substitute(string& xml, const string& var, const string& val)
+{
+	string name("$");
+	name.append(var);
+	unsigned int index = xml.find(name);
+	int last = 0;
+	
+	while ( index != string::npos) {
+		xml.replace(index, name.length(), val);
+		last = index + val.length();
+		std::cout << "[" << name << "]" << "\n";
+		index = xml.find(name, last);
+        }
+
+//	std::cout << "[" << xml << "]" << "\n";
+}
+
+static string toString(double val)
+{
+    ostringstream tool;
+    tool.width(7);
+    tool.precision(5);
+    tool <<  val;
+    cout << "toString:" << val << "--->" <<  tool.str() << endl;
+    return tool.str();
+    
+}
+
+
+
+static string UpperCase(const string& s)
+{
+	string out;
+	for ( string::const_iterator l = s.begin(); l != s.end(); ++l)
+		out.push_back(toupper(*l));
+	return out;
+}
+
+
+
+static string format_spec (const string &format_to_check, const string &format_we_want,
+                           string &outfile, string &outclass)
+{
+    if (format_to_check == format_we_want)  // is this the one we want?
+    {
+        string extra_params = "";
+
+
+        // set the output class (the VERB in the output request)
+
+        if (format_to_check == "ps") outclass = "PSFILE";
+        else                         outclass = UpperCase (format_to_check);
+
+
+        // for single-page formats, turn off the first page numbering
+
+        if (format_to_check != "ps" && format_to_check != "pdf")
+        {
+            extra_params = string(" output_name_first_page_number=\'off\'");
+        }
+
+
+        // add the correct extension to the (temporary) output file
+
+        outfile.append(".");
+        outfile.append(format_to_check);
+
+
+        // create the MagML driver tag, e.g. "ps fullname = '/a/b/c'"
+
+        string spec(format_we_want);
+        spec.append(" fullname=\'");
+        spec.append(outfile);
+        spec.append("\'");
+        spec.append(extra_params);
+
+        return spec;
+    }
+    
+    else
+    {
+        // we do not want this format
+
+        string spec("no");              // e.g. "nosvg"
+        spec.append(format_to_check);
+        return spec;
+    }
+}
+
+
+void MetPlus::serve( MvRequest& in, MvRequest& out )
+{
+    cout << "--------------MetPlus::serve()--------------" << endl;
+    in.print();
+  
+    vector<string> tempFileNames;  // will store a list of all the temporary filenames used
+
+    string outclass = "BAD";
+    string outputFileName = marstmp();
+
+
+
+    // ----------------------------------------------------
+    // --- construct the string that will be written to the 
+    // --- xml metgram request file
+    // ----------------------------------------------------
+    
+    string format;
+    string mgrequest;
+    string mainTag;
+
+
+    // an example request looks like this:
+    // <eps template='10_days' date='latest' format='a4'>
+    //     <station name='Reading' latitude='51.4' longitude='-1'  height='48' psfile='/xyz/Reading.ps' giffile='Reading.gif'/>
+    // </eps>
+
+
+    // get the data selection type (local, date or latest)
+
+    string dataSelectionType = (const char*) in("DATA_SELECTION_TYPE");
+
+
+    // start creating our xml metgram request. We will write this to the file 'mgrequestfile'
+
+
+    if (dataSelectionType == "LOCAL") mainTag = "epslocal";
+    else                              mainTag = "eps";
+
+
+    mgrequest = "<" + mainTag + " ";
+
+
+    // get the template we'll use (e.g. 10 days eps)
+    // first, convert the name to what the metgram client expects
+
+    string type     = (const char*) in("type");
+    type = databases_[type];
+    mgrequest += "template='" + type + "' ";
+
+
+    if (dataSelectionType == "DATE")
+    {
+        // get the date as a full string
+
+        MvDate date = in("DATE");
+        ostringstream date_option;
+        date_option << date.YyyyMmDd();
+        mgrequest += "date='" + date_option.str() + "' ";
+
+
+        // get the time as a full string
+
+        int time = in("FORECAST_RUN_TIME");
+        ostringstream time_option;
+        time_option << setw(4) << setfill('0') << time*100;
+        mgrequest += "time='" + time_option.str() + "' ";
+    }
+
+    else if (dataSelectionType == "LATEST")
+    {
+        mgrequest += "date='latest' ";
+    }
+    
+    else if (dataSelectionType == "LOCAL")
+    {
+        string database = (const char*) in("database");
+
+        mgrequest += "database='" + database + "' ";
+    }
+
+
+    // get the experiment number
+
+    string experiment = (const char*) in("EXPERIMENT");
+
+    if (!experiment.empty())
+        mgrequest += "expver='" + experiment + "' ";
+
+
+
+    // get the size (A4, A3, etc)
+    // - also make a note of where we are in the string because we might want
+    //   to hardcode this to A3 if the user wants a raster file generated.
+
+	string size = "a4";
+    mgrequest += "format='" + size + "' ";
+    size_t a4_char_position = mgrequest.size() - 3;
+
+
+    // close the eps tag
+    
+    mgrequest += ">\n    ";
+
+
+    // --- loop through the stations
+
+    MvRequest station = in("station");
+    
+    while (station)
+    {
+        // start the embedded station tag
+
+        mgrequest += "<station ";
+
+
+        // get the station name for the title
+
+        string title_option = (const char*) station("NAME");
+        mgrequest += "name='" + title_option + "' ";
+
+
+        // get the station coordinates
+
+        string latitude_option  = toString(station("LATITUDE"));
+        string longitude_option = toString(station("LONGITUDE"));
+        mgrequest += "latitude='"  + latitude_option + "' ";
+        mgrequest += "longitude='" + longitude_option + "' ";
+
+
+        // get the station height
+
+        if  (station.countValues("HEIGHT") != 0)
+        {
+            string height_option = toString(station("HEIGHT"));
+
+            if (!height_option.empty())
+                mgrequest += "height='" + height_option + "' ";
+        }
+
+
+        // get the file format option
+
+	    format = (const char*) in("format");	
+        string format_option;
+
+             if (format == "ps")    format_option = "psfile";
+        else if (format == "png")   format_option = "pngfile";
+        else if (format == "gif")   format_option = "giffile";
+        else if (format == "jpeg")  format_option = "jpgfile";
+        else if (format == "pdf")   format_option = "pdffile";
+        else                        format_option = "psfile";
+        // SVG????????????
+
+
+        string tmpOutputFileName = marstmp();
+        mgrequest += format_option + "='" + tmpOutputFileName + "' ";
+
+        tempFileNames.push_back(tmpOutputFileName);  // remember which filename we used
+
+
+        // if we are creating a raster image, then set the format to a3 so
+        // that the conversion looks better (the web metgram server actually
+        // generates a ps file and then converts that to raster).
+
+        if (format == "png" || format == "gif" || format == "jpeg")
+        {
+            mgrequest.replace (a4_char_position, 1, "3");
+        }
+
+
+        // close the station tag
+
+        mgrequest += "/>\n";
+
+        station.advance();
+    }
+
+
+    // finally add the closing eps tag
+
+    mgrequest += "</" + mainTag + ">\n";
+
+
+
+    // we only support multiple stations with PostScript output
+    // (for backwards compatibility with the previous metgram module)
+
+    if (tempFileNames.size() > 1 && format != "ps")
+    {
+        setError(1, "Multiple stations only supported with PostScript output; use 'ps' output or use multiple calls. Aborting.");
+        return;
+    }
+
+
+
+    cout << mgrequest;
+
+
+    // write the request to a text file
+
+    string mgrequestfile = marstmp();  // the name of the temporary file we'll write our xml request to
+
+
+    ofstream xmlrequestfile;
+    xmlrequestfile.open (mgrequestfile.c_str());
+
+    if (xmlrequestfile.is_open())
+    {
+        xmlrequestfile << mgrequest;
+        xmlrequestfile.close();
+    }
+    else
+    {
+        setError(1, "Failed to write xml metgram request file: ", mgrequestfile.c_str());
+    }
+
+
+    // run the metgram command
+
+    string command = getenv("METVIEW_BIN");
+    command += "/metgram_client " + mgrequestfile;
+
+    cout << "Running command: " << command << endl;
+    int return_code = system (command.c_str());
+    cout << "Returned: " << return_code << endl;
+
+
+    // successful execution?
+
+    if (return_code == 0)
+    {
+        // check if any of the returned files are either non-existent or of zero-length
+        
+        bool allFilesOk = true;
+    
+        for (size_t i = 0; i < tempFileNames.size(); i++)
+        {
+            if (!FileHasValidSize(tempFileNames[i].c_str()))
+            {
+                allFilesOk = false;
+                break;
+            }
+        }
+        
+        if (allFilesOk)
+        {
+            // copy the temporary files to their proper destinations
+
+            if (format == "ps")
+            {
+                if (tempFileNames.size() > 1)
+                {
+                    // multiple metgrams - join them into one
+
+                    string psJoinCommand = "psjoin -p ";
+
+                    for (size_t i = 0; i < tempFileNames.size(); i++)
+                    {
+                        psJoinCommand += tempFileNames[i] + " ";
+                    }
+
+                    psJoinCommand += " > " + outputFileName;
+
+                    cout << "running: " << psJoinCommand;
+
+                    system (psJoinCommand.c_str());
+                }
+
+                else
+                {
+                    // otherwise, just one file so copy it to the dest filename
+
+                    copyfile(tempFileNames[0].c_str(), outputFileName.c_str());
+                }
+            }
+
+            else
+            {
+                 // otherwise, just one file so copy it to the dest filename
+
+                copyfile(tempFileNames[0].c_str(), outputFileName.c_str());
+            }
+
+
+            // return the path to the output file
+            // - this will allow the user to save or visualise the result
+
+            string outclass;
+
+            if (format == "ps")  outclass = "PSFILE";
+            else                 outclass = UpperCase (format);
+
+            MvRequest data (outclass.c_str());
+
+            data("PATH") = outputFileName.c_str();
+            //data("TEMPORARY") = 1;
+            data.print();
+            out = data;
+        }
+
+        else  // not all the files are ok
+        {
+            // the script appeared to connect to the server ok, but it seems
+            // that we did not get a valid file back from it
+            // this will cause the program to fail and abort
+
+            setError(1, "Invalid file returned from server (non-existant or zero size)");
+        }
+    }
+    
+    else
+    {
+        // execution failed
+        setError(1, "Failed to connect to the metgram server");
+    }
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+/*
+
+    if ( database == "latest") 
+        database = databases_[type];
+
+  
+    ostringstream maxint;
+    maxint << MAGINT_MAX;
+
+
+    MvRequest station = in("station");
+    string latitude   = toString(double(station("LATITUDE")));
+    string longitude  = toString(double(station("LONGITUDE")));
+    string name       = (const char*) station("NAME");
+    double h = station("HEIGHT");
+    string height     = h ? toString(h) : maxint.str();
+  
+  
+    string xml      = marstmp();
+    string outfile  = marstmp();
+
+    string psinfo  = format_spec ("ps",  format, outfile, outclass);
+    string svginfo = format_spec ("svg", format, outfile, outclass);
+    string gifinfo = format_spec ("gif", format, outfile, outclass);
+    string pnginfo = format_spec ("png", format, outfile, outclass);
+    string pdfinfo = format_spec ("pdf", format, outfile, outclass);
+  
+
+    ostringstream magml;
+    string magplushome = getenv("MAGPLUS_HOME");
+    string template_file = magplushome;
+    template_file.append("/share/templates/");
+    template_file.append(type);
+    template_file.append(".xml");
+    magml << template_file;
+
+    cout << "Using template: " << template_file << endl;
+  
+  
+
+  try {
+        ifstream instream(magml.str().c_str());
+        ofstream outstream(xml.c_str());
+        if (!instream)
+        {            
+            cout << "Could not read template file '" << template_file << "'" << endl;
+            return;
+        }
+
+        string s; 
+        s = "";
+        
+        char c;
+        while(instream.get(c))
+        {
+            s += c;
+        }
+    
+        substitute(s, "latitude", latitude);
+        substitute(s, "longitude", longitude);
+        substitute(s, "station", name);
+        substitute(s, "title", name);
+        substitute(s, "height", height);
+        substitute(s, "database", database);
+        substitute(s, "meta", "nometa");
+        substitute(s, "format", "a4");
+        substitute(s, "date", "");
+        substitute(s, "time", "");
+        substitute(s, "ps",  psinfo);
+        substitute(s, "pdf", pdfinfo);
+        substitute(s, "svg", svginfo);
+        substitute(s, "gif", gifinfo);
+        substitute(s, "png", pnginfo);
+        
+        outstream << s;
+        cout << s;
+    
+
+        instream.close();
+        outstream.close();
+
+        manager_.execute(xml);
+               
+    }
+    catch (exception e)
+    {
+        cout << "Exception caught after manager_.execute()" << endl;
+    }
+
+
+
+    MvRequest data(outclass.c_str());
+    data("PATH") = outfile.c_str();
+    //data("TEMPORARY") = 1;
+    data.print();
+    out = data;
+*/
+}
+//_____________________________________________________________________
+
+int main( int argc, char** argv )
+{
+    MvApplication theApp( argc, argv );
+    MetPlus tool;
+    theApp.run();
+}
+
+
diff --git a/src/Meteogram/MetPlus.xpm b/src/Meteogram/MetPlus.xpm
new file mode 100644
index 0000000..22254a1
--- /dev/null
+++ b/src/Meteogram/MetPlus.xpm
@@ -0,0 +1,515 @@
+/* XPM */
+static char * MetPlus_xpm[] = {
+"32 32 480 2",
+"  	c #000000",
+". 	c #FFFFFF",
+"+ 	c #D6D6FF",
+"@ 	c #E1E1FF",
+"# 	c #C8C8FF",
+"$ 	c #CFCFFF",
+"% 	c #DFDFFF",
+"& 	c #CECEFF",
+"* 	c #D7D7FF",
+"= 	c #BFBFFF",
+"- 	c #C5C5FF",
+"; 	c #CDCDFF",
+"> 	c #BCBCFF",
+", 	c #C4C4FF",
+"' 	c #C3C3FF",
+") 	c #B3B3FF",
+"! 	c #D4D4FF",
+"~ 	c #C6C6FF",
+"{ 	c #C9C9FF",
+"] 	c #BEBEFF",
+"^ 	c #D1D1FF",
+"/ 	c #D0D0FF",
+"( 	c #E4E3FF",
+"_ 	c #D9D9FF",
+": 	c #D7D8FF",
+"< 	c #E5E4FF",
+"[ 	c #F7F3FF",
+"} 	c #ECDFFF",
+"| 	c #D5D9D0",
+"1 	c #E6DFE8",
+"2 	c #F3EDEC",
+"3 	c #FDF3F4",
+"4 	c #C8CED8",
+"5 	c #CBCBD4",
+"6 	c #B8C1C4",
+"7 	c #35AAB7",
+"8 	c #C0D2E0",
+"9 	c #53A0B0",
+"0 	c #A2D8D0",
+"a 	c #61AAC9",
+"b 	c #C1B8D2",
+"c 	c #4AD8CD",
+"d 	c #B9C2D9",
+"e 	c #8FB9C4",
+"f 	c #71BFCE",
+"g 	c #A4B7B1",
+"h 	c #7AD5D1",
+"i 	c #A1D5D1",
+"j 	c #37A0C0",
+"k 	c #A4CBD9",
+"l 	c #2FA9C0",
+"m 	c #97CAD5",
+"n 	c #41A6BE",
+"o 	c #9AD0D2",
+"p 	c #4EB8D8",
+"q 	c #66B5B6",
+"r 	c #FBFBF9",
+"s 	c #97B7BB",
+"t 	c #F9E5DD",
+"u 	c #57CBC7",
+"v 	c #F6FDF2",
+"w 	c #35ADC2",
+"x 	c #93C4D3",
+"y 	c #2FCAC3",
+"z 	c #CAECE6",
+"A 	c #00C0D8",
+"B 	c #BCBCD2",
+"C 	c #7CE4D8",
+"D 	c #40B3CF",
+"E 	c #5DBFBA",
+"F 	c #30EBE7",
+"G 	c #91CCE1",
+"H 	c #09CAC5",
+"I 	c #FFFFF7",
+"J 	c #63C7C0",
+"K 	c #B1D5F9",
+"L 	c #4FE6D9",
+"M 	c #8A97C4",
+"N 	c #21DFDD",
+"O 	c #3BA7BF",
+"P 	c #F9F7F6",
+"Q 	c #FEFDFE",
+"R 	c #AFC1C0",
+"S 	c #FFFDFD",
+"T 	c #67CDCE",
+"U 	c #E3F6F3",
+"V 	c #C4CDE0",
+"W 	c #77B5CF",
+"X 	c #32C7BF",
+"Y 	c #EEDFDB",
+"Z 	c #00CAE3",
+"` 	c #EACBCE",
+" .	c #7DF0E7",
+"..	c #7BAFC8",
+"+.	c #7AD4CB",
+"@.	c #46ECE2",
+"#.	c #A0C3DB",
+"$.	c #85CFC9",
+"%.	c #F7F8F8",
+"&.	c #89CAC7",
+"*.	c #FFF9F6",
+"=.	c #43E1D9",
+"-.	c #F0C0CE",
+";.	c #2FF4E7",
+">.	c #1D9EB8",
+",.	c #F4F4F1",
+"'.	c #F9FDFB",
+").	c #FFFEFF",
+"!.	c #37D7D5",
+"~.	c #A6CDCE",
+"{.	c #BDEDEA",
+"].	c #FFF3EA",
+"^.	c #B8C0E6",
+"/.	c #83CAC5",
+"(.	c #FFF6F2",
+"_.	c #00CDC9",
+":.	c #FFE4E2",
+"<.	c #66E8E4",
+"[.	c #9ECCD4",
+"}.	c #5DCCDF",
+"|.	c #57CCD2",
+"1.	c #94CAE1",
+"2.	c #89D2CB",
+"3.	c #DAF3F1",
+"4.	c #AFD1D2",
+"5.	c #EBF6F4",
+"6.	c #60C4C3",
+"7.	c #FFE0DF",
+"8.	c #66E3DB",
+"9.	c #0B9DB7",
+"0.	c #F4F4F3",
+"a.	c #34C8C8",
+"b.	c #E3DAD8",
+"c.	c #E5F1F0",
+"d.	c #F8EDEB",
+"e.	c #F6EAE5",
+"f.	c #53E9E5",
+"g.	c #FFFDFE",
+"h.	c #57B5B5",
+"i.	c #FFE9E9",
+"j.	c #72D8D7",
+"k.	c #B5DED5",
+"l.	c #5FB4E5",
+"m.	c #48B4C0",
+"n.	c #A0C7DA",
+"o.	c #CBE9E1",
+"p.	c #F8F8F8",
+"q.	c #A2CECE",
+"r.	c #DDF4F2",
+"s.	c #57C5C5",
+"t.	c #FFDCDC",
+"u.	c #75E5DF",
+"v.	c #15AFC7",
+"w.	c #FAF7F7",
+"x.	c #59C8C9",
+"y.	c #F5F3F4",
+"z.	c #F6F4F5",
+"A.	c #79BFC0",
+"B.	c #68A1A2",
+"C.	c #FFF0F1",
+"D.	c #9ED4D4",
+"E.	c #97D5D0",
+"F.	c #DBE8EE",
+"G.	c #68BAD7",
+"H.	c #78AEC0",
+"I.	c #B1DDDA",
+"J.	c #8BC5C6",
+"K.	c #D9EEEF",
+"L.	c #8BCFD0",
+"M.	c #CFE4E5",
+"N.	c #78BFBC",
+"O.	c #40A1BD",
+"P.	c #F9FDEF",
+"Q.	c #FFFFF1",
+"R.	c #FFFFFB",
+"S.	c #FFFFFD",
+"T.	c #F8FFF6",
+"U.	c #FBFEFC",
+"V.	c #FFFFFE",
+"W.	c #F3F5EF",
+"X.	c #F9EDEA",
+"Y.	c #FFFEFA",
+"Z.	c #FFFFFC",
+"`.	c #FBF2F9",
+" +	c #FFF6ED",
+".+	c #FFFEF9",
+"++	c #F6F4F0",
+"@+	c #ECF2EE",
+"#+	c #FEFFFC",
+"$+	c #FDEAE4",
+"%+	c #E9EBEF",
+"&+	c #D3D1FD",
+"*+	c #BFBBFA",
+"=+	c #C2BFFC",
+"-+	c #B8B0F7",
+";+	c #BCB7FA",
+">+	c #D4D3FB",
+",+	c #C4C2FE",
+"'+	c #BBB1F7",
+")+	c #FFDADF",
+"!+	c #FFEDEB",
+"~+	c #FFF2F4",
+"{+	c #FFEFEE",
+"]+	c #FFEBEA",
+"^+	c #FFE5E3",
+"/+	c #FFEEED",
+"(+	c #FFE8EA",
+"_+	c #FFF7F7",
+":+	c #FFF5F4",
+"<+	c #FDFDF4",
+"[+	c #F5F6E5",
+"}+	c #FFFFF2",
+"|+	c #FCFFF5",
+"1+	c #DAE1D7",
+"2+	c #F5FCFA",
+"3+	c #DEDFF3",
+"4+	c #EDF1EE",
+"5+	c #FAFCF8",
+"6+	c #E0EAE6",
+"7+	c #E8E9EA",
+"8+	c #EEF2F1",
+"9+	c #EAEFED",
+"0+	c #ECEFF0",
+"a+	c #E8E9EB",
+"b+	c #E9EBEC",
+"c+	c #FBFFFF",
+"d+	c #F8F7F4",
+"e+	c #CCD0D1",
+"f+	c #EFEFEE",
+"g+	c #F7F8F7",
+"h+	c #DCE1DB",
+"i+	c #E3E5FE",
+"j+	c #DDD2E9",
+"k+	c #E4E0DA",
+"l+	c #FFEDFF",
+"m+	c #A0D6D0",
+"n+	c #FAECED",
+"o+	c #F3F3F2",
+"p+	c #EDEEEC",
+"q+	c #F0EEF0",
+"r+	c #D3D3D3",
+"s+	c #DCDDDE",
+"t+	c #FDFFFF",
+"u+	c #FCF9F9",
+"v+	c #EAEBEA",
+"w+	c #A6D4D5",
+"x+	c #E2E0E1",
+"y+	c #F8F3F1",
+"z+	c #F5EDE2",
+"A+	c #FCDBED",
+"B+	c #C9BED3",
+"C+	c #F3E5D9",
+"D+	c #A3BBF1",
+"E+	c #73DED4",
+"F+	c #FFEFEF",
+"G+	c #F7F6F5",
+"H+	c #F1F1F0",
+"I+	c #F3F2F3",
+"J+	c #D7D7D6",
+"K+	c #D4D4D3",
+"L+	c #F4F5F4",
+"M+	c #FDFAFA",
+"N+	c #ECEDEC",
+"O+	c #67D4D2",
+"P+	c #DAEBE3",
+"Q+	c #FFFFF9",
+"R+	c #A1D9E0",
+"S+	c #D2E3EC",
+"T+	c #BAC7D7",
+"U+	c #90B7CD",
+"V+	c #FCFDFC",
+"W+	c #9BE2D5",
+"X+	c #9BAAD9",
+"Y+	c #5FE8DF",
+"Z+	c #FFECE7",
+"`+	c #FFFDFB",
+" @	c #F1F1EF",
+".@	c #DEDFE0",
+"+@	c #F5F8F7",
+"@@	c #D9D9D8",
+"#@	c #F5F5F5",
+"$@	c #FFFFFA",
+"%@	c #31B5B7",
+"&@	c #A3B8D2",
+"*@	c #F7FFF8",
+"=@	c #6F96AF",
+"-@	c #829ACC",
+";@	c #A6FBEF",
+">@	c #91B0C4",
+",@	c #EBE9E5",
+"'@	c #66CBD5",
+")@	c #D4E6E8",
+"!@	c #42D7EA",
+"~@	c #AADED6",
+"{@	c #DAF3EF",
+"]@	c #F4ECE6",
+"^@	c #E6E4E0",
+"/@	c #E7E5E0",
+"(@	c #ECDEE7",
+"_@	c #236C82",
+":@	c #F2C0D6",
+"<@	c #0A8AA6",
+"[@	c #86BBB0",
+"}@	c #B6A9B5",
+"|@	c #5491AC",
+"1@	c #3CBBB9",
+"2@	c #00ACAA",
+"3@	c #87D4CA",
+"4@	c #1C8091",
+"5@	c #F9D2E8",
+"6@	c #246E7E",
+"7@	c #F0CFDF",
+"8@	c #0083A3",
+"9@	c #3EA498",
+"0@	c #1D82A8",
+"a@	c #1290A4",
+"b@	c #78B7CC",
+"c@	c #D9C7D2",
+"d@	c #66A5BA",
+"e@	c #7AA6BC",
+"f@	c #CDD6E0",
+"g@	c #8EADBA",
+"h@	c #E5D5E2",
+"i@	c #8C99AA",
+"j@	c #96BECD",
+"k@	c #DAD9DB",
+"l@	c #F6F5FF",
+"m@	c #F9F8FF",
+"n@	c #FEFEFF",
+"o@	c #FCFCFF",
+"p@	c #FBFBFF",
+"q@	c #FDFCFF",
+"r@	c #EEEEFF",
+"s@	c #F0F0FF",
+"t@	c #F1F1FF",
+"u@	c #FBFAFF",
+"v@	c #F3F3FF",
+"w@	c #D8D7F5",
+"x@	c #DCDBF7",
+"y@	c #C8C7F6",
+"z@	c #CBCBF6",
+"A@	c #D0D0F6",
+"B@	c #C8C5F6",
+"C@	c #D0CFF6",
+"D@	c #D5D4F6",
+"E@	c #C7C7F6",
+"F@	c #E0DFF6",
+"G@	c #B4B4F6",
+"H@	c #DFDCF6",
+"I@	c #EFEFF6",
+"J@	c #D1D1F6",
+"K@	c #E9E8F6",
+"L@	c #CAC7F6",
+"M@	c #E6E5F6",
+"N@	c #D3D3F6",
+"O@	c #E0DDF6",
+"P@	c #CACAF5",
+"Q@	c #DAD9FF",
+"R@	c #DAD8FF",
+"S@	c #E6DCFF",
+"T@	c #E3D9FF",
+"U@	c #FCFBF6",
+"V@	c #DDDACB",
+"W@	c #FFFFED",
+"X@	c #37A0B8",
+"Y@	c #F8F6F7",
+"Z@	c #FAFDFC",
+"`@	c #FFFEFE",
+" #	c #F2F7F3",
+".#	c #E8E2E3",
+"+#	c #F4F8F3",
+"@#	c #9AC0C2",
+"##	c #DBE8E3",
+"$#	c #58A5CA",
+"%#	c #62BDC1",
+"&#	c #0093A1",
+"*#	c #CFE8FF",
+"=#	c #FAF8F9",
+"-#	c #FCFFFE",
+";#	c #EAE7E5",
+">#	c #7CACB3",
+",#	c #8FCCD5",
+"'#	c #A1D8DE",
+")#	c #6BA4B4",
+"!#	c #7EB7C5",
+"~#	c #207E7C",
+"{#	c #F6FFFD",
+"]#	c #E6EEF4",
+"^#	c #13758D",
+"/#	c #BAC8DE",
+"(#	c #98B3D1",
+"_#	c #D6C6D8",
+":#	c #8199AA",
+"<#	c #FFF6FF",
+"[#	c #97D7CC",
+"}#	c #D4B2CD",
+"|#	c #F1F8F4",
+"1#	c #FFFDF5",
+"2#	c #FFE9FF",
+"3#	c #6697B6",
+"4#	c #C1BDD7",
+"5#	c #B5B2C6",
+"6#	c #FFDFF3",
+"7#	c #ECDBEC",
+"8#	c #EAD6F9",
+"9#	c #A3B9C9",
+"0#	c #E6D7EC",
+"a#	c #FFF4FB",
+"b#	c #F9D6EA",
+"c#	c #BDBFBF",
+"d#	c #FFFBFF",
+"e#	c #8FE7F8",
+"f#	c #829DB7",
+"g#	c #5AACB4",
+"h#	c #A7AFD2",
+"i#	c #999EB6",
+"j#	c #E4D8EE",
+"k#	c #297F96",
+"l#	c #879AB1",
+"m#	c #CDC4DD",
+"n#	c #699CB3",
+"o#	c #A9DADE",
+"p#	c #3B789D",
+"q#	c #9FCCE2",
+"r#	c #2790B1",
+"s#	c #91C7DE",
+"t#	c #65B0BB",
+"u#	c #4088A0",
+"v#	c #96DAD9",
+"w#	c #006294",
+"x#	c #BBF3ED",
+"y#	c #46C4C0",
+"z#	c #80C2C2",
+"A#	c #C9C9C6",
+"B#	c #F3F3E3",
+"C#	c #E0F7F0",
+"D#	c #F8F6E9",
+"E#	c #9FD7C9",
+"F#	c #FFFFF8",
+"G#	c #C1CCBB",
+"H#	c #FFFFF3",
+"I#	c #FDF9EB",
+"J#	c #CBF2E7",
+"K#	c #EEEDDC",
+"L#	c #F4F1ED",
+"M#	c #EFECEA",
+"N#	c #FAEFFF",
+"O#	c #F2F1FF",
+"P#	c #EAECFF",
+"Q#	c #E3E2FF",
+"R#	c #D0D1FF",
+"S#	c #FFD9D1",
+"T#	c #FFD4CD",
+"U#	c #F5FFFF",
+"V#	c #C0C6FF",
+"W#	c #EBE9FF",
+"X#	c #F6F6FF",
+"Y#	c #CDCAFF",
+"Z#	c #F1F3FF",
+"`#	c #E1DFFF",
+" $	c #F8FAFD",
+".$	c #D4D6FF",
+"+$	c #CFCEFF",
+"@$	c #D3D0FF",
+"#$	c #E5E2FF",
+"$$	c #E9EDFE",
+"%$	c #C7C8FF",
+"&$	c #E2E9FF",
+"*$	c #FFD9D5",
+"=$	c #FFD4D5",
+"-$	c #FCF7F5",
+";$	c #E0E0FF",
+">$	c #F3F2FF",
+",$	c #CFD2FF",
+"'$	c #CBD7FF",
+")$	c #FFD5D0",
+"!$	c #FFDAD4",
+"~$	c #FFE3DA",
+"{$	c #C6C5FF",
+"]$	c #DEDEFF",
+"                                                                ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . + @ # $ % & * = - ; > , ' & ) ! ~ { ) ] ^ @ / ^ ^ ^ ^ ; .   ",
+"  . ( _ : % < [ } . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . | 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p q .   ",
+"  . r . . . . s t u v w x y z A B C D E F G H I J K L M N O .   ",
+"  . P . Q . . R S T U V W X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>..   ",
+"  . ,.. '.).. !.. ~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9..   ",
+"  . 0.. '.Q . a.. b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v..   ",
+"  . w.. . . . x.. y.z.. . A.. B.C.D.E.F.G.H.I.. J.K.L.M.N.O..   ",
+"  . P.I Q.I R.Q.S.S.T.U.V.W.. X.. Y.Z.. `. +.+. ++. @+#+$+%+.   ",
+"  . &+*+=+-+;+>+,+'+)+. !+S.S V.~+{+]+^+. . /+(+. ]+V._+:+. .   ",
+"  . <+. . [+. . }+|+1+2+3+. . . 4+5+6+7+8+. 9+0+. a+. b+. c+.   ",
+"  . d+. . e+. . f+g+h+i+j+. ).. k+l+m+n+o+. p+q+. r+. s+. t+.   ",
+"  . u+v+. w+x+. y+Y.z+A+B+. ).. C+D+E+F+G+. H+I+. J+. K+L+. .   ",
+"  . M+N+. O+P+. Q+R+S+T+U+. V+. W+X+Y+Z+`+ @L+. at +@@@. J+#@. .   ",
+"  . . $@. %@&@. *@=@-@;@>@. , at . '@)@!@~@{@R.. ]@. ^@. /@S.. .   ",
+"  . (@_@:@<@[@}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@e at f@g at h@i at j@k at .   ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . l at m@. . n at . ).o at . p at . . q at r@n at m@s at t@o at u@v at t@. . . . . . .   ",
+"  . w at x@y at z@y at A@B at C@D at E@F at G@H at F@I at J@K at L@M at N@O at P@Q at R@R at S@S at T@.   ",
+"  . U at . V.. . V.. . V.. . . . . . . . . . . . . . V at W@. X at Q+.   ",
+"  . Y at . Z@`@`@t+. . . . . .  #. . .#. . +#. @###. $#%#. &#*#.   ",
+"  . =#. -#. . . ;#>#. ,#'#. )#!#. ~#{#]#^#. /#(#. _#:#<#[#}#.   ",
+"  . Z.|#. . 1#. 2#3#. 4#5#. 6#7#.+8#9#0#. a#b#. c#d#e#f#. g#.   ",
+"  . . h#i#j#k#l#m#. n#o#. p#. q#r#. s#t#. u#v#. w#. x#y#. z#.   ",
+"  . A#S.. B#. . C#. . D#. E#. F#G#. R.H#. I#J#. K#. $@L#. M#.   ",
+"  . N#O#P#Q#R#. S#T#U#V#W#X#Y#Z#`#!  $.$+$. @$#$$$%$&$*$=$-$.   ",
+"  . ;$;$. . >$,$'$)$!$~$. . . . {$; ]$. . . . . . . . . . . .   ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ",
+"                                                                "};
diff --git a/src/Meteogram/MetPlusDef b/src/Meteogram/MetPlusDef
new file mode 100644
index 0000000..d00db08
--- /dev/null
+++ b/src/Meteogram/MetPlusDef
@@ -0,0 +1,57 @@
+MetPlus; New Metgram module; MetPlus
+{
+    type {
+        10_days_epsgram
+        15_days_epsgram
+        10_days_metgram
+        10_days_wave_epsgram
+        15_days_epsgram_with_climate
+    } = 15_days_epsgram
+    
+    
+    station 
+		[ interface = icon, class = STATION, exclusive = false,
+		  help            = help_data,missing = fatal,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Station for Meteogram,
+		  help_class      = STATIONS,
+		  help_definition = ( STATIONS, NAME = Heathrow ) ]
+	{ @ / }
+	
+
+    DATA_SELECTION_TYPE
+    {
+        LATEST
+        DATE
+        LOCAL
+    } = LATEST
+
+
+	DATE
+	{
+		*
+	} = -1
+
+	FORECAST_RUN_TIME
+	{
+		00
+		12
+	} = 12
+
+	EXPERIMENT
+	{
+		*
+	} = 0001
+
+
+    format {
+        PostScript ; ps
+        PDF        ; pdf
+        GIF        ; gif
+        PNG        ; png
+#        SVG        ; svg
+    } = PostScript
+
+
+	database { @ } = latest	
+}
diff --git a/src/Meteogram/MetPlusRules b/src/Meteogram/MetPlusRules
new file mode 100644
index 0000000..dfd15b3
--- /dev/null
+++ b/src/Meteogram/MetPlusRules
@@ -0,0 +1,13 @@
+
+%if DATA_SELECTION_TYPE = LATEST %then		
+	%unset DATE
+	%unset FORECAST_RUN_TIME
+	%unset database
+
+%if DATA_SELECTION_TYPE = DATE %then		
+	%unset database
+
+%if DATA_SELECTION_TYPE = LOCAL %then		
+	%unset DATE
+	%unset FORECAST_RUN_TIME
+
diff --git a/src/Meteogram/ObjectSpec.Meteogram b/src/Meteogram/ObjectSpec.Meteogram
new file mode 100644
index 0000000..5db6123
--- /dev/null
+++ b/src/Meteogram/ObjectSpec.Meteogram
@@ -0,0 +1,29 @@
+
+object,
+	class		= MetPlus,
+	can_be_created  = True,
+	type		= Data,
+	definition_file = '$METVIEW_DIR_SHARE/etc/MetPlusDef',
+	rules_file      = '$METVIEW_DIR_SHARE/etc/MetPlusRules',
+	default_name	= Meteogram,
+	macro           = meteogram,
+	expand          = 74, # EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	editor_type	= SimpleEditor,
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/MetPlus.icon'
+
+state,
+	class           = MetPlus,
+	output_class    = PSFILE,
+	service         = MetPlus
+
+MetPlus,
+	10_days_epsgram      = '/vol/epsgram/data/spotbase/10_days/0001/latest',
+	15_days_epsgram      = '/vol/epsgram/data/spotbase/15_days/0001/latest',
+	10_days_metgram      = '/vol/epsgram/data/spotbase/metgram_fc/0001/latest',
+	10_days_wave_epsgram = '/vol/epsgram/data/spotbase/10_days_wave/0001/latest'
+
+service,
+	cmd		 = 'env MARS_MAXFORKS=1  $METVIEW_CMD $METVIEW_BIN/MetPlus',
+	name		 = 'MetPlus',
+	fullname	 = Meteogram
+
diff --git a/src/MetviewUI/Action.cc b/src/MetviewUI/Action.cc
new file mode 100644
index 0000000..b472d62
--- /dev/null
+++ b/src/MetviewUI/Action.cc
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Action.h"
+
+Action::Action(const string& name,const string& mode):
+	name_(name),
+	mode_(mode)
+{
+}
+
+Action::~Action()
+{
+}
+
+const string& Action::name() const
+{
+	return name_;
+}
+
+const string& Action::mode() const
+{
+	return mode_;
+}
+
+void Action::print(ostream& s) const
+{
+	s << "Action(" << name_ << "," << mode_ << ")";
+}
+
+bool Action::operator<(const Action& other) const
+{
+	if(name_ == other.name_)
+		return mode_ < other.mode_;
+	else
+		return name_ < other.name_;
+}
diff --git a/src/MetviewUI/Action.h b/src/MetviewUI/Action.h
new file mode 100644
index 0000000..0ad37db
--- /dev/null
+++ b/src/MetviewUI/Action.h
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Action.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Action_H
+#define Action_H
+
+#include <string>
+#include "inc_iostream.h"
+
+using std::string;
+
+
+class Action {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Action(const string& = "*" ,const string& = "*" );
+
+// -- Destructor
+
+	~Action(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+	bool operator<(const Action&) const;
+
+// -- Methods
+	
+	const string& name() const;
+	const string& mode() const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+
+// -- Members
+
+	string name_;
+	string mode_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	friend ostream& operator<<(ostream& s,const Action& p)
+		{ p.print(s); return s; }
+
+};
+
+inline void destroy(Action**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Action);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ActionCommand.cc b/src/MetviewUI/ActionCommand.cc
new file mode 100644
index 0000000..ac5f4da
--- /dev/null
+++ b/src/MetviewUI/ActionCommand.cc
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "ActionCommand.h"
+#include "IconObject.h"
+#include "Action.h"
+
+
+ActionCommand::ActionCommand(const string& name):
+	Command(name)
+{
+}
+
+ActionCommand::~ActionCommand()
+{
+	// Not called
+}
+
+void ActionCommand::execute(IconObject* o)
+{
+	o->action(name_);
+}	
+
+
+static ActionCommand saveCmd("save");
+static ActionCommand visualiseCmd("visualise");
+static ActionCommand examineCmd("examine");
+static ActionCommand executeCmd("execute");
+static ActionCommand analyseCmd("analyse");
diff --git a/src/MetviewUI/ActionCommand.h b/src/MetviewUI/ActionCommand.h
new file mode 100644
index 0000000..7711001
--- /dev/null
+++ b/src/MetviewUI/ActionCommand.h
@@ -0,0 +1,103 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ActionCommand.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ActionCommand_H
+#define ActionCommand_H
+
+
+#ifndef Command_H
+#include "Command.h"
+#endif
+
+
+class ActionCommand : public Command {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ActionCommand(const string& name);
+
+// -- Destructor
+
+	virtual ~ActionCommand(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void execute(IconObject*);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void execute(const string&,IconObject*);
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ActionCommand(const ActionCommand&);
+	ActionCommand& operator=(const ActionCommand&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ActionCommand& p)
+	//	{ p.print(s); return s; }
+
+};
+
+#endif
diff --git a/src/MetviewUI/Ask.cc b/src/MetviewUI/Ask.cc
new file mode 100644
index 0000000..636e06c
--- /dev/null
+++ b/src/MetviewUI/Ask.cc
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <stdarg.h>
+#include "Ask.h"
+#include "MetviewUI.h"
+#include <Xm/Text.h>
+
+Ask::Ask()
+{
+	create(MetviewUI::root());
+}
+
+Ask::~Ask()
+{
+}
+
+bool Ask::show(string& val,const char* fmt,...)
+{
+	char buf[1024];
+	va_list arg;
+	va_start(arg,fmt);
+	vsprintf(buf,fmt,arg);
+	va_end(arg);
+
+	return instance().show(buf,val);
+}
+
+bool Ask::show(const char* msg,string& val)
+{
+	XmTextSetString(value_,(char*)val.c_str());
+
+	if(!modal(msg,true))
+		return false;
+
+	char* p = XmTextGetString(value_);
+	val = p;
+	XtFree(p);
+	return true;
+}
+
+
diff --git a/src/MetviewUI/Ask.h b/src/MetviewUI/Ask.h
new file mode 100644
index 0000000..cceee8b
--- /dev/null
+++ b/src/MetviewUI/Ask.h
@@ -0,0 +1,110 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Ask.h
+// Baudouin Raoult - ECMWF Nov 98
+
+#ifndef Ask_H
+#define Ask_H
+
+#include <string>
+using std::string;
+
+#include "UIAsk.h"
+#include "Dialog.h"
+
+class Ask : public Dialog<Ask,UIAsk_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Ask();
+
+// -- Destructor
+
+	~Ask(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static bool show(string&,const char*,...);
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Ask(const Ask&);
+	Ask& operator=(const Ask&);
+
+// -- Methods
+
+	bool show(const char*,string&);
+
+// -- Overridden methods
+
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Ask& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Ask**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Ask);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/BaseTextEditor.cc b/src/MetviewUI/BaseTextEditor.cc
new file mode 100644
index 0000000..da3d891
--- /dev/null
+++ b/src/MetviewUI/BaseTextEditor.cc
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef BaseTextEditor_H
+#include "BaseTextEditor.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+BaseTextEditor::BaseTextEditor(const IconClass& name,const string& kind):
+	XEditor<UITextEditor_c>(name,kind)
+{
+}
+
+BaseTextEditor::~BaseTextEditor()
+{
+}
+
+void BaseTextEditor::apply()
+{
+	XMText text(text_);
+	text.save(current_->path());
+}
+
+void BaseTextEditor::reset()
+{
+	InternalEditor::reset();
+
+	XMText text(text_);
+	text.load(current_->path());
+	modified_ = false;
+}
+
+void BaseTextEditor::close()
+{
+	XMText text(text_);
+	text.clear();
+}
+
+void BaseTextEditor::merge(IconObject* o)
+{
+	XMText text(text_);
+	text.insert(o->dropText());
+}
+void BaseTextEditor::replace(IconObject* o)
+{
+	XMText text(text_);
+	text.load(o->dropText());
+}
+
+string BaseTextEditor::alternateEditor()
+{
+	return "ExternalTextEditor";
+}
+
+bool BaseTextEditor::modified()
+{
+	return modified_;
+}
+
+void BaseTextEditor::modifiedCB(Widget,XtPointer)
+{
+	modified_ = true;
+}
+
diff --git a/src/MetviewUI/BaseTextEditor.h b/src/MetviewUI/BaseTextEditor.h
new file mode 100644
index 0000000..3f2d0ca
--- /dev/null
+++ b/src/MetviewUI/BaseTextEditor.h
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File BaseTextEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef BaseTextEditor_H
+#define BaseTextEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#include "UITextEditor.h"
+
+class BaseTextEditor : public XEditor<UITextEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	BaseTextEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~BaseTextEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	bool modified_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+
+	virtual void reset();
+	virtual void close();
+	virtual void modifiedCB(Widget,XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	BaseTextEditor(const BaseTextEditor&);
+	BaseTextEditor& operator=(const BaseTextEditor&);
+
+// -- Members
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void apply();
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+	virtual bool modified();
+	virtual string alternateEditor();
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const BaseTextEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(BaseTextEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(BaseTextEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Basic.cc b/src/MetviewUI/Basic.cc
new file mode 100644
index 0000000..b471059
--- /dev/null
+++ b/src/MetviewUI/Basic.cc
@@ -0,0 +1,306 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Basic_H
+#include "Basic.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#include "Dependancy.h"
+
+#include "mars.h"
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+
+
+Basic::Basic(Folder* parent,const IconClass& kind,
+	const string& name,IconInfo* info):
+	IconObject(parent,kind,name,info)
+{
+}
+
+Basic::~Basic()
+{
+}
+
+void Basic::doubleClick()
+{
+	edit();
+}
+
+set<string> Basic::can()
+{
+	return IconObject::can();
+}
+
+void Basic::createFiles()
+{
+	IconObject::createFiles();
+	Path p = path();
+	if(!p.exists())
+		p.saveText(className());
+}
+
+Request Basic::request() const
+{
+	Request r(path());
+	return language().expand(r);
+
+}
+
+void Basic::request(const Request& r)
+{
+	Request req = language().expand(r,EXPAND_NO_DEFAULT|EXPAND_2ND_NAME);
+	req.save(path());
+}
+
+class BasicDependancy : public Dependancy {
+
+	IconObjectH object_;
+	string param_;
+	int n_;
+	bool ok_;
+	Request request_;
+
+	virtual Task* action(const Action&);
+	virtual void success(const Request&);
+	virtual void failure();
+public:
+	BasicDependancy(IconObject*,const string&,int);
+	~BasicDependancy();
+
+	int n()                  { return n_;       }
+	const string& param()    { return param_;   }
+	const Request& request() { return request_; }
+};
+
+BasicDependancy::BasicDependancy(IconObject *o,const string& param,int n):
+	object_(o),
+	param_(param),
+	n_(n),
+	request_(""),
+	ok_(false)
+{
+}
+
+Task* BasicDependancy::action(const Action& a)
+{
+	return object_->action(a);
+}
+
+void BasicDependancy::success(const Request& r)
+{
+	ok_      = true;	
+	request_ = r;
+}
+
+void BasicDependancy::failure()
+{
+	ok_      = false;
+}
+
+BasicDependancy::~BasicDependancy()
+{
+}
+
+
+
+
+const set<DependancyH>& Basic::dependancies()
+{
+
+	if(dependancies_.size())
+		return dependancies_;
+
+	dependancies_.clear();
+
+	Request r = request();
+
+	vector<string> icons = language().interfaces("icon");
+
+	for(vector<string>::iterator j = icons.begin() ; j != icons.end(); ++j)
+	{
+		int i = 0;
+		vector<IconObjectH> sub = subObjects(*j,r);
+
+		for(vector<IconObjectH>::iterator k = sub.begin(); k != sub.end(); ++k)
+			dependancies_.insert(new BasicDependancy(*k,*j,i++));
+	}
+
+	return dependancies_;
+}
+
+
+Request Basic::fullRequest() const
+{
+	Request r = request();
+
+	typedef map<int,Request> Map1;
+	typedef map<string,Map1> Map2;
+
+	Map2 m;
+
+	for(set<DependancyH>::const_iterator k = dependancies_.begin(); k != dependancies_.end() ; ++k)
+	{
+		BasicDependancy* b = dynamic_cast<BasicDependancy*>((Dependancy*)*k);
+		const string& p  = b->param();
+		int n            = b->n();
+		const Request& r = b->request();
+
+		m[p][n] = r;
+	}
+
+	for(Map2::iterator j = m.begin(); j != m.end(); ++j)
+	{
+		const string& param = (*j).first;
+		const Map1&   reqs  = (*j).second;
+
+		::request* empty = 0;
+		MvRequest s(empty);
+
+		for(Map1::const_iterator i = reqs.begin(); i != reqs.end() ; ++i)
+			s = s + (*i).second;
+
+		r(param.c_str()) = s;
+		
+	}
+
+	cout << "---> Basic fullrequest" << endl;
+	r.print();
+	cout << "<--- Basic fullrequest" << endl;
+
+	return r;
+}
+
+bool Basic::rename(const string& newname)
+{
+	Request r = request();
+
+	cout << "Basic::rename" << endl;
+	r.print();
+
+	vector<string> icons = language().interfaces("icon");
+	map<string,vector<IconObjectH> > sub;
+
+	for(vector<string>::iterator j = icons.begin() ; j != icons.end(); ++j)
+		sub[*j] = subObjects(*j,r);
+
+	if(!IconObject::rename(newname))
+		return false;
+
+	for(vector<string>::iterator j = icons.begin() ; j != icons.end(); ++j)
+		subObjects(*j,sub[*j],r);
+
+	r.print();
+	request(r);
+	return true;
+}
+
+IconObject* Basic::clone(Folder *folder)
+{
+	Basic* other = dynamic_cast<Basic*>(IconObject::clone(folder));
+	if( !other )
+	  {
+	    //-- this branch is for finding out why 'other' may be 0!
+	    //-- i.e. use these lines to set breakpoint in debugger!!
+
+	    string s("MvUI/Basic::clone()");
+	    Log::info(s) << "internal error: NULL ptr!" << endl;
+
+	    return 0;  //-- probably we should not do this...
+	  }
+
+	vector<string> icons = language().interfaces("icon");
+
+	Request r = other->request();
+	r.print();
+
+	Folder* e = this->embeddedFolder(true);
+	Folder* f = other->embeddedFolder(true);
+
+	map<string,vector<IconObjectH> > sub;
+
+	for(vector<string>::iterator j = icons.begin() ; j != icons.end(); ++j)
+	{
+		vector<IconObjectH> v = other->subObjects(*j,r);
+
+		for(vector<IconObjectH>::iterator k = v.begin() ; k != v.end(); ++k)
+		{
+			if(e->ancestor(*k))
+			{
+				string name = relativeName(*k);
+				Tokenizer parse("/");
+				vector<string> n;
+				parse(name,n);
+
+				cout << '[' << name << ']' << endl;
+				
+				IconObject *o = f;
+				for(int i = 1; i < n.size() && o; i++)
+				{
+					cout << "SEARCH: " << n[i] << " in " << o->fullName() << endl;
+					o = o->find(n[i]);
+					if(o) cout << "FOUND: " << o->fullName() << endl;
+					else
+						cout << "NOTFOUND" << endl;
+
+				}
+
+				if(o) {
+					cout << "CLONE: " << (*k)->fullName() << endl;
+					*k = o;
+					cout << "   IS: " << (*k)->fullName() << endl;
+				}
+			}
+		}
+
+		sub[*j] = v;
+	}
+
+
+	for(vector<string>::iterator j = icons.begin() ; j != icons.end(); ++j)
+		other->subObjects(*j,sub[*j],r);
+
+	r.print();
+	other->request(r);
+
+	return other;
+}
+
+static IconMaker<Basic> maker1("Data");
+static IconMaker<Basic> maker2("Window");
+static IconMaker<Basic> maker3("Visdef");
+static IconMaker<Basic> maker4("View");
+static IconMaker<Basic> maker5("Preference");
diff --git a/src/MetviewUI/Basic.h b/src/MetviewUI/Basic.h
new file mode 100644
index 0000000..f048bf9
--- /dev/null
+++ b/src/MetviewUI/Basic.h
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Basic.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Basic_H
+#define Basic_H
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#include <string>
+using std::string;
+
+
+class Basic : public IconObject {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Basic(Folder* parent,
+		const IconClass& kind, const string& name,
+		IconInfo* info);
+
+// -- Destructor
+
+	virtual ~Basic(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+
+	// From IconObject
+	virtual Request request() const;
+	virtual const set<DependancyH>& dependancies();
+	virtual Request fullRequest() const;
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Basic(const Basic&);
+	Basic& operator=(const Basic&);
+
+// -- Members
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From IconObject
+
+	virtual void doubleClick();
+	virtual set<string> can();
+
+	virtual void createFiles();
+	virtual void    request(const Request&);
+	virtual bool rename(const string&);
+	virtual IconObject* clone(Folder*);
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Basic& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Basic**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Basic);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/BoolLine.cc b/src/MetviewUI/BoolLine.cc
new file mode 100644
index 0000000..37dc21c
--- /dev/null
+++ b/src/MetviewUI/BoolLine.cc
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef BoolLine_H
+#include "BoolLine.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#include <Xm/ToggleB.h>
+
+#include <mars.h>
+
+BoolLine::BoolLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UIBoolLine_c>(owner,param)
+{
+}
+
+BoolLine::~BoolLine()
+{
+}
+
+void BoolLine::init(Widget w)
+{
+	XRequestPanelLine<UIBoolLine_c>::init(w);
+}
+
+void BoolLine::refresh(const vector<string>& values)
+{
+	if(values.size() == 0) return;
+
+	char c = values[0][1];
+	XmToggleButtonSetState(on_, c == 'N' || c == 'n',False);
+	XmToggleButtonSetState(off_,c != 'N' && c != 'n',False);
+}
+
+void BoolLine::activateCB(Widget,XtPointer data)
+{
+	decache();
+	XmRowColumnCallbackStruct *cb =(XmRowColumnCallbackStruct *) data;
+	owner_.set(param_.name(),XtName(cb->widget));
+}
+
+static LineMaker<BoolLine> maker("on_off");
diff --git a/src/MetviewUI/BoolLine.h b/src/MetviewUI/BoolLine.h
new file mode 100644
index 0000000..932cdcb
--- /dev/null
+++ b/src/MetviewUI/BoolLine.h
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File BoolLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef BoolLine_H
+#define BoolLine_H
+
+#include "UIBoolLine.h"
+#include "RequestPanelLine.h"
+
+class BoolLine : public XRequestPanelLine<UIBoolLine_c> {
+public:
+
+// -- Contructors
+
+	BoolLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~BoolLine(); 
+
+private:
+
+// No copy allowed
+
+	BoolLine(const BoolLine&);
+	BoolLine& operator=(const BoolLine&);
+
+// -- Overridden methods
+
+	// From XD
+	virtual void activateCB(Widget,XtPointer);
+
+	// From RequetPanelLine
+
+	virtual void init(Widget);
+
+	// Form RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+
+};
+
+#endif
diff --git a/src/MetviewUI/CatalogDrawer.cc b/src/MetviewUI/CatalogDrawer.cc
new file mode 100644
index 0000000..752df35
--- /dev/null
+++ b/src/MetviewUI/CatalogDrawer.cc
@@ -0,0 +1,179 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <functional>  // ptr_fun()
+#include <algorithm>   // algorithm()
+#include <cstdlib>
+
+#ifndef CatalogDrawer_H
+#include "CatalogDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef RetrieveEditor_H
+#include "RetrieveEditor.h"
+#endif
+
+#ifndef Netscape_H
+#include "Netscape.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+CatalogDrawer::CatalogDrawer(RetrieveEditor& e):
+	XEditorDrawer<UICatalogDrawer_c>(e),
+	editor_(e)
+{
+}
+
+CatalogDrawer::~CatalogDrawer()
+{
+}
+
+void CatalogDrawer::topCatalogCB(Widget,XtPointer)
+{
+	Netscape::showPage("catalogue");
+}
+
+void CatalogDrawer::homeCB(Widget,XtPointer)
+{
+	Netscape::showPage("webmars");
+}
+
+void CatalogDrawer::inCatalogCB(Widget,XtPointer)
+{
+//-- NOTE:
+//-- It looks like that here we should use the ecmwf.def language file
+//-- and tell the editor to expand the last value (EXPAND_LAST_NAME)
+//-- and not the default second last (EXPAND_2ND_NAME)...
+//-- ('stream=da' does not work, but 'stream=oper' does!)
+//--
+	Request r = editor_.currentRequest(EXPAND_LAST_NAME);
+	const request   *s = r;
+	const parameter *p = s->params;
+
+	string url;
+
+	while(p)
+	{
+		if(p->name[0] != '_')
+		{
+			vector<string> v = r.get(p->name);
+
+			string values;
+			for(int i = 0 ; i < v.size() ; i++)
+			{
+				if(i) values = values + ';';
+				 values = values + v[i];
+			}
+
+			if(v.size())
+			{
+				//-- also, convert to lower case --
+				if(url.length()) url = url + "/";
+				transform( values.begin(), values.end()
+				         , values.begin(), std::ptr_fun ( tolower ) );
+				string pname = p->name;
+				transform( pname.begin(), pname.end()
+				         , pname.begin(), std::ptr_fun ( tolower ) );
+				url = url + pname + '=' + values;
+			}
+		}
+
+		p = p->next;
+	}
+
+	Netscape::showPage("catalogue",url);
+}
+
+void CatalogDrawer::helpCB(Widget,XtPointer)
+{
+	Netscape::showPage("catalogue_help");
+}
+
+void CatalogDrawer::grabCatalogCB(Widget,XtPointer)
+{
+
+	Netscape::showURL("javascript:new MetviewGrab");
+
+	XMLabel message(message_);
+	message.set("");
+
+	Path path(::marstmp());
+	path.remove();  // If the file exists, netscape will open a dialog
+	Netscape::savePage(path);
+
+	int i = 0;
+	while(i++ < 20 && !path.exists())
+		sleep(1);
+
+	if(!path.exists())
+	{
+		message.set("Web browser did not respond in time");
+		return;
+	}
+
+	Folder* temp = Folder::folder("temporary");
+	string name = temp->uniqueName("Catalog");
+	Path p = temp->path().add(name);
+
+
+	bool ok = false;
+	FILE* f = fopen(path.str().c_str(),"r");
+	FILE* g = fopen(p.str().c_str(),"w");
+
+	if(f && g)
+	{
+		char line[10240];
+		bool out = false;
+		while(fgets(line,sizeof(line),f))
+		{
+			if(out)
+			{
+				if(strcmp(line,"-->\n") == 0)
+					break;
+
+				ok = true;
+				fputs(line,g);
+			}
+			else {
+				if(strcmp(line,"<!--Metview\n") == 0)
+					out = true;
+			}
+		}
+	}
+
+	if(f) fclose(f);
+	if(g) fclose(g);
+
+	if(!ok)
+		message.set("Could not find useful information in this page");
+	else
+	{
+		message.set("Grab successful");
+		IconObjectH o =  IconFactory::create(Folder::folder("temporary"),name);
+		editor_.merge(o);
+	}
+
+}
+
+static EditorDrawerMaker<CatalogDrawer,RetrieveEditor> maker(10);
diff --git a/src/MetviewUI/CatalogDrawer.h b/src/MetviewUI/CatalogDrawer.h
new file mode 100644
index 0000000..525ce8d
--- /dev/null
+++ b/src/MetviewUI/CatalogDrawer.h
@@ -0,0 +1,118 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File CatalogDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef CatalogDrawer_H
+#define CatalogDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UICatalogDrawer.h"
+
+class RetrieveEditor;
+
+class CatalogDrawer : public XEditorDrawer<UICatalogDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	CatalogDrawer(RetrieveEditor&);
+
+// -- Destructor
+
+	virtual ~CatalogDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	CatalogDrawer(const CatalogDrawer&);
+	CatalogDrawer& operator=(const CatalogDrawer&);
+
+// -- Members
+
+	RetrieveEditor& editor_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void homeCB(Widget,XtPointer);
+	virtual void helpCB(Widget,XtPointer);
+	virtual void topCatalogCB(Widget,XtPointer);
+	virtual void inCatalogCB(Widget,XtPointer);
+	virtual void grabCatalogCB(Widget,XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const CatalogDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(CatalogDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(CatalogDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ColorHelp.cc b/src/MetviewUI/ColorHelp.cc
new file mode 100644
index 0000000..b118d67
--- /dev/null
+++ b/src/MetviewUI/ColorHelp.cc
@@ -0,0 +1,137 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ColorHelp_H
+#include "ColorHelp.h"
+#endif
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+#include <Xm/Scale.h>
+#include <Palette.h>
+
+
+ColorHelp::ColorHelp(Widget parent, RequestPanel& owner, const Parameter& def):
+	XHelp<UIColorHelp_c>(parent, owner, def),
+	xlist_(list_,def)
+{     
+}
+
+ColorHelp::~ColorHelp()
+{
+}
+
+void ColorHelp::refresh(const vector<string>& values)
+{
+	xlist_.set(values);
+}
+
+long ColorHelp::flags()
+{
+	return EXPAND_FIRST_NAME;
+}
+
+void ColorHelp::set(Request& r) 
+{
+	r.set(param_.name(),xlist_.get());
+}
+
+void ColorHelp::browseCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);	
+}
+
+void ColorHelp::singleCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);	
+}
+
+void ColorHelp::multipleCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);	
+}
+
+void ColorHelp::extendedCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);	
+}
+
+void ColorHelp::rgbCB(Widget,XtPointer)
+{
+	int r = 0,g = 0,b = 0;
+
+	XmScaleGetValue(red_,  &r);
+	XmScaleGetValue(green_,&g);
+	XmScaleGetValue(blue_, &b);
+
+
+	char buf[1024];
+	sprintf(buf,"RGB(%g,%g,%g)",r/100.0,g/100.0,b/100.0);
+
+	XMText text(text_);
+	text.set(buf);
+
+	XtVaSetValues(sample_,
+		XmNbackground,
+		XPalette::magics(buf),
+		0);
+}
+
+void ColorHelp::hslCB(Widget,XtPointer)
+{
+	int h = 0,s = 0,l = 0;
+
+	XmScaleGetValue(hue_,  &h);
+	XmScaleGetValue(saturation_,&s);
+	XmScaleGetValue(lightness_, &l);
+
+	char buf[1024];
+	sprintf(buf,"HSL(%g,%g,%g)",h/1.0,s/100.0,l/100.0);
+
+	XMText text(text_);
+	text.set(buf);
+
+	XtVaSetValues(sample_,
+		XmNbackground,
+		XPalette::magics(buf),
+		0);
+}
+
+void ColorHelp::addCB(Widget,XtPointer)
+{
+	XMText text(text_);
+	xlist_.add(text.get());
+
+}
+
+static HelpMaker<ColorHelp> maker1("colour");
+static HelpMaker<ColorHelp> maker2("help_colour");
diff --git a/src/MetviewUI/ColorHelp.h b/src/MetviewUI/ColorHelp.h
new file mode 100644
index 0000000..e06faac
--- /dev/null
+++ b/src/MetviewUI/ColorHelp.h
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ColorHelp_H
+#define ColorHelp_H
+
+#include "UIColorHelp.h"
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef ParamList_H
+#include "ParamList.h"
+#endif
+
+class ColorHelp: public XHelp<UIColorHelp_c> {
+public:
+
+// -- Contructors
+
+	ColorHelp(Widget, RequestPanel&, const Parameter&);
+
+// -- Destructor
+
+	virtual ~ColorHelp(); 
+
+private:
+
+// No copy allowed
+
+	ColorHelp(const ColorHelp&);
+	ColorHelp& operator=(const ColorHelp&);
+
+// -- Members
+	
+	ParamList xlist_;
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void browseCB(Widget,XtPointer);
+	virtual void singleCB(Widget,XtPointer);
+	virtual void multipleCB(Widget,XtPointer);
+	virtual void extendedCB(Widget,XtPointer);
+
+	virtual void rgbCB(Widget,XtPointer);
+	virtual void hslCB(Widget,XtPointer);
+	virtual void addCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+  	virtual long flags();
+	virtual void set(Request&);
+
+};
+
+#endif
diff --git a/src/MetviewUI/ColorLine.cc b/src/MetviewUI/ColorLine.cc
new file mode 100644
index 0000000..62538b5
--- /dev/null
+++ b/src/MetviewUI/ColorLine.cc
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ColorLine_H
+#include "ColorLine.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+#include "Colors.h"
+
+ColorLine::ColorLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UIColorLine_c>(owner,param)
+{
+}
+
+ColorLine::~ColorLine()
+{
+}
+
+void ColorLine::refresh(const vector<string>& values)
+{
+	vector<Pixel> pixels;
+	pixels.reserve(values.size());
+
+	for(vector<string>::const_iterator j = values.begin(); j != values.end(); ++j)
+		pixels.push_back(XPalette::magics(*j));
+
+	if ( pixels.size() != 0 )
+	{
+		//ColorsSetPixels(colors_,pixels.size(),pixels.begin());
+		Pixel* p = &(*(pixels.begin()));
+		ColorsSetPixels( colors_, pixels.size(), p );
+	}
+}
+
+static LineMaker<ColorLine> maker("colour");
diff --git a/src/MetviewUI/ColorLine.h b/src/MetviewUI/ColorLine.h
new file mode 100644
index 0000000..19fa6dd
--- /dev/null
+++ b/src/MetviewUI/ColorLine.h
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ColorLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ColorLine_H
+#define ColorLine_H
+
+#include "UIColorLine.h"
+#include "RequestPanelLine.h"
+
+class ColorLine : public XRequestPanelLine<UIColorLine_c> {
+public:
+
+// -- Contructors
+
+	ColorLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~ColorLine(); 
+
+private:
+
+// No copy allowed
+
+	ColorLine(const ColorLine&);
+	ColorLine& operator=(const ColorLine&);
+
+// -- Members
+	
+// -- Methods
+
+// -- Overridden methods
+
+	// From RequestPanelItem
+
+       virtual void refresh(const vector<string>&);
+
+};
+
+#endif
diff --git a/src/MetviewUI/ColorName.cc b/src/MetviewUI/ColorName.cc
new file mode 100644
index 0000000..852a195
--- /dev/null
+++ b/src/MetviewUI/ColorName.cc
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ColorName_H
+#include "ColorName.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+#ifndef ColourEditor_H
+#include "ColourEditor.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+
+ColorName::ColorName(ColourEditor& owner,const string& name):
+	owner_(owner),
+	magics_(name)
+{
+	create(owner.where());
+	XMLabel label(name_);
+	label.set(name);
+
+	if(name == "BACKGROUND") // Ugly IF !!!!
+	{
+		XMString xm("None");
+		XtVaSetValues(colour_,
+			XmNlabelString,
+			XmString(xm),
+			XmNlabelType,XmSTRING,
+			0);
+	}
+	else
+		XtVaSetValues(colour_,
+			XmNbackground,
+			XPalette::magics(name),
+			0);
+		
+
+	Manage();
+}
+
+ColorName::~ColorName()
+{
+}
+
+void ColorName::activateCB(Widget,XtPointer)
+{
+	owner_.magics(magics_);
+}
diff --git a/src/MetviewUI/ColorName.h b/src/MetviewUI/ColorName.h
new file mode 100644
index 0000000..3515e2a
--- /dev/null
+++ b/src/MetviewUI/ColorName.h
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ColorName.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef ColorName_H
+#define ColorName_H
+
+#ifndef UIColorName_H
+#include "UIColorName.h"
+#endif
+
+#include <string>
+using std::string;
+
+
+struct request;
+class ColourEditor;
+
+class ColorName : public UIColorName_c  {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ColorName(ColourEditor&,const string&);
+
+// -- Destructor
+
+	~ColorName(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void set();
+	void unset();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void build(Widget);
+	static void load(request*);
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ColorName(const ColorName&);
+	ColorName& operator=(const ColorName&);
+
+// -- Members
+
+	ColourEditor& owner_;
+	string magics_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+	virtual void activateCB(Widget,XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ColorName& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ColorName**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ColorName);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ColourEditor.cc b/src/MetviewUI/ColourEditor.cc
new file mode 100644
index 0000000..9939a3b
--- /dev/null
+++ b/src/MetviewUI/ColourEditor.cc
@@ -0,0 +1,245 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "XPalette.h"
+
+#ifndef ColourEditor_H
+#include "ColourEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef ColorName_H
+#include "ColorName.h"
+#endif
+
+
+#include <Xm/Scale.h>
+
+#ifndef RGBMaker_H
+#include "RGBMaker.h"
+#endif
+
+#ifndef HSLMaker_H
+#include "HSLMaker.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+
+#include <Tab.h>
+
+//------------------------------------------------------------------
+
+ColourEditor::ColourEditor(const IconClass& name,const string& kind):
+	XEditor<UIColourEditor_c>(name,kind),
+	rainbow_r_(rr_),
+	rainbow_g_(gg_),
+	rainbow_b_(bb_),
+	rainbow_h_(hh_),
+	rainbow_s_(ss_),
+	rainbow_l_(ll_)
+{
+	XPalette::scan(*this);
+}
+
+ColourEditor::~ColourEditor()
+{
+}
+
+void ColourEditor::apply()
+{
+	const char* mode = XtName(TabGetCurrent(tab_));
+
+	if(strcmp(mode,"MAGICS") == 0)
+		if(!XPalette::convert(rgb_,name_))
+			mode = "RGB";
+
+	Request r("COLOUR");
+
+	
+	r("MODE")       = mode;
+
+	r("RED")        = rgb_.red;
+	r("GREEN")      = rgb_.green;
+	r("BLUE")       = rgb_.blue;
+
+	r("HUE")        = hsl_.hue;
+	r("SATURATION") = hsl_.saturation;
+	r("LIGHTNESS")  = hsl_.lightness;
+
+	r("NAME")       = name_.c_str();
+
+
+	current_->request(r);
+}
+
+void ColourEditor::reset()
+{
+	replace(current_);
+
+	XtVaSetValues(
+		old_,XmNbackground,
+		XPalette::pixel(rgb_),
+		0);
+}
+
+void ColourEditor::close()
+{
+}
+
+void ColourEditor::merge(IconObject* o)
+{
+	replace(o);
+}
+
+void ColourEditor::replace(IconObject* o)
+{
+	if(!o->iconClass().isSubClassOf(class_))
+		return;
+
+	Request r  = o->request();
+	const char* mode = r("MODE");
+	if(mode == 0) mode = "RGB";
+
+
+	rgb_.red        = r("RED");
+	rgb_.green      = r("GREEN");
+	rgb_.blue       = r("BLUE");
+
+	hsl_.hue        = r("HUE");
+	hsl_.saturation = r("SATURATION");
+	hsl_.lightness  = r("LIGHTNESS");
+
+	const char* name = r("NAME");
+	name_       = name ? name : "";
+
+	switch(*mode)
+	{
+		case 'R':
+			XPalette::convert(rgb_,hsl_);
+			break;
+
+		case 'H':
+			XPalette::convert(hsl_,rgb_);
+			break;
+
+		case 'M':
+			XPalette::convert(name_,rgb_);
+			XPalette::convert(rgb_,hsl_);
+			break;
+	}
+
+	Widget w = XtNameToWidget(tab_,mode);
+	if(w) TabSetCurrent(tab_,w,False);
+
+	refresh();
+}
+
+void ColourEditor::hslCB(Widget,XtPointer)
+{
+	int h = 0,s = 0,l = 0;
+
+	XmScaleGetValue(h_,&h);
+	XmScaleGetValue(s_,&s);
+	XmScaleGetValue(l_,&l);
+
+	hsl_.hue        = h;
+	hsl_.saturation = s/100.0;
+	hsl_.lightness  = l/100.0;
+
+	XPalette::convert(hsl_,rgb_);
+
+	refresh();
+}
+
+void ColourEditor::tabCB(Widget,XtPointer)
+{
+}
+
+void ColourEditor::rgbCB(Widget,XtPointer)
+{ 	
+
+	int r = 0,g = 0,b = 0;
+
+	XmScaleGetValue(r_,&r);
+	XmScaleGetValue(g_,&g);
+	XmScaleGetValue(b_,&b);
+
+	rgb_.red   = r/100.0;
+	rgb_.green = g/100.0;
+	rgb_.blue  = b/100.0;
+
+	XPalette::convert(rgb_,hsl_);
+
+	refresh();
+
+}
+
+void ColourEditor::refresh()
+{
+	XtVaSetValues(
+		new_,XmNbackground,
+		XPalette::pixel(rgb_),
+		0);
+
+	XmScaleSetValue(r_,rgb_.red   * 100);
+	XmScaleSetValue(g_,rgb_.green * 100);
+	XmScaleSetValue(b_,rgb_.blue  * 100);
+	XmScaleSetValue(h_,hsl_.hue);
+	XmScaleSetValue(s_,hsl_.saturation * 100);
+	XmScaleSetValue(l_,hsl_.lightness  * 100);
+
+	rainbow_r_.fill(RGBMaker<makeR>(rgb_));
+	rainbow_g_.fill(RGBMaker<makeG>(rgb_));
+	rainbow_b_.fill(RGBMaker<makeB>(rgb_));
+
+	rainbow_h_.fill(HSLMaker<makeH>(hsl_));
+	rainbow_s_.fill(HSLMaker<makeS>(hsl_));
+	rainbow_l_.fill(HSLMaker<makeL>(hsl_));
+
+}
+
+void ColourEditor::exposeCB(Widget,XtPointer)
+{
+	rainbow_r_.redraw();
+	rainbow_g_.redraw();
+	rainbow_b_.redraw();
+	rainbow_h_.redraw();
+	rainbow_s_.redraw();
+	rainbow_l_.redraw();
+}
+
+void ColourEditor::next(const string& name)
+{
+	magics_[name] = new ColorName(*this,name);
+}
+
+Widget ColourEditor::where()
+{
+	return names_;
+}
+
+void ColourEditor::magics(const string& name)
+{
+	name_ = name;
+	XPalette::convert(name_,rgb_);
+	XPalette::convert(rgb_,hsl_);
+	refresh();
+}
+
+static EditorMaker<ColourEditor> editorMaker("ColourEditor");
diff --git a/src/MetviewUI/ColourEditor.h b/src/MetviewUI/ColourEditor.h
new file mode 100644
index 0000000..ce5ff41
--- /dev/null
+++ b/src/MetviewUI/ColourEditor.h
@@ -0,0 +1,154 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ColourEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ColourEditor_H
+#define ColourEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#include "UIColourEditor.h"
+
+#ifndef Rainbow_H
+#include "Rainbow.h"
+#endif
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+#include <Palette.h>
+
+class ColorName;
+
+
+class ColourEditor : public XEditor<UIColourEditor_c>, public PaletteScanner {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ColourEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~ColourEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void magics(const string&);
+	Widget where();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ColourEditor(const ColourEditor&);
+	ColourEditor& operator=(const ColourEditor&);
+
+// -- Members
+	
+	RGBColor rgb_;
+	HSLColor hsl_;
+	string   name_;
+
+	Rainbow rainbow_r_;
+	Rainbow rainbow_g_;
+	Rainbow rainbow_b_;
+	Rainbow rainbow_h_;
+	Rainbow rainbow_s_;
+	Rainbow rainbow_l_;
+
+	map<string,ColorName*> magics_;
+
+// -- Methods
+
+	void refresh();
+
+// -- Overridden methods
+
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+
+	virtual void rgbCB(Widget,XtPointer);
+	virtual void hslCB(Widget,XtPointer);
+
+	virtual void tabCB(Widget,XtPointer);
+
+	virtual void exposeCB(Widget,XtPointer);
+
+	// From PaletteScanner
+	void next(const string&);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ColourEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ColourEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ColourEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Command.cc b/src/MetviewUI/Command.cc
new file mode 100644
index 0000000..6a53cae
--- /dev/null
+++ b/src/MetviewUI/Command.cc
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Command.h"
+#include "Log.h"
+
+
+static map<string,Command*>* actions = 0;
+
+Command::Command(const string& name):
+	name_(name)
+{
+	if(actions == 0)
+		actions = new map<string,Command*>;
+
+	(*actions)[name] = this;
+}
+
+Command::~Command()
+{
+	// Not called
+}
+
+void Command::execute(const string& name,IconObject* p)
+{
+	map<string,Command*>::iterator j = actions->find(name);
+	if(j == actions->end())
+		Log::error(p) << name << ": action not found" << endl;
+	else
+		(*j).second->execute(p);
+}	
diff --git a/src/MetviewUI/Command.h b/src/MetviewUI/Command.h
new file mode 100644
index 0000000..dd371cd
--- /dev/null
+++ b/src/MetviewUI/Command.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Command.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Command_H
+#define Command_H
+
+#include <string>
+using std::string;
+
+class IconObject;
+
+
+class Command {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Command(const string& name);
+
+// -- Destructor
+
+	virtual ~Command(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void execute(IconObject*) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void execute(const string&,IconObject*);
+
+protected:
+
+// -- Members
+
+	string name_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Command(const Command&);
+	Command& operator=(const Command&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Command& p)
+	//	{ p.print(s); return s; }
+
+};
+
+#endif
diff --git a/src/MetviewUI/CommandObserver.h b/src/MetviewUI/CommandObserver.h
new file mode 100644
index 0000000..246d6e7
--- /dev/null
+++ b/src/MetviewUI/CommandObserver.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File CommandObserver.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef CommandObserver_H
+#define CommandObserver_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+class CommandObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	CommandObserver() {}
+
+// -- Destructor
+
+	~CommandObserver() {}
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	CommandObserver(const CommandObserver&);
+	CommandObserver& operator=(const CommandObserver&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const CommandObserver& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(CommandObserver**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(CommandObserver);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ComputeEditor.cc b/src/MetviewUI/ComputeEditor.cc
new file mode 100644
index 0000000..061fe9e
--- /dev/null
+++ b/src/MetviewUI/ComputeEditor.cc
@@ -0,0 +1,106 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef ComputeEditor_H
+#include "ComputeEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+#include <ctype.h>
+
+
+ComputeEditor::ComputeEditor(const IconClass& name,const string& kind):
+	BaseTextEditor(name,kind)
+{
+}
+
+ComputeEditor::~ComputeEditor()
+{
+}
+
+void ComputeEditor::apply()
+{
+	XMText text(text_);
+	Request r("COMPUTE");	
+	string  f  = text.get();
+
+	r("FORMULA") = f.c_str();
+	r.save(current_->path());
+
+}
+
+void ComputeEditor::reset()
+{
+	Request r  = current_->request();
+	const char* f  = r("FORMULA");
+
+	XMText text(text_);
+	text.set(f?f:"");
+
+	modified_ = false;
+}
+
+void ComputeEditor::close()
+{
+	XMText text(text_);
+	text.clear();
+}
+
+void ComputeEditor::merge(IconObject* o)
+{
+	XMText text(text_);
+
+	string s = current_->relativeName(o);
+	bool quote = false;
+
+
+	//for(string::iterator i = s.begin(); i != s.end(); ++i)
+	for(int it=0; it<s.length(); ++it)
+	{
+		//if(i == s.begin() &&  *i != '_' && !isalpha(*i)) quote = true;
+		if(it == 0 &&  s[it] != '_' && !isalpha(s[it]))
+			quote = true;
+
+		//if(*i != '_' && !isalnum(*i)) quote = true;
+   		if(s[it] != '_' && !isalnum(s[it])) 
+			quote = true;
+	}
+
+
+	if(quote) 
+		s = string("\'") + s + string("\'");
+	text.insert(s);
+}
+
+void ComputeEditor::replace(IconObject* o)
+{
+	
+}
+
+
+static EditorMaker<ComputeEditor> editorMaker("ComputeEditor");
+
diff --git a/src/MetviewUI/ComputeEditor.h b/src/MetviewUI/ComputeEditor.h
new file mode 100644
index 0000000..15e9d10
--- /dev/null
+++ b/src/MetviewUI/ComputeEditor.h
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ComputeEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ComputeEditor_H
+#define ComputeEditor_H
+
+
+#ifndef BaseTextEditor_H
+#include "BaseTextEditor.h"
+#endif
+
+class ComputeEditor : public BaseTextEditor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ComputeEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~ComputeEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ComputeEditor(const ComputeEditor&);
+	ComputeEditor& operator=(const ComputeEditor&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ComputeEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ComputeEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ComputeEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ConfigLoader.cc b/src/MetviewUI/ConfigLoader.cc
new file mode 100644
index 0000000..15299b1
--- /dev/null
+++ b/src/MetviewUI/ConfigLoader.cc
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+#include "ConfigLoader.h"
+#include "IconClass.h"
+#include "IconInfo.h"
+#include "Basic.h"
+
+
+typedef multimap<pair<string,int>,ConfigLoader*> Map;
+
+static Map* makers = 0;
+
+ConfigLoader::ConfigLoader(const string& name,int order)
+{
+	if(makers == 0)
+		makers = new Map();
+
+	pair<string,int> p(name,order);
+	makers->insert(Map::value_type(p,this));
+}
+
+ConfigLoader::~ConfigLoader()
+{
+	// Not called
+}
+
+bool ConfigLoader::process(request *r,int order)
+{
+	pair<string,int> a(r->name,order);
+	pair<Map::iterator,Map::iterator> p = makers->equal_range(a);
+
+	for(Map::iterator j = p.first; j != p.second; ++j)
+		(*j).second->load(r);
+
+	return p.first != p.second;
+}	
diff --git a/src/MetviewUI/ConfigLoader.h b/src/MetviewUI/ConfigLoader.h
new file mode 100644
index 0000000..5e97329
--- /dev/null
+++ b/src/MetviewUI/ConfigLoader.h
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ConfigLoader.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ConfigLoader_H
+#define ConfigLoader_H
+
+#include <string>
+using std::string;
+
+#ifndef Metview_H
+#include "Metview.h"
+#endif
+
+
+class ConfigLoader {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ConfigLoader(const string& name,int order);
+
+// -- Destructor
+
+	virtual ~ConfigLoader(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void load(request*) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static bool process(request*,int);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ConfigLoader(const ConfigLoader&);
+	ConfigLoader& operator=(const ConfigLoader&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ConfigLoader& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T>
+class SimpleLoader : public ConfigLoader {
+	void load(request* r) { T::load(r); }
+public:
+    SimpleLoader(const string& name,int order) : ConfigLoader(name,order) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/Confirm.cc b/src/MetviewUI/Confirm.cc
new file mode 100644
index 0000000..f5e1bcd
--- /dev/null
+++ b/src/MetviewUI/Confirm.cc
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <stdarg.h>
+#include "Confirm.h"
+#include "MetviewUI.h"
+
+Confirm::Confirm()
+{
+	create(MetviewUI::root());
+}
+
+Confirm::~Confirm()
+{
+}
+
+bool Confirm::ask(bool def_ok,const char* fmt,...)
+{
+	char buf[1024];
+	va_list arg;
+	va_start(arg,fmt);
+	vsprintf(buf,fmt,arg);
+	va_end(arg);
+
+	return instance().modal(buf,def_ok);
+}
+
+
diff --git a/src/MetviewUI/Confirm.h b/src/MetviewUI/Confirm.h
new file mode 100644
index 0000000..9632391
--- /dev/null
+++ b/src/MetviewUI/Confirm.h
@@ -0,0 +1,106 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Confirm.h
+// Baudouin Raoult - ECMWF Nov 98
+
+#ifndef Confirm_H
+#define Confirm_H
+
+#include "UIConfirm.h"
+#include "Dialog.h"
+
+class Confirm : public Dialog<Confirm,UIConfirm_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Confirm();
+
+// -- Destructor
+
+	~Confirm(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static bool ask(bool,const char*,...);
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Confirm(const Confirm&);
+	Confirm& operator=(const Confirm&);
+
+// -- Methods
+
+
+// -- Overridden methods
+
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Confirm& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Confirm**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Confirm);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Counted.cc b/src/MetviewUI/Counted.cc
new file mode 100644
index 0000000..e32cf60
--- /dev/null
+++ b/src/MetviewUI/Counted.cc
@@ -0,0 +1,84 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+#ifndef Runnable_H
+#include "Runnable.h"
+#endif
+
+class CountedGC : public Runnable {
+
+	set<Counted*> dead_;
+
+	virtual void run();
+
+public:
+
+	void push(Counted*);
+};
+
+void CountedGC::push(Counted* c)
+{
+	dead_.insert(c);
+	enable();
+}
+
+void CountedGC::run()
+{
+	if(dead_.size() == 0)
+	{
+		disable();
+		return;
+	}
+
+	Counted* c = *dead_.begin();
+	dead_.erase(c);
+
+	if(c->count_ != 0)
+		cout << "CountedGC " << *c << " has a non-zero count " 
+			<< c->count_ << endl;
+	else {
+	//	cout << "CountedGC delete " << *c << endl;
+		delete c;
+	}
+		
+}
+
+
+Counted::Counted():
+	count_(0)
+{
+}
+
+Counted::~Counted()
+{
+}
+
+void Counted::attach()
+{
+	count_++;
+}
+
+void Counted::detach()
+{
+	if(--count_ == 0) 
+	{
+		static CountedGC* gc = new CountedGC();
+		gc->push(this);
+	}
+}
+
+void Counted::print(ostream&) const
+{
+}
diff --git a/src/MetviewUI/Counted.h b/src/MetviewUI/Counted.h
new file mode 100644
index 0000000..ceea96d
--- /dev/null
+++ b/src/MetviewUI/Counted.h
@@ -0,0 +1,155 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Counted.h
+// Baudouin Raoult - ECMWF Dec 98
+
+#ifndef Counted_H
+#define Counted_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+#include "inc_iostream.h"
+
+// Forward declarations
+
+//class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+class Counted {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Counted();
+
+// -- Destructor
+
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void attach();
+	void detach();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+	virtual ~Counted(); // Change to virtual if base class
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	virtual void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Counted(const Counted&);
+	Counted& operator=(const Counted&);
+
+// -- Members
+
+	int count_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	friend ostream& operator<<(ostream& s,const Counted& p)
+		{ p.print(s); return s; }
+
+	friend class CountedGC;
+
+};
+
+inline void destroy(Counted**) {}
+
+template<class T>
+class Handle {
+	T* ptr_;
+public:
+      
+	Handle(T* ptr = 0) : ptr_(ptr) 
+		{ if(ptr_) ptr_->attach(); }
+
+	virtual ~Handle()   
+		{ if(ptr_) ptr_->detach(); }
+
+	Handle(const Handle<T>& other): ptr_(other.ptr_) 
+		{ if(ptr_) ptr_->attach(); }
+
+	Handle<T>& operator=(const Handle<T>& other) 
+	{
+		if(ptr_ != other.ptr_)
+		{
+			if(ptr_) ptr_->detach();
+			ptr_ = other.ptr_;
+			if(ptr_) ptr_->attach();
+		}
+		return *this;
+	}
+
+	T* operator->() const { return ptr_; }
+	T& operator*()  const { return *ptr_; }
+
+	operator T*() const { return ptr_; }
+
+	bool operator<(const Handle<T>& other) const
+		{ return ptr_ < other.ptr_; }
+	
+};
+#endif
+
diff --git a/src/MetviewUI/Dependancy.cc b/src/MetviewUI/Dependancy.cc
new file mode 100644
index 0000000..047efe7
--- /dev/null
+++ b/src/MetviewUI/Dependancy.cc
@@ -0,0 +1,20 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Dependancy_H
+#include "Dependancy.h"
+#endif
+
+Dependancy::Dependancy()
+{
+}
+
+Dependancy::~Dependancy()
+{
+}
diff --git a/src/MetviewUI/Dependancy.h b/src/MetviewUI/Dependancy.h
new file mode 100644
index 0000000..a55d349
--- /dev/null
+++ b/src/MetviewUI/Dependancy.h
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Dependancy.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef Dependancy_H
+#define Dependancy_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+class IconObject;
+class Task;
+class Action;
+class Request;
+
+
+class Dependancy : public virtual Counted {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Dependancy();
+
+// -- Destructor
+
+	virtual ~Dependancy(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+
+// -- Methods
+
+	virtual Task* action(const Action&)   = 0;
+	virtual void  success(const Request&) = 0;
+	virtual void  failure() =0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+
+// -- Members
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Dependancy& p)
+	//	{ p.print(s); return s; }
+
+};
+
+class DependancyH : public Handle<Dependancy> {
+public:
+	DependancyH(Dependancy* o = 0) : Handle<Dependancy>(o) {}
+};
+
+#endif
diff --git a/src/MetviewUI/Dialog.cc b/src/MetviewUI/Dialog.cc
new file mode 100644
index 0000000..56b4cc2
--- /dev/null
+++ b/src/MetviewUI/Dialog.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Dialog_H
+#include "Dialog.h"
+#endif
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#include "XMLabel.h"
+
+template<class T,class U>
+Dialog<T,U>::Dialog()
+{
+	U::create(MetviewUI::root());	
+}
+
+template<class T,class U>
+void Dialog<T,U>::helpCB( Widget, XtPointer )
+{
+}
+
+template<class T,class U>
+void Dialog<T,U>::cancelCB( Widget, XtPointer )
+{
+	ok_   = false;
+	stop_ = true;
+}
+
+template<class T,class U>
+void Dialog<T,U>::okCB( Widget, XtPointer )
+{
+	ok_  = true;
+	stop_ = true;
+}
+
+
+template<class T,class U>
+bool Dialog<T,U>::modal(const char* message,bool def_ok)
+{
+
+	XtVaSetValues(this->form_,
+		XmNdefaultButtonType,
+		(def_ok? XmDIALOG_OK_BUTTON : XmDIALOG_CANCEL_BUTTON),
+		0);
+
+	if(message)
+		XMLabel(this->label_).set(message);
+
+	XtManageChild(this->form_);
+
+	stop_ = false;
+
+	XEvent  event_node;
+	XtAppContext ac = XtWidgetToApplicationContext(this->form_);
+
+	while(!stop_)
+	{
+		XtAppNextEvent(ac,&event_node);
+		XtDispatchEvent(&event_node);
+	}
+
+	XtUnmanageChild(this->form_);
+	
+	return ok_;
+}
+
+template<class T,class U>
+void Dialog<T,U>::show()
+{
+
+	XtManageChild(this->form_);
+}
diff --git a/src/MetviewUI/Dialog.h b/src/MetviewUI/Dialog.h
new file mode 100644
index 0000000..1cd4a45
--- /dev/null
+++ b/src/MetviewUI/Dialog.h
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Dialog.h
+// Baudouin Raoult - ECMWF Nov 98
+
+#ifndef Dialog_H
+#define Dialog_H
+
+#ifndef Singleton_H
+#include "Singleton.h"
+#endif
+
+
+template<class T,class U>
+class Dialog : public U, public Singleton<T>  {
+public:
+
+	Dialog();
+
+protected:
+
+// -- Members
+
+	bool ok_;
+	bool stop_;
+
+// -- Methods
+	
+	bool modal(const char*,bool);
+	void show();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+
+private:
+
+// No copy allowed
+
+	Dialog(const Dialog<T,U>&);
+	Dialog<T,U>& operator=(const Dialog<T,U>&);
+
+// -- Members
+	
+
+// -- Methods
+
+
+	virtual void helpCB( Widget, XtPointer ) ;
+	virtual void cancelCB( Widget, XtPointer ) ;
+	virtual void okCB( Widget, XtPointer ) ;
+
+// -- Overridden methods
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Dialog& p)
+	//	{ p.print(s); return s; }
+
+};
+
+#ifdef H_INCLUDES_CC
+#include "Dialog.cc"
+#endif
+
+
+#endif
diff --git a/src/MetviewUI/DragWindow.cc b/src/MetviewUI/DragWindow.cc
new file mode 100644
index 0000000..40ab4ea
--- /dev/null
+++ b/src/MetviewUI/DragWindow.cc
@@ -0,0 +1,479 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+
+#include "DragWindow.h"
+#include "Metview.h"
+#include <Xm/RowColumn.h>
+#include "IconObject.h"
+#include "IconClass.h"
+#include "Request.h"
+#include "Drop.h"
+#include "XMLabel.h"
+#include "XPixmap.h"
+#include "Dropping.h"
+#include "Language.h"
+
+DragWindow::DragWindow()
+{
+}
+
+DragWindow::~DragWindow()
+{
+}
+
+void DragWindow::inputCB(Widget w,XtPointer from,XEvent* event, Boolean *)
+{
+    if (event->xany.type != ButtonPress || event->xbutton.button != 3)
+		return;
+
+	DragWindow* t = (DragWindow*)from;
+	t->click(event);
+}
+
+
+void DragWindow::click(XEvent* event)
+{
+	int button   = event->xbutton.button;
+	menu_x_ = event->xbutton.x;
+	menu_y_ = event->xbutton.y;
+
+	if(button != 3) return;
+
+	static string cursel = "** Current selection **";
+
+	IconObject* o = objectAt(event->xbutton.x,event->xbutton.y);
+	
+	current_ = o ? vector<IconObjectH>(1, o) : selection(); 
+
+	Widget m = menu();    
+	if(m == 0) return;
+
+	XMLabel title(XtNameToWidget(m,"title"));
+	title.set(current_.size() == 1 ? current_[0]->name() : cursel);
+
+	XmMenuPosition(m,(XButtonPressedEvent*)event);
+	XtManageChild(m);
+}
+
+
+void DragWindow::install(Widget d)
+{
+	widget_ = d;
+	XtAddEventHandler(d,ButtonPressMask,True,inputCB,this);
+    RegisterDropSource(MvApplication::getService(),d,sendDropCB,(void*)this);
+	RegisterDropTarget(MvApplication::getService(),d,receiveDropCB,(void*)this);
+	XtAddCallback (d, XmNsendmsgCallback, sendmsgCB, (XtPointer) this);
+	XtAddCallback (d, XmNanswerCallback, answerCB, (XtPointer) this);
+	//XtAddCallback (d, XmNdropCallback, dropCB, (XtPointer) this);
+	XtAddCallback (d, XmNmoveCallback, moveCB, (XtPointer) this);
+	XtAddCallback (d, XmNdblClickCallback, doubleClickCB, (XtPointer) this);
+	XtAddCallback (d, XmNrenameCallback, renameCB, (XtPointer) this);
+	XtAddCallback (d, XmNrenamableCallback, renamableCB, (XtPointer) this);
+	XtAddCallback (d, XmNflyOverCallback, flyOverCB, (XtPointer) this);
+	XtAddCallback (d, XmNgetFullNameCallback, getFullNameCB, (XtPointer) this);
+
+	XtVaSetValues(d,XmNuserData,this,0);
+
+	DropSite::install(d);
+}
+
+void DragWindow::sendDropCB(Widget  w,dropid *id, void  *o)
+{
+	((DragWindow*)o)->sendDropCB(w, id);
+}
+
+// Quick and durty, should be somewhere else
+
+
+void DragWindow::sendDropCB(Widget  w,dropid *id)
+{
+	cout << "DragWindow::sendDropCB" << endl;
+	// Prepare drop in in an external Window...
+	MvRequest r = id->header;
+	r("_SERVICE") = id->service;
+
+	// Get extra information from the target window
+	r("_CONTEXT") = id->context;
+
+	set<IconObject*> icons;
+	for(int i=0; i < id->count; i++)
+	{
+		IconObject* o = objectOf(id->cb[i].icon);
+		if(o) icons.insert(o);
+	}
+
+	set<IconObject*>::iterator j;
+
+	switch(id->action)
+	{
+		/* Send name and classes ... */
+
+		case DROP_ACTION_NAME_AND_CLASS:
+			for(j = icons.begin(); j != icons.end(); ++j)
+			{
+				r("NAME")   += (*j)->fullName().c_str();
+				r("CLASS")  += (*j)->className().c_str();
+			}
+			MvApplication::callService(id->service,r,0);
+			break;
+
+		/* Send definitions ... */
+
+		case DROP_ACTION_DEFINITION:
+			for(j = icons.begin(); j != icons.end(); ++j)
+			{
+				Request m = (*j)->request();
+				m = (*j)->language().expand(m,EXPAND_2ND_NAME);
+				m("NAME")   += (*j)->fullName().c_str();
+				m("CLASS")  += (*j)->className().c_str();
+				r = r + m;
+			}
+			MvApplication::callService(id->service,r,0);
+			break;
+
+		/* Execute and send ... */
+
+		case DROP_ACTION_RESOLVE:
+			MvRequest mode(id->mode);
+			new Drop(icons,r,id->service,mode);
+			break;
+
+	}
+}
+
+void DragWindow::receiveDropCB(Widget w,dropid *id, void*o)
+{
+	((DragWindow*)o)->receiveDropCB(w, id);
+}
+
+void DragWindow::receiveDropCB(Widget,dropid *id)
+{
+	cout << "DragWindow::receiveDropCB" << endl;
+}
+
+void DragWindow::sendmsgCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->sendmsgCB ( widget, cb );
+}
+
+void DragWindow::flyOverCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->flyOverCB ( widget, cb );
+}
+
+void DragWindow::answerCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->answerCB ( widget, cb );
+}
+
+void DragWindow::dropCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->dropCB ( widget, cb );
+}
+
+void DragWindow::moveCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->moveCB ( widget, cb );
+}
+
+void DragWindow::renameCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->renameCB ( widget, cb );
+}
+
+void DragWindow::renamableCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->renamableCB ( widget, cb );
+}
+
+void DragWindow::doubleClickCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->doubleClickCB ( widget, cb );
+}
+
+void DragWindow::getFullNameCB( Widget widget, XtPointer data, XtPointer cb )
+{
+	DragWindow* o = (DragWindow*) data;
+	o->getFullNameCB ( widget, cb );
+}
+
+
+void DragWindow::dropCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	cout << "dropCB " << o << endl;
+}
+
+void DragWindow::answerCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	cout << "answerCB " << o << endl;
+}
+
+void DragWindow::sendmsgCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+
+	// call a virtual method to get the Dropping Object:
+
+	static Dropping* object;
+	
+	object =  dropping(objectOf(cb->icon),cb->copy);
+
+	cb->message    = &object;
+	cb->msg_length = sizeof(&object);
+
+}
+
+void DragWindow::doubleClickCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	if(o) doubleClick(o);
+}
+
+void DragWindow::moveCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	IconObject* p = 0;
+	if(o) {
+		if(cb->event) 
+			p = objectAt(cb->event->xbutton.x,cb->event->xbutton.y);
+
+		if(p == o) p = 0;
+		
+		if(cb->copy)
+		{
+			cb->move_it = False;
+			copy(o,cb->x,cb->y,p);
+			selectNone();
+		}
+		else
+			move(o,cb->x,cb->y,p);
+	}
+}
+
+void DragWindow::renameCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	if(o) rename(o,cb->new_name);
+}
+
+void DragWindow::renamableCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	if(o) cb->rename_it = renamable(o);
+}
+
+void DragWindow::getFullNameCB(Widget,XtPointer data)
+{
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	if(o) 
+	{
+		strcpy(cb->icon_fullName, o->fullName().c_str());
+	}
+}
+
+
+void DragWindow::doubleClick(IconObject*)
+{
+} 
+
+void DragWindow::move(IconObject*,int,int,IconObject*)
+{
+} 
+
+void DragWindow::copy(IconObject*,int,int,IconObject*)
+{
+} 
+
+void DragWindow::rename(IconObject*,const string&)
+{
+}
+
+typedef pair<DragWindow*,vector<IconObjectH>*> Basic;
+
+static Boolean getSelection(Widget drag,Icon icon,XtPointer data)
+{
+	Basic* d = static_cast<Basic*>(data);
+
+	if(DragIsIconSelected(drag,icon))
+	{
+		IconObject* o = d->first->objectOf(icon);
+		if(o) d->second->push_back(o);
+	}
+	return True;
+}
+
+vector<IconObjectH> DragWindow::selection()
+{
+	vector<IconObjectH> result;
+	Basic d(this,&result);
+
+	DragScanIcons(widget_,getSelection,&d);
+
+	return result;
+}
+
+IconObject* DragWindow::objectOf(Icon icon)
+{
+	return static_cast<IconObject*>(DragGetIconData(widget_,icon));
+}
+
+const IconClass* DragWindow::classOf(Icon icon)
+{
+	return &IconClass::find(DragGetIconClass(widget_,icon));
+}
+
+bool DragWindow::renamable(IconObject* o)
+{
+	return o->renamable();
+}
+
+void DragWindow::addIcon(IconObject* o, int x, int y)
+{     
+	const char* n = o->name().c_str();
+   	const char* c = o->className().c_str();
+	//const char* fn = o->fullName().c_str();
+
+	if(o->isLink()) DragSetFontTag(widget_,"italic");
+
+   	Icon i = DragAddIcon(widget_, c, n, o, x, y);
+
+	static XPixmap lock("lock_icon");
+	static XPixmap timer("timer_icon");
+
+	if(o->locked())  DragAddIconPixmap(widget_,i,lock.name().c_str(),16,16);
+	if(o->isInTimer()) DragAddIconPixmap(widget_,i,timer.name().c_str(),16,16);
+
+	if(o->isLink()) DragSetFontTag(widget_,"normal");
+}
+
+void DragWindow::iconPosition(IconObject* o,int& x,int& y)
+{
+	Icon i = DragFindIconByData(widget_,o);
+	if(i) {
+		Position px,py;
+		DragFindPositionIcon(widget_,i,&px,&py);
+		x = px;
+		y = py;
+	}
+}
+
+void DragWindow::closeIcon(IconObject* o)
+{     
+   	Icon i = DragFindIconByData(widget_,o);
+   	if (i) 	DragOpenIcon(widget_, i, False);
+}
+
+void DragWindow::openIcon(IconObject* o)
+{     
+   	Icon i = DragFindIconByData(widget_,o);
+   	if (i) 	DragOpenIcon(widget_, i, True);
+}
+
+void DragWindow::removeAllIcons()
+{
+	  DragDeleteAllIcons(widget_);
+}
+
+void DragWindow::removeIcon(IconObject* o) 
+{
+    Icon i = DragFindIconByData(widget_,o);
+    if(i != 0) DragDeleteIcon(widget_,i);
+
+}
+
+void DragWindow::sortByName()
+{
+	DragSortIcons(widget_,DragSortByName);
+
+}
+
+void DragWindow::sortByClass()
+{
+	DragSortIcons(widget_, DragSortByClass);
+
+}
+
+void DragWindow::toggleSize()
+{
+	DragUseSmallIcons(widget_,!DragAreSmallIconsUsed(widget_));
+}
+
+void DragWindow::refreshIcon(IconObject* o) 
+{
+ 	Icon i = DragFindIconByData(widget_,o);
+	if(i != 0) {
+		 DragSetIconName(widget_,i,o->name().c_str());
+	}
+	else {
+		cout << "Cannot rename" << endl;
+	}
+
+}
+
+class SimpleDropping : public Dropping {
+	IconObjectH object_;
+	bool copy_;
+	virtual IconObject* object(DropSite&) { return object_; } 
+	virtual bool copy() { return copy_; }
+public:
+	 SimpleDropping(IconObject* o,bool c) : object_(o),copy_(c) {}
+};
+
+Dropping* DragWindow::dropping(IconObject* o,bool btn2)
+{
+	return new SimpleDropping(o,btn2 || dropCopy());
+}
+
+void DragWindow::selectAll()
+{
+	DragSelectIcon(widget_,DRAG_ALL_ICONS,True,False);
+}
+
+void DragWindow::selectNone()
+{
+	DragSelectIcon(widget_,DRAG_ALL_ICONS,False,False);
+}
+
+void DragWindow::flyOverCB(Widget,XtPointer data)
+{
+#if 0
+	DragCallbackStruct* cb = (DragCallbackStruct*)data;
+	IconObject* o = objectOf(cb->icon);
+	cout << "flyOverCB " << o << " " << cb->x << " - " << cb->y << endl;
+
+	IconObject* p = objectAt(cb->x,cb->y);
+	if(p) cout << *o << " is over " << *p << endl;
+#endif
+}
+
+IconObject* DragWindow::objectAt(int x,int y)
+{
+	Icon n = DragFindIconByPosition(widget_,x,y);
+	if(n) return objectOf(n);
+	return 0;
+}
diff --git a/src/MetviewUI/DragWindow.h b/src/MetviewUI/DragWindow.h
new file mode 100644
index 0000000..536325e
--- /dev/null
+++ b/src/MetviewUI/DragWindow.h
@@ -0,0 +1,190 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File DragWindow.h
+// Baudouin Raoult - ECMWF Nov 98
+
+#ifndef DragWindow_H
+#define DragWindow_H
+
+
+// 
+#include "inc_stl.h"
+#include <Xm/Xm.h>
+#include <drop.h>
+
+#include "DropSite.h"
+
+class IconObject;
+class IconObjectH;
+
+class DragWindow : public DropSite  {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	DragWindow();
+
+// -- Destructor
+
+	virtual ~DragWindow(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void install(Widget);
+	vector<IconObjectH> selection();
+	void selectAll();
+	void selectNone();
+
+
+	virtual Widget menu() = 0;
+
+	virtual void move(IconObject*,int,int,IconObject*); 
+	virtual void copy(IconObject*,int,int,IconObject*); 
+
+	virtual void doubleClick(IconObject*) ; 
+	virtual void rename(IconObject*,const string&) ; 
+	virtual bool renamable(IconObject*) ; 
+
+	virtual IconObject* objectOf(Icon);
+	virtual const IconClass*  classOf(Icon);
+	virtual Dropping*   dropping(IconObject*i,bool);
+	virtual bool dropCopy() = 0;
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+	vector<IconObjectH> current_;
+	Widget widget_;
+
+	int menu_x_;
+	int menu_y_;
+
+// -- Methods
+	
+	virtual void click(XEvent*);
+
+	void addIcon(IconObject*, int = 0, int = 0);
+	void removeAllIcons();
+	void removeIcon(IconObject*);
+	void sortByName();
+	void sortByClass();
+	void toggleSize();
+	void refreshIcon(IconObject*);
+	void openIcon(IconObject*);
+	void closeIcon(IconObject*);
+	void iconPosition(IconObject*,int&,int&);
+
+	IconObject* objectAt(int x,int y);
+
+	//virtual Dropping* getDropping() = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+
+private:
+
+// No copy allowed
+	
+	DragWindow(const DragWindow&);
+	DragWindow& operator=(const DragWindow&);
+
+// -- Members
+	
+
+// -- Methods
+
+	void sendDropCB(Widget w,dropid *id);
+	void receiveDropCB(Widget w,dropid *id);
+
+	void sendmsgCB( Widget, XtPointer);
+	void answerCB( Widget, XtPointer);
+	void dropCB( Widget, XtPointer);
+
+	void doubleClickCB( Widget, XtPointer);
+	void moveCB( Widget, XtPointer);
+
+	void renameCB( Widget, XtPointer);
+	void renamableCB( Widget, XtPointer);
+
+	void flyOverCB( Widget, XtPointer);
+
+	void getFullNameCB(Widget, XtPointer);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	static void inputCB(Widget, XtPointer, XEvent* event, Boolean *);
+
+	static void sendDropCB(Widget w,dropid *id, void*);
+	static void receiveDropCB(Widget w,dropid *id, void*);
+
+	static void sendmsgCB( Widget, XtPointer, XtPointer );
+	static void answerCB( Widget, XtPointer, XtPointer );
+	static void dropCB( Widget, XtPointer, XtPointer );
+
+	static void doubleClickCB( Widget, XtPointer, XtPointer );
+	static void moveCB( Widget, XtPointer, XtPointer );
+
+	static void renameCB( Widget, XtPointer, XtPointer );
+	static void renamableCB( Widget, XtPointer, XtPointer );
+
+	static void flyOverCB( Widget, XtPointer, XtPointer );
+	
+	static void getFullNameCB( Widget, XtPointer, XtPointer );
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const DragWindow& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(DragWindow**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(DragWindow);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Drawer.cc b/src/MetviewUI/Drawer.cc
new file mode 100644
index 0000000..309e676
--- /dev/null
+++ b/src/MetviewUI/Drawer.cc
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Drawer.h"
+#include "Tab.h"
+
+Drawer::Drawer()
+{
+}
+
+Drawer::~Drawer()
+{
+}
+
+void Drawer::open()
+{
+	TabOpen(XtParent(widget()));
+	TabSetCurrent(XtParent(widget()),widget(),True);
+}
+
+void Drawer::close()
+{
+	TabClose(XtParent(widget()));
+}
+
+void Drawer::opened()
+{
+}
+
+void Drawer::closed()
+{
+}
+
+string Drawer::name()
+{
+	return XtName(widget());
+}
diff --git a/src/MetviewUI/Drawer.h b/src/MetviewUI/Drawer.h
new file mode 100644
index 0000000..890555a
--- /dev/null
+++ b/src/MetviewUI/Drawer.h
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Drawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Drawer_H
+#define Drawer_H
+
+#include <string>
+using std::string;
+
+#include <Xm/Xm.h>
+
+class Drawer {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Drawer();
+
+// -- Destructor
+
+	virtual ~Drawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual Widget widget() = 0;
+
+
+	void open();
+	void close();
+	virtual string name();
+
+	virtual void opened();
+	virtual void closed();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Drawer(const Drawer&);
+	Drawer& operator=(const Drawer&);
+
+// -- Members
+
+	Widget widget_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Drawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Drawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Drawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Drop.cc b/src/MetviewUI/Drop.cc
new file mode 100644
index 0000000..08488a1
--- /dev/null
+++ b/src/MetviewUI/Drop.cc
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Drop_H
+#include "Drop.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+Drop::Drop(const set<IconObject*>& icons,
+		const Request& request,
+		const string& service,const Request& mode):
+
+	request_(request),
+	service_(service),
+	mode_(mode),
+	waiting_(0),
+	error_(false)
+{
+	for(set<IconObject*>::const_iterator j = icons.begin(); j != icons.end() ; ++j)
+	{
+		IconObjectH o = (*j);
+		requests_[o] = o->request();
+		Task* t = o->action( Action("prepare","*"));
+		
+		if(t) {
+			tasks_[t] = o;
+			waiting_++;
+			t->add(this);
+
+			// Add extra information about the target object
+			MvRequest reqCont = request.getSubrequest("_CONTEXT");
+			if ( reqCont )
+				t->addContext(reqCont);
+		}
+	}
+	check();
+}
+
+Drop::~Drop()
+{
+	cout << "Drop::~Drop()" << endl;
+}
+
+void Drop::success(Task* t,const Request& r)
+{
+	IconObjectH o = tasks_[t];
+	requests_[o] = r;
+	waiting_--;
+	check();
+}
+
+void Drop::failure(Task*)
+{
+	error_ = true;
+	waiting_--;
+	check();
+}
+
+void Drop::check()
+{
+	if(waiting_) return;
+
+	if(!error_)
+	{
+
+		// Request should be sorted
+		const char* null = 0;
+		map<int,vector<Request> > m;
+
+		for(map<IconObjectH,Request>::iterator j = requests_.begin(); j != 
+			requests_.end(); ++j)
+	    {
+			Request r     = (*j).second;
+			IconObject* o = (*j).first;
+			if(r && r.getVerb())
+			{
+				int priority = IconClass::find(r.getVerb()).priority();
+				if(null == r("_NAME"))  r("_NAME")  = o->fullName().c_str();
+				if(null == r("_CLASS")) r("_CLASS") = o->className().c_str();
+				m[priority].push_back(r);
+			}
+	 	}
+
+		Request req;
+
+		for(map<int,vector<Request> >::iterator k = m.begin(); k != m.end(); ++k)
+		{
+			Request r;
+			for(vector<Request>::iterator j = (*k).second.begin(); 
+				j != (*k).second.end(); ++j)
+					r = r + (*j) + req;
+			req = r;
+		}
+
+		request_ = request_ + req;
+		request_("_MODE") = mode_;
+
+		request_.print();
+
+		MvApplication::callService(service_.c_str(),request_,0);
+	}
+	delete this;
+}
diff --git a/src/MetviewUI/Drop.h b/src/MetviewUI/Drop.h
new file mode 100644
index 0000000..f32fdd0
--- /dev/null
+++ b/src/MetviewUI/Drop.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Drop.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef Drop_H
+#define Drop_H
+
+#include "inc_stl.h"
+#include "IconObject.h"
+#include "Request.h"
+#include "TaskObserver.h"
+
+
+class Drop : public TaskObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Drop(const set<IconObject*>&,const Request&,const string&,const Request&);
+
+// -- Destructor
+
+	virtual ~Drop(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void start();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	MvRequest request() { return request_; }
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Drop(const Drop&);
+	Drop& operator=(const Drop&);
+
+// -- Members
+
+	Request          request_;
+	string           service_;
+	Request          mode_;
+	bool             error_;
+	int              waiting_;
+
+	map<IconObjectH,Request> requests_;
+	map<Task*,IconObject*>   tasks_;
+
+// -- Methods
+
+	void check();
+
+// -- Overridden methods
+
+      virtual void success(Task*,const Request&);
+      virtual void failure(Task*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Drop& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Drop**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Drop);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/DropSite.cc b/src/MetviewUI/DropSite.cc
new file mode 100644
index 0000000..31fc1f8
--- /dev/null
+++ b/src/MetviewUI/DropSite.cc
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef DropSite_H
+#include "DropSite.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#include <Drag.h>
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#ifndef MotifDrop_H
+#include "MotifDrop.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+
+DropSite::DropSite()
+{
+}
+
+DropSite::~DropSite()
+{
+	MotifDrop::removeSite(this);
+}
+
+void DropSite::install(Widget w)
+{
+	if(XtIsDrag(w))
+		XtAddCallback(w, XmNdropCallback, dropCB, (XtPointer) this);
+	else
+		DragAcceptDropCallback(w,dropCB,this);
+
+
+	MotifDrop::addSite(this,w);
+
+}
+
+void DropSite::dropCB(Widget,XtPointer data,XtPointer cbd)
+{
+	DragCallbackStruct* cb = static_cast<DragCallbackStruct*>(cbd);
+	DropSite*            e = static_cast<DropSite*>(data);
+
+	Dropping **drop = static_cast<Dropping**>(cb->message);
+
+	if(*drop)
+	{
+		(*drop)->position(cb->x,cb->y);
+		e->drop(**drop);
+		delete *drop;
+	}
+	else
+	{
+		Log::info(0) << "Sorry - this drop is not (yet) possible !" << endl;
+	}
+
+}
diff --git a/src/MetviewUI/DropSite.h b/src/MetviewUI/DropSite.h
new file mode 100644
index 0000000..d9ccefc
--- /dev/null
+++ b/src/MetviewUI/DropSite.h
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File DropSite.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef DropSite_H
+#define DropSite_H
+
+#include <Xm/Xm.h>
+#include <string>
+using std::string;
+
+
+class IconObject;
+class IconClass;
+class Dropping;
+class MotifDrop;
+
+class DropSite {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	DropSite();
+
+// -- Destructor
+
+	virtual ~DropSite(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void install(Widget);
+
+	// ---
+
+	virtual void drop(Dropping&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+
+protected:
+
+
+// -- Members
+	// None
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	DropSite(const DropSite&);
+	DropSite& operator=(const DropSite&);
+
+// -- Members
+
+
+// -- Methods
+
+
+// -- Overridden methods
+
+
+// -- Class members
+
+
+
+// -- Class methods
+	// None
+
+	static void dropCB(Widget,XtPointer,XtPointer);
+
+// -- Friends
+
+	friend class MotifDrop;
+
+
+};
+
+#endif
diff --git a/src/MetviewUI/Dropping.cc b/src/MetviewUI/Dropping.cc
new file mode 100644
index 0000000..6b5137e
--- /dev/null
+++ b/src/MetviewUI/Dropping.cc
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Dropping.h"
+
+Dropping::Dropping():
+	x_(0),
+	y_(0)
+{
+}
+
+Dropping::~Dropping()
+{
+}
+
+int Dropping::x()
+{
+	return x_;
+}
+
+int Dropping::y()
+{
+	return y_;
+}
+
+void Dropping::position(int x,int y)
+{
+	x_ = x;
+	y_ = y;
+}
diff --git a/src/MetviewUI/Dropping.h b/src/MetviewUI/Dropping.h
new file mode 100644
index 0000000..0e9f9c5
--- /dev/null
+++ b/src/MetviewUI/Dropping.h
@@ -0,0 +1,118 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Dropping
+// Sylvie Thepaut - ECMWF Oct 99
+
+#ifndef Dropping_H
+#define Dropping_H
+
+class IconObject;
+class DropSite;
+
+class Dropping {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Dropping();
+
+// -- Destructor
+
+	virtual ~Dropping(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual IconObject* object(DropSite&) = 0;
+	virtual bool copy() = 0;
+
+
+	int x();
+	int y();
+	void position(int,int);
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Dropping(const Dropping&);
+	Dropping& operator=(const Dropping&);
+
+// -- Members
+
+	int x_;
+	int y_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Dropping& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Dropping**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Dropping);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/EditTransaction.cc b/src/MetviewUI/EditTransaction.cc
new file mode 100644
index 0000000..caee6fe
--- /dev/null
+++ b/src/MetviewUI/EditTransaction.cc
@@ -0,0 +1,127 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+#include "Metview.h"
+#include "EditTransaction.h"
+#include "IconObject.h"
+#include "Request.h"
+#include "Task.h"
+#include "Folder.h"
+#include "IconFactory.h"
+#include "EditorObserver.h"
+#include "Editor.h"
+#include "Folder.h"
+
+#ifndef Protocol_H
+#include "Protocol.h"
+#endif
+#ifndef TempIconClass_H
+#include "TempIconClass.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+EditTransaction::EditTransaction(): 
+	Transaction("EDIT") 
+{ 
+}
+
+EditTransaction::~EditTransaction()
+{ 
+	//delete subClass_;
+}
+
+EditTransaction::EditTransaction(MvTransaction* t) :
+	Transaction(t)
+{
+}
+
+MvTransaction *EditTransaction::cloneSelf()
+{ 
+	return new EditTransaction(this); 
+}
+
+void EditTransaction::apply(IconObject*)
+{
+	Task* task = current_->action(Action("prepare"));
+	task->add(this);
+}
+
+void EditTransaction::close(IconObject*)
+{
+	setError(1,"Edit canceled");
+	sendReply(MvRequest());
+}
+
+void EditTransaction::success(Task*,const Request& r)
+{
+	sendReply(r);
+}
+
+void EditTransaction::failure(Task*)
+{
+	setError(1,"Edit canceled");
+	sendReply(MvRequest());
+}
+
+void EditTransaction::callback(MvRequest& r)
+{
+
+	r.print();
+
+    current_ = 0;
+
+	MvRequest def = r("DEFINITION");
+
+	if ( def ) 
+	{
+		const char* name = def("_NAME");
+		if ( name ) 
+	      	current_ = IconObject::search(name);
+
+	    if ( !current_ )
+			current_ = IconFactory::create(Folder::folder("temporary"),def);
+	}
+
+	else 
+	{
+		r.advance();
+
+		if ( r )
+		{
+			subClass_ = new TempIconClass(r);
+			Request t(subClass_->name().c_str());
+			current_ = IconFactory::create(Folder::folder("temporary"),t);
+		}
+
+		else 
+		{
+			close(current_);
+			return;
+		}
+			
+	}
+
+	current_->edit();
+
+	Editor* e = current_->editor();
+	e->observer(this);
+	e->temporary();
+
+
+}
+
+
+
+static ProtocolFactory<EditTransaction> edit;
+
diff --git a/src/MetviewUI/EditTransaction.h b/src/MetviewUI/EditTransaction.h
new file mode 100644
index 0000000..ef9a5ec
--- /dev/null
+++ b/src/MetviewUI/EditTransaction.h
@@ -0,0 +1,94 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditTransaction.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditTransaction_H
+#define EditTransaction_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+#ifndef  Transaction_H
+#include <Transaction.h>
+#endif
+
+#ifndef  EditorObserver_H
+#include <EditorObserver.h>
+#endif
+
+#ifndef  TaskObserver_H
+#include <TaskObserver.h>
+#endif
+
+#ifndef  IconObject_H
+#include <IconObject.h>
+#endif
+
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+class EditTransaction : 
+	public Transaction, 
+	public EditorObserver,
+	public TaskObserver
+{
+
+
+	IconObjectH current_;
+
+	// -- From MvTransaction
+
+	virtual MvTransaction *cloneSelf();
+	virtual void callback(MvRequest&);
+
+	// -- From EditorObserver
+
+	virtual void apply(IconObject*);
+	virtual void close(IconObject*);
+
+
+public:
+        EditTransaction(); 
+	EditTransaction(MvTransaction* t);
+	~EditTransaction();
+	
+private:
+
+// No copy allowed
+
+	EditTransaction(const EditTransaction&);
+	EditTransaction& operator=(const EditTransaction&);
+
+	IconClass* subClass_;
+
+
+	// -- From TaskObserver
+	virtual void success(Task*,const Request&);
+	virtual void failure(Task*);
+
+
+};
+
+
+
+inline void destroy(EditTransaction**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(EditTransaction);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Editor.cc b/src/MetviewUI/Editor.cc
new file mode 100644
index 0000000..40ceb04
--- /dev/null
+++ b/src/MetviewUI/Editor.cc
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef EditorObserver_H
+#include "EditorObserver.h"
+#endif
+
+
+
+Editor::Editor(const IconClass& c,const string& kind):
+	class_(c),
+	kind_(kind),
+	temporary_(false),
+	current_(0),
+	observer_(0)
+{
+}
+
+Editor::~Editor()
+{
+	// Not called
+
+}
+
+void Editor::open(IconObject* icon)
+{
+	Editor *e = icon->editor();
+	if(e == 0) e = EditorFactory::find(icon->editorClass());
+	e->edit(icon);
+}
+
+const IconClass& Editor::iconClass()
+{
+	return class_;
+}
+
+const string& Editor::kind()
+{
+	return kind_;
+}
+
+void Editor::edit(IconObject* icon)
+{
+	if(icon != current_)
+	{
+		temporary_ = false;
+		current_ = icon;
+		if(current_)  {
+			current_->editor(this);
+			edit();
+		}
+	}
+	if(current_) 
+		raise();
+	else
+		empty();
+}
+
+void Editor::done()
+{
+	if(current_) current_->editor(0);
+	current_ = 0;
+}
+
+void Editor::observer(EditorObserver* o)
+{
+	observer_ = o;
+}
+
+void Editor::temporary()
+{
+	temporary_ = true;
+}	
+
+IconObject* Editor::current()
+{
+	return current_;
+}
+
+void Editor::empty()
+{
+}
+
+void Editor::edit()
+{
+}
+
+void Editor::raise()
+{
+}
+
+string Editor::alternateEditor()
+{
+	return "NoEditor";
+}
+
+void Editor::notifyObserverApply()
+{
+    if(observer_) {
+        observer_->apply(current_);
+        observer_ = 0;
+    }
+}
+
+void Editor::notifyObserverClose()
+{
+    if(observer_) {
+        observer_->close(current_);
+        observer_ = 0;
+    }
+}
diff --git a/src/MetviewUI/Editor.h b/src/MetviewUI/Editor.h
new file mode 100644
index 0000000..d961f1e
--- /dev/null
+++ b/src/MetviewUI/Editor.h
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Editor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Editor_H
+#define Editor_H
+
+
+#include <string>
+using std::string;
+#include <Xm/Xm.h>
+
+#ifndef DropSite_H
+#include "DropSite.h"
+#endif
+
+#include "UIEditor.h"
+
+class IconObject;
+class IconClass;
+class EditorDrawer;
+class EditorTool;
+class EditorObserver;
+
+#include "IconObject.h"
+
+class Editor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Destructor
+
+	virtual ~Editor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	const IconClass& iconClass();
+	const string&    kind();
+	IconObject*      current();
+	void             observer(EditorObserver*);
+
+	void             edit(IconObject*);
+	void             done();
+
+	void   notifyObserverApply();
+	void   notifyObserverClose();
+
+	virtual void empty();
+	virtual void temporary();
+	virtual string alternateEditor();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void open(IconObject*);
+
+protected:
+
+// -- Contructors
+
+	Editor(const IconClass&,const string& kind);
+
+
+// -- Members
+	// None
+
+	const IconClass&    class_;
+	string              kind_;
+	EditorObserver*     observer_;
+	IconObjectH         current_;
+	bool                temporary_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Editor(const Editor&);
+	Editor& operator=(const Editor&);
+
+// -- Members
+
+	virtual void edit();
+	virtual void raise();
+
+// -- Methods
+
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Editor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/EditorButton.cc b/src/MetviewUI/EditorButton.cc
new file mode 100644
index 0000000..3cf74b3
--- /dev/null
+++ b/src/MetviewUI/EditorButton.cc
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorButton_H
+#include "EditorButton.h"
+#endif
+
+#ifndef XPixmap_H
+#include "XPixmap.h"
+#endif
+
+
+#include <Xm/PushB.h>
+
+template<class E>
+EditorButton<E>::EditorButton(E& e,const string& name,Proc p):
+	EditorTool(e,name),
+	editor_(e),
+	proc_(p)
+{
+	Widget w = XmCreatePushButton(e.tool(),(char*)name.c_str(),0,0);
+	XtAddCallback(w,XmNactivateCallback,activateCB,this);
+	XPixmap(name).setLabel(w);
+	XtVaSetValues(w,
+		XmNmarginWidth, (Dimension)0,
+		XmNmarginHeight, (Dimension)0,
+		XmNdefaultButtonShadowThickness, (Dimension)0,
+		(void*)0);
+	XtManageChild(w);
+}
+
+template<class E>
+EditorButton<E>::~EditorButton()
+{
+}
+
+template<class E>
+void EditorButton<E>::activateCB(Widget,XtPointer o,XtPointer)
+{
+	EditorButton<E> *e = (EditorButton<E>*)o;
+	(e->editor_.*e->proc_)();
+}
diff --git a/src/MetviewUI/EditorButton.h b/src/MetviewUI/EditorButton.h
new file mode 100644
index 0000000..0c13b51
--- /dev/null
+++ b/src/MetviewUI/EditorButton.h
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorButton.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef EditorButton_H
+#define EditorButton_H
+
+#ifndef EditorTool_H
+#include "EditorTool.h"
+#endif
+
+#ifndef EditorToolFactory_H
+#include "EditorToolFactory.h"
+#endif
+
+
+template<class E>
+class EditorButton : public EditorTool {
+public:
+
+	typedef void (E::*Proc)();
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	EditorButton(E&,const string&,Proc);
+
+// -- Destructor
+
+	virtual ~EditorButton(); 
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorButton(const EditorButton<E>&);
+	EditorButton<E>& operator=(const EditorButton<E>&);
+
+// -- Members
+
+
+	E&   editor_;
+	Proc proc_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void activateCB(Widget,XtPointer,XtPointer);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorButton& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+template<class E>
+class EditorButtonMaker : public EditorToolFactory {
+
+	typedef void (E::*Proc)();
+	Proc proc_;
+	
+	EditorTool* make(Editor* e,const string& name)
+    {
+        E* a = dynamic_cast<E*>(e);
+        return a ? new EditorButton<E>(*a,name,proc_) : 0;
+    }
+
+public:
+    EditorButtonMaker(const string& name,Proc p,int n) : 
+		EditorToolFactory(name,n),
+		proc_(p) {}
+};
+
+#ifdef H_INCLUDES_CC
+#include "EditorButton.cc"
+#endif
+
+#endif
diff --git a/src/MetviewUI/EditorDrawer.cc b/src/MetviewUI/EditorDrawer.cc
new file mode 100644
index 0000000..c7322f6
--- /dev/null
+++ b/src/MetviewUI/EditorDrawer.cc
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "EditorDrawer.h"
+
+EditorDrawer::EditorDrawer(InternalEditor& owner) :
+	editor_(owner)
+{
+}
+
+EditorDrawer::~EditorDrawer()
+{
+	// Not called
+}
+
+void EditorDrawer::edit(IconObject*)
+{
+	update();
+}
+
+void EditorDrawer::update()
+{
+}
diff --git a/src/MetviewUI/EditorDrawer.h b/src/MetviewUI/EditorDrawer.h
new file mode 100644
index 0000000..25b2534
--- /dev/null
+++ b/src/MetviewUI/EditorDrawer.h
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorDrawer_H
+#define EditorDrawer_H
+
+#ifndef Drawer_H
+#include "Drawer.h"
+#endif
+
+class InternalEditor;
+class IconClass;
+
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+class EditorDrawer : public Drawer {
+public:
+
+// -- Exceptions
+	// None
+
+	EditorDrawer(InternalEditor&);
+
+// -- Destructor
+
+	virtual ~EditorDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void edit(IconObject*);
+	virtual void update();
+
+	// ---
+
+
+// -- Overridden methods
+	// None	
+	  
+
+// -- Class members
+	// None
+
+// -- Class method
+
+protected:
+
+// -- Contructors
+
+
+// -- Members
+       
+	InternalEditor& editor_;
+	
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorDrawer(const EditorDrawer&);
+	EditorDrawer& operator=(const EditorDrawer&);
+
+// -- Members
+	
+
+// -- Methods
+
+
+// -- Overridden methods
+
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+
+template<class T>
+class XEditorDrawer : public EditorDrawer, public T {
+	virtual Widget widget() { return T::xd_rootwidget(); }
+public:
+	XEditorDrawer(InternalEditor& e,const char* name = 0) : EditorDrawer(e)
+	{
+		T::create(e.drawer(), const_cast<char*>(name));
+		XtManageChild(T::xd_rootwidget());
+	}
+};
+
+#endif
diff --git a/src/MetviewUI/EditorDrawerFactory.cc b/src/MetviewUI/EditorDrawerFactory.cc
new file mode 100644
index 0000000..4dfc2a6
--- /dev/null
+++ b/src/MetviewUI/EditorDrawerFactory.cc
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+typedef multimap<int,EditorDrawerFactory*> Map;
+
+static Map *makers= 0;
+
+EditorDrawerFactory::EditorDrawerFactory(int n)
+{
+	if(makers == 0)
+		makers = new Map();
+
+	makers->insert(Map::value_type(n,this));
+}
+
+EditorDrawerFactory::~EditorDrawerFactory()
+{
+	// Not called
+}
+
+map<string,EditorDrawer*> EditorDrawerFactory::create(InternalEditor *e)
+{
+	 map<string,EditorDrawer*> m;
+	 for(Map::iterator j = makers->begin(); j != makers->end(); ++j)
+	 {
+	 		EditorDrawer* d = (*j).second->make(e);
+			if(d != 0) m[d->name()] = d;
+	 }
+	 return m;
+
+}
diff --git a/src/MetviewUI/EditorDrawerFactory.h b/src/MetviewUI/EditorDrawerFactory.h
new file mode 100644
index 0000000..d2d79c9
--- /dev/null
+++ b/src/MetviewUI/EditorDrawerFactory.h
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorDrawerFactory.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorDrawerFactory_H
+#define EditorDrawerFactory_H
+
+#include "inc_stl.h"
+using std::string;
+
+
+//UKMO/HP/aCC:
+#ifdef hp
+#include <InternalEditor.h>
+#endif
+
+class EditorDrawer;
+class InternalEditor;
+
+class EditorDrawerFactory {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	EditorDrawerFactory(int);
+
+// -- Destructor
+
+	virtual ~EditorDrawerFactory(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual EditorDrawer* make(InternalEditor*) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static map<string,EditorDrawer*> create(InternalEditor*);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorDrawerFactory(const EditorDrawerFactory&);
+	EditorDrawerFactory& operator=(const EditorDrawerFactory&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorDrawerFactory& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T,class E>
+class EditorDrawerMaker : public EditorDrawerFactory {
+	EditorDrawer* make(InternalEditor* e) 
+	{ 
+		E* a = dynamic_cast<E*>(e);
+		return a ? new T(*a) : 0;
+	}
+public:
+	EditorDrawerMaker(int n) : EditorDrawerFactory(n) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/EditorFactory.cc b/src/MetviewUI/EditorFactory.cc
new file mode 100644
index 0000000..90115a4
--- /dev/null
+++ b/src/MetviewUI/EditorFactory.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef NoEditor_H
+#include "NoEditor.h"
+#endif
+
+
+typedef multimap<pair<string,string>,Editor*> Map;
+static Map editors;
+
+
+static map<string,EditorFactory*>* makers = 0;
+
+EditorFactory::EditorFactory(const string& name):
+	name_(name)
+{
+	if(makers == 0)
+		makers = new map<string,EditorFactory*>;
+
+	(*makers)[name] = this;
+}
+
+EditorFactory::~EditorFactory()
+{
+	// Not called
+}
+
+Editor* EditorFactory::find(const IconClass& c)
+{
+	return find(c,c.editor());
+}
+
+Editor* EditorFactory::find(const IconClass& c,const string& type)
+{
+
+	pair<string,string> name(c.name(),type);
+	Editor *e = 0;
+
+	pair<Map::iterator,Map::iterator> p = editors.equal_range(name);
+	for(Map::iterator j = p.first; j != p.second; ++j)
+	{
+		Editor* editor       = (*j).second;
+		pair<string,string>  n(editor->iconClass().name(),editor->kind());
+
+		if(name == n && editor->current() == 0)
+		{
+			e = editor;
+			break;
+		}
+	}
+
+	if(e == 0)
+	{
+		map<string,EditorFactory*>::iterator j = makers->find(type);
+		if(j == makers->end())
+			e =  new NoEditor(c,"NoEditor");
+		else
+			e =  (*j).second->make(c);
+
+		editors.insert(Map::value_type(name,e));
+	}
+
+	return e;
+}
diff --git a/src/MetviewUI/EditorFactory.h b/src/MetviewUI/EditorFactory.h
new file mode 100644
index 0000000..1fa01b3
--- /dev/null
+++ b/src/MetviewUI/EditorFactory.h
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorFactory.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorFactory_H
+#define EditorFactory_H
+
+#include <string>
+using std::string;
+
+#include "mars.h"
+
+class Editor;
+class IconClass;
+
+class EditorFactory {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	EditorFactory(const string& name);
+
+// -- Destructor
+
+	virtual ~EditorFactory(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual Editor* make(const IconClass&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static Editor* find(const IconClass& name);
+	static Editor* find(const IconClass& name,const string& type);
+
+protected:
+
+// -- Members
+
+	string name_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorFactory(const EditorFactory&);
+	EditorFactory& operator=(const EditorFactory&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorFactory& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T>
+class EditorMaker : public EditorFactory {
+	Editor* make(const IconClass& n) { return new T(n,name_); }
+public:
+	EditorMaker(const string& name) : EditorFactory(name) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/EditorMsgDrawer.h b/src/MetviewUI/EditorMsgDrawer.h
new file mode 100644
index 0000000..39bbde2
--- /dev/null
+++ b/src/MetviewUI/EditorMsgDrawer.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorMsgDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorMsgDrawer_H
+#define EditorMsgDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UIMessageDrawer.h"
+
+class EditorMsgDrawer : public XEditorDrawer<UIMessageDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	EditorMsgDrawer(Editor*);
+
+// -- Destructor
+
+	virtual ~EditorMsgDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorMsgDrawer(const EditorMsgDrawer&);
+	EditorMsgDrawer& operator=(const EditorMsgDrawer&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorMsgDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(EditorMsgDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(EditorMsgDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/EditorObserver.h b/src/MetviewUI/EditorObserver.h
new file mode 100644
index 0000000..d84a222
--- /dev/null
+++ b/src/MetviewUI/EditorObserver.h
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorObserver.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorObserver_H
+#define EditorObserver_H
+
+class IconObject;
+
+class EditorObserver {
+public:
+
+	virtual void apply(IconObject*) = 0;
+	virtual void close(IconObject*) = 0;
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/EditorTool.cc b/src/MetviewUI/EditorTool.cc
new file mode 100644
index 0000000..dedcece
--- /dev/null
+++ b/src/MetviewUI/EditorTool.cc
@@ -0,0 +1,26 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "EditorTool.h"
+
+EditorTool::EditorTool(Editor& owner,const string& name) :
+	editor_(owner),
+	name_(name)
+{
+}
+
+EditorTool::~EditorTool()
+{
+	// Not called
+}
+
+void   EditorTool::edit(IconObject*)
+{
+}
+
diff --git a/src/MetviewUI/EditorTool.h b/src/MetviewUI/EditorTool.h
new file mode 100644
index 0000000..9b38fe1
--- /dev/null
+++ b/src/MetviewUI/EditorTool.h
@@ -0,0 +1,129 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorTool.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorTool_H
+#define EditorTool_H
+
+#ifndef Drawer_H
+#include "Drawer.h"
+#endif
+
+class Editor;
+class IconClass;
+
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+class EditorTool {
+public:
+
+// -- Exceptions
+	// None
+
+	EditorTool(Editor&,const string&);
+
+// -- Destructor
+
+	virtual ~EditorTool(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	virtual void edit(IconObject*);
+	// ---
+
+
+// -- Overridden methods
+	// None	
+	  
+
+// -- Class members
+	// None
+
+// -- Class method
+
+protected:
+
+// -- Contructors
+
+
+// -- Members
+       
+	Editor& editor_;
+	string name_;
+	
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorTool(const EditorTool&);
+	EditorTool& operator=(const EditorTool&);
+
+// -- Members
+	
+
+// -- Methods
+
+
+// -- Overridden methods
+
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorTool& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+#if 0
+
+template<class T>
+class XEditorTool : public EditorTool, public T {
+	virtual Widget widget() { return T::xd_rootwidget(); }
+public:
+	XEditorTool(Editor& e,const char* name = 0) : EditorTool(e)
+	{
+		T::create(e.tool(), const_cast<char*>(name));
+		XtManageChild(T::xd_rootwidget());
+	}
+};
+
+#endif
+
+#endif
diff --git a/src/MetviewUI/EditorToolFactory.cc b/src/MetviewUI/EditorToolFactory.cc
new file mode 100644
index 0000000..ed4f9f1
--- /dev/null
+++ b/src/MetviewUI/EditorToolFactory.cc
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorToolFactory_H
+#include "EditorToolFactory.h"
+#endif
+
+#ifndef EditorTool_H
+#include "EditorTool.h"
+#endif
+
+typedef multimap<int,EditorToolFactory*> Map;
+
+static Map *makers= 0;
+
+EditorToolFactory::EditorToolFactory(const string& name,int n):
+	name_(name)
+{
+	if(makers == 0)
+		makers = new Map();
+
+	makers->insert(Map::value_type(n,this));
+}
+
+EditorToolFactory::~EditorToolFactory()
+{
+	// Not called
+}
+
+map<string,EditorTool*> EditorToolFactory::create(Editor *e)
+{
+	map<string,EditorTool*> m;
+	for(Map::iterator j = makers->begin(); j != makers->end(); ++j)
+	{
+		string name = (*j).second->name_;
+		EditorTool* d = (*j).second->make(e,name);
+		if(d != 0) m[name] = d;
+	}
+	return m;
+}
diff --git a/src/MetviewUI/EditorToolFactory.h b/src/MetviewUI/EditorToolFactory.h
new file mode 100644
index 0000000..aff2195
--- /dev/null
+++ b/src/MetviewUI/EditorToolFactory.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorToolFactory.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef EditorToolFactory_H
+#define EditorToolFactory_H
+
+#include "inc_stl.h"
+#include <string>
+using std::string;
+
+class EditorTool;
+class Editor;
+
+class EditorToolFactory {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	EditorToolFactory(const string&,int);
+
+// -- Destructor
+
+	virtual ~EditorToolFactory(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual EditorTool* make(Editor*,const string&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static map<string,EditorTool*> create(Editor*);
+
+protected:
+
+// -- Members
+
+	string name_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	EditorToolFactory(const EditorToolFactory&);
+	EditorToolFactory& operator=(const EditorToolFactory&);
+
+// -- Members
+	
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const EditorToolFactory& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T,class E>
+class EditorToolMaker : public EditorToolFactory {
+	EditorTool* make(Editor* e,const string& name) 
+	{ 
+		E* a = dynamic_cast<E*>(e,name);
+		return a ? new T(*a) : 0;
+	}
+public:
+	EditorToolMaker(const string& name,int n) : EditorToolFactory(name,n) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/Error.h b/src/MetviewUI/Error.h
new file mode 100644
index 0000000..9003ac3
--- /dev/null
+++ b/src/MetviewUI/Error.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Error.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Error_H
+#define Error_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+class Error {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Error();
+
+// -- Destructor
+
+	~Error(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Error(const Error&);
+	Error& operator=(const Error&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Error& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Error**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Error);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Extent.h b/src/MetviewUI/Extent.h
new file mode 100644
index 0000000..4734c61
--- /dev/null
+++ b/src/MetviewUI/Extent.h
@@ -0,0 +1,150 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Extent.h
+// Baudouin Raoult - ECMWF Oct 98
+
+#ifndef Extent_H
+#define Extent_H
+
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+template<class T>
+class Extent {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Extent();
+
+// -- Destructor
+
+	virtual ~Extent(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void delete_all();
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+//protected:
+
+// -- Members
+	// None
+
+	Extent<T>* next_;
+	Extent<T>* prev_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+	static Extent<T>* first_;
+	static Extent<T>* last_;
+
+	static T* first() { return (T*)first_; }
+	T* next()         { return (T*)next_; }
+
+
+// -- Class methods
+	// None
+
+//private:
+
+// No copy allowed
+
+// -- Members
+	
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Extent& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T> Extent<T>* Extent<T>::first_ = 0;
+template<class T> Extent<T>* Extent<T>::last_  = 0;
+
+template<class T>
+Extent<T>::Extent():
+	next_(0),
+	prev_(last_)
+{
+	if(last_) 
+		last_->next_ = this;
+	else 
+		first_ = this;
+	last_ = this;
+}
+
+template<class T>
+Extent<T>::~Extent()
+{
+	if(prev_) prev_->next_ = next_; else first_ = next_;
+	if(next_) next_->prev_ = prev_; else last_  = prev_;
+}
+
+
+template<class T>
+void Extent<T>::delete_all()
+{
+	while(first_) delete first_;
+}
+
+#endif
diff --git a/src/MetviewUI/ExternalEditor.cc b/src/MetviewUI/ExternalEditor.cc
new file mode 100644
index 0000000..661ba92
--- /dev/null
+++ b/src/MetviewUI/ExternalEditor.cc
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ExternalEditor_H
+#include "ExternalEditor.h"
+#endif
+
+#ifndef ShellTask_H
+#include "ShellTask.h"
+#endif
+
+
+ExternalEditor::ExternalEditor(const IconClass& name,const string& kind):
+	Editor(name,kind)
+{
+}
+
+ExternalEditor::~ExternalEditor()
+{
+}
+
+void ExternalEditor::edit()
+{
+	task_ = new ShellTask(command(),current());
+	task_->add(this);
+	task_->start();
+}
+
+void ExternalEditor::success(Task* t,const Request&)
+{
+	if(t == task_)
+	{
+		current_->modified();
+		notifyObserverApply(); 
+		Editor::done();
+	}
+}
+
+void ExternalEditor::failure(Task* t)
+{
+	if(t == task_)
+	{
+		notifyObserverClose(); 
+		Editor::done();
+	}
+}
+
+void ExternalEditor::empty()
+{
+	task_ = 0;
+}
diff --git a/src/MetviewUI/ExternalEditor.h b/src/MetviewUI/ExternalEditor.h
new file mode 100644
index 0000000..7973e5c
--- /dev/null
+++ b/src/MetviewUI/ExternalEditor.h
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ExternalEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ExternalEditor_H
+#define ExternalEditor_H
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef TaskObserver_H
+#include "TaskObserver.h"
+#endif
+
+class ExternalEditor : public Editor, public TaskObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ExternalEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~ExternalEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	TaskH task_;
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ExternalEditor(const ExternalEditor&);
+	ExternalEditor& operator=(const ExternalEditor&);
+
+// -- Members
+	
+//	TaskH task_;
+
+// -- Methods
+
+	virtual string command() = 0;
+
+// -- Overridden methods
+
+	// From Editor
+
+	virtual void edit();
+	virtual void empty();
+
+	// From TaskObserver
+
+	virtual void success(Task*,const Request&);
+	virtual void failure(Task*);
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ExternalEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ExternalEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ExternalEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ExternalHelp.cc b/src/MetviewUI/ExternalHelp.cc
new file mode 100644
index 0000000..5dcfca5
--- /dev/null
+++ b/src/MetviewUI/ExternalHelp.cc
@@ -0,0 +1,78 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ExternalHelp_H
+#include "ExternalHelp.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#include <mars.h>
+
+ExternalHelp::ExternalHelp(Widget parent, RequestPanel& owner, const Parameter& def):
+	DialogHelp(parent, owner, def)
+{     
+}
+
+
+ExternalHelp::~ExternalHelp()
+{
+}
+
+void ExternalHelp::start()
+{
+        attach(); // Will be decremented by ReplyHandler, so make sure it stays alive.
+
+	Request info = param_.interfaceRequest();
+
+	Request request((const char*) info("help_verb"));
+	request.merge(owner_.request());	
+	callService((const char*) info("help_module"), request);
+}
+
+void ExternalHelp::set(Request& r) 
+{
+	r.merge(request_);
+	request_ = Request();
+}
+
+void ExternalHelp::reply(const Request& reply, int error)
+{
+	 cout << "ExternalHelp::reply" << endl;
+	 if ( error == 0 ) reply.print();
+}
+
+void ExternalHelp::progress(const Request& progress)
+{
+	cout << "ExternalHelp::progress" << endl;
+	progress.print();
+	request_ = progress;
+	owner_.changed(*this);
+}
+
+void ExternalHelp::message(const string& msg)
+{
+	cout << "ExternalHelp::message" << msg << endl;
+}
+
+static HelpMaker<ExternalHelp> maker("help_external");
diff --git a/src/MetviewUI/ExternalHelp.h b/src/MetviewUI/ExternalHelp.h
new file mode 100644
index 0000000..d9cc28c
--- /dev/null
+++ b/src/MetviewUI/ExternalHelp.h
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ExternalHelp_H
+#define ExternalHelp_H
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+class ExternalHelp: public DialogHelp, public ReplyObserver {
+public:
+
+// -- Contructors
+
+	ExternalHelp(Widget, RequestPanel&, const Parameter&);
+
+// -- Destructor
+
+	virtual ~ExternalHelp(); 
+
+private:
+
+// No copy allowed
+
+	ExternalHelp(const ExternalHelp&);
+	ExternalHelp& operator=(const ExternalHelp&);
+
+// -- Members
+	
+	Request request_;
+
+
+// -- Overridden methods
+
+	// From DialogHelp
+
+	virtual void start();
+
+	// From ReplyObserver 
+
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);
+        virtual void message(const string& );
+
+	// From RequestPanelItem
+                  
+	virtual void set(Request&);
+       	
+};
+
+#endif
diff --git a/src/MetviewUI/ExternalServiceEditor.cc b/src/MetviewUI/ExternalServiceEditor.cc
new file mode 100644
index 0000000..0a81e59
--- /dev/null
+++ b/src/MetviewUI/ExternalServiceEditor.cc
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ExternalServiceEditor_H
+#include "ExternalServiceEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+#include "Action.h"
+
+ExternalServiceEditor::ExternalServiceEditor(const IconClass& name,const string& kind):
+	ExternalEditor(name,kind)
+{
+}
+
+void ExternalServiceEditor::edit()
+{
+	Action action("edit");
+	task_ = current_->action(action);  //add the action to the Queue
+	task_->add(this);		   //notify observers
+}
+
+void ExternalServiceEditor::raise()
+{
+	if (temporary_)
+		this->edit();
+	else
+		 temporary_ = true;
+}
+
+static EditorMaker<ExternalServiceEditor> editorMaker("ExternalServiceEditor");
diff --git a/src/MetviewUI/ExternalServiceEditor.h b/src/MetviewUI/ExternalServiceEditor.h
new file mode 100644
index 0000000..b9e51b2
--- /dev/null
+++ b/src/MetviewUI/ExternalServiceEditor.h
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ExternalServiceEditor.h
+// Fernando Ii - ECMWF Nov 2009
+
+#ifndef ExternalServiceEditor_H
+#define ExternalServiceEditor_H
+
+#ifndef ExternalEditor_H
+#include "ExternalEditor.h"
+#endif
+
+
+class ExternalServiceEditor : public ExternalEditor {
+public:
+
+	// -- Contructors
+	ExternalServiceEditor(const IconClass&,const string&);
+
+	// -- Destructor
+	virtual ~ExternalServiceEditor() {} // Change to virtual if base class
+
+private:
+
+	// No copy allowed
+	ExternalServiceEditor(const ExternalServiceEditor&);
+	ExternalServiceEditor& operator=(const ExternalServiceEditor&);
+
+	// From ExternalEditor
+	virtual void edit();
+	virtual void raise();
+	virtual string command() {}
+
+};
+
+inline void destroy(ExternalServiceEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ExternalTextEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ExternalTextEditor.cc b/src/MetviewUI/ExternalTextEditor.cc
new file mode 100644
index 0000000..19352a4
--- /dev/null
+++ b/src/MetviewUI/ExternalTextEditor.cc
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ExternalTextEditor_H
+#include "ExternalTextEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+
+ExternalTextEditor::ExternalTextEditor(const IconClass& name,const string& kind):
+	ExternalEditor(name,kind)
+{
+}
+
+ExternalTextEditor::~ExternalTextEditor()
+{
+}
+
+string ExternalTextEditor::command() 
+{
+    char buf[1024];
+	string s = current_->path().str();
+	sprintf(buf,"$METVIEW_EDITOR \"%s\"",s.c_str());
+	return (buf);
+}
+
+
+static EditorMaker<ExternalTextEditor> editorMaker("ExternalTextEditor");
diff --git a/src/MetviewUI/ExternalTextEditor.h b/src/MetviewUI/ExternalTextEditor.h
new file mode 100644
index 0000000..77cd1af
--- /dev/null
+++ b/src/MetviewUI/ExternalTextEditor.h
@@ -0,0 +1,112 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ExternalTextEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ExternalTextEditor_H
+#define ExternalTextEditor_H
+
+#ifndef ExternalEditor_H
+#include "ExternalEditor.h"
+#endif
+
+
+class ExternalTextEditor : public ExternalEditor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ExternalTextEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~ExternalTextEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ExternalTextEditor(const ExternalTextEditor&);
+	ExternalTextEditor& operator=(const ExternalTextEditor&);
+
+// -- Members
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From ExternalEditor
+	virtual string command();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ExternalTextEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ExternalTextEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ExternalTextEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Family.cc b/src/MetviewUI/Family.cc
new file mode 100644
index 0000000..a93087a
--- /dev/null
+++ b/src/MetviewUI/Family.cc
@@ -0,0 +1,84 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Family_H
+#include "Family.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#include "FamilyHelper.h"
+
+Family::Family(Folder* parent,const IconClass& kind,
+	const string& name,IconInfo* info):
+	Basic(parent,kind,name,info) ,
+	helper_(FamilyHelper::find(kind))
+{
+}
+
+Family::~Family()
+{
+}
+
+Request Family::request() const
+{
+	return language().expand(second());
+}
+
+void Family::request(const Request& r)
+{
+	Request f = first();
+	f(helper_.keyword().c_str()) = r.getVerb();
+
+	f = f + language().expand(r,EXPAND_NO_DEFAULT|EXPAND_2ND_NAME);
+
+	f.save(path());
+
+}
+
+Request Family::first() const
+{
+	 Request r(path());               
+	 return iconClass().language().expand(r.justOneRequest());    
+}
+
+Request Family::second() const
+{
+	 Request r(path());               
+	 if(helper_.validate(r))
+	 	r.save(path());
+	 r.advance();
+	 return r;
+}
+
+const IconClass& Family::editorClass() const
+{
+	return class_;
+}
+
+const IconClass& Family::iconClass() const
+{
+	return IconClass::find(second().getVerb()); 
+}
+
+static IconMaker<Family> maker("Family");
diff --git a/src/MetviewUI/Family.h b/src/MetviewUI/Family.h
new file mode 100644
index 0000000..e50b1b9
--- /dev/null
+++ b/src/MetviewUI/Family.h
@@ -0,0 +1,129 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Family.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Family_H
+#define Family_H
+
+#ifndef Basic_H
+#include "Basic.h"
+#endif
+
+
+#include <string>
+using std::string;
+
+
+class FamilyHelper;
+
+class Family : public Basic {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Family(Folder* parent,
+		const IconClass& kind, const string& name,
+		IconInfo* info);
+
+// -- Destructor
+
+	virtual ~Family(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Family(const Family&);
+	Family& operator=(const Family&);
+
+// -- Members
+
+	FamilyHelper& helper_;
+
+// -- Methods
+ 
+	Request first() const;
+	Request second() const;
+	string  keyword() const;
+	
+// -- Overridden methods
+
+	// From IconObject
+
+	virtual Request request() const;
+	virtual void request(const Request&);
+
+	virtual const IconClass& editorClass() const;
+	virtual const IconClass& iconClass() const;
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Family& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Family**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Family);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FamilyDrawer.h b/src/MetviewUI/FamilyDrawer.h
new file mode 100644
index 0000000..476adaa
--- /dev/null
+++ b/src/MetviewUI/FamilyDrawer.h
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FamilyDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FamilyDrawer_H
+#define FamilyDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#ifndef IconHolder_H
+#include "IconHolder.h"
+#endif
+
+#ifndef UIFamilyDrawer_H  
+#include "UIFamilyDrawer.h"
+#endif
+
+#ifndef Folder_H  
+#include "Folder.h"
+#endif
+#ifndef FamilyEditor_H  
+#include "FamilyEditor.h"
+#endif
+
+
+#ifndef RequestPanel_H  
+#include "RequestPanel.h"
+#endif
+
+
+class FamilyDrawer : public UIFamilyDrawer_c, 	public RequestPanel {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	FamilyDrawer(const IconClass&, Widget p);
+
+// -- Destructor
+
+	virtual ~FamilyDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+	 virtual Widget where();
+	 void show();
+	 void hide();
+	 void update(Request& r);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None 
+
+
+// -- Class methods
+	// None 
+
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FamilyDrawer(const FamilyDrawer&);
+	FamilyDrawer& operator=(const FamilyDrawer&);
+
+// -- Members
+	// None	
+
+// -- Methods
+
+// -- Overridden methods
+  
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FamilyDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FamilyDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FamilyDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FamilyEditor.cc b/src/MetviewUI/FamilyEditor.cc
new file mode 100644
index 0000000..e0a162a
--- /dev/null
+++ b/src/MetviewUI/FamilyEditor.cc
@@ -0,0 +1,229 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef FamilyEditor_H
+#include "FamilyEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+ 
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+
+#include <Tab.h>
+#include "Log.h"
+
+#ifndef FamilyHelper_H
+#include "FamilyHelper.h"
+#endif
+
+
+FamilyEditor::FamilyEditor(const IconClass& name,const string& kind):
+	XEditor<UIFamilyEditor_c>(name,kind),
+	helper_(FamilyHelper::find(name))
+{	
+	Request r(name.name().c_str());
+	makeTabs(tab_,0,r);
+}
+
+FamilyEditor::~FamilyEditor()
+{
+}
+
+void FamilyEditor::makeTabs(Widget w,int n,Request& r)
+{
+	const vector<string>& p = helper_.params();
+	if(n == p.size()) return;
+
+	const vector<string>& v = helper_.values(p[n]);
+	const vector<string>& b = helper_.beau(p[n]);
+
+	for(int i = 0; i < v.size(); i++)
+	{
+		r(p[n].c_str()) = v[i].c_str();
+		Widget q;
+
+		if(n == p.size() - 1)
+		{
+
+			Request s = class_.language().expand(r);
+			const char * type = s(helper_.keyword().c_str());
+
+			//-- This one was a problem on AIX/xlC: (Dec01/vk)
+			//-   although panels_[type] returns a reference,
+			//-   on xlC it returns a reference to a copy,
+			//-   and we have to put it back to the map!
+
+			Panel  pan = panels_[type];
+
+			pan.panel_ = new RequestPanel(IconClass::find(type), w, type);
+			pan.first_ = r;
+			pan.tab_   = w;
+
+			panels_[type] = pan; //-- put the copy back (AIX/xlC req!)
+
+			q = pan.panel_->main();
+
+		}
+		else
+		{
+			Widget t = CreateTab(w,(char*)v[i].c_str(),0,0);
+			XtAddCallback(t, XmNvalueChangedCallback, &UIFamilyEditor_c::familyCB, 
+				(XtPointer) dynamic_cast<UIFamilyEditor_c*>(this));
+
+			makeTabs(t,n+1,r);
+
+			XtManageChild(t);
+			q = t;
+		}
+		TabSetName(w,q,b[i].c_str());
+	}
+
+}
+
+
+void FamilyEditor::apply()
+{
+	for(map<string, Panel>::iterator j = panels_.begin(); j != panels_.end(); ++j)
+	  {
+	    if( (*j).second.panel_ )
+	      (*j).second.panel_->apply();
+	    else
+              cout << ">>> FamilyEditor::apply (*j).second.panel_ is NULL => skipping!" 
+	           << endl;
+	  }
+
+	current_->request(frontPanel().panel_->request());
+}
+
+void FamilyEditor::reset()
+{	
+	for(map<string,Panel>::iterator j = panels_.begin(); j != panels_.end(); ++j)
+	{
+		const string& n = (*j).first;
+		Panel& panel    = (*j).second;
+		panel.temp_     = IconFactory::create(current_,Request(n));
+	}
+
+	Request r  = current_->request();
+	string  s  = r.getVerb();
+	if(panels_.find(s) != panels_.end())
+		panels_[s].temp_->request(r);
+
+	map<string,Panel>::iterator j = panels_.begin();
+	while( j != panels_.end() )
+	{
+		Panel& panel = (*j).second;
+		++j;
+		if( panel.panel_ )
+		    panel.panel_->reset(panel.temp_);
+		else
+		    cout << ">>> FamilyEditor::reset(): panel.panel_ is NULL => skipping!" 
+		         << endl;
+	}
+
+#ifndef MV_EXT_PANEL
+	Widget w = panels_[s].panel_->main();
+#else
+	Panel myPanel = panels_[s];
+        if( ! myPanel.panel_ )
+          {
+            Log::error("MetviewUI") << "ALERT: broken " 
+				    << kind().c_str() 
+				    << " icon!" 
+				    << endl;
+            return;
+          }
+
+	Widget w = myPanel.panel_->main();
+#endif
+
+	TabSetCurrent(XtParent(w),w, False);     	
+}
+
+
+void FamilyEditor::close()
+{      
+	for(map<string, Panel>::iterator j = panels_.begin(); j != panels_.end(); ++j)
+	  {
+	    RequestPanel* panel = (*j).second.panel_;
+	    if( panel )
+	       panel->close();
+	  }
+}
+
+void FamilyEditor::replace(IconObject* o)
+{
+	frontPanel().panel_->replace(o);
+}
+
+void FamilyEditor::merge(IconObject* o)
+{
+	frontPanel().panel_->merge(o); 
+}
+
+
+IconObject* FamilyEditor::copy(const string& name)
+{
+	IconObject* o = IconFactory::create(name, class_);
+	frontPanel().panel_->apply();
+	o->request(frontPanel().panel_->request());
+	return o;
+}
+
+void FamilyEditor::familyCB(Widget, XtPointer data)
+{
+//	TabCallbackStruct *cb =(TabCallbackStruct*) data;
+//	const char *name = XtName(cb->widget);
+}
+
+
+string FamilyEditor::choice()
+{
+	Widget w = tab_;
+	string result;
+
+	do
+	{
+		w = TabGetCurrent(w);
+		result = XtName(w);
+	} while(XtIsTab(w));
+
+	cout << "CHOICEis " << result << endl;
+	return result;
+}
+
+#ifdef MV_EXT_PANEL
+  Panel&               FamilyEditor::frontPanel()
+#else
+  FamilyEditor::Panel& FamilyEditor::frontPanel()
+#endif
+{
+ 	return panels_[choice()];	
+}
+
+
+static EditorMaker<FamilyEditor> editorMaker("FamilyEditor");
diff --git a/src/MetviewUI/FamilyEditor.h b/src/MetviewUI/FamilyEditor.h
new file mode 100644
index 0000000..fe35bcf
--- /dev/null
+++ b/src/MetviewUI/FamilyEditor.h
@@ -0,0 +1,160 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FamilyEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FamilyEditor_H
+#define FamilyEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#include "UIFamilyEditor.h"
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+class RequestPanel;
+class FamilyHelper;
+
+#define MV_EXT_PANEL
+
+#ifdef MV_EXT_PANEL
+struct Panel {
+	RequestPanel* panel_;
+	IconObjectH   temp_;
+	Request       first_;
+	Widget        tab_;
+
+	Panel():panel_(0),temp_(0),tab_(0){}
+};
+#endif
+
+class FamilyEditor : public XEditor<UIFamilyEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	FamilyEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~FamilyEditor(); // Change to virtual if base class  
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FamilyEditor(const FamilyEditor&);
+	FamilyEditor& operator=(const FamilyEditor&);
+
+// -- Members
+
+	FamilyHelper&              helper_;
+
+#ifdef MV_EXT_PANEL
+	Panel  pan_;
+#else
+	struct Panel {
+		RequestPanel* panel_;
+		IconObjectH   temp_;
+		Request       first_;
+		Widget        tab_;
+	};
+#endif
+	map<string, Panel>  panels_;
+
+// -- Methods
+
+	void makeTabs(Widget,int,Request&);
+	string choice();
+	Panel& frontPanel();
+
+// -- Overridden methods
+
+
+	// From InternalEditor
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void replace(IconObject*);
+	virtual void merge(IconObject*);
+
+	virtual IconObject* copy(const string&); 
+
+	// From XD
+	virtual void familyCB(Widget, XtPointer);
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FamilyEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FamilyEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FamilyEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FamilyHelper.cc b/src/MetviewUI/FamilyHelper.cc
new file mode 100644
index 0000000..b09cdd7
--- /dev/null
+++ b/src/MetviewUI/FamilyHelper.cc
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef FamilyHelper_H
+#include "FamilyHelper.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+static map<string,FamilyHelper*> cache;
+
+
+FamilyHelper& FamilyHelper::find(const IconClass& kind)
+{
+     map<string,FamilyHelper*>::iterator j = cache.find(kind.name());
+     if(j != cache.end())
+        return *(*j).second;
+
+     return *(new FamilyHelper(kind));
+}
+ 
+
+FamilyHelper::FamilyHelper(const IconClass& kind):
+	class_(kind)
+{	
+
+	cout << "FamilyHelper " << kind.name() << endl;
+
+	kind.language().scan(*this);
+	keyword_ = kind.language().getInfo();
+	if(keyword_ == "") keyword_ = "_SECOND_GROUP";
+
+	cache[kind.name()] = this;
+}
+
+FamilyHelper::~FamilyHelper()
+{
+}
+
+void FamilyHelper::next(const Parameter& param)
+{
+	params_.push_back(param.name());
+	param.scan(*this);
+}
+
+const vector<string>& FamilyHelper::params() const
+{
+	cout << "FamilyHelper parans " << params_.size() << endl;
+	return params_; 
+}
+
+const vector<string>& FamilyHelper::values(const string& s) // const
+{
+	return values_[s]; 
+}
+
+const vector<string>& FamilyHelper::beau(const string& s) // const
+{
+	return beau_[s]; 
+}
+
+void FamilyHelper::next(const Parameter& p, const char* first,const char* second)
+{
+	const char* type = (second) ? second : first;
+	values_[p.name()].push_back(type);
+	beau_[p.name()].push_back(p.beautifiedName(first));
+	names_[type]    = type;
+}
+
+
+const string& FamilyHelper::keyword() const
+{
+	return keyword_;
+}
+
+bool FamilyHelper::validate(Request& r) const
+{
+	Request s = r;
+	s.advance();
+	if(!s) {
+
+		if(!r) r = Request(class_.name());
+
+		Request f = class_.language().expand(r.justOneRequest(), 
+			EXPAND_2ND_NAME);
+
+		const char* p = f(keyword_.c_str());
+		r = f + Request( p );
+		return true;
+
+
+	}
+#if 0
+	cout << "FamilyHelper::validate -> " << endl;
+	r.print();
+
+	Request f = class_.language().expand(s.justOneRequest(), EXPAND_2ND_NAME);
+	f.print();
+
+	if(!f || !f.getVerb() || class_.name() != f.getVerb())
+	{
+		r = Request(class_.name().c_str());
+		validate(r);
+		return true;
+	}
+
+	const char* v = s.getVerb();
+	const char* p = f(keyword_.c_str());
+
+	if(!v || /*names_.find(v) == names_.end() ||*/ v != p)
+	{
+		cout << "FamilyHelper::validate -> " << endl;
+		r.print();
+		r = f + Request( p );
+		r.print();
+		cout << "<- FamilyHelper::validate " << endl;
+		return true;
+	}
+
+#endif
+	return false;
+	
+}
+
+
diff --git a/src/MetviewUI/FamilyHelper.h b/src/MetviewUI/FamilyHelper.h
new file mode 100644
index 0000000..088c530
--- /dev/null
+++ b/src/MetviewUI/FamilyHelper.h
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FamilyHelper.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FamilyHelper_H
+#define FamilyHelper_H
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+
+class FamilyHelper : 
+	public ParameterScanner,
+	public LanguageScanner {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+
+// -- Destructor
+
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	const string& keyword() const;
+	bool validate(Request&) const;
+	const vector<string>& params() const;
+	const vector<string>& values(const string&) ;//const;
+	const vector<string>& beau(const string&) ;//const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static FamilyHelper& find(const IconClass&);
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+
+	FamilyHelper(const IconClass&);
+	virtual ~FamilyHelper(); // Change to virtual if base class  
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FamilyHelper(const FamilyHelper&);
+	FamilyHelper& operator=(const FamilyHelper&);
+
+// -- Members
+
+	string                      keyword_;
+	map<string,string>	        names_;
+	const IconClass&            class_;
+	vector<string>              params_;
+	map<string,vector<string> > values_;
+	map<string,vector<string> > beau_;
+
+
+// -- Methods
+
+// -- Overridden methods
+
+
+	// From LanguageScanner
+	virtual void next(const Parameter&);
+
+	// From ParameterScanner
+	virtual void next(const Parameter&, const char*,const char*);
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FamilyHelper& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FamilyHelper**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FamilyHelper);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FileObject.cc b/src/MetviewUI/FileObject.cc
new file mode 100644
index 0000000..0f0ad19
--- /dev/null
+++ b/src/MetviewUI/FileObject.cc
@@ -0,0 +1,64 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FileObject_H
+#include "FileObject.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+FileObject::FileObject(Folder* parent,const IconClass& kind,
+	const string& name,IconInfo* info):
+	IconObject(parent,kind,name,info)
+{
+}
+
+FileObject::~FileObject()
+{
+}
+
+void FileObject::doubleClick()
+{
+	edit();
+}
+
+set<string> FileObject::can()
+{
+	return IconObject::can();
+}
+
+void FileObject::createFiles()
+{
+	IconObject::createFiles();
+	Path p = path();
+	if(!p.exists()) 
+		p.touch();
+}
+
+Request FileObject::request() const
+{
+	const char* n = className().c_str();
+	Request r(n);
+	r("PATH") = path().str().c_str();
+	return r;
+}
+
+void FileObject::request(const Request& r)
+{
+	IconObject::request(r);
+}
+
+static IconMaker<FileObject> maker1("File");
+static IconMaker<FileObject> maker2("Macro");
diff --git a/src/MetviewUI/FileObject.h b/src/MetviewUI/FileObject.h
new file mode 100644
index 0000000..2b9d10b
--- /dev/null
+++ b/src/MetviewUI/FileObject.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FileObject.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FileObject_H
+#define FileObject_H
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+
+#include <string>
+using std::string;
+
+
+class FileObject : public IconObject {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	FileObject(Folder* parent,
+		const IconClass& kind, const string& name,
+		IconInfo* info);
+
+// -- Destructor
+
+	virtual ~FileObject(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FileObject(const FileObject&);
+	FileObject& operator=(const FileObject&);
+
+// -- Members
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From IconObject
+
+	virtual void doubleClick();
+	virtual set<string> can();
+
+	virtual void createFiles();
+	virtual Request request() const;
+	virtual void request(const Request&);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FileObject& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FileObject**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FileObject);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FileSelection.cc b/src/MetviewUI/FileSelection.cc
new file mode 100644
index 0000000..4797cbd
--- /dev/null
+++ b/src/MetviewUI/FileSelection.cc
@@ -0,0 +1,71 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdarg.h>
+#include <stdio.h>
+#include "FileSelection.h"
+#include "XMString.h"
+
+FileSelection::FileSelection()
+{
+}
+
+FileSelection::~FileSelection()
+{
+}
+
+
+bool FileSelection::ask(const char* title,
+	const char* file,const char* filter,
+	const char* dir)
+{
+	return instance().choose(title,file,filter,dir);
+}
+
+
+bool FileSelection::choose(const char* title,
+	const char* deffile,const char* filter,
+	const char* directory)
+
+{
+	set(XmNdirSpec,deffile);
+	set(XmNpattern,filter);
+	set(XmNdirectory,directory);
+
+	return instance().modal(title,true);
+}
+
+const string& FileSelection::file()
+{
+	return instance().file_;
+}
+
+void FileSelection::set(const char* res,const char* val)
+{
+	if(!val) return;
+
+	XMString s(val);
+	XtVaSetValues(form_,res,XmString(s),0);
+}
+
+void FileSelection::okCB(Widget,XtPointer data)
+{								
+	XmFileSelectionBoxCallbackStruct* cb = (XmFileSelectionBoxCallbackStruct*)data;
+	string f = XMString(cb->value);
+	string d = XMString(cb->dir);
+
+	if(f[0] == '/') file_ = f;
+	else file_ = d + f;
+
+	if(file_[file_.length() - 1] == '/')
+		file_.resize(file_.length() - 1);
+
+	ok_   = true;
+	stop_ = true;
+}
diff --git a/src/MetviewUI/FileSelection.h b/src/MetviewUI/FileSelection.h
new file mode 100644
index 0000000..078573a
--- /dev/null
+++ b/src/MetviewUI/FileSelection.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FileSelection.h
+// Baudouin Raoult - ECMWF Nov 98
+
+#ifndef FileSelection_H
+#define FileSelection_H
+
+#include <string>
+using std::string;
+
+#include "UIFileSelection.h"
+#include "Dialog.h"
+
+class FileSelection : public Dialog<FileSelection,UIFileSelection_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	FileSelection();
+
+// -- Destructor
+
+	~FileSelection(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static bool ask(const char* title, 
+		const char* file   = 0,
+		const char* filter = 0,
+		const char* dir    = 0);
+
+	static const string& file();
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FileSelection(const FileSelection&);
+	FileSelection& operator=(const FileSelection&);
+
+
+	string file_;
+
+// -- Methods
+
+	void set(const char*,const char*);
+
+	bool choose(const char*,const char*,
+		const char*,const char*);
+
+
+// -- Overridden methods
+
+	virtual void okCB( Widget, XtPointer ) ;
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FileSelection& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FileSelection**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FileSelection);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Folder.cc b/src/MetviewUI/Folder.cc
new file mode 100644
index 0000000..40846e7
--- /dev/null
+++ b/src/MetviewUI/Folder.cc
@@ -0,0 +1,494 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef RootFolder_H
+#include "RootFolder.h"
+#endif
+
+#ifndef Items_H
+#include "Items.h"
+#endif
+
+#ifndef FolderObserver_H
+#include "FolderObserver.h"
+#endif
+
+#ifndef FolderWindow_H
+#include "FolderWindow.h"
+#endif
+
+#ifndef Items_H
+#include "Items.h"
+#endif
+
+
+
+Folder::Folder(Folder* parent,const IconClass& kind,
+	const string& name,IconInfo* info):
+	IconObject(parent,kind,name,info),
+	ready_(false)
+{
+	Items::fix(this);
+}
+
+Folder::~Folder()
+{
+}
+
+void Folder::addObserver(FolderObserver* o)
+{
+	if(o)
+	{
+		if(!observers_.insert(o).second)
+			return;
+		if(!ready_)
+			scan();
+		else 
+			for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+				o->arrived((*j).second);
+	}
+}
+
+void Folder::removeObserver(FolderObserver* o)
+{
+	observers_.erase(o);
+}
+
+IconObject* Folder::create(const string& name)
+{
+	IconObject *o = find(name);
+	return o == 0 ? IconFactory::create(this,name) : o;
+}
+
+IconObject* Folder::find(const vector<string>& names)
+{
+
+	//cout << "Folder::find " << names.size() << endl;
+	//for(int i = 0; i < names.size() ; i++)
+		//cout << '|' << names[i] << '|';
+	//cout << endl;
+
+	if(names.size() == 0)
+		return this;
+
+	if(names.size() == 1)
+		return find(names[0]);
+
+	vector<string> rest(names.begin()+1,names.end());
+	IconObject *s = find(names[0]);
+
+	return s?s->find(rest):0;
+}
+
+IconObject* Folder::find(const string& name)
+{
+
+	if(!ready_)
+		scan();
+
+	KidMap::iterator j = kids_.find(name);
+
+	if(j == kids_.end())
+		return 0;
+	else
+		return (*j).second;
+
+}
+
+void Folder::edit()
+{
+	open();
+
+
+	// if the user wants to keep just one folder view open, then
+	// close the parent one
+
+	MvRequest myPref = MvApplication::getPreferences();
+	const char* openEachFolder = myPref( "OPEN_EACH_FOLDER" );
+
+	if ( (openEachFolder != NULL) && (strcmp( openEachFolder, "In Same Window") == 0))
+	{
+		if (parent_) parent_->close();
+	}
+}
+
+void Folder::scan()
+{
+
+	ready_ = true;
+
+	set<string> files = path().files();
+	
+	for(set<string>::iterator i = files.begin(); i != files.end() ; ++i)
+		create(*i);
+
+	vector<IconObjectH> erase;
+
+	for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+		if(files.find((*j).first) == files.end())
+			erase.push_back((*j).second);
+
+	for(vector<IconObjectH>::iterator k = erase.begin(); k != erase.end(); ++k)
+		release(*k);
+
+}
+
+void Folder::visit(FolderVisitor& visitor) 
+{	    
+	if(!ready_)
+		scan();
+
+ 	 for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+	 	visitor.visit((*j).second);
+}
+
+Folder* Folder::top()
+{
+	static RootFolder root;
+	return &root;
+}
+
+Folder* Folder::folder(const string& name,bool create)
+{
+	Folder* f;
+
+	switch(name[0])
+	{
+		case 0:
+			return top();
+			//break;
+
+		case '/':
+			f = dynamic_cast<Folder*>(IconObject::search(name));
+			if(f == 0 && create)
+				f = dynamic_cast<Folder*>(IconFactory::create(name,IconClass::find("FOLDER")));
+			return f;
+			//break;
+
+		default:
+		   return dynamic_cast<Folder*>(Items::find(name));
+		   //break;
+	}
+}
+
+Folder* Folder::folder(const string& name1,const string& name2,bool create)
+{
+	Folder* f = folder(name1,create);
+	return f?folder(f->fullName()+"/"+name2,create):0;
+}
+
+Folder* Folder::folder(const string& name1,const string& name2,
+	const string& name3,bool create)
+{
+	Folder* f = folder(name1,name2);
+	return f?folder(f->fullName()+"/"+name3):0;
+}
+
+bool Folder::adopt(IconObject* o)
+{
+	if(find(o->name()) != 0)
+	{
+		// Log::error(o) << "Icon already exists" << endl;
+		return false;
+	}
+
+	Folder* f = dynamic_cast<Folder*>(o);
+	if(f && f->ancestor(this))
+	{
+		Log::error(o) << "Oops loops" << endl;
+		return false;
+	}
+
+	kids_[o->name()] = o;
+
+	f = o->parent();
+	if(f != this)
+	{
+		o->reparent(this);
+		f->release(o);
+	}
+
+	for(set<FolderObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->arrived(o);
+
+	return true;
+}
+
+bool Folder::release(IconObject* o)
+{
+	if(find(o->name()) == 0)
+	{
+		// Error("icon does not exist exists");
+		return false;
+	}
+
+	kids_.erase(o->name());
+
+	for(set<FolderObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->gone(o);
+
+	return true;
+}
+
+void Folder::createFiles()
+{
+	IconObject::createFiles();
+	path().mkdir();
+}
+
+
+void Folder::ensureChildrenWritable() 
+{	    
+	if(!ready_)
+		scan();
+
+	for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+	{
+		(*j).second->path().makeWritableByUser();
+		(*j).second->dotPath().makeWritableByUser();
+	}
+}
+
+
+set<string> Folder::can()
+{
+	set<string> c = IconObject::can();
+	c.erase("examine");
+	return c;
+}
+
+string Folder::uniqueName(const string& name)
+{
+	char buf[1024];
+	int i = 0;
+
+	if(kids_.find(name) == kids_.end())
+		return name;
+
+	do
+	{
+		sprintf(buf,"%s %d",name.c_str(),++i);
+	} while(kids_.find(buf) != kids_.end());
+		
+	return buf;
+}
+
+string Folder::duplicateName(const string& name)
+{
+	char buf[1024];
+	int i = 0;
+	int d = 0;
+
+	if(name.find("Copy ") == 0)
+	{
+		int n = name.find(" of ");
+		if(n != string::npos)
+		{
+			string s = name.substr(5,n-5);
+			if(is_number(s.c_str()))
+				d = n+4;
+		}
+	}
+
+	do
+	{
+		sprintf(buf,"Copy %d of %s",++i,name.c_str() + d);
+	} while(kids_.find(buf) != kids_.end());
+		
+	return buf;
+}
+
+void Folder::position(IconObject* o,int x,int y)
+{
+	for(set<FolderObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->position(o,x,y);
+
+	if(observers_.size() == 0)
+		o->position(x,y);
+}
+
+void Folder::renamed(IconObject* o,const string& old_name,const string& new_name)
+{
+	IconObjectH save = o;
+	kids_.erase(old_name);
+	kids_[new_name] = o;
+
+	for(set<FolderObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->renamed(o);
+}
+
+void Folder::tellObservers(TellObserverProc proc,IconObject* o)
+{
+	IconObjectH save = o;
+	for(set<FolderObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+	{
+		FolderObserver* f = *j;
+		(f->*proc)(o);
+	}
+
+}
+
+void Folder::open()
+{
+	FolderWindow::open(this);
+}
+
+void Folder::close()
+{
+	FolderWindow::close(this);
+}
+
+bool Folder::ancestor(IconObject* o)
+{
+	if(o == this)
+		return true;
+
+	for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+	{
+		IconObject *p = (*j).second;
+		if(o == p)
+			return true;
+
+		Folder* f = dynamic_cast<Folder*>(p);
+		if(f && f->ancestor(o))
+			return true;
+	}
+
+	return false;
+}
+
+class FolderCopier : public FolderVisitor {
+	FolderH target_;
+	virtual void visit(IconObject* o) { 
+		if(!target_->find(o->name()))
+			o->clone(target_, false); 
+	}
+public:
+	FolderCopier(Folder* f) : target_(f) {}
+};
+
+void Folder::copyContent(Folder* from)
+{
+	FolderCopier cp(this);
+	if(from) from->visit(cp);
+}
+
+
+class FolderCompare : public FolderVisitor {
+	FolderH other_;
+	virtual void visit(IconObject* o);
+	bool same_;
+public:
+	FolderCompare(Folder* f) : other_(f),same_(true) {}
+	bool same() const { return same_; }
+};
+
+void FolderCompare::visit(IconObject* o)
+{
+	if(!same_) return;
+
+	IconObject* x = other_->find(o->name());
+	if(x == 0) 
+		same_ = false;
+}
+
+bool Folder::sameAs(IconObject* other)
+{
+	Folder* f = dynamic_cast<Folder*>(other);
+	if(f == 0) return false;
+
+	FolderCompare cmp1(this);
+	f->visit(cmp1);
+
+	FolderCompare cmp2(f);
+	this->visit(cmp2);
+
+	return cmp1.same() && cmp2.same();
+
+}
+
+void Folder::notifyChanged()
+{
+	// When a folder changes, (its name... )
+	// mark all icons changed as well
+
+	IconObject::notifyChanged();
+
+	for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+	{
+		IconObject *p = (*j).second;
+		p->notifyChanged();
+	}
+}
+
+void Folder::destroy()
+{
+  if( ! isLink() )     //-- do not delete contents if link!
+    {
+	//-- IBM/AIX/xlC+STL loops with this construct:
+	//for(KidMap::iterator j = kids_.begin(); j != kids_.end(); ++j)
+	//{
+	//	IconObject *p = (*j).second;
+	//	p->destroy();
+	//}
+
+	//-- this one ok for xlC+STL:
+	KidMap::iterator j = kids_.begin();
+	while( j != kids_.end() )
+	{
+		IconObject *p = (*j).second;
+		++j;
+		p->destroy();
+	}
+    }
+
+  IconObject::destroy();
+}
+
+void Folder::empty()
+{
+	scan();
+	KidMap kids = kids_;
+	for(KidMap::iterator j = kids.begin(); j != kids.end(); ++j)
+	{
+		IconObject *p = (*j).second;
+		p->toWastebasket();
+	}
+	scan();
+
+}
+
+void Folder::drop(IconObject* o)
+{
+	if(!locked())
+	{
+		o->position(0,0);
+		adopt(o);
+		parent()->tellObservers(&FolderObserver::highlight,this);
+	}
+}
+
+static IconMaker<Folder> maker1("FOLDER");
+static IconMaker<Folder> maker2("Folder");
diff --git a/src/MetviewUI/Folder.h b/src/MetviewUI/Folder.h
new file mode 100644
index 0000000..1da8295
--- /dev/null
+++ b/src/MetviewUI/Folder.h
@@ -0,0 +1,169 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Folder.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Folder_H
+#define Folder_H
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#include <string>
+using std::string;
+
+
+class FolderObserver;
+
+class FolderVisitor {
+public:
+	virtual void visit(IconObject*) = 0;
+};
+
+
+class Folder : public IconObject {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Folder(Folder* parent,
+		const IconClass& kind, const string& name,
+		IconInfo* info);
+
+// -- Destructor
+
+	virtual ~Folder(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual IconObject* find(const vector<string>&);
+	virtual IconObject* find(const string&);
+	virtual IconObject* create(const string&);
+
+	virtual bool adopt(IconObject*);
+	virtual bool release(IconObject*);
+
+	virtual void visit(FolderVisitor&);
+
+
+	void addObserver(FolderObserver*);
+	void removeObserver(FolderObserver*);
+
+	string uniqueName(const string&);
+	string duplicateName(const string&);
+	void   position(IconObject*,int x,int y);
+	void   renamed(IconObject*,const string&,const string&); 
+
+	virtual void empty();
+	virtual void destroy();
+
+	void scan();
+	void ensureChildrenWritable() ;
+
+	void copyContent(Folder*);
+	virtual void drop(IconObject*);
+
+	typedef void (FolderObserver::*TellObserverProc)(IconObject*);
+	void tellObservers(TellObserverProc,IconObject*);
+
+	void open();
+	void close();
+
+	virtual bool ancestor(IconObject*);
+	virtual bool sameAs(IconObject*);
+	virtual void notifyChanged();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static Folder* top();
+	static Folder* folder(const string&,bool create = true);
+	static Folder* folder(const string&,const string&,bool create = true);
+	static Folder* folder(const string&,const string&,const string&,bool create = true);
+
+protected:
+
+// -- Members
+
+	typedef map<string,IconObjectH> KidMap;
+	KidMap kids_;
+	bool  ready_;
+
+	set<FolderObserver*> observers_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+
+	virtual set<string> can();
+	virtual void createFiles();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Folder(const Folder&);
+	Folder& operator=(const Folder&);
+
+// -- Members
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From IconObject
+
+	virtual void edit();
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Folder& p)
+	//	{ p.print(s); return s; }
+
+};
+
+class FolderH : public Handle<Folder>{
+public:
+	FolderH(Folder* f) : Handle<Folder>(f) {}
+};
+
+#endif
diff --git a/src/MetviewUI/FolderDrawers.cc b/src/MetviewUI/FolderDrawers.cc
new file mode 100644
index 0000000..0ac7adf
--- /dev/null
+++ b/src/MetviewUI/FolderDrawers.cc
@@ -0,0 +1,157 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FolderDrawers_H
+#include "FolderDrawers.h"
+#endif
+
+#ifndef IconDrawer_H
+#include "IconDrawer.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#include "Tab.h"
+
+bool FolderDrawers::doneFill_   = false;  // initialise
+bool FolderDrawers::doneUpdate_ = false;  // initialise
+
+FolderDrawers::FolderDrawers(Folder* f):
+	folder_(f),
+	widget_(0)
+{
+}
+
+FolderDrawers::~FolderDrawers()
+{
+	folder_->removeObserver(this);		
+	
+	// Remove the observers for all its kids also
+	map<FolderH,IconDrawer*>::iterator ii = drawers_.begin();
+	for (; ii != drawers_.end(); ii++)
+	  {
+	    FolderH folder = (*ii).first;
+	    IconDrawer *iconDrawer =  (*ii).second;
+	    XtDestroyWidget(iconDrawer->xd_rootwidget());
+	    folder->removeObserver(iconDrawer);
+	    delete iconDrawer;
+	  }
+}
+
+void FolderDrawers::install(Widget w)
+{
+	widget_ = w;
+	folder_->addObserver(this);
+
+	int n = 0;
+
+
+	// ir/2010-09-26: changed the behaviour so that the drawers
+	// will be re-synced with the system ones each time MetviewUI
+	// is started.
+
+	//while(drawers_.size() == 0 && fill(n++)) 
+	//while(fill(n++)) 
+	while(!FolderDrawers::doneFill_ && fill(n++))
+	{
+		FolderDrawers::doneFill_ = true;
+	} 
+
+
+	// for each local drawer folder, copy any new files from the system
+
+
+	if (!FolderDrawers::doneUpdate_)
+	{
+		FolderDrawers::doneUpdate_ = true;
+
+		map<FolderH,IconDrawer*>::iterator ii = drawers_.begin();
+		for (; ii != drawers_.end(); ii++)
+		{
+			FolderH folder = (*ii).first;
+
+			Folder* systemFolder = Folder::folder( "system_stationary"
+                                        	, folder->name()
+                                        	, false
+                                        	);
+
+			// only update drawers which have a corresponding system folder
+
+			if( systemFolder )
+			{
+				//printf ("Copying:::: %s to %s\n", folder->name().c_str(), systemFolder->name().c_str());
+				folder->copyContent( systemFolder );
+				folder->ensureChildrenWritable();
+			}
+		}
+	}
+
+}
+
+void FolderDrawers::arrived(IconObject* o)
+{     
+	Folder* f = dynamic_cast<Folder*>(o);
+	if(!f) return;
+	drawers_[f] = new IconDrawer(*this,f);
+
+}
+
+void FolderDrawers::opened(IconObject* o)
+{     
+	Folder* f = dynamic_cast<Folder*>(o);
+	if(!f) return;
+	IconDrawer* p = drawers_[f];
+	if(p) {
+		
+	}
+}
+
+void FolderDrawers::closed(IconObject* o)
+{     
+}
+
+void FolderDrawers::gone(IconObject* o)
+{	    
+	Folder* f = dynamic_cast<Folder*>(o);
+	if(!f) return;
+	IconDrawer* p = drawers_[f];
+	if(p) {
+		XtDestroyWidget(p->xd_rootwidget());	
+		delete p;
+		drawers_.erase(f);
+	}
+
+	int n = 0;
+	while(drawers_.size() == 0 && fill(n++))
+		;
+}
+
+void FolderDrawers::position(IconObject* o,int x,int y)
+{
+}
+
+void FolderDrawers::renamed(IconObject* o)
+{	      
+	Folder* f = dynamic_cast<Folder*>(o);
+	if(!f) return;
+	IconDrawer* p = drawers_[f];
+	if(p) TabSetName(widget_,p->xd_rootwidget(),o->name().c_str());
+}
+
+Widget FolderDrawers::widget()
+{
+	return widget_;
+}
+
+void FolderDrawers::newFolder()
+{
+	IconClass::find("FOLDER").createOne(folder_);
+}
diff --git a/src/MetviewUI/FolderDrawers.h b/src/MetviewUI/FolderDrawers.h
new file mode 100644
index 0000000..c84445b
--- /dev/null
+++ b/src/MetviewUI/FolderDrawers.h
@@ -0,0 +1,141 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FolderDrawers.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FolderDrawers_H
+#define FolderDrawers_H
+
+#ifndef FolderObserver_H  
+#include "FolderObserver.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#include <Xm/Xm.h>
+
+class IconDrawer;
+
+class FolderDrawers :  public FolderObserver {
+
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	FolderDrawers(Folder*);
+
+// -- Destructor
+
+	virtual ~FolderDrawers(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	void install(Widget);
+	virtual bool fill(int) = 0;
+
+	Widget widget();
+	virtual void newFolder();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None 
+
+
+// -- Class methods
+	// None 
+	
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected: 
+	// -- Contructors
+
+
+// -- Members
+	// None
+	FolderH folder_;
+
+
+// -- Methods
+
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None 
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+	FolderDrawers(const FolderDrawers&);
+	FolderDrawers& operator=(const FolderDrawers&);
+
+// -- Members
+
+	map<FolderH,IconDrawer*> drawers_;
+	Widget  widget_;
+	static bool doneFill_;
+	static bool doneUpdate_;
+
+// -- Methods  
+
+// -- Overridden methods
+       	 
+	 // from FolderObserver
+
+	virtual void arrived(IconObject*);
+	virtual void gone(IconObject*);
+	virtual void position(IconObject*,int,int);
+	virtual void renamed(IconObject*);
+
+	virtual void opened(IconObject*);
+	virtual void closed(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FolderDrawers& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FolderDrawers**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FolderDrawers);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FolderMsgDrawer.h b/src/MetviewUI/FolderMsgDrawer.h
new file mode 100644
index 0000000..7ea8787
--- /dev/null
+++ b/src/MetviewUI/FolderMsgDrawer.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FolderMsgDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FolderMsgDrawer_H
+#define FolderMsgDrawer_H
+
+#ifndef FolderDrawer_H
+#include "FolderDrawer.h"
+#endif
+
+#include "UIMessageDrawer.h"
+
+class FolderMsgDrawer : public XFolderDrawer<UIMessageDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	FolderMsgDrawer(FolderWindow*);
+
+// -- Destructor
+
+	~FolderMsgDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FolderMsgDrawer(const FolderMsgDrawer&);
+	FolderMsgDrawer& operator=(const FolderMsgDrawer&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FolderMsgDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FolderMsgDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FolderMsgDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FolderObserver.h b/src/MetviewUI/FolderObserver.h
new file mode 100644
index 0000000..236f3c3
--- /dev/null
+++ b/src/MetviewUI/FolderObserver.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FolderObserver.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FolderObserver_H
+#define FolderObserver_H
+
+class IconObject;
+class Folder;
+
+class FolderObserver {
+public:
+
+	virtual void arrived(IconObject*) = 0;
+	virtual void gone(IconObject*) = 0;
+	virtual void position(IconObject*,int,int) = 0;
+	virtual void renamed(IconObject*) = 0;
+
+
+	virtual void waiting(IconObject*)	{};
+	virtual void error(IconObject*)		{};
+	virtual void modified(IconObject*)	{};
+	virtual void ready(IconObject*)		{};
+	virtual void opened(IconObject*)	{};
+	virtual void closed(IconObject*)	{};
+
+	virtual void highlight(IconObject*) {};
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/FolderView.h b/src/MetviewUI/FolderView.h
new file mode 100644
index 0000000..320d4ba
--- /dev/null
+++ b/src/MetviewUI/FolderView.h
@@ -0,0 +1,9 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
diff --git a/src/MetviewUI/FolderViewer.cc b/src/MetviewUI/FolderViewer.cc
new file mode 100644
index 0000000..21ee531
--- /dev/null
+++ b/src/MetviewUI/FolderViewer.cc
@@ -0,0 +1,238 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FolderViewer_H
+#include "FolderViewer.h"
+#endif
+
+#ifndef IconSelection_H
+#include "IconSelection.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconInfo_H
+#include "IconInfo.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#ifndef FileSelection_H
+#include "FileSelection.h"
+#endif
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+
+FolderViewer::FolderViewer(Folder* f):
+	folder_(f),
+	count_(0)
+{
+}
+
+FolderViewer::~FolderViewer()
+{
+	folder_->removeObserver(this);		
+}
+
+void FolderViewer::install(Widget w)
+{
+	DragWindow::install(w);
+	redraw();
+}
+
+void FolderViewer::redraw()
+{
+	removeAllIcons();
+
+	folder_->removeObserver(this);
+	folder_->addObserver(this);		
+
+	int n = 0;
+	while(count_ == 0 && fill(n++))
+		;
+}
+
+
+void FolderViewer::arrived(IconObject* o)
+{     
+	if(accept(o)) 
+	{
+		int x = 0; int y = 0;
+		where(o,x,y);
+
+		addIcon(o,x,y);
+
+		count_++;
+	}
+}
+
+void FolderViewer::where(IconObject*,int&,int&)
+{
+}
+
+void FolderViewer::opened(IconObject* o)
+{     
+	openIcon(o);
+}
+
+void FolderViewer::closed(IconObject* o)
+{     
+	closeIcon(o);
+}
+
+void FolderViewer::gone(IconObject* o)
+{	    
+	removeIcon(o);
+	count_--;
+
+	int n = 0;
+	while(count_ == 0 && fill(n++))
+		;
+}
+
+void FolderViewer::position(IconObject* o,int x,int y)
+{
+    Icon i = DragFindIconByData(widget_,o);
+	if(i != 0) DragSetPositionIcon(widget_,i,x,y);
+}
+
+void FolderViewer::renamed(IconObject* o)
+{	      
+	refreshIcon(o);
+}
+
+bool FolderViewer::clone()
+{
+	return true;
+}
+
+void FolderViewer::drop(Dropping& drop)
+{
+    IconObject *o = drop.object(*this);
+	if(!accept(o)) return;
+
+	if(clone()) // Drop copies icon
+	{
+		o = o->clone(folder_);
+		position(o,drop.x(),drop.y());
+		return;
+	}
+
+
+	// NOTE x,y are not the mouse x,y, but the top corber of the icon
+	IconObject *x = objectAt(drop.x()+16,drop.y()+16);
+
+	if(drop.copy())
+	{
+		o = o->clone(folder_);
+		position(o,drop.x(),drop.y());
+	}
+	else if(folder_->adopt(o))
+		position(o,drop.x(),drop.y());
+
+	if(x) x->drop(o);
+
+}
+
+bool FolderViewer::accept(IconObject* o)
+{
+	return o->visible();
+}
+
+void FolderViewer::doubleClick(IconObject* o)
+{
+	o->edit();
+}
+
+void FolderViewer::rename(IconObject* o,const string& new_name)
+{
+	o->rename(new_name);
+}
+
+bool FolderViewer::fill(int)
+{
+	return false;
+}
+
+IconObject* FolderViewer::newIcon()
+{
+	return IconSelection::make(folder_,menu_x_,menu_y_);
+}
+
+IconObject* FolderViewer::newLink()
+{
+	if(FileSelection::ask("Select a file of a directory:"))
+	{
+		Path result = FileSelection::file();
+		string name = folder_->uniqueName(result.name());
+		Path path   = folder_->path().add(name);
+
+		path.symlink(result);		
+		
+		//The dot file for a link should not be created in the 
+		//link target's folder. By commenting out the line below we can prevent it!
+		//path.dot().symlink(result.dot());		
+
+		folder_->scan();
+
+		return folder_->find(name);
+
+	}
+	return 0;
+}
+
+void FolderViewer::waiting(IconObject* o)
+{
+	color(o,"orange");
+}
+
+void FolderViewer::error(IconObject* o)
+{
+	color(o,"red");
+}
+
+void FolderViewer::modified(IconObject* o)
+{
+	color(o,"black");
+}
+
+void FolderViewer::ready(IconObject* o)
+{
+	color(o,"green3");
+}
+
+void FolderViewer::color(IconObject* o, const char* name)
+{
+	Icon i = DragFindIconByData(widget_,o);
+	if(i != 0) DragSetIconColor(widget_,i,XPalette::pixel(name));
+}
+
+void FolderViewer::highlight(IconObject* o)
+{
+	Icon i = DragFindIconByData(widget_,o);
+	if(i != 0) DragBlinkIcon(widget_,i);
+}
diff --git a/src/MetviewUI/FolderViewer.h b/src/MetviewUI/FolderViewer.h
new file mode 100644
index 0000000..ed507dc
--- /dev/null
+++ b/src/MetviewUI/FolderViewer.h
@@ -0,0 +1,160 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FolderViewer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FolderViewer_H
+#define FolderViewer_H
+
+#ifndef FolderObserver_H  
+#include "FolderObserver.h"
+#endif
+
+#ifndef DragWindow_H
+#include "DragWindow.h"
+#endif
+
+#include "Folder.h"
+
+class FolderViewer :  public FolderObserver, public DragWindow {
+
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+// -- Destructor
+
+	virtual ~FolderViewer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None 
+
+
+// -- Class methods
+	// None 
+	
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected: 
+	// -- Contructors
+
+	FolderViewer(Folder*);
+
+// -- Members
+	// None
+
+	FolderH    folder_;
+
+// -- Methods
+
+	void install(Widget);
+	void redraw();
+	
+	IconObject* newIcon();
+	IconObject* newLink();
+
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+
+	// From DropSite
+
+	virtual void drop(Dropping&);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+	FolderViewer(const FolderViewer&);
+	FolderViewer& operator=(const FolderViewer&);
+
+// -- Members
+	// None	
+
+	int count_;
+
+// -- Methods  
+
+	void color(IconObject* o, const char* name);
+
+	virtual bool accept(IconObject*);
+	virtual bool clone();
+
+	virtual bool fill(int);
+
+	virtual void where(IconObject*,int&,int&);
+
+// -- Overridden methods
+       	 
+	 // from FolderObserver
+
+	virtual void arrived(IconObject*);
+	virtual void gone(IconObject*);
+	virtual void position(IconObject*,int,int);
+	virtual void renamed(IconObject*);
+
+	virtual void opened(IconObject*);
+	virtual void closed(IconObject*);
+
+	virtual void waiting(IconObject*);
+	virtual void error(IconObject*);
+	virtual void modified(IconObject*);
+	virtual void ready(IconObject*);
+
+	virtual void highlight(IconObject*);
+	
+
+	// From DragWindow
+	virtual void doubleClick(IconObject*);
+	virtual void rename(IconObject*,const string&);
+	 
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FolderViewer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FolderViewer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FolderViewer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/FolderWindow.cc b/src/MetviewUI/FolderWindow.cc
new file mode 100644
index 0000000..c82fc8d
--- /dev/null
+++ b/src/MetviewUI/FolderWindow.cc
@@ -0,0 +1,477 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Tab.h>
+#include <Drag.h>
+
+#ifndef Confirm_H
+#include "Confirm.h"
+#endif
+
+#ifndef Help_H
+#include "Help.h"
+#endif
+
+#ifndef Resources_H
+#include "Resources.h"
+#endif
+
+#ifndef FolderWindow_H
+#include "FolderWindow.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef IconInfo_H
+#include "IconInfo.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Runnable_H
+#include "Runnable.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#ifndef Tools_H
+#include "Tools.h"
+#endif
+
+#ifndef Items_H
+#include "Items.h"
+#endif
+
+
+typedef map<FolderH,FolderWindow*> Map;
+static Map folders;
+
+FolderWindow::FolderWindow(Folder* icon):
+	FolderViewer(icon),
+	Timeout(10)
+{
+
+	folder_->notifyOpened();
+	string name = folder_->fullName();
+
+	Widget top = MetviewUI::root();
+
+	create(XtDisplay(top),"Metview",0,0);
+
+	folders[folder_] = this;
+
+	loadResources();
+	XtSetSensitive(top_,folder_ != Folder::top());
+	XtSetSensitive(up_, folder_ != Folder::top());
+
+	//-- title bar, for main window use env.variable value --
+	const char* cstr=name.empty()?getenv("METVIEW_VERSION_TITLE"):name.c_str();
+	if( cstr )
+	  {
+	    XtVaSetValues(xd_rootwidget(),XmNtitle,cstr,0);
+	    XtVaSetValues(xd_rootwidget(),XmNiconName,cstr,0);
+	  }
+	XtRealizeWidget(xd_rootwidget());
+
+	drawers_.install(drawer_);
+	TabClose(drawer_);
+	enable();
+
+	FolderViewer::install(drag_);
+	Tools::make(tools_);
+	recents_.install(recent_);
+	recents_.top(folder_);
+
+	((IconObject*)folder_)->addObserver((IconObserver*)this);
+
+}
+
+FolderWindow::~FolderWindow()
+{
+	saveResources();
+	XtDestroyWidget(xd_rootwidget());
+	folders.erase(folder_);
+	folder_->notifyClosed();
+	((IconObject*)folder_)->removeObserver((IconObserver*)this);
+}
+
+void FolderWindow::open(Folder* icon)
+{
+	Map::iterator j = folders.find(icon);
+	if(j != folders.end())
+		(*j).second->raise();
+	else
+		new FolderWindow(icon);
+}
+
+void FolderWindow::close(Folder* icon)
+{
+	Map::iterator j = folders.find(icon);
+	if(j != folders.end())
+		(*j).second->close();
+}
+
+void FolderWindow::start()
+{
+	vector<string> opened;
+	Resources::get("OPEN",opened);
+	int n = 0;
+	for(vector<string>::iterator j = opened.begin(); j != opened.end(); ++j)
+	{
+		Folder *f = Folder::folder(*j,false);
+		if(f) 
+		{ 	
+			open(f);
+			n++;
+		}
+	}
+
+	if(n == 0) open(Folder::top());
+}
+
+
+void FolderWindow::raise()
+{
+	XMapRaised(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}
+
+void FolderWindow::close()
+{
+	closeCB(NULL, NULL);
+}
+
+void FolderWindow::closeCB(Widget,XtPointer)
+{
+	if(folders.size() == 1)
+		stop();
+	else
+		delete this;
+}
+
+void FolderWindow::exitCB(Widget,XtPointer)
+{
+	if(Confirm::ask(true,"Quit Metview?"))
+		stop();
+}
+
+void FolderWindow::stop()
+{
+	vector<string> opened;
+
+	while(folders.size())
+	{
+		Map::iterator j = folders.begin();
+		FolderWindow* f = (*j).second;
+		opened.push_back(f->folder_->fullName());
+		delete f;
+	}
+
+	Resources::set("OPEN",opened);
+	Resources::sync();
+	exit(0);
+}
+
+void FolderWindow::sortByNameCB(Widget,XtPointer)
+{
+	 sortByName();
+}
+
+void FolderWindow::sortByClassCB(Widget,XtPointer)
+{
+	 sortByClass();
+}
+
+void FolderWindow::run()
+{
+	folder_->scan();
+}
+
+void FolderWindow::commandCB(Widget,XtPointer data)
+{
+	XmRowColumnCallbackStruct *cb = (XmRowColumnCallbackStruct *) data;
+	string a(XtName(cb->widget));
+
+	for(vector<IconObjectH>::iterator j = current_.begin() ; 
+		j != current_.end(); ++j)
+			(*j)->command(a);
+}
+
+
+void FolderWindow::doubleClick(IconObject* o)
+{
+	o->doubleClick();
+}
+
+bool FolderWindow::clone()
+{
+	return false;
+}
+
+Path FolderWindow::prefFile()
+{
+	return folder_->dotPath();
+}
+
+void FolderWindow::loadResources()
+{
+	Request r(prefFile());
+
+	Dimension w,h;
+	Boolean small ;
+
+	w     = (long)r("WIDTH");
+	h     = (long)r("HEIGHT");
+
+	const char *s = r("SMALL_ICONS");
+	small = s != 0 && strcmp(s,"TRUE") == 0;
+
+	if(w == 0) w = 500;
+	if(h == 0) h = 300;
+
+	XtVaSetValues(form_,
+		XmNwidth, w,
+		XmNheight,h,
+		0);
+
+	XtVaSetValues(drag_,
+		XmNsmallIcons, small,
+		NULL);
+}
+
+void FolderWindow::saveResources()
+{
+	Request r(prefFile());
+	Dimension w,h;
+
+	XtVaGetValues(form_,
+		XmNwidth, &w,
+		XmNheight,&h,
+		0);
+
+	r("WIDTH")  = (long)w;
+	r("HEIGHT") = (long)h;
+
+	Boolean small ;
+	XtVaGetValues(drag_,
+		XmNsmallIcons, &small,
+		NULL);
+
+	r("SMALL_ICONS") = small ? "TRUE" : "FALSE";
+
+	r.save(prefFile());
+	
+}
+
+
+Widget FolderWindow::menu()
+{
+	if(current_.size() == 0)
+		return menu_;
+
+	set<string> c;
+
+	for(vector<IconObjectH>::iterator j = current_.begin() ; j != current_.end(); ++j)
+	{
+		if(c.size() == 0)
+			c = (*j)->can();
+		else {
+			set<string> d = (*j)->can();
+			set<string> e;
+
+			set_intersection(
+				c.begin(),c.end(),
+				d.begin(),d.end(),
+				inserter(e,e.begin()));
+
+			c = e;
+		}
+	}
+
+
+	WidgetList w;
+	int count;
+
+	XtVaGetValues(commands_,
+		XmNchildren,&w,
+		XmNnumChildren,&count,
+		0);
+			
+	for(int i = 2; i < count; i++)
+	{
+		const char* p = XtName(w[i]);
+		XtSetSensitive(w[i],c.find(p) != c.end());
+	}
+
+	return commands_;
+}
+
+
+void FolderWindow::fileMapCB(Widget, XtPointer)
+{
+	XtSetSensitive(close_,folders.size()>1);
+}
+
+void FolderWindow::toggleSizeCB(Widget, XtPointer)
+{
+	toggleSize();
+}
+
+void FolderWindow::rescanCB(Widget, XtPointer)
+{
+	folder_->scan();
+}
+
+void FolderWindow::where(IconObject* o,int& x,int& y)
+{
+	IconInfo& info = o->info();
+	x = info.x();
+	y = info.y();
+	if(x == 0 && y == 0)
+		XtVaSetValues(drag_,XmNautoPlace,True,0);
+	else
+		XtVaSetValues(drag_,XmNautoPlace,False,0);
+}
+
+#if 0
+
+void FolderWindow::arrived(IconObject* o)
+{
+	if(!o->visible()) return;
+
+	if(DragFindIconByData(widget_,o) == 0)
+	{
+		const char* n = o->name().c_str();
+		const char* c = o->className().c_str();
+		IconInfo& info = o->info();
+		Position x = info.x();
+		Position y = info.y();
+
+		if(*n == '.') return;
+
+
+		Icon i = DragAddIcon(widget_, c, n, o, info.x(), info.y());
+
+		if(x == 0 && y == 0)
+		{
+			XtVaSetValues(widget_,XmNautoPlace,False,0);
+			DragFindPositionIcon(widget_,i,&x,&y);
+			o->position(x,y);
+		}
+
+		// We should find the state here...
+
+	}
+}
+
+#endif
+
+void FolderWindow::recentCB(Widget,XtPointer data)
+{
+	XmRowColumnCallbackStruct *cb = (XmRowColumnCallbackStruct *) data;
+	const char* n = XtName(cb->widget);
+
+	if( strcmp(n,"..") == 0 )        //-- if 'parent folder' then build
+	  {
+	    string fn = folder_->fullName();
+	    n = dirname( fn.c_str() );
+	  }
+
+	recents_.open(n);
+}
+
+void FolderWindow::showLastCB(Widget,XtPointer)
+{
+	DragShowLast(widget_);
+}
+
+void FolderWindow::newIconCB(Widget,XtPointer)
+{
+	newIcon();
+}
+
+void FolderWindow::newLinkCB(Widget,XtPointer)
+{
+	newLink();
+}
+
+void FolderWindow::prefCB(Widget,XtPointer)
+{
+	IconObject* o = Items::find("general");
+	if(o) o->edit();
+}
+
+void FolderWindow::changed(IconObject* o)
+{
+	if(o == folder_)
+	{
+		string name = folder_->fullName();	
+		XtVaSetValues(xd_rootwidget(),XmNtitle,name.c_str(),0);
+		XtVaSetValues(xd_rootwidget(),XmNiconName,name.c_str(),0);
+	}
+}
+
+void FolderWindow::destroyed(IconObject* o)
+{
+	if(o == folder_)
+		delete this;
+}
+	// From DropSite
+
+void FolderWindow::drop(Dropping& d)
+{
+	FolderViewer::drop(d);
+}
+
+void FolderWindow::move(IconObject* o,int x,int y,IconObject *on)
+{
+	o->position(x,y);
+	if(on) on->drop(o);
+}
+
+void FolderWindow::copy(IconObject* o,int x,int y,IconObject *on)
+{
+	Folder *f = dynamic_cast<Folder*>(on);
+	if(!f) f = o->parent();
+
+//	int oldx = 0;
+//	int oldy = 0;
+
+//	iconPosition(o,oldx,oldy);
+
+	IconObject *c = o->clone(f);
+
+	f->position(c,x,y);
+//	f->position(o,oldx,oldy);
+}
+
+void FolderWindow::messagesCB(Widget,XtPointer)
+{
+	Folder::top()->showLog();
+}
+
+void FolderWindow::helpMenuCB(Widget,XtPointer data)
+{
+	XmRowColumnCallbackStruct *cb =(XmRowColumnCallbackStruct *) data;
+	Help::show(XtName(cb->widget));
+}
diff --git a/src/MetviewUI/FolderWindow.h b/src/MetviewUI/FolderWindow.h
new file mode 100644
index 0000000..6d28cdb
--- /dev/null
+++ b/src/MetviewUI/FolderWindow.h
@@ -0,0 +1,202 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File FolderWindow.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef FolderWindow_H
+#define FolderWindow_H
+
+
+#include "UIFolderWindow.h"
+#ifndef Timeout_H
+#include "Timeout.h"
+#endif
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef FolderViewer_H
+#include "FolderViewer.h"
+#endif
+
+#ifndef StationaryDrawers_H
+#include "StationaryDrawers.h"
+#endif
+
+#ifndef Recents_H
+#include "Recents.h"
+#endif
+
+#ifndef IconObserver_H
+#include "IconObserver.h"
+#endif
+
+
+class IconObject;
+
+class FolderWindow : public UIFolderWindow_c, public Timeout, 
+	public FolderViewer, public IconObserver {
+public:
+
+// -- Exceptions
+	// None
+
+
+// -- Destructor
+
+	virtual ~FolderWindow(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+
+	// ---
+
+	void raise();
+	void close();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void start();
+	static void open(Folder*);
+	static void close(Folder*);
+	static void stop();
+
+protected:
+
+// -- Contructors
+
+	FolderWindow(Folder*);
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	FolderWindow(const FolderWindow&);
+	FolderWindow& operator=(const FolderWindow&);
+
+// -- Members
+
+	StationaryDrawers drawers_;
+	Recents recents_;
+
+// -- Methods
+
+	void scan();
+	void loadResources();
+	void saveResources();
+	Path prefFile();
+
+	void color(IconObject*, const char*);
+
+// -- Overridden methods
+
+
+	// From XDesigner
+
+	void closeCB(Widget,XtPointer);
+	void exitCB(Widget,XtPointer);
+	void commandCB(Widget,XtPointer);
+	void fileMapCB(Widget,XtPointer);
+	void sortByNameCB(Widget,XtPointer);
+	void sortByClassCB(Widget,XtPointer);
+
+	void showLastCB(Widget,XtPointer);
+	void recentCB(Widget,XtPointer);
+	void newIconCB(Widget,XtPointer);
+	void newLinkCB(Widget,XtPointer);
+	void prefCB(Widget,XtPointer);
+
+	void rescanCB(Widget,XtPointer);
+	void toggleSizeCB(Widget,XtPointer);
+
+	void messagesCB(Widget,XtPointer);
+	void helpMenuCB(Widget,XtPointer);
+
+	// From timeout
+	virtual void run();
+
+	// From DragWindow
+
+	virtual Widget menu();
+
+	virtual void move(IconObject*,int,int,IconObject*);
+	virtual void copy(IconObject*,int,int,IconObject*);
+
+	virtual bool dropCopy() { return false; }
+	virtual void doubleClick(IconObject*);
+
+	// From FolderViewer
+
+	virtual void where(IconObject*,int&,int&);
+	virtual bool clone();
+
+	// From IconObserver
+
+	virtual void changed(IconObject*);
+	virtual void destroyed(IconObject*);
+
+	// From DropSite
+
+	virtual void drop(Dropping&);
+
+// -- Class members
+// -- Class methods
+	
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const FolderWindow& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(FolderWindow**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(FolderWindow);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/GridDrawer.cc b/src/MetviewUI/GridDrawer.cc
new file mode 100644
index 0000000..c92e72e
--- /dev/null
+++ b/src/MetviewUI/GridDrawer.cc
@@ -0,0 +1,105 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/TextF.h>
+
+#ifndef GridDrawer_H
+#include "GridDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef ViewEditor_H
+#include "ViewEditor.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+GridDrawer::GridDrawer(ViewEditor& e):
+	XEditorDrawer<UIGridDrawer_c>(e),
+	editor_(e),
+	cm_x_(false),
+	cm_y_(false)
+{
+}
+
+GridDrawer::~GridDrawer()
+{
+}
+
+void GridDrawer::edit(IconObject*)
+{
+	setGrid();
+}
+
+void GridDrawer::setGrid()
+{
+	double x,y;
+	editor_.getGrid(x,y);
+
+	double h,v;
+	editor_.getPaperSize(h,v);
+
+	if(cm_x_) x = h * x; else x *= 100; 
+	if(cm_y_) y = v * y; else y *= 100;
+
+	XMText(x_).set(x);
+	XMText(y_).set(y);
+}
+
+void GridDrawer::setCB(Widget w,XtPointer)
+{
+	double x,y;
+
+	XMText(x_).get(x);
+	XMText(y_).get(y);
+
+	double h,v;
+	editor_.getPaperSize(h,v);
+
+	if(cm_x_) x = x / h ; else x /= 100.0;
+	if(cm_y_) y = y / v ; else y /= 100.0;
+
+	editor_.setGrid(x,y);
+
+}
+
+void GridDrawer::snapCB(Widget w,XtPointer data)
+{
+	XmToggleButtonCallbackStruct* cb = (XmToggleButtonCallbackStruct*)data;
+	editor_.snapGrid(cb->set);
+}
+
+void GridDrawer::showCB(Widget w,XtPointer data)
+{
+	XmToggleButtonCallbackStruct* cb = (XmToggleButtonCallbackStruct*)data;
+	editor_.showGrid(cb->set);
+}
+
+void GridDrawer::xEntryCB(Widget w,XtPointer data)
+{
+	XmRowColumnCallbackStruct* cb = (XmRowColumnCallbackStruct*)data;
+	cm_x_ = XtName(cb->widget)[0] != '%';
+	setGrid();
+}
+
+void GridDrawer::yEntryCB(Widget w,XtPointer data)
+{
+	XmRowColumnCallbackStruct* cb = (XmRowColumnCallbackStruct*)data;
+	cm_y_ = XtName(cb->widget)[0] != '%';
+	setGrid();
+}
+
+static EditorDrawerMaker<GridDrawer,ViewEditor> maker(11);
+
diff --git a/src/MetviewUI/GridDrawer.h b/src/MetviewUI/GridDrawer.h
new file mode 100644
index 0000000..dadf313
--- /dev/null
+++ b/src/MetviewUI/GridDrawer.h
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File GridDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef GridDrawer_H
+#define GridDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UIGridDrawer.h"
+
+class ViewEditor;
+
+class GridDrawer : public XEditorDrawer<UIGridDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	GridDrawer(ViewEditor&);
+
+// -- Destructor
+
+	virtual ~GridDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+  void edit(IconObject*);
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	GridDrawer(const GridDrawer&);
+	GridDrawer& operator=(const GridDrawer&);
+
+// -- Members
+  	ViewEditor& editor_;
+
+	bool cm_x_;
+	bool cm_y_;
+
+// -- Methods
+
+	void setGrid();
+
+// -- Overridden methods
+
+	  void setCB(Widget, XtPointer);
+	  void showCB(Widget, XtPointer);
+	  void snapCB(Widget, XtPointer);
+	  void xEntryCB(Widget, XtPointer);
+	  void yEntryCB(Widget, XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const GridDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(GridDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(GridDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/HSLMaker.h b/src/MetviewUI/HSLMaker.h
new file mode 100644
index 0000000..e00978a
--- /dev/null
+++ b/src/MetviewUI/HSLMaker.h
@@ -0,0 +1,62 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File HSLMaker.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef HSLMaker_H
+#define HSLMaker_H
+
+#ifndef Rainbow_H
+#include "Rainbow.h"
+#endif
+
+#include <Palette.h>
+
+//------------------------------------------------------------------
+
+template<class T>
+class HSLMaker : public RainbowMaker {
+
+	const HSLColor& c_;
+	
+public:
+
+	HSLMaker(const HSLColor& c) : c_(c) {}
+
+	virtual Pixel pixel(double x,double y) const
+		{ 
+			HSLColor c(T::H(x,y,c_),T::S(x,y,c_),T::L(x,y,c_));
+			return XPalette::pixel(c);
+		}
+};
+
+//------------------------------------------------------------------
+
+struct makeHSL {
+	static double H(double,double,const HSLColor& c) { return c.hue;        }
+	static double S(double,double,const HSLColor& c) { return c.saturation; }
+	static double L(double,double,const HSLColor& c) { return c.lightness;  }
+};
+
+struct makeH : public makeHSL {
+	static double H(double x,double,const HSLColor&) { return x*360; }
+};
+
+struct makeS : public makeHSL {
+	static double S(double x,double,const HSLColor&) { return x; }
+};
+
+struct makeL : public makeHSL {
+	static double L(double x,double,const HSLColor&) { return x; }
+};
+
+//------------------------------------------------------------------
+
+#endif
diff --git a/src/MetviewUI/Help.cc b/src/MetviewUI/Help.cc
new file mode 100644
index 0000000..54cb383
--- /dev/null
+++ b/src/MetviewUI/Help.cc
@@ -0,0 +1,23 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Help_H
+#include "Help.h"
+#endif
+
+#ifndef Netscape_H
+#include "Netscape.h"
+#endif
+
+//=================================================================
+
+void Help::show(const string& url)
+{
+	Netscape::showPage(url);
+}
diff --git a/src/MetviewUI/Help.h b/src/MetviewUI/Help.h
new file mode 100644
index 0000000..91bfb1f
--- /dev/null
+++ b/src/MetviewUI/Help.h
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Help.h
+// Baudouin Raoult - ECMWF Jun 00
+
+#ifndef Help_H
+#define Help_H
+
+
+#include <string>
+using std::string;
+
+#include "Input.h"
+
+class Help : public Input {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+
+// -- Destructor
+
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+	static void show(const string&);
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Help(const Help&);
+	Help& operator=(const Help&);
+
+// -- Members
+
+// -- Methods
+	
+	virtual void start();
+
+// -- Overridden methods
+
+	// From Input
+
+	virtual void ready(const char*);
+	virtual void done(FILE*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Help& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Help**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Help);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/HelpFactory.cc b/src/MetviewUI/HelpFactory.cc
new file mode 100644
index 0000000..253c107
--- /dev/null
+++ b/src/MetviewUI/HelpFactory.cc
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+
+static map<string,HelpFactory*>* makers = 0;
+
+HelpFactory::HelpFactory(const string& name)
+{
+	if(makers == 0)
+		makers = new map<string,HelpFactory*>;
+
+	(*makers)[name] = this;
+}
+
+HelpFactory::~HelpFactory()
+{
+	// Not called
+}
+
+RequestPanelHelp* HelpFactory::create(Widget parent, RequestPanel& owner, const Parameter& param)
+{
+	const char* help = param.help();
+
+	if(help) {
+		map<string,HelpFactory*>::iterator j = makers->find(help);
+		if(j != makers->end())
+			return (*j).second->make(parent, owner, param);
+	}
+
+	return 0;
+}
diff --git a/src/MetviewUI/HelpFactory.h b/src/MetviewUI/HelpFactory.h
new file mode 100644
index 0000000..329b2b5
--- /dev/null
+++ b/src/MetviewUI/HelpFactory.h
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File EditorFactory.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef HelpFactory_H
+#define HelpFactory_H
+
+#include <string>
+using std::string;
+
+#include "mars.h"
+#include <Xm/Xm.h>
+
+class RequestPanelHelp;
+class RequestPanel;
+class Parameter;
+
+class HelpFactory {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	HelpFactory(const string& name);
+
+// -- Destructor
+
+	virtual ~HelpFactory(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual RequestPanelHelp* make(Widget w, RequestPanel& owner, const Parameter& def) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static RequestPanelHelp* create(Widget parent, RequestPanel& owner, const Parameter& info);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+						
+	HelpFactory(const HelpFactory&);
+	HelpFactory& operator=(const HelpFactory&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+
+};
+
+template<class T>
+class HelpMaker : public HelpFactory {
+	RequestPanelHelp* make(Widget w, RequestPanel& owner, const Parameter& def) { return new T(w, owner, def); }
+public:
+	HelpMaker(const string& name) : HelpFactory(name) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/IconClass.cc b/src/MetviewUI/IconClass.cc
new file mode 100644
index 0000000..0a1eb23
--- /dev/null
+++ b/src/MetviewUI/IconClass.cc
@@ -0,0 +1,530 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef MvRequestUtil_H
+#include "MvRequestUtil.hpp"
+#endif
+
+#ifndef MvScanFileType_H
+#include "MvScanFileType.h"
+#endif
+
+static map<string,const IconClass*> classes;
+
+// All icon classed subclass from this one
+static IconClass super("*",0);
+
+static set<string> allActions;
+
+IconClass::IconClass(const string& name,request* r,const IconClass* sup):
+	request_(r),
+	name_(name),
+	super_(sup)
+{
+	classes[name] = this;
+	if(!super_ && this != &super)
+		super_ = &super;
+}
+
+IconClass::~IconClass()
+{
+	// Never called
+	classes.erase(name_);
+	free_all_requests(request_);
+}
+
+void IconClass::scan(ClassScanner& s)
+{
+	map<string,const IconClass*>::iterator j;
+	for(j = classes.begin(); j != classes.end() ; ++j)
+		s.next(*(*j).second);
+}
+
+const string& IconClass::name() const
+{
+	return name_;
+}
+
+const IconClass& IconClass::find(const string& name)
+{
+	 map<string,const IconClass*>::iterator j = classes.find(name);
+	 if(j != classes.end())
+		return *(*j).second;
+
+	 return *(new IconClass(name,empty_request(0)));
+}
+
+void IconClass::load(request* r)
+{
+	new IconClass(get_value(r,"class",0),r);
+}
+
+bool IconClass::isSubClassOf(const IconClass& other) const 
+{
+	return this == &other;
+}
+
+string IconClass::editor() const
+{
+	const char* e = get_value(request_,"editor_type",0);
+	printf("%s\n",e);
+	return e ? e : "NoEditor";
+}
+
+
+bool IconClass::canBecome(const IconClass& other) const 
+{
+	if ( isSubClassOf(other) ) return true;
+	
+	for(set<const IconClass*>::const_iterator k = outputs_.begin();
+		k != outputs_.end(); ++k)
+	{
+	        if ( 
+		(*k)->canBecome(other) ) return true;	
+	}
+	return false;
+}
+
+set<string> IconClass::can() const
+{
+
+	static Action all("*","*");
+	if(services_.find(all) != services_.end())
+		return allActions;
+
+	set<string> c;
+	if(super_) c = super_->can();
+
+	for(map<Action,Service*>::const_iterator j = services_.begin(); 
+		j != services_.end(); ++j)
+			c.insert((*j).first.name());
+
+	for(set<const IconClass*>::const_iterator k = outputs_.begin();
+		k != outputs_.end(); ++k)
+	{
+		// cout << name_ << " can, adding " << (*k)->name_ << endl;
+		set<string> oc = (*k)->can();
+		c.insert(oc.begin(),oc.end());
+	}
+
+	return c;
+}
+
+void IconClass::service(const Action& action,const IconClass* output,Service* s)  const
+{
+	IconClass* self = const_cast<IconClass*>(this);
+	if(output) self->outputs_.insert(output);
+
+	if(services_.find(action) != services_.end())
+		return;
+
+	allActions.insert(action.name());
+
+	cout << name_ << " can " << action << " ";
+	if(output) cout << " output " << output->name_;
+	cout << " with " << *s << endl;
+
+	self->services_[action] = s;
+}
+
+Service* IconClass::service(const Action& action) const
+{
+	cout << "IconClass::service class " << name_ << endl;
+	cout << "IconClass::service for " << action << endl;
+	map<Action,Service*>::const_iterator j = services_.find(action);
+	if(j == services_.end())
+	{
+		Service* s = super_?super_->service(action):0;
+		if(s == 0 && !(action.name() == "*"))
+			return service(Action("*",action.mode()));
+		else
+			return s;
+	}
+	 cout << * ( (*j).second ) << endl;
+	return (*j).second;
+}
+
+static SimpleLoader<IconClass> loadClasses("object",0);
+
+//===================================================================
+
+
+#if 0
+//
+// stuff moved to library
+//
+
+
+struct File {            //-- wrapper function always closes the file
+
+	FILE *f_;
+
+public:
+	File(const char *name,char *mode) { f_ = fopen(name,mode); };
+	~File()                     { if(f_) fclose(f_);   };
+};
+
+//
+// NOTE: a close cousin of scan_file(...) is in ./src/libMars/guess.c !!!
+//
+
+static const char *scan_file(const char *file)
+{
+
+  const int cMAXSHIFT = 8; //-- search tolerance for word "GRIB" or "BUFR"
+  const int cMINREAD  = 4; //-- need to be able to read at least this much
+
+	bool isBinary = IsBinaryOrMissingFile( file );
+
+	File f(file,"r");
+	if(!f.f_)
+	  return "BAD";                 //-- missing or non-readable file
+
+	union {
+		char  c;
+		short s;
+		long  l;
+		char  ch[ cMAXSHIFT + 4 ];
+	} buf;
+	memset(&buf,0,sizeof(buf));
+
+	int readCount = fread((char*)&buf,1,sizeof(buf),f.f_);
+	
+	if( readCount < cMINREAD )      //-- if not enough bytes for safe tests
+	  {
+	    return isBinary ? "BINARY" : "NOTE";
+	  }
+
+
+	if( isBinary )                  //-- first check for binary types
+	  {
+	    for( int s=0; s <= cMAXSHIFT; ++s ) //-- for GRIB & BUFR allow some leading rubbish
+	      {
+		if(strncmp(buf.ch+s,"GRIB",4) == 0) 
+		  return "GRIB";
+
+		if(strncmp(buf.ch+s,"BUFR",4) == 0) 
+		  return "BUFR";
+	      }
+
+	    if(strncmp(buf.ch,"TIDE",4) == 0) 
+	      return "GRIB";
+
+	    if(strncmp(buf.ch,"BUDG",4) == 0) 
+	      return "GRIB";
+
+
+	    if(strncmp(buf.ch,"CDF",3) == 0) 
+	      return "NETCDF";
+
+	    if(strncmp(buf.ch,"V5D",3) == 0) 
+	      return "VIS5D_FILE";
+
+	    if(strncmp(buf.ch+1,"PNG",3) == 0) 
+	      return "PNG";
+
+	    if(strncmp(buf.ch+6,"JFIF",4) == 0) 
+	      return "JPEG";                //--  JPEG - JFIF
+
+	    if(strncmp(buf.ch+6,"Exif",4) == 0) 
+	      return "JPEG";                //--  JPEG - EXIF/DCF
+	  }
+
+	if( isBinary )                  //-- rest of the known types are all text files
+	    return "BINARY";            //-- thus this one is of unknown binary type
+
+
+	                                //-- check for text types that cannot be requests
+	if(strncmp(buf.ch,"%!",2) == 0) 
+	  return "PSFILE";
+
+	if(strncmp(buf.ch,"#!",2) == 0) 
+	  return "SHELL";
+
+	if(strncmp(buf.ch,"#GEO",4) == 0) 
+	  return "GEOPOINTS";
+
+	if(strncmp(buf.ch,"#LLM",4) == 0) 
+	  return "LLMATRIX";
+
+	if(strncmp(buf.ch,"#LLV",4) == 0) 
+	  return "LLVALUE";
+
+	if(strncmp(buf.ch,"#MACRO",6) == 0)
+	  return "MACRO";
+
+	if(strncmp(buf.ch,"#Metview",8) == 0)
+	  return "MACRO";
+
+	if(strncmp(buf.ch,"# Metview",9) == 0)
+	  return "MACRO";
+
+	if(strncmp(buf.ch,"<magics>",8) == 0) 
+	  return "MAGML";
+
+	                                //-- check if a Metview request
+
+	                                     //-- WARNING (2004-05-10):
+	request *r = read_request_file(file);//-- a file NOT ending in CR can crash parser!!!
+	if(r != 0)
+	  {
+	    string name = r->name?r->name:"";
+	    free_all_requests(r);
+
+	    map<string,const IconClass*>::iterator j = classes.find(name);
+	    if(j != classes.end())
+	      {
+		return (*j).second->name().c_str();  //-- it is Metview request
+	      }
+	  }
+
+
+	rewind(f.f_);
+
+	unsigned char c = ' ';          //-- look for a Vis5D control script
+	char line[1024];
+	int i = 0;
+	line[0] = 0;
+	while(!feof(f.f_))
+	  {
+	    fread((char*)&c,1,1,f.f_);
+
+	    if(i == sizeof(line) || c == '\n')
+	      {
+		i = 0;
+		if(strncmp("vis5d_",line,6) == 0)
+		  return "VIS5D_SCRIPT";
+	      }
+	    else
+	      line[i++] = c;
+	  }
+
+
+	fclose( f.f_ );                 //-- destructor will not close (end-of-file => !f.f_)
+	f.f_ = 0;                       //-- but after fclose destructor would try and...
+
+	return "NOTE";                  //-- unknown text file; make it NOTE
+}
+
+
+static string guess_file(const char* file)
+{
+
+	struct stat buf;
+	
+	if(stat(file,&buf) <0)
+		return "BAD";
+
+	switch(buf.st_mode & S_IFMT)
+	{
+		case S_IFDIR:
+			return "FOLDER";
+
+		case S_IFREG:
+			return scan_file(file);
+
+		default:
+			return "SPECIAL";
+	}
+	
+}
+#else
+
+const string missing("///");
+
+static bool is_request(const char* file, string& s)
+{
+    const off_t LARGEST_REQUEST_FILE = 1024*1024;
+
+	                                //-- check if a Metview request
+	s = missing;
+
+
+    // first check whether this file is abnormally large, because it it is,
+    // then read_request_file() will spend ages trying to parse it (if it
+    // looks like a valid request file).
+    
+    Path file_path(file);
+    off_t size = file_path.sizeInBytes();
+    
+    if (size < LARGEST_REQUEST_FILE)
+    {
+	                                         //-- WARNING (2004-05-10):
+	    request *r = read_request_file(file);//-- a file NOT ending in CR can crash parser!!!
+	    if(r != 0)
+	      {
+	        string name = r->name?r->name:"";
+	        free_all_requests(r);
+
+	        map<string,const IconClass*>::iterator j = classes.find(name);
+	        if(j != classes.end())
+	          {
+		    s = (*j).second->name().c_str();  //-- it is Metview request
+	          }
+	      }
+        }
+
+	return s != missing;
+}
+
+static string guess_file(const char* file)
+{
+
+	struct stat buf;
+	
+	if(stat(file,&buf) <0)
+		return "BAD";
+
+	switch(buf.st_mode & S_IFMT)
+	{
+		case S_IFDIR:
+			return	ScanFileType(file);
+			//return "FOLDER";
+
+		case S_IFREG:
+			//return scan_file(file);
+			{
+			  string ft = ScanFileType(file);
+			  if( ft != "NOTE" )
+			    return ft;
+
+			  string ft2;
+			  if( is_request( file, ft2 ) )
+			    return ft2;
+			  else
+			    return ft;
+			}
+
+		default:
+			return "SPECIAL";
+	}
+	
+}
+
+#endif
+
+const IconClass& IconClass::guess(const Path& file)
+{
+	string kind = guess_file(file.str().c_str());
+	return find(kind);
+}
+
+IconObject* IconClass::createOne(Folder* f) const
+{
+	return defaultObject()->clone(f);
+}
+
+IconObject* IconClass::defaultObject() const
+{
+	Folder* f       = Folder::folder("defaults");
+	return IconFactory::create(f,defaultName(),*this);
+}
+
+string IconClass::defaultName() const
+{
+	const char* def = get_value(request_,"default_name",0);
+	return def ? string(def) : name_;
+}
+
+string IconClass::helpPage() const
+{
+	const char* def = get_value(request_,"help_page",0);
+	return def ? string(def) : name_;
+}
+
+Path IconClass::pixmap() const
+{
+	const char* def = get_value(request_,"pixmap",0);
+	if (def) return string(def);
+
+	string s = getenv("METVIEW_DIR_SHARE");
+
+	return s + "/icons/" +  name_ + ".icon";
+}
+
+string IconClass::type() const
+{
+	const char* def = get_value(request_,"type",0);
+	return def ? string(def) : name_;
+}
+
+Path IconClass::definitionFile() const
+{
+	const char* def = get_value(request_,"definition_file",0);
+	if(def == 0) def = "/dev/null";
+	return Path(def);
+}
+
+Path IconClass::rulesFile() const
+{
+	const char* def = get_value(request_,"rules_file",0);
+	if(def == 0) def = "/dev/null";
+	return Path(def);
+}
+
+long IconClass::expandFlags() const
+{
+	const char* def = get_value(request_,"expand",0);
+	return def?atol(def):EXPAND_MARS;
+}
+
+Language& IconClass::language() const
+{
+	return Language::find(this);
+}
+
+// This should be in ObjectList...
+
+// Visdef -> 1
+// Data,File, Macro, Family, ..   -> 2
+// View   -> 3
+// Window -> 4
+
+int IconClass::priority() const
+{
+	// Very, very UGLY if....
+
+	string t = type();
+
+	if(t == "Visdef") return 1;
+	if(t == "View")   return 3;
+	if(t == "Window") return 4;
+
+	return 2;
+}
diff --git a/src/MetviewUI/IconClass.h b/src/MetviewUI/IconClass.h
new file mode 100644
index 0000000..ff5eaaa
--- /dev/null
+++ b/src/MetviewUI/IconClass.h
@@ -0,0 +1,166 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconClass.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconClass_H
+#define IconClass_H
+
+#include <string>
+using std::string;
+
+
+#ifndef Metview_H
+#include "Metview.h"
+#endif
+
+#include "Action.h"
+
+class Service;
+class IconObject;
+class Folder;
+class Path;
+class Language;
+
+
+
+
+class IconClass;
+struct ClassScanner {
+	virtual void next(const IconClass&) = 0;
+};
+
+class IconClass {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconClass(const string&,request*,const IconClass* = 0);
+	
+// -- Destructor
+
+	virtual ~IconClass(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	virtual const string& name() const;
+	virtual string editor() const;
+	virtual string type() const;
+	virtual string defaultName() const;
+	virtual string helpPage() const;
+	virtual Path pixmap() const;
+	virtual Path definitionFile() const;
+	virtual Path rulesFile() const;
+	virtual long expandFlags() const;
+
+
+	virtual bool isSubClassOf(const IconClass&) const;
+	virtual bool canBecome(const IconClass&) const;
+
+	virtual Service* service(const Action&) const;
+	virtual void service(const Action&,const IconClass*,Service*) const;
+	virtual set<string> can() const;
+
+	virtual IconObject* defaultObject() const;
+	virtual IconObject* createOne(Folder*) const;
+
+	virtual Language& language() const;
+
+	virtual int priority() const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+	static const IconClass& find(const string&);
+	static void load(request*);
+	static void globalService(const string&,Service*);
+
+	static void scan(ClassScanner&);
+
+	static const IconClass& guess(const Path&);
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconClass(const IconClass&);
+	IconClass& operator=(const IconClass&);
+
+// -- Members
+
+	const IconClass*     super_;
+	string               name_;
+	request*             request_;
+	
+	map<Action,Service*> services_;
+	set<const IconClass*>      outputs_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconClass& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(IconClass**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(IconClass);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/IconDrawer.cc b/src/MetviewUI/IconDrawer.cc
new file mode 100644
index 0000000..8441482
--- /dev/null
+++ b/src/MetviewUI/IconDrawer.cc
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef IconDrawer_H
+#include "IconDrawer.h"
+#endif
+
+#ifndef Ask_H
+#include "Ask.h"
+#endif
+
+#include "Drag.h"
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#ifndef Confirm_H
+#include "Confirm.h"
+#endif
+
+#ifndef FolderDrawers_H
+#include "FolderDrawers.h"
+#endif
+
+
+//-----------------------------------------------------------------
+
+IconDrawer::IconDrawer(FolderDrawers& owner,Folder* f):
+	owner_(owner),
+	FolderViewer(f)
+{
+	create(owner_.widget(),(char*)f->name().c_str());
+	FolderViewer::install(drag_);
+	Manage();
+}
+
+IconDrawer::~IconDrawer()
+{
+}
+
+Widget IconDrawer::menu()
+{
+	return current_.size()?menu1_:menu2_;
+}
+
+void IconDrawer::deleteDrawerCB(Widget, XtPointer)
+{
+  if( Confirm::ask( true, "Delete this drawer?" ) )
+	folder_->toWastebasket();
+}
+
+void IconDrawer::renameDrawerCB(Widget, XtPointer)
+{
+	string name = folder_->name();
+	if(Ask::show(name,"New name:"))
+		folder_->rename(name);
+}
+
+void IconDrawer::updateDrawerCB(Widget, XtPointer)
+{
+  Folder* systemFolder = Folder::folder( "system_stationary"
+				       , folder_->name()
+				       , false
+				       );
+  if( systemFolder )
+      folder_->copyContent( systemFolder );
+  else
+      Confirm::ask( true, "Cannot update renamed or user created drawers!" );
+}
+
+void IconDrawer::newDrawerCB(Widget, XtPointer)
+{
+	owner_.newFolder();
+}
+
+void IconDrawer::newIconCB(Widget, XtPointer)
+{
+	newIcon();
+}
+
+void IconDrawer::deleteCB(Widget, XtPointer)
+{
+	for(vector<IconObjectH>::iterator j = current_.begin(); 
+		j != current_.end(); ++j)
+			(*j)->toWastebasket();
+}
+
+void IconDrawer::editCB(Widget, XtPointer)
+{
+	for(vector<IconObjectH>::iterator j = current_.begin(); 
+		j != current_.end(); ++j)
+			(*j)->edit();
+}
+
+void IconDrawer::openFolderCB(Widget, XtPointer)
+{
+	folder_->open();
+}
+
diff --git a/src/MetviewUI/IconDrawer.h b/src/MetviewUI/IconDrawer.h
new file mode 100644
index 0000000..2651aa3
--- /dev/null
+++ b/src/MetviewUI/IconDrawer.h
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconDrawer_H
+#define IconDrawer_H
+
+#include "UIIconDrawer.h"
+
+#ifndef FolderViewer_H
+#include "FolderViewer.h"
+#endif
+
+class FolderDrawers;
+
+class IconDrawer : public UIIconDrawer_c, public FolderViewer {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconDrawer(FolderDrawers&,Folder*);
+
+// -- Destructor
+
+	virtual ~IconDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconDrawer(const IconDrawer&);
+	IconDrawer& operator=(const IconDrawer&);
+
+// -- Members
+	// None
+
+	FolderDrawers& owner_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From DragWindow
+
+	virtual Widget menu();
+	virtual bool dropCopy() { return true; }
+
+	// From XD
+
+     virtual void deleteDrawerCB(Widget, XtPointer);
+     virtual void renameDrawerCB(Widget, XtPointer);
+     virtual void updateDrawerCB(Widget, XtPointer);
+     virtual void newDrawerCB(Widget, XtPointer);
+     virtual void newIconCB(Widget, XtPointer);
+     virtual void deleteCB(Widget, XtPointer);
+     virtual void editCB(Widget, XtPointer);
+     virtual void openFolderCB(Widget, XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(IconDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(IconDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/IconFactory.cc b/src/MetviewUI/IconFactory.cc
new file mode 100644
index 0000000..cb2bb6c
--- /dev/null
+++ b/src/MetviewUI/IconFactory.cc
@@ -0,0 +1,152 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconInfo_H
+#include "IconInfo.h"
+#endif
+
+#ifndef Unknown_H
+#include "Unknown.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Temporary_H
+#include "Temporary.h"
+#endif
+
+static map<string,IconFactory*>* makers = 0;
+
+IconFactory::IconFactory(const string& name)
+{
+	if(makers == 0)
+		makers = new map<string,IconFactory*>;
+
+	(*makers)[name] = this;
+}
+
+IconFactory::~IconFactory()
+{
+	// Not called
+}
+
+IconObject* IconFactory::create(Folder* parent,const string& name,const IconClass& kind,IconInfo *info)
+{
+
+
+	IconObject* o = 0;
+
+	//cout << "IconFactory::create " << name << endl;
+
+	// Try class, then type
+	map<string,IconFactory*>::iterator j = makers->find(kind.name());
+	if(j == makers->end()) j = makers->find(kind.type());
+	if(j == makers->end())
+	{
+		//cout << "oops, no factory for " << kind.type() << endl;
+		// o = new Unknown(parent,kind,name,info);
+		o = 0;
+	}
+	else o =  (*j).second->make(parent,kind,name,info);
+
+	if(o != 0)
+	{
+		parent->adopt(o);
+		o->createFiles();
+	}
+
+	return o;
+
+}
+
+IconObject* IconFactory::create(Folder* parent,const string& name,const IconClass& kind)
+{
+	return create(parent,name,kind,0);
+}
+
+IconObject* IconFactory::create(Folder* parent,const string& name)
+{
+	Path path = parent->path(); 
+	Path file = path.add(name);
+	Path dot  = path.add(string(".") + name);
+
+	//cout << "create " << name << " in " << *parent << endl;
+	//cout << file << endl;
+	//cout << dot << endl;
+
+	Request info(dot);
+
+	const char* type = info("ICON_CLASS");
+	const IconClass&  kind = (type && *type) ? IconClass::find(type) : IconClass::guess(file);
+
+	if(!info) {
+		info = Request("USER_INTERFACE");
+		info("ICON_CLASS") = kind.name().c_str();
+	}
+
+	return create(parent,name,kind,new IconInfo(info));
+}	
+
+IconObject* IconFactory::create(const string& name,const IconClass& kind)
+{
+	IconObject* o = IconObject::search(name);
+	if(o) return o;
+
+	//cout << "IconFactory::create " << name << endl;
+	string dir  = dirname(name.c_str());
+	string base = mbasename(name.c_str());
+	Folder* f   = dynamic_cast<Folder*>(create(dir,IconClass::find("FOLDER")));
+	return f?create(f,base,kind):0;
+}
+
+IconObject* IconFactory::create(IconObject* o,const Request& r,
+	const IconClass* c)
+{
+	return new Temporary(o,r,c);
+}
+
+IconObject* IconFactory::create(Folder* parent,const Request& r)
+{
+	const char* kind = r.getVerb();
+	const char* name = r("_NAME");
+
+	string kind1(kind);    //it is needed on alpha
+	const IconClass& c = IconClass::find(kind1);
+
+// The command below was causing memory problems on alpha.
+// Therefore, it was re-coded in a different way
+//	string n = name?mbasename(name):c.defaultName();
+	string n;
+	if (name)
+	      n = mbasename(name);
+	else
+	      n = c.defaultName();
+
+	n = parent->uniqueName(n);
+
+	IconObject* o = create(parent,n,c);
+
+	r.save(o->path());
+	return o;
+}
+
diff --git a/src/MetviewUI/IconFactory.h b/src/MetviewUI/IconFactory.h
new file mode 100644
index 0000000..1671fb7
--- /dev/null
+++ b/src/MetviewUI/IconFactory.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconFactory.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconFactory_H
+#define IconFactory_H
+
+#include <string>
+using std::string;
+
+class IconObject;
+class IconClass;
+class IconInfo;
+class Folder;
+class Request;
+
+class IconFactory {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconFactory(const string& name);
+
+// -- Destructor
+
+	virtual ~IconFactory(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual IconObject* make(Folder* parent,const IconClass& kind,
+						const string& name,IconInfo* info) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static IconObject* create(IconObject*,const Request&,const IconClass* = 0);
+	static IconObject* create(Folder*,const Request&);
+	static IconObject* create(const string& name);
+	static IconObject* create(const string& name,const IconClass&);
+	static IconObject* create(Folder* parent,const string& name);
+	static IconObject* create(Folder* parent,const string& name,const IconClass&);
+	static IconObject* create(Folder* parent,const string& name,const IconClass&,IconInfo*);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconFactory(const IconFactory&);
+	IconFactory& operator=(const IconFactory&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconFactory& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T>
+class IconMaker : public IconFactory {
+	IconObject* make(Folder* parent,const IconClass& kind,
+			const string& name,IconInfo* info) 
+		{
+			return new T(parent,kind,name,info);
+		}
+public:
+	IconMaker(const string& name) : IconFactory(name) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/IconHelp.cc b/src/MetviewUI/IconHelp.cc
new file mode 100755
index 0000000..fdedbc4
--- /dev/null
+++ b/src/MetviewUI/IconHelp.cc
@@ -0,0 +1,154 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef IconHelp_H
+#include "IconHelp.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef SyncFolders_H
+#include "SyncFolders.h"
+#endif
+
+
+IconHelp::IconHelp(Widget parent, RequestPanel& owner, const Parameter& def):
+	XHelp<UIIconHelp_c>(parent, owner, def), 
+	FolderViewer(
+		  Folder::folder("templates",
+			  	owner.iconClass().defaultName(),
+				param_.beautifiedName()))
+{     
+	Request interface = param_.interfaceRequest();
+	classes_ = interface.get("class");
+
+    FolderViewer::install(drag_);
+
+	// Synchronize those two folders
+
+	SyncFolders::add(
+	
+		  Folder::folder("templates",
+			  	owner.iconClass().defaultName(),
+				param_.beautifiedName()),
+
+		  Folder::folder("system_templates",
+			  	owner.iconClass().defaultName(),
+				param_.beautifiedName(),false)
+	
+	);
+}
+
+IconHelp::~IconHelp()
+{
+}
+
+bool IconHelp::fill(int pass)
+{
+	Folder* system = Folder::folder("system_templates",
+					owner_.iconClass().defaultName(),
+					param_.beautifiedName(),
+					false);
+
+	Request     i = param_.interfaceRequest();
+	MvRequest   p = i("help_definition");
+	const char* n = i("help_name");
+
+	switch(pass)
+	{
+		case 0:
+			// Try system 
+			SyncFolders::sync(folder_,system);
+			return true;
+
+		case 1:
+			// Copy help
+			if(p) {
+				IconObject* o = IconFactory::create(folder_,p);
+				if(n) o->rename(n);
+			}
+			return true;
+
+		default:
+			return false;
+	}
+	
+}
+
+Widget IconHelp::menu() 
+{
+	return current_.size() ? menu1_ : menu2_;
+}
+
+bool IconHelp::accept(IconObject* o) 
+{       
+	const IconClass& ic = o->iconClass();
+	Request interface = param_.interfaceRequest();
+	for ( vector<string>::iterator j =  classes_.begin(); j != classes_.end(); ++j)
+		if ( ic.canBecome(IconClass::find(*j)) )   return true;
+	return classes_.size() == 0;
+}
+
+
+void IconHelp::deleteCB(Widget, XtPointer)
+{
+	for(vector<IconObjectH>::iterator j = current_.begin(); 
+		j != current_.end(); ++j)
+			(*j)->toWastebasket();
+}
+
+void IconHelp::editCB(Widget, XtPointer)
+{
+	for(vector<IconObjectH>::iterator j = current_.begin(); 
+		j != current_.end(); ++j)
+			(*j)->edit();
+}
+
+void IconHelp::folderCB( Widget, XtPointer) 
+{
+	folder_->open();
+}
+
+void IconHelp::newIconCB( Widget, XtPointer )
+{
+	newIcon();
+}
+
+
+static HelpMaker<IconHelp> maker("help_data");
diff --git a/src/MetviewUI/IconHelp.h b/src/MetviewUI/IconHelp.h
new file mode 100755
index 0000000..a6bdfad
--- /dev/null
+++ b/src/MetviewUI/IconHelp.h
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconHelp_H
+#define IconHelp_H
+
+#ifndef UIIconHelp_H
+#include "UIIconHelp.h"
+#endif
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef UIIconHelp_H
+#include "UIIconHelp.h"
+#endif
+
+#include <string>
+using std::string;
+
+#ifndef FolderViewer_H
+#include "FolderViewer.h"
+#endif
+
+class IconHelp: public XHelp<UIIconHelp_c>, public FolderViewer {
+public:
+
+// -- Contructors
+
+	IconHelp(Widget, RequestPanel&, const Parameter&);
+
+// -- Destructor
+
+	virtual ~IconHelp(); 
+
+private:
+
+// No copy allowed
+
+	IconHelp(const IconHelp&);
+	IconHelp& operator=(const IconHelp&);
+
+// -- Members
+
+	vector<string> classes_;
+
+// -- Overridden methods
+
+	// from UIIconHelp_c
+
+	virtual void deleteCB( Widget, XtPointer );
+	virtual void editCB( Widget, XtPointer );
+	virtual void folderCB( Widget, XtPointer );
+	virtual void newIconCB( Widget, XtPointer );
+	
+	// From DragWindow
+
+	virtual Widget menu();
+	virtual bool dropCopy() { return true; }
+
+	// From FolderViewer
+	
+	virtual bool accept(IconObject*);   
+	virtual bool fill(int);
+
+};
+
+#endif
diff --git a/src/MetviewUI/IconHolder.cc b/src/MetviewUI/IconHolder.cc
new file mode 100644
index 0000000..1c51427
--- /dev/null
+++ b/src/MetviewUI/IconHolder.cc
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef IconHolder_H
+#include "IconHolder.h"
+#endif
+
+
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+
+IconHolder::IconHolder()
+	
+{
+}
+
+IconHolder::~IconHolder()
+{
+}
+
+void IconHolder::install(Widget w)
+{
+	DragWindow::install(w);
+}
+
+void IconHolder::clear()
+{
+	removeAllIcons();
+
+	for(vector<IconObjectH>::iterator j = icons_.begin(); j != icons_.end(); ++j)
+		(*j)->removeObserver(this);
+
+	icons_.clear();
+}
+
+
+void IconHolder::add(IconObject* o)
+{	
+
+	vector<IconObjectH>::iterator k = find(icons_.begin(),icons_.end(),o);
+	if(k != icons_.end()) return;
+	
+	if ( !accept(o) ) 
+		return;
+
+	if ( unique() ) clear();
+
+	addIcon(o);
+
+	o->addObserver(this);
+	icons_.push_back(o);
+
+}
+
+bool IconHolder::unique() 
+{
+	return false;
+}
+
+
+
+void IconHolder::changed(IconObject* o)
+{
+	refreshIcon(o);
+	cout << "IconHolder::modified " << *o << endl;
+
+}
+
+void IconHolder::edited(IconObject* o)
+{
+	openIcon(o);
+}
+void IconHolder::closed(IconObject* o)
+{
+	closeIcon(o);
+}
+
+
+void IconHolder::doubleClick(IconObject* o)
+{
+	if(o) o->edit();
+}
+
+void IconHolder::move(IconObject*,int,int,IconObject*)
+{
+}
+
+void IconHolder::rename(IconObject*,const string&)
+{
+}
+
+
+void IconHolder::clearCurrent()
+{
+	for(vector<IconObjectH>::iterator j = current_.begin(); j != current_.end(); ++j)
+		clear(*j);
+	
+	current_.clear();
+}
+
+
+void IconHolder::clear(IconObject* o)
+{
+	removeIcon(o);
+
+	o->removeObserver(this);
+	vector<IconObjectH>::iterator k = find(icons_.begin(),icons_.end(),o);
+	if(k != icons_.end()) icons_.erase(k);
+}
+
+
diff --git a/src/MetviewUI/IconHolder.h b/src/MetviewUI/IconHolder.h
new file mode 100644
index 0000000..7af4994
--- /dev/null
+++ b/src/MetviewUI/IconHolder.h
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconHolder.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconHolder_H
+#define IconHolder_H
+
+#ifndef UIIconLine_H
+#include "UIIconLine.h"
+#endif
+
+#ifndef RequestPanelLine_H
+#include "RequestPanelLine.h"
+#endif
+
+#ifndef DragWindow_H
+#include "DragWindow.h"
+#endif
+
+#ifndef IconObserver_H
+#include "IconObserver.h"
+#endif
+
+
+class IconHolder : public DragWindow, public IconObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconHolder();
+
+// -- Destructor
+
+	virtual ~IconHolder(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+protected:
+
+// -- Members
+	vector<IconObjectH> icons_;
+
+
+// -- Methods
+	void install(Widget); 
+	void add(IconObject*);
+	void clear();
+	void clear(IconObject*);
+	void clearCurrent(); 
+
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None 
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconHolder(const IconHolder&);
+	IconHolder& operator=(const IconHolder&);
+
+// -- Members
+
+
+// -- Methods
+	// None
+	virtual bool accept(IconObject*) = 0;
+	virtual bool unique();
+
+// -- Overridden methods
+
+	// From DragWindow
+	virtual void doubleClick(IconObject*) ; 
+	virtual void move(IconObject*,int,int,IconObject*);
+	virtual void rename(IconObject*,const string&);
+
+
+	// From IconObserver 
+	virtual void changed(IconObject*);
+	virtual void edited(IconObject*);
+	virtual void closed(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconHolder& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(IconHolder**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(IconHolder);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/IconInfo.cc b/src/MetviewUI/IconInfo.cc
new file mode 100644
index 0000000..b1af590
--- /dev/null
+++ b/src/MetviewUI/IconInfo.cc
@@ -0,0 +1,56 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "IconInfo.h"
+#include "Path.h"
+//  04 50 53 25 42
+
+IconInfo::IconInfo(const Request& r):
+	info_(r)
+{
+	if(!info_) info_ = Request("USER_INTERFACE");
+}
+
+IconInfo::~IconInfo()
+{
+}
+
+int IconInfo::x() const
+{
+	return info_("X");
+}
+
+int IconInfo::y() const
+{
+	return info_("Y");
+}
+
+void IconInfo::position(int x,int y)
+{
+	info_("X") = x;
+	info_("Y") = y;
+}
+
+void IconInfo::save(const Path& s)
+{
+	info_.save(s);
+	//cout << "Save into " << s.str() << endl;
+	//info_.print();
+}
+
+bool IconInfo::fix(const string& kind)
+{
+	const char* p = info_("ICON_CLASS");
+	if(kind != p)
+	{
+		info_("ICON_CLASS") = kind.c_str();
+		return true;
+	}
+	return false;
+}
diff --git a/src/MetviewUI/IconInfo.h b/src/MetviewUI/IconInfo.h
new file mode 100644
index 0000000..4d06e88
--- /dev/null
+++ b/src/MetviewUI/IconInfo.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconInfo.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconInfo_H
+#define IconInfo_H
+
+#include "Request.h"
+
+class IconInfo {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconInfo(const Request&);
+
+// -- Destructor
+
+	~IconInfo(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	int x() const;
+	int y() const;
+
+	void position(int,int);
+
+	void save(const Path&);
+
+	bool fix(const string&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconInfo(const IconInfo&);
+	IconInfo& operator=(const IconInfo&);
+
+// -- Members
+
+	bool    modified_;
+	Request info_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconInfo& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(IconInfo**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(IconInfo);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/IconLine.cc b/src/MetviewUI/IconLine.cc
new file mode 100644
index 0000000..4801fc1
--- /dev/null
+++ b/src/MetviewUI/IconLine.cc
@@ -0,0 +1,170 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef IconLine_H
+#include "IconLine.h"
+#endif
+
+#ifndef IconSelection_H
+#include "IconSelection.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#include <Xm/ToggleB.h>
+
+#include <mars.h>
+
+IconLine::IconLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UIIconLine_c>(owner,param),
+	unique_(false)
+{
+}
+
+IconLine::~IconLine()
+{
+}
+
+void IconLine::init(Widget w)
+{
+	XRequestPanelLine<UIIconLine_c>::init(w);
+	IconHolder::install(drag_);
+	Request interface = param_.interfaceRequest();
+	classes_ = interface.get("class");
+
+	string lab;
+	string sep;
+
+   for(vector<string>::iterator j =  classes_.begin(); j != classes_.end(); ++j)
+	{
+		lab = lab + sep + IconClass::find(*j).defaultName();
+		sep = ", ";
+	}
+
+	XMLabel label(class_);
+	label.set(lab);
+}
+
+
+void IconLine::reset()
+{
+
+	clear();
+	const Request& r = owner_.request();
+
+	vector<IconObjectH> sub = currentObject_->subObjects(param_.name(),r);
+
+	for(vector<IconObjectH>::iterator j = sub.begin(); j != sub.end(); ++j)
+		add(*j);
+
+	grey();
+}
+
+bool IconLine::accept(IconObject* o)
+{	
+	const IconClass& ic = o->iconClass();
+	for ( vector<string>::iterator j =  classes_.begin(); j != classes_.end(); ++j)
+		if ( ic.canBecome(IconClass::find(*j)) )   return true;
+	return classes_.size() == 0;	
+}
+
+void IconLine::update()
+{
+	grey();
+}
+
+void IconLine::apply()
+{
+	owner_.changed(*this);
+}
+
+void IconLine::set(Request& r)
+{
+	currentObject_->subObjects(param_.name(),icons_,r);
+}
+
+void IconLine::editCB(Widget,XtPointer data)
+{
+	for(vector<IconObjectH>::iterator j = current_.begin(); j != current_.end(); ++j)
+		(*j)->edit();
+	current_.clear();
+}
+
+void IconLine::removeCB(Widget,XtPointer data)
+{
+	clearCurrent();
+}
+
+void IconLine::drop(Dropping& drop)
+{
+	IconObjectH o = drop.object(*this);
+
+	if(drop.copy())
+	{
+		add(o->clone(currentObject_->embeddedFolder(
+			param_.beautifiedName())));
+	}
+	else
+		add(o);
+}
+
+Widget IconLine::menu()
+{	
+	return current_.size() ? menu1_ : menu2_;
+}
+
+void IconLine::newIconCB(Widget,XtPointer)
+{
+	IconObject* o = IconSelection::make(
+		currentObject_->embeddedFolder(param_.beautifiedName()),
+		menu_x_,
+		menu_y_);
+	if(o) add(o);
+}
+
+void IconLine::openHiddenCB(Widget,XtPointer)
+{
+	currentObject_->embeddedFolder(param_.beautifiedName())->open();
+}
+
+static LineMaker<IconLine> maker("icon");
diff --git a/src/MetviewUI/IconLine.h b/src/MetviewUI/IconLine.h
new file mode 100644
index 0000000..b3b6193
--- /dev/null
+++ b/src/MetviewUI/IconLine.h
@@ -0,0 +1,140 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconLine_H
+#define IconLine_H
+
+#ifndef UIIconLine_H
+#include "UIIconLine.h"
+#endif
+
+#ifndef RequestPanelLine_H
+#include "RequestPanelLine.h"
+#endif
+
+
+#ifndef IconHolder_H
+#include "IconHolder.h"
+#endif
+
+
+class IconLine : public XRequestPanelLine<UIIconLine_c>, public IconHolder {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~IconLine(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void update();
+	virtual void reset();
+	virtual void apply();
+	
+	virtual void init(Widget);
+	virtual void set(Request&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconLine(const IconLine&);
+	IconLine& operator=(const IconLine&);
+
+// -- Members
+	bool unique_;
+	vector<string> accept_;
+	vector<string> classes_;
+
+	
+
+// -- Methods
+	// None
+
+
+// -- Overridden methods
+
+	virtual void editCB(Widget,XtPointer);
+	virtual void removeCB(Widget,XtPointer);
+	virtual void newIconCB(Widget,XtPointer);
+	virtual void openHiddenCB(Widget,XtPointer);
+
+	// From IconHolder
+	virtual bool accept(IconObject*);
+
+	//from DragWindow
+	virtual Widget menu();
+	virtual bool dropCopy() { return true; }
+
+	// From DropSite
+	virtual void drop(Dropping&);
+
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconLine& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(IconLine**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(IconLine);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/IconObject.cc b/src/MetviewUI/IconObject.cc
new file mode 100644
index 0000000..c92d299
--- /dev/null
+++ b/src/MetviewUI/IconObject.cc
@@ -0,0 +1,805 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconInfo_H
+#include "IconInfo.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+
+#ifndef State_H
+#include "State.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+#ifndef Command_H
+#include "Command.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Queue_H
+#include "Queue.h"
+#endif
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+#ifndef FolderObserver_H
+#include "FolderObserver.h"
+#endif
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+#ifndef Dependancy_H
+#include "Dependancy.h"
+#endif
+
+#ifndef LogWindow_H
+#include "LogWindow.h"
+#endif
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+#include <sstream>
+
+#include "Metview.h"
+
+#include <sys/stat.h>
+
+IconObject::IconObject(Folder* parent,const IconClass& kind,const string& name,
+		IconInfo* info):
+	parent_(parent),
+	class_(kind),
+	name_(name),
+	info_(info),
+	queue_(0),
+	log_(0),
+	editor_(0),
+	logWindow_(0),
+	locked_(false),
+	link_(false)
+{
+	if ( parent_ )  {
+		parent_->attach();
+
+		struct stat s;
+		string p = path().str();
+		if(lstat(p.c_str(),&s) == 0)
+		{
+			link_ = S_ISLNK(s.st_mode);
+			locked_ = faccess(p.c_str(),W_OK);
+			//else locked_ = true;
+		}
+		//else locked_ = true;
+	}
+
+}
+
+IconObject::~IconObject()
+{	  
+	reset(); 
+	if ( parent_ )  parent_->detach();
+	delete info_;
+}
+
+const string& IconObject::name() const
+{
+	return name_;
+}
+
+Folder* IconObject::parent() const
+{
+	return parent_;
+}
+
+IconInfo& IconObject::info() const
+{
+
+	if(info_ == 0)
+	{
+		Request info("USER_INTERFACE");
+		info("ICON_CLASS") = className().c_str();
+
+		IconObject* o = const_cast<IconObject*>(this);
+		o->info_ = new IconInfo(info);
+		o->saveInfo();
+	}
+
+	return *info_;
+}
+
+string IconObject::fullName() const
+{
+	std::stringstream s;
+	s << parent()->fullName() << "/" << name();
+	return s.str();
+}
+
+Path IconObject::path() const
+{
+	return parent()->path().add(name());
+}
+
+string IconObject::dotName(const string& n) const
+{
+	return string(".") + n;
+}
+
+Path IconObject::dotPath() const
+{
+	return parent()->path().add(dotName(name()));
+}
+
+string IconObject::embeddedName(const string& n) const
+{
+	return n + "#";
+}
+
+Path IconObject::embeddedPath() const
+{
+	return parent()->path().add(embeddedName(name()));
+}
+
+Folder* IconObject::embeddedFolder(const string& n,bool create) const
+{
+	return Folder::folder(parent()->fullName(),embeddedName(name()), n, create);
+}
+
+Folder* IconObject::embeddedFolder(bool create) const
+{
+	return Folder::folder(parent()->fullName(),embeddedName(name()), create);
+}
+
+const string& IconObject::className() const
+{
+	return iconClass().name();
+}
+
+const IconClass& IconObject::iconClass() const
+{
+	return class_;
+}
+
+const IconClass& IconObject::editorClass() const
+{
+	return iconClass();
+}
+
+void IconObject::doubleClick()
+{
+	edit();
+}
+
+void IconObject::print(ostream& s) const
+{
+	s << className() << " - " << fullName();
+}
+
+
+void IconObject::command(const string& name)
+{
+	Command::execute(name,this);
+}
+
+Task* IconObject::action(const Action& a)
+{
+	Service* s = iconClass().service(a);
+	if(s == 0) s = Service::find("InternalMetviewUI");
+
+	if(s != 0) {
+		Task* t = s->task(a,this);
+		if(t != 0)
+		{
+			if(queue_ == 0) queue_ = new Queue(this);
+			queue_->push(t);
+			return t;
+		}
+	}
+	return 0;
+}
+
+Log& IconObject::log()
+{
+	if(log_ == 0) log_ = new Log(this);
+	return *log_;
+}
+
+Path IconObject::logPath()
+{
+	return log().path();
+}
+
+Request IconObject::request() const
+{
+	cout << "Oops, should not be called..." << endl;
+	return Request("");
+}
+
+void IconObject::request(const Request&)
+{
+	cout << "Oops, should not be called..." << endl;
+}
+
+Request IconObject::fullRequest() const
+{
+	return request();
+}
+
+Language& IconObject::language() const
+{
+	return iconClass().language();
+}
+
+IconObject* IconObject::search(const string& fullName)
+{
+	//cout << "search " << fullName << endl;
+
+	if(fullName[0] != '/') return 0;
+
+	Tokenizer parse("/");
+	vector<string> n;
+	parse(fullName,n);
+
+	vector<string> names; 
+
+	for(vector<string>::iterator j = n.begin(); j != n.end(); ++j)
+	{
+		if(*j == "" || *j == ".") 	
+			continue;
+
+		if(*j == "..")
+			names.pop_back();
+		else
+			names.push_back(*j);
+	}
+
+	return Folder::top()->find(names);
+}
+
+IconObject* IconObject::search(IconObject& o,const string& relativeName)
+{
+	return 0;
+}
+
+IconObject* IconObject::find(const vector<string>& n)
+{
+	return (n.size() == 0) ? this : 0;
+}
+
+IconObject* IconObject::find(const string& name)
+{
+	return 0;
+}
+
+void IconObject::saveInfo()
+{
+	info().save(dotPath());
+}
+
+void IconObject::reparent(Folder* parent)
+{
+	if(parent_ != parent)
+	{
+
+		modified();
+
+		Path old_path = path();
+		Path old_dot  = dotPath();
+		Path old_emb  = embeddedPath();
+
+		parent_->detach();
+		parent_ = parent;
+		parent_->attach();
+
+		Path new_path = path();
+		Path new_dot  = dotPath();
+		Path new_emb  = embeddedPath();
+
+		old_dot.rename(new_dot);
+		old_path.rename(new_path);
+		if(old_emb.exists())
+			old_emb.rename(new_emb);
+
+		modified();
+	}
+}
+
+bool IconObject::rename(const string& new_name)
+{
+	if(name_ == new_name)
+		return false;
+
+	if(!renamable())
+	{
+		 Log::error(this) << "Object cannot be renamed" << endl;
+		 return false;
+	}
+
+	if(parent()->find(new_name))
+	{
+		Log::error(this) << "Cannot rename " << name() << " to " << new_name << ", an icon already exists" << endl;
+		return false;
+	}
+
+	if( (new_name[0] == '.' && name_[0] != '.') 
+		|| new_name.find("/") != string::npos 
+		|| new_name.length()  == 0)
+	{
+		Log::error(this) << "Cannot rename " << name() << " to " << new_name << ", invalid name" << endl;
+		return false;
+	}
+
+	modified();
+
+	string old_name = name_;
+
+	Path old_path = path();
+	Path old_dot  = dotPath();
+	Folder* old_emb  = embeddedFolder(false);
+
+	name_ = new_name;
+
+	Path new_path = path();
+	Path new_dot  = dotPath();
+
+	old_dot.rename(new_dot);
+	old_path.rename(new_path);
+	if(old_emb)
+	{
+		cout << "Rename " << *old_emb << endl;
+		cout << "Rename " << embeddedName(name()) << endl;
+
+		old_emb->rename(embeddedName(name())); 
+	}
+	else cout << "Rename : no embedded folder " << endl;
+
+	parent()->renamed(this,old_name,new_name);
+	modified();
+
+	return true;
+}
+
+void IconObject::position(int x,int y)
+{
+    info().position(x,y);
+    saveInfo();
+}
+
+void IconObject::createFiles()
+{
+	if(!dotPath().exists())
+		saveInfo();
+
+	if(info().fix(class_.name()))
+		saveInfo();
+}
+
+set<string> IconObject::can()
+{
+	set<string> c = iconClass().can();
+	if(log_ != 0) c.insert("output");
+	return c;
+}
+
+//-------------------------------------------------------------------------
+void IconObject::toWastebasket()
+{
+	Folder* f = Folder::folder("wastebasket");
+	if(f == 0)
+		Log::error(this) << "Oops, can't find wastebasket" << endl;
+	else {
+		position(0,0);
+		f->adopt(this);
+	}
+}
+
+
+void IconObject::edit()
+{
+	Editor::open(this);
+}
+
+void IconObject::edit2()
+{
+	//Editor::open(this,"ExternalTextEditor");
+}
+
+void IconObject::showLog()
+{
+	LogWindow::open(this);
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::duplicate()
+{
+	IconObject *c = clone(parent());
+	parent()->position(c,info().x()+20,info().y()+20);
+}
+
+IconObject* IconObject::clone(Folder* f, bool update)
+{
+
+	createFiles();
+
+	string new_name;
+	
+	if (update)
+		new_name = name();
+	else if (f == parent())
+		new_name = f->duplicateName(name());
+	else
+		new_name = f->uniqueName(name());
+	
+	Path old_path = path();
+	Path old_dot  = dotPath();
+	Path old_emb  = embeddedPath();
+
+	Path new_path = f->path().add(new_name);
+	Path new_dot  = f->path().add(dotName(new_name));
+	Path new_emb  = f->path().add(embeddedName(new_name));
+
+	old_path.copy(new_path);
+	old_dot.copy(new_dot);
+	if(old_emb.exists())
+		old_emb.copy(new_emb);
+
+	return IconFactory::create(f,new_name);
+
+}
+
+
+
+
+//-------------------------------------------------------------------------
+
+void IconObject::editor(Editor* e)
+{
+	if(editor_ != e)
+	{
+		editor_ = e;
+		if(e) 
+			notifyOpened();
+		else 
+			notifyClosed();
+	}
+}
+
+Editor* IconObject::editor()
+{
+	return editor_;
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::logWindow(LogWindow* e)
+{
+	logWindow_ = e;
+}
+
+LogWindow* IconObject::logWindow()
+{
+	return logWindow_;
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::removeFiles()
+{
+	modified();
+	path().remove();
+	dotPath().remove();
+	if(embeddedPath().exists())
+		embeddedPath().remove();
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::modified()
+{
+	MvApplication::notifyIconModified(
+		fullName().c_str(),
+		className().c_str());
+
+	// Forget any outstanding task
+	reset();
+	notifyChanged();
+}
+
+void IconObject::created()
+{
+	MvApplication::notifyIconCreation(
+		fullName().c_str(),
+		className().c_str());
+}
+
+
+string IconObject::dropText() const
+{
+	Request r = request();
+	return request2string(r);
+}
+
+string IconObject::relativeName(IconObject* other) const
+{
+	return relpath(fullName().c_str(),other->fullName().c_str());
+}
+
+string IconObject::makeFullName(const string& name) const
+{
+	return makepath(parent()->fullName().c_str(),name.c_str());	
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::reset()
+{
+	if(logWindow_) logWindow_->close();
+
+	delete log_;
+	log_ = 0;
+
+	if(queue_) queue_->ownerGone();
+	queue_	= 0;
+
+	dependancies_.clear();
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::notifyWaiting()
+{
+	parent()->tellObservers(&FolderObserver::waiting,this);
+}
+
+void IconObject::notifyError()
+{
+	parent()->tellObservers(&FolderObserver::error,this);	
+}
+
+void IconObject::notifyDestroyed()
+{
+	for(set<IconObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->destroyed(this);
+}
+
+void IconObject::notifyChanged()
+{
+	parent()->tellObservers(&FolderObserver::modified,this);	
+
+	for(set<IconObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->changed(this);
+}
+
+void IconObject::notifyReady()
+{
+	parent()->tellObservers(&FolderObserver::ready,this);	
+}
+void IconObject::notifyOpened()
+{
+	parent()->tellObservers(&FolderObserver::opened,this);	
+}
+void IconObject::notifyClosed()
+{
+	parent()->tellObservers(&FolderObserver::closed,this);	
+}
+
+
+
+//-------------------------------------------------------------------------
+
+void IconObject::addObserver(IconObserver* o)
+{
+	observers_.insert(o);
+}
+
+void IconObject::removeObserver(IconObserver* o)
+{
+	observers_.erase(o);
+}
+
+//-------------------------------------------------------------------------
+
+const set<DependancyH>& IconObject::dependancies()
+{
+	return dependancies_;
+}
+
+//-------------------------------------------------------------------------
+
+void IconObject::destroy()
+{
+	IconObjectH save = this;
+	removeFiles();
+	parent()->release(this);
+	notifyDestroyed();
+	if(editor_) editor_->empty();
+}
+
+void IconObject::empty()
+{
+	// Not called, obly wastebasket
+}
+
+bool IconObject::renamable() const
+{
+	return !locked() && !parent()->locked() && editor_ == 0;
+}
+
+bool IconObject::locked() const
+{
+	return locked_;
+}
+
+void IconObject::lock()
+{
+	locked_ = true;
+}
+
+bool IconObject::temporary() const
+{
+	return false;
+}
+
+//=================================================================
+
+vector<IconObjectH> IconObject::subObjects(const string& param,const Request& r)
+{
+	int i = 0;
+	bool more = false;
+	vector<IconObjectH> result;
+
+	do 
+	{
+		MvRequest   a = r(param.c_str(),i);
+		const char* b = r(param.c_str(),i);
+
+		more = false;
+		IconObjectH o = 0;
+
+		if(a)
+		{
+			more = true;
+			// Embbeded object:
+			// We need to create a temporary
+
+			cout << "Embedded object" << endl;
+			o = IconFactory::create(this,a);
+
+		}
+
+		if (b &&  strcmp(b,"#") )
+		{
+			more = true;
+			// Real object
+
+			string name = makeFullName(b);
+			o = search(name);
+			if(o == 0) cout << "Cannot find " << name << endl;
+		}
+
+		if(o != 0) result.push_back(o);
+
+		i++;
+
+	} while(more);
+
+	return result;
+}
+
+void IconObject::subObjects(const string& name,
+	const vector<IconObjectH>& sub,Request& r)
+{
+	r.unsetParam(name.c_str());
+
+	// We cannot mix embedded objects and real objects
+
+	for(vector<IconObjectH>::const_iterator j = sub.begin(); j != sub.end(); ++j)
+	{
+		IconObject* o = *j;
+		if(o->temporary())
+		{
+			r(name.c_str()) += o->request();
+		}
+		else
+		{
+			string rel = relativeName(o);
+			r(name.c_str()) += rel.c_str();
+			cout << "subObjects " << *this << endl;
+			cout << " subObjects " << *o << endl;
+			cout << " subObjects " << rel << endl;
+		}
+	}
+
+}
+
+bool IconObject::visible() const
+{
+	return name_[name_.length() - 1] != '#';
+}
+
+bool IconObject::sameAs(IconObject* other)
+{
+	if(&iconClass() != &other->iconClass())
+		return false;
+
+	Path p1 = this->path();
+	Path p2 = other->path();
+
+	FILE *f1 = fopen(p1.str().c_str(),"r");
+	FILE *f2 = fopen(p2.str().c_str(),"r");
+
+	bool same = f1 && f2;
+
+	while(same )
+	{
+		int c1 = getc(f1);
+		int c2 = getc(f2);
+		same = (c1 == c2);
+		if(c1 == EOF || c2 == EOF) break;
+	}
+
+	if(f1) fclose(f1);
+	if(f2) fclose(f2);
+
+	return same;
+}
+
+void IconObject::touch()
+{
+	path().touch();
+}
+
+bool IconObject::isLink() const
+{
+	return link_;
+}
+
+bool IconObject::isInTimer() const
+{
+	return false;
+}
+
+void IconObject::drop(IconObject*)
+{
+}
diff --git a/src/MetviewUI/IconObject.h b/src/MetviewUI/IconObject.h
new file mode 100644
index 0000000..022c37d
--- /dev/null
+++ b/src/MetviewUI/IconObject.h
@@ -0,0 +1,285 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconObject.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconObject_H
+#define IconObject_H
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+#include <string>
+using std::string;
+
+
+class IconClass;
+class IconInfo;
+class FolderObserver;
+class Action;
+class Queue;
+class Folder;
+class CommandObserver;
+class Editor;
+class Action;
+class Request;
+class Task;
+class Log;
+class LogWindow;
+class Language;
+
+#include "Metview.h"
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+#ifndef Dependancy_H
+#include "Dependancy.h"
+#endif
+
+#ifndef IconObserver_H
+#include "IconObserver.h"
+#endif
+
+
+class IconObject;
+class IconObjectH;
+
+class IconObject : public virtual Counted {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconObject(Folder*,const IconClass&,const string&,IconInfo*);
+
+// -- Destructor
+
+	virtual ~IconObject();
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual const string& name() const;
+	virtual const string& className() const;
+
+	virtual string dotName(const string&) const;
+	virtual string embeddedName(const string&) const;
+	virtual string fullName() const;
+
+	virtual string relativeName(IconObject*) const;
+	virtual string makeFullName(const string&) const;
+
+	virtual Path path()     const;
+	// This Path method will only be all by the Shell Task.
+	// For all object it will call the path method.
+	// For Temporary Objects, it will return the PATH of the attached request.
+	// This is done to enable the visualisation of the MAGML Objects 
+	// without possible side effects! 
+	virtual Path pathForShellTask() const { return path(); }
+	virtual Path dotPath()  const;
+	virtual Path embeddedPath()  const;
+
+	virtual const IconClass& iconClass() const;
+	virtual const IconClass& editorClass() const;
+
+	virtual Folder*    parent()    const;
+	virtual Folder*    embeddedFolder(const string&,bool create = true)    const;
+	virtual Folder*    embeddedFolder(bool create = true)    const;
+
+	// Info
+
+	virtual IconInfo& info() const;
+	virtual void saveInfo();
+
+	virtual bool visible() const;
+
+	// Actions
+
+	virtual void doubleClick();
+	virtual void command(const string&);
+	virtual Task* action(const Action&);
+	virtual set<string> can();
+
+	virtual void toWastebasket();
+	virtual void duplicate();
+	virtual void removeFiles();
+	virtual void edit();
+	virtual void edit2();
+	virtual void showLog();
+
+	virtual void destroy();
+	virtual void empty();
+
+	virtual IconObject* clone(Folder*, bool update = false);
+
+	virtual void editor(Editor*);
+	virtual Editor* editor();
+
+	virtual void logWindow(LogWindow*);
+	virtual LogWindow* logWindow();
+
+	virtual Request request() const;
+	virtual Request fullRequest() const;
+	virtual Language& language() const;
+
+	virtual void request(const Request&);
+
+	virtual string dropText() const;
+
+	virtual void drop(IconObject*);
+
+
+	virtual const set<DependancyH>& dependancies();
+
+	// Find
+
+	virtual IconObject* find(const vector<string>&);
+	virtual IconObject* find(const string&);
+
+
+	// Move
+
+	virtual void reparent(Folder*);
+	virtual bool rename(const string&);
+	virtual bool renamable() const;
+	virtual bool temporary() const;
+
+	void position(int,int);
+	virtual bool locked() const;
+	virtual bool isLink() const;
+	virtual bool isInTimer() const;
+	virtual void lock();
+
+	// 
+
+	void addObserver(IconObserver*);
+	void removeObserver(IconObserver*);
+
+	//
+
+	virtual void notifyWaiting();
+	virtual void notifyError();
+	virtual void notifyChanged();
+	virtual void notifyReady();
+	virtual void notifyOpened();
+	virtual void notifyClosed();
+	virtual void notifyDestroyed();
+
+
+	virtual bool sameAs(IconObject*);
+	virtual void touch();
+	//
+
+
+	virtual void createFiles();
+
+	// Status
+
+	virtual void created();
+	virtual void modified();
+
+	virtual Log& log();
+	virtual Path logPath();
+
+	// --- 
+
+	virtual vector<IconObjectH> subObjects(const string&,const Request&);
+	virtual void subObjects(const string&,const vector<IconObjectH>&,Request&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	static IconObject* search(const string& fullName);
+	static IconObject* search(IconObject&,const string& relativeName);
+
+protected:
+
+
+// -- Members
+
+	string           name_;
+	Folder*          parent_;
+	const IconClass& class_;
+	IconInfo*        info_;
+	Queue*           queue_;
+	Log*             log_;
+	Editor*          editor_;
+	LogWindow*       logWindow_;
+	bool             locked_;
+	bool             link_;
+
+	set<DependancyH> dependancies_;
+	set<IconObserver*> observers_;
+
+// -- Methods
+	
+	virtual void print(ostream&) const; // Change to virtual if base class	
+	virtual void reset();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconObject(const IconObject&);
+	IconObject& operator=(const IconObject&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	friend ostream& operator<<(ostream& s,const IconObject& p)
+		{ p.print(s); return s; }
+
+};
+
+class IconObjectH : public  Handle<IconObject> {
+public:
+	IconObjectH(IconObject* o = 0) : Handle<IconObject>(o) {}
+};
+
+#endif
diff --git a/src/MetviewUI/IconObserver.h b/src/MetviewUI/IconObserver.h
new file mode 100644
index 0000000..ea9e85e
--- /dev/null
+++ b/src/MetviewUI/IconObserver.h
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconObserver.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef IconObserver_H
+#define IconObserver_H
+
+class IconObject;
+
+class IconObserver {
+public:
+
+	virtual void changed(IconObject*) {}
+	virtual void destroyed(IconObject*) {}
+	virtual void edited(IconObject*) {}
+	virtual void closed(IconObject*) {}
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/IconSelection.cc b/src/MetviewUI/IconSelection.cc
new file mode 100644
index 0000000..f8517ac
--- /dev/null
+++ b/src/MetviewUI/IconSelection.cc
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "IconSelection.h"
+#include "Folder.h"
+#include "IconClass.h"
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#include <Xm/RowColumn.h>
+#include <Xm/PushB.h>
+#include <Xm/Label.h>
+
+#ifndef XPixmap_H
+#include "XPixmap.h"
+#endif
+
+static list<string> classes;
+
+IconSelection::IconSelection()
+{
+	for(list<string>::iterator j = classes.begin(); j != classes.end(); ++j)
+	{
+		const IconClass& c = IconClass::find(*j);
+
+		Widget rc = XmCreateRowColumn(rowcol_,"rc",0,0);
+		XtVaSetValues(rc,XmNorientation, XmHORIZONTAL,0);
+
+		Widget icon = XmCreatePushButton(rc,(char*)c.name().c_str(),0,0);
+		Widget label = XmCreateLabel(rc,(char*)c.defaultName().c_str(),0,0);
+
+		XPixmap p(c.pixmap());
+		p.setLabel(icon);
+
+	    XtAddCallback (icon, XmNactivateCallback, &UIIconSelection_c::okCB, (XtPointer) this);
+
+
+		XtManageChild(icon);
+		XtManageChild(label);
+		XtManageChild(rc);
+	}
+}
+
+IconSelection::~IconSelection()
+{
+}
+
+IconObject* IconSelection::make(Folder* f,int x,int y)
+{
+	return instance().choose(f,x,y);
+}
+
+
+IconObject* IconSelection::choose(Folder* f,int x,int y)
+{
+	if(modal("Create...",true))
+	{
+		IconObject* o = IconClass::find(name_).createOne(f);
+		f->position(o,x,y);
+		return o;
+	}
+	return 0;
+}
+
+void IconSelection::okCB(Widget w,XtPointer data)
+{								
+	name_ = XtName(w);
+	ok_   = true;
+	stop_ = true;
+}
+
+void IconSelection::load(request* r)
+{
+	const char *p = get_value(r, "class", 0);
+	const char *c = get_value(r, "can_be_created", 0);
+
+	if(c && (*c == 'T' || *c == 't' || atol(c) != 0))
+		classes.push_back(p);
+}
+
+
+static SimpleLoader<IconSelection> loadClasses("object",1);
diff --git a/src/MetviewUI/IconSelection.h b/src/MetviewUI/IconSelection.h
new file mode 100644
index 0000000..050fb2f
--- /dev/null
+++ b/src/MetviewUI/IconSelection.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File IconSelection.h
+// Baudouin Raoult - ECMWF Nov 98
+
+#ifndef IconSelection_H
+#define IconSelection_H
+
+#include <string>
+using std::string;
+
+#include "UIIconSelection.h"
+#include "Dialog.h"
+
+class Folder;
+class IconObject;
+struct request;
+
+class IconSelection : public Dialog<IconSelection,UIIconSelection_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	IconSelection();
+
+// -- Destructor
+
+	~IconSelection(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static IconObject* make(Folder*,int x = 0,int y = 0);
+	static void load(request*);
+
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	IconSelection(const IconSelection&);
+	IconSelection& operator=(const IconSelection&);
+
+// -- Members
+
+	string name_;
+
+// -- Methods
+
+
+	IconObject* choose(Folder*,int,int);
+
+
+// -- Overridden methods
+
+	virtual void okCB( Widget, XtPointer ) ;
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const IconSelection& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(IconSelection**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(IconSelection);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Input.cc b/src/MetviewUI/Input.cc
new file mode 100644
index 0000000..1ac8823
--- /dev/null
+++ b/src/MetviewUI/Input.cc
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h> 
+#include <strings.h>
+#include "Input.h"
+#include "Metview.h"
+#include <MvXApplication.h>
+
+
+void Input::inputCB(XtPointer data,int*,XtInputId* id)
+{
+	Input* p = ((Input*)data);
+	char buf[1024];
+
+	if(fgets(buf,sizeof(buf),p->file_))
+	{
+		if(buf[0]) buf[strlen(buf)-1] = 0;
+		p->ready(buf);
+	}
+	else 
+		p->done(p->file_);
+}
+
+Input::Input():
+	id_(0),
+	file_(0)
+{
+}
+
+Input::~Input()
+{
+	stop();
+}
+
+void Input::stop()
+{
+	if(file_)
+	{
+		XtRemoveInput(id_);
+		file_ = 0;
+	}
+}
+
+void Input::start(FILE* f)
+{
+	if(file_ == 0 && f != 0)
+	{
+		file_ = f;
+		id_ = XtAppAddInput(MvXApplication::context(),fileno(f),
+			XtPointer(XtInputReadMask),
+			inputCB,this);
+	}
+}
+
diff --git a/src/MetviewUI/Input.h b/src/MetviewUI/Input.h
new file mode 100644
index 0000000..0ef57d3
--- /dev/null
+++ b/src/MetviewUI/Input.h
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Input.h
+// Baudouin Raoult - ECMWF Oct 98
+
+#ifndef Input_H
+#define Input_H
+
+#include <Xm/Xm.h>
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+
+// 
+
+#include <stdio.h>
+
+class Input {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Input();
+
+// -- Destructor
+
+	virtual ~Input(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+	void start(FILE*);
+	void stop();
+
+	virtual void ready(const char*) = 0;
+	virtual void done(FILE*)        = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Input(const Input&);
+	Input& operator=(const Input&);
+
+// -- Members
+
+	XtInputId  id_;
+	FILE*       file_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+// -- Class methods
+	// None
+	static void inputCB(XtPointer,int*,XtInputId*);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Input& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/InternalEditor.cc b/src/MetviewUI/InternalEditor.cc
new file mode 100644
index 0000000..f8c21a2
--- /dev/null
+++ b/src/MetviewUI/InternalEditor.cc
@@ -0,0 +1,287 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+#include <Tab.h>
+#include <Xm/ToggleB.h>
+#include <Xm/Text.h>
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef EditorButton_H
+#include "EditorButton.h"
+#endif
+
+#ifndef Netscape_H
+#include "Netscape.h"
+#endif
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef XPixmap_H
+#include "XPixmap.h"
+#endif
+
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#ifndef EditorToolFactory_H
+#include "EditorToolFactory.h"
+#endif
+
+#ifndef Confirm_H
+#include "Confirm.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+
+InternalEditor::InternalEditor(const IconClass& c,const string& kind):
+	Editor(c,kind)
+{
+	Widget top = MetviewUI::root();
+	create(XtDisplay(top),"Metview",0,0);
+
+	DropSite::install(main_);
+
+	XPixmap p(c.pixmap());
+	p.setLabel(icon_);
+
+}
+
+InternalEditor::~InternalEditor()
+{
+	// Not called
+
+	//if(current_) current_->detach();
+	//XtDestroyWidget(xd_rootwidget());
+	//
+
+}
+
+void InternalEditor::edit()
+{
+	XtSetSensitive(name_,True);
+	XtSetSensitive(stay_,True);
+
+	if(drawers_.size() == 0)
+	{
+		drawers_ = EditorDrawerFactory::create(this);
+		TabClose(drawer_);
+		tools_ = EditorToolFactory::create(this);
+	}
+
+	XMText text(name_);
+	text.set(current_->name());
+	reset();
+	for (map<string, EditorDrawer*>::iterator j = drawers_.begin(); 
+		j != drawers_.end(); ++j) 
+			(*j).second->edit(current_); 
+}
+
+void InternalEditor::updateDrawers()
+{
+	for (map<string, EditorDrawer*>::iterator j = drawers_.begin(); 
+		j != drawers_.end(); ++j) 
+			(*j).second->update();
+}
+
+void InternalEditor::raise()
+{
+	XtRealizeWidget(xd_rootwidget());
+	XMapRaised(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}	
+
+IconObject* InternalEditor::copy(const string& name) 
+{
+	return IconFactory::create(name, class_);
+}
+
+void InternalEditor::closeCB(Widget,XtPointer)
+{
+	close();
+	notifyObserverClose();	
+	done();
+
+	XUnmapWindow(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+	XmToggleButtonSetState(stay_,False,False);
+}
+
+
+void InternalEditor::resetCB(Widget,XtPointer)
+{
+	XMText text(name_);
+	text.set(current_->name());
+	reset();
+}
+
+void InternalEditor::applyCB(Widget w,XtPointer p)
+{
+  if( ! current_ ) //-- double click on 'apply' causes current_ to be 0!
+    {
+      //Log::error(0) << "ViewEditor::apply: current_ is null ptr!" << endl;
+      cout << ">>>>> ViewEditor::apply: current_ is null ptr!" << endl;
+      return;
+    }
+
+	bool stay = XmToggleButtonGetState(stay_);
+
+	apply();
+	current_->modified();
+
+	// Rename if needed
+	XMText text(name_);
+	string n = text.get();
+
+	if( n != current_->name())
+	{
+		current_->editor(0);
+		current_->rename(n);
+		current_->editor(this);
+	}
+
+	notifyObserverApply();
+
+	// Close
+
+	if(!stay)
+		closeCB(w,p);
+
+}
+
+string InternalEditor::alternateEditor()
+{
+	return "TextEditor";
+}
+
+void InternalEditor::textEditorCB( Widget, XtPointer )
+{
+	startAlternate();
+}
+
+bool InternalEditor::modified()
+{
+	return true;
+}
+
+void InternalEditor::startAlternate()
+{
+	IconObjectH save = current_;
+
+	if(modified() && !Confirm::ask(true,"Apply first?"))
+		return;
+
+	EditorObserver* o = observer_;
+	observer_ = 0;
+
+	XmToggleButtonSetState(stay_,False,False);
+	applyCB(0,0); 
+
+	Editor* e = EditorFactory::find(iconClass(),alternateEditor());
+	e->edit(save);
+	e->observer(o);
+	if(temporary_) e->temporary();
+
+}
+void InternalEditor::drop(Dropping& d)
+{
+	IconObjectH o = d.object(*this);
+	merge(o);
+}
+
+void InternalEditor::apply()
+{
+}
+
+void InternalEditor::reset()
+{
+}
+
+void InternalEditor::close()
+{
+}
+
+Widget InternalEditor::main()
+{
+	return main_;
+}
+
+Widget InternalEditor::drawer()
+{
+	return drawer_;
+}
+
+Widget InternalEditor::tool()
+{
+	return tool_;
+}
+
+Widget InternalEditor::dropSite()
+{
+	return main_;
+}
+
+void InternalEditor::temporary()
+{
+	Editor::temporary();
+	XtSetSensitive(name_,False);
+	XtSetSensitive(stay_,False);
+}
+
+void InternalEditor::empty()
+{
+	closeCB(0,0);
+}
+
+void InternalEditor::help()
+{
+//	Netscape::showPage("app_help", iconClass().name() + ".html" );
+	Netscape::showPage("app_help", iconClass().helpPage() + ".html" );
+}
+
+static EditorButtonMaker<InternalEditor> b1("Help",&InternalEditor::help,999);
+
diff --git a/src/MetviewUI/InternalEditor.h b/src/MetviewUI/InternalEditor.h
new file mode 100644
index 0000000..d1d0dfc
--- /dev/null
+++ b/src/MetviewUI/InternalEditor.h
@@ -0,0 +1,175 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File InternalEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef InternalEditor_H
+#define InternalEditor_H
+
+
+#include <Xm/Xm.h>
+#include <string>
+using std::string;
+
+#ifndef DropSite_H
+#include "DropSite.h"
+#endif
+
+#include "UIEditor.h"
+
+class IconObject;
+class IconClass;
+class EditorDrawer;
+class EditorTool;
+class EditorObserver;
+
+#include "IconObject.h"
+#include "Editor.h"
+
+class InternalEditor : public Editor, public UIEditor_c, public DropSite {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Destructor
+
+	virtual ~InternalEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	Widget main();
+	Widget drawer();
+	Widget tool();
+
+	void help();
+
+	// ---
+
+	virtual void apply() = 0;
+	virtual void reset() = 0;
+	virtual void close() = 0;
+
+	virtual void merge(IconObject*) = 0;
+	virtual void replace(IconObject*) = 0;
+
+	virtual IconObject* copy(const string&);
+	
+
+// -- Overridden methods
+	
+	// -- From Editor
+
+	virtual void temporary();
+	virtual void empty();
+	virtual void edit();
+	virtual void raise();
+
+	virtual string alternateEditor();
+	virtual bool modified();
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+
+protected:
+
+// -- Contructors
+
+	InternalEditor(const IconClass&,const string& kind);
+
+// -- Members
+	// None
+
+	map<string,EditorDrawer*> drawers_;
+	map<string,EditorTool*>   tools_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+	void startAlternate();
+	void updateDrawers();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	InternalEditor(const InternalEditor&);
+	InternalEditor& operator=(const InternalEditor&);
+
+// -- Members
+
+// -- Methods
+
+
+// -- Overridden methods
+
+	// 
+
+	// -- From XDesigned
+	virtual void closeCB(Widget,XtPointer);
+	virtual void applyCB(Widget,XtPointer);
+	virtual void resetCB(Widget,XtPointer);
+	virtual void textEditorCB(Widget,XtPointer);
+
+
+	// From DropSite
+
+	virtual Widget dropSite();
+	virtual void drop(Dropping&);
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+	static void dropCB(Widget,XtPointer,XtPointer);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const InternalEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+inline void destroy(InternalEditor**) {}
+
+template<class T>
+class XEditor : public InternalEditor, public T {
+public:
+	XEditor(const IconClass& c,const string& kind): 
+		InternalEditor(c,kind)
+	{
+		T::create(main());
+		XtManageChild(T::xd_rootwidget());
+	}
+};
+
+#endif
diff --git a/src/MetviewUI/InternalService.cc b/src/MetviewUI/InternalService.cc
new file mode 100644
index 0000000..e32a2ef
--- /dev/null
+++ b/src/MetviewUI/InternalService.cc
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef InternalService_H
+#include "InternalService.h"
+#endif
+
+#ifndef InternalTask_H
+#include "InternalTask.h"
+#endif
+
+
+
+InternalService::InternalService():
+	Service("InternalMetviewUI")
+{
+}
+
+InternalService::~InternalService()
+{
+}
+
+Task* InternalService::task(const Action& action,IconObject* o)
+{
+	return new InternalTask(action,o);
+}
+
+static InternalService internalService;
+
diff --git a/src/MetviewUI/InternalService.h b/src/MetviewUI/InternalService.h
new file mode 100644
index 0000000..4d13d2a
--- /dev/null
+++ b/src/MetviewUI/InternalService.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File InternalService.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef InternalService_H
+#define InternalService_H
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+
+class InternalService : public Service {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	InternalService();
+
+// -- Destructor
+
+	virtual ~InternalService(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	InternalService(const InternalService&);
+	InternalService& operator=(const InternalService&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual Task* task(const Action&,IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const InternalService& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(InternalService**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(InternalService);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/InternalTask.cc b/src/MetviewUI/InternalTask.cc
new file mode 100644
index 0000000..e7bce4f
--- /dev/null
+++ b/src/MetviewUI/InternalTask.cc
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <Metview.h>
+
+#include "inc_stl.h"
+
+
+#ifndef InternalTask_H
+#include "InternalTask.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Dependancy_H
+#include "Dependancy.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+
+//=================================================================
+
+InternalTask::InternalTask(const Action& action,IconObject* o):
+	action_(action),
+	object_(o),
+	waiting_(0),
+	error_(false)
+{
+}
+
+InternalTask::~InternalTask()
+{
+	cout << "InternalTask::~InternalTask " << *object_ << endl;
+}
+
+void InternalTask::start()
+{
+	const set<DependancyH>& dep = object_->dependancies();
+
+	Action action("prepare","*");
+
+	for(set<DependancyH>::const_iterator j = dep.begin(); j != dep.end(); ++j)
+	{
+		Task* t = (*j)->action(action);
+		if(t) {
+			tasks_[t] = *j;
+			waiting_++;
+			t->add(this);
+		}
+	}
+	check();
+}
+
+void InternalTask::check()
+{
+	cout << *this << endl;
+
+	if(waiting_) 
+		return;
+
+	if(error_)
+	{
+		Task::failure();
+		return;
+	}
+
+	MvRequest r   = object_->fullRequest();
+	const char* null = 0;
+
+	if(null == r("_NAME"))    r("_NAME")    = object_->fullName().c_str();
+	if(null == r("_CLASS"))   r("_CLASS")   = object_->className().c_str();
+	if(null == r("_ACTION"))  r("_ACTION")  = action_.name().c_str();
+	Task::success(r);
+}
+
+void InternalTask::success(Task* t,const Request& r)
+{
+	cout << "InternalTask::success " << *t << endl;
+	tasks_[t]->success(r);
+	waiting_--;
+	check();
+}
+
+void InternalTask::failure(Task* t)
+{
+	cout << "InternalTask::failure " << *t << endl;
+	error_ = true;
+	tasks_[t]->failure();
+	waiting_--;
+	check();
+}
+
+void InternalTask::print(ostream& s) const
+{
+	s << "InternalTask[" 
+	  << "," 
+      << action_.name() 
+	  << ","  
+	  << action_.mode() 
+	  << ","
+      << *object_ 
+	  << "]";
+}
diff --git a/src/MetviewUI/InternalTask.h b/src/MetviewUI/InternalTask.h
new file mode 100644
index 0000000..c86f690
--- /dev/null
+++ b/src/MetviewUI/InternalTask.h
@@ -0,0 +1,138 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File InternalTask.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef InternalTask_H
+#define InternalTask_H
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#include "TaskObserver.h"
+#include "IconObject.h"
+#include "Dependancy.h"
+
+
+
+class InternalTask : public TaskObserver, public Task {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	InternalTask(const Action&,IconObject*);
+
+// -- Destructor
+
+	virtual ~InternalTask(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+
+// -- Methods
+	virtual void addContext (const Request&) { };
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	 void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	InternalTask(const InternalTask&);
+	InternalTask& operator=(const InternalTask&);
+
+// -- Members
+
+	Action      action_;
+	IconObjectH object_;
+	bool        error_;
+	int         waiting_;
+
+	typedef map<TaskH,DependancyH> Map;
+	Map tasks_;
+
+// -- Methods
+
+	void check();
+
+// -- Overridden methods
+
+	// From Task
+	virtual void start();
+
+	// From TaskObserver
+
+	virtual void success(Task*,const Request&);
+	virtual void failure(Task*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const InternalTask& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(InternalTask**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(InternalTask);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Items.cc b/src/MetviewUI/Items.cc
new file mode 100644
index 0000000..623c709
--- /dev/null
+++ b/src/MetviewUI/Items.cc
@@ -0,0 +1,160 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Items_H
+#include "Items.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef IconInfo_H
+#include "IconInfo.h"
+#endif
+
+#ifndef Timeout_H
+#include "Timeout.h"
+#endif
+
+
+static map<string,Items*> items;
+
+class MakeItems : public Timeout {
+
+	map<string,Items*>::iterator* j_;
+
+public:
+	MakeItems() : Timeout(10),  j_(0)  { enable(); }
+
+
+	virtual void run() 
+	{
+		if(j_ == 0) {
+			j_  = new map<string,Items*>::iterator();
+			*j_ = items.begin();
+		}
+
+		if((*j_) == items.end())
+			disable();
+		else {
+			Items::find((*(*j_)).first);
+			(*j_)++;
+		}
+	}
+};
+
+
+Items::Items(request* r):
+	r_(r),
+	object_(0)
+{
+	static MakeItems maker;
+	items[get_value(r,"name",0)] = this;
+}
+
+Items::~Items()
+{
+	// Not called
+}
+
+IconObject* Items::find(const string& a)
+{
+	// cout << "Items::find( " << a << endl;
+	map<string,Items*>::iterator j = items.find(a);
+	if(j == items.end())
+		return 0;
+	else
+		return (*j).second->object();
+}
+
+void Items::load(request* r)
+{
+	new Items(r);
+}
+
+IconObject* Items::object()
+{
+	if(object_ != 0)
+		return object_;
+
+	const char *kind = get_value(r_,"class",0);
+	const char *full = get_value(r_,"full_name",0);
+	const char *x    = get_value(r_,"x",0);
+	const char *y    = get_value(r_,"y",0);
+	const char *link = get_value(r_,"linked_to",0);
+
+	object_ = IconObject::search(full); 
+	if(object_) return object_;
+
+	if(link)
+	{
+		Path path = Folder::top()->path();
+		path = path.add(full);
+		path.symlink(string(link));
+	}
+
+	object_ = IconFactory::create(full,IconClass::find(kind));
+	if(object_) {
+		if(x && y) object_->parent()->position(object_,atol(x),atol(y));
+		return object_;
+	}
+
+	Log::error(0) << "Cannot create " << full << endl;
+	return 0;
+}
+
+// Because the system folders are not created properly
+// We need to fix them
+
+void Items::fix(IconObject* o)
+{
+	if(o->parent() == 0) return;
+		
+	string n = o->fullName();
+	string c = o->className();
+
+	for(map<string,Items*>::iterator j = items.begin(); j != items.end(); ++j)
+	{
+		const char *full = get_value((*j).second->r_,"full_name",0);
+		const char *kind = get_value((*j).second->r_,"class",0);
+
+		if(n == full && !(c == kind))
+		{
+			// Log::error(o) << "Class is " << c << " and should be " << kind << endl;
+
+			IconInfo& info = o->info();
+			info.fix(kind);
+			o->saveInfo();
+
+		}
+	}
+}
+
+static SimpleLoader<Items> loadClasses("interface_item",1);
diff --git a/src/MetviewUI/Items.h b/src/MetviewUI/Items.h
new file mode 100644
index 0000000..26a9cb6
--- /dev/null
+++ b/src/MetviewUI/Items.h
@@ -0,0 +1,131 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Items.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Items_H
+#define Items_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#include <string>
+using std::string;
+
+#include "Metview.h"
+#include "IconObject.h"
+
+
+class Items {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Items(request*);
+
+// -- Destructor
+
+	~Items(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	IconObject* object();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void load(request*);
+	static IconObject* find(const string&);
+	static void fix(IconObject*);
+
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Items(const Items&);
+	Items& operator=(const Items&);
+
+// -- Members
+
+	request*    r_;
+	IconObjectH object_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Items& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Items**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Items);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Language.cc b/src/MetviewUI/Language.cc
new file mode 100644
index 0000000..ef14782
--- /dev/null
+++ b/src/MetviewUI/Language.cc
@@ -0,0 +1,251 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+
+typedef map<string,Language*> Map;
+static Map languages;
+
+static map<string,request*> lang_cache;
+static map<string,rule*>    rule_cache;
+
+
+Language::Language(const IconClass* c):
+	inited_(false),
+	lang_(0),
+	rule_(0),
+	class_(c),
+	flags_(0)
+{
+	languages[c->name()] = this;
+	if(languages.size() == 1)
+		expand_flags(EXPAND_2ND_NAME);
+}
+
+Language::~Language()
+{
+	// Not called
+	free_all_requests(lang_);
+}
+const char* Language::getInfo()  const
+{
+	return lang_->info ? lang_->info : "";
+}
+
+const char* Language::getKind() const
+{
+	return lang_->kind;
+}
+
+Language& Language::find(const IconClass* c)
+{
+	Map::iterator j = languages.find(c->name());
+	if(j != languages.end())
+		return *(*j).second;
+	return *(new Language(c));
+}
+
+void Language::init()
+{
+	if(inited_) return;
+	
+	
+	inited_ = true;
+
+
+	string langs = class_->definitionFile().str();
+	map<string,request*>::iterator j = lang_cache.find(langs);
+	if(j != lang_cache.end())
+		lang_ = (*j).second;
+	else
+	{
+		cout << "read " << langs << endl;
+		lang_ = read_language_file(langs.c_str());
+		lang_cache[langs] = lang_;
+	}
+
+	string rules = class_->rulesFile().str();
+	map<string,rule*>::iterator k = rule_cache.find(rules);
+	if(k != rule_cache.end())
+		rule_ = (*k).second;
+	else
+	{
+		cout << "read " << rules << endl;
+		rule_ = read_check_file(rules.c_str());
+		rule_cache[rules] = rule_;
+	}
+	
+	flags_ = class_->expandFlags();
+
+	// Position to the right request
+	while(lang_ && !(class_->name() == lang_->name) )
+		lang_ = lang_->next;
+
+	if(lang_ == 0) {
+		lang_ = empty_request(0);
+	}
+
+	// Create the Parameters
+
+	parameter *p = lang_ ? lang_->params :0 ;
+	while(p)
+	{
+		params_.push_back(new Parameter(*this,p));
+		p = p->next;
+	}
+}
+
+
+Request Language::expand(const Request& r,long flags,bool ruleFlag)
+{
+	Request result = r;
+
+	init();
+
+	if(lang_ == 0)
+		return result;
+
+	reset_language(lang_);
+	long save = expand_flags(flags);
+	request *a;
+	if ( ruleFlag )
+		a = expand_all_requests(lang_,rule_,result);
+	else
+		a = expand_all_requests(lang_,0,result);
+
+	expand_flags(save);
+
+
+	if(a == 0)
+		return result;
+
+	return MvRequest(a,false);
+}
+
+Request Language::expand(const Request& r)
+{
+	return expand(r,flags_);
+}
+
+
+vector<string> Language::interfaces(const char* name)
+{
+	init();
+
+	// Need something a little bit more "C++"
+
+	vector<string> result;
+	parameter *p = lang_->params;
+	while(p)
+	{
+		if(p->interface)
+		{
+			const char* q = get_value(p->interface,"interface",0);
+			if(q && strcmp(q,name) == 0)
+				result.push_back(p->name);
+		}
+		p = p->next;
+	}
+
+	return result;
+}
+
+void Language::scan(LanguageScanner& s)
+{
+	init();
+	for(vector<Parameter*>::iterator j = params_.begin(); j != params_.end(); ++j)
+		s.next(*(*j));
+
+}
+
+static value *find_values(const request *r,char *parname)
+{
+    if(r)
+    {
+        parameter *p = r->params;
+        while(p)
+        {
+            if(strcmp(p->name,parname) == 0)
+                return p->values;
+            p = p->next;
+        }
+    }
+    return NULL;
+
+}
+
+Language::Language(const IconClass* c, const Request& def) :
+	inited_(true),
+	rule_(0),
+	class_(c)
+{
+    const char *name, *ui;
+    parameter *param, *lastparam = NULL;
+    value     *val   = NULL;
+
+    const request* r = def;
+ 
+    lang_ = empty_request(c->name().c_str());
+    languages[c->name()] = this;
+
+    while (r) {
+        name = get_value(r, "name", 0);
+        if (!name) break;
+        param = new_parameter(strcache(name), NULL);
+        ui   = r->name;
+        val = find_values(r, "values");
+        param->values = clone_all_values(val);
+        val = find_values(r, "default");
+        param->default_values = clone_all_values(val);
+        param->current_values = clone_all_values(val);
+        param->interface = clone_one_request(r);
+
+        set_value(param->interface, "interface", ui);
+        strfree(param->interface->name);
+        param->interface->name = strcache(name);
+
+        if (lastparam) lastparam->next = param;
+        else lang_->params = param;
+        lastparam = param;
+
+        r = r->next;
+    }
+   	flags_ = class_->expandFlags();
+
+
+
+	// Position to the right request
+	while(lang_ && !(class_->name() == lang_->name) )
+		lang_ = lang_->next;
+
+	// Create the Parameters
+
+	parameter *p = lang_ ? lang_->params :0 ;
+	while(p)
+	{
+		params_.push_back(new Parameter(*this,p));
+		p = p->next;
+	}
+
+}
diff --git a/src/MetviewUI/Language.h b/src/MetviewUI/Language.h
new file mode 100644
index 0000000..f168ea8
--- /dev/null
+++ b/src/MetviewUI/Language.h
@@ -0,0 +1,138 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Language.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef Language_H
+#define Language_H
+
+#include <string>
+using std::string;
+
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+class IconClass;
+class Parameter;
+
+class LanguageScanner {
+public:
+	virtual void next(const Parameter&) = 0;
+};
+
+
+class Language {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Language(const IconClass*);
+	Language(const IconClass*, const Request&);
+
+// -- Destructor
+
+	~Language(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	const char* getInfo() const;
+	const char* getKind() const;
+
+	Request expand(const Request&);
+	Request expand(const Request&,long,bool=true);
+	void scan(LanguageScanner&);
+	vector<string> interfaces(const char*);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	
+	static Language& find(const IconClass*);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Language(const Language&);
+	Language& operator=(const Language&);
+
+// -- Members
+
+	bool               inited_;
+	request*           lang_;
+	rule*              rule_;
+	long               flags_;
+	const IconClass*   class_;
+	vector<Parameter*> params_;
+
+// -- Methods
+
+	void init();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Language& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Language**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Language);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/LayoutDrawer.cc b/src/MetviewUI/LayoutDrawer.cc
new file mode 100644
index 0000000..3e4dc63
--- /dev/null
+++ b/src/MetviewUI/LayoutDrawer.cc
@@ -0,0 +1,74 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LayoutDrawer_H
+#include "LayoutDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef ViewEditor_H
+#include "ViewEditor.h"
+#endif
+
+
+LayoutDrawer::LayoutDrawer(ViewEditor& e):
+	XEditorDrawer<UILayoutDrawer_c>(e),
+	editor_(e)
+{
+}
+
+LayoutDrawer::~LayoutDrawer()
+{
+}
+
+void LayoutDrawer::update()
+{
+}
+
+// Callbacks
+void LayoutDrawer::splitVerCB(Widget w,XtPointer)
+{
+	editor_.splitSelection(1,atoi(XtName(w)),0,0);
+}
+
+void LayoutDrawer::splitHorCB(Widget w,XtPointer)
+{
+	editor_.splitSelection(atoi(XtName(w)),1,0,0);
+}
+
+void LayoutDrawer::groupSelectionCB(Widget w,XtPointer)
+{
+	editor_.groupSelection();
+}
+
+void LayoutDrawer::ungroupSelectionCB(Widget w,XtPointer)
+{
+	editor_.ungroupSelection();
+}
+
+void LayoutDrawer::joinSelectionCB(Widget w,XtPointer)
+{ 
+	editor_.joinSelection();
+}
+
+void LayoutDrawer::deleteSelectionCB(Widget w,XtPointer)
+{
+	editor_.deleteSelection();
+}
+
+void LayoutDrawer::addPageCB(Widget w,XtPointer)
+{
+	editor_.addPage();
+}
+
+
+static EditorDrawerMaker<LayoutDrawer,ViewEditor> maker(12);
diff --git a/src/MetviewUI/LayoutDrawer.h b/src/MetviewUI/LayoutDrawer.h
new file mode 100644
index 0000000..ec9853d
--- /dev/null
+++ b/src/MetviewUI/LayoutDrawer.h
@@ -0,0 +1,122 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File LayoutDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef LayoutDrawer_H
+#define LayoutDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UILayoutDrawer.h"
+
+class ViewEditor;
+
+class LayoutDrawer : public XEditorDrawer<UILayoutDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	LayoutDrawer(ViewEditor&);
+
+// -- Destructor
+
+	virtual ~LayoutDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	LayoutDrawer(const LayoutDrawer&);
+	LayoutDrawer& operator=(const LayoutDrawer&);
+
+// -- Members
+
+  	ViewEditor& editor_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void update();
+
+	void splitVerCB(Widget, XtPointer);
+	void splitHorCB(Widget, XtPointer);
+	void groupSelectionCB(Widget, XtPointer);
+	void ungroupSelectionCB(Widget, XtPointer);
+	void joinSelectionCB(Widget, XtPointer);
+	void deleteSelectionCB(Widget, XtPointer);
+	void addPageCB(Widget, XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const LayoutDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(LayoutDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(LayoutDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/LineFactory.cc b/src/MetviewUI/LineFactory.cc
new file mode 100644
index 0000000..454c456
--- /dev/null
+++ b/src/MetviewUI/LineFactory.cc
@@ -0,0 +1,51 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+
+#ifndef TextLine_H
+#include "TextLine.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+static map<string,LineFactory*>* makers = 0;
+
+LineFactory::LineFactory(const string& name)
+{
+	if(makers == 0)
+		makers = new map<string,LineFactory*>;
+
+	// Put in reverse order...
+	(*makers)[name] = this;
+}
+
+LineFactory::~LineFactory()
+{
+	// Not called
+}
+
+RequestPanelLine* LineFactory::create(RequestPanel& e,const Parameter& p)
+{
+	const char* o = p.interface();
+	if(o != 0)
+	{
+		map<string,LineFactory*>::iterator j = makers->find(o);
+		if(j != makers->end())
+			return (*j).second->make(e,p);
+	}
+
+	return  new TextLine(e,p);
+}
+
diff --git a/src/MetviewUI/LineFactory.h b/src/MetviewUI/LineFactory.h
new file mode 100644
index 0000000..9bc98a7
--- /dev/null
+++ b/src/MetviewUI/LineFactory.h
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File LineFactory.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef LineFactory_H
+#define LineFactory_H
+
+#include <string>
+using std::string;
+
+#include "mars.h"
+
+class RequestPanel;
+class RequestPanelLine;
+class Parameter;
+
+class LineFactory {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	LineFactory(const string&);
+
+// -- Destructor
+
+	virtual ~LineFactory(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual RequestPanelLine* make(RequestPanel&,const Parameter&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static RequestPanelLine* create(RequestPanel&,const Parameter&);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	LineFactory(const LineFactory&);
+	LineFactory& operator=(const LineFactory&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const LineFactory& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T>
+class LineMaker : public LineFactory {
+	RequestPanelLine* make(RequestPanel& e,const Parameter& p) { return new T(e,p); }
+public:
+	LineMaker(const string& name) : LineFactory(name) {}
+};
+
+
+#endif
diff --git a/src/MetviewUI/ListHelp.cc b/src/MetviewUI/ListHelp.cc
new file mode 100644
index 0000000..7bbc97e
--- /dev/null
+++ b/src/MetviewUI/ListHelp.cc
@@ -0,0 +1,78 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ListHelp_H
+#include "ListHelp.h"
+#endif
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+
+ListHelp::ListHelp(Widget parent, RequestPanel& owner, const Parameter& def):
+	XHelp<UIListHelp_c>(parent, owner, def),
+	xlist_(list_,def)
+{     
+}
+
+ListHelp::~ListHelp()
+{
+}
+
+void ListHelp::refresh(const vector<string>& values)
+{
+	xlist_.set(values);
+}
+
+long ListHelp::flags()
+{
+	return EXPAND_FIRST_NAME;
+}
+
+void ListHelp::set(Request& r) 
+{
+	r.set(param_.name(),xlist_.get());
+}
+
+void ListHelp::browseCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);
+}
+
+void ListHelp::singleCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);
+}
+
+void ListHelp::multipleCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);
+}
+
+void ListHelp::extendedCB(Widget,XtPointer)
+{
+	xlist_.changed();
+	owner_.changed(*this);
+}
+
+static HelpMaker<ListHelp> maker("help_multiple_selection");
+//static HelpMaker<ListHelp> maker1("colour");
+//static HelpMaker<ListHelp> maker2("help_colour");
diff --git a/src/MetviewUI/ListHelp.h b/src/MetviewUI/ListHelp.h
new file mode 100644
index 0000000..97b09f4
--- /dev/null
+++ b/src/MetviewUI/ListHelp.h
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ListHelp_H
+#define ListHelp_H
+
+#include "UIListHelp.h"
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef ParamList_H
+#include "ParamList.h"
+#endif
+
+class ListHelp: public XHelp<UIListHelp_c> {
+public:
+
+// -- Contructors
+
+	ListHelp(Widget, RequestPanel&, const Parameter&);
+
+// -- Destructor
+
+	virtual ~ListHelp(); 
+
+private:
+
+// No copy allowed
+
+	ListHelp(const ListHelp&);
+	ListHelp& operator=(const ListHelp&);
+
+// -- Members
+	
+	ParamList xlist_;
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void browseCB(Widget,XtPointer);
+	virtual void singleCB(Widget,XtPointer);
+	virtual void multipleCB(Widget,XtPointer);
+	virtual void extendedCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+  	virtual long flags();
+	virtual void set(Request&);
+
+};
+
+#endif
diff --git a/src/MetviewUI/Log.cc b/src/MetviewUI/Log.cc
new file mode 100644
index 0000000..5d1bb4f
--- /dev/null
+++ b/src/MetviewUI/Log.cc
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#include <errno.h>
+#include <inc_iostream.h>
+
+#ifndef TeeStream_H
+#include "TeeStream.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+
+// which platform require this one?
+// (not SGI, and Linux get compiler errors
+//  because of different types...!)
+//extern char *sys_errlist[];
+extern int sys_nerr;
+
+
+Log::Log(IconObject* o):
+	path_(::marstmp()),
+	object_(o)
+{
+}
+
+Log::~Log()
+{
+	path_.remove();
+}
+
+ostream& Log::global()
+{
+	static ostream* g = 0;
+	if(g == 0)
+	{
+		g = &cout; // Avoid recursion
+		string p = Folder::top()->logPath().str();
+		g = new ofstream(p.c_str(),ios::app);
+		Folder::top()->showLog();
+	}
+	return *g;
+}
+
+Log::operator ostream&()
+{
+	if(tee_.get() == 0)
+	{
+	
+		auto_ptr<ostream> o(new ofstream(path_.str().c_str(),ios::app));
+		out_ = o;
+		
+		auto_ptr<ostream> t(new TeeStream(global(),*out_));
+		tee_ = t;
+
+
+	}
+
+	global() << '['  << object_->name() << "] ";
+
+	return *tee_;
+}
+
+const Path& Log::path()
+{
+	return path_;
+}
+
+ostream& Log::syserr(ostream& s)
+{
+    int e = errno;
+   
+    if(e>0 && e < sys_nerr)
+        s << " (" << sys_errlist[e] << ") " ;
+    else
+        s << " (errno = " << e << ") ";
+    return s;
+}
+
+ostream& Log::error(IconObject* o)
+{
+	return info(o);
+}
+
+ostream& Log::info(IconObject* o)
+{
+	if(o == 0) o = Folder::top();
+	return o->log();
+}
+
+ostream& Log::warning(IconObject* o)
+{
+	return info(o);
+}
+
+ostream& Log::info(const string& p)
+{
+	return global() << '[' << p << "] ";	
+}
+
+ostream& Log::warning(const string& p)
+{
+	return info(p);
+}
+
+ostream& Log::error(const string& p)
+{
+	return info(p);
+}
diff --git a/src/MetviewUI/Log.h b/src/MetviewUI/Log.h
new file mode 100644
index 0000000..30b5cc4
--- /dev/null
+++ b/src/MetviewUI/Log.h
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Log.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Log_H
+#define Log_H
+
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+class IconObject;
+
+class Log {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Log(IconObject*);
+
+// -- Destructor
+
+	~Log(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+	operator ostream&() ;
+
+// -- Methods
+
+	const Path& path();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static ostream& info(IconObject*);
+	static ostream& warning(IconObject*);
+	static ostream& error(IconObject*);
+	static ostream& syserr(ostream&);
+
+	static ostream& info(const string&);
+	static ostream& warning(const string&);
+	static ostream& error(const string&);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Log(const Log&);
+	Log& operator=(const Log&);
+
+// -- Members
+
+	Path              path_;
+	auto_ptr<ostream> out_;
+	auto_ptr<ostream> tee_;
+	IconObject* object_;
+
+// -- Methods
+
+	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+
+
+// -- Class methods
+
+
+	static ostream& global();
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Log& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Log**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Log);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/LogWindow.cc b/src/MetviewUI/LogWindow.cc
new file mode 100644
index 0000000..a3214cc
--- /dev/null
+++ b/src/MetviewUI/LogWindow.cc
@@ -0,0 +1,184 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+#include <Tab.h>
+#include <Xm/ToggleB.h>
+#include <Xm/Text.h>
+
+
+#ifndef LogWindow_H
+#include "LogWindow.h"
+#endif
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+typedef set<LogWindow*> Set;
+static Set windows;
+
+
+LogWindow::LogWindow():
+	Timeout(1),
+	current_(0),
+	file_(0)
+{
+	Widget top = MetviewUI::root();
+	create(XtDisplay(top),"Metview",0,0);
+	windows.insert(this);
+}
+
+LogWindow::~LogWindow()
+{
+	// Not called
+
+	//if(current_) current_->detach();
+	//XtDestroyWidget(xd_rootwidget());
+	//
+
+}
+
+void LogWindow::open(IconObject* icon)
+{
+	LogWindow *e = icon->logWindow();
+	if(e == 0)
+	{
+		for(Set::iterator j = windows.begin(); j != windows.end(); ++j)
+			if((*j)->current_ == 0)
+				e = (*j);
+
+		if(e == 0) e = new LogWindow();
+
+	}
+	e->show(icon);
+}
+
+void LogWindow::show(IconObject* icon)
+{
+	if(icon != current_)
+	{
+		current_ = icon;	
+		if(current_) {
+			current_->logWindow(this);
+			XtVaSetValues(xd_rootwidget(),XmNtitle, current_->name().c_str(), 0);
+			load();
+		}
+	}
+	raise();
+}
+
+void LogWindow::load()
+{
+	stop();
+	if(file_) {
+		fclose(file_);
+		file_ = 0;
+	}
+
+	Path p = current_->logPath();
+
+	XMText text(text_);
+	text.load(p);
+
+	file_   = fopen(p.str().c_str(),"r");
+	if(file_)
+	{
+		fseek(file_,0,SEEK_END);
+		start(file_);
+	}
+}
+
+void LogWindow::raise()
+{
+	XtRealizeWidget(xd_rootwidget());
+	XMapRaised(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}	
+
+void LogWindow::closeCB(Widget,XtPointer)
+{
+	close();
+}
+
+void LogWindow::close()
+{
+	if(file_)
+	{
+		fclose(file_);
+		file_ = 0;
+	}
+
+	stop();
+
+	XMText text(text_);
+	text.clear();
+
+	if(current_) current_->logWindow(0);
+	current_ = 0;
+	XUnmapWindow(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}
+
+void LogWindow::done(FILE*)
+{
+	stop();
+	enable();
+}
+
+void LogWindow::run()
+{
+	start(file_);
+	disable();
+}
+
+void LogWindow::ready(const char* l)
+{
+	static string cr = "\n";
+	XMText text(text_);
+	text.append(l);
+	text.append(cr);
+}
+
+void LogWindow::clearCB(Widget,XtPointer)
+{
+	Path p  = current_->logPath();
+	FILE *f = fopen(p.str().c_str(),"w");
+	if(f) fclose(f);
+
+	load();
+}
+
+void LogWindow::freezeCB(Widget,XtPointer data)
+{
+	XmToggleButtonCallbackStruct* cb = (XmToggleButtonCallbackStruct*)data;
+	if(cb->set) 
+		stop();
+	else 
+		load();
+}
diff --git a/src/MetviewUI/LogWindow.h b/src/MetviewUI/LogWindow.h
new file mode 100644
index 0000000..e6db81c
--- /dev/null
+++ b/src/MetviewUI/LogWindow.h
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File LogWindow.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef LogWindow_H
+#define LogWindow_H
+
+#include <Xm/Xm.h>
+#include "UILogWindow.h"
+
+class IconObject;
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Input_H
+#include "Input.h"
+#endif
+
+#ifndef Timeout_H
+#include "Timeout.h"
+#endif
+
+class LogWindow : public UILogWindow_c, public Input, public Timeout {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Destructor
+
+	virtual ~LogWindow(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void close();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void open(IconObject*);
+
+protected:
+
+// -- Contructors
+
+	LogWindow();
+
+// -- Members
+	// None
+
+	FILE*           file_;
+	IconObjectH     current_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	LogWindow(const LogWindow&);
+	LogWindow& operator=(const LogWindow&);
+
+// -- Members
+
+// -- Methods
+
+	void show(IconObject*);
+	void raise();
+	void load();
+	void more();
+
+// -- Overridden methods
+
+	// -- From XDesigned
+	virtual void closeCB(Widget,XtPointer);
+	virtual void clearCB(Widget,XtPointer);
+	virtual void freezeCB(Widget,XtPointer);
+
+	// -- From Input
+
+	virtual void ready(const char*);
+	virtual void done(FILE*);
+
+	// -- From Timeout
+	virtual void run();
+
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const LogWindow& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+inline void destroy(LogWindow**) {}
+
+
+#endif
diff --git a/src/MetviewUI/MacroEditor.cc b/src/MetviewUI/MacroEditor.cc
new file mode 100644
index 0000000..ae4963d
--- /dev/null
+++ b/src/MetviewUI/MacroEditor.cc
@@ -0,0 +1,287 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef MacroEditor_H
+#include "MacroEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef EditorButton_H
+#include "EditorButton.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef OutputDrawer_H
+#include "OutputDrawer.h"
+#endif
+
+#include "Tab.h"
+
+#ifndef MacroRunTask_H
+#include "MacroRunTask.h"
+#endif
+
+
+MacroEditor::MacroEditor(const IconClass& name,const string& kind):
+	BaseTextEditor(name,kind)
+{
+
+}
+
+MacroEditor::~MacroEditor()
+{
+}
+
+void MacroEditor::output(Widget w)
+{
+	output_ = w;
+}
+
+
+void MacroEditor::merge(IconObject* o)
+{
+	XMText text(text_);
+	Path temp(::marstmp());
+
+	char buf[1024];
+	sprintf(buf,"$METVIEW_BIN/mvimport \"%s\" %s",
+		o->fullName().c_str(),
+		temp.str().c_str());
+
+	system(buf);
+	text.load(temp,true);
+
+	temp.remove();
+}
+
+void MacroEditor::replace(IconObject* o)
+{
+	XMText text(text_);
+	text.clear();
+	merge(o);
+}
+
+void MacroEditor::run()
+{
+	start("prepare",false);
+}
+
+void MacroEditor::trace()
+{
+	start("prepare",true);
+}
+
+void MacroEditor::beautify()
+{
+	Path tmp1(::marstmp());
+	Path tmp2(::marstmp());
+
+	XMText text(text_);
+	text.save(tmp1);
+
+	XMText out(output_);
+	out.clear();
+
+	char buf[1024];
+	sprintf(buf,"$METVIEW_BIN/beautify -b -f \"%s\" -g \"%s\"",
+		tmp1.str().c_str(),
+		tmp2.str().c_str());
+
+	if(system(buf) == 0)
+	{
+		progress("Macro beautified");
+		text.load(tmp2);
+	}
+	else
+		check();
+
+	tmp1.remove();
+	tmp2.remove();
+}
+
+void MacroEditor::print()
+{
+ 	Path tmp1(::marstmp());
+
+	XMText text(text_);
+	text.save(tmp1);
+
+	XMText out(output_);
+	out.clear();
+
+	char buf[1024];
+	sprintf(buf,"$METVIEW_BIN/beautify -n \"%s\" < \"%s\" | lpr",
+		current_->name().c_str(),
+		tmp1.str().c_str());
+
+
+	if(system(buf) == 0)
+		progress("Macro printed");
+	else
+		progress("Print command failed");
+
+	tmp1.remove();
+}
+
+void MacroEditor::reset()
+{
+	XMText out(output_);
+	out.clear();
+
+	BaseTextEditor::reset();
+	stop();
+}
+
+void MacroEditor::check()
+{
+	start("syntax",false);
+}
+
+void MacroEditor::line(const string& s)
+{
+	int len = s.length();
+
+	// Check for errors
+	if( 
+		len  > 6    &&
+		s[0] == 'L' &&
+	    s[1] == 'i' &&
+	    s[2] == 'n' &&
+	    s[3] == 'e' &&
+	    s[4] == ' ')
+	{
+		int n = 5;
+		int m = 0;
+		while(n < len && isdigit(s[n]))
+		{
+			m *= 10;
+			m += s[n] - '0';
+			n++;
+		}
+		if(s[n] == ':')
+		{
+			XMText text(text_);
+			text.selectLine(m);
+		}
+	}
+}
+
+void MacroEditor::progress(const string& s)
+{
+	XMText out(output_);
+	out.append(s);
+
+	TabSetCurrent(drawer_,output_,0);
+
+	// Check for errors
+	line(s);
+
+}
+
+void MacroEditor::stop()
+{
+	if(temp_) {
+		temp_->destroy();
+		temp_ = 0;
+	}
+
+	if(task_)
+	{
+		task_->stop();
+		task_ = 0;
+	}
+}
+
+void MacroEditor::start(const char *action,bool trace)
+{
+	stop();
+
+	XMText out(output_);
+	out.clear();
+
+	XMText text(text_);  
+	Path temp(::marstmp());
+	text.save(temp);
+
+	// Make object to hold the text.
+	temp_ = IconFactory::create(Folder::folder("temporary"),temp.name(),class_);
+  
+	Action a(action);
+
+	task_ = new MacroRunTask(*this,a,temp_,trace);
+	task_->start();
+
+}
+
+void MacroEditor::external()
+{
+	stop();
+	startAlternate();
+}
+
+void MacroEditor::modifiedCB(Widget w,XtPointer p)
+{
+	BaseTextEditor::modifiedCB(w,p);
+	stop();
+}
+
+
+static EditorMaker<MacroEditor> editorMaker("MacroEditor");
+
+
+static EditorButtonMaker<MacroEditor> b1("MacroRun",&MacroEditor::run,1);
+static EditorButtonMaker<MacroEditor> b2("MacroTrace",&MacroEditor::trace,2);
+static EditorButtonMaker<MacroEditor> b3("MacroRecordOff",&MacroEditor::stop,3);
+static EditorButtonMaker<MacroEditor> b4("MacroCheck",&MacroEditor::check,4);
+
+// sep
+// MacroRecordOn, MacroRecordOff
+
+
+static EditorButtonMaker<MacroEditor> b5("MacroEdit",&MacroEditor::external,5);
+static EditorButtonMaker<MacroEditor> b6("MacroPrint",&MacroEditor::print,6);
+static EditorButtonMaker<MacroEditor> b7("MacroBeau",&MacroEditor::beautify,7);
+
+//static EditorButtonMaker<MacroEditor> b7("MacroEditPref",MacroEditor::externEditor,5);
+
diff --git a/src/MetviewUI/MacroEditor.h b/src/MetviewUI/MacroEditor.h
new file mode 100644
index 0000000..f58f4e2
--- /dev/null
+++ b/src/MetviewUI/MacroEditor.h
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MacroEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MacroEditor_H
+#define MacroEditor_H
+
+#ifndef BaseTextEditor_H
+#include "BaseTextEditor.h"
+#endif
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+
+class MacroEditor : public BaseTextEditor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MacroEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~MacroEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void run();
+	void trace();
+	void stop();
+	void beautify();
+
+	void print();
+	void check();
+	void external();
+
+	void output(Widget);
+	void line(const string&);
+	void progress(const string&);
+
+// -- Overridden methods
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MacroEditor(const MacroEditor&);
+	MacroEditor& operator=(const MacroEditor&);
+
+// -- Members
+
+	Widget     output_;
+	TaskH       task_;
+	IconObjectH temp_;
+
+// -- Methods
+
+	void start(const char *, bool);
+
+// -- Overridden methods
+
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+	virtual void reset();
+
+	virtual void modifiedCB(Widget,XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MacroEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MacroEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MacroEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/MacroParam.cc b/src/MetviewUI/MacroParam.cc
new file mode 100644
index 0000000..d36895e
--- /dev/null
+++ b/src/MetviewUI/MacroParam.cc
@@ -0,0 +1,103 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MacroParam_H
+#include "MacroParam.h"
+#endif
+
+#include "IconFactory.h"
+#include "IconClass.h"
+
+MacroParam::MacroParam(Folder* parent,const IconClass& kind,
+	const string& name,IconInfo* info):
+	Basic(parent,kind,name,info)
+{
+}
+
+MacroParam::~MacroParam()
+{
+}
+
+void MacroParam::state(MacroParamState* state)
+{
+	IconObjectH macro = state->macro();
+
+	Request r("MACROPARAM");
+	if(macro)
+		r("MACRO") = relativeName(macro).c_str();
+
+	r = r + state->request();
+
+	r.save(path());
+}
+
+MacroParamState* MacroParam::state() const
+{
+	MacroParam* self = const_cast<MacroParam*>(this);
+	//if(state_ == 0)
+	{
+	    IconObject* macro = 0;
+
+	    Request r(path());
+	    const char *name = r("MACRO");
+	    if(name)
+	    {
+		string fullName  = makeFullName(name);
+		macro =  IconObject::search(fullName);
+	    }
+
+	    self->state_ = new MacroParamState(self,macro,r.advance());
+	}
+
+	return state_;
+}
+
+Language& MacroParam::language() const
+{
+    return state()->iconClass().language();
+}
+
+Request MacroParam::fullRequest() const
+{
+    Request r = Basic::fullRequest();
+
+    Request s(path());
+    const char *name = s("MACRO");
+    if(name) {
+	string fullName  = makeFullName(name);
+	IconObject* macro =  IconObject::search(fullName);
+	if(macro)
+		s("MACRO") = macro->request();
+    }
+
+
+    s =  s.justOneRequest() + r;
+    return s + r;
+}
+
+Request MacroParam::request() const
+{
+    Request r(path());
+    r.advance();
+
+    // For compatibility with old stuff
+    Request s(iconClass().name());
+    s.mars_merge(r);
+    return s;
+}
+
+void MacroParam::request(const Request& r)
+{
+    Request s(path());
+    s =  s.justOneRequest() + r;
+    s.save(path());
+}
+
+
+static IconMaker<MacroParam> maker("MACROPARAM");
diff --git a/src/MetviewUI/MacroParam.h b/src/MetviewUI/MacroParam.h
new file mode 100644
index 0000000..d362770
--- /dev/null
+++ b/src/MetviewUI/MacroParam.h
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MacroParam.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MacroParam_H
+#define MacroParam_H
+
+#ifndef Basic_H
+#include "Basic.h"
+#endif
+
+#include <string>
+using std::string;
+
+#ifndef MacroParamState_H
+#include "MacroParamState.h"
+#endif
+
+
+
+class MacroParam : public Basic {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MacroParam(Folder* parent,
+		const IconClass& kind, const string& name,
+		IconInfo* info);
+
+// -- Destructor
+
+	virtual ~MacroParam(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	MacroParamState* state() const;
+	void state(MacroParamState*);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MacroParam(const MacroParam&);
+	MacroParam& operator=(const MacroParam&);
+
+// -- Members
+
+	MacroParamStateH state_;
+
+
+// -- Methods
+
+
+// -- Overridden methods
+
+	Language& language() const;
+	Request fullRequest() const;
+	void request(const Request&);
+	Request request() const;
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MacroParam& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MacroParam**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MacroParam);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/MacroParamEditor.cc b/src/MetviewUI/MacroParamEditor.cc
new file mode 100644
index 0000000..07c5a65
--- /dev/null
+++ b/src/MetviewUI/MacroParamEditor.cc
@@ -0,0 +1,230 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef MacroParamEditor_H
+#include "MacroParamEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+
+#include "IconClass.h"
+
+#include "MacroParam.h"
+
+MacroDropArea::MacroDropArea(MacroParamEditor* owner):
+        owner_(owner)
+{
+	install(owner_->drag());
+}
+
+Widget MacroDropArea::menu()
+{   
+    Widget menu = owner_->menu();
+    XtSetSensitive(menu, current_.size() != 0);
+    return menu;
+}   
+
+void MacroDropArea::openIcon(IconObject* o)
+{
+    IconHolder::openIcon(o);
+}
+
+void MacroDropArea::closeIcon(IconObject* o)
+{
+    IconHolder::closeIcon(o);
+}
+
+
+MacroParamEditor::MacroParamEditor(const IconClass& name,const string& kind):
+  XEditor<UIParamEditor_c>(name,kind),
+  panel_(0),
+  macroArea_(this)
+{
+}
+
+MacroParamEditor::~MacroParamEditor()
+{
+}
+
+bool MacroDropArea::accept(IconObject* o)
+{   
+    const IconClass& ic = o->iconClass();
+    if ( ic.canBecome(IconClass::find("MACRO")) )   return true;
+    return false;   
+}
+
+void MacroDropArea::drop(Dropping& drop)
+{
+    IconObjectH o = drop.object(*this);
+    clear();
+    cout << "MacroAera::drop" << endl;
+    o->request().print();
+    if ( drop.copy() )   
+        o = o->clone(owner_->current()->embeddedFolder());
+    add(o); 
+    owner_->editMacro(o);
+}
+
+void MacroDropArea::add(IconObjectH o) 
+{
+    clear();
+    IconHolder::add(o);
+}
+
+void MacroDropArea::clear() 
+{
+    IconHolder::clear();
+}   
+
+vector<IconObjectH> MacroDropArea::icon() 
+{
+    return icons_;
+}
+
+Widget MacroParamEditor::drag() 
+{       
+    return drag_;
+}
+
+Widget MacroParamEditor::menu() 
+{       
+    return menu_;
+}
+
+void MacroParamEditor::apply()
+{
+	panel_->apply();
+	state_->request(panel_->request());
+	macroParam()->state(state_);
+}
+
+MacroParam* MacroParamEditor::macroParam() const
+{
+	IconObject* cur = current_;
+	return  dynamic_cast<MacroParam*>(cur);
+}
+
+void MacroParamEditor::reset()
+{   
+	delete  panel_;
+	panel_ = 0;
+
+	macroArea_.clear();
+
+	MacroParam* obj = macroParam();
+	state_ = obj->state();
+
+	editMacro(state_->macro());
+}
+
+void MacroParamEditor::close()
+{      
+   if ( macro_ ) macro_->removeObserver(this);
+   macro_ = 0;
+   delete  panel_;
+   panel_ = 0;
+   state_ = 0;
+}
+
+void MacroParamEditor::editMacro(IconObjectH macro)
+{     
+	if ( macro_ )
+	     macro_->removeObserver(this);
+	macro_ = macro;
+
+	if(macro) {
+		macroArea_.add(macro);      
+		macro_->addObserver(this);
+	}
+
+	state_->macro(macro);
+
+	delete  panel_;
+	panel_  = new RequestPanel(state_->iconClass(), editor_, 0); 
+	panel_->reset(state_->iconObject());
+}
+
+void MacroParamEditor::replace(IconObject* o)
+{
+    panel_->replace(o);
+}
+
+void MacroParamEditor::merge(IconObject* o)
+{
+     panel_->merge(o); 
+}
+
+
+IconObject* MacroParamEditor::copy(const string& name)
+{
+    IconObject* o = IconFactory::create(name, class_);
+    panel_->apply();
+    o->request(panel_->request());
+    return o;
+}
+
+void MacroParamEditor::removeCB(Widget, XtPointer) 
+{
+    macroArea_.clear();
+    panel_->Unmanage();
+    delete panel_;
+
+    state_->macro(0);  //-- no macro anymore!
+
+    //-- recreate panel_ or Apply button will core dump (020218/vk)
+    panel_ = new RequestPanel(state_->iconClass(), editor_, 0);
+    panel_->reset(state_->iconObject());
+}
+
+void MacroParamEditor::editCB(Widget, XtPointer)
+{
+	macro_->edit();
+}
+    
+void MacroParamEditor::edited(IconObject* o)
+{
+    macroArea_.openIcon(o);
+}
+
+void MacroParamEditor::changed(IconObject* o)
+{
+    editMacro(o);
+}
+
+void MacroParamEditor::destroyed(IconObject* o)
+{
+    editMacro(0);
+}
+
+void MacroParamEditor::closed(IconObject* o)
+{
+     macroArea_.closeIcon(o);
+}
+
+static EditorMaker<MacroParamEditor> editorMaker("TwoLevelsEditor");
diff --git a/src/MetviewUI/MacroParamEditor.h b/src/MetviewUI/MacroParamEditor.h
new file mode 100644
index 0000000..0ef5917
--- /dev/null
+++ b/src/MetviewUI/MacroParamEditor.h
@@ -0,0 +1,199 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MacroParamEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MacroParamEditor_H
+#define MacroParamEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+
+#include "UIParamEditor.h"
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+#ifndef IconHolder_H
+#include "IconHolder.h"
+#endif
+
+#ifndef TaskObserver_H
+#include "TaskObserver.h"
+#endif
+
+#ifndef EditorObserver_H
+#include "EditorObserver.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#include "MacroParamState.h"
+
+class RequestPanel;
+class MacroParamEditor;
+class MacroParam;
+ 
+class MacroDropArea : public IconHolder  
+{
+	MacroParamEditor* owner_;
+public:
+       MacroDropArea(MacroParamEditor*);
+     		
+	// From IconHolder
+	virtual bool 		accept(IconObject*);
+	virtual void add(IconObjectH);
+	virtual void clear();
+	virtual void openIcon(IconObject*);
+	virtual void closeIcon(IconObject*);
+
+	vector<IconObjectH> 	selection();
+	vector<IconObjectH> 	icon();
+
+	//from DragWindow
+	virtual Widget menu();
+	virtual bool dropCopy() { return true; }
+	
+
+	// From DropSite
+	virtual void drop(Dropping&);
+
+
+};
+
+class MacroParamEditor : public XEditor<UIParamEditor_c>, 
+	public IconObserver
+{
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MacroParamEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~MacroParamEditor(); // Change to virtual if base class  
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	       
+	Widget drag();
+	Widget menu();
+	void   editMacro(IconObjectH);
+	IconObject* macro() const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MacroParamEditor(const MacroParamEditor&);
+	MacroParamEditor& operator=(const MacroParamEditor&);
+
+// -- Members
+
+	RequestPanel*	   panel_;
+	MacroDropArea	   macroArea_;
+	MacroParamStateH   state_;
+	IconObjectH        macro_;
+
+// -- Methods
+
+	MacroParam* macroParam() const;
+
+
+// -- Overridden methods
+
+
+	// From InternalEditor
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void replace(IconObject*);
+	virtual void merge(IconObject*);
+
+	virtual IconObject* copy(const string&); 
+
+	 // From UIParamEditor_c
+
+	void removeCB(Widget, XtPointer);
+	void editCB(Widget, XtPointer);
+	
+		
+	// From IconObserver
+	virtual void edited(IconObject*);
+	virtual void closed(IconObject*);
+	virtual void changed(IconObject*);
+	virtual void destroyed(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MacroParamEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MacroParamEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MacroParamEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/MacroParamState.cc b/src/MetviewUI/MacroParamState.cc
new file mode 100644
index 0000000..3de9621
--- /dev/null
+++ b/src/MetviewUI/MacroParamState.cc
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MacroParamState_H
+#include "MacroParamState.h"
+#endif
+
+#ifndef TempIconClass_H
+#include "TempIconClass.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+MacroParamState::MacroParamState(IconObject* o,IconObject* m,const Request& r):
+	owner_(o),
+	macro_(m),
+	request_("MACROPARAM"),
+	class_(0)
+{
+	request_.mars_merge(r);
+}
+
+MacroParamState::~MacroParamState()
+{
+	delete class_;
+}
+
+IconObject* MacroParamState::macro() const
+{
+	return macro_;
+}
+
+Request MacroParamState::request() const
+{
+	return temp_ ? temp_->request() : request_;
+}
+
+void MacroParamState::request(const Request& r)
+{
+	request_ = r;
+	temp_ = 0;
+}
+
+IconObject* MacroParamState::iconObject()
+{
+	if(!temp_)
+		temp_ = IconFactory::create(owner_,request_,&iconClass());
+
+	return temp_;
+}
+
+void MacroParamState::macro(IconObject* macro)
+{
+	if(macro_ != macro)
+		macro_ = macro;
+
+	temp_  = 0;
+	delete class_;
+	class_ = 0;
+}
+
+
+Request MacroParamState::interface() const
+{
+	Action action("edit","*");
+	MvRequest r   = requests();
+
+
+
+	r("_NAME")    = owner_->fullName().c_str();
+	r("_CLASS")   = owner_->iconClass().name().c_str();
+	r("_ACTION")  = "edit";
+	r("_SERVICE") = "macro";
+
+	r.print();
+
+	int error;
+	Request result = MvApplication::waitService("macro",r,error);
+
+	result.print();
+	return result;
+
+}
+
+Request MacroParamState::requests() const
+{
+	if(!macro_)
+	{
+		Log::error(owner_) << "Missing macro icon" << endl;
+		return Request("");
+	}
+
+	Request r("MACROPARAM");
+	r("MACRO") = macro_->fullRequest();
+
+	return r + request_;
+}
+
+const IconClass& MacroParamState::iconClass()
+{
+    if(!class_)
+    {
+        Request i = interface();
+        class_ = new TempIconClass(i,&owner_->iconClass());
+    }
+    return *class_;
+}
+
+
diff --git a/src/MetviewUI/MacroParamState.h b/src/MetviewUI/MacroParamState.h
new file mode 100644
index 0000000..3aba718
--- /dev/null
+++ b/src/MetviewUI/MacroParamState.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MacroParamState.h
+// Baudouin Raoult - ECMWF Jun 00
+
+#ifndef MacroParamState_H
+#define MacroParamState_H
+
+#include "Request.h"
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+
+class MacroParamState : public Counted {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MacroParamState(IconObject*,IconObject*,const Request&);
+
+// -- Destructor
+
+	~MacroParamState(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	const IconClass& iconClass();
+	IconObject* iconObject();
+
+	IconObject* macro() const;
+	void macro(IconObject*);
+
+	Request request() const;
+	void request(const Request&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MacroParamState(const MacroParamState&);
+	MacroParamState& operator=(const MacroParamState&);
+
+// -- Members
+	
+	IconObjectH owner_;
+	IconObjectH temp_;
+	IconObjectH macro_;
+	Request     request_;
+	IconClass*  class_;
+
+// -- Methods
+
+	Request requests() const;
+	Request interface() const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MacroParamState& p)
+	//	{ p.print(s); return s; }
+
+};
+
+class MacroParamStateH : public  Handle<MacroParamState> {
+public:
+	MacroParamStateH(MacroParamState* o = 0) : Handle<MacroParamState>(o) {}
+};
+
+#endif
diff --git a/src/MetviewUI/MacroRunTask.cc b/src/MetviewUI/MacroRunTask.cc
new file mode 100644
index 0000000..b6126a8
--- /dev/null
+++ b/src/MetviewUI/MacroRunTask.cc
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+#include <Metview.h>
+
+
+#ifndef MacroRunTask_H
+#include "MacroRunTask.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef MacroEditor_H
+#include "MacroEditor.h"
+#endif
+
+//=================================================================
+
+MacroRunTask::MacroRunTask(MacroEditor& editor,const Action& action,IconObject* o,bool trace):
+	action_(action),
+	editor_(editor),
+	object_(o),
+	trace_(trace)
+{
+}
+
+MacroRunTask::~MacroRunTask()
+{
+	cout << "MacroRunTask::~MacroRunTask " << *object_ << endl;
+}
+
+void MacroRunTask::start()
+{
+	MvRequest r   = object_->fullRequest();
+	const char* null = 0;
+	Service* service = object_->iconClass().service(action_);
+
+	if(null == r("_NAME"))    r("_NAME")    = object_->fullName().c_str();
+	if(null == r("_CLASS"))   r("_CLASS")   = object_->className().c_str();
+	if(null == r("_ACTION"))  r("_ACTION")  = action_.name().c_str();
+	if(null == r("_SERVICE")) r("_SERVICE") = service->name().c_str();
+
+	r("_TRACE") = trace_;
+
+	cout << " ---> send " << *this << endl;
+	r.print();
+
+	callService(service->name().c_str(),r);
+
+	cout << " <--- send " << *this << endl;
+}
+
+void MacroRunTask::reply(const Request& r,int err)
+{
+	if(err) 
+		Task::failure();
+	else 
+		Task::success(r);
+	
+}
+
+void MacroRunTask::progress(const Request& r)
+{
+}
+
+void MacroRunTask::message(const string& msg)
+{
+	static string cr("\n");
+	if(!stopped_) {
+		editor_.progress(msg);
+		editor_.progress(cr);
+	}
+}
+
+void MacroRunTask::print(ostream& s) const
+{
+  	s << "MacroRunTask[" 
+      << action_.name() 
+	  << ","  
+	  << action_.mode() 
+	  << ","
+      << *object_ 
+	  << "]";
+
+}
+
diff --git a/src/MetviewUI/MacroRunTask.h b/src/MetviewUI/MacroRunTask.h
new file mode 100644
index 0000000..020663b
--- /dev/null
+++ b/src/MetviewUI/MacroRunTask.h
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MacroRunTask.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MacroRunTask_H
+#define MacroRunTask_H
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#include "TaskObserver.h"
+#include "IconObject.h"
+#include "Dependancy.h"
+
+
+class MacroEditor;
+
+
+class MacroRunTask : public Task, public ReplyObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MacroRunTask(MacroEditor&,const Action&,IconObject*,bool);
+
+// -- Destructor
+
+	virtual ~MacroRunTask(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+
+// -- Methods
+	virtual void addContext (const Request&) { };
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	 void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MacroRunTask(const MacroRunTask&);
+	MacroRunTask& operator=(const MacroRunTask&);
+
+// -- Members
+
+	MacroEditor& editor_;
+	Action      action_;
+	IconObjectH object_;
+	bool        trace_;
+
+// -- Methods
+
+
+// -- Overridden methods
+
+	// From Task
+	virtual void start();
+	// From ReplyObserver
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);  
+	virtual void message(const string&);
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MacroRunTask& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MacroRunTask**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MacroRunTask);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Makefile.am b/src/MetviewUI/Makefile.am
new file mode 100644
index 0000000..8e648a3
--- /dev/null
+++ b/src/MetviewUI/Makefile.am
@@ -0,0 +1,419 @@
+
+bin_PROGRAMS = bin/MetviewUI
+
+
+XDFILES=\
+UIAsk.xd \
+UIBoolLine.xd \
+UIColorLine.xd \
+UIColorName.xd \
+UIColourEditor.xd \
+UIConfirm.xd \
+UIEditor.xd \
+UIFamilyEditor.xd \
+UIFileSelection.xd \
+UIFolderWindow.xd \
+UIIconDrawer.xd \
+UIIconHelp.xd  \
+UIIconLine.xd \
+UIIconSelection.xd \
+UILayoutDrawer.xd \
+UILine.xd \
+UINoneLine.xd \
+UIColorHelp.xd \
+UIListHelp.xd \
+UILogWindow.xd \
+UIGridDrawer.xd \
+UIMenuLine.xd \
+UINoEditor.xd \
+UIOutputDrawer.xd \
+UICatalogDrawer.xd \
+UIPaperDrawer.xd \
+UIParamEditor.xd \
+UIRequestPanel.xd \
+UIScaleLine.xd \
+UIScriptHelp.xd \
+UIScrolledText.xd \
+UISimpleEditor.xd \
+UITemplateDrawer.xd \
+UITextEditor.xd \
+UITextLine.xd \
+UISyncFolders.xd \
+UIViewsDrawer.xd \
+UIODBEditor.xd \
+UIODBFunctionsDrawer.xd \
+UISQLDrawer.xd \
+UIViewEditor.xd
+
+XDSRCS=$(XDFILES:.xd=.cc)
+
+SRCS.cc = \
+Action.cc \
+ActionCommand.cc \
+Ask.cc \
+Basic.cc \
+BoolLine.cc \
+ColorLine.cc \
+ColorName.cc \
+ColorHelp.cc \
+ColourEditor.cc \
+Command.cc \
+ComputeEditor.cc \
+ConfigLoader.cc \
+Confirm.cc \
+Counted.cc \
+Dependancy.cc \
+DragWindow.cc \
+Drawer.cc \
+Drop.cc \
+DropSite.cc \
+Dropping.cc \
+MotifDrop.cc \
+EditTransaction.cc \
+Editor.cc \
+EditorDrawer.cc \
+EditorDrawerFactory.cc \
+EditorFactory.cc \
+EditorTool.cc \
+EditorToolFactory.cc \
+ExternalHelp.cc \
+Family.cc \
+FamilyHelper.cc \
+FamilyEditor.cc \
+FileObject.cc \
+FileSelection.cc \
+Folder.cc \
+FolderDrawers.cc \
+FolderViewer.cc  \
+FolderWindow.cc \
+HelpFactory.cc \
+IconClass.cc \
+IconDrawer.cc \
+IconFactory.cc \
+IconHelp.cc \
+IconHolder.cc \
+IconInfo.cc \
+IconLine.cc \
+IconObject.cc \
+IconSelection.cc \
+Input.cc \
+InternalService.cc \
+InternalTask.cc \
+ViewsDrawer.cc \
+Items.cc \
+Language.cc \
+LayoutDrawer.cc \
+LineFactory.cc \
+ListHelp.cc \
+Log.cc \
+TeeBuffer.cc \
+TeeStream.cc \
+LogWindow.cc \
+Netscape.cc \
+Help.cc \
+MacroEditor.cc \
+MacroParam.cc \
+MacroParamEditor.cc \
+MacroParamState.cc \
+MacroRunTask.cc \
+MenuLine.cc \
+NoneLine.cc \
+MessageObserver.cc  \
+MethodCommand.cc \
+MetviewService.cc \
+MetviewTask.cc \
+MetviewUI.cc \
+NoEditor.cc \
+InternalEditor.cc \
+ExternalEditor.cc \
+ExternalTextEditor.cc \
+ExternalServiceEditor.cc \
+BaseTextEditor.cc \
+OutputDrawer.cc \
+CatalogDrawer.cc \
+GridDrawer.cc \
+PageView.cc \
+PaperDrawer.cc \
+ParamList.cc \
+Parameter.cc \
+PlotModHelp.cc \
+Protocol.cc \
+Queue.cc \
+QtMacroEditor.cc \
+QtOgcClientEditor.cc \
+QtScmEditor.cc \
+QtStackedEditor.cc \
+Rainbow.cc \
+Recents.cc \
+ReplyObserver.cc  \
+RequestPanel.cc \
+RequestPanelHelp.cc \
+RequestPanelItem.cc	 \
+RequestPanelLine.cc \
+ResolveTransaction.cc \
+Resources.cc \
+RootFolder.cc \
+ScaleLine.cc \
+ScriptHelp.cc \
+Service.cc \
+ShellService.cc \
+ShellTask.cc \
+SimpleEditor.cc \
+RetrieveEditor.cc \
+ScrolledText.cc \
+State.cc \
+StationaryDrawers.cc \
+SyncFolders.cc  \
+SystemFolder.cc \
+Task.cc \
+TempIconClass.cc \
+TemplateDrawer.cc \
+Temporary.cc \
+TemporaryFolder.cc \
+TextEditor.cc \
+TextLine.cc \
+Timeout.cc \
+Runnable.cc \
+StringLine.cc \
+Tools.cc \
+Transaction.cc \
+Unknown.cc \
+UserMessage.cc \
+ViewEditor.cc \
+ODBEditor.cc \
+SQLDrawer.cc \
+ODBFunctionsDrawer.cc \
+Wastebasket.cc \
+XMLabel.cc \
+XMList.cc \
+XMString.cc \
+XMText.cc \
+XPalette.cc \
+XPixmap.cc \
+XResource.cc \
+main.cc \
+Action.h \
+ActionCommand.h \
+Ask.h \
+BaseTextEditor.h \
+Basic.h \
+BoolLine.h \
+CatalogDrawer.h \
+ColorHelp.h \
+ColorLine.h \
+ColorName.h \
+ColourEditor.h \
+Command.h \
+CommandObserver.h \
+ComputeEditor.h \
+ConfigLoader.h \
+Confirm.h \
+Counted.h \
+Dependancy.h \
+Dialog.h \
+DragWindow.h \
+Drawer.h \
+Drop.h \
+DropSite.h \
+Dropping.h \
+EditTransaction.h \
+Editor.h \
+EditorButton.h \
+EditorDrawer.h \
+EditorDrawerFactory.h \
+EditorFactory.h \
+EditorMsgDrawer.h \
+EditorObserver.h \
+EditorTool.h \
+EditorToolFactory.h \
+Error.h \
+Extent.h \
+ExternalEditor.h \
+ExternalHelp.h \
+ExternalServiceEditor.h \
+ExternalTextEditor.h \
+Family.h \
+FamilyDrawer.h \
+FamilyEditor.h \
+FamilyHelper.h \
+FileObject.h \
+FileSelection.h \
+Folder.h \
+FolderDrawers.h \
+FolderMsgDrawer.h \
+FolderObserver.h \
+FolderView.h \
+FolderViewer.h \
+FolderWindow.h \
+GridDrawer.h \
+HSLMaker.h \
+Help.h \
+HelpFactory.h \
+IconClass.h \
+IconDrawer.h \
+IconFactory.h \
+IconHelp.h \
+IconHolder.h \
+IconInfo.h \
+IconLine.h \
+IconObject.h \
+IconObserver.h \
+IconSelection.h \
+Input.h \
+InternalEditor.h \
+InternalService.h \
+InternalTask.h \
+Items.h \
+Language.h \
+LayoutDrawer.h \
+LineFactory.h \
+ListHelp.h \
+Log.h \
+LogWindow.h \
+MacroEditor.h \
+MacroParam.h \
+MacroParamEditor.h \
+MacroParamState.h \
+MacroRunTask.h \
+MenuLine.h \
+Message.h \
+MessageObserver.h \
+MethodCommand.h \
+MetviewService.h \
+MetviewTask.h \
+MetviewUI.h \
+MotifDrop.h \
+Netscape.h \
+NoEditor.h \
+NoneLine.h \
+ODBEditor.h \
+ODBFunctionsDrawer.h \
+OutputDrawer.h \
+PageView.h \
+PaperDrawer.h \
+ParamList.h \
+Parameter.h \
+PlotModHelp.h \
+Protocol.h \
+QtMacroEditor.h \
+QtOgcClientEditor.h \
+QtScmEditor.h \
+QtStackedEditor.h \
+Queue.h \
+RGBMaker.h \
+Rainbow.h \
+Recents.h \
+ReplyObserver.h \
+RequestPanel.h \
+RequestPanelHelp.h \
+RequestPanelItem.h \
+RequestPanelLine.h \
+ResolveTransaction.h \
+Resources.h \
+RetrieveEditor.h \
+RootFolder.h \
+Runnable.h \
+SQLDrawer.h \
+ScaleLine.h \
+ScriptHelp.h \
+ScrolledText.h \
+Service.h \
+ShellService.h \
+ShellTask.h \
+SimpleDroppin.h \
+SimpleEditor.h \
+SimpleEditorObserver.h \
+Singleton.h \
+State.h \
+StationaryDrawers.h \
+StringLine.h \
+SyncFolders.h \
+SynchFolders.h \
+SystemFolder.h \
+Task.h \
+TaskObserver.h \
+TeeBuffer.h \
+TeeStream.h \
+TempIconClass.h \
+TemplateDrawer.h \
+Temporary.h \
+TemporaryFolder.h \
+TextEditor.h \
+TextLine.h \
+Timeout.h \
+Tools.h \
+Transaction.h \
+UIAsk.h \
+UIBoolLine.h \
+UICatalogDrawer.h \
+UIColorHelp.h \
+UIColorLine.h \
+UIColorName.h \
+UIColourEditor.h \
+UIConfirm.h \
+UIEditor.h \
+UIFamilyEditor.h \
+UIFileSelection.h \
+UIFolderWindow.h \
+UIGridDrawer.h \
+UIIconDrawer.h \
+UIIconHelp.h \
+UIIconLine.h \
+UIIconSelection.h \
+UILayoutDrawer.h \
+UILine.h \
+UIListHelp.h \
+UILogWindow.h \
+UIMenuLine.h \
+UINoEditor.h \
+UINoneLine.h \
+UIODBEditor.h \
+UIODBFunctionsDrawer.h \
+UIOutputDrawer.h \
+UIPaperDrawer.h \
+UIParamEditor.h \
+UIRequestPanel.h \
+UISQLDrawer.h \
+UIScaleLine.h \
+UIScriptHelp.h \
+UIScrolledText.h \
+UISimpleEditor.h \
+UISyncFolders.h \
+UITemplateDrawer.h \
+UITextEditor.h \
+UITextLine.h \
+UIViewEditor.h \
+UIViewsDrawer.h \
+Unknown.h \
+UserMessage.h \
+VariableEditor.h \
+VariableTask.h \
+ViewEditor.h \
+ViewsDrawer.h \
+Wastebasket.h \
+XMLabel.h \
+XMList.h \
+XMString.h \
+XMText.h \
+XPalette.h \
+XPixmap.h \
+XResource.h \
+auto_ptr.h
+
+
+SRCS = $(XDSRCS) $(SRCS.cc)
+
+
+bin_MetviewUI_SOURCES  = $(SRCS)
+bin_MetviewUI_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_MetviewUI_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_MetviewUI_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a ../../lib/libMars.a
+
+EXTRA_DIST = Dialog.cc EditorButton.cc
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
+
+
diff --git a/src/MetviewUI/Makefile.in b/src/MetviewUI/Makefile.in
new file mode 100644
index 0000000..3cea689
--- /dev/null
+++ b/src/MetviewUI/Makefile.in
@@ -0,0 +1,4368 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/MetviewUI$(EXEEXT)
+subdir = src/MetviewUI
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = bin_MetviewUI-UIAsk.$(OBJEXT) \
+	bin_MetviewUI-UIBoolLine.$(OBJEXT) \
+	bin_MetviewUI-UIColorLine.$(OBJEXT) \
+	bin_MetviewUI-UIColorName.$(OBJEXT) \
+	bin_MetviewUI-UIColourEditor.$(OBJEXT) \
+	bin_MetviewUI-UIConfirm.$(OBJEXT) \
+	bin_MetviewUI-UIEditor.$(OBJEXT) \
+	bin_MetviewUI-UIFamilyEditor.$(OBJEXT) \
+	bin_MetviewUI-UIFileSelection.$(OBJEXT) \
+	bin_MetviewUI-UIFolderWindow.$(OBJEXT) \
+	bin_MetviewUI-UIIconDrawer.$(OBJEXT) \
+	bin_MetviewUI-UIIconHelp.$(OBJEXT) \
+	bin_MetviewUI-UIIconLine.$(OBJEXT) \
+	bin_MetviewUI-UIIconSelection.$(OBJEXT) \
+	bin_MetviewUI-UILayoutDrawer.$(OBJEXT) \
+	bin_MetviewUI-UILine.$(OBJEXT) \
+	bin_MetviewUI-UINoneLine.$(OBJEXT) \
+	bin_MetviewUI-UIColorHelp.$(OBJEXT) \
+	bin_MetviewUI-UIListHelp.$(OBJEXT) \
+	bin_MetviewUI-UILogWindow.$(OBJEXT) \
+	bin_MetviewUI-UIGridDrawer.$(OBJEXT) \
+	bin_MetviewUI-UIMenuLine.$(OBJEXT) \
+	bin_MetviewUI-UINoEditor.$(OBJEXT) \
+	bin_MetviewUI-UIOutputDrawer.$(OBJEXT) \
+	bin_MetviewUI-UICatalogDrawer.$(OBJEXT) \
+	bin_MetviewUI-UIPaperDrawer.$(OBJEXT) \
+	bin_MetviewUI-UIParamEditor.$(OBJEXT) \
+	bin_MetviewUI-UIRequestPanel.$(OBJEXT) \
+	bin_MetviewUI-UIScaleLine.$(OBJEXT) \
+	bin_MetviewUI-UIScriptHelp.$(OBJEXT) \
+	bin_MetviewUI-UIScrolledText.$(OBJEXT) \
+	bin_MetviewUI-UISimpleEditor.$(OBJEXT) \
+	bin_MetviewUI-UITemplateDrawer.$(OBJEXT) \
+	bin_MetviewUI-UITextEditor.$(OBJEXT) \
+	bin_MetviewUI-UITextLine.$(OBJEXT) \
+	bin_MetviewUI-UISyncFolders.$(OBJEXT) \
+	bin_MetviewUI-UIViewsDrawer.$(OBJEXT) \
+	bin_MetviewUI-UIODBEditor.$(OBJEXT) \
+	bin_MetviewUI-UIODBFunctionsDrawer.$(OBJEXT) \
+	bin_MetviewUI-UISQLDrawer.$(OBJEXT) \
+	bin_MetviewUI-UIViewEditor.$(OBJEXT)
+am__objects_2 = $(am__objects_1)
+am__objects_3 = bin_MetviewUI-Action.$(OBJEXT) \
+	bin_MetviewUI-ActionCommand.$(OBJEXT) \
+	bin_MetviewUI-Ask.$(OBJEXT) bin_MetviewUI-Basic.$(OBJEXT) \
+	bin_MetviewUI-BoolLine.$(OBJEXT) \
+	bin_MetviewUI-ColorLine.$(OBJEXT) \
+	bin_MetviewUI-ColorName.$(OBJEXT) \
+	bin_MetviewUI-ColorHelp.$(OBJEXT) \
+	bin_MetviewUI-ColourEditor.$(OBJEXT) \
+	bin_MetviewUI-Command.$(OBJEXT) \
+	bin_MetviewUI-ComputeEditor.$(OBJEXT) \
+	bin_MetviewUI-ConfigLoader.$(OBJEXT) \
+	bin_MetviewUI-Confirm.$(OBJEXT) \
+	bin_MetviewUI-Counted.$(OBJEXT) \
+	bin_MetviewUI-Dependancy.$(OBJEXT) \
+	bin_MetviewUI-DragWindow.$(OBJEXT) \
+	bin_MetviewUI-Drawer.$(OBJEXT) bin_MetviewUI-Drop.$(OBJEXT) \
+	bin_MetviewUI-DropSite.$(OBJEXT) \
+	bin_MetviewUI-Dropping.$(OBJEXT) \
+	bin_MetviewUI-MotifDrop.$(OBJEXT) \
+	bin_MetviewUI-EditTransaction.$(OBJEXT) \
+	bin_MetviewUI-Editor.$(OBJEXT) \
+	bin_MetviewUI-EditorDrawer.$(OBJEXT) \
+	bin_MetviewUI-EditorDrawerFactory.$(OBJEXT) \
+	bin_MetviewUI-EditorFactory.$(OBJEXT) \
+	bin_MetviewUI-EditorTool.$(OBJEXT) \
+	bin_MetviewUI-EditorToolFactory.$(OBJEXT) \
+	bin_MetviewUI-ExternalHelp.$(OBJEXT) \
+	bin_MetviewUI-Family.$(OBJEXT) \
+	bin_MetviewUI-FamilyHelper.$(OBJEXT) \
+	bin_MetviewUI-FamilyEditor.$(OBJEXT) \
+	bin_MetviewUI-FileObject.$(OBJEXT) \
+	bin_MetviewUI-FileSelection.$(OBJEXT) \
+	bin_MetviewUI-Folder.$(OBJEXT) \
+	bin_MetviewUI-FolderDrawers.$(OBJEXT) \
+	bin_MetviewUI-FolderViewer.$(OBJEXT) \
+	bin_MetviewUI-FolderWindow.$(OBJEXT) \
+	bin_MetviewUI-HelpFactory.$(OBJEXT) \
+	bin_MetviewUI-IconClass.$(OBJEXT) \
+	bin_MetviewUI-IconDrawer.$(OBJEXT) \
+	bin_MetviewUI-IconFactory.$(OBJEXT) \
+	bin_MetviewUI-IconHelp.$(OBJEXT) \
+	bin_MetviewUI-IconHolder.$(OBJEXT) \
+	bin_MetviewUI-IconInfo.$(OBJEXT) \
+	bin_MetviewUI-IconLine.$(OBJEXT) \
+	bin_MetviewUI-IconObject.$(OBJEXT) \
+	bin_MetviewUI-IconSelection.$(OBJEXT) \
+	bin_MetviewUI-Input.$(OBJEXT) \
+	bin_MetviewUI-InternalService.$(OBJEXT) \
+	bin_MetviewUI-InternalTask.$(OBJEXT) \
+	bin_MetviewUI-ViewsDrawer.$(OBJEXT) \
+	bin_MetviewUI-Items.$(OBJEXT) bin_MetviewUI-Language.$(OBJEXT) \
+	bin_MetviewUI-LayoutDrawer.$(OBJEXT) \
+	bin_MetviewUI-LineFactory.$(OBJEXT) \
+	bin_MetviewUI-ListHelp.$(OBJEXT) bin_MetviewUI-Log.$(OBJEXT) \
+	bin_MetviewUI-TeeBuffer.$(OBJEXT) \
+	bin_MetviewUI-TeeStream.$(OBJEXT) \
+	bin_MetviewUI-LogWindow.$(OBJEXT) \
+	bin_MetviewUI-Netscape.$(OBJEXT) bin_MetviewUI-Help.$(OBJEXT) \
+	bin_MetviewUI-MacroEditor.$(OBJEXT) \
+	bin_MetviewUI-MacroParam.$(OBJEXT) \
+	bin_MetviewUI-MacroParamEditor.$(OBJEXT) \
+	bin_MetviewUI-MacroParamState.$(OBJEXT) \
+	bin_MetviewUI-MacroRunTask.$(OBJEXT) \
+	bin_MetviewUI-MenuLine.$(OBJEXT) \
+	bin_MetviewUI-NoneLine.$(OBJEXT) \
+	bin_MetviewUI-MessageObserver.$(OBJEXT) \
+	bin_MetviewUI-MethodCommand.$(OBJEXT) \
+	bin_MetviewUI-MetviewService.$(OBJEXT) \
+	bin_MetviewUI-MetviewTask.$(OBJEXT) \
+	bin_MetviewUI-MetviewUI.$(OBJEXT) \
+	bin_MetviewUI-NoEditor.$(OBJEXT) \
+	bin_MetviewUI-InternalEditor.$(OBJEXT) \
+	bin_MetviewUI-ExternalEditor.$(OBJEXT) \
+	bin_MetviewUI-ExternalTextEditor.$(OBJEXT) \
+	bin_MetviewUI-ExternalServiceEditor.$(OBJEXT) \
+	bin_MetviewUI-BaseTextEditor.$(OBJEXT) \
+	bin_MetviewUI-OutputDrawer.$(OBJEXT) \
+	bin_MetviewUI-CatalogDrawer.$(OBJEXT) \
+	bin_MetviewUI-GridDrawer.$(OBJEXT) \
+	bin_MetviewUI-PageView.$(OBJEXT) \
+	bin_MetviewUI-PaperDrawer.$(OBJEXT) \
+	bin_MetviewUI-ParamList.$(OBJEXT) \
+	bin_MetviewUI-Parameter.$(OBJEXT) \
+	bin_MetviewUI-PlotModHelp.$(OBJEXT) \
+	bin_MetviewUI-Protocol.$(OBJEXT) bin_MetviewUI-Queue.$(OBJEXT) \
+	bin_MetviewUI-QtMacroEditor.$(OBJEXT) \
+	bin_MetviewUI-QtOgcClientEditor.$(OBJEXT) \
+	bin_MetviewUI-QtScmEditor.$(OBJEXT) \
+	bin_MetviewUI-QtStackedEditor.$(OBJEXT) \
+	bin_MetviewUI-Rainbow.$(OBJEXT) \
+	bin_MetviewUI-Recents.$(OBJEXT) \
+	bin_MetviewUI-ReplyObserver.$(OBJEXT) \
+	bin_MetviewUI-RequestPanel.$(OBJEXT) \
+	bin_MetviewUI-RequestPanelHelp.$(OBJEXT) \
+	bin_MetviewUI-RequestPanelItem.$(OBJEXT) \
+	bin_MetviewUI-RequestPanelLine.$(OBJEXT) \
+	bin_MetviewUI-ResolveTransaction.$(OBJEXT) \
+	bin_MetviewUI-Resources.$(OBJEXT) \
+	bin_MetviewUI-RootFolder.$(OBJEXT) \
+	bin_MetviewUI-ScaleLine.$(OBJEXT) \
+	bin_MetviewUI-ScriptHelp.$(OBJEXT) \
+	bin_MetviewUI-Service.$(OBJEXT) \
+	bin_MetviewUI-ShellService.$(OBJEXT) \
+	bin_MetviewUI-ShellTask.$(OBJEXT) \
+	bin_MetviewUI-SimpleEditor.$(OBJEXT) \
+	bin_MetviewUI-RetrieveEditor.$(OBJEXT) \
+	bin_MetviewUI-ScrolledText.$(OBJEXT) \
+	bin_MetviewUI-State.$(OBJEXT) \
+	bin_MetviewUI-StationaryDrawers.$(OBJEXT) \
+	bin_MetviewUI-SyncFolders.$(OBJEXT) \
+	bin_MetviewUI-SystemFolder.$(OBJEXT) \
+	bin_MetviewUI-Task.$(OBJEXT) \
+	bin_MetviewUI-TempIconClass.$(OBJEXT) \
+	bin_MetviewUI-TemplateDrawer.$(OBJEXT) \
+	bin_MetviewUI-Temporary.$(OBJEXT) \
+	bin_MetviewUI-TemporaryFolder.$(OBJEXT) \
+	bin_MetviewUI-TextEditor.$(OBJEXT) \
+	bin_MetviewUI-TextLine.$(OBJEXT) \
+	bin_MetviewUI-Timeout.$(OBJEXT) \
+	bin_MetviewUI-Runnable.$(OBJEXT) \
+	bin_MetviewUI-StringLine.$(OBJEXT) \
+	bin_MetviewUI-Tools.$(OBJEXT) \
+	bin_MetviewUI-Transaction.$(OBJEXT) \
+	bin_MetviewUI-Unknown.$(OBJEXT) \
+	bin_MetviewUI-UserMessage.$(OBJEXT) \
+	bin_MetviewUI-ViewEditor.$(OBJEXT) \
+	bin_MetviewUI-ODBEditor.$(OBJEXT) \
+	bin_MetviewUI-SQLDrawer.$(OBJEXT) \
+	bin_MetviewUI-ODBFunctionsDrawer.$(OBJEXT) \
+	bin_MetviewUI-Wastebasket.$(OBJEXT) \
+	bin_MetviewUI-XMLabel.$(OBJEXT) bin_MetviewUI-XMList.$(OBJEXT) \
+	bin_MetviewUI-XMString.$(OBJEXT) \
+	bin_MetviewUI-XMText.$(OBJEXT) \
+	bin_MetviewUI-XPalette.$(OBJEXT) \
+	bin_MetviewUI-XPixmap.$(OBJEXT) \
+	bin_MetviewUI-XResource.$(OBJEXT) bin_MetviewUI-main.$(OBJEXT)
+am__objects_4 = $(am__objects_2) $(am__objects_3)
+am_bin_MetviewUI_OBJECTS = $(am__objects_4)
+bin_MetviewUI_OBJECTS = $(am_bin_MetviewUI_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_MetviewUI_SOURCES)
+DIST_SOURCES = $(bin_MetviewUI_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+XDFILES = \
+UIAsk.xd \
+UIBoolLine.xd \
+UIColorLine.xd \
+UIColorName.xd \
+UIColourEditor.xd \
+UIConfirm.xd \
+UIEditor.xd \
+UIFamilyEditor.xd \
+UIFileSelection.xd \
+UIFolderWindow.xd \
+UIIconDrawer.xd \
+UIIconHelp.xd  \
+UIIconLine.xd \
+UIIconSelection.xd \
+UILayoutDrawer.xd \
+UILine.xd \
+UINoneLine.xd \
+UIColorHelp.xd \
+UIListHelp.xd \
+UILogWindow.xd \
+UIGridDrawer.xd \
+UIMenuLine.xd \
+UINoEditor.xd \
+UIOutputDrawer.xd \
+UICatalogDrawer.xd \
+UIPaperDrawer.xd \
+UIParamEditor.xd \
+UIRequestPanel.xd \
+UIScaleLine.xd \
+UIScriptHelp.xd \
+UIScrolledText.xd \
+UISimpleEditor.xd \
+UITemplateDrawer.xd \
+UITextEditor.xd \
+UITextLine.xd \
+UISyncFolders.xd \
+UIViewsDrawer.xd \
+UIODBEditor.xd \
+UIODBFunctionsDrawer.xd \
+UISQLDrawer.xd \
+UIViewEditor.xd
+
+XDSRCS = $(XDFILES:.xd=.cc)
+SRCS.cc = \
+Action.cc \
+ActionCommand.cc \
+Ask.cc \
+Basic.cc \
+BoolLine.cc \
+ColorLine.cc \
+ColorName.cc \
+ColorHelp.cc \
+ColourEditor.cc \
+Command.cc \
+ComputeEditor.cc \
+ConfigLoader.cc \
+Confirm.cc \
+Counted.cc \
+Dependancy.cc \
+DragWindow.cc \
+Drawer.cc \
+Drop.cc \
+DropSite.cc \
+Dropping.cc \
+MotifDrop.cc \
+EditTransaction.cc \
+Editor.cc \
+EditorDrawer.cc \
+EditorDrawerFactory.cc \
+EditorFactory.cc \
+EditorTool.cc \
+EditorToolFactory.cc \
+ExternalHelp.cc \
+Family.cc \
+FamilyHelper.cc \
+FamilyEditor.cc \
+FileObject.cc \
+FileSelection.cc \
+Folder.cc \
+FolderDrawers.cc \
+FolderViewer.cc  \
+FolderWindow.cc \
+HelpFactory.cc \
+IconClass.cc \
+IconDrawer.cc \
+IconFactory.cc \
+IconHelp.cc \
+IconHolder.cc \
+IconInfo.cc \
+IconLine.cc \
+IconObject.cc \
+IconSelection.cc \
+Input.cc \
+InternalService.cc \
+InternalTask.cc \
+ViewsDrawer.cc \
+Items.cc \
+Language.cc \
+LayoutDrawer.cc \
+LineFactory.cc \
+ListHelp.cc \
+Log.cc \
+TeeBuffer.cc \
+TeeStream.cc \
+LogWindow.cc \
+Netscape.cc \
+Help.cc \
+MacroEditor.cc \
+MacroParam.cc \
+MacroParamEditor.cc \
+MacroParamState.cc \
+MacroRunTask.cc \
+MenuLine.cc \
+NoneLine.cc \
+MessageObserver.cc  \
+MethodCommand.cc \
+MetviewService.cc \
+MetviewTask.cc \
+MetviewUI.cc \
+NoEditor.cc \
+InternalEditor.cc \
+ExternalEditor.cc \
+ExternalTextEditor.cc \
+ExternalServiceEditor.cc \
+BaseTextEditor.cc \
+OutputDrawer.cc \
+CatalogDrawer.cc \
+GridDrawer.cc \
+PageView.cc \
+PaperDrawer.cc \
+ParamList.cc \
+Parameter.cc \
+PlotModHelp.cc \
+Protocol.cc \
+Queue.cc \
+QtMacroEditor.cc \
+QtOgcClientEditor.cc \
+QtScmEditor.cc \
+QtStackedEditor.cc \
+Rainbow.cc \
+Recents.cc \
+ReplyObserver.cc  \
+RequestPanel.cc \
+RequestPanelHelp.cc \
+RequestPanelItem.cc	 \
+RequestPanelLine.cc \
+ResolveTransaction.cc \
+Resources.cc \
+RootFolder.cc \
+ScaleLine.cc \
+ScriptHelp.cc \
+Service.cc \
+ShellService.cc \
+ShellTask.cc \
+SimpleEditor.cc \
+RetrieveEditor.cc \
+ScrolledText.cc \
+State.cc \
+StationaryDrawers.cc \
+SyncFolders.cc  \
+SystemFolder.cc \
+Task.cc \
+TempIconClass.cc \
+TemplateDrawer.cc \
+Temporary.cc \
+TemporaryFolder.cc \
+TextEditor.cc \
+TextLine.cc \
+Timeout.cc \
+Runnable.cc \
+StringLine.cc \
+Tools.cc \
+Transaction.cc \
+Unknown.cc \
+UserMessage.cc \
+ViewEditor.cc \
+ODBEditor.cc \
+SQLDrawer.cc \
+ODBFunctionsDrawer.cc \
+Wastebasket.cc \
+XMLabel.cc \
+XMList.cc \
+XMString.cc \
+XMText.cc \
+XPalette.cc \
+XPixmap.cc \
+XResource.cc \
+main.cc \
+Action.h \
+ActionCommand.h \
+Ask.h \
+BaseTextEditor.h \
+Basic.h \
+BoolLine.h \
+CatalogDrawer.h \
+ColorHelp.h \
+ColorLine.h \
+ColorName.h \
+ColourEditor.h \
+Command.h \
+CommandObserver.h \
+ComputeEditor.h \
+ConfigLoader.h \
+Confirm.h \
+Counted.h \
+Dependancy.h \
+Dialog.h \
+DragWindow.h \
+Drawer.h \
+Drop.h \
+DropSite.h \
+Dropping.h \
+EditTransaction.h \
+Editor.h \
+EditorButton.h \
+EditorDrawer.h \
+EditorDrawerFactory.h \
+EditorFactory.h \
+EditorMsgDrawer.h \
+EditorObserver.h \
+EditorTool.h \
+EditorToolFactory.h \
+Error.h \
+Extent.h \
+ExternalEditor.h \
+ExternalHelp.h \
+ExternalServiceEditor.h \
+ExternalTextEditor.h \
+Family.h \
+FamilyDrawer.h \
+FamilyEditor.h \
+FamilyHelper.h \
+FileObject.h \
+FileSelection.h \
+Folder.h \
+FolderDrawers.h \
+FolderMsgDrawer.h \
+FolderObserver.h \
+FolderView.h \
+FolderViewer.h \
+FolderWindow.h \
+GridDrawer.h \
+HSLMaker.h \
+Help.h \
+HelpFactory.h \
+IconClass.h \
+IconDrawer.h \
+IconFactory.h \
+IconHelp.h \
+IconHolder.h \
+IconInfo.h \
+IconLine.h \
+IconObject.h \
+IconObserver.h \
+IconSelection.h \
+Input.h \
+InternalEditor.h \
+InternalService.h \
+InternalTask.h \
+Items.h \
+Language.h \
+LayoutDrawer.h \
+LineFactory.h \
+ListHelp.h \
+Log.h \
+LogWindow.h \
+MacroEditor.h \
+MacroParam.h \
+MacroParamEditor.h \
+MacroParamState.h \
+MacroRunTask.h \
+MenuLine.h \
+Message.h \
+MessageObserver.h \
+MethodCommand.h \
+MetviewService.h \
+MetviewTask.h \
+MetviewUI.h \
+MotifDrop.h \
+Netscape.h \
+NoEditor.h \
+NoneLine.h \
+ODBEditor.h \
+ODBFunctionsDrawer.h \
+OutputDrawer.h \
+PageView.h \
+PaperDrawer.h \
+ParamList.h \
+Parameter.h \
+PlotModHelp.h \
+Protocol.h \
+QtMacroEditor.h \
+QtOgcClientEditor.h \
+QtScmEditor.h \
+QtStackedEditor.h \
+Queue.h \
+RGBMaker.h \
+Rainbow.h \
+Recents.h \
+ReplyObserver.h \
+RequestPanel.h \
+RequestPanelHelp.h \
+RequestPanelItem.h \
+RequestPanelLine.h \
+ResolveTransaction.h \
+Resources.h \
+RetrieveEditor.h \
+RootFolder.h \
+Runnable.h \
+SQLDrawer.h \
+ScaleLine.h \
+ScriptHelp.h \
+ScrolledText.h \
+Service.h \
+ShellService.h \
+ShellTask.h \
+SimpleDroppin.h \
+SimpleEditor.h \
+SimpleEditorObserver.h \
+Singleton.h \
+State.h \
+StationaryDrawers.h \
+StringLine.h \
+SyncFolders.h \
+SynchFolders.h \
+SystemFolder.h \
+Task.h \
+TaskObserver.h \
+TeeBuffer.h \
+TeeStream.h \
+TempIconClass.h \
+TemplateDrawer.h \
+Temporary.h \
+TemporaryFolder.h \
+TextEditor.h \
+TextLine.h \
+Timeout.h \
+Tools.h \
+Transaction.h \
+UIAsk.h \
+UIBoolLine.h \
+UICatalogDrawer.h \
+UIColorHelp.h \
+UIColorLine.h \
+UIColorName.h \
+UIColourEditor.h \
+UIConfirm.h \
+UIEditor.h \
+UIFamilyEditor.h \
+UIFileSelection.h \
+UIFolderWindow.h \
+UIGridDrawer.h \
+UIIconDrawer.h \
+UIIconHelp.h \
+UIIconLine.h \
+UIIconSelection.h \
+UILayoutDrawer.h \
+UILine.h \
+UIListHelp.h \
+UILogWindow.h \
+UIMenuLine.h \
+UINoEditor.h \
+UINoneLine.h \
+UIODBEditor.h \
+UIODBFunctionsDrawer.h \
+UIOutputDrawer.h \
+UIPaperDrawer.h \
+UIParamEditor.h \
+UIRequestPanel.h \
+UISQLDrawer.h \
+UIScaleLine.h \
+UIScriptHelp.h \
+UIScrolledText.h \
+UISimpleEditor.h \
+UISyncFolders.h \
+UITemplateDrawer.h \
+UITextEditor.h \
+UITextLine.h \
+UIViewEditor.h \
+UIViewsDrawer.h \
+Unknown.h \
+UserMessage.h \
+VariableEditor.h \
+VariableTask.h \
+ViewEditor.h \
+ViewsDrawer.h \
+Wastebasket.h \
+XMLabel.h \
+XMList.h \
+XMString.h \
+XMText.h \
+XPalette.h \
+XPixmap.h \
+XResource.h \
+auto_ptr.h
+
+SRCS = $(XDSRCS) $(SRCS.cc)
+bin_MetviewUI_SOURCES = $(SRCS)
+bin_MetviewUI_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_MetviewUI_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_MetviewUI_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a ../../lib/libMars.a
+EXTRA_DIST = Dialog.cc EditorButton.cc
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/MetviewUI/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/MetviewUI/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/MetviewUI$(EXEEXT): $(bin_MetviewUI_OBJECTS) $(bin_MetviewUI_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/MetviewUI$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_MetviewUI_OBJECTS) $(bin_MetviewUI_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Action.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ActionCommand.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Ask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-BaseTextEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Basic.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-BoolLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-CatalogDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ColorHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ColorLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ColorName.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ColourEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Command.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ComputeEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ConfigLoader.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Confirm.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Counted.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Dependancy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-DragWindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Drawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Drop.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-DropSite.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Dropping.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-EditTransaction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Editor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-EditorDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-EditorFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-EditorTool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-EditorToolFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ExternalEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ExternalHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Family.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FamilyEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FamilyHelper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FileObject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FileSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Folder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FolderDrawers.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FolderViewer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-FolderWindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-GridDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Help.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-HelpFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconClass.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconHolder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconObject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-IconSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Input.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-InternalEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-InternalService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-InternalTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Items.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Language.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-LayoutDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-LineFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ListHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Log.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-LogWindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MacroEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MacroParam.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MacroParamEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MacroParamState.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MacroRunTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MenuLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MessageObserver.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MethodCommand.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MetviewService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MetviewTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MetviewUI.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-MotifDrop.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Netscape.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-NoEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-NoneLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ODBEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-OutputDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-PageView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-PaperDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ParamList.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Parameter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-PlotModHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Protocol.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-QtMacroEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-QtScmEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-QtStackedEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Queue.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Rainbow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Recents.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ReplyObserver.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-RequestPanel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-RequestPanelItem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-RequestPanelLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ResolveTransaction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Resources.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-RetrieveEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-RootFolder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Runnable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-SQLDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ScaleLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ScriptHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ScrolledText.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Service.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ShellService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ShellTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-SimpleEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-State.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-StationaryDrawers.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-StringLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-SyncFolders.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-SystemFolder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Task.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TeeBuffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TeeStream.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TempIconClass.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TemplateDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Temporary.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TemporaryFolder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TextEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-TextLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Timeout.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Tools.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Transaction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIAsk.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIBoolLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIColorHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIColorLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIColorName.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIColourEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIConfirm.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIFileSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIFolderWindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIGridDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIIconDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIIconHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIIconLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIIconSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UILine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIListHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UILogWindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIMenuLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UINoEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UINoneLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIODBEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIParamEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIRequestPanel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UISQLDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIScaleLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIScriptHelp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIScrolledText.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UISimpleEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UISyncFolders.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UITextEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UITextLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIViewEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Unknown.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-UserMessage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ViewEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-ViewsDrawer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-Wastebasket.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XMLabel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XMList.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XMString.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XMText.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XPalette.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XPixmap.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-XResource.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_MetviewUI-main.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_MetviewUI-UIAsk.o: UIAsk.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIAsk.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIAsk.Tpo -c -o bin_MetviewUI-UIAsk.o `test -f 'UIAsk.cc' || echo '$(srcdir)/'`UIAsk.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIAsk.Tpo $(DEPDIR)/bin_MetviewUI-UIAsk.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIAsk.cc' object='bin_MetviewUI-UIAsk.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIAsk.o `test -f 'UIAsk.cc' || echo '$(srcdir)/'`UIAsk.cc
+
+bin_MetviewUI-UIAsk.obj: UIAsk.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIAsk.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIAsk.Tpo -c -o bin_MetviewUI-UIAsk.obj `if test -f 'UIAsk.cc'; then $(CYGPATH_W) 'UIAsk.cc'; else $(CYGPATH_W) '$(srcdir)/UIAsk.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIAsk.Tpo $(DEPDIR)/bin_MetviewUI-UIAsk.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIAsk.cc' object='bin_MetviewUI-UIAsk.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIAsk.obj `if test -f 'UIAsk.cc'; then $(CYGPATH_W) 'UIAsk.cc'; else $(CYGPATH_W) '$(srcdir)/UIAsk.cc'; fi`
+
+bin_MetviewUI-UIBoolLine.o: UIBoolLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIBoolLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIBoolLine.Tpo -c -o bin_MetviewUI-UIBoolLine.o `test -f 'UIBoolLine.cc' || echo '$(srcdir)/'`UIBoolLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIBoolLine.Tpo $(DEPDIR)/bin_MetviewUI-UIBoolLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIBoolLine.cc' object='bin_MetviewUI-UIBoolLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIBoolLine.o `test -f 'UIBoolLine.cc' || echo '$(srcdir)/'`UIBoolLine.cc
+
+bin_MetviewUI-UIBoolLine.obj: UIBoolLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIBoolLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIBoolLine.Tpo -c -o bin_MetviewUI-UIBoolLine.obj `if test -f 'UIBoolLine.cc'; then $(CYGPATH_W) 'UIBoolLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIBoolLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIBoolLine.Tpo $(DEPDIR)/bin_MetviewUI-UIBoolLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIBoolLine.cc' object='bin_MetviewUI-UIBoolLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIBoolLine.obj `if test -f 'UIBoolLine.cc'; then $(CYGPATH_W) 'UIBoolLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIBoolLine.cc'; fi`
+
+bin_MetviewUI-UIColorLine.o: UIColorLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColorLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColorLine.Tpo -c -o bin_MetviewUI-UIColorLine.o `test -f 'UIColorLine.cc' || echo '$(srcdir)/'`UIColorLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColorLine.Tpo $(DEPDIR)/bin_MetviewUI-UIColorLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColorLine.cc' object='bin_MetviewUI-UIColorLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColorLine.o `test -f 'UIColorLine.cc' || echo '$(srcdir)/'`UIColorLine.cc
+
+bin_MetviewUI-UIColorLine.obj: UIColorLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColorLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColorLine.Tpo -c -o bin_MetviewUI-UIColorLine.obj `if test -f 'UIColorLine.cc'; then $(CYGPATH_W) 'UIColorLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIColorLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColorLine.Tpo $(DEPDIR)/bin_MetviewUI-UIColorLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColorLine.cc' object='bin_MetviewUI-UIColorLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColorLine.obj `if test -f 'UIColorLine.cc'; then $(CYGPATH_W) 'UIColorLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIColorLine.cc'; fi`
+
+bin_MetviewUI-UIColorName.o: UIColorName.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColorName.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColorName.Tpo -c -o bin_MetviewUI-UIColorName.o `test -f 'UIColorName.cc' || echo '$(srcdir)/'`UIColorName.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColorName.Tpo $(DEPDIR)/bin_MetviewUI-UIColorName.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColorName.cc' object='bin_MetviewUI-UIColorName.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColorName.o `test -f 'UIColorName.cc' || echo '$(srcdir)/'`UIColorName.cc
+
+bin_MetviewUI-UIColorName.obj: UIColorName.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColorName.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColorName.Tpo -c -o bin_MetviewUI-UIColorName.obj `if test -f 'UIColorName.cc'; then $(CYGPATH_W) 'UIColorName.cc'; else $(CYGPATH_W) '$(srcdir)/UIColorName.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColorName.Tpo $(DEPDIR)/bin_MetviewUI-UIColorName.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColorName.cc' object='bin_MetviewUI-UIColorName.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColorName.obj `if test -f 'UIColorName.cc'; then $(CYGPATH_W) 'UIColorName.cc'; else $(CYGPATH_W) '$(srcdir)/UIColorName.cc'; fi`
+
+bin_MetviewUI-UIColourEditor.o: UIColourEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColourEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColourEditor.Tpo -c -o bin_MetviewUI-UIColourEditor.o `test -f 'UIColourEditor.cc' || echo '$(srcdir)/'`UIColourEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColourEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIColourEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColourEditor.cc' object='bin_MetviewUI-UIColourEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColourEditor.o `test -f 'UIColourEditor.cc' || echo '$(srcdir)/'`UIColourEditor.cc
+
+bin_MetviewUI-UIColourEditor.obj: UIColourEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColourEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColourEditor.Tpo -c -o bin_MetviewUI-UIColourEditor.obj `if test -f 'UIColourEditor.cc'; then $(CYGPATH_W) 'UIColourEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIColourEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColourEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIColourEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColourEditor.cc' object='bin_MetviewUI-UIColourEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColourEditor.obj `if test -f 'UIColourEditor.cc'; then $(CYGPATH_W) 'UIColourEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIColourEditor.cc'; fi`
+
+bin_MetviewUI-UIConfirm.o: UIConfirm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIConfirm.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIConfirm.Tpo -c -o bin_MetviewUI-UIConfirm.o `test -f 'UIConfirm.cc' || echo '$(srcdir)/'`UIConfirm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIConfirm.Tpo $(DEPDIR)/bin_MetviewUI-UIConfirm.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIConfirm.cc' object='bin_MetviewUI-UIConfirm.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIConfirm.o `test -f 'UIConfirm.cc' || echo '$(srcdir)/'`UIConfirm.cc
+
+bin_MetviewUI-UIConfirm.obj: UIConfirm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIConfirm.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIConfirm.Tpo -c -o bin_MetviewUI-UIConfirm.obj `if test -f 'UIConfirm.cc'; then $(CYGPATH_W) 'UIConfirm.cc'; else $(CYGPATH_W) '$(srcdir)/UIConfirm.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIConfirm.Tpo $(DEPDIR)/bin_MetviewUI-UIConfirm.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIConfirm.cc' object='bin_MetviewUI-UIConfirm.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIConfirm.obj `if test -f 'UIConfirm.cc'; then $(CYGPATH_W) 'UIConfirm.cc'; else $(CYGPATH_W) '$(srcdir)/UIConfirm.cc'; fi`
+
+bin_MetviewUI-UIEditor.o: UIEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIEditor.Tpo -c -o bin_MetviewUI-UIEditor.o `test -f 'UIEditor.cc' || echo '$(srcdir)/'`UIEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIEditor.cc' object='bin_MetviewUI-UIEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIEditor.o `test -f 'UIEditor.cc' || echo '$(srcdir)/'`UIEditor.cc
+
+bin_MetviewUI-UIEditor.obj: UIEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIEditor.Tpo -c -o bin_MetviewUI-UIEditor.obj `if test -f 'UIEditor.cc'; then $(CYGPATH_W) 'UIEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIEditor.cc' object='bin_MetviewUI-UIEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIEditor.obj `if test -f 'UIEditor.cc'; then $(CYGPATH_W) 'UIEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIEditor.cc'; fi`
+
+bin_MetviewUI-UIFamilyEditor.o: UIFamilyEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIFamilyEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Tpo -c -o bin_MetviewUI-UIFamilyEditor.o `test -f 'UIFamilyEditor.cc' || echo '$(srcdir)/'`UIFamilyEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIFamilyEditor.cc' object='bin_MetviewUI-UIFamilyEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIFamilyEditor.o `test -f 'UIFamilyEditor.cc' || echo '$(srcdir)/'`UIFamilyEditor.cc
+
+bin_MetviewUI-UIFamilyEditor.obj: UIFamilyEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIFamilyEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Tpo -c -o bin_MetviewUI-UIFamilyEditor.obj `if test -f 'UIFamilyEditor.cc'; then $(CYGPATH_W) 'UIFamilyEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIFamilyEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIFamilyEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIFamilyEditor.cc' object='bin_MetviewUI-UIFamilyEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIFamilyEditor.obj `if test -f 'UIFamilyEditor.cc'; then $(CYGPATH_W) 'UIFamilyEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIFamilyEditor.cc'; fi`
+
+bin_MetviewUI-UIFileSelection.o: UIFileSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIFileSelection.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIFileSelection.Tpo -c -o bin_MetviewUI-UIFileSelection.o `test -f 'UIFileSelection.cc' || echo '$(srcdir)/'`UIFileSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIFileSelection.Tpo $(DEPDIR)/bin_MetviewUI-UIFileSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIFileSelection.cc' object='bin_MetviewUI-UIFileSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIFileSelection.o `test -f 'UIFileSelection.cc' || echo '$(srcdir)/'`UIFileSelection.cc
+
+bin_MetviewUI-UIFileSelection.obj: UIFileSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIFileSelection.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIFileSelection.Tpo -c -o bin_MetviewUI-UIFileSelection.obj `if test -f 'UIFileSelection.cc'; then $(CYGPATH_W) 'UIFileSelection.cc'; else $(CYGPATH_W) '$(srcdir)/UIFileSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIFileSelection.Tpo $(DEPDIR)/bin_MetviewUI-UIFileSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIFileSelection.cc' object='bin_MetviewUI-UIFileSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIFileSelection.obj `if test -f 'UIFileSelection.cc'; then $(CYGPATH_W) 'UIFileSelection.cc'; else $(CYGPATH_W) '$(srcdir)/UIFileSelection.cc'; fi`
+
+bin_MetviewUI-UIFolderWindow.o: UIFolderWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIFolderWindow.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIFolderWindow.Tpo -c -o bin_MetviewUI-UIFolderWindow.o `test -f 'UIFolderWindow.cc' || echo '$(srcdir)/'`UIFolderWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIFolderWindow.Tpo $(DEPDIR)/bin_MetviewUI-UIFolderWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIFolderWindow.cc' object='bin_MetviewUI-UIFolderWindow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIFolderWindow.o `test -f 'UIFolderWindow.cc' || echo '$(srcdir)/'`UIFolderWindow.cc
+
+bin_MetviewUI-UIFolderWindow.obj: UIFolderWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIFolderWindow.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIFolderWindow.Tpo -c -o bin_MetviewUI-UIFolderWindow.obj `if test -f 'UIFolderWindow.cc'; then $(CYGPATH_W) 'UIFolderWindow.cc'; else $(CYGPATH_W) '$(srcdir)/UIFolderWindow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIFolderWindow.Tpo $(DEPDIR)/bin_MetviewUI-UIFolderWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIFolderWindow.cc' object='bin_MetviewUI-UIFolderWindow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIFolderWindow.obj `if test -f 'UIFolderWindow.cc'; then $(CYGPATH_W) 'UIFolderWindow.cc'; else $(CYGPATH_W) '$(srcdir)/UIFolderWindow.cc'; fi`
+
+bin_MetviewUI-UIIconDrawer.o: UIIconDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconDrawer.Tpo -c -o bin_MetviewUI-UIIconDrawer.o `test -f 'UIIconDrawer.cc' || echo '$(srcdir)/'`UIIconDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIIconDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconDrawer.cc' object='bin_MetviewUI-UIIconDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconDrawer.o `test -f 'UIIconDrawer.cc' || echo '$(srcdir)/'`UIIconDrawer.cc
+
+bin_MetviewUI-UIIconDrawer.obj: UIIconDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconDrawer.Tpo -c -o bin_MetviewUI-UIIconDrawer.obj `if test -f 'UIIconDrawer.cc'; then $(CYGPATH_W) 'UIIconDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIIconDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconDrawer.cc' object='bin_MetviewUI-UIIconDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconDrawer.obj `if test -f 'UIIconDrawer.cc'; then $(CYGPATH_W) 'UIIconDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconDrawer.cc'; fi`
+
+bin_MetviewUI-UIIconHelp.o: UIIconHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconHelp.Tpo -c -o bin_MetviewUI-UIIconHelp.o `test -f 'UIIconHelp.cc' || echo '$(srcdir)/'`UIIconHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIIconHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconHelp.cc' object='bin_MetviewUI-UIIconHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconHelp.o `test -f 'UIIconHelp.cc' || echo '$(srcdir)/'`UIIconHelp.cc
+
+bin_MetviewUI-UIIconHelp.obj: UIIconHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconHelp.Tpo -c -o bin_MetviewUI-UIIconHelp.obj `if test -f 'UIIconHelp.cc'; then $(CYGPATH_W) 'UIIconHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIIconHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconHelp.cc' object='bin_MetviewUI-UIIconHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconHelp.obj `if test -f 'UIIconHelp.cc'; then $(CYGPATH_W) 'UIIconHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconHelp.cc'; fi`
+
+bin_MetviewUI-UIIconLine.o: UIIconLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconLine.Tpo -c -o bin_MetviewUI-UIIconLine.o `test -f 'UIIconLine.cc' || echo '$(srcdir)/'`UIIconLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconLine.Tpo $(DEPDIR)/bin_MetviewUI-UIIconLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconLine.cc' object='bin_MetviewUI-UIIconLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconLine.o `test -f 'UIIconLine.cc' || echo '$(srcdir)/'`UIIconLine.cc
+
+bin_MetviewUI-UIIconLine.obj: UIIconLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconLine.Tpo -c -o bin_MetviewUI-UIIconLine.obj `if test -f 'UIIconLine.cc'; then $(CYGPATH_W) 'UIIconLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconLine.Tpo $(DEPDIR)/bin_MetviewUI-UIIconLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconLine.cc' object='bin_MetviewUI-UIIconLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconLine.obj `if test -f 'UIIconLine.cc'; then $(CYGPATH_W) 'UIIconLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconLine.cc'; fi`
+
+bin_MetviewUI-UIIconSelection.o: UIIconSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconSelection.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconSelection.Tpo -c -o bin_MetviewUI-UIIconSelection.o `test -f 'UIIconSelection.cc' || echo '$(srcdir)/'`UIIconSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconSelection.Tpo $(DEPDIR)/bin_MetviewUI-UIIconSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconSelection.cc' object='bin_MetviewUI-UIIconSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconSelection.o `test -f 'UIIconSelection.cc' || echo '$(srcdir)/'`UIIconSelection.cc
+
+bin_MetviewUI-UIIconSelection.obj: UIIconSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIIconSelection.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIIconSelection.Tpo -c -o bin_MetviewUI-UIIconSelection.obj `if test -f 'UIIconSelection.cc'; then $(CYGPATH_W) 'UIIconSelection.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIIconSelection.Tpo $(DEPDIR)/bin_MetviewUI-UIIconSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIIconSelection.cc' object='bin_MetviewUI-UIIconSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIIconSelection.obj `if test -f 'UIIconSelection.cc'; then $(CYGPATH_W) 'UIIconSelection.cc'; else $(CYGPATH_W) '$(srcdir)/UIIconSelection.cc'; fi`
+
+bin_MetviewUI-UILayoutDrawer.o: UILayoutDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UILayoutDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Tpo -c -o bin_MetviewUI-UILayoutDrawer.o `test -f 'UILayoutDrawer.cc' || echo '$(srcdir)/'`UILayoutDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UILayoutDrawer.cc' object='bin_MetviewUI-UILayoutDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UILayoutDrawer.o `test -f 'UILayoutDrawer.cc' || echo '$(srcdir)/'`UILayoutDrawer.cc
+
+bin_MetviewUI-UILayoutDrawer.obj: UILayoutDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UILayoutDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Tpo -c -o bin_MetviewUI-UILayoutDrawer.obj `if test -f 'UILayoutDrawer.cc'; then $(CYGPATH_W) 'UILayoutDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UILayoutDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UILayoutDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UILayoutDrawer.cc' object='bin_MetviewUI-UILayoutDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UILayoutDrawer.obj `if test -f 'UILayoutDrawer.cc'; then $(CYGPATH_W) 'UILayoutDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UILayoutDrawer.cc'; fi`
+
+bin_MetviewUI-UILine.o: UILine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UILine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UILine.Tpo -c -o bin_MetviewUI-UILine.o `test -f 'UILine.cc' || echo '$(srcdir)/'`UILine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UILine.Tpo $(DEPDIR)/bin_MetviewUI-UILine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UILine.cc' object='bin_MetviewUI-UILine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UILine.o `test -f 'UILine.cc' || echo '$(srcdir)/'`UILine.cc
+
+bin_MetviewUI-UILine.obj: UILine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UILine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UILine.Tpo -c -o bin_MetviewUI-UILine.obj `if test -f 'UILine.cc'; then $(CYGPATH_W) 'UILine.cc'; else $(CYGPATH_W) '$(srcdir)/UILine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UILine.Tpo $(DEPDIR)/bin_MetviewUI-UILine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UILine.cc' object='bin_MetviewUI-UILine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UILine.obj `if test -f 'UILine.cc'; then $(CYGPATH_W) 'UILine.cc'; else $(CYGPATH_W) '$(srcdir)/UILine.cc'; fi`
+
+bin_MetviewUI-UINoneLine.o: UINoneLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UINoneLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UINoneLine.Tpo -c -o bin_MetviewUI-UINoneLine.o `test -f 'UINoneLine.cc' || echo '$(srcdir)/'`UINoneLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UINoneLine.Tpo $(DEPDIR)/bin_MetviewUI-UINoneLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UINoneLine.cc' object='bin_MetviewUI-UINoneLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UINoneLine.o `test -f 'UINoneLine.cc' || echo '$(srcdir)/'`UINoneLine.cc
+
+bin_MetviewUI-UINoneLine.obj: UINoneLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UINoneLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UINoneLine.Tpo -c -o bin_MetviewUI-UINoneLine.obj `if test -f 'UINoneLine.cc'; then $(CYGPATH_W) 'UINoneLine.cc'; else $(CYGPATH_W) '$(srcdir)/UINoneLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UINoneLine.Tpo $(DEPDIR)/bin_MetviewUI-UINoneLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UINoneLine.cc' object='bin_MetviewUI-UINoneLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UINoneLine.obj `if test -f 'UINoneLine.cc'; then $(CYGPATH_W) 'UINoneLine.cc'; else $(CYGPATH_W) '$(srcdir)/UINoneLine.cc'; fi`
+
+bin_MetviewUI-UIColorHelp.o: UIColorHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColorHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColorHelp.Tpo -c -o bin_MetviewUI-UIColorHelp.o `test -f 'UIColorHelp.cc' || echo '$(srcdir)/'`UIColorHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColorHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIColorHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColorHelp.cc' object='bin_MetviewUI-UIColorHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColorHelp.o `test -f 'UIColorHelp.cc' || echo '$(srcdir)/'`UIColorHelp.cc
+
+bin_MetviewUI-UIColorHelp.obj: UIColorHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIColorHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIColorHelp.Tpo -c -o bin_MetviewUI-UIColorHelp.obj `if test -f 'UIColorHelp.cc'; then $(CYGPATH_W) 'UIColorHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIColorHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIColorHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIColorHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIColorHelp.cc' object='bin_MetviewUI-UIColorHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIColorHelp.obj `if test -f 'UIColorHelp.cc'; then $(CYGPATH_W) 'UIColorHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIColorHelp.cc'; fi`
+
+bin_MetviewUI-UIListHelp.o: UIListHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIListHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIListHelp.Tpo -c -o bin_MetviewUI-UIListHelp.o `test -f 'UIListHelp.cc' || echo '$(srcdir)/'`UIListHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIListHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIListHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIListHelp.cc' object='bin_MetviewUI-UIListHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIListHelp.o `test -f 'UIListHelp.cc' || echo '$(srcdir)/'`UIListHelp.cc
+
+bin_MetviewUI-UIListHelp.obj: UIListHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIListHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIListHelp.Tpo -c -o bin_MetviewUI-UIListHelp.obj `if test -f 'UIListHelp.cc'; then $(CYGPATH_W) 'UIListHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIListHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIListHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIListHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIListHelp.cc' object='bin_MetviewUI-UIListHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIListHelp.obj `if test -f 'UIListHelp.cc'; then $(CYGPATH_W) 'UIListHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIListHelp.cc'; fi`
+
+bin_MetviewUI-UILogWindow.o: UILogWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UILogWindow.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UILogWindow.Tpo -c -o bin_MetviewUI-UILogWindow.o `test -f 'UILogWindow.cc' || echo '$(srcdir)/'`UILogWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UILogWindow.Tpo $(DEPDIR)/bin_MetviewUI-UILogWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UILogWindow.cc' object='bin_MetviewUI-UILogWindow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UILogWindow.o `test -f 'UILogWindow.cc' || echo '$(srcdir)/'`UILogWindow.cc
+
+bin_MetviewUI-UILogWindow.obj: UILogWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UILogWindow.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UILogWindow.Tpo -c -o bin_MetviewUI-UILogWindow.obj `if test -f 'UILogWindow.cc'; then $(CYGPATH_W) 'UILogWindow.cc'; else $(CYGPATH_W) '$(srcdir)/UILogWindow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UILogWindow.Tpo $(DEPDIR)/bin_MetviewUI-UILogWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UILogWindow.cc' object='bin_MetviewUI-UILogWindow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UILogWindow.obj `if test -f 'UILogWindow.cc'; then $(CYGPATH_W) 'UILogWindow.cc'; else $(CYGPATH_W) '$(srcdir)/UILogWindow.cc'; fi`
+
+bin_MetviewUI-UIGridDrawer.o: UIGridDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIGridDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIGridDrawer.Tpo -c -o bin_MetviewUI-UIGridDrawer.o `test -f 'UIGridDrawer.cc' || echo '$(srcdir)/'`UIGridDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIGridDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIGridDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIGridDrawer.cc' object='bin_MetviewUI-UIGridDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIGridDrawer.o `test -f 'UIGridDrawer.cc' || echo '$(srcdir)/'`UIGridDrawer.cc
+
+bin_MetviewUI-UIGridDrawer.obj: UIGridDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIGridDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIGridDrawer.Tpo -c -o bin_MetviewUI-UIGridDrawer.obj `if test -f 'UIGridDrawer.cc'; then $(CYGPATH_W) 'UIGridDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIGridDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIGridDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIGridDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIGridDrawer.cc' object='bin_MetviewUI-UIGridDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIGridDrawer.obj `if test -f 'UIGridDrawer.cc'; then $(CYGPATH_W) 'UIGridDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIGridDrawer.cc'; fi`
+
+bin_MetviewUI-UIMenuLine.o: UIMenuLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIMenuLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIMenuLine.Tpo -c -o bin_MetviewUI-UIMenuLine.o `test -f 'UIMenuLine.cc' || echo '$(srcdir)/'`UIMenuLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIMenuLine.Tpo $(DEPDIR)/bin_MetviewUI-UIMenuLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIMenuLine.cc' object='bin_MetviewUI-UIMenuLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIMenuLine.o `test -f 'UIMenuLine.cc' || echo '$(srcdir)/'`UIMenuLine.cc
+
+bin_MetviewUI-UIMenuLine.obj: UIMenuLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIMenuLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIMenuLine.Tpo -c -o bin_MetviewUI-UIMenuLine.obj `if test -f 'UIMenuLine.cc'; then $(CYGPATH_W) 'UIMenuLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIMenuLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIMenuLine.Tpo $(DEPDIR)/bin_MetviewUI-UIMenuLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIMenuLine.cc' object='bin_MetviewUI-UIMenuLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIMenuLine.obj `if test -f 'UIMenuLine.cc'; then $(CYGPATH_W) 'UIMenuLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIMenuLine.cc'; fi`
+
+bin_MetviewUI-UINoEditor.o: UINoEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UINoEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UINoEditor.Tpo -c -o bin_MetviewUI-UINoEditor.o `test -f 'UINoEditor.cc' || echo '$(srcdir)/'`UINoEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UINoEditor.Tpo $(DEPDIR)/bin_MetviewUI-UINoEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UINoEditor.cc' object='bin_MetviewUI-UINoEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UINoEditor.o `test -f 'UINoEditor.cc' || echo '$(srcdir)/'`UINoEditor.cc
+
+bin_MetviewUI-UINoEditor.obj: UINoEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UINoEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UINoEditor.Tpo -c -o bin_MetviewUI-UINoEditor.obj `if test -f 'UINoEditor.cc'; then $(CYGPATH_W) 'UINoEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UINoEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UINoEditor.Tpo $(DEPDIR)/bin_MetviewUI-UINoEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UINoEditor.cc' object='bin_MetviewUI-UINoEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UINoEditor.obj `if test -f 'UINoEditor.cc'; then $(CYGPATH_W) 'UINoEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UINoEditor.cc'; fi`
+
+bin_MetviewUI-UIOutputDrawer.o: UIOutputDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIOutputDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Tpo -c -o bin_MetviewUI-UIOutputDrawer.o `test -f 'UIOutputDrawer.cc' || echo '$(srcdir)/'`UIOutputDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIOutputDrawer.cc' object='bin_MetviewUI-UIOutputDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIOutputDrawer.o `test -f 'UIOutputDrawer.cc' || echo '$(srcdir)/'`UIOutputDrawer.cc
+
+bin_MetviewUI-UIOutputDrawer.obj: UIOutputDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIOutputDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Tpo -c -o bin_MetviewUI-UIOutputDrawer.obj `if test -f 'UIOutputDrawer.cc'; then $(CYGPATH_W) 'UIOutputDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIOutputDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIOutputDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIOutputDrawer.cc' object='bin_MetviewUI-UIOutputDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIOutputDrawer.obj `if test -f 'UIOutputDrawer.cc'; then $(CYGPATH_W) 'UIOutputDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIOutputDrawer.cc'; fi`
+
+bin_MetviewUI-UICatalogDrawer.o: UICatalogDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UICatalogDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Tpo -c -o bin_MetviewUI-UICatalogDrawer.o `test -f 'UICatalogDrawer.cc' || echo '$(srcdir)/'`UICatalogDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UICatalogDrawer.cc' object='bin_MetviewUI-UICatalogDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UICatalogDrawer.o `test -f 'UICatalogDrawer.cc' || echo '$(srcdir)/'`UICatalogDrawer.cc
+
+bin_MetviewUI-UICatalogDrawer.obj: UICatalogDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UICatalogDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Tpo -c -o bin_MetviewUI-UICatalogDrawer.obj `if test -f 'UICatalogDrawer.cc'; then $(CYGPATH_W) 'UICatalogDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UICatalogDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UICatalogDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UICatalogDrawer.cc' object='bin_MetviewUI-UICatalogDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UICatalogDrawer.obj `if test -f 'UICatalogDrawer.cc'; then $(CYGPATH_W) 'UICatalogDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UICatalogDrawer.cc'; fi`
+
+bin_MetviewUI-UIPaperDrawer.o: UIPaperDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIPaperDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Tpo -c -o bin_MetviewUI-UIPaperDrawer.o `test -f 'UIPaperDrawer.cc' || echo '$(srcdir)/'`UIPaperDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIPaperDrawer.cc' object='bin_MetviewUI-UIPaperDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIPaperDrawer.o `test -f 'UIPaperDrawer.cc' || echo '$(srcdir)/'`UIPaperDrawer.cc
+
+bin_MetviewUI-UIPaperDrawer.obj: UIPaperDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIPaperDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Tpo -c -o bin_MetviewUI-UIPaperDrawer.obj `if test -f 'UIPaperDrawer.cc'; then $(CYGPATH_W) 'UIPaperDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIPaperDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIPaperDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIPaperDrawer.cc' object='bin_MetviewUI-UIPaperDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIPaperDrawer.obj `if test -f 'UIPaperDrawer.cc'; then $(CYGPATH_W) 'UIPaperDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIPaperDrawer.cc'; fi`
+
+bin_MetviewUI-UIParamEditor.o: UIParamEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIParamEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIParamEditor.Tpo -c -o bin_MetviewUI-UIParamEditor.o `test -f 'UIParamEditor.cc' || echo '$(srcdir)/'`UIParamEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIParamEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIParamEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIParamEditor.cc' object='bin_MetviewUI-UIParamEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIParamEditor.o `test -f 'UIParamEditor.cc' || echo '$(srcdir)/'`UIParamEditor.cc
+
+bin_MetviewUI-UIParamEditor.obj: UIParamEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIParamEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIParamEditor.Tpo -c -o bin_MetviewUI-UIParamEditor.obj `if test -f 'UIParamEditor.cc'; then $(CYGPATH_W) 'UIParamEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIParamEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIParamEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIParamEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIParamEditor.cc' object='bin_MetviewUI-UIParamEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIParamEditor.obj `if test -f 'UIParamEditor.cc'; then $(CYGPATH_W) 'UIParamEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIParamEditor.cc'; fi`
+
+bin_MetviewUI-UIRequestPanel.o: UIRequestPanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIRequestPanel.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIRequestPanel.Tpo -c -o bin_MetviewUI-UIRequestPanel.o `test -f 'UIRequestPanel.cc' || echo '$(srcdir)/'`UIRequestPanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIRequestPanel.Tpo $(DEPDIR)/bin_MetviewUI-UIRequestPanel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIRequestPanel.cc' object='bin_MetviewUI-UIRequestPanel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIRequestPanel.o `test -f 'UIRequestPanel.cc' || echo '$(srcdir)/'`UIRequestPanel.cc
+
+bin_MetviewUI-UIRequestPanel.obj: UIRequestPanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIRequestPanel.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIRequestPanel.Tpo -c -o bin_MetviewUI-UIRequestPanel.obj `if test -f 'UIRequestPanel.cc'; then $(CYGPATH_W) 'UIRequestPanel.cc'; else $(CYGPATH_W) '$(srcdir)/UIRequestPanel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIRequestPanel.Tpo $(DEPDIR)/bin_MetviewUI-UIRequestPanel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIRequestPanel.cc' object='bin_MetviewUI-UIRequestPanel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIRequestPanel.obj `if test -f 'UIRequestPanel.cc'; then $(CYGPATH_W) 'UIRequestPanel.cc'; else $(CYGPATH_W) '$(srcdir)/UIRequestPanel.cc'; fi`
+
+bin_MetviewUI-UIScaleLine.o: UIScaleLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIScaleLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIScaleLine.Tpo -c -o bin_MetviewUI-UIScaleLine.o `test -f 'UIScaleLine.cc' || echo '$(srcdir)/'`UIScaleLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIScaleLine.Tpo $(DEPDIR)/bin_MetviewUI-UIScaleLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIScaleLine.cc' object='bin_MetviewUI-UIScaleLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIScaleLine.o `test -f 'UIScaleLine.cc' || echo '$(srcdir)/'`UIScaleLine.cc
+
+bin_MetviewUI-UIScaleLine.obj: UIScaleLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIScaleLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIScaleLine.Tpo -c -o bin_MetviewUI-UIScaleLine.obj `if test -f 'UIScaleLine.cc'; then $(CYGPATH_W) 'UIScaleLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIScaleLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIScaleLine.Tpo $(DEPDIR)/bin_MetviewUI-UIScaleLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIScaleLine.cc' object='bin_MetviewUI-UIScaleLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIScaleLine.obj `if test -f 'UIScaleLine.cc'; then $(CYGPATH_W) 'UIScaleLine.cc'; else $(CYGPATH_W) '$(srcdir)/UIScaleLine.cc'; fi`
+
+bin_MetviewUI-UIScriptHelp.o: UIScriptHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIScriptHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIScriptHelp.Tpo -c -o bin_MetviewUI-UIScriptHelp.o `test -f 'UIScriptHelp.cc' || echo '$(srcdir)/'`UIScriptHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIScriptHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIScriptHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIScriptHelp.cc' object='bin_MetviewUI-UIScriptHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIScriptHelp.o `test -f 'UIScriptHelp.cc' || echo '$(srcdir)/'`UIScriptHelp.cc
+
+bin_MetviewUI-UIScriptHelp.obj: UIScriptHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIScriptHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIScriptHelp.Tpo -c -o bin_MetviewUI-UIScriptHelp.obj `if test -f 'UIScriptHelp.cc'; then $(CYGPATH_W) 'UIScriptHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIScriptHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIScriptHelp.Tpo $(DEPDIR)/bin_MetviewUI-UIScriptHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIScriptHelp.cc' object='bin_MetviewUI-UIScriptHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIScriptHelp.obj `if test -f 'UIScriptHelp.cc'; then $(CYGPATH_W) 'UIScriptHelp.cc'; else $(CYGPATH_W) '$(srcdir)/UIScriptHelp.cc'; fi`
+
+bin_MetviewUI-UIScrolledText.o: UIScrolledText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIScrolledText.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIScrolledText.Tpo -c -o bin_MetviewUI-UIScrolledText.o `test -f 'UIScrolledText.cc' || echo '$(srcdir)/'`UIScrolledText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIScrolledText.Tpo $(DEPDIR)/bin_MetviewUI-UIScrolledText.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIScrolledText.cc' object='bin_MetviewUI-UIScrolledText.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIScrolledText.o `test -f 'UIScrolledText.cc' || echo '$(srcdir)/'`UIScrolledText.cc
+
+bin_MetviewUI-UIScrolledText.obj: UIScrolledText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIScrolledText.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIScrolledText.Tpo -c -o bin_MetviewUI-UIScrolledText.obj `if test -f 'UIScrolledText.cc'; then $(CYGPATH_W) 'UIScrolledText.cc'; else $(CYGPATH_W) '$(srcdir)/UIScrolledText.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIScrolledText.Tpo $(DEPDIR)/bin_MetviewUI-UIScrolledText.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIScrolledText.cc' object='bin_MetviewUI-UIScrolledText.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIScrolledText.obj `if test -f 'UIScrolledText.cc'; then $(CYGPATH_W) 'UIScrolledText.cc'; else $(CYGPATH_W) '$(srcdir)/UIScrolledText.cc'; fi`
+
+bin_MetviewUI-UISimpleEditor.o: UISimpleEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UISimpleEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UISimpleEditor.Tpo -c -o bin_MetviewUI-UISimpleEditor.o `test -f 'UISimpleEditor.cc' || echo '$(srcdir)/'`UISimpleEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UISimpleEditor.Tpo $(DEPDIR)/bin_MetviewUI-UISimpleEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UISimpleEditor.cc' object='bin_MetviewUI-UISimpleEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UISimpleEditor.o `test -f 'UISimpleEditor.cc' || echo '$(srcdir)/'`UISimpleEditor.cc
+
+bin_MetviewUI-UISimpleEditor.obj: UISimpleEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UISimpleEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UISimpleEditor.Tpo -c -o bin_MetviewUI-UISimpleEditor.obj `if test -f 'UISimpleEditor.cc'; then $(CYGPATH_W) 'UISimpleEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UISimpleEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UISimpleEditor.Tpo $(DEPDIR)/bin_MetviewUI-UISimpleEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UISimpleEditor.cc' object='bin_MetviewUI-UISimpleEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UISimpleEditor.obj `if test -f 'UISimpleEditor.cc'; then $(CYGPATH_W) 'UISimpleEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UISimpleEditor.cc'; fi`
+
+bin_MetviewUI-UITemplateDrawer.o: UITemplateDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UITemplateDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Tpo -c -o bin_MetviewUI-UITemplateDrawer.o `test -f 'UITemplateDrawer.cc' || echo '$(srcdir)/'`UITemplateDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UITemplateDrawer.cc' object='bin_MetviewUI-UITemplateDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UITemplateDrawer.o `test -f 'UITemplateDrawer.cc' || echo '$(srcdir)/'`UITemplateDrawer.cc
+
+bin_MetviewUI-UITemplateDrawer.obj: UITemplateDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UITemplateDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Tpo -c -o bin_MetviewUI-UITemplateDrawer.obj `if test -f 'UITemplateDrawer.cc'; then $(CYGPATH_W) 'UITemplateDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UITemplateDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UITemplateDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UITemplateDrawer.cc' object='bin_MetviewUI-UITemplateDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UITemplateDrawer.obj `if test -f 'UITemplateDrawer.cc'; then $(CYGPATH_W) 'UITemplateDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UITemplateDrawer.cc'; fi`
+
+bin_MetviewUI-UITextEditor.o: UITextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UITextEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UITextEditor.Tpo -c -o bin_MetviewUI-UITextEditor.o `test -f 'UITextEditor.cc' || echo '$(srcdir)/'`UITextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UITextEditor.Tpo $(DEPDIR)/bin_MetviewUI-UITextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UITextEditor.cc' object='bin_MetviewUI-UITextEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UITextEditor.o `test -f 'UITextEditor.cc' || echo '$(srcdir)/'`UITextEditor.cc
+
+bin_MetviewUI-UITextEditor.obj: UITextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UITextEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UITextEditor.Tpo -c -o bin_MetviewUI-UITextEditor.obj `if test -f 'UITextEditor.cc'; then $(CYGPATH_W) 'UITextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UITextEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UITextEditor.Tpo $(DEPDIR)/bin_MetviewUI-UITextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UITextEditor.cc' object='bin_MetviewUI-UITextEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UITextEditor.obj `if test -f 'UITextEditor.cc'; then $(CYGPATH_W) 'UITextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UITextEditor.cc'; fi`
+
+bin_MetviewUI-UITextLine.o: UITextLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UITextLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UITextLine.Tpo -c -o bin_MetviewUI-UITextLine.o `test -f 'UITextLine.cc' || echo '$(srcdir)/'`UITextLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UITextLine.Tpo $(DEPDIR)/bin_MetviewUI-UITextLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UITextLine.cc' object='bin_MetviewUI-UITextLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UITextLine.o `test -f 'UITextLine.cc' || echo '$(srcdir)/'`UITextLine.cc
+
+bin_MetviewUI-UITextLine.obj: UITextLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UITextLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UITextLine.Tpo -c -o bin_MetviewUI-UITextLine.obj `if test -f 'UITextLine.cc'; then $(CYGPATH_W) 'UITextLine.cc'; else $(CYGPATH_W) '$(srcdir)/UITextLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UITextLine.Tpo $(DEPDIR)/bin_MetviewUI-UITextLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UITextLine.cc' object='bin_MetviewUI-UITextLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UITextLine.obj `if test -f 'UITextLine.cc'; then $(CYGPATH_W) 'UITextLine.cc'; else $(CYGPATH_W) '$(srcdir)/UITextLine.cc'; fi`
+
+bin_MetviewUI-UISyncFolders.o: UISyncFolders.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UISyncFolders.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UISyncFolders.Tpo -c -o bin_MetviewUI-UISyncFolders.o `test -f 'UISyncFolders.cc' || echo '$(srcdir)/'`UISyncFolders.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UISyncFolders.Tpo $(DEPDIR)/bin_MetviewUI-UISyncFolders.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UISyncFolders.cc' object='bin_MetviewUI-UISyncFolders.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UISyncFolders.o `test -f 'UISyncFolders.cc' || echo '$(srcdir)/'`UISyncFolders.cc
+
+bin_MetviewUI-UISyncFolders.obj: UISyncFolders.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UISyncFolders.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UISyncFolders.Tpo -c -o bin_MetviewUI-UISyncFolders.obj `if test -f 'UISyncFolders.cc'; then $(CYGPATH_W) 'UISyncFolders.cc'; else $(CYGPATH_W) '$(srcdir)/UISyncFolders.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UISyncFolders.Tpo $(DEPDIR)/bin_MetviewUI-UISyncFolders.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UISyncFolders.cc' object='bin_MetviewUI-UISyncFolders.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UISyncFolders.obj `if test -f 'UISyncFolders.cc'; then $(CYGPATH_W) 'UISyncFolders.cc'; else $(CYGPATH_W) '$(srcdir)/UISyncFolders.cc'; fi`
+
+bin_MetviewUI-UIViewsDrawer.o: UIViewsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIViewsDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Tpo -c -o bin_MetviewUI-UIViewsDrawer.o `test -f 'UIViewsDrawer.cc' || echo '$(srcdir)/'`UIViewsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIViewsDrawer.cc' object='bin_MetviewUI-UIViewsDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIViewsDrawer.o `test -f 'UIViewsDrawer.cc' || echo '$(srcdir)/'`UIViewsDrawer.cc
+
+bin_MetviewUI-UIViewsDrawer.obj: UIViewsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIViewsDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Tpo -c -o bin_MetviewUI-UIViewsDrawer.obj `if test -f 'UIViewsDrawer.cc'; then $(CYGPATH_W) 'UIViewsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIViewsDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIViewsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIViewsDrawer.cc' object='bin_MetviewUI-UIViewsDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIViewsDrawer.obj `if test -f 'UIViewsDrawer.cc'; then $(CYGPATH_W) 'UIViewsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIViewsDrawer.cc'; fi`
+
+bin_MetviewUI-UIODBEditor.o: UIODBEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIODBEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIODBEditor.Tpo -c -o bin_MetviewUI-UIODBEditor.o `test -f 'UIODBEditor.cc' || echo '$(srcdir)/'`UIODBEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIODBEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIODBEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIODBEditor.cc' object='bin_MetviewUI-UIODBEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIODBEditor.o `test -f 'UIODBEditor.cc' || echo '$(srcdir)/'`UIODBEditor.cc
+
+bin_MetviewUI-UIODBEditor.obj: UIODBEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIODBEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIODBEditor.Tpo -c -o bin_MetviewUI-UIODBEditor.obj `if test -f 'UIODBEditor.cc'; then $(CYGPATH_W) 'UIODBEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIODBEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIODBEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIODBEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIODBEditor.cc' object='bin_MetviewUI-UIODBEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIODBEditor.obj `if test -f 'UIODBEditor.cc'; then $(CYGPATH_W) 'UIODBEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIODBEditor.cc'; fi`
+
+bin_MetviewUI-UIODBFunctionsDrawer.o: UIODBFunctionsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIODBFunctionsDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Tpo -c -o bin_MetviewUI-UIODBFunctionsDrawer.o `test -f 'UIODBFunctionsDrawer.cc' || echo '$(srcdir)/'`UIODBFunctionsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIODBFunctionsDrawer.cc' object='bin_MetviewUI-UIODBFunctionsDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIODBFunctionsDrawer.o `test -f 'UIODBFunctionsDrawer.cc' || echo '$(srcdir)/'`UIODBFunctionsDrawer.cc
+
+bin_MetviewUI-UIODBFunctionsDrawer.obj: UIODBFunctionsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIODBFunctionsDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Tpo -c -o bin_MetviewUI-UIODBFunctionsDrawer.obj `if test -f 'UIODBFunctionsDrawer.cc'; then $(CYGPATH_W) 'UIODBFunctionsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIODBFunctionsDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UIODBFunctionsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIODBFunctionsDrawer.cc' object='bin_MetviewUI-UIODBFunctionsDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIODBFunctionsDrawer.obj `if test -f 'UIODBFunctionsDrawer.cc'; then $(CYGPATH_W) 'UIODBFunctionsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UIODBFunctionsDrawer.cc'; fi`
+
+bin_MetviewUI-UISQLDrawer.o: UISQLDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UISQLDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UISQLDrawer.Tpo -c -o bin_MetviewUI-UISQLDrawer.o `test -f 'UISQLDrawer.cc' || echo '$(srcdir)/'`UISQLDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UISQLDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UISQLDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UISQLDrawer.cc' object='bin_MetviewUI-UISQLDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UISQLDrawer.o `test -f 'UISQLDrawer.cc' || echo '$(srcdir)/'`UISQLDrawer.cc
+
+bin_MetviewUI-UISQLDrawer.obj: UISQLDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UISQLDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UISQLDrawer.Tpo -c -o bin_MetviewUI-UISQLDrawer.obj `if test -f 'UISQLDrawer.cc'; then $(CYGPATH_W) 'UISQLDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UISQLDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UISQLDrawer.Tpo $(DEPDIR)/bin_MetviewUI-UISQLDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UISQLDrawer.cc' object='bin_MetviewUI-UISQLDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UISQLDrawer.obj `if test -f 'UISQLDrawer.cc'; then $(CYGPATH_W) 'UISQLDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/UISQLDrawer.cc'; fi`
+
+bin_MetviewUI-UIViewEditor.o: UIViewEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIViewEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIViewEditor.Tpo -c -o bin_MetviewUI-UIViewEditor.o `test -f 'UIViewEditor.cc' || echo '$(srcdir)/'`UIViewEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIViewEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIViewEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIViewEditor.cc' object='bin_MetviewUI-UIViewEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIViewEditor.o `test -f 'UIViewEditor.cc' || echo '$(srcdir)/'`UIViewEditor.cc
+
+bin_MetviewUI-UIViewEditor.obj: UIViewEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UIViewEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UIViewEditor.Tpo -c -o bin_MetviewUI-UIViewEditor.obj `if test -f 'UIViewEditor.cc'; then $(CYGPATH_W) 'UIViewEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIViewEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UIViewEditor.Tpo $(DEPDIR)/bin_MetviewUI-UIViewEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UIViewEditor.cc' object='bin_MetviewUI-UIViewEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UIViewEditor.obj `if test -f 'UIViewEditor.cc'; then $(CYGPATH_W) 'UIViewEditor.cc'; else $(CYGPATH_W) '$(srcdir)/UIViewEditor.cc'; fi`
+
+bin_MetviewUI-Action.o: Action.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Action.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Action.Tpo -c -o bin_MetviewUI-Action.o `test -f 'Action.cc' || echo '$(srcdir)/'`Action.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Action.Tpo $(DEPDIR)/bin_MetviewUI-Action.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Action.cc' object='bin_MetviewUI-Action.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Action.o `test -f 'Action.cc' || echo '$(srcdir)/'`Action.cc
+
+bin_MetviewUI-Action.obj: Action.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Action.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Action.Tpo -c -o bin_MetviewUI-Action.obj `if test -f 'Action.cc'; then $(CYGPATH_W) 'Action.cc'; else $(CYGPATH_W) '$(srcdir)/Action.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Action.Tpo $(DEPDIR)/bin_MetviewUI-Action.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Action.cc' object='bin_MetviewUI-Action.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Action.obj `if test -f 'Action.cc'; then $(CYGPATH_W) 'Action.cc'; else $(CYGPATH_W) '$(srcdir)/Action.cc'; fi`
+
+bin_MetviewUI-ActionCommand.o: ActionCommand.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ActionCommand.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ActionCommand.Tpo -c -o bin_MetviewUI-ActionCommand.o `test -f 'ActionCommand.cc' || echo '$(srcdir)/'`ActionCommand.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ActionCommand.Tpo $(DEPDIR)/bin_MetviewUI-ActionCommand.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ActionCommand.cc' object='bin_MetviewUI-ActionCommand.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ActionCommand.o `test -f 'ActionCommand.cc' || echo '$(srcdir)/'`ActionCommand.cc
+
+bin_MetviewUI-ActionCommand.obj: ActionCommand.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ActionCommand.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ActionCommand.Tpo -c -o bin_MetviewUI-ActionCommand.obj `if test -f 'ActionCommand.cc'; then $(CYGPATH_W) 'ActionCommand.cc'; else $(CYGPATH_W) '$(srcdir)/ActionCommand.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ActionCommand.Tpo $(DEPDIR)/bin_MetviewUI-ActionCommand.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ActionCommand.cc' object='bin_MetviewUI-ActionCommand.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ActionCommand.obj `if test -f 'ActionCommand.cc'; then $(CYGPATH_W) 'ActionCommand.cc'; else $(CYGPATH_W) '$(srcdir)/ActionCommand.cc'; fi`
+
+bin_MetviewUI-Ask.o: Ask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Ask.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Ask.Tpo -c -o bin_MetviewUI-Ask.o `test -f 'Ask.cc' || echo '$(srcdir)/'`Ask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Ask.Tpo $(DEPDIR)/bin_MetviewUI-Ask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Ask.cc' object='bin_MetviewUI-Ask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Ask.o `test -f 'Ask.cc' || echo '$(srcdir)/'`Ask.cc
+
+bin_MetviewUI-Ask.obj: Ask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Ask.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Ask.Tpo -c -o bin_MetviewUI-Ask.obj `if test -f 'Ask.cc'; then $(CYGPATH_W) 'Ask.cc'; else $(CYGPATH_W) '$(srcdir)/Ask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Ask.Tpo $(DEPDIR)/bin_MetviewUI-Ask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Ask.cc' object='bin_MetviewUI-Ask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Ask.obj `if test -f 'Ask.cc'; then $(CYGPATH_W) 'Ask.cc'; else $(CYGPATH_W) '$(srcdir)/Ask.cc'; fi`
+
+bin_MetviewUI-Basic.o: Basic.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Basic.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Basic.Tpo -c -o bin_MetviewUI-Basic.o `test -f 'Basic.cc' || echo '$(srcdir)/'`Basic.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Basic.Tpo $(DEPDIR)/bin_MetviewUI-Basic.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Basic.cc' object='bin_MetviewUI-Basic.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Basic.o `test -f 'Basic.cc' || echo '$(srcdir)/'`Basic.cc
+
+bin_MetviewUI-Basic.obj: Basic.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Basic.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Basic.Tpo -c -o bin_MetviewUI-Basic.obj `if test -f 'Basic.cc'; then $(CYGPATH_W) 'Basic.cc'; else $(CYGPATH_W) '$(srcdir)/Basic.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Basic.Tpo $(DEPDIR)/bin_MetviewUI-Basic.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Basic.cc' object='bin_MetviewUI-Basic.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Basic.obj `if test -f 'Basic.cc'; then $(CYGPATH_W) 'Basic.cc'; else $(CYGPATH_W) '$(srcdir)/Basic.cc'; fi`
+
+bin_MetviewUI-BoolLine.o: BoolLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-BoolLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-BoolLine.Tpo -c -o bin_MetviewUI-BoolLine.o `test -f 'BoolLine.cc' || echo '$(srcdir)/'`BoolLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-BoolLine.Tpo $(DEPDIR)/bin_MetviewUI-BoolLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BoolLine.cc' object='bin_MetviewUI-BoolLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-BoolLine.o `test -f 'BoolLine.cc' || echo '$(srcdir)/'`BoolLine.cc
+
+bin_MetviewUI-BoolLine.obj: BoolLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-BoolLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-BoolLine.Tpo -c -o bin_MetviewUI-BoolLine.obj `if test -f 'BoolLine.cc'; then $(CYGPATH_W) 'BoolLine.cc'; else $(CYGPATH_W) '$(srcdir)/BoolLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-BoolLine.Tpo $(DEPDIR)/bin_MetviewUI-BoolLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BoolLine.cc' object='bin_MetviewUI-BoolLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-BoolLine.obj `if test -f 'BoolLine.cc'; then $(CYGPATH_W) 'BoolLine.cc'; else $(CYGPATH_W) '$(srcdir)/BoolLine.cc'; fi`
+
+bin_MetviewUI-ColorLine.o: ColorLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColorLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColorLine.Tpo -c -o bin_MetviewUI-ColorLine.o `test -f 'ColorLine.cc' || echo '$(srcdir)/'`ColorLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColorLine.Tpo $(DEPDIR)/bin_MetviewUI-ColorLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColorLine.cc' object='bin_MetviewUI-ColorLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColorLine.o `test -f 'ColorLine.cc' || echo '$(srcdir)/'`ColorLine.cc
+
+bin_MetviewUI-ColorLine.obj: ColorLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColorLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColorLine.Tpo -c -o bin_MetviewUI-ColorLine.obj `if test -f 'ColorLine.cc'; then $(CYGPATH_W) 'ColorLine.cc'; else $(CYGPATH_W) '$(srcdir)/ColorLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColorLine.Tpo $(DEPDIR)/bin_MetviewUI-ColorLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColorLine.cc' object='bin_MetviewUI-ColorLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColorLine.obj `if test -f 'ColorLine.cc'; then $(CYGPATH_W) 'ColorLine.cc'; else $(CYGPATH_W) '$(srcdir)/ColorLine.cc'; fi`
+
+bin_MetviewUI-ColorName.o: ColorName.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColorName.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColorName.Tpo -c -o bin_MetviewUI-ColorName.o `test -f 'ColorName.cc' || echo '$(srcdir)/'`ColorName.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColorName.Tpo $(DEPDIR)/bin_MetviewUI-ColorName.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColorName.cc' object='bin_MetviewUI-ColorName.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColorName.o `test -f 'ColorName.cc' || echo '$(srcdir)/'`ColorName.cc
+
+bin_MetviewUI-ColorName.obj: ColorName.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColorName.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColorName.Tpo -c -o bin_MetviewUI-ColorName.obj `if test -f 'ColorName.cc'; then $(CYGPATH_W) 'ColorName.cc'; else $(CYGPATH_W) '$(srcdir)/ColorName.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColorName.Tpo $(DEPDIR)/bin_MetviewUI-ColorName.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColorName.cc' object='bin_MetviewUI-ColorName.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColorName.obj `if test -f 'ColorName.cc'; then $(CYGPATH_W) 'ColorName.cc'; else $(CYGPATH_W) '$(srcdir)/ColorName.cc'; fi`
+
+bin_MetviewUI-ColorHelp.o: ColorHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColorHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColorHelp.Tpo -c -o bin_MetviewUI-ColorHelp.o `test -f 'ColorHelp.cc' || echo '$(srcdir)/'`ColorHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColorHelp.Tpo $(DEPDIR)/bin_MetviewUI-ColorHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColorHelp.cc' object='bin_MetviewUI-ColorHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColorHelp.o `test -f 'ColorHelp.cc' || echo '$(srcdir)/'`ColorHelp.cc
+
+bin_MetviewUI-ColorHelp.obj: ColorHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColorHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColorHelp.Tpo -c -o bin_MetviewUI-ColorHelp.obj `if test -f 'ColorHelp.cc'; then $(CYGPATH_W) 'ColorHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ColorHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColorHelp.Tpo $(DEPDIR)/bin_MetviewUI-ColorHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColorHelp.cc' object='bin_MetviewUI-ColorHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColorHelp.obj `if test -f 'ColorHelp.cc'; then $(CYGPATH_W) 'ColorHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ColorHelp.cc'; fi`
+
+bin_MetviewUI-ColourEditor.o: ColourEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColourEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColourEditor.Tpo -c -o bin_MetviewUI-ColourEditor.o `test -f 'ColourEditor.cc' || echo '$(srcdir)/'`ColourEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColourEditor.Tpo $(DEPDIR)/bin_MetviewUI-ColourEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColourEditor.cc' object='bin_MetviewUI-ColourEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColourEditor.o `test -f 'ColourEditor.cc' || echo '$(srcdir)/'`ColourEditor.cc
+
+bin_MetviewUI-ColourEditor.obj: ColourEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ColourEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ColourEditor.Tpo -c -o bin_MetviewUI-ColourEditor.obj `if test -f 'ColourEditor.cc'; then $(CYGPATH_W) 'ColourEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ColourEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ColourEditor.Tpo $(DEPDIR)/bin_MetviewUI-ColourEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ColourEditor.cc' object='bin_MetviewUI-ColourEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ColourEditor.obj `if test -f 'ColourEditor.cc'; then $(CYGPATH_W) 'ColourEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ColourEditor.cc'; fi`
+
+bin_MetviewUI-Command.o: Command.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Command.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Command.Tpo -c -o bin_MetviewUI-Command.o `test -f 'Command.cc' || echo '$(srcdir)/'`Command.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Command.Tpo $(DEPDIR)/bin_MetviewUI-Command.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Command.cc' object='bin_MetviewUI-Command.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Command.o `test -f 'Command.cc' || echo '$(srcdir)/'`Command.cc
+
+bin_MetviewUI-Command.obj: Command.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Command.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Command.Tpo -c -o bin_MetviewUI-Command.obj `if test -f 'Command.cc'; then $(CYGPATH_W) 'Command.cc'; else $(CYGPATH_W) '$(srcdir)/Command.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Command.Tpo $(DEPDIR)/bin_MetviewUI-Command.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Command.cc' object='bin_MetviewUI-Command.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Command.obj `if test -f 'Command.cc'; then $(CYGPATH_W) 'Command.cc'; else $(CYGPATH_W) '$(srcdir)/Command.cc'; fi`
+
+bin_MetviewUI-ComputeEditor.o: ComputeEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ComputeEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ComputeEditor.Tpo -c -o bin_MetviewUI-ComputeEditor.o `test -f 'ComputeEditor.cc' || echo '$(srcdir)/'`ComputeEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ComputeEditor.Tpo $(DEPDIR)/bin_MetviewUI-ComputeEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ComputeEditor.cc' object='bin_MetviewUI-ComputeEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ComputeEditor.o `test -f 'ComputeEditor.cc' || echo '$(srcdir)/'`ComputeEditor.cc
+
+bin_MetviewUI-ComputeEditor.obj: ComputeEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ComputeEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ComputeEditor.Tpo -c -o bin_MetviewUI-ComputeEditor.obj `if test -f 'ComputeEditor.cc'; then $(CYGPATH_W) 'ComputeEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ComputeEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ComputeEditor.Tpo $(DEPDIR)/bin_MetviewUI-ComputeEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ComputeEditor.cc' object='bin_MetviewUI-ComputeEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ComputeEditor.obj `if test -f 'ComputeEditor.cc'; then $(CYGPATH_W) 'ComputeEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ComputeEditor.cc'; fi`
+
+bin_MetviewUI-ConfigLoader.o: ConfigLoader.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ConfigLoader.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ConfigLoader.Tpo -c -o bin_MetviewUI-ConfigLoader.o `test -f 'ConfigLoader.cc' || echo '$(srcdir)/'`ConfigLoader.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ConfigLoader.Tpo $(DEPDIR)/bin_MetviewUI-ConfigLoader.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ConfigLoader.cc' object='bin_MetviewUI-ConfigLoader.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ConfigLoader.o `test -f 'ConfigLoader.cc' || echo '$(srcdir)/'`ConfigLoader.cc
+
+bin_MetviewUI-ConfigLoader.obj: ConfigLoader.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ConfigLoader.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ConfigLoader.Tpo -c -o bin_MetviewUI-ConfigLoader.obj `if test -f 'ConfigLoader.cc'; then $(CYGPATH_W) 'ConfigLoader.cc'; else $(CYGPATH_W) '$(srcdir)/ConfigLoader.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ConfigLoader.Tpo $(DEPDIR)/bin_MetviewUI-ConfigLoader.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ConfigLoader.cc' object='bin_MetviewUI-ConfigLoader.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ConfigLoader.obj `if test -f 'ConfigLoader.cc'; then $(CYGPATH_W) 'ConfigLoader.cc'; else $(CYGPATH_W) '$(srcdir)/ConfigLoader.cc'; fi`
+
+bin_MetviewUI-Confirm.o: Confirm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Confirm.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Confirm.Tpo -c -o bin_MetviewUI-Confirm.o `test -f 'Confirm.cc' || echo '$(srcdir)/'`Confirm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Confirm.Tpo $(DEPDIR)/bin_MetviewUI-Confirm.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Confirm.cc' object='bin_MetviewUI-Confirm.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Confirm.o `test -f 'Confirm.cc' || echo '$(srcdir)/'`Confirm.cc
+
+bin_MetviewUI-Confirm.obj: Confirm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Confirm.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Confirm.Tpo -c -o bin_MetviewUI-Confirm.obj `if test -f 'Confirm.cc'; then $(CYGPATH_W) 'Confirm.cc'; else $(CYGPATH_W) '$(srcdir)/Confirm.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Confirm.Tpo $(DEPDIR)/bin_MetviewUI-Confirm.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Confirm.cc' object='bin_MetviewUI-Confirm.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Confirm.obj `if test -f 'Confirm.cc'; then $(CYGPATH_W) 'Confirm.cc'; else $(CYGPATH_W) '$(srcdir)/Confirm.cc'; fi`
+
+bin_MetviewUI-Counted.o: Counted.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Counted.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Counted.Tpo -c -o bin_MetviewUI-Counted.o `test -f 'Counted.cc' || echo '$(srcdir)/'`Counted.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Counted.Tpo $(DEPDIR)/bin_MetviewUI-Counted.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Counted.cc' object='bin_MetviewUI-Counted.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Counted.o `test -f 'Counted.cc' || echo '$(srcdir)/'`Counted.cc
+
+bin_MetviewUI-Counted.obj: Counted.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Counted.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Counted.Tpo -c -o bin_MetviewUI-Counted.obj `if test -f 'Counted.cc'; then $(CYGPATH_W) 'Counted.cc'; else $(CYGPATH_W) '$(srcdir)/Counted.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Counted.Tpo $(DEPDIR)/bin_MetviewUI-Counted.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Counted.cc' object='bin_MetviewUI-Counted.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Counted.obj `if test -f 'Counted.cc'; then $(CYGPATH_W) 'Counted.cc'; else $(CYGPATH_W) '$(srcdir)/Counted.cc'; fi`
+
+bin_MetviewUI-Dependancy.o: Dependancy.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Dependancy.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Dependancy.Tpo -c -o bin_MetviewUI-Dependancy.o `test -f 'Dependancy.cc' || echo '$(srcdir)/'`Dependancy.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Dependancy.Tpo $(DEPDIR)/bin_MetviewUI-Dependancy.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Dependancy.cc' object='bin_MetviewUI-Dependancy.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Dependancy.o `test -f 'Dependancy.cc' || echo '$(srcdir)/'`Dependancy.cc
+
+bin_MetviewUI-Dependancy.obj: Dependancy.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Dependancy.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Dependancy.Tpo -c -o bin_MetviewUI-Dependancy.obj `if test -f 'Dependancy.cc'; then $(CYGPATH_W) 'Dependancy.cc'; else $(CYGPATH_W) '$(srcdir)/Dependancy.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Dependancy.Tpo $(DEPDIR)/bin_MetviewUI-Dependancy.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Dependancy.cc' object='bin_MetviewUI-Dependancy.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Dependancy.obj `if test -f 'Dependancy.cc'; then $(CYGPATH_W) 'Dependancy.cc'; else $(CYGPATH_W) '$(srcdir)/Dependancy.cc'; fi`
+
+bin_MetviewUI-DragWindow.o: DragWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-DragWindow.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-DragWindow.Tpo -c -o bin_MetviewUI-DragWindow.o `test -f 'DragWindow.cc' || echo '$(srcdir)/'`DragWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-DragWindow.Tpo $(DEPDIR)/bin_MetviewUI-DragWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DragWindow.cc' object='bin_MetviewUI-DragWindow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-DragWindow.o `test -f 'DragWindow.cc' || echo '$(srcdir)/'`DragWindow.cc
+
+bin_MetviewUI-DragWindow.obj: DragWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-DragWindow.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-DragWindow.Tpo -c -o bin_MetviewUI-DragWindow.obj `if test -f 'DragWindow.cc'; then $(CYGPATH_W) 'DragWindow.cc'; else $(CYGPATH_W) '$(srcdir)/DragWindow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-DragWindow.Tpo $(DEPDIR)/bin_MetviewUI-DragWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DragWindow.cc' object='bin_MetviewUI-DragWindow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-DragWindow.obj `if test -f 'DragWindow.cc'; then $(CYGPATH_W) 'DragWindow.cc'; else $(CYGPATH_W) '$(srcdir)/DragWindow.cc'; fi`
+
+bin_MetviewUI-Drawer.o: Drawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Drawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Drawer.Tpo -c -o bin_MetviewUI-Drawer.o `test -f 'Drawer.cc' || echo '$(srcdir)/'`Drawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Drawer.Tpo $(DEPDIR)/bin_MetviewUI-Drawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Drawer.cc' object='bin_MetviewUI-Drawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Drawer.o `test -f 'Drawer.cc' || echo '$(srcdir)/'`Drawer.cc
+
+bin_MetviewUI-Drawer.obj: Drawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Drawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Drawer.Tpo -c -o bin_MetviewUI-Drawer.obj `if test -f 'Drawer.cc'; then $(CYGPATH_W) 'Drawer.cc'; else $(CYGPATH_W) '$(srcdir)/Drawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Drawer.Tpo $(DEPDIR)/bin_MetviewUI-Drawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Drawer.cc' object='bin_MetviewUI-Drawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Drawer.obj `if test -f 'Drawer.cc'; then $(CYGPATH_W) 'Drawer.cc'; else $(CYGPATH_W) '$(srcdir)/Drawer.cc'; fi`
+
+bin_MetviewUI-Drop.o: Drop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Drop.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Drop.Tpo -c -o bin_MetviewUI-Drop.o `test -f 'Drop.cc' || echo '$(srcdir)/'`Drop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Drop.Tpo $(DEPDIR)/bin_MetviewUI-Drop.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Drop.cc' object='bin_MetviewUI-Drop.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Drop.o `test -f 'Drop.cc' || echo '$(srcdir)/'`Drop.cc
+
+bin_MetviewUI-Drop.obj: Drop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Drop.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Drop.Tpo -c -o bin_MetviewUI-Drop.obj `if test -f 'Drop.cc'; then $(CYGPATH_W) 'Drop.cc'; else $(CYGPATH_W) '$(srcdir)/Drop.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Drop.Tpo $(DEPDIR)/bin_MetviewUI-Drop.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Drop.cc' object='bin_MetviewUI-Drop.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Drop.obj `if test -f 'Drop.cc'; then $(CYGPATH_W) 'Drop.cc'; else $(CYGPATH_W) '$(srcdir)/Drop.cc'; fi`
+
+bin_MetviewUI-DropSite.o: DropSite.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-DropSite.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-DropSite.Tpo -c -o bin_MetviewUI-DropSite.o `test -f 'DropSite.cc' || echo '$(srcdir)/'`DropSite.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-DropSite.Tpo $(DEPDIR)/bin_MetviewUI-DropSite.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropSite.cc' object='bin_MetviewUI-DropSite.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-DropSite.o `test -f 'DropSite.cc' || echo '$(srcdir)/'`DropSite.cc
+
+bin_MetviewUI-DropSite.obj: DropSite.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-DropSite.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-DropSite.Tpo -c -o bin_MetviewUI-DropSite.obj `if test -f 'DropSite.cc'; then $(CYGPATH_W) 'DropSite.cc'; else $(CYGPATH_W) '$(srcdir)/DropSite.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-DropSite.Tpo $(DEPDIR)/bin_MetviewUI-DropSite.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropSite.cc' object='bin_MetviewUI-DropSite.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-DropSite.obj `if test -f 'DropSite.cc'; then $(CYGPATH_W) 'DropSite.cc'; else $(CYGPATH_W) '$(srcdir)/DropSite.cc'; fi`
+
+bin_MetviewUI-Dropping.o: Dropping.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Dropping.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Dropping.Tpo -c -o bin_MetviewUI-Dropping.o `test -f 'Dropping.cc' || echo '$(srcdir)/'`Dropping.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Dropping.Tpo $(DEPDIR)/bin_MetviewUI-Dropping.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Dropping.cc' object='bin_MetviewUI-Dropping.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Dropping.o `test -f 'Dropping.cc' || echo '$(srcdir)/'`Dropping.cc
+
+bin_MetviewUI-Dropping.obj: Dropping.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Dropping.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Dropping.Tpo -c -o bin_MetviewUI-Dropping.obj `if test -f 'Dropping.cc'; then $(CYGPATH_W) 'Dropping.cc'; else $(CYGPATH_W) '$(srcdir)/Dropping.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Dropping.Tpo $(DEPDIR)/bin_MetviewUI-Dropping.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Dropping.cc' object='bin_MetviewUI-Dropping.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Dropping.obj `if test -f 'Dropping.cc'; then $(CYGPATH_W) 'Dropping.cc'; else $(CYGPATH_W) '$(srcdir)/Dropping.cc'; fi`
+
+bin_MetviewUI-MotifDrop.o: MotifDrop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MotifDrop.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MotifDrop.Tpo -c -o bin_MetviewUI-MotifDrop.o `test -f 'MotifDrop.cc' || echo '$(srcdir)/'`MotifDrop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MotifDrop.Tpo $(DEPDIR)/bin_MetviewUI-MotifDrop.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MotifDrop.cc' object='bin_MetviewUI-MotifDrop.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MotifDrop.o `test -f 'MotifDrop.cc' || echo '$(srcdir)/'`MotifDrop.cc
+
+bin_MetviewUI-MotifDrop.obj: MotifDrop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MotifDrop.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MotifDrop.Tpo -c -o bin_MetviewUI-MotifDrop.obj `if test -f 'MotifDrop.cc'; then $(CYGPATH_W) 'MotifDrop.cc'; else $(CYGPATH_W) '$(srcdir)/MotifDrop.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MotifDrop.Tpo $(DEPDIR)/bin_MetviewUI-MotifDrop.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MotifDrop.cc' object='bin_MetviewUI-MotifDrop.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MotifDrop.obj `if test -f 'MotifDrop.cc'; then $(CYGPATH_W) 'MotifDrop.cc'; else $(CYGPATH_W) '$(srcdir)/MotifDrop.cc'; fi`
+
+bin_MetviewUI-EditTransaction.o: EditTransaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditTransaction.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditTransaction.Tpo -c -o bin_MetviewUI-EditTransaction.o `test -f 'EditTransaction.cc' || echo '$(srcdir)/'`EditTransaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditTransaction.Tpo $(DEPDIR)/bin_MetviewUI-EditTransaction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditTransaction.cc' object='bin_MetviewUI-EditTransaction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditTransaction.o `test -f 'EditTransaction.cc' || echo '$(srcdir)/'`EditTransaction.cc
+
+bin_MetviewUI-EditTransaction.obj: EditTransaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditTransaction.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditTransaction.Tpo -c -o bin_MetviewUI-EditTransaction.obj `if test -f 'EditTransaction.cc'; then $(CYGPATH_W) 'EditTransaction.cc'; else $(CYGPATH_W) '$(srcdir)/EditTransaction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditTransaction.Tpo $(DEPDIR)/bin_MetviewUI-EditTransaction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditTransaction.cc' object='bin_MetviewUI-EditTransaction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditTransaction.obj `if test -f 'EditTransaction.cc'; then $(CYGPATH_W) 'EditTransaction.cc'; else $(CYGPATH_W) '$(srcdir)/EditTransaction.cc'; fi`
+
+bin_MetviewUI-Editor.o: Editor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Editor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Editor.Tpo -c -o bin_MetviewUI-Editor.o `test -f 'Editor.cc' || echo '$(srcdir)/'`Editor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Editor.Tpo $(DEPDIR)/bin_MetviewUI-Editor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Editor.cc' object='bin_MetviewUI-Editor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Editor.o `test -f 'Editor.cc' || echo '$(srcdir)/'`Editor.cc
+
+bin_MetviewUI-Editor.obj: Editor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Editor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Editor.Tpo -c -o bin_MetviewUI-Editor.obj `if test -f 'Editor.cc'; then $(CYGPATH_W) 'Editor.cc'; else $(CYGPATH_W) '$(srcdir)/Editor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Editor.Tpo $(DEPDIR)/bin_MetviewUI-Editor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Editor.cc' object='bin_MetviewUI-Editor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Editor.obj `if test -f 'Editor.cc'; then $(CYGPATH_W) 'Editor.cc'; else $(CYGPATH_W) '$(srcdir)/Editor.cc'; fi`
+
+bin_MetviewUI-EditorDrawer.o: EditorDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorDrawer.Tpo -c -o bin_MetviewUI-EditorDrawer.o `test -f 'EditorDrawer.cc' || echo '$(srcdir)/'`EditorDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorDrawer.Tpo $(DEPDIR)/bin_MetviewUI-EditorDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorDrawer.cc' object='bin_MetviewUI-EditorDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorDrawer.o `test -f 'EditorDrawer.cc' || echo '$(srcdir)/'`EditorDrawer.cc
+
+bin_MetviewUI-EditorDrawer.obj: EditorDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorDrawer.Tpo -c -o bin_MetviewUI-EditorDrawer.obj `if test -f 'EditorDrawer.cc'; then $(CYGPATH_W) 'EditorDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/EditorDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorDrawer.Tpo $(DEPDIR)/bin_MetviewUI-EditorDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorDrawer.cc' object='bin_MetviewUI-EditorDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorDrawer.obj `if test -f 'EditorDrawer.cc'; then $(CYGPATH_W) 'EditorDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/EditorDrawer.cc'; fi`
+
+bin_MetviewUI-EditorDrawerFactory.o: EditorDrawerFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorDrawerFactory.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Tpo -c -o bin_MetviewUI-EditorDrawerFactory.o `test -f 'EditorDrawerFactory.cc' || echo '$(srcdir)/'`EditorDrawerFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Tpo $(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorDrawerFactory.cc' object='bin_MetviewUI-EditorDrawerFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorDrawerFactory.o `test -f 'EditorDrawerFactory.cc' || echo '$(srcdir)/'`EditorDrawerFactory.cc
+
+bin_MetviewUI-EditorDrawerFactory.obj: EditorDrawerFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorDrawerFactory.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Tpo -c -o bin_MetviewUI-EditorDrawerFactory.obj `if test -f 'EditorDrawerFactory.cc'; then $(CYGPATH_W) 'EditorDrawerFactory.cc'; else $(CYGPATH_W) '$(srcdir)/EditorDrawerFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Tpo $(DEPDIR)/bin_MetviewUI-EditorDrawerFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorDrawerFactory.cc' object='bin_MetviewUI-EditorDrawerFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorDrawerFactory.obj `if test -f 'EditorDrawerFactory.cc'; then $(CYGPATH_W) 'EditorDrawerFactory.cc'; else $(CYGPATH_W) '$(srcdir)/EditorDrawerFactory.cc'; fi`
+
+bin_MetviewUI-EditorFactory.o: EditorFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorFactory.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorFactory.Tpo -c -o bin_MetviewUI-EditorFactory.o `test -f 'EditorFactory.cc' || echo '$(srcdir)/'`EditorFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorFactory.Tpo $(DEPDIR)/bin_MetviewUI-EditorFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorFactory.cc' object='bin_MetviewUI-EditorFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorFactory.o `test -f 'EditorFactory.cc' || echo '$(srcdir)/'`EditorFactory.cc
+
+bin_MetviewUI-EditorFactory.obj: EditorFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorFactory.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorFactory.Tpo -c -o bin_MetviewUI-EditorFactory.obj `if test -f 'EditorFactory.cc'; then $(CYGPATH_W) 'EditorFactory.cc'; else $(CYGPATH_W) '$(srcdir)/EditorFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorFactory.Tpo $(DEPDIR)/bin_MetviewUI-EditorFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorFactory.cc' object='bin_MetviewUI-EditorFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorFactory.obj `if test -f 'EditorFactory.cc'; then $(CYGPATH_W) 'EditorFactory.cc'; else $(CYGPATH_W) '$(srcdir)/EditorFactory.cc'; fi`
+
+bin_MetviewUI-EditorTool.o: EditorTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorTool.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorTool.Tpo -c -o bin_MetviewUI-EditorTool.o `test -f 'EditorTool.cc' || echo '$(srcdir)/'`EditorTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorTool.Tpo $(DEPDIR)/bin_MetviewUI-EditorTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorTool.cc' object='bin_MetviewUI-EditorTool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorTool.o `test -f 'EditorTool.cc' || echo '$(srcdir)/'`EditorTool.cc
+
+bin_MetviewUI-EditorTool.obj: EditorTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorTool.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorTool.Tpo -c -o bin_MetviewUI-EditorTool.obj `if test -f 'EditorTool.cc'; then $(CYGPATH_W) 'EditorTool.cc'; else $(CYGPATH_W) '$(srcdir)/EditorTool.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorTool.Tpo $(DEPDIR)/bin_MetviewUI-EditorTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorTool.cc' object='bin_MetviewUI-EditorTool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorTool.obj `if test -f 'EditorTool.cc'; then $(CYGPATH_W) 'EditorTool.cc'; else $(CYGPATH_W) '$(srcdir)/EditorTool.cc'; fi`
+
+bin_MetviewUI-EditorToolFactory.o: EditorToolFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorToolFactory.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorToolFactory.Tpo -c -o bin_MetviewUI-EditorToolFactory.o `test -f 'EditorToolFactory.cc' || echo '$(srcdir)/'`EditorToolFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorToolFactory.Tpo $(DEPDIR)/bin_MetviewUI-EditorToolFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorToolFactory.cc' object='bin_MetviewUI-EditorToolFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorToolFactory.o `test -f 'EditorToolFactory.cc' || echo '$(srcdir)/'`EditorToolFactory.cc
+
+bin_MetviewUI-EditorToolFactory.obj: EditorToolFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-EditorToolFactory.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-EditorToolFactory.Tpo -c -o bin_MetviewUI-EditorToolFactory.obj `if test -f 'EditorToolFactory.cc'; then $(CYGPATH_W) 'EditorToolFactory.cc'; else $(CYGPATH_W) '$(srcdir)/EditorToolFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-EditorToolFactory.Tpo $(DEPDIR)/bin_MetviewUI-EditorToolFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='EditorToolFactory.cc' object='bin_MetviewUI-EditorToolFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-EditorToolFactory.obj `if test -f 'EditorToolFactory.cc'; then $(CYGPATH_W) 'EditorToolFactory.cc'; else $(CYGPATH_W) '$(srcdir)/EditorToolFactory.cc'; fi`
+
+bin_MetviewUI-ExternalHelp.o: ExternalHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalHelp.Tpo -c -o bin_MetviewUI-ExternalHelp.o `test -f 'ExternalHelp.cc' || echo '$(srcdir)/'`ExternalHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalHelp.Tpo $(DEPDIR)/bin_MetviewUI-ExternalHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalHelp.cc' object='bin_MetviewUI-ExternalHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalHelp.o `test -f 'ExternalHelp.cc' || echo '$(srcdir)/'`ExternalHelp.cc
+
+bin_MetviewUI-ExternalHelp.obj: ExternalHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalHelp.Tpo -c -o bin_MetviewUI-ExternalHelp.obj `if test -f 'ExternalHelp.cc'; then $(CYGPATH_W) 'ExternalHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalHelp.Tpo $(DEPDIR)/bin_MetviewUI-ExternalHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalHelp.cc' object='bin_MetviewUI-ExternalHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalHelp.obj `if test -f 'ExternalHelp.cc'; then $(CYGPATH_W) 'ExternalHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalHelp.cc'; fi`
+
+bin_MetviewUI-Family.o: Family.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Family.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Family.Tpo -c -o bin_MetviewUI-Family.o `test -f 'Family.cc' || echo '$(srcdir)/'`Family.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Family.Tpo $(DEPDIR)/bin_MetviewUI-Family.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Family.cc' object='bin_MetviewUI-Family.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Family.o `test -f 'Family.cc' || echo '$(srcdir)/'`Family.cc
+
+bin_MetviewUI-Family.obj: Family.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Family.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Family.Tpo -c -o bin_MetviewUI-Family.obj `if test -f 'Family.cc'; then $(CYGPATH_W) 'Family.cc'; else $(CYGPATH_W) '$(srcdir)/Family.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Family.Tpo $(DEPDIR)/bin_MetviewUI-Family.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Family.cc' object='bin_MetviewUI-Family.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Family.obj `if test -f 'Family.cc'; then $(CYGPATH_W) 'Family.cc'; else $(CYGPATH_W) '$(srcdir)/Family.cc'; fi`
+
+bin_MetviewUI-FamilyHelper.o: FamilyHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FamilyHelper.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FamilyHelper.Tpo -c -o bin_MetviewUI-FamilyHelper.o `test -f 'FamilyHelper.cc' || echo '$(srcdir)/'`FamilyHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FamilyHelper.Tpo $(DEPDIR)/bin_MetviewUI-FamilyHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FamilyHelper.cc' object='bin_MetviewUI-FamilyHelper.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FamilyHelper.o `test -f 'FamilyHelper.cc' || echo '$(srcdir)/'`FamilyHelper.cc
+
+bin_MetviewUI-FamilyHelper.obj: FamilyHelper.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FamilyHelper.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FamilyHelper.Tpo -c -o bin_MetviewUI-FamilyHelper.obj `if test -f 'FamilyHelper.cc'; then $(CYGPATH_W) 'FamilyHelper.cc'; else $(CYGPATH_W) '$(srcdir)/FamilyHelper.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FamilyHelper.Tpo $(DEPDIR)/bin_MetviewUI-FamilyHelper.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FamilyHelper.cc' object='bin_MetviewUI-FamilyHelper.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FamilyHelper.obj `if test -f 'FamilyHelper.cc'; then $(CYGPATH_W) 'FamilyHelper.cc'; else $(CYGPATH_W) '$(srcdir)/FamilyHelper.cc'; fi`
+
+bin_MetviewUI-FamilyEditor.o: FamilyEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FamilyEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FamilyEditor.Tpo -c -o bin_MetviewUI-FamilyEditor.o `test -f 'FamilyEditor.cc' || echo '$(srcdir)/'`FamilyEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FamilyEditor.Tpo $(DEPDIR)/bin_MetviewUI-FamilyEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FamilyEditor.cc' object='bin_MetviewUI-FamilyEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FamilyEditor.o `test -f 'FamilyEditor.cc' || echo '$(srcdir)/'`FamilyEditor.cc
+
+bin_MetviewUI-FamilyEditor.obj: FamilyEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FamilyEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FamilyEditor.Tpo -c -o bin_MetviewUI-FamilyEditor.obj `if test -f 'FamilyEditor.cc'; then $(CYGPATH_W) 'FamilyEditor.cc'; else $(CYGPATH_W) '$(srcdir)/FamilyEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FamilyEditor.Tpo $(DEPDIR)/bin_MetviewUI-FamilyEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FamilyEditor.cc' object='bin_MetviewUI-FamilyEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FamilyEditor.obj `if test -f 'FamilyEditor.cc'; then $(CYGPATH_W) 'FamilyEditor.cc'; else $(CYGPATH_W) '$(srcdir)/FamilyEditor.cc'; fi`
+
+bin_MetviewUI-FileObject.o: FileObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FileObject.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FileObject.Tpo -c -o bin_MetviewUI-FileObject.o `test -f 'FileObject.cc' || echo '$(srcdir)/'`FileObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FileObject.Tpo $(DEPDIR)/bin_MetviewUI-FileObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FileObject.cc' object='bin_MetviewUI-FileObject.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FileObject.o `test -f 'FileObject.cc' || echo '$(srcdir)/'`FileObject.cc
+
+bin_MetviewUI-FileObject.obj: FileObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FileObject.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FileObject.Tpo -c -o bin_MetviewUI-FileObject.obj `if test -f 'FileObject.cc'; then $(CYGPATH_W) 'FileObject.cc'; else $(CYGPATH_W) '$(srcdir)/FileObject.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FileObject.Tpo $(DEPDIR)/bin_MetviewUI-FileObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FileObject.cc' object='bin_MetviewUI-FileObject.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FileObject.obj `if test -f 'FileObject.cc'; then $(CYGPATH_W) 'FileObject.cc'; else $(CYGPATH_W) '$(srcdir)/FileObject.cc'; fi`
+
+bin_MetviewUI-FileSelection.o: FileSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FileSelection.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FileSelection.Tpo -c -o bin_MetviewUI-FileSelection.o `test -f 'FileSelection.cc' || echo '$(srcdir)/'`FileSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FileSelection.Tpo $(DEPDIR)/bin_MetviewUI-FileSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FileSelection.cc' object='bin_MetviewUI-FileSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FileSelection.o `test -f 'FileSelection.cc' || echo '$(srcdir)/'`FileSelection.cc
+
+bin_MetviewUI-FileSelection.obj: FileSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FileSelection.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FileSelection.Tpo -c -o bin_MetviewUI-FileSelection.obj `if test -f 'FileSelection.cc'; then $(CYGPATH_W) 'FileSelection.cc'; else $(CYGPATH_W) '$(srcdir)/FileSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FileSelection.Tpo $(DEPDIR)/bin_MetviewUI-FileSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FileSelection.cc' object='bin_MetviewUI-FileSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FileSelection.obj `if test -f 'FileSelection.cc'; then $(CYGPATH_W) 'FileSelection.cc'; else $(CYGPATH_W) '$(srcdir)/FileSelection.cc'; fi`
+
+bin_MetviewUI-Folder.o: Folder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Folder.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Folder.Tpo -c -o bin_MetviewUI-Folder.o `test -f 'Folder.cc' || echo '$(srcdir)/'`Folder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Folder.Tpo $(DEPDIR)/bin_MetviewUI-Folder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Folder.cc' object='bin_MetviewUI-Folder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Folder.o `test -f 'Folder.cc' || echo '$(srcdir)/'`Folder.cc
+
+bin_MetviewUI-Folder.obj: Folder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Folder.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Folder.Tpo -c -o bin_MetviewUI-Folder.obj `if test -f 'Folder.cc'; then $(CYGPATH_W) 'Folder.cc'; else $(CYGPATH_W) '$(srcdir)/Folder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Folder.Tpo $(DEPDIR)/bin_MetviewUI-Folder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Folder.cc' object='bin_MetviewUI-Folder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Folder.obj `if test -f 'Folder.cc'; then $(CYGPATH_W) 'Folder.cc'; else $(CYGPATH_W) '$(srcdir)/Folder.cc'; fi`
+
+bin_MetviewUI-FolderDrawers.o: FolderDrawers.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FolderDrawers.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FolderDrawers.Tpo -c -o bin_MetviewUI-FolderDrawers.o `test -f 'FolderDrawers.cc' || echo '$(srcdir)/'`FolderDrawers.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FolderDrawers.Tpo $(DEPDIR)/bin_MetviewUI-FolderDrawers.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FolderDrawers.cc' object='bin_MetviewUI-FolderDrawers.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FolderDrawers.o `test -f 'FolderDrawers.cc' || echo '$(srcdir)/'`FolderDrawers.cc
+
+bin_MetviewUI-FolderDrawers.obj: FolderDrawers.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FolderDrawers.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FolderDrawers.Tpo -c -o bin_MetviewUI-FolderDrawers.obj `if test -f 'FolderDrawers.cc'; then $(CYGPATH_W) 'FolderDrawers.cc'; else $(CYGPATH_W) '$(srcdir)/FolderDrawers.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FolderDrawers.Tpo $(DEPDIR)/bin_MetviewUI-FolderDrawers.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FolderDrawers.cc' object='bin_MetviewUI-FolderDrawers.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FolderDrawers.obj `if test -f 'FolderDrawers.cc'; then $(CYGPATH_W) 'FolderDrawers.cc'; else $(CYGPATH_W) '$(srcdir)/FolderDrawers.cc'; fi`
+
+bin_MetviewUI-FolderViewer.o: FolderViewer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FolderViewer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FolderViewer.Tpo -c -o bin_MetviewUI-FolderViewer.o `test -f 'FolderViewer.cc' || echo '$(srcdir)/'`FolderViewer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FolderViewer.Tpo $(DEPDIR)/bin_MetviewUI-FolderViewer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FolderViewer.cc' object='bin_MetviewUI-FolderViewer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FolderViewer.o `test -f 'FolderViewer.cc' || echo '$(srcdir)/'`FolderViewer.cc
+
+bin_MetviewUI-FolderViewer.obj: FolderViewer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FolderViewer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FolderViewer.Tpo -c -o bin_MetviewUI-FolderViewer.obj `if test -f 'FolderViewer.cc'; then $(CYGPATH_W) 'FolderViewer.cc'; else $(CYGPATH_W) '$(srcdir)/FolderViewer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FolderViewer.Tpo $(DEPDIR)/bin_MetviewUI-FolderViewer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FolderViewer.cc' object='bin_MetviewUI-FolderViewer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FolderViewer.obj `if test -f 'FolderViewer.cc'; then $(CYGPATH_W) 'FolderViewer.cc'; else $(CYGPATH_W) '$(srcdir)/FolderViewer.cc'; fi`
+
+bin_MetviewUI-FolderWindow.o: FolderWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FolderWindow.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FolderWindow.Tpo -c -o bin_MetviewUI-FolderWindow.o `test -f 'FolderWindow.cc' || echo '$(srcdir)/'`FolderWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FolderWindow.Tpo $(DEPDIR)/bin_MetviewUI-FolderWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FolderWindow.cc' object='bin_MetviewUI-FolderWindow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FolderWindow.o `test -f 'FolderWindow.cc' || echo '$(srcdir)/'`FolderWindow.cc
+
+bin_MetviewUI-FolderWindow.obj: FolderWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-FolderWindow.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-FolderWindow.Tpo -c -o bin_MetviewUI-FolderWindow.obj `if test -f 'FolderWindow.cc'; then $(CYGPATH_W) 'FolderWindow.cc'; else $(CYGPATH_W) '$(srcdir)/FolderWindow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-FolderWindow.Tpo $(DEPDIR)/bin_MetviewUI-FolderWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='FolderWindow.cc' object='bin_MetviewUI-FolderWindow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-FolderWindow.obj `if test -f 'FolderWindow.cc'; then $(CYGPATH_W) 'FolderWindow.cc'; else $(CYGPATH_W) '$(srcdir)/FolderWindow.cc'; fi`
+
+bin_MetviewUI-HelpFactory.o: HelpFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-HelpFactory.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-HelpFactory.Tpo -c -o bin_MetviewUI-HelpFactory.o `test -f 'HelpFactory.cc' || echo '$(srcdir)/'`HelpFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-HelpFactory.Tpo $(DEPDIR)/bin_MetviewUI-HelpFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='HelpFactory.cc' object='bin_MetviewUI-HelpFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-HelpFactory.o `test -f 'HelpFactory.cc' || echo '$(srcdir)/'`HelpFactory.cc
+
+bin_MetviewUI-HelpFactory.obj: HelpFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-HelpFactory.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-HelpFactory.Tpo -c -o bin_MetviewUI-HelpFactory.obj `if test -f 'HelpFactory.cc'; then $(CYGPATH_W) 'HelpFactory.cc'; else $(CYGPATH_W) '$(srcdir)/HelpFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-HelpFactory.Tpo $(DEPDIR)/bin_MetviewUI-HelpFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='HelpFactory.cc' object='bin_MetviewUI-HelpFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-HelpFactory.obj `if test -f 'HelpFactory.cc'; then $(CYGPATH_W) 'HelpFactory.cc'; else $(CYGPATH_W) '$(srcdir)/HelpFactory.cc'; fi`
+
+bin_MetviewUI-IconClass.o: IconClass.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconClass.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconClass.Tpo -c -o bin_MetviewUI-IconClass.o `test -f 'IconClass.cc' || echo '$(srcdir)/'`IconClass.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconClass.Tpo $(DEPDIR)/bin_MetviewUI-IconClass.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconClass.cc' object='bin_MetviewUI-IconClass.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconClass.o `test -f 'IconClass.cc' || echo '$(srcdir)/'`IconClass.cc
+
+bin_MetviewUI-IconClass.obj: IconClass.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconClass.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconClass.Tpo -c -o bin_MetviewUI-IconClass.obj `if test -f 'IconClass.cc'; then $(CYGPATH_W) 'IconClass.cc'; else $(CYGPATH_W) '$(srcdir)/IconClass.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconClass.Tpo $(DEPDIR)/bin_MetviewUI-IconClass.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconClass.cc' object='bin_MetviewUI-IconClass.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconClass.obj `if test -f 'IconClass.cc'; then $(CYGPATH_W) 'IconClass.cc'; else $(CYGPATH_W) '$(srcdir)/IconClass.cc'; fi`
+
+bin_MetviewUI-IconDrawer.o: IconDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconDrawer.Tpo -c -o bin_MetviewUI-IconDrawer.o `test -f 'IconDrawer.cc' || echo '$(srcdir)/'`IconDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconDrawer.Tpo $(DEPDIR)/bin_MetviewUI-IconDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconDrawer.cc' object='bin_MetviewUI-IconDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconDrawer.o `test -f 'IconDrawer.cc' || echo '$(srcdir)/'`IconDrawer.cc
+
+bin_MetviewUI-IconDrawer.obj: IconDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconDrawer.Tpo -c -o bin_MetviewUI-IconDrawer.obj `if test -f 'IconDrawer.cc'; then $(CYGPATH_W) 'IconDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/IconDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconDrawer.Tpo $(DEPDIR)/bin_MetviewUI-IconDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconDrawer.cc' object='bin_MetviewUI-IconDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconDrawer.obj `if test -f 'IconDrawer.cc'; then $(CYGPATH_W) 'IconDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/IconDrawer.cc'; fi`
+
+bin_MetviewUI-IconFactory.o: IconFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconFactory.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconFactory.Tpo -c -o bin_MetviewUI-IconFactory.o `test -f 'IconFactory.cc' || echo '$(srcdir)/'`IconFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconFactory.Tpo $(DEPDIR)/bin_MetviewUI-IconFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconFactory.cc' object='bin_MetviewUI-IconFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconFactory.o `test -f 'IconFactory.cc' || echo '$(srcdir)/'`IconFactory.cc
+
+bin_MetviewUI-IconFactory.obj: IconFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconFactory.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconFactory.Tpo -c -o bin_MetviewUI-IconFactory.obj `if test -f 'IconFactory.cc'; then $(CYGPATH_W) 'IconFactory.cc'; else $(CYGPATH_W) '$(srcdir)/IconFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconFactory.Tpo $(DEPDIR)/bin_MetviewUI-IconFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconFactory.cc' object='bin_MetviewUI-IconFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconFactory.obj `if test -f 'IconFactory.cc'; then $(CYGPATH_W) 'IconFactory.cc'; else $(CYGPATH_W) '$(srcdir)/IconFactory.cc'; fi`
+
+bin_MetviewUI-IconHelp.o: IconHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconHelp.Tpo -c -o bin_MetviewUI-IconHelp.o `test -f 'IconHelp.cc' || echo '$(srcdir)/'`IconHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconHelp.Tpo $(DEPDIR)/bin_MetviewUI-IconHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconHelp.cc' object='bin_MetviewUI-IconHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconHelp.o `test -f 'IconHelp.cc' || echo '$(srcdir)/'`IconHelp.cc
+
+bin_MetviewUI-IconHelp.obj: IconHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconHelp.Tpo -c -o bin_MetviewUI-IconHelp.obj `if test -f 'IconHelp.cc'; then $(CYGPATH_W) 'IconHelp.cc'; else $(CYGPATH_W) '$(srcdir)/IconHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconHelp.Tpo $(DEPDIR)/bin_MetviewUI-IconHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconHelp.cc' object='bin_MetviewUI-IconHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconHelp.obj `if test -f 'IconHelp.cc'; then $(CYGPATH_W) 'IconHelp.cc'; else $(CYGPATH_W) '$(srcdir)/IconHelp.cc'; fi`
+
+bin_MetviewUI-IconHolder.o: IconHolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconHolder.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconHolder.Tpo -c -o bin_MetviewUI-IconHolder.o `test -f 'IconHolder.cc' || echo '$(srcdir)/'`IconHolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconHolder.Tpo $(DEPDIR)/bin_MetviewUI-IconHolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconHolder.cc' object='bin_MetviewUI-IconHolder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconHolder.o `test -f 'IconHolder.cc' || echo '$(srcdir)/'`IconHolder.cc
+
+bin_MetviewUI-IconHolder.obj: IconHolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconHolder.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconHolder.Tpo -c -o bin_MetviewUI-IconHolder.obj `if test -f 'IconHolder.cc'; then $(CYGPATH_W) 'IconHolder.cc'; else $(CYGPATH_W) '$(srcdir)/IconHolder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconHolder.Tpo $(DEPDIR)/bin_MetviewUI-IconHolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconHolder.cc' object='bin_MetviewUI-IconHolder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconHolder.obj `if test -f 'IconHolder.cc'; then $(CYGPATH_W) 'IconHolder.cc'; else $(CYGPATH_W) '$(srcdir)/IconHolder.cc'; fi`
+
+bin_MetviewUI-IconInfo.o: IconInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconInfo.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconInfo.Tpo -c -o bin_MetviewUI-IconInfo.o `test -f 'IconInfo.cc' || echo '$(srcdir)/'`IconInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconInfo.Tpo $(DEPDIR)/bin_MetviewUI-IconInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconInfo.cc' object='bin_MetviewUI-IconInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconInfo.o `test -f 'IconInfo.cc' || echo '$(srcdir)/'`IconInfo.cc
+
+bin_MetviewUI-IconInfo.obj: IconInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconInfo.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconInfo.Tpo -c -o bin_MetviewUI-IconInfo.obj `if test -f 'IconInfo.cc'; then $(CYGPATH_W) 'IconInfo.cc'; else $(CYGPATH_W) '$(srcdir)/IconInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconInfo.Tpo $(DEPDIR)/bin_MetviewUI-IconInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconInfo.cc' object='bin_MetviewUI-IconInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconInfo.obj `if test -f 'IconInfo.cc'; then $(CYGPATH_W) 'IconInfo.cc'; else $(CYGPATH_W) '$(srcdir)/IconInfo.cc'; fi`
+
+bin_MetviewUI-IconLine.o: IconLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconLine.Tpo -c -o bin_MetviewUI-IconLine.o `test -f 'IconLine.cc' || echo '$(srcdir)/'`IconLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconLine.Tpo $(DEPDIR)/bin_MetviewUI-IconLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconLine.cc' object='bin_MetviewUI-IconLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconLine.o `test -f 'IconLine.cc' || echo '$(srcdir)/'`IconLine.cc
+
+bin_MetviewUI-IconLine.obj: IconLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconLine.Tpo -c -o bin_MetviewUI-IconLine.obj `if test -f 'IconLine.cc'; then $(CYGPATH_W) 'IconLine.cc'; else $(CYGPATH_W) '$(srcdir)/IconLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconLine.Tpo $(DEPDIR)/bin_MetviewUI-IconLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconLine.cc' object='bin_MetviewUI-IconLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconLine.obj `if test -f 'IconLine.cc'; then $(CYGPATH_W) 'IconLine.cc'; else $(CYGPATH_W) '$(srcdir)/IconLine.cc'; fi`
+
+bin_MetviewUI-IconObject.o: IconObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconObject.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconObject.Tpo -c -o bin_MetviewUI-IconObject.o `test -f 'IconObject.cc' || echo '$(srcdir)/'`IconObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconObject.Tpo $(DEPDIR)/bin_MetviewUI-IconObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconObject.cc' object='bin_MetviewUI-IconObject.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconObject.o `test -f 'IconObject.cc' || echo '$(srcdir)/'`IconObject.cc
+
+bin_MetviewUI-IconObject.obj: IconObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconObject.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconObject.Tpo -c -o bin_MetviewUI-IconObject.obj `if test -f 'IconObject.cc'; then $(CYGPATH_W) 'IconObject.cc'; else $(CYGPATH_W) '$(srcdir)/IconObject.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconObject.Tpo $(DEPDIR)/bin_MetviewUI-IconObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconObject.cc' object='bin_MetviewUI-IconObject.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconObject.obj `if test -f 'IconObject.cc'; then $(CYGPATH_W) 'IconObject.cc'; else $(CYGPATH_W) '$(srcdir)/IconObject.cc'; fi`
+
+bin_MetviewUI-IconSelection.o: IconSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconSelection.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconSelection.Tpo -c -o bin_MetviewUI-IconSelection.o `test -f 'IconSelection.cc' || echo '$(srcdir)/'`IconSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconSelection.Tpo $(DEPDIR)/bin_MetviewUI-IconSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconSelection.cc' object='bin_MetviewUI-IconSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconSelection.o `test -f 'IconSelection.cc' || echo '$(srcdir)/'`IconSelection.cc
+
+bin_MetviewUI-IconSelection.obj: IconSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-IconSelection.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-IconSelection.Tpo -c -o bin_MetviewUI-IconSelection.obj `if test -f 'IconSelection.cc'; then $(CYGPATH_W) 'IconSelection.cc'; else $(CYGPATH_W) '$(srcdir)/IconSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-IconSelection.Tpo $(DEPDIR)/bin_MetviewUI-IconSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='IconSelection.cc' object='bin_MetviewUI-IconSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-IconSelection.obj `if test -f 'IconSelection.cc'; then $(CYGPATH_W) 'IconSelection.cc'; else $(CYGPATH_W) '$(srcdir)/IconSelection.cc'; fi`
+
+bin_MetviewUI-Input.o: Input.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Input.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Input.Tpo -c -o bin_MetviewUI-Input.o `test -f 'Input.cc' || echo '$(srcdir)/'`Input.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Input.Tpo $(DEPDIR)/bin_MetviewUI-Input.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Input.cc' object='bin_MetviewUI-Input.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Input.o `test -f 'Input.cc' || echo '$(srcdir)/'`Input.cc
+
+bin_MetviewUI-Input.obj: Input.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Input.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Input.Tpo -c -o bin_MetviewUI-Input.obj `if test -f 'Input.cc'; then $(CYGPATH_W) 'Input.cc'; else $(CYGPATH_W) '$(srcdir)/Input.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Input.Tpo $(DEPDIR)/bin_MetviewUI-Input.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Input.cc' object='bin_MetviewUI-Input.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Input.obj `if test -f 'Input.cc'; then $(CYGPATH_W) 'Input.cc'; else $(CYGPATH_W) '$(srcdir)/Input.cc'; fi`
+
+bin_MetviewUI-InternalService.o: InternalService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-InternalService.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-InternalService.Tpo -c -o bin_MetviewUI-InternalService.o `test -f 'InternalService.cc' || echo '$(srcdir)/'`InternalService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-InternalService.Tpo $(DEPDIR)/bin_MetviewUI-InternalService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InternalService.cc' object='bin_MetviewUI-InternalService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-InternalService.o `test -f 'InternalService.cc' || echo '$(srcdir)/'`InternalService.cc
+
+bin_MetviewUI-InternalService.obj: InternalService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-InternalService.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-InternalService.Tpo -c -o bin_MetviewUI-InternalService.obj `if test -f 'InternalService.cc'; then $(CYGPATH_W) 'InternalService.cc'; else $(CYGPATH_W) '$(srcdir)/InternalService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-InternalService.Tpo $(DEPDIR)/bin_MetviewUI-InternalService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InternalService.cc' object='bin_MetviewUI-InternalService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-InternalService.obj `if test -f 'InternalService.cc'; then $(CYGPATH_W) 'InternalService.cc'; else $(CYGPATH_W) '$(srcdir)/InternalService.cc'; fi`
+
+bin_MetviewUI-InternalTask.o: InternalTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-InternalTask.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-InternalTask.Tpo -c -o bin_MetviewUI-InternalTask.o `test -f 'InternalTask.cc' || echo '$(srcdir)/'`InternalTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-InternalTask.Tpo $(DEPDIR)/bin_MetviewUI-InternalTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InternalTask.cc' object='bin_MetviewUI-InternalTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-InternalTask.o `test -f 'InternalTask.cc' || echo '$(srcdir)/'`InternalTask.cc
+
+bin_MetviewUI-InternalTask.obj: InternalTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-InternalTask.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-InternalTask.Tpo -c -o bin_MetviewUI-InternalTask.obj `if test -f 'InternalTask.cc'; then $(CYGPATH_W) 'InternalTask.cc'; else $(CYGPATH_W) '$(srcdir)/InternalTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-InternalTask.Tpo $(DEPDIR)/bin_MetviewUI-InternalTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InternalTask.cc' object='bin_MetviewUI-InternalTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-InternalTask.obj `if test -f 'InternalTask.cc'; then $(CYGPATH_W) 'InternalTask.cc'; else $(CYGPATH_W) '$(srcdir)/InternalTask.cc'; fi`
+
+bin_MetviewUI-ViewsDrawer.o: ViewsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ViewsDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ViewsDrawer.Tpo -c -o bin_MetviewUI-ViewsDrawer.o `test -f 'ViewsDrawer.cc' || echo '$(srcdir)/'`ViewsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ViewsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-ViewsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ViewsDrawer.cc' object='bin_MetviewUI-ViewsDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ViewsDrawer.o `test -f 'ViewsDrawer.cc' || echo '$(srcdir)/'`ViewsDrawer.cc
+
+bin_MetviewUI-ViewsDrawer.obj: ViewsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ViewsDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ViewsDrawer.Tpo -c -o bin_MetviewUI-ViewsDrawer.obj `if test -f 'ViewsDrawer.cc'; then $(CYGPATH_W) 'ViewsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/ViewsDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ViewsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-ViewsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ViewsDrawer.cc' object='bin_MetviewUI-ViewsDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ViewsDrawer.obj `if test -f 'ViewsDrawer.cc'; then $(CYGPATH_W) 'ViewsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/ViewsDrawer.cc'; fi`
+
+bin_MetviewUI-Items.o: Items.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Items.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Items.Tpo -c -o bin_MetviewUI-Items.o `test -f 'Items.cc' || echo '$(srcdir)/'`Items.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Items.Tpo $(DEPDIR)/bin_MetviewUI-Items.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Items.cc' object='bin_MetviewUI-Items.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Items.o `test -f 'Items.cc' || echo '$(srcdir)/'`Items.cc
+
+bin_MetviewUI-Items.obj: Items.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Items.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Items.Tpo -c -o bin_MetviewUI-Items.obj `if test -f 'Items.cc'; then $(CYGPATH_W) 'Items.cc'; else $(CYGPATH_W) '$(srcdir)/Items.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Items.Tpo $(DEPDIR)/bin_MetviewUI-Items.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Items.cc' object='bin_MetviewUI-Items.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Items.obj `if test -f 'Items.cc'; then $(CYGPATH_W) 'Items.cc'; else $(CYGPATH_W) '$(srcdir)/Items.cc'; fi`
+
+bin_MetviewUI-Language.o: Language.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Language.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Language.Tpo -c -o bin_MetviewUI-Language.o `test -f 'Language.cc' || echo '$(srcdir)/'`Language.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Language.Tpo $(DEPDIR)/bin_MetviewUI-Language.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Language.cc' object='bin_MetviewUI-Language.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Language.o `test -f 'Language.cc' || echo '$(srcdir)/'`Language.cc
+
+bin_MetviewUI-Language.obj: Language.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Language.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Language.Tpo -c -o bin_MetviewUI-Language.obj `if test -f 'Language.cc'; then $(CYGPATH_W) 'Language.cc'; else $(CYGPATH_W) '$(srcdir)/Language.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Language.Tpo $(DEPDIR)/bin_MetviewUI-Language.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Language.cc' object='bin_MetviewUI-Language.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Language.obj `if test -f 'Language.cc'; then $(CYGPATH_W) 'Language.cc'; else $(CYGPATH_W) '$(srcdir)/Language.cc'; fi`
+
+bin_MetviewUI-LayoutDrawer.o: LayoutDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-LayoutDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-LayoutDrawer.Tpo -c -o bin_MetviewUI-LayoutDrawer.o `test -f 'LayoutDrawer.cc' || echo '$(srcdir)/'`LayoutDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-LayoutDrawer.Tpo $(DEPDIR)/bin_MetviewUI-LayoutDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LayoutDrawer.cc' object='bin_MetviewUI-LayoutDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-LayoutDrawer.o `test -f 'LayoutDrawer.cc' || echo '$(srcdir)/'`LayoutDrawer.cc
+
+bin_MetviewUI-LayoutDrawer.obj: LayoutDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-LayoutDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-LayoutDrawer.Tpo -c -o bin_MetviewUI-LayoutDrawer.obj `if test -f 'LayoutDrawer.cc'; then $(CYGPATH_W) 'LayoutDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/LayoutDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-LayoutDrawer.Tpo $(DEPDIR)/bin_MetviewUI-LayoutDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LayoutDrawer.cc' object='bin_MetviewUI-LayoutDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-LayoutDrawer.obj `if test -f 'LayoutDrawer.cc'; then $(CYGPATH_W) 'LayoutDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/LayoutDrawer.cc'; fi`
+
+bin_MetviewUI-LineFactory.o: LineFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-LineFactory.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-LineFactory.Tpo -c -o bin_MetviewUI-LineFactory.o `test -f 'LineFactory.cc' || echo '$(srcdir)/'`LineFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-LineFactory.Tpo $(DEPDIR)/bin_MetviewUI-LineFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LineFactory.cc' object='bin_MetviewUI-LineFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-LineFactory.o `test -f 'LineFactory.cc' || echo '$(srcdir)/'`LineFactory.cc
+
+bin_MetviewUI-LineFactory.obj: LineFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-LineFactory.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-LineFactory.Tpo -c -o bin_MetviewUI-LineFactory.obj `if test -f 'LineFactory.cc'; then $(CYGPATH_W) 'LineFactory.cc'; else $(CYGPATH_W) '$(srcdir)/LineFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-LineFactory.Tpo $(DEPDIR)/bin_MetviewUI-LineFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LineFactory.cc' object='bin_MetviewUI-LineFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-LineFactory.obj `if test -f 'LineFactory.cc'; then $(CYGPATH_W) 'LineFactory.cc'; else $(CYGPATH_W) '$(srcdir)/LineFactory.cc'; fi`
+
+bin_MetviewUI-ListHelp.o: ListHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ListHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ListHelp.Tpo -c -o bin_MetviewUI-ListHelp.o `test -f 'ListHelp.cc' || echo '$(srcdir)/'`ListHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ListHelp.Tpo $(DEPDIR)/bin_MetviewUI-ListHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ListHelp.cc' object='bin_MetviewUI-ListHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ListHelp.o `test -f 'ListHelp.cc' || echo '$(srcdir)/'`ListHelp.cc
+
+bin_MetviewUI-ListHelp.obj: ListHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ListHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ListHelp.Tpo -c -o bin_MetviewUI-ListHelp.obj `if test -f 'ListHelp.cc'; then $(CYGPATH_W) 'ListHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ListHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ListHelp.Tpo $(DEPDIR)/bin_MetviewUI-ListHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ListHelp.cc' object='bin_MetviewUI-ListHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ListHelp.obj `if test -f 'ListHelp.cc'; then $(CYGPATH_W) 'ListHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ListHelp.cc'; fi`
+
+bin_MetviewUI-Log.o: Log.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Log.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Log.Tpo -c -o bin_MetviewUI-Log.o `test -f 'Log.cc' || echo '$(srcdir)/'`Log.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Log.Tpo $(DEPDIR)/bin_MetviewUI-Log.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Log.cc' object='bin_MetviewUI-Log.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Log.o `test -f 'Log.cc' || echo '$(srcdir)/'`Log.cc
+
+bin_MetviewUI-Log.obj: Log.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Log.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Log.Tpo -c -o bin_MetviewUI-Log.obj `if test -f 'Log.cc'; then $(CYGPATH_W) 'Log.cc'; else $(CYGPATH_W) '$(srcdir)/Log.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Log.Tpo $(DEPDIR)/bin_MetviewUI-Log.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Log.cc' object='bin_MetviewUI-Log.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Log.obj `if test -f 'Log.cc'; then $(CYGPATH_W) 'Log.cc'; else $(CYGPATH_W) '$(srcdir)/Log.cc'; fi`
+
+bin_MetviewUI-TeeBuffer.o: TeeBuffer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TeeBuffer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TeeBuffer.Tpo -c -o bin_MetviewUI-TeeBuffer.o `test -f 'TeeBuffer.cc' || echo '$(srcdir)/'`TeeBuffer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TeeBuffer.Tpo $(DEPDIR)/bin_MetviewUI-TeeBuffer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TeeBuffer.cc' object='bin_MetviewUI-TeeBuffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TeeBuffer.o `test -f 'TeeBuffer.cc' || echo '$(srcdir)/'`TeeBuffer.cc
+
+bin_MetviewUI-TeeBuffer.obj: TeeBuffer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TeeBuffer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TeeBuffer.Tpo -c -o bin_MetviewUI-TeeBuffer.obj `if test -f 'TeeBuffer.cc'; then $(CYGPATH_W) 'TeeBuffer.cc'; else $(CYGPATH_W) '$(srcdir)/TeeBuffer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TeeBuffer.Tpo $(DEPDIR)/bin_MetviewUI-TeeBuffer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TeeBuffer.cc' object='bin_MetviewUI-TeeBuffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TeeBuffer.obj `if test -f 'TeeBuffer.cc'; then $(CYGPATH_W) 'TeeBuffer.cc'; else $(CYGPATH_W) '$(srcdir)/TeeBuffer.cc'; fi`
+
+bin_MetviewUI-TeeStream.o: TeeStream.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TeeStream.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TeeStream.Tpo -c -o bin_MetviewUI-TeeStream.o `test -f 'TeeStream.cc' || echo '$(srcdir)/'`TeeStream.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TeeStream.Tpo $(DEPDIR)/bin_MetviewUI-TeeStream.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TeeStream.cc' object='bin_MetviewUI-TeeStream.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TeeStream.o `test -f 'TeeStream.cc' || echo '$(srcdir)/'`TeeStream.cc
+
+bin_MetviewUI-TeeStream.obj: TeeStream.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TeeStream.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TeeStream.Tpo -c -o bin_MetviewUI-TeeStream.obj `if test -f 'TeeStream.cc'; then $(CYGPATH_W) 'TeeStream.cc'; else $(CYGPATH_W) '$(srcdir)/TeeStream.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TeeStream.Tpo $(DEPDIR)/bin_MetviewUI-TeeStream.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TeeStream.cc' object='bin_MetviewUI-TeeStream.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TeeStream.obj `if test -f 'TeeStream.cc'; then $(CYGPATH_W) 'TeeStream.cc'; else $(CYGPATH_W) '$(srcdir)/TeeStream.cc'; fi`
+
+bin_MetviewUI-LogWindow.o: LogWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-LogWindow.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-LogWindow.Tpo -c -o bin_MetviewUI-LogWindow.o `test -f 'LogWindow.cc' || echo '$(srcdir)/'`LogWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-LogWindow.Tpo $(DEPDIR)/bin_MetviewUI-LogWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LogWindow.cc' object='bin_MetviewUI-LogWindow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-LogWindow.o `test -f 'LogWindow.cc' || echo '$(srcdir)/'`LogWindow.cc
+
+bin_MetviewUI-LogWindow.obj: LogWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-LogWindow.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-LogWindow.Tpo -c -o bin_MetviewUI-LogWindow.obj `if test -f 'LogWindow.cc'; then $(CYGPATH_W) 'LogWindow.cc'; else $(CYGPATH_W) '$(srcdir)/LogWindow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-LogWindow.Tpo $(DEPDIR)/bin_MetviewUI-LogWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LogWindow.cc' object='bin_MetviewUI-LogWindow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-LogWindow.obj `if test -f 'LogWindow.cc'; then $(CYGPATH_W) 'LogWindow.cc'; else $(CYGPATH_W) '$(srcdir)/LogWindow.cc'; fi`
+
+bin_MetviewUI-Netscape.o: Netscape.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Netscape.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Netscape.Tpo -c -o bin_MetviewUI-Netscape.o `test -f 'Netscape.cc' || echo '$(srcdir)/'`Netscape.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Netscape.Tpo $(DEPDIR)/bin_MetviewUI-Netscape.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Netscape.cc' object='bin_MetviewUI-Netscape.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Netscape.o `test -f 'Netscape.cc' || echo '$(srcdir)/'`Netscape.cc
+
+bin_MetviewUI-Netscape.obj: Netscape.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Netscape.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Netscape.Tpo -c -o bin_MetviewUI-Netscape.obj `if test -f 'Netscape.cc'; then $(CYGPATH_W) 'Netscape.cc'; else $(CYGPATH_W) '$(srcdir)/Netscape.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Netscape.Tpo $(DEPDIR)/bin_MetviewUI-Netscape.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Netscape.cc' object='bin_MetviewUI-Netscape.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Netscape.obj `if test -f 'Netscape.cc'; then $(CYGPATH_W) 'Netscape.cc'; else $(CYGPATH_W) '$(srcdir)/Netscape.cc'; fi`
+
+bin_MetviewUI-Help.o: Help.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Help.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Help.Tpo -c -o bin_MetviewUI-Help.o `test -f 'Help.cc' || echo '$(srcdir)/'`Help.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Help.Tpo $(DEPDIR)/bin_MetviewUI-Help.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Help.cc' object='bin_MetviewUI-Help.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Help.o `test -f 'Help.cc' || echo '$(srcdir)/'`Help.cc
+
+bin_MetviewUI-Help.obj: Help.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Help.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Help.Tpo -c -o bin_MetviewUI-Help.obj `if test -f 'Help.cc'; then $(CYGPATH_W) 'Help.cc'; else $(CYGPATH_W) '$(srcdir)/Help.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Help.Tpo $(DEPDIR)/bin_MetviewUI-Help.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Help.cc' object='bin_MetviewUI-Help.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Help.obj `if test -f 'Help.cc'; then $(CYGPATH_W) 'Help.cc'; else $(CYGPATH_W) '$(srcdir)/Help.cc'; fi`
+
+bin_MetviewUI-MacroEditor.o: MacroEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroEditor.Tpo -c -o bin_MetviewUI-MacroEditor.o `test -f 'MacroEditor.cc' || echo '$(srcdir)/'`MacroEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroEditor.Tpo $(DEPDIR)/bin_MetviewUI-MacroEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEditor.cc' object='bin_MetviewUI-MacroEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroEditor.o `test -f 'MacroEditor.cc' || echo '$(srcdir)/'`MacroEditor.cc
+
+bin_MetviewUI-MacroEditor.obj: MacroEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroEditor.Tpo -c -o bin_MetviewUI-MacroEditor.obj `if test -f 'MacroEditor.cc'; then $(CYGPATH_W) 'MacroEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroEditor.Tpo $(DEPDIR)/bin_MetviewUI-MacroEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroEditor.cc' object='bin_MetviewUI-MacroEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroEditor.obj `if test -f 'MacroEditor.cc'; then $(CYGPATH_W) 'MacroEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroEditor.cc'; fi`
+
+bin_MetviewUI-MacroParam.o: MacroParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroParam.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroParam.Tpo -c -o bin_MetviewUI-MacroParam.o `test -f 'MacroParam.cc' || echo '$(srcdir)/'`MacroParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroParam.Tpo $(DEPDIR)/bin_MetviewUI-MacroParam.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroParam.cc' object='bin_MetviewUI-MacroParam.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroParam.o `test -f 'MacroParam.cc' || echo '$(srcdir)/'`MacroParam.cc
+
+bin_MetviewUI-MacroParam.obj: MacroParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroParam.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroParam.Tpo -c -o bin_MetviewUI-MacroParam.obj `if test -f 'MacroParam.cc'; then $(CYGPATH_W) 'MacroParam.cc'; else $(CYGPATH_W) '$(srcdir)/MacroParam.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroParam.Tpo $(DEPDIR)/bin_MetviewUI-MacroParam.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroParam.cc' object='bin_MetviewUI-MacroParam.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroParam.obj `if test -f 'MacroParam.cc'; then $(CYGPATH_W) 'MacroParam.cc'; else $(CYGPATH_W) '$(srcdir)/MacroParam.cc'; fi`
+
+bin_MetviewUI-MacroParamEditor.o: MacroParamEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroParamEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroParamEditor.Tpo -c -o bin_MetviewUI-MacroParamEditor.o `test -f 'MacroParamEditor.cc' || echo '$(srcdir)/'`MacroParamEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroParamEditor.Tpo $(DEPDIR)/bin_MetviewUI-MacroParamEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroParamEditor.cc' object='bin_MetviewUI-MacroParamEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroParamEditor.o `test -f 'MacroParamEditor.cc' || echo '$(srcdir)/'`MacroParamEditor.cc
+
+bin_MetviewUI-MacroParamEditor.obj: MacroParamEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroParamEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroParamEditor.Tpo -c -o bin_MetviewUI-MacroParamEditor.obj `if test -f 'MacroParamEditor.cc'; then $(CYGPATH_W) 'MacroParamEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroParamEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroParamEditor.Tpo $(DEPDIR)/bin_MetviewUI-MacroParamEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroParamEditor.cc' object='bin_MetviewUI-MacroParamEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroParamEditor.obj `if test -f 'MacroParamEditor.cc'; then $(CYGPATH_W) 'MacroParamEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroParamEditor.cc'; fi`
+
+bin_MetviewUI-MacroParamState.o: MacroParamState.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroParamState.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroParamState.Tpo -c -o bin_MetviewUI-MacroParamState.o `test -f 'MacroParamState.cc' || echo '$(srcdir)/'`MacroParamState.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroParamState.Tpo $(DEPDIR)/bin_MetviewUI-MacroParamState.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroParamState.cc' object='bin_MetviewUI-MacroParamState.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroParamState.o `test -f 'MacroParamState.cc' || echo '$(srcdir)/'`MacroParamState.cc
+
+bin_MetviewUI-MacroParamState.obj: MacroParamState.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroParamState.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroParamState.Tpo -c -o bin_MetviewUI-MacroParamState.obj `if test -f 'MacroParamState.cc'; then $(CYGPATH_W) 'MacroParamState.cc'; else $(CYGPATH_W) '$(srcdir)/MacroParamState.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroParamState.Tpo $(DEPDIR)/bin_MetviewUI-MacroParamState.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroParamState.cc' object='bin_MetviewUI-MacroParamState.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroParamState.obj `if test -f 'MacroParamState.cc'; then $(CYGPATH_W) 'MacroParamState.cc'; else $(CYGPATH_W) '$(srcdir)/MacroParamState.cc'; fi`
+
+bin_MetviewUI-MacroRunTask.o: MacroRunTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroRunTask.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroRunTask.Tpo -c -o bin_MetviewUI-MacroRunTask.o `test -f 'MacroRunTask.cc' || echo '$(srcdir)/'`MacroRunTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroRunTask.Tpo $(DEPDIR)/bin_MetviewUI-MacroRunTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroRunTask.cc' object='bin_MetviewUI-MacroRunTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroRunTask.o `test -f 'MacroRunTask.cc' || echo '$(srcdir)/'`MacroRunTask.cc
+
+bin_MetviewUI-MacroRunTask.obj: MacroRunTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MacroRunTask.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MacroRunTask.Tpo -c -o bin_MetviewUI-MacroRunTask.obj `if test -f 'MacroRunTask.cc'; then $(CYGPATH_W) 'MacroRunTask.cc'; else $(CYGPATH_W) '$(srcdir)/MacroRunTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MacroRunTask.Tpo $(DEPDIR)/bin_MetviewUI-MacroRunTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroRunTask.cc' object='bin_MetviewUI-MacroRunTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MacroRunTask.obj `if test -f 'MacroRunTask.cc'; then $(CYGPATH_W) 'MacroRunTask.cc'; else $(CYGPATH_W) '$(srcdir)/MacroRunTask.cc'; fi`
+
+bin_MetviewUI-MenuLine.o: MenuLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MenuLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MenuLine.Tpo -c -o bin_MetviewUI-MenuLine.o `test -f 'MenuLine.cc' || echo '$(srcdir)/'`MenuLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MenuLine.Tpo $(DEPDIR)/bin_MetviewUI-MenuLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MenuLine.cc' object='bin_MetviewUI-MenuLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MenuLine.o `test -f 'MenuLine.cc' || echo '$(srcdir)/'`MenuLine.cc
+
+bin_MetviewUI-MenuLine.obj: MenuLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MenuLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MenuLine.Tpo -c -o bin_MetviewUI-MenuLine.obj `if test -f 'MenuLine.cc'; then $(CYGPATH_W) 'MenuLine.cc'; else $(CYGPATH_W) '$(srcdir)/MenuLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MenuLine.Tpo $(DEPDIR)/bin_MetviewUI-MenuLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MenuLine.cc' object='bin_MetviewUI-MenuLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MenuLine.obj `if test -f 'MenuLine.cc'; then $(CYGPATH_W) 'MenuLine.cc'; else $(CYGPATH_W) '$(srcdir)/MenuLine.cc'; fi`
+
+bin_MetviewUI-NoneLine.o: NoneLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-NoneLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-NoneLine.Tpo -c -o bin_MetviewUI-NoneLine.o `test -f 'NoneLine.cc' || echo '$(srcdir)/'`NoneLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-NoneLine.Tpo $(DEPDIR)/bin_MetviewUI-NoneLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NoneLine.cc' object='bin_MetviewUI-NoneLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-NoneLine.o `test -f 'NoneLine.cc' || echo '$(srcdir)/'`NoneLine.cc
+
+bin_MetviewUI-NoneLine.obj: NoneLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-NoneLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-NoneLine.Tpo -c -o bin_MetviewUI-NoneLine.obj `if test -f 'NoneLine.cc'; then $(CYGPATH_W) 'NoneLine.cc'; else $(CYGPATH_W) '$(srcdir)/NoneLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-NoneLine.Tpo $(DEPDIR)/bin_MetviewUI-NoneLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NoneLine.cc' object='bin_MetviewUI-NoneLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-NoneLine.obj `if test -f 'NoneLine.cc'; then $(CYGPATH_W) 'NoneLine.cc'; else $(CYGPATH_W) '$(srcdir)/NoneLine.cc'; fi`
+
+bin_MetviewUI-MessageObserver.o: MessageObserver.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MessageObserver.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MessageObserver.Tpo -c -o bin_MetviewUI-MessageObserver.o `test -f 'MessageObserver.cc' || echo '$(srcdir)/'`MessageObserver.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MessageObserver.Tpo $(DEPDIR)/bin_MetviewUI-MessageObserver.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MessageObserver.cc' object='bin_MetviewUI-MessageObserver.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MessageObserver.o `test -f 'MessageObserver.cc' || echo '$(srcdir)/'`MessageObserver.cc
+
+bin_MetviewUI-MessageObserver.obj: MessageObserver.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MessageObserver.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MessageObserver.Tpo -c -o bin_MetviewUI-MessageObserver.obj `if test -f 'MessageObserver.cc'; then $(CYGPATH_W) 'MessageObserver.cc'; else $(CYGPATH_W) '$(srcdir)/MessageObserver.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MessageObserver.Tpo $(DEPDIR)/bin_MetviewUI-MessageObserver.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MessageObserver.cc' object='bin_MetviewUI-MessageObserver.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MessageObserver.obj `if test -f 'MessageObserver.cc'; then $(CYGPATH_W) 'MessageObserver.cc'; else $(CYGPATH_W) '$(srcdir)/MessageObserver.cc'; fi`
+
+bin_MetviewUI-MethodCommand.o: MethodCommand.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MethodCommand.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MethodCommand.Tpo -c -o bin_MetviewUI-MethodCommand.o `test -f 'MethodCommand.cc' || echo '$(srcdir)/'`MethodCommand.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MethodCommand.Tpo $(DEPDIR)/bin_MetviewUI-MethodCommand.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MethodCommand.cc' object='bin_MetviewUI-MethodCommand.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MethodCommand.o `test -f 'MethodCommand.cc' || echo '$(srcdir)/'`MethodCommand.cc
+
+bin_MetviewUI-MethodCommand.obj: MethodCommand.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MethodCommand.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MethodCommand.Tpo -c -o bin_MetviewUI-MethodCommand.obj `if test -f 'MethodCommand.cc'; then $(CYGPATH_W) 'MethodCommand.cc'; else $(CYGPATH_W) '$(srcdir)/MethodCommand.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MethodCommand.Tpo $(DEPDIR)/bin_MetviewUI-MethodCommand.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MethodCommand.cc' object='bin_MetviewUI-MethodCommand.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MethodCommand.obj `if test -f 'MethodCommand.cc'; then $(CYGPATH_W) 'MethodCommand.cc'; else $(CYGPATH_W) '$(srcdir)/MethodCommand.cc'; fi`
+
+bin_MetviewUI-MetviewService.o: MetviewService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MetviewService.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MetviewService.Tpo -c -o bin_MetviewUI-MetviewService.o `test -f 'MetviewService.cc' || echo '$(srcdir)/'`MetviewService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MetviewService.Tpo $(DEPDIR)/bin_MetviewUI-MetviewService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MetviewService.cc' object='bin_MetviewUI-MetviewService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MetviewService.o `test -f 'MetviewService.cc' || echo '$(srcdir)/'`MetviewService.cc
+
+bin_MetviewUI-MetviewService.obj: MetviewService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MetviewService.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MetviewService.Tpo -c -o bin_MetviewUI-MetviewService.obj `if test -f 'MetviewService.cc'; then $(CYGPATH_W) 'MetviewService.cc'; else $(CYGPATH_W) '$(srcdir)/MetviewService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MetviewService.Tpo $(DEPDIR)/bin_MetviewUI-MetviewService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MetviewService.cc' object='bin_MetviewUI-MetviewService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MetviewService.obj `if test -f 'MetviewService.cc'; then $(CYGPATH_W) 'MetviewService.cc'; else $(CYGPATH_W) '$(srcdir)/MetviewService.cc'; fi`
+
+bin_MetviewUI-MetviewTask.o: MetviewTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MetviewTask.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MetviewTask.Tpo -c -o bin_MetviewUI-MetviewTask.o `test -f 'MetviewTask.cc' || echo '$(srcdir)/'`MetviewTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MetviewTask.Tpo $(DEPDIR)/bin_MetviewUI-MetviewTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MetviewTask.cc' object='bin_MetviewUI-MetviewTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MetviewTask.o `test -f 'MetviewTask.cc' || echo '$(srcdir)/'`MetviewTask.cc
+
+bin_MetviewUI-MetviewTask.obj: MetviewTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MetviewTask.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MetviewTask.Tpo -c -o bin_MetviewUI-MetviewTask.obj `if test -f 'MetviewTask.cc'; then $(CYGPATH_W) 'MetviewTask.cc'; else $(CYGPATH_W) '$(srcdir)/MetviewTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MetviewTask.Tpo $(DEPDIR)/bin_MetviewUI-MetviewTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MetviewTask.cc' object='bin_MetviewUI-MetviewTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MetviewTask.obj `if test -f 'MetviewTask.cc'; then $(CYGPATH_W) 'MetviewTask.cc'; else $(CYGPATH_W) '$(srcdir)/MetviewTask.cc'; fi`
+
+bin_MetviewUI-MetviewUI.o: MetviewUI.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MetviewUI.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MetviewUI.Tpo -c -o bin_MetviewUI-MetviewUI.o `test -f 'MetviewUI.cc' || echo '$(srcdir)/'`MetviewUI.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MetviewUI.Tpo $(DEPDIR)/bin_MetviewUI-MetviewUI.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MetviewUI.cc' object='bin_MetviewUI-MetviewUI.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MetviewUI.o `test -f 'MetviewUI.cc' || echo '$(srcdir)/'`MetviewUI.cc
+
+bin_MetviewUI-MetviewUI.obj: MetviewUI.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-MetviewUI.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-MetviewUI.Tpo -c -o bin_MetviewUI-MetviewUI.obj `if test -f 'MetviewUI.cc'; then $(CYGPATH_W) 'MetviewUI.cc'; else $(CYGPATH_W) '$(srcdir)/MetviewUI.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-MetviewUI.Tpo $(DEPDIR)/bin_MetviewUI-MetviewUI.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MetviewUI.cc' object='bin_MetviewUI-MetviewUI.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-MetviewUI.obj `if test -f 'MetviewUI.cc'; then $(CYGPATH_W) 'MetviewUI.cc'; else $(CYGPATH_W) '$(srcdir)/MetviewUI.cc'; fi`
+
+bin_MetviewUI-NoEditor.o: NoEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-NoEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-NoEditor.Tpo -c -o bin_MetviewUI-NoEditor.o `test -f 'NoEditor.cc' || echo '$(srcdir)/'`NoEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-NoEditor.Tpo $(DEPDIR)/bin_MetviewUI-NoEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NoEditor.cc' object='bin_MetviewUI-NoEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-NoEditor.o `test -f 'NoEditor.cc' || echo '$(srcdir)/'`NoEditor.cc
+
+bin_MetviewUI-NoEditor.obj: NoEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-NoEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-NoEditor.Tpo -c -o bin_MetviewUI-NoEditor.obj `if test -f 'NoEditor.cc'; then $(CYGPATH_W) 'NoEditor.cc'; else $(CYGPATH_W) '$(srcdir)/NoEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-NoEditor.Tpo $(DEPDIR)/bin_MetviewUI-NoEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NoEditor.cc' object='bin_MetviewUI-NoEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-NoEditor.obj `if test -f 'NoEditor.cc'; then $(CYGPATH_W) 'NoEditor.cc'; else $(CYGPATH_W) '$(srcdir)/NoEditor.cc'; fi`
+
+bin_MetviewUI-InternalEditor.o: InternalEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-InternalEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-InternalEditor.Tpo -c -o bin_MetviewUI-InternalEditor.o `test -f 'InternalEditor.cc' || echo '$(srcdir)/'`InternalEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-InternalEditor.Tpo $(DEPDIR)/bin_MetviewUI-InternalEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InternalEditor.cc' object='bin_MetviewUI-InternalEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-InternalEditor.o `test -f 'InternalEditor.cc' || echo '$(srcdir)/'`InternalEditor.cc
+
+bin_MetviewUI-InternalEditor.obj: InternalEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-InternalEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-InternalEditor.Tpo -c -o bin_MetviewUI-InternalEditor.obj `if test -f 'InternalEditor.cc'; then $(CYGPATH_W) 'InternalEditor.cc'; else $(CYGPATH_W) '$(srcdir)/InternalEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-InternalEditor.Tpo $(DEPDIR)/bin_MetviewUI-InternalEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InternalEditor.cc' object='bin_MetviewUI-InternalEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-InternalEditor.obj `if test -f 'InternalEditor.cc'; then $(CYGPATH_W) 'InternalEditor.cc'; else $(CYGPATH_W) '$(srcdir)/InternalEditor.cc'; fi`
+
+bin_MetviewUI-ExternalEditor.o: ExternalEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalEditor.Tpo -c -o bin_MetviewUI-ExternalEditor.o `test -f 'ExternalEditor.cc' || echo '$(srcdir)/'`ExternalEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalEditor.Tpo $(DEPDIR)/bin_MetviewUI-ExternalEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalEditor.cc' object='bin_MetviewUI-ExternalEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalEditor.o `test -f 'ExternalEditor.cc' || echo '$(srcdir)/'`ExternalEditor.cc
+
+bin_MetviewUI-ExternalEditor.obj: ExternalEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalEditor.Tpo -c -o bin_MetviewUI-ExternalEditor.obj `if test -f 'ExternalEditor.cc'; then $(CYGPATH_W) 'ExternalEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalEditor.Tpo $(DEPDIR)/bin_MetviewUI-ExternalEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalEditor.cc' object='bin_MetviewUI-ExternalEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalEditor.obj `if test -f 'ExternalEditor.cc'; then $(CYGPATH_W) 'ExternalEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalEditor.cc'; fi`
+
+bin_MetviewUI-ExternalTextEditor.o: ExternalTextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalTextEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Tpo -c -o bin_MetviewUI-ExternalTextEditor.o `test -f 'ExternalTextEditor.cc' || echo '$(srcdir)/'`ExternalTextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Tpo $(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalTextEditor.cc' object='bin_MetviewUI-ExternalTextEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalTextEditor.o `test -f 'ExternalTextEditor.cc' || echo '$(srcdir)/'`ExternalTextEditor.cc
+
+bin_MetviewUI-ExternalTextEditor.obj: ExternalTextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalTextEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Tpo -c -o bin_MetviewUI-ExternalTextEditor.obj `if test -f 'ExternalTextEditor.cc'; then $(CYGPATH_W) 'ExternalTextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalTextEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Tpo $(DEPDIR)/bin_MetviewUI-ExternalTextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalTextEditor.cc' object='bin_MetviewUI-ExternalTextEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalTextEditor.obj `if test -f 'ExternalTextEditor.cc'; then $(CYGPATH_W) 'ExternalTextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalTextEditor.cc'; fi`
+
+bin_MetviewUI-ExternalServiceEditor.o: ExternalServiceEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalServiceEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Tpo -c -o bin_MetviewUI-ExternalServiceEditor.o `test -f 'ExternalServiceEditor.cc' || echo '$(srcdir)/'`ExternalServiceEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Tpo $(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalServiceEditor.cc' object='bin_MetviewUI-ExternalServiceEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalServiceEditor.o `test -f 'ExternalServiceEditor.cc' || echo '$(srcdir)/'`ExternalServiceEditor.cc
+
+bin_MetviewUI-ExternalServiceEditor.obj: ExternalServiceEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ExternalServiceEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Tpo -c -o bin_MetviewUI-ExternalServiceEditor.obj `if test -f 'ExternalServiceEditor.cc'; then $(CYGPATH_W) 'ExternalServiceEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalServiceEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Tpo $(DEPDIR)/bin_MetviewUI-ExternalServiceEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExternalServiceEditor.cc' object='bin_MetviewUI-ExternalServiceEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ExternalServiceEditor.obj `if test -f 'ExternalServiceEditor.cc'; then $(CYGPATH_W) 'ExternalServiceEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ExternalServiceEditor.cc'; fi`
+
+bin_MetviewUI-BaseTextEditor.o: BaseTextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-BaseTextEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-BaseTextEditor.Tpo -c -o bin_MetviewUI-BaseTextEditor.o `test -f 'BaseTextEditor.cc' || echo '$(srcdir)/'`BaseTextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-BaseTextEditor.Tpo $(DEPDIR)/bin_MetviewUI-BaseTextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BaseTextEditor.cc' object='bin_MetviewUI-BaseTextEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-BaseTextEditor.o `test -f 'BaseTextEditor.cc' || echo '$(srcdir)/'`BaseTextEditor.cc
+
+bin_MetviewUI-BaseTextEditor.obj: BaseTextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-BaseTextEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-BaseTextEditor.Tpo -c -o bin_MetviewUI-BaseTextEditor.obj `if test -f 'BaseTextEditor.cc'; then $(CYGPATH_W) 'BaseTextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/BaseTextEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-BaseTextEditor.Tpo $(DEPDIR)/bin_MetviewUI-BaseTextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BaseTextEditor.cc' object='bin_MetviewUI-BaseTextEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-BaseTextEditor.obj `if test -f 'BaseTextEditor.cc'; then $(CYGPATH_W) 'BaseTextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/BaseTextEditor.cc'; fi`
+
+bin_MetviewUI-OutputDrawer.o: OutputDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-OutputDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-OutputDrawer.Tpo -c -o bin_MetviewUI-OutputDrawer.o `test -f 'OutputDrawer.cc' || echo '$(srcdir)/'`OutputDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-OutputDrawer.Tpo $(DEPDIR)/bin_MetviewUI-OutputDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputDrawer.cc' object='bin_MetviewUI-OutputDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-OutputDrawer.o `test -f 'OutputDrawer.cc' || echo '$(srcdir)/'`OutputDrawer.cc
+
+bin_MetviewUI-OutputDrawer.obj: OutputDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-OutputDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-OutputDrawer.Tpo -c -o bin_MetviewUI-OutputDrawer.obj `if test -f 'OutputDrawer.cc'; then $(CYGPATH_W) 'OutputDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/OutputDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-OutputDrawer.Tpo $(DEPDIR)/bin_MetviewUI-OutputDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputDrawer.cc' object='bin_MetviewUI-OutputDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-OutputDrawer.obj `if test -f 'OutputDrawer.cc'; then $(CYGPATH_W) 'OutputDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/OutputDrawer.cc'; fi`
+
+bin_MetviewUI-CatalogDrawer.o: CatalogDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-CatalogDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-CatalogDrawer.Tpo -c -o bin_MetviewUI-CatalogDrawer.o `test -f 'CatalogDrawer.cc' || echo '$(srcdir)/'`CatalogDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-CatalogDrawer.Tpo $(DEPDIR)/bin_MetviewUI-CatalogDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CatalogDrawer.cc' object='bin_MetviewUI-CatalogDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-CatalogDrawer.o `test -f 'CatalogDrawer.cc' || echo '$(srcdir)/'`CatalogDrawer.cc
+
+bin_MetviewUI-CatalogDrawer.obj: CatalogDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-CatalogDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-CatalogDrawer.Tpo -c -o bin_MetviewUI-CatalogDrawer.obj `if test -f 'CatalogDrawer.cc'; then $(CYGPATH_W) 'CatalogDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/CatalogDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-CatalogDrawer.Tpo $(DEPDIR)/bin_MetviewUI-CatalogDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CatalogDrawer.cc' object='bin_MetviewUI-CatalogDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-CatalogDrawer.obj `if test -f 'CatalogDrawer.cc'; then $(CYGPATH_W) 'CatalogDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/CatalogDrawer.cc'; fi`
+
+bin_MetviewUI-GridDrawer.o: GridDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-GridDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-GridDrawer.Tpo -c -o bin_MetviewUI-GridDrawer.o `test -f 'GridDrawer.cc' || echo '$(srcdir)/'`GridDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-GridDrawer.Tpo $(DEPDIR)/bin_MetviewUI-GridDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GridDrawer.cc' object='bin_MetviewUI-GridDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-GridDrawer.o `test -f 'GridDrawer.cc' || echo '$(srcdir)/'`GridDrawer.cc
+
+bin_MetviewUI-GridDrawer.obj: GridDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-GridDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-GridDrawer.Tpo -c -o bin_MetviewUI-GridDrawer.obj `if test -f 'GridDrawer.cc'; then $(CYGPATH_W) 'GridDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/GridDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-GridDrawer.Tpo $(DEPDIR)/bin_MetviewUI-GridDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GridDrawer.cc' object='bin_MetviewUI-GridDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-GridDrawer.obj `if test -f 'GridDrawer.cc'; then $(CYGPATH_W) 'GridDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/GridDrawer.cc'; fi`
+
+bin_MetviewUI-PageView.o: PageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-PageView.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-PageView.Tpo -c -o bin_MetviewUI-PageView.o `test -f 'PageView.cc' || echo '$(srcdir)/'`PageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-PageView.Tpo $(DEPDIR)/bin_MetviewUI-PageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PageView.cc' object='bin_MetviewUI-PageView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-PageView.o `test -f 'PageView.cc' || echo '$(srcdir)/'`PageView.cc
+
+bin_MetviewUI-PageView.obj: PageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-PageView.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-PageView.Tpo -c -o bin_MetviewUI-PageView.obj `if test -f 'PageView.cc'; then $(CYGPATH_W) 'PageView.cc'; else $(CYGPATH_W) '$(srcdir)/PageView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-PageView.Tpo $(DEPDIR)/bin_MetviewUI-PageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PageView.cc' object='bin_MetviewUI-PageView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-PageView.obj `if test -f 'PageView.cc'; then $(CYGPATH_W) 'PageView.cc'; else $(CYGPATH_W) '$(srcdir)/PageView.cc'; fi`
+
+bin_MetviewUI-PaperDrawer.o: PaperDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-PaperDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-PaperDrawer.Tpo -c -o bin_MetviewUI-PaperDrawer.o `test -f 'PaperDrawer.cc' || echo '$(srcdir)/'`PaperDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-PaperDrawer.Tpo $(DEPDIR)/bin_MetviewUI-PaperDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PaperDrawer.cc' object='bin_MetviewUI-PaperDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-PaperDrawer.o `test -f 'PaperDrawer.cc' || echo '$(srcdir)/'`PaperDrawer.cc
+
+bin_MetviewUI-PaperDrawer.obj: PaperDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-PaperDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-PaperDrawer.Tpo -c -o bin_MetviewUI-PaperDrawer.obj `if test -f 'PaperDrawer.cc'; then $(CYGPATH_W) 'PaperDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/PaperDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-PaperDrawer.Tpo $(DEPDIR)/bin_MetviewUI-PaperDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PaperDrawer.cc' object='bin_MetviewUI-PaperDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-PaperDrawer.obj `if test -f 'PaperDrawer.cc'; then $(CYGPATH_W) 'PaperDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/PaperDrawer.cc'; fi`
+
+bin_MetviewUI-ParamList.o: ParamList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ParamList.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ParamList.Tpo -c -o bin_MetviewUI-ParamList.o `test -f 'ParamList.cc' || echo '$(srcdir)/'`ParamList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ParamList.Tpo $(DEPDIR)/bin_MetviewUI-ParamList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ParamList.cc' object='bin_MetviewUI-ParamList.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ParamList.o `test -f 'ParamList.cc' || echo '$(srcdir)/'`ParamList.cc
+
+bin_MetviewUI-ParamList.obj: ParamList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ParamList.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ParamList.Tpo -c -o bin_MetviewUI-ParamList.obj `if test -f 'ParamList.cc'; then $(CYGPATH_W) 'ParamList.cc'; else $(CYGPATH_W) '$(srcdir)/ParamList.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ParamList.Tpo $(DEPDIR)/bin_MetviewUI-ParamList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ParamList.cc' object='bin_MetviewUI-ParamList.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ParamList.obj `if test -f 'ParamList.cc'; then $(CYGPATH_W) 'ParamList.cc'; else $(CYGPATH_W) '$(srcdir)/ParamList.cc'; fi`
+
+bin_MetviewUI-Parameter.o: Parameter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Parameter.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Parameter.Tpo -c -o bin_MetviewUI-Parameter.o `test -f 'Parameter.cc' || echo '$(srcdir)/'`Parameter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Parameter.Tpo $(DEPDIR)/bin_MetviewUI-Parameter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Parameter.cc' object='bin_MetviewUI-Parameter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Parameter.o `test -f 'Parameter.cc' || echo '$(srcdir)/'`Parameter.cc
+
+bin_MetviewUI-Parameter.obj: Parameter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Parameter.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Parameter.Tpo -c -o bin_MetviewUI-Parameter.obj `if test -f 'Parameter.cc'; then $(CYGPATH_W) 'Parameter.cc'; else $(CYGPATH_W) '$(srcdir)/Parameter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Parameter.Tpo $(DEPDIR)/bin_MetviewUI-Parameter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Parameter.cc' object='bin_MetviewUI-Parameter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Parameter.obj `if test -f 'Parameter.cc'; then $(CYGPATH_W) 'Parameter.cc'; else $(CYGPATH_W) '$(srcdir)/Parameter.cc'; fi`
+
+bin_MetviewUI-PlotModHelp.o: PlotModHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-PlotModHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-PlotModHelp.Tpo -c -o bin_MetviewUI-PlotModHelp.o `test -f 'PlotModHelp.cc' || echo '$(srcdir)/'`PlotModHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-PlotModHelp.Tpo $(DEPDIR)/bin_MetviewUI-PlotModHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModHelp.cc' object='bin_MetviewUI-PlotModHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-PlotModHelp.o `test -f 'PlotModHelp.cc' || echo '$(srcdir)/'`PlotModHelp.cc
+
+bin_MetviewUI-PlotModHelp.obj: PlotModHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-PlotModHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-PlotModHelp.Tpo -c -o bin_MetviewUI-PlotModHelp.obj `if test -f 'PlotModHelp.cc'; then $(CYGPATH_W) 'PlotModHelp.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-PlotModHelp.Tpo $(DEPDIR)/bin_MetviewUI-PlotModHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModHelp.cc' object='bin_MetviewUI-PlotModHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-PlotModHelp.obj `if test -f 'PlotModHelp.cc'; then $(CYGPATH_W) 'PlotModHelp.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModHelp.cc'; fi`
+
+bin_MetviewUI-Protocol.o: Protocol.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Protocol.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Protocol.Tpo -c -o bin_MetviewUI-Protocol.o `test -f 'Protocol.cc' || echo '$(srcdir)/'`Protocol.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Protocol.Tpo $(DEPDIR)/bin_MetviewUI-Protocol.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Protocol.cc' object='bin_MetviewUI-Protocol.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Protocol.o `test -f 'Protocol.cc' || echo '$(srcdir)/'`Protocol.cc
+
+bin_MetviewUI-Protocol.obj: Protocol.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Protocol.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Protocol.Tpo -c -o bin_MetviewUI-Protocol.obj `if test -f 'Protocol.cc'; then $(CYGPATH_W) 'Protocol.cc'; else $(CYGPATH_W) '$(srcdir)/Protocol.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Protocol.Tpo $(DEPDIR)/bin_MetviewUI-Protocol.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Protocol.cc' object='bin_MetviewUI-Protocol.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Protocol.obj `if test -f 'Protocol.cc'; then $(CYGPATH_W) 'Protocol.cc'; else $(CYGPATH_W) '$(srcdir)/Protocol.cc'; fi`
+
+bin_MetviewUI-Queue.o: Queue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Queue.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Queue.Tpo -c -o bin_MetviewUI-Queue.o `test -f 'Queue.cc' || echo '$(srcdir)/'`Queue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Queue.Tpo $(DEPDIR)/bin_MetviewUI-Queue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Queue.cc' object='bin_MetviewUI-Queue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Queue.o `test -f 'Queue.cc' || echo '$(srcdir)/'`Queue.cc
+
+bin_MetviewUI-Queue.obj: Queue.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Queue.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Queue.Tpo -c -o bin_MetviewUI-Queue.obj `if test -f 'Queue.cc'; then $(CYGPATH_W) 'Queue.cc'; else $(CYGPATH_W) '$(srcdir)/Queue.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Queue.Tpo $(DEPDIR)/bin_MetviewUI-Queue.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Queue.cc' object='bin_MetviewUI-Queue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Queue.obj `if test -f 'Queue.cc'; then $(CYGPATH_W) 'Queue.cc'; else $(CYGPATH_W) '$(srcdir)/Queue.cc'; fi`
+
+bin_MetviewUI-QtMacroEditor.o: QtMacroEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtMacroEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtMacroEditor.Tpo -c -o bin_MetviewUI-QtMacroEditor.o `test -f 'QtMacroEditor.cc' || echo '$(srcdir)/'`QtMacroEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtMacroEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtMacroEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtMacroEditor.cc' object='bin_MetviewUI-QtMacroEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtMacroEditor.o `test -f 'QtMacroEditor.cc' || echo '$(srcdir)/'`QtMacroEditor.cc
+
+bin_MetviewUI-QtMacroEditor.obj: QtMacroEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtMacroEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtMacroEditor.Tpo -c -o bin_MetviewUI-QtMacroEditor.obj `if test -f 'QtMacroEditor.cc'; then $(CYGPATH_W) 'QtMacroEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtMacroEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtMacroEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtMacroEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtMacroEditor.cc' object='bin_MetviewUI-QtMacroEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtMacroEditor.obj `if test -f 'QtMacroEditor.cc'; then $(CYGPATH_W) 'QtMacroEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtMacroEditor.cc'; fi`
+
+bin_MetviewUI-QtOgcClientEditor.o: QtOgcClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtOgcClientEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Tpo -c -o bin_MetviewUI-QtOgcClientEditor.o `test -f 'QtOgcClientEditor.cc' || echo '$(srcdir)/'`QtOgcClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtOgcClientEditor.cc' object='bin_MetviewUI-QtOgcClientEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtOgcClientEditor.o `test -f 'QtOgcClientEditor.cc' || echo '$(srcdir)/'`QtOgcClientEditor.cc
+
+bin_MetviewUI-QtOgcClientEditor.obj: QtOgcClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtOgcClientEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Tpo -c -o bin_MetviewUI-QtOgcClientEditor.obj `if test -f 'QtOgcClientEditor.cc'; then $(CYGPATH_W) 'QtOgcClientEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtOgcClientEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtOgcClientEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtOgcClientEditor.cc' object='bin_MetviewUI-QtOgcClientEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtOgcClientEditor.obj `if test -f 'QtOgcClientEditor.cc'; then $(CYGPATH_W) 'QtOgcClientEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtOgcClientEditor.cc'; fi`
+
+bin_MetviewUI-QtScmEditor.o: QtScmEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtScmEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtScmEditor.Tpo -c -o bin_MetviewUI-QtScmEditor.o `test -f 'QtScmEditor.cc' || echo '$(srcdir)/'`QtScmEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtScmEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtScmEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtScmEditor.cc' object='bin_MetviewUI-QtScmEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtScmEditor.o `test -f 'QtScmEditor.cc' || echo '$(srcdir)/'`QtScmEditor.cc
+
+bin_MetviewUI-QtScmEditor.obj: QtScmEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtScmEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtScmEditor.Tpo -c -o bin_MetviewUI-QtScmEditor.obj `if test -f 'QtScmEditor.cc'; then $(CYGPATH_W) 'QtScmEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtScmEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtScmEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtScmEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtScmEditor.cc' object='bin_MetviewUI-QtScmEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtScmEditor.obj `if test -f 'QtScmEditor.cc'; then $(CYGPATH_W) 'QtScmEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtScmEditor.cc'; fi`
+
+bin_MetviewUI-QtStackedEditor.o: QtStackedEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtStackedEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtStackedEditor.Tpo -c -o bin_MetviewUI-QtStackedEditor.o `test -f 'QtStackedEditor.cc' || echo '$(srcdir)/'`QtStackedEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtStackedEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtStackedEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtStackedEditor.cc' object='bin_MetviewUI-QtStackedEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtStackedEditor.o `test -f 'QtStackedEditor.cc' || echo '$(srcdir)/'`QtStackedEditor.cc
+
+bin_MetviewUI-QtStackedEditor.obj: QtStackedEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-QtStackedEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-QtStackedEditor.Tpo -c -o bin_MetviewUI-QtStackedEditor.obj `if test -f 'QtStackedEditor.cc'; then $(CYGPATH_W) 'QtStackedEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtStackedEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-QtStackedEditor.Tpo $(DEPDIR)/bin_MetviewUI-QtStackedEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='QtStackedEditor.cc' object='bin_MetviewUI-QtStackedEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-QtStackedEditor.obj `if test -f 'QtStackedEditor.cc'; then $(CYGPATH_W) 'QtStackedEditor.cc'; else $(CYGPATH_W) '$(srcdir)/QtStackedEditor.cc'; fi`
+
+bin_MetviewUI-Rainbow.o: Rainbow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Rainbow.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Rainbow.Tpo -c -o bin_MetviewUI-Rainbow.o `test -f 'Rainbow.cc' || echo '$(srcdir)/'`Rainbow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Rainbow.Tpo $(DEPDIR)/bin_MetviewUI-Rainbow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Rainbow.cc' object='bin_MetviewUI-Rainbow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Rainbow.o `test -f 'Rainbow.cc' || echo '$(srcdir)/'`Rainbow.cc
+
+bin_MetviewUI-Rainbow.obj: Rainbow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Rainbow.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Rainbow.Tpo -c -o bin_MetviewUI-Rainbow.obj `if test -f 'Rainbow.cc'; then $(CYGPATH_W) 'Rainbow.cc'; else $(CYGPATH_W) '$(srcdir)/Rainbow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Rainbow.Tpo $(DEPDIR)/bin_MetviewUI-Rainbow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Rainbow.cc' object='bin_MetviewUI-Rainbow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Rainbow.obj `if test -f 'Rainbow.cc'; then $(CYGPATH_W) 'Rainbow.cc'; else $(CYGPATH_W) '$(srcdir)/Rainbow.cc'; fi`
+
+bin_MetviewUI-Recents.o: Recents.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Recents.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Recents.Tpo -c -o bin_MetviewUI-Recents.o `test -f 'Recents.cc' || echo '$(srcdir)/'`Recents.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Recents.Tpo $(DEPDIR)/bin_MetviewUI-Recents.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Recents.cc' object='bin_MetviewUI-Recents.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Recents.o `test -f 'Recents.cc' || echo '$(srcdir)/'`Recents.cc
+
+bin_MetviewUI-Recents.obj: Recents.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Recents.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Recents.Tpo -c -o bin_MetviewUI-Recents.obj `if test -f 'Recents.cc'; then $(CYGPATH_W) 'Recents.cc'; else $(CYGPATH_W) '$(srcdir)/Recents.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Recents.Tpo $(DEPDIR)/bin_MetviewUI-Recents.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Recents.cc' object='bin_MetviewUI-Recents.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Recents.obj `if test -f 'Recents.cc'; then $(CYGPATH_W) 'Recents.cc'; else $(CYGPATH_W) '$(srcdir)/Recents.cc'; fi`
+
+bin_MetviewUI-ReplyObserver.o: ReplyObserver.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ReplyObserver.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ReplyObserver.Tpo -c -o bin_MetviewUI-ReplyObserver.o `test -f 'ReplyObserver.cc' || echo '$(srcdir)/'`ReplyObserver.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ReplyObserver.Tpo $(DEPDIR)/bin_MetviewUI-ReplyObserver.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ReplyObserver.cc' object='bin_MetviewUI-ReplyObserver.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ReplyObserver.o `test -f 'ReplyObserver.cc' || echo '$(srcdir)/'`ReplyObserver.cc
+
+bin_MetviewUI-ReplyObserver.obj: ReplyObserver.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ReplyObserver.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ReplyObserver.Tpo -c -o bin_MetviewUI-ReplyObserver.obj `if test -f 'ReplyObserver.cc'; then $(CYGPATH_W) 'ReplyObserver.cc'; else $(CYGPATH_W) '$(srcdir)/ReplyObserver.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ReplyObserver.Tpo $(DEPDIR)/bin_MetviewUI-ReplyObserver.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ReplyObserver.cc' object='bin_MetviewUI-ReplyObserver.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ReplyObserver.obj `if test -f 'ReplyObserver.cc'; then $(CYGPATH_W) 'ReplyObserver.cc'; else $(CYGPATH_W) '$(srcdir)/ReplyObserver.cc'; fi`
+
+bin_MetviewUI-RequestPanel.o: RequestPanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanel.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanel.Tpo -c -o bin_MetviewUI-RequestPanel.o `test -f 'RequestPanel.cc' || echo '$(srcdir)/'`RequestPanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanel.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanel.cc' object='bin_MetviewUI-RequestPanel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanel.o `test -f 'RequestPanel.cc' || echo '$(srcdir)/'`RequestPanel.cc
+
+bin_MetviewUI-RequestPanel.obj: RequestPanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanel.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanel.Tpo -c -o bin_MetviewUI-RequestPanel.obj `if test -f 'RequestPanel.cc'; then $(CYGPATH_W) 'RequestPanel.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanel.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanel.cc' object='bin_MetviewUI-RequestPanel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanel.obj `if test -f 'RequestPanel.cc'; then $(CYGPATH_W) 'RequestPanel.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanel.cc'; fi`
+
+bin_MetviewUI-RequestPanelHelp.o: RequestPanelHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanelHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Tpo -c -o bin_MetviewUI-RequestPanelHelp.o `test -f 'RequestPanelHelp.cc' || echo '$(srcdir)/'`RequestPanelHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanelHelp.cc' object='bin_MetviewUI-RequestPanelHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanelHelp.o `test -f 'RequestPanelHelp.cc' || echo '$(srcdir)/'`RequestPanelHelp.cc
+
+bin_MetviewUI-RequestPanelHelp.obj: RequestPanelHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanelHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Tpo -c -o bin_MetviewUI-RequestPanelHelp.obj `if test -f 'RequestPanelHelp.cc'; then $(CYGPATH_W) 'RequestPanelHelp.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanelHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanelHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanelHelp.cc' object='bin_MetviewUI-RequestPanelHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanelHelp.obj `if test -f 'RequestPanelHelp.cc'; then $(CYGPATH_W) 'RequestPanelHelp.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanelHelp.cc'; fi`
+
+bin_MetviewUI-RequestPanelItem.o: RequestPanelItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanelItem.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanelItem.Tpo -c -o bin_MetviewUI-RequestPanelItem.o `test -f 'RequestPanelItem.cc' || echo '$(srcdir)/'`RequestPanelItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanelItem.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanelItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanelItem.cc' object='bin_MetviewUI-RequestPanelItem.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanelItem.o `test -f 'RequestPanelItem.cc' || echo '$(srcdir)/'`RequestPanelItem.cc
+
+bin_MetviewUI-RequestPanelItem.obj: RequestPanelItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanelItem.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanelItem.Tpo -c -o bin_MetviewUI-RequestPanelItem.obj `if test -f 'RequestPanelItem.cc'; then $(CYGPATH_W) 'RequestPanelItem.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanelItem.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanelItem.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanelItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanelItem.cc' object='bin_MetviewUI-RequestPanelItem.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanelItem.obj `if test -f 'RequestPanelItem.cc'; then $(CYGPATH_W) 'RequestPanelItem.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanelItem.cc'; fi`
+
+bin_MetviewUI-RequestPanelLine.o: RequestPanelLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanelLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanelLine.Tpo -c -o bin_MetviewUI-RequestPanelLine.o `test -f 'RequestPanelLine.cc' || echo '$(srcdir)/'`RequestPanelLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanelLine.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanelLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanelLine.cc' object='bin_MetviewUI-RequestPanelLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanelLine.o `test -f 'RequestPanelLine.cc' || echo '$(srcdir)/'`RequestPanelLine.cc
+
+bin_MetviewUI-RequestPanelLine.obj: RequestPanelLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RequestPanelLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RequestPanelLine.Tpo -c -o bin_MetviewUI-RequestPanelLine.obj `if test -f 'RequestPanelLine.cc'; then $(CYGPATH_W) 'RequestPanelLine.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanelLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RequestPanelLine.Tpo $(DEPDIR)/bin_MetviewUI-RequestPanelLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RequestPanelLine.cc' object='bin_MetviewUI-RequestPanelLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RequestPanelLine.obj `if test -f 'RequestPanelLine.cc'; then $(CYGPATH_W) 'RequestPanelLine.cc'; else $(CYGPATH_W) '$(srcdir)/RequestPanelLine.cc'; fi`
+
+bin_MetviewUI-ResolveTransaction.o: ResolveTransaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ResolveTransaction.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ResolveTransaction.Tpo -c -o bin_MetviewUI-ResolveTransaction.o `test -f 'ResolveTransaction.cc' || echo '$(srcdir)/'`ResolveTransaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ResolveTransaction.Tpo $(DEPDIR)/bin_MetviewUI-ResolveTransaction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ResolveTransaction.cc' object='bin_MetviewUI-ResolveTransaction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ResolveTransaction.o `test -f 'ResolveTransaction.cc' || echo '$(srcdir)/'`ResolveTransaction.cc
+
+bin_MetviewUI-ResolveTransaction.obj: ResolveTransaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ResolveTransaction.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ResolveTransaction.Tpo -c -o bin_MetviewUI-ResolveTransaction.obj `if test -f 'ResolveTransaction.cc'; then $(CYGPATH_W) 'ResolveTransaction.cc'; else $(CYGPATH_W) '$(srcdir)/ResolveTransaction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ResolveTransaction.Tpo $(DEPDIR)/bin_MetviewUI-ResolveTransaction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ResolveTransaction.cc' object='bin_MetviewUI-ResolveTransaction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ResolveTransaction.obj `if test -f 'ResolveTransaction.cc'; then $(CYGPATH_W) 'ResolveTransaction.cc'; else $(CYGPATH_W) '$(srcdir)/ResolveTransaction.cc'; fi`
+
+bin_MetviewUI-Resources.o: Resources.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Resources.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Resources.Tpo -c -o bin_MetviewUI-Resources.o `test -f 'Resources.cc' || echo '$(srcdir)/'`Resources.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Resources.Tpo $(DEPDIR)/bin_MetviewUI-Resources.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Resources.cc' object='bin_MetviewUI-Resources.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Resources.o `test -f 'Resources.cc' || echo '$(srcdir)/'`Resources.cc
+
+bin_MetviewUI-Resources.obj: Resources.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Resources.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Resources.Tpo -c -o bin_MetviewUI-Resources.obj `if test -f 'Resources.cc'; then $(CYGPATH_W) 'Resources.cc'; else $(CYGPATH_W) '$(srcdir)/Resources.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Resources.Tpo $(DEPDIR)/bin_MetviewUI-Resources.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Resources.cc' object='bin_MetviewUI-Resources.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Resources.obj `if test -f 'Resources.cc'; then $(CYGPATH_W) 'Resources.cc'; else $(CYGPATH_W) '$(srcdir)/Resources.cc'; fi`
+
+bin_MetviewUI-RootFolder.o: RootFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RootFolder.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RootFolder.Tpo -c -o bin_MetviewUI-RootFolder.o `test -f 'RootFolder.cc' || echo '$(srcdir)/'`RootFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RootFolder.Tpo $(DEPDIR)/bin_MetviewUI-RootFolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RootFolder.cc' object='bin_MetviewUI-RootFolder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RootFolder.o `test -f 'RootFolder.cc' || echo '$(srcdir)/'`RootFolder.cc
+
+bin_MetviewUI-RootFolder.obj: RootFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RootFolder.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RootFolder.Tpo -c -o bin_MetviewUI-RootFolder.obj `if test -f 'RootFolder.cc'; then $(CYGPATH_W) 'RootFolder.cc'; else $(CYGPATH_W) '$(srcdir)/RootFolder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RootFolder.Tpo $(DEPDIR)/bin_MetviewUI-RootFolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RootFolder.cc' object='bin_MetviewUI-RootFolder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RootFolder.obj `if test -f 'RootFolder.cc'; then $(CYGPATH_W) 'RootFolder.cc'; else $(CYGPATH_W) '$(srcdir)/RootFolder.cc'; fi`
+
+bin_MetviewUI-ScaleLine.o: ScaleLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ScaleLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ScaleLine.Tpo -c -o bin_MetviewUI-ScaleLine.o `test -f 'ScaleLine.cc' || echo '$(srcdir)/'`ScaleLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ScaleLine.Tpo $(DEPDIR)/bin_MetviewUI-ScaleLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScaleLine.cc' object='bin_MetviewUI-ScaleLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ScaleLine.o `test -f 'ScaleLine.cc' || echo '$(srcdir)/'`ScaleLine.cc
+
+bin_MetviewUI-ScaleLine.obj: ScaleLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ScaleLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ScaleLine.Tpo -c -o bin_MetviewUI-ScaleLine.obj `if test -f 'ScaleLine.cc'; then $(CYGPATH_W) 'ScaleLine.cc'; else $(CYGPATH_W) '$(srcdir)/ScaleLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ScaleLine.Tpo $(DEPDIR)/bin_MetviewUI-ScaleLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScaleLine.cc' object='bin_MetviewUI-ScaleLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ScaleLine.obj `if test -f 'ScaleLine.cc'; then $(CYGPATH_W) 'ScaleLine.cc'; else $(CYGPATH_W) '$(srcdir)/ScaleLine.cc'; fi`
+
+bin_MetviewUI-ScriptHelp.o: ScriptHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ScriptHelp.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ScriptHelp.Tpo -c -o bin_MetviewUI-ScriptHelp.o `test -f 'ScriptHelp.cc' || echo '$(srcdir)/'`ScriptHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ScriptHelp.Tpo $(DEPDIR)/bin_MetviewUI-ScriptHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScriptHelp.cc' object='bin_MetviewUI-ScriptHelp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ScriptHelp.o `test -f 'ScriptHelp.cc' || echo '$(srcdir)/'`ScriptHelp.cc
+
+bin_MetviewUI-ScriptHelp.obj: ScriptHelp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ScriptHelp.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ScriptHelp.Tpo -c -o bin_MetviewUI-ScriptHelp.obj `if test -f 'ScriptHelp.cc'; then $(CYGPATH_W) 'ScriptHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ScriptHelp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ScriptHelp.Tpo $(DEPDIR)/bin_MetviewUI-ScriptHelp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScriptHelp.cc' object='bin_MetviewUI-ScriptHelp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ScriptHelp.obj `if test -f 'ScriptHelp.cc'; then $(CYGPATH_W) 'ScriptHelp.cc'; else $(CYGPATH_W) '$(srcdir)/ScriptHelp.cc'; fi`
+
+bin_MetviewUI-Service.o: Service.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Service.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Service.Tpo -c -o bin_MetviewUI-Service.o `test -f 'Service.cc' || echo '$(srcdir)/'`Service.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Service.Tpo $(DEPDIR)/bin_MetviewUI-Service.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Service.cc' object='bin_MetviewUI-Service.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Service.o `test -f 'Service.cc' || echo '$(srcdir)/'`Service.cc
+
+bin_MetviewUI-Service.obj: Service.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Service.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Service.Tpo -c -o bin_MetviewUI-Service.obj `if test -f 'Service.cc'; then $(CYGPATH_W) 'Service.cc'; else $(CYGPATH_W) '$(srcdir)/Service.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Service.Tpo $(DEPDIR)/bin_MetviewUI-Service.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Service.cc' object='bin_MetviewUI-Service.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Service.obj `if test -f 'Service.cc'; then $(CYGPATH_W) 'Service.cc'; else $(CYGPATH_W) '$(srcdir)/Service.cc'; fi`
+
+bin_MetviewUI-ShellService.o: ShellService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ShellService.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ShellService.Tpo -c -o bin_MetviewUI-ShellService.o `test -f 'ShellService.cc' || echo '$(srcdir)/'`ShellService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ShellService.Tpo $(DEPDIR)/bin_MetviewUI-ShellService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ShellService.cc' object='bin_MetviewUI-ShellService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ShellService.o `test -f 'ShellService.cc' || echo '$(srcdir)/'`ShellService.cc
+
+bin_MetviewUI-ShellService.obj: ShellService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ShellService.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ShellService.Tpo -c -o bin_MetviewUI-ShellService.obj `if test -f 'ShellService.cc'; then $(CYGPATH_W) 'ShellService.cc'; else $(CYGPATH_W) '$(srcdir)/ShellService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ShellService.Tpo $(DEPDIR)/bin_MetviewUI-ShellService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ShellService.cc' object='bin_MetviewUI-ShellService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ShellService.obj `if test -f 'ShellService.cc'; then $(CYGPATH_W) 'ShellService.cc'; else $(CYGPATH_W) '$(srcdir)/ShellService.cc'; fi`
+
+bin_MetviewUI-ShellTask.o: ShellTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ShellTask.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ShellTask.Tpo -c -o bin_MetviewUI-ShellTask.o `test -f 'ShellTask.cc' || echo '$(srcdir)/'`ShellTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ShellTask.Tpo $(DEPDIR)/bin_MetviewUI-ShellTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ShellTask.cc' object='bin_MetviewUI-ShellTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ShellTask.o `test -f 'ShellTask.cc' || echo '$(srcdir)/'`ShellTask.cc
+
+bin_MetviewUI-ShellTask.obj: ShellTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ShellTask.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ShellTask.Tpo -c -o bin_MetviewUI-ShellTask.obj `if test -f 'ShellTask.cc'; then $(CYGPATH_W) 'ShellTask.cc'; else $(CYGPATH_W) '$(srcdir)/ShellTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ShellTask.Tpo $(DEPDIR)/bin_MetviewUI-ShellTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ShellTask.cc' object='bin_MetviewUI-ShellTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ShellTask.obj `if test -f 'ShellTask.cc'; then $(CYGPATH_W) 'ShellTask.cc'; else $(CYGPATH_W) '$(srcdir)/ShellTask.cc'; fi`
+
+bin_MetviewUI-SimpleEditor.o: SimpleEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SimpleEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SimpleEditor.Tpo -c -o bin_MetviewUI-SimpleEditor.o `test -f 'SimpleEditor.cc' || echo '$(srcdir)/'`SimpleEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SimpleEditor.Tpo $(DEPDIR)/bin_MetviewUI-SimpleEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleEditor.cc' object='bin_MetviewUI-SimpleEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SimpleEditor.o `test -f 'SimpleEditor.cc' || echo '$(srcdir)/'`SimpleEditor.cc
+
+bin_MetviewUI-SimpleEditor.obj: SimpleEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SimpleEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SimpleEditor.Tpo -c -o bin_MetviewUI-SimpleEditor.obj `if test -f 'SimpleEditor.cc'; then $(CYGPATH_W) 'SimpleEditor.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SimpleEditor.Tpo $(DEPDIR)/bin_MetviewUI-SimpleEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleEditor.cc' object='bin_MetviewUI-SimpleEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SimpleEditor.obj `if test -f 'SimpleEditor.cc'; then $(CYGPATH_W) 'SimpleEditor.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleEditor.cc'; fi`
+
+bin_MetviewUI-RetrieveEditor.o: RetrieveEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RetrieveEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RetrieveEditor.Tpo -c -o bin_MetviewUI-RetrieveEditor.o `test -f 'RetrieveEditor.cc' || echo '$(srcdir)/'`RetrieveEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RetrieveEditor.Tpo $(DEPDIR)/bin_MetviewUI-RetrieveEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RetrieveEditor.cc' object='bin_MetviewUI-RetrieveEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RetrieveEditor.o `test -f 'RetrieveEditor.cc' || echo '$(srcdir)/'`RetrieveEditor.cc
+
+bin_MetviewUI-RetrieveEditor.obj: RetrieveEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-RetrieveEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-RetrieveEditor.Tpo -c -o bin_MetviewUI-RetrieveEditor.obj `if test -f 'RetrieveEditor.cc'; then $(CYGPATH_W) 'RetrieveEditor.cc'; else $(CYGPATH_W) '$(srcdir)/RetrieveEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-RetrieveEditor.Tpo $(DEPDIR)/bin_MetviewUI-RetrieveEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='RetrieveEditor.cc' object='bin_MetviewUI-RetrieveEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-RetrieveEditor.obj `if test -f 'RetrieveEditor.cc'; then $(CYGPATH_W) 'RetrieveEditor.cc'; else $(CYGPATH_W) '$(srcdir)/RetrieveEditor.cc'; fi`
+
+bin_MetviewUI-ScrolledText.o: ScrolledText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ScrolledText.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ScrolledText.Tpo -c -o bin_MetviewUI-ScrolledText.o `test -f 'ScrolledText.cc' || echo '$(srcdir)/'`ScrolledText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ScrolledText.Tpo $(DEPDIR)/bin_MetviewUI-ScrolledText.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScrolledText.cc' object='bin_MetviewUI-ScrolledText.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ScrolledText.o `test -f 'ScrolledText.cc' || echo '$(srcdir)/'`ScrolledText.cc
+
+bin_MetviewUI-ScrolledText.obj: ScrolledText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ScrolledText.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ScrolledText.Tpo -c -o bin_MetviewUI-ScrolledText.obj `if test -f 'ScrolledText.cc'; then $(CYGPATH_W) 'ScrolledText.cc'; else $(CYGPATH_W) '$(srcdir)/ScrolledText.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ScrolledText.Tpo $(DEPDIR)/bin_MetviewUI-ScrolledText.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScrolledText.cc' object='bin_MetviewUI-ScrolledText.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ScrolledText.obj `if test -f 'ScrolledText.cc'; then $(CYGPATH_W) 'ScrolledText.cc'; else $(CYGPATH_W) '$(srcdir)/ScrolledText.cc'; fi`
+
+bin_MetviewUI-State.o: State.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-State.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-State.Tpo -c -o bin_MetviewUI-State.o `test -f 'State.cc' || echo '$(srcdir)/'`State.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-State.Tpo $(DEPDIR)/bin_MetviewUI-State.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='State.cc' object='bin_MetviewUI-State.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-State.o `test -f 'State.cc' || echo '$(srcdir)/'`State.cc
+
+bin_MetviewUI-State.obj: State.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-State.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-State.Tpo -c -o bin_MetviewUI-State.obj `if test -f 'State.cc'; then $(CYGPATH_W) 'State.cc'; else $(CYGPATH_W) '$(srcdir)/State.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-State.Tpo $(DEPDIR)/bin_MetviewUI-State.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='State.cc' object='bin_MetviewUI-State.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-State.obj `if test -f 'State.cc'; then $(CYGPATH_W) 'State.cc'; else $(CYGPATH_W) '$(srcdir)/State.cc'; fi`
+
+bin_MetviewUI-StationaryDrawers.o: StationaryDrawers.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-StationaryDrawers.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-StationaryDrawers.Tpo -c -o bin_MetviewUI-StationaryDrawers.o `test -f 'StationaryDrawers.cc' || echo '$(srcdir)/'`StationaryDrawers.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-StationaryDrawers.Tpo $(DEPDIR)/bin_MetviewUI-StationaryDrawers.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='StationaryDrawers.cc' object='bin_MetviewUI-StationaryDrawers.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-StationaryDrawers.o `test -f 'StationaryDrawers.cc' || echo '$(srcdir)/'`StationaryDrawers.cc
+
+bin_MetviewUI-StationaryDrawers.obj: StationaryDrawers.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-StationaryDrawers.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-StationaryDrawers.Tpo -c -o bin_MetviewUI-StationaryDrawers.obj `if test -f 'StationaryDrawers.cc'; then $(CYGPATH_W) 'StationaryDrawers.cc'; else $(CYGPATH_W) '$(srcdir)/StationaryDrawers.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-StationaryDrawers.Tpo $(DEPDIR)/bin_MetviewUI-StationaryDrawers.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='StationaryDrawers.cc' object='bin_MetviewUI-StationaryDrawers.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-StationaryDrawers.obj `if test -f 'StationaryDrawers.cc'; then $(CYGPATH_W) 'StationaryDrawers.cc'; else $(CYGPATH_W) '$(srcdir)/StationaryDrawers.cc'; fi`
+
+bin_MetviewUI-SyncFolders.o: SyncFolders.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SyncFolders.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SyncFolders.Tpo -c -o bin_MetviewUI-SyncFolders.o `test -f 'SyncFolders.cc' || echo '$(srcdir)/'`SyncFolders.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SyncFolders.Tpo $(DEPDIR)/bin_MetviewUI-SyncFolders.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SyncFolders.cc' object='bin_MetviewUI-SyncFolders.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SyncFolders.o `test -f 'SyncFolders.cc' || echo '$(srcdir)/'`SyncFolders.cc
+
+bin_MetviewUI-SyncFolders.obj: SyncFolders.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SyncFolders.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SyncFolders.Tpo -c -o bin_MetviewUI-SyncFolders.obj `if test -f 'SyncFolders.cc'; then $(CYGPATH_W) 'SyncFolders.cc'; else $(CYGPATH_W) '$(srcdir)/SyncFolders.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SyncFolders.Tpo $(DEPDIR)/bin_MetviewUI-SyncFolders.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SyncFolders.cc' object='bin_MetviewUI-SyncFolders.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SyncFolders.obj `if test -f 'SyncFolders.cc'; then $(CYGPATH_W) 'SyncFolders.cc'; else $(CYGPATH_W) '$(srcdir)/SyncFolders.cc'; fi`
+
+bin_MetviewUI-SystemFolder.o: SystemFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SystemFolder.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SystemFolder.Tpo -c -o bin_MetviewUI-SystemFolder.o `test -f 'SystemFolder.cc' || echo '$(srcdir)/'`SystemFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SystemFolder.Tpo $(DEPDIR)/bin_MetviewUI-SystemFolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SystemFolder.cc' object='bin_MetviewUI-SystemFolder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SystemFolder.o `test -f 'SystemFolder.cc' || echo '$(srcdir)/'`SystemFolder.cc
+
+bin_MetviewUI-SystemFolder.obj: SystemFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SystemFolder.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SystemFolder.Tpo -c -o bin_MetviewUI-SystemFolder.obj `if test -f 'SystemFolder.cc'; then $(CYGPATH_W) 'SystemFolder.cc'; else $(CYGPATH_W) '$(srcdir)/SystemFolder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SystemFolder.Tpo $(DEPDIR)/bin_MetviewUI-SystemFolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SystemFolder.cc' object='bin_MetviewUI-SystemFolder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SystemFolder.obj `if test -f 'SystemFolder.cc'; then $(CYGPATH_W) 'SystemFolder.cc'; else $(CYGPATH_W) '$(srcdir)/SystemFolder.cc'; fi`
+
+bin_MetviewUI-Task.o: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Task.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Task.Tpo -c -o bin_MetviewUI-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Task.Tpo $(DEPDIR)/bin_MetviewUI-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_MetviewUI-Task.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+
+bin_MetviewUI-Task.obj: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Task.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Task.Tpo -c -o bin_MetviewUI-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Task.Tpo $(DEPDIR)/bin_MetviewUI-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_MetviewUI-Task.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+
+bin_MetviewUI-TempIconClass.o: TempIconClass.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TempIconClass.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TempIconClass.Tpo -c -o bin_MetviewUI-TempIconClass.o `test -f 'TempIconClass.cc' || echo '$(srcdir)/'`TempIconClass.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TempIconClass.Tpo $(DEPDIR)/bin_MetviewUI-TempIconClass.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TempIconClass.cc' object='bin_MetviewUI-TempIconClass.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TempIconClass.o `test -f 'TempIconClass.cc' || echo '$(srcdir)/'`TempIconClass.cc
+
+bin_MetviewUI-TempIconClass.obj: TempIconClass.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TempIconClass.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TempIconClass.Tpo -c -o bin_MetviewUI-TempIconClass.obj `if test -f 'TempIconClass.cc'; then $(CYGPATH_W) 'TempIconClass.cc'; else $(CYGPATH_W) '$(srcdir)/TempIconClass.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TempIconClass.Tpo $(DEPDIR)/bin_MetviewUI-TempIconClass.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TempIconClass.cc' object='bin_MetviewUI-TempIconClass.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TempIconClass.obj `if test -f 'TempIconClass.cc'; then $(CYGPATH_W) 'TempIconClass.cc'; else $(CYGPATH_W) '$(srcdir)/TempIconClass.cc'; fi`
+
+bin_MetviewUI-TemplateDrawer.o: TemplateDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TemplateDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TemplateDrawer.Tpo -c -o bin_MetviewUI-TemplateDrawer.o `test -f 'TemplateDrawer.cc' || echo '$(srcdir)/'`TemplateDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TemplateDrawer.Tpo $(DEPDIR)/bin_MetviewUI-TemplateDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TemplateDrawer.cc' object='bin_MetviewUI-TemplateDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TemplateDrawer.o `test -f 'TemplateDrawer.cc' || echo '$(srcdir)/'`TemplateDrawer.cc
+
+bin_MetviewUI-TemplateDrawer.obj: TemplateDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TemplateDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TemplateDrawer.Tpo -c -o bin_MetviewUI-TemplateDrawer.obj `if test -f 'TemplateDrawer.cc'; then $(CYGPATH_W) 'TemplateDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/TemplateDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TemplateDrawer.Tpo $(DEPDIR)/bin_MetviewUI-TemplateDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TemplateDrawer.cc' object='bin_MetviewUI-TemplateDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TemplateDrawer.obj `if test -f 'TemplateDrawer.cc'; then $(CYGPATH_W) 'TemplateDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/TemplateDrawer.cc'; fi`
+
+bin_MetviewUI-Temporary.o: Temporary.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Temporary.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Temporary.Tpo -c -o bin_MetviewUI-Temporary.o `test -f 'Temporary.cc' || echo '$(srcdir)/'`Temporary.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Temporary.Tpo $(DEPDIR)/bin_MetviewUI-Temporary.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Temporary.cc' object='bin_MetviewUI-Temporary.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Temporary.o `test -f 'Temporary.cc' || echo '$(srcdir)/'`Temporary.cc
+
+bin_MetviewUI-Temporary.obj: Temporary.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Temporary.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Temporary.Tpo -c -o bin_MetviewUI-Temporary.obj `if test -f 'Temporary.cc'; then $(CYGPATH_W) 'Temporary.cc'; else $(CYGPATH_W) '$(srcdir)/Temporary.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Temporary.Tpo $(DEPDIR)/bin_MetviewUI-Temporary.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Temporary.cc' object='bin_MetviewUI-Temporary.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Temporary.obj `if test -f 'Temporary.cc'; then $(CYGPATH_W) 'Temporary.cc'; else $(CYGPATH_W) '$(srcdir)/Temporary.cc'; fi`
+
+bin_MetviewUI-TemporaryFolder.o: TemporaryFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TemporaryFolder.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TemporaryFolder.Tpo -c -o bin_MetviewUI-TemporaryFolder.o `test -f 'TemporaryFolder.cc' || echo '$(srcdir)/'`TemporaryFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TemporaryFolder.Tpo $(DEPDIR)/bin_MetviewUI-TemporaryFolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TemporaryFolder.cc' object='bin_MetviewUI-TemporaryFolder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TemporaryFolder.o `test -f 'TemporaryFolder.cc' || echo '$(srcdir)/'`TemporaryFolder.cc
+
+bin_MetviewUI-TemporaryFolder.obj: TemporaryFolder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TemporaryFolder.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TemporaryFolder.Tpo -c -o bin_MetviewUI-TemporaryFolder.obj `if test -f 'TemporaryFolder.cc'; then $(CYGPATH_W) 'TemporaryFolder.cc'; else $(CYGPATH_W) '$(srcdir)/TemporaryFolder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TemporaryFolder.Tpo $(DEPDIR)/bin_MetviewUI-TemporaryFolder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TemporaryFolder.cc' object='bin_MetviewUI-TemporaryFolder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TemporaryFolder.obj `if test -f 'TemporaryFolder.cc'; then $(CYGPATH_W) 'TemporaryFolder.cc'; else $(CYGPATH_W) '$(srcdir)/TemporaryFolder.cc'; fi`
+
+bin_MetviewUI-TextEditor.o: TextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TextEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TextEditor.Tpo -c -o bin_MetviewUI-TextEditor.o `test -f 'TextEditor.cc' || echo '$(srcdir)/'`TextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TextEditor.Tpo $(DEPDIR)/bin_MetviewUI-TextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TextEditor.cc' object='bin_MetviewUI-TextEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TextEditor.o `test -f 'TextEditor.cc' || echo '$(srcdir)/'`TextEditor.cc
+
+bin_MetviewUI-TextEditor.obj: TextEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TextEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TextEditor.Tpo -c -o bin_MetviewUI-TextEditor.obj `if test -f 'TextEditor.cc'; then $(CYGPATH_W) 'TextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/TextEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TextEditor.Tpo $(DEPDIR)/bin_MetviewUI-TextEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TextEditor.cc' object='bin_MetviewUI-TextEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TextEditor.obj `if test -f 'TextEditor.cc'; then $(CYGPATH_W) 'TextEditor.cc'; else $(CYGPATH_W) '$(srcdir)/TextEditor.cc'; fi`
+
+bin_MetviewUI-TextLine.o: TextLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TextLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TextLine.Tpo -c -o bin_MetviewUI-TextLine.o `test -f 'TextLine.cc' || echo '$(srcdir)/'`TextLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TextLine.Tpo $(DEPDIR)/bin_MetviewUI-TextLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TextLine.cc' object='bin_MetviewUI-TextLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TextLine.o `test -f 'TextLine.cc' || echo '$(srcdir)/'`TextLine.cc
+
+bin_MetviewUI-TextLine.obj: TextLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-TextLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-TextLine.Tpo -c -o bin_MetviewUI-TextLine.obj `if test -f 'TextLine.cc'; then $(CYGPATH_W) 'TextLine.cc'; else $(CYGPATH_W) '$(srcdir)/TextLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-TextLine.Tpo $(DEPDIR)/bin_MetviewUI-TextLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TextLine.cc' object='bin_MetviewUI-TextLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-TextLine.obj `if test -f 'TextLine.cc'; then $(CYGPATH_W) 'TextLine.cc'; else $(CYGPATH_W) '$(srcdir)/TextLine.cc'; fi`
+
+bin_MetviewUI-Timeout.o: Timeout.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Timeout.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Timeout.Tpo -c -o bin_MetviewUI-Timeout.o `test -f 'Timeout.cc' || echo '$(srcdir)/'`Timeout.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Timeout.Tpo $(DEPDIR)/bin_MetviewUI-Timeout.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Timeout.cc' object='bin_MetviewUI-Timeout.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Timeout.o `test -f 'Timeout.cc' || echo '$(srcdir)/'`Timeout.cc
+
+bin_MetviewUI-Timeout.obj: Timeout.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Timeout.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Timeout.Tpo -c -o bin_MetviewUI-Timeout.obj `if test -f 'Timeout.cc'; then $(CYGPATH_W) 'Timeout.cc'; else $(CYGPATH_W) '$(srcdir)/Timeout.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Timeout.Tpo $(DEPDIR)/bin_MetviewUI-Timeout.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Timeout.cc' object='bin_MetviewUI-Timeout.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Timeout.obj `if test -f 'Timeout.cc'; then $(CYGPATH_W) 'Timeout.cc'; else $(CYGPATH_W) '$(srcdir)/Timeout.cc'; fi`
+
+bin_MetviewUI-Runnable.o: Runnable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Runnable.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Runnable.Tpo -c -o bin_MetviewUI-Runnable.o `test -f 'Runnable.cc' || echo '$(srcdir)/'`Runnable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Runnable.Tpo $(DEPDIR)/bin_MetviewUI-Runnable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Runnable.cc' object='bin_MetviewUI-Runnable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Runnable.o `test -f 'Runnable.cc' || echo '$(srcdir)/'`Runnable.cc
+
+bin_MetviewUI-Runnable.obj: Runnable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Runnable.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Runnable.Tpo -c -o bin_MetviewUI-Runnable.obj `if test -f 'Runnable.cc'; then $(CYGPATH_W) 'Runnable.cc'; else $(CYGPATH_W) '$(srcdir)/Runnable.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Runnable.Tpo $(DEPDIR)/bin_MetviewUI-Runnable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Runnable.cc' object='bin_MetviewUI-Runnable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Runnable.obj `if test -f 'Runnable.cc'; then $(CYGPATH_W) 'Runnable.cc'; else $(CYGPATH_W) '$(srcdir)/Runnable.cc'; fi`
+
+bin_MetviewUI-StringLine.o: StringLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-StringLine.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-StringLine.Tpo -c -o bin_MetviewUI-StringLine.o `test -f 'StringLine.cc' || echo '$(srcdir)/'`StringLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-StringLine.Tpo $(DEPDIR)/bin_MetviewUI-StringLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='StringLine.cc' object='bin_MetviewUI-StringLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-StringLine.o `test -f 'StringLine.cc' || echo '$(srcdir)/'`StringLine.cc
+
+bin_MetviewUI-StringLine.obj: StringLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-StringLine.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-StringLine.Tpo -c -o bin_MetviewUI-StringLine.obj `if test -f 'StringLine.cc'; then $(CYGPATH_W) 'StringLine.cc'; else $(CYGPATH_W) '$(srcdir)/StringLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-StringLine.Tpo $(DEPDIR)/bin_MetviewUI-StringLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='StringLine.cc' object='bin_MetviewUI-StringLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-StringLine.obj `if test -f 'StringLine.cc'; then $(CYGPATH_W) 'StringLine.cc'; else $(CYGPATH_W) '$(srcdir)/StringLine.cc'; fi`
+
+bin_MetviewUI-Tools.o: Tools.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Tools.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Tools.Tpo -c -o bin_MetviewUI-Tools.o `test -f 'Tools.cc' || echo '$(srcdir)/'`Tools.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Tools.Tpo $(DEPDIR)/bin_MetviewUI-Tools.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Tools.cc' object='bin_MetviewUI-Tools.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Tools.o `test -f 'Tools.cc' || echo '$(srcdir)/'`Tools.cc
+
+bin_MetviewUI-Tools.obj: Tools.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Tools.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Tools.Tpo -c -o bin_MetviewUI-Tools.obj `if test -f 'Tools.cc'; then $(CYGPATH_W) 'Tools.cc'; else $(CYGPATH_W) '$(srcdir)/Tools.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Tools.Tpo $(DEPDIR)/bin_MetviewUI-Tools.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Tools.cc' object='bin_MetviewUI-Tools.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Tools.obj `if test -f 'Tools.cc'; then $(CYGPATH_W) 'Tools.cc'; else $(CYGPATH_W) '$(srcdir)/Tools.cc'; fi`
+
+bin_MetviewUI-Transaction.o: Transaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Transaction.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Transaction.Tpo -c -o bin_MetviewUI-Transaction.o `test -f 'Transaction.cc' || echo '$(srcdir)/'`Transaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Transaction.Tpo $(DEPDIR)/bin_MetviewUI-Transaction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Transaction.cc' object='bin_MetviewUI-Transaction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Transaction.o `test -f 'Transaction.cc' || echo '$(srcdir)/'`Transaction.cc
+
+bin_MetviewUI-Transaction.obj: Transaction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Transaction.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Transaction.Tpo -c -o bin_MetviewUI-Transaction.obj `if test -f 'Transaction.cc'; then $(CYGPATH_W) 'Transaction.cc'; else $(CYGPATH_W) '$(srcdir)/Transaction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Transaction.Tpo $(DEPDIR)/bin_MetviewUI-Transaction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Transaction.cc' object='bin_MetviewUI-Transaction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Transaction.obj `if test -f 'Transaction.cc'; then $(CYGPATH_W) 'Transaction.cc'; else $(CYGPATH_W) '$(srcdir)/Transaction.cc'; fi`
+
+bin_MetviewUI-Unknown.o: Unknown.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Unknown.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Unknown.Tpo -c -o bin_MetviewUI-Unknown.o `test -f 'Unknown.cc' || echo '$(srcdir)/'`Unknown.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Unknown.Tpo $(DEPDIR)/bin_MetviewUI-Unknown.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Unknown.cc' object='bin_MetviewUI-Unknown.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Unknown.o `test -f 'Unknown.cc' || echo '$(srcdir)/'`Unknown.cc
+
+bin_MetviewUI-Unknown.obj: Unknown.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Unknown.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Unknown.Tpo -c -o bin_MetviewUI-Unknown.obj `if test -f 'Unknown.cc'; then $(CYGPATH_W) 'Unknown.cc'; else $(CYGPATH_W) '$(srcdir)/Unknown.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Unknown.Tpo $(DEPDIR)/bin_MetviewUI-Unknown.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Unknown.cc' object='bin_MetviewUI-Unknown.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Unknown.obj `if test -f 'Unknown.cc'; then $(CYGPATH_W) 'Unknown.cc'; else $(CYGPATH_W) '$(srcdir)/Unknown.cc'; fi`
+
+bin_MetviewUI-UserMessage.o: UserMessage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UserMessage.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UserMessage.Tpo -c -o bin_MetviewUI-UserMessage.o `test -f 'UserMessage.cc' || echo '$(srcdir)/'`UserMessage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UserMessage.Tpo $(DEPDIR)/bin_MetviewUI-UserMessage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UserMessage.cc' object='bin_MetviewUI-UserMessage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UserMessage.o `test -f 'UserMessage.cc' || echo '$(srcdir)/'`UserMessage.cc
+
+bin_MetviewUI-UserMessage.obj: UserMessage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-UserMessage.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-UserMessage.Tpo -c -o bin_MetviewUI-UserMessage.obj `if test -f 'UserMessage.cc'; then $(CYGPATH_W) 'UserMessage.cc'; else $(CYGPATH_W) '$(srcdir)/UserMessage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-UserMessage.Tpo $(DEPDIR)/bin_MetviewUI-UserMessage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UserMessage.cc' object='bin_MetviewUI-UserMessage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-UserMessage.obj `if test -f 'UserMessage.cc'; then $(CYGPATH_W) 'UserMessage.cc'; else $(CYGPATH_W) '$(srcdir)/UserMessage.cc'; fi`
+
+bin_MetviewUI-ViewEditor.o: ViewEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ViewEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ViewEditor.Tpo -c -o bin_MetviewUI-ViewEditor.o `test -f 'ViewEditor.cc' || echo '$(srcdir)/'`ViewEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ViewEditor.Tpo $(DEPDIR)/bin_MetviewUI-ViewEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ViewEditor.cc' object='bin_MetviewUI-ViewEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ViewEditor.o `test -f 'ViewEditor.cc' || echo '$(srcdir)/'`ViewEditor.cc
+
+bin_MetviewUI-ViewEditor.obj: ViewEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ViewEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ViewEditor.Tpo -c -o bin_MetviewUI-ViewEditor.obj `if test -f 'ViewEditor.cc'; then $(CYGPATH_W) 'ViewEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ViewEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ViewEditor.Tpo $(DEPDIR)/bin_MetviewUI-ViewEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ViewEditor.cc' object='bin_MetviewUI-ViewEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ViewEditor.obj `if test -f 'ViewEditor.cc'; then $(CYGPATH_W) 'ViewEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ViewEditor.cc'; fi`
+
+bin_MetviewUI-ODBEditor.o: ODBEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ODBEditor.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ODBEditor.Tpo -c -o bin_MetviewUI-ODBEditor.o `test -f 'ODBEditor.cc' || echo '$(srcdir)/'`ODBEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ODBEditor.Tpo $(DEPDIR)/bin_MetviewUI-ODBEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ODBEditor.cc' object='bin_MetviewUI-ODBEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ODBEditor.o `test -f 'ODBEditor.cc' || echo '$(srcdir)/'`ODBEditor.cc
+
+bin_MetviewUI-ODBEditor.obj: ODBEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ODBEditor.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ODBEditor.Tpo -c -o bin_MetviewUI-ODBEditor.obj `if test -f 'ODBEditor.cc'; then $(CYGPATH_W) 'ODBEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ODBEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ODBEditor.Tpo $(DEPDIR)/bin_MetviewUI-ODBEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ODBEditor.cc' object='bin_MetviewUI-ODBEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ODBEditor.obj `if test -f 'ODBEditor.cc'; then $(CYGPATH_W) 'ODBEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ODBEditor.cc'; fi`
+
+bin_MetviewUI-SQLDrawer.o: SQLDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SQLDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SQLDrawer.Tpo -c -o bin_MetviewUI-SQLDrawer.o `test -f 'SQLDrawer.cc' || echo '$(srcdir)/'`SQLDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SQLDrawer.Tpo $(DEPDIR)/bin_MetviewUI-SQLDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SQLDrawer.cc' object='bin_MetviewUI-SQLDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SQLDrawer.o `test -f 'SQLDrawer.cc' || echo '$(srcdir)/'`SQLDrawer.cc
+
+bin_MetviewUI-SQLDrawer.obj: SQLDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-SQLDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-SQLDrawer.Tpo -c -o bin_MetviewUI-SQLDrawer.obj `if test -f 'SQLDrawer.cc'; then $(CYGPATH_W) 'SQLDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/SQLDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-SQLDrawer.Tpo $(DEPDIR)/bin_MetviewUI-SQLDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SQLDrawer.cc' object='bin_MetviewUI-SQLDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-SQLDrawer.obj `if test -f 'SQLDrawer.cc'; then $(CYGPATH_W) 'SQLDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/SQLDrawer.cc'; fi`
+
+bin_MetviewUI-ODBFunctionsDrawer.o: ODBFunctionsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ODBFunctionsDrawer.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Tpo -c -o bin_MetviewUI-ODBFunctionsDrawer.o `test -f 'ODBFunctionsDrawer.cc' || echo '$(srcdir)/'`ODBFunctionsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ODBFunctionsDrawer.cc' object='bin_MetviewUI-ODBFunctionsDrawer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ODBFunctionsDrawer.o `test -f 'ODBFunctionsDrawer.cc' || echo '$(srcdir)/'`ODBFunctionsDrawer.cc
+
+bin_MetviewUI-ODBFunctionsDrawer.obj: ODBFunctionsDrawer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-ODBFunctionsDrawer.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Tpo -c -o bin_MetviewUI-ODBFunctionsDrawer.obj `if test -f 'ODBFunctionsDrawer.cc'; then $(CYGPATH_W) 'ODBFunctionsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/ODBFunctionsDrawer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Tpo $(DEPDIR)/bin_MetviewUI-ODBFunctionsDrawer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ODBFunctionsDrawer.cc' object='bin_MetviewUI-ODBFunctionsDrawer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-ODBFunctionsDrawer.obj `if test -f 'ODBFunctionsDrawer.cc'; then $(CYGPATH_W) 'ODBFunctionsDrawer.cc'; else $(CYGPATH_W) '$(srcdir)/ODBFunctionsDrawer.cc'; fi`
+
+bin_MetviewUI-Wastebasket.o: Wastebasket.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Wastebasket.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Wastebasket.Tpo -c -o bin_MetviewUI-Wastebasket.o `test -f 'Wastebasket.cc' || echo '$(srcdir)/'`Wastebasket.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Wastebasket.Tpo $(DEPDIR)/bin_MetviewUI-Wastebasket.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Wastebasket.cc' object='bin_MetviewUI-Wastebasket.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Wastebasket.o `test -f 'Wastebasket.cc' || echo '$(srcdir)/'`Wastebasket.cc
+
+bin_MetviewUI-Wastebasket.obj: Wastebasket.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-Wastebasket.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-Wastebasket.Tpo -c -o bin_MetviewUI-Wastebasket.obj `if test -f 'Wastebasket.cc'; then $(CYGPATH_W) 'Wastebasket.cc'; else $(CYGPATH_W) '$(srcdir)/Wastebasket.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-Wastebasket.Tpo $(DEPDIR)/bin_MetviewUI-Wastebasket.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Wastebasket.cc' object='bin_MetviewUI-Wastebasket.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-Wastebasket.obj `if test -f 'Wastebasket.cc'; then $(CYGPATH_W) 'Wastebasket.cc'; else $(CYGPATH_W) '$(srcdir)/Wastebasket.cc'; fi`
+
+bin_MetviewUI-XMLabel.o: XMLabel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMLabel.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMLabel.Tpo -c -o bin_MetviewUI-XMLabel.o `test -f 'XMLabel.cc' || echo '$(srcdir)/'`XMLabel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMLabel.Tpo $(DEPDIR)/bin_MetviewUI-XMLabel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMLabel.cc' object='bin_MetviewUI-XMLabel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMLabel.o `test -f 'XMLabel.cc' || echo '$(srcdir)/'`XMLabel.cc
+
+bin_MetviewUI-XMLabel.obj: XMLabel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMLabel.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMLabel.Tpo -c -o bin_MetviewUI-XMLabel.obj `if test -f 'XMLabel.cc'; then $(CYGPATH_W) 'XMLabel.cc'; else $(CYGPATH_W) '$(srcdir)/XMLabel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMLabel.Tpo $(DEPDIR)/bin_MetviewUI-XMLabel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMLabel.cc' object='bin_MetviewUI-XMLabel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMLabel.obj `if test -f 'XMLabel.cc'; then $(CYGPATH_W) 'XMLabel.cc'; else $(CYGPATH_W) '$(srcdir)/XMLabel.cc'; fi`
+
+bin_MetviewUI-XMList.o: XMList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMList.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMList.Tpo -c -o bin_MetviewUI-XMList.o `test -f 'XMList.cc' || echo '$(srcdir)/'`XMList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMList.Tpo $(DEPDIR)/bin_MetviewUI-XMList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMList.cc' object='bin_MetviewUI-XMList.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMList.o `test -f 'XMList.cc' || echo '$(srcdir)/'`XMList.cc
+
+bin_MetviewUI-XMList.obj: XMList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMList.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMList.Tpo -c -o bin_MetviewUI-XMList.obj `if test -f 'XMList.cc'; then $(CYGPATH_W) 'XMList.cc'; else $(CYGPATH_W) '$(srcdir)/XMList.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMList.Tpo $(DEPDIR)/bin_MetviewUI-XMList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMList.cc' object='bin_MetviewUI-XMList.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMList.obj `if test -f 'XMList.cc'; then $(CYGPATH_W) 'XMList.cc'; else $(CYGPATH_W) '$(srcdir)/XMList.cc'; fi`
+
+bin_MetviewUI-XMString.o: XMString.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMString.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMString.Tpo -c -o bin_MetviewUI-XMString.o `test -f 'XMString.cc' || echo '$(srcdir)/'`XMString.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMString.Tpo $(DEPDIR)/bin_MetviewUI-XMString.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMString.cc' object='bin_MetviewUI-XMString.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMString.o `test -f 'XMString.cc' || echo '$(srcdir)/'`XMString.cc
+
+bin_MetviewUI-XMString.obj: XMString.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMString.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMString.Tpo -c -o bin_MetviewUI-XMString.obj `if test -f 'XMString.cc'; then $(CYGPATH_W) 'XMString.cc'; else $(CYGPATH_W) '$(srcdir)/XMString.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMString.Tpo $(DEPDIR)/bin_MetviewUI-XMString.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMString.cc' object='bin_MetviewUI-XMString.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMString.obj `if test -f 'XMString.cc'; then $(CYGPATH_W) 'XMString.cc'; else $(CYGPATH_W) '$(srcdir)/XMString.cc'; fi`
+
+bin_MetviewUI-XMText.o: XMText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMText.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMText.Tpo -c -o bin_MetviewUI-XMText.o `test -f 'XMText.cc' || echo '$(srcdir)/'`XMText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMText.Tpo $(DEPDIR)/bin_MetviewUI-XMText.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMText.cc' object='bin_MetviewUI-XMText.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMText.o `test -f 'XMText.cc' || echo '$(srcdir)/'`XMText.cc
+
+bin_MetviewUI-XMText.obj: XMText.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XMText.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XMText.Tpo -c -o bin_MetviewUI-XMText.obj `if test -f 'XMText.cc'; then $(CYGPATH_W) 'XMText.cc'; else $(CYGPATH_W) '$(srcdir)/XMText.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XMText.Tpo $(DEPDIR)/bin_MetviewUI-XMText.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XMText.cc' object='bin_MetviewUI-XMText.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XMText.obj `if test -f 'XMText.cc'; then $(CYGPATH_W) 'XMText.cc'; else $(CYGPATH_W) '$(srcdir)/XMText.cc'; fi`
+
+bin_MetviewUI-XPalette.o: XPalette.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XPalette.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XPalette.Tpo -c -o bin_MetviewUI-XPalette.o `test -f 'XPalette.cc' || echo '$(srcdir)/'`XPalette.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XPalette.Tpo $(DEPDIR)/bin_MetviewUI-XPalette.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XPalette.cc' object='bin_MetviewUI-XPalette.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XPalette.o `test -f 'XPalette.cc' || echo '$(srcdir)/'`XPalette.cc
+
+bin_MetviewUI-XPalette.obj: XPalette.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XPalette.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XPalette.Tpo -c -o bin_MetviewUI-XPalette.obj `if test -f 'XPalette.cc'; then $(CYGPATH_W) 'XPalette.cc'; else $(CYGPATH_W) '$(srcdir)/XPalette.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XPalette.Tpo $(DEPDIR)/bin_MetviewUI-XPalette.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XPalette.cc' object='bin_MetviewUI-XPalette.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XPalette.obj `if test -f 'XPalette.cc'; then $(CYGPATH_W) 'XPalette.cc'; else $(CYGPATH_W) '$(srcdir)/XPalette.cc'; fi`
+
+bin_MetviewUI-XPixmap.o: XPixmap.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XPixmap.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XPixmap.Tpo -c -o bin_MetviewUI-XPixmap.o `test -f 'XPixmap.cc' || echo '$(srcdir)/'`XPixmap.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XPixmap.Tpo $(DEPDIR)/bin_MetviewUI-XPixmap.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XPixmap.cc' object='bin_MetviewUI-XPixmap.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XPixmap.o `test -f 'XPixmap.cc' || echo '$(srcdir)/'`XPixmap.cc
+
+bin_MetviewUI-XPixmap.obj: XPixmap.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XPixmap.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XPixmap.Tpo -c -o bin_MetviewUI-XPixmap.obj `if test -f 'XPixmap.cc'; then $(CYGPATH_W) 'XPixmap.cc'; else $(CYGPATH_W) '$(srcdir)/XPixmap.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XPixmap.Tpo $(DEPDIR)/bin_MetviewUI-XPixmap.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XPixmap.cc' object='bin_MetviewUI-XPixmap.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XPixmap.obj `if test -f 'XPixmap.cc'; then $(CYGPATH_W) 'XPixmap.cc'; else $(CYGPATH_W) '$(srcdir)/XPixmap.cc'; fi`
+
+bin_MetviewUI-XResource.o: XResource.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XResource.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XResource.Tpo -c -o bin_MetviewUI-XResource.o `test -f 'XResource.cc' || echo '$(srcdir)/'`XResource.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XResource.Tpo $(DEPDIR)/bin_MetviewUI-XResource.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XResource.cc' object='bin_MetviewUI-XResource.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XResource.o `test -f 'XResource.cc' || echo '$(srcdir)/'`XResource.cc
+
+bin_MetviewUI-XResource.obj: XResource.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-XResource.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-XResource.Tpo -c -o bin_MetviewUI-XResource.obj `if test -f 'XResource.cc'; then $(CYGPATH_W) 'XResource.cc'; else $(CYGPATH_W) '$(srcdir)/XResource.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-XResource.Tpo $(DEPDIR)/bin_MetviewUI-XResource.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XResource.cc' object='bin_MetviewUI-XResource.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-XResource.obj `if test -f 'XResource.cc'; then $(CYGPATH_W) 'XResource.cc'; else $(CYGPATH_W) '$(srcdir)/XResource.cc'; fi`
+
+bin_MetviewUI-main.o: main.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-main.o -MD -MP -MF $(DEPDIR)/bin_MetviewUI-main.Tpo -c -o bin_MetviewUI-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-main.Tpo $(DEPDIR)/bin_MetviewUI-main.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='bin_MetviewUI-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+bin_MetviewUI-main.obj: main.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_MetviewUI-main.obj -MD -MP -MF $(DEPDIR)/bin_MetviewUI-main.Tpo -c -o bin_MetviewUI-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_MetviewUI-main.Tpo $(DEPDIR)/bin_MetviewUI-main.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='bin_MetviewUI-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_MetviewUI_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_MetviewUI-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/MetviewUI/MenuLine.cc b/src/MetviewUI/MenuLine.cc
new file mode 100644
index 0000000..ce34300
--- /dev/null
+++ b/src/MetviewUI/MenuLine.cc
@@ -0,0 +1,86 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MenuLine_H
+#include "MenuLine.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#include <Xm/PushB.h>
+
+#include <mars.h>
+
+MenuLine::MenuLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UIMenuLine_c>(owner,param)
+{
+}
+
+MenuLine::~MenuLine()
+{
+}
+
+class MenuMaker : public ParameterScanner {
+
+	const Parameter& param_;
+	Widget    menu_;
+
+	void next(const Parameter&, const char* first,const char* second);
+
+public:
+	MenuMaker(const Parameter& param,Widget menu) : param_(param), menu_(menu) {}
+};
+
+void MenuMaker::next(const Parameter&, const char* first,const char* second)
+{
+	Widget w = XmCreatePushButton(menu_,(char*)(second?second:first),0,0);
+	XMLabel(w).set(param_.beautifiedName(first));
+	XtManageChild(w);
+}
+
+void MenuLine::init(Widget w)
+{
+	XRequestPanelLine<UIMenuLine_c>::init(w);
+
+	MenuMaker m(param_,menu_);
+	param_.scan(m);
+}
+
+void MenuLine::refresh(const vector<string>& values)
+{
+	if(values.size()>0)
+	{
+		Widget w = XtNameToWidget(menu_,values[0].c_str());
+		XtVaSetValues(option_,XmNmenuHistory,w,0);
+	}
+}
+
+void MenuLine::activateCB(Widget,XtPointer data)
+{
+	XmRowColumnCallbackStruct *cb =(XmRowColumnCallbackStruct *) data;
+	owner_.set(param_.name(),XtName(cb->widget));
+}
+
+static LineMaker<MenuLine> maker1("menu");
+static LineMaker<MenuLine> maker2("option_menu");
diff --git a/src/MetviewUI/MenuLine.h b/src/MetviewUI/MenuLine.h
new file mode 100644
index 0000000..3cab1fd
--- /dev/null
+++ b/src/MetviewUI/MenuLine.h
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MenuLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MenuLine_H
+#define MenuLine_H
+
+#include "UIMenuLine.h"
+#include "RequestPanelLine.h"
+
+
+class MenuLine : public XRequestPanelLine<UIMenuLine_c> {
+public:
+
+// -- Contructors
+
+	MenuLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~MenuLine(); 
+
+private:
+
+// No copy allowed
+
+	MenuLine(const MenuLine&);
+	MenuLine& operator=(const MenuLine&);
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void activateCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+	
+	// From RequestPanelLine
+
+	virtual void init(Widget);
+
+};
+
+#endif
diff --git a/src/MetviewUI/Message.h b/src/MetviewUI/Message.h
new file mode 100644
index 0000000..0bb7593
--- /dev/null
+++ b/src/MetviewUI/Message.h
@@ -0,0 +1,44 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Message.h
+// Geir Austad - ECMWF May 01
+
+#ifndef Message_H
+#define Message_H
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+#ifndef Metview_H
+#include <Metview.h>
+#define Metview_H
+#endif
+
+class Message : public MvMessage
+{
+public:
+  Message(const char * name) : MvMessage(name) {}
+  virtual ~Message() {}
+	
+private:
+
+  // No copy allowed
+  Message(const Message&);
+  Message& operator=(const Message&);
+};
+
+
+
+inline void destroy(Message**) {}
+
+#endif
diff --git a/src/MetviewUI/MessageObserver.cc b/src/MetviewUI/MessageObserver.cc
new file mode 100644
index 0000000..13af73e
--- /dev/null
+++ b/src/MetviewUI/MessageObserver.cc
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+#include "Metview.h"
+
+#ifndef MessageObserver_H
+#include "MessageObserver.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+
+static set<MessageObserver*> observers_;
+ 
+ 
+class MessageHandler : public MvMessage {
+    void callback(MvRequest& r);
+};
+
+void MessageHandler::callback(MvRequest& in)
+{
+	MessageObserver::broadcast(in);
+}
+
+//=================================================================
+
+MessageObserver::MessageObserver()
+{
+     static MessageHandler messages;
+}
+
+
+MessageObserver::~MessageObserver()
+{
+	observers_.erase(this);
+}
+
+void MessageObserver::observe()
+{
+	observers_.insert(this);
+}
+void MessageObserver::stop()
+{
+	observers_.erase(this);
+}
+
+
+
+
+void MessageObserver::broadcast(const Request& msg)
+{
+	for ( set<MessageObserver*>::iterator j = observers_.begin(); j != observers_.end(); ++j)
+		(*j)->message(msg);
+}
+
+
diff --git a/src/MetviewUI/MessageObserver.h b/src/MetviewUI/MessageObserver.h
new file mode 100644
index 0000000..3d31f6c
--- /dev/null
+++ b/src/MetviewUI/MessageObserver.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MessageObserver.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef MessageObserver_H
+#define MessageObserver_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+
+class Request;
+
+class MessageObserver : public virtual Counted  {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MessageObserver();
+
+// -- Destructor
+
+	virtual ~MessageObserver(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void message(const Request&) = 0;
+	void observe();
+	void stop();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+	static void broadcast(const Request&);
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MessageObserver(const MessageObserver&);
+	MessageObserver& operator=(const MessageObserver&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MessageObserver& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+class MessageObserverH : public Handle<MessageObserver> {
+public:
+	MessageObserverH(MessageObserver* o) : Handle<MessageObserver>(o) {}
+};
+
+#endif
diff --git a/src/MetviewUI/MethodCommand.cc b/src/MetviewUI/MethodCommand.cc
new file mode 100644
index 0000000..8cfe244
--- /dev/null
+++ b/src/MetviewUI/MethodCommand.cc
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MethodCommand_H
+#include "MethodCommand.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+MethodCommand::MethodCommand(const string& name,Proc proc):
+	Command(name),
+	proc_(proc)
+{
+}
+
+MethodCommand::~MethodCommand()
+{
+	// Not called
+}
+
+void MethodCommand::execute(IconObject* o)
+{
+	(o->*proc_)();
+}	
+
+static MethodCommand editCmd("edit",&IconObject::edit);
+static MethodCommand duplicateCmd("duplicate",&IconObject::duplicate);
+static MethodCommand deleteCmd("delete",&IconObject::toWastebasket);
+static MethodCommand infoCmd("output",&IconObject::showLog);
+static MethodCommand emptyCmd("empty",&IconObject::empty);
diff --git a/src/MetviewUI/MethodCommand.h b/src/MetviewUI/MethodCommand.h
new file mode 100644
index 0000000..1051861
--- /dev/null
+++ b/src/MetviewUI/MethodCommand.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MethodCommand.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MethodCommand_H
+#define MethodCommand_H
+
+#include "Command.h"
+
+
+class MethodCommand : public Command {
+public:
+
+	typedef void (IconObject::*Proc)();
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MethodCommand(const string&,Proc);
+
+// -- Destructor
+
+	virtual ~MethodCommand(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void execute(IconObject*);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void execute(const string&,IconObject*);
+
+protected:
+
+// -- Members
+
+	string name_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MethodCommand(const MethodCommand&);
+	MethodCommand& operator=(const MethodCommand&);
+
+// -- Members
+
+	Proc proc_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MethodCommand& p)
+	//	{ p.print(s); return s; }
+
+};
+
+#endif
diff --git a/src/MetviewUI/MetviewService.cc b/src/MetviewUI/MetviewService.cc
new file mode 100644
index 0000000..87a78b0
--- /dev/null
+++ b/src/MetviewUI/MetviewService.cc
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MetviewService_H
+#include "MetviewService.h"
+#endif
+
+#ifndef MetviewTask_H
+#include "MetviewTask.h"
+#endif
+
+MetviewService::MetviewService(const string& name):
+	Service(name)
+{
+}
+
+MetviewService::~MetviewService()
+{
+}
+
+Task* MetviewService::task(const Action& action,IconObject* o)
+{
+	return new MetviewTask(name_,action,o);
+}
+
diff --git a/src/MetviewUI/MetviewService.h b/src/MetviewUI/MetviewService.h
new file mode 100644
index 0000000..245a196
--- /dev/null
+++ b/src/MetviewUI/MetviewService.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MetviewService.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MetviewService_H
+#define MetviewService_H
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+
+class MetviewService : public Service {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MetviewService(const string&);
+
+// -- Destructor
+
+	virtual ~MetviewService(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MetviewService(const MetviewService&);
+	MetviewService& operator=(const MetviewService&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual Task* task(const Action&,IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MetviewService& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MetviewService**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MetviewService);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/MetviewTask.cc b/src/MetviewUI/MetviewTask.cc
new file mode 100644
index 0000000..4075ffc
--- /dev/null
+++ b/src/MetviewUI/MetviewTask.cc
@@ -0,0 +1,167 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+
+#include <Metview.h>
+
+
+#ifndef MetviewTask_H
+#include "MetviewTask.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Dependancy_H
+#include "Dependancy.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+
+//=================================================================
+
+MetviewTask::MetviewTask(const string& service,const Action& action,IconObject* o):
+	action_(action),
+	object_(o),
+	service_(service),
+	waiting_(0),
+	error_(false)
+{
+}
+
+MetviewTask::~MetviewTask()
+{
+	cout << "MetviewTask::~MetviewTask " << *object_ << endl;
+}
+
+void MetviewTask::start()
+{
+	const set<DependancyH>& dep = object_->dependancies();
+
+	Action action("prepare","*");
+
+	for(set<DependancyH>::const_iterator j = dep.begin(); j != dep.end(); ++j)
+	{
+		Task* t = (*j)->action(action);
+		if(t) {
+			tasks_[t] = *j;
+			waiting_++;
+			t->add(this);
+		}
+
+	}
+
+	check();
+
+}
+
+void MetviewTask::check()
+{
+	if(waiting_) 
+		return;
+
+	if(error_)
+	{
+		Task::failure();
+		return;
+	}
+
+	MvRequest r   = object_->fullRequest();
+	const char* null = 0;
+
+	if(null == r("_NAME"))    r("_NAME")    = object_->fullName().c_str();
+	if(null == r("_CLASS"))   r("_CLASS")   = object_->className().c_str();
+	if(null == r("_ACTION"))  r("_ACTION")  = action_.name().c_str();
+	if(null == r("_SERVICE")) r("_SERVICE") = service_.c_str();
+
+	// Add extra information from the dropped target object
+	if ( context_ )
+		r("_CONTEXT") = context_;
+
+	cout << " ---> send " << *this << endl;
+	r.print();
+
+	callService(service_,r);
+
+	cout << " <--- send " << *this << endl;
+}
+
+void MetviewTask::progress(const Request& r)
+{
+}
+
+
+
+void MetviewTask::reply(const Request& r,int err)
+{
+	if(err) 
+		Task::failure();
+	else {
+		cout << " ---> reply " << *this << endl;
+		r.print();
+		cout << " <--- reply " << *this << endl;
+		if(r) {
+			IconObjectH o = IconFactory::create(object_,r);
+			TaskH       t = o->action(action_);
+		}
+		Task::success(r);
+	}
+}
+
+void MetviewTask::message(const string& s)
+{
+  Log::info(object_) << s << endl;
+}
+
+void MetviewTask::success(Task* t,const Request& r)
+{
+	cout << "MetviewTask::success " << *t << endl;
+	tasks_[t]->success(r);
+	waiting_--;
+	check();
+}
+
+void MetviewTask::failure(Task* t)
+{
+	cout << "MetviewTask::failure " << *t << endl;
+	error_ = true;
+	tasks_[t]->failure();
+	waiting_--;
+	check();
+}
+
+void MetviewTask::print(ostream& s) const
+{
+	s << "MetviewTask[" 
+	  << service_ 
+	  << "," 
+      << action_.name() 
+	  << ","  
+	  << action_.mode() 
+	  << ","
+      << *object_ 
+	  << "]";
+}
diff --git a/src/MetviewUI/MetviewTask.h b/src/MetviewUI/MetviewTask.h
new file mode 100644
index 0000000..c4ba403
--- /dev/null
+++ b/src/MetviewUI/MetviewTask.h
@@ -0,0 +1,146 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MetviewTask.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MetviewTask_H
+#define MetviewTask_H
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#include "TaskObserver.h"
+#include "IconObject.h"
+#include "Dependancy.h"
+#include "Request.h"
+
+
+class MetviewTask : public Task, public ReplyObserver, public TaskObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MetviewTask(const string&,const Action&,IconObject*);
+
+// -- Destructor
+
+	virtual ~MetviewTask(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+
+// -- Methods
+	void addContext (const Request& req) { context_ = req; }
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	 void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MetviewTask(const MetviewTask&);
+	MetviewTask& operator=(const MetviewTask&);
+
+// -- Members
+
+	string      service_;
+	Action      action_;
+	IconObjectH object_;
+	bool        error_;
+	int         waiting_;
+	Request     context_;
+
+	typedef map<TaskH,DependancyH> Map;
+	Map tasks_;
+
+// -- Methods
+
+	void check();
+
+// -- Overridden methods
+
+	// From Task
+	virtual void start();
+
+	// From ReplyObserver
+
+	virtual void reply(const Request&,int);
+	virtual void progress(const Request&);
+	virtual void message(const string&);
+
+	// From TaskObserver
+
+	virtual void success(Task*,const Request&);
+	virtual void failure(Task*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MetviewTask& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MetviewTask**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MetviewTask);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/MetviewUI.cc b/src/MetviewUI/MetviewUI.cc
new file mode 100644
index 0000000..fd02b3f
--- /dev/null
+++ b/src/MetviewUI/MetviewUI.cc
@@ -0,0 +1,92 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef FolderWindow_H
+#include "FolderWindow.h"
+#endif
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef Protocol_H
+#include "Protocol.h"
+#endif
+
+
+static XrmDatabase db;
+static Widget top;
+
+MetviewUI::MetviewUI(XtAppContext app,int argc, char **argv):
+	MvXApplication(app,argc,argv)
+{
+
+	Display* d = XtOpenDisplay(app, NULL, argv[0], "Metview", 
+		NULL, 0, &argc, argv);
+
+	if(d == 0)
+	{
+		cerr << argv[0] << ": can't open display, exiting..." << endl;
+		exit (-1);
+	}
+
+	top = XtAppCreateShell(argv[0],"Metview",applicationShellWidgetClass,d,0,0);
+	db = XtDatabase(d);
+
+	loadResources();
+	Protocol::init();
+	FolderWindow::start();
+
+}
+
+MetviewUI::~MetviewUI()
+{
+}
+
+Widget MetviewUI::root()
+{
+	return top;
+}
+
+void MetviewUI::load(request *r)
+{	
+	const char *p = get_value(r, "class", 0);
+	const char *q = get_value(r, "pixmap", 0);
+	if (p && q) {
+		char res[1024];		
+		sprintf(res, "Metview*%s.iconLargeBitmap", p);
+		XrmPutStringResource(&db, res, q);
+	}
+}
+
+void MetviewUI::loadResources()
+{
+	int order = 0;
+	bool more = true;
+
+	while(more)
+	{
+		more = false;
+		request  *r = mars.setup;
+		while (r) {
+			if(ConfigLoader::process(r,order))
+				more = true;
+			r = r->next;
+		}
+		order++;
+	}
+}
+
+
+static SimpleLoader<MetviewUI> loadClasses("object",1);
+
diff --git a/src/MetviewUI/MetviewUI.h b/src/MetviewUI/MetviewUI.h
new file mode 100644
index 0000000..1d4cf46
--- /dev/null
+++ b/src/MetviewUI/MetviewUI.h
@@ -0,0 +1,108 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MetviewUI.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef MetviewUI_H
+#define MetviewUI_H
+
+#include <Xm/Xm.h>
+#include <Metview.h>
+#include <MvXApplication.h>
+
+class MetviewUI : public MvXApplication {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MetviewUI(XtAppContext, int argc, char** argv);
+
+// -- Destructor
+
+	~MetviewUI(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static Widget root();
+	static void load(request*);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MetviewUI(const MetviewUI&);
+	MetviewUI& operator=(const MetviewUI&);
+
+// -- Members
+	// None
+
+// -- Methods
+
+	void loadResources();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MetviewUI& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MetviewUI**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MetviewUI);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/MotifDrop.cc b/src/MetviewUI/MotifDrop.cc
new file mode 100644
index 0000000..4e4435f
--- /dev/null
+++ b/src/MetviewUI/MotifDrop.cc
@@ -0,0 +1,168 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MotifDrop_H
+#include "MotifDrop.h"
+#endif
+
+#include <Xm/AtomMgr.h>
+#include <Xm/DragDrop.h>
+#include <Xm/ScrolledWP.h>
+
+#ifndef DropSite_H
+#include "DropSite.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+
+MotifDrop::MotifDrop(DropSite *owner):
+	owner_(owner)
+{
+}
+
+MotifDrop::~MotifDrop()
+{
+}
+
+void MotifDrop::run()
+{
+	owner_->drop(*this);
+	disable();
+}
+
+void MotifDrop::drop(const string& text)
+{
+	Folder* temp = Folder::folder("temporary");
+
+	name_ = temp->uniqueName("Drop");
+
+	Path p = temp->path().add(name_);
+	p.saveText(text);
+
+	enable();
+
+}
+
+IconObject* MotifDrop::object(DropSite&)
+{
+	return IconFactory::create(Folder::folder("temporary"),name_);
+}
+
+bool MotifDrop::copy()
+{
+	return true;
+}
+
+static void TransferProcCallback(Widget w, 
+	XtPointer closure, 
+	Atom *, Atom *type,
+	XtPointer value, unsigned long *, int *)
+{
+	MotifDrop *md      = (MotifDrop*)closure;
+	Display   *display = XtDisplay(w);
+	Atom COMPOUND_TEXT = XmInternAtom(display,"COMPOUND_TEXT",False);
+	Atom NULL_ATOM     = XmInternAtom(display,"NULL",False);
+
+	if(*type != NULL_ATOM && (!value || (*type != COMPOUND_TEXT)))
+	{
+		Arg al[2];
+		int n = 0;
+		XtSetArg(al[n], XmNtransferStatus, XmTRANSFER_FAILURE); n++;
+		XtSetArg(al[n], XmNnumDropTransfers, 0); n++;
+		XtSetValues(w, al, n);
+	}
+
+	if(*type == COMPOUND_TEXT)
+		if(value) 
+			md->drop((char*)value);
+
+	if (value) XtFree((char*)value);
+}
+
+
+static void DropProcCallback(Widget w,XtPointer,XmDropProcCallbackStruct *cb)
+{
+	Arg al[10];
+	int n = 0;
+	int t = 0;
+	Display *display = XtDisplay(w);
+	XmDropTransferEntryRec trans[2];
+
+	if ( (cb->operations & XmDROP_COPY) == 0)
+	{
+		cb->operation      = XmDROP_NOOP;
+		cb->dropSiteStatus = XmINVALID_DROP_SITE;
+		XtSetArg(al[n], XmNtransferStatus, XmTRANSFER_FAILURE); n++;
+	}
+	else
+	{
+		MotifDrop* site = 0;
+		XtVaGetValues(w,XmNuserData,&site,0);
+		site->position(cb->x,cb->y);
+
+		trans[t].target      = XmInternAtom(display,"COMPOUND_TEXT",False);
+		trans[t].client_data = XtPointer(site);
+		t++;
+		cb->dropSiteStatus    = XmVALID_DROP_SITE;
+
+		XtSetArg(al[n], XmNtransferProc, TransferProcCallback); n++;
+	}
+
+	XtSetArg(al[n], XmNdropTransfers, &trans); n++;
+	XtSetArg(al[n], XmNnumDropTransfers, t);  n++;
+
+
+	XmDropTransferStart(cb->dragContext, al,n);
+}
+
+
+void MotifDrop::addSite(DropSite* s,Widget w)
+{
+	// Motif Drop
+
+	MotifDrop* d = new MotifDrop(s);
+
+	int ac = 0;
+	int t  = 0;
+	Arg al[10];
+	Display *display = XtDisplay(w);
+	Atom    targets[3];
+
+	targets[t++] = XmInternAtom(display, "COMPOUND_TEXT", False);
+	XtSetArg(al[ac], XmNimportTargets, targets); ac++;
+	XtSetArg(al[ac], XmNnumImportTargets, t);    ac++;
+	XtSetArg(al[ac], XmNdragOperations, XmDROP_COPY); ac++;
+	XtSetArg(al[ac], XmNdropProc, DropProcCallback); ac++;
+
+	XmDropSiteRegister(w, al,ac);
+	XtVaSetValues(w,XmNuserData,d,0);
+
+	// Register clip window as well
+
+	Widget clip, scroll;
+	if(clip = XtParent(w))
+		if(scroll = XtParent(clip))
+			if(XmIsScrolledWindow(scroll))
+			{
+				XmDropSiteRegister(clip, al,ac);
+				XtVaSetValues(clip,XmNuserData,d,0);
+			}
+}
+
+void MotifDrop::removeSite(DropSite* s)
+{
+	// Should do something here
+}
diff --git a/src/MetviewUI/MotifDrop.h b/src/MetviewUI/MotifDrop.h
new file mode 100644
index 0000000..5a7b435
--- /dev/null
+++ b/src/MetviewUI/MotifDrop.h
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MotifDrop.h
+// Baudouin Raoult - ECMWF Jun 00
+
+#ifndef MotifDrop_H
+#define MotifDrop_H
+
+#include <string>
+using std::string;
+
+class DropSite;
+
+#ifndef Runnable_H
+#include "Runnable.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+class MotifDrop : public Runnable, public Dropping {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	MotifDrop(DropSite*);
+
+// -- Destructor
+
+	~MotifDrop(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+// -- Methods
+
+	int x() const;
+	int y() const;
+	void drop(const string&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	static void addSite(DropSite*,Widget);
+	static void removeSite(DropSite*);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	MotifDrop(const MotifDrop&);
+	MotifDrop& operator=(const MotifDrop&);
+
+// -- Members
+
+	DropSite*    owner_;
+	string       name_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From Runnable
+	virtual void run();
+
+	// From Dropping
+
+	virtual IconObject* object(DropSite&);
+	virtual bool copy();
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MotifDrop& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(MotifDrop**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MotifDrop);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Netscape.cc b/src/MetviewUI/Netscape.cc
new file mode 100644
index 0000000..a70e9fd
--- /dev/null
+++ b/src/MetviewUI/Netscape.cc
@@ -0,0 +1,91 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Netscape_H
+#include "Netscape.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Action_H
+#include "Action.h"
+#endif
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+
+//=================================================================
+
+static map<string,string> web;
+
+void Netscape::callNetscape(const Request& r)
+{
+	const IconClass& c = IconClass::find(r.getVerb());
+	Action a("execute");	
+
+	Service* service = c.service(a);
+	MvApplication::callService(service->name().c_str(),r,0);
+
+}
+
+void Netscape::showURL(const string& url)
+{
+	cout << "Netscape::showURL " << url << endl;
+
+	Request r("WEBACCESS");
+	r("URL") = url.c_str();
+
+	callNetscape(r);
+
+}
+
+void Netscape::showPage(const string& url)
+{
+	cout << "Netscape::showPage " << url << endl;
+	showURL(web[url]);
+}
+
+void Netscape::showPage(const string& url,const string& page)
+{
+	cout << "Netscape::showPage " << url  << " - " << page << endl;
+	showURL(web[url] + "/" + page);
+}
+
+void Netscape::savePage(const Path& path,const string& type)
+{
+	Request r("WEBACCESS");
+	r("SAVE") = path.str().c_str();
+	r("TYPE") = type.c_str();
+	callNetscape(r);
+}
+
+void Netscape::load(request* r)
+{
+	const char* n = get_value(r,"page",0); 
+	const char* u = get_value(r,"url",0); 
+	if(n && u) web[n] = u;
+}
+
+static SimpleLoader<Netscape> loadClasses("web",1);
diff --git a/src/MetviewUI/Netscape.h b/src/MetviewUI/Netscape.h
new file mode 100644
index 0000000..43c0285
--- /dev/null
+++ b/src/MetviewUI/Netscape.h
@@ -0,0 +1,100 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Netscape.h
+// Baudouin Raoult - ECMWF Jun 00
+
+#ifndef Netscape_H
+#define Netscape_H
+
+
+#include <string>
+using std::string;
+
+#include <Request.h>
+
+class Path;
+
+class Netscape {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+
+// -- Destructor
+
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+	static void showURL(const string&);
+	static void showPage(const string&);
+	static void showPage(const string&,const string&);
+	static void savePage(const Path&,const string& = "HTML");
+
+	static void load(request*);
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	static void callNetscape(const Request&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Netscape(const Netscape&);
+	Netscape& operator=(const Netscape&);
+
+// -- Members
+
+
+};
+
+inline void destroy(Netscape**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Netscape);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/NoEditor.cc b/src/MetviewUI/NoEditor.cc
new file mode 100644
index 0000000..ae0871b
--- /dev/null
+++ b/src/MetviewUI/NoEditor.cc
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef NoEditor_H
+#include "NoEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+
+NoEditor::NoEditor(const IconClass& name,const string& kind):
+	XEditor<UINoEditor_c>(name,kind)
+{
+}
+
+NoEditor::~NoEditor()
+{
+}
+
+void NoEditor::apply()
+{
+}
+
+void NoEditor::reset()
+{
+}
+
+void NoEditor::close()
+{
+}
+
+void NoEditor::merge(IconObject*)
+{
+}
+void NoEditor::replace(IconObject*)
+{
+}
+
+string NoEditor::alternateEditor()
+{
+	return "NoEditor";
+}
+
+
+static EditorMaker<NoEditor> editorMaker("NoEditor");
+
diff --git a/src/MetviewUI/NoEditor.h b/src/MetviewUI/NoEditor.h
new file mode 100644
index 0000000..c22d4c8
--- /dev/null
+++ b/src/MetviewUI/NoEditor.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File NoEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef NoEditor_H
+#define NoEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#include "UINoEditor.h"
+
+class NoEditor : public XEditor<UINoEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	NoEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~NoEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	NoEditor(const NoEditor&);
+	NoEditor& operator=(const NoEditor&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+	virtual string alternateEditor();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const NoEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(NoEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(NoEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/NoneLine.cc b/src/MetviewUI/NoneLine.cc
new file mode 100644
index 0000000..5f43dfb
--- /dev/null
+++ b/src/MetviewUI/NoneLine.cc
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef NoneLine_H
+#include "NoneLine.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#include <Xm/PushB.h>
+
+#include <mars.h>
+
+NoneLine::NoneLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UINoneLine_c>(owner,param)
+{
+}
+
+NoneLine::~NoneLine()
+{
+}
+
+void NoneLine::init(Widget w)
+{
+	XRequestPanelLine<UINoneLine_c>::init(w);
+	UILine_c::Unmanage();
+}
+
+void NoneLine::gray(bool)
+{
+	UILine_c::Unmanage();
+}
+
+static LineMaker<NoneLine> maker("none");
diff --git a/src/MetviewUI/NoneLine.h b/src/MetviewUI/NoneLine.h
new file mode 100644
index 0000000..2ab5449
--- /dev/null
+++ b/src/MetviewUI/NoneLine.h
@@ -0,0 +1,47 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File NoneLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef NoneLine_H
+#define NoneLine_H
+
+#include "UINoneLine.h"
+#include "RequestPanelLine.h"
+
+
+class NoneLine : public XRequestPanelLine<UINoneLine_c> {
+public:
+
+// -- Contructors
+
+	NoneLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~NoneLine(); 
+
+private:
+
+// No copy allowed
+
+	NoneLine(const NoneLine&);
+	NoneLine& operator=(const NoneLine&);
+
+// -- Overridden methods
+	
+	// From RequestPanelLine
+
+	virtual void init(Widget);
+	virtual void gray(bool);
+
+};
+
+#endif
diff --git a/src/MetviewUI/ODBEditor.cc b/src/MetviewUI/ODBEditor.cc
new file mode 100644
index 0000000..e29711c
--- /dev/null
+++ b/src/MetviewUI/ODBEditor.cc
@@ -0,0 +1,321 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ODBEditor_H
+#include "ODBEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+
+ODBEditor::ODBEditor(const IconClass& name,const string& kind):
+	XEditor<UIODBEditor_c>(name,kind)
+{
+}
+
+ODBEditor::~ODBEditor()
+{
+}
+
+void ODBEditor::apply()
+{
+}
+
+void ODBEditor::reset()
+{
+	parseDDfile();
+
+	XMList p(constants_);
+	p.clear();
+	for(map<string,string>::iterator j = params_.begin(); j != params_.end(); ++j)
+		p.add((*j).first);
+
+	XMList t(tablesList_);
+	t.clear();
+	for(map<string,map<string,vector<string> > >::iterator k = tables_.begin(); k != tables_.end(); ++k)
+		t.add((*k).first,true);
+
+	XMList(columnsList_).clear();
+	XMList(fieldsList_).clear();
+	XMList(selectList_).clear();
+
+	adjustButtons();
+}
+
+void ODBEditor::close()
+{
+}
+
+void ODBEditor::merge(IconObject* o)
+{
+}
+
+void ODBEditor::replace(IconObject* o)
+{
+}
+
+string ODBEditor::alternateEditor()
+{
+  return "SimpleEditor";
+}
+
+map<string,string>& ODBEditor::params()
+{
+	return params_;
+}
+
+void ODBEditor::parseDDfile()
+{
+	params_.clear();
+	tables_.clear();
+
+	char cmd[10240];
+	sprintf(cmd,"$METVIEW_BIN/odb_lang.pl /scratch/ma/mab/a/CCMA/CCMA.dd");
+	FILE* f = popen(cmd,"r");
+	if(f)
+	{
+		while(fgets(cmd,sizeof(cmd),f))
+		{
+			if(cmd[0] == '$')
+			{
+				char n[80];
+				char v[80];
+				sscanf(cmd,"%s %s",n,v);
+				params_[n] = v;
+			}
+
+			if(cmd[0] == '+')
+			{
+				char t[80];
+				char c[80];
+				char f[80];
+
+				t[0] = c[0] = f[0] = 0;
+				sscanf(&cmd[2],"%s %s %s",t,c,f);
+
+				vector<string>& v = tables_[t][c];
+				if(f[0]) v.push_back(f);
+			}
+		}
+		pclose(f);
+	}
+
+}
+
+void ODBEditor::browseTablesCB(Widget,XtPointer)
+{
+	XMList t(tablesList_); XMList c(columnsList_);
+	vector<string> s = t.selection();
+	cout << s[0] << endl;
+
+	c.clear();
+	map<string,vector<string> >& x = tables_[s[0]];
+	for(map<string,vector<string> > ::iterator k = x.begin(); k != x.end(); ++k)
+		c.add((*k).first,(*k).second.size() > 0);
+
+	XMList(fieldsList_).clear();
+
+	adjustButtons();
+
+}
+
+void ODBEditor::browseColumnsCB(Widget,XtPointer)
+{
+	XMList t(tablesList_); 
+	XMList c(columnsList_);
+
+	vector<string> s = t.selection();
+	vector<string> u = c.selection();
+
+	XMList f(fieldsList_);
+
+	f.clear();
+	vector<string>& x = tables_[s[0]][u[0]];
+
+	for(vector<string>::iterator k = x.begin(); k != x.end(); ++k)
+		f.add(*k);
+
+	adjustButtons();
+}
+
+void ODBEditor::sql(Widget w)
+{
+	sql_ = w;
+}
+
+void ODBEditor::constants(Widget w)
+{
+	constants_ = w;
+}
+
+void ODBEditor::browseFieldsCB(Widget,XtPointer)
+{
+	adjustButtons();
+}
+
+void ODBEditor::browseSelectCB(Widget,XtPointer)
+{
+	adjustButtons();
+}
+
+void ODBEditor::addCB(Widget,XtPointer)
+{
+	string x = selectedVariable();
+	if(x != "")
+		XMList(selectList_).add(x);
+	adjustButtons();
+}
+
+string ODBEditor::selectedVariable()
+{
+	XMList t(tablesList_); 
+	XMList c(columnsList_);
+	XMList f(fieldsList_);
+
+	vector<string> s = t.selection();
+	vector<string> u = c.selection();
+	vector<string> v = f.selection();
+
+	if(!s.size()) return "";
+	if(!u.size()) return "";
+
+	if(tables_[s[0]][u[0]].size())
+		if(!v.size())
+			return "";
+
+	string x = u[0];
+	if(v.size()) 
+		x = x + "." + v[0];
+
+	x = x + "@" + s[0];
+
+	return x;
+
+}
+
+void ODBEditor::removeCB(Widget,XtPointer)
+{
+	XMList l(selectList_);
+	l.remove(l.selection());
+	adjustButtons();
+}
+
+void ODBEditor::adjustButtons()
+{
+	XMList l(selectList_);
+
+	string x = selectedVariable();
+	XtSetSensitive(add_,(x != "") && !l.exists(x));
+
+	XtSetSensitive(insert_,(x != ""));
+
+	vector<string> s = l.selection();
+	XtSetSensitive(remove_,s.size()>0); 
+
+	vector<string> v = l.values();
+
+	XtSetSensitive(up_,s.size()>0 && v[0] != s[0]); 
+	XtSetSensitive(down_,s.size()>0 && v[v.size()-1] != s[0]); 
+
+	s = l.values();
+	XMText t(sql_);
+	x = "SELECT ";
+
+	for(vector<string>::iterator k = s.begin(); k != s.end(); ++k)
+	{
+		if(k != s.begin())
+			x += ",\n       ";
+		x += (*k);
+	}
+
+	x += "\nFROM *";
+
+
+	XMText w(whereText_);
+	x += "\nWHERE ";
+	x += w.get();
+
+	t.set(x);
+}
+
+void ODBEditor::insert(const string& s)
+{
+	XMText(whereText_).insert(s);
+	adjustButtons();
+}
+
+void ODBEditor::upCB(Widget,XtPointer)
+{
+	XMList l(selectList_);
+
+	vector<string> s = l.selection();
+	vector<string> v = l.values();
+
+	int j = 0;
+	for(int i = 0; i < v.size(); i++)
+		if(v[i] == s[0])
+			j = i;
+
+	string t = v[j]; v[j] = v[j-1]; v[j-1] = t;
+	l.clear();
+	l.add(v);
+	l.select(s[0]);
+
+	adjustButtons();
+}
+
+void ODBEditor::downCB(Widget,XtPointer)
+{
+	XMList l(selectList_);
+
+	vector<string> s = l.selection();
+	vector<string> v = l.values();
+
+	int j = 0;
+	for(int i = 0; i < v.size(); i++)
+		if(v[i] == s[0])
+			j = i;
+
+	string t = v[j]; v[j] = v[j+1]; v[j+1] = t;
+	l.clear();
+	l.add(v);
+	l.select(s[0]);
+
+	adjustButtons();
+}
+
+void ODBEditor::insertCB(Widget,XtPointer)
+{
+	insert(selectedVariable());
+}
+
+void ODBEditor::doubleClickCB(Widget,XtPointer)
+{
+	string x = selectedVariable();
+	if(x != "")
+		insert(x);
+}
+
+void ODBEditor::changedCB(Widget,XtPointer)     
+{
+	adjustButtons();  
+}
+
+static EditorMaker<ODBEditor> editorMaker("ODBEditor");
diff --git a/src/MetviewUI/ODBEditor.h b/src/MetviewUI/ODBEditor.h
new file mode 100644
index 0000000..40185ca
--- /dev/null
+++ b/src/MetviewUI/ODBEditor.h
@@ -0,0 +1,147 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ODBEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ODBEditor_H
+#define ODBEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#include "UIODBEditor.h"
+
+
+class ODBEditor : public XEditor<UIODBEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ODBEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~ODBEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void sql(Widget);
+	void constants(Widget);
+	void insert(const string&);
+
+	map<string,string>& params();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ODBEditor(const ODBEditor&);
+	ODBEditor& operator=(const ODBEditor&);
+
+// -- Members
+
+	map<string,string> params_;
+	map<string,map<string,vector<string> > > tables_;
+
+	Widget sql_;
+	Widget constants_;
+
+// -- Methods
+
+	void parseDDfile();
+
+	string selectedVariable();
+	void adjustButtons();
+
+// -- Overridden methods
+
+	// From InternalEditor 
+
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+	virtual string alternateEditor();
+
+	// From XD
+
+	virtual void browseTablesCB(Widget,XtPointer);
+	virtual void browseColumnsCB(Widget,XtPointer);
+	virtual void browseFieldsCB(Widget,XtPointer);
+	virtual void browseSelectCB(Widget,XtPointer);
+	virtual void doubleClickCB(Widget,XtPointer);
+
+	virtual void addCB(Widget,XtPointer);
+	virtual void removeCB(Widget,XtPointer);
+	virtual void upCB(Widget,XtPointer);
+	virtual void downCB(Widget,XtPointer);
+	virtual void insertCB(Widget,XtPointer);
+
+	virtual void changedCB(Widget,XtPointer);
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ODBEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ODBEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ODBEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ODBFunctionsDrawer.cc b/src/MetviewUI/ODBFunctionsDrawer.cc
new file mode 100644
index 0000000..9418cd2
--- /dev/null
+++ b/src/MetviewUI/ODBFunctionsDrawer.cc
@@ -0,0 +1,102 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ODBFunctionsDrawer_H
+#include "ODBFunctionsDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef ODBEditor_H
+#include "ODBEditor.h"
+#endif
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+
+static request* sql_funcs = 0;
+static map<string,string> help;
+
+ODBFunctionsDrawer::ODBFunctionsDrawer(ODBEditor& e):
+	XEditorDrawer<UIODBFunctionsDrawer_c>(e),
+	editor_(e)
+{
+	e.constants(contants_);
+
+	if(sql_funcs == 0)
+	{
+		char buffer[1024];
+		sprintf(buffer,"%s/etc/ODB.sql",getenv("METVIEW_DIR_SHARE"));
+		sql_funcs = read_request_file(buffer);
+		print_all_requests(sql_funcs);
+	}
+
+	request *r = sql_funcs;
+	XMList f(functions_);
+	XMList o(operators_);
+	while(r)
+	{
+		const char *n = get_value(r,"name",0);
+		const char *d = get_value(r,"description",0);
+		if(n) {
+			string z = no_quotes(n);
+			help[z] = (d ? no_quotes(d) : "no description available");
+			if(EQ(r->name,"function"))
+				f.add(z);
+			else
+				o.add(z);
+		}
+
+		r = r->next;
+	}
+
+	f.sort();
+	o.sort();
+}
+
+ODBFunctionsDrawer::~ODBFunctionsDrawer()
+{
+}
+
+void ODBFunctionsDrawer::doubleClickCB(Widget w,XtPointer)
+{
+	XMList l(w);
+	vector<string> s = l.selection();
+	editor_.insert(s[0]);
+}
+
+void ODBFunctionsDrawer::browseCB(Widget w,XtPointer)
+{
+	XMList l(w);
+	vector<string> s = l.selection();
+
+	XMLabel h(help_);
+
+	string x = s[0];
+
+	if(help.find(x) != help.end())
+		x = help[x];
+
+	map<string,string>& parms = editor_.params();
+	if(parms.find(x) != parms.end())
+		x = x + " = " + parms[x];
+
+	h.set(x + " - Double-click to insert.");
+}
+
+
+static EditorDrawerMaker<ODBFunctionsDrawer,ODBEditor> maker(9);
diff --git a/src/MetviewUI/ODBFunctionsDrawer.h b/src/MetviewUI/ODBFunctionsDrawer.h
new file mode 100644
index 0000000..8d6aab6
--- /dev/null
+++ b/src/MetviewUI/ODBFunctionsDrawer.h
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ODBFunctionsDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ODBFunctionsDrawer_H
+#define ODBFunctionsDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UIODBFunctionsDrawer.h"
+
+class ODBEditor;
+
+class ODBFunctionsDrawer : public XEditorDrawer<UIODBFunctionsDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ODBFunctionsDrawer(ODBEditor&);
+
+// -- Destructor
+
+	virtual ~ODBFunctionsDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ODBFunctionsDrawer(const ODBFunctionsDrawer&);
+	ODBFunctionsDrawer& operator=(const ODBFunctionsDrawer&);
+
+// -- Members
+
+	ODBEditor& editor_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void doubleClickCB(Widget,XtPointer);
+	virtual void browseCB(Widget,XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ODBFunctionsDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ODBFunctionsDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ODBFunctionsDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/OutputDrawer.cc b/src/MetviewUI/OutputDrawer.cc
new file mode 100644
index 0000000..d904a75
--- /dev/null
+++ b/src/MetviewUI/OutputDrawer.cc
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef OutputDrawer_H
+#include "OutputDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef MacroEditor_H
+#include "MacroEditor.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+OutputDrawer::OutputDrawer(MacroEditor& e):
+	XEditorDrawer<UIOutputDrawer_c>(e),
+	editor_(e)
+{
+	e.output(text_);	
+}
+
+OutputDrawer::~OutputDrawer()
+{
+}
+
+void OutputDrawer::clickCB(Widget,XtPointer data)
+{
+	XmTextVerifyCallbackStruct *cb = (XmTextVerifyCallbackStruct*)data;
+	XMText text(text_);
+	string p = text.get();
+	
+	long len = p.length();
+	long n = cb->newInsert;
+
+	const char* pc = p.c_str();  //-- HP C++ string crashes on p[n]
+	                             //-- thus use C string pc  :-(
+
+	while(n > 0 && pc[n-1] != '\n') 
+		n--;
+
+	if(pc[n-1] == '\n') 
+		n++;
+
+	string s;
+	while(n < len && pc[n-1] != 'L' && pc[n-1] != '\n')
+	   n++;
+	while(n < len && pc[n-1] != '\n')
+	   s += pc[n++];
+
+	editor_.line(s);
+}
+
+static EditorDrawerMaker<OutputDrawer,MacroEditor> maker(10);
diff --git a/src/MetviewUI/OutputDrawer.h b/src/MetviewUI/OutputDrawer.h
new file mode 100644
index 0000000..1d1eae1
--- /dev/null
+++ b/src/MetviewUI/OutputDrawer.h
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File OutputDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef OutputDrawer_H
+#define OutputDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UIOutputDrawer.h"
+
+class MacroEditor;
+
+class OutputDrawer : public XEditorDrawer<UIOutputDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	OutputDrawer(MacroEditor&);
+
+// -- Destructor
+
+	virtual ~OutputDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	OutputDrawer(const OutputDrawer&);
+	OutputDrawer& operator=(const OutputDrawer&);
+
+// -- Members
+
+	MacroEditor& editor_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void clickCB(Widget,XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const OutputDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(OutputDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(OutputDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/PageView.cc b/src/MetviewUI/PageView.cc
new file mode 100644
index 0000000..28a832e
--- /dev/null
+++ b/src/MetviewUI/PageView.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef PageView_H
+#include "PageView.h"
+#endif
+
+#include <Paper.h>
+
+#include "IconClass.h"
+
+PageView::PageView(IconObject* o):
+	object_(o),
+	pixmap_(o?o->iconClass().pixmap():string())
+{
+}
+
+PageView::~PageView()
+{
+}
+
+IconObject* PageView::view()
+{
+	return object_;
+}
+
+void PageView::draw(Widget w,PaperGraphics* g)
+{
+	if(!name_)
+	{
+		if(object_ == 0)
+			name_ = XMString("Undefined");
+		else
+			name_ = XMString(object_->name(),"italic");
+		width_  = XmStringWidth(g->font,name_);
+	}
+
+	int x = g->rect->x + (g->rect->width - 32)/2;
+	int y = g->rect->y + (g->rect->height - 32)/2;
+
+	if(pixmap_ != XmUNSPECIFIED_PIXMAP)
+	XCopyArea(XtDisplay(w),pixmap_,g->drawable,g->gc,0,0,32,32,x,y);
+
+	x = g->rect->x + (g->rect->width  - width_ ) /2;
+	y = y + 32 ;
+
+	XmStringDraw(XtDisplay(w),g->drawable,
+	    g->font,
+	    name_,
+	    g->gc,
+	    x,
+	    y,
+	   	width_, 
+	    XmALIGNMENT_CENTER, XmSTRING_DIRECTION_L_TO_R, NULL);
+
+	char buf[10];
+	sprintf(buf,"%d",g->r->number);
+	XMString s(buf,"tiny");
+
+	XmStringDraw(XtDisplay(w),g->drawable,
+		g->font,
+		s,
+		g->gc,
+		g->rect->x + 2,
+		g->rect->y + 2,
+		XmStringWidth(g->font,s), 
+		XmALIGNMENT_CENTER, XmSTRING_DIRECTION_L_TO_R, NULL);
+}
+
+void PageView::edit()
+{
+	if(object_) object_->edit();
+}
+
diff --git a/src/MetviewUI/PageView.h b/src/MetviewUI/PageView.h
new file mode 100644
index 0000000..12a5735
--- /dev/null
+++ b/src/MetviewUI/PageView.h
@@ -0,0 +1,151 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PageView.h
+// Baudouin Raoult - ECMWF Sep 99
+
+#ifndef PageView_H
+#define PageView_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#ifndef XPixmap_H
+#include "XPixmap.h"
+#endif
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+#include <Paper.h>
+
+
+class PageView : public Counted {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	PageView(IconObject*);
+
+// -- Destructor
+
+	virtual ~PageView(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void draw(Widget,PaperGraphics*);
+	void edit();
+
+	IconObject* view();
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	PageView(const PageView&);
+	PageView& operator=(const PageView&);
+
+// -- Members
+	// None
+
+	IconObjectH object_;
+	XMString    name_;
+	XPixmap     pixmap_;
+	int         width_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const PageView& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(PageView**) {}
+
+class PageViewH : public  Handle<PageView> {
+public:
+	PageViewH(PageView* o = 0) : Handle<PageView>(o) {}
+};
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(PageView);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/PaperDrawer.cc b/src/MetviewUI/PaperDrawer.cc
new file mode 100644
index 0000000..1a3f67a
--- /dev/null
+++ b/src/MetviewUI/PaperDrawer.cc
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+#include <Xm/TextF.h>
+#ifndef PaperDrawer_H
+#include "PaperDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef ViewEditor_H
+#include "ViewEditor.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+PaperDrawer::PaperDrawer(ViewEditor& e):
+	XEditorDrawer<UIPaperDrawer_c>(e),
+	editor_(e)
+{
+}
+
+PaperDrawer::~PaperDrawer()
+{
+}
+
+void PaperDrawer::edit(IconObject*)
+{
+  // Get the initial width and height values from editor
+  double w,h;
+  editor_.getPaperSize(w,h);
+  setSize(w,h);
+}
+
+void PaperDrawer::setSize(double w,double h)
+{
+	XMText(height_).set(h);
+	XMText(width_).set(w);
+	editor_.setPaperSize(w,h);
+}
+
+
+void PaperDrawer::setCB(Widget, XtPointer)
+{
+	double h = 0, w = 0;
+	XMText(height_).get(h);
+	XMText(width_).get(w);
+    editor_.setPaperSize(fabs(w),fabs(h));
+}
+
+void PaperDrawer::a4CB(Widget, XtPointer)
+{
+  setSize(21,29.7);
+}
+
+void PaperDrawer::a3CB(Widget, XtPointer)
+{
+  setSize(29.7,42); 
+}
+
+void PaperDrawer::rotateCB(Widget,XtPointer)
+{
+  double h,v;
+  editor_.getPaperSize(h,v);
+  setSize(v,h);
+}
+
+static EditorDrawerMaker<PaperDrawer,ViewEditor> maker(10);
+
diff --git a/src/MetviewUI/PaperDrawer.h b/src/MetviewUI/PaperDrawer.h
new file mode 100644
index 0000000..3daeb5b
--- /dev/null
+++ b/src/MetviewUI/PaperDrawer.h
@@ -0,0 +1,116 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PaperDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef PaperDrawer_H
+#define PaperDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UIPaperDrawer.h"
+
+class ViewEditor;
+
+class PaperDrawer : public XEditorDrawer<UIPaperDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	PaperDrawer(ViewEditor&);
+
+// -- Destructor
+
+	virtual ~PaperDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+  void setCB(Widget, XtPointer);
+  void rotateCB(Widget, XtPointer);
+  void a4CB(Widget, XtPointer);
+  void a3CB(Widget, XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	PaperDrawer(const PaperDrawer&);
+	PaperDrawer& operator=(const PaperDrawer&);
+
+// -- Members
+  ViewEditor& editor_;
+
+// -- Methods
+  void setSize(double,double);
+
+// -- Overridden methods
+  virtual void edit(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const PaperDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(PaperDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(PaperDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ParamList.cc b/src/MetviewUI/ParamList.cc
new file mode 100644
index 0000000..ed485b3
--- /dev/null
+++ b/src/MetviewUI/ParamList.cc
@@ -0,0 +1,89 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "ParamList.h"
+#include <ctype.h>
+
+
+
+ParamList::ParamList(Widget list,const Parameter& param):
+	list_(list),
+	param_(param)
+{
+	param.scan(*this);
+	sort(selection_.begin(),selection_.end());
+	list_.add(selection_);
+	selection_.clear();
+}
+
+ParamList::~ParamList()
+{
+}
+
+void ParamList::next(const Parameter&, const char* first,const char* second)
+{
+    if(isalnum(*first))
+	{
+		string a = first;
+		string b = param_.beautifiedName(a);
+		values_[b] = a;
+		selection_.push_back(b);
+	}	
+
+    if(*first == '/')
+        list_.multiple();
+}
+
+vector<string> ParamList::get()
+{
+	vector<string> v  = selection_;
+	for(vector<string>::iterator j = v.begin(); j != v.end(); ++j)
+		*j = values_[*j];
+		
+
+	return v;
+}
+
+void ParamList::set(const vector<string>& v)
+{
+	selection_ = v;
+	for(vector<string>::iterator j = selection_.begin(); j != selection_.end(); ++j)
+		(*j) = param_.beautifiedName(*j);
+
+
+//	list_.addMissing(selection_);
+	list_.deselect();
+	list_.select(selection_);
+	list_.showSelection();
+}
+
+void ParamList::changed()
+{
+	vector<string> v = list_.selection();
+	::set<string> s(v.begin(),v.end());
+
+	vector<string> w = selection_;
+
+	selection_.clear();
+
+	for(vector<string>::iterator j = w.begin(); j != w.end(); ++j)
+		if(s.find(*j) != s.end())
+		{
+			selection_.push_back(*j);
+			s.erase(*j);
+		}
+	
+	copy(s.begin(),s.end(),back_inserter(selection_));
+}
+
+void ParamList::add(const string& s)
+{
+	list_.add(s);
+	values_[s] = s;
+}
diff --git a/src/MetviewUI/ParamList.h b/src/MetviewUI/ParamList.h
new file mode 100644
index 0000000..a64cc86
--- /dev/null
+++ b/src/MetviewUI/ParamList.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ParamList.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef ParamList_H
+#define ParamList_H
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+
+class ParamList : public ParameterScanner {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ParamList(Widget,const Parameter&);
+
+// -- Destructor
+
+	~ParamList(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	vector<string> get();
+	void set(const vector<string>&);
+	void changed();
+
+	void add(const string&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ParamList(const ParamList&);
+	ParamList& operator=(const ParamList&);
+
+// -- Members
+
+	XMList             list_;
+	const Parameter&   param_;
+	vector<string>     selection_;
+	map<string,string> values_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From ParameterScanner
+	void next(const Parameter&, const char* first,const char* second);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ParamList& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ParamList**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ParamList);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Parameter.cc b/src/MetviewUI/Parameter.cc
new file mode 100644
index 0000000..0ff8913
--- /dev/null
+++ b/src/MetviewUI/Parameter.cc
@@ -0,0 +1,222 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Parameter.h"
+#include <mars.h>
+#include "Request.h"
+#include "Language.h"
+#include <ctype.h>
+
+//======================================================================
+class GuessInterface : public ParameterScanner {
+
+	map<string,int> choices_;
+
+	void next(const Parameter&, const char* name,const char*) ;
+
+public:
+	GuessInterface(Parameter&);
+	string choice();
+
+};
+
+GuessInterface::GuessInterface(Parameter& p)
+{
+	choices_["on_off"] = 4;
+	choices_["menu"]   = 3;
+	choices_["string"] = 2;
+	choices_["text"]   = 1;
+
+	// That must go...
+
+	string name = p.name();
+	if(name.length() > 6 && (name.find("COLOUR") == name.length() - 6))
+		choices_["colour"] = 5;
+}
+
+void GuessInterface::next(const Parameter&, const char* name,const char*)
+{
+	if(*name == '/'  ||
+	   *name == '@'  ||
+	   *name == '"'  ||
+	   *name == '*'  ||
+	   *name == '\'' ) choices_["menu"] = 0;
+
+	if(*name == '/')
+		choices_["string"] = 0;
+
+	if(*name != 'O' || (strcmp(name,"ON") != 0 && strcmp(name,"OFF") != 0))
+		choices_["on_off"] = 0;
+
+}
+
+string GuessInterface::choice()
+{
+	int max = 0;
+	string result = "text";
+
+	for(map<string,int>::iterator j = choices_.begin(); 
+								  j != choices_.end(); ++j)
+		if((*j).second > max) 
+		{
+			max    = (*j).second;
+			result = (*j).first;
+		}
+	return result;
+}
+
+//======================================================================
+
+Parameter::Parameter(Language& l,parameter* p):
+	lang_(l),
+	param_(p),
+	multiple_(false)
+{
+	
+	if(param_->interface == 0) 
+		param_->interface = empty_request(0);
+
+	if(get_value(param_->interface,"interface",0) == 0)
+	{
+		// Try to gues 
+
+		GuessInterface guess(*this);
+		scan(guess);
+		string choice = guess.choice();
+
+		set_value(param_->interface,"interface",choice.c_str());
+		if(get_value(param_->interface,"help",0) == 0)
+			set_value(param_->interface,"help",choice.c_str());
+	}
+	
+	const char *h;
+	if( (h = get_value(param_->interface,"hidden",0)) != 0  && (*h == 'T' || *h == 't'))
+	{
+		set_value(param_->interface,"interface","none");
+	}
+
+	if( (h = get_value(param_->interface,"visible",0)) != 0  && (*h == 'f' || *h == 'F'))
+	{
+		set_value(param_->interface,"interface","none");
+	}
+
+	const char* b = get_value(param_->interface,"beautify",0);
+	beautify_ = (b == 0) || (*b != 'f');
+
+	name_ = beautify(param_->name);
+
+	value* v = param_->default_values;
+	while(v)
+	{
+		defaults_.push_back(v->name);
+		v = v->next;
+	}
+}
+
+Parameter::~Parameter()
+{
+}
+
+const char* Parameter::name() const
+{
+	return param_->name;
+}
+
+void Parameter::scan(ParameterScanner& s) const
+{
+	scan(s,param_->values);
+}
+
+void Parameter::scan(ParameterScanner& s,const value* v) const
+{
+	while(v)
+	{
+		if(v->ref)
+			scan(s,v->ref);
+		else
+			s.next(*this, v->name,v->other_names?v->other_names->name:0);
+		v = v->next;
+	}
+}
+
+Request Parameter::interfaceRequest() const 
+{
+	return Request(param_->interface);
+}
+
+const char* Parameter::help() const
+{
+	return get_value(param_->interface,"help",0);
+}
+
+const char* Parameter::help_icon() const
+{
+	const char* p = get_value(param_->interface,"help_icon",0);
+	return p ? p : "";
+}
+
+const char* Parameter::interface() const
+{
+	return get_value(param_->interface,"interface",0);
+}
+
+const string& Parameter::beautify(const string& name) const
+{
+	map<string,string>::const_iterator j = beau_.find(name);
+	if(j != beau_.end()) return (*j).second;
+
+	string& result = const_cast<Parameter*>(this)->beau_[name];
+	bool up = true;
+	result = name;
+
+	for(int it=0; it<result.length(); ++it)
+	{
+		char j = result[it];
+		if(j == '_' || j == ' ')
+		{
+			up = true;
+			result[it] = ' ';	
+		}
+		else 
+		{
+			result[it] = up ? toupper(j) : tolower(j);
+			up = false;
+		}
+	}
+
+	return result;
+}
+
+const string& Parameter::beautifiedName() const            
+{
+	return name_;
+}
+
+const string& Parameter::beautifiedName(const string& name) const            
+{
+	if(beautify_)
+		return beautify(name);
+	else
+		return name;
+}
+
+bool Parameter::multiple() const
+{
+	return multiple_;
+}
+
+bool Parameter::hasDefaults() const
+{
+	return param_->default_values != 0;
+}
+
+const vector<string>& Parameter::defaults() const
+{
+	return defaults_;
+}
diff --git a/src/MetviewUI/Parameter.h b/src/MetviewUI/Parameter.h
new file mode 100644
index 0000000..572139a
--- /dev/null
+++ b/src/MetviewUI/Parameter.h
@@ -0,0 +1,148 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Parameter.h
+// Baudouin Raoult - ECMWF Sep 99
+
+#ifndef Parameter_H
+#define Parameter_H
+
+#include <string>
+using std::string;
+
+struct parameter;
+struct value;
+
+#include "Request.h"
+class Parameter;
+
+class ParameterScanner {
+public:
+	virtual void next(const Parameter&, const char*,const char*) = 0;
+};
+
+class Language;
+
+class Parameter {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Parameter(Language&,parameter*);
+
+// -- Destructor
+
+	~Parameter(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	const char* name() const;
+	const char* help() const;
+	const char* help_icon() const;
+	const char* interface() const;
+
+	Request interfaceRequest() const;
+
+    const string& beautifiedName(const string&) const;
+    const string& beautifiedName() const;
+
+	void scan(ParameterScanner&) const;
+
+	bool multiple() const;
+	bool hasDefaults() const;
+
+	const vector<string>& defaults() const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Parameter(const Parameter&);
+	Parameter& operator=(const Parameter&);
+
+// -- Members
+
+	Language&   lang_;
+	parameter*  param_;
+	bool        multiple_;
+	bool        beautify_;
+	map<string,string> beau_;
+	string      name_;
+	vector<string> defaults_;
+
+
+// -- Methods
+
+	const string& beautify(const string&) const;
+
+	void scan(ParameterScanner&,const value*) const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Parameter& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Parameter**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Parameter);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/PlotModHelp.cc b/src/MetviewUI/PlotModHelp.cc
new file mode 100644
index 0000000..f8196fc
--- /dev/null
+++ b/src/MetviewUI/PlotModHelp.cc
@@ -0,0 +1,99 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef PlotModHelp_H
+#include "PlotModHelp.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#include <mars.h>
+
+PlotModHelp::PlotModHelp(Widget parent, RequestPanel& owner, const Parameter& def):
+	DialogHelp(parent, owner, def)
+{     
+}
+
+PlotModHelp::~PlotModHelp()
+{
+}
+
+void PlotModHelp::start()
+{
+        attach(); // Will be decremented by ReplyHandler, so make sure it stays alive.
+
+	Request info = param_.interfaceRequest();
+
+	Request request("EDIT_MAP");
+
+	// The parameter is in lower case because it
+	// will be used to build the icon filename
+	Cached input          = info("input_type");
+	request("INPUT_TYPE") = input.toUpper();
+
+        request("CUSTOM_WIDTH")  = 14.8;
+	request("CUSTOM_HEIGHT") = 10.5;
+
+	request = request + owner_.request();
+
+	observe();
+
+	callService("GeoToolManager", request);
+}
+
+void PlotModHelp::set(Request& r) 
+{
+	cout << "PlotModHelp::set " << endl;
+//r.print();
+	r.merge(request_);
+	request_ = Request();
+}
+
+void PlotModHelp::reply(const Request& reply, int error)
+{
+	 if ( error == 0 ) reply.print();
+}
+
+void PlotModHelp::progress(const Request& progress)
+{
+	progress.print();
+	request_ = progress;
+	owner_.changed(*this);
+}
+
+void PlotModHelp::message(const string& msg)
+{
+	  cout << "PlotModHelp::message" << msg << endl;
+}
+
+void PlotModHelp::message(const Request& msg)
+{
+	  string s = msg.getVerb();
+	  if (s != "INPUT") return;
+
+          request_ = owner_.request();
+	  request_.merge(msg);
+          owner_.changed(*this);
+}
+
+static HelpMaker<PlotModHelp> maker("help_input");
diff --git a/src/MetviewUI/PlotModHelp.h b/src/MetviewUI/PlotModHelp.h
new file mode 100644
index 0000000..f8f0d5a
--- /dev/null
+++ b/src/MetviewUI/PlotModHelp.h
@@ -0,0 +1,75 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef PlotModHelp_H
+#define PlotModHelp_H
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#ifndef MessageObserver_H
+#include "MessageObserver.h"
+#endif
+
+class PlotModHelp: public DialogHelp, public ReplyObserver, public MessageObserver {
+public:
+
+// -- Contructors
+
+	PlotModHelp(Widget, RequestPanel&, const Parameter&);
+
+// -- Destructor
+
+	virtual ~PlotModHelp(); 
+
+private:
+
+// No copy allowed
+
+	PlotModHelp(const PlotModHelp&);
+	PlotModHelp& operator=(const PlotModHelp&);
+
+// -- Members
+	
+	Request request_;
+
+// -- Overridden methods
+
+	// From DialogHelp
+
+	virtual void start();
+
+	// From ReplyObserver 
+
+	void reply(const Request&, int);
+	void progress(const Request&);
+	void message(const string&);
+
+	// From MessageObserver 
+
+        void message(const Request& );
+
+	// From RequestPanelItem
+	virtual void set(Request&);
+       	
+};
+
+#endif
diff --git a/src/MetviewUI/Protocol.cc b/src/MetviewUI/Protocol.cc
new file mode 100644
index 0000000..bab7d9e
--- /dev/null
+++ b/src/MetviewUI/Protocol.cc
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+
+#ifndef Protocol_h
+#include <Protocol.h>
+#endif
+
+static vector<Protocol*>* all = 0;
+
+Protocol::Protocol()
+{
+	if(all == 0)
+		all = new vector<Protocol*>();
+	all->push_back(this);
+}
+Protocol::~Protocol()
+{
+}
+
+void Protocol::make() 
+{
+}
+
+void Protocol::init()
+{
+	for (vector<Protocol*>::iterator j = all->begin(); j != all->end(); ++j )
+		(*j)->make();
+}
diff --git a/src/MetviewUI/Protocol.h b/src/MetviewUI/Protocol.h
new file mode 100644
index 0000000..dcfa7cb
--- /dev/null
+++ b/src/MetviewUI/Protocol.h
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Protocol.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Protocol_H
+#define Protocol_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+class Protocol {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Protocol();
+
+// -- Destructor
+
+	~Protocol(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void init();
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Protocol(const Protocol&);
+	Protocol& operator=(const Protocol&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+	virtual void make();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Protocol& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Protocol**) {}
+
+template<class T>
+class ProtocolFactory : public Protocol {
+	void make() { new T(); }
+public:
+	ProtocolFactory()  {};
+};
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Protocol);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/QtMacroEditor.cc b/src/MetviewUI/QtMacroEditor.cc
new file mode 100644
index 0000000..9c5748c
--- /dev/null
+++ b/src/MetviewUI/QtMacroEditor.cc
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#ifndef QtMacroEditor_H
+#include "QtMacroEditor.h"
+#endif
+
+
+QtMacroEditor::QtMacroEditor(const IconClass& name,const string& kind):
+    Editor(name,kind)
+{
+}
+
+QtMacroEditor::~QtMacroEditor()
+{
+}
+
+
+
+// -----------------------------------------------------------------
+// QtMacroEditor::edit
+// Called to start editing a macro. We call the macroedit service to
+// bring up the Qt macro editor.
+
+void QtMacroEditor::edit(void)
+{
+    string path = current_->path().str();
+
+    replyObserver_ = new MacroEditorObserver(*this, path);
+    replyObserver_->start();
+
+
+//    replyObserver_->callService("macroedit", r);
+
+
+//    task_->start();
+
+
+}
+
+
+
+
+//=================================================================
+
+MacroEditorObserver::MacroEditorObserver(QtMacroEditor &editor, string &path) :
+    editor_(editor), path_(path)
+{
+}
+
+MacroEditorObserver::~MacroEditorObserver()
+{
+}
+
+
+void MacroEditorObserver::start()
+{
+    // Editor::edit will already have set up the path that we need
+
+    MvRequest r("MACROEDIT");
+
+    r("PATH")     = path_.c_str();  // path to macro
+    r("LANGUAGE") = editor_.iconClass().name().c_str(); // icon class, e.g. MACRO or MAGML
+    r("_CLASS")   = editor_.iconClass().name().c_str(); // icon class, e.g. MACRO or MAGML
+    callService("macroedit", r);
+//    MvApplication::callService("macroedit", r, NULL);
+
+}
+
+
+
+void MacroEditorObserver::reply(const Request& r,int err)
+{
+
+    editor_.notifyObserverApply();
+    editor_.Editor::done();
+
+}
+
+void MacroEditorObserver::progress(const Request& r)
+{
+}
+
+void MacroEditorObserver::message(const string& msg)
+{
+}
+
+
+void MacroEditorObserver::print(ostream& s) const
+{
+}
+
+
+
+
+
+static EditorMaker<QtMacroEditor> editorMaker("QtMacroEditor");
+
diff --git a/src/MetviewUI/QtMacroEditor.h b/src/MetviewUI/QtMacroEditor.h
new file mode 100644
index 0000000..ccb9004
--- /dev/null
+++ b/src/MetviewUI/QtMacroEditor.h
@@ -0,0 +1,147 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File QtMacroEditor.h
+// Iain Russell - ECMWF Jan 2010
+// based on:
+//   File MacroEditor.h
+//   Baudouin Raoult - ECMWF Jul 99
+
+#ifndef QtMacroEditor_H
+#define QtMacroEditor_H
+
+
+
+class QtMacroEditor;
+
+class MacroEditorObserver : public ReplyObserver {
+public:
+
+	MacroEditorObserver (QtMacroEditor &editor, string &path);
+	virtual ~MacroEditorObserver(); // Change to virtual if base class
+
+	virtual void start();
+
+	// From ReplyObserver
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);  
+	virtual void message(const string&);
+
+protected:
+
+	 void print(ostream&) const; // Change to virtual if base class	
+
+private:
+
+// No copy allowed
+    MacroEditorObserver(const MacroEditorObserver&);
+	MacroEditorObserver& operator=(const MacroEditorObserver&);
+
+
+    QtMacroEditor &editor_;
+    string         path_;
+
+// -- Overridden methods
+
+	// From Task
+};
+
+
+
+
+
+class QtMacroEditor :public Editor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	QtMacroEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~QtMacroEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	QtMacroEditor(const QtMacroEditor&);
+	QtMacroEditor& operator=(const QtMacroEditor&);
+
+// -- Members
+
+// -- Methods
+
+// -- Overridden methods
+	virtual void edit(void);
+
+
+// -- Class members
+    //ReplyObserver replyObserver;
+    MacroEditorObserver *replyObserver_;
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const MacroEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(QtMacroEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(MacroEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/QtOgcClientEditor.cc b/src/MetviewUI/QtOgcClientEditor.cc
new file mode 100644
index 0000000..a2fe5ea
--- /dev/null
+++ b/src/MetviewUI/QtOgcClientEditor.cc
@@ -0,0 +1,157 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#ifndef QtOgcClientEditor_H
+#include "QtOgcClientEditor.h"
+#endif
+
+
+QtOgcClientEditor::QtOgcClientEditor(const IconClass& name,const string& kind):
+    Editor(name,kind)
+{
+}
+
+QtOgcClientEditor::~QtOgcClientEditor()
+{
+}
+
+
+
+// -----------------------------------------------------------------
+// QtOgcClientEditor::edit
+// Called to start editing a macro. We call the macroedit service to
+// bring up the Qt macro editor.
+
+void QtOgcClientEditor::edit(void)
+{
+    string path = current_->path().str();
+
+    replyObserver_ = new OgcClientEditorObserver(*this, path);
+    replyObserver_->start();
+
+
+//    replyObserver_->callService("macroedit", r);
+
+
+//    task_->start();
+
+
+}
+
+
+
+
+//=================================================================
+
+OgcClientEditorObserver::OgcClientEditorObserver(QtOgcClientEditor &editor, string &path) :
+    editor_(editor), path_(path)
+{
+}
+
+OgcClientEditorObserver::~OgcClientEditorObserver()
+{
+}
+
+
+void OgcClientEditorObserver::start()
+{
+    // Editor::edit will already have set up the path that we need
+    MvRequest r;
+
+    r.read(path_.c_str());
+
+    const char *verb=r.getVerb();
+
+    if(!verb) return;	
+
+    if(strcmp(verb,"WMSCLIENT")==0)
+    {
+    	r("_NAME")=path_.c_str();
+    	r("_CLASS")="WMSCLIENT";
+    	r("_ACTION")="edit";
+    	r("_SERVICE")="wmsclient";
+	r.print();
+
+	callService("wmsclient", r);
+
+    }
+    else if(strcmp(verb,"WCSCLIENT")==0)
+    {
+    	r("_NAME")=path_.c_str();
+    	r("_CLASS")="WCSCLIENT";
+    	r("_ACTION")="edit";
+    	r("_SERVICE")="wcsclient";
+	r.print();
+
+	callService("wcsclient", r);
+
+    }
+		
+   /* MvRequest r("OGCCLIENT");
+
+ 
+    r("PATH")     = path_.c_str();  // path to macro
+    //r("LANGUAGE") = editor_.iconClass().name().c_str(); // icon class, e.g. MACRO or MAGML*/
+    //callService("ogcclient", r);
+//    MvApplication::callService("macroedit", r, NULL);
+
+}
+
+
+void OgcClientEditorObserver::reply(const Request& r,int err)
+{
+
+    editor_.notifyObserverApply();
+    editor_.Editor::done();
+
+}
+
+void OgcClientEditorObserver::progress(const Request& r)
+{
+}
+
+void OgcClientEditorObserver::message(const string& msg)
+{
+}
+
+
+void OgcClientEditorObserver::print(ostream& s) const
+{
+}
+
+
+
+
+
+static EditorMaker<QtOgcClientEditor> editorMaker("QtOgcClientEditor");
+
diff --git a/src/MetviewUI/QtOgcClientEditor.h b/src/MetviewUI/QtOgcClientEditor.h
new file mode 100644
index 0000000..3b56d9a
--- /dev/null
+++ b/src/MetviewUI/QtOgcClientEditor.h
@@ -0,0 +1,147 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File QtOgcClientEditor.h
+// Sandor Kertesz - ECMWF May 2010
+// based on:
+//   File QtOgcClientEditor.h
+//   Iain Russell - ECMWF Jan 2010 
+
+#ifndef QtOgcClientEditor_H
+#define QtOgcClientEditor_H
+
+
+
+class QtOgcClientEditor;
+
+class OgcClientEditorObserver : public ReplyObserver {
+public:
+
+	OgcClientEditorObserver (QtOgcClientEditor &editor, string &path);
+	virtual ~OgcClientEditorObserver(); // Change to virtual if base class
+
+	virtual void start();
+
+	// From ReplyObserver
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);  
+	virtual void message(const string&);
+
+protected:
+
+	 void print(ostream&) const; // Change to virtual if base class	
+
+private:
+
+// No copy allowed
+    OgcClientEditorObserver(const OgcClientEditorObserver&);
+	OgcClientEditorObserver& operator=(const OgcClientEditorObserver&);
+
+
+    QtOgcClientEditor &editor_;
+    string         path_;
+
+// -- Overridden methods
+
+	// From Task
+};
+
+
+
+
+
+class QtOgcClientEditor :public Editor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	QtOgcClientEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~QtOgcClientEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	QtOgcClientEditor(const QtOgcClientEditor&);
+	QtOgcClientEditor& operator=(const QtOgcClientEditor&);
+
+// -- Members
+
+// -- Methods
+
+// -- Overridden methods
+	virtual void edit(void);
+
+
+// -- Class members
+    //ReplyObserver replyObserver;
+    OgcClientEditorObserver *replyObserver_;
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const OgcClientEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(QtOgcClientEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(OgcClientEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/QtScmEditor.cc b/src/MetviewUI/QtScmEditor.cc
new file mode 100644
index 0000000..2badaf0
--- /dev/null
+++ b/src/MetviewUI/QtScmEditor.cc
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#ifndef QtScmEditor_H
+#include "QtScmEditor.h"
+#endif
+
+
+QtScmEditor::QtScmEditor(const IconClass& name,const string& kind):
+    Editor(name,kind)
+{
+}
+
+QtScmEditor::~QtScmEditor()
+{
+}
+
+
+
+// -----------------------------------------------------------------
+// QtScmEditor::edit
+// Called to start editing a macro. We call the macroedit service to
+// bring up the Qt macro editor.
+
+void QtScmEditor::edit(void)
+{
+    string path = current_->path().str();
+
+    replyObserver_ = new ScmEditorObserver(*this, path);
+    replyObserver_->start();
+
+
+//    replyObserver_->callService("macroedit", r);
+
+
+//    task_->start();
+
+
+}
+
+
+
+
+//=================================================================
+
+ScmEditorObserver::ScmEditorObserver(QtScmEditor &editor, string &path) :
+    editor_(editor), path_(path)
+{
+}
+
+ScmEditorObserver::~ScmEditorObserver()
+{
+}
+
+
+void ScmEditorObserver::start()
+{
+    // Editor::edit will already have set up the path that we need
+    	MvRequest r("SCM_INPUT_DATA");
+
+	r("PATH")=path_.c_str();
+    	r("_NAME")=path_.c_str();
+    	r("_CLASS")="SCM_INPUT_DATA";
+    	r("_ACTION")="edit";
+    	r("_SERVICE")="ScmDataEditor";
+	r.print();
+
+	callService("ScmDataEditor", r);
+}
+
+
+void ScmEditorObserver::reply(const Request& r,int err)
+{
+
+    editor_.notifyObserverApply();
+    editor_.Editor::done();
+
+}
+
+void ScmEditorObserver::progress(const Request& r)
+{
+}
+
+void ScmEditorObserver::message(const string& msg)
+{
+}
+
+
+void ScmEditorObserver::print(ostream& s) const
+{
+}
+
+
+
+
+
+static EditorMaker<QtScmEditor> editorMaker("QtScmDataEditor");
+
diff --git a/src/MetviewUI/QtScmEditor.h b/src/MetviewUI/QtScmEditor.h
new file mode 100644
index 0000000..f142a01
--- /dev/null
+++ b/src/MetviewUI/QtScmEditor.h
@@ -0,0 +1,63 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef QtScmEditor_H
+#define QtScmEditor_H
+
+class QtScmEditor;
+
+class ScmEditorObserver : public ReplyObserver {
+public:
+
+	ScmEditorObserver (QtScmEditor &editor, string &path);
+	virtual ~ScmEditorObserver();
+
+	virtual void start();
+
+	// From ReplyObserver
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);  
+	virtual void message(const string&);
+
+protected:
+
+	 void print(ostream&) const; // Change to virtual if base class	
+
+private:
+    // No copy allowed
+    ScmEditorObserver(const ScmEditorObserver&);
+    ScmEditorObserver& operator=(const ScmEditorObserver&);
+
+    QtScmEditor &editor_;
+    string         path_;
+
+};
+
+
+
+class QtScmEditor :public Editor {
+public:
+
+	QtScmEditor(const IconClass&,const string&);
+	virtual ~QtScmEditor(); 
+
+private:
+	QtScmEditor(const QtScmEditor&);
+	QtScmEditor& operator=(const QtScmEditor&);
+
+	virtual void edit(void);
+
+    	ScmEditorObserver *replyObserver_;
+
+};
+
+inline void destroy(QtScmEditor**) {}
+
+
+#endif
diff --git a/src/MetviewUI/QtStackedEditor.cc b/src/MetviewUI/QtStackedEditor.cc
new file mode 100644
index 0000000..3df8ff4
--- /dev/null
+++ b/src/MetviewUI/QtStackedEditor.cc
@@ -0,0 +1,171 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#ifndef QtStackedEditor_H
+#include "QtStackedEditor.h"
+#endif
+
+
+QtStackedEditor::QtStackedEditor(const IconClass& name,const string& kind):
+    Editor(name,kind)
+{
+}
+
+QtStackedEditor::~QtStackedEditor()
+{
+}
+
+
+
+// -----------------------------------------------------------------
+// QtStackedEditor::edit
+// Called to start editing a macro. We call the macroedit service to
+// bring up the Qt macro editor.
+
+void QtStackedEditor::edit(void)
+{
+    string path = current_->path().str();
+
+    replyObserver_ = new QtStackedEditorObserver(*this, path);
+    replyObserver_->start();
+
+
+//    replyObserver_->callService("macroedit", r);
+
+
+//    task_->start();
+
+
+}
+
+
+
+
+//=================================================================
+
+QtStackedEditorObserver::QtStackedEditorObserver(QtStackedEditor &editor, string &path) :
+    editor_(editor), path_(path)
+{
+}
+
+QtStackedEditorObserver::~QtStackedEditorObserver()
+{
+}
+
+
+void QtStackedEditorObserver::start()
+{
+    // Editor::edit will already have set up the path that we need
+    MvRequest r;
+
+    r.read(path_.c_str());
+
+    const char *verb=r.getVerb();
+
+    if(!verb) return; 
+ 
+    r.print();
+
+    if(strstr(verb,"ODB")  != 0)
+    {
+    	r("_NAME")=path_.c_str();
+    	//r("_CLASS")="WMSCLIENT";
+    	r("_ACTION")="edit";
+    	r("_SERVICE")="QtEditor";
+	r.print();
+
+	callService("QtEditor", r);
+
+    }	
+
+   /* if(strcmp(verb,"WMSCLIENT")==0)
+    {
+    	r("_NAME")=path_.c_str();
+    	r("_CLASS")="WMSCLIENT";
+    	r("_ACTION")="edit";
+    	r("_SERVICE")="wmsclient";
+	r.print();
+
+	callService("wmsclient", r);
+
+    }
+    else if(strcmp(verb,"WCSCLIENT")==0)
+    {
+    	r("_NAME")=path_.c_str();
+    	r("_CLASS")="WCSCLIENT";
+    	r("_ACTION")="edit";
+    	r("_SERVICE")="wcsclient";
+	r.print();
+
+	callService("wcsclient", r);
+
+    }*/
+		
+   /* MvRequest r("OGCCLIENT");
+
+ 
+    r("PATH")     = path_.c_str();  // path to macro
+    //r("LANGUAGE") = editor_.iconClass().name().c_str(); // icon class, e.g. MACRO or MAGML*/
+    //callService("ogcclient", r);
+//    MvApplication::callService("macroedit", r, NULL);
+
+}
+
+
+void QtStackedEditorObserver::reply(const Request& r,int err)
+{
+
+    editor_.notifyObserverApply();
+    editor_.Editor::done();
+
+}
+
+void QtStackedEditorObserver::progress(const Request& r)
+{
+}
+
+void QtStackedEditorObserver::message(const string& msg)
+{
+}
+
+
+void QtStackedEditorObserver::print(ostream& s) const
+{
+}
+
+
+
+
+
+static EditorMaker<QtStackedEditor> editorMaker("QtStackedEditor");
+
diff --git a/src/MetviewUI/QtStackedEditor.h b/src/MetviewUI/QtStackedEditor.h
new file mode 100644
index 0000000..008561e
--- /dev/null
+++ b/src/MetviewUI/QtStackedEditor.h
@@ -0,0 +1,147 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File QtStackedEditor.h
+// Sandor Kertesz - ECMWF May 2010
+// based on:
+//   File QtStackedEditor.h
+//   Iain Russell - ECMWF Jan 2010 
+
+#ifndef QtStackedEditor_H
+#define QtStackedEditor_H
+
+
+
+class QtStackedEditor;
+
+class QtStackedEditorObserver : public ReplyObserver {
+public:
+
+	QtStackedEditorObserver (QtStackedEditor &editor, string &path);
+	virtual ~QtStackedEditorObserver(); // Change to virtual if base class
+
+	virtual void start();
+
+	// From ReplyObserver
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);  
+	virtual void message(const string&);
+
+protected:
+
+	 void print(ostream&) const; // Change to virtual if base class	
+
+private:
+
+// No copy allowed
+    QtStackedEditorObserver(const QtStackedEditorObserver&);
+	QtStackedEditorObserver& operator=(const QtStackedEditorObserver&);
+
+
+    QtStackedEditor &editor_;
+    string         path_;
+
+// -- Overridden methods
+
+	// From Task
+};
+
+
+
+
+
+class QtStackedEditor :public Editor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	QtStackedEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~QtStackedEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	QtStackedEditor(const QtStackedEditor&);
+	QtStackedEditor& operator=(const QtStackedEditor&);
+
+// -- Members
+
+// -- Methods
+
+// -- Overridden methods
+	virtual void edit(void);
+
+
+// -- Class members
+    //ReplyObserver replyObserver;
+    QtStackedEditorObserver *replyObserver_;
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const StackedEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(QtStackedEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(StackedEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Queue.cc b/src/MetviewUI/Queue.cc
new file mode 100644
index 0000000..793951a
--- /dev/null
+++ b/src/MetviewUI/Queue.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Queue_H
+#include "Queue.h"
+#endif
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+Queue::Queue(IconObject* owner):
+	owner_(owner),
+	active_(0)
+{
+}
+
+Queue::~Queue()
+{
+}
+
+void Queue::ownerGone()
+{
+	owner_ = 0;
+	enable();
+}
+
+void Queue::push(Task* t)
+{
+	t->add(this);
+	tasks_.push_back(t);
+	enable();
+}
+
+void Queue::run()
+{
+	if(owner_ == 0 && active_ == 0)
+	{
+		delete this;
+		return;
+	}
+
+	if(active_ == 0 && tasks_.size() != 0)
+	{
+		active_ = tasks_.front();
+		tasks_.pop_front();
+		if(owner_) owner_->notifyWaiting();
+		active_->start();
+	}
+
+	if(tasks_.size() == 0)
+		disable();
+}
+
+void Queue::success(Task*,const Request&)
+{
+	if(owner_) owner_->notifyReady();
+	done();
+}
+
+void Queue::failure(Task*)
+{
+	if(owner_) owner_->notifyError();
+	done();
+}
+
+void Queue::done()
+{
+	active_ = 0;
+}
diff --git a/src/MetviewUI/Queue.h b/src/MetviewUI/Queue.h
new file mode 100644
index 0000000..bb3ecc0
--- /dev/null
+++ b/src/MetviewUI/Queue.h
@@ -0,0 +1,140 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Queue.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Queue_H
+#define Queue_H
+
+#include "inc_stl.h"
+
+
+#ifndef TaskObserver_H
+#include "TaskObserver.h"
+#endif
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Runnable_H
+#include "Runnable.h"
+#endif
+
+
+class Queue : public TaskObserver, public Runnable  {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Queue(IconObject* owner);
+
+// -- Destructor
+
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void push(Task*);
+	void ownerGone();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+	~Queue(); // Change to virtual if base class
+
+// No copy allowed
+
+	Queue(const Queue&);
+	Queue& operator=(const Queue&);
+
+// -- Members
+
+	IconObjectH owner_;
+	list<TaskH> tasks_;
+	TaskH       active_;
+
+// -- Methods
+
+	void done();
+
+// -- Overridden methods
+
+	// From TaskObserver
+
+	virtual void success(Task*,const Request&);
+	virtual void failure(Task*);
+
+	// From Runnable
+
+	virtual void run();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Queue& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Queue**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Queue);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/RGBMaker.h b/src/MetviewUI/RGBMaker.h
new file mode 100644
index 0000000..9e2435d
--- /dev/null
+++ b/src/MetviewUI/RGBMaker.h
@@ -0,0 +1,62 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File RGBMaker.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef RGBMaker_H
+#define RGBMaker_H
+
+#ifndef Rainbow_H
+#include "Rainbow.h"
+#endif
+
+#include <Palette.h>
+
+//------------------------------------------------------------------
+
+template<class T>
+class RGBMaker : public RainbowMaker {
+
+	const RGBColor& c_;
+	
+public:
+
+	RGBMaker(const RGBColor& c) : c_(c) {}
+
+	virtual Pixel pixel(double x,double y) const
+		{ 
+			RGBColor c(T::R(x,y,c_),T::G(x,y,c_),T::B(x,y,c_));
+			return XPalette::pixel(c);
+		}
+};
+
+//------------------------------------------------------------------
+
+struct makeRGB {
+	static double R(double,double,const RGBColor& c) { return c.red;   }
+	static double G(double,double,const RGBColor& c) { return c.green; }
+	static double B(double,double,const RGBColor& c) { return c.blue;  }
+};
+
+struct makeR : public makeRGB {
+	static double R(double x,double,const RGBColor&) { return x; }
+};
+
+struct makeG : public makeRGB {
+	static double G(double x,double,const RGBColor&) { return x; }
+};
+
+struct makeB : public makeRGB {
+	static double B(double x,double,const RGBColor&) { return x; }
+};
+
+//------------------------------------------------------------------
+
+#endif
diff --git a/src/MetviewUI/Rainbow.cc b/src/MetviewUI/Rainbow.cc
new file mode 100644
index 0000000..6450b74
--- /dev/null
+++ b/src/MetviewUI/Rainbow.cc
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Rainbow_H
+#include "Rainbow.h"
+#endif
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+
+Rainbow::Rainbow(Widget w):
+	widget_(w),
+	gc_(XtGetGC(w,0,0))
+{
+	XtVaGetValues(widget_,
+		XmNwidth, &width_,
+		XmNheight,&height_,
+		0);
+
+	Display* dpy = XtDisplay(widget_);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+
+	image_ =  XGetImage(dpy,root, 0, 0, 
+				width_, height_, 
+				AllPlanes, ZPixmap);
+}
+
+Rainbow::~Rainbow()
+{
+	XtReleaseGC(widget_,gc_);
+	XDestroyImage(image_);
+}
+
+void Rainbow::redraw()
+{
+	if(XtIsRealized(widget_))
+		XPutImage(
+			XtDisplay(widget_),
+			XtWindow(widget_),
+			gc_,
+			image_,
+			0,0,0,0,width_,height_);
+}
+
+void Rainbow::fill(const RainbowMaker& maker)
+{
+	int w = width_-1;
+	int h = height_-1;
+
+	for(int i = 0; i < width_ ; i++)
+		for(int j = h; j >= 0; j--)
+		{
+			double x = double(i)/double(w);
+			double y = double(h-j)/double(h);
+			XPutPixel(image_,i,j, maker.pixel(x,y));
+		}
+
+	redraw();
+}
diff --git a/src/MetviewUI/Rainbow.h b/src/MetviewUI/Rainbow.h
new file mode 100644
index 0000000..4ed0701
--- /dev/null
+++ b/src/MetviewUI/Rainbow.h
@@ -0,0 +1,118 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Rainbow.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef Rainbow_H
+#define Rainbow_H
+
+#include <Xm/Xm.h>
+
+class RainbowMaker {
+public:
+	virtual Pixel pixel(double x,double y) const = 0;
+};
+
+class Rainbow {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Rainbow(Widget);
+
+// -- Destructor
+
+	~Rainbow(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void redraw();
+	void fill(const RainbowMaker&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Rainbow(const Rainbow&);
+	Rainbow& operator=(const Rainbow&);
+
+// -- Members
+
+	Widget    widget_;
+	GC        gc_;
+	XImage*   image_;
+	Dimension width_;
+	Dimension height_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Rainbow& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Rainbow**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Rainbow);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Recents.cc b/src/MetviewUI/Recents.cc
new file mode 100644
index 0000000..fded5df
--- /dev/null
+++ b/src/MetviewUI/Recents.cc
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/PushB.h>
+#include "Recents.h"
+#include "Resources.h"
+#include "Folder.h"
+
+static set<Recents*> all;
+static list<string> recent;
+
+Recents::Recents():
+	fixed_(0),
+	widget_(0)
+{
+
+	if(all.size() == 0)
+		Resources::get("RECENT",recent);
+
+	all.insert(this);
+}
+
+Recents::~Recents()
+{
+	all.erase(this);
+
+	if(all.size() == 0)
+		Resources::set("RECENT",recent);
+}
+
+void Recents::top(Folder* f)             
+{
+	string name = f->fullName();
+	if(name == "")
+	   name = "/";
+
+	for(set<Recents*>::iterator j = all.begin(); j != all.end(); ++j)
+		(*j)->top(name);
+
+	list<string>::iterator k = find(recent.begin(),recent.end(),name);
+
+	if(k != recent.end())
+	   recent.erase(k);
+
+	recent.push_front(name);
+
+	while(recent.size() > 15)
+		remove(recent.back());
+
+}
+
+void Recents::open(const char* n)
+{
+	Folder* f = Folder::folder(n,false);
+	if(f != 0)
+	{
+		top(f);
+		f->open();
+	}
+	else
+		remove(n);
+
+}
+
+void Recents::remove(const string& name)
+{
+	const char* n = name.c_str();
+
+	list<string>::iterator k = find(recent.begin(),recent.end(),name);
+
+	if(k != recent.end())
+	   recent.erase(k);
+
+	for(set<Recents*>::iterator j = all.begin(); j != all.end(); ++j)
+	{
+		Widget w = XtNameToWidget((*j)->widget_,n);     
+		if(w != 0)
+		   XtDestroyWidget(w);
+	}
+	
+}
+
+void Recents::install(Widget w)      
+{
+	widget_ = w;
+	XtVaGetValues(w,XmNnumChildren,&fixed_,0);
+
+	for(list<string>::iterator j = recent.begin(); j != recent.end(); ++j)
+		add(*j);
+}
+
+Widget Recents::add(const string& name)
+{
+	const char* n = name.c_str();
+	Widget w = XtNameToWidget(widget_,n);               
+	if(w == 0)
+	   w = XmCreatePushButton(widget_,(char*)n,0,0);
+	XtManageChild(w);
+	return w;
+}
+
+void Recents::top(const string& name)
+{
+	short pos;
+	Widget w = add(name);
+	XtVaGetValues(w,XmNpositionIndex,&pos,0);
+	if(pos >= fixed_)
+		XtVaSetValues(w,XmNpositionIndex,(short)fixed_,0);      
+}
diff --git a/src/MetviewUI/Recents.h b/src/MetviewUI/Recents.h
new file mode 100644
index 0000000..73700c3
--- /dev/null
+++ b/src/MetviewUI/Recents.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Recents.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef Recents_H
+#define Recents_H
+
+#include <string>
+using std::string;
+
+#include <Xm/Xm.h>
+
+class Folder;
+
+class Recents {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Recents();
+
+// -- Destructor
+
+	~Recents(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void install(Widget);
+	void top(Folder*);
+	void open(const char*);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Recents(const Recents&);
+	Recents& operator=(const Recents&);
+
+// -- Members
+	
+	int    fixed_;
+	Widget widget_;
+	string name_;
+
+// -- Methods
+	
+	Widget add(const string&);
+	void top(const string&);
+	void remove(const string&);
+	void rename(const string&,const string&);
+
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Recents& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Recents**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Recents);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ReplyObserver.cc b/src/MetviewUI/ReplyObserver.cc
new file mode 100644
index 0000000..43cadc8
--- /dev/null
+++ b/src/MetviewUI/ReplyObserver.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+#include "Metview.h"
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+
+//=================================================================
+class ReplyHandler : public MvReply {
+	virtual void callback(MvRequest&);
+};
+
+void ReplyHandler::callback(MvRequest& in)
+{
+	ReplyObserverH *s = (ReplyObserverH*)getReference();
+	if(s == 0) return;
+
+	const char *p;
+	int i = 0;
+	while(p = getMessage(i++))
+		(*s)->message(p);
+
+	(*s)->reply(in,getError());
+
+	delete s;
+}
+
+//=================================================================
+
+class ProgressHandler : public MvProgress {
+    void callback(MvRequest& r);
+};
+
+void ProgressHandler::callback(MvRequest& in)
+{
+	ReplyObserverH *s = (ReplyObserverH*)getReference();
+	if(s == 0) return;
+
+	const char *p;
+	int i = 0;
+	while(p = getMessage(i++))
+		(*s)->message(p);
+
+	(*s)->progress(in);
+
+}
+
+//=================================================================
+
+ReplyObserver::ReplyObserver()
+{
+	// This will install the handler on creation of the first instance
+	static ReplyHandler    replyHandler;
+	static ProgressHandler progressHandler;
+}
+
+ReplyObserver::~ReplyObserver()
+{
+}
+
+void ReplyObserver::callService(const string& service,const Request& r)
+{
+	MvApplication::callService(service.c_str(),r,new ReplyObserverH(this));
+}
diff --git a/src/MetviewUI/ReplyObserver.h b/src/MetviewUI/ReplyObserver.h
new file mode 100644
index 0000000..fe833a2
--- /dev/null
+++ b/src/MetviewUI/ReplyObserver.h
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ReplyObserver.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef ReplyObserver_H
+#define ReplyObserver_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+
+#include <string>
+using std::string;
+
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+
+class Request;
+
+class ReplyObserver : public virtual Counted  {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ReplyObserver();
+
+// -- Destructor
+
+	virtual ~ReplyObserver(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void reply(const Request&,int) = 0;
+	virtual void progress(const Request&) = 0;
+	virtual void message(const string&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	void callService(const string&,const Request&);
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ReplyObserver(const ReplyObserver&);
+	ReplyObserver& operator=(const ReplyObserver&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ReplyObserver& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+class ReplyObserverH : public Handle<ReplyObserver> {
+public:
+	ReplyObserverH(ReplyObserver* o) : Handle<ReplyObserver>(o) {}
+};
+
+#endif
diff --git a/src/MetviewUI/RequestPanel.cc b/src/MetviewUI/RequestPanel.cc
new file mode 100644
index 0000000..b995cf6
--- /dev/null
+++ b/src/MetviewUI/RequestPanel.cc
@@ -0,0 +1,208 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef RequestPanelLine_H
+#include "RequestPanelLine.h"
+#endif
+
+
+RequestPanel::RequestPanel(const IconClass& kind, Widget parent, 
+	const char* name): 
+	apply_(false),
+	class_(kind)
+{
+	create(parent,  (char*) name);
+	scan();
+	Manage();
+}
+
+RequestPanel::~RequestPanel()
+{
+	XtDestroyWidget(xd_rootwidget());
+}
+
+const IconClass& RequestPanel::iconClass()
+{
+	return class_;
+}
+
+void RequestPanel::scan() 
+{
+
+   	class_.language().scan(*this);
+
+	Dimension a,b;
+	Dimension ma = 0,mb = 0;
+
+	for(vector<RequestPanelItem*>::iterator j = items_.begin(); j != items_.end(); ++j)
+	{	
+		RequestPanelItem* p = (*j);
+		p->getSizes(a,b);
+		if(a>ma) ma = a;
+		if(b>mb) mb = b;
+	}
+	
+	for(vector<RequestPanelItem*>::iterator j = items_.begin(); j != items_.end(); ++j)
+	{	
+		RequestPanelItem* p = (*j);
+		p->setSizes(ma,mb);
+	}
+
+}
+
+Widget  RequestPanel::where() 
+{
+	return rowcol_;
+}
+Widget  RequestPanel::main() 
+{
+	return UIRequestPanel;
+}
+
+void RequestPanel::merge(IconObject* o)
+{
+	// Merge requests. The input request is not expanded; therefore,
+	// it contains only the non-default parameters. As a consequence,
+	// only those parameters, plus the ones that are set in the
+	// output request, will be merged.
+	Request r1 = request();
+	Request r  = class_.language().expand(r1,EXPAND_DEFAULTS,false);
+	r.merge(o->request());
+
+	// Move back to the default those values that are no longer valid
+	Request rr = class_.language().expand(r,EXPAND_DONT_FAIL);
+	request(rr);
+
+	// Update UI
+	call(&RequestPanelItem::update);
+}
+
+void RequestPanel::replace(IconObject* o)
+{
+	request(o->request());
+	call(&RequestPanelItem::update);
+}
+
+void RequestPanel::next(const Parameter& p)
+{
+	RequestPanelLine::build(where(),*this,p);
+}
+
+void RequestPanel::call(Method proc)
+{
+	for(vector<RequestPanelItem*>::iterator j = items_.begin(); j != items_.end(); ++j)
+	{	
+		RequestPanelItem* o = *j;
+		(o->*proc)();
+	}
+}
+
+void RequestPanel::apply() 
+{
+      apply_ = true;
+      call(&RequestPanelItem::apply);
+      apply_ = false;
+}
+
+const Request& RequestPanel::request(long flags) 
+{	
+	map<long,Request>::iterator j = cache_.find(flags);
+	if(j != cache_.end()) return (*j).second;
+	return cache_[flags] = class_.language().expand(cache_[EXPAND_2ND_NAME],flags);
+}
+
+void RequestPanel::request(const Request& r, long flags)
+{
+	cache_.clear();
+	cache_[EXPAND_2ND_NAME] = class_.language().expand(r,EXPAND_2ND_NAME);
+	if ( flags != EXPAND_2ND_NAME )
+		cache_[flags] = class_.language().expand(r,flags);
+}
+
+void RequestPanel::edit(IconObject *o)
+{	
+	for(vector<RequestPanelItem*>::iterator j = items_.begin(); j != items_.end(); ++j)
+		(*j)->edit(o);
+}
+
+void RequestPanel::close() 
+{
+	call(&RequestPanelItem::update);
+	cache_.clear();
+}
+
+void RequestPanel::reset(IconObject *o)
+{	
+	request(o->request()); 
+	edit(o);
+	call(&RequestPanelItem::reset);
+}
+
+void RequestPanel::registerObserver(RequestPanelItem* observer) 
+{
+	items_.push_back(observer);
+}
+
+void RequestPanel::changed(RequestPanelItem& p,bool canUpdate)
+{
+	Request r = request();
+	p.set(r);
+	request(r);
+
+	if(!apply_) 
+		if(canUpdate) 
+			call(&RequestPanelItem::update);
+}
+
+void RequestPanel::set(const char* p,const string& v)
+{
+	Request r = request();
+	r(p) = v.c_str();
+	request(r);
+
+	if(!apply_) call(&RequestPanelItem::update);
+}
+
+void RequestPanel::clear(const char* p)
+{
+	Request r = request();
+	r.unsetParam(p);
+	request(r);
+
+	if(!apply_) call(&RequestPanelItem::update);
+}
+
diff --git a/src/MetviewUI/RequestPanel.h b/src/MetviewUI/RequestPanel.h
new file mode 100644
index 0000000..45ca35e
--- /dev/null
+++ b/src/MetviewUI/RequestPanel.h
@@ -0,0 +1,157 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File RequestPanel.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef RequestPanel_H
+#define RequestPanel_H
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#include "UIRequestPanel.h"
+
+class RequestPanelLine;
+class RequestPanelItem;
+class IconClass;
+class IconObject;
+
+class RequestPanel : public UIRequestPanel_c, public LanguageScanner {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	RequestPanel(const IconClass&, Widget, const char* = 0);
+
+// -- Destructor
+
+	virtual ~RequestPanel(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	void changed(RequestPanelItem&,bool = true);
+	void set(const char*,const string&);
+	void clear(const char*);
+
+	void registerObserver(RequestPanelItem*);
+	const IconClass& iconClass();
+	
+	 
+   	Widget where();
+	Widget main();
+
+   	void scan(); 
+
+	void    apply();
+    void    reset(IconObject*);
+	void    edit(IconObject*);
+	void    close();
+
+	void 	replace(IconObject*);
+	void 	merge(IconObject*);
+
+	const Request& request(long = EXPAND_2ND_NAME);
+	void  request(const Request&, long = EXPAND_2ND_NAME);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+	vector<RequestPanelItem*> items_;
+	const IconClass&	     class_;
+	bool                      apply_;
+
+// -- Methods
+	
+	typedef void (RequestPanelItem::*Method)();
+	void call(Method);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	RequestPanel(const RequestPanel&);
+	RequestPanel& operator=(const RequestPanel&);
+
+// -- Members
+
+	map<long,Request> cache_;
+
+// -- Methods
+
+// -- Overridden methods
+
+	// From LanguageScanner
+
+	virtual void next(const Parameter&);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const RequestPanel& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(RequestPanel**) {}
+
+template<class T>
+class XLEditor : public RequestPanel, public T {
+public:
+	XLEditor(IconClass& c): 
+		RequestPanel(c)
+	{
+		T::create(main());
+		XtManageChild(T::xd_rootwidget());
+	}
+};
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(RequestPanel);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/RequestPanelHelp.cc b/src/MetviewUI/RequestPanelHelp.cc
new file mode 100644
index 0000000..02ba047
--- /dev/null
+++ b/src/MetviewUI/RequestPanelHelp.cc
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#include <mars.h>
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef RequestPanelItem_H
+#include "RequestPanelItem.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+
+
+RequestPanelHelp::RequestPanelHelp(RequestPanel& owner,const Parameter& param):
+	RequestPanelItem(owner,param)
+{
+}
+
+RequestPanelHelp::~RequestPanelHelp()
+{
+}
+
+RequestPanelHelp* RequestPanelHelp::build(Widget parent, RequestPanel& owner,const Parameter& def)
+{
+	return HelpFactory::create(parent, owner, def);
+}
diff --git a/src/MetviewUI/RequestPanelHelp.h b/src/MetviewUI/RequestPanelHelp.h
new file mode 100644
index 0000000..17d6f9d
--- /dev/null
+++ b/src/MetviewUI/RequestPanelHelp.h
@@ -0,0 +1,133 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Editor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef RequestPanelHelp_H
+#define RequestPanelHelp_H
+
+#include <string>
+using std::string;
+
+#include <Xm/Xm.h>
+
+
+
+class Parameter;
+class RequestPanel;
+
+#include "RequestPanelItem.h"
+
+class RequestPanelHelp: public RequestPanelItem {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Constructor
+
+	RequestPanelHelp(RequestPanel&,const Parameter&);
+
+// -- Destructor		 l
+
+	virtual ~RequestPanelHelp(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	virtual void start() = 0;
+	virtual bool dialog() = 0;
+	
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	static RequestPanelHelp* build(Widget, RequestPanel&,const Parameter&);
+
+protected:
+
+// -- Contructors
+
+
+// -- Members
+
+// -- Methods
+	//void create(Widget w,char* name);
+
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+
+private:
+
+// No copy allowed
+
+	RequestPanelHelp(const RequestPanelHelp&);
+	RequestPanelHelp& operator=(const RequestPanelHelp&);
+
+// -- Members
+
+
+// -- Methods
+
+// -- Overridden methods
+
+	// -- From XDesigned 
+       
+// -- Class members
+
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+
+};
+
+
+inline void destroy(RequestPanelHelp**) {}
+
+template<class T>
+class XHelp : public RequestPanelHelp, public T {
+	virtual bool dialog() { return false; }
+	virtual void start()  {};
+public:
+	XHelp(Widget w, RequestPanel& o, const Parameter& p): 
+		RequestPanelHelp(o, p)
+	{
+		T::create(w);
+		XtManageChild(T::xd_rootwidget());
+	}
+};
+
+class DialogHelp : public RequestPanelHelp {
+	virtual bool dialog() { return true; }
+public:
+	DialogHelp(Widget, RequestPanel& o, const Parameter& p):
+		RequestPanelHelp(o, p) {}
+};
+
+#endif
diff --git a/src/MetviewUI/RequestPanelItem.cc b/src/MetviewUI/RequestPanelItem.cc
new file mode 100644
index 0000000..69b55e8
--- /dev/null
+++ b/src/MetviewUI/RequestPanelItem.cc
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef RequestPanelItem_H
+#include "RequestPanelItem.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#include "Parameter.h"
+#include "Request.h"
+
+RequestPanelItem::RequestPanelItem(RequestPanel& owner,const Parameter& param): 
+	owner_(owner),
+	param_(param)
+{
+	owner_.registerObserver(this);
+	decache();
+}
+
+RequestPanelItem::~RequestPanelItem()
+{
+}
+
+void RequestPanelItem::set(Request&)
+{
+}
+
+void RequestPanelItem::edit(IconObject* icon)
+{
+	currentObject_ = icon;
+}
+	 
+void RequestPanelItem::getSizes(Dimension& a,Dimension& b)
+{
+     a = b = 0;	
+}
+
+void RequestPanelItem::setSizes(Dimension,Dimension)
+{
+}
+
+long RequestPanelItem::flags()
+{
+	return EXPAND_2ND_NAME;
+} 
+
+void RequestPanelItem::refresh(const vector<string>&)
+{
+}
+
+void RequestPanelItem::grey()
+{
+	const Request& r = owner_.request(flags());
+	vector<string> values = r.get("_UNSET");
+	bool g = false;
+	string name = param_.name();
+	for(int i = 0; i < values.size(); i++)
+		if(name == values[i])
+		{
+			g = true;
+			break;
+		}
+			
+	gray(g);
+}
+
+void RequestPanelItem::reset()
+{
+	const Request& r = owner_.request(flags());
+	vector<string> values = r.get(param_.name());
+	if(values != cache_)
+	{
+		cache_ = values;
+		refresh(values);
+		grey();
+
+		// Check defaults
+		vector<string> def = owner_.request(flags() | EXPAND_NO_DEFAULT).get(param_.name());
+		mark( def.size() != 0 && values.size() != 0 );
+
+	}
+}
+
+void RequestPanelItem::update()
+{
+	reset();
+}
+
+void RequestPanelItem::apply()
+{
+}
+
+void RequestPanelItem::decache()
+{
+	cache_.clear();
+	cache_.push_back("\1\2\3"); // Something imposible
+}
+
+void RequestPanelItem::mark(bool)
+{
+}
+
+void RequestPanelItem::gray(bool)
+{
+}
diff --git a/src/MetviewUI/RequestPanelItem.h b/src/MetviewUI/RequestPanelItem.h
new file mode 100644
index 0000000..458cbb6
--- /dev/null
+++ b/src/MetviewUI/RequestPanelItem.h
@@ -0,0 +1,88 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File RequestPanelItem.h
+// Sylvie Thepaut - ECMWF Sep 99
+
+#ifndef RequestPanelItem_H
+#define RequestPanelItem_H
+
+
+class Request;
+class RequestPanel;
+class Parameter;
+
+#include <Xm/Xm.h>
+#include "IconObject.h"
+
+class RequestPanelItem {
+public:
+
+// -- Contructors
+
+	RequestPanelItem(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~RequestPanelItem();
+
+
+// -- Methods
+	 
+	virtual void getSizes(Dimension&,Dimension&);
+	virtual void setSizes(Dimension,Dimension);
+
+	// Overide those for a fine control
+	virtual void reset();
+	virtual void update();
+	virtual void apply();
+	virtual void set(Request&);
+
+	virtual void grey();
+
+	// Or those for simple Items
+	virtual long flags();
+	virtual void refresh(const vector<string>&);
+
+	//--------------------------
+
+	virtual void mark(bool);
+	virtual void gray(bool);
+
+	//--------------------------
+
+	virtual void edit(IconObject*);
+
+protected:
+
+// -- Members
+
+	RequestPanel&    owner_;
+	const Parameter& param_;
+	IconObjectH      currentObject_;
+
+// -- Methods
+	
+	void decache();
+
+private:
+
+// No copy allowed
+
+	RequestPanelItem(const RequestPanelItem&);
+	RequestPanelItem& operator=(const RequestPanelItem&);
+
+// -- Members
+
+	vector<string> cache_;
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/RequestPanelLine.cc b/src/MetviewUI/RequestPanelLine.cc
new file mode 100644
index 0000000..7280e04
--- /dev/null
+++ b/src/MetviewUI/RequestPanelLine.cc
@@ -0,0 +1,149 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef RequestPanelLine_H
+#include "RequestPanelLine.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#include <Xm/ToggleB.h>
+
+#include <mars.h>
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanelItem_H
+#include "RequestPanelItem.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef XPixmap_H
+#include "XPixmap.h"
+#endif
+
+
+RequestPanelLine::RequestPanelLine(RequestPanel& owner,const Parameter& param): 
+	RequestPanelItem(owner,param),
+	help_(0),
+	gray_(false)
+{
+}
+
+RequestPanelLine::~RequestPanelLine()
+{
+}
+
+RequestPanelLine* RequestPanelLine::build(Widget w,RequestPanel& owner,const Parameter& param)
+{
+	RequestPanelLine* p = LineFactory::create(owner,param);
+	p->init(w);
+	return p;
+}
+
+void RequestPanelLine::create(Widget w, char* name)
+{
+	UILine_c::create(w,name);
+	XMLabel(name_).set(param_.beautifiedName());
+
+	help_ = RequestPanelHelp::build(helper_, owner_, param_);
+	XtUnmanageChild(help_arrow_);
+	XtUnmanageChild(help_button_);
+
+	if(help_)
+	{
+		if (help_->dialog())
+		{
+			XPixmap p(param_.help_icon());
+			p.setLabel(help_button_);
+			XtManageChild(help_button_);
+		}
+		else 	 
+			XtManageChild(help_arrow_);
+	}
+
+	Manage();
+}
+
+void RequestPanelLine::comboCB(Widget,XtPointer)
+{
+	if(XtIsManaged(helper_))
+	{
+		XtVaSetValues(help_arrow_,XmNarrowDirection, XmARROW_RIGHT,0);
+		XtUnmanageChild(helper_);
+	}
+	else
+	{
+		XtVaSetValues(help_arrow_,XmNarrowDirection, XmARROW_DOWN,0);
+		XtManageChild(helper_);
+	}
+}
+
+void RequestPanelLine::setCB(Widget,XtPointer)
+{
+	owner_.clear(param_.name());
+	XmToggleButtonSetState(name_,False,False);
+}
+
+void RequestPanelLine::helpCB(Widget,XtPointer)
+{
+	if(help_) help_->start();
+}
+
+void RequestPanelLine::gray(bool g)
+{
+	// g = g && param_.hasDefaults();
+	if(gray_ != g)
+	{
+		gray_ = g;
+		if(gray_)
+			UILine_c::xd_disable();
+		else
+			UILine_c::xd_enable();
+	}
+}
+
+void RequestPanelLine::mark(bool g)
+{
+	XmToggleButtonSetState(name_,g,False);
+}
+
+void RequestPanelLine::getSizes(Dimension& a,Dimension& b)
+{
+	XtVaGetValues(name_,XmNwidth,&a,0);
+	XtVaGetValues(form_,XmNwidth,&b,0);
+}
+
+void RequestPanelLine::setSizes(Dimension a,Dimension b)
+{
+	XtVaSetValues(name_,XmNwidth,a,0);
+	XtVaSetValues(form_,XmNwidth,b,0);
+}
+
+Widget RequestPanelLine::where()
+{
+	return where_;
+}
+
+
diff --git a/src/MetviewUI/RequestPanelLine.h b/src/MetviewUI/RequestPanelLine.h
new file mode 100644
index 0000000..c97c63e
--- /dev/null
+++ b/src/MetviewUI/RequestPanelLine.h
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File RequestPanelLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef RequestPanelLine_H
+#define RequestPanelLine_H
+
+#include "UILine.h"
+#include "RequestPanelItem.h"
+
+class  Request;
+class  RequestPanel;
+class  IconObject;
+class  IconObjectH;
+class  RequestPanelHelp;
+
+#include "Parameter.h"
+
+class RequestPanelLine : public UILine_c, public RequestPanelItem {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	RequestPanelLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~RequestPanelLine(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+	Widget where();
+
+	virtual void init(Widget) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static RequestPanelLine* build(Widget,RequestPanel&,const Parameter&);
+	
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Overridden methods
+
+	virtual void create(Widget,char* = 0);
+
+private:
+
+// No copy allowed
+
+	RequestPanelLine(const RequestPanelLine&);
+	RequestPanelLine& operator=(const RequestPanelLine&);
+
+// -- Members
+	
+	RequestPanelHelp* help_;
+	bool gray_;
+	bool mark_;
+
+// -- Methods
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void setCB(Widget,XtPointer);
+	virtual void comboCB(Widget,XtPointer);
+	virtual void helpCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void gray(bool);
+	virtual void mark(bool);
+	virtual void getSizes(Dimension&,Dimension&);
+	virtual void setSizes(Dimension,Dimension);
+
+};
+
+
+template<class T>
+class XRequestPanelLine : public RequestPanelLine, public T {
+public:
+
+	XRequestPanelLine(RequestPanel& e,const Parameter& p): RequestPanelLine(e,p)
+	{
+	}
+
+	void init(Widget w)
+	{
+		RequestPanelLine::create(w);
+		T::create(where());
+		XtManageChild(T::xd_rootwidget());
+	}
+};
+
+#endif
diff --git a/src/MetviewUI/ResolveTransaction.cc b/src/MetviewUI/ResolveTransaction.cc
new file mode 100644
index 0000000..842eac1
--- /dev/null
+++ b/src/MetviewUI/ResolveTransaction.cc
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+#include "ResolveTransaction.h"
+#include "TaskObserver.h"
+#include "Action.h"
+#include "IconObject.h"
+#include "Request.h"
+#include "Task.h"
+#include "Folder.h"
+#include "IconFactory.h"
+
+#ifndef Protocol_H
+#include "Protocol.h"
+#endif
+
+ResolveTransaction::ResolveTransaction(): 
+	Transaction("RESOLVE") 
+{ 
+	cout << "Resolve::Resolve()" << endl;
+}
+ResolveTransaction::ResolveTransaction(MvTransaction* t): 
+	Transaction(t) 
+{ 
+	cout << "Resolve::Resolve()" << endl;
+}
+
+ResolveTransaction::~ResolveTransaction()
+{ 
+	cout << "Resolve::~Resolve()" << endl;
+}
+
+void ResolveTransaction::success(Task*,const Request& r)
+{
+	sendReply(r);
+}
+
+void ResolveTransaction::failure(Task*)
+{
+	setError(1,"Object failed");
+	sendReply(MvRequest());
+}
+
+MvTransaction* ResolveTransaction::cloneSelf()
+{
+	return new ResolveTransaction(this);
+}
+
+void ResolveTransaction::callback(MvRequest& r)
+{
+	const char* name = r("NAME");
+	IconObject* o = name ? IconObject::search(name):0;
+
+	if(o == 0) {
+		setError(1,"Cannot find object");
+		sendReply(MvRequest());
+		return;
+	}
+
+	Action a("prepare","*");
+	TaskH t = o->action(a);
+	if(t) 
+		t->add(this);
+	else  
+		sendReply(MvRequest());
+}
+
+
+static ProtocolFactory<ResolveTransaction> resolve;
diff --git a/src/MetviewUI/ResolveTransaction.h b/src/MetviewUI/ResolveTransaction.h
new file mode 100644
index 0000000..7e6d04b
--- /dev/null
+++ b/src/MetviewUI/ResolveTransaction.h
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ResolveTransaction.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ResolveTransaction_H
+#define ResolveTransaction_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+#ifndef  Transaction_H
+#include <Transaction.h>
+#endif
+#ifndef  TaskObserver_H
+#include <TaskObserver.h>
+#endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+class ResolveTransaction : public Transaction, public TaskObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ResolveTransaction();
+
+// -- Destructor
+
+	~ResolveTransaction(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void init();
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ResolveTransaction(const ResolveTransaction&);
+	ResolveTransaction(MvTransaction*);
+	ResolveTransaction& operator=(const ResolveTransaction&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// -- From MvTransaction
+
+	virtual MvTransaction *cloneSelf();
+	virtual void callback(MvRequest&); 
+	// -- From TaskObserver
+
+	virtual void success(Task*,const Request&);
+	void failure(Task*);
+
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ResolveTransaction& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ResolveTransaction**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ResolveTransaction);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Resources.cc b/src/MetviewUI/Resources.cc
new file mode 100644
index 0000000..236bafd
--- /dev/null
+++ b/src/MetviewUI/Resources.cc
@@ -0,0 +1,64 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Resources_H
+#include "Resources.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+void Resources::sync()
+{
+}
+
+void Resources::set(const Request& r,IconObject* o)
+{
+	if(o == 0) o = Folder::top();        
+	Request dot(o->dotPath());
+	if(dot)
+		dot.merge(r);
+	else
+		dot = r;
+	dot.save(o->dotPath());              
+}
+
+void Resources::set(const string& name,const vector<string>& v,IconObject* o)
+{
+	Request r("USER_INTERFACE");
+	r.set(name,v);
+	set(r,o);
+}
+
+void Resources::get(const string& name,vector<string>& v,IconObject* o)
+{
+	v.clear();
+	if(o == 0) o = Folder::top();        
+	Request dot(o->dotPath());
+	v = dot.get(name);
+}
+
+void Resources::set(const string& name,const list<string>& v,IconObject* o)
+{
+	vector<string> w; w.reserve(v.size());
+	copy(v.begin(),v.end(),back_inserter(w));
+	set(name,w,o);
+}
+
+void Resources::get(const string& name,list<string>& v,IconObject* o)
+{
+	vector<string> w;
+	get(name,w,o);
+	copy(w.begin(),w.end(),back_inserter(v));
+}
diff --git a/src/MetviewUI/Resources.h b/src/MetviewUI/Resources.h
new file mode 100644
index 0000000..1348594
--- /dev/null
+++ b/src/MetviewUI/Resources.h
@@ -0,0 +1,96 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Resources.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef Resources_H
+#define Resources_H
+
+class IconObject;
+
+#include "inc_stl.h"
+using std::string;
+
+
+class Request;
+
+class Resources {
+public:
+
+	static void get(const string&,list<string>&,IconObject* = 0);
+	static void set(const string&,const list<string>&,IconObject* = 0);
+
+	static void get(const string&,vector<string>&,IconObject* = 0);
+	static void set(const string&,const vector<string>&,IconObject* = 0);
+
+	static void get(const string&,string&,IconObject* = 0);
+	static void set(const string&,const string&,IconObject* = 0);
+
+	static void get(const string&,long&,IconObject* = 0);
+	static void set(const string&,long,IconObject* = 0);
+
+	static void set(const Request&,IconObject*);
+	static void sync();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Resources(const Resources&);
+	Resources& operator=(const Resources&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Resources& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Resources**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Resources);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/RetrieveEditor.cc b/src/MetviewUI/RetrieveEditor.cc
new file mode 100644
index 0000000..deb8c53
--- /dev/null
+++ b/src/MetviewUI/RetrieveEditor.cc
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef RetrieveEditor_H
+#include "RetrieveEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+RetrieveEditor::RetrieveEditor(const IconClass& name,const string& kind):
+	SimpleEditor(name,kind)
+{
+}
+
+RetrieveEditor::~RetrieveEditor()
+{
+}
+
+static EditorMaker<RetrieveEditor> editorMaker("RetrieveEditor");
diff --git a/src/MetviewUI/RetrieveEditor.h b/src/MetviewUI/RetrieveEditor.h
new file mode 100644
index 0000000..dfd7a0a
--- /dev/null
+++ b/src/MetviewUI/RetrieveEditor.h
@@ -0,0 +1,100 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File RetrieveEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef RetrieveEditor_H
+#define RetrieveEditor_H
+
+#ifndef SimpleEditor_H
+#include "SimpleEditor.h"
+#endif
+
+class RetrieveEditor : public SimpleEditor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	RetrieveEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~RetrieveEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+	// None
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	RetrieveEditor(const RetrieveEditor&);
+	RetrieveEditor& operator=(const RetrieveEditor&);
+
+// -- Members
+
+// -- Methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+	//From InternalEditor.
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const RetrieveEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/RootFolder.cc b/src/MetviewUI/RootFolder.cc
new file mode 100644
index 0000000..113ec5b
--- /dev/null
+++ b/src/MetviewUI/RootFolder.cc
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "RootFolder.h"
+#include "FolderWindow.h"
+#include "IconClass.h"
+
+RootFolder::RootFolder(): Folder(0,IconClass::find("SYSTEM"),"",0)
+{
+	// Make sure this one is never deleter
+//	_attach();
+}
+
+RootFolder::~RootFolder()
+{
+}
+
+Path RootFolder::dotPath() const
+{
+	return path().add(".MainWindowResources");
+}
+
+string RootFolder::fullName() const
+{
+	return "";
+}
+
+Path RootFolder::path() const
+{
+	static Path user = string(getenv("METVIEW_USER_DIRECTORY"));
+	return user;
+}
+
+Folder* RootFolder::parent() const
+{
+	cout << "Oops, should not be here..." << endl;
+	return const_cast<RootFolder*>(this);
+}
+
+Path RootFolder::logPath()
+{
+	string p = Folder::folder("temporary")->path().str()  + "/messages";
+	return Path(p);
+}
diff --git a/src/MetviewUI/RootFolder.h b/src/MetviewUI/RootFolder.h
new file mode 100644
index 0000000..36bcab2
--- /dev/null
+++ b/src/MetviewUI/RootFolder.h
@@ -0,0 +1,112 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File RootFolder.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef RootFolder_H
+#define RootFolder_H
+
+#include "Folder.h"
+
+class RootFolder : public Folder {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	RootFolder();
+
+// -- Destructor
+
+	virtual ~RootFolder(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	RootFolder(const RootFolder&);
+	RootFolder& operator=(const RootFolder&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual Path path() const;
+	virtual Path dotPath() const;
+	virtual string fullName() const;
+	virtual Folder* parent() const;
+	virtual Path logPath();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const RootFolder& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(RootFolder**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(RootFolder);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Runnable.cc b/src/MetviewUI/Runnable.cc
new file mode 100644
index 0000000..653235b
--- /dev/null
+++ b/src/MetviewUI/Runnable.cc
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_stl.h"
+#include "Runnable.h"
+#include "Metview.h"
+#include <MvXApplication.h>
+
+typedef set<Runnable*> Set;
+static Set runnables;
+
+/* do a process in the "background" */
+
+Boolean Runnable::workCB(XtPointer)
+{
+	// Copy as Runnable may be removed
+
+	Set s = runnables;
+	int active = 0;
+
+	for(Set::iterator j = s.begin(); j != s.end(); ++j)
+	{
+		if((*j)->actived_)
+		{
+			active++;
+			(*j)->run();
+		}
+	}
+
+    return (active == 0);
+}
+
+Runnable::Runnable():
+	actived_(False)
+{
+	runnables.insert(this);
+}
+
+Runnable::~Runnable()
+{
+	runnables.erase(this);
+}
+
+void Runnable::enable()
+{
+	if(actived_) return;
+	XtAppAddWorkProc(MvXApplication::context(),workCB,NULL);
+	actived_ = True;
+}
+
+
+void Runnable::disable()
+{
+	actived_ = False;
+}
diff --git a/src/MetviewUI/Runnable.h b/src/MetviewUI/Runnable.h
new file mode 100644
index 0000000..b8ea393
--- /dev/null
+++ b/src/MetviewUI/Runnable.h
@@ -0,0 +1,127 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Runnable.h
+// Baudouin Raoult - ECMWF Oct 98
+
+#ifndef Runnable_H
+#define Runnable_H
+
+#include <Xm/Xm.h>
+
+#ifdef NO_BOOL
+#include "bool.h"
+#endif
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+
+
+// 
+
+class Runnable {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Runnable();
+
+// -- Destructor
+
+	virtual ~Runnable(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+	void enable();
+	void disable();
+	bool actived() { return actived_; }
+
+	virtual void run() = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Runnable(const Runnable&);
+	Runnable& operator=(const Runnable&);
+
+// -- Members
+
+	Boolean actived_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+	static Boolean workCB(XtPointer);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Runnable& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/SQLDrawer.cc b/src/MetviewUI/SQLDrawer.cc
new file mode 100644
index 0000000..50e8b8b
--- /dev/null
+++ b/src/MetviewUI/SQLDrawer.cc
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef SQLDrawer_H
+#include "SQLDrawer.h"
+#endif
+
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef ODBEditor_H
+#include "ODBEditor.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+
+SQLDrawer::SQLDrawer(ODBEditor& e):
+	XEditorDrawer<UISQLDrawer_c>(e),
+	editor_(e)
+{
+	e.sql(text_);	
+}
+
+SQLDrawer::~SQLDrawer()
+{
+}
+
+
+static EditorDrawerMaker<SQLDrawer,ODBEditor> maker(10);
diff --git a/src/MetviewUI/SQLDrawer.h b/src/MetviewUI/SQLDrawer.h
new file mode 100644
index 0000000..fcfe9be
--- /dev/null
+++ b/src/MetviewUI/SQLDrawer.h
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SQLDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef SQLDrawer_H
+#define SQLDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#include "UISQLDrawer.h"
+
+class ODBEditor;
+
+class SQLDrawer : public XEditorDrawer<UISQLDrawer_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	SQLDrawer(ODBEditor&);
+
+// -- Destructor
+
+	virtual ~SQLDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	SQLDrawer(const SQLDrawer&);
+	SQLDrawer& operator=(const SQLDrawer&);
+
+// -- Members
+
+	ODBEditor& editor_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const SQLDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(SQLDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(SQLDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ScaleLine.cc b/src/MetviewUI/ScaleLine.cc
new file mode 100755
index 0000000..a8459c5
--- /dev/null
+++ b/src/MetviewUI/ScaleLine.cc
@@ -0,0 +1,84 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ScaleLine_H
+#include "ScaleLine.h"
+#endif
+
+#include <Xm/Scale.h>
+							  
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+#ifndef XResource_H
+#include "XResource.h"
+#endif
+
+#include <mars.h>
+
+
+
+
+
+ScaleLine::ScaleLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UIScaleLine_c>(owner,param)
+{
+      static void* translator[] = {
+			XResourceTranslator("max", XmNmaximum),
+			XResourceTranslator("min", XmNminimum),
+			XResourceTranslator("step", XmNscaleMultiple),
+			XResourceTranslator("direction", XmNprocessingDirection, 
+						XEnumTranslator("max_on_left", int(XmMAX_ON_LEFT))	 +
+						XEnumTranslator("max_on_right", int(XmMAX_ON_RIGHT))
+					             ),
+		};
+
+}
+
+ScaleLine::~ScaleLine()
+{
+}
+
+void ScaleLine::init(Widget w)
+{
+	XRequestPanelLine<UIScaleLine_c>::init(w); 					  
+	XResource::setValues(scale_,param_.interfaceRequest());
+}
+
+void ScaleLine::refresh(const vector<string>& values)
+{
+	if(values.size() == 0) return;
+	long value = atol(values[0].c_str());
+	XmScaleSetValue(scale_, value);
+}
+
+void ScaleLine::set(Request& r)
+{
+	int value = 0;
+	XmScaleGetValue(scale_, &value);
+	r(param_.name()) = value;
+}
+
+
+void ScaleLine::changedCB(Widget,XtPointer)
+{
+	owner_.changed(*this);
+}
+
+static LineMaker<ScaleLine> maker("slider");
diff --git a/src/MetviewUI/ScaleLine.h b/src/MetviewUI/ScaleLine.h
new file mode 100755
index 0000000..1d70a97
--- /dev/null
+++ b/src/MetviewUI/ScaleLine.h
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ScaleLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ScaleLine_H
+#define ScaleLine_H
+
+#include "UIScaleLine.h"
+
+#ifndef RequestPanelLine_H
+#include "RequestPanelLine.h"
+#endif
+
+class ScaleLine : public XRequestPanelLine<UIScaleLine_c> {
+public:
+
+// -- Contructors
+
+	ScaleLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~ScaleLine(); 
+
+private:
+
+// No copy allowed
+
+	ScaleLine(const ScaleLine&);
+	ScaleLine& operator=(const ScaleLine&);
+
+// -- Overridden methods
+
+	// From XD
+	virtual void changedCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void set(Request&);
+	virtual void refresh(const vector<string>&);
+
+	// From RequestPanelLine
+	virtual void init(Widget);
+
+};
+
+#endif
diff --git a/src/MetviewUI/ScriptHelp.cc b/src/MetviewUI/ScriptHelp.cc
new file mode 100644
index 0000000..9f6840b
--- /dev/null
+++ b/src/MetviewUI/ScriptHelp.cc
@@ -0,0 +1,101 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+#include <Xm/Text.h>
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef ScriptHelp_H
+#include "ScriptHelp.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Parameter_H
+#include "Parameter.h"
+#endif
+
+#ifndef HelpFactory_H
+#include "HelpFactory.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+ScriptHelp::ScriptHelp(Widget , RequestPanel& owner, const Parameter& def):
+  gotInput_(false), RequestPanelHelp(owner, def),
+  ShellTask((const char *)def.interfaceRequest()("help_script_command"),0)
+{     
+  Widget top = MetviewUI::root();
+  create(XtDisplay(top),"Metview",0,0);
+}
+
+
+ScriptHelp::~ScriptHelp()
+{
+}
+
+void ScriptHelp::start()
+{
+  XtRealizeWidget(xd_rootwidget());
+  XMapRaised(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+  XMText text(text_);
+  text.clear();
+  
+  XMLabel label(progressLabel_);
+  label.set("Running external command ....");
+
+  gotInput_ = false;
+  attach(); 
+  Object(currentObject_);
+  ShellTask::start();
+}
+
+void ScriptHelp::ready(const char *line)
+{
+  static string cr = "\n";
+  gotInput_ = true;
+  XMText text(text_);
+  text.append(line);
+  text.append(cr);
+}
+
+void ScriptHelp::done(FILE *fp)
+{
+  XMLabel label(progressLabel_);
+  if ( gotInput_ )
+    label.set("External command finished.");
+  else 
+    label.set("External command produced no output. Check message window for errors");
+
+  ShellTask::done(fp);
+}
+
+void ScriptHelp::closeCB(Widget,XtPointer)
+{
+  XUnmapWindow(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}
+
+static HelpMaker<ScriptHelp> maker("help_script");
diff --git a/src/MetviewUI/ScriptHelp.h b/src/MetviewUI/ScriptHelp.h
new file mode 100644
index 0000000..c81729b
--- /dev/null
+++ b/src/MetviewUI/ScriptHelp.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ScriptHelp.h
+// Geir Austad - ECMWF Sep 01
+
+#ifndef ScriptHelp_H
+#define ScriptHelp_H
+
+#include "UIScriptHelp.h"
+
+#ifndef RequestPanelHelp_H
+#include "RequestPanelHelp.h"
+#endif
+
+#ifndef ShellTask_H
+#include "ShellTask.h"
+#endif
+
+class ScriptHelp: public RequestPanelHelp, public UIScriptHelp_c, public ShellTask
+{
+public:
+
+// -- Contructors
+  ScriptHelp(Widget, RequestPanel&, const Parameter&);
+
+// -- Destructor
+  virtual ~ScriptHelp(); 
+
+  virtual bool dialog() { return true; }  
+
+private:
+
+// No copy allowed
+  
+  ScriptHelp(const ScriptHelp&);
+  ScriptHelp& operator=(const ScriptHelp&);
+  
+  // -- Members
+  bool gotInput_;
+  
+  // -- Overridden methods
+  virtual void closeCB(Widget,XtPointer);
+
+  virtual void start();
+  virtual void ready(const char *);
+  virtual void done(FILE*);
+
+  
+};
+
+#endif
diff --git a/src/MetviewUI/ScrolledText.cc b/src/MetviewUI/ScrolledText.cc
new file mode 100644
index 0000000..33cbdee
--- /dev/null
+++ b/src/MetviewUI/ScrolledText.cc
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ScrolledText_H
+#include "ScrolledText.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+
+
+#include <mars.h>
+
+ScrolledText::ScrolledText(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UIScrolledText_c>(owner,param),
+	changed_(false)
+{
+}
+
+ScrolledText::~ScrolledText()
+{
+}
+
+void ScrolledText::refresh(const vector<string>& values)
+{
+	string s;
+	for(vector<string>::const_iterator j = values.begin(); j != values.end(); ++j)
+	{
+			if(s.length()) s += "/";
+			s += *j;
+	}
+	
+	XMText text(text_);
+	text.set(s);
+
+	changed_ = false;
+}
+
+void ScrolledText::apply()
+{
+	if(changed_) {
+		changed_ = false;
+		owner_.changed(*this);
+	}
+}
+
+void ScrolledText::set(Request& r)
+{
+	XMText text(text_);
+
+	Tokenizer parse("/");
+	vector<string> v;
+
+	//parse(text.get(),v); //-- this removes leading '/' from path values!!
+
+	string s = text.get();
+	if( s[0] == '/' )      //-- handle 'path name candidates' here!
+	  {
+	    cout << ">>> (ScrolledText::set) Q&D hack: "
+		 << s.c_str()
+		 << " is now treated as path!"
+		 << endl;
+	    v.push_back(s);
+	  }
+	else
+	  {
+	    parse(s,v);        //-- all other parameters here!
+	  }
+
+	r.set(param_.name(),v);
+
+	changed_ = false;
+}
+
+void ScrolledText::activateCB(Widget,XtPointer)
+{
+	changed_ = false;
+	owner_.changed(*this);
+}
+
+void ScrolledText::changedCB(Widget,XtPointer)
+{
+	changed_ = true;
+	decache();
+}
+
+void ScrolledText::update()
+{
+	if(changed_) 
+	{
+		changed_ = false;
+		owner_.changed(*this,false);
+	}
+	RequestPanelItem::update();
+}
+
+static LineMaker<ScrolledText> maker1("scrolled_text");
diff --git a/src/MetviewUI/ScrolledText.h b/src/MetviewUI/ScrolledText.h
new file mode 100644
index 0000000..6e7b055
--- /dev/null
+++ b/src/MetviewUI/ScrolledText.h
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ScrolledText.h
+
+
+#ifndef ScrolledText_H
+#define ScrolledText_H
+
+#include "UIScrolledText.h"
+#include "RequestPanelLine.h"
+
+class ScrolledText : public XRequestPanelLine<UIScrolledText_c> {
+public:
+
+// -- Contructors
+
+	ScrolledText(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~ScrolledText(); 
+
+private:
+
+// No copy allowed
+
+	ScrolledText(const ScrolledText&);
+	ScrolledText& operator=(const ScrolledText&);
+
+// -- Members
+	
+	bool changed_;
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void activateCB(Widget,XtPointer);
+	virtual void changedCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+	virtual void apply();
+	virtual void set(Request&);
+	virtual void update();
+
+};
+
+#endif
diff --git a/src/MetviewUI/Service.cc b/src/MetviewUI/Service.cc
new file mode 100644
index 0000000..7309252
--- /dev/null
+++ b/src/MetviewUI/Service.cc
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Service.h"
+#include "MetviewService.h"
+#include "ShellService.h"
+
+typedef map<string,Service*> Map;
+static Map* services = 0;
+
+Service::Service(const string& name):
+	name_(name)
+{
+	if(services == 0)
+		services = new Map();
+	(*services)[name] = this;
+}
+
+Service::~Service()
+{
+}
+string Service::name()
+{
+   return name_;
+}
+
+Service* Service::find(const string &name)
+{
+	if(services)
+	{
+		Map::iterator j = services->find(name);
+
+		if(j != services->end())
+			return (*j).second;
+	}
+
+	if(name[0] == '(')
+		return new ShellService(name);
+	else
+		return new MetviewService(name);
+}
+
+void Service::print(ostream& s) const
+{
+	s << name_;
+}
diff --git a/src/MetviewUI/Service.h b/src/MetviewUI/Service.h
new file mode 100644
index 0000000..a60f4fe
--- /dev/null
+++ b/src/MetviewUI/Service.h
@@ -0,0 +1,116 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Service.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Service_H
+#define Service_H
+
+#include "inc_iostream.h"
+#include "inc_stl.h"
+using std::string;
+
+class IconObject;
+class Action;
+
+class Task;
+
+class Service {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Service(const string&);
+
+// -- Destructor
+
+	virtual ~Service(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+	string name();
+	
+// -- Methods
+
+	virtual Task* task(const Action&,IconObject*) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	static Service* find(const string&);
+
+protected:
+
+// -- Members
+	
+	string name_;
+
+// -- Methods
+	
+	virtual void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Service(const Service&);
+	Service& operator=(const Service&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	friend ostream& operator<<(ostream& s,const Service& p)
+		{ p.print(s); return s; }
+
+};
+
+inline void destroy(Service**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Service);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ShellService.cc b/src/MetviewUI/ShellService.cc
new file mode 100644
index 0000000..28abac8
--- /dev/null
+++ b/src/MetviewUI/ShellService.cc
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ShellService_H
+#include "ShellService.h"
+#endif
+
+#ifndef ShellTask_H
+#include "ShellTask.h"
+#endif
+
+
+ShellService::ShellService(const string& name):
+	Service(name)
+{
+}
+
+ShellService::~ShellService()
+{
+}
+
+Task* ShellService::task(const Action&,IconObject* o)
+{
+	return new ShellTask(name_,o);
+}
diff --git a/src/MetviewUI/ShellService.h b/src/MetviewUI/ShellService.h
new file mode 100644
index 0000000..13d4423
--- /dev/null
+++ b/src/MetviewUI/ShellService.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ShellService.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ShellService_H
+#define ShellService_H
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+
+class ShellService : public Service {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ShellService(const string&);
+
+// -- Destructor
+
+	virtual ~ShellService(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ShellService(const ShellService&);
+	ShellService& operator=(const ShellService&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual Task* task(const Action&,IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ShellService& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ShellService**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ShellService);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ShellTask.cc b/src/MetviewUI/ShellTask.cc
new file mode 100644
index 0000000..8822a1d
--- /dev/null
+++ b/src/MetviewUI/ShellTask.cc
@@ -0,0 +1,91 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+using std::string;
+
+
+#ifndef ShellTask_H
+#include "ShellTask.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+
+//=================================================================
+
+ShellTask::ShellTask(const string& cmd,IconObject* o):
+	cmd_(cmd),
+	object_(o),
+	file_(0)
+{
+}
+
+ShellTask::~ShellTask()
+{
+}
+
+void ShellTask::start()
+{
+	Path path = object_->pathForShellTask();
+	// Here we are using a specialised version of the path. 
+	// To allow the visualisation of the PS files coming from 
+	// the MagML tools.
+	const char* p = path.str().c_str();
+	char buf[1024];
+	sprintf(buf,cmd_.c_str(),p,p,p,p,p,p);
+	file_ = popen(buf,"r");
+	if(!file_) {
+		Log::error(object_) << buf << Log::syserr << endl;
+		failure();
+		return;
+	}
+	Input::start(file_);
+}
+
+void ShellTask::ready(const char* line)
+{
+	Log::error(object_) << line << endl;
+}
+
+void ShellTask::done(FILE* f)
+{
+
+	TaskH save = this; // Protect this so it can cleanup
+	// everything before being destryed
+
+	int n = 0;
+	if(n = pclose(file_))
+	{
+	  Log::error(object_) << "Problems running: '"  << cmd_ <<"'." << endl;
+	  Log::error(object_) << "Exit code: " << n << endl;
+		failure();
+	}
+	else {
+		Request r;
+		success(r);
+	}
+	file_ = 0;
+	Input::stop();
+}
+
+void ShellTask::print(ostream& s) const
+{
+	s << "ShellTask[" << cmd_ << "]";
+}
diff --git a/src/MetviewUI/ShellTask.h b/src/MetviewUI/ShellTask.h
new file mode 100644
index 0000000..e450104
--- /dev/null
+++ b/src/MetviewUI/ShellTask.h
@@ -0,0 +1,129 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ShellTask.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ShellTask_H
+#define ShellTask_H
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Input_H
+#include "Input.h"
+#endif
+
+
+class ShellTask : public Task, public Input {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ShellTask(const string&,IconObject*);
+
+// -- Destructor
+
+	virtual ~ShellTask(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+
+// -- Methods
+	virtual void addContext (const Request&) { };
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	 void print(ostream&) const; // Change to virtual if base class	
+         void Object(IconObjectH xx) { object_ = xx; }
+
+
+// -- Overridden methods
+	// From Task
+	virtual void start();
+	// From Input
+	virtual void done(FILE*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ShellTask(const ShellTask&);
+	ShellTask& operator=(const ShellTask&);
+
+// -- Members
+
+	IconObjectH object_;
+	FILE*       file_;
+	string      cmd_;
+
+// -- Methods
+
+// -- Overridden methods
+
+
+
+	// From Input
+	virtual void ready(const char*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ShellTask& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ShellTask**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ShellTask);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/SimpleDroppin.h b/src/MetviewUI/SimpleDroppin.h
new file mode 100644
index 0000000..320d4ba
--- /dev/null
+++ b/src/MetviewUI/SimpleDroppin.h
@@ -0,0 +1,9 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
diff --git a/src/MetviewUI/SimpleEditor.cc b/src/MetviewUI/SimpleEditor.cc
new file mode 100644
index 0000000..bd4aa62
--- /dev/null
+++ b/src/MetviewUI/SimpleEditor.cc
@@ -0,0 +1,96 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef SimpleEditor_H
+#include "SimpleEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef RequestPanelLine_H
+#include "RequestPanelLine.h"
+#endif
+
+
+SimpleEditor::SimpleEditor(const IconClass& name,const string& kind):
+	XEditor<UISimpleEditor_c>(name,kind),
+	panel_(name, where_)
+{
+}
+
+SimpleEditor::~SimpleEditor()
+{
+}
+
+
+
+IconObject* SimpleEditor::copy(const string& name)
+{
+	IconObject* o = IconFactory::create(name, class_);
+	panel_.apply();
+	o->request(panel_.request());
+	return o;
+}
+
+void SimpleEditor::apply()
+{
+	panel_.apply();
+	current_->request(panel_.request());
+}
+
+void SimpleEditor::reset()
+{
+	   panel_.reset(current_);
+}
+
+void SimpleEditor::close()
+{
+
+}
+
+Request SimpleEditor::currentRequest(long custom_expand)
+{
+	panel_.apply();
+	return custom_expand ? panel_.request(custom_expand) : panel_.request();
+}
+
+void SimpleEditor::replace(IconObject* o)
+{
+   	panel_.replace(o);
+}
+
+void  SimpleEditor::merge(IconObject* o)
+{
+	panel_.merge(o);
+}
+
+
+static EditorMaker<SimpleEditor> editorMaker("SimpleEditor");
+
diff --git a/src/MetviewUI/SimpleEditor.h b/src/MetviewUI/SimpleEditor.h
new file mode 100644
index 0000000..3bef6d6
--- /dev/null
+++ b/src/MetviewUI/SimpleEditor.h
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SimpleEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef SimpleEditor_H
+#define SimpleEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#include "UISimpleEditor.h"
+
+
+class RequestPanelLine;
+class SimpleEditorObserver;
+
+class SimpleEditor : public XEditor<UISimpleEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	SimpleEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~SimpleEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	Request currentRequest(long custom_expand=0);
+
+// -- Overridden methods
+	// None
+
+	//From InternalEditor.
+
+	virtual void replace(IconObject*);
+	virtual void merge(IconObject*);
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+
+	// void print(ostream&) const; // Change to virtual if base class
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	SimpleEditor(const SimpleEditor&);
+	SimpleEditor& operator=(const SimpleEditor&);
+
+// -- Members
+	RequestPanel panel_;
+// -- Methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+	//From InternalEditor.
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+
+	virtual IconObject* copy(const string&);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const SimpleEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(SimpleEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(SimpleEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/SimpleEditorObserver.h b/src/MetviewUI/SimpleEditorObserver.h
new file mode 100644
index 0000000..8e0b558
--- /dev/null
+++ b/src/MetviewUI/SimpleEditorObserver.h
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SimpleEditorObserver.h
+// Sylvie Thepaut - ECMWF Sep 99
+
+#ifndef SimpleEditorObserver_H
+#define SimpleEditorObserver_H
+
+// Headers
+
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+//
+
+class Request;
+class SimpleEditor;
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+class SimpleEditorObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+	SimpleEditorObserver(SimpleEditor&);
+
+// -- Destructor
+
+	virtual ~SimpleEditorObserver(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	virtual bool reset(const Request&) = 0;
+	virtual bool update(const Request&) = 0;
+	virtual bool apply(const Request&) = 0;
+
+	virtual void set(Request&);
+
+	virtual void show();
+	virtual void hide();
+	virtual void edit(IconObjectH);
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	SimpleEditor& owner_;
+	IconObjectH   currentObject_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	SimpleEditorObserver(const SimpleEditorObserver&);
+	SimpleEditorObserver& operator=(const SimpleEditorObserver&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const SimpleEditorObserver& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(SimpleEditorObserver**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(SimpleEditorObserver);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Singleton.h b/src/MetviewUI/Singleton.h
new file mode 100644
index 0000000..d136654
--- /dev/null
+++ b/src/MetviewUI/Singleton.h
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Singleton.h
+// Baudouin Raoult - ECMWF Jan 99
+
+#ifndef Singleton_H
+#define Singleton_H
+
+
+template<class T>
+class Singleton {
+public:
+
+	static T& instance();
+};
+
+template<class T>
+T& Singleton<T>::instance()
+{
+	static T p;
+	return p;
+}
+
+#endif
diff --git a/src/MetviewUI/State.cc b/src/MetviewUI/State.cc
new file mode 100644
index 0000000..8a02b92
--- /dev/null
+++ b/src/MetviewUI/State.cc
@@ -0,0 +1,73 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef State_H
+#include "State.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Service_H
+#include "Service.h"
+#endif
+
+
+void State::load(request* r)
+{
+	// class
+	// action
+	// output_class
+
+	int nc = count_values(r,"class");        if(nc == 0) nc = 1;
+	int na = count_values(r,"action");       if(na == 0) na = 1;
+	int no = count_values(r,"output_class"); if(no == 0) no = 1;
+	int nm = count_values(r,"mode");         if(nm == 0) nm = 1;
+
+	const char* s = get_value(r,"service",0);
+	if(s == 0)
+		return;
+
+
+	Service* p = Service::find(s);
+	if(p == 0)
+	{
+		cout << "Cannot find service " << s << endl;
+		return;
+	}
+
+	for(int ic = 0 ; ic < nc ; ic++)
+	{
+		const char* c = get_value(r,"class",ic);
+		const IconClass& cc = IconClass::find(c?c:"*");
+
+		for(int ia = 0 ; ia < na ; ia++)
+		{
+			const char* a = get_value(r,"action",ia);
+
+			for(int im = 0 ; im < nm ; im++)
+			{
+				const char* m = get_value(r,"mode",im);
+				for(int io = 0 ; io < no ; io++)
+				{
+					const char* o = get_value(r,"output_class",io);
+					const IconClass* oc = o ? &IconClass::find(o) : 0;
+					cc.service(Action(a?a:"*",m?m:"*"),oc,p);
+				}
+			}
+		}
+	}
+}
+
+static SimpleLoader<State> loadClasses("state",2);
diff --git a/src/MetviewUI/State.h b/src/MetviewUI/State.h
new file mode 100644
index 0000000..a45b1fb
--- /dev/null
+++ b/src/MetviewUI/State.h
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File State.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef State_H
+#define State_H
+
+#ifndef Metview_H
+#include "Metview.h"
+#endif
+
+class State  {
+public:
+
+	static void load(request*);
+
+};
+
+#endif
diff --git a/src/MetviewUI/StationaryDrawers.cc b/src/MetviewUI/StationaryDrawers.cc
new file mode 100644
index 0000000..7e08ea6
--- /dev/null
+++ b/src/MetviewUI/StationaryDrawers.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef StationaryDrawers_H
+#include "StationaryDrawers.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef SyncFolders_H
+#include "SyncFolders.h"
+#endif
+
+
+StationaryDrawers::StationaryDrawers():
+	FolderDrawers(Folder::folder("stationary"))
+{
+	// Synchronize those two folders
+
+	SyncFolders::add(
+	
+		  Folder::folder("stationary"),
+		  Folder::folder("system_stationary",false)
+	
+	);
+}
+
+StationaryDrawers::~StationaryDrawers()
+{
+}
+
+bool StationaryDrawers::fill(int pass)
+{
+	switch(pass)
+	{
+		case 0:
+			// Try first system stationary
+			SyncFolders::sync(folder_,Folder::folder("system_stationary"));
+			return true;
+
+		case 1:
+			// Create a sub-folder
+			Folder::folder("stationary",string("Drawers"));
+			return true;
+
+		default:
+			return false;
+	}
+}
+
+void StationaryDrawers::load(request* r)
+{
+	const char* kind = get_value(r,"class",0);
+	const char* name = get_value(r,"default_name",0);
+	const char* box;
+
+	if(!kind || !name) return;
+
+	int i = 0;
+	while(box = get_value(r,"icon_box",i++))
+	{
+		Folder *f = Folder::folder("stationary",string(box));
+		IconClass::find(kind).createOne(f);
+	}
+}
+
+// static SimpleLoader<StationaryDrawers> loader("object",1);
diff --git a/src/MetviewUI/StationaryDrawers.h b/src/MetviewUI/StationaryDrawers.h
new file mode 100644
index 0000000..2de5068
--- /dev/null
+++ b/src/MetviewUI/StationaryDrawers.h
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File StationaryDrawers.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef StationaryDrawers_H
+#define StationaryDrawers_H
+
+#ifndef FolderDrawers_H
+#include "FolderDrawers.h"
+#endif
+
+struct request;
+
+class StationaryDrawers : public FolderDrawers {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	StationaryDrawers();
+
+// -- Destructor
+
+	~StationaryDrawers(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void load(request*);
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	StationaryDrawers(const StationaryDrawers&);
+	StationaryDrawers& operator=(const StationaryDrawers&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From FolderDrawers
+
+	virtual bool fill(int);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const StationaryDrawers& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(StationaryDrawers**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(StationaryDrawers);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/StringLine.cc b/src/MetviewUI/StringLine.cc
new file mode 100644
index 0000000..d22c898
--- /dev/null
+++ b/src/MetviewUI/StringLine.cc
@@ -0,0 +1,100 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef StringLine_H
+#include "StringLine.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+
+
+#include <mars.h>
+
+StringLine::StringLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UITextLine_c>(owner,param),
+	changed_(false)
+{
+}
+
+StringLine::~StringLine()
+{
+}
+
+void StringLine::refresh(const vector<string>& values)
+{
+	string s;
+	for(vector<string>::const_iterator j = values.begin(); j != values.end(); ++j)
+	{
+			if(s.length()) s += "/";
+			s += *j;
+	}
+	
+	XMText text(text_);
+	text.set(s);
+}
+
+void StringLine::apply()
+{
+	if(changed_) owner_.changed(*this);
+}
+
+void StringLine::set(Request& r)
+{
+	XMText text(text_);
+	vector<string> v;
+	v.push_back(text.get());
+	r.set(param_.name(),v);
+}
+
+void StringLine::activateCB(Widget,XtPointer)
+{
+	changed_ = false;
+	owner_.changed(*this);
+}
+
+void StringLine::changedCB(Widget,XtPointer)
+{
+	changed_ = true;
+	decache();
+}
+
+void StringLine::loosingFocusCB(Widget,XtPointer)
+{
+	printf("TextLine::loosingFocusCB\n");
+}
+
+void StringLine::loosingPrimaryCB(Widget,XtPointer)
+{
+	printf("TextLine::loosingPrimaryCB\n");
+}
+
+static LineMaker<StringLine> maker("string");
diff --git a/src/MetviewUI/StringLine.h b/src/MetviewUI/StringLine.h
new file mode 100644
index 0000000..aa7e91f
--- /dev/null
+++ b/src/MetviewUI/StringLine.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File StringLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef StringLine_H
+#define StringLine_H
+
+#include "UITextLine.h"
+#include "RequestPanelLine.h"
+
+class StringLine : public XRequestPanelLine<UITextLine_c> {
+public:
+
+// -- Contructors
+
+	StringLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~StringLine(); 
+
+private:
+
+// No copy allowed
+
+	StringLine(const StringLine&);
+	StringLine& operator=(const StringLine&);
+
+// -- Members
+	
+	bool changed_;
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void activateCB(Widget,XtPointer);
+	virtual void changedCB(Widget,XtPointer);
+	virtual void loosingFocusCB(Widget,XtPointer);
+	virtual void loosingPrimaryCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+	virtual void apply();
+	virtual void set(Request&);
+
+};
+
+#endif
diff --git a/src/MetviewUI/SyncFolders.cc b/src/MetviewUI/SyncFolders.cc
new file mode 100644
index 0000000..5817176
--- /dev/null
+++ b/src/MetviewUI/SyncFolders.cc
@@ -0,0 +1,297 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef SyncFolders_H
+#include "SyncFolders.h"
+#endif
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef FolderViewer_H
+#include "FolderViewer.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#include <Xm/ToggleB.h>
+
+const double maxFrequency     = 60*60*24; // One day
+const double startFrequency   = 5;        // 5 sec.
+const double defaultFrequency = 5; //2*60*60;  // 2 hour
+
+
+static set<SyncFolders*> syncs;
+
+class SyncViewer : public FolderViewer {
+	Widget menu() { return 0; }
+	bool  dropCopy() { return false; }
+	bool  accept(IconObject* o);
+
+	set<string> names_;
+
+public:
+
+	SyncViewer(SyncFolders&,Widget,Folder*);
+	void names(const set<string>&);
+};
+
+SyncViewer::SyncViewer(SyncFolders&,Widget drag,Folder* f):
+	FolderViewer(f)
+{
+	FolderViewer::install(drag);
+}
+
+bool SyncViewer::accept(IconObject* o)
+{
+	return names_.find(o->name()) != names_.end();
+}
+
+void SyncViewer::names(const set<string>& s)
+{
+	names_ = s;
+	redraw();
+}
+
+SyncFolders::SyncFolders(Folder* user,Folder* system):
+	user_(user),
+	system_(system),
+	Timeout(startFrequency),
+	what_was_added_(0),
+	what_was_removed_(0),
+	changed_yours_(0),
+	changed_system_(0)
+{
+	syncs.insert(this);
+//	enable();
+}
+
+SyncFolders::~SyncFolders()
+{
+
+	syncs.erase(this);
+	
+	delete what_was_added_;
+	delete what_was_removed_;
+	delete changed_yours_;
+	delete changed_system_;
+}
+
+void SyncFolders::add(Folder* user,Folder* system)
+{
+	if(user && system) {
+
+		for(set<SyncFolders*>::iterator j = syncs.begin(); j != syncs.end(); ++j)
+		{
+			SyncFolders* s = *j;
+			if(s->user_ == user && s->system_ == system)
+			{
+				s->frequency(startFrequency);
+				return;
+			}
+		}
+		new SyncFolders(user,system);
+	}
+}
+
+void SyncFolders::sync(Folder* user,Folder* system)
+{
+//	mode_t previous_mask;
+//	previous_mask = umask (S_IWUSR);
+	user->copyContent(system);
+//	umask (previous_mask);
+}
+
+void SyncFolders::make()
+{
+	if(xd_rootwidget()) return;
+
+	create(XtDisplay(MetviewUI::root()),"Metview",0,0);
+	XtRealizeWidget(xd_rootwidget());
+	string name = user_->fullName();
+	XtVaSetValues(xd_rootwidget(),XmNtitle,name.c_str(),0);
+
+	what_was_added_   = new SyncViewer(*this,added_,system_);
+	what_was_removed_ = new SyncViewer(*this,gone_,user_);
+	changed_yours_    = new SyncViewer(*this,changed_u_,user_);
+	changed_system_   = new SyncViewer(*this,changed_s_,system_);
+
+	XMText text(text_);
+	char buffer[10240];
+	sprintf(buffer,"The folder \"%s\" is synchronized with the folder \"%s\". "
+		"The latter has been modified, and you can decide to apply the relevant changes.",
+		user_->fullName().c_str(),system_->fullName().c_str());
+
+	text.set(buffer);
+//	XtVaSetValues(text_,XmNrows, 6,0);
+
+}
+
+void SyncFolders::show()
+{
+	make();
+	XMapRaised(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}
+
+void SyncFolders::hide()
+{
+	make();
+	XUnmapWindow(XtDisplay(xd_rootwidget()),XtWindow(xd_rootwidget()));
+}
+
+
+static bool changed(IconObject* u,IconObject* s)
+{
+	if(s->path().lastModified() > u->path().lastModified())
+		if(s->sameAs(u))
+		{
+			u->touch();
+			return false;
+		}
+		else
+			return true;
+	return false;
+}
+
+void SyncFolders::run()
+{
+
+	Path u = user_->path();
+	Path s = system_->path();
+
+	set<string> user_files   = u.files();
+	set<string> system_files = s.files();
+
+	set<string> added = system_files;
+	set<string> gone  = user_files;
+
+	set<string> modified;
+
+	for(set<string>::iterator j = user_files.begin(); j != user_files.end(); ++j)
+		added.erase(*j);
+
+	for(set<string>::iterator j = system_files.begin(); j != system_files.end(); ++j)
+		gone.erase(*j);
+
+	for(set<string>::iterator j = system_files.begin(); j != system_files.end(); ++j)
+		if(user_files.find(*j) != user_files.end())
+		{
+			IconObject* uo = user_->find(*j);
+			IconObject* so = system_->find(*j);
+
+			if(uo && so && changed(uo,so))
+				modified.insert(*j);
+		}
+
+	if(added.size() || gone.size() || modified.size())
+	{
+		make();
+
+		if(added.size())   XtManageChild(added_form_);     else XtUnmanageChild(added_form_);
+		if(gone.size())     XtManageChild(gone_form_);     else XtUnmanageChild(gone_form_);
+		if(modified.size()) XtManageChild(changed_form_);  else XtUnmanageChild(changed_form_);
+
+
+		what_was_added_->names(added);
+		what_was_removed_->names(gone);
+		changed_yours_->names(modified);
+		changed_system_->names(modified);
+
+		adjust();
+		disable();
+		show();
+	}
+
+	frequency(defaultFrequency);
+
+}
+
+void SyncFolders::closeCB(Widget, XtPointer)
+{
+	hide();
+	enable();
+	frequency(maxFrequency);
+}
+
+void SyncFolders::syncCB(Widget, XtPointer)
+{
+	hide();
+	enable();
+	//frequency(maxFrequency);
+}
+
+void SyncFolders::adjust()
+{
+	return;
+	make();
+
+	// Added
+
+	if(XmToggleButtonGetState(add_all_)) 
+		what_was_added_->selectAll();
+
+	if(XmToggleButtonGetState(add_none_))
+		what_was_added_->selectNone();
+
+	// Gone
+
+	if(XmToggleButtonGetState(remove_all_))
+		what_was_removed_->selectAll();
+
+	if(XmToggleButtonGetState(keep_all_))
+		what_was_removed_->selectNone();
+		
+
+	// Changed
+
+	if(XmToggleButtonGetState(preserve_all_))
+	{
+		changed_yours_->selectAll();
+		changed_system_->selectNone();
+	}
+
+	if(XmToggleButtonGetState(overwrite_all_))
+	{
+		changed_yours_->selectNone();
+		changed_system_->selectAll();
+	}
+
+//	if(XmToggleButtonGetState(preserve_selected_))
+//	if(XmToggleButtonGetState(overwrite_all_))
+
+}
+
+void SyncFolders::entryCB(Widget, XtPointer)
+{
+	adjust();
+}
+
+void SyncFolders::selectCB(Widget, XtPointer)
+{
+	cout << "SyncFolders::selectCB " << endl;
+}
+
+
+#if 0
+add_all_
+add_selected_
+add_none_
+
+preserve_all_
+preserve_selected_
+overwrite_all_
+overwrite_selected_
+
+remove_all_
+remove_selected_
+keep_all_
+#endif
diff --git a/src/MetviewUI/SyncFolders.h b/src/MetviewUI/SyncFolders.h
new file mode 100644
index 0000000..0752f4e
--- /dev/null
+++ b/src/MetviewUI/SyncFolders.h
@@ -0,0 +1,139 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SyncFolders.h
+// Baudouin Raoult - ECMWF Oct 99
+
+#ifndef SyncFolders_H
+#define SyncFolders_H
+
+#ifndef Timeout_H
+#include "Timeout.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#include "UISyncFolders.h"
+
+class SyncViewer;
+
+
+class SyncFolders : public Timeout, public UISyncFolders_c {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	SyncFolders(Folder*,Folder*);
+
+// -- Destructor
+
+	~SyncFolders(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void make();
+	void show();
+	void hide();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void add(Folder*,Folder*);
+	static void sync(Folder*,Folder*);
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	SyncFolders(const SyncFolders&);
+	SyncFolders& operator=(const SyncFolders&);
+
+// -- Members
+
+	FolderH user_;
+	FolderH system_;
+
+	SyncViewer* what_was_added_;
+	SyncViewer* what_was_removed_;
+	SyncViewer* changed_yours_;
+	SyncViewer* changed_system_;
+
+// -- Methods
+	// None
+
+	void adjust();
+
+// -- Overridden methods
+
+	// From Timeout
+
+	virtual void run();
+
+	// From XD
+
+	virtual void closeCB(Widget, XtPointer);
+	virtual void syncCB(Widget, XtPointer);
+	virtual void entryCB(Widget, XtPointer);
+	virtual void selectCB(Widget, XtPointer);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const SyncFolders& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(SyncFolders**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(SyncFolders);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/SynchFolders.h b/src/MetviewUI/SynchFolders.h
new file mode 100644
index 0000000..320d4ba
--- /dev/null
+++ b/src/MetviewUI/SynchFolders.h
@@ -0,0 +1,9 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
diff --git a/src/MetviewUI/SystemFolder.cc b/src/MetviewUI/SystemFolder.cc
new file mode 100644
index 0000000..4f7d899
--- /dev/null
+++ b/src/MetviewUI/SystemFolder.cc
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "SystemFolder.h"
+#include "IconFactory.h"
+
+SystemFolder::SystemFolder(Folder* parent,const IconClass& kind,
+		const string& name,IconInfo* info):
+	Folder(parent,kind,name,info)
+{
+}
+
+SystemFolder::~SystemFolder()
+{
+}
+
+set<string> SystemFolder::can()
+{
+	set<string> c = Folder::can();
+	c.erase("delete");
+	c.erase("duplicate");
+	return c;
+}
+
+bool SystemFolder::renamable() const
+{
+	return false;
+}
+
+static IconMaker<SystemFolder> systemFactory("SYSTEM");
diff --git a/src/MetviewUI/SystemFolder.h b/src/MetviewUI/SystemFolder.h
new file mode 100644
index 0000000..db764a2
--- /dev/null
+++ b/src/MetviewUI/SystemFolder.h
@@ -0,0 +1,110 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SystemFolder.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef SystemFolder_H
+#define SystemFolder_H
+
+#include "Folder.h"
+
+class SystemFolder : public Folder {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	SystemFolder(Folder* parent,const IconClass& kind,
+		const string& name,IconInfo* info);
+
+// -- Destructor
+
+	virtual ~SystemFolder(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+
+	set<string> can();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	SystemFolder(const SystemFolder&);
+	SystemFolder& operator=(const SystemFolder&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual bool renamable() const;
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const SystemFolder& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(SystemFolder**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(SystemFolder);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Task.cc b/src/MetviewUI/Task.cc
new file mode 100644
index 0000000..27fddd2
--- /dev/null
+++ b/src/MetviewUI/Task.cc
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+#include "Queue.h"
+
+Task::Task():
+	stopped_(false)
+{
+}
+
+Task::~Task()
+{
+}
+
+void Task::add(TaskObserver* o)
+{
+	observers_.insert(o);
+}
+
+void Task::success(const Request& r)
+{
+	TaskH save = this; // Make sure we don't get deleted
+
+	for(set<TaskObserver*>::iterator j = observers_.begin() ; j !=   observers_.end() ; ++j)
+		(*j)->success(this,r);
+}
+
+void Task::failure()
+{
+	TaskH save = this; // Make sure we don't get deleted
+
+	for(set<TaskObserver*>::iterator j = observers_.begin() ; j !=   observers_.end() ; ++j)
+		(*j)->failure(this);
+}
+
+void Task::stop()
+{
+	stopped_ = true;
+}
diff --git a/src/MetviewUI/Task.h b/src/MetviewUI/Task.h
new file mode 100644
index 0000000..610445c
--- /dev/null
+++ b/src/MetviewUI/Task.h
@@ -0,0 +1,140 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Task.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef Task_H
+#define Task_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#include "inc_stl.h"
+using std::string;
+
+class Queue;
+class TaskObserver;
+class Request;
+
+#ifndef Counted_H
+#include "Counted.h"
+#endif
+
+
+class Task : public virtual Counted {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Task();
+
+// -- Destructor
+
+	virtual ~Task(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void start() = 0;
+	virtual void stop();
+
+	void add(TaskObserver*);
+	void remove(TaskObserver*);
+
+	virtual void addContext (const Request&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+	bool stopped_;
+
+// -- Methods
+	
+	void success(const Request&);
+	void failure();
+
+	virtual void print(ostream&) const = 0; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Task(const Task&);
+	Task& operator=(const Task&);
+
+// -- Members
+
+	set<TaskObserver*> observers_;
+
+// -- Methods
+	// None
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	friend ostream& operator<<(ostream& s,const Task& p)
+		{ p.print(s); return s; }
+
+
+	friend class Queue;
+};
+
+typedef Handle<Task> TaskH;
+
+#endif
diff --git a/src/MetviewUI/TaskObserver.h b/src/MetviewUI/TaskObserver.h
new file mode 100644
index 0000000..778aa42
--- /dev/null
+++ b/src/MetviewUI/TaskObserver.h
@@ -0,0 +1,28 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TaskObserver.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef TaskObserver_H
+#define TaskObserver_H
+
+class Request;
+class Task;
+
+class TaskObserver {
+public:
+
+	virtual void success(Task*,const Request&) = 0;
+	virtual void failure(Task*) = 0;
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/TeeBuffer.cc b/src/MetviewUI/TeeBuffer.cc
new file mode 100644
index 0000000..5984fdf
--- /dev/null
+++ b/src/MetviewUI/TeeBuffer.cc
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "TeeBuffer.h"
+
+
+TeeBuffer::TeeBuffer(ostream& one,ostream& two):
+    streambuf(),
+	one_(one),
+	two_(two)
+{
+    setp(buffer_, buffer_ + sizeof(buffer_));
+    setg(0, 0, 0);
+}
+
+TeeBuffer::~TeeBuffer()
+{
+    dumpBuffer();
+}
+
+int TeeBuffer::overflow(int c)
+{
+    if (c == EOF) {
+        sync();
+        return 0;
+    }
+
+    dumpBuffer();
+    sputc(c);
+    return 0;
+}
+
+int TeeBuffer::sync()
+{
+    dumpBuffer();
+    return 0;
+}
+
+void TeeBuffer::dumpBuffer()
+{
+
+	for(const char* p = pbase();  p != epptr(); ++p)
+	{
+		one_ << *p;
+		two_ << *p;
+		if(*p == '\n') 
+			break;
+	}
+
+    setp(pbase(), epptr());
+
+	one_ << flush;
+	two_ << flush;
+}
+
diff --git a/src/MetviewUI/TeeBuffer.h b/src/MetviewUI/TeeBuffer.h
new file mode 100644
index 0000000..f23fd38
--- /dev/null
+++ b/src/MetviewUI/TeeBuffer.h
@@ -0,0 +1,112 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TeeBuffer.h
+// Baudouin Raoult - ECMWF Jun 00
+
+#ifndef TeeBuffer_H
+#define TeeBuffer_H
+
+#include "inc_iostream.h"
+
+class TeeBuffer : public streambuf {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	TeeBuffer(ostream&,ostream&);
+
+// -- Destructor
+
+	~TeeBuffer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+
+// -- Overridden methods
+
+	int   overflow(int);
+	int   sync();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	TeeBuffer(const TeeBuffer&);
+	TeeBuffer& operator=(const TeeBuffer&);
+
+// -- Members
+
+	char buffer_[1024];
+	ostream& one_;
+	ostream& two_;
+
+// -- Methods
+
+	void dumpBuffer(void);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const TeeBuffer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(TeeBuffer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(TeeBuffer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/TeeStream.cc b/src/MetviewUI/TeeStream.cc
new file mode 100644
index 0000000..7f0d3b1
--- /dev/null
+++ b/src/MetviewUI/TeeStream.cc
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TeeStream_H
+#include "TeeStream.h"
+#endif
+
+#ifndef TeeBuffer_H
+#include "TeeBuffer.h"
+#endif
+
+TeeStream::TeeStream(ostream& one,ostream& two):
+    ostream(new TeeBuffer(one,two))
+{
+}
+
+TeeStream::~TeeStream()
+{
+    delete (TeeBuffer*)rdbuf();
+}
+
diff --git a/src/MetviewUI/TeeStream.h b/src/MetviewUI/TeeStream.h
new file mode 100644
index 0000000..230b358
--- /dev/null
+++ b/src/MetviewUI/TeeStream.h
@@ -0,0 +1,107 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TeeStream.h
+// Baudouin Raoult - ECMWF Jun 00
+
+#ifndef TeeStream_H
+#define TeeStream_H
+
+#include "inc_iostream.h"
+
+class TeeStream : public ostream {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	TeeStream(ostream&,ostream&);
+
+// -- Destructor
+
+	~TeeStream(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	TeeStream(const TeeStream&);
+	TeeStream& operator=(const TeeStream&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const TeeStream& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(TeeStream**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(TeeStream);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/TempIconClass.cc b/src/MetviewUI/TempIconClass.cc
new file mode 100644
index 0000000..093337a
--- /dev/null
+++ b/src/MetviewUI/TempIconClass.cc
@@ -0,0 +1,44 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TempIconClass_H
+#include "TempIconClass.h"
+#endif
+
+
+static string next_name()
+{
+	static int i = 0;
+	char buf[80];
+	sprintf(buf,"macro_lang%04d",i++);
+	return buf;
+}
+
+
+TempIconClass::TempIconClass(const Request& lang,const IconClass* super):
+	IconClass(next_name(), empty_request(""),super),
+	lang_(this, lang),
+	maker_(name())
+{
+}
+
+TempIconClass::~TempIconClass()
+{
+}
+
+Language& TempIconClass::language() const
+{ 
+	TempIconClass* c = const_cast<TempIconClass*>(this);
+	return c->lang_; 
+}
+
+string TempIconClass::editor() const
+{
+	return "SimpleEditor";
+}
diff --git a/src/MetviewUI/TempIconClass.h b/src/MetviewUI/TempIconClass.h
new file mode 100644
index 0000000..2a5b92e
--- /dev/null
+++ b/src/MetviewUI/TempIconClass.h
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TempIconClass.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef TempIconClass_H
+#define TempIconClass_H
+
+#ifndef Metview_H
+#include "Metview.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef Basic_H
+#include "Basic.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+class TempIconClass : public IconClass {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	TempIconClass(const Request& lang,const IconClass* = 0);
+	
+// -- Destructor
+
+	virtual ~TempIconClass(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	TempIconClass(const TempIconClass&);
+	TempIconClass& operator=(const TempIconClass&);
+
+// -- Members
+
+	Language         lang_;
+	IconMaker<Basic> maker_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+	virtual Language& language() const;
+	virtual string editor() const;
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const TempIconClass& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(TempIconClass**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(TempIconClass);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/TemplateDrawer.cc b/src/MetviewUI/TemplateDrawer.cc
new file mode 100644
index 0000000..8aca9bf
--- /dev/null
+++ b/src/MetviewUI/TemplateDrawer.cc
@@ -0,0 +1,158 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TemplateDrawer_H
+#include "TemplateDrawer.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+#ifndef FolderWindow_H
+#include "FolderWindow.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef SyncFolders_H
+#include "SyncFolders.h"
+#endif
+
+#include <Drag.h>
+
+TemplateDrawer::TemplateDrawer(InternalEditor& e):
+	XEditorDrawer<UITemplateDrawer_c>(e), 
+		FolderViewer(Folder::folder("templates",e.iconClass().defaultName())) 
+{
+	FolderViewer::install(drag_);
+
+	// Synchronize those two folders
+
+	SyncFolders::add(
+	
+		  Folder::folder("templates",
+			  	e.iconClass().defaultName()),
+
+		  Folder::folder("system_templates",
+			  	e.iconClass().defaultName(),false)
+	
+	);
+}
+
+TemplateDrawer::~TemplateDrawer()
+{
+}
+
+void TemplateDrawer::edit(IconObject* o)
+{	  	  
+}
+
+
+Widget TemplateDrawer::menu()
+{	  	
+	if ( current_.size() == 0 ) 	 
+		return menu2_;
+	 
+	XtSetSensitive(replace_, current_.size() == 1); 
+	XtSetSensitive(merge_, current_.size() == 1);
+
+	return menu1_;
+}
+
+void TemplateDrawer::makeCB(Widget, XtPointer data) 
+{
+	// create a template in the template Folder... 
+
+	string name = folder_->fullName() + "/" + editor_.current()->name();
+	editor_.copy(name);
+}
+
+bool TemplateDrawer::accept(IconObject *o)
+{
+	return o->iconClass().isSubClassOf(editor_.iconClass());
+}
+
+void TemplateDrawer:: replaceCB( Widget, XtPointer ) 
+{
+ 	for(vector<IconObjectH>::iterator j = current_.begin() ; 
+		j != current_.end(); ++j)
+			editor_.replace(*j);
+}
+
+void TemplateDrawer::mergeCB( Widget, XtPointer )
+{	   
+ 	for(vector<IconObjectH>::iterator j = current_.begin() ; 
+		j != current_.end(); ++j)
+			editor_.merge(*j);
+
+}
+
+void TemplateDrawer::editCB( Widget, XtPointer )
+{	       
+ 	for(vector<IconObjectH>::iterator j = current_.begin() ; 
+		j != current_.end(); ++j)
+			(*j)->edit();
+}
+
+void TemplateDrawer::openFolderCB( Widget, XtPointer )
+{	
+	folder_->open();
+}
+
+bool TemplateDrawer::fill(int pass)
+{
+	Folder* system = Folder::folder("system_templates",
+			  	editor_.iconClass().defaultName(),false);
+
+	switch(pass)
+	{
+		case 0:
+			// Try system 
+			SyncFolders::sync(folder_,system);
+			return true;
+
+		case 1:
+			// Make a default one ????
+			return true;
+
+		default:
+			return false;
+	}
+	
+}
+
+static EditorDrawerMaker<TemplateDrawer,InternalEditor> maker(1);
+
diff --git a/src/MetviewUI/TemplateDrawer.h b/src/MetviewUI/TemplateDrawer.h
new file mode 100644
index 0000000..2a44044
--- /dev/null
+++ b/src/MetviewUI/TemplateDrawer.h
@@ -0,0 +1,153 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TemplateDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef TemplateDrawer_H
+#define TemplateDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#ifndef IconHolder_H
+#include "IconHolder.h"
+#endif
+
+#ifndef UITemplateDrawer_H  
+#include "UITemplateDrawer.h"
+#endif
+
+#ifndef Folder_H  
+#include "Folder.h"
+#endif
+
+
+#ifndef FolderViewer_H  
+#include "FolderViewer.h"
+#endif
+
+
+class TemplateDrawer : public XEditorDrawer<UITemplateDrawer_c>, 
+	public FolderViewer {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	TemplateDrawer(InternalEditor&);
+
+// -- Destructor
+
+	virtual ~TemplateDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None 
+
+
+// -- Class methods
+	// None 
+
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+	// from IconHolder
+	virtual bool accept(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	TemplateDrawer(const TemplateDrawer&);
+	TemplateDrawer& operator=(const TemplateDrawer&);
+
+// -- Members
+	// None	
+
+// -- Methods
+
+// -- Overridden methods
+		 	
+	 // from EditorDrawer
+
+	 virtual void edit(IconObject*);
+
+	// From DragWindow
+
+	virtual Widget menu();
+	virtual bool dropCopy() { return true; }
+
+	// From FolderViewer
+
+	virtual bool fill(int);
+	
+	//from UITemplateDrawer_c
+
+	virtual void replaceCB( Widget, XtPointer );
+	virtual void mergeCB( Widget, XtPointer );
+	virtual void editCB( Widget, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer );
+	virtual void makeCB( Widget, XtPointer );
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const TemplateDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(TemplateDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(TemplateDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Temporary.cc b/src/MetviewUI/Temporary.cc
new file mode 100644
index 0000000..7039e30
--- /dev/null
+++ b/src/MetviewUI/Temporary.cc
@@ -0,0 +1,146 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Temporary_H
+#include "Temporary.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#include "Dependancy.h"
+
+#include "mars.h"
+
+static string next_name()
+{
+	static int i = 0;
+	char buf[80];
+	sprintf(buf,"Temp%04d",i++);
+	return buf;
+}
+
+Temporary::Temporary(IconObject* ref,const Request& r,const IconClass* c):
+	IconObject(0,c ? *c : IconClass::find(r.getVerb()),next_name(),0),
+	ref_(ref), request_(r)
+{
+	cout << "-->  Temporary::Temporary() for" << *ref_ << endl;
+	r.print();
+	cout << "<--  Temporary::Temporary() for" << *ref_ << endl;
+}
+
+Temporary::~Temporary()
+{
+	cout << "Temporary::~Temporary() for " << *ref_ << endl;
+}
+
+Folder* Temporary::parent() const
+{
+	return ref_->parent();
+}
+
+void Temporary::createFiles()
+{
+}
+
+Request Temporary::request() const
+{
+	request_.print();
+	return request_;
+}
+
+void Temporary::request(const Request& r)
+{
+	request_ = r;
+}
+
+Path Temporary::pathForShellTask() const
+{
+    const char* path = request_("PATH");
+    if ( path ) {
+        const char* path = request_("PATH");
+        return string(path);
+    }
+	return string("/dev/null");
+}
+
+Path Temporary::path() const
+{
+	return string("/dev/null");
+}
+
+
+Path Temporary::dotPath() const
+{
+	return string("/dev/null");
+}
+
+Path Temporary::embeddedPath() const
+{
+	return string("/dev/null");
+}
+
+string Temporary::fullName() const
+{
+	return ref_->fullName() + "/" + name();
+}
+string Temporary::relativeName(IconObject* other) const
+{
+	return ref_->relativeName(other);
+}
+
+string Temporary::makeFullName(const string& name) const
+{
+	return ref_->makeFullName(name);
+}
+
+Folder* Temporary::embeddedFolder(const string& n,bool create) const
+{
+	return ref_->embeddedFolder(n,create);
+}
+
+Folder* Temporary::embeddedFolder(bool create) const
+{
+	return ref_->embeddedFolder(create);
+}
+
+Log& Temporary::log()
+{
+	return ref_->log();
+}
+
+bool Temporary::rename(const string& s)
+{
+	name_ = s;
+	return true;
+}
+
+bool Temporary::renamable() const
+{
+	return true;
+}
+
+bool Temporary::temporary() const
+{
+	return true;
+}
+
diff --git a/src/MetviewUI/Temporary.h b/src/MetviewUI/Temporary.h
new file mode 100644
index 0000000..9572f0b
--- /dev/null
+++ b/src/MetviewUI/Temporary.h
@@ -0,0 +1,146 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Temporary.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Temporary_H
+#define Temporary_H
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#include "Request.h"
+
+#include <string>
+using std::string;
+
+
+class Temporary : public IconObject {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Temporary(IconObject*,const Request&,const IconClass* = 0);
+
+// -- Destructor
+
+	virtual ~Temporary(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Temporary(const Temporary&);
+	Temporary& operator=(const Temporary&);
+
+// -- Members
+
+	IconObjectH ref_;
+	Request     request_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From IconObject
+
+	virtual void createFiles();
+	virtual Log& log();
+	virtual Request request() const;
+	virtual void request(const Request&);
+	virtual string fullName() const;
+	virtual Path   path()     const;
+	// Different implementation of the path() if used by a 
+	// ShellTask.
+	// For Temporary Objects, it will return the PATH of the attached request, (if it exists)
+	// This is done to enable the visualisation of the MAGML Objects 
+	// without possible side effects! 
+	virtual Path   pathForShellTask() const;
+	virtual Path   dotPath()  const;
+	virtual Folder* parent()  const;
+
+	virtual bool rename(const string&);
+	virtual bool renamable() const;
+	virtual bool temporary() const; 
+	
+	virtual Folder* embeddedFolder(const string& n,bool) const;
+	virtual Path    embeddedPath()  const;
+	virtual Folder* embeddedFolder(bool) const;
+	
+	virtual string relativeName(IconObject*) const;
+	virtual string makeFullName(const string&) const;
+
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Temporary& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Temporary**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Temporary);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/TemporaryFolder.cc b/src/MetviewUI/TemporaryFolder.cc
new file mode 100644
index 0000000..cbf7b53
--- /dev/null
+++ b/src/MetviewUI/TemporaryFolder.cc
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <unistd.h>
+#ifndef TemporaryFolder_H
+#include "TemporaryFolder.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#include "IconFactory.h"
+
+TemporaryFolder::TemporaryFolder(Folder* parent,const IconClass& kind,
+		const string& name,IconInfo* info):
+	SystemFolder(parent,kind,name,info)
+{
+
+	// On creation, move remove old
+
+    removeFiles();
+	createFiles();
+
+	cout << "TemporaryFolder " << endl;
+
+}
+
+TemporaryFolder::~TemporaryFolder()
+{
+}
+
+void TemporaryFolder::createFiles()
+{
+	IconObject::createFiles();
+	Path tmp(getenv("METVIEW_TMPDIR"));
+	path().symlink(tmp);
+}
+
+static IconMaker<TemporaryFolder> maker("TEMPORARY");
diff --git a/src/MetviewUI/TemporaryFolder.h b/src/MetviewUI/TemporaryFolder.h
new file mode 100644
index 0000000..401b4b4
--- /dev/null
+++ b/src/MetviewUI/TemporaryFolder.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TemporaryFolder.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef TemporaryFolder_H
+#define TemporaryFolder_H
+
+#include "SystemFolder.h"
+
+class TemporaryFolder : public SystemFolder {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	TemporaryFolder(Folder* parent,const IconClass& kind,
+		const string& name,IconInfo* info);
+
+// -- Destructor
+
+	virtual ~TemporaryFolder(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	TemporaryFolder(const TemporaryFolder&);
+	TemporaryFolder& operator=(const TemporaryFolder&);
+
+// -- Members
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual void createFiles();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const TemporaryFolder& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(TemporaryFolder**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(TemporaryFolder);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/TextEditor.cc b/src/MetviewUI/TextEditor.cc
new file mode 100644
index 0000000..2e82b3e
--- /dev/null
+++ b/src/MetviewUI/TextEditor.cc
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TextEditor_H
+#include "TextEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+TextEditor::TextEditor(const IconClass& name,const string& kind):
+	BaseTextEditor(name,kind)
+{
+}
+
+TextEditor::~TextEditor()
+{
+}
+
+static EditorMaker<TextEditor>  editorMaker("TextEditor");
diff --git a/src/MetviewUI/TextEditor.h b/src/MetviewUI/TextEditor.h
new file mode 100644
index 0000000..008890e
--- /dev/null
+++ b/src/MetviewUI/TextEditor.h
@@ -0,0 +1,105 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef TextEditor_H
+#define TextEditor_H
+
+#ifndef BaseTextEditor_H
+#include "BaseTextEditor.h"
+#endif
+
+class TextEditor : public BaseTextEditor {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	TextEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~TextEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	TextEditor(const TextEditor&);
+	TextEditor& operator=(const TextEditor&);
+
+// -- Members
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const TextEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(TextEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(TextEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/TextLine.cc b/src/MetviewUI/TextLine.cc
new file mode 100644
index 0000000..4d624da
--- /dev/null
+++ b/src/MetviewUI/TextLine.cc
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TextLine_H
+#include "TextLine.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+#ifndef LineFactory_H
+#include "LineFactory.h"
+#endif
+
+
+
+#include <mars.h>
+
+TextLine::TextLine(RequestPanel& owner,const Parameter& param):
+	XRequestPanelLine<UITextLine_c>(owner,param),
+	changed_(false)
+{
+}
+
+TextLine::~TextLine()
+{
+}
+
+void TextLine::refresh(const vector<string>& values)
+{
+	string s;
+	for(vector<string>::const_iterator j = values.begin(); j != values.end(); ++j)
+	{
+			if(s.length()) s += "/";
+			s += *j;
+	}
+	
+	XMText text(text_);
+	text.set(s);
+
+	changed_ = false;
+}
+
+void TextLine::apply()
+{
+	if(changed_) {
+		changed_ = false;
+		owner_.changed(*this);
+	}
+}
+
+void TextLine::set(Request& r)
+{
+	XMText text(text_);
+
+	Tokenizer parse("/");
+	vector<string> v;
+
+	//parse(text.get(),v); //-- this removes leading '/' from path values!!
+
+	string s = text.get();
+	if( s[0] == '/' )      //-- handle 'path name candidates' here!
+	  {
+	    cout << ">>> (TextLine::set) Q&D hack: "
+		 << s.c_str()
+		 << " is now treated as path!"
+		 << endl;
+	    v.push_back(s);
+	  }
+	else
+	  {
+	    parse(s,v);        //-- all other parameters here!
+	  }
+
+	r.set(param_.name(),v);
+
+	changed_ = false;
+}
+
+void TextLine::activateCB(Widget,XtPointer)
+{
+	changed_ = false;
+	owner_.changed(*this);
+}
+
+void TextLine::changedCB(Widget,XtPointer)
+{
+	changed_ = true;
+	decache();
+}
+
+void TextLine::update()
+{
+	if(changed_) 
+	{
+		changed_ = false;
+		owner_.changed(*this,false);
+	}
+	RequestPanelItem::update();
+}
+
+static LineMaker<TextLine> maker1("text");
diff --git a/src/MetviewUI/TextLine.h b/src/MetviewUI/TextLine.h
new file mode 100644
index 0000000..d1d7759
--- /dev/null
+++ b/src/MetviewUI/TextLine.h
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File TextLine.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef TextLine_H
+#define TextLine_H
+
+#include "UITextLine.h"
+#include "RequestPanelLine.h"
+
+class TextLine : public XRequestPanelLine<UITextLine_c> {
+public:
+
+// -- Contructors
+
+	TextLine(RequestPanel&,const Parameter&);
+
+// -- Destructor
+
+	virtual ~TextLine(); 
+
+private:
+
+// No copy allowed
+
+	TextLine(const TextLine&);
+	TextLine& operator=(const TextLine&);
+
+// -- Members
+	
+	bool changed_;
+
+// -- Overridden methods
+
+	// From XD
+
+	virtual void activateCB(Widget,XtPointer);
+	virtual void changedCB(Widget,XtPointer);
+
+	// From RequestPanelItem
+
+	virtual void refresh(const vector<string>&);
+	virtual void apply();
+	virtual void set(Request&);
+	virtual void update();
+
+};
+
+#endif
diff --git a/src/MetviewUI/Timeout.cc b/src/MetviewUI/Timeout.cc
new file mode 100644
index 0000000..f8bae7b
--- /dev/null
+++ b/src/MetviewUI/Timeout.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Timeout.h"
+#include "Metview.h"
+#include <MvXApplication.h>
+
+
+void Timeout::timeoutCB(XtPointer data,XtIntervalId* id)
+{
+	Timeout* t = (Timeout*)data;
+
+	if(t->actived_) 
+	{
+		t->running_ = True;
+		t->run();
+		t->running_ = False;
+	}
+
+	if(t->actived_) 
+		t->id_ = XtAppAddTimeOut(MvXApplication::context(),
+			t->frequency_*1000,timeoutCB,t);
+}
+
+Timeout::Timeout(double frequency):
+	actived_(False),
+	frequency_(frequency),
+	id_(0),
+	running_(False)
+{
+}
+
+Timeout::~Timeout()
+{
+	disable();
+}
+
+void Timeout::enable()
+{
+	if(!actived_ /*&& app_context*/)
+	{
+		id_      = XtAppAddTimeOut(MvXApplication::context(),
+			frequency_*1000,timeoutCB,this);
+		actived_ = True;
+	}
+}
+
+
+void Timeout::disable()
+{
+	if(actived_ && id_)
+	{
+		XtRemoveTimeOut(id_);
+		id_      = 0;
+		actived_ = False;
+	}
+}
+
+void Timeout::frequency(double n)
+{
+	frequency_ = n;
+	if(!running_ && actived_)
+	{
+		disable();
+		enable();
+	}
+}
+
+void Timeout::drift(double n,double maximum)
+{
+	double x = frequency_ + n;
+	if(x>maximum) x = maximum;
+	frequency(x);
+}
diff --git a/src/MetviewUI/Timeout.h b/src/MetviewUI/Timeout.h
new file mode 100644
index 0000000..e561f39
--- /dev/null
+++ b/src/MetviewUI/Timeout.h
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Timeout.h
+// Baudouin Raoult - ECMWF Oct 98
+
+#ifndef Timeout_H
+#define Timeout_H
+
+#include <Xm/Xm.h>
+
+
+class Timeout {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Timeout(double);
+
+// -- Destructor
+
+	virtual ~Timeout(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+	void enable();
+	void disable();
+	void frequency(double);
+	void drift(double,double);
+
+	virtual void run() = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Timeout(const Timeout&);
+	Timeout& operator=(const Timeout&);
+
+// -- Members
+
+	Boolean actived_;
+	XtIntervalId id_;
+	double frequency_;
+	int running_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+// -- Class methods
+	// None
+	static void timeoutCB(XtPointer,XtIntervalId*);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Timeout& p)
+	//	{ p.print(s); return s; }
+
+};
+
+
+#endif
diff --git a/src/MetviewUI/Tools.cc b/src/MetviewUI/Tools.cc
new file mode 100644
index 0000000..bcc463b
--- /dev/null
+++ b/src/MetviewUI/Tools.cc
@@ -0,0 +1,78 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+
+#ifndef Tools_H
+#include "Tools.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#include <Xm/PushB.h>
+
+static vector<Tools*> tools;
+
+Tools::Tools(request* r):
+	request_(r)
+{
+}
+
+Tools::~Tools()
+{
+	// Not called
+}
+
+static void toolCB(Widget, XtPointer o, XtPointer)
+{
+	((Tools*)o)->start();
+}
+
+void Tools::make(Widget menu)
+{
+	for (vector<Tools*>::iterator j = tools.begin(); j != tools.end(); ++j ) 
+	{
+		Widget w = XmCreatePushButton(menu, (char*) get_value((*j)->request_, "name", 0), 0, 0);
+		XMLabel(w).set(get_value((*j)->request_, "label", 0));
+		XtAddCallback(w, XmNactivateCallback, toolCB, *j);
+		XtManageChild(w);
+	}
+
+}
+
+
+void Tools::start()
+{
+	cout << "Tools::start " << get_value(request_, "service", 0) << endl;
+	Request r(get_value(request_, "action", 0));
+
+	MvApplication::callService(get_value(request_, "service", 0), r, 0);
+}
+
+
+void Tools::load(request* r)
+{
+	tools.push_back(new Tools(r));
+}
+
+
+static SimpleLoader<Tools> loadClasses("interface_tool",1);
diff --git a/src/MetviewUI/Tools.h b/src/MetviewUI/Tools.h
new file mode 100644
index 0000000..be11362
--- /dev/null
+++ b/src/MetviewUI/Tools.h
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Tools.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Tools_H
+#define Tools_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#include "Metview.h"
+#include <Xm/Xm.h>
+
+
+class Tools {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Tools(request*);
+
+// -- Destructor
+
+	~Tools(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	void start();
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	static void load(request*);
+	static void make(Widget);
+	
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Tools(const Tools&);
+	Tools& operator=(const Tools&);
+
+// -- Members
+
+	request*    request_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Tools& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Tools**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Tools);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Transaction.cc b/src/MetviewUI/Transaction.cc
new file mode 100644
index 0000000..22630ba
--- /dev/null
+++ b/src/MetviewUI/Transaction.cc
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+#include "Transaction.h"
+#include "TaskObserver.h"
+#include "Action.h"
+#include "IconObject.h"
+#include "Request.h"
+#include "Task.h"
+#include "Folder.h"
+#include "IconFactory.h"
+#include "EditorObserver.h"
+#include "Editor.h"
+
+Transaction::Transaction(const char* t) : MvTransaction(t)
+{
+}
+Transaction::Transaction(MvTransaction* t) : MvTransaction(t)
+{
+}
+
+Transaction::~Transaction()
+{
+}
+
+
+Transaction::Transaction(const Transaction&)
+{
+}
+
+Transaction& Transaction::operator=(const Transaction&)
+{
+	return *this;
+}
+
+
diff --git a/src/MetviewUI/Transaction.h b/src/MetviewUI/Transaction.h
new file mode 100644
index 0000000..c29d341
--- /dev/null
+++ b/src/MetviewUI/Transaction.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Transaction.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Transaction_H
+#define Transaction_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+#ifndef Metview_H
+#include <XMLabel.h>
+#include <Metview.h>
+#define Metview_H
+#endif
+
+class Transaction : public MvTransaction {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Transaction(const char*);
+	Transaction(MvTransaction*);
+
+// -- Destructor
+
+	~Transaction(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+	virtual MvTransaction *cloneSelf() = 0;
+	virtual void callback(MvRequest&)  = 0;
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Transaction(const Transaction&);
+	Transaction& operator=(const Transaction&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Transaction& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Transaction**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Transaction);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/UIAsk.cc b/src/MetviewUI/UIAsk.cc
new file mode 100755
index 0000000..11f4492
--- /dev/null
+++ b/src/MetviewUI/UIAsk.cc
@@ -0,0 +1,93 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/MessageB.h>
+#include <Xm/TextF.h>
+#include <Xm/LabelG.h>
+#include <Xm/PushBG.h>
+#include <Xm/SeparatoG.h>
+
+
+#include "UIAsk.h"
+
+UIAsk_p UIAsk = (UIAsk_p) NULL;
+
+
+
+void UIAsk_c::create (Widget parent, char *widget_name)
+{
+	Widget children[7];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget button20 = (Widget)NULL;
+	Widget button21 = (Widget)NULL;
+	Widget button22 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Question";
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNtransient, TRUE); ac++;
+	UIAsk = XmCreateDialogShell ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIAsk;
+	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
+	XtSetArg(al[ac], XmNdialogType, XmDIALOG_QUESTION); ac++;
+	XtSetArg(al[ac], XmNmessageAlignment, XmALIGNMENT_CENTER); ac++;
+	XtSetArg(al[ac], XmNdefaultButtonType, XmDIALOG_CANCEL_BUTTON); ac++;
+	form_ = XmCreateMessageBox ( UIAsk, "form_", al, ac );
+	ac = 0;
+	button20 = XmMessageBoxGetChild ( form_, XmDIALOG_CANCEL_BUTTON );
+	button21 = XmMessageBoxGetChild ( form_, XmDIALOG_HELP_BUTTON );
+	label_ = XmMessageBoxGetChild ( form_, XmDIALOG_MESSAGE_LABEL );
+	button22 = XmMessageBoxGetChild ( form_, XmDIALOG_OK_BUTTON );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	XtSetValues ( button21,al, ac );
+	ac = 0;
+	value_ = XmCreateTextField ( form_, "value_", al, ac );
+	XtAddCallback (form_, XmNhelpCallback, helpCB, (XtPointer) this);
+	XtAddCallback (form_, XmNcancelCallback, cancelCB, (XtPointer) this);
+	XtAddCallback (form_, XmNokCallback, okCB, (XtPointer) this);
+	children[ac++] = value_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIAsk_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIAsk_p instance = (UIAsk_p) client_data;
+	instance->helpCB ( widget, call_data );
+}
+
+void UIAsk_c::cancelCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIAsk_p instance = (UIAsk_p) client_data;
+	instance->cancelCB ( widget, call_data );
+}
+
+void UIAsk_c::okCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIAsk_p instance = (UIAsk_p) client_data;
+	instance->okCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIAsk.h b/src/MetviewUI/UIAsk.h
new file mode 100755
index 0000000..c1497a2
--- /dev/null
+++ b/src/MetviewUI/UIAsk.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIAsk_h
+#define _UIAsk_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIAsk_c: public xd_XmDialog_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIAsk;
+	Widget form_;
+	Widget label_;
+	Widget value_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void cancelCB( Widget, XtPointer, XtPointer );
+	virtual void cancelCB( Widget, XtPointer ) = 0;
+	static void okCB( Widget, XtPointer, XtPointer );
+	virtual void okCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIAsk_c *UIAsk_p;
+
+
+extern UIAsk_p UIAsk;
+
+
+#endif
diff --git a/src/MetviewUI/UIBoolLine.cc b/src/MetviewUI/UIBoolLine.cc
new file mode 100755
index 0000000..0f069db
--- /dev/null
+++ b/src/MetviewUI/UIBoolLine.cc
@@ -0,0 +1,87 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ToggleBG.h>
+
+#include <xdclass.h>
+
+class UIBoolLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIBoolLine;
+	Widget on_;
+	Widget off_;
+public:
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIBoolLine_c *UIBoolLine_p;
+
+UIBoolLine_p UIBoolLine = (UIBoolLine_p) NULL;
+
+
+
+void UIBoolLine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[2];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget radioBox1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIBoolLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIBoolLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIBoolLine;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	radioBox1 = XmCreateRadioBox ( UIBoolLine, "radioBox1", al, ac );
+	ac = 0;
+	on_ = XmCreateToggleButtonGadget ( radioBox1, "On", al, ac );
+	off_ = XmCreateToggleButtonGadget ( radioBox1, "Off", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( radioBox1,al, ac );
+	ac = 0;
+	XtAddCallback (radioBox1, XmNentryCallback, activateCB, (XtPointer) this);
+	children[ac++] = on_;
+	children[ac++] = off_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = radioBox1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIBoolLine_c::activateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIBoolLine_p instance = (UIBoolLine_p) client_data;
+	instance->activateCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIBoolLine.h b/src/MetviewUI/UIBoolLine.h
new file mode 100755
index 0000000..52fce2f
--- /dev/null
+++ b/src/MetviewUI/UIBoolLine.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIBoolLine_h
+#define _UIBoolLine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIBoolLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIBoolLine;
+	Widget on_;
+	Widget off_;
+public:
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIBoolLine_c *UIBoolLine_p;
+
+
+extern UIBoolLine_p UIBoolLine;
+
+
+#endif
diff --git a/src/MetviewUI/UICatalogDrawer.cc b/src/MetviewUI/UICatalogDrawer.cc
new file mode 100755
index 0000000..f045ce2
--- /dev/null
+++ b/src/MetviewUI/UICatalogDrawer.cc
@@ -0,0 +1,174 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+
+#include <xdclass.h>
+
+class UICatalogDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UICatalogDrawer;
+	Widget message_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void homeCB( Widget, XtPointer, XtPointer );
+	virtual void homeCB( Widget, XtPointer ) = 0;
+	static void grabCatalogCB( Widget, XtPointer, XtPointer );
+	virtual void grabCatalogCB( Widget, XtPointer ) = 0;
+	static void inCatalogCB( Widget, XtPointer, XtPointer );
+	virtual void inCatalogCB( Widget, XtPointer ) = 0;
+	static void topCatalogCB( Widget, XtPointer, XtPointer );
+	virtual void topCatalogCB( Widget, XtPointer ) = 0;
+};
+
+typedef UICatalogDrawer_c *UICatalogDrawer_p;
+
+UICatalogDrawer_p UICatalogDrawer = (UICatalogDrawer_p) NULL;
+
+
+
+void UICatalogDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XrmValue from_value, to_value; /* For resource conversion */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget rowcol1 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "MARS Catalogue";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UICatalogDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UICatalogDrawer;
+	XtSetArg(al[ac], XmNnumColumns, 2); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_COLUMN); ac++;
+	rowcol1 = XmCreateRowColumn ( UICatalogDrawer, "rowcol1", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringCreateLtoR ( "MARS home page", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button4 = XmCreatePushButton ( rowcol1, "button4", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Open the MARS catalogue", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button1 = XmCreatePushButton ( rowcol1, "button1", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Find the current settings in the catalogue", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button3 = XmCreatePushButton ( rowcol1, "button3", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Grab request from current page", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button2 = XmCreatePushButton ( rowcol1, "button2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( " ", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
+	from_value.addr = "-*-*-bold-i-*-*-14-*-*-*-*-*-*-*" ;
+	from_value.size = strlen( from_value.addr ) + 1;
+	to_value.addr = NULL;
+	XtConvertAndStore (UICatalogDrawer, XmRString, &from_value, XmRFontList, &to_value);
+	if ( to_value.addr )
+	{
+		XtSetArg(al[ac], XmNfontList, *(unsigned int *)to_value.addr); ac++;
+	}
+	message_ = XmCreateLabel ( UICatalogDrawer, "message_", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, message_); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( rowcol1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( message_,al, ac );
+	ac = 0;
+	XtAddCallback (button4, XmNactivateCallback, homeCB, (XtPointer) this);
+	XtAddCallback (button1, XmNactivateCallback, topCatalogCB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, inCatalogCB, (XtPointer) this);
+//	XtAddCallback (button2, XmNactivateCallback, grabCatalogCB, (XtPointer) this);
+	children[ac++] = button4;
+	children[ac++] = button1;
+	children[ac++] = button3;
+//	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol1;
+	children[ac++] = message_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UICatalogDrawer_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UICatalogDrawer_p instance = (UICatalogDrawer_p) client_data;
+	instance->helpCB ( widget, call_data );
+}
+
+void UICatalogDrawer_c::homeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UICatalogDrawer_p instance = (UICatalogDrawer_p) client_data;
+	instance->homeCB ( widget, call_data );
+}
+
+void UICatalogDrawer_c::grabCatalogCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UICatalogDrawer_p instance = (UICatalogDrawer_p) client_data;
+	instance->grabCatalogCB ( widget, call_data );
+}
+
+void UICatalogDrawer_c::inCatalogCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UICatalogDrawer_p instance = (UICatalogDrawer_p) client_data;
+	instance->inCatalogCB ( widget, call_data );
+}
+
+void UICatalogDrawer_c::topCatalogCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UICatalogDrawer_p instance = (UICatalogDrawer_p) client_data;
+	instance->topCatalogCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UICatalogDrawer.h b/src/MetviewUI/UICatalogDrawer.h
new file mode 100755
index 0000000..35dac00
--- /dev/null
+++ b/src/MetviewUI/UICatalogDrawer.h
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UICatalogDrawer_h
+#define _UICatalogDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UICatalogDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UICatalogDrawer;
+	Widget message_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void homeCB( Widget, XtPointer, XtPointer );
+	virtual void homeCB( Widget, XtPointer ) = 0;
+	static void grabCatalogCB( Widget, XtPointer, XtPointer );
+	virtual void grabCatalogCB( Widget, XtPointer ) = 0;
+	static void inCatalogCB( Widget, XtPointer, XtPointer );
+	virtual void inCatalogCB( Widget, XtPointer ) = 0;
+	static void topCatalogCB( Widget, XtPointer, XtPointer );
+	virtual void topCatalogCB( Widget, XtPointer ) = 0;
+};
+
+typedef UICatalogDrawer_c *UICatalogDrawer_p;
+
+
+extern UICatalogDrawer_p UICatalogDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIColorHelp.cc b/src/MetviewUI/UIColorHelp.cc
new file mode 100755
index 0000000..e8232d1
--- /dev/null
+++ b/src/MetviewUI/UIColorHelp.cc
@@ -0,0 +1,235 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/List.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Scale.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/TextF.h>
+
+#include <xdclass.h>
+
+class UIColorHelp_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColorHelp;
+	Widget list_;
+	Widget red_;
+	Widget green_;
+	Widget blue_;
+	Widget hue_;
+	Widget saturation_;
+	Widget lightness_;
+	Widget sample_;
+	Widget text_;
+public:
+	static void hslCB( Widget, XtPointer, XtPointer );
+	virtual void hslCB( Widget, XtPointer ) = 0;
+	static void addCB( Widget, XtPointer, XtPointer );
+	virtual void addCB( Widget, XtPointer ) = 0;
+	static void rgbCB( Widget, XtPointer, XtPointer );
+	virtual void rgbCB( Widget, XtPointer ) = 0;
+	static void extendedCB( Widget, XtPointer, XtPointer );
+	virtual void extendedCB( Widget, XtPointer ) = 0;
+	static void multipleCB( Widget, XtPointer, XtPointer );
+	virtual void multipleCB( Widget, XtPointer ) = 0;
+	static void singleCB( Widget, XtPointer, XtPointer );
+	virtual void singleCB( Widget, XtPointer ) = 0;
+	static void browseCB( Widget, XtPointer, XtPointer );
+	virtual void browseCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIColorHelp_c *UIColorHelp_p;
+
+UIColorHelp_p UIColorHelp = (UIColorHelp_p) NULL;
+
+
+
+void UIColorHelp_c::create (Widget parent, char *widget_name)
+{
+	Widget children[5];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledList1 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget rowcol4 = (Widget)NULL;
+	Widget rowcol5 = (Widget)NULL;
+	Widget rowcol3 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIColorHelp";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIColorHelp = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIColorHelp;
+	XtSetArg(al[ac], XmNvisibleItemCount, 27); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	list_ = XmCreateScrolledList ( UIColorHelp, "list_", al, ac );
+	ac = 0;
+	scrolledList1 = XtParent ( list_ );
+
+	form1 = XmCreateForm ( UIColorHelp, "form1", al, ac );
+	rowcol4 = XmCreateRowColumn ( form1, "rowcol4", al, ac );
+	rowcol5 = XmCreateRowColumn ( rowcol4, "rowcol5", al, ac );
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	red_ = XmCreateScale ( rowcol5, "red_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	green_ = XmCreateScale ( rowcol5, "green_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	blue_ = XmCreateScale ( rowcol5, "blue_", al, ac );
+	ac = 0;
+	rowcol3 = XmCreateRowColumn ( rowcol4, "hsl_form_", al, ac );
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNmaximum, 360); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 0); ac++;
+	hue_ = XmCreateScale ( rowcol3, "hue_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	saturation_ = XmCreateScale ( rowcol3, "saturation_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	lightness_ = XmCreateScale ( rowcol3, "lightness_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 30); ac++;
+	sample_ = XmCreateDrawingArea ( rowcol4, "sample_", al, ac );
+	ac = 0;
+	button1 = XmCreatePushButton ( rowcol4, "<< Add", al, ac );
+	text_ = XmCreateTextField ( rowcol4, "text_", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( scrolledList1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, scrolledList1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( form1,al, ac );
+	ac = 0;
+	XtAddCallback (list_, XmNbrowseSelectionCallback, browseCB, (XtPointer) this);
+	XtAddCallback (list_, XmNsingleSelectionCallback, singleCB, (XtPointer) this);
+	XtAddCallback (list_, XmNmultipleSelectionCallback, multipleCB, (XtPointer) this);
+	XtAddCallback (list_, XmNextendedSelectionCallback, extendedCB, (XtPointer) this);
+	XtManageChild(list_);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol4,al, ac );
+	ac = 0;
+	XtAddCallback (red_, XmNvalueChangedCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (green_, XmNvalueChangedCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (blue_, XmNvalueChangedCallback, rgbCB, (XtPointer) this);
+	children[ac++] = red_;
+	children[ac++] = green_;
+	children[ac++] = blue_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (hue_, XmNvalueChangedCallback, hslCB, (XtPointer) this);
+	XtAddCallback (saturation_, XmNvalueChangedCallback, hslCB, (XtPointer) this);
+	XtAddCallback (lightness_, XmNvalueChangedCallback, hslCB, (XtPointer) this);
+	children[ac++] = hue_;
+	children[ac++] = saturation_;
+	children[ac++] = lightness_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, addCB, (XtPointer) this);
+	children[ac++] = rowcol5;
+	children[ac++] = rowcol3;
+	children[ac++] = sample_;
+	children[ac++] = button1;
+	children[ac++] = text_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIColorHelp_c::hslCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->hslCB ( widget, call_data );
+}
+
+void UIColorHelp_c::addCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->addCB ( widget, call_data );
+}
+
+void UIColorHelp_c::rgbCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->rgbCB ( widget, call_data );
+}
+
+void UIColorHelp_c::extendedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->extendedCB ( widget, call_data );
+}
+
+void UIColorHelp_c::multipleCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->multipleCB ( widget, call_data );
+}
+
+void UIColorHelp_c::singleCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->singleCB ( widget, call_data );
+}
+
+void UIColorHelp_c::browseCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorHelp_p instance = (UIColorHelp_p) client_data;
+	instance->browseCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIColorHelp.h b/src/MetviewUI/UIColorHelp.h
new file mode 100755
index 0000000..7e82469
--- /dev/null
+++ b/src/MetviewUI/UIColorHelp.h
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIColorHelp_h
+#define _UIColorHelp_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIColorHelp_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColorHelp;
+	Widget list_;
+	Widget red_;
+	Widget green_;
+	Widget blue_;
+	Widget hue_;
+	Widget saturation_;
+	Widget lightness_;
+	Widget sample_;
+	Widget text_;
+public:
+	static void hslCB( Widget, XtPointer, XtPointer );
+	virtual void hslCB( Widget, XtPointer ) = 0;
+	static void addCB( Widget, XtPointer, XtPointer );
+	virtual void addCB( Widget, XtPointer ) = 0;
+	static void rgbCB( Widget, XtPointer, XtPointer );
+	virtual void rgbCB( Widget, XtPointer ) = 0;
+	static void extendedCB( Widget, XtPointer, XtPointer );
+	virtual void extendedCB( Widget, XtPointer ) = 0;
+	static void multipleCB( Widget, XtPointer, XtPointer );
+	virtual void multipleCB( Widget, XtPointer ) = 0;
+	static void singleCB( Widget, XtPointer, XtPointer );
+	virtual void singleCB( Widget, XtPointer ) = 0;
+	static void browseCB( Widget, XtPointer, XtPointer );
+	virtual void browseCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIColorHelp_c *UIColorHelp_p;
+
+
+extern UIColorHelp_p UIColorHelp;
+
+
+#endif
diff --git a/src/MetviewUI/UIColorLine.cc b/src/MetviewUI/UIColorLine.cc
new file mode 100755
index 0000000..0800871
--- /dev/null
+++ b/src/MetviewUI/UIColorLine.cc
@@ -0,0 +1,71 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Colors.h>
+
+#include <xdclass.h>
+
+class UIColorLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColorLine;
+	Widget colors_;
+};
+
+typedef UIColorLine_c *UIColorLine_p;
+
+UIColorLine_p UIColorLine = (UIColorLine_p) NULL;
+
+
+
+void UIColorLine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UIColorLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIColorLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIColorLine;
+	XtSetArg(al[ac], XmNwidth, 250); ac++;
+	XtSetArg(al[ac], XmNheight, 32); ac++;
+	colors_ = XtCreateWidget("colors_", colorsWidgetClass, UIColorLine, al, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( colors_,al, ac );
+	ac = 0;
+	children[ac++] = colors_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
diff --git a/src/MetviewUI/UIColorLine.h b/src/MetviewUI/UIColorLine.h
new file mode 100755
index 0000000..1e38787
--- /dev/null
+++ b/src/MetviewUI/UIColorLine.h
@@ -0,0 +1,34 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIColorLine_h
+#define _UIColorLine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIColorLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColorLine;
+	Widget colors_;
+};
+
+typedef UIColorLine_c *UIColorLine_p;
+
+
+extern UIColorLine_p UIColorLine;
+
+
+#endif
diff --git a/src/MetviewUI/UIColorName.cc b/src/MetviewUI/UIColorName.cc
new file mode 100755
index 0000000..a3bc168
--- /dev/null
+++ b/src/MetviewUI/UIColorName.cc
@@ -0,0 +1,93 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+
+#include <xdclass.h>
+
+class UIColorName_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColorName;
+	Widget colour_;
+	Widget name_;
+public:
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIColorName_c *UIColorName_p;
+
+UIColorName_p UIColorName = (UIColorName_p) NULL;
+
+
+
+void UIColorName_c::create (Widget parent, char *widget_name)
+{
+	Widget children[2];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget rowcol4 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIColorName";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIColorName = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIColorName;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	rowcol4 = XmCreateRowColumn ( UIColorName, "rowcol4", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 32); ac++;
+	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
+	XtSetArg(al[ac], XmNrecomputeSize, FALSE); ac++;
+	colour_ = XmCreatePushButton ( rowcol4, "colour_", al, ac );
+	ac = 0;
+	name_ = XmCreateLabel ( rowcol4, "name_", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol4,al, ac );
+	ac = 0;
+	XtAddCallback (colour_, XmNactivateCallback, activateCB, (XtPointer) this);
+	children[ac++] = colour_;
+	children[ac++] = name_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol4;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIColorName_c::activateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColorName_p instance = (UIColorName_p) client_data;
+	instance->activateCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIColorName.h b/src/MetviewUI/UIColorName.h
new file mode 100755
index 0000000..1d79e67
--- /dev/null
+++ b/src/MetviewUI/UIColorName.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIColorName_h
+#define _UIColorName_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIColorName_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColorName;
+	Widget colour_;
+	Widget name_;
+public:
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIColorName_c *UIColorName_p;
+
+
+extern UIColorName_p UIColorName;
+
+
+#endif
diff --git a/src/MetviewUI/UIColourEditor.cc b/src/MetviewUI/UIColourEditor.cc
new file mode 100755
index 0000000..2968692
--- /dev/null
+++ b/src/MetviewUI/UIColourEditor.cc
@@ -0,0 +1,333 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Scale.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Tab.h>
+
+#include <xdclass.h>
+
+class UIColourEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColourEditor;
+	Widget old_;
+	Widget new_;
+	Widget tab_;
+	Widget names_;
+	Widget r_;
+	Widget rr_;
+	Widget g_;
+	Widget gg_;
+	Widget b_;
+	Widget bb_;
+	Widget h_;
+	Widget hh_;
+	Widget s_;
+	Widget ss_;
+	Widget l_;
+	Widget ll_;
+public:
+	static void tabCB( Widget, XtPointer, XtPointer );
+	virtual void tabCB( Widget, XtPointer ) = 0;
+	static void exposeCB( Widget, XtPointer, XtPointer );
+	virtual void exposeCB( Widget, XtPointer ) = 0;
+	static void hslCB( Widget, XtPointer, XtPointer );
+	virtual void hslCB( Widget, XtPointer ) = 0;
+	static void rgbCB( Widget, XtPointer, XtPointer );
+	virtual void rgbCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIColourEditor_c *UIColourEditor_p;
+
+UIColourEditor_p UIColourEditor = (UIColourEditor_p) NULL;
+
+
+
+void UIColourEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[6];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget frame1 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget form2 = (Widget)NULL;
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+	Widget form3 = (Widget)NULL;
+	Widget rowcol1 = (Widget)NULL;
+	Widget form4 = (Widget)NULL;
+	Widget rowcol2 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIColourEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIColourEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIColourEditor;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	frame1 = XmCreateFrame ( UIColourEditor, "frame1", al, ac );
+	ac = 0;
+	form1 = XmCreateForm ( frame1, "form1", al, ac );
+	XtSetArg(al[ac], XmNheight, 80); ac++;
+	old_ = XmCreateDrawingArea ( form1, "old_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 80); ac++;
+	new_ = XmCreateDrawingArea ( form1, "new_", al, ac );
+	ac = 0;
+	tab_ = XtCreateWidget("tab_", tabWidgetClass, UIColourEditor, al, ac);
+	form2 = XmCreateForm ( tab_, "MAGICS", al, ac );
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( form2, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2 ); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	names_ = XmCreateRowColumn ( scrolledWin1, "names_", al, ac );
+	form3 = XmCreateForm ( tab_, "RGB", al, ac );
+	rowcol1 = XmCreateRowColumn ( form3, "rowcol1", al, ac );
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 3); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	r_ = XmCreateScale ( rowcol1, "r_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 20); ac++;
+	rr_ = XmCreateDrawingArea ( rowcol1, "rr_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 55); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	g_ = XmCreateScale ( rowcol1, "g_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 20); ac++;
+	gg_ = XmCreateDrawingArea ( rowcol1, "gg_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 107); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	b_ = XmCreateScale ( rowcol1, "b_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 20); ac++;
+	bb_ = XmCreateDrawingArea ( rowcol1, "bb_", al, ac );
+	ac = 0;
+	form4 = XmCreateForm ( tab_, "HSL", al, ac );
+	rowcol2 = XmCreateRowColumn ( form4, "rowcol2", al, ac );
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 3); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNmaximum, 360); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	h_ = XmCreateScale ( rowcol2, "h_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 20); ac++;
+	hh_ = XmCreateDrawingArea ( rowcol2, "hh_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 65); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	s_ = XmCreateScale ( rowcol2, "s_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 20); ac++;
+	ss_ = XmCreateDrawingArea ( rowcol2, "ss_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 127); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNdecimalPoints, 2); ac++;
+	l_ = XmCreateScale ( rowcol2, "l_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 256); ac++;
+	XtSetArg(al[ac], XmNheight, 20); ac++;
+	ll_ = XmCreateDrawingArea ( rowcol2, "ll_", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, frame1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( tab_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNrightPosition, 50); ac++;
+	XtSetValues ( old_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNleftPosition, 50); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( new_,al, ac );
+	ac = 0;
+	children[ac++] = old_;
+	children[ac++] = new_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (tab_, XmNvalueChangedCallback, tabCB, (XtPointer) this);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledWin1,al, ac );
+	ac = 0;
+	children[ac++] = names_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, names_ );
+	children[ac++] = scrolledWin1;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 40); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 80); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( rowcol1,al, ac );
+	ac = 0;
+	XtAddCallback (r_, XmNdragCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (r_, XmNvalueChangedCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (rr_, XmNexposeCallback, exposeCB, (XtPointer) this);
+	XtAddCallback (g_, XmNdragCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (g_, XmNvalueChangedCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (gg_, XmNexposeCallback, exposeCB, (XtPointer) this);
+	XtAddCallback (b_, XmNdragCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (b_, XmNvalueChangedCallback, rgbCB, (XtPointer) this);
+	XtAddCallback (bb_, XmNexposeCallback, exposeCB, (XtPointer) this);
+	children[ac++] = r_;
+	children[ac++] = rr_;
+	children[ac++] = g_;
+	children[ac++] = gg_;
+	children[ac++] = b_;
+	children[ac++] = bb_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol1;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 40); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 80); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( rowcol2,al, ac );
+	ac = 0;
+	XtAddCallback (h_, XmNdragCallback, hslCB, (XtPointer) this);
+	XtAddCallback (h_, XmNvalueChangedCallback, hslCB, (XtPointer) this);
+	XtAddCallback (hh_, XmNexposeCallback, exposeCB, (XtPointer) this);
+	XtAddCallback (s_, XmNdragCallback, hslCB, (XtPointer) this);
+	XtAddCallback (s_, XmNvalueChangedCallback, hslCB, (XtPointer) this);
+	XtAddCallback (ss_, XmNexposeCallback, exposeCB, (XtPointer) this);
+	XtAddCallback (l_, XmNdragCallback, hslCB, (XtPointer) this);
+	XtAddCallback (l_, XmNvalueChangedCallback, hslCB, (XtPointer) this);
+	XtAddCallback (ll_, XmNexposeCallback, exposeCB, (XtPointer) this);
+	children[ac++] = h_;
+	children[ac++] = hh_;
+	children[ac++] = s_;
+	children[ac++] = ss_;
+	children[ac++] = l_;
+	children[ac++] = ll_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form2;
+	children[ac++] = form3;
+	children[ac++] = form4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame1;
+	children[ac++] = tab_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIColourEditor_c::tabCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColourEditor_p instance = (UIColourEditor_p) client_data;
+	instance->tabCB ( widget, call_data );
+}
+
+void UIColourEditor_c::exposeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColourEditor_p instance = (UIColourEditor_p) client_data;
+	instance->exposeCB ( widget, call_data );
+}
+
+void UIColourEditor_c::hslCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColourEditor_p instance = (UIColourEditor_p) client_data;
+	instance->hslCB ( widget, call_data );
+}
+
+void UIColourEditor_c::rgbCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIColourEditor_p instance = (UIColourEditor_p) client_data;
+	instance->rgbCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIColourEditor.h b/src/MetviewUI/UIColourEditor.h
new file mode 100755
index 0000000..4932f27
--- /dev/null
+++ b/src/MetviewUI/UIColourEditor.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIColourEditor_h
+#define _UIColourEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIColourEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIColourEditor;
+	Widget old_;
+	Widget new_;
+	Widget tab_;
+	Widget names_;
+	Widget r_;
+	Widget rr_;
+	Widget g_;
+	Widget gg_;
+	Widget b_;
+	Widget bb_;
+	Widget h_;
+	Widget hh_;
+	Widget s_;
+	Widget ss_;
+	Widget l_;
+	Widget ll_;
+public:
+	static void tabCB( Widget, XtPointer, XtPointer );
+	virtual void tabCB( Widget, XtPointer ) = 0;
+	static void exposeCB( Widget, XtPointer, XtPointer );
+	virtual void exposeCB( Widget, XtPointer ) = 0;
+	static void hslCB( Widget, XtPointer, XtPointer );
+	virtual void hslCB( Widget, XtPointer ) = 0;
+	static void rgbCB( Widget, XtPointer, XtPointer );
+	virtual void rgbCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIColourEditor_c *UIColourEditor_p;
+
+
+extern UIColourEditor_p UIColourEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UIConfirm.cc b/src/MetviewUI/UIConfirm.cc
new file mode 100755
index 0000000..605d811
--- /dev/null
+++ b/src/MetviewUI/UIConfirm.cc
@@ -0,0 +1,88 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/MessageB.h>
+#include <Xm/LabelG.h>
+#include <Xm/PushBG.h>
+#include <Xm/SeparatoG.h>
+
+
+#include "UIConfirm.h"
+
+UIConfirm_p UIConfirm = (UIConfirm_p) NULL;
+
+
+
+void UIConfirm_c::create (Widget parent, char *widget_name)
+{
+	Widget children[6];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget button20 = (Widget)NULL;
+	Widget button21 = (Widget)NULL;
+	Widget button22 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Confirm";
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNtransient, TRUE); ac++;
+	UIConfirm = XmCreateDialogShell ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIConfirm;
+	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
+	XtSetArg(al[ac], XmNdialogType, XmDIALOG_QUESTION); ac++;
+	XtSetArg(al[ac], XmNmessageAlignment, XmALIGNMENT_CENTER); ac++;
+	XtSetArg(al[ac], XmNdefaultButtonType, XmDIALOG_CANCEL_BUTTON); ac++;
+	form_ = XmCreateMessageBox ( UIConfirm, "form_", al, ac );
+	ac = 0;
+	button20 = XmMessageBoxGetChild ( form_, XmDIALOG_CANCEL_BUTTON );
+	button21 = XmMessageBoxGetChild ( form_, XmDIALOG_HELP_BUTTON );
+	label_ = XmMessageBoxGetChild ( form_, XmDIALOG_MESSAGE_LABEL );
+	button22 = XmMessageBoxGetChild ( form_, XmDIALOG_OK_BUTTON );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	XtSetValues ( button21,al, ac );
+	ac = 0;
+	XtAddCallback (form_, XmNokCallback, okCB, (XtPointer) this);
+	XtAddCallback (form_, XmNcancelCallback, cancelCB, (XtPointer) this);
+	XtAddCallback (form_, XmNhelpCallback, helpCB, (XtPointer) this);
+}
+
+void UIConfirm_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIConfirm_p instance = (UIConfirm_p) client_data;
+	instance->helpCB ( widget, call_data );
+}
+
+void UIConfirm_c::cancelCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIConfirm_p instance = (UIConfirm_p) client_data;
+	instance->cancelCB ( widget, call_data );
+}
+
+void UIConfirm_c::okCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIConfirm_p instance = (UIConfirm_p) client_data;
+	instance->okCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIConfirm.h b/src/MetviewUI/UIConfirm.h
new file mode 100755
index 0000000..bf35d2b
--- /dev/null
+++ b/src/MetviewUI/UIConfirm.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIConfirm_h
+#define _UIConfirm_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIConfirm_c: public xd_XmDialog_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIConfirm;
+	Widget form_;
+	Widget label_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void cancelCB( Widget, XtPointer, XtPointer );
+	virtual void cancelCB( Widget, XtPointer ) = 0;
+	static void okCB( Widget, XtPointer, XtPointer );
+	virtual void okCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIConfirm_c *UIConfirm_p;
+
+
+extern UIConfirm_p UIConfirm;
+
+
+#endif
diff --git a/src/MetviewUI/UIEditor.cc b/src/MetviewUI/UIEditor.cc
new file mode 100755
index 0000000..3b930d3
--- /dev/null
+++ b/src/MetviewUI/UIEditor.cc
@@ -0,0 +1,256 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/TextF.h>
+#include <Xm/ToggleB.h>
+#include <Tab.h>
+
+#include <Xm/Protocols.h>
+#include "UIEditor.h"
+
+UIEditor_p UIEditor = (UIEditor_p) NULL;
+
+
+
+void UIEditor_c::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
+{
+	Widget children[5];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget frame2 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget frame3 = (Widget)NULL;
+	Widget form3 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+
+	if ( !app_class_name )
+		app_class_name = "XApplication";
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	UIEditor = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIEditor;
+	XmAddWMProtocolCallback( UIEditor, XmInternAtom(XtDisplay(UIEditor), "WM_DELETE_WINDOW", False), closeCB, (XtPointer) this);
+	XtSetArg(al[ac], XmNwidth, 500); ac++;
+	XtSetArg(al[ac], XmNheight, 600); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form_ = XmCreateForm ( UIEditor, "form_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNdrawer, TRUE); ac++;
+	drawer_ = XtCreateWidget("drawer_", tabWidgetClass, form_, al, ac);
+	ac = 0;
+	main_ = XmCreateFrame ( form_, "main_", al, ac );
+	frame2 = XmCreateFrame ( form_, "frame2", al, ac );
+	form1 = XmCreateForm ( frame2, "form1", al, ac );
+	XtSetArg(al[ac], XmNwidth, 32); ac++;
+	XtSetArg(al[ac], XmNheight, 32); ac++;
+	XtSetArg(al[ac], XmNhighlightThickness, 0); ac++;
+	XtSetArg(al[ac], XmNshadowThickness, 0); ac++;
+	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
+	icon_ = XmCreatePushButton ( form1, "icon_", al, ac );
+	ac = 0;
+	name_ = XmCreateTextField ( form1, "name_", al, ac );
+	frame3 = XmCreateFrame ( form_, "frame3", al, ac );
+	form3 = XmCreateForm ( frame3, "form3", al, ac );
+	button1 = XmCreatePushButton ( form3, "Apply", al, ac );
+	button2 = XmCreatePushButton ( form3, "Reset", al, ac );
+	button3 = XmCreatePushButton ( form3, "Close", al, ac );
+	stay_ = XmCreateToggleButton ( form3, "Stay open", al, ac );
+	XtSetArg(al[ac], XmNspacing, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	tool_ = XmCreateRowColumn ( form_, "tool_", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, frame3); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( drawer_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, tool_); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, drawer_); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( main_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( frame2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( frame3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, frame2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( tool_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetValues ( icon_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftWidget, icon_); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
+	XtSetValues ( name_,al, ac );
+	ac = 0;
+	XtAddCallback (icon_, XmNactivateCallback, textEditorCB, (XtPointer) this);
+	children[ac++] = icon_;
+	children[ac++] = name_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetValues ( button1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftWidget, button1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( button2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
+	XtSetValues ( button3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftWidget, button2); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( stay_,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, applyCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, resetCB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, closeCB, (XtPointer) this);
+	children[ac++] = button1;
+	children[ac++] = button2;
+	children[ac++] = button3;
+	children[ac++] = stay_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drawer_;
+	children[ac++] = main_;
+	children[ac++] = frame2;
+	children[ac++] = frame3;
+	children[ac++] = tool_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form_);
+}
+
+void UIEditor_c::textEditorCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIEditor_p instance = (UIEditor_p) client_data;
+	instance->textEditorCB ( widget, call_data );
+}
+
+void UIEditor_c::resetCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIEditor_p instance = (UIEditor_p) client_data;
+	instance->resetCB ( widget, call_data );
+}
+
+void UIEditor_c::applyCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIEditor_p instance = (UIEditor_p) client_data;
+	instance->applyCB ( widget, call_data );
+}
+
+void UIEditor_c::closeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIEditor_p instance = (UIEditor_p) client_data;
+	instance->closeCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIEditor.h b/src/MetviewUI/UIEditor.h
new file mode 100755
index 0000000..b68385c
--- /dev/null
+++ b/src/MetviewUI/UIEditor.h
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIEditor_h
+#define _UIEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIEditor_c: public xd_ApplicationShell_c {
+public:
+	virtual void create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name = NULL);
+protected:
+	Widget UIEditor;
+	Widget form_;
+	Widget drawer_;
+	Widget main_;
+	Widget icon_;
+	Widget name_;
+	Widget stay_;
+	Widget tool_;
+public:
+	static void textEditorCB( Widget, XtPointer, XtPointer );
+	virtual void textEditorCB( Widget, XtPointer ) = 0;
+	static void resetCB( Widget, XtPointer, XtPointer );
+	virtual void resetCB( Widget, XtPointer ) = 0;
+	static void applyCB( Widget, XtPointer, XtPointer );
+	virtual void applyCB( Widget, XtPointer ) = 0;
+	static void closeCB( Widget, XtPointer, XtPointer );
+	virtual void closeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIEditor_c *UIEditor_p;
+
+
+extern UIEditor_p UIEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UIFamilyEditor.cc b/src/MetviewUI/UIFamilyEditor.cc
new file mode 100755
index 0000000..938006d
--- /dev/null
+++ b/src/MetviewUI/UIFamilyEditor.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Tab.h>
+
+#include <xdclass.h>
+
+class UIFamilyEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIFamilyEditor;
+	Widget tab_;
+public:
+	static void familyCB( Widget, XtPointer, XtPointer );
+	virtual void familyCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIFamilyEditor_c *UIFamilyEditor_p;
+
+UIFamilyEditor_p UIFamilyEditor = (UIFamilyEditor_p) NULL;
+
+
+
+void UIFamilyEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UIFamilyEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIFamilyEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIFamilyEditor;
+	tab_ = XtCreateWidget("tab_", tabWidgetClass, UIFamilyEditor, al, ac);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( tab_,al, ac );
+	ac = 0;
+	XtAddCallback (tab_, XmNvalueChangedCallback, familyCB, (XtPointer) this);
+	children[ac++] = tab_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIFamilyEditor_c::familyCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFamilyEditor_p instance = (UIFamilyEditor_p) client_data;
+	instance->familyCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIFamilyEditor.h b/src/MetviewUI/UIFamilyEditor.h
new file mode 100755
index 0000000..b1aa1a4
--- /dev/null
+++ b/src/MetviewUI/UIFamilyEditor.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIFamilyEditor_h
+#define _UIFamilyEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIFamilyEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIFamilyEditor;
+	Widget tab_;
+public:
+	static void familyCB( Widget, XtPointer, XtPointer );
+	virtual void familyCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIFamilyEditor_c *UIFamilyEditor_p;
+
+
+extern UIFamilyEditor_p UIFamilyEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UIFileSelection.cc b/src/MetviewUI/UIFileSelection.cc
new file mode 100755
index 0000000..b2746ed
--- /dev/null
+++ b/src/MetviewUI/UIFileSelection.cc
@@ -0,0 +1,89 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/FileSB.h>
+#include <Xm/Label.h>
+#include <Xm/List.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/SelectioB.h>
+#include <Xm/TextF.h>
+#include <Xm/LabelG.h>
+#include <Xm/PushBG.h>
+#include <Xm/SeparatoG.h>
+
+
+#include "UIFileSelection.h"
+
+UIFileSelection_p UIFileSelection = (UIFileSelection_p) NULL;
+
+
+
+void UIFileSelection_c::create (Widget parent, char *widget_name)
+{
+	Widget children[14];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget button42 = (Widget)NULL;
+	Widget button44 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIFileSelection";
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	UIFileSelection = XmCreateDialogShell ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIFileSelection;
+	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
+	form_ = XmCreateFileSelectionBox ( UIFileSelection, "form_", al, ac );
+	ac = 0;
+	button42 = XmSelectionBoxGetChild ( form_, XmDIALOG_CANCEL_BUTTON );
+	button44 = XmSelectionBoxGetChild ( form_, XmDIALOG_OK_BUTTON );
+
+
+	label_ = XmCreateLabel ( form_, "label_", al, ac );
+	XtAddCallback (form_, XmNokCallback, okCB, (XtPointer) this);
+	XtAddCallback (form_, XmNcancelCallback, cancelCB, (XtPointer) this);
+	XtAddCallback (form_, XmNhelpCallback, helpCB, (XtPointer) this);
+	children[ac++] = label_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIFileSelection_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFileSelection_p instance = (UIFileSelection_p) client_data;
+	instance->helpCB ( widget, call_data );
+}
+
+void UIFileSelection_c::cancelCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFileSelection_p instance = (UIFileSelection_p) client_data;
+	instance->cancelCB ( widget, call_data );
+}
+
+void UIFileSelection_c::okCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFileSelection_p instance = (UIFileSelection_p) client_data;
+	instance->okCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIFileSelection.h b/src/MetviewUI/UIFileSelection.h
new file mode 100755
index 0000000..124ac84
--- /dev/null
+++ b/src/MetviewUI/UIFileSelection.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIFileSelection_h
+#define _UIFileSelection_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIFileSelection_c: public xd_XmDialog_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIFileSelection;
+	Widget form_;
+	Widget label_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void cancelCB( Widget, XtPointer, XtPointer );
+	virtual void cancelCB( Widget, XtPointer ) = 0;
+	static void okCB( Widget, XtPointer, XtPointer );
+	virtual void okCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIFileSelection_c *UIFileSelection_p;
+
+
+extern UIFileSelection_p UIFileSelection;
+
+
+#endif
diff --git a/src/MetviewUI/UIFolderWindow.cc b/src/MetviewUI/UIFolderWindow.cc
new file mode 100755
index 0000000..6435636
--- /dev/null
+++ b/src/MetviewUI/UIFolderWindow.cc
@@ -0,0 +1,490 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/CascadeB.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+#include <Tab.h>
+
+#include <Xm/Protocols.h>
+#include "UIFolderWindow.h"
+
+UIFolderWindow_p UIFolderWindow = (UIFolderWindow_p) NULL;
+
+
+
+void UIFolderWindow_c::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
+{
+	Widget children[13];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XrmValue from_value, to_value; /* For resource conversion */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget separator2 = (Widget)NULL;
+	Widget button10 = (Widget)NULL;
+	Widget button11 = (Widget)NULL;
+	Widget button13 = (Widget)NULL;
+	Widget button14 = (Widget)NULL;
+	Widget button101 = (Widget)NULL;
+	Widget separator5 = (Widget)NULL;
+	Widget button12 = (Widget)NULL;
+	Widget button15 = (Widget)NULL;
+	Widget button16 = (Widget)NULL;
+	Widget button6 = (Widget)NULL;
+	Widget separator4 = (Widget)NULL;
+	Widget button5 = (Widget)NULL;
+	Widget button8 = (Widget)NULL;
+	Widget button9 = (Widget)NULL;
+	Widget separator7 = (Widget)NULL;
+	Widget button22 = (Widget)NULL;
+	Widget button24 = (Widget)NULL;
+	Widget separator10 = (Widget)NULL;
+	Widget button20 = (Widget)NULL;
+	Widget separator9 = (Widget)NULL;
+	Widget button21 = (Widget)NULL;
+	Widget button17 = (Widget)NULL;
+	Widget menuBar1 = (Widget)NULL;
+	Widget cascade1 = (Widget)NULL;
+	Widget menu1 = (Widget)NULL;
+	Widget button18 = (Widget)NULL;
+	Widget separator8 = (Widget)NULL;
+	Widget button23 = (Widget)NULL;
+	Widget separator11 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget cascade3 = (Widget)NULL;
+	Widget menu2 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget separator3 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button19 = (Widget)NULL;
+	Widget separator6 = (Widget)NULL;
+	Widget button7 = (Widget)NULL;
+	Widget cascade5 = (Widget)NULL;
+	Widget cascade4 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget menu3 = (Widget)NULL;
+	Widget button25 = (Widget)NULL;
+	Widget separator12 = (Widget)NULL;
+	Widget button26 = (Widget)NULL;
+	Widget button27 = (Widget)NULL;
+	Widget button28 = (Widget)NULL;
+	Widget button31 = (Widget)NULL;
+	Widget separator13 = (Widget)NULL;
+	Widget button29 = (Widget)NULL;
+	Widget button30 = (Widget)NULL;
+
+	if ( !app_class_name )
+		app_class_name = "XApplication";
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	UIFolderWindow = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIFolderWindow;
+	XmAddWMProtocolCallback( UIFolderWindow, XmInternAtom(XtDisplay(UIFolderWindow), "WM_DELETE_WINDOW", False), closeCB, (XtPointer) this);
+	XtSetArg(al[ac], XmNwidth, 500); ac++;
+	XtSetArg(al[ac], XmNheight, 500); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form_ = XmCreateForm ( UIFolderWindow, "form_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNshadowThickness, 0); ac++;
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( form_, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2 ); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoPlace, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditNames, TRUE); ac++;
+	XtSetArg(al[ac], XmNwidth, 20000); ac++;
+	XtSetArg(al[ac], XmNheight, 20000); ac++;
+	XtSetArg(al[ac], XmNtraversalOn, TRUE); ac++;
+	XtSetArg(al[ac], XmNnavigationType, XmTAB_GROUP); ac++;
+	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(display)) != 1) {
+	from_value.addr = "red" ;
+	from_value.size = strlen( from_value.addr ) + 1;
+	to_value.addr = NULL;
+	XtConvertAndStore (scrolledWin1, XmRString, &from_value, XmRPixel, &to_value);
+	if ( to_value.addr )
+	{
+		XtSetArg(al[ac], XmNhighlightColor, *(unsigned int *)to_value.addr); ac++;
+	}
+	}
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, scrolledWin1, al, ac);
+	ac = 0;
+	commands_ = XmCreatePopupMenu ( drag_, "commands_", al, ac );
+	label1 = XmCreateLabel ( commands_, "title", al, ac );
+	separator2 = XmCreateSeparator ( commands_, "separator2", al, ac );
+	button10 = XmCreatePushButton ( commands_, "execute", al, ac );
+	button11 = XmCreatePushButton ( commands_, "visualise", al, ac );
+	button13 = XmCreatePushButton ( commands_, "examine", al, ac );
+	button14 = XmCreatePushButton ( commands_, "save", al, ac );
+	button101 = XmCreatePushButton ( commands_, "analyse", al, ac );
+	separator5 = XmCreateSeparator ( commands_, "separator5", al, ac );
+	button12 = XmCreatePushButton ( commands_, "edit", al, ac );
+	button15 = XmCreatePushButton ( commands_, "duplicate", al, ac );
+	button16 = XmCreatePushButton ( commands_, "delete", al, ac );
+	button6 = XmCreatePushButton ( commands_, "empty", al, ac );
+	separator4 = XmCreateSeparator ( commands_, "separator4", al, ac );
+	button5 = XmCreatePushButton ( commands_, "output", al, ac );
+	menu_ = XmCreatePopupMenu ( drag_, "menu_", al, ac );
+	button8 = XmCreatePushButton ( menu_, "New icon...", al, ac );
+	button9 = XmCreatePushButton ( menu_, "New link...", al, ac );
+	separator7 = XmCreateSeparator ( menu_, "separator7", al, ac );
+	button22 = XmCreatePushButton ( menu_, "Sort by name", al, ac );
+	button24 = XmCreatePushButton ( menu_, "Sort by class", al, ac );
+	separator10 = XmCreateSeparator ( menu_, "separator10", al, ac );
+	button20 = XmCreatePushButton ( menu_, "Rescan folder", al, ac );
+	separator9 = XmCreateSeparator ( menu_, "separator9", al, ac );
+	button21 = XmCreatePushButton ( menu_, "Toggle icon size", al, ac );
+	button17 = XmCreatePushButton ( menu_, "Show last icon created", al, ac );
+	XtSetArg(al[ac], XmNdrawer, TRUE); ac++;
+	drawer_ = XtCreateWidget("drawer_", tabWidgetClass, form_, al, ac);
+	ac = 0;
+	menuBar1 = XmCreateMenuBar ( form_, "menuBar1", al, ac );
+	cascade1 = XmCreateCascadeButton ( menuBar1, "File", al, ac );
+	menu1 = XmCreatePulldownMenu ( menuBar1, "Exit metview", al, ac );
+	button18 = XmCreatePushButton ( menu1, "Preferences...", al, ac );
+	separator8 = XmCreateSeparator ( menu1, "separator8", al, ac );
+	button23 = XmCreatePushButton ( menu1, "Messages...", al, ac );
+	separator11 = XmCreateSeparator ( menu1, "separator11", al, ac );
+	close_ = XmCreatePushButton ( menu1, "Close", al, ac );
+	button2 = XmCreatePushButton ( menu1, "Exit...", al, ac );
+	cascade3 = XmCreateCascadeButton ( menuBar1, "View", al, ac );
+	menu2 = XmCreatePulldownMenu ( menuBar1, "menu2", al, ac );
+	button1 = XmCreatePushButton ( menu2, "Sort by name", al, ac );
+	button3 = XmCreatePushButton ( menu2, "Sort by class", al, ac );
+	separator3 = XmCreateSeparator ( menu2, "separator3", al, ac );
+	button4 = XmCreatePushButton ( menu2, "Toggle icon size", al, ac );
+	button19 = XmCreatePushButton ( menu2, "Rescan folder", al, ac );
+	separator6 = XmCreateSeparator ( menu2, "separator6", al, ac );
+	button7 = XmCreatePushButton ( menu2, "Show last icon created", al, ac );
+	cascade5 = XmCreateCascadeButton ( menuBar1, "Tools", al, ac );
+	tools_ = XmCreatePulldownMenu ( menuBar1, "tools_", al, ac );
+	cascade4 = XmCreateCascadeButton ( menuBar1, "Folders", al, ac );
+	recent_ = XmCreatePulldownMenu ( menuBar1, "recent_", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Main Folder", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	top_ = XmCreatePushButton ( recent_, "/", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Parent Folder", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	up_ = XmCreatePushButton ( recent_, "..", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Defaults", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	defaults_ = XmCreatePushButton ( recent_, "/System/Defaults", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	separator1 = XmCreateSeparator ( recent_, "separator1", al, ac );
+	help_ = XmCreateCascadeButton ( menuBar1, "Help", al, ac );
+	menu3 = XmCreatePulldownMenu ( menuBar1, "menu3", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Index...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button25 = XmCreatePushButton ( menu3, "index", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	separator12 = XmCreateSeparator ( menu3, "separator12", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "User Interface...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button26 = XmCreatePushButton ( menu3, "MetviewUI", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Macro language...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button27 = XmCreatePushButton ( menu3, "Macro", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Applications...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button28 = XmCreatePushButton ( menu3, "applications", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Plot Module...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button31 = XmCreatePushButton ( menu3, "PlotMod", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	separator13 = XmCreateSeparator ( menu3, "separator13", al, ac );
+	XtSetArg(al[ac], XmNinitialResourcesPersistent, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Support...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button29 = XmCreatePushButton ( menu3, "support", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNinitialResourcesPersistent, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Updates...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button30 = XmCreatePushButton ( menu3, "updates", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNmenuHelpWidget, help_); ac++;
+	XtSetValues ( menuBar1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, menuBar1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, drawer_); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledWin1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( drawer_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( menuBar1,al, ac );
+	ac = 0;
+	XtAddCallback (commands_, XmNentryCallback, commandCB, (XtPointer) this);
+	children[ac++] = label1;
+	children[ac++] = separator2;
+	children[ac++] = button10;
+	children[ac++] = button11;
+	children[ac++] = button13;
+	children[ac++] = button14;
+	children[ac++] = button101;
+	children[ac++] = separator5;
+	children[ac++] = button12;
+	children[ac++] = button15;
+	children[ac++] = button16;
+	children[ac++] = button6;
+	children[ac++] = separator4;
+	children[ac++] = button5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button8, XmNactivateCallback, newIconCB, (XtPointer) this);
+	XtAddCallback (button9, XmNactivateCallback, newLinkCB, (XtPointer) this);
+	XtAddCallback (button22, XmNactivateCallback, sortByNameCB, (XtPointer) this);
+	XtAddCallback (button24, XmNactivateCallback, sortByClassCB, (XtPointer) this);
+	XtAddCallback (button20, XmNactivateCallback, rescanCB, (XtPointer) this);
+	XtAddCallback (button21, XmNactivateCallback, toggleSizeCB, (XtPointer) this);
+	XtAddCallback (button17, XmNactivateCallback, showLastCB, (XtPointer) this);
+	children[ac++] = button8;
+	children[ac++] = button9;
+	children[ac++] = separator7;
+	children[ac++] = button22;
+	children[ac++] = button24;
+	children[ac++] = separator10;
+	children[ac++] = button20;
+	children[ac++] = separator9;
+	children[ac++] = button21;
+	children[ac++] = button17;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, drag_ );
+	XtAddCallback (menu1, XmNmapCallback, fileMapCB, (XtPointer) this);
+	XtAddCallback (button18, XmNactivateCallback, prefCB, (XtPointer) this);
+	XtAddCallback (button23, XmNactivateCallback, messagesCB, (XtPointer) this);
+	XtAddCallback (close_, XmNactivateCallback, closeCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, exitCB, (XtPointer) this);
+	children[ac++] = button18;
+	children[ac++] = separator8;
+	children[ac++] = button23;
+	children[ac++] = separator11;
+	children[ac++] = close_;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu1); ac++;
+	XtSetValues ( cascade1, al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, sortByNameCB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, sortByClassCB, (XtPointer) this);
+	XtAddCallback (button4, XmNactivateCallback, toggleSizeCB, (XtPointer) this);
+	XtAddCallback (button19, XmNactivateCallback, rescanCB, (XtPointer) this);
+	XtAddCallback (button7, XmNactivateCallback, showLastCB, (XtPointer) this);
+	children[ac++] = button1;
+	children[ac++] = button3;
+	children[ac++] = separator3;
+	children[ac++] = button4;
+	children[ac++] = button19;
+	children[ac++] = separator6;
+	children[ac++] = button7;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu2); ac++;
+	XtSetValues ( cascade3, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, tools_); ac++;
+	XtSetValues ( cascade5, al, ac );
+	ac = 0;
+	XtAddCallback (recent_, XmNentryCallback, recentCB, (XtPointer) this);
+	children[ac++] = top_;
+	children[ac++] = up_;
+	children[ac++] = separator1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, recent_); ac++;
+	XtSetValues ( cascade4, al, ac );
+	ac = 0;
+	XtAddCallback (menu3, XmNentryCallback, helpMenuCB, (XtPointer) this);
+	children[ac++] = button25;
+	children[ac++] = separator12;
+	children[ac++] = button26;
+	children[ac++] = button27;
+	children[ac++] = button28;
+	children[ac++] = button31;
+	children[ac++] = separator13;
+	children[ac++] = button29;
+	children[ac++] = button30;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu3); ac++;
+	XtSetValues ( help_, al, ac );
+	ac = 0;
+	children[ac++] = cascade1;
+	children[ac++] = cascade3;
+	children[ac++] = cascade5;
+	children[ac++] = cascade4;
+	children[ac++] = help_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = scrolledWin1;
+	children[ac++] = drawer_;
+	children[ac++] = menuBar1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form_);
+}
+
+void UIFolderWindow_c::helpMenuCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->helpMenuCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::messagesCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->messagesCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::rescanCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->rescanCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::toggleSizeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->toggleSizeCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::prefCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->prefCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::newLinkCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->newLinkCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::newIconCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->newIconCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::recentCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->recentCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::showLastCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->showLastCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::sortByClassCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->sortByClassCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::sortByNameCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->sortByNameCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::fileMapCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->fileMapCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::commandCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->commandCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::exitCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->exitCB ( widget, call_data );
+}
+
+void UIFolderWindow_c::closeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIFolderWindow_p instance = (UIFolderWindow_p) client_data;
+	instance->closeCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIFolderWindow.h b/src/MetviewUI/UIFolderWindow.h
new file mode 100755
index 0000000..230fe34
--- /dev/null
+++ b/src/MetviewUI/UIFolderWindow.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIFolderWindow_h
+#define _UIFolderWindow_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIFolderWindow_c: public xd_ApplicationShell_c {
+public:
+	virtual void create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name = NULL);
+protected:
+	Widget UIFolderWindow;
+	Widget form_;
+	Widget drag_;
+	Widget commands_;
+	Widget menu_;
+	Widget drawer_;
+	Widget close_;
+	Widget tools_;
+	Widget recent_;
+	Widget top_;
+	Widget up_;
+	Widget defaults_;
+	Widget help_;
+public:
+	static void helpMenuCB( Widget, XtPointer, XtPointer );
+	virtual void helpMenuCB( Widget, XtPointer ) = 0;
+	static void messagesCB( Widget, XtPointer, XtPointer );
+	virtual void messagesCB( Widget, XtPointer ) = 0;
+	static void rescanCB( Widget, XtPointer, XtPointer );
+	virtual void rescanCB( Widget, XtPointer ) = 0;
+	static void toggleSizeCB( Widget, XtPointer, XtPointer );
+	virtual void toggleSizeCB( Widget, XtPointer ) = 0;
+	static void prefCB( Widget, XtPointer, XtPointer );
+	virtual void prefCB( Widget, XtPointer ) = 0;
+	static void newLinkCB( Widget, XtPointer, XtPointer );
+	virtual void newLinkCB( Widget, XtPointer ) = 0;
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void recentCB( Widget, XtPointer, XtPointer );
+	virtual void recentCB( Widget, XtPointer ) = 0;
+	static void showLastCB( Widget, XtPointer, XtPointer );
+	virtual void showLastCB( Widget, XtPointer ) = 0;
+	static void sortByClassCB( Widget, XtPointer, XtPointer );
+	virtual void sortByClassCB( Widget, XtPointer ) = 0;
+	static void sortByNameCB( Widget, XtPointer, XtPointer );
+	virtual void sortByNameCB( Widget, XtPointer ) = 0;
+	static void fileMapCB( Widget, XtPointer, XtPointer );
+	virtual void fileMapCB( Widget, XtPointer ) = 0;
+	static void commandCB( Widget, XtPointer, XtPointer );
+	virtual void commandCB( Widget, XtPointer ) = 0;
+	static void exitCB( Widget, XtPointer, XtPointer );
+	virtual void exitCB( Widget, XtPointer ) = 0;
+	static void closeCB( Widget, XtPointer, XtPointer );
+	virtual void closeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIFolderWindow_c *UIFolderWindow_p;
+
+
+extern UIFolderWindow_p UIFolderWindow;
+
+
+#endif
diff --git a/src/MetviewUI/UIGridDrawer.cc b/src/MetviewUI/UIGridDrawer.cc
new file mode 100755
index 0000000..4ef1e33
--- /dev/null
+++ b/src/MetviewUI/UIGridDrawer.cc
@@ -0,0 +1,335 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <X11/StringDefs.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/TextF.h>
+#include <Xm/ToggleB.h>
+#include <Xm/CascadeBG.h>
+#include <Xm/LabelG.h>
+
+#include <xdclass.h>
+
+class UIGridDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIGridDrawer;
+	Widget x_;
+	Widget y_;
+public:
+	static void yEntryCB( Widget, XtPointer, XtPointer );
+	virtual void yEntryCB( Widget, XtPointer ) = 0;
+	static void xEntryCB( Widget, XtPointer, XtPointer );
+	virtual void xEntryCB( Widget, XtPointer ) = 0;
+	static void snapCB( Widget, XtPointer, XtPointer );
+	virtual void snapCB( Widget, XtPointer ) = 0;
+	static void showCB( Widget, XtPointer, XtPointer );
+	virtual void showCB( Widget, XtPointer ) = 0;
+	static void setCB( Widget, XtPointer, XtPointer );
+	virtual void setCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIGridDrawer_c *UIGridDrawer_p;
+
+UIGridDrawer_p UIGridDrawer = (UIGridDrawer_p) NULL;
+
+#include <X11/xpm.h>
+
+static int _xd_initialised = 0;
+
+typedef struct PixmapResources_s { 
+	Pixmap h;
+	Pixmap v;
+} PixmapResources_t, *PixmapResources_p;
+
+static PixmapResources_t pixmap_resources;
+
+static char *h_icon [] = { 
+"24 24 2 1",
+". c black",
+"o c #e5e5e5e5e5e5",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooo.oooooooooooooo.oooo",
+"ooo.oooooooooooooooo.ooo",
+"oo.oooooooooooooooooo.oo",
+"o.oooooooooooooooooooo.o",
+"........................",
+"o.oooooooooooooooooooo.o",
+"oo.oooooooooooooooooo.oo",
+"ooo.oooooooooooooooo.ooo",
+"oooo.oooooooooooooo.oooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo",
+"oooooooooooooooooooooooo"
+};
+
+static char *v_icon [] = { 
+"24 24 2 1",
+". c black",
+"o c #e5e5e5e5e5e5",
+"ooooooooooo.oooooooooooo",
+"oooooooooo...ooooooooooo",
+"ooooooooo.o.o.oooooooooo",
+"oooooooo.oo.oo.ooooooooo",
+"ooooooo.ooo.ooo.oooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooooooo.oooooooooooo",
+"ooooooo.ooo.ooo.oooooooo",
+"oooooooo.oo.oo.ooooooooo",
+"ooooooooo.o.o.oooooooooo",
+"oooooooooo...ooooooooooo",
+"ooooooooooo.oooooooooooo"
+};
+
+
+static void initialise_objects( Widget parent )
+{
+	XpmAttributes xpm_attributes;
+
+	/* Some code to ensure that the pixmaps look OK even if the
+	   color map is full or nearly so: */
+	xpm_attributes.valuemask = XpmCloseness;
+	xpm_attributes.closeness = 40000;
+	if ( _xd_initialised ) return;
+	_xd_initialised = 1;
+	while ( XtParent ( parent ) )
+		parent = XtParent ( parent );
+	XtVaGetValues ( parent, XmNcolormap, &xpm_attributes.colormap, 
+	                XmNdepth, &xpm_attributes.depth, 
+	                XmNvisual, &xpm_attributes.visual, NULL);
+	if ( XpmCreatePixmapFromData( XtDisplay( parent ),RootWindowOfScreen( XtScreen(parent) ) , h_icon, &pixmap_resources.h, NULL, &xpm_attributes ) != 0 )
+		pixmap_resources.h = XmUNSPECIFIED_PIXMAP;
+	if ( XpmCreatePixmapFromData( XtDisplay( parent ),RootWindowOfScreen( XtScreen(parent) ) , v_icon, &pixmap_resources.v, NULL, &xpm_attributes ) != 0 )
+		pixmap_resources.v = XmUNSPECIFIED_PIXMAP;
+}
+
+
+void UIGridDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget frame1 = (Widget)NULL;
+	Widget form4 = (Widget)NULL;
+	Widget rowcol6 = (Widget)NULL;
+	Widget rowcol1 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget optionMenu1 = (Widget)NULL;
+	Widget cascade1 = (Widget)NULL;
+	Widget menu1 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget rowcol3 = (Widget)NULL;
+	Widget label4 = (Widget)NULL;
+	Widget optionMenu4 = (Widget)NULL;
+	Widget cascade4 = (Widget)NULL;
+	Widget menu4 = (Widget)NULL;
+	Widget button8 = (Widget)NULL;
+	Widget button7 = (Widget)NULL;
+	Widget rowcol5 = (Widget)NULL;
+	Widget toggle1 = (Widget)NULL;
+	Widget toggle2 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Grid";
+
+initialise_objects(parent);	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIGridDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIGridDrawer;
+	XtSetArg(al[ac], XmNshadowType, XmSHADOW_IN); ac++;
+	frame1 = XmCreateFrame ( UIGridDrawer, "frame1", al, ac );
+	ac = 0;
+	form4 = XmCreateForm ( frame1, "form4", al, ac );
+	rowcol6 = XmCreateRowColumn ( form4, "rowcol6", al, ac );
+	XtSetArg(al[ac], XmNnumColumns, 3); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
+	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
+	XtSetArg(al[ac], XmNentryVerticalAlignment, XmALIGNMENT_CENTER); ac++;
+	rowcol1 = XmCreateRowColumn ( rowcol6, "rowcol1", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
+	label1 = XmCreateLabel ( rowcol1, "label1", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.h); ac++;
+	XtSetValues ( label1,al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNcolumns, 5); ac++;
+	x_ = XmCreateTextField ( rowcol1, "x_", al, ac );
+	ac = 0;
+	optionMenu1 = XmCreateOptionMenu ( rowcol1, "menu_x_", al, ac );
+	cascade1 = XmOptionButtonGadget ( optionMenu1 );
+	menu1 = XmCreatePulldownMenu ( optionMenu1, "menu1", al, ac );
+	button3 = XmCreatePushButton ( menu1, "%", al, ac );
+	button2 = XmCreatePushButton ( menu1, "cm", al, ac );
+	XtSetArg(al[ac], XmNnumColumns, 3); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
+	XtSetArg(al[ac], XmNentryVerticalAlignment, XmALIGNMENT_CENTER); ac++;
+	rowcol3 = XmCreateRowColumn ( rowcol6, "rowcol3", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
+	label4 = XmCreateLabel ( rowcol3, "label4", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.v); ac++;
+	XtSetValues ( label4,al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNcolumns, 5); ac++;
+	y_ = XmCreateTextField ( rowcol3, "y_", al, ac );
+	ac = 0;
+	optionMenu4 = XmCreateOptionMenu ( rowcol3, "meny_y_", al, ac );
+	cascade4 = XmOptionButtonGadget ( optionMenu4 );
+	menu4 = XmCreatePulldownMenu ( optionMenu4, "menu4", al, ac );
+	button8 = XmCreatePushButton ( menu4, "%", al, ac );
+	button7 = XmCreatePushButton ( menu4, "cm", al, ac );
+	rowcol5 = XmCreateRowColumn ( form4, "rowcol5", al, ac );
+	toggle1 = XmCreateToggleButton ( rowcol5, "Show grid", al, ac );
+	toggle2 = XmCreateToggleButton ( rowcol5, "Snap to grid", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol6,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol5,al, ac );
+	ac = 0;
+	XtAddCallback (x_, XmNactivateCallback, setCB, (XtPointer) this);
+	XtAddCallback (menu1, XmNentryCallback, xEntryCB, (XtPointer) this);
+	children[ac++] = button3;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu1); ac++;
+	XtSetValues ( cascade1, al, ac );
+	ac = 0;
+	children[ac++] = label1;
+	children[ac++] = x_;
+	children[ac++] = optionMenu1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (y_, XmNactivateCallback, setCB, (XtPointer) this);
+	XtAddCallback (menu4, XmNentryCallback, yEntryCB, (XtPointer) this);
+	children[ac++] = button8;
+	children[ac++] = button7;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu4); ac++;
+	XtSetValues ( cascade4, al, ac );
+	ac = 0;
+	children[ac++] = label4;
+	children[ac++] = y_;
+	children[ac++] = optionMenu4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol1;
+	children[ac++] = rowcol3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (toggle1, XmNvalueChangedCallback, showCB, (XtPointer) this);
+	XtAddCallback (toggle2, XmNvalueChangedCallback, snapCB, (XtPointer) this);
+	children[ac++] = toggle1;
+	children[ac++] = toggle2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol6;
+	children[ac++] = rowcol5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIGridDrawer_c::yEntryCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIGridDrawer_p instance = (UIGridDrawer_p) client_data;
+	instance->yEntryCB ( widget, call_data );
+}
+
+void UIGridDrawer_c::xEntryCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIGridDrawer_p instance = (UIGridDrawer_p) client_data;
+	instance->xEntryCB ( widget, call_data );
+}
+
+void UIGridDrawer_c::snapCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIGridDrawer_p instance = (UIGridDrawer_p) client_data;
+	instance->snapCB ( widget, call_data );
+}
+
+void UIGridDrawer_c::showCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIGridDrawer_p instance = (UIGridDrawer_p) client_data;
+	instance->showCB ( widget, call_data );
+}
+
+void UIGridDrawer_c::setCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIGridDrawer_p instance = (UIGridDrawer_p) client_data;
+	instance->setCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIGridDrawer.h b/src/MetviewUI/UIGridDrawer.h
new file mode 100755
index 0000000..9fd6229
--- /dev/null
+++ b/src/MetviewUI/UIGridDrawer.h
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIGridDrawer_h
+#define _UIGridDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIGridDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIGridDrawer;
+	Widget x_;
+	Widget y_;
+public:
+	static void yEntryCB( Widget, XtPointer, XtPointer );
+	virtual void yEntryCB( Widget, XtPointer ) = 0;
+	static void xEntryCB( Widget, XtPointer, XtPointer );
+	virtual void xEntryCB( Widget, XtPointer ) = 0;
+	static void snapCB( Widget, XtPointer, XtPointer );
+	virtual void snapCB( Widget, XtPointer ) = 0;
+	static void showCB( Widget, XtPointer, XtPointer );
+	virtual void showCB( Widget, XtPointer ) = 0;
+	static void setCB( Widget, XtPointer, XtPointer );
+	virtual void setCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIGridDrawer_c *UIGridDrawer_p;
+
+
+extern UIGridDrawer_p UIGridDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIIconDrawer.cc b/src/MetviewUI/UIIconDrawer.cc
new file mode 100755
index 0000000..d0f9e83
--- /dev/null
+++ b/src/MetviewUI/UIIconDrawer.cc
@@ -0,0 +1,241 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/CascadeB.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+
+#include <xdclass.h>
+
+class UIIconDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconDrawer;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+public:
+	static void updateDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void updateDrawerCB( Widget, XtPointer ) = 0;
+	static void openFolderCB( Widget, XtPointer, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer ) = 0;
+	static void deleteDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void deleteDrawerCB( Widget, XtPointer ) = 0;
+	static void renameDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void renameDrawerCB( Widget, XtPointer ) = 0;
+	static void newDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void newDrawerCB( Widget, XtPointer ) = 0;
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void deleteCB( Widget, XtPointer, XtPointer );
+	virtual void deleteCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconDrawer_c *UIIconDrawer_p;
+
+UIIconDrawer_p UIIconDrawer = (UIIconDrawer_p) NULL;
+
+
+
+void UIIconDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[10];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget separator2 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button5 = (Widget)NULL;
+	Widget button12 = (Widget)NULL;
+	Widget button6 = (Widget)NULL;
+	Widget separator3 = (Widget)NULL;
+	Widget cascade1 = (Widget)NULL;
+	Widget menu2 = (Widget)NULL;
+	Widget button7 = (Widget)NULL;
+	Widget button8 = (Widget)NULL;
+	Widget button10 = (Widget)NULL;
+	Widget button11 = (Widget)NULL;
+	Widget separator4 = (Widget)NULL;
+	Widget button9 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Templates";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIIconDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIIconDrawer;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( UIIconDrawer, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2 ); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoSort, TRUE); ac++;
+	XtSetArg(al[ac], XmNautoClean, TRUE); ac++;
+	XtSetArg(al[ac], XmNeditNames, TRUE); ac++;
+	XtSetArg(al[ac], XmNwidth, 1024); ac++;
+	XtSetArg(al[ac], XmNheight, 1024); ac++;
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, scrolledWin1, al, ac);
+	ac = 0;
+	menu1_ = XmCreatePopupMenu ( drag_, "menu1_", al, ac );
+	label1 = XmCreateLabel ( menu1_, "title", al, ac );
+	separator1 = XmCreateSeparator ( menu1_, "separator1", al, ac );
+	button1 = XmCreatePushButton ( menu1_, "edit", al, ac );
+	button2 = XmCreatePushButton ( menu1_, "delete", al, ac );
+	menu2_ = XmCreatePopupMenu ( drag_, "menu2_", al, ac );
+	button3 = XmCreatePushButton ( menu2_, "New icon...", al, ac );
+	separator2 = XmCreateSeparator ( menu2_, "separator2", al, ac );
+	button4 = XmCreatePushButton ( menu2_, "New drawer", al, ac );
+	button5 = XmCreatePushButton ( menu2_, "Rename this drawer...", al, ac );
+	button12 = XmCreatePushButton ( menu2_, "Update this drawer...", al, ac );
+	button6 = XmCreatePushButton ( menu2_, "Delete this drawer...", al, ac );
+	separator3 = XmCreateSeparator ( menu2_, "separator3", al, ac );
+	cascade1 = XmCreateCascadeButton ( menu2_, "Layout", al, ac );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	menu2 = XmCreatePulldownMenu ( menu2_, "menu2", al, ac );
+	ac = 0;
+	button7 = XmCreatePushButton ( menu2, "Small icons", al, ac );
+	button8 = XmCreatePushButton ( menu2, "Large icons", al, ac );
+	button10 = XmCreatePushButton ( menu2, "Sort by name", al, ac );
+	button11 = XmCreatePushButton ( menu2, "Sort by class", al, ac );
+	separator4 = XmCreateSeparator ( menu2_, "separator4", al, ac );
+	button9 = XmCreatePushButton ( menu2_, "Open associated folder", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledWin1,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, editCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, deleteCB, (XtPointer) this);
+	children[ac++] = label1;
+	children[ac++] = separator1;
+	children[ac++] = button1;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button3, XmNactivateCallback, newIconCB, (XtPointer) this);
+	XtAddCallback (button4, XmNactivateCallback, newDrawerCB, (XtPointer) this);
+	XtAddCallback (button5, XmNactivateCallback, renameDrawerCB, (XtPointer) this);
+	XtAddCallback (button12, XmNactivateCallback, updateDrawerCB, (XtPointer) this);
+	XtAddCallback (button6, XmNactivateCallback, deleteDrawerCB, (XtPointer) this);
+	children[ac++] = button7;
+	children[ac++] = button8;
+	children[ac++] = button10;
+	children[ac++] = button11;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu2); ac++;
+	XtSetValues ( cascade1, al, ac );
+	ac = 0;
+	XtAddCallback (button9, XmNactivateCallback, openFolderCB, (XtPointer) this);
+	children[ac++] = button3;
+	children[ac++] = separator2;
+	children[ac++] = button4;
+	children[ac++] = button5;
+	children[ac++] = button12;
+	children[ac++] = button6;
+	children[ac++] = separator3;
+	children[ac++] = cascade1;
+	children[ac++] = separator4;
+	children[ac++] = button9;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, drag_ );
+	children[ac++] = scrolledWin1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIIconDrawer_c::updateDrawerCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->updateDrawerCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::openFolderCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->openFolderCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::deleteDrawerCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->deleteDrawerCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::renameDrawerCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->renameDrawerCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::newDrawerCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->newDrawerCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::newIconCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->newIconCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::deleteCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->deleteCB ( widget, call_data );
+}
+
+void UIIconDrawer_c::editCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconDrawer_p instance = (UIIconDrawer_p) client_data;
+	instance->editCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIIconDrawer.h b/src/MetviewUI/UIIconDrawer.h
new file mode 100755
index 0000000..c15de9e
--- /dev/null
+++ b/src/MetviewUI/UIIconDrawer.h
@@ -0,0 +1,53 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIIconDrawer_h
+#define _UIIconDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIIconDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconDrawer;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+public:
+	static void updateDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void updateDrawerCB( Widget, XtPointer ) = 0;
+	static void openFolderCB( Widget, XtPointer, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer ) = 0;
+	static void deleteDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void deleteDrawerCB( Widget, XtPointer ) = 0;
+	static void renameDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void renameDrawerCB( Widget, XtPointer ) = 0;
+	static void newDrawerCB( Widget, XtPointer, XtPointer );
+	virtual void newDrawerCB( Widget, XtPointer ) = 0;
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void deleteCB( Widget, XtPointer, XtPointer );
+	virtual void deleteCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconDrawer_c *UIIconDrawer_p;
+
+
+extern UIIconDrawer_p UIIconDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIIconHelp.cc b/src/MetviewUI/UIIconHelp.cc
new file mode 100755
index 0000000..9b2dd8f
--- /dev/null
+++ b/src/MetviewUI/UIIconHelp.cc
@@ -0,0 +1,181 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+
+#include <xdclass.h>
+
+class UIIconHelp_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconHelp;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+	Widget help_;
+public:
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void deleteCB( Widget, XtPointer, XtPointer );
+	virtual void deleteCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+	static void folderCB( Widget, XtPointer, XtPointer );
+	virtual void folderCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconHelp_c *UIIconHelp_p;
+
+UIIconHelp_p UIIconHelp = (UIIconHelp_p) NULL;
+
+
+
+void UIIconHelp_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget frame1 = (Widget)NULL;
+	Widget label2 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget drawingArea1 = (Widget)NULL;
+	Widget drawingArea2 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIIconHelp";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIIconHelp = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIIconHelp;
+	XtSetArg(al[ac], XmNshadowType, XmSHADOW_IN); ac++;
+	frame1 = XmCreateFrame ( UIIconHelp, "frame1", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoClean, TRUE); ac++;
+	XtSetArg(al[ac], XmNsingleLine, TRUE); ac++;
+	XtSetArg(al[ac], XmNeditNames, TRUE); ac++;
+	XtSetArg(al[ac], XmNheight, 60); ac++;
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, frame1, al, ac);
+	ac = 0;
+	menu1_ = XmCreatePopupMenu ( drag_, "menu1_", al, ac );
+	label2 = XmCreateLabel ( menu1_, "title", al, ac );
+	separator1 = XmCreateSeparator ( menu1_, "separator1", al, ac );
+	button1 = XmCreatePushButton ( menu1_, "edit", al, ac );
+	button2 = XmCreatePushButton ( menu1_, "delete", al, ac );
+	menu2_ = XmCreatePopupMenu ( drag_, "menu2_", al, ac );
+	button4 = XmCreatePushButton ( menu2_, "New icon...", al, ac );
+	button3 = XmCreatePushButton ( menu2_, "Open help folder", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	help_ = XmCreateLabel ( frame1, "Help", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 1); ac++;
+	XtSetArg(al[ac], XmNheight, 80); ac++;
+	drawingArea1 = XmCreateDrawingArea ( UIIconHelp, "drawingArea1", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 290); ac++;
+	drawingArea2 = XmCreateDrawingArea ( UIIconHelp, "drawingArea2", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, drawingArea2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, drawingArea1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( drawingArea1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( drawingArea2,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, editCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, deleteCB, (XtPointer) this);
+	children[ac++] = label2;
+	children[ac++] = separator1;
+	children[ac++] = button1;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button4, XmNactivateCallback, newIconCB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, folderCB, (XtPointer) this);
+	children[ac++] = button4;
+	children[ac++] = button3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag_;
+	children[ac++] = help_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame1;
+	children[ac++] = drawingArea1;
+	children[ac++] = drawingArea2;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIIconHelp_c::newIconCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconHelp_p instance = (UIIconHelp_p) client_data;
+	instance->newIconCB ( widget, call_data );
+}
+
+void UIIconHelp_c::deleteCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconHelp_p instance = (UIIconHelp_p) client_data;
+	instance->deleteCB ( widget, call_data );
+}
+
+void UIIconHelp_c::editCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconHelp_p instance = (UIIconHelp_p) client_data;
+	instance->editCB ( widget, call_data );
+}
+
+void UIIconHelp_c::folderCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconHelp_p instance = (UIIconHelp_p) client_data;
+	instance->folderCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIIconHelp.h b/src/MetviewUI/UIIconHelp.h
new file mode 100755
index 0000000..3731ab3
--- /dev/null
+++ b/src/MetviewUI/UIIconHelp.h
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIIconHelp_h
+#define _UIIconHelp_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIIconHelp_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconHelp;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+	Widget help_;
+public:
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void deleteCB( Widget, XtPointer, XtPointer );
+	virtual void deleteCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+	static void folderCB( Widget, XtPointer, XtPointer );
+	virtual void folderCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconHelp_c *UIIconHelp_p;
+
+
+extern UIIconHelp_p UIIconHelp;
+
+
+#endif
diff --git a/src/MetviewUI/UIIconLine.cc b/src/MetviewUI/UIIconLine.cc
new file mode 100755
index 0000000..4e4d457
--- /dev/null
+++ b/src/MetviewUI/UIIconLine.cc
@@ -0,0 +1,200 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+
+#include "xdclass.h"
+
+class UIIconLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconLine;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+	Widget hidden_;
+	Widget class_;
+public:
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void openHiddenCB( Widget, XtPointer, XtPointer );
+	virtual void openHiddenCB( Widget, XtPointer ) = 0;
+	static void removeCB( Widget, XtPointer, XtPointer );
+	virtual void removeCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconLine_c *UIIconLine_p;
+
+UIIconLine_p UIIconLine = (UIIconLine_p) NULL;
+
+
+
+void UIIconLine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Display *display = XtDisplay ( parent );
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XrmValue from_value, to_value; /* For resource conversion */
+	XPointer to_address; /* For Thread-safe resource conversion */ 
+	Pixel to_pixel; /* For Thread-safe resource conversion */ 
+	XtPointer tmp_value;             /* ditto */
+	Widget widget2 = (Widget)NULL;
+	Widget widget3 = (Widget)NULL;
+	Widget widget4 = (Widget)NULL;
+	Widget widget5 = (Widget)NULL;
+	Widget widget6 = (Widget)NULL;
+	Widget widget7 = (Widget)NULL;
+	Widget widget8 = (Widget)NULL;
+	Widget widget9 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = (char *) "UIIconLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIIconLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIIconLine;
+	XtSetArg(al[ac], XmNshadowType, XmSHADOW_IN); ac++;
+	widget2 = XmCreateFrame ( UIIconLine, (char *) "widget2", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoClean, TRUE); ac++;
+	XtSetArg(al[ac], XmNsingleLine, TRUE); ac++;
+	XtSetArg(al[ac], XmNeditNames, FALSE); ac++;
+	XtSetArg(al[ac], XmNheight, 60); ac++;
+	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(display)) != 1) {
+
+		from_value.addr = "#fb8bfb8bfb8b" ;
+		from_value.size = strlen( from_value.addr ) + 1;
+		to_value.size = sizeof(Pixel);
+		to_value.addr = (XPointer) &to_pixel;
+		XtConvertAndStore (widget2, XmRString, &from_value, XmRPixel, &to_value);
+
+		if ( to_value.addr ) {
+			XtSetArg(al[ac], XmNbackground, (*((Pixel*) to_value.addr))); ac++;
+		}
+	}
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, widget2, al, ac);
+	ac = 0;
+	menu1_ = XmCreatePopupMenu ( drag_, (char *) "menu1_", al, ac );
+	widget3 = XmCreateLabel ( menu1_, (char *) "title", al, ac );
+	widget4 = XmCreateSeparator ( menu1_, (char *) "widget4", al, ac );
+	widget5 = XmCreatePushButton ( menu1_, (char *) "edit", al, ac );
+	widget6 = XmCreatePushButton ( menu1_, (char *) "remove", al, ac );
+	menu2_ = XmCreatePopupMenu ( drag_, (char *) "menu2_", al, ac );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	widget7 = XmCreatePushButton ( menu2_, (char *) "New icon...", al, ac );
+	ac = 0;
+	hidden_ = XmCreatePushButton ( menu2_, (char *) "Open hidden folder....", al, ac );
+	XtSetArg(al[ac], XmNframeChildType, XmFRAME_TITLE_CHILD); ac++;
+	class_ = XmCreateLabel ( widget2, (char *) "GRIB:", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 80); ac++;
+	widget8 = XmCreateDrawingArea ( UIIconLine, (char *) "widget8", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 290); ac++;
+	XtSetArg(al[ac], XmNheight, 1); ac++;
+	widget9 = XmCreateDrawingArea ( UIIconLine, (char *) "widget9", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, widget9); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, widget8); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( widget2, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( widget8, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, widget8); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( widget9, al, ac );
+	ac = 0;
+	XtAddCallback (widget5, XmNactivateCallback, &UIIconLine_c::editCB, (XtPointer) this);
+	XtAddCallback (widget6, XmNactivateCallback, &UIIconLine_c::removeCB, (XtPointer) this);
+	if ((children[ac] = widget3) != (Widget) 0) { ac++; }
+	if ((children[ac] = widget4) != (Widget) 0) { ac++; }
+	if ((children[ac] = widget5) != (Widget) 0) { ac++; }
+	if ((children[ac] = widget6) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	XtAddCallback (widget7, XmNactivateCallback, &UIIconLine_c::newIconCB, (XtPointer) this);
+	XtAddCallback (hidden_, XmNactivateCallback, &UIIconLine_c::openHiddenCB, (XtPointer) this);
+	if ((children[ac] = widget7) != (Widget) 0) { ac++; }
+	if ((children[ac] = hidden_) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if ((children[ac] = drag_) != (Widget) 0) { ac++; }
+	if ((children[ac] = class_) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	if ((children[ac] = widget2) != (Widget) 0) { ac++; }
+	if ((children[ac] = widget8) != (Widget) 0) { ac++; }
+	if ((children[ac] = widget9) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+}
+
+void UIIconLine_c::newIconCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconLine_p instance = (UIIconLine_p) client_data;
+	instance->newIconCB ( widget, call_data );
+}
+
+void UIIconLine_c::openHiddenCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconLine_p instance = (UIIconLine_p) client_data;
+	instance->openHiddenCB ( widget, call_data );
+}
+
+void UIIconLine_c::removeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconLine_p instance = (UIIconLine_p) client_data;
+	instance->removeCB ( widget, call_data );
+}
+
+void UIIconLine_c::editCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconLine_p instance = (UIIconLine_p) client_data;
+	instance->editCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIIconLine.h b/src/MetviewUI/UIIconLine.h
new file mode 100755
index 0000000..85ad2b3
--- /dev/null
+++ b/src/MetviewUI/UIIconLine.h
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIIconLine_h
+#define _UIIconLine_h
+
+#define XD_MOTIF
+
+#include "xdclass.h"
+
+class UIIconLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconLine;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+	Widget hidden_;
+	Widget class_;
+public:
+	static void newIconCB( Widget, XtPointer, XtPointer );
+	virtual void newIconCB( Widget, XtPointer ) = 0;
+	static void openHiddenCB( Widget, XtPointer, XtPointer );
+	virtual void openHiddenCB( Widget, XtPointer ) = 0;
+	static void removeCB( Widget, XtPointer, XtPointer );
+	virtual void removeCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconLine_c *UIIconLine_p;
+
+
+extern UIIconLine_p UIIconLine;
+
+
+
+#endif
diff --git a/src/MetviewUI/UIIconSelection.cc b/src/MetviewUI/UIIconSelection.cc
new file mode 100755
index 0000000..0d322c9
--- /dev/null
+++ b/src/MetviewUI/UIIconSelection.cc
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/MessageB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/LabelG.h>
+#include <Xm/PushBG.h>
+#include <Xm/SeparatoG.h>
+
+
+#include "UIIconSelection.h"
+
+UIIconSelection_p UIIconSelection = (UIIconSelection_p) NULL;
+
+
+
+void UIIconSelection_c::create (Widget parent, char *widget_name)
+{
+	Widget children[7];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIIconSelection";
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Metview Icons"); ac++;
+	XtSetArg(al[ac], XmNtransient, TRUE); ac++;
+	UIIconSelection = XmCreateDialogShell ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIIconSelection;
+	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
+	form_ = XmCreateMessageBox ( UIIconSelection, "form_", al, ac );
+	ac = 0;
+	button2 = XmMessageBoxGetChild ( form_, XmDIALOG_HELP_BUTTON );
+	label_ = XmMessageBoxGetChild ( form_, XmDIALOG_MESSAGE_LABEL );
+	button3 = XmMessageBoxGetChild ( form_, XmDIALOG_OK_BUTTON );
+	XtSetArg(al[ac], XmNwidth, 300); ac++;
+	XtSetArg(al[ac], XmNheight, 600); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( form_, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2 ); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	rowcol_ = XmCreateRowColumn ( scrolledWin1, "rowcol_", al, ac );
+	children[ac++] = rowcol_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, rowcol_ );
+	children[ac++] = scrolledWin1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtUnmanageChild ( button2 );
+	XtUnmanageChild ( button3 );
+}
+
+void UIIconSelection_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconSelection_p instance = (UIIconSelection_p) client_data;
+	instance->helpCB ( widget, call_data );
+}
+
+void UIIconSelection_c::cancelCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconSelection_p instance = (UIIconSelection_p) client_data;
+	instance->cancelCB ( widget, call_data );
+}
+
+void UIIconSelection_c::okCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIIconSelection_p instance = (UIIconSelection_p) client_data;
+	instance->okCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIIconSelection.h b/src/MetviewUI/UIIconSelection.h
new file mode 100755
index 0000000..f03694e
--- /dev/null
+++ b/src/MetviewUI/UIIconSelection.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIIconSelection_h
+#define _UIIconSelection_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIIconSelection_c: public xd_XmDialog_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIIconSelection;
+	Widget form_;
+	Widget label_;
+	Widget rowcol_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void cancelCB( Widget, XtPointer, XtPointer );
+	virtual void cancelCB( Widget, XtPointer ) = 0;
+	static void okCB( Widget, XtPointer, XtPointer );
+	virtual void okCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIIconSelection_c *UIIconSelection_p;
+
+
+extern UIIconSelection_p UIIconSelection;
+
+
+#endif
diff --git a/src/MetviewUI/UILayoutDrawer.cc b/src/MetviewUI/UILayoutDrawer.cc
new file mode 100755
index 0000000..b7e210a
--- /dev/null
+++ b/src/MetviewUI/UILayoutDrawer.cc
@@ -0,0 +1,301 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+
+#include <xdclass.h>
+
+class UILayoutDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UILayoutDrawer;
+	Widget split1_;
+	Widget split2_;
+	Widget add_;
+	Widget delete_;
+	Widget join_;
+	Widget group_;
+	Widget ungroup_;
+public:
+	static void deleteSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void deleteSelectionCB( Widget, XtPointer ) = 0;
+	static void addPageCB( Widget, XtPointer, XtPointer );
+	virtual void addPageCB( Widget, XtPointer ) = 0;
+	static void splitVerCB( Widget, XtPointer, XtPointer );
+	virtual void splitVerCB( Widget, XtPointer ) = 0;
+	static void splitHorCB( Widget, XtPointer, XtPointer );
+	virtual void splitHorCB( Widget, XtPointer ) = 0;
+	static void ungroupSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void ungroupSelectionCB( Widget, XtPointer ) = 0;
+	static void groupSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void groupSelectionCB( Widget, XtPointer ) = 0;
+	static void joinSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void joinSelectionCB( Widget, XtPointer ) = 0;
+};
+
+typedef UILayoutDrawer_c *UILayoutDrawer_p;
+
+UILayoutDrawer_p UILayoutDrawer = (UILayoutDrawer_p) NULL;
+
+
+
+void UILayoutDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget frame2 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget rowcol1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget rowcol2 = (Widget)NULL;
+	Widget button5 = (Widget)NULL;
+	Widget button6 = (Widget)NULL;
+	Widget button7 = (Widget)NULL;
+	Widget button8 = (Widget)NULL;
+	Widget label2 = (Widget)NULL;
+	Widget frame4 = (Widget)NULL;
+	Widget rowcol3 = (Widget)NULL;
+	Widget frame5 = (Widget)NULL;
+	Widget rowcol4 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Layout";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UILayoutDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UILayoutDrawer;
+	XtSetArg(al[ac], XmNshadowType, XmSHADOW_IN); ac++;
+	frame2 = XmCreateFrame ( UILayoutDrawer, "frame2", al, ac );
+	ac = 0;
+	form1 = XmCreateForm ( frame2, "form1", al, ac );
+	split1_ = XmCreateFrame ( form1, "split1_", al, ac );
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	rowcol1 = XmCreateRowColumn ( split1_, "rowcol1", al, ac );
+	ac = 0;
+	button1 = XmCreatePushButton ( rowcol1, "2", al, ac );
+	button2 = XmCreatePushButton ( rowcol1, "3", al, ac );
+	button3 = XmCreatePushButton ( rowcol1, "5", al, ac );
+	button4 = XmCreatePushButton ( rowcol1, "7", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Split selection horizontally", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	label1 = XmCreateLabel ( split1_, "label1", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	split2_ = XmCreateFrame ( form1, "split2_", al, ac );
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	rowcol2 = XmCreateRowColumn ( split2_, "rowcol2", al, ac );
+	ac = 0;
+	button5 = XmCreatePushButton ( rowcol2, "2", al, ac );
+	button6 = XmCreatePushButton ( rowcol2, "3", al, ac );
+	button7 = XmCreatePushButton ( rowcol2, "5", al, ac );
+	button8 = XmCreatePushButton ( rowcol2, "7", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Split selection vertically", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	label2 = XmCreateLabel ( split2_, "label2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	frame4 = XmCreateFrame ( form1, "frame4", al, ac );
+	rowcol3 = XmCreateRowColumn ( frame4, "rowcol3", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "New frame", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	add_ = XmCreatePushButton ( rowcol3, "add_", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Delete selection", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	delete_ = XmCreatePushButton ( rowcol3, "delete_", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Join selection", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	join_ = XmCreatePushButton ( rowcol3, "join_", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	frame5 = XmCreateFrame ( form1, "frame5", al, ac );
+	rowcol4 = XmCreateRowColumn ( frame5, "rowcol4", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Connect frames", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	group_ = XmCreatePushButton ( rowcol4, "group_", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Disconnect frames", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	ungroup_ = XmCreatePushButton ( rowcol4, "ungroup_", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( split1_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, split1_); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
+	XtSetArg(al[ac], XmNrightWidget, split1_); ac++;
+	XtSetValues ( split2_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame4,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, split1_); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNrightWidget, frame4); ac++;
+	XtSetValues ( frame5,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, splitHorCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, splitHorCB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, splitHorCB, (XtPointer) this);
+	XtAddCallback (button4, XmNactivateCallback, splitHorCB, (XtPointer) this);
+	children[ac++] = button1;
+	children[ac++] = button2;
+	children[ac++] = button3;
+	children[ac++] = button4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol1;
+	children[ac++] = label1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button5, XmNactivateCallback, splitVerCB, (XtPointer) this);
+	XtAddCallback (button6, XmNactivateCallback, splitVerCB, (XtPointer) this);
+	XtAddCallback (button7, XmNactivateCallback, splitVerCB, (XtPointer) this);
+	XtAddCallback (button8, XmNactivateCallback, splitVerCB, (XtPointer) this);
+	children[ac++] = button5;
+	children[ac++] = button6;
+	children[ac++] = button7;
+	children[ac++] = button8;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol2;
+	children[ac++] = label2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (add_, XmNactivateCallback, addPageCB, (XtPointer) this);
+	XtAddCallback (delete_, XmNactivateCallback, deleteSelectionCB, (XtPointer) this);
+	XtAddCallback (join_, XmNactivateCallback, joinSelectionCB, (XtPointer) this);
+	children[ac++] = add_;
+	children[ac++] = delete_;
+	children[ac++] = join_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (group_, XmNactivateCallback, groupSelectionCB, (XtPointer) this);
+	XtAddCallback (ungroup_, XmNactivateCallback, ungroupSelectionCB, (XtPointer) this);
+	children[ac++] = group_;
+	children[ac++] = ungroup_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = split1_;
+	children[ac++] = split2_;
+	children[ac++] = frame4;
+	children[ac++] = frame5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame2;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UILayoutDrawer_c::deleteSelectionCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->deleteSelectionCB ( widget, call_data );
+}
+
+void UILayoutDrawer_c::addPageCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->addPageCB ( widget, call_data );
+}
+
+void UILayoutDrawer_c::splitVerCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->splitVerCB ( widget, call_data );
+}
+
+void UILayoutDrawer_c::splitHorCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->splitHorCB ( widget, call_data );
+}
+
+void UILayoutDrawer_c::ungroupSelectionCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->ungroupSelectionCB ( widget, call_data );
+}
+
+void UILayoutDrawer_c::groupSelectionCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->groupSelectionCB ( widget, call_data );
+}
+
+void UILayoutDrawer_c::joinSelectionCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILayoutDrawer_p instance = (UILayoutDrawer_p) client_data;
+	instance->joinSelectionCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UILayoutDrawer.h b/src/MetviewUI/UILayoutDrawer.h
new file mode 100755
index 0000000..e407115
--- /dev/null
+++ b/src/MetviewUI/UILayoutDrawer.h
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UILayoutDrawer_h
+#define _UILayoutDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UILayoutDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UILayoutDrawer;
+	Widget split1_;
+	Widget split2_;
+	Widget add_;
+	Widget delete_;
+	Widget join_;
+	Widget group_;
+	Widget ungroup_;
+public:
+	static void deleteSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void deleteSelectionCB( Widget, XtPointer ) = 0;
+	static void addPageCB( Widget, XtPointer, XtPointer );
+	virtual void addPageCB( Widget, XtPointer ) = 0;
+	static void splitVerCB( Widget, XtPointer, XtPointer );
+	virtual void splitVerCB( Widget, XtPointer ) = 0;
+	static void splitHorCB( Widget, XtPointer, XtPointer );
+	virtual void splitHorCB( Widget, XtPointer ) = 0;
+	static void ungroupSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void ungroupSelectionCB( Widget, XtPointer ) = 0;
+	static void groupSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void groupSelectionCB( Widget, XtPointer ) = 0;
+	static void joinSelectionCB( Widget, XtPointer, XtPointer );
+	virtual void joinSelectionCB( Widget, XtPointer ) = 0;
+};
+
+typedef UILayoutDrawer_c *UILayoutDrawer_p;
+
+
+extern UILayoutDrawer_p UILayoutDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UILine.cc b/src/MetviewUI/UILine.cc
new file mode 100755
index 0000000..ddb086d
--- /dev/null
+++ b/src/MetviewUI/UILine.cc
@@ -0,0 +1,159 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/ArrowB.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ToggleB.h>
+
+#include <xdclass.h>
+
+class UILine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UILine;
+	Widget name_;
+	Widget help_arrow_;
+	Widget form_;
+	Widget help_button_;
+	Widget where_;
+	Widget helper_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void comboCB( Widget, XtPointer, XtPointer );
+	virtual void comboCB( Widget, XtPointer ) = 0;
+	static void setCB( Widget, XtPointer, XtPointer );
+	virtual void setCB( Widget, XtPointer ) = 0;
+};
+
+typedef UILine_c *UILine_p;
+
+UILine_p UILine = (UILine_p) NULL;
+
+
+
+void UILine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget rowcol2 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget rowcol1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Output";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UILine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UILine;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	rowcol2 = XmCreateRowColumn ( UILine, "rowcol2", al, ac );
+	ac = 0;
+	form1 = XmCreateForm ( rowcol2, "form1", al, ac );
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+	name_ = XmCreateToggleButton ( form1, "name_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 12); ac++;
+	XtSetArg(al[ac], XmNheight, 12); ac++;
+	XtSetArg(al[ac], XmNhighlightThickness, 0); ac++;
+	XtSetArg(al[ac], XmNshadowThickness, 0); ac++;
+	XtSetArg(al[ac], XmNarrowDirection, XmARROW_RIGHT); ac++;
+	help_arrow_ = XmCreateArrowButton ( form1, "help_arrow_", al, ac );
+	ac = 0;
+	form_ = XmCreateForm ( rowcol2, "form_", al, ac );
+	help_button_ = XmCreatePushButton ( form_, "?", al, ac );
+	rowcol1 = XmCreateRowColumn ( rowcol2, "rowcol1", al, ac );
+	where_ = XmCreateForm ( rowcol1, "where_", al, ac );
+	helper_ = XmCreateForm ( rowcol1, "helper_", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( name_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, name_); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( help_arrow_,al, ac );
+	ac = 0;
+	XtAddCallback (name_, XmNvalueChangedCallback, setCB, (XtPointer) this);
+	XtAddCallback (help_arrow_, XmNdisarmCallback, comboCB, (XtPointer) this);
+	children[ac++] = name_;
+	children[ac++] = help_arrow_;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( help_button_,al, ac );
+	ac = 0;
+	XtAddCallback (help_button_, XmNactivateCallback, helpCB, (XtPointer) this);
+	children[ac++] = help_button_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = where_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	children[ac++] = form_;
+	children[ac++] = rowcol1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol2;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UILine_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILine_p instance = (UILine_p) client_data;
+	instance->helpCB ( widget, call_data );
+}
+
+void UILine_c::comboCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILine_p instance = (UILine_p) client_data;
+	instance->comboCB ( widget, call_data );
+}
+
+void UILine_c::setCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILine_p instance = (UILine_p) client_data;
+	instance->setCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UILine.h b/src/MetviewUI/UILine.h
new file mode 100755
index 0000000..b6844fc
--- /dev/null
+++ b/src/MetviewUI/UILine.h
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UILine_h
+#define _UILine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UILine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UILine;
+	Widget name_;
+	Widget help_arrow_;
+	Widget form_;
+	Widget help_button_;
+	Widget where_;
+	Widget helper_;
+public:
+	static void helpCB( Widget, XtPointer, XtPointer );
+	virtual void helpCB( Widget, XtPointer ) = 0;
+	static void comboCB( Widget, XtPointer, XtPointer );
+	virtual void comboCB( Widget, XtPointer ) = 0;
+	static void setCB( Widget, XtPointer, XtPointer );
+	virtual void setCB( Widget, XtPointer ) = 0;
+};
+
+typedef UILine_c *UILine_p;
+
+
+extern UILine_p UILine;
+
+
+#endif
diff --git a/src/MetviewUI/UIListHelp.cc b/src/MetviewUI/UIListHelp.cc
new file mode 100755
index 0000000..033898e
--- /dev/null
+++ b/src/MetviewUI/UIListHelp.cc
@@ -0,0 +1,110 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/List.h>
+#include <Xm/ScrollBar.h>
+
+#include <xdclass.h>
+
+class UIListHelp_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIListHelp;
+	Widget list_;
+public:
+	static void extendedCB( Widget, XtPointer, XtPointer );
+	virtual void extendedCB( Widget, XtPointer ) = 0;
+	static void multipleCB( Widget, XtPointer, XtPointer );
+	virtual void multipleCB( Widget, XtPointer ) = 0;
+	static void singleCB( Widget, XtPointer, XtPointer );
+	virtual void singleCB( Widget, XtPointer ) = 0;
+	static void browseCB( Widget, XtPointer, XtPointer );
+	virtual void browseCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIListHelp_c *UIListHelp_p;
+
+UIListHelp_p UIListHelp = (UIListHelp_p) NULL;
+
+
+
+void UIListHelp_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledList1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIListHelp";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIListHelp = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIListHelp;
+	XtSetArg(al[ac], XmNvisibleItemCount, 10); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	list_ = XmCreateScrolledList ( UIListHelp, "list_", al, ac );
+	ac = 0;
+	scrolledList1 = XtParent ( list_ );
+
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledList1,al, ac );
+	ac = 0;
+	XtAddCallback (list_, XmNbrowseSelectionCallback, browseCB, (XtPointer) this);
+	XtAddCallback (list_, XmNsingleSelectionCallback, singleCB, (XtPointer) this);
+	XtAddCallback (list_, XmNmultipleSelectionCallback, multipleCB, (XtPointer) this);
+	XtAddCallback (list_, XmNextendedSelectionCallback, extendedCB, (XtPointer) this);
+	XtManageChild(list_);
+}
+
+void UIListHelp_c::extendedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIListHelp_p instance = (UIListHelp_p) client_data;
+	instance->extendedCB ( widget, call_data );
+}
+
+void UIListHelp_c::multipleCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIListHelp_p instance = (UIListHelp_p) client_data;
+	instance->multipleCB ( widget, call_data );
+}
+
+void UIListHelp_c::singleCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIListHelp_p instance = (UIListHelp_p) client_data;
+	instance->singleCB ( widget, call_data );
+}
+
+void UIListHelp_c::browseCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIListHelp_p instance = (UIListHelp_p) client_data;
+	instance->browseCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIListHelp.h b/src/MetviewUI/UIListHelp.h
new file mode 100755
index 0000000..2e5a139
--- /dev/null
+++ b/src/MetviewUI/UIListHelp.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIListHelp_h
+#define _UIListHelp_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIListHelp_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIListHelp;
+	Widget list_;
+public:
+	static void extendedCB( Widget, XtPointer, XtPointer );
+	virtual void extendedCB( Widget, XtPointer ) = 0;
+	static void multipleCB( Widget, XtPointer, XtPointer );
+	virtual void multipleCB( Widget, XtPointer ) = 0;
+	static void singleCB( Widget, XtPointer, XtPointer );
+	virtual void singleCB( Widget, XtPointer ) = 0;
+	static void browseCB( Widget, XtPointer, XtPointer );
+	virtual void browseCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIListHelp_c *UIListHelp_p;
+
+
+extern UIListHelp_p UIListHelp;
+
+
+#endif
diff --git a/src/MetviewUI/UILogWindow.cc b/src/MetviewUI/UILogWindow.cc
new file mode 100755
index 0000000..baf0194
--- /dev/null
+++ b/src/MetviewUI/UILogWindow.cc
@@ -0,0 +1,152 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/PushB.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+#include <Xm/ToggleB.h>
+
+#include <Xm/Protocols.h>
+#include "UILogWindow.h"
+
+UILogWindow_p UILogWindow = (UILogWindow_p) NULL;
+
+
+
+void UILogWindow_c::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledText1 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget toggle1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+
+	if ( !app_class_name )
+		app_class_name = "XApplication";
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	UILogWindow = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	_xd_rootwidget = UILogWindow;
+	XmAddWMProtocolCallback( UILogWindow, XmInternAtom(XtDisplay(UILogWindow), "WM_DELETE_WINDOW", False), closeCB, (XtPointer) this);
+	XtSetArg(al[ac], XmNwidth, 500); ac++;
+	XtSetArg(al[ac], XmNheight, 500); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form_ = XmCreateForm ( UILogWindow, "form_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	text_ = XmCreateScrolledText ( form_, "text_", al, ac );
+	ac = 0;
+	scrolledText1 = XtParent ( text_ );
+
+	form1 = XmCreateForm ( form_, "form1", al, ac );
+	button3 = XmCreatePushButton ( form1, "Clear", al, ac );
+	toggle1 = XmCreateToggleButton ( form1, "Freeze", al, ac );
+	button2 = XmCreatePushButton ( form1, "Close", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, form1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledText1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( form1,al, ac );
+	ac = 0;
+	XtManageChild(text_);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftWidget, toggle1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( button3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( toggle1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
+	XtSetValues ( button2,al, ac );
+	ac = 0;
+	XtAddCallback (button3, XmNactivateCallback, clearCB, (XtPointer) this);
+	XtAddCallback (toggle1, XmNvalueChangedCallback, freezeCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, closeCB, (XtPointer) this);
+	children[ac++] = button3;
+	children[ac++] = toggle1;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form_);
+}
+
+void UILogWindow_c::freezeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILogWindow_p instance = (UILogWindow_p) client_data;
+	instance->freezeCB ( widget, call_data );
+}
+
+void UILogWindow_c::clearCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILogWindow_p instance = (UILogWindow_p) client_data;
+	instance->clearCB ( widget, call_data );
+}
+
+void UILogWindow_c::closeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UILogWindow_p instance = (UILogWindow_p) client_data;
+	instance->closeCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UILogWindow.h b/src/MetviewUI/UILogWindow.h
new file mode 100755
index 0000000..b5c9a3f
--- /dev/null
+++ b/src/MetviewUI/UILogWindow.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UILogWindow_h
+#define _UILogWindow_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UILogWindow_c: public xd_ApplicationShell_c {
+public:
+	virtual void create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name = NULL);
+protected:
+	Widget UILogWindow;
+	Widget form_;
+	Widget text_;
+public:
+	static void freezeCB( Widget, XtPointer, XtPointer );
+	virtual void freezeCB( Widget, XtPointer ) = 0;
+	static void clearCB( Widget, XtPointer, XtPointer );
+	virtual void clearCB( Widget, XtPointer ) = 0;
+	static void closeCB( Widget, XtPointer, XtPointer );
+	virtual void closeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UILogWindow_c *UILogWindow_p;
+
+
+extern UILogWindow_p UILogWindow;
+
+
+#endif
diff --git a/src/MetviewUI/UIMenuLine.cc b/src/MetviewUI/UIMenuLine.cc
new file mode 100755
index 0000000..fcf8ac5
--- /dev/null
+++ b/src/MetviewUI/UIMenuLine.cc
@@ -0,0 +1,93 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/RowColumn.h>
+#include <Xm/CascadeBG.h>
+#include <Xm/LabelG.h>
+
+#include <xdclass.h>
+
+class UIMenuLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIMenuLine;
+	Widget option_;
+	Widget menu_;
+public:
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIMenuLine_c *UIMenuLine_p;
+
+UIMenuLine_p UIMenuLine = (UIMenuLine_p) NULL;
+
+
+
+void UIMenuLine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[2];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget label1 = (Widget)NULL;
+	Widget cascade1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIMenuLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIMenuLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIMenuLine;
+	option_ = XmCreateOptionMenu ( UIMenuLine, "option_", al, ac );
+	label1 = XmOptionLabelGadget ( option_ );
+	cascade1 = XmOptionButtonGadget ( option_ );
+	menu_ = XmCreatePulldownMenu ( option_, "menu_", al, ac );
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+	XtSetValues ( cascade1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( option_,al, ac );
+	ac = 0;
+	XtAddCallback (menu_, XmNentryCallback, activateCB, (XtPointer) this);
+	XtSetArg(al[ac], XmNsubMenuId, menu_); ac++;
+	XtSetValues ( cascade1, al, ac );
+	ac = 0;
+	XtUnmanageChild ( label1 );
+	children[ac++] = option_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIMenuLine_c::activateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIMenuLine_p instance = (UIMenuLine_p) client_data;
+	instance->activateCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIMenuLine.h b/src/MetviewUI/UIMenuLine.h
new file mode 100755
index 0000000..f266e26
--- /dev/null
+++ b/src/MetviewUI/UIMenuLine.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIMenuLine_h
+#define _UIMenuLine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIMenuLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIMenuLine;
+	Widget option_;
+	Widget menu_;
+public:
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIMenuLine_c *UIMenuLine_p;
+
+
+extern UIMenuLine_p UIMenuLine;
+
+
+#endif
diff --git a/src/MetviewUI/UINoEditor.cc b/src/MetviewUI/UINoEditor.cc
new file mode 100755
index 0000000..4602dae
--- /dev/null
+++ b/src/MetviewUI/UINoEditor.cc
@@ -0,0 +1,72 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+
+#include <xdclass.h>
+
+class UINoEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UINoEditor;
+};
+
+typedef UINoEditor_c *UINoEditor_p;
+
+UINoEditor_p UINoEditor = (UINoEditor_p) NULL;
+
+
+
+void UINoEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget label1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UINoEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UINoEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UINoEditor;
+	label1 = XmCreateLabel ( UINoEditor, "No editor defined for this icon", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( label1,al, ac );
+	ac = 0;
+	children[ac++] = label1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
diff --git a/src/MetviewUI/UINoEditor.h b/src/MetviewUI/UINoEditor.h
new file mode 100755
index 0000000..f7b7e41
--- /dev/null
+++ b/src/MetviewUI/UINoEditor.h
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UINoEditor_h
+#define _UINoEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UINoEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UINoEditor;
+};
+
+typedef UINoEditor_c *UINoEditor_p;
+
+
+extern UINoEditor_p UINoEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UINoneLine.cc b/src/MetviewUI/UINoneLine.cc
new file mode 100755
index 0000000..c0f78c6
--- /dev/null
+++ b/src/MetviewUI/UINoneLine.cc
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+
+#include <xdclass.h>
+
+class UINoneLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UINoneLine;
+};
+
+typedef UINoneLine_c *UINoneLine_p;
+
+UINoneLine_p UINoneLine = (UINoneLine_p) NULL;
+
+
+
+void UINoneLine_c::create (Widget parent, char *widget_name)
+{
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UINoneLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UINoneLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UINoneLine;
+}
+
diff --git a/src/MetviewUI/UINoneLine.h b/src/MetviewUI/UINoneLine.h
new file mode 100755
index 0000000..3640322
--- /dev/null
+++ b/src/MetviewUI/UINoneLine.h
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UINoneLine_h
+#define _UINoneLine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UINoneLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UINoneLine;
+};
+
+typedef UINoneLine_c *UINoneLine_p;
+
+
+extern UINoneLine_p UINoneLine;
+
+
+#endif
diff --git a/src/MetviewUI/UIODBEditor.cc b/src/MetviewUI/UIODBEditor.cc
new file mode 100755
index 0000000..14cdee4
--- /dev/null
+++ b/src/MetviewUI/UIODBEditor.cc
@@ -0,0 +1,388 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/ArrowB.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/List.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+#include <Array.h>
+
+#include <xdclass.h>
+
+class UIODBEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIODBEditor;
+	Widget selectList_;
+	Widget add_;
+	Widget remove_;
+	Widget up_;
+	Widget down_;
+	Widget whereText_;
+	Widget insert_;
+	Widget tablesList_;
+	Widget columnsList_;
+	Widget fieldsList_;
+public:
+	static void doubleClickCB( Widget, XtPointer, XtPointer );
+	virtual void doubleClickCB( Widget, XtPointer ) = 0;
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+	static void downCB( Widget, XtPointer, XtPointer );
+	virtual void downCB( Widget, XtPointer ) = 0;
+	static void upCB( Widget, XtPointer, XtPointer );
+	virtual void upCB( Widget, XtPointer ) = 0;
+	static void insertCB( Widget, XtPointer, XtPointer );
+	virtual void insertCB( Widget, XtPointer ) = 0;
+	static void removeCB( Widget, XtPointer, XtPointer );
+	virtual void removeCB( Widget, XtPointer ) = 0;
+	static void addCB( Widget, XtPointer, XtPointer );
+	virtual void addCB( Widget, XtPointer ) = 0;
+	static void browseSelectCB( Widget, XtPointer, XtPointer );
+	virtual void browseSelectCB( Widget, XtPointer ) = 0;
+	static void browseFieldsCB( Widget, XtPointer, XtPointer );
+	virtual void browseFieldsCB( Widget, XtPointer ) = 0;
+	static void browseColumnsCB( Widget, XtPointer, XtPointer );
+	virtual void browseColumnsCB( Widget, XtPointer ) = 0;
+	static void browseTablesCB( Widget, XtPointer, XtPointer );
+	virtual void browseTablesCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIODBEditor_c *UIODBEditor_p;
+
+UIODBEditor_p UIODBEditor = (UIODBEditor_p) NULL;
+
+
+
+void UIODBEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget frame2 = (Widget)NULL;
+	Widget form4 = (Widget)NULL;
+	Widget scrolledList5 = (Widget)NULL;
+	Widget rowcol1 = (Widget)NULL;
+	Widget label3 = (Widget)NULL;
+	Widget frame3 = (Widget)NULL;
+	Widget form3 = (Widget)NULL;
+	Widget scrolledText1 = (Widget)NULL;
+	Widget rowcol2 = (Widget)NULL;
+	Widget label4 = (Widget)NULL;
+	Widget frame4 = (Widget)NULL;
+	Widget drawingArea1 = (Widget)NULL;
+	Widget scrolledList1 = (Widget)NULL;
+	Widget scrolledList2 = (Widget)NULL;
+	Widget scrolledList3 = (Widget)NULL;
+	Widget label6 = (Widget)NULL;
+	Widget frame5 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget text1 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget label5 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIODBEditor";
+
+	XtSetArg(al[ac], XmNheight, 500); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIODBEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIODBEditor;
+	frame2 = XmCreateFrame ( UIODBEditor, "frame2", al, ac );
+	form4 = XmCreateForm ( frame2, "form4", al, ac );
+	XtSetArg(al[ac], XmNvisibleItemCount, 6); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	selectList_ = XmCreateScrolledList ( form4, "selectList_", al, ac );
+	ac = 0;
+	scrolledList5 = XtParent ( selectList_ );
+
+	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
+	rowcol1 = XmCreateRowColumn ( form4, "rowcol1", al, ac );
+	ac = 0;
+	add_ = XmCreatePushButton ( rowcol1, "Add", al, ac );
+	remove_ = XmCreatePushButton ( rowcol1, "Remove", al, ac );
+	up_ = XmCreateArrowButton ( rowcol1, "up_", al, ac );
+	XtSetArg(al[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
+	down_ = XmCreateArrowButton ( rowcol1, "down_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label3 = XmCreateLabel ( frame2, "Select:", al, ac );
+	ac = 0;
+	frame3 = XmCreateFrame ( UIODBEditor, "frame3", al, ac );
+	form3 = XmCreateForm ( frame3, "form3", al, ac );
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 5); ac++;
+	XtSetArg(al[ac], XmNwordWrap, TRUE); ac++;
+	XtSetArg(al[ac], XmNscrollHorizontal, FALSE); ac++;
+	whereText_ = XmCreateScrolledText ( form3, "whereText_", al, ac );
+	ac = 0;
+	scrolledText1 = XtParent ( whereText_ );
+
+	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
+	rowcol2 = XmCreateRowColumn ( form3, "rowcol2", al, ac );
+	ac = 0;
+	insert_ = XmCreatePushButton ( rowcol2, "Insert ", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label4 = XmCreateLabel ( frame3, "Where:", al, ac );
+	ac = 0;
+	frame4 = XmCreateFrame ( UIODBEditor, "frame4", al, ac );
+	XtSetArg(al[ac], XmNcolumns, 3); ac++;
+	drawingArea1 = XtCreateWidget("drawingArea1", arrayWidgetClass, frame4, al, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNvisibleItemCount, 1); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	tablesList_ = XmCreateScrolledList ( drawingArea1, "tablesList_", al, ac );
+	ac = 0;
+	scrolledList1 = XtParent ( tablesList_ );
+
+	XtSetArg(al[ac], XmNvisibleItemCount, 1); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	columnsList_ = XmCreateScrolledList ( drawingArea1, "columnsList_", al, ac );
+	ac = 0;
+	scrolledList2 = XtParent ( columnsList_ );
+
+	XtSetArg(al[ac], XmNvisibleItemCount, 1); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	fieldsList_ = XmCreateScrolledList ( drawingArea1, "fieldsList_", al, ac );
+	ac = 0;
+	scrolledList3 = XtParent ( fieldsList_ );
+
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label6 = XmCreateLabel ( frame4, "Content:", al, ac );
+	ac = 0;
+	frame5 = XmCreateFrame ( UIODBEditor, "frame5", al, ac );
+	form1 = XmCreateForm ( frame5, "form1", al, ac );
+	text1 = XmCreateText ( form1, "text1", al, ac );
+	label1 = XmCreateLabel ( form1, "label1", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label5 = XmCreateLabel ( frame5, "Database:", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, frame3); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, frame5); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, frame2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame4,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( frame5,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNrightWidget, rowcol1); ac++;
+	XtSetValues ( scrolledList5,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol1,al, ac );
+	ac = 0;
+	XtAddCallback (selectList_, XmNbrowseSelectionCallback, browseSelectCB, (XtPointer) this);
+	XtManageChild(selectList_);
+	XtAddCallback (add_, XmNactivateCallback, addCB, (XtPointer) this);
+	XtAddCallback (remove_, XmNactivateCallback, removeCB, (XtPointer) this);
+	XtAddCallback (up_, XmNactivateCallback, upCB, (XtPointer) this);
+	XtAddCallback (down_, XmNactivateCallback, downCB, (XtPointer) this);
+	children[ac++] = add_;
+	children[ac++] = remove_;
+	children[ac++] = up_;
+	children[ac++] = down_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form4;
+	children[ac++] = label3;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNrightWidget, rowcol2); ac++;
+	XtSetValues ( scrolledText1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol2,al, ac );
+	ac = 0;
+	XtAddCallback (whereText_, XmNvalueChangedCallback, changedCB, (XtPointer) this);
+	XtManageChild(whereText_);
+	XtAddCallback (insert_, XmNactivateCallback, insertCB, (XtPointer) this);
+	children[ac++] = insert_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form3;
+	children[ac++] = label4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (tablesList_, XmNbrowseSelectionCallback, browseTablesCB, (XtPointer) this);
+	XtManageChild(tablesList_);
+	XtAddCallback (columnsList_, XmNdefaultActionCallback, doubleClickCB, (XtPointer) this);
+	XtAddCallback (columnsList_, XmNbrowseSelectionCallback, browseColumnsCB, (XtPointer) this);
+	XtManageChild(columnsList_);
+	XtAddCallback (fieldsList_, XmNdefaultActionCallback, doubleClickCB, (XtPointer) this);
+	XtAddCallback (fieldsList_, XmNbrowseSelectionCallback, browseFieldsCB, (XtPointer) this);
+	XtManageChild(fieldsList_);
+	children[ac++] = drawingArea1;
+	children[ac++] = label6;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, label1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( text1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( label1,al, ac );
+	ac = 0;
+	children[ac++] = text1;
+	children[ac++] = label1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	children[ac++] = label5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame2;
+	children[ac++] = frame3;
+	children[ac++] = frame4;
+	children[ac++] = frame5;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIODBEditor_c::doubleClickCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->doubleClickCB ( widget, call_data );
+}
+
+void UIODBEditor_c::changedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->changedCB ( widget, call_data );
+}
+
+void UIODBEditor_c::downCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->downCB ( widget, call_data );
+}
+
+void UIODBEditor_c::upCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->upCB ( widget, call_data );
+}
+
+void UIODBEditor_c::insertCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->insertCB ( widget, call_data );
+}
+
+void UIODBEditor_c::removeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->removeCB ( widget, call_data );
+}
+
+void UIODBEditor_c::addCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->addCB ( widget, call_data );
+}
+
+void UIODBEditor_c::browseSelectCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->browseSelectCB ( widget, call_data );
+}
+
+void UIODBEditor_c::browseFieldsCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->browseFieldsCB ( widget, call_data );
+}
+
+void UIODBEditor_c::browseColumnsCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->browseColumnsCB ( widget, call_data );
+}
+
+void UIODBEditor_c::browseTablesCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBEditor_p instance = (UIODBEditor_p) client_data;
+	instance->browseTablesCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIODBEditor.h b/src/MetviewUI/UIODBEditor.h
new file mode 100755
index 0000000..32e77b0
--- /dev/null
+++ b/src/MetviewUI/UIODBEditor.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIODBEditor_h
+#define _UIODBEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIODBEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIODBEditor;
+	Widget selectList_;
+	Widget add_;
+	Widget remove_;
+	Widget up_;
+	Widget down_;
+	Widget whereText_;
+	Widget insert_;
+	Widget tablesList_;
+	Widget columnsList_;
+	Widget fieldsList_;
+public:
+	static void doubleClickCB( Widget, XtPointer, XtPointer );
+	virtual void doubleClickCB( Widget, XtPointer ) = 0;
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+	static void downCB( Widget, XtPointer, XtPointer );
+	virtual void downCB( Widget, XtPointer ) = 0;
+	static void upCB( Widget, XtPointer, XtPointer );
+	virtual void upCB( Widget, XtPointer ) = 0;
+	static void insertCB( Widget, XtPointer, XtPointer );
+	virtual void insertCB( Widget, XtPointer ) = 0;
+	static void removeCB( Widget, XtPointer, XtPointer );
+	virtual void removeCB( Widget, XtPointer ) = 0;
+	static void addCB( Widget, XtPointer, XtPointer );
+	virtual void addCB( Widget, XtPointer ) = 0;
+	static void browseSelectCB( Widget, XtPointer, XtPointer );
+	virtual void browseSelectCB( Widget, XtPointer ) = 0;
+	static void browseFieldsCB( Widget, XtPointer, XtPointer );
+	virtual void browseFieldsCB( Widget, XtPointer ) = 0;
+	static void browseColumnsCB( Widget, XtPointer, XtPointer );
+	virtual void browseColumnsCB( Widget, XtPointer ) = 0;
+	static void browseTablesCB( Widget, XtPointer, XtPointer );
+	virtual void browseTablesCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIODBEditor_c *UIODBEditor_p;
+
+
+extern UIODBEditor_p UIODBEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UIODBFunctionsDrawer.cc b/src/MetviewUI/UIODBFunctionsDrawer.cc
new file mode 100755
index 0000000..ce39c3c
--- /dev/null
+++ b/src/MetviewUI/UIODBFunctionsDrawer.cc
@@ -0,0 +1,206 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/List.h>
+#include <Xm/ScrollBar.h>
+#include <Array.h>
+
+#include <xdclass.h>
+
+class UIODBFunctionsDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIODBFunctionsDrawer;
+	Widget operators_;
+	Widget functions_;
+	Widget contants_;
+	Widget help_;
+public:
+	static void browseCB( Widget, XtPointer, XtPointer );
+	virtual void browseCB( Widget, XtPointer ) = 0;
+	static void doubleClickCB( Widget, XtPointer, XtPointer );
+	virtual void doubleClickCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIODBFunctionsDrawer_c *UIODBFunctionsDrawer_p;
+
+UIODBFunctionsDrawer_p UIODBFunctionsDrawer = (UIODBFunctionsDrawer_p) NULL;
+
+
+
+void UIODBFunctionsDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget drawingArea1 = (Widget)NULL;
+	Widget form2 = (Widget)NULL;
+	Widget label2 = (Widget)NULL;
+	Widget scrolledList2 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget scrolledList1 = (Widget)NULL;
+	Widget form3 = (Widget)NULL;
+	Widget label3 = (Widget)NULL;
+	Widget scrolledList3 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Functions";
+
+	XtSetArg(al[ac], XmNheight, 128); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIODBFunctionsDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIODBFunctionsDrawer;
+	XtSetArg(al[ac], XmNcolumns, 3); ac++;
+	drawingArea1 = XtCreateWidget("drawingArea1", arrayWidgetClass, UIODBFunctionsDrawer, al, ac);
+	ac = 0;
+	form2 = XmCreateForm ( drawingArea1, "form2", al, ac );
+	label2 = XmCreateLabel ( form2, "Operators", al, ac );
+	XtSetArg(al[ac], XmNvisibleItemCount, 3); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	operators_ = XmCreateScrolledList ( form2, "operators_", al, ac );
+	ac = 0;
+	scrolledList2 = XtParent ( operators_ );
+
+	form1 = XmCreateForm ( drawingArea1, "form1", al, ac );
+	label1 = XmCreateLabel ( form1, "Functions", al, ac );
+	XtSetArg(al[ac], XmNvisibleItemCount, 3); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	functions_ = XmCreateScrolledList ( form1, "functions_", al, ac );
+	ac = 0;
+	scrolledList1 = XtParent ( functions_ );
+
+	form3 = XmCreateForm ( drawingArea1, "form3", al, ac );
+	label3 = XmCreateLabel ( form3, "Constants", al, ac );
+	XtSetArg(al[ac], XmNvisibleItemCount, 3); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	contants_ = XmCreateScrolledList ( form3, "contants_", al, ac );
+	ac = 0;
+	scrolledList3 = XtParent ( contants_ );
+
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
+	help_ = XmCreateLabel ( UIODBFunctionsDrawer, "-", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, help_); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( drawingArea1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( help_,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( label2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, label2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledList2,al, ac );
+	ac = 0;
+	XtAddCallback (operators_, XmNbrowseSelectionCallback, browseCB, (XtPointer) this);
+	XtAddCallback (operators_, XmNdefaultActionCallback, doubleClickCB, (XtPointer) this);
+	XtManageChild(operators_);
+	children[ac++] = label2;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( label1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, label1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledList1,al, ac );
+	ac = 0;
+	XtAddCallback (functions_, XmNbrowseSelectionCallback, browseCB, (XtPointer) this);
+	XtAddCallback (functions_, XmNdefaultActionCallback, doubleClickCB, (XtPointer) this);
+	XtManageChild(functions_);
+	children[ac++] = label1;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( label3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, label3); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledList3,al, ac );
+	ac = 0;
+	XtAddCallback (contants_, XmNbrowseSelectionCallback, browseCB, (XtPointer) this);
+	XtAddCallback (contants_, XmNdefaultActionCallback, doubleClickCB, (XtPointer) this);
+	XtManageChild(contants_);
+	children[ac++] = label3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form2;
+	children[ac++] = form1;
+	children[ac++] = form3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drawingArea1;
+	children[ac++] = help_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIODBFunctionsDrawer_c::browseCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBFunctionsDrawer_p instance = (UIODBFunctionsDrawer_p) client_data;
+	instance->browseCB ( widget, call_data );
+}
+
+void UIODBFunctionsDrawer_c::doubleClickCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIODBFunctionsDrawer_p instance = (UIODBFunctionsDrawer_p) client_data;
+	instance->doubleClickCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIODBFunctionsDrawer.h b/src/MetviewUI/UIODBFunctionsDrawer.h
new file mode 100755
index 0000000..c8c3be5
--- /dev/null
+++ b/src/MetviewUI/UIODBFunctionsDrawer.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIODBFunctionsDrawer_h
+#define _UIODBFunctionsDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIODBFunctionsDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIODBFunctionsDrawer;
+	Widget operators_;
+	Widget functions_;
+	Widget contants_;
+	Widget help_;
+public:
+	static void browseCB( Widget, XtPointer, XtPointer );
+	virtual void browseCB( Widget, XtPointer ) = 0;
+	static void doubleClickCB( Widget, XtPointer, XtPointer );
+	virtual void doubleClickCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIODBFunctionsDrawer_c *UIODBFunctionsDrawer_p;
+
+
+extern UIODBFunctionsDrawer_p UIODBFunctionsDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIOutputDrawer.cc b/src/MetviewUI/UIOutputDrawer.cc
new file mode 100755
index 0000000..130cf74
--- /dev/null
+++ b/src/MetviewUI/UIOutputDrawer.cc
@@ -0,0 +1,87 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+#include <xdclass.h>
+
+class UIOutputDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIOutputDrawer;
+	Widget text_;
+public:
+	static void clickCB( Widget, XtPointer, XtPointer );
+	virtual void clickCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIOutputDrawer_c *UIOutputDrawer_p;
+
+UIOutputDrawer_p UIOutputDrawer = (UIOutputDrawer_p) NULL;
+
+
+
+void UIOutputDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledText1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Output";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIOutputDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIOutputDrawer;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 10); ac++;
+	text_ = XmCreateScrolledText ( UIOutputDrawer, "text_", al, ac );
+	ac = 0;
+	scrolledText1 = XtParent ( text_ );
+
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( scrolledText1,al, ac );
+	ac = 0;
+	XtAddCallback (text_, XmNmotionVerifyCallback, clickCB, (XtPointer) this);
+	XtManageChild(text_);
+}
+
+void UIOutputDrawer_c::clickCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIOutputDrawer_p instance = (UIOutputDrawer_p) client_data;
+	instance->clickCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIOutputDrawer.h b/src/MetviewUI/UIOutputDrawer.h
new file mode 100755
index 0000000..e3574e2
--- /dev/null
+++ b/src/MetviewUI/UIOutputDrawer.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIOutputDrawer_h
+#define _UIOutputDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIOutputDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIOutputDrawer;
+	Widget text_;
+public:
+	static void clickCB( Widget, XtPointer, XtPointer );
+	virtual void clickCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIOutputDrawer_c *UIOutputDrawer_p;
+
+
+extern UIOutputDrawer_p UIOutputDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIPaperDrawer.cc b/src/MetviewUI/UIPaperDrawer.cc
new file mode 100755
index 0000000..130583c
--- /dev/null
+++ b/src/MetviewUI/UIPaperDrawer.cc
@@ -0,0 +1,170 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/TextF.h>
+
+#include <xdclass.h>
+
+class UIPaperDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIPaperDrawer;
+	Widget height_;
+	Widget width_;
+public:
+	static void a3CB( Widget, XtPointer, XtPointer );
+	virtual void a3CB( Widget, XtPointer ) = 0;
+	static void a4CB( Widget, XtPointer, XtPointer );
+	virtual void a4CB( Widget, XtPointer ) = 0;
+	static void rotateCB( Widget, XtPointer, XtPointer );
+	virtual void rotateCB( Widget, XtPointer ) = 0;
+	static void setCB( Widget, XtPointer, XtPointer );
+	virtual void setCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIPaperDrawer_c *UIPaperDrawer_p;
+
+UIPaperDrawer_p UIPaperDrawer = (UIPaperDrawer_p) NULL;
+
+
+
+void UIPaperDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget rowcol1 = (Widget)NULL;
+	Widget frame1 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget frame2 = (Widget)NULL;
+	Widget label2 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget rowcol2 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Paper";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIPaperDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIPaperDrawer;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	rowcol1 = XmCreateRowColumn ( UIPaperDrawer, "rowcol1", al, ac );
+	ac = 0;
+	frame1 = XmCreateFrame ( rowcol1, "frame1", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label1 = XmCreateLabel ( frame1, "Height:", al, ac );
+	ac = 0;
+	height_ = XmCreateTextField ( frame1, "height_", al, ac );
+	frame2 = XmCreateFrame ( rowcol1, "frame2", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label2 = XmCreateLabel ( frame2, "Width:", al, ac );
+	ac = 0;
+	width_ = XmCreateTextField ( frame2, "width_", al, ac );
+	form1 = XmCreateForm ( rowcol1, "form1", al, ac );
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	rowcol2 = XmCreateRowColumn ( form1, "rowcol2", al, ac );
+	ac = 0;
+	button4 = XmCreatePushButton ( rowcol2, "Set", al, ac );
+	button1 = XmCreatePushButton ( rowcol2, "Rotate", al, ac );
+	button2 = XmCreatePushButton ( rowcol2, "A4", al, ac );
+	button3 = XmCreatePushButton ( rowcol2, "A3", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol1,al, ac );
+	ac = 0;
+	children[ac++] = label1;
+	children[ac++] = height_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = label2;
+	children[ac++] = width_;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( rowcol2,al, ac );
+	ac = 0;
+	XtAddCallback (button4, XmNactivateCallback, setCB, (XtPointer) this);
+	XtAddCallback (button1, XmNactivateCallback, rotateCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, a4CB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, a3CB, (XtPointer) this);
+	children[ac++] = button4;
+	children[ac++] = button1;
+	children[ac++] = button2;
+	children[ac++] = button3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame1;
+	children[ac++] = frame2;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = rowcol1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIPaperDrawer_c::a3CB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIPaperDrawer_p instance = (UIPaperDrawer_p) client_data;
+	instance->a3CB ( widget, call_data );
+}
+
+void UIPaperDrawer_c::a4CB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIPaperDrawer_p instance = (UIPaperDrawer_p) client_data;
+	instance->a4CB ( widget, call_data );
+}
+
+void UIPaperDrawer_c::rotateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIPaperDrawer_p instance = (UIPaperDrawer_p) client_data;
+	instance->rotateCB ( widget, call_data );
+}
+
+void UIPaperDrawer_c::setCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIPaperDrawer_p instance = (UIPaperDrawer_p) client_data;
+	instance->setCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIPaperDrawer.h b/src/MetviewUI/UIPaperDrawer.h
new file mode 100755
index 0000000..8358ea7
--- /dev/null
+++ b/src/MetviewUI/UIPaperDrawer.h
@@ -0,0 +1,44 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIPaperDrawer_h
+#define _UIPaperDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIPaperDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIPaperDrawer;
+	Widget height_;
+	Widget width_;
+public:
+	static void a3CB( Widget, XtPointer, XtPointer );
+	virtual void a3CB( Widget, XtPointer ) = 0;
+	static void a4CB( Widget, XtPointer, XtPointer );
+	virtual void a4CB( Widget, XtPointer ) = 0;
+	static void rotateCB( Widget, XtPointer, XtPointer );
+	virtual void rotateCB( Widget, XtPointer ) = 0;
+	static void setCB( Widget, XtPointer, XtPointer );
+	virtual void setCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIPaperDrawer_c *UIPaperDrawer_p;
+
+
+extern UIPaperDrawer_p UIPaperDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIParamEditor.cc b/src/MetviewUI/UIParamEditor.cc
new file mode 100755
index 0000000..6d39ba5
--- /dev/null
+++ b/src/MetviewUI/UIParamEditor.cc
@@ -0,0 +1,209 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+#include <Array.h>
+
+#include <xdclass.h>
+
+class UIParamEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIParamEditor;
+	Widget drag_;
+	Widget menu_;
+	Widget Macro;
+	Widget editor_;
+public:
+	static void removeCB( Widget, XtPointer, XtPointer );
+	virtual void removeCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIParamEditor_c *UIParamEditor_p;
+
+UIParamEditor_p UIParamEditor = (UIParamEditor_p) NULL;
+
+
+
+void UIParamEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[4];      /* Children to manage */
+	Display *display = XtDisplay ( parent );
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XrmValue from_value, to_value; /* For resource conversion */
+	Widget form1 = (Widget)NULL;
+	Widget frame1 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget drawingArea4 = (Widget)NULL;
+	Widget drawingArea3 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "UIParamEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIParamEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIParamEditor;
+	form1 = XmCreateForm ( UIParamEditor, "form1", al, ac );
+	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(display)) != 1) {
+	from_value.addr = "oldlace" ;
+	from_value.size = strlen( from_value.addr ) + 1;
+	to_value.addr = NULL;
+	XtConvertAndStore (form1, XmRString, &from_value, XmRPixel, &to_value);
+	if ( to_value.addr )
+	{
+		XtSetArg(al[ac], XmNbackground, *(unsigned int *)to_value.addr); ac++;
+	}
+	}
+	XtSetArg(al[ac], XmNshadowType, XmSHADOW_IN); ac++;
+	frame1 = XmCreateFrame ( form1, "frame1", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 300); ac++;
+	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(display)) != 1) {
+	from_value.addr = "oldlace" ;
+	from_value.size = strlen( from_value.addr ) + 1;
+	to_value.addr = NULL;
+	XtConvertAndStore (frame1, XmRString, &from_value, XmRPixel, &to_value);
+	if ( to_value.addr )
+	{
+		XtSetArg(al[ac], XmNbackground, *(unsigned int *)to_value.addr); ac++;
+	}
+	}
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, frame1, al, ac);
+	ac = 0;
+	menu_ = XmCreatePopupMenu ( drag_, "menu_", al, ac );
+	label1 = XmCreateLabel ( menu_, "title", al, ac );
+	separator1 = XmCreateSeparator ( menu_, "separator1", al, ac );
+	button1 = XmCreatePushButton ( menu_, "edit", al, ac );
+	button2 = XmCreatePushButton ( menu_, "remove", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	Macro = XmCreateLabel ( frame1, "Macro", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 70); ac++;
+	drawingArea4 = XmCreateDrawingArea ( form1, "drawingArea4", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 350); ac++;
+	drawingArea3 = XmCreateDrawingArea ( form1, "drawingArea3", al, ac );
+	ac = 0;
+	editor_ = XtCreateWidget("editor_", arrayWidgetClass, form1, al, ac);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( form1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, drawingArea4); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( frame1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( drawingArea4,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 73); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( drawingArea3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNtopWidget, frame1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( editor_,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, editCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, removeCB, (XtPointer) this);
+	children[ac++] = label1;
+	children[ac++] = separator1;
+	children[ac++] = button1;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag_;
+	children[ac++] = Macro;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame1;
+	children[ac++] = drawingArea4;
+	children[ac++] = drawingArea3;
+	children[ac++] = editor_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIParamEditor_c::removeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIParamEditor_p instance = (UIParamEditor_p) client_data;
+	instance->removeCB ( widget, call_data );
+}
+
+void UIParamEditor_c::editCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIParamEditor_p instance = (UIParamEditor_p) client_data;
+	instance->editCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIParamEditor.h b/src/MetviewUI/UIParamEditor.h
new file mode 100755
index 0000000..7b4582f
--- /dev/null
+++ b/src/MetviewUI/UIParamEditor.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIParamEditor_h
+#define _UIParamEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIParamEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIParamEditor;
+	Widget drag_;
+	Widget menu_;
+	Widget Macro;
+	Widget editor_;
+public:
+	static void removeCB( Widget, XtPointer, XtPointer );
+	virtual void removeCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIParamEditor_c *UIParamEditor_p;
+
+
+extern UIParamEditor_p UIParamEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UIRequestPanel.cc b/src/MetviewUI/UIRequestPanel.cc
new file mode 100755
index 0000000..a4d2dcd
--- /dev/null
+++ b/src/MetviewUI/UIRequestPanel.cc
@@ -0,0 +1,107 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+
+#include "xdclass.h"
+
+class UIRequestPanel_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIRequestPanel;
+	Widget rowcol_;
+};
+
+typedef UIRequestPanel_c *UIRequestPanel_p;
+
+UIRequestPanel_p UIRequestPanel = (UIRequestPanel_p) NULL;
+
+
+
+void UIRequestPanel_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Display *display = XtDisplay ( parent );
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XrmValue from_value, to_value; /* For resource conversion */
+	XPointer to_address; /* For Thread-safe resource conversion */ 
+	Pixel to_pixel; /* For Thread-safe resource conversion */ 
+	XtPointer tmp_value;             /* ditto */
+	Widget widget2 = (Widget)NULL;
+	Widget widget3 = (Widget)NULL;
+	Widget widget4 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = (char *) "UIRequestPanel";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIRequestPanel = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIRequestPanel;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	widget2 = XmCreateScrolledWindow ( UIRequestPanel, (char *) "widget2", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &widget3); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &widget4); ac++;
+	XtGetValues(widget2, al, ac );
+	ac = 0;
+	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(display)) != 1) {
+
+		from_value.addr = "#e0d5e0d5e0d5" ;
+		from_value.size = strlen( from_value.addr ) + 1;
+		to_value.size = sizeof(Pixel);
+		to_value.addr = (XPointer) &to_pixel;
+		XtConvertAndStore (widget2, XmRString, &from_value, XmRPixel, &to_value);
+
+		if ( to_value.addr ) {
+			XtSetArg(al[ac], XmNbackground, (*((Pixel*) to_value.addr))); ac++;
+		}
+	}
+	rowcol_ = XmCreateRowColumn ( widget2, (char *) "rowcol_", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( widget2, al, ac );
+	ac = 0;
+	if ((children[ac] = rowcol_) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+	XtVaSetValues(widget2,
+	              XmNhorizontalScrollBar, widget3,
+	              XmNverticalScrollBar, widget4,
+	              XmNworkWindow, rowcol_,
+	              NULL);
+	if ((children[ac] = widget2) != (Widget) 0) { ac++; }
+	if (ac > 0) { XtManageChildren(children, ac); }
+	ac = 0;
+}
+
diff --git a/src/MetviewUI/UIRequestPanel.h b/src/MetviewUI/UIRequestPanel.h
new file mode 100755
index 0000000..cbf5999
--- /dev/null
+++ b/src/MetviewUI/UIRequestPanel.h
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIRequestPanel_h
+#define _UIRequestPanel_h
+
+#define XD_MOTIF
+
+#include "xdclass.h"
+
+class UIRequestPanel_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIRequestPanel;
+	Widget rowcol_;
+};
+
+typedef UIRequestPanel_c *UIRequestPanel_p;
+
+
+extern UIRequestPanel_p UIRequestPanel;
+
+
+
+#endif
diff --git a/src/MetviewUI/UISQLDrawer.cc b/src/MetviewUI/UISQLDrawer.cc
new file mode 100755
index 0000000..16ed2c2
--- /dev/null
+++ b/src/MetviewUI/UISQLDrawer.cc
@@ -0,0 +1,78 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+#include <xdclass.h>
+
+class UISQLDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UISQLDrawer;
+	Widget text_;
+};
+
+typedef UISQLDrawer_c *UISQLDrawer_p;
+
+UISQLDrawer_p UISQLDrawer = (UISQLDrawer_p) NULL;
+
+
+
+void UISQLDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledText1 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "SQL";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UISQLDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UISQLDrawer;
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 10); ac++;
+	text_ = XmCreateScrolledText ( UISQLDrawer, "text_", al, ac );
+	ac = 0;
+	scrolledText1 = XtParent ( text_ );
+
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( scrolledText1,al, ac );
+	ac = 0;
+	XtManageChild(text_);
+}
+
diff --git a/src/MetviewUI/UISQLDrawer.h b/src/MetviewUI/UISQLDrawer.h
new file mode 100755
index 0000000..4573f27
--- /dev/null
+++ b/src/MetviewUI/UISQLDrawer.h
@@ -0,0 +1,34 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UISQLDrawer_h
+#define _UISQLDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UISQLDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UISQLDrawer;
+	Widget text_;
+};
+
+typedef UISQLDrawer_c *UISQLDrawer_p;
+
+
+extern UISQLDrawer_p UISQLDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UIScaleLine.cc b/src/MetviewUI/UIScaleLine.cc
new file mode 100755
index 0000000..e2eb30a
--- /dev/null
+++ b/src/MetviewUI/UIScaleLine.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Scale.h>
+
+#include <xdclass.h>
+
+class UIScaleLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIScaleLine;
+	Widget scale_;
+public:
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIScaleLine_c *UIScaleLine_p;
+
+UIScaleLine_p UIScaleLine = (UIScaleLine_p) NULL;
+
+
+
+void UIScaleLine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UIScaleLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIScaleLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIScaleLine;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNprocessingDirection, XmMAX_ON_RIGHT); ac++;
+	scale_ = XmCreateScale ( UIScaleLine, "scale_", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scale_,al, ac );
+	ac = 0;
+	XtAddCallback (scale_, XmNvalueChangedCallback, changedCB, (XtPointer) this);
+	children[ac++] = scale_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIScaleLine_c::changedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIScaleLine_p instance = (UIScaleLine_p) client_data;
+	instance->changedCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIScaleLine.h b/src/MetviewUI/UIScaleLine.h
new file mode 100755
index 0000000..c1e2f0b
--- /dev/null
+++ b/src/MetviewUI/UIScaleLine.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIScaleLine_h
+#define _UIScaleLine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIScaleLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIScaleLine;
+	Widget scale_;
+public:
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIScaleLine_c *UIScaleLine_p;
+
+
+extern UIScaleLine_p UIScaleLine;
+
+
+#endif
diff --git a/src/MetviewUI/UIScriptHelp.cc b/src/MetviewUI/UIScriptHelp.cc
new file mode 100755
index 0000000..765d3b8
--- /dev/null
+++ b/src/MetviewUI/UIScriptHelp.cc
@@ -0,0 +1,137 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+#include <Xm/Protocols.h>
+#include "UIScriptHelp.h"
+
+UIScriptHelp_p UIScriptHelp = (UIScriptHelp_p) NULL;
+
+
+
+void UIScriptHelp_c::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledText1 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget form2 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+
+	if ( !app_class_name )
+		app_class_name = "XApplication";
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	UIScriptHelp = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIScriptHelp;
+	XmAddWMProtocolCallback( UIScriptHelp, XmInternAtom(XtDisplay(UIScriptHelp), "WM_DELETE_WINDOW", False), closeCB, (XtPointer) this);
+	XtSetArg(al[ac], XmNwidth, 500); ac++;
+	XtSetArg(al[ac], XmNheight, 500); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form_ = XmCreateForm ( UIScriptHelp, "form_", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	text_ = XmCreateScrolledText ( form_, "text_", al, ac );
+	ac = 0;
+	scrolledText1 = XtParent ( text_ );
+
+	form1 = XmCreateForm ( form_, "form1", al, ac );
+	progressLabel_ = XmCreateLabel ( form1, "progressLabel_", al, ac );
+	form2 = XmCreateForm ( form_, "form2", al, ac );
+	button2 = XmCreatePushButton ( form2, "Close", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, form1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, form2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledText1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( form1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( form2,al, ac );
+	ac = 0;
+	XtManageChild(text_);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( progressLabel_,al, ac );
+	ac = 0;
+	children[ac++] = progressLabel_;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( button2,al, ac );
+	ac = 0;
+	XtAddCallback (button2, XmNactivateCallback, closeCB, (XtPointer) this);
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = form1;
+	children[ac++] = form2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form_);
+}
+
+void UIScriptHelp_c::closeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIScriptHelp_p instance = (UIScriptHelp_p) client_data;
+	instance->closeCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIScriptHelp.h b/src/MetviewUI/UIScriptHelp.h
new file mode 100755
index 0000000..9600658
--- /dev/null
+++ b/src/MetviewUI/UIScriptHelp.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIScriptHelp_h
+#define _UIScriptHelp_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIScriptHelp_c: public xd_ApplicationShell_c {
+public:
+	virtual void create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name = NULL);
+protected:
+	Widget UIScriptHelp;
+	Widget form_;
+	Widget text_;
+	Widget progressLabel_;
+public:
+	static void closeCB( Widget, XtPointer, XtPointer );
+	virtual void closeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIScriptHelp_c *UIScriptHelp_p;
+
+
+extern UIScriptHelp_p UIScriptHelp;
+
+
+#endif
diff --git a/src/MetviewUI/UIScrolledText.cc b/src/MetviewUI/UIScrolledText.cc
new file mode 100644
index 0000000..ab54cbd
--- /dev/null
+++ b/src/MetviewUI/UIScrolledText.cc
@@ -0,0 +1,103 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+#include <xdclass.h>
+
+class UIScrolledText_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIScrolledText;
+	Widget scrolledText_;
+	Widget scrollbarH_;
+	Widget scrollbarV_;
+	Widget text_;
+public:
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIScrolledText_c *UIScrolledText_p;
+
+UIScrolledText_p UIScrolledText = (UIScrolledText_p) NULL;
+
+
+
+void UIScrolledText_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XtPointer tmp_value;             /* ditto */
+
+	if ( !widget_name )
+		widget_name = (char *) "UIScrolledText";
+
+	XtSetArg(al[ac], XmNwidth, 294); ac++;
+	XtSetArg(al[ac], XmNheight, 150); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIScrolledText = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIScrolledText;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	text_ = XmCreateScrolledText ( UIScrolledText, (char *) "text_", al, ac );
+	ac = 0;
+	scrolledText_ = XtParent ( text_ );
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbarH_); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbarV_); ac++;
+	XtGetValues(scrolledText_, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 294); ac++;
+	XtSetArg(al[ac], XmNheight, 145); ac++;
+	if (scrolledText_)
+		XtSetValues ( scrolledText_, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledText_, al, ac );
+	ac = 0;
+	XtAddCallback (text_, XmNvalueChangedCallback, &UIScrolledText_c::changedCB, (XtPointer) this);
+	XtAddCallback (text_, XmNactivateCallback, &UIScrolledText_c::activateCB, (XtPointer) this);
+	if (text_ != (Widget) 0) { XtManageChild(text_); }
+}
+
+void UIScrolledText_c::changedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIScrolledText_p instance = (UIScrolledText_p) client_data;
+	instance->changedCB ( widget, call_data );
+}
+
+void UIScrolledText_c::activateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIScrolledText_p instance = (UIScrolledText_p) client_data;
+	instance->activateCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIScrolledText.h b/src/MetviewUI/UIScrolledText.h
new file mode 100644
index 0000000..f7de529
--- /dev/null
+++ b/src/MetviewUI/UIScrolledText.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIScrolledText_h
+#define _UIScrolledText_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIScrolledText_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIScrolledText;
+	Widget scrolledText_;
+	Widget scrollbarH_;
+	Widget scrollbarV_;
+	Widget text_;
+public:
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIScrolledText_c *UIScrolledText_p;
+
+
+extern UIScrolledText_p UIScrolledText;
+
+
+
+#endif
diff --git a/src/MetviewUI/UISimpleEditor.cc b/src/MetviewUI/UISimpleEditor.cc
new file mode 100755
index 0000000..23b8bf5
--- /dev/null
+++ b/src/MetviewUI/UISimpleEditor.cc
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Array.h>
+
+#include <xdclass.h>
+
+class UISimpleEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UISimpleEditor;
+	Widget where_;
+};
+
+typedef UISimpleEditor_c *UISimpleEditor_p;
+
+UISimpleEditor_p UISimpleEditor = (UISimpleEditor_p) NULL;
+
+
+
+void UISimpleEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UISimpleEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UISimpleEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UISimpleEditor;
+	where_ = XtCreateWidget("where_", arrayWidgetClass, UISimpleEditor, al, ac);
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( where_,al, ac );
+	ac = 0;
+	children[ac++] = where_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
diff --git a/src/MetviewUI/UISimpleEditor.h b/src/MetviewUI/UISimpleEditor.h
new file mode 100755
index 0000000..74cb122
--- /dev/null
+++ b/src/MetviewUI/UISimpleEditor.h
@@ -0,0 +1,34 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UISimpleEditor_h
+#define _UISimpleEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UISimpleEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UISimpleEditor;
+	Widget where_;
+};
+
+typedef UISimpleEditor_c *UISimpleEditor_p;
+
+
+extern UISimpleEditor_p UISimpleEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UISyncFolders.cc b/src/MetviewUI/UISyncFolders.cc
new file mode 100755
index 0000000..3b305f9
--- /dev/null
+++ b/src/MetviewUI/UISyncFolders.cc
@@ -0,0 +1,323 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Text.h>
+#include <Xm/ToggleBG.h>
+#include <Drag.h>
+
+#include <Xm/Protocols.h>
+#include "UISyncFolders.h"
+
+UISyncFolders_p UISyncFolders = (UISyncFolders_p) NULL;
+
+
+
+void UISyncFolders_c::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
+{
+	Widget children[5];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget rowcol1 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget form4 = (Widget)NULL;
+	Widget radioBox4 = (Widget)NULL;
+	Widget label8 = (Widget)NULL;
+	Widget form7 = (Widget)NULL;
+	Widget radioBox2 = (Widget)NULL;
+	Widget form3 = (Widget)NULL;
+	Widget frame4 = (Widget)NULL;
+	Widget label3 = (Widget)NULL;
+	Widget frame5 = (Widget)NULL;
+	Widget label4 = (Widget)NULL;
+	Widget label2 = (Widget)NULL;
+	Widget form8 = (Widget)NULL;
+	Widget radioBox3 = (Widget)NULL;
+	Widget form1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+
+	if ( !app_class_name )
+		app_class_name = "XApplication";
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	XtSetArg(al[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	UISyncFolders = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	_xd_rootwidget = UISyncFolders;
+	XmAddWMProtocolCallback( UISyncFolders, XmInternAtom(XtDisplay(UISyncFolders), "WM_DELETE_WINDOW", False), closeCB, (XtPointer) this);
+	rowcol1 = XmCreateRowColumn ( UISyncFolders, "rowcol1", al, ac );
+	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
+	XtSetArg(al[ac], XmNresizeHeight, TRUE); ac++;
+	XtSetArg(al[ac], XmNpendingDelete, FALSE); ac++;
+	XtSetArg(al[ac], XmNcursorPositionVisible, FALSE); ac++;
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	XtSetArg(al[ac], XmNrows, 6); ac++;
+	XtSetArg(al[ac], XmNautoShowCursorPosition, FALSE); ac++;
+	XtSetArg(al[ac], XmNwordWrap, TRUE); ac++;
+	text_ = XmCreateText ( rowcol1, "text_", al, ac );
+	ac = 0;
+	added_form_ = XmCreateFrame ( rowcol1, "added_form_", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label1 = XmCreateLabel ( added_form_, "What has been added in the system folder:", al, ac );
+	ac = 0;
+	form4 = XmCreateForm ( added_form_, "form4", al, ac );
+	radioBox4 = XmCreateRadioBox ( form4, "radioBox4", al, ac );
+	XtSetArg(al[ac], XmNset, TRUE); ac++;
+	add_all_ = XmCreateToggleButtonGadget ( radioBox4, "Add all", al, ac );
+	ac = 0;
+	add_selected_ = XmCreateToggleButtonGadget ( radioBox4, "Add selected only", al, ac );
+	add_none_ = XmCreateToggleButtonGadget ( radioBox4, "Add none", al, ac );
+	XtSetArg(al[ac], XmNheight, 68); ac++;
+	added_ = XtCreateWidget("added_", dragWidgetClass, form4, al, ac);
+	ac = 0;
+	changed_form_ = XmCreateFrame ( rowcol1, "changed_form_", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label8 = XmCreateLabel ( changed_form_, "What has changed:", al, ac );
+	ac = 0;
+	form7 = XmCreateForm ( changed_form_, "form7", al, ac );
+	radioBox2 = XmCreateRadioBox ( form7, "radioBox2", al, ac );
+	XtSetArg(al[ac], XmNset, TRUE); ac++;
+	preserve_all_ = XmCreateToggleButtonGadget ( radioBox2, "Preserve all", al, ac );
+	ac = 0;
+	preserve_selected_ = XmCreateToggleButtonGadget ( radioBox2, "Preserve selected only", al, ac );
+	overwrite_all_ = XmCreateToggleButtonGadget ( radioBox2, "Overwrite all", al, ac );
+	overwrite_selected_ = XmCreateToggleButtonGadget ( radioBox2, "Overwrite selected only", al, ac );
+	form3 = XmCreateForm ( form7, "form3", al, ac );
+	frame4 = XmCreateFrame ( form3, "frame4", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label3 = XmCreateLabel ( frame4, "Your version:", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 68); ac++;
+	changed_u_ = XtCreateWidget("changed_u_", dragWidgetClass, frame4, al, ac);
+	ac = 0;
+	frame5 = XmCreateFrame ( form3, "frame5", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label4 = XmCreateLabel ( frame5, "System version:", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNheight, 68); ac++;
+	changed_s_ = XtCreateWidget("changed_s_", dragWidgetClass, frame5, al, ac);
+	ac = 0;
+	gone_form_ = XmCreateFrame ( rowcol1, "gone_form_", al, ac );
+	XtSetArg(al[ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+	label2 = XmCreateLabel ( gone_form_, "What has been removed from the system folder:", al, ac );
+	ac = 0;
+	form8 = XmCreateForm ( gone_form_, "form8", al, ac );
+	radioBox3 = XmCreateRadioBox ( form8, "radioBox3", al, ac );
+	XtSetArg(al[ac], XmNset, TRUE); ac++;
+	remove_all_ = XmCreateToggleButtonGadget ( radioBox3, "Remove all", al, ac );
+	ac = 0;
+	remove_selected_ = XmCreateToggleButtonGadget ( radioBox3, "Remove selected only", al, ac );
+	keep_all_ = XmCreateToggleButtonGadget ( radioBox3, "Keep all", al, ac );
+	XtSetArg(al[ac], XmNheight, 68); ac++;
+	gone_ = XtCreateWidget("gone_", dragWidgetClass, form8, al, ac);
+	ac = 0;
+	form1 = XmCreateForm ( rowcol1, "form1", al, ac );
+	button2 = XmCreatePushButton ( form1, "Later", al, ac );
+	button3 = XmCreatePushButton ( form1, "Synchronize", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNleftPosition, 60); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( radioBox4,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNrightPosition, 60); ac++;
+	XtSetValues ( added_,al, ac );
+	ac = 0;
+	XtAddCallback (radioBox4, XmNentryCallback, entryCB, (XtPointer) this);
+	children[ac++] = add_all_;
+	children[ac++] = add_selected_;
+	children[ac++] = add_none_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (added_, XmNselectCallback, selectCB, (XtPointer) this);
+	children[ac++] = radioBox4;
+	children[ac++] = added_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = label1;
+	children[ac++] = form4;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNleftPosition, 60); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( radioBox2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNrightPosition, 60); ac++;
+	XtSetValues ( form3,al, ac );
+	ac = 0;
+	XtAddCallback (radioBox2, XmNentryCallback, entryCB, (XtPointer) this);
+	children[ac++] = preserve_all_;
+	children[ac++] = preserve_selected_;
+	children[ac++] = overwrite_all_;
+	children[ac++] = overwrite_selected_;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNrightPosition, 50); ac++;
+	XtSetValues ( frame4,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNleftPosition, 50); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( frame5,al, ac );
+	ac = 0;
+	XtAddCallback (changed_u_, XmNselectCallback, selectCB, (XtPointer) this);
+	children[ac++] = label3;
+	children[ac++] = changed_u_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (changed_s_, XmNselectCallback, selectCB, (XtPointer) this);
+	children[ac++] = label4;
+	children[ac++] = changed_s_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = frame4;
+	children[ac++] = frame5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = radioBox2;
+	children[ac++] = form3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = label8;
+	children[ac++] = form7;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNleftPosition, 60); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( radioBox3,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNrightPosition, 60); ac++;
+	XtSetValues ( gone_,al, ac );
+	ac = 0;
+	XtAddCallback (radioBox3, XmNentryCallback, entryCB, (XtPointer) this);
+	children[ac++] = remove_all_;
+	children[ac++] = remove_selected_;
+	children[ac++] = keep_all_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (gone_, XmNselectCallback, selectCB, (XtPointer) this);
+	children[ac++] = radioBox3;
+	children[ac++] = gone_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = label2;
+	children[ac++] = form8;
+	XtManageChildren(children, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNrightPosition, 49); ac++;
+	XtSetValues ( button2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
+	XtSetArg(al[ac], XmNleftPosition, 51); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( button3,al, ac );
+	ac = 0;
+	XtAddCallback (button2, XmNactivateCallback, closeCB, (XtPointer) this);
+	XtAddCallback (button3, XmNactivateCallback, syncCB, (XtPointer) this);
+	children[ac++] = button2;
+	children[ac++] = button3;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = text_;
+	children[ac++] = added_form_;
+	children[ac++] = changed_form_;
+	children[ac++] = gone_form_;
+	children[ac++] = form1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( rowcol1);
+}
+
+void UISyncFolders_c::selectCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UISyncFolders_p instance = (UISyncFolders_p) client_data;
+	instance->selectCB ( widget, call_data );
+}
+
+void UISyncFolders_c::entryCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UISyncFolders_p instance = (UISyncFolders_p) client_data;
+	instance->entryCB ( widget, call_data );
+}
+
+void UISyncFolders_c::syncCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UISyncFolders_p instance = (UISyncFolders_p) client_data;
+	instance->syncCB ( widget, call_data );
+}
+
+void UISyncFolders_c::closeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UISyncFolders_p instance = (UISyncFolders_p) client_data;
+	instance->closeCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UISyncFolders.h b/src/MetviewUI/UISyncFolders.h
new file mode 100755
index 0000000..087712e
--- /dev/null
+++ b/src/MetviewUI/UISyncFolders.h
@@ -0,0 +1,60 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UISyncFolders_h
+#define _UISyncFolders_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UISyncFolders_c: public xd_ApplicationShell_c {
+public:
+	virtual void create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name = NULL);
+protected:
+	Widget UISyncFolders;
+	Widget text_;
+	Widget added_form_;
+	Widget add_all_;
+	Widget add_selected_;
+	Widget add_none_;
+	Widget added_;
+	Widget changed_form_;
+	Widget preserve_all_;
+	Widget preserve_selected_;
+	Widget overwrite_all_;
+	Widget overwrite_selected_;
+	Widget changed_u_;
+	Widget changed_s_;
+	Widget gone_form_;
+	Widget remove_all_;
+	Widget remove_selected_;
+	Widget keep_all_;
+	Widget gone_;
+public:
+	static void selectCB( Widget, XtPointer, XtPointer );
+	virtual void selectCB( Widget, XtPointer ) = 0;
+	static void entryCB( Widget, XtPointer, XtPointer );
+	virtual void entryCB( Widget, XtPointer ) = 0;
+	static void syncCB( Widget, XtPointer, XtPointer );
+	virtual void syncCB( Widget, XtPointer ) = 0;
+	static void closeCB( Widget, XtPointer, XtPointer );
+	virtual void closeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UISyncFolders_c *UISyncFolders_p;
+
+
+extern UISyncFolders_p UISyncFolders;
+
+
+#endif
diff --git a/src/MetviewUI/UITemplateDrawer.cc b/src/MetviewUI/UITemplateDrawer.cc
new file mode 100755
index 0000000..46ca388
--- /dev/null
+++ b/src/MetviewUI/UITemplateDrawer.cc
@@ -0,0 +1,173 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+
+#include <xdclass.h>
+
+class UITemplateDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UITemplateDrawer;
+	Widget drag_;
+	Widget menu1_;
+	Widget merge_;
+	Widget replace_;
+	Widget menu2_;
+public:
+	static void openFolderCB( Widget, XtPointer, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer ) = 0;
+	static void replaceCB( Widget, XtPointer, XtPointer );
+	virtual void replaceCB( Widget, XtPointer ) = 0;
+	static void mergeCB( Widget, XtPointer, XtPointer );
+	virtual void mergeCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+	static void makeCB( Widget, XtPointer, XtPointer );
+	virtual void makeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UITemplateDrawer_c *UITemplateDrawer_p;
+
+UITemplateDrawer_p UITemplateDrawer = (UITemplateDrawer_p) NULL;
+
+
+
+void UITemplateDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[5];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Templates";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UITemplateDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UITemplateDrawer;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( UITemplateDrawer, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2 ); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoSort, TRUE); ac++;
+	XtSetArg(al[ac], XmNautoClean, TRUE); ac++;
+	XtSetArg(al[ac], XmNeditNames, TRUE); ac++;
+	XtSetArg(al[ac], XmNwidth, 32000); ac++;
+	XtSetArg(al[ac], XmNheight, 32000); ac++;
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, scrolledWin1, al, ac);
+	ac = 0;
+	menu1_ = XmCreatePopupMenu ( drag_, "menu_", al, ac );
+	label1 = XmCreateLabel ( menu1_, "title", al, ac );
+	separator1 = XmCreateSeparator ( menu1_, "separator1", al, ac );
+	button1 = XmCreatePushButton ( menu1_, "edit", al, ac );
+	merge_ = XmCreatePushButton ( menu1_, "merge", al, ac );
+	replace_ = XmCreatePushButton ( menu1_, "replace", al, ac );
+	menu2_ = XmCreatePopupMenu ( drag_, "menu2_", al, ac );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	button3 = XmCreatePushButton ( menu2_, "Make a template from current definition", al, ac );
+	ac = 0;
+	button4 = XmCreatePushButton ( menu2_, "Open folder...", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledWin1,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, editCB, (XtPointer) this);
+	XtAddCallback (merge_, XmNactivateCallback, mergeCB, (XtPointer) this);
+	XtAddCallback (replace_, XmNactivateCallback, replaceCB, (XtPointer) this);
+	children[ac++] = label1;
+	children[ac++] = separator1;
+	children[ac++] = button1;
+	children[ac++] = merge_;
+	children[ac++] = replace_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button3, XmNactivateCallback, makeCB, (XtPointer) this);
+	XtAddCallback (button4, XmNactivateCallback, openFolderCB, (XtPointer) this);
+	children[ac++] = button3;
+	children[ac++] = button4;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, drag_ );
+	children[ac++] = scrolledWin1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UITemplateDrawer_c::openFolderCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITemplateDrawer_p instance = (UITemplateDrawer_p) client_data;
+	instance->openFolderCB ( widget, call_data );
+}
+
+void UITemplateDrawer_c::replaceCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITemplateDrawer_p instance = (UITemplateDrawer_p) client_data;
+	instance->replaceCB ( widget, call_data );
+}
+
+void UITemplateDrawer_c::mergeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITemplateDrawer_p instance = (UITemplateDrawer_p) client_data;
+	instance->mergeCB ( widget, call_data );
+}
+
+void UITemplateDrawer_c::editCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITemplateDrawer_p instance = (UITemplateDrawer_p) client_data;
+	instance->editCB ( widget, call_data );
+}
+
+void UITemplateDrawer_c::makeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITemplateDrawer_p instance = (UITemplateDrawer_p) client_data;
+	instance->makeCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UITemplateDrawer.h b/src/MetviewUI/UITemplateDrawer.h
new file mode 100755
index 0000000..31ee2fe
--- /dev/null
+++ b/src/MetviewUI/UITemplateDrawer.h
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UITemplateDrawer_h
+#define _UITemplateDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UITemplateDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UITemplateDrawer;
+	Widget drag_;
+	Widget menu1_;
+	Widget merge_;
+	Widget replace_;
+	Widget menu2_;
+public:
+	static void openFolderCB( Widget, XtPointer, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer ) = 0;
+	static void replaceCB( Widget, XtPointer, XtPointer );
+	virtual void replaceCB( Widget, XtPointer ) = 0;
+	static void mergeCB( Widget, XtPointer, XtPointer );
+	virtual void mergeCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+	static void makeCB( Widget, XtPointer, XtPointer );
+	virtual void makeCB( Widget, XtPointer ) = 0;
+};
+
+typedef UITemplateDrawer_c *UITemplateDrawer_p;
+
+
+extern UITemplateDrawer_p UITemplateDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/UITextEditor.cc b/src/MetviewUI/UITextEditor.cc
new file mode 100755
index 0000000..da34587
--- /dev/null
+++ b/src/MetviewUI/UITextEditor.cc
@@ -0,0 +1,109 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+
+#include "xdclass.h"
+
+class UITextEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UITextEditor;
+	Widget text_;
+public:
+	static void modifiedCB( Widget, XtPointer, XtPointer );
+	virtual void modifiedCB( Widget, XtPointer ) = 0;
+};
+
+typedef UITextEditor_c *UITextEditor_p;
+
+UITextEditor_p UITextEditor = (UITextEditor_p) NULL;
+
+
+
+void UITextEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Display *display = XtDisplay ( parent );
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XrmValue from_value, to_value; /* For resource conversion */
+	XPointer to_address; /* For Thread-safe resource conversion */ 
+	Pixel to_pixel; /* For Thread-safe resource conversion */ 
+	XtPointer tmp_value;             /* ditto */
+	Widget widget2 = (Widget)NULL;
+	Widget widget4 = (Widget)NULL;
+	Widget widget5 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = (char *) "UITextEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UITextEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UITextEditor;
+	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(display)) != 1) {
+
+		from_value.addr = "#f4def4deffff" ;
+		from_value.size = strlen( from_value.addr ) + 1;
+		to_value.size = sizeof(Pixel);
+		to_value.addr = (XPointer) &to_pixel;
+		XtConvertAndStore (UITextEditor, XmRString, &from_value, XmRPixel, &to_value);
+
+		if ( to_value.addr ) {
+			XtSetArg(al[ac], XmNbackground, (*((Pixel*) to_value.addr))); ac++;
+		}
+	}
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	text_ = XmCreateScrolledText ( UITextEditor, (char *) "text_", al, ac );
+	ac = 0;
+	widget2 = XtParent ( text_ );
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &widget4); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &widget5); ac++;
+	XtGetValues(widget2, al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
+	XtSetValues ( widget2, al, ac );
+	ac = 0;
+	XtAddCallback (text_, XmNvalueChangedCallback, &UITextEditor_c::modifiedCB, (XtPointer) this);
+	if (text_ != (Widget) 0) { XtManageChild(text_); }
+}
+
+void UITextEditor_c::modifiedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITextEditor_p instance = (UITextEditor_p) client_data;
+	instance->modifiedCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UITextEditor.h b/src/MetviewUI/UITextEditor.h
new file mode 100755
index 0000000..82047b3
--- /dev/null
+++ b/src/MetviewUI/UITextEditor.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UITextEditor_h
+#define _UITextEditor_h
+
+#define XD_MOTIF
+
+#include "xdclass.h"
+
+class UITextEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UITextEditor;
+	Widget text_;
+public:
+	static void modifiedCB( Widget, XtPointer, XtPointer );
+	virtual void modifiedCB( Widget, XtPointer ) = 0;
+};
+
+typedef UITextEditor_c *UITextEditor_p;
+
+
+extern UITextEditor_p UITextEditor;
+
+
+
+#endif
diff --git a/src/MetviewUI/UITextLine.cc b/src/MetviewUI/UITextLine.cc
new file mode 100755
index 0000000..79c0461
--- /dev/null
+++ b/src/MetviewUI/UITextLine.cc
@@ -0,0 +1,87 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/TextF.h>
+
+#include <xdclass.h>
+
+class UITextLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UITextLine;
+	Widget text_;
+public:
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UITextLine_c *UITextLine_p;
+
+UITextLine_p UITextLine = (UITextLine_p) NULL;
+
+
+
+void UITextLine_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UITextLine";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UITextLine = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UITextLine;
+	XtSetArg(al[ac], XmNcolumns, 40); ac++;
+	text_ = XmCreateTextField ( UITextLine, "text_", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( text_,al, ac );
+	ac = 0;
+	XtAddCallback (text_, XmNvalueChangedCallback, changedCB, (XtPointer) this);
+	XtAddCallback (text_, XmNactivateCallback, activateCB, (XtPointer) this);
+	children[ac++] = text_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UITextLine_c::changedCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITextLine_p instance = (UITextLine_p) client_data;
+	instance->changedCB ( widget, call_data );
+}
+
+void UITextLine_c::activateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UITextLine_p instance = (UITextLine_p) client_data;
+	instance->activateCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UITextLine.h b/src/MetviewUI/UITextLine.h
new file mode 100755
index 0000000..5d24504
--- /dev/null
+++ b/src/MetviewUI/UITextLine.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UITextLine_h
+#define _UITextLine_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UITextLine_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UITextLine;
+	Widget text_;
+public:
+	static void changedCB( Widget, XtPointer, XtPointer );
+	virtual void changedCB( Widget, XtPointer ) = 0;
+	static void activateCB( Widget, XtPointer, XtPointer );
+	virtual void activateCB( Widget, XtPointer ) = 0;
+};
+
+typedef UITextLine_c *UITextLine_p;
+
+
+extern UITextLine_p UITextLine;
+
+
+#endif
diff --git a/src/MetviewUI/UIViewEditor.cc b/src/MetviewUI/UIViewEditor.cc
new file mode 100755
index 0000000..a820767
--- /dev/null
+++ b/src/MetviewUI/UIViewEditor.cc
@@ -0,0 +1,144 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Paper.h>
+
+#include <xdclass.h>
+
+class UIViewEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIViewEditor;
+	Widget paper_;
+public:
+	static void joinCB( Widget, XtPointer, XtPointer );
+	virtual void joinCB( Widget, XtPointer ) = 0;
+	static void groupCB( Widget, XtPointer, XtPointer );
+	virtual void groupCB( Widget, XtPointer ) = 0;
+	static void ungroupCB( Widget, XtPointer, XtPointer );
+	virtual void ungroupCB( Widget, XtPointer ) = 0;
+	static void deleteCB( Widget, XtPointer, XtPointer );
+	virtual void deleteCB( Widget, XtPointer ) = 0;
+	static void splitCB( Widget, XtPointer, XtPointer );
+	virtual void splitCB( Widget, XtPointer ) = 0;
+	static void changeCB( Widget, XtPointer, XtPointer );
+	virtual void changeCB( Widget, XtPointer ) = 0;
+	static void drawCB( Widget, XtPointer, XtPointer );
+	virtual void drawCB( Widget, XtPointer ) = 0;
+	static void dblClickCB( Widget, XtPointer, XtPointer );
+	virtual void dblClickCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIViewEditor_c *UIViewEditor_p;
+
+UIViewEditor_p UIViewEditor = (UIViewEditor_p) NULL;
+
+
+
+void UIViewEditor_c::create (Widget parent, char *widget_name)
+{
+	Widget children[1];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+
+	if ( !widget_name )
+		widget_name = "UIViewEditor";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIViewEditor = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIViewEditor;
+	XtSetArg(al[ac], XmNtraversalOn, TRUE); ac++;
+	XtSetArg(al[ac], XmNnavigationType, XmTAB_GROUP); ac++;
+	paper_ = XtCreateWidget("paper_", paperWidgetClass, UIViewEditor, al, ac);
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( paper_,al, ac );
+	ac = 0;
+	XtAddCallback (paper_, XmNjoinCallback, joinCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNgroupCallback, groupCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNungroupCallback, ungroupCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNdeleteCallback, deleteCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNsplitCallback, splitCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNdrawCallback, drawCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNdblClickCallback, dblClickCB, (XtPointer) this);
+	XtAddCallback (paper_, XmNchangeCallback, changeCB, (XtPointer) this);
+	children[ac++] = paper_;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIViewEditor_c::joinCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->joinCB ( widget, call_data );
+}
+
+void UIViewEditor_c::groupCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->groupCB ( widget, call_data );
+}
+
+void UIViewEditor_c::ungroupCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->ungroupCB ( widget, call_data );
+}
+
+void UIViewEditor_c::deleteCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->deleteCB ( widget, call_data );
+}
+
+void UIViewEditor_c::splitCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->splitCB ( widget, call_data );
+}
+
+void UIViewEditor_c::changeCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->changeCB ( widget, call_data );
+}
+
+void UIViewEditor_c::drawCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->drawCB ( widget, call_data );
+}
+
+void UIViewEditor_c::dblClickCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewEditor_p instance = (UIViewEditor_p) client_data;
+	instance->dblClickCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIViewEditor.h b/src/MetviewUI/UIViewEditor.h
new file mode 100755
index 0000000..ba1a6b0
--- /dev/null
+++ b/src/MetviewUI/UIViewEditor.h
@@ -0,0 +1,51 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIViewEditor_h
+#define _UIViewEditor_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIViewEditor_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIViewEditor;
+	Widget paper_;
+public:
+	static void joinCB( Widget, XtPointer, XtPointer );
+	virtual void joinCB( Widget, XtPointer ) = 0;
+	static void groupCB( Widget, XtPointer, XtPointer );
+	virtual void groupCB( Widget, XtPointer ) = 0;
+	static void ungroupCB( Widget, XtPointer, XtPointer );
+	virtual void ungroupCB( Widget, XtPointer ) = 0;
+	static void deleteCB( Widget, XtPointer, XtPointer );
+	virtual void deleteCB( Widget, XtPointer ) = 0;
+	static void splitCB( Widget, XtPointer, XtPointer );
+	virtual void splitCB( Widget, XtPointer ) = 0;
+	static void changeCB( Widget, XtPointer, XtPointer );
+	virtual void changeCB( Widget, XtPointer ) = 0;
+	static void drawCB( Widget, XtPointer, XtPointer );
+	virtual void drawCB( Widget, XtPointer ) = 0;
+	static void dblClickCB( Widget, XtPointer, XtPointer );
+	virtual void dblClickCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIViewEditor_c *UIViewEditor_p;
+
+
+extern UIViewEditor_p UIViewEditor;
+
+
+#endif
diff --git a/src/MetviewUI/UIViewsDrawer.cc b/src/MetviewUI/UIViewsDrawer.cc
new file mode 100755
index 0000000..b588538
--- /dev/null
+++ b/src/MetviewUI/UIViewsDrawer.cc
@@ -0,0 +1,147 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Separator.h>
+#include <Drag.h>
+
+#include <xdclass.h>
+
+class UIViewsDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIViewsDrawer;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+public:
+	static void updateCB( Widget, XtPointer, XtPointer );
+	virtual void updateCB( Widget, XtPointer ) = 0;
+	static void openFolderCB( Widget, XtPointer, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIViewsDrawer_c *UIViewsDrawer_p;
+
+UIViewsDrawer_p UIViewsDrawer = (UIViewsDrawer_p) NULL;
+
+
+
+void UIViewsDrawer_c::create (Widget parent, char *widget_name)
+{
+	Widget children[3];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+	Widget label1 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+
+	if ( !widget_name )
+		widget_name = "Views";
+
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	UIViewsDrawer = XmCreateForm ( parent, widget_name, al, ac );
+	ac = 0;
+	_xd_rootwidget = UIViewsDrawer;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( UIViewsDrawer, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1 ); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2 ); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoSort, TRUE); ac++;
+	XtSetArg(al[ac], XmNautoClean, TRUE); ac++;
+	XtSetArg(al[ac], XmNeditNames, TRUE); ac++;
+	XtSetArg(al[ac], XmNwidth, 32000); ac++;
+	XtSetArg(al[ac], XmNheight, 32000); ac++;
+	drag_ = XtCreateWidget("drag_", dragWidgetClass, scrolledWin1, al, ac);
+	ac = 0;
+	menu1_ = XmCreatePopupMenu ( drag_, "menu_", al, ac );
+	label1 = XmCreateLabel ( menu1_, "title", al, ac );
+	separator1 = XmCreateSeparator ( menu1_, "separator1", al, ac );
+	button1 = XmCreatePushButton ( menu1_, "edit", al, ac );
+	menu2_ = XmCreatePopupMenu ( drag_, "menu2_", al, ac );
+	button4 = XmCreatePushButton ( menu2_, "Open folder...", al, ac );
+	button2 = XmCreatePushButton ( menu2_, "Update", al, ac );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( scrolledWin1,al, ac );
+	ac = 0;
+	XtAddCallback (button1, XmNactivateCallback, editCB, (XtPointer) this);
+	children[ac++] = label1;
+	children[ac++] = separator1;
+	children[ac++] = button1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtAddCallback (button4, XmNactivateCallback, openFolderCB, (XtPointer) this);
+	XtAddCallback (button2, XmNactivateCallback, updateCB, (XtPointer) this);
+	children[ac++] = button4;
+	children[ac++] = button2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag_;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, drag_ );
+	children[ac++] = scrolledWin1;
+	XtManageChildren(children, ac);
+	ac = 0;
+}
+
+void UIViewsDrawer_c::updateCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewsDrawer_p instance = (UIViewsDrawer_p) client_data;
+	instance->updateCB ( widget, call_data );
+}
+
+void UIViewsDrawer_c::openFolderCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewsDrawer_p instance = (UIViewsDrawer_p) client_data;
+	instance->openFolderCB ( widget, call_data );
+}
+
+void UIViewsDrawer_c::editCB( Widget widget, XtPointer client_data, XtPointer call_data )
+{
+	UIViewsDrawer_p instance = (UIViewsDrawer_p) client_data;
+	instance->editCB ( widget, call_data );
+}
+
diff --git a/src/MetviewUI/UIViewsDrawer.h b/src/MetviewUI/UIViewsDrawer.h
new file mode 100755
index 0000000..da3ef69
--- /dev/null
+++ b/src/MetviewUI/UIViewsDrawer.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _UIViewsDrawer_h
+#define _UIViewsDrawer_h
+
+#define XD_MOTIF
+
+#include <xdclass.h>
+
+class UIViewsDrawer_c: public xd_XmForm_c {
+public:
+	virtual void create (Widget parent, char *widget_name = NULL);
+protected:
+	Widget UIViewsDrawer;
+	Widget drag_;
+	Widget menu1_;
+	Widget menu2_;
+public:
+	static void updateCB( Widget, XtPointer, XtPointer );
+	virtual void updateCB( Widget, XtPointer ) = 0;
+	static void openFolderCB( Widget, XtPointer, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer ) = 0;
+	static void editCB( Widget, XtPointer, XtPointer );
+	virtual void editCB( Widget, XtPointer ) = 0;
+};
+
+typedef UIViewsDrawer_c *UIViewsDrawer_p;
+
+
+extern UIViewsDrawer_p UIViewsDrawer;
+
+
+#endif
diff --git a/src/MetviewUI/Unknown.cc b/src/MetviewUI/Unknown.cc
new file mode 100644
index 0000000..1f65e5e
--- /dev/null
+++ b/src/MetviewUI/Unknown.cc
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Unknown_H
+#include "Unknown.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+Unknown::Unknown(Folder* parent,const IconClass& kind,
+	const string& name,IconInfo* info):
+	FileObject(parent,kind,name,info)
+{
+}
+
+Unknown::~Unknown()
+{
+}
+
+set<string> Unknown::can()
+{
+	return set<string>();
+}
+
+void Unknown::createFiles()
+{
+	IconObject::createFiles();
+}
diff --git a/src/MetviewUI/Unknown.h b/src/MetviewUI/Unknown.h
new file mode 100644
index 0000000..2337eb3
--- /dev/null
+++ b/src/MetviewUI/Unknown.h
@@ -0,0 +1,119 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Unknown.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Unknown_H
+#define Unknown_H
+
+#ifndef FileObject_H
+#include "FileObject.h"
+#endif
+
+
+#include <string>
+using std::string;
+
+
+class Unknown : public FileObject {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Unknown(Folder* parent,
+		const IconClass& kind, const string& name,
+		IconInfo* info);
+
+// -- Destructor
+
+	virtual ~Unknown(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Unknown(const Unknown&);
+	Unknown& operator=(const Unknown&);
+
+// -- Members
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	// From IconObject
+
+	virtual set<string> can();
+	virtual void createFiles();
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Unknown& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Unknown**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Unknown);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/UserMessage.cc b/src/MetviewUI/UserMessage.cc
new file mode 100644
index 0000000..dcd8e73
--- /dev/null
+++ b/src/MetviewUI/UserMessage.cc
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "UserMessage.h"
+#include "Request.h"
+
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef Protocol_H
+#include "Protocol.h"
+#endif
+
+UserMessage::UserMessage(): 
+	Message("USER_MESSAGE") 
+{ 
+}
+
+UserMessage::~UserMessage()
+{ 
+}
+
+
+void UserMessage::callback(MvRequest& r)
+{
+  const char* info = r("INFO");
+
+  const char* c = getSource();          //-- prevent string(0) constructor
+  string s = c ? string(c) : string("?");
+
+  Log::info(s) << info << endl;
+}
+
+static ProtocolFactory<UserMessage> usrMsg;
+
diff --git a/src/MetviewUI/UserMessage.h b/src/MetviewUI/UserMessage.h
new file mode 100644
index 0000000..88f351a
--- /dev/null
+++ b/src/MetviewUI/UserMessage.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File UserMesssage.h
+// Geir Austad - ECMWF May 01
+
+#ifndef UserMessage_H
+#define UserMessage_H
+
+
+#ifndef  Message_H
+#include <Message.h>
+#endif
+
+class UserMessage : public Message
+{
+  // -- From MvMessage
+  virtual void callback(MvRequest&);
+
+ public:
+  UserMessage(); 
+  ~UserMessage();
+	
+ private:
+
+  // No copy allowed
+  
+  UserMessage(const UserMessage&);
+  UserMessage& operator=(const UserMessage&);
+};
+
+
+
+inline void destroy(UserMessage**) {}
+
+#endif
diff --git a/src/MetviewUI/VariableEditor.h b/src/MetviewUI/VariableEditor.h
new file mode 100644
index 0000000..02cac60
--- /dev/null
+++ b/src/MetviewUI/VariableEditor.h
@@ -0,0 +1,145 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File VariableEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef VariableEditor_H
+#define VariableEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#ifndef RequestPanel_H
+#include "RequestPanel.h"
+#endif
+
+#ifndef Language_H
+#include "Language.h"
+#endif
+
+#include "UIVariableEditor.h"
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+
+class RequestPanelLine;
+class SimpleEditorObserver;
+
+class VariableEditor : public XEditor<UIVariableEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	VariableEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~VariableEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void fail();
+	void reply(IconClass&);
+
+	Request currentRequest();
+
+// -- Overridden methods
+	// None
+
+	//From InternalEditor.
+
+	virtual void replace(IconObject*);
+	virtual void merge(IconObject*);
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	VariableEditor(const VariableEditor&);
+	VariableEditor& operator=(const VariableEditor&);
+
+// -- Members
+
+	RequestPanel  fixPanel_;
+	RequestPanel* variablePanel_;
+
+	TaskH       task_;
+	IconObjectH temp_;
+
+// -- Methods
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+	//From InternalEditor.
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+
+	virtual IconObject* copy(const string&);
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const VariableEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(VariableEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(VariableEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/VariableTask.h b/src/MetviewUI/VariableTask.h
new file mode 100644
index 0000000..138f550
--- /dev/null
+++ b/src/MetviewUI/VariableTask.h
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File VariableTask.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef VariableTask_H
+#define VariableTask_H
+
+#ifndef Task_H
+#include "Task.h"
+#endif
+
+
+#ifndef ReplyObserver_H
+#include "ReplyObserver.h"
+#endif
+
+#include "TaskObserver.h"
+#include "IconObject.h"
+#include "Dependancy.h"
+#include "Request.h"
+
+
+class VariableEditor;
+
+
+class VariableTask : public Task, public ReplyObserver {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	VariableTask(VariableEditor&, const string&,const Request&);
+
+// -- Destructor
+
+	virtual ~VariableTask(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	 void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	VariableTask(const VariableTask&);
+	VariableTask& operator=(const VariableTask&);
+
+// -- Members
+
+	VariableEditor& editor_;
+	string          service_;
+	Request         request_;
+	IconClass*      class_;
+
+// -- Methods
+
+
+// -- Overridden methods
+
+	// From Task
+	virtual void start();
+	// From ReplyObserver
+	virtual void reply(const Request&, int);
+	virtual void progress(const Request&);  
+	virtual void message(const string&);
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const VariableTask& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(VariableTask**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(VariableTask);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ViewEditor.cc b/src/MetviewUI/ViewEditor.cc
new file mode 100644
index 0000000..c82a17f
--- /dev/null
+++ b/src/MetviewUI/ViewEditor.cc
@@ -0,0 +1,590 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#ifndef ViewEditor_H
+#include "ViewEditor.h"
+#endif
+
+#ifndef EditorFactory_H
+#include "EditorFactory.h"
+#endif
+
+#ifndef SimpleEditor_H
+#include "SimpleEditor.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+
+#ifndef Log_H
+#include "Log.h"
+#endif
+
+#ifndef PageView_H
+#include "PageView.h"
+#endif
+
+#ifndef Dropping_H
+#include "Dropping.h"
+#endif
+
+#ifndef EditorButton_H
+#include "EditorButton.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+static struct {
+	string      name;
+	double      h;
+	double      v;
+} paper_sizes [] = {
+	{"A4", 21,   29.7, },
+	{"A3", 29.7, 42,   },
+};
+
+
+//---------------------------------------------------
+
+ViewEditor::ViewEditor(const IconClass& name,const string& kind):
+	XEditor<UIViewEditor_c>(name,kind)
+{
+  
+  // Set up callbacks for the paper widget. Needed in order to handle the view
+  // properly.
+  
+}
+
+ViewEditor::~ViewEditor()
+{
+}
+
+void ViewEditor::apply()
+{
+	savePaperSize(request_);
+	savePages(current_,request_);
+	current_->request(request_);
+}
+
+void ViewEditor::reset()
+{
+	cache_.clear();
+	save_.clear();
+	request_ = current_->request();
+	loadPaperSize(request_);
+	PaperSetPages(paper_,loadPages(current_,request_));
+	updateDrawers();
+	PaperSelectFirst(paper_);
+}
+
+void ViewEditor::close()
+{
+	save_.clear();
+}
+
+void ViewEditor::merge(IconObject* o)
+{
+}
+
+void ViewEditor::replace(IconObject* o)
+{
+}
+
+void ViewEditor::loadPaperSize(const Request& r)
+{
+	cout << "paperSize " << endl;
+	r.print();
+
+	// Set paper size...
+	double v = r("CUSTOM_HEIGHT");
+	double h = r("CUSTOM_WIDTH");
+
+	const char* size  = r("LAYOUT_SIZE");
+	const char* orien = r("LAYOUT_ORIENTATION");
+
+	for(int i = 0; i < XtNumber(paper_sizes) ; i++)
+	{
+		if(size && paper_sizes[i].name == size)
+		{
+			if(orien && strcmp(orien,"PORTRAIT") == 0)
+			{
+				h = paper_sizes[i].h;
+				v = paper_sizes[i].v;
+			}
+			else
+			{
+				v = paper_sizes[i].h;
+				h = paper_sizes[i].v;
+			}
+		}
+	}
+
+	setPaperSize(h,v);
+
+	cout << "h = " << h << " v = " << v << endl;
+}
+
+void ViewEditor::savePaperSize(Request& r)
+{
+	double h,v;
+	getPaperSize(h,v);
+
+	r("LAYOUT_SIZE")   = "CUSTOM";
+	r("CUSTOM_WIDTH")  = h;
+	r("CUSTOM_HEIGHT") = v;
+		
+	for(int i = 0; i < XtNumber(paper_sizes) ; i++)
+	{
+		if(h == paper_sizes[i].h && v == paper_sizes[i].v)
+		{
+			r("LAYOUT_SIZE") = paper_sizes[i].name.c_str();	
+			r("LAYOUT_ORIENTATION") = "PORTRAIT";
+			r.unsetParam("CUSTOM_WIDTH");
+			r.unsetParam("CUSTOM_HEIGHT");
+		}
+		if(v == paper_sizes[i].h && h == paper_sizes[i].v)
+		{
+			r("LAYOUT_SIZE") = paper_sizes[i].name.c_str();	
+			r("LAYOUT_ORIENTATION") = "LANDSCAPE";
+			r.unsetParam("CUSTOM_WIDTH");
+			r.unsetParam("CUSTOM_HEIGHT");
+		}
+	}
+}	
+
+
+PageView* ViewEditor::pageView(IconObject* o)
+{
+	map<IconObjectH,PageViewH>::iterator j = cache_.find(o);
+	if(j == cache_.end())
+		cache_[o] = new PageView(o);
+	return cache_[o];
+}
+
+PaperRectangle* ViewEditor::loadPages(IconObject* o,const Request& r)
+{
+	PaperRectangle* pages = 0;
+
+	//MvRequest pageRequest = r("PAGES");
+	vector<IconObjectH> sub = o->subObjects("PAGES", r );
+
+	for(vector<IconObjectH>::iterator ii = sub.begin(); ii != sub.end(); ++ii)
+	  {
+	    MvRequest p = (*ii)->request();
+	    PaperRectangle* s = loadRectangle(p);
+	    vector<IconObjectH> y = (*ii)->subObjects("VIEW",p);
+	    
+	    IconObject* z = y.size() ? (IconObject*)y[0]: defaultView();
+	    s->data = pageView(z);;
+	    s->kids = loadSubPages(*ii,p);
+	    
+	    s->next = pages;
+	    pages = s;
+	  }
+	
+	return pages;
+}
+
+PaperRectangle* ViewEditor::loadSubPages(IconObject* o,const Request& r)
+{
+	PaperRectangle* pages = 0;
+
+	// Old style
+
+	int rows = r("ROWS");
+	int cols = r("COLUMNS");
+
+	if(rows * cols > 1)
+	{
+		double height = 1.0 / rows;
+		double width  = 1.0 / cols;
+		double x = 0;
+
+		for(int i = 0; i < cols; i++) 
+		{
+			double y = 0;
+			for(int j = 0; j < rows; j++)
+			{
+				PaperRectangle* s = PaperNewPage(
+					paper_,
+					y, 
+					x, 
+					(j == rows - 1) ? 1.0 : y + height, 
+					(i == cols - 1) ? 1.0 : x + width
+					);
+
+				s->next = pages;
+				pages = s;
+				y += height;
+			}
+			x +=  width;
+		}
+	}
+
+	// New Style
+
+	//MvRequest p = r("SUB_PAGES");
+	vector<IconObjectH> sub = o->subObjects("SUB_PAGES", r );
+	for(vector<IconObjectH>::iterator ii = sub.begin(); ii != sub.end(); ++ii)
+	  {
+	    MvRequest p = (*ii)->request();
+	    PaperRectangle* s = loadRectangle(p);
+	    s->next = pages;
+	    pages = s;
+	  }
+
+	return pages;
+}
+
+PaperRectangle* ViewEditor::loadRectangle(const Request& r)
+{
+	double top    = r("TOP");
+	double left   = r("LEFT");
+	double right  = r("RIGHT");
+	double bottom = r("BOTTOM");
+	return PaperNewPage(paper_,top/100.0,left/100.0,bottom/100.0,right/100.0);
+}
+
+
+void ViewEditor::saveRectangle(Request& r,PaperRectangle* s)
+{
+	r("TOP")    = s->top * 100 ;
+	r("LEFT")   = s->left * 100 ;
+	r("BOTTOM") = s->bottom * 100; 
+	r("RIGHT")  = s->right * 100 ;
+}
+
+Widget ViewEditor::dropSite()
+{
+	return paper_;
+}
+
+void ViewEditor::drop(Dropping& drop)
+{
+	XEvent ev;
+	IconObjectH o = drop.object(*this);
+	ev.xbutton.x = drop.x();
+	ev.xbutton.y = drop.y();
+
+	cout << "dropped " << o->name() << endl;
+
+	if(o->iconClass().type() != "View") // We need something more OO
+		return;
+	
+	if ( drop.copy() )
+	  o = o->clone(current_->embeddedFolder(true));
+
+	PaperRectangle* r = PaperFind(paper_,&ev);
+	if(!r) {
+		double x1=0,y1=0,x2=0,y2=0;
+
+		PaperLocation(paper_,ev.xbutton.x - 32, ev.xbutton.y - 32, &x1, &y1);
+		PaperLocation(paper_,ev.xbutton.x + 32, ev.xbutton.y + 32, &x2, &y2);
+
+		r = PaperAddPage(paper_,y1,x1,y2,x2);
+	}
+
+	PageView* page = pageView(o);
+
+	if(!r->selected)  
+		r->data = page;
+	else
+	{
+		r = PaperGetPages(paper_);
+		while(r)
+		{
+			if(r->selected)
+				r->data = page;
+			r = r->next;
+		}
+	}		
+		
+	PaperUpdate(paper_);
+	updateDrawers();
+
+}
+
+IconObject *ViewEditor::defaultView()
+{
+	return IconClass::find("GEOVIEW").defaultObject();
+}
+
+void ViewEditor::drawCB(Widget w,XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	PageView* p = (PageView*)cb->r1->data;
+
+	if(p == 0)
+	{
+
+		bool ispage = false;
+		PaperRectangle* r = PaperGetPages(paper_);
+		while(r)
+		{
+			if(r == cb->r1) { ispage = true; break ; }
+			r = r->next;
+		}
+
+		if(ispage)
+			cb->r1->data  =  pageView(defaultView());
+	}
+	if(p) p->draw(w,cb->graphics);
+}
+
+void ViewEditor::dblClickCB(Widget,XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	PageView* p = (PageView*)cb->r1->data;
+	if(p) p->edit();
+}
+
+void ViewEditor::splitCB(Widget, XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	cb->r2->data = cb->r1->data;
+	updateDrawers();
+}
+
+void ViewEditor::joinCB(Widget, XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	cb->r3->data = cb->r1->data;
+	updateDrawers();
+}
+
+void ViewEditor::groupCB(Widget, XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	PageView *p1 = ((PageView*)cb->r1->data);
+	PageView *p2 = ((PageView*)cb->r2->data);
+	  
+	if(cb->r2->data == 0 && cb->r1->data != 0) 
+		cb->r2->data = cb->r1->data;
+	  
+	cb->r1->data = 0;
+
+	updateDrawers();
+}
+
+void ViewEditor::ungroupCB(Widget, XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	cb->r2->data = cb->r1->data;
+	updateDrawers();
+}
+
+void ViewEditor::deleteCB(Widget, XtPointer data)
+{
+	PaperCallbackStruct* cb = (PaperCallbackStruct*)data;
+	updateDrawers();
+}
+
+void ViewEditor::changeCB(Widget, XtPointer data)
+{
+}
+
+//-----------------------------------------------------------
+
+void ViewEditor::update()
+{
+	PaperUpdate(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::insetSelection(double t,double l,double b,double r)
+{
+	PaperInsetSelection(paper_,t,l,b,r);
+	updateDrawers();
+}
+
+void ViewEditor::setPaperSize(double h,double v)
+{
+	PaperSetSize(paper_,h,v);
+	updateDrawers();
+}
+
+void ViewEditor::getPaperSize(double& h,double& v)
+{
+	PaperGetSize(paper_,&h,&v);
+}
+
+void ViewEditor::splitSelection(int h,int v,double mh,double mv)
+{
+	PaperSplitSelection(paper_,h,v,mv,mv);
+	updateDrawers();
+}
+
+void ViewEditor::joinSelection()
+{
+	PaperJoinSelection(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::groupSelection()
+{
+	PaperGroupSelection(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::ungroupSelection()
+{
+	PaperUngroupSelection(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::alignTop()
+{
+	PaperAlignTop(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::alignLeft()
+{
+	PaperAlignLeft(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::alignRight()
+{
+	PaperAlignRight(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::alignBottom()
+{
+	PaperAlignBottom(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::distributeHorizontally()
+{
+	PaperDistributeHorizontally(paper_);
+	updateDrawers();
+}
+
+void ViewEditor::distributeVertically()
+{
+	PaperDistributeVertically(paper_);
+	updateDrawers();
+}
+
+string ViewEditor::alternateEditor()
+{
+  return "SimpleEditor";
+}
+
+//-----------------------------------------------------------
+
+static EditorMaker<ViewEditor> editorMaker("ViewEditor");
+
+static EditorButtonMaker<ViewEditor> b1("ALIGN_BOTTOM",&ViewEditor::alignBottom,1);
+static EditorButtonMaker<ViewEditor> b2("ALIGN_TOP",  &ViewEditor::alignTop,2);
+static EditorButtonMaker<ViewEditor> b3("ALIGN_LEFT", &ViewEditor::alignLeft,3);
+static EditorButtonMaker<ViewEditor> b4("ALIGN_RIGHT",&ViewEditor::alignRight,4);
+
+static EditorButtonMaker<ViewEditor> b5("DISTR_VCENTER",&ViewEditor::distributeVertically,5);
+static EditorButtonMaker<ViewEditor> b6("DISTR_HCENTER",&ViewEditor::distributeHorizontally,6);
+
+
+void ViewEditor::savePages(IconObject* o,Request& r)
+{
+	FolderH pageFolder = o->embeddedFolder("Pages",true);
+
+	// Clean up old stuff
+	pageFolder->destroy();
+	pageFolder = o->embeddedFolder("Pages",true);
+
+
+	vector<IconObjectH> pages;
+
+	PaperRectangle* p  = PaperGetPages(paper_);
+	while(p)
+	{
+		Request r("PLOT_PAGE");
+		
+		saveRectangle(r,p);
+
+		//r("ROWS") = 1;
+		//r("COLUMNS") = 1;
+
+		IconObjectH page      = IconFactory::create(pageFolder,r);
+		FolderH subPageFolder = page->embeddedFolder("Sub Pages",true);
+		pages.push_back(page);
+
+		vector<IconObjectH> subpages;
+
+		PaperRectangle* s = p->kids;
+		while(s)
+		{
+			Request r("PLOT_SUBPAGE");
+			saveRectangle(r,s);
+			subpages.push_back(IconFactory::create(subPageFolder,r));
+			s = s->next;
+		}
+
+		page->subObjects("SUB_PAGES",subpages,r);
+
+		if(p->data)
+		{
+		    IconObject* view = ((PageView*)p->data)->view();
+		    if(view) page->subObjects("VIEW",vector<IconObjectH>(1,view),r);
+		}		  
+
+		page->request(r);
+		p = p->next;
+	}
+
+	current_->subObjects("PAGES",pages,r);
+	current_->request(r);
+}
+
+void ViewEditor::setGrid(double x,double y)
+{
+	PaperSetGrid(paper_,x,y);
+}
+
+void ViewEditor::getGrid(double& x,double& y)
+{
+	PaperGetGrid(paper_,&x,&y);
+}
+
+void ViewEditor::showGrid(bool on)
+{
+	PaperShowGrid(paper_,on);
+}
+
+void ViewEditor::snapGrid(bool on)
+{
+	PaperSnapGrid(paper_,on);
+}
+
+void ViewEditor::deleteSelection()
+{
+	PaperDeleteSelection(paper_);
+}
+
+void ViewEditor::addPage()
+{
+	PaperRectangle* r =  PaperAddPage(paper_,0,0,0.25,0.25);
+}
diff --git a/src/MetviewUI/ViewEditor.h b/src/MetviewUI/ViewEditor.h
new file mode 100644
index 0000000..713a961
--- /dev/null
+++ b/src/MetviewUI/ViewEditor.h
@@ -0,0 +1,203 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ViewEditor.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ViewEditor_H
+#define ViewEditor_H
+
+#ifndef InternalEditor_H
+#include "InternalEditor.h"
+#endif
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#include "UIViewEditor.h"
+
+#ifndef PageView_H
+#include "PageView.h"
+#endif
+
+
+struct PaperRectangle;
+
+class ViewEditor : public XEditor<UIViewEditor_c> {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ViewEditor(const IconClass&,const string&);
+
+// -- Destructor
+
+	virtual ~ViewEditor(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void splitSelection(int,int,double,double);
+	void joinSelection();
+	void groupSelection();
+	void ungroupSelection();
+
+	bool canSplitSelection();
+	bool canJoinSelection(); 
+	bool canGroupSelection();
+	bool canUngroupSelection();
+
+	void insetSelection(double,double,double,double);
+
+	void deleteSelection();
+	void addPage();
+
+	void setPaperSize(double,double);
+	void getPaperSize(double&,double&);
+
+	void setGrid(double,double);
+	void getGrid(double&,double&);
+	void showGrid(bool);
+	void snapGrid(bool);
+
+	void update();
+
+	void alignTop();
+	void alignHorizontally(); 
+	void alignLeft();
+	void alignRight();
+	void alignVertically(); 
+	void alignBottom();
+
+	void distributeHorizontally();
+	void distributeVertically();
+
+	void selectFirst();
+	void unselect();
+
+	void undo();
+	void redo();
+
+	IconObject* defaultView();
+
+	IconObject *makeIcon(Folder*,int, Request&);
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ViewEditor(const ViewEditor&);
+	ViewEditor& operator=(const ViewEditor&);
+
+// -- Members
+
+	Request request_;
+	vector<IconObjectH> save_;
+
+	map<IconObjectH,PageViewH> cache_;
+
+// -- Methods
+
+	PageView* pageView(IconObject*);
+
+
+	PaperRectangle* loadRectangle(const Request&);
+	PaperRectangle* loadPages(IconObject*,const Request&);
+	PaperRectangle* loadSubPages(IconObject*,const Request&);
+
+	void loadPaperSize(const Request&);
+	void savePaperSize(Request&);
+
+	void saveRectangle(Request&,PaperRectangle*);
+	void savePages(IconObject*,Request&);
+
+
+// -- Overridden methods
+
+	// From InternalEditor 
+
+	virtual void apply();
+	virtual void reset();
+	virtual void close();
+	virtual void merge(IconObject*);
+	virtual void replace(IconObject*);
+	virtual string alternateEditor();
+
+	// From DropSite. NOTE: we override the ones from Editor
+
+	virtual Widget dropSite();
+	virtual void drop(Dropping&);
+
+	virtual void drawCB(Widget,XtPointer);
+	virtual void dblClickCB(Widget,XtPointer);
+	virtual void changeCB(Widget,XtPointer);
+	virtual void splitCB(Widget, XtPointer );
+	virtual void joinCB(Widget, XtPointer );
+	virtual void groupCB(Widget, XtPointer );
+	virtual void ungroupCB(Widget, XtPointer );
+	virtual void deleteCB(Widget, XtPointer );
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ViewEditor& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ViewEditor**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ViewEditor);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/ViewsDrawer.cc b/src/MetviewUI/ViewsDrawer.cc
new file mode 100644
index 0000000..69b623a
--- /dev/null
+++ b/src/MetviewUI/ViewsDrawer.cc
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ViewsDrawer_H
+#include "ViewsDrawer.h"
+#endif
+
+#ifndef Editor_H
+#include "Editor.h"
+#endif
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#ifndef IconObject_H
+#include "IconObject.h"
+#endif
+
+
+#ifndef IconClass_H
+#include "IconClass.h"
+#endif
+#ifndef FolderWindow_H
+#include "FolderWindow.h"
+#endif
+
+#ifndef IconFactory_H
+#include "IconFactory.h"
+#endif
+#ifndef EditorDrawerFactory_H
+#include "EditorDrawerFactory.h"
+#endif
+
+#ifndef Folder_H
+#include "Folder.h"
+#endif
+
+#ifndef SyncFolders_H
+#include "SyncFolders.h"
+#endif
+
+#include <Drag.h>
+
+#ifndef ViewEditor_H
+#include "ViewEditor.h"
+#endif
+
+static Folder* folder(ViewEditor& e)
+{
+	return Folder::folder("templates",e.iconClass().defaultName() + "/Views", true);
+}
+
+ViewsDrawer::ViewsDrawer(ViewEditor& e):
+	XEditorDrawer<UIViewsDrawer_c>(e), 
+		FolderViewer(folder(e))
+{
+	FolderViewer::install(drag_);
+}
+
+ViewsDrawer::~ViewsDrawer()
+{
+}
+
+void ViewsDrawer::edit(IconObject* o)
+{	  	  
+}
+
+
+Widget ViewsDrawer::menu()
+{	  	
+	if ( current_.size() == 0 ) 	 
+		return menu2_;
+	return menu1_;
+}
+
+bool ViewsDrawer::accept(IconObject *o)
+{
+	return o->iconClass().type() == "View";
+}
+
+void ViewsDrawer::editCB( Widget, XtPointer )
+{	       
+ 	for(vector<IconObjectH>::iterator j = current_.begin() ; 
+		j != current_.end(); ++j)
+			(*j)->edit();
+}
+
+void ViewsDrawer::openFolderCB( Widget, XtPointer )
+{	
+	folder_->open();
+}
+
+void ViewsDrawer::updateCB( Widget, XtPointer )
+{	
+	folder_->empty();
+	fill(0);
+}
+
+struct Updater : public ClassScanner {
+
+	Folder* folder_;
+
+	void next(const IconClass& c) {
+
+		if(c.type() == "View")
+			c.createOne(folder_);
+	}
+
+	Updater(Folder* folder) : folder_(folder) {}
+
+};
+
+bool ViewsDrawer::fill(int pass)
+{
+	if(pass == 0)
+	{
+		Updater u(folder_);
+		IconClass::scan(u);
+	}
+	return false;
+}
+
+static EditorDrawerMaker<ViewsDrawer,ViewEditor> maker(99);
+
diff --git a/src/MetviewUI/ViewsDrawer.h b/src/MetviewUI/ViewsDrawer.h
new file mode 100644
index 0000000..a3696e9
--- /dev/null
+++ b/src/MetviewUI/ViewsDrawer.h
@@ -0,0 +1,152 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ViewsDrawer.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef ViewsDrawer_H
+#define ViewsDrawer_H
+
+#ifndef EditorDrawer_H
+#include "EditorDrawer.h"
+#endif
+
+#ifndef IconHolder_H
+#include "IconHolder.h"
+#endif
+
+#ifndef UIViewsDrawer_H  
+#include "UIViewsDrawer.h"
+#endif
+
+#ifndef Folder_H  
+#include "Folder.h"
+#endif
+
+
+#ifndef FolderViewer_H  
+#include "FolderViewer.h"
+#endif
+
+class ViewEditor;
+
+class ViewsDrawer : public XEditorDrawer<UIViewsDrawer_c>, 
+	public FolderViewer {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	ViewsDrawer(ViewEditor&);
+
+// -- Destructor
+
+	virtual ~ViewsDrawer(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None 
+
+
+// -- Class methods
+	// None 
+
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+	// from IconHolder
+	virtual bool accept(IconObject*);
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	ViewsDrawer(const ViewsDrawer&);
+	ViewsDrawer& operator=(const ViewsDrawer&);
+
+// -- Members
+	// None	
+
+// -- Methods
+
+// -- Overridden methods
+		 	
+	 // from EditorDrawer
+
+	 virtual void edit(IconObject*);
+
+	// From DragWindow
+
+	virtual Widget menu();
+	virtual bool dropCopy() { return true; }
+
+	// From FolderViewer
+
+	virtual bool fill(int);
+	
+	//from UIViewsDrawer_c
+
+	virtual void editCB( Widget, XtPointer );
+	virtual void openFolderCB( Widget, XtPointer );
+	virtual void updateCB( Widget, XtPointer );
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const ViewsDrawer& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(ViewsDrawer**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(ViewsDrawer);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/Wastebasket.cc b/src/MetviewUI/Wastebasket.cc
new file mode 100644
index 0000000..65c28b2
--- /dev/null
+++ b/src/MetviewUI/Wastebasket.cc
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Log.h"
+#include "Wastebasket.h"
+#include "IconFactory.h"
+
+Wastebasket::Wastebasket(Folder* parent,const IconClass& kind,
+		const string& name,IconInfo* info):
+	SystemFolder(parent,kind,name,info)
+{
+}
+
+Wastebasket::~Wastebasket()
+{
+}
+
+bool Wastebasket::adopt(IconObject* o)
+{
+	IconObject* x = find(o->name());
+	if(x == o) return false;
+
+	if(x != 0)
+	{
+		x->destroy();
+		Log::warning(this) << "Object " << o->name() 
+			<< " already in wastebasket" << endl;
+	}
+
+	return SystemFolder::adopt(o);
+}
+
+void Wastebasket::empty()
+{
+	scan();
+	KidMap kids = kids_;
+	for(KidMap::iterator j = kids.begin(); j != kids.end() ; ++j)
+	{
+		IconObject* o = (*j).second;
+		Log::info(this) << "Remove " << *o << endl;
+		o->destroy();
+	}
+}
+
+set<string> Wastebasket::can()
+{
+	scan();
+	set<string> c = SystemFolder::can();
+	if(kids_.size()) c.insert("empty");
+	return c;
+}
+
+static IconMaker<Wastebasket> wastebasketFactory("WASTEBASKET");
diff --git a/src/MetviewUI/Wastebasket.h b/src/MetviewUI/Wastebasket.h
new file mode 100644
index 0000000..4bfe03f
--- /dev/null
+++ b/src/MetviewUI/Wastebasket.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Wastebasket.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Wastebasket_H
+#define Wastebasket_H
+
+#include "SystemFolder.h"
+
+class Wastebasket : public SystemFolder {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Wastebasket(Folder* parent,const IconClass& kind,const string& name,IconInfo* info);
+
+// -- Destructor
+
+	virtual ~Wastebasket(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	virtual void empty();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	Wastebasket(const Wastebasket&);
+	Wastebasket& operator=(const Wastebasket&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+	virtual bool adopt(IconObject*);
+	virtual set<string> can();
+
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Wastebasket& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Wastebasket**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Wastebasket);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XMLabel.cc b/src/MetviewUI/XMLabel.cc
new file mode 100755
index 0000000..43295b9
--- /dev/null
+++ b/src/MetviewUI/XMLabel.cc
@@ -0,0 +1,34 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMLabel_H
+#include "XMLabel.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+
+
+XMLabel::XMLabel(Widget label):
+	label_(label)
+{
+}
+
+XMLabel::~XMLabel()
+{
+}
+
+void XMLabel::set(const string& s)
+{
+	XMString xm(s);
+	if(label_) XtVaSetValues(label_,XmNlabelString,XmString(xm),0);
+}
+
diff --git a/src/MetviewUI/XMLabel.h b/src/MetviewUI/XMLabel.h
new file mode 100755
index 0000000..ee16c47
--- /dev/null
+++ b/src/MetviewUI/XMLabel.h
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XMLabel.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef XMLabel_H
+#define XMLabel_H
+
+#include <string>
+using std::string;
+
+#include <Xm/Xm.h>
+
+
+class XMLabel {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	XMLabel(Widget);
+
+// -- Destructor
+
+	~XMLabel(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void set(const string&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	XMLabel(const XMLabel&);
+	XMLabel& operator=(const XMLabel&);
+
+// -- Members
+	
+	Widget label_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XMLabel& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(XMLabel**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XMLabel);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XMList.cc b/src/MetviewUI/XMList.cc
new file mode 100644
index 0000000..0756f7f
--- /dev/null
+++ b/src/MetviewUI/XMList.cc
@@ -0,0 +1,176 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMList_H
+#include "XMList.h"
+#endif
+
+#ifndef XMString_H
+#include "XMString.h"
+#endif
+
+#include <Xm/List.h>
+#include <Xm/ListP.h>
+
+
+XMList::XMList(Widget list):
+	list_(list)
+{
+}
+
+XMList::~XMList()
+{
+}
+
+void XMList::clear()
+{
+	XmListDeleteAllItems(list_);
+}
+
+void XMList::add(const string& s)
+{
+	XMString xm(s);
+	XmListAddItemUnselected(list_,xm,0);
+}
+
+void XMList::add(const string& s,bool bold)
+{
+	XMString xm(s,bold ? "bold" : "normal");
+	XmListAddItemUnselected(list_,xm,0);
+}
+
+void XMList::add(const vector<string>& v)
+{
+	for(vector<string>::const_iterator j = v.begin(); j != v.end(); ++j)
+		add(*j);
+}
+
+void XMList::deselect()
+{
+	XmListDeselectAllItems(list_);
+}
+
+void XMList::showSelection()
+{
+	int* pos;
+	int count;
+	XmListWidget lw = XmListWidget(list_);
+
+
+	if(XmListGetSelectedPos(list_,&pos,&count))
+	{
+		int best = 0;
+		for(int i = 0; i < count; i++)
+		{
+			if(pos[i] >= lw->list.top_position && 
+			   pos[i] <= lw->list.top_position + lw->list.visibleItemCount)
+					return;
+		}
+		XmListSetPos(list_,pos[best]);
+	}
+}
+
+void XMList::select(const string& s)
+{
+	XMString xm(s);
+	XmListSelectItem(list_,xm,false);
+}
+
+void XMList::select(const vector<string>& v)
+{
+	for(vector<string>::const_iterator j = v.begin(); j != v.end(); ++j)
+		select(*j);
+}
+
+vector<string> XMList::selection()
+{
+	XmString *items;
+	int count;
+
+	XtVaGetValues(list_,
+		XmNselectedItems,&items,
+		XmNselectedItemCount,&count,
+		0);
+
+	vector<string> result(count);
+	for(int i = 0; i < count; i++)
+	{
+		XMString xm(items[i]);
+		result[i] = xm;
+	}
+
+	return result;
+}
+
+vector<string> XMList::values()
+{
+	XmString *items;
+	int count;
+
+	XtVaGetValues(list_,
+		XmNitems,&items,
+		XmNitemCount,&count,
+		0);
+
+	vector<string> result(count);
+	for(int i = 0; i < count; i++)
+	{
+		XMString xm(items[i]);
+		result[i] = xm;
+	}
+
+	return result;
+}
+
+void XMList::multiple()
+{
+	XtVaSetValues(list_, XmNselectionPolicy, XmMULTIPLE_SELECT,0);
+}
+
+void XMList::addMissing(const vector<string>& v)
+{
+	for(vector<string>::const_iterator j = v.begin(); j != v.end(); ++j)
+	{
+		XMString xm(*j);
+		if(!XmListItemExists(list_,xm))
+			XmListAddItemUnselected(list_,xm,0);
+	}
+}
+
+bool XMList::exists(const string& s)
+{
+	XMString xm(s);
+	return XmListItemExists(list_,xm);
+}
+
+void XMList::remove(const string& s)
+{
+	XMString xm(s);
+	XmListDeleteItem(list_,xm);
+}
+
+void XMList::remove(const vector<string>& v)
+{
+	for(vector<string>::const_iterator j = v.begin(); j != v.end(); ++j)
+		remove(*j);
+}
+
+void XMList::sort()
+{
+	vector<string> v = values();
+	clear();
+
+#ifdef NOUSING
+	::sort(v.begin(),v.end());
+#else
+	std::sort(v.begin(),v.end());
+#endif
+
+	add(v);
+}
diff --git a/src/MetviewUI/XMList.h b/src/MetviewUI/XMList.h
new file mode 100644
index 0000000..0441630
--- /dev/null
+++ b/src/MetviewUI/XMList.h
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XMList.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef XMList_H
+#define XMList_H
+
+#include "inc_stl.h"
+using std::string;
+
+#include <Xm/Xm.h>
+
+class Path;
+
+class XMList {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	XMList(Widget);
+
+// -- Destructor
+
+	~XMList(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void clear();
+	void add(const string&);
+	void add(const string&,bool bold);
+	void add(const vector<string>&);
+	void select(const string&);
+	void select(const vector<string>&);
+	void deselect();
+	void showSelection();
+	void multiple();
+	bool exists(const string&);     
+
+	void addMissing(const vector<string>&);
+	void remove(const string&);
+	void remove(const vector<string>&);
+
+	vector<string> selection();
+	vector<string> values();
+
+	void sort();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	XMList(const XMList&);
+	XMList& operator=(const XMList&);
+
+// -- Members
+	
+	Widget list_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XMList& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(XMList**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XMList);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XMString.cc b/src/MetviewUI/XMString.cc
new file mode 100644
index 0000000..dd3ee0b
--- /dev/null
+++ b/src/MetviewUI/XMString.cc
@@ -0,0 +1,141 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "XMString.h"
+
+
+XMString::XMString(const char* s,const char* font):
+	str_(0)
+{
+
+	if(!s) return;
+
+	if(font == 0) font = "normal";
+
+
+	if(*s == '\n')
+	{
+		str_ = XmStringSeparatorCreate();
+		*this += XMString(s+1,font);
+		return;
+	}
+
+
+	if(strchr(s,'\n'))
+	{
+
+		XmString xms1;
+		XmString xms2;
+		XmString line;
+		XmString separator;
+		char     *p;
+		char     *t = XtNewString(s);	/* Make a copy for strtok not to */
+                                 	/* damage the original string    */
+
+		separator = XmStringSeparatorCreate();
+		p         = strtok(t,"\n");
+		xms1      = XmStringCreateLtoR(p,(char*)font);
+
+		while (p = strtok(NULL,"\n"))
+		{
+			line = XmStringCreateLtoR(p,(char*)font);
+			xms2 = XmStringConcat(xms1,separator);
+			XmStringFree(xms1);
+			xms1 = XmStringConcat(xms2,line);
+			XmStringFree(xms2);
+			XmStringFree(line);
+		}
+
+		XmStringFree(separator);
+		XtFree(t);
+
+		str_ =  xms1;
+	}
+	else str_ = XmStringCreateLtoR((char*)s,(char*)font);
+}
+
+XMString::XMString(const string& s,const char* font):
+	str_(0)
+{
+	*this = XMString(s.c_str(),font);
+}
+
+XMString::~XMString()
+{
+	if(str_)
+		XmStringFree(str_);
+}
+
+XMString::XMString(XmString s):
+	str_(XmStringCopy(s))
+{
+}
+
+XMString::XMString(const XMString& other):
+	str_(other.str_?XmStringCopy(other.str_):0)
+{
+}
+
+XMString& XMString::operator=(const XMString& other)
+{
+	if(str_) XmStringFree(str_);
+	str_ = 0;
+	if(other.str_) str_ = XmStringCopy(other.str_);
+	return *this;
+}
+
+XMString XMString::operator+(const XMString& other) const
+{
+	if(!other.str_) return *this;
+	if(!str_) return other;
+
+	XMString x;
+	x.str_ = XmStringConcat(str_,other.str_);
+	return x;
+}
+
+XMString& XMString::operator+=(const XMString& other)
+{
+	*this = *this + other;
+	return *this;
+}
+
+XMString::operator string() const
+{
+	if(str_ == 0) return string();
+	
+	XmStringContext  context;
+	char             *text;
+	XmStringCharSet   charset;
+	XmStringDirection dir;
+	Boolean           separator;
+	int               done = FALSE;
+
+	string result;
+
+	XmStringInitContext (&context, str_);
+	while (!done)
+		if(XmStringGetNextSegment (context, &text, &charset, &dir, &separator))
+		{
+			if(separator) /* Stop when next segment is a separator */
+				done = TRUE;
+
+			result += text;
+
+			XtFree(charset);
+			XtFree(text);
+		}
+		else
+			done = TRUE;
+
+	XmStringFreeContext (context);
+
+	return result;
+
+}
diff --git a/src/MetviewUI/XMString.h b/src/MetviewUI/XMString.h
new file mode 100644
index 0000000..94c868d
--- /dev/null
+++ b/src/MetviewUI/XMString.h
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XMString.h
+// Baudouin Raoult - ECMWF Feb 99
+
+#ifndef XMString_H
+#define XMString_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#include <Xm/Xm.h>
+#include <string>
+using std::string;
+
+
+class XMString {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	XMString(const char* = 0, const char* set = 0);
+	XMString(const string&,const char* set = 0);
+
+	XMString(XmString);
+	XMString(const XMString&);
+	XMString& operator=(const XMString&);
+
+// -- Destructor
+
+	~XMString();
+
+// -- Convertors
+	// None
+
+// -- Operators
+
+	operator XmString() const { return str_; }
+
+	XMString operator+(const XMString&) const; 
+	XMString& operator+=(const XMString&);
+
+	operator string() const;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+
+// -- Members
+
+	XmString str_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XMString& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(XMString**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XMString);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XMText.cc b/src/MetviewUI/XMText.cc
new file mode 100644
index 0000000..0566b8c
--- /dev/null
+++ b/src/MetviewUI/XMText.cc
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XMText_H
+#include "XMText.h"
+#endif
+
+#include <Xm/Text.h>
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+
+XMText::XMText(Widget text):
+	text_(text)
+{
+}
+
+XMText::~XMText()
+{
+}
+
+void XMText::load(const Path& path,bool include)
+{
+	string s = path.loadText();
+	if(include)
+		insert(s);
+	else
+		set(s);
+}
+
+void XMText::save(const Path& path)
+{
+	path.saveText(get());
+}
+
+void XMText::insert(const string& s,bool select)
+{
+	XmTextPosition	from,to;
+
+	XmTextGetSelectionPosition(text_,&from,&to);
+	if(from == to) from = to = XmTextGetInsertionPosition(text_);
+	XmTextReplace(text_,from,to,(char*)s.c_str());
+	if(select)
+		XmTextSetSelection(text_,from,from+s.length(),CurrentTime);
+	else
+		XmTextSetSelection(text_,from+s.length(),
+			from+s.length(),CurrentTime);
+	XmTextSetInsertionPosition(text_,from+s.length());
+}
+
+string XMText::get()
+{
+	char* p = XmTextGetString(text_);
+	string s = p;
+	XtFree(p);
+	return s;
+}
+
+void XMText::set(const string& s)
+{
+	XmTextSetString(text_,(char*)s.c_str());
+}
+
+void XMText::clear()
+{
+	XmTextSetString(text_,"");
+}
+
+void XMText::append(const string& s)
+{
+	moveToEnd();
+	insert(s);
+	moveToEnd();
+}
+
+void XMText::moveToEnd()
+{
+	XmTextPosition pos = XmTextGetLastPosition(text_);
+	XmTextSetInsertionPosition(text_,pos);
+	XmTextSetSelection(text_,pos,pos,CurrentTime);
+	XmTextShowPosition(text_,pos);
+}
+
+
+void XMText::selectLine(int line)
+{
+	char *p              = XmTextGetString(text_);
+	char *q              = p;
+	XmTextPosition start = 0;
+	XmTextPosition end   = XmTextGetLastPosition(text_);
+	int    n             = 0;
+
+	if(line<=0) line = 1;
+
+	while(*p)
+	{
+		if(*p == '\n') 
+		{ 
+			n++;
+			if(n == line)  
+			{
+				end = p - q;
+				break;
+			}
+			start = p - q + 1;
+		}
+		p++;
+	}
+
+	XmTextSetSelection(text_,start,end,CurrentTime);
+	XmTextShowPosition(text_,start);
+
+	XtFree((char*)q);
+}
+
+void XMText::set(double x)
+{
+	char buf[80];
+	sprintf(buf,"%g",x);
+	set(buf);
+}
+
+void XMText::get(double& x)
+{
+	x = atof(get().c_str());
+}
diff --git a/src/MetviewUI/XMText.h b/src/MetviewUI/XMText.h
new file mode 100644
index 0000000..78d1054
--- /dev/null
+++ b/src/MetviewUI/XMText.h
@@ -0,0 +1,131 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XMText.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef XMText_H
+#define XMText_H
+
+#include <string>
+using std::string;
+#include <Xm/Xm.h>
+
+class Path;
+
+class XMText {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	XMText(Widget);
+
+// -- Destructor
+
+	~XMText(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void load(const Path&,bool insert = false);
+	void map(const Path&);
+	void save(const Path&);
+
+	void clear();
+	void set(const string&);
+	string get();
+
+	void insert(const string&,bool select = false);
+	void append(const string&);
+	void moveToEnd();
+
+	void selectLine(int);
+
+	void set(double);
+	void get(double&);
+
+	void set(int);
+	void get(int&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	XMText(const XMText&);
+	XMText& operator=(const XMText&);
+
+// -- Members
+	
+	Widget text_;
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XMText& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(XMText**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XMText);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XPalette.cc b/src/MetviewUI/XPalette.cc
new file mode 100644
index 0000000..844a2b6
--- /dev/null
+++ b/src/MetviewUI/XPalette.cc
@@ -0,0 +1,196 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XPalette_H
+#include "XPalette.h"
+#endif
+
+#ifndef MetviewUI_H
+#include "MetviewUI.h"
+#endif
+
+#ifndef ConfigLoader_H
+#include "ConfigLoader.h"
+#endif
+
+#include <Palette.h>
+#include <ctype.h>
+#include <math.h>
+
+#ifndef Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+
+static Palette palette = 0;
+static map<string,RGBColor> colors;
+static vector<string>  names;
+
+void XPalette::load(request* r)
+{
+	const char* fname = get_value(r,"colour_file",0);
+	if(!fname) return;
+
+	FILE *f = fopen(fname, "r");
+
+	if (!f) return;
+
+	char		   line[500];
+	char           color[80];
+	char           name[80];
+
+	palette = NewPalette(MetviewUI::root());
+
+	while(fgets(line,sizeof(line),f))
+	{
+		char *p = line;
+		int  i = 0;
+
+		sscanf(p,"%s ; %s",color,name);
+		while(*p && !i)
+		{
+			
+			if(*p == '#')
+			{
+				color[i++] = *p++;
+				while(*p && isxdigit(*p))
+					color[i++] = *p++;
+				color[i] = 0;
+				if(i != 4 && i != 7 && i != 13)
+					i = 0;
+			}
+			p++;
+		}
+		if(i) {
+			names.push_back(name);
+			PaletteNameToRGB(palette,color,&colors[name]);
+		}
+	}
+
+	fclose(f);
+}
+
+
+Pixel XPalette::pixel(const string& name)
+{
+	static map<string,Pixel> cache;
+	map<string,Pixel>::iterator j = cache.find(name);
+
+	if(j != cache.end())
+		return (*j).second;
+
+	Pixel p = PaletteNamedColor(palette,name.c_str());
+	cache[name] = p;
+	return p;
+}
+
+void XPalette::scan(PaletteScanner& p)
+{
+	for(vector<string>::iterator j = names.begin(); j != names.end(); ++j)
+		p.next(*j);
+}
+
+void XPalette::convert(const string& name,RGBColor& c)
+{
+	map<string,RGBColor>::iterator j = colors.find(name);
+	if(j == colors.end())
+		magics(name);
+
+	c = colors[name];
+}
+
+bool XPalette::exists(const string& name)
+{
+	return colors.find(name) != colors.end();
+}
+
+inline bool same(double a,double b)
+{
+	return abs(a-b) < 0.001;
+}
+
+bool XPalette::convert(const RGBColor& c,string& name)
+{
+	RGBColor r;
+	for(map<string,RGBColor>::iterator j = colors.begin(); j != colors.end(); ++j)
+	{
+		const RGBColor& r = (*j).second;
+		if(same(c.red,r.red) && same(c.green,r.green) && same(c.blue,r.blue))
+		{
+			name = (*j).first;
+			return true;
+		}
+	}
+	return false;
+}
+
+Pixel XPalette::magics(const string& name)
+{
+	map<string,RGBColor>::iterator j = colors.find(name);
+	if(j != colors.end())
+		return PaletteRGBColor(palette,&(*j).second);
+
+	Tokenizer parse("(, )");
+	vector<string> v;
+
+	parse(name,v);
+
+	RGBColor c;
+	HSLColor h;
+
+	// Try rgb, hsl
+
+	if(v.size() == 4)
+	{
+		double x1 = atof(v[1].c_str());
+		double x2 = atof(v[2].c_str());
+		double x3 = atof(v[3].c_str());
+
+		switch(v[0][0])
+		{
+			case 'r':
+			case 'R':
+				c = RGBColor(x1,x2,x3);
+				break;
+
+			case 'h':
+			case 'H':
+				h = HSLColor(x1,x2,x3);
+				PaletteHSLToRGB(palette,&h,&c);
+				break;
+		}
+
+	}
+
+	colors[name] = c;
+	return PaletteRGBColor(palette,&c);
+}
+
+Pixel XPalette::pixel(const RGBColor& c)
+{
+	return PaletteRGBColor(palette,&c);
+}
+
+Pixel XPalette::pixel(const HSLColor& c)
+{
+	return PaletteHSLColor(palette,&c);
+}
+
+void XPalette::convert(const RGBColor& a,HSLColor& b)
+{
+	PaletteRGBToHSL(palette,&a,&b);
+}
+
+void XPalette::convert(const HSLColor& a,RGBColor& b)
+{
+	PaletteHSLToRGB(palette,&a,&b);
+}
+
+
+static SimpleLoader<XPalette> load("resources",0);
diff --git a/src/MetviewUI/XPalette.h b/src/MetviewUI/XPalette.h
new file mode 100644
index 0000000..5722a21
--- /dev/null
+++ b/src/MetviewUI/XPalette.h
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XPalette.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef XPalette_H
+#define XPalette_H
+
+#include <Xm/Xm.h>
+#include <string>
+using std::string;
+
+struct request;
+struct RGBColor;
+struct HSLColor;
+
+
+class PaletteScanner {
+public:
+	virtual void next(const string&) = 0;
+};
+
+class XPalette {
+public:
+
+	XPalette(int);
+	~XPalette();
+
+// -- Class members
+
+	
+	static Pixel pixel(const RGBColor&);
+	static Pixel pixel(const HSLColor&);
+
+	static Pixel  pixel(const string&); // Name is X name
+	static Pixel  magics(const string&); // Name is Magics name
+
+	static void convert(const RGBColor&,HSLColor&);
+	static void convert(const HSLColor&,RGBColor&);
+
+	// Names are magics names
+
+	static void convert(const string&,RGBColor&);
+	static bool convert(const RGBColor&,string&);
+	static bool exists(const string&);
+
+
+	//---
+
+	static void scan(PaletteScanner&);
+
+
+	static void load(request*);
+
+
+
+// -- Class methods
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	XPalette(const XPalette&);
+	XPalette& operator=(const XPalette&);
+
+// -- Members
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XPalette& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(XPalette**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XPalette);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XPixmap.cc b/src/MetviewUI/XPixmap.cc
new file mode 100644
index 0000000..f9676de
--- /dev/null
+++ b/src/MetviewUI/XPixmap.cc
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <X11/xpm.h>
+#include "XPixmap.h"
+#include "Drag.h"
+#include "MetviewUI.h"
+#include <iostream>
+
+XPixmap::XPixmap(const Path& name):
+	name_(name),
+	pixmap_(0)
+{
+}
+
+XPixmap::~XPixmap()
+{
+}
+
+void XPixmap::setLabel(Widget w)
+{
+	Pixmap pixmap = pixels();
+	if(pixmap == XmUNSPECIFIED_PIXMAP)
+		return;
+
+	pixmap = CopyBackground(w,pixmap);
+
+	XtVaSetValues(w,
+		XmNlabelType, XmPIXMAP,
+		XmNlabelPixmap,pixmap,
+		0);
+
+	pixmap = MakeDisabledPixmap(w,pixmap);
+
+	XtVaSetValues(w,
+		XmNlabelInsensitivePixmap,pixmap,
+		0);
+}
+
+Pixmap XPixmap::pixels()
+{
+	if(!pixmap_) pixmap_ = DragGetPixmap(MetviewUI::root(),name_.str().c_str());
+	return pixmap_;
+
+}
+
+static Path path(const string& name)
+{
+	static string dir(getenv("METVIEW_DIR_SHARE"));
+	return Path(dir + "/icons/" + name + ".icon");
+}
+
+XPixmap::XPixmap(const string& name):
+	name_(path(name)),
+	pixmap_(0)
+{
+}
+
+const string& XPixmap::name()
+{
+	return name_.str();
+}
diff --git a/src/MetviewUI/XPixmap.h b/src/MetviewUI/XPixmap.h
new file mode 100644
index 0000000..592d8db
--- /dev/null
+++ b/src/MetviewUI/XPixmap.h
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XPixmap.h
+// Baudouin Raoult - ECMWF Dec 98
+
+#ifndef XPixmap_H
+#define XPixmap_H
+
+
+#include <Xm/Xm.h>
+#include <X11/xpm.h>
+
+#include <string>
+using std::string;
+
+
+#ifndef Path_H
+#include "Path.h"
+#endif
+
+
+class XPixmap {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	XPixmap(const string&);
+	XPixmap(const Path&);
+
+// -- Destructor
+
+	~XPixmap(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+	operator Pixmap() { return pixels();  } 
+
+// -- Methods
+
+	Pixmap pixels();
+	void setLabel(Widget);
+	const string& name();
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	XPixmap(const XPixmap&);
+	XPixmap& operator=(const XPixmap&);
+
+// -- Members
+
+	Pixmap pixmap_;
+	Path   name_;
+
+// -- Methods
+
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XPixmap& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(XPixmap**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XPixmap);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/XResource.cc b/src/MetviewUI/XResource.cc
new file mode 100755
index 0000000..fd5624e
--- /dev/null
+++ b/src/MetviewUI/XResource.cc
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XResource_H
+#include "XResource.h"
+#endif
+
+static map<string, XResource*>* resources = 0;
+
+
+XResource::XResource(const string& r, const string& x)
+{      
+	if(resources == 0)
+		resources = new map<string,XResource*>;
+	
+	name_  = r;
+	motif_ = x;
+		(*resources)[r] = this;
+}
+
+XResource::~XResource()
+{
+}
+
+void XResource::setValues(Widget w, const Request& r)
+{	
+		              
+   	if(!resources) return;
+
+	for(map<string,XResource*>::iterator j = resources->begin(); j != resources->end(); ++j)
+		if(r.countValues((*j).second->name_.c_str()))
+			(*j).second->setValue(w,r);
+
+}
+
+void* XResourceTranslator(const string& name, const string& motif) {
+       return   new  XBasicResource<int>(name, motif);
+}
+
diff --git a/src/MetviewUI/XResource.h b/src/MetviewUI/XResource.h
new file mode 100755
index 0000000..5c8647d
--- /dev/null
+++ b/src/MetviewUI/XResource.h
@@ -0,0 +1,206 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File XResource.h
+// Baudouin Raoult - ECMWF Feb 99
+
+#ifndef XResource_H
+#define XResource_H
+
+// Headers
+// #ifndef   machine_H
+// #include <machine.h>
+// #endif
+
+// Forward declarations
+
+// class ostream;
+// typedef class _Pvts os_typespec; // Remove if not persistant
+
+// 
+
+#include <Xm/Xm.h>
+#include "inc_iostream.h"
+
+#include <string>
+using std::string;
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+
+class XResource {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	XResource(const string&, const string&);
+
+// -- Destructor
+
+	~XResource();
+// -- Convertors
+	// None
+
+// -- Operators						   X
+
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+		
+// -- Class methods
+	static void setValues(Widget, const Request&);
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+	string	name_; 
+	string 	motif_;
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+	XResource(const XResource&);
+	XResource& operator=(const XResource&);
+
+// -- Member
+	// None
+
+	
+// -- Methods
+	// None
+
+	virtual void setValue(Widget,const Request&) = 0;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const XResource& p)
+	//	{ p.print(s); return s; }
+
+};
+
+template<class T>
+class XBasicResource : public XResource{
+
+	virtual void setValue(Widget w,const Request& r)
+	{
+		T value = r(name_.c_str());
+		cout << "XResource::setValue: " << motif_.c_str() << " = " << value << endl;
+	
+		XtVaSetValues(w, motif_.c_str(), value, 0);
+	}
+
+public: 
+	XBasicResource(const string& name, const string& motif):
+		XResource(name,motif) {}
+
+};	  
+
+
+template <class T> 
+class XEnum 
+{
+	typedef map<string,T> Map;
+	Map map_;
+
+public:
+	XEnum(const string& name,  const T& motif) 
+	{
+		map_[name] = motif;
+	}
+
+	XEnum& operator+(const XEnum<T>& other)  
+	{	
+		const Map& o = other.map_;
+		for(typename Map::const_iterator j = o.begin(); j != o.end(); ++j)
+			map_.insert(*j);
+		return *this;
+	}
+
+	operator Map() { return map_; } 
+};
+
+
+template<class T>
+class XEnumResource : public XResource{
+	typedef map<string,T> Map;
+	Map map_;
+
+	virtual void setValue(Widget w,const Request& r)
+	{
+		const char* value = r(name_.c_str());
+		cout << "XEnumResource::setValue: " << value << " = " << int(map_[value]) << endl;
+		XtVaSetValues(w,motif_.c_str(), map_[value], 0);
+	}
+
+public: 
+
+	XEnumResource(const string& name, const string& motif, XEnum<T>& values):
+		XResource(name, motif),
+		map_(values) {}
+};
+/*
+template <class T>
+void* XResourceTranslator(const string& name, const string& motif, const T& d) {
+       return 	new  XBasicResource<T>(name, motif);
+}
+*/
+
+void* XResourceTranslator(const string& name, const string& motif);
+
+template <class T>
+void* XResourceTranslator(const string& name, const string& motif, XEnum<T>& values) {
+       return 	new  XEnumResource<T>(name, motif, values);
+}
+	  
+template <class T>
+XEnum<T> XEnumTranslator(const string& name, const T& d) {
+	return XEnum<T>(name, d);
+}	
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(XResource);
+//#endif
+
+#endif
diff --git a/src/MetviewUI/auto_ptr.h b/src/MetviewUI/auto_ptr.h
new file mode 100644
index 0000000..7466585
--- /dev/null
+++ b/src/MetviewUI/auto_ptr.h
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef AUTO_PTR_H
+#define AUTO_PTR_H
+
+
+template<class T>
+class auto_ptr {
+	T* ptr_;
+public:
+      
+// --   Normal Constructor
+
+	auto_ptr(T* ptr = 0) : ptr_(ptr) {}
+
+// --   Destructor
+	~auto_ptr()   { delete ptr_; }
+
+// --   Copy Constructor
+
+	auto_ptr(auto_ptr<T>& other) 
+		{
+		ptr_ = other.ptr_;
+		other.ptr_ = 0;
+		}
+
+	auto_ptr<T>& operator=(auto_ptr<T>& other) 
+		{
+			if(this != &other)
+			{
+				delete ptr_;
+				ptr_ = other.ptr_;
+				other.ptr_ = 0;
+			}
+			return *this;
+		}
+
+	T* get() const        { return ptr_; }
+
+        T* release()          { T* old = ptr_; ptr_ = 0; return old; }
+	T* operator->() const { return ptr_; }
+	T& operator*()  const { return *ptr_; }
+	
+};
+#endif
diff --git a/src/MetviewUI/main.cc b/src/MetviewUI/main.cc
new file mode 100644
index 0000000..5053eeb
--- /dev/null
+++ b/src/MetviewUI/main.cc
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "MetviewUI.h"
+
+static int xerror(Display *d, XErrorEvent *e)
+{
+  cout << "\nXlib error encountered!!!" << endl;
+  cout << "   To find the originating location in the source code, i.e." << endl;
+  cout << "   to get a proper call stack, run MetviewUI in a debugger" << endl;
+  cout << "   with run-time flag '-synchronous' (otherwise call stack" << endl;
+  cout << "   will not correspond to the originating error location).\n" << endl;
+
+  char buf[1024];
+  XGetErrorText(d,e->error_code,buf,sizeof(buf));
+  cout << "xerror: " << buf << "\n" << endl;
+
+  abort();
+  return 0;    //-- we could use this for non-fatal errors...
+}
+
+
+int main (int argc, char **argv)
+{
+	XtToolkitInitialize ();
+	MetviewUI app(XtCreateApplicationContext(), argc, argv);
+
+	XSetErrorHandler(xerror);
+
+	app.run();
+}
+
diff --git a/src/MvApp/Makefile.am b/src/MvApp/Makefile.am
new file mode 100644
index 0000000..c6ffbe0
--- /dev/null
+++ b/src/MvApp/Makefile.am
@@ -0,0 +1,82 @@
+ 
+bin_PROGRAMS = bin/pool  bin/Mars bin/togrib  bin/tomatrix  bin/geo_to_grib  bin/grib_to_geo
+
+
+bin_pool_SOURCES  = pool.cc
+bin_pool_LDADD    = $(STANDARD_METVIEW_LIBS)
+
+
+
+bin_Mars_SOURCES  = MarsG2.cc
+bin_Mars_LDADD    = $(STANDARD_METVIEW_LIBS) $(FDBLIB) $(FLIBS) $(METVIEW_UTIL_LIB) 
+
+if METVIEW_MARS_ODB
+bin_Mars_LDFLAGS = $(ODB_LDFLAGS)
+bin_Mars_LDADD += $(ODB_LIBS)
+endif
+
+
+bin_togrib_SOURCES  = togrib.cc
+bin_togrib_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+
+bin_tomatrix_SOURCES  = tomatrix.cc
+bin_tomatrix_LDADD    = $(STANDARD_METVIEW_LIBS)
+
+
+bin_geo_to_grib_SOURCES  = geo_to_grib.cc
+bin_geo_to_grib_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+
+bin_grib_to_geo_SOURCES  = grib_to_geo.cc
+bin_grib_to_geo_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+
+share_DATA =
+
+if METVIEW_MARS_ODB
+share_DATA     += $(local_sharedir)/ObjectSpec.MarsOdb
+endif
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+
+icons = 
+
+if METVIEW_MARS_ODB
+icons += $(local_iconsdir)/ODB_MARS.xpm
+endif
+
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin
+
+if METVIEW_MARS_ODB
+BUILT_SOURCES += $(icons)
+endif
+
+
+
+EXTRA_DIST =
+
+if METVIEW_MARS_ODB
+EXTRA_DIST += ODB_MARS.xpm ObjectSpec.MarsOdb
+endif
+
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/MvApp/Makefile.in b/src/MvApp/Makefile.in
new file mode 100644
index 0000000..dcaa149
--- /dev/null
+++ b/src/MvApp/Makefile.in
@@ -0,0 +1,755 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/pool$(EXEEXT) bin/Mars$(EXEEXT) bin/togrib$(EXEEXT) \
+	bin/tomatrix$(EXEEXT) bin/geo_to_grib$(EXEEXT) \
+	bin/grib_to_geo$(EXEEXT)
+ at METVIEW_MARS_ODB_TRUE@am__append_1 = $(ODB_LIBS)
+ at METVIEW_MARS_ODB_TRUE@am__append_2 = $(local_sharedir)/ObjectSpec.MarsOdb
+ at METVIEW_MARS_ODB_TRUE@am__append_3 = $(local_iconsdir)/ODB_MARS.xpm
+ at METVIEW_MARS_ODB_TRUE@am__append_4 = $(icons)
+ at METVIEW_MARS_ODB_TRUE@am__append_5 = ODB_MARS.xpm ObjectSpec.MarsOdb
+subdir = src/MvApp
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Mars_OBJECTS = MarsG2.$(OBJEXT)
+bin_Mars_OBJECTS = $(am_bin_Mars_OBJECTS)
+am__DEPENDENCIES_1 =
+ at METVIEW_MARS_ODB_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+bin_Mars_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_2)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_Mars_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_Mars_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_geo_to_grib_OBJECTS = geo_to_grib.$(OBJEXT)
+bin_geo_to_grib_OBJECTS = $(am_bin_geo_to_grib_OBJECTS)
+bin_geo_to_grib_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_bin_grib_to_geo_OBJECTS = grib_to_geo.$(OBJEXT)
+bin_grib_to_geo_OBJECTS = $(am_bin_grib_to_geo_OBJECTS)
+bin_grib_to_geo_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_bin_pool_OBJECTS = pool.$(OBJEXT)
+bin_pool_OBJECTS = $(am_bin_pool_OBJECTS)
+bin_pool_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_bin_togrib_OBJECTS = togrib.$(OBJEXT)
+bin_togrib_OBJECTS = $(am_bin_togrib_OBJECTS)
+bin_togrib_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_bin_tomatrix_OBJECTS = tomatrix.$(OBJEXT)
+bin_tomatrix_OBJECTS = $(am_bin_tomatrix_OBJECTS)
+bin_tomatrix_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Mars_SOURCES) $(bin_geo_to_grib_SOURCES) \
+	$(bin_grib_to_geo_SOURCES) $(bin_pool_SOURCES) \
+	$(bin_togrib_SOURCES) $(bin_tomatrix_SOURCES)
+DIST_SOURCES = $(bin_Mars_SOURCES) $(bin_geo_to_grib_SOURCES) \
+	$(bin_grib_to_geo_SOURCES) $(bin_pool_SOURCES) \
+	$(bin_togrib_SOURCES) $(bin_tomatrix_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_pool_SOURCES = pool.cc
+bin_pool_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_Mars_SOURCES = MarsG2.cc
+bin_Mars_LDADD = $(STANDARD_METVIEW_LIBS) $(FDBLIB) $(FLIBS) \
+	$(METVIEW_UTIL_LIB) $(am__append_1)
+ at METVIEW_MARS_ODB_TRUE@bin_Mars_LDFLAGS = $(ODB_LDFLAGS)
+bin_togrib_SOURCES = togrib.cc
+bin_togrib_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_tomatrix_SOURCES = tomatrix.cc
+bin_tomatrix_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_geo_to_grib_SOURCES = geo_to_grib.cc
+bin_geo_to_grib_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+bin_grib_to_geo_SOURCES = grib_to_geo.cc
+bin_grib_to_geo_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(am__append_2)
+icons = $(am__append_3)
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin $(am__append_4)
+EXTRA_DIST = $(am__append_5)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/MvApp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/MvApp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Mars$(EXEEXT): $(bin_Mars_OBJECTS) $(bin_Mars_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Mars$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_Mars_LINK) $(bin_Mars_OBJECTS) $(bin_Mars_LDADD) $(LIBS)
+bin/geo_to_grib$(EXEEXT): $(bin_geo_to_grib_OBJECTS) $(bin_geo_to_grib_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/geo_to_grib$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_geo_to_grib_OBJECTS) $(bin_geo_to_grib_LDADD) $(LIBS)
+bin/grib_to_geo$(EXEEXT): $(bin_grib_to_geo_OBJECTS) $(bin_grib_to_geo_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/grib_to_geo$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_grib_to_geo_OBJECTS) $(bin_grib_to_geo_LDADD) $(LIBS)
+bin/pool$(EXEEXT): $(bin_pool_OBJECTS) $(bin_pool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/pool$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_pool_OBJECTS) $(bin_pool_LDADD) $(LIBS)
+bin/togrib$(EXEEXT): $(bin_togrib_OBJECTS) $(bin_togrib_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/togrib$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_togrib_OBJECTS) $(bin_togrib_LDADD) $(LIBS)
+bin/tomatrix$(EXEEXT): $(bin_tomatrix_OBJECTS) $(bin_tomatrix_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/tomatrix$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_tomatrix_OBJECTS) $(bin_tomatrix_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MarsG2.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geo_to_grib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/grib_to_geo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/togrib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tomatrix.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/MvApp/MarsG2.cc b/src/MvApp/MarsG2.cc
new file mode 100644
index 0000000..6e5c4e3
--- /dev/null
+++ b/src/MvApp/MarsG2.cc
@@ -0,0 +1,363 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+*/
+
+#include "Metview.h"
+#include "MvPath.hpp"
+#include <stdlib.h>
+
+//static Cached METVIEW_ICON ("METVIEW_ICON");
+
+class Retrieve : public MvService {
+public:
+	Retrieve(char *c);
+	void serve(MvRequest&,MvRequest&);
+	virtual void marsServe(MvRequest&,MvRequest&);
+};
+
+
+class Read : public Retrieve {
+public:
+	Read(char *c) : Retrieve(c) {}
+	virtual void marsServe(MvRequest&,MvRequest&);
+};
+
+class Stage : public Retrieve {
+public:
+	Stage(char *c) : Retrieve(c) {}
+};
+
+Retrieve::Retrieve(char *c) : MvService(c)
+{
+
+  //-- if flag -mlog was set in startup script then
+  //-- activate more log output from Mars processes
+
+  const char* mlog = getenv("MV_MLOG");
+  if( mlog && strcmp(mlog,"yes") == 0  )
+    {
+      mars.info    = true;
+      mars.warning = true;
+      putenv("MV_DEBUG_PRINT=1");
+      marslog(LOG_DBUG,"Spotted -mlog, set all kind of flags...");
+    }
+}
+
+void Retrieve::marsServe(MvRequest& in,MvRequest& out)
+{
+	Cached name       =  (const char*)in("_NAME");
+	Cached icon_class =  (const char*)in("_CLASS");
+
+	Cached mode = getenv("METVIEW_MODE");
+	Cached appl = "metview";
+
+	if(mode) appl = appl + "-" + mode;
+
+	in("_APPL") = appl;
+
+
+	//-- make the verb MARS understandable
+
+	if( strcmp( in.getVerb(), "READ_G2" ) == 0 )
+		in.setVerb("READ");     
+	else if( strcmp( in.getVerb(), "RETRIEVE_G2" ) == 0 )
+		in.setVerb("RETRIEVE");
+	else if( strcmp( in.getVerb(), "READ_TIGGE" ) == 0 )
+		in.setVerb("READ");
+	else if( strcmp( in.getVerb(), "RETRIEVE_TIGGE" ) == 0 )
+		in.setVerb("RETRIEVE");
+	else if( strcmp( in.getVerb(), "READ_ODB" ) == 0 )
+		in.setVerb("READ");
+	else if( strcmp( in.getVerb(), "RETRIEVE_ODB" ) == 0 )
+		in.setVerb("RETRIEVE");
+
+
+	if(is_bufr(in)) {
+
+		in("TARGET")   = marstmp();
+		in.print();
+
+		err  e = handle_request(in,this);
+		if(e != 0)
+		  { setError(e); return ; }
+
+		MvRequest r = "BUFR";
+		r("PATH") = in("TARGET");
+		r("TEMPORARY") = 1;
+
+		out = r;
+
+	}
+	else if(is_odb(in)) {
+
+
+		// Check double quotes in FILTER
+		// if we don't have double quotes around the FILTER expression	
+		// then it won't work (actually, any characters will do - ODB
+		// removes the first and last characters from the string!
+		const char *filter=in("FILTER");
+		if(filter)
+		{ 
+	  		string fstr(filter);
+			if(fstr.size() > 0)
+			{
+				if(fstr.substr(0,1) != "\"")
+					fstr.insert(0,"\"");			
+
+				int n=fstr.size();
+				if(fstr.substr(n-1,1) != "\"")
+					fstr.append("\"");
+
+				in("FILTER")=fstr.c_str();	
+			}	
+		}	
+
+
+
+		in("TARGET")   = marstmp();
+		in.print();
+
+		err  e = handle_request(in,this);
+		if(e != 0)
+		  { setError(e); return ; }
+
+		// If size of the target file is 0
+		// then there is no data retrieved
+		if ( !FileHasValidSize(in("TARGET")) )
+		{
+			request* field = NULL;
+			out = field;
+		}
+		else
+		{
+			MvRequest r = "ODB_DB";
+			r("PATH") = in("TARGET");
+			r("TEMPORARY") = 1;
+
+			out = r;
+		}
+	}
+	else if(image(in) || simulated_image(in)) {
+
+		in("TARGET")   = marstmp();
+		in.print();
+
+		err  e = handle_request(in,this);
+		if(e != 0)
+		 { setError(e); return ; }
+
+		// If size of the target file is 0
+		// then there is no data retrieved
+		if ( !FileHasValidSize(in("TARGET")) )
+		{
+			request* field = NULL;
+			out = field;
+		}
+		else
+		{
+		MvRequest r = "IMAGE";
+		r("PATH") = in("TARGET");
+		r("TEMPORARY") = 1;
+		out = r;
+		}
+	}
+	else {
+
+	        in.print();
+
+		err e = handle_request(in,this);
+		if(e != 0)
+		  { setError(e); return ; }
+
+		variable *v = find_variable((const char*)in("FIELDSET"));
+		if(v == NULL)
+		  { setError(-2); return ; }
+
+		if(v->scalar)
+		{
+			MvRequest r = "NUMBER";
+			r("VALUE") = v->val;
+
+			out = r;
+		}
+		else
+		{
+			out = fieldset_to_request(v->fs);
+		}
+	}
+
+	out.print();
+
+
+}
+
+void Read::marsServe(MvRequest& in,MvRequest& out)
+{
+	const char *data = in( "DATA" );
+	const char *path = in( "SOURCE" );
+
+	if( data && path )  //-- do not allow two data sources
+	{
+		setError( 1, "READ: two input files: both Source and Data have values!" );
+		return;
+	}
+	if( ( ! data ) && ( ! path ) ) //-- one data source required
+	{
+		setError( 1, "READ: no input file: both Source and Data are empty!" );
+		return;
+	}
+
+	if( data )
+	{
+		MvRequest grib;
+		in.getValue(grib,"DATA");
+		path = grib("PATH");
+		in("SOURCE") = path;
+	}
+
+	int temp = 0;
+	char *name = guess_class(path);
+
+	FILE *f = fopen(path,"r");
+
+	if(!f) {
+		marslog(LOG_EROR|LOG_PERR,"%s",path);
+		setError(1,"READ: unable to open file!");
+		return;
+	}
+
+	fclose(f);
+
+
+
+	if(strcmp(name,"GRIB") == 0)
+	  {
+	    Retrieve::marsServe(in,out);
+
+	    // Check whether the request should be sorted.
+	    const char *field_order = in("ORDER");
+	    if ( field_order && strcmp(field_order,"1") == 0 )
+	      {
+
+		marslog(LOG_DBUG, "============== Before sorting:");
+		out.print();
+
+		MvFieldSet fs(out);
+		MvFieldSetIterator ii(fs);
+		MvField ff;
+		MvRequest one_field;
+
+		out.unsetParam("OFFSET");
+		out.unsetParam("LENGTH");
+
+		ii.sort("PARAM");
+		ii.sort("LEVELIST");
+		ii.sort("LEVTYPE");
+		ii.sort("NUMBER");
+		ii.sort("_DIAGITER");
+		ii.sort("STEP");
+		ii.sort("TIME");
+		ii.sort("DATE");
+		while ( ff = ii() )
+		  {
+		    one_field = ff.getRequest();
+		    out.addValue("OFFSET",ff.getOffset() );
+		    out.addValue("LENGTH",ff.getLength() );
+		  }
+
+		marslog(LOG_DBUG, "============== After sorting:");
+		out.print();
+
+	      }
+	    else
+	      {
+		marslog(LOG_INFO, "READ: No sorting done");
+	      }
+	  }
+	else
+	{
+		out              = MvRequest(name);
+		out("PATH")      = path;
+		out("TEMPORARY") = temp;
+	}
+}
+
+void Retrieve::serve(MvRequest& in,MvRequest& out)
+{
+	// Make sure the request is clean...
+
+	marslog(LOG_DBUG, "--> request in -->");
+	in.print();
+
+	reset_language(mars_language());
+	expand_flags(EXPAND_MARS);
+
+	MvRequest clean(
+		expand_all_requests(
+			mars_language(),
+			mars_rules(),
+//			in));
+			trim_all_requests(mars_language(),in)));
+
+	// Make sure we have a fieldset
+
+	clean("FIELDSET") = iconName();
+
+	marslog(LOG_DBUG, "<-- request out <--");
+	clean.print();
+
+	// Do the real job there
+
+	marsServe(clean,out);
+}
+
+int main(int argc,char **argv)
+{
+    // from the environment, check whether we're in 'standard', 'G2' or 'TIGGE' mode
+    // - note that 'G2' and 'TIGGE' are identical; TIGGE is really just the new name
+    // for G2, but G2 is retained for backwards compatibility.
+    
+    char *marsmode = getenv ("MV_MARS_MODE");
+    char *servicename = "mars";
+    
+    if (marsmode && strcmp (marsmode, "G2") == 0)
+    {
+        servicename = "Mars_G2";
+    }
+    else if (marsmode && strcmp (marsmode, "TIGGE") == 0)
+    {
+        servicename = "Mars_TIGGE";
+    }
+    else if (marsmode && strcmp (marsmode, "odb") == 0)
+    {
+        servicename = "marsOdb";
+    }
+
+	MvApplication theApp(argc,argv,servicename);
+
+	mars.appl     = servicename;
+
+	Retrieve r  ("RETRIEVE");
+	Retrieve r2 ("RETRIEVE_G2");
+	Retrieve rt ("RETRIEVE_TIGGE");
+	Retrieve ro ("RETRIEVE_ODB");
+	Read     x  ("READ");
+	Read     x2 ("READ_G2");
+	Read     xt ("READ_TIGGE");
+	Read     xo ("READ_ODB");
+	Stage    y  ("STAGE");
+
+	theApp.run();
+}
diff --git a/src/MvApp/ODB_MARS.xpm b/src/MvApp/ODB_MARS.xpm
new file mode 100644
index 0000000..5f5245c
--- /dev/null
+++ b/src/MvApp/ODB_MARS.xpm
@@ -0,0 +1,473 @@
+/* XPM */
+static char * ODB_MARS_xpm[] = {
+"32 32 438 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #FEFEFE",
+"@ 	c #D0D0D2",
+"# 	c #A0A1A6",
+"$ 	c #888B91",
+"% 	c #72747C",
+"& 	c #75767E",
+"* 	c #8A8C92",
+"= 	c #A2A4A8",
+"- 	c #D9D9DB",
+"; 	c #E3E3E4",
+"> 	c #7C7D83",
+", 	c #343641",
+"' 	c #242733",
+") 	c #636670",
+"! 	c #7F828B",
+"~ 	c #9B9EA5",
+"{ 	c #999BA3",
+"] 	c #7E8188",
+"^ 	c #5E636D",
+"/ 	c #212430",
+"( 	c #3B3C47",
+"_ 	c #86878E",
+": 	c #EBECEE",
+"< 	c #F0F0F1",
+"[ 	c #7F8288",
+"} 	c #212531",
+"| 	c #767881",
+"1 	c #BCBFC7",
+"2 	c #CACDD5",
+"3 	c #DCDEE3",
+"4 	c #E5E6EA",
+"5 	c #ECEDF0",
+"6 	c #E4E6EA",
+"7 	c #C9CCD3",
+"8 	c #BABDC4",
+"9 	c #696B75",
+"0 	c #272A36",
+"a 	c #8E9097",
+"b 	c #F6F6F8",
+"c 	c #D9D9DC",
+"d 	c #3A3C46",
+"e 	c #4E505A",
+"f 	c #C1C4CB",
+"g 	c #D7D9DF",
+"h 	c #F9FAFA",
+"i 	c #F8F9FA",
+"j 	c #D4D7DD",
+"k 	c #BCBFC6",
+"l 	c #43454F",
+"m 	c #484A53",
+"n 	c #E4E5E7",
+"o 	c #C3C3C7",
+"p 	c #888B94",
+"q 	c #C9CCD4",
+"r 	c #EEEFF1",
+"s 	c #ECEDEF",
+"t 	c #C8CBD3",
+"u 	c #7A7C84",
+"v 	c #2F323D",
+"w 	c #D4D5D7",
+"x 	c #AEB1B8",
+"y 	c #D7DADF",
+"z 	c #FCFCFD",
+"A 	c #FBFBFC",
+"B 	c #D5D7DD",
+"C 	c #A3A6AE",
+"D 	c #353742",
+"E 	c #E9E9EA",
+"F 	c #EEEEF0",
+"G 	c #393C46",
+"H 	c #8C8F97",
+"I 	c #D2D4DB",
+"J 	c #787A82",
+"K 	c #4C4D57",
+"L 	c #F8F8F8",
+"M 	c #7C7E86",
+"N 	c #52545D",
+"O 	c #FBFBFB",
+"P 	c #C6C9D2",
+"Q 	c #3C3E4A",
+"R 	c #98999F",
+"S 	c #E1E1E3",
+"T 	c #20222F",
+"U 	c #EFF0F2",
+"V 	c #AFB7ED",
+"W 	c #707DDF",
+"X 	c #3B4DD4",
+"Y 	c #394BD3",
+"Z 	c #6E7BDF",
+"` 	c #ACB3ED",
+" .	c #FEFEFF",
+"..	c #EBECEF",
+"+.	c #B9BCC4",
+"@.	c #292D37",
+"#.	c #76797F",
+"$.	c #80828B",
+"%.	c #D9DBE1",
+"&.	c #E8EAFA",
+"*.	c #5666DA",
+"=.	c #1329CB",
+"-.	c #1C32CD",
+";.	c #4B5CD7",
+">.	c #4C5CD8",
+",.	c #1D32CD",
+"'.	c #5060D8",
+").	c #E3E6F9",
+"!.	c #686A74",
+"~.	c #919299",
+"{.	c #FDFDFD",
+"].	c #2E313C",
+"^.	c #BEC1C9",
+"/.	c #F3F4FC",
+"(.	c #2F43D1",
+"_.	c #182DCC",
+":.	c #919BE7",
+"<.	c #FCFCFE",
+"[.	c #96A0E8",
+"}.	c #182ECC",
+"|.	c #2B3ED1",
+"1.	c #F0F2FC",
+"2.	c #FAFAFB",
+"3.	c #B8BBC4",
+"4.	c #494D56",
+"5.	c #CACCCF",
+"6.	c #CFD1D8",
+"7.	c #7380E0",
+"8.	c #B7BEEF",
+"9.	c #BEC4F1",
+"0.	c #142ACB",
+"a.	c #6C7ADF",
+"b.	c #E6E6E8",
+"c.	c #999AA0",
+"d.	c #757881",
+"e.	c #E3E5E9",
+"f.	c #FDFDFE",
+"g.	c #EDEFF7",
+"h.	c #D9DEEE",
+"i.	c #B6BEE3",
+"j.	c #2036C6",
+"k.	c #6977DA",
+"l.	c #727FE0",
+"m.	c #DADDF7",
+"n.	c #DFE1E5",
+"o.	c #555964",
+"p.	c #B6B6BB",
+"q.	c #82848B",
+"r.	c #8189A7",
+"s.	c #92A0C9",
+"t.	c #95A4CD",
+"u.	c #92A3CB",
+"v.	c #91A4CA",
+"w.	c #99AECE",
+"x.	c #A4BCD2",
+"y.	c #AFC8D7",
+"z.	c #A2BAD3",
+"A.	c #9BAFD1",
+"B.	c #9BACD0",
+"C.	c #9DACD1",
+"D.	c #A1AED3",
+"E.	c #A4AFD4",
+"F.	c #DCE0EF",
+"G.	c #CBD0F4",
+"H.	c #AAB2EC",
+"I.	c #E7E8EC",
+"J.	c #797B86",
+"K.	c #9EA0A5",
+"L.	c #FBFBFD",
+"M.	c #6878A8",
+"N.	c #92A7C3",
+"O.	c #A7BDCB",
+"P.	c #ABC2CF",
+"Q.	c #AFC7D2",
+"R.	c #B4CCD5",
+"S.	c #B8D1D8",
+"T.	c #BCD6DC",
+"U.	c #C0DBDF",
+"V.	c #C4DCE0",
+"W.	c #C8DDE0",
+"X.	c #CCDEE1",
+"Y.	c #D0DFE1",
+"Z.	c #D4E0E2",
+"`.	c #D7E0E2",
+" +	c #B5BFD6",
+".+	c #A6B0D5",
+"++	c #F7F7FD",
+"@+	c #162CCC",
+"#+	c #7E8AE3",
+"$+	c #9598A1",
+"%+	c #898A8F",
+"&+	c #C5CCE5",
+"*+	c #7083B5",
+"=+	c #A4B9C9",
+"-+	c #A8BECC",
+";+	c #ADC3D0",
+">+	c #B1C8D3",
+",+	c #B5CDD6",
+"'+	c #B9D2D9",
+")+	c #BDD8DD",
+"!+	c #C1DBDF",
+"~+	c #C5DCE0",
+"{+	c #C9DDE0",
+"]+	c #CDDEE1",
+"^+	c #D1DFE1",
+"/+	c #D5E0E2",
+"(+	c #D9E1E3",
+"_+	c #DAE1E2",
+":+	c #7E8CC2",
+"<+	c #EEF0F7",
+"[+	c #F1F2FC",
+"}+	c #8691E4",
+"|+	c #989BA3",
+"1+	c #C2CAE3",
+"2+	c #6D87B1",
+"3+	c #6A80B6",
+"4+	c #758ABD",
+"5+	c #8399C3",
+"6+	c #95ACCA",
+"7+	c #ADC6D4",
+"8+	c #BAD4DA",
+"9+	c #BED9DE",
+"0+	c #C2DCDF",
+"a+	c #C7DDE0",
+"b+	c #CBDEE0",
+"c+	c #BFCFDB",
+"d+	c #A7B6D1",
+"e+	c #8E9EC7",
+"f+	c #7688BC",
+"g+	c #6C7EB2",
+"h+	c #7983B4",
+"i+	c #EFF1F8",
+"j+	c #C3C8F2",
+"k+	c #B2B9EE",
+"l+	c #E8EAED",
+"m+	c #7C7E89",
+"n+	c #A1A1A6",
+"o+	c #81A0B3",
+"p+	c #9FBEC0",
+"q+	c #ABC7CC",
+"r+	c #ACC5D3",
+"s+	c #A8BED7",
+"t+	c #93A8CE",
+"u+	c #859AC7",
+"v+	c #8095C4",
+"w+	c #7C91C2",
+"x+	c #6F87BF",
+"y+	c #748DBE",
+"z+	c #849EC0",
+"A+	c #89A7BD",
+"B+	c #84A1B1",
+"C+	c #7995A1",
+"D+	c #85959D",
+"E+	c #8F95B5",
+"F+	c #E5E8F9",
+"G+	c #E1E3E7",
+"H+	c #585B67",
+"I+	c #B6B7BB",
+"J+	c #C3CAE3",
+"K+	c #82A0B4",
+"L+	c #A0BFC1",
+"M+	c #B0CCCE",
+"N+	c #C0DADB",
+"O+	c #D0E7E8",
+"P+	c #CBE3E4",
+"Q+	c #C5DFDF",
+"R+	c #BEDADA",
+"S+	c #B8D5D5",
+"T+	c #B1D0D0",
+"U+	c #ABCBCB",
+"V+	c #A4C6C6",
+"W+	c #9CBEBF",
+"X+	c #8AA9AF",
+"Y+	c #7995A0",
+"Z+	c #88969E",
+"`+	c #9095B5",
+" @	c #98A2E8",
+".@	c #8994E5",
+"+@	c #CCCFD6",
+"@@	c #2A2D39",
+"#@	c #EAEAEB",
+"$@	c #B3BCDC",
+"%@	c #7994B6",
+"&@	c #A1BFC2",
+"*@	c #B1CDCF",
+"=@	c #C1DBDC",
+"-@	c #D1E8E9",
+";@	c #CAE3E4",
+">@	c #C4DEDF",
+",@	c #BED9DA",
+"'@	c #B7D4D5",
+")@	c #B1CFD0",
+"!@	c #AACBCB",
+"~@	c #9BBDBE",
+"{@	c #89A8AE",
+"]@	c #78939E",
+"^@	c #8C989E",
+"/@	c #7A83B2",
+"(@	c #6775D8",
+"_@	c #4254D5",
+":@	c #FAFBFE",
+"<@	c #BABCC5",
+"[@	c #4D4E58",
+"}@	c #6B85B3",
+"|@	c #6E85B6",
+"1@	c #97B0C7",
+"2@	c #B4CED8",
+"3@	c #CFE6E8",
+"4@	c #CAE3E3",
+"5@	c #C3DEDE",
+"6@	c #BDD9DA",
+"7@	c #B7D4D4",
+"8@	c #B0CFCF",
+"9@	c #AACACA",
+"0@	c #A3C5C5",
+"a@	c #97B9BD",
+"b@	c #809DAE",
+"c@	c #6881A5",
+"d@	c #6374AC",
+"e@	c #6B78B1",
+"f@	c #1A30CA",
+"g@	c #7B87E2",
+"h@	c #F8F8FD",
+"i@	c #DEDFE4",
+"j@	c #737780",
+"k@	c #95969C",
+"l@	c #81A0B4",
+"m@	c #9EBDC1",
+"n@	c #96AFC6",
+"o@	c #91A8CA",
+"p@	c #889DC9",
+"q@	c #8298C7",
+"r@	c #7F95C4",
+"s@	c #7E95C3",
+"t@	c #7F97C2",
+"u@	c #7991BF",
+"v@	c #758EBD",
+"w@	c #728CBA",
+"x@	c #738EB7",
+"y@	c #758FB0",
+"z@	c #718BA4",
+"A@	c #858BB3",
+"B@	c #C9CFF0",
+"C@	c #F2F3F5",
+"D@	c #BABDC6",
+"E@	c #2F313D",
+"F@	c #F2F2F2",
+"G@	c #B0CCCF",
+"H@	c #C0DADC",
+"I@	c #B6D4D5",
+"J@	c #79959F",
+"K@	c #89969E",
+"L@	c #9195B5",
+"M@	c #C8CBD2",
+"N@	c #41444E",
+"O@	c #C1C9E3",
+"P@	c #7187B7",
+"Q@	c #A1C0C3",
+"R@	c #B1CDD0",
+"S@	c #AACACB",
+"T@	c #8A969F",
+"U@	c #727FB7",
+"V@	c #EBEEF7",
+"W@	c #DADCE1",
+"X@	c #82848E",
+"Y@	c #54575F",
+"Z@	c #728CB4",
+"`@	c #6E84B9",
+" #	c #748ABD",
+".#	c #879EC6",
+"+#	c #A5BBD6",
+"@#	c #BCD5DE",
+"##	c #BDD9D9",
+"$#	c #A9C9CA",
+"%#	c #95B5C2",
+"&#	c #7D99B9",
+"*#	c #6D85B2",
+"=#	c #6378B1",
+"-#	c #6A7BAF",
+";#	c #7B85B4",
+">#	c #E0E2E6",
+",#	c #ACAFB8",
+"'#	c #393B46",
+")#	c #EDEDED",
+"!#	c #A7BCD5",
+"~#	c #899FC5",
+"{#	c #7D92C1",
+"]#	c #798EC1",
+"^#	c #778DC0",
+"/#	c #798EC0",
+"(#	c #7A91BF",
+"_#	c #839DBF",
+":#	c #F5F6F7",
+"<#	c #383B46",
+"[#	c #DADADD",
+"}#	c #BCC0C8",
+"|#	c #484C56",
+"1#	c #53545E",
+"2#	c #D8DDED",
+"3#	c #7F99B8",
+"4#	c #888FB8",
+"5#	c #DFE2EA",
+"6#	c #D1D4DA",
+"7#	c #7F808B",
+"8#	c #282631",
+"9#	c #581E2A",
+"0#	c #851E28",
+"a#	c #871E28",
+"b#	c #B4BEDB",
+"c#	c #8699C4",
+"d#	c #99B2C9",
+"e#	c #B5CDD8",
+"f#	c #97B8BD",
+"g#	c #7F9DAE",
+"h#	c #6D84A5",
+"i#	c #717FAE",
+"j#	c #8389A3",
+"k#	c #70747E",
+"l#	c #363A45",
+"m#	c #352632",
+"n#	c #531E2A",
+"o#	c #811E28",
+"p#	c #D3D8EB",
+"q#	c #B7C1DF",
+"r#	c #A1AED5",
+"s#	c #9AA9D1",
+"t#	c #94A5CE",
+"u#	c #8EA1CA",
+"v#	c #8A9FC7",
+"w#	c #8B9FC7",
+"x#	c #8FA1C9",
+"y#	c #899AC2",
+"z#	c #7E8CB3",
+"A#	c #7D86A6",
+"B#	c #787D91",
+"C#	c #83848A",
+"D#	c #B1B2B5",
+"E#	c #E5E5E8",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . + @ # $ % & * = - . . . . . . . . . . . . ",
+". . . . . . . . . ; > , ' ) ! ~ { ] ^ / ( _ : . . . . . . . . . ",
+". . . . . . . < [ } | 1 2 3 4 5 5 6 3 7 8 9 0 a b . . . . . . . ",
+". . . . . . c d e f g h . . . . . . . . i j k l m n . . . . . . ",
+". . . . . o 0 p q r . . . . . . . . . . . . s t u v w . . . . . ",
+". . . . - 0 x y z . . . . . . . . . . . . . . A B C D E . . . . ",
+". . . F G H g . . . . . . . . . . . . . . . . . . I J K L . . . ",
+". . . M N t z . . . . . . . . . . . . . . . . . . O P Q R . . . ",
+". . S T f U . . . . . . . V W X Y Z `  .. . . . . . ..+. at .F . . ",
+". . #.$.%.. . . . . . &.*.=.-.;.>.,.=.'.).. . . . . . B !.~.. . ",
+". {.].^.{.. . . . . /.(._.:.<.. . <.[.}.|.1.. . . . . 2.3.4.. . ",
+". 5.].6.. . . . . . 7.=.8.. . . . . . 9.0.a.. . . . . . q ' b.. ",
+". c.d.e.. . f.g.h.i.j.k. .. . . . . . . l.=.m.. . . . . n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.. . . G.=.H.. . . . . I.J.K.. ",
+"L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+. . ++ at +#+. . . . . r $+%+. ",
+"&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+. [+0.}+. . . . . U |+$ . ",
+"1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+. j+=.k+. . . . . l+m+n+. ",
+"1+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+i+. *._.F+. . . . . G+H+I+. ",
+"J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+i+ @=.. at . . . . . . +@@@#@. ",
+"$@%@&@*@=@-@;@>@,@'@)@!@V+~@{@]@^@/@(@=._@:@. . . . . {.<@[@. . ",
+"1+}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@e at f@g at h@. . . . . . i at j@k at . . ",
+"1+l at m@n at o@p at q@r at s@t at u@v at w@x at y@z at D+A@B at . . . . . . . C at D@E at F@. . ",
+"J+K+L+G at H@- at P+>@, at I@T+U+V+W+X+J at K@L at i+. . . . . . f.M at N@K.. . . ",
+"O at P@Q at R@=@-@;@>@6@'@)@S at V+~@{@]@T at U@V at . . . . . . W at X@Y at A . . . ",
+"1+Z@`@ #.#+#@#5@##7 at 8@$#%#&#*#=#-#;#i+. . . .  .>#,#'#)#. . . . ",
+"1+o+p+q+r+!#~#{#]#^#/#(#_#A+B+C+D+E+i+. . . :#2 p <#[#. . . . . ",
+"J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+J at Z+`+i+. + G+}#|#1#: . . . . . . ",
+"2#3#&@*@=@-@;@>@,@'@)@!@V+~@{@]@^@4#5#6#}#7#8#9#0#a#a#a#a#a#a#. ",
+". b#c#d#e#3 at 4@5@##7 at 8@9 at 0@f#g#h#i#j#k#l#m#n#o#a#a#a#a#a#a#a#a#. ",
+". . z p#q#r#s#t#u#v#w#x#y#z#A#B#C#c.D#E#. . . . . . . . . . . . ",
+". . . . . . . . . f.. . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/src/MvApp/ObjectSpec.MarsOdb b/src/MvApp/ObjectSpec.MarsOdb
new file mode 100644
index 0000000..a612aeb
--- /dev/null
+++ b/src/MvApp/ObjectSpec.MarsOdb
@@ -0,0 +1,30 @@
+
+object,
+	class		   = RETRIEVE_ODB,
+	type		   = Data,
+	can_be_created	   = '$TRUE_IF_MARS_AVAILABLE',
+	definition_file	   = '$METVIEW_DIR_SHARE/etc/MarsOdbDef',
+	rules_file	   = '$METVIEW_DIR_SHARE/etc/MarsOdbRules',
+	default_name	   = ODB Mars Retrieval,
+	help_page	   = MARS_Retrieval,
+	macro		   = retrieve_odb,
+	editor_type	   = RetrieveEditor,
+	expand 		   = 144, #EXPAND_SECOND_NAME|EXPAND_NO_DEFAULT
+	pixmap 		   = '$METVIEW_DIR_SHARE/icons/ODB_MARS.icon'
+
+
+state,
+	class	     = RETRIEVE_ODB,
+	output_class = ODB_DB,
+	service      = marsOdb
+
+state,
+	class        = READ_ODB,
+	output_class = ODB_DB,
+	service      = marsOdb
+
+service,
+	timeout  = $timeout,
+	name     = 'marsOdb',
+	fullname = MarsODB,
+	cmd      = "$metview_command $METVIEW_BIN/MarsOdbWrapper"
diff --git a/src/MvApp/geo_to_grib.cc b/src/MvApp/geo_to_grib.cc
new file mode 100644
index 0000000..02ca7e5
--- /dev/null
+++ b/src/MvApp/geo_to_grib.cc
@@ -0,0 +1,391 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// geo_to_grib.cc, 010309/vk   (Q&D hack of tomatrix.cc)
+
+#include <string>
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#include "Metview.h"
+#include "LLMatrixToGRIB.h"
+#include "MvGeoPoints.h"
+#include "MvStopWatch.h"
+#include "min_max_macros.h"
+
+
+#ifndef MISSING_DATA
+const double MISSING_DATA =  1E21;
+#endif
+
+const float cLatBandSize  = 1.0;
+const int   cLatBandCount = (int)( 180.0 / cLatBandSize ) + 1;
+const int   G2G_RECIPROCAL       = 0;
+const int   G2G_EXPONENTIAL_MEAN = 1;
+const int   G2G_EXPONENTIAL_SUM  = 2;
+
+double makeDateNumber( long date, long time );
+
+//_____________________________________________________________________
+
+class ToMatrix 
+{
+	MvGeoPoints GPoints;
+
+	double      North;
+	double      South;
+	double      West;
+	double      East;
+	double      GridLat;
+	double      GridLon;
+	double      Tolerance;
+	int		  Weight_;
+	int        NbLat;
+	int        NbLon;
+	double     Date;
+        int        Parameter;
+        int        Table2;
+	double    *Matrix;
+	vector< list<MvGeoP1> >  LatListVec;
+
+public:
+	ToMatrix(MvRequest&);
+	int load(const char*);
+	int save(const char*);
+	void estimate();
+	double value(float lat, float lon);
+	void sortPoints();
+
+protected:
+	float long180( float x ){ return x>180 ? x-360 : x; }
+	float long360( float x ){ return x<0   ? x+360 : x; }
+	float minDistance( float x1, float x2 );
+	int   latBand( float lat );
+};
+
+//_____________________________________________________________________
+
+class GeoToGRIB : public MvService {
+public:
+	GeoToGRIB() : MvService("GEO_TO_GRIB") {};
+	void serve(MvRequest&,MvRequest&);
+};
+//_____________________________________________________________________
+
+double makeDateNumber( long date, long time )
+{
+	double myDate = date;
+	double myTime = (double)time;
+
+	if( myDate < 470620 )  //-- must be relative => no time
+	    return myDate;
+
+	if( myTime < 0 )       //-- illegal or rubbish
+	    return myDate;
+
+	if( myTime > 2400 )    //-- illegal or rubbish
+	    return myDate;
+
+	if( myTime >= 100 )    //-- 01:00...24:00
+	    return myDate + myTime / 2400.;
+
+	if( myTime > 59 )      //-- illegal or rubbish
+	    return myDate;
+
+	if( myTime > 24 )      //-- 00:25...00:59
+	    return myDate + myTime/60. / 24.;
+
+	return myDate + myTime / 24.;
+}
+
+//_____________________________________________________________________
+
+ToMatrix::ToMatrix(MvRequest& def)
+{
+	North     = def("AREA", 0);
+	West      = def("AREA", 1);
+	South     = def("AREA", 2);
+	East      = def("AREA", 3);
+	GridLon   = def("GRID");
+	GridLat   = def("GRID", 1);
+	Tolerance = def("TOLERANCE");
+	Parameter = def("PARAMETER");
+	Table2    = def("GRIB_TABLE2_VERSION");
+	string st = (const char*)def("INTERPOLATION_METHOD");
+
+	if ( st == "RECIPROCAL" )
+		Weight_ = G2G_RECIPROCAL;
+	else if ( st == "EXPONENTIAL_MEAN" )
+		Weight_ = G2G_EXPONENTIAL_MEAN;
+	else
+		Weight_ = G2G_EXPONENTIAL_SUM;
+
+	if(North < South)
+	{
+		double tmp = North;
+		North      = South;
+		South      = tmp;
+	}
+
+	if( !GridLon )
+	     GridLon = 1.5;
+	if( !GridLat )
+	     GridLat = GridLon;
+
+
+	MvRequest data;
+	def.getValue(data,"GEOPOINTS");
+	const char* path = data("PATH");
+
+	GPoints.load( path );
+	Date = makeDateNumber( GPoints[0].date(), GPoints[0].time() );
+	
+	list<MvGeoP1> emptyList;
+	LatListVec.assign( cLatBandCount+1, emptyList );
+}
+//_____________________________________________________________________
+
+double ToMatrix::value(float lat, float lon)
+{
+	double val = MISSING_DATA;
+	double dist, coef;
+	double sigma = 0;
+
+	int band1 = latBand( min( (int)((lat+Tolerance)+0.5), 90) );
+	int band2 = latBand( max( (int)((lat-Tolerance)-0.5),-90) );
+
+	for( int b=band1; b>=band2; --b)
+	{
+	    for( list<MvGeoP1>::iterator gp_iter = LatListVec[b].begin();
+	         gp_iter != LatListVec[b].end();
+		 ++gp_iter )
+	    {
+		float   pi_lat = gp_iter->lat_y();
+
+		if( ( lat - pi_lat ) > Tolerance  )
+		  continue;
+
+		float pi_lon = gp_iter->lon_x();
+		if( minDistance( pi_lon, lon ) > Tolerance )
+		  continue;
+
+		//-- Here we have found a point inside the Interval;
+		if( ! gp_iter->value_missing() )
+		  {
+		    double x = minDistance( lon, pi_lon );
+		    double y = lat - pi_lat;
+		    dist = (x*x) + (y*y);
+
+		    // Compute weight
+			if ( Weight_ == G2G_RECIPROCAL )
+			{
+				if( dist == 0 )
+					return gp_iter->value();   //-- Here the point is on the Grid
+				dist = 1/dist;
+			}
+			else // exponential
+			{
+				if ( Tolerance != 0 )
+					dist = exp(-(dist/(pow(Tolerance,2))));
+				else
+					dist = dist ? 0 : 1;
+			}
+
+		    sigma +=dist;
+		    coef = dist * gp_iter->value();
+
+		    if( val == MISSING_DATA )
+		      val = coef;
+		    else
+		      val += coef;
+		  }
+	    }
+	}
+
+	if (sigma && Weight_ != G2G_EXPONENTIAL_SUM )
+	  val = val / sigma;
+
+	return val;
+}
+
+//_____________________________________________________________________
+
+float
+ToMatrix::minDistance( float x1, float x2 )
+{
+	// calculate two ways, in case given values are
+	// on the different sides of discontinuity line!
+
+	float min1 = long180( x1 ) - long180( x2 );
+	if( min1 < 0.0 )
+	    min1 = -min1;
+
+	float min2 = long360( x1 ) - long360( x2 );
+	if( min2 < 0.0 )
+	    min2 = -min2;
+
+	return min1 < min2 ? min1 : min2;
+}
+//_____________________________________________________________________
+
+int
+ToMatrix::latBand( float lat )
+{
+   return int( ( lat + 90.5 ) / cLatBandSize );
+}
+//_____________________________________________________________________
+
+void ToMatrix::sortPoints()
+{
+	cout << "ToMatrix::sortPoints(): Lat Band Size & Count: "
+	     << cLatBandSize
+	     << ", "
+	     << cLatBandCount
+	     << endl;
+	     
+	for (int s = 0; s < GPoints.count(); s++)
+	  {
+	    int band = latBand( GPoints[s].lat_y() );
+	    LatListVec[band].push_back(GPoints[s]);
+	  }
+}
+//_____________________________________________________________________
+
+void ToMatrix::estimate()
+{
+  int   i, j;
+  float lat,lon;
+  double epsilon=0.001;
+  
+  double oriEast=East;
+   
+  if ((East - West) == 360)
+    East -= GridLon;
+  
+  double dNbLon=(East-West)/GridLon;
+  NbLon=static_cast<int>(rint(dNbLon))+1;
+  
+  double dNbLat=(North-South)/GridLat;
+  NbLat=static_cast<int>(rint(dNbLat))+1;
+    
+  if(fabs(rint(dNbLon)-dNbLon) > epsilon)
+  {
+      marslog(LOG_WARN,"Target grid resolution does not match the domain in West-East direction!");
+      marslog(LOG_WARN,"--> Dx=%f West=%f East=%f",GridLon, West,oriEast);
+      marslog(LOG_WARN,"Please check grid geometry in the resulting GRIB!");
+  }
+  
+  if(fabs(rint(dNbLat)-dNbLat) > epsilon)
+  {
+      marslog(LOG_WARN,"Target grid resolution does not match the domain in North-South direction!");
+      marslog(LOG_WARN,"--> Dy=%f North=%f South=%f",GridLat, North, South); 
+      marslog(LOG_WARN,"Please check grid geometry in the resulting GRIB!");
+  }
+  
+//This is the old method, which did not always work properly. Sometimes there were
+// one less column or row in the target grid than expected!
+#if 0  
+  NbLon = static_cast< int >( (East  - West ) / GridLon + 1 );
+  NbLat = static_cast< int >( (North - South) / GridLat + 1 );
+#endif
+
+  Matrix = new double[NbLon*NbLat];
+
+  lat = North;
+  for (j = 0; j < NbLat; j++) 
+    {
+      lon = West;
+      for (i = 0; i < NbLon; i++) 
+	{
+	  Matrix[i + ( j*NbLon) ] = value(lat, lon);
+	  lon += GridLon;
+	}
+      lat -= GridLat;
+    }
+}
+//_____________________________________________________________________
+
+int ToMatrix::save(const char * path)
+{
+    FILE *f = fopen(path,"w");
+    if(f == NULL) return 1;
+
+	fprintf(f, "#LLMATRIX\n");
+	fprintf(f, "GRID = %g/%g\n", GridLon, GridLat);
+	fprintf(f, "NORTH = %g\n", North);
+	fprintf(f, "SOUTH = %g\n", South);
+	fprintf(f, "EAST = %g\n", East);
+	fprintf(f, "WEST = %g\n", West);
+	fprintf(f, "NLAT = %d\n", NbLat);
+	fprintf(f, "NLON = %d\n", NbLon);
+	fprintf(f, "DATE = %fl\n", Date);
+	fprintf(f, "MISSING = '%g'\n", MISSING_DATA);
+	fprintf(f, "PARAM   = %d\n", Parameter );
+	fprintf(f, "TABLE2  = %d\n", Table2 );
+	fprintf(f, "#DATA\n");
+
+	int last;
+
+	for (int j = 0; j < NbLat; j++) {
+		for (int i = 0; i < NbLon; i++) {
+			last = i + ( j*NbLon);
+			fprintf(f, "%g\n", Matrix[i + ( j*NbLon)]);
+		}
+	}
+	fclose(f);
+	printf("indice  = %d \n", last);
+
+	return 0;
+}
+//_____________________________________________________________________
+
+void GeoToGRIB::serve( MvRequest& in, MvRequest& out )
+{
+  MvStopWatch timer( "GeoToGRIB" );
+
+  ToMatrix matrix( in );
+  timer.lapTime( "init" );
+
+  matrix.sortPoints();
+  timer.lapTime( "sortPoints" );
+
+  matrix.estimate();
+  timer.lapTime( "estimate" );
+
+  string path = marstmp();
+  if( matrix.save( path.c_str() ) ) 
+    { 
+      setError( 1, "geo_to_grib: can not write matrix into file %s", path.c_str() );
+      return;
+    }
+
+  string tmp = marstmp();
+
+  if( LLMatrixToGRIB( path.c_str(), tmp.c_str() ) )
+    {
+      setError( 1, "geo_to_grib: convertion from geo/LLMatrix to GRIB failed" );
+      return;
+    }
+
+  MvRequest grib    = "GRIB";
+  grib("PATH")      = tmp.c_str();
+  grib("TEMPORARY") = 1;
+
+  out = grib;
+}
+//_____________________________________________________________________
+
+int main( int argc, char** argv )
+{
+    MvApplication theApp( argc, argv );
+    GeoToGRIB tool;
+    theApp.run();
+}
+
+
diff --git a/src/MvApp/grib_to_geo.cc b/src/MvApp/grib_to_geo.cc
new file mode 100644
index 0000000..e1e7085
--- /dev/null
+++ b/src/MvApp/grib_to_geo.cc
@@ -0,0 +1,168 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// grib_to_geo.cc,  020722/vk
+//
+//   Dumps all grid point values into a geopoints file.
+//
+//   User can select either the minimum XYV format
+//   (lon-lat-value, the default) or the traditional
+//   full format (lat-lon-height-date-time-value).
+//
+
+#include <string>
+#include "inc_iostream.h"
+#include "Metview.h"
+#include "MvGeoPoints.h"
+
+//_________________________________________________________________
+
+class GribToGeo : public MvService {
+public:
+	GribToGeo() : MvService("GRIB_TO_GEO") {};
+	void serve(MvRequest&,MvRequest&);
+};
+//_________________________________________________________________
+
+void GribToGeo::serve( MvRequest& in, MvRequest& out )
+{
+  const char cTAB = '\t';
+
+  in.print();
+
+  MvRequest grb;                           //-- data request => fieldset
+  in.getValue( grb, "DATA" );
+
+  fieldset* fs = request_to_fieldset( (request*)grb );
+  field*    f  = get_field(fs,0,expand_mem);
+  //gribsec1* s1 = (gribsec1*)&f->ksec1[0];
+
+
+  MvGridBase* grd = MvGridFactory( f );    //-- create MvGrid object and
+  if( ! grd->hasLocationInfo() )           //-- check that it is ok
+    {
+      setError( 13, "Unimplemented or spectral data - unable to extract location data" );
+      return;
+    }
+
+
+
+  if( fs->count > 1 )                      //-- warning if several fields
+    {
+      marslog( LOG_INFO, "Info: only first field will be converted" );
+    }
+
+
+  //double height = grd->getDouble("heightPressureEtcOfLevels");//aki always // s1->top_level;
+  double height = 0;
+  if( grd->getLong("indicatorOfTypeOfLevel") > 1 )
+     height = grd->getDouble("mars.levelist");
+
+  long  aDat = grd->getLong("date");
+  long  aTim = grd->getLong("time");  //-- seems to give 'hhmm'...
+  MvDate vDate( (double)aDat + (double)aTim/2400.0 );
+
+  //long timePeriod = grd->getLong("periodOfTimeIntervals");//aki grib2//
+  long timePeriod = grd->getLong("mars.step");
+  if( timePeriod != LONG_MAX && timePeriod > 0 ) // s1->p1 > 0 )
+    {
+      //-- here we assume hours - actually we should check time unit etc.
+      double step = 3600.0*timePeriod/86400.0; // 3600.0*(s1->p1) / 86400.0;
+      vDate += step;
+    }
+  long  dat = vDate.YyyyMmDd();
+  long  tim = 100*vDate.Hour() + vDate.Minute();
+  cout << height << cTAB << dat << cTAB << tim << endl;
+
+
+
+  bool formatXYV = true;                   //-- which geopoints file format ?
+  const char* fmt = in( "GEOPOINTS_FORMAT" );
+  if( fmt && strcmp( fmt, "TRADITIONAL" ) == 0 )
+    {
+      formatXYV = false;
+    }
+
+
+  string tmp = marstmp();                  //-- open output file
+  ofstream fout( tmp.c_str() );
+
+  //long paramNumber   = grd->getLong("indicatorOfParameter");//aki grib2//
+  //long table2Version = grd->getLong("gribTablesVersionNo");//aki grib2//
+  string paramNumber = grd->getString("mars.param");
+
+  fout << "#GEO\n"                         //-- write geopoints header, with a comment
+       << "#  extracted from GRIB data, on " << MvDate().YyyyMmDd() << ", by grib_to_geo\n"
+       << "#  original parameter " << paramNumber
+//           << ", in GRIB Table 2 Version " << table2Version
+       << endl;
+
+  if( formatXYV )                          //-- add more comment lines
+    {
+      fout << "#FORMAT XYV\n"              //-- geopoints file format is "XYV"
+	   << "#  warning: XYV is not suitable for some macro computations!\n"
+	   << "#  X=lon Y=lat\tV=val" << endl;
+    }
+  else
+    {
+      fout << "# lat\tlon\theight\tdate\ttime\tvalue" << endl;
+    }
+
+  fout << "#DATA" << endl;                 //-- start-of-data line
+
+
+
+  MvGridPoint gp;                          //-- extract all grid points
+  int cnt = 0;
+
+  do
+    {
+      gp = grd->gridPoint();
+      ++cnt;
+
+      if( formatXYV )                      //-- XYV format
+	{
+	  fout << gp.loc_.longitude() << cTAB
+	       << gp.loc_.latitude()  << cTAB;
+	}
+      else                                 //-- traditional format
+	{
+	  fout << gp.loc_.latitude()  << cTAB
+	       << gp.loc_.longitude() << cTAB
+	       << height << cTAB
+	       << dat    << cTAB
+	       << tim    << cTAB;
+	}
+
+      if ( gp.value_ != grd->missingValue() )
+	fout << gp.value_ << endl;
+      else
+	fout << GEOPOINTS_MISSING_VALUE << endl;
+
+    }
+  while( grd->advance() );
+
+  cout << cnt << " points!" << endl;
+
+
+
+  MvRequest gpts    = "GEOPOINTS";          //-- return reply request
+  gpts("PATH")      = tmp.c_str();
+  gpts("TEMPORARY") = 1;
+
+  out = gpts;
+}
+//_________________________________________________________________
+
+int main( int argc, char** argv )
+{
+    MvApplication theApp( argc, argv );
+    GribToGeo tool;
+    theApp.run();
+}
diff --git a/src/MvApp/pool.cc b/src/MvApp/pool.cc
new file mode 100644
index 0000000..d085feb
--- /dev/null
+++ b/src/MvApp/pool.cc
@@ -0,0 +1,309 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+*/
+
+#include "mars.h"
+#include <time.h>
+#include "MvApplication.h"
+#include "MvDebugPrintControl.h"
+
+typedef struct charl {
+	struct charl *next;
+	char         *name;
+} charl;
+
+typedef struct cache {
+	struct cache *next;
+	char         *name;
+	char         *pclass;
+	charl        *deps;
+	time_t        lastuse;
+	request      *r;
+} cache;
+
+typedef struct args {
+	int timeout;
+	} args;
+
+
+option opts[] = {
+	   {"timeout",NULL,"-timeout","0",t_int,sizeof(int), OFFSET(args,timeout)},
+	 };
+
+static cache *head = NULL;
+static svc   *s = NULL;
+static args setup;
+static int  retention;
+
+static void destroy(const char *,cache *);
+
+static void send_status(char *pclass,char *name,char *state)
+{
+	static request *r = NULL;
+	if(r == NULL) r = empty_request("STATUS");
+	if(pclass) set_value(r,"CLASS","%s",pclass);
+	set_value(r,"NAME","%s",name);
+	set_value(r,"STATUS","%s",state);
+	send_message(s,r);
+}
+
+static void birth(svcid *id,request *r,void *data)
+{
+	cache *c = head;
+	while(c)
+	{
+		send_status(c->pclass,c->name,"READY");
+		c = c->next;
+	}
+}
+
+static void panic(int code,void *data)
+{
+	cache *c = head;
+	while(c)
+	{
+		cache *p = c->next;
+		send_status(c->pclass,c->name,"MODIFIED");
+		destroy(progname(),c);
+		c = p;
+	}
+}
+
+static void clean()
+{
+	time_t now = time(0);
+	cache *c = head;
+	while(c)
+	{
+		cache *thiscache = c;
+		c = c->next;  /* do this in advance because we might delete c */
+		if (difftime(now, thiscache->lastuse) > retention)  destroy("pool: file not used", thiscache);
+	}
+}
+
+static cache *find(const char *name,const char *pclass)
+{
+	cache *c = head;
+	while(c)
+	{
+		if(c->name == name && (c->pclass == pclass || pclass == NULL || c->pclass == NULL))
+			return c;
+		c = c->next;
+	}
+	return NULL;
+}
+
+static void subname(char *name)
+{
+	cache *c = head;
+	int len  = strlen(name);
+	while(c)
+	{
+		if(strncmp(name,c->name,len)==0)
+			if(c->name[len] == '/')
+				send_status(c->pclass,c->name,"MODIFIED");
+		c = c->next;
+	}
+}
+
+static void destroy(const char *serv,cache *c)
+{
+	cache *p = head;
+	cache *q = NULL;
+	request *r;
+
+	if(c == NULL) return;
+
+	while(p) 
+	{ 
+		if(p == c) 
+		{
+			if(q) q->next = c->next;
+			else head = c->next;
+			break;
+		}
+		q = p;
+		p = p->next;
+	}
+
+	marslog(LOG_INFO,"[%-10s] - Deleting %s",serv,c->name);
+
+	r = c->r;
+	while(r)
+	{
+		const char *p = get_value(r,"PATH",0);		
+		const char *t = get_value(r,"TEMPORARY",0);		
+		int tmp = t?atoi(t):0;
+		if(p)
+		{
+			if(tmp)
+			{
+				unlink(p);
+				marslog(LOG_INFO,"File %s deleted",p);
+			}
+			else
+				marslog(LOG_INFO,"File %s not deleted",p);
+		}
+		r = r->next;
+	}
+
+	subname(c->name);
+
+	free_all_requests(c->r);
+	strfree(c->name);
+	strfree(c->pclass);
+
+	while(c->deps) 
+	{ 
+		charl *p = c->deps->next; 
+		cache *d = find(c->deps->name,NULL);
+		if(d) send_status(d->pclass,d->name,"MODIFIED");
+		strfree(c->deps->name);
+		free(c->deps);
+		c->deps = p;
+	}
+
+	free(c);
+}
+
+static void newstat(svcid *id,request *r,void *data)
+{
+	const char *state = get_value(r,"STATUS",0);
+	const char *name  = get_value(r,"NAME",0);
+	cache *c;
+
+	if(name && state)
+	{
+		if(
+			EQ(state,"FAILED") || 
+		    EQ(state,"MODIFIED") || 
+		    EQ(state,"DELETED"))
+				while(c = find(name,NULL))
+					destroy(get_svc_source(id),c);
+	}
+}
+
+static void store(svcid *id,request *r,void *data)
+{
+	const char *name = get_value(r,"NAME",0);
+	const char *pclass = get_value(r,"CLASS",0);
+	if(name && r && r->next)
+	{
+		cache *c;
+
+#ifdef NO_DUPS
+		destroy(get_svc_source(id),find(name,pclass));
+#else
+		if(find(name,pclass))
+			marslog(LOG_WARN,"[%-10s] - Name %s is duplicated",
+				get_svc_source(id),name);
+#endif
+
+		c        = NEW_CLEAR(cache);
+		c->name  = strcache(name);
+		c->pclass = strcache(pclass);
+		c->r     = clone_all_requests(r->next);
+		c->lastuse = time(0);
+		c->next  = head;
+		head     = c;
+		marslog(LOG_INFO,"[%-10s] - Caching  %s",get_svc_source(id),
+			c->name);
+	}
+	send_reply(id,NULL);
+}
+
+static void fetchcb(svcid *id,request *r,void *data)
+{
+	const char *name  = get_value(r,"NAME",0);
+	const char *pclass = get_value(r,"CLASS",0);
+	cache *c   = find(name,pclass);
+
+	if (!name)  c = NULL;
+	marslog(LOG_INFO,"[%-10s] - Object %s [%s] %s",
+	get_svc_source(id),name,pclass,c?"returned":"not cached");
+	if(c) {
+		c->lastuse = time(0);
+		send_reply(id,c->r);
+	}
+	else  send_reply(id,NULL);
+}
+
+static void depend(svcid *id,request *r,void *data)
+{
+	const char *name1 = get_value(r,"NAME1",0);
+	const char *name2 = get_value(r,"NAME2",0);
+	cache *c    = find(name2,NULL);
+
+	if(c==NULL)
+		marslog(LOG_INFO,"[%-10s] - Link %s not found",
+			get_svc_source(id),name1);
+	else
+	{
+		charl *p = NEW_CLEAR(charl);
+		marslog(LOG_INFO,"[%-10s] - Link %s and %s",get_svc_source(id),
+			name1,name2);
+		p->next = c->deps;
+		c->deps = p;
+		p->name = strcache(name1);
+	}
+	send_reply(id,NULL);
+}
+
+int main(int argc,char **argv)
+{
+	time_t now,then;
+	int day = 60*60*24;
+	int sec;
+	MvRequest pref;
+	const char* r;
+
+	marsinit(&argc,argv,&setup,NUMBER(opts),opts);
+	mvSetMarslogLevel();       //-- if "quiet log"
+	
+	s = create_service("pool");
+
+	pref       = MvApplication::getPreferences();
+	r          = get_value(pref, "DATA_CACHE_RETENTION_PERIOD", 0);
+	retention  = (r) ? atoi(r) : setup.timeout;
+	s->timeout = retention * 60;
+
+
+#if 0
+	now  = time(0);
+	then = ((now/day)+1)*day;
+	/* marslog(LOG_INFO,"It is now  %s",ctime(&now)); */
+	/* marslog(LOG_INFO,"Suicide at %s",ctime(&then)); */
+
+	if( (r = getenv("METVIEW_MODE")) && strcmp(r,"batch") != 0)
+	{
+		alarm(sec = then-now);
+		marslog(LOG_INFO,"Suicide in %d hour(s) %d minutes(s) %d second(s)",
+			sec/(60*60) , (sec % (60*60)) / 60 , sec % 60);
+	}
+#endif
+
+	add_service_callback(s,"STORE",	store,   NULL);
+	add_service_callback(s,"FETCH",	fetchcb,   NULL);
+	add_service_callback(s,"LINK",	depend,  NULL);
+
+	add_message_callback(s,"STATUS",newstat,NULL);
+	/* add_message_callback(s,"BIRTH", birth  ,NULL); */
+
+	install_exit_proc(panic,NULL);
+    while (1)  {
+	   clean();
+	   service_run(s);
+	 }
+}
diff --git a/src/MvApp/togrib.cc b/src/MvApp/togrib.cc
new file mode 100644
index 0000000..9797064
--- /dev/null
+++ b/src/MvApp/togrib.cc
@@ -0,0 +1,105 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+
+B.Raoult
+ECMWF Mar 95
+
+*/
+
+
+#include "Metview.h"
+#include "LLMatrixToGRIB.h"
+
+class ToGrib : public MvService {
+public:
+	ToGrib(char *c) : MvService(c) {}
+	void serve(MvRequest&,MvRequest&);
+protected:
+       //	err  llmatrix_to_grib(const char *in,const char *out);
+       //	void do_swap( fortfloat& s1, fortfloat& s2 )
+       //	            { fortfloat t; t=s1; s1=s2; s2=t; }
+};
+
+class ToGeo : public MvService {
+public:
+	ToGeo(char *c) : MvService(c) {}
+	void serve(MvRequest&,MvRequest&);
+};
+
+void ToGrib::serve(MvRequest& in,MvRequest& out)
+{
+	const char *path = in("PATH");
+	char *tmp  = marstmp();
+
+	if( LLMatrixToGRIB( path, tmp ) )
+	{
+		setError(1,"Convertion from LLMatrix to GRIB failed");
+		return;
+	}
+
+	MvRequest grib    = "GRIB";
+	grib("PATH")      = tmp;
+	grib("TEMPORARY") = 1;
+
+	out = grib;
+}
+		 
+
+err grib_to_llmatrix(const char*, const char* ) //-- (const char *g,const char *m)
+{
+	return -1;
+}
+
+
+//_______________________________________________________________________
+//
+void ToGeo::serve(MvRequest& in,MvRequest& out)
+{
+	char *tmp     = marstmp();
+	MvRequest geo = "GEOPOINTS";
+
+	FILE *f = fopen(tmp,"w");
+	if(!f)
+	{
+		setError(1,"Cannot open %s",tmp);
+		return;
+	}
+
+	fprintf(f,"#GEO\n#DATA\n");
+
+	while(in)
+	{
+		double lat = in("LATITUDE");
+		double lon = in("LONGITUDE");
+		const char *name = in("NAME");
+		int  ident = in("IDENT");
+
+		in.print();
+
+		fprintf(f,"%g %g 0 0 0 %d %s\n",lat,lon,ident,name);
+
+		in.advance();
+	}
+	fclose(f);
+
+	geo("PATH")      = tmp;
+	geo("TEMPORARY") = 1;
+
+	out = geo;
+}
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	ToGrib  x("LLMATRIX");
+	ToGeo   y("STATION");
+	theApp.run();
+}
diff --git a/src/MvApp/tomatrix.cc b/src/MvApp/tomatrix.cc
new file mode 100644
index 0000000..60ac43d
--- /dev/null
+++ b/src/MvApp/tomatrix.cc
@@ -0,0 +1,362 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "Metview.h"
+
+#ifndef MISSING_DATA
+const double MISSING_DATA =  1E21;
+#endif
+
+double makeDateNumber( long date, long time );
+
+class geopt {
+public:
+    float  latitude;
+    float  longitude;
+    float  height;
+    long   date;
+    long   time;
+    double value;
+
+	geopt()
+		{ latitude = 0; longitude = 0; 
+		  height   = 0; date      = 0;
+		  time     = 0; value     = 0; }
+    geopt& operator = (const geopt& in) 
+		{
+			latitude  = in.latitude;
+			longitude = in.longitude;
+			height    = in.height;
+			date      = in.date;
+			time      = in.time;
+			value     = in.value;
+			return *this;
+		}
+	void load(const char* line) ;
+		//{ 
+           // sscanf(line,"%f %f %f %ld %ld %lf",
+           //     &latitude, &longitude, &height, &date, &time, &value);
+		//}
+	void   print()
+		{ printf("Latitude = %f Longitude = %f Value = %f\n", latitude, longitude, value); }
+
+};
+
+class ToMatrix 
+{
+    geopt     *Points;
+    int        NbPoints;
+	double      North;
+	double      South;
+	double      West;
+	double      East;
+	double      GridLat;
+	double      GridLon;
+	double      Tolerance;
+	int        NbLat;
+	int        NbLon;
+	double     Date;
+	double    *Matrix;
+
+public:
+	ToMatrix(MvRequest&);
+	int load(const char*);
+	int save(const char*);
+	void estimate();
+	double value(float lat, float lon);
+	void sortPoints();
+	void print()
+		{
+			printf("Print Matrix....\n");
+			for (int i = 0; i < NbPoints; i++) Points[i].print();
+		}
+protected:
+	float long180( float x ){ return x>180 ? x-360 : x; }
+	float long360( float x ){ return x<0   ? x+360 : x; }
+	float longDistance( float x1, float x2 );
+};
+
+class GeoToMatrix : public MvService {
+public:
+	GeoToMatrix() : MvService("GEO_TO_MATRIX") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+double makeDateNumber( long date, long time )
+{
+	double myDate = date;
+	double myTime = (double)time;
+
+	if( myDate < 470620 )  //-- must be relative => no time
+	    return myDate;
+
+	if( myTime < 0 )       //-- illegal or rubbish
+	    return myDate;
+
+	if( myTime > 2400 )    //-- illegal or rubbish
+	    return myDate;
+
+	if( myTime >= 100 )    //-- 01:00...24:00
+	    return myDate + myTime / 2400.;
+
+	if( myTime > 59 )      //-- illegal or rubbish
+	    return myDate;
+
+	if( myTime > 24 )      //-- 00:25...00:59
+	    return myDate + myTime/60. / 24.;
+
+	return myDate + myTime / 24.;
+}
+
+void geopt::load(const char* line)
+{ 
+    double   d_date; //-- if user has floating point valued data here...
+    double   d_time;
+
+	istrstream myInput( line );
+	myInput >> latitude >> longitude >> height >> d_date >> d_time >> value;
+
+	date = (long)d_date;
+	time = (long)d_time;
+}
+
+ToMatrix::ToMatrix(MvRequest& def)
+{
+	North     = def("AREA", 0);
+	West      = def("AREA", 1);
+	South     = def("AREA", 2);
+	East      = def("AREA", 3);
+	GridLat   = def("GRID");
+	GridLon   = def("GRID", 1);
+	Tolerance = def("TOLERANCE");
+
+	if(North < South)
+	{
+		double tmp = North;
+		North      = South;
+		South      = tmp;
+	}
+
+	if (!GridLat) GridLat = 1.5;
+	if (!GridLon) GridLon = GridLat;
+
+
+	MvRequest data;
+	def.getValue(data,"GEOPOINTS");
+
+	load(data("PATH"));
+}
+
+int ToMatrix::load(const char* path)
+{
+    FILE *f = fopen(path,"r");
+    if(f == NULL) return 1;
+
+    // first count the lines
+    char line[1024];
+    int n = 0;
+
+    while(fgets(line,sizeof(line),f))
+        n++;
+
+
+    Points = new geopt[n];
+
+    n = 0;
+    rewind(f);
+
+    while(fgets(line,sizeof(line),f))
+        if(strncmp(line,"#DATA",5)==0)
+            break;
+
+    while(fgets(line,sizeof(line),f))
+    {
+        if(*line != '#')
+        {
+			Points[n].load(line);
+            n++;
+        }
+    }
+    NbPoints = n;
+    fclose(f);
+
+	Date = makeDateNumber( Points[0].date, Points[0].time );
+
+	return 0;
+}
+
+double ToMatrix::value(float lat, float lon)
+{
+	double val = MISSING_DATA;
+	double dist, coef;
+	double sigma = 0;
+
+	for (int i = 0; i < NbPoints; i++) {
+		if ((Points[i].latitude - lat) > Tolerance ) break;
+		if ((lat - Points[i].latitude) > Tolerance ) continue;
+
+		//if ((Points[i].longitude - lon) > Tolerance ) continue;
+		//if ((lon - Points[i].longitude) > Tolerance ) continue;
+		if( longDistance( Points[i].longitude, lon ) > Tolerance ) continue;
+
+		float x = lon - Points[i].longitude;
+		float y = lat - Points[i].latitude;
+		// Here we have found a point inside the Interval;
+		dist = (x*x) + (y*y);
+		if (dist == 0) return Points[i].value; // Here the point is on the Grid
+		dist = 1/dist;
+		sigma +=dist;
+		coef = dist * Points[i].value;
+		if (val == MISSING_DATA) val = coef;
+		else val += coef;
+	}
+
+	if (sigma) val = val / sigma;
+	return val;
+}
+
+float
+ToMatrix::longDistance( float x1, float x2 )
+{
+	// calculate two ways, in case given values are
+	// on the different sides of discontinuity line!
+
+	float min1 = long180( x1 ) - long180( x2 );
+	if( min1 < 0.0 )
+	    min1 = -min1;
+
+	float min2 = long360( x1 ) - long360( x2 );
+	if( min2 < 0.0 )
+	    min2 = -min2;
+
+	return min1 < min2 ? min1 : min2;
+}
+
+void ToMatrix::sortPoints()
+{
+	
+	float lonmin = 99999;
+	float latmin = 99999;
+	int   min    = 99999;
+	geopt tmp;
+
+	
+	for (int s = 0; s < NbPoints; s++) {
+		lonmin = 99999;
+		latmin = 99999;
+	 	min    = 99999;
+		for (int i = s; i < NbPoints; i++) {
+			if (Points[i].latitude < latmin) {
+				lonmin = Points[i].longitude;
+				latmin = Points[i].latitude;
+				min    = i;
+			}
+			else if (Points[i].latitude == latmin) {
+				if (Points[i].longitude < lonmin) {
+					lonmin = Points[i].longitude;
+					latmin = Points[i].latitude;
+					min    = i;
+				}
+			}	
+		}
+		if (min != 99999) {
+			tmp = Points[s];
+			Points[s] = Points[min];
+			Points[min] = tmp;
+		}
+	}
+}
+
+void ToMatrix::estimate()
+{
+
+	int   i, j;
+	float lat,lon;
+	
+	if ((East - West) == 360) East -= GridLon;
+    NbLon = ((East - West) / GridLon) + 1;
+    NbLat = ((North - South) / GridLat) + 1;
+
+	Matrix = new double[NbLon*NbLat];
+
+	lat = North;
+	for (j = 0; j < NbLat; j++) {
+		lon = West;
+		for (i = 0; i < NbLon; i++) {
+			Matrix[i + ( j*NbLon) ] = value(lat, lon);
+			lon += GridLon;
+		}
+		lat -= GridLat;
+	}
+}
+
+int ToMatrix::save(const char * path)
+{
+    FILE *f = fopen(path,"w");
+    if(f == NULL) return 1;
+
+	fprintf(f, "#LLMATRIX\n");
+	fprintf(f, "GRID = %g/%g\n", GridLat, GridLon);
+	fprintf(f, "NORTH = %g\n", North);
+	fprintf(f, "SOUTH = %g\n", South);
+	fprintf(f, "EAST = %g\n", East);
+	fprintf(f, "WEST = %g\n", West);
+	fprintf(f, "NLAT = %d\n", NbLat);
+	fprintf(f, "NLON = %d\n", NbLon);
+	fprintf(f, "DATE = %fl\n", Date);
+	fprintf(f, "MISSING = '%g'\n", MISSING_DATA);
+	fprintf(f, "#DATA\n");
+
+	int last;
+
+	for (int j = 0; j < NbLat; j++) {
+		for (int i = 0; i < NbLon; i++) {
+			last = i + ( j*NbLon);
+			fprintf(f, "%g\n", Matrix[i + ( j*NbLon)]);
+		}
+	}
+	fclose(f);
+	printf("indice  = %d \n", last);
+	return 0;
+}
+
+
+
+void GeoToMatrix::serve(MvRequest& in,MvRequest& out)
+{
+
+
+	ToMatrix matrix(in);
+	matrix.sortPoints();
+	matrix.estimate();
+
+    char *path  = marstmp();
+	if (matrix.save(path)) { 
+		setError(1,"Can not write to file %s", path);
+		return;
+	}
+
+
+	MvRequest llmatrix("LLMATRIX");
+    llmatrix("PATH")      = path;
+    llmatrix("TEMPORARY") = 0;
+
+    out = llmatrix;
+	out.print();
+}
+
+int main(int argc,char **argv)
+{
+    MvApplication theApp(argc,argv);
+    GeoToMatrix tool;
+    theApp.run();
+}
+
+
diff --git a/src/NcExaminer/Makefile.am b/src/NcExaminer/Makefile.am
new file mode 100644
index 0000000..1644a5e
--- /dev/null
+++ b/src/NcExaminer/Makefile.am
@@ -0,0 +1,28 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+# 
+bin_PROGRAMS = bin/NcExaminer
+bin_NcExaminer_SOURCES = MvMain.cc NcExaminer.cc NcExaminer.h
+
+nodist_bin_NcExaminer_SOURCES = NcExaminer.moc.cpp
+
+bin_NcExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_NcExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil -I../libMvNetCDF
+bin_NcExaminer_LDFLAGS  = $(QT_LDFLAGS)
+bin_NcExaminer_LDADD    = $(LDADD) ../../lib/libMvNetCDF.a ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_NcExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a ../../lib/libMvNetCDF.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+BUILT_SOURCES = bin NcExaminer.moc.cpp
+
+EXTRA_DIST =
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/NcExaminer *.o *.moc.cpp *.qrc.cpp
diff --git a/src/NcExaminer/Makefile.in b/src/NcExaminer/Makefile.in
new file mode 100644
index 0000000..12a2891
--- /dev/null
+++ b/src/NcExaminer/Makefile.in
@@ -0,0 +1,847 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/NcExaminer$(EXEEXT)
+subdir = src/NcExaminer
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_NcExaminer_OBJECTS = bin_NcExaminer-MvMain.$(OBJEXT) \
+	bin_NcExaminer-NcExaminer.$(OBJEXT)
+nodist_bin_NcExaminer_OBJECTS =  \
+	bin_NcExaminer-NcExaminer.moc.$(OBJEXT)
+bin_NcExaminer_OBJECTS = $(am_bin_NcExaminer_OBJECTS) \
+	$(nodist_bin_NcExaminer_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_NcExaminer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) \
+	$(bin_NcExaminer_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_NcExaminer_SOURCES) $(nodist_bin_NcExaminer_SOURCES)
+DIST_SOURCES = $(bin_NcExaminer_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_NcExaminer_SOURCES = MvMain.cc NcExaminer.cc NcExaminer.h
+nodist_bin_NcExaminer_SOURCES = NcExaminer.moc.cpp
+bin_NcExaminer_CXXFLAGS = -g $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_NcExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil -I../libMvNetCDF
+bin_NcExaminer_LDFLAGS = $(QT_LDFLAGS)
+bin_NcExaminer_LDADD = $(LDADD) ../../lib/libMvNetCDF.a ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_NcExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a ../../lib/libMvNetCDF.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+BUILT_SOURCES = bin NcExaminer.moc.cpp
+EXTRA_DIST = 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/NcExaminer/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/NcExaminer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/NcExaminer$(EXEEXT): $(bin_NcExaminer_OBJECTS) $(bin_NcExaminer_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/NcExaminer$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_NcExaminer_LINK) $(bin_NcExaminer_OBJECTS) $(bin_NcExaminer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_NcExaminer-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_NcExaminer-NcExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_NcExaminer-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_NcExaminer-MvMain.o -MD -MP -MF $(DEPDIR)/bin_NcExaminer-MvMain.Tpo -c -o bin_NcExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_NcExaminer-MvMain.Tpo $(DEPDIR)/bin_NcExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_NcExaminer-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_NcExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_NcExaminer-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_NcExaminer-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_NcExaminer-MvMain.Tpo -c -o bin_NcExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_NcExaminer-MvMain.Tpo $(DEPDIR)/bin_NcExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_NcExaminer-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_NcExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_NcExaminer-NcExaminer.o: NcExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_NcExaminer-NcExaminer.o -MD -MP -MF $(DEPDIR)/bin_NcExaminer-NcExaminer.Tpo -c -o bin_NcExaminer-NcExaminer.o `test -f 'NcExaminer.cc' || echo '$(srcdir)/'`NcExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_NcExaminer-NcExaminer.Tpo $(DEPDIR)/bin_NcExaminer-NcExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NcExaminer.cc' object='bin_NcExaminer-NcExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_NcExaminer-NcExaminer.o `test -f 'NcExaminer.cc' || echo '$(srcdir)/'`NcExaminer.cc
+
+bin_NcExaminer-NcExaminer.obj: NcExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_NcExaminer-NcExaminer.obj -MD -MP -MF $(DEPDIR)/bin_NcExaminer-NcExaminer.Tpo -c -o bin_NcExaminer-NcExaminer.obj `if test -f 'NcExaminer.cc'; then $(CYGPATH_W) 'NcExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/NcExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_NcExaminer-NcExaminer.Tpo $(DEPDIR)/bin_NcExaminer-NcExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NcExaminer.cc' object='bin_NcExaminer-NcExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_NcExaminer-NcExaminer.obj `if test -f 'NcExaminer.cc'; then $(CYGPATH_W) 'NcExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/NcExaminer.cc'; fi`
+
+bin_NcExaminer-NcExaminer.moc.o: NcExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_NcExaminer-NcExaminer.moc.o -MD -MP -MF $(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Tpo -c -o bin_NcExaminer-NcExaminer.moc.o `test -f 'NcExaminer.moc.cpp' || echo '$(srcdir)/'`NcExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Tpo $(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NcExaminer.moc.cpp' object='bin_NcExaminer-NcExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_NcExaminer-NcExaminer.moc.o `test -f 'NcExaminer.moc.cpp' || echo '$(srcdir)/'`NcExaminer.moc.cpp
+
+bin_NcExaminer-NcExaminer.moc.obj: NcExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -MT bin_NcExaminer-NcExaminer.moc.obj -MD -MP -MF $(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Tpo -c -o bin_NcExaminer-NcExaminer.moc.obj `if test -f 'NcExaminer.moc.cpp'; then $(CYGPATH_W) 'NcExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/NcExaminer.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Tpo $(DEPDIR)/bin_NcExaminer-NcExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NcExaminer.moc.cpp' object='bin_NcExaminer-NcExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_NcExaminer_CPPFLAGS) $(CPPFLAGS) $(bin_NcExaminer_CXXFLAGS) $(CXXFLAGS) -c -o bin_NcExaminer-NcExaminer.moc.obj `if test -f 'NcExaminer.moc.cpp'; then $(CYGPATH_W) 'NcExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/NcExaminer.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/NcExaminer *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/NcExaminer/MvMain.cc b/src/NcExaminer/MvMain.cc
new file mode 100644
index 0000000..78bfd10
--- /dev/null
+++ b/src/NcExaminer/MvMain.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <iostream>
+
+#include "NcExaminer.h"
+#include "Metview.h"
+#include "MvQService.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService
+{
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvNcExaminer : public Base
+{	
+public:
+	MvNcExaminer(char* a) : Base(a) {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvNcExaminer::serve( MvRequest& in, MvRequest& )
+{
+cout << "--------------NcExaminer::serve()--------------" << endl;
+in.print();
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(window);
+
+	// Get Netcdf file name
+	const char* ncName = in("PATH");   //get Netcdf file name
+
+	//Create the netcdf browser, initialize it and show it
+	NcExaminer *browser = new NcExaminer;
+	browser->initMetaData(ncName);
+	browser->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI
+	// To turn icon to green; otherwise, it will stay orange
+	MvRequest req;
+	sendReplyFromInteractive(req);
+
+	//Enter the app loop
+	app.exec();
+}
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+	av = argv;
+	
+	MvApplication theApp( argc, argv );
+
+	MvNcExaminer nc1("NETCDF");
+	MvNcExaminer nc2("SCM_INPUT_DATA");
+	MvNcExaminer nc3("SCM_OUTPUT_DATA");
+	
+	theApp.run();
+}
diff --git a/src/NcExaminer/NcExaminer.cc b/src/NcExaminer/NcExaminer.cc
new file mode 100644
index 0000000..45437ad
--- /dev/null
+++ b/src/NcExaminer/NcExaminer.cc
@@ -0,0 +1,585 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "NcExaminer.h"
+
+#include "LogHandler.h"
+#include "MvMiscelaneous.h"
+#include "MvNetCDF.h"
+#include "MvQAbout.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQLogBrowser.h"
+#include "MvQPlainTextEditSearchLine.h"
+
+#include <QAction>
+#include <QPlainTextEdit>
+#include <QPushButton>
+#include <QSettings>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+#include <QVBoxLayout>
+
+NcExaminer::NcExaminer(QWidget *parent) :
+		MvQMainWindow(parent),
+		data_ (0),
+		actionFileInfo_ (0),
+		treeParam_ (0),
+		initDump_ (false)
+{
+ 	setAttribute(Qt::WA_DeleteOnClose);	
+	setWindowTitle(tr("Metview - Netcdf Examiner"));
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	// Main splitter
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+	mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+
+	// The main layout (the upper part of mainSplitter)
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+	mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	QWidget* w = new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	// File info area
+	fileInfoLabel_= new MvQFileInfoLabel;
+	mainLayout->addWidget(fileInfoLabel_);
+
+	// Central tab
+	metaTab_= new QTabWidget;	
+	mainLayout->addWidget(metaTab_);
+
+	// Set up tabs
+	setupParamBox();
+	setupDumpBox();
+
+	// Set up Log Area
+	setupLogArea();
+
+//	mainSplitter_->setCollapsible(1,false);
+
+	// Initialize user interface actions
+	setupViewActions();
+	setupHelpActions();
+	
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+	
+	// Status bar
+ 	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+
+	// Signals and slots
+	connect(this,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+
+	connect(metaTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotTabIndexChanged(int)));
+
+	readSettings();
+}
+ 
+NcExaminer::~NcExaminer()
+{
+	// Save settings
+	writeSettings();
+
+	// Clean memory
+	delete data_;
+}
+
+void NcExaminer::setupViewActions()
+{
+	actionFileInfo_ = new QAction(this);
+	actionFileInfo_->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo_->setText(tr("File info"));
+	actionFileInfo_->setCheckable(true);
+	actionFileInfo_->setChecked(true);
+	actionFileInfo_->setToolTip(tr("View file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/fileInfo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo_->setIcon(icon);	
+
+	actionLog_ = new QAction(this);
+	actionLog_->setObjectName(QString::fromUtf8("actionLog"));
+	actionLog_->setText(tr("&Log"));
+	actionLog_->setCheckable(true);
+	actionLog_->setChecked(false);
+	actionLog_->setToolTip(tr("View log"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/examiner/log.svg")), QIcon::Normal, QIcon::Off);
+ 	actionLog_->setIcon(icon1);	
+
+	logPanel_->hide(); // hide log area
+	
+	// Signals and slots
+	connect(actionFileInfo_,SIGNAL(toggled(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));
+}
+
+void NcExaminer::setupHelpActions()
+{
+    	// About
+    	QAction *actionAbout = new QAction(this);
+    	actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
+    	QIcon icon;
+    	icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+    	actionAbout->setIcon(icon);
+    	actionAbout->setText(tr("&About NetCDF Examiner"));
+
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+
+void NcExaminer::setupParamBox()
+{
+	// Build a box layout
+	QVBoxLayout* textRepLayout = new QVBoxLayout;
+	textRepLayout->setContentsMargins(0,0,0,0);
+	QWidget* textRepPanel = new QWidget;
+	textRepPanel->setLayout(textRepLayout);
+	metaTab_->addTab(textRepPanel,tr("Meta data"));
+
+	// Build a tree to show the data representation
+	treeParam_ = new QTreeWidget;
+	treeParam_->setObjectName("ncTreeParam");
+	treeParam_->setProperty("mvStyle",0);
+	treeParam_->setAlternatingRowColors(true);
+	treeParam_->setAllColumnsShowFocus(true);
+	textRepLayout->addWidget(treeParam_);
+
+	// Build the text headers
+	QStringList headerTexts;
+	headerTexts << tr("Parameters") << tr("Values");
+	treeParam_->setHeaderLabels(headerTexts);
+
+	// Build the three main leaves
+	QTreeWidgetItem *top1 = new QTreeWidgetItem(treeParam_);
+	top1->setText(0, tr("Variables"));
+	top1->setExpanded(true);
+
+	QTreeWidgetItem *top2 = new QTreeWidgetItem(treeParam_);
+	top2->setText(0, tr("Dimensions"));
+	top2->setExpanded(true);
+
+	QTreeWidgetItem *top3 = new QTreeWidgetItem(treeParam_);
+	top3->setText(0, tr("Global Attributes"));
+	top3->setExpanded(true);
+
+	return;
+}
+
+void NcExaminer::setupDumpBox()
+{
+	// Build a box layout
+	QVBoxLayout* dumpLayout = new QVBoxLayout;
+	dumpLayout->setContentsMargins(0,0,0,0);
+	QWidget* dumpPanel = new QWidget;
+	dumpPanel->setLayout(dumpLayout);
+	metaTab_->addTab(dumpPanel,tr("Ncdump"));
+
+	// Build a tree to show the data representation
+	dumpText_ = new QPlainTextEdit;
+	dumpText_->setReadOnly(true);
+//	dumpText_->setLineWrapMode(QPlainTextEdit::NoWrap);
+	dumpLayout->addWidget(dumpText_);
+
+	// Build the search widget
+	MvQPlainTextEditSearchLine* getSearch = new MvQPlainTextEditSearchLine(dumpText_,tr("&Find:"));
+	dumpLayout->addWidget(getSearch);
+
+	return;
+}
+
+bool NcExaminer::initMetaData( const string& filename )
+{
+	// Clean metadata if already exists
+	if ( data_ )
+	{
+		delete data_;
+		data_ = 0;
+	}
+
+	// Write inicial message in the log area
+	LogItem *log = new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Loading file");
+	log->method("NetCDF API");
+
+	// Initialize netcdf metadata object
+	data_ = new MvNetCDF( filename, 'r' );
+
+	// Update File info label
+	updateFileInfoLabel();
+
+	// Check if the netcdf file is correct
+	if ( !data_->isValid() )
+	{
+		delete data_;
+		data_ = 0;
+		log->error("File does not seem to be a valid NetCDF file");
+		slotUpdateLogOutput();
+		QString buf = tr("<b>Status: </b><font color=red>FAILED</font>");
+		emit statusMessage(buf);
+		return false;
+	}
+	slotUpdateLogOutput();
+	QString buf = tr("<b>Status:</b> <font color=green>OK</font>");
+	emit statusMessage(buf);
+
+	// Update Parameters box
+	// It assumes the following order: Variables, Dimensions, Global Attributes
+	if ( treeParam_->topLevelItemCount() != 3 )
+		return false;
+
+	// Variables
+	this->showVariables();
+
+	// Dimensions
+	int i;
+	NcDim* dim;
+	QTreeWidgetItem* item = treeParam_->topLevelItem(1);
+	for (i = 0; i < data_->getNumberOfDimensions(); i++)
+	{
+		dim = data_->getDimension(i);
+        	QTreeWidgetItem *sub = new QTreeWidgetItem(item);
+        	sub->setText(0, QString(dim->name()));
+        	sub->setText(1, QString::number(dim->size()));
+	}
+
+	// Global attributes
+	item = treeParam_->topLevelItem(2);
+	if ( data_->getNumberOfAttributes() == 0 )
+		item->setDisabled(true);
+	else
+	{
+		string values;
+		MvNcAtt *att;
+		for (i = 0; i < data_->getNumberOfAttributes();i++)
+		{
+			att = data_->getAttribute(i);
+			att->getValues(values);
+        		QTreeWidgetItem *sub = new QTreeWidgetItem(item);
+        		sub->setText(0, QString(att->name()));
+        		sub->setText(1, QString::fromStdString(values));
+		}
+	}
+	// Fits the two columns nicely
+	treeParam_->resizeColumnToContents (0);
+
+	return true;
+}
+
+void NcExaminer::showDumpBox()
+{
+	stringstream in, err;
+
+	string buf = "ncdump " + data_->path();
+
+	// Send initial info to the log area
+	LogItem *log = new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Calling netCDF ncdump command");
+	log->command(buf);
+	
+	// Run dump command
+	metview::shellCommand(buf,in,err);
+
+	// Any error?
+	if ( !err.str().empty() )
+	{
+		log->error(err.str());
+		slotUpdateLogOutput();
+		QString qbuf = tr("<b>Status: </b><font color=red>FAILED</font>");
+		emit statusMessage(qbuf);
+		return;
+	}
+
+	// Get stdout of the ncdump command
+	dumpText_->setPlainText(QString(in.str().c_str()));
+
+	// Update log area
+	slotUpdateLogOutput();
+	QString qbuf = tr("<b>Status:</b> <font color=green>OK</font>");
+	emit statusMessage(qbuf);
+
+	return;
+}
+
+void NcExaminer::slotTabIndexChanged (int index)
+{
+	// Deal with Dump tab only and initialized it only once
+	// Build the netcdf dump text output into the DumpBox tab
+	if( index == 1 && !initDump_ )
+	{
+		this->showDumpBox();
+		initDump_ = true;
+	}
+}
+
+void NcExaminer::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void NcExaminer::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+void NcExaminer::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+}
+
+void NcExaminer::showVariables()
+{
+	int i,j;
+	MvNcVar *var;
+	NcDim *dim;
+	QTreeWidgetItem* item = treeParam_->topLevelItem(0);
+
+	// Main loop over variables
+	for ( i = 0; i < data_->getNumberOfVariables(); i++ )
+	{
+		var = data_->getVariable(i);  // variable information
+
+		// Get variable's type
+		string str;
+		var->getStringType(str);
+
+		// Add variable name to the interface
+		QTreeWidgetItem *sub = new QTreeWidgetItem(item);
+        	sub->setText(0, QString::fromStdString(var->name()));
+		sub->setData(0,Qt::UserRole,i);
+		sub->setExpanded(false);
+
+		// Add variable type and dimensions
+		int numDim = var->getNumberOfDimensions();
+		QString qstr = " ( ";
+		for (j = 0; j < numDim; j++)
+		{
+  			dim = var->getDimension(j);
+			if ( j == (numDim-1) )
+				qstr += dim->name() + (QString)" )";
+			else
+				qstr += dim->name() + (QString)", ";
+		}
+		QTreeWidgetItem *sub1 = new QTreeWidgetItem(sub);
+		sub1->setText(0, QString("Type"));
+        	sub1->setText(1, QString::fromStdString(str));
+		QTreeWidgetItem *sub2 = new QTreeWidgetItem(sub);
+		sub2->setText(0, QString("Dimensions"));
+        	sub2->setText(1, qstr);
+
+		// Add variable attributes
+		if ( var->getNumberOfAttributes() )
+		{
+			QTreeWidgetItem *subat = new QTreeWidgetItem(sub);
+			subat->setText(0, QString("Attributes"));
+			for (j = 0; j < var->getNumberOfAttributes(); j++)
+			{
+				MvNcAtt *att = var->getAttribute(j);
+				att->getValues(str);
+        			QTreeWidgetItem *sub1 = new QTreeWidgetItem(subat);
+        			sub1->setText(0, QString(att->name()));
+        			sub1->setText(1, QString::fromStdString(str));
+			}
+		}
+
+		// Add first n values
+		long nvals = getNumberValues(var); // total number of values
+		long maxvals = 20; 				// number of values to be printed
+		QStringList strvals;
+		getDataValues(var,strvals,maxvals); // get values
+ 		QTreeWidgetItem *sub3 = new QTreeWidgetItem(sub);
+		sub3->setText(0, "Data values");
+		for (j = 0; j < maxvals; j++)
+		{
+			QTreeWidgetItem *sub1 = new QTreeWidgetItem(sub3);
+			sub1->setText(1, strvals[j]);
+		}
+		if ( maxvals < nvals )
+		{
+			QTreeWidgetItem *sub1 = new QTreeWidgetItem(sub3);
+			qstr = "  ... " + QString::number(nvals-maxvals) + " more values";
+			sub1->setText(1,qstr);
+		}
+	}
+}
+
+void NcExaminer::getDataValues( MvNcVar* var, QStringList& sdata, long& nvals )
+{
+	// Get data
+	long *edges = var->edges();
+	if (var->type() == ncChar )
+	{
+		vector<Cached> datavec;
+		var->get(datavec,edges,nvals);
+		print_data(datavec,sdata,nvals);
+	}
+	else if ( var->type() == ncFloat  )
+	{
+		vector<float> datavec;
+		var->get(datavec,edges,nvals);
+		print_data(datavec,sdata,nvals);
+	}
+	else if ( var->type() == ncDouble )
+	{
+		vector<double> datavec;
+		var->get(datavec,edges,nvals);
+		print_data(datavec,sdata,nvals);
+	}
+	else if ( var->type() == ncByte )
+	{
+		vector<ncbyte> datavec;
+		var->get(datavec,edges,nvals);
+		print_data(datavec,sdata,nvals);
+	}
+	else if ( var->type() == ncShort )
+	{
+		vector<short> datavec;
+		var->get(datavec,edges,nvals);
+		print_data(datavec,sdata,nvals);
+	}
+	else if ( var->type() == ncLong )
+	{
+		vector<nclong> datavec;
+		var->get(datavec,edges,nvals);
+		print_data(datavec,sdata,nvals);
+	}
+
+	nvals = sdata.size();
+	return;
+}
+
+// Template function to write values to Re widget
+template <class T>
+void NcExaminer::print_data(vector<T>&datavec, QStringList& sdata, long nvals)
+{
+	long num = (datavec.size() < (unsigned)nvals) ? datavec.size() : nvals;
+	for ( long j = 0; j < num; j++ )
+	{
+		stringstream oss;
+		oss << datavec[j];
+		sdata.append( QString::fromStdString(oss.str()) );
+	}
+}
+
+long NcExaminer::getNumberValues( MvNcVar* var )
+{
+	// Special code for type "char" because NetCDF does not
+	// nullterminate strings; so, it provides an extra info:
+	// "maximum string size", which is written as the last dimension.
+	int ndim = var->getNumberOfDimensions();
+	if (var->type() == ncChar )
+		--ndim;
+
+ 	// Get total number of values
+	long nval = 1L;
+ 	long *edges = var->edges();
+	for ( int i = 0; i < ndim; i++)
+		nval *= edges[i];
+
+	return nval;
+}
+
+void NcExaminer::updateFileInfoLabel()
+{
+	fileInfoLabel_->setTextLabel(QString::fromStdString(data_->path()));
+}
+
+void NcExaminer::slotShowAboutBox()
+{
+	MvQAbout about("NetCDF Examiner","",MvQAbout::NetcdfVersion | MvQAbout::MetviewVersion );
+	about.exec();
+}
+
+void NcExaminer::setupLogArea()
+{
+	// Log Area
+	QVBoxLayout *logLayout = new QVBoxLayout;
+	logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	logLayout->setSpacing(1);
+	logPanel_= new QWidget;
+	logPanel_->setMinimumHeight(100);
+	logPanel_->setLayout(logLayout);
+	mainSplitter_->addWidget(logPanel_);
+
+	// Define header layout
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);
+
+	// Add label to the header
+	QLabel *label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	hb->addWidget(label,1);
+
+	// Add Clear button to the header
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+
+	// Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	// Signals and slots
+	connect ( clearPb,SIGNAL(clicked(bool)), this,SLOT(slotClearLog(bool)) );
+}
+
+void NcExaminer::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-NcExaminer");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.setValue("actionFileInfoStatus",actionFileInfo_->isChecked());
+	settings.endGroup();
+}
+
+void NcExaminer::readSettings()
+{
+	QSettings settings("ECMWF","MV4-NcExaminer");
+
+	QVariant value;
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+	
+	if(settings.value("actionFileInfoStatus").isNull())
+		actionFileInfo_->setChecked(true);
+	else
+		actionFileInfo_->setChecked(settings.value("actionFileInfoStatus").toBool());
+
+	settings.endGroup();
+}
diff --git a/src/NcExaminer/NcExaminer.h b/src/NcExaminer/NcExaminer.h
new file mode 100644
index 0000000..c600d37
--- /dev/null
+++ b/src/NcExaminer/NcExaminer.h
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef NcExaminer_H
+#define NcExaminer_H
+
+#include "MvQMainWindow.h"
+
+class QPlainTextEdit;
+class QSplitter;
+class QTreeWidget;
+
+class MvNetCDF;
+class MvNcVar;
+class MvQFileInfoLabel;
+class MvQLogBrowser;
+
+using namespace std;
+
+class NcExaminer : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+    	NcExaminer(QWidget *parent = 0);
+	~NcExaminer();
+    	bool initMetaData(const string&);
+	void updateFileInfoLabel();
+
+public slots:
+	void slotTabIndexChanged(int);
+	void slotShowAboutBox();
+	void slotUpdateLogOutput();
+	void slotClearLog(bool);
+	void slotStatusMessage(QString);
+
+signals:
+	void statusMessage(QString);
+
+private:
+	void setupViewActions();
+	void setupHelpActions();
+	void setupParamBox();
+	void setupDumpBox();
+	void setupLogArea();
+
+	void showDumpBox();
+	void showVariables();
+	void getDataValues( MvNcVar*, QStringList&, long& );
+	long getNumberValues( MvNcVar* );
+
+	void readSettings();
+	void writeSettings();
+
+	template <class T>
+	void print_data( vector<T>&, QStringList&, long );
+
+	MvNetCDF *data_;
+	MvQMainWindow::MenuItemMap menuItems_;
+	MvQFileInfoLabel*  fileInfoLabel_;
+
+	QAction *actionFileInfo_;
+	QSplitter*   mainSplitter_;
+	QTabWidget* metaTab_;
+	MvQLogBrowser* logBrowser_;
+	QTreeWidget* treeParam_;
+	QWidget* logPanel_;
+	QAction* actionLog_;
+	QLabel* statusMessageLabel_;
+	QPlainTextEdit* dumpText_;
+
+	bool initDump_;
+};
+
+#endif
diff --git a/src/ObsFilter/BufrPicker.cc b/src/ObsFilter/BufrPicker.cc
new file mode 100644
index 0000000..d7a3507
--- /dev/null
+++ b/src/ObsFilter/BufrPicker.cc
@@ -0,0 +1,464 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// BufrPicker.cc, Jul2011/vk, based on ObsFilter by vk & br oct-94, rev vk 970729
+//
+//  Picks single or vector values from BUFR messages into a geopoints file.
+//  'BufrPicker' is targeted for complicated BUFR messages where the requested
+//  value(s) occur several times, with different coordinate values.
+
+
+#include "inc_iostream.h"
+#include <time.h>
+
+#include "mars.h"
+#include "Metview.h"
+#include "MvObs.h"
+#include "MvException.h"
+
+const char   mySeparator = '\t';             //-- 'tab'
+
+const char cVectorPolar[] = "POLAR_VECTOR";
+const char cVectorUV[]    = "XY_VECTOR";
+
+const unsigned long BRIGHT_TEMP = 12163;     //-- default value to be picked
+
+//__________________________________________________________ BufrPicker
+
+class BufrPicker : public MvService
+{
+ private:
+	BufrPicker( const BufrPicker& anOther );
+	void operator= ( const BufrPicker& anOther );
+
+ public:
+	BufrPicker();
+	~BufrPicker();
+
+	void      serve( MvRequest&, MvRequest& );
+
+ protected:
+	void      getParams();
+	void      getData();
+	void      getParameterSpecifiers();
+	MvRequest createRequest();
+	void      pickValue( MvObs& anObs );
+	void      add( MvObs& anObs, double aCoordValue );
+	void      close();
+
+ private:
+	long              counter_;
+ 	MvRequest         in_;               //-- input request
+ 	MvRequest         data_;             //-- sub-request of input request
+	MvObsSet*         inSet_;            //-- input observation set
+	MvObsSetIterator* iter_;             //-- input iterator (no filtering)
+	ofstream          outfile_;          //-- output geopoints file
+	long              param_;            //-- value to be picked from requested "coordinates"
+	long              param2_;           //-- second value, in case of geovector output
+	vector<long>      coordDescr_;       //-- coordinate descriptors
+	vector<double>    coordValue_;       //-- values for the given coordinates
+	int               coordDescrCount_;  //-- number of coord descrs
+	const char*       geoVectorType_;    //-- 'polar vector' or 'XY vector'
+	ENextReturn       obsOrMsg_;         //-- for multisubset msgs (pick also with subset data?)
+	boolean           includeMissingValues_;
+	fortfloat         missingValue_;
+	bool              failOnError_;
+	double            pickedValue1_;
+	double            pickedValue2_;
+	bool              pickAll_;          //-- pick all values related to the innermost coordinate descriptor
+};
+
+
+//_________________________________________________________
+
+BufrPicker::BufrPicker() : MvService( "BUFRPICKER" ),
+   counter_( 0 ),
+   inSet_( 0 ),
+   iter_( 0 ),
+   param_( BRIGHT_TEMP ),
+   param2_( 0 ),
+   coordDescrCount_( 0 ),
+   geoVectorType_( 0 ),
+   obsOrMsg_( NR_returnObs ),   //-- as a default pick all subsets (obs's)
+   includeMissingValues_( false ),
+   missingValue_( kBufrMissingValue ),
+   failOnError_(true)         //-- this breaks backwards compatibility
+{ }
+//_________________________________________________________
+
+BufrPicker::~BufrPicker()
+{
+  delete iter_;
+  delete inSet_;
+  coordDescr_.clear();
+  coordValue_.clear();
+}
+//_________________________________________________________
+void
+BufrPicker::getData()
+{
+  //-- D A T A --
+  in_.getValue( data_, "DATA" );
+  data_.print();
+  //cout << " Path now: " << (char *)data_( "PATH" ) << endl;
+
+  inSet_ = new MvObsSet( data_ );
+  iter_ = new MvObsSetIterator( *inSet_ );
+
+  //-- O U T P U T --
+  const char* outStr = in_( "OUTPUT" );
+  if( outStr && ( strcmp( outStr, cVectorPolar ) == 0  ||
+		( strcmp( outStr, cVectorUV ) == 0 ) ) )
+    {
+      if( strcmp( outStr, cVectorPolar ) == 0 )
+	geoVectorType_ = cVectorPolar;
+      else
+	geoVectorType_ = cVectorUV;
+    }
+
+  if( strcmp( in_("FAIL_ON_ERROR"), "NO" ) == 0 )
+     failOnError_ = false;
+}
+//_________________________________________________________
+void
+BufrPicker::getParameterSpecifiers()
+{
+  //-- P A R A M E T E R --
+
+  if( in_.countValues( "PARAMETER" ) > 0 )
+    param_ = (int)in_( "PARAMETER" );
+
+  if( geoVectorType_ && in_.countValues( "PARAMETER" ) > 1 )
+    param2_ = (int)in_( "PARAMETER", 1 );
+
+  const char* myMissingData = in_( "MISSING_DATA" );
+  if( myMissingData && strcmp( myMissingData, "INCLUDE" ) == 0  )
+    {
+      includeMissingValues_ = true;
+      missingValue_ = (double)in_( "MISSING_DATA_VALUE" );
+    }
+
+  //-- Check coordinate descriptors and coordinate values
+
+  coordDescrCount_ = in_.countValues( "COORDINATE_DESCRIPTORS" );
+  if( coordDescrCount_ < 1 )
+     throw MvException( "No coordinate descriptors given" );
+
+  if( in_.countValues( "COORDINATE_VALUES" ) != coordDescrCount_ )
+     throw MvException( "Different number of coordinate descriptors and values" );
+
+  //-- OK, now get coordinate descriptors and coordinate values
+
+  pickAll_ = false;
+  int innermostCoordIndex = coordDescrCount_ - 1;
+  for( int i=0; i < coordDescrCount_; ++i )
+  {
+     coordDescr_.push_back( (long)in_( "COORDINATE_DESCRIPTORS", i ) );
+
+     string coordValStr = (const char*)in_( "COORDINATE_VALUES", i );  //-- to check for "ALL"
+
+     if( coordValStr == "ALL" && i < innermostCoordIndex )       //-- 'ALL' not allowed for outer coords
+     {
+        marslog( LOG_EROR, "Value ALL allowed _only_ for the innermost coordinate descriptor" );
+     }
+     else if( coordValStr == "ALL" && i == innermostCoordIndex ) //-- 'ALL' allowed for the innermost
+     {
+        pickAll_ = true;
+        coordValue_.push_back( -9999.99 );                       //-- dummy value
+        cout << coordDescr_[ i ] << ":\tALL" << endl;
+     }
+     else                                                        //-- OK for rest of the cases
+     {
+        coordValue_.push_back( (double)in_( "COORDINATE_VALUES", i ) );
+        cout << coordDescr_[ i ] << ":\t" << coordValue_[ i ] << endl;
+     }
+  }
+}
+//_________________________________________________________
+void
+BufrPicker::getParams()
+{
+  getData();
+  getParameterSpecifiers();
+}
+//_________________________________________________________
+MvRequest
+BufrPicker::createRequest()
+{
+    char* fileName = marstmp();
+
+	MvRequest x( "GEOPOINTS" );
+	x( "TEMPORARY" ) = 1;
+	x( "PATH" ) = fileName;
+
+	outfile_.open( fileName, ios::out );
+
+	outfile_ << "#GEO" << endl;
+
+	if( geoVectorType_ )
+	  outfile_ << "#FORMAT " << geoVectorType_ << endl;
+
+	if ( geoVectorType_ )
+          outfile_ << "PARAMETER = " << param_ << mySeparator << param2_ << endl;
+	else
+          outfile_ << "PARAMETER = " << param_ << endl;
+
+        outfile_ << "#lat" << mySeparator << "long" << mySeparator
+                 << "level" << mySeparator << "date" << mySeparator
+		 << "time" << mySeparator;
+	if( geoVectorType_ )
+	  outfile_ << "speed|u" << mySeparator << "direction|v";
+	else
+	  outfile_ << "value";
+	outfile_ << endl;
+
+	outfile_ << "#DATA" << endl;
+
+	return x;
+}
+//__________________________________________________________________
+//
+// Note: 'void' function - failure is indicated by missing value(s)
+// because user may have requested to return missing values as well.
+//
+void
+BufrPicker::pickValue( MvObs& anObs )
+{
+    int startIndex = 0;                      //-- coordinate interval start index in the msg
+    anObs.setFirstDescriptor();              //-- (implicitly) force descriptors to be expanded
+
+                                             //-- "tighten in" 'startIndex' with outer coordinates
+    for( int i=0; i < (coordDescrCount_ - 1); ++i )
+    {
+       //--
+       //-- Method 'specifierIndex':
+       //-- look for a coordinate descriptor with the given value,
+       //-- starting from the given index, returning the index of the coordinate point
+       //--
+       startIndex = anObs.specifierIndex( coordDescr_[ i ]
+                                        , coordValue_[ i ]
+                                        , startIndex );
+       if( startIndex < 0 )
+       {
+          cerr << "BufrPicker: No match for coordinate " << coordDescr_[ i ]
+               << " with value " << coordValue_[ i ] << endl;
+//          marslog( LOG_WARN, "BufrPicker: No match for coordinate %d", coordDescr_[ i ]);
+          pickedValue1_ = kBufrMissingValue;
+          pickedValue2_ = kBufrMissingValue;
+          add( anObs, coordValue_[ coordDescrCount_ - 1 ]  );
+          return;                            //-- no match for this coordinate => give up
+       }
+    }
+
+    //--
+    //-- We have reached the innnermost coordinate interval, lets pick the value(s)
+    //--
+    if( pickAll_ )                           //-- shall we pick all values for the innermost coordinate?
+    {
+       long coordDescr   = coordDescr_[ coordDescrCount_ - 1 ];
+       long prevCoordDescr = coordDescrCount_ > 1
+                           ? coordDescr_[ coordDescrCount_ - 2 ]
+                           : -999;                  //-- use dummy if only one coordinate level
+
+       int    currentIndex = startIndex + 1;        //-- set start position after the previous coordinate location
+
+       //-- NOTE: startIndex runs 0,1,2,..., BUT index for operator[] should run 1,2,3,...
+       double currentValue = anObs[ currentIndex+1 ]; //-- adjust internal pointer to start position
+       long   currentDescr = anObs.currentDescriptor();
+
+       bool cont = true;
+       while( cont )
+       {
+          currentDescr = anObs.currentDescriptor();
+          if( currentDescr == prevCoordDescr )
+             break;                          //-- outer coordinate value changed => break
+
+          if( currentDescr == coordDescr )
+          {                                  //-- found new inner coordinate value
+             double currentCoordValue = anObs.currentValue();
+
+             anObs.setNextDescriptor();      //-- advance to the next data
+             ++currentIndex;
+
+             pickedValue1_ = kBufrMissingValue;
+             pickedValue2_ = kBufrMissingValue;
+                                             //-- loop until next innermost coordinate value
+             while( anObs.currentDescriptor() != coordDescr )
+             {
+                currentDescr = anObs.currentDescriptor();
+                if( currentDescr == param_ )
+                   pickedValue1_ = anObs.currentValue(); //-- main data found
+
+                if( currentDescr == param2_ )
+                   pickedValue2_ = anObs.currentValue(); //-- secondary data found (only if vector)
+
+                cont = anObs.setNextDescriptor();
+                ++currentIndex;
+                if( ! cont )
+                {                            //-- no more data available
+                    add( anObs, currentCoordValue );//-- add last data value(s) for current innermost coordinate
+                    break;                   //-- end-of-msg reached => break
+                }
+             }
+             add( anObs, currentCoordValue );//-- add data value(s) for current innermost coordinate
+             anObs[ currentIndex + 1 ];      //-- revert internal pointer
+          }
+          else
+          {
+             cont = anObs.setNextDescriptor();
+             ++currentIndex;
+          }
+       }
+    }
+    else                                     //-- just pick the value for the single given innermost coordinate
+    {
+	//-- Method 'valueBySpecifier':
+	//--  o  first looks for a coordinate descriptor with the given value
+	//--  o     starts looking from 'startIndex'
+	//--  o  if found then looks for descriptor 'param_'
+	//--  o     starts looking from where the given coordinate descriptor was found
+	//--  o  returns the value of descr 'param_' (or a missing value)
+	//--
+	pickedValue1_ = anObs.valueBySpecifier( coordDescr_[ coordDescrCount_ - 1 ]
+						, coordValue_[ coordDescrCount_ - 1 ]
+						, param_
+						, startIndex );
+
+	if( param2_ > 0 )                    //-- geovector ?
+	{
+	  pickedValue2_ = anObs.valueBySpecifier( coordDescr_[ coordDescrCount_ - 1 ]
+						, coordValue_[ coordDescrCount_ - 1 ]
+						, param2_
+						, startIndex );
+	}
+	else
+	  pickedValue2_ = 0;                 //-- a 'non-missing' value
+
+	add( anObs, coordValue_[ coordDescrCount_ - 1 ] );
+    }
+
+    return;
+}
+//_________________________________________________________
+void
+BufrPicker::add( MvObs& anObs, double aCoordValue )
+{
+    if( pickedValue1_ == kBufrMissingValue && ! includeMissingValues_ )
+       return;
+
+    if( geoVectorType_ && pickedValue2_ == kBufrMissingValue && ! includeMissingValues_  )
+       return;
+
+    MvLocation  myLoc = anObs.location();
+    TStaticTime myTime = anObs.obsTime();
+
+    outfile_ << myLoc.latitude() << mySeparator;
+    outfile_ << myLoc.longitude() << mySeparator;
+
+                                             //-- use innermost coordinate value as "level"
+    outfile_ << aCoordValue << mySeparator;
+
+    outfile_ << myTime.GetYear();
+    outfile_.width(2); outfile_.fill( '0' ); outfile_ << myTime.GetMonth();
+    outfile_.width(2); outfile_.fill( '0' ); outfile_ << myTime.GetDay() << mySeparator;
+    outfile_.width(2); outfile_.fill( '0' ); outfile_ << myTime.GetHour();
+    outfile_.width(2); outfile_.fill( '0' ); outfile_ << myTime.GetMin() << mySeparator;
+
+    if( pickedValue1_ == kBufrMissingValue )
+       pickedValue1_ = missingValue_;        //-- swap to the requested missing value
+
+    outfile_ << pickedValue1_;
+
+    if( geoVectorType_ )                     //-- two values for geovectors
+    {
+       if( pickedValue2_ == kBufrMissingValue )
+          pickedValue2_ = missingValue_;     //-- swap to the requested missing value
+
+       outfile_ << mySeparator << pickedValue2_;
+    }
+
+    outfile_ << endl;
+
+    counter_++;
+}
+//_________________________________________________________
+void
+BufrPicker::close()
+{
+     outfile_.close();
+}
+//_________________________________________________________
+
+void
+BufrPicker::serve( MvRequest& in, MvRequest& out )
+{
+   cout << "\n\nB u f r P i c k e r" << endl;
+   time_t myStartTime;
+   time( &myStartTime );
+   clock_t myStartCpu = clock();
+
+   in_ = in;
+   in_.print();
+
+   getParams();                          //-- new inSet_ & iter_
+
+   MvRequest x = createRequest();
+   MvObs     myObs;
+
+   counter_ = 0;                         //-- m a i n   l o o p
+   try
+   {
+     while( myObs = (*iter_)( obsOrMsg_ ) )
+     {
+        pickValue( myObs );
+     }
+     close();
+   }
+   catch ( MvException& e )
+   {
+     marslog( LOG_WARN, "BufrPicker: %s", e.what() );
+     if( failOnError_ )
+         throw MvException( "BufrPicker failed" );
+   }
+
+   time_t myEndTime;
+   time( &myEndTime );
+   double wallClockTime = difftime( myEndTime, myStartTime );
+   clock_t myEndCpu = clock();
+   double cpuTime =
+        ( (double)( myEndCpu - myStartCpu ) ) / (double)CLOCKS_PER_SEC; // CLK_TCK;
+   cout << " Tick Tack for " << wallClockTime << " seconds ("
+        << cpuTime << " CPU secs)\n";
+
+   if( pickAll_ )
+       sendProgress( "Picked %d values (out of %d reports) into GeoPoints file in %d secs (cpu %d secs)"
+                   , counter_, inSet_->obsCount(), (int)wallClockTime, (int)cpuTime );
+   else
+       sendProgress( "Picked %d observations (out of %d) into GeoPoints file in %d secs (cpu %d secs)"
+                   , counter_, inSet_->obsCount(), (int)wallClockTime, (int)cpuTime );
+
+   delete iter_;
+   iter_ = 0;
+
+   delete inSet_;
+   inSet_ = 0;
+
+   out = x;
+   out.print();
+}
+//_________________________________________________________
+
+int
+main( int argc, char **argv )
+{
+	MvApplication theApp( argc, argv );
+	BufrPicker     picker;
+
+	theApp.run();
+}
diff --git a/src/ObsFilter/BufrPickerDef b/src/ObsFilter/BufrPickerDef
new file mode 100644
index 0000000..5069fc6
--- /dev/null
+++ b/src/ObsFilter/BufrPickerDef
@@ -0,0 +1,154 @@
+_SUBREQUEST ; Dummy ; dummy
+{
+! 970108/vk:
+! - added descriptor numbers in front of parameter names
+! - added descriptor numbers as a new second column
+!  => get rid of shorthand names because there are not names for all params!
+!(after a shiftover period we can remove the third column with shorthand names)
+
+	PARAM
+	{
+        001001 - WMO BLOCK NUMBER ;      001001 ; XWMO_BL ; 001001
+        001002 - WMO STATION NUMBER ;    001002 ; XWMO_ST ; 001002
+        001007 - SATELLITE IDENTIFIER ;  001007 ; XSAT_ID ; 001007
+
+	004053 - Number of days with precipitation equal to or more than 1 mm ; 004053 ; XNDP ; 004053
+
+        010003 - GEOPOTENTIAL ;                  010003 ;   Z ; 010003
+        010004 - PRESSURE ;                      010004 ;   P ; 010004
+        010051 - PRESSURE REDUCED AT SEA LEVEL ; 010051 ;  PS ; 010051
+
+        011001 - WIND DIRECTION ;                011001 ;   D ; 011001
+        011002 - WIND SPEED ;                    011002 ;   F ; 011002
+        011011 - WIND DIRECTION AT 10M ;         011011 ; 10D ; 011011
+        011012 - WIND SPEED AT 10M ;             011012 ; 10F ; 011012
+        011041 - Maximum wind speed in gusts ;   011041 ; XWG ; 011041
+
+        012001 - DRY BULP TEMPERATURE ;               012001 ;       T ; 012001
+        012002 - WET BULP TEMPERATURE ;               012002 ;      TW ; 012002
+        012003 - DEW POINT TEMPERATURE ;              012003 ;      TD ; 012003
+        012004 - DRY BULP TEMPERATURE AT 2M ;         012004 ;      2T ; 012004
+        012005 - WET BULP TEMPERATURE AT 2M ;         012005 ;      2D ; 012005
+        012007 - VIRTUAL TEMPERATURE ;                012007 ;     XVT ; 012007
+	012011 - Maximum temperature - at height and over period specified ; 012011 ; XMXSPEC ; 012011
+	012012 - Minimum temperature - at height and over period specified ; 012012 ; XMNSPEC ; 012012
+	012014 - MAX TEMPERATURE AT 2M PAST 12 HOURS; 012014 ; XMX2T12 ; 012014
+	012015 - MIN TEMPERATURE AT 2M PAST 12 HOURS; 012015 ; XMN2T12 ; 012015
+	012063 - BRIGHTNESS TEMPERATURE; 012063 ; XBGT ; 012063
+	012163 - BRIGHTNESS TEMPERATURE; 012163 ; XBGT2; 012163
+
+	013003 - RELATIVE HUMIDITY ;                 013003 ;     R ; 013003
+	013004 - Vapour pressure ;                   013004 ;   XVP ; 013004
+        013011 - Total precipitation - total water equivalent ; 013011 ; XTP ; 013011
+        013013 - TOTAL SNOW DEPTH ;                  013013 ;    SD ; 013013
+	013019 - TOTAL PRECIPITATION PAST  1 HOURS ; 013019 ; XTP01 ; 013019
+	013020 - TOTAL PRECIPITATION PAST  3 HOURS ; 013020 ; XTP03 ; 013020
+	013021 - TOTAL PRECIPITATION PAST  6 HOURS ; 013021 ; XTP06 ; 013021
+	013022 - TOTAL PRECIPITATION PAST 12 HOURS ; 013022 ; XTP12 ; 013022
+	013023 - TOTAL PRECIPITATION PAST 24 HOURS ; 013023 ; XTP24 ; 013023
+	013051 - Frequency group - precipitation   ; 013051 ;  XFGP ; 013051
+
+	014031 - Total sunshine - minutes in SYNOP ; 014031 ;  XTSM ; 014031
+	014032 - Total sunshine - hours in CLIMAT ;  014032 ;  XTSH ; 014032
+
+	020001 - HORIZONTAL VISIBILITY ; 020001 ;  XHV ; 020001
+	020002 - VERTICAL VISIBILITY ;   020002 ;  XVV ; 020002
+	020003 - PRESENT WEATHER ;       020003 ;  XPW ; 020003
+	020010 - TOTAL CLOUD COVER ;     020010 ; XTCC ; 020010
+
+	"------ - FOR OTHER PARAMETERS TYPE BUFR DESCRIPTOR NUMBERS"; 0 ; DUMMY ; 00000
+
+        *
+	}
+
+	COORD_PARAM
+	{
+	"------ - Not used" ; -1
+	005040 - Orbit number ; 005040
+	005041 - Scan line number ; 005041
+	005042 - Channel number ; 005042
+	005043 - Field of view number ; 005043
+	005044 - Satellite cycle number ; 005044
+	005045 - Field of regard number ; 005045
+	007002 - Height or altitude ; 007002
+	007003 - Geopotential ; 007003
+	007004 - Pressure ; 007004
+	007007 - Height ; 007007
+	007008 - Geopotential ; 007008
+	007009 - Geopotential height ; 007009
+	007010 - Flight level ; 007010
+
+	"------ FOR OTHER COORDINATES TYPE BUFR DESCRIPTOR NUMBER";  00000
+
+        *
+	}
+
+}
+
+
+
+BUFRPICKER; Metview; Specific Application
+{
+
+	DATA [
+			interface		= icon,
+			class			= BUFR,
+			exclusive		= true,
+
+			help            = help_data,
+			help_directory  = '/Metview/Defaults',
+			help_name       = Data for Observation filtering,
+			help_class      = RETRIEVE,
+			help_definition = ( RETRIEVE, TYPE = OB, DATE = '-2' )
+		]
+
+	{
+		@
+	}
+
+	OUTPUT
+	{
+		Geographical points ; GEOPOINTS
+		Geographical polar vectors ; POLAR_VECTOR
+		Geographical X Y vectors ; XY_VECTOR
+	} = GEOPOINTS
+
+	PARAMETER
+	[ help = help_multiple_selection, exclusive = True ]
+	{
+		&_SUBREQUEST&PARAM
+		/
+	} = 012163
+
+	MISSING_DATA
+	{
+		IGNORE
+		INCLUDE
+	} = IGNORE
+
+	MISSING_DATA_VALUE
+	{
+		*
+	} = 0
+
+	COORDINATE_DESCRIPTORS
+	[ help = help_multiple_selection, exclusive = True ]
+	{
+		&_SUBREQUEST&COORD_PARAM
+		/
+	} = 5042
+
+	COORDINATE_VALUES
+	[ exclusive = True, help = help_multiple_selection ]
+	{
+		*
+		ALL
+		/
+	} = ALL
+
+	FAIL_ON_ERROR
+	{
+		YES
+		NO
+	} = YES
+}
diff --git a/src/ObsFilter/BufrPickerRules b/src/ObsFilter/BufrPickerRules
new file mode 100644
index 0000000..9965787
--- /dev/null
+++ b/src/ObsFilter/BufrPickerRules
@@ -0,0 +1,5 @@
+
+
+%if MISSING_DATA = IGNORE %then
+	%unset MISSING_DATA_VALUE
+
diff --git a/src/ObsFilter/CleanFile.cc b/src/ObsFilter/CleanFile.cc
new file mode 100644
index 0000000..ff2a033
--- /dev/null
+++ b/src/ObsFilter/CleanFile.cc
@@ -0,0 +1,213 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// CleanFile.cc, vk Dec-98
+//
+// Remove rubbish octets before the first GRIB or BUFR message
+// (normally cursed by Fortran binary I/O) i.e. clean the file
+// for Metview to recognise the correct file type.
+//
+// March 2002: added parameter SKIP_HIRLAM_CUSTOM_RECORD to be
+// able to remove the custom Hirlam GRIB msg (1st msg),
+// and removed MAX_RUBBISH_OCTETS parameter (now dynamic).
+//
+
+#include <inc_iostream.h>
+#include "Metview.h"
+
+//__________________________________________________________ CleanFile
+
+class CleanFile : public MvService
+{
+ private:
+    CleanFile( const CleanFile& anOther );
+    void operator= ( const CleanFile& anOther );
+
+ public:
+    CleanFile( void );
+    ~CleanFile( void );
+ 
+    void  serve( MvRequest&, MvRequest& );
+
+ private:
+    bool  findNextMsg( ifstream& ifs, int& skipped, char& msgType );
+};
+
+
+//_________________________________________________________
+
+CleanFile::CleanFile( void ) : MvService( "CLEANFILE" )
+{ 
+}
+//_________________________________________________________
+
+CleanFile::~CleanFile( void )
+{
+}
+//_________________________________________________________
+
+void 
+CleanFile :: serve( MvRequest& in, MvRequest& out )
+{
+	cout << "\n--> entering CleanFile::serve..." << endl;
+	in.print();
+
+	const char *data = in( "DATA" );
+	const char *path = in( "PATH" );
+
+	if( data && path )                    //-- do not allow two data sources
+	{
+		setError( 13, "Only one input allowed: both Path and Data have values!" );
+		return;
+	}
+	if( ( ! data ) && ( ! path ) )        //-- one data source required
+	{
+		setError( 13, "No input file: both Path and Data are empty!" );
+		return;
+	}
+
+	if( data )
+	{
+		MvRequest icon;
+		in.getValue(icon,"DATA");
+		path = icon("PATH");
+	}
+
+                                               //-- open file
+	ifstream myStream( path, ios::in );
+	if( ! myStream )
+	{
+		setError( 13, "Cannot open file '%s'!", path );
+		return;
+	}
+
+                                               //-- search for real data start
+	char myMsgType   = '?';
+	int  mySkipCount = 0;
+
+	bool found = findNextMsg( myStream, mySkipCount, myMsgType );
+
+                                               //-- did we find real data?
+	if( ! found )
+	  {
+	    setError( 13, "No messages found in %s, searched %d octets!"
+		    , path, mySkipCount );
+	    return;
+	  }
+
+        sendProgress( "Removed %d bytes before the first %s msg"
+                    , mySkipCount, (myMsgType == 'G' ? "GRIB" : "BUFR") );
+
+                                               //-- skip 1st record too?
+
+	const char* skipFirstMsg = in( "SKIP_HIRLAM_CUSTOM_RECORD" );
+
+	if( skipFirstMsg && strcmp( skipFirstMsg, "YES" ) == 0 )
+	  {
+
+	    int mySkipCount2 = 0;
+	    found = findNextMsg( myStream, mySkipCount2, myMsgType );
+
+                                               //-- still data after 1st msg?
+	    if( ! found )
+	      {
+		setError( 13, "'Custom Record' removed, but no more msgs found!" );
+		return;
+	      }
+
+	    mySkipCount2 += 4; //-- +4: 1st "GRIB"/"BUFR" was already past
+
+	    sendProgress( "Removed 'Custom Record' (first msg, %d octets more)"
+			, mySkipCount2 );
+
+	    mySkipCount += mySkipCount2;
+	  }
+
+                                               //-- create output file
+	char* myFileOut = marstmp();
+	ofstream myStreamOut( myFileOut, ios::out );
+
+                                               //-- skip rubbish
+	myStream.seekg( 0 ); // rewind
+	int myCount = mySkipCount;
+	while( myCount-- > 0 )
+	{
+		myStream.get();
+	}
+                                               //-- create a clean file
+	myCount     = 0;
+	int myOctet = myStream.get();
+	while( ! myStream.eof() )
+	  {
+	    ++myCount;
+	    myStreamOut.put( myOctet );
+	    myOctet = myStream.get();
+	  }
+                                               //-- create return request
+	MvRequest myOutReq( (myMsgType == 'G' ? "GRIB" : "BUFR") );
+	myOutReq( "TEMPORARY" ) = 1;
+	myOutReq( "PATH" ) = myFileOut;
+	out = myOutReq;
+
+        sendProgress( "Created %d clean octets", myCount );
+}
+//_________________________________________________________
+
+bool
+CleanFile::findNextMsg( ifstream& ifs, int& skipCount, char& msgType )
+{ 
+  const int BUFR[5] = { 'B','U','F','R', '+' };
+  const int GRIB[5] = { 'G','R','I','B', '+' };
+
+  int iB = 0;                      //-- indices to BUFR[5] and GRIB[5]
+  int iG = 0;
+
+  int myOctet = ifs.get();
+  while( ! ifs.eof() )
+    {
+      ++skipCount;
+
+      if( myOctet == BUFR[iB] )
+	++iB;                      //-- advance in finding "BUFR"
+      else
+	iB = 0;                    //-- revert back to the 1st char
+
+      if( myOctet == GRIB[iG] )
+	++iG;                      //-- advance in finding "GRIB"
+      else
+	iG = 0;                    //-- revert back to the 1st char
+
+      if( iB == 4 )
+	{
+	  msgType = 'B';           //-- we have found "BUFR"
+	  skipCount -= 4;
+	  return true;
+	}
+      else if( iG == 4 )
+	{
+	  msgType = 'G';           //-- we have found "GRIB"
+	  skipCount -= 4;
+	  return true;
+	}
+
+      myOctet = ifs.get();         //-- not yet => get next char
+    }
+
+  return false;
+}
+//_________________________________________________________
+
+int 
+main( int argc, char **argv )
+{
+  MvApplication  myApp( argc, argv );
+  CleanFile      myProfessional;
+
+  myApp.run();
+}
diff --git a/src/ObsFilter/Makefile.am b/src/ObsFilter/Makefile.am
new file mode 100644
index 0000000..259a9b4
--- /dev/null
+++ b/src/ObsFilter/Makefile.am
@@ -0,0 +1,38 @@
+
+bin_PROGRAMS = bin/ObsFilter bin/CleanFile bin/BufrPicker
+
+bin_ObsFilter_SOURCES  = ObsFilter.cc
+bin_ObsFilter_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+
+bin_CleanFile_SOURCES  = CleanFile.cc
+bin_CleanFile_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+
+bin_BufrPicker_SOURCES  = BufrPicker.cc
+bin_BufrPicker_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA  = $(local_sharedir)/ObjectSpec.BufrPicker $(local_sharedir)/BufrPickerDef  \
+	      $(local_sharedir)/BufrPickerRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+CLEANFILES = $(share_DATA)
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.BufrPicker BufrPickerDef BufrPickerRules
+
+
+
+bin:
+	ln -s ../../bin bin
+
+icons:
diff --git a/src/ObsFilter/Makefile.in b/src/ObsFilter/Makefile.in
new file mode 100644
index 0000000..01f8ab0
--- /dev/null
+++ b/src/ObsFilter/Makefile.in
@@ -0,0 +1,714 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/ObsFilter$(EXEEXT) bin/CleanFile$(EXEEXT) \
+	bin/BufrPicker$(EXEEXT)
+subdir = src/ObsFilter
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_BufrPicker_OBJECTS = BufrPicker.$(OBJEXT)
+bin_BufrPicker_OBJECTS = $(am_bin_BufrPicker_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_BufrPicker_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_CleanFile_OBJECTS = CleanFile.$(OBJEXT)
+bin_CleanFile_OBJECTS = $(am_bin_CleanFile_OBJECTS)
+bin_CleanFile_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_bin_ObsFilter_OBJECTS = ObsFilter.$(OBJEXT)
+bin_ObsFilter_OBJECTS = $(am_bin_ObsFilter_OBJECTS)
+bin_ObsFilter_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_BufrPicker_SOURCES) $(bin_CleanFile_SOURCES) \
+	$(bin_ObsFilter_SOURCES)
+DIST_SOURCES = $(bin_BufrPicker_SOURCES) $(bin_CleanFile_SOURCES) \
+	$(bin_ObsFilter_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_ObsFilter_SOURCES = ObsFilter.cc
+bin_ObsFilter_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+bin_CleanFile_SOURCES = CleanFile.cc
+bin_CleanFile_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+bin_BufrPicker_SOURCES = BufrPicker.cc
+bin_BufrPicker_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.BufrPicker $(local_sharedir)/BufrPickerDef  \
+	      $(local_sharedir)/BufrPickerRules
+
+CLEANFILES = $(share_DATA)
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.BufrPicker BufrPickerDef BufrPickerRules
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ObsFilter/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/ObsFilter/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/BufrPicker$(EXEEXT): $(bin_BufrPicker_OBJECTS) $(bin_BufrPicker_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/BufrPicker$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_BufrPicker_OBJECTS) $(bin_BufrPicker_LDADD) $(LIBS)
+bin/CleanFile$(EXEEXT): $(bin_CleanFile_OBJECTS) $(bin_CleanFile_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/CleanFile$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_CleanFile_OBJECTS) $(bin_CleanFile_LDADD) $(LIBS)
+bin/ObsFilter$(EXEEXT): $(bin_ObsFilter_OBJECTS) $(bin_ObsFilter_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/ObsFilter$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_ObsFilter_OBJECTS) $(bin_ObsFilter_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BufrPicker.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CleanFile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ObsFilter.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+bin:
+	ln -s ../../bin bin
+
+icons:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ObsFilter/ObjectSpec.BufrPicker b/src/ObsFilter/ObjectSpec.BufrPicker
new file mode 100644
index 0000000..f974c99
--- /dev/null
+++ b/src/ObsFilter/ObjectSpec.BufrPicker
@@ -0,0 +1,28 @@
+################################################################################
+#
+#	ObjectSpec.BufrPicker
+#
+
+object,
+	class		= BUFRPICKER,
+	icon_box	= Filters,
+ 	can_be_created	= True,
+	definition_file	= '$METVIEW_DIR/share/metview/etc/BufrPickerDef',
+	rules_file	= '$METVIEW_DIR/share/metview/etc/BufrPickerRules',
+	default_name	= Bufr Picker,
+	help_page	= BufrPicker,
+	type		= Data,
+	expand		= 75,   # 64+8+2+1 = EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	macro		= bufr_picker,
+	editor_type	= SimpleEditor,
+	pixmap		= '$METVIEW_DIR/share/metview/icons/BUFRPICKER.icon'
+
+state,
+	class		= BUFRPICKER,
+	output_class	= GEOPOINTS,
+	service		= BufrPicker
+
+service,
+	cmd		= '$METVIEW_CMD $METVIEW_BIN/BufrPicker',
+	name		=  BufrPicker
+
diff --git a/src/ObsFilter/ObsFilter.cc b/src/ObsFilter/ObsFilter.cc
new file mode 100644
index 0000000..d1f2f0b
--- /dev/null
+++ b/src/ObsFilter/ObsFilter.cc
@@ -0,0 +1,793 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// ObsFilter.cc, vk & br oct-94, rev vk 970729
+//               qa-c++ vk 960725
+
+
+#include "inc_iostream.h"
+#include <time.h>
+#include <vector>
+
+#include "Metview.h"
+#include "MvObs.h"
+#include "MvException.h"
+
+const char cTab = 9;                         // ascii code for 'tab'
+const char cComma = ',';
+
+const char cVectorPolar[] = "POLAR_VECTOR";
+const char cVectorUV[]    = "XY_VECTOR";
+
+enum eLevel { LVL_Surface, LVL_SingleLevel, LVL_ThicknessLayer, LVL_Occurrence, LVL_CoordinateValue, LVL_CoordinateRange};
+const unsigned long TEMP_2M = 12004;
+
+enum eOutput          { eBUFR,  eGEOPOINTS,  ePOLAR_VECTOR,  eXY_VECTOR,  eCSV };
+string outTypeStr[] = { "BUFR", "GEOPOINTS", "POLAR_VECTOR", "XY_VECTOR", "CSV" };
+
+//__________________________________________________________ ObsFilter
+
+class ObsFilter : public MvService
+{
+ private:
+	ObsFilter( const ObsFilter& anOther );
+	void operator= ( const ObsFilter& anOther );
+
+ public:
+	ObsFilter();
+	~ObsFilter();
+
+	void      serve( MvRequest&, MvRequest& );
+
+ protected:
+	void      getParams( void );
+	void      getData( void );
+	void      getParameterSpecifiers( void );
+	void      getTypes( void );
+	void      getTimes( void );
+	void      getWmoIds( void );
+	void      getLocation( void );
+	void      getCustom( void );
+	MvRequest createRequest();
+	void      add();
+	void      close( void );
+	float     surfaceValue( long parInd );
+	float     pressureLevelValue( float level, long parInd );
+	float     layerValue( float level1, float level2, long parInd );
+	float     occurranceValue( int occurranceInd, long parIndex );
+	float     coordinateLevelValue(long, float, long);
+	float     coordinateRangeValue(long, float,float, long );
+
+ private:
+	long              _counter;
+	MvRequest         _in;
+	MvRequest         _data;
+	MvObs             obs_;
+	MvObsSet*         _inSet;
+	MvObsSetIterator* _iter;
+	eOutput           outType_;
+	MvObsSet*         _outBufr;
+	ofstream          _outFile;
+	eLevel            _level;
+	float             _firstLevel;
+	float             _secondLevel;
+	long              _occurrenceIndex;
+	vector<long>      param_;
+	ENextReturn       _obsOrMsg;   //-- for multisubset msgs (filtering also with subset data?)
+	boolean           _includeMissingValues;
+	fortfloat         _missingValue;
+	bool              failOnError_;
+	bool              failOnEmptyOutput_;
+	long		  _coordLevelDescriptor;
+	double		  _coordLevelValue;
+};
+
+
+//_________________________________________________________
+
+ObsFilter::ObsFilter() : MvService( "OBSFILTER" ),
+   _counter( 0 ),
+   _inSet( 0 ),
+   _iter( 0 ),
+   _outBufr( 0 ),
+   _level( LVL_Surface ),
+   _firstLevel( 0. ),
+   _secondLevel( 0. ),
+   _occurrenceIndex( 0 ),
+   _obsOrMsg( NR_returnMsg ),   //-- as a default do not study subsets (obs's)
+   _includeMissingValues( false ),
+   _missingValue( kBufrMissingValue ),
+   failOnError_(true),         //-- this breaks backwards compatibility
+   failOnEmptyOutput_(false)
+{
+}
+//_________________________________________________________
+
+ObsFilter::~ObsFilter()
+{
+  delete _iter;
+  delete _inSet;
+  delete _outBufr;
+}
+//_________________________________________________________
+void
+ObsFilter :: getData( void )
+{
+  //-- D A T A --
+  _in.getValue( _data, "DATA" );
+  _data.print();
+  //cout << " Path now: " << (char *)_data( "PATH" ) << endl;
+
+  _inSet = new MvObsSet( _data );
+  _iter = new MvObsSetIterator( *_inSet );
+
+  //-- O U T P U T --
+  outType_ = (eOutput)( (int)_in( "OUTPUT" ) );
+
+  if( strcmp( _in("FAIL_ON_ERROR"), "NO" ) == 0 )
+     failOnError_ = false;
+
+  if( strcmp( _in("FAIL_ON_EMPTY_OUTPUT"), "YES" ) == 0 )
+     failOnEmptyOutput_ = true;
+}
+//_________________________________________________________
+void
+ObsFilter :: getParameterSpecifiers( void )
+{
+  //-- P A R A M E T E R --
+  int nrParams = _in.countValues( "PARAMETER" );
+
+  if( nrParams == 0 )                        //-- first descriptor (parameter)
+    param_.push_back( TEMP_2M );
+  else
+    param_.push_back( (int)_in( "PARAMETER" ) );
+
+  if( nrParams > 1 )                         //-- if more descriptors (parameters)
+  {
+     for( int n=1; n<nrParams; ++n )
+        param_.push_back( (int)_in( "PARAMETER", n ) );
+  }
+  if( (outType_ == ePOLAR_VECTOR || outType_ == eXY_VECTOR)  && nrParams < 2 )
+     throw MvException( "ObsFilter: too few parameters defined. Wind data takes two parameters!!" );
+
+  const char* myMissingData = _in( "MISSING_DATA" );
+  if( myMissingData && strcmp( myMissingData, "INCLUDE" ) == 0  )
+    {
+      _includeMissingValues = true;
+      _missingValue = (double)_in( "MISSING_DATA_VALUE" );
+    }
+
+  	//-- L E V E L --
+  const char* levelStr = _in( "LEVEL" );
+  if( levelStr && strcmp( levelStr, "SURFACE" ) == 0 )
+    _level = LVL_Surface;
+  else if( levelStr && strcmp( levelStr, "SINGLE" ) ==0 )
+    _level = LVL_SingleLevel;
+  else if( levelStr && strcmp( levelStr, "THICKNESS" ) ==0 )
+    _level = LVL_ThicknessLayer;
+  else if( levelStr && strcmp( levelStr, "OCCURRENCE" ) ==0 )
+    _level = LVL_Occurrence;
+  else if( levelStr && strcmp( levelStr, "DESCRIPTOR_VALUE" ) ==0 )
+    _level = LVL_CoordinateValue;
+  else if( levelStr && strcmp( levelStr, "DESCRIPTOR_RANGE" ) ==0 )
+    _level = LVL_CoordinateRange;
+  
+  if( _in.countValues( "FIRST_LEVEL" ) > 0 )
+    _firstLevel = (double)_in( "FIRST_LEVEL" );
+
+  if( _in.countValues( "SECOND_LEVEL" ) > 0 )
+    _secondLevel = (double)_in( "SECOND_LEVEL" );
+
+  if( _in.countValues( "OCCURRENCE_INDEX" ) > 0 )
+    _occurrenceIndex = (long)_in( "OCCURRENCE_INDEX" );
+  
+  if( _in.countValues( "LEVEL_DESCRIPTOR" ) > 0 )
+    _coordLevelDescriptor = (long)_in( "LEVEL_DESCRIPTOR" );
+  
+}
+//_________________________________________________________
+void
+ObsFilter :: getTypes( void )
+{
+  int i;
+
+  const char* obsTypeStr = _in( "OBSERVATION_TYPES" );
+  if( obsTypeStr && strcmp( obsTypeStr, "ANY" ) != 0 )
+  {
+    long myType = -999;
+    for( i = 0; i < _in.countValues( "OBSERVATION_TYPES" ); i++ )
+    {
+      myType = -999;
+      if( ( myType = (long)_in( "OBSERVATION_TYPES", i ) ) >= 0 )
+        _iter->setMessageType( (int)myType );
+    }
+  }
+
+  const char* obsSubTypeStr = _in( "OBSERVATION_SUBTYPES" );
+  if( obsSubTypeStr && strcmp( obsSubTypeStr, "ANY" ) != 0 )
+  {
+    long mySubType = -999;
+    for( i = 0; i < _in.countValues( "OBSERVATION_SUBTYPES" ); i++ )
+    {
+      mySubType = -999;
+      if( ( mySubType = (long)_in( "OBSERVATION_SUBTYPES", i ) ) >= 0 )
+        _iter->setMessageSubtype( (int)mySubType );
+    }
+  }
+}
+//_________________________________________________________
+void
+ObsFilter :: getTimes( void )
+{
+  const char* obsTimeStr = _in( "DATE_AND_TIME_FROM" );
+  if( obsTimeStr && strcmp( obsTimeStr, "DATA" ) == 0 )
+    _iter->useObsTime( true );
+
+  const char* dateStr = _in( "DATE" );
+  const char* timeStr = _in( "TIME" );
+  if( dateStr && strcmp( dateStr, "ANY" ) == 0 &&
+      timeStr && strcmp( timeStr, "ANY" ) == 0    )
+  {
+                                          // both DATE and TIME are ANY
+  }                                       // TIME==ANY && DATE==value is illegal
+  else
+  {
+    int  myTime = (int)_in( "TIME" );
+    int  myDelta = (int)_in( "RESOLUTION_IN_MINS" );
+
+	if( dateStr && strcmp( dateStr, "ANY" ) == 0 )  // only TIME is given
+	{
+	  myDelta = 100*(myDelta / 60) + myDelta % 60;  // minutes into HHMM
+	  if( (myDelta % 100) != 0 )
+	    _iter->setTimeRangeWithoutDate( myTime - myDelta - 40  // 40=100-60!!!
+					  , myTime + myDelta );
+	  else
+	    _iter->setTimeRangeWithoutDate( myTime - myDelta
+					  , myTime + myDelta );
+	}
+	else                                            // both TIME and DATE given
+	{
+	  long myDate = (int)_in( "DATE" );
+	  TDynamicTime myObsTime( myDate, myTime );
+	  _iter->setTimeRange( myObsTime, myDelta );
+    }
+  }
+}
+//_________________________________________________________
+void
+ObsFilter :: getWmoIds( void )
+{
+  int i;
+
+	const char* blockStr = _in( "WMO_BLOCKS" );
+	if( blockStr && strcmp( blockStr, "ANY" ) == 0 )
+	{
+	}
+	else
+	{
+	  long myWmoBlock;
+	  for( i = 0; i < _in.countValues( "WMO_BLOCKS" ); i++ )
+	  {
+	    if( ( myWmoBlock = (long)_in( "WMO_BLOCKS", i ) ) > 0 )
+	      _iter->setWmoBlock( (int)myWmoBlock );
+	  }
+      _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+	}
+
+	const char* stationStr = _in( "WMO_STATIONS" );
+	if( stationStr && strcmp( stationStr, "ANY" ) == 0 )
+	{
+	}
+	else
+	{
+	  long myWmoStation;
+	  for( i = 0; i < _in.countValues( "WMO_STATIONS" ); i++ ) // int i; ????
+	  {
+	    if( ( myWmoStation = (long)_in( "WMO_STATIONS", i ) ) > 0 )
+	      _iter->setWmoStation( myWmoStation );
+	  }
+      _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+	}
+}
+//_________________________________________________________
+void
+ObsFilter :: getLocation( void )
+{
+  const char* locFilterStr = _in( "LOCATION_FILTER" );
+  if( locFilterStr && strcmp( locFilterStr, "AREA" ) == 0 )
+  {
+	const char* areaStr = _in( "AREA" );
+	if( areaStr )
+	{
+	  if( _in.countValues( "AREA" ) == 4 )
+	  {
+	    float y1 = (double)_in( "AREA", 0 );
+	    float x1 = (double)_in( "AREA", 1 );
+	    float y2 = (double)_in( "AREA", 2 );
+	    float x2 = (double)_in( "AREA", 3 );
+	    MvLocation loc1( y1, x1 );
+	    MvLocation loc2( y2, x2 );
+	    _iter->setArea( loc1, loc2 );
+        _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+	  }
+	  else
+	    sendProgress( "ObsFilter: Errors in AREA-parameter, Area filter not set!" );
+	    //cerr << " >>> Errors in 'AREA'-parameter?" << endl;
+	}
+  }
+
+
+  if( locFilterStr && strcmp( locFilterStr, "LINE" ) == 0 )
+  {
+	const char* lineStr = _in( "LINE" );
+	if( lineStr )
+	{
+	  if( _in.countValues( "LINE" ) == 4 )
+	  {
+	    float myDeltaInM = (double)_in( "DELTA_IN_KM" ) * 1000;
+	    float y1 = (double)_in( "LINE", 0 );
+	    float x1 = (double)_in( "LINE", 1 );
+	    float y2 = (double)_in( "LINE", 2 );
+	    float x2 = (double)_in( "LINE", 3 );
+	    MvLocation loc1( y1, x1 );
+	    MvLocation loc2( y2, x2 );
+	    _iter->setXSectionLine( loc1, loc2, myDeltaInM );
+        _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+	  }
+	  else
+	    sendProgress( "ObsFilter: Errors in LINE-parameter, Line filter not set!" );
+	}
+  }
+}
+//_________________________________________________________
+void
+ObsFilter :: getCustom( void )
+{
+  const char* customFilterStr = _in( "CUSTOM_FILTER" );
+  long  customDescriptor = (long)_in( "CUSTOM_PARAMETER" );
+  float customFirstValue = 0;
+  float customSecondValue = 0;
+  int mySelectValueCount = _in.countValues( "CUSTOM_VALUES" );
+  if( mySelectValueCount > 0 )
+    customFirstValue = (double)_in( "CUSTOM_VALUES", 0 );
+  if( mySelectValueCount > 1 )
+    customSecondValue = (double)_in( "CUSTOM_VALUES", 1 );
+
+  if( customFilterStr && strcmp( customFilterStr, "VALUE" ) == 0 )
+  {
+    for( int i = 0; i < mySelectValueCount; i++ )
+    {
+      _iter->select( customDescriptor, (double)_in( "CUSTOM_VALUES", i ) );
+    }
+    _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+  }
+
+  if( customFilterStr && strcmp( customFilterStr, "RANGE" ) == 0 )
+  {
+    if( mySelectValueCount == 2 )
+    {
+      _iter->selectRange( customDescriptor, customFirstValue, customSecondValue );
+      _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+    }
+    else
+      cerr << ">>> 'Custom Filter/Range: nr of values != 2 !!!" << endl;
+  }
+
+  if( customFilterStr && strcmp( customFilterStr, "EXCLUDE" ) == 0 )
+  {
+    if( mySelectValueCount == 2 )
+    {
+      _iter->excludeRange( customDescriptor, customFirstValue, customSecondValue );
+      _obsOrMsg = NR_returnObs;  //-- have to study each subset (obs)
+    }
+    else
+      cerr << ">>> 'Custom Filter/ExcludeRange: nr of values != 2 !!!" << endl;
+  }
+}
+//_________________________________________________________
+void
+ObsFilter :: getParams( void )
+{
+  _obsOrMsg = NR_returnMsg;  //-- set msg level as default
+
+  //-- these have no effect on _obsOrMsg --
+  getData();
+  getParameterSpecifiers();
+  getTypes();
+
+  //-- these may have an effect on _obsOrMsg --
+  getTimes();
+  getWmoIds();
+  getLocation();
+  getCustom();
+
+  if( outType_ == eBUFR )
+  {
+     if( _obsOrMsg == NR_returnObs )
+        cerr << "-- Filtering with data values requested, have to study each subset (obs) --\n"
+             << endl;
+     else
+        cerr << "-- Filtering on msg level (only section header info used) --\n"
+             << endl;
+  }
+  else
+     _obsOrMsg = NR_returnObs;    //-- for geopoints always on obs level!!!
+}
+//_________________________________________________________
+MvRequest
+ObsFilter :: createRequest()
+{
+   switch( outType_ )
+   {
+      case eBUFR:                           //-- BUFR
+      {
+	 MvRequest x( "BUFR" );             //-- BUFR return request
+	 x( "TEMPORARY" ) = 1;
+	 x( "PATH" ) = marstmp();
+	 _outBufr = new MvObsSet( x, "w" );
+
+	 return x;
+      }
+
+      case eCSV:                            //-- CSV
+      {
+	 char* fileName = marstmp();
+
+	 MvRequest x( "TABLE" );            //-- CSV return request (TABLE)
+	 x( "TEMPORARY" ) = 1;
+	 x( "PATH" ) = fileName;
+
+	 _outFile.open( fileName, ios::out );
+                                            //-- construct CSV header line
+	 for( unsigned int p = 0; p < param_.size(); ++p )
+	 {
+	    if( p > 0 )
+	       _outFile << cComma;
+	    _outFile << "'" << param_[p] << "'";
+	 }
+	 _outFile << endl;
+
+	 return x;
+      }
+
+      case eGEOPOINTS:                      //-- any GEOPOINTS
+      case ePOLAR_VECTOR:
+      case eXY_VECTOR:
+      {
+	 char* fileName = marstmp();
+
+	 MvRequest x( "GEOPOINTS" );        //-- GEOPOINTS return request
+	 x( "TEMPORARY" ) = 1;
+	 x( "PATH" ) = fileName;
+
+	 _outFile.open( fileName, ios::out );
+
+	 _outFile << "#GEO" << endl;        //-- construct GEOPOINTS header
+
+	 if( outType_ == ePOLAR_VECTOR || outType_ == eXY_VECTOR )
+	   _outFile << "#FORMAT " << outTypeStr[ outType_ ] << endl;
+
+	 if ( outType_ == eGEOPOINTS )
+           _outFile << "PARAMETER = " << param_[0] << endl;
+	 else
+           _outFile << "PARAMETER = " << param_[0] << cTab << param_[1] << endl;
+
+	 _outFile << "#lat" << cTab << "long" << cTab
+	          << "level" << cTab << "date" << cTab
+	          << "time" << cTab;
+	 if( outType_ == eGEOPOINTS )
+	   _outFile << "value";
+	 else
+	   _outFile << "speed|u" << cTab << "direction|v";
+	 _outFile << endl;
+
+	 _outFile << "#DATA" << endl;
+
+	 return x;
+      }
+   }
+
+   MvRequest x( "ERROR" );                   //-- internal error if here
+   return x;
+}
+//_________________________________________________________
+float
+ObsFilter::surfaceValue( long parInd )
+{
+   return obs_.value( param_[parInd] );
+}
+//_________________________________________________________
+float
+ObsFilter::pressureLevelValue( float level, long parInd )
+{
+   return obs_.valueByPressureLevel( level, param_[parInd] );
+}
+//_________________________________________________________
+float
+ObsFilter::layerValue( float level1, float level2, long parInd )
+{
+   return obs_.valueByLayer( level1, level2, param_[parInd] );
+}
+//_________________________________________________________
+float
+ObsFilter::occurranceValue( int occurranceInd, long parIndex )
+{
+   return obs_.valueByOccurrence( occurranceInd, param_[parIndex] );
+}
+//_________________________________________________________
+float
+ObsFilter::coordinateLevelValue(long coordDesc, float level, long parInd )
+{
+   return obs_.valueByLevel(coordDesc,level,param_[parInd]);
+}
+//_________________________________________________________
+float
+ObsFilter::coordinateRangeValue(long coordDesc, float level1,float level2, long parInd )
+{
+   return obs_.valueByLevelRange(coordDesc,level1,level2,param_[parInd]);
+}
+
+//_________________________________________________________
+void
+ObsFilter :: add()
+{
+  if( outType_ == eBUFR )                   //-- BUFR
+  {
+     if( _counter == 0 )                    //-- BUFR: first time
+     {
+       //-- changed 2011-12-30/vk:
+       //--  o target BUFR file is set to contain single subsets, but this is in effect
+       //--     only when filtering using data values from BUFR Section 4
+       //--  o this setting has no effect when filtering only with metadata values in
+       //--     BUFR Section 1; in such cases multisubset messages are copied as they
+       //--     are (metadata is common to all subsets in a multisubset msg)
+        _outBufr->setSubsetMax(1); //-- obs_.msgSubsetCount() );
+     }
+
+     //-- if filtering requires values from observation then multisubset
+     //-- messages have to be filtered on observation (subset) level !
+     if( _obsOrMsg == NR_returnMsg )
+     {
+        _outBufr->write( obs_ );           //-- BUFR: filtering with "meta data" only
+        _counter += obs_.msgSubsetCount(); //-- BUFR: i.e. write the whole message!
+     }
+     else
+     {
+        _outBufr->add( obs_ );             //-- BUFR: filtering also with data values
+        _counter++;                         //-- BUFR: write current subset only!
+     }
+  }
+  else if( outType_ == eCSV )               //-- CSV
+  {
+     ostringstream os;
+     bool abortOnMissing = false;
+     for( unsigned int p = 0; p < param_.size(); ++p )
+     {
+        if( p > 0 )
+           os << cComma;
+	float val;
+	switch( _level )
+	{
+	 case LVL_Surface:
+	    val = surfaceValue( p );
+	    break;
+
+	 case LVL_SingleLevel:
+	    val = pressureLevelValue( _firstLevel, p );
+	    break;
+
+	 case LVL_ThicknessLayer:
+	    val = layerValue( _firstLevel, _secondLevel, p );
+	    break;
+
+	 case LVL_Occurrence:                //-- CSV: this does not make much sence here !!!
+	    val = occurranceValue( _occurrenceIndex, p );
+	    break;
+	 	 
+	 case LVL_CoordinateValue:
+            val = coordinateLevelValue( _coordLevelDescriptor,_firstLevel, p);
+            break;
+            
+         case LVL_CoordinateRange:
+            val = coordinateRangeValue( _coordLevelDescriptor,_firstLevel, _secondLevel, p);    
+      	    break; 
+	  
+	 default:
+	   break;         
+	}
+
+	if( val == kBufrMissingValue )      //-- CSV: missing value?
+	{
+	   if( _includeMissingValues )
+	   {
+	      val = _missingValue;          //-- CSV: chage to user defined missing value
+	   }
+	   else
+	   {
+	      abortOnMissing = true;        //-- CSV: force ignoring the whole obs
+	      break;
+	   }
+	}
+        os << val;                          //-- CSV: write value or user defined missing value
+     }
+     if( ! abortOnMissing )
+     {
+        _outFile << os.str() << endl;
+        _counter++;
+     }
+  }
+  else                                      //-- GEOPOINTS or GEOVECTORS
+  {
+    float myValue = 0;
+    float myDirec = 0;  //-- for geovectors
+
+    switch( _level )
+    {
+    case LVL_Surface:
+      myValue = surfaceValue( 0 );
+      if( outType_ > eGEOPOINTS )
+	myDirec = surfaceValue( 1 );
+      break;
+
+    case LVL_SingleLevel:
+      myValue = pressureLevelValue( _firstLevel, 0 );
+      if( outType_ > eGEOPOINTS )
+	myDirec = pressureLevelValue( _firstLevel, 1 );
+      break;
+
+    case LVL_ThicknessLayer:
+      myValue = layerValue( _firstLevel, _secondLevel, 0 );
+      if( outType_ > eGEOPOINTS )
+	myDirec = layerValue( _firstLevel, _secondLevel, 1 );
+      break;
+
+    case LVL_Occurrence:
+      myValue = occurranceValue( _occurrenceIndex, 0 );
+      if( outType_ > eGEOPOINTS )
+	myDirec = occurranceValue( _occurrenceIndex, 1 );
+      break;
+
+    case LVL_CoordinateValue:
+      myValue = coordinateLevelValue( _coordLevelDescriptor,_firstLevel, 0);
+      if( outType_ > eGEOPOINTS )
+	myDirec = coordinateLevelValue( _coordLevelDescriptor,_firstLevel, 1);
+      break;   
+      
+    case LVL_CoordinateRange:
+      myValue = coordinateRangeValue( _coordLevelDescriptor,_firstLevel, _secondLevel, 0);
+      if( outType_ > eGEOPOINTS )
+	myDirec = coordinateRangeValue( _coordLevelDescriptor,_firstLevel, _secondLevel, 1);
+      break;   
+      
+    default:
+      	break;      
+   }	
+
+    if( myValue != kBufrMissingValue || _includeMissingValues )
+    {
+      MvLocation  myLoc = obs_.location();
+      TStaticTime myTime = obs_.obsTime();
+
+      _outFile << myLoc.latitude() << cTab;
+      _outFile << myLoc.longitude() << cTab;
+
+      _outFile << _firstLevel << cTab;
+
+      _outFile << myTime.GetYear();
+      _outFile.width(2); _outFile.fill( '0' );
+      _outFile << myTime.GetMonth();
+      _outFile.width( 2 ); _outFile.fill( '0' );
+      _outFile << myTime.GetDay() << cTab;
+      _outFile.width( 2 ); _outFile.fill( '0' );
+      _outFile << myTime.GetHour();
+      _outFile.width( 2 ); _outFile.fill( '0' );
+      _outFile << myTime.GetMin() << cTab;
+
+      if( obs_.elementValueType( param_[0] ) == kEVT_string )
+	{
+	  //-- string value has only basic retrieve...
+	  _outFile << obs_.stringValue( param_[0] );
+	}
+      else
+	{
+	  if( _includeMissingValues && myValue == kBufrMissingValue )
+	    {
+	      myValue = _missingValue;
+	    }
+	  _outFile << myValue;
+
+	  if( outType_ > eGEOPOINTS )
+	    _outFile << cTab << myDirec;  //-- should we check against missing value?
+	}
+      _outFile << endl;
+
+      _counter++;
+    }
+  }
+}
+//_________________________________________________________
+void
+ObsFilter :: close( void )
+{
+  if( outType_ == eBUFR )
+     _outBufr->close();
+  else
+     _outFile.close();
+}
+//_________________________________________________________
+
+void
+ObsFilter :: serve( MvRequest& in, MvRequest& out )
+{
+   cout << "\n\nO b s F i l t e r, MAX_KDLEN=" << MAX_KDLEN << endl;
+   time_t myStartTime;
+   time( &myStartTime );
+   clock_t myStartCpu = clock();
+
+   _in = in;
+   _in.print();
+
+   getParams();                          //-- new _inSet & _iter
+   cout << " " << *_iter << endl;
+
+   MvRequest x = createRequest();
+   _counter = 0;                         //-- m a i n   l o o p
+   try
+   {
+     while( obs_ = (*_iter)( _obsOrMsg ) )
+     {
+       add();
+     }
+     close();
+   }
+   catch ( MvException& e )
+   {
+     marslog( LOG_WARN, "ObsFilter: %s", e.what() );
+     if( failOnError_ )
+         throw MvException( "ObsFilter failed" );
+   }
+
+   time_t myEndTime;
+   time( &myEndTime );
+   double wallClockTime = difftime( myEndTime, myStartTime );
+   clock_t myEndCpu = clock();
+   double cpuTime =
+        ( (double)( myEndCpu - myStartCpu ) ) / (double)CLOCKS_PER_SEC; // CLK_TCK;
+   cout << " Tick Tack for " << wallClockTime << " seconds ("
+        << cpuTime << " CPU secs)\n";
+
+   cout << " Filtered " << _counter
+        << " observations (out of " << _inSet->obsCount() << ")" << endl;
+
+   sendProgress( "Filtered %d observations (out of %d) into a %s file in %d secs (cpu %d secs)"
+               , _counter, _inSet->obsCount(), outTypeStr[(int)outType_].c_str()
+               , (int)wallClockTime, (int)cpuTime );
+
+   delete _iter;
+   _iter = 0;
+
+   delete _inSet;
+   _inSet = 0;
+
+   if( _counter == 0 && failOnEmptyOutput_ )
+       throw MvException( "Abort: Fail-On-Empty-Output requested!" );
+
+   out = x;
+   out.print();
+}
+//_________________________________________________________
+
+int
+main( int argc, char **argv )
+{
+	MvApplication theApp( argc, argv );
+	ObsFilter     filter;
+
+	theApp.run();
+}
diff --git a/src/Obstat/Makefile.am b/src/Obstat/Makefile.am
new file mode 100644
index 0000000..cb9f065
--- /dev/null
+++ b/src/Obstat/Makefile.am
@@ -0,0 +1,35 @@
+
+bin_PROGRAMS      = bin/Obstat
+bin_Obstat_SOURCES = MvMain.cc
+	
+
+bin_Obstat_CPPFLAGS = $(ODB_CPPFLAGS) -I../libUtil -I../libMetview
+bin_Obstat_LDFLAGS  = $(ODB_LDFLAGS)
+bin_Obstat_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS) $(ODB_LIBS)
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Obstat \
+	     $(local_sharedir)/ObstatDef
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons = $(local_iconsdir)/OBSTAT.xpm
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin $(icons)
+
+EXTRA_DIST = OBSTAT.xpm ObjectSpec.Obstat ObstatDef
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Obstat/Makefile.in b/src/Obstat/Makefile.in
new file mode 100644
index 0000000..3894ee5
--- /dev/null
+++ b/src/Obstat/Makefile.in
@@ -0,0 +1,713 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Obstat$(EXEEXT)
+subdir = src/Obstat
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Obstat_OBJECTS = bin_Obstat-MvMain.$(OBJEXT)
+bin_Obstat_OBJECTS = $(am_bin_Obstat_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Obstat_DEPENDENCIES = $(am__DEPENDENCIES_1) ../../lib/libUtil.a \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_Obstat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_Obstat_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Obstat_SOURCES)
+DIST_SOURCES = $(bin_Obstat_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Obstat_SOURCES = MvMain.cc
+bin_Obstat_CPPFLAGS = $(ODB_CPPFLAGS) -I../libUtil -I../libMetview
+bin_Obstat_LDFLAGS = $(ODB_LDFLAGS)
+bin_Obstat_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS) $(ODB_LIBS)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Obstat \
+	     $(local_sharedir)/ObstatDef
+
+icons = $(local_iconsdir)/OBSTAT.xpm
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin $(icons)
+EXTRA_DIST = OBSTAT.xpm ObjectSpec.Obstat ObstatDef
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Obstat/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Obstat/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Obstat$(EXEEXT): $(bin_Obstat_OBJECTS) $(bin_Obstat_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Obstat$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_Obstat_LINK) $(bin_Obstat_OBJECTS) $(bin_Obstat_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Obstat-MvMain.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_Obstat-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Obstat_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Obstat-MvMain.o -MD -MP -MF $(DEPDIR)/bin_Obstat-MvMain.Tpo -c -o bin_Obstat-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Obstat-MvMain.Tpo $(DEPDIR)/bin_Obstat-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_Obstat-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Obstat_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Obstat-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_Obstat-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Obstat_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Obstat-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_Obstat-MvMain.Tpo -c -o bin_Obstat-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Obstat-MvMain.Tpo $(DEPDIR)/bin_Obstat-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_Obstat-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Obstat_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Obstat-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Obstat/MvMain.cc b/src/Obstat/MvMain.cc
new file mode 100644
index 0000000..ddb5f51
--- /dev/null
+++ b/src/Obstat/MvMain.cc
@@ -0,0 +1,167 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+
+#include <iostream>
+#include <stdexcept>
+#include <algorithm>
+
+#include <fcntl.h>
+#include <unistd.h>
+
+using namespace std;
+
+static map<string,string> onOffMap;
+
+
+void setParam(vector<pair<string,string> > &param,MvRequest& in,string parMv,string parObstat)
+{
+	const char *cval=in(parMv.c_str());
+
+	if(cval)
+  	{
+		string val(cval);
+
+		if(parMv == "all_data" || parMv == "use_ecfs_log" ||
+		   parMv == "stdev" || parMv == "stat_calc" || 
+		   parMv == "scat_period" || parMv == "coverage" || 
+		   parMv == "use_ecfs_log" || parMv == "sta_calc" ||
+		   parMv == "sta_accum" || parMv == "update_soft" ||
+		   parMv == "retrieve_odb" || parMv == "feedback_clean" ||
+		   parMv == "sta_clean" || parMv == "sta_plot"	)
+		{
+			if(onOffMap.find(val) != onOffMap.end())
+			{
+				val=onOffMap[val];
+			}
+		}
+		
+		else if(parMv == "odb_datalist")
+		{
+		  	std::transform(val.begin(),val.end(),val.begin(), ::tolower);
+		}
+		if(val.size() != 0)
+			param.push_back(make_pair(parObstat,val));	
+  	}
+}
+
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class Obstat: public Base {	
+public:
+	Obstat() : Base("OBSTAT") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+void Obstat::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------Obstat::serve()--------------" << endl;
+  	in.print();
+
+	string obstatScript;
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate mv_obstat script!");
+		setError(13);
+		return;
+	}
+	else
+	{
+		obstatScript=string(mvbin) +"/mv_obstat";
+	}
+
+	//Get values from the ui
+	vector<pair<string,string> > param;
+
+	setParam(param,in,"first_cycle","FIRSTCYCLE");
+	setParam(param,in,"last_cycle","LASTCYCLE");
+	setParam(param,in,"expver_1","EXPVER1");
+	setParam(param,in,"class_1","CLASS1");
+	setParam(param,in,"stream_1","STREAM1");
+	setParam(param,in,"expver_2","EXPVER2");
+	setParam(param,in,"class_2","CLASS2");
+	setParam(param,in,"stream_2","STREAM2");
+	setParam(param,in,"all_data","LALLDATA");
+	setParam(param,in,"use_ecfs_log","USE_ECFSLOG");
+	setParam(param,in,"stat_def","STATDEF");
+	//setParam(param,in,"user_params","STATDEF");
+	//setParam(param,in,"user_flags","STATDEF");
+	//setParam(param,in,"output_grib_dir","GRIBDIR");
+	//setParam(param,in,"store_dir","STOREDIR");
+	//setParam(param,in,"exe_dir","EXEDIR");
+	//setParam(param,in,"lib_dir","LIBDIR");
+	//setParam(param,in,"data_dir","DATADIR");
+	setParam(param,in,"stdev","STDEV");
+	setParam(param,in,"stat_merge","STAMERGE");
+	setParam(param,in,"obs_format","OBSFORMAT");
+	setParam(param,in,"odb_file_type","ODBFILETYPE");
+	setParam(param,in,"odb_datalist","ODBDATALIST");
+	setParam(param,in,"stat_calc","STACALC");
+	setParam(param,in,"obstat_plot","OBSTATPLOT");
+	setParam(param,in,"geogrib_average_period","GEOGRIB_AVE_PERIOD");
+	setParam(param,in,"scat_period","SCAT_PERIOD");
+	setParam(param,in,"coverage","LCOVERAGE");
+	setParam(param,in,"use_ecf_log","USE_ECFSLOG");
+	setParam(param,in,"comment","COMMENT");
+	setParam(param,in,"sta_calc","STACALC");
+	setParam(param,in,"sta_accum","STACALC");
+	setParam(param,in,"update_soft","UPDSOFT");
+        setParam(param,in,"retrieve_odb","RETRIEVEODB");
+	setParam(param,in,"feedback_clean","FBKCLEAN");
+	setParam(param,in,"sta_clean","STACLEAN");
+	setParam(param,in,"sta_plot","STAPLOT");
+
+	string outFile=marstmp(); //"/var/tmp/cgr/obstat.txt";
+
+	FILE *fp=fopen(outFile.c_str(),"w+");
+	if(fp ==0)
+	{
+		return;
+	}
+	
+	for(vector<pair<string,string> >::iterator it=param.begin(); 
+            it != param.end(); it++)
+	{
+
+		fprintf(fp,"%s=%s\n",(*it).first.c_str(),(*it).second.c_str());
+	}
+
+	fclose(fp);
+
+	
+	//Run obstat
+
+	string cmd = obstatScript + " " +  outFile; 
+
+	marslog(LOG_INFO,"Execute command: %s",cmd.c_str());
+
+	system(cmd.c_str());
+
+}
+
+	  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv );
+
+    	Obstat obstat;	
+	
+	onOffMap["ON"]="yes";
+	onOffMap["OFF"]="no";
+	
+    	theApp.run();
+}
+
+
diff --git a/src/Obstat/OBSTAT.xpm b/src/Obstat/OBSTAT.xpm
new file mode 100644
index 0000000..9ec521a
--- /dev/null
+++ b/src/Obstat/OBSTAT.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char *Obstat[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 1 1",
+"  c #DC243A",
+/* pixels */
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                "
+};
diff --git a/src/Obstat/ObjectSpec.Obstat b/src/Obstat/ObjectSpec.Obstat
new file mode 100644
index 0000000..178e362
--- /dev/null
+++ b/src/Obstat/ObjectSpec.Obstat
@@ -0,0 +1,28 @@
+################################################################################
+#
+#	ObjectSpec.Obstat
+#
+
+object,
+	class               = OBSTAT,
+ 	can_be_created      = True,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/ObstatDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/ObstatRules',
+	default_name        = 'Obstat',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = obstat,
+	editor_type	    = SimpleEditor,	
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/OBSTAT.icon'
+
+
+state,
+	class        = OBSTAT,
+	output_class = GEOPOINTS,
+	service      = Obstat
+
+
+service,
+	cmd           = '$METVIEW_CMD $METVIEW_BIN/Obstat',
+	name          =  'Obstat'
+
diff --git a/src/Obstat/ObstatDef b/src/Obstat/ObstatDef
new file mode 100644
index 0000000..75dc8f2
--- /dev/null
+++ b/src/Obstat/ObstatDef
@@ -0,0 +1,120 @@
+OBSTAT; Obstat; experimental
+{
+	first_cycle {@} = "2010081512"
+	last_cycle {@} = "2010081512"
+	expver_1 {@} = "0001"
+	class_1 {@} = "od"
+	stream_1 {@} = "DCDA"
+	expver_2 {@} 
+	class_2 {@}
+	stream_2 {@} 
+	all_data {
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+	use_ecfs_log {
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+	stat_def {@} = "/home/mo/obstat/OBSTAT/stat.ref"
+	user_params {@}
+	user_flags {@}
+	output_grib_dir {@}
+	store_dir {@}
+	exe_dir {@}
+	lib_dir {@}
+	data_dir {@} = "/home/mo/obstat/OBSTAT/data"
+	stdev {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	stat_merge {@}
+	stat_calc {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	obs_format [interface = option_menu ] {
+		ODB ; ODB
+		BUFR ; BUFR
+		USER ; USER
+		} = ODB
+	odb_file_type [interface = option_menu ] {
+		CCMA ; CCMA
+		ECMA ; ECMA
+		ODBCMP ; ODBCMP
+		MONDB ; MONDB
+		} = CCMA
+	odb_datalist [interface = option_menu ] {
+		AMSUA
+		AMSRE
+		AMSUA
+		AMSUB
+		CONV
+		GEOS
+		GPSRO
+		HIRS
+		IASI
+		MERIS
+		MHS
+		MWHS
+		MWTS
+		REO3
+		SATOB
+		SCATT
+		SSMI
+		SSMIS
+		SURF_CONV
+		TMI
+	} = CONV
+	retireve_odb {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+
+	obstat_plot {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	coverage {
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+	geogrib_average_period {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	fovgrib_average_period {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	scat_period {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	comment {@}
+	sta_calc {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	sta_accum {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	update_soft {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	feedback_clean {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	sta_clean {
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+	sta_plot {
+		ON  ; ON 
+                OFF ; OFF
+	} = ON
+	sql_section {@}
+}
diff --git a/src/ObstatCurveTool/Makefile.am b/src/ObstatCurveTool/Makefile.am
new file mode 100644
index 0000000..635fd61
--- /dev/null
+++ b/src/ObstatCurveTool/Makefile.am
@@ -0,0 +1,52 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+bin_PROGRAMS = bin/ObstatCurveTool
+bin_ObstatCurveTool_SOURCES =  MvMain.cc \
+	MvQObstatCurveTool.cc MvQObstatCurveTool.h MvQObstatCurveTool.moc.cpp \
+	MvQObstatCurveToolBase.cc MvQObstatCurveToolBase.h MvQObstatCurveToolBase.moc.cpp \
+	MvQObstatCurveData.cc MvQObstatCurveData.h
+
+bin_ObstatCurveTool_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_ObstatCurveTool_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) $(MAGPLUS_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil $(METVIEW_NETCDF_FLAGS)
+bin_ObstatCurveTool_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_ObstatCurveTool_LDADD    = $(MAGPLUS_LIB) $(LDADD) $(STANDARD_METVIEW_LIBS) $(FLIBS) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a  $(METVIEW_NETCDF_LIB)  $(ODB_LIBS) $(QT_LIBS)
+bin_ObstatCurveTool_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.ObstatCurve
+	 
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons = $(local_iconsdir)/OBSTAT_CURVE.xpm
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+EXTRA_DIST = OBSTAT_CURVE.xpm ObjectSpec.ObstatCurve
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin MvQObstatCurveTool.moc.cpp MvQObstatCurveToolBase.moc.cpp  $(icons)
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/ObstatCurveTool *.o *.moc.cpp *.qrc.cpp
+
+
+
diff --git a/src/ObstatCurveTool/Makefile.in b/src/ObstatCurveTool/Makefile.in
new file mode 100644
index 0000000..c073589
--- /dev/null
+++ b/src/ObstatCurveTool/Makefile.in
@@ -0,0 +1,961 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/ObstatCurveTool$(EXEEXT)
+subdir = src/ObstatCurveTool
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_ObstatCurveTool_OBJECTS = bin_ObstatCurveTool-MvMain.$(OBJEXT) \
+	bin_ObstatCurveTool-MvQObstatCurveTool.$(OBJEXT) \
+	bin_ObstatCurveTool-MvQObstatCurveTool.moc.$(OBJEXT) \
+	bin_ObstatCurveTool-MvQObstatCurveToolBase.$(OBJEXT) \
+	bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.$(OBJEXT) \
+	bin_ObstatCurveTool-MvQObstatCurveData.$(OBJEXT)
+bin_ObstatCurveTool_OBJECTS = $(am_bin_ObstatCurveTool_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_ObstatCurveTool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) \
+	$(bin_ObstatCurveTool_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_ObstatCurveTool_SOURCES)
+DIST_SOURCES = $(bin_ObstatCurveTool_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_ObstatCurveTool_SOURCES = MvMain.cc \
+	MvQObstatCurveTool.cc MvQObstatCurveTool.h MvQObstatCurveTool.moc.cpp \
+	MvQObstatCurveToolBase.cc MvQObstatCurveToolBase.h MvQObstatCurveToolBase.moc.cpp \
+	MvQObstatCurveData.cc MvQObstatCurveData.h
+
+bin_ObstatCurveTool_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_ObstatCurveTool_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) $(MAGPLUS_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil $(METVIEW_NETCDF_FLAGS)
+bin_ObstatCurveTool_LDFLAGS = $(QT_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_ObstatCurveTool_LDADD = $(MAGPLUS_LIB) $(LDADD) $(STANDARD_METVIEW_LIBS) $(FLIBS) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a  $(METVIEW_NETCDF_LIB)  $(ODB_LIBS) $(QT_LIBS)
+bin_ObstatCurveTool_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.ObstatCurve
+icons = $(local_iconsdir)/OBSTAT_CURVE.xpm
+EXTRA_DIST = OBSTAT_CURVE.xpm ObjectSpec.ObstatCurve
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin MvQObstatCurveTool.moc.cpp MvQObstatCurveToolBase.moc.cpp  $(icons)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ObstatCurveTool/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/ObstatCurveTool/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/ObstatCurveTool$(EXEEXT): $(bin_ObstatCurveTool_OBJECTS) $(bin_ObstatCurveTool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/ObstatCurveTool$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_ObstatCurveTool_LINK) $(bin_ObstatCurveTool_OBJECTS) $(bin_ObstatCurveTool_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatCurveTool-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_ObstatCurveTool-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvMain.o -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvMain.Tpo -c -o bin_ObstatCurveTool-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvMain.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_ObstatCurveTool-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_ObstatCurveTool-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvMain.Tpo -c -o bin_ObstatCurveTool-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvMain.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_ObstatCurveTool-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_ObstatCurveTool-MvQObstatCurveTool.o: MvQObstatCurveTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveTool.o -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveTool.o `test -f 'MvQObstatCurveTool.cc' || echo '$(srcdir)/'`MvQObstatCurveTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveTool.cc' object='bin_ObstatCurveTool-MvQObstatCurveTool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveTool.o `test -f 'MvQObstatCurveTool.cc' || echo '$(srcdir)/'`MvQObstatCurveTool.cc
+
+bin_ObstatCurveTool-MvQObstatCurveTool.obj: MvQObstatCurveTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveTool.obj -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveTool.obj `if test -f 'MvQObstatCurveTool.cc'; then $(CYGPATH_W) 'MvQObstatCurveTool.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveTool.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveTool.cc' object='bin_ObstatCurveTool-MvQObstatCurveTool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveTool.obj `if test -f 'MvQObstatCurveTool.cc'; then $(CYGPATH_W) 'MvQObstatCurveTool.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveTool.cc'; fi`
+
+bin_ObstatCurveTool-MvQObstatCurveTool.moc.o: MvQObstatCurveTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveTool.moc.o -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveTool.moc.o `test -f 'MvQObstatCurveTool.moc.cpp' || echo '$(srcdir)/'`MvQObstatCurveTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveTool.moc.cpp' object='bin_ObstatCurveTool-MvQObstatCurveTool.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveTool.moc.o `test -f 'MvQObstatCurveTool.moc.cpp' || echo '$(srcdir)/'`MvQObstatCurveTool.moc.cpp
+
+bin_ObstatCurveTool-MvQObstatCurveTool.moc.obj: MvQObstatCurveTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveTool.moc.obj -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveTool.moc.obj `if test -f 'MvQObstatCurveTool.moc.cpp'; then $(CYGPATH_W) 'MvQObstatCurveTool.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveTool.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveTool.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveTool.moc.cpp' object='bin_ObstatCurveTool-MvQObstatCurveTool.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveTool.moc.obj `if test -f 'MvQObstatCurveTool.moc.cpp'; then $(CYGPATH_W) 'MvQObstatCurveTool.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveTool.moc.cpp'; fi`
+
+bin_ObstatCurveTool-MvQObstatCurveToolBase.o: MvQObstatCurveToolBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveToolBase.o -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.o `test -f 'MvQObstatCurveToolBase.cc' || echo '$(srcdir)/'`MvQObstatCurveToolBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveToolBase.cc' object='bin_ObstatCurveTool-MvQObstatCurveToolBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.o `test -f 'MvQObstatCurveToolBase.cc' || echo '$(srcdir)/'`MvQObstatCurveToolBase.cc
+
+bin_ObstatCurveTool-MvQObstatCurveToolBase.obj: MvQObstatCurveToolBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveToolBase.obj -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.obj `if test -f 'MvQObstatCurveToolBase.cc'; then $(CYGPATH_W) 'MvQObstatCurveToolBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveToolBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveToolBase.cc' object='bin_ObstatCurveTool-MvQObstatCurveToolBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.obj `if test -f 'MvQObstatCurveToolBase.cc'; then $(CYGPATH_W) 'MvQObstatCurveToolBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveToolBase.cc'; fi`
+
+bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.o: MvQObstatCurveToolBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.o -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.o `test -f 'MvQObstatCurveToolBase.moc.cpp' || echo '$(srcdir)/'`MvQObstatCurveToolBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveToolBase.moc.cpp' object='bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.o `test -f 'MvQObstatCurveToolBase.moc.cpp' || echo '$(srcdir)/'`MvQObstatCurveToolBase.moc.cpp
+
+bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.obj: MvQObstatCurveToolBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.obj -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.obj `if test -f 'MvQObstatCurveToolBase.moc.cpp'; then $(CYGPATH_W) 'MvQObstatCurveToolBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCur [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveToolBase.moc.cpp' object='bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveToolBase.moc.obj `if test -f 'MvQObstatCurveToolBase.moc.cpp'; then $(CYGPATH_W) 'MvQObstatCurveToolBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveToolBase.moc.cpp'; fi`
+
+bin_ObstatCurveTool-MvQObstatCurveData.o: MvQObstatCurveData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveData.o -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveData.o `test -f 'MvQObstatCurveData.cc' || echo '$(srcdir)/'`MvQObstatCurveData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveData.cc' object='bin_ObstatCurveTool-MvQObstatCurveData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveData.o `test -f 'MvQObstatCurveData.cc' || echo '$(srcdir)/'`MvQObstatCurveData.cc
+
+bin_ObstatCurveTool-MvQObstatCurveData.obj: MvQObstatCurveData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatCurveTool-MvQObstatCurveData.obj -MD -MP -MF $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Tpo -c -o bin_ObstatCurveTool-MvQObstatCurveData.obj `if test -f 'MvQObstatCurveData.cc'; then $(CYGPATH_W) 'MvQObstatCurveData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Tpo $(DEPDIR)/bin_ObstatCurveTool-MvQObstatCurveData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatCurveData.cc' object='bin_ObstatCurveTool-MvQObstatCurveData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatCurveTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatCurveTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatCurveTool-MvQObstatCurveData.obj `if test -f 'MvQObstatCurveData.cc'; then $(CYGPATH_W) 'MvQObstatCurveData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatCurveData.cc'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/ObstatCurveTool *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ObstatCurveTool/MvMain.cc b/src/ObstatCurveTool/MvMain.cc
new file mode 100644
index 0000000..d0f3349
--- /dev/null
+++ b/src/ObstatCurveTool/MvMain.cc
@@ -0,0 +1,143 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include <QSplashScreen>
+
+#include "MvQObstatCurveTool.h"
+
+#include <iostream>
+#include "Metview.h"
+#include "MvQService.h"
+#include "MvQKeyManager.h"
+#include "MvQObstatCurveData.h"
+
+string ftmp;
+
+using namespace std;
+ 
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService 
+{ 
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvObstatCurveTool : public Base 
+{	
+public:
+	MvObstatCurveTool() : Base("OBSTAT_CURVE") {};	
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvObstatCurveTool::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------MvObstatCurveTool::serve()--------------" << endl;
+  	in.print();	
+    	
+	//Get grib file name	
+	const char* tmpc = in("PATH");	
+
+	//Set grib file name			
+	string fdata(tmpc);
+
+	//Set tmpfile name
+	ftmp=marstmp();
+
+	//GribMetaData grib;
+	//try
+	//{
+	//	grib.init(fgrib,fgribdump);
+	//}
+	/*catch(MvOdbException e)
+   	{
+		stringstream sbuff("", ios_base::out);
+		sbuff << e.what();	
+		//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+		setError(13,sbuff.str().c_str());
+		return;		
+	}	
+	catch(exception e)
+   	{
+		stringstream sbuff("", ios_base::out);
+		sbuff << e.what();		
+		//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+		setError(13,sbuff.str().c_str());	
+		return;			
+	}*/
+	
+  
+	//Create the qt application
+	QApplication app(ac, av); 
+	
+	//Create a splash screen
+	/*QSplashScreen *splash=new QSplashScreen;
+	splash->setFixedWidth(300);
+	splash->setFixedHeight(300);
+	splash->setPixmap(QPixmap("/tmp/PERFORCE/metview_4/src/GribBrowser_qt/splash.png"));
+
+	splash->show();
+	app.processEvents();
+
+	Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
+	
+	splash->showMessage("Reading message list in Grib File",
+			    topRight, Qt::white);
+	app.processEvents();
+	qDebug() << "splash";*/
+
+	
+
+	//Create the grib key manager and initialize it
+	//MvQKeyManager *manager = new MvQKeyManager(MvQKeyManager::GribType);
+	//manager->loadProfiles();
+
+	//Create the grib metadata object and initialize it	
+	MvQObstatCurveData *data = new MvQObstatCurveData;
+	
+	/*connect(data,SIGNAL(newItemLoaded(QString)),
+		splash,SLOT(showMessage(QString)));*/
+
+
+	data->setFileName(QString::fromStdString(fdata));
+
+	//Create the grib browser and initialize it
+	MvQObstatCurveTool *browser = new MvQObstatCurveTool;
+	browser->init(data);
+   	browser->show();
+	
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	//Remove splash screen
+	//splash->finish(browser);
+	//delete splash;
+
+   	//Enter the app loop
+ 	app.exec();	
+}		
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+  	av = argv;
+	
+	MvApplication theApp( argc, argv );
+
+    	MvObstatCurveTool curve;	
+	
+    	theApp.run();	
+}
+
+
+
diff --git a/src/ObstatCurveTool/MvQObstatCurveData.cc b/src/ObstatCurveTool/MvQObstatCurveData.cc
new file mode 100644
index 0000000..f3f320c
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveData.cc
@@ -0,0 +1,445 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "netcdfcpp.h"
+
+#include <math.h>
+
+#include <QDebug>
+#include <QFile>
+#include <QTextStream>
+
+#include "MvQObstatCurveData.h"
+
+#include "MvKeyProfile.h"
+
+MvQObstatCurveData::MvQObstatCurveData()
+{
+	itemNum_=0;
+	//filePath_="/var/tmp/cgr/metview/Local/OBSTAT/scat_0001_DCDA_synop_pressure.200809";
+}
+
+MvQObstatCurveData::~MvQObstatCurveData()
+{
+	clearData();
+}
+
+void MvQObstatCurveData::clearData()
+{
+	itemNum_=0;
+
+}
+
+void MvQObstatCurveData::setFileName(QString fileName)
+{
+	fileName_=fileName;
+	clearData();
+	loadData();
+
+	//QString nc="/var/tmp/cgr/metview/Local/OBSTAT/scat.nc";
+	//blocks_[0]->items().at(0)->writeMatrixToNc(nc);
+}
+
+void MvQObstatCurveData::loadData()
+{	
+	path_ = (fileName_.toStdString());
+	decode();
+
+	itemNum_=data_.size();
+
+	/*
+	QFile file(fileName_);
+
+	if(file.open(QFile::ReadOnly | QFile::Text) == false)
+	{
+		return;
+	}
+
+	QTextStream in(&file);
+
+	itemNum_=0;
+
+	while (!in.atEnd() ) 
+	{
+        	QString line = in.readLine();
+		while(line.contains("#BEGIN STATDEF") == false)
+		{
+			line = in.readLine();
+		}
+		
+		QStringList lst;
+		lst << line;
+
+		while(line.contains("#BEGIN STATDEF") == false)
+		{
+			lst << in.readLine();
+		}
+		
+	}	
+
+
+
+
+	while (!in.atEnd()) 
+	{
+        	QString line = in.readLine();
+		while(line.contains("#BEGIN STATDEF") == false)
+		{
+			line = in.readLine();
+		}
+		
+		line = in.readLine();
+		if(!line.contains("comment="))
+		{
+			return;
+		}
+
+		//Comment
+		QString comment;
+		QStringList lst=line.split("comment=",QString::SkipEmptyParts);
+		if(lst.count() == 2)
+			comment=lst[1];
+
+		
+		//Statkind
+		int statkind=-1;
+		lst=line.split("statkind=",QString::SkipEmptyParts);
+		if(lst.count() == 2)
+			statkind=lst[1].toInt();
+
+		if(statKind != 1)
+		{
+			continue;
+		}
+
+
+		//=========================================
+		// Statkind 1
+		//=========================================
+
+			
+	
+
+		if(!lst.contains("HEADER=") || lst.count() != 11)
+		{
+			return;
+		}
+
+		MvQCurveBlock *block= new MvQCurveBlock;
+		
+		//Start date
+		QString dstr=lst[1];
+		dstr+=lst[2];
+		block->setStartDate(QDateTime::fromString(dstr,"yyyyMMddHHmm"));
+		
+		//End date
+		dstr=lst[3];
+		dstr+=lst[4];
+		block->setEndDate(QDateTime::fromString(dstr,"yyyyMMddHHmm"));
+		
+		//
+		block->setSatId(lst[5].toInt());
+		block->setSensorId(lst[6].toInt());
+		int itemNum=lst[7].toInt();
+		int channelNum=lst[8].toInt();
+		int flagNum=lst[9].toInt();
+		int areaNum=lst[10].toInt();
+		//block->setItemNum(lst[7].toInt());
+		//block->setChannelNum(lst[8].toInt());
+		//block->setFlagNum(lst[9].toInt());
+		//block->setAreaNum(lst[10].toInt());
+
+
+		line = in.readLine();
+		if(!line.contains("title="))
+		{
+			return;
+		}
+
+		lst=line.split("title=",QString::SkipEmptyParts);
+		qDebug() << "title:" << lst << lst.last();
+		if(lst.count() > 0)
+		{	
+			block->setTitle(lst.last().simplified());
+		}
+		qDebug() << "title:" << block->title();
+
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);		
+		if(!lst.contains("press="))
+		{
+			return;
+		}
+
+		if(lst[1] == "yes")
+		{
+		
+		}
+		
+		//X params		
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		qDebug() << line;
+		qDebug() << lst;
+		
+		if(lst.count() != itemNum)
+		{
+			return;
+		}
+	
+		QStringList paramsX=lst;
+
+		//Y params	
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		if(lst.count() != itemNum)
+		{
+			return;
+		}
+	
+		QStringList paramsY=lst;
+	
+		//Flags	
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		if(lst.count() != flagNum)
+		{
+			return;
+		}
+
+		QStringList flags=lst;
+
+		//Areas
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		if(lst.count() != areaNum)
+		{
+			return;
+		}
+
+		block->setAreaNames(lst);
+		
+		//read titles
+		QMap<int,QString> titles;
+	
+		for(int i=0; i < itemNum; i++)
+		{
+			line = in.readLine();
+			titles[paramsX[i].toInt()]=line.simplified();
+
+			line = in.readLine();
+			titles[paramsY[i].toInt()]=line.simplified();
+		}
+
+		block->setParams(titles);
+
+		int totalItemNum=itemNum*flagNum*areaNum*channelNum;
+		
+		for(int i=0; i < totalItemNum; i++)
+		{
+			//BEGIN SCATITEM
+			line = in.readLine();
+			lst=line.split(" ",QString::SkipEmptyParts);
+			if(lst[0] != "BEGIN" && lst[1] != "SCATITEM" && lst.count() != 13)
+			{
+				return;
+			}
+			
+			MvQCurveItem *item=new MvQCurveItem;
+
+			item->setArea(lst[2].toInt());
+			item->setLevel(lst[3].toInt());	
+			item->setFlag(lst[4].toInt());	
+			item->setParamX(lst[5].toInt());	
+			item->setParamY(lst[6].toInt());			
+			item->setStartX(lst[7].toFloat());			
+			item->setStartY(lst[8].toFloat());	
+			item->setDX(lst[9].toFloat());			
+			item->setDY(lst[10].toFloat());	
+			item->setNX(lst[11].toInt());			
+			item->setNY(lst[12].toInt());		
+
+			item->setTitleX(titles[item->paramX()]);
+			item->setTitleY(titles[item->paramY()]);
+			
+
+			//GLOBAL STATS
+			line = in.readLine();
+			lst=line.split(" ",QString::SkipEmptyParts);
+			if(lst[0] != "GLOBAL" && lst[1] != "STATS" && lst.count() != 13)
+			{
+				return;
+			}
+
+			item->setMaxX(lst[2].toFloat());
+			item->setMinX(lst[3].toFloat());	
+			item->setMaxY(lst[4].toFloat());
+			item->setMinY(lst[5].toFloat());
+			item->setSumX(lst[6].toFloat());
+			item->setSumY(lst[7].toFloat());
+			item->setSumXX(lst[8].toFloat());
+			item->setSumYY(lst[9].toFloat());
+			item->setSumXY(lst[10].toFloat());
+			item->setSumDiffSqr(lst[11].toFloat());
+			item->setSourceDataNum(lst[12].toInt());
+
+			int num=0;
+			int totalNum=item->nX()*item->nY(); 
+			float *data = new float[totalNum];
+
+			while(num != totalNum)
+			{
+				line = in.readLine();
+				lst=line.split(" ",QString::SkipEmptyParts);
+				foreach(QString s,lst)
+				{
+					data[num]=s.toFloat();
+					num++;
+				}
+			}
+
+			item->setData(data);
+	
+			block->addItem(item);	
+
+			line = in.readLine();
+			lst=line.split(" ",QString::SkipEmptyParts);
+			if(!line.contains("END SCATITEM"))
+			{
+				return;
+			}
+			itemNum_++;
+		}
+
+		blocks_ << block;  
+	}
+
+	file.close();
+*/
+
+}
+
+void MvQObstatCurveData::getStatItem(QList<MvQObstatCurveItem*> &items)
+{
+	map<string,StatDef>::iterator it=data_.find("1");
+	StatDef &def=it->second; 
+
+	for(int i=0; i < def.data_.size(); i++)
+	{		
+		MvQObstatCurveItem *item = new MvQObstatCurveItem;
+
+		getStatColumnData(1, &(def.data_[i]),"Pressure",item->data["y"]);
+		getStatColumnData(1, &(def.data_[i]),"avg",item->data["avg"]);
+		getStatColumnData(1, &(def.data_[i]),"rms",item->data["rms"]);
+		getStatColumnData(1, &(def.data_[i]),"number",item->data["num"]);
+		
+		QList<float> minV;
+		QList<float> maxV;
+
+		getStatColumnData(1, &(def.data_[i]),"min",minV); 
+		qSort(minV.begin(),minV.end());
+		
+		getStatColumnData(1, &(def.data_[i]),"max",maxV);
+		qSort(maxV.begin(),maxV.end());
+		
+		item->min=minV.first();
+		item->max=maxV.last();
+
+		items << item;
+	}
+}
+
+void MvQObstatCurveData::loadKeyProfile(MvKeyProfile *prof)
+{
+	//prof->addKey(new MvKey("Index","Index"));	
+	//prof->addKey(new MvKey("Satellite","Satellite"));
+	//prof->addKey(new MvKey("Sensor","Sensor"));
+	//prof->addKey(new MvKey("Area","Area"));
+	//prof->addKey(new MvKey("Level","Level"));
+	//prof->addKey(new MvKey("Flag","Flag"));
+	//prof->addKey(new MvKey("ParX","ParX"));
+	//prof->addKey(new MvKey("ParY","ParY"));
+
+
+	prof->addKey(new MvKey("Type","Type"));
+	prof->addKey(new MvKey("Comment","Comment"));
+	prof->addKey(new MvKey("Param","Param"));
+	prof->addKey(new MvKey("Flags","Flags"));
+	prof->addKey(new MvKey("Area","Area"));
+
+	string str;
+	int i=0;
+	for(map<string,StatDef>::iterator it=data_.begin(); it != data_.end() ; it++)
+	{
+			//qDebug() << QString::fromStdString(it->first);
+
+			StatDef *def=&(it->second); 
+
+			//foreach(MvQCurveItem* item, block->items())
+		//{
+			//prof->key("Index")->addValue(QString::number(i).toStdString());
+		//	prof->key("Area")->addValue(QString::number(item->area()).toStdString());
+		//	prof->key("Level")->addValue(QString::number(item->level()).toStdString());
+		//	prof->key("Flag")->addValue(QString::number(item->flag()).toStdString());
+		//	prof->key("ParX")->addValue(QString::number(item->paramX()).toStdString());
+		//	prof->key("ParY")->addValue(QString::number(item->paramY()).toStdString());
+
+			prof->key("Type")->addValue(def->definitions_["statkind"].at(0));
+			
+			catStringVector(def->definitions_["areaNSEW"],str);	
+			prof->key("Area")->addValue(str);
+
+			catStringVector(def->definitions_["comment"],str);
+			prof->key("Comment")->addValue(str);
+
+			catStringVector(def->definitions_["params"],str);
+			prof->key("Param")->addValue(str);
+
+			catStringVector(def->definitions_["flagfilter"],str);
+			prof->key("Flags")->addValue(str);
+
+//prof->key("Area")->addValue(def->definitions_["areaNSEW"].at(0));
+
+			//prof->key("Comment")->addValue(def->definitions_["comment"].at(0));
+			//prof->key("Param")->addValue(def->definitions_["params"].at(0));
+
+			/*prof->key("Start date")->addValue(block->startDate().toString("yyyy-MM-dd hh:mm ").toStdString());
+			prof->key("End date")->addValue(block->endDate().toString("yyyy-MM-dd hh:mm ").toStdString());
+			prof->key("Satellite")->addValue(QString::number(block->satId()).toStdString());
+			prof->key("Sensor")->addValue(QString::number(block->sensorId()).toStdString());
+			prof->key("Title")->addValue(block->title().toStdString());*/
+		
+		//}
+	}	
+}
+
+
+void MvQObstatCurveData::catStringVector(vector<string> &vec,string &str)
+{
+	str.clear();
+	for(vector<string>::iterator it=vec.begin(); it !=vec.end();it++)
+	{
+		if(it != vec.begin())
+			str+=" ";
+		str+=*it;
+	}
+}
+
+
+void MvQObstatCurveData::getStatColumnData(int statKind, StatItem* item,string colName, QList<float> &vec)
+{
+	if(item->columns_.find(colName) != item->columns_.end())
+	{
+		int colId=item->columns_[colName];
+		for(int row=0; row < item->rows_.size(); row++)
+		{
+			vec << item->rows_[row].at(colId);
+		}
+	}	
+}
diff --git a/src/ObstatCurveTool/MvQObstatCurveData.h b/src/ObstatCurveTool/MvQObstatCurveData.h
new file mode 100644
index 0000000..00146b3
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveData.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQObstatCurveData_H
+#define MvQObstatCurveData_H
+
+#include <vector>
+
+#include <QDateTime>
+#include <QStringList>
+
+#include "ObsStatDecoder.h"
+
+using magics::ObsStatDecoder;
+
+class MvKeyProfile;
+class ObsStatDecoder;
+
+using namespace std;
+
+
+class MvQObstatCurveItem
+{
+public:
+	QString name;
+	float min;
+	float max;
+	QMap<QString,QList<float> > data;
+};
+
+
+
+class MvQObstatCurveData : public ObsStatDecoder
+{
+public:
+	MvQObstatCurveData();
+	~MvQObstatCurveData();
+
+	void loadData();
+	void loadKeyProfile(MvKeyProfile*);
+	void setFileName(QString);
+	QString fileName() {return fileName_;}
+	int itemNum() {return itemNum_;}
+	//MvQCurveItem* item(int);
+	void getStatItem(QList<MvQObstatCurveItem*>&);
+
+
+	
+protected:
+	void clearData();
+	void catStringVector(vector<string> &,string &);
+ 	void getStatColumnData(int,StatItem*,string , QList<float> &);
+
+	QString fileName_;
+	int itemNum_;
+	//ObsStatDecoder *decoder_;
+};
+
+
+#endif
diff --git a/src/ObstatCurveTool/MvQObstatCurveTool.cc b/src/ObstatCurveTool/MvQObstatCurveTool.cc
new file mode 100644
index 0000000..10a9448
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveTool.cc
@@ -0,0 +1,218 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QFile>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QSettings>
+#include <QSortFilterProxyModel>
+#include <QSplitter>
+#include <QStackedWidget>
+#include <QString>
+#include <QStringList>
+#include <QToolBar>
+#include <QTextBrowser>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "MvFileInfo.h"
+
+#include "MvQObstatCurveTool.h"
+#include "MvKeyProfile.h"
+
+#include "MvQFileInfoLabel.h"
+#include "MvQObstatCurveToolBase.h"
+//#include "MvQGribKeyDialog.h"
+//#include "MvQGribStdDumpModel.h"
+//#include "MvQGribWmoDumpModel.h"
+#include "MvQKeyManager.h"
+#include "MvQKeyProfileModel.h"
+#include "MvQLogBrowser.h"
+//#include "MvQSearchLineBase.h"
+#include "MvQTreeView.h"
+
+
+MvQObstatCurveTool::MvQObstatCurveTool(QWidget *parent) : MvQMainWindow(parent)
+{
+	setAttribute(Qt::WA_DeleteOnClose);
+	
+	setWindowTitle("Metview - OBSTAT ScatterPlot Tool");
+
+	QWidget *w;
+	QLabel *label;
+
+	//----------------------
+	// Examiner base
+	//----------------------
+
+	examinerBase_= new MvQObstatCurveToolBase;
+
+	//----------------------
+	// Main splitter
+	//----------------------
+
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+
+        mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+	
+	//-----------------------------------------------------
+	// The main layout (the upper part of mainSplitter)
+	//-----------------------------------------------------
+  
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	//mainLayout->setSpacing(0);
+	w=new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	//------------------
+	// File info label
+	//------------------
+      
+ 	//Add to layout 
+	mainLayout->addWidget(examinerBase_->fileInfoLabel());
+
+	//---------------------
+	// Central splitter
+	//---------------------
+
+	centralSplitter_ = new QSplitter(this); 
+	centralSplitter_->setOpaqueResize(false);	
+	mainLayout->addWidget(centralSplitter_);
+
+	//-------------------------
+	// Populate central splitter
+	//-------------------------
+	
+	centralSplitter_->addWidget(examinerBase_->itemPanel());
+	centralSplitter_->addWidget(examinerBase_->plotPanel());
+			
+	//--------------------------
+	// Log Area
+	//--------------------------
+
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	w=new QWidget;
+	w->setLayout(logLayout);
+	mainSplitter_->addWidget(w);
+
+	//Label
+	label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	logLayout->addWidget(label);
+
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+	
+	//----------------------------
+	//
+	//----------------------------
+
+	setupMenus(examinerBase_->menuItems());
+	
+	//-------------------------
+	//
+	//-------------------------
+	
+	
+
+	readSettings();
+
+	//connect(examinerBase_,SIGNAL(keyProfileLoaded(MvKeyProfile*)),
+	//	this,SLOT(slotLoadKeyProfile(MvKeyProfile*)));
+
+	connect(examinerBase_,SIGNAL(logOutputChanged()),
+		this,SLOT(slotUpdateLogOutput()));
+	
+	connect(examinerBase_,SIGNAL(blockSelected(int)),
+		this,SLOT(slotSelectBlock(int)));
+}
+ 
+MvQObstatCurveTool::~MvQObstatCurveTool()
+{
+	writeSettings();
+}
+
+void MvQObstatCurveTool::init(MvQObstatCurveData *data)
+{	
+	data_=data;
+		
+	examinerBase_->init(data_);
+	//examinerBase_->fileInfoLabel()->setVisible(fileInfoLabelVisibility_);
+}
+
+void MvQObstatCurveTool::slotLoadKeyProfile(MvKeyProfile *prof)
+{		
+	slotUpdateLogOutput();
+}
+
+void MvQObstatCurveTool::slotSelectMessage(int index)
+{	
+	slotUpdateLogOutput();
+}
+
+void MvQObstatCurveTool::slotSelectBlock(int index)
+{	
+	slotUpdateLogOutput();
+}
+
+void MvQObstatCurveTool::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void MvQObstatCurveTool::writeSettings()
+{
+	QSettings settings("ECMWF","MvQObstatCurveTool");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+
+	//settings.setValue("fileInfoLabelVisibility",examinerBase_->fileInfoLabel()->isVisible());
+	//qDebug() << "label: " << examinerBase_->fileInfoLabel()->isVisible();
+
+	settings.endGroup();
+}
+
+void MvQObstatCurveTool::readSettings()
+{
+	QVariant value;
+
+	QSettings settings("ECMWF","MvQObstatCurveTool");
+	
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+
+	//fileInfoLabelVisibility_=settings.value("fileInfoLabelVisibility").toBool();
+	//qDebug() << "label: " << fileInfoLabelVisibility_;
+
+	settings.endGroup();
+}
diff --git a/src/ObstatCurveTool/MvQObstatCurveTool.h b/src/ObstatCurveTool/MvQObstatCurveTool.h
new file mode 100644
index 0000000..9944234
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveTool.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQObstatCurveTool_H
+#define MvQObstatCurveTool_H
+
+#include "MvQMainWindow.h"
+#include "MvQObstatCurveData.h"
+
+class QSplitter;
+class QTextBrowser;
+
+class MvKeyProfile;
+
+class MvQObstatCurveToolBase;
+class MvQKeyManager;
+class MvQLogBrowser;
+
+class MvQObstatCurveTool : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+    	MvQObstatCurveTool(QWidget *parent = 0);
+    	~MvQObstatCurveTool();
+    	void init(MvQObstatCurveData*);
+
+public slots:
+	void slotSelectMessage(int);
+	void slotSelectBlock(int);
+	void slotLoadKeyProfile(MvKeyProfile *);
+	void slotUpdateLogOutput();
+
+	
+	
+private:
+	void readSettings();
+	void writeSettings();
+
+	QSplitter*   centralSplitter_;
+	QSplitter*   mainSplitter_;
+
+	MvQObstatCurveData* data_;
+	//MvQKeyManager *keyManager_;
+
+	MvQObstatCurveToolBase* examinerBase_;
+	MvQLogBrowser* logBrowser_;
+
+	QString lastKeyProfileName_;
+};
+
+#endif
diff --git a/src/ObstatCurveTool/MvQObstatCurveTool.moc.cpp b/src/ObstatCurveTool/MvQObstatCurveTool.moc.cpp
new file mode 100644
index 0000000..9bb046e
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveTool.moc.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+** Meta object code from reading C++ file 'MvQObstatCurveTool.h'
+**
+** Created:
+**      by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include "MvQObstatCurveTool.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'MvQObstatCurveTool.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 62
+#error "This file was generated using the moc from 4.6.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_MvQObstatCurveTool[] = {
+
+ // content:
+       4,       // revision
+       0,       // classname
+       0,    0, // classinfo
+       4,   14, // methods
+       0,    0, // properties
+       0,    0, // enums/sets
+       0,    0, // constructors
+       0,       // flags
+       0,       // signalCount
+
+ // slots: signature, parameters, type, tag, flags
+      20,   19,   19,   19, 0x0a,
+      43,   19,   19,   19, 0x0a,
+      64,   19,   19,   19, 0x0a,
+      98,   19,   19,   19, 0x0a,
+
+       0        // eod
+};
+
+static const char qt_meta_stringdata_MvQObstatCurveTool[] = {
+    "MvQObstatCurveTool\0\0slotSelectMessage(int)\0"
+    "slotSelectBlock(int)\0"
+    "slotLoadKeyProfile(MvKeyProfile*)\0"
+    "slotUpdateLogOutput()\0"
+};
+
+const QMetaObject MvQObstatCurveTool::staticMetaObject = {
+    { &MvQMainWindow::staticMetaObject, qt_meta_stringdata_MvQObstatCurveTool,
+      qt_meta_data_MvQObstatCurveTool, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &MvQObstatCurveTool::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *MvQObstatCurveTool::metaObject() const
+{
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *MvQObstatCurveTool::qt_metacast(const char *_clname)
+{
+    if (!_clname) return 0;
+    if (!strcmp(_clname, qt_meta_stringdata_MvQObstatCurveTool))
+        return static_cast<void*>(const_cast< MvQObstatCurveTool*>(this));
+    return MvQMainWindow::qt_metacast(_clname);
+}
+
+int MvQObstatCurveTool::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+    _id = MvQMainWindow::qt_metacall(_c, _id, _a);
+    if (_id < 0)
+        return _id;
+    if (_c == QMetaObject::InvokeMetaMethod) {
+        switch (_id) {
+        case 0: slotSelectMessage((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 1: slotSelectBlock((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 2: slotLoadKeyProfile((*reinterpret_cast< MvKeyProfile*(*)>(_a[1]))); break;
+        case 3: slotUpdateLogOutput(); break;
+        default: ;
+        }
+        _id -= 4;
+    }
+    return _id;
+}
+QT_END_MOC_NAMESPACE
diff --git a/src/ObstatCurveTool/MvQObstatCurveToolBase.cc b/src/ObstatCurveTool/MvQObstatCurveToolBase.cc
new file mode 100644
index 0000000..aa4e967
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveToolBase.cc
@@ -0,0 +1,501 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QColor>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QFile>
+#include <QHBoxLayout>
+#include <QHeaderView>
+#include <QInputDialog>
+#include <QListWidget>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QScrollArea>
+#include <QSettings>
+#include <QSortFilterProxyModel>
+#include <QSplitter>
+#include <QStackedWidget>
+#include <QString>
+#include <QStringList>
+#include <QToolBar>
+#include <QTextBrowser>
+#include <QTreeView>
+#include <QTreeWidget>
+#include <QVBoxLayout>
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "MvFileInfo.h"
+
+#include "MvQObstatCurveToolBase.h"
+#include "MvKeyProfile.h"
+
+#include "MvQFileInfoLabel.h"
+#include "MvQKeyManager.h"
+#include "MvQKeyProfileModel.h"
+//#include "MvQPlotWidget.h"
+#include "MvQTreeView.h"
+
+#include "mars.h"
+
+MvQObstatCurveToolBase::MvQObstatCurveToolBase(QWidget *)
+{
+	//File info label        
+	fileInfoLabel_=new MvQFileInfoLabel;
+
+	//Set up grib message group box
+	setupItemBox();
+	
+	//Set up grib dump group box
+	setupPlotBox();
+
+	//----------------------
+	// Init
+	//----------------------
+
+	currentItemNo_=-1;
+
+	//----------------------------
+	// 
+	//----------------------------
+
+	setupViewActions();
+	setupSettingsActions();
+
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	//Message list selection	
+	connect(itemTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectItem(QModelIndex)));
+
+	connect(itemTree_,SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotSelectItem(QModelIndex)));
+
+
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		qDebug() << "MvQObstatCurveToolBase::MvQObstatCurveToolBase() --> No METVIEW_BIN found!";
+			//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+			//setError(13,"Environment variable METVIEW_USER_DIRECTORY is not defined!");	
+		return;	
+	}
+
+	magmlScript_=QString(mvbin);
+	magmlScript_+="/ObstatCurveKind1.magml";
+	
+}
+ 
+MvQObstatCurveToolBase::~MvQObstatCurveToolBase()
+{	
+	if(itemModel_) delete itemModel_;	
+}
+
+void MvQObstatCurveToolBase::setupItemBox()
+{
+	QWidget *w;
+	QLabel *label;
+	QVBoxLayout *vb;
+
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	itemPanel_=new QWidget;
+	QVBoxLayout *itemLayout = new QVBoxLayout;
+	itemLayout->setContentsMargins(0,0,0,0);
+	itemPanel_->setLayout(itemLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+	
+
+	//Label
+	label=new QLabel(tr("Items"));
+	label->setFrameShape(QFrame::StyledPanel);
+	label->setProperty("mvStyle","panel");
+	itemLayout->addWidget(label);
+
+	//Message tree
+	itemModel_= new MvQKeyProfileModel;
+	itemSortModel_= new QSortFilterProxyModel;
+        itemSortModel_->setSourceModel(itemModel_);
+	itemSortModel_->setDynamicSortFilter(true);
+	itemSortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	itemSortModel_->setFilterFixedString("1");
+	itemSortModel_->setFilterKeyColumn(0);
+
+
+	itemTree_=new MvQTreeView;
+	itemTree_->setObjectName("itemTree");
+	itemTree_->setProperty("mvStyle",0);
+	itemTree_->setSortingEnabled(true); 
+	itemTree_->sortByColumn (0,Qt::AscendingOrder); 
+	itemTree_->setAlternatingRowColors(true);
+        itemTree_->setAllColumnsShowFocus(true);
+	itemTree_->setModel(itemSortModel_);	
+	//messageTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	itemTree_->setActvatedByKeyNavigation(true);
+	itemTree_->setAcceptDrops(true);
+	itemTree_->setDragDropMode(QAbstractItemView::DropOnly);
+	itemTree_->setRootIsDecorated(false);
+
+	//Set header
+	QHeaderView *header=itemTree_->header();
+	header->setContextMenuPolicy(Qt::CustomContextMenu);
+
+	itemLayout->addWidget(itemTree_);	
+}
+
+void MvQObstatCurveToolBase::setupPlotBox()
+{
+//	QWidget *w;
+	QLabel *label;
+
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	plotPanel_=new QWidget;
+	QVBoxLayout *plotLayout = new QVBoxLayout;
+	plotLayout->setContentsMargins(0,0,0,0);
+	plotPanel_->setLayout(plotLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	//Label
+	label=new QLabel(tr("Plot"));
+	label->setFrameShape(QFrame::StyledPanel);
+	label->setProperty("mvStyle","panel");
+	plotLayout->addWidget(label);
+
+
+	QScrollArea *area=new QScrollArea;
+	
+	//plot area
+	plotWidget_= new QLabel;
+	plotWidget_->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+     	plotWidget_->setScaledContents(true);
+
+	//plotWidget_->setMinimumSize(800,700);
+	//plotWidget_->setSize(800,600);
+	//plotLayout->addWidget(plotWidget_);
+
+	area->setWidget(plotWidget_);
+	plotLayout->addWidget(area);
+	
+}
+
+void MvQObstatCurveToolBase::setupViewActions()
+{
+	//
+	QAction* actionFileInfo = new QAction(this);
+        actionFileInfo->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo->setText(tr("File info"));
+	actionFileInfo->setCheckable(true);
+	actionFileInfo->setChecked(true);
+	actionFileInfo->setToolTip(tr("Show/hide file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examinerBase/fileInfo.png")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo->setIcon(icon);	
+	
+	//Define routines
+	connect(actionFileInfo,SIGNAL(triggered(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo));	
+}
+
+void MvQObstatCurveToolBase::setupSettingsActions()
+{
+	//
+	QAction* actionKeyManager = new QAction(this);
+        actionKeyManager->setObjectName(QString::fromUtf8("actionKeyManager"));
+	actionKeyManager->setText(tr("Key manager"));
+	actionKeyManager->setToolTip(tr("Key profile manager"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examinerBase/keyManager.png")), QIcon::Normal, QIcon::Off);
+ 	actionKeyManager->setIcon(icon);
+	actionKeyManager->setToolTip(tr("Key manager"));
+  
+	//Key profile management
+	connect(actionKeyManager, SIGNAL(triggered()), 
+		this, SLOT(slotManageKeyProfiles()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::SettingsMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionKeyManager));	
+}
+
+
+void MvQObstatCurveToolBase::init(MvQObstatCurveData *data)
+{	
+	data_=data;
+	
+	//----------------------------------
+	// Initilaize the key profile list
+	//---------------------------------
+	
+	MvKeyProfile *prof=new MvKeyProfile("Metview default");
+	loadKeyProfile(prof);
+
+	//disconnect(keyCombo_,SIGNAL(currentIndexChanged(int)),this,SLOT(loadKeyProfile(int)));
+	
+	//Set tree focus
+	//ssageTree_->setFocus(Qt::OtherFocusReason);
+	
+	//Fileinfo label
+	updateFileInfoLabel();
+}
+
+
+void MvQObstatCurveToolBase::loadKeyProfile(MvKeyProfile *prof)
+{	
+	//Get the current profile from the model (this will be the previous)
+	MvKeyProfile* prevProfile = itemModel_->keyProfile();
+
+	//Update grib metadata with the new key profile
+	data_->loadKeyProfile(prof);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	itemModel_->setKeyProfile(prof);
+
+	for(int i=0;i < itemModel_->columnCount()-1; i++)
+	{ 
+		itemTree_->resizeColumnToContents(i);
+	}
+
+	itemTree_->setCurrentIndex(itemSortModel_->index(0,0));
+	slotSelectItem(itemTree_->currentIndex());
+
+	//Clear the previous provile
+	if(prevProfile != 0 && prof  != prevProfile)
+		prevProfile->clearKeyData();	
+
+	/*
+	//Get the current profile from the model (this will be the previous)
+	MvKeyProfile* prevProfile = messageModel_->keyProfile();
+
+	//Update grib metadata with the new key profile
+	data_->loadKeyProfile(prof);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	messageModel_->setKeyProfile(prof);
+
+	for(int i=0;i < messageModel_->columnCount()-1; i++)
+	{ 
+		messageTree_->resizeColumnToContents(i);
+	}
+
+	messageTree_->setCurrentIndex(messageSortModel_->index(0,0));
+	slotSelectMessage(messageTree_->currentIndex());
+
+	//Clear the previous provile
+	if(prevProfile != 0 && prof  != prevProfile)
+		prevProfile->clearKeyData();
+	*/	
+}
+
+void MvQObstatCurveToolBase::slotSelectItem(QModelIndex index)
+{	
+	int cnt=itemSortModel_->mapToSource(index).row(); 
+
+	string fdump;
+
+	qDebug() << "slotSelectItem" << currentItemNo_ << cnt ;
+
+	if(currentItemNo_ == cnt)
+	{
+		return;
+	}
+
+	currentItemNo_=cnt;
+
+createPlot();
+
+	//Override cursor
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	//Generate and read grib dumps
+	//createPlot();
+
+	//emit itemSelected(currentItemNo_);
+
+	//loadItems(currentItemNo_);
+
+	//Preview plot
+	//createPlot();
+
+	//Log
+	//updateLogOutput();
+
+	//Restore cursor
+	QApplication::restoreOverrideCursor();
+}
+
+void MvQObstatCurveToolBase::updateFileInfoLabel()
+{
+	fileInfoLabel_->setObstatScatterTextLabel(data_->fileName(),data_->itemNum());
+}
+
+
+void MvQObstatCurveToolBase::createPlot()
+{	
+	//currentItemNo_
+
+	string itemId="1";
+
+	QList<MvQObstatCurveItem*> items;
+
+	data_->getStatItem(items);
+
+	QVector<float> meanX,meanY;
+	QStringList tmpStr,tmpStr1;
+
+	
+	QString yStr,yLabelStr;
+	QStringList rmsStr,avgStr;
+	float  yMin, yMax;
+	float avgMin=999999, avgMax=-999999;
+	float rmsMin=999999, rmsMax=-999999;
+
+	foreach(MvQObstatCurveItem* item, items)
+	{		
+		tmpStr.clear();
+		int yPos=0;
+		foreach(float v,item->data["y"])
+		{
+			tmpStr << QString::number(v);
+			tmpStr1 << QString::number(yPos);
+			yPos++;
+		}
+		yLabelStr=tmpStr.join("/");
+		yStr=tmpStr1.join("/");
+
+		yMin=0;
+		yMax=yPos-1;
+	
+		tmpStr.clear();
+		foreach(float v,item->data["rms"])
+		{
+			tmpStr << QString::number(v);
+			if(rmsMin > v)
+				rmsMin=v;
+			if(rmsMax< v)
+				rmsMax=v;
+
+		}
+		qDebug() << "minmax:" << rmsMin << rmsMax;
+
+		rmsStr << tmpStr.join("/");
+		
+
+		tmpStr.clear();
+		foreach(float v,item->data["avg"])
+		{
+			tmpStr << QString::number(v);
+			if(avgMin > v)
+				avgMin=v;
+			if(avgMax< v)
+				avgMax=v;
+		}
+		avgStr << tmpStr.join("/");
+	}
+
+	QString paramX, paramY;
+	float  startX, endX, startY, endY;
+
+
+	/*if(swapAxes_ == false)
+	{		
+		paramX=item->titleX();
+		paramY=item->titleY();
+		startX=item->startX();
+		endX=item->endX();
+		startY=item->startY();
+		endY=item->endY();
+
+	}
+	else
+	{
+		paramX=item->titleY();
+		paramY=item->titleX();
+		startX=item->startY();
+		endX=item->endY();
+		startY=item->startX();
+		endY=item->endX();
+	}*/
+
+	QString resFile=QString::fromStdString(marstmp());
+
+	QString cmd="/var/tmp/cgr/PERFORCE/metview_4/bin/magmlx " + magmlScript_ +
+	" -blockTitle=\"" + "" + "\"" +
+	" -startDate=" + "" +
+	" -endDate=" + "" +
+	" -area=" + "" +
+	" -flag=" + "" +
+	" -x_param=\"" + paramX.simplified() + "\"" +
+	" -y_param=\"" + paramY.simplified() + "\"" +
+	" -start_x=" +  QString::number(rmsMin)+
+	" -end_x=" + QString::number(rmsMax) +
+	" -start_y=" + QString::number(yMin) +
+	" -end_y=" + QString::number(yMax) +
+	" -y_label=" + yLabelStr +
+	" -p1c1_x_lst=" + rmsStr[0] +
+	" -p1c1_y_lst=" + yStr +
+	" -p1c2_x_lst=" + rmsStr[1] +
+	" -p1c2_y_lst=" + yStr +
+	" -x_min=" + QString::number(items[0]->min) +
+	" -x_max=" + QString::number(items[0]->max) +
+	" -y_min=" + "100" +
+	" -y_max=" + "1000" +
+	" -source_num=" + "" +
+	" -source_num=" + "" +
+ 	" -path=" + resFile;
+
+	qDebug()  << cmd;
+	
+	system(cmd.toStdString().c_str());
+
+	QString resFileWithSuffix=resFile + ".png";
+
+	QPixmap pixmap(resFileWithSuffix,"PNG");
+ 	plotWidget_->setPixmap(pixmap);
+	plotWidget_->adjustSize();
+
+	QFile fRes(resFile);
+	if(!fRes.remove())
+	{
+		qDebug() << "MvQObstatScatterToolBase::createPlot() ---> Res file" << resFile << "could not be deleted!";
+	}
+
+	QFile fResSuffix(resFileWithSuffix);
+	if(!fResSuffix.remove())
+	{
+		qDebug() << "MvQObstatScatterToolBase::createPlot() ---> Res file" << resFileWithSuffix << "could not be deleted!";
+	}
+
+}
diff --git a/src/ObstatCurveTool/MvQObstatCurveToolBase.h b/src/ObstatCurveTool/MvQObstatCurveToolBase.h
new file mode 100644
index 0000000..0ba8b96
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveToolBase.h
@@ -0,0 +1,97 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQObstatCurveToolBase_H
+#define MvQObstatCurveToolBase_H
+
+#include <QComboBox>
+#include <QMainWindow>
+#include <QStandardItemModel>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+#include "MvQObstatCurveData.h"
+
+class QColor;
+class QGroupBox;
+class QLabel;
+class QListWidget;
+class QListWidgetItem;
+class QPushButton;
+class QSortFilterProxyModel;
+class QSplitter;
+class QStackedWidget;
+class QTextBrowser;
+class QTreeView;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QVBoxLayout;
+
+class MvKeyProfile;
+
+class MvQFileInfoLabel;
+class MvQKeyManager;
+class MvQKeyProfileModel;
+class MvQPlotWidget;
+class MvQTreeView;
+
+class MvQObstatCurveToolBase : public QObject
+{
+    Q_OBJECT
+
+public:
+    	MvQObstatCurveToolBase(QWidget *parent = 0);
+    	~MvQObstatCurveToolBase();
+    	void init(MvQObstatCurveData*);
+
+	MvQFileInfoLabel* fileInfoLabel() {return fileInfoLabel_;}
+	QWidget* itemPanel() {return itemPanel_;}
+	QWidget* plotPanel() {return plotPanel_;}
+	
+	void updateFileInfoLabel();
+	const MvQMainWindow::MenuItemMap menuItems () {return menuItems_;}
+
+public slots:
+	void slotSelectItem(QModelIndex);
+	
+signals:
+	void logOutputChanged();
+	void itemSelected(int);
+	
+private:	
+	void setupViewActions();
+	void setupSettingsActions();
+	void setupItemBox();
+	void setupPlotBox();
+ 
+	void loadKeyProfile(MvKeyProfile *);
+
+	void loadItems(int);
+	void createPlot();
+	
+	MvQObstatCurveData *data_;
+ 	int currentItemNo_;
+
+	MvQMainWindow::MenuItemMap menuItems_;
+
+	MvQFileInfoLabel*  fileInfoLabel_;
+
+	QWidget*     plotPanel_;
+	QWidget*     itemPanel_;
+
+	MvQTreeView*   itemTree_;
+	MvQKeyProfileModel* itemModel_;
+	QSortFilterProxyModel* itemSortModel_;
+
+	QLabel *plotWidget_;
+
+	QString magmlScript_;
+};
+
+#endif
diff --git a/src/ObstatCurveTool/MvQObstatCurveToolBase.moc.cpp b/src/ObstatCurveTool/MvQObstatCurveToolBase.moc.cpp
new file mode 100644
index 0000000..a186942
--- /dev/null
+++ b/src/ObstatCurveTool/MvQObstatCurveToolBase.moc.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+** Meta object code from reading C++ file 'MvQObstatCurveToolBase.h'
+**
+** Created:
+**      by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include "MvQObstatCurveToolBase.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'MvQObstatCurveToolBase.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 62
+#error "This file was generated using the moc from 4.6.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_MvQObstatCurveToolBase[] = {
+
+ // content:
+       4,       // revision
+       0,       // classname
+       0,    0, // classinfo
+       3,   14, // methods
+       0,    0, // properties
+       0,    0, // enums/sets
+       0,    0, // constructors
+       0,       // flags
+       2,       // signalCount
+
+ // signals: signature, parameters, type, tag, flags
+      24,   23,   23,   23, 0x05,
+      43,   23,   23,   23, 0x05,
+
+ // slots: signature, parameters, type, tag, flags
+      61,   23,   23,   23, 0x0a,
+
+       0        // eod
+};
+
+static const char qt_meta_stringdata_MvQObstatCurveToolBase[] = {
+    "MvQObstatCurveToolBase\0\0logOutputChanged()\0"
+    "itemSelected(int)\0slotSelectItem(QModelIndex)\0"
+};
+
+const QMetaObject MvQObstatCurveToolBase::staticMetaObject = {
+    { &QObject::staticMetaObject, qt_meta_stringdata_MvQObstatCurveToolBase,
+      qt_meta_data_MvQObstatCurveToolBase, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &MvQObstatCurveToolBase::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *MvQObstatCurveToolBase::metaObject() const
+{
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *MvQObstatCurveToolBase::qt_metacast(const char *_clname)
+{
+    if (!_clname) return 0;
+    if (!strcmp(_clname, qt_meta_stringdata_MvQObstatCurveToolBase))
+        return static_cast<void*>(const_cast< MvQObstatCurveToolBase*>(this));
+    return QObject::qt_metacast(_clname);
+}
+
+int MvQObstatCurveToolBase::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+    _id = QObject::qt_metacall(_c, _id, _a);
+    if (_id < 0)
+        return _id;
+    if (_c == QMetaObject::InvokeMetaMethod) {
+        switch (_id) {
+        case 0: logOutputChanged(); break;
+        case 1: itemSelected((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 2: slotSelectItem((*reinterpret_cast< QModelIndex(*)>(_a[1]))); break;
+        default: ;
+        }
+        _id -= 3;
+    }
+    return _id;
+}
+
+// SIGNAL 0
+void MvQObstatCurveToolBase::logOutputChanged()
+{
+    QMetaObject::activate(this, &staticMetaObject, 0, 0);
+}
+
+// SIGNAL 1
+void MvQObstatCurveToolBase::itemSelected(int _t1)
+{
+    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+    QMetaObject::activate(this, &staticMetaObject, 1, _a);
+}
+QT_END_MOC_NAMESPACE
diff --git a/src/ObstatCurveTool/OBSTAT_CURVE.xpm b/src/ObstatCurveTool/OBSTAT_CURVE.xpm
new file mode 100644
index 0000000..7ea6eda
--- /dev/null
+++ b/src/ObstatCurveTool/OBSTAT_CURVE.xpm
@@ -0,0 +1,499 @@
+/* XPM */
+static char * OBSTAT_CURVE_xpm[] = {
+"32 32 464 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #CFCFCF",
+"@ 	c #AFAFAF",
+"# 	c #B0B0B0",
+"$ 	c #DEDEDE",
+"% 	c #DBDBDB",
+"& 	c #303435",
+"* 	c #1F2629",
+"= 	c #3E4D52",
+"- 	c #445154",
+"; 	c #465255",
+"> 	c #4B5357",
+", 	c #4E5458",
+"' 	c #505758",
+") 	c #545859",
+"! 	c #565A5B",
+"~ 	c #575A5B",
+"{ 	c #565A5A",
+"] 	c #535758",
+"^ 	c #515457",
+"/ 	c #515656",
+"( 	c #505355",
+"_ 	c #4D5253",
+": 	c #4C5252",
+"< 	c #4C5253",
+"[ 	c #4A5152",
+"} 	c #4A4F51",
+"| 	c #494F52",
+"1 	c #474F50",
+"2 	c #474E4F",
+"3 	c #181B1B",
+"4 	c #4B4D4D",
+"5 	c #F5F5F5",
+"6 	c #5C6060",
+"7 	c #466571",
+"8 	c #8CC2D5",
+"9 	c #99C8D9",
+"0 	c #A3CEDB",
+"a 	c #AFD2DF",
+"b 	c #B9D8E3",
+"c 	c #C4DEE6",
+"d 	c #CEE2E9",
+"e 	c #D8E7ED",
+"f 	c #E2ECF1",
+"g 	c #EAF2F3",
+"h 	c #E6EEF0",
+"i 	c #E0EAEC",
+"j 	c #DAE7E8",
+"k 	c #D6E3E5",
+"l 	c #D2E0E4",
+"m 	c #CEDDE1",
+"n 	c #CADADF",
+"o 	c #C7D7DC",
+"p 	c #C3D5DA",
+"q 	c #BED2D8",
+"r 	c #BDD1D5",
+"s 	c #B9D0D4",
+"t 	c #B8CDD3",
+"u 	c #B4CCD0",
+"v 	c #B1C9CE",
+"w 	c #434B4B",
+"x 	c #9B9B9B",
+"y 	c #0C0E0F",
+"z 	c #77B1C5",
+"A 	c #89C0D3",
+"B 	c #94C6D7",
+"C 	c #A0CCDB",
+"D 	c #AAD1DD",
+"E 	c #B6D6E2",
+"F 	c #C0DCE5",
+"G 	c #CCE1E8",
+"H 	c #D5E6EC",
+"I 	c #DEEBEF",
+"J 	c #E7F0F2",
+"K 	c #E6F0F0",
+"L 	c #E2ECED",
+"M 	c #DDE7EB",
+"N 	c #D7E4E8",
+"O 	c #D3E1E4",
+"P 	c #CFDEE2",
+"Q 	c #CBDBDF",
+"R 	c #C8D8DC",
+"S 	c #C4D6DB",
+"T 	c #C0D3D9",
+"U 	c #BDD2D7",
+"V 	c #BBCFD3",
+"W 	c #B8CDD2",
+"X 	c #B5CDD0",
+"Y 	c #B3CCD0",
+"Z 	c #8C9EA3",
+"` 	c #3D4040",
+" .	c #0A0C0D",
+"..	c #79B8CE",
+"+.	c #85BDD2",
+"@.	c #91C4D6",
+"#.	c #9DCADA",
+"$.	c #A9D0DC",
+"%.	c #B3D5E1",
+"&.	c #BEDBE5",
+"*.	c #C8DFE7",
+"=.	c #D2E5EB",
+"-.	c #DBEAEE",
+";.	c #E5EFF1",
+">.	c #C3D3DA",
+",.	c #B8CED2",
+"'.	c #B4CAD1",
+").	c #B0C7CE",
+"!.	c #B9CDD2",
+"~.	c #D1DFE3",
+"{.	c #CDDCDF",
+"].	c #C8D9DE",
+"^.	c #C4D7DA",
+"/.	c #C2D5D8",
+"(.	c #BFD2D6",
+"_.	c #BBD1D5",
+":.	c #B9CFD4",
+"<.	c #B7CCD2",
+"[.	c #B4CBD0",
+"}.	c #9CB1B6",
+"|.	c #323333",
+"1.	c #75B6CD",
+"2.	c #82BCD1",
+"3.	c #8DC2D5",
+"4.	c #9AC8D9",
+"5.	c #A4CEDB",
+"6.	c #B0D3E0",
+"7.	c #BBD8E3",
+"8.	c #C5DFE7",
+"9.	c #CFE2EB",
+"0.	c #D9E9ED",
+"a.	c #E2EEF1",
+"b.	c #26617B",
+"c.	c #5795A1",
+"d.	c #5694A0",
+"e.	c #5794A2",
+"f.	c #396E87",
+"g.	c #CEDDDF",
+"h.	c #CADADD",
+"i.	c #C5D7DC",
+"j.	c #C3D4DA",
+"k.	c #B8CED1",
+"l.	c #B4CBD1",
+"m.	c #9DB1B6",
+"n.	c #090C0D",
+"o.	c #71B4CB",
+"p.	c #7DBAD0",
+"q.	c #8AC0D4",
+"r.	c #96C6D6",
+"s.	c #A1CCDB",
+"t.	c #ACD2DF",
+"u.	c #B7D7E2",
+"v.	c #C1DDE6",
+"w.	c #CCE1E9",
+"x.	c #DFEBEF",
+"y.	c #377087",
+"z.	c #A3E5E0",
+"A.	c #366F86",
+"B.	c #C2D6DB",
+"C.	c #C0D3D7",
+"D.	c #BDD2D6",
+"E.	c #9DB1B5",
+"F.	c #6EB2C9",
+"G.	c #7BB8CE",
+"H.	c #86BED3",
+"I.	c #93C5D5",
+"J.	c #A9D0DD",
+"K.	c #B4D5E1",
+"L.	c #BFDAE5",
+"M.	c #C8E0E7",
+"N.	c #D3E6EA",
+"O.	c #2F6880",
+"P.	c #9EBAC3",
+"Q.	c #9BB8C2",
+"R.	c #99B5BF",
+"S.	c #A5C0C7",
+"T.	c #BFD1D6",
+"U.	c #B9CFD3",
+"V.	c #B5CCD2",
+"W.	c #9EB2B5",
+"X.	c #6AAFC9",
+"Y.	c #77B6CD",
+"Z.	c #82BCD2",
+"`.	c #8FC3D5",
+" +	c #9AC9D9",
+".+	c #A6CEDC",
+"++	c #B1D3E0",
+"@+	c #BBD9E4",
+"#+	c #C6DFE7",
+"$+	c #CFE4EB",
+"%+	c #D9E9EE",
+"&+	c #145671",
+"*+	c #438996",
+"=+	c #428996",
+"-+	c #428895",
+";+	c #377086",
+">+	c #C5D8DB",
+",+	c #C1D6D9",
+"'+	c #BED3D7",
+")+	c #BBD2D4",
+"!+	c #B9CED3",
+"~+	c #9FB2B7",
+"{+	c #313232",
+"]+	c #66AEC8",
+"^+	c #73B3CC",
+"/+	c #7FBAD0",
+"(+	c #8CC1D4",
+"_+	c #97C7D8",
+":+	c #A3CDDB",
+"<+	c #AED2DF",
+"[+	c #B9D7E3",
+"}+	c #C2DDE6",
+"|+	c #CDE1E9",
+"1+	c #D6E7ED",
+"2+	c #347087",
+"3+	c #175872",
+"4+	c #77C5C3",
+"5+	c #376F85",
+"6+	c #C6D7DC",
+"7+	c #C2D6D9",
+"8+	c #BDD0D6",
+"9+	c #9FB3B7",
+"0+	c #63ACC7",
+"a+	c #6FB3CB",
+"b+	c #7CB9CE",
+"c+	c #88BFD3",
+"d+	c #94C5D7",
+"e+	c #9ECBDA",
+"f+	c #A9D1DD",
+"g+	c #C9E0E8",
+"h+	c #D4E6EA",
+"i+	c #175873",
+"j+	c #386F85",
+"k+	c #C7D8DD",
+"l+	c #C1D5D8",
+"m+	c #BBD0D5",
+"n+	c #5EAAC5",
+"o+	c #6AB0C9",
+"p+	c #90C3D5",
+"q+	c #A3CCD9",
+"r+	c #356D86",
+"s+	c #376F87",
+"t+	c #396F87",
+"u+	c #3B7189",
+"v+	c #215F79",
+"w+	c #376F86",
+"x+	c #C1D5D9",
+"y+	c #BBD0D4",
+"z+	c #B8CED3",
+"A+	c #A0B3B6",
+"B+	c #080B0C",
+"C+	c #5AA8C4",
+"D+	c #67AEC8",
+"E+	c #73B5CC",
+"F+	c #80BBD0",
+"G+	c #9FC8D8",
+"H+	c #377085",
+"I+	c #9AC3C1",
+"J+	c #1A5974",
+"K+	c #185873",
+"L+	c #386F87",
+"M+	c #C7D9DC",
+"N+	c #C0D2D8",
+"O+	c #A0B4B8",
+"P+	c #56A5C4",
+"Q+	c #7CB9CF",
+"R+	c #88C0D3",
+"S+	c #9BC6D7",
+"T+	c #377084",
+"U+	c #387087",
+"V+	c #CCDCDE",
+"W+	c #C7D8DB",
+"X+	c #BDD3D7",
+"Y+	c #BBCFD4",
+"Z+	c #A0B4B7",
+"`+	c #313234",
+" @	c #52A4C2",
+".@	c #5FABC5",
+"+@	c #6CB1C9",
+"@@	c #78B6CD",
+"#@	c #90C4D6",
+"$@	c #98C5D6",
+"%@	c #366F84",
+"&@	c #387085",
+"*@	c #A2B4B9",
+"=@	c #080A0C",
+"-@	c #4EA2C0",
+";@	c #5BA8C4",
+">@	c #68AEC9",
+",@	c #74B5CC",
+"'@	c #81BBD1",
+")@	c #94C3D5",
+"!@	c #387086",
+"~@	c #A3B6B9",
+"{@	c #313434",
+"]@	c #4A9FBF",
+"^@	c #57A6C4",
+"/@	c #5FA6C2",
+"(@	c #33778C",
+"_@	c #418594",
+":@	c #448795",
+"<@	c #478894",
+"[@	c #2F6A80",
+"}@	c #12556B",
+"|@	c #33717D",
+"1@	c #32717C",
+"2@	c #32707C",
+"3@	c #225F75",
+"4@	c #A3B5B8",
+"5@	c #070A0B",
+"6@	c #469DBD",
+"7@	c #53A4C2",
+"8@	c #56A1BC",
+"9@	c #468E90",
+"0@	c #78C8AE",
+"a@	c #74C4AC",
+"b@	c #2C687E",
+"c@	c #1D6270",
+"d@	c #7ED795",
+"e@	c #2B6B78",
+"f@	c #A3B7BA",
+"g@	c #419BBC",
+"h@	c #4FA2C1",
+"i@	c #539EBA",
+"j@	c #1E6270",
+"k@	c #2B6B79",
+"l@	c #A3B7BB",
+"m@	c #303232",
+"n@	c #3D99BB",
+"o@	c #4BA0BF",
+"p@	c #4F9CB9",
+"q@	c #2D6B79",
+"r@	c #A4B7BA",
+"s@	c #3997B9",
+"t@	c #469EBD",
+"u@	c #4C9AB8",
+"v@	c #1E6370",
+"w@	c #A7B8BC",
+"x@	c #3494B8",
+"y@	c #439CBC",
+"z@	c #4798B7",
+"A@	c #458E90",
+"B@	c #2C687D",
+"C@	c #2D6C79",
+"D@	c #A6B9BC",
+"E@	c #3093B7",
+"F@	c #3F99BB",
+"G@	c #4497B7",
+"H@	c #2B687D",
+"I@	c #2B6C79",
+"J@	c #A8B8BC",
+"K@	c #2B91B5",
+"L@	c #3A97BA",
+"M@	c #4499B8",
+"N@	c #2B7285",
+"O@	c #398390",
+"P@	c #3D8491",
+"Q@	c #408692",
+"R@	c #195874",
+"S@	c #2B6780",
+"T@	c #2D6781",
+"U@	c #2E6981",
+"V@	c #215D77",
+"W@	c #326E85",
+"X@	c #336E86",
+"Y@	c #367087",
+"Z@	c #1D5C77",
+"`@	c #346D84",
+" #	c #356D85",
+".#	c #346E85",
+"+#	c #216073",
+"@#	c #326E7D",
+"##	c #326C7C",
+"$#	c #306D7C",
+"%#	c #356C80",
+"&#	c #A8B9BD",
+"*#	c #288EB3",
+"=#	c #3796B8",
+"-#	c #449CBE",
+";#	c #52A4C1",
+">#	c #6BB0CA",
+",#	c #84BDD2",
+"'#	c #90C3D6",
+")#	c #A6CFDC",
+"!#	c #B2D4E0",
+"~#	c #C7DFE7",
+"{#	c #D0E4EB",
+"]#	c #DAE9EE",
+"^#	c #E3EEF1",
+"/#	c #EAF0F2",
+"(#	c #E4ECEE",
+"_#	c #E0EAEB",
+":#	c #DAE6E8",
+"<#	c #CDDCE1",
+"[#	c #A9B9BD",
+"}#	c #238CB2",
+"|#	c #3193B7",
+"1#	c #3F9ABB",
+"2#	c #4DA0BF",
+"3#	c #E1ECEF",
+"4#	c #E0EAED",
+"5#	c #DBE7E9",
+"6#	c #D7E4E6",
+"7#	c #CFDEE0",
+"8#	c #A9BABE",
+"9#	c #1E85AC",
+"0#	c #2C91B6",
+"a#	c #3B98BA",
+"b#	c #489FBE",
+"c#	c #A0CBDB",
+"d#	c #CAE1E8",
+"e#	c #D4E6EC",
+"f#	c #DEEBEE",
+"g#	c #E7EFF2",
+"h#	c #E8F0F0",
+"i#	c #D0DEE2",
+"j#	c #9EAEB0",
+"k#	c #3A3B3B",
+"l#	c #495052",
+"m#	c #10536C",
+"n#	c #298EB4",
+"o#	c #449DBE",
+"p#	c #A7CFDC",
+"q#	c #BDD9E4",
+"r#	c #E5EEF1",
+"s#	c #EAF0F1",
+"t#	c #E4ECEF",
+"u#	c #DFE8EB",
+"v#	c #555B5E",
+"w#	c #8D8D8D",
+"x#	c #CDCDCD",
+"y#	c #141A1C",
+"z#	c #19313B",
+"A#	c #1E4857",
+"B#	c #224A59",
+"C#	c #2A4E5A",
+"D#	c #2F505D",
+"E#	c #35545F",
+"F#	c #395560",
+"G#	c #405A63",
+"H#	c #445B63",
+"I#	c #495E66",
+"J#	c #506268",
+"K#	c #546369",
+"L#	c #59666B",
+"M#	c #5C686B",
+"N#	c #616B6E",
+"O#	c #666D70",
+"P#	c #696F70",
+"Q#	c #6E7072",
+"R#	c #6B6F70",
+"S#	c #696E6F",
+"T#	c #676C6D",
+"U#	c #656A6B",
+"V#	c #62696A",
+"W#	c #606869",
+"X#	c #2F3333",
+"Y#	c #2F2F2F",
+"Z#	c #EEEEEE",
+"`#	c #FDFDFD",
+" $	c #B6B6B6",
+".$	c #979797",
+"+$	c #989898",
+"@$	c #C7C7C7",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ # $ . . . ",
+". . % & * = - ; > , ' ) ! ~ { ) ] ^ / ( _ : < [ } | 1 2 3 4 5 . ",
+". . 6 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u v w x . ",
+". . y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ` . ",
+". .  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.. ",
+". .  .1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.l g.h.i.j.q r :.k.l.m.|.. ",
+". . n.o.p.q.r.s.t.u.v.w.H x.y.z.z.z.A.l P Q R B.C.D.V W X E.|.. ",
+". . n.F.G.H.I.#.J.K.L.M.N.-.y.z.z.z.O.P.Q.R.S.^./.T._.U.V.W.|.. ",
+". . n.X.Y.Z.`. +.+++ at +#+$+%+y.z.z.z.&+*+=+-+;+>+,+'+)+!+k.~+{+. ",
+". . n.]+^+/+(+_+:+<+[+}+|+1+2+z.z.z.3+4+4+4+5+6+7+C.8+V t 9+{+. ",
+". . n.0+a+b+c+d+e+f+K.L.g+h+2+z.z.z.i+4+4+4+j+k+^.l+r m+U.9+{+. ",
+". . n.n+o+Y.Z.p+ +q+r+s+t+u+v+z.z.z.i+4+4+4+w+].>+x+'+y+z+A+{+. ",
+". . B+C+D+E+F+(+_+G+H+I+I+I+J+z.z.z.K+4+4+4+L+n M+p N+r y+O+{+. ",
+". . B+P+0+a+Q+R+B S+T+I+I+I+J+z.z.z.K+4+4+4+U+V+W+^.T X+Y+Z+`+. ",
+". . B+ @. at +@@@+.#@$@%@I+I+I+J+z.z.z.K+4+4+4+&@{.].>+x+'+y+*@`+. ",
+". . =@-@;@>@,@'@8 )@%@I+I+I+J+z.z.z.K+4+4+4+!@m n o p q r ~@{@. ",
+". . =@]@^@/@(@_@:@<@[@I+I+I+J+z.z.z.K+4+4+4+}@|@1 at 2@3 at T U 4@{@. ",
+". . 5 at 6@7 at 8@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+c@d at d@d at e@/.(.f@{@. ",
+". . 5 at g@h at i@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+j@d at d@d at k@j.q l at m@. ",
+". . 5 at n@o at p@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+j@d at d@d at q@B.C.r@`+. ",
+". . 5 at s@t at u@9 at 0@0 at a@b at I+I+I+J+z.z.z.K+4+4+4+v@d at d@d at q@^./.w@`+. ",
+". . 5 at x@y at z@A at 0@0 at a@B at I+I+I+J+z.z.z.K+4+4+4+v@d at d@d at C@>+,+D@`+. ",
+". . 5 at E@F at G@A at 0@0 at a@H at I+I+I+J+z.z.z.K+4+4+4+v@d at d@d at I@6+7+J@{@. ",
+". . 5 at K@L at M@N at O@P at Q@R at S@T at U@V at W@X at Y@Z@`@ #.#+#@###$#%#k+^.&#{@. ",
+". . 5@*#=#-#;#n+>#Y.,#'# +)#!#@+~#{#]#^#/#(#_#:#k ~.<#].>+[#{@. ",
+". . 5@}#|#1#2#C+D+E+F+(+_+:+<+b c d 1+3#g h 4#5#6#l 7#n M+8#{@. ",
+". . 5 at 9#0#a#b#P+0+a+Q+R+B c#D E F d#e#f#g#h#L M N O i#V+W+j#k#. ",
+". . l#m#n#=#o# @. at +@@@+.#@#.p#%.q#*.=.-.r#s#t#u#:#k ~.{.].v#w#. ",
+". . x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#. ",
+". . . `# $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$+$@$. . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/src/ObstatCurveTool/ObjectSpec.ObstatCurve b/src/ObstatCurveTool/ObjectSpec.ObstatCurve
new file mode 100644
index 0000000..7b1f05a
--- /dev/null
+++ b/src/ObstatCurveTool/ObjectSpec.ObstatCurve
@@ -0,0 +1,27 @@
+################################################################################
+#
+#	ObjectSpec.ObstatCurve
+#
+
+
+object,
+	class		= OBSTAT_CURVE,
+	check           = False,
+	default_object  = False,
+	type		= File,
+	default_name    = 'OBSTAT CurvePlot',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/OBSTAT_CURVE.icon',
+	editor_type     = NoEditor
+
+
+state,
+	class    = OBSTAT_CURVE,
+	action	 = examine,
+	service  = ObstatCurveTool
+
+service,
+	name	 = 'ObstatCurveTool',
+	maximum	 = 0,
+	timeout  = $timeout, # set in script
+	fullname = OBSTAT Curve Tool,
+	cmd	 = "$metview_command $METVIEW_BIN/ObstatToolWrapper ObstatCurveTool -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss"
diff --git a/src/ObstatScatterTool/Makefile.am b/src/ObstatScatterTool/Makefile.am
new file mode 100644
index 0000000..11bc77e
--- /dev/null
+++ b/src/ObstatScatterTool/Makefile.am
@@ -0,0 +1,51 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+bin_PROGRAMS = bin/ObstatScatterTool
+bin_ObstatScatterTool_SOURCES =  MvMain.cc \
+	MvQObstatScatterTool.cc MvQObstatScatterTool.h MvQObstatScatterTool.moc.cpp \
+	MvQObstatScatterToolBase.cc MvQObstatScatterToolBase.h MvQObstatScatterToolBase.moc.cpp
+
+bin_ObstatScatterTool_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_ObstatScatterTool_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil $(METVIEW_NETCDF_FLAGS)
+bin_ObstatScatterTool_LDFLAGS  = $(QT_LDFLAGS)
+bin_ObstatScatterTool_LDADD    = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB) $(STANDARD_METVIEW_LIBS) $(QT_LIBS)
+bin_ObstatScatterTool_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.ObstatScatter
+	 
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons = $(local_iconsdir)/OBSTAT_SCATTER.xpm
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+EXTRA_DIST = OBSTAT_SCATTER.xpm ObjectSpec.ObstatScatter
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin MvQObstatScatterTool.moc.cpp MvQObstatScatterToolBase.moc.cpp  $(icons)
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/ObstatScatterTool *.o *.moc.cpp *.qrc.cpp
+
+
+
diff --git a/src/ObstatScatterTool/Makefile.in b/src/ObstatScatterTool/Makefile.in
new file mode 100644
index 0000000..38ccbcc
--- /dev/null
+++ b/src/ObstatScatterTool/Makefile.in
@@ -0,0 +1,943 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/ObstatScatterTool$(EXEEXT)
+subdir = src/ObstatScatterTool
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_ObstatScatterTool_OBJECTS =  \
+	bin_ObstatScatterTool-MvMain.$(OBJEXT) \
+	bin_ObstatScatterTool-MvQObstatScatterTool.$(OBJEXT) \
+	bin_ObstatScatterTool-MvQObstatScatterTool.moc.$(OBJEXT) \
+	bin_ObstatScatterTool-MvQObstatScatterToolBase.$(OBJEXT) \
+	bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.$(OBJEXT)
+bin_ObstatScatterTool_OBJECTS = $(am_bin_ObstatScatterTool_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_ObstatScatterTool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) \
+	$(bin_ObstatScatterTool_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_ObstatScatterTool_SOURCES)
+DIST_SOURCES = $(bin_ObstatScatterTool_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_ObstatScatterTool_SOURCES = MvMain.cc \
+	MvQObstatScatterTool.cc MvQObstatScatterTool.h MvQObstatScatterTool.moc.cpp \
+	MvQObstatScatterToolBase.cc MvQObstatScatterToolBase.h MvQObstatScatterToolBase.moc.cpp
+
+bin_ObstatScatterTool_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_ObstatScatterTool_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil $(METVIEW_NETCDF_FLAGS)
+bin_ObstatScatterTool_LDFLAGS = $(QT_LDFLAGS)
+bin_ObstatScatterTool_LDADD = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB) $(STANDARD_METVIEW_LIBS) $(QT_LIBS)
+bin_ObstatScatterTool_DEPENDENCIES = ../../lib/libMvQtGui.a  ../../lib/libMvQtUtil.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.ObstatScatter
+icons = $(local_iconsdir)/OBSTAT_SCATTER.xpm
+EXTRA_DIST = OBSTAT_SCATTER.xpm ObjectSpec.ObstatScatter
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin MvQObstatScatterTool.moc.cpp MvQObstatScatterToolBase.moc.cpp  $(icons)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ObstatScatterTool/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/ObstatScatterTool/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/ObstatScatterTool$(EXEEXT): $(bin_ObstatScatterTool_OBJECTS) $(bin_ObstatScatterTool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/ObstatScatterTool$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_ObstatScatterTool_LINK) $(bin_ObstatScatterTool_OBJECTS) $(bin_ObstatScatterTool_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatScatterTool-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_ObstatScatterTool-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvMain.o -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvMain.Tpo -c -o bin_ObstatScatterTool-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvMain.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_ObstatScatterTool-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_ObstatScatterTool-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvMain.Tpo -c -o bin_ObstatScatterTool-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvMain.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_ObstatScatterTool-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_ObstatScatterTool-MvQObstatScatterTool.o: MvQObstatScatterTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterTool.o -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterTool.o `test -f 'MvQObstatScatterTool.cc' || echo '$(srcdir)/'`MvQObstatScatterTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterTool.cc' object='bin_ObstatScatterTool-MvQObstatScatterTool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterTool.o `test -f 'MvQObstatScatterTool.cc' || echo '$(srcdir)/'`MvQObstatScatterTool.cc
+
+bin_ObstatScatterTool-MvQObstatScatterTool.obj: MvQObstatScatterTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterTool.obj -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterTool.obj `if test -f 'MvQObstatScatterTool.cc'; then $(CYGPATH_W) 'MvQObstatScatterTool.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterTool.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterTool.cc' object='bin_ObstatScatterTool-MvQObstatScatterTool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterTool.obj `if test -f 'MvQObstatScatterTool.cc'; then $(CYGPATH_W) 'MvQObstatScatterTool.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterTool.cc'; fi`
+
+bin_ObstatScatterTool-MvQObstatScatterTool.moc.o: MvQObstatScatterTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterTool.moc.o -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterTool.moc.o `test -f 'MvQObstatScatterTool.moc.cpp' || echo '$(srcdir)/'`MvQObstatScatterTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterTool.moc.cpp' object='bin_ObstatScatterTool-MvQObstatScatterTool.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterTool.moc.o `test -f 'MvQObstatScatterTool.moc.cpp' || echo '$(srcdir)/'`MvQObstatScatterTool.moc.cpp
+
+bin_ObstatScatterTool-MvQObstatScatterTool.moc.obj: MvQObstatScatterTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterTool.moc.obj -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterTool.moc.obj `if test -f 'MvQObstatScatterTool.moc.cpp'; then $(CYGPATH_W) 'MvQObstatScatterTool.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatSca [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterTool.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterTool.moc.cpp' object='bin_ObstatScatterTool-MvQObstatScatterTool.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterTool.moc.obj `if test -f 'MvQObstatScatterTool.moc.cpp'; then $(CYGPATH_W) 'MvQObstatScatterTool.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterTool.moc.cpp'; fi`
+
+bin_ObstatScatterTool-MvQObstatScatterToolBase.o: MvQObstatScatterToolBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterToolBase.o -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.o `test -f 'MvQObstatScatterToolBase.cc' || echo '$(srcdir)/'`MvQObstatScatterToolBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterToolBase.cc' object='bin_ObstatScatterTool-MvQObstatScatterToolBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.o `test -f 'MvQObstatScatterToolBase.cc' || echo '$(srcdir)/'`MvQObstatScatterToolBase.cc
+
+bin_ObstatScatterTool-MvQObstatScatterToolBase.obj: MvQObstatScatterToolBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterToolBase.obj -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.obj `if test -f 'MvQObstatScatterToolBase.cc'; then $(CYGPATH_W) 'MvQObstatScatterToolBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatt [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterToolBase.cc' object='bin_ObstatScatterTool-MvQObstatScatterToolBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.obj `if test -f 'MvQObstatScatterToolBase.cc'; then $(CYGPATH_W) 'MvQObstatScatterToolBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterToolBase.cc'; fi`
+
+bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.o: MvQObstatScatterToolBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.o -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.o `test -f 'MvQObstatScatterToolBase.moc.cpp' || echo '$(srcdir)/'`MvQObstatScatterToolBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterToolBase.moc.cpp' object='bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.o `test -f 'MvQObstatScatterToolBase.moc.cpp' || echo '$(srcdir)/'`MvQObstatScatterToolBase.moc.cpp
+
+bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.obj: MvQObstatScatterToolBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -MT bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.obj -MD -MP -MF $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Tpo -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.obj `if test -f 'MvQObstatScatterToolBase.moc.cpp'; then $(CYGPATH_W) 'MvQObstatScatterToolBase.moc.cpp'; else $(CYGPATH_W) '$( [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Tpo $(DEPDIR)/bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterToolBase.moc.cpp' object='bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ObstatScatterTool_CPPFLAGS) $(CPPFLAGS) $(bin_ObstatScatterTool_CXXFLAGS) $(CXXFLAGS) -c -o bin_ObstatScatterTool-MvQObstatScatterToolBase.moc.obj `if test -f 'MvQObstatScatterToolBase.moc.cpp'; then $(CYGPATH_W) 'MvQObstatScatterToolBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterToolBase.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/ObstatScatterTool *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ObstatScatterTool/MvMain.cc b/src/ObstatScatterTool/MvMain.cc
new file mode 100644
index 0000000..1b6b09f
--- /dev/null
+++ b/src/ObstatScatterTool/MvMain.cc
@@ -0,0 +1,143 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include <QSplashScreen>
+
+#include "MvQObstatScatterTool.h"
+
+#include <iostream>
+#include "Metview.h"
+#include "MvQService.h"
+#include "MvQKeyManager.h"
+#include "MvQObstatScatterData.h"
+
+string ftmp;
+
+using namespace std;
+ 
+// Globals
+int          ac;
+char       **av;
+
+class Base : public MvQService 
+{ 
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvObstatScatterTool : public Base 
+{	
+public:
+	MvObstatScatterTool() : Base("OBSTAT_SCATTER") {};	
+	void serve(MvRequest&,MvRequest&);
+};
+
+void MvObstatScatterTool::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------MvObstatScatterTool::serve()--------------" << endl;
+  	in.print();	
+    	
+	//Get grib file name	
+	const char* tmpc = in("PATH");	
+
+	//Set grib file name			
+	string fdata(tmpc);
+
+	//Set tmpfile name
+	ftmp=marstmp();
+
+	//GribMetaData grib;
+	//try
+	//{
+	//	grib.init(fgrib,fgribdump);
+	//}
+	/*catch(MvOdbException e)
+   	{
+		stringstream sbuff("", ios_base::out);
+		sbuff << e.what();	
+		//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+		setError(13,sbuff.str().c_str());
+		return;		
+	}	
+	catch(exception e)
+   	{
+		stringstream sbuff("", ios_base::out);
+		sbuff << e.what();		
+		//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+		setError(13,sbuff.str().c_str());	
+		return;			
+	}*/
+	
+  
+	//Create the qt application
+	QApplication app(ac, av); 
+	
+	//Create a splash screen
+	/*QSplashScreen *splash=new QSplashScreen;
+	splash->setFixedWidth(300);
+	splash->setFixedHeight(300);
+	splash->setPixmap(QPixmap("/tmp/PERFORCE/metview_4/src/GribBrowser_qt/splash.png"));
+
+	splash->show();
+	app.processEvents();
+
+	Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
+	
+	splash->showMessage("Reading message list in Grib File",
+			    topRight, Qt::white);
+	app.processEvents();
+	qDebug() << "splash";*/
+
+	
+
+	//Create the grib key manager and initialize it
+	//MvQKeyManager *manager = new MvQKeyManager(MvQKeyManager::GribType);
+	//manager->loadProfiles();
+
+	//Create the grib metadata object and initialize it	
+	MvQObstatScatterData *data = new MvQObstatScatterData;
+	
+	/*connect(data,SIGNAL(newItemLoaded(QString)),
+		splash,SLOT(showMessage(QString)));*/
+
+
+	data->setFileName(QString::fromStdString(fdata));
+
+	//Create the grib browser and initialize it
+	MvQObstatScatterTool *browser = new MvQObstatScatterTool;
+	browser->init(data);
+   	browser->show();
+	
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	//Remove splash screen
+	//splash->finish(browser);
+	//delete splash;
+
+   	//Enter the app loop
+ 	app.exec();	
+}		
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+  	av = argv;
+	
+	MvApplication theApp( argc, argv );
+
+    	MvObstatScatterTool scatter;	
+	
+    	theApp.run();	
+}
+
+
+
diff --git a/src/ObstatScatterTool/MvQObstatScatterTool.cc b/src/ObstatScatterTool/MvQObstatScatterTool.cc
new file mode 100644
index 0000000..e50aa13
--- /dev/null
+++ b/src/ObstatScatterTool/MvQObstatScatterTool.cc
@@ -0,0 +1,219 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QFile>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QSettings>
+#include <QSortFilterProxyModel>
+#include <QSplitter>
+#include <QStackedWidget>
+#include <QString>
+#include <QStringList>
+#include <QToolBar>
+#include <QTextBrowser>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "MvFileInfo.h"
+
+#include "MvQObstatScatterTool.h"
+#include "MvKeyProfile.h"
+
+#include "MvQFileInfoLabel.h"
+#include "MvQObstatScatterToolBase.h"
+//#include "MvQGribKeyDialog.h"
+//#include "MvQGribStdDumpModel.h"
+//#include "MvQGribWmoDumpModel.h"
+#include "MvQKeyManager.h"
+#include "MvQKeyProfileModel.h"
+#include "MvQLogBrowser.h"
+//#include "MvQSearchLineBase.h"
+#include "MvQTreeView.h"
+
+
+MvQObstatScatterTool::MvQObstatScatterTool(QWidget *parent) : MvQMainWindow(parent)
+{
+	setAttribute(Qt::WA_DeleteOnClose);
+	
+	setWindowTitle("Metview - OBSTAT ScatterPlot Tool");
+
+	QWidget *w;
+	QLabel *label;
+
+	//----------------------
+	// Examiner base
+	//----------------------
+
+	examinerBase_= new MvQObstatScatterToolBase;
+
+	//----------------------
+	// Main splitter
+	//----------------------
+
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+
+        mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+	
+	//-----------------------------------------------------
+	// The main layout (the upper part of mainSplitter)
+	//-----------------------------------------------------
+  
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	//mainLayout->setSpacing(0);
+	w=new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	//------------------
+	// File info label
+	//------------------
+      
+ 	//Add to layout 
+	mainLayout->addWidget(examinerBase_->fileInfoLabel());
+
+	//---------------------
+	// Central splitter
+	//---------------------
+
+	centralSplitter_ = new QSplitter(this); 
+	centralSplitter_->setOpaqueResize(false);	
+	mainLayout->addWidget(centralSplitter_);
+
+	//-------------------------
+	// Populate central splitter
+	//-------------------------
+	
+	centralSplitter_->addWidget(examinerBase_->messagePanel());
+	centralSplitter_->addWidget(examinerBase_->plotPanel());
+			
+	//--------------------------
+	// Log Area
+	//--------------------------
+
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	w=new QWidget;
+	w->setLayout(logLayout);
+	mainSplitter_->addWidget(w);
+
+	//Label
+	label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	logLayout->addWidget(label);
+
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+	
+	//----------------------------
+	// 
+	//----------------------------
+
+	setupMenus(examinerBase_->menuItems());
+
+	//-------------------------
+	//
+	//-------------------------
+	
+	
+
+	readSettings();
+
+	//connect(examinerBase_,SIGNAL(keyProfileLoaded(MvKeyProfile*)),
+	//	this,SLOT(slotLoadKeyProfile(MvKeyProfile*)));
+
+	connect(examinerBase_,SIGNAL(logOutputChanged()),
+		this,SLOT(slotUpdateLogOutput()));
+	
+	connect(examinerBase_,SIGNAL(blockSelected(int)),
+		this,SLOT(slotSelectBlock(int)));
+}
+ 
+MvQObstatScatterTool::~MvQObstatScatterTool()
+{
+	writeSettings();
+}
+
+
+void MvQObstatScatterTool::init(MvQObstatScatterData *data)
+{	
+	data_=data;
+		
+	examinerBase_->init(data_);
+	//examinerBase_->fileInfoLabel()->setVisible(fileInfoLabelVisibility_);
+}
+
+void MvQObstatScatterTool::slotLoadKeyProfile(MvKeyProfile *prof)
+{		
+	slotUpdateLogOutput();
+}
+
+void MvQObstatScatterTool::slotSelectMessage(int index)
+{	
+	slotUpdateLogOutput();
+}
+
+void MvQObstatScatterTool::slotSelectBlock(int index)
+{	
+	slotUpdateLogOutput();
+}
+
+void MvQObstatScatterTool::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void MvQObstatScatterTool::writeSettings()
+{
+	QSettings settings("ECMWF","MvQObstatScatterTool");
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+
+	//settings.setValue("fileInfoLabelVisibility",examinerBase_->fileInfoLabel()->isVisible());
+	//qDebug() << "label: " << examinerBase_->fileInfoLabel()->isVisible();
+
+	settings.endGroup();
+}
+
+void MvQObstatScatterTool::readSettings()
+{
+	QVariant value;
+
+	QSettings settings("ECMWF","MvQObstatScatterTool");
+	
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+
+	//fileInfoLabelVisibility_=settings.value("fileInfoLabelVisibility").toBool();
+	//qDebug() << "label: " << fileInfoLabelVisibility_;
+
+	settings.endGroup();
+}
diff --git a/src/ObstatScatterTool/MvQObstatScatterTool.h b/src/ObstatScatterTool/MvQObstatScatterTool.h
new file mode 100644
index 0000000..da99843
--- /dev/null
+++ b/src/ObstatScatterTool/MvQObstatScatterTool.h
@@ -0,0 +1,56 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQObstatScatterTool_H
+#define MvQObstatScatterTool_H
+
+#include "MvQMainWindow.h"
+#include "MvQObstatScatterData.h"
+
+class QSplitter;
+class QTextBrowser;
+
+class MvKeyProfile;
+
+class MvQObstatScatterToolBase;
+class MvQKeyManager;
+class MvQLogBrowser;
+
+class MvQObstatScatterTool : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+    	MvQObstatScatterTool(QWidget *parent = 0);
+    	~MvQObstatScatterTool();
+    	void init(MvQObstatScatterData*);
+
+public slots:
+	void slotSelectMessage(int);
+	void slotSelectBlock(int);
+	void slotLoadKeyProfile(MvKeyProfile *);
+	void slotUpdateLogOutput();	
+	
+private:
+	void readSettings();
+	void writeSettings();
+
+	QSplitter*   centralSplitter_;
+	QSplitter*   mainSplitter_;
+
+	MvQObstatScatterData* data_;
+	//MvQKeyManager *keyManager_;
+
+	MvQObstatScatterToolBase* examinerBase_;
+	MvQLogBrowser* logBrowser_;
+
+	QString lastKeyProfileName_;
+};
+
+#endif
diff --git a/src/ObstatScatterTool/MvQObstatScatterTool.moc.cpp b/src/ObstatScatterTool/MvQObstatScatterTool.moc.cpp
new file mode 100644
index 0000000..fda3bea
--- /dev/null
+++ b/src/ObstatScatterTool/MvQObstatScatterTool.moc.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+** Meta object code from reading C++ file 'MvQObstatScatterTool.h'
+**
+** Created:
+**      by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include "MvQObstatScatterTool.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'MvQObstatScatterTool.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 62
+#error "This file was generated using the moc from 4.6.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_MvQObstatScatterTool[] = {
+
+ // content:
+       4,       // revision
+       0,       // classname
+       0,    0, // classinfo
+       4,   14, // methods
+       0,    0, // properties
+       0,    0, // enums/sets
+       0,    0, // constructors
+       0,       // flags
+       0,       // signalCount
+
+ // slots: signature, parameters, type, tag, flags
+      22,   21,   21,   21, 0x0a,
+      45,   21,   21,   21, 0x0a,
+      66,   21,   21,   21, 0x0a,
+     100,   21,   21,   21, 0x0a,
+
+       0        // eod
+};
+
+static const char qt_meta_stringdata_MvQObstatScatterTool[] = {
+    "MvQObstatScatterTool\0\0slotSelectMessage(int)\0"
+    "slotSelectBlock(int)\0"
+    "slotLoadKeyProfile(MvKeyProfile*)\0"
+    "slotUpdateLogOutput()\0"
+};
+
+const QMetaObject MvQObstatScatterTool::staticMetaObject = {
+    { &MvQMainWindow::staticMetaObject, qt_meta_stringdata_MvQObstatScatterTool,
+      qt_meta_data_MvQObstatScatterTool, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &MvQObstatScatterTool::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *MvQObstatScatterTool::metaObject() const
+{
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *MvQObstatScatterTool::qt_metacast(const char *_clname)
+{
+    if (!_clname) return 0;
+    if (!strcmp(_clname, qt_meta_stringdata_MvQObstatScatterTool))
+        return static_cast<void*>(const_cast< MvQObstatScatterTool*>(this));
+    return MvQMainWindow::qt_metacast(_clname);
+}
+
+int MvQObstatScatterTool::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+    _id = MvQMainWindow::qt_metacall(_c, _id, _a);
+    if (_id < 0)
+        return _id;
+    if (_c == QMetaObject::InvokeMetaMethod) {
+        switch (_id) {
+        case 0: slotSelectMessage((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 1: slotSelectBlock((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 2: slotLoadKeyProfile((*reinterpret_cast< MvKeyProfile*(*)>(_a[1]))); break;
+        case 3: slotUpdateLogOutput(); break;
+        default: ;
+        }
+        _id -= 4;
+    }
+    return _id;
+}
+QT_END_MOC_NAMESPACE
diff --git a/src/ObstatScatterTool/MvQObstatScatterToolBase.cc b/src/ObstatScatterTool/MvQObstatScatterToolBase.cc
new file mode 100644
index 0000000..dfbdab2
--- /dev/null
+++ b/src/ObstatScatterTool/MvQObstatScatterToolBase.cc
@@ -0,0 +1,945 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QCursor>
+#include <QDebug>
+#include <QFile>
+#include <QHBoxLayout>
+#include <QMenu>
+#include <QMenuBar>
+#include <QPushButton>
+#include <QScrollArea>
+#include <QSettings>
+#include <QSortFilterProxyModel>
+#include <QSplitter>
+#include <QString>
+#include <QStringList>
+#include <QToolBar>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "MvFileInfo.h"
+
+#include "MvQObstatScatterToolBase.h"
+#include "MvKeyProfile.h"
+
+#include "MvQFileInfoLabel.h"
+#include "MvQKeyManager.h"
+#include "MvQKeyProfileModel.h"
+//#include "MvQPlotWidget.h"
+#include "MvQTreeView.h"
+
+#include "mars.h"
+
+MvQObstatScatterToolBase::MvQObstatScatterToolBase(QWidget *)
+{
+	//File info label        
+	fileInfoLabel_=new MvQFileInfoLabel;
+
+	//Set up grib message group box
+	setupMessageBox();
+	
+	//Set up grib dump group box
+	//setupDumpBox();
+	setupPlotBox();
+
+	//----------------------
+	// Init
+	//----------------------
+
+	currentBlockNo_=-1;
+	currentItemNo_=-1;
+
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	setupViewActions();
+	setupSettingsActions();
+
+	swapAxes_=false;
+
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	//Dump combo
+	//connect(dumpCombo_, SIGNAL(currentIndexChanged(int)),
+       //         dumpStacked_, SLOT(setCurrentIndex(int)));
+	
+	//Message list selection	
+	connect(blockTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectBlock(QModelIndex)));
+
+	connect(blockTree_,SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotSelectBlock(QModelIndex)));
+
+	//Message list selection	
+	connect(messageTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectMessage(QModelIndex)));
+
+	connect(messageTree_,SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotSelectMessage(QModelIndex)));
+
+
+	connect(swapPb_,SIGNAL(toggled(bool)),
+		this,SLOT(slotSwapAxes(bool)));	
+
+	/*connect(messageTree_->header(),SIGNAL(customContextMenuRequested(const QPoint &)),
+                this, SLOT(slotMessageTreeContextMenu(const QPoint &)));
+
+	connect(messageTree_->header(),SIGNAL(sectionMoved(int,int,int)),
+                this, SLOT(slotMessageTreeColumnMoved(int,int,int)));*/
+	
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		qDebug() << "MvQObstatScatterToolBase::MvQObstatScatterToolBase() --> No METVIEW_BIN found!";
+			//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+			//setError(13,"Environment variable METVIEW_USER_DIRECTORY is not defined!");	
+		return;	
+	}
+
+	magmlScript_=QString(mvbin);
+	magmlScript_+="/ObstatScatter.magml";
+}
+ 
+MvQObstatScatterToolBase::~MvQObstatScatterToolBase()
+{	
+	if(messageModel_) delete messageModel_;
+	//if(summaryModel_) delete summaryModel_;
+	//if(stdDumpModel_) delete stdDumpModel_;
+	//if(wmoDumpModel_) delete wmoDumpModel_;	
+}
+
+void MvQObstatScatterToolBase::setupMessageBox()
+{
+	QWidget *w;
+	QLabel *label;
+	QVBoxLayout *vb;
+
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	messagePanel_=new QWidget;
+	QVBoxLayout *messageLayout = new QVBoxLayout;
+	messageLayout->setContentsMargins(0,0,0,0);
+	messagePanel_->setLayout(messageLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	blockSplitter_=new QSplitter;
+	blockSplitter_->setOrientation(Qt::Vertical);
+	messageLayout->addWidget(blockSplitter_);
+	
+	w=new QWidget;
+	vb=new QVBoxLayout;
+	w->setLayout(vb);
+	blockSplitter_->addWidget(w);
+
+	//Label
+	label=new QLabel(tr("Scatterplot blocks"));
+	label->setFrameShape(QFrame::StyledPanel);
+	label->setProperty("mvStyle","panel");
+	vb->addWidget(label);
+
+	//Message tree
+	blockModel_= new MvQKeyProfileModel;
+	blockSortModel_= new QSortFilterProxyModel;
+        blockSortModel_->setSourceModel(blockModel_);
+	blockSortModel_->setDynamicSortFilter(true);
+	blockSortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	blockSortModel_->setFilterFixedString("1");
+	blockSortModel_->setFilterKeyColumn(0);
+
+
+	blockTree_=new MvQTreeView;
+	blockTree_->setObjectName("blockTree");
+	blockTree_->setProperty("mvStyle",0);
+	blockTree_->setSortingEnabled(true); 
+	blockTree_->sortByColumn (0,Qt::AscendingOrder); 
+	blockTree_->setAlternatingRowColors(true);
+        blockTree_->setAllColumnsShowFocus(true);
+	blockTree_->setModel(blockSortModel_);	
+	//messageTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	blockTree_->setActvatedByKeyNavigation(true);
+	blockTree_->setAcceptDrops(true);
+	blockTree_->setDragDropMode(QAbstractItemView::DropOnly);
+	blockTree_->setRootIsDecorated(false);
+
+	vb->addWidget(blockTree_);	
+
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------	
+	
+	w=new QWidget;
+	vb=new QVBoxLayout;
+	w->setLayout(vb);
+	blockSplitter_->addWidget(w);	
+
+	//Label
+	label=new QLabel(tr("Scatterplot items"));
+	label->setFrameShape(QFrame::StyledPanel);
+	label->setProperty("mvStyle","panel");
+	vb->addWidget(label);
+
+	//Message tree
+	messageModel_= new MvQKeyProfileModel;
+	messageSortModel_= new QSortFilterProxyModel;
+        messageSortModel_->setSourceModel(messageModel_);
+	messageSortModel_->setDynamicSortFilter(true);
+	messageSortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	messageSortModel_->setFilterFixedString("1");
+	messageSortModel_->setFilterKeyColumn(0);
+
+
+	messageTree_=new MvQTreeView;
+	messageTree_->setObjectName("messageTree");
+	messageTree_->setProperty("mvStyle",0);
+	messageTree_->setSortingEnabled(true); 
+	messageTree_->sortByColumn (0,Qt::AscendingOrder); 
+	messageTree_->setAlternatingRowColors(true);
+        messageTree_->setAllColumnsShowFocus(true);
+	messageTree_->setModel(messageSortModel_);	
+	//messageTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	messageTree_->setActvatedByKeyNavigation(true);
+	messageTree_->setAcceptDrops(true);
+	messageTree_->setDragDropMode(QAbstractItemView::DropOnly);
+	messageTree_->setRootIsDecorated(false);
+
+
+	vb->addWidget(messageTree_);	
+}
+
+void MvQObstatScatterToolBase::setupPlotBox()
+{
+//	QWidget *w;
+	QLabel *label;
+
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	plotPanel_=new QWidget;
+	QVBoxLayout *plotLayout = new QVBoxLayout;
+	plotLayout->setContentsMargins(0,0,0,0);
+	plotPanel_->setLayout(plotLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	//Label
+	label=new QLabel(tr("Plot"));
+	label->setFrameShape(QFrame::StyledPanel);
+	label->setProperty("mvStyle","panel");
+	plotLayout->addWidget(label);
+
+	//Buttons
+	QHBoxLayout *hb=new QHBoxLayout;
+	plotLayout->addLayout(hb);
+
+	swapPb_=new QPushButton(tr("Swap axes"));
+	swapPb_->setCheckable(true);
+	hb->addWidget(swapPb_);
+	hb->addStretch(1);
+
+
+	QScrollArea *area=new QScrollArea;
+	
+	//plot area
+	plotWidget_= new QLabel;
+	plotWidget_->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+     	plotWidget_->setScaledContents(true);
+
+	//plotWidget_->setMinimumSize(800,700);
+	//plotWidget_->setSize(800,600);
+	//plotLayout->addWidget(plotWidget_);
+
+	area->setWidget(plotWidget_);
+	plotLayout->addWidget(area);
+	
+}
+
+void MvQObstatScatterToolBase::setupViewActions()
+{
+	//
+	QAction* actionFileInfo = new QAction(this);
+        actionFileInfo->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo->setText(tr("File info"));
+	actionFileInfo->setCheckable(true);
+	actionFileInfo->setChecked(true);
+	actionFileInfo->setToolTip(tr("Show/hide file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examinerBase/fileInfo.png")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo->setIcon(icon);	
+	
+	//Define routines
+	connect(actionFileInfo,SIGNAL(triggered(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo));	
+}
+
+void MvQObstatScatterToolBase::setupSettingsActions()
+{
+	//
+	QAction* actionKeyManager = new QAction(this);
+        actionKeyManager->setObjectName(QString::fromUtf8("actionKeyManager"));
+	actionKeyManager->setText(tr("Key manager"));
+	actionKeyManager->setToolTip(tr("Key profile manager"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examinerBase/keyManager.png")), QIcon::Normal, QIcon::Off);
+ 	actionKeyManager->setIcon(icon);
+	actionKeyManager->setToolTip(tr("Key manager"));
+  
+	//Key profile management
+	connect(actionKeyManager, SIGNAL(triggered()), 
+		this, SLOT(slotManageKeyProfiles()));
+
+	//Combo box
+	//We will add items + signal/slots later in "init"!
+	QHBoxLayout *hb=new  QHBoxLayout;
+
+	//Combo box for key profile selection
+	QLabel *keyLabel = new QLabel(tr("Key profile:"));
+	keyCombo_ = new QComboBox;
+	keyLabel->setBuddy(keyCombo_);
+
+	hb->addWidget(keyLabel);
+	hb->addWidget(keyCombo_);
+	QWidget* wh=new QWidget;
+	wh->setLayout(hb);
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::SettingsMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionKeyManager));	
+}
+
+
+void MvQObstatScatterToolBase::init(MvQObstatScatterData *data)
+{	
+	data_=data;
+	
+	//----------------------------------
+	// Initilaize the key profile list
+	//---------------------------------
+	
+	MvKeyProfile *prof=new MvKeyProfile("Metview default");
+	loadKeyProfile(prof);
+
+	//disconnect(keyCombo_,SIGNAL(currentIndexChanged(int)),this,SLOT(loadKeyProfile(int)));
+	
+	//Set tree focus
+	messageTree_->setFocus(Qt::OtherFocusReason);
+	
+	//Fileinfo label
+	updateFileInfoLabel();
+}
+
+
+void MvQObstatScatterToolBase::loadKeyProfile(MvKeyProfile *prof)
+{	
+	//Get the current profile from the model (this will be the previous)
+	MvKeyProfile* prevProfile = blockModel_->keyProfile();
+
+	//Update grib metadata with the new key profile
+	data_->loadKeyProfile(prof);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	blockModel_->setKeyProfile(prof);
+
+	for(int i=0;i < blockModel_->columnCount()-1; i++)
+	{ 
+		blockTree_->resizeColumnToContents(i);
+	}
+
+	blockTree_->setCurrentIndex(blockSortModel_->index(0,0));
+	slotSelectBlock(blockTree_->currentIndex());
+
+	//Clear the previous provile
+	if(prevProfile != 0 && prof  != prevProfile)
+		prevProfile->clearKeyData();	
+
+	/*
+	//Get the current profile from the model (this will be the previous)
+	MvKeyProfile* prevProfile = messageModel_->keyProfile();
+
+	//Update grib metadata with the new key profile
+	data_->loadKeyProfile(prof);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	messageModel_->setKeyProfile(prof);
+
+	for(int i=0;i < messageModel_->columnCount()-1; i++)
+	{ 
+		messageTree_->resizeColumnToContents(i);
+	}
+
+	messageTree_->setCurrentIndex(messageSortModel_->index(0,0));
+	slotSelectMessage(messageTree_->currentIndex());
+
+	//Clear the previous provile
+	if(prevProfile != 0 && prof  != prevProfile)
+		prevProfile->clearKeyData();
+	*/	
+}
+
+void MvQObstatScatterToolBase::slotSelectBlock(QModelIndex index)
+{	
+	int cnt=blockSortModel_->mapToSource(index).row(); 
+
+	string fdump;
+
+	qDebug() << "slotSelectBlock" << currentBlockNo_ << cnt ;
+
+	if(currentBlockNo_ == cnt)
+	{
+		return;
+	}
+
+	currentBlockNo_=cnt;
+
+	//Override cursor
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	//Generate and read grib dumps
+	//createPlot();
+
+	emit blockSelected(currentBlockNo_);
+
+	loadItems(currentBlockNo_);
+
+	//Preview plot
+	//createPlot();
+
+	//Log
+	//updateLogOutput();
+
+	//Restore cursor
+	QApplication::restoreOverrideCursor();
+}
+
+
+void MvQObstatScatterToolBase::slotSelectMessage(QModelIndex index)
+{	
+	int cnt=messageSortModel_->mapToSource(index).row(); 
+
+	string fdump;
+
+	if(currentItemNo_ == cnt)
+	{
+		return;
+	}
+
+	currentItemNo_=cnt;
+
+
+	//Override cursor
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	//Generate and read grib dumps
+	createPlot();
+
+	emit messageSelected(currentItemNo_);
+
+	//Preview plot
+	//createPlot();
+
+	//Log
+	//updateLogOutput();
+
+	//Restore cursor
+	QApplication::restoreOverrideCursor();
+}
+
+void MvQObstatScatterToolBase::loadItems(int blockNo)
+{
+	/*if(currentBlockNo_ == blockNo)
+	{
+		return;
+	}
+	currentBlockNo_=blockNo;*/
+
+	//Get the current profile from the model (this will be the previous)
+	MvKeyProfile* prevProfile = messageModel_->keyProfile();
+
+	if(prevProfile)
+		delete prevProfile;
+
+	MvKeyProfile * prof=new MvKeyProfile("Items");
+
+	//Update grib metadata with the new key profile
+	data_->block(blockNo)->loadKeyProfile(prof);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	messageModel_->setKeyProfile(prof);
+
+	for(int i=0;i < messageModel_->columnCount()-1; i++)
+	{ 
+		messageTree_->resizeColumnToContents(i);
+	}
+
+	messageTree_->setCurrentIndex(messageSortModel_->index(0,0));
+	slotSelectMessage(messageTree_->currentIndex());
+
+	//Clear the previous provile
+	if(prevProfile != 0 && prof  != prevProfile)
+		prevProfile->clearKeyData();
+
+}
+
+//==============================
+// Header operations
+//==============================
+
+
+void MvQObstatScatterToolBase::slotMessageTreeContextMenu(const QPoint &position)
+{
+/*	QHeaderView *header=messageTree_->header();
+	int section=header->logicalIndexAt(position); 
+	
+	if(section< 0 || section >= header->count())
+		return;
+
+	qDebug() << "context event in section " << section;
+
+       	QList<QAction*> actions;
+
+	//Filter
+	QAction *actionFilter = new QAction(this);
+        actionFilter->setObjectName(QString::fromUtf8("actionFilter"));
+	actionFilter->setText(tr("Filter"));
+        //actionRename->setShortcut(tr("Ctrl+L"));
+	actions.append(actionFilter);
+
+	QMenu *filterMenu = new QMenu;
+
+	MvKeyProfile *prof=messageModel_->keyProfile();	
+	MvKey* key=prof->at(section);
+	if(key)
+	{
+		MvQKeyFilter filter=messageModel_->keyFilter();
+		QString keyName(key->name().c_str());
+		QStringList filterItems=filter[keyName];		
+
+		//filterValueList_->clear();
+
+		//QStringList filterItems=messageModel_->keyFilter()[keyName];
+
+		for(map<string,int>::iterator it=key->counter().begin(); 
+                    it != key->counter().end(); it++)
+		{
+			QString str(it->first.c_str());
+
+			QAction *action=new QAction(str,this);
+			action->setCheckable(true);
+
+			if(filterItems.count() == 0 || filterItems.contains(str))
+			{
+				action->setChecked(true);
+			}
+			else
+			{
+				action->setChecked(false);
+			}
+			filterMenu->addAction(action);			
+		}
+	}
+	actionFilter->setMenu(filterMenu);
+	
+
+ 	//Rename
+	QAction *actionRename = new QAction(this);
+        actionRename->setObjectName(QString::fromUtf8("actionRename"));
+	actionRename->setText(tr("Rename"));
+        //actionRename->setShortcut(tr("Ctrl+L"));
+	actions.append(actionRename);
+
+	QAction *actionDelete = new QAction(this);
+        actionDelete->setObjectName(QString::fromUtf8("actionDelete"));
+	actionDelete->setText(tr("Delete"));
+	actionDelete->setEnabled(false);
+        //actionDelete->setShortcut(tr("Ctrl+D"));
+	actions.append(actionDelete);
+	
+    	if(actions.count() > 0)
+	{
+        	QAction *action=QMenu::exec(actions, header->mapToGlobal(position));
+
+		if(action == actionRename)
+		{
+			bool ok;
+     			QString text = QInputDialog::getText(0, 
+					tr("Rename header"),
+                        		tr("New name:"), QLineEdit::Normal,
+                                        "", &ok);
+     			if (ok && !text.isEmpty())
+         			renameMessageTreeHeader(section,text);				
+		}
+		else if(action == actionDelete)
+		{
+			deleteMessageTreeColumn(section);
+		}
+		//Filter
+		else if(action)
+		{
+			action->text();	
+			action->isChecked();
+
+			MvQKeyFilter filter=messageModel_->keyFilter();
+			QString keyName(key->name().c_str());
+			QStringList filterItems=filter[keyName];
+
+			if(action->isChecked() == false)
+			{
+				if(filterItems.isEmpty())
+				{
+					for(map<string,int>::iterator it=key->counter().begin(); 
+                   				 it != key->counter().end(); it++)
+					{
+						QString str(it->first.c_str());
+						if(str != action->text())
+						{
+							filterItems.push_back(str);
+						}					
+					}
+
+				}
+				else				
+				{
+					if(filterItems.contains(action->text()) == true)
+					{
+						int i=filterItems.indexOf(action->text());
+						filterItems.removeAt(i);
+					}
+				}
+
+				filter[keyName]=filterItems;
+			}
+			else
+			{
+				filterItems.push_back(action->text());
+				if(filterItems.count() == key->counter().size())
+				{
+					filter.remove(keyName);
+				}
+				else
+				{
+					filter[keyName]=filterItems;
+				}
+			}
+		
+			messageModel_->setKeyFilter(filter);
+		
+			qDebug() << filter;
+		}
+
+	}
+	
+	foreach(QAction *action,actions)
+	{
+			delete action;
+	}
+	delete filterMenu;
+	*/	
+}
+
+void MvQObstatScatterToolBase::renameMessageTreeHeader(int section,QString text)
+{
+/*	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(section >=0 && section < prof->size())
+	{
+		prof->at(section)->setShortName(text.toStdString());
+		messageModel_->setKeyProfile(prof); 		
+		keyManager_->saveProfiles();
+	}*/
+}	
+
+void MvQObstatScatterToolBase::deleteMessageTreeColumn(int column)
+{
+/*	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(column >=0 && column < prof->size())
+	{
+		prof->deleteKey(column);
+		loadKeyProfile(prof);
+		keyManager_->saveProfiles();
+	}
+*/
+}	
+
+void MvQObstatScatterToolBase::slotMessageTreeColumnMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex)
+{
+	/*if(logicalIndex != oldVisualIndex)
+	{
+		qDebug() << "MvQObstatScatterToolBase::slotMessageTreeColumnMoved> problem with column indices!"; 
+	}
+	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(oldVisualIndex >=0 && oldVisualIndex < prof->size() &&
+	   newVisualIndex >=0 && newVisualIndex < prof->size()	&&
+	   oldVisualIndex != newVisualIndex)
+	{
+		for(int i=0; i < messageTree_->header()->count(); i++)
+			qDebug() << "header:" << messageTree_->header()->logicalIndex(i);
+
+		prof->reposition(oldVisualIndex,newVisualIndex);
+		messageModel_->setKeyProfile(prof); 		
+		keyManager_->saveProfiles();
+		//messageTree_->header()->reset();
+
+		for(int i=0; i < messageTree_->header()->count(); i++)
+			qDebug() << "header:" << messageTree_->header()->logicalIndex(i);
+	}*/
+}
+
+//-----------------------------------------------------
+// Drag and drop
+//-----------------------------------------------------
+
+void MvQObstatScatterToolBase::slotDropToMessageTree(QString data)
+{
+	/*qDebug() << "Drop from dump: " << data;
+
+	//Get the current profile from the model (this will be the previous)
+	MvKeyProfile* prof = messageModel_->keyProfile();
+	prof->addKey(new MvKey(data.toStdString(),data.toStdString()));
+	loadKeyProfile(prof);
+
+	keyManager_->saveProfiles();*/
+}
+
+
+//-----------------------------------------------------
+// Search
+//-----------------------------------------------------
+
+void MvQObstatScatterToolBase::slotManageKeyProfiles()
+{
+	/*MvQGribKeyDialog keyDialog;
+
+	connect(&keyDialog,SIGNAL(dataChanged()),
+		this,SLOT(slotUpdateKeyProfiles()));
+
+	connect(&keyDialog,SIGNAL(logChanged()),
+		this,SIGNAL(logOutputChanged()));
+
+	keyDialog.init(keyManager_,grib_);
+	keyDialog.exec();*/
+
+/*
+	if (!keyDialog_) 
+	{
+		keyDialog_ = new MvQGribKeyDialog;
+		//connect(keyDialog_, SIGNAL(find(const QString &,QTextDocument::FindFlags)),
+		//	this, SLOT(find(const QString &,QTextDocument::FindFlags)));
+
+		keyDialog_->init(keyManager_,grib_);
+		keyDialog_->show();
+		keyDialog_->activateWindow();
+		
+		connect(keyDialog_,SIGNAL(dataChanged()),
+			this,SLOT(slotUpdateKeyProfiles()));
+
+		connect(keyDialog_,SIGNAL(logChanged()),
+			this,SIGNAL(logOutputChanged()));
+		
+
+	}
+	else if(!keyDialog_->isVisible()) 
+	{
+		keyDialog_->show();
+	}
+
+*/
+}
+
+
+void MvQObstatScatterToolBase::slotUpdateKeyProfiles()
+{
+	//Save the current profile name
+	/*string currentProfName=keyCombo_->currentText().toStdString(); 
+
+	//Clear the profile list
+	keyCombo_->clear();
+
+	int i=0;
+	int index=-1;
+	for (vector<MvKeyProfile*>::const_iterator it=keyManager_->begin(); it != keyManager_->end(); it++) 
+	{
+		keyCombo_->addItem(QString((*it)->name().c_str() ));
+		if((*it)->name()== currentProfName)
+		{
+			index=i;
+		}
+		i++;
+	}
+
+	if(index != -1)
+	{
+		keyCombo_->setCurrentIndex(index);
+		loadKeyProfile(keyManager_->at(index));
+	}
+	else
+	{
+		keyCombo_->setCurrentIndex(0);
+		loadKeyProfile(keyManager_->at(0));
+	}*/
+}
+
+void MvQObstatScatterToolBase::updateFileInfoLabel()
+{
+	fileInfoLabel_->setObstatScatterTextLabel(data_->fileName(),data_->itemNum());
+}
+
+
+void MvQObstatScatterToolBase::slotSwapAxes(bool status)
+{
+	if(swapAxes_!= status)
+	{
+		swapAxes_=status;
+		createPlot();
+	}
+}
+
+void MvQObstatScatterToolBase::createPlot()
+{
+	//Preview plot
+	MvQScatterBlock *block=data_->block(currentBlockNo_);
+	MvQScatterItem *item=block->items().at(currentItemNo_);
+
+	//QString nc="/var/tmp/cgr/PERFORCE/metview_4/src/ObstatScatterTool/res.nc";
+	
+	QString ncFile=QString::fromStdString(marstmp());
+	item->writeDataMatrixToNc(ncFile,swapAxes_);
+
+	QVector<float> meanX,meanY;
+	QStringList tmpStr;
+	item->computeMeanForColumns(meanX,meanY);
+	
+	foreach(float v,meanX)
+	{
+		tmpStr << QString::number(v);
+	}
+	QString meanXStr=tmpStr.join("/");
+	
+	tmpStr.clear();
+	foreach(float v,meanY)
+	{
+		tmpStr << QString::number(v);
+	}
+	QString meanYStr=tmpStr.join("/");
+
+
+	QString magml="scatter.magml";
+	
+	//QString res="/var/tmp/cgr/PERFORCE/metview_4/src/ObstatScatterTool/res.png";
+	//QString res1="/var/tmp/cgr/PERFORCE/metview_4/src/ObstatScatterTool/res.1.png";
+
+	QString paramX, paramY;
+	float  startX, endX, startY, endY;
+
+	if(swapAxes_ == false)
+	{		
+		paramX=item->titleX();
+		paramY=item->titleY();
+		startX=item->startX();
+		endX=item->endX();
+		startY=item->startY();
+		endY=item->endY();
+
+	}
+	else
+	{
+		paramX=item->titleY();
+		paramY=item->titleX();
+		startX=item->startY();
+		endX=item->endY();
+		startY=item->startX();
+		endY=item->endX();
+	}
+
+	QString resFile=QString::fromStdString(marstmp());
+
+	QString cmd="magmlx " +  magmlScript_ +
+	" -dataFile=" + ncFile +
+	" -blockTitle=\"" + block->title() + "\"" +
+	" -startDate=" + block->startDate().toString("yyyyMMddhh") +
+	" -endDate=" + block->endDate().toString("yyyyMMddhh") +
+	" -area=" + block->areaNames().at(item->area()-1) +
+	" -flag=" + QString::number(item->flag()) +
+	" -x_param=\"" + paramX.simplified() + "\"" +
+	" -y_param=\"" + paramY.simplified() + "\"" +
+	" -start_x=" + QString::number(startX) +
+	" -end_x=" + QString::number(endX) +
+	" -start_y=" + QString::number(startY) +
+	" -end_y=" + QString::number(endY) +
+	" -mean_x_lst=" + meanXStr +
+	" -mean_y_lst=" + meanYStr +
+	" -x_min=" + QString::number(item->minX()) +
+	" -x_max=" + QString::number(item->maxX()) +
+	" -y_min=" + QString::number(item->minY()) +
+	" -y_max=" + QString::number(item->maxY()) +
+	" -source_num=" + QString::number(item->sourceDataNum()) +
+	" -source_num=" + QString::number(item->sourceDataNum()) +
+ 	" -path=" + resFile;
+
+	system(cmd.toStdString().c_str());
+
+	qDebug() << cmd;
+
+	//cout << sout.str() << endl;
+
+	QString resFileWithSuffix=resFile + ".png";
+
+	QPixmap pixmap(resFileWithSuffix,"PNG");
+ 	plotWidget_->setPixmap(pixmap);
+	plotWidget_->adjustSize();
+
+	//CLEAR
+
+	return;
+
+	QFile fRes(resFile);
+	if(!fRes.remove())
+	{
+		qDebug() << "MvQObstatScatterToolBase::createPlot() ---> Res file" << resFile << "could not be deleted!";
+	}
+
+	QFile fResSuffix(resFileWithSuffix);
+	if(!fResSuffix.remove())
+	{
+		qDebug() << "MvQObstatScatterToolBase::createPlot() ---> Res file" << resFileWithSuffix << "could not be deleted!";
+	}
+
+	QFile fNc(ncFile);
+	if(!fNc.remove())
+	{
+		qDebug() << "MvQObstatScatterToolBase::createPlot() ---> Nc file" << ncFile << "could not be deleted!";
+	}
+
+}
diff --git a/src/ObstatScatterTool/MvQObstatScatterToolBase.h b/src/ObstatScatterTool/MvQObstatScatterToolBase.h
new file mode 100644
index 0000000..91bd005
--- /dev/null
+++ b/src/ObstatScatterTool/MvQObstatScatterToolBase.h
@@ -0,0 +1,141 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQObstatScatterToolBase_H
+#define MvQObstatScatterToolBase_H
+
+#include <QComboBox>
+#include <QMainWindow>
+#include <QStandardItemModel>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+#include "MvQObstatScatterData.h"
+
+class QColor;
+class QGroupBox;
+class QLabel;
+class QListWidget;
+class QListWidgetItem;
+class QPushButton;
+class QSortFilterProxyModel;
+class QSplitter;
+class QStackedWidget;
+class QTextBrowser;
+class QTreeView;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QVBoxLayout;
+
+class MvKeyProfile;
+
+class MvQFileInfoLabel;
+class MvQKeyManager;
+class MvQKeyProfileModel;
+class MvQPlotWidget;
+class MvQTreeView;
+
+class MvQObstatScatterToolBase : public QObject
+{
+    Q_OBJECT
+
+public:
+    	MvQObstatScatterToolBase(QWidget *parent = 0);
+    	~MvQObstatScatterToolBase();
+    	void init(MvQObstatScatterData*);
+
+	MvQFileInfoLabel* fileInfoLabel() {return fileInfoLabel_;}
+	//QGroupBox*  messageBox() {return messageBox_;}
+	//QGroupBox* dumpBox() {return dumpBox_;}
+	QSplitter* messageSplitter() {return blockSplitter_;}
+	QWidget* messagePanel() {return messagePanel_;}
+	QWidget* plotPanel() {return plotPanel_;}
+	
+	void updateFileInfoLabel();
+	const MvQMainWindow::MenuItemMap& menuItems () {return menuItems_;}
+
+public slots:
+	void slotSelectBlock(QModelIndex);
+	void slotSelectMessage(QModelIndex);
+	void slotManageKeyProfiles();
+	//void slotLoadKeyProfile(int);
+	void slotUpdateKeyProfiles();
+	void slotMessageTreeContextMenu(const QPoint &);
+	void slotMessageTreeColumnMoved(int,int,int);
+	void slotDropToMessageTree(QString);
+	//void updateLogOutput();
+	void slotSwapAxes(bool);
+	
+signals:
+	void keyProfileLoaded(MvKeyProfile*);
+	void logOutputChanged();
+	void messageSelected(int);
+	void blockSelected(int);	
+	
+private:
+	void setupViewActions();
+	void setupSettingsActions();
+	void setupMessageBox();
+	void setupPlotBox();
+ 
+	void loadKeyProfile(MvKeyProfile *);
+
+	void renameMessageTreeHeader(int,QString);
+	void deleteMessageTreeColumn(int);
+
+	void loadItems(int);
+	void createPlot();
+	
+	MvQObstatScatterData *data_;
+ 	int currentBlockNo_;
+	int currentItemNo_;
+
+	MvQMainWindow::MenuItemMap menuItems_;
+
+	MvQFileInfoLabel*  fileInfoLabel_;
+
+	QGroupBox*   messageBox_;
+	QGroupBox*   dumpBox_;
+	QWidget*     plotPanel_;
+	QWidget*     messagePanel_;
+
+	QStackedWidget* dumpStacked_;
+
+	QComboBox*   keyCombo_;
+	QComboBox*   dumpCombo_;
+
+	QSplitter*    blockSplitter_; 	
+	MvQTreeView*   messageTree_;
+
+	
+	MvQTreeView*   stdDumpTree_;
+	MvQTreeView*    wmoDumpTree_;
+	QTextBrowser*  stdDumpBrowser_;
+	QTextBrowser*  wmoDumpBrowser_;
+
+	//QLabel* summaryTreeLabel_;
+
+	MvQKeyProfileModel* messageModel_;
+	QSortFilterProxyModel* messageSortModel_;
+
+	MvQTreeView*   blockTree_;
+	MvQKeyProfileModel* blockModel_;
+	QSortFilterProxyModel* blockSortModel_;
+
+
+	QLabel *plotWidget_;
+
+	QPushButton* swapPb_;
+	bool swapAxes_;
+
+	QString magmlScript_;
+
+};
+
+#endif
diff --git a/src/ObstatScatterTool/MvQObstatScatterToolBase.moc.cpp b/src/ObstatScatterTool/MvQObstatScatterToolBase.moc.cpp
new file mode 100644
index 0000000..0e9855d
--- /dev/null
+++ b/src/ObstatScatterTool/MvQObstatScatterToolBase.moc.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+** Meta object code from reading C++ file 'MvQObstatScatterToolBase.h'
+**
+** Created:
+**      by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include "MvQObstatScatterToolBase.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'MvQObstatScatterToolBase.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 62
+#error "This file was generated using the moc from 4.6.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_MvQObstatScatterToolBase[] = {
+
+ // content:
+       4,       // revision
+       0,       // classname
+       0,    0, // classinfo
+      12,   14, // methods
+       0,    0, // properties
+       0,    0, // enums/sets
+       0,    0, // constructors
+       0,       // flags
+       4,       // signalCount
+
+ // signals: signature, parameters, type, tag, flags
+      26,   25,   25,   25, 0x05,
+      58,   25,   25,   25, 0x05,
+      77,   25,   25,   25, 0x05,
+      98,   25,   25,   25, 0x05,
+
+ // slots: signature, parameters, type, tag, flags
+     117,   25,   25,   25, 0x0a,
+     146,   25,   25,   25, 0x0a,
+     177,   25,   25,   25, 0x0a,
+     201,   25,   25,   25, 0x0a,
+     225,   25,   25,   25, 0x0a,
+     263,  260,   25,   25, 0x0a,
+     303,   25,   25,   25, 0x0a,
+     334,   25,   25,   25, 0x0a,
+
+       0        // eod
+};
+
+static const char qt_meta_stringdata_MvQObstatScatterToolBase[] = {
+    "MvQObstatScatterToolBase\0\0"
+    "keyProfileLoaded(MvKeyProfile*)\0"
+    "logOutputChanged()\0messageSelected(int)\0"
+    "blockSelected(int)\0slotSelectBlock(QModelIndex)\0"
+    "slotSelectMessage(QModelIndex)\0"
+    "slotManageKeyProfiles()\0slotUpdateKeyProfiles()\0"
+    "slotMessageTreeContextMenu(QPoint)\0"
+    ",,\0slotMessageTreeColumnMoved(int,int,int)\0"
+    "slotDropToMessageTree(QString)\0"
+    "slotSwapAxes(bool)\0"
+};
+
+const QMetaObject MvQObstatScatterToolBase::staticMetaObject = {
+    { &QObject::staticMetaObject, qt_meta_stringdata_MvQObstatScatterToolBase,
+      qt_meta_data_MvQObstatScatterToolBase, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &MvQObstatScatterToolBase::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *MvQObstatScatterToolBase::metaObject() const
+{
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *MvQObstatScatterToolBase::qt_metacast(const char *_clname)
+{
+    if (!_clname) return 0;
+    if (!strcmp(_clname, qt_meta_stringdata_MvQObstatScatterToolBase))
+        return static_cast<void*>(const_cast< MvQObstatScatterToolBase*>(this));
+    return QObject::qt_metacast(_clname);
+}
+
+int MvQObstatScatterToolBase::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+    _id = QObject::qt_metacall(_c, _id, _a);
+    if (_id < 0)
+        return _id;
+    if (_c == QMetaObject::InvokeMetaMethod) {
+        switch (_id) {
+        case 0: keyProfileLoaded((*reinterpret_cast< MvKeyProfile*(*)>(_a[1]))); break;
+        case 1: logOutputChanged(); break;
+        case 2: messageSelected((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 3: blockSelected((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 4: slotSelectBlock((*reinterpret_cast< QModelIndex(*)>(_a[1]))); break;
+        case 5: slotSelectMessage((*reinterpret_cast< QModelIndex(*)>(_a[1]))); break;
+        case 6: slotManageKeyProfiles(); break;
+        case 7: slotUpdateKeyProfiles(); break;
+        case 8: slotMessageTreeContextMenu((*reinterpret_cast< const QPoint(*)>(_a[1]))); break;
+        case 9: slotMessageTreeColumnMoved((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
+        case 10: slotDropToMessageTree((*reinterpret_cast< QString(*)>(_a[1]))); break;
+        case 11: slotSwapAxes((*reinterpret_cast< bool(*)>(_a[1]))); break;
+        default: ;
+        }
+        _id -= 12;
+    }
+    return _id;
+}
+
+// SIGNAL 0
+void MvQObstatScatterToolBase::keyProfileLoaded(MvKeyProfile * _t1)
+{
+    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+    QMetaObject::activate(this, &staticMetaObject, 0, _a);
+}
+
+// SIGNAL 1
+void MvQObstatScatterToolBase::logOutputChanged()
+{
+    QMetaObject::activate(this, &staticMetaObject, 1, 0);
+}
+
+// SIGNAL 2
+void MvQObstatScatterToolBase::messageSelected(int _t1)
+{
+    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+    QMetaObject::activate(this, &staticMetaObject, 2, _a);
+}
+
+// SIGNAL 3
+void MvQObstatScatterToolBase::blockSelected(int _t1)
+{
+    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+    QMetaObject::activate(this, &staticMetaObject, 3, _a);
+}
+QT_END_MOC_NAMESPACE
diff --git a/src/ObstatScatterTool/OBSTAT_SCATTER.xpm b/src/ObstatScatterTool/OBSTAT_SCATTER.xpm
new file mode 100644
index 0000000..3433624
--- /dev/null
+++ b/src/ObstatScatterTool/OBSTAT_SCATTER.xpm
@@ -0,0 +1,552 @@
+/* XPM */
+static char * OBSTAT_SCATTER_xpm[] = {
+"32 32 517 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #C6C6C6",
+"@ 	c #7A7B7C",
+"# 	c #747676",
+"$ 	c #767676",
+"% 	c #757676",
+"& 	c #757575",
+"* 	c #747575",
+"= 	c #747474",
+"- 	c #79797A",
+"; 	c #C4C4C4",
+"> 	c #414345",
+", 	c #232B2E",
+"' 	c #556F79",
+") 	c #5E7982",
+"! 	c #647C84",
+"~ 	c #6C7F86",
+"{ 	c #728288",
+"] 	c #77848A",
+"^ 	c #7E888C",
+"/ 	c #858B8F",
+"( 	c #898E8F",
+"_ 	c #898E8E",
+": 	c #858B8D",
+"< 	c #82888B",
+"[ 	c #7F878A",
+"} 	c #7C8586",
+"| 	c #7B8585",
+"1 	c #798184",
+"2 	c #757F82",
+"3 	c #738081",
+"4 	c #727D7F",
+"5 	c #6F7B7E",
+"6 	c #6D7A7D",
+"7 	c #6B787B",
+"8 	c #667377",
+"9 	c #2B3030",
+"0 	c #3E3E3E",
+"a 	c #CBCBCB",
+"b 	c #1F272A",
+"c 	c #86BED2",
+"d 	c #92C4D5",
+"e 	c #9DCADA",
+"f 	c #A9D0DC",
+"g 	c #B3D5E1",
+"h 	c #BEDBE5",
+"i 	c #C8DFE7",
+"j 	c #D2E5EB",
+"k 	c #DBEAEE",
+"l 	c #E5EFF1",
+"m 	c #EAF0F1",
+"n 	c #E4ECEF",
+"o 	c #DFE8EB",
+"p 	c #DAE6E8",
+"q 	c #D6E3E5",
+"r 	c #D1DFE3",
+"s 	c #CDDCDF",
+"t 	c #C8D9DE",
+"u 	c #C5D8DB",
+"v 	c #C1D5D9",
+"w 	c #B5C9CC",
+"x 	c #425952",
+"y 	c #54766D",
+"z 	c #54756D",
+"A 	c #53756D",
+"B 	c #627877",
+"C 	c #272C2D",
+"D 	c #C3C3C3",
+"E 	c #40636E",
+"F 	c #82BCD1",
+"G 	c #8EC2D5",
+"H 	c #9AC8D9",
+"I 	c #A4CEDB",
+"J 	c #B0D3E0",
+"K 	c #BBD8E3",
+"L 	c #C5DEE7",
+"M 	c #CEE2EB",
+"N 	c #D9E9ED",
+"O 	c #E2EEF1",
+"P 	c #ECF2F3",
+"Q 	c #E4EEEF",
+"R 	c #E0EAEB",
+"S 	c #DAE7E8",
+"T 	c #D2E0E4",
+"U 	c #CEDDE1",
+"V 	c #CADADF",
+"W 	c #C7D9DC",
+"X 	c #C3D5DA",
+"Y 	c #B3C5CA",
+"Z 	c #568076",
+"` 	c #7BC3AD",
+" .	c #617C79",
+"..	c #637073",
+"+.	c #7A7A7A",
+"@.	c #727575",
+"#.	c #406472",
+"$.	c #7FBAD0",
+"%.	c #8AC0D4",
+"&.	c #96C7D6",
+"*.	c #A1CCDB",
+"=.	c #AED2DF",
+"-.	c #B7D7E2",
+";.	c #C1DDE6",
+">.	c #CCE1E9",
+",.	c #D5E6EC",
+"'.	c #DEEBEF",
+").	c #E7F0F2",
+"!.	c #E6F0F0",
+"~.	c #E2ECED",
+"{.	c #DDE7EB",
+"].	c #D7E4E8",
+"^.	c #D3E1E4",
+"/.	c #D0DEE0",
+"(.	c #CCDCDE",
+"_.	c #C8D8DC",
+":.	c #C4D6DB",
+"<.	c #B4C5CA",
+"[.	c #578176",
+"}.	c #6A787B",
+"|.	c #3E6470",
+"1.	c #7BB8CE",
+"2.	c #86BED3",
+"3.	c #93C5D5",
+"4.	c #9ECBDA",
+"5.	c #A9D0DD",
+"6.	c #B4D5E1",
+"7.	c #BFDAE5",
+"8.	c #C8E0E7",
+"9.	c #D3E6EA",
+"0.	c #E6EFF1",
+"a.	c #E8F0F1",
+"b.	c #E2ECEE",
+"c.	c #DEE8EB",
+"d.	c #DAE5E8",
+"e.	c #D4E3E5",
+"f.	c #B6C8CB",
+"g.	c #568174",
+"h.	c #617E7A",
+"i.	c #727375",
+"j.	c #3C6370",
+"k.	c #77B6CD",
+"l.	c #82BCD2",
+"m.	c #90C3D5",
+"n.	c #9AC9D9",
+"o.	c #A6CFDC",
+"p.	c #B1D3E0",
+"q.	c #BBD9E4",
+"r.	c #C6DFE7",
+"s.	c #CFE4EB",
+"t.	c #D9E9EE",
+"u.	c #EAF2F3",
+"v.	c #969792",
+"w.	c #8E887E",
+"x.	c #8B867E",
+"y.	c #8A867C",
+"z.	c #88847B",
+"A.	c #868279",
+"B.	c #807D74",
+"C.	c #3B4F48",
+"D.	c #57766F",
+"E.	c #57756E",
+"F.	c #56756F",
+"G.	c #667E7C",
+"H.	c #6A787A",
+"I.	c #386170",
+"J.	c #73B5CC",
+"K.	c #80BAD0",
+"L.	c #8CC1D4",
+"M.	c #97C7D8",
+"N.	c #A3CDDB",
+"O.	c #B9D7E3",
+"P.	c #C2DDE6",
+"Q.	c #CDE1E9",
+"R.	c #D6E7EC",
+"S.	c #DFECEF",
+"T.	c #E9F0F3",
+"U.	c #E6EEF1",
+"V.	c #908A7E",
+"W.	c #DDB383",
+"X.	c #DCB082",
+"Y.	c #DBB080",
+"Z.	c #DAB081",
+"`.	c #D9AE7F",
+" +	c #D8AE7E",
+".+	c #838177",
+"++	c #BDD2D7",
+"@+	c #BBCFD3",
+"#+	c #B8CDD2",
+"$+	c #B5CDD0",
+"%+	c #69787A",
+"&+	c #376070",
+"*+	c #6FB3CB",
+"=+	c #7CB9CE",
+"-+	c #88C0D3",
+";+	c #94C5D7",
+">+	c #AAD1DD",
+",+	c #B4D6E2",
+"'+	c #C9E0E8",
+")+	c #D4E6EA",
+"!+	c #DDEBEE",
+"~+	c #E6EFF2",
+"{+	c #918B7F",
+"]+	c #DFB282",
+"^+	c #DDB183",
+"/+	c #DCB181",
+"(+	c #D9AF80",
+"_+	c #D8AF7F",
+":+	c #D9AF7F",
+"<+	c #838279",
+"[+	c #BFD2D6",
+"}+	c #BBD1D5",
+"|+	c #B9CFD4",
+"1+	c #B7CCD2",
+"2+	c #36606F",
+"3+	c #6CB1C9",
+"4+	c #78B6CD",
+"5+	c #84BDD2",
+"6+	c #90C3D6",
+"7+	c #9BC9D9",
+"8+	c #B2D4E0",
+"9+	c #C7DFE7",
+"0+	c #D0E4EB",
+"a+	c #E3EEF1",
+"b+	c #E4ECEE",
+"c+	c #928B80",
+"d+	c #DFB283",
+"e+	c #DCB283",
+"f+	c #DBB081",
+"g+	c #DCB080",
+"h+	c #848278",
+"i+	c #BED2D8",
+"j+	c #BBD2D6",
+"k+	c #B9CED3",
+"l+	c #B8CED1",
+"m+	c #335F6F",
+"n+	c #68AEC9",
+"o+	c #74B5CC",
+"p+	c #81BBD1",
+"q+	c #8CC2D4",
+"r+	c #97C8D8",
+"s+	c #B9D8E3",
+"t+	c #C4DEE6",
+"u+	c #CEE2E9",
+"v+	c #D6E7ED",
+"w+	c #E1ECEF",
+"x+	c #E6EEF0",
+"y+	c #948C81",
+"z+	c #E0B383",
+"A+	c #848178",
+"B+	c #C0D3D7",
+"C+	c #BDD2D6",
+"D+	c #315D6D",
+"E+	c #64ADC8",
+"F+	c #71B3CB",
+"G+	c #7DB9CF",
+"H+	c #94C6D7",
+"I+	c #A0CCDB",
+"J+	c #B6D6E2",
+"K+	c #C0DCE5",
+"L+	c #CAE0E8",
+"M+	c #D4E6EC",
+"N+	c #DEEBEE",
+"O+	c #948B81",
+"P+	c #E0B284",
+"Q+	c #DEB282",
+"R+	c #DCB180",
+"S+	c #D8AE7F",
+"T+	c #858379",
+"U+	c #C1D5D8",
+"V+	c #BDD1D6",
+"W+	c #B9CFD3",
+"X+	c #2F5B6C",
+"Y+	c #5FABC5",
+"Z+	c #6DB2C9",
+"`+	c #78B6CE",
+" @	c #85BDD2",
+".@	c #90C4D6",
+"+@	c #A7CFDC",
+"@@	c #9BB8C3",
+"#@	c #9DB4BD",
+"$@	c #A3B8C0",
+"%@	c #ACBDC2",
+"&@	c #B5C1C5",
+"*@	c #BDC5C7",
+"=@	c #C2C7C7",
+"-@	c #827B72",
+";@	c #D9AF81",
+">@	c #D8AD7F",
+",@	c #D7AD80",
+"'@	c #D6AD7E",
+")@	c #D5AB7D",
+"!@	c #858279",
+"~@	c #C1D6D9",
+"{@	c #BED3D7",
+"]@	c #BBD2D4",
+"^@	c #6D7A7B",
+"/@	c #717375",
+"(@	c #2C5B6C",
+"_@	c #5CA8C4",
+":@	c #68AFC9",
+"<@	c #75B6CC",
+"[@	c #8DC2D5",
+"}@	c #99C8D9",
+"|@	c #5C555A",
+"1@	c #A0555E",
+"2@	c #A45760",
+"3@	c #A65761",
+"4@	c #A95A61",
+"5@	c #AC5A63",
+"6@	c #B05C63",
+"7@	c #634F4F",
+"8@	c #979793",
+"9@	c #939492",
+"0@	c #92938F",
+"a@	c #8F918D",
+"b@	c #8D908C",
+"c@	c #8A8E8A",
+"d@	c #9EA6A6",
+"e@	c #BDD1D5",
+"f@	c #BBD0D5",
+"g@	c #295A6A",
+"h@	c #58A6C4",
+"i@	c #71B4CB",
+"j@	c #7DBAD0",
+"k@	c #89C0D4",
+"l@	c #96C6D6",
+"m@	c #6C5861",
+"n@	c #DE5765",
+"o@	c #E15968",
+"p@	c #E45A68",
+"q@	c #E75C68",
+"r@	c #EB5E6A",
+"s@	c #EF5F6B",
+"t@	c #836C6F",
+"u@	c #D0DEE2",
+"v@	c #C7D8DD",
+"w@	c #C4D7DA",
+"x@	c #28596A",
+"y@	c #54A4C2",
+"z@	c #61AAC7",
+"A@	c #6EB2C9",
+"B@	c #6A5861",
+"C@	c #DD5765",
+"D@	c #E05968",
+"E@	c #E35A68",
+"F@	c #E65B68",
+"G@	c #E95E6A",
+"H@	c #ED5E6A",
+"I@	c #846D70",
+"J@	c #BBD0D4",
+"K@	c #6D7B7D",
+"L@	c #25566A",
+"M@	c #4FA3C1",
+"N@	c #5DAAC5",
+"O@	c #6AAFC9",
+"P@	c #69585F",
+"Q@	c #DC5665",
+"R@	c #E05967",
+"S@	c #E65B69",
+"T@	c #856D70",
+"U@	c #C0D2D8",
+"V@	c #6F7B7D",
+"W@	c #245669",
+"X@	c #4CA0BF",
+"Y@	c #5AA8C3",
+"Z@	c #66AEC8",
+"`@	c #72B4CB",
+" #	c #68585F",
+".#	c #DB5665",
+"+#	c #E15967",
+"@#	c #E45A69",
+"##	c #E85D6A",
+"$#	c #856D6F",
+"%#	c #CFDEE2",
+"&#	c #C0D3D9",
+"*#	c #BDD3D7",
+"=#	c #6D7B7E",
+"-#	c #215567",
+";#	c #489EBE",
+">#	c #55A5C2",
+",#	c #63ACC7",
+"'#	c #6EB2CB",
+")#	c #88BED3",
+"!#	c #67575F",
+"~#	c #DA5665",
+"{#	c #826C6F",
+"]#	c #C5D6DB",
+"^#	c #1F5567",
+"/#	c #449CBE",
+"(#	c #52A4C1",
+"_#	c #5EAAC5",
+":#	c #6AB0C9",
+"<#	c #64555F",
+"[#	c #D95665",
+"}#	c #DD5665",
+"|#	c #CEDDDF",
+"1#	c #CADADD",
+"2#	c #C5D7DC",
+"3#	c #1B5367",
+"4#	c #265570",
+"5#	c #213E5E",
+"6#	c #25405F",
+"7#	c #284161",
+"8#	c #2C4261",
+"9#	c #2E4564",
+"0#	c #314664",
+"a#	c #342F39",
+"b#	c #6B606A",
+"c#	c #6E616A",
+"d#	c #75646D",
+"e#	c #78676D",
+"f#	c #7E6A6F",
+"g#	c #836C71",
+"h#	c #888082",
+"i#	c #DDE7E9",
+"j#	c #D7E4E6",
+"k#	c #CBDBDF",
+"l#	c #195066",
+"m#	c #1D415C",
+"n#	c #3E5CBF",
+"o#	c #374B6B",
+"p#	c #DDE9EB",
+"q#	c #D5E1E4",
+"r#	c #D0DEE3",
+"s#	c #C7D9DD",
+"t#	c #C2D5D8",
+"u#	c #707C7F",
+"v#	c #165064",
+"w#	c #1C405C",
+"x#	c #DAE9EE",
+"y#	c #D2E0E3",
+"z#	c #707375",
+"A#	c #144F64",
+"B#	c #1A405C",
+"C#	c #344A69",
+"D#	c #E2EAED",
+"E#	c #DBE7E9",
+"F#	c #CBDBDD",
+"G#	c #C6D7DC",
+"H#	c #C2D6D9",
+"I#	c #727E7F",
+"J#	c #114E64",
+"K#	c #183E5C",
+"L#	c #334A69",
+"M#	c #CAE1E8",
+"N#	c #D9E4E8",
+"O#	c #727D80",
+"P#	c #0F4D63",
+"Q#	c #173D5C",
+"R#	c #324969",
+"S#	c #BDD9E4",
+"T#	c #E5EEF1",
+"U#	c #EAF0F2",
+"V#	c #DFE9EB",
+"W#	c #CDDCE1",
+"X#	c #7D7F80",
+"Y#	c #0D465A",
+"Z#	c #163A58",
+"`#	c #344EA1",
+" $	c #2E4462",
+".$	c #D8E7ED",
+"+$	c #E2ECF1",
+"@$	c #E0EAED",
+"#$	c #CFDEE0",
+"$$	c #677174",
+"%$	c #7C7D7D",
+"&$	c #D7D7D7",
+"*$	c #0E1A1E",
+"=$	c #1B6D8F",
+"-$	c #215D77",
+";$	c #29627A",
+">$	c #2F647D",
+",$	c #38687F",
+"'$	c #406C81",
+")$	c #477084",
+"!$	c #608EA1",
+"~$	c #ACD2DF",
+"{$	c #B6D7E2",
+"]$	c #CCE1E8",
+"^$	c #E7EFF2",
+"/$	c #C4D5D9",
+"($	c #212223",
+"_$	c #CFCFCF",
+":$	c #5A5E60",
+"<$	c #0C1317",
+"[$	c #1A4353",
+"}$	c #1F4B5D",
+"|$	c #25505E",
+"1$	c #2C5461",
+"2$	c #325663",
+"3$	c #395A65",
+"4$	c #3E5C67",
+"5$	c #445F69",
+"6$	c #4A626A",
+"7$	c #4F666C",
+"8$	c #54686E",
+"9$	c #596B6F",
+"0$	c #5F6E72",
+"a$	c #647073",
+"b$	c #697175",
+"c$	c #6D7476",
+"d$	c #717778",
+"e$	c #747879",
+"f$	c #717677",
+"g$	c #6F7474",
+"h$	c #6C7273",
+"i$	c #6B7071",
+"j$	c #696F71",
+"k$	c #5F6566",
+"l$	c #1A1B1B",
+"m$	c #5D5D5D",
+"n$	c #DFDFDF",
+"o$	c #949494",
+"p$	c #8F8F8F",
+"q$	c #939393",
+"r$	c #DDDDDD",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . + @ # # # # $ $ $ $ $ $ % & & * * * = & & & & & - ; . . . ",
+". . > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 5 6 7 8 9 0 . . ",
+". a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D . ",
+". @ E F G H I J K L M N O P Q R S q T U V W X Y Z ` ` `  ...+.. ",
+". @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.` ` `  .}.* . ",
+". @.|.1.2.3.4.5.6.7.8.9.k 0.a.b.c.d.e.r s t u f.g.` ` ` h.}.* . ",
+". i.j.k.l.m.n.o.p.q.r.s.t.O u.n R v.w.x.y.z.A.B.C.D.E.F.G.H.* . ",
+". i.I.J.K.L.M.N.=.O.P.Q.R.S.T.U.~.V.W.X.Y.Z.`. +.+++ at +#+$+%+* . ",
+". i.&+*+=+-+;+4.>+,+7.'+)+!+~+a.b.{+]+^+/+(+_+:+<+[+}+|+1+7 * . ",
+". i.2+3+4+5+6+7+o.8+q.9+0+t.a+u.b+c+d+e+f+g+(+`.h+i+j+k+l+7 * . ",
+". i.m+n+o+p+q+r+N.=.s+t+u+v+w+u.x+y+z+W.X.Y.Z.`.A+B+C+ at +#+7 & . ",
+". i.D+E+F+G+-+H+I+>+J+K+L+M+N+~+a.O+P+Q+^+R+:+S+T+U+V+}+W+7 & . ",
+". i.X+Y+Z+`+ @. at e +@@@#@$@%@&@*@=@- at X.;@>@,@'@)@!@~@{@]@k+^@& . ",
+". /@(@_@:@<@p+[@}@I |@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@a at b@c at d@X B+e at f@6 & . ",
+". /@g at h@E+i at j@k at l@I+m at n@o at p@q at r@s at t@~.{.].^.u@(.v at w@U+e at f@6 & . ",
+". /@x at y@z at A@1.c d e B at C@D at E@F at G@H at I@n o p q r s t u v {@J at K@& . ",
+". /@L at M@N at O@k.F G H P at Q@R at E@S at G@r at T@Q R S q T U V W X U at e@V@& . ",
+". /@W at X@Y at Z@`@$.%.M. #.#n at +#@###r@$#!.~.{.].^.%#(._.:.&#*#=#& . ",
+". /@-#;#>#,#'#1.)#3.!#~#C at R@E at F@G@{#a.b.c.d.e.r s t ]#v {@5 & . ",
+". /@^#/#(#_#:#k.l.m.<#[#}#R at E@F at G@{#u.n R S q T |#1#2#X i+5 & . ",
+". /@3#4#5#6#7#8#9#0#a#b#c#d#e#f#g#h#T.U.~.i#j#T %#k#_.:.&#5 & . ",
+". /@l#m#n#n#n#n#n#n#o#4.>+,+7.'+)+!+~+a.b.p#d.q#r#(.s#w at t#u#& . ",
+". /@v#w#n#n#n#n#n#n#o#7+o.8+q.9+0+x#a+u.b+R S q y#|#1#2#~@u#& . ",
+". z#A#B#n#n#n#n#n#n#C#r+N.=.s+t+u+v+w+u.x+D#E#j#T %#F#G#H#I#& . ",
+". z#J#K#n#n#n#n#n#n#L#H+I+>+J+K+M#M+N+~+a.~.{.N#q#u@(.v at w@O#& . ",
+". z#P#Q#n#n#n#n#n#n#R#. at e + at g S#i j x#T#U#Q V#p q r W#t u O#& . ",
+". X#Y#Z#`#`#`#`#`#`# $[@H I J s+t+u+.$+$u.x+@$E#j#T #$F#G#$$%$. ",
+". &$*$=$-$;$>$,$'$)$!$%.l at I+~${$K+]$,.'.^$!.~.{.].^.u@(./$($_$. ",
+". . :$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$. . ",
+". . . n$o$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$q$r$. . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/src/ObstatScatterTool/ObjectSpec.ObstatScatter b/src/ObstatScatterTool/ObjectSpec.ObstatScatter
new file mode 100644
index 0000000..7b3d120
--- /dev/null
+++ b/src/ObstatScatterTool/ObjectSpec.ObstatScatter
@@ -0,0 +1,27 @@
+################################################################################
+#
+#	ObjectSpec.ObstatScatter
+#
+
+
+object,
+	class		= OBSTAT_SCATTER,
+	check           = False,
+	default_object  = False,
+	type		= File,
+	default_name    = 'OBSTAT ScatterPlot',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/OBSTAT_SCATTER.icon',
+	editor_type     = NoEditor
+
+
+state,
+	class    = OBSTAT_SCATTER,
+	action	 = examine,
+	service  = ObstatScatterTool
+
+service,
+	name	 = 'ObstatScatterTool',
+	maximum	 = 0,
+	timeout  = $timeout, # set in script
+	fullname = OBSTAT Scatter Tool,
+	cmd	 = "$metview_command $METVIEW_BIN/ObstatToolWrapper ObstatScatterTool -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss"
diff --git a/src/Odb/Makefile.am b/src/Odb/Makefile.am
new file mode 100644
index 0000000..836e290
--- /dev/null
+++ b/src/Odb/Makefile.am
@@ -0,0 +1,49 @@
+
+bin_PROGRAMS      = bin/OdbFilter bin/OdbVisualiser
+
+#---------------------------------------
+
+bin_OdbFilter_SOURCES = OdbFilter.cc	
+
+bin_OdbFilter_CPPFLAGS = $(ODB_CPPFLAGS) -I../libUtil -I../libMetview
+bin_OdbFilter_LDFLAGS  = $(ODB_LDFLAGS)
+bin_OdbFilter_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS) $(ODB_LIBS)
+bin_OdbFilter_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+
+#-----------------------------------------
+
+bin_OdbVisualiser_SOURCES = OdbVisualiser.cc
+	
+bin_OdbVisualiser_CPPFLAGS = $(ODB_CPPFLAGS) -I../libUtil -I../libMetview
+bin_OdbVisualiser_LDFLAGS  = $(ODB_LDFLAGS)
+bin_OdbVisualiser_LDADD    = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS) $(ODB_LIBS)
+bin_OdbVisualiser_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Odb \
+	     $(local_sharedir)/OdbFilterDef $(local_sharedir)/OdbFilterRules \
+	     $(local_sharedir)/OdbVisualiserDef $(local_sharedir)/OdbVisualiserRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons = $(local_iconsdir)/ODB_FILTER.xpm \
+	$(local_iconsdir)/ODB_VISUALISER.xpm
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(icons)
+
+
+BUILT_SOURCES = bin $(icons)
+
+EXTRA_DIST = ODB_FILTER.xpm ODB_VISUALISER.xpm ObjectSpec.Odb OdbFilterDef OdbFilterRules OdbVisualiserDef OdbVisualiserRules 
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Odb/Makefile.in b/src/Odb/Makefile.in
new file mode 100644
index 0000000..04b8ced
--- /dev/null
+++ b/src/Odb/Makefile.in
@@ -0,0 +1,752 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/OdbFilter$(EXEEXT) bin/OdbVisualiser$(EXEEXT)
+subdir = src/Odb
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_OdbFilter_OBJECTS = bin_OdbFilter-OdbFilter.$(OBJEXT)
+bin_OdbFilter_OBJECTS = $(am_bin_OdbFilter_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_OdbFilter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_OdbFilter_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_OdbVisualiser_OBJECTS =  \
+	bin_OdbVisualiser-OdbVisualiser.$(OBJEXT)
+bin_OdbVisualiser_OBJECTS = $(am_bin_OdbVisualiser_OBJECTS)
+bin_OdbVisualiser_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_OdbVisualiser_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_OdbFilter_SOURCES) $(bin_OdbVisualiser_SOURCES)
+DIST_SOURCES = $(bin_OdbFilter_SOURCES) $(bin_OdbVisualiser_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#---------------------------------------
+bin_OdbFilter_SOURCES = OdbFilter.cc	
+bin_OdbFilter_CPPFLAGS = $(ODB_CPPFLAGS) -I../libUtil -I../libMetview
+bin_OdbFilter_LDFLAGS = $(ODB_LDFLAGS)
+bin_OdbFilter_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS) $(ODB_LIBS)
+bin_OdbFilter_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+
+#-----------------------------------------
+bin_OdbVisualiser_SOURCES = OdbVisualiser.cc
+bin_OdbVisualiser_CPPFLAGS = $(ODB_CPPFLAGS) -I../libUtil -I../libMetview
+bin_OdbVisualiser_LDFLAGS = $(ODB_LDFLAGS)
+bin_OdbVisualiser_LDADD = $(STANDARD_METVIEW_LIBS) ../../lib/libUtil.a  $(FLIBS) $(ODB_LIBS)
+bin_OdbVisualiser_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Odb \
+	     $(local_sharedir)/OdbFilterDef $(local_sharedir)/OdbFilterRules \
+	     $(local_sharedir)/OdbVisualiserDef $(local_sharedir)/OdbVisualiserRules
+
+icons = $(local_iconsdir)/ODB_FILTER.xpm \
+	$(local_iconsdir)/ODB_VISUALISER.xpm
+
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin $(icons)
+EXTRA_DIST = ODB_FILTER.xpm ODB_VISUALISER.xpm ObjectSpec.Odb OdbFilterDef OdbFilterRules OdbVisualiserDef OdbVisualiserRules 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Odb/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Odb/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/OdbFilter$(EXEEXT): $(bin_OdbFilter_OBJECTS) $(bin_OdbFilter_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/OdbFilter$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_OdbFilter_LINK) $(bin_OdbFilter_OBJECTS) $(bin_OdbFilter_LDADD) $(LIBS)
+bin/OdbVisualiser$(EXEEXT): $(bin_OdbVisualiser_OBJECTS) $(bin_OdbVisualiser_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/OdbVisualiser$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_OdbVisualiser_LINK) $(bin_OdbVisualiser_OBJECTS) $(bin_OdbVisualiser_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbFilter-OdbFilter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_OdbFilter-OdbFilter.o: OdbFilter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbFilter_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbFilter-OdbFilter.o -MD -MP -MF $(DEPDIR)/bin_OdbFilter-OdbFilter.Tpo -c -o bin_OdbFilter-OdbFilter.o `test -f 'OdbFilter.cc' || echo '$(srcdir)/'`OdbFilter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbFilter-OdbFilter.Tpo $(DEPDIR)/bin_OdbFilter-OdbFilter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbFilter.cc' object='bin_OdbFilter-OdbFilter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbFilter_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbFilter-OdbFilter.o `test -f 'OdbFilter.cc' || echo '$(srcdir)/'`OdbFilter.cc
+
+bin_OdbFilter-OdbFilter.obj: OdbFilter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbFilter_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbFilter-OdbFilter.obj -MD -MP -MF $(DEPDIR)/bin_OdbFilter-OdbFilter.Tpo -c -o bin_OdbFilter-OdbFilter.obj `if test -f 'OdbFilter.cc'; then $(CYGPATH_W) 'OdbFilter.cc'; else $(CYGPATH_W) '$(srcdir)/OdbFilter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbFilter-OdbFilter.Tpo $(DEPDIR)/bin_OdbFilter-OdbFilter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbFilter.cc' object='bin_OdbFilter-OdbFilter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbFilter_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbFilter-OdbFilter.obj `if test -f 'OdbFilter.cc'; then $(CYGPATH_W) 'OdbFilter.cc'; else $(CYGPATH_W) '$(srcdir)/OdbFilter.cc'; fi`
+
+bin_OdbVisualiser-OdbVisualiser.o: OdbVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbVisualiser-OdbVisualiser.o -MD -MP -MF $(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Tpo -c -o bin_OdbVisualiser-OdbVisualiser.o `test -f 'OdbVisualiser.cc' || echo '$(srcdir)/'`OdbVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Tpo $(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbVisualiser.cc' object='bin_OdbVisualiser-OdbVisualiser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbVisualiser-OdbVisualiser.o `test -f 'OdbVisualiser.cc' || echo '$(srcdir)/'`OdbVisualiser.cc
+
+bin_OdbVisualiser-OdbVisualiser.obj: OdbVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbVisualiser-OdbVisualiser.obj -MD -MP -MF $(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Tpo -c -o bin_OdbVisualiser-OdbVisualiser.obj `if test -f 'OdbVisualiser.cc'; then $(CYGPATH_W) 'OdbVisualiser.cc'; else $(CYGPATH_W) '$(srcdir)/OdbVisualiser.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Tpo $(DEPDIR)/bin_OdbVisualiser-OdbVisualiser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbVisualiser.cc' object='bin_OdbVisualiser-OdbVisualiser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbVisualiser-OdbVisualiser.obj `if test -f 'OdbVisualiser.cc'; then $(CYGPATH_W) 'OdbVisualiser.cc'; else $(CYGPATH_W) '$(srcdir)/OdbVisualiser.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Odb/ODB_FILTER.xpm b/src/Odb/ODB_FILTER.xpm
new file mode 100755
index 0000000..361d945
--- /dev/null
+++ b/src/Odb/ODB_FILTER.xpm
@@ -0,0 +1,590 @@
+/* XPM */
+static char * ODB_FILTER_xpm[] = {
+"32 32 555 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #F4F5FA",
+"@ 	c #D4D9EC",
+"# 	c #B4BDDD",
+"$ 	c #95A3CF",
+"% 	c #8A98CA",
+"& 	c #8191C6",
+"* 	c #7888C2",
+"= 	c #7083BF",
+"- 	c #7082BF",
+"; 	c #7183BF",
+"> 	c #798AC3",
+", 	c #8392C7",
+"' 	c #8E9CCC",
+") 	c #98A4D1",
+"! 	c #B5BDDE",
+"~ 	c #D6DAEC",
+"{ 	c #FEFEFE",
+"] 	c #D1D6EA",
+"^ 	c #8694C8",
+"/ 	c #697BBB",
+"( 	c #6F81BD",
+"_ 	c #7E91C1",
+": 	c #8BA1C5",
+"< 	c #9CB2CC",
+"[ 	c #A4BBD0",
+"} 	c #ABC4D3",
+"| 	c #B4CCD6",
+"1 	c #BAD4DA",
+"2 	c #BDD7DC",
+"3 	c #BFDADE",
+"4 	c #C1DBDF",
+"5 	c #BFD7DD",
+"6 	c #BAD0DA",
+"7 	c #B5CAD9",
+"8 	c #B0C2D6",
+"9 	c #9DAFCE",
+"0 	c #899AC8",
+"a 	c #7384BF",
+"b 	c #6C7EBD",
+"c 	c #8C9ACB",
+"d 	c #D5DAEC",
+"e 	c #B6BEDE",
+"f 	c #6A7CBC",
+"g 	c #788BBE",
+"h 	c #94AAC5",
+"i 	c #A8BDCC",
+"j 	c #AAC0CE",
+"k 	c #ACC3D0",
+"l 	c #AFC6D1",
+"m 	c #B1C9D3",
+"n 	c #B4CCD5",
+"o 	c #B6CFD7",
+"p 	c #B9D2D9",
+"q 	c #BBD5DB",
+"r 	c #BDD8DD",
+"s 	c #C0DBDF",
+"t 	c #C2DBDF",
+"u 	c #C4DCDF",
+"v 	c #C7DCE0",
+"w 	c #C9DDE0",
+"x 	c #CCDEE0",
+"y 	c #CEDEE0",
+"z 	c #D0DFE1",
+"A 	c #D3DFE1",
+"B 	c #D4E0E1",
+"C 	c #BAC5D7",
+"D 	c #8795C6",
+"E 	c #7282BF",
+"F 	c #BFC6E2",
+"G 	c #C3CAE4",
+"H 	c #7183BB",
+"I 	c #9DB2C6",
+"J 	c #A4B9C9",
+"K 	c #A6BBCA",
+"L 	c #A8BECC",
+"M 	c #ABC1CE",
+"N 	c #ADC4D0",
+"O 	c #B0C7D2",
+"P 	c #B2CAD4",
+"Q 	c #B4CDD6",
+"R 	c #B7D0D8",
+"S 	c #B9D3DA",
+"T 	c #BCD6DC",
+"U 	c #BED9DD",
+"V 	c #C3DBDF",
+"W 	c #C5DCDF",
+"X 	c #C8DDE0",
+"Y 	c #CADDE0",
+"Z 	c #CFDEE1",
+"` 	c #D1DFE1",
+" .	c #D6E0E2",
+"..	c #D8E1E2",
+"+.	c #DAE1E2",
+"@.	c #D4DAE0",
+"#.	c #7C8BC2",
+"$.	c #CFD4E9",
+"%.	c #5F71B7",
+"&.	c #97ACC3",
+"*.	c #A2B6C7",
+"=.	c #A7BCCB",
+"-.	c #A9BFCD",
+";.	c #ACC2CF",
+">.	c #AEC5D1",
+",.	c #B0C8D3",
+"'.	c #B3CBD5",
+").	c #B5CED6",
+"!.	c #B8D1D8",
+"~.	c #BCD7DC",
+"{.	c #C6DCDF",
+"].	c #CBDDE0",
+"^.	c #CDDEE0",
+"/.	c #D2DFE1",
+"(.	c #D9E1E2",
+"_.	c #DBE1E2",
+":.	c #DDE2E3",
+"<.	c #CAD0DC",
+"[.	c #6878BB",
+"}.	c #5568B4",
+"|.	c #6175B5",
+"1.	c #97AAC5",
+"2.	c #A5BACA",
+"3.	c #A7BDCC",
+"4.	c #ACC3CF",
+"5.	c #B8D2D9",
+"6.	c #C7DCDF",
+"7.	c #D5E0E1",
+"8.	c #D7E0E2",
+"9.	c #DCE2E2",
+"0.	c #C4CBD9",
+"a.	c #6476B6",
+"b.	c #5F70B6",
+"c.	c #596DB3",
+"d.	c #7691B2",
+"e.	c #5A6FB3",
+"f.	c #6377B7",
+"g.	c #879CC3",
+"h.	c #AFC7D2",
+"i.	c #BCD6DB",
+"j.	c #CEDEE1",
+"k.	c #D0DADF",
+"l.	c #A3AECE",
+"m.	c #6376B6",
+"n.	c #5A6CAF",
+"o.	c #868DA9",
+"p.	c #5D6FB4",
+"q.	c #5B6FB5",
+"r.	c #8EB0B3",
+"s.	c #98B8BB",
+"t.	c #87A2BC",
+"u.	c #6F86BB",
+"v.	c #5D70B5",
+"w.	c #5C70B6",
+"x.	c #687BBA",
+"y.	c #768DBF",
+"z.	c #8AA1C7",
+"A.	c #95ACCC",
+"B.	c #A2BBD1",
+"C.	c #B1CBD8",
+"D.	c #BFD9DD",
+"E.	c #C5DADE",
+"F.	c #BACFDB",
+"G.	c #AEC1D5",
+"H.	c #A3B5D0",
+"I.	c #97A9CC",
+"J.	c #8292C3",
+"K.	c #677BB9",
+"L.	c #586DB3",
+"M.	c #596DB2",
+"N.	c #6277AE",
+"O.	c #687FA0",
+"P.	c #8B979E",
+"Q.	c #A5A4A4",
+"R.	c #8FB0B4",
+"S.	c #A2C0C3",
+"T.	c #ABC8CA",
+"U.	c #B5D0D2",
+"V.	c #B7D0D7",
+"W.	c #A7BED4",
+"X.	c #91A7CE",
+"Y.	c #7E94C5",
+"Z.	c #7289C0",
+"`.	c #697EBB",
+" +	c #6075B7",
+".+	c #5A70B6",
+"++	c #576DB4",
+"@+	c #5A6FB5",
+"#+	c #5F74B5",
+"$+	c #647BB8",
+"%+	c #6B82B9",
+"&+	c #6F89BA",
+"*+	c #7C95BA",
+"=+	c #86A5B8",
+"-+	c #8BAAB2",
+";+	c #84A1A9",
+">+	c #7A95A0",
+",+	c #738C98",
+"'+	c #8D989E",
+")+	c #A7A4A4",
+"!+	c #8FB1B4",
+"~+	c #99B9BC",
+"{+	c #A2C1C3",
+"]+	c #ACC9CB",
+"^+	c #B5D1D3",
+"/+	c #BFD8DA",
+"(+	c #C8E0E2",
+"_+	c #D0E7E8",
+":+	c #CCE4E5",
+"<+	c #C9E2E2",
+"[+	c #C5DFDF",
+"}+	c #C1DCDD",
+"|+	c #BDD9DA",
+"1+	c #BAD6D7",
+"2+	c #B6D3D4",
+"3+	c #B2D0D1",
+"4+	c #AECECE",
+"5+	c #ABCBCB",
+"6+	c #A7C8C8",
+"7+	c #A3C5C5",
+"8+	c #9FC2C2",
+"9+	c #97B8BB",
+"0+	c #8DACB1",
+"a+	c #83A0A8",
+"b+	c #79949F",
+"c+	c #768D99",
+"d+	c #90999F",
+"e+	c #A9A6A5",
+"f+	c #5D70B4",
+"g+	c #90B1B5",
+"h+	c #9AB9BC",
+"i+	c #A3C1C4",
+"j+	c #B6D1D3",
+"k+	c #BFD9DB",
+"l+	c #C9E1E2",
+"m+	c #C8E1E2",
+"n+	c #C5DEDF",
+"o+	c #C1DCDC",
+"p+	c #BDD9D9",
+"q+	c #B9D6D6",
+"r+	c #899FA6",
+"s+	c #6E7F89",
+"t+	c #6D7E88",
+"u+	c #6B7C86",
+"v+	c #697B84",
+"w+	c #647580",
+"x+	c #556472",
+"y+	c #5A6876",
+"z+	c #546272",
+"A+	c #54606F",
+"B+	c #616672",
+"C+	c #6F6C76",
+"D+	c #464F7D",
+"E+	c #F2F2F3",
+"F+	c #556AB3",
+"G+	c #8EAEB5",
+"H+	c #9ABABD",
+"I+	c #A4C2C4",
+"J+	c #ADCACC",
+"K+	c #B6D2D4",
+"L+	c #C0DADB",
+"M+	c #C9E1E3",
+"N+	c #C4DEDF",
+"O+	c #C1DBDC",
+"P+	c #B5D3D3",
+"Q+	c #B2D0D0",
+"R+	c #626C79",
+"S+	c #71717D",
+"T+	c #8D8D96",
+"U+	c #39394C",
+"V+	c #84848E",
+"W+	c #3C3C52",
+"X+	c #E4E4E6",
+"Y+	c #5468B1",
+"Z+	c #647DB3",
+"`+	c #96B6BD",
+" @	c #A4C2C5",
+".@	c #AECACD",
+"+@	c #B7D2D4",
+"@@	c #C1DADC",
+"#@	c #CAE2E3",
+"$@	c #CFE7E8",
+"%@	c #B9D3D4",
+"&@	c #B6D0D1",
+"*@	c #B1D0D0",
+"=@	c #A9A9AF",
+"-@	c #DBDBDB",
+";@	c #454557",
+">@	c #CACACC",
+",@	c #4B4C62",
+"'@	c #5A6DB5",
+")@	c #6D87B4",
+"!@	c #576DB3",
+"~@	c #768EBA",
+"{@	c #A6C2CB",
+"]@	c #B8D3D5",
+"^@	c #CBE3E4",
+"/@	c #CFE6E7",
+"(@	c #CBE4E4",
+"_@	c #AAC3C2",
+":@	c #303A32",
+"<@	c #A7C0C0",
+"[@	c #B5D2D3",
+"}@	c #616C79",
+"|@	c #464658",
+"1@	c #C9C9CB",
+"2@	c #4B4C61",
+"3@	c #5A6EB5",
+"4@	c #94B4BB",
+"5@	c #7D96BB",
+"6@	c #5D73B6",
+"7@	c #6076B7",
+"8@	c #788EC1",
+"9@	c #9BB1D2",
+"0@	c #B8CFDD",
+"a@	c #C7E0E1",
+"b@	c #C4DEDE",
+"c@	c #121B10",
+"d@	c #1F2D1D",
+"e@	c #96AEAD",
+"f@	c #B1CFD0",
+"g@	c #474759",
+"h@	c #C8C8CB",
+"i@	c #99B8BC",
+"j@	c #ABC8CB",
+"k@	c #ADC7D0",
+"l@	c #9DB6CE",
+"m@	c #8CA1C9",
+"n@	c #7286C0",
+"o@	c #5F74B7",
+"p@	c #5D71B7",
+"q@	c #5E71B8",
+"r@	c #576CA4",
+"s@	c #1A2F17",
+"t@	c #38AD14",
+"u@	c #172517",
+"v@	c #4C5D85",
+"w@	c #454D70",
+"x@	c #313144",
+"y@	c #343447",
+"z@	c #343448",
+"A@	c #353549",
+"B@	c #2B2B40",
+"C@	c #36364A",
+"D@	c #3A3A4D",
+"E@	c #3C3C4E",
+"F@	c #3D3D50",
+"G@	c #313247",
+"H@	c #90B1B4",
+"I@	c #98B4B6",
+"J@	c #869D9D",
+"K@	c #91A6A7",
+"L@	c #9AB0B0",
+"M@	c #A5BBB9",
+"N@	c #AFC2C2",
+"O@	c #AFC4C4",
+"P@	c #AFC6C6",
+"Q@	c #AFC6C7",
+"R@	c #96ACAE",
+"S@	c #1E3318",
+"T@	c #48EA16",
+"U@	c #3FC514",
+"V@	c #1C2E17",
+"W@	c #3D4749",
+"X@	c #DADADA",
+"Y@	c #48485A",
+"Z@	c #C4C4C6",
+"`@	c #D6D6D7",
+" #	c #D4D4D5",
+".#	c #D2D2D3",
+"+#	c #494A5F",
+"@#	c #90B2B5",
+"##	c #7A9191",
+"$#	c #1A2A15",
+"%#	c #28521D",
+"&#	c #294D1C",
+"*#	c #274B1E",
+"=#	c #27471E",
+"-#	c #25441D",
+";#	c #24401C",
+">#	c #223B1C",
+",#	c #21381B",
+"'#	c #245016",
+")#	c #43D815",
+"!#	c #1D3D14",
+"~#	c #4E564C",
+"{#	c #D8D8D8",
+"]#	c #4A4A5B",
+"^#	c #C6C6C8",
+"/#	c #5D71B6",
+"(#	c #84A2B5",
+"_#	c #9BBABD",
+":#	c #7B9191",
+"<#	c #2A5B1C",
+"[#	c #47E415",
+"}#	c #275B18",
+"|#	c #434E3F",
+"1#	c #D1D1D1",
+"2#	c #49495B",
+"3#	c #C5C5C8",
+"4#	c #5367B2",
+"5#	c #566CB3",
+"6#	c #6D84B7",
+"7#	c #798E90",
+"8#	c #3BB914",
+"9#	c #141D10",
+"0#	c #373846",
+"a#	c #3F3F51",
+"b#	c #3E3E51",
+"c#	c #2C2C41",
+"d#	c #38384C",
+"e#	c #37374A",
+"f#	c #38394E",
+"g#	c #86A5B3",
+"h#	c #6D86B5",
+"i#	c #435384",
+"j#	c #25561A",
+"k#	c #3CBE15",
+"l#	c #1A2616",
+"m#	c #A5A6A5",
+"n#	c #D3D3D4",
+"o#	c #D4D4D4",
+"p#	c #C0C0C3",
+"q#	c #D9D9D9",
+"r#	c #748B8F",
+"s#	c #1D3B15",
+"t#	c #318F13",
+"u#	c #319312",
+"v#	c #329712",
+"w#	c #339B13",
+"x#	c #359E13",
+"y#	c #35A313",
+"z#	c #36A713",
+"A#	c #38AA13",
+"B#	c #39B113",
+"C#	c #3DC214",
+"D#	c #162312",
+"E#	c #838486",
+"F#	c #4C4C5D",
+"G#	c #C3C3C6",
+"H#	c #8DA8A9",
+"I#	c #576862",
+"J#	c #586860",
+"K#	c #57685E",
+"L#	c #54675C",
+"M#	c #4D5D57",
+"N#	c #42544F",
+"O#	c #3D4E49",
+"P#	c #374843",
+"Q#	c #31433E",
+"R#	c #12190F",
+"S#	c #3FC614",
+"T#	c #182716",
+"U#	c #3E4557",
+"V#	c #A6A6AC",
+"W#	c #4D4D5E",
+"X#	c #131910",
+"Y#	c #3FC915",
+"Z#	c #1C2C17",
+"`#	c #839998",
+" $	c #2C2C40",
+".$	c #323246",
+"+$	c #38384B",
+"@$	c #36364B",
+"#$	c #ADC9CC",
+"$$	c #C0D9DB",
+"%$	c #141C10",
+"&$	c #809693",
+"*$	c #4E4E5F",
+"=$	c #C1C1C4",
+"-$	c #D5D5D6",
+";$	c #4A4B5F",
+">$	c #5D72B5",
+",$	c #88A7B6",
+"'$	c #C0DBDC",
+")$	c #1B2319",
+"!$	c #7F9490",
+"~$	c #CDD2E8",
+"{$	c #6275B6",
+"]$	c #86A4BB",
+"^$	c #A5C3C5",
+"/$	c #AECBCD",
+"($	c #CAE2E4",
+"_$	c #CFE7E7",
+":$	c #CBE4E5",
+"<$	c #879C9B",
+"[$	c #B9D5D6",
+"}$	c #757581",
+"|$	c #92929B",
+"1$	c #3F3F52",
+"2$	c #82828C",
+"3$	c #424255",
+"4$	c #D4D8EB",
+"5$	c #7D8CC3",
+"6$	c #677AB8",
+"7$	c #8DA5C3",
+"8$	c #AEC8D1",
+"9$	c #C2DBDC",
+"0$	c #C7E1E1",
+"a$	c #BCD8D9",
+"b$	c #B8D5D6",
+"c$	c #869CA2",
+"d$	c #6A7A84",
+"e$	c #697883",
+"f$	c #677781",
+"g$	c #657680",
+"h$	c #60707C",
+"i$	c #4C5565",
+"j$	c #525E71",
+"k$	c #4B5773",
+"l$	c #485079",
+"m$	c #585F82",
+"n$	c #808394",
+"o$	c #93939D",
+"p$	c #F1F1F2",
+"q$	c #DFE4F1",
+"r$	c #96A3D0",
+"s$	c #6F7FBE",
+"t$	c #6377BA",
+"u$	c #7D8FC4",
+"v$	c #95ABCE",
+"w$	c #A6BDD5",
+"x$	c #ACC4D6",
+"y$	c #B0CAD6",
+"z$	c #B5D0D7",
+"A$	c #B9D4D7",
+"B$	c #B4D2D3",
+"C$	c #AECCCF",
+"D$	c #A3C1CA",
+"E$	c #9BB9C6",
+"F$	c #91B0C2",
+"G$	c #89A7BE",
+"H$	c #7B94B9",
+"I$	c #6C82B8",
+"J$	c #5E72B5",
+"K$	c #6D7EBD",
+"L$	c #99A6D1",
+"M$	c #E6E8F3",
+"N$	c #F9F9FC",
+"O$	c #D6DBED",
+"P$	c #B1BBDC",
+"Q$	c #96A3D1",
+"R$	c #8A97CA",
+"S$	c #7D8DC4",
+"T$	c #677ABA",
+"U$	c #6175B7",
+"V$	c #6275B9",
+"W$	c #687BBB",
+"X$	c #7182BF",
+"Y$	c #7C8EC3",
+"Z$	c #8796C9",
+"`$	c #94A2CE",
+" %	c #B3BDDC",
+".%	c #DBDEEE",
+"+%	c #FBFBFD",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . + @ # $ % & * = - = ; > , ' ) ! ~ + . . . . . . . ",
+". . . { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . ",
+". . e f g h i j k l m n o p q r s t u v w x y z A B C D E F . . ",
+". G H I J K L M N O P Q R S T U s V W X Y x Z ` A  ...+. at .#.$.. ",
+"{ %.&.*.J =.-.;.>.,.'.).!.1 ~.3 4 u {.X ].^.Z /.B  .(._.:.<.[.. ",
+". }.|.1.2.3.j 4.l m n o 5.q r s t u 6.w ].y z /.7.8.(.9.0.a.b.. ",
+". c.d.e.f.g.3.N h.P Q R S i.U s V W v Y x j.` A  .k.l.m.n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.4 V E.F.G.H.I.J.K.L.M.N.O.P.Q.p.. ",
+". q.R.s.S.T.U.V.W.X.Y.Z.`. +.+++++ at +#+$+%+&+*+=+-+;+>+,+'+)+p.. ",
+". q.!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+. ",
+". q.g+h+i+]+j+k+l+_+:+m+n+o+p+q+2+3+r+s+t+u+v+w+x+y+z+A+B+C+D+E+",
+". F+G+H+I+J+K+L+M+_+:+m+N+O+p+q+P+Q+R+S+T+T+T+T+U+V+T+T+T+T+W+X+",
+". Y+Z+`+ @. at +@@@#@$@:+m+N+%@&@q+P+*@R+=@- at -@- at -@;@>@- at -@- at -@, at X+",
+". '@)@!@~@{@]@O+^@/@(@m+N+_@:@<@[@*@}@=@- at -@- at -@|@1 at -@- at -@- at 2@X+",
+". 3 at r.4@5 at 6@7 at 8@9 at 0@M+a at b@_ at c@d at e@f@}@=@- at -@- at -@g at h@- at -@- at -@2 at X+",
+". 3@!+i at S.j@k at l@m at n@o at p@q at r@s at t@u at v@w at x@y at y@z at A@B at C@U+D at E@F at G@X+",
+". 3 at H@~+I at J@K at L@M at N@O at P@Q at R@S at T@U at V@W@=@- at -@- at X@Y at Z@`@ # #.#+#X+",
+". 3@@#H+##$#%#&#*#=#-#;#>#,#'#T at T@)#!#~#{#- at -@-@]#^#- at -@- at -@2 at X+",
+". /#(#_#:#<#T at T@T at T@T at T@T at T@T at T@T at T@[#}#|#1#- at -@2#3#- at -@- at -@2 at X+",
+". 4#5#6#7#<#T at T@T at T@T at T@T at T@T at T@T at T@T at 8#9#0#a#b#c#U+D at d#e#A at f#X+",
+". '@g#h#i#j#T at T@T at T@T at T@T at T@T at T@T at T@k#l#m#n#o# #]#p#{#q#q#X at 2@X+",
+". 3 at r.s.r#s#t#u#v#w#x#y#z#A#B#T at T@C#D#E#- at -@- at -@F#G#- at -@- at -@2 at X+",
+". 3 at R.s.H#I#J#K#L#M#N#O#P#Q#R#T at S#T#U#V#q#- at -@- at W#G#- at -@- at -@2 at X+",
+". 3 at H@~+i+]+^+/+(+_+:+<+[+}+X#Y#Z#`#R+z at A@z at y@y@ $.$A at +$D at E@@$X+",
+". 3@@#H+i+#$j+$$l+_+:+m+N+o+%$V@&$3+R+=@- at -@- at -@*$=$X@{#-$ #;$X+",
+". >$,$_# @J++ at L+#@$@:+m+N+'$)$!$P+*@R+=@- at -@- at -@*$p#- at -@- at -@2 at X+",
+". ~${$]$^$/$+@@@($_$:$m+N+'$<$[$P+*@}@}$|$|$|$|$1$2$|$|$|$|$3$X+",
+". . 4$5$6$7$8$9$^@/@^@0$N+'$a$b$[@*@c$d$e$f$g$h$i$j$k$l$m$n$o$p$",
+". . . . q$r$s$t$u$v$w$x$y$z$A$b$B$C$D$E$F$G$H$I$J$K$L$M$. . . . ",
+". . . . . . . N$O$P$Q$R$S$; T$U$V$W$X$Y$Z$`$ %.%+%. . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/src/Odb/ODB_VISUALISER.xpm b/src/Odb/ODB_VISUALISER.xpm
new file mode 100644
index 0000000..139e759
--- /dev/null
+++ b/src/Odb/ODB_VISUALISER.xpm
@@ -0,0 +1,577 @@
+/* XPM */
+static char * ODB_MANAGER_xpm[] = {
+"32 32 542 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #F4F5FA",
+"@ 	c #D4D9EC",
+"# 	c #B4BDDD",
+"$ 	c #95A3CF",
+"% 	c #8A98CA",
+"& 	c #8191C6",
+"* 	c #7888C2",
+"= 	c #7083BF",
+"- 	c #7082BF",
+"; 	c #7183BF",
+"> 	c #798AC3",
+", 	c #8392C7",
+"' 	c #8E9CCC",
+") 	c #98A4D1",
+"! 	c #B5BDDE",
+"~ 	c #D6DAEC",
+"{ 	c #FEFEFE",
+"] 	c #D1D6EA",
+"^ 	c #8694C8",
+"/ 	c #697BBB",
+"( 	c #6F81BD",
+"_ 	c #7E91C1",
+": 	c #8BA1C5",
+"< 	c #9CB2CC",
+"[ 	c #A4BBD0",
+"} 	c #ABC4D3",
+"| 	c #B4CCD6",
+"1 	c #BAD4DA",
+"2 	c #BDD7DC",
+"3 	c #BFDADE",
+"4 	c #C1DBDF",
+"5 	c #BFD7DD",
+"6 	c #BAD0DA",
+"7 	c #B5CAD9",
+"8 	c #B0C2D6",
+"9 	c #9DAFCE",
+"0 	c #899AC8",
+"a 	c #7384BF",
+"b 	c #6C7EBD",
+"c 	c #8C9ACB",
+"d 	c #D5DAEC",
+"e 	c #B6BEDE",
+"f 	c #6A7CBC",
+"g 	c #788BBE",
+"h 	c #94AAC5",
+"i 	c #A8BDCC",
+"j 	c #AAC0CE",
+"k 	c #ACC3D0",
+"l 	c #AFC6D1",
+"m 	c #B1C9D3",
+"n 	c #B4CCD5",
+"o 	c #B6CFD7",
+"p 	c #B9D2D9",
+"q 	c #BBD5DB",
+"r 	c #BDD8DD",
+"s 	c #C0DBDF",
+"t 	c #C2DBDF",
+"u 	c #C4DCDF",
+"v 	c #C7DCE0",
+"w 	c #C9DDE0",
+"x 	c #CCDEE0",
+"y 	c #CEDEE0",
+"z 	c #D0DFE1",
+"A 	c #D3DFE1",
+"B 	c #D4E0E1",
+"C 	c #BAC5D7",
+"D 	c #8795C6",
+"E 	c #7282BF",
+"F 	c #BFC6E2",
+"G 	c #C3CAE4",
+"H 	c #7183BB",
+"I 	c #9DB2C6",
+"J 	c #A4B9C9",
+"K 	c #A6BBCA",
+"L 	c #A8BECC",
+"M 	c #ABC1CE",
+"N 	c #ADC4D0",
+"O 	c #B0C7D2",
+"P 	c #B2CAD4",
+"Q 	c #B4CDD6",
+"R 	c #B7D0D8",
+"S 	c #B9D3DA",
+"T 	c #BCD6DC",
+"U 	c #BED9DD",
+"V 	c #C3DBDF",
+"W 	c #C5DCDF",
+"X 	c #C8DDE0",
+"Y 	c #CADDE0",
+"Z 	c #CFDEE1",
+"` 	c #D1DFE1",
+" .	c #D6E0E2",
+"..	c #D8E1E2",
+"+.	c #DAE1E2",
+"@.	c #D4DAE0",
+"#.	c #7C8BC2",
+"$.	c #CFD4E9",
+"%.	c #5F71B7",
+"&.	c #97ACC3",
+"*.	c #A2B6C7",
+"=.	c #A7BCCB",
+"-.	c #A9BFCD",
+";.	c #ACC2CF",
+">.	c #AEC5D1",
+",.	c #B0C8D3",
+"'.	c #B3CBD5",
+").	c #B5CED6",
+"!.	c #B8D1D8",
+"~.	c #BCD7DC",
+"{.	c #C6DCDF",
+"].	c #CBDDE0",
+"^.	c #CDDEE0",
+"/.	c #D2DFE1",
+"(.	c #D9E1E2",
+"_.	c #DBE1E2",
+":.	c #DDE2E3",
+"<.	c #CAD0DC",
+"[.	c #6878BB",
+"}.	c #5568B4",
+"|.	c #6175B5",
+"1.	c #97AAC5",
+"2.	c #A5BACA",
+"3.	c #A7BDCC",
+"4.	c #ACC3CF",
+"5.	c #B8D2D9",
+"6.	c #C7DCDF",
+"7.	c #D5E0E1",
+"8.	c #D7E0E2",
+"9.	c #DCE2E2",
+"0.	c #C4CBD9",
+"a.	c #6476B6",
+"b.	c #5F70B6",
+"c.	c #596DB3",
+"d.	c #7691B2",
+"e.	c #5A6FB3",
+"f.	c #6377B7",
+"g.	c #879CC3",
+"h.	c #AFC7D2",
+"i.	c #BCD6DB",
+"j.	c #CEDEE1",
+"k.	c #D0DADF",
+"l.	c #A3AECE",
+"m.	c #6376B6",
+"n.	c #5A6CAF",
+"o.	c #868DA9",
+"p.	c #5D6FB4",
+"q.	c #5B6FB5",
+"r.	c #8EB0B3",
+"s.	c #98B8BB",
+"t.	c #87A2BC",
+"u.	c #6F86BB",
+"v.	c #5D70B5",
+"w.	c #5C70B6",
+"x.	c #687BBA",
+"y.	c #768DBF",
+"z.	c #8AA1C7",
+"A.	c #95ACCC",
+"B.	c #A2BBD1",
+"C.	c #B1CBD8",
+"D.	c #BFD9DD",
+"E.	c #C5DADE",
+"F.	c #BACFDB",
+"G.	c #AEC1D5",
+"H.	c #A3B5D0",
+"I.	c #97A9CC",
+"J.	c #8292C3",
+"K.	c #677BB9",
+"L.	c #586DB3",
+"M.	c #596DB2",
+"N.	c #6277AE",
+"O.	c #687FA0",
+"P.	c #8B979E",
+"Q.	c #A5A4A4",
+"R.	c #8FB0B4",
+"S.	c #A2C0C3",
+"T.	c #ABC8CA",
+"U.	c #B5D0D2",
+"V.	c #B7D0D7",
+"W.	c #A7BED4",
+"X.	c #91A7CE",
+"Y.	c #7E94C5",
+"Z.	c #7289C0",
+"`.	c #697EBB",
+" +	c #6075B7",
+".+	c #5A70B6",
+"++	c #576DB4",
+"@+	c #5A6FB5",
+"#+	c #5F74B5",
+"$+	c #647BB8",
+"%+	c #6B82B9",
+"&+	c #6F89BA",
+"*+	c #7C95BA",
+"=+	c #86A5B8",
+"-+	c #8BAAB2",
+";+	c #84A1A9",
+">+	c #7A95A0",
+",+	c #738C98",
+"'+	c #8D989E",
+")+	c #A7A4A4",
+"!+	c #8FB1B4",
+"~+	c #99B9BC",
+"{+	c #A2C1C3",
+"]+	c #ACC9CB",
+"^+	c #B5D1D3",
+"/+	c #BFD8DA",
+"(+	c #C8E0E2",
+"_+	c #D0E7E8",
+":+	c #CCE4E5",
+"<+	c #C9E2E2",
+"[+	c #C5DFDF",
+"}+	c #C1DCDD",
+"|+	c #BDD9DA",
+"1+	c #BAD6D7",
+"2+	c #B6D3D4",
+"3+	c #B2D0D1",
+"4+	c #AECECE",
+"5+	c #ABCBCB",
+"6+	c #A7C8C8",
+"7+	c #A3C5C5",
+"8+	c #9FC2C2",
+"9+	c #97B8BB",
+"0+	c #8DACB1",
+"a+	c #83A0A8",
+"b+	c #79949F",
+"c+	c #768D99",
+"d+	c #90999F",
+"e+	c #A9A6A5",
+"f+	c #5D70B4",
+"g+	c #90B1B5",
+"h+	c #9AB9BC",
+"i+	c #A3C1C4",
+"j+	c #B6D1D3",
+"k+	c #BFD9DB",
+"l+	c #C9E1E2",
+"m+	c #C8E1E2",
+"n+	c #C5DEDF",
+"o+	c #C1DCDC",
+"p+	c #BDD9D9",
+"q+	c #B9D6D6",
+"r+	c #AECDCE",
+"s+	c #AACBCB",
+"t+	c #96B8BA",
+"u+	c #8CABB1",
+"v+	c #829FA7",
+"w+	c #78939E",
+"x+	c #788E99",
+"y+	c #919A9F",
+"z+	c #ABA6A5",
+"A+	c #556AB3",
+"B+	c #8EAEB5",
+"C+	c #9ABABD",
+"D+	c #A4C2C4",
+"E+	c #ADCACC",
+"F+	c #B6D2D4",
+"G+	c #C0DADB",
+"H+	c #C9E1E3",
+"I+	c #C4DEDF",
+"J+	c #B6CFCF",
+"K+	c #A2BAB9",
+"L+	c #9EB8B6",
+"M+	c #9BB5B4",
+"N+	c #99B3B1",
+"O+	c #95B0AF",
+"P+	c #92ADAD",
+"Q+	c #8EABAB",
+"R+	c #8CA9A8",
+"S+	c #89A7A6",
+"T+	c #809D9E",
+"U+	c #789396",
+"V+	c #6F898F",
+"W+	c #677E87",
+"X+	c #697C84",
+"Y+	c #7E8689",
+"Z+	c #948F8F",
+"`+	c #596AB0",
+" @	c #5468B1",
+".@	c #647DB3",
+"+@	c #96B6BD",
+"@@	c #A4C2C5",
+"#@	c #AECACD",
+"$@	c #B7D2D4",
+"%@	c #C1DADC",
+"&@	c #CAE2E3",
+"*@	c #CFE7E8",
+"=@	c #7F908D",
+"-@	c #1D221B",
+";@	c #2F332D",
+">@	c #2E332D",
+",@	c #2E332C",
+"'@	c #2E322C",
+")@	c #2D322C",
+"!@	c #2D312B",
+"~@	c #2C312B",
+"{@	c #2C302A",
+"]@	c #2B302A",
+"^@	c #2B2F2A",
+"/@	c #272B27",
+"(@	c #1D2222",
+"_@	c #E4E5E4",
+":@	c #5A6DB5",
+"<@	c #6D87B4",
+"[@	c #576DB3",
+"}@	c #768EBA",
+"|@	c #A6C2CB",
+"1@	c #B8D3D5",
+"2@	c #C1DBDC",
+"3@	c #CBE3E4",
+"4@	c #CFE6E7",
+"5@	c #CBE4E4",
+"6@	c #313731",
+"7@	c #B4B2AE",
+"8@	c #E7E4E0",
+"9@	c #5F615D",
+"0@	c #939591",
+"a@	c #5A6EB5",
+"b@	c #94B4BB",
+"c@	c #7D96BB",
+"d@	c #5D73B6",
+"e@	c #6076B7",
+"f@	c #788EC1",
+"g@	c #9BB1D2",
+"h@	c #B8CFDD",
+"i@	c #C7E0E1",
+"j@	c #272D27",
+"k@	c #CCCAC6",
+"l@	c #5B606D",
+"m@	c #B8B7B9",
+"n@	c #E68280",
+"o@	c #E6B9B6",
+"p@	c #7B7C76",
+"q@	c #878985",
+"r@	c #99B8BC",
+"s@	c #ABC8CB",
+"t@	c #ADC7D0",
+"u@	c #9DB6CE",
+"v@	c #8CA1C9",
+"w@	c #7286C0",
+"x@	c #5F74B7",
+"y@	c #5D71B7",
+"z@	c #202524",
+"A@	c #535966",
+"B@	c #B3B3B6",
+"C@	c #E6B0AD",
+"D@	c #E52626",
+"E@	c #E67573",
+"F@	c #90B1B4",
+"G@	c #BFD9DA",
+"H@	c #555A68",
+"I@	c #B1B2B4",
+"J@	c #E7E1DD",
+"K@	c #E54646",
+"L@	c #E68381",
+"M@	c #E54443",
+"N@	c #E7DFDB",
+"O@	c #E69B99",
+"P@	c #E7DAD7",
+"Q@	c #90B2B5",
+"R@	c #ADC9CC",
+"S@	c #C0D9DB",
+"T@	c #555C69",
+"U@	c #B1B0B3",
+"V@	c #E69694",
+"W@	c #E65655",
+"X@	c #E7E2DE",
+"Y@	c #E53333",
+"Z@	c #E6C1BE",
+"`@	c #E65150",
+" #	c #E54645",
+".#	c #E7CDCA",
+"+#	c #5D71B6",
+"@#	c #84A2B5",
+"##	c #9BBABD",
+"$#	c #575D6A",
+"%#	c #AFAFB2",
+"&#	c #E7D8D4",
+"*#	c #E53837",
+"=#	c #E56261",
+"-#	c #E52D2D",
+";#	c #E68583",
+">#	c #E68F8D",
+",#	c #E63838",
+"'#	c #5367B2",
+")#	c #566CB3",
+"!#	c #6D84B7",
+"~#	c #A1BEC3",
+"{#	c #AECBCD",
+"]#	c #CAE2E4",
+"^#	c #CFE7E7",
+"/#	c #CBE4E5",
+"(#	c #595E6C",
+"_#	c #ADAEB0",
+":#	c #E67B79",
+"<#	c #E6706F",
+"[#	c #E7C6C3",
+"}#	c #E7AEAB",
+"|#	c #E6AAA7",
+"1#	c #E54544",
+"2#	c #86A5B3",
+"3#	c #6D86B5",
+"4#	c #576CB3",
+"5#	c #687DB8",
+"6#	c #869DC4",
+"7#	c #B0C9D6",
+"8#	c #C7E1E1",
+"9#	c #ABACAF",
+"0#	c #E64040",
+"a#	c #E7D2CF",
+"b#	c #9AB9C1",
+"c#	c #8BA5C1",
+"d#	c #7990BF",
+"e#	c #667ABB",
+"f#	c #778DC1",
+"g#	c #222725",
+"h#	c #5C616E",
+"i#	c #AAABAE",
+"j#	c #BED8DA",
+"k#	c #C5DEE0",
+"l#	c #B6CCDD",
+"m#	c #A1B8D3",
+"n#	c #97AFCF",
+"o#	c #232825",
+"p#	c #565B69",
+"q#	c #424959",
+"r#	c #49505E",
+"s#	c #494F5F",
+"t#	c #484E5E",
+"u#	c #474E5D",
+"v#	c #464D5C",
+"w#	c #454C5B",
+"x#	c #444B5B",
+"y#	c #B5B5B7",
+"z#	c #2F352F",
+"A#	c #B9B8B3",
+"B#	c #CAC8C8",
+"C#	c #BCBCBD",
+"D#	c #BDBCBE",
+"E#	c #BDBDBD",
+"F#	c #BEBEBE",
+"G#	c #BFBEBF",
+"H#	c #C0BFC0",
+"I#	c #C1C0C1",
+"J#	c #C2C1C1",
+"K#	c #DBD9D7",
+"L#	c #656762",
+"M#	c #90928F",
+"N#	c #788885",
+"O#	c #1E221C",
+"P#	c #3C403A",
+"Q#	c #3B403A",
+"R#	c #3B4039",
+"S#	c #343832",
+"T#	c #1D211B",
+"U#	c #31362F",
+"V#	c #383D37",
+"W#	c #383C37",
+"X#	c #383C36",
+"Y#	c #393C37",
+"Z#	c #353832",
+"`#	c #191E1B",
+" $	c #E1E2E1",
+".$	c #5D72B5",
+"+$	c #88A7B6",
+"@$	c #ADC6C6",
+"#$	c #8DA1A0",
+"$$	c #839997",
+"%$	c #819795",
+"&$	c #7E9592",
+"*$	c #7C9291",
+"=$	c #627572",
+"-$	c #252924",
+";$	c #494A47",
+">$	c #272B26",
+",$	c #4F6160",
+"'$	c #5D7375",
+")$	c #566A6F",
+"!$	c #59686E",
+"~$	c #6A7072",
+"{$	c #7F7C80",
+"]$	c #5F6FB1",
+"^$	c #CDD2E8",
+"/$	c #6275B6",
+"($	c #86A4BB",
+"_$	c #A5C3C5",
+":$	c #61706C",
+"<$	c #1F241F",
+"[$	c #29302A",
+"}$	c #292F29",
+"|$	c #252B25",
+"1$	c #1C201B",
+"2$	c #1C201A",
+"3$	c #242923",
+"4$	c #262C27",
+"5$	c #272C27",
+"6$	c #1C201D",
+"7$	c #7D818B",
+"8$	c #D4D8EB",
+"9$	c #7D8CC3",
+"0$	c #677AB8",
+"a$	c #8DA5C3",
+"b$	c #AEC8D1",
+"c$	c #C2DBDC",
+"d$	c #BED7D7",
+"e$	c #1B211A",
+"f$	c #AEBEC3",
+"g$	c #B6C6CC",
+"h$	c #9CAAAE",
+"i$	c #2A2E28",
+"j$	c #DFE4F1",
+"k$	c #96A3D0",
+"l$	c #6F7FBE",
+"m$	c #6377BA",
+"n$	c #7D8FC4",
+"o$	c #95ABCE",
+"p$	c #A6BDD5",
+"q$	c #ACC4D6",
+"r$	c #B0CAD6",
+"s$	c #2B322D",
+"t$	c #626C6D",
+"u$	c #7D898A",
+"v$	c #555E5C",
+"w$	c #525650",
+"x$	c #F9F9FC",
+"y$	c #D6DBED",
+"z$	c #B1BBDC",
+"A$	c #96A3D1",
+"B$	c #8A97CA",
+"C$	c #7D8DC4",
+"D$	c #6474A6",
+"E$	c #3B465F",
+"F$	c #353F54",
+"G$	c #384155",
+"H$	c #3A4456",
+"I$	c #3E4758",
+"J$	c #424A59",
+"K$	c #47505C",
+"L$	c #525860",
+"M$	c #606466",
+"N$	c #6B6E6C",
+"O$	c #6C706C",
+"P$	c #898A87",
+"Q$	c #E8E9E8",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . + @ # $ % & * = - = ; > , ' ) ! ~ + . . . . . . . ",
+". . . { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . ",
+". . e f g h i j k l m n o p q r s t u v w x y z A B C D E F . . ",
+". G H I J K L M N O P Q R S T U s V W X Y x Z ` A  ...+. at .#.$.. ",
+"{ %.&.*.J =.-.;.>.,.'.).!.1 ~.3 4 u {.X ].^.Z /.B  .(._.:.<.[.. ",
+". }.|.1.2.3.j 4.l m n o 5.q r s t u 6.w ].y z /.7.8.(.9.0.a.b.. ",
+". c.d.e.f.g.3.N h.P Q R S i.U s V W v Y x j.` A  .k.l.m.n.o.p.. ",
+". q.r.s.t.u.v.w.x.y.z.A.B.C.D.4 V E.F.G.H.I.J.K.L.M.N.O.P.Q.p.. ",
+". q.R.s.S.T.U.V.W.X.Y.Z.`. +.+++++ at +#+$+%+&+*+=+-+;+>+,+'+)+p.. ",
+". q.!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+. ",
+". q.g+h+i+]+j+k+l+_+:+m+n+o+p+q+2+3+r+s+6+7+8+t+u+v+w+x+y+z+f+. ",
+". A+B+C+D+E+F+G+H+_+:+m+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+. ",
+".  @. at +@@@#@$@%@&@*@:+m+=@-@;@>@>@>@,@'@'@)@)@!@~@{@]@^@{@/@(@_@",
+". :@<@[@}@|@1 at 2@3 at 4@5 at m+6@7 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 9@0@",
+". a at r.b@c at d@e at f@g at h@H+i at j@k at l@m at 8@8 at 8@8 at n@o at 8@8 at 8@8 at 8@8 at 8@8 at p@q@",
+". a@!+r at S.s@t at u@v at w@x at y@z at k@A at B@8 at 8@8 at C@D at E@8 at 8@8 at 8@8 at 8@8 at 8@p at q@",
+". a at F@~+i+]+j+G at m+_+:+m+j at k@H at I@8 at 8@J at K@L at M@8 at N@O at P@8 at 8@8 at 8@p at q@",
+". a at Q@C+i+R at j+S@l+_+:+m+j at k@T at U@8 at 8@V at W@X at Y@Z@`@ #K at .#8 at 8@8 at p@q@",
+". +#@###@@E+$@G+&@*@:+m+j at k@$#%#8@&#*#Z at 8@=#-#;#8@>#,#o at 8@8 at p@q@",
+". '#)#!#~#{#$@%@]#^#/#m+j at k@(#_#8@:#<#8 at 8@[#}#8 at 8@8@|#1#8 at 8@p at q@",
+". :@2#3#4#5#6#7#3 at 4@3 at 8#j at k@l at 9#8 at 0#a#8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at p@q@",
+". a at r.s.b#c#d#f.:@e#w at f#g#k at h#i#8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@8 at 8@p at q@",
+". a at R.s.S.T.U.j#k#l#m#n#o#k at p#q#r#r#s#s#t#t#u#u#v#v#w#x#x#y#p at q@",
+". a at F@~+i+]+^+/+(+_+:+<+z#A#B#C#D#D#E#E#F#F#G#G#H#H#I#J#J#K#L#M#",
+". a at Q@C+i+R at j+S@l+_+:+m+N#O#P#P#Q#Q#R#S#T#O#O#T#U#V#W#X#Y#Z#`# $",
+". .$+$##@@E+$@G+&@*@:+m+I+@$#$$$%$&$*$=$-$;$;$>$,$'$)$!$~${$]$. ",
+". ^$/$($_${#$@%@]#^#/#m+I+:$<$[$[$[$}$|$1$O#O#2$3$j at 4$4$5$6$7$. ",
+". . 8$9$0$a$b$c$3 at 4@3 at 8#d$e$f$g$g$g$g$g$g$g$g$g$g$g$g$g$g$h$i$. ",
+". . . . j$k$l$m$n$o$p$q$r$s$t$u$u$u$u$u$u$u$u$u$u$u$u$u$u$v$w$. ",
+". . . . . . . x$y$z$A$B$C$D$E$F$F$G$H$I$J$K$L$M$N$O$O$O$O$P$Q$. ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/src/Odb/ObjectSpec.Odb b/src/Odb/ObjectSpec.Odb
new file mode 100644
index 0000000..1837a52
--- /dev/null
+++ b/src/Odb/ObjectSpec.Odb
@@ -0,0 +1,144 @@
+################################################################################
+#
+#	ObjectSpec.Odb
+#
+
+#-----------------------
+# Database
+#-----------------------
+
+#object,
+#	class		= ODB_DB,
+#	check           = False,
+#	default_object  = False,
+#	type		= File,
+#	default_name    = 'ODB File',
+#	pixmap 		= '$METVIEW_DIR_SHARE/icons/ODB_DB.icon',
+#	editor_type     = NoEditor
+
+#-----------------------
+# OdbFilter
+#-----------------------
+
+object,
+	class               = ODB_FILTER,
+ 	can_be_created      = True,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/OdbFilterDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/OdbFilterRules',
+	default_name        = 'ODB Filter',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = odb_filter,
+	editor_type	    = SimpleEditor,	
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/ODB_FILTER.icon'
+
+#-----------------------
+# OdbVisualiser
+#-----------------------
+
+object,
+	class               = ODB_VISUALISER,
+ 	can_be_created      = True,
+	definition_file     = '$METVIEW_DIR_SHARE/etc/OdbVisualiserDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/OdbVisualiserRules',
+	default_name        = 'Odb Visualiser',
+	type                = Data,
+	expand	            = 75, 
+	macro               = odb_visualiser,
+	editor_type         = SimpleEditor,
+    	pixmap              = '$METVIEW_DIR_SHARE/icons/ODB_VISUALISER.icon'
+
+#-----------------------
+# OdbToGeo
+#-----------------------
+
+#object,
+#	class               = OdbToGeo,
+# 	can_be_created      = True,
+# 	definition_file     = '$METVIEW_DIR_SHARE/etc/OdbToGeoDef',
+#	rules_file          = '$METVIEW_DIR_SHARE/etc/OdbToGeoRules',
+#	default_name        = 'ODB to Geopoints',		
+#	type                = Data,
+#	expand	            = 75,	
+#	macro               = odb_to_geo,
+#	editor_type	    = SimpleEditor,	
+#    	pixmap              = '$METVIEW_DIR_SHARE/icons/OdbToGeo.icon'
+
+#-----------------------
+# States + services
+#-----------------------
+
+#state,
+#	class    = ODB_DB,
+#	action	 = examine,
+#	service  = OdbExaminer
+
+#state,
+#	class	     = ODB_DB,
+#	action	     = save,
+#	service	     = savepool
+
+#state,
+#	class	 = ODB_DB,
+#	action	 = analyse,
+#	service	 = DataToolManager
+
+state,
+	class        = ODB_FILTER,
+	action       = execute,
+	service      = OdbFilter
+
+state,
+	class        = ODB_FILTER,
+	output_class = ODB_DB,
+	service      = OdbFilter
+
+state,
+	class		    = ODB_VISUALISER,
+	action		    = execute,
+        service		    = OdbVisualiser
+
+state,
+	class		    = ODB_VISUALISER,
+	output_class	    = ODB_GEO_POINTS/ODB_GEO_VECTORS/ODB_XY_POINTS/ODB_XY_VECTORS/ODB_XY_BINNING,
+        service		    = OdbVisualiser
+
+state,
+	class		    = ODB_GEO_POINTS/ODB_GEO_VECTORS/ODB_XY_POINTS/ODB_XY_VECTORS/ODB_XY_BINNING,
+	action		    = visualise,
+        service		    = uPlotManager
+state,
+	class		    = ODB_GEO_POINTS/ODB_GEO_VECTORS/ODB_XY_POINTS/ODB_XY_VECTORS/ODB_XY_BINNING,
+	action		    = examine,
+        service		    = OdbExaminer
+
+state,
+	class		    = ODB_GEO_POINTS/ODB_GEO_VECTORS/ODB_XY_POINTS/ODB_XY_VECTORS/ODB_XY_BINNING,
+	action		    = save,
+        service		    = savepool
+
+service,
+	cmd           = '$metview_command $METVIEW_BIN/OdbFilter -maxforks 25',
+	name          =  'OdbFilter'
+
+#service,
+#	name	 = OdbExaminer,
+#	maximum  = 0,
+#	timeout  = $timeout,
+#	fullname = ODB Examiner,
+#	cmd	 = '$metview_command  $METVIEW_BIN/OdbExaminer -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS'
+
+service,
+	timeout		    = $timeout,
+        name		    = OdbVisualiser,
+	fullname	    = ODB Visualiser,
+        cmd		    = '$metview_command $METVIEW_BIN/OdbVisualiser'
+
+#state,
+#	class        = OdbToGeo,
+#	output_class = GEOPOINTS,
+#	service      = OdbToGeo
+
+#service,
+#	cmd		= '$METVIEW_CMD $METVIEW_BIN/OdbToGeo',
+#	name		=  OdbToGeo
diff --git a/src/Odb/OdbFilter.cc b/src/Odb/OdbFilter.cc
new file mode 100644
index 0000000..c1816e2
--- /dev/null
+++ b/src/Odb/OdbFilter.cc
@@ -0,0 +1,416 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+
+#include "MvOdb.h"
+
+#include <iostream>
+#include <stdexcept>
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "MvScanFileType.h"
+
+#ifdef METVIEW_ODB_NEW	
+#include "Exceptions.h"
+#endif
+
+using namespace std;
+
+
+void messageToLog(const string& msg, int severity,const char* useLogWindow,MvRequest& out)
+{
+	if(useLogWindow)
+	{
+		MvRequest reqst("USER_MESSAGE");
+		reqst("INFO") = msg.c_str(); 
+		send_message(MvApplication::instance().getService(),(request*)reqst);
+	}
+	
+	out=MvRequest("REPLY");
+	out("_FILTER_MESSAGE")=msg.c_str();
+	
+	// also send to the Mars/Metview module log
+
+	char msg_c[1024];
+	strncpy(msg_c, msg.c_str(), 1023);
+	marslog(severity, msg_c);
+}
+
+
+void getStringLines(string ibuff, vector<string> &obuff)
+{
+	string::size_type pos=0, pos_prev=0;
+	while((pos=ibuff.find("\n",pos_prev)) != string::npos)
+	{
+		obuff.push_back(ibuff.substr(pos_prev,pos-pos_prev));
+		pos_prev=pos+1;
+	}
+	if(pos_prev < ibuff.size())
+	{
+		obuff.push_back(ibuff.substr(pos_prev));
+	}	
+}
+
+void getShellArgument(string ibuff, string &obuff)
+{
+	string::size_type pos=0;
+	obuff=ibuff;
+
+	//Replace linebrake with whitespace
+	pos=0;
+	while((pos=obuff.find("\n",pos)) != string::npos)
+	{
+		obuff.replace(pos,1," ");
+		pos++;
+	}
+
+        //Replace linebrake with whitespace
+	pos=0;
+	while((pos=obuff.find("$",pos)) != string::npos)
+	{
+		obuff.replace(pos,1,"\\$");
+		pos+=2;
+	}
+
+
+	// "(" -> "/(" 
+	/*pos=0;
+	while((pos=obuff.find("(",pos)) != string::npos)
+	{
+		obuff.replace(pos,1,"\\(");
+		pos+=3;
+	}
+
+	// ")" -> "/)" 
+	pos=0;
+	while((pos=obuff.find(")",pos)) != string::npos)
+	{
+		obuff.replace(pos,1,"\\)");
+		pos+=3;
+	}*/
+}
+  
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class OdbFilter: public Base {	
+public:
+	OdbFilter() : Base("ODB_FILTER") {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+
+void OdbFilter::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "---OdbFilter::serve() IN---" << endl;
+  	in.print();
+
+	// Get prefix
+	string verb = in.getVerb();
+
+	cout << verb << endl;
+
+	const char* mode = (const char*)in("_ACTION");	
+	cout << "mode: " << mode << endl;
+		
+	const char* useLogWindow=(const char*)in("_USELOGWINDOW");	
+
+  	const char* dataPath;
+  
+  	MvRequest dataR=in("ODB_DATA");
+  	if(dataR != 0) 
+  	{
+		const char* dc=dataR("PATH");
+		dataPath=dc;	
+  	}
+	else
+	{
+		dataPath=in("ODB_FILENAME");
+	}
+
+	if(dataR ==0 && 
+	  (dataPath==0 || strcmp(dataPath,"OFF") ==0 || strlen(dataPath) == 0)) 
+  	{
+		messageToLog("No ODB file is specified!",LOG_EROR,useLogWindow,out); 
+		setError(13);
+		return;			
+  	}		
+
+	if(static_cast<const char*>(in("ODB_QUERY")) == 0)
+  	{
+		messageToLog("No ODB/SQL query is specified!",LOG_EROR,useLogWindow,out);
+		setError(13);
+		return;			
+  	}
+	string query(in("ODB_QUERY"));
+
+	/*if(static_cast<const char*>(in("ODB_OUTPUT")) == 0)
+  	{
+		messageToLog("No output format is specified!",LOG_EROR,useLogWindow);
+		setError(13);
+		return;			
+  	}
+	string outputFormat(in("ODB_OUTPUT"));*/
+	string outputFormat("ODB");
+
+
+	if(static_cast<const char*>(in("ODB_NB_ROWS")) == 0)
+  	{
+		messageToLog("No number of rows is specified!",LOG_EROR,useLogWindow,out);
+		setError(13);
+		return;			
+  	}
+	string nb_rows(in("ODB_NB_ROWS"));
+
+  	//Find out and check odb format  	
+  	string odbType = MvOdbType(dataPath,true);	
+	if(odbType != "ODB_NEW" && odbType != "ODB_OLD")
+	{
+		stringstream err_s;
+		err_s << "Wrong data type: " << odbType << "! Only ODB_DB is accepted!";
+		messageToLog(err_s.str(),LOG_EROR,useLogWindow,out); 
+		setError(13);
+		return;			
+	}
+	else if(odbType == "ODB_NEW")
+	{
+#ifndef METVIEW_ODB_NEW		
+		messageToLog("Cannot handle ODB-2 data! ODB-2 support is disabled!",LOG_EROR,useLogWindow,out);
+		setError(13);
+		return;
+#endif
+	}
+	else if(odbType == "ODB_OLD")
+	{
+#ifndef METVIEW_ODB_OLD		
+		messageToLog("Cannot handle ODB-1 data! ODB-1 support is disabled!",LOG_EROR,useLogWindow,out);
+		out.print();
+		setError(13);
+		return;
+#endif
+	}
+
+	//Check if the old odb api is able to produce a new odb ouput
+	if(odbType == "ODB_OLD" && outputFormat == "ODB")
+	{
+#ifndef METVIEW_ODB_OLD	
+		messageToLog("Cannot handle ODB-1 data! ODB-1 support is disabled!",LOG_EROR,useLogWindow,out);
+		setError(13);
+		return;
+#endif	
+	}
+
+	//Outfile name
+	string outFile = marstmp();	
+
+	//Odbsql(2) script(s)
+	string odbsqlScript;
+	string odbsql2Script;
+	if(odbType == "ODB_OLD")
+	{
+		char *mvbin=getenv("METVIEW_BIN");
+		if (mvbin == 0)  
+		{	
+			messageToLog("No METVIEW_BIN env variable is defined. Cannot locate mv_odbsql2 script to run query for ODB-1 databases!",
+				     LOG_EROR,useLogWindow,out);
+			setError(13);
+			return;
+		}
+		else
+		{
+			odbsqlScript=string(mvbin) +"/mv_odbsql";
+			odbsql2Script=string(mvbin) +"/mv_odbsql2";
+		}
+	}
+
+	//-------------------------
+	// Performs filter
+	//-------------------------
+
+	//string cmd="odbsql -q '" <<  query << "' -o " << outFile << " ";
+	
+	if(outputFormat == "ODB")
+	{
+		if(odbType == "ODB_NEW")
+		{
+			//MvOdb odb(dataPath);
+#ifdef METVIEW_ODB_NEW
+			try
+			{
+				MvOdb::retrieveToFile(query,dataPath,outFile);
+			}
+			catch(eclib::Exception e)
+			{
+				stringstream err_s;
+				err_s << "Failed to perform retrieval: " << e.what();
+				messageToLog(err_s.str(),LOG_EROR,useLogWindow,out);
+				setError(13);
+				return;
+			}
+#endif
+		}
+		else
+		{		  
+#ifdef METVIEW_ODB_OLD
+			string queryForShell, dataPathForShell;
+			getShellArgument(query,queryForShell);
+			getShellArgument(dataPath,dataPathForShell);
+
+			string cmd = odbsql2Script + " -q \"" +  queryForShell  + "\" -o " + outFile +
+				   " -i " + "\"" + dataPathForShell +  "\"" + " -f newodb";
+
+			if(nb_rows != "-1")
+			{
+				cmd += " -m " + nb_rows;
+			}
+
+			//marslog(LOG_INFO,"Execute command: %s",cmd.c_str());
+
+			int ret=system(cmd.c_str());
+
+			if(ret == -1 || WEXITSTATUS(ret) != 0)
+			{
+				stringstream err_s;
+				err_s << "Failed to perform retrieval: odbsql2 exited with value of " << WEXITSTATUS(ret);
+				messageToLog(err_s.str(),LOG_EROR,useLogWindow,out); 
+				setError(13);
+				return;
+			}
+
+			outFile+=".odb";
+						
+			struct stat st;
+     			if(stat(outFile.c_str(),&st) != 0 || st.st_size ==0 )
+			{
+		   		return;
+			}	
+#endif			
+		}
+	
+		MvRequest rdata("ODB_DB");
+		rdata("PATH") = outFile.c_str();
+		rdata("TEMPORARY") = 1;
+		rdata.print();
+		out = rdata;
+
+	}
+	
+	else if(outputFormat == "GEO_STANDARD" ||
+		outputFormat == "GEO_XYV" ||
+		outputFormat == "GEO_XY_VECTOR" || 
+		outputFormat == "GEO_POLAR_VECTOR")
+ 	{		
+		if(odbType == "ODB_NEW")
+		{
+#ifdef METVIEW_ODB_NEW
+			string tmpFile = marstmp();
+			
+			try
+			{
+				MvOdb::retrieveToFile(query,dataPath,tmpFile);
+				MvOdb odb(tmpFile,dataPath,query);
+				if(odb.toGeopoints(outFile,outputFormat) == false)
+				{
+					messageToLog("Failed to convert retrieval result into geopoints",
+						     LOG_EROR,useLogWindow,out);
+					setError(13);
+					return;
+				}
+			}
+			catch(eclib::Exception e)
+			{
+				stringstream err_s;
+				err_s << "Failed to perform retrieval: " << e.what();
+				messageToLog(err_s.str(),LOG_EROR,useLogWindow,out); 
+				setError(13);
+				return;
+			}
+#endif
+		}
+		else
+		{
+#ifdef METVIEW_ODB_OLD
+			string queryForShell;
+			getShellArgument(query,queryForShell);
+			
+			string tmpFile = marstmp();
+			string cmd=odbsql2Script  + " -q \"" +  queryForShell + "\" -o " + tmpFile + 
+				    " -i " + dataPath + " -f newodb ";
+
+			if(nb_rows != "-1")
+			{
+				cmd += " -m " + nb_rows;
+			}
+
+			int ret=system(cmd.c_str());
+			
+			if(ret == -1 || WEXITSTATUS(ret) != 0)
+			{
+				stringstream err_s;
+				err_s << "Failed to perform retrieval: odbsql exited with value of " << WEXITSTATUS(ret);
+				messageToLog(err_s.str(),LOG_EROR,useLogWindow,out); 
+				setError(13);
+				return;
+			}
+
+			tmpFile+=".odb";
+
+			try
+			{
+				MvOdb odb(tmpFile,dataPath,query);	
+				if(odb.toGeopoints(outFile,outputFormat) == false)
+				{
+					messageToLog("Failed to convert query result into geopoints",LOG_EROR,useLogWindow,out);
+					setError(13);
+					return;
+				}
+			}
+			catch(eclib::Exception e)
+			{
+				stringstream err_s;
+				err_s << "Failed to convert retrieval result into geopoints: " << e.what();
+				messageToLog(err_s.str(),LOG_EROR,useLogWindow,out); 
+				setError(13);
+				return;
+			}	
+#endif
+	
+		}
+
+
+
+
+
+			
+		MvRequest rdata("GEOPOINTS");
+		rdata("PATH") = outFile.c_str();
+		rdata("TEMPORARY") = 1;
+		rdata.print();
+		out = rdata;
+
+	}
+
+	cout << "---OdbFilter::serve() OUT---" << endl;
+	out.print();	
+
+}
+  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv );
+
+    	OdbFilter odb;
+ 
+   	theApp.run();
+}
diff --git a/src/Odb/OdbFilterDef b/src/Odb/OdbFilterDef
new file mode 100644
index 0000000..1958a96
--- /dev/null
+++ b/src/Odb/OdbFilterDef
@@ -0,0 +1,16 @@
+ODB_FILTER; Odb Filter; experimental
+{	
+	ODB_OUTPUT [interface = option_menu, visible = false ] {
+		ODB		  ; ODB		
+		} = ODB
+
+	ODB_FILENAME {
+		OFF ; OFF
+		@
+	} = OFF
+
+	ODB_DATA [ interface = icon, class = ODB_DB ] { @ }
+	
+	ODB_QUERY  [interface =  scrolled_text ] { @ }
+	ODB_NB_ROWS {*} = -1
+}
diff --git a/src/Odb/OdbFilterRules b/src/Odb/OdbFilterRules
new file mode 100644
index 0000000..e69de29
diff --git a/src/Odb/OdbVisualiser.cc b/src/Odb/OdbVisualiser.cc
new file mode 100644
index 0000000..5a3888d
--- /dev/null
+++ b/src/Odb/OdbVisualiser.cc
@@ -0,0 +1,630 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+#include "Tokenizer.h"
+
+#include "MvOdb.h"
+
+#include <iostream>
+#include <stdexcept>
+
+#include <fcntl.h>
+
+#include "MvScanFileType.h"
+
+#include "MvOdb.h"
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class OdbVisualiser: public Base {	
+public:
+	OdbVisualiser(char* a) : Base(a) {};
+	void serve(MvRequest&,MvRequest&);
+
+protected:
+	bool getParamValue(vector<string>&,MvRequest&,string);
+  	bool isTextContained(const char *txt);
+	bool columnsHaveExpression(MvAbstractOdb *,const vector<const char*>&);
+	void buildColumnList(const vector<const char*>&,const string&,vector<string>&);
+	string buildQuery(const vector<string>&);
+	string buildQuery(const vector<string>& columns, 
+	                  const char* vars,const char* uniqueby, 
+			  const char *from, const char *where,const char *orderby,bool);
+	bool callFilter(string path,string query,string &resPath);
+	bool updateRequest(MvRequest&,const char*,MvAbstractOdb*,int &);
+};
+
+
+bool OdbVisualiser::getParamValue(vector<string>& value,MvRequest& in,string parName)
+{
+	value.clear();
+	
+	int cnt = in.countValues(parName.c_str());
+	
+	if(cnt == 1)
+	{
+	  	const char *cval=in(parName.c_str());
+		if(cval)
+  		{		
+			value.push_back(string(cval)); 
+		}
+	}
+	else
+	{  
+		string val;
+		for( int i=0; i<cnt; i++)
+	     	{
+	      		const char *cval = in(parName.c_str(),i );
+			if(cval)
+			{					
+				value.push_back(string(cval));
+			}						
+		}
+	}
+	
+	return true;
+}
+
+bool OdbVisualiser::isTextContained(const char *txt)
+{
+	if(!txt) return false;
+	string str(txt);
+	
+	return (str.find_last_not_of(" \n\t") != string::npos);  
+}
+
+bool OdbVisualiser::columnsHaveExpression(MvAbstractOdb *db,const vector<const char*>& cols)
+{
+	if(!db)
+		return true;  
+	  
+	for(unsigned int i=0; i < cols.size() ; i++)	  
+	{
+		if(cols[i])
+		{
+			string s(cols[i]);
+	  		if(!db->hasColumn(s))
+				return true;
+		}	
+	}
+	
+	return false;
+} 
+ 
+ 
+ 
+void OdbVisualiser::buildColumnList(const vector<const char*>& cols,const string& metadata,vector<string>& lst)
+{	
+  	for(unsigned int i=0; i < cols.size() ; i++)	  
+	{
+		if(cols[i])
+		{
+			string s(cols[i]);	  		
+			lst.push_back(s);
+		}		
+	}
+	
+	if(isTextContained(metadata.c_str()))
+	  	lst.push_back(metadata);
+	
+  	/*Tokenizer parse(",");
+	vector<string> vs;
+		
+	parse(metadata,vs);
+	
+	for(unsigned int i=0; i < vs.size() ; i++)	  
+	{
+		if(isTextContained(vs.at(i).c_str()))
+			lst.push_back(vs.at(i));
+	}*/	
+}	
+	  
+string OdbVisualiser::buildQuery(const vector<string> &columns)
+{
+	string query("SELECT");
+
+	bool empty=true;
+	for(unsigned int i=0; i < columns.size(); i++)
+	{
+		if(!columns[i].empty())
+		{
+			if(!empty) 
+				query.append(",\n");
+			else
+				query.append("\n");	
+			
+			query.append("\t" + columns[i]);
+
+			if(empty) 
+				empty=false;
+		}
+	}	
+
+	query.append("\n");
+
+	return query;
+}
+
+
+
+string OdbVisualiser::buildQuery(const vector<string> &columns, 
+	                    const char* vars,const char* uniqueby, const char* from, const char *where, const char *orderby,
+			    bool probablyNeedAQuery)
+{
+	string query;
+
+	//If the columns do not contain any expressions, we check if there is
+	//any need for having a query
+	if(!probablyNeedAQuery)
+	{
+		if(!from && !isTextContained(from) &&
+		   !uniqueby && !isTextContained(uniqueby) &&
+		   !where && !isTextContained(where) &&
+		   !orderby && !isTextContained(orderby))
+		{
+			return query;
+		}	
+	}
+	
+	if(vars)
+		query.append(vars);
+
+	query.append("SELECT");
+	
+	bool empty=true;
+	
+	for(unsigned int i=0; i < columns.size(); i++)
+	{
+		if(!columns[i].empty())
+		{
+			if(!empty) 
+				query.append(",\n");
+			else
+				query.append("\n");	
+			
+			query.append("\t" + columns[i]);
+
+			if(empty) 
+				empty=false;
+		}
+	}	
+
+	query.append("\n");
+
+	if(from && isTextContained(from)) 
+		query.append("FROM \n" + string(from) + "\n");
+
+	if(uniqueby && isTextContained(uniqueby)) 
+		query.append("UNIQUEBY \n" + string(uniqueby) + "\n");
+
+	if(where && isTextContained(where)) 
+		query.append("WHERE \n" + string(where) + "\n");
+
+	if(orderby && isTextContained(orderby)) 
+		query.append("ORDER BY \n" + string(orderby) + "\n");
+
+
+	return query;
+}
+
+bool OdbVisualiser::callFilter(string path,string query,string &resPath)
+{		
+	MvRequest r("ODB_FILTER");
+	
+	r("ODB_FILENAME")     = path.c_str();
+	r("ODB_QUERY")    = query.c_str();
+	//r("ODB_OUTPUT")   = "ODB";
+	r("ODB_NB_ROWS")   = "-1";
+	r("_CLASS")   = "ODB_FILTER";
+	r("_ACTION")  = "execute";
+	r("_SERVICE") = "OdbFilter";
+	r("_USELOGWINDOW") = "1";
+
+	r.print();
+
+	int error;
+	MvRequest result = MvApplication::waitService("OdbFilter",r,error);
+	result.print();
+
+	const char *rPath=result("PATH");
+	if(error !=0 || !rPath || string(rPath).empty())
+	{
+		const char *errmsg=result("_FILTER_MESSAGE");
+		  
+	  	marslog(LOG_EROR,"Calling ODB Filter failed!");
+		if(errmsg)
+		  	marslog(LOG_EROR,"%s",errmsg);
+		
+		setError(13);
+		return false;
+	}
+	
+	resPath=string(rPath);
+
+	struct stat st;
+     	if(stat(resPath.c_str(),&st) != 0 || st.st_size ==0 )
+	{
+		marslog(LOG_INFO,"No data retrieved for the specified ODB/SQL query!"); 
+	}	
+			
+			
+			
+	return true;
+}
+
+bool OdbVisualiser::updateRequest(MvRequest& req,const char* par,MvAbstractOdb* db,int &cnt)
+{
+	const char *c=req(par);
+  	if(c)
+	{
+	  	const MvOdbColumn *col=db->column(cnt);
+	  	if(col)
+		{	
+		  	req(par)=col->name().c_str();
+			cnt++;
+			return true;
+		}
+	}
+	return false;
+}	
+
+void OdbVisualiser::serve(MvRequest& in,MvRequest& out)
+{
+	cout << "OdbVisualiser::serve in" << endl;
+	in.print();
+
+#ifndef METVIEW_ODB_PLOT
+	marslog(LOG_EROR,"ODB plotting is DISABLED! Magics was built without ODB support!");
+	setError(13);
+	return;	
+#endif	
+	
+	
+	// Get prefix
+	string verb = in.getVerb();
+
+	cout << verb << endl;
+	
+	const char *type=in("ODB_PLOT_TYPE");
+	
+	if(!type)
+	{
+	  	marslog(LOG_EROR,"ODB_PLOT_TYPE is not specified!");
+		setError(13);
+		return;
+	}
+	
+	vector<const char*> cols;
+	string outReqName;
+	
+	if(strcmp(type,"GEO_POINTS") == 0)
+	{
+		outReqName="ODB_GEO_POINTS";
+		
+		const char *lat=in("ODB_LATITUDE_VARIABLE");
+		cols.push_back(lat);
+
+		const char *lon=in("ODB_LONGITUDE_VARIABLE");
+		cols.push_back(lon);
+	
+		const char *value=in("ODB_VALUE_VARIABLE");
+		cols.push_back(value);
+	}
+
+	else if(strcmp(type,"GEO_VECTORS") ==0)
+	{
+		outReqName="ODB_GEO_VECTORS";
+		
+		const char *lat=in("ODB_LATITUDE_VARIABLE");
+		cols.push_back(lat);
+
+		const char *lon=in("ODB_LONGITUDE_VARIABLE");
+		cols.push_back(lon);
+	
+		const char *x=in("ODB_X_COMPONENT_VARIABLE");
+		cols.push_back(x);
+
+		const char *y=in("ODB_Y_COMPONENT_VARIABLE");
+		cols.push_back(y);
+		
+		const char *value=in("ODB_VALUE_VARIABLE");
+		cols.push_back(value);
+	}
+
+	else if(strcmp(type,"XY_POINTS") ==0)
+	{
+		outReqName="ODB_XY_POINTS";
+		
+		const char *x=in("ODB_X_VARIABLE");
+		cols.push_back(x);
+
+		const char *y=in("ODB_Y_VARIABLE");
+		cols.push_back(y);
+	
+		const char *v=in("ODB_VALUE_VARIABLE");
+		cols.push_back(v);
+	}
+
+	else if(strcmp(type,"XY_VECTORS") == 0)
+	{
+		outReqName="ODB_XY_VECTORS";
+		
+		const char *x=in("ODB_X_VARIABLE");
+		cols.push_back(x);
+
+		const char *y=in("ODB_Y_VARIABLE");
+		cols.push_back(y);
+	
+		const char *xc=in("ODB_X_COMPONENT_VARIABLE");
+		cols.push_back(xc);
+
+		const char *yc=in("ODB_Y_COMPONENT_VARIABLE");
+		cols.push_back(yc);
+
+		const char *v=in("ODB_VALUE_VARIABLE");
+		cols.push_back(v);
+	}
+
+	else if(strcmp(type,"XY_BINNING") == 0)
+	{
+		outReqName="ODB_XY_BINNING";
+		
+		const char *x=in("ODB_X_VARIABLE");
+		cols.push_back(x);
+
+		const char *y=in("ODB_Y_VARIABLE");
+		cols.push_back(y);
+	
+		const char *v=in("ODB_VALUE_VARIABLE");
+		cols.push_back(v);
+	}
+	else
+	{
+	  	return;
+	}
+
+	const char *vars=in("ODB_PARAMETERS");
+	const char *uniqueby=in("ODB_UNIQUEBY");
+	const char *from=in("ODB_FROM");
+	const char *where=in("ODB_WHERE");
+	const char *orderby=in("ODB_ORDERBY");
+
+	//Get metadata columns
+	string metadata;
+	const char* metadataC=in("ODB_METADATA_VARIABLES");
+	if(metadataC)
+	  	metadata=string(metadataC);
+	
+	//Build the final column list
+	vector<string> columns;
+	buildColumnList(cols,metadata,columns);
+	  
+	//-------------------------
+	// Check input ODB format
+	//------------------------
+
+	string odbPath;
+	string odbType;
+
+	MvRequest dataR=in("ODB_DATA");
+	const char* iconType=dataR.getVerb();
+
+	//If no icon is specified
+	if(!iconType)
+	{
+		//If no path is there either
+		const char *path=in("ODB_FILENAME");
+		if(!path || strcmp(path,"OFF") == 0)
+		{
+			marslog(LOG_EROR,"No data icon or path is specified!");
+			setError(13);
+			return;
+		}
+		//If the path is defined it checks the filetype. It has to be "ODB_NEW"
+		else
+		{
+			odbType= MvOdbType(path,true);
+			if(odbType != "ODB_OLD" && odbType != "ODB_NEW")
+			{
+				marslog(LOG_EROR,"Wrong data type: %s! Only ODB_DB is accepted!",odbType.c_str());
+				setError(13);
+				return;
+			}
+		}
+
+		odbPath=string(path);
+
+	}
+	//The icon type can only be "ODB_DB"
+	else if(strcmp(iconType,"ODB_DB") != 0)
+	{			
+		marslog(LOG_EROR,"Wrong data type: %s! Only ODB_DB is accepted",iconType);
+		setError(13);
+		return;
+	}
+	//The "ODB_DB" icon can only be a new ODB!!
+	else
+	{
+		const char *path=dataR("PATH");
+		if(!path)
+		{
+			marslog(LOG_EROR,"No path is specified for ODB_DB icon!");
+			setError(13);
+			return;
+		}
+		odbType=MvOdbType(path,false);
+		odbPath=string(path);
+	}
+	
+	//----------------------------------------
+	// Call ODBFilter service if needed and
+	// modify the request!
+	//----------------------------------------
+
+	MvRequest tmpR = in;
+	tmpR.setVerb(outReqName.c_str());
+	tmpR("_VERB") = outReqName.c_str();	
+	
+	bool queryWasRun=false;
+	
+	//For ODB-1 we always need the filter!!
+	string query;
+	if(odbType == "ODB_OLD")
+	{		
+		//Build the query
+		query=buildQuery(columns,vars,uniqueby,from,where,orderby,true);
+		
+		MvRequest r;
+ 		tmpR("ODB_DATA")=r;
+
+		string res;
+		if(!callFilter(odbPath,query,res))
+		{
+			out=r;
+			return;
+		}
+		tmpR("ODB_FILENAME")=res.c_str();
+		
+		queryWasRun=true;
+	}
+	
+	//For ODB-2 
+	if(odbType == "ODB_NEW")
+	{
+		//If we have metadata columns we surely need to run a query
+		bool needAQuery=isTextContained(metadata.c_str());
+		
+		//Get odb object to access metadata
+		MvAbstractOdb* db=MvOdbFactory::make(odbPath);
+		
+		//Check if any of the specified columns (in the request) contains an expression. If does we 
+		//we need to run a query.
+		if(!needAQuery && columnsHaveExpression(db,cols))
+		{
+		  	needAQuery=true;
+		}
+		
+		if(db) delete db;
+	
+		//Get the query		
+		query=buildQuery(columns,vars,uniqueby,0,where,orderby,needAQuery);
+		
+	  	//The query is empty if the columns do not contain any expressions 
+		//and there are no SET, WHERE, ORDERBY, UNIQUEBY statments specified
+	  	if(!query.empty())
+		{
+			MvRequest r;
+ 			tmpR("ODB_DATA")=r;
+
+			string res;
+			if(!callFilter(odbPath,query,res))
+			{
+				out=r;
+				return;
+			}
+			tmpR("ODB_FILENAME")=res.c_str();
+			queryWasRun=true;
+		}
+		else
+		{
+			tmpR("ODB_FILENAME")=odbPath.c_str();  
+		} 
+	}
+	  
+
+	//Column names can change during the query. E.g. ODB_VALUE_VARIABLE=an_depar-fg_depar 
+	//changes to -(an_depar,fg_depar) in the resulting ODB file. This causes magics++ crash
+	//because it uses the column name  specified in ODB_VALUE_VARIABLE etc to extract the columns
+	//data from the ODB.
+	//As a workaround wee need to replace all the request column names to the actual ones in
+	//the resulting ODB! We suppose that the column order in the resulting ODB is exactly
+	//the same as in the qurey!!
+
+	if(queryWasRun==true)  
+	{  	  
+		const char *pR=tmpR("ODB_FILENAME");
+		string outPath;
+		if(pR)
+		  	outPath=string(pR);
+	
+	  	//Get odb object to access metadata
+		MvAbstractOdb* db=MvOdbFactory::make(outPath);
+		if(!db)
+		{
+		  	setError(13);
+			return;
+		}
+		
+		if(outReqName == "ODB_GEO_POINTS")
+		{
+			int cnt=0;
+		  	updateRequest(tmpR,"ODB_LATITUDE_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_LONGITUDE_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_VALUE_VARIABLE",db,cnt);
+						
+		}	
+		else if(outReqName == "ODB_GEO_VECTORS")
+		{
+			int cnt=0;
+		  	updateRequest(tmpR,"ODB_LATITUDE_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_LONGITUDE_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_X_COMPONENT_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_Y_COMPONENT_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_VALUE_VARIABLE",db,cnt);
+		}		
+		else if(outReqName == "ODB_XY_POINTS")
+		{
+			int cnt=0;
+		  	updateRequest(tmpR,"ODB_X_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_Y_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_VALUE_VARIABLE",db,cnt);
+						
+		}			
+		else if(outReqName == "ODB_XY_VECTORS")
+		{
+			int cnt=0;
+		  	updateRequest(tmpR,"ODB_X_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_Y_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_X_COMPONENT_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_Y_COMPONENT_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_VALUE_VARIABLE",db,cnt);						
+		}
+		else if(outReqName == "ODB_XY_BINNING")
+		{
+			int cnt=0;
+		  	updateRequest(tmpR,"ODB_X_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_Y_VARIABLE",db,cnt);
+			updateRequest(tmpR,"ODB_VALUE_VARIABLE",db,cnt);
+						
+		}
+		
+		if(db) delete db;		
+	}
+	
+	out = tmpR;	
+
+cout << "OdbVisualiser::serve out" << endl;
+out.print();
+
+	return;
+}
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	OdbVisualiser vis("ODB_VISUALISER");
+
+	theApp.run();
+}
diff --git a/src/Odb/OdbVisualiserDef b/src/Odb/OdbVisualiserDef
new file mode 100644
index 0000000..df15570
--- /dev/null
+++ b/src/Odb/OdbVisualiserDef
@@ -0,0 +1,109 @@
+ODB_VISUALISER; Odb Visualiser
+{
+	ODB_PLOT_TYPE [interface = option_menu ] 
+	{
+		GEO_POINTS	; GEO_POINTS	
+             	GEO_VECTORS     ; GEO_VECTORS
+     		XY_POINTS 	; XY_POINTS
+		XY_VECTORS 	; XY_VECTORS
+		XY_BINNING      ; XY_BINNING
+	}=GEO_POINTS
+
+	ODB_FILENAME
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	ODB_DATA
+		[ interface = icon, class = ODB_DB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	ODB_X_TYPE [interface = option_menu ] 
+	{
+		NUMBER	; NUMBER
+		DATE	; DATE
+	} = NUMBER
+
+	ODB_Y_TYPE [interface = option_menu ] 
+	{
+		NUMBER	; NUMBER
+		DATE	; DATE
+	} = NUMBER
+
+	ODB_X_VARIABLE
+	{
+		@
+	} = ''
+	ODB_Y_VARIABLE
+	{
+		@
+	} = ''
+	ODB_LATITUDE_VARIABLE
+	{
+		@
+	} = 'lat at hdr'
+	ODB_LONGITUDE_VARIABLE
+	{
+		@
+	} = 'lon at hdr'
+	ODB_X_COMPONENT_VARIABLE
+	{
+		@
+	} = 'obsvalue at body'
+	ODB_Y_COMPONENT_VARIABLE
+	{
+		@
+	} = 'obsvalue at body#1'
+	ODB_VALUE_VARIABLE
+	{
+		@
+	} = 'obsvalue at body'
+	ODB_METADATA_VARIABLES
+	{
+		@
+		ALL
+		/
+	} = ''
+	ODB_PARAMETERS 
+	{
+		@
+	} = ''
+	ODB_FROM
+	{
+		@
+	} = ''
+	ODB_WHERE [interface =  scrolled_text ] 
+	{
+		@
+	} = ''
+	ODB_ORDERBY 
+	{
+		@
+	} = ''
+	ODB_NB_ROWS
+	{
+		*
+	} = -1
+
+	ODB_COORDINATES_UNIT [interface = option_menu ] 
+	{
+		DEGREES		  ; DEGREES	
+             	RADIANS      	  ; RADIANS    	
+	}=DEGREES
+
+	ODB_BINNING
+	[ interface	   = icon,
+	  class		   = MBINNING,
+	  exclusive	   = true,
+	  help 		   = help_data,
+	  help_directory  = '/System/Defaults',
+	  help_name       = Binning,
+	  help_class      = MBINNING,
+	  help_definition = (MBINNING)
+	]
+	{ @ }
+}
diff --git a/src/Odb/OdbVisualiserRules b/src/Odb/OdbVisualiserRules
new file mode 100644
index 0000000..4f73938
--- /dev/null
+++ b/src/Odb/OdbVisualiserRules
@@ -0,0 +1,34 @@
+%if ODB_PLOT_TYPE = GEO_POINTS %then		
+	%unset ODB_X_TYPE
+	%unset ODB_Y_TYPE
+	%unset ODB_X_VARIABLE
+	%unset ODB_Y_VARIABLE
+	%unset ODB_X_COMPONENT_VARIABLE
+	%unset ODB_Y_COMPONENT_VARIABLE
+	%unset ODB_BINNING
+
+%if ODB_PLOT_TYPE = GEO_VECTORS %then		
+	%unset ODB_X_TYPE
+	%unset ODB_Y_TYPE
+	%unset ODB_X_VARIABLE
+	%unset ODB_Y_VARIABLE
+	%unset ODB_BINNING 
+
+%if ODB_PLOT_TYPE = XY_POINTS %then		
+	%unset ODB_LATITUDE_VARIABLE
+	%unset ODB_LONGITUDE_VARIABLE
+	%unset ODB_X_COMPONENT_VARIABLE
+	%unset ODB_Y_COMPONENT_VARIABLE
+	%unset ODB_BINNING 
+	
+%if ODB_PLOT_TYPE = XY_VECTORS %then		
+        %unset ODB_LATITUDE_VARIABLE
+	%unset ODB_LONGITUDE_VARIABLE
+	%unset ODB_BINNING 
+
+%if ODB_PLOT_TYPE = XY_BINNING %then			
+        %unset ODB_LATITUDE_VARIABLE
+	%unset ODB_LONGITUDE_VARIABLE
+	%unset ODB_X_COMPONENT_VARIABLE
+	%unset ODB_Y_COMPONENT_VARIABLE
+      
diff --git a/src/OdbExaminer/Makefile.am b/src/OdbExaminer/Makefile.am
new file mode 100644
index 0000000..6b290e4
--- /dev/null
+++ b/src/OdbExaminer/Makefile.am
@@ -0,0 +1,47 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+#-I/usr/local/lib/metaps/lib/odalib/current/include -L/usr/local/lib/metaps/lib/odalib/current/lib
+
+bin_PROGRAMS      = bin/OdbExaminer
+bin_OdbExaminer_SOURCES = MvMain.cc \
+		OdbExaminer.cc \
+		MvQOdbTableView.cc \
+		MvQOdbStatModel.cc \
+ 	 	MvQOdbTableView.h OdbExaminer.h \
+		MvQOdbStatModel.h MvQOdbStat.h 
+
+nodist_bin_OdbExaminer_SOURCES = OdbExaminer.moc.cpp MvQOdbTableView.moc.cpp
+
+#bin_OdaExaminer_CPPFLAGS = $(QT_CPPFLAGS) -I/var/tmp/cgr/PERFORCE/oda/eclib -I/var/tmp/cgr/PERFORCE/oda/odalib
+#bin_OdaExaminer_LDFLAGS  = $(QT_LDFLAGS) -L../../lib -L/var/tmp/cgr/PERFORCE/oda/lib 
+
+bin_OdbExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(ODB_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil -I../libUtil
+bin_OdbExaminer_LDFLAGS  = $(QT_LDFLAGS) $(ODB_LDFLAGS)
+bin_OdbExaminer_LDADD    = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a  $(STANDARD_METVIEW_LIBS) $(FLIBS) $(ODB_LIBS) $(QT_LIBS)
+bin_OdbExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a  ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.OdbExaminer
+	    
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+BUILT_SOURCES = bin OdbExaminer.moc.cpp MvQOdbTableView.moc.cpp
+
+EXTRA_DIST =  ObjectSpec.OdbExaminer
+
+#all: bin
+#	$(UPDATE_TITLE)		
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/OdbExaminer *.o *.moc.cpp *.qrc.cpp
diff --git a/src/OdbExaminer/Makefile.in b/src/OdbExaminer/Makefile.in
new file mode 100644
index 0000000..a3a1aff
--- /dev/null
+++ b/src/OdbExaminer/Makefile.in
@@ -0,0 +1,961 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/OdbExaminer$(EXEEXT)
+subdir = src/OdbExaminer
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_OdbExaminer_OBJECTS = bin_OdbExaminer-MvMain.$(OBJEXT) \
+	bin_OdbExaminer-OdbExaminer.$(OBJEXT) \
+	bin_OdbExaminer-MvQOdbTableView.$(OBJEXT) \
+	bin_OdbExaminer-MvQOdbStatModel.$(OBJEXT)
+nodist_bin_OdbExaminer_OBJECTS =  \
+	bin_OdbExaminer-OdbExaminer.moc.$(OBJEXT) \
+	bin_OdbExaminer-MvQOdbTableView.moc.$(OBJEXT)
+bin_OdbExaminer_OBJECTS = $(am_bin_OdbExaminer_OBJECTS) \
+	$(nodist_bin_OdbExaminer_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_OdbExaminer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_OdbExaminer_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_OdbExaminer_SOURCES) $(nodist_bin_OdbExaminer_SOURCES)
+DIST_SOURCES = $(bin_OdbExaminer_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_OdbExaminer_SOURCES = MvMain.cc \
+		OdbExaminer.cc \
+		MvQOdbTableView.cc \
+		MvQOdbStatModel.cc \
+ 	 	MvQOdbTableView.h OdbExaminer.h \
+		MvQOdbStatModel.h MvQOdbStat.h 
+
+nodist_bin_OdbExaminer_SOURCES = OdbExaminer.moc.cpp MvQOdbTableView.moc.cpp
+
+#bin_OdaExaminer_CPPFLAGS = $(QT_CPPFLAGS) -I/var/tmp/cgr/PERFORCE/oda/eclib -I/var/tmp/cgr/PERFORCE/oda/odalib
+#bin_OdaExaminer_LDFLAGS  = $(QT_LDFLAGS) -L../../lib -L/var/tmp/cgr/PERFORCE/oda/lib 
+bin_OdbExaminer_CPPFLAGS = $(QT_CPPFLAGS) $(ODB_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil -I../libUtil
+bin_OdbExaminer_LDFLAGS = $(QT_LDFLAGS) $(ODB_LDFLAGS)
+bin_OdbExaminer_LDADD = $(LDADD) ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a  $(STANDARD_METVIEW_LIBS) $(FLIBS) $(ODB_LIBS) $(QT_LIBS)
+bin_OdbExaminer_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a  ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.OdbExaminer
+BUILT_SOURCES = bin OdbExaminer.moc.cpp MvQOdbTableView.moc.cpp
+EXTRA_DIST = ObjectSpec.OdbExaminer
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/OdbExaminer/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/OdbExaminer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/OdbExaminer$(EXEEXT): $(bin_OdbExaminer_OBJECTS) $(bin_OdbExaminer_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/OdbExaminer$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_OdbExaminer_LINK) $(bin_OdbExaminer_OBJECTS) $(bin_OdbExaminer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbExaminer-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbExaminer-OdbExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_OdbExaminer-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvMain.o -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvMain.Tpo -c -o bin_OdbExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvMain.Tpo $(DEPDIR)/bin_OdbExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_OdbExaminer-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_OdbExaminer-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvMain.Tpo -c -o bin_OdbExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvMain.Tpo $(DEPDIR)/bin_OdbExaminer-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_OdbExaminer-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_OdbExaminer-OdbExaminer.o: OdbExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-OdbExaminer.o -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-OdbExaminer.Tpo -c -o bin_OdbExaminer-OdbExaminer.o `test -f 'OdbExaminer.cc' || echo '$(srcdir)/'`OdbExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-OdbExaminer.Tpo $(DEPDIR)/bin_OdbExaminer-OdbExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbExaminer.cc' object='bin_OdbExaminer-OdbExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-OdbExaminer.o `test -f 'OdbExaminer.cc' || echo '$(srcdir)/'`OdbExaminer.cc
+
+bin_OdbExaminer-OdbExaminer.obj: OdbExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-OdbExaminer.obj -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-OdbExaminer.Tpo -c -o bin_OdbExaminer-OdbExaminer.obj `if test -f 'OdbExaminer.cc'; then $(CYGPATH_W) 'OdbExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/OdbExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-OdbExaminer.Tpo $(DEPDIR)/bin_OdbExaminer-OdbExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbExaminer.cc' object='bin_OdbExaminer-OdbExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-OdbExaminer.obj `if test -f 'OdbExaminer.cc'; then $(CYGPATH_W) 'OdbExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/OdbExaminer.cc'; fi`
+
+bin_OdbExaminer-MvQOdbTableView.o: MvQOdbTableView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvQOdbTableView.o -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Tpo -c -o bin_OdbExaminer-MvQOdbTableView.o `test -f 'MvQOdbTableView.cc' || echo '$(srcdir)/'`MvQOdbTableView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Tpo $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbTableView.cc' object='bin_OdbExaminer-MvQOdbTableView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvQOdbTableView.o `test -f 'MvQOdbTableView.cc' || echo '$(srcdir)/'`MvQOdbTableView.cc
+
+bin_OdbExaminer-MvQOdbTableView.obj: MvQOdbTableView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvQOdbTableView.obj -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Tpo -c -o bin_OdbExaminer-MvQOdbTableView.obj `if test -f 'MvQOdbTableView.cc'; then $(CYGPATH_W) 'MvQOdbTableView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbTableView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Tpo $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbTableView.cc' object='bin_OdbExaminer-MvQOdbTableView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvQOdbTableView.obj `if test -f 'MvQOdbTableView.cc'; then $(CYGPATH_W) 'MvQOdbTableView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbTableView.cc'; fi`
+
+bin_OdbExaminer-MvQOdbStatModel.o: MvQOdbStatModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvQOdbStatModel.o -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Tpo -c -o bin_OdbExaminer-MvQOdbStatModel.o `test -f 'MvQOdbStatModel.cc' || echo '$(srcdir)/'`MvQOdbStatModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Tpo $(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbStatModel.cc' object='bin_OdbExaminer-MvQOdbStatModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvQOdbStatModel.o `test -f 'MvQOdbStatModel.cc' || echo '$(srcdir)/'`MvQOdbStatModel.cc
+
+bin_OdbExaminer-MvQOdbStatModel.obj: MvQOdbStatModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvQOdbStatModel.obj -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Tpo -c -o bin_OdbExaminer-MvQOdbStatModel.obj `if test -f 'MvQOdbStatModel.cc'; then $(CYGPATH_W) 'MvQOdbStatModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbStatModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Tpo $(DEPDIR)/bin_OdbExaminer-MvQOdbStatModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbStatModel.cc' object='bin_OdbExaminer-MvQOdbStatModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvQOdbStatModel.obj `if test -f 'MvQOdbStatModel.cc'; then $(CYGPATH_W) 'MvQOdbStatModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbStatModel.cc'; fi`
+
+bin_OdbExaminer-OdbExaminer.moc.o: OdbExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-OdbExaminer.moc.o -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Tpo -c -o bin_OdbExaminer-OdbExaminer.moc.o `test -f 'OdbExaminer.moc.cpp' || echo '$(srcdir)/'`OdbExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Tpo $(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbExaminer.moc.cpp' object='bin_OdbExaminer-OdbExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-OdbExaminer.moc.o `test -f 'OdbExaminer.moc.cpp' || echo '$(srcdir)/'`OdbExaminer.moc.cpp
+
+bin_OdbExaminer-OdbExaminer.moc.obj: OdbExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-OdbExaminer.moc.obj -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Tpo -c -o bin_OdbExaminer-OdbExaminer.moc.obj `if test -f 'OdbExaminer.moc.cpp'; then $(CYGPATH_W) 'OdbExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/OdbExaminer.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Tpo $(DEPDIR)/bin_OdbExaminer-OdbExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OdbExaminer.moc.cpp' object='bin_OdbExaminer-OdbExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-OdbExaminer.moc.obj `if test -f 'OdbExaminer.moc.cpp'; then $(CYGPATH_W) 'OdbExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/OdbExaminer.moc.cpp'; fi`
+
+bin_OdbExaminer-MvQOdbTableView.moc.o: MvQOdbTableView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvQOdbTableView.moc.o -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Tpo -c -o bin_OdbExaminer-MvQOdbTableView.moc.o `test -f 'MvQOdbTableView.moc.cpp' || echo '$(srcdir)/'`MvQOdbTableView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Tpo $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbTableView.moc.cpp' object='bin_OdbExaminer-MvQOdbTableView.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvQOdbTableView.moc.o `test -f 'MvQOdbTableView.moc.cpp' || echo '$(srcdir)/'`MvQOdbTableView.moc.cpp
+
+bin_OdbExaminer-MvQOdbTableView.moc.obj: MvQOdbTableView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_OdbExaminer-MvQOdbTableView.moc.obj -MD -MP -MF $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Tpo -c -o bin_OdbExaminer-MvQOdbTableView.moc.obj `if test -f 'MvQOdbTableView.moc.cpp'; then $(CYGPATH_W) 'MvQOdbTableView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOdbTableView.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Tpo $(DEPDIR)/bin_OdbExaminer-MvQOdbTableView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbTableView.moc.cpp' object='bin_OdbExaminer-MvQOdbTableView.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_OdbExaminer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_OdbExaminer-MvQOdbTableView.moc.obj `if test -f 'MvQOdbTableView.moc.cpp'; then $(CYGPATH_W) 'MvQOdbTableView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOdbTableView.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+#all: bin
+#	$(UPDATE_TITLE)		
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/OdbExaminer *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/OdbExaminer/MvMain.cc b/src/OdbExaminer/MvMain.cc
new file mode 100644
index 0000000..e5f063a
--- /dev/null
+++ b/src/OdbExaminer/MvMain.cc
@@ -0,0 +1,149 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include "OdbExaminer.h"
+
+#include <iostream>
+#include "Metview.h"
+#include "MvQService.h"
+
+#include "MvScanFileType.h"
+#include "MvQOdbMetaData.h"
+
+using namespace std;
+ 
+// Globals
+int          ac;
+char       **av;
+
+
+class Base : public MvQService { 
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvOdbExaminer: public Base {	
+public:
+	MvOdbExaminer(char* a) : Base(a) {};
+	void serve(MvRequest&,MvRequest&);
+};
+
+
+void MvOdbExaminer::serve( MvRequest& in, MvRequest& /*out*/)
+{
+   	cout << "--------------MvOdbExaminer::serve()--------------" << endl;
+  	in.print();
+ 
+	string dataPath;
+
+	// Get verb
+	string verb = in.getVerb();
+
+	cout << "verb: " << verb << endl;
+
+	if(verb == "ODB_GEO_POINTS" || verb == "ODB_GEO_VECTORS" || 
+	   verb == "ODB_XY_POINTS" || verb == "ODB_XY_VECTORS" ||
+	   verb == "ODB_XY_BINNING")
+	{				      
+		//string odbVerb = odbReq.getVerb();
+		const char *path=in("ODB_FILENAME");
+		if(path)
+			dataPath.assign(path);
+		
+
+	}
+	else
+	{
+		const char* path=in("PATH");
+		if(path)
+			dataPath.assign(path);
+	}	
+	if(dataPath.empty())
+  	{
+		string err="Error!\n";			
+		setError(13,err.c_str());
+		err="No ODB file is specified!\n";
+		setError(13,err.c_str());
+		return;			
+  	}		
+
+	//Find out and check odb format  	
+  	string odbType = MvOdbType(dataPath.c_str(),true);	
+
+	if(odbType != "ODB_NEW" && odbType != "ODB_OLD")
+	{
+		marslog(LOG_EROR,"Wrong data type: %s! Only ODB_DB is accepted!",odbType.c_str());
+		setError(13);
+		return;			
+	}
+	else if(odbType == "ODB_NEW")
+	{
+#ifndef METVIEW_ODB_NEW		
+		marslog(LOG_EROR,"Cannot handle ODB-2 data! ODB-2 support is disabled!");
+		setError(13);
+		return;
+#endif
+	}
+	else if(odbType == "ODB_OLD")
+	{
+#ifndef METVIEW_ODB_OLD		
+		marslog(LOG_EROR,"Cannot handle ODB-1 data! ODB-1 support is disabled!");
+		setError(13);
+		return;
+#endif
+	}
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(window);
+	Q_INIT_RESOURCE(find);
+
+	//Create the oda object and initialize it	
+	MvQOdbMetaData *odb=new MvQOdbMetaData(dataPath,odbType);
+
+	//Create the oda examiner and initialize it
+	OdbExaminer *browser = new OdbExaminer;
+	browser->init(odb);
+   	browser->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI (but not to MvExamineManager)
+	// To turn icon to green; otherwise, it will stay orange
+	if( strcmp( getenv("METVIEW_MODE"), "examine" ) != 0 )
+	{
+	    MvRequest req;
+	    sendReplyFromInteractive(req);
+	}
+
+	//Enter the app loop
+ 	app.exec();	
+}		
+
+int main( int argc, char **argv )
+{
+	ac = argc;
+  	av = argv;
+	
+	MvApplication theApp( argc, argv );
+
+    	MvOdbExaminer odb("ODB_DB");
+	MvOdbExaminer odb1("ODB_GEO_POINTS");	
+	MvOdbExaminer odb2("ODB_GEO_VECTORS");
+	MvOdbExaminer odb3("ODB_XY_POINTS");
+	MvOdbExaminer odb4("ODB_XY_VECTORS");
+	MvOdbExaminer odb5("ODB_XY_MATRIX");
+	
+    	theApp.run();	
+}
diff --git a/src/OdbExaminer/MvQOdbStat.h b/src/OdbExaminer/MvQOdbStat.h
new file mode 100644
index 0000000..e543a5e
--- /dev/null
+++ b/src/OdbExaminer/MvQOdbStat.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOdbStat_H
+#define MvQOdbStat_H
+
+#include <QStringList>
+
+class MvQOdbStat
+{
+public:
+	MvQOdbStat(QString name,QString query) : name_(name), query_(query), loaded_(false) {};
+
+	bool isLoaded() {return loaded_;}
+	QString name() {return name_;}
+	QString query() {return query_;}
+	const QList<QStringList>& resultData() const {return resultData_;}
+	const QStringList& resultName() const {return resultName_;}
+	void addResult(QString name, QStringList& data) 
+	{
+		resultName_ << name;
+		resultData_ << data;
+	}
+
+protected:
+	QString name_;
+	QString query_;
+	QStringList  resultName_;
+	QList<QStringList> resultData_;
+	bool loaded_; 
+};
+
+#endif
diff --git a/src/OdbExaminer/MvQOdbStatModel.cc b/src/OdbExaminer/MvQOdbStatModel.cc
new file mode 100644
index 0000000..dc2822c
--- /dev/null
+++ b/src/OdbExaminer/MvQOdbStatModel.cc
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QBrush>
+#include <QColor>
+#include <QDebug>
+#include <QPainter>
+
+#include "MvQOdbStatModel.h"
+
+//======================================
+// Item delegate
+//======================================
+
+MvQOdbStatDelegate::MvQOdbStatDelegate(QWidget *parent) : QStyledItemDelegate(parent)
+{
+}
+
+void MvQOdbStatDelegate::paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const
+{
+	QStyledItemDelegate::paint(painter,option,index);
+	QRect rect = option.rect;
+	QLine line(rect.x(),rect.y(),rect.x()+rect.width(),rect.y());
+
+	painter->setPen(QPen("#BBBBBB"));
+	painter->drawLine(line); 
+}
+
+
+
+//======================================
+// Item model
+//======================================
+
+/*void MvQOdbStatModel::layersAreAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQOdbStatModel::resetLayers()
+{
+	layers_=scene_->layerNodes();
+	endResetModel();
+}*/
+
+
+void MvQOdbStatModel::setData(QList<MvQOdbStat*> data)
+{
+	data_=data;
+	reset();
+}
+
+int MvQOdbStatModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 1;
+}
+
+int MvQOdbStatModel::rowCount( const QModelIndex& index) const
+{
+    	if (!index.isValid())
+	{
+		return  data_.count();
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+
+QVariant MvQOdbStatModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || index.column() != 0)
+        {			
+		return QVariant();
+	}
+ 	
+	if(role == Qt::DisplayRole)
+	{
+  		return data_.at(index.row())->name();
+	}
+	else if(role == Qt::BackgroundRole)
+	{
+	 	if(data_.at(index.row())->isLoaded())
+		{
+			if(index.row() % 2 == 0)
+				//return QBrush(QColor(70,180,40));
+				//return QBrush(QColor(92,206,113)); 
+				return QColor("#FFE6BF");
+			else
+				//return QBrush(QColor(187,238,202));
+				return QColor("#FFF2DE");
+		}	
+		else
+		{
+			return QBrush(Qt::white); 
+		}
+	}
+	return  QVariant();
+}
+
+
+QVariant MvQOdbStatModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+    return QVariant();
+}
+
+
+QModelIndex MvQOdbStatModel::index( int row, int column, const QModelIndex & parent ) const
+{
+   return createIndex(row,column,0);
+}
+
+
+QModelIndex MvQOdbStatModel::parent( const QModelIndex & index ) const
+{
+    return QModelIndex();
+}
diff --git a/src/OdbExaminer/MvQOdbStatModel.h b/src/OdbExaminer/MvQOdbStatModel.h
new file mode 100644
index 0000000..3edfd06
--- /dev/null
+++ b/src/OdbExaminer/MvQOdbStatModel.h
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOdbStatModel_H
+#define MvQOdbStatModel_H
+
+#include <QAbstractItemModel>
+#include <QSortFilterProxyModel>
+#include <QStyledItemDelegate>
+
+#include "MvQOdbStat.h"
+
+class MvQOdbStatDelegate : public QStyledItemDelegate
+{
+public:
+
+	MvQOdbStatDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+
+};
+
+class MvQOdbStatModel : public QAbstractItemModel
+{
+public:
+   	MvQOdbStatModel() {};
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex()) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+
+	void setData(QList<MvQOdbStat*>);
+
+private:
+    	QList<MvQOdbStat*> data_;
+};
+
+#endif 
+
diff --git a/src/OdbExaminer/MvQOdbTableView.cc b/src/OdbExaminer/MvQOdbTableView.cc
new file mode 100644
index 0000000..270752d
--- /dev/null
+++ b/src/OdbExaminer/MvQOdbTableView.cc
@@ -0,0 +1,338 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QPainter>
+#include <QDebug>
+#include <QGraphicsSceneMouseEvent>
+#include <QResizeEvent>
+
+#include "MvQOdbTableView.h"
+#include "MvQOdbMetaData.h"
+
+MvQOdbTableView::MvQOdbTableView(QWidget *parent) : QGraphicsView(parent)
+{
+	//Table graph
+	tableOffsetX_=15;
+	tableWidth_=70;
+	tableGapX_=12;			
+	tableOffsetY_=15;
+	tableHeight_=15;
+	tableGapY_=12;
+}
+
+
+void MvQOdbTableView::init(MvQOdbMetaData *odb,QString table)
+{
+	odb_=odb;
+	selectedTable_=table;
+
+	//Number of rows and cols in graph
+	int nx,ny;
+	odb_->getTreePosRange(nx,ny);
+	nx+=1;
+	//ny+=1;
+
+	//Compute the area occupied by the graph
+	int w=2*tableOffsetX_+nx*tableWidth_+(nx-1)*tableGapX_;
+	int h=2*tableOffsetY_+ny*tableHeight_+(ny-1)*tableGapY_;
+	
+	graphWidth_=w;
+	graphHeight_=h;	
+
+	int dw,dh, pw,ph;
+	//adjustPixmapSizeToView(width(),height(),dw,dh);
+	adjustPixmapSizeToView(w,h,dw,dh);
+	pw=w+dw;
+	ph=h+dh;
+
+	//pw=width()+dw;
+	//ph=height()+dh;
+	
+	//Create the pixmap
+	tablePixmap_ = new QPixmap(pw,ph);
+
+	//Scene rect
+	setSceneRect(0,0,pw,ph);
+
+	//Create a scene for the table graph
+	OdbTableScene *scene= new OdbTableScene;
+
+	//Add scene to the graphics view
+	setScene(scene);
+
+	//Mouse press event in scene goes to 
+	connect(scene, SIGNAL( mousePressed(int,int) ), 
+		this, SLOT( mousePressedInTableGraph(int,int) ) );
+
+	setCacheMode(QGraphicsView::CacheBackground);
+	//setBackgroundBrush(*tablePixmap_);
+
+	renderTableGraph();
+
+	emit tableSelection(selectedTable_);
+}
+
+
+void MvQOdbTableView::renderTableGraph()
+{
+	//QPixmap *pixmap = new QPixmap(600,400);
+	QPainter painter(tablePixmap_);
+
+	painter.setRenderHint(QPainter::Antialiasing, false);
+	
+//QLinearGradient grad(0,0,100,100);
+
+			QLinearGradient grad(0,0,tablePixmap_->width(),tablePixmap_->height());
+     			grad.setColorAt(0, QColor::fromRgb(255,242,222));
+     			grad.setColorAt(1, QColor::fromRgb(255,255,255));
+
+
+	// Define clear color and clear the display 
+	painter.fillRect(0,0,tablePixmap_->width(),tablePixmap_->height(),
+			 QBrush(grad));
+			 //QBrush(Qt::white, Qt::SolidPattern));
+
+	//Render net
+	int xp,yp;
+	painter.setPen(QPen(QColor(213,209,217), 0.5, Qt::SolidLine, Qt::RoundCap));
+
+	yp=tablePixmap_->height(); 
+	while(yp> 0)
+	{			
+		painter.drawLine(0,yp,tablePixmap_->width(),yp);		
+		yp-=15;
+	}	
+		
+	xp=0; 
+	while(xp < tablePixmap_->width())
+	{
+		painter.drawLine(xp,0,xp,tablePixmap_->height());	
+		xp+=15;
+	}	
+
+	painter.setPen(QPen(Qt::black, 0.5, Qt::SolidLine, Qt::RoundCap));
+
+	//Draw the graph	 		
+	
+	QMapIterator<QString, MvQOdbTable*> it(odb_->tables());
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+		getTablePos(it.value()->treePosX(),it.value()->treePosY(),xp,yp);
+
+		foreach(QString tblName,it.value()->linksTo())
+		{
+			int xp1,yp1; 
+			MvQOdbTable *tbl=odb_->tables()[tblName];
+			getTablePos(tbl->treePosX(),tbl->treePosY(),xp1,yp1);
+			
+			painter.drawLine(xp,yp,(xp+xp1)/2,yp);			
+			painter.drawLine((xp+xp1)/2,yp,(xp+xp1)/2,yp1);
+			painter.drawLine((xp+xp1)/2,yp1,xp1,yp1);
+				
+		}	
+	}
+
+
+	painter.setFont(QFont("Helvetica [Cronyx]", 8));
+	painter.setRenderHint(QPainter::TextAntialiasing, true);
+	//painter.setFont(QFont("Sans Serif", 7));
+
+	it.toFront();
+	while (it.hasNext()) 
+	{
+     		it.next();
+		getTablePos(it.value()->treePosX(),it.value()->treePosY(),xp,yp);
+
+		if(it.value()->name() == selectedTable_)
+		{										
+			QLinearGradient gradient(xp,yp-tableHeight_/2.,
+			                         xp,yp+tableHeight_/2);
+     			gradient.setColorAt(0, QColor::fromRgb(227,59,101));
+     			gradient.setColorAt(1, QColor::fromRgb(229,117,128));  
+
+			painter.fillRect(xp-tableWidth_/2.,yp-tableHeight_/2.,
+			         tableWidth_,tableHeight_,QBrush(gradient));
+				//QBrush(QColor(255,64,105), Qt::SolidPattern));
+
+		}
+		else
+		{
+			QLinearGradient gradient(xp,yp-tableHeight_/2.,
+			                         xp,yp+tableHeight_/2);
+     			gradient.setColorAt(0, QColor("#6ea1f1"));
+     			gradient.setColorAt(1, QColor("#567dbc"));
+
+			painter.fillRect(xp-tableWidth_/2.,yp-tableHeight_/2.,
+			         tableWidth_,tableHeight_,QBrush(gradient));
+				 //QBrush(QColor(119,215,196), Qt::SolidPattern));		
+		}
+
+		painter.drawRect(xp-tableWidth_/2.,yp-tableHeight_/2.,
+				 tableWidth_,tableHeight_);
+
+		if(it.value()->name() == selectedTable_)
+		{
+			//painter.setPen(QPen(Qt::white, 0.5, Qt::SolidLine, Qt::RoundCap));
+		}
+		
+		
+		painter.setPen(QPen(Qt::white, 0.5, Qt::SolidLine, Qt::RoundCap));
+		painter.drawText(QRectF(xp-tableWidth_/2.,yp-tableHeight_/2,
+					tableWidth_,tableHeight_),
+				 Qt::AlignCenter,
+				 it.value()->name());
+		painter.setPen(QPen(Qt::black, 0.5, Qt::SolidLine, Qt::RoundCap));
+				
+
+		if(it.value()->name() == selectedTable_) 
+		{
+			//painter.setPen(QPen(Qt::black, 0.5, Qt::SolidLine, Qt::RoundCap));
+		}
+	}
+
+	/*graphicsView_table->setCacheMode(QGraphicsView::CacheBackground);
+	graphicsView_table->resetCachedContent();*/
+
+	setBackgroundBrush(*tablePixmap_);
+}
+
+
+void MvQOdbTableView::getTablePos(int row, int col, int &x, int &y)
+{	
+	x=tableOffsetX_+row*(tableWidth_+tableGapX_)+tableWidth_/2.;
+	y=tableOffsetY_+col*(tableHeight_+tableGapY_/2.);
+}
+
+
+bool MvQOdbTableView::setSelectedTable(int x, int y)
+{			
+    	int xp,yp;
+	QMapIterator<QString, MvQOdbTable*> it(odb_->tables());
+ 	while (it.hasNext()) 
+	{
+     		it.next();	
+		getTablePos(it.value()->treePosX(),it.value()->treePosY(),xp,yp);
+
+		if(x > xp-tableWidth_/2. && x< xp+tableWidth_/2. &&
+		   y < yp+tableHeight_/2. && y > yp-tableHeight_/2.)
+		{
+			if(selectedTable_ != it.key())
+			{
+				selectedTable_=it.key();
+				return true;
+			}
+		}
+	}
+	
+	return false;			
+}
+void MvQOdbTableView::setSelectedTable(QString table)
+{
+	if(selectedTable_ != table)
+	{
+		selectedTable_ = table;	
+		renderTableGraph();
+		centreTableGraph();
+	}
+}
+
+void MvQOdbTableView::mousePressedInTableGraph(int x,int y)
+{
+	if(setSelectedTable(x,y))
+	{
+			qDebug() << " Selected table: " << selectedTable_;
+			renderTableGraph();
+			
+			emit tableSelection(selectedTable_);
+	}		
+}
+
+
+void MvQOdbTableView::centreTableGraph()
+{
+	int x,y;
+	MvQOdbTable* t=odb_->tables()[selectedTable_];
+	getTablePos(t->treePosX(),t->treePosY(),x,y); 
+	centerOn(x,y);
+}
+
+
+void MvQOdbTableView::resizeEvent(QResizeEvent* event)
+{
+	int pw=tablePixmap_->width();
+	int ph=tablePixmap_->height();
+
+	int dw;
+	int dh;	
+	adjustPixmapSizeToView(pw,ph,dw,dh);
+
+	if(dw != 0 || dh != 0)
+	{	
+		delete tablePixmap_;
+		tablePixmap_ = new QPixmap(pw+dw,ph+dh);		
+
+		//setBackgroundBrush(*tablePixmap_);
+	
+		setSceneRect(0,0,pw+dw,ph+dh);
+
+		renderTableGraph();
+	}
+
+	QGraphicsView::resizeEvent(event);
+}
+
+void MvQOdbTableView::adjustPixmapSizeToView(int pw, int ph,int &dw,int &dh)
+{
+	dw=0;
+	dh=0;
+
+	int w=width();
+	int h=height();
+
+	if(pw < w) 
+	{
+		dw=(w-pw < 100)?100:(w-pw);
+	}
+	else
+	{
+		if(pw > graphWidth_ && w < graphWidth_)
+		{
+			dw=graphWidth_-pw;
+		}
+	}
+
+	if(ph < h) 
+	{
+		dh=(h-ph < 100)?100:(h-ph);
+	}
+	else
+	{
+		if(ph > graphHeight_ && h < graphHeight_)
+		{
+			dh=graphHeight_-ph;
+		}
+	}
+}
+
+
+
+OdbTableScene::OdbTableScene(QGraphicsScene *parent) : QGraphicsScene(parent)
+{
+
+}
+
+void OdbTableScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+	QPointF p=event->buttonDownScenePos(Qt::LeftButton);
+	
+	emit mousePressed(p.rx(),p.ry());
+}
+
+	
\ No newline at end of file
diff --git a/src/OdbExaminer/MvQOdbTableView.h b/src/OdbExaminer/MvQOdbTableView.h
new file mode 100644
index 0000000..c761b3b
--- /dev/null
+++ b/src/OdbExaminer/MvQOdbTableView.h
@@ -0,0 +1,77 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOdbTableView_H
+#define MvQOdbTableView_H
+
+#include <iostream>
+#include <QGraphicsView>
+#include <QGraphicsScene>
+
+using namespace std;
+
+class MvQOdbMetaData;
+
+class MvQOdbTableView : public QGraphicsView
+{
+	Q_OBJECT
+
+ public:
+     	MvQOdbTableView(QWidget *parent = 0);
+	void init(MvQOdbMetaData*,QString);
+	void renderTableGraph();
+	void centreTableGraph(); 
+	void setSelectedTable(QString);	
+
+ signals:
+	void tableSelection(QString); 
+
+ public slots:
+	void mousePressedInTableGraph(int,int);
+
+ protected:
+	void getTablePos(int,int,int&,int&);
+	bool setSelectedTable(int,int);
+	void resizeEvent(QResizeEvent*); 
+	void adjustPixmapSizeToView(int,int,int &,int &);
+
+  	MvQOdbMetaData *odb_;
+ 
+   	int tableOffsetX_;
+	int tableOffsetY_;
+	int tableWidth_;
+	int tableHeight_;
+	int tableGapX_;
+	int tableGapY_;
+	int graphWidth_;
+	int graphHeight_;
+
+	QString selectedTable_;
+
+	QPixmap* tablePixmap_;
+};
+
+
+class OdbTableScene : public QGraphicsScene
+{
+	Q_OBJECT
+
+ public:
+     	OdbTableScene(QGraphicsScene *parent = 0);
+
+ signals:
+	void mousePressed(int,int);
+
+ protected:
+	void mousePressEvent(QGraphicsSceneMouseEvent*); 	
+
+};
+
+
+#endif
diff --git a/src/OdbExaminer/ObjectSpec.OdbExaminer b/src/OdbExaminer/ObjectSpec.OdbExaminer
new file mode 100644
index 0000000..572f2c6
--- /dev/null
+++ b/src/OdbExaminer/ObjectSpec.OdbExaminer
@@ -0,0 +1,12 @@
+state,
+	class    = ODB_DB,
+	action	 = examine,
+	service  = OdbExaminer
+
+service,
+	name	 = OdbExaminer,
+	maximum  = 0,
+	timeout  = $timeout,
+	fullname = ODB Examiner,
+	cmd	 = '$metview_command  $METVIEW_BIN/OdbExaminer -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS'
+
diff --git a/src/OdbExaminer/OdbExaminer.cc b/src/OdbExaminer/OdbExaminer.cc
new file mode 100755
index 0000000..e78abd9
--- /dev/null
+++ b/src/OdbExaminer/OdbExaminer.cc
@@ -0,0 +1,622 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QDebug>
+#include <QHBoxLayout>  
+#include <QInputDialog>
+#include <QLabel>
+#include <QListWidget>
+#include <QProgressBar>
+#include <QSettings>
+#include <QSpinBox>
+#include <QSplitter>
+#include <QSortFilterProxyModel>
+#include <QTabWidget>
+#include <QTextBrowser>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "MvApplication.h"
+#include "MvRequest.h"
+
+#include <stdlib.h>
+
+#ifdef METVIEW_ODB_NEW
+#include "MvOdb.h"
+#endif
+
+#include "MvQAbout.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQLogBrowser.h"
+#include "MvQOdbDataWidget.h"
+#include "MvQOdbMetaData.h"
+#include "MvQOdbModel.h"
+#include "MvQOdbTableView.h"
+#include "MvQSearchLinePanel.h"
+#include "MvQTreeView.h"
+#include "MvQTreeViewSearchLine.h"
+
+#include "OdbExaminer.h"
+
+
+OdbExaminer::OdbExaminer(QWidget *parent) : MvQMainWindow(parent)
+{
+ 	data_=0;
+	columnFind_=0;
+	tableColumnFind_=0;
+ 
+	setAttribute(Qt::WA_DeleteOnClose);	
+
+	setWindowTitle(tr("Metview - ODB Examiner"));
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	QWidget *w;
+	QLabel *label;
+
+	//----------------------
+	// Main splitter
+	//----------------------
+
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+
+        mainSplitter_->setOpaqueResize(false);
+	setCentralWidget(mainSplitter_);
+
+	//-----------------------------------------------------
+	// The main layout (the upper part of mainSplitter)
+	//-----------------------------------------------------
+  
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,0);
+	mainLayout->setSpacing(1);
+	w=new QWidget;
+	w->setLayout(mainLayout);
+	mainSplitter_->addWidget(w);
+
+	//------------------
+	// File info label
+	//------------------
+      	
+	fileInfoLabel_=new MvQFileInfoLabel;
+	fileInfoLabel_->setProperty("mvStyle","odb");
+	mainLayout->addWidget(fileInfoLabel_);
+
+	//-------------------
+	// Central tab	
+	//-------------------
+		
+	metaTab_= new QTabWidget;	
+	mainLayout->addWidget(metaTab_,1);
+	
+	//Set up grib message group box
+	setupTableBox();
+	setupColumnBox();
+	setupVarBox();
+	//setupStatsBox();
+
+	dataPanel_=new MvQOdbDataWidget(this);
+	//setupDataBox();
+
+	metaTab_->addTab(tablePanel_,tr("Tables"));
+	metaTab_->addTab(columnPanel_,tr("Columns"));
+	metaTab_->addTab(varPanel_,tr("SET Variables"));
+	metaTab_->addTab(dataPanel_,tr("Data"));
+
+	//Find panel
+	
+	//We need to call it after the tab is populated
+	setupFindBox();
+	mainLayout->addWidget(findPanel_);
+
+	//--------------------------
+	// Log Area
+	//--------------------------
+
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	logLayout->setSpacing(1);
+	w=new QWidget;
+	w->setLayout(logLayout);
+	mainSplitter_->addWidget(w);
+
+	//Label
+	label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	logLayout->addWidget(label);
+
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	w->hide();
+
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	connect(tableView_,SIGNAL(tableSelection(QString)),
+		this,SLOT(slotTableSelected(QString))); 
+
+	connect(metaTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotTabIndexChanged(int)));
+
+	setupEditActions();
+	setupViewActions();
+	setupSettingsActions();
+	setupHelpActions();
+
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+	
+	//Should be called only after init
+	//readSettings();
+}
+ 
+OdbExaminer::~OdbExaminer()
+{
+	writeSettings();
+
+	/*if(columnModel_) delete columnModel_;
+	if(dataModel_) delete dataModel_;
+	if(bitmapModel_) delete bitmapModel_;
+
+	for(vector<QStandardItemModel*>::iterator it=secModel_.begin(); it != secModel_.end(); it++)
+	{
+		delete *it;
+	}*/	
+}
+
+void OdbExaminer::setupEditActions()
+{
+	QAction *actionFind_=MvQMainWindow::createAction(MvQMainWindow::FindAction,this);
+	connect(actionFind_,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(setHidden(bool)));
+				
+	QAction *actionFindNext=MvQMainWindow::createAction(MvQMainWindow::FindNextAction,this);
+	connect(actionFindNext,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindNext(bool)));	
+		
+	QAction *actionFindPrev=MvQMainWindow::createAction(MvQMainWindow::FindPreviousAction,this);
+	connect(actionFindPrev,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindPrev(bool)));
+	
+	MvQMainWindow::MenuType menuType=MvQMainWindow::EditMenu;	
+		
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFind_,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindNext,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindPrev,MvQMenuItem::MenuTarget));
+}
+
+void OdbExaminer::setupViewActions()
+{
+	//
+	QAction* actionFileInfo = new QAction(this);
+        actionFileInfo->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo->setText(tr("File info"));
+	actionFileInfo->setCheckable(true);
+	actionFileInfo->setChecked(true);
+	actionFileInfo->setToolTip(tr("View file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/fileInfo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo->setIcon(icon);	
+	
+	//Define routines
+	connect(actionFileInfo,SIGNAL(triggered(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;		
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo));	
+}
+
+void OdbExaminer::setupSettingsActions()
+{
+	QAction *action;
+	
+	action=createAction(MvQMainWindow::ConfigureAction,this);
+	connect(action, SIGNAL(triggered()), 
+		this, SLOT(slotConfigure()));	
+			
+	MvQMainWindow::MenuType menuType=MvQMainWindow::SettingsMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(action,MvQMenuItem::MenuTarget));
+}
+
+void OdbExaminer::setupHelpActions()
+{		
+    	// About
+    	QAction *actionAbout = new QAction(this);
+    	actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
+    	QIcon icon;
+    	icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+    	actionAbout->setIcon(icon);
+    	actionAbout->setText(tr("&About ODB Examiner"));
+
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	menuItems_[menuType ].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+
+void OdbExaminer::setupTableBox()
+{
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	tablePanel_=new QWidget;
+	QVBoxLayout *tableLayout = new QVBoxLayout;
+	tableLayout->setContentsMargins(0,0,0,0);
+	tablePanel_->setLayout(tableLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	//Label
+	//label=new QLabel(tr("Tables"));
+	//label->setFrameShape(QFrame::StyledPanel);
+	//label->setProperty("mvStyle","panel");
+	//QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+       // sizePolicy.setHorizontalStretch(0);
+       // sizePolicy.setVerticalStretch(0);
+      //  sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
+        //label->setSizePolicy(sizePolicy);
+	//tableLayout->addWidget(label);
+
+	//Hbox
+	tableSplitter_=new QSplitter;
+	tableLayout->addWidget(tableSplitter_);	
+
+	//Table view
+	tableView_=new MvQOdbTableView;
+	tableSplitter_->addWidget(tableView_);	
+
+	//Column tree
+	tableColumnModel_= new MvQOdbColumnModel(false);
+	tableColumnSortModel_= new QSortFilterProxyModel;
+        tableColumnSortModel_->setSourceModel(tableColumnModel_);
+	tableColumnSortModel_->setDynamicSortFilter(true);
+	//columnSortModel_->setFilterRole(Qt::UserRole);
+	//columnSortModel_->setFilterRegExp(QRegExp("[1]"));
+	//columnSortModel_->setFilterFixedString("1");
+	//columnSortModel_->setFilterKeyColumn(0);
+
+
+	tableColumnTree_=new QTreeView;
+	tableColumnTree_->setObjectName("columnTree");
+	tableColumnTree_->setProperty("mvStyle",0);
+	tableColumnTree_->setSortingEnabled(true); 
+	tableColumnTree_->sortByColumn (0,Qt::AscendingOrder); 
+	tableColumnTree_->setAlternatingRowColors(true);
+        tableColumnTree_->setAllColumnsShowFocus(true);
+	tableColumnTree_->setModel(tableColumnSortModel_);	
+	//columnTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	//columnTree_->setActvatedByKeyNavigation(true);
+	//columnTree_->setAcceptDrops(true);
+	//columnTree_->setDragDropMode(QAbstractItemView::DropOnly);
+	tableColumnTree_->setRootIsDecorated(true);
+
+	tableSplitter_->addWidget(tableColumnTree_);
+
+}
+
+void OdbExaminer::setupColumnBox()
+{
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	columnPanel_=new QWidget;
+	QVBoxLayout *columnLayout = new QVBoxLayout;
+	columnLayout->setContentsMargins(0,0,0,0);
+	columnPanel_->setLayout(columnLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	//Label
+	//label=new QLabel(tr("Columns"));
+	//label->setFrameShape(QFrame::StyledPanel);
+	//label->setProperty("mvStyle","panel");
+	//columnLayout->addWidget(label);
+
+	//Column tree
+	columnModel_= new MvQOdbColumnModel(true);
+	columnSortModel_= new QSortFilterProxyModel;
+        columnSortModel_->setSourceModel(columnModel_);
+	columnSortModel_->setDynamicSortFilter(true);
+	//columnSortModel_->setFilterRole(Qt::UserRole);
+	//columnSortModel_->setFilterRegExp(QRegExp("[1]"));
+	//columnSortModel_->setFilterFixedString("1");
+	//columnSortModel_->setFilterKeyColumn(0);
+
+
+	columnTree_=new QTreeView;
+	columnTree_->setObjectName("columnTree");
+	columnTree_->setProperty("mvStyle",0);
+	columnTree_->setSortingEnabled(true); 
+	columnTree_->sortByColumn (0,Qt::AscendingOrder); 
+	columnTree_->setAlternatingRowColors(true);
+        columnTree_->setAllColumnsShowFocus(true);
+	columnTree_->setModel(columnSortModel_);	
+	//columnTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	//columnTree_->setActvatedByKeyNavigation(true);
+	//columnTree_->setAcceptDrops(true);
+	//columnTree_->setDragDropMode(QAbstractItemView::DropOnly);
+	//columnTree_->setRootIsDecorated(false);
+
+	columnLayout->addWidget(columnTree_);
+	
+}
+
+void OdbExaminer::setupVarBox()
+{
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	varPanel_=new QWidget;
+	QVBoxLayout *varLayout = new QVBoxLayout;
+	varLayout->setContentsMargins(0,0,0,0);
+	varPanel_->setLayout(varLayout);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	//Label
+	//label=new QLabel(tr("SET variables"));
+	//label->setFrameShape(QFrame::StyledPanel);
+	//label->setProperty("mvStyle","panel");
+	//varLayout->addWidget(label);
+
+	//Var tree
+	varModel_= new MvQOdbVarModel;
+	varSortModel_= new QSortFilterProxyModel;
+        varSortModel_->setSourceModel(varModel_);
+	varSortModel_->setDynamicSortFilter(true);
+	
+	varTree_=new QTreeView;
+	varTree_->setObjectName("varTree");
+	varTree_->setProperty("mvStyle",0);
+	varTree_->setSortingEnabled(true); 
+	varTree_->sortByColumn (0,Qt::AscendingOrder); 
+	varTree_->setAlternatingRowColors(true);
+        varTree_->setAllColumnsShowFocus(true);
+	varTree_->setModel(varSortModel_);	
+	//varTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	//varTree_->setActvatedByKeyNavigation(true);
+	//varTree_->setAcceptDrops(true);
+	//varTree_->setDragDropMode(QAbstractItemView::DropOnly);
+	varTree_->setRootIsDecorated(false);
+
+	varLayout->addWidget(varTree_);
+
+}
+
+void OdbExaminer::setupFindBox()
+{	
+	findPanel_=new MvQSearchLinePanel;
+	
+	columnFind_= new MvQTreeViewSearchLine(columnTree_,0,"");
+	findPanel_->addSearchLine(columnFind_,columnTree_);
+	
+	tableColumnFind_= new MvQTreeViewSearchLine(tableColumnTree_,0,"");
+	findPanel_->addSearchLine(tableColumnFind_,columnTree_);
+	
+	findPanel_->hide(); 
+}
+
+void OdbExaminer::init(MvQOdbMetaData *data)
+{	
+	//Set bufr metadata object
+	data_=data;
+
+	//It is using the ODB version!!!
+	readSettings();
+		
+	if(data_->odbVersion() == MvQOdbMetaData::Version1)
+	{
+		tableView_->init(data_,"hdr");
+
+		columnModel_->setData(data_->columns(),data_->odbVersion());
+		for(int i=0;i < columnModel_->columnCount()-1; i++)
+		{ 
+			columnTree_->resizeColumnToContents(i);
+		}
+
+		varModel_->setData(data_->vars());
+		for(int i=0;i < varModel_->columnCount()-1; i++)
+		{ 
+			varTree_->resizeColumnToContents(i);
+		}
+		
+		metaTab_->setTabEnabled(3,false);
+				
+		columnFind_= new MvQTreeViewSearchLine(columnTree_,0,"");
+		findPanel_->addSearchLine(columnFind_,metaTab_->widget(1));
+	
+		tableColumnFind_= new MvQTreeViewSearchLine(tableColumnTree_,0,"");
+		findPanel_->addSearchLine(tableColumnFind_,metaTab_->widget(0));
+		
+		varFind_= new MvQTreeViewSearchLine(varTree_,0,"");
+		findPanel_->addSearchLine(varFind_,metaTab_->widget(2));
+	}
+	else if(data_->odbVersion() == MvQOdbMetaData::Version2)
+	{
+		metaTab_->setTabEnabled(0,false);
+		metaTab_->setTabEnabled(1,true);
+		metaTab_->setTabEnabled(2,false);	
+	
+		qDebug() << "examiner columns" << data_->columns().count() << data_->columnNum();
+
+		columnModel_->setData(data_->columns(),data->odbVersion());
+		for(int i=0;i < columnModel_->columnCount()-1; i++)
+		{ 
+			columnTree_->resizeColumnToContents(i);
+		}
+
+		columnFind_= new MvQTreeViewSearchLine(columnTree_,0,"");
+		findPanel_->addSearchLine(columnFind_,metaTab_->widget(1));
+
+		dataFind_= new MvQTreeViewSearchLine(dataPanel_->dataTree(),0,"");
+		findPanel_->addSearchLine(dataFind_,metaTab_->widget(4));		
+		
+		metaTab_->setCurrentIndex(1);
+	}	
+	
+	//Fileinfo label
+	updateFileInfoLabel();
+		
+	//-----------------------
+	// Data
+	//-----------------------
+	//Data tab is initialised when we first click on it!!
+	
+	//It is using the ODB version so has to be called here!!!
+	readSettings();
+		
+}
+
+
+void OdbExaminer::slotTableSelected(QString tableName)
+{
+	MvQOdbTable *table=data_->tables()[tableName];
+	tableColumnModel_->setData(table->columns(),data_->odbVersion());
+	for(int i=0;i < tableColumnModel_->columnCount()-1; i++)
+	{ 
+		tableColumnTree_->resizeColumnToContents(i);
+	}
+
+}
+
+void OdbExaminer::slotTabIndexChanged(int index)
+{
+	if(index == 3)
+	{
+		if(data_)
+		{
+			if(!dataPanel_->initialised() && 
+			   !dataPanel_->init(data_->path()))
+			{
+				metaTab_->setTabEnabled(3,false);
+			}
+		}
+		else
+		{
+			metaTab_->setTabEnabled(3,false);
+		}
+	}
+	
+	findPanel_->setCurrentSearchLineById(metaTab_->currentWidget());
+}
+
+void OdbExaminer::slotShowAboutBox()
+{
+	MvQAbout about("ODB Examiner","",MvQAbout::MetviewVersion );
+	about.exec();
+}
+
+void OdbExaminer::slotConfigure()
+{
+	if(data_ && data_->odbVersion() != MvQOdbMetaData::Version2)
+		return;
+	
+	bool ok;
+     	int maxSize = QInputDialog::getInt(0, tr("Configure"),
+                                          tr("Maximum size of data blocks (MB):"), 
+                                          dataPanel_->maxChunkSizeInMb(),1,2000,1,&ok);
+	if(ok)
+        {
+	 	dataPanel_->setMaxChunkSizeInMb(maxSize);
+	}
+}
+
+void OdbExaminer::loadStarted()
+{
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	//loadProgress_->setRange(0,0);
+	//loadProgress_->show();
+}
+
+void OdbExaminer::loadFinished()
+{
+	QApplication::restoreOverrideCursor();
+
+	//loadProgress_->hide();
+	//loadProgress_->setRange(0,1);
+	//loadProgress_->setValue(1);	
+}
+
+void OdbExaminer::updateFileInfoLabel()
+{
+	fileInfoLabel_->setOdbTextLabel(data_->path(),data_->odbVersionString());
+}
+
+void OdbExaminer::writeSettings()
+{
+	if(!data_)
+		return;
+		
+	QSettings settings("ECMWF","MV4-OdbExaminer");
+	
+	if(data_->odbVersion() == MvQOdbMetaData::Version1)
+	{
+		settings.beginGroup("mainWindow_version1");
+		settings.setValue("geometry",saveGeometry());
+		settings.setValue("mainSplitter",mainSplitter_->saveState());
+		//settings.setValue("bottomSplitter",bottomSplitter->saveState());
+		settings.endGroup();
+	}
+	else if(data_->odbVersion() == MvQOdbMetaData::Version2)
+	{
+		settings.beginGroup("mainWindow_version2");
+		settings.setValue("geometry",saveGeometry());
+		settings.setValue("mainSplitter",mainSplitter_->saveState());
+		settings.endGroup();
+	}
+	
+	settings.beginGroup("global");
+	settings.setValue("maxChunkSizeInMb",dataPanel_->maxChunkSizeInMb());
+	settings.endGroup();
+}
+
+void OdbExaminer::readSettings()
+{
+	if(!data_)
+		return;
+
+	QSettings settings("ECMWF","MV4-OdbExaminer");
+	
+	if(data_->odbVersion() == MvQOdbMetaData::Version1)
+	{	
+		settings.beginGroup("mainWindow_version1");
+		restoreGeometry(settings.value("geometry").toByteArray());
+		mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+		//bottomSplitter->restoreState(settings.value("bottomSplitter").toByteArray());
+		settings.endGroup();
+	}
+	else if(data_->odbVersion() == MvQOdbMetaData::Version2)
+	{	
+		settings.beginGroup("mainWindow_version2");
+		restoreGeometry(settings.value("geometry").toByteArray());
+		mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+		//bottomSplitter->restoreState(settings.value("bottomSplitter").toByteArray());
+		settings.endGroup();
+	}
+	
+	settings.beginGroup("global");
+	if(!settings.value("maxChunkSizeInMb").isNull())
+	{
+		dataPanel_->setMaxChunkSizeInMb(settings.value("maxChunkSizeInMb").toInt());
+	}
+	settings.endGroup();
+
+}
diff --git a/src/OdbExaminer/OdbExaminer.h b/src/OdbExaminer/OdbExaminer.h
new file mode 100755
index 0000000..73a1801
--- /dev/null
+++ b/src/OdbExaminer/OdbExaminer.h
@@ -0,0 +1,116 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef OdbExaminer_H
+#define OdbExaminer_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+class QGroupBox;
+class QLabel;
+class QListWidget;
+class QSpinBox;
+class QSplitter;
+class QListView;
+class QTreeView;
+class QSortFilterProxyModel;
+class QStandardItemModel;
+class QTabWidget;
+class QTextBrowser;
+class QToolButton;
+
+class MvQFileInfoLabel;
+class MvQLogBrowser;
+class MvQOdbColumnModel;
+class MvQOdbDataModel;
+class MvQOdbDataWidget;
+class MvQOdbMetaData;
+class MvQOdbTableView;
+class MvQOdbVarModel;
+class MvQSearchLinePanel;
+class MvQTreeView;
+class MvQTreeViewSearchLine;
+
+class MvAbstractOdb;
+
+using namespace std;
+
+class OdbExaminer : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+    	OdbExaminer(QWidget *parent = 0);
+	~OdbExaminer();
+    	void init(MvQOdbMetaData*);
+	void updateFileInfoLabel();
+
+public slots:
+	void slotTableSelected(QString);
+	void slotTabIndexChanged(int);
+	void slotShowAboutBox();
+	void slotConfigure();	
+
+protected:
+	void setupEditActions();
+	void setupViewActions();
+	void setupSettingsActions();
+	void setupHelpActions();
+	void setupTableBox();
+	void setupColumnBox();
+	void setupVarBox();
+	void setupFindBox();
+
+	void loadStarted();
+	void loadFinished();
+
+	void readSettings();
+	void writeSettings();
+
+ 	MvQOdbMetaData *data_;
+	MvQMainWindow::MenuItemMap menuItems_;
+	MvQFileInfoLabel*  fileInfoLabel_;
+ 
+	QTabWidget *metaTab_;
+
+	QWidget*     		tablePanel_;
+	QSplitter*		tableSplitter_;
+	MvQOdbTableView*  	tableView_;
+	QTreeView*  		tableColumnTree_;
+	MvQOdbColumnModel* 	tableColumnModel_;
+	QSortFilterProxyModel* 	tableColumnSortModel_;
+	MvQTreeViewSearchLine*  tableColumnFind_;
+
+	QGroupBox*  	 	columnBox_;
+	QWidget*     		columnPanel_;
+	QTreeView*  		columnTree_;
+	MvQOdbColumnModel* 	columnModel_;
+	QSortFilterProxyModel* 	columnSortModel_;
+	MvQTreeViewSearchLine*  columnFind_;
+
+	QWidget*     		varPanel_;
+	QTreeView*  		varTree_;
+	MvQOdbVarModel* 	varModel_;
+	QSortFilterProxyModel* 	varSortModel_;
+	MvQTreeViewSearchLine*  varFind_;
+
+	MvQOdbDataWidget*     	dataPanel_;
+	MvQTreeViewSearchLine*  dataFind_;
+
+	MvQSearchLinePanel* findPanel_;
+
+	QSplitter*   mainSplitter_;
+	MvQLogBrowser* logBrowser_;
+};
+
+#endif
diff --git a/src/OgcClient/Makefile.am b/src/OgcClient/Makefile.am
new file mode 100644
index 0000000..fd4d23a
--- /dev/null
+++ b/src/OgcClient/Makefile.am
@@ -0,0 +1,96 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+bin_PROGRAMS = bin/WmsClient
+
+if METVIEW_EXPERIMENTAL
+bin_PROGRAMS += bin/WcsClient
+endif
+
+#--------COMMON SOURCES--------------------------------------------------
+
+ogc_COMMON_SOURCES = MvQHighlighter.cc MvQOgcParam.cc MvQOgcRequest.cc \
+		     MvQHighlighter.h MvQOgcParam.h MvQOgcRequest.h \
+		     MvQOgcClient.qrc
+
+ogc_COMMON_SOURCES_nodist =  MvQOgcClient.qrc.cpp
+
+#-------- WmsClient ------------------------------------------------------------------
+
+bin_WmsClient_SOURCES =  MvMain.cc \
+			${ogc_COMMON_SOURCES} \
+			MvQOgcTreeModel.cc \
+			MvQWmsClient.cc \
+			MvQWmsClientEditor.cc \
+			MvQOgcTreeModel.h\
+			MvQWmsClient.h MvQWmsClientEditor.h
+
+nodist_bin_WmsClient_SOURCES = ${ogc_COMMON_SOURCES_nodist}  \
+                               MvQWmsClient.moc.cpp MvQWmsClientEditor.moc.cpp
+
+bin_WmsClient_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_WmsClient_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_WmsClient_LDADD    = $(LDADD) $(STANDARD_METVIEW_LIBS) -lMvQtGui -lMvQtUtil -lUtil  $(QT_LIBS)
+bin_WmsClient_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+
+#-------- WcsClient ------------------------------------------------------------------
+
+bin_WcsClient_SOURCES =  MvMainWcsClient.cc \
+			${ogc_COMMON_SOURCES} \
+			MvQOgcTreeModel.cc \
+			MvQWcsClient.cc \
+			MvQWcsClientEditor.cc \
+			MvQOgcTreeModel.h\
+			MvQWcsClient.h  MvQWcsClientEditor.h
+
+nodist_bin_WcsClient_SOURCES = ${ogc_COMMON_SOURCES_nodist} \
+                               MvQWcsClient.moc.cpp MvQWcsClientEditor.moc.cpp
+
+bin_WcsClient_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_WcsClient_LDFLAGS  = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_WcsClient_LDADD    = $(LDADD) $(STANDARD_METVIEW_LIBS) -lMvQtGui -lMvQtUtil -lUtil  $(QT_LIBS)
+bin_WcsClient_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+
+#-------- share ------------------------------------------------------------
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.WmsClient \
+		 $(local_sharedir)/WmsClientDef  \
+		 $(local_sharedir)/WmsClientRules
+
+if METVIEW_EXPERIMENTAL
+share_DATA += $(local_sharedir)/ObjectSpec.WcsClient \
+	      $(local_sharedir)/WcsClientDef  \
+	      $(local_sharedir)/WcsClientRules
+endif
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} WMS_CLIENT.xpm  $(local_iconsdir)
+	${INSTALL} WCS_CLIENT.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/WMS_CLIENT.svg \
+	     *.moc.cpp *.qrc.cpp \
+	     $(nodit_share_DATA) $(local_iconsdir)/WCS_CLIENT.svg
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = WMS_CLIENT.svg WMS_CLIENT.xpm ObjectSpec.WmsClient WmsClientDef WmsClientRules \
+	     MvQOgcClient.qrc preview.css \
+	     WCS_CLIENT.svg WCS_CLIENT.xpm ObjectSpec.WcsClient WcsClientDef WcsClientRules
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp	
+
diff --git a/src/OgcClient/Makefile.in b/src/OgcClient/Makefile.in
new file mode 100644
index 0000000..436811c
--- /dev/null
+++ b/src/OgcClient/Makefile.in
@@ -0,0 +1,1270 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/WmsClient$(EXEEXT) $(am__EXEEXT_1)
+ at METVIEW_EXPERIMENTAL_TRUE@am__append_1 = bin/WcsClient
+ at METVIEW_EXPERIMENTAL_TRUE@am__append_2 = $(local_sharedir)/ObjectSpec.WcsClient \
+ at METVIEW_EXPERIMENTAL_TRUE@	      $(local_sharedir)/WcsClientDef  \
+ at METVIEW_EXPERIMENTAL_TRUE@	      $(local_sharedir)/WcsClientRules
+
+subdir = src/OgcClient
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+ at METVIEW_EXPERIMENTAL_TRUE@am__EXEEXT_1 = bin/WcsClient$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = bin_WcsClient-MvQHighlighter.$(OBJEXT) \
+	bin_WcsClient-MvQOgcParam.$(OBJEXT) \
+	bin_WcsClient-MvQOgcRequest.$(OBJEXT)
+am_bin_WcsClient_OBJECTS = bin_WcsClient-MvMainWcsClient.$(OBJEXT) \
+	$(am__objects_1) bin_WcsClient-MvQOgcTreeModel.$(OBJEXT) \
+	bin_WcsClient-MvQWcsClient.$(OBJEXT) \
+	bin_WcsClient-MvQWcsClientEditor.$(OBJEXT)
+am__objects_2 = bin_WcsClient-MvQOgcClient.qrc.$(OBJEXT)
+nodist_bin_WcsClient_OBJECTS = $(am__objects_2) \
+	bin_WcsClient-MvQWcsClient.moc.$(OBJEXT) \
+	bin_WcsClient-MvQWcsClientEditor.moc.$(OBJEXT)
+bin_WcsClient_OBJECTS = $(am_bin_WcsClient_OBJECTS) \
+	$(nodist_bin_WcsClient_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_WcsClient_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_WcsClient_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_3 = bin_WmsClient-MvQHighlighter.$(OBJEXT) \
+	bin_WmsClient-MvQOgcParam.$(OBJEXT) \
+	bin_WmsClient-MvQOgcRequest.$(OBJEXT)
+am_bin_WmsClient_OBJECTS = bin_WmsClient-MvMain.$(OBJEXT) \
+	$(am__objects_3) bin_WmsClient-MvQOgcTreeModel.$(OBJEXT) \
+	bin_WmsClient-MvQWmsClient.$(OBJEXT) \
+	bin_WmsClient-MvQWmsClientEditor.$(OBJEXT)
+am__objects_4 = bin_WmsClient-MvQOgcClient.qrc.$(OBJEXT)
+nodist_bin_WmsClient_OBJECTS = $(am__objects_4) \
+	bin_WmsClient-MvQWmsClient.moc.$(OBJEXT) \
+	bin_WmsClient-MvQWmsClientEditor.moc.$(OBJEXT)
+bin_WmsClient_OBJECTS = $(am_bin_WmsClient_OBJECTS) \
+	$(nodist_bin_WmsClient_OBJECTS)
+bin_WmsClient_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_WmsClient_LDFLAGS) $(LDFLAGS) \
+	-o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_WcsClient_SOURCES) $(nodist_bin_WcsClient_SOURCES) \
+	$(bin_WmsClient_SOURCES) $(nodist_bin_WmsClient_SOURCES)
+DIST_SOURCES = $(bin_WcsClient_SOURCES) $(bin_WmsClient_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+
+#--------COMMON SOURCES--------------------------------------------------
+ogc_COMMON_SOURCES = MvQHighlighter.cc MvQOgcParam.cc MvQOgcRequest.cc \
+		     MvQHighlighter.h MvQOgcParam.h MvQOgcRequest.h \
+		     MvQOgcClient.qrc
+
+ogc_COMMON_SOURCES_nodist = MvQOgcClient.qrc.cpp
+
+#-------- WmsClient ------------------------------------------------------------------
+bin_WmsClient_SOURCES = MvMain.cc \
+			${ogc_COMMON_SOURCES} \
+			MvQOgcTreeModel.cc \
+			MvQWmsClient.cc \
+			MvQWmsClientEditor.cc \
+			MvQOgcTreeModel.h\
+			MvQWmsClient.h MvQWmsClientEditor.h
+
+nodist_bin_WmsClient_SOURCES = ${ogc_COMMON_SOURCES_nodist}  \
+                               MvQWmsClient.moc.cpp MvQWmsClientEditor.moc.cpp
+
+bin_WmsClient_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_WmsClient_LDFLAGS = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_WmsClient_LDADD = $(LDADD) $(STANDARD_METVIEW_LIBS) -lMvQtGui -lMvQtUtil -lUtil  $(QT_LIBS)
+bin_WmsClient_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+#-------- WcsClient ------------------------------------------------------------------
+bin_WcsClient_SOURCES = MvMainWcsClient.cc \
+			${ogc_COMMON_SOURCES} \
+			MvQOgcTreeModel.cc \
+			MvQWcsClient.cc \
+			MvQWcsClientEditor.cc \
+			MvQOgcTreeModel.h\
+			MvQWcsClient.h  MvQWcsClientEditor.h
+
+nodist_bin_WcsClient_SOURCES = ${ogc_COMMON_SOURCES_nodist} \
+                               MvQWcsClient.moc.cpp MvQWcsClientEditor.moc.cpp
+
+bin_WcsClient_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I../libMvQtGui -I../libMvQtUtil
+bin_WcsClient_LDFLAGS = $(QT_LDFLAGS) $(LDFLAGS) -L../../lib
+bin_WcsClient_LDADD = $(LDADD) $(STANDARD_METVIEW_LIBS) -lMvQtGui -lMvQtUtil -lUtil  $(QT_LIBS)
+bin_WcsClient_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+
+#-------- share ------------------------------------------------------------
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.WmsClient \
+	$(local_sharedir)/WmsClientDef \
+	$(local_sharedir)/WmsClientRules $(am__append_2)
+CLEANFILES = $(share_DATA) $(local_iconsdir)/WMS_CLIENT.svg \
+	     *.moc.cpp *.qrc.cpp \
+	     $(nodit_share_DATA) $(local_iconsdir)/WCS_CLIENT.svg
+
+BUILT_SOURCES = bin icons
+EXTRA_DIST = WMS_CLIENT.svg WMS_CLIENT.xpm ObjectSpec.WmsClient WmsClientDef WmsClientRules \
+	     MvQOgcClient.qrc preview.css \
+	     WCS_CLIENT.svg WCS_CLIENT.xpm ObjectSpec.WcsClient WcsClientDef WcsClientRules
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/OgcClient/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/OgcClient/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/WcsClient$(EXEEXT): $(bin_WcsClient_OBJECTS) $(bin_WcsClient_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/WcsClient$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_WcsClient_LINK) $(bin_WcsClient_OBJECTS) $(bin_WcsClient_LDADD) $(LIBS)
+bin/WmsClient$(EXEEXT): $(bin_WmsClient_OBJECTS) $(bin_WmsClient_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/WmsClient$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_WmsClient_LINK) $(bin_WmsClient_OBJECTS) $(bin_WmsClient_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvMainWcsClient.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQHighlighter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQOgcParam.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQOgcRequest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQWcsClient.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQHighlighter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQOgcParam.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQOgcRequest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQWmsClient.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_WcsClient-MvMainWcsClient.o: MvMainWcsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvMainWcsClient.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvMainWcsClient.Tpo -c -o bin_WcsClient-MvMainWcsClient.o `test -f 'MvMainWcsClient.cc' || echo '$(srcdir)/'`MvMainWcsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvMainWcsClient.Tpo $(DEPDIR)/bin_WcsClient-MvMainWcsClient.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMainWcsClient.cc' object='bin_WcsClient-MvMainWcsClient.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvMainWcsClient.o `test -f 'MvMainWcsClient.cc' || echo '$(srcdir)/'`MvMainWcsClient.cc
+
+bin_WcsClient-MvMainWcsClient.obj: MvMainWcsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvMainWcsClient.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvMainWcsClient.Tpo -c -o bin_WcsClient-MvMainWcsClient.obj `if test -f 'MvMainWcsClient.cc'; then $(CYGPATH_W) 'MvMainWcsClient.cc'; else $(CYGPATH_W) '$(srcdir)/MvMainWcsClient.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvMainWcsClient.Tpo $(DEPDIR)/bin_WcsClient-MvMainWcsClient.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMainWcsClient.cc' object='bin_WcsClient-MvMainWcsClient.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvMainWcsClient.obj `if test -f 'MvMainWcsClient.cc'; then $(CYGPATH_W) 'MvMainWcsClient.cc'; else $(CYGPATH_W) '$(srcdir)/MvMainWcsClient.cc'; fi`
+
+bin_WcsClient-MvQHighlighter.o: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQHighlighter.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQHighlighter.Tpo -c -o bin_WcsClient-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQHighlighter.Tpo $(DEPDIR)/bin_WcsClient-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='bin_WcsClient-MvQHighlighter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+
+bin_WcsClient-MvQHighlighter.obj: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQHighlighter.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQHighlighter.Tpo -c -o bin_WcsClient-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQHighlighter.Tpo $(DEPDIR)/bin_WcsClient-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='bin_WcsClient-MvQHighlighter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+
+bin_WcsClient-MvQOgcParam.o: MvQOgcParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcParam.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcParam.Tpo -c -o bin_WcsClient-MvQOgcParam.o `test -f 'MvQOgcParam.cc' || echo '$(srcdir)/'`MvQOgcParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcParam.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcParam.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcParam.cc' object='bin_WcsClient-MvQOgcParam.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcParam.o `test -f 'MvQOgcParam.cc' || echo '$(srcdir)/'`MvQOgcParam.cc
+
+bin_WcsClient-MvQOgcParam.obj: MvQOgcParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcParam.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcParam.Tpo -c -o bin_WcsClient-MvQOgcParam.obj `if test -f 'MvQOgcParam.cc'; then $(CYGPATH_W) 'MvQOgcParam.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcParam.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcParam.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcParam.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcParam.cc' object='bin_WcsClient-MvQOgcParam.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcParam.obj `if test -f 'MvQOgcParam.cc'; then $(CYGPATH_W) 'MvQOgcParam.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcParam.cc'; fi`
+
+bin_WcsClient-MvQOgcRequest.o: MvQOgcRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcRequest.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcRequest.Tpo -c -o bin_WcsClient-MvQOgcRequest.o `test -f 'MvQOgcRequest.cc' || echo '$(srcdir)/'`MvQOgcRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcRequest.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcRequest.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcRequest.cc' object='bin_WcsClient-MvQOgcRequest.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcRequest.o `test -f 'MvQOgcRequest.cc' || echo '$(srcdir)/'`MvQOgcRequest.cc
+
+bin_WcsClient-MvQOgcRequest.obj: MvQOgcRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcRequest.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcRequest.Tpo -c -o bin_WcsClient-MvQOgcRequest.obj `if test -f 'MvQOgcRequest.cc'; then $(CYGPATH_W) 'MvQOgcRequest.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcRequest.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcRequest.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcRequest.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcRequest.cc' object='bin_WcsClient-MvQOgcRequest.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcRequest.obj `if test -f 'MvQOgcRequest.cc'; then $(CYGPATH_W) 'MvQOgcRequest.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcRequest.cc'; fi`
+
+bin_WcsClient-MvQOgcTreeModel.o: MvQOgcTreeModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcTreeModel.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Tpo -c -o bin_WcsClient-MvQOgcTreeModel.o `test -f 'MvQOgcTreeModel.cc' || echo '$(srcdir)/'`MvQOgcTreeModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcTreeModel.cc' object='bin_WcsClient-MvQOgcTreeModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcTreeModel.o `test -f 'MvQOgcTreeModel.cc' || echo '$(srcdir)/'`MvQOgcTreeModel.cc
+
+bin_WcsClient-MvQOgcTreeModel.obj: MvQOgcTreeModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcTreeModel.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Tpo -c -o bin_WcsClient-MvQOgcTreeModel.obj `if test -f 'MvQOgcTreeModel.cc'; then $(CYGPATH_W) 'MvQOgcTreeModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcTreeModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcTreeModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcTreeModel.cc' object='bin_WcsClient-MvQOgcTreeModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcTreeModel.obj `if test -f 'MvQOgcTreeModel.cc'; then $(CYGPATH_W) 'MvQOgcTreeModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcTreeModel.cc'; fi`
+
+bin_WcsClient-MvQWcsClient.o: MvQWcsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClient.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClient.Tpo -c -o bin_WcsClient-MvQWcsClient.o `test -f 'MvQWcsClient.cc' || echo '$(srcdir)/'`MvQWcsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClient.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClient.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClient.cc' object='bin_WcsClient-MvQWcsClient.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClient.o `test -f 'MvQWcsClient.cc' || echo '$(srcdir)/'`MvQWcsClient.cc
+
+bin_WcsClient-MvQWcsClient.obj: MvQWcsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClient.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClient.Tpo -c -o bin_WcsClient-MvQWcsClient.obj `if test -f 'MvQWcsClient.cc'; then $(CYGPATH_W) 'MvQWcsClient.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClient.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClient.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClient.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClient.cc' object='bin_WcsClient-MvQWcsClient.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClient.obj `if test -f 'MvQWcsClient.cc'; then $(CYGPATH_W) 'MvQWcsClient.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClient.cc'; fi`
+
+bin_WcsClient-MvQWcsClientEditor.o: MvQWcsClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClientEditor.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Tpo -c -o bin_WcsClient-MvQWcsClientEditor.o `test -f 'MvQWcsClientEditor.cc' || echo '$(srcdir)/'`MvQWcsClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClientEditor.cc' object='bin_WcsClient-MvQWcsClientEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClientEditor.o `test -f 'MvQWcsClientEditor.cc' || echo '$(srcdir)/'`MvQWcsClientEditor.cc
+
+bin_WcsClient-MvQWcsClientEditor.obj: MvQWcsClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClientEditor.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Tpo -c -o bin_WcsClient-MvQWcsClientEditor.obj `if test -f 'MvQWcsClientEditor.cc'; then $(CYGPATH_W) 'MvQWcsClientEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClientEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClientEditor.cc' object='bin_WcsClient-MvQWcsClientEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClientEditor.obj `if test -f 'MvQWcsClientEditor.cc'; then $(CYGPATH_W) 'MvQWcsClientEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClientEditor.cc'; fi`
+
+bin_WcsClient-MvQOgcClient.qrc.o: MvQOgcClient.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcClient.qrc.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Tpo -c -o bin_WcsClient-MvQOgcClient.qrc.o `test -f 'MvQOgcClient.qrc.cpp' || echo '$(srcdir)/'`MvQOgcClient.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcClient.qrc.cpp' object='bin_WcsClient-MvQOgcClient.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcClient.qrc.o `test -f 'MvQOgcClient.qrc.cpp' || echo '$(srcdir)/'`MvQOgcClient.qrc.cpp
+
+bin_WcsClient-MvQOgcClient.qrc.obj: MvQOgcClient.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQOgcClient.qrc.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Tpo -c -o bin_WcsClient-MvQOgcClient.qrc.obj `if test -f 'MvQOgcClient.qrc.cpp'; then $(CYGPATH_W) 'MvQOgcClient.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOgcClient.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Tpo $(DEPDIR)/bin_WcsClient-MvQOgcClient.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcClient.qrc.cpp' object='bin_WcsClient-MvQOgcClient.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQOgcClient.qrc.obj `if test -f 'MvQOgcClient.qrc.cpp'; then $(CYGPATH_W) 'MvQOgcClient.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOgcClient.qrc.cpp'; fi`
+
+bin_WcsClient-MvQWcsClient.moc.o: MvQWcsClient.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClient.moc.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Tpo -c -o bin_WcsClient-MvQWcsClient.moc.o `test -f 'MvQWcsClient.moc.cpp' || echo '$(srcdir)/'`MvQWcsClient.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClient.moc.cpp' object='bin_WcsClient-MvQWcsClient.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClient.moc.o `test -f 'MvQWcsClient.moc.cpp' || echo '$(srcdir)/'`MvQWcsClient.moc.cpp
+
+bin_WcsClient-MvQWcsClient.moc.obj: MvQWcsClient.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClient.moc.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Tpo -c -o bin_WcsClient-MvQWcsClient.moc.obj `if test -f 'MvQWcsClient.moc.cpp'; then $(CYGPATH_W) 'MvQWcsClient.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClient.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClient.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClient.moc.cpp' object='bin_WcsClient-MvQWcsClient.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClient.moc.obj `if test -f 'MvQWcsClient.moc.cpp'; then $(CYGPATH_W) 'MvQWcsClient.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClient.moc.cpp'; fi`
+
+bin_WcsClient-MvQWcsClientEditor.moc.o: MvQWcsClientEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClientEditor.moc.o -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Tpo -c -o bin_WcsClient-MvQWcsClientEditor.moc.o `test -f 'MvQWcsClientEditor.moc.cpp' || echo '$(srcdir)/'`MvQWcsClientEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClientEditor.moc.cpp' object='bin_WcsClient-MvQWcsClientEditor.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClientEditor.moc.o `test -f 'MvQWcsClientEditor.moc.cpp' || echo '$(srcdir)/'`MvQWcsClientEditor.moc.cpp
+
+bin_WcsClient-MvQWcsClientEditor.moc.obj: MvQWcsClientEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WcsClient-MvQWcsClientEditor.moc.obj -MD -MP -MF $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Tpo -c -o bin_WcsClient-MvQWcsClientEditor.moc.obj `if test -f 'MvQWcsClientEditor.moc.cpp'; then $(CYGPATH_W) 'MvQWcsClientEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClientEditor.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Tpo $(DEPDIR)/bin_WcsClient-MvQWcsClientEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWcsClientEditor.moc.cpp' object='bin_WcsClient-MvQWcsClientEditor.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WcsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WcsClient-MvQWcsClientEditor.moc.obj `if test -f 'MvQWcsClientEditor.moc.cpp'; then $(CYGPATH_W) 'MvQWcsClientEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWcsClientEditor.moc.cpp'; fi`
+
+bin_WmsClient-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvMain.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvMain.Tpo -c -o bin_WmsClient-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvMain.Tpo $(DEPDIR)/bin_WmsClient-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_WmsClient-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_WmsClient-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvMain.Tpo -c -o bin_WmsClient-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvMain.Tpo $(DEPDIR)/bin_WmsClient-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_WmsClient-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_WmsClient-MvQHighlighter.o: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQHighlighter.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQHighlighter.Tpo -c -o bin_WmsClient-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQHighlighter.Tpo $(DEPDIR)/bin_WmsClient-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='bin_WmsClient-MvQHighlighter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+
+bin_WmsClient-MvQHighlighter.obj: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQHighlighter.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQHighlighter.Tpo -c -o bin_WmsClient-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQHighlighter.Tpo $(DEPDIR)/bin_WmsClient-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='bin_WmsClient-MvQHighlighter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+
+bin_WmsClient-MvQOgcParam.o: MvQOgcParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcParam.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcParam.Tpo -c -o bin_WmsClient-MvQOgcParam.o `test -f 'MvQOgcParam.cc' || echo '$(srcdir)/'`MvQOgcParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcParam.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcParam.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcParam.cc' object='bin_WmsClient-MvQOgcParam.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcParam.o `test -f 'MvQOgcParam.cc' || echo '$(srcdir)/'`MvQOgcParam.cc
+
+bin_WmsClient-MvQOgcParam.obj: MvQOgcParam.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcParam.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcParam.Tpo -c -o bin_WmsClient-MvQOgcParam.obj `if test -f 'MvQOgcParam.cc'; then $(CYGPATH_W) 'MvQOgcParam.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcParam.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcParam.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcParam.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcParam.cc' object='bin_WmsClient-MvQOgcParam.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcParam.obj `if test -f 'MvQOgcParam.cc'; then $(CYGPATH_W) 'MvQOgcParam.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcParam.cc'; fi`
+
+bin_WmsClient-MvQOgcRequest.o: MvQOgcRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcRequest.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcRequest.Tpo -c -o bin_WmsClient-MvQOgcRequest.o `test -f 'MvQOgcRequest.cc' || echo '$(srcdir)/'`MvQOgcRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcRequest.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcRequest.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcRequest.cc' object='bin_WmsClient-MvQOgcRequest.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcRequest.o `test -f 'MvQOgcRequest.cc' || echo '$(srcdir)/'`MvQOgcRequest.cc
+
+bin_WmsClient-MvQOgcRequest.obj: MvQOgcRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcRequest.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcRequest.Tpo -c -o bin_WmsClient-MvQOgcRequest.obj `if test -f 'MvQOgcRequest.cc'; then $(CYGPATH_W) 'MvQOgcRequest.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcRequest.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcRequest.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcRequest.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcRequest.cc' object='bin_WmsClient-MvQOgcRequest.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcRequest.obj `if test -f 'MvQOgcRequest.cc'; then $(CYGPATH_W) 'MvQOgcRequest.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcRequest.cc'; fi`
+
+bin_WmsClient-MvQOgcTreeModel.o: MvQOgcTreeModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcTreeModel.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Tpo -c -o bin_WmsClient-MvQOgcTreeModel.o `test -f 'MvQOgcTreeModel.cc' || echo '$(srcdir)/'`MvQOgcTreeModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcTreeModel.cc' object='bin_WmsClient-MvQOgcTreeModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcTreeModel.o `test -f 'MvQOgcTreeModel.cc' || echo '$(srcdir)/'`MvQOgcTreeModel.cc
+
+bin_WmsClient-MvQOgcTreeModel.obj: MvQOgcTreeModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcTreeModel.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Tpo -c -o bin_WmsClient-MvQOgcTreeModel.obj `if test -f 'MvQOgcTreeModel.cc'; then $(CYGPATH_W) 'MvQOgcTreeModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcTreeModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcTreeModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcTreeModel.cc' object='bin_WmsClient-MvQOgcTreeModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcTreeModel.obj `if test -f 'MvQOgcTreeModel.cc'; then $(CYGPATH_W) 'MvQOgcTreeModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOgcTreeModel.cc'; fi`
+
+bin_WmsClient-MvQWmsClient.o: MvQWmsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClient.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClient.Tpo -c -o bin_WmsClient-MvQWmsClient.o `test -f 'MvQWmsClient.cc' || echo '$(srcdir)/'`MvQWmsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClient.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClient.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClient.cc' object='bin_WmsClient-MvQWmsClient.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClient.o `test -f 'MvQWmsClient.cc' || echo '$(srcdir)/'`MvQWmsClient.cc
+
+bin_WmsClient-MvQWmsClient.obj: MvQWmsClient.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClient.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClient.Tpo -c -o bin_WmsClient-MvQWmsClient.obj `if test -f 'MvQWmsClient.cc'; then $(CYGPATH_W) 'MvQWmsClient.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClient.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClient.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClient.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClient.cc' object='bin_WmsClient-MvQWmsClient.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClient.obj `if test -f 'MvQWmsClient.cc'; then $(CYGPATH_W) 'MvQWmsClient.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClient.cc'; fi`
+
+bin_WmsClient-MvQWmsClientEditor.o: MvQWmsClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClientEditor.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Tpo -c -o bin_WmsClient-MvQWmsClientEditor.o `test -f 'MvQWmsClientEditor.cc' || echo '$(srcdir)/'`MvQWmsClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClientEditor.cc' object='bin_WmsClient-MvQWmsClientEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClientEditor.o `test -f 'MvQWmsClientEditor.cc' || echo '$(srcdir)/'`MvQWmsClientEditor.cc
+
+bin_WmsClient-MvQWmsClientEditor.obj: MvQWmsClientEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClientEditor.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Tpo -c -o bin_WmsClient-MvQWmsClientEditor.obj `if test -f 'MvQWmsClientEditor.cc'; then $(CYGPATH_W) 'MvQWmsClientEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClientEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClientEditor.cc' object='bin_WmsClient-MvQWmsClientEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClientEditor.obj `if test -f 'MvQWmsClientEditor.cc'; then $(CYGPATH_W) 'MvQWmsClientEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClientEditor.cc'; fi`
+
+bin_WmsClient-MvQOgcClient.qrc.o: MvQOgcClient.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcClient.qrc.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Tpo -c -o bin_WmsClient-MvQOgcClient.qrc.o `test -f 'MvQOgcClient.qrc.cpp' || echo '$(srcdir)/'`MvQOgcClient.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcClient.qrc.cpp' object='bin_WmsClient-MvQOgcClient.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcClient.qrc.o `test -f 'MvQOgcClient.qrc.cpp' || echo '$(srcdir)/'`MvQOgcClient.qrc.cpp
+
+bin_WmsClient-MvQOgcClient.qrc.obj: MvQOgcClient.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQOgcClient.qrc.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Tpo -c -o bin_WmsClient-MvQOgcClient.qrc.obj `if test -f 'MvQOgcClient.qrc.cpp'; then $(CYGPATH_W) 'MvQOgcClient.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOgcClient.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Tpo $(DEPDIR)/bin_WmsClient-MvQOgcClient.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOgcClient.qrc.cpp' object='bin_WmsClient-MvQOgcClient.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQOgcClient.qrc.obj `if test -f 'MvQOgcClient.qrc.cpp'; then $(CYGPATH_W) 'MvQOgcClient.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOgcClient.qrc.cpp'; fi`
+
+bin_WmsClient-MvQWmsClient.moc.o: MvQWmsClient.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClient.moc.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Tpo -c -o bin_WmsClient-MvQWmsClient.moc.o `test -f 'MvQWmsClient.moc.cpp' || echo '$(srcdir)/'`MvQWmsClient.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClient.moc.cpp' object='bin_WmsClient-MvQWmsClient.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClient.moc.o `test -f 'MvQWmsClient.moc.cpp' || echo '$(srcdir)/'`MvQWmsClient.moc.cpp
+
+bin_WmsClient-MvQWmsClient.moc.obj: MvQWmsClient.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClient.moc.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Tpo -c -o bin_WmsClient-MvQWmsClient.moc.obj `if test -f 'MvQWmsClient.moc.cpp'; then $(CYGPATH_W) 'MvQWmsClient.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClient.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClient.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClient.moc.cpp' object='bin_WmsClient-MvQWmsClient.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClient.moc.obj `if test -f 'MvQWmsClient.moc.cpp'; then $(CYGPATH_W) 'MvQWmsClient.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClient.moc.cpp'; fi`
+
+bin_WmsClient-MvQWmsClientEditor.moc.o: MvQWmsClientEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClientEditor.moc.o -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Tpo -c -o bin_WmsClient-MvQWmsClientEditor.moc.o `test -f 'MvQWmsClientEditor.moc.cpp' || echo '$(srcdir)/'`MvQWmsClientEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClientEditor.moc.cpp' object='bin_WmsClient-MvQWmsClientEditor.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClientEditor.moc.o `test -f 'MvQWmsClientEditor.moc.cpp' || echo '$(srcdir)/'`MvQWmsClientEditor.moc.cpp
+
+bin_WmsClient-MvQWmsClientEditor.moc.obj: MvQWmsClientEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WmsClient-MvQWmsClientEditor.moc.obj -MD -MP -MF $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Tpo -c -o bin_WmsClient-MvQWmsClientEditor.moc.obj `if test -f 'MvQWmsClientEditor.moc.cpp'; then $(CYGPATH_W) 'MvQWmsClientEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClientEditor.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Tpo $(DEPDIR)/bin_WmsClient-MvQWmsClientEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQWmsClientEditor.moc.cpp' object='bin_WmsClient-MvQWmsClientEditor.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WmsClient_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WmsClient-MvQWmsClientEditor.moc.obj `if test -f 'MvQWmsClientEditor.moc.cpp'; then $(CYGPATH_W) 'MvQWmsClientEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQWmsClientEditor.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} WMS_CLIENT.xpm  $(local_iconsdir)
+	${INSTALL} WCS_CLIENT.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp	
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/OgcClient/MvMain.cc b/src/OgcClient/MvMain.cc
new file mode 100644
index 0000000..2cf2b01
--- /dev/null
+++ b/src/OgcClient/MvMain.cc
@@ -0,0 +1,335 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QDateTime>
+#include <QDebug>
+#include <QStringList>
+#include <QVector>
+#include <QXmlFormatter>
+#include <QXmlQuery>
+#include <QXmlResultItems>
+
+#include "MvQWmsClient.h"
+#include "MvQWmsClientEditor.h"
+#include "MvQOgcRequest.h"
+//#include "MvQOgcServiceManager.h"
+#include "Metview.h"
+#include "MvQService.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class MvWmsClient : public MvQService
+{	
+   public:
+	MvWmsClient() : MvQService("WMSCLIENT") {};
+	void serve(MvRequest&,MvRequest&);
+	void processUiMode(MvRequest&,MvRequest&);
+	void processGetMode(MvRequest&,MvRequest&,const string&);
+};
+
+void MvWmsClient::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "---MvWmsClient::serve() IN---" << endl;
+  	in.print();
+
+	// Get user action mode
+	const char* modeC = (const char*)in("_ACTION");
+	string mode;
+	if(modeC)
+	  	mode=string(modeC);
+	
+	
+	if(mode.empty())
+	{
+		const char* appl = (const char*)in("_APPL");
+		if(appl && strcmp(appl,"macro") == 0)
+		{
+			processGetMode(in,out,mode);
+		}
+	}
+	else if(mode == "edit")
+	{
+		processUiMode(in,out);
+	}
+	else if(mode == "visualise" || 
+		mode == "prepare"  ||
+		mode  == "execute"  ||
+		mode == "update")
+	{		
+		processGetMode(in,out,mode);
+
+	}
+
+	cout << "---MvWmsClient::serve() OUT---" << endl;
+	out.print();
+}
+
+
+void MvWmsClient::processUiMode( MvRequest& in, MvRequest& /*out*/)
+{
+	// Get icon filename
+	//string filename(getenv("METVIEW_USER_DIRECTORY"));
+	//filename += (const char*)in("_NAME");
+	string filename((const char*)in("_NAME"));
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(find);
+	Q_INIT_RESOURCE(window);
+
+	/*QString clientMode("EXPERT");
+	if(static_cast<const char*>(in("MODE")) != 0)
+	{
+		clientMode=QString(in("MODE"));
+	}*/
+
+	// Initialize client
+	MvQWmsUiClient *wmsClient = new MvQWmsUiClient(filename,in);
+	
+	//Define the ogc service manager configuration file name
+	char *mvhome=getenv("METVIEW_USER_DIRECTORY");
+ 	if (mvhome == 0)  
+	{	
+			//marslog(LOG_EXIT|LOG_EROR,"%s\n",sbuff.str().c_str());
+			//setError(13,"Environment variable METVIEW_USER_DIRECTORY is not defined!");	
+		return;	
+	}
+
+	//QString fconf(mvhome);
+	//fconf+="/Metview/Defaults/OgcClient_conf.xml";
+ 	
+	//Create the manager
+	//MvQOgcServiceManager *manager=new MvQOgcServiceManager(fconf);
+
+	//Read the icon file and initialize the dialog
+	MvQWmsClientEditor *editor=new MvQWmsClientEditor(wmsClient);
+	editor->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+
+	//Enter the app loop
+ 	app.exec();
+}
+
+void MvWmsClient::processGetMode( MvRequest& in, MvRequest& out,const string& mode)
+{
+	QApplication app(ac, av);
+	
+	MvQWmsGetClient *client = new MvQWmsGetClient(in);
+
+	if(mode == "update" && client->requestChanged() == false)
+	{
+		return;
+	}	
+	
+	client->runGetMap();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+
+	//Enter the app loop
+ 	app.exec();
+	
+	qDebug() << "App loop exited";
+
+	//If the getMap request failed returns
+	if(client->getMapRunStatus() == false)
+	{
+		setError(13); //,"GetMap request failed!");
+		return;
+	}
+	
+	//Else build the output request
+
+	MvRequest req("PRASTER");
+	req("IMPORT_FILE_TYPE") = "png",
+	req("IMPORT_X_POSITION") = -180;
+	req("IMPORT_Y_POSITION") = -90;
+	req("IMPORT_WIDTH") = 360;
+	req("IMPORT_HEIGHT") = 180;
+	
+	MvQGetMapRequest *gmr = client->getMapRequest();
+
+	req("CRS") = gmr->crs().toStdString().c_str();
+
+	//In version 1.3.0 for epsg:4326 x lat and y is lon !!!!!
+	//We need to swap here the coordinates because
+	//magics++ interprets x as lon and y as lat!!
+	if(gmr->request().contains("CRS=",Qt::CaseInsensitive) &&
+	   gmr->crs() == "EPSG:4326")
+	{	
+		req("CRS_MINX") = gmr->minY().toStdString().c_str();
+		req("CRS_MINY") = gmr->minX().toStdString().c_str();
+		req("CRS_MAXX") = gmr->maxY().toStdString().c_str();
+		req("CRS_MAXY") = gmr->maxX().toStdString().c_str();  
+	}
+	else
+	{
+		req("CRS_MINX") = gmr->minX().toStdString().c_str();
+		req("CRS_MINY") = gmr->minY().toStdString().c_str();
+		req("CRS_MAXX") = gmr->maxX().toStdString().c_str();
+		req("CRS_MAXY") = gmr->maxY().toStdString().c_str();
+	}  
+	
+	
+	req("LAYERS") = gmr->layers().toStdString().c_str();
+	
+	req("SERVICE")="WMS";
+
+	const char *layerTitle=static_cast<const char*>(in("LAYER_TITLE"));
+	if(layerTitle) req("TITLE") = layerTitle;
+
+	const char *description=static_cast<const char*>(in("LAYER_DESCRIPTION"));
+	if(description) req("DESCRIPTION") = description;
+
+	const char *title=static_cast<const char*>(in("SERVICE_TITLE"));
+	if(title) req("SERVICE_TITLE") = title;
+
+	//const char *legend=static_cast<const char*>(in("LAYER_LEGEND"));
+	//if(legend) req("LEGEND") = legend;
+
+	if(client->legendImagePath().isEmpty() == false)
+	{
+		req("LEGEND") = client->legendImagePath().toStdString().c_str();
+	}
+
+	if(client->logoImagePath().isEmpty() == false)
+	{
+		req("LOGO") = client->logoImagePath().toStdString().c_str();
+	}
+
+
+	const char *url=static_cast<const char*>(in("SERVER"));
+	if(url) req("URL") = url;
+
+	/*QMap<QString,QString> nonTimeDim;
+	gmr->nonTimeDimValues(nonTimeDim);
+	QStringList nonTimeDimName, nonTimeDimValue;
+	QMapIterator<QString,QString> it(nonTimeDim);
+	while(it.hasNext())
+	{
+		it.next();
+		nonTimeDimName << it.key();
+		nonTimeDimValue << it.value();
+	}*/	
+
+	/*QMap<QString,QString> nonTimeDimUnit;
+	gmr->nonTimeDimUnits(nonTimeDimUnit);
+	QStringList nonTimeDimUnit;
+	QMapIterator<QString,QString> itu(nonTimeDimUnit);
+	while(it.hasNext())
+	{
+		it.next();
+		nonTimeDimUnit << it.value();
+	}*/	
+
+	//req("NON_TIME_DIM_NAME")=nonTimeDimName.join("/").toStdString().c_str();	
+	//req("NON_TIME_DIM_VALUE")=nonTimeDimValue.join("/").toStdString().c_str();
+	//req("NON_TIME_DIM_UNIT")=nonTimeDimUnit.join(":").toStdString().c_str();	
+
+
+	//Build rasterloop if there is at least one frame in the request
+	if(gmr->requestFrameNum() > 0)
+	{
+		MvRequest reqLoop;
+
+		QVector<MvRequest> rFrame(gmr->requestFrameNum());	
+		for(int i=0; i < rFrame.count(); i++)
+		{
+			MvRequest reqFrame=req;
+			QString fnam=gmr->outFile(i);
+			reqFrame("IMPORT_FILE_PATH") = fnam.toStdString().c_str();
+			reqFrame("PATH") = fnam.toStdString().c_str();
+
+			QMap<QString,QString> dim;
+			gmr->dimValuesForFrame(dim,i);
+			QStringList dimName, dimValue;
+			QMapIterator<QString,QString> it(dim);
+			while(it.hasNext())
+			{
+				it.next();
+				dimName << it.key();
+				if(gmr->isTimeDim(it.key()))
+				{
+					dimValue << MvQOgcRequest::timeToString(it.value());
+				}
+				else
+				{
+					dimValue << it.value();
+				}
+			}	
+
+			reqFrame("DIM_NAME")=dimName.join("/").toStdString().c_str();	
+			reqFrame("DIM_VALUE")=dimValue.join("/").toStdString().c_str();;	
+
+			reqLoop = reqLoop + reqFrame;
+		}	
+
+		out.setVerb("PRASTERLOOP");
+		out("RASTERS") = reqLoop;
+	}
+	else
+	{
+		MvRequest reqFrame=req;
+		QString fnam=gmr->outFile(0);
+		reqFrame("IMPORT_FILE_PATH") = fnam.toStdString().c_str();
+		reqFrame("PATH")       = fnam.toStdString().c_str();
+
+		out.setVerb("PRASTERLOOP");
+		out("RASTERS") = reqFrame;	
+	}
+
+	out("IMPORT_X_POSITION") = -180;
+	out("IMPORT_Y_POSITION") = -90;
+	out("IMPORT_WIDTH") = 360;
+	out("IMPORT_HEIGHT") = 180;
+
+
+	//
+	MvRequest current=in.justOneRequest();	
+	while(current != NULL)
+	{
+		string verb = current.getVerb();
+		qDebug() << "verb" << verb.c_str();
+		if(verb == "WMSCLIENT")
+		{
+			current("REQUEST") =  gmr->request().toStdString().c_str();
+			out("WMS_CLIENT_REQUEST")=current;
+			qDebug() << "add to out";
+		}
+		break;
+		current=in.advance().justOneRequest();
+	}
+
+	out.print();
+}
+	
+
+int main( int argc, char **argv)
+{
+	ac = argc;
+  	av = argv;
+
+	// Initialize a Metview application
+	MvApplication app(argc,argv,"wmsclient");
+
+	// Instantiate the application
+	MvWmsClient ogc;
+	ogc.saveToPool(false);
+	app.run();
+}
diff --git a/src/OgcClient/MvMainWcsClient.cc b/src/OgcClient/MvMainWcsClient.cc
new file mode 100644
index 0000000..12bca16
--- /dev/null
+++ b/src/OgcClient/MvMainWcsClient.cc
@@ -0,0 +1,213 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QDateTime>
+#include <QDebug>
+#include <QStringList>
+#include <QVector>
+#include <QXmlFormatter>
+#include <QXmlQuery>
+#include <QXmlResultItems>
+
+#include "MvQWcsClient.h"
+#include "MvQWcsClientEditor.h"
+#include "MvQOgcRequest.h"
+//#include "MvQOgcServiceManager.h"
+#include "Metview.h"
+#include "MvQService.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+class MvWcsClient : public MvQService
+{	
+   public:
+	MvWcsClient() : MvQService("WCSCLIENT") {};
+	void serve(MvRequest&,MvRequest&);
+	void processUiMode(MvRequest&,MvRequest&);
+	void processGetMode(MvRequest&,MvRequest&);
+};
+
+void MvWcsClient::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "---MvWcsClient::serve() IN---" << endl;
+  	in.print();
+
+	// Get user action mode
+	const char* mode = (const char*)in("_ACTION");
+
+	if(strcmp(mode,"edit") == 0)
+	{
+		processUiMode(in,out);
+	}
+	else if(strcmp(mode,"visualise") == 0 || 
+		strcmp(mode,"prepare") ==0 ||
+		strcmp(mode,"execute") ==0 )
+	{		
+		processGetMode(in,out);
+
+	}
+
+	cout << "---MvWcsClient::serve() OUT---" << endl;
+	out.print();
+}
+
+
+void MvWcsClient::processUiMode( MvRequest& in, MvRequest& out)
+{
+
+	// Get icon filename
+	//string filename(getenv("METVIEW_USER_DIRECTORY"));
+	//filename += (const char*)in("_NAME");
+	string filename((const char*)in("_NAME"));
+
+	//Create the qt application
+	QApplication app(ac, av);
+
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(find);
+	Q_INIT_RESOURCE(window);
+
+	// Initialize client
+	MvQWcsUiClient *wcsClient = new MvQWcsUiClient(filename,in);
+	
+	
+	//QString fconf(mvhome);
+	//fconf+="/Metview/Defaults/OgcClient_conf.xml";
+ 	
+	//Create the manager
+	//MvQOgcServiceManager *manager=new MvQOgcServiceManager(fconf);
+
+	//Read the icon file and initialize the dialog
+	MvQWcsClientEditor *editor=new MvQWcsClientEditor(wcsClient);
+	editor->show();
+	
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+   	//Enter the app loop
+ 	app.exec();
+}
+
+void MvWcsClient::processGetMode( MvRequest& in, MvRequest& out)
+{
+	QApplication app(ac, av);
+	
+	MvQWcsGetClient *client = new MvQWcsGetClient(in);
+	client->runGetCov();
+	
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	//Enter the app loop
+ 	app.exec();
+	
+	qDebug() << "App loop exited";
+
+	//If the getMap request failed returns
+	if(client->getCovRunStatus() == false)
+	{
+		setError(13,"GetCoverage request failed!");
+		return;
+	}
+
+	MvQGetCoverageRequest *gcr = client->getCovRequest();
+
+	MvRequest rdata("NETCDF");
+	rdata("PATH") = gcr->outFile().toStdString().c_str();
+	rdata("TEMPORARY") = 1;
+	rdata.print();
+	out = rdata;
+
+
+	//Else build the output request
+
+	/*MvRequest req("PRASTER");
+	req("IMPORT_FILE_TYPE") = "png",
+	req("IMPORT_X_POSITION") = -180;
+	req("IMPORT_Y_POSITION") = -90;
+	req("IMPORT_WIDTH") = 360;
+	req("IMPORT_HEIGHT") = 180;
+	
+	MvQGetMapRequest *gmr = client->getMapRequest();
+
+	req("CRS") = gmr->crs().toStdString().c_str();
+	req("CRS_MINX") = gmr->minX().toStdString().c_str();
+	req("CRS_MINY") = gmr->minY().toStdString().c_str();
+	req("CRS_MAXX") = gmr->maxX().toStdString().c_str();
+	req("CRS_MAXY") = gmr->maxY().toStdString().c_str();
+	req("LAYERS") = gmr->layers().toStdString().c_str();
+	
+	req("SERVICE")="WCS";
+
+	const char *description=static_cast<const char*>(in("LAYER_DESCRIPTION"));
+	if(description) req("DESCRIPTION") = description;
+
+	const char *title=static_cast<const char*>(in("SERVICE_TITLE"));
+	if(title) req("TITLE") = title;
+
+	const char *url=static_cast<const char*>(in("SERVER"));
+	if(url) req("URL") = url;
+
+	//Build rasterloop if there is time dimension in the GetMap request
+	if(gmr->isTimePresent())
+	{
+		MvRequest reqLoop;
+
+		QVector<MvRequest> rStep(gmr->requestStepNum());	
+		for(unsigned int i=0; i < rStep.count(); i++)
+		{
+			MvRequest reqStep=req;
+			QString fnam=gmr->outFile(i);
+			reqStep("IMPORT_FILE_PATH") = fnam.toStdString().c_str();
+			reqStep("PATH") = fnam.toStdString().c_str();
+			reqStep("TIME") = gmr->time(i).toStdString().c_str();
+			reqLoop = reqLoop + reqStep;
+		}	
+
+		out.setVerb("PRASTERLOOP");
+		out("RASTERS") = reqLoop;
+	}
+	else
+	{
+		MvRequest reqStep=req;
+		QString fnam=gmr->outFile(0);
+		reqStep("IMPORT_FILE_PATH") = fnam.toStdString().c_str();
+		reqStep("PATH")       = fnam.toStdString().c_str();
+
+		out.setVerb("PRASTERLOOP");
+		out("RASTERS") = reqStep;	
+	}
+
+	out("IMPORT_X_POSITION") = -180;
+	out("IMPORT_Y_POSITION") = -90;
+	out("IMPORT_WIDTH") = 360;
+	out("IMPORT_HEIGHT") = 180;*/
+
+}
+
+
+int main( int argc, char **argv)
+{
+	ac = argc;
+  	av = argv;
+
+	// Initialize a Metview application
+	MvApplication app(argc,argv,"wcsclient");
+
+	// Instantiate the application
+	MvWcsClient ogc;
+	//ogc.saveToPool(false);
+	app.run();
+}
diff --git a/src/OgcClient/MvQHighlighter.cc b/src/OgcClient/MvQHighlighter.cc
new file mode 100644
index 0000000..19dda43
--- /dev/null
+++ b/src/OgcClient/MvQHighlighter.cc
@@ -0,0 +1,216 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QRegExp>
+#include <QStringList>
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include "MvQHighlighter.h"
+
+using namespace std;
+
+MvQHighlighter::MvQHighlighter(QTextDocument *parent)
+     : QSyntaxHighlighter(parent)
+ {
+	HighlightingRule rule;
+
+  	//Keywords
+     	QTextCharFormat keywordFormat;
+
+	keywordFormat.setForeground(Qt::darkBlue);
+     	keywordFormat.setFontWeight(QFont::Bold);
+ 
+    	QStringList keywordPatterns;
+      	keywordPatterns << "service" << "version" << "request" << "layers" << "srs" << "bbox" << 
+			   "width" << "height" << "format" << "styles" << "transparent" << 
+			   "bgcolor" << "exceptions" << "crs";
+
+	foreach (QString pattern, keywordPatterns)
+	{
+         	//rule.pattern = QRegExp(pattern,Qt::CaseInsensitive);
+    		QString s=pattern + "(?==)";
+		rule.pattern = QRegExp(s,Qt::CaseInsensitive);    		
+		rule.format = keywordFormat;
+         	highlightingRules.append(rule);
+	}
+
+	QTextCharFormat builtInDimFormat;
+
+	builtInDimFormat.setForeground(QColor(224,138,33));
+     	builtInDimFormat.setFontWeight(QFont::Bold);
+ 
+    	QStringList builtInDimPatterns;
+      	builtInDimPatterns << "time" << "elevation";
+
+	foreach (QString pattern, builtInDimPatterns)
+	{
+         	//rule.pattern = QRegExp(pattern,Qt::CaseInsensitive);
+    		QString s=pattern + "(?==)";
+		rule.pattern = QRegExp(s,Qt::CaseInsensitive);    		
+		rule.format = builtInDimFormat;
+         	highlightingRules.append(rule);
+	}
+
+
+	//Dimensions
+     	QTextCharFormat dimFormat;
+
+	dimFormat.setForeground(QColor(224,138,33));
+     	dimFormat.setFontWeight(QFont::Bold);
+ 
+    	rule.pattern = QRegExp("DIM_[^=]+(?==)",Qt::CaseInsensitive);
+  	rule.format = dimFormat;
+        highlightingRules.append(rule);
+
+	//Server (URL)
+     	/*QTextCharFormat serverFormat;
+
+	serverFormat.setForeground(Qt::red);
+     	serverFormat.setFontWeight(QFont::Bold);
+ 
+	rule.pattern = QRegExp("\\*\?\\b");
+        rule.format = serverFormat;
+        highlightingRules.append(rule);*/
+
+
+ }
+
+ void MvQHighlighter::highlightBlock(const QString &text)
+ {
+     foreach (HighlightingRule rule, highlightingRules) 
+	{
+         QRegExp expression(rule.pattern);
+         int index = text.indexOf(expression);
+         while (index >= 0) 
+	{
+             int length = expression.matchedLength();
+             setFormat(index, length, rule.format);
+             index = text.indexOf(expression, index + length);
+         }
+     }
+     setCurrentBlockState(0);
+
+    /* int startIndex = 0;
+     if (previousBlockState() != 1)
+         startIndex = text.indexOf(commentStartExpression);
+
+     while (startIndex >= 0) 
+	{
+         int endIndex = text.indexOf(commentEndExpression, startIndex);
+         int commentLength;
+         if (endIndex == -1) 
+	{
+             setCurrentBlockState(1);
+             commentLength = text.length() - startIndex;
+         } 
+	else 
+	{
+             commentLength = endIndex - startIndex
+                             + commentEndExpression.matchedLength();
+         }
+         setFormat(startIndex, commentLength, multiLineCommentFormat);
+         startIndex = text.indexOf(commentStartExpression,
+                                                 startIndex + commentLength);
+     }*/
+ }
+
+
+MvQWmsGetCapHighlighter::MvQWmsGetCapHighlighter(QTextDocument *parent)
+     : QSyntaxHighlighter(parent)
+ {
+   HighlightingRule rule;
+
+
+    // Note that the order in which these highlighting rules are given
+    // DOES matter! The rules seem to be applied in the order in which
+    // they are given.
+
+    // tag names
+    tagNameFormat.setForeground(Qt::darkBlue);
+    rule.pattern = QRegExp("(<\\w*)|(</\\w*>)|(>)");
+    rule.format = tagNameFormat;
+    highlightingRules.append(rule);
+
+
+    // tag symbols
+    rule.pattern = QRegExp("(<)|(</)|(>)");
+    rule.format = tagSymbolsFormat;
+    highlightingRules.append(rule);
+
+
+    // attribute names
+    attributeNameFormat.setForeground(Qt::red);
+    rule.pattern = QRegExp("(\\w+\\s*)(?==)");  // (?==) means 'true if '=', but don't match it'
+    rule.format = attributeNameFormat;
+    highlightingRules.append(rule);
+
+
+    // strings
+    quotationFormat.setForeground(Qt::darkRed);
+    rule.pattern = QRegExp("(\"[^\"]*\")|(\'[^\']*\')");
+    rule.format = quotationFormat;
+    highlightingRules.append(rule);
+
+
+    // multi-line comments
+    commentStartExpression = QRegExp("<!--");
+    commentEndExpression = QRegExp("-->");
+    multiLineCommentFormat.setFontItalic(true);
+    multiLineCommentFormat.setForeground(Qt::darkGreen);
+
+ }
+
+void MvQWmsGetCapHighlighter::highlightBlock(const QString &text)
+{
+    foreach (HighlightingRule rule, highlightingRules) 
+    {
+        QRegExp expression(rule.pattern);
+        int index = text.indexOf(expression);
+        while (index >= 0) 
+        {
+            int length = expression.matchedLength();
+            setFormat(index, length, rule.format);
+            index = text.indexOf(expression, index + length);
+        }
+    }
+
+
+    // multi-line comments
+
+    setCurrentBlockState(0);
+
+    int startIndex = 0;
+    if (previousBlockState() != 1)
+        startIndex = text.indexOf(commentStartExpression);
+
+    while (startIndex >= 0) 
+    {
+        int endIndex = text.indexOf(commentEndExpression, startIndex);
+        int commentLength;
+        if (endIndex == -1) 
+        {
+            setCurrentBlockState(1);
+            commentLength = text.length() - startIndex;
+        } 
+        else 
+        {
+            commentLength = endIndex - startIndex
+                            + commentEndExpression.matchedLength();
+        }
+        setFormat(startIndex, commentLength, multiLineCommentFormat);
+        startIndex = text.indexOf(commentStartExpression,
+                                  startIndex + commentLength);
+    }
+
+
+}
+
+ 
diff --git a/src/OgcClient/MvQHighlighter.h b/src/OgcClient/MvQHighlighter.h
new file mode 100644
index 0000000..930234a
--- /dev/null
+++ b/src/OgcClient/MvQHighlighter.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQHighlighter_H
+#define MvQHighlighter_H
+
+#include <QSyntaxHighlighter>
+
+#include <QHash>
+#include <QTextCharFormat>
+
+class QTextDocument;
+
+class MvQHighlighter : public QSyntaxHighlighter
+ {
+ public:
+    MvQHighlighter(QTextDocument *parent = 0);
+
+ protected:
+     void highlightBlock(const QString &text);
+
+ private:
+     struct HighlightingRule
+     {
+         QRegExp pattern;
+         QTextCharFormat format;
+     };
+
+     QVector<HighlightingRule> highlightingRules;
+ };
+
+
+class MvQWmsGetCapHighlighter : public QSyntaxHighlighter
+{
+public:
+     MvQWmsGetCapHighlighter(QTextDocument *parent = 0);
+    ~MvQWmsGetCapHighlighter(){}
+
+     void highlightBlock(const QString &text);
+
+protected:
+
+     QRegExp commentStartExpression;
+     QRegExp commentEndExpression;
+
+     QTextCharFormat tagNameFormat;
+     QTextCharFormat attributeNameFormat;
+     QTextCharFormat tagSymbolsFormat;
+     QTextCharFormat quotationFormat;
+     QTextCharFormat multiLineCommentFormat;
+
+     struct HighlightingRule
+     {
+         QRegExp pattern;
+         QTextCharFormat format;
+     };
+     QVector<HighlightingRule> highlightingRules;
+};
+
+#endif
diff --git a/src/OgcClient/MvQOgcClient.qrc b/src/OgcClient/MvQOgcClient.qrc
new file mode 100644
index 0000000..7b6b421
--- /dev/null
+++ b/src/OgcClient/MvQOgcClient.qrc
@@ -0,0 +1,8 @@
+<RCC>
+  <qresource prefix="OgcClient" >
+    <file alias="reload.svg">../images/reload.svg</file>
+    <file alias="remove.svg">../images/remove.svg</file>
+    <file alias="clear_left.svg">../images/clear_left.svg</file>
+    <file alias="preview.css">preview.css</file>
+  </qresource>
+</RCC>
diff --git a/src/OgcClient/MvQOgcParam.cc b/src/OgcClient/MvQOgcParam.cc
new file mode 100644
index 0000000..a8b7ae0
--- /dev/null
+++ b/src/OgcClient/MvQOgcParam.cc
@@ -0,0 +1,595 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQOgcParam.h"
+
+MvQHtmlDecoder MvQOgcName::htmlDecoder_;
+
+
+QString MvQHtmlDecoder::decode(QString &htmlTxt)
+{
+	clear();
+	setHtml(htmlTxt);	
+	return toPlainText();
+}
+
+//--------------------------------
+// MvQOgcValue
+//--------------------------------
+
+void MvQOgcIntValue::setValue(int value)
+{
+	value_=value;
+	checkValue();
+}
+
+void MvQOgcIntValue::setMinValue(int min)
+{
+	minValue_=min;
+	checkValue();
+}
+
+void MvQOgcIntValue::setMaxValue(int max)
+{
+	maxValue_=max;
+	checkValue();
+}
+
+void MvQOgcIntValue::checkValue()
+{
+	if(minIsSet_ && value_ < minValue_)
+	{
+		value_=minValue_;
+	}
+	if(maxIsSet_ && value_ > maxValue_)
+	{
+		value_=maxValue_;
+	}		
+}
+
+//--------------------------------
+// MvQOgcList
+//--------------------------------
+
+QString MvQOgcList::currentValue()
+{
+  	if(currentIndex_ != -1)
+	{
+		return values_[currentIndex_];
+	}
+	return QString();
+}
+
+QString MvQOgcList::currentDisplayValue()
+{
+  	if(currentIndex_ != -1)
+	{
+		return displayValues_[currentIndex_];
+	}
+	return QString();
+}
+
+QString MvQOgcList::currentDescription()
+{
+  	if(currentIndex_ != -1)
+	{
+		return descriptions_[currentIndex_];
+	}
+	return QString();
+}
+
+
+void  MvQOgcList::setCurrentValue(QString s) 
+{
+	int index=values_.indexOf(s); 
+	if(index >= 0)
+		currentIndex_=index;
+}
+
+void  MvQOgcList::setCurrentDisplayValue(QString s) 
+{
+	int index=displayValues_.indexOf(s); 
+	if(index >= 0)
+		currentIndex_=index;
+}
+
+void MvQOgcList::setCurrentIndex(int index)
+{
+	if(index >= 0 &&index < values_.count())
+	currentIndex_=index;
+}
+
+QString MvQOgcStyleList::currentLegend()
+{
+  	if(currentIndex_ != -1)
+	{
+		return legends_[currentIndex_];
+	}
+	return QString();
+}
+
+void MvQOgcStyleList::setLegends(QStringList lst)
+{
+	legends_.clear();
+	foreach(QString s, lst)
+	{
+		legends_ << htmlDecoder_.decode(s);
+	}
+}
+
+//--------------------------------
+// MvQOgcCrsList
+//--------------------------------
+
+void MvQOgcCrsList::init()
+{
+	//desc_["EPSG:4326"]  = "Cylindrical/WGS 84";
+	//desc_["EPSG:32661"] = "Polar Stereo North";
+	//desc_["EPSG:32761"] = "Polar Stereo South";
+}
+
+void MvQOgcCrsList::setValues(QStringList values)
+{
+	MvQOgcList::setValues(values);
+
+	foreach(QString val,values_)	
+	{
+		QString dpyName=val;
+		if( desc_.contains(val))
+		{
+		 	dpyName="(" + desc_[val] +") " +dpyName;		
+		}
+		addDisplayValue(dpyName);
+	}
+}
+
+//--------------------------------
+// MvQOgcGeoBoundingBox 
+//--------------------------------
+
+MvQOgcGeoBoundingBox::MvQOgcGeoBoundingBox(QMap<QString,QString> att)
+{
+	if(att.contains("minx"))
+	{
+		minX_=att["minx"];
+		maxX_=att["maxx"];
+		minY_=att["miny"];
+		maxY_=att["maxy"];
+	}
+	else if(att.contains("westBoundLongitude"))
+	{
+			minX_=att["westBoundLongitude"];
+			maxX_=att["eastBoundLongitude"];
+			minY_=att["southBoundLatitude"];
+			maxY_=att["northBoundLatitude"];
+	}
+}
+
+//--------------------------------
+// MvQOgcBoundingBox 
+//--------------------------------
+
+MvQOgcBoundingBox::MvQOgcBoundingBox(MvQOgcGeoBoundingBox* geo)
+{
+	crs_="EPSG:4326";
+	minX_=geo->minX();
+	maxX_=geo->maxX();
+	minY_=geo->minY();
+	maxY_=geo->maxY();
+}	
+
+
+MvQOgcBoundingBox::MvQOgcBoundingBox(QMap<QString,QString> att)
+{
+	if(att.contains("CRS"))
+		crs_=att["CRS"];
+	else if(att.contains("SRS"))
+		crs_=att["SRS"];
+
+	minX_=att["minx"];
+	maxX_=att["maxx"];
+	minY_=att["miny"];
+	maxY_=att["maxy"];
+	resX_=att["resx"];
+	resY_=att["resy"];
+
+
+}
+
+//--------------------------------
+// MvQOgcDimensionListList
+//--------------------------------
+
+MvQOgcDimension::MvQOgcDimension(QMap<QString,QString> att, QString value)
+{
+	qDebug() << "dimName:" << att["name"];
+	//valueMode_=ListMode;
+	setAttributes(att);
+	setValues(value);
+}
+
+void MvQOgcDimension::setAttributes(QMap<QString,QString> att)
+{
+	qDebug() << "att" << att;
+
+	if(att.contains("name"))
+		name_=att["name"];
+	if(att.contains("units"))
+		units_=att["units"];
+	if(att.contains("unitSymbol"))
+		unitSymbol_=att["unitSymbol"];
+	if(att.contains("default"))
+		default_=htmlDecoder_.decode(att["default"]);
+		//default_=att["default"];
+	if(att.contains("multipleValues"))
+		multipleValues_=att["multipleValues"];
+	if(att.contains("nearesValues"))
+		nearestValue_=att["nearestValue"];
+	if(att.contains("current"))
+		current_=att["current"];	
+}
+
+void MvQOgcDimension::setValues(QString dimData)
+{
+	dimData=htmlDecoder_.decode(dimData);
+
+//Time
+	values_.clear();
+	qDebug() << "Dim values:" << default_ << values_;
+
+	if(default_.isEmpty() == false)
+	{
+		QString s="Default (" + default_ + ")";
+		values_ << s;
+	}
+
+	values_ << dimData.split(",");
+
+
+/*	if(units_ == "ISO8601")
+	{
+		if(name_.compare("time",Qt::CaseInsensitive) == 0)
+		{
+			valueSelectionMode_=MultipleSelectionMode;
+		}	
+
+		qDebug() << "Time:" << dimData;
+		QStringList data=dimData.split(",");
+		foreach(QString item, data)
+		{	
+			QStringList lst=item.split("/");
+		
+			qDebug() << "Time:" << lst;
+
+			//Period
+			if(lst.count() == 3)
+			{
+				QDateTime startDate=QDateTime::fromString(lst[0],Qt::ISODate);
+				QDateTime endDate=QDateTime::fromString(lst[1],Qt::ISODate);
+				QMap<QString,int> period;
+				decodePeriod(lst[2],period);
+			
+				QDateTime dt=startDate;			
+				while(dt <= endDate)
+				{				
+					QString s=dt.toString(Qt::ISODate);
+					s+="Z";
+					values_.push_back(s);
+					addPeriod(dt,period);
+					if(dt <= startDate) 
+						break;	
+				}
+			
+				qDebug() << "time: " << startDate << endDate << period;
+				qDebug() << "value_" << values_;
+
+			}
+			else
+			{
+				values_.push_back(item);
+			}
+		}
+	}
+	else
+	{
+		QStringList data=dimData.split(",");
+		foreach(QString item, data)
+		{	
+			QStringList lst=item.split("/");
+
+			//Period
+			if(lst.count() == 3)
+			{
+				float minVal=lst[0].toFloat();
+				float maxVal=lst[1].toFloat();
+				float stepVal=lst[2].toFloat();	
+			
+				if( (maxVal-minVal)/stepVal > 20)
+				{
+					valueMode_=StepMode;
+					minValue_=minVal;
+					maxValue_=maxVal;
+					stepValue_=stepVal;
+				}
+				else
+				{
+					float v=minVal;			
+					while(v <= maxVal)
+					{				
+						QString s=QString::number(v);
+						values_.push_back(s);
+						v+=stepVal;
+						if(v <= minVal) 
+							break;	
+					}	
+				}
+
+			}
+			else
+			{
+				values_.push_back(item);
+			}
+			
+		}				
+	}	*/
+
+
+	//displayValues_=values_;
+}
+
+
+void MvQOgcDimension::decodePeriod(const QString& period,QMap<QString,int> &res)
+{
+	QString pDate, pTime;
+
+	//Test
+	if(period.startsWith("P") == false)
+		return;
+
+	QStringList lst=period.split("T");	
+	pDate=lst[0];
+	if(lst.count() >1)
+	{
+		pTime=lst[1];
+	}
+
+	qDebug() << period << pDate << pTime; 
+
+	if(pDate.isEmpty() == false)
+	{
+		//Year
+		QRegExp rx("(\\d+Y)");
+		if(rx.indexIn(pDate) > -1)
+		{
+			res["year"]=rx.cap(1).remove("Y").toInt();
+			qDebug() << "year: " << res["year"];
+		}
+	
+		//Month
+		rx=QRegExp("(\\d+M)");
+		if(rx.indexIn(pDate) > -1)
+		{
+			res["month"]=rx.cap(1).remove("M").toInt();
+			qDebug() << "Month: " << res["month"];
+		}
+	
+		//Day
+		rx=QRegExp("(\\d+D)");
+		if(rx.indexIn(pDate) > -1)
+		{
+			res["day"]=rx.cap(1).remove("D").toInt();
+			qDebug() << "Day: " << res["day"];
+		}
+	}
+
+	if(pTime.isEmpty() == false)
+	{
+		//Hour
+		QRegExp rx("(\\d+H)");
+		if(rx.indexIn(pTime) > -1)
+		{
+			res["hour"]=rx.cap(1).remove("H").toInt();
+			qDebug() << "hour: " << res["hour"];
+		}
+	
+		//Minute
+		rx=QRegExp("(\\d+M)");
+		if(rx.indexIn(pTime) > -1)
+		{
+			res["minute"]=rx.cap(1).remove("M").toInt();
+			qDebug() << "Month: " << res["minute"];
+		}
+	
+		//Minute
+		rx=QRegExp("(\\d+S)");
+		if(rx.indexIn(pTime) > -1)
+		{
+			res["sec"]=rx.cap(1).remove("S").toInt();
+			qDebug() << "Second: " << res["sec"];
+		}
+	}
+	
+}
+
+
+void MvQOgcDimension::addPeriod(QDateTime &dt,const QMap<QString,int> &period)
+{
+	if(period.contains("year"))
+	{
+		dt=dt.addYears(period["year"]);
+		//qDebug() << d;
+	}
+
+	if(period.contains("month"))
+	{
+		dt=dt.addMonths(period["month"]);
+		//qDebug() << d;
+	}
+
+	if(period.contains("day"))
+	{
+		dt=dt.addDays(period["day"]);
+		//qDebug() << d;
+	}
+
+	if(period.contains("hour"))
+	{
+		dt=dt.addSecs(period["hour"]*3600);
+		//qDebug() << d;
+	}
+	if(period.contains("minute"))
+	{
+		dt=dt.addSecs(period["minute"]*60);
+		//qDebug() << d;
+	}
+	if(period.contains("sec"))
+	{
+		dt=dt.addSecs(period["sec"]);
+		//qDebug() << d;
+	}
+
+}
+
+bool MvQOgcDimension::isTime()
+{
+	if(units_ == "ISO8601")
+		return true;
+	else
+		return false;
+}
+
+bool MvQOgcNode::findByNode(MvQOgcNode* node,MvQOgcNode **resNode)
+{
+	if(node == this)
+	{
+		*resNode=this;
+		return true;
+	}
+
+	foreach(MvQOgcNode *n,children_)
+	{
+		if(n->findByNode(node,resNode))
+		{
+			return true;
+		}
+	}
+
+	return false;
+}
+
+bool MvQOgcNode::findByValue(QString val,MvQOgcNode **resNode)
+{
+	if(value_ == val)
+	{
+		*resNode=this;
+		return true;
+	}
+
+	foreach(MvQOgcNode *n,children_)
+	{
+		if(n->findByValue(val,resNode))
+		{
+			return true;
+		}
+	}
+
+	return false;
+}
+
+bool MvQOgcNode::findByDisplayValue(QString val,MvQOgcNode **resNode)
+{
+	if(displayValue_ == val)
+	{
+		*resNode=this;
+		return true;
+	}
+
+	foreach(MvQOgcNode *n,children_)
+	{
+		if(n->findByDisplayValue(val,resNode))
+		{
+			return true;
+		}
+	}
+
+	return false;
+}
+
+QString MvQOgcNode::attribute(QString id)
+{
+	if(attr_.contains(id))
+		return attr_[id];
+	else
+		return QString();
+}
+void MvQOgcNode::addAttribute(QString id,QString val)
+{
+	attr_[id]=val;
+}
+
+
+void MvQOgcTree::setCurrentNode(MvQOgcNode* node)
+{
+	currentNode_=0;
+	root_->findByNode(node,&currentNode_);
+}
+
+void MvQOgcTree::setCurrentValue(QString val)
+{
+	currentNode_=0;
+	root_->findByValue(val,&currentNode_);	
+}
+
+void MvQOgcTree::setCurrentDisplayValue(QString val)
+{
+	currentNode_=0;
+	root_->findByDisplayValue(val,&currentNode_);	
+}
+
+
+MvQOgcElem::~MvQOgcElem()
+{
+	QMapIterator<QString,MvQOgcElem*> it(elem_);
+	while(it.hasNext())
+	{
+		it.next();
+		delete it.value();
+	}
+	elem_.clear();
+}
+
+QString MvQOgcElem::attribute(QString id)
+{
+	if(attr_.contains(id))
+		return attr_[id];
+	else
+		return QString();
+}
+
+MvQOgcElem* MvQOgcElem::elem(QString id)
+{
+	if(elem_.contains(id))
+		return elem_[id];
+	else
+		return 0;
+}
+
+void MvQOgcElem::addAttribute(QString id,QString val)
+{
+	attr_[id]=val;
+}
+
+void MvQOgcElem::addElem(QString id,MvQOgcElem *val)
+{
+	elem_[id]=val;
+}
+
+
diff --git a/src/OgcClient/MvQOgcParam.h b/src/OgcClient/MvQOgcParam.h
new file mode 100644
index 0000000..9fca707
--- /dev/null
+++ b/src/OgcClient/MvQOgcParam.h
@@ -0,0 +1,333 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOgcParam_H
+#define MvQOgcParam_H
+
+#include <QDateTime>
+#include <QMap>
+#include <QStringList>
+#include <QTextDocument>
+
+class MvQHtmlDecoder : public QTextDocument
+{
+public:
+	MvQHtmlDecoder() {};
+	QString decode(QString&);
+};
+
+
+class MvQOgcName
+{
+public:
+	MvQOgcName() {};
+	MvQOgcName(QString requestName, QString displayName) : 
+		requestName_(requestName), displayName_(displayName) {};
+
+	QString  requestName() {return requestName_;}
+	void setRequestName(QString s) {requestName_=s;}
+
+	QString  displayName() {return displayName_;}
+	void setDisplayName(QString s) {displayName_=s;}
+
+protected:
+	QString     requestName_;
+	QString     displayName_;
+	static MvQHtmlDecoder htmlDecoder_;
+};
+
+class MvQOgcColourValue : public MvQOgcName
+{
+public:
+	MvQOgcColourValue() {};
+	MvQOgcColourValue(QString value, QString requestName, QString displayName) : 
+		MvQOgcName(requestName,displayName), value_(value) {}
+
+	int value();
+	void setValue(QString);
+	
+protected:
+	QString value_;
+};
+
+class MvQOgcIntValue : public MvQOgcName
+{
+public:
+	MvQOgcIntValue() : minIsSet_(false), maxIsSet_(false) {};
+	MvQOgcIntValue(int value, QString requestName, QString displayName) : 
+		MvQOgcName(requestName,displayName), value_(value),
+	        minIsSet_(false), maxIsSet_(false){}
+
+	int value() {return value_;};
+	void setValue(int);
+	void setMinValue(int);
+	void setMaxValue(int);
+	
+protected:
+	void checkValue();
+
+	int   value_;
+	bool  minIsSet_;
+	bool  maxIsSet_;
+	int   maxValue_;
+	int   minValue_;
+};
+
+
+class MvQOgcList :  public MvQOgcName
+{
+public:
+	//MvQOgcList() : {};
+	MvQOgcList(QString requestName, QString displayName) :
+		    MvQOgcName(requestName,displayName), currentIndex_(-1) {};
+	~MvQOgcList() {clear();}
+
+	virtual void clear() {values_.clear(); displayValues_.clear(); descriptions_.clear(); 
+		     currentIndex_=-1;}
+
+	QStringList values() {return values_;}
+	QStringList displayValues() {return displayValues_;}	
+	QStringList descriptions() {return descriptions_;}
+	QString currentValue();
+	QString currentDisplayValue();
+	QString currentDescription();
+
+	virtual void setValues(QStringList lst) {values_=lst;}
+	void  setDisplayValues(QStringList lst) {displayValues_=lst;}
+	void  setDescriptions(QStringList lst) {descriptions_=lst;}
+	void  setCurrentIndex(int);
+	int currentIndex() {return currentIndex_;}
+	void setCurrentValue(QString);
+	void setCurrentDisplayValue(QString);
+
+
+	void  addValue(QString s) {values_.push_back(s);}
+	void  addDisplayValue(QString s) {displayValues_.push_back(s);}
+
+protected:
+	QStringList values_;
+	QStringList displayValues_;
+	QStringList descriptions_;
+	int currentIndex_;
+};
+
+class MvQOgcStyleList :  public MvQOgcList
+{
+public:
+	//MvQOgcList() : {};
+	MvQOgcStyleList(QString requestName, QString displayName) :
+		    MvQOgcList(requestName,displayName){};
+	~MvQOgcStyleList() {clear();}
+
+	void clear() {legends_.clear(); MvQOgcList::clear();}	
+	void  setLegends(QStringList);
+	QStringList legends() {return legends_;}
+	QString currentLegend();	
+
+protected:
+	QStringList legends_;
+};
+
+class MvQOgcCrsList :  public MvQOgcList
+{
+public:
+	MvQOgcCrsList(QString requestName, QString displayName) : 
+		 MvQOgcList(requestName,displayName) { init();}
+
+	void  setValues(QStringList);
+
+protected:
+	void init();
+
+	QStringList allowedCrs_;	
+	QMap<QString,QString> desc_;
+};
+
+
+
+
+class MvQOgcGeoBoundingBox : public MvQOgcName
+{
+public:
+	MvQOgcGeoBoundingBox() {};
+	MvQOgcGeoBoundingBox(QString requestName, QString displayName) : 
+		 MvQOgcName(requestName,displayName) {};
+	MvQOgcGeoBoundingBox(QMap<QString,QString> att);
+	
+	QString minX() {return minX_;}
+	QString maxX() {return maxX_;}
+	QString minY() {return minY_;}
+	QString maxY() {return maxY_;}
+	
+protected:
+	QString minX_;
+	QString maxX_;
+	QString minY_;
+	QString maxY_;
+};
+
+class MvQOgcBoundingBox : public MvQOgcName
+{
+public:
+	MvQOgcBoundingBox() {};
+	MvQOgcBoundingBox(QString requestName, QString displayName) : 
+		 MvQOgcName(requestName,displayName) {};
+	MvQOgcBoundingBox(QMap<QString,QString> att);
+	MvQOgcBoundingBox(MvQOgcGeoBoundingBox*);
+	
+	QString crs() {return crs_;}
+	QString minX() {return minX_;}
+	QString maxX() {return maxX_;}
+	QString minY() {return minY_;}
+	QString maxY() {return maxY_;}
+	QString resX() {return resX_;}
+	QString resY() {return resY_;}
+	void setArea(QString minX, QString maxX, QString minY, QString maxY)
+	     {minX_=minX; maxX_=maxX; minY_=minY; maxY_=maxY;}	
+	
+	void clear() {crs_.clear(); minX_.clear(); maxX_.clear(); minY_.clear(); maxY_.clear(); 
+		resX_.clear(); resY_.clear();}	
+	
+protected:
+	QString crs_;
+	QString minX_;
+	QString maxX_;
+	QString minY_;
+	QString maxY_;
+	QString resX_;
+	QString resY_;
+};
+
+class MvQOgcDimension : public MvQOgcName
+{
+public:
+	MvQOgcDimension(QMap<QString,QString>,QString);
+	void setValues(QString);
+	void setAttributes(QMap<QString,QString>);
+	QString name() {return name_;}
+	QString units() {return units_;}
+	QString unitSymbol() {return unitSymbol_;}
+	QString defaultValue() {return default_;}	
+
+	QStringList values() {return values_;}
+	QString currentValues() {return currentValues_;}
+	void setCurrentValues(QString txt) {currentValues_=txt;}
+	
+
+	bool isTime();
+
+protected:
+	void decodePeriod(const QString&,QMap<QString,int> &res);
+	void addPeriod(QDateTime &,const QMap<QString,int> &);
+
+	QString name_;
+	QString units_;
+	QString unitSymbol_;
+	QString default_;
+	QString multipleValues_;
+	QString nearestValue_;
+	QString current_;
+
+	QStringList values_;
+	QString currentValues_;
+
+};
+
+class MvQOgcNode :  public MvQOgcName
+{
+public:
+	MvQOgcNode() {parent_=0;}
+	~MvQOgcNode() {clear();}
+
+	void clear() 
+	{
+		foreach(MvQOgcNode* n,children())
+			delete n;
+		children_.clear();
+	}
+
+	QString value() {return value_;}
+	QString displayValue() {return displayValue_;}	
+	QString description() {return description_;}
+	QString logo() {return logo_;}
+
+	void setValue(QString v) {value_=v;}
+	void setDisplayValue(QString d) {displayValue_=d;}
+	void setDescription(QString d) {description_=d;}
+        void setLogo(QString d) {logo_=d;}
+
+	void addChild(MvQOgcNode* node) {children_ << node; node->setParent(this);}
+	QList<MvQOgcNode*> children() {return children_;}
+	bool findByNode(MvQOgcNode*,MvQOgcNode **);
+	bool findByValue(QString,MvQOgcNode **);
+	bool findByDisplayValue(QString,MvQOgcNode **);
+
+	MvQOgcNode* parent() {return parent_;}
+
+	QString     attribute(QString);
+	void addAttribute(QString,QString);
+
+protected:
+	void setParent(MvQOgcNode* parent) {parent_=parent;}
+
+	QString value_;
+	QString displayValue_;
+	QString description_;
+	QString logo_;
+	QMap<QString,QString> 	   attr_;
+
+	MvQOgcNode* parent_;
+	QList<MvQOgcNode*> children_;
+};
+
+class MvQOgcTree :  public MvQOgcName
+{
+public:
+	MvQOgcTree(QString requestName, QString displayName):
+		    MvQOgcName(requestName,displayName) {root_=new MvQOgcNode;currentNode_=0;}	
+	~MvQOgcTree() {clear();}
+	
+	MvQOgcNode* currentNode() {return currentNode_;}
+	void setCurrentNode(MvQOgcNode*);
+	QString currentValue() {return (currentNode_)?currentNode_->value():QString();}
+	QString currentDisplayValue() {return (currentNode_)?currentNode_->displayValue():QString();}
+	QString currentDescription() {return (currentNode_)?currentNode_->description():QString();}
+
+	void setCurrentValue(QString);
+	void setCurrentDisplayValue(QString);
+
+	MvQOgcNode* root() {return root_;}
+	void clear() {root_->clear();currentNode_=0;}
+
+protected:
+	MvQOgcNode* root_;
+	MvQOgcNode* currentNode_;
+};
+
+
+class MvQOgcElem 
+{
+public:
+	MvQOgcElem() {};
+	virtual ~MvQOgcElem();
+
+	QString     attribute(QString);
+	MvQOgcElem* elem(QString);
+	
+	void addAttribute(QString,QString);	
+	void addElem(QString,MvQOgcElem*);	
+
+protected:
+	QMap<QString,QString> 	   attr_;
+	QMap<QString,MvQOgcElem*>  elem_;
+};
+
+
+
+#endif
diff --git a/src/OgcClient/MvQOgcRequest.cc b/src/OgcClient/MvQOgcRequest.cc
new file mode 100644
index 0000000..a07bc98
--- /dev/null
+++ b/src/OgcClient/MvQOgcRequest.cc
@@ -0,0 +1,1109 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQOgcRequest.h"
+
+#include <QDebug>
+#include <QPair>
+
+int MvQGetMapRequest::maxFrame_=128;
+
+/*
+ Warning!!!
+ 
+ QDateTime::fromString(QString,Qt::ISODate)
+ 
+ is not able to handle fractional dates like 1991-01 or
+ 1991-01-01T02:02. So we need to figure aou the actual date
+ format and that has to be used in the second argument of
+ this function evereywhere in the code!!
+*/
+
+
+QString MvQOgcRequest::item(QString id) const
+{	
+	QString sid=getStoredId(id);
+	if(!sid.isEmpty())
+	{
+		return requestMap_[sid];
+	}
+	else
+	{
+		return QString();
+	}
+}
+
+void MvQOgcRequest::setItem(QString id,QString value)
+{	
+	QString sid=getStoredId(id);
+	if(!sid.isEmpty())
+	{
+		QString sFrom=sid+"="+requestMap_[sid];
+		QString sTo=sid+"="+value;
+		request_.replace(sFrom,sTo);
+		parse();
+	}
+}
+
+void MvQOgcRequest::removeItem(QString id)
+{
+	QString sid=getStoredId(id);
+	if(!sid.isEmpty())
+	{
+		QString s=sid+"="+requestMap_[sid];
+		if(!request_.endsWith(s))
+		{
+			s+="&";
+		}
+		request_.remove(s);
+
+		if(request_.endsWith("&"))	
+			request_.chop(1);
+	
+		parse();
+	}
+}
+
+
+QString MvQOgcRequest::getStoredId(QString id) const
+{
+	QStringList keys=requestMap_.keys();
+
+	if(keys.contains(id))
+	{
+		return id;
+	}
+	else if(keys.contains(id,Qt::CaseInsensitive))
+	{
+		foreach(QString s,keys)
+		{
+			if(s != id && id.compare(s,Qt::CaseInsensitive)==0)
+			{
+				return s;
+			}
+	}	}
+
+	return QString();
+}
+
+		
+void MvQOgcRequest::clear()
+{
+	request_.clear();
+	requestMap_.clear();
+}
+
+void MvQOgcRequest::setRequest(QString r)
+{
+	clear();
+	request_=r;
+	parse();
+}
+
+void MvQOgcRequest::parse()
+{
+	requestMap_.clear();
+
+	if(request_.isEmpty())
+		return;
+
+	QStringList lstBasic=request_.split("?");
+	if(lstBasic.count() < 2)
+	{
+		return;
+	}
+
+	QStringList lst=lstBasic[1].split("&");
+	foreach(QString str, lst)
+	{
+		QStringList par=str.split("=");
+		if(par.count() >= 2)
+		{
+			requestMap_[par[0]] = str.section("=",1);
+		}
+	}			
+}
+
+QString MvQOgcRequest::guessUrl() const
+{
+	QStringList lst=request_.split("?");
+	if(lst.count() > 0)
+		return lst[0];
+	else
+		return QString();
+}
+
+QString MvQOgcRequest::timeToString(QString t)
+{
+	if(t.startsWith("P"))
+	{
+		int s=periodToSeconds(t);
+		//There are minutes or seconds
+		if(s % 3600 != 0 )
+		{
+			t.remove(0,1);
+			return t;
+		}
+		else
+		{
+			return QString::number(s/3600);
+		}	
+	}
+	else
+	{
+		//QDateTime d=QDateTime::fromString(correctDateTime(t),Qt::ISODate);
+		QDateTime d=QDateTime::fromString(t,timeFormat(t));
+		//qDebug() << "timetostring" << t << d << timeFormat(t);
+
+		return d.toString("yyyyMMddhhmmss");
+	}
+}
+
+//We need this to overcome a Qt bug. If the seconds are missing 
+//from an ISO 8601 time string qt QDateTime incorrectly interpret the time part of
+//the string. So in this case the we add the seconds to the string!
+
+QString MvQOgcRequest::correctDateTime(QString d)
+{
+	QString res=d;
+
+	bool tzone=d.endsWith("Z");
+	d.remove("Z");
+
+	QStringList lst=d.split("T");
+
+	//qDebug() << "corr" << lst;
+
+	if(lst.count() ==2)
+	{	
+		QStringList t=lst[1].split(":");
+		qDebug() << "corr" << t;
+
+		if(t.count() == 2)
+		{
+			res=lst[0] + "T" + t[0] + ":" + t[1] + ":00";
+			//qDebug() << "corr" << res;
+
+			if(tzone)
+			{
+			 	res+="Z";
+			}
+		}
+	}
+	//qDebug() << "corr" << res;
+	return res;
+}
+	
+void MvQOgcRequest::decodePeriod(const QString& period,QMap<QString,int> &res)
+{
+	QString pDate, pTime;
+
+	//Test
+	if(period.startsWith("P") == false)
+		return;
+
+	QStringList lst=period.split("T");	
+	pDate=lst[0];
+	if(lst.count() >1)
+	{
+		pTime=lst[1];
+	}
+
+	//qDebug() << period << pDate << pTime; 
+
+	if(pDate.isEmpty() == false)
+	{
+		//Year
+		QRegExp rx("(\\d+Y)");
+		if(rx.indexIn(pDate) > -1)
+		{
+			res["year"]=rx.cap(1).remove("Y").toInt();
+			//qDebug() << "year: " << res["year"];
+		}
+	
+		//Month
+		rx=QRegExp("(\\d+M)");
+		if(rx.indexIn(pDate) > -1)
+		{
+			res["month"]=rx.cap(1).remove("M").toInt();
+			//qDebug() << "Month: " << res["month"];
+		}
+	
+		//Day
+		rx=QRegExp("(\\d+D)");
+		if(rx.indexIn(pDate) > -1)
+		{
+			res["day"]=rx.cap(1).remove("D").toInt();
+			//qDebug() << "Day: " << res["day"];
+		}
+	}
+
+	if(pTime.isEmpty() == false)
+	{
+		//Hour
+		QRegExp rx("(\\d+H)");
+		if(rx.indexIn(pTime) > -1)
+		{
+			res["hour"]=rx.cap(1).remove("H").toInt();
+			//qDebug() << "hour: " << res["hour"];
+		}
+	
+		//Minute
+		rx=QRegExp("(\\d+M)");
+		if(rx.indexIn(pTime) > -1)
+		{
+			res["minute"]=rx.cap(1).remove("M").toInt();
+			//qDebug() << "Month: " << res["minute"];
+		}
+	
+		//Minute
+		rx=QRegExp("(\\d+S)");
+		if(rx.indexIn(pTime) > -1)
+		{
+			res["sec"]=rx.cap(1).remove("S").toInt();
+			//qDebug() << "Second: " << res["sec"];
+		}
+	}
+	
+}
+
+void MvQOgcRequest::addPeriod(QDateTime &dt,const QMap<QString,int> &period)
+{
+	if(period.contains("year"))
+	{
+		dt=dt.addYears(period["year"]);
+		//qDebug() << d;
+	}
+
+	if(period.contains("month"))
+	{
+		dt=dt.addMonths(period["month"]);
+		//qDebug() << d;
+	}
+
+	if(period.contains("day"))
+	{
+		dt=dt.addDays(period["day"]);
+		//qDebug() << d;
+	}
+
+	if(period.contains("hour"))
+	{
+		dt=dt.addSecs(period["hour"]*3600);
+		//qDebug() << d;
+	}
+	if(period.contains("minute"))
+	{
+		dt=dt.addSecs(period["minute"]*60);
+		//qDebug() << d;
+	}
+	if(period.contains("sec"))
+	{
+		dt=dt.addSecs(period["sec"]);
+		//qDebug() << d;
+	}
+
+}
+
+int MvQOgcRequest::periodToSeconds(QString t)
+{
+	QMap<QString,int> period;
+	decodePeriod(t,period);
+
+	QDateTime dtBase=QDateTime::currentDateTime();
+	QDateTime dtEnd=dtBase;
+	addPeriod(dtEnd,period);
+	return dtBase.secsTo(dtEnd);
+}
+
+QString MvQOgcRequest::timeFormat(QString d)
+{
+	QString tf;
+
+	bool tzone=d.endsWith("Z");
+	d.remove("Z");
+
+	QStringList lst=d.split("T");
+
+
+	if(lst.count() >0)
+	{
+		QStringList dlst=lst[0].split("-");
+
+		if(dlst.count() > 0)
+			tf+="yyyy";
+	
+		if(dlst.count() > 1)
+			tf+="-MM";
+		
+		if(dlst.count() == 3 )
+			tf+="-dd";
+	}
+
+
+	if(lst.count() > 1)
+	{
+		QStringList tlst=lst[1].split(":");
+
+		if(tlst.count() > 0)
+			tf+="Thh";
+	
+		if(tlst.count() > 1)
+			tf+=":mm";
+		
+		if(tlst.count() == 3 )
+		{
+		 	if(!tlst[2].contains("."))
+			{  
+				tf+=":ss";
+			}
+			else
+			{
+			  	tf+=":ss.zzz";
+			}
+		}	
+	}		
+
+	if(tzone)
+		tf+="Z";
+	
+	return tf;
+}
+
+//====================================================
+MvQGetMapRequest::MvQGetMapRequest()
+{
+	stdParams_ << "REQUEST" << "SERVICE" << "VERSION" << "LAYERS" << "STYLES" << 
+		      "WIDTH" << "HEIGHT" << "FORMAT" << "TRANSPARENT" <<
+		      "TIME" << "ELEVATION" << "CRS" << "SRS" << "BBOX";
+}
+
+
+void MvQGetMapRequest::setRequest(QString r,QStringList timeDimName)
+{
+	timeDimName_=timeDimName;
+
+	clear();
+	request_=r;
+	parse();
+}
+
+void MvQGetMapRequest::editRequest(QString r)
+{
+	//timeDimName_=timeDimName;
+
+	clear();
+	request_=r;
+	parse();
+}
+
+void MvQGetMapRequest::clear()
+{
+	MvQOgcRequest::clear();
+
+	requestFrame_.clear();
+	outFile_.clear();
+}
+
+void MvQGetMapRequest::parse()
+{
+	requestFrame_.clear();
+	outFile_.clear();
+
+	MvQOgcRequest::parse();
+	
+	//Parse for time dimension
+	
+	QList<QPair<QString,QStringList> > frameLst;
+	QList<int> indexRange,indexState;
+
+	//qDebug() << "timeDimName_" << timeDimName_;
+
+	foreach(QString dimName,dims())
+	{
+		if(requestMap_.contains(dimName))
+		{
+			QStringList values;
+
+			bool temporal=timeDimName_.contains(dimName,Qt::CaseInsensitive);
+			foreach(QString item, requestMap_[dimName].split(","))
+			{				
+				if(item.isEmpty() == false)			
+				{
+					if(temporal)
+					{
+						decodeTimeDimItem(item,values);
+					}
+					else
+					{
+						decodeDimItem(item,values);
+					}				
+				}
+			}			
+			
+			if(values.count() > 0)
+			{
+				frameLst << qMakePair(dimName,values);
+				indexRange << values.count();
+				indexState << 0;
+
+			}
+		}
+	}
+
+	//qDebug() << "frames" << frameLst;
+
+	if(frameLst.count() > 0)
+	{
+		bool moreIndex=true;
+		int currentPos=indexState.count()-1;
+
+		while(moreIndex)
+		{
+			//qDebug() << "index" << indexState;
+			QString req=request_;
+
+			//qDebug() << req;
+			for(int i=0; i < indexState.count(); i++)
+			{
+				QString dimName=frameLst[i].first;
+				QString value=frameLst[i].second.at(indexState[i]);
+
+				QString frameReq=dimName + "=" + requestMap_[dimName];
+				//qDebug() << "frameReq" << frameReq;
+				req.replace(frameReq,dimName + "=" + value);
+			}
+			
+			qDebug() << req;
+
+			requestFrame_ << req;
+			outFile_ <<  " ";
+			moreIndex=getNextVariation(currentPos,indexRange,indexState,true);
+
+			if(requestFrame_.size() >= maxFrame_)
+			{
+				break;
+			}
+
+		}
+	}
+	else
+	{		
+		requestFrame_ << request_;
+		outFile_ <<  " ";	
+	}
+
+	/*if(requestMap_.contains("TIME"))
+	{		
+		QString timeReq="TIME=" + requestMap_["TIME"];
+		foreach(QString time, requestMap_["TIME"].split("/"))
+		{
+			QString req=request_;
+			req.replace(timeReq,"TIME=" + time);
+			requestStep_ << req;
+			outFile_ <<  " ";
+
+		}
+		time_=requestMap_["TIME"].split("/");
+	}*/
+	//else
+	//{
+	//	requestStep_ << request_;
+	//	outFile_ <<  " ";	
+	//}
+}	
+
+bool MvQGetMapRequest::getNextVariation(int &currentPos,QList<int> ranges,QList<int> &currentState, bool forward)
+{
+	//qDebug() << currentPos << currentState << ranges;
+	
+	if(currentState[currentPos] == ranges[currentPos]-1)
+	{
+		if(currentPos==0)
+		{
+			return false;
+		}
+		if(forward && currentPos != ranges.count()-1)
+		{
+			currentPos++;
+			return getNextVariation(currentPos,ranges,currentState,true);
+		}
+		else
+		{
+			currentPos--;
+			for(int i=currentPos+1; i < currentState.count(); i++)
+			{			
+				currentState[i]=0;
+			}
+			return getNextVariation(currentPos,ranges,currentState,false);
+		}
+	}
+	else
+	{
+		if(currentPos == 0 || currentPos == ranges.count()-1 || forward == false)
+		{
+			currentState[currentPos]++;
+			if(currentPos != ranges.count()-1)
+			{
+				currentPos++;
+			}
+		}
+		else
+		{
+			if(currentPos != ranges.count()-1)
+			{
+				currentPos++;
+			}
+			
+			return getNextVariation(currentPos,ranges,currentState,true);
+		}		
+	
+		return true;		
+	}
+	
+	return false;
+}
+	
+void MvQGetMapRequest::setOutFile(int index,QString path)	
+{
+	if(index >=0 && index < outFile_.count())
+	{
+		outFile_[index]=path;
+	}
+}
+
+QString MvQGetMapRequest::outFile(int index)
+{
+	if(index >=0 && index < outFile_.count())
+	{
+		return outFile_[index];
+	}
+	return QString();
+}
+
+QString MvQGetMapRequest::requestFrame(int index)
+{
+	if(index >=0 && index < requestFrame_.count())
+	{
+		return requestFrame_[index];
+	}
+	return QString();
+}
+
+void MvQGetMapRequest::dimValuesForFrame(QMap<QString,QString>& val, int frame)
+{
+	if(frame  < 0 || frame >= requestFrame_.count())
+	{
+		return;
+
+	}
+
+	MvQOgcRequest r;
+	r.setRequest(requestFrame_[frame]);
+
+	foreach(QString s,dims())
+	{	
+		val[s]=r.item(s);
+	}	
+}
+
+bool MvQGetMapRequest::isTimeDim(QString name)
+{
+	return (timeDimName_.contains(name,Qt::CaseInsensitive) || 
+               name.compare("TIME",Qt::CaseInsensitive) ==0);
+}
+
+
+/*void MvQGetMapRequest::timeDimValuesForFrame(QMap<QString,QString>& val, int step)
+{
+	if(step  < 0 || step >= requestStep_.count())
+	{
+		return;
+
+	}
+
+	MvQOgcRequest r;
+	foreach(QString s,timeDimName_)
+	{	
+		r.setRequest(requestStep_[step]);
+		val[s]=r.item(s);
+	}
+}
+
+void MvQGetMapRequest::nonTimeDimValues(QMap<QString,QString>& val)
+{
+	if(requestMap_.contains("ELEVATION"))
+	{
+		val["ELEVATION"]=requestMap_["ELEVATION"];
+	}
+	foreach(QString s,requestMap_.keys())
+	{
+		if(s.startsWith("DIM_") && timeDimName_.indexOf(s) == -1 )
+		{
+			val[s]=requestMap_[s];
+		}
+	}
+}*/
+
+QString MvQGetMapRequest::crs() const
+{
+
+	if(requestMap_.contains("CRS"))
+	{
+		return requestMap_["CRS"];
+	}
+	else if(requestMap_.contains("SRS"))
+	{
+		return requestMap_["SRS"];
+	}
+
+	return QString();
+}  
+
+QString MvQGetMapRequest::minX()
+{
+	if(requestMap_.contains("BBOX"))
+	{
+		QString bb=requestMap_["BBOX"];
+		QStringList lst=bb.split(",");
+		if(lst.count() == 4)
+		{
+			return lst[0];
+		}
+	}
+	return QString();
+}
+
+QString MvQGetMapRequest::maxX()
+{
+	if(requestMap_.contains("BBOX"))
+	{
+		QString bb=requestMap_["BBOX"];
+		QStringList lst=bb.split(",");
+		if(lst.count() == 4)
+		{
+			return lst[2];
+		}
+	}
+	return QString();
+}
+
+QString MvQGetMapRequest::minY()
+{
+	if(requestMap_.contains("BBOX"))
+	{
+		QString bb=requestMap_["BBOX"];
+		QStringList lst=bb.split(",");
+		if(lst.count() == 4)
+		{
+			return lst[1];
+		}
+	}
+	return QString();
+}
+
+QString MvQGetMapRequest::maxY()
+{
+	if(requestMap_.contains("BBOX"))
+	{
+		QString bb=requestMap_["BBOX"];
+		QStringList lst=bb.split(",");
+		if(lst.count() == 4)
+		{
+			return lst[3];
+		}
+	}
+	return QString();
+}
+
+
+QString MvQGetMapRequest::layers()
+{
+	if(requestMap_.contains("LAYERS"))
+	{
+		return requestMap_["LAYERS"];
+	}
+
+	return QString();
+}  
+
+void MvQGetMapRequest::decodeTimeDimItem(QString item,QStringList &values)
+{
+	QStringList lst=item.split("/");
+		
+	//qDebug() << "Time:" << lst;
+
+
+	//QDateTime dm=QDateTime::fromString(lst[0],Qt::ISODate);
+	//qDebug() << dm.toString("-yyyy") << dm.toString("MM") << dm.toString("dd")  <<
+  //dm.toString("hh") << dm.toString("mm") << dm.toString("ss");
+ 
+	//Period
+	if(lst.count() == 3)
+	{
+		QString tf=timeFormat(lst[0]);
+
+		//qDebug() << "tf" << tf;
+
+		QDateTime startDate=QDateTime::fromString(lst[0],tf);
+		QDateTime endDate=QDateTime::fromString(lst[1],tf);
+		
+		//QDateTime startDate=QDateTime::fromString(MvQOgcRequest::correctDateTime(lst[0]),Qt::ISODate);
+		//QDateTime endDate=QDateTime::fromString(MvQOgcRequest::correctDateTime(lst[1]),Qt::ISODate);
+
+		//qDebug() <<  startDate << endDate;
+				
+		QMap<QString,int> period;
+		MvQOgcRequest::decodePeriod(lst[2],period);
+	
+		//qDebug() << period;
+		
+		int cnt=0;
+		QDateTime dt=startDate;			
+		while(dt <= endDate && cnt < maxFrame_)
+		{				
+			//QString s=dt.toString(Qt::ISODate);
+			//s+="Z";
+
+			QString s=dt.toString(tf);
+		
+			values.push_back(s);
+			MvQOgcRequest::addPeriod(dt,period);			
+			cnt++;
+			if(dt <= startDate) 
+				break;	
+		}
+			
+		//qDebug() << "time: " << startDate << endDate << period;
+		//qDebug() << "value_" << values;
+
+	}
+	else if(lst.count() == 1 && lst[0].isEmpty() == false)
+	{
+		values.push_back(item);
+	}
+}
+
+void MvQGetMapRequest::decodeDimItem(QString item,QStringList &values)
+{
+	QStringList lst=item.split("/");
+		
+	//qDebug() << "Decode other dim:" << lst;
+ 
+	if(lst.count() == 3)
+	{
+
+		float minVal=lst[0].toFloat();
+		float maxVal=lst[1].toFloat();
+		float stepVal=lst[2].toFloat();	
+			
+		float v=minVal;			
+		int num=0;
+		while(v <= maxVal && num < 100)
+		{				
+			QString s=QString::number(v);
+			values << s;
+			v+=stepVal;
+			if(v <= minVal) 
+				break;	
+		}	
+	}	
+	else if(lst.count() == 1 && lst[0].isEmpty() == false)
+	{
+		values.push_back(item);
+	}		
+}
+
+
+QStringList MvQGetMapRequest::dims() const
+{
+	QStringList dims;
+	foreach(QString s,requestMap_.keys())
+	{
+		if(s.startsWith("DIM_",Qt::CaseInsensitive) || timeDimName_.indexOf(s) != -1 ||
+		   s.compare("ELEVATION",Qt::CaseInsensitive) == 0 || s.compare("TIME",Qt::CaseInsensitive) == 0)
+		{
+			dims << s;
+		}
+	}
+	
+	return dims;
+}
+
+
+QString MvQGetMapRequest::item(QString id) const
+{	
+	//qDebug() << "id" << id;
+
+	if(id == "mv_key_url")
+	{
+		return guessUrl();
+	}
+	else if(id == "mv_key_crs")
+	{
+		return crs();
+	}
+	else if(id == "mv_key_tdim")
+	{
+		QStringList lst;
+		foreach(QString s,timeDimName_)
+		{
+			if(s.compare("TIME",Qt::CaseInsensitive) !=0)
+			{
+				lst << s + "=" + requestMap_[s];
+			}
+		}
+		return lst.join("&");
+	}
+	else if(id == "mv_key_otherdim")
+	{
+		QStringList lst;
+		foreach(QString s,requestMap_.keys())
+		{
+			if(s.startsWith("DIM_",Qt::CaseInsensitive) && timeDimName_.indexOf(s) == -1)
+			{
+				lst << s + "=" + requestMap_[s];
+			}
+		}
+
+		//qDebug() << lst.join("&");
+		return lst.join("&");
+	}
+	else if(id == "mv_key_extrapar")
+	{
+		QStringList lst;
+		QStringList dimLst=dims();
+		foreach(QString s,requestMap_.keys())
+		{
+			if(!stdParams_.contains(s,Qt::CaseInsensitive) &&
+			   !dimLst.contains(s,Qt::CaseInsensitive))
+			{
+				lst << s + "=" + requestMap_[s];
+			}
+		}
+		return lst.join("&");		
+	}
+	else
+	{
+		return MvQOgcRequest::item(id);
+	}
+}
+
+void MvQGetMapRequest::setItem(QString id,QString value)
+{	
+	if(id.compare("VERSION",Qt::CaseInsensitive) == 0)
+	{
+		QString s=item("VERSION");
+		if(!s.isEmpty())
+		{
+			if(value < "1.3.0")
+			{
+				QString crsId=MvQOgcRequest::getStoredId("CRS");
+				if(!crsId.isEmpty())
+				{
+					request_.replace(crsId + "=","SRS=");
+					parse();
+				}
+			}
+			else
+			{
+				QString srsId=MvQOgcRequest::getStoredId("SRS");
+				if(!srsId.isEmpty())
+				{
+					request_.replace(srsId + "=","CRS=");
+					parse();
+				}
+			}
+		}
+		
+		MvQOgcRequest::setItem(id,value);
+	}
+	if(id == "mv_key_url")
+	{
+		QString s=guessUrl();
+		request_.replace(s,value);
+	}
+	else if(id == "mv_key_crs")
+	{
+		QString s=item("VERSION");
+		if(s.isEmpty())
+		{
+			if(requestMap_.contains("CRS"))
+			{
+				MvQOgcRequest::setItem("CRS",value);			
+			}
+			else if(requestMap_.contains("SRS"))
+			{
+				MvQOgcRequest::setItem("SRS",value);
+			}
+		}
+		else if(s < "1.3.0")
+			MvQOgcRequest::setItem("SRS",value);
+		else
+			MvQOgcRequest::setItem("CRS",value);
+	}
+	else if(id == "mv_key_extrapar")
+	{
+		setExtraPar(value);
+	}
+	else if(id == "mv_key_tdim")
+	{
+		setDims(value,true);
+	}
+	else if(id == "mv_key_otherdim")
+	{
+		setDims(value,false);
+	}
+	else
+	{
+		MvQOgcRequest::setItem(id,value);
+	}
+
+}
+
+void MvQGetMapRequest::setDims(QString value,bool temporal)
+{
+	//qDebug() << "setDims" << value << temporal;
+
+	QMap<QString,bool> dimLst;
+	if(temporal)
+	{
+		foreach(QString s, dims())
+		{
+			if(s.startsWith("DIM_",Qt::CaseInsensitive) && timeDimName_.indexOf(s) != -1 )
+			{
+				dimLst[s]=false;
+			}
+		}
+	}
+	else
+	{
+		foreach(QString s,dims())
+		{
+			if(s.startsWith("DIM_",Qt::CaseInsensitive) && timeDimName_.indexOf(s) == -1 )
+			{
+				dimLst[s]=false;
+			}
+		}
+	}
+
+	QStringList dimNames=dimLst.keys();	
+
+	//qDebug() << dimNames;
+
+	QStringList lst=value.split("&");
+	for(int i=0; i < lst.count(); i++)
+	{		
+		QStringList items=lst[i].split("=");
+		if(items.count() > 1)
+		{
+			if(items[0].startsWith("DIM_",Qt::CaseInsensitive))
+			{
+				QString dim=items[0];
+				QString dimValue=lst[i].right(lst[i].count()-dim.count()-1);
+				QString sid=getStoredId(dim);			
+			
+				//qDebug() << "setDim" << dim << dimValue;
+
+				if(!sid.isEmpty() && dimNames.contains(sid,Qt::CaseInsensitive))
+				{
+					MvQOgcRequest::setItem(dim,dimValue);					
+					dimLst[sid]=true;
+				}
+				else
+				{
+					if(temporal)
+						timeDimName_ << dim;
+
+					request_+= "&" + lst[i];
+					parse();
+				}
+			}
+		}
+	}
+
+	//qDebug() << dimLst;
+
+	//Remove unsepcified dims
+	foreach(QString dim,dimLst.keys())
+	{
+		if(dimLst[dim]==false)
+		{
+			removeItem(dim);
+		}
+	}
+}
+	
+void MvQGetMapRequest::setExtraPar(QString value)
+{
+	QMap<QString,bool> pars;
+	
+	foreach(QString s,requestMap_.keys())
+	{
+		if(!stdParams_.contains(s,Qt::CaseInsensitive) &&
+		   !s.startsWith("DIM_",Qt::CaseInsensitive) )
+		{
+				pars[s]=false;
+			
+		}
+	}
+	
+	QStringList lst=value.split("&");
+	for(int i=0; i < lst.count(); i++)
+	{		
+		QStringList items=lst[i].split("=");
+		if(items.count() > 1)
+		{			
+			if(!stdParams_.contains(items[0],Qt::CaseInsensitive) &&
+			  !items[0].startsWith("DIM_",Qt::CaseInsensitive) )
+			{
+				QString par=items[0];
+				QString parValue=lst[i].right(lst[i].count()-par.count()-1);
+				QString sid=getStoredId(par);	
+
+				//qDebug() << "setPar" << par << parValue;
+
+				if(!sid.isEmpty() && pars.contains(sid))
+				{
+					MvQOgcRequest::setItem(par,parValue);				
+					pars[sid]=true;
+				}
+				else
+				{
+					request_+= "&" + lst[i];
+					parse();
+				}
+				
+				pars[par]=true;
+			}
+		}
+	}
+
+	//Remove unsepcified pars
+	foreach(QString par,pars.keys())
+	{
+		if(pars[par]==false)
+		{
+			removeItem(par);
+		}
+	}
+}
+
+void MvQGetMapRequest::removeItem(QString id)
+{	
+	MvQOgcRequest::removeItem(id);
+
+	foreach(QString s,timeDimName_)
+	{
+		if(s.compare(id,Qt::CaseInsensitive) == 0)
+		{
+			timeDimName_.removeAll(s);
+		}
+	}
+}
diff --git a/src/OgcClient/MvQOgcRequest.h b/src/OgcClient/MvQOgcRequest.h
new file mode 100644
index 0000000..01c4011
--- /dev/null
+++ b/src/OgcClient/MvQOgcRequest.h
@@ -0,0 +1,108 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOgcRequest_H
+#define MvQOgcRequest_H
+
+#include <QDateTime>
+#include <QMap>
+#include <QStringList>
+
+class MvQOgcRequest
+{
+public:
+	MvQOgcRequest() {};
+	const QString& request() const {return request_;} 
+	void setRequest(QString);
+	virtual QString item(QString) const;
+	void setItem(QString,QString);
+	virtual void removeItem(QString); 
+	virtual void clear();
+	QString guessUrl() const;
+
+	static QString timeToString(QString);
+	static QString correctDateTime(QString);
+		
+protected:
+	virtual void parse();
+	QString getStoredId(QString) const;
+	static void decodePeriod(const QString&,QMap<QString,int> &);
+	static void addPeriod(QDateTime &,const QMap<QString,int> &);
+	static int  periodToSeconds(QString);
+	static QString timeFormat(QString);
+
+	QString request_;
+	QMap<QString,QString> requestMap_;
+};
+
+
+class MvQGetMapRequest : public MvQOgcRequest
+{
+public:
+	MvQGetMapRequest();
+
+	void setRequest(QString,QStringList lst=QStringList());
+	void editRequest(QString);
+
+	void clear();
+	int requestFrameNum() {return requestFrame_.count();};
+	QString requestFrame(int);
+	QStringList requestFrame() {return requestFrame_;}
+	QStringList outFile() {return outFile_;}
+	QString outFile(int);
+	void setOutFile(int, QString);	
+	bool isTimePresent() {return (timeDimName_.size() > 0)?true:false;}
+
+	void setTimeDimName(QStringList s) {timeDimName_=s;}
+	static int maxFrame() {return maxFrame_;}
+
+	QString crs() const;
+	QString minX();
+	QString maxX();	
+	QString minY();
+	QString maxY();
+	QString layers();
+  	void dimValuesForFrame(QMap<QString,QString>&,int); 
+	//void timeDimValuesForFrame(QMap<QString,QString>&,int);
+	//void nonTimeDimValues(QMap<QString,QString>&);
+	bool isTimeDim(QString);
+	QString item(QString) const;
+	void setItem(QString,QString);
+	void removeItem(QString); 
+	void setDims(QString,bool);
+	QStringList dims() const;
+
+protected:	
+	void parse();
+	bool getNextVariation(int&,QList<int>,QList<int> &,bool);
+	void decodeTimeDimItem(QString,QStringList&);
+	void decodeDimItem(QString,QStringList&);
+	void setExtraPar(QString);
+
+	QStringList outFile_;
+	QStringList requestFrame_;
+	QStringList timeDimName_;
+	static int maxFrame_;
+	QStringList stdParams_;
+
+};
+
+class MvQGetCoverageRequest : public MvQOgcRequest
+{
+public:
+	MvQGetCoverageRequest() {};
+	QString outFile() {return outFile_;}
+	void setOutFile(QString s) {outFile_=s;}
+
+protected:
+	
+	QString outFile_;
+};
+
+#endif
diff --git a/src/OgcClient/MvQOgcTreeModel.cc b/src/OgcClient/MvQOgcTreeModel.cc
new file mode 100644
index 0000000..05c58f6
--- /dev/null
+++ b/src/OgcClient/MvQOgcTreeModel.cc
@@ -0,0 +1,154 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQOgcTreeModel.h"
+
+#include "MvQOgcParam.h"
+
+MvQOgcTreeModel::MvQOgcTreeModel()
+{
+	root_=0;
+}
+
+void MvQOgcTreeModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQOgcTreeModel::setRootNode(MvQOgcNode *root)
+{	
+	root_=root;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+
+int MvQOgcTreeModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 1;
+}
+
+int MvQOgcTreeModel::rowCount( const QModelIndex& parent) const
+{
+	if(!root_)
+		return 0;
+
+	if(parent.column() > 0)
+	{
+		return 0;
+	}
+
+	MvQOgcNode *parentNode=nodeFromIndex(parent);
+	if(!parentNode)
+		return 0;
+
+	return parentNode->children().count();	
+}
+
+
+QVariant MvQOgcTreeModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || (role != Qt::DisplayRole && role != Qt::ToolTipRole))
+        {			
+		return QVariant();
+	}
+
+	MvQOgcNode *node=nodeFromIndex(index);
+	if(!node)
+		return QVariant();
+	
+	if(role == Qt::ToolTipRole)
+	{
+		QString s="Title: " + node->displayValue() + "<br>" +
+			  "Name:  " + node->value();
+		
+		return s;
+	}
+	else
+	{
+		return node->displayValue();
+	}
+}
+
+
+QVariant MvQOgcTreeModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return "Layer title";
+   	}
+
+    	return QVariant();
+}
+
+QModelIndex MvQOgcTreeModel::index( int row, int column, const QModelIndex & parent ) const
+{
+	if(!root_ || row < 0 || column < 0)
+	{
+		return QModelIndex();
+	}
+	
+	MvQOgcNode* parentNode=nodeFromIndex(parent);
+	MvQOgcNode* childNode=parentNode->children().at(row);
+	
+	if(!childNode)
+		return QModelIndex();
+
+	return createIndex(row,column,childNode);
+}
+
+MvQOgcNode* MvQOgcTreeModel::nodeFromIndex( const QModelIndex & index) const
+{
+	if(index.isValid() )
+	{
+		return static_cast<MvQOgcNode*>(index.internalPointer());
+	}
+	else
+	{
+		return root_;
+	}
+}
+
+QModelIndex MvQOgcTreeModel::parent( const QModelIndex &child) const
+{		
+	MvQOgcNode *node=nodeFromIndex(child);
+	if(!node)
+		return QModelIndex();
+
+	MvQOgcNode *parentNode=node->parent();
+	if(!parentNode)
+		return QModelIndex();	
+
+	MvQOgcNode *grandParentNode=parentNode->parent();
+	if(!grandParentNode)
+		return QModelIndex();
+
+	int row=grandParentNode->children().indexOf(parentNode);
+	return createIndex(row,0,parentNode);
+}
+
+QModelIndex MvQOgcTreeModel::indexFromNode(MvQOgcNode* node) const
+{
+	if(node != 0 && node->parent() != 0)
+	{
+		int row=node->parent()->children().indexOf(node);
+		if(row != -1)
+		{
+			return createIndex(row,0,node);
+		}
+	}
+	
+	return QModelIndex();
+}
+
+		
diff --git a/src/OgcClient/MvQOgcTreeModel.h b/src/OgcClient/MvQOgcTreeModel.h
new file mode 100644
index 0000000..3215a2f
--- /dev/null
+++ b/src/OgcClient/MvQOgcTreeModel.h
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOgcTreeModel_H
+#define MvQOgcTreeModel_H
+
+#include <QAbstractItemModel>
+
+class MvQOgcNode;
+
+class MvQOgcTreeModel : public QAbstractItemModel
+{
+
+public:
+   	MvQOgcTreeModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setRootNode(MvQOgcNode*);
+	QModelIndex indexFromNode(MvQOgcNode*) const;
+	MvQOgcNode* nodeFromIndex( const QModelIndex & index) const;
+
+protected:
+
+	MvQOgcNode* root_;
+	
+};
+
+#endif
diff --git a/src/OgcClient/MvQWcsClient.cc b/src/OgcClient/MvQWcsClient.cc
new file mode 100644
index 0000000..00c62b2
--- /dev/null
+++ b/src/OgcClient/MvQWcsClient.cc
@@ -0,0 +1,2088 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QBuffer>
+#include <QDateTime>
+#include <QDebug>
+#include <QDomDocument>
+#include <QFile>
+
+#include <QAbstractXmlNodeModel>
+#include <QAuthenticator>
+#include <QNetworkReply>
+#include <QXmlFormatter>
+#include <QXmlResultItems>
+
+#include "MvQNetworkAccessManager.h"
+#include "MvQOgcRequest.h"
+#include "MvQXmlQuery.h"
+
+#include "MvQWcsClient.h"
+
+#include "LogHandler.h"
+
+#include "mars.h"
+
+//==============================
+// 
+// Base client
+//
+//==============================
+
+MvQWcsClientBase::MvQWcsClientBase()
+{
+	supportedMimeType_ << "image/png" << "image/jpeg" << 
+			    "image/gif"; // "image/svg+xml";
+
+	supportedCrs_ << "EPSG:4326" << "CRS:84";
+}
+
+QString MvQWcsClientBase::getMimeType(QByteArray ba)
+{
+	qDebug() << "fileType" << ba.mid(0,8).toHex();
+
+	if(ba.mid(0,8).toHex() == "89504e470d0a1a0a")
+	{
+		return "image/png";
+	}
+	else if(ba.mid(0,4).toHex() == "ffd8ffe0")
+	{
+		return "image/jpeg";
+	}
+	else if(ba.mid(0,6) == "GIF87a" ||
+		ba.mid(0,6) == "GIF89a")
+	{
+		return "image/gif";
+	}
+
+	return QString("text/plain");
+}
+
+
+QString MvQWcsClientBase::getRequestedMimeType(QString r)
+{
+	MvQGetCoverageRequest req;
+	req.setRequest(r);
+	return req.item("FORMAT");
+}
+
+//==============================
+// 
+// Download/batch client
+//
+//==============================
+
+MvQWcsGetClient::MvQWcsGetClient(MvRequest& req):
+	reqInfo_ (req)
+{
+	getCovRunStatus_=false;
+
+	getCovRequest_=new MvQGetCoverageRequest;
+
+	const char* mode = (const char*)reqInfo_("_ACTION");
+	if(!mode)
+		return;
+
+
+	QStringList timeDimName;
+	const char* tdn= (const char*)reqInfo_("TIME_DIMENSIONS");
+	if(tdn)
+	{
+		QString s(tdn);
+		timeDimName=s.split("/");
+	}
+
+	getCovRequest_->setRequest(QString((const char*)reqInfo_("REQUEST")));
+
+	//Prepare
+	/*if(strcmp(mode,"prepare") == 0)
+	{		
+		MvRequest ctx=reqInfo_("_CONTEXT");
+		ctx.print();
+		const char* proj= (const char*)ctx("MAP_PROJECTION");
+		//const char* area= (const char*)ctx("AREA");
+
+		const char* area= (const char*)ctx("AREA");
+
+		int cnt = ctx.countValues("AREA");
+		double dval; 
+	 	QStringList areaL;
+		for(int i=0; i< cnt; i++)
+	       	{
+			ctx.getValue(dval,"AREA",i);
+	 		areaL << QString::number(dval);
+		}
+	 
+		if(!proj || areaL.count() != 4)
+		{
+			return;
+		}
+		
+		if(strcmp(proj,"CYLINDRICAL") == 0)
+		{
+			if(getCovRequest_->crs() == "CRS:84" || 
+			   getCovRequest_->crs() == "EPSG:4326")
+			{
+				//s,w,n,e
+				qDebug() << "area" << areaL;							
+				getCovRequest_->setItem("BBOX",
+				    areaL[1] +"," + areaL[0] + "," + areaL[3] + "," + areaL[2]);
+			}
+		}
+	}*/
+
+
+	//Network access
+	networkGetCov_ = new MvQNetworkAccessManager(this);
+	getCovReply_=0;
+
+	connect(networkGetCov_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyGetCov(QNetworkReply*)));
+
+}
+
+MvQWcsGetClient::~MvQWcsGetClient()
+{
+	delete networkGetCov_;
+}
+
+void MvQWcsGetClient::runGetCov()
+{	
+	outFile_.clear();
+
+	getCovRunStatus_=false;
+	downloadGetCov();
+}
+
+void MvQWcsGetClient::downloadGetCov()
+{
+	getCovReply_ = networkGetCov_->get(QNetworkRequest(QUrl(getCovRequest_->request())));
+}
+
+void MvQWcsGetClient::slotReplyGetCov(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	//LogItem *log=new LogItem;
+	//LogHandler::instance()->add(log);
+	//log->description("Load GetCov");
+	
+	if(reply->error() != QNetworkReply::NoError)
+	{						
+		QString ems="GetCov request failed!\nError: ";
+		ems+=reply->errorString();
+		marslog(LOG_EROR,"GetCov request failed!\nError: %s ",reply->errorString().toStdString().c_str());
+		//log->error(reply->errorString().toStdString() + "\n");			
+		QApplication::exit();
+	}
+	else
+	{			
+		// temporary file
+		QString outFile;		
+		outFile=marstmp();
+		
+		getCovRequest_->setOutFile(outFile);
+
+		QByteArray ba=reply->readAll();	
+
+		if(mimeType.isEmpty())
+			mimeType=getMimeType(ba);
+
+		//If exception is returned or mime type is 
+		//different to what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||
+		   !mimeType.contains(getRequestedMimeType(url.toString())))		
+		{
+			QString eMsg;
+			//readException(ba,eMsg);
+
+			QApplication::exit();
+		}
+
+		QFile out(outFile);
+		out.open(QIODevice::WriteOnly);
+		out.write(ba);
+		out.close();
+				
+		getCovRunStatus_=true;
+		QApplication::exit();
+	}
+
+	reply->deleteLater();
+	getCovReply_=0;
+}
+
+
+//=================================
+// 
+// Client for the user interface
+//
+//=================================
+
+MvQWcsUiClient::MvQWcsUiClient(string& iconFile, MvRequest& req):
+	iconFile_(QString::fromStdString(iconFile)),
+	reqInfo_ (req)
+{
+	getCovRequest_=new MvQGetCoverageRequest;
+	lastGetCovRequest_=new MvQGetCoverageRequest;
+
+	// Initialize elements from Metview request
+	url_ = QString((const char*)reqInfo_("SERVER"));
+	version_ = (const char*)reqInfo_("VERSION");
+
+	QStringList timeDimName;
+
+	const char* tdn= (const char*)reqInfo_("TIME_DIMENSIONS");
+	if(tdn)
+	{
+		QString s(tdn);
+		timeDimName=s.split("/");
+	}
+
+	getCovRequest_->setRequest(QString((const char*)reqInfo_("REQUEST")));
+	
+	clientMode_=BasicMode;
+	if((const char*)reqInfo_("MODE") !=0)
+	{
+		QString m(reqInfo_("MODE"));
+		if(m=="EXPERT")
+			clientMode_=BasicMode;
+		else
+			clientMode_=AdvancedMode;
+	}	
+
+	
+	if((const char*)reqInfo_("EXTRA_GETCAP_PAR") !=0)
+	{
+		extraGetCapPar_=QString(reqInfo_("EXTRA_GETCAP_PAR"));	
+	}	
+
+	if((const char*)reqInfo_("EXTRA_GETMAP_PAR") !=0)
+	{
+		extraGetCovPar_=QString(reqInfo_("EXTRA_GETMAP_PAR"));	
+	}	
+
+	if((const char*)reqInfo_("HTTP_USER") !=0)
+	{
+		httpUser_=QString(reqInfo_("HTTP_USER"));	
+	}	
+
+	if((const char*)reqInfo_("HTTP_PASSWORD") !=0)
+	{
+		httpPassword_=QString(reqInfo_("HTTP_PASSWORD"));	
+	}	
+
+
+	qDebug() << "Init:" << url_ << version_ << getCovRequest_;
+	
+	//Width
+	width_= new MvQOgcIntValue(1024,"WIDTH","Width:");
+	QString val=getCovRequest_->item(width_->requestName());
+	if(!val.isEmpty())
+		width_->setValue(val.toInt());
+	
+	//Height
+	height_= new MvQOgcIntValue(512,"HEIGHT","Height:");
+	val=getCovRequest_->item(height_->requestName());
+	if(!val.isEmpty())
+		height_->setValue(val.toInt());
+
+	//Format
+	format_= new MvQOgcList("FORMAT","Format:");
+
+	//Transparent
+	transparent_= new MvQOgcList("TRANSPARENT","Transparent:");	
+	transparent_->setValues(QStringList() << "TRUE" << "FALSE");
+	transparent_->setDisplayValues(QStringList() << "True" << "False");
+	val=getCovRequest_->item(transparent_->requestName());
+	
+	//If it is a new request we set transparency to TRUE by default
+	if(val.isEmpty() && getCovRequest_->request().isEmpty())
+	{
+		transparent_->setCurrentValue("TRUE");
+	}
+	else
+	{
+		transparent_->setCurrentValue(val);
+	}
+
+	//BgColour
+	bgColour_= new MvQOgcColourValue("#FFFFFF","BGCOLOUR","Bg colour:");
+
+	//Layer
+	layer_= new MvQOgcTree("LAYERS","Layer:");
+
+	//CRS/SRS	
+	crs_= new MvQOgcCrsList("CRS","CRS:");
+			
+	//Style
+	style_= new MvQOgcStyleList("STYLES","Style:");
+
+	//BoundingBox
+	requestBbox_=new MvQOgcBoundingBox("BBOX","");
+	geographicBbox_=0;
+
+	//Dimension
+		
+	//Network access
+	networkGetCap_ = new MvQNetworkAccessManager(this);
+	networkDescribeCov_ = new MvQNetworkAccessManager(this);
+	networkGetCov_ = new MvQNetworkAccessManager(this);
+	getCapReply_=0;
+	describeCovReply_=0;
+	getCovReply_=0;
+	
+	connect(networkGetCap_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyGetCap(QNetworkReply*)));
+
+	connect(networkDescribeCov_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyDescribeCov(QNetworkReply*)));
+
+	connect(networkGetCov_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyGetCov(QNetworkReply*)));
+
+	connect(networkGetCap_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+	connect(networkDescribeCov_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+	connect(networkGetCov_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+
+	previewFile_=marstmp();
+	legendFile_=marstmp();
+
+	//xml namspace
+	xlinkNsDeclaration_="declare namespace xlink = \"http://www.w3.org/1999/xlink\";";
+}	
+
+MvQWcsUiClient::~MvQWcsUiClient()
+{
+	delete width_;
+	delete height_;
+	delete format_;
+	delete transparent_;
+	delete bgColour_;
+	delete layer_;
+	delete crs_;
+	delete style_;
+	delete requestBbox_;
+	delete networkGetCap_;
+	delete networkDescribeCov_;
+	delete networkGetCov_;
+
+	clearDimension();
+	clearBoundingBox();
+
+	clearPreview();
+	clearLegend();
+}
+void MvQWcsUiClient::setClientMode(ClientMode mode)
+{
+	clientMode_=mode;
+}
+
+void MvQWcsUiClient::clearServerDependentData()
+{
+	capability_.clear();
+	getCovRequest_->clear();
+	format_->clear();
+	layer_->clear();
+	clearLayerDependentData();
+	serviceMeta_.clear();
+} 
+
+void MvQWcsUiClient::clearLayerDependentData()
+{
+	crs_->clear();
+	style_->clear();
+	clearDimension();
+	clearBoundingBox();
+} 
+
+void MvQWcsUiClient::clearDimension()
+{
+	foreach(MvQOgcDimension* item, dimension_)
+	{
+		delete item;
+	}
+	dimension_.clear();
+}
+
+void MvQWcsUiClient::clearBoundingBox()
+{
+	foreach(MvQOgcBoundingBox* item, bbox_)
+	{
+		delete item;
+	}
+	bbox_.clear();
+
+	if(geographicBbox_)
+	{
+		delete geographicBbox_;
+		geographicBbox_=0;
+	}
+}
+
+void MvQWcsUiClient::setUrl(const QString &url,const QString version)
+{
+	if(url_ != url)
+	{
+		url_=url;
+		version_=version;
+		clearServerDependentData();
+	}
+}
+
+void MvQWcsUiClient::setVersion(const QString &version)
+{
+	if(version_ != version)
+	{
+		version_ = version;
+		//clearServerDependentData();
+	}	
+}
+
+void MvQWcsUiClient::slotRunGetCap()
+{	
+
+	lastGetCovRequest_->setRequest(getCovRequest_->request());
+	clearServerDependentData();
+
+	QString r=url_;
+
+	r+="?SERVICE=WCS&";
+	if(version_ != "Default")
+	{
+		r+="VERSION=" + version_ + "&";
+	}
+	r+="REQUEST=GetCapabilities";
+	if(!extraGetCapPar_.isEmpty())
+	{
+		r+="&" + extraGetCapPar_;
+	}
+
+	qDebug() << "GetCapabilities request: " << r;
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	log->description("Load GetCapabalitites");
+	log->request(r.toStdString());
+	log->status("In progress");
+	emit logUpdated();
+
+	emit statusMessage(tr("Load GetCapabilitites ..."));
+	
+	getCapReply_ = networkGetCap_->get(QNetworkRequest(QUrl(r)));
+}
+
+void MvQWcsUiClient::slotRunDescribeCov()
+{	
+	//lastGetCovRequest_->setRequest(getCovRequest_->request());
+	//clearServerDependentData();
+
+	QString r=url_;
+
+	r+="?SERVICE=WCS&";
+	if(repliedVersion_ != "Default")
+	{
+		r+="VERSION=" + repliedVersion_ + "&";
+	}
+	r+="REQUEST=DescribeCoverage&";
+
+	//r+="IDENTIFIERS=F162009.v4b_web.stable_lights.avg_vis.lzw.tif";
+	r+="COVERAGE=u";
+
+	//if(!extraDescribeCovPar_.isEmpty())
+	//{
+	//	r+="&" + extraDescribeCovPar_;
+	//}
+
+	qDebug() << "DescribeCoverage request: " << r;
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	log->description("Load DescribeCoverage");
+	log->request(r.toStdString());
+	log->status("In progress");
+	emit logUpdated();
+
+	emit statusMessage(tr("Load  DescribeCoverage..."));
+	
+	describeCovReply_ = networkDescribeCov_->get(QNetworkRequest(QUrl(r)));
+}
+
+
+void MvQWcsUiClient::downloadPreview()
+{
+	/*MvQGetCoverageRequest req;
+	req.setRequest(getCovRequest_->requestStep(0));
+	req.setItem("WIDTH","512");
+	req.setItem("HEIGHT","256");
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load preview");
+	log->request(req.request().toStdString());
+	log->status("In progress");
+	emit logUpdated();
+
+	emit statusMessage(tr("Load preview ..."));
+
+	QNetworkRequest netReq(QUrl(req.request()));
+	netReq.setOriginatingObject(this);
+	previewReply_=networkPreview_->get(netReq);*/
+}
+
+void MvQWcsUiClient::downloadLegend()
+{
+	/*if(!style_->currentLegend().isEmpty())	
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load legend");
+		log->request(style_->currentLegend().toStdString());
+		log->status("In progress");
+		emit logUpdated();
+
+		emit statusMessage(tr("Load legend ..."));
+
+		QNetworkRequest netReq(QUrl(style_->currentLegend()));
+		netReq.setOriginatingObject(this);
+		legendReply_=networkLegend_->get(netReq);
+	}
+	else
+	{
+		emit legendLoaded(QString());
+	}*/
+}
+
+void MvQWcsUiClient::setGetCovRequest(QString r)
+{
+	if(clientMode_==BasicMode)
+	{
+		//getCovRequest_->editRequest(r);
+		emit getCovRequestChanged(getCovRequest_->request());
+	}
+}
+
+void MvQWcsUiClient::slotSaveInfo()
+{
+	// Get info
+	MvRequest r("WCSCLIENT");
+     	
+	r("SERVER") = url_.toStdString().c_str();
+	r("VERSION") = version_.toStdString().c_str();
+	r("REQUEST") = getCovRequest_->request().toStdString().c_str();
+	r("TIME_DIMENSIONS") = 	timeDimName().join("/").toStdString().c_str();
+
+	//	reqInfo_("SERVICE") = 1;
+	if(clientMode_ == BasicMode)
+	{
+		r("MODE") = "EXPERT";
+	}
+	else
+	{
+		r("MODE") = "INTERACTIVE";
+	}
+
+   	r("EXTRA_GETCAP_PAR") = extraGetCapPar_.toStdString().c_str();
+	r("EXTRA_GETMAP_PAR") = extraGetCovPar_.toStdString().c_str();
+
+	r("HTTP_USER") = httpUser_.toStdString().c_str();
+	r("HTTP_PASSWORD") = httpPassword_.toStdString().c_str();
+
+	r("LAYER_DESCRIPTION") = layerAbstract_.toStdString().c_str();
+	//r("SERVICE_TITLE") =  serviceTitle_.toStdString().c_str();
+
+
+	qDebug() << version_;
+	qDebug() << url_;
+
+	r.print();
+
+	// Save info request
+	r.save(iconFile_.toStdString().c_str());
+}
+
+
+void MvQWcsUiClient::slotAuthentication(QNetworkReply *reply,QAuthenticator *auth)
+{
+	auth->setUser("reading");
+	auth->setPassword("metview");
+
+	//auth->setUser(httpUser_);
+	//auth->setPassword(httpPassword_);
+}
+
+void MvQWcsUiClient::slotReplyGetCap(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load GetCapabilities");
+	
+	if(reply->error() != QNetworkReply::NoError)
+	{	
+		log->error(reply->errorString().toStdString() + "\n");			
+		emit getCapLoaded();
+		emit logUpdated();
+		emit statusMessage(tr("Load GetCapabilities <font color=red>(FAILED)</font>"));
+		 //QApplication::exit();
+	}
+	else
+	{			
+		QByteArray ba=reply->readAll();		
+
+		QString eMsg;
+		if(!mimeType.contains("application/vnd.ogc.wcs_xml"))  
+		  //&& mimeType == "application/vnd.ogc.se_xml")
+		{
+			readException(ba,eMsg);
+		}
+
+		if(!eMsg.isEmpty())
+		{			
+			capability_.clear();
+			log->error(eMsg.toStdString() + "\n");
+			emit getCapLoaded();
+			emit logUpdated();
+			emit statusMessage(tr("Load GetCapabilities <font color=red>(FAILED)</font>"));
+		}
+
+		capability_ = QString(ba);
+		repliedVersion_=readVersion();			
+		readService();
+		readContents();
+		//readCoverageOfferingBrief();
+		//readFormat();			
+		//readLayer();
+
+		updateAfterGetCapLoaded();			
+			
+		emit getCapLoaded();
+		emit logUpdated();
+		emit statusMessage(tr("Load GetCapabilities <font color=green>(OK)</font>"));
+	}
+
+	reply->deleteLater();
+	getCapReply_=0;	
+
+}
+
+void MvQWcsUiClient::updateAfterGetCapLoaded()
+{
+	QString val;
+
+	if(lastGetCovRequest_->request().isEmpty())
+	{
+		return;
+	}
+
+	val=lastGetCovRequest_->item(width_->requestName());
+	width_->setValue(val.toInt());
+
+	val=lastGetCovRequest_->item(height_->requestName());
+	height_->setValue(val.toInt());
+
+	val=lastGetCovRequest_->item(transparent_->requestName());
+	transparent_->setCurrentValue(val);
+
+	val=lastGetCovRequest_->item(format_->requestName());
+	format_->setCurrentValue(val);
+
+	val=lastGetCovRequest_->item(layer_->requestName());
+	layer_->setCurrentValue(val);
+
+	updateAfterLayerLoaded();
+}
+
+void MvQWcsUiClient::updateAfterLayerLoaded()
+{
+	//lastGetCovRequest_->setRequest(getCovRequest_->request());
+
+	QString val;
+
+	//readLayerAbstract();
+	readStyle();
+	readCrs();
+	readBoundingBox();
+	readGeographicBoundingBox();
+	readDimension();
+
+	val=lastGetCovRequest_->item(style_->requestName());
+	style_->setCurrentValue(val);
+
+	val=lastGetCovRequest_->item(crs_->requestName());
+	crs_->setCurrentValue(val);
+
+	updatRequestBoundingBox();
+	
+	foreach(MvQOgcDimension* dim,dimension_)
+	{
+		val=lastGetCovRequest_->item(dim->requestName());
+		dim->setCurrentValues(val);
+	}
+
+	buildGetCovRequest();
+
+	qDebug() << lastGetCovRequest_->request() << "\n" << getCovRequest_->request();
+}
+
+void MvQWcsUiClient::slotReplyDescribeCov(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	qDebug() << url.toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load DescribeCoverage");
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		log->error(reply->errorString().toStdString() + "\n");	
+		//emit previewLoaded(QString());
+		emit statusMessage(tr("Load DescribeCoverage <font color=red>(FAILED)</font>"));		
+		
+	}
+	else
+	{	
+		QByteArray ba=reply->readAll();		
+
+		QString eMsg;
+		if(!mimeType.contains("application/vnd.ogc.wcs_xml"))  
+		  //&& mimeType == "application/vnd.ogc.se_xml")
+		{
+			readException(ba,eMsg);
+		}
+
+		if(!eMsg.isEmpty())
+		{			
+			//capability_.clear();
+			log->error(eMsg.toStdString() + "\n");
+			//emit getCapLoaded();
+			emit logUpdated();
+			emit statusMessage(tr("Load DescribeCoverage <font color=red>(FAILED)</font>"));
+		}
+
+		QString s(ba);
+		qDebug() << s;
+
+		describeCov_ = QString(ba);
+		//repliedVersion_=readVersion();			
+		//readService();
+		readCoverageOfferings();
+		//readCoverageOfferingBrief();
+		//readFormat();			
+		//readLayer();
+
+		//updateAfterGetCapLoaded();			
+			
+		emit describeCovLoaded();
+		emit logUpdated();
+		emit statusMessage(tr("Load DescribeCoverage <font color=green>(OK)</font>"));
+
+	}
+
+	emit logUpdated();
+
+	reply->deleteLater();
+	describeCovReply_=0;
+}
+
+void MvQWcsUiClient::slotReplyGetCov(QNetworkReply* reply)
+{
+/*	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load legend");
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		log->error(reply->errorString().toStdString() + "\n");	
+		emit legendLoaded(QString());
+		emit statusMessage(tr("Load legend <font color=red>(FAILED)</font>"));				
+	}
+	else
+	{	
+		QString outFile=legendFile_;
+		QByteArray ba=reply->readAll();
+
+		if(mimeType.isEmpty())
+			mimeType=getMimeType(ba);
+
+		qDebug() << "mime" << mimeType << getRequestedMimeType(url.toString());
+
+		//If exception is returned ot mime type is 
+		//different ot what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml")) //||
+		//   mimeType != getRequestedMimeType(url.toString()))		
+		{
+			QString eMsg;
+			readException(ba,eMsg);
+
+			log->error(eMsg.toStdString() + "\n");
+			emit legendLoaded(QString());
+			emit statusMessage(tr("Load legend <font color=red>(FAILED)</font>"));
+		}
+		else
+		{
+			QFile out(outFile);
+			out.open(QIODevice::WriteOnly);
+			out.write(ba);
+			out.close();
+
+			emit legendLoaded(outFile);
+			emit statusMessage(tr("Load legend <font color=green>(OK)</font>"));
+		}
+	}
+
+	emit logUpdated();
+
+	reply->deleteLater();
+	legendReply_=0;*/
+}
+
+
+
+void MvQWcsUiClient::slotAbortDownloadProcess()
+{
+	if(getCapReply_ && getCapReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load GetCapabalitites");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load GetCapabilitites <font color=red>(Interrupted)</font>"));
+
+		getCapReply_->deleteLater();
+		getCapReply_=0;
+		emit getCapLoaded();
+		emit logUpdated();
+	}
+	/*else if(previewReply_ && previewReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load Preview");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load preview <font color=red>(Interrupted)</font>"));
+
+		previewReply_->deleteLater();
+		previewReply_=0;
+		clearPreview();
+		emit previewLoaded(previewFile_);
+		emit logUpdated();
+	}
+	else if(legendReply_ && legendReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load Legend");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load legend <font color=red>(Interrupted)</font>"));
+
+		legendReply_->deleteLater();
+		legendReply_=0;
+		clearLegend();
+		emit legendLoaded(legendFile_);
+		emit logUpdated();
+	}*/
+
+}
+
+QString MvQWcsUiClient::readVersion()
+{
+	QString result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	defaultNsDeclaration_="declare default element namespace \"http://www.opengis.net/wcs\";";
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//WCS_Capabilities/data(@version)");
+	query.evaluateTo(&result);
+
+	if(result.simplified().isEmpty())
+	{
+		query.setQuery("doc($myDoc)//WMT_MS_Capabilities/data(@version)");
+		query.evaluateTo(&result);
+		defaultNsDeclaration_.clear();
+	}
+
+#if 0
+	defaultNsDeclaration_="declare default element namespace \"http://www.opengis.net/wcs/1.1\"; declare namespace ows=\"http://www.opengis.net/ows/1.1\";";
+
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Capabilities/data(@version)");
+	query.evaluateTo(&result);
+	result.simplified();
+#endif
+
+	buffer.close();
+
+	qDebug() << "Version ---> ";
+	qDebug() << "\t" << result;
+	
+	//Remove linebreak!!
+
+	return result.simplified();
+}
+
+void MvQWcsUiClient::readService()
+{
+	serviceMeta_.clear();
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	//query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Service/data(Title)");
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Service");
+	query.evaluateTo(&result);
+
+	//serviceTitle_=result.simplified();	
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			query.setFocus(item);
+
+			QString str;
+
+		
+			QStringList tags;
+			tags << "name" << "description" << "label" << 
+				"fees" << "accessConstraints";
+
+			foreach(QString t, tags)
+			{
+				str.clear();
+				QString q=defaultNsDeclaration_ + ".//data(" + t +")";	
+				query.setQuery(q);
+				query.evaluateTo(&str);
+				serviceMeta_[t] = str.simplified();
+			}
+
+			break;
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "readService -->" << serviceMeta_;
+	//Remove linebreak!!
+}
+
+void MvQWcsUiClient::readContents()
+{
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Contents/CoverageSummary");
+	query.evaluateTo(&result);					    
+
+	QXmlItem item(result.next());
+     	QStringList nameLst,titleLst,abstractLst,legendLst;
+	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QString txt, name,title,abstract,legend;
+
+			MvQOgcElem *elem=new MvQOgcElem;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name
+			query.setQuery(defaultNsDeclaration_ + "./data(ows:Title)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("Title",txt.simplified());
+			qDebug() << "Title" << txt;
+			txt.clear();
+			
+			//label
+			query.setQuery(defaultNsDeclaration_ + "./data(Abstract)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("Abstract",txt.simplified());
+			txt.clear();
+
+			//desc
+			query.setQuery(defaultNsDeclaration_ + "./data(Identifier)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("Identifier",txt.simplified());
+			txt.clear();
+			
+			covOffer_ << elem;
+
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "Style ---> ";
+	qDebug() << "\t" << titleLst;
+}
+
+
+
+void MvQWcsUiClient::readCoverageOfferingBrief()
+{
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//ContentMetadata/CoverageOfferingBrief");
+	query.evaluateTo(&result);					    
+
+	QXmlItem item(result.next());
+     	QStringList nameLst,titleLst,abstractLst,legendLst;
+	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QString txt, name,title,abstract,legend;
+
+			MvQOgcElem *elem=new MvQOgcElem;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name
+			query.setQuery(defaultNsDeclaration_ + xlinkNsDeclaration_ + "./data(name)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("name",txt.simplified());
+			txt.clear();
+			
+			//label
+			query.setQuery(defaultNsDeclaration_ + "./data(label)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("label",txt.simplified());
+			txt.clear();
+
+			//desc
+			query.setQuery(defaultNsDeclaration_ + "./data(description)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("description",txt.simplified());
+			txt.clear();
+			
+			covOffer_ << elem;
+
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "Style ---> ";
+	qDebug() << "\t" << titleLst;
+}
+	
+void MvQWcsUiClient::readCoverageOfferings()
+{
+	QXmlResultItems result;
+
+	QByteArray ba=describeCov_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//CoverageDescription/CoverageOffering");
+	query.evaluateTo(&result);					    
+
+	QXmlItem item(result.next());
+     	QStringList nameLst,titleLst,abstractLst,legendLst;
+	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QString txt, name,title,abstract,legend;
+
+			MvQOgcElem *elem=new MvQOgcElem;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name
+			query.setQuery(defaultNsDeclaration_ + xlinkNsDeclaration_ + "./data(name)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("name",txt.simplified());
+			
+			qDebug() << "coverageOffer name" << txt;
+
+			txt.clear();
+			
+			//label
+			query.setQuery(defaultNsDeclaration_ + "./data(label)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("label",txt.simplified());
+			txt.clear();
+
+			//desc
+			query.setQuery(defaultNsDeclaration_ + "./data(description)");
+			query.evaluateTo(&txt);
+			elem->addAttribute("description",txt.simplified());
+			txt.clear();
+			
+			//covOffer_ << elem;
+
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "Style ---> ";
+	qDebug() << "\t" << titleLst;
+}
+
+	
+void MvQWcsUiClient::readFormat()
+{
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+
+	if(repliedVersion_ > "1.0")
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//CoverageCapability/Request/GetCov/data(Format)");
+	}
+	else
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Capability/Request/Map/data(Format)");
+	}
+
+	query.evaluateTo(&result);
+
+	QStringList lst;
+     	query.getAtomicValues(result,lst);
+	lst.sort();
+	format_->setValues(lst);
+	format_->setDisplayValues(lst);
+		
+	buffer.close();
+
+	qDebug() << "Formats ---> ";
+	qDebug() << "\t" << lst;
+}
+
+void MvQWcsUiClient::readLayer()
+{
+	//Dom
+	QDomDocument doc("mydocument");
+ 	
+ 	if (!doc.setContent(capability_)) 
+	{
+     		return;
+ 	}
+
+	QDomElement docElem = doc.documentElement();
+	readLayer(docElem,layer_->root());
+
+	qDebug() << "Layers ---> ";
+}
+
+void MvQWcsUiClient::readLayer(QDomElement &docElem,MvQOgcNode *parent)
+{	
+	QDomNode dNode = docElem.firstChild();
+ 	while(!dNode.isNull()) 
+	{
+		QDomElement dElem = dNode.toElement();
+		if(!dElem.isNull())
+		{
+			if(dElem.tagName() =="Layer")
+			{
+				MvQOgcNode *layer=new MvQOgcNode;
+
+				QDomNode title=dNode.namedItem("Title");
+				if(!title.isNull())
+				{
+					qDebug() << title.toElement().text();
+					layer->setDisplayValue(title.toElement().text());
+				}
+				
+				QDomNode name=dNode.namedItem("Name");
+				if(!name.isNull())
+				{
+					layer->setValue(name.toElement().text());
+				} 
+
+				QDomNode desc=dNode.namedItem("Abstract");
+				if(!desc.isNull())
+				{
+					layer->setDescription(desc.toElement().text());
+				} 
+
+				parent->addChild(layer);
+				readLayer(dElem,layer);
+			}
+			else
+			{									
+				readLayer(dElem,parent);
+			}
+		}
+
+		dNode = dNode.nextSibling();
+	}
+}
+
+
+void MvQWcsUiClient::readStyle()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/Style");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	QStringList nameLst,titleLst,abstractLst,legendLst;
+	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QString name,title,abstract,legend;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name
+			query.setQuery(defaultNsDeclaration_ + "./data(Name)");
+			query.evaluateTo(&name);
+			nameLst << name.simplified();
+
+			//Title
+			query.setQuery(defaultNsDeclaration_ + "./data(Title)");
+			query.evaluateTo(&title);
+			titleLst << title.simplified();
+
+			//Abstract
+			query.setQuery(defaultNsDeclaration_ + "./data(Abstract)");
+			query.evaluateTo(&abstract);
+			abstractLst << abstract.simplified();
+
+			//Legend url
+			query.setQuery(defaultNsDeclaration_ + xlinkNsDeclaration_ + "string(./LegendURL/OnlineResource/@xlink:href)");
+			query.evaluateTo(&legend);
+			legendLst << legend.simplified();
+
+			style_->setValues(nameLst);
+			style_->setDisplayValues(titleLst);
+			style_->setDescriptions(abstractLst);
+			style_->setLegends(legendLst);
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "Style ---> ";
+	qDebug() << "\t" << titleLst;
+}
+
+void MvQWcsUiClient::readCrs()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	//query.bindVariable("myCrsName", QVariant(crsRequestName()));	
+	if(crsRequestName() == "SRS")
+	{
+		query.setQuery("doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/data(SRS)");
+	}
+	else
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/data(CRS)");
+	}
+
+	query.evaluateTo(&result);
+
+	QStringList lst;
+	query.getAtomicValues(result,lst);
+	lst.removeDuplicates();
+	lst.sort();	
+	crs_->setValues(lst);
+	crs_->setRequestName(crsRequestName());
+	crs_->setDisplayName(crsDisplayName());
+
+	buffer.close();
+
+	qDebug() << "CRS ---> ";
+	qDebug() << "\t" << lst;
+}	
+
+void MvQWcsUiClient::readBoundingBox()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/BoundingBox");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QMap<QString,QString> att;
+			query.getAttributes(item,att);
+
+			MvQOgcBoundingBox *bb=new MvQOgcBoundingBox(att);			
+			bbox_.push_back(bb);
+
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+}	
+
+
+
+void MvQWcsUiClient::readGeographicBoundingBox()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QStringList str;
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+
+	if(repliedVersion_ >= "1.3.0")
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/EX_GeographicBoundingBox");
+	}
+	else
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/LatLonBoundingBox");
+	}
+
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QMap<QString,QString> att;
+			query.getAttributes(item,att);
+
+			if(geographicBbox_)
+			{	
+				delete geographicBbox_;
+			}
+			geographicBbox_=new MvQOgcGeoBoundingBox(att); //new MvQXmlElementNode(query,item);
+			break;
+                 }
+		item = result.next();
+         }
+
+}
+
+void MvQWcsUiClient::readDimension()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/Dimension");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QMap<QString,QString> att;
+			QString value;
+
+			query.getAttributes(item,att);
+			query.getAtomicValue(item,value);
+
+			MvQOgcDimension *dim=new MvQOgcDimension(att,value);
+
+			if(dim->name().compare("time",Qt::CaseInsensitive) == 0)
+			{
+				dim->setRequestName("TIME");
+				dim->setDisplayName("Time:");
+			}
+			else if(dim->name().compare("elevation",Qt::CaseInsensitive) == 0)
+			{
+				dim->setRequestName("ELEVATION");
+				dim->setDisplayName("Elevation:");
+			}
+			else
+			{
+				QString dname=dim->name();
+				dname=dname.toUpper();
+				dname="DIM_" + dname;
+				dim->setRequestName(dname);
+				dname+=" :";
+				dim->setDisplayName(dname);
+			}
+			
+			dimension_.push_back(dim);
+                 }
+		item = result.next();
+         }
+
+	if(repliedVersion_ >= "1.3.0")
+	 	return;
+
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[Name = $myLayer]/ancestor-or-self::*/Extent");
+	query.evaluateTo(&result);
+
+	item=result.next();
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QMap<QString,QString> att;
+			QString value;
+
+			query.getAttributes(item,att);
+			query.getAtomicValue(item,value);
+
+			//MvQXmlElementNode *elem=new MvQXmlElementNode(query,item);
+			foreach(MvQOgcDimension* dim, dimension_)
+			{
+				if(dim->name() == att["name"])
+				{
+					dim->setAttributes(att);
+					dim->setValues(value);
+					break;
+				}
+			}
+                 }
+		item = result.next();
+         }
+}
+ 
+void MvQWcsUiClient::readException(QByteArray ba,QString &msg)
+{
+	//if(xmlMsg.isEmpty())
+	//	return;
+
+	QXmlResultItems result;
+
+	//QByteArray ba=xmlMsg.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	//query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery("doc($myDoc)//ServiceExceptionReport/ServiceException");
+							  
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			msg += "Exception: ";
+
+			QMap<QString,QString> att;
+			QString value;
+	
+			query.getAttributes(item,att);
+			query.getAtomicValue(item,value);
+			msg +=att["code"].simplified() + "\n";
+			
+			if(!value.isEmpty())
+			{
+				msg += value;
+				msg +='\n';
+			}
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();	
+
+}
+
+void MvQWcsUiClient::buildGetCovRequest()
+{	
+	if(layer_->currentValue().isEmpty()) 
+		return;
+
+	getCovRequest_->clear();
+
+	QString s;
+	QString str=url_;
+	str+="?SERVICE=WCS";
+	
+	//Version
+	/*if(version_ != "Default")
+	{
+		str+="&VERSION=";
+		str+=version_;
+	}*/
+
+	str+="&VERSION=";
+	str+=repliedVersion_;
+
+	//Request
+	str+="&REQUEST=GetMap";
+	
+	//Layers	
+	str+="&" + layer_->requestName() + "=" +  layer_->currentValue();
+
+	//Style	
+	str+="&" + style_->requestName() + "="  + style_->currentValue();
+	
+	//srs or crs
+	str+="&" + crs_->requestName() + "=" +  crs_->currentValue();
+	
+	//bbox	
+	str+="&BBOX=" + 
+		requestBbox_->minX() + "," +
+		requestBbox_->minY() + "," +
+		requestBbox_->maxX() + "," +
+		requestBbox_->maxY();
+
+	//width
+	str+="&WIDTH=" + QString::number(width_->value());
+	str+="&HEIGHT=" + QString::number(height_->value());
+	
+	//Format	
+	str+="&" + format_->requestName() + "=" +  format_->currentValue();
+
+	//Transparent	
+	str+="&" + transparent_->requestName() + "=" +  transparent_->currentValue();
+
+	//Dimensions (except time)
+	MvQOgcDimension *dimTime=0;
+	foreach(MvQOgcDimension *dim,dimension_)
+	{
+	   	//if(dim->requestName() != "TIME")
+		//{
+			str+="&";
+	   		str+=dim->requestName();
+	   		str+="=";
+	   		str+=dim->currentValues();
+		//}
+		//else
+		//{
+		//	dimTime=dim;
+		//}
+	}   
+	
+	//Time dimension
+	/*if(dimTime)
+	{
+		str+="&TIME=";
+		foreach(QString s, dimTime->currentValues())
+		{
+			str+=s + "/";
+		}
+		//remove the last ","
+		str=str.remove(str.size()-1,1);
+		
+	}*/
+	qDebug() << str;
+
+	if(!extraGetCovPar_.isEmpty())
+	{
+		str+="&" + extraGetCovPar_;
+	}
+
+	//!!!!!!!!!
+	getCovRequest_->setRequest(str);
+
+	currentGetCovRequest_=getCovRequest_;
+
+	//qDebug() << getMapRequest_->requestStep();
+
+	//str+="&stream=false";
+
+	//getMapRequest_=str;
+
+	//saveGetMapRequest(currentGetMapRequest_);
+
+	emit getCovRequestChanged(getCovRequest_->request());
+}
+
+
+//===========================================
+//
+// Get/Set methods
+//
+//===========================================
+
+//Format
+QStringList MvQWcsUiClient::formatDisplayValues() const
+{
+	return format_->displayValues();
+}
+
+QString MvQWcsUiClient::formatCurrentDisplayValue() const
+{
+	return format_->currentDisplayValue();
+}
+
+void  MvQWcsUiClient::slotSetFormatFromDpy(QString value)
+{
+	if(format_->currentDisplayValue() != value)
+	{
+		format_->setCurrentDisplayValue(value);
+		buildGetCovRequest();
+	}
+}
+
+//Transparent
+QStringList MvQWcsUiClient::transparentDisplayValues() const
+{
+	return transparent_->displayValues();
+}
+
+QString MvQWcsUiClient::transparentCurrentDisplayValue() const
+{
+	return transparent_->currentDisplayValue();
+}
+
+void  MvQWcsUiClient::setTransparentCurrentDisplayValue(QString value)
+{
+	if(transparent_->currentDisplayValue() != value)
+	{
+		transparent_->setCurrentDisplayValue(value);
+		buildGetCovRequest();
+	}
+}
+
+//Width
+QString MvQWcsUiClient::width() const
+{
+	return QString::number(width_->value());
+}
+
+void  MvQWcsUiClient::setWidth(QString value)
+{
+	if(width_->value() != value.toInt())
+	{
+		width_->setValue(value.toInt());
+		buildGetCovRequest();
+	}
+}
+
+//Height
+QString MvQWcsUiClient::height() const
+{
+	return QString::number(height_->value());
+}
+
+void  MvQWcsUiClient::setHeight(QString value)
+{
+	if(height_->value() != value.toInt())
+	{
+		height_->setValue(value.toInt());
+		buildGetCovRequest();
+	}
+}
+
+//Extra par
+void  MvQWcsUiClient::setExtraGetCapPar(QString value)
+{
+	if(extraGetCapPar_ != value)
+	{
+		extraGetCapPar_=value;  
+	}
+}
+
+void  MvQWcsUiClient::setExtraGetCovPar(QString value)
+{
+	if(extraGetCovPar_ != value)
+	{
+		extraGetCovPar_=value;  
+		buildGetCovRequest();
+	}
+}
+
+//Style
+QStringList MvQWcsUiClient::styleDisplayValues() const
+{
+	return style_->displayValues();
+}
+
+QStringList MvQWcsUiClient::styleDescriptions() const
+{
+	return style_->descriptions();	
+}
+
+int MvQWcsUiClient::styleCurrentIndex() const
+{
+	return style_->currentIndex();
+}
+
+void MvQWcsUiClient::setStyleCurrentIndex(int index)
+{
+	if(style_->currentIndex() != index)
+	{
+		style_->setCurrentIndex(index);
+		buildGetCovRequest();
+	}
+}
+
+
+//CRS
+QStringList MvQWcsUiClient::crsDisplayValues() const
+{
+	return crs_->displayValues();
+}
+
+QString MvQWcsUiClient::crsCurrentDisplayValue() const
+{
+	return crs_->currentDisplayValue();
+}
+
+void  MvQWcsUiClient::setCrsCurrentDisplayValue(QString value)
+{
+	if(crs_->currentDisplayValue() != value)
+	{
+		crs_->setCurrentDisplayValue(value);
+		updatRequestBoundingBox();
+		buildGetCovRequest();
+	}
+}
+
+//Layer
+int MvQWcsUiClient::layerCurrentIndex()
+{
+	return 0;
+	//return layer_->values().indexOf(layer_->currentValue());
+}
+
+QStringList MvQWcsUiClient::layerDisplayValues() const
+{
+	return QStringList();
+	//return layer_->displayValues();
+}
+
+QStringList MvQWcsUiClient::layerDescriptions() const
+{
+	return QStringList();
+	//qDebug() << layer_->descriptions();
+	//return layer_->descriptions();	
+}
+
+void MvQWcsUiClient::setLayerFromDpy(MvQOgcNode* node)
+{
+	clearLayerDependentData();
+
+	layer_->setCurrentNode(node);
+
+	lastGetCovRequest_->setRequest(getCovRequest_->request());
+
+	updateAfterLayerLoaded();	
+}
+
+
+//BBOX
+void MvQWcsUiClient::setBoundingBoxFromDpy(QString minX,QString maxX, QString minY, QString maxY)
+{
+	requestBbox_->setArea(minX,maxX,minY,maxY);
+	buildGetCovRequest();	
+}	
+
+MvQOgcBoundingBox MvQWcsUiClient::lastBoundingBox() const
+{
+	QString lastValue=lastGetCovRequest_->item("BBOX");
+	QStringList lst=lastValue.split(",");
+	MvQOgcBoundingBox bb;
+	if(lst.count() == 4)
+	{
+		bb.setArea(lst[0],lst[2],lst[1],lst[3]);
+	}
+	return bb;
+}
+
+MvQOgcBoundingBox* MvQWcsUiClient::currentBoundingBox() const
+{
+	qDebug() << crs_->currentValue();
+
+	for(int i=bbox_.count()-1; i >=0; i--)
+	{
+		if(bbox_[i]->crs() == crs_->currentValue())
+		{
+			return bbox_[i]; 
+		}
+	}
+	
+	return 0;
+}
+
+//Dimensions
+QStringList MvQWcsUiClient::dimensionNameToDpy() const
+{
+	QStringList lst;
+	/*foreach(MvQOgcDimensionList *dim,dimension_)
+	{
+	    lst << dim->displayName();
+	}*/
+
+	return lst;
+}
+
+QStringList MvQWcsUiClient::dimensionToDpy(QString dimDpyName) const
+{
+	/*foreach(MvQOgcDimensionList *dim,dimension_)
+	{
+	    if(dim->displayName() == dimDpyName)
+	    {
+		return dim->displayValues();
+	    }
+	}*/
+
+	return QStringList();
+}
+
+void MvQWcsUiClient::setDimensionFromDpy(QString dimDpyName, QString val)
+{
+	foreach(MvQOgcDimension *dim,dimension_)
+	{
+	    if(dim->displayName() == dimDpyName)
+	    {
+		//dim->setCurrentDisplayValue(val);
+		dim->setCurrentValues(val);
+		buildGetCovRequest();
+		return;
+	    }
+	}
+}	
+
+void MvQWcsUiClient::setDimensionFromDpy(QString dimDpyName, QStringList val)
+{
+	/*foreach(MvQOgcDimensionList *dim,dimension_)
+	{
+	    if(dim->displayName() == dimDpyName)
+	    {
+		//dim->setCurrentDisplayValues(val);
+		setCurrentValues(val);
+		buildGetMapRequest();
+		return;
+	    }
+	}*/
+}	
+
+QString MvQWcsUiClient::crsQueryName()
+{
+	if(repliedVersion_ < QString("1.3.0"))
+	{
+		return QString("SRS");
+	}
+	else
+	{
+		return QString("CRS");
+	}
+}
+
+QString MvQWcsUiClient::crsRequestName()
+{
+	if(repliedVersion_ < QString("1.3.0"))
+	{
+		return QString("SRS");
+	}
+	else
+	{
+		return QString("CRS");
+	}
+}
+
+QString MvQWcsUiClient::crsDisplayName()
+{
+	if(repliedVersion_ < QString("1.3.0"))
+	{
+		return QString("SRS:");
+	}
+	else
+	{
+		return QString("CRS:");
+	}
+}
+
+QStringList  MvQWcsUiClient::timeDimName()
+{
+	QStringList timeDimName;
+
+	foreach(MvQOgcDimension *dim,dimension_)
+	{
+		if(dim->isTime())
+		{
+			timeDimName << dim->requestName();
+		}
+	}
+	return timeDimName;
+}
+
+void MvQWcsUiClient::clearPreview()
+{
+	//if(previewFile_ != emptyFileNameString_)
+	//{
+		QFile f(previewFile_);
+
+		if(!f.remove())
+		{
+			//qDebug() << "MvQZoomStackLevel::clearPreview() ---> Preview file" << imgFileName_ << "could not be deleted!";
+		}
+		//previewFile_ = emptyFileNameString_;
+	//}
+}
+
+void MvQWcsUiClient::clearLegend()
+{
+	//if(previewFile_ != emptyFileNameString_)
+	//{
+		QFile f(legendFile_);
+
+		if(!f.remove())
+		{
+			//qDebug() << "MvQZoomStackLevel::clearPreview() ---> Preview file" << imgFileName_ << "could not be deleted!";
+		}
+		//previewFile_ = emptyFileNameString_;
+	//}
+}
+
+void MvQWcsUiClient::updatRequestBoundingBox()
+{
+	requestBbox_->clear();
+	bool foundBb=false;
+
+	//Check if bbox is available for the current crs. 
+	//It is obligatory from 1.3.0 !!!
+	foreach(MvQOgcBoundingBox* bb,bbox_)
+	{
+		if(bb->crs() == crs_->currentValue())
+		{
+			foundBb=true;
+			requestBbox_->setArea(bb->minX(),bb->maxX(),bb->minY(),bb->maxY());
+			break;
+		}
+	}
+	
+	//Else for older versions lat-lon we try to use the geographic bounding box 
+	if(!foundBb &&repliedVersion_ < "1.3.0" && 
+	   crs_->currentValue() == "EPSG:4326" && geographicBbox_ !=0)
+	{		
+		requestBbox_->setArea(geographicBbox_->minX(),
+					geographicBbox_->maxX(),
+					geographicBbox_->minY(),
+					geographicBbox_->maxY());
+	}
+} 
+
+
+
diff --git a/src/OgcClient/MvQWcsClient.h b/src/OgcClient/MvQWcsClient.h
new file mode 100644
index 0000000..365b799
--- /dev/null
+++ b/src/OgcClient/MvQWcsClient.h
@@ -0,0 +1,290 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQWcsClient_H
+#define MvQWcsClient_H
+
+#include <QFile>
+#include <QMap>
+#include <QObject>
+#include <QStringList>
+
+#include "MvRequest.h"
+
+#include "MvQOgcParam.h"
+
+
+class QAuthenticator;
+class QDomElement;
+class QNetworkReply;
+
+class MvQNetworkAccessManager;
+class MvQGetCoverageRequest;
+
+class MvQWcsClientBase : public QObject
+{
+public:
+	virtual ~MvQWcsClientBase() {};
+	QStringList supportedMimeType() {return supportedMimeType_;}
+	QStringList supportedCrs() {return supportedCrs_;}
+
+protected:
+	MvQWcsClientBase();
+
+	QStringList supportedMimeType_;
+	QStringList supportedCrs_;
+
+	QString getMimeType(QByteArray);
+	QString getRequestedMimeType(QString);
+};
+
+
+class MvQWcsGetClient : public MvQWcsClientBase
+{
+	Q_OBJECT
+
+public:
+	MvQWcsGetClient(MvRequest&);
+	~MvQWcsGetClient();
+
+	MvQGetCoverageRequest* getCovRequest() {return getCovRequest_;}
+	void setGetCovRequest(QString);
+
+	QString outFile() {return outFile_;}
+	
+	void runGetCov();
+	bool getCovRunStatus() {return getCovRunStatus_;}
+
+public slots:	
+	void slotReplyGetCov(QNetworkReply*);
+
+protected:	
+	void downloadGetCov();
+		
+	MvQGetCoverageRequest* getCovRequest_;
+				
+	MvQNetworkAccessManager *networkGetCov_;
+	QNetworkReply *getCovReply_;
+	
+	MvRequest      reqInfo_;
+	QString        iconFile_;
+	QString        outFile_;
+	bool 	       getCovRunStatus_;
+
+}; 
+
+
+class MvQWcsUiClient : public MvQWcsClientBase
+{
+	Q_OBJECT
+
+public:
+	MvQWcsUiClient(string&,MvRequest&);
+	~MvQWcsUiClient();
+
+	enum ClientMode {BasicMode,AdvancedMode};
+
+	QString url() {return url_;}
+	void setUrl(const QString&,const QString version="Default");
+	QString version() {return version_;}
+	void setVersion(const QString&);
+	MvQGetCoverageRequest* getCovRequest() {return getCovRequest_;}
+	void setGetCovRequest(QString);
+
+	QString getCapDoc() {return capability_;}
+	QString describeCovDoc() {return describeCov_;}
+
+	QStringList outFiles() {return outFiles_;}
+
+	ClientMode clientMode() {return clientMode_;}
+	void setClientMode(ClientMode);
+
+	QStringList formatDisplayValues() const;
+	QString formatCurrentDisplayValue() const;
+
+	QStringList transparentDisplayValues() const;
+	QString transparentCurrentDisplayValue() const;
+	void setTransparentCurrentDisplayValue(QString);
+	
+	void setWidth(QString);
+	QString width() const;
+	void setHeight(QString);
+	QString height() const;
+
+	QStringList crsDisplayValues() const;
+	QString crsCurrentDisplayValue() const;
+	void setCrsCurrentDisplayValue(QString);
+
+	QStringList styleDisplayValues() const;
+	QStringList styleDescriptions() const;
+	int styleCurrentIndex() const;
+	void setStyleCurrentIndex(int);
+
+	void setLayerFromDpy(MvQOgcNode*);
+	QStringList layerDisplayValues() const;
+	QStringList layerDescriptions() const;
+	const QList<MvQOgcDimension*>& dimension() {return dimension_;}
+	QStringList dimensionNameToDpy() const;
+	QStringList dimensionToDpy(QString) const;
+	void setDimensionFromDpy(QString,QString);
+	void setDimensionFromDpy(QString,QStringList);
+	void setBoundingBoxFromDpy(QString,QString,QString, QString);
+	const MvQOgcBoundingBox *boundingBox() {return requestBbox_;}
+	MvQOgcBoundingBox lastBoundingBox() const;
+	MvQOgcBoundingBox* currentBoundingBox() const;
+
+	QString   extraGetCapPar() {return extraGetCapPar_;}
+	QString   extraGetCovPar() {return extraGetCovPar_;}
+	void 	  setExtraGetCapPar(QString);
+	void 	  setExtraGetCovPar(QString);
+
+	MvQOgcTree* layer() {return layer_;}
+	int layerCurrentIndex();
+	QString layerName() {return layer_->currentValue();}
+	QString layerTitle() {return layer_->currentDisplayValue();}
+	QString layerAbstract() {return layer_->currentDescription();}
+
+	QString serviceTitle() {return serviceTitle_;}
+
+	QString iconFile() {return iconFile_;}
+	void setFileNameInfo(string& name) {iconFile_ = QString::fromStdString(name);}
+	void setRequestInfo(MvRequest& req) {reqInfo_ = req;}
+
+	void downloadPreview();
+	void downloadLegend();
+
+	QList<MvQOgcElem*> covOffer() {return covOffer_;}
+
+	QMap<QString,QString>  serviceMetaData() {return serviceMeta_;}
+	
+public slots:
+	void slotReplyGetCap(QNetworkReply*);
+	void slotReplyDescribeCov(QNetworkReply*);
+	void slotReplyGetCov(QNetworkReply*);
+	//void slotReplyPreview(QNetworkReply*);
+	//void slotReplyLegend(QNetworkReply*);
+	void slotRunGetCap();
+        void slotRunDescribeCov();
+	//void slotRunGetCov();
+	void slotAbortDownloadProcess();
+	void slotSaveInfo();
+
+	void slotAuthentication(QNetworkReply *,QAuthenticator *);
+
+	void slotSetFormatFromDpy(QString);
+
+signals:
+	void getCapLoaded();
+	void getCovRequestChanged(QString); 
+	void describeCovLoaded();
+	//void previewLoaded(QString);
+	//void legendLoaded(QString);
+	void logUpdated();
+	void statusMessage(QString);
+
+protected:
+	void clearServerDependentData();
+	void clearLayerDependentData();
+	void clearDimension();
+	void clearBoundingBox();
+	void runGetCap();
+	void buildGetCovRequest();
+	void saveGetCovRequest(QMap<QString,QString> &);
+	void downloadGetMap();
+
+	QString readVersion();
+	void readService();
+	void readCoverageOfferingBrief();
+	void readCoverageOfferings();
+	void readContents();
+
+	void readFormat();
+	void readLayer();
+	void readLayer(QDomElement &,MvQOgcNode *);
+	//void readLayerAbstract();
+	void readStyle();
+	void readBoundingBox();
+	void readCrs();
+	void readDimension();
+	void readGeographicBoundingBox();
+	void readException(QByteArray,QString&);
+	void updatRequestBoundingBox();
+	QString crsQueryName();
+	QString crsDisplayName();
+	QString crsRequestName();
+
+	QStringList timeDimName();
+
+	void clearPreview();
+	void clearLegend();
+
+	void updateAfterGetCapLoaded();
+	void updateAfterLayerLoaded();
+
+	QString    url_;
+	QString    version_;
+	QString    repliedVersion_;
+	QString    capability_;
+	QString    describeCov_;
+	MvQGetCoverageRequest* getCovRequest_;
+	MvQGetCoverageRequest* currentGetCovRequest_;
+	MvQGetCoverageRequest* lastGetCovRequest_;
+	
+	//Global
+	QString serviceTitle_;
+	MvQOgcList*  format_;
+	MvQOgcList*  transparent_;
+	MvQOgcIntValue*  width_;
+	MvQOgcIntValue*  height_;
+	MvQOgcColourValue* bgColour_;
+
+	//Layer
+	MvQOgcTree*	   layer_;
+	QString 	   layerAbstract_;
+	MvQOgcCrsList*	   crs_;
+	MvQOgcStyleList*   style_;
+
+	MvQOgcBoundingBox* requestBbox_;
+	MvQOgcGeoBoundingBox* geographicBbox_;
+	QList<MvQOgcBoundingBox*>  bbox_;
+	QList<MvQOgcDimension*>   dimension_;	
+
+	MvQNetworkAccessManager *networkGetCap_;
+	MvQNetworkAccessManager *networkDescribeCov_;
+	MvQNetworkAccessManager *networkGetCov_;
+
+	QNetworkReply *getCapReply_;
+        QNetworkReply *describeCovReply_;
+	QNetworkReply *getCovReply_;
+	//QNetworkReply *previewReply_;
+	//QNetworkReply *legendReply_;
+
+	MvRequest      reqInfo_;
+	QString        iconFile_;
+	QStringList    outFiles_;
+
+	ClientMode     clientMode_;
+	QString defaultNsDeclaration_;
+	QString xlinkNsDeclaration_;
+	QString previewFile_;
+	QString legendFile_;
+
+	QString   extraGetCapPar_;
+	QString   extraGetCovPar_;
+
+	QString httpUser_;
+	QString httpPassword_; 
+
+	QMap<QString,QString> serviceMeta_;
+	QList<MvQOgcElem*> covOffer_; 
+
+	 QList<MvQOgcElem*> coverage_; 
+}; 
+
+#endif
diff --git a/src/OgcClient/MvQWcsClientEditor.cc b/src/OgcClient/MvQWcsClientEditor.cc
new file mode 100644
index 0000000..bb0bb01
--- /dev/null
+++ b/src/OgcClient/MvQWcsClientEditor.cc
@@ -0,0 +1,1463 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QBuffer>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QDebug>
+#include <QFile>
+#include <QGroupBox>
+#include <QLabel>
+#include <QListView>
+#include <QListWidgetItem>
+#include <QListWidget>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMovie>
+#include <QProgressBar>
+#include <QPushButton>
+#include <QScrollArea>
+#include <QSettings>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QStringListModel>
+#include <QTextBrowser>
+#include <QToolBar>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvQWcsClientEditor.h"
+
+#include "LogHandler.h"
+
+#include "MvQHighlighter.h"
+#include "MvQLogBrowser.h"
+#include "MvQOgcParam.h"
+#include "MvQOgcRequest.h"
+#include "MvQOgcTreeModel.h"
+#include "MvQTextEditSearchLine.h"
+#include "MvQWcsClient.h"
+
+//================================
+//
+// MvQWcsClientEditor
+//
+//================================
+
+MvQWcsClientEditor::MvQWcsClientEditor(MvQWcsUiClient *client, QWidget *parent) : MvQMainWindow(parent)
+{
+	//Window setup
+	QString iconName;
+	QStringList lst=client->iconFile().split("/");
+	if(lst.count()>0)
+	{
+		iconName=lst.last();
+	}
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	setAttribute(Qt::WA_DeleteOnClose);
+	setWindowTitle("Metview - WCS Client Editor- " + iconName);
+
+	client_ = client;
+
+	//ClientModeMap	
+	clientModeMap_["Plain"]=MvQWcsUiClient::BasicMode;
+	clientModeMap_["Interactive"]=MvQWcsUiClient::AdvancedMode;
+
+	//Main layout
+	mainLayout_=new QVBoxLayout;
+	QWidget *w=new QWidget;
+	w->setLayout(mainLayout_);
+	setCentralWidget(w);
+
+	//Main splitter
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+        mainSplitter_->setOpaqueResize(false);
+	mainLayout_->addWidget(mainSplitter_);	
+
+	//----------------------------------------------
+	// Request splitter  - upper part of main splitter
+	//----------------------------------------------
+
+	requestSplitter_= new QSplitter;
+        requestSplitter_->setOpaqueResize(false);
+	mainSplitter_->addWidget(requestSplitter_);	
+
+	//Request left layout
+	layerPanel_=new QWidget;
+	QVBoxLayout* requestLeftLayout=new QVBoxLayout;
+	layerPanel_->setLayout(requestLeftLayout);
+	requestSplitter_->addWidget(layerPanel_);
+
+	//Request right layout
+	layerInfoTab_=new QTabWidget;
+	requestSplitter_->addWidget(layerInfoTab_);
+	
+	requestSplitter_->setCollapsible(0,false);
+	requestSplitter_->setCollapsible(1,false);
+
+	//----------------------------------------------
+	// Log area - lower part of main splitter
+	//----------------------------------------------
+
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+
+	logPanel_=new QWidget;
+	logPanel_->setMinimumHeight(110);
+	logPanel_->setLayout(logLayout);
+
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);
+
+	//Label
+	QLabel *label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	hb->addWidget(label,1);
+
+	//Clear button
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	connect(clearPb,SIGNAL(clicked(bool)),
+		this,SLOT(slotClearLog(bool)));
+
+	mainSplitter_->addWidget(logPanel_);
+	mainSplitter_->setCollapsible(1,false);
+
+	//---------------------------------------
+	// Bottom part with buttons	
+	//---------------------------------------
+
+	//Buttons
+	hb=new QHBoxLayout;
+	mainLayout_->addLayout(hb);
+
+	QLabel *labelMode= new QLabel(tr("Mode:"),this);
+	clientModeCombo_ = new QComboBox(this);
+	clientModeCombo_->addItem("Plain");
+	clientModeCombo_->addItem("Interactive");
+	hb->addWidget(labelMode);
+	hb->addWidget(clientModeCombo_);
+	hb->addStretch(1);
+
+	if(client_->clientMode() ==MvQWcsUiClient::AdvancedMode)
+	{
+		clientModeCombo_->setCurrentIndex(1);
+	}
+	else
+	{
+		clientModeCombo_->setCurrentIndex(0);
+	}	
+
+	label=new QLabel(tr("Stay open"));
+	openCb_ = new QCheckBox;
+	openCb_->setCheckState(Qt::Unchecked);
+	hb->addWidget(openCb_);
+	hb->addWidget(label);
+
+	QPushButton *okPb = new QPushButton("Apply");
+	okPb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton)); 
+	hb->addWidget(okPb);
+
+	QPushButton *closePb = new QPushButton("Close");
+	closePb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogCloseButton)); 
+	hb->addWidget(closePb);
+
+	//-------------------
+	// Statusbar
+	//-------------------
+
+	/*loadLabel_ = new QLabel;
+	QMovie *movie = new QMovie(":/OgcClient/loader.gif", QByteArray(), loadLabel_);
+	loadLabel_->setMovie(movie);
+	statusBar()->addPermanentWidget(loadLabel_);
+	loadLabel_->hide();*/
+
+	loadProgress_=new QProgressBar;
+	//loadProgress_->setRange(0,0);
+	statusBar()->addPermanentWidget(loadProgress_);
+	loadProgress_->hide();
+	
+ 	statusMessageLabel_ = new QLabel("");
+    	//statusMessageLabel_->setTextInteractionFlags(Qt::TextSelectableByMouse);
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+	//messageLabel_->setMinimumSize(messageLabel_->sizeHint());
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+
+	//-------------
+	// Init
+	//-------------
+
+	//Menu and toolbar actions
+	setupControlsActions();
+	setupViewActions();
+
+	// Setup menus and toolbars
+	setupMenus(menuItems_);
+		
+	//Request panel
+	setupLayerPanel(requestLeftLayout);
+	setupLayerInfoTab();
+
+	dimensionNum_=0;
+
+	//Signals and slots
+	connect(okPb,SIGNAL(clicked()),
+		this,SLOT(slotSaveInfo()));
+
+	connect(openCb_,SIGNAL(stateChanged(int)),
+		this,SLOT(slotStayOpen(int)));
+
+	connect(closePb,SIGNAL(clicked()),
+		this,SLOT(close()));
+
+	connect(clientModeCombo_,SIGNAL(currentIndexChanged(QString)),
+		this,SLOT(slotClientModeChanged(QString)));
+
+	connect(client_,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+		
+	connect(client_,SIGNAL(getCapLoaded()),
+		this,SLOT(slotGetCapabilityLoaded()));
+
+	connect(client_,SIGNAL(describeCovLoaded()),
+		this,SLOT(slotDescribeCovLoaded()));
+
+	connect(client_,SIGNAL(logUpdated()),
+		this,SLOT(slotUpdateLogOutput()));
+
+
+	//Initialise the current mode --> call loadGetCapabilities
+	//This must come last!!!
+	initClientMode();
+
+	//
+	readSettings();
+}	
+
+MvQWcsClientEditor::~MvQWcsClientEditor()
+{	
+	writeSettings();
+}
+
+void MvQWcsClientEditor::setupControlsActions()
+{
+	//---------------------
+	// First toolbar row
+	//---------------------
+
+	actionCapability_ = new QAction(this);
+        actionCapability_->setObjectName(QString::fromUtf8("actionCapability"));
+	actionCapability_->setText(tr("&Load GetCapabilities"));
+	actionCapability_->setToolTip(tr("Load GetCapabilities"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/OgcClient/reload.png")), QIcon::Normal, QIcon::Off);
+ 	actionCapability_->setIcon(icon);	
+
+	actionStopLoad_ = new QAction(this);
+        actionStopLoad_->setObjectName(QString::fromUtf8("actionStopLoad"));
+	actionStopLoad_->setText(tr("&Stop load process"));
+	actionStopLoad_->setToolTip(tr("Stop load process"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/OgcClient/stop_load.png")), QIcon::Normal, QIcon::Off);
+ 	actionStopLoad_->setIcon(icon1);	
+
+	urlCombo_ = new QComboBox;
+	urlCombo_->setEditable(true);
+	urlCombo_->setMinimumContentsLength(20);
+	//urlCombo_->setMaxCount(20);
+	QSizePolicy p=urlCombo_->sizePolicy();
+	urlCombo_->setSizePolicy(QSizePolicy::Expanding,p.verticalPolicy()); 
+	urlCombo_->setInsertPolicy(QComboBox::InsertAtTop);
+
+	//Server version combo
+	QLabel *labelVersion= new QLabel(tr(" Version:"));
+	versionCombo_ = new QComboBox;
+	toolBarLabel_ << labelVersion;
+
+	QStringList lst;
+	lst << "Default" << "1.0.0" << "1.1" ;
+	versionCombo_->addItems(lst);
+	versionCombo_->setCurrentIndex(0);
+	
+	//---> Init
+	
+	//Init  url and version combos
+	if(!client_->url().isEmpty())
+	{	
+		urlCombo_->insertItem(0,client_->url());
+		urlCombo_->setCurrentIndex(0);
+	}
+
+	initVersionCombo();
+
+
+	//---> Signals and slots
+
+	connect(actionCapability_,SIGNAL(triggered()),
+		this,SLOT(slotRunGetCapabilities()));
+
+	connect(actionStopLoad_,SIGNAL(triggered()),
+		client_,SLOT(slotAbortDownloadProcess()));
+
+	connect(urlCombo_,SIGNAL(activated(QString)),
+		this,SLOT(slotSelectUrl(QString)));
+
+	connect(urlCombo_->lineEdit(),SIGNAL(editingFinished()),
+		this,SLOT(slotCheckUrlComboContents()));
+
+	connect(versionCombo_,SIGNAL(activated(QString)),
+		this,SLOT(slotSelectVersion(QString)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ToolsMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionCapability_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionStopLoad_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(urlCombo_,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(labelVersion,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(versionCombo_,MvQMenuItem::ToolBarTarget));
+
+	//---------------------
+	// Second toolbar row
+	//--------------------
+
+	QLabel *labelFormat= new QLabel(tr("Format:"));
+	formatCombo_= new QComboBox;
+	formatCombo_->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+	toolBarLabel_ << labelFormat;
+
+	//Extra getcap
+	QLabel *labelGetCap= new QLabel(tr(" Extra getCap param:"));
+	extraGetCapEdit_= new QLineEdit("");	
+	toolBarLabel_ << labelGetCap;
+
+	//Extra getcov
+	QLabel *labelGetCov= new QLabel(tr(" Extra getCov param:"));
+	extraGetCovEdit_= new QLineEdit("");	
+	toolBarLabel_ << labelGetCov;
+
+	QString mName="Format";
+
+	//Put this toolbar into another line!!!
+	//addToolBarBreak(Qt::TopToolBarArea);
+
+	menuType=MvQMainWindow::EditMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(labelFormat,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(formatCombo_,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(labelGetCap,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(extraGetCapEdit_,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(labelGetCov,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(extraGetCovEdit_,MvQMenuItem::ToolBarTarget));	
+
+
+	//These are independent from getCapabilities
+	initExtraParEdit();
+
+	connect(formatCombo_,SIGNAL(activated(QString)),
+		client_,SLOT(slotSetFormatFromDpy(QString)));
+
+	connect(extraGetCapEdit_,SIGNAL(textChanged(QString)),
+		this,SLOT(slotExtraGetCapChanged(QString)));
+
+	connect(extraGetCovEdit_,SIGNAL(textChanged(QString)),
+		this,SLOT(slotExtraGetCovChanged(QString)));
+}
+
+
+void MvQWcsClientEditor::setupViewActions()
+{
+	//
+	actionLog_ = new QAction(this);
+        actionLog_->setObjectName(QString::fromUtf8("actionLog"));
+	actionLog_->setText(tr("&Log"));
+	actionLog_->setCheckable(true);
+	actionLog_->setChecked(false);
+	actionLog_->setToolTip(tr("View log"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/examiner/log.png")), QIcon::Normal, QIcon::Off);
+ 	actionLog_->setIcon(icon1);	
+
+	logPanel_->hide();
+
+	//Define routines
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));
+}
+
+
+void MvQWcsClientEditor::setupLayerPanel(QVBoxLayout *layout)
+{
+	QLabel *label;
+	QVBoxLayout *vb;
+	QHBoxLayout *hb;
+	int row=0;
+
+	layerParamRowNum_=0;
+
+	//Tab
+	layerTab_=new QTabWidget;
+	layout->addWidget(layerTab_);
+
+
+	//layerSplitter_= new QSplitter;
+	//layerSplitter_->setOrientation(Qt::Vertical);
+        //layerSplitter_->setOpaqueResize(false);
+	//layout->addWidget(layerSplitter_);	
+
+	//--------------------------
+	// Layer tree
+	//--------------------------
+
+	layerTree_=new QTreeView;
+	layerTree_->setObjectName("WcsLayerTree");
+	layerTree_->setProperty("mvStyle",1);
+	layerTree_->setAlternatingRowColors(true);
+	//layerSplitter_->addWidget(layerTree_);
+
+	layerModel_=new MvQOgcTreeModel;
+	layerTree_->setModel(layerModel_);
+
+	connect(layerTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectLayer(QModelIndex)));
+
+	connect(layerTree_,SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotSelectLayer(QModelIndex)));
+
+	layerTab_->addTab(layerTree_,tr("Layer tree"));
+
+	//--------------------------
+	// Coverage offering list
+	//--------------------------
+
+	covOfferList_= new QListView;
+	covOfferList_->setObjectName("WcsCovOfferList");
+	covOfferList_->setProperty("mvStyle",1);
+	covOfferList_->setAlternatingRowColors(true);
+
+	covOfferModel_=new QStringListModel;
+	covOfferList_->setModel(covOfferModel_);
+
+	//connect(covOfferList_,SIGNAL(clicked(QModelIndex)),
+	//	this,SLOT(slotSelectLayer(QModelIndex)));
+
+	//connect(covOfferList_,SIGNAL(activated(QModelIndex)),
+	//	this,SLOT(slotSelectLayer(QModelIndex)));
+
+	layerTab_->addTab(covOfferList_,tr("Coverage Offer"));
+
+	
+
+	//-------------------
+	// Param gui
+	//-------------------
+
+	QScrollArea *scroll = new QScrollArea;
+	layerTab_->addTab(scroll,tr("Layer settings"));
+
+	QWidget *w=new QWidget;
+	layerGrid_= new QGridLayout;
+	layerGrid_->setSizeConstraint(QLayout::SetMinAndMaxSize);
+	w->setLayout(layerGrid_);
+
+	scroll->setWidgetResizable(true);
+	scroll->setWidget(w);
+
+	label= new QLabel("Styles:");
+	styleCombo_ = new QComboBox;
+	layerGrid_->addWidget(label, row, 0);
+	layerGrid_->addWidget(styleCombo_, row, 2);
+	row++;
+
+	label= new QLabel("CRS:");
+	crsCombo_ = new QComboBox;
+	layerGrid_->addWidget(label, row, 0);
+	layerGrid_->addWidget(crsCombo_, row, 2);
+	row++;
+	
+	layerParamRowNum_=row;
+
+	//layerGrid_->setColumnStretch(1,1);
+	//layerGrid_->setRowStretch(row,1);
+
+	connect(crsCombo_,SIGNAL(activated(QString)),
+		this,SLOT(slotSelectCrs(QString)));
+
+	connect(styleCombo_,SIGNAL(activated(int)),
+		this,SLOT(slotSelectStyle(int)));
+
+
+	//Preview pb
+	describeCovPb_ = new QPushButton(tr("Run describe coverage"));
+	layout->addWidget(describeCovPb_);
+
+	connect(describeCovPb_,SIGNAL(clicked()),
+		this,SLOT(slotRunDescribeCov()));
+}
+
+void MvQWcsClientEditor::setupLayerInfoTab()
+{
+	QLabel *label;
+	QWidget *w;
+
+	//Read css for the preview formatting
+	QString cssDoc;
+	QFile f(":/OgcClient/preview.css");
+	QTextStream in(&f);
+	if(f.open(QIODevice::ReadOnly | QIODevice::Text))
+	{
+       		cssDoc=QString(f.readAll());
+	}
+	f.close();
+
+	layerPreview_ = new QTextBrowser;
+	layerPreview_->setReadOnly(true);
+	layerPreview_->document()->setDefaultStyleSheet(cssDoc);
+
+	layerInfoTab_->addTab(layerPreview_,tr("Layer information"));	
+
+	connect(client_,SIGNAL(previewLoaded(QString)),
+		this,SLOT(slotPreviewLoaded(QString)));
+
+	connect(client_,SIGNAL(legendLoaded(QString)),
+		this,SLOT(slotLegendLoaded(QString)));
+
+	//GetCov request info
+	w= new QWidget;
+	QVBoxLayout *mapInfoLayout=new QVBoxLayout;
+	w->setLayout(mapInfoLayout);
+	layerInfoTab_->addTab(w,tr("GetCoverage request"));
+
+	label=new QLabel(tr("Metview request:"));
+	mapInfoLayout->addWidget(label);
+
+	getCovInfoMv_ = new QTextBrowser;
+	getCovInfoMv_->setReadOnly(true);
+	//getCovInfoMv_->setLineWrapMode(QTextEdit::NoWrap);
+	mapInfoLayout->addWidget(getCovInfoMv_);
+
+	/*QString s="Individual requests (maximum ";
+	s+=QString::number(MvQGetMapRequest::maxStep()) + "):";
+	label=new QLabel(tr(s.toStdString().c_str()));
+	mapInfoLayout->addWidget(label);
+
+	getMapInfoSplit_ = new QTextBrowser;
+	getMapInfoSplit_->setReadOnly(true);
+	getMapInfoSplit_->document()->setDefaultStyleSheet(cssDoc);
+	//getMapInfoSplit_->setLineWrapMode(QTextEdit::NoWrap);
+	mapInfoLayout->addWidget(getMapInfoSplit_,1);*/
+
+	highlighterMv_ = new MvQHighlighter(getCovInfoMv_->document());
+	//highlighterSplit_ = new MvQHighlighter(getMapInfoSplit_->document());
+
+	//slotSetGetMapInfo(client_->getMapRequest()->requestStep());
+
+	//connect(getCovInfoMv_,SIGNAL(textChanged()),
+	//	this,SLOT(slotGetMapChanged()));
+
+	connect(client_,SIGNAL(getCovRequestChanged(QString)),
+		this,SLOT(slotSetGetCovInfo(QString)));
+
+	//GetCapabilities info
+	w=new QWidget;
+	QVBoxLayout *getCapLayout = new QVBoxLayout;
+	w->setLayout(getCapLayout);
+
+	getCapInfo_ = new QTextBrowser;
+	getCapInfo_->setReadOnly(true);
+	getCapInfo_->setLineWrapMode(QTextEdit::NoWrap);
+	getCapLayout->addWidget(getCapInfo_);
+
+	getCapSearch_= new MvQTextEditSearchLine(getCapInfo_,tr("Find:"));
+	getCapLayout->addWidget(getCapSearch_);
+
+	layerInfoTab_->addTab(w,tr("GetCapabilities"));
+	
+	highlighterGetCap_ = new MvQWmsGetCapHighlighter(getCapInfo_->document());
+
+	//CoverageDescriptions
+	w=new QWidget;
+	QVBoxLayout *descCovLayout = new QVBoxLayout;
+	w->setLayout(descCovLayout);
+
+	describeCovInfo_ = new QTextBrowser;
+	describeCovInfo_->setReadOnly(true);
+	describeCovInfo_->setLineWrapMode(QTextEdit::NoWrap);
+	descCovLayout->addWidget(describeCovInfo_);
+
+	describeCovSearch_= new MvQTextEditSearchLine(describeCovInfo_,tr("Find:"));
+	descCovLayout->addWidget(describeCovSearch_);
+
+	layerInfoTab_->addTab(w,tr("DescribeCoverage"));
+	
+	highlighterDescribeCov_ = new MvQWmsGetCapHighlighter(describeCovInfo_->document());
+
+	//Service matadata
+	serviceInfo_ = new QTextBrowser;
+	serviceInfo_->setReadOnly(true);
+	serviceInfo_->document()->setDefaultStyleSheet(cssDoc);
+	serviceInfo_->setWordWrapMode(QTextOption::WordWrap);
+
+	layerInfoTab_->addTab(serviceInfo_,tr("Service"));
+
+	//MvQHighlighter *highlighter = new MvQHighlighter(getMapInfo_->document());
+	//slotSetGetMapInfo(client_->getMapRequest()->requestStep());
+
+}
+
+//-------------------------------
+//
+// Init
+//
+//-------------------------------
+
+void MvQWcsClientEditor::initVersionCombo()
+{
+	QString currentVersion=client_->version();
+
+	for(int i =0; i < versionCombo_->count(); i++)
+	{
+		if(currentVersion == versionCombo_->itemText(i))
+		{
+			versionCombo_->setCurrentIndex(i);
+		}
+	}
+	
+}	
+
+void MvQWcsClientEditor::clearServerDependentData()
+{
+	formatCombo_->clear();
+	
+	clearLayerDependentData();
+	getCovInfoMv_->clear();	
+}
+
+void MvQWcsClientEditor::clearLayerDependentData()
+{
+	layerModel_->dataIsAboutToChange();
+	layerModel_->setRootNode(0); 
+
+	styleCombo_->clear();
+	crsCombo_->clear();
+	clearDimension();
+}
+
+void MvQWcsClientEditor::clearDimension()
+{
+	int row=layerParamRowNum_; //layerGrid_->rowCount();
+	row=row-1;
+
+	qDebug() << "rows" << layerParamRowNum_ << layerGrid_->rowCount();
+
+	//Remove previous dimension widgets from the grid
+	for(unsigned int i=0; i < dimensionNum_;i++)
+	{
+		QWidget *w;
+
+		w=layerGrid_->itemAtPosition(row,2)->widget();
+		layerGrid_->removeWidget(w);
+		row--;
+
+		w=layerGrid_->itemAtPosition(row,0)->widget();
+		layerGrid_->removeWidget(w);
+
+		w=layerGrid_->itemAtPosition(row,1)->widget();
+		layerGrid_->removeWidget(w);
+
+		w=layerGrid_->itemAtPosition(row,2)->widget();
+		layerGrid_->removeWidget(w);
+
+		w=layerGrid_->itemAtPosition(row,3)->widget();
+		layerGrid_->removeWidget(w);
+
+		row--;
+
+		layerParamRowNum_-=2;
+	} 
+
+	dimensionNum_=0;
+
+	/*QMapIterator<QString, MvQWmsDimensionGuiItem*> it(dim_);
+   	while (it.hasNext()) 
+     	{ 
+       		it.next();
+       		delete it.value();
+	}
+	dim_.clear();*/
+}
+
+void MvQWcsClientEditor::initFormatCombo()
+{
+	formatCombo_->clear();
+
+	QStringList values=client_->formatDisplayValues();
+
+	for(int i=0; i < values.count(); i++)
+	{
+		formatCombo_->addItem(values[i]);
+		if(!client_->supportedMimeType().contains(values[i]))
+		{
+			formatCombo_->setItemData(i,Qt::darkGray,Qt::ForegroundRole);
+			formatCombo_->setItemData(i,tr("Not supported by Metview"),Qt::ToolTipRole);
+		}
+	}
+	
+	QString cv=client_->formatCurrentDisplayValue();	
+	int index=-1;
+	if(!cv.isEmpty())
+	{
+		index=values.indexOf(cv);
+	}
+	else
+	{
+		index=values.indexOf("image/png");
+		if(index == -1 && values.count() > 0)
+		{
+			index=0;
+		}
+	}	
+
+	if(index >=0)
+	{
+		formatCombo_->setCurrentIndex(index);
+		client_->slotSetFormatFromDpy(values[index]);
+	}
+}
+
+
+void MvQWcsClientEditor::initExtraParEdit()
+{
+	QString value=client_->extraGetCapPar();
+	extraGetCapEdit_->setText(value);
+
+	value=client_->extraGetCovPar();
+	extraGetCovEdit_->setText(value);
+}	
+
+void MvQWcsClientEditor::setupLayerList()
+{
+	layerModel_->dataIsAboutToChange();
+	layerModel_->setRootNode(client_->layer()->root());
+
+	layerTree_->setCurrentIndex(layerModel_->indexFromNode(client_->layer()->currentNode()));
+
+/*	layerList_->clear();
+
+	QStringList values=client_->layerDisplayValues();
+	QStringList desc=client_->layerDescriptions();
+
+	int i=0;
+	foreach(QString str, values)
+	{		
+		QListWidgetItem* item=new QListWidgetItem(str,layerList_);
+		item->setData(Qt::ToolTipRole,desc[i]);
+		i++;
+	}
+
+	int index=client_->layerCurrentIndex();		
+	if(index > -1)
+	{
+		layerList_->setCurrentRow(index);
+	}*/
+}
+
+void MvQWcsClientEditor::setupCovOfferList()
+{
+	QList<MvQOgcElem*> elems=client_->covOffer();
+	QStringList vals;
+	foreach(MvQOgcElem* e,elems)
+	{
+		vals << e->attribute("Title");
+	}
+
+	covOfferModel_->setStringList(vals);
+	
+
+/*	layerList_->clear();
+
+	QStringList values=client_->layerDisplayValues();
+	QStringList desc=client_->layerDescriptions();
+
+	int i=0;
+	foreach(QString str, values)
+	{		
+		QListWidgetItem* item=new QListWidgetItem(str,layerList_);
+		item->setData(Qt::ToolTipRole,desc[i]);
+		i++;
+	}
+
+	int index=client_->layerCurrentIndex();		
+	if(index > -1)
+	{
+		layerList_->setCurrentRow(index);
+	}*/
+}
+void MvQWcsClientEditor::initStyleCombo()
+{
+	styleCombo_->clear();
+
+	QStringList values=client_->styleDisplayValues();
+	QStringList desc=client_->styleDescriptions();
+
+	int i=0;
+	foreach(QString str, values)
+	{
+		styleCombo_->addItem(str);
+		styleCombo_->setItemData(i,desc[i],Qt::ToolTipRole);
+		i++;
+	}
+
+	int index=client_->styleCurrentIndex();	
+	if(index == -1 && values.count() > 0)
+	{
+		index=0;
+	}
+	if(index >=0)
+	{
+		styleCombo_->setCurrentIndex(index);
+		client_->setStyleCurrentIndex(index);
+	}
+}
+
+void MvQWcsClientEditor::initCrsCombo()
+{
+	crsCombo_->clear();
+
+	QStringList values=client_->crsDisplayValues();
+
+	for(int i=0; i < values.count(); i++)
+	{
+		crsCombo_->addItem(values[i]);
+		if(!client_->supportedCrs().contains(values[i]))
+		{
+			crsCombo_->setItemData(i,Qt::darkGray,Qt::ForegroundRole);
+			crsCombo_->setItemData(i,tr("Not supported by Metview"),Qt::ToolTipRole);
+		}
+	}
+
+	QString cv=client_->crsCurrentDisplayValue();	
+	int index=-1;
+
+	qDebug() << cv;
+	qDebug() << values;
+	if(!cv.isEmpty())
+	{
+		index=values.indexOf(cv);
+	}
+	else
+	{
+		foreach(QString str, values)
+		{
+			if(str.contains("EPSG:4326"))
+			{
+				index=values.indexOf(str);
+				break;
+			}
+		}	
+		if(index == -1 && values.count() > 0)
+		{
+			index=0;
+		}
+	}
+
+	if(index >=0)
+	{
+		crsCombo_->setCurrentIndex(index);
+		client_->setCrsCurrentDisplayValue(values[index]);
+	}
+}
+
+void MvQWcsClientEditor::setupDimension()
+{
+	/*clearDimension();
+
+
+	foreach(MvQOgcDimension *dim,client_->dimension())
+	{
+		QString name=dim->displayName();
+		dim_[name]=new MvQWmsDimensionGuiItem(dim,dim->currentValues(),layerGrid_,layerParamRowNum_);
+
+		connect(dim_[name],SIGNAL(textChanged(MvQOgcDimension*,QString)),
+			this,SLOT(slotDimensionChanged(MvQOgcDimension*,QString)));
+	
+		dimensionNum_++;
+		layerParamRowNum_+=2;
+	}*/
+}
+
+
+//------------------------------------------
+//
+//  SLOTS
+//
+//------------------------------------------
+
+void MvQWcsClientEditor::slotSelectUrl(const QString &url)
+{
+	client_->setUrl(url,versionCombo_->currentText());
+	clearServerDependentData();
+}
+
+void MvQWcsClientEditor::slotSelectVersion(const QString &version)
+{
+	if(version.compare(client_->version(),Qt::CaseInsensitive) != 0)
+	{
+		client_->setVersion(version);
+		slotRunGetCapabilities();
+	}
+}
+
+void MvQWcsClientEditor::slotRunGetCapabilities()
+{	
+	if(client_->url().isEmpty())
+		return;
+
+	layerModel_->dataIsAboutToChange();
+	layerModel_->setRootNode(0);
+
+	requestSplitter_->setEnabled(false);
+
+	actionCapability_->setEnabled(false);
+	actionStopLoad_->setEnabled(true);
+	requestSplitter_->widget(0)->setEnabled(false);
+	urlCombo_->setEnabled(false);
+	versionCombo_->setEnabled(false);
+	formatCombo_->setEnabled(false);
+	clientModeCombo_->setEnabled(false);
+
+	loadStarted();
+
+	client_->slotRunGetCap();
+}
+
+void MvQWcsClientEditor::slotGetCapabilityLoaded()
+{	
+	requestSplitter_->setEnabled(true);
+
+	actionCapability_->setEnabled(true);
+	actionStopLoad_->setEnabled(false);
+	requestSplitter_->widget(0)->setEnabled(true);
+	urlCombo_->setEnabled(true);
+	versionCombo_->setEnabled(true);
+	formatCombo_->setEnabled(true);
+	clientModeCombo_->setEnabled(true);
+
+	initFormatCombo();
+	setupCovOfferList();
+
+	initStyleCombo();
+	initCrsCombo();
+	setupDimension();
+
+	slotPreviewLoaded(QString());
+
+	getCapInfo_->setPlainText(client_->getCapDoc());
+	slotUpdateServiceInfo(); 
+
+	loadFinished();
+}
+
+void MvQWcsClientEditor::slotSelectLayer(const QModelIndex& index)
+{
+	MvQOgcNode *node=layerModel_->nodeFromIndex(index);
+	client_->setLayerFromDpy(node);
+
+	initStyleCombo();
+	initCrsCombo();
+	setupDimension();
+
+	slotPreviewLoaded(QString());
+}
+
+void MvQWcsClientEditor::slotDimensionChanged(MvQOgcDimension* dim,QString val)
+{
+	if(dim)
+	{	
+		client_->setDimensionFromDpy(dim->displayName(),val);
+	}
+}
+
+void MvQWcsClientEditor::slotExtraGetCapChanged(QString val)
+{
+	client_->setExtraGetCapPar(val);
+}
+
+void MvQWcsClientEditor::slotExtraGetCovChanged(QString val)
+{
+	client_->setExtraGetCovPar(val);
+}
+
+void MvQWcsClientEditor::slotAddItemToUrlCombo(QString s)
+{
+	qDebug() << s;
+	return;
+
+
+	while(urlCombo_->count() >=  urlCombo_->maxCount()-1)
+	{
+		urlCombo_->removeItem(urlCombo_->count()-1);
+	}
+
+	urlCombo_->insertItem(0,urlCombo_->lineEdit()->text());
+}
+
+void MvQWcsClientEditor::slotPreview()
+{
+	//previewPb_->setEnabled(false);
+	/*actionCapability_->setEnabled(false);
+	actionStopLoad_->setEnabled(true);
+	requestSplitter_->widget(0)->setEnabled(false);
+	clientModeCombo_->setEnabled(false);
+
+	loadStarted();
+
+	client_->downloadPreview();*/
+}
+
+void MvQWcsClientEditor::slotRunDescribeCov()
+{
+	//previewPb_->setEnabled(false);
+	actionCapability_->setEnabled(false);
+	actionStopLoad_->setEnabled(true);
+	requestSplitter_->widget(0)->setEnabled(false);
+	clientModeCombo_->setEnabled(false);
+
+	loadStarted();
+
+	client_->slotRunDescribeCov();
+}
+
+void MvQWcsClientEditor::slotDescribeCovLoaded()
+{
+	describeCovInfo_->setPlainText(client_->describeCovDoc());
+	loadFinished();
+}
+
+
+void MvQWcsClientEditor::slotPreviewLoaded(QString previewPath)
+{
+	QString layerText=client_->layerAbstract();
+	layerText.replace("\n","<br>");
+
+	QString  s="<table><tbody>";	
+	s+="<tr><td class=\"first\">Title</td><td>"+ client_->layerTitle() +"</td></tr>";
+	s+="<tr><td class=\"first\">Name</td><td>"+ client_->layerName() +"</td></tr>";
+	s+="<tr><td class=\"first\">Abstract</td><td>"+ layerText +"</td></tr>";
+	s+="<tr><td class=\"first\">CRS</td><td>"+ crsCombo_->currentText() +"</td></tr>";
+	s+="<tr><td class=\"first\">Style</td><td>"+ styleCombo_->currentText() +"</td></tr>";
+	
+	/*s+="<tr><td class=\"first\">Dimensions</td>";
+	QMapIterator<QString,MvQWmsDimensionGuiItem*> it(dim_);
+	s+="<td>";
+	while (it.hasNext()) 
+	{
+    		it.next();
+		s+=it.key() + " = " + it.value()->currentValue() + "<br>";		
+	}
+	s+="</td></tr>";*/
+
+	s+="<tr><td class=\"first\">Preview</td>";
+	if(previewPath.isEmpty() == false)
+	{
+		s+="<td align=center><img src=" + previewPath + "></td>";
+	}
+	else
+	{
+		s+="<td align=center></td>";
+	}
+	s+="</tr>";
+	s+="<tr><td class=\"first\">Legend</td>";
+	s+="<td class=\"image\" align=center>Legend not loaded</td></tr>";
+	s+="</tbody></table>";
+
+
+	layerPreview_->setHtml(s);
+
+	//previewPb_->setEnabled(true);
+	//actionCapability_->setEnabled(true);
+	//actionStopLoad_->setEnabled(false);
+	//requestSplitter_->widget(0)->setEnabled(true);
+
+	if(previewPath.isEmpty())
+	{	
+		slotLegendLoaded(QString());
+		return;
+	}
+	//
+	client_->downloadLegend();	
+}
+
+void MvQWcsClientEditor::slotLegendLoaded(QString legendPath)
+{
+	QString txt=layerPreview_->toHtml();
+	
+	if(!legendPath.isEmpty())	
+	{
+		QString s="<img src=\"" + legendPath + "\">";
+		txt.replace("Legend not loaded",s);
+		layerPreview_->setHtml(txt);
+	}
+
+	//previewPb_->setEnabled(true);
+	actionCapability_->setEnabled(true);
+	actionStopLoad_->setEnabled(false);
+	requestSplitter_->widget(0)->setEnabled(true);
+	clientModeCombo_->setEnabled(true);
+
+	loadFinished();
+}
+
+void MvQWcsClientEditor::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void MvQWcsClientEditor::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+void MvQWcsClientEditor::slotSelectStyle(int index)
+{
+	client_->setStyleCurrentIndex(index);
+}
+
+void MvQWcsClientEditor::slotSelectCrs(QString value)
+{
+	client_->setCrsCurrentDisplayValue(value);
+}
+
+void MvQWcsClientEditor::slotCheckUrlComboContents()
+{
+	qDebug() << "slotCheckUrlComboContents called";
+
+	int maxCount=25;
+
+	/*QStringList lst;
+	for(int i=0; i < urlCombo_->count(); i++)
+	{
+		lst << urlCombo_->itemText(i);
+	}
+
+	lst.removeDuplicates();*/
+
+	for(int i=urlCombo_->count()-1; i > maxCount; i--)
+	{
+		urlCombo_->removeItem(i);
+	}
+}
+
+void MvQWcsClientEditor::slotSetGetCovInfo(QString req)
+{
+	if(client_->clientMode() == MvQWcsUiClient::AdvancedMode)
+	{
+		getCovInfoMv_->setPlainText(req);
+	}
+}
+
+void MvQWcsClientEditor::slotGetCovChanged()
+{	
+	client_->setGetCovRequest(getCovInfoMv_->toPlainText());
+}
+
+void MvQWcsClientEditor::slotUpdateServiceInfo()
+{
+	QMap<QString,QString> meta=client_->serviceMetaData();
+
+	QString  s="<table><tbody>";
+
+	//s+="<tr><td class=\"first\">Title</td><td>"+ meta["Title"] +"</td></tr>";
+	//s+="<tr><td class=\"first\">Abstract</td><td>"+ meta["Abstract"] +"</td></tr>";
+	
+	QStringList contact;
+	contact << "name" << "description" << "label" << 
+				"fees" << "accessConstraints";
+
+
+	foreach(QString t,contact)
+	{
+		if(!meta[t].isEmpty())
+		{
+			s+="<tr><td class=\"first\">" + t + "</td><td>"+ client_->serviceMetaData()[t] +"</td></tr>";	
+		}
+	}
+	
+	s+="</tbody></table>";
+
+	serviceInfo_->setHtml(s);
+}
+
+void MvQWcsClientEditor::initClientMode()
+{	
+	if(client_->clientMode() == MvQWcsUiClient::BasicMode)
+	{
+		layerPanel_->hide();
+		clearLayerDependentData();
+
+		layerInfoTab_->setCurrentIndex(1);
+		layerInfoTab_->setTabEnabled(0,false);
+		layerInfoTab_->setTabEnabled(2,false);	
+		layerInfoTab_->setTabEnabled(3,false);
+
+		foreach(QToolBar* tb,findChildren<QToolBar *>())
+		{
+			tb->hide();
+		}
+
+		foreach(QMenu* m,findChildren<QMenu *>())
+		{
+			qDebug() << "menu" << m->objectName();
+
+			if(m->objectName() == "controlsMenu" ||
+			   m->objectName() == "viewMenu")
+				m->setEnabled(false);
+		}
+
+		statusBar()->hide();
+
+		/*actionCapability_->setEnabled(false);
+		actionStopLoad_->setEnabled(false);
+		urlCombo_->setEnabled(false);
+		versionCombo_->setEnabled(false);
+		formatCombo_->setEnabled(false);
+		extraGetMapEdit_->setEnabled(false);
+		extraGetCapEdit_->setEnabled(false);
+
+		foreach(QLabel* label,toolBarLabel_)
+			label->setEnabled(false);*/	
+
+		getCovInfoMv_->setReadOnly(false);
+
+		getCovInfoMv_->setPlainText(client_->getCovRequest()->request());
+		//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+		slotSetGetCovInfo(client_->getCovRequest()->request());
+
+		connect(getCovInfoMv_,SIGNAL(textChanged()),
+		     this,SLOT(slotGetCovChanged()));		
+	}
+	else
+	{
+		//Run getCapapabilities
+		//This will init most of the GUIs 
+
+		layerPanel_->show();
+		layerInfoTab_->setTabEnabled(0,true);
+		layerInfoTab_->setTabEnabled(2,true);	
+		layerInfoTab_->setTabEnabled(3,true);
+		layerInfoTab_->setCurrentIndex(0);
+
+		foreach(QToolBar* tb,findChildren<QToolBar *>())
+		{
+			tb->show();
+		}
+
+		foreach(QMenu* m,findChildren<QMenu *>())
+		{
+			if(m->objectName() == "controlsMenu" ||
+			   m->objectName() == "viewMenu")
+				m->setEnabled(true);
+		}
+
+		statusBar()->show();
+		/*actionCapability_->setEnabled(true);
+		actionStopLoad_->setEnabled(true);
+		urlCombo_->setEnabled(true);
+		versionCombo_->setEnabled(true);
+		formatCombo_->setEnabled(true);
+		extraGetMapEdit_->setEnabled(true);
+		extraGetCapEdit_->setEnabled(true);
+
+		foreach(QLabel* label,toolBarLabel_)
+			label->setEnabled(true);*/	
+
+		getCovInfoMv_->setReadOnly(true);
+
+		disconnect(getCovInfoMv_,SIGNAL(textChanged()),0,0);
+
+		slotClearLog(true);
+
+		slotRunGetCapabilities();
+	}
+}
+
+void MvQWcsClientEditor::slotClientModeChanged(QString mode)
+{
+	if(!clientModeMap_.contains(mode))
+		return;
+	
+	writeSettings(); 
+
+	client_->setClientMode(clientModeMap_[mode]);
+
+	initClientMode();
+
+	readSettings();
+}
+
+void MvQWcsClientEditor::loadStarted()
+{
+	/*loadLabel_->show();
+	loadLabel_->movie()->start();*/
+
+	loadProgress_->setRange(0,0);
+	loadProgress_->show();
+}
+
+void MvQWcsClientEditor::loadFinished()
+{
+	loadProgress_->hide();
+	loadProgress_->setRange(0,1);
+	loadProgress_->setValue(1);
+	
+	/*loadLabel_->movie()->stop();
+	loadLabel_->hide();*/		
+}
+
+void MvQWcsClientEditor::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+	//statusBar()->showMessage(s);	
+}
+
+
+void MvQWcsClientEditor::slotSaveInfo()
+{	
+	client_->slotSaveInfo();
+	if(openCb_->isChecked() == false)
+	{
+		close();
+	}
+}
+
+//-------------------------------------
+//
+// Read/write settings
+//
+//-------------------------------------
+
+void MvQWcsClientEditor::writeSettings()
+{	
+	if(client_->clientMode() == MvQWcsUiClient::BasicMode)
+	{	
+		QSettings settings("ECMWF","MV4-MvQWcsClientEditor_Basic");
+
+		settings.beginGroup("mainWindow");
+		settings.setValue("geometry",saveGeometry());
+		settings.endGroup();
+	}
+	else
+	{
+		QSettings settings("ECMWF","MV4-MvQWcsClientEditor_Advanced");
+
+		settings.beginGroup("mainWindow");
+		settings.setValue("geometry",saveGeometry());
+		settings.setValue("state",saveState());
+		settings.setValue("mainSplitter",mainSplitter_->saveState());
+		settings.setValue("requestSplitter",requestSplitter_->saveState());
+		//settings.setValue("layerSplitter",layerSplitter_->saveState());
+		settings.setValue("layerTabIndex",layerTab_->currentIndex());
+		settings.setValue("layerInfoTabIndex",layerInfoTab_->currentIndex());
+		settings.setValue("actionLogStatus",actionLog_->isChecked());		
+
+		QStringList lst;
+		for(int i=0; i < urlCombo_->count(); i++)
+		{
+			lst << urlCombo_->itemText(i);
+		}
+		settings.setValue("urlCombo",lst);
+
+		settings.endGroup();
+	}
+
+	QSettings settings("ECMWF","MV4-MvQWcsClientEditor_Global");
+	settings.beginGroup("mainWindow");
+	settings.setValue("openCbStatus",openCb_->isChecked());
+	settings.endGroup();
+
+}
+
+void MvQWcsClientEditor::readSettings()
+{
+	if(client_->clientMode() == MvQWcsUiClient::BasicMode)
+	{
+		QSettings settings("ECMWF","MV4-MvQWcsClientEditor_Basic");
+
+		settings.beginGroup("mainWindow");
+		restoreGeometry(settings.value("geometry").toByteArray());
+		restoreState(settings.value("state").toByteArray());
+		settings.endGroup();
+
+	}
+	else
+	{
+		QSettings settings("ECMWF","MV4-MvQWcsClientEditor_Advanced");
+
+		settings.beginGroup("mainWindow");
+		restoreGeometry(settings.value("geometry").toByteArray());
+		restoreState(settings.value("state").toByteArray());
+		mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+		requestSplitter_->restoreState(settings.value("requestSplitter").toByteArray());
+		//layerSplitter_->restoreState(settings.value("layerSplitter").toByteArray());
+
+		if(settings.value("actionLogStatus").isNull())
+		{
+			actionLog_->setChecked(false);
+		}
+		else
+		{
+			actionLog_->setChecked(settings.value("actionLogStatus").toBool());
+		}
+
+		//Init tabs
+		int ival=settings.value("layerInfoTabIndex").toInt();
+		layerInfoTab_->setCurrentIndex(ival);
+
+		ival=settings.value("layerTabIndex").toInt();
+		layerTab_->setCurrentIndex(ival);
+
+		QStringList lst(settings.value("urlCombo").toStringList());
+		//lst.remove(client_->url())
+		urlCombo_->addItems(lst);
+
+		if(client_->url().isEmpty())
+			urlCombo_->lineEdit()->clear();
+
+
+		settings.endGroup();
+	}
+
+	QSettings settings("ECMWF","MV4-MvQWcsClientEditor_Global");
+
+	settings.beginGroup("mainWindow");
+	if(settings.value("openCbStatus").isNull())
+	{
+		openCb_->setChecked(true);
+	}
+	else
+	{
+		openCb_->setChecked(settings.value("openCbStatus").toBool());
+	}
+	settings.endGroup();
+
+}
diff --git a/src/OgcClient/MvQWcsClientEditor.h b/src/OgcClient/MvQWcsClientEditor.h
new file mode 100644
index 0000000..838f2bc
--- /dev/null
+++ b/src/OgcClient/MvQWcsClientEditor.h
@@ -0,0 +1,178 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQWcsClientEditor_H
+#define MvQWcsClientEditor_H
+
+#include <QGridLayout>
+#include <QLineEdit>
+#include <QComboBox>
+#include <QMainWindow>
+#include <QStringList>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+#include "MvQWcsClient.h"
+
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QListView;
+class QListWidgetItem;
+class QListWidget;
+class QProgressBar;
+class QPushButton;
+class QSplitter;
+class QStringListModel;
+class QTabWidget;
+class QTextBrowser;
+class QToolButton;
+class QTreeView;
+class QVBoxLayout;
+
+class MvQHighlighter;
+class MvQLogBrowser;
+class MvQOgcTreeModel;
+class MvQTextEditSearchLine;
+class MvQWcsUiClient;
+class MvQWmsGetCapHighlighter;
+
+
+class MvQWcsClientEditor : public MvQMainWindow
+{
+	Q_OBJECT
+
+public:
+	MvQWcsClientEditor(MvQWcsUiClient*,QWidget *w=0);
+	~MvQWcsClientEditor();
+
+public slots:
+	void slotClientModeChanged(QString);
+	void slotSaveInfo();
+	void slotStatusMessage(QString);
+	void slotSelectUrl(const QString&);
+	void slotCheckUrlComboContents();
+	void slotSelectVersion(const QString&);
+	void slotRunGetCapabilities();	
+	void slotGetCapabilityLoaded();
+	void slotSelectLayer(const QModelIndex&);
+	void slotSelectStyle(int);
+	void slotSelectCrs(QString);
+	void slotDimensionChanged(MvQOgcDimension*,QString);
+	void slotExtraGetCapChanged(QString);
+	void slotExtraGetCovChanged(QString);
+	void slotAddItemToUrlCombo(QString);
+	void slotPreview();
+	void slotPreviewLoaded(QString);
+	void slotLegendLoaded(QString);
+	void slotSetGetCovInfo(QString);
+	void slotUpdateLogOutput();
+	void slotClearLog(bool);
+	void slotGetCovChanged();
+	void slotRunDescribeCov();	
+	void slotDescribeCovLoaded();
+	void slotUpdateServiceInfo(); 
+
+signals:
+	void clientModeChanged();
+	void clientModeIsAboutToChange();
+
+	
+protected:
+	void setupControlsActions();
+	void setupViewActions();
+	void setupLayerPanel(QVBoxLayout *);
+	void setupLayerInfoTab();
+	void setupLayerCombo();
+	void setupCovOfferList();
+	void setupLayerList();
+	void setupDimension();
+
+	void initClientMode();
+	void initVersionCombo();
+	void initExtraParEdit();
+	void initFormatCombo();
+	void initStyleCombo();
+	void initCrsCombo();
+
+	void clearServerDependentData();
+	void clearLayerDependentData();
+	void clearDimension();
+
+	void loadStarted();
+	void loadFinished();
+	void writeSettings();
+	void readSettings();	
+
+	MvQWcsUiClient* client_;
+
+	QVBoxLayout* 	mainLayout_;
+	QSplitter*   	mainSplitter_;
+	QSplitter*   	requestSplitter_;
+
+	QCheckBox*	openCb_;
+
+	QLabel* 	loadLabel_;
+	QLabel*		statusMessageLabel_;
+	QList<QLabel*>  toolBarLabel_;
+
+	MvQMainWindow::MenuItemMap 	menuItems_;
+	QAction* 	actionCapability_;
+	QAction*	actionStopLoad_;
+	QAction* 	actionLog_;
+	QComboBox* 	urlCombo_;
+	QComboBox* 	versionCombo_;
+	QComboBox* 	clientModeCombo_;
+	QMap<QString,MvQWcsUiClient::ClientMode> clientModeMap_;
+
+	QComboBox* formatCombo_;
+	QLineEdit *extraGetCapEdit_;
+	QLineEdit *extraGetCovEdit_;
+	
+	QListView*	  covOfferList_;
+	QStringListModel* covOfferModel_;
+
+	QTabWidget*	layerTab_;
+	QWidget* 	layerPanel_;
+	QGridLayout*	layerGrid_;
+	QHBoxLayout*	layerLayout_;
+	QTreeView*	layerTree_;
+	MvQOgcTreeModel* layerModel_;
+	QComboBox* 	crsCombo_;
+	QComboBox* 	styleCombo_;
+	QPushButton*	describeCovPb_;
+	int 		dimensionNum_;
+	int 		layerParamRowNum_;
+	//QMap<QString,MvQWmsDimensionGuiItem*> dim_;
+
+	QTabWidget* 	layerInfoTab_;
+	QTextBrowser* 	getCapInfo_;
+	QTextBrowser* 	describeCovInfo_;
+	QTextBrowser* 	serviceInfo_;
+	QTextBrowser* 	layerPreview_;
+	QTextBrowser* 	getCovInfoMv_;
+	MvQHighlighter*	highlighterMv_;
+
+
+	MvQLogBrowser* 	logBrowser_;
+	QWidget*	logPanel_;
+
+	MvQTextEditSearchLine* getCapSearch_;
+	MvQWmsGetCapHighlighter* highlighterGetCap_;
+	
+	MvQTextEditSearchLine* describeCovSearch_;
+	MvQWmsGetCapHighlighter* highlighterDescribeCov_;
+
+	QProgressBar*	loadProgress_;
+};
+
+
+#endif
+
diff --git a/src/OgcClient/MvQWmsClient.cc b/src/OgcClient/MvQWmsClient.cc
new file mode 100644
index 0000000..3440ee4
--- /dev/null
+++ b/src/OgcClient/MvQWmsClient.cc
@@ -0,0 +1,2947 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QBuffer>
+#include <QDateTime>
+#include <QDebug>
+#include <QDomDocument>
+#include <QFile>
+#include <QImage>
+#include <QUrl>
+
+#include <QAuthenticator>
+#include <QNetworkReply>
+#include <QXmlFormatter>
+#include <QXmlResultItems>
+
+#include "MvQNetworkAccessManager.h"
+#include "MvQOgcRequest.h"
+#include "MvQXmlQuery.h"
+
+#include "MvQWmsClient.h"
+
+#include "LogHandler.h"
+
+#include "mars.h"
+#include "Metview.h"
+
+//==============================
+// 
+// MvQProjInfo
+//
+//==============================
+
+MvQProjInfo::MvQProjInfo(const MvRequest &inReq)
+{
+	if(strcmp(inReq.getVerb(),"GEOVIEW") != 0)
+		return;	
+  
+  	const char* info=inReq("_ZOOM_DEFINITION");
+	if(info)
+	{
+		parseProj4String(info);
+	}	
+	else
+	{		 
+		parseRequest(inReq);
+	}
+}
+
+
+void MvQProjInfo::parseProj4String(const char* info)
+{
+	if(!info)
+		return;
+			  	  
+	QString str(info);
+	str.remove("\"");
+	str.remove("{");
+	str.remove("}"); 
+		
+	QMap<QString,QString> param;
+	foreach(QString s,str.split(","))
+	{
+		QStringList s1=s.split(":");
+		if(s1.count()==2)
+		{
+			 insert(s1[0].simplified(),s1[1].simplified());
+		}
+	}
+	
+	if(value("subpage_map_projection") == "cylindrical")
+	{
+		if(value("subpage_map_area_definition") == "full")
+		{
+			insert("subpage_lower_left_latitude","-90");
+			insert("subpage_lower_left_longitude","-180");
+			insert("subpage_upper_right_latitude","90");
+			insert("subpage_upper_right_longitude","180");  
+		}
+	}	
+}
+	
+void MvQProjInfo::parseRequest(const MvRequest &inReq)	
+{	
+	MvRequest ctx;
+		
+	//Expand the request
+	char *shareDir=getenv("METVIEW_DIR_SHARE");
+	if(shareDir)
+	{	
+		string path(shareDir);
+		path.append("/etc/");
+
+		string defFileName=path+ "GeoViewDef";
+		string rulesFileName=path + "GeoViewRules";
+
+		MvLanguage langMetview ( defFileName.c_str(),
+				  rulesFileName.c_str(),
+				  EXPAND_DEFAULTS);
+
+	        ctx=langMetview.expandOne (inReq);
+        }
+        else
+	{
+	  	ctx=inReq;
+	}		
+		
+	const char* proj= (const char*)ctx("MAP_PROJECTION");
+	
+	if(proj && strcmp(proj,"CYLINDRICAL") == 0)
+	{
+		insert("subpage_map_projection","cylindrical");
+		
+	        const char* ad= (const char*)ctx("MAP_AREA_DEFINITION");
+		QString areaDef;	
+		if(ad)
+		{
+		  	areaDef=QString(ad);
+			areaDef=areaDef.toLower();
+			insert("subpage_map_area_definition",areaDef);
+		}	
+		else
+		  	return;
+		  
+		if(areaDef == "corners" && ctx.countValues("AREA") == 4)
+		{
+			double dval;
+			ctx.getValue(dval,"AREA",0);
+			insert("subpage_lower_left_latitude",QString::number(dval));
+			ctx.getValue(dval,"AREA",1);
+			insert("subpage_lower_left_longitude",QString::number(dval));
+			ctx.getValue(dval,"AREA",2);
+			insert("subpage_upper_right_latitude",QString::number(dval));
+			ctx.getValue(dval,"AREA",3);
+			insert("subpage_upper_right_longitude",QString::number(dval));  
+		}	  
+		
+		else if(areaDef == "full")
+		{
+			insert("subpage_lower_left_latitude","-90");
+			insert("subpage_lower_left_longitude","-180");
+			insert("subpage_upper_right_latitude","90");
+			insert("subpage_upper_right_longitude","180");  
+		}	
+	}
+}
+
+QString MvQProjInfo::get(QString key)
+{
+	QMap<QString,QString>::const_iterator it=find(key);
+	if(it != end())
+		return it.value();
+	
+	else
+	  	return QString();
+}	
+
+								  
+//==============================
+// 
+// Message handler for XQuery
+//
+//==============================
+
+
+void MvQWmsMessageHandler::handleMessage(QtMsgType type,const QString& description,const QUrl& /*identifier*/,
+				      const QSourceLocation& /*sourceLocation*/)
+{
+	if(type == QtFatalMsg)
+	{
+	  	fatalMsg_ << description;
+	}
+}  
+
+
+//==============================
+// 
+// Base client
+//
+//==============================
+
+MvQWmsClientBase::MvQWmsClientBase()
+{
+	supportedMimeType_ << "image/png" << "image/jpeg" << 
+			    "image/gif"; // "image/svg+xml";
+
+	supportedCrs_ << "EPSG:4326" << "CRS:84";
+	
+	queryMsgHandler_= new MvQWmsMessageHandler;
+}
+
+MvQWmsClientBase::~MvQWmsClientBase()
+{
+	delete queryMsgHandler_;
+}
+
+QString MvQWmsClientBase::getMimeType(QByteArray ba)
+{
+	qDebug() << "fileType" << ba.mid(0,8).toHex();
+
+	if(ba.mid(0,8).toHex() == "89504e470d0a1a0a")
+	{
+		return "image/png";
+	}
+	else if(ba.mid(0,4).toHex() == "ffd8ffe0")
+	{
+		return "image/jpeg";
+	}
+	else if(ba.mid(0,6) == "GIF87a" ||
+		ba.mid(0,6) == "GIF89a")
+	{
+		return "image/gif";
+	}
+
+	return QString("text/plain");
+}
+
+
+QString MvQWmsClientBase::getRequestedMimeType(QString r)
+{
+	MvQGetMapRequest req;
+	req.setRequest(r);
+	return req.item("FORMAT");
+}
+
+//==============================
+// 
+// Download/batch client
+//
+//==============================
+
+MvQWmsGetClient::MvQWmsGetClient(MvRequest& req):
+	reqInfo_ (req)
+{
+	//Init
+  	getMapRunStatus_=false;
+	requestChanged_=false;
+
+	networkGetMap_=0;
+	networkLegend_=0;
+	networkLogo_=0;
+	getMapReply_=0;
+	legendReply_=0;
+	logoReply_=0;
+	
+	getMapFrameNum_=0;
+	getMapFrameToDownload_=-1;	
+
+	//Mode
+	const char* modec = (const char*)reqInfo_("_ACTION");
+	QString mode;
+	if(modec) mode=QString(modec);
+	
+	//Nosubsets
+	const char* noSubsets= (const char*)reqInfo_("LAYER_NOSUBSETS");
+
+	//Time dimensions
+	QStringList timeDimName;
+	const char* tdn= (const char*)reqInfo_("TIME_DIMENSIONS");
+	if(tdn)
+	{
+		QString s(tdn);
+		timeDimName=s.split("/");
+	}
+	
+	//Create and initialise request object
+	getMapRequest_=new MvQGetMapRequest;
+	getMapRequest_->setRequest(QString((const char*)reqInfo_("REQUEST")),timeDimName);
+	
+	//Update bbox if needed
+	if((mode == "prepare" || mode == "update") && 
+	  (noSubsets ==0 || strcmp(noSubsets,"0") == 0))
+	{  
+		requestChanged_=updateBoundingBox();
+	}
+	
+	//In update mode if bbox was not updated we quit
+	if(mode == "update" && requestChanged_ == false)
+	{
+		return;
+	}
+	
+	//Legend and log path
+	const char* legend= (const char*)reqInfo_("LAYER_LEGEND");
+	if(legend)
+		legendPath_=QString(legend);
+	
+	const char* logo= (const char*)reqInfo_("LAYER_LOGO");
+	if(logo)
+		logoPath_=QString(logo);
+
+	
+	//Network access
+	networkGetMap_ = new MvQNetworkAccessManager(this);
+	networkLegend_ = new MvQNetworkAccessManager(this);
+	networkLogo_ = new MvQNetworkAccessManager(this);
+
+	connect(networkGetMap_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyGetMap(QNetworkReply*)));
+
+	connect(networkLegend_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyLegend(QNetworkReply*)));
+
+	connect(networkLogo_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyLogo(QNetworkReply*)));
+
+}
+
+MvQWmsGetClient::~MvQWmsGetClient()
+{
+	delete getMapRequest_;
+	if(networkGetMap_) delete networkGetMap_;
+	if(networkLegend_) delete networkLegend_;
+	if(networkLogo_) delete networkLogo_;
+}
+
+bool MvQWmsGetClient::updateBoundingBox()
+{
+	//Get current view area in the plot
+
+	MvRequest ctxIn=reqInfo_("_CONTEXT");
+	if(!ctxIn || strcmp(ctxIn.getVerb(),"GEOVIEW") != 0)
+		return false;
+		
+	//ctxIn.print(); 
+	MvQProjInfo projInfo(ctxIn);
+	//ctxIn.print(); 
+			
+	QList<float> areaL;
+	
+	//Cylindrical
+	if(projInfo.get("subpage_map_projection") == "cylindrical")
+	{
+		if(projInfo.get("subpage_map_area_definition") == "corners"||
+		   projInfo.get("subpage_map_area_definition") == "full")
+		{
+			areaL << projInfo.get("subpage_lower_left_latitude").toDouble();
+			areaL << projInfo.get("subpage_lower_left_longitude").toDouble();
+			areaL << projInfo.get("subpage_upper_right_latitude").toDouble();
+			areaL << projInfo.get("subpage_upper_right_longitude").toDouble();
+		}
+	}
+	
+
+#if 0
+	MvRequest ctx;
+	MvRequest ctxIn=reqInfo_("_CONTEXT");
+	
+	ctxIn.print();
+	
+	char *shareDir=getenv("METVIEW_DIR_SHARE");
+	if(shareDir)
+	{	
+		string path(shareDir);
+		path.append("/etc/");
+
+		string defFileName=path+ "GeoViewDef";
+		string rulesFileName=path + "GeoViewRules";
+
+		MvLanguage langMetview ( defFileName.c_str(),
+				  rulesFileName.c_str(),
+				  EXPAND_DEFAULTS);
+
+	        ctx=langMetview.expandOne (ctxIn);
+        }
+        else
+	{
+	  	ctx=ctxIn;
+	}	
+
+	ctx.print();
+
+	const char* proj= (const char*)ctx("MAP_PROJECTION");
+	
+	int cnt = ctx.countValues("AREA");
+	double dval; 
+	QList<float> areaL;
+	for(int i=0; i< cnt; i++)
+	{
+		ctx.getValue(dval,"AREA",i);
+	 	areaL << dval;
+	}
+
+	//Check if we have the view area definition
+	if(!proj || areaL.count() != 4)
+	{
+		return false;
+	}	
+#endif
+	//Max bounding box for the given CRS/SRS
+	const char* bbChar= (const char*)reqInfo_("MAX_BOUNDING_BOX");
+	QRectF maxBox;
+	if(bbChar)
+	{
+	  	QString s(bbChar);
+		QStringList lst=s.split("/");
+		if(lst.count() == 4)
+		{
+		 	maxBox=QRectF(lst[0].toFloat(),lst[1].toFloat(),
+				    lst[2].toFloat()-lst[0].toFloat(),
+				    lst[3].toFloat()-lst[1].toFloat());				    
+		}
+	}
+	
+	if(maxBox.isEmpty())
+	{
+	  	return false;
+	}	
+	  
+	//Current bounding box from the request
+	QRectF currentBox;
+	QStringList lst=getMapRequest_->item("BBOX").split(",");	  	
+	qDebug() << lst;
+	if(lst.count() == 4)
+	{
+		 currentBox=QRectF(lst[0].toFloat(),lst[1].toFloat(),
+				    lst[2].toFloat()-lst[0].toFloat(),
+				    lst[3].toFloat()-lst[1].toFloat());				    
+	}
+		
+	if(currentBox.isEmpty())
+	{
+	  	return false;
+	}		  
+	  
+		 
+	  
+	qDebug() << "area" << areaL << maxBox << currentBox; 
+	qDebug() << "request" << getMapRequest_->request()  << getMapRequest_->crs();
+	  
+	//We reached this point only if both view area and
+	//bounding box were found!!!!
+	  
+	if(projInfo.get("subpage_map_projection") == "cylindrical")
+	{
+		//areaL: s,w,n,e
+		//bbox: mix, miny, max, maxy
+		//qDebug() << "area" << areaL;	
+				
+		QRectF areaBox;
+		
+		//For 1.3.0 in epsg:4326 x is lat and y is lon !!!!!
+		if(getMapRequest_->request().contains("CRS=",Qt::CaseInsensitive) &&
+		   getMapRequest_->crs() == "EPSG:4326")
+		{					
+			areaBox=QRectF(areaL[0],areaL[1],areaL[2]-areaL[0],areaL[3]-areaL[1]);
+		}
+		else if(getMapRequest_->crs() == "EPSG:4326" || getMapRequest_->crs() == "CRS:84")			
+		{						
+			areaBox=QRectF(areaL[1],areaL[0],areaL[3]-areaL[1],areaL[2]-areaL[0]);
+		}
+
+		qDebug() << "CONTAINS" << areaBox << maxBox <<  currentBox ;
+
+		if(areaBox.isEmpty())
+		{  
+			return false;
+		}		
+		
+		qDebug() << "CONTAINS" << areaBox << maxBox <<  currentBox ;
+
+		if(areaBox.intersects(maxBox))
+		{  		
+			// maxAreaBox = the intersection of the viewable area 
+			//and the max bounding box for the srs/c
+			QRectF maxAreaBox=areaBox.intersected(maxBox);
+
+			qDebug() << "Intersects" << areaBox << maxBox <<  currentBox << maxAreaBox;
+
+			//Find out the relation of the maxAreaBox and the current bounding 
+			//box in the request
+			QRectF resBox;
+			if(maxAreaBox != currentBox)
+			{
+				resBox=maxAreaBox;
+			}  
+			
+			if(!resBox.isEmpty())
+			{  
+				getMapRequest_->setItem("BBOX",
+				QString::number(resBox.x()) + "," + 
+				QString::number(resBox.y()) + "," + 
+				QString::number(resBox.x()+resBox.width()) + "," + 
+				QString::number(resBox.y()+resBox.height()));
+				
+				return true;
+			}	
+		}		
+		
+	}
+	
+	return false;
+}
+
+void MvQWmsGetClient::runGetMap()
+{	
+	outFiles_.clear();
+
+	qDebug() << "request" << getMapRequest_->request();
+ 
+	QStringList lst=getMapRequest_->requestFrame();
+	getMapFrameNum_=lst.count();
+	getMapFrameToDownload_=0;	
+
+	getMapRunStatus_=false;
+	downloadGetMapFrame();
+}
+
+void MvQWmsGetClient::downloadGetMapFrame()
+{
+	qDebug() << "request" << getMapFrameToDownload_ << getMapRequest_->requestFrame(getMapFrameToDownload_);
+	getMapReply_ = networkGetMap_->get(QNetworkRequest(QUrl::fromPercentEncoding(getMapRequest_->requestFrame(getMapFrameToDownload_).toUtf8())));
+}
+
+void MvQWmsGetClient::downloadLegend()
+{
+	if(!legendPath_.isEmpty())	
+	{
+		//qDebug() << "legend" << QUrl::fromPercentEncoding(legendPath_.toAscii());
+	  
+	  	legendReply_=networkLegend_->get(QNetworkRequest(QUrl::fromPercentEncoding(legendPath_.toUtf8())));
+	}
+	else
+	{
+		//QApplication::exit();
+		downloadLogo();
+	}
+}
+
+void MvQWmsGetClient::downloadLogo()
+{
+	if(!logoPath_.isEmpty())	
+	{
+		logoReply_=networkLogo_->get(QNetworkRequest(QUrl::fromPercentEncoding(logoPath_.toUtf8())));
+	}
+	else
+	{
+		QApplication::exit();
+	}
+}
+
+
+
+void MvQWmsGetClient::slotReplyGetMap(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	//LogItem *log=new LogItem;
+	//LogHandler::instance()->add(log);
+	//log->description("Load GetMap");
+	
+	if(reply->error() != QNetworkReply::NoError)
+	{				
+		getMapFrameNum_=0;
+		getMapFrameToDownload_=-1;
+		
+		QString ems="GetMap request failed!\nError: ";
+		ems+=reply->errorString();
+		marslog(LOG_EROR,"GetMap request failed!\nError: %s ",reply->errorString().toStdString().c_str());
+		//log->error(reply->errorString().toStdString() + "\n");			
+		QApplication::exit();
+		return;
+	}
+	else
+	{			
+		// temporary file
+		QString outFile;		
+		outFile=marstmp();
+		
+		getMapRequest_->setOutFile(getMapFrameToDownload_,outFile);
+
+		QByteArray ba=reply->readAll();	
+
+		if(mimeType.isEmpty())
+			mimeType=getMimeType(ba);
+
+		//If exception is returned or mime type is 
+		//different to what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||
+		   mimeType.contains("text/xml") ||
+		   !mimeType.contains(getRequestedMimeType(url.toString())))		
+		{
+			QString eMsg;
+			//readException(ba,eMsg);
+
+			getMapFrameNum_=0;
+			getMapFrameToDownload_=-1;
+			
+			//marslog(LOG_EROR,"GetMap request failed!\nError: %s ",eMsg.toStdString().c_str());
+			marslog(LOG_EROR,"GetMap request failed! ");
+			QApplication::exit();
+			return;
+		}
+
+		QFile out(outFile);
+		out.open(QIODevice::WriteOnly);
+		out.write(ba);
+		out.close();
+
+		getMapFrameToDownload_++;
+			
+		if(getMapFrameToDownload_ < getMapFrameNum_)
+		{
+			downloadGetMapFrame();
+		}
+		else
+		{
+			getMapFrameNum_=0;
+			getMapFrameToDownload_=-1;
+				
+			getMapRunStatus_=true;
+			downloadLegend();
+			//QApplication::exit();
+		}
+	}
+
+	reply->deleteLater();
+	getMapReply_=0;
+}
+
+void MvQWmsGetClient::slotReplyLegend(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		QString ems="Legend download failed!\nError: ";
+		ems+=reply->errorString();
+		marslog(LOG_EROR,"Legend download failed!\nError: %s ",reply->errorString().toStdString().c_str());
+		//log->error(reply->errorString().toStdString() + "\n");			
+		downloadLogo();
+		//QApplication::exit();
+		return;	
+	}
+	else
+	{	
+		QByteArray ba=reply->readAll();
+
+		//If exception is returned ot mime type is 
+		//different ot what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||
+		   mimeType.contains("text/xml") ||
+		   mimeType.contains("text/plain") ) //||
+		//   mimeType != getRequestedMimeType(url.toString()))		
+		{
+			QApplication::exit();
+			return;
+		}
+		else
+		{
+			QString outFile=QString::fromStdString(marstmp());
+
+			QFile out(outFile);
+			out.open(QIODevice::WriteOnly);
+			out.write(ba);
+			out.close();
+
+			legendImagePath_=outFile;
+
+			//QApplication::exit();
+			downloadLogo();
+		}
+	}
+
+	reply->deleteLater();
+	legendReply_=0;
+}
+
+
+void MvQWmsGetClient::slotReplyLogo(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		QString ems="Logo download failed!\nError: ";
+		ems+=reply->errorString();
+		marslog(LOG_EROR,"Logo download failed!\nError: %s ",reply->errorString().toStdString().c_str());
+		//log->error(reply->errorString().toStdString() + "\n");			
+		QApplication::exit();
+		return;	
+	}
+	else
+	{	
+		QByteArray ba=reply->readAll();
+
+		//If exception is returned ot mime type is 
+		//different ot what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||
+		   mimeType.contains("text/xml") ||
+		   mimeType.contains("text/plain") ) //||
+		//   mimeType != getRequestedMimeType(url.toString()))		
+		{
+			QApplication::exit();
+			return;
+		}
+		else
+		{
+			QString outFile=QString::fromStdString(marstmp());
+
+			QFile out(outFile);
+			out.open(QIODevice::WriteOnly);
+			out.write(ba);
+			out.close();
+
+			logoImagePath_=outFile;
+
+			QImage img(outFile);
+			if(img.width() > 100)
+			{
+				img.scaledToWidth(100,Qt::SmoothTransformation).save(outFile,"png");
+			}
+
+			QApplication::exit();
+		}
+	}
+
+	reply->deleteLater();
+	logoReply_=0;
+}
+
+
+
+//=================================
+// 
+// Client for the user interface
+//
+//=================================
+
+MvQWmsUiClient::MvQWmsUiClient(string& iconFile, MvRequest& req):
+	iconFile_(QString::fromStdString(iconFile)),
+	reqInfo_ (req)
+{
+
+	char *shareDir=getenv("METVIEW_DIR_SHARE");
+	if(shareDir)
+	{	
+		string path(shareDir);
+		path.append("/etc/");
+
+		string defFileName=path+ "WmsClientDef";
+		string rulesFileName=path + "WmsClientRules";
+
+		MvLanguage langMetview ( defFileName.c_str(),
+				  rulesFileName.c_str(),
+				  EXPAND_DEFAULTS);
+
+	        reqInfo_=langMetview.expandOne (req);
+        }
+
+
+	reqInfo_.print();	
+
+	getMapRequest_=new MvQGetMapRequest;
+	lastGetMapRequest_=new MvQGetMapRequest;
+
+	// Initialize elements from Metview request
+	url_ = QString((const char*)reqInfo_("SERVER"));
+	version_ = (const char*)reqInfo_("VERSION");
+
+	QStringList timeDimName;
+
+	const char* tdn= (const char*)reqInfo_("TIME_DIMENSIONS");
+	if(tdn)
+	{
+		QString s(tdn);
+		timeDimName=s.split("/");
+	}
+
+	getMapRequest_->setRequest(QString((const char*)reqInfo_("REQUEST")),timeDimName);
+	
+	clientMode_=AdvancedMode;
+	if((const char*)reqInfo_("MODE") !=0)
+	{
+		QString m(reqInfo_("MODE"));
+		if(m=="EXPERT")
+			clientMode_=BasicMode;
+		else
+			clientMode_=AdvancedMode;
+	}	
+	
+	if((const char*)reqInfo_("EXTRA_GETCAP_PAR") !=0)
+	{
+		extraGetCapPar_=QString(reqInfo_("EXTRA_GETCAP_PAR"));	
+	}	
+
+	if((const char*)reqInfo_("EXTRA_GETMAP_PAR") !=0)
+	{
+		extraGetMapPar_=QString(reqInfo_("EXTRA_GETMAP_PAR"));	
+	}	
+
+	if((const char*)reqInfo_("HTTP_USER") !=0)
+	{
+		httpUser_=QString(reqInfo_("HTTP_USER"));	
+	}	
+
+	if((const char*)reqInfo_("HTTP_PASSWORD") !=0)
+	{
+		httpPassword_=QString(reqInfo_("HTTP_PASSWORD"));	
+	}	
+
+
+	//qDebug() << "Init:" << url_ << version_ << getMapRequest_;
+	
+	//Width
+	width_= new MvQOgcIntValue(1024,"WIDTH","Width:");
+	QString val=getMapRequest_->item(width_->requestName());
+	if(!val.isEmpty())
+		width_->setValue(val.toInt());
+	
+	//Height
+	height_= new MvQOgcIntValue(512,"HEIGHT","Height:");
+	val=getMapRequest_->item(height_->requestName());
+	if(!val.isEmpty())
+		height_->setValue(val.toInt());
+
+	//Format
+	format_= new MvQOgcList("FORMAT","Format:");
+
+	//Transparent
+	transparent_= new MvQOgcList("TRANSPARENT","Transparent:");	
+	transparent_->setValues(QStringList() << "TRUE" << "FALSE");
+	transparent_->setDisplayValues(QStringList() << "True" << "False");
+	val=getMapRequest_->item(transparent_->requestName());
+	
+	//If it is a new request we set transparency to TRUE by default
+	if(val.isEmpty() && getMapRequest_->request().isEmpty())
+	{
+		transparent_->setCurrentValue("TRUE");
+	}
+	else
+	{
+		transparent_->setCurrentValue(val);
+	}
+
+	//BgColour
+	bgColour_= new MvQOgcColourValue("#FFFFFF","BGCOLOUR","Bg colour:");
+
+	//Layer
+	layer_= new MvQOgcTree("LAYERS","Layer:");
+
+	//CRS/SRS	
+	crs_= new MvQOgcCrsList("CRS","CRS:");
+			
+	//Style
+	style_= new MvQOgcStyleList("STYLES","Style:");
+
+	//BoundingBox
+	requestBbox_=new MvQOgcBoundingBox("BBOX","");
+	geographicBbox_=0;
+
+	//Dimension
+		
+	//Network access
+	networkGetCap_ = new MvQNetworkAccessManager(this);
+	networkPreview_ = new MvQNetworkAccessManager(this);
+	networkLegend_ = new MvQNetworkAccessManager(this);
+	networkLogo_ = new MvQNetworkAccessManager(this);
+
+	getCapReply_=0;
+	previewReply_=0;
+	legendReply_=0;
+	logoReply_=0;
+	
+	connect(networkGetCap_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyGetCap(QNetworkReply*)));
+
+	connect(networkPreview_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyPreview(QNetworkReply*)));
+
+	connect(networkLegend_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyLegend(QNetworkReply*)));
+
+	connect(networkLogo_, SIGNAL(replyReadyToProcess(QNetworkReply*)),
+         	this, SLOT(slotReplyLogo(QNetworkReply*)));
+
+	connect(networkGetCap_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+	connect(networkPreview_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+	connect(networkLegend_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+	connect(networkLogo_, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+         	this,SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
+
+	previewFile_=marstmp();
+	legendFile_=marstmp();
+	logoFile_=marstmp();
+
+	//xml namspace
+	xlinkNsDeclaration_="declare namespace xlink = \"http://www.w3.org/1999/xlink\";";
+}	
+
+MvQWmsUiClient::~MvQWmsUiClient()
+{
+	delete width_;
+	delete height_;
+	delete format_;
+	delete transparent_;
+	delete bgColour_;
+	delete layer_;
+	delete crs_;
+	delete style_;
+	delete requestBbox_;
+	delete networkGetCap_;
+	delete networkPreview_;
+	delete networkLegend_;
+	delete networkLogo_;
+
+	clearDimension();
+	clearBoundingBox();
+
+	clearPreview();
+	clearLegend();
+}
+
+void MvQWmsUiClient::reset(QString r)
+{
+	slotAbortDownloadProcess();
+
+	if(clientMode_ == BasicMode)
+	{	
+		getMapRequest_->setRequest(r);
+
+	}
+	else
+	{
+		clearServerDependentData();
+
+		getMapRequest_->setRequest(r);
+
+		QString v=getMapRequest_->item("VERSION");	
+		if(v.isEmpty())
+		{	
+			v=getMapRequest_->item("version");
+		}
+		url_=getMapRequest_->guessUrl();
+		version_=v;
+	}
+
+	emit clientResetDone();		
+}
+
+
+void MvQWmsUiClient::setClientMode(ClientMode mode)
+{
+	if(clientMode_== mode)
+		return;
+
+	if(mode == AdvancedMode)
+	{
+		slotAbortDownloadProcess();
+
+		extraGetMapPar_=getMapRequest_->item("mv_key_extrapar");
+
+		QString v=getMapRequest_->item("VERSION");	
+		if(v.isEmpty())
+		{	
+			v=getMapRequest_->item("version");
+		}
+
+		//qDebug() << "new url:" << getMapRequest_->guessUrl();
+
+		if(url_ !=getMapRequest_->guessUrl() ||
+                   version_ != v)
+		{
+			if(v.isEmpty())
+				setUrl(getMapRequest_->guessUrl());
+			else				
+				setUrl(getMapRequest_->guessUrl(),v);
+		}
+	}
+	
+	clientMode_=mode;
+	
+}
+
+void MvQWmsUiClient::clearServerDependentData(bool keepRequest)
+{
+	capability_.clear();
+	if(!keepRequest)
+	{
+		getMapRequest_->clear();
+	}
+	format_->clear();
+	layer_->clear();
+	clearLayerDependentData();
+	serviceMeta_.clear();
+} 
+
+void MvQWmsUiClient::clearLayerDependentData()
+{
+	crs_->clear();
+	style_->clear();
+	clearDimension();
+	clearBoundingBox();
+} 
+
+void MvQWmsUiClient::clearDimension()
+{
+	foreach(MvQOgcDimension* item, dimension_)
+	{
+		delete item;
+	}
+	dimension_.clear();
+}
+
+void MvQWmsUiClient::clearBoundingBox()
+{
+	foreach(MvQOgcBoundingBox* item, bbox_)
+	{
+		delete item;
+	}
+	bbox_.clear();
+
+	if(geographicBbox_)
+	{
+		delete geographicBbox_;
+		geographicBbox_=0;
+	}
+}
+
+void MvQWmsUiClient::setUrl(const QString &url,const QString version)
+{
+	if(url_ != url)
+	{
+		slotAbortDownloadProcess();
+		url_=url;
+		version_=version;
+		clearServerDependentData();
+	}
+}
+
+void MvQWmsUiClient::setVersion(const QString &version)
+{
+	if(version_ != version)
+	{
+		slotAbortDownloadProcess();
+		version_ = version;
+		//clearServerDependentData();
+	}	
+}
+
+void MvQWmsUiClient::slotRunGetCapabilities()
+{	
+	lastGetMapRequest_->setRequest(getMapRequest_->request());
+	clearServerDependentData(true); //keeps the original request
+
+	QString r=url_;
+
+	r+="?SERVICE=WMS&";
+	if(version_ != "Default")
+	{
+		r+="VERSION=" + version_ + "&";
+	}
+	r+="REQUEST=GetCapabilities";
+	if(!extraGetCapPar_.isEmpty())
+	{
+		r+="&" + extraGetCapPar_;
+	}
+
+	qDebug() << "slotRunGetCapabilities --> request: " << r;
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	log->description("Load GetCapabalitites");
+	log->request(r.toStdString());
+	log->status("In progress");
+	emit logUpdated();
+
+	emit statusMessage(tr("Load GetCapabilitites ..."));
+	
+	getCapReply_ = networkGetCap_->get(QNetworkRequest(QUrl::fromPercentEncoding(r.toUtf8())));
+}
+
+
+void MvQWmsUiClient::downloadPreview(QSize previewSize)
+{
+	MvQGetMapRequest req;
+	req.setRequest(getMapRequest_->requestFrame(0));
+
+	previewSize_=previewSize;
+	
+	QString w=QString::number(previewSize_.width());
+	QString h=QString::number(previewSize_.height());
+
+	MvQOgcNode *node=layer_->currentNode();
+	if(node)
+	{
+		if(!node->attribute("fixedWidth").isEmpty() &&
+		    node->attribute("fixedWidth").toInt() > 0)
+		{
+			w=node->attribute("fixedWidth");
+		}
+		if(!node->attribute("fixedHeight").isEmpty() &&
+		    node->attribute("fixedHeight").toInt() > 0)
+		{
+			h=node->attribute("fixedHeight");
+		}
+	}
+
+	req.setItem("WIDTH",w);
+	req.setItem("HEIGHT",h);
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load preview");
+	log->request(req.request().toStdString());
+	log->status("In progress");
+	emit logUpdated();
+
+	emit statusMessage(tr("Load preview ..."));
+
+	QNetworkRequest netReq(QUrl::fromPercentEncoding(req.request().toUtf8()));
+	netReq.setOriginatingObject(this);
+	previewReply_=networkPreview_->get(netReq);
+}
+
+void MvQWmsUiClient::downloadLegend()
+{
+	if(!style_->currentLegend().isEmpty())	
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load legend");
+		log->request(style_->currentLegend().toStdString());
+		log->status("In progress");
+		emit logUpdated();
+
+		emit statusMessage(tr("Load legend ..."));
+
+		//Fix for KNMI radar
+		qDebug() << "downloadLegend --> request:" << style_->currentLegend();
+		QNetworkRequest netReq(QUrl::fromPercentEncoding(style_->currentLegend().toUtf8()));		
+		netReq.setOriginatingObject(this);
+		legendReply_=networkLegend_->get(netReq);			
+	}
+	else
+	{
+		emit legendLoaded(QString());
+	}
+}
+
+void MvQWmsUiClient::downloadLogo()
+{
+	MvQOgcNode *node=layer_->currentNode();
+	if(node && !node->logo().isEmpty())	
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load logo");
+		log->request(node->logo().toStdString());
+		log->status("In progress");
+		emit logUpdated();
+
+		emit statusMessage(tr("Load logo ..."));
+
+		//Fix for KNMI radar
+		qDebug() << "downloadLogo --> request:" << node->logo();
+		QNetworkRequest netReq(QUrl::fromPercentEncoding(node->logo().toUtf8()));		
+		netReq.setOriginatingObject(this);
+		logoReply_=networkLogo_->get(netReq);
+	}
+	else
+	{
+		emit logoLoaded(QString());
+	}
+}
+
+void MvQWmsUiClient::setGetMapRequest(QString r)
+{
+	if(clientMode_==BasicMode)
+	{
+		getMapRequest_->editRequest(r);
+		emit getMapRequestChanged(getMapRequest_->request(),getMapRequest_->requestFrame());
+	}
+}
+
+
+void MvQWmsUiClient::slotSaveInfo()
+{
+	// Get info
+	MvRequest r("WMSCLIENT");
+     	
+	r("SERVER") = url_.toStdString().c_str();
+	r("VERSION") = version_.toStdString().c_str();
+	r("REQUEST") = getMapRequest_->request().toStdString().c_str();
+	r("TIME_DIMENSIONS") = 	timeDimName().join("/").toStdString().c_str();
+	//r("NON_TIME_DIMENSIONS") =  nonTimeDimName().join("/").toStdString().c_str();
+
+	//	reqInfo_("SERVICE") = 1;
+	if(clientMode_ == BasicMode)
+	{
+		r("MODE") = "EXPERT";
+	}
+	else
+	{
+		r("MODE") = "INTERACTIVE";
+	}
+
+   	r("EXTRA_GETCAP_PAR") = extraGetCapPar_.toStdString().c_str();
+	r("EXTRA_GETMAP_PAR") = extraGetMapPar_.toStdString().c_str();
+
+	r("HTTP_USER") = httpUser_.toStdString().c_str();
+	r("HTTP_PASSWORD") = httpPassword_.toStdString().c_str();
+
+	r("LAYER_TITLE") = layer_->currentDisplayValue().toStdString().c_str();
+	r("LAYER_DESCRIPTION") = layer_->currentDescription().toStdString().c_str();
+	r("SERVICE_TITLE") =  serviceMeta_["Title"].toStdString().c_str();
+	r("LAYER_LEGEND") = style_->currentLegend().toStdString().c_str();
+
+	MvQOgcNode *node=layer_->currentNode();
+	if(node)
+	{
+		r("LAYER_LOGO") = node->logo().toStdString().c_str();
+
+		if(!node->attribute("noSubsets").isEmpty())
+		{
+			r("LAYER_NOSUBSETS") =  node->attribute("noSubsets").toStdString().c_str();
+		}
+		if(!node->attribute("fixedWidth").isEmpty())
+		{
+			r("LAYER_FIXEDWITH") = node->attribute("fixedWidth").toStdString().c_str();
+		}
+		if(!node->attribute("fixedHeight").isEmpty())
+		{
+			r("LAYER_FIXEDHEIGHT")=node->attribute("fixedHeight").toStdString().c_str();
+		}
+	}
+
+	r("MAX_BOUNDING_BOX") =  getMapRequest_->item("BBOX").split(",").join("/").toStdString().c_str();
+
+	//qDebug() << version_;
+	//qDebug() << url_;
+
+	MvRequest rout;
+
+	r.print();
+
+	char *shareDir=getenv("METVIEW_DIR_SHARE");
+	if(shareDir)
+	{	
+		string path(shareDir);
+		path.append("/etc/");
+
+		string defFileName=path+ "WmsClientDef";
+		string rulesFileName=path + "WmsClientRules";
+
+		MvLanguage langMetview ( defFileName.c_str(),
+				  rulesFileName.c_str(),
+				  EXPAND_NO_DEFAULT);
+
+	        rout=langMetview.expandOne (r);
+		
+		if(!rout)
+			rout=r;  
+        }
+	else
+	{
+		rout=r;
+	}
+
+	qDebug() << "slotSaveInfo -->";	
+	rout.print();
+
+	// Save info request
+	rout.save(iconFile_.toStdString().c_str());
+}
+
+
+void MvQWmsUiClient::slotAuthentication(QNetworkReply */*reply*/,QAuthenticator *auth)
+{
+	auth->setUser("reading");
+	auth->setPassword("metview");
+
+	//auth->setUser(httpUser_);
+	//auth->setPassword(httpPassword_);
+}
+
+void MvQWmsUiClient::slotReplyGetCap(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load GetCapabilities");
+	
+	if(reply->error() != QNetworkReply::NoError)
+	{	
+		log->error(reply->errorString().toStdString() + "\n");			
+
+		emit getCapabilityLoaded();
+		emit logUpdated();
+		emit statusMessage(tr("Load GetCapabilities <font color=red>(FAILED)</font>"));
+		 //QApplication::exit();
+	}
+	else
+	{			
+		QByteArray ba=reply->readAll();		
+
+		QString eMsg;
+		if(!mimeType.contains("application/vnd.ogc.wms_xml")) // ||
+		 //   mimeType.contains("text/xml"))  
+		  //&& mimeType == "application/vnd.ogc.se_xml")
+		{
+			readException(ba,eMsg);
+		}
+
+		if(!eMsg.isEmpty())
+		{			
+			capability_.clear();
+			log->error(eMsg.toStdString() + "\n");
+			emit getCapabilityLoaded();
+			emit logUpdated();
+			emit statusMessage(tr("Load GetCapabilities <font color=red>(FAILED)</font>"));
+		}
+		else
+		{  
+			capability_ = QString(ba);
+		
+			//Uncomment these lines to load a getCapabilities file from the disk
+			/*QFile file("/var/tmp/cgr/PERFORCE/metview_4/src/OgcClient/marc_dla.xml");
+    			if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+         			return;
+
+			capability_=QString(file.readAll());*/
+
+			repliedVersion_=readVersion();			
+			readService();
+			readFormat();			
+			readLayer();
+
+			updateAfterGetCapLoaded();			
+			
+			emit getCapabilityLoaded();
+			emit logUpdated();
+			emit statusMessage(tr("Load GetCapabilities <font color=green>(OK)</font>"));
+		}	
+	}
+
+	reply->deleteLater();
+	getCapReply_=0;
+}
+
+void MvQWmsUiClient::updateAfterGetCapLoaded()
+{
+	QString val;
+
+	if(lastGetMapRequest_->request().isEmpty())
+	{
+		return;
+	}
+
+	val=lastGetMapRequest_->item(width_->requestName());
+	width_->setValue(val.toInt());
+
+	val=lastGetMapRequest_->item(height_->requestName());
+	height_->setValue(val.toInt());
+
+	val=lastGetMapRequest_->item(transparent_->requestName());
+	transparent_->setCurrentValue(val);
+
+	val=lastGetMapRequest_->item(format_->requestName());
+	format_->setCurrentValue(val);
+
+	val=lastGetMapRequest_->item(layer_->requestName());
+	layer_->setCurrentValue(val);
+
+	updateAfterLayerLoaded();
+}
+
+void MvQWmsUiClient::updateAfterLayerLoaded()
+{
+	//lastGetMapRequest_->setRequest(getMapRequest_->request());
+
+	QString val;
+
+	MvQOgcNode *node=layer_->currentNode();
+	if(node)
+	{
+		if(!node->attribute("fixedWidth").isEmpty())
+		{
+			val=node->attribute("fixedWidth");
+			if(val.toInt() > 0)
+				width_->setValue(val.toInt());
+		}
+		if(!node->attribute("fixedHeight").isEmpty())
+		{
+			val=node->attribute("fixedHeight");
+			if(val.toInt() > 0)
+				height_->setValue(val.toInt());
+		}
+	}
+
+	//readLayerAbstract();
+	readStyle();
+	readBoundingBox(); //bounding box should be called before crs!!!!!
+	readCrs();
+	readGeographicBoundingBox();
+	readDimension();
+	readAttribution();
+
+	val=lastGetMapRequest_->item(style_->requestName());
+	style_->setCurrentValue(val);
+
+	val=lastGetMapRequest_->item(crs_->requestName());
+	crs_->setCurrentValue(val);
+
+	updatRequestBoundingBox();
+	
+	foreach(MvQOgcDimension* dim,dimension_)
+	{
+		val=lastGetMapRequest_->item(dim->requestName());
+		dim->setCurrentValues(val);
+	}
+
+	buildGetMapRequest();
+
+	//qDebug() << lastGetMapRequest_->request() << "\n" << getMapRequest_->request();
+}
+
+void MvQWmsUiClient::slotReplyPreview(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load preview");
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		log->error(reply->errorString().toStdString() + "\n");	
+		emit previewLoaded(QString());
+		emit statusMessage(tr("Load preview <font color=red>(FAILED)</font>"));		
+		
+	}
+	else
+	{	
+		QString outFile=previewFile_;
+		QByteArray ba=reply->readAll();
+
+		if(mimeType.isEmpty())
+			mimeType=getMimeType(ba);
+
+		//qDebug() << "preview mimeType" << mimeType;
+
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||     
+		   mimeType.contains("text/xml") ||
+		   !mimeType.contains(getRequestedMimeType(url.toString())))
+		{
+			QString eMsg;
+			readException(ba,eMsg);
+
+			log->error(eMsg.toStdString() + "\n");
+			emit previewLoaded(QString());
+			emit statusMessage(tr("Load preview <font color=red>(FAILED)</font>"));
+		}
+		else if(mimeType.contains("text/plain")) 	
+		{
+			QString eMsg(ba);
+		
+			log->error(eMsg.toStdString() + "\n");
+			emit legendLoaded(QString());
+			emit statusMessage(tr("Load preview <font color=red>(FAILED)</font>"));
+		}
+		else
+		{
+			qDebug() << "preview outfile" << outFile;
+
+			QImage img=QImage::fromData(ba);
+			if(!img.isNull())
+			{
+				img=img.scaledToWidth(previewSize_.width(),Qt::SmoothTransformation);
+				img.save(outFile,"png");
+			}
+			else
+			{					
+				QFile out(outFile);
+				out.open(QIODevice::WriteOnly);
+				out.write(ba);
+				out.close();
+			}
+
+			emit previewLoaded(outFile);
+			emit statusMessage(tr("Load preview <font color=green>(OK)</font>"));
+		}
+	}
+
+	emit logUpdated();
+
+	reply->deleteLater();
+	previewReply_=0;
+}
+
+void MvQWmsUiClient::slotReplyLegend(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load legend");
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		log->error(reply->errorString().toStdString() + "\n");	
+		emit legendLoaded(QString());
+		emit statusMessage(tr("Load legend <font color=red>(FAILED)</font>"));				
+	}
+	else
+	{	
+		QString outFile=legendFile_;
+		QByteArray ba=reply->readAll();
+
+		if(mimeType.isEmpty())
+			mimeType=getMimeType(ba);
+
+		//qDebug() << "mime" << mimeType << getRequestedMimeType(url.toString());
+
+		//If exception is returned or mime type is 
+		//different to what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||
+		   mimeType.contains("text/xml"))
+		//    || mimeType != getRequestedMimeType(url.toString()))		
+		{
+			QString eMsg;
+			readException(ba,eMsg);
+
+			log->error(eMsg.toStdString() + "\n");
+			emit legendLoaded(QString());
+			emit statusMessage(tr("Load legend <font color=red>(FAILED)</font>"));
+		}
+		else if(mimeType.contains("text/plain") ) 	
+		{
+			QString eMsg(ba);
+		
+			log->error(eMsg.toStdString() + "\n");
+			emit legendLoaded(QString());
+			emit statusMessage(tr("Load legend <font color=red>(FAILED)</font>"));
+		}
+		else
+		{
+			//qDebug() << outFile;
+
+			QFile out(outFile);
+			out.open(QIODevice::WriteOnly);
+			out.write(ba);
+			out.close();
+
+			emit legendLoaded(outFile);
+			emit statusMessage(tr("Load legend <font color=green>(OK)</font>"));
+		}
+	}
+
+	emit logUpdated();
+
+	reply->deleteLater();
+	legendReply_=0;
+}
+
+void MvQWmsUiClient::slotReplyLogo(QNetworkReply* reply)
+{
+	QNetworkRequest r=reply->request();
+	QUrl url=r.url();
+
+	//qDebug() << url.toString();
+
+	QString mimeType=reply->header(QNetworkRequest::ContentTypeHeader).toString();
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+	log->description("Load logo");
+
+	if(reply->error() != QNetworkReply::NoError)
+	{
+		log->error(reply->errorString().toStdString() + "\n");	
+		emit logoLoaded(QString());
+		emit statusMessage(tr("Load logo <font color=red>(FAILED)</font>"));				
+	}
+	else
+	{	
+		QString outFile=logoFile_;
+		QByteArray ba=reply->readAll();
+
+		if(mimeType.isEmpty())
+			mimeType=getMimeType(ba);
+
+		//qDebug() << "mime" << mimeType << getRequestedMimeType(url.toString());
+
+		//If exception is returned or mime type is 
+		//different to what was requested
+		if(mimeType.contains("application/vnd.ogc.se_xml") ||
+		   mimeType.contains("text/xml"))
+		//    || mimeType != getRequestedMimeType(url.toString()))		
+		{
+			QString eMsg;
+			readException(ba,eMsg);
+
+			log->error(eMsg.toStdString() + "\n");
+			emit logoLoaded(QString());
+			emit statusMessage(tr("Load logo <font color=red>(FAILED)</font>"));
+		}
+		else if(mimeType.contains("text/plain") ) 	
+		{
+			QString eMsg(ba);
+		
+			log->error(eMsg.toStdString() + "\n");
+			emit logoLoaded(QString());
+			emit statusMessage(tr("Load logo <font color=red>(FAILED)</font>"));
+		}
+		else
+		{
+			//qDebug() << outFile;
+
+			QFile out(outFile);
+			out.open(QIODevice::WriteOnly);
+			out.write(ba);
+			out.close();
+
+			QImage img(outFile);
+			if(img.width() > 100)
+			{
+				img.scaledToWidth(100,Qt::SmoothTransformation).save(outFile,"png");
+			}
+
+			emit logoLoaded(outFile);
+			emit statusMessage(tr("Load logo <font color=green>(OK)</font>"));
+		}
+	}
+
+	emit logUpdated();
+
+	reply->deleteLater();
+	logoReply_=0;
+}
+
+
+bool MvQWmsUiClient::previewDownloadActive()
+{
+	return previewReply_ && previewReply_->isRunning();
+}
+
+bool MvQWmsUiClient::legendDownloadActive()
+{
+	return legendReply_ && legendReply_->isRunning();
+}
+
+void MvQWmsUiClient::slotAbortDownloadProcess()
+{
+	if(getCapReply_ && getCapReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load GetCapabalitites");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load GetCapabilitites <font color=red>(Interrupted)</font>"));
+
+		getCapReply_->deleteLater();
+		getCapReply_=0;
+		emit getCapabilityLoaded();
+		emit logUpdated();
+	}
+	else if(previewReply_ && previewReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load preview");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load preview <font color=red>(Interrupted)</font>"));
+
+		previewReply_->deleteLater();
+		previewReply_=0;
+		clearPreview();
+		emit previewLoaded(previewFile_);
+		emit logUpdated();
+	}
+	else if(legendReply_ && legendReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load legend");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load legend <font color=red>(Interrupted)</font>"));
+
+		legendReply_->deleteLater();
+		legendReply_=0;
+		clearLegend();
+		emit legendLoaded(legendFile_);
+		emit logUpdated();
+	}
+	else if(logoReply_ && logoReply_->isRunning())
+	{
+		LogItem *log=new LogItem;
+		LogHandler::instance()->add(log);
+		log->description("Load logo");
+		log->error("Interrupted\n");
+
+		emit statusMessage(tr("Load logo <font color=red>(Interrupted)</font>"));
+
+		logoReply_->deleteLater();
+		logoReply_=0;
+		clearLogo();
+		emit logoLoaded(logoFile_);
+		emit logUpdated();
+	}
+
+}
+
+QString MvQWmsUiClient::readVersion()
+{
+	QString result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	defaultNsDeclaration_="declare default element namespace \"http://www.opengis.net/wms\";";
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//WMS_Capabilities/data(@version)");
+	query.evaluateTo(&result);
+
+	if(result.simplified().isEmpty())
+	{
+		query.setQuery("doc($myDoc)//WMT_MS_Capabilities/data(@version)");
+		query.evaluateTo(&result);
+		defaultNsDeclaration_.clear();
+	}
+
+	buffer.close();
+
+	qDebug() << "readVersion --> version: " << result;
+	
+	//Remove linebreak!!
+
+	return result.simplified();
+}
+
+void MvQWmsUiClient::readService()
+{
+	serviceMeta_.clear();
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	//query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Service/data(Title)");
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Service");
+	query.evaluateTo(&result);
+
+	//serviceTitle_=result.simplified();	
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			query.setFocus(item);
+
+			QString str;
+
+			query.setQuery(defaultNsDeclaration_ + "./data(Title)");
+			query.evaluateTo(&str);
+			serviceMeta_["Title"] = str.simplified();
+
+			query.setQuery(defaultNsDeclaration_ + "./data(Abstract)");
+			query.evaluateTo(&str);
+			serviceMeta_["Abstract"] = str.simplified();
+		
+			QStringList tags;
+			tags << "ContactPerson" << "ContactOrganization" << "ContactPosition" << 
+				"AddressType" << "Address" << "City" << "StateOrProvince" <<
+				"PostCode" << "Country" << "ContactVoiceTelephone" <<
+				"ContactFacsimileTelephone" << "ContactElectronicMailAddress";
+
+			foreach(QString t, tags)
+			{
+				str.clear();
+				QString q=defaultNsDeclaration_ + ".//data(" + t +")";	
+				query.setQuery(q);
+				query.evaluateTo(&str);
+				serviceMeta_[t] = str.simplified();
+			}
+
+			break;
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "readService -->" << serviceMeta_;
+	//Remove linebreak!!
+}
+
+		
+void MvQWmsUiClient::readFormat()
+{
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+
+	if(repliedVersion_ > "1.0")
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Capability/Request/GetMap/data(Format)");
+	}
+	else
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Capability/Request/Map/data(Format)");
+	}
+
+	query.evaluateTo(&result);
+
+	QStringList lst;
+     	query.getAtomicValues(result,lst);
+	lst.sort();
+	format_->setValues(lst);
+	format_->setDisplayValues(lst);
+		
+	buffer.close();
+
+	qDebug() << "readFormat --> formats:" << lst;
+}
+
+void MvQWmsUiClient::readLayer()
+{
+	//Dom
+	QDomDocument doc("mydocument");
+	
+ 	if (!doc.setContent(capability_,true)) 
+	{
+     		return;
+ 	}
+
+	QDomElement docElem = doc.documentElement();
+	readLayer(docElem,layer_->root());
+
+	qDebug() << "Layers ---> ";
+}
+
+void MvQWmsUiClient::readLayer(QDomElement &docElem,MvQOgcNode *parent)
+{	
+	QDomNode dNode = docElem.firstChild();
+ 	while(!dNode.isNull()) 
+	{
+		QDomElement dElem = dNode.toElement();
+		if(!dElem.isNull())
+		{
+			if(dElem.tagName() =="Layer")
+			{
+				MvQOgcNode *layer=new MvQOgcNode;
+				parent->addChild(layer);
+
+				QDomNode title=dNode.namedItem("Title");
+				if(!title.isNull())
+				{	
+					//qDebug() << title.toElement().text().simplified();				
+					layer->setDisplayValue(title.toElement().text().simplified());
+				}
+				
+				QDomNode name=dNode.namedItem("Name");
+				if(!name.isNull())
+				{
+					layer->setValue(name.toElement().text().simplified());
+				} 
+
+				QDomNode desc=dNode.namedItem("Abstract");
+				if(!desc.isNull())
+				{
+					layer->setDescription(desc.toElement().text().simplified());
+				}
+				else if(layer->parent())
+				{
+					layer->setDescription(layer->parent()->description());
+				} 
+
+				QDomNamedNodeMap att=dNode.attributes();
+				for(int i=0; i < att.size(); i++)
+				{
+					QDomAttr da=att.item(i).toAttr();
+					if(!da.isNull())
+					{
+						layer->addAttribute(da.name(),da.value());
+					}
+				}	
+
+				readLayer(dElem,layer);
+			}
+			else
+			{									
+				readLayer(dElem,parent);
+			}
+		}
+
+		dNode = dNode.nextSibling();
+	}
+}
+
+
+void MvQWmsUiClient::readStyle()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/Style");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	QStringList nameLst,titleLst,abstractLst,legendLst;
+	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QString name,title,abstract,legend;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name
+			query.setQuery(defaultNsDeclaration_ + "./data(Name)");
+			query.evaluateTo(&name);
+			nameLst << name.simplified();
+
+			//Title
+			query.setQuery(defaultNsDeclaration_ + "./data(Title)");
+			query.evaluateTo(&title);
+			titleLst << title.simplified();
+
+			//Abstract
+			query.setQuery(defaultNsDeclaration_ + "./data(Abstract)");
+			query.evaluateTo(&abstract);
+			abstractLst << abstract.simplified();
+
+			//Legend url
+			query.setQuery(defaultNsDeclaration_ + xlinkNsDeclaration_ + "string(./LegendURL/OnlineResource/@xlink:href)");
+			query.evaluateTo(&legend);
+			legendLst << legend.simplified();
+
+			style_->setValues(nameLst);
+			style_->setDisplayValues(titleLst);
+			style_->setDescriptions(abstractLst);
+			style_->setLegends(legendLst);
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "Style ---> ";
+	qDebug() << "\t" << titleLst;
+}
+
+void MvQWmsUiClient::readCrs()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	//query.bindVariable("myCrsName", QVariant(crsRequestName()));	
+	if(crsRequestName() == "SRS")
+	{
+		query.setQuery("doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/data(SRS)");
+	}
+	else
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/data(CRS)");
+	}
+
+	query.evaluateTo(&result);
+
+	QStringList lst;
+	query.getAtomicValues(result,lst);
+
+	if(repliedVersion_ <= "1.1.0")
+	{
+		QStringList lstOri=lst;
+		lst.clear();
+		foreach(QString s,lstOri)
+		{
+			lst << s.split(" ");
+		}
+	}
+
+	if(repliedVersion_ >= "1.3.0")
+	{
+		QStringList lstOri=lst;
+		lst.clear();
+		foreach(QString s,lstOri)
+		{
+			if(s == "EPSG:4326" || s == "CRS:84" )
+			{
+			  	lst << s;
+			}	
+			else
+			{  
+				foreach(MvQOgcBoundingBox *bb, bbox_)
+				{
+					if(s == bb->crs())
+					{
+			  			lst << s;
+						break;
+					}
+				}
+			}	
+		}
+	}  
+	  
+	lst.removeDuplicates();
+	lst.sort();	
+
+	crs_->setValues(lst);
+	crs_->setRequestName(crsRequestName());
+	crs_->setDisplayName(crsDisplayName());
+
+	buffer.close();
+
+	qDebug() << "CRS ---> ";
+	qDebug() << "\t" << lst;
+}	
+
+void MvQWmsUiClient::readBoundingBox()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/BoundingBox");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QMap<QString,QString> att;
+			query.getAttributes(item,att);
+
+			MvQOgcBoundingBox *bb=new MvQOgcBoundingBox(att);
+
+			//Remove all previously defined (in the ancestors) bboxes
+			foreach(MvQOgcBoundingBox *bitem, bbox_)
+			{
+				if(bitem->crs() == bb->crs())
+				{
+					bbox_.removeOne(bitem);
+					delete bitem;
+					break;
+					
+				}
+			}
+
+			bbox_.push_back(bb);
+
+			//qDebug() << "bb" <<  bb->crs() << bb->minX() << bb->maxX();
+
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+}	
+
+
+
+void MvQWmsUiClient::readGeographicBoundingBox()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QStringList str;
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+
+	if(repliedVersion_ >= "1.3.0")
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/EX_GeographicBoundingBox");
+		query.evaluateTo(&result);
+
+		QMap<QString,QString> att;
+
+		QXmlItem item(result.next());
+     		while (!item.isNull()) 
+		{
+         		if (item.isNode()) 
+			{								
+				QString val;
+
+				//QXmlQuery query;
+				query.setFocus(item);
+		
+				query.setQuery(defaultNsDeclaration_ + "./data(westBoundLongitude)");
+				query.evaluateTo(&val);
+				att["westBoundLongitude"]=val.simplified();
+			
+				query.setQuery(defaultNsDeclaration_ + "./data(eastBoundLongitude)");
+				query.evaluateTo(&val);
+				att["eastBoundLongitude"]=val.simplified();
+
+				query.setQuery(defaultNsDeclaration_ + "./data(southBoundLatitude)");
+				query.evaluateTo(&val);
+				att["southBoundLatitude"]=val.simplified();
+
+				query.setQuery(defaultNsDeclaration_ + "./data(northBoundLatitude)");
+				query.evaluateTo(&val);
+				att["northBoundLatitude"]=val.simplified();
+
+				qDebug() << att;
+
+				if(geographicBbox_)
+				{	
+					delete geographicBbox_;
+				}
+				geographicBbox_=new MvQOgcGeoBoundingBox(att); //new MvQXmlElementNode(query,item);
+				break;
+                	 }
+
+			item = result.next();
+		}
+        }
+	else
+	{
+		query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/LatLonBoundingBox");
+
+		query.evaluateTo(&result);
+
+		QXmlItem item(result.next());
+     		while (!item.isNull()) 
+		{
+         		if (item.isNode()) 
+			{		
+				QMap<QString,QString> att;
+				query.getAttributes(item,att);
+
+				qDebug() << att;
+
+				if(geographicBbox_)
+				{	
+					delete geographicBbox_;
+				}
+				geographicBbox_=new MvQOgcGeoBoundingBox(att); //new MvQXmlElementNode(query,item);
+				break;
+                	 }
+			item = result.next();
+		}
+         }
+
+}
+
+void MvQWmsUiClient::readDimension()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/Dimension");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QMap<QString,QString> att;
+			QString value;
+
+			query.getAttributes(item,att);
+			query.getAtomicValue(item,value);
+
+			MvQOgcDimension *dim=new MvQOgcDimension(att,value);
+
+			for(int i=0; i < dimension_.count();i++)
+			{
+				if(dim->name().compare(dimension_[i]->name(),Qt::CaseInsensitive) == 0)
+				{
+					MvQOgcDimension *item=dimension_[i];
+					dimension_.removeAt(i);
+					delete item;
+					break;
+				}
+			} 
+
+			if(dim->name().compare("time",Qt::CaseInsensitive) == 0)
+			{
+				dim->setRequestName("TIME");
+				dim->setDisplayName("Time:");
+			}
+			else if(dim->name().compare("elevation",Qt::CaseInsensitive) == 0)
+			{
+				dim->setRequestName("ELEVATION");
+				dim->setDisplayName("Elevation:");
+			}
+			else
+			{
+				QString dname=dim->name();
+				dname=dname.toUpper();
+				dname="DIM_" + dname;
+				dim->setRequestName(dname);
+				dname+=" :";
+				dim->setDisplayName(dname);
+			}
+			
+			dimension_.push_back(dim);
+                 }
+		item = result.next();
+         }
+
+	if(repliedVersion_ >= "1.3.0")
+	 	return;
+
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/Extent");
+	query.evaluateTo(&result);
+
+	item=result.next();
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QMap<QString,QString> att;
+			QString value;
+
+			query.getAttributes(item,att);
+			query.getAtomicValue(item,value);
+
+			//MvQXmlElementNode *elem=new MvQXmlElementNode(query,item);
+			foreach(MvQOgcDimension* dim, dimension_)
+			{
+				if(dim->name() == att["name"])
+				{
+					dim->setAttributes(att);
+					dim->setValues(value);
+					break;
+				}
+			}
+                 }
+		item = result.next();
+         }
+}
+
+void MvQWmsUiClient::readAttribution()
+{
+	if(layer_->currentValue().isEmpty())
+		return;
+
+	MvQOgcNode *layerNode=layer_->currentNode();
+	if(!layerNode)
+		return;	
+
+	QXmlResultItems result;
+
+	QByteArray ba=capability_.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("myLayer", QVariant(layer_->currentValue()));
+	query.setQuery(defaultNsDeclaration_ + "doc($myDoc)//Layer[normalize-space(Name) = $myLayer]/ancestor-or-self::*/Attribution");
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			QString logo;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Logo url
+			query.setQuery(defaultNsDeclaration_ + xlinkNsDeclaration_ + "string(./LogoURL/OnlineResource/@xlink:href)");
+			query.evaluateTo(&logo);			
+			layerNode->setLogo(logo.simplified());
+                 }
+		item = result.next();
+        }
+
+	buffer.close();
+
+	qDebug() << "Attribution ---> ";
+	qDebug() << "\t" << layerNode->logo();
+}
+
+void MvQWmsUiClient::readException(QByteArray ba,QString &msg)
+{
+	//if(xmlMsg.isEmpty())
+	//	return;
+
+	QXmlResultItems result;
+
+	qDebug() << "Exception" << ba;
+
+	//QByteArray ba=xmlMsg.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+	
+	QString ns;
+	if(repliedVersion_ >= "1.3.0")
+		ns="declare default element namespace \"http://www.opengis.net/ogc\";";
+	
+	MvQXmlQuery query;
+	query.setMessageHandler(queryMsgHandler_);
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery(ns + "doc($myDoc)//ServiceExceptionReport/ServiceException");			  
+	query.evaluateTo(&result);
+
+	QXmlItem item(result.next());
+	if(item.isNull())
+	{
+		query.setQuery("doc($myDoc)//ServiceExceptionReport/ServiceException");			  
+		query.evaluateTo(&result);
+		item=result.next();
+	}
+	
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{								
+			msg += "Exception: ";
+
+			QMap<QString,QString> att;
+			QString value;
+	
+			query.getAttributes(item,att);
+			query.getAtomicValue(item,value);
+			msg +=att["code"].simplified() + "\n";
+			
+			if(!value.isEmpty())
+			{
+				msg += value;
+				msg +='\n';
+			}
+
+                 }
+		item = result.next();
+        }
+
+	//If XML parsing failed
+	if(queryMsgHandler_->fatalFound())
+	{
+		msg += "Exception: parsing of exception document failed!!\n";
+		foreach(QString s, queryMsgHandler_->fatalMessages())
+		{
+		  	msg+=s + '\n';
+			
+		}	
+	}
+
+	queryMsgHandler_->clear();
+	buffer.close();	
+
+}
+
+void MvQWmsUiClient::buildGetMapRequest()
+{	
+	if(layer_->currentValue().isEmpty()) 
+		return;
+
+	getMapRequest_->clear();
+
+	QString s;
+	QString str=url_;
+	str+="?SERVICE=WMS";
+	
+	//Version
+	/*if(version_ != "Default")
+	{
+		str+="&VERSION=";
+		str+=version_;
+	}*/
+
+	str+="&VERSION=";
+	str+=repliedVersion_;
+
+	//Request
+	str+="&REQUEST=GetMap";
+	
+	//Layers	
+	str+="&" + layer_->requestName() + "=" +  layer_->currentValue();
+
+	//Style	
+	str+="&" + style_->requestName() + "="  + style_->currentValue();
+	
+	//srs or crs
+	str+="&" + crs_->requestName() + "=" +  crs_->currentValue();
+	
+	//bbox	
+	str+="&BBOX=" + 
+		requestBbox_->minX() + "," +
+		requestBbox_->minY() + "," +
+		requestBbox_->maxX() + "," +
+		requestBbox_->maxY();
+
+	//width
+	str+="&WIDTH=" + QString::number(width_->value());
+	str+="&HEIGHT=" + QString::number(height_->value());
+	
+	//Format	
+	str+="&" + format_->requestName() + "=" +  format_->currentValue();
+
+	//Transparent	
+	str+="&" + transparent_->requestName() + "=" +  transparent_->currentValue();
+
+	//Dimensions
+	foreach(MvQOgcDimension *dim,dimension_)
+	{	   
+		str+="&";
+	   	str+=dim->requestName();
+	   	str+="=";
+	   	str+=dim->currentValues();
+	}   
+	
+	qDebug() << str;
+
+	if(!extraGetMapPar_.isEmpty())
+	{
+		str+="&" + extraGetMapPar_;
+	}
+
+	getMapRequest_->setRequest(str,timeDimName());
+
+	currentGetMapRequest_=getMapRequest_;
+
+	//qDebug() << getMapRequest_->requestFrame();
+
+	//str+="&stream=false";
+
+	//getMapRequest_=str;
+
+	//saveGetMapRequest(currentGetMapRequest_);
+
+	emit getMapRequestChanged(getMapRequest_->request(),getMapRequest_->requestFrame());
+}
+
+
+//===========================================
+//
+// Get/Set methods
+//
+//===========================================
+
+//Format
+QStringList MvQWmsUiClient::formatDisplayValues() const
+{
+	return format_->displayValues();
+}
+
+QString MvQWmsUiClient::formatCurrentDisplayValue() const
+{
+	return format_->currentDisplayValue();
+}
+
+void  MvQWmsUiClient::slotSetFormatFromDpy(QString value)
+{
+	if(format_->currentDisplayValue() != value)
+	{
+		format_->setCurrentDisplayValue(value);
+		buildGetMapRequest();
+	}
+}
+
+//Transparent
+QStringList MvQWmsUiClient::transparentDisplayValues() const
+{
+	return transparent_->displayValues();
+}
+
+QString MvQWmsUiClient::transparentCurrentDisplayValue() const
+{
+	return transparent_->currentDisplayValue();
+}
+
+void  MvQWmsUiClient::setTransparentCurrentDisplayValue(QString value)
+{
+	if(transparent_->currentDisplayValue() != value)
+	{
+		transparent_->setCurrentDisplayValue(value);
+		buildGetMapRequest();
+	}
+}
+
+//Width
+QString MvQWmsUiClient::width() const
+{
+	return QString::number(width_->value());
+}
+
+void  MvQWmsUiClient::setWidth(QString value)
+{
+	if(width_->value() != value.toInt())
+	{
+		width_->setValue(value.toInt());
+		buildGetMapRequest();
+	}
+}
+
+//Height
+QString MvQWmsUiClient::height() const
+{
+	return QString::number(height_->value());
+}
+
+void  MvQWmsUiClient::setHeight(QString value)
+{
+	if(height_->value() != value.toInt())
+	{
+		height_->setValue(value.toInt());
+		buildGetMapRequest();
+	}
+}
+
+//Extra par
+void  MvQWmsUiClient::setExtraGetCapPar(QString value)
+{
+	if(extraGetCapPar_ != value)
+	{
+		extraGetCapPar_=value;  
+	}
+}
+
+void  MvQWmsUiClient::setExtraGetMapPar(QString value)
+{
+	if(extraGetMapPar_ != value)
+	{
+		extraGetMapPar_=value;  
+		buildGetMapRequest();
+	}
+}
+
+//Style
+QStringList MvQWmsUiClient::styleDisplayValues() const
+{
+	return style_->displayValues();
+}
+
+QStringList MvQWmsUiClient::styleDescriptions() const
+{
+	return style_->descriptions();	
+}
+
+int MvQWmsUiClient::styleCurrentIndex() const
+{
+	return style_->currentIndex();
+}
+
+void MvQWmsUiClient::setStyleCurrentIndex(int index)
+{
+	if(style_->currentIndex() != index)
+	{
+		style_->setCurrentIndex(index);
+		buildGetMapRequest();
+	}
+}
+
+
+//CRS
+QStringList MvQWmsUiClient::crsDisplayValues() const
+{
+	return crs_->displayValues();
+}
+
+QString MvQWmsUiClient::crsCurrentDisplayValue() const
+{
+	return crs_->currentDisplayValue();
+}
+
+void  MvQWmsUiClient::setCrsCurrentDisplayValue(QString value)
+{
+	if(crs_->currentDisplayValue() != value)
+	{
+		slotAbortDownloadProcess();
+		crs_->setCurrentDisplayValue(value);
+		updatRequestBoundingBox();
+		buildGetMapRequest();
+	}
+}
+
+//Layer
+int MvQWmsUiClient::layerCurrentIndex()
+{
+	return 0;
+	//return layer_->values().indexOf(layer_->currentValue());
+}
+
+QStringList MvQWmsUiClient::layerDisplayValues() const
+{
+	return QStringList();
+	//return layer_->displayValues();
+}
+
+QStringList MvQWmsUiClient::layerDescriptions() const
+{
+	return QStringList();
+	//qDebug() << layer_->descriptions();
+	//return layer_->descriptions();	
+}
+
+void MvQWmsUiClient::setLayerFromDpy(MvQOgcNode* node)
+{
+	slotAbortDownloadProcess();
+
+	clearLayerDependentData();
+
+	layer_->setCurrentNode(node);
+
+	lastGetMapRequest_->setRequest(getMapRequest_->request());
+
+	updateAfterLayerLoaded();	
+}
+
+
+//BBOX
+void MvQWmsUiClient::setBoundingBoxFromDpy(QString minX,QString maxX, QString minY, QString maxY)
+{
+	slotAbortDownloadProcess();
+	requestBbox_->setArea(minX,maxX,minY,maxY);
+	buildGetMapRequest();	
+}	
+
+MvQOgcBoundingBox MvQWmsUiClient::lastBoundingBox() const
+{
+	QString lastValue=lastGetMapRequest_->item("BBOX");
+	QStringList lst=lastValue.split(",");
+	MvQOgcBoundingBox bb;
+	if(lst.count() == 4)
+	{
+		bb.setArea(lst[0],lst[2],lst[1],lst[3]);
+	}
+	return bb;
+}
+
+MvQOgcBoundingBox* MvQWmsUiClient::currentBoundingBox() const
+{
+	qDebug() << crs_->currentValue();
+
+	for(int i=bbox_.count()-1; i >=0; i--)
+	{
+		if(bbox_[i]->crs() == crs_->currentValue())
+		{
+			return bbox_[i]; 
+		}
+	}
+	
+	return 0;
+}
+
+//Dimensions
+QStringList MvQWmsUiClient::dimensionNameToDpy() const
+{
+	QStringList lst;
+	/*foreach(MvQOgcDimensionList *dim,dimension_)
+	{
+	    lst << dim->displayName();
+	}*/
+
+	return lst;
+}
+
+QStringList MvQWmsUiClient::dimensionToDpy(QString /*dimDpyName*/) const
+{
+	/*foreach(MvQOgcDimensionList *dim,dimension_)
+	{
+	    if(dim->displayName() == dimDpyName)
+	    {
+		return dim->displayValues();
+	    }
+	}*/
+
+	return QStringList();
+}
+
+void MvQWmsUiClient::setDimensionFromDpy(QString dimDpyName, QString val)
+{
+	slotAbortDownloadProcess();
+
+	foreach(MvQOgcDimension *dim,dimension_)
+	{
+	    if(dim->displayName() == dimDpyName)
+	    {
+		//dim->setCurrentDisplayValue(val);
+		dim->setCurrentValues(val);
+		buildGetMapRequest();
+		return;
+	    }
+	}
+}	
+
+void MvQWmsUiClient::setDimensionFromDpy(QString /*dimDpyName*/, QStringList /*val*/)
+{
+	/*foreach(MvQOgcDimensionList *dim,dimension_)
+	{
+	    if(dim->displayName() == dimDpyName)
+	    {
+		//dim->setCurrentDisplayValues(val);
+		setCurrentValues(val);
+		buildGetMapRequest();
+		return;
+	    }
+	}*/
+}	
+
+QString MvQWmsUiClient::crsQueryName()
+{
+	if(repliedVersion_ < QString("1.3.0"))
+	{
+		return QString("SRS");
+	}
+	else
+	{
+		return QString("CRS");
+	}
+}
+
+QString MvQWmsUiClient::crsRequestName()
+{
+	if(repliedVersion_ < QString("1.3.0"))
+	{
+		return QString("SRS");
+	}
+	else
+	{
+		return QString("CRS");
+	}
+}
+
+QString MvQWmsUiClient::crsDisplayName()
+{
+	if(repliedVersion_ < QString("1.3.0"))
+	{
+		return QString("SRS:");
+	}
+	else
+	{
+		return QString("CRS:");
+	}
+}
+
+QStringList  MvQWmsUiClient::timeDimName()
+{
+	QStringList timeDimName;
+
+	foreach(MvQOgcDimension *dim,dimension_)
+	{
+		if(dim->isTime())
+		{
+			timeDimName << dim->requestName();
+		}
+	}
+	return timeDimName;
+}
+
+void MvQWmsUiClient::clearPreview()
+{
+	//if(previewFile_ != emptyFileNameString_)
+	//{
+		QFile f(previewFile_);
+
+		if(!f.remove())
+		{
+			//qDebug() << "MvQZoomStackLevel::clearPreview() ---> Preview file" << imgFileName_ << "could not be deleted!";
+		}
+		//previewFile_ = emptyFileNameString_;
+	//}
+}
+
+void MvQWmsUiClient::clearLegend()
+{
+	//if(previewFile_ != emptyFileNameString_)
+	//{
+		QFile f(legendFile_);
+
+		if(!f.remove())
+		{
+			//qDebug() << "MvQZoomStackLevel::clearPreview() ---> Preview file" << imgFileName_ << "could not be deleted!";
+		}
+		//previewFile_ = emptyFileNameString_;
+	//}
+}
+
+void MvQWmsUiClient::clearLogo()
+{
+	QFile f(logoFile_);
+
+	if(!f.remove())
+	{
+	}
+}
+
+
+void MvQWmsUiClient::updatRequestBoundingBox()
+{
+	requestBbox_->clear();
+	bool foundBb=false;
+
+	//Check if bbox is available for the current crs. 
+	//It is mandatory from 1.3.0 !!!
+	foreach(MvQOgcBoundingBox* bb,bbox_)
+	{
+		if(bb->crs() == crs_->currentValue())
+		{
+			foundBb=true;
+			requestBbox_->setArea(bb->minX(),bb->maxX(),bb->minY(),bb->maxY());
+			break;
+		}
+	}
+
+	if(!foundBb && geographicBbox_ !=0)
+	{  
+		//For 1.3.0 epsg:4326 lat is x and lon is y!!!!!
+		if(repliedVersion_ >= "1.3.0")
+		{
+		  	if(crs_->currentValue() == "EPSG:4326")		  
+			{
+		  		requestBbox_->setArea(geographicBbox_->minY(),
+					geographicBbox_->maxY(),
+					geographicBbox_->minX(),
+					geographicBbox_->maxX());
+			
+				foundBb=true;
+			}
+			else if(crs_->currentValue() == "CRS:84" )
+			{
+				requestBbox_->setArea(geographicBbox_->minX(),
+					geographicBbox_->maxX(),
+					geographicBbox_->minY(),
+					geographicBbox_->maxY()); 	
+			
+				foundBb=true;
+			}
+		}
+		else
+		{  
+			//Else for older versions lat-lon we try to use the geographic bounding box 		
+			requestBbox_->setArea(geographicBbox_->minX(),
+					geographicBbox_->maxX(),
+					geographicBbox_->minY(),
+					geographicBbox_->maxY());
+					
+			foundBb=true;
+		}	
+	}
+
+	//For special non-geographical projections where no crs is defined (e.g. cross-section)
+	if(!foundBb && crs_->currentValue().isEmpty() && geographicBbox_ !=0)
+	{
+		requestBbox_->setArea(geographicBbox_->minX(),
+					geographicBbox_->maxX(),
+					geographicBbox_->minY(),
+					geographicBbox_->maxY());
+	}
+} 
+
+
diff --git a/src/OgcClient/MvQWmsClient.h b/src/OgcClient/MvQWmsClient.h
new file mode 100644
index 0000000..95adf66
--- /dev/null
+++ b/src/OgcClient/MvQWmsClient.h
@@ -0,0 +1,338 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQWmsClient_H
+#define MvQWmsClient_H
+
+#include <QAbstractMessageHandler>
+#include <QFile>
+#include <QMap>
+#include <QObject>
+#include <QStringList>
+
+#include "MvRequest.h"
+
+#include "MvQOgcParam.h"
+
+
+class QAuthenticator;
+class QDomElement;
+class QNetworkReply;
+
+class MvQNetworkAccessManager;
+class MvQGetMapRequest;
+
+class MvQProjInfo : public QMap<QString,QString>
+{
+public:
+	MvQProjInfo(const MvRequest &);	
+	QString get(QString);
+		
+protected:	
+	void parseProj4String(const char*);
+	void parseRequest(const MvRequest &);
+};
+
+
+class MvQWmsMessageHandler : public  QAbstractMessageHandler
+{
+public:
+    MvQWmsMessageHandler(QObject *parent=0) : QAbstractMessageHandler(parent) {};
+    void clear() {fatalMsg_.clear();}
+    bool fatalFound() {return fatalMsg_.count() > 0;}
+    QStringList fatalMessages() {return fatalMsg_;}
+    
+protected:   
+    void handleMessage(QtMsgType,const QString &,const QUrl &,const QSourceLocation &);
+    
+    QStringList fatalMsg_;
+  
+};  
+
+class MvQWmsClientBase : public QObject
+{
+public:
+	virtual ~MvQWmsClientBase();
+	QStringList supportedMimeType() {return supportedMimeType_;}
+	QStringList supportedCrs() {return supportedCrs_;}
+
+protected:
+	MvQWmsClientBase();
+
+	QStringList supportedMimeType_;
+	QStringList supportedCrs_;
+
+	QString getMimeType(QByteArray);
+	QString getRequestedMimeType(QString);
+	
+	MvQWmsMessageHandler *queryMsgHandler_;
+};
+
+
+class MvQWmsGetClient : public MvQWmsClientBase
+{
+	Q_OBJECT
+
+public:
+	MvQWmsGetClient(MvRequest&);
+	~MvQWmsGetClient();
+
+	MvQGetMapRequest* getMapRequest() {return getMapRequest_;}
+	void setGetMapRequest(QString);
+
+	QStringList outFiles() {return outFiles_;}
+	
+	void runGetMap();
+	bool getMapRunStatus() {return getMapRunStatus_;}
+	QString legendImagePath() {return legendImagePath_;}
+	QString logoImagePath() {return logoImagePath_;}
+	bool requestChanged() {return requestChanged_;}
+	
+	
+public slots:	
+	void slotReplyGetMap(QNetworkReply*);
+	void slotReplyLegend(QNetworkReply*);
+	void slotReplyLogo(QNetworkReply*);
+
+protected:	
+	bool updateBoundingBox();
+	void downloadGetMapFrame();
+	void downloadLegend();
+	void downloadLogo();
+		
+	MvQGetMapRequest* getMapRequest_;
+				
+	MvQNetworkAccessManager *networkGetMap_;
+	MvQNetworkAccessManager *networkLegend_;
+	MvQNetworkAccessManager *networkLogo_;
+
+	QNetworkReply *getMapReply_;
+	QNetworkReply *legendReply_;
+	QNetworkReply *logoReply_;
+
+	int getMapFrameNum_;
+	int getMapFrameToDownload_;
+
+	MvRequest      reqInfo_;
+	QString        iconFile_;
+	QStringList    outFiles_;
+	bool 	       getMapRunStatus_;
+	QString        legendPath_;
+	QString 	legendImagePath_;
+	QString        logoPath_;
+	QString 	logoImagePath_;
+	bool          requestChanged_;
+
+}; 
+
+
+
+class MvQWmsUiClient : public MvQWmsClientBase
+{
+	Q_OBJECT
+
+public:
+	MvQWmsUiClient(string&,MvRequest&);
+	~MvQWmsUiClient();
+
+	enum ClientMode {BasicMode,AdvancedMode};
+
+	QString url() {return url_;}
+	void setUrl(const QString&,const QString version="Default");
+	QString version() {return version_;}
+	void setVersion(const QString&);
+	MvQGetMapRequest* getMapRequest() {return getMapRequest_;}
+	void setGetMapRequest(QString);
+
+	QString getCapabilityDoc() {return capability_;}
+
+	QStringList outFiles() {return outFiles_;}
+
+	ClientMode clientMode() {return clientMode_;}
+	void setClientMode(ClientMode);
+
+	QStringList formatDisplayValues() const;
+	QString formatCurrentDisplayValue() const;
+
+	QStringList transparentDisplayValues() const;
+	QString transparentCurrentDisplayValue() const;
+	void setTransparentCurrentDisplayValue(QString);
+	
+	void setWidth(QString);
+	QString width() const;
+	void setHeight(QString);
+	QString height() const;
+
+	QStringList crsDisplayValues() const;
+	QString crsCurrentDisplayValue() const;
+	void setCrsCurrentDisplayValue(QString);
+	QString crsDisplayName();
+
+	QStringList styleDisplayValues() const;
+	QStringList styleDescriptions() const;
+	int styleCurrentIndex() const;
+	void setStyleCurrentIndex(int);
+
+	void setLayerFromDpy(MvQOgcNode*);
+	QStringList layerDisplayValues() const;
+	QStringList layerDescriptions() const;
+	const QList<MvQOgcDimension*>& dimension() {return dimension_;}
+	QStringList dimensionNameToDpy() const;
+	QStringList dimensionToDpy(QString) const;
+	void setDimensionFromDpy(QString,QString);
+	void setDimensionFromDpy(QString,QStringList);
+	void setBoundingBoxFromDpy(QString,QString,QString, QString);
+	const MvQOgcBoundingBox *boundingBox() {return requestBbox_;}
+	MvQOgcBoundingBox lastBoundingBox() const;
+	MvQOgcBoundingBox* currentBoundingBox() const;
+
+	QString   extraGetCapPar() {return extraGetCapPar_;}
+	QString   extraGetMapPar() {return extraGetMapPar_;}
+	void 	  setExtraGetCapPar(QString);
+	void 	  setExtraGetMapPar(QString);
+
+	MvQOgcTree* layer() {return layer_;}
+	int layerCurrentIndex();
+	QString layerName() {return layer_->currentValue();}
+	QString layerTitle() {return layer_->currentDisplayValue();}
+	QString layerAbstract() {return layer_->currentDescription();}
+
+	QString iconFile() {return iconFile_;}
+	void setFileNameInfo(string& name) {iconFile_ = QString::fromStdString(name);}
+	void setRequestInfo(MvRequest& req) {reqInfo_ = req;}
+
+	void downloadPreview(QSize s=QSize(512,256));
+	void downloadLegend();
+	void downloadLogo();
+
+	void reset(QString);
+
+	QMap<QString,QString>  serviceMetaData() {return serviceMeta_;}
+
+	bool previewDownloadActive();
+	bool legendDownloadActive();
+
+	
+public slots:
+	void slotReplyGetCap(QNetworkReply*);
+	void slotReplyPreview(QNetworkReply*);
+	void slotReplyLegend(QNetworkReply*);
+	void slotReplyLogo(QNetworkReply*);
+	void slotRunGetCapabilities();
+	void slotAbortDownloadProcess();
+	void slotSaveInfo();
+
+	void slotAuthentication(QNetworkReply *,QAuthenticator *);
+
+	void slotSetFormatFromDpy(QString);
+
+signals:
+	void getCapabilityLoaded();
+	void getMapRequestChanged(QString,QStringList); 
+	void previewLoaded(QString);
+	void legendLoaded(QString);
+	void logoLoaded(QString);
+	void logUpdated();
+	void statusMessage(QString);
+	void clientResetDone();
+
+protected:
+	void clearServerDependentData(bool keepRequest=false);
+	void clearLayerDependentData();
+	void clearDimension();
+	void clearBoundingBox();
+	void runGetCapabilities();
+	void buildGetMapRequest();
+	void saveGetMapRequest(QMap<QString,QString> &);
+	void downloadGetMap();
+
+	QString readVersion();
+	void readService();
+	void readFormat();
+	void readLayer();
+	void readLayer(QDomElement &,MvQOgcNode *);
+	//void readLayerAbstract();
+	void readStyle();
+	void readBoundingBox();
+	void readCrs();
+	void readDimension();
+	void readGeographicBoundingBox();
+	void readAttribution();
+	void readException(QByteArray,QString&);
+	void updatRequestBoundingBox();
+	QString crsQueryName();
+	QString crsRequestName();
+
+	QStringList timeDimName();
+
+	void clearPreview();
+	void clearLegend();
+	void clearLogo();
+
+	void updateAfterGetCapLoaded();
+	void updateAfterLayerLoaded();
+
+	QString    url_;
+	QString    version_;
+	QString    repliedVersion_;
+	QString    capability_;
+	MvQGetMapRequest* getMapRequest_;
+	MvQGetMapRequest* currentGetMapRequest_;
+	MvQGetMapRequest* lastGetMapRequest_;
+	
+	//Global
+	MvQOgcList*  format_;
+	MvQOgcList*  transparent_;
+	MvQOgcIntValue*  width_;
+	MvQOgcIntValue*  height_;
+	MvQOgcColourValue* bgColour_;
+
+	//Layer
+	MvQOgcTree*	   layer_;
+	QString 	   layerAbstract_;
+	MvQOgcCrsList*	   crs_;
+	MvQOgcStyleList*   style_;
+
+	MvQOgcBoundingBox* requestBbox_;
+	MvQOgcGeoBoundingBox* geographicBbox_;
+	QList<MvQOgcBoundingBox*>  bbox_;
+	QList<MvQOgcDimension*>   dimension_;	
+
+	MvQNetworkAccessManager *networkGetCap_;
+	MvQNetworkAccessManager *networkPreview_;
+	MvQNetworkAccessManager *networkLegend_;
+	MvQNetworkAccessManager *networkLogo_;
+
+	QNetworkReply *getCapReply_;
+	QNetworkReply *previewReply_;
+	QNetworkReply *legendReply_;
+	QNetworkReply *logoReply_;
+
+	QString        iconFile_;
+	MvRequest      reqInfo_;
+	QStringList    outFiles_;
+	
+	QSize 		previewSize_;
+		
+	ClientMode     clientMode_;
+	QString defaultNsDeclaration_;
+	QString xlinkNsDeclaration_;
+	QString previewFile_;
+	QString legendFile_;
+	QString logoFile_;
+	QMap<QString,QString> serviceMeta_;
+
+	QString   extraGetCapPar_;
+	QString   extraGetMapPar_;
+
+	QString httpUser_;
+	QString httpPassword_;   
+}; 
+
+#endif
diff --git a/src/OgcClient/MvQWmsClientEditor.cc b/src/OgcClient/MvQWmsClientEditor.cc
new file mode 100644
index 0000000..5aacb70
--- /dev/null
+++ b/src/OgcClient/MvQWmsClientEditor.cc
@@ -0,0 +1,1892 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QBuffer>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QDebug>
+#include <QFile>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QListWidgetItem>
+#include <QListWidget>
+#include <QMenu>
+#include <QMenuBar>
+#include <QPalette>
+#include <QProgressBar>
+#include <QPushButton>
+#include <QScrollArea>
+#include <QSettings>
+#include <QSignalMapper>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QTextBrowser>
+#include <QToolBar>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvQWmsClientEditor.h"
+
+#include "LogHandler.h"
+
+#include "MvQHighlighter.h"
+#include "MvQLogBrowser.h"
+#include "MvQOgcParam.h"
+#include "MvQOgcRequest.h"
+#include "MvQOgcTreeModel.h"
+#include "MvQTextDialog.h"
+#include "MvQTextEditSearchLine.h"
+#include "MvQWmsClient.h"
+
+
+MvQWmsDimensionGuiItem::MvQWmsDimensionGuiItem(MvQOgcDimension* dim,QString text,QGridLayout *parentLayout, int parentRow)
+{	
+	dim_=dim;
+
+	label_=new QLabel(dim->displayName());
+
+	row_=parentRow;
+	parentLayout->addWidget(label_,row_,0);
+
+	//Expand 
+	expandTb_= new QToolButton;
+	expandTb_->setIcon(QApplication::style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton));
+	expandTb_->setCheckable(true);
+	expandTb_->setChecked(false);
+	//expandTb_->setAutoRaise(true);
+	expandTb_->setToolTip(tr("View value list"));
+	parentLayout->addWidget(expandTb_,row_,1);
+
+	//LinEdit		
+	lineEdit_ = new QLineEdit;
+	lineEdit_->setText(text);
+	//nameLabel_->setBuddy(lineEdit_);
+	
+	parentLayout->addWidget(lineEdit_,row_,2);
+	
+	clearTb_= new QToolButton;
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/OgcClient/clear_left.svg")), QIcon::Normal, QIcon::Off);
+ 	clearTb_->setIcon(icon);	
+	clearTb_->setCheckable(false);
+	clearTb_->setAutoRaise(true);
+	clearTb_->setToolTip(tr("Clear selection"));
+	parentLayout->addWidget(clearTb_,row_,3);
+
+	//Get values
+	//QStringList values_=dim->displayValues();
+	QStringList values_=dim->values();
+
+	list_ = new QListWidget;
+	list_->setVisible(false);
+
+	//Populate the list 
+
+	QListWidgetItem* item;
+	foreach(QString str,values_)
+	{
+		item=new QListWidgetItem(str,list_);
+		//item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+		//item->setCheckState(Qt::Unchecked);
+	}
+
+	parentLayout->addWidget(list_,row_+1,2);
+
+	connect(clearTb_,SIGNAL(clicked(bool)),
+		this,SLOT(slotClearText(bool)));
+	
+	connect(expandTb_,SIGNAL(toggled(bool)),
+		this,SLOT(slotSetVisibleList(bool)));
+
+	connect(list_,SIGNAL(itemClicked(QListWidgetItem*)),
+		this,SLOT(slotAddItem(QListWidgetItem*)));
+	
+	/*connect(list_,SIGNAL(itemPressed(QListWidgetItem*)),
+		this,SLOT(slotAddItem(QListWidgetItem*)));*/
+
+	connect(list_,SIGNAL(itemChanged(QListWidgetItem*)),
+		this, SLOT(slotListItemChanged(QListWidgetItem*)));
+
+	connect(lineEdit_,SIGNAL(textChanged(QString)),
+		this, SLOT(slotLineEditChanged(QString)));
+}
+
+MvQWmsDimensionGuiItem::~MvQWmsDimensionGuiItem()
+{
+	delete label_;
+	delete lineEdit_;
+	delete list_;
+	delete expandTb_;
+	delete clearTb_;
+
+}
+
+void MvQWmsDimensionGuiItem::slotClearText(bool)
+{
+	lineEdit_->clear();
+}
+
+void MvQWmsDimensionGuiItem::slotSetVisibleList(bool visible)
+{
+	list_->setVisible(visible);	
+}
+
+void MvQWmsDimensionGuiItem::slotLineEditChanged(QString txt)
+{
+	emit textChanged(dim_,txt);
+}
+
+void MvQWmsDimensionGuiItem::slotAddItem(QListWidgetItem* item)
+{
+	QString text=lineEdit_->text();	
+	if(text.size()>0)
+	{
+		text+=",";
+	}
+	QString s=item->data(Qt::DisplayRole).toString();
+	if(s.contains("Default ("))
+	{
+		s=dim_->defaultValue();
+	}
+	text+=s;
+
+	lineEdit_->setText(text);
+}
+
+void MvQWmsDimensionGuiItem::slotListItemChanged(QListWidgetItem* item)
+{
+	QString text=lineEdit_->text();
+	if(item->checkState() == Qt::Checked)
+	{
+		if(text.size()>0)
+		{
+			text+="/";
+		}
+		text+=item->data(Qt::DisplayRole).toString();
+	}
+	else
+	{
+		QString itemText=item->data(Qt::DisplayRole).toString();
+		QStringList textList=text.split("/");
+		int itemIndex=textList.indexOf(itemText);
+		
+		QString newText;
+		for(int i=0;i < textList.count(); i++)
+		{
+			if(i != 0 && i != itemIndex)
+			{
+				newText+="/";
+			}
+			if(i != itemIndex)
+			{	
+				newText+=textList[i];
+			}
+		}
+		text=newText;
+	}
+
+	lineEdit_->setText(text);
+
+}	
+
+void  MvQWmsDimensionGuiItem::addValue(QString value)
+{
+	QListWidgetItem* item;
+	item=new QListWidgetItem(value,list_);
+	//item->setFlags(Qt::ItemIsSelectable |Qt::ItemIsEnabled);
+	//item->setCheckState(Qt::Unchecked);
+}
+
+QString MvQWmsDimensionGuiItem::currentValue()
+{
+	QString text=lineEdit_->text();
+	return text;
+} 
+
+//================================
+//
+// MvQWmsClientEditor
+//
+//================================
+
+MvQWmsClientEditor::MvQWmsClientEditor(MvQWmsUiClient *client, QWidget *parent) : MvQMainWindow(parent)
+{
+	//Window setup
+	QString iconName;
+	QStringList lst=client->iconFile().split("/");
+	if(lst.count()>0)
+	{
+		iconName=lst.last();
+	}
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	setAttribute(Qt::WA_DeleteOnClose);
+	setWindowTitle("Metview - WMS Client Editor- " + iconName);
+
+	client_ = client;
+
+	//ClientModeMap	
+	clientModeMap_["Plain"]=MvQWmsUiClient::BasicMode;
+	clientModeMap_["Interactive"]=MvQWmsUiClient::AdvancedMode;
+
+	//Main layout
+	mainLayout_=new QVBoxLayout;
+	QWidget *w=new QWidget;
+	w->setLayout(mainLayout_);
+	setCentralWidget(w);
+
+	//Main splitter
+	mainSplitter_= new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);
+        mainSplitter_->setOpaqueResize(false);
+	mainLayout_->addWidget(mainSplitter_);	
+
+	//----------------------------------------------
+	// Request splitter  - upper part of main splitter
+	//----------------------------------------------
+
+	requestSplitter_= new QSplitter;
+        requestSplitter_->setOpaqueResize(false);
+	mainSplitter_->addWidget(requestSplitter_);	
+
+	//Request left layout
+	layerPanel_=new QWidget;
+	QVBoxLayout* requestLeftLayout=new QVBoxLayout;
+	layerPanel_->setLayout(requestLeftLayout);
+	requestSplitter_->addWidget(layerPanel_);
+
+	//Request right layout
+	layerInfoTab_=new QTabWidget;
+	requestSplitter_->addWidget(layerInfoTab_);
+	
+	requestSplitter_->setCollapsible(0,false);
+	requestSplitter_->setCollapsible(1,false);
+
+	//----------------------------------------------
+	// Log area - lower part of main splitter
+	//----------------------------------------------
+
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+
+	logPanel_=new QWidget;
+	logPanel_->setMinimumHeight(110);
+	logPanel_->setLayout(logLayout);
+
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);
+
+	//Label
+	QLabel *label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	hb->addWidget(label,1);
+
+	//Clear button
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	connect(clearPb,SIGNAL(clicked(bool)),
+		this,SLOT(slotClearLog(bool)));
+
+	mainSplitter_->addWidget(logPanel_);
+	mainSplitter_->setCollapsible(1,false);
+
+	//---------------------------------------
+	// Bottom part with buttons	
+	//---------------------------------------
+
+	//Buttons
+	hb=new QHBoxLayout;
+	mainLayout_->addLayout(hb);
+
+	QLabel *labelMode= new QLabel(tr("Mode:"),this);
+	clientModeCombo_ = new QComboBox(this);
+	clientModeCombo_->addItem("Plain");
+	clientModeCombo_->addItem("Interactive");
+	hb->addWidget(labelMode);
+	hb->addWidget(clientModeCombo_);
+	hb->addStretch(1);
+
+	if(client_->clientMode() ==MvQWmsUiClient::AdvancedMode)
+	{
+		clientModeCombo_->setCurrentIndex(1);
+	}
+	else
+	{
+		clientModeCombo_->setCurrentIndex(0);
+	}	
+
+	label=new QLabel(tr("Stay open"));
+	openCb_ = new QCheckBox;
+	openCb_->setCheckState(Qt::Unchecked);
+	hb->addWidget(openCb_);
+	hb->addWidget(label);
+
+	QPushButton *okPb = new QPushButton("Apply");
+	okPb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton)); 
+	hb->addWidget(okPb);
+
+	QPushButton *closePb = new QPushButton("Close");
+	closePb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogCloseButton)); 
+	hb->addWidget(closePb);
+
+	//-------------------
+	// Statusbar
+	//-------------------
+
+	/*loadLabel_ = new QLabel;
+	QMovie *movie = new QMovie(":/OgcClient/loader.gif", QByteArray(), loadLabel_);
+	loadLabel_->setMovie(movie);
+	statusBar()->addPermanentWidget(loadLabel_);
+	loadLabel_->hide();*/
+
+	loadProgress_=new QProgressBar;
+	//loadProgress_->setRange(0,0);
+	statusBar()->addPermanentWidget(loadProgress_);
+	loadProgress_->hide();
+	
+ 	statusMessageLabel_ = new QLabel("");
+    	//statusMessageLabel_->setTextInteractionFlags(Qt::TextSelectableByMouse);
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+	//messageLabel_->setMinimumSize(messageLabel_->sizeHint());
+    	statusBar()->addPermanentWidget(statusMessageLabel_,1);  // '1' means 'please stretch me when resized'
+
+	//-------------
+	// Init
+	//-------------
+
+	//actions
+	setupFileActions();
+	setupViewActions();
+	setupSettingsActions();
+	
+	// Setup menus and toolbars
+	setupMenus(menuItems_);
+
+	QToolBar* tb=findToolBar(MvQMainWindow::SettingsMenu);
+	if(tb) 
+	{
+	  	advancedModeOnlyWidgets_ << tb;  
+		insertToolBarBreak(tb);
+	}	
+		
+	//Request panel
+	setupLayerPanel(requestLeftLayout);
+	setupLayerInfoTab();
+
+	dimensionNum_=0;
+
+	//Signals and slots
+	connect(okPb,SIGNAL(clicked()),
+		this,SLOT(slotSaveInfo()));
+
+	//connect(openCb_,SIGNAL(stateChanged(int)),
+	//	this,SLOT(slotStayOpen(int)));
+
+	connect(closePb,SIGNAL(clicked()),
+		this,SLOT(close()));
+
+	connect(clientModeCombo_,SIGNAL(currentIndexChanged(QString)),
+		this,SLOT(slotClientModeChanged(QString)));
+
+	connect(client_,SIGNAL(statusMessage(QString)),
+		this,SLOT(slotStatusMessage(QString)));
+		
+	connect(client_,SIGNAL(getCapabilityLoaded()),
+		this,SLOT(slotGetCapabilityLoaded()));
+
+	connect(client_,SIGNAL(logUpdated()),
+		this,SLOT(slotUpdateLogOutput()));
+
+	connect(client_,SIGNAL(clientResetDone()),
+		this,SLOT(slotClientReset()));
+
+	//Initialise the current mode --> call loadGetCapabilities
+	//This must come last!!!
+	initClientMode();
+
+	//
+	readSettings();
+}	
+
+MvQWmsClientEditor::~MvQWmsClientEditor()
+{	
+	writeSettings();
+}
+
+void MvQWmsClientEditor::setupFileActions()
+{
+	QAction *actionImport = new QAction(this);
+        actionImport->setObjectName(QString::fromUtf8("actionImport"));
+	actionImport->setText(tr("&Import"));
+	actionImport->setToolTip(tr("Import request"));
+
+	//Define routines
+	connect(actionImport,SIGNAL(activated()),
+		this,SLOT(slotImportRequest()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::FileMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionImport,MvQMenuItem::MenuTarget));
+}
+
+
+void MvQWmsClientEditor::setupViewActions()
+{
+  	//---------------------
+	// First toolbar row
+	//---------------------
+//
+	actionLog_ = new QAction(this);
+        actionLog_->setObjectName(QString::fromUtf8("actionLog"));
+	actionLog_->setText(tr("&Log"));
+	actionLog_->setCheckable(true);
+	actionLog_->setChecked(false);
+	actionLog_->setToolTip(tr("View log"));
+	QIcon icon2;
+	icon2.addPixmap(QPixmap(QString::fromUtf8(":/examiner/log.svg")), QIcon::Normal, QIcon::Off);
+ 	actionLog_->setIcon(icon2);	
+
+	logPanel_->hide();
+
+	//Define routines
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+		
+	QAction* actionSeparator = new QAction(this);	
+	actionSeparator->setSeparator(true);	
+		
+	actionCapability_ = new QAction(this);
+        actionCapability_->setObjectName(QString::fromUtf8("actionCapability"));
+	actionCapability_->setText(tr("&Load GetCapabilities"));
+	actionCapability_->setToolTip(tr("Load GetCapabilities"));
+	actionCapability_->setShortcut(tr("F5"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/OgcClient/reload.svg")), QIcon::Normal, QIcon::Off);
+ 	actionCapability_->setIcon(icon);	
+
+	actionStopLoad_ = new QAction(this);
+        actionStopLoad_->setObjectName(QString::fromUtf8("actionStopLoad"));
+	actionStopLoad_->setText(tr("&Stop load process"));
+	actionStopLoad_->setToolTip(tr("Stop load process"));
+	actionStopLoad_->setShortcut(tr("Esc"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/OgcClient/remove.svg")), QIcon::Normal, QIcon::Off);
+ 	actionStopLoad_->setIcon(icon1);	
+
+	urlCombo_ = new QComboBox;
+	urlCombo_->setEditable(true);
+	urlCombo_->setMinimumContentsLength(20);
+	//urlCombo_->setMaxCount(20);
+	QSizePolicy p=urlCombo_->sizePolicy();
+	urlCombo_->setSizePolicy(QSizePolicy::Expanding,p.verticalPolicy()); 
+	urlCombo_->setInsertPolicy(QComboBox::InsertAtTop);
+	advancedModeOnlyWidgets_ << urlCombo_;
+
+	//Server version combo
+	QLabel *labelVersion= new QLabel(tr(" Version:"));
+	advancedModeOnlyWidgets_ << labelVersion;
+	versionCombo_ = new QComboBox;
+	advancedModeOnlyWidgets_ << versionCombo_;
+	
+	QStringList lst;
+	lst << "Default" << "1.0.0" << "1.1.0" << "1.1.1" << "1.3.0";
+	versionCombo_->addItems(lst);
+	versionCombo_->setCurrentIndex(0);
+	
+	//---> Init
+	
+	//Init  url and version combos
+	if(!client_->url().isEmpty())
+	{	
+		urlCombo_->insertItem(0,client_->url());
+		urlCombo_->setCurrentIndex(0);
+	}
+
+	initVersionCombo();
+
+
+	//---> Signals and slots
+
+	connect(actionCapability_,SIGNAL(triggered()),
+		this,SLOT(slotRunGetCapabilities()));
+
+	connect(actionStopLoad_,SIGNAL(triggered()),
+		client_,SLOT(slotAbortDownloadProcess()));
+
+	connect(urlCombo_,SIGNAL(activated(QString)),
+		this,SLOT(slotSelectUrl(QString)));
+
+	connect(versionCombo_,SIGNAL(activated(QString)),
+		this,SLOT(slotSelectVersion(QString)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionSeparator));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionCapability_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionStopLoad_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(urlCombo_,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(labelVersion,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(versionCombo_,MvQMenuItem::ToolBarTarget));
+
+}	
+void MvQWmsClientEditor::setupSettingsActions()
+{	
+	//---------------------
+	// Second toolbar row
+	//--------------------
+
+	QLabel *labelFormat= new QLabel(tr("Format:"));
+	formatCombo_= new QComboBox;
+	formatCombo_->setSizeAdjustPolicy(QComboBox::AdjustToContents);	
+
+	//Extra getcap
+	QLabel *labelGetCap= new QLabel(tr(" Extra getCap param:"));
+	extraGetCapEdit_= new QLineEdit("");		
+
+	//Extra getmap
+	QLabel *labelGetMap= new QLabel(tr(" Extra getMap param:"));
+	extraGetMapEdit_= new QLineEdit("");	
+	
+	QString mName="Format";
+
+	//Put this toolbar into another line!!!
+	//addToolBarBreak(Qt::TopToolBarArea);
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::SettingsMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(labelFormat,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(formatCombo_,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(labelGetCap,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(extraGetCapEdit_,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(labelGetMap,MvQMenuItem::ToolBarTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(extraGetMapEdit_,MvQMenuItem::ToolBarTarget));	
+
+	//These are independent from getCapabilities
+	initExtraParEdit();
+
+	connect(formatCombo_,SIGNAL(activated(QString)),
+		client_,SLOT(slotSetFormatFromDpy(QString)));
+
+	connect(extraGetCapEdit_,SIGNAL(textChanged(QString)),
+		this,SLOT(slotExtraGetCapChanged(QString)));
+
+	connect(extraGetMapEdit_,SIGNAL(textChanged(QString)),
+		this,SLOT(slotExtraGetMapChanged(QString)));
+}
+
+
+void MvQWmsClientEditor::setupLayerPanel(QVBoxLayout *layout)
+{
+	QLabel *label;
+	int row=0;
+
+	layerParamRowNum_=0;
+
+	//Tab
+	layerTab_=new QTabWidget;
+	layout->addWidget(layerTab_);
+
+
+	//layerSplitter_= new QSplitter;
+	//layerSplitter_->setOrientation(Qt::Vertical);
+        //layerSplitter_->setOpaqueResize(false);
+	//layout->addWidget(layerSplitter_);	
+
+	//--------------------------
+	// Layer tree
+	//--------------------------
+
+	layerTree_=new QTreeView;
+	layerTree_->setObjectName("WmsLayerTree");
+	layerTree_->setProperty("mvStyle",1);
+	layerTree_->setAlternatingRowColors(true);
+	//layerSplitter_->addWidget(layerTree_);
+
+	layerModel_=new MvQOgcTreeModel;
+	layerTree_->setModel(layerModel_);
+
+	connect(layerTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectLayer(QModelIndex)));
+
+	connect(layerTree_,SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotSelectLayer(QModelIndex)));
+
+	layerTab_->addTab(layerTree_,tr("Layer tree"));
+
+	//-------------------
+	// Param gui
+	//-------------------
+
+	QScrollArea *scroll = new QScrollArea;
+	layerTab_->addTab(scroll,tr("Layer settings"));
+
+	QWidget *w=new QWidget;
+	layerGrid_= new QGridLayout;
+	layerGrid_->setSizeConstraint(QLayout::SetMinAndMaxSize);
+	w->setLayout(layerGrid_);
+
+	scroll->setWidgetResizable(true);
+	scroll->setWidget(w);
+
+	label= new QLabel("Styles:");
+	styleCombo_ = new QComboBox;
+	layerGrid_->addWidget(label, row, 0);
+	layerGrid_->addWidget(styleCombo_, row, 2);
+	row++;
+
+	
+	crsLabel_= new QLabel("CRS:");
+	crsCombo_ = new QComboBox;
+	layerGrid_->addWidget(crsLabel_, row, 0);
+	layerGrid_->addWidget(crsCombo_, row, 2);
+	row++;
+	
+	layerParamRowNum_=row;
+
+	//layerGrid_->setColumnStretch(1,1);
+	//layerGrid_->setRowStretch(row,1);
+
+	connect(crsCombo_,SIGNAL(activated(QString)),
+		this,SLOT(slotSelectCrs(QString)));
+
+	connect(styleCombo_,SIGNAL(activated(int)),
+		this,SLOT(slotSelectStyle(int)));
+
+
+	//Preview pb
+	previewPb_ = new QPushButton(tr("Generate preview"));
+	layout->addWidget(previewPb_);
+
+	connect(previewPb_,SIGNAL(clicked()),
+		this,SLOT(slotPreview()));
+}
+
+void MvQWmsClientEditor::setupLayerInfoTab()
+{
+	QLabel *label;
+	QWidget *w;
+
+	//Read css for the preview formatting
+	QString cssDoc;
+	QFile f(":/OgcClient/preview.css");
+	QTextStream in(&f);
+	if(f.open(QIODevice::ReadOnly | QIODevice::Text))
+	{
+       		cssDoc=QString(f.readAll());
+	}
+	f.close();
+
+	//--------------------------	
+	// Layer preview tab
+	//--------------------------
+
+	layerPreview_ = new QTextBrowser;
+	layerPreview_->setReadOnly(true);
+	layerPreview_->document()->setDefaultStyleSheet(cssDoc);
+	layerPreview_->setWordWrapMode(QTextOption::WordWrap);
+
+	layerInfoTab_->addTab(layerPreview_,tr("Layer information"));	
+
+	connect(client_,SIGNAL(previewLoaded(QString)),
+		this,SLOT(slotPreviewLoaded(QString)));
+
+	connect(client_,SIGNAL(legendLoaded(QString)),
+		this,SLOT(slotLegendLoaded(QString)));
+
+	connect(client_,SIGNAL(logoLoaded(QString)),
+		this,SLOT(slotLogoLoaded(QString)));
+
+	//--------------------------	
+	// GetMap request tab
+	//--------------------------
+
+	//---------------------------------------
+	// --> Request editor (plain mode only)
+	//---------------------------------------
+	
+	reqSplitter_=new QSplitter;
+	layerInfoTab_->addTab(reqSplitter_,tr("GetMap request"));
+
+	reqEditPanel_=new QWidget;
+	QVBoxLayout *reqEditLayout=new QVBoxLayout;
+	reqEditPanel_->setLayout(reqEditLayout);
+	reqSplitter_->addWidget(reqEditPanel_);
+
+	label=new QLabel(tr("Editable request parameters:"));
+	reqEditLayout->addWidget(label);
+
+	reqEditSa_=new QScrollArea;
+	reqEditSa_->setWidgetResizable(true);
+	reqEditSa_->setFrameShape(QFrame::NoFrame);
+	reqEditLayout->addWidget(reqEditSa_);
+
+	reqEditPanel_->hide();
+		
+	//---------------------------------------
+	// --> Request display
+	//---------------------------------------
+	
+	w=new QWidget;
+	QVBoxLayout *mapInfoLayout=new QVBoxLayout;
+	w->setLayout(mapInfoLayout);
+	reqSplitter_->addWidget(w);
+
+	QString s="Individual requests (maximum ";
+	s+=QString::number(MvQGetMapRequest::maxFrame()) + "):";
+	label=new QLabel(tr(s.toStdString().c_str()));
+	mapInfoLayout->addWidget(label);
+
+	getMapInfoSplit_ = new QTextBrowser;
+	getMapInfoSplit_->setReadOnly(true);
+	getMapInfoSplit_->document()->setDefaultStyleSheet(cssDoc);
+	//getMapInfoSplit_->setLineWrapMode(QTextEdit::NoWrap);
+	//reqSplitter_->addWidget(reqGrid_);
+	mapInfoLayout->addWidget(getMapInfoSplit_,1);
+
+	highlighterSplit_ = new MvQHighlighter(getMapInfoSplit_->document());
+	
+	//---------------------------------------
+	// --> Load preview (plain mode only)
+	//---------------------------------------
+
+	plainPreviewPanel_=new QWidget;
+	plainPreviewPanel_->setMinimumHeight(128);
+	
+	QVBoxLayout *plainPreLayout = new QVBoxLayout;
+	plainPreLayout->setContentsMargins(0,0,0,0);
+	plainPreviewPanel_->setLayout(plainPreLayout);
+	mapInfoLayout->addWidget(plainPreviewPanel_);
+
+	label=new QLabel(tr("Preview:"));
+	plainPreLayout->addWidget(label);
+
+	plainPreviewLabel_=new QLabel;
+	plainPreviewLabel_->setFrameStyle(QFrame::Box | QFrame::Plain);
+	//plainPreviewLabel_->setFixedSize(QSize(256,128));
+	plainPreviewLabel_->setFixedWidth(260);
+	plainPreviewLabel_->setMinimumHeight(128);
+	plainPreviewLabel_->setAutoFillBackground(true);
+	
+	QPalette pal=plainPreviewLabel_->palette();
+	//QColor col=pal.color(QPalette::Window).lighter(120);
+	pal.setColor(QPalette::Window,Qt::white);
+	plainPreviewLabel_->setPalette(pal);
+		
+	plainPreLayout->addWidget(plainPreviewLabel_);
+
+	plainPreviewPb_=new QPushButton(tr("Generate preview"));
+	//plainPreLayout->addWidget(plainPreviewPb_);
+	reqEditLayout->addWidget(plainPreviewPb_);
+
+	plainPreviewPanel_->hide();
+	
+	connect(plainPreviewPb_,SIGNAL(clicked()),
+		this,SLOT(slotPreview()));
+
+	connect(client_,SIGNAL(getMapRequestChanged(QString,QStringList)),
+		this,SLOT(slotSetGetMapInfo(QString,QStringList)));
+
+	//------------------------	
+	// GetCapabilities tab
+	//------------------------
+
+	w=new QWidget;
+	layerInfoTab_->addTab(w,tr("GetCapabilities"));
+
+	QVBoxLayout *getCapLayout = new QVBoxLayout;
+	w->setLayout(getCapLayout);
+
+	getCapInfo_ = new QTextBrowser;
+	getCapInfo_->setReadOnly(true);
+	getCapInfo_->setLineWrapMode(QTextEdit::NoWrap);
+	getCapLayout->addWidget(getCapInfo_);
+
+	getCapSearch_= new MvQTextEditSearchLine(getCapInfo_,tr("&Find:"));
+	getCapLayout->addWidget(getCapSearch_);
+
+	highlighterGetCap_ = new MvQWmsGetCapHighlighter(getCapInfo_->document());
+	
+	//--------------------------	
+	// Service meta-data  tab
+	//--------------------------
+	
+	highlighterGetCap_ = new MvQWmsGetCapHighlighter(getCapInfo_->document());
+
+	serviceInfo_ = new QTextBrowser;
+	serviceInfo_->setReadOnly(true);
+	serviceInfo_->document()->setDefaultStyleSheet(cssDoc);
+	serviceInfo_->setWordWrapMode(QTextOption::WordWrap);
+
+	layerInfoTab_->addTab(serviceInfo_,tr("Service"));
+
+}
+void MvQWmsClientEditor::setupReqEditPanel()
+{
+	if(reqEditSa_->widget())
+		return;
+
+	QWidget *w=new QWidget;
+	QGridLayout *reqGrid=new QGridLayout;
+	reqGrid->setSizeConstraint(QLayout::SetMinAndMaxSize);
+	w->setLayout(reqGrid);
+
+	reqEditSa_->setWidget(w);
+
+	QLabel* label;
+	QLineEdit *le;
+	QTextEdit *te;
+	QSignalMapper *sigMapper = new QSignalMapper(this);
+	QStringList labelText, key;
+
+	labelText << tr("URL:") << tr("Version:") <<  tr("Layer:") << tr("Style:") 
+		  << tr("CRS/SRS:") <<  tr("BBox:") <<  tr("Width:") << tr("Height:")
+		  << tr("Format:") <<  tr("Transparent:") <<  tr("Extra params:") << tr("Time:") 
+		  << tr("Elevation:");
+
+	key << "mv_key_url" << "VERSION" <<  "LAYERS" << "STYLES" 
+		  << "mv_key_crs" <<  "BBOX" <<  "WIDTH" << "HEIGHT"
+		  << "FORMAT" <<  "TRANSPARENT" <<  "mv_key_extrapar" << "TIME"
+		  << "ELEVATION";
+
+	int row=0;
+	for(int i=0; i < labelText.count(); i++)
+	{
+		label=new QLabel(labelText[i]);
+		reqLe_[key[i]] = new QLineEdit;
+		le=reqLe_[key[i]];
+
+		reqGrid->addWidget(label,row,0);	
+		reqGrid->addWidget(le,row,1);
+		row++;
+
+		connect(le,SIGNAL(textEdited(QString)),
+			sigMapper,SLOT(map()));
+		sigMapper->setMapping(le,key[i]);
+	}
+
+	labelText.clear();
+	key.clear();
+
+	labelText <<  tr("Temporal<br>dimensions:") <<  tr("Other<br>dimensions");
+	key <<  tr("mv_key_tdim") <<  tr("mv_key_otherdim");
+
+	for(int i=0; i < labelText.count(); i++)
+	{
+		label=new QLabel(labelText[i]);
+		reqTe_[key[i]] = new QTextEdit;
+		te=reqTe_[key[i]];
+
+		reqGrid->addWidget(label,row,0);	
+		reqGrid->addWidget(te,row,1);
+		row+=3;
+
+		connect(te,SIGNAL(textChanged()),
+			sigMapper,SLOT(map()));
+		sigMapper->setMapping(te,key[i]);
+	}
+
+
+	connect(sigMapper, SIGNAL(mapped(const QString &)),
+                this, SLOT(slotReqEdited(const QString &)));
+
+	
+	qDebug() << sigMapper;
+
+}
+
+
+//-------------------------------
+//
+// Init
+//
+//-------------------------------
+
+void MvQWmsClientEditor::initVersionCombo()
+{
+	QString currentVersion=client_->version();
+
+	for(int i =0; i < versionCombo_->count(); i++)
+	{
+		if(currentVersion == versionCombo_->itemText(i))
+		{
+			versionCombo_->setCurrentIndex(i);
+		}
+	}
+	
+}	
+
+void MvQWmsClientEditor::clearServerDependentData()
+{
+	formatCombo_->clear();
+	
+	clearLayerDependentData();
+	getMapInfoSplit_->clear();	
+	getCapInfo_->clear();	
+}
+
+void MvQWmsClientEditor::clearLayerDependentData()
+{
+	layerModel_->dataIsAboutToChange();
+	layerModel_->setRootNode(0); 
+
+	styleCombo_->clear();
+	crsCombo_->clear();
+	clearDimension();
+	layerPreview_->clear();
+}
+
+void MvQWmsClientEditor::clearDimension()
+{
+	int row=layerParamRowNum_; //layerGrid_->rowCount();
+	row=row-1;
+
+	qDebug() << "rows" << layerParamRowNum_ << layerGrid_->rowCount();
+
+	//Remove previous dimension widgets from the grid
+	for(int i=0; i < dimensionNum_;i++)
+	{
+		QWidget *w;
+
+		w=layerGrid_->itemAtPosition(row,2)->widget();
+		layerGrid_->removeWidget(w);
+		row--;
+
+		w=layerGrid_->itemAtPosition(row,0)->widget();
+		layerGrid_->removeWidget(w);
+
+		w=layerGrid_->itemAtPosition(row,1)->widget();
+		layerGrid_->removeWidget(w);
+
+		w=layerGrid_->itemAtPosition(row,2)->widget();
+		layerGrid_->removeWidget(w);
+
+		w=layerGrid_->itemAtPosition(row,3)->widget();
+		layerGrid_->removeWidget(w);
+
+		row--;
+
+		layerParamRowNum_-=2;
+	} 
+
+	dimensionNum_=0;
+
+	QMapIterator<QString, MvQWmsDimensionGuiItem*> it(dim_);
+   	while (it.hasNext()) 
+     	{ 
+       		it.next();
+       		delete it.value();
+	}
+	dim_.clear();
+}
+
+void MvQWmsClientEditor::initFormatCombo()
+{
+	formatCombo_->clear();
+
+	QStringList values=client_->formatDisplayValues();
+
+	for(int i=0; i < values.count(); i++)
+	{
+		formatCombo_->addItem(values[i]);
+		if(!client_->supportedMimeType().contains(values[i]))
+		{
+			formatCombo_->setItemData(i,Qt::darkGray,Qt::ForegroundRole);
+			formatCombo_->setItemData(i,tr("Not supported by Metview"),Qt::ToolTipRole);
+		}
+	}
+	
+	QString cv=client_->formatCurrentDisplayValue();	
+	int index=-1;
+	if(!cv.isEmpty())
+	{
+		index=values.indexOf(cv);
+	}
+	else
+	{
+		index=values.indexOf("image/png");
+		if(index == -1 && values.count() > 0)
+		{
+			index=0;
+		}
+	}	
+
+	if(index >=0)
+	{
+		formatCombo_->setCurrentIndex(index);
+		client_->slotSetFormatFromDpy(values[index]);
+	}
+}
+
+
+void MvQWmsClientEditor::initExtraParEdit()
+{
+	QString value=client_->extraGetCapPar();
+	extraGetCapEdit_->setText(value);
+
+	value=client_->extraGetMapPar();
+	extraGetMapEdit_->setText(value);
+}	
+
+void MvQWmsClientEditor::setupLayerList()
+{
+	layerModel_->dataIsAboutToChange();
+	layerModel_->setRootNode(client_->layer()->root());
+
+	layerTree_->setCurrentIndex(layerModel_->indexFromNode(client_->layer()->currentNode()));
+
+	//Try to expand the first child of the root node
+	if(layerModel_->rowCount(QModelIndex()) > 0)
+	{
+		QModelIndex index=layerModel_->index(0,0,QModelIndex());
+		layerTree_->expand(index);
+	}
+	
+/*	layerList_->clear();
+
+	QStringList values=client_->layerDisplayValues();
+	QStringList desc=client_->layerDescriptions();
+
+	int i=0;
+	foreach(QString str, values)
+	{		
+		QListWidgetItem* item=new QListWidgetItem(str,layerList_);
+		item->setData(Qt::ToolTipRole,desc[i]);
+		i++;
+	}
+
+	int index=client_->layerCurrentIndex();		
+	if(index > -1)
+	{
+		layerList_->setCurrentRow(index);
+	}*/
+}
+
+void MvQWmsClientEditor::initStyleCombo()
+{
+	styleCombo_->clear();
+
+	QStringList values=client_->styleDisplayValues();
+	QStringList desc=client_->styleDescriptions();
+
+	int i=0;
+	foreach(QString str, values)
+	{
+		styleCombo_->addItem(str);
+		styleCombo_->setItemData(i,desc[i],Qt::ToolTipRole);
+		i++;
+	}
+
+	int index=client_->styleCurrentIndex();	
+	if(index == -1 && values.count() > 0)
+	{
+		index=0;
+	}
+	if(index >=0)
+	{
+		styleCombo_->setCurrentIndex(index);
+		client_->setStyleCurrentIndex(index);
+	}
+}
+
+void MvQWmsClientEditor::initCrsCombo()
+{
+	crsLabel_->setText(client_->crsDisplayName());
+
+	crsCombo_->clear();
+
+	QStringList values=client_->crsDisplayValues();
+
+	for(int i=0; i < values.count(); i++)
+	{
+		crsCombo_->addItem(values[i]);
+		if(!client_->supportedCrs().contains(values[i]))
+		{
+			crsCombo_->setItemData(i,Qt::darkGray,Qt::ForegroundRole);
+			crsCombo_->setItemData(i,tr("Not supported by Metview"),Qt::ToolTipRole);
+		}
+	}
+
+	QString cv=client_->crsCurrentDisplayValue();	
+	int index=-1;
+
+	qDebug() << cv;
+	qDebug() << values;
+	if(!cv.isEmpty())
+	{
+		index=values.indexOf(cv);
+	}
+	else
+	{
+		foreach(QString str, values)
+		{
+			if(str.contains("EPSG:4326"))
+			{
+				index=values.indexOf(str);
+				break;
+			}
+		}	
+		if(index == -1 && values.count() > 0)
+		{
+			index=0;
+		}
+	}
+
+	if(index >=0)
+	{
+		crsCombo_->setCurrentIndex(index);
+		client_->setCrsCurrentDisplayValue(values[index]);
+	}
+}
+
+void MvQWmsClientEditor::setupDimension()
+{
+	clearDimension();
+
+
+	foreach(MvQOgcDimension *dim,client_->dimension())
+	{
+		QString name=dim->displayName();
+		dim_[name]=new MvQWmsDimensionGuiItem(dim,dim->currentValues(),layerGrid_,layerParamRowNum_);
+
+		connect(dim_[name],SIGNAL(textChanged(MvQOgcDimension*,QString)),
+			this,SLOT(slotDimensionChanged(MvQOgcDimension*,QString)));
+	
+		dimensionNum_++;
+		layerParamRowNum_+=2;
+	}
+}
+
+
+//------------------------------------------
+//
+//  SLOTS
+//
+//------------------------------------------
+/*!
+  Replaces the URL combobox's curret text with the given url and runs getCapabilities.   
+*/
+void MvQWmsClientEditor::slotSelectUrl(const QString &url)
+{
+	client_->setUrl(url,versionCombo_->currentText());
+	slotRunGetCapabilities();
+}
+
+/*!
+  Removes duplicates from the URL combobox and trims down
+  the its size to a predefined number. This method should be called
+  whenever a new item is inserted into the combo box.   
+*/
+
+void MvQWmsClientEditor::checkUrlComboItems()
+{
+	qDebug() << "checkUrlComboItems";
+  
+  	//Duplicates are removed first!
+	QMap<QString,int> cntMap;
+	for(int i=0; i < urlCombo_->count(); i++)
+	{
+		QString s=urlCombo_->itemText(i);
+		//qDebug() << s;		
+		if(cntMap.find(s) == cntMap.end())
+		{
+		  	cntMap[s]=1;
+		}
+		else
+		{
+		  	cntMap[s]=cntMap[s]+1;
+		}	
+	}	
+	
+	//qDebug() << cntMap;
+
+	foreach(QString s,cntMap.keys())
+	{
+		int itemCnt=cntMap[s];
+		if(itemCnt > 1)
+		{
+		  	for(int i=urlCombo_->count()-1; i >= 0 && itemCnt > 1; i--)
+			{
+				if(urlCombo_->itemText(i) == s)
+				{  
+				  	//qDebug() << "remove" << i << urlCombo_->currentIndex() <<  urlCombo_->itemText(i) <<  urlCombo_->currentText();
+					urlCombo_->removeItem(i);
+					//qDebug() << urlCombo_->currentText();
+					itemCnt--;
+				}
+			}
+		}
+	}	
+	
+	
+	//for(int i=0; i < urlCombo_->count(); i++)
+	//	qDebug() << "after" << urlCombo_->itemText(i);
+	
+	//Trim down the combo size to maxCount
+	int maxCount=25;
+	for(int i=urlCombo_->count()-1; i > maxCount; i--)
+	{
+		urlCombo_->removeItem(i);
+	}
+}
+
+void MvQWmsClientEditor::slotSelectVersion(const QString &version)
+{
+	if(version.compare(client_->version(),Qt::CaseInsensitive) != 0)
+	{
+		client_->setVersion(version);
+		slotRunGetCapabilities();
+	}
+}
+
+void MvQWmsClientEditor::slotRunGetCapabilities()
+{	
+	//Check if the  URL combobox's current text was
+	//inserted into URL combobox.  	
+	client_->setUrl(urlCombo_->currentText(),versionCombo_->currentText());	
+	
+	clearServerDependentData();
+
+	if(client_->url().isEmpty())
+	{
+		urlCombo_->clearEditText();
+		return;
+	}
+	
+	layerModel_->dataIsAboutToChange();
+	layerModel_->setRootNode(0);
+
+	requestSplitter_->setEnabled(false);
+
+	actionCapability_->setEnabled(false);
+	actionStopLoad_->setEnabled(true);
+	requestSplitter_->widget(0)->setEnabled(false);
+	urlCombo_->setEnabled(false);
+	versionCombo_->setEnabled(false);
+	formatCombo_->setEnabled(false);
+	clientModeCombo_->setEnabled(false);
+
+	loadStarted();
+
+	client_->slotRunGetCapabilities();
+}
+
+void MvQWmsClientEditor::slotGetCapabilityLoaded()
+{	
+	requestSplitter_->setEnabled(true);
+
+	actionCapability_->setEnabled(true);
+	actionStopLoad_->setEnabled(false);
+	requestSplitter_->widget(0)->setEnabled(true);
+	urlCombo_->setEnabled(true);
+	versionCombo_->setEnabled(true);
+	formatCombo_->setEnabled(true);
+	clientModeCombo_->setEnabled(true);
+
+	initFormatCombo();
+	setupLayerList();
+
+	initStyleCombo();
+	initCrsCombo();
+	setupDimension();
+
+	loadFinished();
+		
+	//slotPreviewLoaded(QString());
+
+
+	getCapInfo_->setPlainText(client_->getCapabilityDoc());
+	slotUpdateServiceInfo(); 
+	//serviceInfo_->setPlainText(client_->serviceTitle());
+
+	//loadFinished();
+
+	slotUpdateLayerInfo();
+	loadStarted();
+	client_->downloadLogo();
+	
+	if(urlCombo_->findText(urlCombo_->currentText()) == -1)
+	{	  		
+		//for(int i=0; i < urlCombo_->count(); i++)
+		//	qDebug() << urlCombo_->itemText(i)	
+	
+		// urlCombo_->currentText();
+		disconnect(urlCombo_, SIGNAL(activated(QString)),0,0);
+		urlCombo_->insertItem(0,urlCombo_->currentText());
+		urlCombo_->setCurrentIndex(0);	
+		connect(urlCombo_, SIGNAL(activated(QString)),
+			   this,SLOT(slotSelectUrl(QString)));			   
+		// urlCombo_->currentText();		
+
+		checkUrlComboItems();					
+		//qDebug() << urlCombo_->currentText();
+	}
+	else
+	{
+		checkUrlComboItems();		  
+	}  
+	
+}
+
+void MvQWmsClientEditor::slotSelectLayer(const QModelIndex& index)
+{
+	MvQOgcNode *node=layerModel_->nodeFromIndex(index);
+	client_->setLayerFromDpy(node);
+
+	initStyleCombo();
+	initCrsCombo();
+	setupDimension();
+
+	//slotPreviewLoaded(QString());
+
+	slotUpdateLayerInfo();
+	loadStarted();
+	client_->downloadLogo();
+}
+
+void MvQWmsClientEditor::slotDimensionChanged(MvQOgcDimension* dim,QString val)
+{
+	if(dim)
+	{	
+		client_->setDimensionFromDpy(dim->displayName(),val);
+	}
+}
+
+void MvQWmsClientEditor::slotExtraGetCapChanged(QString val)
+{
+	client_->setExtraGetCapPar(val);
+}
+
+void MvQWmsClientEditor::slotExtraGetMapChanged(QString val)
+{
+	client_->setExtraGetMapPar(val);
+}
+
+void MvQWmsClientEditor::slotPreview()
+{
+	if(client_->clientMode() == MvQWmsUiClient::AdvancedMode)
+	{
+	 	previewPb_->setEnabled(false);
+		actionCapability_->setEnabled(false);
+		actionStopLoad_->setEnabled(true);
+		requestSplitter_->widget(0)->setEnabled(false);
+		clientModeCombo_->setEnabled(false);
+
+		loadStarted();
+		client_->downloadPreview();
+	}
+	else
+	{
+	  	plainPreviewPb_->setEnabled(false);
+	  	actionStopLoad_->setEnabled(true);
+		clientModeCombo_->setEnabled(false);
+		
+		loadStarted();
+		client_->downloadPreview(QSize(256,128));	  
+	}  
+}
+
+
+void MvQWmsClientEditor::slotUpdateServiceInfo()
+{
+	QMap<QString,QString> meta=client_->serviceMetaData();
+
+	QString  s="<table><tbody>";
+
+	s+="<tr><td class=\"first\">Title</td><td>"+ meta["Title"] +"</td></tr>";
+	s+="<tr><td class=\"first\">Abstract</td><td>"+ meta["Abstract"] +"</td></tr>";
+	
+	QStringList contact;
+	contact << "ContactPerson" << "ContactOrganization" << "ContactPosition" << 
+				"AddressType" << "Address" << "City" << "StateOrProvince" <<
+				"PostCode" << "Country" << "ContactVoiceTelephone" <<
+				"ContactFacsimileTelephone" << "ContactElectronicMailAddress";
+
+	foreach(QString t,contact)
+	{
+		if(!meta[t].isEmpty())
+		{
+			s+="<tr><td class=\"first\">" + t + "</td><td>"+ client_->serviceMetaData()[t] +"</td></tr>";	
+		}
+	}
+	
+	s+="</tbody></table>";
+
+	serviceInfo_->setHtml(s);
+}
+
+void MvQWmsClientEditor::slotUpdateLayerInfo()
+{
+	QString layerText=client_->layerAbstract();
+	layerText.replace("\n","<br>");
+
+	QString  s="<table><tbody>";	
+	s+="<tr><td class=\"first\">Title</td><td>"+ client_->layerTitle() +"</td></tr>";
+	s+="<tr><td class=\"first\">Name</td><td>"+ client_->layerName() +"</td></tr>";
+	s+="<tr><td class=\"first\">Abstract</td><td>"+ layerText +"</td></tr>";
+	s+="<tr><td class=\"first\">" + client_->crsDisplayName().remove(":") + "</td><td>"+ crsCombo_->currentText() +"</td></tr>";
+	s+="<tr><td class=\"first\">Style</td><td>"+ styleCombo_->currentText() +"</td></tr>";
+	
+	/*s+="<tr><td class=\"first\">Dimensions</td>";
+	QMapIterator<QString,MvQWmsDimensionGuiItem*> it(dim_);
+	s+="<td>";
+	while (it.hasNext()) 
+	{
+    		it.next();
+		s+=it.key() + " = " + it.value()->currentValue() + "<br>";		
+	}
+	s+="</td></tr>";*/
+
+	s+="<tr><td class=\"first\">Preview</td>";
+	s+="<td class=\"image\" align=center>Preview not loaded</td></tr>";
+
+	s+="</tr>";
+	s+="<tr><td class=\"first\">Legend</td>";
+	s+="<td class=\"image\" align=center>Legend not loaded</td></tr>";
+
+	s+="<tr><td class=\"first\">Logo</td>";
+	s+="<td class=\"image\" align=center>Logo not loaded</td></tr>";
+
+	s+="</tbody></table>";
+
+	layerPreview_->setHtml(s);
+}
+
+void MvQWmsClientEditor::slotPreviewLoaded(QString path)
+{
+	if(client_->clientMode() == MvQWmsUiClient::AdvancedMode)
+	{
+	 	QString txt=layerPreview_->toHtml();
+	
+		if(!path.isEmpty())	
+		{
+			QString s="<img src=\"" + path + "\">";
+			txt.replace("Preview not loaded",s);
+			layerPreview_->setHtml(txt);
+		}
+
+		loadFinished();
+		loadStarted();
+		client_->downloadLegend();
+	}
+	else
+	{
+	  	loadFinished();
+		plainPreviewLabel_->setPixmap(QPixmap(path));
+		
+		plainPreviewPb_->setEnabled(true);
+		actionStopLoad_->setEnabled(false);
+		clientModeCombo_->setEnabled(true);
+	}	
+	
+}
+
+void MvQWmsClientEditor::slotLegendLoaded(QString legendPath)
+{
+	QString txt=layerPreview_->toHtml();
+	
+	if(!legendPath.isEmpty())	
+	{
+		QString s="<img src=\"" + legendPath + "\">";
+		txt.replace("Legend not loaded",s);
+		layerPreview_->setHtml(txt);
+	}
+
+	previewPb_->setEnabled(true);
+	actionCapability_->setEnabled(true);
+	actionStopLoad_->setEnabled(false);
+	requestSplitter_->widget(0)->setEnabled(true);
+	clientModeCombo_->setEnabled(true);
+
+	loadFinished();
+}
+	
+void MvQWmsClientEditor::slotLogoLoaded(QString logoPath)
+{
+	QString txt=layerPreview_->toHtml();
+	
+	if(!logoPath.isEmpty())	
+	{
+		QString s="<img src=\"" + logoPath + "\">";
+		txt.replace("Logo not loaded",s);
+		layerPreview_->setHtml(txt);
+	}
+
+	loadFinished();
+}
+
+void MvQWmsClientEditor::slotUpdateLogOutput()
+{
+	logBrowser_->update();
+}
+
+void MvQWmsClientEditor::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+void MvQWmsClientEditor::slotSelectStyle(int index)
+{
+	client_->setStyleCurrentIndex(index);
+}
+
+void MvQWmsClientEditor::slotSelectCrs(QString value)
+{
+	client_->setCrsCurrentDisplayValue(value);
+}
+
+
+
+void MvQWmsClientEditor::slotSetGetMapInfo(QString req,QStringList reqSplit)
+{
+	QString  s;
+	if(!req.isEmpty())
+	{
+		QString getMaps;
+		s="<table><tbody>";	
+		s+="<tr><th class=\"first\">Frame</th><th>Request</th></tr>";
+
+		int i=1;
+		foreach(QString r,reqSplit)
+		{
+			s+="<tr><td class=\"first\">" + QString::number(i) + "</td><td>" + r + "</td></tr>";
+			i++;
+		}
+		s+="</tbody></table>";
+	}
+
+	getMapInfoSplit_->setHtml(s);
+	
+}
+
+void MvQWmsClientEditor::slotReqEdited(const QString &id)
+{
+	MvQGetMapRequest *req=client_->getMapRequest();
+	if(reqLe_.find(id) != reqLe_.end())
+	{
+		QString s=reqLe_[id]->text();
+		req->setItem(id,s);
+		client_->setGetMapRequest(req->request());
+	}	
+	else if(reqTe_.find(id) != reqTe_.end())
+	{
+		QString s=reqTe_[id]->toPlainText();
+		req->setItem(id,s);
+		client_->setGetMapRequest(req->request());
+	}
+}
+
+void MvQWmsClientEditor::slotClientReset()
+{
+	if(client_->clientMode() == MvQWmsUiClient::BasicMode)
+	{
+		slotSetGetMapInfo(client_->getMapRequest()->request(),client_->getMapRequest()->requestFrame());
+
+		MvQGetMapRequest* req=client_->getMapRequest();
+		QMapIterator<QString,QLineEdit*> itLe(reqLe_);
+		while(itLe.hasNext())
+		{
+			itLe.next();
+			itLe.value()->setText(req->item(itLe.key()));
+		}
+		QMapIterator<QString,QTextEdit*> itTe(reqTe_);
+		while(itTe.hasNext())
+		{
+			itTe.next();
+			itTe.value()->setPlainText(req->item(itTe.key()));
+		}
+	}	
+	else
+	{
+		initExtraParEdit();
+
+		//Init  url
+		if(client_->url().isEmpty() || urlCombo_->itemText(0) != client_->url())
+		{	
+			urlCombo_->insertItem(0,client_->url());
+			urlCombo_->setCurrentIndex(0);
+		}
+	
+		slotRunGetCapabilities();		
+	}
+}
+
+void MvQWmsClientEditor::initClientMode()
+{	
+	if(client_->clientMode() == MvQWmsUiClient::BasicMode)
+	{
+	  	//Toolbar  + menubar  + log 
+		actionCapability_->setEnabled(false);
+		actionStopLoad_->setEnabled(false);
+		
+		foreach(QWidget *w,advancedModeOnlyWidgets_)
+		{
+		  	w->setEnabled(false);
+		}
+		
+		slotClearLog(true);
+		slotStatusMessage("");
+
+		//Layer tabs
+	 	layerPanel_->hide();
+		clearLayerDependentData();
+
+		layerInfoTab_->setCurrentIndex(1);
+		layerInfoTab_->setTabEnabled(0,false);
+		layerInfoTab_->setTabEnabled(2,false);	
+		layerInfoTab_->setTabEnabled(3,false);
+		
+		plainPreviewLabel_->clear();
+		
+		plainPreviewPanel_->show();
+
+		
+		//This build the scrollarea and the request editors
+		setupReqEditPanel();
+
+		MvQGetMapRequest* req=client_->getMapRequest();
+		QMapIterator<QString,QLineEdit*> itLe(reqLe_);
+		while(itLe.hasNext())
+		{
+			itLe.next();
+			itLe.value()->setText(req->item(itLe.key()));
+		}
+		QMapIterator<QString,QTextEdit*> itTe(reqTe_);
+		while(itTe.hasNext())
+		{
+			itTe.next();
+			itTe.value()->setPlainText(req->item(itTe.key()));
+		}
+		
+		reqEditPanel_->show();
+
+	}
+	else
+	{		
+		actionCapability_->setEnabled(true);
+		actionStopLoad_->setEnabled(false);
+		
+		foreach(QWidget *w,advancedModeOnlyWidgets_)
+		{
+		  	w->setEnabled(true);
+		}
+	
+		slotClearLog(true);
+		slotStatusMessage("");
+
+		layerPanel_->show();
+		layerInfoTab_->setTabEnabled(0,true);
+		layerInfoTab_->setTabEnabled(2,true);	
+		layerInfoTab_->setTabEnabled(3,true);
+		layerInfoTab_->setCurrentIndex(0);
+		
+		plainPreviewPanel_->hide();
+		reqEditPanel_->hide();
+		
+		slotClearLog(true);
+
+		initExtraParEdit();
+
+		//Init  url
+		if(client_->url().isEmpty() || urlCombo_->itemText(0) != client_->url())
+		{	
+			urlCombo_->insertItem(0,client_->url());
+		}		
+		urlCombo_->setCurrentIndex(0);
+	
+		//Run getCapapabilities
+		//This will init most of the GUIs 
+		slotRunGetCapabilities();
+	}
+}
+
+void MvQWmsClientEditor::slotClientModeChanged(QString mode)
+{
+	if(!clientModeMap_.contains(mode))
+		return;
+	
+	writeSettings(); 
+
+	client_->setClientMode(clientModeMap_[mode]);
+
+	initClientMode();
+
+	readSettings();
+}
+
+void MvQWmsClientEditor::loadStarted()
+{
+	/*loadLabel_->show();
+	loadLabel_->movie()->start();*/
+
+	loadProgress_->setRange(0,0);
+	loadProgress_->show();
+}
+
+void MvQWmsClientEditor::loadFinished()
+{
+	loadProgress_->hide();
+	loadProgress_->setRange(0,1);
+	loadProgress_->setValue(1);
+	
+	/*loadLabel_->movie()->stop();
+	loadLabel_->hide();*/		
+}
+
+void MvQWmsClientEditor::slotStatusMessage(QString s)
+{
+	statusMessageLabel_->setText(s);
+	//statusBar()->showMessage(s);	
+}
+
+
+void MvQWmsClientEditor::slotSaveInfo()
+{	
+	client_->slotSaveInfo();
+	if(openCb_->isChecked() == false)
+	{
+		close();
+	}
+}
+
+void MvQWmsClientEditor::slotImportRequest()
+{	
+	MvQTextDialog diag(tr("Import GetMap request"),tr("GetMap request:"),tr("Import"));
+	
+	if(diag.exec() == QDialog::Accepted)
+	{
+		if(!diag.text().isEmpty())
+			client_->reset(diag.text());
+	}
+}
+
+//-------------------------------------
+//
+// Read/write settings
+//
+//-------------------------------------
+
+void MvQWmsClientEditor::writeSettings()
+{	
+	if(client_->clientMode() == MvQWmsUiClient::BasicMode)
+	{	
+		QSettings settings("ECMWF","MV4-MvQWmsClientEditor_Basic");
+
+		settings.beginGroup("mainWindow");
+		settings.setValue("geometry",saveGeometry());
+		settings.endGroup();
+	}
+	else
+	{
+		QSettings settings("ECMWF","MV4-MvQWmsClientEditor_Advanced");
+
+		settings.beginGroup("mainWindow");
+		settings.setValue("geometry",saveGeometry());
+		settings.setValue("state",saveState());
+		settings.setValue("mainSplitter",mainSplitter_->saveState());
+		settings.setValue("requestSplitter",requestSplitter_->saveState());
+		//settings.setValue("layerSplitter",layerSplitter_->saveState());
+		settings.setValue("layerTabIndex",layerTab_->currentIndex());
+		settings.setValue("layerInfoTabIndex",layerInfoTab_->currentIndex());	
+
+		QStringList lst;
+		for(int i=0; i < urlCombo_->count(); i++)
+		{
+			if(!urlCombo_->itemText(i).isEmpty())
+				lst << urlCombo_->itemText(i);
+		}
+		settings.setValue("urlCombo",lst);
+
+		settings.endGroup();
+	}
+
+	QSettings settings("ECMWF","MV4-MvQWmsClientEditor_Global");
+	settings.beginGroup("mainWindow");
+	settings.setValue("openCbStatus",openCb_->isChecked());
+	settings.setValue("actionLogStatus",actionLog_->isChecked());
+	settings.endGroup();
+
+}
+
+void MvQWmsClientEditor::readSettings()
+{
+	if(client_->clientMode() == MvQWmsUiClient::BasicMode)
+	{
+		QSettings settings("ECMWF","MV4-MvQWmsClientEditor_Basic");
+
+		settings.beginGroup("mainWindow");
+		restoreGeometry(settings.value("geometry").toByteArray());
+		restoreState(settings.value("state").toByteArray());
+		settings.endGroup();
+
+	}
+	else
+	{
+		QSettings settings("ECMWF","MV4-MvQWmsClientEditor_Advanced");
+
+		settings.beginGroup("mainWindow");
+		restoreGeometry(settings.value("geometry").toByteArray());
+		restoreState(settings.value("state").toByteArray());
+		mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+		requestSplitter_->restoreState(settings.value("requestSplitter").toByteArray());
+		
+		//Init tabs
+		int ival=settings.value("layerInfoTabIndex").toInt();
+		layerInfoTab_->setCurrentIndex(ival);
+
+		ival=settings.value("layerTabIndex").toInt();
+		layerTab_->setCurrentIndex(ival);
+
+		QStringList lst(settings.value("urlCombo").toStringList());
+		//lst.remove(client_->url())
+		urlCombo_->addItems(lst);
+
+		if(client_->url().isEmpty())
+			urlCombo_->lineEdit()->clear();
+
+
+		settings.endGroup();
+	}
+
+	QSettings settings("ECMWF","MV4-MvQWmsClientEditor_Global");
+
+	settings.beginGroup("mainWindow");
+
+	if(settings.value("actionLogStatus").isNull())
+	{
+		actionLog_->setChecked(false);
+	}
+	else
+	{
+		actionLog_->setChecked(settings.value("actionLogStatus").toBool());
+	}
+	
+	if(settings.value("openCbStatus").isNull())
+	{
+		//We set it to false by default
+	  	openCb_->setChecked(false);
+	}
+	else
+	{
+		openCb_->setChecked(settings.value("openCbStatus").toBool());
+	}
+	settings.endGroup();
+
+}
diff --git a/src/OgcClient/MvQWmsClientEditor.h b/src/OgcClient/MvQWmsClientEditor.h
new file mode 100644
index 0000000..faaca11
--- /dev/null
+++ b/src/OgcClient/MvQWmsClientEditor.h
@@ -0,0 +1,215 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQWmsClientEditor_H
+#define MvQWmsClientEditor_H
+
+#include <QGridLayout>
+#include <QLineEdit>
+#include <QComboBox>
+#include <QMainWindow>
+#include <QStringList>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+#include "MvQWmsClient.h"
+
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QListWidgetItem;
+class QListWidget;
+class QProgressBar;
+class QPushButton;
+class QScrollArea;
+class QSplitter;
+class QTabWidget;
+class QTextBrowser;
+class QTextEdit;
+class QToolButton;
+class QTreeView;
+class QVBoxLayout;
+
+class MvQHighlighter;
+class MvQLogBrowser;
+class MvQOgcTreeModel;
+class MvQTextEditSearchLine;
+class MvQWmsUiClient;
+class MvQWmsGetCapHighlighter;
+
+class MvQWmsDimensionGuiItem : public QObject
+{
+	Q_OBJECT
+public:
+	MvQWmsDimensionGuiItem(MvQOgcDimension*,QString,QGridLayout*,int);
+	~MvQWmsDimensionGuiItem();
+	QString currentValue();
+	void addValue(QString);
+
+public slots:
+	void slotClearText(bool);
+	void slotSetVisibleList(bool);
+	void slotListItemChanged(QListWidgetItem*);
+	void slotLineEditChanged(QString);
+	void slotAddItem(QListWidgetItem*);
+
+signals:
+	void textChanged(MvQOgcDimension*,QString);
+
+private:
+	MvQOgcDimension*	dim_;
+	QLabel *label_;
+	QLineEdit* lineEdit_; 
+	QStringList values_;
+	QToolButton *expandTb_;
+	QToolButton *clearTb_;
+	//QString default_;
+	QListWidget* list_; 
+	int row_;
+};
+
+
+class MvQWmsClientEditor : public MvQMainWindow
+{
+	Q_OBJECT
+
+public:
+	MvQWmsClientEditor(MvQWmsUiClient*,QWidget *w=0);
+	~MvQWmsClientEditor();
+
+public slots:
+	void slotClientModeChanged(QString);
+	void slotSaveInfo();
+	void slotStatusMessage(QString);
+	void slotSelectUrl(const QString&);
+	void slotSelectVersion(const QString&);
+	void slotRunGetCapabilities();	
+	void slotGetCapabilityLoaded();
+	void slotSelectLayer(const QModelIndex&);
+	void slotSelectStyle(int);
+	void slotSelectCrs(QString);
+	void slotDimensionChanged(MvQOgcDimension*,QString);
+	void slotExtraGetCapChanged(QString);
+	void slotExtraGetMapChanged(QString);
+	void slotUpdateLayerInfo();
+	void slotPreview();
+	void slotPreviewLoaded(QString);
+	void slotLegendLoaded(QString);
+	void slotLogoLoaded(QString);
+	void slotSetGetMapInfo(QString,QStringList);
+	void slotUpdateLogOutput();
+	void slotClearLog(bool);
+	void slotReqEdited(const QString&);
+	void slotImportRequest();
+	void slotClientReset();	
+	void slotUpdateServiceInfo();
+
+signals:
+	void clientModeChanged();
+	void clientModeIsAboutToChange();
+	
+protected:
+	void setupFileActions();
+	void setupSettingsActions();
+	void setupViewActions();
+	void setupLayerPanel(QVBoxLayout *);
+	void setupLayerInfoTab();
+	void setupLayerCombo();
+	void setupLayerList();
+	void setupDimension();
+	void setupReqEditPanel();
+
+	void initClientMode();
+	void initVersionCombo();
+	void initExtraParEdit();
+	void initFormatCombo();
+	void initStyleCombo();
+	void initCrsCombo();
+
+	void clearServerDependentData();
+	void clearLayerDependentData();
+	void clearDimension();
+		
+	void checkUrlComboItems();
+	
+	void loadStarted();
+	void loadFinished();
+	void writeSettings();
+	void readSettings();	
+
+	MvQWmsUiClient* client_;
+
+	QVBoxLayout* 	mainLayout_;
+	QSplitter*   	mainSplitter_;
+	QSplitter*   	requestSplitter_;
+
+	QCheckBox*	openCb_;
+
+	QLabel* 	loadLabel_;
+	QLabel*		statusMessageLabel_;
+	QList<QWidget*> advancedModeOnlyWidgets_;
+
+	MvQMainWindow::MenuItemMap 	menuItems_;
+	QAction* 	actionCapability_;
+	QAction*	actionStopLoad_;
+	QAction* 	actionLog_;
+	QComboBox* 	urlCombo_;
+	QComboBox* 	versionCombo_;
+	QComboBox* 	clientModeCombo_;
+	QMap<QString,MvQWmsUiClient::ClientMode> clientModeMap_;
+
+	QComboBox* formatCombo_;
+	QLineEdit *extraGetCapEdit_;
+	QLineEdit *extraGetMapEdit_;
+	
+	QTabWidget*	layerTab_;
+	QWidget* 	layerPanel_;
+	QGridLayout*	layerGrid_;
+	QHBoxLayout*	layerLayout_;
+	QTreeView*	layerTree_;
+	MvQOgcTreeModel* layerModel_;
+	QComboBox* 	crsCombo_;
+	QComboBox* 	styleCombo_;
+	QPushButton*	previewPb_;
+	int 		dimensionNum_;
+	int 		layerParamRowNum_;
+	QMap<QString,MvQWmsDimensionGuiItem*> dim_;
+	QLabel*          crsLabel_;
+
+	QTabWidget* 	layerInfoTab_;
+	QTextBrowser* 	getCapInfo_;
+	QTextBrowser* 	serviceInfo_;
+	QTextBrowser* 	layerPreview_;
+	QTextBrowser* 	getMapInfoSplit_;
+	MvQHighlighter*	highlighterSplit_;
+	QPushButton*	plainPreviewPb_;
+	QLabel*		plainPreviewLabel_;
+	QWidget* 	plainPreviewPanel_;
+
+	MvQLogBrowser* 	logBrowser_;
+	QWidget*	logPanel_;
+
+	MvQTextEditSearchLine* getCapSearch_;
+
+	MvQWmsGetCapHighlighter* highlighterGetCap_;
+
+	QProgressBar*	loadProgress_;
+
+	QMap<QString,QLineEdit*> reqLe_;
+	QMap<QString,QTextEdit*> reqTe_;
+	QSplitter*	reqSplitter_;
+	QWidget*	reqEditPanel_;
+	QScrollArea*    reqEditSa_;
+};
+
+
+#endif
+
diff --git a/src/OgcClient/ObjectSpec.WcsClient b/src/OgcClient/ObjectSpec.WcsClient
new file mode 100644
index 0000000..840cb70
--- /dev/null
+++ b/src/OgcClient/ObjectSpec.WcsClient
@@ -0,0 +1,36 @@
+
+object,
+ 	class		= WCSCLIENT,
+  	can_be_created	= True,
+ 	definition_file	= '$METVIEW_DIR/share/metview/etc/WcsClientDef',
+ 	rules_file	= '$METVIEW_DIR/share/metview/etc/WcsClientRules',
+	default_name	= WcsClient,
+	help_page	= WcsClient,
+ 	type		= Data,
+ 	expand		= 75,
+ 	macro		= wcsclient,
+#	editor_type	= ExternalServiceEditor,
+ 	editor_type	= QtOgcClientEditor,
+        pixmap		= '$METVIEW_DIR/share/metview/icons/WCS_CLIENT.icon'
+
+state,
+	class		= WCSCLIENT,
+	action		= edit,
+	service         = wcsclient
+
+# Actions prepare and drop are not defined here. This is to
+# make the drop action to be handled by the local application.
+state,
+	class		= WCSCLIENT,
+	output_class	= GRIB/NETCDF,
+	service		= wcsclient
+
+
+#action		= visualise/execute/save,
+
+service,
+	cmd		= '$METVIEW_CMD $METVIEW_BIN/WcsClient -maxforks 25 -style plastique -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss',
+	fullname = WCS Client,
+	maximum  = 0,
+	name		=  'wcsclient'
+
diff --git a/src/OgcClient/ObjectSpec.WmsClient b/src/OgcClient/ObjectSpec.WmsClient
new file mode 100644
index 0000000..9b63ef8
--- /dev/null
+++ b/src/OgcClient/ObjectSpec.WmsClient
@@ -0,0 +1,47 @@
+
+object,
+ 	class		= WMSCLIENT,
+  	can_be_created	= True,
+ 	definition_file	= '$METVIEW_DIR/share/metview/etc/WmsClientDef',
+ 	rules_file	= '$METVIEW_DIR/share/metview/etc/WmsClientRules',
+	default_name	= WmsClient,
+	help_page	= WmsClient,
+ 	type		= Data,
+ 	expand		= 75,
+ 	macro		= wmsclient,
+#	editor_type	= ExternalServiceEditor,
+ 	editor_type	= QtOgcClientEditor,
+        pixmap		= '$METVIEW_DIR/share/metview/icons/WMS_CLIENT.icon'
+
+state,
+	class		= WMSCLIENT,
+	action		= edit/examine,
+	service         = wmsclient
+
+# Actions prepare and drop are not defined here. This is to
+# make the drop action to be handled by the local application.
+# Parameter 'context' indicates that WMSCLIENT needs a context info,
+# e.g., geographical info from MapView::CallService
+state,
+	class		= WMSCLIENT,
+	action		= visualise/execute/save,
+	context		= 1,
+	service		= wmsclient
+
+state,
+	class		= WMSCLIENT,
+	output_class	= PRASTERLOOP,
+	service		= wmsclient
+
+
+state,
+	class   	= PRASTERLOOP,
+	action  	= visualise,
+	service		= uPlotManager
+
+service,
+	cmd		= '$METVIEW_CMD $METVIEW_BIN/WmsClient -maxforks 25 -style plastique -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss',
+	fullname = WMS Client,
+	maximum  = 0,
+	name		=  'wmsclient'
+
diff --git a/src/OgcClient/WCS_CLIENT.svg b/src/OgcClient/WCS_CLIENT.svg
new file mode 100644
index 0000000..0be55bf
--- /dev/null
+++ b/src/OgcClient/WCS_CLIENT.svg
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3688"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="WCS_CLIENT.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="WMS_CLIENT.png"
+   inkscape:export-xdpi="45"
+   inkscape:export-ydpi="45"
+   version="1.1">
+  <defs
+     id="defs3690">
+    <linearGradient
+       id="linearGradient4292">
+      <stop
+         style="stop-color:#e4a312;stop-opacity:1"
+         offset="0"
+         id="stop4294" />
+      <stop
+         id="stop4308"
+         offset="0.5"
+         style="stop-color:#dfae71;stop-opacity:1" />
+      <stop
+         style="stop-color:#ccd6c8;stop-opacity:1;"
+         offset="1"
+         id="stop4296" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4275">
+      <stop
+         style="stop-color:#c5e9eb;stop-opacity:1;"
+         offset="0"
+         id="stop4277" />
+      <stop
+         style="stop-color:#c5e9eb;stop-opacity:0;"
+         offset="1"
+         id="stop4279" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4229">
+      <stop
+         style="stop-color:#69c5b5;stop-opacity:1"
+         offset="0"
+         id="stop4231" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4233" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4221">
+      <stop
+         style="stop-color:#7cc1b3;stop-opacity:1"
+         offset="0"
+         id="stop4223" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4225" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3678">
+      <stop
+         style="stop-color:#d9dce6;stop-opacity:1;"
+         offset="0"
+         id="stop3680" />
+      <stop
+         style="stop-color:#324060;stop-opacity:1;"
+         offset="1"
+         id="stop3682" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3678"
+       id="linearGradient3684"
+       x1="14.5655"
+       y1="32.444444"
+       x2="61.4345"
+       y2="32.444444"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0.4153207,0.625)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4221"
+       id="linearGradient4227"
+       x1="7.4365482"
+       y1="14.912783"
+       x2="17.436548"
+       y2="14.912783"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4229"
+       id="linearGradient4235"
+       x1="2.3853253"
+       y1="34.659899"
+       x2="8.3853253"
+       y2="34.659899"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4275"
+       id="linearGradient4283"
+       x1="7.75"
+       y1="34.875"
+       x2="34.875"
+       y2="34.875"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4292"
+       id="linearGradient4298"
+       x1="22.578678"
+       y1="19.313492"
+       x2="22.57868"
+       y2="47.827412"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.6692699,0,0,1.4331683,9.6998665,-1.8254253)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="12.3125"
+     inkscape:cx="29.132049"
+     inkscape:cy="32"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1400"
+     inkscape:window-height="1001"
+     inkscape:window-x="1952"
+     inkscape:window-y="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3709" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="inner"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient4283);fill-opacity:1;stroke:none;stroke-width:1.18171751;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       id="path4257"
+       sodipodi:cx="21.3125"
+       sodipodi:cy="34.875"
+       sodipodi:rx="13.5625"
+       sodipodi:ry="22.28125"
+       d="M 34.875 34.875 A 13.5625 22.28125 0 1 1  7.75,34.875 A 13.5625 22.28125 0 1 1  34.875 34.875 z"
+       transform="matrix(2.1392713,2.4415209e-2,0,1.3020788,-13.70766,-13.686692)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="map"
+     inkscape:groupmode="layer"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       style="fill:url(#linearGradient3684);fill-opacity:1;fill-rule:evenodd;stroke:#2f642a;stroke-width:0.86900002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 44.415321,6.625 L 44.415321,9.625 L 43.415321,9.625 L 41.415321,9.625 C 41.415321,9.625 41.415321,9.625 40.415321,8.625 C 39.415321,7.625 37.415321,9.625 37.415321,9.625 L 36.415321,10.625 C 36.415321,10.625 34.415321,9.625 32.415321,13.625 C 30.415321,17.625 33.415321,14.625 33.415321,14.625 L 35.415321,13.625 L 35.415321,15.625 L 34.415321,17.625 L 33.415321,18.625 L 31.415321,17.625 L 29.415321,16.625 L 28.415321,16.625 L 28.415321,17.625 L 26.415321,18.625 L 25.415321,18. [...]
+       id="path3662" />
+    <path
+       style="fill:url(#linearGradient4227);fill-opacity:1;fill-rule:evenodd;stroke:#19691e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="M 13.936548,10.412783 L 9.9365482,13.412783 L 7.9365482,18.412783 L 8.9365482,19.412783 L 9.9365482,19.412783 L 11.936548,18.412783 L 13.936548,17.412783 L 15.936548,15.412783 L 16.936548,13.412783 L 16.936548,12.412783 L 16.936548,11.412783 L 13.936548,10.412783 z "
+       id="path3656"
+       sodipodi:nodetypes="cccccccccccc" />
+    <path
+       style="fill:url(#linearGradient4235);fill-opacity:1;fill-rule:evenodd;stroke:#2a611e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="M 4.8228253,29.943679 C 4.2857159,29.992507 3.8853253,30.381179 3.8853253,30.381179 L 2.8853253,34.381179 L 4.8853253,39.381179 L 4.8853253,38.381179 L 5.8853253,36.381179 L 6.8853253,35.381179 L 7.8853253,33.381179 L 7.8853253,32.381179 L 6.8853253,31.381179 C 6.8853253,31.381179 6.8853253,31.381179 5.8853253,30.381179 C 5.5103253,30.006179 5.1450909,29.914382 4.8228253,29.943679 z "
+       id="path3660"
+       sodipodi:nodetypes="ccccccccccsc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="frame"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#3d6689;stroke-width:1.18171751;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       id="path2883"
+       sodipodi:cx="21.3125"
+       sodipodi:cy="34.875"
+       sodipodi:rx="13.5625"
+       sodipodi:ry="22.28125"
+       d="M 34.875 34.875 A 13.5625 22.28125 0 1 1  7.75,34.875 A 13.5625 22.28125 0 1 1  34.875 34.875 z"
+       transform="matrix(2.1392713,2.4415209e-2,0,1.3020788,-13.418785,-13.599216)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient4298);fill-opacity:1;fill-rule:evenodd;stroke:#8e6f2a;stroke-width:1.34681761px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 41.210335,32.420544 L 41.178416,46.902852 L 34.673409,46.902852 L 47.364239,61.326591 L 60.106142,46.902852 L 53.652201,46.902852 L 53.652201,32.303397 L 41.210335,32.420544 z "
+       id="path4290"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="Text box"
+     style="display:inline">
+    <rect
+       style="opacity:1;fill:#d8d7d5;fill-opacity:0.62121211;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.30529547;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3187"
+       width="50.694908"
+       height="19.100998"
+       x="11.652648"
+       y="7.2463541"
+       ry="1.3877366" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="Title"
+     style="display:inline">
+    <text
+       xml:space="preserve"
+       style="font-size:17.45768113px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr;text-anchor:start;fill:#1e6b98;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Sans"
+       x="14.945991"
+       y="22.059835"
+       id="text2211"
+       sodipodi:linespacing="100%"
+       transform="scale(0.9698713,1.0310647)"><tspan
+         sodipodi:role="line"
+         id="tspan2197"
+         x="14.945991"
+         y="22.059835">WCS</tspan></text>
+  </g>
+</svg>
diff --git a/src/OgcClient/WCS_CLIENT.xpm b/src/OgcClient/WCS_CLIENT.xpm
new file mode 100644
index 0000000..1e0c454
--- /dev/null
+++ b/src/OgcClient/WCS_CLIENT.xpm
@@ -0,0 +1,293 @@
+/* XPM */
+static char *WCS_CLIENT[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 255 2",
+"   c #3AA64C896BB8",
+".  c #38E458CE6667",
+"X  c #44024CCE5CF8",
+"o  c #5AC566C55798",
+"O  c #424A4F806E2D",
+"+  c #49F953946729",
+"@  c #56095B196795",
+"#  c #49BA569C741E",
+"$  c #50845D417A5C",
+"%  c #49B0609D66B1",
+"&  c #59E265AE6A24",
+"*  c #4C0E7ACB6F29",
+"=  c #5B5B77DF692D",
+"-  c #4DD461C37098",
+";  c #5A926A21761C",
+":  c #6224669C6C59",
+">  c #690F6ADD6F40",
+",  c #69E87B026EAD",
+"<  c #61746BC575AA",
+"1  c #67AD746173AA",
+"2  c #73F379F67A07",
+"3  c #9B307A6636E9",
+"4  c #8E767C14562C",
+"5  c #95887FC25339",
+"6  c #916A7F73592F",
+"7  c #4E5683E97EDF",
+"8  c #5BC083E77C00",
+"9  c #5D34997B76BF",
+"0  c #659981737DE3",
+"q  c #B44D8ACA3684",
+"w  c #DACEA2CE3888",
+"e  c #E40EA9523BD3",
+"r  c #9D0E82CE4F8C",
+"t  c #860D84165549",
+"y  c #9644804B5583",
+"u  c #98E8835855ED",
+"i  c #A9BB899F4F93",
+"p  c #BE96963F4AF9",
+"a  c #A1B2886F5689",
+"s  c #B025913259B8",
+"d  c #B8D8969D59D8",
+"f  c #8B1481C36D90",
+"g  c #923A89147028",
+"h  c #B4999E906DE8",
+"j  c #B700A14072A9",
+"k  c #BCD0A5337553",
+"l  c #B714A6D67D6C",
+"z  c #C2309A495C2B",
+"x  c #D991A3D245E0",
+"c  c #D8C6A5C25722",
+"v  c #E21FA953458E",
+"b  c #E14BAA4C4EDA",
+"n  c #E10FAB4D584E",
+"m  c #C58DA4EB6EEA",
+"M  c #D82BA78063F4",
+"N  c #E000AC4D61C3",
+"B  c #DE3CAD376C45",
+"V  c #D49CAC8F72FB",
+"C  c #DE83AFD97477",
+"Z  c #DF24B04E74EE",
+"A  c #DBB8B3127BD2",
+"S  c #E088AD0864E0",
+"D  c #23F56E3799E7",
+"F  c #26F070389B06",
+"G  c #2AF872459BF4",
+"H  c #339376189D5F",
+"J  c #355F78F29E7E",
+"K  c #39B77B479F0F",
+"L  c #34567966A137",
+"P  c #3B447C89A286",
+"I  c #5B63678F83B9",
+"U  c #50AC71B08E74",
+"Y  c #434D7CB3A005",
+"T  c #5276739C907D",
+"R  c #56947A339404",
+"E  c #76B07D7A832D",
+"W  c #6DF478C79251",
+"Q  c #40747C92A0E2",
+"!  c #5C7980358972",
+"~  c #4BC184999F7C",
+"^  c #5CF183ED96AC",
+"/  c #604B8BD08D53",
+"(  c #7DD283D78A22",
+")  c #78A085A488B9",
+"_  c #70CB9A388014",
+"`  c #7EC294ED8EF2",
+"'  c #650085F49EAA",
+"]  c #65888EB09962",
+"[  c #7AE48816923D",
+"{  c #77DB89599C9F",
+"}  c #6E1B98939DDF",
+"|  c #7EA39A7C9614",
+" . c #758DA049833B",
+".. c #43B4807BA481",
+"X. c #4D8D84D2A451",
+"o. c #4BE687E5AA77",
+"O. c #53AE84DFA3E0",
+"+. c #58048A5AA5F6",
+"@. c #53EA8D5EAD91",
+"#. c #5BBC91DBADD4",
+"$. c #66548606A036",
+"%. c #665D8A06A391",
+"&. c #6B368D00A4FB",
+"*. c #686E8E7EA8AD",
+"=. c #6C37923EAAEC",
+"-. c #6D259950AC2C",
+";. c #73E99330AB54",
+":. c #7A55976CA95A",
+">. c #7E269A3DAE48",
+",. c #6AF09B93B5E5",
+"<. c #7E019C3BB2AB",
+"1. c #7C92A1D3AFB8",
+"2. c #7A1EA2F2B678",
+"3. c #84AA89218C57",
+"4. c #918F8D268524",
+"5. c #82D291B58B64",
+"6. c #81C29C1E8EB3",
+"7. c #8A2F8E0A959A",
+"8. c #83508B069C36",
+"9. c #8DA6933B950B",
+"0. c #8B849B619B70",
+"q. c #9346961C960A",
+"w. c #98009B799629",
+"e. c #938E94F79AB8",
+"r. c #94939AA99A59",
+"t. c #9D959D4F9D18",
+"y. c #A02B9FCC9F7E",
+"u. c #88DFA79A9670",
+"i. c #9213A7B79AC2",
+"p. c #9BDCA49D9D2E",
+"a. c #A251ABBC8E1E",
+"s. c #BFCEABA7816D",
+"d. c #84158BF0A0ED",
+"f. c #8A5A92C8A672",
+"g. c #8B129957A76A",
+"h. c #82C69BB5AD8F",
+"j. c #96859ABCA702",
+"k. c #91909E34A652",
+"l. c #91FE9A40AD17",
+"z. c #83999E0CB1D7",
+"x. c #973F9EA1B095",
+"c. c #8455AC86AD16",
+"v. c #936EA451A46B",
+"b. c #9C90A4BEA384",
+"n. c #968FA3DDAA41",
+"m. c #9AEAB5C7A67A",
+"M. c #9A8CB683A8A6",
+"N. c #8597A3E5B4CE",
+"B. c #8A52A320B3C4",
+"V. c #8ADCA408B90E",
+"C. c #8105A9E5BEE0",
+"Z. c #8C9EAC3FBCE9",
+"A. c #9319A59EB52C",
+"S. c #9AE7A2A2B407",
+"D. c #9370AC75BD94",
+"F. c #98CCAAC1B842",
+"G. c #9BE8B511BDBE",
+"H. c #A105A418A0F6",
+"J. c #A693ADBDAAED",
+"K. c #AA4AAA02A9B6",
+"L. c #AB49B181AC3A",
+"P. c #A435BCD1ABC3",
+"I. c #A037A625B47C",
+"U. c #A096A741B8CB",
+"Y. c #A5B3ADA5BC3E",
+"T. c #AB52AFBEB8F0",
+"R. c #A386B66DB386",
+"E. c #A302B34EBC96",
+"W. c #ACCAB7E9BB2E",
+"Q. c #B30AB711B65F",
+"!. c #B2E7B893B6F0",
+"~. c #B3ABB5B2BD59",
+"^. c #B30FBC91BA09",
+"/. c #BCB5BC7FBBA2",
+"(. c #C9B9B0018102",
+"). c #C833B4EA8CC1",
+"_. c #DAFEB76984EF",
+"`. c #D7BAB9C08AE4",
+"'. c #D993BBF88DFC",
+"]. c #D72EBF82961A",
+"[. c #A37DC30BB3BE",
+"{. c #A7ACCA77BC5C",
+"}. c #B599C265BD6D",
+"|. c #D710C25F9BC3",
+" X c #CF45CF7BBA49",
+".X c #D867CD48B549",
+"XX c #DB77D351BE21",
+"oX c #8ABFB013C266",
+"OX c #9446B5B3C4D3",
+"+X c #9BA2B352C3E8",
+"@X c #93B6B8E5C81A",
+"#X c #9D00B926C6E0",
+"$X c #98CABAE1C993",
+"%X c #A338B6B1C787",
+"&X c #AE56B446C407",
+"*X c #A481BB7AC3F2",
+"=X c #AE6ABB08C335",
+"-X c #A267BF4DCBD4",
+";X c #AC75BE58CD88",
+":X c #B30DB827C09B",
+">X c #B68DB93BC0BE",
+",X c #B63FBB86CA6E",
+"<X c #9E85C272CE51",
+"1X c #AB25C709CC2A",
+"2X c #B875C7B1C5CA",
+"3X c #BD61CC0FC51A",
+"4X c #BBE6C273CCF2",
+"5X c #BBE4D45DC8A3",
+"6X c #AAD9C6EAD1AC",
+"7X c #B4BDC42ED1B4",
+"8X c #BEA9CAB5D593",
+"9X c #B981D71DD9F0",
+"0X c #BF9EE196DD8E",
+"qX c #BE73DF57E482",
+"wX c #C6C7CB8DCC29",
+"eX c #DF4AD909C6CF",
+"rX c #C3E0C846D556",
+"tX c #C506C942D6A5",
+"yX c #CC7CCFE4DC79",
+"uX c #C988D6D7D9B7",
+"iX c #C624DF85D881",
+"pX c #D2A6D63DD74D",
+"aX c #DB97DC5BDCAF",
+"sX c #E1F8DD6DCD5C",
+"dX c #E6C4DFEAD0B5",
+"fX c #C869E33FDDBA",
+"gX c #D858E248DF96",
+"hX c #E908E51ADAC4",
+"jX c #CFD9DA92E411",
+"kX c #D3D9DD18E534",
+"lX c #DBFADF65E156",
+"zX c #C3C6E53FE290",
+"xX c #C8E1E456E8AE",
+"cX c #CE13ED2AEEB2",
+"vX c #D6BFE68AE5E4",
+"bX c #DE60E57AEBBD",
+"nX c #D22AEDD4EF57",
+"mX c #CF26EEBBF0B8",
+"MX c #D3F1EF84F11A",
+"NX c #D015F074F252",
+"BX c #D65EF0EAF256",
+"VX c #DBF2F28CF3A0",
+"CX c #E896E7A5E6B8",
+"ZX c #EA87E94BE81F",
+"AX c #E58BEB18EFDB",
+"SX c #F27DEF1AE6EE",
+"DX c #F4FBF36EEEF6",
+"FX c #EA83EF34F2EE",
+"GX c #E073F4E6F663",
+"HX c #EED9F26EF579",
+"JX c #F525F672F763",
+"KX c #F957F87CF6AA",
+"LX c #F4F3F741F95E",
+"PX c #F817F9D6FB60",
+"IX c #FFA6FFB4FFBF",
+/* pixels */
+"IXIXIXIXIXIXIXIXIXIXIXIXIXIXPXLXJXPXIXIXIXIXIXIXIXIXIXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXIXIXLXbX;XD.V.<.<.V.D.7XbXPXIXIXIXIXIXIXIXIXIXIX",
+"IXIXIXIXIXIXPXKXFX7X;.' :.D.%X6X6X#XD.:.$.>.8XJXKXKXKXKXKXKXPXIX",
+"IXIXIXIXIXaXt.9.E ; < ) 9.9.9.9.9.q.q.3.) < & E q.w.w.w.w.w.t.aX",
+"IXIXIXIXIXK.9.g.B.3XwXE.*XwX4XG.2XwXW.| :.n.b.n.g.B.D.=XpXpXK.H.",
+"IXIXIXIXPX9.0.1.P 6XuXP @.aX$XP *XR.~ H J K B.F.P H P o.uXZX/.t.",
+"IXIXIXIX;X- b.*XG oX1XL L 8X2.H M.+.F z.E.A.F.;.D ;.A.+XlXZX/.t.",
+"IXIXIXuXR ; b.^.K ,.2. at .o.OX@.X.R.K X.:X>X~.~.z.G J +.N.pXZX/.t.",
+"IXIXHX&.7 1 i.}.#... at .C.,.#.J -.3XK X.:X>X~.~.T.>.O.G F V.CX/.t.",
+"IXIX7X^ 9 = J.gXC.D L G.1.G F B.^.O.G A.~.Y.Y.F.S.S.;.D =.yX/.t.",
+"IXJX;.<XzX0.!.vX-XF J R.F.G G E.wXF.P H ..Q B.>.J Y H H h.=XQ.t.",
+"IXkX*.qXNXk.!.vXuX at XOX}.^.N.#X3X}.4XR.Z.1.>.T.Y.>.*.*.h.I.Y.J.y.",
+"IX%X2.cXmXv.q.!.!.!.J.p.p.L./.Q.p.r.H.!.w.r.e.e.e.e.9.7.7.7.3.K.",
+"PXV. at XcXcX9Xn.v.5.2 3.3.( 2 , r.b.b.5.& : : & @ @ @ + + X X ; aX",
+"LX>.c.zXcXcXBXcXm.2XtX4X,X&Xv.i.iX5X6.[ { W W W I I $ # O   R FX",
+"HX&.8 u.zXcXMX9Xm.yXrX4X,X&XY.n.` ` 8.d.( 2 2 1 > : & # O   T AX",
+"HX' } _ 1XmXMX[.}.yXrX4X,X&XY.U.S.l.f.8.4 q q q q q 3 @ O   U bX",
+"JX&./  .0XcXMX[.}.yXrX4X,X&XY.S.S.l.f.8.5 w e e e e q o O   R FX",
+"PXN.* {.cXcXMX9Xm.yXtX4X,X&XY.U.S.l.f.8.5 x v v v v p a.%   ' HX",
+"IX%X] zXcXcXnXcXm.R.4X4X,X&XY.S.S.l.f.8.y x b b b b p  X= . >.PX",
+"IXkX*.qXcXcXnXMXzX{.m.i.i.v.Y.U.S.l.f.8.y c n n n n p eX3X! ;XIX",
+"IXJX;.<XcXcXcXnXMXBXnXfXiXM.0.U.S.l.f.8.y c S N N S d sXFX;.kXIX",
+"IXIX;X=.xXcXcXnXMXMXBXVXVXvXu.S.x.j.7.3.5 M B B B S d XX=X:.DXIX",
+"IXIXHX;.$XcXnXnXMXMXBXVXVXVXm.k.j.6 r a i B C C C Z z s a u XXIX",
+"IXIXIX8X%.9XMXnXMXMXBXVXVXVXM.k.S.4.i V A A A A A A A V d ).KXIX",
+"IXIXIXIX%X=.qXMXMXMXBXVXVXGXP.k.S.l.g s _._._._._._._.m s.DXIXIX",
+"IXIXIXIXLXD.=.9XBXBXBXVXVXVX2X0.S.l.f.f d `.'.'.'.'.m k SXIXIXIX",
+"IXIXIXIXIXJX+X%.6XnXVXVXVXVXiX6.x.l.f.[ t k ].].|.(.j hXIXIXIXIX",
+"IXIXIXIXIXIXPX7X&.<.9XnXVXGXVX[.` f.f.) P.l k |.).h dXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXAX+X&.:.OX9XxXvX2X| 0 8 h.{ g l h eXIXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXIXIXAX7XV.;.&.;.;.%.^ :.%XjXhXj .XIXIXIXIXIXIXIX",
+"IXIXIXIXIXIXIXIXIXIXIXIXPXHXAXkXkXbXFXLXIXIXIXDXPXIXIXIXIXIXIXIX"
+};
diff --git a/src/OgcClient/WMS_CLIENT.svg b/src/OgcClient/WMS_CLIENT.svg
new file mode 100644
index 0000000..a8da615
--- /dev/null
+++ b/src/OgcClient/WMS_CLIENT.svg
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3688"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="WMS_CLIENT.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="WMS_CLIENT.png"
+   inkscape:export-xdpi="45"
+   inkscape:export-ydpi="45"
+   version="1.1">
+  <defs
+     id="defs3690">
+    <linearGradient
+       id="linearGradient4292">
+      <stop
+         style="stop-color:#e4a312;stop-opacity:1"
+         offset="0"
+         id="stop4294" />
+      <stop
+         id="stop4308"
+         offset="0.5"
+         style="stop-color:#dfae71;stop-opacity:1" />
+      <stop
+         style="stop-color:#ccd6c8;stop-opacity:1;"
+         offset="1"
+         id="stop4296" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4275">
+      <stop
+         style="stop-color:#c5e9eb;stop-opacity:1;"
+         offset="0"
+         id="stop4277" />
+      <stop
+         style="stop-color:#c5e9eb;stop-opacity:0;"
+         offset="1"
+         id="stop4279" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4229">
+      <stop
+         style="stop-color:#69c5b5;stop-opacity:1"
+         offset="0"
+         id="stop4231" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4233" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4221">
+      <stop
+         style="stop-color:#7cc1b3;stop-opacity:1"
+         offset="0"
+         id="stop4223" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4225" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3678">
+      <stop
+         style="stop-color:#d9dce6;stop-opacity:1;"
+         offset="0"
+         id="stop3680" />
+      <stop
+         style="stop-color:#324060;stop-opacity:1;"
+         offset="1"
+         id="stop3682" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3678"
+       id="linearGradient3684"
+       x1="14.5655"
+       y1="32.444444"
+       x2="61.4345"
+       y2="32.444444"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0.4153207,0.625)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4221"
+       id="linearGradient4227"
+       x1="7.4365482"
+       y1="14.912783"
+       x2="17.436548"
+       y2="14.912783"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4229"
+       id="linearGradient4235"
+       x1="2.3853253"
+       y1="34.659899"
+       x2="8.3853253"
+       y2="34.659899"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4275"
+       id="linearGradient4283"
+       x1="7.75"
+       y1="34.875"
+       x2="34.875"
+       y2="34.875"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4292"
+       id="linearGradient4298"
+       x1="22.578678"
+       y1="19.313492"
+       x2="22.57868"
+       y2="47.827412"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.6692699,0,0,1.4331683,9.6998665,-1.8254253)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="12.3125"
+     inkscape:cx="29.132049"
+     inkscape:cy="32"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1400"
+     inkscape:window-height="1001"
+     inkscape:window-x="2083"
+     inkscape:window-y="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3709" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="inner"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient4283);fill-opacity:1;stroke:none;stroke-width:1.18171751;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       id="path4257"
+       sodipodi:cx="21.3125"
+       sodipodi:cy="34.875"
+       sodipodi:rx="13.5625"
+       sodipodi:ry="22.28125"
+       d="M 34.875 34.875 A 13.5625 22.28125 0 1 1  7.75,34.875 A 13.5625 22.28125 0 1 1  34.875 34.875 z"
+       transform="matrix(2.1392713,2.4415209e-2,0,1.3020788,-13.70766,-13.686692)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="map"
+     inkscape:groupmode="layer"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       style="fill:url(#linearGradient3684);fill-opacity:1;fill-rule:evenodd;stroke:#2f642a;stroke-width:0.86900002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 44.415321,6.625 L 44.415321,9.625 L 43.415321,9.625 L 41.415321,9.625 C 41.415321,9.625 41.415321,9.625 40.415321,8.625 C 39.415321,7.625 37.415321,9.625 37.415321,9.625 L 36.415321,10.625 C 36.415321,10.625 34.415321,9.625 32.415321,13.625 C 30.415321,17.625 33.415321,14.625 33.415321,14.625 L 35.415321,13.625 L 35.415321,15.625 L 34.415321,17.625 L 33.415321,18.625 L 31.415321,17.625 L 29.415321,16.625 L 28.415321,16.625 L 28.415321,17.625 L 26.415321,18.625 L 25.415321,18. [...]
+       id="path3662" />
+    <path
+       style="fill:url(#linearGradient4227);fill-opacity:1;fill-rule:evenodd;stroke:#19691e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="M 13.936548,10.412783 L 9.9365482,13.412783 L 7.9365482,18.412783 L 8.9365482,19.412783 L 9.9365482,19.412783 L 11.936548,18.412783 L 13.936548,17.412783 L 15.936548,15.412783 L 16.936548,13.412783 L 16.936548,12.412783 L 16.936548,11.412783 L 13.936548,10.412783 z "
+       id="path3656"
+       sodipodi:nodetypes="cccccccccccc" />
+    <path
+       style="fill:url(#linearGradient4235);fill-opacity:1;fill-rule:evenodd;stroke:#2a611e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="M 4.8228253,29.943679 C 4.2857159,29.992507 3.8853253,30.381179 3.8853253,30.381179 L 2.8853253,34.381179 L 4.8853253,39.381179 L 4.8853253,38.381179 L 5.8853253,36.381179 L 6.8853253,35.381179 L 7.8853253,33.381179 L 7.8853253,32.381179 L 6.8853253,31.381179 C 6.8853253,31.381179 6.8853253,31.381179 5.8853253,30.381179 C 5.5103253,30.006179 5.1450909,29.914382 4.8228253,29.943679 z "
+       id="path3660"
+       sodipodi:nodetypes="ccccccccccsc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="frame"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#3d6689;stroke-width:1.18171751;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       id="path2883"
+       sodipodi:cx="21.3125"
+       sodipodi:cy="34.875"
+       sodipodi:rx="13.5625"
+       sodipodi:ry="22.28125"
+       d="M 34.875 34.875 A 13.5625 22.28125 0 1 1  7.75,34.875 A 13.5625 22.28125 0 1 1  34.875 34.875 z"
+       transform="matrix(2.1392713,2.4415209e-2,0,1.3020788,-13.418785,-13.599216)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient4298);fill-opacity:1;fill-rule:evenodd;stroke:#8e6f2a;stroke-width:1.34681761px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 41.210335,32.420544 L 41.178416,46.902852 L 34.673409,46.902852 L 47.364239,61.326591 L 60.106142,46.902852 L 53.652201,46.902852 L 53.652201,32.303397 L 41.210335,32.420544 z "
+       id="path4290"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="Text box"
+     style="display:inline">
+    <rect
+       style="opacity:1;fill:#d8d7d5;fill-opacity:0.62121211;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.30529547;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3187"
+       width="50.694908"
+       height="19.100998"
+       x="11.652648"
+       y="7.2463541"
+       ry="1.3877366" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="Title"
+     style="display:inline">
+    <text
+       xml:space="preserve"
+       style="font-size:17.45768166px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#dc243a;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Sans"
+       x="14.945991"
+       y="22.059835"
+       id="text2211"
+       sodipodi:linespacing="100%"
+       transform="scale(0.9698713,1.0310647)"><tspan
+         sodipodi:role="line"
+         id="tspan2213"
+         x="14.945991"
+         y="22.059835">WMS</tspan></text>
+  </g>
+</svg>
diff --git a/src/OgcClient/WMS_CLIENT.xpm b/src/OgcClient/WMS_CLIENT.xpm
new file mode 100755
index 0000000..0cb0e6d
--- /dev/null
+++ b/src/OgcClient/WMS_CLIENT.xpm
@@ -0,0 +1,290 @@
+/* XPM */
+static char *WMS_CLIENT[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 252 2",
+"   c #3AA64C896BB8",
+".  c #38E458CE6667",
+"X  c #44024CCE5CF8",
+"o  c #5AC566C55798",
+"O  c #424A4F806E2D",
+"+  c #49F953946729",
+"@  c #56095B196795",
+"#  c #4D1F59EE773D",
+"$  c #4ADF6DB46AED",
+"%  c #59BD65ED6A5E",
+"&  c #5B5B77DF692D",
+"*  c #4DD461C37098",
+"=  c #5A5F6A347635",
+"-  c #647268076D51",
+";  c #69E87B026EAD",
+":  c #60EA6B9B75A6",
+">  c #67AD746173AA",
+",  c #73F379F67A07",
+"<  c #DCD5251B3B6E",
+"1  c #DC1E291E3E5F",
+"2  c #9B307A6636E9",
+"3  c #DAE82D36427A",
+"4  c #D7F1320946C2",
+"5  c #D99F31C8459C",
+"6  c #D96933A8485C",
+"7  c #D6513A0C4D58",
+"8  c #DB8C3A124D59",
+"9  c #DA5B3DDD50F5",
+"0  c #8E767C14562C",
+"q  c #95887FC25339",
+"w  c #916A7F73592F",
+"e  c #B84261786B38",
+"r  c #BEC669FF7A3C",
+"t  c #D52F3FDB4F7E",
+"y  c #CDCC46A95988",
+"u  c #D57F42245521",
+"i  c #D71646875910",
+"p  c #DE14467E588F",
+"a  c #CA8C5A206980",
+"s  c #D1005537603D",
+"d  c #DB7C5378644F",
+"f  c #DC3E5B456AB5",
+"g  c #E24C50D86206",
+"h  c #CDD662696CE2",
+"j  c #CBB1651274B6",
+"k  c #D41E64FA7227",
+"l  c #D0A66EB477C5",
+"z  c #DB4E71997E2A",
+"x  c #4E5683E97EDF",
+"c  c #5BC083E77C00",
+"v  c #5D34997B76BF",
+"b  c #659981737DE3",
+"n  c #B44D8ACA3684",
+"m  c #DACEA2CE3888",
+"M  c #E40EA9523BD3",
+"N  c #9D0E82CE4F8C",
+"B  c #860D84165549",
+"V  c #979681D255B8",
+"C  c #A9BB899F4F93",
+"Z  c #BE96963F4AF9",
+"A  c #A1B2886F5689",
+"S  c #B025913259B8",
+"D  c #B8D8969D59D8",
+"F  c #8FD886A46F4B",
+"G  c #B4999E906DE8",
+"H  c #BCD0A5337553",
+"J  c #B70AA40B780A",
+"K  c #C2309A495C2B",
+"L  c #D991A3D245E0",
+"P  c #D8C6A5C25722",
+"I  c #E21FA953458E",
+"U  c #E14BAA4C4EDA",
+"Y  c #E10FAB4D584E",
+"T  c #C58DA4EB6EEA",
+"R  c #DD64AAB3627E",
+"E  c #DE3CAD376C45",
+"W  c #D49CAC8F72FB",
+"Q  c #DE83AFD97477",
+"!  c #DF24B04E74EE",
+"~  c #DBB8B3127BD2",
+"^  c #E088AD0864E0",
+"/  c #5B63678F83B9",
+"(  c #50AC71B08E74",
+")  c #5276739C907D",
+"_  c #56947A339404",
+"`  c #755E7EA68467",
+"'  c #6DF478C79251",
+"]  c #A6E27F058AE6",
+"[  c #B8687DC98A05",
+"{  c #C58D767584D1",
+"}  c #DE6A77D883FA",
+"|  c #5C7980358972",
+" . c #5CF183ED96AC",
+".. c #604B8BD08D53",
+"X. c #77A885208884",
+"o. c #7D3184138A71",
+"O. c #70CB9A388014",
+"+. c #7EC294ED8EF2",
+"@. c #650085F49EAA",
+"#. c #65888EB09962",
+"$. c #795F88B7976E",
+"%. c #6E1B98939DDF",
+"&. c #7ECC9C999083",
+"*. c #758DA049833B",
+"=. c #66548606A036",
+"-. c #665D8A06A391",
+";. c #6B368D00A4FB",
+":. c #6D7C92A1AAD6",
+">. c #73F792EEAB7B",
+",. c #7A1F96EAAB53",
+"<. c #7E55999BAF10",
+"1. c #7E019C3BB2AB",
+"2. c #7C52A1FAB66E",
+"3. c #842C892F8C78",
+"4. c #918F8D268524",
+"5. c #824A96EA8D0B",
+"6. c #874C8C469670",
+"7. c #83508B069C36",
+"8. c #89DA93309708",
+"9. c #8D459383958D",
+"0. c #8BED9C279D4A",
+"q. c #9329974496F2",
+"w. c #92339A9A95AB",
+"e. c #931796B89BA7",
+"r. c #966F9A8199D8",
+"t. c #9DF49E279DFF",
+"y. c #B804845F8EDE",
+"u. c #BBBF866492B5",
+"i. c #B0B58F6993C9",
+"p. c #B6678B13978C",
+"a. c #A46A97449A97",
+"s. c #88DFA79A9670",
+"d. c #91E8A7C79AD6",
+"f. c #9BA3A4B59D4D",
+"g. c #A251ABBC8E1E",
+"h. c #BFCEABA7816D",
+"j. c #8A5A92C8A672",
+"k. c #8DAA9548A8C1",
+"l. c #895A9951A839",
+"z. c #95BA9B82A618",
+"x. c #91FE9A40AD17",
+"c. c #AC549C72A794",
+"v. c #BA559CFCA1DE",
+"b. c #BE5E9E5CA8A3",
+"n. c #8455AC86AD16",
+"m. c #936EA451A46B",
+"M. c #9DE7A40BA2BA",
+"N. c #947BA06DA94E",
+"B. c #9AEAB5C7A67A",
+"V. c #991CB7CEA64F",
+"C. c #8812A1FAB691",
+"Z. c #8ADCA408B90E",
+"A. c #9AB4A1CDB3F9",
+"S. c #9062A7D6BC0F",
+"D. c #92ABAC1FBE3E",
+"F. c #A923A673A850",
+"G. c #A603AD6EAAC8",
+"H. c #B77BA8E2A9B3",
+"J. c #A648B783ABD9",
+"K. c #A478A991B6A0",
+"L. c #A096A741B8CB",
+"P. c #A70BAD90BE21",
+"I. c #AC0AB801B52C",
+"U. c #B2AEB0D0B064",
+"Y. c #B22AB773B5FD",
+"T. c #BB53BAD5B3A0",
+"R. c #B4E5BC46BAF9",
+"E. c #B98DB9E6BB4D",
+"W. c #C48689018D07",
+"Q. c #CA5C8E81944B",
+"!. c #D9E488BA931A",
+"~. c #C11599349A75",
+"^. c #D7F1954A9D12",
+"/. c #C9B9B0018102",
+"(. c #C833B4EA8CC1",
+"). c #DAFEB76984EF",
+"_. c #D7BAB9C08AE4",
+"`. c #D993BBF88DFC",
+"'. c #D72EBF82961A",
+"]. c #C66F9ABEA4D8",
+"[. c #D7D09D5DA3C8",
+"{. c #C910A6A8A9D3",
+"}. c #D617A625A9CA",
+"|. c #D975ACAEB25A",
+" X c #CA77B0C2B395",
+".X c #D560B613B98E",
+"XX c #E6C3B088B5DE",
+"oX c #A37DC30BB3BE",
+"OX c #A7ACCA77BC5C",
+"+X c #B641C303BDFD",
+"@X c #D710C25F9BC3",
+"#X c #CF45CF7BBA49",
+"$X c #D867CD48B549",
+"%X c #DB77D351BE21",
+"&X c #9B0AB319C441",
+"*X c #9986BA38C84F",
+"=X c #A338B6B1C787",
+"-X c #AE56B446C407",
+";X c #A60DBA8EC551",
+":X c #AC75BE58CD88",
+">X c #B6FFBD56C11E",
+",X c #B63FBB86CA6E",
+"<X c #CB93BF51C0B8",
+"1X c #E738BE5DC264",
+"2X c #9E85C272CE51",
+"3X c #AC9DC8D1CBBE",
+"4X c #B654CA75C32F",
+"5X c #BBF7C11ACE08",
+"6X c #B4BDC42ED1B4",
+"7X c #BF8AC97FD59C",
+"8X c #B981D71DD9F0",
+"9X c #BF9EE196DD8E",
+"0X c #BE73DF57E482",
+"qX c #C44FC479C7BA",
+"wX c #C74FCA15C700",
+"eX c #DB20C7B1CA61",
+"rX c #CBE7D120CAF4",
+"tX c #DF4AD909C6CF",
+"yX c #C3E0C846D556",
+"uX c #C506C942D6A5",
+"iX c #CC7CCFE4DC79",
+"pX c #C624DF85D881",
+"aX c #D957D4D1D5D4",
+"sX c #DBD1DBA8DC13",
+"dX c #E1F8DD6DCD5C",
+"fX c #E56CCF48D118",
+"gX c #E6C4DFEAD0B5",
+"hX c #C869E33FDDBA",
+"jX c #E908E51ADAC4",
+"kX c #CFD9DA92E411",
+"lX c #D3D9DD18E534",
+"zX c #C3C6E53FE290",
+"xX c #C8E1E456E8AE",
+"cX c #CE13ED2AEEB2",
+"vX c #D5EDE61DE534",
+"bX c #DE60E57AEBBD",
+"nX c #D22AEDD4EF57",
+"mX c #CF26EEBBF0B8",
+"MX c #D3F1EF84F11A",
+"NX c #D015F074F252",
+"BX c #D65EF0EAF256",
+"VX c #DBF2F28CF3A0",
+"CX c #E58BEB18EFDB",
+"ZX c #F27DEF1AE6EE",
+"AX c #F4FBF36EEEF6",
+"SX c #EA83EF34F2EE",
+"DX c #E073F4E6F663",
+"FX c #EED9F26EF579",
+"GX c #F525F672F763",
+"HX c #F4F3F741F95E",
+"JX c #F8B7F929F905",
+"KX c #FFA6FFB4FFBF",
+/* pixels */
+"KXKXKXKXKXKXKXKXKXKXKXKXKXKXJXHXGXJXKXKXKXKXKXKXKXKXKXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXKXKXHXbX:XD.Z.1.1.Z.D.6XbXJXKXKXKXKXKXKXKXKXKXKX",
+"KXKXKXKXKXKXJXJXSX6X>. at .,.D.=X3X3X*XD.,.=.<.7XGXJXJXJXJXJXJXJXKX",
+"KXKXKXKXKXsXr.9.` = : X.8.9.9.9.9.q.q.3.X.: % ` 9.r.r.r.r.r.t.aX",
+"KXKXKXKXKXG.9.a.v.wXrX{. XrXqX{.<X X~.a.G.U.i.] z.>X.X[.^.|.F.F.",
+"KXKXKXKXJX8.0.W.9 .XeXp f sX[.p }.l 1 h E.v.7 6 p.c.d 9 p g v.M.",
+"KXKXKXKX:X* M.{.5 ^.|.8 8 eX} 7 H.h < 7 b.{ 1 3 u.[ 3 !.fX1XH.t.",
+"KXKXKXiX_ = M.T.t z !.f d ^.f s T.k 7 i j y y 4 u.p.4 u } XXT.t.",
+"KXKXFX;.x > d.+Xk p f !.z k 8 l rXh u { 3 u { 4 u.K.y.a 4 6 [ M.",
+"KXKX6X .v & G.vX!.1 8 {.W.5 3 Q.R.a u b.u j u.5 u.c.c.c.[ 3 e M.",
+"KXGX>.2XzX8.Y.vX|.3 8 H.~.3 6 {.qXk u H.H.U.u.4 u.y.7 y 7 8 y.M.",
+"KXlX;.0XNXz.Y.vXaX[.[.T.T.Q.}.wXE.].W.rXwXI.H.{ H.F.[ r r p.F.t.",
+"KX=X2.cXmXm.q.Y.Y.Y.G.f.f.J.R.Y.f.r.M.Y.w.e.e.e.e.9.9.8.6.8.3.F.",
+"JXZ.*XcXcX8Xm.m.5., 3.3.o., ; w.M.M.5.% - - % @ @ @ + + X X = sX",
+"HX<.n.zXcXcXBXcXV.4XuX5X,X-Xm.d.pX4X5.$.$.' ' ' / / # # O   _ SX",
+"FX;.c s.zXcXMX8XB.iXyX5X,X-XP.N.+.+.7.7.o., , > - - % # O   ) CX",
+"FX at .%.O.3XmXMXoX+XiXyX5X,X-XP.L.A.x.j.7.0 n n n n n 2 @ O   ( bX",
+"GX;...*.9XcXMXoX+XiXyX5X,X-XP.A.A.x.j.7.q m M M M M n o O   _ SX",
+"JXC.$ OXcXcXMX8XB.iXuX5X,X-XP.L.A.x.j.7.q L I I I I Z g.*   @.FX",
+"KX=X#.zXcXcXnXcXV.J.5X5X,X-XP.A.A.x.j.7.V L U U U U Z #X& . <.JX",
+"KXlX;.0XcXcXnXMXzXOXV.d.d.m.P.L.A.x.j.7.V P Y Y Y Y Z tX4X| :XKX",
+"KXGX>.2XcXcXcXnXMXBXnXhXpXV.0.L.A.x.j.7.V P ^ R R ^ D dXSX>.lXKX",
+"KXKX:X:.xXcXcXnXMXMXBXVXVXvXs.A.x.k.8.3.q R E E E ^ D %X;X,.AXKX",
+"KXKXFX>.*XcXnXnXMXMXBXVXVXVXV.z.z.w N A C E Q Q Q ! K S A N %XKX",
+"KXKXKX7X-.8XMXnXMXMXBXVXVXVXV.z.A.4.C W ~ ~ ~ ~ ~ ~ ~ W D (.JXKX",
+"KXKXKXKX=X:.0XMXMXMXBXVXVXDXJ.z.A.x.F S ).).).).).).).T h.AXKXKX",
+"KXKXKXKXHXS.:.8XBXBXBXVXVXVX4X0.A.x.j.F D _.`.`.`.`.T H ZXKXKXKX",
+"KXKXKXKXKXGX&X-.3XnXVXVXVXVXpX5.A.x.j.$.B H '.'. at X/.J jXKXKXKXKX",
+"KXKXKXKXKXKXJX6X;.1.8XnXVXDXVXoX+.j.j.X.J.J H @X(.G gXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXCX&X;.,.*X8XxXvX4X&.b c l.$.F H G tXKXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXKXKXCX6XZ.>.;.>.>.-. .,.=XkXjXJ $XKXKXKXKXKXKXKX",
+"KXKXKXKXKXKXKXKXKXKXKXKXJXFXCXlXlXbXSXHXKXKXKXAXKXKXKXKXKXKXKXKX"
+};
diff --git a/src/OgcClient/WcsClientDef b/src/OgcClient/WcsClientDef
new file mode 100644
index 0000000..078bc9e
--- /dev/null
+++ b/src/OgcClient/WcsClientDef
@@ -0,0 +1,62 @@
+WCSCLIENT ; WCS Client app; Def of wcs
+{
+	MODE
+	{
+		EXPERT	; EXPERT
+		INTERACTIVE ; INTERACTIVE
+	} = EXPERT
+
+	SERVER
+        {
+                @
+        } 
+
+	VERSION
+        {
+                @
+        } 
+
+        REQUEST
+        {
+                @
+        } 
+
+	EXTRA_GETCAP_PAR
+        {
+                @
+        } 
+
+	EXTRA_GETMAP_PAR
+        {
+                @
+        } 
+
+	HTTP_USER
+        {
+                @
+        } 
+
+	HTTP_PASSWORD
+        {
+                @
+        } 
+
+	LAYER_DESCRIPTION
+		[ visible = false ]
+
+	{
+		@
+	}
+
+	SERVICE_TITLE
+		[ visible = false ]
+
+	{
+		@
+	}
+
+	TIME_DIMENSIONS
+        {
+                @
+        }
+}
diff --git a/src/OgcClient/WcsClientRules b/src/OgcClient/WcsClientRules
new file mode 100644
index 0000000..e69de29
diff --git a/src/OgcClient/WmsClientDef b/src/OgcClient/WmsClientDef
new file mode 100644
index 0000000..5962168
--- /dev/null
+++ b/src/OgcClient/WmsClientDef
@@ -0,0 +1,110 @@
+WMSCLIENT ; WMS Client app
+{
+	MODE
+	{
+		EXPERT	; EXPERT
+		INTERACTIVE ; INTERACTIVE
+	} = INTERACTIVE
+
+	SERVER
+        {
+		@
+        } = ''
+
+	VERSION
+        {       
+		@
+        } = ''
+
+        REQUEST
+        {           
+		@
+        }  = ''
+
+	EXTRA_GETCAP_PAR
+        {           
+	       @
+        } = ''
+
+	EXTRA_GETMAP_PAR
+        {          
+	       @
+        } = ''
+
+	HTTP_USER
+        {           
+	       @ 
+        } = ''
+
+	HTTP_PASSWORD
+        {             
+	       @
+        } = ''
+
+	LAYER_TITLE
+		[ visible = false ]
+
+	{		
+		@
+	} = ''
+
+	LAYER_DESCRIPTION
+		[ visible = false ]
+
+	{		
+		@
+	} = ''
+
+	SERVICE_TITLE
+		[ visible = false ]
+
+	{		
+		@
+	} = ''
+
+	LAYER_LEGEND
+		[ visible = false ]
+
+	{		
+		@
+	} = ''
+
+	LAYER_NOSUBSETS
+		[ visible = false ]
+
+	{
+		@
+	} = '0'
+
+	LAYER_FIXEDWIDTH
+		[ visible = false ]
+
+	{
+		@
+	} = '0'
+
+	LAYER_FIXEDHEIGHT
+		[ visible = false ]
+
+	{
+		@
+	} = '0'
+
+	TIME_DIMENSIONS
+        {               
+	       @
+        } = ''
+
+	LAYER_LOGO
+		[ visible = false ]
+	{		
+		@
+	} = ''
+
+	MAX_BOUNDING_BOX
+		[ visible = false ]
+	{		
+		@
+	} = ''
+	
+}
diff --git a/src/OgcClient/WmsClientRules b/src/OgcClient/WmsClientRules
new file mode 100644
index 0000000..e69de29
diff --git a/src/OgcClient/preview.css b/src/OgcClient/preview.css
new file mode 100644
index 0000000..e5eef62
--- /dev/null
+++ b/src/OgcClient/preview.css
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+ * Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ * of the Apache License version 2.0. In applying this license, ECMWF does not
+ * waive the privileges and immunities granted to it by virtue of its status as
+ * an Intergovernmental Organization or submit itself to any jurisdiction.
+ ***************************** LICENSE END *************************************/
+
+ html
+    {
+        color: #000000;
+        background-color: #FFFFFF;
+    }
+  
+    /*table
+    {
+	border-color:  #0000FF;
+	background-color: #FF0000;
+
+     }*/
+
+/*  table
+   {
+        background-color: #F6F6F6;
+        border: 1px solid #000000;
+        border-collapse: separate;
+        font-size: 11px;
+        margin-bottom: 25px; 
+	border-collapse: collapse;
+        border-spacing: 0;
+    }*/
+   td
+    {
+        padding: 3px 15px 3px 20px;
+	background-color: #F9F9F9;
+        color: #000000;
+    }
+
+   td.first
+    {
+        padding: 3px 15px 3px 20px;
+	font-weight: bold;
+	/*font-size: large;*/
+	background-color: #F6F6F6;
+        color: #000000;
+    }
+ 
+   td.image
+    {
+       background-color: #F9F9F9;
+       color: #F9F9F9;
+    }
+
+  th
+    {
+       padding: 3px 15px 3px 20px;
+       background-color: #F9F9F9;
+       color: #000000;
+
+    }
+
+
+/*   tr
+    {
+        background-color: #F6F6F6;
+        color: #000000;
+    }
+  
+*/
diff --git a/src/OperaRadar/B0000000000247014008.TXT b/src/OperaRadar/B0000000000247014008.TXT
new file mode 100644
index 0000000..6dacc61
--- /dev/null
+++ b/src/OperaRadar/B0000000000247014008.TXT
@@ -0,0 +1,1488 @@
+ 000001 TABLE A:  ENTRY                                                  CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000002 TABLE A:  DATA CATEGORY DESCRIPTION, LINE 1                      CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000003 TABLE A:  DATA CATEGORY DESCRIPTION, LINE 2                      CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000004 BUFR/CREX MASTER TABLE                                           CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000005 BUFR/CREX EDITION NUMBER                                         CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000006 BUFR MASTER TABLE VERSION NUMBER                                 CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000007 CREX MASTER TABLE VERSION NUMBER                                 CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000008 BUFR LOCAL TABLE VERSION NUMBER                                  CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000010 F DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0   8 CHARACTER                 0         1
+ 000011 X DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000012 Y DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000013 ELEMENT NAME, LINE 1                                             CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000014 ELEMENT NAME, LINE 2                                             CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000015 UNITS NAME                                                       CCITTIA5                   0            0 192 CHARACTER                 0        24
+ 000016 UNITS SCALE SIGN                                                 CCITTIA5                   0            0   8 CHARACTER                 0         1
+ 000017 UNITS SCALE                                                      CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000018 UNITS REFERENCE SIGN                                             CCITTIA5                   0            0   8 CHARACTER                 0         1
+ 000019 UNITS REFERENCE VALUE                                            CCITTIA5                   0            0  80 CHARACTER                 0        10
+ 000020 ELEMENT DATA WIDTH                                               CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000030 DESCRIPTOR DEFINING SEQUENCE                                     CCITTIA5                   0            0  48 CHARACTER                 0         6
+ 001001 WMO BLOCK NUMBER                                                 NUMERIC                    0            0   7 NUMERIC                   0         2
+ 001002 WMO STATION NUMBER                                               NUMERIC                    0            0  10 NUMERIC                   0         3
+ 001003 WMO REGION NUMBER/GEOGRAPHICAL AREA                              CODE TABLE 1003            0            0   3 CODE TABLE 1003           0         1
+ 001004 WMO REGION SUB-AREA (SEE NOTE 9)                                 NUMERIC                    0            0   3 NUMERIC                   0         1
+ 001005 BUOY/PLATFORM IDENTIFIER                                         NUMERIC                    0            0  17 NUMERIC                   0         5
+ 001006 AIRCRAFT FLIGHT NUMBER                                           CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001007 SATELLITE IDENTIFIER                                             CODE TABLE 1007            0            0  10 CODE TABLE 1007           0         4
+ 001008 AIRCRAFT REGISTRATION NUMBER OR OTHER IDENTIFICATION             CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001009 TYPE OF COMMERCIAL AIRCRAFT                                      CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001010 STATIONARY BUOY PLATFORM IDENTIFIER; E.G. C-MAN BUOYS            CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001011 SHIP OR MOBILE LAND STATION IDENTIFIER                           CCITTIA5                   0            0  72 CHARACTER                 0         9
+ 001012 DIRECTION OF MOTION OF MOVING OBSERVING PLATFORM**               DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 001013 SPEED OF MOTION OF MOVING OBSERVING PLATFORM*                    M/S                        0            0  10 M/S                       0         3
+ 001014 PLATFORM DRIFT SPEED (HIGH PRECISION)                            M/S                        2            0  10 M/S                       2         4
+ 001015 STATION OR SITE NAME                                             CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001018 SHORT STATION OR SITE NAME                                       CCITTIA5                   0            0  40 CHARACTER                 0         5
+ 001019 LONG STATION OR SITE NAME                                        CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 001020 WMO REGION SUB-AREA                                              NUMERIC                    0            0   4 NUMERIC                   0         2
+ 001021 SYNOPTIC FEATURE IDENTIFIER                                      NUMERIC                    0            0  14 NUMERIC                   0         4
+ 001022 NAME OF FEATURE (SEE NOTE 11)                                    CCITTIA5                   0            0 224 CHARACTER                 0        28
+ 001023 OBSERVATION SEQUENCE NUMBER                                      NUMERIC                    0            0   9 NUMERIC                   0         3
+ 001025 STORM IDENTIFIER                                                 CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 001026 WMO STORM NAME                                                   CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001027 WMO LONG STORM NAME                                              CCITTIA5                   0            0  80 CHARACTER                 0        10
+ 001031 IDENTIFICATION OF ORIGINATING/GENERATING CENTRE (SEE NOTE 10)    CODE TABLE 1031            0            0  16 CODE TABLE 1031           0         5
+ 001032 GENERATING APPLICATION                                           CODE TABLE 1032            0            0   8 CODE TABLE 1032           0         3
+ 001033 IDENTIFICATION OF ORIGINATING/GENERATING CENTRE                  CODE TABLE 1033            0            0   8 CODE TABLE 1033           0         3
+ 001034 IDENTIFICATION OF ORIGINATING/GENERATING SUB-CENTRE              CODE TABLE 1034            0            0   8 CODE TABLE 1034           0         3
+ 001035 ORIGINATING CENTRE                                               COMMON CODE TABLE C-11     0            0  16 COMMON CODE TABLE C-11    0         5
+ 001036 AGENCY IN CHARGE OF OPERATING THE OBSERVING PLATFORM             CODE TABLE 1036            0            0  20 CODE TABLE 1036           0         7
+ 001041 ABSOLUTE PLATFORM VELOCITY - FIRST COMPONENT (SEE NOTE 6)        M/S                        5  -1073741824  31 M/S                       5        10
+ 001042 ABSOLUTE PLATFORM VELOCITY - SECOND COMPONENT (SEE NOTE 6)       M/S                        5  -1073741824  31 M/S                       5        10
+ 001043 ABSOLUTE PLATFORM VELOCITY - THIRD COMPONENT (SEE NOTE 6)        M/S                        5  -1073741824  31 M/S                       5        10
+ 001050 PLATFORM TRANSMITTER ID NUMBER                                   NUMERIC                    0            0  17 NUMERIC                   0         6
+ 001051 PLATFORM TRANSMITTER ID NUMBER                                   CCITTIA5                   0            0  96 CHARACTER                 0        12
+ 001060 AIRCRAFT REPORTING POINT (BEACON IDENTIFIER)                     CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001062 SHORT ICAO LOCATION INDICATOR                                    CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001063 ICAO LOCATION INDICATOR                                          CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001064 RUNWAY DESIGNATOR                                                CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001075 TIDE STATION IDENTIFICATION                                      CCITTIA5                   0            0  40 CHARACTER                 0         5
+ 001080 SHIP LINE NUMBER ACCORDING TO SOOP                               CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001081 RADIOSONDE SERIAL NUMBER                                         CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001082 RADIOSONDE ASCENSION NUMBER (SEE NOTE 12)                        NUMERIC                    0            0  14 NUMERIC                   0         4
+ 001083 RADIOSONDE RELEASE NUMBER (SEE NOTE 12)                          NUMERIC                    0            0   3 NUMERIC                   0         1
+ 001085 OBSERVING PLATFORM MANUFACTURER'S MODEL                          CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001086 OBSERVING PLATFORM MANUFACTURER'S SERIAL NUMBER                  CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 001087 WMO MARINE OBSERVING PLATFORM EXTENDED IDENTIFIER                NUMERIC                    0            0  23 NUMERIC                   0         7
+ 001090 TECHNIQUE FOR MAKING UP INITIAL PERTURBATIONS                    CODE TABLE 1090            0            0   8 CODE TABLE 1090           0         3
+ 001091 ENSEMBLE MEMBER NUMBER                                           NUMERIC                    0            0  10 NUMERIC                   0         4
+ 001092 TYPE OF ENSEMBLE FORECAST                                        CODE TABLE 1092            0            0   8 CODE TABLE 1092           0         3
+ 001093 BALLOON LOT NUMBER                                               CCITTIA5                   0            0  96 CHARACTER                 0        12
+ 001094 WBAN NUMBER                                                      NUMERIC                    0            0  17 NUMERIC                   0         5
+ 001095 OBSERVER IDENTIFICATION                                          CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001096 STATION ACQUISITION                                              CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001192 Type of station identifier                                       CCITT IA5                  0            0  24
+ 001193 Station identifier                                               CCITT IA5                  0            0 128
+ 001194 CARRIER BALLOON/AIRCRAFT IDENTIFIER                              CCITTIA5                   0            0  72
+ 001195 MOBIL LAND STATION IDENTIFIER                                    CCITTIA5                   0            0  72
+ 001196 CONSTANT LEVEL BALLOON IDENTIFIER                                CCITTIA5                   0            0  72
+ 001197 RTP - PLATFORM TYPE                                              CODE TABLE 1197            0            0  10
+ 001198 ITP - DECK ID                                                    CODE TABLE 1198            0            0  10
+ 001199 DUP - DUPLICATE STATUS                                           CODE TABLE 1199            0            0   4
+ 001201 GENERATING APPLICATION                                           CODE TABLE 1201            0            0   8
+ 001205 SATELLITE IDENTIFIER                                             CODE TABLE 1205            0            0  10
+ 001208 VELOCITY OF PLATFORM, X                                          M/S                        5  -1073741824  31
+ 001209 VELOCITY OF PLATFORM, Y                                          M/S                        5  -1073741824  31
+ 001210 VELOCITY OF PLATFORM, Z                                          M/S                        5  -1073741824  31
+ 002001 TYPE OF STATION                                                  CODE TABLE 2001            0            0   2 CODE TABLE 2001           0         1
+ 002002 TYPE OF INSTRUMENTATION FOR WIND MEASUREMENT                     FLAG TABLE 2002            0            0   4 FLAG TABLE 2002           0         2
+ 002003 TYPE OF MEASURING EQUIPMENT USED                                 CODE TABLE 2003            0            0   4 CODE TABLE 2003           0         2
+ 002004 TYPE OF INSTRUMENTATION FOR EVAPORATION MEASUREMENT OR TYPE OF C CODE TABLE 2004            0            0   4 CODE TABLE 2004           0         2
+ 002005 PRECISION OF TEMPERATURE OBSERVATION                             K                          2            0   7 K                         2         3
+ 002011 RADIOSONDE TYPE                                                  CODE TABLE 2011            0            0   8 CODE TABLE 2011           0         3
+ 002012 RADIOSONDE COMPUTATIONAL METHOD                                  CODE TABLE 2012            0            0   4 CODE TABLE 2012           0         2
+ 002013 SOLAR AND INFRARED RADIATION CORRECTION                          CODE TABLE 2013            0            0   4 CODE TABLE 2013           0         2
+ 002014 TRACKING TECHNIQUE/STATUS OF SYSTEM USED                         CODE TABLE 2014            0            0   7 CODE TABLE 2014           0         3
+ 002015 RADIOSONDE COMPLETENESS                                          CODE TABLE 2015            0            0   4 CODE TABLE 2015           0         2
+ 002016 RADIOSONDE CONFIGURATION                                         FLAG TABLE 2016            0            0   5 FLAG TABLE 2016           0         2
+ 002019 SATELLITE INSTRUMENTS                                            CODE TABLE 2019            0            0  11 CODE TABLE 2019           0         4
+ 002020 SATELLITE CLASSIFICATION                                         CODE TABLE 2020            0            0   9 CODE TABLE 2020           0         3
+ 002021 SATELLITE INSTRUMENT DATA USED IN PROCESSING                     FLAG TABLE 2021            0            0   9 FLAG TABLE 2021           0         3
+ 002022 SATELLITE DATA-PROCESSING TECHNIQUE USED                         FLAG TABLE 2022            0            0   8 FLAG TABLE 2022           0         3
+ 002023 SATELLITE DERIVED WIND COMPUTATION METHOD                        CODE TABLE 2023            0            0   4 CODE TABLE 2023           0         2
+ 002024 INTEGRATED MEAN HUMIDITY COMPUTATIONAL METHOD                    CODE TABLE 2024            0            0   4 CODE TABLE 2024           0         2
+ 002025 SATELLITE CHANNEL(S) USED IN COMPUTATION                         FLAG TABLE 2025            0            0  25 FLAG TABLE 2025           0         9
+ 002026 CROSS TRACK RESOLUTION                                           M                          2            0  12 M                         2         4
+ 002027 ALONG TRACK RESOLUTION                                           M                          2            0  12 M                         2         4
+ 002028 SEGMENT SIZE AT NADIR IN X DIRECTION                             M                          0            0  18 M                         0         6
+ 002029 SEGMENT SIZE AT NADIR IN Y DIRECTION                             M                          0            0  18 M                         0         6
+ 002030 METHOD OF CURRENT MEASUREMENT                                    CODE TABLE 2030            0            0   3 CODE TABLE 2030           0         1
+ 002031 DURATION AND TIME OF CURRENT MEASUREMENT                         CODE TABLE 2031            0            0   5 CODE TABLE 2031           0         2
+ 002032 INDICATOR FOR DIGITIZATION                                       CODE TABLE 2032            0            0   2 CODE TABLE 2032           0         1
+ 002033 METHOD OF SALINITY/DEPTH MEASUREMENT                             CODE TABLE 2033            0            0   3 CODE TABLE 2033           0         1
+ 002034 DROGUE TYPE                                                      CODE TABLE 2034            0            0   5 CODE TABLE 2034           0         2
+ 002035 CABLE LENGTH                                                     M                          0            0   9 M                         0         3
+ 002036 BUOY TYPE                                                        CODE TABLE 2036            0            0   2 CODE TABLE 2036           0         1
+ 002037 METHOD OF TIDAL OBSERVATION                                      CODE TABLE 2037            0            0   3 CODE TABLE 2037           0         1
+ 002038 METHOD OF WATER TEMPERATURE AND/OR SALINITY MEASUREMENT          CODE TABLE 2038            0            0   4 CODE TABLE 2038           0         2
+ 002039 METHOD OF WET-BULB TEMPERATURE MEASUREMENT                       CODE TABLE 2039            0            0   3 CODE TABLE 2039           0         1
+ 002040 METHOD OF REMOVING VELOCITY AND MOTION OF PLATFORM FROM CURRENT  CODE TABLE 2040            0            0   4 CODE TABLE 2040           0         2
+ 002041 METHOD FOR ESTIMATING REPORTS RELATED TO SYNOPTIC FEATURES       CODE TABLE 2041            0            0   6 CODE TABLE 2041           0         2
+ 002042 INDICATOR FOR SEA SURFACE CURRENT SPEED                          CODE TABLE 2042            0            0   2 CODE TABLE 2042           0         1
+ 002044 INDICATOR FOR METHOD OF CALCULATING SPECTRAL WAVE DATA           CODE TABLE 2044            0            0   4 CODE TABLE 2044           0         2
+ 002045 INDICATOR FOR TYPE OF PLATFORM                                   CODE TABLE 2045            0            0   4 CODE TABLE 2045           0         2
+ 002046 WAVE MEASUREMENT INSTRUMENTATION                                 CODE TABLE 2046            0            0   4 CODE TABLE 2046           0         2
+ 002048 SATELLITE SENSOR INDICATOR                                       CODE TABLE 2048            0            0   4 CODE TABLE 2048           0         2
+ 002049 GEOSTATIONARY SATELLITE DATA-PROCESSING TECHNIQUE USED           FLAG TABLE 2049            0            0   8 FLAG TABLE 2049           0         3
+ 002050 GEOSTATIONARY SOUNDER SATELLITE CHANNELS USED                    FLAG TABLE 2050            0            0  20 FLAG TABLE 2050           0         7
+ 002051 INDICATOR TO SPECIFY OBSERVING METHOD FOR EXTREME TEMPERATURES   CODE TABLE 2051            0            0   4 CODE TABLE 2051           0         2
+ 002052 GEOSTATIONARY IMAGER SATELLITE CHANNELS USED                     FLAG TABLE 2052            0            0   6 FLAG TABLE 2052           0         2
+ 002053 GOES-I/M BRIGHTNESS TEMPERATURE CHARACTERISTICS                  CODE TABLE 2053            0            0   4 CODE TABLE 2053           0         2
+ 002054 GOES-I/M SOUNDINGS PARAMETER CHARACTERISTICS                     CODE TABLE 2054            0            0   4 CODE TABLE 2054           0         2
+ 002055 GEOSTATIONARY SOUNDINGS STATISTICAL PARAMETERS                   CODE TABLE 2055            0            0   4 CODE TABLE 2055           0         2
+ 002056 GEOSTATIONARY SOUNDINGS ACCURACY STATISTICS                      CODE TABLE 2056            0            0   4 CODE TABLE 2056           0         2
+ 002057 ORIGIN OF FIRST GUESS INFORMATION FOR GOES-I/M SOUNDINGS         CODE TABLE 2057            0            0   4 CODE TABLE 2057           0         2
+ 002058 VALID TIMES OF FIRST GUESS INFORMATION FOR GOES-I/M SOUNDINGS    CODE TABLE 2058            0            0   4 CODE TABLE 2058           0         2
+ 002059 ORIGIN OF ANALYSIS INFORMATION FOR GOES-I/M SOUNDINGS            CODE TABLE 2059            0            0   4 CODE TABLE 2059           0         2
+ 002060 ORIGIN OF SURFACE INFORMATION FOR GOES-I/M SOUNDINGS             CODE TABLE 2060            0            0   4 CODE TABLE 2060           0         2
+ 002061 AIRCRAFT NAVIGATIONAL SYSTEM                                     CODE TABLE 2061            0            0   3 CODE TABLE 2061           0         1
+ 002062 TYPE OF AIRCRAFT DATA RELAY SYSTEM                               CODE TABLE 2062            0            0   4 CODE TABLE 2062           0         2
+ 002063 AIRCRAFT ROLL ANGLE                                              DEGREE                     2       -18000  16 DEGREE                    2         5
+ 002064 AIRCRAFT ROLL ANGLE QUALITY                                      CODE TABLE 2064            0            0   2 CODE TABLE 2064           0         1
+ 002065 ACARS GROUND RECEIVING STATION                                   CCITTIA5                   0            0  40 CHARACTER                 0         5
+ 002066 RADIOSONDE GROUND RECEIVING SYSTEM                               CODE TABLE 2066            0            0   6 CODE TABLE 2066           0         2
+ 002067 RADIOSONDE OPERATING FREQUENCY                                   Hz                        -5            0  15 Hz                       -5         5
+ 002070 ORIGINAL SPECIFICATION OF LATITUDE/LONGITUDE                     CODE TABLE 2070            0            0   4 CODE TABLE 2070           0         2
+ 002071 SPECTROGRAPHIC WAVELENGTH                                        M                         13            0  30 M                        13        10
+ 002080 BALLOON MANUFACTURER                                             CODE TABLE 2080            0            0   6 CODE TABLE 2080           0         2
+ 002081 TYPE OF BALLOON                                                  CODE TABLE 2081            0            0   5 CODE TABLE 2081           0         2
+ 002082 WEIGHT OF BALLOON                                                KG                         3            0  12 KG                        3         4
+ 002083 TYPE OF BALLOON SHELTER                                          CODE TABLE 2083            0            0   4 CODE TABLE 2083           0         2
+ 002084 TYPE OF GAS USED IN BALLOON                                      CODE TABLE 2084            0            0   4 CODE TABLE 2084           0         2
+ 002085 AMOUNT OF GAS USED IN BALLOON                                    KG                         3            0  13 KG                        3         4
+ 002086 BALLOON FLIGHT TRAIN LENGTH                                      M                          1            0  10 M                         1         4
+ 002091 ENTRY SENSOR 4/20 MA                                             A                          4            0  10 A                         4         3
+ 002095 TYPE OF PRESSURE SENSOR                                          CODE TABLE 2095            0            0   5 CODE TABLE 2095           0         2
+ 002096 TYPE OF TEMPERATURE SENSOR                                       CODE TABLE 2096            0            0   5 CODE TABLE 2096           0         2
+ 002097 TYPE OF HUMIDITY SENSOR                                          CODE TABLE 2097            0            0   5 CODE TABLE 2097           0         2
+ 002100 RADAR CONSTANT                                                   dB                         1            0  12 dB                        1         4
+ 002101 TYPE OF ANTENNA                                                  CODE TABLE 2101            0            0   4 CODE TABLE 2101           0         2
+ 002102 ANTENNA HEIGHT ABOVE TOWER BASE                                  M                          0            0   8 M                         0         3
+ 002103 RADOME                                                           FLAG TABLE 2103            0            0   2 FLAG TABLE 2103           0         1
+ 002104 ANTENNA POLARISATION                                             CODE TABLE 2104            0            0   4 CODE TABLE 2104           0         2
+ 002105 MAXIMUM ANTENNA GAIN                                             dB                         0            0   6 dB                        0         2
+ 002106 3-DB BEAMWIDTH                                                   DEGREE                     1            0   6 DEGREE                    1         2
+ 002107 SIDELOBE SUPPRESSION                                             dB                         0            0   6 dB                        0         2
+ 002108 CROSSPOL DISCRIMINATION (ON AXIS)                                dB                         0            0   6 dB                        0         2
+ 002109 ANTENNA SPEED (AZIMUTH)                                          DEGREE/S                   2            0  12 DEGREE/S                  2         4
+ 002110 ANTENNA SPEED (ELEVATION)                                        DEGREE/S                   2            0  12 DEGREE/S                  2         4
+ 002111 RADAR INCIDENCE ANGLE                                            DEGREE                     1            0  10 DEGREE                    1         4
+ 002112 RADAR LOOK ANGLE                                                 DEGREE                     1            0  12 DEGREE                    1         4
+ 002113 NUMBER OF AZIMUTH LOOKS                                          NUMERIC                    0            0   4 NUMERIC                   0         2
+ 002114 ANTENNA EFFECTIVE SURFACE AREA                                   M**2                       0            0  15 M**2                      0         5
+ 002115 TYPE OF SURFACE OBSERVING EQUIPMENT                              CODE TABLE 2115            0            0   5 CODE TABLE 2115           0         2
+ 002116 PERCENTAGE OF 320 MHZ BAND PROCESSED                             %                          0            0   7 %                         0         3
+ 002117 PERCENTAGE OF 80 MHZ BAND PROCESSED                              %                          0            0   7 %                         0         3
+ 002118 PERCENTAGE OF 20 MHZ BAND PROCESSED                              %                          0            0   7 %                         0         3
+ 002119 RA-2 INSTRUMENT OPERATIONS                                       CODE TABLE 2119            0            0   3 CODE TABLE 2119           0         1
+ 002120 OCEAN WAVE FREQUENCY                                             Hz                         3            0  10 Hz                        3         4
+ 002121 MEAN FREQUENCY                                                   Hz                        -8            0   7 Hz                       -8         3
+ 002122 FREQUENCY AGILITY RANGE                                          Hz                        -6         -128   8 Hz                       -6         3
+ 002123 PEAK POWER                                                       W                         -4            0   7 W                        -4         3
+ 002124 AVERAGE POWER                                                    W                         -1            0   7 W                        -1         3
+ 002125 PULSE REPETITION FREQUENCY                                       Hz                        -1            0   8 Hz                       -1         3
+ 002126 PULSE WIDTH                                                      S                          7            0   6 S                         7         2
+ 002127 RECEIVER INTERMEDIATE FREQUENCY                                  Hz                        -6            0   7 Hz                       -6         3
+ 002128 INTERMEDIATE FREQUENCY BANDWIDTH                                 Hz                        -5            0   6 Hz                       -5         2
+ 002129 MINIMUM DETECTABLE SIGNAL                                        dB                         0         -150   5 dB                        0         3
+ 002130 DYNAMIC RANGE                                                    dB                         0            0   7 dB                        0         3
+ 002131 SENSITIVITY TIME CONTROL (STC)                                   FLAG TABLE 2131            0            0   2 FLAG TABLE 2131           0         1
+ 002132 AZIMUTH POINTING ACCURACY                                        DEGREE                     2            0   6 DEGREE                    2         2
+ 002133 ELEVATION POINTING ACCURACY                                      DEGREE                     2            0   6 DEGREE                    2         2
+ 002134 ANTENNA BEAM AZIMUTH                                             DEGREE                     2            0  16 DEGREE                    2         5
+ 002135 ANTENNA ELEVATION                                                DEGREE                     2        -9000  15 DEGREE                    2         5
+ 002136 RANGE PROCESSED BY RANGE ATTENUATION CORRECTION                  M                         -3            0  16 M                        -3         5
+ 002140 SATELLITE RADAR BEAM AZIMUTH ANGLE                               DEGREE                     0            0   9 DEGREE                    0         3
+ 002141 MEASUREMENT TYPE                                                 CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 002142 OZONE INSTRUMENT SERIAL NUMBER/ IDENTIFICATION                   CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 002143 OZONE INSTRUMENT TYPE                                            CODE TABLE 2143            0            0   7 CODE TABLE 2143           0         3
+ 002144 LIGHT SOURCE TYPE FOR BREWER SPECTRO PHOTOMETER                  CODE TABLE 2144            0            0   4 CODE TABLE 2144           0         2
+ 002145 WAVE LENGTH SETTING FOR DOBSON INSTRUMENTS                       CODE TABLE 2145            0            0   4 CODE TABLE 2145           0         2
+ 002146 SOURCE CONDITIONS FOR DOBSON INSTRUMENTS                         CODE TABLE 2146            0            0   4 CODE TABLE 2146           0         2
+ 002148 DATA COLLECTION AND/OR LOCATION SYSTEM                           CODE TABLE 2148            0            0   5 CODE TABLE 2148           0         2
+ 002149 TYPE OF DATA BUOY                                                CODE TABLE 2149            0            0   6 CODE TABLE 2149           0         2
+ 002150 TOVS/ATOVS/AVHRR INSTRUMENTATION CHANNEL NUMBER                  CODE TABLE 2150            0            0   6 CODE TABLE 2150           0         2
+ 002151 RADIOMETER IDENTIFIER                                            CODE TABLE 2151            0            0  11 CODE TABLE 2151           0         4
+ 002152 SATELLITE INSTRUMENT USED IN DATA PROCESSING(6)                  FLAG TABLE 2152            0            0  31 FLAG TABLE 2152           0        10
+ 002153 SATELLITE CHANNEL CENTRE FREQUENCY                               Hz                        -8            0  26 Hz                       -8         8
+ 002154 SATELLITE CHANNEL BAND WIDTH                                     Hz                        -8            0  26 Hz                       -8         8
+ 002156 PERCENTAGE OF VALID KU OCEAN RETRACKER MEASUREMENTS              %                          0            0   7 %                         0         3
+ 002157 PERCENTAGE OF VALID S OCEAN RETRACKER MEASUREMENTS               %                          0            0   7 %                         0         3
+ 002158 RA-2 INSTRUMENT                                                  FLAG TABLE 2158            0            0   9 FLAG TABLE 2158           0         3
+ 002159 MWR INSTRUMENT                                                   FLAG TABLE 2159            0            0   8 FLAG TABLE 2159           0         3
+ 002160 WAVE LENGTH OF THE RADAR                                         CODE TABLE 2160            0            0   4 CODE TABLE 2160           0         2
+ 002163 HEIGHT ASSIGNMENT METHOD                                         CODE TABLE 2163            0            0   4 CODE TABLE 2163           0         2
+ 002164 TRACER CORRELATION METHOD                                        CODE TABLE 2164            0            0   3 CODE TABLE 2164           0         1
+ 002166 RADIANCE TYPE                                                    CODE TABLE 2166            0            0   4 CODE TABLE 2166           0         2
+ 002167 RADIANCE COMPUTATIONAL METHOD                                    CODE TABLE 2167            0            0   4 CODE TABLE 2167           0         2
+ 002168 HYDROSTATIC PRESSURE OF LOWER END OF CABLE (THERMISTOR STRING)   PA                        -3            0  16 KPA                       0         5
+ 002169 ANEMOMETER TYPE                                                  CODE TABLE 2169            0            0   4 CODE TABLE 2169           0         2
+ 002172 PRODUCT TYPE FOR RETRIEVED ATMOSPHERIC GASES                     CODE TABLE 2172            0            0   8 CODE TABLE 2172           0         3
+ 002173 SQUARE OF THE OFF NADIR ANGLE (7)                                DEGREE2                    4            0  10 DEGREE2                   4         4
+ 002174 MEAN ACROSS TRACK PIXEL NUMBER                                   NUMERIC                    0            0   9 NUMERIC                   0         3
+ 002175 METHOD OF PRECIPITATION MEASUREMENT                              CODE TABLE 2175            0            0   4 CODE TABLE 2175           0         2
+ 002176 METHOD OF STATE OF GROUND MEASUREMENT                            CODE TABLE 2176            0            0   4 CODE TABLE 2176           0         2
+ 002177 METHOD OF SNOW DEPTH MEASUREMENT                                 CODE TABLE 2177            0            0   4 CODE TABLE 2177           0         2
+ 002178 METHOD OF LIQUID CONTENT MEASUREMENT OF PRECIPITATION            CODE TABLE 2178            0            0   4 CODE TABLE 2178           0         2
+ 002179 TYPE OF SKY CONDITION ALGORITHM                                  CODE TABLE 2179            0            0   4 CODE TABLE 2179           0         2
+ 002180 MAIN PRESENT WEATHER DETECTING SYSTEM                            CODE TABLE 2180            0            0   4 CODE TABLE 2180           0         2
+ 002181 SUPPLEMENTARY PRESENT WEATHER SENSOR                             FLAG TABLE 2181            0            0  21 FLAG TABLE 2181           0         7
+ 002182 VISIBILITY MEASUREMENT SYSTEM                                    CODE TABLE 2182            0            0   4 CODE TABLE 2182           0         2
+ 002183 CLOUD DETECTION SYSTEM                                           CODE TABLE 2183            0            0   4 CODE TABLE 2183           0         2
+ 002184 TYPE OF LIGHTNING DETECTION SENSOR                               CODE TABLE 2184            0            0   4 CODE TABLE 2184           0         2
+ 002185 METHOD OF EVAPORATION MEASUREMENT                                CODE TABLE 2185            0            0   4 CODE TABLE 2185           0         2
+ 002186 CAPABILITY TO DETECT PRECIPITATION PHENOMENA                     FLAG TABLE 2186            0            0  30 FLAG TABLE 2186           0        10
+ 002187 CAPABILITY TO DETECT OTHER WEATHER PHENOMENA                     FLAG TABLE 2187            0            0  18 FLAG TABLE 2187           0         6
+ 002188 CAPABILITY TO DETECT OBSCURATION                                 FLAG TABLE 2188            0            0  21 FLAG TABLE 2188           0         7
+ 002189 CAPABILITY TO DISCRIMINATE LIGHTNING STRIKES                     FLAG TABLE 2189            0            0  12 FLAG TABLE 2189           0         4
+ 002190 LAGRANGIAN DRIFTER SUBMERGENCE (% TIME SUBMERGED)                %                          0            0   7 %                         0         3
+ 002193 Antenna rotation direction                                       Code-Table                 0            0   2
+ 002194 CONSTANT LEVEL BALLOON TYPE                                      CODE TABLE 2194            0            0   4
+ 002195 TYPE OF SATELLITE INSTRUMENTATION                                CODE TABLE 2195            0            0   4
+ 002196 SATELLITE CLASSIFICATION                                         CODE TABLE 2196            0            0   9
+ 002197 SATELLITE CHANNEL CENTRE FREQUENCY                               Hz                        -8            0  26
+ 002198 SATELLITE CHANNEL BAND WIDTH                                     Hz                        -8            0  26
+ 002199 INTEGRATED MEAN HUMIDITY COMPUTATIONAL METHOD                    CODE TABLE 2199            0            0   4
+ 002200 LATITUDINAL RESOLUTION                                           DEGREE                     5           25
+ 002201 LONGITUDINAL RESOLUTION                                          DEGREE                     5           25
+ 002201 SIMULATED SATELLITE INSTRUMENT                                   FLAG TABLE 2201            0            0   4
+ 002202 SIMULATED DATA PROCESSING TECHNIQUE USED                         FLAG TABLE 2202            0            0   4
+ 002220 DATA PRODUCER                                                    CODE TABLE 2220            0            0   9
+ 002221 SEGMENT SIZE AT NADIR IN X DIRECTION                             M                          0            0  18
+ 002222 SEGMENT SIZE AT NADIR IN Y DIRECTION                             M                          0            0  18
+ 002223 TOVS/ATOVS/AVHRR CHANNEL NUMBER                                  CODE TABLE 2223            0            0   6
+ 002231 HEIGHT ASSIGNMENT METHOD                                         CODE TABLE 2231            0            0   4
+ 002232 TRACER CORRELATION METHOD                                        CODE TABLE 2232            0            0   3
+ 002240 TYPE OF TERMODYNAMIC SENSING                                     CODE TABLE 2240            0            0   8
+ 002241 TYPE OF ROCKET MOTOR                                             CODE TABLE 2241            0            0   3
+ 002242 TYPE OF WIND SENSING EQUIPMENT                                   CODE TABLE 2242            0            0   8
+ 002243 TERMODYNAMIC CORRECTION TECHNIQUE                                CODE TABLE 2243            0            0   3
+ 002244 WIND CORRECTION TECHNIQUE                                        CODE TABLE 2244            0            0   3
+ 002245 METHOD OF REDUCING OF DATA                                       CODE TABLE 2245            0            0   4
+ 002251 RADIANCE COMPUTATIONAL METHOD                                    CODE TABLE 2251            0            0   4
+ 002252 SATELLITE INSTRUMENT DATA USED IN PROCESSING                     FLAG TABLE 2252            0            0  31
+ 002253 HUMIDITY COMPUTATIONAL METHOD                                    CODE TABLE 2253            0            0   8
+ 002254 RADIANCE TYPE                                                    CODE TABLE 2254            0            0   4
+ 004001 YEAR                                                             YEAR                       0            0  12 YEAR                      0         4
+ 004002 MONTH                                                            MONTH                      0            0   4 MONTH                     0         2
+ 004003 DAY                                                              DAY                        0            0   6 DAY                       0         2
+ 004004 HOUR                                                             HOUR                       0            0   5 HOUR                      0         2
+ 004005 MINUTE                                                           MINUTE                     0            0   6 MINUTE                    0         2
+ 004006 SECOND                                                           SECOND                     0            0   6 SECOND                    0         2
+ 004007 SECONDS WITHIN A MINUTE (MICROSECOND ACCURACY)                   SECOND                     6            0  26 S                         6         8
+ 004011 TIME INCREMENT                                                   YEAR                       0        -1024  11 YEAR                      0         4
+ 004012 TIME INCREMENT                                                   MONTH                      0        -1024  11 MONTH                     0         4
+ 004013 TIME INCREMENT                                                   DAY                        0        -1024  11 DAY                       0         4
+ 004014 TIME INCREMENT                                                   HOUR                       0        -1024  11 HOUR                      0         4
+ 004015 TIME INCREMENT                                                   MINUTE                     0        -2048  12 MINUTE                    0         4
+ 004016 TIME INCREMENT                                                   SECOND                     0        -4096  13 SECOND                    0         4
+ 004017 REFERENCE TIME PERIOD FOR ACCUMULATED OR EXTREME DATA            MINUTE                     0        -1440  12 MINUTE                    0         4
+ 004021 TIME PERIOD OR DISPLACEMENT                                      YEAR                       0        -1024  11 YEAR                      0         4
+ 004022 TIME PERIOD OR DISPLACEMENT                                      MONTH                      0        -1024  11 MONTH                     0         4
+ 004023 TIME PERIOD OR DISPLACEMENT                                      DAY                        0        -1024  11 DAY                       0         4
+ 004024 TIME PERIOD OR DISPLACEMENT                                      HOUR                       0        -2048  12 HOUR                      0         4
+ 004025 TIME PERIOD OR DISPLACEMENT                                      MINUTE                     0        -2048  12 MINUTE                    0         4
+ 004026 TIME PERIOD OR DISPLACEMENT                                      SECOND                     0        -4096  13 SECOND                    0         4
+ 004031 DURATION OF TIME RELATING TO FOLLOWING VALUE                     HOUR                       0            0   8 HOUR                      0         3
+ 004032 DURATION OF TIME RELATING TO FOLLOWING VALUE                     MINUTE                     0            0   6 MINUTE                    0         2
+ 004041 TIME DIFFERENCE, UTC -LMT (SEE NOTE 6)                           MINUTE                     0        -1440  12 MINUTE                    0         4
+ 004043 DAY OF THE YEAR                                                  DAY                        0            0   9 DAY                       0         3
+ 004051 PRINCIPAL TIME OF DAILY READING OF MAXIMUM TEMPERATURE           HOUR                       0            0   5 HOUR                      0         2
+ 004052 PRINCIPAL TIME OF DAILY READING OF MINIMUM TEMPERATURE           HOUR                       0            0   5 HOUR                      0         2
+ 004053 NUMBER OF DAYS WITH PRECIPITATION EQUAL TO OR MORE THAN 1 MM     NUMERIC                    0            0   6 NUMERIC                   0         2
+ 004059 TIMES OF OBSERVATION USED TO COMPUTE THE REPORTED MEAN VALUES    FLAG TABLE 4059            0            0   6 FLAG TABLE 4059           0         2
+ 004065 SHORT TIME INCREMENT                                             MINUTE                     0         -128   8 MINUTE                    0         2
+ 004073 SHORT TIME PERIOD OR DISPLACEMENT                                DAY                        0         -128   8 DAY                       0         2
+ 004074 SHORT TIME PERIOD OR DISPLACEMENT                                HOUR                       0         -128   8 HOUR                      0         2
+ 004075 SHORT TIME PERIOD OR DISPLACEMENT                                MINUTE                     0         -128   8 MINUTE                    0         2
+ 004080 AVERAGING PERIOD FOR FOLLOWING VALUE                             CODE TABLE 4080            0            0   4 CODE TABLE 4080           0         2
+ 004086 LONG TIME PERIOD OR DISPLACEMENT                                 SECOND                     0        -8192  15 SECOND                    0         5
+ 005001 LATITUDE (HIGH ACCURACY)                                         DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 005002 LATITUDE (COARSE ACCURACY)                                       DEGREE                     2        -9000  15 DEGREE                    2         4
+ 005011 LATITUDE INCREMENT (HIGH ACCURACY)                               DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 005012 LATITUDE INCREMENT (COARSE ACCURACY)                             DEGREE                     2        -9000  15 DEGREE                    2         4
+ 005015 LATITUDE DISPLACEMENT (HIGH ACCURACY)                            DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 005016 LATITUDE DISPLACEMENT (COARSE ACCURACY)                          DEGREE                     2        -9000  15 DEGREE                    2         4
+ 005021 BEARING OR AZIMUTH                                               DEGREE TRUE                2            0  16 DEGREE TRUE               2         5
+ 005022 SOLAR AZIMUTH                                                    DEGREE TRUE                2            0  16 DEGREE TRUE               2         5
+ 005023 SUN TO SATELLITE AZIMUTH DIFFERENCE                              DEGREE                     1        -1800  12 DEGREE                    1         4
+ 005030 DIRECTION (SPECTRAL)                                             DEGREE                     0            0  12 DEGREE                    0         4
+ 005031 ROW NUMBER                                                       NUMERIC                    0            0  12 NUMERIC                   0         4
+ 005033 PIXEL SIZE ON HORIZONTAL - 1                                     M                         -1            0  16 M                        -1         5
+ 005034 ALONG TRACK ROW NUMBER                                           NUMERIC                    0            0  11 NUMERIC                   0         4
+ 005036 SHIP TRANSECT NUMBER ACCORDING TO SOOP                           NUMERIC                    0            0   7 NUMERIC                   0         2
+ 005040 ORBIT NUMBER                                                     NUMERIC                    0            0  24 NUMERIC                   0         8
+ 005041 SCAN LINE NUMBER                                                 NUMERIC                    0            0   8 NUMERIC                   0         3
+ 005042 CHANNEL NUMBER                                                   NUMERIC                    0            0   6 NUMERIC                   0         2^M
+ 005043 FIELD OF VIEW NUMBER                                             NUMERIC                    0            0   8 NUMERIC                   0         3
+ 005044 SATELLITE CYCLE NUMBER                                           NUMERIC                    0            0  11 NUMERIC                   0         4
+ 005052 CHANNEL NUMBER INCREMENT                                         NUMERIC                    0            0   5 NUMERIC                   0         2
+ 005053 FIELD OF VIEW NUMBER INCREMENT                                   NUMERIC                    0            0   5 NUMERIC                   0         2
+ 005060 Y ANGULAR POSITION FROM CENTRE OF GRAVITY                        DEGREE                     6     -8000000  24 DEGREE                    6         8
+ 005061 Z ANGULAR POSITION FROM CENTRE OF GRAVITY                        DEGREE                     6     -8000000  24 DEGREE                    6         8
+ 005193 ALONG TRACK ROW NUMBER AT 50 KM                                  NUMERIC                    0            0  10 NUMERIC                   0         4
+ 005194 ALONG TRACK ROW NUMBER AT 25 KM                                  NUMERIC                    0            0  11 NUMERIC                   0         4
+ 005195 ENSEMBLE MEMBER NUMBER                                           NUMERIC                    0            0   7 NUMERIC                   0         3
+ 005217 LOCATION OF PLATFORM, X                                          M                          2  -1073741824  31 M                         2        10
+ 005232 DIRECTION (SPECTRAL)                                             DEGREE                     2            0  16 DEGREE                    2         5
+ 006001 LONGITUDE (HIGH ACCURACY)                                        DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 006002 LONGITUDE (COARSE ACCURACY)                                      DEGREE                     2       -18000  16 DEGREE                    2         5
+ 006011 LONGITUDE INCREMENT (HIGH ACCURACY)                              DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 006012 LONGITUDE INCREMENT (COARSE ACCURACY)                            DEGREE                     2       -18000  16 DEGREE                    2         5
+ 006015 LONGITUDE DISPLACEMENT (HIGH ACCURACY)                           DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 006016 LONGITUDE DISPLACEMENT (COARSE ACCURACY)                         DEGREE                     2       -18000  16 DEGREE                    2         5
+ 006021 DISTANCE                                                         M                         -1            0  13 M                        -1         4
+ 006030 WAVE NUMBER (SPECTRAL)                                           RAD/M                      5            0  13 RAD/M                     5         4
+ 006031 COLUMN NUMBER                                                    NUMERIC                    0            0  12 NUMERIC                   0         4
+ 006033 PIXEL SIZE ON HORIZONTAL - 2                                     M                         -1            0  16 M                        -1         5
+ 006034 CROSS-TRACK CELL NUMBER                                          NUMERIC                    0            0   7 NUMERIC                   0         3
+ 006040 RADIUS OF CONFIDENCE                                             M                          0            0  13 M                         0         4
+ 006193 CROSS TRACK CELL NUMBER AT 50 KM                                 NUMERIC                    0            0   6 NUMERIC                   0         2
+ 006194 CROSS TRACK CELL NUMBER AT 25 KM                                 NUMERIC                    0            0   7 NUMERIC                   0         3
+ 006217 LOCATION OF PLATFORM, Y                                          M                          2  -1073741824  31 M                         2        10
+ 006232 WAVENUMBER (SPECTRAL)                                            RADS/M                     5            0  13 ADS/M                     5         4
+ 007001 HEIGHT OF STATION (SEE NOTE 1)                                   M                          0         -400  15 M                         0         5
+ 007002 HEIGHT OR ALTITUDE                                               M                         -1          -40  16 M                        -1         5
+ 007003 GEOPOTENTIAL                                                     M**2/S**2                 -1         -400  17 M**2/S**2                -1         6
+ 007004 PRESSURE                                                         PA                        -1            0  14 PA                       -1         5
+ 007005 HEIGHT INCREMENT                                                 M                          0         -400  12 M                         0         4
+ 007006 HEIGHT ABOVE STATION                                             M                          0            0  15 M                         0         5
+ 007007 HEIGHT                                                           M                          0        -1000  17 M                         0         6
+ 007008 GEOPOTENTIAL                                                     M**2/S**2                  0       -10000  20 M**2/S**2                 0         7
+ 007009 GEOPOTENTIAL HEIGHT                                              GPM                        0        -1000  17 GPM                       0         5
+ 007010 FLIGHT LEVEL                                                     M                          0        -1024  16 FT                       -1         5
+ 007021 ELEVATION (SEE NOTE 2)                                           DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007022 SOLAR ELEVATION                                                  DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007024 SATELLITE ZENITH ANGLE                                           DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007025 SOLAR ZENITH ANGLE                                               DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007026 SATELLITE ZENITH ANGLE                                           DEGREE                     4      -900000  21 DEGREE                    4         7
+ 007030 HEIGHT OF STATION GROUND ABOVE MEAN SEA LEVEL (SEE NOTE 3)       M                          1       - 4000  17 M                         1         5
+ 007031 HEIGHT OF BAROMETER ABOVE MEAN SEA LEVEL (SEE NOTE 4)            M                          1       - 4000  17 M                         1         5
+ 007032 HEIGHT OF SENSOR ABOVE LOCAL GROUND (OR DECK OF MARINE PLATFORM) M                          2            0  16 M                         2         5
+ 007033 HEIGHT OF SENSOR ABOVE WATER SURFACE (SEE NOTE 6)                M                          1            0  12 M                         1         4
+ 007040 IMPACT PARAMETER (SEE NOTE 8)                                    M                          1     62000000  22 M                         1         8
+ 007061 DEPTH BELOW LAND SURFACE                                         M                          2            0  14 M                         2         5
+ 007062 DEPTH BELOW SEA/WATER SURFACE                                    M                          1            0  17 M                         1         6
+ 007063 DEPTH BELOW SEA/WATER SURFACE                                    M                          2            0  20 M                         2         7
+ 007064 REPRESENTATIVE HEIGHT OF SENSOR ABOVE STATION (SEE NOTE 7)       M                          0            0   4 M                         0         2
+ 007065 WATER PRESSURE                                                   PA                        -3            0  17 PA                        0         6
+ 007070 DROGUE DEPTH                                                     M                          0            0  10 M                         0         4
+ 007192 Pixel size in Z-direction                                        Meters                    -1            0  16
+ 007217 LOCATION OF PLATFORM, Z                                          M                          2  -1073741824  31 M                         2        10
+ 008001 VERTICAL SOUNDING SIGNIFICANCE                                   FLAG TABLE 8001            0            0   7 FLAG TABLE 8001           0         3
+ 008002 VERTICAL SIGNIFICANCE (SURFACE OBSERVATIONS)                     CODE TABLE 8002            0            0   6 CODE TABLE 8002           0         2
+ 008003 VERTICAL SIGNIFICANCE (SATELLITE OBSERVATIONS)                   CODE TABLE 8003            0            0   6 CODE TABLE 8003           0         2
+ 008004 PHASE OF AIRCRAFT FLIGHT                                         CODE TABLE 8004            0            0   3 CODE TABLE 8004           0         1
+ 008005 METEOROLOGICAL ATTRIBUTE SIGNIFICANCE                            CODE TABLE 8005            0            0   4 CODE TABLE 8005           0         2
+ 008006 OZONE VERTICAL SOUNDING SIGNIFICANCE                             FLAG TABLE 8006            0            0   9 FLAG TABLE 8006           0         3
+ 008007 DIMENSIONAL SIGNIFICANCE                                         CODE TABLE 8007            0            0   4 CODE TABLE 8007           0         2
+ 008008 RADIATION VERTICAL SOUNDING SIGNIFICANCE                         FLAG TABLE 8008            0            0   9 FLAG TABLE 8008           0         3
+ 008009 DETAILED PHASE OF FLIGHT                                         CODE TABLE 8009            0            0   4 CODE TABLE 8009           0         2
+ 008010 SURFACE QUALIFIER (TEMPERATURE DATA)                             CODE TABLE 8010            0            0   5 CODE TABLE 8010           0         2
+ 008011 METEOROLOGICAL FEATURE                                           CODE TABLE 8011            0            0   6 CODE TABLE 8011           0         2
+ 008012 LAND/SEA QUALIFIER                                               CODE TABLE 8012            0            0   2 CODE TABLE 8012           0         1
+ 008013 DAY/NIGHT QUALIFIER                                              CODE TABLE 8013            0            0   2 CODE TABLE 8013           0         1
+ 008014 QUALIFIER FOR RUNWAY VISUAL RANGE                                CODE TABLE 8014            0            0   4 CODE TABLE 8014           0         2
+ 008016 CHANGE QUALIFIER OF A TREND-TYPE FORECAST OR AN AERODROME FORECA CODE TABLE 8016            0            0   3 CODE TABLE 8016           0         1
+ 008017 QUALIFIER OF THE TIME WHEN THE FORECAST CHANGE IS EXPECTED       CODE TABLE 8017            0            0   2 CODE TABLE 8017           0         1
+ 008018 SEAWINDS LAND/ICE SURFACE TYPE                                   FLAG TABLE 8018            0            0  17 FLAG TABLE 8018           0         6
+ 008020 TOTAL NUMBER OF MISSING ENTITIES (WITH RESPECT TO ACCUMULATION O NUMERIC                    0            0  16 NUMERIC                   0         5
+ 008021 TIME SIGNIFICANCE                                                CODE TABLE 8021            0            0   5 CODE TABLE 8021           0         2
+ 008022 TOTAL NUMBER (WITH RESPECT TO ACCUMULATION OR AVERAGE)           NUMERIC                    0            0  16 NUMERIC                   0         5
+ 008023 FIRST ORDER STATISTICS                                           CODE TABLE 8023            0            0   6 CODE TABLE 8023           0         2
+ 008024 DIFFERENCE STATISTICS                                            CODE TABLE 8024            0            0   6 CODE TABLE 8024           0         2
+ 008025 TIME DIFFERENCE QUALIFIER                                        CODE TABLE 8025            0            0   4 CODE TABLE 8025           0         2
+ 008026 MATRIX SIGNIFICANCE                                              CODE TABLE 8026            0            0   6 CODE TABLE 8026           0         2
+ 008029 REMOTLY SENSED SURFACE TYPE                                      CODE TABLE 8029            0            0   8 CODE TABLE 8029           0         3
+ 008030 MANUAL ON CODES (VOLUME I.1, SECTION C) CODE TABLE FROM WHICH DA NUMERIC                    0            0  13 NUMERIC                   0         4
+ 008031 DATA CATEGORY CREX TABLE A                                       NUMERIC                    0            0   8 NUMERIC                   0         3
+ 008033 METHOD OF DERIVATION OF PERCENTAGE CONFIDENCE                    CODE TABLE 8033            0            0   7 CODE TABLE 8033           0         3
+ 008035 TYPE OF MONITORING EXERCISE                                      CODE TABLE 8035            0            0   3 CODE TABLE 8035           0         1
+ 008036 TYPE OF CENTRE OR STATION PERFORMING MONITORING                  CODE TABLE 8036            0            0   3 CODE TABLE 8036           0         1
+ 008039 TIME SIGNIFICANCE ( AVIATION FORECAST)                           CODE TABLE 8039            0            0   6 CODE TABLE 8039           0         2
+ 008040 FLIGHT LEVEL SIGNIFICANCE                                        CODE TABLE 8040            0            0   6 CODE TABLE 8040           0         2
+ 008041 DATA SIGNIFICANCE                                                CODE TABLE 8041            0            0   5 CODE TABLE 8041           0         2
+ 008042 EXTENDED VERTICAL SOUNDING SIGNIFICANCE                          FLAG TABLE 8042            0            0  18 FLAG TABLE 8042           0         6
+ 008043 ATMOSPHERIC CHEMICAL OR PHISICAL CONSTITUENT TYPE                CODE TABLE 8043            0            0   8 CODE TABLE 8043           0         3
+ 008044 CAS REGISTRY NUMBER                                              CCITTIA5                   0            0  88 CHARACTERS                0        11
+ 008045 PARTICULATE MATTER CHARACTERIZATION                              CODE TABLE 8045            0            0   8 CODE TABLE 8045           0         3
+ 008049 NUMBER OF OBSERVATIONS                                           NUMERIC                    0            0   8 NUMERIC                   0         3
+ 008050 QUALIFIER FOR NUMBER OF MISSING VALUES IN CALCULATION OF STATIST CODE TABLE 8050            0            0   4 CODE TABLE 8050           0         2
+ 008051 QUALIFIER FOR NUMBER OF MISSING VALUES IN CALCULATION OF STATIST CODE TABLE 8051            0            0   3 CODE TABLE 8051           0         1
+ 008052 CONDITION FOR WHICH NUMBER OF DAYS OF OCCURRENCE FOLLOWS         CODE TABLE 8052            0            0   5 CODE TABLE 8052           0         2
+ 008053 DAY OF OCCURRENCE QUALIFIER                                      CODE TABLE 8053            0            0   2 CODE TABLE 8053           0         1
+ 008054 QUALIFIER FOR WIND SPEED OR WIND GUST                            CODE TABLE 8054            0            0   3 CODE TABLE 8054           0         1
+ 008060 SAMPLE SCANNING MODE SIGNIFICANCE                                CODE TABLE 8060            0            0   4 CODE TABLE 8060           0         2
+ 008065 SUN-GLINT INDICATOR                                              CODE TABLE 8065            0            0   2 CODE TABLE 8065           0         1
+ 008066 SEMI-TRANSPARENCY INDICATOR                                      CODE TABLE 8066            0            0   2 CODE TABLE 8066           0         1
+ 008070 TOVS/ATOVS PRODUCT QUALIFIER                                     CODE TABLE 8070            0            0   4 CODE TABLE 8070           0         2
+ 008072 PIXEL(S) TYPE                                                    CODE TABLE 8072            0            0   3 CODE TABLE 8072           0         1
+ 008074 ALTIMETER ECHO TYPE                                              CODE TABLE 8074            0            0   2 CODE TABLE 8074           0         1
+ 008075 ASCENDING/DESCENDING ORBIT QUALIFIER                             CODE TABLE 8075            0            0   2 CODE TABLE 8075           0         1
+ 008076 TYPE OF BAND                                                     CODE TABLE 8076            0            0   6 CODE TABLE 8076           0         2
+ 008079 AVIATION PRODUCT STATUS                                          CODE TABLE 8079            0            0   4 CODE TABLE 8079           0         2
+ 008081 TYPE OF EQUIPMENT                                                CODE TABLE 8081            0            0   6 CODE TABLE 8081           0         2
+ 008082 (CBS) ARTIFICIAL CORRECTION OF SENSOR HEIGHT TO ANOTHER VALUE    CODE TABLE 8082            0            0   3 CODE TABLE 8082           0         1
+ 008083 NOMINAL VALUE INDICATOR                                          FLAG TABLE 8083            0            0  15 FLAG TABLE 8083           0         5
+ 008085 BEAM IDENTIFIER                                                  CODE TABLE 8085            0            0   3 CODE TABLE 8085           0         1
+ 008090 DECIMAL SCALE                                                    NUMERIC                    0         -127   8 NUMERIC                   0         3
+ 008193 TIME QUALIFIER                                                   CODE TABLE 8193            0            0   6 CODE TABLE 8193           0         2
+ 008194 TOVS/ATOVS PRODUCT QUALIFIER                                     CODE TABLE 8194            0            0   4 CODE TABLE 8194           0         2
+ 008195 DATA TYPE                                                        CODE TABLE 8195            0            0   7 CODE TABLE 8195           0         3
+ 008200 NUMBER OF OBSERVATIONS                                           NUMERIC                    0            0   8 NUMERIC                   0         3
+ 008222 GENERATOR SIGNIFICANCE                                           CODE TABLE 8222            0            0   4 CODE TABLE 8222           0         2
+ 008223 LAND/ICE SURFACE FLAG                                            FLAG TABLE 8223            0            0   7 FLAG TABLE 8223           0         3
+ 008224 LAND/SEA FRACTION                                                NUMERIC                    3            0  10 NUMERIC                   3         4
+ 008225 GHRSST SURFACE TYPE                                              FLAG TABLE 8225            0            0   5 FLAG TABLE 8225           0         2
+ 010001 HEIGHT OF LAND SURFACE                                           M                          0         -400  15 M                         0         5
+ 010002 HEIGHT                                                           M                         -1          -40  16 M                        -1         5
+ 010003 GEOPOTENTIAL                                                     M**2/S**2                 -1         -400  17 M**2/S**2                -1         6
+ 010004 PRESSURE                                                         PA                        -1            0  14 PA                       -1         5
+ 010007 HEIGHT                                                           M                          0        -1000  17 M                         0         6
+ 010008 GEOPOTENTIAL                                                     M**2/S**2                  0       -10000  20 M**2/S**2                 0         7
+ 010009 GEOPOTENTIAL HEIGHT                                              GPM                        0        -1000  17 GPM                       0         5
+ 010010 MINIMUM PRESSURE REDUCED TO MEAN SEA LEVEL                       PA                        -1            0  14 PA                       -1         5
+ 010011 MAXIMUM PRESSURE REDUCED TO MEAN SEA LEVEL                       PA                        -1            0  14 PA                       -1         5
+ 010031 IN DIRECTION OF THE NORTH POLE, DISTANCE FROM THE EARTH'S CENTRE M                          2  -1073741824  31 M                         2        10
+ 010032 SATELLITE DISTANCE TO EARTH'S CENTRE                             M                          1            0  27 M                         2         9
+ 010033 ALTITUDE (PLATFORM TO ELLIPSOID)                                 M                          1            0  27 M                         2         9
+ 010034 EARTH RADIUS                                                     M                          1            0  27 M                         2         9
+ 010035 EARTH'S LOCAL RADIUS OF CURVATURE                                M                          1     62000000  22 M                         1         8
+ 010036 GEOID UNDULATION (SEE NOTE 4)                                    M                          2       -15000  15 M                         2         6
+ 010040 NUMBER OF RETRIEVED LAYERS                                       NUMERIC                    0            0  10 NUMERIC                   0         4
+ 010050 STANDARD DEVIATION ALTITUDE                                      M                          2            0  16 M                         2         5
+ 010051 PRESSURE REDUCED TO MEAN SEA LEVEL                               PA                        -1            0  14 PA                       -1         5
+ 010052 ALTIMETER SETTING (QNH)                                          PA                        -1            0  14 PA                       -1         5
+ 010060 PRESSURE CHANGE                                                  PA                        -1        -1024  11 PA                       -1         4
+ 010061 3-HOUR PRESSURE CHANGE                                           PA                        -1         -500  10 PA                       -1         4
+ 010062 24-HOUR PRESSURE CHANGE                                          PA                        -1        -1000  11 PA                       -1         4
+ 010063 CHARACTERISTIC OF PRESSURE TENDENCY                              CODE TABLE 10063           0            0   4 CODE TABLE 10063          0         2
+ 010070 INDICATED AIRCRAFT ALTITUDE                                      M                          0         -400  16 M                         0         5
+ 010080 VIEWING ZENITH ANGLE                                             DEGREE                     2        -9000  15 DEGREE                    2         5
+ 010081 ALTITUDE OF COG ABOVE REFERENCE ELLIPSOID                        M                          3            0  31 M                         3        10
+ 010082 INSTANTANEOUS ALTITUDE RATE                                      MS-1                       3       -65536  17 MS-1                      3         6
+ 010083 SQUARED OFF NADIR ANGLE OF THE SATELLITE FROM PLATFORM DATA      DEGREE2                    2            0  16 DEGREE2                   2         5
+ 010084 SQUARED OFF NADIR ANGLE OF THE SATELLITE FROM WAVEFORM DATA      DEGREE2                    2            0  16 DEGREE2                   2         5
+ 010085 MEAN SEA SURFACE HEIGHT                                          M                          3      -131072  18 M                         3         6
+ 010086 GEOID'S HEIGHT                                                   M                          3      -131072  18 M                         3         6
+ 010087 OCEAN DEPTH/LAND ELEVATION                                       M                          1      -131072  18 M                         3         6
+ 010088 TOTAL GEOCENTRIC OCEAN TIDE HEIGHT SOLUTION 1                    M                          3       -32768  16 M                         3         5
+ 010089 TOTAL GEOCENTRIC OCEAN TIDE HEIGHT SOLUTION 2                    M                          3       -32768  16 M                         3         5
+ 010090 LONG PERIOD  TIDE HEIGHT                                         M                          3       -32768  16 M                         3         5
+ 010091 TIDAL LOADING HEIGHT                                             M                          3       -32768  16 M                         3         5
+ 010092 SOLID EARTH TIDE HEIGHT                                          M                          3       -32768  16 M                         3         5
+ 010093 GEOCENTRIC POLE TIDE HEIGHT                                      M                          3       -32768  16 M                         3         5
+ 010095 HEIGHT OF ATMOSPHERE USED                                        M                          0            0  16 M                         0         5
+ 010195 HEIGHT(HIGH ACCURACY)                                            M                          1        -4096  20
+ 010196 SOLAR ZENITH ANGLE                                               DEGREE                     2        -9000  15
+ 010197 ANEMOMETER HEIGHT                                                M                          0            0   9
+ 011001 WIND DIRECTION                                                   DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011002 WIND SPEED                                                       M/S                        1            0  12 M/S                       1         4
+ 011003 U-COMPONENT                                                      M/S                        1        -4096  13 M/S                       1         4
+ 011004 V-COMPONENT                                                      M/S                        1        -4096  13 M/S                       1         4
+ 011005 W-COMPONENT                                                      PA/S                       1         -512  10 PA/S                      1         4
+ 011006 W-COMPONENT                                                      M/S                        2        -4096  13 M/S                       2         4
+ 011010 WIND DIRECTION ASSOCIATED WITH WIND SPEED WHICH FOLLOWS          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011011 WIND DIRECTION AT 10 M                                           DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011012 WIND SPEED AT 10 M                                               M/S                        1            0  12 M/S                       1         4
+ 011013 WIND DIRECTION AT 5 M                                            DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011014 WIND SPEED AT 5 M                                                M/S                        1            0  12 M/S                       1         4
+ 011016 EXTREME COUNTERCLOCKWISE WIND DIRECTION OF A VARIABLE WIND       DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011017 EXTREME CLOCKWISE WIND DIRECTION OF A VARIABLE WIND              DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011019 STEADINESS OF WIND (6)                                           %                          0            0   7 %                         0         3
+ 011021 RELATIVE VORTICITY                                               1/S                        9       -65536  17 1/S                       9         6
+ 011022 DIVERGENCE                                                       1/S                        9       -65536  17 1/S                       9         6
+ 011023 VELOCITY POTENTIAL                                               M**2/S                    -2       -65536  17 M**2/S                   -2         6
+ 011030 EXTENDED DEGREE OF TURBULENCE                                    CODE TABLE 11030           0            0   6 CODE TABLE                0         2
+ 011031 DEGREE OF TURBULENCE                                             CODE TABLE 11031           0            0   4 CODE TABLE 11031          0         2
+ 011032 HEIGHT OF BASE OF TURBULENCE                                     M                         -1          -40  16 M                        -1         5
+ 011033 HEIGHT OF TOP OF TURBULENCE                                      M                         -1          -40  16 M                        -1         5
+ 011034 VERTICAL GUST VELOCITY                                           M/S                        1        -1024  11 M/S                       1         4
+ 011035 VERTICAL GUST ACCELERATION                                       M/S**2                     2        -8192  14 M/S**2                    2         5
+ 011036 MAXIMUM DERIVED EQUIVALENT VERTICAL GUST SPEED                   M/S                        1            0  10 M/S                       1         4
+ 011037 TURBULENCE INDEX                                                 CODE TABLE 11037           0            0   6 CODE TABLE 11037          0         2
+ 011038 TIME OF OCCURRENCE OF PEAK EDDY DISSIPATION RATE                 CODE TABLE 11038           0            0   5 CODE TABLE 11038          0         2
+ 011039 EXTENDED TIME OF OCCURRENCE OF PEAK  EDDY DISSIPATION RATE       CODE TABLE 11039           0            0   6 CODE TABLE 11039          0         2
+ 011040 MAXIMUM WIND SPEED (MEAN WIND)                                   M/S                        1            0  12 M/S                       1         4
+ 011041 MAXIMUM WIND GUST SPEED                                          M/S                        1            0  12 M/S                       1         4
+ 011042 MAXIMUM WIND SPEED (10-MIN MEAN WIND)                            M/S                        1            0  12 M/S                       1         4
+ 011043 MAXIMUM WIND GUST DIRECTION                                      DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011044 MEAN WIND DIRECTION FOR SURFACE - 1500 M (5000 FEET)             DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011045 MEAN WIND SPEED FOR SURFACE - 1500 M (5000 FEET)                 M/S                        1            0  12 M/S                       1         4
+ 011046 MAXIMUM INSTANTANEOUS WIND SPEED                                 M/S                        1            0  12 M/S                       1         4
+ 011047 MAXIMUM INSTANTANEOUS WIND SPEED OVER 10 MINUTES                 M/S                        1            0  12 M/S                       1         4
+ 011049 STANDARD DEVIATION OF WIND DIRECTION                             DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011050 STANDARD DEVIATION OF HORIZONTAL WIND SPEED                      M/S                        1            0  12 M/S                       1         4
+ 011051 STANDARD DEVIATION OF VERTICAL WIND SPEED                        M/S                        1            0   8 M/S                       1         3
+ 011052 FORMAL UNCERTAINTY IN WIND SPEED                                 M/S                        2            0  13 M/S                       2         5
+ 011053 FORMAL UNCERTAINTY IN WIND DIRECTION                             DEGREE TRUE                2            0  15 DEGREE TRUE               2         5
+ 011054 MEAN WIND DIRECTION FOR 1500 M - 3000 M                          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011055 MEAN WIND SPEED FOR 1500 M - 3000 M                              M/S                        1            0  12 M/S                       1         4
+ 011061 ABSOLUTE WIND SHEAR IN 1 KM LAYER BELOW                          M/S                        1            0  12 M/S                       1         4
+ 011062 ABSOLUTE WIND SHEAR IN 1 KM LAYER ABOVE                          M/S                        1            0  12 M/S                       1         4
+ 011070 DESIGNATOR OF THE RUNWAY AFFECTED BY WIND SHEAR (INCLUDING ALL)  CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 011071 TURBULENT VERTICAL MOMENTUM FLUX                                 M**2/S**2                  3         -128  14 M**2/S**2                 3         5
+ 011072 TURBULENT VERTICAL BUOYANCY FLUX                                 KM/S                       3         -128  11 KM/S                      3         4
+ 011073 TURBULENT KINETIC ENERGY                                         M**2/S**2                  2        -1024  13 M**2/S**2                 2         4
+ 011074 DISSIPATION ENERGY                                               M**2/S**2                  2        -1024  10 M**2/S**2                 2         4
+ 011075 MEAN TURBULENCE INTENSITY (EDDY DISSIPATION RATE)                M**(2/3)/S                 2            0   8 M**(2/3)/S                2         3
+ 011076 PEAK TURBULENCE INTENSITY (EDDY DISSIPATION RATE)                M**(2/3)/S                 2            0   8 M**(2/3)/S                2         3
+ 011077 REPORTING INTERVAL OR AVERAGING TIME FOR EDDY DISSIPATION RATE   S                          0            0  12 S                         0         4
+ 011081 MODEL WIND DIRECTION AT 10M                                      DEGREE TRUE                2            0  16 DEGREE TRUE               2         5
+ 011082 MODEL WIND SPEED AT 10M                                          M/S                        2            0  14 M/S                       2         4
+ 011083 WIND SPEED                                                       KM/HOUR                    0            0   9 KM/HOUR                   0         3
+ 011084 WIND SPEED                                                       KNOT                       0            0   8 KNOT                      0         3
+ 011085 MAXIMUM WIND GUST SPEED                                          KM/HOUR                    0            0   9 KM/HOUR                   0         3
+ 011086 MAXIMUM WIND GUST SPEED                                          KNOT                       0            0   8 KNOT                      0         3
+ 011095 U COMPONENT OF THE MODEL WIND VECTOR                             M/S                        1        -4096  13 M/S                       1         4
+ 011096 V COMPONENT OF THE MODEL WIND VECTOR                             M/S                        1        -4096  13 M/S                       1         4
+ 011192 U - COMPONENT AT 10 M                                            M/S                        1        -4096  13 M/S                       1         4^M
+ 011193 V - COMPONENT AT 10 M                                            M/S                        1        -4096  13 M/S                       1         4^M
+ 011194 W - COMPONENT AT 10 M                                            M/S                        1        -4096  13 M/S                       1         4^M
+ 011195 STEADINESS OF WIND                                               %                          0            0   7 %                         0         3
+ 011196 FRICTION VELOCITY                                                M/S                        5            0  19
+ 011201 HORIZONTAL LINE OF SIGHT COMPONENT                               M/S                        1        -4096  13
+ 011210 1D VAR WIND SPEED RETREIVED ERRO(S)                              M/S                        2            0  12
+ 011211 WIND SPEED INDEPENDENT ESTIMATE OF ERROR(S)                      M/S                        2            0  12
+ 011220 FORMAL UNCERTAINTY IN WIND SPEED                                 M/S                        2            0  12
+ 011221 FORMAL UNCERTAINTY IN WIND DIRECTION                             DEGREE TRUE                2            0  15
+ 011230 MAXIMUM MEAN WIND SPEED                                          M/S                        1        -4096  13 M/S                       1         4^M
+ 011231 MEAN WIND SPEED                                                  M/S                        1        -4096  13 M/S                       1         4^M
+ 011232 MINIMUM MEAN WIND SPEED                                          M/S                        1        -4096  13 M/S                       1         4^M
+ 011233 HIGHEST GUST DURING THE 10 MINUTE PERIOD PRECEDING OBSERVATION   M/S                        1        -4096  13 M/S                       1         4^M
+ 012001 TEMPERATURE/DRY-BULB TEMPERATURE                                 K                          1            0  12 C                         1         3
+ 012002 WET-BULB TEMPERATURE                                             K                          1            0  12 C                         1         3
+ 012003 DEW-POINT TEMPERATURE                                            K                          1            0  12 C                         1         3
+ 012004 DRY-BULB TEMPERATURE AT 2 M                                      K                          1            0  12 C                         1         3
+ 012005 WET-BULB TEMPERATURE AT 2 M                                      K                          1            0  12 C                         1         3
+ 012006 DEW-POINT TEMPERATURE AT 2 M                                     K                          1            0  12 C                         1         3
+ 012007 VIRTUAL TEMPERATURE                                              K                          1            0  12 C                         1         3
+ 012011 MAXIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          1            0  12 C                         1         3
+ 012012 MINIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          1            0  12 C                         1         3
+ 012013 GROUND MINIMUM TEMPERATURE, PAST 12 HOURS                        K                          1            0  12 C                         1         3
+ 012014 MAXIMUM TEMPERATURE AT 2 M, PAST 12 HOURS                        K                          1            0  12 C                         1         3
+ 012015 MINIMUM TEMPERATURE AT 2 M, PAST 12 HOURS                        K                          1            0  12 C                         1         3
+ 012016 MAXIMUM TEMPERATURE AT 2 M, PAST 24 HOURS                        K                          1            0  12 C                         1         3
+ 012017 MINIMUM TEMPERATURE AT 2 M, PAST 24 HOURS                        K                          1            0  12 C                         1         3
+ 012021 MAXIMUM TEMPERATURE AT 2M                                        K                          2            0  16 C                         2         4
+ 012022 MINIMUM TEMPERATURE AT 2M                                        K                          2            0  16 C                         2         4
+ 012023 TEMPERATURE                                                      C                          0          -99   8 C                         0         2
+ 012024 DEW POINT TEMPERATURE                                            C                          0          -99   8 C                         0         2
+ 012030 SOIL TEMPERATURE                                                 K                          1            0  12 C                         1         3
+ 012049 TEMPERATURE CHANGE OVER SPECIFIED PERIOD                         K                          0          -30   6 C                         0         2
+ 012051 STANDARD DEVIATION TEMPERATURE                                   K                          1            0  10 C                         1         3
+ 012052 HIGHEST DAILY MEAN TEMPERATURE                                   K                          1            0  12 C                         1         3
+ 012053 LOWEST DAILY MEAN TEMPERATURE                                    K                          1            0  12 C                         1         3
+ 012061 SKIN TEMPERATURE                                                 K                          1            0  12 C                         1         3
+ 012062 EQUIVALENT BLACK BODY TEMPERATURE                                K                          1            0  12 C                         1         3
+ 012063 BRIGHTNESS TEMPERATURE                                           K                          1            0  12 C                         1         3
+ 012064 INSTRUMENT TEMPERATURE                                           K                          1            0  12 K                         1         4
+ 012065 STANDARD DEVIATION BRIGHTNESS TEMPERATURE                        K                          1            0  12 K                         1         4
+ 012070 WARM LOAD TEMPERATURE                                            K                          2            0  16 K                         2         5
+ 012071 COLDEST CLUSTER TEMPERATURE                                      K                          1            0  12 K                         1         4
+ 012072 RADIANCE                                                         WM**(-2)SR**(-1)           6            0  31 WM**(-2)SR**(-1)          6         9
+ 012073 TEMPERATURE                                                      K                          2            0  16 K                         2         5
+ 012075 SPECTRAL RADIANCE                                                WM**(-3)SR**(-1)          -3            0  16 WM**(-3)SR**(-1)         -3         5
+ 012076 RADIANCE                                                         WM**(-2)SR**(-1)           3            0  16 WM**(-2)SR**(-1)          3         5
+ 012101 TEMPERATURE/DRY-BULB TEMPERATURE                                 K                          2            0  16 C                         2         4
+ 012102 WET-BULB TEMPERATURE                                             K                          2            0  16 C                         2         4
+ 012103 DEW-POINT TEMPERATURE                                            K                          2            0  16 C                         2         4
+ 012104 DRY-BULB TEMPERATURE AT 2M                                       K                          2            0  16 C                         2         4
+ 012105 WEB-BULB TEMPERATURE AT 2M                                       K                          2            0  16 C                         2         4
+ 012106 DEW-POINT TEMPERATURE AT 2M                                      K                          2            0  16 C                         2         4
+ 012107 VIRTUAL TEMPERATURE                                              K                          2            0  16 C                         2         4
+ 012111 MAXIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          2            0  16 C                         2         4
+ 012112 MINIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          2            0  16 C                         2         4
+ 012113 GROUND MINIMUM TEMPERATURE, PAST 12 HOURS                        K                          2            0  16 C                         2         4
+ 012114 MAXIMUM TEMPERATURE AT 2M, PAST 12 HOURS                         K                          2            0  16 C                         2         4
+ 012115 MINIMUM TEMPERATURE AT 2M, PAST 12 HOURS                         K                          2            0  16 C                         2         4
+ 012116 MAXIMUM TEMPERATURE AT 2M, PAST 24 HOURS                         K                          2            0  16 C                         2         4
+ 012117 MINIMUM TEMPERATURE AT 2M, PAST 24 HOURS                         K                          2            0  16 C                         2         4
+ 012118 MAXIMUM TEMPERATURE AT HEIGHT SPECIFIED, PAST 24 HOURS           K                          2            0  16 C                         2         4
+ 012119 MINIMUM  TEMPERATURE AT HEIGHT SPECIFIED, PAST 24 HOURS          K                          2            0  16 C                         2         4
+ 012121 GROUND MINIMUM TEMPERATURE                                       K                          2            0  16 C                         2         4
+ 012122 GROUND MINIMUM TEMPERATURE OF THE PRECEDING NIGHT                K                          2            0  16 C                         2         4
+ 012130 SOIL TEMPERATURE                                                 K                          2            0  16 C                         2         4
+ 012151 STANDARD DEVIATION OF DAILY MEAN TEMPERATURE                     K                          2            0  12 C                         2         4
+ 012152 HIGHEST DAILY MEAN TEMPERATURE                                   K                          2            0  16 C                         2         4
+ 012153 LOWEST DAILY MEAN TEMPERATURE                                    K                          2            0  16 C                         2         4
+ 012161 SKIN TEMPERATURE                                                 K                          2            0  16 C                         2         4
+ 012162 EQUIVALENT BLACK BODY TEMPERATURE                                K                          2            0  16 C                         2         4
+ 012163 BRIGHTNESS TEMPERATURE                                           K                          2            0  16 C                         2         4
+ 012164 INSTRUMENT TEMPERATURE                                           K                          2            0  16 K                         2         5
+ 012171 COLDEST CLUSTER TEMPERATURE                                      K                          2            0  16 K                         2         5
+ 012180 AVERAGED 12 MICRON BT FOR ALL CLEAR PIXELS AT NADIR              K                          2            0  16 K                         2         5
+ 012181 AVERAGED 11 MICRON BT FOR ALL CLEAR PIXELS AT NADIR              K                          2            0  16 K                         2         5
+ 012182 AVERAGED 3.7 MICRON BT FOR ALL CLEAR PIXELS AT NADIR             K                          2            0  16 K                         2         5
+ 012183 AVERAGED 12 MICRON BT FOR ALL CLEAR PIXELS, FORWARD VIEW         K                          2            0  16 K                         2         5
+ 012184 AVERAGED 11 MICRON BT FOR ALL CLEAR PIXELS, FORWARD VIEW         K                          2            0  16 K                         2         5
+ 012185 AVERAGED 3.7 MICRON BT FOR ALL CLEAR PIXELS, FORWARD VIEW        K                          2            0  16 K                         2         5
+ 012186 MEAN NADIR SEA SURFACE TEMPERATURE                               K                          2            0  16 K                         2         5
+ 012187 MEAN DUAL VIEW SEA SURFACE TEMPERATURE                           K                          2            0  16 K                         2         5
+ 012188 INTERPOLATED 23.8 GHZ BRIGHTNESS T FROM MWR                      K                          2            0  16 K                         2         5
+ 012189 INTERPOLATED 36.5 GHZ BRIGHTNESS T FROM MWR                      K                          2            0  16 K                         2         5
+ 012193 COLDEST CLUSTER TEMPERATURE                                      K                          1            0  12
+ 012194 RADIANCE                                                         W/M**2*STER*M**(-1)        6            0  31
+ 012195 SPECTRAL RADIANCE                                                W/M**2*STER*M**(-1)       10            0  31
+ 012196 RADIANCE                                                         W/M**2*STER                3            0  16
+ 012197 MAXIMUM TEMPERATURE AT 2M, PAST  3 HOURS                         K                          1            0  12
+ 012198 MINIMUM TEMPERATURE AT 2M, PAST  3 HOURS                         K                          1            0  12
+ 012199 MAXIMUM TEMPERATURE AT 2M, PAST  6 HOURS                         K                          1            0  12
+ 012200 MINIMUM TEMPERATURE AT 2M, PAST  6 HOURS                         K                          1            0  12
+ 013001 SPECIFIC HUMIDITY                                                KG/KG                      5            0  14 KG/KG                     5         5
+ 013002 MIXING RATIO                                                     KG/KG                      5            0  14 KG/KG                     5         5
+ 013003 RELATIVE HUMIDITY                                                %                          0            0   7 %                         0         3
+ 013004 VAPOUR PRESSURE                                                  PA                        -1            0  10 PA                       -1         4
+ 013005 VAPOUR DENSITY                                                   KG/M**3                    3            0   7 KG/M**3                   3         3
+ 013006 MIXING HEIGHTS                                                   M                         -1          -40  16 M                        -1         5
+ 013007 MINIMUM RELATIVE HUMIDITY                                        %                          0            0   7 %                         0         3
+ 013008 MAXIMUM RELATIVE HUMIDITY                                        %                          0            0   7 %                         0         3
+ 013009 RELATIVE HUMIDITY                                                %                          1        -1000  12 %                         1         4
+ 013011 TOTAL PRECIPITATION/TOTAL WATER EQUIVALENT                       KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013012 DEPTH OF FRESH SNOW                                              M                          2           -2  12 M                         2         4
+ 013013 TOTAL SNOW DEPTH                                                 M                          2           -2  16 M                         2         5
+ 013014 RAINFALL/WATER EQUIVALENT OF SNOW (AVERAGED RATE)                KG/(M**2)S                 4            0  12 KG/(M**2)S                4         4
+ 013015 SNOWFALL  (AVERAGED RATE)                                        M/S                        7            0  12 M/S                       7         4
+ 013016 PRECIPITABLE WATER                                               KG/M**2                    0            0   7 KG/M**2                   0         3
+ 013019 TOTAL PRECIPITATION PAST 1 HOUR                                  KG/M**2                    1           -1  14 KG/M**2                   1         4
+ 013020 TOTAL PRECIPITATION PAST 3 HOURS                                 KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013021 TOTAL PRECIPITATION PAST 6 HOURS                                 KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013022 TOTAL PRECIPITATION PAST 12 HOURS                                KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013023 TOTAL PRECIPITATION PAST 24 HOURS                                KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013031 EVAPOTRANSPIRATION                                               KG/M**2                    0            0   7 KG/M**2                   0         3
+ 013032 EVAPORATION/EVAPOTRANSPIRATION                                   KG/M**2                    1            0   8 KG/M**2                   1         3
+ 013033 EVAPORATION/EVAPOTRANSPIRATION                                   KG/M**2                    1            0  10 KG/M**2                   1         4
+ 013038 SUPERADIABATIC INDICATOR                                         CODE TABLE 13038           0            0   2 CODE TABLE 13038          0         1
+ 013039 TERRAIN TYPE (ICE/SNOW)                                          CODE TABLE 13039           0            0   3 CODE TABLE 13039          0         1
+ 013040 SURFACE FLAG                                                     CODE TABLE 13040           0            0   4 CODE TABLE 13040          0         2
+ 013041 PASQUILL-GIFFORD STABILITY CATEGORY                              CODE TABLE 13041           0            0   4 CODE TABLE 13041          0         2
+ 013042 PARCEL LIFTED INDEX (TO 500 HPA)                                 K                          0          -20   6 K                         0         2
+ 013043 BEST LIFTED INDEX (TO 500 HPA)                                   K                          0          -20   6 K                         0         2
+ 013044 K INDEX                                                          K                          0          -30   8 K                         0         3
+ 013045 KO INDEX                                                         K                          0          -30   8 K                         0         3
+ 013046 MAXIMUM BUOYANCY                                                 K                          0          -30   8 K                         0         3
+ 013047 MODIFIED SHOWALTER STABILITY INDEX                               K                          0          -60   6 C                         0         2
+ 013051 FREQUENCY GROUP, PRECIPITATION                                   CODE TABLE 13051           0            0   4 CODE TABLE 13051          0         2
+ 013052 HIGHEST DAILY AMOUNT OF PRECIPITATION                            KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013055 INTENSITY OF PRECIPITATION                                       KG/(M**2)S                 4            0   8 MM H-1                    1         3
+ 013056 CHARACTER AND INTENSITY OF PRECIPITATION                         CODE TABLE 13056           0            0   4 CODE TABLE 13056          0         2
+ 013057 TIME OF BEGINNING OR END OF PRECIPITATION                        CODE TABLE 13057           0            0   4 CODE TABLE 13057          0         2
+ 013058 SIZE OF PRECIPITATING ELEMENT                                    M                          4            0   7 MM                        1         3
+ 013059 NUMBER OF FLASHES (THUNDERSTORM)                                 NUMERIC                    0            0   7 NUMERIC                   0         3
+ 013060 TOTAL ACCUMULATED PRECIPITATION                                  KG/M**2                    1           -1  17 KG/M**2                   1         5
+ 013071 UPSTREAM WATER LEVEL                                             M                          2            0  14 M                         2         5
+ 013072 DOWNSTREAM WATER LEVEL                                           M                          2            0  14 M                         2         4
+ 013073 MAXIMUM WATER LEVEL                                              M                          2            0  14 M                         2         4
+ 013080 WATER PH                                                         pH                         1            0  10 pH                        1         3
+ 013081 WATER CONDUCTIVITY                                               S M-1                      3            0  14 S M-1                     3         4
+ 013082 WATER TEMPERATURE                                                K                          1            0  12 K                         1         4
+ 013083 DISSOLVED OXYGEN                                                 KG/M**3                    6            0  15 KG/M**3                   6         5
+ 013084 TURBIDITY                                                        LUMEN                      0            0  14 LUMEN                     0         4
+ 013085 OXYDATION REDUCTION POTENTIAL (ORP)                              V                          3            0  14 V                         3         4
+ 013090 RADIOMETER WATER VAPOUR CONTENT                                  KG/M**2                    1            0  10 KG/M**2                   1         4
+ 013091 RADIOMETER LIQUID CONTENT                                        KG/M**2                    2            0   8 KG/M**2                   2         3
+ 013093 CLOUD OPTICAL THICKNESS                                          NUMERIC                    0            0   8 NUMERIC                   0         3
+ 013095 TOTAL COLUMN WATER VAPOUR                                        KG/M**2                    4            0  19 KG/M**2                   4         6
+ 013096 MWR WATER VAPOUR CONTENT                                         KG/M**2                    2            0  14 KG/M**2                   2         4
+ 013097 MWR LIQUID WATER CONTENT                                         KG/M**2                    2            0  14 KG/M**2                   2         4
+ 013098 INTEGRATED WATER VAPOUR DENSITY                                  KG/M**2                    8            0  30 KG/M**2                   8        10
+ 013193 RELATIVE HUMIDITY                                                %                          0            0   8
+ 013194 TOTAL COLUMN WATER                                               KG/M**2                    2            0  11
+ 013195 RAIN RATE                                                        KG/M**2HOUR                0            0   5
+ 013196 ANTECEDENT PRECIPITATION INDEX                                   KG/M**2                    0            0   7
+ 013197 TOTAL COLUMN WATER VAPOUR                                        KG/M**2                    1            0  10
+ 013198 RAIN FLAG                                                        CODE TABLE 13198           0            0   3
+ 013199 SPECIFIC HUMIDITY AT 2 M                                         KG/KG                      5            0  14
+ 013201 CLOUD LIQUID WATER                                               KG/KG                      7            0  14
+ 013202 TYPE OF SURFACE                                                  CODE TABLE 13202           0            0   8
+ 013203 1D VAR ESTIMATE OF RAIN RATE                                     KG/M**2*HOUR               2            0  12
+ 013204 SSMI INDEPENDENT ESTIMATE OF RAIN RATE                           KG/M**2*HOUR               2            0  12
+ 013205 CLOUD LIQUID WATER PATH                                          KG/M**2                    4            0  14
+ 013206 TOTAL PRECIPITATION ICE CONTENT                                  KG/M**2                    6            0  14
+ 013207 TOTAL CLOUD LIQUID WATER                                         KG/M**2                    6            0  14
+ 013208 SURFACE RAIN RATE ( INSTANTANEOUS )                              KG/M**2*S                  5            0  17
+ 013209 RAIN POSSIBILITY                                                 NUMERIC                    0         -256   9
+ 013210 1D VAR CLOUD LIQUID WATER PATH RETRIEVED ERROR(S)                KG/M**2                    4            0  14
+ 013211 TOTAL PRECIPITABLE WATER INDIPENDENT ESTIMATE OF ERROR(S)        KG/M**2                    2            0  11
+ 013212 CLOUD LIQUID WATER PATH INDIPENDENT ESTIMATE OF ERROR(S)         KG/M**2                    4            0  14
+ 013230 CONVECTIVE PRECIPITATION                                         KG/M**2                    1           -1  14
+ 013231 LARGE SCALE PRECIPITATION                                        KG/M**2                    1           -1  14
+ 013240 AIR DENSITY                                                      KG/M**3                    3            0  10
+ 013241 CONVECTIVE AVAILABLE POTENTIAL ENERGY                            J/KG                       1            0  17
+ 014001 LONG-WAVE RADIATION, INTEGRATED OVER 24 HOURS                    J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014002 LONG-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED            J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014003 SHORT-WAVE RADIATION, INTEGRATED OVER 24 HOURS                   J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014004 SHORT-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED           J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014011 NET LONG-WAVE RADIATION, INTEGRATED OVER 24 HOURS                J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014012 NET LONG-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED        J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014013 NET SHORT-WAVE RADIATION, INTEGRATED OVER 24 HOURS               J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014014 NET SHORT-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED       J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014015 NET RADIATION, INTEGRATED OVER 24 HOURS                          J/M**2                    -4       -16384  15 J/M**2                   -4         5
+ 014016 NET RADIATION, INTEGRATED OVER PERIOD SPECIFIED                  J/M**2                    -4       -16384  15 J/M**2                   -4         5
+ 014017 INSTANTANEOUS LONG-WAVE RADIATION (SEE NOTE 6)                   W/M**2                    -3        -2048  12 W/M**2                   -3         4
+ 014018 INSTANTANEOUS SHORT-WAVE RADIATION (SEE NOTE 6)                  W/M**2                    -3        -2048  12 W/M**2                   -3         4
+ 014019 SURFACE ALBEDO                                                   %                          0            0   7 %                         0         3
+ 014020 GLOBAL SOLAR RADIATION, INTEGRATED OVER 24 HOURS                 J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014021 GLOBAL SOLAR RADIATION, INTEGRATED OVER PERIOD SPECIFIED         J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014022 DIFFUSE SOLAR RADIATION, INTEGRATED OVER 24 HOURS                J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014023 DIFFUSE SOLAR RADIATION, INTEGRATED OVER PERIOD SPECIFIED        J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014024 DIRECT SOLAR RADIATION, INTEGRATED OVER 24 HOURS                 J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014025 DIRECT SOLAR RADIATION, INTEGRATED OVER PERIOD SPECIFIED         J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014026 ALBEDO AT THE TOP OF CLOUDS                                      %                          0            0   7 %                         0         3
+ 014027 ALBEDO                                                           %                          0            0   7 %                         0         3
+ 014028 GLOBAL SOLAR RADIATION (HIGH ACCURACY), INTEGRATED OVER PERIOD S J/M**2                    -2            0  16 J/M**2                   -2         5
+ 014029 DIFFUSE SOLAR RADIATION (HIGH ACCURACY), INTEGRATED OVER PERIOD  J/M**2                    -2            0  16 J/M**2                   -2         5
+ 014030 DIRECT SOLAR RADIATION (HIGH ACCURACY), INTEGRATED OVER PERIOD S J/M**2                    -2            0  16 J/M**2                   -2         5
+ 014031 TOTAL SUNSHINE                                                   MINUTE                     0            0  11 MINUTE                    0         4
+ 014032 TOTAL SUNSHINE                                                   HOUR                       0            0  10 HOUR                      0         4
+ 014033 TOTAL SUNSHINE                                                   %                          0            0   9 %                         0         3
+ 014034 SUNSHINE OVER PERIOD SPECIFIED                                   MINUTE                     0            0  11 MINUTE                    0         4
+ 014042 BI-DIRECTIONAL REFLECTANCE                                       %                          0            0   7 %                         0         3
+ 014045 CHANNEL RADIANCE                                                 (W/M**2)*(1/SR)*CM         0            0  11 WM-2SR-1CM-1              0         4
+ 014046 SCALED IASI RADIANCE                                             (W/M**2)*(1/SR)*(1/M)      0        -5000  16 (W/M**2)*(1/SR)*(1/M)     0         5
+ 014047 SCALED MEAN AVHRR RADIANCE                                       (W/M**2)*(1/SR)*(1/M)      0            0  31 (W/M**2)*(1/SR)*(1/M)     0        10
+ 014048 SCALED STANDARD DEVIATION RADIANCE                               (W/M**2)*(1/SR)*(1/M)      0            0  31 (W/M**2)*(1/SR)*(1/M)     0        10
+ 014050 EMISSIVITY (SEE NOTE 5)                                          %                          1            0  10 %                         1         4
+ 014051 DIRECT SOLAR RADIATION INTEGRATED OVER LAST HOUR                 J/M**2                    -3            0  14 JM-2                     -3         4
+ 014055 SOLAR ACTIVITY INDEX                                             NUMERIC                    0       -32768  16 NUMERIC                   0         5
+ 014061 (VAL) INSTANTANEOUS LONG-WAVE RADIATION                          W/M**2                     0         -512  10 W/M**2                    0         4
+ 014062 (VAL) INSTANTANEOUS SHORT-WAVE RADIATION                         W/M**2                     0        -2048  12 W/M**2                    0         4
+ 015001 TOTAL OZONE                                                      DU                         0            0  10 DU                        0         4
+ 015002 AIR MASS (SLANT PATH AT 22 KM)                                   NUMERIC                    2            0  10 NUMERIC                   2         3
+ 015003 MEASURED OZONE PARTIAL PRESSURE (SOUNDING)                       PA                         4            0   9 NBAR                      0         3
+ 015004 OZONE SOUNDING CORRECTION FACTOR                                 NUMERIC                    3            0  11 NUMERIC                   3         4
+ 015005 OZONE P                                                          DU                         0            0  10 DU                        0         3
+ 015008 SCALED MIXING RATIO                                              NUMERIC                    0            0  10 NUMERIC                   0         4
+ 015011 LOG 10 OF INTEGRATED ELECTRON DENSITY                            LOG (1/M2)                 3        14000  13 LOG (M-2)                 3         4
+ 015015 MAXIMUM IMAGE SPECTRAL COMPONENT BEFORE NORMALIZATION            NUMERIC                    0            0  31 NUMERIC                   0        10
+ 015020 INTEGRATED 03 DENSITY                                            KG/M**2                    8            0  21 KG/M**2                   8         7
+ 015021 INTEGRATED MASS DENSITY                                          KG/M**2                    0            0  10 KG/M**2                   0         4
+ 015024 OPTICAL DEPTH                                                    NUMERIC                    4            0  24 NUMERIC                   4         8
+ 015025 TYPE OF POLLUTANT                                                CODE TABLE 15025           0            0   4 CODE TABLE 15025          0         2
+ 015026 CONCENTRATION OF POLLUTANT                                       MOLMOL-1                   9            0   9 MOLMOL-1                  9         3
+ 015027 CONCENTRATION OF POLLUTANT                                       KG/M3                      9            0  10 KG/M3                     9         4
+ 015030 AEROSOL CONTAMINATION INDEX                                      NUMERIC                    2        -1000  12 NUMERIC                   2         4
+ 015031 ATMOSPHERIC PATH DELAY IN SATELLITE SIGNAL                       M                          4        10000  15 M                         4         5
+ 015032 ESTIMATED ERROR IN ATMOSPHERIC PATH DELAY                        M                          4            0  10 M                         4         4
+ 015033 DIFFERENCE IN PATH DELAYS FOR LIMB VIEWS AT EXTREMES OF SCAN     M                          5       -10000  15 M                         5         5
+ 015034 ESTIMATED ERROR IN PATH DELAY DIFFERENCE                         M                          5            0  14 M                         5         5
+ 015035 COMPONENT OF ZENITH PATH DELAY DUE TO WATER VAPOUR               M                          4            0  14 M                         4         5
+ 015036 ATMOSPHERIC REFRACTIVITY (SEE NOTE 5)                            N-UNITS                    3            0  19 N-UNITS                   3         6
+ 015037 BENDING ANGLE                                                    RADIANS                    8      -100000  23 RADIANS                   8         7
+ 015202 INTEGRATED ELECTRON DENSITY                                      1/M**2                     3        13000  12
+ 019001 TYPE OF SYNOPTIC FEATURE                                         CODE TABLE 19001           0            0   6 CODE TABLE 19001          0         2
+ 019002 EFFECTIVE RADIUS OF FEATURE                                      M                         -2            0  12 M                        -2         4
+ 019003 WIND SPEED THRESHOLD                                             M/S                        0            0   8 M/S                       0         3
+ 019004 EFFECTIVE RADIUS WITH RESPECT TO WIND SPEEDS ABOVE THRESHOLD     M                         -2            0  12 M                        -2         4
+ 019005 DIRECTION OF MOTION OF FEATURE                                   DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 019006 SPEED OF MOTION OF FEATURE                                       M/S                        2            0  14 M/S                       2         5
+ 019007 EFFECTIVE RADIUS OF FEATURE                                      M                         -3            0  12 M                        -3         4
+ 019008 VERTICAL EXTENT OF CIRCULATION                                   CODE TABLE 19008           0            0   3 CODE TABLE 19008          0         1
+ 019009 EFFECTIVE RADIUS WITH RESPECT TO WIND SPEEDS ABOVE THRESHOLD (LA M                         -3            0  12 M                        -3         4
+ 019010 METHOD FOR TRACKING THE CENTRE OF SYNOPTIC FEATURE               CODE TABLE 19010           0            0   4 CODE TABLE 19010          0         2
+ 019100 TIME INTERVAL TO CALCULATE THE MOVEMENT OF THE TROPICAL CYCLONE  CODE TABLE 19100           0            0   4 CODE TABLE 19100          0         2
+ 019101 ACCURACY OF THE POSITION OF THE CENTRE OF THE TROPICAL CYCLONE   CODE TABLE 19101           0            0   4 CODE TABLE 19101          0         2
+ 019102 SHAPE AND DEFINITION OF THE EYE OF THE TROPICAL CYCLONE          CODE TABLE 19102           0            0   3 CODE TABLE 19102          0         1
+ 019103 DIAMETER OF MAJOR AXIS OF THE EYE OF THE TROPICAL CYCLONE        CODE TABLE 19103           0            0   4 CODE TABLE 19103          0         2
+ 019104 CHANGE IN CHARACTER OF THE EYE DURING THE 30 MINUTES             CODE TABLE 19104           0            0   4 CODE TABLE 19104          0         2
+ 019105 DISTANCE BETWEEN THE END OF SPIRAL BAND AND THE CENTRE           CODE TABLE 19105           0            0   4 CODE TABLE 19105          0         2
+ 019106 IDENTIFICATION NUMBER OF TROPICAL CYCLONE                        NUMERIC                    0            0   7 NUMERIC                   0         3
+ 019107 TIME INTERVAL OF THE TROPICAL CYCLONE ANALYSIS                   CODE TABLE 19107           0            0   4 CODE TABLE 19107          0         2
+ 019108 ACCURACY OF GEOGRAPHICAL POSITION OF THE TROPICAL CYCLONE        CODE TABLE 19108           0            0   3 CODE TABLE 19108          0         1
+ 019109 MEAN DIAMETER OF THE OVERCAST CLOUD OF THE TROPICAL CYCLONE      CODE TABLE 19109           0            0   4 CODE TABLE 19109          0         2
+ 019110 APPARENT 24-HOUR CHANGE IN INTENSITY OF TROPICAL CYCLONE         CODE TABLE 19110           0            0   4 CODE TABLE 19110          0         2
+ 019111 CURRENT INTENSITY (CI) NUMBER OF THE TROPICAL CYCLONE            NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019112 DATA TROPICAL (DT) NUMBER OF THE TROPICAL CYCLONE                NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019113 CLOUD PATTERN TYPE OF THE DT- NUMBER                             CODE TABLE 19113           0            0   4 CODE TABLE 19113          0         2
+ 019114 MODEL EXPECTED TROPICAL (MET) NUMBER OF THE TROPICAL CYCLONE     NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019115 TREND OF PAST 24-HOUR CHANGE (+: DEVELOPED, -: WEAKENED)         NUMERIC                    1          -30   6 NUMERIC                   1         2
+ 019116 PATTERN TROPICAL (PT) NUMBER OF THE TROPICAL CYCLONE             NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019117 CLOUD PICTURE TYPE OF THE PT- NUMBER                             CODE TABLE 19117           0            0   3 CODE TABLE 19117          0         1
+ 019118 FINAL TROPICAL (T) NUMBER OF THE TROPICAL CYCLONE                NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019119 TYPE OF THE FINAL T-NUMBER                                       CODE TABLE 19119           0            0   3 CODE TABLE 19119          0         1
+ 019150 TYPHOON INTERNATIONAL COMMON NUMBER (TYPHOON COMMITTEE)          CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 020001 HORIZONTAL VISIBILITY                                            M                         -1            0  13 M                        -1         4
+ 020002 VERTICAL VISIBILITY                                              M                         -1            0   7 M                        -1         3
+ 020003 PRESENT WEATHER (SEE NOTE 1)                                     CODE TABLE 20003           0            0   9 CODE TABLE 20003          0         3
+ 020004 PAST WEATHER (1) (SEE NOTE 2)                                    CODE TABLE 20004           0            0   5 CODE TABLE 20004          0         2
+ 020005 PAST WEATHER (2) (SEE NOTE 2)                                    CODE TABLE 20005           0            0   5 CODE TABLE 20005          0         2
+ 020008 CLOUD DISTRIBUTION FOR AVIATION                                  CODE TABLE 20008           0            0   5 CODE TABLE 20008          0         2
+ 020009 GENERAL WEATHER INDICATOR (TAF/METAR)                            CODE TABLE 20009           0            0   4 CODE TABLE 20009          0         2
+ 020010 CLOUD COVER (TOTAL)                                              %                          0            0   7 %                         0         3
+ 020011 CLOUD AMOUNT                                                     CODE TABLE 20011           0            0   4 CODE TABLE 20011          0         2
+ 020012 CLOUD TYPE                                                       CODE TABLE 20012           0            0   6 CODE TABLE 20012          0         2
+ 020013 HEIGHT OF BASE OF CLOUD                                          M                         -1          -40  11 M                        -1         4
+ 020014 HEIGHT OF TOP OF CLOUD                                           M                         -1          -40  11 M                        -1         4
+ 020015 PRESSURE AT BASE OF CLOUD                                        PA                        -1            0  14 PA                       -1         5
+ 020016 PRESSURE AT TOP OF CLOUD                                         PA                        -1            0  14 PA                       -1         5
+ 020017 CLOUD TOP DESCRIPTION                                            CODE TABLE 20017           0            0   4 CODE TABLE 20017          0         2
+ 020018 TENDENCY OF RUNWAY VISUAL RANGE                                  CODE TABLE 20018           0            0   2 CODE TABLE 20018          0         1
+ 020019 SIGNIFICANT PRESENT OR FORECAST WEATHER                          CCITTIA5                   0            0  72 CHARACTER                 0         9
+ 020020 SIGNIFICANT RECENT WEATHER PHENOMENA                             CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 020021 TYPE OF PRECIPITATION                                            FLAG TABLE 20021           0            0  30 FLAG TABLE 20021          0        10
+ 020022 CHARACTER OF PRECIPITATION                                       CODE TABLE 20022           0            0   4 CODE TABLE 20022          0         2
+ 020023 OTHER WEATHER PHENOMENA                                          FLAG TABLE 20023           0            0  18 FLAG TABLE 20023          0         6
+ 020024 INTENSITY OF PHENOMENA                                           CODE TABLE 20024           0            0   3 CODE TABLE 20024          0         1
+ 020025 OBSCURATION                                                      FLAG TABLE 20025           0            0  21 FLAG TABLE 20025          0         7
+ 020026 CHARACTER OF OBSCURATION                                         CODE TABLE 20026           0            0   4 CODE TABLE 20026          0         2
+ 020027 PHENOMENA OCCURRENCE                                             FLAG TABLE 20027           0            0   9 FLAG TABLE 20027          0         3
+ 020029 RAIN FLAG                                                        CODE TABLE 20029           0            0   2 CODE TABLE 20029          0         1
+ 020031 ICE DEPOSIT (THICKNESS)                                          M                          2            0   7 M                         2         3
+ 020032 RATE OF ICE ACCRETION                                            CODE TABLE 20032           0            0   3 CODE TABLE 20032          0         1
+ 020033 CAUSE OF ICE ACCRETION                                           FLAG TABLE 20033           0            0   4 FLAG TABLE 20033          0         2
+ 020034 SEA ICE CONCENTRATION                                            CODE TABLE 20034           0            0   5 CODE TABLE 20034          0         2
+ 020035 AMOUNT AND TYPE OF ICE                                           CODE TABLE 20035           0            0   4 CODE TABLE 20035          0         2
+ 020036 ICE SITUATION                                                    CODE TABLE 20036           0            0   5 CODE TABLE 20036          0         2
+ 020037 ICE DEVELOPMENT                                                  CODE TABLE 20037           0            0   5 CODE TABLE 20037          0         2
+ 020038 BEARING OF ICE EDGE (SEE NOTE 3)                                 DEGREE TRUE                0            0  12 DEGREE TRUE               0         3
+ 020039 ICE DISTANCE                                                     M                         -1            0  13 M                        -1         4
+ 020040 EVOLUTION OF DRIFT OF SNOW                                       CODE TABLE 20040           0            0   4 CODE TABLE 20040          0         2
+ 020041 AIRFRAME ICING                                                   CODE TABLE 20041           0            0   4 CODE TABLE 20041          0         2
+ 020042 AIRFRAME ICING PRESENT                                           CODE TABLE 20042           0            0   2 CODE TABLE 20042          0         1
+ 020043 PEAK LIQUID WATER CONTENT                                        KG/M**3                    4            0   7 KG/M**3                   4         2
+ 020044 AVERAGE LIQUID WATER CONTENT                                     KG/M**3                    4            0   7 KG/M**3                   4         2
+ 020045 SUPERCOOLED LARGE DROPLET (SLD) CONDITIONS                       CODE TABLE 20045           0            0   2 CODE TABLE 20045          0         2
+ 020050 CLOUD INDEX                                                      CODE TABLE 20050           0            0   8 CODE TABLE 20050          0         3
+ 020051 AMOUNT OF LOW CLOUDS                                             %                          0            0   7 %                         0         3
+ 020052 AMOUNT OF MIDDLE CLOUDS                                          %                          0            0   7 %                         0         3
+ 020053 AMOUNT OF HIGH CLOUDS                                            %                          0            0   7 %                         0         3
+ 020054 TRUE DIRECTION FROM WHICH CLOUDS ARE MOVING                      DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 020055 STATE OF SKY IN TROPICS                                          CODE TABLE 20055           0            0   4 CODE TABLE 20055          0         2
+ 020056 CLOUD PHASE                                                      CODE TABLE 20056           0            0   3 CODE TABLE 20056          0         1
+ 020059 MINIMUM HORIZONTAL VISIBILITY                                    M                         -1            0   9 M                        -1         3
+ 020060 PREVAILING HORIZONTAL VISIBILITY                                 M                         -1            0  10 M                        -1         4
+ 020061 RUNWAY VISUAL RANGE (RVR)                                        M                          0            0  12 M                         0         4
+ 020062 STATE OF THE GROUND (WITH OR WITHOUT SNOW)                       CODE TABLE 20062           0            0   5 CODE TABLE 20062          0         2
+ 020063 SPECIAL PHENOMENA                                                CODE TABLE 20063           0            0  10 CODE TABLE 20063          0         4
+ 020065 SNOW COVER (SEE NOTE 4)                                          %                          0            0   7 %                         0         3
+ 020066 MAXIMUM DIAMETER OF HAILSTONES                                   M                          3            0   8 M                         3         3
+ 020067 DIAMETER OF DEPOSIT                                              M                          3            0   9 M                         3         3
+ 020070 MINIMUM NUMBER OF ATMOSPHERICS                                   NUMERIC                    0            0   7 NUMERIC                   0         3
+ 020071 ACCURACY OF FIX AND RATE OF ATMOSPHERICS                         CODE TABLE 20071           0            0   4 CODE TABLE 20071          0         2
+ 020081 CLOUD AMOUNT IN SEGMENT                                          %                          0            0   7 %                         0         3
+ 020082 AMOUNT SEGMENT CLOUD FREE                                        %                          0            0   7 %                         0         3
+ 020083 AMOUNT OF SEGMENT COVERED BY SCENE                               %                          0            0   7 %                         0         3
+ 020085 GENERAL CONDITION OF RUNWAY                                      CODE TABLE 20085           0            0   4 CODE TABLE 20085          0         1
+ 020086 RANWAY DEPOSITS                                                  CODE TABLE 20086           0            0   4 CODE TABLE 20086          0         1
+ 020087 RUNWAY CONTAMINATION                                             CODE TABLE 20087           0            0   4 CODE TABLE 20087          0         1
+ 020088 DEPTH OF RANWAY DEPOSITS                                         M                          3            0  12 M                         3         4
+ 020089 RUNWAY FRICTION COEFICIENT                                       CODE TABLE 20089           0            0   7 CODE TABLE 20089          0         2
+ 020090 SPECIAL CLOUDS                                                   CODE TABLE 20090           0            0   4 CODE TABLE 20090          0         2
+ 020091 VERTICAL VISIBILITY                                              FEET                      -2            0  10 FEET                     -2         3
+ 020092 HEIGHT OF BASE OF CLOUD                                          FEET                      -2            0  10 FEET                     -2         3
+ 020095 ICE PROBABILITY                                                  NUMERIC                    3            0  10 NUMERIC                   3         4
+ 020096 ICE AGE ("A" PARAMETER)                                          dB                         2        -4096  13 dB                        2         4
+ 020101 LOCUST (ACRIDIAN) NAME                                           CODE TABLE 20101           0            0   4 CODE TABLE 20101          0         2
+ 020102 LOCUST (MATURITY) COLOR                                          CODE TABLE 20102           0            0   4 CODE TABLE 20102          0         2
+ 020103 STAGE OF DEVELOPMENT OF LOCUSTS                                  CODE TABLE 20103           0            0   4 CODE TABLE 20103          0         2
+ 020104 ORGANIZATION STATE OF SWARM OR BAND OF LOCUSTS                   CODE TABLE 20104           0            0   4 CODE TABLE 20104          0         2
+ 020105 SIZE OF SWARM OR BAND OF LOCUSTS AND DURATION OF PASSAGE OF SWARMCODE TABLE 20105           0            0   4 CODE TABLE 20105          0         2
+ 020106 LOCUST POPULATION DENSITY                                        CODE TABLE 20106           0            0   4 CODE TABLE 20106          0         2
+ 020107 DIRECTION OF MOVEMENTS OF LOCUST SWARM                           CODE TABLE 20107           0            0   4 CODE TABLE 20107          0         2
+ 020108 EXTENT OF VEGETATION                                             CODE TABLE 20108           0            0   4 CODE TABLE 20108          0         2
+ 020193 CLOUD AMOUNT IN SEGMENT                                          %                          0            0   7 %                         0         3
+ 020194 AMOUNT OF SEGMENT CLOUD FREE                                     %                          0            0   7 %                         0         3
+ 020215 PRESSURE AT THE BASE OF CLOUD                                    PA                        -1            0  14 PA                       -1         5
+ 020249 SEA-ICE FRACTION                                                 NUMERIC                    2            0   7 NUMERIC                   2         3
+ 020250 CALCULATED SURFACE TYPE                                          CODE TABLE 20250           0            0   5
+ 020251 ICE AGE                                                          CODE TABLE 20251           0            0   3
+ 020252 ICE EDGE                                                         CODE TABLE 20252           0            0   3
+ 020253 SURFACE TYPE                                                     CODE TABLE 20253           0            0   3
+ 020254 ICE CONCENTRATION                                                %                          0            0   7
+ 021001 HORIZONTAL REFLECTIVITY                                          dB                         0          -64   7 dB                        0         3
+ 021002 VERTICAL REFLECTIVITY                                            dB                         0          -64   7 dB                        0         3
+ 021003 DIFFERENTIAL REFLECTIVITY                                        dB                         1           -5   7 dB                        1         3
+ 021005 LINEAR DEPOLARISATION RATIO                                      dB                         0          -65   6 dB                        0         2
+ 021006 CIRCULAR DEPOLARISATION RATIO                                    dB                         0          -65   6 dB                        0         2
+ 021011 DOPPLER MEAN VELOCITY IN X-DIRECTION                             M/S                        0         -128   8 M/S                       0         3
+ 021012 DOPPLER MEAN VELOCITY IN Y-DIRECTION                             M/S                        0         -128   8 M/S                       0         3
+ 021013 DOPPLER MEAN VELOCITY IN Z-DIRECTION                             M/S                        0         -128   8 M/S                       0         3
+ 021014 DOPPLER MEAN VELOCITY (RADIAL)                                   M/S                        1        -4096  13 M/S                       1         4
+ 021017 DOPPLER VELOCITY SPECTRAL WIDTH                                  M/S                        1            0   8 M/S                       1         3
+ 021021 ECHO TOPS                                                        M                         -3            0   4 M                        -3         2
+ 021030 SIGNAL TO NOISE RATIO                                            dB                         0          -32   8 dB                        0         3
+ 021031 VERTICALLY INTEGRATED LIQUID-WATER CONTENT                       KG/M**2                    0            0   7 KG/M**2                   0         3
+ 021036 RADAR RAINFALL INTENSITY                                         MM/HOUR                    2            0  16
+ 021041 BRIGHT-BAND HEIGHT                                               M                         -2            0   8 M                        -2         3
+ 021051 SIGNAL POWER ABOVE 1 MW                                          dB                         0         -256   8 dB                        0         3
+ 021062 BACKSCATTER                                                      dB                         2        -5000  13 dB                        2         4
+ 021063 RADIOMETRIC RESOLUTION (NOISE VALUE)                             %                          1            0  10 %                         1         4
+ 021064 CLUTTER NOISE ESTIMATE                                           NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021065 MISSING PACKET COUNTER                                           NUMERIC                    0         -127   8 NUMERIC                   0         3
+ 021066 WAVE SCATTEROMETER PRODUCT CONFIDENCE DATA                       FLAG TABLE 21066           0            0  12 FLAG TABLE 21066          0         4
+ 021067 WIND PRODUCT CONFIDENCE DATA                                     FLAG TABLE 21067           0            0  13 FLAG TABLE 21067          0         5
+ 021068 RADAR ALTIMETER PRODUCT CONFIDENCE DATA                          FLAG TABLE 21068           0            0   8 FLAG TABLE 21068          0         3
+ 021069 SST PRODUCT CONFIDENCE DATA                                      FLAG TABLE 21069           0            0  10 FLAG TABLE 21069          0         4
+ 021070 SST PRODUCT CONFIDENCE DATA (SADIST-2)                           FLAG TABLE 21070           0            0  23 FLAG TABLE 21070          0         6
+ 021071 PEAKINESS                                                        NUMERIC                    0            0  16 NUMERIC                   0         5
+ 021072 SATELLITE ALTIMETER CALIBRATION STATUS                           FLAG TABLE 21072           0            0   4 FLAG TABLE 21072          0         2
+ 021073 SATELLLITE ALTIMETER INSTRUMENT MODE                             FLAG TABLE 21073           0            0   9 FLAG TABLE 21073          0         3
+ 021075 IMAGE SPECTRUM INTENSITY                                         NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021076 REPRESENTATION OF INTENSITIES                                    CODE TABLE 21076           0            0   3 CODE TABLE 21076          0         1
+ 021077 ALTITUDE CORRECTION (IONOSPHERE)                                 M                          3            0  14 M                         3         5
+ 021078 ALTITUDE CORRECTION (DRY TROPOSPHERE)                            M                          3            0   9 M                         3         3
+ 021079 ALTITUDE CORRECTION (WET TROPOSPHERE)                            M                          3         2000  10 M                         3         4
+ 021080 ALTITUDE CORRECTION (CALIBRATION CONSTANT)                       M                          3            0  11 M                         3         4
+ 021081 OPEN LOOP CORRECTION (HEIGHT-TIME LOOP)                          M                          3            0  10 M                         3         4
+ 021082 OPEN LOOP CORRECTION (AUTO GAIN CONTROL)                         dB                         3        -3000  14 dB                        3         5
+ 021083 WARM TARGET CALIBRATION                                          NUMERIC                    0            0  16 NUMERIC                   0         5
+ 021084 COLD TARGET CALIBRATION                                          NUMERIC                    0            0  16 NUMERIC                   0         5
+ 021085 ATSR SEA SURFACE TEMPERATURE ACROSS- TRACK BAND NUMBER           NUMERIC                    0            0   4 NUMERIC                   0         2
+ 021086 NUMBER OF PIXELS IN NADIR ONLY, AVERAGE                          NUMERIC                    0            0   9 NUMERIC                   0         3
+ 021087 NUMBER OF PIXELS IN DUAL VIEW, AVERAGE                           NUMERIC                    0            0   9 NUMERIC                   0         3
+ 021088 WET BACKSCATTER                                                  dB                         2        -5000  13 dB                        2         4
+ 021091 RADAR SIGNAL DOPPLER SPECTRUM 0TH MOMENT                         dB                         0         -100   8 dB                        0         3
+ 021092 RASS SIGNAL DOPPLER SPECTRUM 0TH MOMENT, REFERRING TO RASS SIGNA dB                         0         -100   8 dB                        0         3
+ 021093 Ku BAND PEAKINESS                                                NUMERIC                    3            0  16 NUMERIC                   0         5
+ 021094 S BAND PEAKINESS                                                 NUMERIC                    3            0  16 NUMERIC                   0         5
+ 021101 NUMBER OF VECTOR AMBIGUITIES                                     NUMERIC                    0            0   3 NUMERIC                   0         1
+ 021102 INDEX OF SELECTED WIND VECTOR                                    NUMERIC                    0            0   3 NUMERIC                   0         1
+ 021103 TOTAL NUMBER OF SIGMA-0 MEASUREMENTS                             NUMERIC                    0            0   5 NUMERIC                   0         2
+ 021104 LIKELIHOOD COMPUTED FOR SOLUTION                                 NUMERIC                    3       -30000  15 NUMERIC                   3         5
+ 021105 NORMALIZED RADAR CROSS-SECTION                                   dB                         2       -10000  14 dB                        2         5
+ 021106 KP VARIANCE COEFFICIENT (ALPHA)                                  NUMERIC                    3            0  14 NUMERIC                   3         5
+ 021107 KP VARIANCE COEFFICIENT (BETA)                                   NUMERIC                    8            0  16 NUMERIC                   8         5
+ 021109 SEAWINDS WIND VECTOR CELL QUALITY                                FLAG TABLE 21109           0            0  17 FLAG TABLE 21109          0         6
+ 021110 NUMBER OF INNER-BEAM SIGMA-0 (FORWARD OF SATELLITE)              NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021111 NUMBER OF OUTER-BEAM SIGMA-0 (FORWARD OF SATELLITE)              NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021112 NUMBER OF INNER-BEAM SIGMA-0 (AFT OF SATELLITE)                  NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021113 NUMBER OF OUTER-BEAM SIGMA-0 (AFT OF SATELLITE)                  NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021114 KP VARIANCE COEFFICENT (GAMMA)                                   dB                         3      -140000  18 dB                        3         6
+ 021115 SEAWINDS SIGMA-0 QUALITY                                         FLAG TABLE 21115           0            0  17 FLAG TABLE 21115          0         6
+ 021116 SEAWINDS SIGMA-0 MODE                                            FLAG TABLE 21116           0            0  17 FLAG TABLE 21116          0         6
+ 021117 SIGMA-0 VARIANCE QUALITY CONTROL                                 NUMERIC                    2            0  16 NUMERIC                   2         5
+ 021118 ATTENUATION CORRECTION ON SIGMA-0                                dB                         2       -10000  14 dB                        2         5
+ 021119 WIND SCATTEROMETER GEOPHYSICAL MODEL FUNCTION                    CODE TABLE 21119           0            0   6 CODE TABLE 21119          0         2
+ 021120 PROBABILITY OF RAIN                                              NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021121 SEAWINDS NOF* RAIN INDEX                                         NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021122 ATTENUATION CORRECTION OF SIGMA-0 (FROM TB)                      dB                         2       -10000  14 dB                        2         5
+ 021123 SEAWINDS NORMALIZED RADAR CROSS SECTION                          dB                         2       -30000  15 dB                        2         5
+ 021128 NUMBER OF VALID POINTS PER SECOND USED TO DERIVE PREVIOUS PARAME NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021130 SPECTRUM TOTAL ENERGY                                            NUMERIC                    6            0  28 NUMERIC                   6         9
+ 021131 SPECTRUM MAX ENERGY                                              NUMERIC                    6            0  28 NUMERIC                   6         9
+ 021132 DIRECTION OF SPECTRUM MAX ON HIGHER RESOLUTION GRID              DEGREE                     3            0  19 DEGREE                    3         6
+ 021133 WAVE-LENGTH OF SPECTRUM MAX ON HIGHER RESOLUTION GRID            M                          3            0  29 M                         3         9
+ 021134 RANGE RESOLUTION OF CRESS COVARIANCE SPECTRUM                    RAD/M                      3            0  19 RAD/M                     3         6
+ 021135 REAL PART OF CROSS SPECTRA POLAR GRID NUMBER OF BINS             NUMERIC                    3      -524288  20 NUMERIC                   3         7
+ 021136 IMAGINARY PART OF CROSS SPECTRA POLAR GRID NUMBER OF BINS        NUMERIC                    3      -524288  20 NUMERIC                   3         7
+ 021137 KU BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT                  dB                         2       -32768  16 dB                        2         5
+ 021138 STD KU BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT              dB                         2       -32768  16 dB                        2         5
+ 021139 KU BAND NET INSTRUMENTAL CORRECTION FOR AGC                      dB                         2        -2048  12 dB                        2         4
+ 021140 S BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT                   dB                         2       -32768  16 dB                        2         5
+ 021141 STD S BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT               dB                         2       -32768  16 dB                        2         5
+ 021142 S BAND NET INSTRUMENTAL CORRECTION FOR AGC                       dB                         2        -1024  11 dB                        2         4
+ 021143 KU BAND RAIN ATTENUATION                                         dB                         2  -1073741824  31 dB                        2        10
+ 021144 ALTIMETER RAIN FLAG                                              FLAG TABLE 21144           0            0   2 FLAG TABLE 21144          0         1
+ 021150 BEAM COLLOCATION                                                 CODE TABLE 21150           0            0   2 CODE TABLE 21150          0         1
+ 021151 ESTIMATED ERROR IN SIGMA0 AT 40DEG INCIDENCE ANGLE               dB                         2            0   9 dB                        2         3
+ 021152 SLOPE AT 40DEG INCIDENCE ANGLE                                   dB/DEG                     2          -80   7 dB/DEG                    2         3
+ 021153 ESTIMATED ERROR IN SLOPE AT 40DEG INCIDENCE ANGLE                dB/DEG                     2          -40   6 dB/DEG                    2         3
+ 021154 SOIL MOISTURE SENSITIVITY                                        dB                         2            0  12 dB                        2         4
+ 021155 WIND VECTOR CELL QUALITY                                         FLAG TABLE 21155           0            0  24 FLAG TABLE 21155          0         8
+ 021156 BACKSCATTER DISTANCE                                             NUMERIC                    1        -4096  13 NUMERIC                   1         4
+ 021157 LOSS PER UNIT LENGTH OF ATMOSPHERE USED                          dB/M                      10            0  22 dB/M                     10         7
+ 021158 ASCAT kp ESTIMATE QUALITY                                        CODE TABLE 21158           0            0   2 CODE TABLE 21158          0         1
+ 021159 ASCAT SIGMA-0 USABILITY                                          CODE TABLE 21159           0            0   2 CODE TABLE 21159          0         1
+ 021160 ASCAT USE OF SYNTHETIC DATA                                      NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021161 ASCAT SYNTHETIC DATA QUALITY                                     NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021162 ASCAT SATELLITE ORBIT AND ATTITUDE QUALITY                       NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021163 ASCAT SOLAR ARRAY REFLECTION CONTAMINATION                       NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021164 ASCAT TELEMETRY PRESENCE AND QUALITY                             NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021165 ASCAT EXTRAPOLATED REFERENCE FUNCTION PRESENCE                   NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021166 ASCAT LAND FRACTION                                              NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021193 NOISE FIGURE                                                     %                          0            0   7
+ 021194 BACKGROUND NOISE LEVEL                                           NUMERIC                    0            0   8
+ 021195 MISSING PACKET COUNTER                                           NUMERIC                    0         -127   8
+ 021196 UWA PRODUCT CONFIDENCE                                           FLAG TABLE 21196           0            0  12
+ 021197 UWI PRODUCT CONFIDENCE                                           FLAG TABLE 21197           0            0  12
+ 021198 dBZ-value offset (Alpha)                                         dBZ                        2        -6400  14
+ 021199 dBZ-VALUE INCREMENT (BETA)                                       dB                         1            0   7
+ 021200 HEIGHT OF CAPPI                                                  M                          0        -1000  15
+ 021201 RANGE-BIN SIZE                                                   M                          0            0  14
+ 021202 AZIMUTHAL RESOLUTION                                             DEGREE                     1            0   8
+ 021203 RANGE-BIN OFFSET                                                 M                         -1            0  14
+ 021204 aZIMUTH OFFSET                                                   M                          1            0  12
+ 021205 V-VALUE OFFSET (AV)                                              M/S                        2       -16384  15
+ 021206 V-VALUE INCREMENT (BV)                                           M/S                        2            0   8
+ 021207 W-VALUE OFFSET (AW)                                              M/S                        2            0  14
+ 021208 W-VALUE INCREMENT (BW)                                           M/S                        2            0   8
+ 021210 ALTITUDE CORRECTION (CALIBRATION CONSTANT)                       M                          3            0  11
+ 021211 OPEN LOOP CORRECTION (HTL)                                       M                          3            0  10
+ 021212 OPEN LOOP CORRECTION (AGC)                                       dB                         3        -3000  14
+ 021213 AMBIGUITY REMOVAL CONFIDENCE                                     %                          0            0   7
+ 021214 UAT QUALITY SUMMARY                                              CODE TABLE 21214           0            0   3
+ 021215 UAT ACROSS-TRACK BAND NO.                                        NUMERIC                    0            0   4
+ 021222 DOPPLER SPECTRUM 0 TH MOMENT (AMPLITUDE)                         dB                         0            0   7
+ 021225 PRESCAT PRODUCT CONFIDENCE                                       FLAG TABLE 21225           0            0   6
+ 021226 BACKSCATER DISTANCE                                              NUMERIC                    1        -4096  13
+ 021230 NUMBER OF VECTOR AMBIGUITIES                                     NUMERIC                    0            0   3
+ 021231 INDEX OF SELECTED WIND VECTOR                                    NUMERIC                    0            0   3
+ 021232 TOTAL NMBER OF SIGMA-0 MEASUREMENTS                              NUMERIC                    0            0   5
+ 021233 NUMBER OF SIGMA-0 USABLE FOR WIND                                NUMERIC                    0            0   5
+ 021234 LIKELIHOOD COMPUTED FOR SOLUTION                                 NUMERIC                    1       -10000  14
+ 021235 WIND VECTOR CELL QUALITY FLAG                                    FLAG TABLE 21235           0            0   3
+ 021236 NUMBER OF FORE-BEAM SIGMA-0                                      NUMERIC                    1            0   6
+ 021237 NUMBER OF MID-BEAM V-POL SIGMA-0                                 NUMERIC                    1            0   6
+ 021238 NUMBER OF MID-BEAM H-POL SIGMA-0                                 NUMERIC                    1            0   6
+ 021239 NUMBER OF AFT-BEAM SIGMA-0                                       NUMERIC                    1            0   6
+ 021240 NORMALIZED RADAR CROSS SECTION                                   NUMERIC                    2       -10000  14
+ 021241 Kp VARIANCE COEFFICIENT (ALPHA)                                  NUMERIC                    5            0  14
+ 021242 Kp VARIANCE COEFFICIENT (BETHA)                                  NUMERIC                    6            0  16
+ 021243 Kp VARIANCE COEFFICIENT (GAMMA)                                  NUMERIC                    6            0  16
+ 021244 SIGMA-0 QUALITY FLAG                                             FLAG TABLE 21244           0            0  15
+ 022001 DIRECTION OF WAVES                                               DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022002 DIRECTION OF WIND WAVES                                          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022003 DIRECTION OF SWELL WAVES                                         DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022004 DIRECTION OF CURRENT                                             DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022005 DIRECTION OF SEA SURFACE CURRENT                                 DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022011 PERIOD OF WAVES                                                  S                          0            0   6 S                         0         2
+ 022012 PERIOD OF WIND WAVES                                             S                          0            0   6 S                         0         2
+ 022013 PERIOD OF SWELL WAVES                                            S                          0            0   6 S                         0         2
+ 022021 HEIGHT OF WAVES                                                  M                          1            0  10 M                         1         4
+ 022022 HEIGHT OF WIND WAVES                                             M                          1            0  10 M                         1         4
+ 022023 HEIGHT OF SWELL WAVES                                            M                          1            0  10 M                         1         4
+ 022025 STANDARD DEVIATION WAVE HEIGHT                                   M                          2            0  10 M                         2         4
+ 022026 STANDARD DEVIATION OF SIGNIFICANT WAVE HEIGHT                    M                          2            0  10 M                         2         4
+ 022031 SPEED OF CURRENT                                                 M/S                        2            0  13 M/S                       2         4
+ 022032 SPEED OF SEA SURFACE CURRENT                                     M/S                        2            0  13 M/S                       2         4
+ 022035 TIDAL ELEVATION WITH RESPECT TO LOCAL CHART DATUM                M                          2            0  14 M                         2         4
+ 022036 METEOROLOGICAL RESIDUAL TIDAL ELEVATION (SURGE OR OFFSET)        M                          2            0  14 M                         2         4
+ 022037 TIDAL ELEVATION WITH RESPECT TO NATIONAL LAND DATUM              M                          3       -10000  15 M                         3         5
+ 022038 TIDAL ELEVATION WITH RESPECT TO LOCAL CHART DATUM                M                          3       -10000  15 M                         3         5
+ 022039 METEOROLOGICAL RESIDUAL TIDAL ELEVATION (SURGE OR OFFSET)        M                          3        -5000  12 M                         3         4
+ 022040 METEOROLOGICAL RESIDUAL TIDAL ELEVATION (SURGE OR OFFSET)        M                          3        -5000  14 M                         3         5
+ 022041 SEA-SURFACE TEMPERATURE (15-DAY RUNNING MEAN)                    K                          1            0  12 K                         1         4
+ 022042 SEA/WATER TEMPERATURE                                            K                          1            0  12 K                         1         4
+ 022043 SEA/WATER TEMPERATURE                                            K                          2            0  15 K                         2         5
+ 022044 SOUND VELOCITY                                                   M/S                        1            0  14 M/S                       1         5
+ 022045 SEA/WATER TEMPERATURE                                            K                          3            0  19 K                         3         6
+ 022049 SEA SURFACE TEMPERATURE                                          K                          2            0  15 K                         2         5
+ 022050 STANDARD DEVIATION SEA-SURFACE TEMPERATURE                       K                          2            0   8 K                         2         3
+ 022055 FLOAT CYCLE NUMBER                                               NUMERIC                    0            0  10 NUMERIC                   0         3
+ 022056 DIRECTION OF PROFILE                                             CODE TABLE 22056           0            0   2 CODE TABLE 22056          0         1
+ 022059 SEA SURFACE SALINITY                                             PART PER THOUSAND          2            0  14 PART PER THOUSAND         2         5
+ 022060 LAGRANGIAN DRIFTER DROGUE STATUS                                 CODE TABLE 22060           0            0   3 CODE TABLE 22060          0         1
+ 022061 STATE OF THE SEA                                                 CODE TABLE 22061           0            0   4 CODE TABLE 22061          0         2
+ 022062 SALINITY                                                         PART PER THOUSAND          2            0  14 PART PER THOUSAND         2         5
+ 022063 TOTAL WATER DEPTH                                                M                          0            0  14 M                         0         5
+ 022064 SALINITY                                                         PART PER THOUSAND          3            0  17 PART PER THOUSAND         3         6
+ 022065 WATER PRESSURE                                                   PA                        -3            0  17 PA                       -3         6
+ 022066 WATER CONDUCTIVITY                                               S M-1                      6            0  26 S M-1                     6         8
+ 022067 INSTRUMENT TYPE FOR WATER TEMPERATURE PROFILE MEASUREMENT        CODE TABLE 22067           0            0  10 CODE TABLE 22067          0         4
+ 022068 WATER TEMPERATURE PROFILE RECORDER TYPES                         CODE TABLE 22068           0            0   7 CODE TABLE 22068          0         3
+ 022069 SPECTRAL WAVE DENSITY                                            M2HZ-1                     3            0  22 M2HZ-1                    3         7
+ 022070 SIGNIFICANT WAVE HEIGHT                                          M                          2            0  13 M                         2         4
+ 022071 SPECTRAL PEAK WAVE PERIOD                                        S                          1            0   9 S                         1         3
+ 022072 SPECTRAL PEAK WAVE LENGTH                                        M                          0            0  13 M                         0         4
+ 022073 MAXIMUM WAVE HEIGHT                                              M                          2            0  13 M                         2         4
+ 022074 AVERAGE WAVE PERIOD                                              S                          1            0   9 S                         1         3
+ 022075 AVERAGE WAVE LENGTH                                              M                          0            0  13 M                         0         4
+ 022076 DIRECTION FROM WHICH DOMINANT WAVES ARE COMING                   DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022077 DIRECTIONAL SPREAD OF DOMINANT WAVE                              DEGREE                     0            0   9 DEGREE                    0         3
+ 022078 DURATION OF WAVE RECORD                                          S                          0            0  12 S                         0         4
+ 022079 LENGTH OF WAVE RECORD                                            M                          0            0  16 M                         0         5
+ 022080 WAVEBAND CENTRAL FREQUENCY                                       Hz                         3            0  10 Hz                        3         4
+ 022081 WAVEBAND CENTRAL WAVE NUMBER                                     1/M                        5            0  13 1/M                       5         4
+ 022082 MAXIMUM NON-DIRECTIONAL SPECTRAL WAVE DENSITY                    M**2S                      2            0  20 M**2S                     2         7
+ 022083 MAXIMUM NON-DIRECTIONAL SPECTRAL WAVE NUMBER                     M**3                       2            0  20 M**3                      2         7
+ 022084 BAND CONTAINING MAXIMUM NON- DIRECTIONAL SPECTRAL WAVE DENSITY   NUMERIC                    0            0   7 NUMERIC                   0         3
+ 022085 SPECTRAL WAVE DENSITY RATIO                                      NUMERIC                    0            0   7 NUMERIC                   0         3
+ 022086 MEAN DIRECTION FROM WHICH WAVES ARE COMING                       DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022087 PRINCIPAL DIRECTION FROM WHICH WAVES ARE COMING                  DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022088 FIRST NORMALIZED POLAR COORDINATE FROM FOURIER COEFFICIENTS      NUMERIC                    2            0   7 NUMERIC                   2         3
+ 022089 SECOND NORMALIZED POLAR COORDINATE FROM FOURIER COEFFICIENTS     NUMERIC                    2            0   7 NUMERIC                   2         3
+ 022090 NON-DIRECTIONAL SPECTRAL ESTIMATE BY WAVE FREQUENCY              M**2S                      2            0  20 M**2S                     2         7
+ 022091 NON-DIRECTIONAL SPECTRAL ESTIMATE BY WAVE NUMBER                 M**3                       2            0  20 M**3                      2         7
+ 022092 DIRECTIONAL SPECTRAL ESTIMATE BY WAVE FREQUENCY                  M**2S/RAD                  2            0  20 M**2S/RAD                 2         7
+ 022093 DIRECTIONAL SPECTRAL ESTIMATE BY WAVE NUMBER                     M**4                       2            0  20 M**4                      2         7
+ 022094 TOTAL NUMBER OF WAVE BANDS                                       NUMERIC                    0            0   7 NUMERIC                   0         3
+ 022095 DIRECTIONAL SPREAD OF INDIVIDUAL WAVES                           DEGREE                     0            0   8 DEGREE                    0         3
+ 022096 SPECTRAL BAND WIDTH                                              1/S                        3            0   4 1/S                       3         2
+ 022097 MEAN WAVELENGTH > 731 M OF IMAGE SPECTRUM AT LOW WAVE NUMBERS    M                          0            0  14 M                         0         5
+ 022098 WAVELENGTH SPREAD (WAVELENGTH > 731 M) AT LOW WAVE NUMBERS       M                          0            0  14 M                         0         5
+ 022099 MEAN DIRECTION AT LOW WAVE NUMBERS (WAVELENGTH > 731 M)          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022100 DIRECTION SPREAD AT LOW WAVE NUMBERS(WAVELENGTH > 731 M)         DEGREE                     0            0   9 DEGREE                    0         3
+ 022101 TOTAL ENERGY (WAVELENGTH > 731M) AT LOW WAVE NUMBERS             NUMERIC                    0            0  31 NUMERIC                   0        10
+ 022120 TIDE STATION AUTOMATED WATER LEVEL CHECK                         CODE TABLE 22120           0            0   5 CODE TABLE 22120          0         2
+ 022121 TIDE STATION MANUAL WATER LEVEL CHECK                            CODE TABLE 22121           0            0   5 CODE TABLE 22121          0         2
+ 022122 TIDE STATION AUTOMATED METEOROLOGICAL DATA CHECK                 CODE TABLE 22122           0            0   5 CODE TABLE 22122          0         2
+ 022123 TIDE STATION MANUAL METEOROLOGICAL DATA CHECK                    CODE TABLE 22123           0            0   5 CODE TABLE 22123          0         2
+ 022141 SEA-SURFACE TEMPERATURE (15-DAY RUNNING MEAN)                    K                          2            0  15 K                         2         5
+ 022150 NUMBER OF 18 HZ VALID POINTS FOR KU BAND                         NUMERIC                    0            0  10 NUMERIC                   0         4
+ 022151 KU BAND OCEAN RANGE                                              M                          3            0  31 M                         3        10
+ 022152 STD OF 18 HZ KU BAND OCEAN RANGE                                 M                          3            0  16 M                         3         5
+ 022153 NUMBER OF 18 HZ VALID POINTS FOR S BAND                          NUMERIC                    0            0  10 NUMERIC                   0         4
+ 022154 S BAND OCEAN RANGE                                               M                          3            0  31 M                         3        10
+ 022155 STD OF 18 HZ S BAND OCEAN RANGE                                  M                          3            0  16 M                         3         5
+ 022156 KU BAND SIGNIFICANT WAVE HEIGHT                                  M                          3            0  16 M                         3         5
+ 022157 STD 18HZ KU BAND SIGNIFICANT WAVE HEIGHT                         M                          3            0  16 M                         3         5
+ 022158 S BAND SIGNIFICANT WAVE HEIGHT                                   M                          3            0  16 M                         3         5
+ 022159 STD 18HZ S BAND SIGNIFICANT WAVE HEIGHT                          M                          3            0  16 M                         3         5
+ 022160 NORMALIZED INVERSE WAVE AGE                                      NUMERIC                    6            0  21 NUMERIC                   6         7
+ 022161 WAVE SPECTRA                                                     M**4                       4            0  27 M**4                      4         9
+ 022193 MEAN WAVENUMBER                                                  1/M                        5            0  15
+ 022194 PEAK WAVENUMBER                                                  1/M                        5            0  15
+ 022195 MEAN WAVE PROPAGATION DIRECTION                                  DEGREE                     1            0  13
+ 022196 PEAK WAVE PROPAGATION DIRECTION                                  DEGREE                     1            0  13
+ 022197 DIRECTION SPREAD                                                 DEGREE                     1            0  13
+ 022198 VARIANCE SPECTRAL DENSITY                                        M**2*S/RAD                 4            0  18
+ 022199 CORRELATION COEFF OF SIMULATED FG AND OBSERVED SAR SPECTRUM      NUMERIC                    4       -10000  15
+ 022200 CORRELATION COEFF OF SIMULATED BF AND OBSERVED SAR SPECTRUM      NUMERIC                    4       -10000  15
+ 022201 CORRELATION COEFF OF OCEAN WAVE FG AND EXTRACTED WAVE SPECTRUM   NUMERIC                    4       -10000  15
+ 022202 ERROR BETWEEN FIRST GUESS AND OBSERVED SAR                       NUMERIC                    5            0  21
+ 022203 ERROR BETWEEN SIMULATED AND OBSERVED SAR                         NUMERIC                    5            0  21
+ 022204 MEAN PERIOD OF WAVES                                             SECOND                     2            0  13
+ 022205 SPECTRAL DENSITY                                                 M**2*S/RAD                 4            0  25
+ 022206 PEAK PERIOD OF WAVES                                             SECOND                     2            0  13
+ 022207 MEAN WAVE PERIOD                                                 S                          1            0  10
+ 022208 PEAK PERIOD OF 1D SPECTRA                                        S                          1            0  10
+ 022209 COEFICIENT OF DRAG WITH WAVES                                    NUMERIC                    6            0  13
+ 022210 MEAN SQUARE SLOPE OF WAVES                                       NUMERIC                    4       -10000  14
+ 022211 COEFICIENT OF DRAG WITH WAVES                                    NUMERIC                    6            0  17
+ 022243 STANDARD DEVIATION SIGNIFICANT WAVE HEIGHT                       M                          2            0  10
+ 023001 ACCIDENT EARLY NOTIFICATION   ARTICLE APPLICABLE                 CODE TABLE 23001           0            0   3 CODE TABLE 23001          0         1
+ 023002 ACTIVITY OR FACILITY INVOLVED IN INCIDENT                        CODE TABLE 23002           0            0   5 CODE TABLE 23002          0         2
+ 023003 TYPE OF RELEASE                                                  CODE TABLE 23003           0            0   3 CODE TABLE 23003          0         1
+ 023004 COUNTERMEASURES TAKEN NEAR BORDER                                CODE TABLE 23004           0            0   3 CODE TABLE 23004          0         1
+ 023005 CAUSE OF INCIDENT                                                CODE TABLE 23005           0            0   2 CODE TABLE 23005          0         1
+ 023006 INCIDENT SITUATION                                               CODE TABLE 23006           0            0   3 CODE TABLE 23006          0         1
+ 023007 CHARACTERISTICS OF RELEASE                                       CODE TABLE 23007           0            0   3 CODE TABLE 23007          0         1
+ 023008 STATE OF CURRENT RELEASE                                         CODE TABLE 23008           0            0   2 CODE TABLE 23008          0         1
+ 023009 STATE OF EXPECTED RELEASE                                        CODE TABLE 23009           0            0   2 CODE TABLE 23009          0         1
+ 023016 POSSIBILITY OF SIGNIFICANT CHEMICAL TOXIC HEALTH EFFECT          CODE TABLE 23016           0            0   2 CODE TABLE 23016          0         1
+ 023017 FLOW DISCHARGE OF MAJOR RECIPIENT                                M**3/S                     6            0  20 M**3/S                    6         7
+ 023018 RELEASE BEHAVIOUR OVER TIME                                      CODE TABLE 23018           0            0   3 CODE TABLE 23018          0         1
+ 023019 ACTUAL RELEASE HEIGHT                                            M                          0       -15000  17 M                         0         6
+ 023021 EFFECTIVE RELEASE HEIGHT                                         M                          0       -15000  17 M                         0         6
+ 023022 DISTANCE OF RELEASE POINT OR SITE OF INCIDENT                    M                          0            0  24 M                         0         8
+ 023023 MAIN TRANSPORT SPEED IN THE ATMOSPHERE                           M/S                        1            0  12 M/S                       1         4
+ 023024 MAIN TRANSPORT SPEED IN WATER                                    M/S                        2            0  13 M/S                       2         4
+ 023025 MAIN TRANSPORT SPEED IN GROUND WATER                             M/S                        2            0  13 M/S                       2         4
+ 023027 MAIN TRANSPORT DIRECTION IN THE ATMOSPHERE                       DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 023028 MAIN TRANSPORT DIRECTION IN WATER                                DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 023029 MAIN TRANSPORT DIRECTION IN GROUND WATER                         DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 023031 POSSIBILITY THAT PLUME WILL ENCOUNTER PRECIPITATION IN STATE IN  CODE TABLE 23031           0            0   2 CODE TABLE 23031          0         1
+ 023032 PLUME WILL ENCOUNTER CHANGE IN WIND DIRECTION AND/OR SPEED FLAG  CODE TABLE 23032           0            0   2 CODE TABLE 23032          0         1
+ 024001 ESTIMATE OF AMOUNT OF RADIOACTIVITY RELEASED UP TO SPECIFIED TIM Bq                       -11            0  28 Bq                      -11         9
+ 024002 ESTIMATED MAXIMUM POTENTIAL RELEASE                              Bq                       -11            0  28 Bq                      -11         9
+ 024003 COMPOSITION OF RELEASE                                           CODE TABLE 24003           0            0   5 CODE TABLE 24003          0         2
+ 024004 ELEMENT NAME                                                     CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 024005 ISOTOPE MASS                                                     NUMERIC                    0            0   9 NUMERIC                   0         3
+ 024011 DOSE                                                             mSv                        2            0  32 mSv                       2        10
+ 024012 TRAJECTORY DOSE (DEFINED LOCATION AND EXPECTED TIME OF ARRIVAL)  mSv                        2            0  32 mSv                       2        10
+ 024013 GAMMA DOSE IN AIR ALONG THE MAIN TRANSPORT PATH (DEFINED LOCATIO mSv                        2            0  32 mSv                       2        10
+ 024021 AIR CONCENTRATION (OF NAMED ISOTOPE TYPE INCLUDING GROSS BETA)   Bq/M**3                    2            0  32 Bq/M**3                   2        10
+ 024022 CONCENTRATION IN PRECIPITATION (OF NAMES ISOTOPE TYPE)           Bq/L                       2            0  32 BQ L-1                    2        10
+ 024023 PULSE RATE OF BETA RADIATION                                     1/S                        1            0  14 1/S                       1         4
+ 024024 PULSE RATE OF GAMMA RADIATION                                    1/S                        1            0  14 1/S                       1         4
+ 025001 RANGE-GATE LENGTH                                                M                         -1            0   6 M                        -1         2
+ 025002 NUMBER OF GATES AVERAGED                                         NUMERIC                    0            0   4 NUMERIC                   0         2
+ 025003 NUMBER OF INTEGRATED PULSES                                      NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025004 ECHO PROCESSING                                                  CODE TABLE 25004           0            0   2 CODE TABLE 25004          0         1
+ 025005 ECHO INTEGRATION                                                 CODE TABLE 25005           0            0   2 CODE TABLE 25005          0         1
+ 025006 Z TO R CONVERSION                                                CODE TABLE 25006           0            0   3 CODE TABLE 25006          0         1
+ 025007 Z TO R CONVERSION FACTOR                                         NUMERIC                    0            0  12 NUMERIC                   0         4
+ 025008 Z TO R CONVERSION EXPONENT                                       NUMERIC                    2            0   9 NUMERIC                   2         3
+ 025009 CALIBRATION METHOD                                               FLAG TABLE 25009           0            0   4 FLAG TABLE 25009          0         2
+ 025010 CLUTTER TREATMENT                                                CODE TABLE 25010           0            0   4 CODE TABLE 25010          0         2
+ 025011 GROUND OCCULTATION CORRECTION (SCREENING)                        CODE TABLE 25011           0            0   2 CODE TABLE 25011          0         1
+ 025012 RANGE ATTENUATION CORRECTION                                     CODE TABLE 25012           0            0   2 CODE TABLE 25012          0         1
+ 025013 BRIGHT-BAND CORRECTION                                           FLAG TABLE 25013           0            0   2 FLAG TABLE 25013          0         1
+ 025014 AZIMUTH CLUTTER CUT-OFF (SEE NOTE 1)                             NUMERIC                    0            0  12 NUMERIC                   0         4
+ 025015 RADOME ATTENUATION CORRECTION                                    FLAG TABLE 25015           0            0   2 FLAG TABLE 25015          0         1
+ 025016 CLEAR-AIR ATTENUATION CORRECTION                                 dB/M                       5            0   6 dB/M                      5         2
+ 025017 PRECIPITATION ATTENUATION CORRECTION                             FLAG TABLE 25017           0            0   2 FLAG TABLE 25017          0         1
+ 025018 A TO Z LAW FOR ATTENUATION FACTOR                                NUMERIC                    7            0   6 NUMERIC                   7         2
+ 025019 A TO Z LAW FOR ATTENUATION EXPONENT                              NUMERIC                    2            0   7 NUMERIC                   2         3
+ 025020 MEAN SPEED ESTIMATION                                            CODE TABLE 25020           0            0   2 CODE TABLE 25020          0         1
+ 025021 WIND COMPUTATION ENHANCEMENT                                     FLAG TABLE 25021           0            0   8 FLAG TABLE 25021          0         3
+ 025025 BATTERY VOLTAGE                                                  V                          1            0   9 V                         1         3
+ 025026 BATTERY VOLTAGE (LARGE RANGE)                                    V                          1            0  12 V                         1         4
+ 025028 OPERATOR OR MANUFACTURER DEFINED PARAMETER                       NUMERIC                    1       -16384  15 NUMERIC                   1         5
+ 025030 RUNNING MEAN SEA-SURFACE TEMPERATURE USAGE                       CODE TABLE 25030           0            0   2 CODE TABLE 25030          0         1
+ 025032 WIND PROFILER MODE INFORMATION                                   CODE TABLE 25032           0            0   2 CODE TABLE 25032          0         1
+ 025033 WIND PROFILER SUBMODE INFORMATION*                               CODE TABLE 25033           0            0   2 CODE TABLE 25033          0         1
+ 025034 WIND PROFILER QUALITY CONTROL TEST RESULTS*                      FLAG TABLE 25034           0            0   4 FLAG TABLE 25034          0         2
+ 025036 ATMOSPHERICS LOCATION METHOD                                     CODE TABLE 25036           0            0   4 CODE TABLE 25036          0         2
+ 025040 CO2 WIND PRODUCT DERIVATION                                      CODE TABLE 25040           0            0   4 CODE TABLE 25040          0         2
+ 025041 MOVING PLATFORM DIRECTION REPORTING METHOD                       CODE TABLE 25041           0            0   2 CODE TABLE 25041          0         1
+ 025042 MOVING PLATFORM SPEED REPORTING METHOD                           CODE TABLE 25042           0            0   2 CODE TABLE 25042          0         1
+ 025043 WAVE SAMPLING INTERVAL (TIME)                                    S                          4            0  15 S                         4         5
+ 025044 WAVE SAMPLING INTERVAL (SPACE)                                   M                          2            0  14 M                         2         5
+ 025045 HIRS CHANNEL COMBINATION                                         FLAG TABLE 25045           0            0  21 FLAG TABLE 25045          0         7
+ 025046 MSU CHANNEL COMBINATION                                          FLAG TABLE 25046           0            0   5 FLAG TABLE 25046          0         2
+ 025047 SSU CHANNEL COMBINATION                                          FLAG TABLE 25047           0            0   4 FLAG TABLE 25047          0         2
+ 025048 AMSU-A CHANNEL COMBINATION                                       FLAG TABLE 25048           0            0  16 FLAG TABLE 25048          0         6
+ 025049 AMSU-B CHANNEL COMBINATION                                       FLAG TABLE 25049           0            0   6 FLAG TABLE 25049          0         2
+ 025051 AVHRR CHANNEL COMBINATION                                        FLAG TABLE 25051           0            0   7 FLAG TABLE 25051          0         3
+ 025052 LOG-10 OF PRINCIPAL COMPONENTS NORMALIZED FIT TO DATA            NUMERIC                    4            0  15 NUMERIC                   4         5
+ 025053 OBSERVATION QUALITY                                              FLAG TABLE 25053           0            0  12 FLAG TABLE 25053          0         4
+ 025054 SSMIS SUBFRAME ID NEMBER                                         NUMERIC                    0            0   5 NUMERIC                   0         2
+ 025055 MULTIPLEXER HOUSEKEEPING                                         K                          2            0  16 K                         2         5
+ 025060 SOFTWARE IDENTIFICATION (SEE NOTE 2)                             NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025061 SOFTWARE IDENTIFICATION AND VERSION NUMBER                       CCITTIA5                   0            0  96 CHARACTER                 0        12
+ 025062 DATABASE IDENTIFICATION                                          NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025065 ORIENTATION CORRECTION (AZIMUTH)                                 DEGREE                     2        -1000  11 DEGREE                    2         4
+ 025066 ORIENTATION CORRECTION (ELEVATION)                               DEGREE                     2        -1000  11 DEGREE                    2         4
+ 025067 RADIOSONDE RELEASE POINT PRESSURE CORRECTION                     PA                         0        -8000  14 PA                        0         4
+ 025068 NUMBER OF ARCHIVE RECOMPUTES                                     NUMERIC                    0            0   7 NUMERIC                   0         3
+ 025069 FLIGHT LEVEL PRESSURE CORRECTIONS                                FLAG TABLE 25069           0            0   8 FLAG TABLE 25069          0         3
+ 025070 MAJOR FRAME COUNT                                                NUMERIC                    0            0   4 NUMERIC                   0         2
+ 025071 FRAME COUNT                                                      NUMERIC                    0            0   5 NUMERIC                   0         2
+ 025075 SATELLITE ANTENNA CORRECTIONS VERSION NUMBER                     NUMERIC                    0            0   5 NUMERIC                   0         2
+ 025076 LOG-10 OF (TEMPERATURE-RADIANCE CENTRAL WAVENUMBER) FOR ATOVS    LOG (1/M)                  8            0  30 LOG (1/M)                 8        10
+ 025077 BANDWIDTH CORRECTION COEFFICIENT 1 FOR ATOVS                     NUMERIC                    5      -100000  18 NUMERIC                   5         7
+ 025078 BANDWIDTH CORRECTION COEFFICIENT 2 FOR ATOVS                     NUMERIC                    5            0  17 NUMERIC                   5         6
+ 025079 ALBEDO-RADIANCE SOLAR FILTERED IRRADIANCE FOR ATOVS              W/M**2                     4            0  24 W/M**2                    4         8
+ 025080 ALBEDO-RADIANCE EQUIVALENT FILTER WIDTH FOR ATOVS                M                         10            0  14 M                        10         5
+ 025085 FRACTION OF CLEAR PIXELS IN HIRS FOV                             NUMERIC                    0            0   7 NUMERIC                   0         3
+ 025086 DEPTH CORRECTION INDICATOR                                       CODE TABLE 25086           0            0   2 CODE TABLE 25086          0         1
+ 025091 STRUCTURE CONSTANT OF THE REFRACTION INDEX (CN2)                 dB                         3       -18192  13 dB                        3         5
+ 025092 ACOUSTIC PROPAGATION VELOCITY                                    M/S                        2        28000  14 M/S                       2         5
+ 025093 RASS COMPUTATION CORRECTION                                      FLAG TABLE 25093           0            0   8 FLAG TABLE 25093          0         3
+ 025095 ALTIMETER STATE FLAG                                             FLAG TABLE 25095           0            0   2 FLAG TABLE 25095          0         1
+ 025096 RADIOMETER STATE FLAG                                            FLAG TABLE 25096           0            0   5 FLAG TABLE 25096          0         2
+ 025097 THREE DIMENSIONAL ERROR ESTIMATE OF THE NAVIGATOR ORBIT          CODE TABLE 25097           0            0   4 CODE TABLE 25097          0         2
+ 025100 XBT/XCTD FALL RATE EQUATION COEFFICIENT A                        NUMERIC                    5            0  20 NUMERIC                   5         6
+ 025101 XBT/XCTD FALL RATE EQUATION COEFFICIENT B                        NUMERIC                    5      -500000  21 NUMERIC                   5         6
+ 025102 NUMBER OF MISSING LINES EXCLUDING DATA GAPS                      NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025103 NUMBER OF DIRECTIONAL BINS                                       NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025104 NUMBER OF WAVE-LENGTH BINS                                       NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025107 FIRST WAVE-LENGTH BIN                                            M                          3            0  29 M                         3         9
+ 025108 LAST WAVE-LENGTH BIN                                             M                          3            0  29 M                         3         9
+ 025111 NUMBER OF INPUT DATA GAPS                                        NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025120 RA2-L2-PROCESSING FLAG                                           CODE TABLE 25120           0            0   2 CODE TABLE 25120          0         1
+ 025121 RA2-L2-PROCESSING QUALITY                                        %                          0            0   7 %                         0         3
+ 025122 HARDWARE CONFIGURATION FOR RF                                    CODE TABLE 25122           0            0   2 CODE TABLE 25122          0         1
+ 025123 HARDWARE CONFIGURATION FOR HPA                                   CODE TABLE 25123           0            0   2 CODE TABLE 25123          0         1
+ 025124 MWR L2 PROCESSING FLAG                                           CODE TABLE 25124           0            0   2 CODE TABLE 25124          0         1
+ 025125 MWR L2-PROCESSING QUALITY                                        %                          0            0   7 %                         0         3
+ 025126 MODEL DRY TROPOSPHERIC CORRECTION                                M                          3       -32768  16 M                         3         5
+ 025127 INVERTED BAROMETER CORRECTION                                    M                          3       -32768  16 M                         3         5
+ 025128 MODEL WET TROPOSPHERIC CORRECTION                                M                          3       -32768  16 M                         3         5
+ 025129 MWR DERIVED WET TROPOSPHERIC CORRECTION                          M                          3       -32768  16 M                         3         5
+ 025130 RA2 IONOSPHERIC CORRECTION ON KU BAND                            M                          3       -32768  16 M                         3         5
+ 025131 IONOSPHERIC CORRECTION FROM DORIS ON KU BAND                     M                          3       -32768  16 M                         3         5
+ 025132 IONOSPHERIC CORRECTION FROM MODEL ON KU BAND                     M                          3       -32768  16 M                         3         5
+ 025133 SEA STATE BIAS CORRECTION ON KU BAND                             M                          3       -32768  16 M                         3         5
+ 025134 RA2 IONOSPHERIC CORRECTION ON S BAND                             M                          3       -32768  16 M                         3         5
+ 025135 IONOSPHERIC CORRECTION FROM DORIS ON S BAND                      M                          3       -32768  16 M                         3         5
+ 025136 IONOSPHERIC CORRECTION FROM MODEL ON S BAND                      M                          3       -32768  16 M                         3         5
+ 025137 SEA STATE BIAS CORRECTION ON S BAND                              M                          3       -32768  16 M                         3         5
+ 025138 AVERAGE SIGNAL TO NOISE RATION                                   NUMERIC                    0        -2048  12 NUMERIC                   0         4
+ 025140 START CHANNEL                                                    NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025141 END CHANNEL                                                      NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025142 CHANNEL SCALE FACTOR                                             NUMERIC                    0            0   6 NUMERIC                   0         2
+ 025143 20 LAYER AVERAGING KERNEL                                        NUMERIC                    6     -5000000  24 NUMERIC                   6         8
+ 025150 SATELLITE INTENSITY ANALYSIS METHOD OF TROPICAL CYCLONE          CODE TABLE 25150           0            0   4 CODE TABLE 25150          2         2
+ 025192 Accumulation method                                              Code-Table                 0            0   8
+ 025193 Adjustment factor                                                Numeric                    2            0  10
+ 025194 MAJOR FRAME COUNT                                                NUMERIC                    0            0   4
+ 025197 ANTENNA CORRECTIONS VERSION NUMBER                               NUMERIC                    0            0   5
+ 025198 LOG (TEMP-RAD CENTRAL WAVE NUMBER)                               1/M                        8            0  30
+ 025199 BANDWIDTH CORRECTION COEFFICIENT 1                               NUMERIC                    4       -10000  15
+ 025200 BANDWIDTH CORRECTION COEFFICIENT 2                               NUMERIC                    5            0  17
+ 025201 ALBEDO-RAD SOLAR FILTERED IRRADIANCE                             NUMERIC                    4            0  24
+ 025202 ALBEDO-RAD EQUIVALENT FILTER WIDTH                               NUMERIC                   10            0  14
+ 025203 SCAN LINE STATUS FLAGS FOR ATOVS                                 FLAG TABLE 25203           0            0  31
+ 025204 SCAN LINE QUALITY FLAGS FOR ATOVS                                FLAG TABLE 25204           0            0  31
+ 025205 CHANNEL QUALITY FLAGS FOR ATOVS                                  FLAG TABLE 25205           0            0  31
+ 025206 FOV QUALITY FLAGS FOR ATOVS                                      FLAG TABLE 25206           0            0  31
+ 026001 PRINCIPAL TIME OF DAILY READING IN UTC OF MAXIMUM TEMPERATURE    HOUR                       1            0  12 HOUR                      1         3
+ 026002 PRINCIPAL TIME OF DAILY READING IN UTC OF MINIMUM TEMPERATURE    HOUR                       1            0  12 HOUR                      1         3
+ 026003 TIME DIFFERENCE                                                  MINUTE                     0        -1440  12 MINUTE                    0         4
+ 026010 HOURS INCLUDED                                                   FLAG TABLE 26010           0            0  26 FLAG TABLE 26010          0         9
+ 026020 DURATION OF PRECIPITATION                                        MINUTE                     0            0  11 MINUTE                    0         4
+ 026193 YEAR                                                             YEAR                       0            0  12
+ 026194 MONTH                                                            MONTH                      0            0   4
+ 026195 DAY                                                              DAY                        0            0   6
+ 026196 HOUR                                                             HOUR                       0            0   5
+ 026197 MINUTE                                                           MINUTE                     0            0   6
+ 026198 SECOND                                                           SECOND                     0            0   6
+ 026200 LOCATION WITHIN ASSIMILATION WINDOW IN TIME                      NUMERIC                    6            0  20
+ 026201 HOURS INCLUDED                                                   FLAG TABLE 26201           0            0  26
+ 027001 LATITUDE (HIGH ACCURACY)                                         DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 027002 LATITUDE (COARSE ACCURACY)                                       DEGREE                     2        -9000  15 DEGREE                    2         4
+ 027003 ALTERNATE LATITUDE (COARSE ACCURACY)                             DEGREE                     2        -9000  15 DEGREE                    2         4
+ 027004 ALTERNATE LATITUDE (HIGH ACCURACY)                               DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 027020 SATELLITE LOCATION COUNTER                                       NUMERIC                    0            0  16 NUMERIC                   0         5
+ 027021 SATELLITE SUBLOCATION DIMENSION                                  NUMERIC                    0            0  16 NUMERIC                   0         5
+ 027031 IN DIRECTION OF 0 DEGREES LONGITUDE, DISTANCE FROM THE EARTH'S C M                          2  -1073741824  31 M                         2        10
+ 027080 VIEWING AZIMUTH ANGLE                                            DEGREE TRUE                2            0  16 DEGREE TRUE               0         5
+ 027193 SOLAR AZIMUTH                                                    DEGREE TRUE                2            0  16
+ 028001 LONGITUDE (HIGH ACCURACY)                                        DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 028002 LONGITUDE (COARSE ACCURACY)                                      DEGREE                     2       -18000  16 DEGREE                    2         5
+ 028003 ALTERNATE LONGITUDE (COARSE ACCURACY)                            DEGREE                     2       -18000  16 DEGREE                    2         5
+ 028004 ALTERNATE LONGITUDE (HIGH ACCURACY)                              DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 028031 IN DIRECTION 90 DEGREES EAST, DISTANCE FROM THE EARTH'S CENTRE   M                          2  -1073741824  31 M                         2        10
+ 029001 PROJECTION TYPE                                                  CODE TABLE 29001           0            0   3 CODE TABLE 29001          0         1
+ 029002 CO-ORDINATE GRID TYPE                                            CODE TABLE 29002           0            0   3 CODE TABLE 29002          0         1
+ 029192 TYPE OF ROTATION ELLIPSOID                                       CODE TABLE 29192           0            0   3
+ 029193 LONG ORIGIN                                                      DEGREE                     2       -18000  16
+ 029194 LAT ORIGIN                                                       DEGREE                     2        -9000  15
+ 029195 X-OFFSET                                                         M                          0    -33554432  26
+ 029196 Y-OFFSET                                                         M                          0    -33554432  26
+ 029197 STANDARD PARALLEL 1                                              DEGREE                     2        -9000  15
+ 029198 STANDARD PARALLEL 2                                              DEGREE                     2        -9000  15
+ 029199 SEMI-MAJOR AXIS OF ROTATION ELIPSOID                             M                          0            0  26
+ 029200 SEMI-MINOR AXIS OF ROTATION ELIPSOID                             M                          0            0  26
+ 029201 PROJECTION TYPE                                                  CODE TABLE 29201           0            0   5
+ 029202 AZIMUTH OF INITIAL LINE                                          DEGREE                     2        -9000  15
+ 029203 Long Origin                                                      Degree                     5    -18000000  26
+ 029204 Lat Origin                                                       Degree                     5     -9000000  25
+ 029205 Geographic projection as PROJ initialization string              CCITT IA5                  0            0 800
+ 030001 PIXEL VALUE (4 BITS)                                             NUMERIC                    0            0   4 NUMERIC                   0         2
+ 030002 PIXEL VALUE (8 BITS)                                             NUMERIC                    0            0   8 NUMERIC                   0         3
+ 030004 PIXEL VALUE (16 BITS)                                            NUMERIC                    0            0  16 NUMERIC                   0         5
+ 030021 NUMBER OF PIXELS PER ROW                                         NUMERIC                    0            0  12 NUMERIC                   0         4
+ 030022 NUMBER OF PIXELS PER COLUMN                                      NUMERIC                    0            0  12 NUMERIC                   0         4
+ 030031 PICTURE TYPE                                                     CODE TABLE 30031           0            0   4 CODE TABLE 30031          0         2
+ 030032 COMBINATION WITH OTHER DATA                                      FLAG TABLE 30032           0            0  16 FLAG TABLE 30032          0         6
+ 030192 NORTH SOUTH VIEW ORGANISATION                                    CODE TABLE 30192           0            0   3
+ 030193 EAST WEST VIEW ORGANISATION                                      CODE TABLE 30193           0            0   3
+ 030194 Number of bins along the radial                                  Numeric                    0            0  12
+ 030195 Number of azimuths                                               Numeric                    0            0  11
+ 030196 Type of product                                                  Code-Table                 0            0   8
+ 030197 Compression method                                               Code-Table                 0            0   8
+ 030198 Byte element of a compressed array                               Numeric                    0            0   8
+ 031000 SHORT DELAYED DESCRIPTOR REPLICATION FACTOR                      NUMERIC                    0            0   1 NUMERIC                   0         1
+ 031001 DELAYED DESCRIPTOR REPLICATION FACTOR                            NUMERIC                    0            0   8 NUMERIC                   0         3
+ 031002 EXTENDED DELAYED DESCRIPTOR REPLICATION FACTOR                   NUMERIC                    0            0  16 NUMERIC                   0         5
+ 031011 DELAYED DESCRIPTOR AND DATA REPETITION FACTOR                    NUMERIC                    0            0   8 NUMERIC                   0         3
+ 031012 EXTENDED DELAYED DESCRIPTOR AND DATA REPETITION FACTOR           NUMERIC                    0            0  16 NUMERIC                   0         5
+ 031021 ASSOCIATED FIELD SIGNIFICANCE                                    CODE TABLE 31021           0            0   6 CODE TABLE 31021          0         2
+ 031031 DATA PRESENT INDICATOR                                           FLAG TABLE 31031           0            0   1 FLAG TABLE 31031          0         1
+ 033002 QUALITY INFORMATION                                              CODE TABLE 33002           0            0   2 CODE TABLE 33002          0         1
+ 033003 QUALITY INFORMATION                                              CODE TABLE 33003           0            0   3 CODE TABLE 33003          0         1
+ 033005 QUALITY INFORMATION (AWS DATA)                                   FLAG TABLE 33005           0            0  30 FLAG TABLE 33005          0        10
+ 033006 INTERNAL MEASUREMENT STATUS INFORMATION (AWS)                    CODE TABLE 33006           0            0   3 CODE TABLE 33006          0         1
+ 033007 PER CENT CONFIDENCE                                              %                          0            0   7 %                         0         3
+ 033009 RELATIVE ERROR                                                   %                          6            0  20 %                         0         7
+ 033015 DATA QUALITY CHECK INDICATOR                                     CODE TABLE 33015           0            0   6 CODE TABLE 33015          0         2
+ 033020 QUALITY CONTROL INDICATION OF FOLLOWING VALUE                    CODE TABLE 33020           0            0   3 CODE TABLE 33020          0         1
+ 033021 QUALITY OF FOLLOWING VALUE                                       CODE TABLE 33021           0            0   2 CODE TABLE 33021          0         1
+ 033022 QUALITY OF BUOY SATELLITE TRANSMISSION                           CODE TABLE 33022           0            0   2 CODE TABLE 33022          0         1
+ 033023 QUALITY OF BUOY LOCATION                                         CODE TABLE 33023           0            0   2 CODE TABLE 33023          0         1
+ 033024 STATION ELEVATION QUALITY MARK (FOR MOBILE STATIONS)             CODE TABLE 33024           0            0   4 CODE TABLE 33024          0         2
+ 033025 ACARS INTERPOLATED VALUES                                        CODE TABLE 33025           0            0   3 CODE TABLE 33025          0         1
+ 033026 MOISTURE QUALITY                                                 CODE TABLE 33026           0            0   6 CODE TABLE 33026          0         2
+ 033027 LOCATION QUALITY CLASS (RANGE OF RADIUS OF 66 % CONFIDENCE)      CODE TABLE 33027           0            0   3 CODE TABLE 33027          0         1
+ 033030 SCAN LINE STATUS FLAGS FOR ATOVS                                 FLAG TABLE 33030           0            0  24 FLAG TABLE 33030          0         8
+ 033031 SCAN LINE QUALITY FLAGS FOR ATOVS                                FLAG TABLE 33031           0            0  24 FLAG TABLE 33031          0         8
+ 033032 CHANNEL QUALITY FLAGS FOR ATOVS                                  FLAG TABLE 33032           0            0  24 FLAG TABLE 33032          0         8
+ 033033 FIELD OF VIEW QUALITY FLAGS FOR ATOVS                            FLAG TABLE 33033           0            0  24 FLAG TABLE 33033          0         8
+ 033035 MANUAL/AUTOMATIC QUALITY CONTROL                                 CODE TABLE 33035           0            0   4 CODE TABLE 33035          0         2
+ 033036 NOMINAL CONFIDENCE THRESHOLD                                     %                          0            0   7 %                         0         3
+ 033037 WIND CORRELATION ERROR                                           FLAG TABLE 33037           0            0  20 FLAG TABLE 33037          0         7
+ 033038 QUALITY FLAGS FOR GROUND-BASED GNSS DATA                         FLAG TABLE 33038           0            0  10 FLAG TABLE 33038          0         4
+ 033039 QUALITY FLAGS FOR RADIO OCCULTATION DATA                         FLAG TABLE 33039           0            0  16 FLAG TABLE 33039          0         6
+ 033040 CONFIDENCE INTERVAL                                              %                          0            0   7 PERCENT                   0         3
+ 033041 ATTRIBUTE OF FOLLOWING VALUE                                     CODE TABLE 33041           0            0   2 CODE TABLE 33041          0         1
+ 033042 TYPE OF LIMIT REPRESENTED BY FOLLOWING VALUE                     CODE TABLE 33042           0            0   3 CODE TABLE 33042          0         1
+ 033043 AST CONFIDENCE                                                   FLAG TABLE 33043           0            0   8 FLAG TABLE 33043          0         3
+ 033044 ASAR QUALITY INFORMATION                                         FLAG TABLE 33044           0            0  15 FLAG TABLE 33044          0         5
+ 033045 PROBABILITY OF FOLLOWING EVENT                                   %                          0            0   7 %                         0         3
+ 033046 CONDITIONAL PROBABILITY OF FOLLOWING EVENT WITH RESPECT TO SPECI %                          0            0   7 %                         0         3
+ 033047 MEASUREMENT CONFIDENCE DATA                                      FLAG TABLE 33047           0            0  31 FLAG TABLE 33047          0        11
+ 033048 CONFIDENCE MEASURE OF SAR INVERSION                              CODE TABLE 33048           0            0   2 CODE TABLE 33048          0         1
+ 033049 CONFIDENCE MEASURE OF WIND RETRIEVAL                             CODE TABLE 33049           0            0   2 CODE TABLE 33049          0         1
+ 033050 GLOBAL GTSPP QUALITY FLAG                                        CODE TABLE 33050           0            0   4 CODE TABLE 33050          0         2
+ 033052 S BAND OCEAN RETRACKING QUALITY                                  FLAG TABLE 33052           0            0  21 FLAG TABLE 33052          0         7
+ 033053 KU BAND OCEAN RETRACKING QUALITY                                 FLAG TABLE 33053           0            0  21 FLAG TABLE 33053          0         7
+ 033060 GQISFLAGQUAL-INDIVIDUAL IASI-SYSTEM QUALITY FLAG                 CODE TABLE 33060           0            0   2 CODE TABLE 33060          0         1
+ 033061 GQISQUALINDEX - INDICATOR FOR INSTRUMENT NOISE PERFORMANCE       %                          0            0   7 %                         0         3
+ 033062 GQISQUALINDEXLOC - INDICATOR FOR GEOMETRIC QUALITY INDEX         %                          0            0   7 %                         0         3
+ 033063 GQISQUALINDEXRAD - INDICATOR FOR INSTRUMENT NOISE PERFORMANCE    %                          0            0   7 %                         0         3
+ 033064 GQISQUALINDEXSPECT - INDICATOR FOR INSTRUMENT NOISE PERFORMANCE  %                          0            0   7 %                         0         3
+ 033065 GQISSYSTECSONDQUAL - OUTPUT OF SYSTEM TEC QUALITY FUNCTION       NUMERIC                    0            0  24 NUMERIC                   0        24
+ 033066 SBUV TOTAL OZONE QUALITY                                         CODE TABLE 33066           0            0   4 CODE TABLE 33066          0         2
+ 033067 SBUV PROFILE OZONE QUALITY                                       CODE TABLE 33067           0            0   4 CODE TABLE 33067          0         2
+ 033070 TOTAL OZONE QUALITY                                              CODE TABLE 33070           0            0   4 CODE TABLE 33070          0         2
+ 033071 PROFILE OZONE QUALITY                                            CODE TABLE 33071           0            0   4 CODE TABLE 33071          0         2
+ 033193 DATA QUALITY 3 BIT CODE                                          CODE TABLE 33193           0            0   3
+ 033194 DATA QUALITY 2 BIT CODE                                          CODE TABLE 33194           0            0   2
+ 033195 ECMWF SAR QC INDICATOR                                           CODE TABLE 33195           0            0   5
+ 033196 ECMWF WAM QC INDICATOR                                           CODE TABLE 33196           0            0   2
+ 033197 ECMWF SAR INVERSION QC INDICATOR                                 CODE TABLE 33197           0            0   3
+ 033198 MINIMUM COST                                                     NUMERIC                    4            0  14
+ 033199 1D VAR TOTAL PRECIPITABLE WATER RETRIEVED ERROR(S)               KG/M**2                    2            0  11
+ 033200 ANALYSIS REPORT EVENTS                                           FLAG TABLE 33200           0            0  31
+ 033201 ANALYSIS REPORT STATUS EVENT                                     FLAG TABLE 33201           0            0  13
+ 033202 ANALYSIS DATUM EVENT FLAGS (1)                                   FLAG TABLE 33202           0            0  31
+ 033203 ANALYSIS DATUM EVENT FLAGS (2)                                   FLAG TABLE 33203           0            0  11
+ 033204 ANALYSIS DATUM STATUS FLAGS                                      FLAG TABLE 33204           0            0  21
+ 033205 VARIATIONAL ANALYSIS BLACK LIST FLAG                             CODE TABLE 33205           0            0   4
+ 033206 VARIATIONAL ANALYSIS QUALITY CONTROL FLAG                        CODE TABLE 33206           0            0   4
+ 033207 VARIATIONAL ANALYSIS DEPARTURE FLAG                              CODE TABLE 33207           0            0   4
+ 033208 VARIATIONAL ANALYSIS FIRST QUESS CHECK FLAG                      CODE TABLE 33208           0            0   4
+ 033209 VARIATIONAL ANALYSIS FINAL FLAG                                  CODE TABLE 33209           0            0   4
+ 033210 INCREMENTAL VARIATIONAL ANALYSIS UPDATE NUMBER                   NUMERIC                    0            0   7
+ 033211 MINIMISATION SIMULATION NUMBER                                   NUMERIC                    0            0  10
+ 033212 1D VAR ITERATION NUMBER                                          NUMERIC                    0            0  10
+ 033213 1D VAR RADIANCE COST                                             NUMERIC                    1        -1000  11
+ 033214 1D VAR ERROR(S)                                                  FLAG TABLE 33214           0            0  11
+ 033215 DIRECTIONAL SKILL                                                NUMERIC                    1        -4096  13
+ 033216 1D VAR SURFACE TYPE QUALITY CONTROL                              CODE TABLE 33216           0            0   3
+ 033217 1D VAR FAILURE INDICATOR                                         CODE TABLE 33217           0            0   2
+ 033218 1D VAR ESTIMATE OF SCATTERING                                    NUMERIC                    2            0  12
+ 033219 SSMI INDIPENDENT SCATTERING INDEX                                NUMERIC                    2       -50000  16
+ 033220 VARIATIONAL ANALYSIS REPORT EVENTS (1)                           FLAG TABLE 33220           0            0  31
+ 033221 VARIATIONAL ANALYSIS SYNOP EVENTS (2)                            FLAG TABLE 33221           0            0  31
+ 033222 VARIATIONAL ANALYSIS AIREP EVENTS (2)                            FLAG TABLE 33222           0            0  31
+ 033223 VARIATIONAL ANALYSIS SATOB EVENTS (2)                            FLAG TABLE 33223           0            0  31
+ 033224 VARIATIONAL ANALYSIS DRIBU EVENTS (2)                            FLAG TABLE 33224           0            0  31
+ 033225 VARIATIONAL ANALYSIS TEMP EVENTS (2)                             FLAG TABLE 33225           0            0  31
+ 033226 VARIATIONAL ANALYSIS PILOT EVENTS (2)                            FLAG TABLE 33226           0            0  31
+ 033227 VARIATIONAL ANALYSIS SATEM/TOVS EVENTS (2)                       FLAG TABLE 33227           0            0  31
+ 033228 VARIATIONAL ANALYSIS PAOB EVENTS (2)                             FLAG TABLE 33228           0            0  31
+ 033229 VARIATIONAL ANALYSIS SCATTEROMETER EVENTS (2)                    FLAG TABLE 33229           0            0  31
+ 033230 VARIATIONAL ANALYSIS RAW RADIANCES EVENTS (2)                    FLAG TABLE 33230           0            0  31
+ 033231 PRESAT SUMMARY FLAGS                                             FLAG TABLE 33231           0            0   6
+ 033232 REPORT BLACK LIST EVENTS                                         FLAG TABLE 33232           0            0  31
+ 033233 VARIATIONAL ANALYSIS REPORT STATUS                               FLAG TABLE 33233           0            0  31
+ 033234 VARIATIONAL ANALYSIS DATUM STATUS                                FLAG TABLE 33234           0            0  31
+ 033236 VARIATIONAL ANALYSIS DATUM EVENTS (1)                            FLAG TABLE 33236           0            0  31
+ 033237 VARIATIONAL ANALYSIS SYNOP DATUM EVENTS (2)                      FLAG TABLE 33237           0            0  31
+ 033238 VARIATIONAL ANALYSIS AIREP DATUM EVENTS (2)                      FLAG TABLE 33238           0            0  31
+ 033239 VARIATIONAL ANALYSIS SATOB DATUM EVENTS (2)                      FLAG TABLE 33239           0            0  31
+ 033240 VARIATIONAL ANALYSIS DRIBU DATUM EVENTS (2)                      FLAG TABLE 33240           0            0  31
+ 033241 GROSS ERROR PROBABILITY                                          NUMERIC                    3            0  10
+ 033242 GROSS ERROR INDICATOR                                            CODE TABLE 33242           0            0   2
+ 033243 VARIATIONAL ANALYSIS TEMP DATUM EVENTS (2)                       FLAG TABLE 33243           0            0  31
+ 033244 VARIATIONAL ANALYSIS PILOT DATUM EVENTS (2)                      FLAG TABLE 33244           0            0  31
+ 033245 VARIATIONAL ANALYSIS SATEM/TOVS DATUM EVENTS (2)                 FLAG TABLE 33245           0            0  31
+ 033246 VARIATIONAL ANALYSIS PAOB DATUM EVENTS (2)                       FLAG TABLE 33246           0            0  31
+ 033247 VARIATIONAL ANALYSIS SCATTEROMETER DATUM EVENTS (2)              FLAG TABLE 33247           0            0  31
+ 033248 VARIATIONAL ANALYSIS RAW RADIANCES DATUM EVENTS (2)              FLAG TABLE 33248           0            0  31
+ 033249 DATUM BLACK LIST EVENTS                                          FLAG TABLE 33249           0            0  31
+ 033250 PROBABILITY OF GROSS ERROR                                       NUMERIC                    6            0  20
+ 033251 RANGE OF POSSIBLE VALUES                                         NUMERIC                    2            0  14
+ 033252 MANUAL-AUTOMATIC QUALITY CONTROL                                 CODE TABLE 33252           0            0   4
+ 033253 NOMINAL CONFIDENCE THRESHOLD                                     %                          0            0   7
+ 033254 WIND CORRELATION METHOD                                          FLAG TABLE 33254           0            0  20
+ 035000 FM AND REGIONAL CODE NUMBER                                      CODE TABLE 35000           0            0  10 CODE TABLE 35000          0         3
+ 035001 TIME-FRAME FOR MONITORING                                        CODE TABLE 35001           0            0   3 CODE TABLE 35001          0         1
+ 035011 NUMBER OF REPORTS ACTUALLY RECEIVED                              NUMERIC                    0            0  14 NUMERIC                   0         4
+ 035021 BULLETIN BEING MONITORED (TTAAII)                                CCITTIA5                   0            0  48 CHARACTER                 0         6
+ 035022 BULLETIN BEING MONITORED (YYGGGG)                                CCITTIA5                   0            0  48 CHARACTER                 0         6
+ 035023 BULLETIN BEING MONITORED (CCCC)                                  CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 035024 BULLETIN BEING MONITORED (BBB)                                   CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 035030 DISCREPANCIES IN THE AVAILABILITY OF EXPECTED DATA               CODE TABLE 35030           0            0   4 CODE TABLE 35030          0         1
+ 035031 QUALIFIER ON MONITORING RESULTS                                  CODE TABLE 35031           0            0   7 CODE TABLE 35031          0         2
+ 035032 CAUSE OF MISSING DATA                                            CODE TABLE 35032           0            0   4 CODE TABLE 35032          0         1
+ 035033 OBSERVATION AND COLLECTION DEFICIENCIES                          CODE TABLE 35033           0            0   7 CODE TABLE 35033          0         2
+ 035034 STATISTICAL TRENDS FOR AVAILABILITY OF DATA (DURING THE SURVEY P CODE TABLE 35034           0            0   3 CODE TABLE 35034          0         1
+ 035035 REASON FOR TERMINATION                                           CODE TABLE 35035           0            0   5 CODE TABLE 35035          0         2
+ 040001 SURFACE SOIL MOISTURE (MS)                                       %                          1            0  10 %                         1         4
+ 040002 ESTIMATED ERROR IN SURFACE SOIL MOISTURE                         %                          1            0  10 %                         1         4
+ 040003 MEAN SURFACE SOIL MOISTURE                                       NUMERIC                    3            0  10 NUMERIC                   3         4
+ 040004 RAIN FALL DETECTION                                              NUMERIC                    3            0  10 NUMERIC                   3         4
+ 040005 SOIL MOISTURE CORRECTION FLAG                                    FLAG TABLE 40005           0            0   8 FLAG FLAG TABLE 40005     0         3
+ 040006 SOIL MOISTURE PROCESSING FLAG                                    FLAG TABLE 40006           0            0  16 FLAG FLAG TABLE 40006     0         5
+ 040007 SOIL MOISTURE QUALITY                                            %                          1            0  10 %                         1         4
+ 040008 FROZEN LAND SURFACE FRACTION                                     %                          1            0  10 %                         1         4
+ 040009 INUNDATION AND WETLAND FRACTION                                  %                          1            0  10 %                         1         4
+ 040010 TOPOGRAPHIC COMPLEXITY                                           %                          1            0  10 %                         1         4
+ 049193 SAR INVERSION QC FLAGS                                           FLAG TABLE 49193           0            0  15
+ 049194 ALTIMETER WAVE HEIGHT QC FLAFS                                   FLAG TABLE 49194           0            0  15
diff --git a/src/OperaRadar/B0000000065535002004.TXT b/src/OperaRadar/B0000000065535002004.TXT
new file mode 100644
index 0000000..a6b1fc6
--- /dev/null
+++ b/src/OperaRadar/B0000000065535002004.TXT
@@ -0,0 +1,1477 @@
+ 000001 TABLE A:  ENTRY                                                  CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000002 TABLE A:  DATA CATEGORY DESCRIPTION, LINE 1                      CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000003 TABLE A:  DATA CATEGORY DESCRIPTION, LINE 2                      CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000004 BUFR/CREX MASTER TABLE                                           CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000005 BUFR/CREX EDITION NUMBER                                         CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000006 BUFR MASTER TABLE VERSION NUMBER                                 CCITTIA5                   0            0  16 CHARACTER                 0         2 
+ 000007 CREX MASTER TABLE VERSION NUMBER                                 CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000008 BUFR LOCAL TABLE VERSION NUMBER                                  CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000010 F DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0   8 CHARACTER                 0         1
+ 000011 X DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 000012 Y DESCRIPTOR TO BE ADDED OR DEFINED                              CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000013 ELEMENT NAME, LINE 1                                             CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000014 ELEMENT NAME, LINE 2                                             CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 000015 UNITS NAME                                                       CCITTIA5                   0            0 192 CHARACTER                 0        24
+ 000016 UNITS SCALE SIGN                                                 CCITTIA5                   0            0   8 CHARACTER                 0         1
+ 000017 UNITS SCALE                                                      CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000018 UNITS REFERENCE SIGN                                             CCITTIA5                   0            0   8 CHARACTER                 0         1
+ 000019 UNITS REFERENCE VALUE                                            CCITTIA5                   0            0  80 CHARACTER                 0        10
+ 000020 ELEMENT DATA WIDTH                                               CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 000030 DESCRIPTOR DEFINING SEQUENCE                                     CCITTIA5                   0            0  48 CHARACTER                 0         6
+ 001001 WMO BLOCK NUMBER                                                 NUMERIC                    0            0   7 NUMERIC                   0         2
+ 001002 WMO STATION NUMBER                                               NUMERIC                    0            0  10 NUMERIC                   0         3
+ 001003 WMO REGION NUMBER/GEOGRAPHICAL AREA                              CODE TABLE 1003            0            0   3 CODE TABLE 1003           0         1
+ 001004 WMO REGION SUB-AREA (SEE NOTE 9)                                 NUMERIC                    0            0   3 NUMERIC                   0         1
+ 001005 BUOY/PLATFORM IDENTIFIER                                         NUMERIC                    0            0  17 NUMERIC                   0         5
+ 001006 AIRCRAFT FLIGHT NUMBER                                           CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001007 SATELLITE IDENTIFIER                                             CODE TABLE 1007            0            0  10 CODE TABLE 1007           0         4
+ 001008 AIRCRAFT REGISTRATION NUMBER OR OTHER IDENTIFICATION             CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001009 TYPE OF COMMERCIAL AIRCRAFT                                      CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001010 STATIONARY BUOY PLATFORM IDENTIFIER; E.G. C-MAN BUOYS            CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001011 SHIP OR MOBILE LAND STATION IDENTIFIER                           CCITTIA5                   0            0  72 CHARACTER                 0         9
+ 001012 DIRECTION OF MOTION OF MOVING OBSERVING PLATFORM**               DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 001013 SPEED OF MOTION OF MOVING OBSERVING PLATFORM*                    M/S                        0            0  10 M/S                       0         3
+ 001014 PLATFORM DRIFT SPEED (HIGH PRECISION)                            M/S                        2            0  10 M/S                       2         4
+ 001015 STATION OR SITE NAME                                             CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001018 SHORT STATION OR SITE NAME                                       CCITTIA5                   0            0  40 CHARACTER                 0         5
+ 001019 LONG STATION OR SITE NAME                                        CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 001020 WMO REGION SUB-AREA                                              NUMERIC                    0            0   4 NUMERIC                   0         2
+ 001021 SYNOPTIC FEATURE IDENTIFIER                                      NUMERIC                    0            0  14 NUMERIC                   0         4
+ 001022 NAME OF FEATURE (SEE NOTE 11)                                    CCITTIA5                   0            0 224 CHARACTER                 0        28
+ 001023 OBSERVATION SEQUENCE NUMBER                                      NUMERIC                    0            0   9 NUMERIC                   0         3
+ 001025 STORM IDENTIFIER                                                 CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 001026 WMO STORM NAME                                                   CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001027 WMO LONG STORM NAME                                              CCITTIA5                   0            0  80 CHARACTER                 0        10
+ 001031 IDENTIFICATION OF ORIGINATING/GENERATING CENTRE (SEE NOTE 10)    CODE TABLE 1031            0            0  16 CODE TABLE 1031           0         5
+ 001032 GENERATING APPLICATION                                           CODE TABLE 1032            0            0   8 CODE TABLE 1032           0         3
+ 001033 IDENTIFICATION OF ORIGINATING/GENERATING CENTRE                  CODE TABLE 1033            0            0   8 CODE TABLE 1033           0         3
+ 001034 IDENTIFICATION OF ORIGINATING/GENERATING SUB-CENTRE              CODE TABLE 1034            0            0   8 CODE TABLE 1034           0         3
+ 001035 ORIGINATING CENTRE                                               COMMON CODE TABLE C-11     0            0  16 COMMON CODE TABLE C-11    0         5
+ 001036 AGENCY IN CHARGE OF OPERATING THE OBSERVING PLATFORM             CODE TABLE 1036            0            0  20 CODE TABLE 1036           0         7
+ 001041 ABSOLUTE PLATFORM VELOCITY - FIRST COMPONENT (SEE NOTE 6)        M/S                        5  -1073741824  31 M/S                       5        10
+ 001042 ABSOLUTE PLATFORM VELOCITY - SECOND COMPONENT (SEE NOTE 6)       M/S                        5  -1073741824  31 M/S                       5        10
+ 001043 ABSOLUTE PLATFORM VELOCITY - THIRD COMPONENT (SEE NOTE 6)        M/S                        5  -1073741824  31 M/S                       5        10
+ 001050 PLATFORM TRANSMITTER ID NUMBER                                   NUMERIC                    0            0  17 NUMERIC                   0         6
+ 001051 PLATFORM TRANSMITTER ID NUMBER                                   CCITTIA5                   0            0  96 CHARACTER                 0        12
+ 001060 AIRCRAFT REPORTING POINT (BEACON IDENTIFIER)                     CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001062 SHORT ICAO LOCATION INDICATOR                                    CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001063 ICAO LOCATION INDICATOR                                          CCITTIA5                   0            0  64 CHARACTER                 0         8
+ 001064 RUNWAY DESIGNATOR                                                CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001075 TIDE STATION IDENTIFICATION                                      CCITTIA5                   0            0  40 CHARACTER                 0         5
+ 001080 SHIP LINE NUMBER ACCORDING TO SOOP                               CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001081 RADIOSONDE SERIAL NUMBER                                         CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001082 RADIOSONDE ASCENSION NUMBER (SEE NOTE 12)                        NUMERIC                    0            0  14 NUMERIC                   0         4
+ 001083 RADIOSONDE RELEASE NUMBER (SEE NOTE 12)                          NUMERIC                    0            0   3 NUMERIC                   0         1
+ 001085 OBSERVING PLATFORM MANUFACTURER'S MODEL                          CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001086 OBSERVING PLATFORM MANUFACTURER'S SERIAL NUMBER                  CCITTIA5                   0            0 256 CHARACTER                 0        32
+ 001087 WMO MARINE OBSERVING PLATFORM EXTENDED IDENTIFIER                NUMERIC                    0            0  23 NUMERIC                   0         7
+ 001090 TECHNIQUE FOR MAKING UP INITIAL PERTURBATIONS                    CODE TABLE 1090            0            0   8 CODE TABLE 1090           0         3
+ 001091 ENSEMBLE MEMBER NUMBER                                           NUMERIC                    0            0  10 NUMERIC                   0         4
+ 001092 TYPE OF ENSEMBLE FORECAST                                        CODE TABLE 1092            0            0   8 CODE TABLE 1092           0         3
+ 001093 BALLOON LOT NUMBER                                               CCITTIA5                   0            0  96 CHARACTER                 0        12
+ 001094 WBAN NUMBER                                                      NUMERIC                    0            0  17 NUMERIC                   0         5
+ 001095 OBSERVER IDENTIFICATION                                          CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 001096 STATION ACQUISITION                                              CCITTIA5                   0            0 160 CHARACTER                 0        20
+ 001193 SIGMA_0 SIMULATION METHOD                                        CODE TABLE 1193            0            0   4  
+ 001194 CARRIER BALLOON/AIRCRAFT IDENTIFIER                              CCITTIA5                   0            0  72  
+ 001195 MOBIL LAND STATION IDENTIFIER                                    CCITTIA5                   0            0  72  
+ 001196 CONSTANT LEVEL BALLOON IDENTIFIER                                CCITTIA5                   0            0  72  
+ 001197 RTP - PLATFORM TYPE                                              CODE TABLE 1197            0            0  10  
+ 001198 ITP - DECK ID                                                    CODE TABLE 1198            0            0  10  
+ 001199 DUP - DUPLICATE STATUS                                           CODE TABLE 1199            0            0   4  
+ 001201 GENERATING APPLICATION                                           CODE TABLE 1201            0            0   8  
+ 001205 SATELLITE IDENTIFIER                                             CODE TABLE 1205            0            0  10  
+ 001208 VELOCITY OF PLATFORM, X                                          M/S                        5  -1073741824  31  
+ 001209 VELOCITY OF PLATFORM, Y                                          M/S                        5  -1073741824  31  
+ 001210 VELOCITY OF PLATFORM, Z                                          M/S                        5  -1073741824  31  
+ 002001 TYPE OF STATION                                                  CODE TABLE 2001            0            0   2 CODE TABLE 2001           0         1
+ 002002 TYPE OF INSTRUMENTATION FOR WIND MEASUREMENT                     FLAG TABLE 2002            0            0   4 FLAG TABLE 2002           0         2
+ 002003 TYPE OF MEASURING EQUIPMENT USED                                 CODE TABLE 2003            0            0   4 CODE TABLE 2003           0         2
+ 002004 TYPE OF INSTRUMENTATION FOR EVAPORATION MEASUREMENT OR TYPE OF C CODE TABLE 2004            0            0   4 CODE TABLE 2004           0         2
+ 002005 PRECISION OF TEMPERATURE OBSERVATION                             K                          2            0   7 K                         2         3
+ 002011 RADIOSONDE TYPE                                                  CODE TABLE 2011            0            0   8 CODE TABLE 2011           0         3
+ 002012 RADIOSONDE COMPUTATIONAL METHOD                                  CODE TABLE 2012            0            0   4 CODE TABLE 2012           0         2
+ 002013 SOLAR AND INFRARED RADIATION CORRECTION                          CODE TABLE 2013            0            0   4 CODE TABLE 2013           0         2
+ 002014 TRACKING TECHNIQUE/STATUS OF SYSTEM USED                         CODE TABLE 2014            0            0   7 CODE TABLE 2014           0         3
+ 002015 RADIOSONDE COMPLETENESS                                          CODE TABLE 2015            0            0   4 CODE TABLE 2015           0         2
+ 002016 RADIOSONDE CONFIGURATION                                         FLAG TABLE 2016            0            0   5 FLAG TABLE 2016           0         2
+ 002019 SATELLITE INSTRUMENTS                                            CODE TABLE 2019            0            0  11 CODE TABLE 2019           0         4
+ 002020 SATELLITE CLASSIFICATION                                         CODE TABLE 2020            0            0   9 CODE TABLE 2020           0         3
+ 002021 SATELLITE INSTRUMENT DATA USED IN PROCESSING                     FLAG TABLE 2021            0            0   9 FLAG TABLE 2021           0         3
+ 002022 SATELLITE DATA-PROCESSING TECHNIQUE USED                         FLAG TABLE 2022            0            0   8 FLAG TABLE 2022           0         3
+ 002023 SATELLITE DERIVED WIND COMPUTATION METHOD                        CODE TABLE 2023            0            0   4 CODE TABLE 2023           0         2
+ 002024 INTEGRATED MEAN HUMIDITY COMPUTATIONAL METHOD                    CODE TABLE 2024            0            0   4 CODE TABLE 2024           0         2
+ 002025 SATELLITE CHANNEL(S) USED IN COMPUTATION                         FLAG TABLE 2025            0            0  25 FLAG TABLE 2025           0         9
+ 002026 CROSS TRACK RESOLUTION                                           M                          2            0  12 M                         2         4
+ 002027 ALONG TRACK RESOLUTION                                           M                          2            0  12 M                         2         4
+ 002028 SEGMENT SIZE AT NADIR IN X DIRECTION                             M                          0            0  18 M                         0         6
+ 002029 SEGMENT SIZE AT NADIR IN Y DIRECTION                             M                          0            0  18 M                         0         6
+ 002030 METHOD OF CURRENT MEASUREMENT                                    CODE TABLE 2030            0            0   3 CODE TABLE 2030           0         1
+ 002031 DURATION AND TIME OF CURRENT MEASUREMENT                         CODE TABLE 2031            0            0   5 CODE TABLE 2031           0         2
+ 002032 INDICATOR FOR DIGITIZATION                                       CODE TABLE 2032            0            0   2 CODE TABLE 2032           0         1
+ 002033 METHOD OF SALINITY/DEPTH MEASUREMENT                             CODE TABLE 2033            0            0   3 CODE TABLE 2033           0         1
+ 002034 DROGUE TYPE                                                      CODE TABLE 2034            0            0   5 CODE TABLE 2034           0         2
+ 002035 CABLE LENGTH                                                     M                          0            0   9 M                         0         3
+ 002036 BUOY TYPE                                                        CODE TABLE 2036            0            0   2 CODE TABLE 2036           0         1
+ 002037 METHOD OF TIDAL OBSERVATION                                      CODE TABLE 2037            0            0   3 CODE TABLE 2037           0         1
+ 002038 METHOD OF WATER TEMPERATURE AND/OR SALINITY MEASUREMENT          CODE TABLE 2038            0            0   4 CODE TABLE 2038           0         2
+ 002039 METHOD OF WET-BULB TEMPERATURE MEASUREMENT                       CODE TABLE 2039            0            0   3 CODE TABLE 2039           0         1
+ 002040 METHOD OF REMOVING VELOCITY AND MOTION OF PLATFORM FROM CURRENT  CODE TABLE 2040            0            0   4 CODE TABLE 2040           0         2
+ 002041 METHOD FOR ESTIMATING REPORTS RELATED TO SYNOPTIC FEATURES       CODE TABLE 2041            0            0   6 CODE TABLE 2041           0         2
+ 002042 INDICATOR FOR SEA SURFACE CURRENT SPEED                          CODE TABLE 2042            0            0   2 CODE TABLE 2042           0         1
+ 002044 INDICATOR FOR METHOD OF CALCULATING SPECTRAL WAVE DATA           CODE TABLE 2044            0            0   4 CODE TABLE 2044           0         2
+ 002045 INDICATOR FOR TYPE OF PLATFORM                                   CODE TABLE 2045            0            0   4 CODE TABLE 2045           0         2
+ 002046 WAVE MEASUREMENT INSTRUMENTATION                                 CODE TABLE 2046            0            0   4 CODE TABLE 2046           0         2
+ 002048 SATELLITE SENSOR INDICATOR                                       CODE TABLE 2048            0            0   4 CODE TABLE 2048           0         2
+ 002049 GEOSTATIONARY SATELLITE DATA-PROCESSING TECHNIQUE USED           FLAG TABLE 2049            0            0   8 FLAG TABLE 2049           0         3
+ 002050 GEOSTATIONARY SOUNDER SATELLITE CHANNELS USED                    FLAG TABLE 2050            0            0  20 FLAG TABLE 2050           0         7
+ 002051 INDICATOR TO SPECIFY OBSERVING METHOD FOR EXTREME TEMPERATURES   CODE TABLE 2051            0            0   4 CODE TABLE 2051           0         2
+ 002052 GEOSTATIONARY IMAGER SATELLITE CHANNELS USED                     FLAG TABLE 2052            0            0   6 FLAG TABLE 2052           0         2
+ 002053 GOES-I/M BRIGHTNESS TEMPERATURE CHARACTERISTICS                  CODE TABLE 2053            0            0   4 CODE TABLE 2053           0         2
+ 002054 GOES-I/M SOUNDINGS PARAMETER CHARACTERISTICS                     CODE TABLE 2054            0            0   4 CODE TABLE 2054           0         2
+ 002055 GEOSTATIONARY SOUNDINGS STATISTICAL PARAMETERS                   CODE TABLE 2055            0            0   4 CODE TABLE 2055           0         2
+ 002056 GEOSTATIONARY SOUNDINGS ACCURACY STATISTICS                      CODE TABLE 2056            0            0   4 CODE TABLE 2056           0         2
+ 002057 ORIGIN OF FIRST GUESS INFORMATION FOR GOES-I/M SOUNDINGS         CODE TABLE 2057            0            0   4 CODE TABLE 2057           0         2
+ 002058 VALID TIMES OF FIRST GUESS INFORMATION FOR GOES-I/M SOUNDINGS    CODE TABLE 2058            0            0   4 CODE TABLE 2058           0         2
+ 002059 ORIGIN OF ANALYSIS INFORMATION FOR GOES-I/M SOUNDINGS            CODE TABLE 2059            0            0   4 CODE TABLE 2059           0         2
+ 002060 ORIGIN OF SURFACE INFORMATION FOR GOES-I/M SOUNDINGS             CODE TABLE 2060            0            0   4 CODE TABLE 2060           0         2
+ 002061 AIRCRAFT NAVIGATIONAL SYSTEM                                     CODE TABLE 2061            0            0   3 CODE TABLE 2061           0         1
+ 002062 TYPE OF AIRCRAFT DATA RELAY SYSTEM                               CODE TABLE 2062            0            0   4 CODE TABLE 2062           0         2
+ 002063 AIRCRAFT ROLL ANGLE                                              DEGREE                     2       -18000  16 DEGREE                    2         5
+ 002064 AIRCRAFT ROLL ANGLE QUALITY                                      CODE TABLE 2064            0            0   2 CODE TABLE 2064           0         1
+ 002065 ACARS GROUND RECEIVING STATION                                   CCITTIA5                   0            0  40 CHARACTER                 0         5
+ 002066 RADIOSONDE GROUND RECEIVING SYSTEM                               CODE TABLE 2066            0            0   6 CODE TABLE 2066           0         2
+ 002067 RADIOSONDE OPERATING FREQUENCY                                   Hz                        -5            0  15 Hz                       -5         5
+ 002070 ORIGINAL SPECIFICATION OF LATITUDE/LONGITUDE                     CODE TABLE 2070            0            0   4 CODE TABLE 2070           0         2
+ 002071 SPECTROGRAPHIC WAVELENGTH                                        M                         13            0  30 M                        13        10
+ 002080 BALLOON MANUFACTURER                                             CODE TABLE 2080            0            0   6 CODE TABLE 2080           0         2
+ 002081 TYPE OF BALLOON                                                  CODE TABLE 2081            0            0   5 CODE TABLE 2081           0         2
+ 002082 WEIGHT OF BALLOON                                                KG                         3            0  12 KG                        3         4
+ 002083 TYPE OF BALLOON SHELTER                                          CODE TABLE 2083            0            0   4 CODE TABLE 2083           0         2
+ 002084 TYPE OF GAS USED IN BALLOON                                      CODE TABLE 2084            0            0   4 CODE TABLE 2084           0         2
+ 002085 AMOUNT OF GAS USED IN BALLOON                                    KG                         3            0  13 KG                        3         4
+ 002086 BALLOON FLIGHT TRAIN LENGTH                                      M                          1            0  10 M                         1         4
+ 002091 ENTRY SENSOR 4/20 MA                                             A                          4            0  10 A                         4         3
+ 002095 TYPE OF PRESSURE SENSOR                                          CODE TABLE 2095            0            0   5 CODE TABLE 2095           0         2
+ 002096 TYPE OF TEMPERATURE SENSOR                                       CODE TABLE 2096            0            0   5 CODE TABLE 2096           0         2
+ 002097 TYPE OF HUMIDITY SENSOR                                          CODE TABLE 2097            0            0   5 CODE TABLE 2097           0         2
+ 002100 RADAR CONSTANT                                                   dB                         1            0  12 dB                        1         4
+ 002101 TYPE OF ANTENNA                                                  CODE TABLE 2101            0            0   4 CODE TABLE 2101           0         2
+ 002102 ANTENNA HEIGHT ABOVE TOWER BASE                                  M                          0            0   8 M                         0         3
+ 002103 RADOME                                                           FLAG TABLE 2103            0            0   2 FLAG TABLE 2103           0         1
+ 002104 ANTENNA POLARISATION                                             CODE TABLE 2104            0            0   4 CODE TABLE 2104           0         2
+ 002105 MAXIMUM ANTENNA GAIN                                             dB                         0            0   6 dB                        0         2
+ 002106 3-DB BEAMWIDTH                                                   DEGREE                     1            0   6 DEGREE                    1         2
+ 002107 SIDELOBE SUPPRESSION                                             dB                         0            0   6 dB                        0         2
+ 002108 CROSSPOL DISCRIMINATION (ON AXIS)                                dB                         0            0   6 dB                        0         2
+ 002109 ANTENNA SPEED (AZIMUTH)                                          DEGREE/S                   2            0  12 DEGREE/S                  2         4
+ 002110 ANTENNA SPEED (ELEVATION)                                        DEGREE/S                   2            0  12 DEGREE/S                  2         4
+ 002111 RADAR INCIDENCE ANGLE                                            DEGREE                     1            0  10 DEGREE                    1         4
+ 002112 RADAR LOOK ANGLE                                                 DEGREE                     1            0  12 DEGREE                    1         4
+ 002113 NUMBER OF AZIMUTH LOOKS                                          NUMERIC                    0            0   4 NUMERIC                   0         2
+ 002114 ANTENNA EFFECTIVE SURFACE AREA                                   M**2                       0            0  15 M**2                      0         5
+ 002115 TYPE OF SURFACE OBSERVING EQUIPMENT                              CODE TABLE 2115            0            0   5 CODE TABLE 2115           0         2
+ 002116 PERCENTAGE OF 320 MHZ BAND PROCESSED                             %                          0            0   7 %                         0         3
+ 002117 PERCENTAGE OF 80 MHZ BAND PROCESSED                              %                          0            0   7 %                         0         3
+ 002118 PERCENTAGE OF 20 MHZ BAND PROCESSED                              %                          0            0   7 %                         0         3
+ 002119 RA-2 INSTRUMENT OPERATIONS                                       CODE TABLE 2119            0            0   3 CODE TABLE 2119           0         1
+ 002120 OCEAN WAVE FREQUENCY                                             Hz                         3            0  10 Hz                        3         4
+ 002121 MEAN FREQUENCY                                                   Hz                        -8            0   7 Hz                       -8         3
+ 002122 FREQUENCY AGILITY RANGE                                          Hz                        -6         -128   8 Hz                       -6         3
+ 002123 PEAK POWER                                                       W                         -4            0   7 W                        -4         3
+ 002124 AVERAGE POWER                                                    W                         -1            0   7 W                        -1         3
+ 002125 PULSE REPETITION FREQUENCY                                       Hz                        -1            0   8 Hz                       -1         3
+ 002126 PULSE WIDTH                                                      S                          7            0   6 S                         7         2
+ 002127 RECEIVER INTERMEDIATE FREQUENCY                                  Hz                        -6            0   7 Hz                       -6         3
+ 002128 INTERMEDIATE FREQUENCY BANDWIDTH                                 Hz                        -5            0   6 Hz                       -5         2
+ 002129 MINIMUM DETECTABLE SIGNAL                                        dB                         0         -150   5 dB                        0         3
+ 002130 DYNAMIC RANGE                                                    dB                         0            0   7 dB                        0         3
+ 002131 SENSITIVITY TIME CONTROL (STC)                                   FLAG TABLE 2131            0            0   2 FLAG TABLE 2131           0         1
+ 002132 AZIMUTH POINTING ACCURACY                                        DEGREE                     2            0   6 DEGREE                    2         2
+ 002133 ELEVATION POINTING ACCURACY                                      DEGREE                     2            0   6 DEGREE                    2         2
+ 002134 ANTENNA BEAM AZIMUTH                                             DEGREE                     2            0  16 DEGREE                    2         5
+ 002135 ANTENNA ELEVATION                                                DEGREE                     2        -9000  15 DEGREE                    2         5
+ 002136 RANGE PROCESSED BY RANGE ATTENUATION CORRECTION                  M                         -3            0  16 M                        -3         5
+ 002140 SATELLITE RADAR BEAM AZIMUTH ANGLE                               DEGREE                     0            0   9 DEGREE                    0         3
+ 002141 MEASUREMENT TYPE                                                 CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 002142 OZONE INSTRUMENT SERIAL NUMBER/ IDENTIFICATION                   CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 002143 OZONE INSTRUMENT TYPE                                            CODE TABLE 2143            0            0   7 CODE TABLE 2143           0         3
+ 002144 LIGHT SOURCE TYPE FOR BREWER SPECTRO PHOTOMETER                  CODE TABLE 2144            0            0   4 CODE TABLE 2144           0         2
+ 002145 WAVE LENGTH SETTING FOR DOBSON INSTRUMENTS                       CODE TABLE 2145            0            0   4 CODE TABLE 2145           0         2
+ 002146 SOURCE CONDITIONS FOR DOBSON INSTRUMENTS                         CODE TABLE 2146            0            0   4 CODE TABLE 2146           0         2
+ 002148 DATA COLLECTION AND/OR LOCATION SYSTEM                           CODE TABLE 2148            0            0   5 CODE TABLE 2148           0         2
+ 002149 TYPE OF DATA BUOY                                                CODE TABLE 2149            0            0   6 CODE TABLE 2149           0         2
+ 002150 TOVS/ATOVS/AVHRR INSTRUMENTATION CHANNEL NUMBER                  CODE TABLE 2150            0            0   6 CODE TABLE 2150           0         2
+ 002151 RADIOMETER IDENTIFIER                                            CODE TABLE 2151            0            0  11 CODE TABLE 2151           0         4
+ 002152 SATELLITE INSTRUMENT USED IN DATA PROCESSING(6)                  FLAG TABLE 2152            0            0  31 FLAG TABLE 2152           0        10
+ 002153 SATELLITE CHANNEL CENTRE FREQUENCY                               Hz                        -8            0  26 Hz                       -8         8
+ 002154 SATELLITE CHANNEL BAND WIDTH                                     Hz                        -8            0  26 Hz                       -8         8
+ 002156 PERCENTAGE OF VALID KU OCEAN RETRACKER MEASUREMENTS              %                          0            0   7 %                         0         3
+ 002157 PERCENTAGE OF VALID S OCEAN RETRACKER MEASUREMENTS               %                          0            0   7 %                         0         3
+ 002158 RA-2 INSTRUMENT                                                  FLAG TABLE 2158            0            0   9 FLAG TABLE 2158           0         3
+ 002159 MWR INSTRUMENT                                                   FLAG TABLE 2159            0            0   8 FLAG TABLE 2159           0         3
+ 002160 WAVE LENGTH OF THE RADAR                                         CODE TABLE 2160            0            0   4 CODE TABLE 2160           0         2
+ 002163 HEIGHT ASSIGNMENT METHOD                                         CODE TABLE 2163            0            0   4 CODE TABLE 2163           0         2
+ 002164 TRACER CORRELATION METHOD                                        CODE TABLE 2164            0            0   3 CODE TABLE 2164           0         1
+ 002166 RADIANCE TYPE                                                    CODE TABLE 2166            0            0   4 CODE TABLE 2166           0         2
+ 002167 RADIANCE COMPUTATIONAL METHOD                                    CODE TABLE 2167            0            0   4 CODE TABLE 2167           0         2
+ 002168 HYDROSTATIC PRESSURE OF LOWER END OF CABLE (THERMISTOR STRING)   PA                        -3            0  16 KPA                       0         5
+ 002169 ANEMOMETER TYPE                                                  CODE TABLE 2169            0            0   4 CODE TABLE 2169           0         2
+ 002172 PRODUCT TYPE FOR RETRIEVED ATMOSPHERIC GASES                     CODE TABLE 2172            0            0   8 CODE TABLE 2172           0         3
+ 002173 SQUARE OF THE OFF NADIR ANGLE (7)                                DEGREE2                    4            0  10 DEGREE2                   4         4
+ 002174 MEAN ACROSS TRACK PIXEL NUMBER                                   NUMERIC                    0            0   9 NUMERIC                   0         3
+ 002175 METHOD OF PRECIPITATION MEASUREMENT                              CODE TABLE 2175            0            0   4 CODE TABLE 2175           0         2
+ 002176 METHOD OF STATE OF GROUND MEASUREMENT                            CODE TABLE 2176            0            0   4 CODE TABLE 2176           0         2
+ 002177 METHOD OF SNOW DEPTH MEASUREMENT                                 CODE TABLE 2177            0            0   4 CODE TABLE 2177           0         2
+ 002178 METHOD OF LIQUID CONTENT MEASUREMENT OF PRECIPITATION            CODE TABLE 2178            0            0   4 CODE TABLE 2178           0         2
+ 002179 TYPE OF SKY CONDITION ALGORITHM                                  CODE TABLE 2179            0            0   4 CODE TABLE 2179           0         2
+ 002180 MAIN PRESENT WEATHER DETECTING SYSTEM                            CODE TABLE 2180            0            0   4 CODE TABLE 2180           0         2
+ 002181 SUPPLEMENTARY PRESENT WEATHER SENSOR                             FLAG TABLE 2181            0            0  21 FLAG TABLE 2181           0         7
+ 002182 VISIBILITY MEASUREMENT SYSTEM                                    CODE TABLE 2182            0            0   4 CODE TABLE 2182           0         2
+ 002183 CLOUD DETECTION SYSTEM                                           CODE TABLE 2183            0            0   4 CODE TABLE 2183           0         2
+ 002184 TYPE OF LIGHTNING DETECTION SENSOR                               CODE TABLE 2184            0            0   4 CODE TABLE 2184           0         2
+ 002185 METHOD OF EVAPORATION MEASUREMENT                                CODE TABLE 2185            0            0   4 CODE TABLE 2185           0         2
+ 002186 CAPABILITY TO DETECT PRECIPITATION PHENOMENA                     FLAG TABLE 2186            0            0  30 FLAG TABLE 2186           0        10
+ 002187 CAPABILITY TO DETECT OTHER WEATHER PHENOMENA                     FLAG TABLE 2187            0            0  18 FLAG TABLE 2187           0         6
+ 002188 CAPABILITY TO DETECT OBSCURATION                                 FLAG TABLE 2188            0            0  21 FLAG TABLE 2188           0         7
+ 002189 CAPABILITY TO DISCRIMINATE LIGHTNING STRIKES                     FLAG TABLE 2189            0            0  12 FLAG TABLE 2189           0         4
+ 002190 LAGRANGIAN DRIFTER SUBMERGENCE (% TIME SUBMERGED)                %                          0            0   7 %                         0         3
+ 002193 1D VAR SATELLITE CHANNEL(S) USED                                 FLAG TABLE 2193            0            0  28  
+ 002194 CONSTANT LEVEL BALLOON TYPE                                      CODE TABLE 2194            0            0   4  
+ 002195 TYPE OF SATELLITE INSTRUMENTATION                                CODE TABLE 2195            0            0   4  
+ 002196 SATELLITE CLASSIFICATION                                         CODE TABLE 2196            0            0   9  
+ 002197 SATELLITE CHANNEL CENTRE FREQUENCY                               Hz                        -8            0  26  
+ 002198 SATELLITE CHANNEL BAND WIDTH                                     Hz                        -8            0  26  
+ 002199 INTEGRATED MEAN HUMIDITY COMPUTATIONAL METHOD                    CODE TABLE 2199            0            0   4  
+ 002200 LATITUDINAL RESOLUTION                                           DEGREE                     5           25
+ 002201 LONGITUDINAL RESOLUTION                                          DEGREE                     5           25
+ 002201 SIMULATED SATELLITE INSTRUMENT                                   FLAG TABLE 2201            0            0   4  
+ 002202 SIMULATED DATA PROCESSING TECHNIQUE USED                         FLAG TABLE 2202            0            0   4  
+ 002220 DATA PRODUCER                                                    CODE TABLE 2220            0            0   9  
+ 002221 SEGMENT SIZE AT NADIR IN X DIRECTION                             M                          0            0  18  
+ 002222 SEGMENT SIZE AT NADIR IN Y DIRECTION                             M                          0            0  18  
+ 002223 TOVS/ATOVS/AVHRR CHANNEL NUMBER                                  CODE TABLE 2223            0            0   6  
+ 002231 HEIGHT ASSIGNMENT METHOD                                         CODE TABLE 2231            0            0   4  
+ 002232 TRACER CORRELATION METHOD                                        CODE TABLE 2232            0            0   3  
+ 002240 TYPE OF TERMODYNAMIC SENSING                                     CODE TABLE 2240            0            0   8  
+ 002241 TYPE OF ROCKET MOTOR                                             CODE TABLE 2241            0            0   3  
+ 002242 TYPE OF WIND SENSING EQUIPMENT                                   CODE TABLE 2242            0            0   8  
+ 002243 TERMODYNAMIC CORRECTION TECHNIQUE                                CODE TABLE 2243            0            0   3  
+ 002244 WIND CORRECTION TECHNIQUE                                        CODE TABLE 2244            0            0   3  
+ 002245 METHOD OF REDUCING OF DATA                                       CODE TABLE 2245            0            0   4  
+ 002251 RADIANCE COMPUTATIONAL METHOD                                    CODE TABLE 2251            0            0   4  
+ 002252 SATELLITE INSTRUMENT DATA USED IN PROCESSING                     FLAG TABLE 2252            0            0  31  
+ 002253 HUMIDITY COMPUTATIONAL METHOD                                    CODE TABLE 2253            0            0   8  
+ 002254 RADIANCE TYPE                                                    CODE TABLE 2254            0            0   4  
+ 004001 YEAR                                                             YEAR                       0            0  12 YEAR                      0         4
+ 004002 MONTH                                                            MONTH                      0            0   4 MONTH                     0         2
+ 004003 DAY                                                              DAY                        0            0   6 DAY                       0         2
+ 004004 HOUR                                                             HOUR                       0            0   5 HOUR                      0         2
+ 004005 MINUTE                                                           MINUTE                     0            0   6 MINUTE                    0         2
+ 004006 SECOND                                                           SECOND                     0            0   6 SECOND                    0         2
+ 004007 SECONDS WITHIN A MINUTE (MICROSECOND ACCURACY)                   SECOND                     6            0  26 S                         6         8
+ 004011 TIME INCREMENT                                                   YEAR                       0        -1024  11 YEAR                      0         4
+ 004012 TIME INCREMENT                                                   MONTH                      0        -1024  11 MONTH                     0         4
+ 004013 TIME INCREMENT                                                   DAY                        0        -1024  11 DAY                       0         4
+ 004014 TIME INCREMENT                                                   HOUR                       0        -1024  11 HOUR                      0         4
+ 004015 TIME INCREMENT                                                   MINUTE                     0        -2048  12 MINUTE                    0         4
+ 004016 TIME INCREMENT                                                   SECOND                     0        -4096  13 SECOND                    0         4
+ 004017 REFERENCE TIME PERIOD FOR ACCUMULATED OR EXTREME DATA            MINUTE                     0        -1440  12 MINUTE                    0         4
+ 004021 TIME PERIOD OR DISPLACEMENT                                      YEAR                       0        -1024  11 YEAR                      0         4
+ 004022 TIME PERIOD OR DISPLACEMENT                                      MONTH                      0        -1024  11 MONTH                     0         4
+ 004023 TIME PERIOD OR DISPLACEMENT                                      DAY                        0        -1024  11 DAY                       0         4
+ 004024 TIME PERIOD OR DISPLACEMENT                                      HOUR                       0        -2048  12 HOUR                      0         4
+ 004025 TIME PERIOD OR DISPLACEMENT                                      MINUTE                     0        -2048  12 MINUTE                    0         4
+ 004026 TIME PERIOD OR DISPLACEMENT                                      SECOND                     0        -4096  13 SECOND                    0         4
+ 004031 DURATION OF TIME RELATING TO FOLLOWING VALUE                     HOUR                       0            0   8 HOUR                      0         3
+ 004032 DURATION OF TIME RELATING TO FOLLOWING VALUE                     MINUTE                     0            0   6 MINUTE                    0         2
+ 004041 TIME DIFFERENCE, UTC -LMT (SEE NOTE 6)                           MINUTE                     0        -1440  12 MINUTE                    0         4
+ 004043 DAY OF THE YEAR                                                  DAY                        0            0   9 DAY                       0         3
+ 004051 PRINCIPAL TIME OF DAILY READING OF MAXIMUM TEMPERATURE           HOUR                       0            0   5 HOUR                      0         2
+ 004052 PRINCIPAL TIME OF DAILY READING OF MINIMUM TEMPERATURE           HOUR                       0            0   5 HOUR                      0         2
+ 004053 NUMBER OF DAYS WITH PRECIPITATION EQUAL TO OR MORE THAN 1 MM     NUMERIC                    0            0   6 NUMERIC                   0         2
+ 004059 TIMES OF OBSERVATION USED TO COMPUTE THE REPORTED MEAN VALUES    FLAG TABLE 4059            0            0   6 FLAG TABLE 4059           0         2
+ 004065 SHORT TIME INCREMENT                                             MINUTE                     0         -128   8 MINUTE                    0         2
+ 004073 SHORT TIME PERIOD OR DISPLACEMENT                                DAY                        0         -128   8 DAY                       0         2
+ 004074 SHORT TIME PERIOD OR DISPLACEMENT                                HOUR                       0         -128   8 HOUR                      0         2
+ 004075 SHORT TIME PERIOD OR DISPLACEMENT                                MINUTE                     0         -128   8 MINUTE                    0         2
+ 004080 AVERAGING PERIOD FOR FOLLOWING VALUE                             CODE TABLE 4080            0            0   4 CODE TABLE 4080           0         2
+ 004086 LONG TIME PERIOD OR DISPLACEMENT                                 SECOND                     0        -8192  15 SECOND                    0         5
+ 005001 LATITUDE (HIGH ACCURACY)                                         DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 005002 LATITUDE (COARSE ACCURACY)                                       DEGREE                     2        -9000  15 DEGREE                    2         4
+ 005011 LATITUDE INCREMENT (HIGH ACCURACY)                               DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 005012 LATITUDE INCREMENT (COARSE ACCURACY)                             DEGREE                     2        -9000  15 DEGREE                    2         4
+ 005015 LATITUDE DISPLACEMENT (HIGH ACCURACY)                            DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 005016 LATITUDE DISPLACEMENT (COARSE ACCURACY)                          DEGREE                     2        -9000  15 DEGREE                    2         4
+ 005021 BEARING OR AZIMUTH                                               DEGREE TRUE                2            0  16 DEGREE TRUE               2         5
+ 005022 SOLAR AZIMUTH                                                    DEGREE TRUE                2            0  16 DEGREE TRUE               2         5
+ 005023 SUN TO SATELLITE AZIMUTH DIFFERENCE                              DEGREE                     1        -1800  12 DEGREE                    1         4
+ 005030 DIRECTION (SPECTRAL)                                             DEGREE                     0            0  12 DEGREE                    0         4
+ 005031 ROW NUMBER                                                       NUMERIC                    0            0  12 NUMERIC                   0         4
+ 005033 PIXEL SIZE ON HORIZONTAL - 1                                     M                         -1            0  16 M                        -1         5
+ 005034 ALONG TRACK ROW NUMBER                                           NUMERIC                    0            0  11 NUMERIC                   0         4
+ 005036 SHIP TRANSECT NUMBER ACCORDING TO SOOP                           NUMERIC                    0            0   7 NUMERIC                   0         2
+ 005040 ORBIT NUMBER                                                     NUMERIC                    0            0  24 NUMERIC                   0         8
+ 005041 SCAN LINE NUMBER                                                 NUMERIC                    0            0   8 NUMERIC                   0         3
+ 005042 CHANNEL NUMBER                                                   NUMERIC                    0            0   6 NUMERIC                   0         2^M
+ 005043 FIELD OF VIEW NUMBER                                             NUMERIC                    0            0   8 NUMERIC                   0         3
+ 005044 SATELLITE CYCLE NUMBER                                           NUMERIC                    0            0  11 NUMERIC                   0         4
+ 005052 CHANNEL NUMBER INCREMENT                                         NUMERIC                    0            0   5 NUMERIC                   0         2
+ 005053 FIELD OF VIEW NUMBER INCREMENT                                   NUMERIC                    0            0   5 NUMERIC                   0         2
+ 005060 Y ANGULAR POSITION FROM CENTRE OF GRAVITY                        DEGREE                     6     -8000000  24 DEGREE                    6         8
+ 005061 Z ANGULAR POSITION FROM CENTRE OF GRAVITY                        DEGREE                     6     -8000000  24 DEGREE                    6         8
+ 005193 ALONG TRACK ROW NUMBER AT 50 KM                                  NUMERIC                    0            0  10 NUMERIC                   0         4 
+ 005194 ALONG TRACK ROW NUMBER AT 25 KM                                  NUMERIC                    0            0  11 NUMERIC                   0         4  
+ 005195 ENSEMBLE MEMBER NUMBER                                           NUMERIC                    0            0   7 NUMERIC                   0         3 
+ 005217 LOCATION OF PLATFORM, X                                          M                          2  -1073741824  31 M                         2        10 
+ 005232 DIRECTION (SPECTRAL)                                             DEGREE                     2            0  16 DEGREE                    2         5 
+ 006001 LONGITUDE (HIGH ACCURACY)                                        DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 006002 LONGITUDE (COARSE ACCURACY)                                      DEGREE                     2       -18000  16 DEGREE                    2         5
+ 006011 LONGITUDE INCREMENT (HIGH ACCURACY)                              DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 006012 LONGITUDE INCREMENT (COARSE ACCURACY)                            DEGREE                     2       -18000  16 DEGREE                    2         5
+ 006015 LONGITUDE DISPLACEMENT (HIGH ACCURACY)                           DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 006016 LONGITUDE DISPLACEMENT (COARSE ACCURACY)                         DEGREE                     2       -18000  16 DEGREE                    2         5
+ 006021 DISTANCE                                                         M                         -1            0  13 M                        -1         4
+ 006030 WAVE NUMBER (SPECTRAL)                                           RAD/M                      5            0  13 RAD/M                     5         4
+ 006031 COLUMN NUMBER                                                    NUMERIC                    0            0  12 NUMERIC                   0         4
+ 006033 PIXEL SIZE ON HORIZONTAL - 2                                     M                         -1            0  16 M                        -1         5
+ 006034 CROSS-TRACK CELL NUMBER                                          NUMERIC                    0            0   7 NUMERIC                   0         3
+ 006040 RADIUS OF CONFIDENCE                                             M                          0            0  13 M                         0         4
+ 006193 CROSS TRACK CELL NUMBER AT 50 KM                                 NUMERIC                    0            0   6 NUMERIC                   0         2 
+ 006194 CROSS TRACK CELL NUMBER AT 25 KM                                 NUMERIC                    0            0   7 NUMERIC                   0         3 
+ 006217 LOCATION OF PLATFORM, Y                                          M                          2  -1073741824  31 M                         2        10 
+ 006232 WAVENUMBER (SPECTRAL)                                            RADS/M                     5            0  13 ADS/M                     5         4
+ 007001 HEIGHT OF STATION (SEE NOTE 1)                                   M                          0         -400  15 M                         0         5
+ 007002 HEIGHT OR ALTITUDE                                               M                         -1          -40  16 M                        -1         5
+ 007003 GEOPOTENTIAL                                                     M**2/S**2                 -1         -400  17 M**2/S**2                -1         6
+ 007004 PRESSURE                                                         PA                        -1            0  14 PA                       -1         5
+ 007005 HEIGHT INCREMENT                                                 M                          0         -400  12 M                         0         4
+ 007006 HEIGHT ABOVE STATION                                             M                          0            0  15 M                         0         5
+ 007007 HEIGHT                                                           M                          0        -1000  17 M                         0         6
+ 007008 GEOPOTENTIAL                                                     M**2/S**2                  0       -10000  20 M**2/S**2                 0         7
+ 007009 GEOPOTENTIAL HEIGHT                                              GPM                        0        -1000  17 GPM                       0         5
+ 007010 FLIGHT LEVEL                                                     M                          0        -1024  16 FT                       -1         5
+ 007021 ELEVATION (SEE NOTE 2)                                           DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007022 SOLAR ELEVATION                                                  DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007024 SATELLITE ZENITH ANGLE                                           DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007025 SOLAR ZENITH ANGLE                                               DEGREE                     2        -9000  15 DEGREE                    2         5
+ 007026 SATELLITE ZENITH ANGLE                                           DEGREE                     4      -900000  21 DEGREE                    4         7
+ 007030 HEIGHT OF STATION GROUND ABOVE MEAN SEA LEVEL (SEE NOTE 3)       M                          1       - 4000  17 M                         1         5
+ 007031 HEIGHT OF BAROMETER ABOVE MEAN SEA LEVEL (SEE NOTE 4)            M                          1       - 4000  17 M                         1         5
+ 007032 HEIGHT OF SENSOR ABOVE LOCAL GROUND (OR DECK OF MARINE PLATFORM) M                          2            0  16 M                         2         5
+ 007033 HEIGHT OF SENSOR ABOVE WATER SURFACE (SEE NOTE 6)                M                          1            0  12 M                         1         4
+ 007040 IMPACT PARAMETER (SEE NOTE 8)                                    M                          1     62000000  22 M                         1         8
+ 007061 DEPTH BELOW LAND SURFACE                                         M                          2            0  14 M                         2         5
+ 007062 DEPTH BELOW SEA/WATER SURFACE                                    M                          1            0  17 M                         1         6
+ 007063 DEPTH BELOW SEA/WATER SURFACE                                    M                          2            0  20 M                         2         7
+ 007064 REPRESENTATIVE HEIGHT OF SENSOR ABOVE STATION (SEE NOTE 7)       M                          0            0   4 M                         0         2
+ 007065 WATER PRESSURE                                                   PA                        -3            0  17 PA                        0         6
+ 007070 DROGUE DEPTH                                                     M                          0            0  10 M                         0         4
+ 007217 LOCATION OF PLATFORM, Z                                          M                          2  -1073741824  31 M                         2        10 
+ 008001 VERTICAL SOUNDING SIGNIFICANCE                                   FLAG TABLE 8001            0            0   7 FLAG TABLE 8001           0         3
+ 008002 VERTICAL SIGNIFICANCE (SURFACE OBSERVATIONS)                     CODE TABLE 8002            0            0   6 CODE TABLE 8002           0         2
+ 008003 VERTICAL SIGNIFICANCE (SATELLITE OBSERVATIONS)                   CODE TABLE 8003            0            0   6 CODE TABLE 8003           0         2
+ 008004 PHASE OF AIRCRAFT FLIGHT                                         CODE TABLE 8004            0            0   3 CODE TABLE 8004           0         1
+ 008005 METEOROLOGICAL ATTRIBUTE SIGNIFICANCE                            CODE TABLE 8005            0            0   4 CODE TABLE 8005           0         2
+ 008006 OZONE VERTICAL SOUNDING SIGNIFICANCE                             FLAG TABLE 8006            0            0   9 FLAG TABLE 8006           0         3
+ 008007 DIMENSIONAL SIGNIFICANCE                                         CODE TABLE 8007            0            0   4 CODE TABLE 8007           0         2
+ 008008 RADIATION VERTICAL SOUNDING SIGNIFICANCE                         FLAG TABLE 8008            0            0   9 FLAG TABLE 8008           0         3
+ 008009 DETAILED PHASE OF FLIGHT                                         CODE TABLE 8009            0            0   4 CODE TABLE 8009           0         2
+ 008010 SURFACE QUALIFIER (TEMPERATURE DATA)                             CODE TABLE 8010            0            0   5 CODE TABLE 8010           0         2
+ 008011 METEOROLOGICAL FEATURE                                           CODE TABLE 8011            0            0   6 CODE TABLE 8011           0         2
+ 008012 LAND/SEA QUALIFIER                                               CODE TABLE 8012            0            0   2 CODE TABLE 8012           0         1
+ 008013 DAY/NIGHT QUALIFIER                                              CODE TABLE 8013            0            0   2 CODE TABLE 8013           0         1
+ 008014 QUALIFIER FOR RUNWAY VISUAL RANGE                                CODE TABLE 8014            0            0   4 CODE TABLE 8014           0         2
+ 008016 CHANGE QUALIFIER OF A TREND-TYPE FORECAST OR AN AERODROME FORECA CODE TABLE 8016            0            0   3 CODE TABLE 8016           0         1
+ 008017 QUALIFIER OF THE TIME WHEN THE FORECAST CHANGE IS EXPECTED       CODE TABLE 8017            0            0   2 CODE TABLE 8017           0         1
+ 008018 SEAWINDS LAND/ICE SURFACE TYPE                                   FLAG TABLE 8018            0            0  17 FLAG TABLE 8018           0         6
+ 008020 TOTAL NUMBER OF MISSING ENTITIES (WITH RESPECT TO ACCUMULATION O NUMERIC                    0            0  16 NUMERIC                   0         5
+ 008021 TIME SIGNIFICANCE                                                CODE TABLE 8021            0            0   5 CODE TABLE 8021           0         2
+ 008022 TOTAL NUMBER (WITH RESPECT TO ACCUMULATION OR AVERAGE)           NUMERIC                    0            0  16 NUMERIC                   0         5
+ 008023 FIRST ORDER STATISTICS                                           CODE TABLE 8023            0            0   6 CODE TABLE 8023           0         2
+ 008024 DIFFERENCE STATISTICS                                            CODE TABLE 8024            0            0   6 CODE TABLE 8024           0         2
+ 008025 TIME DIFFERENCE QUALIFIER                                        CODE TABLE 8025            0            0   4 CODE TABLE 8025           0         2
+ 008026 MATRIX SIGNIFICANCE                                              CODE TABLE 8026            0            0   6 CODE TABLE 8026           0         2
+ 008029 REMOTLY SENSED SURFACE TYPE                                      CODE TABLE 8029            0            0   8 CODE TABLE 8029           0         3
+ 008030 MANUAL ON CODES (VOLUME I.1, SECTION C) CODE TABLE FROM WHICH DA NUMERIC                    0            0  13 NUMERIC                   0         4
+ 008031 DATA CATEGORY CREX TABLE A                                       NUMERIC                    0            0   8 NUMERIC                   0         3
+ 008033 METHOD OF DERIVATION OF PERCENTAGE CONFIDENCE                    CODE TABLE 8033            0            0   7 CODE TABLE 8033           0         3
+ 008035 TYPE OF MONITORING EXERCISE                                      CODE TABLE 8035            0            0   3 CODE TABLE 8035           0         1
+ 008036 TYPE OF CENTRE OR STATION PERFORMING MONITORING                  CODE TABLE 8036            0            0   3 CODE TABLE 8036           0         1
+ 008039 TIME SIGNIFICANCE ( AVIATION FORECAST)                           CODE TABLE 8039            0            0   6 CODE TABLE 8039           0         2
+ 008040 FLIGHT LEVEL SIGNIFICANCE                                        CODE TABLE 8040            0            0   6 CODE TABLE 8040           0         2
+ 008041 DATA SIGNIFICANCE                                                CODE TABLE 8041            0            0   5 CODE TABLE 8041           0         2
+ 008042 EXTENDED VERTICAL SOUNDING SIGNIFICANCE                          FLAG TABLE 8042            0            0  18 FLAG TABLE 8042           0         6
+ 008043 ATMOSPHERIC CHEMICAL OR PHISICAL CONSTITUENT TYPE                CODE TABLE 8043            0            0   8 CODE TABLE 8043           0         3
+ 008044 CAS REGISTRY NUMBER                                              CCITTIA5                   0            0  88 CHARACTERS                0        11
+ 008045 PARTICULATE MATTER CHARACTERIZATION                              CODE TABLE 8045            0            0   8 CODE TABLE 8045           0         3
+ 008049 NUMBER OF OBSERVATIONS                                           NUMERIC                    0            0   8 NUMERIC                   0         3
+ 008050 QUALIFIER FOR NUMBER OF MISSING VALUES IN CALCULATION OF STATIST CODE TABLE 8050            0            0   4 CODE TABLE 8050           0         2
+ 008051 QUALIFIER FOR NUMBER OF MISSING VALUES IN CALCULATION OF STATIST CODE TABLE 8051            0            0   3 CODE TABLE 8051           0         1
+ 008052 CONDITION FOR WHICH NUMBER OF DAYS OF OCCURRENCE FOLLOWS         CODE TABLE 8052            0            0   5 CODE TABLE 8052           0         2
+ 008053 DAY OF OCCURRENCE QUALIFIER                                      CODE TABLE 8053            0            0   2 CODE TABLE 8053           0         1
+ 008054 QUALIFIER FOR WIND SPEED OR WIND GUST                            CODE TABLE 8054            0            0   3 CODE TABLE 8054           0         1
+ 008060 SAMPLE SCANNING MODE SIGNIFICANCE                                CODE TABLE 8060            0            0   4 CODE TABLE 8060           0         2
+ 008065 SUN-GLINT INDICATOR                                              CODE TABLE 8065            0            0   2 CODE TABLE 8065           0         1
+ 008066 SEMI-TRANSPARENCY INDICATOR                                      CODE TABLE 8066            0            0   2 CODE TABLE 8066           0         1
+ 008070 TOVS/ATOVS PRODUCT QUALIFIER                                     CODE TABLE 8070            0            0   4 CODE TABLE 8070           0         2
+ 008072 PIXEL(S) TYPE                                                    CODE TABLE 8072            0            0   3 CODE TABLE 8072           0         1
+ 008074 ALTIMETER ECHO TYPE                                              CODE TABLE 8074            0            0   2 CODE TABLE 8074           0         1
+ 008075 ASCENDING/DESCENDING ORBIT QUALIFIER                             CODE TABLE 8075            0            0   2 CODE TABLE 8075           0         1
+ 008076 TYPE OF BAND                                                     CODE TABLE 8076            0            0   6 CODE TABLE 8076           0         2
+ 008079 AVIATION PRODUCT STATUS                                          CODE TABLE 8079            0            0   4 CODE TABLE 8079           0         2
+ 008081 TYPE OF EQUIPMENT                                                CODE TABLE 8081            0            0   6 CODE TABLE 8081           0         2
+ 008082 (CBS) ARTIFICIAL CORRECTION OF SENSOR HEIGHT TO ANOTHER VALUE    CODE TABLE 8082            0            0   3 CODE TABLE 8082           0         1
+ 008083 NOMINAL VALUE INDICATOR                                          FLAG TABLE 8083            0            0  15 FLAG TABLE 8083           0         5
+ 008085 BEAM IDENTIFIER                                                  CODE TABLE 8085            0            0   3 CODE TABLE 8085           0         1
+ 008090 DECIMAL SCALE                                                    NUMERIC                    0         -127   8 NUMERIC                   0         3
+ 008193 TIME QUALIFIER                                                   CODE TABLE 8193            0            0   6 CODE TABLE 8193           0         2 
+ 008194 TOVS/ATOVS PRODUCT QUALIFIER                                     CODE TABLE 8194            0            0   4 CODE TABLE 8194           0         2 
+ 008195 DATA TYPE                                                        CODE TABLE 8195            0            0   7 CODE TABLE 8195           0         3 
+ 008200 NUMBER OF OBSERVATIONS                                           NUMERIC                    0            0   8 NUMERIC                   0         3 
+ 008222 GENERATOR SIGNIFICANCE                                           CODE TABLE 8222            0            0   4 CODE TABLE 8222           0         2 
+ 008223 LAND/ICE SURFACE FLAG                                            FLAG TABLE 8223            0            0   7 FLAG TABLE 8223           0         3 
+ 008224 LAND/SEA FRACTION                                                NUMERIC                    3            0  10 NUMERIC                   3         4 
+ 008225 GHRSST SURFACE TYPE                                              FLAG TABLE 8225            0            0   5 FLAG TABLE 8225           0         2
+ 010001 HEIGHT OF LAND SURFACE                                           M                          0         -400  15 M                         0         5
+ 010002 HEIGHT                                                           M                         -1          -40  16 M                        -1         5
+ 010003 GEOPOTENTIAL                                                     M**2/S**2                 -1         -400  17 M**2/S**2                -1         6
+ 010004 PRESSURE                                                         PA                        -1            0  14 PA                       -1         5
+ 010007 HEIGHT                                                           M                          0        -1000  17 M                         0         6
+ 010008 GEOPOTENTIAL                                                     M**2/S**2                  0       -10000  20 M**2/S**2                 0         7
+ 010009 GEOPOTENTIAL HEIGHT                                              GPM                        0        -1000  17 GPM                       0         5
+ 010010 MINIMUM PRESSURE REDUCED TO MEAN SEA LEVEL                       PA                        -1            0  14 PA                       -1         5
+ 010011 MAXIMUM PRESSURE REDUCED TO MEAN SEA LEVEL                       PA                        -1            0  14 PA                       -1         5
+ 010031 IN DIRECTION OF THE NORTH POLE, DISTANCE FROM THE EARTH'S CENTRE M                          2  -1073741824  31 M                         2        10
+ 010032 SATELLITE DISTANCE TO EARTH'S CENTRE                             M                          1            0  27 M                         2         9
+ 010033 ALTITUDE (PLATFORM TO ELLIPSOID)                                 M                          1            0  27 M                         2         9
+ 010034 EARTH RADIUS                                                     M                          1            0  27 M                         2         9
+ 010035 EARTH'S LOCAL RADIUS OF CURVATURE                                M                          1     62000000  22 M                         1         8
+ 010036 GEOID UNDULATION (SEE NOTE 4)                                    M                          2       -15000  15 M                         2         6
+ 010040 NUMBER OF RETRIEVED LAYERS                                       NUMERIC                    0            0  10 NUMERIC                   0         4
+ 010050 STANDARD DEVIATION ALTITUDE                                      M                          2            0  16 M                         2         5
+ 010051 PRESSURE REDUCED TO MEAN SEA LEVEL                               PA                        -1            0  14 PA                       -1         5
+ 010052 ALTIMETER SETTING (QNH)                                          PA                        -1            0  14 PA                       -1         5
+ 010060 PRESSURE CHANGE                                                  PA                        -1        -1024  11 PA                       -1         4
+ 010061 3-HOUR PRESSURE CHANGE                                           PA                        -1         -500  10 PA                       -1         4
+ 010062 24-HOUR PRESSURE CHANGE                                          PA                        -1        -1000  11 PA                       -1         4
+ 010063 CHARACTERISTIC OF PRESSURE TENDENCY                              CODE TABLE 10063           0            0   4 CODE TABLE 10063          0         2
+ 010070 INDICATED AIRCRAFT ALTITUDE                                      M                          0         -400  16 M                         0         5
+ 010080 VIEWING ZENITH ANGLE                                             DEGREE                     2        -9000  15 DEGREE                    2         5
+ 010081 ALTITUDE OF COG ABOVE REFERENCE ELLIPSOID                        M                          3            0  31 M                         3        10
+ 010082 INSTANTANEOUS ALTITUDE RATE                                      MS-1                       3       -65536  17 MS-1                      3         6
+ 010083 SQUARED OFF NADIR ANGLE OF THE SATELLITE FROM PLATFORM DATA      DEGREE2                    2            0  16 DEGREE2                   2         5
+ 010084 SQUARED OFF NADIR ANGLE OF THE SATELLITE FROM WAVEFORM DATA      DEGREE2                    2            0  16 DEGREE2                   2         5
+ 010085 MEAN SEA SURFACE HEIGHT                                          M                          3      -131072  18 M                         3         6
+ 010086 GEOID'S HEIGHT                                                   M                          3      -131072  18 M                         3         6
+ 010087 OCEAN DEPTH/LAND ELEVATION                                       M                          1      -131072  18 M                         3         6
+ 010088 TOTAL GEOCENTRIC OCEAN TIDE HEIGHT SOLUTION 1                    M                          3       -32768  16 M                         3         5
+ 010089 TOTAL GEOCENTRIC OCEAN TIDE HEIGHT SOLUTION 2                    M                          3       -32768  16 M                         3         5
+ 010090 LONG PERIOD  TIDE HEIGHT                                         M                          3       -32768  16 M                         3         5
+ 010091 TIDAL LOADING HEIGHT                                             M                          3       -32768  16 M                         3         5
+ 010092 SOLID EARTH TIDE HEIGHT                                          M                          3       -32768  16 M                         3         5
+ 010093 GEOCENTRIC POLE TIDE HEIGHT                                      M                          3       -32768  16 M                         3         5
+ 010095 HEIGHT OF ATMOSPHERE USED                                        M                          0            0  16 M                         0         5
+ 010195 HEIGHT(HIGH ACCURACY)                                            M                          1        -4096  20  
+ 010196 SOLAR ZENITH ANGLE                                               DEGREE                     2        -9000  15  
+ 010197 ANEMOMETER HEIGHT                                                M                          0            0   9  
+ 011001 WIND DIRECTION                                                   DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011002 WIND SPEED                                                       M/S                        1            0  12 M/S                       1         4
+ 011003 U-COMPONENT                                                      M/S                        1        -4096  13 M/S                       1         4
+ 011004 V-COMPONENT                                                      M/S                        1        -4096  13 M/S                       1         4
+ 011005 W-COMPONENT                                                      PA/S                       1         -512  10 PA/S                      1         4
+ 011006 W-COMPONENT                                                      M/S                        2        -4096  13 M/S                       2         4
+ 011010 WIND DIRECTION ASSOCIATED WITH WIND SPEED WHICH FOLLOWS          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011011 WIND DIRECTION AT 10 M                                           DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011012 WIND SPEED AT 10 M                                               M/S                        1            0  12 M/S                       1         4
+ 011013 WIND DIRECTION AT 5 M                                            DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011014 WIND SPEED AT 5 M                                                M/S                        1            0  12 M/S                       1         4
+ 011016 EXTREME COUNTERCLOCKWISE WIND DIRECTION OF A VARIABLE WIND       DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011017 EXTREME CLOCKWISE WIND DIRECTION OF A VARIABLE WIND              DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011019 STEADINESS OF WIND (6)                                           %                          0            0   7 %                         0         3
+ 011021 RELATIVE VORTICITY                                               1/S                        9       -65536  17 1/S                       9         6
+ 011022 DIVERGENCE                                                       1/S                        9       -65536  17 1/S                       9         6
+ 011023 VELOCITY POTENTIAL                                               M**2/S                    -2       -65536  17 M**2/S                   -2         6
+ 011030 EXTENDED DEGREE OF TURBULENCE                                    CODE TABLE 11030           0            0   6 CODE TABLE                0         2
+ 011031 DEGREE OF TURBULENCE                                             CODE TABLE 11031           0            0   4 CODE TABLE 11031          0         2
+ 011032 HEIGHT OF BASE OF TURBULENCE                                     M                         -1          -40  16 M                        -1         5
+ 011033 HEIGHT OF TOP OF TURBULENCE                                      M                         -1          -40  16 M                        -1         5
+ 011034 VERTICAL GUST VELOCITY                                           M/S                        1        -1024  11 M/S                       1         4
+ 011035 VERTICAL GUST ACCELERATION                                       M/S**2                     2        -8192  14 M/S**2                    2         5
+ 011036 MAXIMUM DERIVED EQUIVALENT VERTICAL GUST SPEED                   M/S                        1            0  10 M/S                       1         4
+ 011037 TURBULENCE INDEX                                                 CODE TABLE 11037           0            0   6 CODE TABLE 11037          0         2
+ 011038 TIME OF OCCURRENCE OF PEAK EDDY DISSIPATION RATE                 CODE TABLE 11038           0            0   5 CODE TABLE 11038          0         2
+ 011039 EXTENDED TIME OF OCCURRENCE OF PEAK  EDDY DISSIPATION RATE       CODE TABLE 11039           0            0   6 CODE TABLE 11039          0         2
+ 011040 MAXIMUM WIND SPEED (MEAN WIND)                                   M/S                        1            0  12 M/S                       1         4
+ 011041 MAXIMUM WIND GUST SPEED                                          M/S                        1            0  12 M/S                       1         4
+ 011042 MAXIMUM WIND SPEED (10-MIN MEAN WIND)                            M/S                        1            0  12 M/S                       1         4
+ 011043 MAXIMUM WIND GUST DIRECTION                                      DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011044 MEAN WIND DIRECTION FOR SURFACE - 1500 M (5000 FEET)             DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011045 MEAN WIND SPEED FOR SURFACE - 1500 M (5000 FEET)                 M/S                        1            0  12 M/S                       1         4
+ 011046 MAXIMUM INSTANTANEOUS WIND SPEED                                 M/S                        1            0  12 M/S                       1         4
+ 011047 MAXIMUM INSTANTANEOUS WIND SPEED OVER 10 MINUTES                 M/S                        1            0  12 M/S                       1         4
+ 011049 STANDARD DEVIATION OF WIND DIRECTION                             DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011050 STANDARD DEVIATION OF HORIZONTAL WIND SPEED                      M/S                        1            0  12 M/S                       1         4
+ 011051 STANDARD DEVIATION OF VERTICAL WIND SPEED                        M/S                        1            0   8 M/S                       1         3
+ 011052 FORMAL UNCERTAINTY IN WIND SPEED                                 M/S                        2            0  13 M/S                       2         5
+ 011053 FORMAL UNCERTAINTY IN WIND DIRECTION                             DEGREE TRUE                2            0  15 DEGREE TRUE               2         5
+ 011054 MEAN WIND DIRECTION FOR 1500 M - 3000 M                          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 011055 MEAN WIND SPEED FOR 1500 M - 3000 M                              M/S                        1            0  12 M/S                       1         4
+ 011061 ABSOLUTE WIND SHEAR IN 1 KM LAYER BELOW                          M/S                        1            0  12 M/S                       1         4
+ 011062 ABSOLUTE WIND SHEAR IN 1 KM LAYER ABOVE                          M/S                        1            0  12 M/S                       1         4
+ 011070 DESIGNATOR OF THE RUNWAY AFFECTED BY WIND SHEAR (INCLUDING ALL)  CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 011071 TURBULENT VERTICAL MOMENTUM FLUX                                 M**2/S**2                  3         -128  14 M**2/S**2                 3         5
+ 011072 TURBULENT VERTICAL BUOYANCY FLUX                                 KM/S                       3         -128  11 KM/S                      3         4
+ 011073 TURBULENT KINETIC ENERGY                                         M**2/S**2                  2        -1024  13 M**2/S**2                 2         4
+ 011074 DISSIPATION ENERGY                                               M**2/S**2                  2        -1024  10 M**2/S**2                 2         4
+ 011075 MEAN TURBULENCE INTENSITY (EDDY DISSIPATION RATE)                M**(2/3)/S                 2            0   8 M**(2/3)/S                2         3
+ 011076 PEAK TURBULENCE INTENSITY (EDDY DISSIPATION RATE)                M**(2/3)/S                 2            0   8 M**(2/3)/S                2         3
+ 011077 REPORTING INTERVAL OR AVERAGING TIME FOR EDDY DISSIPATION RATE   S                          0            0  12 S                         0         4
+ 011081 MODEL WIND DIRECTION AT 10M                                      DEGREE TRUE                2            0  16 DEGREE TRUE               2         5
+ 011082 MODEL WIND SPEED AT 10M                                          M/S                        2            0  14 M/S                       2         4
+ 011083 WIND SPEED                                                       KM/HOUR                    0            0   9 KM/HOUR                   0         3
+ 011084 WIND SPEED                                                       KNOT                       0            0   8 KNOT                      0         3
+ 011085 MAXIMUM WIND GUST SPEED                                          KM/HOUR                    0            0   9 KM/HOUR                   0         3
+ 011086 MAXIMUM WIND GUST SPEED                                          KNOT                       0            0   8 KNOT                      0         3
+ 011095 U COMPONENT OF THE MODEL WIND VECTOR                             M/S                        1        -4096  13 M/S                       1         4
+ 011096 V COMPONENT OF THE MODEL WIND VECTOR                             M/S                        1        -4096  13 M/S                       1         4
+ 011192 U - COMPONENT AT 10 M                                            M/S                        1        -4096  13 M/S                       1         4^M
+ 011193 V - COMPONENT AT 10 M                                            M/S                        1        -4096  13 M/S                       1         4^M 
+ 011194 W - COMPONENT AT 10 M                                            M/S                        1        -4096  13 M/S                       1         4^M 
+ 011195 STEADINESS OF WIND                                               %                          0            0   7 %                         0         3 
+ 011196 FRICTION VELOCITY                                                M/S                        5            0  19  
+ 011201 HORIZONTAL LINE OF SIGHT COMPONENT                               M/S                        1        -4096  13  
+ 011210 1D VAR WIND SPEED RETREIVED ERRO(S)                              M/S                        2            0  12  
+ 011211 WIND SPEED INDEPENDENT ESTIMATE OF ERROR(S)                      M/S                        2            0  12  
+ 011220 FORMAL UNCERTAINTY IN WIND SPEED                                 M/S                        2            0  12  
+ 011221 FORMAL UNCERTAINTY IN WIND DIRECTION                             DEGREE TRUE                2            0  15  
+ 011230 MAXIMUM MEAN WIND SPEED                                          M/S                        1        -4096  13 M/S                       1         4^M 
+ 011231 MEAN WIND SPEED                                                  M/S                        1        -4096  13 M/S                       1         4^M 
+ 011232 MINIMUM MEAN WIND SPEED                                          M/S                        1        -4096  13 M/S                       1         4^M 
+ 011233 HIGHEST GUST DURING THE 10 MINUTE PERIOD PRECEDING OBSERVATION   M/S                        1        -4096  13 M/S                       1         4^M 
+ 012001 TEMPERATURE/DRY-BULB TEMPERATURE                                 K                          1            0  12 C                         1         3
+ 012002 WET-BULB TEMPERATURE                                             K                          1            0  12 C                         1         3
+ 012003 DEW-POINT TEMPERATURE                                            K                          1            0  12 C                         1         3
+ 012004 DRY-BULB TEMPERATURE AT 2 M                                      K                          1            0  12 C                         1         3
+ 012005 WET-BULB TEMPERATURE AT 2 M                                      K                          1            0  12 C                         1         3
+ 012006 DEW-POINT TEMPERATURE AT 2 M                                     K                          1            0  12 C                         1         3
+ 012007 VIRTUAL TEMPERATURE                                              K                          1            0  12 C                         1         3
+ 012011 MAXIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          1            0  12 C                         1         3
+ 012012 MINIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          1            0  12 C                         1         3
+ 012013 GROUND MINIMUM TEMPERATURE, PAST 12 HOURS                        K                          1            0  12 C                         1         3
+ 012014 MAXIMUM TEMPERATURE AT 2 M, PAST 12 HOURS                        K                          1            0  12 C                         1         3
+ 012015 MINIMUM TEMPERATURE AT 2 M, PAST 12 HOURS                        K                          1            0  12 C                         1         3
+ 012016 MAXIMUM TEMPERATURE AT 2 M, PAST 24 HOURS                        K                          1            0  12 C                         1         3
+ 012017 MINIMUM TEMPERATURE AT 2 M, PAST 24 HOURS                        K                          1            0  12 C                         1         3
+ 012021 MAXIMUM TEMPERATURE AT 2M                                        K                          2            0  16 C                         2         4
+ 012022 MINIMUM TEMPERATURE AT 2M                                        K                          2            0  16 C                         2         4
+ 012023 TEMPERATURE                                                      C                          0          -99   8 C                         0         2
+ 012024 DEW POINT TEMPERATURE                                            C                          0          -99   8 C                         0         2
+ 012030 SOIL TEMPERATURE                                                 K                          1            0  12 C                         1         3
+ 012049 TEMPERATURE CHANGE OVER SPECIFIED PERIOD                         K                          0          -30   6 C                         0         2
+ 012051 STANDARD DEVIATION TEMPERATURE                                   K                          1            0  10 C                         1         3
+ 012052 HIGHEST DAILY MEAN TEMPERATURE                                   K                          1            0  12 C                         1         3
+ 012053 LOWEST DAILY MEAN TEMPERATURE                                    K                          1            0  12 C                         1         3
+ 012061 SKIN TEMPERATURE                                                 K                          1            0  12 C                         1         3
+ 012062 EQUIVALENT BLACK BODY TEMPERATURE                                K                          1            0  12 C                         1         3
+ 012063 BRIGHTNESS TEMPERATURE                                           K                          1            0  12 C                         1         3
+ 012064 INSTRUMENT TEMPERATURE                                           K                          1            0  12 K                         1         4
+ 012065 STANDARD DEVIATION BRIGHTNESS TEMPERATURE                        K                          1            0  12 K                         1         4
+ 012070 WARM LOAD TEMPERATURE                                            K                          2            0  16 K                         2         5
+ 012071 COLDEST CLUSTER TEMPERATURE                                      K                          1            0  12 K                         1         4
+ 012072 RADIANCE                                                         WM**(-2)SR**(-1)           6            0  31 WM**(-2)SR**(-1)          6         9
+ 012073 TEMPERATURE                                                      K                          2            0  16 K                         2         5
+ 012075 SPECTRAL RADIANCE                                                WM**(-3)SR**(-1)          -3            0  16 WM**(-3)SR**(-1)         -3         5
+ 012076 RADIANCE                                                         WM**(-2)SR**(-1)           3            0  16 WM**(-2)SR**(-1)          3         5
+ 012101 TEMPERATURE/DRY-BULB TEMPERATURE                                 K                          2            0  16 C                         2         4
+ 012102 WET-BULB TEMPERATURE                                             K                          2            0  16 C                         2         4
+ 012103 DEW-POINT TEMPERATURE                                            K                          2            0  16 C                         2         4
+ 012104 DRY-BULB TEMPERATURE AT 2M                                       K                          2            0  16 C                         2         4
+ 012105 WEB-BULB TEMPERATURE AT 2M                                       K                          2            0  16 C                         2         4
+ 012106 DEW-POINT TEMPERATURE AT 2M                                      K                          2            0  16 C                         2         4
+ 012107 VIRTUAL TEMPERATURE                                              K                          2            0  16 C                         2         4
+ 012111 MAXIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          2            0  16 C                         2         4
+ 012112 MINIMUM TEMPERATURE, AT HEIGHT AND OVER PERIOD SPECIFIED         K                          2            0  16 C                         2         4
+ 012113 GROUND MINIMUM TEMPERATURE, PAST 12 HOURS                        K                          2            0  16 C                         2         4
+ 012114 MAXIMUM TEMPERATURE AT 2M, PAST 12 HOURS                         K                          2            0  16 C                         2         4
+ 012115 MINIMUM TEMPERATURE AT 2M, PAST 12 HOURS                         K                          2            0  16 C                         2         4
+ 012116 MAXIMUM TEMPERATURE AT 2M, PAST 24 HOURS                         K                          2            0  16 C                         2         4
+ 012117 MINIMUM TEMPERATURE AT 2M, PAST 24 HOURS                         K                          2            0  16 C                         2         4
+ 012118 MAXIMUM TEMPERATURE AT HEIGHT SPECIFIED, PAST 24 HOURS           K                          2            0  16 C                         2         4
+ 012119 MINIMUM  TEMPERATURE AT HEIGHT SPECIFIED, PAST 24 HOURS          K                          2            0  16 C                         2         4
+ 012121 GROUND MINIMUM TEMPERATURE                                       K                          2            0  16 C                         2         4
+ 012122 GROUND MINIMUM TEMPERATURE OF THE PRECEDING NIGHT                K                          2            0  16 C                         2         4
+ 012130 SOIL TEMPERATURE                                                 K                          2            0  16 C                         2         4
+ 012151 STANDARD DEVIATION OF DAILY MEAN TEMPERATURE                     K                          2            0  12 C                         2         4
+ 012152 HIGHEST DAILY MEAN TEMPERATURE                                   K                          2            0  16 C                         2         4
+ 012153 LOWEST DAILY MEAN TEMPERATURE                                    K                          2            0  16 C                         2         4
+ 012161 SKIN TEMPERATURE                                                 K                          2            0  16 C                         2         4
+ 012162 EQUIVALENT BLACK BODY TEMPERATURE                                K                          2            0  16 C                         2         4
+ 012163 BRIGHTNESS TEMPERATURE                                           K                          2            0  16 C                         2         4
+ 012164 INSTRUMENT TEMPERATURE                                           K                          2            0  16 K                         2         5
+ 012171 COLDEST CLUSTER TEMPERATURE                                      K                          2            0  16 K                         2         5
+ 012180 AVERAGED 12 MICRON BT FOR ALL CLEAR PIXELS AT NADIR              K                          2            0  16 K                         2         5
+ 012181 AVERAGED 11 MICRON BT FOR ALL CLEAR PIXELS AT NADIR              K                          2            0  16 K                         2         5
+ 012182 AVERAGED 3.7 MICRON BT FOR ALL CLEAR PIXELS AT NADIR             K                          2            0  16 K                         2         5
+ 012183 AVERAGED 12 MICRON BT FOR ALL CLEAR PIXELS, FORWARD VIEW         K                          2            0  16 K                         2         5
+ 012184 AVERAGED 11 MICRON BT FOR ALL CLEAR PIXELS, FORWARD VIEW         K                          2            0  16 K                         2         5
+ 012185 AVERAGED 3.7 MICRON BT FOR ALL CLEAR PIXELS, FORWARD VIEW        K                          2            0  16 K                         2         5
+ 012186 MEAN NADIR SEA SURFACE TEMPERATURE                               K                          2            0  16 K                         2         5
+ 012187 MEAN DUAL VIEW SEA SURFACE TEMPERATURE                           K                          2            0  16 K                         2         5
+ 012188 INTERPOLATED 23.8 GHZ BRIGHTNESS T FROM MWR                      K                          2            0  16 K                         2         5
+ 012189 INTERPOLATED 36.5 GHZ BRIGHTNESS T FROM MWR                      K                          2            0  16 K                         2         5
+ 012193 COLDEST CLUSTER TEMPERATURE                                      K                          1            0  12  
+ 012194 RADIANCE                                                         W/M**2*STER*M**(-1)        6            0  31  
+ 012195 SPECTRAL RADIANCE                                                W/M**2*STER*M**(-1)       10            0  31  
+ 012196 RADIANCE                                                         W/M**2*STER                3            0  16  
+ 012197 MAXIMUM TEMPERATURE AT 2M, PAST  3 HOURS                         K                          1            0  12  
+ 012198 MINIMUM TEMPERATURE AT 2M, PAST  3 HOURS                         K                          1            0  12  
+ 012199 MAXIMUM TEMPERATURE AT 2M, PAST  6 HOURS                         K                          1            0  12  
+ 012200 MINIMUM TEMPERATURE AT 2M, PAST  6 HOURS                         K                          1            0  12  
+ 013001 SPECIFIC HUMIDITY                                                KG/KG                      5            0  14 KG/KG                     5         5
+ 013002 MIXING RATIO                                                     KG/KG                      5            0  14 KG/KG                     5         5
+ 013003 RELATIVE HUMIDITY                                                %                          0            0   7 %                         0         3
+ 013004 VAPOUR PRESSURE                                                  PA                        -1            0  10 PA                       -1         4
+ 013005 VAPOUR DENSITY                                                   KG/M**3                    3            0   7 KG/M**3                   3         3
+ 013006 MIXING HEIGHTS                                                   M                         -1          -40  16 M                        -1         5
+ 013007 MINIMUM RELATIVE HUMIDITY                                        %                          0            0   7 %                         0         3
+ 013008 MAXIMUM RELATIVE HUMIDITY                                        %                          0            0   7 %                         0         3
+ 013009 RELATIVE HUMIDITY                                                %                          1        -1000  12 %                         1         4
+ 013011 TOTAL PRECIPITATION/TOTAL WATER EQUIVALENT                       KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013012 DEPTH OF FRESH SNOW                                              M                          2           -2  12 M                         2         4
+ 013013 TOTAL SNOW DEPTH                                                 M                          2           -2  16 M                         2         5
+ 013014 RAINFALL/WATER EQUIVALENT OF SNOW (AVERAGED RATE)                KG/(M**2)S                 4            0  12 KG/(M**2)S                4         4
+ 013015 SNOWFALL  (AVERAGED RATE)                                        M/S                        7            0  12 M/S                       7         4
+ 013016 PRECIPITABLE WATER                                               KG/M**2                    0            0   7 KG/M**2                   0         3
+ 013019 TOTAL PRECIPITATION PAST 1 HOUR                                  KG/M**2                    1           -1  14 KG/M**2                   1         4
+ 013020 TOTAL PRECIPITATION PAST 3 HOURS                                 KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013021 TOTAL PRECIPITATION PAST 6 HOURS                                 KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013022 TOTAL PRECIPITATION PAST 12 HOURS                                KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013023 TOTAL PRECIPITATION PAST 24 HOURS                                KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013031 EVAPOTRANSPIRATION                                               KG/M**2                    0            0   7 KG/M**2                   0         3
+ 013032 EVAPORATION/EVAPOTRANSPIRATION                                   KG/M**2                    1            0   8 KG/M**2                   1         3
+ 013033 EVAPORATION/EVAPOTRANSPIRATION                                   KG/M**2                    1            0  10 KG/M**2                   1         4
+ 013038 SUPERADIABATIC INDICATOR                                         CODE TABLE 13038           0            0   2 CODE TABLE 13038          0         1
+ 013039 TERRAIN TYPE (ICE/SNOW)                                          CODE TABLE 13039           0            0   3 CODE TABLE 13039          0         1
+ 013040 SURFACE FLAG                                                     CODE TABLE 13040           0            0   4 CODE TABLE 13040          0         2
+ 013041 PASQUILL-GIFFORD STABILITY CATEGORY                              CODE TABLE 13041           0            0   4 CODE TABLE 13041          0         2
+ 013042 PARCEL LIFTED INDEX (TO 500 HPA)                                 K                          0          -20   6 K                         0         2
+ 013043 BEST LIFTED INDEX (TO 500 HPA)                                   K                          0          -20   6 K                         0         2
+ 013044 K INDEX                                                          K                          0          -30   8 K                         0         3
+ 013045 KO INDEX                                                         K                          0          -30   8 K                         0         3
+ 013046 MAXIMUM BUOYANCY                                                 K                          0          -30   8 K                         0         3
+ 013047 MODIFIED SHOWALTER STABILITY INDEX                               K                          0          -60   6 C                         0         2
+ 013051 FREQUENCY GROUP, PRECIPITATION                                   CODE TABLE 13051           0            0   4 CODE TABLE 13051          0         2
+ 013052 HIGHEST DAILY AMOUNT OF PRECIPITATION                            KG/M**2                    1           -1  14 KG/M**2                   1         5
+ 013055 INTENSITY OF PRECIPITATION                                       KG/(M**2)S                 4            0   8 MM H-1                    1         3
+ 013056 CHARACTER AND INTENSITY OF PRECIPITATION                         CODE TABLE 13056           0            0   4 CODE TABLE 13056          0         2
+ 013057 TIME OF BEGINNING OR END OF PRECIPITATION                        CODE TABLE 13057           0            0   4 CODE TABLE 13057          0         2
+ 013058 SIZE OF PRECIPITATING ELEMENT                                    M                          4            0   7 MM                        1         3
+ 013059 NUMBER OF FLASHES (THUNDERSTORM)                                 NUMERIC                    0            0   7 NUMERIC                   0         3
+ 013060 TOTAL ACCUMULATED PRECIPITATION                                  KG/M**2                    1           -1  17 KG/M**2                   1         5
+ 013071 UPSTREAM WATER LEVEL                                             M                          2            0  14 M                         2         5
+ 013072 DOWNSTREAM WATER LEVEL                                           M                          2            0  14 M                         2         4
+ 013073 MAXIMUM WATER LEVEL                                              M                          2            0  14 M                         2         4
+ 013080 WATER PH                                                         pH                         1            0  10 pH                        1         3
+ 013081 WATER CONDUCTIVITY                                               S M-1                      3            0  14 S M-1                     3         4
+ 013082 WATER TEMPERATURE                                                K                          1            0  12 K                         1         4
+ 013083 DISSOLVED OXYGEN                                                 KG/M**3                    6            0  15 KG/M**3                   6         5
+ 013084 TURBIDITY                                                        LUMEN                      0            0  14 LUMEN                     0         4
+ 013085 OXYDATION REDUCTION POTENTIAL (ORP)                              V                          3            0  14 V                         3         4
+ 013090 RADIOMETER WATER VAPOUR CONTENT                                  KG/M**2                    1            0  10 KG/M**2                   1         4
+ 013091 RADIOMETER LIQUID CONTENT                                        KG/M**2                    2            0   8 KG/M**2                   2         3
+ 013093 CLOUD OPTICAL THICKNESS                                          NUMERIC                    0            0   8 NUMERIC                   0         3
+ 013095 TOTAL COLUMN WATER VAPOUR                                        KG/M**2                    4            0  19 KG/M**2                   4         6
+ 013096 MWR WATER VAPOUR CONTENT                                         KG/M**2                    2            0  14 KG/M**2                   2         4
+ 013097 MWR LIQUID WATER CONTENT                                         KG/M**2                    2            0  14 KG/M**2                   2         4
+ 013098 INTEGRATED WATER VAPOUR DENSITY                                  KG/M**2                    8            0  30 KG/M**2                   8        10   
+ 013193 RELATIVE HUMIDITY                                                %                          0            0   8  
+ 013194 TOTAL COLUMN WATER                                               KG/M**2                    2            0  11  
+ 013195 RAIN RATE                                                        KG/M**2HOUR                0            0   5  
+ 013196 ANTECEDENT PRECIPITATION INDEX                                   KG/M**2                    0            0   7  
+ 013197 TOTAL COLUMN WATER VAPOUR                                        KG/M**2                    1            0  10  
+ 013198 RAIN FLAG                                                        CODE TABLE 13198           0            0   3  
+ 013199 SPECIFIC HUMIDITY AT 2 M                                         KG/KG                      5            0  14  
+ 013201 CLOUD LIQUID WATER                                               KG/KG                      7            0  14  
+ 013202 TYPE OF SURFACE                                                  CODE TABLE 13202           0            0   8  
+ 013203 1D VAR ESTIMATE OF RAIN RATE                                     KG/M**2*HOUR               2            0  12  
+ 013204 SSMI INDEPENDENT ESTIMATE OF RAIN RATE                           KG/M**2*HOUR               2            0  12  
+ 013205 CLOUD LIQUID WATER PATH                                          KG/M**2                    4            0  14  
+ 013206 TOTAL PRECIPITATION ICE CONTENT                                  KG/M**2                    6            0  14  
+ 013207 TOTAL CLOUD LIQUID WATER                                         KG/M**2                    6            0  14  
+ 013208 SURFACE RAIN RATE ( INSTANTANEOUS )                              KG/M**2*S                  5            0  17  
+ 013209 RAIN POSSIBILITY                                                 NUMERIC                    0         -256   9  
+ 013210 1D VAR CLOUD LIQUID WATER PATH RETRIEVED ERROR(S)                KG/M**2                    4            0  14  
+ 013211 TOTAL PRECIPITABLE WATER INDIPENDENT ESTIMATE OF ERROR(S)        KG/M**2                    2            0  11  
+ 013212 CLOUD LIQUID WATER PATH INDIPENDENT ESTIMATE OF ERROR(S)         KG/M**2                    4            0  14  
+ 013230 CONVECTIVE PRECIPITATION                                         KG/M**2                    1           -1  14  
+ 013231 LARGE SCALE PRECIPITATION                                        KG/M**2                    1           -1  14  
+ 013240 AIR DENSITY                                                      KG/M**3                    3            0  10  
+ 013241 CONVECTIVE AVAILABLE POTENTIAL ENERGY                            J/KG                       1            0  17  
+ 014001 LONG-WAVE RADIATION, INTEGRATED OVER 24 HOURS                    J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014002 LONG-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED            J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014003 SHORT-WAVE RADIATION, INTEGRATED OVER 24 HOURS                   J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014004 SHORT-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED           J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014011 NET LONG-WAVE RADIATION, INTEGRATED OVER 24 HOURS                J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014012 NET LONG-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED        J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014013 NET SHORT-WAVE RADIATION, INTEGRATED OVER 24 HOURS               J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014014 NET SHORT-WAVE RADIATION, INTEGRATED OVER PERIOD SPECIFIED       J/M**2                    -3        -2048  12 J/M**2                   -3         4
+ 014015 NET RADIATION, INTEGRATED OVER 24 HOURS                          J/M**2                    -4       -16384  15 J/M**2                   -4         5
+ 014016 NET RADIATION, INTEGRATED OVER PERIOD SPECIFIED                  J/M**2                    -4       -16384  15 J/M**2                   -4         5
+ 014017 INSTANTANEOUS LONG-WAVE RADIATION (SEE NOTE 6)                   W/M**2                    -3        -2048  12 W/M**2                   -3         4
+ 014018 INSTANTANEOUS SHORT-WAVE RADIATION (SEE NOTE 6)                  W/M**2                    -3        -2048  12 W/M**2                   -3         4
+ 014019 SURFACE ALBEDO                                                   %                          0            0   7 %                         0         3
+ 014020 GLOBAL SOLAR RADIATION, INTEGRATED OVER 24 HOURS                 J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014021 GLOBAL SOLAR RADIATION, INTEGRATED OVER PERIOD SPECIFIED         J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014022 DIFFUSE SOLAR RADIATION, INTEGRATED OVER 24 HOURS                J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014023 DIFFUSE SOLAR RADIATION, INTEGRATED OVER PERIOD SPECIFIED        J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014024 DIRECT SOLAR RADIATION, INTEGRATED OVER 24 HOURS                 J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014025 DIRECT SOLAR RADIATION, INTEGRATED OVER PERIOD SPECIFIED         J/M**2                    -4            0  15 J/M**2                   -4         5
+ 014026 ALBEDO AT THE TOP OF CLOUDS                                      %                          0            0   7 %                         0         3
+ 014027 ALBEDO                                                           %                          0            0   7 %                         0         3
+ 014028 GLOBAL SOLAR RADIATION (HIGH ACCURACY), INTEGRATED OVER PERIOD S J/M**2                    -2            0  16 J/M**2                   -2         5
+ 014029 DIFFUSE SOLAR RADIATION (HIGH ACCURACY), INTEGRATED OVER PERIOD  J/M**2                    -2            0  16 J/M**2                   -2         5
+ 014030 DIRECT SOLAR RADIATION (HIGH ACCURACY), INTEGRATED OVER PERIOD S J/M**2                    -2            0  16 J/M**2                   -2         5
+ 014031 TOTAL SUNSHINE                                                   MINUTE                     0            0  11 MINUTE                    0         4
+ 014032 TOTAL SUNSHINE                                                   HOUR                       0            0  10 HOUR                      0         4
+ 014033 TOTAL SUNSHINE                                                   %                          0            0   9 %                         0         3
+ 014034 SUNSHINE OVER PERIOD SPECIFIED                                   MINUTE                     0            0  11 MINUTE                    0         4
+ 014042 BI-DIRECTIONAL REFLECTANCE                                       %                          0            0   7 %                         0         3
+ 014045 CHANNEL RADIANCE                                                 (W/M**2)*(1/SR)*CM         0            0  11 WM-2SR-1CM-1              0         4
+ 014046 SCALED IASI RADIANCE                                             (W/M**2)*(1/SR)*(1/M)      0        -5000  16 (W/M**2)*(1/SR)*(1/M)     0         5 
+ 014047 SCALED MEAN AVHRR RADIANCE                                       (W/M**2)*(1/SR)*(1/M)      0            0  31 (W/M**2)*(1/SR)*(1/M)     0        10
+ 014048 SCALED STANDARD DEVIATION RADIANCE                               (W/M**2)*(1/SR)*(1/M)      0            0  31 (W/M**2)*(1/SR)*(1/M)     0        10
+ 014050 EMISSIVITY (SEE NOTE 5)                                          %                          1            0  10 %                         1         4
+ 014051 DIRECT SOLAR RADIATION INTEGRATED OVER LAST HOUR                 J/M**2                    -3            0  14 JM-2                     -3         4
+ 014055 SOLAR ACTIVITY INDEX                                             NUMERIC                    0       -32768  16 NUMERIC                   0         5
+ 014061 (VAL) INSTANTANEOUS LONG-WAVE RADIATION                          W/M**2                     0         -512  10 W/M**2                    0         4
+ 014062 (VAL) INSTANTANEOUS SHORT-WAVE RADIATION                         W/M**2                     0        -2048  12 W/M**2                    0         4
+ 015001 TOTAL OZONE                                                      DU                         0            0  10 DU                        0         4
+ 015002 AIR MASS (SLANT PATH AT 22 KM)                                   NUMERIC                    2            0  10 NUMERIC                   2         3
+ 015003 MEASURED OZONE PARTIAL PRESSURE (SOUNDING)                       PA                         4            0   9 NBAR                      0         3
+ 015004 OZONE SOUNDING CORRECTION FACTOR                                 NUMERIC                    3            0  11 NUMERIC                   3         4
+ 015005 OZONE P                                                          DU                         0            0  10 DU                        0         3
+ 015008 SCALED MIXING RATIO                                              NUMERIC                    0            0  10 NUMERIC                   0         4
+ 015011 LOG 10 OF INTEGRATED ELECTRON DENSITY                            LOG (1/M2)                 3        14000  13 LOG (M-2)                 3         4
+ 015015 MAXIMUM IMAGE SPECTRAL COMPONENT BEFORE NORMALIZATION            NUMERIC                    0            0  31 NUMERIC                   0        10
+ 015020 INTEGRATED 03 DENSITY                                            KG/M**2                    8            0  21 KG/M**2                   8         7
+ 015021 INTEGRATED MASS DENSITY                                          KG/M**2                    0            0  10 KG/M**2                   0         4
+ 015024 OPTICAL DEPTH                                                    NUMERIC                    4            0  24 NUMERIC                   4         8
+ 015025 TYPE OF POLLUTANT                                                CODE TABLE 15025           0            0   4 CODE TABLE 15025          0         2
+ 015026 CONCENTRATION OF POLLUTANT                                       MOLMOL-1                   9            0   9 MOLMOL-1                  9         3
+ 015027 CONCENTRATION OF POLLUTANT                                       KG/M3                      9            0  10 KG/M3                     9         4
+ 015030 AEROSOL CONTAMINATION INDEX                                      NUMERIC                    2        -1000  12 NUMERIC                   2         4
+ 015031 ATMOSPHERIC PATH DELAY IN SATELLITE SIGNAL                       M                          4        10000  15 M                         4         5
+ 015032 ESTIMATED ERROR IN ATMOSPHERIC PATH DELAY                        M                          4            0  10 M                         4         4
+ 015033 DIFFERENCE IN PATH DELAYS FOR LIMB VIEWS AT EXTREMES OF SCAN     M                          5       -10000  15 M                         5         5
+ 015034 ESTIMATED ERROR IN PATH DELAY DIFFERENCE                         M                          5            0  14 M                         5         5
+ 015035 COMPONENT OF ZENITH PATH DELAY DUE TO WATER VAPOUR               M                          4            0  14 M                         4         5
+ 015036 ATMOSPHERIC REFRACTIVITY (SEE NOTE 5)                            N-UNITS                    3            0  19 N-UNITS                   3         6
+ 015037 BENDING ANGLE                                                    RADIANS                    8      -100000  23 RADIANS                   8         7
+ 015202 INTEGRATED ELECTRON DENSITY                                      1/M**2                     3        13000  12  
+ 019001 TYPE OF SYNOPTIC FEATURE                                         CODE TABLE 19001           0            0   6 CODE TABLE 19001          0         2
+ 019002 EFFECTIVE RADIUS OF FEATURE                                      M                         -2            0  12 M                        -2         4
+ 019003 WIND SPEED THRESHOLD                                             M/S                        0            0   8 M/S                       0         3
+ 019004 EFFECTIVE RADIUS WITH RESPECT TO WIND SPEEDS ABOVE THRESHOLD     M                         -2            0  12 M                        -2         4
+ 019005 DIRECTION OF MOTION OF FEATURE                                   DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 019006 SPEED OF MOTION OF FEATURE                                       M/S                        2            0  14 M/S                       2         5
+ 019007 EFFECTIVE RADIUS OF FEATURE                                      M                         -3            0  12 M                        -3         4
+ 019008 VERTICAL EXTENT OF CIRCULATION                                   CODE TABLE 19008           0            0   3 CODE TABLE 19008          0         1
+ 019009 EFFECTIVE RADIUS WITH RESPECT TO WIND SPEEDS ABOVE THRESHOLD (LA M                         -3            0  12 M                        -3         4
+ 019010 METHOD FOR TRACKING THE CENTRE OF SYNOPTIC FEATURE               CODE TABLE 19010           0            0   4 CODE TABLE 19010          0         2
+ 019100 TIME INTERVAL TO CALCULATE THE MOVEMENT OF THE TROPICAL CYCLONE  CODE TABLE 19100           0            0   4 CODE TABLE 19100          0         2
+ 019101 ACCURACY OF THE POSITION OF THE CENTRE OF THE TROPICAL CYCLONE   CODE TABLE 19101           0            0   4 CODE TABLE 19101          0         2
+ 019102 SHAPE AND DEFINITION OF THE EYE OF THE TROPICAL CYCLONE          CODE TABLE 19102           0            0   3 CODE TABLE 19102          0         1
+ 019103 DIAMETER OF MAJOR AXIS OF THE EYE OF THE TROPICAL CYCLONE        CODE TABLE 19103           0            0   4 CODE TABLE 19103          0         2
+ 019104 CHANGE IN CHARACTER OF THE EYE DURING THE 30 MINUTES             CODE TABLE 19104           0            0   4 CODE TABLE 19104          0         2
+ 019105 DISTANCE BETWEEN THE END OF SPIRAL BAND AND THE CENTRE           CODE TABLE 19105           0            0   4 CODE TABLE 19105          0         2
+ 019106 IDENTIFICATION NUMBER OF TROPICAL CYCLONE                        NUMERIC                    0            0   7 NUMERIC                   0         3
+ 019107 TIME INTERVAL OF THE TROPICAL CYCLONE ANALYSIS                   CODE TABLE 19107           0            0   4 CODE TABLE 19107          0         2
+ 019108 ACCURACY OF GEOGRAPHICAL POSITION OF THE TROPICAL CYCLONE        CODE TABLE 19108           0            0   3 CODE TABLE 19108          0         1
+ 019109 MEAN DIAMETER OF THE OVERCAST CLOUD OF THE TROPICAL CYCLONE      CODE TABLE 19109           0            0   4 CODE TABLE 19109          0         2
+ 019110 APPARENT 24-HOUR CHANGE IN INTENSITY OF TROPICAL CYCLONE         CODE TABLE 19110           0            0   4 CODE TABLE 19110          0         2
+ 019111 CURRENT INTENSITY (CI) NUMBER OF THE TROPICAL CYCLONE            NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019112 DATA TROPICAL (DT) NUMBER OF THE TROPICAL CYCLONE                NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019113 CLOUD PATTERN TYPE OF THE DT- NUMBER                             CODE TABLE 19113           0            0   4 CODE TABLE 19113          0         2
+ 019114 MODEL EXPECTED TROPICAL (MET) NUMBER OF THE TROPICAL CYCLONE     NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019115 TREND OF PAST 24-HOUR CHANGE (+: DEVELOPED, -: WEAKENED)         NUMERIC                    1          -30   6 NUMERIC                   1         2
+ 019116 PATTERN TROPICAL (PT) NUMBER OF THE TROPICAL CYCLONE             NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019117 CLOUD PICTURE TYPE OF THE PT- NUMBER                             CODE TABLE 19117           0            0   3 CODE TABLE 19117          0         1
+ 019118 FINAL TROPICAL (T) NUMBER OF THE TROPICAL CYCLONE                NUMERIC                    1            0   7 NUMERIC                   1         3
+ 019119 TYPE OF THE FINAL T-NUMBER                                       CODE TABLE 19119           0            0   3 CODE TABLE 19119          0         1
+ 019150 TYPHOON INTERNATIONAL COMMON NUMBER (TYPHOON COMMITTEE)          CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 020001 HORIZONTAL VISIBILITY                                            M                         -1            0  13 M                        -1         4
+ 020002 VERTICAL VISIBILITY                                              M                         -1            0   7 M                        -1         3
+ 020003 PRESENT WEATHER (SEE NOTE 1)                                     CODE TABLE 20003           0            0   9 CODE TABLE 20003          0         3
+ 020004 PAST WEATHER (1) (SEE NOTE 2)                                    CODE TABLE 20004           0            0   5 CODE TABLE 20004          0         2
+ 020005 PAST WEATHER (2) (SEE NOTE 2)                                    CODE TABLE 20005           0            0   5 CODE TABLE 20005          0         2
+ 020008 CLOUD DISTRIBUTION FOR AVIATION                                  CODE TABLE 20008           0            0   5 CODE TABLE 20008          0         2
+ 020009 GENERAL WEATHER INDICATOR (TAF/METAR)                            CODE TABLE 20009           0            0   4 CODE TABLE 20009          0         2
+ 020010 CLOUD COVER (TOTAL)                                              %                          0            0   7 %                         0         3
+ 020011 CLOUD AMOUNT                                                     CODE TABLE 20011           0            0   4 CODE TABLE 20011          0         2
+ 020012 CLOUD TYPE                                                       CODE TABLE 20012           0            0   6 CODE TABLE 20012          0         2
+ 020013 HEIGHT OF BASE OF CLOUD                                          M                         -1          -40  11 M                        -1         4
+ 020014 HEIGHT OF TOP OF CLOUD                                           M                         -1          -40  11 M                        -1         4
+ 020015 PRESSURE AT BASE OF CLOUD                                        PA                        -1            0  14 PA                       -1         5
+ 020016 PRESSURE AT TOP OF CLOUD                                         PA                        -1            0  14 PA                       -1         5
+ 020017 CLOUD TOP DESCRIPTION                                            CODE TABLE 20017           0            0   4 CODE TABLE 20017          0         2
+ 020018 TENDENCY OF RUNWAY VISUAL RANGE                                  CODE TABLE 20018           0            0   2 CODE TABLE 20018          0         1
+ 020019 SIGNIFICANT PRESENT OR FORECAST WEATHER                          CCITTIA5                   0            0  72 CHARACTER                 0         9
+ 020020 SIGNIFICANT RECENT WEATHER PHENOMENA                             CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 020021 TYPE OF PRECIPITATION                                            FLAG TABLE 20021           0            0  30 FLAG TABLE 20021          0        10
+ 020022 CHARACTER OF PRECIPITATION                                       CODE TABLE 20022           0            0   4 CODE TABLE 20022          0         2
+ 020023 OTHER WEATHER PHENOMENA                                          FLAG TABLE 20023           0            0  18 FLAG TABLE 20023          0         6
+ 020024 INTENSITY OF PHENOMENA                                           CODE TABLE 20024           0            0   3 CODE TABLE 20024          0         1
+ 020025 OBSCURATION                                                      FLAG TABLE 20025           0            0  21 FLAG TABLE 20025          0         7
+ 020026 CHARACTER OF OBSCURATION                                         CODE TABLE 20026           0            0   4 CODE TABLE 20026          0         2
+ 020027 PHENOMENA OCCURRENCE                                             FLAG TABLE 20027           0            0   9 FLAG TABLE 20027          0         3
+ 020029 RAIN FLAG                                                        CODE TABLE 20029           0            0   2 CODE TABLE 20029          0         1
+ 020031 ICE DEPOSIT (THICKNESS)                                          M                          2            0   7 M                         2         3
+ 020032 RATE OF ICE ACCRETION                                            CODE TABLE 20032           0            0   3 CODE TABLE 20032          0         1
+ 020033 CAUSE OF ICE ACCRETION                                           FLAG TABLE 20033           0            0   4 FLAG TABLE 20033          0         2
+ 020034 SEA ICE CONCENTRATION                                            CODE TABLE 20034           0            0   5 CODE TABLE 20034          0         2
+ 020035 AMOUNT AND TYPE OF ICE                                           CODE TABLE 20035           0            0   4 CODE TABLE 20035          0         2
+ 020036 ICE SITUATION                                                    CODE TABLE 20036           0            0   5 CODE TABLE 20036          0         2
+ 020037 ICE DEVELOPMENT                                                  CODE TABLE 20037           0            0   5 CODE TABLE 20037          0         2
+ 020038 BEARING OF ICE EDGE (SEE NOTE 3)                                 DEGREE TRUE                0            0  12 DEGREE TRUE               0         3
+ 020039 ICE DISTANCE                                                     M                         -1            0  13 M                        -1         4
+ 020040 EVOLUTION OF DRIFT OF SNOW                                       CODE TABLE 20040           0            0   4 CODE TABLE 20040          0         2
+ 020041 AIRFRAME ICING                                                   CODE TABLE 20041           0            0   4 CODE TABLE 20041          0         2
+ 020042 AIRFRAME ICING PRESENT                                           CODE TABLE 20042           0            0   2 CODE TABLE 20042          0         1
+ 020043 PEAK LIQUID WATER CONTENT                                        KG/M**3                    4            0   7 KG/M**3                   4         2
+ 020044 AVERAGE LIQUID WATER CONTENT                                     KG/M**3                    4            0   7 KG/M**3                   4         2
+ 020045 SUPERCOOLED LARGE DROPLET (SLD) CONDITIONS                       CODE TABLE 20045           0            0   2 CODE TABLE 20045          0         2
+ 020050 CLOUD INDEX                                                      CODE TABLE 20050           0            0   8 CODE TABLE 20050          0         3
+ 020051 AMOUNT OF LOW CLOUDS                                             %                          0            0   7 %                         0         3
+ 020052 AMOUNT OF MIDDLE CLOUDS                                          %                          0            0   7 %                         0         3
+ 020053 AMOUNT OF HIGH CLOUDS                                            %                          0            0   7 %                         0         3
+ 020054 TRUE DIRECTION FROM WHICH CLOUDS ARE MOVING                      DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 020055 STATE OF SKY IN TROPICS                                          CODE TABLE 20055           0            0   4 CODE TABLE 20055          0         2
+ 020056 CLOUD PHASE                                                      CODE TABLE 20056           0            0   3 CODE TABLE 20056          0         1
+ 020059 MINIMUM HORIZONTAL VISIBILITY                                    M                         -1            0   9 M                        -1         3
+ 020060 PREVAILING HORIZONTAL VISIBILITY                                 M                         -1            0  10 M                        -1         4
+ 020061 RUNWAY VISUAL RANGE (RVR)                                        M                          0            0  12 M                         0         4
+ 020062 STATE OF THE GROUND (WITH OR WITHOUT SNOW)                       CODE TABLE 20062           0            0   5 CODE TABLE 20062          0         2
+ 020063 SPECIAL PHENOMENA                                                CODE TABLE 20063           0            0  10 CODE TABLE 20063          0         4
+ 020065 SNOW COVER (SEE NOTE 4)                                          %                          0            0   7 %                         0         3
+ 020066 MAXIMUM DIAMETER OF HAILSTONES                                   M                          3            0   8 M                         3         3
+ 020067 DIAMETER OF DEPOSIT                                              M                          3            0   9 M                         3         3
+ 020070 MINIMUM NUMBER OF ATMOSPHERICS                                   NUMERIC                    0            0   7 NUMERIC                   0         3
+ 020071 ACCURACY OF FIX AND RATE OF ATMOSPHERICS                         CODE TABLE 20071           0            0   4 CODE TABLE 20071          0         2
+ 020081 CLOUD AMOUNT IN SEGMENT                                          %                          0            0   7 %                         0         3
+ 020082 AMOUNT SEGMENT CLOUD FREE                                        %                          0            0   7 %                         0         3
+ 020083 AMOUNT OF SEGMENT COVERED BY SCENE                               %                          0            0   7 %                         0         3
+ 020085 GENERAL CONDITION OF RUNWAY                                      CODE TABLE 20085           0            0   4 CODE TABLE 20085          0         1
+ 020086 RANWAY DEPOSITS                                                  CODE TABLE 20086           0            0   4 CODE TABLE 20086          0         1
+ 020087 RUNWAY CONTAMINATION                                             CODE TABLE 20087           0            0   4 CODE TABLE 20087          0         1
+ 020088 DEPTH OF RANWAY DEPOSITS                                         M                          3            0  12 M                         3         4
+ 020089 RUNWAY FRICTION COEFICIENT                                       CODE TABLE 20089           0            0   7 CODE TABLE 20089          0         2
+ 020090 SPECIAL CLOUDS                                                   CODE TABLE 20090           0            0   4 CODE TABLE 20090          0         2
+ 020091 VERTICAL VISIBILITY                                              FEET                      -2            0  10 FEET                     -2         3
+ 020092 HEIGHT OF BASE OF CLOUD                                          FEET                      -2            0  10 FEET                     -2         3
+ 020095 ICE PROBABILITY                                                  NUMERIC                    3            0  10 NUMERIC                   3         4
+ 020096 ICE AGE ("A" PARAMETER)                                          dB                         2        -4096  13 dB                        2         4
+ 020101 LOCUST (ACRIDIAN) NAME                                           CODE TABLE 20101           0            0   4 CODE TABLE 20101          0         2
+ 020102 LOCUST (MATURITY) COLOR                                          CODE TABLE 20102           0            0   4 CODE TABLE 20102          0         2
+ 020103 STAGE OF DEVELOPMENT OF LOCUSTS                                  CODE TABLE 20103           0            0   4 CODE TABLE 20103          0         2
+ 020104 ORGANIZATION STATE OF SWARM OR BAND OF LOCUSTS                   CODE TABLE 20104           0            0   4 CODE TABLE 20104          0         2
+ 020105 SIZE OF SWARM OR BAND OF LOCUSTS AND DURATION OF PASSAGE OF SWARMCODE TABLE 20105           0            0   4 CODE TABLE 20105          0         2
+ 020106 LOCUST POPULATION DENSITY                                        CODE TABLE 20106           0            0   4 CODE TABLE 20106          0         2
+ 020107 DIRECTION OF MOVEMENTS OF LOCUST SWARM                           CODE TABLE 20107           0            0   4 CODE TABLE 20107          0         2
+ 020108 EXTENT OF VEGETATION                                             CODE TABLE 20108           0            0   4 CODE TABLE 20108          0         2
+ 020193 CLOUD AMOUNT IN SEGMENT                                          %                          0            0   7 %                         0         3 
+ 020194 AMOUNT OF SEGMENT CLOUD FREE                                     %                          0            0   7 %                         0         3 
+ 020215 PRESSURE AT THE BASE OF CLOUD                                    PA                        -1            0  14 PA                       -1         5 
+ 020249 SEA-ICE FRACTION                                                 NUMERIC                    2            0   7 NUMERIC                   2         3
+ 020250 CALCULATED SURFACE TYPE                                          CODE TABLE 20250           0            0   5  
+ 020251 ICE AGE                                                          CODE TABLE 20251           0            0   3  
+ 020252 ICE EDGE                                                         CODE TABLE 20252           0            0   3  
+ 020253 SURFACE TYPE                                                     CODE TABLE 20253           0            0   3  
+ 020254 ICE CONCENTRATION                                                %                          0            0   7  
+ 021001 HORIZONTAL REFLECTIVITY                                          dB                         0          -64   7 dB                        0         3
+ 021002 VERTICAL REFLECTIVITY                                            dB                         0          -64   7 dB                        0         3
+ 021003 DIFFERENTIAL REFLECTIVITY                                        dB                         1           -5   7 dB                        1         3
+ 021005 LINEAR DEPOLARISATION RATIO                                      dB                         0          -65   6 dB                        0         2
+ 021006 CIRCULAR DEPOLARISATION RATIO                                    dB                         0          -65   6 dB                        0         2
+ 021011 DOPPLER MEAN VELOCITY IN X-DIRECTION                             M/S                        0         -128   8 M/S                       0         3
+ 021012 DOPPLER MEAN VELOCITY IN Y-DIRECTION                             M/S                        0         -128   8 M/S                       0         3
+ 021013 DOPPLER MEAN VELOCITY IN Z-DIRECTION                             M/S                        0         -128   8 M/S                       0         3
+ 021014 DOPPLER MEAN VELOCITY (RADIAL)                                   M/S                        1        -4096  13 M/S                       1         4
+ 021017 DOPPLER VELOCITY SPECTRAL WIDTH                                  M/S                        1            0   8 M/S                       1         3
+ 021021 ECHO TOPS                                                        M                         -3            0   4 M                        -3         2
+ 021030 SIGNAL TO NOISE RATIO                                            dB                         0          -32   8 dB                        0         3
+ 021031 VERTICALLY INTEGRATED LIQUID-WATER CONTENT                       KG/M**2                    0            0   7 KG/M**2                   0         3
+ 021036 RADAR RAINFALL INTENSITY                                         MM/HOUR                    2            0  16
+ 021041 BRIGHT-BAND HEIGHT                                               M                         -2            0   8 M                        -2         3
+ 021051 SIGNAL POWER ABOVE 1 MW                                          dB                         0         -256   8 dB                        0         3
+ 021062 BACKSCATTER                                                      dB                         2        -5000  13 dB                        2         4
+ 021063 RADIOMETRIC RESOLUTION (NOISE VALUE)                             %                          1            0  10 %                         1         4
+ 021064 CLUTTER NOISE ESTIMATE                                           NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021065 MISSING PACKET COUNTER                                           NUMERIC                    0         -127   8 NUMERIC                   0         3
+ 021066 WAVE SCATTEROMETER PRODUCT CONFIDENCE DATA                       FLAG TABLE 21066           0            0  12 FLAG TABLE 21066          0         4
+ 021067 WIND PRODUCT CONFIDENCE DATA                                     FLAG TABLE 21067           0            0  13 FLAG TABLE 21067          0         5
+ 021068 RADAR ALTIMETER PRODUCT CONFIDENCE DATA                          FLAG TABLE 21068           0            0   8 FLAG TABLE 21068          0         3
+ 021069 SST PRODUCT CONFIDENCE DATA                                      FLAG TABLE 21069           0            0  10 FLAG TABLE 21069          0         4
+ 021070 SST PRODUCT CONFIDENCE DATA (SADIST-2)                           FLAG TABLE 21070           0            0  23 FLAG TABLE 21070          0         6
+ 021071 PEAKINESS                                                        NUMERIC                    0            0  16 NUMERIC                   0         5
+ 021072 SATELLITE ALTIMETER CALIBRATION STATUS                           FLAG TABLE 21072           0            0   4 FLAG TABLE 21072          0         2
+ 021073 SATELLLITE ALTIMETER INSTRUMENT MODE                             FLAG TABLE 21073           0            0   9 FLAG TABLE 21073          0         3
+ 021075 IMAGE SPECTRUM INTENSITY                                         NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021076 REPRESENTATION OF INTENSITIES                                    CODE TABLE 21076           0            0   3 CODE TABLE 21076          0         1
+ 021077 ALTITUDE CORRECTION (IONOSPHERE)                                 M                          3            0  14 M                         3         5
+ 021078 ALTITUDE CORRECTION (DRY TROPOSPHERE)                            M                          3            0   9 M                         3         3
+ 021079 ALTITUDE CORRECTION (WET TROPOSPHERE)                            M                          3         2000  10 M                         3         4
+ 021080 ALTITUDE CORRECTION (CALIBRATION CONSTANT)                       M                          3            0  11 M                         3         4
+ 021081 OPEN LOOP CORRECTION (HEIGHT-TIME LOOP)                          M                          3            0  10 M                         3         4
+ 021082 OPEN LOOP CORRECTION (AUTO GAIN CONTROL)                         dB                         3        -3000  14 dB                        3         5
+ 021083 WARM TARGET CALIBRATION                                          NUMERIC                    0            0  16 NUMERIC                   0         5
+ 021084 COLD TARGET CALIBRATION                                          NUMERIC                    0            0  16 NUMERIC                   0         5
+ 021085 ATSR SEA SURFACE TEMPERATURE ACROSS- TRACK BAND NUMBER           NUMERIC                    0            0   4 NUMERIC                   0         2
+ 021086 NUMBER OF PIXELS IN NADIR ONLY, AVERAGE                          NUMERIC                    0            0   9 NUMERIC                   0         3
+ 021087 NUMBER OF PIXELS IN DUAL VIEW, AVERAGE                           NUMERIC                    0            0   9 NUMERIC                   0         3
+ 021088 WET BACKSCATTER                                                  dB                         2        -5000  13 dB                        2         4
+ 021091 RADAR SIGNAL DOPPLER SPECTRUM 0TH MOMENT                         dB                         0         -100   8 dB                        0         3
+ 021092 RASS SIGNAL DOPPLER SPECTRUM 0TH MOMENT, REFERRING TO RASS SIGNA dB                         0         -100   8 dB                        0         3
+ 021093 Ku BAND PEAKINESS                                                NUMERIC                    3            0  16 NUMERIC                   0         5
+ 021094 S BAND PEAKINESS                                                 NUMERIC                    3            0  16 NUMERIC                   0         5
+ 021101 NUMBER OF VECTOR AMBIGUITIES                                     NUMERIC                    0            0   3 NUMERIC                   0         1
+ 021102 INDEX OF SELECTED WIND VECTOR                                    NUMERIC                    0            0   3 NUMERIC                   0         1
+ 021103 TOTAL NUMBER OF SIGMA-0 MEASUREMENTS                             NUMERIC                    0            0   5 NUMERIC                   0         2
+ 021104 LIKELIHOOD COMPUTED FOR SOLUTION                                 NUMERIC                    3       -30000  15 NUMERIC                   3         5
+ 021105 NORMALIZED RADAR CROSS-SECTION                                   dB                         2       -10000  14 dB                        2         5
+ 021106 KP VARIANCE COEFFICIENT (ALPHA)                                  NUMERIC                    3            0  14 NUMERIC                   3         5
+ 021107 KP VARIANCE COEFFICIENT (BETA)                                   NUMERIC                    8            0  16 NUMERIC                   8         5
+ 021109 SEAWINDS WIND VECTOR CELL QUALITY                                FLAG TABLE 21109           0            0  17 FLAG TABLE 21109          0         6
+ 021110 NUMBER OF INNER-BEAM SIGMA-0 (FORWARD OF SATELLITE)              NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021111 NUMBER OF OUTER-BEAM SIGMA-0 (FORWARD OF SATELLITE)              NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021112 NUMBER OF INNER-BEAM SIGMA-0 (AFT OF SATELLITE)                  NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021113 NUMBER OF OUTER-BEAM SIGMA-0 (AFT OF SATELLITE)                  NUMERIC                    0            0   6 NUMERIC                   0         2
+ 021114 KP VARIANCE COEFFICENT (GAMMA)                                   dB                         3      -140000  18 dB                        3         6
+ 021115 SEAWINDS SIGMA-0 QUALITY                                         FLAG TABLE 21115           0            0  17 FLAG TABLE 21115          0         6
+ 021116 SEAWINDS SIGMA-0 MODE                                            FLAG TABLE 21116           0            0  17 FLAG TABLE 21116          0         6
+ 021117 SIGMA-0 VARIANCE QUALITY CONTROL                                 NUMERIC                    2            0  16 NUMERIC                   2         5
+ 021118 ATTENUATION CORRECTION ON SIGMA-0                                dB                         2       -10000  14 dB                        2         5
+ 021119 WIND SCATTEROMETER GEOPHYSICAL MODEL FUNCTION                    CODE TABLE 21119           0            0   6 CODE TABLE 21119          0         2
+ 021120 PROBABILITY OF RAIN                                              NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021121 SEAWINDS NOF* RAIN INDEX                                         NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021122 ATTENUATION CORRECTION OF SIGMA-0 (FROM TB)                      dB                         2       -10000  14 dB                        2         5
+ 021123 SEAWINDS NORMALIZED RADAR CROSS SECTION                          dB                         2       -30000  15 dB                        2         5
+ 021128 NUMBER OF VALID POINTS PER SECOND USED TO DERIVE PREVIOUS PARAME NUMERIC                    0            0   8 NUMERIC                   0         3
+ 021130 SPECTRUM TOTAL ENERGY                                            NUMERIC                    6            0  28 NUMERIC                   6         9
+ 021131 SPECTRUM MAX ENERGY                                              NUMERIC                    6            0  28 NUMERIC                   6         9
+ 021132 DIRECTION OF SPECTRUM MAX ON HIGHER RESOLUTION GRID              DEGREE                     3            0  19 DEGREE                    3         6
+ 021133 WAVE-LENGTH OF SPECTRUM MAX ON HIGHER RESOLUTION GRID            M                          3            0  29 M                         3         9
+ 021134 RANGE RESOLUTION OF CRESS COVARIANCE SPECTRUM                    RAD/M                      3            0  19 RAD/M                     3         6
+ 021135 REAL PART OF CROSS SPECTRA POLAR GRID NUMBER OF BINS             NUMERIC                    3      -524288  20 NUMERIC                   3         7
+ 021136 IMAGINARY PART OF CROSS SPECTRA POLAR GRID NUMBER OF BINS        NUMERIC                    3      -524288  20 NUMERIC                   3         7
+ 021137 KU BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT                  dB                         2       -32768  16 dB                        2         5
+ 021138 STD KU BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT              dB                         2       -32768  16 dB                        2         5
+ 021139 KU BAND NET INSTRUMENTAL CORRECTION FOR AGC                      dB                         2        -2048  12 dB                        2         4
+ 021140 S BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT                   dB                         2       -32768  16 dB                        2         5
+ 021141 STD S BAND CORRECTED OCEAN BACKSCATTER COEFFICIENT               dB                         2       -32768  16 dB                        2         5
+ 021142 S BAND NET INSTRUMENTAL CORRECTION FOR AGC                       dB                         2        -1024  11 dB                        2         4
+ 021143 KU BAND RAIN ATTENUATION                                         dB                         2  -1073741824  31 dB                        2        10
+ 021144 ALTIMETER RAIN FLAG                                              FLAG TABLE 21144           0            0   2 FLAG TABLE 21144          0         1
+ 021150 BEAM COLLOCATION                                                 CODE TABLE 21150           0            0   2 CODE TABLE 21150          0         1
+ 021151 ESTIMATED ERROR IN SIGMA0 AT 40DEG INCIDENCE ANGLE               dB                         2            0   9 dB                        2         3
+ 021152 SLOPE AT 40DEG INCIDENCE ANGLE                                   dB/DEG                     2          -80   7 dB/DEG                    2         3
+ 021153 ESTIMATED ERROR IN SLOPE AT 40DEG INCIDENCE ANGLE                dB/DEG                     2          -40   6 dB/DEG                    2         3
+ 021154 SOIL MOISTURE SENSITIVITY                                        dB                         2            0  12 dB                        2         4
+ 021155 WIND VECTOR CELL QUALITY                                         FLAG TABLE 21155           0            0  24 FLAG TABLE 21155          0         8
+ 021156 BACKSCATTER DISTANCE                                             NUMERIC                    1        -4096  13 NUMERIC                   1         4
+ 021157 LOSS PER UNIT LENGTH OF ATMOSPHERE USED                          dB/M                      10            0  22 dB/M                     10         7
+ 021158 ASCAT kp ESTIMATE QUALITY                                        CODE TABLE 21158           0            0   2 CODE TABLE 21158          0         1
+ 021159 ASCAT SIGMA-0 USABILITY                                          CODE TABLE 21159           0            0   2 CODE TABLE 21159          0         1
+ 021160 ASCAT USE OF SYNTHETIC DATA                                      NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021161 ASCAT SYNTHETIC DATA QUALITY                                     NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021162 ASCAT SATELLITE ORBIT AND ATTITUDE QUALITY                       NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021163 ASCAT SOLAR ARRAY REFLECTION CONTAMINATION                       NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021164 ASCAT TELEMETRY PRESENCE AND QUALITY                             NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021165 ASCAT EXTRAPOLATED REFERENCE FUNCTION PRESENCE                   NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021166 ASCAT LAND FRACTION                                              NUMERIC                    3            0  10 NUMERIC                   3         4
+ 021193 NOISE FIGURE                                                     %                          0            0   7  
+ 021194 BACKGROUND NOISE LEVEL                                           NUMERIC                    0            0   8  
+ 021195 MISSING PACKET COUNTER                                           NUMERIC                    0         -127   8  
+ 021196 UWA PRODUCT CONFIDENCE                                           FLAG TABLE 21196           0            0  12  
+ 021197 UWI PRODUCT CONFIDENCE                                           FLAG TABLE 21197           0            0  12  
+ 021198 dBZ-VALUE OFFSET (ALPHA)                                         dB                         0         -640  11
+ 021199 dBZ-VALUE INCREMENT (BETA)                                       dB                         1            0   7
+ 021200 HEIGHT OF CAPPI                                                  M                          0        -1000  15
+ 021201 RANGE-BIN SIZE                                                   M                          0            0  14
+ 021202 AZIMUTHAL RESOLUTION                                             DEGREE                     1            0   8
+ 021203 RANGE-BIN OFFSET                                                 M                         -1            0  14
+ 021204 aZIMUTH OFFSET                                                   M                          1            0  12
+ 021205 V-VALUE OFFSET (AV)                                              M/S                        2       -16384  15
+ 021206 V-VALUE INCREMENT (BV)                                           M/S                        2            0   8
+ 021207 W-VALUE OFFSET (AW)                                              M/S                        2            0  14
+ 021208 W-VALUE INCREMENT (BW)                                           M/S                        2            0   8
+ 021210 ALTITUDE CORRECTION (CALIBRATION CONSTANT)                       M                          3            0  11  
+ 021211 OPEN LOOP CORRECTION (HTL)                                       M                          3            0  10  
+ 021212 OPEN LOOP CORRECTION (AGC)                                       dB                         3        -3000  14  
+ 021213 AMBIGUITY REMOVAL CONFIDENCE                                     %                          0            0   7  
+ 021214 UAT QUALITY SUMMARY                                              CODE TABLE 21214           0            0   3  
+ 021215 UAT ACROSS-TRACK BAND NO.                                        NUMERIC                    0            0   4  
+ 021222 DOPPLER SPECTRUM 0 TH MOMENT (AMPLITUDE)                         dB                         0            0   7  
+ 021225 PRESCAT PRODUCT CONFIDENCE                                       FLAG TABLE 21225           0            0   6  
+ 021226 BACKSCATER DISTANCE                                              NUMERIC                    1        -4096  13  
+ 021230 NUMBER OF VECTOR AMBIGUITIES                                     NUMERIC                    0            0   3  
+ 021231 INDEX OF SELECTED WIND VECTOR                                    NUMERIC                    0            0   3  
+ 021232 TOTAL NMBER OF SIGMA-0 MEASUREMENTS                              NUMERIC                    0            0   5  
+ 021233 NUMBER OF SIGMA-0 USABLE FOR WIND                                NUMERIC                    0            0   5  
+ 021234 LIKELIHOOD COMPUTED FOR SOLUTION                                 NUMERIC                    1       -10000  14  
+ 021235 WIND VECTOR CELL QUALITY FLAG                                    FLAG TABLE 21235           0            0   3  
+ 021236 NUMBER OF FORE-BEAM SIGMA-0                                      NUMERIC                    1            0   6  
+ 021237 NUMBER OF MID-BEAM V-POL SIGMA-0                                 NUMERIC                    1            0   6  
+ 021238 NUMBER OF MID-BEAM H-POL SIGMA-0                                 NUMERIC                    1            0   6  
+ 021239 NUMBER OF AFT-BEAM SIGMA-0                                       NUMERIC                    1            0   6  
+ 021240 NORMALIZED RADAR CROSS SECTION                                   NUMERIC                    2       -10000  14  
+ 021241 Kp VARIANCE COEFFICIENT (ALPHA)                                  NUMERIC                    5            0  14  
+ 021242 Kp VARIANCE COEFFICIENT (BETHA)                                  NUMERIC                    6            0  16  
+ 021243 Kp VARIANCE COEFFICIENT (GAMMA)                                  NUMERIC                    6            0  16  
+ 021244 SIGMA-0 QUALITY FLAG                                             FLAG TABLE 21244           0            0  15  
+ 022001 DIRECTION OF WAVES                                               DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022002 DIRECTION OF WIND WAVES                                          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022003 DIRECTION OF SWELL WAVES                                         DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022004 DIRECTION OF CURRENT                                             DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022005 DIRECTION OF SEA SURFACE CURRENT                                 DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022011 PERIOD OF WAVES                                                  S                          0            0   6 S                         0         2
+ 022012 PERIOD OF WIND WAVES                                             S                          0            0   6 S                         0         2
+ 022013 PERIOD OF SWELL WAVES                                            S                          0            0   6 S                         0         2
+ 022021 HEIGHT OF WAVES                                                  M                          1            0  10 M                         1         4
+ 022022 HEIGHT OF WIND WAVES                                             M                          1            0  10 M                         1         4
+ 022023 HEIGHT OF SWELL WAVES                                            M                          1            0  10 M                         1         4
+ 022025 STANDARD DEVIATION WAVE HEIGHT                                   M                          2            0  10 M                         2         4
+ 022026 STANDARD DEVIATION OF SIGNIFICANT WAVE HEIGHT                    M                          2            0  10 M                         2         4
+ 022031 SPEED OF CURRENT                                                 M/S                        2            0  13 M/S                       2         4
+ 022032 SPEED OF SEA SURFACE CURRENT                                     M/S                        2            0  13 M/S                       2         4
+ 022035 TIDAL ELEVATION WITH RESPECT TO LOCAL CHART DATUM                M                          2            0  14 M                         2         4
+ 022036 METEOROLOGICAL RESIDUAL TIDAL ELEVATION (SURGE OR OFFSET)        M                          2            0  14 M                         2         4
+ 022037 TIDAL ELEVATION WITH RESPECT TO NATIONAL LAND DATUM              M                          3       -10000  15 M                         3         5
+ 022038 TIDAL ELEVATION WITH RESPECT TO LOCAL CHART DATUM                M                          3       -10000  15 M                         3         5
+ 022039 METEOROLOGICAL RESIDUAL TIDAL ELEVATION (SURGE OR OFFSET)        M                          3        -5000  12 M                         3         4
+ 022040 METEOROLOGICAL RESIDUAL TIDAL ELEVATION (SURGE OR OFFSET)        M                          3        -5000  14 M                         3         5
+ 022041 SEA-SURFACE TEMPERATURE (15-DAY RUNNING MEAN)                    K                          1            0  12 K                         1         4
+ 022042 SEA/WATER TEMPERATURE                                            K                          1            0  12 K                         1         4
+ 022043 SEA/WATER TEMPERATURE                                            K                          2            0  15 K                         2         5
+ 022044 SOUND VELOCITY                                                   M/S                        1            0  14 M/S                       1         5
+ 022045 SEA/WATER TEMPERATURE                                            K                          3            0  19 K                         3         6
+ 022049 SEA SURFACE TEMPERATURE                                          K                          2            0  15 K                         2         5
+ 022050 STANDARD DEVIATION SEA-SURFACE TEMPERATURE                       K                          2            0   8 K                         2         3
+ 022055 FLOAT CYCLE NUMBER                                               NUMERIC                    0            0  10 NUMERIC                   0         3
+ 022056 DIRECTION OF PROFILE                                             CODE TABLE 22056           0            0   2 CODE TABLE 22056          0         1
+ 022059 SEA SURFACE SALINITY                                             PART PER THOUSAND          2            0  14 PART PER THOUSAND         2         5
+ 022060 LAGRANGIAN DRIFTER DROGUE STATUS                                 CODE TABLE 22060           0            0   3 CODE TABLE 22060          0         1
+ 022061 STATE OF THE SEA                                                 CODE TABLE 22061           0            0   4 CODE TABLE 22061          0         2
+ 022062 SALINITY                                                         PART PER THOUSAND          2            0  14 PART PER THOUSAND         2         5
+ 022063 TOTAL WATER DEPTH                                                M                          0            0  14 M                         0         5
+ 022064 SALINITY                                                         PART PER THOUSAND          3            0  17 PART PER THOUSAND         3         6
+ 022065 WATER PRESSURE                                                   PA                        -3            0  17 PA                       -3         6
+ 022066 WATER CONDUCTIVITY                                               S M-1                      6            0  26 S M-1                     6         8
+ 022067 INSTRUMENT TYPE FOR WATER TEMPERATURE PROFILE MEASUREMENT        CODE TABLE 22067           0            0  10 CODE TABLE 22067          0         4
+ 022068 WATER TEMPERATURE PROFILE RECORDER TYPES                         CODE TABLE 22068           0            0   7 CODE TABLE 22068          0         3
+ 022069 SPECTRAL WAVE DENSITY                                            M2HZ-1                     3            0  22 M2HZ-1                    3         7
+ 022070 SIGNIFICANT WAVE HEIGHT                                          M                          2            0  13 M                         2         4
+ 022071 SPECTRAL PEAK WAVE PERIOD                                        S                          1            0   9 S                         1         3
+ 022072 SPECTRAL PEAK WAVE LENGTH                                        M                          0            0  13 M                         0         4
+ 022073 MAXIMUM WAVE HEIGHT                                              M                          2            0  13 M                         2         4
+ 022074 AVERAGE WAVE PERIOD                                              S                          1            0   9 S                         1         3
+ 022075 AVERAGE WAVE LENGTH                                              M                          0            0  13 M                         0         4
+ 022076 DIRECTION FROM WHICH DOMINANT WAVES ARE COMING                   DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022077 DIRECTIONAL SPREAD OF DOMINANT WAVE                              DEGREE                     0            0   9 DEGREE                    0         3
+ 022078 DURATION OF WAVE RECORD                                          S                          0            0  12 S                         0         4
+ 022079 LENGTH OF WAVE RECORD                                            M                          0            0  16 M                         0         5
+ 022080 WAVEBAND CENTRAL FREQUENCY                                       Hz                         3            0  10 Hz                        3         4
+ 022081 WAVEBAND CENTRAL WAVE NUMBER                                     1/M                        5            0  13 1/M                       5         4
+ 022082 MAXIMUM NON-DIRECTIONAL SPECTRAL WAVE DENSITY                    M**2S                      2            0  20 M**2S                     2         7
+ 022083 MAXIMUM NON-DIRECTIONAL SPECTRAL WAVE NUMBER                     M**3                       2            0  20 M**3                      2         7
+ 022084 BAND CONTAINING MAXIMUM NON- DIRECTIONAL SPECTRAL WAVE DENSITY   NUMERIC                    0            0   7 NUMERIC                   0         3
+ 022085 SPECTRAL WAVE DENSITY RATIO                                      NUMERIC                    0            0   7 NUMERIC                   0         3
+ 022086 MEAN DIRECTION FROM WHICH WAVES ARE COMING                       DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022087 PRINCIPAL DIRECTION FROM WHICH WAVES ARE COMING                  DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022088 FIRST NORMALIZED POLAR COORDINATE FROM FOURIER COEFFICIENTS      NUMERIC                    2            0   7 NUMERIC                   2         3
+ 022089 SECOND NORMALIZED POLAR COORDINATE FROM FOURIER COEFFICIENTS     NUMERIC                    2            0   7 NUMERIC                   2         3
+ 022090 NON-DIRECTIONAL SPECTRAL ESTIMATE BY WAVE FREQUENCY              M**2S                      2            0  20 M**2S                     2         7
+ 022091 NON-DIRECTIONAL SPECTRAL ESTIMATE BY WAVE NUMBER                 M**3                       2            0  20 M**3                      2         7
+ 022092 DIRECTIONAL SPECTRAL ESTIMATE BY WAVE FREQUENCY                  M**2S/RAD                  2            0  20 M**2S/RAD                 2         7
+ 022093 DIRECTIONAL SPECTRAL ESTIMATE BY WAVE NUMBER                     M**4                       2            0  20 M**4                      2         7
+ 022094 TOTAL NUMBER OF WAVE BANDS                                       NUMERIC                    0            0   7 NUMERIC                   0         3
+ 022095 DIRECTIONAL SPREAD OF INDIVIDUAL WAVES                           DEGREE                     0            0   8 DEGREE                    0         3
+ 022096 SPECTRAL BAND WIDTH                                              1/S                        3            0   4 1/S                       3         2
+ 022097 MEAN WAVELENGTH > 731 M OF IMAGE SPECTRUM AT LOW WAVE NUMBERS    M                          0            0  14 M                         0         5
+ 022098 WAVELENGTH SPREAD (WAVELENGTH > 731 M) AT LOW WAVE NUMBERS       M                          0            0  14 M                         0         5
+ 022099 MEAN DIRECTION AT LOW WAVE NUMBERS (WAVELENGTH > 731 M)          DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 022100 DIRECTION SPREAD AT LOW WAVE NUMBERS(WAVELENGTH > 731 M)         DEGREE                     0            0   9 DEGREE                    0         3
+ 022101 TOTAL ENERGY (WAVELENGTH > 731M) AT LOW WAVE NUMBERS             NUMERIC                    0            0  31 NUMERIC                   0        10
+ 022120 TIDE STATION AUTOMATED WATER LEVEL CHECK                         CODE TABLE 22120           0            0   5 CODE TABLE 22120          0         2
+ 022121 TIDE STATION MANUAL WATER LEVEL CHECK                            CODE TABLE 22121           0            0   5 CODE TABLE 22121          0         2
+ 022122 TIDE STATION AUTOMATED METEOROLOGICAL DATA CHECK                 CODE TABLE 22122           0            0   5 CODE TABLE 22122          0         2
+ 022123 TIDE STATION MANUAL METEOROLOGICAL DATA CHECK                    CODE TABLE 22123           0            0   5 CODE TABLE 22123          0         2
+ 022141 SEA-SURFACE TEMPERATURE (15-DAY RUNNING MEAN)                    K                          2            0  15 K                         2         5
+ 022150 NUMBER OF 18 HZ VALID POINTS FOR KU BAND                         NUMERIC                    0            0  10 NUMERIC                   0         4
+ 022151 KU BAND OCEAN RANGE                                              M                          3            0  31 M                         3        10
+ 022152 STD OF 18 HZ KU BAND OCEAN RANGE                                 M                          3            0  16 M                         3         5
+ 022153 NUMBER OF 18 HZ VALID POINTS FOR S BAND                          NUMERIC                    0            0  10 NUMERIC                   0         4
+ 022154 S BAND OCEAN RANGE                                               M                          3            0  31 M                         3        10
+ 022155 STD OF 18 HZ S BAND OCEAN RANGE                                  M                          3            0  16 M                         3         5
+ 022156 KU BAND SIGNIFICANT WAVE HEIGHT                                  M                          3            0  16 M                         3         5
+ 022157 STD 18HZ KU BAND SIGNIFICANT WAVE HEIGHT                         M                          3            0  16 M                         3         5
+ 022158 S BAND SIGNIFICANT WAVE HEIGHT                                   M                          3            0  16 M                         3         5
+ 022159 STD 18HZ S BAND SIGNIFICANT WAVE HEIGHT                          M                          3            0  16 M                         3         5
+ 022160 NORMALIZED INVERSE WAVE AGE                                      NUMERIC                    6            0  21 NUMERIC                   6         7
+ 022161 WAVE SPECTRA                                                     M**4                       4            0  27 M**4                      4         9
+ 022193 MEAN WAVENUMBER                                                  1/M                        5            0  15  
+ 022194 PEAK WAVENUMBER                                                  1/M                        5            0  15  
+ 022195 MEAN WAVE PROPAGATION DIRECTION                                  DEGREE                     1            0  13  
+ 022196 PEAK WAVE PROPAGATION DIRECTION                                  DEGREE                     1            0  13  
+ 022197 DIRECTION SPREAD                                                 DEGREE                     1            0  13  
+ 022198 VARIANCE SPECTRAL DENSITY                                        M**2*S/RAD                 4            0  18  
+ 022199 CORRELATION COEFF OF SIMULATED FG AND OBSERVED SAR SPECTRUM      NUMERIC                    4       -10000  15  
+ 022200 CORRELATION COEFF OF SIMULATED BF AND OBSERVED SAR SPECTRUM      NUMERIC                    4       -10000  15  
+ 022201 CORRELATION COEFF OF OCEAN WAVE FG AND EXTRACTED WAVE SPECTRUM   NUMERIC                    4       -10000  15  
+ 022202 ERROR BETWEEN FIRST GUESS AND OBSERVED SAR                       NUMERIC                    5            0  21  
+ 022203 ERROR BETWEEN SIMULATED AND OBSERVED SAR                         NUMERIC                    5            0  21  
+ 022204 MEAN PERIOD OF WAVES                                             SECOND                     2            0  13  
+ 022205 SPECTRAL DENSITY                                                 M**2*S/RAD                 4            0  25  
+ 022206 PEAK PERIOD OF WAVES                                             SECOND                     2            0  13  
+ 022207 MEAN WAVE PERIOD                                                 S                          1            0  10  
+ 022208 PEAK PERIOD OF 1D SPECTRA                                        S                          1            0  10  
+ 022209 COEFICIENT OF DRAG WITH WAVES                                    NUMERIC                    6            0  13  
+ 022210 MEAN SQUARE SLOPE OF WAVES                                       NUMERIC                    4       -10000  14  
+ 022211 COEFICIENT OF DRAG WITH WAVES                                    NUMERIC                    6            0  17  
+ 022243 STANDARD DEVIATION SIGNIFICANT WAVE HEIGHT                       M                          2            0  10  
+ 023001 ACCIDENT EARLY NOTIFICATION   ARTICLE APPLICABLE                 CODE TABLE 23001           0            0   3 CODE TABLE 23001          0         1
+ 023002 ACTIVITY OR FACILITY INVOLVED IN INCIDENT                        CODE TABLE 23002           0            0   5 CODE TABLE 23002          0         2
+ 023003 TYPE OF RELEASE                                                  CODE TABLE 23003           0            0   3 CODE TABLE 23003          0         1
+ 023004 COUNTERMEASURES TAKEN NEAR BORDER                                CODE TABLE 23004           0            0   3 CODE TABLE 23004          0         1
+ 023005 CAUSE OF INCIDENT                                                CODE TABLE 23005           0            0   2 CODE TABLE 23005          0         1
+ 023006 INCIDENT SITUATION                                               CODE TABLE 23006           0            0   3 CODE TABLE 23006          0         1
+ 023007 CHARACTERISTICS OF RELEASE                                       CODE TABLE 23007           0            0   3 CODE TABLE 23007          0         1
+ 023008 STATE OF CURRENT RELEASE                                         CODE TABLE 23008           0            0   2 CODE TABLE 23008          0         1
+ 023009 STATE OF EXPECTED RELEASE                                        CODE TABLE 23009           0            0   2 CODE TABLE 23009          0         1
+ 023016 POSSIBILITY OF SIGNIFICANT CHEMICAL TOXIC HEALTH EFFECT          CODE TABLE 23016           0            0   2 CODE TABLE 23016          0         1
+ 023017 FLOW DISCHARGE OF MAJOR RECIPIENT                                M**3/S                     6            0  20 M**3/S                    6         7
+ 023018 RELEASE BEHAVIOUR OVER TIME                                      CODE TABLE 23018           0            0   3 CODE TABLE 23018          0         1
+ 023019 ACTUAL RELEASE HEIGHT                                            M                          0       -15000  17 M                         0         6
+ 023021 EFFECTIVE RELEASE HEIGHT                                         M                          0       -15000  17 M                         0         6
+ 023022 DISTANCE OF RELEASE POINT OR SITE OF INCIDENT                    M                          0            0  24 M                         0         8
+ 023023 MAIN TRANSPORT SPEED IN THE ATMOSPHERE                           M/S                        1            0  12 M/S                       1         4
+ 023024 MAIN TRANSPORT SPEED IN WATER                                    M/S                        2            0  13 M/S                       2         4
+ 023025 MAIN TRANSPORT SPEED IN GROUND WATER                             M/S                        2            0  13 M/S                       2         4
+ 023027 MAIN TRANSPORT DIRECTION IN THE ATMOSPHERE                       DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 023028 MAIN TRANSPORT DIRECTION IN WATER                                DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 023029 MAIN TRANSPORT DIRECTION IN GROUND WATER                         DEGREE TRUE                0            0   9 DEGREE TRUE               0         3
+ 023031 POSSIBILITY THAT PLUME WILL ENCOUNTER PRECIPITATION IN STATE IN  CODE TABLE 23031           0            0   2 CODE TABLE 23031          0         1
+ 023032 PLUME WILL ENCOUNTER CHANGE IN WIND DIRECTION AND/OR SPEED FLAG  CODE TABLE 23032           0            0   2 CODE TABLE 23032          0         1
+ 024001 ESTIMATE OF AMOUNT OF RADIOACTIVITY RELEASED UP TO SPECIFIED TIM Bq                       -11            0  28 Bq                      -11         9
+ 024002 ESTIMATED MAXIMUM POTENTIAL RELEASE                              Bq                       -11            0  28 Bq                      -11         9
+ 024003 COMPOSITION OF RELEASE                                           CODE TABLE 24003           0            0   5 CODE TABLE 24003          0         2
+ 024004 ELEMENT NAME                                                     CCITTIA5                   0            0  16 CHARACTER                 0         2
+ 024005 ISOTOPE MASS                                                     NUMERIC                    0            0   9 NUMERIC                   0         3
+ 024011 DOSE                                                             mSv                        2            0  32 mSv                       2        10
+ 024012 TRAJECTORY DOSE (DEFINED LOCATION AND EXPECTED TIME OF ARRIVAL)  mSv                        2            0  32 mSv                       2        10
+ 024013 GAMMA DOSE IN AIR ALONG THE MAIN TRANSPORT PATH (DEFINED LOCATIO mSv                        2            0  32 mSv                       2        10
+ 024021 AIR CONCENTRATION (OF NAMED ISOTOPE TYPE INCLUDING GROSS BETA)   Bq/M**3                    2            0  32 Bq/M**3                   2        10
+ 024022 CONCENTRATION IN PRECIPITATION (OF NAMES ISOTOPE TYPE)           Bq/L                       2            0  32 BQ L-1                    2        10
+ 024023 PULSE RATE OF BETA RADIATION                                     1/S                        1            0  14 1/S                       1         4
+ 024024 PULSE RATE OF GAMMA RADIATION                                    1/S                        1            0  14 1/S                       1         4
+ 025001 RANGE-GATE LENGTH                                                M                         -1            0   6 M                        -1         2
+ 025002 NUMBER OF GATES AVERAGED                                         NUMERIC                    0            0   4 NUMERIC                   0         2
+ 025003 NUMBER OF INTEGRATED PULSES                                      NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025004 ECHO PROCESSING                                                  CODE TABLE 25004           0            0   2 CODE TABLE 25004          0         1
+ 025005 ECHO INTEGRATION                                                 CODE TABLE 25005           0            0   2 CODE TABLE 25005          0         1
+ 025006 Z TO R CONVERSION                                                CODE TABLE 25006           0            0   3 CODE TABLE 25006          0         1
+ 025007 Z TO R CONVERSION FACTOR                                         NUMERIC                    0            0  12 NUMERIC                   0         4
+ 025008 Z TO R CONVERSION EXPONENT                                       NUMERIC                    2            0   9 NUMERIC                   2         3
+ 025009 CALIBRATION METHOD                                               FLAG TABLE 25009           0            0   4 FLAG TABLE 25009          0         2
+ 025010 CLUTTER TREATMENT                                                CODE TABLE 25010           0            0   4 CODE TABLE 25010          0         2
+ 025011 GROUND OCCULTATION CORRECTION (SCREENING)                        CODE TABLE 25011           0            0   2 CODE TABLE 25011          0         1
+ 025012 RANGE ATTENUATION CORRECTION                                     CODE TABLE 25012           0            0   2 CODE TABLE 25012          0         1
+ 025013 BRIGHT-BAND CORRECTION                                           FLAG TABLE 25013           0            0   2 FLAG TABLE 25013          0         1
+ 025014 AZIMUTH CLUTTER CUT-OFF (SEE NOTE 1)                             NUMERIC                    0            0  12 NUMERIC                   0         4
+ 025015 RADOME ATTENUATION CORRECTION                                    FLAG TABLE 25015           0            0   2 FLAG TABLE 25015          0         1
+ 025016 CLEAR-AIR ATTENUATION CORRECTION                                 dB/M                       5            0   6 dB/M                      5         2
+ 025017 PRECIPITATION ATTENUATION CORRECTION                             FLAG TABLE 25017           0            0   2 FLAG TABLE 25017          0         1
+ 025018 A TO Z LAW FOR ATTENUATION FACTOR                                NUMERIC                    7            0   6 NUMERIC                   7         2
+ 025019 A TO Z LAW FOR ATTENUATION EXPONENT                              NUMERIC                    2            0   7 NUMERIC                   2         3
+ 025020 MEAN SPEED ESTIMATION                                            CODE TABLE 25020           0            0   2 CODE TABLE 25020          0         1
+ 025021 WIND COMPUTATION ENHANCEMENT                                     FLAG TABLE 25021           0            0   8 FLAG TABLE 25021          0         3
+ 025025 BATTERY VOLTAGE                                                  V                          1            0   9 V                         1         3
+ 025026 BATTERY VOLTAGE (LARGE RANGE)                                    V                          1            0  12 V                         1         4
+ 025028 OPERATOR OR MANUFACTURER DEFINED PARAMETER                       NUMERIC                    1       -16384  15 NUMERIC                   1         5
+ 025030 RUNNING MEAN SEA-SURFACE TEMPERATURE USAGE                       CODE TABLE 25030           0            0   2 CODE TABLE 25030          0         1
+ 025032 WIND PROFILER MODE INFORMATION                                   CODE TABLE 25032           0            0   2 CODE TABLE 25032          0         1
+ 025033 WIND PROFILER SUBMODE INFORMATION*                               CODE TABLE 25033           0            0   2 CODE TABLE 25033          0         1
+ 025034 WIND PROFILER QUALITY CONTROL TEST RESULTS*                      FLAG TABLE 25034           0            0   4 FLAG TABLE 25034          0         2
+ 025036 ATMOSPHERICS LOCATION METHOD                                     CODE TABLE 25036           0            0   4 CODE TABLE 25036          0         2
+ 025040 CO2 WIND PRODUCT DERIVATION                                      CODE TABLE 25040           0            0   4 CODE TABLE 25040          0         2
+ 025041 MOVING PLATFORM DIRECTION REPORTING METHOD                       CODE TABLE 25041           0            0   2 CODE TABLE 25041          0         1
+ 025042 MOVING PLATFORM SPEED REPORTING METHOD                           CODE TABLE 25042           0            0   2 CODE TABLE 25042          0         1
+ 025043 WAVE SAMPLING INTERVAL (TIME)                                    S                          4            0  15 S                         4         5
+ 025044 WAVE SAMPLING INTERVAL (SPACE)                                   M                          2            0  14 M                         2         5
+ 025045 HIRS CHANNEL COMBINATION                                         FLAG TABLE 25045           0            0  21 FLAG TABLE 25045          0         7
+ 025046 MSU CHANNEL COMBINATION                                          FLAG TABLE 25046           0            0   5 FLAG TABLE 25046          0         2
+ 025047 SSU CHANNEL COMBINATION                                          FLAG TABLE 25047           0            0   4 FLAG TABLE 25047          0         2
+ 025048 AMSU-A CHANNEL COMBINATION                                       FLAG TABLE 25048           0            0  16 FLAG TABLE 25048          0         6
+ 025049 AMSU-B CHANNEL COMBINATION                                       FLAG TABLE 25049           0            0   6 FLAG TABLE 25049          0         2
+ 025051 AVHRR CHANNEL COMBINATION                                        FLAG TABLE 25051           0            0   7 FLAG TABLE 25051          0         3
+ 025052 LOG-10 OF PRINCIPAL COMPONENTS NORMALIZED FIT TO DATA            NUMERIC                    4            0  15 NUMERIC                   4         5
+ 025053 OBSERVATION QUALITY                                              FLAG TABLE 25053           0            0  12 FLAG TABLE 25053          0         4
+ 025054 SSMIS SUBFRAME ID NEMBER                                         NUMERIC                    0            0   5 NUMERIC                   0         2
+ 025055 MULTIPLEXER HOUSEKEEPING                                         K                          2            0  16 K                         2         5
+ 025060 SOFTWARE IDENTIFICATION (SEE NOTE 2)                             NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025061 SOFTWARE IDENTIFICATION AND VERSION NUMBER                       CCITTIA5                   0            0  96 CHARACTER                 0        12
+ 025062 DATABASE IDENTIFICATION                                          NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025065 ORIENTATION CORRECTION (AZIMUTH)                                 DEGREE                     2        -1000  11 DEGREE                    2         4
+ 025066 ORIENTATION CORRECTION (ELEVATION)                               DEGREE                     2        -1000  11 DEGREE                    2         4
+ 025067 RADIOSONDE RELEASE POINT PRESSURE CORRECTION                     PA                         0        -8000  14 PA                        0         4
+ 025068 NUMBER OF ARCHIVE RECOMPUTES                                     NUMERIC                    0            0   7 NUMERIC                   0         3
+ 025069 FLIGHT LEVEL PRESSURE CORRECTIONS                                FLAG TABLE 25069           0            0   8 FLAG TABLE 25069          0         3
+ 025070 MAJOR FRAME COUNT                                                NUMERIC                    0            0   4 NUMERIC                   0         2
+ 025071 FRAME COUNT                                                      NUMERIC                    0            0   5 NUMERIC                   0         2
+ 025075 SATELLITE ANTENNA CORRECTIONS VERSION NUMBER                     NUMERIC                    0            0   5 NUMERIC                   0         2
+ 025076 LOG-10 OF (TEMPERATURE-RADIANCE CENTRAL WAVENUMBER) FOR ATOVS    LOG (1/M)                  8            0  30 LOG (1/M)                 8        10
+ 025077 BANDWIDTH CORRECTION COEFFICIENT 1 FOR ATOVS                     NUMERIC                    5      -100000  18 NUMERIC                   5         7
+ 025078 BANDWIDTH CORRECTION COEFFICIENT 2 FOR ATOVS                     NUMERIC                    5            0  17 NUMERIC                   5         6
+ 025079 ALBEDO-RADIANCE SOLAR FILTERED IRRADIANCE FOR ATOVS              W/M**2                     4            0  24 W/M**2                    4         8
+ 025080 ALBEDO-RADIANCE EQUIVALENT FILTER WIDTH FOR ATOVS                M                         10            0  14 M                        10         5
+ 025085 FRACTION OF CLEAR PIXELS IN HIRS FOV                             NUMERIC                    0            0   7 NUMERIC                   0         3
+ 025086 DEPTH CORRECTION INDICATOR                                       CODE TABLE 25086           0            0   2 CODE TABLE 25086          0         1
+ 025091 STRUCTURE CONSTANT OF THE REFRACTION INDEX (CN2)                 dB                         3       -18192  13 dB                        3         5
+ 025092 ACOUSTIC PROPAGATION VELOCITY                                    M/S                        2        28000  14 M/S                       2         5
+ 025093 RASS COMPUTATION CORRECTION                                      FLAG TABLE 25093           0            0   8 FLAG TABLE 25093          0         3
+ 025095 ALTIMETER STATE FLAG                                             FLAG TABLE 25095           0            0   2 FLAG TABLE 25095          0         1
+ 025096 RADIOMETER STATE FLAG                                            FLAG TABLE 25096           0            0   5 FLAG TABLE 25096          0         2
+ 025097 THREE DIMENSIONAL ERROR ESTIMATE OF THE NAVIGATOR ORBIT          CODE TABLE 25097           0            0   4 CODE TABLE 25097          0         2
+ 025100 XBT/XCTD FALL RATE EQUATION COEFFICIENT A                        NUMERIC                    5            0  20 NUMERIC                   5         6
+ 025101 XBT/XCTD FALL RATE EQUATION COEFFICIENT B                        NUMERIC                    5      -500000  21 NUMERIC                   5         6
+ 025102 NUMBER OF MISSING LINES EXCLUDING DATA GAPS                      NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025103 NUMBER OF DIRECTIONAL BINS                                       NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025104 NUMBER OF WAVE-LENGTH BINS                                       NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025107 FIRST WAVE-LENGTH BIN                                            M                          3            0  29 M                         3         9
+ 025108 LAST WAVE-LENGTH BIN                                             M                          3            0  29 M                         3         9
+ 025111 NUMBER OF INPUT DATA GAPS                                        NUMERIC                    0            0   8 NUMERIC                   0         3
+ 025120 RA2-L2-PROCESSING FLAG                                           CODE TABLE 25120           0            0   2 CODE TABLE 25120          0         1
+ 025121 RA2-L2-PROCESSING QUALITY                                        %                          0            0   7 %                         0         3
+ 025122 HARDWARE CONFIGURATION FOR RF                                    CODE TABLE 25122           0            0   2 CODE TABLE 25122          0         1
+ 025123 HARDWARE CONFIGURATION FOR HPA                                   CODE TABLE 25123           0            0   2 CODE TABLE 25123          0         1
+ 025124 MWR L2 PROCESSING FLAG                                           CODE TABLE 25124           0            0   2 CODE TABLE 25124          0         1
+ 025125 MWR L2-PROCESSING QUALITY                                        %                          0            0   7 %                         0         3
+ 025126 MODEL DRY TROPOSPHERIC CORRECTION                                M                          3       -32768  16 M                         3         5
+ 025127 INVERTED BAROMETER CORRECTION                                    M                          3       -32768  16 M                         3         5
+ 025128 MODEL WET TROPOSPHERIC CORRECTION                                M                          3       -32768  16 M                         3         5
+ 025129 MWR DERIVED WET TROPOSPHERIC CORRECTION                          M                          3       -32768  16 M                         3         5
+ 025130 RA2 IONOSPHERIC CORRECTION ON KU BAND                            M                          3       -32768  16 M                         3         5
+ 025131 IONOSPHERIC CORRECTION FROM DORIS ON KU BAND                     M                          3       -32768  16 M                         3         5
+ 025132 IONOSPHERIC CORRECTION FROM MODEL ON KU BAND                     M                          3       -32768  16 M                         3         5
+ 025133 SEA STATE BIAS CORRECTION ON KU BAND                             M                          3       -32768  16 M                         3         5
+ 025134 RA2 IONOSPHERIC CORRECTION ON S BAND                             M                          3       -32768  16 M                         3         5
+ 025135 IONOSPHERIC CORRECTION FROM DORIS ON S BAND                      M                          3       -32768  16 M                         3         5
+ 025136 IONOSPHERIC CORRECTION FROM MODEL ON S BAND                      M                          3       -32768  16 M                         3         5
+ 025137 SEA STATE BIAS CORRECTION ON S BAND                              M                          3       -32768  16 M                         3         5
+ 025138 AVERAGE SIGNAL TO NOISE RATION                                   NUMERIC                    0        -2048  12 NUMERIC                   0         4
+ 025140 START CHANNEL                                                    NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025141 END CHANNEL                                                      NUMERIC                    0            0  14 NUMERIC                   0         5
+ 025142 CHANNEL SCALE FACTOR                                             NUMERIC                    0            0   6 NUMERIC                   0         2
+ 025143 20 LAYER AVERAGING KERNEL                                        NUMERIC                    6     -5000000  24 NUMERIC                   6         8
+ 025150 SATELLITE INTENSITY ANALYSIS METHOD OF TROPICAL CYCLONE          CODE TABLE 25150           0            0   4 CODE TABLE 25150          2         2
+ 025193 ATTENUATION CORRECTION ON SIGMA0                                 dB                         3            0  14  
+ 025194 MAJOR FRAME COUNT                                                NUMERIC                    0            0   4  
+ 025197 ANTENNA CORRECTIONS VERSION NUMBER                               NUMERIC                    0            0   5  
+ 025198 LOG (TEMP-RAD CENTRAL WAVE NUMBER)                               1/M                        8            0  30  
+ 025199 BANDWIDTH CORRECTION COEFFICIENT 1                               NUMERIC                    4       -10000  15  
+ 025200 BANDWIDTH CORRECTION COEFFICIENT 2                               NUMERIC                    5            0  17  
+ 025201 ALBEDO-RAD SOLAR FILTERED IRRADIANCE                             NUMERIC                    4            0  24  
+ 025202 ALBEDO-RAD EQUIVALENT FILTER WIDTH                               NUMERIC                   10            0  14  
+ 025203 SCAN LINE STATUS FLAGS FOR ATOVS                                 FLAG TABLE 25203           0            0  31  
+ 025204 SCAN LINE QUALITY FLAGS FOR ATOVS                                FLAG TABLE 25204           0            0  31  
+ 025205 CHANNEL QUALITY FLAGS FOR ATOVS                                  FLAG TABLE 25205           0            0  31  
+ 025206 FOV QUALITY FLAGS FOR ATOVS                                      FLAG TABLE 25206           0            0  31  
+ 026001 PRINCIPAL TIME OF DAILY READING IN UTC OF MAXIMUM TEMPERATURE    HOUR                       1            0  12 HOUR                      1         3
+ 026002 PRINCIPAL TIME OF DAILY READING IN UTC OF MINIMUM TEMPERATURE    HOUR                       1            0  12 HOUR                      1         3
+ 026003 TIME DIFFERENCE                                                  MINUTE                     0        -1440  12 MINUTE                    0         4
+ 026010 HOURS INCLUDED                                                   FLAG TABLE 26010           0            0  26 FLAG TABLE 26010          0         9
+ 026020 DURATION OF PRECIPITATION                                        MINUTE                     0            0  11 MINUTE                    0         4
+ 026193 YEAR                                                             YEAR                       0            0  12  
+ 026194 MONTH                                                            MONTH                      0            0   4  
+ 026195 DAY                                                              DAY                        0            0   6  
+ 026196 HOUR                                                             HOUR                       0            0   5  
+ 026197 MINUTE                                                           MINUTE                     0            0   6  
+ 026198 SECOND                                                           SECOND                     0            0   6  
+ 026200 LOCATION WITHIN ASSIMILATION WINDOW IN TIME                      NUMERIC                    6            0  20  
+ 026201 HOURS INCLUDED                                                   FLAG TABLE 26201           0            0  26  
+ 027001 LATITUDE (HIGH ACCURACY)                                         DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 027002 LATITUDE (COARSE ACCURACY)                                       DEGREE                     2        -9000  15 DEGREE                    2         4
+ 027003 ALTERNATE LATITUDE (COARSE ACCURACY)                             DEGREE                     2        -9000  15 DEGREE                    2         4
+ 027004 ALTERNATE LATITUDE (HIGH ACCURACY)                               DEGREE                     5     -9000000  25 DEGREE                    5         7
+ 027020 SATELLITE LOCATION COUNTER                                       NUMERIC                    0            0  16 NUMERIC                   0         5
+ 027021 SATELLITE SUBLOCATION DIMENSION                                  NUMERIC                    0            0  16 NUMERIC                   0         5
+ 027031 IN DIRECTION OF 0 DEGREES LONGITUDE, DISTANCE FROM THE EARTH'S C M                          2  -1073741824  31 M                         2        10
+ 027080 VIEWING AZIMUTH ANGLE                                            DEGREE TRUE                2            0  16 DEGREE TRUE               0         5
+ 027193 SOLAR AZIMUTH                                                    DEGREE TRUE                2            0  16  
+ 028001 LONGITUDE (HIGH ACCURACY)                                        DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 028002 LONGITUDE (COARSE ACCURACY)                                      DEGREE                     2       -18000  16 DEGREE                    2         5
+ 028003 ALTERNATE LONGITUDE (COARSE ACCURACY)                            DEGREE                     2       -18000  16 DEGREE                    2         5
+ 028004 ALTERNATE LONGITUDE (HIGH ACCURACY)                              DEGREE                     5    -18000000  26 DEGREE                    5         8
+ 028031 IN DIRECTION 90 DEGREES EAST, DISTANCE FROM THE EARTH'S CENTRE   M                          2  -1073741824  31 M                         2        10
+ 029001 PROJECTION TYPE                                                  CODE TABLE 29001           0            0   3 CODE TABLE 29001          0         1
+ 029002 CO-ORDINATE GRID TYPE                                            CODE TABLE 29002           0            0   3 CODE TABLE 29002          0         1
+ 029192 TYPE OF ROTATION ELLIPSOID                                       CODE TABLE 29192           0            0   3
+ 029193 LONG ORIGIN                                                      DEGREE                     2       -18000  16
+ 029194 LAT ORIGIN                                                       DEGREE                     2        -9000  15
+ 029195 X-OFFSET                                                         M                          0    -33554432  26
+ 029196 Y-OFFSET                                                         M                          0    -33554432  26
+ 029197 STANDARD PARALLEL 1                                              DEGREE                     2        -9000  15
+ 029198 STANDARD PARALLEL 2                                              DEGREE                     2        -9000  15
+ 029199 SEMI-MAJOR AXIS OF ROTATION ELIPSOID                             M                          0            0  26
+ 029200 SEMI-MINOR AXIS OF ROTATION ELIPSOID                             M                          0            0  26
+ 029201 PROJECTION TYPE                                                  CODE TABLE 29201           0            0   5
+ 029202 AZIMUTH OF INITIAL LINE                                          DEGREE                     2        -9000  15
+ 030001 PIXEL VALUE (4 BITS)                                             NUMERIC                    0            0   4 NUMERIC                   0         2
+ 030002 PIXEL VALUE (8 BITS)                                             NUMERIC                    0            0   8 NUMERIC                   0         3
+ 030004 PIXEL VALUE (16 BITS)                                            NUMERIC                    0            0  16 NUMERIC                   0         5
+ 030021 NUMBER OF PIXELS PER ROW                                         NUMERIC                    0            0  12 NUMERIC                   0         4
+ 030022 NUMBER OF PIXELS PER COLUMN                                      NUMERIC                    0            0  12 NUMERIC                   0         4
+ 030031 PICTURE TYPE                                                     CODE TABLE 30031           0            0   4 CODE TABLE 30031          0         2
+ 030032 COMBINATION WITH OTHER DATA                                      FLAG TABLE 30032           0            0  16 FLAG TABLE 30032          0         6
+ 030192 NORTH SOUTH VIEW ORGANISATION                                    CODE TABLE 30192           0            0   3
+ 030193 EAST WEST VIEW ORGANISATION                                      CODE TABLE 30193           0            0   3
+ 031000 SHORT DELAYED DESCRIPTOR REPLICATION FACTOR                      NUMERIC                    0            0   1 NUMERIC                   0         1
+ 031001 DELAYED DESCRIPTOR REPLICATION FACTOR                            NUMERIC                    0            0   8 NUMERIC                   0         3
+ 031002 EXTENDED DELAYED DESCRIPTOR REPLICATION FACTOR                   NUMERIC                    0            0  16 NUMERIC                   0         5
+ 031011 DELAYED DESCRIPTOR AND DATA REPETITION FACTOR                    NUMERIC                    0            0   8 NUMERIC                   0         3
+ 031012 EXTENDED DELAYED DESCRIPTOR AND DATA REPETITION FACTOR           NUMERIC                    0            0  16 NUMERIC                   0         5
+ 031021 ASSOCIATED FIELD SIGNIFICANCE                                    CODE TABLE 31021           0            0   6 CODE TABLE 31021          0         2
+ 031031 DATA PRESENT INDICATOR                                           FLAG TABLE 31031           0            0   1 FLAG TABLE 31031          0         1
+ 033002 QUALITY INFORMATION                                              CODE TABLE 33002           0            0   2 CODE TABLE 33002          0         1
+ 033003 QUALITY INFORMATION                                              CODE TABLE 33003           0            0   3 CODE TABLE 33003          0         1
+ 033005 QUALITY INFORMATION (AWS DATA)                                   FLAG TABLE 33005           0            0  30 FLAG TABLE 33005          0        10
+ 033006 INTERNAL MEASUREMENT STATUS INFORMATION (AWS)                    CODE TABLE 33006           0            0   3 CODE TABLE 33006          0         1
+ 033007 PER CENT CONFIDENCE                                              %                          0            0   7 %                         0         3
+ 033009 RELATIVE ERROR                                                   %                          6            0  20 %                         0         7
+ 033015 DATA QUALITY CHECK INDICATOR                                     CODE TABLE 33015           0            0   6 CODE TABLE 33015          0         2
+ 033020 QUALITY CONTROL INDICATION OF FOLLOWING VALUE                    CODE TABLE 33020           0            0   3 CODE TABLE 33020          0         1
+ 033021 QUALITY OF FOLLOWING VALUE                                       CODE TABLE 33021           0            0   2 CODE TABLE 33021          0         1
+ 033022 QUALITY OF BUOY SATELLITE TRANSMISSION                           CODE TABLE 33022           0            0   2 CODE TABLE 33022          0         1
+ 033023 QUALITY OF BUOY LOCATION                                         CODE TABLE 33023           0            0   2 CODE TABLE 33023          0         1
+ 033024 STATION ELEVATION QUALITY MARK (FOR MOBILE STATIONS)             CODE TABLE 33024           0            0   4 CODE TABLE 33024          0         2
+ 033025 ACARS INTERPOLATED VALUES                                        CODE TABLE 33025           0            0   3 CODE TABLE 33025          0         1
+ 033026 MOISTURE QUALITY                                                 CODE TABLE 33026           0            0   6 CODE TABLE 33026          0         2
+ 033027 LOCATION QUALITY CLASS (RANGE OF RADIUS OF 66 % CONFIDENCE)      CODE TABLE 33027           0            0   3 CODE TABLE 33027          0         1
+ 033030 SCAN LINE STATUS FLAGS FOR ATOVS                                 FLAG TABLE 33030           0            0  24 FLAG TABLE 33030          0         8
+ 033031 SCAN LINE QUALITY FLAGS FOR ATOVS                                FLAG TABLE 33031           0            0  24 FLAG TABLE 33031          0         8
+ 033032 CHANNEL QUALITY FLAGS FOR ATOVS                                  FLAG TABLE 33032           0            0  24 FLAG TABLE 33032          0         8
+ 033033 FIELD OF VIEW QUALITY FLAGS FOR ATOVS                            FLAG TABLE 33033           0            0  24 FLAG TABLE 33033          0         8
+ 033035 MANUAL/AUTOMATIC QUALITY CONTROL                                 CODE TABLE 33035           0            0   4 CODE TABLE 33035          0         2
+ 033036 NOMINAL CONFIDENCE THRESHOLD                                     %                          0            0   7 %                         0         3
+ 033037 WIND CORRELATION ERROR                                           FLAG TABLE 33037           0            0  20 FLAG TABLE 33037          0         7
+ 033038 QUALITY FLAGS FOR GROUND-BASED GNSS DATA                         FLAG TABLE 33038           0            0  10 FLAG TABLE 33038          0         4
+ 033039 QUALITY FLAGS FOR RADIO OCCULTATION DATA                         FLAG TABLE 33039           0            0  16 FLAG TABLE 33039          0         6
+ 033040 CONFIDENCE INTERVAL                                              %                          0            0   7 PERCENT                   0         3
+ 033041 ATTRIBUTE OF FOLLOWING VALUE                                     CODE TABLE 33041           0            0   2 CODE TABLE 33041          0         1
+ 033042 TYPE OF LIMIT REPRESENTED BY FOLLOWING VALUE                     CODE TABLE 33042           0            0   3 CODE TABLE 33042          0         1
+ 033043 AST CONFIDENCE                                                   FLAG TABLE 33043           0            0   8 FLAG TABLE 33043          0         3
+ 033044 ASAR QUALITY INFORMATION                                         FLAG TABLE 33044           0            0  15 FLAG TABLE 33044          0         5
+ 033045 PROBABILITY OF FOLLOWING EVENT                                   %                          0            0   7 %                         0         3
+ 033046 CONDITIONAL PROBABILITY OF FOLLOWING EVENT WITH RESPECT TO SPECI %                          0            0   7 %                         0         3
+ 033047 MEASUREMENT CONFIDENCE DATA                                      FLAG TABLE 33047           0            0  31 FLAG TABLE 33047          0        11
+ 033048 CONFIDENCE MEASURE OF SAR INVERSION                              CODE TABLE 33048           0            0   2 CODE TABLE 33048          0         1
+ 033049 CONFIDENCE MEASURE OF WIND RETRIEVAL                             CODE TABLE 33049           0            0   2 CODE TABLE 33049          0         1
+ 033050 GLOBAL GTSPP QUALITY FLAG                                        CODE TABLE 33050           0            0   4 CODE TABLE 33050          0         2
+ 033052 S BAND OCEAN RETRACKING QUALITY                                  FLAG TABLE 33052           0            0  21 FLAG TABLE 33052          0         7
+ 033053 KU BAND OCEAN RETRACKING QUALITY                                 FLAG TABLE 33053           0            0  21 FLAG TABLE 33053          0         7
+ 033060 GQISFLAGQUAL-INDIVIDUAL IASI-SYSTEM QUALITY FLAG                 CODE TABLE 33060           0            0   2 CODE TABLE 33060          0         1
+ 033061 GQISQUALINDEX - INDICATOR FOR INSTRUMENT NOISE PERFORMANCE       %                          0            0   7 %                         0         3
+ 033062 GQISQUALINDEXLOC - INDICATOR FOR GEOMETRIC QUALITY INDEX         %                          0            0   7 %                         0         3
+ 033063 GQISQUALINDEXRAD - INDICATOR FOR INSTRUMENT NOISE PERFORMANCE    %                          0            0   7 %                         0         3
+ 033064 GQISQUALINDEXSPECT - INDICATOR FOR INSTRUMENT NOISE PERFORMANCE  %                          0            0   7 %                         0         3
+ 033065 GQISSYSTECSONDQUAL - OUTPUT OF SYSTEM TEC QUALITY FUNCTION       NUMERIC                    0            0  24 NUMERIC                   0        24
+ 033066 SBUV TOTAL OZONE QUALITY                                         CODE TABLE 33066           0            0   4 CODE TABLE 33066          0         2
+ 033067 SBUV PROFILE OZONE QUALITY                                       CODE TABLE 33067           0            0   4 CODE TABLE 33067          0         2
+ 033070 TOTAL OZONE QUALITY                                              CODE TABLE 33070           0            0   4 CODE TABLE 33070          0         2
+ 033071 PROFILE OZONE QUALITY                                            CODE TABLE 33071           0            0   4 CODE TABLE 33071          0         2
+ 033193 DATA QUALITY 3 BIT CODE                                          CODE TABLE 33193           0            0   3  
+ 033194 DATA QUALITY 2 BIT CODE                                          CODE TABLE 33194           0            0   2  
+ 033195 ECMWF SAR QC INDICATOR                                           CODE TABLE 33195           0            0   5  
+ 033196 ECMWF WAM QC INDICATOR                                           CODE TABLE 33196           0            0   2  
+ 033197 ECMWF SAR INVERSION QC INDICATOR                                 CODE TABLE 33197           0            0   3  
+ 033198 MINIMUM COST                                                     NUMERIC                    4            0  14  
+ 033199 1D VAR TOTAL PRECIPITABLE WATER RETRIEVED ERROR(S)               KG/M**2                    2            0  11  
+ 033200 ANALYSIS REPORT EVENTS                                           FLAG TABLE 33200           0            0  31  
+ 033201 ANALYSIS REPORT STATUS EVENT                                     FLAG TABLE 33201           0            0  13  
+ 033202 ANALYSIS DATUM EVENT FLAGS (1)                                   FLAG TABLE 33202           0            0  31  
+ 033203 ANALYSIS DATUM EVENT FLAGS (2)                                   FLAG TABLE 33203           0            0  11  
+ 033204 ANALYSIS DATUM STATUS FLAGS                                      FLAG TABLE 33204           0            0  21  
+ 033205 VARIATIONAL ANALYSIS BLACK LIST FLAG                             CODE TABLE 33205           0            0   4  
+ 033206 VARIATIONAL ANALYSIS QUALITY CONTROL FLAG                        CODE TABLE 33206           0            0   4  
+ 033207 VARIATIONAL ANALYSIS DEPARTURE FLAG                              CODE TABLE 33207           0            0   4  
+ 033208 VARIATIONAL ANALYSIS FIRST QUESS CHECK FLAG                      CODE TABLE 33208           0            0   4  
+ 033209 VARIATIONAL ANALYSIS FINAL FLAG                                  CODE TABLE 33209           0            0   4  
+ 033210 INCREMENTAL VARIATIONAL ANALYSIS UPDATE NUMBER                   NUMERIC                    0            0   7  
+ 033211 MINIMISATION SIMULATION NUMBER                                   NUMERIC                    0            0  10  
+ 033212 1D VAR ITERATION NUMBER                                          NUMERIC                    0            0  10  
+ 033213 1D VAR RADIANCE COST                                             NUMERIC                    1        -1000  11  
+ 033214 1D VAR ERROR(S)                                                  FLAG TABLE 33214           0            0  11  
+ 033215 DIRECTIONAL SKILL                                                NUMERIC                    1        -4096  13  
+ 033216 1D VAR SURFACE TYPE QUALITY CONTROL                              CODE TABLE 33216           0            0   3  
+ 033217 1D VAR FAILURE INDICATOR                                         CODE TABLE 33217           0            0   2  
+ 033218 1D VAR ESTIMATE OF SCATTERING                                    NUMERIC                    2            0  12  
+ 033219 SSMI INDIPENDENT SCATTERING INDEX                                NUMERIC                    2       -50000  16  
+ 033220 VARIATIONAL ANALYSIS REPORT EVENTS (1)                           FLAG TABLE 33220           0            0  31  
+ 033221 VARIATIONAL ANALYSIS SYNOP EVENTS (2)                            FLAG TABLE 33221           0            0  31  
+ 033222 VARIATIONAL ANALYSIS AIREP EVENTS (2)                            FLAG TABLE 33222           0            0  31  
+ 033223 VARIATIONAL ANALYSIS SATOB EVENTS (2)                            FLAG TABLE 33223           0            0  31  
+ 033224 VARIATIONAL ANALYSIS DRIBU EVENTS (2)                            FLAG TABLE 33224           0            0  31  
+ 033225 VARIATIONAL ANALYSIS TEMP EVENTS (2)                             FLAG TABLE 33225           0            0  31  
+ 033226 VARIATIONAL ANALYSIS PILOT EVENTS (2)                            FLAG TABLE 33226           0            0  31  
+ 033227 VARIATIONAL ANALYSIS SATEM/TOVS EVENTS (2)                       FLAG TABLE 33227           0            0  31  
+ 033228 VARIATIONAL ANALYSIS PAOB EVENTS (2)                             FLAG TABLE 33228           0            0  31  
+ 033229 VARIATIONAL ANALYSIS SCATTEROMETER EVENTS (2)                    FLAG TABLE 33229           0            0  31  
+ 033230 VARIATIONAL ANALYSIS RAW RADIANCES EVENTS (2)                    FLAG TABLE 33230           0            0  31  
+ 033231 PRESAT SUMMARY FLAGS                                             FLAG TABLE 33231           0            0   6  
+ 033232 REPORT BLACK LIST EVENTS                                         FLAG TABLE 33232           0            0  31  
+ 033233 VARIATIONAL ANALYSIS REPORT STATUS                               FLAG TABLE 33233           0            0  31  
+ 033234 VARIATIONAL ANALYSIS DATUM STATUS                                FLAG TABLE 33234           0            0  31  
+ 033236 VARIATIONAL ANALYSIS DATUM EVENTS (1)                            FLAG TABLE 33236           0            0  31  
+ 033237 VARIATIONAL ANALYSIS SYNOP DATUM EVENTS (2)                      FLAG TABLE 33237           0            0  31  
+ 033238 VARIATIONAL ANALYSIS AIREP DATUM EVENTS (2)                      FLAG TABLE 33238           0            0  31  
+ 033239 VARIATIONAL ANALYSIS SATOB DATUM EVENTS (2)                      FLAG TABLE 33239           0            0  31  
+ 033240 VARIATIONAL ANALYSIS DRIBU DATUM EVENTS (2)                      FLAG TABLE 33240           0            0  31  
+ 033241 GROSS ERROR PROBABILITY                                          NUMERIC                    3            0  10  
+ 033242 GROSS ERROR INDICATOR                                            CODE TABLE 33242           0            0   2  
+ 033243 VARIATIONAL ANALYSIS TEMP DATUM EVENTS (2)                       FLAG TABLE 33243           0            0  31  
+ 033244 VARIATIONAL ANALYSIS PILOT DATUM EVENTS (2)                      FLAG TABLE 33244           0            0  31  
+ 033245 VARIATIONAL ANALYSIS SATEM/TOVS DATUM EVENTS (2)                 FLAG TABLE 33245           0            0  31  
+ 033246 VARIATIONAL ANALYSIS PAOB DATUM EVENTS (2)                       FLAG TABLE 33246           0            0  31  
+ 033247 VARIATIONAL ANALYSIS SCATTEROMETER DATUM EVENTS (2)              FLAG TABLE 33247           0            0  31  
+ 033248 VARIATIONAL ANALYSIS RAW RADIANCES DATUM EVENTS (2)              FLAG TABLE 33248           0            0  31  
+ 033249 DATUM BLACK LIST EVENTS                                          FLAG TABLE 33249           0            0  31  
+ 033250 PROBABILITY OF GROSS ERROR                                       NUMERIC                    6            0  20  
+ 033251 RANGE OF POSSIBLE VALUES                                         NUMERIC                    2            0  14  
+ 033252 MANUAL-AUTOMATIC QUALITY CONTROL                                 CODE TABLE 33252           0            0   4  
+ 033253 NOMINAL CONFIDENCE THRESHOLD                                     %                          0            0   7  
+ 033254 WIND CORRELATION METHOD                                          FLAG TABLE 33254           0            0  20  
+ 035000 FM AND REGIONAL CODE NUMBER                                      CODE TABLE 35000           0            0  10 CODE TABLE 35000          0         3
+ 035001 TIME-FRAME FOR MONITORING                                        CODE TABLE 35001           0            0   3 CODE TABLE 35001          0         1
+ 035011 NUMBER OF REPORTS ACTUALLY RECEIVED                              NUMERIC                    0            0  14 NUMERIC                   0         4
+ 035021 BULLETIN BEING MONITORED (TTAAII)                                CCITTIA5                   0            0  48 CHARACTER                 0         6
+ 035022 BULLETIN BEING MONITORED (YYGGGG)                                CCITTIA5                   0            0  48 CHARACTER                 0         6
+ 035023 BULLETIN BEING MONITORED (CCCC)                                  CCITTIA5                   0            0  32 CHARACTER                 0         4
+ 035024 BULLETIN BEING MONITORED (BBB)                                   CCITTIA5                   0            0  24 CHARACTER                 0         3
+ 035030 DISCREPANCIES IN THE AVAILABILITY OF EXPECTED DATA               CODE TABLE 35030           0            0   4 CODE TABLE 35030          0         1
+ 035031 QUALIFIER ON MONITORING RESULTS                                  CODE TABLE 35031           0            0   7 CODE TABLE 35031          0         2
+ 035032 CAUSE OF MISSING DATA                                            CODE TABLE 35032           0            0   4 CODE TABLE 35032          0         1
+ 035033 OBSERVATION AND COLLECTION DEFICIENCIES                          CODE TABLE 35033           0            0   7 CODE TABLE 35033          0         2
+ 035034 STATISTICAL TRENDS FOR AVAILABILITY OF DATA (DURING THE SURVEY P CODE TABLE 35034           0            0   3 CODE TABLE 35034          0         1
+ 035035 REASON FOR TERMINATION                                           CODE TABLE 35035           0            0   5 CODE TABLE 35035          0         2
+ 040001 SURFACE SOIL MOISTURE (MS)                                       %                          1            0  10 %                         1         4
+ 040002 ESTIMATED ERROR IN SURFACE SOIL MOISTURE                         %                          1            0  10 %                         1         4
+ 040003 MEAN SURFACE SOIL MOISTURE                                       NUMERIC                    3            0  10 NUMERIC                   3         4
+ 040004 RAIN FALL DETECTION                                              NUMERIC                    3            0  10 NUMERIC                   3         4
+ 040005 SOIL MOISTURE CORRECTION FLAG                                    FLAG TABLE 40005           0            0   8 FLAG FLAG TABLE 40005     0         3
+ 040006 SOIL MOISTURE PROCESSING FLAG                                    FLAG TABLE 40006           0            0  16 FLAG FLAG TABLE 40006     0         5
+ 040007 SOIL MOISTURE QUALITY                                            %                          1            0  10 %                         1         4
+ 040008 FROZEN LAND SURFACE FRACTION                                     %                          1            0  10 %                         1         4
+ 040009 INUNDATION AND WETLAND FRACTION                                  %                          1            0  10 %                         1         4
+ 040010 TOPOGRAPHIC COMPLEXITY                                           %                          1            0  10 %                         1         4
+ 049193 SAR INVERSION QC FLAGS                                           FLAG TABLE 49193           0            0  15  
+ 049194 ALTIMETER WAVE HEIGHT QC FLAFS                                   FLAG TABLE 49194           0            0  15  
diff --git a/src/OperaRadar/D0000000000247014008.TXT b/src/OperaRadar/D0000000000247014008.TXT
new file mode 100644
index 0000000..9073177
--- /dev/null
+++ b/src/OperaRadar/D0000000000247014008.TXT
@@ -0,0 +1,4136 @@
+ 300002  2 000002
+           000003
+ 300003  3 000010
+           000011
+           000012
+ 300004  9 300003
+           000013
+           000014
+           000015
+           000016
+           000017
+           000018
+           000019
+           000020
+ 300010  4 300003
+           101000
+           031001
+           000030
+ 301001  2 001001
+           001002
+ 301002  3 001003
+           001004
+           001005
+ 301003  3 001011
+           001012
+           001013
+ 301004  4 001001
+           001002
+           001015
+           002001
+ 301005  2 001035
+           001034
+ 301011  3 004001
+           004002
+           004003
+ 301012  2 004004
+           004005
+ 301013  3 004004
+           004005
+           004006
+ 301021  2 005001
+           006001
+ 301022  3 005001
+           006001
+           007001
+ 301023  2 005002
+           006002
+ 301024  3 005002
+           006002
+           007001
+ 301025  3 301023
+           004003
+           301012
+ 301026  7 301021
+           004003
+           004003
+           004004
+           004004
+           004005
+           004005
+ 301031  5 301001
+           002001
+           301011
+           301012
+           301022
+ 301032  5 301001
+           002001
+           301011
+           301012
+           301024
+ 301033  5 001005
+           002001
+           301011
+           301012
+           301021
+ 301034  5 001005
+           002001
+           301011
+           301012
+           301023
+ 301035  7 001005
+           001012
+           001013
+           002001
+           301011
+           301012
+           301023
+ 301036  5 301003
+           002001
+           301011
+           301012
+           301023
+ 301037  6 301001
+           002011
+           002012
+           301011
+           301012
+           301022
+ 301038  6 301001
+           002011
+           002012
+           301011
+           301012
+           301024
+ 301039  6 301003
+           002011
+           002012
+           301011
+           301012
+           301023
+ 301040  6 301003
+           002011
+           002012
+           301011
+           301012
+           301024
+ 301041  5 001007
+           002021
+           002022
+           301011
+           301012
+ 301042  2 301041
+           301021
+ 301043  5 001007
+           002023
+           301011
+           301013
+           301021
+ 301044  5 001007
+           002024
+           301011
+           301013
+           301021
+ 301045  9 301011
+           301012
+           201138
+           202131
+           004006
+           201000
+           202000
+           304030
+           304031
+ 301046 10 001007
+           001012
+           002048
+           021119
+           025060
+           202124
+           002026
+           002027
+           202000
+           005040
+ 301047 15 001007
+           025060
+           001033
+           001034
+           001012
+           301045
+           002021
+           301011
+           301012
+           201138
+           202131
+           004006
+           201000
+           202000
+           301023
+ 301048 14 002104
+           002121
+           002113
+           002026
+           002027
+           002111
+           002140
+           202127
+           001013
+           202126
+           007001
+           202000
+           025010
+           021064
+ 301049  5 002111
+           002112
+           021062
+           021063
+           021065
+ 301051  6 001006
+           002061
+           301011
+           301012
+           301021
+           008004
+ 301055  7 001005
+           002001
+           301011
+           301012
+           301021
+           001012
+           001014
+ 301062  3 101000
+           031001
+           301001
+ 301065  8 001006
+           001008
+           002001
+           002002
+           002005
+           002062
+           002070
+           002065
+ 301066  6 301011
+           301013
+           301023
+           007004
+           002064
+           008004
+ 301071  5 001007
+           001031
+           002020
+           002028
+           002029
+ 301072  4 301071
+           301011
+           301013
+           301021
+ 301074  4 002143
+           002142
+           002145
+           002146
+ 301075  6 301001
+           001015
+           301024
+           008021
+           301011
+           301012
+ 301076  3 002011
+           002143
+           002142
+ 301090  6 301004
+           301011
+           301012
+           301021
+           007030
+           007031
+ 301091 10 002180
+           002181
+           002182
+           002183
+           002184
+           002179
+           002186
+           002187
+           002188
+           002189
+ 301092  9 001011
+           001003
+           002001
+           301011
+           301012
+           301021
+           007030
+           007031
+           033024
+ 301093  3 301036
+           007030
+           007031
+ 301110  5 301001
+           001011
+           002011
+           002014
+           002003
+ 301111  6 301001
+           001011
+           002011
+           002013
+           002014
+           002003
+ 301112  5 001006
+           002011
+           002013
+           002014
+           002003
+ 301113  3 008021
+           301011
+           301013
+ 301114  5 301021
+           007030
+           007031
+           007007
+           033024
+ 301120  4 301001
+           001094
+           002011
+           301121
+ 301121  5 008041
+           301122
+           301021
+           007031
+           007007
+ 301122  7 301011
+           301012
+           201135
+           202130
+           004006
+           202000
+           201000
+ 301123 33 102002
+           008041
+           001062
+           301001
+           001094
+           002011
+           001018
+           001095
+           025061
+           025068
+           001082
+           001083
+           001081
+           002067
+           002066
+           002014
+           025067
+           025065
+           025066
+           002095
+           002096
+           002097
+           002016
+           002083
+           002080
+           002081
+           001093
+           002084
+           002085
+           002086
+           002082
+           008041
+           301011
+ 301125  6 001033
+           001034
+           025060
+           001007
+           002019
+           001012
+ 301193  5 001007
+           001031
+           002196
+           002221
+           002222
+ 301194  9 001194
+           001012
+           001013
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301195  9 001195
+           001012
+           001013
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301196  7 301003
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301197  9 001006
+           001008
+           002061
+           002062
+           002002
+           002005
+           002070
+           002063
+           002001
+ 301198  9 001011
+           001012
+           001013
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301200  2 001032
+           033194
+ 301201  2 101003
+           033193
+ 301202  2 001031
+           001032
+ 301237 12 001007
+           001012
+           002021
+           301011
+           004004
+           004005
+           201138
+           202131
+           004006
+           201000
+           202000
+           301023
+ 301238 14 002104
+           002121
+           002113
+           002026
+           002027
+           002111
+           002192
+           202127
+           001013
+           202126
+           007001
+           202000
+           025010
+           021194
+ 301239  5 002111
+           002112
+           021192
+           021193
+           021195
+ 301240  5 201131
+           202129
+           022021
+           201000
+           202000
+ 301241  5 201141
+           202130
+           007001
+           201000
+           202000
+ 301242  6 021207
+           021208
+           021209
+           021210
+           021211
+           021212
+ 301250  4 301193
+           301011
+           301013
+           301021
+ 302001  4 010004
+           010051
+           010061
+           010063
+ 302002  5 010004
+           007004
+           010003
+           010061
+           010063
+ 302003  9 011011
+           011012
+           012004
+           012006
+           013003
+           020001
+           020003
+           020004
+           020005
+ 302004  7 020010
+           008002
+           020011
+           020013
+           020012
+           020012
+           020012
+ 302005  4 008002
+           020011
+           020012
+           020013
+ 302006  4 010004
+           010051
+           010062
+           010063
+ 302011  3 302001
+           302003
+           302004
+ 302012  3 302002
+           302003
+           302004
+ 302013  5 302006
+           302003
+           101000
+           031001
+           302005
+ 302021  3 022001
+           022011
+           022021
+ 302022  3 022002
+           022012
+           022022
+ 302023  3 022003
+           022013
+           022023
+ 302024  3 302022
+           101002
+           302023
+ 302031  4 302001
+           010062
+           007004
+           010009
+ 302032  4 007032
+           012101
+           012103
+           013003
+ 302033  2 007032
+           020001
+ 302034  2 007032
+           013023
+ 302035  8 302032
+           302033
+           302034
+           007032
+           302004
+           101000
+           031001
+           302005
+ 302036  7 105000
+           031001
+           008002
+           020011
+           020012
+           020014
+           020017
+ 302037  3 020062
+           013013
+           012113
+ 302038  4 020003
+           004024
+           020004
+           020005
+ 302039  2 004024
+           014031
+ 302040  4 007032
+           102002
+           004024
+           013011
+ 302041  7 007032
+           004024
+           004024
+           012111
+           004024
+           004024
+           012112
+ 302042 11 007032
+           002002
+           008021
+           004025
+           011001
+           011002
+           008021
+           103002
+           004025
+           011043
+           011041
+ 302043  7 302038
+           101002
+           302039
+           302040
+           302041
+           302042
+           007032
+ 302044  3 004024
+           002004
+           013033
+ 302045  7 004024
+           014002
+           014004
+           014016
+           014028
+           014029
+           014030
+ 302046  3 004024
+           004024
+           012049
+ 302047  3 102003
+           008002
+           020054
+ 302048  5 005021
+           007021
+           020012
+           005021
+           007021
+ 302049  7 008002
+           020011
+           020013
+           020012
+           020012
+           020012
+           008002
+ 302050 31 008041
+           005021
+           007005
+           202130
+           006021
+           202000
+           008041
+           201131
+           202129
+           002115
+           010004
+           002115
+           013003
+           202000
+           201000
+           002115
+           011001
+           011002
+           002115
+           102002
+           012101
+           004024
+           002115
+           012103
+           012102
+           101003
+           020012
+           020011
+           020013
+           101002
+           020003
+ 302051 12 010004
+           010051
+           007004
+           010003
+           012004
+           012051
+           012016
+           012017
+           013004
+           102004
+           008051
+           008020
+ 302052  7 007032
+           007033
+           012101
+           002039
+           012102
+           012103
+           013003
+ 302053  3 007032
+           007033
+           020001
+ 302054  9 302052
+           302053
+           007033
+           302034
+           007032
+           302004
+           101000
+           031001
+           302005
+ 302055  8 020031
+           020032
+           020033
+           020034
+           020035
+           020036
+           020037
+           020038
+ 302056  4 002038
+           007063
+           022043
+           007063
+ 302057  3 302056
+           302021
+           302024
+ 302058  8 007032
+           007033
+           004024
+           004024
+           012111
+           004024
+           004024
+           012112
+ 302059 12 007032
+           007033
+           002002
+           008021
+           004025
+           011001
+           011002
+           008021
+           103002
+           004025
+           011043
+           011041
+ 302060  4 302038
+           302040
+           302058
+           302059
+ 302062 24 302001
+           302052
+           302053
+           007033
+           101000
+           031000
+           302034
+           007032
+           101000
+           031001
+           302005
+           008002
+           101000
+           031000
+           302055
+           101000
+           031000
+           302056
+           101000
+           031000
+           302021
+           101000
+           031000
+           302024
+ 302063  8 302038
+           101000
+           031000
+           302040
+           101000
+           031000
+           302058
+           302059
+ 302066 16 020023
+           020024
+           020027
+           020054
+           020023
+           020027
+           020054
+           020025
+           020026
+           020027
+           020040
+           020066
+           020027
+           020021
+           020067
+           020027
+ 302069  4 007032
+           007033
+           033041
+           020001
+ 302070  8 007032
+           007033
+           011001
+           011002
+           011043
+           011041
+           011016
+           011017
+ 302071 14 007032
+           007033
+           008021
+           004025
+           011001
+           011002
+           008021
+           103002
+           004025
+           011043
+           011041
+           004025
+           011016
+           011017
+ 302072  5 007032
+           007033
+           012101
+           012103
+           013003
+ 302073  7 020010
+           105004
+           008002
+           020011
+           020012
+           033041
+           020013
+ 302074  4 020003
+           004025
+           020004
+           020005
+ 302075  5 008021
+           004025
+           013055
+           013058
+           008021
+ 302076  7 020021
+           020022
+           026020
+           020023
+           020024
+           020025
+           020026
+ 302077  8 007032
+           007033
+           004025
+           012111
+           012112
+           007032
+           004025
+           012112
+ 302078  4 002176
+           020062
+           002177
+           013013
+ 302079  5 007032
+           002175
+           002178
+           004025
+           013011
+ 302080  3 002185
+           004025
+           013033
+ 302081  2 004025
+           014031
+ 302082  7 004025
+           014002
+           014004
+           014016
+           014028
+           014029
+           014030
+ 302083  8 004025
+           008023
+           010004
+           011001
+           011002
+           012101
+           013003
+           008023
+ 302205  5 201131
+           202129
+           022021
+           201000
+           202000
+ 302206  9 302205
+           201130
+           202129
+           022011
+           201000
+           202000
+           022001
+           011001
+           011002
+ 302207  5 022193
+           022194
+           022195
+           022196
+           022197
+ 302250  5 102000
+           031001
+           020193
+           020194
+           020012
+ 303001  3 007003
+           011001
+           011002
+ 303002  3 007004
+           011001
+           011002
+ 303003  4 007004
+           010003
+           012001
+           012003
+ 303004  6 007004
+           010003
+           012001
+           012003
+           011001
+           011002
+ 303011  4 007003
+           008001
+           011001
+           011002
+ 303012  4 007004
+           008001
+           011001
+           011002
+ 303013  7 007004
+           008001
+           010003
+           012001
+           013003
+           011001
+           011002
+ 303014  7 007004
+           008001
+           010003
+           012001
+           012003
+           011001
+           011002
+ 303021  4 007004
+           007004
+           204007
+           031021
+ 303022  3 303021
+           010003
+           204000
+ 303023  3 303021
+           012001
+           204000
+ 303024  3 303021
+           013016
+           204000
+ 303025  5 002025
+           204007
+           031021
+           012063
+           204000
+ 303026  6 007004
+           008003
+           204007
+           031021
+           012001
+           204000
+ 303027  5 007004
+           204007
+           031021
+           010003
+           204000
+ 303031  6 007004
+           008003
+           007021
+           007022
+           008012
+           012061
+ 303032  2 020011
+           020016
+ 303033  2 020010
+           020016
+ 303040 18 008041
+           004025
+           004026
+           301021
+           301122
+           201131
+           202129
+           025069
+           007004
+           013003
+           202000
+           201000
+           002013
+           012101
+           010009
+           102002
+           008040
+           035035
+ 303041  8 002152
+           002023
+           007004
+           011001
+           011002
+           002153
+           002154
+           012071
+ 303050  7 004086
+           008042
+           007004
+           005015
+           006015
+           011001
+           011002
+ 303051  7 004086
+           008042
+           007004
+           005015
+           006015
+           011061
+           011062
+ 303052  7 004086
+           008042
+           007009
+           005015
+           006015
+           011001
+           011002
+ 303053  7 004086
+           008042
+           007009
+           005015
+           006015
+           011061
+           011062
+ 303054 10 004086
+           008042
+           007004
+           010009
+           005015
+           006015
+           012101
+           012103
+           011001
+           011002
+ 303249  7 002252
+           104000
+           031001
+           002199
+           007004
+           007004
+           013003
+ 303250  8 002252
+           002023
+           007004
+           011001
+           011002
+           002197
+           002198
+           012193
+ 303251  8 002252
+           105000
+           031001
+           002254
+           002251
+           002197
+           002198
+           012063
+ 303252  8 002252
+           105000
+           031001
+           002254
+           002251
+           002197
+           002198
+           012194
+ 304001  5 008003
+           010004
+           012001
+           011001
+           011002
+ 304002  4 008003
+           010004
+           011001
+           011002
+ 304003  2 008003
+           012001
+ 304004  4 008003
+           010004
+           020010
+           012001
+ 304005  4 002024
+           007004
+           007004
+           013003
+ 304006  3 014001
+           014001
+           014003
+ 304011 27 002163
+           002164
+           008012
+           007024
+           002057
+           008021
+           004001
+           004002
+           004003
+           004004
+           008021
+           004024
+           110004
+           008021
+           004004
+           004005
+           004006
+           008021
+           004004
+           004005
+           004006
+           011001
+           011002
+           103010
+           002163
+           007004
+           012001
+ 304030  3 027031
+           028031
+           010031
+ 304031  3 001041
+           001042
+           001043
+ 304032  5 002153
+           002154
+           020081
+           020082
+           020012
+ 304033  8 002152
+           002166
+           002167
+           002153
+           002154
+           012075
+           012076
+           012063
+ 304034  9 102004
+           027001
+           028001
+           007022
+           005043
+           020010
+           020016
+           033003
+           010040
+ 304228  3 005217
+           006217
+           007217
+ 304229  3 001208
+           001209
+           001210
+ 304250 27 002231
+           002232
+           008012
+           007024
+           002057
+           008021
+           004001
+           004002
+           004003
+           004004
+           008021
+           004024
+           110004
+           008021
+           004004
+           004005
+           004006
+           008021
+           004004
+           004005
+           004006
+           011001
+           011002
+           103010
+           002231
+           007004
+           012001
+ 305003  5 301012
+           004065
+           101000
+           031001
+           305001
+ 305006  6 013072
+           013082
+           013019
+           012001
+           013073
+           013060
+ 305007  6 301029
+           301012
+           004065
+           101000
+           031001
+           305006
+ 305008  2 305006
+           012030
+ 305009  6 301029
+           301012
+           004065
+           101000
+           031001
+           305008
+ 305011  6 301029
+           301012
+           004065
+           101000
+           031001
+           305010
+ 305018  8 301029
+           301012
+           004065
+           103000
+           031001
+           305008
+           305016
+           305017
+ 306001  5 002032
+           102000
+           031001
+           007062
+           022042
+ 306002  3 002031
+           022004
+           022031
+ 306003  4 002002
+           011011
+           011012
+           012004
+ 306004  7 002032
+           002033
+           103000
+           031001
+           007062
+           022043
+           022062
+ 306005  6 002031
+           103000
+           031001
+           007062
+           022004
+           022031
+ 306006  3 306003
+           306002
+           022063
+ 306007  6 001012
+           001014
+           306008
+           004024
+           027003
+           028003
+ 306008  3 002034
+           002035
+           002036
+ 306019  8 001075
+           301011
+           301012
+           022042
+           022120
+           022121
+           004015
+           004065
+ 306020  4 306024
+           102006
+           022038
+           022039
+ 306021  7 001075
+           301011
+           301012
+           022122
+           022123
+           012001
+           303002
+ 306022  5 001075
+           301011
+           301012
+           022038
+           022039
+ 306023  8 001015
+           301023
+           301011
+           301012
+           022038
+           022039
+           022120
+           022121
+ 306024  8 001075
+           301011
+           301012
+           022042
+           022120
+           022121
+           004025
+           004015
+ 306025  4 306019
+           102006
+           022038
+           022039
+ 307001  2 301031
+           302011
+ 307002  2 301032
+           302011
+ 307003  4 307001
+           101000
+           031001
+           302005
+ 307004  4 307002
+           101000
+           031001
+           302005
+ 307005  3 307001
+           101004
+           302005
+ 307006  3 307002
+           101004
+           302005
+ 307007  2 301031
+           302012
+ 307008  2 301032
+           302012
+ 307009  2 301031
+           302013
+ 307011 16 001063
+           002001
+           301011
+           301012
+           301024
+           007006
+           011001
+           011016
+           011017
+           011002
+           011041
+           007006
+           012001
+           012003
+           010052
+           020009
+ 307012  5 103000
+           031001
+           008023
+           005021
+           020001
+ 307013  8 106000
+           031001
+           001064
+           008014
+           020061
+           008014
+           020061
+           020018
+ 307014  3 101000
+           031001
+           020019
+ 307015  4 101000
+           031001
+           302005
+           020002
+ 307016  3 101000
+           031001
+           020020
+ 307017  3 101000
+           031001
+           011070
+ 307018 16 008016
+           102000
+           031001
+           008017
+           301012
+           104000
+           031001
+           007006
+           011001
+           011002
+           011041
+           020009
+           101000
+           031001
+           020001
+           307014
+ 307020  3 307011
+           307014
+           307016
+ 307021  9 307011
+           307012
+           307013
+           307014
+           307015
+           307016
+           307017
+           307018
+           307015
+ 307022 31 001015
+           301011
+           301012
+           301022
+           008021
+           004025
+           010004
+           012001
+           013003
+           033038
+           008022
+           106025
+           002020
+           001050
+           005021
+           007021
+           015031
+           015032
+           008060
+           015033
+           015034
+           008060
+           015033
+           015034
+           015035
+           201131
+           202129
+           013016
+           202000
+           201000
+           015011
+ 307030  2 015001
+           015002
+ 307031  7 008022
+           008023
+           015001
+           008023
+           015001
+           008023
+           015002
+ 307041  7 301001
+           001015
+           301022
+           301011
+           301012
+           301070
+           307030
+ 307042  9 301001
+           001015
+           301022
+           301011
+           301012
+           008021
+           004025
+           301070
+           307031
+ 307043  7 301001
+           001015
+           301024
+           301011
+           301012
+           301074
+           307030
+ 307045 25 001063
+           008079
+           002001
+           301011
+           301012
+           301024
+           007032
+           011001
+           011016
+           011017
+           008054
+           011083
+           011084
+           011002
+           008054
+           011085
+           011086
+           011041
+           008054
+           007032
+           012023
+           012024
+           007032
+           010052
+           020009
+ 307046  5 020060 Metar/speci visibility
+           103000
+           031001
+           005021
+           020059
+ 307047  9 105000 Metar/speci clouds
+           031001
+           008002
+           020011
+           020012
+           020013
+           020092
+           020002
+           020091
+ 307048 25 008016
+           102000
+           031001
+           008017
+           301012
+           112000
+           031000
+           007032
+           011001
+           008054
+           011083
+           011084
+           011002
+           008054
+           011085
+           011086
+           011041
+           008054
+           007032
+           020009
+           101000
+           031000
+           020060
+           307014
+           307047
+ 307049  4 102000
+           031000
+           022043
+           022021
+ 307050 14 101000
+           031000
+           020085
+           102000
+           031001
+           001064
+           020085
+           105000
+           031001
+           001064
+           020086
+           020087
+           020088
+           020089
+ 307059 12 307045 Full METAR/SPECI
+           307046
+           307013
+           307014
+           307047
+           307016
+           307017
+           307049
+           307050
+           101000
+           031001
+           307048 Trend forecast
+ 307052 10 001063
+           008039
+           301011
+           301012
+           008079
+           301011 start of forecast
+           301012
+           301011 end of forecast
+           301012
+           301024
+ 307053 16 007032
+           011001
+           008054
+           011083
+           011084
+           011002
+           008054
+           011085
+           011086
+           011041
+           008054
+           007032
+           020009
+           020060
+           307014
+           307047
+ 307054 14 007032
+           008039
+           004003
+           004004
+           008023
+           012023
+           008039
+           004003
+           004004
+           008023
+           012023
+           008023
+           008039
+           007032
+ 307055  7 033045
+           008016
+           004003
+           301012
+           004003
+           301012
+           307053
+ 307056  6 307052 Aerodrome forecast
+           307053
+           307054
+           101000
+           031001
+           307055
+ 307063  2 007061
+           012130
+ 307071 67 301090
+           004074
+           004023
+           008023
+           010004
+           010051
+           007004
+           010009
+           007032
+           012101
+           002051
+           004051
+           012118
+           004052
+           012119
+           013004
+           008023
+           012151
+           007032
+           102005
+           008050
+           008020
+           014032
+           014033
+           008050
+           008020
+           102018
+           008052
+           008022
+           007032
+           008053
+           004003
+           012152
+           008053
+           004003
+           012153
+           008053
+           004003
+           008023
+           012101
+           008053
+           004003
+           008023
+           012101
+           008023
+           007032
+           002002
+           008053
+           004003
+           011046
+           008053
+           004003
+           004004
+           004023
+           007032
+           013060
+           013051
+           004053
+           008050
+           008020
+           102006
+           008052
+           008022
+           008053
+           004003
+           013052
+           007032
+ 307072 38 004001
+           004001
+           004002
+           004003
+           004004
+           004074
+           004022
+           008023
+           010004
+           010051
+           007004
+           010009
+           007032
+           012101
+           002051
+           004051
+           012118
+           004052
+           012119
+           013004
+           012151
+           007032
+           014032
+           008023
+           004001
+           004001
+           004002
+           004003
+           004004
+           004022
+           007032
+           008023
+           013060
+           004053
+           008023
+           102006
+           008050
+           008020
+ 307073  2 307071
+           307072
+ 307080 13 301090 BUFR template for synoptic reports
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307081 24 301090 BUFR template for synoptic reports RA I
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           012122
+           013056
+           013057
+           020101
+           020102
+           020103
+           020104
+           020105
+           020106
+           020107
+           020108
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307082 15 301090 BUFR template for synoptic reports RA II
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           012121
+           012122
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307083 14 301090 BUFR template for synoptic reports RA III
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           012122
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307084 17 301090 BUFR template for synoptic reports RA IV
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           020055
+           101000
+           031000
+           205001
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307086 11 301090 BUFR template for synoptic reports RA VI
+           302031
+           302035
+           302036
+           008002
+           302037
+           302066
+           302043
+           302044
+           101002
+           302045
+ 307090 13 301092 BUFR template for synoptic reports from mobile land stations
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           302043
+           302044
+           101002
+           302045
+           302046
+ 308001  3 301033
+           302011
+           022042
+ 308002  3 301034
+           302011
+           022042
+ 308003  3 301035
+           302011
+           022042
+ 308004  3 301036
+           302011
+           022042
+ 308005  2 308004
+           302024
+ 308006  8 010004
+           010061
+           010063
+           011001
+           011002
+           012004
+           013003
+           022042
+ 308007  4 301055
+           302011
+           007062
+           022042
+ 308008  3 301093
+           302062
+           302063
+ 308009  7 301093
+           302001
+           302054
+           008002
+           302055
+           302057
+           302060
+ 308010 16 001011 TRACKOB template
+           113000
+           031001
+           301011
+           301012
+           301021
+           004080
+           022049
+           004080
+           022059
+           004080
+           022005
+           002042
+           022032
+           002042
+           004080
+ 308011 84 001003
+           001020
+           001005
+           002001
+           002036
+           002149
+           301011
+           301012
+           008021
+           301011
+           301012
+           008021
+           301021
+           027004
+           028004
+           007030
+           001051
+           002148
+           001012
+           001014
+           002040
+           033022
+           033023
+           033027
+           022063
+           302021
+           302022
+           302023
+           008081
+           025026
+           008081
+           025026
+           008081
+           025026
+           008081
+           002034
+           022060
+           007070
+           002190
+           025086
+           002035
+           002168
+           020031
+           002038
+           306004
+           002030
+           306005
+           007031
+           008081
+           012064
+           302001
+           008081
+           007032
+           007033
+           012101
+           012103
+           013003
+           007032
+           007033
+           008082
+           007033
+           002169
+           002002
+           008021
+           004025
+           011001
+           011002
+           008021
+           004025
+           011043
+           011041
+           008082
+           007033
+           007032
+           004024
+           013011
+           007032
+           008021
+           004024
+           014021
+           008021
+           025028
+           025028
+           025028
+ 308012 25 022073
+           022070
+           022074
+           022076
+           022077
+           022071
+           022078
+           022082
+           022084
+           025043
+           025044
+           112000
+           031001
+           022080
+           201134
+           022096
+           201000
+           022090
+           022086
+           022087
+           022095
+           022085
+           022088
+           022089
+           022092
+ 309001  4 301037
+           101000
+           031001
+           303011
+ 309002  4 301038
+           101000
+           031001
+           303011
+ 309003  4 301037
+           101000
+           031001
+           303012
+ 309004  4 301038
+           101000
+           031001
+           303012
+ 309005  5 301037
+           302004
+           101000
+           031001
+           303013
+ 309006  5 301038
+           302004
+           101000
+           031001
+           303013
+ 309007  5 301037
+           302004
+           101000
+           031001
+           303014
+ 309008  5 301038
+           302004
+           101000
+           031001
+           303014
+ 309011  4 301039
+           101000
+           031001
+           303011
+ 309012  4 301039
+           101000
+           031001
+           303012
+ 309013  5 301039
+           302004
+           101000
+           031001
+           303013
+ 309014  5 301039
+           302004
+           101000
+           031001
+           303014
+ 309015  4 301040
+           101000
+           031001
+           303011
+ 309016  4 301040
+           101000
+           031001
+           303012
+ 309017  5 301040
+           302004
+           101000
+           031001
+           303013
+ 309018  5 301040
+           302004
+           101000
+           031001
+           303014
+ 309019  5 301031
+           002003
+           101000
+           031001
+           303011
+ 309020  8 301031
+           002003
+           104000
+           031001
+           007003
+           011003
+           011004
+           011005
+ 309030  8 015004
+           015005
+           104000
+           031001
+           004015
+           008006
+           007004
+           015003
+ 309031  8 015004
+           015005
+           104000
+           031001
+           004025
+           008006
+           007004
+           015003
+ 309040  3 301075
+           301076
+           309030
+ 309042  4 307042
+           301075
+           301076
+           309030
+ 309050  9 301110
+           301113
+           301114
+           101000
+           031002
+           303050
+           101000
+           031001
+           303051
+ 309051  9 301110
+           301113
+           301114
+           101000
+           031002
+           303052
+           101000
+           031001
+           303053
+ 309052 11 301111
+           301113
+           301114
+           302049
+           022043
+           101000
+           031002
+           303054
+           101000
+           031001
+           303051
+ 309053  9 301112
+           301113
+           301114
+           101000
+           031002
+           303054
+           101000
+           031001
+           303051
+ 309060  4 301123
+           301121
+           302050
+           303040
+ 309061 21 301120
+           008041
+           301122
+           201131
+           202129
+           025069
+           007004
+           202000
+           201000
+           033007
+           033035
+           033015
+           013009
+           033007
+           033035
+           033015
+           002013
+           012101
+           033007
+           033035
+           033015
+ 309062 19 301120
+           008041
+           301122
+           005001
+           033035
+           033015
+           006001
+           033035
+           033015
+           007007
+           033035
+           033015
+           011003
+           033035
+           033015
+           011004
+           033035
+           033015
+           033007
+ 309063 19 301120
+           008041
+           301122
+           005001
+           033035
+           033015
+           006001
+           033035
+           033015
+           007007
+           033035
+           033015
+           011003
+           033035
+           033015
+           011004
+           033035
+           033015
+           033007
+ 309064 26 301120
+           008041
+           301122
+           201131
+           202129
+           104002
+           025069
+           007004
+           033035
+           033015
+           013003
+           033035
+           033015
+           202000
+           201000
+           104002
+           002013
+           012101
+           033035
+           033015
+           012103
+           033035
+           033015
+           010009
+           033035
+           033015
+ 309065 18 301120
+           008041
+           301122
+           005001
+           033035
+           033015
+           006001
+           033035
+           033015
+           007007
+           033035
+           033015
+           011003
+           033035
+           033015
+           011004
+           033035
+           033015
+ 309066 18 301120
+           008041
+           301122
+           008040
+           201131
+           202129
+           025069
+           007004
+           013003
+           202000
+           201000
+           002013
+           012101
+           012103
+           010009
+           010007
+           011002
+           011001
+ 309194  5 301194
+           302004
+           101000
+           031001
+           303014
+ 309195  5 301195
+           302004
+           101000
+           031001
+           303014
+ 309196  5 301196
+           302004
+           101000
+           031001
+           303014
+ 309198  5 301198
+           302004
+           101000
+           031001
+           303014
+ 310001  5 301042
+           303031
+           303032
+           101026
+           303025
+ 310002  5 301042
+           303031
+           303032
+           101009
+           303023
+ 310003  5 301042
+           303031
+           303032
+           101006
+           303023
+ 310004  5 301042
+           303031
+           303032
+           101003
+           303024
+ 310005  6 301042
+           303031
+           303033
+           101000
+           031001
+           303025
+ 310006  6 301042
+           303031
+           303033
+           101000
+           031001
+           303023
+ 310007  6 301042
+           303031
+           303033
+           101000
+           031001
+           303024
+ 310008  8 310011
+           101019
+           310012
+           002150
+           025079
+           025080
+           033032
+           014045
+ 310009  3 310011
+           101015
+           310012
+ 310010  3 310011
+           101005
+           310012
+ 310011 45 008070
+           001033
+           001034
+           008070
+           001033
+           001034
+           001007
+           002048
+           005040
+           025075
+           201133
+           005041
+           201000
+           005043
+           025070
+           033030
+           033031
+           004001
+           004002
+           004003
+           004004
+           004005
+           202131
+           201138
+           004006
+           201000
+           202000
+           005001
+           006001
+           202126
+           007001
+           202000
+           007024
+           005021
+           007025
+           005022
+           033033
+           002151
+           012064
+           002151
+           012064
+           002151
+           012064
+           002151
+           012064
+ 310012 10 002150
+           025076
+           025077
+           025078
+           033032
+           201132
+           202129
+           012063
+           202000
+           201000
+ 310013 62 001007
+           005040
+           004001
+           004002
+           004003
+           004004
+           004005
+           004006
+           005001
+           006001
+           007025
+           005043
+           025085
+           201131
+           202129
+           002150
+           008023
+           008072
+           014027
+           008072
+           014027
+           002150
+           008023
+           008072
+           014027
+           008072
+           014027
+           002150
+           008023
+           008072
+           014027
+           008072
+           014027
+           202000
+           201000
+           201132
+           202129
+           002150
+           008023
+           008072
+           012063
+           008072
+           012063
+           002150
+           008023
+           008072
+           012063
+           008072
+           012063
+           008023
+           008072
+           012063
+           008072
+           012063
+           002150
+           008023
+           008072
+           012063
+           008072
+           012063
+           202000
+           201000
+ 310014  3 301072
+           303041
+           304011
+ 310015 13 301072
+           007024
+           010002
+           303041
+           101003
+           304032
+           002152
+           002024
+           007004
+           007004
+           013003
+           101003
+           304033
+ 310016 13 301072
+           007024
+           010002
+           303041
+           101012
+           304032
+           002152
+           002024
+           007004
+           007004
+           013003
+           101012
+           304033
+ 310019 68 001007
+           002019
+           301011
+           301013
+           301023
+           007025
+           008021
+           007025
+           008021
+           007025
+           008021
+           008029
+           005040
+           008075
+           008003
+           010004
+           008003
+           207002
+           015001
+           207000
+           033070
+           015030
+           207002
+           020081
+           207000
+           008003
+           033042
+           007004
+           207002
+           015001
+           207000
+           008003
+           113021
+           007004
+           007004
+           207002
+           008021
+           015005
+           008021
+           015005
+           033007
+           207000
+           008026
+           101020
+           025143
+           008026
+           008043
+           109015
+           007004
+           008090
+           207006
+           015008
+           207000
+           008090
+           207002
+           033007
+           207000
+           008043
+           033071
+           108008
+           202124
+           201107
+           002071
+           201000
+           202000
+           207002
+           020081
+           207000
+ 310020  6 310022
+           301011
+           301013
+           301021
+           304034
+           310021
+ 310021 10 108000
+           031001
+           201131
+           202129
+           007004
+           007004
+           202000
+           201000
+           015020
+           010002
+ 310022  4 001007
+           002019
+           001033
+           002172
+ 310023 17 301072
+           030021
+           030022
+           008012
+           007024
+           007025
+           010002
+           101012
+           304032
+           105002
+           002152
+           002024
+           007004
+           007004
+           013003
+           101012
+           304033
+ 310024 17 301072
+           030021
+           030022
+           008012
+           007024
+           007025
+           010002
+           101003
+           304032
+           105002
+           002152
+           002024
+           007004
+           007004
+           013003
+           101003
+           304033
+ 310025 61 001007
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           201138
+           202131
+           004006
+           202000
+           201000
+           201132
+           005041
+           201000
+           201129
+           005043
+           201000
+           005002
+           005006
+           013040
+           020029
+           104024
+           005042
+           012163
+           021083
+           021084
+           115003
+           004001
+           004002
+           004003
+           201142
+           202131
+           004026
+           202000
+           201000
+           005001
+           006001
+           201138
+           202129
+           007001
+           202000
+           201000
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           005040
+           101003
+           012070
+           025054
+           101004
+           025055
+           008007
+           104028
+           005002
+           006002
+           002111
+           005021
+ 310026 82 310022
+           025060
+           008021
+           301011
+           301012
+           201138
+           202131
+           004006
+           202000
+           201000
+           033039
+           033007
+           304030
+           304031
+           002020
+           001050
+           202127
+           304030
+           202000
+           304031
+           201133
+           202131
+           004016
+           202000
+           201000
+           301021
+           304030
+           010035
+           005021
+           010036
+           113000
+           031002
+           301021
+           005021
+           108000
+           031001
+           002121
+           007040
+           015037
+           008023
+           201125
+           015037
+           201000
+           008023
+           033007
+           108000
+           031002
+           007007
+           015036
+           008023
+           201123
+           015036
+           201000
+           008023
+           033007
+           116000
+           031002
+           007009
+           010004
+           012001
+           013001
+           008023
+           201120
+           010004
+           201000
+           201122
+           012001
+           201000
+           201123
+           013001
+           201000
+           008023
+           033007
+           008003
+           007009
+           010004
+           008023
+           201120
+           010004
+           201000
+           008023
+           033007
+ 310029 12 110000
+           031001
+           201138
+           202130
+           007004
+           007004
+           202000
+           201000
+           015020
+           010002
+           012101
+           013098
+ 310030  6 310022
+           301011
+           301013
+           301021
+           304034
+           310029
+ 310050 14 310051
+           310052
+           101000
+           031002
+           310053
+           101004
+           310054
+           020010
+           310052
+           101015
+           310053
+           310052
+           101005
+           310053
+ 310051 16 001007
+           005040
+           201133
+           005041
+           201000
+           201132
+           025070
+           201000
+           202126
+           007001
+           202000
+           007025
+           005022
+           102009
+           002151
+           012064
+ 310052 12 002019
+           301011
+           301012
+           202131
+           201138
+           004006
+           201000
+           202000
+           301021
+           007024
+           005021
+           005043
+ 310053  6 201134
+           005042
+           201000
+           025076
+           033032
+           012163
+ 310054 13 201134
+           005042
+           201000
+           025076
+           033032
+           201131
+           202129
+           102002
+           008023
+           014027
+           008023
+           202000
+           201000
+ 310055  8 310051
+           310052
+           102020
+           025076
+           025052
+           101000
+           031002
+           025050
+ 310193  5 301250
+           303250
+           302250
+           303249
+           303251
+ 310194  5 301250
+           303250
+           302250
+           303249
+           303252
+ 310195  3 301250
+           303250
+           304250
+ 310196  3 301250
+           303249
+           303251
+ 310226 39 310022
+           025060
+           008021
+           301011
+           301012
+           201138
+           202131
+           004006
+           202000
+           201000
+           033039
+           033007
+           304030
+           304031
+           002020
+           001050
+           202127
+           304030
+           202000
+           304031
+           201133
+           202131
+           004016
+           202000
+           201000
+           301021
+           304030
+           010035
+           005021
+           010036
+           107000
+           031002
+           301021
+           005021
+           103000
+           031001
+           002121
+           007040
+           015037
+ 311001  9 301051
+           007002
+           012001
+           011001
+           011002
+           011031
+           011032
+           011033
+           020041
+ 311002  4 301065
+           301066
+           311003
+           311004
+ 311003  5 010070
+           011001
+           011002
+           012001
+           013002
+ 311004 18 101000
+           031000
+           011034
+           101000
+           031000
+           011035
+           101000
+           031000
+           011075
+           101000
+           031000
+           011076
+           101000
+           031000
+           033025
+           101000
+           031000
+           033026
+ 311005 13 001008
+           001023
+           301021
+           301011
+           301013
+           007010
+           008009
+           011001
+           011002
+           011031
+           011036
+           012101
+           033025
+ 311006  6 007010
+           011001
+           011002
+           002064
+           012101
+           012103
+ 311007  7 007010
+           301021
+           011001
+           011002
+           002064
+           012101
+           012103
+ 311008  8 001008
+           301011
+           301013
+           301021
+           008004
+           101000
+           031001
+           311006
+ 311009  8 001008
+           301011
+           301013
+           301021
+           008004
+           101000
+           031001
+           311007
+ 311193 16 301197
+           301011
+           301012
+           301023
+           008004
+           007004
+           008021
+           011001
+           011002
+           011031
+           011034
+           011035
+           012001
+           012003
+           013003
+           020041
+ 312001  2 301043
+           304001
+ 312002  2 301043
+           304002
+ 312003  2 301042
+           304003
+ 312004  2 301042
+           304004
+ 312005  2 301042
+           020014
+ 312006  2 301044
+           304005
+ 312007  2 301042
+           304006
+ 312010  6 001007
+           005040
+           002021
+           005041
+           004001
+           004043
+ 312011  9 202131
+           201149
+           004006
+           201000
+           202126
+           010002
+           202000
+           005043
+           005053
+ 312012  6 202129
+           201132
+           101019
+           012063
+           201000
+           202000
+ 312013  6 005042
+           202129
+           201135
+           012063
+           201000
+           202000
+ 312014  8 312010
+           312011
+           105056
+           301023
+           005042
+           005052
+           312012
+           312013
+ 312015 10 109011
+           301023
+           005042
+           005052
+           202129
+           201132
+           101004
+           012063
+           202000
+           201000
+ 312016  3 312010
+           312011
+           312015
+ 312017 10 109008
+           301023
+           005042
+           005052
+           202129
+           201132
+           101003
+           012063
+           202000
+           201000
+ 312018  3 312010
+           312011
+           312017
+ 312019 13 301047
+           301048
+           015015
+           029002
+           021076
+           106012
+           201129
+           006030
+           201000
+           102012
+           005030
+           021075
+           021066
+ 312020 11 301047
+           301048
+           015015
+           029002
+           021076
+           104012
+           006030
+           102012
+           005030
+           021075
+           021066
+ 312021  6 301047
+           101003
+           301049
+           011012
+           011011
+           021067
+ 312022 15 301047
+           008022
+           011012
+           011050
+           022070
+           022026
+           312041
+           010050
+           021068
+           021071
+           021072
+           021073
+           312042
+           021062
+           015011
+ 312023  7 301047
+           103003
+           008022
+           012061
+           022050
+           021069
+           021085
+ 312024 11 312020
+           008060
+           008022
+           008060
+           008022
+           025014
+           022101
+           022097
+           022098
+           022099
+           022100
+ 312025 11 312019
+           008060
+           008022
+           008060
+           008022
+           025014
+           022101
+           022097
+           022098
+           022099
+           022100
+ 312026 19 301046
+           301011
+           301013
+           301023
+           312031
+           101004
+           312030
+           021110
+           301023
+           321027
+           021111
+           301023
+           321027
+           021112
+           301023
+           321027
+           021113
+           301023
+           321027
+ 312027  9 301047
+           105009
+           301023
+           007021
+           012061
+           007021
+           012061
+           021085
+           021070
+ 312028 26 301046
+           301011
+           301013
+           301023
+           008025
+           201136
+           004006
+           201000
+           312031
+           312032
+           101004
+           312030
+           101002
+           312033
+           021110
+           301023
+           321028
+           021111
+           301023
+           321028
+           021112
+           301023
+           321028
+           021113
+           301023
+           321028
+ 312030 13 201130
+           202129
+           011012
+           202000
+           201000
+           011052
+           201135
+           202130
+           011011
+           202000
+           201000
+           011053
+           021104
+ 312031  8 005034
+           006034
+           021109
+           011081
+           011082
+           021101
+           021102
+           021103
+ 312032  4 021120
+           021121
+           013055
+           021122
+ 312033  4 002104
+           008022
+           012063
+           012065
+ 312041  5 201141
+           202130
+           007001
+           201000
+           202000
+ 312042  6 021077
+           021078
+           021079
+           021080
+           021081
+           021082
+ 312045 21 001007
+           002019
+           001096
+           025061
+           005040
+           301011
+           301013
+           301021
+           007002
+           012180
+           012181
+           012182
+           012183
+           012184
+           012185
+           002174
+           021086
+           012186
+           021087
+           012187
+           033043
+ 312050 23 001007
+           002019
+           001096
+           025061
+           005040
+           301011
+           301013
+           301021
+           007025
+           005022
+           010080
+           027080
+           008003
+           007004
+           013093
+           008003
+           201131
+           202129
+           007004
+           007004
+           202000
+           201000
+           013095
+ 312051 48 001007
+           002019
+           001096
+           025061
+           005040
+           008075
+           301011
+           301013
+           301021
+           001012
+           201131
+           001013
+           201000
+           010032
+           010033
+           010034
+           007002
+           008012
+           025110
+           025111
+           025102
+           002104
+           025103
+           025104
+           025105
+           025106
+           025107
+           025108
+           002111
+           002121
+           002026
+           002027
+           021130
+           021131
+           021132
+           021133
+           021064
+           025014
+           021134
+           107018
+           005030
+           105024
+           201130
+           006030
+           201000
+           021135
+           021136
+           033044
+ 312052 77 001007
+           002019
+           001096
+           025061
+           005040
+           025120
+           025121
+           025124
+           025125
+           025122
+           025123
+           301011
+           301013
+           301021
+           007002
+           002119
+           033047
+           010081
+           010082
+           010083
+           010084
+           002116
+           002117
+           002118
+           002156
+           002157
+           014055
+           022150
+           022151
+           022152
+           022153
+           022154
+           022155
+           022156
+           022157
+           022158
+           022159
+           021137
+           021138
+           021139
+           021140
+           021141
+           021142
+           010085
+           010086
+           010087
+           010088
+           010089
+           010090
+           010091
+           010092
+           010093
+           011002
+           025126
+           025127
+           025128
+           025129
+           025130
+           025131
+           025132
+           025133
+           025134
+           025135
+           025136
+           025137
+           013096
+           013097
+           011095
+           011096
+           012188
+           012189
+           002158
+           002159
+           033052
+           033053
+           021143
+           021144
+ 312053 54 001007
+           002019
+           001096
+           025061
+           005040
+           008075
+           301011
+           301013
+           301021
+           001012
+           201131
+           001013
+           201000
+           010032
+           010033
+           010034
+           007002
+           008012
+           025110
+           025111
+           025102
+           002104
+           025103
+           025104
+           025105
+           025106
+           025107
+           025108
+           011001
+           011002
+           022160
+           025138
+           201130
+           202129
+           022021
+           202000
+           201000
+           033048
+           033049
+           002026
+           002027
+           021130
+           021131
+           021132
+           021133
+           025014
+           106036
+           005030
+           104024
+           201130
+           006030
+           201000
+           022161
+           033044
+ 312055  5 005033
+           005040
+           006034
+           010095
+           021157
+ 312056 11 025060
+           001032
+           011082
+           011081
+           020095
+           020096
+           021155
+           201133
+           021101
+           021102
+           201000
+ 312057 12 201130
+           202129
+           011012
+           202000
+           201000
+           201131
+           202129
+           011011
+           202000
+           201000
+           021156
+           021104
+ 312058  8 301125
+           301011
+           301013
+           301021
+           312055
+           021150
+           101003
+           321030
+ 312059  4 312056
+           101000
+           031001
+           312057
+ 312060 20 025060
+           025062
+           040001
+           040002
+           021062
+           021151
+           021152
+           021153
+           021154
+           021062
+           021062
+           040003
+           040004
+           040005
+           040006
+           040007
+           020065
+           040008
+           040009
+           040010
+ 312061  3 312058
+           312060
+           312059
+ 312200 10 301237
+           301238
+           029002
+           021206
+           104012
+           006232
+           102012
+           005232
+           021205
+           021196
+ 312201  6 301237
+           101003
+           301239
+           011012
+           011011
+           021197
+ 312202 13 301237
+           008022
+           011012
+           011050
+           301240
+           022243
+           301241
+           010050
+           021198
+           021201
+           021202
+           021203
+           301242
+ 312203  8 301237
+           008022
+           012061
+           022050
+           021204
+           021199
+           021214
+           021215
+ 312204 12 312201
+           001031
+           011012
+           011011
+           021200
+           021213
+           004004
+           008021
+           004024
+           055003
+           011012
+           011011
+ 312207  3 312202
+           301202
+           033191
+ 312208 17 301202
+           008022
+           008021
+           301011
+           301013
+           301023
+           302205
+           011002
+           001007
+           002021
+           301011
+           301013
+           301023
+           001032
+           001192
+           302205
+           011002
+ 312209 11 301202
+           001192
+           301011
+           301013
+           301023
+           302206
+           104000
+           022192
+           102000
+           005232
+           022191
+ 312210 13 312202
+           021192
+           015202
+           301011
+           004004
+           004005
+           201138
+           202131
+           004006
+           201000
+           202000
+           304228
+           304229
+ 312211 19 301046
+           301011
+           301013
+           301023
+           312031
+           101004
+           312030
+           021110
+           101004
+           312212
+           021111
+           101004
+           312212
+           021112
+           101004
+           312212
+           021113
+           101004
+           312212
+ 312212  2 301023
+           321027
+ 313009  4 021001
+           101000
+           031001
+           021001
+ 313010  4 021036
+           101000
+           031001
+           021036
+ 313031  5 006002
+           006012
+           101000
+           031002
+           030001
+ 313032  5 005002
+           005012
+           101000
+           031002
+           313031
+ 313041 13 006002
+           110000
+           031001
+           104000
+           031001
+           006012
+           101000
+           031012
+           030001
+           006012
+           101000
+           031001
+           030001
+ 313042  5 005002
+           005012
+           101000
+           031002
+           313041
+ 313043 17 006002
+           005002
+           005012
+           112000
+           031001
+           110000
+           031001
+           104000
+           031001
+           006012
+           101000
+           031011
+           030001
+           006012
+           101000
+           031001
+           030001
+ 315001  5 001011
+           301011
+           301012
+           301023
+           306001
+ 315002  5 001011
+           301011
+           301012
+           301023
+           306004
+ 316001 10 301011
+           004004
+           301023
+           001021
+           002041
+           019001
+           010051
+           019002
+           019003
+           019004
+ 316002 15 008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           001033
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           007002
+           007002
+ 316003 12 110000
+           031001
+           008011
+           008007
+           104000
+           031001
+           005002
+           006002
+           010002
+           011002
+           008007
+           008011
+ 316004 13 111000
+           031001
+           008011
+           008007
+           007002
+           007002
+           102000
+           031001
+           005002
+           006002
+           011031
+           008007
+           008011
+ 316005 10 108000
+           031001
+           008005
+           008007
+           005002
+           006002
+           001026
+           019001
+           008007
+           008005
+ 316006 14 112000
+           031001
+           008011
+           008007
+           007002
+           007002
+           102000
+           031001
+           005002
+           006002
+           020011
+           020012
+           008007
+           008011
+ 316007 12 110000
+           031001
+           008011
+           008007
+           104000
+           031001
+           005002
+           006002
+           019005
+           019006
+           008007
+           008011
+ 316008 13 111000
+           031001
+           008001
+           008007
+           008023
+           103000
+           031001
+           005002
+           006002
+           010002
+           008023
+           008007
+           008001
+ 316009 13 111000
+           031001
+           008011
+           008007
+           007002
+           007002
+           102000
+           031001
+           005002
+           006002
+           020041
+           008007
+           008011
+ 316010  9 107000
+           031001
+           008011
+           008007
+           001022
+           005002
+           006002
+           008007
+           008011
+ 316011 19 117000
+           031001
+           008011
+           001022
+           008007
+           102000
+           031001
+           005002
+           006002
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           020090
+           008021
+           008007
+           008011
+ 316022 24 001032
+           002041
+           019001
+           019010
+           118000
+           031001
+           008021
+           004014
+           008005
+           301023
+           019005
+           019006
+           010004
+           011041
+           008021
+           004075
+           011040
+           019008
+           105004
+           005021
+           005021
+           102002
+           019003
+           019004
+ 316050 16 301001
+           301011
+           301012
+           002160
+           008005
+           005002
+           006002
+           008005
+           019100
+           019005
+           019006
+           019101
+           019102
+           019103
+           019104
+           019105
+ 316052 29 301005
+           301011
+           301012
+           001007
+           025150
+           122000
+           031001
+           001027
+           019150
+           019106
+           008005
+           005002
+           006002
+           008005
+           019107
+           019005
+           019006
+           019108
+           019109
+           019110
+           019111
+           019112
+           019113
+           019114
+           019115
+           019116
+           019117
+           019118
+           019119
+ 318001  2 301025
+           024011
+ 318003  4 301026
+           024005
+           024004
+           024021
+ 318004  6 301025
+           004023
+           013011
+           024005
+           024004
+           024022
+ 321001  6 002101
+           002114
+           002105
+           002106
+           002107
+           002121
+ 321003  4 021051
+           021014
+           021017
+           021030
+ 321004  5 301031
+           002003
+           101000
+           031001
+           321003
+ 321005 12 025004
+           002121
+           002122
+           002123
+           002124
+           002125
+           002126
+           002127
+           002128
+           002129
+           002130
+           002131
+ 321006  4 025001
+           025002
+           025003
+           025005
+ 321007  8 025009
+           025010
+           025011
+           025012
+           025013
+           025015
+           025016
+           025017
+ 321008  3 025006
+           025007
+           025008
+ 321009  2 025018
+           025019
+ 321010 13 002101
+           007002
+           002102
+           002103
+           002104
+           002105
+           002106
+           002107
+           002108
+           002109
+           002110
+           002132
+           002133
+ 321011  3 030031
+           030032
+           029002
+ 321012  3 101000
+           031001
+           002135
+ 321021 15 002003
+           002101
+           201130
+           002106
+           201000
+           201132
+           202130
+           002121
+           202000
+           201000
+           201133
+           202129
+           025001
+           202000
+           201000
+ 321022 11 007007
+           204001
+           031021
+           011001
+           204000
+           011002
+           204001
+           031021
+           011006
+           204000
+           021030
+ 321023  9 007007
+           021091
+           021030
+           202129
+           021014
+           201129
+           021017
+           202000
+           201000
+ 321024  7 007007
+           204001
+           031021
+           012007
+           011006
+           204000
+           021030
+ 321025 17 007007
+           021091
+           021030
+           202129
+           021014
+           201129
+           021017
+           202000
+           201000
+           021092
+           021030
+           025092
+           201129
+           202129
+           021017
+           202000
+           201000
+ 321026 10 007007
+           204001
+           031021
+           012007
+           025091
+           011071
+           011072
+           011073
+           011074
+           204000
+ 321027 18 021118
+           202129
+           201132
+           002112
+           201000
+           201131
+           002111
+           201000
+           202000
+           002104
+           021105
+           021106
+           021107
+           021114
+           021115
+           021116
+           008018
+           021117
+ 321028 18 021118
+           202129
+           201132
+           002112
+           201000
+           201131
+           002111
+           201000
+           202000
+           002104
+           021123
+           021106
+           021107
+           021114
+           021115
+           021116
+           008018
+           021117
+ 321030 18 008085
+           202129
+           201131
+           002111
+           201000
+           202000
+           002134
+           021062
+           021063
+           021158
+           021159
+           021160
+           021161
+           021162
+           021163
+           021164
+           021165
+           021166
+ 321193 12 110000
+           031002
+           005031
+           107000
+           031001
+           102000
+           031001
+           031012
+           030002
+           101000
+           031001
+           030002
+ 321204  4 102000
+           031001
+           001192
+           001193
+ 321205  3 102002
+           301011
+           301013
+ 321206  6 030197
+           103000
+           031002
+           101000
+           031002
+           030198
+ 340001 45 001007
+           001031
+           002019
+           002020
+           004001
+           004002
+           004003
+           004004
+           004005
+           202131
+           201138
+           004006
+           201000
+           202000
+           005001
+           006001
+           007024
+           005021
+           007025
+           005022
+           005043
+           005040
+           201133
+           005041
+           201000
+           201132
+           025070
+           201000
+           202126
+           007001
+           202000
+           033060
+           033061
+           033062
+           033063
+           033064
+           033065
+           101010
+           340002
+           101087
+           340003
+           002019
+           025051
+           101007
+           340004
+ 340002  3 025140
+           025141
+           025142
+ 340003  5 104100
+           201136
+           005042
+           201000
+           014046
+ 340004  9 005060
+           005061
+           025085
+           105006
+           005042
+           025142
+           014047
+           025142
+           014048
diff --git a/src/OperaRadar/D0000000065535002004.TXT b/src/OperaRadar/D0000000065535002004.TXT
new file mode 100644
index 0000000..0f45016
--- /dev/null
+++ b/src/OperaRadar/D0000000065535002004.TXT
@@ -0,0 +1,4123 @@
+ 300002  2 000002
+           000003
+ 300003  3 000010
+           000011
+           000012
+ 300004  9 300003
+           000013
+           000014
+           000015
+           000016
+           000017
+           000018
+           000019
+           000020
+ 300010  4 300003
+           101000
+           031001
+           000030
+ 301001  2 001001
+           001002
+ 301002  3 001003
+           001004
+           001005
+ 301003  3 001011
+           001012
+           001013
+ 301004  4 001001
+           001002
+           001015
+           002001
+ 301005  2 001035
+           001034
+ 301011  3 004001
+           004002
+           004003
+ 301012  2 004004
+           004005
+ 301013  3 004004
+           004005
+           004006
+ 301021  2 005001
+           006001
+ 301022  3 005001
+           006001
+           007001
+ 301023  2 005002
+           006002
+ 301024  3 005002
+           006002
+           007001
+ 301025  3 301023
+           004003
+           301012
+ 301026  7 301021
+           004003
+           004003
+           004004
+           004004
+           004005
+           004005
+ 301031  5 301001
+           002001
+           301011
+           301012
+           301022
+ 301032  5 301001
+           002001
+           301011
+           301012
+           301024
+ 301033  5 001005
+           002001
+           301011
+           301012
+           301021
+ 301034  5 001005
+           002001
+           301011
+           301012
+           301023
+ 301035  7 001005 
+           001012
+           001013
+           002001
+           301011
+           301012
+           301023
+ 301036  5 301003
+           002001
+           301011
+           301012
+           301023
+ 301037  6 301001
+           002011
+           002012
+           301011
+           301012
+           301022
+ 301038  6 301001
+           002011
+           002012
+           301011
+           301012
+           301024
+ 301039  6 301003
+           002011
+           002012
+           301011
+           301012
+           301023
+ 301040  6 301003
+           002011
+           002012
+           301011
+           301012
+           301024
+ 301041  5 001007
+           002021
+           002022
+           301011
+           301012
+ 301042  2 301041
+           301021
+ 301043  5 001007
+           002023
+           301011
+           301013
+           301021
+ 301044  5 001007
+           002024
+           301011
+           301013
+           301021
+ 301045  9 301011
+           301012
+           201138
+           202131
+           004006
+           201000
+           202000
+           304030
+           304031
+ 301046 10 001007
+           001012
+           002048
+           021119
+           025060
+           202124
+           002026
+           002027
+           202000
+           005040
+ 301047 15 001007
+           025060
+           001033
+           001034
+           001012
+           301045
+           002021
+           301011
+           301012
+           201138
+           202131
+           004006
+           201000
+           202000
+           301023
+ 301048 14 002104
+           002121
+           002113
+           002026
+           002027
+           002111
+           002140
+           202127
+           001013
+           202126
+           007001
+           202000
+           025010
+           021064
+ 301049  5 002111
+           002112
+           021062
+           021063
+           021065
+ 301051  6 001006
+           002061
+           301011
+           301012
+           301021
+           008004
+ 301055  7 001005
+           002001
+           301011
+           301012
+           301021
+           001012
+           001014
+ 301062  3 101000
+           031001
+           301001
+ 301065  8 001006
+           001008
+           002001
+           002002
+           002005
+           002062
+           002070
+           002065
+ 301066  6 301011
+           301013
+           301023
+           007004
+           002064
+           008004
+ 301071  5 001007
+           001031
+           002020
+           002028
+           002029
+ 301072  4 301071
+           301011
+           301013
+           301021
+ 301074  4 002143
+           002142
+           002145
+           002146
+ 301075  6 301001
+           001015
+           301024
+           008021
+           301011
+           301012
+ 301076  3 002011
+           002143
+           002142
+ 301090  6 301004
+           301011
+           301012
+           301021
+           007030
+           007031
+ 301091 10 002180
+           002181
+           002182
+           002183
+           002184
+           002179
+           002186
+           002187
+           002188
+           002189
+ 301092  9 001011
+           001003
+           002001
+           301011
+           301012
+           301021
+           007030
+           007031
+           033024
+ 301093  3 301036
+           007030
+           007031
+ 301110  5 301001
+           001011
+           002011
+           002014
+           002003
+ 301111  6 301001
+           001011
+           002011
+           002013
+           002014
+           002003
+ 301112  5 001006
+           002011
+           002013
+           002014
+           002003
+ 301113  3 008021
+           301011
+           301013
+ 301114  5 301021
+           007030
+           007031
+           007007
+           033024
+ 301120  4 301001
+           001094
+           002011
+           301121
+ 301121  5 008041
+           301122
+           301021
+           007031
+           007007
+ 301122  7 301011
+           301012
+           201135
+           202130
+           004006
+           202000
+           201000
+ 301123 33 102002
+           008041
+           001062
+           301001
+           001094
+           002011
+           001018
+           001095
+           025061
+           025068
+           001082
+           001083
+           001081
+           002067
+           002066
+           002014
+           025067
+           025065
+           025066
+           002095
+           002096
+           002097
+           002016
+           002083
+           002080
+           002081
+           001093
+           002084
+           002085
+           002086
+           002082
+           008041
+           301011
+ 301125  6 001033
+           001034
+           025060
+           001007
+           002019
+           001012
+ 301193  5 001007
+           001031
+           002196
+           002221
+           002222
+ 301194  9 001194
+           001012
+           001013
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301195  9 001195
+           001012
+           001013
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301196  7 301003
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301197  9 001006
+           001008
+           002061
+           002062
+           002002
+           002005
+           002070
+           002063
+           002001
+ 301198  9 001011
+           001012
+           001013
+           002011
+           002012
+           301011
+           301012
+           301023
+           007001
+ 301200  2 001032
+           033194
+ 301201  2 101003
+           033193
+ 301202  2 001031
+           001032
+ 301237 12 001007
+           001012
+           002021
+           301011
+           004004
+           004005
+           201138
+           202131
+           004006
+           201000
+           202000
+           301023
+ 301238 14 002104
+           002121
+           002113
+           002026
+           002027
+           002111
+           002192
+           202127
+           001013
+           202126
+           007001
+           202000
+           025010
+           021194
+ 301239  5 002111
+           002112
+           021192
+           021193
+           021195
+ 301240  5 201131
+           202129
+           022021
+           201000
+           202000
+ 301241  5 201141
+           202130
+           007001
+           201000
+           202000
+ 301242  6 021207
+           021208
+           021209
+           021210
+           021211
+           021212
+ 301250  4 301193
+           301011
+           301013
+           301021
+ 302001  4 010004
+           010051
+           010061
+           010063
+ 302002  5 010004
+           007004
+           010003
+           010061
+           010063
+ 302003  9 011011
+           011012
+           012004
+           012006
+           013003
+           020001
+           020003
+           020004
+           020005
+ 302004  7 020010
+           008002
+           020011
+           020013
+           020012
+           020012
+           020012
+ 302005  4 008002
+           020011
+           020012
+           020013
+ 302006  4 010004
+           010051
+           010062
+           010063
+ 302011  3 302001
+           302003
+           302004
+ 302012  3 302002
+           302003
+           302004
+ 302013  5 302006
+           302003
+           101000
+           031001
+           302005
+ 302021  3 022001
+           022011
+           022021
+ 302022  3 022002
+           022012
+           022022
+ 302023  3 022003
+           022013
+           022023
+ 302024  3 302022
+           101002
+           302023
+ 302031  4 302001
+           010062
+           007004
+           010009
+ 302032  4 007032
+           012101
+           012103
+           013003
+ 302033  2 007032
+           020001
+ 302034  2 007032
+           013023
+ 302035  8 302032
+           302033
+           302034
+           007032
+           302004
+           101000
+           031001
+           302005
+ 302036  7 105000
+           031001
+           008002
+           020011
+           020012
+           020014
+           020017
+ 302037  3 020062
+           013013
+           012113
+ 302038  4 020003
+           004024
+           020004
+           020005
+ 302039  2 004024
+           014031
+ 302040  4 007032
+           102002
+           004024
+           013011
+ 302041  7 007032
+           004024
+           004024
+           012111
+           004024
+           004024
+           012112
+ 302042 11 007032
+           002002
+           008021
+           004025
+           011001
+           011002
+           008021
+           103002
+           004025
+           011043
+           011041
+ 302043  7 302038
+           101002
+           302039
+           302040
+           302041
+           302042
+           007032
+ 302044  3 004024
+           002004
+           013033
+ 302045  7 004024
+           014002
+           014004
+           014016
+           014028
+           014029
+           014030
+ 302046  3 004024
+           004024
+           012049
+ 302047  3 102003
+           008002
+           020054
+ 302048  5 005021
+           007021
+           020012
+           005021
+           007021
+ 302049  7 008002
+           020011
+           020013
+           020012
+           020012
+           020012
+           008002
+ 302050 31 008041
+           005021
+           007005
+           202130
+           006021
+           202000
+           008041
+           201131
+           202129
+           002115
+           010004
+           002115
+           013003
+           202000
+           201000
+           002115
+           011001
+           011002
+           002115
+           102002
+           012101
+           004024
+           002115
+           012103
+           012102
+           101003
+           020012
+           020011
+           020013
+           101002
+           020003
+ 302051 12 010004
+           010051
+           007004
+           010003
+           012004
+           012051
+           012016
+           012017
+           013004
+           102004
+           008051
+           008020
+ 302052  7 007032
+           007033
+           012101
+           002039
+           012102
+           012103
+           013003
+ 302053  3 007032
+           007033
+           020001
+ 302054  9 302052
+           302053
+           007033
+           302034
+           007032
+           302004
+           101000
+           031001
+           302005
+ 302055  8 020031
+           020032
+           020033
+           020034
+           020035
+           020036
+           020037
+           020038
+ 302056  4 002038
+           007063
+           022043
+           007063
+ 302057  3 302056
+           302021
+           302024
+ 302058  8 007032
+           007033
+           004024
+           004024
+           012111
+           004024
+           004024
+           012112
+ 302059 12 007032
+           007033
+           002002
+           008021
+           004025
+           011001
+           011002
+           008021
+           103002
+           004025
+           011043
+           011041
+ 302060  4 302038
+           302040
+           302058
+           302059
+ 302062 24 302001
+           302052
+           302053
+           007033
+           101000
+           031000
+           302034
+           007032
+           101000
+           031001
+           302005
+           008002
+           101000
+           031000
+           302055
+           101000
+           031000
+           302056
+           101000
+           031000
+           302021
+           101000
+           031000
+           302024
+ 302063  8 302038
+           101000
+           031000
+           302040
+           101000
+           031000
+           302058
+           302059
+ 302066 16 020023
+           020024
+           020027
+           020054
+           020023
+           020027
+           020054
+           020025
+           020026
+           020027
+           020040
+           020066
+           020027
+           020021
+           020067
+           020027
+ 302069  4 007032
+           007033
+           033041
+           020001
+ 302070  8 007032
+           007033
+           011001
+           011002
+           011043
+           011041
+           011016
+           011017
+ 302071 14 007032
+           007033
+           008021
+           004025
+           011001
+           011002
+           008021
+           103002
+           004025
+           011043
+           011041
+           004025
+           011016
+           011017
+ 302072  5 007032
+           007033
+           012101
+           012103
+           013003
+ 302073  7 020010
+           105004
+           008002
+           020011
+           020012
+           033041
+           020013
+ 302074  4 020003
+           004025
+           020004
+           020005
+ 302075  5 008021
+           004025
+           013055
+           013058
+           008021
+ 302076  7 020021
+           020022
+           026020
+           020023
+           020024
+           020025
+           020026
+ 302077  8 007032
+           007033
+           004025
+           012111
+           012112
+           007032
+           004025
+           012112
+ 302078  4 002176
+           020062
+           002177
+           013013
+ 302079  5 007032
+           002175
+           002178
+           004025
+           013011
+ 302080  3 002185
+           004025
+           013033
+ 302081  2 004025
+           014031
+ 302082  7 004025
+           014002
+           014004
+           014016
+           014028
+           014029
+           014030
+ 302083  8 004025
+           008023
+           010004
+           011001
+           011002
+           012101
+           013003
+           008023
+ 302205  5 201131
+           202129
+           022021
+           201000
+           202000
+ 302206  9 302205
+           201130
+           202129
+           022011
+           201000
+           202000
+           022001
+           011001
+           011002
+ 302207  5 022193
+           022194
+           022195
+           022196
+           022197
+ 302250  5 102000
+           031001
+           020193
+           020194
+           020012
+ 303001  3 007003
+           011001
+           011002
+ 303002  3 007004
+           011001
+           011002
+ 303003  4 007004
+           010003
+           012001
+           012003
+ 303004  6 007004
+           010003
+           012001
+           012003
+           011001
+           011002
+ 303011  4 007003
+           008001
+           011001
+           011002
+ 303012  4 007004
+           008001
+           011001
+           011002
+ 303013  7 007004
+           008001
+           010003
+           012001
+           013003
+           011001
+           011002
+ 303014  7 007004
+           008001
+           010003
+           012001
+           012003
+           011001
+           011002
+ 303021  4 007004
+           007004
+           204007
+           031021
+ 303022  3 303021
+           010003
+           204000
+ 303023  3 303021
+           012001
+           204000
+ 303024  3 303021
+           013016
+           204000
+ 303025  5 002025
+           204007
+           031021
+           012063
+           204000
+ 303026  6 007004
+           008003
+           204007
+           031021
+           012001
+           204000
+ 303027  5 007004
+           204007
+           031021
+           010003
+           204000
+ 303031  6 007004
+           008003
+           007021
+           007022
+           008012
+           012061
+ 303032  2 020011
+           020016
+ 303033  2 020010
+           020016
+ 303040 18 008041
+           004025
+           004026
+           301021
+           301122
+           201131
+           202129
+           025069
+           007004
+           013003
+           202000
+           201000
+           002013
+           012101
+           010009
+           102002
+           008040
+           035035
+ 303041  8 002152
+           002023
+           007004
+           011001
+           011002
+           002153
+           002154
+           012071
+ 303050  7 004086
+           008042
+           007004
+           005015
+           006015
+           011001
+           011002
+ 303051  7 004086
+           008042
+           007004
+           005015
+           006015
+           011061
+           011062
+ 303052  7 004086
+           008042
+           007009
+           005015
+           006015
+           011001
+           011002
+ 303053  7 004086
+           008042
+           007009
+           005015
+           006015
+           011061
+           011062
+ 303054 10 004086
+           008042
+           007004
+           010009
+           005015
+           006015
+           012101
+           012103
+           011001
+           011002
+ 303249  7 002252
+           104000
+           031001
+           002199
+           007004
+           007004
+           013003
+ 303250  8 002252
+           002023
+           007004
+           011001
+           011002
+           002197
+           002198
+           012193
+ 303251  8 002252
+           105000
+           031001
+           002254
+           002251
+           002197
+           002198
+           012063
+ 303252  8 002252
+           105000
+           031001
+           002254
+           002251
+           002197
+           002198
+           012194
+ 304001  5 008003
+           010004
+           012001
+           011001
+           011002
+ 304002  4 008003
+           010004
+           011001
+           011002
+ 304003  2 008003
+           012001
+ 304004  4 008003
+           010004
+           020010
+           012001
+ 304005  4 002024
+           007004
+           007004
+           013003
+ 304006  3 014001
+           014001
+           014003
+ 304011 27 002163
+           002164
+           008012
+           007024
+           002057
+           008021
+           004001
+           004002
+           004003
+           004004
+           008021
+           004024
+           110004
+           008021
+           004004
+           004005
+           004006
+           008021
+           004004
+           004005
+           004006
+           011001
+           011002
+           103010
+           002163
+           007004
+           012001
+ 304030  3 027031
+           028031
+           010031
+ 304031  3 001041
+           001042
+           001043
+ 304032  5 002153
+           002154
+           020081
+           020082
+           020012
+ 304033  8 002152
+           002166
+           002167
+           002153
+           002154
+           012075
+           012076
+           012063
+ 304034  9 102004
+           027001
+           028001
+           007022
+           005043
+           020010
+           020016
+           033003
+           010040
+ 304228  3 005217
+           006217
+           007217
+ 304229  3 001208
+           001209
+           001210
+ 304250 27 002231
+           002232
+           008012
+           007024
+           002057
+           008021
+           004001
+           004002
+           004003
+           004004
+           008021
+           004024
+           110004
+           008021
+           004004
+           004005
+           004006
+           008021
+           004004
+           004005
+           004006
+           011001
+           011002
+           103010
+           002231
+           007004
+           012001
+ 305003  5 301012
+           004065
+           101000
+           031001
+           305001
+ 305006  6 013072
+           013082
+           013019
+           012001
+           013073
+           013060
+ 305007  6 301029
+           301012
+           004065
+           101000
+           031001
+           305006
+ 305008  2 305006
+           012030
+ 305009  6 301029
+           301012
+           004065
+           101000
+           031001
+           305008
+ 305011  6 301029
+           301012
+           004065
+           101000
+           031001
+           305010
+ 305018  8 301029
+           301012
+           004065
+           103000
+           031001
+           305008
+           305016
+           305017
+ 306001  5 002032
+           102000
+           031001
+           007062
+           022042
+ 306002  3 002031
+           022004
+           022031
+ 306003  4 002002
+           011011
+           011012
+           012004
+ 306004  7 002032
+           002033
+           103000
+           031001
+           007062
+           022043
+           022062
+ 306005  6 002031
+           103000
+           031001
+           007062
+           022004
+           022031
+ 306006  3 306003
+           306002
+           022063
+ 306007  6 001012
+           001014
+           306008
+           004024
+           027003
+           028003
+ 306008  3 002034
+           002035
+           002036
+ 306019  8 001075
+           301011
+           301012
+           022042
+           022120
+           022121
+           004015
+           004065
+ 306020  4 306024
+           102006
+           022038
+           022039
+ 306021  7 001075
+           301011
+           301012
+           022122
+           022123
+           012001
+           303002
+ 306022  5 001075
+           301011
+           301012
+           022038
+           022039
+ 306023  8 001015
+           301023
+           301011
+           301012
+           022038
+           022039
+           022120
+           022121
+ 306024  8 001075
+           301011
+           301012
+           022042
+           022120
+           022121
+           004025
+           004015
+ 306025  4 306019
+           102006
+           022038
+           022039
+ 307001  2 301031
+           302011
+ 307002  2 301032
+           302011
+ 307003  4 307001
+           101000
+           031001
+           302005
+ 307004  4 307002
+           101000
+           031001
+           302005
+ 307005  3 307001
+           101004
+           302005
+ 307006  3 307002
+           101004
+           302005
+ 307007  2 301031
+           302012
+ 307008  2 301032
+           302012
+ 307009  2 301031
+           302013
+ 307011 16 001063
+           002001
+           301011
+           301012
+           301024
+           007006
+           011001
+           011016
+           011017
+           011002
+           011041
+           007006
+           012001
+           012003
+           010052
+           020009
+ 307012  5 103000
+           031001
+           008023
+           005021
+           020001
+ 307013  8 106000
+           031001
+           001064
+           008014
+           020061
+           008014
+           020061
+           020018
+ 307014  3 101000
+           031001
+           020019
+ 307015  4 101000
+           031001
+           302005
+           020002
+ 307016  3 101000
+           031001
+           020020
+ 307017  3 101000
+           031001
+           011070
+ 307018 16 008016
+           102000
+           031001
+           008017
+           301012
+           104000
+           031001
+           007006
+           011001
+           011002
+           011041
+           020009
+           101000
+           031001
+           020001
+           307014
+ 307020  3 307011
+           307014
+           307016
+ 307021  9 307011
+           307012
+           307013
+           307014
+           307015
+           307016
+           307017
+           307018
+           307015
+ 307022 31 001015
+           301011
+           301012
+           301022
+           008021
+           004025
+           010004
+           012001
+           013003
+           033038
+           008022
+           106025
+           002020
+           001050
+           005021
+           007021
+           015031
+           015032
+           008060
+           015033
+           015034
+           008060
+           015033
+           015034
+           015035
+           201131
+           202129
+           013016
+           202000
+           201000
+           015011
+ 307030  2 015001
+           015002
+ 307031  7 008022
+           008023
+           015001
+           008023
+           015001
+           008023
+           015002
+ 307041  7 301001
+           001015
+           301022
+           301011
+           301012
+           301070
+           307030
+ 307042  9 301001
+           001015
+           301022
+           301011
+           301012
+           008021
+           004025
+           301070
+           307031
+ 307043  7 301001
+           001015
+           301024
+           301011
+           301012
+           301074
+           307030
+ 307045 25 001063
+           008079
+           002001
+           301011
+           301012
+           301024
+           007032
+           011001
+           011016
+           011017
+           008054
+           011083
+           011084
+           011002
+           008054
+           011085
+           011086
+           011041
+           008054
+           007032
+           012023
+           012024
+           007032
+           010052
+           020009
+ 307046  5 020060 Metar/speci visibility
+           103000
+           031001
+           005021
+           020059
+ 307047  9 105000 Metar/speci clouds
+           031001
+           008002
+           020011
+           020012
+           020013
+           020092
+           020002
+           020091
+ 307048 25 008016
+           102000
+           031001
+           008017
+           301012
+           112000
+           031000
+           007032
+           011001
+           008054
+           011083
+           011084
+           011002
+           008054
+           011085
+           011086
+           011041
+           008054
+           007032
+           020009
+           101000
+           031000
+           020060
+           307014
+           307047
+ 307049  4 102000
+           031000
+           022043
+           022021
+ 307050 14 101000
+           031000
+           020085
+           102000
+           031001
+           001064
+           020085
+           105000
+           031001
+           001064
+           020086
+           020087
+           020088
+           020089
+ 307059 12 307045 Full METAR/SPECI
+           307046
+           307013
+           307014
+           307047
+           307016
+           307017
+           307049
+           307050
+           101000
+           031001
+           307048 Trend forecast
+ 307052 10 001063
+           008039
+           301011
+           301012
+           008079
+           301011 start of forecast
+           301012
+           301011 end of forecast
+           301012
+           301024
+ 307053 16 007032
+           011001
+           008054
+           011083
+           011084
+           011002
+           008054
+           011085
+           011086
+           011041
+           008054
+           007032
+           020009
+           020060
+           307014
+           307047
+ 307054 14 007032
+           008039
+           004003
+           004004
+           008023
+           012023
+           008039
+           004003
+           004004
+           008023
+           012023
+           008023
+           008039
+           007032
+ 307055  7 033045
+           008016
+           004003
+           301012
+           004003
+           301012
+           307053
+ 307056  6 307052 Aerodrome forecast
+           307053
+           307054
+           101000
+           031001
+           307055
+ 307063  2 007061
+           012130
+ 307071 67 301090
+           004074
+           004023
+           008023
+           010004
+           010051
+           007004
+           010009
+           007032
+           012101
+           002051
+           004051
+           012118
+           004052
+           012119
+           013004
+           008023
+           012151
+           007032
+           102005
+           008050
+           008020
+           014032
+           014033
+           008050
+           008020
+           102018
+           008052
+           008022
+           007032
+           008053
+           004003
+           012152
+           008053
+           004003
+           012153
+           008053
+           004003
+           008023
+           012101
+           008053
+           004003
+           008023
+           012101
+           008023
+           007032
+           002002
+           008053
+           004003
+           011046
+           008053
+           004003
+           004004
+           004023
+           007032
+           013060
+           013051
+           004053
+           008050
+           008020
+           102006
+           008052
+           008022
+           008053
+           004003
+           013052
+           007032
+ 307072 38 004001
+           004001
+           004002
+           004003
+           004004
+           004074
+           004022
+           008023
+           010004
+           010051
+           007004
+           010009
+           007032
+           012101
+           002051
+           004051
+           012118
+           004052
+           012119
+           013004
+           012151
+           007032
+           014032
+           008023
+           004001
+           004001
+           004002
+           004003
+           004004
+           004022
+           007032
+           008023
+           013060
+           004053
+           008023
+           102006
+           008050
+           008020
+ 307073  2 307071
+           307072
+ 307080 13 301090 BUFR template for synoptic reports
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307081 24 301090 BUFR template for synoptic reports RA I
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           012122
+           013056
+           013057
+           020101
+           020102
+           020103
+           020104
+           020105
+           020106
+           020107
+           020108
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307082 15 301090 BUFR template for synoptic reports RA II
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           012121
+           012122
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307083 14 301090 BUFR template for synoptic reports RA III
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           012122
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307084 17 301090 BUFR template for synoptic reports RA IV
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           020055
+           101000
+           031000
+           205001
+           302043
+           302044
+           101002
+           302045
+           302046
+ 307086 11 301090 BUFR template for synoptic reports RA VI
+           302031
+           302035
+           302036
+           008002
+           302037
+           302066
+           302043
+           302044
+           101002
+           302045
+ 307090 13 301092 BUFR template for synoptic reports from mobile land stations
+           302031
+           302035
+           302036
+           302047
+           008002
+           302048
+           302037
+           302043
+           302044
+           101002
+           302045
+           302046
+ 308001  3 301033
+           302011
+           022042
+ 308002  3 301034
+           302011
+           022042
+ 308003  3 301035
+           302011
+           022042
+ 308004  3 301036
+           302011
+           022042
+ 308005  2 308004
+           302024
+ 308006  8 010004
+           010061
+           010063
+           011001
+           011002
+           012004
+           013003
+           022042
+ 308007  4 301055
+           302011
+           007062
+           022042
+ 308008  3 301093
+           302062
+           302063 
+ 308009  7 301093
+           302001
+           302054
+           008002
+           302055
+           302057
+           302060
+ 308010 16 001011 TRACKOB template
+           113000
+           031001
+           301011
+           301012
+           301021
+           004080
+           022049
+           004080
+           022059
+           004080
+           022005
+           002042
+           022032
+           002042
+           004080
+ 308011 84 001003
+           001020
+           001005
+           002001
+           002036
+           002149
+           301011
+           301012
+           008021
+           301011
+           301012
+           008021
+           301021
+           027004
+           028004
+           007030
+           001051
+           002148
+           001012
+           001014
+           002040
+           033022
+           033023
+           033027
+           022063
+           302021
+           302022
+           302023
+           008081
+           025026
+           008081
+           025026
+           008081
+           025026
+           008081
+           002034
+           022060
+           007070
+           002190
+           025086
+           002035
+           002168
+           020031
+           002038
+           306004
+           002030
+           306005
+           007031
+           008081
+           012064
+           302001
+           008081
+           007032
+           007033
+           012101
+           012103
+           013003
+           007032
+           007033
+           008082
+           007033
+           002169
+           002002
+           008021
+           004025
+           011001
+           011002
+           008021
+           004025
+           011043
+           011041
+           008082
+           007033
+           007032
+           004024
+           013011
+           007032
+           008021
+           004024
+           014021
+           008021
+           025028
+           025028
+           025028
+ 308012 25 022073
+           022070
+           022074
+           022076
+           022077
+           022071
+           022078
+           022082
+           022084
+           025043
+           025044
+           112000
+           031001
+           022080
+           201134
+           022096
+           201000
+           022090
+           022086
+           022087
+           022095
+           022085
+           022088
+           022089
+           022092
+ 309001  4 301037
+           101000
+           031001
+           303011
+ 309002  4 301038
+           101000
+           031001
+           303011
+ 309003  4 301037
+           101000
+           031001
+           303012
+ 309004  4 301038
+           101000
+           031001
+           303012
+ 309005  5 301037
+           302004
+           101000
+           031001
+           303013
+ 309006  5 301038
+           302004
+           101000
+           031001
+           303013
+ 309007  5 301037
+           302004
+           101000
+           031001
+           303014
+ 309008  5 301038
+           302004
+           101000
+           031001
+           303014
+ 309011  4 301039
+           101000
+           031001
+           303011
+ 309012  4 301039
+           101000
+           031001
+           303012
+ 309013  5 301039
+           302004
+           101000
+           031001
+           303013
+ 309014  5 301039
+           302004
+           101000
+           031001
+           303014
+ 309015  4 301040
+           101000
+           031001
+           303011
+ 309016  4 301040
+           101000
+           031001
+           303012
+ 309017  5 301040
+           302004
+           101000
+           031001
+           303013
+ 309018  5 301040
+           302004
+           101000
+           031001
+           303014
+ 309019  5 301031
+           002003
+           101000
+           031001
+           303011
+ 309020  8 301031
+           002003
+           104000
+           031001
+           007003
+           011003
+           011004
+           011005
+ 309030  8 015004
+           015005
+           104000
+           031001
+           004015
+           008006
+           007004
+           015003
+ 309031  8 015004
+           015005
+           104000
+           031001
+           004025
+           008006
+           007004
+           015003
+ 309040  3 301075
+           301076
+           309030
+ 309042  4 307042
+           301075
+           301076
+           309030
+ 309050  9 301110
+           301113
+           301114
+           101000
+           031002
+           303050
+           101000
+           031001
+           303051
+ 309051  9 301110
+           301113
+           301114
+           101000
+           031002
+           303052
+           101000
+           031001
+           303053
+ 309052 11 301111
+           301113
+           301114
+           302049
+           022043
+           101000
+           031002
+           303054
+           101000
+           031001
+           303051
+ 309053  9 301112
+           301113
+           301114
+           101000
+           031002
+           303054
+           101000
+           031001
+           303051
+ 309060  4 301123
+           301121
+           302050
+           303040
+ 309061 21 301120
+           008041
+           301122
+           201131
+           202129
+           025069
+           007004
+           202000
+           201000
+           033007
+           033035
+           033015
+           013009
+           033007
+           033035
+           033015
+           002013
+           012101
+           033007
+           033035
+           033015
+ 309062 19 301120
+           008041
+           301122
+           005001
+           033035
+           033015
+           006001
+           033035
+           033015
+           007007
+           033035
+           033015
+           011003
+           033035
+           033015
+           011004
+           033035
+           033015
+           033007
+ 309063 19 301120
+           008041
+           301122
+           005001
+           033035
+           033015
+           006001
+           033035
+           033015
+           007007
+           033035
+           033015
+           011003
+           033035
+           033015
+           011004
+           033035
+           033015
+           033007
+ 309064 26 301120
+           008041
+           301122
+           201131
+           202129
+           104002
+           025069
+           007004
+           033035
+           033015
+           013003
+           033035
+           033015
+           202000
+           201000
+           104002
+           002013
+           012101
+           033035
+           033015
+           012103
+           033035
+           033015
+           010009
+           033035
+           033015
+ 309065 18 301120
+           008041
+           301122
+           005001
+           033035
+           033015
+           006001
+           033035
+           033015
+           007007
+           033035
+           033015
+           011003
+           033035
+           033015
+           011004
+           033035
+           033015
+ 309066 18 301120
+           008041
+           301122
+           008040
+           201131
+           202129
+           025069
+           007004
+           013003
+           202000
+           201000
+           002013
+           012101
+           012103
+           010009
+           010007
+           011002
+           011001
+ 309194  5 301194
+           302004
+           101000
+           031001
+           303014
+ 309195  5 301195
+           302004
+           101000
+           031001
+           303014
+ 309196  5 301196
+           302004
+           101000
+           031001
+           303014
+ 309198  5 301198
+           302004
+           101000
+           031001
+           303014
+ 310001  5 301042
+           303031
+           303032
+           101026
+           303025
+ 310002  5 301042
+           303031
+           303032
+           101009
+           303023
+ 310003  5 301042
+           303031
+           303032
+           101006
+           303023
+ 310004  5 301042
+           303031
+           303032
+           101003
+           303024
+ 310005  6 301042
+           303031
+           303033
+           101000
+           031001
+           303025
+ 310006  6 301042
+           303031
+           303033
+           101000
+           031001
+           303023
+ 310007  6 301042
+           303031
+           303033
+           101000
+           031001
+           303024
+ 310008  8 310011
+           101019
+           310012
+           002150
+           025079
+           025080
+           033032
+           014045
+ 310009  3 310011
+           101015
+           310012
+ 310010  3 310011
+           101005
+           310012
+ 310011 45 008070
+           001033
+           001034
+           008070
+           001033
+           001034
+           001007
+           002048
+           005040
+           025075
+           201133
+           005041
+           201000
+           005043
+           025070
+           033030
+           033031
+           004001
+           004002
+           004003
+           004004
+           004005
+           202131
+           201138
+           004006
+           201000
+           202000
+           005001
+           006001
+           202126
+           007001
+           202000
+           007024
+           005021
+           007025
+           005022
+           033033
+           002151
+           012064
+           002151
+           012064
+           002151
+           012064
+           002151
+           012064
+ 310012 10 002150
+           025076
+           025077
+           025078
+           033032
+           201132
+           202129
+           012063
+           202000
+           201000
+ 310013 62 001007
+           005040
+           004001
+           004002
+           004003
+           004004
+           004005
+           004006
+           005001
+           006001
+           007025
+           005043
+           025085
+           201131
+           202129
+           002150
+           008023
+           008072
+           014027
+           008072
+           014027
+           002150
+           008023
+           008072
+           014027
+           008072
+           014027
+           002150
+           008023
+           008072
+           014027
+           008072
+           014027
+           202000
+           201000
+           201132
+           202129
+           002150
+           008023
+           008072
+           012063
+           008072
+           012063
+           002150
+           008023
+           008072
+           012063
+           008072
+           012063
+           008023
+           008072
+           012063
+           008072
+           012063
+           002150
+           008023
+           008072
+           012063
+           008072
+           012063
+           202000
+           201000
+ 310014  3 301072
+           303041
+           304011
+ 310015 13 301072
+           007024
+           010002
+           303041
+           101003
+           304032
+           002152
+           002024
+           007004
+           007004
+           013003
+           101003
+           304033
+ 310016 13 301072
+           007024
+           010002
+           303041
+           101012
+           304032
+           002152
+           002024
+           007004
+           007004
+           013003
+           101012
+           304033
+ 310019 68 001007
+           002019
+           301011
+           301013
+           301023
+           007025
+           008021
+           007025
+           008021
+           007025
+           008021
+           008029
+           005040
+           008075
+           008003
+           010004
+           008003
+           207002
+           015001
+           207000
+           033070
+           015030
+           207002
+           020081
+           207000
+           008003
+           033042
+           007004
+           207002
+           015001
+           207000
+           008003
+           113021
+           007004
+           007004
+           207002
+           008021
+           015005
+           008021
+           015005
+           033007
+           207000
+           008026
+           101020
+           025143
+           008026
+           008043
+           109015
+           007004
+           008090
+           207006
+           015008
+           207000
+           008090
+           207002
+           033007
+           207000
+           008043
+           033071
+           108008
+           202124
+           201107
+           002071
+           201000
+           202000
+           207002
+           020081
+           207000
+ 310020  6 310022
+           301011
+           301013
+           301021
+           304034
+           310021
+ 310021 10 108000
+           031001
+           201131
+           202129
+           007004
+           007004
+           202000
+           201000
+           015020
+           010002
+ 310022  4 001007
+           002019
+           001033
+           002172
+ 310023 17 301072
+           030021
+           030022
+           008012
+           007024
+           007025
+           010002
+           101012
+           304032
+           105002
+           002152
+           002024
+           007004
+           007004
+           013003
+           101012
+           304033
+ 310024 17 301072
+           030021
+           030022
+           008012
+           007024
+           007025
+           010002
+           101003
+           304032
+           105002
+           002152
+           002024
+           007004
+           007004
+           013003
+           101003
+           304033
+ 310025 61 001007
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           201138
+           202131 
+           004006
+           202000
+           201000
+           201132
+           005041
+           201000
+           201129
+           005043
+           201000
+           005002
+           005006
+           013040
+           020029
+           104024
+           005042
+           012163
+           021083
+           021084
+           115003
+           004001
+           004002
+           004003
+           201142
+           202131
+           004026
+           202000
+           201000
+           005001
+           006001
+           201138
+           202129
+           007001
+           202000
+           201000
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           005040
+           101003
+           012070
+           025054
+           101004
+           025055
+           008007
+           104028
+           005002
+           006002
+           002111
+           005021
+ 310026 82 310022
+           025060
+           008021
+           301011
+           301012
+           201138
+           202131
+           004006
+           202000
+           201000
+           033039
+           033007
+           304030
+           304031
+           002020
+           001050
+           202127
+           304030
+           202000
+           304031
+           201133
+           202131
+           004016
+           202000
+           201000
+           301021
+           304030
+           010035
+           005021
+           010036
+           113000
+           031002
+           301021
+           005021
+           108000
+           031001
+           002121
+           007040
+           015037
+           008023
+           201125
+           015037
+           201000
+           008023
+           033007
+           108000
+           031002
+           007007
+           015036
+           008023
+           201123
+           015036
+           201000
+           008023
+           033007
+           116000
+           031002
+           007009
+           010004
+           012001
+           013001
+           008023
+           201120
+           010004
+           201000
+           201122
+           012001
+           201000
+           201123
+           013001
+           201000
+           008023
+           033007
+           008003
+           007009
+           010004
+           008023
+           201120
+           010004
+           201000
+           008023
+           033007
+ 310029 12 110000
+           031001
+           201138
+           202130
+           007004
+           007004
+           202000
+           201000
+           015020
+           010002
+           012101
+           013098
+ 310030  6 310022
+           301011
+           301013
+           301021
+           304034
+           310029
+ 310050 14 310051
+           310052
+           101000
+           031002
+           310053
+           101004
+           310054
+           020010
+           310052
+           101015
+           310053
+           310052
+           101005
+           310053
+ 310051 16 001007
+           005040
+           201133
+           005041
+           201000
+           201132
+           025070
+           201000
+           202126
+           007001
+           202000
+           007025
+           005022
+           102009
+           002151
+           012064
+ 310052 12 002019
+           301011
+           301012
+           202131
+           201138
+           004006
+           201000
+           202000
+           301021
+           007024
+           005021
+           005043
+ 310053  6 201134
+           005042
+           201000
+           025076
+           033032
+           012163
+ 310054 13 201134
+           005042
+           201000
+           025076
+           033032
+           201131
+           202129
+           102002
+           008023
+           014027
+           008023
+           202000
+           201000
+ 310055  8 310051
+           310052
+           102020
+           025076
+           025052
+           101000
+           031002
+           025050
+ 310193  5 301250
+           303250
+           302250
+           303249
+           303251
+ 310194  5 301250
+           303250
+           302250
+           303249
+           303252
+ 310195  3 301250
+           303250
+           304250
+ 310196  3 301250
+           303249
+           303251
+ 310226 39 310022
+           025060
+           008021
+           301011
+           301012
+           201138
+           202131
+           004006
+           202000
+           201000
+           033039
+           033007
+           304030
+           304031
+           002020
+           001050
+           202127
+           304030
+           202000
+           304031
+           201133
+           202131
+           004016
+           202000
+           201000
+           301021
+           304030
+           010035
+           005021
+           010036
+           107000
+           031002
+           301021
+           005021
+           103000
+           031001
+           002121
+           007040
+           015037
+ 311001  9 301051
+           007002
+           012001
+           011001
+           011002
+           011031
+           011032
+           011033
+           020041
+ 311002  4 301065
+           301066
+           311003
+           311004
+ 311003  5 010070
+           011001
+           011002
+           012001
+           013002
+ 311004 18 101000
+           031000
+           011034
+           101000
+           031000
+           011035
+           101000
+           031000
+           011075
+           101000
+           031000
+           011076
+           101000
+           031000
+           033025
+           101000
+           031000
+           033026
+ 311005 13 001008
+           001023
+           301021
+           301011
+           301013
+           007010
+           008009
+           011001
+           011002
+           011031
+           011036
+           012101
+           033025
+ 311006  6 007010
+           011001
+           011002
+           002064
+           012101
+           012103
+ 311007  7 007010
+           301021
+           011001
+           011002
+           002064
+           012101
+           012103
+ 311008  8 001008
+           301011
+           301013
+           301021
+           008004
+           101000
+           031001
+           311006
+ 311009  8 001008
+           301011
+           301013
+           301021
+           008004
+           101000
+           031001
+           311007
+ 311193 16 301197
+           301011
+           301012
+           301023
+           008004
+           007004
+           008021
+           011001
+           011002
+           011031
+           011034
+           011035
+           012001
+           012003
+           013003
+           020041
+ 312001  2 301043
+           304001
+ 312002  2 301043
+           304002
+ 312003  2 301042
+           304003
+ 312004  2 301042
+           304004
+ 312005  2 301042
+           020014
+ 312006  2 301044
+           304005
+ 312007  2 301042
+           304006
+ 312010  6 001007
+           005040
+           002021
+           005041
+           004001
+           004043
+ 312011  9 202131
+           201149
+           004006
+           201000
+           202126
+           010002
+           202000
+           005043
+           005053
+ 312012  6 202129
+           201132
+           101019
+           012063
+           201000
+           202000
+ 312013  6 005042
+           202129
+           201135
+           012063
+           201000
+           202000
+ 312014  8 312010
+           312011
+           105056
+           301023
+           005042
+           005052
+           312012
+           312013
+ 312015 10 109011
+           301023
+           005042
+           005052
+           202129
+           201132
+           101004
+           012063
+           202000
+           201000
+ 312016  3 312010
+           312011
+           312015
+ 312017 10 109008
+           301023
+           005042
+           005052
+           202129
+           201132
+           101003
+           012063
+           202000
+           201000
+ 312018  3 312010
+           312011
+           312017
+ 312019 13 301047
+           301048
+           015015
+           029002
+           021076
+           106012
+           201129
+           006030
+           201000
+           102012
+           005030
+           021075
+           021066
+ 312020 11 301047
+           301048
+           015015
+           029002
+           021076
+           104012
+           006030
+           102012
+           005030
+           021075
+           021066
+ 312021  6 301047
+           101003
+           301049
+           011012
+           011011
+           021067
+ 312022 15 301047
+           008022
+           011012
+           011050
+           022070
+           022026
+           312041
+           010050
+           021068
+           021071
+           021072
+           021073
+           312042
+           021062
+           015011
+ 312023  7 301047
+           103003
+           008022
+           012061
+           022050
+           021069
+           021085
+ 312024 11 312020
+           008060
+           008022
+           008060
+           008022
+           025014
+           022101
+           022097
+           022098
+           022099
+           022100
+ 312025 11 312019
+           008060
+           008022
+           008060
+           008022
+           025014
+           022101
+           022097
+           022098
+           022099
+           022100
+ 312026 19 301046
+           301011
+           301013
+           301023
+           312031
+           101004
+           312030
+           021110
+           301023
+           321027
+           021111
+           301023
+           321027
+           021112
+           301023
+           321027
+           021113
+           301023
+           321027
+ 312027  9 301047
+           105009
+           301023
+           007021
+           012061
+           007021
+           012061
+           021085
+           021070
+ 312028 26 301046
+           301011
+           301013
+           301023
+           008025
+           201136
+           004006
+           201000
+           312031
+           312032
+           101004
+           312030
+           101002
+           312033
+           021110
+           301023
+           321028
+           021111
+           301023
+           321028
+           021112
+           301023
+           321028
+           021113
+           301023
+           321028
+ 312030 13 201130
+           202129
+           011012
+           202000
+           201000
+           011052
+           201135
+           202130
+           011011
+           202000
+           201000
+           011053
+           021104
+ 312031  8 005034
+           006034
+           021109
+           011081
+           011082
+           021101
+           021102
+           021103
+ 312032  4 021120
+           021121
+           013055
+           021122
+ 312033  4 002104
+           008022
+           012063
+           012065
+ 312041  5 201141
+           202130
+           007001
+           201000
+           202000
+ 312042  6 021077
+           021078
+           021079
+           021080
+           021081
+           021082
+ 312045 21 001007
+           002019
+           001096
+           025061
+           005040
+           301011
+           301013
+           301021
+           007002
+           012180
+           012181
+           012182
+           012183
+           012184
+           012185
+           002174
+           021086
+           012186
+           021087
+           012187
+           033043
+ 312050 23 001007
+           002019
+           001096
+           025061
+           005040
+           301011
+           301013
+           301021
+           007025
+           005022
+           010080
+           027080
+           008003
+           007004
+           013093
+           008003
+           201131
+           202129
+           007004
+           007004
+           202000
+           201000
+           013095
+ 312051 48 001007
+           002019
+           001096
+           025061
+           005040
+           008075
+           301011
+           301013
+           301021
+           001012
+           201131
+           001013
+           201000
+           010032
+           010033
+           010034
+           007002
+           008012
+           025110
+           025111
+           025102
+           002104
+           025103
+           025104
+           025105
+           025106
+           025107
+           025108
+           002111
+           002121
+           002026
+           002027
+           021130
+           021131
+           021132
+           021133
+           021064
+           025014
+           021134
+           107018
+           005030
+           105024
+           201130
+           006030
+           201000
+           021135
+           021136
+           033044
+ 312052 77 001007
+           002019
+           001096
+           025061
+           005040
+           025120
+           025121
+           025124
+           025125
+           025122
+           025123
+           301011
+           301013
+           301021
+           007002
+           002119
+           033047
+           010081
+           010082
+           010083
+           010084
+           002116
+           002117
+           002118
+           002156
+           002157
+           014055
+           022150
+           022151
+           022152
+           022153
+           022154
+           022155
+           022156
+           022157
+           022158
+           022159
+           021137
+           021138
+           021139
+           021140
+           021141
+           021142
+           010085
+           010086
+           010087
+           010088
+           010089
+           010090
+           010091
+           010092
+           010093
+           011002
+           025126
+           025127
+           025128
+           025129
+           025130
+           025131
+           025132
+           025133
+           025134
+           025135
+           025136
+           025137
+           013096
+           013097
+           011095
+           011096
+           012188
+           012189
+           002158
+           002159
+           033052
+           033053
+           021143
+           021144
+ 312053 54 001007
+           002019
+           001096
+           025061
+           005040
+           008075
+           301011
+           301013
+           301021
+           001012
+           201131
+           001013
+           201000
+           010032
+           010033
+           010034
+           007002
+           008012
+           025110
+           025111
+           025102
+           002104
+           025103
+           025104
+           025105
+           025106
+           025107
+           025108
+           011001
+           011002
+           022160
+           025138
+           201130
+           202129
+           022021
+           202000
+           201000
+           033048
+           033049
+           002026
+           002027
+           021130
+           021131
+           021132
+           021133
+           025014
+           106036
+           005030
+           104024
+           201130
+           006030
+           201000
+           022161
+           033044
+ 312055  5 005033
+           005040
+           006034
+           010095
+           021157
+ 312056 11 025060
+           001032
+           011082
+           011081
+           020095
+           020096
+           021155
+           201133
+           021101
+           021102
+           201000
+ 312057 12 201130
+           202129
+           011012
+           202000
+           201000
+           201131
+           202129
+           011011
+           202000
+           201000
+           021156
+           021104
+ 312058  8 301125
+           301011
+           301013
+           301021
+           312055
+           021150
+           101003
+           321030
+ 312059  4 312056
+           101000
+           031001
+           312057
+ 312060 20 025060
+           025062
+           040001
+           040002
+           021062
+           021151
+           021152
+           021153
+           021154
+           021062
+           021062
+           040003
+           040004
+           040005
+           040006
+           040007
+           020065
+           040008
+           040009
+           040010
+ 312061  3 312058
+           312060
+           312059
+ 312200 10 301237
+           301238
+           029002
+           021206
+           104012
+           006232
+           102012
+           005232
+           021205
+           021196
+ 312201  6 301237
+           101003
+           301239
+           011012
+           011011
+           021197
+ 312202 13 301237
+           008022
+           011012
+           011050
+           301240
+           022243
+           301241
+           010050
+           021198
+           021201
+           021202
+           021203
+           301242
+ 312203  8 301237
+           008022
+           012061
+           022050
+           021204
+           021199
+           021214
+           021215
+ 312204 12 312201
+           001031
+           011012
+           011011
+           021200
+           021213
+           004004
+           008021
+           004024
+           055003
+           011012
+           011011
+ 312207  3 312202
+           301202
+           033191
+ 312208 17 301202
+           008022
+           008021
+           301011
+           301013
+           301023
+           302205
+           011002
+           001007
+           002021
+           301011
+           301013
+           301023
+           001032
+           001192
+           302205
+           011002
+ 312209 11 301202
+           001192
+           301011
+           301013
+           301023
+           302206
+           104000
+           022192
+           102000
+           005232
+           022191
+ 312210 13 312202
+           021192
+           015202
+           301011
+           004004
+           004005
+           201138
+           202131
+           004006
+           201000
+           202000
+           304228
+           304229
+ 312211 19 301046
+           301011
+           301013
+           301023
+           312031
+           101004
+           312030
+           021110
+           101004
+           312212
+           021111
+           101004
+           312212
+           021112
+           101004
+           312212
+           021113
+           101004
+           312212
+ 312212  2 301023
+           321027
+ 313009  4 021001
+           101000
+           031001
+           021001
+ 313010  4 021036
+           101000
+           031001
+           021036
+ 313031  5 006002
+           006012
+           101000
+           031002
+           030001
+ 313032  5 005002
+           005012
+           101000
+           031002
+           313031
+ 313041 13 006002
+           110000
+           031001
+           104000
+           031001
+           006012
+           101000
+           031012
+           030001
+           006012
+           101000
+           031001
+           030001
+ 313042  5 005002
+           005012
+           101000
+           031002
+           313041
+ 313043 17 006002
+           005002
+           005012
+           112000
+           031001
+           110000
+           031001
+           104000
+           031001
+           006012
+           101000
+           031011
+           030001
+           006012
+           101000
+           031001
+           030001
+ 315001  5 001011
+           301011
+           301012
+           301023
+           306001
+ 315002  5 001011
+           301011
+           301012
+           301023
+           306004
+ 316001 10 301011
+           004004
+           301023
+           001021
+           002041
+           019001
+           010051
+           019002
+           019003
+           019004
+ 316002 15 008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           001033
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           007002
+           007002
+ 316003 12 110000
+           031001
+           008011
+           008007
+           104000
+           031001
+           005002
+           006002
+           010002
+           011002
+           008007
+           008011
+ 316004 13 111000
+           031001
+           008011
+           008007
+           007002
+           007002
+           102000
+           031001
+           005002
+           006002
+           011031
+           008007
+           008011
+ 316005 10 108000
+           031001
+           008005
+           008007
+           005002
+           006002
+           001026
+           019001
+           008007
+           008005
+ 316006 14 112000
+           031001
+           008011
+           008007
+           007002
+           007002
+           102000
+           031001
+           005002
+           006002
+           020011
+           020012
+           008007
+           008011
+ 316007 12 110000
+           031001
+           008011
+           008007
+           104000
+           031001
+           005002
+           006002
+           019005
+           019006
+           008007
+           008011
+ 316008 13 111000
+           031001
+           008001
+           008007
+           008023
+           103000
+           031001
+           005002
+           006002
+           010002
+           008023
+           008007
+           008001
+ 316009 13 111000
+           031001
+           008011
+           008007
+           007002
+           007002
+           102000
+           031001
+           005002
+           006002
+           020041
+           008007
+           008011
+ 316010  9 107000
+           031001
+           008011
+           008007
+           001022
+           005002
+           006002
+           008007
+           008011
+ 316011 19 117000
+           031001
+           008011
+           001022
+           008007
+           102000
+           031001
+           005002
+           006002
+           008021
+           004001
+           004002
+           004003
+           004004
+           004005
+           020090
+           008021
+           008007
+           008011
+ 316022 24 001032
+           002041
+           019001
+           019010
+           118000
+           031001
+           008021
+           004014
+           008005
+           301023
+           019005
+           019006
+           010004
+           011041
+           008021
+           004075
+           011040
+           019008
+           105004
+           005021
+           005021
+           102002
+           019003
+           019004
+ 316050 16 301001
+           301011
+           301012
+           002160
+           008005
+           005002
+           006002
+           008005
+           019100
+           019005
+           019006
+           019101
+           019102
+           019103
+           019104
+           019105
+ 316052 29 301005
+           301011
+           301012
+           001007
+           025150
+           122000
+           031001
+           001027
+           019150
+           019106
+           008005
+           005002
+           006002
+           008005
+           019107
+           019005
+           019006
+           019108
+           019109
+           019110
+           019111
+           019112
+           019113
+           019114
+           019115
+           019116
+           019117
+           019118
+           019119
+ 318001  2 301025
+           024011
+ 318003  4 301026
+           024005
+           024004
+           024021
+ 318004  6 301025
+           004023
+           013011
+           024005
+           024004
+           024022
+ 321001  6 002101
+           002114
+           002105
+           002106
+           002107
+           002121
+ 321003  4 021051
+           021014
+           021017
+           021030
+ 321004  5 301031
+           002003
+           101000
+           031001
+           321003
+ 321005 12 025004
+           002121
+           002122
+           002123
+           002124
+           002125
+           002126
+           002127
+           002128
+           002129
+           002130
+           002131
+ 321006  4 025001
+           025002
+           025003
+           025005
+ 321007  8 025009
+           025010
+           025011
+           025012
+           025013
+           025015
+           025016
+           025017
+ 321008  3 025006
+           025007
+           025008
+ 321009  2 025018
+           025019
+ 321010 13 002101
+           007002
+           002102
+           002103
+           002104
+           002105
+           002106
+           002107
+           002108
+           002109
+           002110
+           002132
+           002133
+ 321011  3 030031
+           030032
+           029002
+ 321012  3 101000
+           031001
+           002135
+ 321021 15 002003
+           002101
+           201130
+           002106
+           201000
+           201132
+           202130
+           002121
+           202000
+           201000
+           201133
+           202129
+           025001
+           202000
+           201000
+ 321022 11 007007
+           204001
+           031021
+           011001
+           204000
+           011002
+           204001
+           031021
+           011006
+           204000
+           021030
+ 321023  9 007007
+           021091
+           021030
+           202129
+           021014
+           201129
+           021017
+           202000
+           201000
+ 321024  7 007007
+           204001
+           031021
+           012007
+           011006
+           204000
+           021030
+ 321025 17 007007
+           021091
+           021030
+           202129
+           021014
+           201129
+           021017
+           202000
+           201000
+           021092
+           021030
+           025092
+           201129
+           202129
+           021017
+           202000
+           201000
+ 321026 10 007007
+           204001
+           031021
+           012007
+           025091
+           011071
+           011072
+           011073
+           011074
+           204000
+ 321027 18 021118
+           202129
+           201132
+           002112
+           201000
+           201131
+           002111
+           201000
+           202000
+           002104
+           021105
+           021106
+           021107
+           021114
+           021115
+           021116
+           008018
+           021117
+ 321028 18 021118
+           202129
+           201132
+           002112
+           201000
+           201131
+           002111
+           201000
+           202000
+           002104
+           021123
+           021106
+           021107
+           021114
+           021115
+           021116
+           008018
+           021117
+ 321030 18 008085
+           202129
+           201131
+           002111
+           201000
+           202000
+           002134
+           021062
+           021063
+           021158
+           021159
+           021160
+           021161
+           021162
+           021163
+           021164
+           021165
+           021166
+ 321193 12 110000
+           031002
+           005031
+           107000
+           031001
+           102000
+           031001
+           031012
+           030002
+           101000
+           031001
+           030002
+ 340001 45 001007
+           001031
+           002019
+           002020
+           004001
+           004002
+           004003
+           004004
+           004005
+           202131
+           201138
+           004006
+           201000
+           202000
+           005001
+           006001
+           007024
+           005021
+           007025
+           005022
+           005043
+           005040
+           201133
+           005041
+           201000
+           201132
+           025070
+           201000
+           202126
+           007001
+           202000
+           033060
+           033061
+           033062
+           033063
+           033064
+           033065
+           101010
+           340002
+           101087
+           340003
+           002019
+           025051
+           101007
+           340004
+ 340002  3 025140
+           025141
+           025142
+ 340003  5 104100
+           201136
+           005042
+           201000
+           014046
+ 340004  9 005060
+           005061
+           025085
+           105006
+           005042
+           025142
+           014047
+           025142
+           014048
diff --git a/src/OperaRadar/Makefile.am b/src/OperaRadar/Makefile.am
new file mode 100644
index 0000000..315abe1
--- /dev/null
+++ b/src/OperaRadar/Makefile.am
@@ -0,0 +1,41 @@
+
+bin_PROGRAMS = bin/OperaRadarFilter
+
+bin_OperaRadarFilter_SOURCES  = OperaRadar.cc
+# <aki>: proj4 lib should be set by 'configure' !!!!!!!!!
+bin_OperaRadarFilter_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS) $(PROJ4_LIBS)
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA  = $(local_sharedir)/ObjectSpec.OperaRadar $(local_sharedir)/OperaRadarDef $(local_sharedir)/OperaRadarRules \
+     $(local_sharedir)/B0000000000247014008.TXT $(local_sharedir)/D0000000000247014008.TXT \
+     $(local_sharedir)/B0000000065535002004.TXT $(local_sharedir)/D0000000065535002004.TXT
+
+
+icons =  $(local_iconsdir)/OPERA_RADAR_FILTER.xpm
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+CLEANFILES = $(share_DATA) $(icons)
+
+BUILT_SOURCES = bin $(icons)
+
+EXTRA_DIST = ObjectSpec.OperaRadar OperaRadarDef OperaRadarRules OPERA_RADAR_FILTER.xpm \
+      B0000000000247014008.TXT D0000000000247014008.TXT B0000000065535002004.TXT D0000000065535002004.TXT
+
+
+
+bin:
+	ln -s ../../bin bin
+
diff --git a/src/OperaRadar/Makefile.in b/src/OperaRadar/Makefile.in
new file mode 100644
index 0000000..27bd088
--- /dev/null
+++ b/src/OperaRadar/Makefile.in
@@ -0,0 +1,697 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/OperaRadarFilter$(EXEEXT)
+subdir = src/OperaRadar
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_OperaRadarFilter_OBJECTS = OperaRadar.$(OBJEXT)
+bin_OperaRadarFilter_OBJECTS = $(am_bin_OperaRadarFilter_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_OperaRadarFilter_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_OperaRadarFilter_SOURCES)
+DIST_SOURCES = $(bin_OperaRadarFilter_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_OperaRadarFilter_SOURCES = OperaRadar.cc
+# <aki>: proj4 lib should be set by 'configure' !!!!!!!!!
+bin_OperaRadarFilter_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS) $(PROJ4_LIBS)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.OperaRadar $(local_sharedir)/OperaRadarDef $(local_sharedir)/OperaRadarRules \
+     $(local_sharedir)/B0000000000247014008.TXT $(local_sharedir)/D0000000000247014008.TXT \
+     $(local_sharedir)/B0000000065535002004.TXT $(local_sharedir)/D0000000065535002004.TXT
+
+icons = $(local_iconsdir)/OPERA_RADAR_FILTER.xpm
+CLEANFILES = $(share_DATA) $(icons)
+BUILT_SOURCES = bin $(icons)
+EXTRA_DIST = ObjectSpec.OperaRadar OperaRadarDef OperaRadarRules OPERA_RADAR_FILTER.xpm \
+      B0000000000247014008.TXT D0000000000247014008.TXT B0000000065535002004.TXT D0000000065535002004.TXT
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/OperaRadar/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/OperaRadar/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/OperaRadarFilter$(EXEEXT): $(bin_OperaRadarFilter_OBJECTS) $(bin_OperaRadarFilter_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/OperaRadarFilter$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_OperaRadarFilter_OBJECTS) $(bin_OperaRadarFilter_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/OperaRadar.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(icons): $(local_iconsdir)/%: %
+	${INSTALL} $<  $(local_iconsdir)
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/OperaRadar/OPERA_RADAR_FILTER.xpm b/src/OperaRadar/OPERA_RADAR_FILTER.xpm
new file mode 100644
index 0000000..a76dd87
--- /dev/null
+++ b/src/OperaRadar/OPERA_RADAR_FILTER.xpm
@@ -0,0 +1,217 @@
+/* XPM */
+static char *OPERA_RADAR_FILTER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 179 2",
+"   c #020203",
+".  c #07090C",
+"X  c #0A0A0C",
+"o  c #1A0707",
+"O  c #070C12",
+"+  c #0D0E10",
+"@  c #0F1012",
+"#  c #101214",
+"$  c #16181D",
+"%  c #2B1E1E",
+"&  c #081221",
+"*  c #04142B",
+"=  c #0D1A2E",
+"-  c #1B1E25",
+";  c #1F242A",
+":  c #202123",
+">  c #23252A",
+",  c #23282F",
+"<  c #292B2C",
+"1  c #3A2C2C",
+"2  c #262C34",
+"3  c #2F3032",
+"4  c #2B313B",
+"5  c #353637",
+"6  c #363839",
+"7  c #3A3B3D",
+"8  c #0A2245",
+"9  c #08244C",
+"0  c #2E3642",
+"q  c #323A46",
+"w  c #3A3F45",
+"e  c #363E4B",
+"r  c #002762",
+"t  c #012864",
+"y  c #394352",
+"u  c #3D4858",
+"i  c #404244",
+"p  c #43464A",
+"a  c #4B4C4E",
+"s  c #4F5051",
+"d  c #575859",
+"f  c #414E60",
+"g  c #485568",
+"h  c #4D5B70",
+"j  c #5F6061",
+"k  c #636466",
+"l  c #656769",
+"z  c #6B6B6C",
+"x  c #656970",
+"c  c #717273",
+"v  c #877D7D",
+"b  c #3F887A",
+"n  c #389876",
+"m  c #46847D",
+"M  c #419D7B",
+"N  c #003585",
+"B  c #0042A5",
+"V  c #576983",
+"C  c #5B6E89",
+"Z  c #457189",
+"A  c #4B7888",
+"S  c #51778F",
+"D  c #557D88",
+"F  c #4C7190",
+"G  c #5A7A96",
+"H  c #7A7E83",
+"J  c #657997",
+"K  c #66789E",
+"L  c #004FC4",
+"P  c #0050C7",
+"I  c #0055D4",
+"U  c #4A8B80",
+"Y  c #538389",
+"T  c #578888",
+"R  c #5A888B",
+"E  c #4F9183",
+"W  c #599A89",
+"Q  c #5C829E",
+"!  c #5C9491",
+"~  c #75899E",
+"^  c #689199",
+"/  c #78909C",
+"(  c #4AA181",
+")  c #53A586",
+"_  c #59A28A",
+"`  c #5CA98C",
+"'  c #69A294",
+"]  c #5F85A0",
+"[  c #6687A3",
+"{  c #6F86A7",
+"}  c #6689A3",
+"|  c #7586A0",
+" . c #748EA0",
+".. c #788DA1",
+"X. c #7589AF",
+"o. c #6D94AC",
+"O. c #7597A4",
+"+. c #7998A2",
+"@. c #7595AD",
+"#. c #7C9CA9",
+"$. c #7890B4",
+"%. c #759AB0",
+"&. c #7A96BC",
+"*. c #759CBC",
+"=. c #79A0BF",
+"-. c #7692C0",
+";. c #7CA2C1",
+":. c #838383",
+">. c #8C8C8C",
+",. c #8F959D",
+"<. c #939393",
+"1. c #93989F",
+"2. c #9B9B9B",
+"3. c #829BAA",
+"4. c #8C9CAF",
+"5. c #959BA3",
+"6. c #999EA5",
+"7. c #849FB5",
+"8. c #8A9EB1",
+"9. c #86A5B1",
+"0. c #85A5B8",
+"q. c #8DA9BC",
+"w. c gray65",
+"e. c #B3B3B3",
+"r. c #B9B9B9",
+"t. c #97C2AE",
+"y. c #819DC6",
+"u. c #829DC9",
+"i. c #81A2C6",
+"p. c #86A0CB",
+"a. c #89A2CD",
+"s. c #90A3C8",
+"d. c #9DB6C4",
+"f. c #8DA5D3",
+"g. c #95AED5",
+"h. c #91AFDA",
+"j. c #98AFD8",
+"k. c #98B1D6",
+"l. c #9DB2DA",
+"z. c #A4B8C4",
+"x. c #A9B9C6",
+"c. c #ACBFCC",
+"v. c #A2B5DC",
+"b. c #98B6E4",
+"n. c #9CBCEA",
+"m. c #A3C0CE",
+"M. c #A9C5CE",
+"N. c #A1C4D0",
+"B. c #B3C6D2",
+"V. c #BAC5D2",
+"C. c #B6CDD5",
+"Z. c #B8CAD6",
+"A. c #B8CDD8",
+"S. c #A2C3F4",
+"D. c #A6C7F9",
+"F. c #A7C9FB",
+"G. c #AACCFF",
+"H. c #C2C2C2",
+"J. c #CBCBCB",
+"K. c LightGray",
+"L. c #DCDCDC",
+"P. c #C3DBE2",
+"I. c #D3DCE4",
+"U. c #D8DDE5",
+"Y. c #C2E1E6",
+"T. c #C4E5E9",
+"R. c #CDECEE",
+"E. c #D1EDEF",
+"W. c #D4EFF0",
+"Q. c #D9EFF2",
+"!. c #D6F0F1",
+"~. c #DBF1F3",
+"^. c #E3E3E3",
+"/. c #E0E8ED",
+"(. c #EBEBEB",
+"). c #E0F3F4",
+"_. c #EFF2F6",
+"`. c #F4F5F5",
+"'. c #FFFFFF",
+/* pixels */
+"f.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.f.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.L.:.>.w.J.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.`.L.w.>.L.'.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.(.:.L.'.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.H.w.r.(.'.'.'.(.:.`.'.'.'.'.'.'.l.",
+"v.'.'.'.'.'.'.'.'.'.'.'.'.'.'.`.L.J.<.w.'.'.'.e.H.'.'.'.'.'.'.l.",
+"v.'.'.'.'.J.'.'.'.'.'.'.'.'.'.'.'.'.'.r.e.'.'.^.<.'.'.'.'.'.'.l.",
+"v.'.'.'.^.. c '.'.'.'.'.'.'.'.'.`.'.'.'.:.'.'.'.:.'.'.'.'.'.'.l.",
+"v.'.'.'.a f ; l '.'.'.'.'.'.'.`.1 v '.'.2.(.'.'.:.'.'.'.'.'.'.l.",
+"v.'.'.e.$ S.n., j '.'.'.'.'.'.H o % `.'.2.(.'.'.:.'.'.'.'.'.'.l.",
+"v.'.'.< { G.G.n.2 d '.'.'.'.6.g.x ^.'.'.<.`.'.'.:.'.'.'.'.'.'.l.",
+"v.'.`.  n.G.G.G.S.4 s `.'.5.k.5.`.'.'.'.(.'.'.(.<.'.'.'.'.'.'.l.",
+"v.'.K.@ G.G.G.G.G.S.4 p ,.k.5.'.'.'.'.'.'.'.'.(.K.'.'.'.'.'.'.l.",
+"v.'.w.4 G.G.G.G.G.G.S.0 4 1.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.2.q G.G.G.G.G.G.G.D.q 7 `.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.K.+ G.G.G.G.G.G.G.G.D.y 5 (.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.l.",
+"v.'.'.X h.G.G.G.G.G.G.G.G.F.u 3 (.'.'.'.'.'.'.'.'.'.'.I.c.7.[ u.",
+"v.'.'.i J G.G.G.G.G.G.G.G.G.G.f < (.'.'.'.'.'.'.'.V.} 0.m.P.~.j.",
+"v.'.'.H.# b.G.G.G.G.G.G.G.G.G.G.g > ^.'.'.'.'.`.G S | ~.~.~.).j.",
+"v.'.'.'.c 0 G.G.G.G.G.G.G.G.G.G.G.h : ^.'.'._.F ! t.4.~.Q.~.).j.",
+"v.'.'.'.`.< h D.G.G.G.G.G.G.G.G.G.S.- 5 '.'. at .A ' ~ E.~.3.x.).a.",
+"v.'.'.'.'.L.6 > p.G.G.G.G.G.G.G.a.- a (.'.Z.%. .d.W.!.~.#.c. .a.",
+"v.'.'.'.'.'.'.z X y C $.h.&.V e + 2.'.'._.] T.R.E.W.!.~.3.R _ i.",
+"v.'.'.'.'.'.'.p * * & X . < k 2.^.'.'.'.q.N.R.R.E.W.!.C.D E +.y.",
+"v.'.'.'.'.'.'.- B I I 8 <.'.'.'.'.'.'.'.} T.R.R.E.W.!.A.~ 8.).f.",
+"v.'.'.'.'.'.'.  L I I t z '.'.'.'.'.'.'.Q R.R.R.E.W.9.m U T z.j.",
+"v.'.'.'.'.'.L.. I I I N w '.'.'.'.'.'./.o.R.R.R.E.M.b M ( ) W u.",
+"v.'.'.'.'.'.r.= I I I B $ '.'.'.'.'.'.B.G d.R.R.E.^ n M ( ) ` i.",
+"v.'.'.'.'.'.<.9 I I I P   `.'.'.'.'.'.B.A / Y.R.E.Y n M ( ) ` i.",
+"v.'.'.'.'.'.l r P P P P O K.'.'.'.'.'.U.Z ..R.R.E.O.n M ( ) ` i.",
+"f.v.v.v.v.v.X.K K K K K K s.v.v.v.v.v.v.-.g.k.k.k.g.&.*.=.=.;.p."
+};
diff --git a/src/OperaRadar/ObjectSpec.OperaRadar b/src/OperaRadar/ObjectSpec.OperaRadar
new file mode 100644
index 0000000..3746180
--- /dev/null
+++ b/src/OperaRadar/ObjectSpec.OperaRadar
@@ -0,0 +1,29 @@
+################################################################################
+#
+#	ObjectSpec.OperaRadar
+#
+
+object,
+	class		= OPERA_RADAR_FILTER,
+	icon_box	= Filters,
+	can_be_created	= True,
+	definition_file	= '$METVIEW_DIR/share/metview/etc/OperaRadarDef',
+	rules_file	= '$METVIEW_DIR/share/metview/etc/OperaRadarRules',
+	default_name	= Opera Radar Filter,
+	help_page	= OperaRadarFilter,
+	type		= Data,
+	expand		= 75,   # 64+8+2+1 = EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+	macro		= opera_radar_filter,
+	editor_type	= SimpleEditor,
+	pixmap		= '$METVIEW_DIR/share/metview/icons/OPERA_RADAR_FILTER.icon'
+
+state,
+	class		= OPERA_RADAR_FILTER,
+	output_class	= GEOPOINTS,
+	service		= OperaRadarFilter
+
+service,
+	cmd		= '$METVIEW_CMD $METVIEW_BIN/OperaRadarFilter',
+	name		=  OperaRadarFilter,
+	fullname	=  Opera Radar Filter
+
diff --git a/src/OperaRadar/OperaRadar.cc b/src/OperaRadar/OperaRadar.cc
new file mode 100644
index 0000000..fbb7956
--- /dev/null
+++ b/src/OperaRadar/OperaRadar.cc
@@ -0,0 +1,317 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// OperaRadar.cc, Apr2012/vk
+//
+//  Extract and convert OPERA BUFR radar images to geopoints (and later
+//  hopefully also to GRIB2).
+//
+// INPUT DATA (as of May 2012):
+// ===========================
+//
+// - This software has been implemented and tested with OPERA data
+//   available from ECFS (ec:/oparch/opera/...).
+// - This software has not been tested with other types of OPERA data
+//   [no test data available, except for "Odyssey" data that cannot
+//    handled (see below)].
+//
+// - OPERA BUFR data requires custom BUFR tables that are installed in
+//   directory share/metview/etc/ (those tables that are used to decode
+//   OPERA data available in ECFS)
+//
+// - Users can direct Metview to use other OPERA BUFR tables by setting
+//   env.variable OPERA_BUFR_TABLES to point to directory containing them.
+//
+// - Current version, based on the current ECMWF BUFR package, is not able
+//   to handle new OPERA "Odyssey" data (example data available from
+//   http://www.knmi.nl/opera/odc/ODIM_example_files/Odyssey.zip )
+//   because the example data contains 'Extended delayed descriptor
+//   replication factor' with a values greater than the hard coded
+//   arrays in BUFR package can handle.
+//
+// CURRENT STATUS (as of May 2012):
+// ===============================
+//  Phase 1 (done): extract pixel values into unsigned char array
+//                   test with pseudo geopoints
+//  Phase 2 (done): convert to rainfall values and add mapping to
+//                   real world geopoints
+//  Phase 3 (future): add other output formats (GRIB2, PNG?,...)
+//  Phase 4 (future): extract several images for animation
+//
+
+#include "inc_iostream.h"
+#include <time.h>
+#include <proj_api.h>
+
+#include "Metview.h"
+#include "MvObs.h"
+#include "MvException.h"
+
+//__________________________________________________________ OperaRadar
+
+class OperaRadar : public MvService
+{
+ private:
+    OperaRadar( const OperaRadar& anOther );
+    void operator= ( const OperaRadar& anOther );
+
+ public:
+    OperaRadar();
+    ~OperaRadar();
+
+    void      serve( MvRequest&, MvRequest& );
+
+ protected:
+    void      setOperaBufrTableDir();
+    void      getData();
+    MvRequest createRequest();
+    bool      getIntensities();
+    void      geopointsOutput( const unsigned char* img );
+
+ private:
+    MvRequest         in_;               //-- input request
+    MvRequest         data_;             //-- sub-request of input request
+    MvObsSet*         inSet_;            //-- input observation set
+    MvObsSetIterator* iter_;             //-- input iterator (no filtering)
+    MvObs             obs_;              //-- current observation
+    vector<float>     intensity_;        //-- true rain intensities
+    ofstream          outfile_;          //-- output geopoints file
+    bool              includeMissingValues_;
+    double            missingValue_;
+    bool              failOnError_;
+};
+
+
+//_________________________________________________________
+
+OperaRadar::OperaRadar() : MvService( "OPERA_RADAR_FILTER" ),
+   inSet_( 0 ),
+   iter_( 0 ),
+   includeMissingValues_(false)
+{ }
+//_________________________________________________________
+
+OperaRadar::~OperaRadar()
+{
+  delete iter_;
+  delete inSet_;
+}
+//_________________________________________________________
+void
+OperaRadar::setOperaBufrTableDir()
+{
+   const int overWrite = 1;
+   int ok = 0;
+   const char* operaTables = getenv( "OPERA_BUFR_TABLES" );
+   if( operaTables )
+   {
+      ok = setenv( "BUFR_TABLES", operaTables, overWrite );
+      marslog( LOG_INFO, "OperaRadarFilter: using user given BUFR tables " );
+   }
+   else
+   {
+      string mvShareDir = getenv( "METVIEW_DIR_SHARE" );
+      mvShareDir += "/etc/";
+      ok = setenv( "BUFR_TABLES", mvShareDir.c_str(), overWrite );
+      marslog( LOG_INFO, "OperaRadarFilter: using Metview provided OPERA BUFR tables " );
+   }
+   cout << "Looking OPERA BUFR files from dir " << getenv("BUFR_TABLES") << endl;
+   //-- test ok...
+}
+//_________________________________________________________
+void
+OperaRadar::getData()
+{
+    //-- D A T A --
+    in_.getValue( data_, "DATA" );
+    data_.print();
+    //cout << " Path now: " << (char *)data_( "PATH" ) << endl;
+
+    inSet_ = new MvObsSet( data_ );
+    iter_ = new MvObsSetIterator( *inSet_ );
+
+
+    const char* myMissingData = in_( "MISSING_DATA" );              // include missing values?
+    if( myMissingData && strcmp( myMissingData, "INCLUDE" ) == 0  )
+    {
+        includeMissingValues_ = true;
+        missingValue_ = (double)in_( "MISSING_DATA_VALUE" );
+    }
+
+
+    if( strcmp( in_("FAIL_ON_ERROR"), "NO" ) == 0 )
+        failOnError_ = false;
+}
+//_________________________________________________________
+MvRequest
+OperaRadar::createRequest()
+{
+   char* fileName = marstmp();
+
+   outfile_.open( fileName, ios::out );
+   outfile_ << "#GEO\n";
+   outfile_ << "#FORMAT XYV\n";
+   outfile_ << "#DATA\n";
+
+   MvRequest x( "GEOPOINTS" );
+   x( "TEMPORARY" ) = 1;
+   x( "PATH" ) = fileName;
+
+   return x;
+}
+//_________________________________________________________
+bool
+OperaRadar::getIntensities()
+{
+   const long radarRainfallIntensity = 21036;
+   intensity_.clear();
+
+   int cnt = 0;
+   float myRainfall = obs_.value( radarRainfallIntensity );
+   while( myRainfall != kBufrMissingValue )
+   {
+      intensity_.push_back( myRainfall );
+      cnt++;
+      myRainfall = obs_.nextValue();
+   }
+   cout << "Rain intensity values count: " << cnt << endl;
+}
+//_________________________________________________________
+void
+OperaRadar::geopointsOutput( const unsigned char* img )
+{
+   double proj = obs_.value( 29201 );        //-- 5 == Lambert...
+   if( proj != 5 )
+   {
+      throw MvException( "Radar data is in unimplemented projection" );
+   }
+
+   double lat  = obs_.value( 29194 );        //-- Latitude Origin [Degree]
+   double lon  = obs_.value( 29193 );        //-- Longitude Origin [Degree]
+cout << "lat/lon: " << lat << "/" << lon << endl;
+
+   long a = obs_.value( 29199 );             //-- semi-major axis of rotation ellipsoid [Meters]
+   long b = obs_.value( 29200 );             //-- semi-minor axis of rotation ellipsoid [Meters]
+cout << "a/b: " << a << "/" << b << endl;
+
+   double x_offset = obs_.value( 29195 );    //-- X-Offset (of NW corner of NW pixel) [Meters]
+   double y_offset = obs_.value( 29196 );    //-- Y-Offset (of NW corner of NW pixel) [Meters]
+cout << "x_offset/y_offset: " << x_offset << "/" << y_offset << endl;
+
+   long dx = obs_.value( 5033 );             //-- "pixel" X size [Meters]
+   long dy = obs_.value( 6033 );             //-- "pixel" Y size [Meters]
+
+   ostringstream proj4Init;                  //-- Proj4 initialisation string
+#if 1
+   proj4Init << "+proj=laea +lat_0=" << lat
+             << " +lon_0=" << lon
+             << " +a=" << a
+             << " +b=" << b
+             << ends;
+#else
+   double e2 = 1 - double(b*b) / double(a*a);
+   proj4Init << "+proj=laea +lat_0=" << lat
+             << " +lon_0=" << lon
+             << " +a=" << a
+             << " +es=" << e2
+             << ends;
+#endif
+cout << "proj4Init: " << proj4Init.str() << endl;
+
+   projPJ pj = pj_init_plus( proj4Init.str().c_str() );
+   if( ! pj )
+   {
+      throw MvException( "Geographical projection (Proj4) initialisation failed" );
+   }
+
+   projUV origin;                            //-- origin coordinates
+   origin.v = lat * DEG_TO_RAD;
+   origin.u = lon * DEG_TO_RAD;
+   origin   = pj_fwd( origin, pj );          //-- compute projected origin coordinates
+cout << "origin.u/origin.v: " << origin.u << "/" << origin.v << endl;
+
+   int ncols = obs_.value( 30021 );          //-- number of pixels on a row
+   int nrows = obs_.value( 30022 );          //-- number of pixels on a column
+
+   projUV NW_corner = origin;                //-- start with projected Origin
+   NW_corner.u += x_offset;                  //-- compute projected NW corner
+   NW_corner.v += y_offset;
+
+   const char* tab = "\t";
+   int imgInd = 0;
+   int gptCount = 0;
+   for( int row=0; row < nrows; row++ )      //-- loop through pixels
+   for( int col=0; col < ncols;  col++ )
+   {
+      float val = intensity_[ img[imgInd++] ];//-- convert pixel value to true rainfall
+      if( val > 0 || includeMissingValues_)   //-- skip zero valued pixels
+      {
+         projUV cur = NW_corner;             //-- start with projected NW corner coordinates
+         cur.u += col*dx;                    //-- move to the current pixel location
+         cur.v -= row*dy;
+         cur = pj_inv( cur, pj );            //-- convert back to lat/lon world
+
+         if (includeMissingValues_ && val == 0) //-- convert zero to user-defined missing value
+            val = missingValue_;
+
+         outfile_ << cur.u*RAD_TO_DEG << tab << cur.v*RAD_TO_DEG << tab << val << endl;
+         ++gptCount;
+      }
+   }
+   cout << "OperaRadar::geopointsOutput: input pixel count = " << imgInd << endl;
+   cout << "OperaRadar::geopointsOutput: geopoints created = " << gptCount << endl;
+
+   outfile_.close();
+}
+//_________________________________________________________
+
+void
+OperaRadar::serve( MvRequest& in, MvRequest& out )
+{
+   cout << "\n\nO p e r a R a d a r F i l t e r" << endl;
+
+   in_ = in;
+   in_.print();
+
+   setOperaBufrTableDir();
+
+   getData();
+
+   MvRequest x = createRequest();
+   obs_ = (*iter_)();                        //-- <aki>: testing with the first image only
+
+   try
+   {
+     unsigned char* radimg = obs_.OperaRadarImage();
+     getIntensities();                       //-- for converting pixel values to rain intensities
+     geopointsOutput( radimg );
+   }
+   catch ( MvException& e )
+   {
+     marslog( LOG_WARN, "OperaRadarFilter: %s", e.what() );
+     if( failOnError_ )
+         throw MvException( "OperaRadarFilter failed" );
+   }
+
+   delete iter_;
+   delete inSet_;
+
+   out = x;
+   out.print();
+}
+//_________________________________________________________
+
+int
+main( int argc, char **argv )
+{
+	MvApplication theApp( argc, argv );
+	OperaRadar    radar;
+
+	theApp.run();
+}
diff --git a/src/OperaRadar/OperaRadarDef b/src/OperaRadar/OperaRadarDef
new file mode 100644
index 0000000..d354c8b
--- /dev/null
+++ b/src/OperaRadar/OperaRadarDef
@@ -0,0 +1,41 @@
+OPERA_RADAR_FILTER; Metview; Specific Application
+{
+
+	DATA [
+			interface		= icon,
+			class			= BUFR,
+			exclusive		= true,
+
+			help            = help_data,
+			help_directory  = '/System/Defaults',
+			help_name       = Data for OPERA radar data,
+			help_class      = RETRIEVE,
+			help_definition = ( RETRIEVE, TYPE = 6, DATE = '-2' )
+		]
+
+	{
+		@
+	}
+
+	OUTPUT
+	{
+		Geographical points ; GEOPOINTS
+	} = GEOPOINTS
+
+	MISSING_DATA
+	{
+		IGNORE
+		INCLUDE
+	} = IGNORE
+
+	MISSING_DATA_VALUE
+	{
+		*
+	} = 0
+
+	FAIL_ON_ERROR
+	{
+		YES
+		NO
+	} = YES
+}
diff --git a/src/OperaRadar/OperaRadarRules b/src/OperaRadar/OperaRadarRules
new file mode 100644
index 0000000..f583cbc
--- /dev/null
+++ b/src/OperaRadar/OperaRadarRules
@@ -0,0 +1,2 @@
+%if MISSING_DATA = IGNORE %then
+    %unset MISSING_DATA_VALUE
diff --git a/src/Percentile/Makefile.am b/src/Percentile/Makefile.am
new file mode 100644
index 0000000..d7984e6
--- /dev/null
+++ b/src/Percentile/Makefile.am
@@ -0,0 +1,30 @@
+bin_PROGRAMS = bin/Percentile
+
+bin_Percentile_SOURCES = Percentile.cc Percentile.h
+bin_Percentile_LDADD   = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.Percentile \
+		 $(local_sharedir)/PercentileDef  \
+		 $(local_sharedir)/PercentileRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} PERCENTILE.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/PERCENTILE.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = PERCENTILE.xpm ObjectSpec.Percentile PercentileDef PercentileRules
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Percentile/Makefile.in b/src/Percentile/Makefile.in
new file mode 100644
index 0000000..bb2bce5
--- /dev/null
+++ b/src/Percentile/Makefile.in
@@ -0,0 +1,709 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Percentile$(EXEEXT)
+subdir = src/Percentile
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Percentile_OBJECTS = Percentile.$(OBJEXT)
+bin_Percentile_OBJECTS = $(am_bin_Percentile_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Percentile_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Percentile_SOURCES)
+DIST_SOURCES = $(bin_Percentile_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Percentile_SOURCES = Percentile.cc Percentile.h
+bin_Percentile_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Percentile \
+		 $(local_sharedir)/PercentileDef  \
+		 $(local_sharedir)/PercentileRules
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/PERCENTILE.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = PERCENTILE.xpm ObjectSpec.Percentile PercentileDef PercentileRules
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Percentile/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Percentile/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Percentile$(EXEEXT): $(bin_Percentile_OBJECTS) $(bin_Percentile_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Percentile$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_Percentile_OBJECTS) $(bin_Percentile_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Percentile.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} PERCENTILE.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Percentile/ObjectSpec.Percentile b/src/Percentile/ObjectSpec.Percentile
new file mode 100644
index 0000000..147ed1e
--- /dev/null
+++ b/src/Percentile/ObjectSpec.Percentile
@@ -0,0 +1,24 @@
+
+object,
+	class            = PERCENTILE,
+	can_be_created   = True,
+	definition_file  = '$METVIEW_DIR_SHARE/etc/PercentileDef',
+	rules_file       = '$METVIEW_DIR_SHARE/etc/PercentileRules',
+	default_name     = Percentile,
+	type             = Data,
+	expand           = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+	macro            = percentile,
+	editor_type      = SimpleEditor,
+	pixmap           = '$METVIEW_DIR_SHARE/icons/PERCENTILE.icon'
+
+state,
+	class		 = PERCENTILE,
+	output_class	 = GRIB,
+        service		 = Percentile
+
+service,
+	timeout		 = $timeout, # set in script
+        name		 = 'Percentile',
+	fullname	 = Percentile,
+        cmd		 = "$metview_command $METVIEW_BIN/Percentile"
+
diff --git a/src/Percentile/PERCENTILE.xpm b/src/Percentile/PERCENTILE.xpm
new file mode 100644
index 0000000..36f56c3
--- /dev/null
+++ b/src/Percentile/PERCENTILE.xpm
@@ -0,0 +1,37 @@
+/* XPM */
+static char * PERCENTILE_xpm[] = {
+"32 32 2 1",
+" 	c #FFFFFFFFFFFF",
+".	c #666666666666",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"       .....               ..   ",
+"      .......       ....   ..   ",
+"     ..     ..      ....  ..    ",
+"    ..       ..     ....  ..    ",
+"    ..       ..     .... ..     ",
+"   ..         ..         ..     ",
+"   ..         ..        ..      ",
+"   ..         ..        ..      ",
+"   ..         ..       ..       ",
+"   ..         ..       ..       ",
+"   ..    ..   ..      ..        ",
+"    ..    .. ..       .. ....   ",
+"    ..     . ..      ..  ....   ",
+"     ..    ...       ..  ....   ",
+"      ..........    ..   ....   ",
+"       .....  ...   ..          ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                "};
diff --git a/src/Percentile/Percentile.cc b/src/Percentile/Percentile.cc
new file mode 100644
index 0000000..478ef86
--- /dev/null
+++ b/src/Percentile/Percentile.cc
@@ -0,0 +1,259 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Percentile.h"
+#include "mars.h"
+
+Percentile::Percentile(const char* kw): MvService(kw)
+{
+//empty
+}
+
+Percentile::~Percentile()
+{
+//empty
+}
+
+void Percentile::serve(MvRequest& in,MvRequest& out)
+{
+cout << "Percentile::serve in" << endl;
+in.print();
+
+	// Get information from the user interface
+        if ( !GetInputInfo(in) ) return;
+
+	// Check input data
+	// Needs to be done
+
+	// Compute percentiles
+	if ( !ComputePercentile(out) ) return;
+
+cout << "Hovmoeller::serve out" << endl;
+out.print();
+
+	return;
+}
+
+bool Percentile::GetInputInfo(MvRequest& in)
+{
+	const char*   cw;    // auxiliary variables
+	int           i;     // auxiliary variables
+
+	// Get data information from UI
+	string str;
+	if ( (const char*)in("SOURCE") && (strcmp((const char*)in("SOURCE"),"OFF") && strcmp((const char*)in("SOURCE"),"off")) )
+	{
+		str = (const char*)in("SOURCE");
+		dataRequest_.setVerb("GRIB");
+		dataRequest_("PATH") = str.c_str();
+	}
+	else
+	{
+		// Get information from the icon
+		in.getValue(dataRequest_,"DATA");
+		if ( !in.countValues("DATA") || !dataRequest_.countValues("PATH") )
+		{
+			setError(1, "No Data files specified...");
+			return false;
+		}
+	}
+
+        // Get list of percentiles
+	// First initialize a vector
+	int nc = in.countValues("PERCENTILES");
+	if (percList_.size())
+		percList_.erase(percList_.begin(),percList_.end());
+	else
+		percList_.reserve(nc);
+
+	for (i = 0; i < nc; i++)
+	{
+		cw = in("PERCENTILES",i);
+		percList_.push_back(atof(cw));
+	}
+
+	// Get interpolation method
+        const char* caux = in("INTERPOLATION");
+	interp_ = (strcmp(caux,"NEAREST_NEIGHBOUR") == 0) ? PERC_NN : PERC_LI;
+
+	return true;
+}
+
+void Percentile::ComputeRank(vector<double>& vrank, int nfsin)
+{
+       double rank;    //auxiliary variable
+
+       for (int i = 0; i < vrank.size(); i++)
+       {
+	     rank = percList_[i]/100. * (nfsin+1);
+	     rank = rank-1.; //c++ index
+
+	     if (rank < 0.)
+		     vrank[i] = 0.;
+	     else if (rank > double(nfsin-1))
+		     vrank[i] = double(nfsin-1);
+	     else
+		     vrank[i] = rank;
+       }
+}
+
+bool Percentile::ComputePercentile(MvRequest& out)
+{
+	int       i;                        //auxialiary variable
+	int       gp;                       //grid point index
+	int       fi;                       //fieldset index
+	int       nsize;                    //number of grid points
+
+	MvField   field;
+	vector<MvField> vfield;             //store fields
+	vector<MvFieldExpander*> vfieldExp; //store expanded fields
+
+	// Initialize fieldset iterator
+        MvFieldSet fs(dataRequest_);
+	MvFieldSetIterator iter(fs);
+	int nfsin = fs.countFields();       //number of input fields
+
+	// Number of input fields must be greater than the number
+	// of input percentiles values. This is because we are
+	// using the input fieldset structure to store the
+	// output fieldset
+	if ( nfsin < percList_.size() )
+	{
+		cout << "ERROR: Number of input fields must be greater than the number of input percentiles values" << endl;
+		return false;
+	}
+
+	// Compute rank of percentiles
+	vector<double> vrank(percList_.size());
+	ComputeRank(vrank,nfsin);
+
+	// Create fieldset objects
+	bool first = true;
+	vfield.reserve(nfsin);
+	vfieldExp.reserve(nfsin);
+	while( field = iter() )
+	{
+	    vfield.push_back(field);
+	    MvFieldExpander* vex = new MvFieldExpander(field);
+	    vfieldExp.push_back(vex);
+
+	    // Check fieldset: all fields should have the
+	    // same number of grid points
+	    if (first)
+	    {
+		  first = false;
+		  nsize = field.countValues();
+	    }
+	    else
+	    {
+		    if ( nsize != field.countValues() )
+		    {
+			    cout << "ERROR: FIELDSET CONTAINS DIFFERENT NUMBER OF GRID POINTS" << endl;
+			    return false;
+		    }
+	    }
+	}
+
+
+
+	// after some modifications to Metview's memory management, it turns out that
+	// the stored fields are no longer expanded in memory at this point (because
+	// of the copy operator with the iterator). Therefore, we delete the field expander
+	// list and create a new one.
+
+	for (fi = 0; fi < nfsin; fi++)
+	{
+		MvFieldExpander* vex = vfieldExp[fi];
+		delete vex;
+	}
+
+	vfieldExp.clear();
+
+	for (size_t nf = 0; nf < nfsin; nf++)
+	{
+	    MvFieldExpander* vex = new MvFieldExpander(vfield[nf]);
+	    vfieldExp.push_back(vex);
+	}
+
+
+	// Main loop
+	// Get fieldset values for each grid point
+	vector<double> gvals(nfsin,0);   //grid point values
+	for( gp = 0; gp < nsize; gp++ )
+	{
+	      // get grid point values
+	      for (fi = 0; fi < nfsin; fi++)
+	      {
+		   gvals[fi] = (vfield[fi])[gp];
+	      }
+
+	      // Sort values
+	      std::sort(gvals.begin(),gvals.end());
+
+              // update output fieldset for each percentile value
+              for (i = 0; i < percList_.size(); i++)
+	      {
+		      (vfield[i])[gp] = GetValue(vrank[i],gvals,nfsin);  
+	      }
+      	}
+
+	// Create output fieldset
+	MvFieldSet fsOut;
+        for (i = 0; i < percList_.size(); i++)
+		 fsOut += vfield[i];
+
+	// Write output fieldset on disk
+	// This function calls Mars to write the fieldset
+	MvRequest req = fsOut.getRequest();
+
+	// Update output request
+	out = out + req;
+
+	// Release memory
+        for (fi = 0; fi < nfsin; fi++)
+	{
+		MvFieldExpander* vex = vfieldExp[fi];
+		delete vex;
+	}
+
+	return true;
+}
+
+double Percentile::GetValue(double rank, vector<double>& gvals, int nfsin)
+{
+	if ( interp_ == PERC_NN ) //Nearest neighbour interpolation
+		return gvals[int(rank+0.5)];
+	else
+	{                         //Linear interpolation
+		int   ir = int(rank);
+		double fr = rank - double(ir);
+
+		// Test boundary 
+		if ((nfsin-1) == ir)
+			return gvals[ir];
+		else
+			return ( fr * (gvals[ir+1] - gvals[ir]) + gvals[ir]);
+	}
+}
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	Percentile perc("PERCENTILE");
+
+	// The applications don't try to read or write from pool, this
+	// should not be done with the new PlotMod.
+	//a.addModeService("GRIB", "DATA");
+        //c.saveToPool(false);
+        //perc.saveToPool(false);
+
+	theApp.run();
+}
diff --git a/src/Percentile/Percentile.h b/src/Percentile/Percentile.h
new file mode 100644
index 0000000..263a94b
--- /dev/null
+++ b/src/Percentile/Percentile.h
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef PERCENTILE_H
+#define PERCENTILE_H
+
+/**************
+  Application Percentile.
+  A percentile is a value on a scale of one hundred that indicates the 
+  percent of a distribution that is equal to or below it.
+***************/
+
+#include "Metview.h"
+#include "MvFieldSet.h"
+
+// Constants
+enum { PERC_NN, PERC_LI }; //interpolation: nearest neighbour/linear
+
+class Percentile : public MvService {
+
+public:
+
+	// Constructor
+	Percentile(const char* kw);
+
+	// Destructor
+	~Percentile();
+
+	void serve(MvRequest&,MvRequest&);
+
+	// Initialize variables from user interface
+	bool GetInputInfo(MvRequest& in);
+
+	// Compute rank of percentiles
+	void ComputeRank(vector<double>& vrank, int nfsin);
+
+	// Compute percentiles
+	bool ComputePercentile(MvRequest&);
+
+	// Get values
+	double GetValue(double rank, vector<double>& gvals, int nsize);  
+
+protected:
+
+	// variables
+	MvRequest dataRequest_;     // input data request
+	vector<double> percList_;   // percentiles input values
+	int interp_;                // interporlation method
+};
+
+#endif
diff --git a/src/Percentile/PercentileDef b/src/Percentile/PercentileDef
new file mode 100644
index 0000000..6c33ab7
--- /dev/null
+++ b/src/Percentile/PercentileDef
@@ -0,0 +1,30 @@
+PERCENTILE; Percentile Application
+{
+	SOURCE
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,  
+					 GRID = 1.5/1.5 )  ]
+	{ @ / }
+
+	PERCENTILES
+	{
+		*
+		/
+	} = 10.0
+
+	INTERPOLATION
+	{
+		NEAREST_NEIGHBOUR
+		LINEAR
+	} = NEAREST_NEIGHBOUR
+}
diff --git a/src/Percentile/PercentileRules b/src/Percentile/PercentileRules
new file mode 100644
index 0000000..e69de29
diff --git a/src/PottF/Makefile.am b/src/PottF/Makefile.am
new file mode 100644
index 0000000..16c11b5
--- /dev/null
+++ b/src/PottF/Makefile.am
@@ -0,0 +1,11 @@
+
+bin_PROGRAMS = bin/PottF
+
+bin_PottF_SOURCES  = PottF.cc pott.F eqpott.F seqpott.F tlvalid.F pml.F sshm.F
+
+bin_PottF_LDADD    =  ../../lib/libmacro_api_f90.a -lgrib_api_f90 $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB)
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/PottF/Makefile.in b/src/PottF/Makefile.in
new file mode 100644
index 0000000..835a617
--- /dev/null
+++ b/src/PottF/Makefile.in
@@ -0,0 +1,663 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/PottF$(EXEEXT)
+subdir = src/PottF
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_PottF_OBJECTS = PottF.$(OBJEXT) pott.$(OBJEXT) eqpott.$(OBJEXT) \
+	seqpott.$(OBJEXT) tlvalid.$(OBJEXT) pml.$(OBJEXT) \
+	sshm.$(OBJEXT)
+bin_PottF_OBJECTS = $(am_bin_PottF_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_PottF_DEPENDENCIES = ../../lib/libmacro_api_f90.a \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+PPF77COMPILE = $(F77) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)
+LTPPF77COMPILE = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(F77) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_FFLAGS) $(FFLAGS)
+AM_V_PPF77 = $(am__v_PPF77_$(V))
+am__v_PPF77_ = $(am__v_PPF77_$(AM_DEFAULT_VERBOSITY))
+am__v_PPF77_0 = @echo "  PPF77 " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+F77LD = $(F77)
+F77LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_F77LD = $(am__v_F77LD_$(V))
+am__v_F77LD_ = $(am__v_F77LD_$(AM_DEFAULT_VERBOSITY))
+am__v_F77LD_0 = @echo "  F77LD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_PottF_SOURCES)
+DIST_SOURCES = $(bin_PottF_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_PottF_SOURCES = PottF.cc pott.F eqpott.F seqpott.F tlvalid.F pml.F sshm.F
+bin_PottF_LDADD = ../../lib/libmacro_api_f90.a -lgrib_api_f90 $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .F .cc .f .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/PottF/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/PottF/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/PottF$(EXEEXT): $(bin_PottF_OBJECTS) $(bin_PottF_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/PottF$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_PottF_OBJECTS) $(bin_PottF_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PottF.Po at am__quote@
+
+.F.o:
+	$(AM_V_PPF77) @AM_BACKSLASH@
+	$(PPF77COMPILE) -c -o $@ $<
+
+.F.obj:
+	$(AM_V_PPF77) @AM_BACKSLASH@
+	$(PPF77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.F.lo:
+	$(AM_V_PPF77) @AM_BACKSLASH@
+	$(LTPPF77COMPILE) -c -o $@ $<
+.F.f:
+	$(F77COMPILE) -F $<
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/PottF/PottF.cc b/src/PottF/PottF.cc
new file mode 100644
index 0000000..549a32c
--- /dev/null
+++ b/src/PottF/PottF.cc
@@ -0,0 +1,348 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <MvFortran.h>
+
+#ifdef FORTRAN_UPPERCASE
+#define pott_ POTT
+#define eqpott_ EQPOTT
+#define seqpott_ SEQPOTT
+#endif
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define pott_ pott
+#define eqpott_ eqpott
+#define seqpott_ seqpott
+#endif
+
+extern "C" void pott_(void);
+extern "C" void eqpott_(void);
+extern "C" void seqpott_(void);
+
+#define TEMP	130
+#define SPEHUM	133
+#define LNSP	152
+#define RELHUM	157
+
+class PottF : public MvService {
+protected :
+	char		Plevtype[10];		// level type (ML or PL)
+	int		Pntemp;			// number of temperature fields
+	int		Pnlnsp;			// number of lnsp fields
+	MvFieldSet	Pfstemp;		// temperature field set
+	MvFieldSet	Pfslnsp;		// lnsp field set
+
+public:
+	PottF(char* a) : MvService(a) {}
+	void serve(MvRequest&,MvRequest&);
+
+	virtual int GetData(MvRequest&) = 0;
+	virtual int Apply(MvRequest&) = 0;
+	int GetField (MvRequest&, int, MvFieldSet&, char*);
+};
+
+class Pott : public PottF {
+public :
+	Pott(char* a) : PottF(a) {}
+
+	virtual int GetData(MvRequest&);
+	virtual int Apply(MvRequest&);
+};
+
+class Eqpott : public PottF {
+	int		Pnhum;			// number of humidity fields
+	MvFieldSet	Pfshum;			// humidity field set
+
+public :
+	Eqpott(char* a) : PottF(a) {}
+
+	virtual int GetData(MvRequest&);
+	virtual int Apply(MvRequest&);
+};
+
+class Seqpott : public PottF {
+public :
+	Seqpott(char* a) : PottF(a) {}
+
+	virtual int GetData(MvRequest&);
+	virtual int Apply(MvRequest&);
+};
+
+void PottF :: serve(MvRequest& in,MvRequest& out)
+{
+	 // Get data
+
+	if (!GetData(in)) return;
+
+	// Compute output field
+
+	if (!Apply(out)) return;
+}
+
+int PottF :: GetField (MvRequest& grib, int param, MvFieldSet& fs, char* levtype)
+{
+	MvFilter		filter("PARAM");	// filter
+	MvFieldSet		fset(grib);		// field set
+	MvFieldSetIterator 	fsiter(fset);		// field set iterator
+	MvField			field;			// auxiliary field
+	int			nfields;		// number of fields
+
+	// Get fields
+
+	nfields = 0;
+	fsiter.setFilter(filter == param);
+	while(field=fsiter())
+	{
+		nfields++;
+		fs += field;
+		if (nfields == 1)	// check level type
+		{
+			MvRequest req = field.getRequest();
+			strcpy(levtype,req("LEVTYPE"));
+		}
+	}
+
+	return nfields;
+}
+
+int Pott :: GetData(MvRequest& in)
+{
+	MvRequest 	grib;			// temperature grib file
+
+	 // Get data from request
+
+	in.getValue(grib,"TEMPERATURE");
+
+	// Get Temperature fields
+
+	Pntemp = GetField(grib,TEMP,Pfstemp,Plevtype);
+	if(Pntemp == 0)
+	{
+		setError(1,"Parameter TEMPERATURE not found...");
+		return FALSE;
+	}
+
+	// Get Lnsp fields
+
+	if(strcmp(Plevtype,"ML") == 0)
+	{
+		// first, try from LNSP user interface
+		in.getValue(grib,"LNSP");
+		Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+		if(Pnlnsp == 0)
+		{
+			// second, try from TEMPERATURE user interface
+			in.getValue(grib,"TEMPERATURE");
+			Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+			if(Pnlnsp == 0)
+			{
+				setError(1,"Parameter LNSP not found...");
+				return FALSE;
+			}
+		}
+	}
+
+	return TRUE;
+}
+
+int Eqpott :: GetData(MvRequest& in)
+{
+	int		param;			// parameter code
+	MvRequest 	grib;			// temperature/humidity grib file
+
+	 // Get temperature data from request
+
+	in.getValue(grib,"TEMPERATURE");
+
+	// Get temperature fields
+
+	Pntemp = GetField(grib,TEMP,Pfstemp,Plevtype);
+	if(Pntemp == 0)
+	{
+		setError(1,"Parameter TEMPERATURE not found...");
+		return FALSE;
+	}
+
+	 // Get humidity data from request
+
+	in.getValue(grib,"HUMIDITY");
+	MvFieldSet fset1(grib);		// field set
+	MvField fs1=fset1[0];
+	MvRequest req = fs1.getRequest();
+
+	// Get humidity fields
+
+	param = (int)req("PARAM");
+	if (param != RELHUM && param != SPEHUM)
+	{
+		setError(1,"Parameter HUMIDITY not found...");
+		return FALSE;
+	}
+	Pnhum = GetField(grib,param,Pfshum,Plevtype);
+	if(Pnhum == 0)
+	{
+		setError(1,"Parameter HUMIDITY not found...");
+		return FALSE;
+	}
+
+	// Get Lnsp data
+
+	if(strcmp(Plevtype,"ML") == 0)
+	{
+		// first, try from LNSP user interface
+		in.getValue(grib,"LNSP");
+		Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+		if(Pnlnsp == 0)
+		{
+			// second, try from TEMPERATURE user interface
+			in.getValue(grib,"TEMPERATURE");
+			Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+			if(Pnlnsp == 0)
+			{
+				// third, try from HUMIDITY user interface
+				in.getValue(grib,"HUMIDITY");
+				Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+				if(Pnlnsp == 0)
+				{
+					setError(1,"Parameter LNSP not found...");
+					return FALSE;
+				}
+			}
+		}
+	}
+
+	return TRUE;
+}
+
+int Seqpott :: GetData(MvRequest& in)
+{
+	MvRequest 	grib;			// temperature grib file
+
+	 // Get data from request
+
+	in.getValue(grib,"TEMPERATURE");
+
+	// Get Temperature fields
+
+	Pntemp = GetField(grib,TEMP,Pfstemp,Plevtype);
+	if(Pntemp == 0)
+	{
+		setError(1,"Parameter TEMPERATURE not found...");
+		return FALSE;
+	}
+
+	// Get Lnsp fields
+
+	if(strcmp(Plevtype,"ML") == 0)
+	{
+		// first, try from LNSP user interface
+		in.getValue(grib,"LNSP");
+		Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+		if(Pnlnsp == 0)
+		{
+			// second, try from TEMPERATURE user interface
+			in.getValue(grib,"TEMPERATURE");
+			Pnlnsp = GetField(grib,LNSP,Pfslnsp,Plevtype);
+			if(Pnlnsp == 0)
+			{
+				setError(1,"Parameter LNSP not found...");
+				return FALSE;
+			}
+		}
+	}
+
+	return TRUE;
+}
+
+int Pott :: Apply(MvRequest& out)
+{
+	MvFortran	pottf("Pott");	// fortran subroutine
+
+	// Call the fortran routines
+
+	pottf.addParameter(Pfstemp);	// setup fortran params
+	pottf.addParameter(Plevtype);
+	pottf.addParameter(Pfslnsp);
+
+	putenv("POTTF_ENV=OK");
+	pott_();
+	char* penv=getenv("POTTF_ENV");
+	if(strcmp(penv,"OK"))
+	{
+		setError(1,penv);
+		return FALSE;
+	}
+
+	// Get the result
+
+	out = pottf.getResult();
+	return TRUE;
+}
+
+int Eqpott :: Apply(MvRequest& out)
+{
+	MvFortran	eqpottf("Eqpott");	// fortran subroutine
+
+	// Call the fortran routines
+
+	eqpottf.addParameter(Pfstemp);	// setup fortran params
+	eqpottf.addParameter(Plevtype);
+	eqpottf.addParameter(Pfshum);
+	eqpottf.addParameter(Pfslnsp);
+
+	putenv("POTTF_ENV=OK");
+	eqpott_();
+	char* penv=getenv("POTTF_ENV");
+	if(strcmp(penv,"OK"))
+	{
+		setError(1,penv);
+		return FALSE;
+	}
+
+	// Get the result
+
+	out = eqpottf.getResult();
+	return TRUE;
+}
+
+int Seqpott :: Apply(MvRequest& out)
+{
+	MvFortran	seqpottf("Seqpott");	// fortran subroutine
+
+	// Call the fortran routines
+
+	seqpottf.addParameter(Pfstemp);	// setup fortran params
+	seqpottf.addParameter(Plevtype);
+	seqpottf.addParameter(Pfslnsp);
+
+	putenv("POTTF_ENV=OK");
+	seqpott_();
+	char* penv=getenv("POTTF_ENV");
+	if(strcmp(penv,"OK"))
+	{
+		setError(1,penv);
+		return FALSE;
+	}
+
+	// Get the result
+
+	out = seqpottf.getResult();
+	return TRUE;
+}
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	Pott     pott("POTT_M"), pott1("POTT_P");
+	Eqpott	 eqpott("EQPOTT_M"), eqpott1("EQPOTT_P");
+	Seqpott	 seqpott("SEQPOTT_M"), seqpott1("SEQPOTT_P");
+
+	theApp.run();
+}
diff --git a/src/PottF/eqpott.F b/src/PottF/eqpott.F
new file mode 100644
index 0000000..778a26b
--- /dev/null
+++ b/src/PottF/eqpott.F
@@ -0,0 +1,341 @@
+C **************************** LICENSE START ***********************************
+C
+C Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+C of the Apache License version 2.0. In applying this license, ECMWF does not
+C waive the privileges and immunities granted to it by virtue of its status as
+C an Intergovernmental Organization or submit itself to any jurisdiction.
+C
+C ***************************** LICENSE END ************************************
+
+      SUBROUTINE EQPOTT
+C
+C          COMPUTE EQUIVALENT POTENTIAL TEMPERATURE
+C
+C        Input:
+C          Fieldset of temperature ( and LNSP if model levels)
+C          Fieldset of specific or relative humidity
+C              (lat/long grid)
+C          Indicator for pressure levels or model levels
+C
+C        Output:
+C          Fieldset of equivalent potential temperature (lat/long grid)
+C
+C        Author:
+C          B. Norris,  March 1995
+C
+      use grib_api
+C
+      integer cputenv
+
+#ifdef __alpha
+      INTEGER*8 IGRIBT,ICNTT,IGRIBQ,ICNTQ,IGRIBP
+      INTEGER*8 IGRIBL,ICNTL,IWORD
+#endif
+
+      real*8, allocatable :: TEMP(:)
+      real*8, allocatable :: QR(:)
+      real*8, allocatable :: RLNSP(:)
+      real*8, allocatable :: vertCoef(:)
+
+      LOGICAL NLMODLV,LOK,LTQ,LEVEL
+      CHARACTER*4 YMODLV
+      integer  igrib_id_t, igrib_id_q, igrib_id_p
+      LOK=.FALSE.
+c
+c -------------------------------------------------------------------
+c
+C     GET FIELDSET OF TEMPERATURE
+
+      CALL mfi_get_fieldset(IGRIBT,ICNTT)
+
+C     TELLS WHETHER PRESSURE OR MODEL LEVELS
+
+      CALL mfi_get_string (YMODLV)
+      IF(YMODLV(1:2).EQ.'ml'.OR.YMODLV(1:2).EQ.'ML') THEN
+           NLMODLV=.TRUE.
+      ELSEIF(YMODLV(1:2).EQ.'pl'.OR.YMODLV(1:2).EQ.'PL') THEN
+           NLMODLV=.FALSE.
+      !-- elseif?
+      ENDIF
+
+C     GET FIELDSET OF HUMIDITY
+
+      CALL mfi_get_fieldset(IGRIBQ,ICNTQ)
+
+C     GET FIELDSET OF LNSP
+
+      IF(NLMODLV) CALL mfi_get_fieldset(IGRIBL,ICNTL)
+
+C     CREATE A NEW FIELDSET
+
+      CALL mfi_new_fieldset(IGRIBP)
+
+      ITCNT=0
+      ILCNT=0
+      IQCNT=0
+c
+c -------------------------------------------------------------------
+c
+C     LOOP ON FIELDS
+
+  100 CONTINUE
+
+C       GET NEXT TEMPERATURE FROM FIELDSET
+
+      ITCNT=ITCNT+1
+      IF(ITCNT.GT.ICNTT) GO TO 400
+
+      CALL mfi_load_one_grib(IGRIBT,igrib_id_t)
+
+!     -------------------------------------
+!     --  decode temperature field TEMP  --
+!     -------------------------------------
+
+      CALL grib_get_int( igrib_id_t, 'gridType', iGridType )
+      IF(iGridType.EQ.50) THEN
+ 	JJ=cputenv
+     +	('POTTF_ENV=T DATA REPRESENTATION CAN NOT BE SPECTRAL')
+	RETURN
+      ENDIF
+
+      CALL grib_get_int( igrib_id_t, 'level', NLVELR )
+
+      CALL grib_get_size( igrib_id_t, 'values', NLATLON )
+      allocate( TEMP( NLATLON ) )
+      CALL grib_get_real8_array( igrib_id_t, 'values', TEMP )
+
+C       GET NEXT HUMIDITY
+
+      IQCNT=IQCNT+1
+      IF(IQCNT.GT.ICNTQ) GO TO 400
+
+      CALL mfi_load_one_grib(IGRIBQ,igrib_id_q)
+
+!     --------------------------------
+!     --  decode humidity field QR  --
+!     --------------------------------
+
+      CALL grib_get_int( igrib_id_q, 'gridType', iGridType )
+      IF(iGridType.EQ.50) THEN
+ 	JJ=cputenv
+     +	('POTTF_ENV=Q DATA REPRESENTATION CAN NOT BE SPECTRAL')
+	RETURN
+      ENDIF
+
+      CALL grib_get_int( igrib_id_q, 'paramId', ICODE )
+      LEVEL=.TRUE.
+
+      CALL TLVALID ( igrib_id_t, igrib_id_q,
+     X               LEVEL, LTQ)
+      IF (.NOT.LTQ) THEN
+	RETURN
+      ENDIF
+
+      CALL grib_get_size( igrib_id_q, 'values', NLATLON )
+      allocate( QR( NLATLON ) )
+      CALL grib_get_real8_array( igrib_id_q, 'values', QR )
+
+C       GET NEXT LNSP FROM FIELDSET
+
+  200 CONTINUE
+      IF(NLMODLV.AND..NOT.LOK) THEN
+         ILCNT=ILCNT+1
+         IF(ILCNT.GT.ICNTL) GO TO 400
+
+         CALL mfi_load_one_grib(IGRIBL,igrib_id_p)
+
+!        -------------------------------
+!        --  decode lnsp field RLNSP  --
+!        -------------------------------
+
+         CALL grib_get_int( igrib_id_p,
+     x               'numberOfVerticalCoordinateValues', ILENV1 )
+         allocate( vertCoef( ILENV1 ) )
+         CALL grib_get_real8_array( igrib_id_p, 'pv', vertCoef )
+
+         CALL grib_get_size( igrib_id_p, 'values', NLATLON )
+         allocate( RLNSP( NLATLON ) )
+         CALL grib_get_real8_array( igrib_id_p, 'values', RLNSP )
+      ENDIF
+
+C           CHECK LNSP CONSISTENT IF MODEL LEVELS
+
+      IF(NLMODLV) THEN
+         LEVEL=.FALSE.
+
+         CALL TLVALID (igrib_id_p,igrib_id_t,
+     X                 LEVEL,LOK)
+         IF(LOK) THEN
+              GO TO 300
+         ELSE
+              GO TO 200
+         ENDIF
+      ENDIF
+  300 CONTINUE
+
+c --------------------------------------------------------------------
+
+C           COMPUTE EQUIVALENT POTENTIAL TEMPERATURE
+
+      CALL grib_get_int( igrib_id_t, 'dataDate', IDATE )
+C
+      CALL EQUIVT (TEMP,QR,RLNSP,ICODE,NLMODLV,NLVELR,IDATE,NLATLON,
+     X             vertCoef,ILENV1,IERROR)
+      IF(IERROR.NE.0) RETURN
+
+      CALL grib_set_int( igrib_id_t, 'paramId', 4 )
+
+      TMIN=1.0E10
+      TMAX=-1.0E10
+      DO 302 KD=1,NLATLON
+      IF(TEMP(KD).LT.TMIN) TMIN=TEMP(KD)
+      IF(TEMP(KD).GT.TMAX) TMAX=TEMP(KD)
+  302 CONTINUE
+      WRITE (*,*) ' TMIN ',TMIN,' TMAX ',TMAX
+
+!     -- encode the computed field TEMP --
+
+      CALL grib_set_real8_array( igrib_id_t, 'values', TEMP )
+
+C          ADD TO FIELDSET
+
+      CALL mfi_save_grib(IGRIBP,igrib_id_t)
+
+      deallocate( TEMP )
+      deallocate( QR )
+
+      GO TO 100
+
+c --------------------------------------------------------------------
+
+  400 CONTINUE
+
+
+      IF(NLMODLV) deallocate( RLNSP )
+
+C     SET RESULT
+      CALL mfi_return_fieldset(IGRIBP)
+
+C      WRITE (*,'(A)') '  END OF EQPOTT '
+
+      RETURN
+      END
+
+c CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+      SUBROUTINE EQUIVT(T,QR,PS,IFQR,NLMODLV,NLVELR,IDATE,NLATLON,
+     +                   FVERTB,NVERT,IERROR)
+C
+C     THIS SUBROUTINE CALCULATES THE EQUIVALENT POTENTIAL TEMPERATURE
+C     FROM THE TEMPERATURE AND RELATIVE HUMIDITY OR SPECIFIC HUMIDITY
+C     ON PRESSURE LEVELS.
+C     THE VALUE FOR CI IS FROM MARTIN MILLER & ALAN BETTS
+C
+C     T         : TEMPERATURE
+C     QR    	: RELATIVE/SPECIFIC HUMIDITY
+C     PS    	: LOG SURFACE PRESSURE
+C     IFQR  	: 133 - SPECIFIC HUMIDITY, 157 -  RELATIVE HUMIDITY
+C     NLMODLV   : T - MODEL LEVELS, F - PRESSURE LEVELS
+C     NLVELR    : LEVEL
+C     DATE  	: DATE (YYYYMMDDHH)
+C     NLATLON   : GRID POINTS (LAT X LON)
+C     FVERTB    : VERTICAL COORDINATE ARRAY
+C     NVERT     : LENGTH OF THE DATA IN THE ARRAY FVERTB
+C     IERROR    : 0 - SUCCESSFUL, 1 - ERROR
+C
+      DIMENSION T(*),QR(*),PS(*),FVERTB(*)
+      LOGICAL NLMODLV,ILOLDM
+      REAL SSHM,PML
+
+      integer cputenv
+
+      CI=2710.
+      RD=287.05
+      CP=1005.46
+
+      IERROR = 0
+      ILOLDM = .FALSE.
+      IF(IDATE.LT.19830421) ILOLDM = .TRUE.
+
+      DO 1 J=1,NLATLON
+         IF (NLMODLV) THEN
+            PMB = PML(PS(J),NLVELR,FVERTB,NVERT)*.01
+         ELSE
+            PMB = FLOAT(NLVELR)
+         ENDIF
+
+C        CALCULATE THE SATURATION SPECIFIC HUMIDITY
+         SATHUM = SSHM(T(J),PMB,ILOLDM)
+
+         IF(IFQR.EQ.133) THEN
+            SPCHM = QR(J)
+         ELSEIF(IFQR.EQ.157) THEN
+C           CALCULATE THE SPECIFIC HUMIDITY
+            SPCHM = SATHUM*QR(J)*.01
+         ELSE
+	    JJ=cputenv('POTTF_ENV=FIELDS Q OR R NOT FOUND')
+	    IERROR=1
+	    RETURN
+         ENDIF
+
+C        CALCULATE THE SATURATION POINT VALUES OF T,PMB : TS,PMBS
+         CALL SATPNT(PMB,T(J),SPCHM,PMBS,TS,DP,ILOLDM,IERROR)
+	 IF(IERROR.NE.0) RETURN
+
+C        CALCULATE THE SATURATION SPECIFIC HUMIDITY AT TS,PMBS
+         SATHUM = SSHM(TS,PMBS,ILOLDM)
+
+C        CALCULATE THE EQUIVALENT POTENTIAL TEMPERATURE
+         T(J) = TS*((1000./PMBS)**(RD/CP))*EXP(SATHUM*CI/TS)
+
+ 1    CONTINUE
+
+      RETURN
+      END
+
+c CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+      SUBROUTINE SATPNT(ZPK,ZTK,ZQK,ZPSL,ZTSL,ZDP,ILOLDM,IERROR)
+C
+C     **** COMPUTES SATURATION LEVEL PARAMETERS FROM T,P,Q
+C     **** PARAMETERS ARE P AND T AT SAT.LEVEL AND ZDP=ZPK-ZPSL
+C     **** UNITS ARE KELVIN,GM/GM,MBS.
+C
+      LOGICAL ILOLDM
+
+      integer cputenv
+
+C
+      IERROR=0
+      RAIR=287.05
+      CPAIR=1005.46
+      KOUNT=0
+      IF(ZQK.LT.0.000002.AND.ZPK.GT.100.) ZQK=0.000002
+      ZPTEST=ZPK*0.2
+      ZPSL=ZPK*0.98
+
+  300 CONTINUE
+      ZTSL=ZTK*(ZPSL/ZPK)**(RAIR/CPAIR)
+      ZQL = SSHM(ZTSL,ZPSL,ILOLDM)
+      ZTSM=ZTK*((ZPSL-1.)/ZPK)**(RAIR/CPAIR)
+      ZQM = SSHM(ZTSM,ZPSL-1.,ILOLDM)
+      ZDELPL=(ZQL-ZQK)/(ZQL-ZQM)
+      ZDP=ZPK-ZPSL
+      IF(ABS(ZDELPL).LT.1.0) GOTO 400
+      ZPSL=ZPSL-ZDELPL
+      IF(ZPSL.LT.ZPTEST) GO TO 305
+      KOUNT=KOUNT+1
+      IF(KOUNT.GT.20)GO TO 304
+      GO TO 300
+
+  304 CONTINUE
+      JJ=cputenv('POTTF_ENV=ITERATION FAILED IN SATPNT')
+      IERROR=1
+      RETURN
+  305 CONTINUE
+      ZPSL=ZPSL+ZDELPL
+
+  400 CONTINUE
+
+      RETURN
+      END
diff --git a/src/PottF/pml.F b/src/PottF/pml.F
new file mode 100644
index 0000000..0d8b098
--- /dev/null
+++ b/src/PottF/pml.F
@@ -0,0 +1,46 @@
+C **************************** LICENSE START ***********************************
+C
+C Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+C of the Apache License version 2.0. In applying this license, ECMWF does not
+C waive the privileges and immunities granted to it by virtue of its status as
+C an Intergovernmental Organization or submit itself to any jurisdiction.
+C
+C ***************************** LICENSE END ************************************
+
+      FUNCTION PML(PSLN,KL,FVERTB,NVERT)
+C
+C
+C        P. VITERBO   E.C.M.W.F   26/06/90
+C
+C     PURPOSE
+C     -------
+C
+C*    COMPUTES THE PRESSURE AT MODEL LEVEL KL GIVEN THE VERTICAL
+C*    COORDINATE TABLE AND LOG(PS).
+C
+C
+C     PARAMETERS
+C     ----------
+C
+C     KL       MODEL LEVEL WHERE THE PRESSURE IS CALCULATED
+C     NVERT    LENGTH OF THE ARRAY FVERTB(FROM THE MARS DECOGB ROUTINE)
+C     PSLN     LOGARITHM OF THE SURFACE PRESSURE
+C     FVERTB   VERTICAL COORDINATE ARRAY
+C
+      DIMENSION FVERTB(*)
+C
+      ILEVP1=NVERT/2
+      ZPS=EXP(PSLN)
+C
+      ZPHALF1=FVERTB(KL  )+FVERTB(KL  +ILEVP1)*ZPS
+      ZPHALF2=FVERTB(KL+1)+FVERTB(KL+1+ILEVP1)*ZPS
+C
+      PML = (ZPHALF1+ZPHALF2)*.5
+c      WRITE(*,'('' LEVEL '',I3,
+c     1          '' A='',2G15.4,'', B='',2g15.4,'', PS ='',G15.4
+c     1        ,'' PRESSURE ='',G15.4)')KL,FVERTB(KL),FVERTB(KL+1),
+c     1        FVERTB(KL+ILEVP1),FVERTB(KL+1+ILEVP1),ZPS,PML
+
+      RETURN
+      END
+
diff --git a/src/PottF/pott.F b/src/PottF/pott.F
new file mode 100644
index 0000000..aec8b64
--- /dev/null
+++ b/src/PottF/pott.F
@@ -0,0 +1,218 @@
+C **************************** LICENSE START ***********************************
+C
+C Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+C of the Apache License version 2.0. In applying this license, ECMWF does not
+C waive the privileges and immunities granted to it by virtue of its status as
+C an Intergovernmental Organization or submit itself to any jurisdiction.
+C
+C ***************************** LICENSE END ************************************
+
+      SUBROUTINE POTT
+C
+C          COMPUTE POTENTIAL TEMPERATURE
+C
+C        Input:
+C          Fieldset of temperature ( and LNSP if model levels)
+C              (lat/long grid)
+C          Indicator for pressure levels or model levels
+C
+C        Output:
+C          Fieldset of potential temperature (lat/long grid)
+C
+C        Author:
+C          B. Norris,  March 1995
+C
+      use grib_api
+C
+      integer cputenv
+
+#ifdef __alpha
+      INTEGER*8 IGRIBT,ICNTT,IGRIBL,ICNTL,IGRIBP,JMGRIBB,IWORD
+#endif
+
+      real*8, allocatable :: TEMP(:)
+      real*8, allocatable :: RLNSP(:)
+      real*8, allocatable :: vertCoef(:)
+
+      LOGICAL NLMODLV,LOK,LEVEL
+      CHARACTER*4 YMODLV
+      integer  igrib_id_t, igrib_id_p
+      LOK=.FALSE.
+c
+c -------------------------------------------------------------------
+c
+
+
+C     GET FIELDSET OF TEMPERATURE
+
+      CALL mfi_get_fieldset(IGRIBT,ICNTT)
+
+C     TELLS WHETHER PRESSURE OR MODEL LEVELS
+
+      CALL MGETS (YMODLV)
+      IF(YMODLV(1:2).EQ.'ml'.OR.YMODLV(1:2).EQ.'ML') THEN
+           NLMODLV=.TRUE.
+      ELSEIF(YMODLV(1:2).EQ.'pl'.OR.YMODLV(1:2).EQ.'PL') THEN
+           NLMODLV=.FALSE.
+      !-- elseif?
+      ENDIF
+
+C     GET FIELDSET OF LNSP
+
+      IF(NLMODLV) CALL mfi_get_fieldset(IGRIBL,ICNTL)
+
+C     CREATE A NEW FIELDSET FOR POTENTIAL TEMPERATURE
+
+      CALL mfi_new_fieldset(IGRIBP)
+c
+c -------------------------------------------------------------------
+c
+C     LOOP ON FIELDS
+
+      ITCNT=0
+      ILCNT=0
+
+C       GET NEXT TEMPERATURE FROM FIELDSET
+
+  100 CONTINUE
+      ITCNT=ITCNT+1
+      IF(ITCNT.GT.ICNTT) GO TO 400
+
+      CALL mfi_load_one_grib(IGRIBT,igrib_id_t)
+
+      CALL grib_get_int( igrib_id_t, 'gridType', iGridType )
+      IF(iGridType.EQ.50) THEN
+	 JJ=cputenv
+     +	 ('POTTF_ENV=DATA REPRESENTATION CAN NOT BE SPHERICAL HARMONICS')
+	RETURN
+      ENDIF
+
+      CALL grib_get_int( igrib_id_t, 'level', NLVELR )
+
+      CALL grib_get_size( igrib_id_t, 'values', NLATLON )
+      allocate( TEMP( NLATLON ) )
+      CALL grib_get_real8_array( igrib_id_t, 'values', TEMP )
+
+C       GET NEXT LNSP FROM FIELDSET
+
+  200 CONTINUE
+      IF(NLMODLV.AND..NOT.LOK) THEN
+         ILCNT=ILCNT+1
+         IF(ILCNT.GT.ICNTL) GO TO 400
+
+         CALL mfi_load_one_grib(IGRIBL,igrib_id_p)
+
+         CALL grib_get_int( igrib_id_p,
+     x               'numberOfVerticalCoordinateValues', ILENV1 )
+         allocate( vertCoef( ILENV1 ) )
+         CALL grib_get_real8_array( igrib_id_p, 'pv', vertCoef )
+
+         CALL grib_get_size( igrib_id_p, 'values', NLATLON )
+         allocate( RLNSP( NLATLON ) )
+         CALL grib_get_real8_array( igrib_id_p, 'values', RLNSP )
+      ENDIF
+
+C           CHECK T AND LNSP CONSISTENT IF MODEL LEVELS
+
+      IF(NLMODLV) THEN
+         LEVEL=.FALSE.
+
+         CALL TLVALID (igrib_id_t,igrib_id_p,
+     X                 LEVEL,LOK)
+         IF(LOK) THEN
+              GO TO 300
+         ELSE
+              GO TO 200
+c 	      JJ=cputenv('POTTF_ENV=FIELDS T AND LNSP NOT CONSISTENT')
+c	      RETURN
+         ENDIF
+      ENDIF
+  300 CONTINUE
+
+c --------------------------------------------------------------------
+
+C           COMPUTE POTENTIAL TEMPERATURE
+
+C     It takes into consideration Pa and hPa
+C     OBS: It needs to change eqpott and seqpott as well
+      CALL grib_get_int( igrib_id_t, 'levtype', level_sc )
+      if (level_sc .eq. 100) then
+          NLVELR = NLVELR*100.0    ! convert to Pa
+      endif
+
+      CALL POTEMP (TEMP,RLNSP,NLMODLV,NLVELR,NLATLON,vertCoef,ILENV1)
+
+      CALL grib_set_int( igrib_id_t, 'paramId', 3 )
+
+      TMIN=1.0E10
+      TMAX=-1.0E10
+      DO 302 KD=1,NLATLON
+      IF(TEMP(KD).LT.TMIN) TMIN=TEMP(KD)
+      IF(TEMP(KD).GT.TMAX) TMAX=TEMP(KD)
+  302 CONTINUE
+      WRITE (*,*) ' TMIN ',TMIN,' TMAX ',TMAX
+
+      CALL grib_set_real8_array( igrib_id_t, 'values', TEMP )
+
+C          ADD TO FIELDSET
+
+      CALL mfi_save_grib(IGRIBP,igrib_id_t)
+
+      deallocate( TEMP )
+
+      GO TO 100
+
+c --------------------------------------------------------------------
+
+  400 CONTINUE
+
+      IF(NLMODLV) deallocate( RLNSP )
+
+C     SET RESULT
+      CALL mfi_return_fieldset(IGRIBP)
+
+C      WRITE (*,'(A)') '  END OF POTT '
+
+      RETURN
+      END
+
+c CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+      SUBROUTINE POTEMP(T,PS,NLMODLV,NLVELR,NLATLON,FVERTB,NVERT)
+C
+C    THIS SUBROUTINE CONVERTS TEMPERATURE TO POTENTIAL TEMPERATURE
+C
+C     INPUT :
+C     T           : TEMPERATURE
+C     PS          : LOG SURFACE PRESSURE
+C     NLMODLV     : T - MODEL LEVELS, F - PRESSURE LEVELS
+C     NLVELR      : LEVEL
+C     NLATLON     : GRID POINTS (LAT X LON)
+C     FVERTB      : VERTICAL COORDINATE ARRAY
+C     NVERT       : LENGTH OF THE DATA IN THE ARRAY FVERTB
+C
+C     OUTPUT :
+C     T           : POTENTIAL TEMPERATURE
+C
+      INTEGER     NLVELR,NLATLON,NVERT
+      DIMENSION   T(*),PS(*),FVERTB(*)
+      LOGICAL     NLMODLV
+      REAL  PML
+C
+C
+      RD=287.05
+      CP=1005.46
+
+      IF (.NOT.NLMODLV) THEN
+         XPK = (100000./FLOAT(NLVELR))**(RD/CP)
+         DO 10 I=1,NLATLON
+         T(I) = T(I) * XPK
+ 10      CONTINUE
+      ELSE
+         DO 20 I=1,NLATLON
+         T(I) = T(I)*(100000./PML(PS(I),NLVELR,FVERTB,NVERT))**(RD/CP)
+ 20      CONTINUE
+      ENDIF
+
+      RETURN
+      END
diff --git a/src/PottF/seqpott.F b/src/PottF/seqpott.F
new file mode 100644
index 0000000..fd6e7f3
--- /dev/null
+++ b/src/PottF/seqpott.F
@@ -0,0 +1,238 @@
+C **************************** LICENSE START ***********************************
+C
+C Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+C of the Apache License version 2.0. In applying this license, ECMWF does not
+C waive the privileges and immunities granted to it by virtue of its status as
+C an Intergovernmental Organization or submit itself to any jurisdiction.
+C
+C ***************************** LICENSE END ************************************
+
+      SUBROUTINE SEQPOTT
+C
+C          COMPUTE SATURATED EQUIVALENT POTENTIAL TEMPERATURE
+C
+C        Input:
+C          Fieldset of temperature ( and LNSP if model levels)
+C              (lat/long grid)
+C          Indicator for pressure levels or model levels
+C
+C        Output:
+C          Fieldset of saturated equivalent potential temperature
+C              (lat/long grid)
+C
+C        Author:
+C          B. Norris,  March 1995
+C
+      use grib_api
+C
+      integer cputenv
+
+#ifdef __alpha
+      INTEGER*8 IGRIBT,ICNTT,IGRIBL,ICNTL,IGRIBP,JMGRIBB,IWORD
+#endif
+
+      real*8, allocatable :: TEMP(:)
+      real*8, allocatable :: RLNSP(:)
+      real*8, allocatable :: vertCoef(:)
+
+      LOGICAL NLMODLV,LOK,LEVEL
+      CHARACTER*4 YMODLV
+      integer  igrib_id_t, igrib_id_p
+      LOK=.FALSE.
+c
+c -------------------------------------------------------------------
+c
+C     GET FIELDSET OF TEMPERATURE
+
+      CALL mfi_get_fieldset(IGRIBT,ICNTT)
+
+C     TELLS WHETHER PRESSURE OR MODEL LEVELS
+
+      CALL MGETS (YMODLV)
+      IF(YMODLV(1:2).EQ.'ml'.OR.YMODLV(1:2).EQ.'ML') THEN
+           NLMODLV=.TRUE.
+      ELSEIF(YMODLV(1:2).EQ.'pl'.OR.YMODLV(1:2).EQ.'PL') THEN
+           NLMODLV=.FALSE.
+      !-- elseif?
+      ENDIF
+
+C     GET FIELDSET OF LNSP
+
+      IF(NLMODLV) CALL mfi_get_fieldset(IGRIBL,ICNTL)
+
+C     CREATE A NEW FIELDSET FOR POTENTIAL TEMPERATURE
+
+      CALL mfi_new_fieldset(IGRIBP)
+c
+c -------------------------------------------------------------------
+c
+C     LOOP ON FIELDS
+
+      ITCNT=0
+      ILCNT=0
+
+C       GET NEXT TEMPERATURE FROM FIELDSET
+
+  100 CONTINUE
+      ITCNT=ITCNT+1
+      IF(ITCNT.GT.ICNTT) GO TO 400
+
+      CALL mfi_load_one_grib(IGRIBT,igrib_id_t)
+
+      CALL grib_get_int( igrib_id_t, 'gridType', iGridType )
+      IF(iGridType.EQ.50) THEN
+ 	JJ=cputenv
+     +	('POTTF_ENV=T DATA REPRESENTATION CAN NOT BE SPECTRAL')
+	RETURN
+      ENDIF
+
+      CALL grib_get_int( igrib_id_t, 'level', NLVELR )
+
+      CALL grib_get_size( igrib_id_t, 'values', NLATLON )
+      allocate( TEMP( NLATLON ) )
+      CALL grib_get_real8_array( igrib_id_t, 'values', TEMP )
+
+C       GET NEXT LNSP FROM FIELDSET
+
+  200 CONTINUE
+      IF(NLMODLV.AND..NOT.LOK) THEN
+         ILCNT=ILCNT+1
+         IF(ILCNT.GT.ICNTL) GO TO 400
+
+         CALL mfi_load_one_grib(IGRIBL,igrib_id_p)
+
+         CALL grib_get_int( igrib_id_p,
+     x               'numberOfVerticalCoordinateValues', ILENV1 )
+         allocate( vertCoef( ILENV1 ) )
+         CALL grib_get_real8_array( igrib_id_p, 'pv', vertCoef )
+
+         CALL grib_get_size( igrib_id_p, 'values', NLATLON )
+         allocate( RLNSP( NLATLON ) )
+         CALL grib_get_real8_array( igrib_id_p, 'values', RLNSP )
+      ENDIF
+
+C           CHECK T AND LNSP CONSISTENT IF MODEL LEVELS
+
+      IF(NLMODLV) THEN
+         LEVEL=.FALSE.
+
+         CALL TLVALID (igrib_id_t,igrib_id_p,
+     X                 LEVEL,LOK)
+         IF(LOK) THEN
+              GO TO 300
+         ELSE
+              GO TO 200
+         ENDIF
+      ENDIF
+  300 CONTINUE
+c
+c -------------------------------------------------------------------
+c
+C           COMPUTE SATURATED EQUIVALENT POTENTIAL TEMPERATURE
+
+      CALL grib_get_int( igrib_id_t, 'dataDate', IDATE )
+
+C
+      CALL SATEQT (TEMP,RLNSP,NLMODLV,NLVELR,NLATLON,vertCoef,
+     X             ILENV1,IDATE)
+
+      CALL grib_set_int( igrib_id_t, 'paramId', 5 )
+
+      TMIN=1.0E10
+      TMAX=-1.0E10
+      DO 302 KD=1,NLATLON
+      IF(TEMP(KD).LT.TMIN) TMIN=TEMP(KD)
+      IF(TEMP(KD).GT.TMAX) TMAX=TEMP(KD)
+  302 CONTINUE
+      WRITE (*,*) ' TMIN ',TMIN,' TMAX ',TMAX
+
+!     -- encode the computed field TEMP --
+
+      CALL grib_set_real8_array( igrib_id_t, 'values', TEMP )
+
+C          ADD TO FIELDSET
+
+      CALL mfi_save_grib(IGRIBP,igrib_id_t)
+
+      deallocate( TEMP )
+
+      GO TO 100
+c
+c -------------------------------------------------------------------
+c
+  400 CONTINUE
+
+
+      IF(NLMODLV) deallocate( RLNSP )
+
+
+C     SET RESULT
+      CALL mfi_return_fieldset(IGRIBP)
+
+C      WRITE (*,'(A)') '  END OF SEQPOTT '
+
+      RETURN
+      END
+
+c CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+      SUBROUTINE SATEQT(T,PS,NLMODLV,NLVELR,NLATLON,FVERTB,
+     +                  NVERT,IDATE)
+C
+C     THIS SUBROUTINE CALCULATES THE SATURATION EQUIVALENT POTENTIAL
+C     TEMPERATURE FROM THE TEMPERATURE ON PRESSURE LEVELS.
+C     THE VALUE FOR CI IS FROM MARTIN MILLER & ALAN BETTS
+C
+C     INPUT :
+C     T           : TEMPERATURE
+C     PS          : LOG SURFACE PRESSURE
+C     NLMODLV     : T - MODEL LEVELS, F - PRESSURE LEVELS
+C     NLVELR      : LEVEL
+C     NLATLON     : GRID POINTS (LAT X LON)
+C     FVERTB      : VERTICAL COORDINATE ARRAY
+C     NVERT       : LENGTH OF THE DATA IN THE ARRAY FVERTB
+C     IDATE       : DATE (YYMMDD)
+C
+C     OUTPUT :
+C     T           : SATURATION EQUIVALENT POTENTIAL TEMPERATURE
+C
+C     MODIFICATION:
+C     B. NORRIS  13/07/94  CONVERT MODEL LEVEL TO PRESSURE IN
+C                            COMPUTATION
+C
+      INTEGER     NLVELR,NLATLON,NVERT
+      DIMENSION   T(*),PS(*),FVERTB(*)
+      LOGICAL     NLMODLV
+
+      REAL  PML,SSHM
+      LOGICAL     ILOLDM
+C
+C
+      CI=2710.
+      RD=287.05
+      CP=1005.46
+
+      ILOLDM = .FALSE.
+      IF(IDATE.LT.19830421) ILOLDM = .TRUE.
+
+      IF (.NOT.NLMODLV) THEN
+         XPK = (1000./FLOAT(NLVELR))**(RD/CP)
+         DO 10 J=1,NLATLON
+C           CALCULATE THE SATURATION SPECIFIC HUMIDITY
+            SATHUM = SSHM(T(J),FLOAT(NLVELR),ILOLDM)
+C           CALCULATE THE SATURATION EQUIVALENT POTENTIAL TEMPERATURE
+            T(J) = T(J)*XPK*EXP(SATHUM*CI/T(J))
+ 10      CONTINUE
+      ELSE
+         DO 20 J=1,NLATLON
+            PMB=PML(PS(J),NLVELR,FVERTB,NVERT)*.01
+            XPK = (1000./PMB)**(RD/CP)
+C           CALCULATE THE SATURATION SPECIFIC HUMIDITY
+            SATHUM = SSHM(T(J),PMB,ILOLDM)
+C           CALCULATE THE SATURATION EQUIVALENT POTENTIAL TEMPERATURE
+            T(J) = T(J)*XPK*EXP(SATHUM*CI/T(J))
+ 20      CONTINUE
+      ENDIF
+C
+      RETURN
+      END
diff --git a/src/PottF/sshm.F b/src/PottF/sshm.F
new file mode 100644
index 0000000..b7f0b94
--- /dev/null
+++ b/src/PottF/sshm.F
@@ -0,0 +1,45 @@
+C **************************** LICENSE START ***********************************
+C
+C Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+C of the Apache License version 2.0. In applying this license, ECMWF does not
+C waive the privileges and immunities granted to it by virtue of its status as
+C an Intergovernmental Organization or submit itself to any jurisdiction.
+C
+C ***************************** LICENSE END ************************************
+
+      FUNCTION SSHM(T,PMB,KLOLDM)
+C
+C     THIS FUNCTION RETURNS THE SATURATION SPECIFIC HUMIDITY GIVEN
+C     T (K) AND P (MB)
+C     THE FORMULA AND CONSTANTS USED ARE TAKEN FROM THE ECMWF FORECAST
+C     MODEL DOCUMENTATION MANUAL VOL.I-8/79, PAGE 2.34
+C
+      LOGICAL KLOLDM
+
+      T0=273.16
+      RD=287.05
+      RV=461.51
+      EP = RD/RV
+      PR = 100.*PMB
+C
+C     CALCULATE THE SATURATION WATER VAPOUR PRESSURE
+C
+      IF(T.GE.T0 .OR. KLOLDM ) THEN
+         A = 17.269
+         B = 35.86
+      ELSE
+         A = 21.875
+         B =  7.66
+      ENDIF
+      SWVP = 610.78*EXP(A*(T-T0)/(T-B))
+C
+C     CALCULATE THE SATURATION SPECIFIC HUMIDITY
+C
+      IF( KLOLDM ) THEN
+         SSHM = EP*SWVP/PR
+      ELSE
+         SSHM = EP*SWVP/( PR - (1.-EP)*SWVP )
+      ENDIF
+
+      RETURN
+      END
diff --git a/src/PottF/tlvalid.F b/src/PottF/tlvalid.F
new file mode 100644
index 0000000..04d8c4e
--- /dev/null
+++ b/src/PottF/tlvalid.F
@@ -0,0 +1,91 @@
+C **************************** LICENSE START ***********************************
+C
+C Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+C of the Apache License version 2.0. In applying this license, ECMWF does not
+C waive the privileges and immunities granted to it by virtue of its status as
+C an Intergovernmental Organization or submit itself to any jurisdiction.
+C
+C ***************************** LICENSE END ************************************
+
+      SUBROUTINE TLVALID ( igrib_id1, igrib_id2,
+     X                     LEVEL, LOK )
+C
+C          CHECK THAT GRIB SECTIONS 1 AND 2 ARE THE SAME
+C          FOR 2 FIELDS EXCEPT FOR:
+C              PARAMETER CODE
+C              LEVEL (IF LOGICAL LEVEL IS FALSE)
+C          RETURN LOGICAL LOK AS FALSE IF NO MATCH
+C
+C
+      LOGICAL LOK,LEVEL,lcheck
+      LOK=.TRUE.
+C
+C -------------------------------------------------------------------
+C
+
+      IF( .NOT. lcheck( igrib_id1, igrib_id2,
+     x                 'numberOfPoints' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2, 'Ni' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2, 'Nj' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2,
+     x                'latitudeOfFirstGridPointInDegrees' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2,
+     x                'longitudeOfFirstGridPointInDegrees' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2,
+     x                'scanningMode' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2, 'gridType' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2, 'dataDate' )) goto 13
+      IF( .NOT. lcheck( igrib_id1, igrib_id2, 'time' )) goto 13
+
+      IF(LEVEL) THEN
+         IF( .NOT. lcheck( igrib_id1, igrib_id2, 'levtype' )) goto 13
+         IF( .NOT. lcheck( igrib_id1, igrib_id2, 'level' )) goto 13
+      ENDIF
+
+!      DO 111 K=1,5
+!      IF(ISEC1T(K).NE.ISEC1L(K)) GO TO 300
+!  111 CONTINUE
+!      IF(ISEC1T(7).NE.ISEC1L(7)) GO TO 300
+!      IF(LEVEL) THEN
+!           IF(ISEC1T(8).NE.ISEC1L(8)) GO TO 300
+!      ENDIF
+!      DO 112 K=9,24
+!      IF(ISEC1T(K).NE.ISEC1L(K)) GO TO 300
+!  112 CONTINUE
+!C
+!      DO 122 K=1,12
+!      IF(ISEC2T(K).NE.ISEC2L(K)) GO TO 300
+!  122 CONTINUE
+!C
+!      DO 132 K=1,ISEC2T(12)+10
+!      IF(ZSEC2T(K).NE.ZSEC2L(K)) GO TO 300
+!  132 CONTINUE
+C
+      RETURN
+C
+C -------------------------------------------------------------------
+C
+   13 CONTINUE
+      LOK=.FALSE.
+      RETURN
+      END
+
+      LOGICAL FUNCTION lcheck( igrib_id1, igrib_id2, cname )
+
+      use grib_api
+
+      CHARACTER*(*) cname
+      INTEGER ival1, ival2
+      CHARACTER*(72) cerrmsg
+
+      lcheck = .TRUE.
+      CALL grib_get_int( igrib_id1, cname, ival1 )
+      CALL grib_get_int( igrib_id2, cname, ival2 )
+      IF( ival1 .ne. ival2 ) THEN
+         cerrmsg = 'POTTF_ENV=Input fields not consistent: ' // cname
+         JJ=cputenv( cerrmsg )
+         lcheck = .FALSE.
+      ENDIF
+
+      RETURN
+      END
diff --git a/src/Reprojection/Makefile.am b/src/Reprojection/Makefile.am
new file mode 100644
index 0000000..53538c2
--- /dev/null
+++ b/src/Reprojection/Makefile.am
@@ -0,0 +1,38 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+bin_PROGRAMS = bin/Reprojection
+
+bin_Reprojection_SOURCES = Reprojection.cc ReprojectService.cc
+
+#bin_Reprojection_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_Reprojection_CPPFLAGS = $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS) -DNOMETVIEW_QT
+bin_Reprojection_LDFLAGS  =  $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_Reprojection_LDADD    = $(LDADD) $(MAGPLUS_LIB) $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB) $(ODB_LIBS) $(QT_LIBS)
+bin_Reprojection_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.Reprojection \
+		 $(local_sharedir)/ReprojectionDef  \
+		 $(local_sharedir)/ReprojectionRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} REPROJECTION.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/REPROJECTION.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.Reprojection ReprojectionDef ReprojectionRules REPROJECTION.xpm Reprojection.h ReprojectService.h
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Reprojection/Makefile.in b/src/Reprojection/Makefile.in
new file mode 100644
index 0000000..9f9ba5f
--- /dev/null
+++ b/src/Reprojection/Makefile.in
@@ -0,0 +1,844 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/Reprojection$(EXEEXT)
+subdir = src/Reprojection
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Reprojection_OBJECTS = bin_Reprojection-Reprojection.$(OBJEXT) \
+	bin_Reprojection-ReprojectService.$(OBJEXT)
+bin_Reprojection_OBJECTS = $(am_bin_Reprojection_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_Reprojection_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_Reprojection_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Reprojection_SOURCES)
+DIST_SOURCES = $(bin_Reprojection_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+bin_Reprojection_SOURCES = Reprojection.cc ReprojectService.cc
+
+#bin_Reprojection_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+bin_Reprojection_CPPFLAGS = $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS) -DNOMETVIEW_QT
+bin_Reprojection_LDFLAGS = $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_Reprojection_LDADD = $(LDADD) $(MAGPLUS_LIB) $(STANDARD_METVIEW_LIBS) $(FLIBS) $(METVIEW_UTIL_LIB) $(ODB_LIBS) $(QT_LIBS)
+bin_Reprojection_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.Reprojection \
+		 $(local_sharedir)/ReprojectionDef  \
+		 $(local_sharedir)/ReprojectionRules
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/REPROJECTION.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.Reprojection ReprojectionDef ReprojectionRules REPROJECTION.xpm Reprojection.h ReprojectService.h
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Reprojection/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Reprojection/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Reprojection$(EXEEXT): $(bin_Reprojection_OBJECTS) $(bin_Reprojection_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Reprojection$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_Reprojection_LINK) $(bin_Reprojection_OBJECTS) $(bin_Reprojection_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Reprojection-ReprojectService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Reprojection-Reprojection.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_Reprojection-Reprojection.o: Reprojection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Reprojection-Reprojection.o -MD -MP -MF $(DEPDIR)/bin_Reprojection-Reprojection.Tpo -c -o bin_Reprojection-Reprojection.o `test -f 'Reprojection.cc' || echo '$(srcdir)/'`Reprojection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Reprojection-Reprojection.Tpo $(DEPDIR)/bin_Reprojection-Reprojection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Reprojection.cc' object='bin_Reprojection-Reprojection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Reprojection-Reprojection.o `test -f 'Reprojection.cc' || echo '$(srcdir)/'`Reprojection.cc
+
+bin_Reprojection-Reprojection.obj: Reprojection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Reprojection-Reprojection.obj -MD -MP -MF $(DEPDIR)/bin_Reprojection-Reprojection.Tpo -c -o bin_Reprojection-Reprojection.obj `if test -f 'Reprojection.cc'; then $(CYGPATH_W) 'Reprojection.cc'; else $(CYGPATH_W) '$(srcdir)/Reprojection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Reprojection-Reprojection.Tpo $(DEPDIR)/bin_Reprojection-Reprojection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Reprojection.cc' object='bin_Reprojection-Reprojection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Reprojection-Reprojection.obj `if test -f 'Reprojection.cc'; then $(CYGPATH_W) 'Reprojection.cc'; else $(CYGPATH_W) '$(srcdir)/Reprojection.cc'; fi`
+
+bin_Reprojection-ReprojectService.o: ReprojectService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Reprojection-ReprojectService.o -MD -MP -MF $(DEPDIR)/bin_Reprojection-ReprojectService.Tpo -c -o bin_Reprojection-ReprojectService.o `test -f 'ReprojectService.cc' || echo '$(srcdir)/'`ReprojectService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Reprojection-ReprojectService.Tpo $(DEPDIR)/bin_Reprojection-ReprojectService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ReprojectService.cc' object='bin_Reprojection-ReprojectService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Reprojection-ReprojectService.o `test -f 'ReprojectService.cc' || echo '$(srcdir)/'`ReprojectService.cc
+
+bin_Reprojection-ReprojectService.obj: ReprojectService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Reprojection-ReprojectService.obj -MD -MP -MF $(DEPDIR)/bin_Reprojection-ReprojectService.Tpo -c -o bin_Reprojection-ReprojectService.obj `if test -f 'ReprojectService.cc'; then $(CYGPATH_W) 'ReprojectService.cc'; else $(CYGPATH_W) '$(srcdir)/ReprojectService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Reprojection-ReprojectService.Tpo $(DEPDIR)/bin_Reprojection-ReprojectService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ReprojectService.cc' object='bin_Reprojection-ReprojectService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Reprojection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Reprojection-ReprojectService.obj `if test -f 'ReprojectService.cc'; then $(CYGPATH_W) 'ReprojectService.cc'; else $(CYGPATH_W) '$(srcdir)/ReprojectService.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} REPROJECTION.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Reprojection/ObjectSpec.Reprojection b/src/Reprojection/ObjectSpec.Reprojection
new file mode 100644
index 0000000..12e75e8
--- /dev/null
+++ b/src/Reprojection/ObjectSpec.Reprojection
@@ -0,0 +1,27 @@
+
+#####################################################################
+#
+#	ObjectSpec.Reprojection
+#
+
+object,
+    class             = REPROJECTION,
+    can_be_created    = True,
+    definition_file   = '$METVIEW_DIR_SHARE/etc/ReprojectionDef',
+    rules_file        = '$METVIEW_DIR_SHARE/etc/ReprojectionRules',
+    default_name      = Reprojection,
+    help_page	      = Reprojection,
+    type              = Data,
+    expand            = 67, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS
+    macro             = reprojection,
+    editor_type       = SimpleEditor,
+    pixmap            = '$METVIEW_DIR_SHARE/icons/REPROJECTION.icon'
+
+state,
+	class    = REPROJECTION,
+	output_class = GRIB,
+        service  = Reprojection
+
+service,
+        name=Reprojection,
+        cmd= "$metview_command $METVIEW_BIN/Reprojection"
diff --git a/src/Reprojection/REPROJECTION.xpm b/src/Reprojection/REPROJECTION.xpm
new file mode 100644
index 0000000..137d788
--- /dev/null
+++ b/src/Reprojection/REPROJECTION.xpm
@@ -0,0 +1,257 @@
+/* XPM */
+static char * web1_xpm[] = {
+"32 32 222 2",
+"  	c #FFFFFFFFFFFF",
+". 	c #FFFFFFFFFFFF",
+"X 	c #E0E0E8E8F0F0",
+"o 	c #E8E8F0F0F8F8",
+"O 	c #F0F0F0F0F8F8",
+"+ 	c #F0F0F0F0F0F0",
+"@ 	c #D0D0D8D8E8E8",
+"# 	c #8888A8A8D8D8",
+"$ 	c #A0A0C0C0E0E0",
+"% 	c #8888B8B8E0E0",
+"& 	c #38388888C8C8",
+"* 	c #48489090D0D0",
+"= 	c #5050A0A0D0D0",
+"- 	c #6060A8A8D0D0",
+"; 	c #B0B0D0D0E8E8",
+": 	c #D0D0E0E0E8E8",
+"> 	c #E0E0F0F0F0F0",
+", 	c #D8D8E0E0F0F0",
+"< 	c #78789898C8C8",
+"1 	c #30307070B8B8",
+"2 	c #58589090C8C8",
+"3 	c #A0A0C8C8E8E8",
+"4 	c #48489898D0D0",
+"5 	c #6868A8A8D0D0",
+"6 	c #7878B8B8D0D0",
+"7 	c #8888C0C0D0D0",
+"8 	c #A8A8D0D0D8D8",
+"9 	c #B8B8C0C0E0E0",
+"0 	c #40407070B8B8",
+"q 	c #18185858B0B0",
+"w 	c #20207070C0C0",
+"e 	c #A8A8C8C8E8E8",
+"r 	c #6060A0A0D8D8",
+"t 	c #40409090D0D0",
+"y 	c #9898C8C8D0D0",
+"u 	c #C8C8E0E0E0E0",
+"i 	c #A8A8D0D0D0D0",
+"p 	c #D8D8E8E8E8E8",
+"a 	c #B0B0C0C0E0E0",
+"s 	c #38386868B0B0",
+"d 	c #7878A0A0D0D0",
+"f 	c #60609090D0D0",
+"g 	c #58589090D0D0",
+"h 	c #5858A8A8D0D0",
+"j 	c #7070B0B0D0D0",
+"k 	c #9090C0C0D0D0",
+"l 	c #B0B0D8D8D8D8",
+"z 	c #D0D0E0E0E0E0",
+"x 	c #E0E0F0F0E8E8",
+"c 	c #C0C0E0E0E0E0",
+"v 	c #C0C0D8D8E0E0",
+"b 	c #C0C0D0D0E8E8",
+"n 	c #28285858B0B0",
+"m 	c #10105050B0B0",
+"M 	c #40407878C0C0",
+"N 	c #9898B8B8E0E0",
+"B 	c #D0D0E0E0F0F0",
+"V 	c #B8B8D0D0E8E8",
+"C 	c #7070A8A8D8D8",
+"Z 	c #6060A8A8D8D8",
+"A 	c #8080B8B8D0D0",
+"S 	c #A0A0C8C8D0D0",
+"D 	c #E8E8F0F0F0F0",
+"F 	c #D8D8E8E8E0E0",
+"G 	c #A0A0C8C8C8C8",
+"H 	c #8080B8B8C8C8",
+"J 	c #D0D0E8E8E8E8",
+"K 	c #F0F0F8F8F8F8",
+"L 	c #40406868B0B0",
+"P 	c #10104848A8A8",
+"I 	c #20206060B8B8",
+"U 	c #30307878C0C0",
+"Y 	c #B8B8D8D8E8E8",
+"T 	c #C8C8E0E0F0F0",
+"R 	c #D8D8E8E8F0F0",
+"E 	c #F0F0F8F8F0F0",
+"W 	c #C8C8E0E0D8D8",
+"Q 	c #9898A8A8D0D0",
+"! 	c #10104848A0A0",
+"~ 	c #10105050A8A8",
+"^ 	c #20206868B8B8",
+"/ 	c #48488888D0D0",
+"( 	c #48489898D8D8",
+") 	c #40409898D0D0",
+"_ 	c #6868B0B0D0D0",
+"` 	c #C0C0E0E0D8D8",
+"' 	c #E0E0F0F0E0E0",
+"] 	c #E8E8F0F0E8E8",
+"[ 	c #A8A8D0D0E0E0",
+"{ 	c #60608080C0C0",
+"} 	c #08084040A0A0",
+"| 	c #18186060B8B8",
+" .	c #20206868C0C0",
+"..	c #60609898D0D0",
+"X.	c #38389090D0D0",
+"o.	c #9090C0C0C8C8",
+"O.	c #B0B0D0D0D0D0",
+"+.	c #D0D0E8E8D8D8",
+"@.	c #C0C0D8D8D8D8",
+"#.	c #7878B8B8C8C8",
+"$.	c #9090A0A0D0D0",
+"%.	c #7070A0A0D8D8",
+"&.	c #A0A0C0C0E8E8",
+"*.	c #40409898D8D8",
+"=.	c #4848A0A0D8D8",
+"-.	c #8888C0C0C8C8",
+";.	c #A0A0D0D0C0C0",
+":.	c #B0B0D0D0C8C8",
+">.	c #B0B0D8D8C8C8",
+",.	c #B8B8D8D8D8D8",
+"<.	c #7070B0B0C8C8",
+"1.	c #E0E0F0F0F8F8",
+"2.	c #30306060B0B0",
+"3.	c #9898B0B0D8D8",
+"4.	c #30306868B8B8",
+"5.	c #7878A8A8D8D8",
+"6.	c #9090B8B8E0E0",
+"7.	c #38388888D0D0",
+"8.	c #40409090D8D8",
+"9.	c #B0B0D0D0B8B8",
+"0.	c #E8E8F0F0A0A0",
+"q.	c #C8C8E0E0B0B0",
+"w.	c #9898C8C8C8C8",
+"e.	c #9090C8C8C8C8",
+"r.	c #B0B0D0D0D8D8",
+"t.	c #6868B0B0D8D8",
+"y.	c #B0B0D8D8F0F0",
+"u.	c #A8A8D0D0E8E8",
+"i.	c #38386868B8B8",
+"p.	c #A8A8C0C0E0E0",
+"a.	c #60609090C8C8",
+"s.	c #8080B0B0D8D8",
+"d.	c #38389090D8D8",
+"f.	c #A8A8D0D0B8B8",
+"g.	c #F0F0F8F89898",
+"h.	c #8888C0C0E0E0",
+"j.	c #B8B8D8D8F0F0",
+"k.	c #6868B0B0E0E0",
+"l.	c #7878B0B0E0E0",
+"z.	c #08084848A8A8",
+"x.	c #28286060B8B8",
+"c.	c #8080B0B0E0E0",
+"v.	c #30308888D0D0",
+"b.	c #6868B0B0C8C8",
+"n.	c #A0A0C8C8E0E0",
+"m.	c #B0B0D8D8E8E8",
+"M.	c #5858A8A8D8D8",
+"N.	c #6868A8A8E0E0",
+"B.	c #08083838A0A0",
+"V.	c #68689898D0D0",
+"C.	c #C0C0D8D8F0F0",
+"Z.	c #7070A8A8E0E0",
+"A.	c #50509898D8D8",
+"S.	c #8080B8B8E0E0",
+"D.	c #9898C0C0E8E8",
+"F.	c #C0C0E0E0F0F0",
+"G.	c #D8D8E8E8F8F8",
+"H.	c #9090C0C0E8E8",
+"J.	c #6868A8A8D8D8",
+"K.	c #28287878C8C8",
+"L.	c #30308080C8C8",
+"P.	c #50509898C8C8",
+"I.	c #6868A8A8C0C0",
+"U.	c #6060A8A8C8C8",
+"Y.	c #7878B8B8E0E0",
+"T.	c #50508888C8C8",
+"R.	c #28287070C0C0",
+"E.	c #40408888C8C8",
+"W.	c #8080B0B0B8B8",
+"Q.	c #9090C0C0B8B8",
+"!.	c #5858A0A0C8C8",
+"~.	c #30308080D0D0",
+"^.	c #C8C8D0D0E8E8",
+"/.	c #50507878B8B8",
+"(.	c #38387070C0C0",
+").	c #48488888C0C0",
+"_.	c #8888B8B8B0B0",
+"`.	c #9090C0C0B0B0",
+"'.	c #6868A0A0C0C0",
+"].	c #7878A0A0D8D8",
+"[.	c #E8E8E8E8F0F0",
+"{.	c #80809898C8C8",
+"}.	c #70709090C8C8",
+"|.	c #48488080C8C8",
+" X	c #30307878B8B8",
+".X	c #7070A0A0B0B0",
+"XX	c #8888B0B0B0B0",
+"oX	c #8080B0B0B0B0",
+"OX	c #58589898D8D8",
+"+X	c #30307878C8C8",
+"@X	c #8080A8A8D8D8",
+"#X	c #B8B8C8C8E0E0",
+"$X	c #C8C8D8D8E8E8",
+"%X	c #9090A8A8D0D0",
+"&X	c #A0A0B0B0D8D8",
+"*X	c #58588080C0C0",
+"=X	c #20205858B0B0",
+"-X	c #8080A0A0D0D0",
+";X	c #68689090C8C8",
+":X	c #48488080B8B8",
+">X	c #38387878B8B8",
+",X	c #8888B0B0E0E0",
+"<X	c #70709898D0D0",
+"1X	c #68688888C0C0",
+"2X	c #10104040A0A0",
+"3X	c #48487878C0C0",
+"4X	c #20206060B0B0",
+"5X	c #28286868C0C0",
+"6X	c #A0A0B8B8E0E0",
+"7X	c #28286060B0B0",
+"8X	c #000038389898",
+"9X	c #18184848A8A8",
+"0X	c #A0A0B8B8D8D8",
+"qX	c #B0B0C8C8E0E0",
+"wX	c #58588888C8C8",
+"eX	c #9090A8A8D8D8",
+"rX	c #9090B0B0D8D8",
+"tX	c #48487070B8B8",
+"yX	c #30306060B8B8",
+"uX	c #60608888C8C8",
+"iX	c #18185050A8A8",
+"pX	c #00003838A0A0",
+"                                                                ",
+"                                                                ",
+"                                                      .         ",
+"                  X   o O O X +                                 ",
+"                  @ # $ % & * = - ; : >                         ",
+"            X , < 1 2 3 & 4 = 5 6 7 : 8 8 >                     ",
+"          o 9 0 q w e r t = - 6 y 8 u > i y p                   ",
+"        @ a s d f g 3 * 4 h j k l z x + p z c v                 ",
+"      X b n m M N B V C Z - A S u D       F G H J               ",
+"      K L P q I U V 3 3 Y T R > D       E W G H 6 K             ",
+"    X Q ! ~ q ^ / 3 ( ) = _ A S ` ' + ] D W G H _ [             ",
+"    X { } m |  ...3 X.) = - 6 o.O.W +.+.x @.o.#.- Z   K         ",
+"    X $.n m |  .%.&.X.*.=.h _ -.;.:.>.>.F ,.H <.h Z 1.          ",
+"    X 2.3.4.|  .5.6.7.8.( = - 9.0.q.w.e.c r.<.- t.y.u.          ",
+"    X } i.p.a.w s.% 7.d.*.=.h f.g.q.#.#.[ [ - h.j.k.l.          ",
+"    X } z.x.N N $ c.v.X.8.( =.h <.b.- - n.Y ; m.M.*.N.          ",
+"    X B.z.m q V.C.B 3 Z.A.( *.( M.Z h.m.R B S.( *.8.Z O         ",
+"    X B.z.~ q | 5.&.C D.j.F.G.G.T F.u.S.; H.*.*.d.d.J.O         ",
+"    X } } P m | V.N K.L.v.P.I.U.*.*.*.*.3 Y.d.d.7.v.s.O         ",
+"    X { } z.~ q T.N R.K.E.W.Q.Q.!.d.d.d.3 N.7.v.~.K.^.          ",
+"    X a /.} z.~ (.N U w )._._.`.'.v.v.8.3 A.L.K.R.].[.          ",
+"      X {.}.P z.q 3.|.^  X.XXXoX).K.K.OX&.+XR.R. at X#X            ",
+"      $X%X/.&X*X=X-X;Xq | 1 :X>XR.w w %.,XU V.$ <X,             ",
+"        K 1X2X< 3.3.#X3X4XI | | ^ 5XT.V 6XN -X7X#XK             ",
+"            { 8X9X/.b 0X0X6Xa qX6X6Xp.$XwX=Xq 0X                ",
+"              eX! 8XL %X} z.z.P P P rXtX} yX^.                  ",
+"              O o uXiX}.{ 8XpX} } 1X}.7XeX  O                   ",
+"                    o qXp.# 0 0 eXqX^.K                         ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/src/Reprojection/ReprojectService.cc b/src/Reprojection/ReprojectService.cc
new file mode 100644
index 0000000..54a17a2
--- /dev/null
+++ b/src/Reprojection/ReprojectService.cc
@@ -0,0 +1,150 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <ReprojectService.h>
+
+#include <GribDecoder.h>
+#include <GeoRectangularProjection.h>
+#include <LegendVisitor.h>
+#include <ImagePlotting.h>
+#include <GribSatelliteInterpretor.h>
+#include <PaperPoint.h>
+
+ReprojectService::ReprojectService(string in,string out,double rx,double ry,double x1,double x2,double y1,double y2):
+	gribIn_(in),
+	gribOut_(out),
+	resX_(rx),
+	resY_(ry),
+	x1_(x1),
+	x2_(x2),
+	y1_(y1),
+	y2_(y2)
+{
+     //empty
+}
+
+bool
+ReprojectService::execute()
+{
+     magics::GribDecoder grib;
+
+     magics::ParameterManager::set("subpage_lower_left_latitude",y1_);
+     magics::ParameterManager::set("subpage_upper_right_latitude",y2_);
+     magics::ParameterManager::set("subpage_lower_left_longitude",x1_);
+     magics::ParameterManager::set("subpage_upper_right_longitude",x2_);
+     magics::GeoRectangularProjection projection; // fixed for now!
+       
+     magics::ImagePlotting tool;
+     grib.file_name_ = gribIn_;
+     grib.open();
+     magics::GribSatelliteInterpretor gribInterpreter;
+     magics::GeoRectangularProjection transformation;
+     magics::RasterData rdin;  //input data
+     gribInterpreter.interpretAsRaster(grib, rdin, transformation);
+//     RasterData<GeoPoint>& rdin = grib.raster();  //input data
+     RasterData  rdout;                 //output data
+
+     if ( !tool.reproject(rdin,rdout, projection, resX_, resY_) )
+     {
+	      MagLog::dev() << "ERROR: ImagePlotting<P>::createOutputRaster:" << tool << "\n";
+	      return false;
+     }
+
+     if ( !gribit(rdout) ) {
+            cout << "Grib OK!\n";
+	    return true;
+     }
+     else {
+            cout << "request failed!\n";
+	    return false;
+     }
+}
+
+int
+ReprojectService::gribit(RasterData& image)
+{
+    // copy from examples of the grib_api!
+      int ret=0;
+      grib_handle* h;
+      double* values;
+      long numberOfPointsAlongAParallel,numberOfPointsAlongAMeridian,numberOfPoints,i,j,k;
+
+      //int option_flags = GRIB_DUMP_FLAG_VALUES | 
+	  //    //GRIB_DUMP_FLAG_OPTIONAL | 
+	  //    GRIB_DUMP_FLAG_READ_ONLY;
+
+      double missingValueInGrib;
+      const double missingValueInImage = 65535;  // -1 as an unsigned short.
+                                                 // Set in TeDecoderMemory::resetMemory()
+                                                 // and TeRasterParams.h. Missing values in the
+                                                 // 'image' variable will be set to this.
+                                                 // NOTE: this could change if the data type
+                                                 // in ImagePlotting is changed from TeUNSIGNEDSHORT.
+
+      h = grib_handle_new_from_template(0,"GRIB1");
+      if(!h) {
+	      printf("ERROR: Unable to create grib handle\n");
+	      return 1;
+      }
+
+      grib_get_double(h, "missingValue", &missingValueInGrib);
+      grib_set_long  (h, "bitmapPresent", 1); // tell the GRIB that it will contain missing values
+
+      // Set bounding box
+      grib_set_double(h,"latitudeOfFirstGridPointInDegrees",image.getUpperRightCorner().y());
+      grib_set_double(h,"longitudeOfFirstGridPointInDegrees",image.getLowerLeftCorner().x());
+
+      grib_set_double(h,"latitudeOfLastGridPointInDegrees", image.getLowerLeftCorner().y());
+      grib_set_double(h,"longitudeOfLastGridPointInDegrees",image.getUpperRightCorner().x()); 
+
+      grib_set_double(h,"jDirectionIncrementInDegrees", resX_);
+      grib_set_double(h,"iDirectionIncrementInDegrees", resY_);
+
+      //Set matrix size
+      numberOfPointsAlongAParallel = image.getColumns();
+      numberOfPointsAlongAMeridian = image.getRows();
+      grib_set_long( h,"numberOfPointsAlongAParallel",numberOfPointsAlongAParallel);
+      grib_set_long( h,"numberOfPointsAlongAMeridian",numberOfPointsAlongAMeridian);
+
+      numberOfPoints=numberOfPointsAlongAMeridian*numberOfPointsAlongAParallel;
+      values=(double*)malloc(numberOfPoints*sizeof(double));
+      for (j=0;j < numberOfPointsAlongAMeridian;j++) {
+        for (i=0;i < numberOfPointsAlongAParallel;i++) {
+            k=i+numberOfPointsAlongAParallel*j;
+            if (image[k] != missingValueInImage)
+                values[k]=image[k];
+            else
+                values[k]=missingValueInGrib;
+	      }
+      }
+
+      grib_set_double_array( h,"values",values,numberOfPoints);
+
+      if (h) { 
+	       // grib_dump_content(h,stdout,"serialize",option_flags, 0);
+            FILE* out = fopen(gribOut_.c_str(),"w");
+            if(out){
+                const void* mesg;
+                size_t mesg_len;
+                grib_get_message(h,&mesg,&mesg_len);
+                fwrite(mesg,1,mesg_len,out);
+                fclose(out);
+            }
+            else{
+                perror(gribOut_.c_str());
+                return 1;
+            }
+      }
+      else {
+	      printf("Error: unable to create grib_handle\n");
+              return 1;
+      }
+
+      return 0;
+}
diff --git a/src/Reprojection/ReprojectService.h b/src/Reprojection/ReprojectService.h
new file mode 100644
index 0000000..0e0fee2
--- /dev/null
+++ b/src/Reprojection/ReprojectService.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef REPROJECTSERVICE_H
+#define REPROJECTSERVICE_H
+
+#include <iostream>
+#include <UserPoint.h>
+#include <RasterData.h>
+
+using namespace std;
+using namespace magics;
+
+
+class ReprojectService {
+
+public:
+
+     ReprojectService() {}
+     ReprojectService(string in,string out,double rx,double ry,double x1,double x2,double y1,double y2);
+
+     bool execute();
+     int gribit(RasterData& image);
+
+private:
+
+    string gribIn_;
+    string gribOut_;
+    double resX_,resY_;        //resolution
+    double x1_,x2_,y1_,y2_;    //geographical area
+};
+
+#endif
diff --git a/src/Reprojection/Reprojection.cc b/src/Reprojection/Reprojection.cc
new file mode 100644
index 0000000..f7548c3
--- /dev/null
+++ b/src/Reprojection/Reprojection.cc
@@ -0,0 +1,142 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Reprojection.h"
+#include "ReprojectService.h"
+#include "mars.h"
+
+Reprojection::Reprojection(const char* kw): MvService(kw)
+{
+//empty
+}
+
+Reprojection::~Reprojection()
+{
+//empty
+}
+
+void Reprojection::serve(MvRequest& in,MvRequest& out)
+{
+cout << "Reprojection::serve in" << endl;
+in.print();
+
+	// Get information from the user interface
+        if ( !GetInputInfo(in) ) return;
+
+	// Check input data
+	// Needs to be done
+
+	// Compute percentiles
+	if ( !ComputeReprojection(out) ) return;
+
+cout << "Reprojection::serve out" << endl;
+out.print();
+
+	return;
+}
+
+bool Reprojection::GetInputInfo(MvRequest& in)
+{
+	const char*   cw;    // auxiliary variables
+	int           i;     // auxiliary variables
+
+	// Get data information from UI
+	string str;
+	if ( (const char*)in("SOURCE") && (strcmp((const char*)in("SOURCE"),"OFF") && strcmp((const char*)in("SOURCE"),"off")) )
+	{
+		str = (const char*)in("SOURCE");
+		dataRequest_.setVerb("GRIB");
+		dataRequest_("PATH") = str.c_str();
+	}
+	else
+	{
+		// Get information from the icon
+		in.getValue(dataRequest_,"DATA");
+		if ( !in.countValues("DATA") || !dataRequest_.countValues("PATH") )
+		{
+			setError(1, "No Data files specified...");
+			return false;
+		}
+	}
+
+        // Get area
+	y1_ = in("AREA",0);
+	x1_ = in("AREA",1);
+	y2_ = in("AREA",2);
+	x2_ = in("AREA",3);
+
+#if 0
+	// Check if coordinates follow Mars rules (n/w/s/e)
+	if ( x1_ > x2_ )
+	{
+		double W = x1_;
+		x1_ = x2_;
+		x2_ = W;
+	}
+	if( y2_ > y1_ )
+	{
+		double W = y1_;
+		y1_ = y2_;
+		y2_ = W;
+	}
+#endif
+	// Get resolution
+	xres_ = in("RESOLUTION",0);
+	yres_ = ( in.countValues("RESOLUTION") == 1 ) ? xres_ : in("RESOLUTION",1);
+
+	// Get output projection
+        projectionOut_ = (const char*)in("PROJECTION");
+
+	// Get interpolation method
+        interp_ = strcmp((const char*)in("INTERPOLATION"),"NEAREST_NEIGHBOUR") ? REPROJ_LI : REPROJ_NN;
+
+	return true;
+}
+
+bool Reprojection::ComputeReprojection(MvRequest& out)
+{
+	string gin = (const char*)dataRequest_("PATH");
+	string gout = marstmp();
+
+	ReprojectService reps(gin,gout,xres_,yres_,x1_,x2_,y1_,y2_);
+	if ( !reps.execute() ) return false;
+
+	// Create fieldset request
+	MvRequest req("GRIB");
+	req("PATH") = gout.c_str();
+	req("TEMPORARY") = 1;
+
+	// Update output request
+	out = out + req;
+
+	return true;
+}
+//GRIB,
+//    PATH       = '/var...',
+//    TEMPORARY  = 1,
+//    OFFSET     = 0,
+//    LENGTH     = 87228
+
+
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	Reprojection reproj("REPROJECTION");
+
+	// The applications don't try to read or write from pool, this
+	// should not be done with the new PlotMod.
+	//a.addModeService("GRIB", "DATA");
+        //c.saveToPool(false);
+        //perc.saveToPool(false);
+
+	theApp.run();
+}
diff --git a/src/Reprojection/Reprojection.h b/src/Reprojection/Reprojection.h
new file mode 100644
index 0000000..d863c7b
--- /dev/null
+++ b/src/Reprojection/Reprojection.h
@@ -0,0 +1,56 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef REPROJECTION_H
+#define REPROJECTION_H
+
+/**************
+  Application Reprojection.
+
+  Reproject an input data to a selected output projection.
+***************/
+
+#include "Metview.h"
+#include "MvFieldSet.h"
+
+// Constants
+enum { REPROJ_NN, REPROJ_LI }; //interpolation: nearest neighbour/linear
+
+class Reprojection : public MvService {
+
+public:
+
+	// Constructor
+	Reprojection(const char* kw);
+
+	// Destructor
+	~Reprojection();
+
+	void serve(MvRequest&,MvRequest&);
+
+	// Initialize variables from user interface
+	bool GetInputInfo(MvRequest& in);
+
+	// Compute percentiles
+	bool ComputeReprojection(MvRequest&);
+
+	// Get values
+//	fortfloat GetValue(float rank, vector<fortfloat>& gvals);  
+
+protected:
+
+	// variables
+	MvRequest dataRequest_;        // input data request
+	fortint   interp_;             // interporlation method
+	fortfloat x1_, x2_, y1_, y2_;  // geographical coordinates
+	fortfloat xres_,yres_;         // x/y resolution
+	string    projectionOut_;      // output projection
+};
+
+#endif
diff --git a/src/Reprojection/ReprojectionDef b/src/Reprojection/ReprojectionDef
new file mode 100644
index 0000000..f4ceb98
--- /dev/null
+++ b/src/Reprojection/ReprojectionDef
@@ -0,0 +1,72 @@
+REPROJECTION; Reprojection Application
+{
+	SOURCE
+	{
+		OFF ; OFF
+		@
+	} = OFF
+
+	DATA
+		[ interface = icon, class = GRIB, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data for Reprojection,
+		  help_class      = RETRIEVE,
+		  help_definition = ( RETRIEVE,
+					TYPE = 'IM',
+					REPRES = 'SPACE_VIEW',
+					IDENT = 55,
+					DATE   = -2,
+					CHANNEL = 1
+					) ]
+	{ @ / }
+
+	AREA
+	[
+		help = help_input,
+		help_icon = 'help_map',
+		input_type = map,
+		input_window = '/Metview/Defaults/Input Window'
+	]
+	{
+		*
+		/
+        } = -90./-180./90./180
+
+	RESOLUTION
+	{
+		*
+		/
+	} = 1/1
+
+
+	PROJECTION
+	{
+		LATLONG
+	} = LATLONG
+
+	INTERPOLATION
+	{
+		NEAREST_NEIGHBOUR
+	} = NEAREST_NEIGHBOUR
+
+!the 2 parameters below is needed because MetviewUI is returning
+!them from the 'Enter Input: MAP' application
+
+	MAP_PROJECTION [ visible = false ]
+	{
+		CYLINDRICAL			; CYLINDRICAL
+		POLAR_STEREOGRAPHIC	        ; POLAR_STEREOGRAPHIC
+		MERCATOR			; MERCATOR
+		OCEAN_SECTION			; OCEAN_SECTION
+		AITOFF   			; AITOFF
+		LAMBERT  			; LAMBERT
+		NONE				; NONE
+	} = CYLINDRICAL
+
+	MAP_VERTICAL_LONGITUDE [ visible = false ]
+	{
+		*
+	} = 0
+
+}
diff --git a/src/Reprojection/ReprojectionRules b/src/Reprojection/ReprojectionRules
new file mode 100644
index 0000000..e69de29
diff --git a/src/Scm/Makefile.am b/src/Scm/Makefile.am
new file mode 100644
index 0000000..b697a28
--- /dev/null
+++ b/src/Scm/Makefile.am
@@ -0,0 +1,45 @@
+
+bin_PROGRAMS      = bin/ScmRun bin/ScmVisualiser
+
+#-------------------------------------------------
+
+bin_ScmRun_SOURCES = ScmRun.cc
+	
+bin_ScmRun_CPPFLAGS = -I../libUtil -I../libMetview
+bin_ScmRun_LDFLAGS  = 
+bin_ScmRun_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+bin_ScmRun_DEPENDENCIES = ../../lib/libUtil.a 
+
+bin_ScmVisualiser_SOURCES = ScmVisualiser.cc
+bin_ScmVisualiser_CPPFLAGS = -I../libUtil -I../libMetview
+bin_ScmVisualiser_LDFLAGS  = 
+bin_ScmVisualiser_LDADD    = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+bin_ScmVisualiser_DEPENDENCIES = ../../lib/libUtil.a 
+
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.Scm \
+	     $(local_sharedir)/ScmRunDef  $(local_sharedir)/ScmRunRules \
+	     $(local_sharedir)/ScmVisualiserDef $(local_sharedir)/ScmVisualiserRules \
+	     $(local_sharedir)/ScmVisualiserInput1dVars $(local_sharedir)/ScmVisualiserInput2dVars \
+	     $(local_sharedir)/ScmVisualiserOutput1dVars $(local_sharedir)/ScmVisualiserOutput2dVars
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+CLEANFILES = $(share_DATA)
+
+BUILT_SOURCES = bin 
+
+EXTRA_DIST = ObjectSpec.Scm  \
+	     ScmRunDef ScmRunRules ScmVisualiserDef ScmVisualiserRules \
+	     ScmVisualiserInput1dVars ScmVisualiserInput2dVars ScmVisualiserOutput1dVars ScmVisualiserOutput2dVars
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Scm/Makefile.in b/src/Scm/Makefile.in
new file mode 100644
index 0000000..ae7b0b3
--- /dev/null
+++ b/src/Scm/Makefile.in
@@ -0,0 +1,747 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/ScmRun$(EXEEXT) bin/ScmVisualiser$(EXEEXT)
+subdir = src/Scm
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_ScmRun_OBJECTS = bin_ScmRun-ScmRun.$(OBJEXT)
+bin_ScmRun_OBJECTS = $(am_bin_ScmRun_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_ScmRun_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_ScmRun_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_ScmVisualiser_OBJECTS =  \
+	bin_ScmVisualiser-ScmVisualiser.$(OBJEXT)
+bin_ScmVisualiser_OBJECTS = $(am_bin_ScmVisualiser_OBJECTS)
+bin_ScmVisualiser_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_ScmVisualiser_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_ScmRun_SOURCES) $(bin_ScmVisualiser_SOURCES)
+DIST_SOURCES = $(bin_ScmRun_SOURCES) $(bin_ScmVisualiser_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#-------------------------------------------------
+bin_ScmRun_SOURCES = ScmRun.cc
+bin_ScmRun_CPPFLAGS = -I../libUtil -I../libMetview
+bin_ScmRun_LDFLAGS = 
+bin_ScmRun_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+bin_ScmRun_DEPENDENCIES = ../../lib/libUtil.a 
+bin_ScmVisualiser_SOURCES = ScmVisualiser.cc
+bin_ScmVisualiser_CPPFLAGS = -I../libUtil -I../libMetview
+bin_ScmVisualiser_LDFLAGS = 
+bin_ScmVisualiser_LDADD = $(STANDARD_METVIEW_LIBS) $(FLIBS)
+bin_ScmVisualiser_DEPENDENCIES = ../../lib/libUtil.a 
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.Scm \
+	     $(local_sharedir)/ScmRunDef  $(local_sharedir)/ScmRunRules \
+	     $(local_sharedir)/ScmVisualiserDef $(local_sharedir)/ScmVisualiserRules \
+	     $(local_sharedir)/ScmVisualiserInput1dVars $(local_sharedir)/ScmVisualiserInput2dVars \
+	     $(local_sharedir)/ScmVisualiserOutput1dVars $(local_sharedir)/ScmVisualiserOutput2dVars
+
+CLEANFILES = $(share_DATA)
+BUILT_SOURCES = bin 
+EXTRA_DIST = ObjectSpec.Scm  \
+	     ScmRunDef ScmRunRules ScmVisualiserDef ScmVisualiserRules \
+	     ScmVisualiserInput1dVars ScmVisualiserInput2dVars ScmVisualiserOutput1dVars ScmVisualiserOutput2dVars
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Scm/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Scm/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/ScmRun$(EXEEXT): $(bin_ScmRun_OBJECTS) $(bin_ScmRun_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/ScmRun$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_ScmRun_LINK) $(bin_ScmRun_OBJECTS) $(bin_ScmRun_LDADD) $(LIBS)
+bin/ScmVisualiser$(EXEEXT): $(bin_ScmVisualiser_OBJECTS) $(bin_ScmVisualiser_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/ScmVisualiser$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_ScmVisualiser_LINK) $(bin_ScmVisualiser_OBJECTS) $(bin_ScmVisualiser_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ScmRun-ScmRun.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_ScmRun-ScmRun.o: ScmRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmRun-ScmRun.o -MD -MP -MF $(DEPDIR)/bin_ScmRun-ScmRun.Tpo -c -o bin_ScmRun-ScmRun.o `test -f 'ScmRun.cc' || echo '$(srcdir)/'`ScmRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmRun-ScmRun.Tpo $(DEPDIR)/bin_ScmRun-ScmRun.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmRun.cc' object='bin_ScmRun-ScmRun.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmRun-ScmRun.o `test -f 'ScmRun.cc' || echo '$(srcdir)/'`ScmRun.cc
+
+bin_ScmRun-ScmRun.obj: ScmRun.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmRun-ScmRun.obj -MD -MP -MF $(DEPDIR)/bin_ScmRun-ScmRun.Tpo -c -o bin_ScmRun-ScmRun.obj `if test -f 'ScmRun.cc'; then $(CYGPATH_W) 'ScmRun.cc'; else $(CYGPATH_W) '$(srcdir)/ScmRun.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmRun-ScmRun.Tpo $(DEPDIR)/bin_ScmRun-ScmRun.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmRun.cc' object='bin_ScmRun-ScmRun.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmRun_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmRun-ScmRun.obj `if test -f 'ScmRun.cc'; then $(CYGPATH_W) 'ScmRun.cc'; else $(CYGPATH_W) '$(srcdir)/ScmRun.cc'; fi`
+
+bin_ScmVisualiser-ScmVisualiser.o: ScmVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmVisualiser-ScmVisualiser.o -MD -MP -MF $(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Tpo -c -o bin_ScmVisualiser-ScmVisualiser.o `test -f 'ScmVisualiser.cc' || echo '$(srcdir)/'`ScmVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Tpo $(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmVisualiser.cc' object='bin_ScmVisualiser-ScmVisualiser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmVisualiser-ScmVisualiser.o `test -f 'ScmVisualiser.cc' || echo '$(srcdir)/'`ScmVisualiser.cc
+
+bin_ScmVisualiser-ScmVisualiser.obj: ScmVisualiser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmVisualiser-ScmVisualiser.obj -MD -MP -MF $(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Tpo -c -o bin_ScmVisualiser-ScmVisualiser.obj `if test -f 'ScmVisualiser.cc'; then $(CYGPATH_W) 'ScmVisualiser.cc'; else $(CYGPATH_W) '$(srcdir)/ScmVisualiser.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Tpo $(DEPDIR)/bin_ScmVisualiser-ScmVisualiser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmVisualiser.cc' object='bin_ScmVisualiser-ScmVisualiser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmVisualiser_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmVisualiser-ScmVisualiser.obj `if test -f 'ScmVisualiser.cc'; then $(CYGPATH_W) 'ScmVisualiser.cc'; else $(CYGPATH_W) '$(srcdir)/ScmVisualiser.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Scm/ObjectSpec.Scm b/src/Scm/ObjectSpec.Scm
new file mode 100644
index 0000000..9d9ca6b
--- /dev/null
+++ b/src/Scm/ObjectSpec.Scm
@@ -0,0 +1,106 @@
+################################################################################
+#
+#	ObjectSpec.Flextra
+#
+
+#-----------------------
+# Input Data
+#-----------------------
+
+object,
+	class		= SCM_INPUT_DATA,
+	can_be_created  = False,
+	check           = False,
+	default_object  = False,
+	type		= File,
+	default_name    = 'Scm Input Data',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/SCM_INPUT_DATA.icon',
+	editor_type     = QtScmDataEditor 
+
+#-----------------------
+# Output Data
+#-----------------------
+
+object,
+	class		= SCM_OUTPUT_DATA,
+	can_be_created  = False,
+	check           = False,
+	default_object  = False,
+	type		= File,
+	default_name    = 'Scm Output Data',
+	pixmap 		= '$METVIEW_DIR_SHARE/icons/SCM_OUTPUT_DATA.icon',
+	editor_type     = QtScmDataEditor 
+
+
+
+#-----------------------
+# Computation
+#-----------------------
+
+object,
+	class               = SCM_RUN,
+ 	can_be_created      = True,
+ 	definition_file     = '$METVIEW_DIR_SHARE/etc/ScmRunDef',
+	rules_file          = '$METVIEW_DIR_SHARE/etc/ScmRunRules',
+	default_name        = 'Scm Run',		
+	type                = Data,
+	expand	            = 75,	
+	macro               = scm_run,
+	editor_type	    = SimpleEditor,	
+	pixmap              = '$METVIEW_DIR_SHARE/icons/SCM_RUN.icon'
+
+
+#-----------------------
+# Visualisation
+#-----------------------
+
+object,
+	class           = SCM_VISUALISER,
+ 	can_be_created  = True,
+ 	definition_file = '$METVIEW_DIR_SHARE/etc/ScmVisualiserDef',
+	rules_file      = '$METVIEW_DIR_SHARE/etc/ScmVisualiserRules',
+	default_name    = 'Scm Visualiser',		
+	type            = Data,
+	expand	        = 27,	 # EXPAND_DATE|EXPAND_TIME|expand_2nd_name|EXPAND_LAST_NAME
+	macro           = scm_visualiser,
+	editor_type	    = SimpleEditor,	
+	pixmap          = '$METVIEW_DIR_SHARE/icons/SCM_VIS.icon'
+
+
+#-----------------------
+# States + services
+#-----------------------
+
+state,
+	class    = SCM_RUN,
+	action   = execute,
+	service  = ScmRun
+
+state,
+	class		 = SCM_RUN,
+	output_class = SCM_OUTPUT_DATA,
+	service		 = ScmRun
+
+
+service,
+	cmd  = '$METVIEW_CMD $METVIEW_BIN/ScmRun',
+	name = 'ScmRun'
+
+state,
+	class		    = SCM_OUTPUT_DATA,
+	action		    = save,
+        service		    = savepool
+
+state,
+	class	= SCM_OUTPUT_DATA,
+	action	= examine,
+	service = NcExaminer
+
+state,
+     class   = SCM_VISUALISER,
+     action  = execute/visualise/prepare/drop,
+     service = ScmVisualiser
+
+service,
+	cmd  = '$METVIEW_CMD $METVIEW_BIN/ScmVisualiser',
+	name = 'ScmVisualiser'
diff --git a/src/Scm/ScmRun.cc b/src/Scm/ScmRun.cc
new file mode 100644
index 0000000..0a8803c
--- /dev/null
+++ b/src/Scm/ScmRun.cc
@@ -0,0 +1,461 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2013 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "Metview.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <sstream>
+
+#include "MvScm.h"
+
+using namespace std;
+
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class ScmRun: public Base {	
+public:
+	ScmRun() : Base("SCM_RUN") {ftmp=marstmp();};
+	void serve(MvRequest&,MvRequest&);
+
+protected:	
+	void shellCommand(string &, stringstream&,stringstream&);
+	bool generateTmpPath(string&);
+	
+	string ftmp;
+};
+
+void ScmRun::shellCommand(string &command, stringstream& out,stringstream& err)
+{
+	FILE *in;
+	char cbuf[512];
+
+	string cmd = command + " 2>" + ftmp;
+
+	if (!(in = popen(cmd.c_str() ,"r")) )
+	{
+		return;
+	}
+
+	while(fgets(cbuf, sizeof(cbuf), in) != NULL)
+	{
+		out << cbuf;		
+	}	
+	
+	pclose(in);
+
+
+	if (!(in = fopen(ftmp.c_str() ,"r")) )
+	{
+		return;
+	}
+
+	while(fgets(cbuf, sizeof(cbuf), in) != NULL)
+	{
+		err << cbuf;		
+	}	
+	
+	fclose(in);
+
+}
+
+bool ScmRun::generateTmpPath(string& tmpPath)
+{
+ 	string tmpRoot;
+	
+	char *mvtmp=getenv("METVIEW_TMPDIR");
+	if (mvtmp == 0)  
+	{	
+		marslog(LOG_EROR,"No env variable METVIEW_TMPDIR is not defined!");
+		setError(13);
+		return false;
+	}
+	else
+	{
+		tmpRoot=string(mvtmp);
+	}
+
+    time_t sec = time(NULL);
+  	srand (getpid());
+  	int rNum = rand() % 1000 + 1;
+
+ 	std::stringstream out;
+  	out << tmpRoot << "/scm_" << sec << "_" << rNum; 
+	tmpPath=out.str();
+	
+	if(mkdir(tmpPath.c_str(),0777) != 0)
+	{
+		marslog(LOG_EROR,"Could not genarate work directory for SCM run: %s",tmpPath.c_str());
+		setError(13);
+		return false;
+	}
+	
+	return true;
+}  
+
+void ScmRun::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------ScmRun::serve()--------------" << endl;
+  	in.print();
+
+	//Find out scm script path
+	string scmScript;
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate script mv_scm_run!");
+		setError(13);
+		return;
+	}
+	else
+	{
+		scmScript=string(mvbin) +"/mv_scm_run";
+	}
+	
+
+	//Create  tmp dir for the flextra run
+	string tmpPath;
+	if(!generateTmpPath(tmpPath))
+	{
+		return;
+	}
+	
+	//Scm exe
+	string exe;	
+	const char *exeC=in("SCM_EXE_PATH");
+	if(exeC)
+	{
+		exe=string(exeC);
+	}
+	if(!exeC || exe.empty())
+	{
+	  	exe="_UNDEF_";
+	}	
+	
+
+        //---------------------------------------
+	// Input data
+	//---------------------------------------
+	
+	MvRequest dataR=in("SCM_INPUT_DATA");
+	const char *dataPath=dataR("PATH");
+	string data;
+	if(dataPath)
+	{
+	  	data=string(dataPath);
+	}
+	else
+	{
+		const char *cval=in("SCM_INPUT_DATA_PATH");
+		if(cval)
+		{
+		  	data=string(cval);
+		}	
+		else
+		{
+			marslog(LOG_EROR,"No value found for paramater: SCM_INPUT_DATA_PATH");
+			setError(13);
+			return;
+		}
+		
+	}
+	
+	
+	if(data.empty())
+	{
+	  	marslog(LOG_EROR,"No value found for paramaters: SCM_INPUT_DATA and SCM_INPUT_DATA_PATH");
+		setError(13);
+		return;	
+	}
+	
+	//-------------------------
+	// Level num
+	//-------------------------
+	
+	int levelNum=MvScm::modelLevelNum(data);
+	if(levelNum == -1)
+	{  
+		marslog(LOG_EROR,"Could not read number of levels from input file!");
+		setError(13);
+		return;	
+	}
+	
+	stringstream sst;
+  	sst << levelNum;
+   	string nlev=sst.str();   
+   
+	//-------------------------
+	//Namelist
+	//-------------------------
+	
+	MvRequest nameR=in("SCM_NAMELIST");
+	const char *namePath=nameR("PATH");
+	string namelist;
+	if(namePath)
+	{
+	  	namelist=string(namePath);
+	}
+	else
+	{
+	  	const char *cval=in("SCM_NAMELIST_PATH");
+		if(cval)
+		{
+		  	namelist=string(cval);
+		}	
+		else
+		{
+			marslog(LOG_EROR,"No value found for paramater: SCM_NAMELIST_PATH");
+			setError(13);
+			return;
+		}
+	}
+	
+	if(namelist.empty())
+	{
+	  	marslog(LOG_EROR,"No value found for paramaters: SCM_NAMELIST and SCM_NAMELIST_PATH");
+		setError(13);
+		return;	
+	}
+	
+	
+	//-------------------------
+	//Vtable file
+	//-------------------------
+	
+	MvRequest vtabR=in("SCM_VTABLE");
+	const char *vtabPath=vtabR("PATH");
+	string vtable;
+	if(vtabPath)
+	{
+	  	vtable=string(vtabPath);
+	}
+	else
+	{
+		const char *cval=in("SCM_VTABLE_PATH");
+		if(cval)
+		{
+		  	vtable=string(cval);
+		}
+	}
+	
+	if(vtable.empty())
+	{
+	  	vtable=string("_UNDEF_");
+	}
+	
+	//-------------------------
+	// Rclim file
+	//-------------------------
+	
+	string rclim;
+	if(const char *cval=in("SCM_RCLIM_PATH"))
+	{
+		rclim=string(cval);
+	}
+	
+	if(rclim.empty())
+	{
+	  	rclim=string("_UNDEF_");
+	}
+	
+	//-------------------------
+	// COPY OUTPUT DATA
+	//-------------------------
+	
+	string userResFile;
+	
+	const char *copyRes=in("SCM_COPY_OUTPUT_DATA"); 
+	if(copyRes && strcmp(copyRes,"ON") == 0)
+	{ 			
+	  	//Output path
+	  	string userResPath;
+		const char *outPath=in("SCM_OUTPUT_DATA_PATH"); 
+		if(outPath)
+		{
+	  		userResPath=string(outPath);
+	  		
+	  		if(userResPath.at(0) == ' ')
+			{
+			  	marslog(LOG_EROR,"SCM_OUTPUT_DATA_PATH cannot start with a whitespace!");
+				setError(13);	
+				return;
+			}				
+			else if(userResPath.at(0) != '/')
+			{
+				const char* callerIcon=in("_NAME");
+				if(callerIcon)
+				{
+	  				string callerDir(callerIcon);	  	
+		        		char *mvudir=getenv("METVIEW_USER_DIRECTORY");
+		        		if(mvudir)  
+		        		{
+	  					callerDir=string(mvudir) + "/" + callerDir;
+					}	
+					string::size_type pos=callerDir.find_last_of("/");
+	 				if(pos != string::npos)
+					{
+		 				callerDir=callerDir.substr(0,pos);
+					}
+					
+					userResPath=callerDir + "/" + userResPath;
+				}	
+			}					
+		}
+				  
+		if(!outPath || userResPath.empty())
+		{
+			marslog(LOG_EROR,"No value is defined for parameter SCM_OUTPUT_PATH!");
+			setError(13);	
+			return;
+		}
+		
+		userResFile=userResPath;		
+	}
+	
+	//-------------------------
+	// Run the model
+	//-------------------------
+		
+	string resFileName="scm_out.nc";
+	string logFileName="log.txt";
+	string logFile=tmpPath + "/" + logFileName;
+	
+		//Run the scm script
+	string cmd = scmScript + " \"" + tmpPath + "\" \"" + exe  + "\" " + nlev + " \"" + data + "\" \"" + namelist + "\" \"" + vtable + "\" \"" + rclim +  "\" \"" + logFileName + "\" \"" + resFileName + "\""; 
+
+	//marslog(LOG_INFO,"Execute command: %s",cmd.c_str());
+	
+	int ret=system(cmd.c_str());	
+	
+	bool runFailed=false;
+	
+	//If the script failed read log file and
+	//write it into LOG_EROR
+	if(ret == -1 || WEXITSTATUS(ret) != 0)
+	{		
+		ifstream in(logFile.c_str());
+		string line;
+
+		if(WEXITSTATUS(ret) == 255)
+		{
+		  	marslog(LOG_WARN,"Warnings were generated during SCM run!");
+		}  		
+		else if(WEXITSTATUS(ret) == 1)
+		{		
+			marslog(LOG_EROR,"Failed to perform SCM run!");
+			runFailed=true;
+		}
+		else if(WEXITSTATUS(ret) > 1)
+		{		
+			marslog(LOG_EROR,"SCM run failed with exit code: %d !",WEXITSTATUS(ret));
+			runFailed=true;
+		}		
+	}
+	
+	//Log locations are always printed!!
+	
+	if(runFailed)
+	{
+	  	marslog(LOG_EROR,"Log files are available at:");
+		marslog(LOG_EROR,"---------------------------");
+		marslog(LOG_EROR," (STDOUT)  %s",logFile.c_str());	
+		string msg=tmpPath + "/fort.20";
+		marslog(LOG_EROR," (fort.20) %s",msg.c_str());
+	}  
+	else
+	{  
+		marslog(LOG_INFO,"Log files are available at:");
+		marslog(LOG_INFO,"---------------------------");
+		marslog(LOG_INFO," (STDOUT)  %s",logFile.c_str());	
+		string msg=tmpPath + "/fort.20";
+		marslog(LOG_INFO," (fort.20) %s",msg.c_str());
+	}
+	
+	//Retrun if run failed!!
+	if(runFailed)
+	{
+		setError(13);  	
+		return;
+	}
+	
+	//---------------------------
+	// Merge the output files
+	//---------------------------
+	
+	//At this point we have already copied progvar.nc into resFile in the script
+	
+	string resFile=tmpPath + "/" + resFileName;
+	string diagFile=tmpPath + "/diagvar.nc";
+	string diag2File=tmpPath + "/diagvar2.nc";
+	
+	if(MvScm::mergeOutFiles(resFile,diagFile,diag2File) == false)
+	{
+	  	marslog(LOG_EROR,"Could not merge SCM output files!");
+	  	setError(13);
+		return;
+	}  
+	
+	//---------------------------------------------------
+	// Copy the output into the user-defined location
+	//---------------------------------------------------
+	
+	if(!userResFile.empty())
+	{
+	  	const char *dn=dirname(userResFile.c_str());
+	  	cmd="mkdir -p " + string(dn) + "; cp -f " + resFile + " " +  userResFile;
+			
+	  	stringstream outStream;
+		stringstream errStream;
+		shellCommand(cmd,outStream,errStream);
+		
+		if(!errStream.str().empty())
+		{
+			marslog(LOG_EROR,"");
+			marslog(LOG_EROR,"Could not copy ouput file to target location!");  
+		        marslog(LOG_EROR,"This command:");
+			marslog(LOG_EROR,"   %s",cmd.c_str());
+			marslog(LOG_EROR,"failed with this error:");
+			marslog(LOG_EROR,"   %s",errStream.str().c_str());
+			setError(13);
+		}
+	}
+		
+	//------------------------------------------
+	//Set out request
+	//------------------------------------------
+	
+	out=MvRequest("SCM_OUTPUT_DATA");
+	out("PATH")=resFile.c_str();
+	
+	cout << tmpPath << endl;
+	out.print();
+}
+
+  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv,"ScmRun");
+
+    	ScmRun scmRun;	
+	
+    	theApp.run();
+}
+
+
diff --git a/src/Scm/ScmRunDef b/src/Scm/ScmRunDef
new file mode 100644
index 0000000..3bbaf43
--- /dev/null
+++ b/src/Scm/ScmRunDef
@@ -0,0 +1,60 @@
+
+SCM_RUN; Scm_run; experimental
+{
+	SCM_EXE_PATH
+	{
+		@	
+	} = ''
+
+	SCM_INPUT_DATA
+		[ interface = icon, class = SCM_INPUT_DATA, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	SCM_INPUT_DATA_PATH
+	{
+		@
+	}  = ''
+
+	SCM_NAMELIST
+		[ interface = icon, class = NAMELIST, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	SCM_NAMELIST_PATH
+	{
+		@
+	}  = ''
+
+	SCM_VTABLE
+		[ interface = icon, class = NAMELIST, exclusive = false,
+		  help = help_data,
+		  help_directory  = '/Metview/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+
+	SCM_VTABLE_PATH
+	{
+		@
+	}  = ''
+
+	SCM_RCLIM_PATH
+	{
+		@
+	}  = ''
+
+	SCM_COPY_OUTPUT_DATA
+	{
+		ON  ; ON 
+                OFF ; OFF
+	} = OFF
+
+	SCM_OUTPUT_DATA_PATH
+	{
+		@
+	}  = 'scm_out.nc'	
+}
diff --git a/src/Scm/ScmRunRules b/src/Scm/ScmRunRules
new file mode 100644
index 0000000..96f7542
--- /dev/null
+++ b/src/Scm/ScmRunRules
@@ -0,0 +1,3 @@
+%if SCM_COPY_OUTPUT_DATA = OFF %then
+		%unset SCM_OUTPUT_DATA_PATH
+
diff --git a/src/Scm/ScmVisualiser.cc b/src/Scm/ScmVisualiser.cc
new file mode 100644
index 0000000..04c5ac3
--- /dev/null
+++ b/src/Scm/ScmVisualiser.cc
@@ -0,0 +1,362 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2013 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Metview.h"
+#include "MvPath.hpp"
+
+#include <iostream>
+#include <stdexcept>
+#include <fstream>
+
+
+class Base : public MvService { 
+protected:
+	Base(char* a) : MvService(a) {};
+};
+
+class ScmVisualiser: public Base {	
+public:
+	ScmVisualiser() : Base("SCM_VISUALISER") {};
+	void serve(MvRequest&,MvRequest&);
+
+private:
+	bool getDataPath(MvRequest &in, const char *dataParamName, const char *dataPathParamName, string &result);
+	string getList(MvRequest &in, const char *parameter, string &separator, int &numElements);
+	string getString(MvRequest &in, const char *parameter, const char *defaultVal);
+
+};
+
+
+// ScmVisualiser::getDataPath
+// for user parameters which have a data icon and  the alternative of
+// a path icon. Returns the path of the data icon if it's there;
+// otherwise thh path parameters if it's there. The path is returned
+// in the 'result' string.
+// Returns true if it found a path, otherwise false.
+
+bool ScmVisualiser::getDataPath(MvRequest &in, const char *dataParamName, const char *dataPathParamName, string &result)
+{
+	MvRequest dataR=in(dataParamName);
+	const char *dataPath=dataR("PATH");
+
+	if(dataPath)
+	{
+		result=string(dataPath);
+	}
+	else
+	{
+		const char *cval=in(dataPathParamName);
+		if(cval)
+		{
+		  	result=string(cval);
+			if (result == "OFF")
+				result.clear();
+		}	
+	}	
+	
+	if(result.empty())
+	{
+	  	marslog(LOG_EROR,"No value found for paramaters: %s and %s", dataParamName, dataPathParamName);
+		setError(13);
+		return false;	
+	}
+	
+	return true;
+}
+
+
+// ScmVisualiser::getList
+// Parses a list-type variable from a request and returns it
+// as a separated string. Also returns the number of elements found.
+
+string ScmVisualiser::getList(MvRequest &in, const char *parameter, string &separator, int &numElements)
+{
+	string result;
+
+	int nrParams = in.countValues(parameter);
+	numElements = nrParams;
+
+	if (nrParams == 0)  // is this case even possible?
+		result = string("dummy");
+	else
+		result = string(in(parameter));
+
+	if (nrParams > 1)
+	{
+		for (int n=1; n<nrParams; ++n)
+		{
+			result += separator;
+			result += string(in(parameter, n));
+		}
+	}
+
+	return result;
+}
+
+
+// ScmVisualiser::getString
+// Tries to get the given pstring arameter from the request, returning
+// a user-specified default if it is not there.
+
+string ScmVisualiser::getString(MvRequest &in, const char *parameter, const char *defaultVal)
+{
+	const char *val = in(parameter);
+
+	if (!val)
+		val = defaultVal;
+
+
+	return string(val);
+}
+
+
+void ScmVisualiser::serve( MvRequest& in, MvRequest& out)
+{
+  	cout << "--------------ScmVisualiser::serve()--------------" << endl;
+  	in.print();
+
+		
+	string ScmVisMacro;
+	char *mvbin=getenv("METVIEW_BIN");
+	if (mvbin == 0)  
+	{	
+		marslog(LOG_EROR,"No METVIEW_BIN env variable is defined. Cannot locate mv_scm_vis.mv macro!");
+		setError(13);
+		return;
+	}
+	else
+	{
+		ScmVisMacro=string(mvbin) +"/mv_scm_vis.mv";
+	}
+
+	vector<string> params;
+	string str;
+	string listSeparator = ",";
+	const char *defVal = "dummy";
+
+
+    // set the MARS expand flags to avoid unwanted expansion of lists
+    expand_flags(EXPAND_DATE|EXPAND_TIME|EXPAND_2ND_NAME|EXPAND_LAST_NAME);
+
+
+	// plot type
+	str = getString(in, "SCM_PLOT_TYPE", defVal);
+	params.push_back(str);
+
+
+
+	// Input data
+	string dataPath;
+	bool ok = getDataPath(in, "SCM_DATA", "SCM_DATA_FILENAME", dataPath);
+	if (!ok)
+		return;  // error message already generated	
+	params.push_back(dataPath);
+
+
+
+    // data title
+	str = getString(in, "SCM_DATA_TITLE", defVal);
+	params.push_back(str);
+
+
+	// comparison data
+	string compareDataBool = getString(in, "SCM_COMPARE_DATA", defVal);
+	params.push_back(compareDataBool);
+
+
+    string comparisonDataTitle;
+	if (compareDataBool == "ON")
+	{
+		ok = getDataPath(in, "SCM_COMPARISON_DATA", "SCM_COMPARISON_DATA_FILENAME", dataPath);
+		if (!ok)
+			return;  // error message already generated	
+
+	    comparisonDataTitle = getString(in, "SCM_COMPARISON_DATA_TITLE", defVal);
+	}
+	else
+	{
+		dataPath = "dummy";
+        comparisonDataTitle = "dummy";
+	}
+
+	params.push_back(dataPath);
+	params.push_back(comparisonDataTitle);
+
+
+
+	// comparison mode
+	str = getString(in, "SCM_COMPARISON_MODE", defVal);
+	params.push_back(str);
+
+
+	// var selection type
+	str = "LIST"; //getString(in, "SCM_VARIABLE_SELECTION_TYPE", defVal);
+	params.push_back(str);
+
+
+
+    // data type (input/output from SCM)
+    string dataType = getString(in, "SCM_DATA_TYPE", defVal);
+
+
+	// variable lists
+	int num1dVars, num2dVars, numItems;
+
+
+    if (dataType == "OUTPUT")
+    {
+	    str = getList(in, "SCM_OUTPUT_1D_VARIABLES", listSeparator, num1dVars);
+	    params.push_back(str);
+
+	    str = getList(in, "SCM_OUTPUT_2D_VARIABLES", listSeparator, num2dVars);
+	    params.push_back(str);
+    }
+    else
+    {
+	    str = getList(in, "SCM_INPUT_1D_VARIABLES", listSeparator, num1dVars);
+	    params.push_back(str);
+
+	    str = getList(in, "SCM_INPUT_2D_VARIABLES", listSeparator, num2dVars);
+	    params.push_back(str);
+    }
+
+	str = getList(in, "SCM_TIMES", listSeparator, numItems);
+	params.push_back(str);
+
+
+	// output mode and path
+	string outputMode = getString(in, "SCM_OUTPUT_MODE", defVal);
+	params.push_back(outputMode);
+
+	str = getString(in,"SCM_OUTPUT_FILE_PATH", defVal);
+
+
+  	// output path - add directory if not already supplied
+  	string userResPath;
+	if(!str.empty())
+	{
+  		userResPath=string(str);
+  		
+		if(userResPath.find("/") == string::npos)
+		{
+			const char* callerIcon=in("_NAME");
+			if(callerIcon)
+			{
+  				string callerDir(callerIcon);	  	
+        		char *mvudir=getenv("METVIEW_USER_DIRECTORY");
+	     		if(mvudir)  
+	       		{
+					callerDir=string(mvudir) + "/" + callerDir;
+				}	
+				string::size_type pos=callerDir.find_last_of("/");
+ 				if(pos != string::npos)
+				{
+	 				callerDir=callerDir.substr(0,pos);
+				}
+				
+				userResPath=callerDir + "/" + userResPath;
+			}	
+		}
+	}
+
+	params.push_back(userResPath);
+
+
+
+	str = getList(in, "SCM_X_MIN_LIST", listSeparator, numItems);
+	params.push_back(str);
+
+	str = getList(in, "SCM_X_MAX_LIST", listSeparator, numItems);
+	params.push_back(str);
+
+	str = getList(in, "SCM_Y_MIN_LIST", listSeparator, numItems);
+	params.push_back(str);
+
+	str = getList(in, "SCM_Y_MAX_LIST", listSeparator, numItems);
+	params.push_back(str);
+
+
+	str = getList(in, "SCM_VALUE_MIN_LIST", listSeparator, numItems);
+	params.push_back(str);
+
+	str = getList(in, "SCM_VALUE_MAX_LIST", listSeparator, numItems);
+	params.push_back(str);
+
+
+	// plot the grid
+	string plotGridBool = getString(in, "SCM_GRID", defVal);
+	params.push_back(plotGridBool);
+
+
+	// sanity check for consistency
+	if ((num1dVars > 1 || num2dVars > 1) && outputMode == "SCREEN")
+	{
+		marslog(LOG_EROR,"Cannot (currently) plot multiple variables to SCREEN. Please specify an output file.");
+		setError(13);
+		return;
+	}
+
+
+
+
+
+	//Build request to be sent to Macro
+	MvRequest req("MACRO");
+
+	string processName = MakeProcessName("ScmVisualiser");
+	MvRequest macroReq("MACRO");
+	req("PATH") = ScmVisMacro.c_str();
+	req("_CLASS") = "MACRO";
+	req("_ACTION") = "execute";
+	req("_REPLY") = processName.c_str();
+	
+	//Define argument list for the macro!
+	for(vector<string>::iterator it=params.begin(); it != params.end(); it++)
+	{
+		req.addValue("_ARGUMENTS",(*it).c_str());			   			     
+	}
+		
+	//Run macro
+	int error;	
+	marslog(LOG_INFO,"Execute macro: %s",ScmVisMacro.c_str());
+	MvRequest reply = MvApplication::waitService("macro",req,error);
+
+	//Call myself to process the macro reply request
+	if(!error && reply)
+	{
+		const char* myname = reply("_REPLY");
+		MvApplication::callService(myname,reply,0);
+	}
+	else
+	{
+	  	marslog(LOG_EROR,"Failed to run SCM visualiser! Macro failed!");
+		setError(13);
+		return;
+	}  
+	  
+	reply.print();
+	
+	//out=MvRequest("FLEXTRA_INPUT");
+	//out("INPUT_DATA_PATH")=outPath.c_str();
+	//out("AVAILABLE_FILE_PATH")=fAvailable.c_str();
+	
+	out.print();
+}
+	
+	  	
+int main( int argc, char** argv )
+{
+	MvApplication theApp( argc, argv,"ScmVisualiser");
+
+    ScmVisualiser flextra;	
+	
+    theApp.run();
+}
+
+
diff --git a/src/Scm/ScmVisualiserDef b/src/Scm/ScmVisualiserDef
new file mode 100644
index 0000000..7a7013b
--- /dev/null
+++ b/src/Scm/ScmVisualiserDef
@@ -0,0 +1,195 @@
+
+SCM_VISUALISER; SCM Visualiser
+{
+
+	SCM_PLOT_TYPE
+	{
+		TIME_VALUE_CURVE
+		TIME_HEIGHT_MATRIX
+		PROFILE
+	} = TIME_VALUE_CURVE
+
+
+     SCM_DATA_FILENAME
+     {
+          OFF ; OFF
+          @
+     } = OFF
+
+     SCM_DATA
+     [ interface = icon, class = NETCDF/SCM_INPUT_DATA/SCM_OUTPUT_DATA, exclusive = false,
+       help = help_data,
+       help_directory  = '/System/Defaults',
+       help_name       = Data
+     ]
+     { @ / }
+
+
+	SCM_DATA_TITLE
+	{
+		@
+	}  = 'Data'	
+
+
+	SCM_DATA_TYPE
+	{
+		INPUT
+		OUTPUT
+	} = OUTPUT
+
+
+	SCM_COMPARE_DATA
+	{
+		ON
+		OFF
+	} = OFF
+
+
+     SCM_COMPARISON_DATA_FILENAME
+     {
+          OFF ; OFF
+          @
+     } = OFF
+
+     SCM_COMPARISON_DATA
+     [ interface = icon, class = NETCDF/SCM_INPUT_DATA/SCM_OUTPUT_DATA, exclusive = false,
+       help = help_data,
+       help_directory  = '/System/Defaults',
+       help_name       = Data
+     ]
+     { @ / }
+
+
+	SCM_COMPARISON_DATA_TITLE
+	{
+		@
+	}  = 'Comparison Data'	
+
+
+	SCM_COMPARISON_MODE
+	{
+		OVERLAY
+		DIFFERENCE
+	} = OVERLAY
+
+
+
+#	SCM_VARIABLE_SELECTION_TYPE
+#	{
+#		LIST
+#		FILE
+#		ALL
+#	} = LIST
+
+
+# NEED FILE SELECTION
+# CONSIDER USING INDEXES FOR RETURN VALUE OF VARIABLES
+# PROFILE TIME SERIES - USE DIFFERENT COLOURS FOR EACH TIME STEP
+#   - OVERLAY OR PLOT SIDE-BY-SIDE
+#   - OVERLAY IN THE FIRST INSTANCE AS LONG AS COLOURS LOOK OK
+#   - OPTION TO OVERLAY DIFFERENT RUNS IF WE PLOT TIME STEPS SIDE-BY-SIDE
+#   - FUTURE OPTION: ANIMATION BETWEEN TIME STEPS
+
+
+	SCM_OUTPUT_1D_VARIABLES
+	[ help = help_multiple_selection, exclusive = False ]
+	{
+		@
+		/
+		%include ScmVisualiserOutput1dVars
+	} = T_SKIN
+
+
+	SCM_OUTPUT_2D_VARIABLES
+	[ help = help_multiple_selection, exclusive = False ]
+	{
+		/
+		@
+		%include ScmVisualiserOutput2dVars
+	} = T
+
+
+	SCM_INPUT_1D_VARIABLES
+	[ help = help_multiple_selection, exclusive = False ]
+	{
+		@
+		/
+		%include ScmVisualiserInput1dVars
+	} = T_SKIN
+
+
+	SCM_INPUT_2D_VARIABLES
+	[ help = help_multiple_selection, exclusive = False ]
+	{
+		/
+		@
+		%include ScmVisualiserInput2dVars
+	} = T
+
+
+	SCM_TIMES
+	{
+		*
+		/
+		TO   ; TO
+		BY   ; BY
+		LAST ; LAST
+		ALL  ; ALL
+	} = 0/TO/LAST/BY/360
+
+	SCM_X_MIN_LIST
+	{
+		*
+		/
+	}
+
+	SCM_X_MAX_LIST
+	{
+		*
+		/
+	}
+
+	SCM_Y_MIN_LIST
+	{
+		*
+		/
+	}
+
+	SCM_Y_MAX_LIST
+	{
+		*
+		/
+	}
+
+	SCM_VALUE_MIN_LIST
+	{
+		*
+		/
+	}
+
+	SCM_VALUE_MAX_LIST
+	{
+		*
+		/
+	}
+
+	SCM_GRID
+	{
+		ON
+		OFF
+	} = OFF
+
+	SCM_OUTPUT_MODE
+	{
+		SCREEN
+		POSTSCRIPT
+	} = SCREEN
+
+
+	SCM_OUTPUT_FILE_PATH
+	{
+		@
+	}  = 'scm_out.ps'	
+
+
+}
diff --git a/src/Scm/ScmVisualiserInput1dVars b/src/Scm/ScmVisualiserInput1dVars
new file mode 100644
index 0000000..9f1630c
--- /dev/null
+++ b/src/Scm/ScmVisualiserInput1dVars
@@ -0,0 +1,31 @@
+# Generated automatically by generate_params_for_vis_def_file
+Date ; date
+Second ; second
+latitude ; lat
+Extra variable lon ; lon
+surface pressure ; ps
+Momentum Roughness Length ; mom_rough
+Momentum Roughness Length ; heat_rough
+High Vegetation Type ; high_veg_type
+Low Vegetation Type ; low_veg_type
+High Vegetation cover ; high_veg_cover
+Low Vegetation cover ; low_veg_cover
+Skin Temperature ; t_skin
+Skin Temperature ; q_skin
+Surface Sensible Heat flux ; sfc_sens_flx
+Surface Latent Heat flux ; sfc_lat_flx
+Land-Sea Mask ; lsm
+Sea Ice Fraction ; sea_ice_frct
+Sea Ice Temperature ; t_sea_ice
+Open SST ; open_sst
+Snow Depth ; snow
+Snow Temperature ; t_snow
+Snow Albedo ; albedo_snow
+Snow Density ; density_snow
+Orography ; orog
+Orography -SD form drag ; sdfor
+Orography -SD ; sdor
+Orography -IS ; isor
+Orography -AN ; anor
+Orography -SL ; slor
+Background albedo ; albedo
diff --git a/src/Scm/ScmVisualiserInput2dVars b/src/Scm/ScmVisualiserInput2dVars
new file mode 100644
index 0000000..18c24ed
--- /dev/null
+++ b/src/Scm/ScmVisualiserInput2dVars
@@ -0,0 +1,28 @@
+# Generated automatically by generate_params_for_vis_def_file
+Pressure - full level ; pressure_f
+Pressure - half level ; pressure_h
+Height - full level ; height_f
+Height - half level ; height_h
+U wind ; u
+V wind ; v
+Temperature ; t
+Water vapor mixing ratio ; q
+Liquid water mixing ratio ; ql
+Ice water mixing ratio ; qi
+cloud fraction ; cloud_fraction
+Potential Temperature ; pot_temperature
+Equivalent Potential Temperature ; pot_temp_e
+Dry static energy ; dry_st_energy
+Moist static energy ; moist_st_energy
+relative humidity ; relative_humidity
+Saturation specific humidity ; q_sat
+Geostrophic U wind ; ug
+Geostrophic V wind ; vg
+Advective T tendency ; tadv
+Advective Q tendency ; qadv
+Advective U tendency ; uadv
+Advective V tendency ; vadv
+Vertical Pressure Velocity ; omega
+Covariant Vert. Vel. ; etadotdpdeta
+Soil Temperature ; t_soil
+Soil Moisture ; q_soil
diff --git a/src/Scm/ScmVisualiserOutput1dVars b/src/Scm/ScmVisualiserOutput1dVars
new file mode 100644
index 0000000..69ab08c
--- /dev/null
+++ b/src/Scm/ScmVisualiserOutput1dVars
@@ -0,0 +1,106 @@
+# Generated automatically by generate_params_for_vis_def_file
+Skin Temperature ; t_skin
+Skin Reservoir Water Content ; q_skin
+Snow Depth -liquid equivalent- ; snow
+Snow Temperature ; t_snow
+Snow Albedo ; albedo_snow
+Snow Density ; density_snow
+Tiles ; ntiles
+Orographic Variances ; norg
+Water Vapor Path ; wat_vap_path
+Liquid Water Path ; liq_wat_path
+Ice Water Path ; ice_wat_path
+Boundary Layer Height ; pbl_height
+Total Cloud Cover ; total_cloud
+Low Cloud Cover ; low_cloud
+Middle Cloud Cover ; middle_cloud
+High Cloud Cover ; high_cloud
+Convective Rain ; conv_rain
+Convective Snow ; conv_snow
+Stratiform Rain ; stra_rain
+Stratiform Snow ; stra_snow
+Top SW Radiation Incoming ; top_swrad_inc
+Deep/Shallow/Midlevel Convection ; conv_type
+Dry stable/Dry conv/Sc/Cu ; pbl_type
+Index of Convective Cloud Base ; n_conv_base
+Index of Convective Cloud Top ; n_conv_top
+Top SW Radiation ; top_swrad
+Top SW Radiation Clear-Sky ; top_swrad_clr
+Top LW Radiation ; top_lwrad
+Top LW Radiation Clear-Sky ; top_lwrad_clr
+Surface SW Radiation ; sfc_swrad
+Surface SW Radiation Clear-Sky ; sfc_swrad_clr
+Surface LW Radiation ; sfc_lwrad
+Surface LW Radiation Clear-Sky ; sfc_lwrad_clr
+Surface Downward SW Radiation ; sfc_swrad_down
+Surface SW Albedo ; sfc_albedo
+Surface Downward LW Radiation ; sfc_lwrad_down
+Surface Emissivity ; sfc_emiss
+Surface Sensible Heat Flux ; sfc_sen_flx
+Surface Latent Heat Flux ; sfc_lat_flx
+U-Surface Stress ; u_sfc_strss
+V-Surface Stress ; v_sfc_strss
+Sea Surface Temperature ; sst
+Land-Sea Mask ; land_sea_mask
+Sea Ice Fraction ; sea_ice_cov
+Surface Roughness length ; rough_len_mom
+Surface Roughness Length for Heat ; rough_len_heat
+Low Vegetation Cover ; low_veg_cov
+High Vegetation Cover ; high_veg_cov
+Low Vegetation Type ; low_veg_type
+High Vegetation Type ; high_veg_type
+Turbulent Dissipation ; turb_diss
+Gravity Wave Drag Dissipation ; gwd_diss
+Gravity Wave Drag Surface U-Stress ; gwd_u_strs
+Gravity Wave Drag Surface V-Stress ; gwd_v_strs
+U-Wind 10m ; u_wind_10m
+V-Wind 10m ; v_wind_10m
+Temperature 2m ; temperature_2m
+Dew Point Temperature 2m ; dew_point_2m
+Wind Gust at 10m ; wind_gust
+Sunshine Duration ; sun_duration
+Large-scale Precipitation Fraction ; ls_prec_fct
+Run-off ; runoff
+External Sensible Heat Flux ; sfc_sen_flx_ext
+External Latent Heat Flux ; sfc_lat_flx_ext
+Accu. Convective Rain ; acc_conv_rain
+Accu. Convective Snow ; acc_conv_snow
+Accu. Stratiform Rain ; acc_stra_rain
+Accu. Stratiform Snow ; acc_stra_snow
+Accu. Top SW Radiation ; acc_top_swrad
+Accu. Surface SW Radiation ; acc_sfc_swrad
+Accu. Top LW Radiation ; acc_top_lwrad
+Accu. Surface LW Radiation ; acc_sfc_lwrad
+Accu. Surface Sensible Heat Flux ; acc_sfc_sen_flx
+Accu. Surface Latent Heat Flux ; acc_sfc_lat_flx
+Evaporation Flux ; eva_flx
+Accu. Evaporation Flux ; acc_eva_flx
+Accu. U-Surface Stress ; acc_u_sfc_strss
+Accu. Surface Stress ; acc_v_sfc_strss
+Accu. Turbulent Dissipation ; acc_turb_diss
+Accu. Gravity Wave Drag Dissipation ; acc_gwd_diss
+Accu. Gravity Wave Drag Surface U-Stress ; acc_gwd_u_strs
+Accu. Gravity Wave Drag Surface V-Stress ; acc_gwd_v_strs
+Accu. Run-off ; acc_runoff
+Snow Melt ; snow_melt
+Snow Evaporation ; snow_evap
+Extra variable extra_sfc_01 ; extra_sfc_01
+Extra variable extra_sfc_02 ; extra_sfc_02
+Extra variable extra_sfc_03 ; extra_sfc_03
+Extra variable extra_sfc_04 ; extra_sfc_04
+Extra variable extra_sfc_05 ; extra_sfc_05
+Extra variable extra_sfc_06 ; extra_sfc_06
+Extra variable extra_sfc_07 ; extra_sfc_07
+Extra variable extra_sfc_08 ; extra_sfc_08
+Extra variable extra_sfc_09 ; extra_sfc_09
+Extra variable extra_sfc_10 ; extra_sfc_10
+Extra variable extra_sfc_11 ; extra_sfc_11
+Extra variable extra_sfc_12 ; extra_sfc_12
+Extra variable extra_sfc_13 ; extra_sfc_13
+Extra variable extra_sfc_14 ; extra_sfc_14
+Extra variable extra_sfc_15 ; extra_sfc_15
+Extra variable extra_sfc_16 ; extra_sfc_16
+Extra variable extra_sfc_17 ; extra_sfc_17
+Extra variable extra_sfc_18 ; extra_sfc_18
+Extra variable extra_sfc_19 ; extra_sfc_19
+Extra variable extra_sfc_20 ; extra_sfc_20
diff --git a/src/Scm/ScmVisualiserOutput2dVars b/src/Scm/ScmVisualiserOutput2dVars
new file mode 100644
index 0000000..9d219e3
--- /dev/null
+++ b/src/Scm/ScmVisualiserOutput2dVars
@@ -0,0 +1,99 @@
+# Generated automatically by generate_params_for_vis_def_file
+Pressure - full levels ; pressure_f
+Pressure - half levels ; pressure_h
+Height - full levels ; height_f
+Height - half levels ; height_h
+Relative Humidity ; relative_humidity
+Temperature ; t
+Potential Temperature ; pot_temperature
+Equivalent Potential Temperature ; pot_temp_e
+U Wind ; u
+V Wind ; v
+Dry Static Energy ; dry_st_energy
+Moist Static Energy ; moist_st_energy
+Water Vapor Mixing Ratio ; q
+Liquid Water Mixing Ratio ; ql
+Ice Water Mixing Ratio ; qi
+Cloud Fraction ; cloud_fraction
+Rain Water Mixing Ratio ; qr
+Snow Water Mixing Ratio ; qsn
+Soil Temperature  ; t_soil
+Soil Moisture ; q_soil
+Saturation Specific Humidity ; q_sat
+Tiled Surface Sensible Heat Flux ; sfc_sen_flx_ti
+Tiled Surface Latent Heat Flux ; sfc_lat_flx_ti
+Tiled U Surface Stress ; u_sfc_strss_ti
+Tiled V Surface Stress ; v_sfc_strss_ti
+Tiled Skin Temperature ; t_skin_ti
+Directional Orographic Variances ; dir_orog_var
+Tendency of U-Wind ; tend_u_wind
+Tendency of U-Wind -dyn- ; tend_u_wind_d
+Tendency of U-Wind -phy- ; tend_u_wind_p
+Tendency of V-Wind ; tend_v_wind
+Tendency of V-Wind -dyn- ; tend_v_wind_d
+Tendency of V-Wind -phy- ; tend_v_wind_p
+Tendency of Temperature ; tend_temp
+Tendency of Temperature -dyn- ; tend_temp_d
+Tendency of Temperature -phy- ; tend_temp_p
+Tendency of Water Vapor ; tend_wat_vap
+Tendency of Water Vapor -dyn- ; tend_wat_vap_d
+Tendency of Water Vapor -phy- ; tend_wat_vap_p
+Tendency of Cloud Fraction ; tend_cld_fract
+Tendency of Cloud Fraction -dyn- ; tend_cld_fract_d
+Tendency of Cloud Fraction -phy- ; tend_cld_fract_p
+Tendency of Cloud Liq. Water ; tend_cld_liq
+Tendency of Cloud Liq. Water -dyn- ; tend_cld_liq_d
+Tendency of Cloud Liq. Water -phy- ; tend_cld_liq_p
+Tendency of Cloud Ice Water ; tend_cld_ice
+Tendency of Cloud Ice Water -dyn- ; tend_cld_ice_d
+Tendency of Cloud Ice Water -phy- ; tend_cld_ice_p
+Stratiform Rain 3D ; stra_rain_3d
+Stratiform Snow 3D ; stra_snow_3d
+Convective Rain 3D ; conv_rain_3d
+Convective Snow 3D ; conv_snow_3d
+Conv. Flux of WV ; conv_flx_wv
+Conv. Flux of Dry Static Energy ; conv_flx_s
+Convective U-Momentum Flux ; conv_flx_u
+Convective V-Momentum Flux ; conv_flx_v
+Turb. Flux -inc. neg q- of WV ; turb_flx_wv
+Turb. Flux of Dry Static Energy ; turb_flx_s
+Turbulent Flux of U-Momentum ; turb_flx_u
+Turbulent Flux of V-Momentum ; turb_flx_v
+Turbulent Flux -inc. neg. q- of Ice Water ; turb_flx_ice
+Turbulent Flux -inc. neg. q- of Liq. Water ; turb_flx_liq
+Gravity Wave Drag U-Flux ; gwd_flx_u
+Gravity Wave Drag V-Flux ; gwd_flx_v
+SW radiative Flux ; sw_rad_flux
+LW radiative Flux ; lw_rad_flux
+s-Flux of Stratiform Rain ; s_flux_str_rain
+s-Flux of Stratiform Snow ; s_flux_str_snow
+Stratiform Condensation Flux of Ice Water ; ice_flx_str_cond
+Stratiform Condensation Flux of Liq. Water ; liq_flx_str_cond
+s-Flux of Convective Rain ; s_flux_cnv_rain
+s-Flux of Convective Snow ; s_flux_cnv_snow
+Convective Condensation Flux of Ice Water ; ice_flx_cnv_cond
+Convective Condensation Flux of Liq. Water ; liq_flx_cnv_cond
+Pseudo-Flux of WV to correct q lt 0 ; turb_flx_wv_qpos
+Pseudo-Flux of Liq. Water to Correct fo ql lt 0 ; liq_flx_turb_pos
+Pseudo-Flux of Ice Water to Correct fo qi lt 0 ; ice_flx_turb_pos
+SW Flux Down ; sw_rad_flux_d
+LW Flux Down ; lw_rad_flux_d
+SW heating rate ; sw_heat_rate
+LW heating rate ; lw_heat_rate
+SW+LW heating rate ; tot_heat_rate
+Extra variable extra_col_01 ; extra_col_01
+Extra variable extra_col_02 ; extra_col_02
+Extra variable extra_col_03 ; extra_col_03
+Extra variable extra_col_04 ; extra_col_04
+Extra variable extra_col_05 ; extra_col_05
+Extra variable extra_col_06 ; extra_col_06
+Extra variable extra_col_07 ; extra_col_07
+Extra variable extra_col_08 ; extra_col_08
+Extra variable extra_col_09 ; extra_col_09
+Extra variable extra_col_10 ; extra_col_10
+Extra variable extra_col_11 ; extra_col_11
+Extra variable extra_col_12 ; extra_col_12
+Extra variable extra_col_13 ; extra_col_13
+Extra variable extra_col_14 ; extra_col_14
+Extra variable extra_col_15 ; extra_col_15
+Extra variable extra_col_16 ; extra_col_16
diff --git a/src/Scm/ScmVisualiserRules b/src/Scm/ScmVisualiserRules
new file mode 100644
index 0000000..93c6c45
--- /dev/null
+++ b/src/Scm/ScmVisualiserRules
@@ -0,0 +1,32 @@
+
+%if SCM_PLOT_TYPE = TIME_HEIGHT_MATRIX %or SCM_PLOT_TYPE = PROFILE %then
+	%unset SCM_INPUT_1D_VARIABLES
+	%unset SCM_OUTPUT_1D_VARIABLES
+
+%if SCM_PLOT_TYPE = TIME_VALUE_CURVE %then
+	%unset SCM_INPUT_2D_VARIABLES
+	%unset SCM_OUTPUT_2D_VARIABLES
+
+%if SCM_PLOT_TYPE = TIME_HEIGHT_MATRIX %or SCM_PLOT_TYPE = TIME_VALUE_CURVE %then
+	%unset SCM_TIMES
+
+%if SCM_COMPARE_DATA = OFF %then
+	%unset SCM_COMPARISON_DATA_FILENAME
+	%unset SCM_COMPARISON_DATA
+	%unset SCM_COMPARISON_MODE
+	%unset SCM_COMPARISON_DATA_TITLE
+
+%if SCM_DATA_TYPE = INPUT %then
+	%unset SCM_OUTPUT_1D_VARIABLES
+	%unset SCM_OUTPUT_2D_VARIABLES
+
+%if SCM_DATA_TYPE = OUTPUT %then
+	%unset SCM_INPUT_1D_VARIABLES
+	%unset SCM_INPUT_2D_VARIABLES
+
+%if SCM_OUTPUT_MODE = SCREEN %then
+	%unset SCM_OUTPUT_FILE_PATH
+
+%if SCM_PLOT_TYPE = TIME_VALUE_CURVE %or SCM_PLOT_TYPE = PROFILE %then
+	%unset SCM_VALUE_MIN_LIST
+	%unset SCM_VALUE_MAX_LIST
diff --git a/src/ScmEditor/Makefile.am b/src/ScmEditor/Makefile.am
new file mode 100644
index 0000000..bc8f2f1
--- /dev/null
+++ b/src/ScmEditor/Makefile.am
@@ -0,0 +1,42 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+bin_PROGRAMS      = bin/ScmDataEditor
+
+#-------------------------------------------------
+
+bin_ScmDataEditor_SOURCES = MvMain.cc ScmDataEditor.cc  \
+                    ScmDataEditor.h  scmEditor.qrc
+	
+nodist_bin_ScmDataEditor_SOURCES = ScmDataEditor.moc.cpp scmEditor.qrc.cpp
+
+bin_ScmDataEditor_CPPFLAGS = $(QT_CPPFLAGS) -I../libMvQtGui -I../libUtil
+bin_ScmDataEditor_LDFLAGS  = $(QT_LDFLAGS)
+bin_ScmDataEditor_LDADD    = $(LDADD) ../../lib/libMvQtGui.a  $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_ScmDataEditor_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.ScmEditor
+	 
+	   
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+CLEANFILES = $(share_DATA)
+
+BUILT_SOURCES = bin ScmDataEditor.moc.cpp  scmEditor.qrc.cpp
+
+EXTRA_DIST = ObjectSpec.ScmEditor scmEditor.qrc
+           
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/ScmDataEditor *.o *.moc.cpp *.qrc.cpp
diff --git a/src/ScmEditor/Makefile.in b/src/ScmEditor/Makefile.in
new file mode 100644
index 0000000..6a98bad
--- /dev/null
+++ b/src/ScmEditor/Makefile.in
@@ -0,0 +1,920 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/ScmDataEditor$(EXEEXT)
+subdir = src/ScmEditor
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_ScmDataEditor_OBJECTS = bin_ScmDataEditor-MvMain.$(OBJEXT) \
+	bin_ScmDataEditor-ScmDataEditor.$(OBJEXT)
+nodist_bin_ScmDataEditor_OBJECTS =  \
+	bin_ScmDataEditor-ScmDataEditor.moc.$(OBJEXT) \
+	bin_ScmDataEditor-scmEditor.qrc.$(OBJEXT)
+bin_ScmDataEditor_OBJECTS = $(am_bin_ScmDataEditor_OBJECTS) \
+	$(nodist_bin_ScmDataEditor_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_ScmDataEditor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_ScmDataEditor_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_ScmDataEditor_SOURCES) \
+	$(nodist_bin_ScmDataEditor_SOURCES)
+DIST_SOURCES = $(bin_ScmDataEditor_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+
+#-------------------------------------------------
+bin_ScmDataEditor_SOURCES = MvMain.cc ScmDataEditor.cc  \
+                    ScmDataEditor.h  scmEditor.qrc
+
+nodist_bin_ScmDataEditor_SOURCES = ScmDataEditor.moc.cpp scmEditor.qrc.cpp
+bin_ScmDataEditor_CPPFLAGS = $(QT_CPPFLAGS) -I../libMvQtGui -I../libUtil
+bin_ScmDataEditor_LDFLAGS = $(QT_LDFLAGS)
+bin_ScmDataEditor_LDADD = $(LDADD) ../../lib/libMvQtGui.a  $(STANDARD_METVIEW_LIBS) $(FLIBS) $(QT_LIBS)
+bin_ScmDataEditor_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libUtil.a 
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.ScmEditor
+CLEANFILES = $(share_DATA)
+BUILT_SOURCES = bin ScmDataEditor.moc.cpp  scmEditor.qrc.cpp
+EXTRA_DIST = ObjectSpec.ScmEditor scmEditor.qrc
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ScmEditor/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/ScmEditor/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/ScmDataEditor$(EXEEXT): $(bin_ScmDataEditor_OBJECTS) $(bin_ScmDataEditor_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/ScmDataEditor$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_ScmDataEditor_LINK) $(bin_ScmDataEditor_OBJECTS) $(bin_ScmDataEditor_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ScmDataEditor-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_ScmDataEditor-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-MvMain.o -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-MvMain.Tpo -c -o bin_ScmDataEditor-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-MvMain.Tpo $(DEPDIR)/bin_ScmDataEditor-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_ScmDataEditor-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_ScmDataEditor-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-MvMain.Tpo -c -o bin_ScmDataEditor-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-MvMain.Tpo $(DEPDIR)/bin_ScmDataEditor-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_ScmDataEditor-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_ScmDataEditor-ScmDataEditor.o: ScmDataEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-ScmDataEditor.o -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Tpo -c -o bin_ScmDataEditor-ScmDataEditor.o `test -f 'ScmDataEditor.cc' || echo '$(srcdir)/'`ScmDataEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Tpo $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmDataEditor.cc' object='bin_ScmDataEditor-ScmDataEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-ScmDataEditor.o `test -f 'ScmDataEditor.cc' || echo '$(srcdir)/'`ScmDataEditor.cc
+
+bin_ScmDataEditor-ScmDataEditor.obj: ScmDataEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-ScmDataEditor.obj -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Tpo -c -o bin_ScmDataEditor-ScmDataEditor.obj `if test -f 'ScmDataEditor.cc'; then $(CYGPATH_W) 'ScmDataEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ScmDataEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Tpo $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmDataEditor.cc' object='bin_ScmDataEditor-ScmDataEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-ScmDataEditor.obj `if test -f 'ScmDataEditor.cc'; then $(CYGPATH_W) 'ScmDataEditor.cc'; else $(CYGPATH_W) '$(srcdir)/ScmDataEditor.cc'; fi`
+
+bin_ScmDataEditor-ScmDataEditor.moc.o: ScmDataEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-ScmDataEditor.moc.o -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Tpo -c -o bin_ScmDataEditor-ScmDataEditor.moc.o `test -f 'ScmDataEditor.moc.cpp' || echo '$(srcdir)/'`ScmDataEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Tpo $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmDataEditor.moc.cpp' object='bin_ScmDataEditor-ScmDataEditor.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-ScmDataEditor.moc.o `test -f 'ScmDataEditor.moc.cpp' || echo '$(srcdir)/'`ScmDataEditor.moc.cpp
+
+bin_ScmDataEditor-ScmDataEditor.moc.obj: ScmDataEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-ScmDataEditor.moc.obj -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Tpo -c -o bin_ScmDataEditor-ScmDataEditor.moc.obj `if test -f 'ScmDataEditor.moc.cpp'; then $(CYGPATH_W) 'ScmDataEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/ScmDataEditor.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Tpo $(DEPDIR)/bin_ScmDataEditor-ScmDataEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ScmDataEditor.moc.cpp' object='bin_ScmDataEditor-ScmDataEditor.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-ScmDataEditor.moc.obj `if test -f 'ScmDataEditor.moc.cpp'; then $(CYGPATH_W) 'ScmDataEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/ScmDataEditor.moc.cpp'; fi`
+
+bin_ScmDataEditor-scmEditor.qrc.o: scmEditor.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-scmEditor.qrc.o -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Tpo -c -o bin_ScmDataEditor-scmEditor.qrc.o `test -f 'scmEditor.qrc.cpp' || echo '$(srcdir)/'`scmEditor.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Tpo $(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='scmEditor.qrc.cpp' object='bin_ScmDataEditor-scmEditor.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-scmEditor.qrc.o `test -f 'scmEditor.qrc.cpp' || echo '$(srcdir)/'`scmEditor.qrc.cpp
+
+bin_ScmDataEditor-scmEditor.qrc.obj: scmEditor.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_ScmDataEditor-scmEditor.qrc.obj -MD -MP -MF $(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Tpo -c -o bin_ScmDataEditor-scmEditor.qrc.obj `if test -f 'scmEditor.qrc.cpp'; then $(CYGPATH_W) 'scmEditor.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/scmEditor.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Tpo $(DEPDIR)/bin_ScmDataEditor-scmEditor.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='scmEditor.qrc.cpp' object='bin_ScmDataEditor-scmEditor.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_ScmDataEditor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_ScmDataEditor-scmEditor.qrc.obj `if test -f 'scmEditor.qrc.cpp'; then $(CYGPATH_W) 'scmEditor.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/scmEditor.qrc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f bin/ScmDataEditor *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ScmEditor/MvMain.cc b/src/ScmEditor/MvMain.cc
new file mode 100644
index 0000000..92f950e
--- /dev/null
+++ b/src/ScmEditor/MvMain.cc
@@ -0,0 +1,94 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+
+#include "inc_iostream.h"
+#include "Metview.h"
+#include "MvQService.h"
+
+//#include "MvScm.h"
+#include "ScmDataEditor.h"
+
+using namespace std;
+
+// Globals
+int          ac;
+char       **av;
+
+
+class Base : public MvQService { 
+protected:
+	Base(char* a) : MvQService(a) {};
+};
+
+class MvScmDataEditor: public Base {	
+public:
+	MvScmDataEditor(char *a) : Base(a) {}
+	void serve(MvRequest&,MvRequest&);
+};
+
+
+void MvScmDataEditor::serve( MvRequest& in, MvRequest&)
+{
+  	//Create the qt application
+	QApplication app(ac, av);
+
+	QFont font=app.font();
+	font.setPointSize(9);
+	app.setFont(font);
+	
+	//Initialise resorces from a static library (libMvQtGui)
+	Q_INIT_RESOURCE(examiner);
+	Q_INIT_RESOURCE(window);
+	
+	cout << "--------------ScmDataEditor::serve()--------------" << endl;
+  	in.print();
+	
+	// Get input file name
+	const char* fName = in("PATH");   	
+	if(!fName)
+	{
+	  	setError(13);
+		return; 
+	}
+	
+	string name(fName);
+	MvScm data(name);
+		
+	ScmDataEditor *browser = new ScmDataEditor;
+	browser->init(&data);
+	browser->show();
+
+	//Listen to the mars event loop!
+	setupSocketNotifier();
+	
+	// Send reply to MetviewUI
+	// To turn icon to green; otherwise, it will stay orange
+	MvRequest req;
+	sendReplyFromInteractive(req);
+
+	//Enter the app loop
+	app.exec();		
+}
+
+  	
+int main( int argc, char** argv )
+{
+	ac = argc;
+	av = argv;
+	
+	MvApplication theApp( argc, argv,"ScmDataEditor");
+
+    	MvScmDataEditor editor("SCM_INPUT_DATA");	
+	
+    	theApp.run();
+}
+
+
diff --git a/src/ScmEditor/ObjectSpec.ScmEditor b/src/ScmEditor/ObjectSpec.ScmEditor
new file mode 100644
index 0000000..0d08e51
--- /dev/null
+++ b/src/ScmEditor/ObjectSpec.ScmEditor
@@ -0,0 +1,30 @@
+################################################################################
+#
+#	ObjectSpec.ScmEditor
+#
+
+
+#-----------------------
+# States + services
+#-----------------------
+
+state,
+	class		    = SCM_INPUT_DATA,
+	action		    = save,
+        service		    = savepool
+
+
+state,
+	class		    = SCM_INPUT_DATA,
+	action		    = examine,
+        service		    = NcExaminer
+
+state,
+	class		    = SCM_INPUT_DATA,
+	action		    = edit,
+        service		    = ScmDataEditor
+
+service,
+	cmd           = '$METVIEW_CMD $METVIEW_BIN/ScmDataEditor -maxforks 25 $METVIEW_QT_APPLICATION_FLAGS',
+	name          =  ScmDataEditor
+
diff --git a/src/ScmEditor/ScmDataEditor.cc b/src/ScmEditor/ScmDataEditor.cc
new file mode 100644
index 0000000..dff76f4
--- /dev/null
+++ b/src/ScmEditor/ScmDataEditor.cc
@@ -0,0 +1,838 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAbstractItemView>
+#include <QAction>
+#include <QApplication>
+#include <QComboBox>
+#include <QDebug>
+#include <QDialogButtonBox>
+#include <QHBoxLayout>  
+#include <QLabel>
+#include <QListWidget>
+#include <QMessageBox>
+#include <QPainter>
+#include <QPen>
+#include <QPushButton>
+#include <QScrollBar>
+#include <QSettings>
+#include <QSplitter>
+#include <QStyledItemDelegate>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "ScmDataEditor.h"
+
+#include "MvQAbout.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQProfileWidget.h"
+#include "MvQScmDataWidget.h"
+    
+class MvQScmListDelegate : public QStyledItemDelegate
+{
+public:
+   	MvQScmListDelegate(QObject *parent=0) : QStyledItemDelegate(parent) {pen_=QPen(QColor("#BBBBBB"));}
+	
+	void paint(QPainter *painter, const QStyleOptionViewItem &option,
+               const QModelIndex &index) const
+	{              
+        	//Paint everything
+		QStyledItemDelegate::paint(painter, option, index);
+        
+		//Paint the border
+		painter->save();		
+		painter->setPen(pen_);
+		painter->drawRect(option.rect);
+		painter->restore();
+	}
+protected:	
+	QPen pen_;
+};
+
+
+ScmDataEditor::ScmDataEditor(QWidget *parent) : 
+         MvQMainWindow(parent),
+         data_(0),
+         profileData_(0),
+         ignoreParListW_(false)
+{
+	setAttribute(Qt::WA_DeleteOnClose);	
+
+	setWindowTitle(tr("Metview - SCM Data Editor"));
+
+	//Initial size
+	setInitialSize(1100,800);
+
+	//----------------------
+	// Main layout
+	//----------------------
+	
+	QWidget *w=new QWidget(this);
+	mainLayout_ = new QVBoxLayout(w);
+	mainLayout_->setContentsMargins(0,0,0,0);
+	mainLayout_->setSpacing(1);
+	setCentralWidget(w);
+	
+	//------------------
+	// File info label
+	//------------------
+      	
+	fileInfoLabel_=new MvQFileInfoLabel;
+	mainLayout_->addWidget(fileInfoLabel_);
+	
+	//-------------------
+	// Central splitter
+	//-------------------
+	
+	centralSplitter_= new QSplitter;
+    	centralSplitter_->setOpaqueResize(false);
+	mainLayout_->addWidget(centralSplitter_,1);
+	
+	//-------------------
+	// Central tab	
+	//-------------------
+	
+	dataPanel_=new MvQScmDataWidget(this);		
+	centralSplitter_->addWidget(dataPanel_);
+	
+	//-------------------
+	// Preview area
+	//-------------------
+	
+	QVBoxLayout* viewVb=new QVBoxLayout;
+	viewVb->setContentsMargins(0,0,0,0);
+	viewVb->setSpacing(1);
+	w=new QWidget(this);
+	w->setLayout(viewVb);
+	centralSplitter_->addWidget(w);
+	
+	//Parameter list
+	parListW_ = new QListWidget(this);
+	parListW_->setFlow(QListView::LeftToRight);	
+	parListW_->setWrapping(false);
+	
+     	parListW_->setSpacing(2);
+	parListW_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+	parListW_->setItemDelegate(new MvQScmListDelegate(this));
+	
+	QScrollBar *hbar=parListW_->horizontalScrollBar();
+	if(hbar)
+	{	
+		QFont font;
+		QFontMetrics fm(font);
+		parListW_->setMaximumHeight(fm.height()+hbar->size().height()+4);	
+	}
+	
+	viewVb->addWidget(parListW_);
+	
+	profilePanel_=new MvQProfileWidget(this);
+	viewVb->addWidget(profilePanel_,1);
+
+	//--------------------------
+	// Buttonbox
+	//--------------------------
+	
+	QHBoxLayout *buttonBoxHb=new QHBoxLayout;	
+	
+	buttonBox_= new QDialogButtonBox(this);
+		
+	savePb_=buttonBox_->addButton(QDialogButtonBox::Save);
+	okPb_=buttonBox_->addButton(QDialogButtonBox::Ok);
+	cancelPb_=buttonBox_->addButton(QDialogButtonBox::Cancel);	
+	resetPb_=buttonBox_->addButton(QDialogButtonBox::Reset);
+	
+	savePb_->setDefault(true);
+	savePb_->setEnabled(false);
+	resetPb_->setEnabled(false);
+	
+	//buttonBox_->addButton(QDialogButtonBox::Close);
+
+	connect(buttonBox_, SIGNAL(clicked(QAbstractButton*)), 
+		this, SLOT(slotButtonClicked(QAbstractButton*)));
+	
+	buttonBoxHb->addSpacing(5);
+	buttonBoxHb->addWidget(buttonBox_);	
+	buttonBoxHb->addSpacing(5);
+	
+	mainLayout_->addSpacing(5);
+	mainLayout_->addLayout(buttonBoxHb);		
+	mainLayout_->addSpacing(5);
+	
+	//----------------------------
+	// Setup actions
+	//----------------------------
+
+	setupEditActions();
+	setupViewActions();
+	setupAnimationActions();
+	setupHelpActions();
+
+	//----------------------------
+	// Setup menus and toolbars
+	//----------------------------
+
+	setupMenus(menuItems_);
+	
+	//-----------------
+	// Signals slots
+	//-----------------
+	
+	connect(dataPanel_,SIGNAL(dataEdited(const MvScmProfileChange&)),
+		    this,SLOT(slotDataEdited(const MvScmProfileChange&)));
+	
+	connect(dataPanel_,SIGNAL(paramSelected(MvScmVar*,int)),
+		    this,SLOT(slotParamSelectedFromData(MvScmVar*,int)));
+		    
+	connect(dataPanel_,SIGNAL(stepChanged(int)),
+		    this,SLOT(slotStepChanged(int)));
+		    	
+	//----------------------------
+	// Read settings
+	//----------------------------
+	
+	readSettings();
+}
+ 
+ScmDataEditor::~ScmDataEditor()
+{
+	writeSettings();
+}
+
+void ScmDataEditor::setupEditActions()
+{
+	actionRedo_ = new QAction(this);
+        actionRedo_->setObjectName(QString::fromUtf8("actionRedo"));
+	actionRedo_->setText(tr("Redo"));
+	actionRedo_->setToolTip(tr("Redo"));
+	actionRedo_->setShortcut(tr("Ctrl+Shift+Z"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/scmEditor/redo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionRedo_->setIcon(icon);
+	actionRedo_->setEnabled(false);
+  
+  	actionUndo_ = new QAction(this);
+        actionUndo_->setObjectName(QString::fromUtf8("actionUndo"));
+	actionUndo_->setText(tr("Undo"));
+	actionUndo_->setToolTip(tr("Undo"));
+	actionUndo_->setShortcut(tr("Ctrl+Z"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/scmEditor/undo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionUndo_->setIcon(icon1);
+	actionUndo_->setEnabled(false);
+	
+	actionOverwrite_ = new QAction(this);
+        actionOverwrite_->setObjectName(QString::fromUtf8("actionOverwrite"));
+	actionOverwrite_->setText(tr("Overwrite steps"));
+	actionOverwrite_->setToolTip(tr("Overwrite steps with current step"));
+ 	actionOverwrite_->setIcon(QPixmap(QString::fromUtf8(":/scmEditor/overwrite_steps.svg")));
+	
+	actionConsistency_ = new QAction(this);
+        actionConsistency_->setObjectName(QString::fromUtf8("actionLink"));
+	actionConsistency_->setText(tr("Check consistency"));
+	actionConsistency_->setToolTip(tr("Check consistency between parameters"));
+	actionConsistency_->setCheckable(true);
+	actionConsistency_->setChecked(false);
+	actionConsistency_->setIcon(QPixmap(QString::fromUtf8(":/scmEditor/check_consistency.svg")));	
+	
+	connect(actionUndo_,SIGNAL(triggered(bool)),
+		this,SLOT(slotUndo(bool)));
+		
+	connect(actionRedo_,SIGNAL(triggered(bool)),
+		this,SLOT(slotRedo(bool)));	
+		
+	connect(actionOverwrite_,SIGNAL(triggered(bool)),
+		this,SLOT(slotOverwrite(bool)));
+	
+	connect(actionConsistency_,SIGNAL(toggled(bool)),
+		this,SLOT(slotConsistency(bool)));	
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::EditMenu;		
+	menuItems_[menuType].push_back(new MvQMenuItem(actionUndo_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionRedo_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionOverwrite_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionConsistency_));	
+}
+
+
+void ScmDataEditor::setupAnimationActions()
+{
+	actionNext_ = new QAction(this);
+        actionNext_->setObjectName(QString::fromUtf8("actionRedo"));
+	actionNext_->setText(tr("&Next"));
+	actionNext_->setToolTip(tr("Next step"));
+	actionNext_->setShortcut(tr("Right"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/scmEditor/player_next.svg")), QIcon::Normal, QIcon::Off);
+ 	actionNext_->setIcon(icon);
+  
+  	actionPrev_ = new QAction(this);
+        actionPrev_->setObjectName(QString::fromUtf8("actionUndo"));
+	actionPrev_->setText(tr("&Previous"));
+	actionPrev_->setToolTip(tr("Previous step"));
+	actionPrev_->setShortcut(tr("Left"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/scmEditor/player_prev.svg")), QIcon::Normal, QIcon::Off);
+ 	actionPrev_->setIcon(icon1);
+		
+	connect(actionNext_,SIGNAL(triggered(bool)),
+		this,SLOT(slotToNext(bool)));
+		
+	connect(actionPrev_,SIGNAL(triggered(bool)),
+		this,SLOT(slotToPrev(bool)));	
+				
+	 //Combo box
+        //We will add items + signal/slots later in "init"!
+        QHBoxLayout *hb=new  QHBoxLayout;
+	hb->setContentsMargins(10,2,10,2);
+	
+        //Combo box for key profile selection
+        QLabel *label = new QLabel(tr("&Steps:"));
+        stepCombo_ = new QComboBox;
+	stepCombo_->view()->setTextElideMode(Qt::ElideNone);
+	stepCombo_->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+        label->setBuddy(stepCombo_);
+
+        hb->addWidget(label);
+        hb->addWidget(stepCombo_);
+        QWidget* wh=new QWidget;
+        wh->setLayout(hb);
+	
+	//Slot for the ombo will be added later in init
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::StepMenu;		
+	menuItems_[menuType].push_back(new MvQMenuItem(wh));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionPrev_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionNext_));
+}
+
+
+void ScmDataEditor::setupViewActions()
+{
+	//
+	actionFileInfo_ = new QAction(this);
+        actionFileInfo_->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo_->setText(tr("File info"));
+	actionFileInfo_->setCheckable(true);
+	actionFileInfo_->setChecked(true);
+	actionFileInfo_->setToolTip(tr("View file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/fileInfo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo_->setIcon(icon);	
+	
+	//Define routines
+	connect(actionFileInfo_,SIGNAL(toggled(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+		
+		
+	QAction *ac;
+	ac = new QAction(this);
+	ac->setObjectName(QString::fromUtf8("actionShowEditable"));
+	ac->setText(tr("Show editable parameters only"));
+	ac->setCheckable(true);
+	ac->setChecked(false);
+	ac->setToolTip(tr("Show editable parameters only"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/scmEditor/show_editable_only.svg")), QIcon::Normal, QIcon::Off);
+ 	ac->setIcon(icon1);		
+
+	actionShowEditable_ = ac;
+	
+	connect(actionShowEditable_,SIGNAL(toggled(bool)),
+		this,SLOT(slotShowEditableParams(bool)));
+	
+	
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;		
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionShowEditable_));		
+}
+
+void ScmDataEditor::setupHelpActions()
+{		
+    	// About
+    	QAction *actionAbout = new QAction(this);
+    	actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
+    	QIcon icon;
+    	icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+    	actionAbout->setIcon(icon);
+    	actionAbout->setText(tr("&About SCM Data Editor"));
+
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	menuItems_[menuType ].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+		
+void ScmDataEditor::init(MvScm *data)
+{	
+  	if(data->stepNum() <= 0)
+	{
+	  	data_=0;
+		return;
+	}	
+	
+	data_=data;
+	
+	//Set actual consistency status in data
+	data_->needConsistency(actionConsistency_->isChecked());
+	
+	//Get editable variables
+	editableVars_ << data_->mlVar(MvScm::TempML) << 
+	             data_->mlVar(MvScm::WindUML) << data_->mlVar(MvScm::WindVML) << data_->mlVar(MvScm:: SpHumML) << 
+	             data_->mlVar(MvScm::RelHumML) << data_->mlVar(MvScm::CloudLiqML) << data_->mlVar(MvScm::CloudIceML);	
+	
+	//Soil
+	editableVars_<< data_->soilVar(MvScm::TempSoil) << data_->soilVar(MvScm::HumSoil);
+		     
+	//Siurface
+	for(unsigned int i=0; i < data_->surfaceLevel().size(); i++)
+	  	editableVars_ << data_->surfaceLevel().at(i);	     
+		     
+	//This method will select a paramater in the table view! This will trigger an uopdate in he profile view as well! 
+	dataPanel_->init(data,editableVars_);
+	
+	//Par list widget
+	for(int i=0; i < static_cast<int>(data_->modelLevel().size()); i++)
+	{
+		QString name=QString::fromStdString(data_->modelLevel().at(i)->name());
+	  	if(name.size() == 1)
+		{
+			name="   " + name + "   ";
+		}
+		else if(name.size() == 2)
+		{
+		  	name="  " + name + "  ";
+		}
+
+	  	QListWidgetItem* item=new QListWidgetItem(name);
+	  	item->setData(Qt::UserRole,i);
+		
+		if(editableVars_.contains(data_->modelLevel().at(i)))	
+			item->setBackground(QColor("#FFF2DE"));		
+		else
+			item->setBackground(QColor("#E8D1AE"));
+		
+		parListW_->addItem(item);
+	}  	
+	
+	connect(parListW_,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
+		this,SLOT(slotParamSelectedFromList(QListWidgetItem*,QListWidgetItem*)));
+	
+	//Steps
+	editPix_=QPixmap(QString::fromUtf8(":/scmEditor/edit.svg"));
+	noEditPix_=QPixmap(editPix_.size());
+	noEditPix_.fill(QColor(255,255,255,0));
+	
+	QFont font;
+	QFontMetrics fm(font);
+	stepCombo_->setIconSize(QSize(16,16));
+	
+	const vector<float>& steps=data_->steps();
+	
+	for(int i=0; i < static_cast<int>(steps.size()); i++)
+	{		
+	  	QString txt=QString::number(steps.at(i)/3600) + " h      ";
+	  	stepCombo_->addItem(noEditPix_,txt);
+		stepCombo_->setItemData(stepCombo_->count()-1,0);		
+	}	
+	
+	connect(stepCombo_, SIGNAL(currentIndexChanged(int)),
+                dataPanel_, SLOT(slotStepChanged(int)));
+	
+	stepCombo_->setCurrentIndex(0);	
+	updateAnimationActionState();
+
+	//Fileinfo label
+	updateFileInfoLabel();
+}
+
+void ScmDataEditor::reload()
+{
+	dataPanel_->reload();
+	profilePanel_->reload();
+}  
+
+void ScmDataEditor::slotParamSelectedFromData(MvScmVar *var, int step)
+{		
+	if(profileData_ && profileData_->var() == var && profileData_->step() == step)
+	{
+		return;
+	}
+	
+	updateAnimationActionState();	
+	
+	bool editable=(editableVars_.indexOf(var) != -1)?true:false;
+	
+	QList<MvProfileData*> lst;
+	
+	profileData_=new MvScmProfileData(data_,var,step);	
+	profileData_->setObserver(this);
+	lst << profileData_;
+		
+	//Temperature
+	if(data_->mlVar(MvScm::TempML) == var)
+	{
+		//Surf
+		MvScmVar *skinT=data_->surfVar(MvScm::TempSurf);
+		if(skinT)
+		{
+		  	MvScmProfileData *p=new MvScmProfileData(data_,skinT,step);
+		  	lst << p;
+			p->setObserver(this);
+		}
+		
+		//Soil
+		MvScmVar *soilT=data_->soilVar(MvScm::TempSoil);
+		if(soilT)
+		{
+		  	MvScmProfileData *p=new MvScmProfileData(data_,soilT,step);
+		 	lst << p;
+			p->setObserver(this);
+		}
+	} 
+	
+	profilePanel_->setProfile(lst,editable);	
+	
+	//Set the current index for param list
+	updateParListW(var);
+}	
+
+void ScmDataEditor::slotParamSelectedFromList(QListWidgetItem* current,QListWidgetItem*)
+{
+	if(ignoreParListW_)
+	  	return;
+	
+	if(current)
+	{
+	  	int index=current->data(Qt::UserRole).toInt();
+		if(index >= 0 && index < static_cast<int>(data_->modelLevel().size()))
+		{
+			slotParamSelectedFromData(data_->modelLevel().at(index),stepCombo_->currentIndex()); 
+			dataPanel_->selectMlParam(data_->modelLevel().at(index)); 	
+		}
+	}	
+}  
+
+void ScmDataEditor::updateParListW(MvScmVar *var)
+{
+	if(!var)
+		return;
+	
+	ignoreParListW_=true;
+	
+	for(int i=0; i < static_cast<int>(data_->modelLevel().size()); i++)
+	{
+	  	if(data_->modelLevel().at(i) == var)
+		{
+			parListW_->setCurrentRow(i);
+			break;
+		}	
+	}	  
+	ignoreParListW_=false;
+}  
+
+void ScmDataEditor::slotStepChanged(int step)
+{
+	updateAnimationActionState();
+	
+	if(profileData_)
+		slotParamSelectedFromData(profileData_->var(),step); 
+}
+
+void ScmDataEditor::slotShowAboutBox()
+{
+	MvQAbout about("SCM Data Editor","",MvQAbout::MetviewVersion );
+	about.exec();
+}
+
+void ScmDataEditor::updateFileInfoLabel()
+{
+	fileInfoLabel_->setScmTextLabel(QString::fromStdString(data_->fileName()),data_->stepNum(),data_->modelLevelNum());
+}
+
+//Callback from the table view editor
+void ScmDataEditor::slotDataEdited(const MvScmProfileChange& item)
+{
+	profilePanel_->update(item);
+	registerValueChange(item);
+	
+	updateStepStatus(item.step(),true);
+	updateParListW(item.var());
+	
+  	savePb_->setEnabled(true); 
+	resetPb_->setEnabled(true); 
+}
+
+//ProfileObserver method - Callback from curve plot editor, via the data object
+void ScmDataEditor::profileEdited(const MvScmProfileChange& item) 
+{
+	dataPanel_->update(item);
+ 	registerValueChange(item);
+  
+	updateStepStatus(item.step(),true);
+	updateParListW(item.var());
+	
+	savePb_->setEnabled(true); 
+	resetPb_->setEnabled(true);
+}
+
+void ScmDataEditor::slotRedo(bool)
+{
+  	const MvScmProfileChange& item=editHistory_.redo();
+  	if(item.var())
+	{
+	  	item.var()->setValue(item.step(),item.level(),item.value());
+		dataPanel_->update(item);
+		profilePanel_->update(item);	
+	}
+	
+	updateEditActionStatus();  
+} 
+
+void ScmDataEditor::slotUndo(bool)
+{
+	const MvScmProfileChange& item=editHistory_.undo();
+  	if(item.var())
+	{
+	  	item.var()->setValue(item.step(),item.level(),item.prevValue());
+		dataPanel_->update(item);
+		profilePanel_->update(item);	
+	}
+
+	updateEditActionStatus();
+}  
+
+void ScmDataEditor::registerValueChange(const MvScmProfileChange& item)
+{
+	editHistory_.add(item);
+	updateEditActionStatus();
+}
+
+void ScmDataEditor::updateEditActionStatus()
+{
+ 	if(editHistory_.canRedo())
+	{
+	  	actionRedo_->setEnabled(true);
+	}
+	else
+	{
+	  	actionRedo_->setEnabled(false);
+	}
+	
+	if(editHistory_.canUndo())
+	{
+		actionUndo_->setEnabled(true);
+	}
+	else
+	{
+	  	actionUndo_->setEnabled(false);
+	}	
+}
+
+void ScmDataEditor::slotToNext(bool)
+{
+ 	int index=stepCombo_->currentIndex();
+  	if(index < stepCombo_->count()-1)
+		stepCombo_->setCurrentIndex(index+1); 
+	
+	updateAnimationActionState();   
+} 
+
+void ScmDataEditor::slotToPrev(bool)
+{
+ 	int index=stepCombo_->currentIndex();
+  	if(index >0)
+		stepCombo_->setCurrentIndex(index-1);  
+	
+	updateAnimationActionState();  
+} 
+
+void ScmDataEditor::updateStepStatus(int step,bool edited)
+{
+	if(step >=0 && step < stepCombo_->count())
+	{
+	  	bool act=stepCombo_->itemData(step).toBool();
+		
+		if(act != edited)
+		{
+			if(edited)  
+		  		stepCombo_->setItemIcon(step,editPix_);	
+			else
+			  	stepCombo_->setItemIcon(step,noEditPix_);			
+		}
+	}
+}	
+
+void ScmDataEditor::updateAnimationActionState()
+{
+  	if(stepCombo_->count() <=1)
+	{  
+  		actionPrev_->setEnabled(false);
+		actionNext_->setEnabled(false);
+	}	
+  	else if(stepCombo_->currentIndex() == 0)
+	{
+	  	actionPrev_->setEnabled(false);
+		actionNext_->setEnabled(true);
+		
+	}
+	else if(stepCombo_->currentIndex() == stepCombo_->count()-1)
+	{
+	  	actionNext_->setEnabled(false);
+		actionPrev_->setEnabled(true);		
+	}
+	else
+	{
+	  	actionNext_->setEnabled(true);
+		actionPrev_->setEnabled(true);
+	}	
+}
+
+
+
+void ScmDataEditor::slotShowEditableParams(bool showEditable)
+{
+	if(showEditable)
+	{ 
+		for(int i=0; i < parListW_->count(); i++)
+		{
+		  	QListWidgetItem* item=parListW_->item(i);
+		  	int index=item->data(Qt::UserRole).toInt();
+		  	if(!editableVars_.contains(data_->modelLevel().at(index)))
+			{
+				item->setHidden(true);
+			}
+		}		
+	}
+	else
+	{
+	  	for(int i=0; i < parListW_->count(); i++)
+	  		parListW_->item(i)->setHidden(false);
+	}
+	
+	dataPanel_->showEditableParams(showEditable);
+	
+}
+
+void ScmDataEditor::slotOverwrite(bool b)
+{
+	if(data_)
+	{
+	 	int ts=stepCombo_->currentIndex(); 
+		
+		if(QMessageBox::warning(0,QObject::tr("Overwrite steps"),QObject::tr("Do you really want to overwrite all other steps with the data in the current step (") + stepCombo_->currentText().simplified() + ") ?",
+		   QMessageBox::Yes | QMessageBox::Cancel,QMessageBox::Cancel) == QMessageBox::Yes)
+		{
+  			data_->overwrite(ts);
+			
+			//Clear the edithistory
+			editHistory_.clear();
+			updateEditActionStatus();	
+		}	
+	}	
+}
+
+void ScmDataEditor::slotConsistency(bool b)
+{
+	if(data_)
+		data_->needConsistency(b);  
+}
+
+
+void ScmDataEditor::slotButtonClicked(QAbstractButton* button)
+{
+	if(!button) return;
+	
+	if(buttonBox_->standardButton(button) == QDialogButtonBox::Cancel)
+	{
+		closeEditor();	
+	}
+	else if(buttonBox_->standardButton(button) == QDialogButtonBox::Ok)
+	{
+	  	apply();
+		closeEditor();
+	}	
+	else if(buttonBox_->standardButton(button) == QDialogButtonBox::Save)
+	{
+	  	apply();
+		
+		savePb_->setEnabled(false);
+		resetPb_->setEnabled(false);
+		
+	}
+	else if(buttonBox_->standardButton(button) == QDialogButtonBox::Reset)
+	{
+		reset();
+		savePb_->setEnabled(false);
+		resetPb_->setEnabled(false);
+	}	
+}  
+
+void ScmDataEditor::apply()
+{
+ 	data_->save(); 
+}  
+
+void ScmDataEditor::reset()
+{
+  	data_->reset();
+	reload();
+	editHistory_.clear();
+	updateEditActionStatus();
+}  
+
+void ScmDataEditor::closeEditor()
+{
+ 	close();
+}  
+
+void ScmDataEditor::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-ScmDataEditor");
+	settings.clear();
+	
+	settings.beginGroup("mainWindow");
+	settings.setValue("geometry",saveGeometry());
+	//settings.setValue("mainSplitter",mainSplitter_->saveState());
+	settings.setValue("centralSplitter",centralSplitter_->saveState());
+	settings.setValue("actionFileInfoStatus",actionFileInfo_->isChecked());
+	settings.setValue("actionShowEditableStatus",actionShowEditable_->isChecked());
+	settings.setValue("actionConsistencyStatus",actionConsistency_->isChecked());
+	settings.endGroup();
+	
+	profilePanel_->writeSettings(settings);
+}
+
+void ScmDataEditor::readSettings()
+{
+	QSettings settings("ECMWF","MV4-ScmDataEditor");
+		
+	settings.beginGroup("mainWindow");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	//mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+	centralSplitter_->restoreState(settings.value("centralSplitter").toByteArray());	
+	
+	if(settings.value("actionFileInfoStatus").isNull())
+		actionFileInfo_->setChecked(true);
+	else
+		actionFileInfo_->setChecked(settings.value("actionFileInfoStatus").toBool());
+	
+	if(settings.value("actionShowEditableStatus").isNull())
+		actionShowEditable_->setChecked(false);
+	else
+		actionShowEditable_->setChecked(settings.value("actionShowEditableStatus").toBool());
+	
+	if(settings.value("actionConsistencyStatus").isNull())
+		actionConsistency_->setChecked(false);
+	else
+		actionConsistency_->setChecked(settings.value("actionConsistencyStatus").toBool());
+	
+	settings.endGroup();
+	
+	profilePanel_->readSettings(settings);
+}
diff --git a/src/ScmEditor/ScmDataEditor.h b/src/ScmEditor/ScmDataEditor.h
new file mode 100644
index 0000000..3814087
--- /dev/null
+++ b/src/ScmEditor/ScmDataEditor.h
@@ -0,0 +1,131 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ScmDataEditor_H
+#define ScmDataEditor_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+#include <QPixmap>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+#include "MvCommandHistory.h"
+#include "MvScm.h"
+
+class QAbstractButton;
+class QAction;
+class QComboBox;
+class QDialogButtonBox;
+class QLabel;
+class QListWidget;
+class QListWidgetItem;
+class QPushButton;
+class QSplitter;
+class QVBoxLayout;
+
+class MvQFileInfoLabel;
+class MvQLogBrowser;
+class MvQProfileWidget;
+class MvQRangeWidget;
+class MvQScmDataWidget;
+
+class MvScm;
+class MvScmVar;
+class MvScmProfileData;
+
+using namespace std;
+
+class ScmDataEditor : public MvQMainWindow, public MvScmProfileObserver
+{
+    Q_OBJECT
+
+public:
+    	ScmDataEditor(QWidget *parent = 0);
+	~ScmDataEditor();
+    	void init(MvScm*);
+	void updateFileInfoLabel();
+	
+	//From MvScmProfileObserver
+	void profileEdited(const MvScmProfileChange&);
+
+public slots:
+	void slotShowAboutBox();
+	void slotParamSelectedFromData(MvScmVar*,int);
+	void slotParamSelectedFromList(QListWidgetItem*,QListWidgetItem*);
+	void slotStepChanged(int);
+	void slotToNext(bool);
+	void slotToPrev(bool);
+	void slotDataEdited(const MvScmProfileChange&);
+	void slotUndo(bool);
+	void slotRedo(bool);
+	void slotOverwrite(bool);
+	void slotConsistency(bool);
+	void slotShowEditableParams(bool);
+	void slotButtonClicked(QAbstractButton*);
+	
+protected:
+	void setupEditActions();
+	void setupViewActions();
+	void setupSettingsActions();
+	void setupAnimationActions();
+	void setupHelpActions();
+	void setupProfileBox();
+	void reload();
+	void updateParListW(MvScmVar*);
+	
+	void registerValueChange(const MvScmProfileChange&);
+	void updateEditActionStatus();	
+	void updateStepStatus(int,bool);
+	void updateAnimationActionState();
+	
+	void apply();
+	void reset();
+	void closeEditor();
+	void readSettings();
+	void writeSettings();
+
+ 	MvScm *data_;
+	MvQMainWindow::MenuItemMap menuItems_;
+	MvQFileInfoLabel*  fileInfoLabel_;
+ 
+	QVBoxLayout* mainLayout_;
+	QSplitter*   mainSplitter_;
+	QSplitter*   centralSplitter_;
+	QAction* actionFileInfo_;
+	QAction* actionRedo_;
+	QAction* actionUndo_;
+	QAction* actionShowEditable_;
+	QAction* actionOverwrite_;
+	QAction* actionConsistency_;
+	
+	QList<MvScmVar*> editableVars_;	
+	MvCommandHistory<MvScmProfileChange> editHistory_;
+		
+	QDialogButtonBox* buttonBox_;
+	QPushButton* savePb_;
+	QPushButton* okPb_;
+	QPushButton* cancelPb_;
+	QPushButton* resetPb_;
+	
+	MvScmProfileData *profileData_;
+	MvQScmDataWidget *dataPanel_;
+	QListWidget* parListW_;
+	bool ignoreParListW_;
+	MvQProfileWidget *profilePanel_;
+	
+	QComboBox *stepCombo_;
+	QPixmap editPix_;
+	QPixmap noEditPix_;
+	QAction *actionNext_;
+	QAction *actionPrev_;
+ };
+
+#endif
diff --git a/src/ScmEditor/scmEditor.qrc b/src/ScmEditor/scmEditor.qrc
new file mode 100644
index 0000000..ddc1dc8
--- /dev/null
+++ b/src/ScmEditor/scmEditor.qrc
@@ -0,0 +1,12 @@
+<RCC>
+  <qresource prefix="scmEditor" > 
+    <file alias="check_consistency.svg">../images/check_consistency.svg</file>
+    <file alias="edit.svg">../images/edit.svg</file>
+    <file alias="overwrite_steps.svg">../images/overwrite_steps.svg</file>
+    <file alias="player_next.svg">../images/player_next.svg</file>
+    <file alias="player_prev.svg">../images/player_prev.svg</file>
+    <file alias="redo.svg">../images/redo.svg</file> 
+    <file alias="show_editable_only.svg">../images/show_editable_only.svg</file>
+    <file alias="undo.svg">../images/undo.svg</file>
+  </qresource>
+</RCC>
diff --git a/src/Stations/Makefile.am b/src/Stations/Makefile.am
new file mode 100644
index 0000000..1f45914
--- /dev/null
+++ b/src/Stations/Makefile.am
@@ -0,0 +1,75 @@
+ 
+bin_PROGRAMS = bin/station  bin/stbase  writebase
+
+bin_station_SOURCES  = Station.cc utils.cc station.h
+bin_station_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_station_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(MV_MOTIF_UTIL_LIB) $(DBMLIB)
+
+
+bin_stbase_SOURCES  = stcback.cc stbase.c utils.cc stbase.h utils.h
+bin_stbase_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_stbase_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(MV_MOTIF_UTIL_LIB) $(DBMLIB)
+
+
+writebase_SOURCES  = writebase.c
+writebase_LDADD    = $(DBMLIB)
+
+
+
+
+sharedir    = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+
+STATIONS_DB_FILES = $(local_sharedir)/stations-l.db $(local_sharedir)/stations-i.db $(local_sharedir)/stations-n.db
+share_DATA  = $(STATIONS_DB_FILES)
+
+
+
+
+#
+#  Issue from the past that might resurface on some platforms?
+#  We now (November 2010) create the databases locally in order to
+#  avoid permission problems.
+#
+#  Swarm linux cluster: dbm_open fails if database is NFS mounted!
+#                       => create database on /tmp and move it over
+#
+
+BASEDIR=$(sharedir)
+BASEFILE=stations
+
+
+all: $(STATIONS_DIR_FILES)
+
+$(local_sharedir)/stations-i.db : stat.fmt writebase
+	@printf "\n Check LD_LIBRARY_PATH (or equivalent) if problems with 'ld'!\n\n"
+	./writebase -i $(BASEFILE) < stat.fmt
+	${INSTALL} stations-i.db  $@
+	-chmod a+r $@
+	-chmod g+w $@
+
+$(local_sharedir)/stations-n.db : stat.fmt writebase
+	@@printf "\n Check LD_LIBRARY_PATH (or equivalent) if problems with 'ld'!\n\n"
+	./writebase -n $(BASEFILE) < stat.fmt
+	${INSTALL} stations-n.db  $@
+	-chmod a+r $@
+	-chmod g+w $@
+
+$(local_sharedir)/stations-l.db : stat.fmt writebase
+	@@printf "\n Check LD_LIBRARY_PATH (or equivalent) if problems with 'ld'!\n\n"
+	./writebase -l $(BASEFILE) < stat.fmt
+	${INSTALL} stations-l.db  $@
+	-chmod a+r $@
+	-chmod g+w $@
+
+
+CLEANFILES = $(STATIONS_DB_FILES)
+
+
+BUILT_SOURCES = bin
+
+EXTRA_DIST = stat.fmt
+#EPS_stations
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Stations/Makefile.in b/src/Stations/Makefile.in
new file mode 100644
index 0000000..feb2a5b
--- /dev/null
+++ b/src/Stations/Makefile.in
@@ -0,0 +1,864 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/station$(EXEEXT) bin/stbase$(EXEEXT) \
+	writebase$(EXEEXT)
+subdir = src/Stations
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_station_OBJECTS = bin_station-Station.$(OBJEXT) \
+	bin_station-utils.$(OBJEXT)
+bin_station_OBJECTS = $(am_bin_station_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_station_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_stbase_OBJECTS = bin_stbase-stcback.$(OBJEXT) \
+	bin_stbase-stbase.$(OBJEXT) bin_stbase-utils.$(OBJEXT)
+bin_stbase_OBJECTS = $(am_bin_stbase_OBJECTS)
+bin_stbase_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_writebase_OBJECTS = writebase.$(OBJEXT)
+writebase_OBJECTS = $(am_writebase_OBJECTS)
+writebase_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_station_SOURCES) $(bin_stbase_SOURCES) \
+	$(writebase_SOURCES)
+DIST_SOURCES = $(bin_station_SOURCES) $(bin_stbase_SOURCES) \
+	$(writebase_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_station_SOURCES = Station.cc utils.cc station.h
+bin_station_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_station_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(MV_MOTIF_UTIL_LIB) $(DBMLIB)
+bin_stbase_SOURCES = stcback.cc stbase.c utils.cc stbase.h utils.h
+bin_stbase_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_stbase_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(MV_MOTIF_UTIL_LIB) $(DBMLIB)
+writebase_SOURCES = writebase.c
+writebase_LDADD = $(DBMLIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+STATIONS_DB_FILES = $(local_sharedir)/stations-l.db $(local_sharedir)/stations-i.db $(local_sharedir)/stations-n.db
+share_DATA = $(STATIONS_DB_FILES)
+
+#
+#  Issue from the past that might resurface on some platforms?
+#  We now (November 2010) create the databases locally in order to
+#  avoid permission problems.
+#
+#  Swarm linux cluster: dbm_open fails if database is NFS mounted!
+#                       => create database on /tmp and move it over
+#
+BASEDIR = $(sharedir)
+BASEFILE = stations
+CLEANFILES = $(STATIONS_DB_FILES)
+BUILT_SOURCES = bin
+EXTRA_DIST = stat.fmt
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Stations/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Stations/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/station$(EXEEXT): $(bin_station_OBJECTS) $(bin_station_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/station$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_station_OBJECTS) $(bin_station_LDADD) $(LIBS)
+bin/stbase$(EXEEXT): $(bin_stbase_OBJECTS) $(bin_stbase_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/stbase$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_stbase_OBJECTS) $(bin_stbase_LDADD) $(LIBS)
+writebase$(EXEEXT): $(writebase_OBJECTS) $(writebase_DEPENDENCIES) 
+	@rm -f writebase$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(writebase_OBJECTS) $(writebase_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_station-Station.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_station-utils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_stbase-stbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_stbase-stcback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_stbase-utils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/writebase.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bin_stbase-stbase.o: stbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_stbase-stbase.o -MD -MP -MF $(DEPDIR)/bin_stbase-stbase.Tpo -c -o bin_stbase-stbase.o `test -f 'stbase.c' || echo '$(srcdir)/'`stbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_stbase-stbase.Tpo $(DEPDIR)/bin_stbase-stbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='stbase.c' object='bin_stbase-stbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_stbase-stbase.o `test -f 'stbase.c' || echo '$(srcdir)/'`stbase.c
+
+bin_stbase-stbase.obj: stbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_stbase-stbase.obj -MD -MP -MF $(DEPDIR)/bin_stbase-stbase.Tpo -c -o bin_stbase-stbase.obj `if test -f 'stbase.c'; then $(CYGPATH_W) 'stbase.c'; else $(CYGPATH_W) '$(srcdir)/stbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_stbase-stbase.Tpo $(DEPDIR)/bin_stbase-stbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='stbase.c' object='bin_stbase-stbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_stbase-stbase.obj `if test -f 'stbase.c'; then $(CYGPATH_W) 'stbase.c'; else $(CYGPATH_W) '$(srcdir)/stbase.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_station-Station.o: Station.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_station-Station.o -MD -MP -MF $(DEPDIR)/bin_station-Station.Tpo -c -o bin_station-Station.o `test -f 'Station.cc' || echo '$(srcdir)/'`Station.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_station-Station.Tpo $(DEPDIR)/bin_station-Station.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Station.cc' object='bin_station-Station.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_station-Station.o `test -f 'Station.cc' || echo '$(srcdir)/'`Station.cc
+
+bin_station-Station.obj: Station.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_station-Station.obj -MD -MP -MF $(DEPDIR)/bin_station-Station.Tpo -c -o bin_station-Station.obj `if test -f 'Station.cc'; then $(CYGPATH_W) 'Station.cc'; else $(CYGPATH_W) '$(srcdir)/Station.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_station-Station.Tpo $(DEPDIR)/bin_station-Station.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Station.cc' object='bin_station-Station.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_station-Station.obj `if test -f 'Station.cc'; then $(CYGPATH_W) 'Station.cc'; else $(CYGPATH_W) '$(srcdir)/Station.cc'; fi`
+
+bin_station-utils.o: utils.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_station-utils.o -MD -MP -MF $(DEPDIR)/bin_station-utils.Tpo -c -o bin_station-utils.o `test -f 'utils.cc' || echo '$(srcdir)/'`utils.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_station-utils.Tpo $(DEPDIR)/bin_station-utils.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils.cc' object='bin_station-utils.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_station-utils.o `test -f 'utils.cc' || echo '$(srcdir)/'`utils.cc
+
+bin_station-utils.obj: utils.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_station-utils.obj -MD -MP -MF $(DEPDIR)/bin_station-utils.Tpo -c -o bin_station-utils.obj `if test -f 'utils.cc'; then $(CYGPATH_W) 'utils.cc'; else $(CYGPATH_W) '$(srcdir)/utils.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_station-utils.Tpo $(DEPDIR)/bin_station-utils.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils.cc' object='bin_station-utils.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_station_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_station-utils.obj `if test -f 'utils.cc'; then $(CYGPATH_W) 'utils.cc'; else $(CYGPATH_W) '$(srcdir)/utils.cc'; fi`
+
+bin_stbase-stcback.o: stcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_stbase-stcback.o -MD -MP -MF $(DEPDIR)/bin_stbase-stcback.Tpo -c -o bin_stbase-stcback.o `test -f 'stcback.cc' || echo '$(srcdir)/'`stcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_stbase-stcback.Tpo $(DEPDIR)/bin_stbase-stcback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='stcback.cc' object='bin_stbase-stcback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_stbase-stcback.o `test -f 'stcback.cc' || echo '$(srcdir)/'`stcback.cc
+
+bin_stbase-stcback.obj: stcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_stbase-stcback.obj -MD -MP -MF $(DEPDIR)/bin_stbase-stcback.Tpo -c -o bin_stbase-stcback.obj `if test -f 'stcback.cc'; then $(CYGPATH_W) 'stcback.cc'; else $(CYGPATH_W) '$(srcdir)/stcback.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_stbase-stcback.Tpo $(DEPDIR)/bin_stbase-stcback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='stcback.cc' object='bin_stbase-stcback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_stbase-stcback.obj `if test -f 'stcback.cc'; then $(CYGPATH_W) 'stcback.cc'; else $(CYGPATH_W) '$(srcdir)/stcback.cc'; fi`
+
+bin_stbase-utils.o: utils.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_stbase-utils.o -MD -MP -MF $(DEPDIR)/bin_stbase-utils.Tpo -c -o bin_stbase-utils.o `test -f 'utils.cc' || echo '$(srcdir)/'`utils.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_stbase-utils.Tpo $(DEPDIR)/bin_stbase-utils.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils.cc' object='bin_stbase-utils.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_stbase-utils.o `test -f 'utils.cc' || echo '$(srcdir)/'`utils.cc
+
+bin_stbase-utils.obj: utils.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_stbase-utils.obj -MD -MP -MF $(DEPDIR)/bin_stbase-utils.Tpo -c -o bin_stbase-utils.obj `if test -f 'utils.cc'; then $(CYGPATH_W) 'utils.cc'; else $(CYGPATH_W) '$(srcdir)/utils.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_stbase-utils.Tpo $(DEPDIR)/bin_stbase-utils.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils.cc' object='bin_stbase-utils.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_stbase_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_stbase-utils.obj `if test -f 'utils.cc'; then $(CYGPATH_W) 'utils.cc'; else $(CYGPATH_W) '$(srcdir)/utils.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+all: $(STATIONS_DIR_FILES)
+
+$(local_sharedir)/stations-i.db : stat.fmt writebase
+	@printf "\n Check LD_LIBRARY_PATH (or equivalent) if problems with 'ld'!\n\n"
+	./writebase -i $(BASEFILE) < stat.fmt
+	${INSTALL} stations-i.db  $@
+	-chmod a+r $@
+	-chmod g+w $@
+
+$(local_sharedir)/stations-n.db : stat.fmt writebase
+	@@printf "\n Check LD_LIBRARY_PATH (or equivalent) if problems with 'ld'!\n\n"
+	./writebase -n $(BASEFILE) < stat.fmt
+	${INSTALL} stations-n.db  $@
+	-chmod a+r $@
+	-chmod g+w $@
+
+$(local_sharedir)/stations-l.db : stat.fmt writebase
+	@@printf "\n Check LD_LIBRARY_PATH (or equivalent) if problems with 'ld'!\n\n"
+	./writebase -l $(BASEFILE) < stat.fmt
+	${INSTALL} stations-l.db  $@
+	-chmod a+r $@
+	-chmod g+w $@
+#EPS_stations
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Stations/Station.cc b/src/Stations/Station.cc
new file mode 100755
index 0000000..db43176
--- /dev/null
+++ b/src/Stations/Station.cc
@@ -0,0 +1,341 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <inc_iostream.h>
+#include <stdio.h>
+
+#include <gdbm.h>
+
+#include <fcntl.h>
+#include <math.h>
+#include <ctype.h>
+#include <Metview.h>
+#include "station.h"
+#include "utils.h"
+
+#define MAX_LIST 150
+
+class StationService : public MvService {
+	int count;
+	void AddToResult(MvRequest& out,datum& key);
+	void AddToResult(MvRequest& out,station& st);
+	void serve_WMO(MvRequest&,MvRequest&);
+	void serve_EPS(MvRequest&,MvRequest&);
+	void serve_location(MvRequest&,MvRequest&);
+public:
+	StationService();
+	void serve(MvRequest&,MvRequest&);
+private:
+  char     mode;
+  position pos;
+  station  st;
+  int      ident;
+  double   north, west, south, east;
+  double   point_lat, point_lon, threshold;
+};
+
+StationService::StationService() : MvService("STATIONS")
+{
+  mode = 0;
+  north =   90.0;
+  west  = -180.0;
+  south =  -90.0;
+  east  =  180.0;
+}
+
+void StationService::AddToResult(MvRequest& out,datum& key)
+{
+/* send the request back */
+	datum content;
+	station st;
+
+	content = gdbm_fetch(db,key);
+	memcpy(&st,content.dptr,MIN(content.dsize,sizeof(st)));
+
+	AddToResult( out, st );
+}
+
+void StationService::AddToResult( MvRequest& out, station& st )
+{
+	printf("%05d %d %d %d %s\n",st.ident,st.pos.lat,st.pos.lon,
+				st.pos.station_height,st.name);
+
+	if(count < MAX_LIST)
+	{
+		MvRequest y("STATION");
+
+		y("NAME")       = nice_name(st.name);
+		y("IDENT")      = st.ident;
+		y("LATITUDE")   = st.pos.lat/100.0;
+		y("LONGITUDE")  = st.pos.lon/100.0;
+		y("HEIGHT")     = st.pos.station_height;
+
+		out = out + y;
+	}
+	count++;
+}
+
+void StationService::serve(MvRequest& in,MvRequest& out)
+{
+  const char cIDENT = 'I';
+
+  in.print();
+
+  const char* p1 = in( "STATION_TYPE" );
+  const char* p2 = in( "SEARCH_STATIONS_DATABASE" );
+
+  if( ( p1 && *p1 == 'L' ) || ( p2 && *p2 == 'N' ) )
+    {
+      serve_location( in, out );
+    }
+  else
+    {
+	p1 = in( "SEARCH_KEY" );
+	if( !p1 )
+	  p1 = &cIDENT;
+
+	switch( *p1 )
+	{
+		case 'N':
+			mode = 'n';
+			break;
+
+		case 'I':
+			mode = 'i';
+			ident = in("IDENT");
+			break;
+
+		case 'W':
+			mode = 'i';
+			ident = in("WMO_BLOCK");
+			break;
+
+		case 'P':
+			mode = 'l';
+			threshold = in("THRESHOLD");
+			north = in("POSITION",0); north += threshold;
+			west  = in("POSITION",1); west  -= threshold;
+			south = in("POSITION",0); south -= threshold;
+			east  = in("POSITION",1); east  += threshold;
+			break;
+
+		case 'A':
+			mode = 'l';
+			north  = in("AREA",0);
+			west   = in("AREA",1);
+			south  = in("AREA",2);
+			east   = in("AREA",3);
+			if(north < south)
+			{
+				double tmp = north;
+				north      = south;
+				south      = tmp;
+			}
+			break;
+	}
+
+      if( p2 && *p2 == 'E' )
+	{
+	  serve_EPS( in, out );
+	}
+      else
+	{
+	  serve_WMO( in, out );
+	}
+    }
+
+  out.print();
+}
+
+void StationService::serve_WMO(MvRequest& in,MvRequest& out)
+{
+	datum key,k;
+	const char *name = NULL;
+
+	if (open_database(mode)) {
+		setError(42,"Station - Cannot open database %s", getenv("METVIEW_STATIONS"));
+		exit (1);
+	}
+
+	count=0;
+
+	// Look for perfect matches
+
+	switch(mode){
+		case 'n':
+
+			if(in.countValues("NAME") == 1)
+			{
+				name = in("NAME");
+				strcpy(st.name,upcase(name));
+				k.dptr   = (char*)&st.name;
+				k.dsize  = strlen(st.name)+1;
+
+				key = gdbm_fetch(db,k);
+
+				if(key.dptr != NULL)
+				{
+					AddToResult(out,k);
+					gdbm_close(db);
+					return;
+				}
+			}
+			break;
+
+		case 'i':
+			if(in.countValues("IDENT") == 1)
+				if(ident >= 01000)
+				{
+					st.ident = ident;
+					k.dptr   = (char*)&st.ident;
+					k.dsize  = sizeof(st.ident);
+
+					key = gdbm_fetch(db,k);
+
+					if(key.dptr != NULL)
+					{
+						AddToResult(out,k);
+						gdbm_close(db);
+						return;
+					}
+				}
+			break;
+
+		default : break;
+	};
+
+	// If no match, loop
+
+	for (key = gdbm_firstkey(db);  key.dptr != NULL; key = gdbm_nextkey(db, key)) {
+
+		int m, ok = 0;
+		int n = 0;
+
+		switch(mode){ /* open database related to request */
+
+		case 'n' :
+			while((name = in("NAME",n++)) != NULL)
+				if (same(name,(const char *)key.dptr) )
+					ok = 1;
+			break;
+
+		case 'i' :
+			memcpy(&m, key.dptr, sizeof(m));
+			if (ident < 100) ok = (m/1000 == ident);
+			else ok = (ident == m);
+			break;
+
+		case 'l' :
+			memcpy(&pos, key.dptr, sizeof(pos));
+			ok = 1;
+			point_lat=((double) pos.lat)/100.0;
+			point_lon=((double) pos.lon)/100.0;
+			ok = inbox(point_lat,point_lon,north,west,south,east);
+			break;
+		}
+
+		if (ok) AddToResult(out,key);
+	}
+
+	if(count == 0)
+		setError(1,"No matching WMO station found");
+
+	if(count>MAX_LIST)
+		sendProgress("Too many stations, only %d out of %d were returned",MAX_LIST,count);
+
+	gdbm_close(db);
+}
+
+void StationService::serve_EPS(MvRequest& in,MvRequest& out)
+{
+  //serve_WMO( in, out ); //-- not yet implementd, use WMO!!!!
+  const char* name;
+  ifstream* EPS_file = 0;
+  station   st;
+
+  if( open_EPS_stationfile( EPS_file ) )
+    {
+
+      while( read_one_station( EPS_file, st ) )
+	{
+	  int  n = 0;
+	  int ok = 0;
+
+	  switch(mode)
+	    {
+
+	    case 'n' :
+	      while( ( name = in("NAME", n++) ) != NULL )
+		if( same( name, st.name ) )
+		  ok = 1;
+	      break;
+
+	    case 'i' :
+	      if( ident < 100 )
+		ok = ( st.ident/1000 == ident );
+	      else
+		ok = ( ident == st.ident );
+	      break;
+
+	    case 'l' :
+	      ok = 1;
+	      point_lat=((double) st.pos.lat)/100.0;
+	      point_lon=((double) st.pos.lon)/100.0;
+	      ok = inbox(point_lat,point_lon,north,west,south,east);
+	      break;
+	    }
+
+	  if (ok)
+	    AddToResult( out, st );
+	}
+
+    }
+
+  delete EPS_file;
+
+  return;
+}
+
+void StationService::serve_location(MvRequest& in,MvRequest& out)
+{
+  // Don't look in database
+
+  MvRequest y("STATION");
+
+  y("NAME")       = in("NAME");
+  y("LATITUDE")   = in("POSITION",0);
+  y("LONGITUDE")  = in("POSITION",1);
+
+  if( (const char*)in("HEIGHT") )   //-- pass HEIGHT if HEIGHT set
+  {
+      // specifically check whether it is exactly '0', and don't add it if it is
+      if (strcmp((const char*)in("HEIGHT"), "0"))
+      {
+          y("HEIGHT") = in("HEIGHT");
+      }
+
+  /*
+    int h = (int)in("HEIGHT");
+    if( h != 0 )
+       y("HEIGHT") = in("HEIGHT");
+   */
+  }
+
+  out = y;
+
+  return;
+}
+
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	StationService  station;
+	theApp.run();
+}
diff --git a/src/Stations/stat.fmt b/src/Stations/stat.fmt
new file mode 100644
index 0000000..acb9423
--- /dev/null
+++ b/src/Stations/stat.fmt
@@ -0,0 +1,12851 @@
+71056 6560   -11777 0 185 0 ---- CLUT LAKE (AUT), NWT
+37651 4147   4608   801 0 0 ---- DEDOPLISTSKARO
+71778 4828   -12352 0 3 0 ---- RACE ROCKS CAMPBELL SCIENTIFIC, BC
+71211 4948   -12328 0 5 0 ---- HOWE SOUND-PAM ROCKS, BC
+71568 5045   -12598 0 8 0 ---- FANNY ISLAND, BC
+71367 5010   -12293 0 817 0 ---- BLACKCOMB BASE SLIDING CENTRE BOTTOM, BC
+16150 4387   803    60 71 0 ---- IMPERIA
+68188 -2377  3007   892 892 2 ---- TZANEEN-GRENSHOEK
+61091 1298   893    403 402 0 ---- MAGARIA
+85836 -4363  -7178  0 281 0 ---- ALTO PALENA
+85862 -4540  -7267  0 10 0 ---- PUERTO AYSEN *
+64550 -187   1102   89 88 0 ---- MOUILA
+11116 4750   1075   0 870 0 ---- REUTTE/TIROL
+11142 4732   1318   647 634 0 ---- ST. JOHANN/PONGAU
+11165 4720   1475   682 677 0 ---- ZELTWEG
+71293 5000   -12312 0 883 0 ---- CALLAGHAN VALLEY BIATHLON HIGH LEVEL, BC
+43353 995    7627   3 1 0 P-PP KOCHIN/WILLINGDON
+71366 5013   -12312 0 838 0 ---- CALLAGHAN VALLEY LOW LEVEL, BC
+71921 5008   -12295 0 1320 0 ---- WHISTLER MOUNTAIN MID-STATION, BC
+71629 4423   -7837  0 191 0 ---- PETERBOROUGH AWOS, ONT
+71733 4588   -8257  0 193 0 ---- GORE BAY AWOS, ONT
+71874 4963   -11280 0 929 0 ---- LETHBRIDGE AWOS A, ALTA
+71932 5665   -11122 0 369 0 ---- FORT MCMURRAY AWOS A, ALTA
+60353 3682   588    6 2 0 ---- JIJEL-PORT
+60355 3688   690    3 2 0 ---- SKIKDA
+60360 3683   782    4 3 0 P-P- ANNABA
+60367 3690   845    13 11 0 ---- EL-KALA
+60369 3677   310    12 9 0 ---- ALGER-PORT
+60387 3692   395    8 5 0 ---- DELLYS
+60390 3668   322    29 25 0 TPTP DAR-EL-BEIDA
+60395 3670   405    189 188 0 ---- TIZI-OUZOU
+60401 3675   510    4 3 0 ---- BEJAIA-PORT
+60402 3672   507    3 2 0 ---- BEJAIA-AEROPORT
+60403 3647   747    228 227 0 ---- GUELMA
+60405 3650   772    111 110 0 ---- BOUCHEGOUF
+60410 3650   133    18 17 0 ---- TENES
+60415 3632   353    0 748 0 ---- AIN-BESSAM
+60417 3638   388    560 555 0 ---- BOUIRA
+60419 3628   662    694 693 0 --P- CONSTANTINE
+60421 3587   712    891 889 2 ---- OUM EL BOUAGHI
+60423 3628   797    680 0 0 ---- SOUK AHRAS
+60425 3622   133    144 143 0 ---- CHLEF
+60430 3630   223    721 715 0 ---- MILIANA
+60437 3628   273    1036 1030 0 ---- MEDEA
+60444 3607   477    930 928 0 ---- BORDJ-BOU-ARRERIDJ
+60445 3618   525    1040 1033 0 ---- SETIF
+60452 3582   -27    4 3 0 ---- ARZEW
+60457 3588   12     138 137 0 ---- MOSTAGANEM
+60461 3570   -65    22 0 0 ---- ORAN-PORT
+60467 3567   450    442 441 0 ---- M'SILA
+60468 3575   632    826 822 2 ---- BATNA
+60471 3533   533    461 460 0 ---- BARIKA
+60475 3542   812    823 821 0 ---- TEBESSA
+60476 3547   708    987 983 0 ---- KHENCHELLA
+60481 3548   -52    111 110 0 ---- ORAN-TAFARAOUI
+60490 3563   -60    91 90 0 PPPP ORAN-SENIA
+60506 3560   30     476 474 0 ---- MASCARA-MATEMORE
+60507 3522   15     513 511 0 ---- MASCARA-GHRISS
+60511 3535   147    978 977 2 ---- TIARET
+60514 3517   232    801 800 2 ---- KSAR CHELLALA
+60515 3533   420    461 459 0 ---- BOU-SAADA
+60517 3510   -187   5 4 0 ---- GHAZAOUET
+60518 3530   -135   70 68 0 ---- BENI-SAF
+60520 3520   -62    476 475 0 ---- SIDI-BEL-ABBES
+60522 3482   -178   428 427 0 ---- MAGHNIA
+60525 3480   573    89 82 0 ---- BISKRA
+60531 3502   -147   247 246 0 ---- TLEMCEN-ZENATA
+60535 3468   325    1185 1180 2 ---- DJELFA
+60536 3487   15     752 750 2 ---- SAIDA
+60540 3415   7      1001 1000 2 ---- EL-KHEITER
+60545 3377   293    763 762 2 ---- LAGHOUAT
+60549 3358   -28    1150 1149 2 ---- MECHERIA
+60550 3367   100    1347 1341 2 ---- EL-BAYADH
+60555 3312   613    92 87 0 ---- TOUGGOURT
+60557 3327   -30    1166 0 2 ---- NAAMA
+60559 3350   678    69 64 0 P-P- EL-OUED
+60560 3277   -60    1059 1058 2 ---- AIN-SEFRA
+60563 3293   328    764 763 2 ---- HASSIR'MEL
+60566 3240   380    469 468 0 P-P- GHARDAIA
+60571 3150   -225   816 809 2 TPTP BECHAR
+60580 3193   540    148 144 0 ---- OUARGLA
+60581 3167   615    144 142 0 ---- HASSI-MESSAOUD
+60590 3057   287    403 397 0 P-P- EL-GOLEA
+60602 3013   -217   505 500 0 ---- BENI-ABBES
+60603 2972   670    252 253 0 ---- RHOURD NOUSS
+60607 2925   28     317 312 0 ---- TIMIMOUN
+60611 2805   963    562 561 0 ---- IN-AMENAS
+60620 2788   -18    283 279 0 P-P- ADRAR
+60630 2723   250    269 268 0 PPTP IN-SALAH
+60640 2650   842    544 543 0 ---- ILLIZI
+60656 2770   -817   439 443 0 --T- TINDOUF
+60670 2427   947    970 968 2 ---- DJANET
+60680 2280   543    1364 1362 2 TPTP TAMANRASSET
+60686 2133   95     399 398 0 ---- BORDJ-BADJ-MOKHTAR
+60690 1957   577    401 400 0 ---- IN-GUEZZAM
+66104 -555   1218   20 25 0 ---- CABINDA
+66116 -587   1343   0 0 0 ---- NOQUI
+66118 -627   1425   0 0 0 ---- NBANZA-KONGO
+66121 -603   1512   920 920 2 ---- MAQUELA DO ZOMBO
+66130 -723   1287   17 18 0 ---- N'ZETO (AMBRIZETE)
+66136 -717   1427   0 540 0 ---- TOTO
+66140 -758   1500   831 829 2 ---- CARMONA
+66142 -768   1537   1249 1248 2 ---- NEGAGE
+66152 -740   2082   776 775 2 -PP- DUNDO
+66160 -885   1323   70 74 0 --T- LUANDA
+66172 -928   1492   795 0 0 ---- N'DALATANDO
+66187 -837   1893   1180 1180 2 ---- CAMAXILO
+66210 -1120  1385   10 0 0 ---- SUMBE
+66215 -955   1637   1142 1139 2 PPPP MALANGE
+66223 -627   1425   530 0 0 ---- MBANZA CONGO
+66226 -965   2040   1080 1081 2 ---- SAURIMO (HENRIQUE DE CARVALHO)
+66240 -1070  1375   5 5 0 ---- PORTO AMBOIM
+66260 -1120  1385   0 0 0 ---- SUMBE
+66270 -1142  1512   1304 1304 2 ---- WAKU KUNGU (CELA)
+66285 -1178  1992   1357 1357 2 ---- LUENA (LUSO)
+66296 -1187  2290   1126 1125 2 ---- CAZOMBO
+66305 -1237  1353   3 3 0 ---- LOBITO
+66310 -1258  1342   4 33 0 -PPP MONBACA (BENGUELA)
+66318 -1280  1575   1701 1710 2 PPPP HUAMBO (NOVA LISBOA)
+66325 -1238  1695   1699 1701 2 ---- BIE (SILVA PORTO)
+66390 -1493  1357   1758 1760 2 ---- LUBANGO (SA DA BANDEIRA)
+66410 -1465  1768   1343 1348 2 -PPP MENONGUE (SERPA PINTO)
+66422 -1520  1215   45 43 0 ---- MOCAMEDES
+66447 -1583  2035   1088 1118 2 -PPP MAVINGA
+66450 -1660  1172   1 1 0 ---- BAIA DOS TIGRES
+66460 -1708  1573   1109 1108 2 ---- PEREIRA DE ECA
+66485 -1672  1500   1099 1100 2 ---- ROCADAS
+65306 1113   293    292 290 0 PPPP KANDI
+65319 1032   138    461 460 0 ---- NATITINGOU
+65330 935    262    393 392 0 PPPP PARAKOU
+65335 803    247    200 199 0 ---- SAVE
+65338 717    207    167 166 0 ---- BOHICON
+65344 635    238    9 5 0 PPPP COTONOU
+68024 -2170  2165   1100 1131 2 ---- GHANZI
+68026 -1837  2185   1000 1032 2 ---- SHAKAWE
+68029 -1782  2515   1000 968 2 ---- KASANE
+68030 -1853  2563   1071 0 0 ---- PANDAMATENGA
+68031 -1933  2342   0 964 0 ---- MOREMI
+68032 -1998  2342   900 945 2 ---- MAUN
+68034 -2025  2508   0 927 0 ---- GWETA
+68038 -2055  2622   904 903 2 -PP- SUA-PAN
+68040 -2142  2560   985 986 2 ---- LETLHAKANE
+68054 -2132  2747   0 1009 2 ---- FRANCISTOWN
+68070 -2205  2782   892 0 0 ---- SELEBI-PHIKWE
+68148 -2308  2680   1006 991 2 ---- MAHALAPYE
+68151 -2335  2583   0 1020 0 ---- LEPHEPE
+68220 -2367  2417   0 1100 0 ---- KHUTSE
+68226 -2402  2188   1100 1118 2 ---- TSHANE
+68234 -2460  2467   1200 1189 2 ---- JWANENG
+68240 -2455  2592   0 1005 0 PPTP SERETSE KHAMA INTERNATIONAL AIRPORT
+68244 -2467  2592   1000 983 2 ---- GABORONE
+68320 -2527  2325   1000 1046 2 ---- WERDA
+68325 -2545  2542   1000 1275 2 ---- GOOD HOPE
+68328 -2605  2245   1000 960 2 ---- TSABONG
+68992 -5440  328    42 42 0 ---- BOUVET ISLAND
+65500 1463   -7     0 295 0 ---- MARKOYE
+65501 1403   -3     277 276 0 ---- DORI
+65502 1358   -243   0 329 0 ---- OUAHIGOUYA
+65503 1235   -152   306 303 0 PPPP OUAGADOUGOU
+65505 1247   -348   300 299 0 ---- DEDOUGOU
+65507 1207   35     0 292 0 ---- FADA N'GOURMA
+65510 1117   -430   0 432 0 PPPP BOBO-DIOULASSO
+65516 1173   -292   0 264 0 ---- BOROMO
+65518 1117   -115   0 326 0 ---- PO
+65522 1033   -318   335 333 0 ---- GAOUA
+65523 990    -435   0 260 0 ---- MANGODARA
+64390 -332   2932   783 782 2 -P-- BUJUMBURA
+64397 -283   3033   1755 1755 2 ---- MUYINGA
+64851 1045   1425   422 423 0 ---- MAROUA-SALAK
+64860 933    1338   244 242 0 PPPP GAROUA
+64870 735    1357   1104 1114 2 PPPP NGAOUNDERE
+64880 678    1182   0 1110 0 ---- BANYO
+64882 653    1437   1027 1027 2 ---- MEIGANGA
+64890 572    928    0 126 0 ---- MAMFE
+64892 605    1012   1239 1239 0 ---- BAMENDA
+64893 565    1075   1210 1208 2 PPPP KOUNDJA
+64900 555    1237   1031 1027 2 PPPP YOKO
+64901 560    1407   804 815 2 ---- BETARE-OYA
+64910 400    973    9 10 0 ---- DOUALA OBS.
+64910 402    970    15 10 0 TPTP DOUALA R.S.
+64911 495    993    821 816 2 ---- NKONGSAMBA
+64920 473    1125   500 500 0 ---- BAFIA
+64930 460    1373   668 668 0 ---- BERTOUA
+64931 447    1437   656 656 0 PPPP BATOURI
+64950 383    1152   760 751 0 PPPP YAOUNDE
+64960 397    1320   0 693 0 ---- ABONG-MBANG
+64961 315    1362   0 624 0 ---- LOMIE
+64971 295    990    16 10 0 ---- KRIBI
+08583 1683   -2505  17 20 0 ---- MINDELO
+08589 1493   -2348  95 95 0 ---- PRAIA
+08594 1673   -2293  55 54 0 --T- SAL
+64600 425    1580   583 582 0 P-P- BERBERATI
+64601 597    1563   1020 1019 2 P-P- BOUAR
+64605 527    1763   674 673 0 ---- BOSSEMBELE
+64610 648    1743   465 464 0 P-P- BOSSANGOA
+64650 440    1852   366 365 0 TPTP BANGUI
+64654 840    2065   511 510 0 P-P- N'DELE
+64655 653    2198   584 583 0 ---- BRIA
+64656 473    2283   500 499 0 P-P- BANGASSOU
+64658 1028   2278   464 463 0 ---- BIRAO
+64659 540    2650   651 650 0 ---- OBO
+64660 585    2065   475 474 0 ---- BAMBARI
+64661 650    2327   602 601 0 ---- YALINGA
+64662 505    2120   449 447 0 ---- ALINDAO
+64665 432    2118   406 405 0 P--- MOBAYE
+64700 1213   1503   295 295 0 -P-P NDJAMENA
+64701 1412   1532   355 355 0 ---- MAO
+64702 1343   1473   292 291 0 ---- BOL-BERIM
+64705 1048   1672   336 334 0 ---- BOUSSO
+64706 857    1607   410 428 0 ---- MOUNDOU
+64707 1365   1650   0 301 0 ---- MOUSSORO
+64708 1238   1705   301 300 0 ---- BOKORO
+64709 937    1497   320 467 0 ---- PALA
+64750 915    1838   365 365 0 -PP- SARH
+64751 1322   1832   334 333 0 ---- ATI
+64753 1800   1917   234 235 0 ---- FAYA
+64754 1103   2028   436 433 0 ---- AM-TIMAN
+64755 1223   2142   557 557 0 ---- GOZ-BEIDA
+64756 1385   2085   549 545 0 ---- ABECHE
+64757 1717   2155   540 540 0 ---- FADA
+64758 1218   1868   430 427 0 ---- MONGO
+67001 -1170  4323   6 6 0 ---- MORONI AIRPORT (GRANDE-COMORE)
+67002 -1153  4327   29 29 0 -P-- HAHAYA INT. AIRPORT
+67004 -1212  4443   12 19 0 -PP- OUANI (ANJOUAN)
+67005 -1280  4527   7 7 0 -P-- PAMANDZI (MAYOTTE)
+64400 -482   1190   17 17 0 TPTP POINTE-NOIRE
+64401 -420   1270   331 329 0 -PP- DOLISIE
+64402 -400   1395   512 509 0 ---- MOUYONDZI
+64403 -348   1262   161 160 0 ---- MAKABANA
+64405 -368   1335   530 530 0 ---- SIBITI
+64450 -425   1525   316 319 0 PPPP BRAZZAVILLE /MAYA-MAYA
+64451 -382   1525   750 0 0 ---- BOULANKIO
+64452 -262   1622   313 311 0 ---- M'POUYA
+64453 -253   1477   790 791 0 -PP- DJAMBALA
+64454 -190   1585   377 476 0 ---- GAMBOMA
+64456 -2     1565   380 394 0 ---- MAKOUA
+64458 162    1605   352 352 0 TPTP OUESSO
+64459 162    1807   327 335 0 -PP- IMPFONDO
+64460 207    1403   550 549 0 ---- SOUANKE
+64462 10     1355   408 0 0 ---- KELLE
+64463 -558   1482   438 0 0 ---- EWO
+65528 950    -757   421 434 0 ---- ODIENNE
+65536 942    -562   381 381 0 ---- KORHOGO
+65545 805    -278   370 369 0 ---- BONDOUKOU
+65548 738    -752   340 339 0 PPPP MAN
+65555 773    -507   376 376 0 ---- BOUAKE
+65557 613    -595   210 205 0 ---- GAGNOA
+65560 687    -647   277 276 0 ---- DALOA
+65562 665    -470   92 92 0 ---- DIMBOKRO
+65563 690    -535   213 196 0 ---- YAMOUSSOUKRO
+65578 525    -393   8 7 0 TPTP ABIDJAN
+65585 530    -330   39 33 0 ---- ADIAKE
+65592 442    -737   21 21 0 ---- TABOU
+65594 475    -665   30 30 0 ---- SAN PEDRO
+65599 495    -608   66 62 0 ---- SASSANDRA
+64005 5      1827   317 345 0 ---- MBANDAKA
+64006 328    1978   446 475 0 ---- GEMENA
+64008 122    1980   353 360 0 ---- BASANKUSU
+64014 232    2157   463 0 0 ---- LISALA
+64015 363    1863   359 380 0 ---- LIBENGE
+64016 218    2255   361 0 0 ---- BUMBA
+64018 125    2360   366 410 0 ---- BASOKO
+64021 380    2382   474 487 0 ---- BONDO
+64034 278    2478   410 0 0 ---- BUTA
+64040 52     2518   396 415 0 ---- KISANGANI
+64056 108    2713   524 0 2 ---- BAFWASENDE
+64062 277    2765   764 806 2 ---- ISIRO
+64071 137    2907   855 900 2 ---- MAMBASA
+64072 13     2927   1840 0 2 ---- BUTEMBO
+64074 307    2950   1008 985 2 ---- WATSA
+64076 150    3022   1239 0 2 ---- BUNIA
+64077 157    3022   1285 0 0 ---- BUNIA-RUAMPARA
+64101 -105   1720   318 0 0 ---- LUKOLELA
+64108 -330   1735   324 0 0 ---- BANDUNDU
+64115 -197   1827   300 0 0 ---- INONGO
+64126 -22    2085   351 0 0 ---- BOENDE
+64146 -348   2347   500 479 0 ---- LODJA
+64155 -295   2592   497 0 0 ---- KINDU
+64156 -260   2655   569 545 2 ---- KALIMA
+64157 -118   2945   1275 0 2 ---- RUTSHURU
+64159 -35    2545   423 0 0 ---- UBUNDU
+64170 -142   2700   800 0 2 ---- WALIKALE
+64180 -252   2885   1612 0 2 ---- BUKAVU
+64184 -168   2923   1552 0 2 ---- GOMA
+64201 -600   1242   27 27 0 ---- MOANDA
+64203 -592   1245   120 122 0 ---- KITONA
+64204 -585   1310   8 22 0 ---- BOMA
+64206 -552   1358   277 0 0 ---- INGA
+64207 -580   1343   340 355 0 ---- MATADI
+64209 -495   1413   236 0 0 ---- LUOZI
+64210 -438   1543   312 309 0 --P- KINSHASA/N'DJILI
+64211 -432   1532   282 0 0 ---- KINSHASA/N'DOLO
+64217 -492   1707   563 0 2 ---- KENGE
+64220 -437   1525   445 0 0 ---- KINSHASA/BINZA
+64222 -503   1880   449 518 0 ---- KIKWIT
+64224 -433   2058   420 465 0 ---- ILEBO
+64228 -642   2085   481 521 0 ---- TSHIKAPA
+64235 -588   2242   657 654 2 ---- KANANGA
+64246 -497   2343   424 0 0 ---- LUSAMBO
+64247 -617   2362   677 633 2 ---- MBUJI-MAYI
+64248 -713   2373   877 880 2 ---- LUPUTA
+64264 -452   2658   544 544 2 ---- KASONGO
+64276 -535   2700   561 0 0 ---- KONGOLO
+64282 -728   2743   633 614 2 ---- MANONO
+64285 -588   2918   818 790 2 ---- KALEMIE
+64301 -1068  2233   1028 0 0 ---- DILOLO
+64303 -963   2285   921 0 0 ---- SANDOA
+64315 -863   2525   1106 1088 2 ---- KAMINA/BASE
+64328 -1072  2545   1526 1405 2 ---- KOLWEZI
+64348 -860   2733   1579 0 2 ---- MITWABA
+64360 -1167  2748   1298 1276 2 ---- LUBUMBASHI-LUANO
+64370 -1165  2747   1260 0 0 ---- LUBUMBASHI-KARAVIA
+63125 1155   4315   19 13 0 --P- DJIBOUTI
+63145 1117   4272   0 777 0 ---- OBOLEH
+62301 3162   2590   25 23 0 ---- SIDI BARRANI
+62305 3157   2512   6 0 0 ---- SALLUM PLATEAU
+62306 3132   2722   30 28 0 T--- MERSA MATRUH
+62309 3102   2843   18 17 0 ---- DABAA
+62318 3117   2993   7 0 0 ---- NOUZHA
+62324 3145   3037   3 1 0 ---- ROSETTA
+62325 3155   3108   2 1 0 ---- BALTIM
+62330 3142   3182   3 1 0 ---- DAMIETTA
+62332 3127   3223   6 2 0 ---- PORT SAID/EL GAMIL
+62335 3120   3420   75 73 0 ---- RAFAH-AGRIMET
+62336 3108   3382   17 27 0 ---- EL ARISH-AGRIMET
+62337 3107   3383   31 36 0 T--- EL ARISH
+62345 3065   3070   16 15 0 ---- TAHRIR
+62357 3040   3035   1 0 0 ---- WADI EL NATROON AGRIMET
+62360 3060   3102   13 11 0 ---- SHEBIN EL KOM
+62366 3010   3140   74 116 0 ---- CAIRO
+62369 3013   3125   16 16 0 ---- BAHTIM AGRIMET
+62371 3008   3128   26 34 0 ---- CAIRO H.Q
+62375 3005   3122   23 18 0 ---- GIZA - AGRIMET
+62378 2985   3133   140 139 0 --T- HELWAN
+62381 2930   3085   23 23 0 ---- FAYOUM
+62387 2808   3073   40 37 0 ---- MINYA
+62389 2770   3075   44 44 0 ---- MALWY - AGRIMET
+62392 2720   3117   52 52 0 ---- ASYUT - AGRIMET
+62393 2703   3100   226 235 0 ---- ASYUT
+62398 2633   3173   70 92 0 ---- SHOAG AIRPORT
+62403 2620   3273   77 95 0 --T- SOUTH OF VALLEY UNIVERSITY
+62405 2567   3270   99 89 0 ---- LUXOR
+62408 2498   3282   89 88 0 ---- EDFOU
+62414 2395   3282   194 201 0 T--- ASSWAN
+62417 2920   2548   -13 -15 0 ---- SIWA
+62419 2237   3160   192 187 0 ---- ABU SIMBEL
+62420 2833   2890   129 127 0 ---- BAHARIA
+62423 2705   2798   92 82 0 --T- FARAFRA
+62425 2258   2870   273 261 0 ---- SHARK-EL-OUINAT
+62432 2550   2897   111 186 0 ---- DAKHLA
+62435 2545   3053   72 58 0 ---- KHARGA AGRIMET
+62440 3058   3223   12 12 0 ---- ISMAILIA
+62450 2987   3247   3 2 0 ---- EL-SUEZ
+62452 2990   3373   403 401 0 ---- NEKHEL
+62453 3045   3377   226 225 0 ---- EL HASANA
+62454 3097   3275   17 23 0 ---- BEAR EL ABD
+62455 2958   3272   16 3 4 ---- RAS SEDR
+62456 2958   3477   749 748 0 ---- TABA
+62457 2868   3405   1350 1331 0 ---- SANT KATREIN
+62458 2890   3318   7 5 0 ---- ABURDEES
+62459 2820   3363   14 35 0 ---- EL TOR
+62460 2797   3438   51 43 0 ---- SHARM EL SHEIKH
+62463 2717   3380   14 15 0 ---- HURGUADA
+62464 2728   3373   6 6 0 ---- HURGUADA POLLUTION
+62465 2613   3425   10 15 0 ---- KOSSEIR
+62467 2848   3450   19 17 4 ---- DAHAB
+62476 2312   3558   21 19 0 ---- SHALATIN
+64810 375    877    56 50 0 ---- MALABO
+64820 190    980    8 2 0 ---- BATA (RIO MUNI)
+63006 1667   3833   1676 0 0 ---- NACFA
+63021 1528   3892   2325 0 2 -PT- ASMARA
+63023 1562   3945   10 0 0 ---- MASSAWA
+63043 1307   4272   14 0 0 ---- ASSAB
+63330 1350   3948   2070 0 2 ---- MAKALE
+63331 1255   3742   1967 0 2 ---- GONDAR
+63332 1160   3742   1770 0 2 ---- BAHAR DAR
+63333 1112   3973   1903 0 2 ---- COMBOLCHA
+63334 1033   3767   2515 0 2 ---- DEBREMARCOS
+63340 908    3645   2080 0 0 ---- LEKEMTE
+63402 767    3683   1725 0 2 ---- JIMMA
+63403 815    3553   2002 0 2 ---- GORE
+63450 903    3875   2354 0 2 -PT- ADDIS ABABA-BOLE
+63451 873    3895   1900 0 0 ---- HARAR MEDA
+63453 887    3990   930 0 0 ---- METEHARA
+63460 708    3848   1750 0 0 ---- AWASSA
+63471 960    4185   1260 0 2 ---- DIREDAWA
+63474 713    4000   2480 0 0 ---- ROBE/BALE
+63478 590    4358   295 0 0 ---- GODE
+63500 608    3763   1290 0 2 ---- ARBA MINCH
+63533 533    3957   1544 0 0 ---- NEGHELLE
+64500 45     942    15 12 0 ---- LIBREVILLE
+64501 -70    875    4 4 0 ---- PORT-GENTIL
+64503 -342   1065   34 31 0 ---- MAYUMBA
+64507 -285   1102   79 83 0 ---- TCHIBANGA
+64510 208    1148   599 600 0 P-P- BITAM
+64512 158    1157   0 590 0 ---- OYEM
+64551 -72    1023   26 27 0 ---- LAMBARENE
+64552 78     1153   583 583 0 ---- MITZIC
+64556 57     1287   515 513 0 ---- MAKOKOU
+64570 -165   1343   0 444 0 ---- MVENGUE
+61701 1320   -1663  33 36 0 --P- BANJUL/YUNDUM
+61705 1322   -1620  0 0 0 ---- SIBANOR
+61707 1348   -1557  11 11 0 ---- JENOI
+61711 1345   -1645  2 1 0 ---- BANJUL/HALF-DIE
+61712 1348   -1618  15 15 0 ---- KEREWAN
+61717 1372   -1525  6 6 0 ---- KAUR
+61720 1367   -1488  0 0 0 ---- KUNTAUR
+61721 1353   -1477  1 1 0 ---- GEORGETOWN
+61722 1357   -1593  2 2 0 ---- SAPU
+61731 1332   -1422  4 4 0 --P- BASSE
+61733 1388   -1340  0 0 0 ---- FATOTO
+65401 1090   -110   0 213 0 ---- NAVRONGO
+65404 1005   -250   0 322 0 ---- WA
+65416 903    -248   0 299 0 PPPP BOLE
+65418 955    -85    0 168 0 --T- TAMALE
+65420 945    -2     0 195 0 ---- YENDI
+65432 775    -210   0 338 0 ---- WENCHI
+65437 782    -3     0 122 0 PPPP KETE-KRACHI
+65439 733    -233   306 0 0 ---- SUNYANI
+65442 672    -160   0 286 0 PPPP KUMASI
+65445 620    -233   0 170 0 ---- SEFWI BEKWAI
+65450 667    -75    0 594 0 ---- ABETIFI
+65453 660    47     0 157 0 ---- HO
+65457 593    -98    0 139 0 ---- AKIM ODA
+65459 608    -25    0 166 0 ---- KOFORIDUA
+65460 610    12     0 17 0 ---- AKUSE
+65462 612    80     0 53 0 ---- AKATSI
+65465 487    -223   0 37 0 ---- AXIM
+65467 488    -177   4 0 0 PPPP TAKORADI
+65469 520    -107   0 439 0 ---- SALTPOND
+65472 560    -17    67 0 0 PPPP ACCRA
+65473 562    0      0 14 0 ---- TEMA
+65475 578    63     0 5 0 ---- ADA
+61802 1257   -1352  0 90 0 ---- KOUNDARA
+61809 1132   -1230  0 1025 0 ---- LABE
+61811 1143   -917   0 363 0 ---- SIGUIRI
+61816 1093   -1482  0 69 0 ---- BOKE
+61818 1005   -1287  0 458 0 ---- KINDIA
+61820 1037   -1208  0 785 0 ---- MAMOU
+61829 1038   -930   0 376 0 ---- KANKAN
+61831 957    -1362  0 49 0 --T- CONAKRY
+61832 957    -1362  0 25 0 ---- CONAKRY/GBESSIA
+61833 1003   -1075  0 463 0 ---- FARANAH/BADALA
+61834 942    -1008  0 412 0 ---- KISSIDOUGOU
+61847 853    -950   0 559 0 ---- MACENTA
+61849 775    -828   0 475 0 ---- N'ZEREKORE
+61766 1188   -1565  36 39 0 ---- BISSAU (AEROPORTO INT. OSVALDO VIEIRA)
+61769 1158   -1548  20 18 0 ---- BOLAMA
+61777 1222   -1565  0 39 0 ---- BISSORA
+61781 1217   -1467  43 42 0 ---- BAFATA
+63612 312    3563   0 505 2 ---- LODWAR
+63619 358    3905   0 1112 2 ---- MOYALE
+63624 393    4185   0 330 4 ---- MANDERA
+63641 233    3798   0 1345 2 ---- MARSABIT
+63661 102    3500   0 560 2 ---- KITALE
+63671 173    4008   0 243 4 ---- WAJIR
+63686 48     3530   0 646 2 ---- ELDORET
+63687 27     3475   0 483 2 ---- KAKAMEGA
+63688 40     3522   0 1940 2 ---- ELDORET INTERNATIONAL AIRPORT
+63695 5      3765   0 1524 2 ---- MERU
+63708 -8     3472   0 1148 2 ---- KISUMU
+63709 -67    3478   0 1770 2 ---- KISII
+63710 -37    3527   0 1976 2 ---- KERICHO
+63711 -40    3413   0 1143 2 ---- SUBA
+63714 -27    3610   0 1901 2 ---- NAKURU
+63717 -43    3697   0 1798 2 ---- NYERI
+63720 -48    3745   0 1493 2 ---- EMBU
+63723 -47    3963   0 128 4 ---- GARISSA
+63737 -108   3585   0 1584 2 ---- NAROK
+63740 -132   3690   0 1624 2 ---- JOMO KENYATTA NTERNATIONAL AIRPORT
+63741 -130   3675   0 1798 2 T-T- DAGORETTI CORNER
+63742 -132   3680   0 1676 2 ---- WILSON
+63766 -228   3782   0 999 2 ---- MAKINDU
+63772 -220   4083   0 1 4 ---- LAMU
+63793 -338   3855   0 559 2 ---- VOI
+63799 -322   3855   0 19 4 ---- MALINDI
+63820 -400   3960   0 5 4 ---- MOMBASA INTERNATIONAL AIRPORT
+68452 -2927  2913   2195 2200 1 ---- MOKHOTLONG
+68454 -2945  2755   1628 1631 1 ---- MASERU-MIA
+68456 -3007  2870   1950 1970 1 ---- QACHA'S NEK
+65602 633    -1075  12 8 0 ---- SPRIGGS PAYNE AIRPORT
+65660 625    -1035  18 8 0 ---- ROBERTS FIELD
+62002 3187   1098   621 620 2 ---- NALUT
+62007 3288   1208   3 3 0 ---- ZUARA
+62008 3208   1255   691 691 2 ---- YEFREN
+62010 3270   1308   0 63 0 ---- TRIPOLI INTERNATIONAL AIRPORT
+62010 3273   1307   0 64 0 T--- SWANI
+62011 3215   1300   0 728 0 ---- GARIAN
+62012 3263   1430   22 21 0 ---- EL KHOMS
+62014 3173   1402   259 0 0 ---- BENWLID
+62016 3242   1505   32 32 0 ---- MISURATA
+62018 3057   1572   90 0 0 ---- ABU NJAYM
+62019 3120   1658   14 13 0 ---- SIRTE
+62053 3210   2027   132 131 0 T-T- BENINA
+62054 3252   2088   335 334 0 ---- AL-MARJ
+62055 3072   2017   7 6 0 ---- AGEDABIA
+62056 3280   2188   648 649 2 ---- SHAHAT
+62059 3278   2258   26 26 0 ---- DERNA
+62062 3210   2393   51 50 0 ---- TOBRUK
+62103 3013   950    347 346 0 T--- GHADAMES
+62120 3038   1358   497 496 2 ---- GARIAT EL-SHARGHIA
+62121 2952   1293   623 0 0 ---- EL HAMADA
+62124 2702   1445   432 435 0 T-T- SEBHA
+62131 2912   1595   267 0 0 ---- HON
+62161 2903   2157   60 59 0 ---- JALO
+62176 2975   2453   -1 -2 0 ---- GIGHBUB
+62200 2660   1278   463 463 0 ---- OBARI
+62212 2513   1015   693 699 2 ---- GHAT
+62259 2580   2113   261 260 0 ---- TAZERBO
+62271 2422   2330   436 417 0 ---- KUFRA
+67009 -1235  4930   105 114 0 -P-- ANTSIRANANA
+67012 -1332  4832   9 10 0 ---- FASCENE (NOSSI-BE)
+67017 -1337  5000   5 6 0 ---- VOHEMAR
+67019 -1463  4777   57 105 0 -P-- ANALALAVA
+67020 -1488  4798   0 23 0 ---- ANTSOHIHY
+67022 -1465  4962   474 473 1 ---- ANDAPA
+67023 -1428  5017   5 5 0 ---- SAMBAVA
+67025 -1488  5025   88 87 0 -P-- ANTALAHA
+67027 -1567  4635   18 26 0 PPP- MAHAJANGA
+67037 -1675  4448   36 38 0 ---- BESALAMPY
+67045 -1695  4683   79 76 0 ---- MAEVATANANA
+67067 -1763  4850   780 0 2 ---- AMBOHITSILAOZANA
+67072 -1708  4982   3 2 0 ---- SAINTE-MARIE AERODROME
+67073 -1805  4403   23 23 0 ---- MAINTIRANO
+67083 -1880  4748   1276 1279 2 TPT- ANTANANARIVO/IVATO
+67085 -1887  4750   0 0 0 ---- ANTANANARIVO
+67095 -1812  4940   6 5 0 PPP- TOAMASINA
+67107 -1982  4707   1532 1523 2 ---- ANTSIRABE
+67113 -1983  4880   5 5 0 ---- MAHANORO
+67117 -2028  4432   8 7 0 -P-- MORONDAVA
+67131 -2175  4337   4 5 0 ---- MOROMBE
+67137 -2145  4710   1109 1115 2 -P-- FIANARANTSOA
+67143 -2120  4837   6 5 0 ---- MANANJARY
+67152 -2255  4540   824 824 2 ---- RANOHIRA
+67157 -2280  4783   6 8 0 ---- FARAFANGANA
+67161 -2338  4373   8 8 0 -P-- TOLIARA
+67194 -2555  4553   22 22 0 ---- FAUX-CAP
+67197 -2503  4695   9 8 0 TPP- TAOLAGNARO
+08521 3268   -1677  49 58 0 ---- FUNCHAL/S.CATARINA
+08522 3263   -1690  56 58 0 --T- FUNCHAL
+08524 3307   -1635  82 97 0 ---- PORTO SANTO
+67421 -970   3327   1278 1278 2 ---- CHITIPA
+67423 -995   3388   529 529 2 -P-- KARONGA
+67424 -1097  3373   1100 1100 0 ---- BOLERO
+67485 -1188  3362   1351 1349 2 -P-- MZIMBA
+67489 -1145  3402   1253 1251 2 -PP- MZUZU
+67493 -1160  3430   500 500 0 ---- NKHATA BAY
+67584 -1302  3347   1015 1015 0 -P-- KASUNGU
+67585 -1398  3363   1149 1149 0 ---- CHITEDZE
+67586 -1378  3377   1229 1229 2 -PT- LILONGWE INT'L AIRPORT
+67588 -1417  3367   1100 1100 0 ---- N.R.C.
+67591 -1292  3427   500 500 0 ---- NKHOTA KOTA
+67597 -1375  3458   513 513 2 -P-- SALIMA
+67687 -1578  3503   1141 1141 2 ---- CHICHIRI
+67689 -1432  3427   1632 1630 0 ---- DEDZA
+67690 -1408  3492   474 474 0 ---- MONKEY BAY
+67692 -1552  3522   1028 1028 0 ---- MAKOKA
+67693 -1568  3497   767 766 2 -PP- CHILEKA
+67695 -1443  3525   485 485 2 ---- MANGOCHI
+67699 -1608  3558   653 653 0 ---- MIMOSA
+67791 -1592  3507   1146 1145 0 ---- BVUMBWE
+67793 -1615  3522   820 820 0 ---- THYOLO
+67796 -1650  3495   102 102 0 ---- NGABU
+67797 -1652  3515   58 58 0 ---- MAKANGA
+61202 2020   98     491 494 0 PPTP TESSALIT
+61214 1843   135    459 458 0 PPPP KIDAL
+61223 1672   -300   264 263 0 PPTP TOMBOUCTOU
+61226 1627   -5     260 265 0 PPPP GAO
+61230 1523   -935   237 235 0 ---- NIORO DU SAHEL
+61233 1517   -728   265 271 0 PPPP NARA
+61235 1512   -1057  100 0 0 ---- YELIMANE
+61240 1533   -168   288 287 0 ---- HOMBORI
+61250 1587   222    278 278 0 ---- MENAKA
+61257 1443   -1143  47 47 0 PPPP KAYES
+61265 1452   -410   272 276 0 PPPP MOPTI
+61270 1307   -947   334 333 0 ---- KITA
+61272 1340   -615   289 288 0 PPPP SEGOU
+61277 1333   -483   284 283 0 ---- SAN
+61285 1285   -1123  132 132 0 ---- KENIEBA
+61288 1248   -680   331 0 0 ---- DIOILA
+61291 1253   -795   381 380 0 TPTP BAMAKO/SENOU
+61293 1238   -547   367 365 0 ---- KOUTIALA
+61296 1142   -750   351 350 0 ---- BOUGOUNI
+61297 1135   -568   375 374 0 ---- SIKASSO
+61401 2523   -1162  360 364 0 --P- BIR MOGHREIN
+61404 2275   -1248  343 0 0 PPPP ZOUERATE
+61415 2093   -1703  3 5 0 PPTP NOUADHIBOU
+61421 2052   -1307  224 226 0 PPPP ATAR
+61437 1975   -1437  120 123 0 ---- AKJOUJT
+61442 1810   -1595  3 2 0 PPPP NOUAKCHOTT
+61450 1857   -1143  402 396 0 ---- TIDJIKJA
+61461 1753   -1468  75 77 0 ---- BOUTILIMIT
+61470 1705   -1292  0 45 0 ---- ALEG
+61489 1650   -1582  6 5 0 ---- ROSSO
+61492 1615   -1352  18 0 0 ---- KAEDI
+61497 1660   -727   269 0 0 PPPP NEMA
+61498 1663   -1140  115 0 0 PPPP KIFFA
+61499 1670   -960   223 0 0 ---- AIOUN EL ATROUSS
+61510 1523   -1217  0 60 0 ---- SELIBABY
+61520 1587   -593   0 261 0 ---- BASSIKOUNOU
+61974 -1038  5660   4 3 4 ---- AGALEGA
+61986 -1645  5962   4 2 4 ---- ST. BRANDON (RAPHAEL ISLAND)
+61988 -1968  6342   62 58 4 P-P- RODRIGUES (POINT CANON)
+61989 -1975  6337   34 30 4 ---- PLAINE CORAIL (RODRIGUES)
+61990 -2043  5768   57 55 4 ---- PLAISANCE (MAURITIUS)
+61995 -2028  5748   425 423 0 T--- VACOAS (MAURITIUS)
+60060 2937   -1018  0 50 0 ---- SIDI IFNI
+60100 3578   -580   0 11 0 ---- TANGER-PORT
+60101 3572   -590   0 14 0 ---- TANGER (AERODROME)
+60105 3515   -610   0 66 0 ---- LARACHE
+60106 3517   -530   0 287 0 ---- CHEFCHAOUEN
+60107 3518   -385   14 27 0 ---- AL HOCEIMA
+60115 3478   -193   470 468 0 --P- OUJDA
+60120 3430   -658   0 4 0 ---- KENITRA
+60127 3422   -400   510 509 0 ---- TAZA
+60128 3438   -288   0 415 0 ---- TAOURIRT
+60135 3403   -675   79 74 0 ---- RABAT-SALE
+60136 3422   -605   52 50 0 ---- SIDI SLIMANE
+60141 3392   -497   579 571 0 ---- FES-SAIS
+60146 3372   -740   5 4 0 ---- MOHAMMEDIA
+60150 3387   -552   560 556 0 --P- MEKNES
+60155 3357   -767   57 56 0 T--- CASABLANCA
+60156 3337   -758   206 200 0 ---- NOUASSEUR
+60160 3350   -517   1665 1664 2 ---- IFRANE
+60165 3323   -852   28 27 0 ---- EL JADIDA
+60177 3295   -762   0 408 0 ---- SETTAT
+60178 3287   -697   781 771 0 ---- KHOURIBGA
+60185 3228   -923   45 43 0 ---- SAFI
+60190 3253   -628   0 507 0 ---- KASBA-TADLA
+60191 3237   -640   472 468 0 T--- BENI-MELLAL
+60195 3268   -473   1515 1508 2 ---- MIDELT
+60200 3257   -195   1143 1142 2 ---- BOUARFA
+60210 3193   -440   1042 1037 2 ---- ERRACHIDIA
+60220 3152   -978   8 7 0 ---- ESSAOUIRA
+60223 3103   -848   0 667 0 ---- TAKERKOUSTE
+60230 3162   -803   466 464 0 ---- MARRAKECH
+60237 3122   -792   0 2680 0 ---- OUKAIMDEN
+60250 3038   -957   0 18 0 ---- AGADIR INEZGANNE
+60252 3032   -938   0 74 0 T--- AGADIR AL MASSIRA
+60253 3050   -882   266 264 0 ---- TAROUDANT
+60265 3093   -690   1140 1136 2 ---- OUARZAZATE
+60270 2968   -973   261 260 0 ---- TIZNIT
+60280 2902   -1005  301 300 0 ---- GUELMIN
+60285 2843   -1115  204 199 0 ---- TAN-TAN
+60318 3558   -532   0 4 0 ---- TETUAN
+60335 2673   -1168  0 110 0 ---- SMARA
+60340 3498   -302   0 178 0 ---- NADOR-AROUI
+67205 -1135  4037   29 27 0 ---- MOCIMBOA DA PRAIA
+67215 -1298  4053   50 101 0 --P- PEMBA
+67217 -1330  3523   1365 1364 2 --P- LICHINGA
+67221 -1373  3755   838 836 2 ---- MARRUPA
+67223 -1313  3903   535 534 2 ---- MONTEPUEZ
+67229 -1473  3435   1311 1270 2 ---- ULONGUE
+67231 -1483  3652   607 606 2 ---- CUAMBA
+67237 -1510  3928   441 438 0 --T- NAMPULA
+67241 -1503  4067   11 10 0 ---- LUMBO
+67243 -1562  3043   340 343 0 ---- ZUMBO
+67261 -1618  3358   150 149 0 --P- TETE
+67273 -1622  3990   62 61 0 ---- ANGOCHE
+67280 -1783  3533   45 30 0 ---- CAIA
+67283 -1788  3688   16 6 0 --P- QUELIMANE
+67285 -1727  3815   26 25 0 ---- PEBANE
+67295 -1912  3347   732 731 2 ---- CHIMOIO
+67297 -1980  3490   16 8 0 ---- BEIRA
+67308 -2208  3168   453 452 0 ---- CHICUALACUALA
+67315 -2200  3532   21 20 0 ---- VILANCULOS
+67323 -2387  3538   15 14 0 --P- INHAMBANE
+67335 -2505  3363   5 4 0 ---- XAI XAI
+67341 -2592  3257   44 39 0 --T- MAPUTO/MAVALANE
+67346 -2628  3218   104 100 0 ---- CHANGALANE
+68004 -2045  1663   0 1455 0 ---- OTJIWARONGO
+68006 -1787  1595   1100 1096 2 ---- ONDANGWA
+68010 -1918  1592   1100 1102 2 ---- OKAUKUEJO
+68014 -1958  1810   1400 1406 2 ---- GROOTFONTEIN
+68016 -1933  1272   0 16 0 ---- MOWE BAY
+68018 -1792  1977   0 1102 2 ---- RUNDU
+68098 -2298  1465   88 88 0 ---- WALVIS BAY AIRPORT
+68102 -2010  1615   0 1250 2 ---- OUTJO
+68104 -2288  1443   0 7 0 ---- WALVIS BAY (PELICAN POINT)
+68106 -2357  1505   400 407 2 ---- GOBABEB
+68108 -2123  1485   800 835 2 ---- UIS
+68109 -2260  1707   0 1699 0 ---- EROS
+68110 -2257  1710   1700 1725 2 T-T- WINDHOEK
+68112 -2247  1747   0 1719 2 ---- HOSEA KUTAKO INTERNATIONAL AIRPORT
+68114 -2142  1593   1217 1217 2 ---- OMARURU
+68116 -2247  1897   0 1445 2 ---- GOBABIS
+68212 -2450  1787   1100 1108 2 ---- MARIENTAL
+68300 -2668  1523   0 139 0 ---- LUDERITZ AIRPORT
+68312 -2653  1812   1100 1064 2 -PP- KEETMANSHOOP
+61017 1868   1292   357 355 0 PPPP BILMA
+61024 1697   798    502 501 0 PPPP AGADEZ
+61036 1420   145    210 209 0 ---- TILLABERY
+61043 1490   525    391 386 0 PPPP TAHOUA
+61045 1398   1030   460 464 0 ---- GOURE
+61049 1425   1312   286 285 0 ---- N'GUIGMI
+61052 1348   217    227 223 0 TPTP NIAMEY-AERO
+61053 1303   330    213 0 0 ---- DOSSO
+61075 1380   525    273 272 0 PPPP BIRNI-N'KONNI
+61080 1347   708    373 372 0 PPPP MARADI
+61085 1342   1278   305 303 0 PPPP DIFFA
+61090 1378   898    453 452 0 PPPP ZINDER
+61096 1323   1198   337 338 0 ---- MAINE-SOROA
+61099 1188   345    203 202 0 ---- GAYA
+65001 1088   475    0 244 0 ---- YELWA
+65003 1247   422    0 220 0 ---- BIRNIN KEBBI
+65010 1302   525    350 0 0 ---- SOKOTO
+65015 1217   670    0 463 0 ---- GUSAU
+65019 1060   745    645 0 0 ---- KADUNA
+65028 1302   768    517 0 0 ---- KATSINA
+65030 1110   768    110 0 0 ---- ZARIA
+65046 1205   853    472 0 0 --T- KANO
+65055 1028   982    0 609 0 ---- BAUCHI
+65064 1288   1047   0 343 0 ---- NGURU
+65073 1170   1103   0 414 0 ---- POTISKUM
+65075 1028   1115   505 0 0 ---- GOMBE
+65082 1185   1308   353 0 0 --T- MAIDUGURI
+65101 848    458    307 0 0 ---- ILORIN
+65108 867    338    0 268 0 ---- SHAKI
+65112 910    602    0 144 0 ---- BIDA
+65123 962    653    256 0 0 ---- MINNA
+65124 855    853    0 181 0 ---- LAFIA
+65125 925    700    343 0 0 --T- ABUJA
+65134 987    890    1290 0 1 ---- JOS
+65145 818    975    0 110 0 ---- IBI
+65167 923    1247   186 0 0 --T- YOLA
+65200 797    360    0 330 0 ---- ISEYIN
+65201 658    333    39 0 0 ---- LAGOS/IKEJA
+65202 650    338    0 19 0 --T- LAGOS/OSHODI
+65203 645    340    0 14 0 ---- LAGOS ROOF
+65208 743    390    227 0 0 ---- IBADAN
+65210 683    393    0 77 0 ---- IJEBU ODE
+65213 717    333    0 104 0 ---- ABEOKUTA
+65215 778    448    0 302 0 ---- OSHOGBO
+65222 710    483    0 287 0 ---- ONDO
+65224 765    520    0 453 0 ---- ADO EKITI
+65229 632    510    0 77 0 ---- BENIN CITY
+65232 728    530    375 0 0 ---- AKURE
+65236 552    573    0 6 0 ---- WARRI
+65243 778    673    0 62 0 ---- LOKOJA
+65245 615    678    0 67 0 ---- ONITSHA
+65246 620    705    0 325 0 ---- AWKA
+65250 485    702    19 0 0 ---- PORT HARCOURT
+65252 548    700    0 91 0 ---- OWERRI
+65254 548    755    0 122 0 ---- UMUAHIA
+65257 647    755    141 0 0 --T- ENUGU
+65260 550    792    38 0 0 ---- UYO
+65264 497    835    0 61 0 ---- CALABAR
+65271 773    853    112 0 0 ---- MAKURDI
+65273 597    870    0 119 0 ---- IKOM
+65274 660    932    0 284 0 ---- OBUDU
+65275 667    880    0 117 0 ---- OGOJA
+61901 -1593  -567   436 435 0 --T- ST. HELENA IS.
+61902 -797   -1440  79 86 0 --T- WIDE AWAKE FIELD (ASCENSION IS.)
+61903 -1593  -567   438 0 1 ---- ST. HELENA (CTBT)
+61931 38     672    13 8 0 P-P- S. TOME
+61934 165    742    5 3 0 ---- PRINCIPE
+61966 -728   7240   8 0 1 ---- DIEGO GARCIA (CTBT)
+61967 -730   7240   3 1 0 T-P- DIEGO GARCIA
+61968 -1157  4728   4 3 0 ---- ILES GLORIEUSES
+61970 -1705  4270   10 9 0 ---- ILE JUAN DE NOVA
+61972 -2233  4033   6 6 0 ---- ILE EUROPA
+61976 -1588  5452   13 7 0 ---- SERGE-FROLOW (ILE TROMELIN)
+61979 -2090  5542   0 746 0 ---- LE COLORADO
+61980 -2088  5552   13 20 0 --T- SAINT-DENIS/GILLOT (REUNION)
+61982 -2090  5558   75 0 1 ---- ST. DENIS, REUNION (CTBT)
+61996 -3778  7757   29 27 0 ---- MARTIN DE VIVIES (ILE AMSTERDAM)
+61997 -4642  5185   146 146 0 ---- ALFRED FAURE (ILES CROZET)
+61998 -4935  7023   30 29 0 --T- PORT-AUX-FRANCAIS (ILES KERGUELEN)
+62801 1175   3278   282 282 0 ---- RENK
+62840 955    3165   388 387 0 P-T- MALKAL
+62871 847    2568   545 545 0 ---- RAGA
+62880 770    2802   438 438 0 P-P- WAU
+62941 487    3160   457 460 0 P-P- JUBA
+64380 -247   2892   1591 1587 2 ---- KAMEMBE
+64381 -167   2925   1554 1550 2 ---- GISENYI
+64383 -148   2962   1860 1855 2 ---- RUHENGERI
+64384 -260   2972   1768 1764 2 ---- BUTARE
+64387 -195   3012   1497 1491 2 ---- KIGALI
+61600 1605   -1643  0 2 0 ---- SAINT-LOUIS
+61612 1663   -1492  0 5 0 ---- PODOR
+61627 1537   -1512  0 19 0 ---- LINGUERE
+61630 1562   -1325  0 15 0 ---- MATAM
+61641 1472   -1750  0 24 0 TPTP DAKAR/YOFF
+61666 1465   -1622  0 7 0 ---- DIOURBEL
+61679 1412   -1607  0 6 0 ---- KAOLACK
+61687 1377   -1367  0 48 0 PPTP TAMBACOUNDA
+61695 1255   -1627  0 19 0 ---- ZIGUINCHOR
+61697 1203   -1675  0 48 0 ---- CAP-SKIRRING
+61698 1287   -1497  0 8 0 ---- KOLDA
+61699 1257   -1222  0 165 0 ---- KEDOUGOU
+63980 -467   5552   3 3 0 ---- SEYCHELLES INTERNATIONAL AIRPORT
+63981 -532   5568   3 3 0 ---- PRASLIN
+63985 -468   5552   4 4 0 T-T- SEYCHELLES INTER. AIRPORT (RAWINSONDE STATION)
+63994 -568   5307   3 3 0 ---- DESROCHES
+63995 -935   4653   4 4 0 ---- ALDABRA
+63996 -1010  5117   3 3 0 ---- FARQUHAR
+61856 862    -1320  27 25 0 PPPP LUNGI
+61866 753    -1250  8 7 0 ---- BONTHE
+61873 855    -1205  84 0 0 ---- MAKENI
+61877 842    -1183  68 67 0 ---- YELE
+61878 810    -1210  56 54 0 ---- NJALA
+61881 795    -1177  93 100 0 ---- BO
+61886 958    -1155  464 463 0 ---- KABALA
+61891 798    -1085  186 185 0 PPPP DARU
+61892 865    -1097  390 389 0 ---- SEFADU
+63150 995    4318   1454 0 0 ---- BORAMA
+63160 1042   4502   9 0 0 ---- BERBERA
+63170 950    4408   1326 0 2 ---- HARGEISA
+63175 952    4557   1032 0 2 ---- BURAO
+63180 1063   4737   1743 0 0 ---- ERIGAVO
+63190 850    4737   700 0 0 ---- LAS-ANOD
+63200 1195   5073   2 0 0 ---- ALULA
+63210 1128   4918   2 0 0 ---- BOSASO
+63220 1030   5023   344 0 0 ---- SCUSCIUBAN
+63225 952    4908   812 0 2 ---- GARDO
+63227 795    4850   0 0 0 ---- GAROE
+63228 795    4978   0 0 0 ---- EIL
+63230 685    4727   302 0 0 ---- GALCAYO
+63235 533    4857   10 0 0 ---- OBBIA
+63237 470    4662   175 0 0 ---- EL BUR
+63240 470    4522   173 0 0 ---- BELET UEN
+63245 418    4387   0 0 2 ---- HUDDUR
+63247 313    4367   487 0 2 ---- ISCIA BAIDOA
+63248 358    4245   0 0 0 ---- LUG-GANANE
+63250 235    4230   116 0 0 ---- BARDERA
+63260 203    4535   9 0 0 ---- MOGADISCIO
+63270 -37    4243   10 0 0 ---- CHISIMAIO
+68155 -2367  2770   839 839 2 ---- LEPHALALE
+68163 -2360  2837   996 996 2 ---- MARKEN
+68174 -2387  2945   1226 1226 2 T--- POLOKWANE
+68176 -2315  2957   894 894 2 ---- MARA
+68181 -2262  3017   527 527 2 ---- TSHIPISE
+68182 -2307  3027   706 706 2 ---- LEVUBU
+68183 -2308  3038   614 614 2 ---- THOHOYANDOU
+68185 -2510  3047   1433 1433 2 ---- LYDENBURG
+68191 -2393  3115   432 0 0 ---- PHALABORWA
+68196 -2267  3102   457 0 0 ---- PUNDA MARIA
+68241 -2468  2618   1027 1027 0 ---- MADIKWE GAME RESERVE
+68242 -2580  2555   1281 1281 2 ---- MAFIKENG
+68253 -2457  2742   977 977 2 ---- THABAZIMBI
+68255 -2565  2722   1150 1150 2 ---- RUSTENBURG
+68257 -2525  2722   1085 1085 2 ---- PILANESBERG
+68261 -2582  2825   1517 1517 0 ---- BOLEPI HOUSE
+68262 -2573  2818   1308 1308 2 ---- PRETORIA EENDRACHT
+68263 -2590  2820   1526 1526 2 T-T- PRETORIA (IRENE)
+68265 -2598  2813   1621 1621 0 ---- GRAND CENTRAL
+68267 -2648  2998   1774 1774 2 ---- ERMELO
+68268 -2490  2832   1143 1143 2 ---- WARMBAD TOWOOMBA
+68269 -2577  2820   1439 1439 2 ---- PRETORIA UNISA
+68271 -2420  2900   1107 1097 2 ---- KOPANE
+68272 -2517  2932   953 953 2 ---- OUDESTAD
+68273 -2583  2918   1555 1555 2 ---- WITBANK
+68285 -2568  3003   1879 0 0 ---- BELFAST
+68287 -2492  3085   1436 1436 2 ---- GRASKOP
+68289 -2550  3092   883 883 2 ---- NELSPRUIT
+68291 -2435  3105   524 531 2 ---- HOEDSPRUIT
+68295 -2497  3157   150 0 0 ---- SKUKUZA
+68296 -2497  3160   263 263 0 ---- SKUKUZA
+68297 -2552  3190   183 183 0 ---- KOMATIDRAAI
+68322 -2647  2060   882 882 2 ---- TWEE RIVIEREN
+68329 -2688  2205   938 930 2 ---- VAN ZYLSRUS
+68331 -2767  2300   1186 1186 2 ---- KATHU
+68333 -2742  2343   1323 1315 2 ---- KURUMAN
+68335 -2753  2477   1110 1100 2 ---- TAUNG
+68338 -2695  2462   1234 1234 2 ---- VRYBURG
+68341 -2612  2617   1485 1485 2 ---- LICHTENBURG
+68342 -2682  2602   1498 1498 2 ---- OTTOSDAL
+68343 -2765  2562   1225 1228 2 ---- BLOEMHOF
+68345 -2798  2665   1343 1343 2 ---- WELKOM
+68347 -2690  2662   1322 1322 2 ---- KLERKSDORP
+68349 -2632  2682   1494 1493 2 ---- VENTERSDORP
+68350 -2672  2707   1349 1349 2 ---- POTCHEFSTROOM
+68353 -2657  2795   1479 1479 2 ---- VEREENIGING
+68355 -2762  2722   1434 1432 2 ---- KROONSTAD
+68361 -2615  2800   1624 1624 2 ---- JOHANNESBURG BOT. TUINE
+68362 -2727  2848   1507 1507 2 ---- FRANKFORT-TNK
+68363 -2620  2842   1592 1592 2 ---- SPRINGS
+68368 -2615  2822   1695 0 2 ---- JOHANNESBURG INTNL. AIRPORT
+68370 -2645  2945   1650 0 2 ---- BETHAL
+68375 -2742  2917   1670 1670 2 ---- VREDE
+68377 -2777  2997   1241 1238 2 ---- NEWCASTLE
+68380 -2607  3012   1700 1700 2 ---- CAROLINA
+68387 -2777  3080   1163 1163 2 ---- VRYHEID
+68397 -2747  3258   82 82 0 ---- MBAZWANA AIRFIELD
+68400 -2738  3217   63 63 0 ---- MAKATINI
+68403 -2857  1653   28 21 0 ---- ALEXANDER BAY
+68408 -2923  1687   7 0 0 ---- PORT NOLLOTH
+68411 -2877  1762   174 174 0 ---- VIOOLSDRIF
+68416 -2912  1938   982 0 2 ---- POFADDER
+68424 -2840  2125   835 835 2 T--- UPINGTON
+68425 -2860  2033   635 635 0 ---- AUGRABIES FALLS
+68429 -2833  2307   1321 1321 2 ---- POSTMASBURG
+68438 -2880  2480   1196 1196 2 ---- KIMBERLEY
+68442 -2910  2630   1353 1353 2 --T- BLOEMFONTEIN AIRPORT
+68443 -2912  2617   1406 1406 2 ---- BLOEMFONTEIN CITY
+68447 -2895  2633   1303 0 0 ---- GLEN COLLEGE AWS
+68449 -2882  2790   1628 1628 2 ---- FICKSBURG
+68461 -2823  2840   1687 1687 2 ---- BETHLEHEM
+68471 -2837  2937   1680 1680 2 ---- VAN REENEN
+68474 -2868  2895   1392 1392 2 ---- ROYAL NATIONAL PARK
+68478 -2900  2987   1144 1144 2 ---- ESTCOURT
+68479 -2857  2977   1069 1069 2 ---- LADYSMITH
+68481 -2740  3158   319 319 0 ---- PONGOLA
+68485 -2920  3000   1393 1393 0 ---- MOOI RIVER
+68487 -2907  3060   1029 1029 2 ---- GREYTOWN
+68488 -2837  3122   770 770 2 ---- BABANANGO
+68491 -2820  3242   8 8 0 ---- CHARTERS CREEK
+68493 -2830  3142   524 524 0 ---- ULUNDI
+68494 -2915  3140   112 112 0 ---- MANDINI
+68495 -2872  3207   36 35 0 ---- RICHARDS BAY
+68497 -2895  3170   38 38 0 ---- MTUNZINI
+68512 -2967  1788   1006 1006 2 ---- SPRINGBOK
+68513 -3018  1728   95 95 0 ---- KOINGNAAS
+68514 -2897  1808   408 408 0 ---- HENKRIES
+68515 -3085  1757   11 11 0 ---- GARIES-GROENRIVIER
+68523 -3045  2047   922 922 2 ---- BRANDVLEI
+68524 -3035  2182   962 962 2 ---- VANWYKSVLEI
+68527 -2967  2272   949 949 2 ---- PRIESKA
+68538 -3067  2398   1286 1286 2 --T- DE AAR
+68541 -2945  2518   1387 1387 0 ---- FAURESMITH
+68543 -3053  2553   1272 0 0 ---- GARIEP DAM
+68546 -3083  2687   1347 1347 2 ---- ALIWAL NORTH PLAATKOP
+68549 -2990  2687   1420 1420 0 ---- WEPENER
+68558 -3092  2760   1818 1825 2 ---- BARKLY EAST (CAERLEON)
+68570 -3033  2880   1493 1490 2 ---- MATATIELE
+68572 -2978  2935   1609 1609 2 ---- SHALEBURN
+68575 -3015  3007   937 937 2 ---- IXOPO
+68577 -3050  2938   1443 0 0 ---- KOKSTAD
+68579 -3075  3025   506 506 2 ---- PADDOCK
+68580 -2953  3025   1071 1071 2 ---- CEDARA
+68581 -2962  3040   673 673 2 ---- PIETERMARITZBURG
+68582 -2965  3040   721 739 0 ---- ORIBI AIRPORT
+68583 -2970  3105   94 94 0 ---- MOUNT EDGECOMBE
+68585 -3038  3068   15 0 0 ---- PENNINGTON SOUTH
+68587 -3107  3022   11 11 0 ---- PORT EDWARD
+68588 -2995  3093   14 8 0 ---- DURBAN INTNL. AIRPORT
+68589 -2927  2952   1762 1762 2 ---- GIANTS CASTLE
+68591 -3085  3032   154 154 0 ---- MARGATE
+68592 -2960  3112   109 105 0 T-T- KING SHAKA INT'L AIRPORT
+68593 -2977  3105   14 8 0 ---- DURBAN-VIRGINIA
+68613 -3203  1832   93 93 0 ---- LAMBERTS BAY NORTIER
+68614 -3167  1848   32 32 0 ---- VREDENDAL
+68618 -3147  1975   977 975 2 ---- CALVINIA
+68619 -3133  1908   731 731 0 ---- NIEUWOUDTVILLE
+68624 -3190  2150   1267 1267 2 ---- FRASERBURG
+68633 -3118  2497   1495 1495 2 ---- NOUPOORT
+68647 -3192  2687   1104 1104 2 ---- QUEENSTOWN
+68649 -3112  2680   1602 1602 2 ---- JAMESTOWN
+68651 -3133  2783   1463 1463 2 ---- ELLIOT
+68657 -3198  2758   970 0 0 ---- COFIMVABA
+68668 -3152  2867   747 747 2 ---- UMTATA
+68671 -3245  2863   45 0 0 ---- MAZEPPA BAY
+68673 -3225  2812   573 0 0 ---- BUTTERWORTH
+68674 -3162  2955   47 47 0 ---- CAPE HERMES
+68677 -3195  2913   161 0 0 ---- COFFEE BAY
+68711 -3217  1888   100 102 0 ---- CLANWILLIAM
+68712 -3282  1785   55 62 0 ---- CAPE COLUMBINE
+68713 -3372  1897   109 109 0 ---- PAARL
+68714 -3297  1815   31 31 0 ---- LANGEBAANWEG
+68715 -3347  1872   101 101 0 ---- MALMESBURY
+68717 -3300  1897   122 122 0 ---- PORTERVILLE
+68718 -3378  1988   210 203 0 ---- ROBERTSON
+68719 -3295  1942   958 958 2 ---- EXCELSIOR CERES
+68722 -3240  2065   1458 1458 2 ---- SUTHERLAND
+68723 -3318  2087   656 655 2 ---- LAINGSBURG
+68727 -3235  2257   899 899 2 ---- BEAUFORT WEST
+68737 -3218  2453   792 792 2 ---- GRAAFF-REINET
+68744 -3217  2562   926 926 2 ---- CRADOCK-MUN
+68747 -3278  2662   455 455 0 ---- FORT BEAUFORT
+68752 -3290  2727   590 596 2 ---- BISHO
+68754 -3253  2747   901 899 2 ---- DOHNE-AGR
+68811 -3318  1812   7 4 0 ---- GEELBEK
+68813 -3378  1837   2 2 0 ---- ROBBEN ISLAND
+68814 -3342  1808   7 4 0 ---- DASSEN ISLAND
+68816 -3397  1860   42 46 0 T-T- CAPE TOWN INTNL. AIRPORT
+68817 -3390  1845   2 6 0 ---- CAPE TOWN - PORTNET
+68819 -3393  1840   97 97 0 ---- MOLTENO RESERVIOR
+68821 -3365  1942   199 199 0 ---- WORCESTER
+68825 -3350  2127   538 537 0 ---- LADISMITH
+68826 -3360  2218   328 0 0 ---- OUDTSHOORN
+68828 -3402  2238   191 0 0 ---- GEORGE AIRPORT
+68832 -3330  2348   840 840 2 ---- WILLOWMORE
+68833 -3383  2385   546 545 2 ---- JOUBERTINA
+68835 -3375  2482   97 97 0 ---- PATENSIE
+68837 -3380  2567   46 46 0 ---- NGQURA (COEGA)
+68839 -3370  2543   157 158 0 ---- UITENHAGE
+68840 -3303  2572   506 506 0 ---- SOMERSET EAST
+68841 -3343  2573   143 0 0 ---- ADDO ELEPHANT PARK
+68842 -3398  2560   63 0 0 T--- PORT ELIZABETH
+68843 -3355  2687   84 85 0 ---- PORT ALFRED ARPORT
+68845 -3383  2628   3 0 0 ---- BIRD ISLAND
+68849 -3328  2650   642 642 2 ---- GRAHAMSTOWN
+68858 -3302  2782   116 0 0 ---- EAST LONDON
+68906 -4035  -987   54 0 0 T-T- GOUGH ISLAND
+68911 -3413  1883   7 7 0 ---- STRAND
+68912 -3413  1832   7 7 0 ---- SLANGKOP
+68915 -3435  1848   231 224 0 ---- CAPE POINT
+68916 -3435  1848   228 228 0 ---- CAPE POINT
+68918 -3442  1922   16 13 0 ---- HERMANUS
+68920 -3482  2000   4 11 0 ---- CAPE AGULHAS
+68921 -3480  2005   3 3 0 ---- STRUISBAAI
+68923 -3413  1990   151 151 0 ---- TYGERHOEK
+68925 -3413  1902   311 0 0 ---- ELGIN EXP FARM
+68926 -3408  2125   152 0 0 ---- RIVERSDALE
+68927 -3437  2138   103 102 0 ---- STILBAAI
+68928 -3418  2212   136 0 0 ---- CAPE ST. BLAIZE
+68931 -3408  2332   139 137 0 ---- PLETTENBERG BAY
+68933 -3402  2390   5 6 0 ---- TSITSIKAMMA
+68935 -3405  2308   54 54 0 ---- KNYSNA
+68938 -3420  2482   7 7 0 ---- CAPE ST. FRANCIS
+68939 -3420  2485   7 0 0 ---- CAPE ST FRANCIS
+68994 -4687  3787   24 0 0 T-T- MARION ISLAND
+68999 -3395  1860   46 46 0 ---- CT-AWS
+60001 2782   -1788  32 32 0 ---- HIERRO/AEROPUERTO
+60005 2862   -1775  31 33 0 ---- LA PALMA/AEROPUERTO
+60007 2802   -1720  225 219 0 ---- LA GOMERA/AEROPUERTO
+60010 2830   -1648  2368 2371 3 ---- IZANA
+60015 2847   -1632  617 632 0 ---- TENERIFE/LOS RODEOS
+60018 2832   -1637  111 105 0 T-T- TENERIFE-GUIMAR
+60020 2845   -1623  36 35 0 ---- STA. CRUZ DE TENERIFE
+60025 2803   -1655  77 64 0 ---- TENERIFE SUR
+60028 2802   -1560  0 1765 0 ---- ARTENARA
+60030 2792   -1538  47 24 0 ---- LAS PALMAS DE GRAN CANARIA/GANDO
+60035 2843   -1385  30 25 0 ---- FUERTEVENTURA/AEROPUERTO
+60040 2895   -1360  21 14 0 ---- LANZAROTE/AEROPUERTO
+60320 3590   -533   88 87 0 ---- CEUTA
+60338 3527   -295   55 47 0 ---- MELILLA
+62600 2182   3135   190 183 0 P-P- WADI HALFA
+62615 2222   3665   2 2 0 ---- HALIB
+62620 2075   3255   468 468 0 ---- STATION NO 6
+62635 1983   3697   120 0 0 ---- ARBAT
+62640 1953   3332   312 312 0 P-P- ABU HAMED
+62641 1958   3722   42 3 0 P-T- PORT SUDAN
+62650 1917   3048   226 226 0 P-T- DONGOLA
+62652 1910   3733   3 0 0 ---- SUAKIN
+62660 1855   3185   249 249 0 ---- KARIMA
+62671 1843   3773   19 19 0 ---- TOKAR
+62675 1823   3818   2 2 0 ---- AGIG
+62680 1770   3397   345 347 0 ---- ATBARA
+62682 1757   3393   350 0 0 ---- HUDEIBA
+62700 1670   3343   360 360 0 ---- SHENDI
+62721 1560   3255   380 382 0 P-T- KHARTOUM
+62722 1583   3615   431 430 0 ---- AROMA
+62723 1567   3253   380 0 0 ---- SHAMBAT OBSERVATORY
+62730 1547   3640   500 500 0 P-P- KASSALA
+62733 1532   3560   451 451 0 ---- HALFA EL GAIDIDA
+62750 1400   3233   378 378 0 ---- ED DUEIM
+62751 1440   3348   408 408 0 ---- WAD MEDANI
+62752 1403   3540   599 599 0 ---- GEDAREF
+62760 1362   2533   730 733 0 P-T- EL FASHER
+62762 1355   3362   418 418 0 ---- SENNAR
+62770 1348   2245   805 805 0 ---- GENINA
+62771 1317   3023   574 574 0 P-P- EL OBEID
+62772 1317   3267   381 381 0 ---- KOSTI
+62774 1307   3395   435 0 0 ---- UMM BENIN
+62781 1270   2843   564 565 0 ---- EN NAHUD
+62790 1205   2488   643 0 0 ---- NYALA
+62795 1273   3413   445 445 0 ---- ABU NA'AMA
+62803 1187   3105   885 884 0 ---- RASHAD
+62805 1178   3438   470 474 0 P-P- DAMAZINE
+62809 1133   2782   453 0 0 ---- BABANUSA
+62810 1100   2972   499 499 0 ---- KADOGLLI
+68298 -2598  3198   0 570 0 ---- LOMAHASHA
+68299 -2597  3125   0 1099 0 ---- PIGGS PEAK
+68390 -2588  3150   0 480 0 ---- MAYIWANE
+68391 -2633  3113   0 1193 0 ---- MBABANE
+68392 -2705  3110   0 1102 0 ---- NHLANGANO
+68393 -2727  3182   0 315 0 ---- LAVUMISA
+68395 -2697  3132   0 1190 0 ---- HLATHIKHULU
+68396 -2653  3130   0 641 1 ---- MANZINI/MATSAPA AIRPORT
+68398 -2643  3195   0 667 0 ---- SITEKI
+68399 -2685  3192   0 94 0 ---- BIG BEND
+65351 1087   25     330 329 0 ---- DAPAON
+65352 1037   47     146 145 0 ---- MANGO
+65355 977    110    343 342 0 ---- NIAMTOUGOU
+65357 955    117    341 340 0 ---- KARA
+65361 898    115    387 386 0 ---- SOKODE
+65376 758    112    402 400 0 ---- ATAKPAME
+65378 695    58     641 643 0 ---- KOUMA-KONDA
+65380 658    150    44 44 0 ---- TABLIGBO
+65387 617    125    25 20 0 P-P- LOME
+60710 3695   875    21 20 0 ---- TABARKA
+60714 3725   980    3 5 0 PPP- BIZERTE
+60715 3683   1023   4 4 0 TPP- TUNIS-CARTHAGE
+60720 3685   1108   30 29 0 PPP- KELIBIA
+60723 3673   918    159 158 0 ---- BEJA
+60725 3648   880    144 143 0 PPP- JENDOUBA
+60728 3647   1070   78 0 0 ---- NABEUL
+60729 3643   1008   156 0 0 ---- ZAGHOUAN
+60731 3607   1045   0 0 0 ---- ENFIDHA
+60732 3613   870    518 0 0 ---- LE KEF
+60734 3607   937    445 443 0 ---- SILIANA
+60735 3567   1010   68 60 0 PPP- KAIROUAN
+60738 3555   868    1092 1091 2 PPP- THALA
+60739 3517   883    707 707 0 ---- KASSERINE
+60740 3567   1075   3 2 0 PPP- MONASTIR-SKANES
+60742 3550   1107   12 0 0 ---- MAHDIA
+60745 3442   882    314 313 0 PPP- GAFSA
+60748 3500   948    355 354 0 ---- SIDI BOUZID
+60750 3472   1068   23 21 0 PPP- SFAX EL-MAOU
+60760 3392   817    86 86 0 PPT- TOZEUR
+60764 3370   897    46 44 0 ---- KEBILI
+60765 3388   1010   5 4 0 ---- GABES
+60769 3387   1077   4 3 0 PPP- DJERBA MELLITA
+60770 3335   1048   117 116 0 ---- MEDENINE
+60772 3292   1045   0 215 0 ---- TATAOUINE
+60775 3232   1040   301 300 0 -PP- REMADA
+60780 3168   930    259 258 0 -PP- EL BORMA
+63602 305    3092   1211 1204 2 ---- ARUA
+63628 230    3158   0 693 0 ---- PARAA
+63630 275    3233   1105 1104 2 ---- GULU
+63654 168    3172   1147 1146 2 ---- MASINDI
+63658 172    3362   1123 1132 2 ---- SOROTI
+63674 18     3010   961 959 2 ---- KASESE
+63680 32     3262   1140 1144 2 ---- KAMPALA
+63682 45     3318   1173 1175 2 ---- JINJA
+63684 68     3417   1171 1170 2 ---- TORORO
+63702 -62    3065   1413 1412 2 ---- MBARARA
+63705 5      3245   1155 1155 2 ---- ENTEBBE AIRPORT
+63726 -125   2998   1869 1867 2 ---- KABALE
+63729 -133   3182   0 1137 2 -P-- BUKOBA
+63733 -150   3380   1147 1147 2 ---- MUSOMA
+63756 -247   3292   1140 1139 2 -PP- MWANZA
+63784 -365   3335   1000 0 2 ---- SHINYANGA
+63789 -333   3662   1387 1387 2 ---- ARUSHA
+63790 -335   3733   831 854 2 ---- MOSHI
+63791 -342   3707   896 891 2 -PP- KILIMANJARO INT
+63801 -488   2963   885 882 2 -PT- KIGOMA
+63810 -480   3472   1307 0 2 ---- SINGIDA
+63816 -408   3772   872 872 2 ---- SAME
+63832 -508   3283   1190 1181 2 -PP- TABORA AIRPORT
+63840 -543   3803   756 0 0 ---- HANDENI
+63844 -508   3907   35 39 0 ---- TANGA
+63845 -525   3982   0 25 0 ---- PEMBA/KARUME
+63862 -617   3577   1120 1119 2 -PP- DODOMA
+63866 -683   3765   0 526 0 ---- MOROGORO
+63870 -622   3922   15 15 0 -PP- ZANZIBAR/KISAUNI
+63881 -797   3163   1923 0 2 ---- SUMBAWANGA
+63887 -767   3575   1428 1426 2 ---- IRINGA
+63894 -687   3920   55 55 0 -PT- DAR ES SALAAM INT
+63895 -792   3967   0 21 0 ---- MAFIA/KILINDONI
+63932 -893   3347   1707 1704 2 -P-- MBEYA
+63936 -867   3672   1200 0 2 ---- MAHENGE
+63962 -1068  3558   1067 1067 2 ---- SONGEA
+63969 -1035  3875   465 463 0 ---- NACHINGWEA
+63971 -1027  4018   113 113 0 -PT- MTWARA
+60033 2717   -1322  64 63 0 ---- LAAYOUNE
+60096 2370   -1592  8 0 0 --T- DAKHLA
+67403 -980   2908   1324 1323 2 ---- KAWAMBWA
+67413 -885   3133   0 1673 2 ---- MBALA
+67441 -1175  2443   1363 1361 2 ---- MWINILUNGA
+67461 -1110  2885   1384 1382 2 ---- MANSA
+67469 -1137  2990   0 0 0 ---- SAMFYA
+67475 -1022  3113   1384 1382 2 -PP- KASAMA
+67476 -1010  3125   0 1536 0 ---- MISAMFU
+67477 -1190  3143   1402 1400 2 ---- MPIKA
+67481 -1012  3263   0 1360 0 ---- ISOKA
+67531 -1353  2312   1078 1077 2 ---- ZAMBEZI
+67541 -1353  2585   1234 1234 2 ---- KASEMPA
+67543 -1360  2420   0 1075 0 ---- KABOMPO
+67551 -1218  2638   0 1386 2 ---- SOLWEZI
+67561 -1300  2865   1270 1269 2 ---- NDOLA
+67563 -1260  2812   0 1243 0 ---- KAFIRONDA
+67571 -1323  3022   0 1384 0 ---- SERENJE
+67575 -1363  2943   0 1237 0 ---- MKUSHI
+67580 -1365  3257   0 1025 0 ---- MSEKERA
+67581 -1355  3258   1032 1028 2 -PP- CHIPATA
+67583 -1228  3320   0 1143 0 ---- LUNDAZI
+67599 -1327  3193   570 568 2 ---- MFUWE
+67625 -1485  2270   0 0 2 ---- KALABO
+67633 -1525  2315   1053 1052 2 -PP- MONGU
+67641 -1480  2480   1213 1213 2 ---- KAOMA
+67655 -1507  2718   1218 1216 2 ---- MUMBWA
+67659 -1577  2792   0 978 0 ---- KAFUE POLDER
+67662 -1440  2850   0 1165 0 ---- KABWE AGRIC
+67663 -1445  2847   1207 1206 2 ---- KABWE
+67665 -1532  2845   1154 1152 2 ---- LUSAKA INTERNATIONAL AIRPORT
+67666 -1542  2847   0 1280 0 --T- LUSAKA CITY AIRPORT
+67667 -1555  2825   0 1213 0 ---- MOUNT MAKULU
+67673 -1425  3128   1036 1035 2 ---- PETAUKE
+67731 -1610  2327   0 1027 0 ---- SENANGA
+67741 -1747  2430   951 949 2 ---- SESHEKE
+67743 -1782  2582   986 985 2 ---- LIVINGSTONE
+67751 -1600  2760   0 1018 0 ---- MAGOYE
+67753 -1683  2707   1278 1213 2 ---- CHOMA
+67755 -1762  2733   617 620 2 ---- BINGA
+67761 -1652  2888   518 518 2 -P-- KARIBA
+67765 -1683  2962   1344 1343 2 -P-- KAROI
+67767 -1563  3042   0 329 0 ---- KANYEMBA
+67771 -1737  3020   0 1140 0 ---- CHINHOYI
+67773 -1665  3070   0 1180 0 ---- GURUVE
+67774 -1783  3102   1472 1471 2 T-P- HARARE (BELVEDERE)
+67775 -1792  3113   1480 1479 2 ---- HARARE (KUTSAGA)
+67779 -1678  3158   966 965 2 ---- MOUNT DARWIN
+67781 -1742  3222   1244 1244 2 -P-- MUTOKO
+67785 -1758  3097   0 1290 0 ---- HERNDERSON
+67789 -1703  3098   0 1480 0 ---- MVURWI
+67843 -1810  2585   1062 1061 2 P-P- VICTORIA FALLS
+67853 -1863  2700   1077 1079 2 -P-- HWANGE NATIONAL PARK
+67861 -1822  2893   1282 1282 2 -P-- GOKWE
+67863 -1900  2890   1131 1131 0 ---- NKAYI
+67865 -1893  2983   1215 1213 2 ---- KWEKWE
+67867 -1945  2985   1429 1428 2 -P-- GWERU
+67869 -1832  2988   1157 1150 2 -P-- KADOMA
+67871 -1903  3088   1459 1460 2 ---- CHIVHU
+67875 -1932  3143   0 1190 0 ---- BUHERA
+67877 -1818  3147   1632 1630 2 ---- GRASSLANDS
+67881 -1853  3213   1430 1430 2 -P-- RUSAPE
+67889 -1828  3275   0 1880 0 ---- WYANGA
+67891 -1932  3060   0 1260 0 ---- MHONDORO
+67895 -1872  3285   0 1270 0 ---- MUKANDI
+67897 -1988  3288   0 1480 0 ---- CHISENGU
+67899 -1862  3157   0 1380 0 ---- WEDZA
+67951 -2048  2780   0 1390 0 ---- PLUMTREE
+67961 -2092  2845   0 1020 0 ---- KEZI
+67963 -2038  2855   0 1350 0 ---- MATOPOS
+67964 -2015  2862   1344 1343 2 T-P- BULAWAYO (GOETZ OBSY.)
+67965 -2002  2862   1326 1326 2 ---- BULAWAYO AIRPORT
+67967 -2138  2898   0 770 0 ---- TULI
+67969 -2105  2937   861 860 2 ---- WEST NICHOLSON
+67971 -2032  3007   0 980 0 ---- ZVISHAVANE
+67974 -1983  3078   0 0 0 ---- MAKOHOLI
+67975 -2007  3087   1095 1094 2 PP-- MASVINGO
+67976 -2055  3108   700 700 0 ---- RUPIKE
+67977 -2102  3158   430 429 2 P-P- BUFFALO RANGE
+67979 -2033  3147   0 770 0 ---- ZAKA
+67983 -2020  3262   1132 1131 2 ---- CHIPINGE
+67991 -2222  3000   457 456 2 -P-- BEITBRIDGE
+40904 3712   7052   1200 0 2 ---- FAIZABAD
+40905 3757   7150   2265 0 2 ---- SHIGHNAN
+40906 3693   6512   310 0 0 ---- ANDKHOI
+40908 3667   6572   360 0 0 ---- SHEBIRGHAN
+40909 3742   6608   262 0 0 ---- QAR-QIN
+40911 3670   6720   378 0 0 ---- MAZAR-I-SHARIF
+40913 3667   6892   433 0 0 ---- KUNDUZ
+40914 3610   6865   550 0 0 ---- BAGHLAN-FARM
+40916 3722   6742   300 0 0 ---- HAIRATAN
+40918 3670   7157   2620 0 2 ---- ISKACHEM
+40920 3650   7125   2600 0 3 ---- ZEBAK
+40921 3523   6228   680 0 0 ---- TURGHUNDI
+40922 3593   6477   815 0 0 ---- MIMANA
+40923 3558   6332   470 0 0 ---- BALA-MOORGHAB
+40925 3567   6427   1300 0 2 ---- QAISAR
+40930 3532   6902   3366 0 3 ---- NORTH-SALANG
+40931 3530   6907   3172 0 3 ---- SOUTH-SALANG
+40932 3513   6925   1630 0 2 ---- JABUL-SARAJ
+40935 3465   6158   800 0 0 ---- ISLAM-QALA
+40937 3500   6312   914 0 0 ---- QALA-I-NOW
+40938 3422   6222   964 0 0 TPT- HERAT
+40940 3437   6315   1298 0 2 ---- OBE
+40942 3353   6527   2183 0 2 ---- CHAKHCHARAN
+40945 3482   6782   2550 0 2 ---- BAMIYAN
+40948 3455   6922   1791 0 2 TPT- KABUL AIRPORT
+40949 3463   6905   1905 0 2 ---- KARIZIMIR
+40950 3410   6905   1935 0 2 ---- LOGAR
+40951 3458   6975   1020 0 2 ---- SAROBI
+40952 3465   7022   770 0 0 ---- LAGHMAN
+40953 3432   7077   510 0 0 ---- GHAZIABAD
+40954 3443   7047   580 0 0 ---- JALALABAD
+40957 3340   6228   1150 0 2 ---- SHINDAND
+40968 3353   6842   2183 0 2 ---- GHAZNI
+40970 3362   6923   2350 0 2 ---- GARDIZ
+40971 3335   6995   1146 0 2 ---- KHOST
+40974 3237   6218   700 0 0 ---- FARAH
+40977 3262   6587   1350 0 2 ---- TIRIN KOT
+40980 3283   6778   2000 0 2 ---- MOKUR
+40984 3292   6913   2262 0 2 ---- URGOON
+40986 3100   6185   478 0 0 ---- ZARANJ
+40988 3155   6437   780 0 0 ---- BUST
+40990 3150   6585   1010 0 0 TPT- KANDAHAR AIRPORT
+40996 3043   6330   590 0 0 ---- DESHOO
+41150 2627   5065   2 2 0 ---- BAHRAIN (INT. AIRPORT)
+41151 2648   5058   0 3 0 ---- JARIM
+41152 2572   5078   0 2 0 ---- HAWAR ISLAND
+41153 2618   5032   0 3 0 ---- KING FAHAD CAUSEWAY
+41154 2603   5053   0 135 0 ---- JABAL AL DUKHAN
+41155 2602   5050   0 5 0 ---- F1 (FORMULA 1)
+41156 2585   5055   0 2 0 ---- RAS AL BAR
+41852 2602   8840   0 0 0 ---- THAKURGAON
+41858 2575   8892   44 39 0 ---- SAIDPUR
+41859 2573   8923   34 33 0 PPPP RANGPUR
+41863 2565   8868   37 36 0 ---- DINAJPUR
+41883 2485   8937   20 18 0 TPPP BOGRA
+41884 2493   8995   20 18 0 ---- JAMALPUR
+41886 2472   9043   19 18 0 ---- MYMENSINGH
+41890 2497   9188   0 0 0 ---- SYLHET A.P.
+41891 2490   9188   35 34 0 PPPP SYLHET
+41895 2437   8870   20 17 0 ---- RAJSHAHI
+41898 2445   8970   16 13 0 ---- SERAJGONJ
+41907 2413   8905   14 13 0 PPPP ISHURDI
+41909 2425   8993   0 0 0 ---- TANGAIL
+41915 2430   9173   23 22 0 ---- SRIMANGAL
+41921 2398   9042   0 0 0 ---- JOYDEVPUR
+41922 2385   9040   10 9 0 ---- KURMITOLA, DIA
+41923 2377   9038   9 8 0 T--- DHAKA
+41926 2365   8882   12 0 0 ---- CHUADANGA
+41929 2360   8985   9 8 0 ---- FARIDPUR
+41933 2343   9118   10 9 0 ---- COMILLA
+41936 2318   8917   7 6 0 PPPP JESSORE
+41939 2317   9018   13 7 0 ---- MADARIPUR
+41941 2327   9070   7 6 0 ---- CHANDPUR
+41943 2303   9142   8 6 0 PPPP FENI
+41946 2272   8908   6 4 0 ---- SATKHIRA
+41947 2278   8953   4 3 0 ---- KHULNA
+41950 2275   9037   4 3 0 PPPP BARISAL
+41951 2268   9065   5 4 0 ---- BHOLA
+41953 2287   9110   6 5 0 ---- MAIJDICOURT
+41958 2260   8950   0 0 0 ---- MONGLA
+41960 2233   9033   3 2 0 ---- PATUAKHALI
+41963 2243   9110   4 2 0 ---- HATIA
+41964 2248   9143   6 2 0 ---- SANDWIP
+41965 2258   9170   10 6 0 ---- SITAKUNDU
+41966 2253   9220   63 63 0 ---- RANGAMATI
+41967 2248   9223   31 26 0 ---- KAPTAI
+41977 2235   9182   34 33 0 TPPP CHITTAGONG (AMBAGAN)
+41978 2227   9182   6 4 0 ---- CHITTAGONG (PATENGA)
+41984 2198   9023   9 2 0 ---- KHEPUPARA
+41989 2182   9185   7 2 0 ---- KUTUBDIA
+41992 2143   9193   4 2 0 PPPP COX'S BAZAR
+41998 2087   9230   6 5 0 ---- TEKNAF
+48962 1310   10320  13 13 0 ---- BATTAMBANG
+48966 1337   10385  15 15 0 P-P- SIEMREAP
+48968 1252   10418  5 5 0 ---- KRAKOR
+48972 1352   10597  56 183 0 ---- STUNG TRENG
+48978 1242   10717  0 0 0 ---- SEN MONOROM
+48982 1162   10300  4 4 0 ---- KOS KONG
+48983 1063   10348  15 16 0 ---- KOMPONG SOM/VILLE (EX SIHANOUKVILLE)
+48985 1062   10422  5 5 0 P-P- KAMPOT
+48991 1155   10485  10 10 0 ---- PHNOM-PENH/POCHENTONG
+48995 1200   10545  16 16 0 ---- KOMPONG-CHAM
+48997 1147   10532  0 0 0 ---- PREY VENG
+48998 1108   10580  6 6 0 ---- SVAY RIENG
+50136 5213   12252  433 0 0 ---- MOHE
+50353 5172   12665  179 0 0 ---- HUMA
+50434 5048   12168  737 0 0 ---- TULIHE
+50468 5025   12745  166 0 0 ---- AIHUI
+50527 4925   11970  650 0 0 ---- HAILAR
+50527 4925   11970  653 0 0 T-T- HAILAR
+50548 4920   12372  288 0 0 ---- XIAO'ERGOU
+50557 4917   12523  243 0 0 T-T- NENJIANG
+50564 4943   12735  235 0 0 ---- SUNWU
+50603 4867   11682  556 0 0 ---- XIN BARAG YOUQI
+50632 4877   12192  739 0 0 ---- BUGT
+50658 4805   12588  237 0 0 ---- KESHAN
+50727 4717   11993  997 0 0 ---- ARXAN
+50745 4738   12392  148 0 0 ---- QIQIHAR
+50756 4743   12697  240 0 0 ---- HAILUN
+50774 4772   12890  232 0 0 T-T- YICHUN
+50788 4723   13198  65 0 0 ---- FUJIN
+50844 4640   12345  139 0 0 ---- TAILAI
+50854 4638   12532  150 0 0 ---- ANDA
+50888 4632   13218  83 0 0 ---- BAOQING
+50915 4552   11697  841 0 0 ---- ULIASTAI
+50949 4508   12487  136 0 0 ---- QIAN GORLOS
+50953 4575   12677  143 0 0 T-T- HARBIN
+50963 4597   12873  110 0 0 ---- TONGHE
+50968 4522   12797  191 0 0 ---- SHANGZHI
+50978 4530   13093  282 0 0 ---- JIXI
+50983 4577   13297  103 0 0 ---- HULIN
+51053 4805   8635   534 0 0 ---- KABA HE
+51076 4773   8808   737 0 0 T-T- ALTAY
+51087 4698   8952   810 0 0 ---- FUYUN
+51133 4673   8300   535 0 0 ---- TACHENG
+51156 4678   8572   1294 0 0 ---- HOBOKSAR
+51243 4562   8485   457 0 0 ---- KARAMAY
+51288 4537   9053   1651 0 0 ---- BAYTIK SHAN
+51334 4460   8290   320 0 0 ---- JINGHE
+51379 4402   8957   795 0 0 ---- QITAI
+51431 4395   8133   664 0 0 T-T- YINING
+51463 4378   8765   936 0 0 ---- WU LU MU QI
+51463 4378   8762   919 0 0 T-T- WU LU MU QI
+51467 4267   8633   1753 0 0 ---- BALGUNTAY
+51495 4322   9173   732 0 0 ---- SHISANJIANFANG
+51542 4303   8415   2459 0 0 ---- BAYANBULAK
+51573 4293   8920   37 0 0 ---- TURPAN
+51644 4172   8295   1100 0 0 T-T- KUQA
+51656 4175   8613   933 0 0 ---- KORLA
+51709 3947   7598   1291 0 0 T-T- KASHI
+51711 4093   7845   1986 0 0 ---- AKQI
+51716 3980   7857   1117 0 0 ---- BACHU
+51730 4050   8105   1013 0 0 ---- ALAR
+51747 3900   8367   1100 0 0 ---- TAZHONG
+51765 4063   8770   847 0 0 ---- TIKANLIK
+51777 3903   8817   889 0 0 T-T- RUOQIANG
+51811 3843   7727   1232 0 0 ---- SHACHE
+51818 3762   7828   1376 0 0 ---- PISHAN
+51828 3713   7993   1375 0 0 T-T- HOTAN
+51839 3707   8272   1409 0 0 T-T- MINFENG
+51886 3825   9085   2945 0 0 ---- MANGNAI
+52112 4360   9513   469 0 0 ---- NAOMAOHU
+52118 4327   9470   1729 0 0 ---- YIWU
+52203 4282   9352   739 0 0 T-T- HAMI
+52267 4195   10107  941 0 0 T-T- EJIN QI
+52323 4180   9703   1770 0 0 T-T- MAZONG SHAN
+52378 4137   10237  961 960 0 ---- GUAIZIHU
+52418 4015   9468   1140 0 0 T-T- DUNHUANG
+52436 4027   9703   1527 0 0 ---- YUMENZHEN
+52495 4075   10450  1329 0 0 ---- BAYAN MOD
+52533 3977   9848   1478 0 0 T-T- JIUQUAN
+52602 3883   9338   2771 0 0 ---- LENGHU
+52652 3908   10028  1462 0 0 ---- ZHANGYE
+52681 3863   10308  1369 1367 0 T-T- MINQIN
+52713 3785   9537   3174 0 0 ---- DA-QAIDAM
+52737 3737   9737   2982 0 0 ---- DELINGHA
+52754 3733   10013  3302 3301 0 ---- GANGCA
+52787 3720   10287  3044 0 0 ---- WUSHAOLING
+52818 3642   9490   2809 0 0 T-T- GOLMUD
+52836 3630   9810   3190 0 0 T-T- DOULAN
+52866 3662   10177  2296 0 0 ---- XINING
+52866 3672   10175  2296 0 0 T-T- XINING
+52908 3522   9308   4613 0 0 ---- WUDAOLIANG
+52955 3558   10075  3123 0 0 ---- GUINAN
+52983 3587   10415  1875 0 0 T-T- YU ZHONG
+52996 3538   10500  2450 0 0 ---- HUAJIALING
+53068 4365   11200  966 0 0 ---- ERENHOT
+53068 4363   11195  966 0 0 T-T- ERENHOT
+53083 4462   11415  1183 0 0 ---- NARAN BULAG
+53149 4253   11013  1223 0 0 ---- MANDAL
+53192 4402   11495  1127 0 0 ---- ABAG QI
+53231 4145   10638  1510 0 0 ---- HAILS
+53276 4240   11290  1152 0 0 ---- JURH
+53336 4157   10852  1290 0 0 ---- HALIUT
+53352 4170   11043  1377 0 0 ---- BAILING-MIAO
+53391 4190   11400  1484 0 0 ---- HUADE
+53463 4082   11168  1065 0 0 T-T- HOHHOT
+53480 4103   11307  1416 0 0 ---- JINING
+53487 4010   11333  1069 0 0 ---- DATONG
+53502 3978   10575  1033 0 0 ---- JARTAI
+53513 4073   10737  1042 1041 0 T-T- LINHE
+53529 3910   10798  1381 0 0 ---- OTOG QI
+53543 3983   10998  1459 0 0 ---- DONGSHENG
+53564 3938   11115  861 0 0 ---- HEQU
+53588 3895   11352  2210 0 0 ---- WUTAI SHAN
+53593 3983   11457  910 0 0 ---- YU XIAN
+53614 3847   10620  1112 0 0 T-T- YINCHUAN
+53646 3827   10978  1158 0 0 ---- YULIN
+53673 3875   11270  838 0 0 ---- YUANPING
+53698 3803   11442  81 0 0 ---- SHIJIAZHUANG
+53705 3748   10568  1193 0 0 ---- ZHONGNING
+53723 3780   10738  1356 0 0 ---- YANCHI
+53764 3750   11110  951 0 0 ---- LISHI
+53772 3778   11255  779 0 0 T-T- TAIYUAN
+53787 3707   11298  1042 0 0 ---- YUSHE
+53798 3707   11450  78 0 0 ---- XINGTAI
+53845 3660   10950  959 0 0 T-T- YAN AN
+53863 3703   11192  745 0 0 ---- JIEXIU
+53898 3605   11440  64 0 0 ---- ANYANG
+53915 3555   10667  1348 0 0 T-T- PINGLIANG
+53923 3573   10763  1423 0 0 ---- XIFENGZHEN
+53959 3505   11105  365 0 0 ---- YUNCHENG
+53975 3548   11240  659 0 0 ---- YANGCHENG
+54012 4458   11760  997 0 0 ---- XI UJIMQIN QI
+54026 4457   12090  266 0 0 ---- JARUD QI
+54027 4398   11940  485 0 0 ---- LINDONG
+54049 4425   12397  190 0 0 ---- CHANGLING
+54094 4457   12960  242 0 0 ---- MUDANJIANG
+54096 4438   13115  498 0 0 ---- SUIFENHE
+54102 4395   11612  1004 0 0 T-T- XILIN HOT
+54115 4360   11807  800 0 0 ---- LINXI
+54135 4360   12227  180 0 0 T-T- TONGLIAO
+54157 4318   12433  167 0 0 ---- SIPING
+54161 4390   12522  238 0 0 T-T- CHANGCHUN
+54186 4337   12820  525 0 0 ---- DUNHUA
+54208 4218   11647  1247 0 0 ---- DUOLUN
+54218 4230   11883  567 0 0 ---- CHIFENG
+54218 4230   11883  668 0 0 T-T- CHIFENG
+54226 4233   12070  401 0 0 ---- BUGT
+54236 4242   12253  84 0 0 ---- ZHANGWU
+54259 4210   12495  235 0 0 ---- QINGYUAN
+54273 4298   12675  264 0 0 ---- HUADIAN
+54292 4287   12950  258 0 0 T-T- YANJI
+54308 4120   11663  736 0 0 ---- FENGNING
+54311 4193   11775  844 0 0 ---- WEICHANG
+54324 4155   12045  176 0 0 ---- CHAOYANG
+54337 4113   12112  70 0 0 ---- JINZHOU
+54342 4173   12352  49 0 0 T-T- SHENYANG
+54346 4132   12378  185 183 0 ---- BENXI
+54374 4180   12688  381 385 0 T-T- LINJIANG
+54377 4115   12622  225 0 0 ---- JI'AN
+54386 4135   12817  1018 0 0 ---- CHANGBAI
+54401 4078   11488  726 0 0 ---- ZHANGJIAKOU
+54405 4042   11550  571 0 0 ---- HUAILAI
+54423 4097   11792  423 0 0 ---- CHENGDE
+54436 4040   11895  228 0 0 ---- QINGLONG
+54471 4067   12217  5 0 0 ---- YINGKOU
+54493 4072   12478  261 0 0 ---- KUANDIAN
+54497 4005   12433  14 0 0 ---- DANDONG
+54511 3993   11628  55 0 0 T-T- BEIJING
+54527 3910   11717  5 0 0 ---- TIANJIN
+54534 3965   11810  23 0 0 ---- TANGSHAN
+54539 3943   11890  12 0 0 ---- LETING
+54587 3905   12322  0 0 0 ---- HAIYANG DAO
+54602 3873   11548  17 0 0 ---- BAODING
+54618 3808   11655  13 0 0 ---- POTOU
+54662 3890   12163  97 0 0 T-T- DALIAN
+54715 3733   11657  19 0 0 ---- LINGXIAN
+54725 3750   11753  12 0 0 ---- HUIMIN
+54727 3670   11755  123 0 0 T-T- ZHANGQIU
+54751 3793   12072  40 43 0 ---- CHANG DAO
+54753 3762   12032  5 0 0 ---- LONGKOU
+54776 3740   12268  47 0 0 ---- CHENGSHANTOU
+54808 3623   11567  38 0 0 ---- XINXIAN
+54823 3660   11705  169 0 0 ---- JINAN
+54826 3625   11710  1536 0 0 ---- TAI SHAN
+54836 3618   11815  302 0 0 ---- YIYUAN
+54843 3677   11918  22 0 0 ---- WEIFANG
+54857 3607   12033  77 0 0 T-T- QINGDAO
+54863 3677   12118  40 0 0 ---- HAIYANG
+54909 3508   11552  51 0 0 ---- DINGTAO
+54916 3557   11685  53 0 0 ---- YANZHOU
+54929 3525   11795  120 0 0 ---- FEZXZAN
+54945 3543   11953  37 0 0 ---- RIZHAO
+55228 3250   8008   4280 0 0 ---- SHIQUANHE
+55279 3137   9002   4701 0 0 ---- BAINGOIN
+55299 3148   9207   4508 0 0 T-T- NAGQU
+55472 3095   8863   4670 0 0 ---- XAINZA
+55578 2925   8888   3837 0 0 ---- XIGAZE
+55591 2967   9113   3650 0 0 T-T- LHASA
+55664 2863   8708   4300 0 0 ---- TINGRI
+55696 2842   9247   3861 0 0 ---- LHUNZE
+55773 2773   8908   4300 0 0 ---- PAGRI
+56004 3422   9243   4535 0 0 ---- TUOTUOHE
+56018 3290   9530   4068 0 0 ---- ZADOI
+56021 3413   9578   4176 0 0 ---- QUMARLEB
+56029 3300   9697   3717 0 0 ---- YUSHU
+56029 3300   9695   3716 0 0 T-T- YUSHU
+56033 3492   9822   4273 0 0 ---- MADOI
+56046 3375   9965   3968 0 0 ---- DARLAG
+56065 3473   10160  3501 3500 0 ---- HENAN
+56079 3358   10297  3441 0 0 ---- RUO'ERGAI
+56080 3500   10290  2910 0 0 T-T- HEZUO
+56096 3340   10492  1079 1079 0 ---- WUDU
+56106 3188   9378   4024 0 0 ---- SOG XIAN
+56116 3142   9560   3874 0 0 ---- DENGQEN
+56137 3115   9717   3316 0 0 ---- QAMDO
+56137 3115   9717   3307 0 0 T-T- QAMDO
+56144 3173   9857   3201 3184 0 ---- DEGE
+56146 3162   10000  3394 0 0 T-T- GARZE
+56152 3228   10033  3896 0 0 ---- SERTAR
+56167 3098   10112  2959 0 0 ---- DAWU
+56172 3190   10223  2666 0 0 ---- BARKAM
+56182 3265   10357  2852 0 0 ---- SONGPAN
+56187 3075   10387  555 0 0 ---- WENJIANG
+56187 3075   10387  549 0 0 T-T- WENJIANG
+56193 3242   10452  894 0 0 ---- PINGWU
+56196 3145   10473  522 0 0 ---- MIANYANG
+56247 3000   9910   2589 0 0 ---- BATANG
+56257 3000   10027  3950 0 0 ---- LITANG
+56287 2998   10300  629 0 0 ---- YA'AN
+56312 2957   9447   3001 0 0 ---- NYINGCHI
+56357 2905   10030  3729 0 0 ---- DAOCHENG
+56374 3005   10197  2617 0 0 ---- KANGDING
+56385 2952   10333  3049 0 0 ---- EMEI SHAN
+56444 2845   9888   3320 0 0 ---- DEQEN
+56462 2900   10150  2931 0 0 ---- JIULONG
+56492 2880   10460  342 0 0 ---- YIBIN
+56571 2790   10227  1599 0 0 T-T- XICHANG
+56586 2733   10375  1950 0 0 ---- ZHAOTONG
+56651 2683   10022  2382 0 0 ---- LIJING
+56671 2665   10225  1788 0 0 ---- HUILI
+56684 2642   10328  2110 0 0 ---- HUIZE
+56691 2687   10428  2236 0 0 T-T- WEINING
+56739 2512   9848   1649 0 0 T-T- TENGCHONG
+56748 2512   9918   1649 0 0 ---- BAOSHAN
+56751 2570   10018  1992 0 0 ---- DALI
+56763 2573   10187  1120 0 0 ---- YUANMOU
+56768 2502   10152  1820 0 0 ---- CHUXIONG
+56778 2502   10268  1892 0 0 T-T- KUNMING
+56786 2558   10383  1900 0 0 ---- ZHANYI
+56838 2400   9785   763 0 0 ---- RUILI
+56886 2453   10377  1708 0 0 ---- LUXI
+56946 2355   9940   1104 0 0 ---- GENGMA
+56951 2395   10022  1503 0 0 ---- LINCANG
+56954 2257   9993   1054 0 0 ---- LANCANG
+56959 2200   10078  579 0 0 ---- JINGHONG
+56964 2277   10098  1303 0 0 T-T- SIMAO
+56966 2360   10198  398 0 0 ---- YUANJIANG
+56969 2150   10158  633 0 0 ---- MENGLA
+56977 2262   10182  1121 0 0 ---- JIANGCHENG
+56985 2338   10338  1302 0 0 T-T- MENGZI
+57014 3457   10587  1085 0 0 ---- BEIDAO
+57025 3452   10738  781 0 0 ---- FENGXIANG
+57036 3430   10893  398 0 0 T-T- XI'AN
+57046 3448   11008  2063 0 0 ---- HUA SHAN
+57067 3405   11103  570 0 0 ---- LUSHI
+57071 3482   11243  333 0 0 ---- MENGJIN
+57083 3472   11365  111 0 0 T-T- ZHENGZHOU
+57127 3307   10703  509 0 0 T-T- HANZHONG
+57131 3443   10897  411 0 0 T-T- JINGHE
+57178 3303   11258  131 0 0 T-T- NANYANG
+57193 3378   11452  53 0 0 ---- XIHUA
+57237 3207   10803  674 0 0 ---- WANYUAN
+57245 3272   10903  291 0 0 ---- ANKANG
+57259 3203   11077  435 0 0 ---- FANGXIAN
+57265 3238   11167  91 0 0 ---- GUANGHUA
+57279 3215   11267  127 0 0 ---- ZAOYANG
+57290 3300   11402  83 0 0 ---- ZHUMADIAN
+57297 3213   11405  115 0 0 ---- XINYANG
+57306 3158   10597  385 0 0 ---- LANGZHONG
+57328 3120   10750  344 0 0 ---- DA XIAN
+57348 3102   10953  303 0 0 ---- FENGJIE
+57378 3117   11257  66 0 0 ---- ZHONGXIANG
+57399 3118   11497  59 0 0 ---- MACHENG
+57411 3080   10608  310 0 0 ---- NANCHONG
+57426 3068   10780  455 0 0 ---- LIANGPING
+57447 3028   10947  458 0 0 T-T- ENSHI
+57461 3070   11130  134 0 0 T-T- YICHANG
+57476 3035   11215  37 0 0 ---- JINGZHOU
+57494 3060   11405  25 24 0 T-T- WUHAN
+57503 2962   10512  349 0 0 ---- NEIJIANG
+57516 2958   10647  260 0 0 ---- CHONGQING
+57516 2960   10640  541 0 0 T-T- CHONGQING
+57554 2940   11017  322 0 0 ---- SANGZHI
+57584 2938   11308  52 52 0 ---- YUEYANG
+57598 2903   11458  147 0 0 ---- XIUSHUI
+57604 2878   10538  364 0 0 ---- NAXI
+57633 2883   10877  665 0 0 ---- YOUYANG
+57655 2847   11040  143 143 0 ---- YUANLING
+57662 2905   11168  35 0 0 ---- CHANGDE
+57679 2820   11308  46 0 0 T-T- CHANGSHA
+57687 2823   11287  68 0 0 ---- CHANGSHA
+57707 2730   10523  1511 0 0 ---- BIJIE
+57712 2773   10695  984 0 0 ---- HUICHUAN
+57731 2795   10825  418 0 0 ---- SINAN
+57745 2745   10968  273 0 0 ---- ZHIJIANG
+57749 2757   11000  0 261 0 T-T- HUAIHUA
+57766 2723   11147  248 0 0 ---- SHAOYANG
+57776 2730   11270  1268 0 0 ---- NANYUE
+57793 2780   11438  129 0 0 ---- YICHUN
+57799 2712   11497  78 0 0 ---- JI'AN
+57816 2658   10673  1223 0 0 ---- GUIYANG
+57816 2648   10665  1223 0 0 T-T- GUIYANG
+57832 2697   10867  631 0 0 ---- SANSUI
+57845 2617   10978  397 0 0 ---- TONGDAO
+57853 2673   11063  340 340 0 ---- WUGANG
+57866 2623   11162  174 174 0 ---- LINGLING
+57902 2543   10518  1379 0 0 ---- XINGREN
+57916 2543   10677  441 0 0 ---- LUODIAN
+57922 2583   10755  971 0 0 ---- DUSHAN
+57932 2597   10853  287 0 0 ---- RONGJIANG
+57957 2533   11030  166 0 0 T-T- GUILIN
+57972 2580   11303  185 185 0 T-T- CHENZHOU
+57993 2587   11500  138 0 0 ---- GANZHOU
+57993 2587   11500  134 0 0 T-T- GANZHOU
+58027 3428   11715  42 0 0 T-T- XUZHOU
+58040 3485   11913  10 0 0 ---- GANYU
+58102 3388   11577  42 0 0 ---- BOXIAN
+58141 3367   11903  0 14 0 ---- HUAIYIN
+58150 3377   12025  7 0 0 T-T- SHEYANG
+58203 3287   11573  33 0 0 T-T- FUYANG
+58208 3217   11562  44 0 0 ---- GUSHI
+58221 3292   11738  23 0 0 ---- BENGBU
+58238 3193   11890  36 32 0 T-T- NANJING
+58251 3285   12028  4 0 0 ---- DONGTAI
+58265 3207   12160  10 0 0 ---- LUSI
+58314 3140   11633  68 0 0 ---- HUOSHAN
+58321 3178   11730  27 0 0 ---- HEFEI
+58338 3115   11858  18 0 0 ---- WUHUXIAN
+58345 3143   11948  8 0 0 ---- LIYANG
+58362 3142   12145  9 0 0 T-T- SHANGHAI (BAOSHAN)
+58424 3053   11705  20 0 0 T-T- ANQING
+58437 3013   11815  1836 0 0 ---- HUANG SHAN
+58457 3023   12017  43 0 0 T-T- HANGZHOU
+58472 3073   12245  81 0 0 ---- SHENGSI
+58477 3003   12212  37 0 0 ---- DINGHAI
+58506 2958   11598  1165 0 0 ---- LU SHAN
+58527 2930   11720  60 0 0 ---- JINGDEZHEN
+58543 2962   11902  172 0 0 ---- CHUN AN
+58556 2960   12082  108 0 0 ---- SHENGXIAN
+58569 2920   12195  127 0 0 ---- SHIPU
+58606 2860   11592  50 0 0 T-T- NANCHANG
+58633 2897   11887  71 0 0 T-T- QU XIAN
+58646 2845   11992  60 0 0 ---- LISHUI
+58660 2885   12113  9 0 0 ---- LINHAI
+58665 2862   12142  2 0 0 T-T- HONGJIA
+58666 2845   12188  84 0 0 ---- DACHEN DAO
+58715 2758   11665  82 0 0 ---- NANCHENG
+58725 2733   11747  219 0 0 T-T- SHAOWU
+58730 2777   11803  221 221 0 ---- WUYISHAN
+58731 2792   11853  275 0 0 ---- PUCHENG
+58752 2778   12065  38 0 0 ---- RUIAN
+58754 2733   12020  38 0 0 ---- FUDING
+58813 2685   11633  142 0 0 ---- GUANGCHANG
+58834 2663   11815  153 0 0 ---- NANPING
+58847 2608   11928  85 0 0 T-T- FUZHOU
+58849 2617   11993  91 0 0 ---- MAZU
+58853 2700   12070  107 0 0 ---- TAISHAN
+58911 2585   11637  311 0 0 ---- CHANGTING
+58921 2597   11735  204 0 0 ---- YONG'AN
+58926 2530   11740  203 0 0 ---- ZHANG PING
+58931 2572   11810  1651 0 0 ---- JIUXIAN SHAN
+58944 2552   11978  31 0 0 ---- PINGTAN
+58965 2505   12122  48 0 0 ---- TAOYUAN
+58968 2503   12152  9 0 0 T-T- TAIBEI
+58974 2563   12207  102 0 0 ---- PENGJIA YU
+59007 2407   10507  1251 0 0 ---- GUANGNAN
+59023 2470   10803  261 0 0 ---- HECHI
+59046 2435   10940  97 0 0 ---- LIUZHOU
+59058 2420   11052  145 0 0 ---- MENGSHAN
+59072 2480   11237  132 0 0 ---- LIANZHOU
+59082 2467   11360  122 0 0 ---- SHAOGUAN
+59087 2388   11352  98 0 0 ---- FOGANG
+59096 2437   11448  214 0 0 ---- LIANPING
+59102 2495   11565  299 0 0 ---- XUNWU
+59117 2430   11612  84 0 0 ---- MEI XIAN
+59134 2448   11808  139 139 0 T-T- XIAMEN
+59152 2480   12097  34 0 0 ---- XINZHU
+59158 2415   12068  78 0 0 ---- TAIZHONG
+59162 2477   12175  9 0 0 ---- YILAN
+59209 2330   10595  794 0 0 ---- NAPO
+59211 2390   10660  177 0 0 T-T- BAISE
+59254 2340   11008  44 0 0 ---- GUIPING
+59265 2348   11130  120 0 0 T-T- WUZHOU
+59278 2305   11247  12 0 0 ---- GAOYAO
+59280 2370   11308  82 78 0 T-T- QINGYUAN
+59287 2322   11348  71 0 0 ---- GUANGZHOU
+59293 2380   11473  61 0 0 ---- HEYUAN
+59316 2340   11668  3 0 0 ---- SHANTOU
+59316 2335   11667  0 4 0 T-T- SHANTOU
+59345 2352   11957  22 0 0 ---- MAGONG
+59348 2327   11967  45 0 0 ---- DONGJI
+59353 2352   12080  2408 0 0 ---- ALI SHAN
+59358 2300   12022  14 0 0 ---- TAINAN
+59362 2402   12162  14 0 0 ---- HUALIAN
+59368 2310   12137  37 0 0 ---- XINGANG
+59417 2237   10675  129 0 0 ---- LONGZHOU
+59431 2263   10822  126 0 0 T-T- NANNING
+59456 2235   11093  84 0 0 ---- XINYI
+59493 2255   11410  18 0 0 ---- SHENZHEN
+59501 2278   11537  5 0 0 ---- SHANWEI
+59553 2247   12043  8 0 0 ---- DONGGANG
+59554 2262   12027  33 0 0 ---- GAOXIONG
+59556 2235   12090  9 0 0 ---- DAWU
+59559 2200   12075  24 0 0 ---- HENGCHUN
+59562 2275   12115  10 0 0 ---- TAIDONG
+59567 2203   12155  325 0 0 ---- LAN YU
+59632 2195   10862  6 0 0 ---- QINZHOU
+59644 2148   10910  16 0 0 ---- BEIHAI
+59658 2115   11030  50 0 0 ---- ZHANJIANG
+59663 2183   11197  91 0 0 ---- YANGJIANG
+59673 2173   11277  18 0 0 ---- SHANGCHUAN DAO
+59758 2000   11025  64 0 0 T-T- HAIKOU
+59792 2067   11672  6 0 0 ---- DONGSHA DAO
+59838 1910   10862  8 0 0 ---- DONGFANG
+59845 1952   10958  169 0 0 ---- DANXIAN
+59855 1923   11047  25 0 0 ---- QIONGHAI
+59948 1822   10958  420 0 0 ---- SANYA
+59981 1683   11233  5 0 0 T-T- XISHA DAO
+59985 1653   11162  5 0 0 ---- SANHU DAO
+59995 953    11288  0 6 0 ---- YONGSHUJIAO
+59997 1038   11437  5 0 0 ---- NANSHA DAO
+47003 4232   13040  3 2 0 ---- SENBONG
+47005 4182   12830  1381 1383 2 ---- SAMJIYON
+47008 4178   12982  43 42 0 ---- CHONGJIN
+47014 4178   12688  331 330 0 ---- CHUNGGANG
+47016 4140   12817  714 715 0 ---- HYESAN
+47020 4097   12660  306 305 0 ---- KANGGYE
+47022 4082   12815  1200 1224 2 ---- PUNGSAN
+47025 4067   12920  23 19 0 ---- KIMCHAEK
+47028 4045   12493  76 74 0 ---- SUPUNG
+47031 4037   12725  1080 1091 2 ---- CHANGJIN
+47035 4010   12438  7 6 0 ---- SINUIJU
+47037 3998   12525  99 101 0 ---- KUSONG
+47039 4017   12625  155 153 0 ---- HUICHON
+47041 3993   12755  22 39 0 T-T- HAMHEUNG
+47046 4003   12818  19 15 0 ---- SINPO
+47050 3962   12565  27 34 0 ---- ANJU
+47052 3922   12665  279 278 0 ---- YANGDOK
+47055 3918   12743  36 35 0 ---- WONSAN
+47058 3903   12578  36 36 0 ---- PYONGYANG
+47060 3872   12538  47 47 0 ---- NAMPO
+47061 3873   12818  34 33 0 ---- CHANGJON
+47065 3852   12577  52 52 0 ---- SARIWON
+47067 3850   12653  97 101 0 ---- SINGYE
+47068 3815   12488  6 5 0 ---- RYONGYON
+47069 3803   12570  81 79 0 ---- HAEJU
+47070 3797   12657  70 72 0 ---- KAESONG
+47075 3842   12728  352 352 0 ---- PYONGGANG
+45004 2230   11417  66 64 0 T-T- KOWLOON
+45004 2232   11417  0 24 0 -P-P KOWLOON
+45005 2230   11417  40 31 0 ---- HONG KONG OBSERVATORY
+45007 2230   11392  7 5 0 ---- HONG KONG INTERNATIONAL AIRPORT
+45009 2240   11412  0 967 0 ---- TAI MO SHAN
+45010 2235   11422  0 581 0 ---- TATE'S CAIRN
+45031 2253   11442  0 29 0 ---- PING CHAU
+45032 2252   11415  14 14 0 ---- TA KWU LING
+45033 2253   11430  0 9 0 ---- KAT O
+45034 2247   11423  0 51 0 ---- TAI MEI TUK
+45035 2247   11398  35 31 0 ---- LAU FAU SHAN
+45036 2247   11435  0 15 0 ---- TAP MUN
+45037 2243   11417  16 14 0 ---- TAI PO
+45038 2238   11395  0 28 0 ---- TUEN MUN
+45039 2240   11420  12 5 0 ---- SHA TIN
+45040 2237   11427  0 3 0 ---- SAI KUNG
+45041 2230   11425  0 37 0 ---- JUNK BAY
+45042 2228   11390  52 60 0 ---- SHA LO WAN
+45043 2223   11417  0 5 0 ---- WONG CHUK HANG
+45044 2220   11402  79 71 0 ---- CHEUNG CHAU
+45045 2217   11430  60 55 0 ---- WAGLAN ISLAND
+42026 3405   7440   2655 2652 3 ---- GULMARG
+42027 3408   7483   1587 1585 2 T-T- SRINAGAR
+42029 3432   7532   0 2515 0 ---- SONAMARG
+42030 3443   7577   0 3120 0 ---- DRAS
+42042 3398   7478   1666 1664 2 -P-- SRINAGAR
+42044 3358   7508   1739 1690 0 ---- QAZI GUND
+42045 3350   7517   1630 1624 0 ---- BANIHAL
+42056 3267   7483   323 318 0 ---- JAMMU
+42059 3253   7597   1959 1957 2 ---- DALHOUSIE
+42060 3233   7550   381 380 0 ---- KATHUA
+42062 3227   7638   1211 1211 2 ---- DHARMSALA
+42063 3258   7707   0 3166 0 ---- KYELONG
+42065 3227   7717   0 2039 0 ---- MANALI
+42071 3163   7487   234 229 0 P-P- AMRITSAR
+42074 3133   7533   0 229 0 ---- KAPURTHALA
+42075 3147   7558   0 0 0 ---- JULLUNDUR
+42077 3147   7627   370 365 0 ---- UNA
+42078 3172   7697   761 760 0 ---- MANDI
+42079 3153   7690   875 874 0 ---- SUNDERNAGAR
+42080 3125   7667   596 595 0 ---- BILASPUR
+42081 3183   7717   1093 1084 0 ---- BHUNTAR
+42083 3110   7717   2202 2270 2 ---- SHIMLA
+42096 3092   7467   200 199 0 ---- FEROZEPUR
+42097 3017   7458   211 207 0 ---- BHATINDA
+42099 3087   7593   255 255 0 ---- LUDHIANA
+42101 3033   7647   252 251 0 T-T- PATIALA
+42103 3038   7677   273 273 0 PPPP AMBALA
+42104 3040   7677   959 958 0 ---- NAHAN
+42105 3073   7688   347 347 0 ---- CHANDIGARH
+42107 3090   7702   0 1469 0 ---- DHARMPUR
+42108 3073   7845   0 1200 0 ---- UTTARKASHI
+42110 3015   7878   0 1845 0 ---- PAURI
+42111 3032   7803   683 683 0 P-P- DEHRADUN
+42112 3045   7808   2042 2006 2 ---- MUSSOORIE
+42114 3040   7848   770 770 0 ---- TEHRI
+42115 3078   7950   3231 3230 0 ---- MANA 2
+42116 3055   7957   1875 1875 0 ---- JOSHIMATH
+42117 3040   7933   0 1160 0 ---- CHAMOLI
+42121 3012   8025   0 2202 0 ---- MUNSYARI
+42122 2917   7317   154 153 0 ---- ANUPGARH
+42123 2992   7388   177 172 0 P-P- GANGANAGAR
+42131 2917   7573   210 209 0 ---- HISSAR
+42135 3017   7583   0 236 0 ---- SANGRUR
+42137 2970   7703   249 248 0 ---- KARNAL
+42139 2902   7772   222 222 0 ---- MEERUT
+42140 2985   7788   273 261 0 ---- ROORKEE
+42143 2962   7838   270 269 0 ---- NAJIBABAD
+42146 2940   7947   1953 1953 2 ---- NAINITAL
+42147 2947   7965   2311 2311 3 ---- MUKTESHWAR KUMAON
+42148 2903   7947   0 233 0 ---- PANTNAGAR
+42151 2985   8053   817 817 0 ---- DHARCHULA
+42165 2800   7330   224 223 0 P-PP BIKANER
+42170 2825   7492   286 290 0 P-P- CHURU
+42174 2833   7558   301 300 0 ---- PILANI
+42176 2883   7658   222 0 0 ---- ROHTAK
+42177 2800   7608   308 306 0 ---- NARNAUL
+42178 2842   7700   224 223 0 ---- GURGAON
+42181 2857   7712   226 225 0 ---- NEW DELHI/PALAM
+42182 2858   7720   216 211 0 TPTP NEW DELHI/SAFDARJUNG
+42183 2840   7787   0 218 0 ---- BULANDSHAHR
+42187 2883   7875   202 202 0 ---- MORADABAD
+42188 2875   7900   0 191 0 ---- RAMPUR
+42189 2837   7940   169 167 0 P-P- BAREILLY
+42190 2863   7980   188 187 0 ---- PILIBHIT
+42191 2805   7912   0 0 0 ---- BUDAUN
+42206 2207   8807   4 11 0 ---- HALDIA
+42209 2733   8563   1322 1320 0 ---- TADONG
+42216 2817   9480   0 1768 0 ---- ALONG
+42220 2810   9538   157 157 0 ---- PASIGHAT
+42237 2713   7237   234 233 0 ---- PHALODI
+42242 2717   7367   298 297 0 ---- NAGAUR
+42249 2762   7513   429 431 0 ---- SIKAR
+42255 2750   7658   271 270 0 ---- ALWAR
+42257 2750   7768   172 172 0 ---- MATHURA
+42258 2722   7750   176 175 0 ---- BHARATPUR
+42260 2715   7797   0 168 0 P-P- AGRA
+42261 2717   7803   169 168 0 ---- AGRA
+42262 2788   7807   191 186 0 ---- ALIGARH
+42265 2723   7905   157 156 0 ---- MAINPURI
+42266 2788   7990   155 155 0 ---- SHAHJAHANPUR
+42270 2790   8080   147 145 0 ---- KHERI
+42271 2738   8017   142 141 0 ---- HARDOI
+42273 2757   8160   124 123 0 PPP- BAHRAICH
+42274 2713   8197   110 108 0 ---- GONDA
+42279 2680   8273   89 89 0 ---- BASTI
+42282 2743   8342   99 98 0 ---- NAUTANWA
+42295 2705   8827   2134 2128 2 ---- DARJEELING
+42296 2707   8847   1209 1209 2 ---- KALIMPONG
+42299 2733   8862   0 1756 0 P-P- GANGTOK
+42305 2742   9285   0 2484 0 ---- BOMDILA
+42309 2723   9412   101 101 0 ---- NORTH LAKHIMPUR
+42311 2698   9463   96 95 0 ---- SIBSAGAR
+42312 2792   9480   0 1476 0 ---- ZIRO
+42314 2748   9502   111 110 0 TPTP DIBRUGARH /MOHANBARI
+42316 2738   9562   152 143 0 ---- DIGBOI
+42328 2690   7092   257 231 0 P-P- JAISALMER
+42339 2630   7302   221 217 0 TPTP JODHPUR
+42343 2645   7462   490 486 0 ---- AJMER
+42348 2682   7580   390 383 0 PTTP JAIPUR / SANGANER
+42349 2617   7575   272 271 0 ---- TONK
+42353 2613   8658   49 49 0 ---- SUPAUL
+42354 2667   7783   176 175 0 ---- DHOLPUR
+42358 2657   7880   168 168 0 ---- BHIND
+42361 2623   7825   207 205 0 TPTP GWALIOR
+42364 2645   7902   151 151 0 ---- ETAWAH
+42366 2643   8037   126 125 0 ---- KANPUR
+42367 2640   8040   126 123 0 P--- KANPUR/CHAKERI
+42368 2687   8093   111 111 0 ---- LUCKNOW
+42369 2675   8088   124 122 0 TPTP LUCKNOW/AMAUSI
+42372 2625   8137   116 107 0 ---- FURSATGANJ
+42374 2675   8208   107 101 0 ---- FAIZABAD
+42375 2625   8200   96 96 0 ---- SULTANPUR
+42379 2675   8337   77 78 0 TPTP GORAKHPUR
+42381 2605   8322   77 76 0 ---- AZAMGARH
+42382 2698   8485   79 83 0 ---- RAXAUL
+42383 2667   8492   66 66 0 ---- MOTIHARI
+42387 2612   8540   53 53 0 ---- MUZAFFARPUR
+42390 2612   8532   57 53 0 ---- MUZAFFARPUR AERODROME
+42391 2617   8590   49 49 0 ---- DARBHANGA
+42393 2613   8658   49 0 0 ---- SUPAUL
+42395 2630   8727   60 60 0 ---- FORBESGANJ
+42397 2667   8837   123 0 0 TPT- SILIGURI
+42398 2663   8832   131 126 0 ---- SILIGURI
+42399 2653   8872   81 83 0 ---- JALPAIGURI
+42403 2633   8947   42 43 0 ---- COOCH BEHAR
+42404 2602   8998   35 35 0 ---- DHUBRI
+42407 2618   9063   38 38 0 ---- GOALPARA
+42408 2643   9162   57 60 0 ---- RANGIA
+42409 2665   9192   77 65 0 ---- TANGLA
+42410 2610   9158   72 54 0 TPTP GUWAHATI
+42413 2675   9235   120 120 0 ---- MAJBAT
+42414 2620   9252   65 66 0 ---- CHAPARMUKH
+42415 2662   9278   91 79 0 ---- TEZPUR
+42416 2672   9280   0 71 0 P-P- TEZPUR/BINDUKURI
+42419 2683   9358   82 81 0 ---- GOHPUR
+42420 2652   9398   71 95 0 ---- GOLAGHAT
+42423 2607   9017   0 880 0 ---- PET JORHAT
+42426 2627   9482   0 1608 0 ---- TUENSANG
+42435 2575   7138   193 193 0 P-P- BARMER
+42439 2535   7262   168 167 0 ---- JALORE
+42441 2508   7308   295 294 0 ---- ERINPURA /JAWAI DAM SITE
+42447 2535   7463   425 421 0 ---- BHILWARA
+42450 2545   7563   267 266 0 ---- BUNDI
+42452 2515   7585   279 273 0 P-P- KOTA AERODROME
+42453 2598   7637   264 0 0 ---- SAWAI MADHOPUR
+42456 2567   7668   235 234 0 ---- SHEOPUR
+42459 2533   7765   464 463 0 ---- SHIVPURI
+42460 2567   7847   229 227 0 ---- DATIA
+42463 2545   7862   262 258 0 ---- JHANSI
+42467 2507   7945   229 226 0 ---- NOWGONG
+42468 2598   7950   145 140 0 ---- ORAI
+42469 2595   8015   109 109 0 ---- HAMIRPUR
+42471 2593   8083   114 114 0 ---- FATEHPUR
+42472 2590   8195   0 99 0 ---- PRATAPGARH
+42473 2547   8037   121 120 0 ---- BANDA
+42475 2545   8173   97 97 0 PPPP ALLAHABAD/BAMHRAULI
+42477 2575   8268   0 80 0 ---- JAUNPUR
+42479 2545   8287   89 81 0 ---- VARANASI/BABATPUR
+42482 2540   8355   67 66 0 ---- GHAZIPUR
+42483 2530   8302   89 88 0 ---- VARANASI
+42484 2575   8417   63 62 0 ---- BALLIA
+42487 2557   8467   58 57 0 ---- ARRAH
+42488 2578   8473   58 57 0 ---- CHAPRA
+42492 2560   8517   57 51 0 TPT- PATNA
+42498 2523   8695   44 44 0 PPP- BHAGALPUR
+42499 2523   8707   37 37 0 ---- SABAUR
+42500 2527   8747   37 37 0 ---- PURNEA
+42503 2503   8813   31 31 0 ---- MALDA
+42506 2522   8878   25 25 0 ---- BALURGHAT
+42511 2552   9023   370 370 0 ---- TURA
+42512 2570   9197   894 893 0 ---- BARAPANI
+42515 2525   9173   1300 1313 2 ---- CHERRAPUNJI
+42516 2557   9188   1600 1598 2 ---- SHILLONG
+42522 2517   9302   681 682 0 ---- HAFLONG
+42523 2575   9318   149 149 0 ---- LUMDING
+42527 2563   9417   1417 1406 2 ---- KOHIMA
+42539 2420   7220   136 135 0 P-P- DEESA
+42540 2460   7272   1171 1196 2 ---- MOUNT ABU
+42542 2462   7388   514 509 0 P-PP UDAIPUR DABOK
+42543 2458   7370   586 0 0 ---- UDAIPUR
+42546 2488   7463   404 403 0 ---- CHITTORGARH
+42547 2447   7490   496 494 0 ---- NIMACH
+42552 2492   7558   364 350 0 ---- CHAMBAL/RAWAT BHATA
+42555 2453   7617   321 320 0 ---- JHALAWAR
+42557 2400   7672   382 380 0 ---- RAJGARH
+42559 2465   7732   481 480 0 ---- GUNA
+42562 2477   7883   330 344 0 ---- TIKAMGARH
+42567 2498   7992   221 217 0 ---- KHAJURAHO
+42570 2472   8017   354 350 0 ---- PANNA
+42571 2457   8083   316 317 0 ---- SATNA
+42574 2453   8130   299 298 0 ---- REWA
+42577 2442   8187   266 270 0 ---- SIDHI
+42587 2405   8407   221 221 0 ---- DALTONGANJ
+42588 2492   8418   107 107 0 ---- DEHRI
+42591 2475   8495   116 116 0 PPPP GAYA
+42595 2493   8630   82 81 0 ---- JAMUI
+42599 2427   8725   149 149 0 ---- DUMKA
+42603 2413   8827   18 19 0 ---- BERHAMPORE
+42618 2432   9200   30 30 0 ---- KAILASHAHAR
+42619 2475   9280   21 20 0 ---- SILCHAR
+42623 2477   9390   774 781 0 PPPP IMPHAL/TULIHAL
+42631 2325   6885   24 20 0 ---- NALIYA
+42634 2325   6980   117 78 0 P-PP BHUJ-RUDRAMATA
+42638 2315   7012   32 29 0 ---- KANDLA AERODROME
+42639 2300   7022   22 10 0 ---- NEW KANDLA
+42643 2383   7160   29 28 0 ---- RADHANPUR
+42647 2307   7263   56 55 0 TPTP AHMADABAD
+42651 2383   7303   219 217 0 ---- IDAR
+42652 2383   7367   291 291 0 ---- DUNGARPUR
+42654 2323   7272   82 0 0 ---- GANDHINAGAR
+42655 2355   7445   220 219 0 ---- BANSWARA
+42661 2332   7505   485 485 0 ---- RATLAM
+42662 2318   7578   498 488 0 ---- UJJAIN
+42665 2343   7632   446 444 0 ---- SHAJAPUR
+42667 2328   7735   521 522 0 TPTP BHOPAL/BAIRAGHAR
+42669 2353   7782   430 425 0 ---- VIDISHA
+42671 2385   7875   555 550 0 ---- SAGAR
+42672 2332   7783   440 452 0 ---- RAISEN
+42674 2383   7945   371 370 0 ---- DAMOH
+42675 2320   7995   398 397 0 P-PP JABALPUR
+42679 2353   8088   459 458 0 ---- UMARIA
+42693 2317   8325   611 596 0 ---- AMBIKAPUR
+42699 2398   8537   611 611 0 ---- HAZARIBAGH
+42701 2332   8532   646 646 0 TPT- M.O. RANCHI
+42703 2378   8643   258 256 0 ---- DHANBAD
+42705 2333   8642   255 255 0 ---- PURULIA
+42706 2338   8708   98 100 0 ---- BANKURA
+42708 2365   8770   58 59 0 ---- SHANTI NIKETAN
+42709 2322   8788   24 32 0 ---- BURDWAN
+42711 2340   8852   15 15 0 ---- KRISHNANAGAR
+42714 2298   8837   11 12 0 ---- BAGATI
+42715 2200   8070   578 580 0 ---- MALANJKHAND
+42724 2388   9125   38 16 0 TPTP AGARTALA
+42726 2383   9262   291 429 0 ---- LENGPUI
+42727 2373   9275   951 950 2 ---- AIJAL
+42729 2282   6927   9 3 0 ---- MANDVI
+42730 2248   6912   6 5 0 ---- OKHA
+42731 2237   6908   11 10 0 ---- DWARKA
+42734 2245   7008   20 14 0 P-P- JAMNAGAR
+42737 2230   7078   138 134 0 ---- RAJKOT
+42740 2273   7160   74 72 0 ---- SURENDRANAGAR
+42744 2257   7293   43 41 0 ---- VALLABH VIDYANAGAR
+42748 2233   7327   52 37 0 ---- BARODA AERODROME
+42751 2283   7427   333 332 0 ---- DOHAD
+42752 2260   7530   583 581 0 ---- DHAR
+42753 2228   7440   293 288 0 ---- ALIRAJPUR
+42754 2272   7580   567 561 0 ---- INDORE
+42759 2267   7673   353 351 0 ---- KANNOD
+42763 2277   7777   302 300 0 ---- HOSHANGABAD
+42767 2247   7843   1062 1062 2 ---- PACHMARHI
+42768 2210   7900   685 676 0 ---- CHHINDWARA
+42770 2295   7918   356 354 0 ---- NARSINGHPUR
+42771 2208   7955   619 617 0 ---- SEONI
+42776 2258   8037   443 442 0 ---- MANDLA
+42779 2277   8190   625 624 4 ---- PENDRA ROAD
+42782 2210   8217   275 0 0 ---- BILASPUR
+42783 2203   8270   245 270 0 ---- CHAMPA
+42790 2288   8413   771 769 0 ---- JASHPURNAGAR
+42792 2212   8403   241 240 0 ---- SUNDARGARH
+42793 2222   8488   196 0 0 ---- ROURKELA
+42795 2255   8582   226 226 0 ---- CHAIBASA
+42798 2282   8618   143 142 0 PPPP JAMSHEDPUR
+42799 2282   8618   129 129 0 ---- JAMSHEDPUR
+42803 2242   8732   45 45 0 ---- MIDNAPORE
+42805 2250   8795   5 5 0 ---- ULUBERIA
+42807 2253   8833   6 6 0 ---- KOLKATA/ALIPORE
+42809 2265   8845   6 6 0 TPTP KOLKATA/DUM DUM
+42810 2265   8887   5 4 0 ---- BASIRHAT
+42811 2218   8820   7 0 0 ---- DIAMOND HARBOUR
+42812 2225   8867   4 4 0 ---- CANNING
+42830 2165   6967   7 5 0 ---- PORBANDAR
+42832 2132   7032   51 50 0 ---- KESHOD
+42834 2160   7122   115 0 0 ---- AMRELI
+42837 2108   7178   8 8 0 ---- MAHUVA
+42838 2175   7220   9 5 0 ---- BHAUNAGAR
+42840 2120   7283   0 10 0 P-PP SURAT
+42841 2173   7300   20 19 0 ---- BROACH
+42846 2133   7425   205 204 0 ---- NANDURBAR
+42849 2182   7562   252 250 0 ---- KHARGONE
+42851 2105   7557   201 200 0 ---- JALGAON
+42855 2183   7637   318 317 0 ---- KHANDWA
+42860 2187   7793   653 651 0 ---- BETUL
+42866 2115   7912   0 312 0 ---- NAGPUR (MAYO HOSPITAL)
+42867 2110   7905   310 310 0 TPTP NAGPUR SONEGAON
+42871 2147   8020   313 312 0 ---- GONDIA
+42872 2123   8165   318 313 0 ---- MANA
+42874 2123   8165   0 296 4 T-TP PBO RAIPUR
+42875 2122   8167   295 294 0 ---- RAIPUR
+42876 2118   8128   301 281 0 ---- DURG
+42883 2147   8397   149 0 0 ---- SAMBALPUR
+42884 2188   8338   222 214 0 ---- RAIGARH
+42886 2192   8408   230 228 0 PPPP JHARSIGUDA
+42891 2162   8552   486 462 0 ---- KEONGJHARGARH
+42894 2193   8677   0 53 0 ---- BARIPADA
+42895 2152   8693   18 18 0 PPPP BALASORE
+42900 2178   8775   10 10 0 ---- CONTAI
+42901 2162   8750   5 6 0 ---- DIGHA
+42903 2165   8805   3 3 0 ---- SAGAR ISLAND
+42909 2090   7037   11 6 0 P-PP VERAVAL
+42914 2072   7092   15 10 0 ---- DIU
+42915 2062   7293   15 0 0 ---- BULSAR
+42916 2042   7285   0 0 0 ---- DAMAN
+42920 2013   7392   609 599 0 ---- NASIK OZAR
+42921 1997   7382   601 598 0 ---- NASIK CITY
+42925 2055   7453   437 436 0 ---- MALEGAON
+42931 2053   7623   650 650 0 ---- BULDANA
+42933 2070   7703   282 281 0 ---- M.O. AKOLA
+42934 2070   7707   309 305 0 ---- AKOLA
+42935 2012   7713   572 565 0 ---- WASHIM
+42937 2093   7778   370 367 0 ---- AMRAOTI
+42939 2067   7858   284 282 0 ---- WARDHA
+42943 2040   7815   451 450 0 ---- YEOTMAL
+42946 2060   7985   234 229 0 ---- BRAMHAPURI
+42948 2110   8103   330 329 0 ---- RAJNANDGAON
+42953 2027   8148   402 402 0 ---- KANKER
+42961 2030   8330   211 209 0 ---- TITLAGARH
+42963 2070   8350   190 189 0 ---- BOLANGIR
+42966 2048   8427   489 463 0 ---- PHULBANI
+42969 2083   8510   139 138 0 ---- ANGUL
+42970 2047   8593   26 25 0 ---- CUTTACK
+42971 2025   8583   49 45 0 TPTP BHUBANESHWAR
+42973 2078   8673   6 4 0 ---- CHANDBALI
+42976 2030   8668   8 7 0 ---- PARADIP (C.W.R.)
+42977 2085   8825   9 10 0 ---- SANDHEADS
+43001 1997   7272   4 3 0 ---- DAHANU
+43002 1912   7283   3 3 0 ---- BOMBAY / JUHU
+43003 1912   7285   14 14 0 TPTP BOMBAY / SANTACRUZ
+43005 1915   7200   14 12 0 ---- T.B.I.A
+43009 1908   7480   655 637 0 ---- AHMADNAGAR
+43011 1900   7572   519 519 0 ---- BIR
+43012 1983   7580   538 534 0 ---- JALNA
+43013 1988   7533   581 579 0 ---- AURANGABAD
+43014 1985   7540   585 585 0 T-TP AURANGABAD CHIKALTHANA AERODROME
+43017 1913   7683   423 422 0 ---- PARBHANI
+43019 1992   7758   334 332 0 ---- PUSAD
+43021 1908   7733   358 355 0 ---- NANDED
+43022 1975   7803   459 457 0 ---- PRIYADARSHINI
+43025 1965   7853   269 268 0 ---- ADILABAD
+43029 1997   7930   193 191 0 ---- CHANDRAPUR
+43041 1908   8203   554 554 0 T-TP JAGDALPUR
+43042 1992   8318   261 259 0 ---- BHAWANIPATNA
+43049 1927   8488   16 16 0 PPPP GOPALPUR
+43053 1980   8582   6 4 0 ---- PURI
+43057 1890   7282   10 9 0 ---- BOMBAY / COLABA
+43058 1863   7287   7 5 0 ---- ALIBAG
+43060 1898   7328   696 696 0 ---- MATHERAN
+43061 1877   7337   438 539 0 ---- KHANDALA
+43062 1845   7340   95 100 0 ---- BHIRA
+43063 1853   7385   558 555 0 P-PP PUNE
+43064 1858   7392   593 589 0 ---- PUNE / LOHOGAON AERODROME
+43067 1853   7385   561 560 0 ---- PASHAN CTI
+43069 1815   7458   551 549 0 ---- BARAMATI
+43071 1820   7520   520 521 0 ---- JEUR
+43076 1807   7712   639 639 0 ---- UDGIR
+43081 1867   7810   381 380 0 ---- NIZAMABAD
+43083 1805   7827   472 472 0 ---- MEDAK
+43086 1877   7943   160 156 0 ---- RAMGUNDAM
+43087 1802   7957   269 266 0 ---- HANAMKONDA
+43089 1885   7997   123 122 0 ---- SIRONCHA
+43093 1858   8123   1144 1143 0 ---- BAILADILA
+43097 1882   8272   883 883 2 ---- KORAPUT
+43105 1833   8413   7 4 0 ---- KALINGAPATAM
+43109 1782   7310   20 16 0 ---- HARNAI
+43110 1698   7333   91 90 0 P-PP RATNAGIRI
+43111 1793   7367   1383 1382 2 ---- MAHABALESHWAR
+43113 1752   7405   661 660 0 ---- SATARA
+43117 1767   7590   479 479 0 ---- SHOLAPUR
+43121 1735   7685   459 457 0 ---- GULBARGA
+43125 1792   7753   664 663 0 ---- BIDAR
+43128 1745   7847   535 530 0 TPTP HYDERABAD AIRPORT
+43133 1700   7925   227 226 0 ---- NALGONDA
+43136 1767   8088   54 53 0 ---- BHADRACHALAM
+43137 1725   8015   112 110 0 ---- KHAMMAM
+43147 1735   8255   18 18 0 ---- TUNI
+43149 1772   8330   3 3 0 ---- VISHAKHAPATNAM
+43150 1768   8330   69 0 0 TPTP VISHAKHAPATNAM/WALTAIR
+43153 1638   7335   35 34 0 ---- DEVGARH
+43157 1670   7423   570 568 0 ---- KOLHAPUR
+43158 1685   7460   549 549 0 ---- SANGLI
+43160 1670   7575   542 524 0 ---- BAGALKOTE
+43161 1682   7572   595 594 0 ---- BIJAPUR
+43168 1675   7800   505 504 0 ---- MAHABUBNAGAR
+43169 1625   7733   390 398 0 ---- RAICHUR
+43177 1657   7955   106 104 0 ---- RENTACHINTALA
+43180 1652   8062   19 18 0 ---- VIJAYAWADA
+43181 1653   8080   25 21 0 ---- VIJAYAWADA /GANNAVARAM
+43182 1678   8028   56 51 0 ---- NANDIGAMA
+43184 1683   8158   15 11 0 ---- NIDADAVOLE
+43185 1620   8115   9 3 0 TPTP MACHILIPATNAM/FRANCHPET
+43187 1643   8170   9 4 0 ---- NARSAPUR
+43189 1695   8223   7 7 0 ---- KAKINADA
+43192 1548   7382   64 58 0 T-T- GOA/PANJIM
+43193 1587   7363   16 15 0 ---- VENGURLA
+43194 1538   7382   61 61 0 -P-P GOA/DABOLIM AIRPORT
+43196 1542   7378   61 61 0 ---- MORMUGAO
+43197 1585   7453   753 751 0 ---- BELGAUM
+43198 1585   7462   755 747 0 ---- BELGAUM/SAMBRE
+43200 1548   7498   686 678 0 ---- DHARWAD
+43201 1542   7563   669 670 0 P-PP GADAG
+43205 1515   7685   449 448 0 ---- BELLARY
+43207 1150   7977   2 3 0 ---- PARANGIPETTAI
+43212 1547   7848   215 212 0 ---- NANDYAL
+43213 1580   7807   289 280 0 ---- KURNOOL
+43220 1590   8047   10 9 0 ---- BAPATLA
+43221 1548   8008   22 10 0 ---- ONGOLE
+43225 1478   7413   4 3 0 ---- KARWAR
+43226 1428   7445   59 25 0 ---- HONAVAR
+43227 1478   7540   564 573 0 ---- HAVERI
+43228 1535   7615   535 532 0 ---- KOPPAL
+43229 1407   7453   45 44 0 ---- SHIRALI
+43230 1450   7592   0 620 0 ---- DAVANGERE
+43233 1423   7643   732 733 0 ---- CHITRADURGA
+43237 1458   7763   372 364 0 P-PP PBO ANANTAPUR
+43241 1448   7883   130 129 0 ---- CUDDAPAH
+43243 1492   8000   21 17 0 ---- KAVALI
+43245 1445   7998   21 18 0 ---- NELLORE
+43257 1350   7508   659 659 0 ---- AGUMBE EMO
+43258 1393   7563   572 571 0 ---- SHIMOGA
+43259 1337   7545   923 907 0 ---- BALEHONUR
+43260 1325   7575   1058 1058 0 ---- CHICKMAGALUR
+43263 1297   7633   920 955 2 ---- HASSAN
+43264 1367   7792   666 672 0 ---- CHIKKANAHALLI
+43266 1085   7247   4 2 0 ---- M.O. AGATHI AIRPORT
+43271 1353   7850   701 696 0 ---- AROGYAVARAM
+43272 1320   7807   858 857 0 ---- CHINTAMANI
+43275 1367   7958   0 103 0 ---- TIRUPATHI
+43277 1315   7953   87 86 0 ---- TIRUTTANI
+43278 1307   8020   6 6 0 ---- NUMGAMBAKKAM
+43279 1300   8018   15 13 0 TPTP CHENNAI/MINAMBAKKAM
+43284 1292   7488   106 102 0 -P-P MANGALORE/BAJPE
+43285 1295   7483   32 30 0 T-T- MANGALORE/PANAMBUR
+43287 1242   7573   1150 1152 2 ---- MADIKERI
+43289 1250   7683   695 689 0 ---- MANDYA
+43291 1230   7670   760 760 0 ---- MYSORE
+43295 1297   7758   923 917 2 TPTP BANGALORE
+43296 1295   7763   897 888 2 ---- BANGALORE/HINDUSTAN AIRPORT
+43299 1295   7830   882 882 0 ---- KOLAR GOLD FIELDS
+43301 1213   7803   473 473 0 ---- DHARMAPURI
+43302 1248   7857   386 390 0 ---- TIRUPPATTUR
+43303 1292   7915   214 214 0 ---- VELLORE
+43309 1292   9292   27 28 0 ---- MAYA BANDAR
+43310 1242   9293   25 12 0 ---- LONG ISLAND
+43311 1112   7273   11 2 0 T-T- AMINIDIVI
+43314 1125   7578   5 4 0 ---- KOZHIKODE
+43315 1183   7533   17 11 0 ---- KANNUR
+43316 1128   7623   31 0 0 ---- NILAMBUR
+43317 1140   7673   2266 2244 2 ---- UDHAGAMANDALAM
+43318 1135   7680   1747 1747 0 ---- CONOOR
+43319 1100   7697   409 409 0 ---- COIMBATORE
+43320 1113   7595   107 100 0 ---- M.O. KARIPUR AIRPORT
+43321 1103   7705   400 389 0 ---- COIMBATORE/PEELAMEDU
+43322 1193   7693   750 760 0 ---- CHAMARAJNAGAR
+43324 1117   7900   76 76 0 ---- ARIYALUR
+43325 1165   7817   278 278 0 ---- SALEM
+43329 1177   7977   5 11 0 ---- CUDDALORE
+43330 1078   7913   71 68 0 ---- THANJAVUR
+43331 1197   7982   38 38 0 ---- M.O. PONDICHERRY
+43333 1167   9272   78 79 0 TPTP PORT BLAIR
+43334 1080   7398   4 3 0 ---- ANDROTH
+43335 1077   7665   92 95 0 ---- PALAKKAD
+43336 1015   7640   9 7 0 ---- COCHIN INT. AIRPORT NEDUMBASSERY
+43337 1053   7262   4 3 0 ---- KAVARATTI ISLAND
+43338 1148   7777   173 172 0 ---- ERODE
+43339 1023   7747   2343 2338 3 ---- KODAIKANAL
+43340 1175   7817   1464 1463 0 ---- YERCAUD
+43341 1028   7700   1041 1041 0 ---- VALPARAI
+43342 1095   7808   186 182 0 ---- K. PARAMATHY
+43343 1077   7872   94 88 0 ---- TIRUCHIRAPALLI TOWN
+43344 1077   7872   94 88 0 P-PP TIRUCHCHIRAPALLI
+43345 1040   7867   123 123 0 ---- KUDIMIAMALAI
+43346 1092   7983   6 6 0 TPTP KARAIKAL
+43347 1077   7985   3 9 0 ---- NAGAPPATTINAM
+43348 1033   7938   4 6 0 ---- ATIRAMAPATTINAM
+43349 1037   7985   4 4 0 ---- VEDARANNIYAM
+43351 997    7623   3 2 0 ---- FORT COCHIN
+43352 955    7642   3 2 0 ---- ALAPUZHA
+43354 900    7692   33 32 0 ---- PUNALUR
+43355 953    7660   77 73 0 ---- KOTTAYAM
+43356 1000   7713   301 300 0 ---- PERIAKULUM
+43357 1052   7622   40 39 0 ---- THRISSUR
+43358 955    7808   104 103 0 ---- KOVILANGULAM
+43359 992    7812   133 133 0 ---- MADURAI
+43360 983    7808   141 131 0 ---- MADURAI
+43361 973    7903   5 5 0 ---- TONDI
+43363 928    7922   0 11 0 ---- PAMBAN
+43364 1058   9255   7 7 0 ---- HUT BAY
+43367 917    9283   10 9 0 ---- CAR NICOBAR
+43369 830    7315   1 0 0 TPTP MINICOY
+43371 848    7695   64 59 0 TPTP THIRUVANANTHAPURAM
+43372 847    7695   5 4 0 ---- THIRUVANANTHAPURAM
+43373 853    7687   6 6 0 P-P- TRIVANDRUM MET.OBS./THUMBA
+43376 873    7775   50 51 0 ---- PALAYANKOTTAI
+43377 808    7750   36 36 0 ---- KANNIYAKUMARI
+43379 880    7815   3 2 0 ---- TUTICORIN NEW PORT
+43382 798    9353   25 25 0 ---- NANCOWRY
+43385 722    9373   6 6 0 ---- KONDUL
+40700 3965   4792   32 45 0 ---- PARS ABAD MOGHAN
+40701 3937   4438   1411 0 0 ---- MAKKO
+40703 3855   4497   1103 0 2 ---- KHOY
+40704 3843   4707   1390 0 0 ---- AHAR
+40706 3808   4628   1361 1367 2 T--- TABRIZ
+40708 3822   4832   1335 0 0 ---- ARDEBIL
+40710 3793   4753   1682 0 0 ---- SARAB
+40712 3765   4505   1328 0 2 ---- ORUMIEH
+40713 3735   4617   1478 0 2 ---- MARAGHEH
+40716 3745   4770   1110 0 0 ---- MEYANEH
+40718 3747   4945   -24 0 0 ---- ANZALI
+40719 3732   4962   -9 0 0 ---- RASHT
+40721 3790   5595   460 0 0 ---- MARAVEH-TAPPEH
+40723 3747   5733   1091 0 0 ---- BOJNOURD
+40726 3675   4570   1352 0 2 ---- MOHABAD
+40727 3625   4627   1523 0 2 ---- SAGHEZ
+40729 3668   4848   1663 0 2 ---- ZANJAN
+40731 3623   5003   1279 0 2 ---- GHAZVIN
+40732 3690   5067   -20 -23 0 ---- RAMSAR
+40734 3665   5150   -21 -25 0 ---- NOSHAHR
+40736 3672   5265   -21 0 0 ---- BABULSAR
+40737 3645   5277   15 0 0 ---- GHARAKHIL
+40738 3685   5427   13 0 0 ---- GORGAN
+40739 3642   5495   1349 0 2 ---- SHAHRUD
+40740 3707   5850   1287 1286 2 ---- GHUCHAN
+40741 3653   6117   235 0 0 ---- SARAKHS
+40743 3622   5767   978 0 0 ---- SABZEVAR
+40745 3627   5963   999 0 2 T-T- MASHHAD
+40747 3533   4700   1373 0 2 ---- SANANDAJ
+40754 3568   5132   1191 1204 2 T-T- TEHRAN-MEHRABAD
+40757 3558   5342   1127 0 2 ---- SEMNAN
+40762 3527   5922   1451 0 2 ---- TORBAT-HEYDARIEH
+40763 3520   5847   1110 0 0 ---- KASHMAR
+40766 3435   4715   1319 0 2 T-T- KERMANSHAH
+40768 3487   4853   1741 0 0 ---- HAMEDAN
+40769 3407   4978   1703 0 2 ---- ARAK
+40780 3363   4643   1337 0 2 ---- ILAM
+40782 3343   4828   1148 0 2 ---- KHORRAM ABAD
+40783 3340   4970   2022 0 0 ---- ALI-GOODARZ
+40785 3398   5145   982 0 2 ---- KASHAN
+40789 3378   5508   845 0 0 ---- KHOR
+40791 3360   5692   711 0 0 ---- TABAS
+40792 3402   5817   1293 0 2 ---- FERDOUS
+40794 3227   4842   83 0 0 ---- SAFI-ABAD DEZFUL
+40798 3228   5085   2049 0 2 ---- SHAHRE-KORD
+40800 3247   5167   1550 0 2 --T- ESFAHAN
+40809 3287   5920   1491 0 2 --T- BIRJAND
+40811 3133   4867   22 20 0 T--- AHWAZ
+40812 3193   4928   320 0 0 ---- MASJED-SOLEYMAN
+40818 3118   5267   2030 0 0 ---- ABADEH
+40821 3190   5428   1237 1238 2 --T- YAZD
+40827 3153   6003   1211 0 0 ---- NEHBANDAN
+40829 3105   6148   489 0 0 ---- ZABOL
+40831 3037   4825   6 3 0 ---- ABADAN
+40833 3077   4967   27 0 0 ---- OMIDYEH-AGHAJARI
+40835 3043   5077   699 0 0 ---- GACH SARAN DU GUNBADAN
+40836 3083   5168   1831 0 0 ---- YASOGE
+40841 3025   5697   1754 1748 2 T-P- KERMAN
+40845 2927   5027   3 0 0 ---- KHARG
+40848 2953   5260   1484 0 2 T-P- SHIRAZ
+40851 2947   5572   1739 1737 2 ---- SIRJAN
+40853 2923   5657   2280 0 0 ---- BAFT
+40854 2908   5845   940 0 2 ---- BAM
+40856 2947   6088   1370 0 2 --P- ZAHEDAN
+40857 2895   5085   8 0 0 ---- BUSHEHR
+40858 2897   5082   23 0 0 ---- BUSHEHR (AIRPORT)
+40859 2897   5368   1288 0 2 ---- FASA
+40872 2783   5193   4 0 0 ---- BANDAR-E-DAYYER
+40875 2722   5637   10 0 0 --T- BANDARABBASS
+40877 2797   5770   470 0 0 ---- KAHNUJ
+40878 2733   6233   1195 0 0 ---- SARAVAN
+40879 2720   6070   591 0 0 ---- IRANSHAHR
+40882 2650   5398   30 0 0 ---- KISH ISLAND
+40883 2652   5482   23 0 0 ---- BANDAR LENGEH
+40889 2587   5448   4 16 0 ---- SIRI ISLAND
+40890 2583   5483   6 0 0 ---- ABU MUSA
+40893 2563   5777   5 3 0 ---- JASK
+40897 2543   6037   10 5 0 ---- KONARAK
+40898 2528   6062   8 0 0 ---- CHAHBAHAR
+40602 3680   4210   382 0 0 ---- RABIAH
+40603 3637   4248   373 0 0 ---- TEL-AFER
+40604 3632   4183   583 0 0 ---- SINJAR
+40605 3713   4272   433 0 0 ---- ZAKHO
+40606 3687   4300   276 0 0 ---- DUHOOK
+40607 3675   4388   716 0 0 ---- AQRAA
+40608 3632   4315   223 0 0 ---- MOSUL
+40609 3592   4272   200 0 0 ---- TEL-ABTA
+40610 3603   4173   321 0 0 ---- BAAJ
+40611 3638   4420   1075 0 0 ---- SALAHADDIN
+40612 3687   4463   927 0 0 ---- SORAN
+40616 3615   4400   420 0 0 ---- ERBEEL
+40619 3575   4360   270 0 0 ---- MAKHMOOR
+40620 3520   4595   620 0 0 ---- HALABCHA
+40621 3547   4440   331 0 0 ---- KIRKUK
+40622 3552   4483   701 0 0 ---- CHEM-CHAMAL
+40623 3553   4545   843 0 0 ---- SULYMANIYAH
+40627 3438   4102   178 0 0 ---- AL-KAEM
+40629 3437   4195   175 0 0 ---- ANAH
+40631 3490   4353   116 0 0 ---- BAIJI
+40632 3488   4465   220 0 0 ---- TUZ
+40633 3457   4370   107 0 0 ---- TIKRIT
+40634 3413   4235   108 0 0 ---- HADITHAH
+40635 3418   4388   75 0 0 ---- SAMARAA
+40637 3435   4538   202 0 0 ---- KHANAQIN
+40638 3383   4453   44 0 0 ---- AL-KHALIS
+40640 3322   4178   400 0 0 ---- KILO-160
+40642 3303   4028   631 0 0 ---- RUTBAH
+40643 3380   4013   583 0 0 ---- AUKASHAT
+40644 3378   4163   409 0 0 ---- H-1
+40645 3345   4332   48 0 0 ---- RAMADI
+40646 3363   4375   58 0 0 ---- HEET
+40648 3338   4357   44 0 0 ---- HABANYAH
+40650 3330   4440   32 0 0 T-T- BAGHDAD INT. AIRPORT
+40655 3255   4472   28 0 0 ---- AINALTAMER
+40656 3257   4405   29 0 0 ---- KERBELA
+40657 3245   4445   27 0 0 ---- HELLA
+40658 3203   4228   305 0 0 ---- NUKHEB
+40660 3292   4507   25 0 0 ---- AZIZYAH
+40662 3310   4595   64 0 0 ---- BADRAH
+40664 3250   4582   19 0 0 ---- KUT
+40665 3213   4603   17 0 0 ---- KUT-AL-HAI
+40666 3247   4672   14 0 0 ---- ALI-ALGHARBI
+40670 3195   4432   53 0 0 ---- NAJAF
+40672 3195   4495   20 0 0 ---- DIWANIYA
+40674 3127   4527   11 0 0 ---- SAMAWA
+40675 3172   4610   6 0 0 ---- RAFAEI
+40676 3102   4623   5 0 0 -PP- NASIRIYA
+40680 3183   4717   9 0 0 ---- AMARA
+40684 3048   4455   220 0 0 ---- AL-SALMAN
+40686 3010   4612   144 0 0 ---- BUSAYAH
+40689 3052   4778   2 0 0 P-P- BASRAH-HUSSEN
+40690 3052   4778   3 0 0 T-T- BASRAH INT. AIRPORT
+40691 2998   4850   2 0 0 ---- AL-FAO
+40699 2968   4880   17 0 0 ---- BASRAH PORT
+47401 4540   14167  11 2 0 T-T- WAKKANAI
+47402 4493   14258  8 6 0 ---- KITAMIESASHI
+47404 4437   14170  9 7 0 ---- HABORO
+47405 4458   14297  16 14 0 ---- OMU
+47406 4395   14163  24 23 0 ---- RUMOI
+47407 4375   14237  140 119 0 ---- ASAHIKAWA
+47409 4402   14428  43 37 0 ---- ABASHIRI
+47411 4318   14102  26 24 0 ---- OTARU
+47412 4305   14132  26 17 0 T-T- SAPPORO
+47413 4322   14178  51 42 0 ---- IWAMIZAWA
+47415 4313   14100  0 700 0 ---- SAPPORO/KENASHIYAMA
+47417 4292   14322  43 38 0 ---- OBIHIRO
+47418 4298   14438  39 4 0 ---- KUSHIRO
+47418 4295   14443  15 14 0 T-T- KUSHIRO
+47419 4295   14452  0 97 0 ---- KUSHIRO/KOMBUMORI
+47420 4333   14558  39 25 0 ---- NEMURO
+47421 4280   14022  35 33 0 ---- SUTTSU
+47422 4180   14007  0 40 0 ---- KAMINOKUNI
+47423 4232   14098  49 39 0 ---- MURORAN
+47423 4232   14097  0 3 0 ---- MURORAN
+47424 4262   14155  7 6 0 ---- TOMAKOMAI
+47425 4278   14165  30 27 0 ---- CHITOSE AB
+47426 4217   14278  38 36 0 ---- URAKAWA
+47428 4187   14012  12 3 0 ---- ESASHI
+47430 4182   14075  43 35 0 ---- HAKODATE
+47432 4193   14077  0 1111 0 ---- HAKODATE/YOKOTSUDAKE
+47433 4290   14075  188 176 0 ---- KUTCHAN
+47435 4435   14335  17 15 0 ---- MOMBETSU
+47440 4230   14332  34 32 0 ---- HIROO
+47441 4540   14180  11 8 0 ---- WAKKANAI AIRPORT
+47476 4367   14243  213 210 0 ---- ASAHIKAWA AIRPORT
+47477 4378   14235  117 114 0 ---- ASAHIKAWA AB
+47479 4312   14137  10 7 0 ---- SAPPORO AB
+47480 4390   14418  0 42 0 ---- MEMAMBETSU
+47481 4387   14415  36 33 0 ---- MEMAMBETSU AIRPORT
+47483 4357   14495  68 65 0 ---- NAKASHIBETSU AIRPORT
+47487 4277   14168  24 21 0 ---- NEW CHITOSE AIRPORT
+47488 4177   14082  37 34 0 ---- HAKODATE AIRPORT
+47489 4303   14418  97 94 0 ---- KUSHIRO AIRPORT
+47490 4273   14322  152 149 0 ---- OBIHIRO AIRPORT
+47512 3907   14172  38 36 0 ---- OFUNATO
+47513 3902   14182  264 260 0 ---- RYORI
+47515 4055   14147  49 46 0 ---- HACHINOHE AB
+47516 4122   14112  10 7 0 ---- OMINATO AB
+47520 3875   14032  102 105 0 ---- SHINJO
+47542 4073   14068  201 198 0 ---- AOMORI AIRPORT
+47545 3960   14022  95 92 0 ---- AKITA AIRPORT
+47549 3942   14113  92 89 0 ---- HANAMAKI AIRPORT
+47551 3880   13978  24 21 0 ---- SHONAI AIRPORT
+47553 3840   14037  108 105 0 ---- YAMAGATA AIRPORT
+47557 3722   14042  374 371 0 ---- FUKUSHIMA AIRPORT
+47567 3823   14092  10 7 0 ---- KASUMINOME AB
+47569 3813   14092  4 1 0 ---- SENDAI AIRPORT
+47570 3748   13992  216 212 0 ---- WAKAMATSU
+47572 3772   13880  0 632 0 ---- NIIGATA/YAHIKOYAMA
+47573 3795   13910  4 1 0 ---- NIIGATA AIRPORT
+47574 4065   13993  68 66 0 ---- FUKAURA
+47575 4082   14077  4 2 0 ---- AOMORI
+47576 4128   14122  4 2 0 ---- MUTSU
+47580 4070   14137  39 36 0 T-T- MISAWA AB
+47581 4053   14152  28 27 0 ---- HACHINOHE
+47582 3972   14008  21 6 0 ---- AKITA
+47582 3972   14008  21 6 0 T-T- AKITA
+47584 3970   14117  155 155 0 ---- MORIOKA
+47585 3965   14197  47 42 0 ---- MIYAKO
+47587 3892   13985  4 3 0 ---- SAKATA
+47588 3825   14033  153 152 0 ---- YAMAGATA
+47590 3825   14088  43 38 0 ---- SENDAI
+47590 3825   14088  0 37 0 ---- SENDAI
+47591 3840   14120  5 2 0 ---- MATSUSHIMA AB
+47592 3843   14130  43 42 0 ---- ISHINOMAKI
+47594 3885   14167  0 38 0 ---- KARAKUWA
+47595 3775   14047  69 67 0 ---- FUKUSHIMA
+47597 3713   14022  356 355 0 ---- SHIRAKAWA
+47598 3695   14090  5 3 0 ---- ONAHAMA
+47600 3738   13688  6 5 0 T-T- WAJIMA
+47602 3802   13823  7 5 0 ---- AIKAWA
+47604 3792   13905  7 1 0 ---- NIIGATA
+47605 3658   13663  33 5 0 ---- KANAZAWA
+47606 3680   13705  13 11 0 ---- FUSHIKI
+47607 3670   13720  17 8 0 ---- TOYAMA
+47610 3665   13818  419 418 0 ---- NAGANO
+47611 3610   13818  0 1924 0 ---- NAGANO/KURUMAYAMA
+47612 3710   13825  18 12 0 ---- TAKADA
+47615 3653   13987  140 119 0 ---- UTSUNOMIYA
+47616 3605   13622  17 8 0 ---- FUKUI
+47617 3615   13725  561 560 0 ---- TAKAYAMA
+47618 3625   13797  611 610 0 ---- MATSUMOTO
+47620 3605   13812  762 760 0 ---- SUWA
+47622 3635   13855  1004 999 2 ---- KARUIZAWA
+47624 3640   13907  114 112 0 ---- MAEBASHI
+47625 3628   13907  92 0 1 ---- TAKASAKI (CTBT)
+47626 3615   13937  31 30 0 ---- KUMAGAYA
+47628 3622   14018  0 36 0 ---- KAKIOKA
+47629 3638   14047  31 29 0 ---- MITO
+47631 3565   13607  12 1 0 ---- TSURUGA
+47632 3540   13677  17 12 0 ---- GIFU
+47634 3538   13687  42 39 0 ---- GIFU AB
+47636 3517   13697  56 51 0 ---- NAGOYA
+47636 3517   13695  0 51 0 ---- NAGOYA
+47637 3552   13782  529 516 0 ---- IIDA
+47638 3567   13855  281 272 0 ---- KOFU
+47639 3537   13873  3777 3775 1 ---- FUJISAN
+47640 3550   13877  861 859 2 ---- KAWAGUCHIKO
+47641 3598   13907  233 232 0 ---- CHICHIBU
+47642 3575   13935  144 141 0 ---- YOKOTA AB
+47643 3583   13940  92 89 0 ---- IRUMA AB
+47644 3577   13952  0 0 0 ---- KIYOSE
+47646 3605   14012  30 25 0 T-T- TATENO
+47648 3573   14085  28 20 0 ---- CHOSHI
+47649 3477   13615  161 159 0 ---- UENO
+47651 3473   13652  18 2 0 ---- TSU
+47652 3485   13680  6 3 0 ---- CHUBU CENTRAIR INTERNATIONAL AIRPORT
+47653 3463   13710  7 6 0 ---- IRAKO
+47654 3472   13772  33 31 0 ---- HAMAMATSU
+47655 3460   13820  46 44 0 ---- OMAEZAKI
+47656 3497   13840  15 14 0 ---- SHIZUOKA
+47657 3512   13893  21 20 0 ---- MISHIMA
+47658 3480   13828  10 7 0 ---- SHIZUHAMA AB
+47659 3473   13813  0 156 0 ---- SHIZUOKA/MAKINOHARA
+47660 3570   13940  98 95 0 ---- TACHIKAWA AB
+47661 3538   13990  6 3 0 ---- KISARAZU AB
+47662 3568   13977  36 6 0 ---- TOKYO
+47663 3407   13620  17 15 0 ---- OWASE
+47666 3460   13885  55 55 0 ---- IROZAKI
+47668 3505   13910  67 67 0 ---- AJIRO
+47670 3543   13965  42 39 0 ---- YOKOHAMA
+47671 3555   13977  9 6 0 ---- TOKYO INTERNATIONAL AIRPORT
+47672 3498   13985  7 5 0 ---- TATEYAMA
+47674 3515   14032  13 11 0 ---- KATSUURA
+47675 3475   13937  75 74 0 ---- OSHIMA
+47677 3412   13952  38 36 0 ---- MIYAKEJIMA
+47678 3312   13977  156 151 0 T-T- HACHIJOJIMA
+47679 3545   13945  65 62 0 ---- ATSUGI NAS
+47680 3552   13940  112 109 0 ---- ZAMA/KASTNER AAF
+47681 3475   13770  48 45 0 T-T- HAMAMATSU AB
+47682 3560   14010  19 3 0 ---- CHIBA
+47684 3493   13658  56 55 0 ---- YOKKAICHI
+47685 3653   13820  405 405 0 ---- MATSUSHIRO
+47686 3575   14038  44 41 0 ---- NARITA INTERNATIONAL AIRPORT
+47688 3498   13982  6 3 0 ---- TATEYAMA AB
+47690 3673   13950  1294 1291 2 ---- NIKKO
+47692 3650   13987  104 101 0 ---- UTSUNOMIYA AB
+47695 3585   13995  0 19 0 ---- TOKYO/KASHIWA
+47696 3528   13967  53 49 0 ---- YOKOSUKA
+47702 3728   13695  221 218 0 ---- NOTO AIRPORT
+47704 3638   13640  9 6 0 ---- KOMATSU AB
+47705 3623   13613  0 80 0 ---- FUKUI/TOJIMBO
+47707 3663   13718  26 23 0 ---- TOYAMA AIRPORT
+47709 3617   13792  660 657 0 ---- MATSUMOTO AIRPORT
+47715 3617   14040  35 32 0 ---- HYAKURI AB
+47716 3603   14018  28 25 0 ---- KASUMIGAURA AB
+47721 3530   13887  683 680 0 ---- FUJI AB
+47727 3578   14000  32 29 0 ---- SHIMOFUSA AB
+47730 3453   13667  9 6 0 ---- AKENO AB
+47735 3477   13935  40 37 0 ---- OSHIMA AIRPORT
+47738 3310   13978  94 91 0 ---- HACHIJOJIMA AIRPORT
+47739 3478   13818  134 131 0 ---- SHIZUOKA AIRPORT
+47740 3620   13333  32 26 0 ---- SAIGO
+47741 3545   13307  22 16 0 T-T- MATSUE
+47742 3555   13323  3 2 0 ---- SAKAI
+47743 3548   13323  6 3 0 ---- MIHO AB
+47744 3543   13333  8 6 0 ---- YONAGO
+47746 3548   13423  15 7 0 ---- TOTTORI
+47746 3553   13420  0 6 0 ---- TOTTORI
+47747 3553   13482  5 3 0 ---- TOYOOKA
+47749 3548   13537  8 5 0 -P-- MAIZURU AB
+47750 3545   13532  22 2 0 ---- MAIZURU
+47754 3442   13140  3 2 0 ---- HAGI
+47755 3490   13207  20 19 0 ---- HAMADA
+47756 3507   13402  147 145 0 ---- TSUYAMA
+47759 3502   13573  46 41 0 ---- KYOTO
+47761 3528   13625  89 87 0 ---- HIKONE
+47762 3395   13093  19 3 0 ---- SHIMONOSEKI
+47764 3415   13223  5 2 0 -P-P IWAKUNI MCAS
+47765 3440   13247  54 3 0 ---- HIROSHIMA
+47766 3423   13255  5 3 0 ---- KURE
+47767 3445   13325  2 1 0 ---- FUKUYAMA
+47768 3467   13392  18 2 0 ---- OKAYAMA
+47769 3483   13467  39 38 0 ---- HIMEJI
+47770 3470   13522  30 5 0 ---- KOBE
+47771 3478   13543  14 11 0 ---- OSAKA INTERNATIONAL AIRPORT
+47772 3468   13552  83 23 0 ---- OSAKA
+47773 3460   13565  0 473 0 ---- OSAKA/TAKAYASUYAMA
+47774 3443   13522  8 5 0 ---- KANSAI INTERNATIONAL AIRPORT
+47776 3433   13490  112 109 0 ---- SUMOTO
+47777 3423   13517  18 13 0 ---- WAKAYAMA
+47778 3345   13575  69 67 0 ---- SHIONOMISAKI
+47778 3345   13575  75 67 0 T-T- SHIONOMISAKI
+47779 3458   13560  13 10 0 ---- YAO AIRPORT
+47780 3470   13583  109 104 0 ---- NARA
+47782 3365   13535  92 89 0 ---- NANKISHIRAHAMA AIRPORT
+47784 3417   13145  18 16 0 ---- YAMAGUCHI
+47786 3392   13127  7 4 0 ---- YAMAGUCHI-UBE AIRPORT
+47787 3403   13105  6 3 0 ---- OZUKI AB
+47788 3403   13153  5 2 0 ---- HOFU AB
+47789 3443   13292  334 331 0 ---- HIROSHIMA AIRPORT
+47790 3540   13288  4 1 0 ---- IZUMO AIRPORT
+47791 3553   13310  0 532 0 ---- MATSUE/MISAKAYAMA
+47792 3427   13258  0 725 0 ---- HIROSHIMA/HAIGAMINE
+47793 3475   13385  242 239 0 ---- OKAYAMA AIRPORT
+47794 3552   13415  17 14 0 ---- TOTTORI AIRPORT
+47795 3390   13513  0 3 0 ---- WAKAYAMA/MIHAMA
+47796 3462   13522  9 6 0 ---- KOBE AIRPORT
+47799 3428   12932  66 63 0 ---- TSUSHIMA AIRPORT
+47800 3420   12930  4 3 0 ---- IZUHARA
+47800 3415   12922  0 130 0 ---- IZUHARA
+47803 3387   13065  32 29 0 ---- ASHIYA AB
+47805 3337   12955  58 57 0 ---- HIRADO
+47806 3343   13035  0 970 0 ---- FUKUOKA/SEFURISAN
+47807 3357   13037  15 2 0 T-T- FUKUOKA
+47808 3358   13045  12 9 0 ---- FUKUOKA AIRPORT
+47809 3365   13070  37 37 0 ---- IIZUKA
+47810 3313   13030  4 1 0 ---- SAGA AIRPORT
+47811 3315   12973  22 19 0 ---- SASEBO
+47812 3317   12973  5 3 0 ---- SASEBO
+47813 3327   13030  33 5 0 ---- SAGA
+47814 3332   13093  84 82 0 ---- HITA
+47815 3323   13162  13 4 0 ---- OITA
+47816 3343   12942  0 85 0 ---- IKITSUKIJIMA
+47817 3273   12987  35 26 0 ---- NAGASAKI
+47818 3273   13027  679 677 0 ---- UNZENDAKE
+47819 3282   13070  39 37 0 ---- KUMAMOTO
+47821 3288   13107  1144 1142 2 ---- ASOSAN
+47822 3258   13165  21 19 0 ---- NOBEOKA
+47823 3203   13020  42 40 0 ---- AKUNE
+47824 3222   13075  147 145 0 ---- HITOYOSHI
+47827 3155   13055  31 3 0 T-T- KAGOSHIMA
+47829 3173   13108  155 153 0 ---- MIYAKONOJO
+47830 3193   13142  15 9 0 ---- MIYAZAKI
+47831 3127   13030  31 29 0 ---- MAKURAZAKI
+47833 3142   13087  0 107 0 ---- KANOYA
+47835 3158   13140  14 2 0 ---- ABURATSU
+47836 3038   13067  38 37 0 ---- YAKUSHIMA
+47836 3038   13067  0 36 0 ---- YAKUSHIMA
+47837 3072   13098  37 24 0 ---- TANEGASHIMA
+47838 3220   13003  15 3 0 ---- USHIBUKA
+47840 3368   13103  19 16 0 ---- TSUIKI AB
+47843 3270   12883  26 25 0 ---- FUKUE
+47844 3265   12882  79 76 0 ---- FUKUE AIRPORT
+47848 3172   13032  0 25 0 ---- KAGOSHIMA/ICHIKI
+47850 3137   13083  68 65 0 ---- KANOYA AB
+47851 3180   13072  274 271 0 ---- KAGOSHIMA AIRPORT
+47852 3347   13173  8 5 0 ---- OITA AIRPORT
+47853 3383   13103  9 6 0 ---- KITAKYUSHU AIRPORT
+47854 3208   13145  81 78 0 ---- NYUTABARU AB
+47855 3292   12990  5 2 0 ---- NAGASAKI AIRPORT
+47856 3283   13085  195 192 0 ---- KUMAMOTO AIRPORT
+47857 3187   13143  8 5 0 ---- MIYAZAKI AIRPORT
+47859 3292   12993  8 5 0 ---- OMURA AB
+47860 3332   13040  19 16 0 ---- METABARU AB
+47869 3063   13097  0 281 0 ---- TANEGASHIMA/NAKATANE
+47870 3060   13098  237 234 0 ---- TANEGASHIMA AIRPORT
+47872 2842   12970  7 4 0 ---- AMAMI AIRPORT
+47880 3420   13400  188 185 0 ---- TAKAMATSU AIRPORT
+47881 3412   13460  11 8 0 T--- TOKUSHIMA AB
+47882 3382   13268  6 3 0 ---- MATSUYAMA AIRPORT
+47883 3353   13367  11 8 0 ---- KOCHI AIRPORT
+47884 3400   13462  5 2 0 ---- KOMATSUSHIMA AB
+47887 3385   13278  34 32 0 ---- MATSUYAMA
+47890 3428   13375  4 3 0 ---- TADOTSU
+47891 3432   13405  14 8 0 ---- TAKAMATSU
+47892 3323   13255  14 2 0 ---- UWAJIMA
+47893 3357   13355  5 0 0 ---- KOCHI
+47893 3357   13355  0 3 0 ---- KOCHI
+47895 3407   13457  6 1 0 ---- TOKUSHIMA
+47897 3292   13270  10 2 0 ---- SUKUMO
+47898 3272   13302  33 31 0 ---- SHIMIZU
+47899 3325   13418  186 185 0 ---- MUROTOMISAKI
+47899 3325   13417  0 185 0 ---- MUROTOMISAKI
+47909 2838   12950  8 2 0 ---- NAZE
+47909 2838   12955  294 294 0 T-T- NAZE/FUNCHATOGE
+47912 2447   12302  36 30 0 ---- YONAGUNIJIMA
+47917 2443   12377  11 9 0 ---- IRIOMOTEJIMA
+47918 2433   12417  14 5 0 T-T- ISHIGAKIJIMA
+47919 2433   12418  29 26 0 ---- ISHIGAKI AIRPORT
+47920 2442   12417  0 516 0 ---- ISHIGAKIJIMA/OMOTODAKE
+47925 2482   12513  10 7 0 ---- SHIMOJISHIMA AIRPORT
+47926 2477   12528  45 42 0 ---- MIYAKO AIRPORT
+47927 2480   12528  41 39 0 ---- MIYAKOJIMA
+47928 2635   12670  9 6 0 ---- KUMEJIMA AIRPORT
+47929 2633   12680  6 5 0 ---- KUMEJIMA
+47930 2618   12763  6 3 0 ---- NAHA AIRPORT
+47931 2635   12777  48 45 0 ---- KADENA AB
+47933 2627   12775  78 75 0 ---- FUTENMA MCAS
+47936 2620   12768  50 28 0 ---- NAHA
+47937 2615   12775  0 186 0 ---- NAHA/ITOKAZU
+47938 2672   12778  76 73 0 P--- IEJIMA AUX AB
+47940 2660   12797  7 6 0 ---- NAGO
+47942 2743   12870  29 26 0 ---- OKINOERABU
+47945 2583   13123  20 15 0 T-T- MINAMIDAITOJIMA
+47946 2650   12790  106 0 1 ---- OKINAWA (CTBT)
+47971 2710   14218  8 2 0 T-T- CHICHIJIMA
+47981 2478   14132  120 117 0 T--- IWOTO
+47991 2428   15398  8 7 0 T-T- MINAMITORISHIMA
+28676 5478   6912   101 0 0 ---- PETROPAVLOVSK
+28766 5437   6697   151 0 0 ---- BLAGOVESHCHENKA
+28867 5332   6555   216 0 0 ---- URITSKY
+28879 5328   6938   229 0 0 ---- KOKSHETAY
+28951 5323   6362   171 0 0 T-T- KOSTANAI
+28952 5322   6362   170 0 0 ---- KOSTANAY
+28966 5282   6697   227 0 0 ---- RUZAEVKA
+28978 5253   6875   398 0 0 ---- BALKASINO
+28984 5295   7022   395 0 0 ---- SUCINSK
+29802 5382   7653   114 0 0 ---- MIKHAILOVKA
+29807 5335   7545   94 0 0 ---- ERTIS
+35067 5188   6633   221 0 0 ---- ESIL'
+35078 5182   6837   304 0 0 ---- ATBASAR
+35085 5200   7095   384 0 0 ---- AKKOL'
+35108 5125   5128   37 0 0 ---- URALSK
+35173 5162   6980   305 0 0 ---- ZHALTYR
+35188 5113   7137   350 0 0 ---- ASTANA
+35217 5025   5257   32 0 0 ---- DZHAMBEJTY
+35229 5028   5715   219 0 0 T--- AKTOBE
+35302 5020   5117   17 0 0 ---- CHAPAEVO
+35357 4968   6952   349 0 0 ---- BARSHINO
+35358 4963   6350   0 0 0 ---- TORGAI
+35376 4988   6952   349 0 0 ---- BERLIK
+35394 4980   7315   553 0 0 T--- KARAGANDA
+35406 4905   5187   2 0 0 ---- TAIPAK
+35416 4907   5468   95 0 0 ---- UIL
+35426 4915   5712   234 0 0 ---- TEMIR
+35497 4885   7287   656 0 0 ---- ZHARYK
+35532 4863   5850   398 0 0 ---- MUGODZARSKAJA
+35576 4830   6965   0 0 0 ---- KYZYLZHAR
+35671 4780   6772   346 0 0 T--- ZHEZKAZGAN
+35699 4745   7482   620 0 0 ---- BEKTAUATA
+35700 4712   5192   -22 0 0 T--- ATYRAU
+35746 4678   6165   62 0 0 ---- ARALSKOE MORE
+35796 4680   7508   350 0 0 ---- BALHASH
+35849 4577   6212   68 0 0 ---- KAZALINSK
+35925 4540   5612   88 0 0 ---- SAM
+35953 4550   6408   103 0 0 ---- DZHUSALY
+35969 4525   6707   138 0 0 ---- ZLIKHA
+36003 5230   7693   122 0 0 T--- PAVLODAR
+36152 5087   7835   149 0 0 ---- SEMIJARKA
+36177 5042   8030   196 0 0 ---- SEMIPALATINSK
+36208 5033   8355   811 0 0 ---- RIDDER
+36397 4922   8122   455 0 0 ---- ZHALGYZTOBE
+36428 4920   8452   401 0 0 ---- ULKEN NARYN
+36535 4875   8237   512 0 0 ---- KOKPEKTY
+36639 4712   8162   491 0 0 ---- URDZHAR
+36686 4655   7687   349 0 0 ---- ALGAZY OSTROV
+36821 4483   7627   396 0 0 ---- BAKANAS
+36859 4417   8007   645 0 0 ---- ZHARKENT
+36864 4353   7525   743 0 0 ---- OTAR
+36870 4323   7693   851 0 0 ---- ALMATY
+36872 4335   7700   662 0 0 T-T- ALMATY
+38001 4455   5025   -25 0 0 ---- FORT SHEVCHENKO
+38062 4485   6550   130 0 0 ---- KYZYLORDA
+38064 4477   6552   133 0 0 T-T- KYZYLORDA
+38069 4417   6675   153 0 0 ---- CHIILI
+38196 4355   6890   822 0 0 ---- ACHISAY
+38198 4327   6822   207 0 0 ---- TURKESTAN
+38222 4370   7378   456 0 0 ---- TOLE BI
+38232 4297   5412   78 0 0 ---- AKKUDUK
+38328 4232   6970   604 0 0 ---- SHYMKENT
+38334 4248   7030   808 0 0 ---- AUL TURARA RYSKULOVA
+38341 4285   7138   655 0 0 T--- TARAZ
+38343 4295   7275   683 0 0 ---- KULAN
+38439 4137   6800   275 0 0 ---- CHARDARA
+40550 3007   4768   24 23 0 ---- ABDALY
+40551 2982   4735   119 118 0 ---- MITRIBAH
+40552 2962   4758   120 119 0 ---- JAL ALIYAH
+40553 2975   4785   0 0 0 ---- SABRIYAH
+40568 2977   4837   5 4 0 ---- BUBIAN ISLAND
+40569 2957   4820   5 4 0 ---- BEACON N6
+40570 2910   4668   289 288 0 ---- SALMY
+40571 2952   4860   7 6 0 ---- BEACON M28
+40572 2942   4800   6 5 0 ---- SOUTH DOLPHIN
+40573 2930   4700   236 235 0 ---- ABRAQUE ALHABRI
+40580 2930   4793   20 19 0 ---- RABYAH
+40581 2938   4800   7 6 0 ---- KUWAIT CITY
+40582 2922   4797   47 46 0 ---- KUWAIT INTERNATIONAL AIRPORT
+40582 2937   4798   0 66 0 TPTP KUWAIT INTERNATIONAL AIRPORT
+40583 2907   4817   19 18 0 ---- AHMADI OIL PIER
+40585 2935   4810   7 6 0 ---- SALMIYAH
+40586 2932   4767   55 54 0 ---- JAHRA
+40587 2927   4772   54 53 0 ---- SULAIBIYA
+40588 2945   4833   6 5 0 ---- FAILAKAH ISLAND
+40589 2912   4830   0 0 0 ---- SIB SEA ISLAND
+40590 2907   4753   188 187 0 ---- MANAGISH
+40591 2893   4888   0 0 0 ---- AHMADI LIGHT VESSEL
+40592 2855   4807   106 105 0 ---- WAFRA
+40593 2887   4828   8 7 0 ---- JULAIA PORT
+40594 2855   4838   20 19 0 ---- NUWASIB
+40595 2882   4877   5 4 0 ---- QARUH ISLAND
+40596 2868   4865   8 7 0 ---- UMM-AL-MARADIM
+36911 4283   7528   817 816 0 ---- TOKMAK
+36944 4235   7835   1769 1768 0 ---- KYZYL-SUU
+36974 4143   7600   2041 2039 0 ---- NARYN
+36982 4188   7823   3639 3635 0 ---- TIAN-SHAN'
+38345 4252   7222   1218 1217 0 ---- TALAS
+38353 4285   7453   760 756 0 T--- BISHKEK
+38613 4092   7295   765 764 0 ---- DZHALAL-ABAD
+38616 4070   7290   868 867 0 ---- KARA-SUU
+48921 2163   10188  1360 0 2 ---- BOUNNEUA
+48924 2105   10147  552 0 2 ---- LUANG NAMTHA (M.SING)
+48925 2068   10200  636 0 0 ---- OUDOMXAY
+48926 2025   10043  0 0 0 ---- HOUEI-SAI *
+48927 2042   10423  0 0 2 ---- VIENGSAY
+48928 2042   10407  0 0 0 ---- SAMNEUA
+48930 1988   10213  305 0 0 ---- LUANG-PRABANG
+48935 1947   10313  1094 0 2 ---- PLAINE DES JARRES (XIENGKHOUANG)
+48936 1820   10120  220 0 0 ---- PAKLAY
+48937 1912   10155  370 0 0 ---- NAM THANE
+48938 1923   10173  292 0 0 ---- SAYABOURY
+48939 1892   10245  298 0 0 ---- VANGVIENG
+48940 1795   10257  171 0 0 ---- VIENTIANE
+48941 1847   10240  179 0 0 ---- PHONHONG
+48942 1785   10260  165 0 0 ---- HAT DOKEO
+48943 1827   10295  172 0 0 ---- NAPHENG (PAKCHENG)
+48944 1828   10263  185 0 0 ---- THANGONE
+48945 1837   10365  0 0 0 ---- PARKXANH
+48946 1738   10465  152 0 0 ---- THAKHEK
+48947 1655   10465  145 0 0 ---- SAVANNAKHET
+48948 1667   10500  185 0 0 ---- SENO
+48952 1568   10643  180 0 0 ---- SARAVANE
+48955 1512   10577  102 0 0 ---- PAKSE
+48956 1518   10620  1200 0 2 ---- PAKSONG
+48957 1480   10683  103 0 0 ---- ATTOPEU
+45011 2215   11355  114 110 0 ---- TAIPA GRANDE
+45013 2215   11355  0 110 0 ---- TAIPA
+45018 2213   11357  0 27 0 ---- KA-HO
+45020 2218   11353  0 59 0 ---- MACAO/FORTALEZA DO MONTE
+43533 673    7317   2 1 0 ---- HANIMAADHOO
+43555 418    7352   2 1 0 ---- MALE
+43577 185    7352   2 1 0 ---- KADHDHOO
+43588 48     7298   1 0 0 ---- KAADEDHDHOO
+43599 -68    7315   2 1 0 --T- GAN
+44203 5112   9967   1583 1583 0 ---- RINCHINLHUMBE
+44207 5043   10015  1668 1669 0 ---- HATGAL
+44212 4980   9208   939 940 0 -T-- ULAANGOM
+44213 4965   9440   1232 1232 0 ---- BARUUNTURUUN
+44214 4893   8993   1715 1716 0 ---- ULGI
+44215 4902   9172   1590 1590 0 ---- OMNO-GOBI
+44218 4802   9157   1405 1406 0 ---- HOVD
+44225 4873   9820   1723 1724 0 ---- TOSONTSENGEL
+44230 4957   10200  1235 1236 0 ---- TARIALAN
+44231 4963   10017  1283 1285 0 ---T MUREN
+44232 4938   10270  938 938 0 ---- HUTAG
+44237 4853   10138  1509 1510 0 ---- ERDENEMANDAL
+44239 4880   10355  1208 1209 0 ---- BULGAN
+44241 4892   10607  807 811 0 ---- BARUUNHARAA
+44256 4955   11440  705 706 0 ---- DASHBALBAR
+44259 4808   11455  747 747 0 -T-T CHOIBALSAN
+44265 4612   9147   1186 1186 0 ---- BAITAG
+44272 4775   9685   1759 1761 0 ---- ULIASTAI
+44275 4683   9808   2255 2255 0 ---- BAYANBULAG
+44277 4640   9625   2181 2182 0 ---T ALTAI
+44282 4745   10147  1691 1693 0 ---- TSETSERLEG
+44284 4670   10013  2126 2125 0 ---- GALUUT
+44285 4690   10277  1662 1662 0 ---- HUJIRT
+44287 4613   10068  1859 1860 0 ---- BAYANHONGOR
+44288 4627   10278  1813 1813 0 -T-- ARVAIHEER
+44292 4792   10687  1729 0 1 -T-T ULAANBAATAR (CTBT)
+44294 4730   10748  1430 1429 0 ---- MAANTI
+44298 4645   10822  1286 1287 0 ---- CHOIR
+44302 4778   11212  926 926 0 ---- BAYAN-OVOO
+44304 4732   11063  1033 1035 0 ---- UNDERKHAAN
+44305 4668   11328  981 982 0 ---- BARUUN-URT
+44313 4762   11862  688 689 0 ---- KHALKH-GOL
+44314 4717   11563  907 907 0 ---- MATAD
+44317 4590   11537  1076 1074 0 ---- ERDENETSAGAAN
+44336 4545   10390  1316 1317 0 ---- SAIKHAN-OVOO
+44341 4577   10628  1393 1396 0 ---- MANDALGOBI
+44347 4442   10532  1298 1297 0 ---- TSOGT-OVOO
+44352 4573   11237  1101 1101 0 ---- BAYANDELGER
+44354 4490   11012  938 938 0 ---- SAINSHAND
+44358 4373   11190  964 965 0 ---- ZAMYN-UUD
+44373 4358   10442  1465 1465 0 ---T DALANZADGAD
+48001 2733   9742   0 409 0 ---- PUTAO
+48004 2600   9570   0 146 0 ---- HKAMTI
+48008 2537   9740   147 145 0 P-P- MYITKYINA
+48010 2487   9492   131 130 0 ---- HOMALIN
+48017 2408   9537   0 259 0 ---- PINLEBU
+48018 2417   9633   95 113 0 ---- KATHA
+48019 2427   9720   113 111 0 ---- BHAMO
+48020 2363   9442   116 115 0 ---- MAWLAIK
+48024 2320   9407   0 152 0 P-P- KALEMYO
+48025 2320   9430   109 0 0 ---- KALEWA
+48030 2265   9362   0 1865 0 ---- HAKHA
+48031 2292   9368   0 1372 0 ---- FALAM
+48033 2258   9572   110 106 0 ---- SHWEBO
+48035 2293   9775   749 747 0 ---- LASHIO
+48036 2217   9413   0 214 0 ---- GANGAW
+48037 2210   9513   82 81 0 ---- MONYWA
+48040 2260   9730   0 436 0 ---- HSIPAW
+48042 2198   9610   76 74 0 ---- MANDALAY
+48045 2138   9395   0 1395 0 ---- MINDAT
+48047 2147   9538   0 60 0 ---- MYINGYAN
+48048 2120   9492   55 61 0 ---- NYAUNG-U
+48051 2085   9263   0 3 0 ---- KYAUKTAW
+48053 2083   9583   220 214 0 P-P- MEIKTILA
+48057 2078   9705   0 1436 0 ---- TAUNGGYI
+48058 2092   9755   0 1355 0 ---- LOILEM
+48060 2130   9962   828 827 0 P-P- KENGTUNG
+48062 2013   9288   5 4 0 P-P- SITTWE
+48064 2017   9488   51 48 0 ---- MINBU
+48067 2042   9615   0 199 0 ---- YAMETHIN
+48068 2013   9677   0 1463 0 ---- PINLAUNG
+48070 2055   9927   0 572 0 ---- MONGHSAT
+48071 1942   9355   5 5 0 P-P- KYAUKPYU
+48072 1885   9373   0 9 0 ---- MANAUNG
+48074 1972   9622   104 101 0 ---- PYINMANA
+48075 1968   9722   0 894 0 ---- LOIKAW
+48077 1880   9522   60 58 0 ---- PROME
+48078 1892   9647   49 47 0 P-P- TOUNGOO
+48080 1847   9435   11 9 0 P-P- SANDOWAY
+48085 1758   9458   0 3 0 ---- GWA
+48087 1767   9542   0 25 0 ---- HINTHADA
+48088 1763   9580   15 15 0 ---- THARRAWADDY
+48089 1792   9687   14 12 0 ---- SHWEGYIN
+48090 1807   9745   97 95 0 ---- PAPUN
+48093 1733   9650   0 15 0 ---- BAGO
+48094 1677   9477   10 9 0 P-P- PATHEIN
+48095 1673   9565   5 3 0 ---- MAUBIN
+48096 1690   9618   29 28 0 ---- MINGALADON
+48097 1677   9617   15 14 0 P-P- YANGON
+48098 1692   9737   0 17 0 ---- THATON
+48099 1675   9767   10 9 0 ---- HPAAN
+48101 1627   9567   0 2 0 ---- PHYAPON
+48103 1650   9762   22 21 0 ---- MAWLAMYINE
+48107 1525   9787   7 3 0 ---- YE
+48108 1410   9822   17 16 0 P-P- DAWEI
+48109 1412   9337   3 2 0 P-P- COCO ISLAND
+48110 1243   9860   37 36 0 P-P- MERGUI
+48112 997    9858   47 46 0 P-P- VICTORIA POINT
+44404 2930   8058   1848 1848 2 ---- DADELDHURA
+44406 2925   8095   617 617 0 ---- DIPAYAL
+44409 2880   8055   187 187 0 ---- DHANGADHI (ATARIYA)
+44416 2860   8162   670 0 0 ---- SURKHET
+44418 2810   8167   165 165 0 ---- NEPALGUNJ AIRPORT
+44424 2928   8217   2300 2300 3 ---- JUMLA
+44429 2805   8250   634 634 0 ---- DANG
+44434 2822   8400   827 827 2 ---- POKHARA AIRPORT
+44438 2752   8345   109 109 0 ---- BHAIRAWA AIRPORT
+44449 2717   8498   137 137 0 ---- SIMARA AIRPORT
+44454 2770   8537   1337 1337 2 ---- KATHMANDU AIRPORT
+44462 2730   8650   1720 1720 2 ---- OKHALDHUNGA
+44474 2735   8767   1732 1732 2 ---- TAPLEJUNG
+44477 2698   8735   1210 1210 2 ---- DHANKUTA
+44478 2648   8727   72 72 0 ---- BIRATNAGAR AIRPORT
+41240 2633   5638   0 3 0 ---- KHASAB PORT
+41241 2617   5623   0 3 0 ---- KHASAB AIRPORT
+41242 2562   5625   0 20 0 ---- DIBA
+41244 2423   5578   0 299 0 ---- BURAIMI
+41246 2447   5663   0 4 0 ---- SOHAR MAJIS
+41252 2342   5652   0 244 0 ---- IBRI
+41253 2340   5742   0 322 0 ---- RUSTAQ
+41254 2307   5763   0 1755 0 ---- SAIQ
+41255 2285   5753   0 460 0 ---- NIZWA
+41256 2358   5828   0 15 0 T--- SEEB, INT'L AIRPORT
+41257 2330   5793   0 414 0 ---- SAMAIL
+41258 2362   5857   0 4 0 ---- MINA SULTAN QABOOS
+41259 2312   5715   0 3009 0 ---- JABAL SHAMS
+41262 2233   5648   0 170 0 ---- FAHUD
+41263 2298   5730   0 589 0 ---- BAHLA
+41264 2238   5752   0 285 0 ---- ADAM
+41265 2273   5850   0 469 0 ---- IBRA
+41267 2265   5940   0 12 0 ---- QALHAT
+41268 2253   5947   0 14 0 ---- SUR
+41270 2230   5980   0 10 0 ---- RAS AL HADD
+41275 2137   5705   0 139 0 ---- QARN ALAM
+41287 2085   5825   0 46 0 ---- JOBA
+41288 2067   5890   0 19 0 ---- MASIRAH
+41290 1962   5763   0 40 0 ---- DUQM
+41295 1995   5712   0 153 0 ---- YAALONI
+41304 1813   5517   0 269 0 ---- MARMUL
+41312 1690   5392   0 33 0 ---- MINA SALALAH
+41314 1767   5402   0 467 0 ---- THUMRAIT
+41315 1725   5408   0 878 0 ---- QAIROON HAIRITI
+41316 1703   5408   23 22 0 T--- SALALAH
+41504 3617   7340   2156 0 2 ---- GUPIS
+41505 3632   7465   2374 0 0 ---- HUNZA
+41506 3585   7183   1500 1499 2 PPPP CHITRAL
+41507 3483   7182   786 0 0 ---- MET. OBSERVATORY TIMERGARA (DIR LOWER)
+41508 3520   7185   1370 1369 2 ---- DIR
+41509 3550   7170   1250 0 0 ---- MIR KHANI
+41510 3583   7298   2123 0 0 ---- KALAM
+41515 3557   7178   1465 1464 2 PPPP DROSH
+41516 3592   7433   1459 1453 2 PPPP GILGIT
+41517 3530   7568   2181 2180 2 PPPP SKARDU
+41518 3567   7463   1470 1469 2 ---- BUNJI
+41519 3542   7410   1251 1249 2 ---- CHILLAS
+41520 3537   7490   2168 0 2 ---- ASTORE
+41523 3473   7235   951 950 0 ---- SAIDU SHARIF
+41524 3510   7300   752 0 0 ---- PATTAN
+41525 3475   7290   2652 0 0 ---- MALAM JABBA
+41526 3522   7410   2854 0 0 ---- BABUSAR
+41529 3403   7193   0 329 0 PPPP PESHAWAR
+41531 3458   7315   0 1676 0 ---- BATTAL
+41532 3437   7348   2303 2301 2 PPPP MUZAFFAR ABAD
+41533 3407   7198   317 315 0 ---- RISALPUR
+41535 3418   7325   1309 1308 2 ---- KAKUL
+41536 3438   7335   981 980 2 ---- BALAKOT
+41560 3387   7008   1726 1725 2 PPPP PARACHINAR
+41562 3300   7010   406 0 0 ---- BANNU*
+41564 3357   7143   513 511 0 ---- KOHAT
+41565 3382   7188   1372 1371 2 ---- CHERAT
+41571 3362   7310   508 507 0 PPPP ISLAMABAD AIRPORT
+41573 3392   7338   2127 2126 2 ---- MURREE
+41574 3385   7380   1677 0 3 ---- RAWALAKOT*
+41576 3307   7363   283 0 0 ---- MANGLA*
+41577 3372   7310   525 0 4 ---- ISLAMABAD CITY
+41592 3255   7152   212 210 0 ---- MIANWALI
+41593 3205   7267   187 0 0 ---- SARGODHA
+41594 3205   7267   188 187 0 TPPP SARGODHA
+41596 3237   7435   0 226 0 ---- MET. OBSERVATORY GUJRANWALA
+41597 3258   7350   253 0 0 ---- MANDI BAHAUDDIN
+41598 3293   7372   234 232 0 PPPP JHELUM
+41599 3253   7403   248 0 0 ---- SIALKOT INTERNATIONAL AIRPORT
+41600 3250   7453   256 255 0 ---- SIALKOT
+41620 3135   6947   1407 1405 2 PPPP ZHOB
+41624 3182   7092   173 172 0 PPPP DERA ISMAIL KHAN
+41630 3143   7310   184 183 4 ---- FAISALABAD
+41636 3127   7232   153 0 0 ---- JHANG
+41638 3098   7247   156 0 0 ---- TOBA TEK SINGH
+41640 3155   7433   215 214 0 TPPP LAHORE CITY
+41641 3152   7440   217 216 0 ---- LAHORE AIRPORT
+41646 3080   7343   180 0 0 ---- OKARA
+41652 3005   7063   125 123 0 ---- DERA GHAZI KHAN
+41660 3025   6688   1589 1587 2 ---- QUETTA AIRPORT
+41661 3027   6692   1621 1620 2 TPPP QUETTA (SHEIKH MANDA)
+41672 3078   7220   150 0 4 PPPP RAFIQUI
+41675 3020   7143   123 122 0 TPPP MULTAN
+41678 2995   7325   163 162 0 PPPP BAHAWALNAGAR
+41685 2988   6972   1098 1097 2 PPPP BARKHAN
+41696 2903   6658   2017 2015 2 PPPP KALAT
+41697 2955   6788   134 133 0 ---- SIBI
+41700 2940   7178   113 112 0 ---- BAHAWALPUR
+41701 2940   7178   117 0 0 ---- BAHAWALPUR AIRPORT
+41710 2882   6275   683 682 0 PPPP NOKKUNDI
+41712 2888   6440   850 848 2 PPPP DAL BANDIN
+41715 2830   6847   56 55 0 PPPP JACOBABAD
+41716 2843   7032   83 0 0 ---- RAHIM YAR KHAN*
+41718 2865   7068   88 87 0 PPPP KHANPUR
+41725 2767   6890   68 67 0 ---- ROHRI
+41738 2602   6307   154 0 4 ---- TURBAT
+41739 2697   6410   981 980 2 PPPP PANJGUR
+41744 2783   6663   1232 1231 2 PPPP KHUZDAR
+41745 2513   6827   11 0 0 ---- AGROMET OBSERVATORY, SAKRAND
+41746 2685   6813   47 46 0 ---- PADIDAN
+41749 2625   6837   38 37 0 PPPP NAWABSHAH
+41756 2507   6180   57 56 0 TPPP JIWANI
+41757 2513   6233   96 0 0 ---- GAWADAR
+41759 2527   6348   6 4 0 ---- PASNI
+41764 2538   6842   30 28 4 PPPP HYDERABAD
+41768 2552   6978   6 5 0 PPPP CHHOR
+41780 2490   6713   22 21 0 TPPP KARACHI AIRPORT
+41781 2490   6693   16 11 0 ---- KARACHI MASROOR
+41782 2480   6698   4 2 0 ---- KARACHI MANORA
+41785 2463   6890   11 10 0 ---- BADIN
+41160 2615   5120   6 4 0 ---- AI RUWAIS
+41161 2562   5152   11 10 0 ---- ALKHOR AIRPORT
+41162 2585   5097   3 2 0 ---- ALSHEHAIMIYA
+41164 2583   5127   19 18 0 ---- ALGUWAYRIYAH
+41167 2540   5075   5 4 0 ---- DUKHAN
+41168 2530   5155   4 3 0 ---- DOHA PORT
+41170 2525   5157   10 11 0 -T-- DOHA INTERNATIONAL AIRPORT
+41171 2538   5148   12 11 0 ---- QATAR UNIVERSITY
+41173 2518   5162   6 5 0 ---- ALWAKRAH
+41175 2500   5103   49 48 0 ---- ALKARANAA
+41176 2495   5157   10 5 0 ---- UMM SAID
+41177 2472   5122   42 41 0 ---- TURAYNA
+41178 2475   5082   8 7 0 ---- ABU SAMRA
+47080 3845   12845  0 103 0 ---- GEOJIN
+47081 3822   12753  0 1167 0 ---- DAESEONGSAN
+47082 3777   12637  0 392 0 ---- BYEOLLIBSAN
+47083 3733   12758  0 61 0 P--- YEOJU
+47084 3735   12725  0 141 0 P--- MAESALLI
+47085 3735   12690  0 426 0 ---- SURISAN
+47086 3622   12653  0 4 0 P--- UNGCHEON
+47087 3657   12728  0 33 0 ---- JOCHIWON
+47088 3640   12828  0 90 0 P--- SANGJU RANGE
+47090 3825   12855  19 18 0 T-T- SOKCHO
+47092 3807   12867  72 74 0 ---- YANGYANG INT'L AIRPORT
+47094 3812   12743  0 1064 0 ---- GWANGDEOKSAN
+47095 3813   12730  155 154 0 ---- CHEORWON
+47097 3725   12748  79 78 0 ---- ICHEON
+47098 3790   12705  110 109 0 ---- DONGDUCHEON
+47099 3788   12675  30 29 0 ---- MUNSAN
+47100 3767   12872  773 773 0 ---- DAEGWALLYEONG
+47101 3790   12773  78 78 0 ---- CHUNCHEON
+47102 3795   12462  146 145 0 T-T- BAENGNYEONGDO
+47103 3793   12463  0 169 0 ---- BAENGNYEONGDO AB
+47104 3780   12885  80 79 0 ---- BUKGANGNEUNG
+47105 3775   12888  27 26 0 ---- GANGNEUNG
+47106 3750   12912  41 40 0 ---- DONGHAE
+47107 3773   12893  0 6 0 ---- GANGNEUNG AB
+47108 3757   12695  87 86 0 ---- SEOUL
+47109 3775   12865  0 1406 0 ---- HWANGBYEONGSAN
+47110 3755   12678  10 18 0 ---- GIMPO INT'L AIRPORT
+47111 3745   12710  0 21 0 ---- SEOUL AB
+47112 3747   12662  69 68 0 ---- INCHEON
+47113 3747   12643  6 7 0 ---- INCHEON INT'L AIRPORT
+47114 3733   12793  150 149 0 ---- WONJU
+47115 3747   13088  224 223 0 ---- ULLEUNGDO
+47116 3743   12695  0 640 0 ---- GWANAKSAN
+47117 3753   12697  0 28 0 ---- SINYONGSAN
+47118 3823   12795  125 105 0 ---- WONJU AB
+47119 3727   12698  37 37 0 ---- SUWON
+47120 3722   12700  24 20 0 ---- SUWON AB
+47121 3717   12845  241 241 0 ---- YEONGWOL
+47122 3708   12703  52 11 0 TTTT OSAN AB
+47123 3710   12887  0 703 0 P--- SANGDONG
+47124 3655   12750  79 79 0 ---- SEONGMU AB
+47125 3702   12788  12 82 0 ---- JUNGWON AB
+47126 3693   12643  0 277 0 ---- MANGILSAN
+47127 3697   12795  116 115 0 ---- CHUNGJU
+47128 3672   12750  0 53 0 ---- CHEONGJU AB
+47129 3677   12648  30 29 0 ---- SEOSAN
+47130 3698   12940  51 50 0 ---- ULJIN
+47131 3663   12743  58 57 0 ---- CHEONGJU
+47132 3652   12632  0 46 0 ---- KOREA GAW CENTER, ANMYEONDO
+47133 3637   12737  69 69 0 ---- DAEJEON
+47134 3662   12835  0 107 0 ---- YECHEON AB
+47135 3622   12798  245 245 0 ---- CHUPUNGNYEONG
+47136 3657   12870  141 140 0 ---- ANDONG
+47137 3640   12815  97 96 0 ---- SANGJU
+47138 3602   12937  3 2 0 T-T- POHANG
+47139 3598   12942  20 21 0 ---- POHANG AB
+47140 3600   12675  24 23 0 ---- GUNSAN
+47141 3590   12662  10 9 0 ---- GUNSAN AB
+47142 3588   12867  0 35 0 ---- DAEGU AB
+47143 3588   12862  65 64 0 ---- DAEGU
+47144 3600   12678  0 231 0 ---- OSUNGSAN
+47145 3677   12712  25 24 0 ---- CHEONAN
+47146 3582   12715  54 53 0 ---- JEONJU
+47147 3630   12722  0 145 0 P--- GYERYONGDAE
+47148 3617   12898  0 1127 0 ---- MYONBONGSAN
+47149 3668   12648  0 11 0 ---- SEOSAN AB
+47150 3632   12655  16 16 0 ---- BORYEONG
+47151 3560   12935  9 13 0 ---- ULSAN AIRPORT
+47152 3555   12932  35 35 0 ---- ULSAN
+47153 3517   12893  0 2 0 ---- GIMHAE AB
+47154 3612   12832  50 49 0 ---- GUMI
+47155 3517   12857  38 37 0 ---- CHANGWON
+47156 3517   12688  73 72 0 ---- GWANGJU
+47157 3567   12790  222 221 0 ---- GEOCHANG
+47158 3512   12680  13 12 0 TTTT GWANGJU AB
+47159 3510   12902  70 70 0 ---- BUSAN
+47160 3512   12900  0 547 0 ---- GUDEOKSAN
+47161 3507   12805  8 2 0 P--- SACHEON AB
+47162 3483   12843  34 33 0 ---- TONGYEONG
+47163 3498   12637  37 36 0 ---- MUAN INT'L AIRPORT
+47165 3482   12637  39 38 0 ---- MOKPO
+47167 3483   12762  21 20 0 ---- YEOSU AIRPORT
+47168 3473   12773  65 65 0 ---- YEOSU
+47169 3468   12545  77 77 0 T-T- HEUKSANDO
+47170 3438   12670  36 35 0 ---- WANDO
+47171 3555   12685  46 45 0 ---- JEONGEUP
+47172 3533   12658  56 55 0 ---- GOCHANG
+47173 3540   12732  91 90 0 ---- NAMWON
+47174 3507   12723  75 75 0 ---- SUNCHEON
+47175 3447   12632  477 477 0 ---- JINDO
+47178 3767   12568  0 107 0 ---- YEONPYEONGDO
+47179 3750   13087  0 968 0 ---- ULLEUNGDO AB
+47180 3725   12608  0 123 0 ---- DEOKJEOKDO
+47182 3352   12650  24 36 0 ---- JEJU INT'L AIRPORT
+47184 3350   12652  21 21 0 ---- JEJU
+47185 3328   12615  75 74 0 T-T- GOSAN
+47187 3323   12625  0 181 0 ---- MOSEULPO
+47188 3338   12687  19 18 0 ---- SEONGSAN
+47189 3323   12655  50 49 0 ---- SEOGWIPO
+47192 3515   12803  31 30 0 ---- JINJU
+20046 8062   5805   24 21 0 T-T- POLARGMO IM. E.T. KRENKELJA
+20069 7948   7697   10 9 0 ---- OSTROV VIZE
+20087 7955   9057   8 7 0 ---- OSTROV GOLOMJANNYJ
+20292 7770   10428  15 12 0 T-T- GMO IM.E.K. FEDOROVA
+20353 7695   6855   8 8 0 ---- MYS ZELANIYA
+20471 7595   8293   11 11 0 ---- IZVESTIJ TSIK
+20476 7540   8890   10 10 0 ---- MYS STERLEGOVA
+20667 7332   7005   5 4 0 ---- IM. M.V. POPOVA
+20674 7350   8040   46 42 0 T-T- OSTROV DIKSON
+20744 7237   5270   14 18 0 ---- MALYE KARMAKULY
+20744 7237   5270   18 0 0 T-T- MALYE KARMAKULY
+20871 7187   8270   5 4 0 ---- SOPOCHNAYA KARGA
+20891 7197   10245  32 31 0 ---- HATANGA
+20892 7200   10257  26 25 0 T-T- HATANGA
+20946 7043   5908   12 13 0 ---- IM. E.K. FEDOROVA
+20967 7017   7250   17 18 0 ---- SEYAHA
+20978 7008   8317   28 20 0 ---- KARAUL
+20982 7097   9450   40 37 0 ---- VOLOCHANKA
+21432 7600   13787  14 11 0 T-T- OSTROV KOTEL'NYJ
+21535 7467   13890  14 16 0 ---- SANNIKOVA
+21608 7322   11350  13 11 0 ---- ANABAR
+21636 7333   13987  24 26 0 ---- KIGILYAH
+21711 7300   11987  14 15 0 ---- UST'-OLENEK
+21721 7240   12635  19 25 0 ---- IM.YU.A. HABAROVA
+21802 7197   11408  17 15 0 ---- SASKYLAH
+21813 7192   12357  26 28 0 ---- TYUMYATI
+21821 7200   12912  16 17 0 ---- BYKOV (MYS)
+21824 7158   12892  7 6 0 T-T- TIKSI
+21908 7013   11397  61 61 0 ---- DZALINDA
+21921 7068   12740  33 30 0 ---- KJUSJUR
+21931 7077   13622  24 23 0 ---- JUBILEJNAJA
+21937 7003   13567  92 88 0 ---- KUJGA
+21946 7062   14788  61 44 0 T-T- CHOKURDAH
+21978 7008   17092  5 3 0 ---- VAL' KARKAJ
+21982 7098   -17865 4 2 0 T-T- OSTROV VRANGELJA
+23022 6978   6165   47 53 0 ---- AMDERMA
+23032 6970   6680   26 24 0 ---- MARESALE
+23058 6910   7685   3 2 0 ---- ANTIPAJUTA
+23073 6940   8805   277 0 1 ---- NORILSK (CTBT)
+23074 6940   8617   19 14 0 ---- DUDINKA
+23078 6933   8825   64 60 0 T-T- NORIL'SK
+23112 6880   5798   6 4 0 ---- VARANDEJ
+23114 6853   5548   6 4 0 ---- MYS KONSTANTINOVSKIJ
+23174 6867   8625   41 38 0 ---- POTAPOVO
+23179 6810   8777   93 89 0 ---- SNEZHNOGORSK
+23205 6762   5302   11 5 0 T-T- NAR'JAN-MAR
+23207 6702   5113   18 17 0 ---- KOTKINO
+23219 6703   5940   83 82 0 ---- HOSEDA-HARD
+23226 6748   6397   172 0 0 ---- VORKUTA
+23242 6768   7288   12 10 0 ---- NOVYJ PORT
+23256 6747   7873   27 26 0 ---- TAZOVSKIJ
+23274 6747   8655   0 29 0 ---- IGARKA
+23305 6625   5255   22 21 0 ---- OKUNEV NOS
+23324 6647   6075   62 60 0 ---- PETRUN'
+23330 6652   6667   16 14 0 T-T- SALEHARD
+23339 6603   6868   35 27 0 ---- POLUJ
+23345 6663   7293   7 5 0 ---- NYDA
+23358 6610   7678   61 58 0 ---- NOVYJ URENGOJ
+23376 6693   8837   100 102 0 ---- SVETLOGORSK
+23383 6692   9348   278 277 0 ---- AGATA
+23405 6543   5227   79 70 0 ---- UST'-CIL'MA
+23412 6598   5690   79 77 0 ---- UST'-USA
+23415 6512   5710   58 56 0 T-T- PECHORA
+23418 6512   5713   59 53 0 ---- PECHORA
+23426 6548   6472   19 18 0 ---- MUZI
+23431 6583   6593   16 15 0 ---- PITLYAR
+23443 6583   7450   51 50 0 ---- PANGODY
+23445 6547   7267   18 14 0 ---- NADYM
+23453 6595   7840   23 22 0 ---- URENGOJ
+23463 6597   8432   40 41 0 ---- YANOV-STAN
+23465 6570   8245   24 23 0 ---- KRASNOSEL' KUPSK
+23471 6092   7660   54 50 0 ---- NIZHNEVARTOVSK
+23472 6578   8798   37 37 0 T-T- TURUHANSK
+23499 6493   9887   203 201 0 ---- TEMBENCHI
+23503 6503   5397   52 51 0 ---- IZHMA
+23518 6427   5762   74 73 0 ---- UST'-SUGOR
+23527 6428   6088   28 27 0 ---- SARAN-PAUL'
+23552 6492   7782   27 26 0 ---- TARKO-SALE
+23578 6423   8757   30 34 0 ---- VERESHCHAGINO
+23589 6420   9378   105 105 0 ---- TUTONCHANY
+23606 6357   5380   137 133 0 ---- UHTA
+23625 6365   6210   27 26 0 ---- SOSVA
+23631 6393   6505   32 27 0 ---- BEREZOVO
+23635 6367   6960   85 85 0 ---- YUIL' SK
+23656 6338   7832   67 66 0 ---- HALESOVAYA
+23657 6312   7528   131 130 0 ---- NOYABR' SK
+23662 6398   8208   34 31 0 ---- TOL'KA
+23678 6315   8797   45 45 0 ---- VERHNEIMBATSK
+23699 6270   10110  230 230 0 ---- KERBO
+23701 6298   5088   103 101 0 ---- VESLJANA
+23708 6223   5248   120 117 0 ---- LUN'
+23711 6270   5618   135 133 0 ---- TROICKO-PECHERSKOE
+23724 6243   6087   50 49 0 ---- NJAKSIMVOL'
+23734 6245   6605   72 70 0 ---- OKTJABR'SKOE
+23741 6275   7167   85 83 0 ---- NIZHNESORTYMSK
+23748 6223   7448   67 66 0 ---- KOGALYM
+23758 6215   7732   68 67 0 ---- RADUZHNYJ
+23774 6248   8627   60 58 0 ---- KELLOG
+23776 6245   8900   57 57 0 ---- BAHTA
+23788 6230   9210   61 60 0 ---- KUZ'MOVKA
+23802 6167   5077   117 116 0 T-T- SYKTYVKAR
+23803 6168   5368   143 140 0 ---- UST'-KULOM
+23804 6167   5078   118 116 0 ---- SYKTYVKAR
+23812 6183   5687   131 130 0 ---- YAKSHA
+23823 6195   6490   111 107 0 ---- VONEGAN
+23847 6130   7130   33 31 0 ---- SYTOMINO
+23849 6125   7350   56 55 0 ---- SURGUT
+23862 6153   8242   71 69 0 ---- KORLIKI
+23867 6110   8025   56 55 0 ---- LAR' YAK
+23884 6157   9002   57 62 0 T-T- BOR
+23891 6167   9637   0 262 0 ---- BAJKIT
+23909 6028   5435   197 196 0 ---- GAJNY
+23914 6040   5652   206 208 0 ---- CHERDYN'
+23921 6068   6045   94 93 0 T-T- IVDEL'
+23929 6032   6422   52 51 0 ---- SAIM
+23933 6102   6912   44 44 0 T-T- HANTY-MANSIJSK
+23939 6033   6897   32 30 0 ---- ALTAJ
+23946 6050   7402   48 47 0 ---- UGUT
+23947 6007   7148   54 53 0 ---- SALYM
+23955 6043   7787   48 47 0 T-T- ALEKSANDROVSKOE
+23966 6035   8408   0 0 0 ---- VANZIL'-KYNAK
+23973 6102   8960   48 45 0 ---- VOROGOVO
+23975 6033   8835   85 84 0 ---- SYM
+23982 6100   9342   121 120 0 ---- VEL' MO
+23986 6037   9303   511 513 0 ---- SEVERO-ENISEJSK
+23987 6023   9022   57 56 0 ---- JARCEVO
+23992 6072   9750   178 178 0 ---- UST' -KAMO
+24076 6933   13967  284 282 0 ---- DEPUTATSKIJ
+24125 6850   11243  219 216 0 ---- OLENEK
+24125 6850   11243  207 0 0 T-T- OLENEK
+24136 6862   11833  76 78 0 ---- SUHANA
+24143 6873   12400  38 37 0 ---- DZARDZAN
+24194 6855   14622  41 32 0 ---- BELAYA GORA
+24219 6713   10853  235 236 0 ---- YAROL'IN
+24261 6780   13038  491 489 0 ---- BATAGAJ-ALYTA
+24263 6765   13468  214 213 0 ---- BATAGAJ
+24266 6757   13340  136 135 0 T-T- VERHOJANSK
+24322 6673   11243  500 496 0 ---- POLYARNYJ
+24329 6625   11428  235 233 0 ---- SHELAGONTSY
+24338 6603   11740  304 304 0 ---- EJK
+24343 6677   12340  92 87 0 T-T- ZHIGANSK
+24361 6677   13160  200 199 0 ---- EKYUCHCHYU
+24371 6680   13668  273 274 0 ---- UST'-CHARKY
+24382 6645   14323  195 195 0 ---- UST'-MOMA
+24449 6530   12712  73 73 0 ---- BESTYAHSKAYA ZVEROFERMA
+24462 6530   13000  777 777 0 ---- SEBYAN-KYUEL'
+24477 6530   13580  674 674 0 ---- IEMA
+24507 6427   10022  190 188 0 T-T- TURA
+24525 6460   11252  251 244 0 ---- HABARDINO
+24538 6423   11692  139 136 0 ---- CHUMPURUK
+24557 6428   12645  85 83 0 ---- SOGO-HAYA
+24585 6455   14440  518 512 0 ---- NERA
+24588 6405   14188  589 589 0 ---- YURTY
+24606 6358   10395  210 208 0 ---- KISLOKAN
+24639 6328   11833  119 117 0 ---- NJURBA
+24641 6378   12162  110 110 0 T-T- VILJUJSK
+24643 6395   12483  76 75 0 ---- HATYRYK-HOMO
+24644 6345   12032  115 114 0 ---- VERHNEVILYUJSK
+24652 6397   12747  95 92 0 ---- SANGARY
+24656 6352   12948  79 79 0 ---- BATAMAJ
+24661 6400   13030  208 207 0 ---- SEGEN-KYUEL'
+24668 6332   13202  90 90 0 ---- VERHOYANSKIJ PEREVOZ
+24671 6395   13587  401 399 0 ---- TOMPO
+24679 6322   13960  1287 1285 0 ---- VOSTOCHNAYA
+24684 6333   14173  776 775 0 ---- AGAYAKAN
+24688 6325   14315  739 740 0 T-T- OJMJAKON
+24691 6383   14560  800 802 0 ---- DELYANKIR
+24713 6288   10843  245 246 0 ---- NAKANNO
+24724 6303   11248  421 418 0 ---- CHERNISHEVSKIJ
+24725 6253   11123  259 259 0 ---- TUOJ-HAYA
+24726 6253   11387  357 351 0 T-T- MIRNVY
+24737 6227   11615  139 139 0 ---- KRESTYAH
+24738 6215   11765  137 130 0 ---- SUNTAR
+24739 6228   11985  308 311 0 ---- CHAINGDA
+24753 6273   12967  89 87 0 ---- NAMTSY
+24758 6227   12707  231 230 0 ---- BERDIGESTYAH
+24763 6282   13443  114 118 0 ---- KREST-HAL'DZHAJ
+24768 6203   13260  185 181 0 ---- CHURAPCA
+24771 6278   13685  288 283 0 ---- TEPLYJ KLYUCH
+24790 6278   14817  654 645 0 ---- SUSUMAN
+24802 6173   10280  358 357 0 ---- STRELKA CHUNYA
+24807 6132   10047  331 330 0 ---- MUTORAJ
+24817 6127   10802  290 283 0 ---- ERBOGACEN
+24826 6162   11462  353 352 0 ---- DOROZHNYJ
+24843 6192   12455  199 198 0 ---- TONGULAH
+24856 6148   12915  120 114 0 ---- POKROVSK
+24871 6187   13550  140 139 0 ---- OHOTSKIJ PEREVOZ
+24894 6185   14767  838 849 0 ---- KOLYMSKAYA
+24898 6112   14963  574 573 0 ---- UST'-OMCHUG
+24908 6033   10228  260 258 0 T-T- VANAVARA
+24918 6005   10808  295 293 0 ---- PREOBRAZHENKA
+24923 6072   11488  241 240 0 ---- LENSK
+24928 6027   11173  298 300 0 ---- KOMAKA
+24933 6095   11930  249 247 0 ---- KILEER
+24944 6040   12042  229 225 0 ---- OLEKMINSK
+24944 6037   12042  134 0 0 T-T- OLEKMINSK
+24951 6082   12532  130 123 0 ---- ISIT'
+24959 6202   12972  100 98 0 T-T- JAKUTSK
+24962 6090   13198  146 144 0 ---- AMGA
+24966 6038   13445  170 168 0 ---- UST'-MAJYA
+24967 6047   13000  171 173 0 ---- TEGYULTYA
+24975 6037   13750  385 385 0 ---- YNYKCHAN
+24982 6072   14278  397 396 0 ---- UEGA
+24988 6008   14233  198 0 0 ---- ARKA
+25017 6917   15450  16 12 0 ---- ANDRYUSHKINO
+25034 6962   16230  23 24 0 ---- BUHTA AMBARCIK
+25042 6992   16797  13 13 0 ---- AJON
+25044 6950   16658  4 3 0 ---- RAUCHUA
+25051 6970   17025  5 3 0 ---- PEVEK
+25062 6988   17577  2 2 0 ---- MYS BILLINGSA
+25121 6873   15872  12 9 0 ---- KOLYMSKAYA
+25123 6875   16128  28 32 0 T-T- CHERSKIJ
+25129 6815   16117  8 6 0 ---- KONSTANTINOVSKAYA
+25138 6812   16417  94 97 0 ---- OSTROVNOE
+25147 6805   16645  279 290 0 ---- BILIBINO
+25151 6888   17078  4 2 0 ---- CHAUN
+25173 6890   -17963 3 2 0 ---- MYS SHMIDTA
+25206 6745   15372  21 20 0 ---- SREDNEKOLYMSK
+25248 6725   16797  353 352 0 ---- ILIRNEJ
+25282 6783   -17583 4 3 0 ---- MYS VANKAREM
+25325 6655   15942  127 126 0 ---- UST'-OLOJ
+25335 6653   16428  286 286 0 ---- BAIMKA
+25356 6638   17333  77 77 0 ---- EN' MUVEEM
+25378 6635   -17912 25 21 0 ---- EGVEKINOT
+25399 6615   -16983 7 5 0 ---- MYS UELEN
+25400 6573   15090  42 40 0 ---- ZYRYANKA
+25400 6573   15090  47 0 0 T-T- ZYRYANKA
+25428 6523   16053  260 260 0 T-T- OMOLON
+25469 6518   17677  18 16 0 ---- KANCHALAN
+25503 6475   15397  98 97 0 ---- KORKODON
+25538 6422   16423  325 324 0 ---- VERHNEE PENZINO
+25551 6468   17042  26 25 0 ---- MARKOVO
+25561 6487   17442  8 3 0 ---- TANYURER
+25563 6478   17757  60 63 0 ---- ANADYR'
+25563 6473   17753  6 5 0 T-T- ANADYR'
+25594 6438   -17323 39 25 0 ---- BUHTA PROVIDENJA
+25627 6330   15850  709 706 0 ---- LABAZNAYA
+25648 6320   16785  44 44 0 ---- SLAUTNOE
+25677 6302   17928  4 3 0 ---- BERINGOVSKAJA
+25700 6280   15067  312 311 0 ---- EL' GEN (SOVHOZ)
+25703 6292   15242  210 206 0 T-T- SEJMCHAN
+25705 6245   15232  260 0 0 ---- SREDNIKAN
+25707 6208   15067  348 348 0 ---- BOHAPCHA
+25715 6252   15580  499 498 0 ---- OMSUKCHAN
+25745 6247   16620  40 35 0 ---- KAMENSKOE
+25767 6205   17520  13 10 0 ---- HATYRKA
+25808 6113   15238  707 704 0 ---- TALAYA
+25820 6192   15922  11 8 0 ---- EVENSK
+25904 6060   15070  521 520 0 ---- MADAUN
+25913 5955   15078  116 115 0 T-T- MAGADAN
+25916 5883   15135  65 63 0 ---- ALEVINA (MYS)
+25919 5910   15333  12 14 0 ---- BRAT' EV (MYS)
+25922 6072   15588  33 34 0 ---- SHELIHOVA
+25927 5965   15427  5 0 0 ---- BROHOVO
+25932 6068   16040  30 0 0 ---- TAJGONOS
+25941 6073   16302  14 14 0 ---- CHEMURNAUT
+25954 6135   16600  3 2 0 ---- KORF
+25956 6043   16967  4 3 0 ---- APUKA
+28009 5935   5225   168 167 0 ---- KIRS
+28044 5960   6053   130 123 0 ---- SEROV
+28049 5943   6233   130 128 0 ---- GARI
+28064 5963   6572   72 70 0 ---- LEUSI
+28076 5960   6928   56 57 0 ---- DEM'JANSKOE
+28097 5958   7328   60 58 0 ---- TAUROVO
+28116 5902   5465   186 186 0 ---- KUDYMKAR
+28128 5877   5620   122 122 0 ---- CERMOZ
+28138 5852   5885   463 463 0 ---- BISER
+28144 5887   6078   125 123 0 ---- VERHOTUR'E
+28165 5872   6608   81 80 0 ---- KUMINSKAYA
+28202 5835   5157   178 179 0 ---- FALENKI
+28214 5813   5258   169 168 0 ---- GLAZOV
+28216 5808   5468   226 238 0 ---- VERESCAGINO
+28224 5800   5667   170 171 0 ---- PERM'
+28225 5795   5618   170 170 0 T-T- PERM'
+28234 5812   5778   226 223 0 ---- LYS'VA
+28238 5783   5865   244 244 0 ---- KYN
+28240 5788   6007   260 262 0 ---- NIZHNYJ TAGIL
+28248 5787   6170   129 127 0 ---- ALAPAEVSK
+28255 5805   6368   102 100 0 ---- TURINSK
+28264 5805   6535   59 60 0 ---- TAVDA, BELYJYAR
+28275 5815   6825   46 55 0 T-T- TOBOL'SK
+28302 5775   5150   183 179 0 ---- UNI
+28307 5712   5000   116 115 0 ---- URZUM
+28319 5708   5475   131 132 0 ---- NOZOVKA
+28321 5772   5538   163 163 0 ---- OHANSK
+28326 5742   5693   149 153 0 ---- KUNGUR
+28334 5735   5822   243 247 0 ---- SAMARY
+28346 5737   6192   154 154 0 ---- ARTEMOVSKIJ
+28359 5707   6467   90 89 0 ---- TUGULYM
+28366 5742   6708   52 50 0 ---- YARKOVO
+28367 5712   6543   101 101 0 ---- TYUMEN'
+28382 5768   7118   55 55 0 ---- UST'-ISIM
+28383 5752   7240   66 65 0 ---- TEVRIZ
+28409 5643   5220   168 169 0 ---- MOZGA
+28411 5683   5345   156 155 0 ---- IZHEVSK
+28418 5647   5373   133 134 0 ---- SARAPUL
+28419 5627   5497   102 98 0 ---- JANAUL
+28428 5650   5613   148 148 0 ---- CHERNUSKA
+28434 5665   5778   206 205 0 ---- KRASNOUFIMSK
+28440 5683   6063   281 280 0 ---- EKATERINBURG
+28445 5673   6107   287 286 0 T-T- EKATERINBURG (VERHNEE DUBROVO)
+28449 5643   6187   173 169 0 ---- KAMENSK-URALSKIJ
+28451 5685   6272   126 127 0 ---- KAMYSLOV
+28455 5672   6377   105 106 0 ---- BUTKA
+28456 5652   6465   113 114 0 ---- SATROVO
+28465 5668   6635   61 60 0 ---- YALTUROVOSK
+28481 5682   7062   78 77 0 ---- VIKULOVO
+28491 5693   7267   87 86 0 ---- BOL'SIE UKI
+28493 5690   7438   73 72 0 ---- TARA
+28502 5623   5103   83 83 0 ---- VJATSKIE POLJANY
+28506 5575   5203   90 89 0 ---- ELABUGA
+28517 5572   5307   112 111 0 ---- MENZELINSK
+28522 5610   5657   206 206 0 ---- ASKINO
+28533 5605   5958   320 318 0 ---- NTAZEPETROVSK
+28537 5570   5788   338 337 0 ---- DUVAN
+28541 5608   6030   398 391 0 ---- VERHNIJ UFALEJ
+28552 5607   6365   89 87 0 ---- SADRINSK
+28573 5610   6943   82 81 0 ---- ISHIM
+28586 5587   7222   117 115 0 ---- TJUKALINSK
+28588 5557   7137   126 125 0 ---- NAZYVOEVSK
+28593 5610   7463   77 76 0 ---- BOL'SHERECH'E
+28598 5560   7348   80 79 0 ---- SARGATSKOE
+28612 5530   5318   78 77 0 ---- MUSLJUMOVO
+28615 5517   5378   124 124 0 ---- BAKALY
+28621 5540   5555   186 185 0 ---- BIRSK
+28629 5492   5697   154 154 0 ---- ULU-TELJAK
+28630 5517   5967   537 532 0 ---- ZLATOUST
+28645 5515   6130   236 233 0 ---- CHELYABINSK-GOROD
+28655 5523   6332   177 176 0 ---- SUMIHA
+28659 5492   6443   157 156 0 ---- KURTAMYSH
+28661 5545   6542   73 72 0 ---- KURGAN (VORONOVKA)
+28661 5545   6540   72 0 0 T-T- KURGAN
+28666 5525   6730   140 0 0 ---- MAKUSINO
+28668 5477   6600   151 150 0 ---- POLOVINNOE
+28688 5493   7127   126 125 0 ---- ISIL'KUL'
+28696 5503   7458   110 109 0 ---- KALACINSK
+28698 5502   7338   122 121 0 ---- OMSK
+28698 5493   7340   90 0 0 T-T- OMSK
+28704 5448   5040   77 76 0 ---- CULPANOVO
+28705 5442   5110   157 156 0 ---- CELNO-VERSINY
+28710 5405   5492   124 121 0 ---- RAEVSKY
+28711 5462   5280   303 298 0 ---- BUGUL'MA
+28712 5458   5370   133 131 0 ---- TUIMAZY
+28719 5402   5413   355 357 0 ---- AKSAKOVO
+28722 5470   5580   104 103 0 T-T- UFA-DIOMA
+28741 5455   6030   318 320 0 ---- MIRNYJ
+28748 5408   6162   192 191 0 ---- TROIZK
+28756 5447   6487   117 0 0 ---- ZVERINOGOLOVSKOE
+28786 5437   7175   124 123 0 ---- POLTAVKA
+28791 5463   7243   114 113 0 ---- SERBAKUL'
+28797 5420   7297   124 123 0 ---- ODESSKOE
+28799 5417   7480   114 113 0 ---- CERLAK
+28806 5362   5245   92 93 0 ---- BUGURUSLAN
+28807 5325   5045   40 39 0 ---- SAMARA (SMYSHLJAEVKA)
+28825 5360   5593   137 136 0 ---- STERLITAMAK
+28831 5397   5835   568 563 0 ---- BELORECK
+28833 5388   5920   402 400 0 ---- VERHNEURAL'SK
+28838 5335   5908   384 383 0 ---- MAGNITOGORSK
+28908 5262   5128   87 86 0 ---- AVANGARD ZERNOSOVHOZ
+28909 5282   5222   79 79 0 ---- BUZULUK
+28916 5293   5475   189 189 0 ---- SARLYK
+28925 5292   5592   180 179 0 ---- MELEUZ
+28941 5305   6067   300 298 0 ---- KARTALY
+29023 5985   8195   76 76 0 ---- NAPAS
+29059 5943   8928   102 104 0 ---- ALEKSANDROVSKIJ SHLYUZ
+29068 5950   9092   66 62 0 ---- NAZIMOVO
+29111 5922   7823   69 67 0 ---- SREDNY VASJUGAN
+29122 5905   8083   57 0 0 ---- KARGASOK
+29128 5870   8147   58 58 0 ---- PARABEL'
+29149 5863   8672   0 0 0 ---- STEPANOVKA
+29203 5857   7650   80 79 0 ---- NOVYJ VASYUGAN
+29209 5780   7722   99 98 0 ---- MAJSK
+29231 5832   8295   75 72 0 T-T- KOLPASEVO
+29253 5845   8947   133 135 0 ---- LOSINOBORSKOE
+29263 5845   9220   78 76 0 T-T- ENISEJSK
+29274 5807   9303   89 87 0 ---- STRELKA
+29276 5817   9473   170 161 0 ---- MOTYGINO
+29282 5838   9745   133 130 0 T-T- BOGUCANY
+29313 5755   7942   0 95 0 ---- PUDINO
+29328 5700   8205   110 109 0 ---- BAKCHAR
+29332 5757   8375   112 111 0 ---- MOLCHANOVO
+29348 5707   8622   114 113 0 ---- PERVOMAJSKOE
+29363 5762   9227   179 179 0 ---- PIROVSKOE
+29367 5697   9067   180 179 0 ---- NOVOBIRILYUSSY
+29374 5767   9325   92 92 0 ---- KAZACHINSKOE
+29379 5720   9455   164 163 0 ---- TASEEVO
+29393 5765   9953   220 218 0 ---- CHERVYANKA
+29405 5660   7655   0 0 0 ---- KYSTOVKA
+29418 5633   7835   126 124 0 ---- SEVERNOE
+29430 5650   8492   139 140 0 ---- TOMSK
+29456 5653   8932   205 204 0 ---- TJUHTET
+29464 5665   9058   231 231 0 ---- BOL'SOJ ULUJ
+29467 5628   9052   257 265 0 ---- ACHINSK
+29471 5688   9317   179 180 0 ---- BOL'SHAJA MURTA
+29477 5648   9327   164 164 0 ---- SUHOBUZIMSKOE
+29481 5682   9522   188 188 0 ---- DZERZHINSKOE
+29485 5667   9605   244 245 0 ---- ABAN
+29498 5635   9837   221 219 0 ---- SITKINO
+29524 5585   8005   128 127 0 ---- KRESCHENKA
+29532 5625   8395   92 91 0 ---- KOZEVNIKOVO
+29539 5567   8440   193 191 0 ---- BOLOTNOE
+29541 5607   8562   251 250 0 ---- TAJGA
+29551 5618   8768   144 142 0 ---- MARIINSK
+29552 5612   8852   222 221 0 ---- TJAZIN
+29553 5622   8955   290 288 0 ---- BOGOTOL
+29557 5575   8830   211 210 0 ---- TISUL'
+29558 5553   8920   318 315 0 ---- GGP KATEK
+29561 5603   9032   255 255 0 ---- NAZAROVO
+29562 5610   9167   331 339 0 ---- KEMCHUG
+29563 5612   9220   478 479 0 ---- KACHA
+29566 5593   9227   274 278 0 ---- SHUMIHA
+29570 5603   9275   276 276 0 ---- KRASNOJARSK OPYTNOE POLE
+29571 5607   9273   234 233 0 ---- MININO
+29572 5617   9260   206 204 0 T-T- EMEL' YANOVO
+29576 5582   9430   375 373 0 ---- UJAR
+29578 5572   9373   399 403 0 ---- SHALINSKOE
+29580 5617   9527   357 359 0 ---- SOLYANKA
+29581 5620   9563   202 201 0 ---- KANSK
+29587 5565   9548   252 250 0 ---- IRBEJSKOE
+29594 5595   9800   306 304 0 ---- TAJSHET
+29602 5530   7675   111 110 0 ---- CHANY
+29605 5522   7602   112 0 0 ---- TATARSK
+29612 5535   7830   119 118 0 T-T- BARABINSK
+29613 5530   7962   139 0 0 ---- UBINSKOE
+29625 5510   8097   141 140 0 ---- CULYM
+29626 5502   8223   159 158 0 ---- KOCENEVO
+29631 5532   8273   146 145 0 ---- KOLYVAN'
+29632 5532   8360   202 199 0 ---- MOSKOVO
+29634 5508   8290   175 172 0 ---- NOVOSIBIRSK
+29634 5497   8295   0 0 0 T-T- NOVOSIBIRSK
+29636 5522   8438   172 172 0 ---- TOGUCHIN
+29638 5490   8295   131 130 0 ---- NOVOSIBIRSK (OGOURTSOVO)
+29642 5523   8612   260 0 0 ---- KEMEROVO
+29645 5525   8622   148 147 0 ---- KEMEROVSKIJ
+29649 5500   8680   151 0 0 ---- KRAPIVINO
+29653 5530   8982   387 386 0 ---- UZUR
+29654 5520   8763   498 496 0 ---- CENTRAL'NYJ RUDNIK
+29662 5538   9162   321 319 0 ---- BALAHTA
+29664 5508   9083   325 325 0 ---- SVETLOLYUBOVO
+29675 5508   9337   476 465 0 ---- KOLBA
+29676 5527   9490   337 335 0 ---- AGINSKOE
+29698 5488   9903   411 410 0 T-T- NIZHNEUDINSK
+29706 5438   7730   116 0 0 ---- KUPINO
+29712 5472   7867   0 0 0 ---- ZDVINSK
+29724 5433   8047   160 159 0 ---- KOCHKI
+29726 5437   8188   132 132 0 ---- ORDYNSKOE
+29735 5430   8330   293 291 0 ---- POSEVNAJA
+29736 5433   8420   198 199 0 ---- MASLJANINO
+29745 5445   8633   225 224 0 ---- BELOVO
+29752 5475   8882   1188 1186 2 ---- NENASTNAYA
+29756 5450   8993   474 476 0 ---- SIRA
+29759 5433   8928   846 842 0 ---- KOMMUNAR
+29766 5435   9215   281 280 0 ---- IDRINSKOE
+29768 5418   9158   252 251 0 ---- LEBYAZH' E
+29771 5535   9208   804 807 0 ---- SHCHETINKINO
+29772 5435   9343   479 473 0 ---- ARTEMOVSK
+29789 5422   9697   984 982 0 ---- VERHNJAJA GUTARA
+29813 5398   7925   0 0 0 ---- KRASNOOZERSK
+29814 5373   7802   0 0 0 ---- KARASUK
+29816 5360   7955   137 137 0 ---- HABARY
+29822 5382   8127   129 126 0 ---- KAMEN'-NA-OBI
+29827 5327   8077   0 0 0 ---- BAEVO
+29832 5382   8358   144 143 0 ---- TALMENKA
+29833 5393   8478   212 0 1 ---- ZALESOVO (CTBT)
+29838 5343   8352   185 182 0 ---- BARNAUL
+29839 5350   8383   145 140 0 T-T- BARNAUL
+29846 5382   8688   309 307 0 ---- NOVOKUZNETSK
+29848 5345   8592   272 271 0 ---- TOGUL
+29849 5333   8718   293 293 0 ---- KUZEDEEVO
+29862 5377   9132   255 253 0 T-T- ABAKAN
+29864 5372   9037   525 524 0 ---- UYBAT
+29866 5372   9170   254 253 0 ---- MINUSINSK
+29869 5327   9240   297 300 0 ---- ERMAKOVSKOE
+29874 5358   9288   319 318 0 ---- KARATUZSKOE
+29876 5368   9420   446 445 0 ---- KAZYR
+29892 5395   9882   705 705 0 ---- HADAMA
+29894 5363   9822   918 916 0 ---- ALYGDZER
+29915 5297   7865   125 124 0 ---- SLAVGOROD
+29923 5307   8233   219 218 0 ---- REBRIHA
+29937 5252   8277   175 173 0 ---- ALEJSKAJA
+29939 5267   8492   225 223 0 ---- BIJSK ZONAL'NAYA
+29956 5280   8992   449 448 0 ---- TASTYP
+29962 5305   9092   468 468 0 ---- BEJA
+29974 5280   9323   1398 1404 0 ---- OLEN' YA RECHKA
+29998 5250   9982   1374 1376 2 ---- ORLIK
+30028 5928   10617  351 350 0 ---- IKA
+30054 5945   11258  190 186 0 T-T- VITIM
+30074 5993   11760  163 162 0 ---- MACHA
+30089 5902   12177  175 173 0 ---- DZHIKIMDA
+30127 5823   10573  438 438 0 ---- TOKMA
+30138 5810   10868  246 244 0 ---- CECUJSK
+30142 5888   11125  227 225 0 ---- VIZIRNYJ
+30157 5832   11287  224 218 0 ---- MAMA
+30165 5842   11602  422 422 0 ---- SVETLYJ
+30173 5900   11980  198 198 0 ---- TYANYA
+30198 5807   12372  416 413 0 ---- SUON-TIT
+30229 5733   10707  271 270 0 ---- VERHNE-MARKOVO
+30230 5777   10807  258 256 0 T-T- KIRENSK
+30252 5782   11402  249 244 0 ---- MAMAKAN
+30253 5785   11423  280 277 0 ---- BODAJBO
+30307 5637   10168  489 488 0 ---- BRATSK II
+30309 5628   10175  416 410 0 T-T- BRATSK
+30320 5685   10572  668 664 0 ---- UST'-KUT
+30323 5680   10580  325 326 0 ---- UST' -KUT
+30328 5605   10583  338 337 0 ---- ORLINGA
+30337 5632   10762  356 355 0 ---- KAZACHINSK
+30372 5690   11827  710 709 0 T-T- CHARA
+30385 5658   12150  425 430 0 ---- UST'-NJUKZHA
+30393 5683   12487  858 855 0 ---- CUL'MAN
+30405 5538   10103  422 420 0 ---- TANGUJ
+30433 5578   10957  479 476 0 ---- NIZHNEANGARSK
+30439 5512   10975  464 464 0 ---- TOMPA
+30455 5548   11362  1096 1099 2 ---- UAKIT
+30457 5525   11313  1080 1085 2 ---- BAUNT
+30469 5512   11677  613 612 0 ---- KALAKAN
+30471 5587   11737  750 748 0 ---- SREDNIJ KALAR
+30493 5597   12488  860 859 0 ---- NAGORNYJ
+30499 5518   12467  528 533 0 ---- TYNDA
+30504 5460   10063  522 523 0 ---- TULUN
+30507 5418   10008  527 526 0 ---- IKEJ
+30514 5417   10302  427 426 0 ---- UST-UDA
+30521 5480   10517  418 417 0 ---- ZHIGALOVO
+30526 5448   10707  650 653 0 ---- TYRKA
+30537 5403   10827  463 463 0 ---- SOLNETHNAYA
+30554 5443   11357  902 900 0 ---- BAGDARIN
+30554 5447   11358  995 995 0 T-T- BAGDARIN
+30555 5462   11313  1314 1315 2 ---- TROICKIJ PRIISK
+30576 5443   11990  645 642 0 ---- TUPIK
+30603 5393   10205  458 457 0 ---- ZIMA
+30612 5400   10307  426 428 0 ---- BALAGANSK
+30618 5313   10377  445 444 0 ---- BOHAN
+30622 5397   10590  521 518 0 ---- KACHUG
+30627 5310   10553  761 757 0 ---- BAJANDAJ
+30635 5342   10902  460 459 0 T-T- UST'-BARGUZIN
+30636 5362   10963  488 488 0 ---- BARGUZIN
+30637 5332   10773  461 460 0 ---- UZUR
+30650 5320   11278  922 920 0 ---- ROMANOVKA
+30664 5353   11562  811 810 0 ---- TUNGOKOCEN
+30669 5307   11748  707 700 0 ---- ZILOVO
+30673 5375   11973  624 624 0 T-T- MOGOCHA
+30675 5355   11872  581 583 0 ---- KSEN'EVSKAJA
+30679 5310   11922  383 382 0 ---- GORBICA
+30682 5387   12087  472 471 0 ---- AMAZAR
+30683 5397   12193  521 520 0 ---- EROFEJ PAVLOVIC
+30686 5347   12240  294 293 0 ---- IGNASINO
+30688 5335   12155  314 313 0 ---- POKROVKA
+30692 5400   12397  397 397 0 ---- SKOVORODINO
+30695 5347   12390  265 266 0 ---- DZALINDA
+30703 5297   10198  543 541 0 ---- INGA
+30710 5227   10432  469 467 0 ---- IRKUTSK
+30712 5278   10368  437 437 0 ---- USOL' E-SIBIRSKOE
+30713 5282   10477  525 523 0 ---- UST'ORDYNSKIJ
+30714 5210   10270  755 754 0 ---- DABADY
+30715 5248   10385  436 435 0 T-T- ANGARSK
+30726 5255   10710  460 457 0 ---- SUHAJA
+30729 5205   10663  467 466 0 ---- KABANSK
+30731 5298   10828  491 488 0 ---- GORJACINSK
+30739 5217   10978  666 665 0 ---- HORINSK
+30741 5277   10997  1286 1288 2 ---- ZAMAKTA
+30745 5253   11155  951 951 0 ---- SOSNOVO-OZERSKOE
+30758 5208   11348  670 671 0 T-T- CHITA
+30764 5265   11517  645 644 0 ---- USUGLI
+30765 5255   11620  533 533 0 ---- ZJUL'ZJA
+30766 5253   11700  539 538 0 ---- CHERNYSHEVSK
+30768 5200   11653  481 477 0 ---- NERCINSK
+30772 5270   11880  406 402 0 ---- UST'-KARA
+30777 5223   11770  525 528 0 ---- SRETENSK
+30781 5275   12003  374 373 0 ---- URJUPINO
+30791 5227   10438  503 502 0 ---- IRKUTSK
+30802 5168   10098  1304 1303 2 ---- MONDY
+30811 5173   10253  720 720 0 ---- TUNKA
+30815 5153   10360  1442 1442 2 ---- HAMAR-DABAN
+30822 5170   10585  467 466 0 ---- BABUSKIN
+30823 5183   10760  514 514 0 ---- ULAN-UDE
+30824 5157   10512  472 472 0 ---- TANHOJ
+30829 5110   10663  556 555 0 ---- NOVOSELENGINSK
+30838 5132   10887  805 810 0 ---- PETROVSKIJ ZAVOD
+30843 5173   11200  906 906 0 ---- MOGZON
+30844 5137   11047  801 800 0 ---- HILOK
+30846 5135   11247  743 743 0 ---- ULETY
+30853 5163   11432  616 619 0 ---- KARYMSKAJA
+30859 5110   11452  681 680 0 ---- AGINSKOE
+30862 5187   11603  597 596 0 ---- SHILKA
+30874 5165   11757  715 713 0 ---- SELOPUGINO
+30879 5132   11962  619 621 0 ---- NERCHINSKIJ ZAVOD
+30925 5035   10645  797 791 0 ---- KJAHTA
+30934 5060   10758  638 636 0 ---- BICURA
+30935 5037   10875  770 770 0 T-T- KRASNYJ CHIKOJ
+30949 4957   11197  907 907 0 ---- KYRA
+30957 5027   11327  732 731 0 ---- AKSA
+30961 5095   11558  639 642 0 ---- OLOVJANNAJA
+30965 5040   11652  675 675 0 T-T- BORZYA
+30967 4990   11575  622 620 0 ---- SOLOV'EVSK
+30971 5092   11793  806 805 0 ---- ALEKSANDROVSKIJ ZAVOD
+30972 5088   11858  693 694 0 ---- DONO
+30975 5033   11907  521 521 0 ---- PRIARGUNSK
+30978 4983   11838  550 547 0 ---- KAJLASTUJ
+31004 5862   12537  679 678 0 T-T- ALDAN
+31005 5897   12627  283 282 0 ---- TOMMOT
+31011 5967   12705  278 277 0 ---- BUYAGA
+31016 5863   12850  230 230 0 ---- UGINO
+31026 5873   13062  197 193 0 ---- UCHUR
+31041 5963   13303  179 179 0 ---- UST'-MIL'
+31054 5918   13515  212 209 0 ---- UST'-JUDOMA
+31062 5977   13767  383 379 0 ---- YUGORENOK
+31083 5997   14478  121 0 0 ---- HEJDZHAN
+31087 5882   14185  5 4 0 ---- UL' YA
+31088 5937   14320  5 4 0 T-T- OHOTSK
+31096 5915   14903  52 0 0 ---- SPAFAR' EVA (OSTROV)
+31102 5765   12597  1204 1203 0 ---- KANKU
+31123 5777   13090  254 254 0 ---- CJUL'BJU
+31137 5628   13113  849 848 0 ---- TOKO
+31152 5765   13615  318 325 0 ---- NEL' KAN
+31168 5645   13815  7 6 0 T-T- AYAN
+31174 5483   13753  9 9 0 ---- BOL'SHOJ SHANTAR
+31253 5472   12887  364 365 0 ---- BOMNAK
+31263 5473   13045  463 462 0 ---- LOKSAK
+31285 5450   13442  61 62 0 ---- UDSKOE
+31295 5347   12582  363 362 0 ---- MAGDAGACI
+31299 5310   12635  314 314 0 ---- TYGDA
+31300 5373   12727  230 228 0 T-T- ZEJA
+31318 5335   13000  319 319 0 ---- DUGDA
+31329 5308   13293  542 540 0 ---- EKIMCHAN
+31348 5305   13603  153 153 0 ---- BURUKAN
+31369 5315   14070  66 66 0 T-T- NIKOLAEVSK-NA-AMURE
+31371 5278   12600  209 208 0 ---- CHERNJAEVO
+31373 5300   12865  332 332 0 ---- OKTJABR'SKIJ PRIISK
+31388 5235   12992  207 207 0 ---- NORSK
+31392 5280   13172  360 364 0 ---- STOJBA
+31397 5245   13087  267 266 0 ---- FEVRAL'SK
+31416 5242   13650  70 69 0 ---- IM POLINY OSIPENKO
+31418 5228   13580  201 201 0 ---- VESELAJA GORKA
+31439 5238   14047  34 33 0 ---- BOGORODSKOE
+31442 5198   12765  280 280 0 ---- SIMANOVSK
+31443 5163   12882  161 161 0 ---- MAZANOVO
+31445 5145   12812  200 194 0 ---- SVOBODNYJ
+31469 5117   13295  373 370 0 ---- CEGDOMYN
+31474 5163   13327  384 383 0 ---- UST'-UMAL'TA
+31478 5227   13398  902 901 0 ---- SOFIJSKIJ PRIISK
+31484 5142   13508  268 268 0 ---- HULARIN
+31489 5120   13680  91 92 0 ---- GORIN
+31510 5028   12748  169 168 0 T-T- BLAGOVESCENSK
+31512 5025   12755  132 130 0 ---- BLAGOVESCENSK
+31513 5092   12847  177 178 0 ---- BELOGORSK
+31521 5078   12933  230 230 0 ---- BRATOLJUBOVKA
+31527 5012   12947  239 238 0 ---- ZAVITAJA
+31532 5087   13225  271 270 0 ---- CEKUNDA
+31534 5043   13102  273 275 0 ---- SEKTAGLI
+31538 5007   13213  347 343 0 T-T- SUTUR
+31561 5053   13703  21 20 0 ---- KOMSOMOLSK-NA-AMURE
+31583 4978   12992  115 114 0 ---- MALINOVKA
+31587 4962   12865  114 114 0 ---- POJARKOVO
+31594 4942   13008  134 133 0 ---- ARHARA
+31624 4940   13323  201 198 0 ---- URMI
+31632 4993   13463  283 283 0 ---- KUR
+31655 4945   13657  37 33 0 ---- TROICKOE
+31683 4965   14008  57 57 0 ---- TUMNIN
+31702 4900   13108  267 265 0 ---- OBLUC'E
+31707 4773   13097  72 71 0 ---- EKATERINO-NIKOL'SKOE
+31710 4795   13262  56 54 0 ---- LENINSKOE
+31713 4873   13295  77 80 0 ---- BIROBIDZHAN
+31725 4862   13383  52 50 0 ---- SMIDOVICH
+31733 4882   13588  58 61 0 ---- ELABUGA
+31735 4852   13518  76 75 0 ---- HABAROVSK
+31736 4853   13523  72 72 0 T-T- HABAROVSK
+31754 4860   13705  402 404 0 ---- TIVJAKU
+31770 4900   14030  23 20 0 T-T- SOVETSKAYA GAVAN'
+31786 4755   13482  89 86 0 ---- VJAZEMSKAJA
+31788 4715   13433  75 75 0 ---- LERMONTOVKA
+31792 4777   13563  105 104 0 ---- BICEVAJA
+31801 4767   13618  180 180 0 ---- GVASJUGI
+31825 4760   13840  164 166 0 ---- AGZU
+31829 4732   13898  25 27 0 ---- ZOLOTOJ
+31832 4680   13427  67 70 0 ---- BIKIN
+31845 4653   13532  129 128 0 ---- KRASNYJ JAR
+31866 4653   13833  4 2 0 ---- SOSUNOVO
+31873 4587   13373  104 100 0 T-T- DAL'NERECHENSK
+31878 4510   13350  97 97 0 ---- KIROVSKIJ
+31884 4542   13427  138 138 0 ---- MALINOVO
+31909 4500   13660  61 51 0 ---- TERNEJ
+31913 4522   13198  87 92 0 ---- TURIJ ROG
+31915 4440   13138  211 217 0 ---- POGRANICHNYJ
+31917 4403   13132  109 110 0 ---- POLTAVKA
+31919 4413   13200  112 0 1 ---- USSURIYSK (CTBT)
+31921 4472   13207  77 74 0 ---- ASTRAHANKA
+31924 4443   13207  127 126 0 ---- HKOROL'
+31931 4480   13308  98 99 0 ---- SVIJAGINO
+31935 4442   13348  153 158 0 ---- JAKOVLEVKA
+31939 4415   13387  258 257 0 ---- CUGUEVKA
+31958 4425   13545  65 62 0 ---- BOGOPOL'
+31959 4437   13585  33 27 0 ---- RUDNAJA PRISTAN'
+31960 4312   13192  188 187 0 ---- VLADIVOSTOK
+31961 4388   13197  36 34 0 ---- TIMIRYAZEVSKIJ
+31969 4265   13080  39 41 0 ---- POS'ET
+31977 4327   13205  86 77 0 T-T- VLADIVOSTOK (SAD GOROD)
+31981 4397   13307  187 186 0 ---- ANUCINO
+31987 4315   13302  207 221 0 ---- PARTIZANSK
+31989 4290   13390  42 44 0 ---- PREOBRAZHENIE
+32010 5350   14290  37 31 0 ---- OHA
+32027 5222   14163  6 6 0 ---- POGIBI
+32053 5192   14313  34 29 0 ---- NOGLIKI
+32061 5090   14217  31 30 0 T-T- ALEKSANDROVSK-SAHALINSKIJ
+32069 5005   14217  4 3 0 ---- PIL'VO
+32071 5073   14272  95 94 0 ---- TYMOVSKOE
+32076 5040   14377  8 6 0 ---- POGRANICHNOE
+32077 5023   14258  181 180 0 ---- ONOR
+32088 4907   14203  43 39 0 ---- UGLEGORSK
+32098 4922   14310  8 7 0 T-T- PORONAJSK
+32099 4865   14473  6 33 0 ---- MYS TERPENIYA
+32121 4798   14220  17 17 0 ---- ILYINSKIY
+32128 4705   14205  44 40 0 ---- HOLMSK
+32133 4733   14280  11 10 0 ---- DOLINSK
+32150 4695   14272  24 22 0 T-T- JUZHNO-SAHALINSK
+32165 4402   14587  45 44 0 ---- JUZHNO-KURIL'SK
+32213 5087   15668  50 48 0 ---- MYS LOPATKA
+32215 5068   15613  23 24 0 T-T- SEVERO-KURIL'SK
+32222 5960   16073  18 31 0 ---- TEVI
+32252 5850   15917  7 4 0 ---- UST'-VOYAMPOLKA
+32287 5708   15673  8 3 0 ---- UST'- HAJRJUZOVO
+32333 5765   16323  9 8 0 ---- OZERNOJ (MYS)
+32389 5632   16083  28 28 0 T-T- KLJUCHI
+32408 5623   16268  30 19 0 ---- UST'-KAMCHATSK
+32411 5558   15558  5 5 0 ---- ICA
+32477 5430   15592  25 25 0 T-T- SOBOLEVO
+32509 5412   15998  27 28 0 ---- SEMYACHIK
+32519 5462   16120  15 9 0 ---- KRONOKI
+32540 5308   15858  83 78 0 T-T- PETROPAVLOVSK-KAMCHATSKIJ
+32562 5283   15630  30 30 0 ---- BOL' SHERETZK
+32580 5305   15878  65 0 1 ---- PETROPAVLOVSK (CTBT)
+32583 5287   15865  24 32 0 ---- PETROPAVLOVSK-KAMCHATSKIJ
+32594 5148   15648  28 36 0 ---- OZERNAJA
+32618 5520   16598  17 16 0 ---- OSTROV BERINGA
+35001 5238   5047   64 65 0 ---- BOL'SAJA GLUSCICA
+35007 5187   5033   71 72 0 ---- PERELJUB
+35011 5243   5313   122 122 0 ---- SOROCHINSK
+35015 5208   5363   139 138 0 ---- NOVOSERGIEVKA
+35026 5223   5745   520 521 0 ---- ZILAIR
+35037 5187   5822   341 342 0 ---- AK'JAR
+35041 5243   6035   309 309 0 ---- BREDY
+35121 5168   5507   117 114 0 T-T- ORENBURG
+35125 5142   5642   131 130 0 ---- BELJAEVKA
+35127 5102   5563   143 142 0 ---- AK-BULAK
+35138 5107   5860   284 268 0 ---- ORSK
+36020 5248   8017   158 157 0 ---- RODINO
+36021 5225   7918   142 141 0 ---- KLJUCI
+36022 5202   8033   208 207 0 ---- VOLCIHA
+36034 5157   8118   219 216 0 ---- RUBCOVSK
+36038 5115   8217   354 354 0 ---- ZMEINOGORSK
+36058 5138   8602   419 418 0 ---- CHEMAL
+36061 5225   8712   326 325 0 ---- TUROCHAK
+36064 5177   8760   480 481 0 ---- YAJLJU
+36073 5227   9078   716 715 0 ---- KANTEGIR
+36078 5100   9020   983 982 0 ---- TELI
+36083 5205   9217   576 577 0 ---- UST' -USA
+36090 5112   9368   1042 1041 0 ---- HOVU-AKSY
+36091 5225   9300   662 660 0 ---- NIZHNEUSINSKOE
+36092 5213   9390   852 861 0 ---- TURAN
+36096 5170   9448   632 626 0 T-T- KYZYL
+36103 5247   9612   919 919 0 ---- TOORA-HEM
+36104 5147   9557   705 706 0 ---- SARYG-SEP
+36229 5027   8562   977 977 0 ---- UST'- KOKSA
+36231 5073   8613   833 831 0 ---- ONGUDAJ
+36259 5000   8867   1760 1759 2 ---- KOSH-AGACH
+36278 5037   9042   1850 1850 0 ---- MUGUR-AKSY
+36307 5025   9517   1100 1100 2 ---- ERZIN
+36325 5060   9752   1315 1314 2 ---- KUNGUR-TUK
+40356 3168   3873   852 855 0 ---- TURAIF
+40357 3090   4113   549 555 0 ---- ARAR
+40360 3140   3728   504 509 0 ---- GURIAT
+40361 2978   4010   689 689 0 ---- AL-JOUF
+40362 2962   4348   444 449 0 ---- RAFHA
+40363 2800   4145   617 0 0 ---- AL-ZABERAH
+40364 2803   4095   945 0 0 ---- JUBBAH
+40366 3123   3820   843 0 0 ---- LISS
+40367 2740   4432   476 0 0 ---- QIBAH
+40368 3122   3927   948 0 0 ---- TAWQAH
+40369 2950   3500   2 0 0 ---- HAQL
+40370 2735   4502   244 0 0 ---- MASHTHOBAH
+40371 2967   3872   1016 0 0 ---- TOBAGE
+40372 3053   3890   813 0 0 ---- MAARIK
+40373 2832   4613   358 358 0 T-T- AL-QAISUMAH
+40374 2770   3548   26 0 0 ---- AL-MUWAYLAH
+40375 2838   3660   768 778 0 T-T- TABUK
+40376 2760   3857   860 860 0 ---- TAYMA
+40377 2792   4552   414 413 0 ---- HAFR AL-BATIN
+40380 2840   4850   8 0 0 ---- AL-KHAFJI
+40381 2888   3890   884 0 0 ---- AL-HOAGE
+40386 2600   4082   976 0 0 ---- AL-HULAIFAH
+40387 2717   4047   900 0 0 ---- SHAMLY
+40388 2650   4212   1006 0 0 ---- SAMERA
+40390 2792   4247   683 0 0 ---- BAG'A
+40392 2678   4132   1189 0 0 ---- AL-GHAZALAH
+40394 2743   4168   1002 1015 0 T-T- HAIL
+40395 2743   4168   1002 0 0 ---- HAIL AIRPORT
+40397 2708   4967   1 0 0 ---- AL-JUBAIL
+40398 2832   3862   935 0 0 ---- GARB
+40399 2740   5010   2 0 0 ---- AL-ARABIAH ISLAND
+40400 2620   3648   24 20 0 ---- AL-WEJH
+40401 2648   3812   0 624 0 ---- ALULA
+40402 2702   4217   1000 0 0 ---- TABAH
+40404 2630   4377   648 0 0 ---- GASSIM AIRPORT
+40405 2630   4377   648 648 0 ---- GASSIM
+40410 2567   3930   754 0 0 ---- KHAYBER
+40415 2643   4980   12 0 0 ---- DAMMAM (KING FAHD INT. AIRPORT)
+40416 2627   5017   17 26 0 ---- DHAHRAN
+40417 2645   4982   12 22 0 T-T- K.F.I.A. (KING FAHAD INT. AIRPORT) DAMMAM
+40418 2683   4997   1 0 0 ---- AL-QATIF-GOSP-3
+40419 2640   5013   10 10 0 ---- DAMMAM-A.W.S.
+40420 2530   4948   178 179 0 ---- AL-AHSA
+40421 2530   4965   151 0 0 ---- HAFOOF-A.W.S.
+40422 2640   5018   4 0 0 ---- DAMMAM - MET.
+40430 2455   3970   636 654 0 T-T- AL-MADINAH
+40432 2583   4225   783 0 0 ---- UQLAT AL-SUQ0R
+40433 2537   4362   700 0 0 ---- DUKHNA
+40434 2537   4273   920 0 0 ---- DHARIAH
+40435 2698   4412   923 850 0 ---- AL-DAWADAMI
+40436 2517   4462   732 0 0 ---- SAJER
+40437 2493   4672   614 614 0 T-T- KING KHALED INT. AIRPORT
+40438 2470   4673   620 635 0 ---- RIYADH OBS. (O.A.P.)
+40439 2413   3807   10 8 0 ---- YENBO
+40440 2402   3823   11 0 0 ---- YENBO A.W.S.
+40441 2457   4687   561 0 0 ---- RIYADH I.E.
+40445 2415   4732   439 0 0 ---- AL-KHARJ
+40450 2373   4463   1080 0 0 ---- AL-KHUSARIAH
+41006 2243   4175   971 0 0 ---- MUWAIH
+41008 2272   4217   870 0 0 ---- ZULM
+41010 2233   4673   543 0 0 ---- LAYLA
+41018 2225   4163   1394 0 0 ---- MAHAZAT AL-SAID-1
+41019 2235   4207   1407 0 0 ---- MAHAZAT AL-SAID-2
+41020 2142   3922   10 0 0 ---- JEDDAH I.E.
+41023 2165   3910   2 0 0 ---- JEDDAH MARINE
+41024 2170   3918   17 15 0 T-T- JEDDAH (KING ABDUL AZIZ INT. AIRPORT)
+41030 2143   3977   240 0 0 ---- MAKKAH
+41031 2142   3987   394 0 0 ---- MINA
+41033 2138   3987   300 0 0 ---- MUZDALIFAH
+41035 2133   4027   2089 0 0 ---- AL-HADA
+41036 2148   4055   1453 1478 0 ---- AL-TAIF
+41055 2030   4165   1652 1672 0 ---- AL-BAHA
+41056 1997   4152   2395 0 0 ---- AL-BAHA A.W.S.
+41060 2043   4468   701 0 0 ---- WADI AL-DAWASSER
+41061 2050   4525   622 629 0 ---- WADI AL-DAWASSER AIRPORT
+41080 1912   4108   0 0 0 ---- AL-QUNFUDAH
+41084 1998   4263   1162 1167 0 ---- BISHA
+41100 1830   4235   2869 0 0 ---- AL-SOUDAH
+41106 1823   4247   2489 0 0 ---- ABHA SUB.
+41112 1823   4265   2093 2090 0 T-T- ABHA
+41114 1830   4280   2056 2066 0 ---- KHAMIS MUSHAIT
+41116 1808   4313   2381 0 0 ---- SARAT ABIDAH
+41120 1798   4248   2381 0 0 ---- WADI DILAH
+41128 1762   4442   1212 1214 0 ---- NAJRAN
+41136 1747   4710   725 720 0 ---- SHARORAH
+41140 1688   4258   7 6 0 ---- GIZAN
+41141 1690   4253   5 6 0 ---- GIZAN
+43400 980    8007   0 15 0 ---- KANKASANTURAI
+43404 965    8002   3 3 0 ---- JAFFNA
+43410 927    8082   2 2 0 ---- MULLAITTIVU
+43413 898    7992   3 3 0 ---- MANNAR
+43415 875    8050   98 98 0 ---- VAVUNIYA
+43418 858    8125   79 79 0 PPP- TRINCOMALEE
+43421 833    8042   93 93 0 ---- ANURADHAPURA
+43422 812    8047   117 117 0 ---- MAHA ILLUPPALLAMA
+43424 803    7983   2 2 0 PPP- PUTTALAM
+43436 772    8170   8 8 0 ---- BATTICALOA
+43441 747    8037   116 116 0 ---- KURUNEGALA
+43450 717    7988   8 8 0 ---- KATUNAYAKE
+43466 690    7987   7 7 0 PPT- COLOMBO
+43467 682    7988   5 5 0 ---- RATMALANA
+43473 697    8077   1895 1894 2 ---- NUWARA ELIYA
+43475 688    8183   8 4 0 ---- POTTUVIL
+43486 668    8040   86 88 0 ---- RATNAPURA
+43495 603    8022   13 13 0 ---- GALLE
+43497 612    8113   16 18 0 PPP- HAMBANTOTA
+38598 4027   6982   347 0 0 ---- KAJRAKKUMSKOE VODOHRANILISHCHE
+38599 4022   6973   427 0 0 ---- KHUDJANT
+38609 4013   7060   873 0 0 ---- ISFARA
+38705 3950   6760   1015 0 0 ---- PENDZHIKENT
+38713 3990   6898   1004 0 2 ---- ISTARVSHAN
+38715 3957   6858   3143 0 0 ---- SHAHRISTANSKIJ PEREVAL
+38718 3910   6838   2204 0 0 ---- ISKANDERKUL'
+38719 3908   6887   3373 0 0 ---- ANZOBSKIJ PEREVAL
+38725 3943   6967   2234 0 0 ---- MADRUSHKAT
+38734 3945   7020   2561 0 0 ---- DEHAVZ
+38744 3928   7187   1198 0 0 ---- LAHSH
+38836 3858   6873   800 0 0 T-T- DUSHANBE
+38838 3805   6835   563 0 0 ---- ISAMBAJ
+38844 3825   6923   2239 0 0 ---- SANGLOK
+38846 3837   6998   1468 0 0 ---- KHOVALING
+38847 3807   6928   669 0 0 ---- DANGARA
+38851 3900   7030   1316 0 0 ---- RASHT
+38856 3847   7088   1288 0 0 ---- DARVAZ
+38869 3817   7263   3276 0 0 ---- IRHT
+38875 3902   7355   3930 0 0 ---- KARAKUL'
+38878 3817   7397   3576 0 0 ---- MURGAB
+38932 3795   6857   752 0 0 ---- GANDZHINA
+38933 3782   6878   427 0 0 ---- KURGAN-TYUBE
+38937 3732   6813   380 0 0 ---- SHAARTUZ
+38943 3792   6978   659 0 0 ---- KULYAB
+38944 3748   6938   447 0 0 ---- PARKHAR
+38947 3723   6908   327 0 0 ---- PYANDZH
+38951 3795   7155   1981 0 0 ---- RUSHAN
+38954 3750   7150   2075 0 2 T-T- KHOROG
+38957 3672   7160   2523 0 0 ---- ISHKASHIM
+48300 1928   9797   274 265 0 ---- MAE HONG SON
+48302 1992   9903   1530 1529 0 ---- DOI ANG KHANG
+48303 1995   9987   393 390 0 ---- CHIANG RAI
+48304 1987   9977   401 397 0 ---- CHAING RAI AGROMET
+48307 1940   10087  334 333 0 ---- THUNG CHANG
+48310 1918   9988   398 396 0 ---- PHAYAO
+48315 1912   10080  236 234 0 ---- THA WANG PHA
+48324 1763   9923   192 190 0 ---- THOEN
+48325 1817   9793   213 211 0 ---- MAE SARIANG
+48327 1877   9897   314 313 0 TPPP CHIANG MAI
+48328 1827   9950   243 242 0 ---- LAMPANG
+48329 1855   9903   298 296 0 ---- LAMPHUN
+48330 1812   10015  162 161 0 ---- PHRAE
+48331 1877   10075  201 200 0 ---- NAN
+48333 1885   10073  265 264 0 ---- NAN AGROMET
+48334 1832   9930   319 315 0 ---- LAMPANG AGROMET
+48350 1740   10172  263 260 0 ---- LOEI AGROMET
+48351 1762   10008  64 63 0 ---- UTTARADIT
+48352 1785   10275  175 173 0 ---- NONG KHAI
+48353 1745   10172  254 252 0 ---- LOEI
+48354 1737   10280  178 177 0 PPPP UDON THANI
+48355 1712   10405  192 190 0 ---- SAKON NAKHON AGROMET
+48356 1715   10413  172 171 0 ---- SAKON NAKHON
+48357 1742   10478  147 145 0 ---- NAKHON PHANOM
+48358 1743   10478  153 153 0 ---- NAKHON PHANOM AGROMET
+48360 1722   10242  228 226 0 ---- NONGBUALAMPHU
+48372 1710   9980   50 48 0 ---- SUKHOTHAI
+48373 1715   9985   54 53 0 ---- SI SAMRONG AGROMET
+48374 1677   10123  144 142 0 ---- LOM SAK
+48375 1670   9853   197 195 0 ---- MAE SOT
+48376 1687   9913   126 124 0 ---- TAK
+48377 1723   9900   144 143 0 ---- BHUMIBOL DAM
+48378 1678   10027  45 44 0 PPPP PHITSANULOK
+48379 1643   10115  116 114 0 ---- PHETCHABUN
+48380 1648   9952   81 80 0 ---- KAM PHAENG PHET
+48381 1645   10278  193 186 0 ---- KHON KAEN
+48382 1623   10307  154 152 0 ---- KOSUM PHISAI
+48383 1653   10472  139 138 0 ---- MUKDAHAN
+48384 1633   10282  166 166 0 ---- THAPHRA AGROMET
+48385 1602   9885   460 454 0 ---- UMPHANG
+48386 1643   10028  37 35 0 ---- PICHIT AGROMET
+48387 1675   9893   867 863 0 ---- DOI MU SOE AGROMET
+48390 1632   10358  140 138 0 ---- KAMALASAI
+48400 1567   10012  35 34 0 ---- NAKHON SAWAN
+48401 1533   10052  93 91 0 ---- TAKFA AGROMET
+48402 1515   10018  16 15 0 ---- CHAI NAT AGROMET
+48403 1580   10202  184 182 0 ---- CHAIYAPHUM
+48404 1607   10360  155 153 0 ---- ROI ET AGROMET
+48405 1605   10365  142 140 0 ---- ROI ET
+48407 1525   10487  123 122 0 TPPP UBON RATCHATHANI
+48408 1523   10503  130 129 0 ---- UBON RATCHATHANI AGROMET
+48409 1508   10432  129 127 0 ---- SISAKET AGROMET
+48413 1565   10110  69 68 0 ---- WICHIAN BURI
+48415 1453   10072  9 7 0 ---- AYUTTHAYA AGROMET
+48416 1530   10367  129 127 0 ---- THA TUM
+48418 1527   10118  51 49 0 ---- BUA CHUM
+48419 1410   10062  7 6 0 ---- PATHUMTHANI AGROMET
+48420 1352   10075  3 1 0 ---- SAMUTPRAKAN AGROMET
+48421 1473   9863   99 97 0 ---- THONG PHA PHUM
+48425 1447   10013  8 7 0 ---- SUPHAN BURI
+48426 1478   10062  11 9 0 ---- LOP BURI
+48427 1430   9985   6 6 0 ---- U THONG AGROMET
+48429 1368   10077  6 0 0 ---- SUVARNABHUMI INTERNATIONAL AIRPORT
+48430 1405   10137  6 4 0 ---- PRACHIN BURI
+48431 1497   10208  187 186 0 PPPP NAKHON RATCHASIMA
+48432 1487   10348  147 145 0 ---- SURIN
+48433 1488   10345  144 142 0 ---- SURIN AGROMET
+48434 1473   10217  193 190 0 ---- CHOK CHAI
+48435 1463   10132  387 386 0 ---- PAK CHONG AGROMET
+48436 1462   10272  181 179 0 ---- NANG RONG
+48437 1523   10325  184 182 0 ---- BURIRAM
+48439 1398   10170  12 10 0 ---- KABIN BURI
+48440 1378   10202  43 40 0 ---- SRAKAEW
+48450 1402   9953   28 27 0 ---- KANCHANA BURI
+48451 1400   9997   9 7 0 ---- NAKHONPATHOM AGROMET
+48453 1365   10060  2 0 0 TPPP BANGNA AGROMET
+48454 1370   10057  6 2 0 ---- BANGKOK PORT
+48455 1372   10055  4 3 0 ---- BANGKOK METROPOLIS
+48456 1392   10060  12 4 0 ---- DON MUANG
+48457 1337   10058  14 13 0 ---- BANGKOK PILOT
+48458 1357   10145  70 69 0 ---- CHACHOENGSAO AGROMET
+48459 1335   10097  2 0 0 ---- CHON BURI
+48460 1315   10080  27 24 0 ---- KO SICHANG
+48461 1292   10085  60 58 0 ---- PHATTHAYA
+48462 1368   10250  49 47 0 ---- ARANYAPRATHET
+48463 1307   10087  81 80 0 ---- LAEM CHABANG
+48464 1348   9978   9 9 0 ---- RATCHA BURI AGROMET
+48465 1298   10005  3 2 0 ---- PHETCHABURI
+48474 1258   9973   107 106 0 ---- NONG PHLUB AGROMET
+48475 1257   9995   6 4 0 ---- HUA HIN
+48477 1268   10098  21 16 0 PPPP SATTAHIP
+48478 1263   10133  4 2 0 ---- RAYONG
+48479 1273   10113  45 43 0 ---- HUAI PONG AGROMET
+48480 1260   10210  3 2 0 PPPP CHANTHA BURI
+48481 1250   10217  24 22 0 ---- PHLIU AGROMET
+48500 1183   9980   5 4 0 PPPP PRACHUAP KHIRIKHAN
+48501 1177   10287  4 2 0 ---- KHLONG YAI
+48517 1048   9918   5 4 0 ---- CHUMPHON
+48520 1032   9908   13 13 0 ---- SAWI AGROMET
+48532 998    9862   7 7 0 ---- RANONG
+48550 943    10003  6 4 0 ---- KO SAMUI
+48551 913    9915   6 5 0 PPPP SURAT THANI
+48552 853    9993   5 4 0 ---- NAKHONSI THAMMARAT
+48554 835    10005  3 1 0 ---- NAKHONSI THAMMARAT AGROMET
+48555 913    9963   36 34 0 ---- SURAT THANI AGROMET
+48556 857    9925   14 12 0 ---- PHRASANG
+48557 842    9950   30 28 0 ---- CHAWANG
+48560 757    10015  4 2 0 ---- PHATTHALUNG AGROMET
+48561 868    9825   7 5 0 ---- TAKUA PA
+48563 810    9897   31 29 0 ---- KRABI
+48564 788    9840   3 1 0 ---- PHUKET
+48565 813    9830   8 5 0 TPPP PHUKET AIRPORT
+48566 753    9905   7 2 0 ---- KO LANTA
+48567 752    9962   15 13 0 ---- TRANG
+48568 717    10060  6 4 0 TPPP SONGKHLA
+48569 693    10038  34 27 0 ---- HAT YAI AIRPORT
+48570 665    10007  5 4 0 ---- SATUN
+48571 700    10050  9 6 0 ---- KHO HONG AGROMET
+48574 678    10040  25 24 0 ---- SA DAO
+48580 678    10113  6 4 0 ---- PATTANI
+48581 650    10127  36 30 0 ---- YALA AGROMET
+48583 642    10182  5 3 0 ---- NARATHIWAT
+38261 4205   5937   74 0 0 ---- AK-DEPE
+38267 4230   5913   71 0 0 ---- KENEURGENCH
+38367 4105   5292   -22 0 0 ---- KARABOGAZKEL
+38383 4158   5872   62 0 0 ---- SHASENEM
+38388 4103   5777   62 0 0 ---- EKEZHE
+38392 4175   5982   82 0 0 ---- DASHKHOVUZ
+38392 4183   5998   87 0 0 ---- DASHKHOVUZ
+38507 4005   5300   82 0 0 ---- TURKMENBASHI
+38507 4003   5298   90 0 0 T--- TURKMENBASHI
+38511 4078   5533   115 0 0 ---- CHAGYL
+38527 4007   5738   47 0 0 ---- DAVALY
+38529 4018   5848   84 0 0 ---- DEVERZE
+38545 4047   6228   142 0 0 ---- DARGANATA
+38634 3950   5433   -8 0 0 ---- NEBITDAG
+38637 3910   5310   -26 0 0 ---- OGRYDA
+38641 3968   5557   -9 0 0 ---- JASGA
+38647 3925   5552   31 0 0 ---- GAZANDZHYK
+38656 3932   5860   87 0 0 ---- ERBENT
+38665 3958   5995   108 0 0 ---- AKMOLLA
+38684 3932   6320   182 0 0 ---- DJACHEV
+38687 3908   6360   190 0 0 ---- CHARDZHEV
+38750 3747   5363   -22 0 0 ---- ESENGYLY
+38755 3853   5430   -1 0 0 ---- BYGDAILI
+38756 3862   5518   206 0 0 ---- BEKIBENT
+38759 3762   5478   29 0 0 ---- GYZYLETREK
+38763 3898   5628   92 0 0 ---- GYZYLARBAT
+38767 3843   5630   312 0 0 ---- GARRYQALA
+38773 3875   5847   84 0 0 ---- BOKYRDAK
+38774 3843   5742   159 0 0 ---- BAKHERDEN
+38791 3868   6120   147 0 0 ---- CHESHME
+38799 3808   6280   185 0 0 ---- UCHADZHY
+38804 3857   6318   185 0 0 ---- REPATEK
+38806 3847   6437   212 0 0 ---- BYRDALYK
+38880 3792   5813   312 0 0 ---- ASHGABAT KESHI
+38880 3797   5838   304 0 0 T-T- ASHGABAT
+38885 3735   5963   308 0 0 ---- KAKA
+38886 3738   6052   186 0 0 ---- TEDZHEN
+38895 3760   6218   240 0 0 ---- BAJRAMALY
+38899 3730   6242   259 0 0 ---- ELOTEN
+38911 3783   6520   240 0 0 ---- KERKI
+38915 3752   6602   265 0 0 ---- CARSANGA
+38974 3653   6122   275 0 0 ---- SARAGT
+38987 3528   6235   625 0 0 ---- GYSHGY
+38989 3595   6292   349 0 0 T--T TAGTABAZAR
+38998 3627   6370   787 0 0 ---- LEKKER
+41184 2562   5593   31 31 0 ---- RAS AL KHAIMAH INTERNATIONAL AIRPORT
+41194 2525   5533   5 8 0 ---- DUBAI INTERNATIONAL AIRPORT
+41196 2533   5552   33 35 0 ---- SHARJAH INTER. AIRPORT
+41198 2510   5633   28 0 0 ---- FUJAIRAH
+41216 2443   5447   3 5 0 ---- ABU DHABI BATEEN AIRPORT
+41217 2443   5465   27 16 0 TPTP ABU DHABI INTER. AIRPORT
+41218 2427   5560   262 265 0 ---- AL AIN INTERNATIONAL AIRPORT
+41226 2363   5363   130 0 0 ---- MEDINA ZAYED
+38023 4485   5633   125 126 0 ---- KARAKAPALKIJA
+38141 4388   5788   127 128 0 ---- JASLYK
+38146 4378   5903   54 55 0 ---- MUJNAK
+38149 4308   5893   60 64 0 ---- KUNGRAD
+38178 4315   6433   236 233 0 ---- AK-BAJTAL
+38262 4295   5980   93 94 0 ---- CHIMBAJ
+38264 4248   5962   75 76 0 ---- NUKUS
+38339 4217   7088   2162 2150 2 ---- OLGAING
+38396 4157   6063   100 101 0 ---- URGENCH
+38403 4175   6247   97 97 0 ---- BUZAUBAJ
+38413 4173   6462   236 237 0 ---- TAMDY
+38427 4105   6528   199 200 0 ---- MASHIKUDUK
+38457 4133   6930   477 488 0 T-T- TASHKENT
+38462 4190   7037   1255 1258 2 ---- PSKEM
+38475 4073   7232   475 476 0 ---- ANDIZAN
+38551 4085   6333   206 208 0 ---- DZANGELDY
+38553 4068   6448   217 219 0 ---- AYAKAGITMA
+38565 4055   6568   484 485 0 ---- NURATA
+38567 4013   6535   340 341 0 ---- NAVOI
+38579 4012   6783   343 345 0 ---- DZIZAK
+38583 4082   6868   263 264 0 ---- SYR-DAR'JA
+38589 4028   6883   316 317 0 ---- JANGIER
+38606 4055   7095   399 401 0 T-T- KOKAND
+38611 4100   7158   474 473 0 ---- NAMANGAN
+38618 4038   7175   577 584 0 ---- FERGANA
+38683 3972   6462   224 226 0 ---- BUHARA
+38685 3950   6385   196 195 0 ---- KARAKUL
+38696 3963   6695   725 724 0 -PP- SAMARKAND
+38812 3875   6572   375 375 0 ---- KARSHI
+38815 3862   6627   523 523 0 ---- GUZAR
+38816 3865   6693   2132 2131 2 ---- MINCHUKUR
+38818 3825   6683   1599 1601 2 ---- AKRABAT
+38829 3827   6790   516 520 0 ---- DENAU
+38921 3767   6702   409 410 0 ---- SHIRABAD
+38927 3728   6732   311 310 0 ---- TERMEZ
+48803 2250   10397  97 104 0 ---- LAO CAI
+48806 2133   10390  676 675 0 ---- SON LA
+48808 2267   10625  243 244 0 ---- CAO BANG
+48820 2103   10580  6 5 0 T-T- HA NOI
+48823 2043   10615  3 2 0 ---- NAM DINH
+48826 2080   10663  116 112 0 ---- PHU LIEN
+48830 2183   10677  263 258 0 ---- LANG SON
+48839 2013   10772  56 56 0 T--- BACH LONG VI
+48840 1975   10578  5 5 0 ---- THANH HOA
+48845 1867   10568  6 5 0 ---- VINH
+48848 1748   10660  8 6 0 ---- DONG HOI
+48852 1643   10758  9 10 0 ---- HUE
+48855 1607   10835  7 7 0 T--- DA NANG
+48860 1655   11162  6 0 0 ---- HOANG SA (PATTLE)
+48870 1377   10922  6 4 0 ---- QUY NHON
+48877 1222   10922  4 3 0 ---- NHA TRANG
+48887 1093   10810  5 8 0 P--- PHAN THIET
+48892 1142   11433  5 0 0 ---- SONG TU TAY (SOUTH WEST CAY)
+48900 1082   10667  5 5 0 T--- TAN SON HOA
+48914 918    10515  2 1 0 P--- CA MAU
+48916 928    10347  0 24 0 ---- THO CHU
+48917 1022   10397  4 3 0 ---- PHU QUOC
+48918 868    10660  9 6 0 ---- CON SON
+48919 802    11062  19 22 0 ---- HUYEN TRAN
+48920 865    11192  3 3 0 ---- TRUONG SA
+41363 1732   4460   1154 0 0 ---- AL-BOUQE
+41367 1737   4995   610 0 0 ---- THAMUD
+41372 1703   4377   1890 0 0 ---- SAADA
+41391 1583   4358   1760 0 0 ---- HAJJAH
+41393 1615   4478   1070 0 0 ---- AL-JOUF
+41396 1598   4895   700 0 0 ---- SEIYOUN
+41398 1608   5208   42 0 0 ---- AL-GHAIDAH
+41399 1577   4402   0 0 0 ---- AMRAN
+41404 1552   4418   2190 2206 2 --T- SANA'A
+41407 1543   4533   1070 0 2 ---- MARIB
+41408 1550   4350   0 0 0 ---- AL-MAHWIT
+41416 1537   4258   15 0 0 ---- KAMARAN
+41431 1475   4298   115 0 0 ---- HODEIDAH
+41434 1458   4442   2425 0 0 ---- DHAMAR
+41437 1452   4685   1067 0 0 ---- ATAQ
+41438 1413   4437   0 0 0 ---- AL-SADDAH
+41443 1458   4925   25 25 0 --P- RIYAN
+41451 1342   4568   1800 0 0 ---- MUKEIRAS
+41452 1400   4433   1920 0 0 ---- IBB
+41453 1410   4543   2027 0 0 ---- AL-BAYDHA
+41466 1368   4413   1385 1402 2 ---- TAIZ
+41477 1325   4328   3 4 0 ---- MOKHA
+41480 1283   4503   3 3 0 T-P- ADEN
+41482 1278   4517   0 0 0 ---- SAHAREEG
+41494 1263   5390   47 0 0 ---- SOCOTRA
+87007 -2210  -6560  3459 3462 3 ---- LA QUIACA OBSERVATORIO
+87016 -2315  -6432  357 357 0 ---- ORAN AERO
+87022 -2265  -6382  450 450 0 ---- TARTAGAL AERO
+87046 -2438  -6508  905 921 2 ---- JUJUY AERO
+87047 -2485  -6548  1221 1238 2 --TP SALTA AERO
+87065 -2417  -6290  205 0 0 ---- RIVADAVIA
+87078 -2470  -6058  130 130 0 ---- LAS LOMITAS
+87097 -2573  -5447  270 270 0 ---- IGUAZU AERO
+87121 -2685  -6510  450 440 0 ---- TUCUMAN AERO
+87129 -2777  -6430  199 198 0 ---- SANTIAGO DEL ESTERO AERO.
+87148 -2673  -6048  93 91 0 ---- PRESIDENCIA ROQUE SAENZ PENA AERO
+87155 -2745  -5905  52 53 0 --TP RESISTENCIA AERO
+87162 -2620  -5823  60 59 0 ---- FORMOSA AERO
+87163 -2625  -5365  815 815 0 ---- B.DE IRIGOYEN AERO
+87166 -2745  -5877  62 62 0 ---- CORRIENTES AERO.
+87173 -2758  -5667  72 0 0 ---- ITUZAINGO
+87178 -2737  -5597  125 131 0 ---- POSADAS AERO.
+87187 -2748  -5513  303 0 0 ---- OBERA
+87211 -2807  -6757  1201 0 2 ---- TINOGASTA
+87213 -2923  -6743  945 0 2 ---- CHILECITO AERO
+87217 -2938  -6682  429 438 0 ---- LA RIOJA AERO.
+87222 -2860  -6577  454 454 0 ---- CATAMARCA AERO.
+87244 -2990  -6368  341 0 0 ---- VILLA DE MARIA DEL RIO SECO
+87257 -2988  -6195  88 87 0 ---- CERES AERO
+87270 -2918  -5970  53 48 0 ---- RECONQUISTA AERO
+87286 -2978  -5798  73 80 0 ---- CURUZU CUATIA AERO
+87289 -2968  -5715  70 69 0 ---- PASO DE LOS LIBRES AERO
+87305 -3025  -6875  1175 0 2 ---- JACHAL
+87311 -3140  -6842  598 597 0 ---- SAN JUAN AERO
+87320 -3037  -6628  461 467 0 ---- CHAMICAL AERO
+87322 -3133  -6660  658 0 0 ---- CHEPES
+87328 -3195  -6513  569 561 0 ---- VILLA DOLORES AERO
+87344 -3132  -6422  474 484 0 --TP CORDOBA AERO
+87345 -3140  -6418  426 0 0 ---- CORDOBA OBSERVATORIO
+87347 -3145  -6427  502 0 0 ---- ESCUELA DE AVICION MILITAR
+87349 -3167  -6388  338 0 0 ---- PILAR OBSERVATORIO
+87371 -3170  -6082  18 17 0 ---- SAUCE VIEJO AERO
+87374 -3178  -6048  78 74 0 ---- PARANA AERO
+87385 -3185  -5908  43 40 0 ---- VILLAGUAY AERO
+87393 -3027  -5765  54 53 0 ---- MONTE CASEROS AERO
+87395 -3130  -5802  38 35 0 ---- CONCORDIA AERO
+87405 -3260  -6933  1891 0 2 ---- USPALLATA
+87412 -3377  -6903  940 0 2 ---- SAN CARLOS
+87416 -3308  -6842  653 0 0 ---- SAN MARTIN
+87418 -3283  -6878  704 705 0 --T- MENDOZA AERO
+87420 -3288  -6885  827 0 2 ---- MENDOZA OBSERVATORIO
+87436 -3327  -6635  713 710 0 ---- SAN LUIS AERO
+87444 -3238  -6518  620 615 0 ---- SANTA ROSA DE CONLARA
+87448 -3373  -6538  486 485 0 ---- VILLA REYNOLDS AERO
+87453 -3312  -6423  421 420 0 ---- RIO CUARTO AERO
+87467 -3270  -6215  114 110 0 ---- MARCOS JUAREZ AERO
+87468 -3367  -6197  113 112 0 ---- VENADO TUERTO AERO
+87470 -3250  -6167  96 0 0 ---- EL TREBOL
+87480 -3292  -6078  25 25 0 ---- ROSARIO AERO
+87497 -3300  -5862  21 23 0 ---- GUALEGUAYCHU AERO
+87506 -3550  -6958  1425 1426 2 ---- MALARGUE AERO
+87509 -3458  -6840  748 745 0 ---- SAN RAFAEL AERO
+87532 -3570  -6375  145 139 0 ---- GENERAL PICO AERO
+87534 -3413  -6337  137 136 0 ---- LABOULAYE AERO
+87544 -3587  -6190  87 87 0 ---- PEHUAJO AERO
+87548 -3455  -6092  81 82 0 ---- JUNIN AERO
+87550 -3545  -6088  76 0 0 ---- NUEVE DE JULIO
+87553 -3445  -5858  10 3 0 ---- SAN FERNANDO AERO
+87563 -3607  -5910  38 38 0 ---- LAS FLORES
+87568 -3448  -5862  4 5 0 ---- DON TORCUATO AERO
+87571 -3460  -5860  12 18 0 ---- EL PALOMAR AERO
+87576 -3482  -5853  20 20 0 T-T- EZEIZA AERO
+87582 -3457  -5842  6 6 0 ---- AEROPARQUE BS. AS. AERO
+87585 -3458  -5848  25 0 0 ---- BUENOS AIRES OBSERVATORIO
+87593 -3497  -5790  19 21 0 ---- LA PLATA AERO
+87596 -3537  -5728  22 16 0 ---- PUNTA INDIO B.A.
+87623 -3657  -6427  191 190 0 --T- SANTA ROSA AERO
+87637 -3743  -6188  233 0 0 ---- CORONEL SUAREZ AERO
+87640 -3620  -6107  94 94 0 ---- BOLIVAR AERO
+87641 -3683  -5988  147 146 0 ---- AZUL AERO
+87643 -3688  -6022  166 165 0 ---- OLAVARRIA AERO
+87645 -3723  -5925  175 175 0 ---- TANDIL AERO
+87648 -3635  -5773  9 10 0 ---- DOLORES AERO
+87649 -3772  -5978  207 0 0 ---- BENITO JUAREZ
+87658 -3655  -5668  4 3 0 ---- SANTA TERESITA AERO
+87679 -3760  -6238  304 304 0 ---- PIGUE AERO
+87688 -3833  -6025  115 0 0 ---- TRES ARROYOS
+87692 -3793  -5758  21 18 0 ---- MAR DEL PLATA AERO
+87715 -3895  -6813  271 270 0 --T- NEUQUEN AERO
+87736 -3902  -6408  79 0 0 ---- RIO COLORADO
+87750 -3873  -6217  83 75 0 ---- BAHIA BLANCA AERO
+87765 -4115  -7117  840 845 0 ---- BARILOCHE AERO
+87774 -4125  -6873  888 0 2 ---- MAQUINCHAO
+87784 -4078  -6510  20 20 0 ---- SAN ANTONIO OESTE AERO
+87791 -4085  -6302  7 6 0 ---- VIEDMA AERO
+87800 -4197  -7152  337 337 0 ---- EL BOLSON AERO
+87803 -4293  -7115  797 799 0 ---- ESQUEL AERO
+87814 -4382  -6888  460 0 0 ---- PASO DE INDIOS
+87823 -4273  -6507  136 136 0 ---- P.MADRYN AERO
+87828 -4320  -6527  43 39 0 ---- TRELEW AERO
+87852 -4652  -7102  429 429 0 ---- PERITO MORENO AERO
+87860 -4578  -6750  46 58 0 --T- COMODORO RIVADAVIA AERO
+87880 -4878  -7017  357 358 0 ---- GOBERNADOR GREGORES AERO
+87896 -4773  -6592  80 81 0 ---- PUERTO DESEADO AERO
+87904 -5027  -7205  204 199 0 ---- EL CALAFATE AERO
+87909 -4932  -6775  62 58 0 ---- SAN JULIAN AERO
+87925 -5162  -6928  19 20 0 ---- RIO GALLEGOS AERO
+87934 -5380  -6775  22 13 0 ---- RIO GRANDE B.A.
+87936 -5470  -6725  105 0 0 ---- TOLHUIN
+87938 -5480  -6832  57 28 0 ---- USHUAIA AERO
+85033 -1082  -6535  0 130 0 ---- GUAYARAMERIN
+85041 -1103  -6878  0 235 0 ---- COBIJA
+85043 -1100  -6612  0 141 0 ---- RIBERALTA
+85104 -1307  -6482  0 140 0 ---- SAN JOAQUIN
+85109 -1330  -6470  0 140 0 ---- SAN RAMON
+85114 -1333  -6412  0 140 0 ---- MAGDALENA
+85123 -1377  -6543  0 144 0 ---- SANTA ANA
+85139 -1417  -6690  0 0 0 ---- SANTA ROSA
+85140 -1432  -6738  0 140 0 ---- REYES
+85141 -1447  -6757  0 204 0 ---- RURRENABAQUE
+85151 -1473  -6850  0 1415 2 ---- APOLO
+85152 -1487  -6687  0 194 0 ---- SAN BORJA
+85153 -1492  -6560  0 160 0 ---- SAN IGNACIO DE MOXOS
+85154 -1482  -6492  0 155 0 ---- TRINIDAD
+85175 -1572  -6310  0 247 0 ---- ASCENCION DE GUARAYOS
+85195 -1627  -6247  0 534 0 ---- SAN JAVIER
+85196 -1615  -6202  0 497 0 ---- CONCEPCION
+85201 -1652  -6818  4038 4058 0 --T- LA PAZ/ALTO
+85207 -1638  -6097  0 413 0 ---- SAN IGNACIO DE VELASCO
+85210 -1633  -5838  0 124 0 ---- SAN MATIAS
+85223 -1742  -6618  0 2548 3 ---- COCHABAMBA
+85230 -1758  -6960  0 4054 0 ---- CHARANA
+85242 -1797  -6707  0 3072 0 ---- ORURO
+85244 -1763  -6313  0 373 0 ---- VIRU-VIRU
+85245 -1780  -6318  0 418 0 ---- SANTA CRUZ/EL TROMPILLO
+85247 -1780  -6073  0 284 0 ---- SAN JOSE DE CHIQUITOS
+85264 -1847  -6410  0 1998 0 ---- VALLEGRANDE
+85268 -1832  -5977  0 276 0 ---- ROBORE
+85283 -1902  -6530  0 2904 3 ---- SUCRE
+85289 -1898  -5782  0 134 0 ---- PUERTO SUAREZ
+85293 -1955  -6573  0 3935 0 ---- POTOSI
+85312 -1978  -6392  0 992 0 ---- MONTEAGUDO
+85315 -2000  -6353  0 798 0 ---- CAMIRI
+85345 -2125  -6345  0 398 0 ---- VILLAMONTES
+85364 -2155  -6470  0 1854 2 ---- TARIJA
+85365 -2195  -6365  0 645 0 ---- YACUIBA
+85394 -2277  -6432  0 381 0 ---- BERMEJO
+81609 380    -5185  20 19 0 ---- OIAPOQUE
+81615 280    -6063  95 94 0 ---- BOA VISTA
+81628 148    -5092  22 21 0 ---- TARTARUGALZINHO
+81637 70     -5142  78 77 0 ---- PORTO GRANDE
+81648 -98    -6292  18 17 0 ---- BARCELOS
+81658 -80    -4850  12 11 0 ---- SOURE
+81660 -62    -4735  22 21 0 ---- SALINOPOLIS
+81680 -140   -4843  25 24 0 ---- BELEM
+81682 -130   -4793  66 65 0 ---- CASTANHAL
+81685 -103   -4677  34 33 0 ---- BRAGANCA
+81687 -165   -4537  42 41 0 ---- TURIACU
+81699 -205   -6002  93 92 0 ---- PRESIDENTE FIGUEIREDO
+81700 -242   -5955  60 59 0 ---- RIO URUBU
+81702 -253   -5775  18 17 0 ---- URUCARA
+81703 -263   -5675  36 35 0 ---- PARINTINS
+81710 -223   -4948  23 22 0 ---- CAMETA
+81711 -258   -4835  39 38 0 ---- TOME-ACU
+81715 -252   -4420  57 56 0 ---- SAO LUIS
+81716 -227   -4362  9 8 0 ---- SANTANA
+81717 -258   -4270  1 0 0 ---- PREGUICAS
+81729 -328   -6062  20 19 0 ---- MANACAPURU
+81730 -312   -5993  68 67 0 ---- MANAUS
+81732 -357   -5912  29 28 0 ---- AUTAZES
+81733 -312   -5847  38 37 0 ---- ITACOATIARA
+81734 -338   -5767  36 35 0 ---- MAUES
+81737 -385   -5420  97 96 0 ---- PLACAS
+81739 -350   -5295  252 251 0 ---- MEDICILANDIA
+81742 -383   -5063  109 108 0 ---- PACAJA
+81743 -382   -4967  149 148 0 ---- TUCURUI
+81745 -300   -4733  102 101 0 ---- PARAGOMINAS
+81749 -373   -4335  92 91 0 ---- CHAPADINHA
+81751 -388   -4225  66 65 0 ---- ESPERANTINA
+81752 -307   -4178  58 57 0 ---- PARNAIBA
+81754 -373   -4033  65 64 0 ---- SOBRAL
+81755 -312   -4008  77 76 0 ---- ACARAU
+81756 -348   -3958  103 102 0 ---- ITAPIPOCA
+81758 -380   -3853  42 41 0 ---- FORTALEZA
+81770 -408   -6313  44 43 0 ---- COARI
+81774 -683   -3830  235 234 0 ---- SAO GONCALO
+81778 -427   -5598  14 13 0 ---- ITAITUBA
+81784 -425   -4992  114 113 0 ---- NOVO REPARTIMENTO
+81786 -478   -4807  222 221 0 ---- RONDON DO PARA
+81788 -432   -4643  176 175 0 ---- BURITICUPU
+81790 -423   -4478  29 28 0 ---- BACABAL
+81792 -482   -4333  77 76 0 ---- CAXIAS
+81794 -427   -4178  162 161 0 ---- PIRIPIRI
+81797 -425   -3892  871 870 0 ---- GUARAMIRANGA
+81798 -478   -3777  13 12 0 ---- JUAGUARUANA
+81820 -517   -4937  117 116 0 ---- MARABA
+81821 -563   -4810  118 117 0 ---- ARAGUATINS
+81822 -555   -4745  127 126 0 ---- IMPERATRIZ
+81823 -580   -4615  231 230 0 ---- GRAJAU
+81825 -550   -4523  154 153 0 ---- BARRA DO CORDA
+81827 -503   -4280  75 74 0 ---- TERESINA
+81828 -590   -4272  288 287 0 ---- SAO PEDRO DO PIAUI
+81829 -533   -4150  287 286 0 ---- CASTELO DO PIAUI
+81830 -518   -4067  292 291 0 ---- CRATEUS
+81831 -517   -3928  219 218 0 ---- QUIXERAMOBIM
+81832 -513   -3835  45 43 0 ---- MORADA NOVA
+81833 -590   -3862  185 184 0 ---- JAGUARIBE
+81834 -507   -3737  37 36 0 ---- MOSSORO
+81835 -562   -3782  151 150 0 ---- APODI
+81836 -510   -3670  5 4 0 ---- MACAU
+81838 -515   -3548  18 17 0 ---- CALCANHAR
+81839 -583   -3520  66 65 0 ---- NATAL
+81846 -843   -4385  271 270 0 ---- ALVORADA DO GURGUEIA
+81847 -812   -4297  309 308 0 ---- CANTO DO BURITI
+81848 -835   -4225  236 235 0 ---- SAO JOAO DO PIAUI
+81860 -607   -5013  720 719 0 ---- SERRA DE CARAJAS
+81863 -665   -4742  181 180 0 ---- ESTREITO
+81866 -603   -4423  180 179 0 ---- COLINAS
+81868 -677   -4302  124 123 0 ---- FLORIANO
+81869 -697   -4213  157 156 0 ---- OEIRAS
+81870 -638   -4173  302 301 0 ---- VALENCA DO PIAUI
+81872 -602   -4027  416 415 0 ---- TAUA
+81873 -638   -3927  234 233 0 ---- IGUATU
+81875 -647   -3708  171 170 0 ---- CAICO
+81876 -622   -3602  238 237 0 ---- SANTA CRUZ
+81877 -697   -3568  576 574 0 ---- AREIA
+81878 -660   -3513  137 136 0 ---- CAMARATUBA
+81888 -725   -6478  65 64 0 ---- LABREA
+81890 -755   -6307  73 72 0 ---- HUMAITA
+81893 -720   -5988  169 168 0 ---- APUI
+81900 -727   -4820  227 226 0 ---- ARAGUAINA
+81901 -733   -4745  193 192 0 ---- CAROLINA
+81903 -745   -4602  255 254 0 ---- BALSAS
+81905 -747   -4433  394 393 0 ---- URUCUI
+81908 -707   -4140  234 233 0 ---- PICOS
+81909 -707   -4035  573 572 0 ---- CAMPOS SALES
+81910 -753   -4002  465 464 0 ---- OURICURI
+81911 -730   -3927  410 409 0 ---- BARBALHA
+81912 -795   -3828  462 461 0 ---- SERRA TALHADA
+81913 -707   -3727  282 249 0 ---- PATOS
+81914 -788   -3712  606 605 0 ---- MONTEIRO
+81915 -748   -3628  437 436 0 ---- CABACEIRAS
+81916 -722   -3590  549 548 0 ---- CAMPNA GRANDE
+81917 -783   -3578  419 418 0 ---- SURUBIM
+81918 -713   -3485  45 44 0 ---- JOAO PESSOA
+81921 -827   -7273  205 204 0 ---- PORTO WALTER
+81922 -895   -7278  231 230 0 ---- MARECHAL THAUMATURGO
+81924 -813   -7033  164 163 0 ---- FEIJO
+81927 -877   -6732  112 111 0 ---- BOCA DO ACRE
+81932 -878   -6383  99 98 0 ---- PORTO VELHO
+81940 -827   -4927  181 180 0 ---- CONCEICAO DO ARAGUAIA
+81941 -897   -4817  190 189 0 ---- PEDRO AFONSO
+81950 -812   -4113  375 374 0 ---- PAULISTANA
+81951 -850   -3930  343 342 0 ---- CABROBO
+81953 -843   -3708  682 680 0 ---- ARCO VERDE
+81954 -850   -3770  449 448 0 ---- IBIMIRIM
+81955 -890   -3648  823 822 0 ---- GARANHUS
+81956 -823   -3598  551 550 0 ---- CARUARU
+81957 -865   -3557  181 180 0 ---- PALMARES
+81958 -805   -3495  11 10 0 ---- RECIFE
+81963 -935   -6993  207 206 0 ---- PARQUE ESTADUAL CHANDLESS
+81965 -995   -6815  221 220 0 ---- RIO BRANCO
+81970 -993   -6295  141 140 0 ---- ARIQUEMES
+81975 -990   -5857  262 261 0 ---- COTRIGUACU
+81976 -955   -5738  221 220 0 ---- APIACAS
+81977 -1007  -5675  295 294 0 ---- ALTA FLORESTA
+81978 -997   -5582  301 300 0 ---- CARLINDA
+81979 -995   -5488  321 320 0 ---- GUARANTA DO NORTE
+81982 -933   -535   169 168 0 ---- SANTANA DO ARAGUAIA
+81985 -910   -4592  282 281 0 ---- ALTO PARNAIBA
+81986 -987   -4533  426 425 0 ---- GILBUES
+81987 -908   -4432  298 297 0 ---- BOM JESUS DO PIAUI
+81988 -928   -4332  524 523 0 ---- CARACOL
+81989 -902   -4270  403 402 0 ---- SAO RAIMUNDO NONATO
+81990 -962   -4207  402 401 0 ---- REMANSO
+81991 -938   -4080  371 370 0 ---- PETROLINA
+81992 -983   -3948  454 453 0 ---- UAUA
+81993 -937   -3822  254 252 0 ---- PAULO AFONSO
+81994 -975   -3743  20 19 0 ---- PAO DE ACUCAR
+81995 -942   -3662  276 275 0 ---- PALMEIRA DOS INDIOS
+81996 -980   -3662  242 241 0 ---- ARAPIRACA
+81997 -928   -3555  20 19 0 ---- SAO LUIS DO QUITUNDE
+81998 -955   -3577  66 64 0 ---- MACEIO
+82017 383    -5183  39 39 0 ---- OIAPOQUE
+82022 283    -6070  140 140 0 --T- BOA VISTA (AERO)
+82024 282    -6065  90 90 0 ---- BOA VISTA
+82026 222    -5593  326 325 0 --T- TIRIOS
+82030 207    -5085  10 10 0 ---- AMAPA
+82042 183    -6113  95 95 0 ---- CARACARAI
+82067 62     -6920  120 120 0 ---- IAUARETE
+82068 60     -6920  105 105 0 ---- IAUARETE (AERO)
+82091 -88    -5260  206 206 0 ---- MONTE DOURADO
+82094 77     -5010  4 3 0 ---- PONTA DO CEU
+82096 52     -5042  3 8 0 ---- CANIVETE
+82098 3      -5105  15 15 0 ---- MACAPA
+82099 5      -5107  17 16 0 --T- MACAPA (AERO)
+82100 -17    -6997  115 115 0 ---- PARI-CACHOEIRA
+82103 7      -6823  105 105 0 ---- TARACUA
+82106 -13    -6708  90 90 0 ---- SAO GABRIEL DA CACHOEIRA
+82107 -12    -6697  79 79 0 --T- SAO GABRIEL DA CACHOEIRA (AERO)
+82113 -98    -6292  40 40 0 ---- BARCELOS
+82141 -72    -4855  11 11 0 ---- SOURE
+82143 -62    -4738  14 25 0 ---- SALINOPOLIS
+82145 -108   -4693  36 36 0 ---- BRAGANCA
+82178 -192   -5552  37 37 0 ---- OBIDOS
+82181 -200   -5408  146 146 0 ---- MONTE ALEGRE
+82184 -173   -5223  16 16 0 ---- PORTO DE MOZ
+82188 -168   -5048  15 15 0 ---- BREVES
+82191 -145   -4847  10 10 0 ---- BELEM
+82193 -138   -4848  16 16 0 T-T- BELEM (AERO)
+82198 -172   -4540  44 44 0 ---- TURIACU
+82212 -253   -6617  56 56 0 ---- FONTE BOA
+82240 -263   -5673  29 29 0 ---- PARINTINS
+82244 -243   -5472  72 72 0 --T- SANTAREM (AERO)
+82246 -263   -5495  176 176 0 ---- BELTERRA
+82263 -225   -4950  24 24 0 ---- CAMETA
+82277 -227   -4362  8 8 0 ---- FAROL SANTANA
+82280 -253   -4430  51 51 0 ---- SAO LUIZ
+82281 -260   -4423  53 53 0 --T- SAO LUIZ (AERO)
+82287 -308   -4178  22 46 0 ---- PARNAIBA
+82288 -292   -4175  5 5 0 ---- PARNAIBA (AERO)
+82294 -288   -4013  16 16 0 ---- ACARAU
+82296 -342   -4228  49 49 0 ---- LUZILANDIA
+82298 -390   -4225  87 87 0 ---- ESPERANTINA
+82303 -347   -6895  94 94 0 ---- S.PAULO DE OLIVENCA
+82317 -337   -6470  47 47 0 ---- TEFE
+82318 -237   -6472  56 56 0 ---- TEFE (AERO)
+82326 -383   -6208  49 48 0 ---- CODAJAS
+82331 -313   -6002  72 72 0 ---- MANAUS
+82332 -315   -5998  84 84 0 T-T- MANAUS (AERO)
+82333 -303   -6005  85 82 0 ---- EDUARDO GOMES (AERO)
+82335 -312   -5847  43 43 0 ---- ITACOATIARA (AERO)
+82336 -313   -5843  40 40 0 ---- ITACOATIARA
+82353 -320   -5220  74 74 0 ---- ALTAMIRA
+82354 -325   -5225  112 112 0 ---- ALTAMIRA (AERO)
+82360 -377   -4972  253 253 0 ---- TUCURUI (AERO)
+82361 -372   -4972  40 40 0 ---- TUCURUI
+82376 -372   -4553  46 46 0 ---- ZE DOCA
+82382 -373   -4335  103 103 0 ---- CHAPADINHA
+82392 -370   -4035  0 83 0 ---- SOBRAL
+82397 -377   -3860  26 26 0 --T- FORTALEZA
+82398 -378   -3853  25 25 0 ---- FORTALEZA (AERO)
+82400 -385   -3242  56 56 0 T-T- FERNANDO DE NORONHA
+82410 -438   -7003  65 65 0 ---- BENJAMIN CONSTANT
+82411 -425   -6993  81 81 0 --T- TABATINGA (AERO)
+82418 -495   -6690  66 66 0 ---- CARAUARI
+82425 -408   -6313  46 46 0 ---- COARI
+82444 -423   -5600  33 33 0 ---- ITAITUBA (AERO)
+82445 -427   -5598  45 45 0 ---- ITAITUBA
+82460 -425   -4478  25 25 0 ---- BACABAL
+82474 -428   -4180  160 160 0 ---- CALDEIRAO
+82476 -487   -4335  103 103 0 ---- CAXIAS
+82480 -427   -4178  161 161 0 ---- PIRIPIRI
+82487 -428   -3900  870 870 2 ---- GUARAMIRANGA
+82493 -478   -3777  12 12 0 ---- JAGUARUANA
+82532 -582   -6128  53 53 0 --T- MANICORE (AERO)
+82533 -582   -6130  50 50 0 ---- MANICORE
+82562 -535   -4915  95 95 0 ---- MARABA
+82563 -537   -4913  109 109 0 ---- MARABA (AERO)
+82564 -553   -4750  123 123 0 ---- IMPERATRIZ
+82565 -553   -4745  131 131 0 ---- IMPERATRIZ (AERO)
+82567 -612   -5000  621 621 0 ---- CARAJAS (AERO)
+82568 -580   -4645  163 163 0 ---- GRAJAU
+82571 -550   -4527  153 153 0 ---- BARRA DO CORDA
+82578 -508   -4282  74 74 0 ---- TERESINA
+82579 -505   -4282  69 69 0 ---- TERESINA (AERO)
+82583 -517   -4067  299 296 0 ---- CRATEUS
+82586 -520   -3930  212 212 0 ---- QUIXERAMOBIM
+82588 -508   -3838  44 44 0 ---- MORADA NOVA
+82590 -565   -3780  65 65 0 ---- APODI
+82592 -518   -3735  23 23 0 ---- MOSSORO (AERO)
+82594 -512   -3663  6 6 0 ---- MACAU
+82595 -517   -3548  14 12 0 ---- CALCANHAR
+82596 -565   -3542  61 61 0 ---- CEARA-MIRIM
+82598 -577   -3520  45 45 0 ---- NATAL
+82599 -592   -3525  52 52 0 T-T- NATAL (AERO)
+82610 -667   -6987  104 104 0 ---- EIRUNEPE
+82640 -627   -5773  98 98 0 ---- JACAREACANGA
+82659 -720   -4820  228 229 0 ---- ARAGUAINA
+82668 -663   -5198  150 150 0 ---- SAO FELIX DO XINGU
+82669 -595   -4212  184 184 0 ---- SAO FELIX DO PIAUI
+82676 -603   -4423  180 180 0 ---- COLINAS
+82678 -677   -4302  127 127 0 --T- FLORIANO
+82683 -600   -4042  339 399 0 ---- TAUA
+82684 -785   -4190  242 242 0 ---- MORRO DOS CAVALOS
+82686 -637   -3930  217 217 0 ---- IGUATU
+82689 -675   -3822  233 233 0 ---- SAO GONCALO
+82690 -647   -3708  170 170 0 ---- SERIDO (CAICO)
+82691 -612   -3682  324 324 0 ---- FLORANIA
+82693 -643   -3658  226 226 0 ---- CRUZETA
+82696 -697   -3568  575 575 0 ---- AREIA
+82704 -763   -7267  170 170 0 ---- CRUZEIRO DO SUL
+82705 -758   -7277  199 199 0 --T- CRUZEIRO DO SUL (AERO)
+82723 -725   -6483  60 60 0 ---- LABREA
+82727 -752   -6300  50 50 0 ---- HUMAITA
+82741 -735   -5752  140 140 0 ---- ALTO TAPAJOS
+82753 -790   -4005  459 460 0 ---- OURICURI
+82764 -732   -4747  183 183 0 ---- CAROLINA (AERO)
+82765 -733   -4747  193 193 0 --T- CAROLINA
+82768 -753   -4603  259 260 0 ---- BALSAS
+82771 -723   -4455  187 190 0 ---- URUCUI
+82777 -700   -4038  583 583 0 ---- CAMPOS SALES
+82780 -707   -4148  208 208 0 ---- PICOS
+82784 -732   -3930  409 409 0 ---- BARBALHA
+82789 -785   -3813  1020 1020 0 ---- TRIUNFO
+82791 -702   -3727  249 249 0 ---- PATOS
+82792 -788   -3707  599 604 0 ---- MONTEIRO
+82795 -722   -3588  548 548 0 ---- CAMPINA GRANDE
+82796 -727   -3588  500 500 0 ---- CAMPINA GRANDE (AERO)
+82797 -783   -3572  418 418 0 ---- SURUBIM
+82798 -710   -3487  7 7 0 ---- JOAO PESSOA
+82800 -712   -3495  65 85 0 ---- JOAO PESSOA (AERO)
+82807 -817   -7077  190 190 0 ---- TARAUACA
+82808 -815   -7077  188 188 0 ---- TARAUACA (AERO)
+82824 -877   -6392  102 102 0 --T- PORTO VELHO (AERO)
+82825 -877   -6392  95 95 0 ---- PORTO VELHO
+82861 -825   -4928  157 157 0 ---- CONCEICAO DO ARAGUAIA
+82862 -833   -4930  194 194 0 ---- CONCEICAO DO ARAGUAIA (AERO)
+82863 -897   -4818  187 187 0 ---- PEDRO AFONSO
+82870 -842   -4372  265 265 0 ---- VALE DO GURGEIA
+82879 -835   -4225  235 235 0 ---- SAO JOAO DO PIAUI
+82882 -813   -4113  375 375 0 ---- PAULISTANA
+82886 -852   -3933  341 341 0 ---- CABROBO
+82890 -842   -3708  681 682 0 ---- ARCOVERDE
+82892 -840   -3677  639 639 0 ---- PESQUEIRA
+82893 -888   -3652  822 823 2 ---- GARANHUNS
+82894 -940   -3825  269 269 0 ---- PAULO AFONSO (AERO)
+82895 -828   -3597  529 529 0 ---- CARUARU
+82899 -807   -3485  19 19 0 ---- RECIFE (AERO)
+82900 -805   -3492  7 7 0 --T- RECIFE
+82915 -997   -6780  160 160 0 ---- RIO BRANCO
+82917 -1000  -6780  143 142 0 T-T- RIO BRANCO (AERO)
+82927 -992   -5827  250 250 0 ---- COTRIGUACU
+82930 -933   -5497  537 537 0 ---- CACHIMBO (AERO)
+82965 -987   -5610  288 288 0 T-T- ALTA FLORESTA (AERO)
+82970 -912   -4595  285 285 0 ---- ALTO PARNAIBA
+82975 -910   -4412  331 331 0 ---- BOM JESUS DO PIAUI
+82976 -928   -4333  523 523 0 ---- CARACOL
+82979 -963   -4210  401 401 0 ---- REMANSO
+82983 -938   -4048  370 370 0 --T- PETROLINA
+82984 -935   -4055  375 375 0 ---- PETROLINA (AERO)
+82986 -940   -3822  253 253 0 ---- PAULO AFONSO
+82989 -928   -3790  605 608 0 ---- AGUA BRANCA
+82990 -975   -3743  19 20 0 ---- PAO DE ACUCAR
+82992 -945   -3670  275 275 0 ---- PALMEIRA DOS INDIOS
+82993 -952   -3578  117 117 0 ---- MACEIO (AERO)
+82994 -967   -3570  65 65 0 ---- MACEIO
+82996 -918   -3543  50 51 0 ---- PORTO DE PEDRAS
+83010 -1102  -6873  260 261 0 ---- BRASILEIA
+83011 -2540  -4923  932 927 0 ---- BACACHERI (AERO)
+83013 -2045  -4140  530 530 0 ---- MUNIZ FREIRE
+83015 -2230  -4538  1276 1276 0 ---- MARIA DA FE
+83016 -1078  -6527  146 146 0 ---- GUAJARA-MIRIM (AERO)
+83032 -2195  -4532  878 879 0 ---- LAMBARI
+83033 -1018  -4830  280 281 0 ---- PALMAS
+83034 -1987  -4087  245 245 0 ---- ITARANA
+83036 -2380  -4540  5 4 0 ---- SAO SEBASTIAO
+83037 -2157  -4325  435 435 0 ---- CORENEL PACHECO
+83048 -2270  -4263  62 62 0 ---- RIO BONITO
+83049 -2235  -4342  507 507 0 ---- AVELAR
+83054 -2298  -4337  3 3 0 ---- JACAREPAGUA (AERO)
+83055 -2245  -4328  0 0 0 ---- PICO COUTO
+83058 -2352  -4712  0 0 0 ---- SAO ROQUE/SAO PAULO
+83063 -1070  -4840  265 261 0 ---- PORTO NACIONAL (AERO)
+83064 -1072  -4858  239 239 0 ---- PORTO NACIONAL
+83065 -1028  -4835  240 236 0 ---- PAMAS (AERO)
+83075 -2343  -4647  735 735 0 ---- GUARULHOS
+83076 -1102  -4452  450 550 0 ---- IBIPETUBA
+83088 -1047  -4018  558 558 0 ---- SENHOR DO BONFIM
+83089 -2292  -4282  4 4 0 ---- MARICA
+83090 -1043  -3930  464 464 0 ---- MONTE SANTO
+83095 -1098  -3707  9 8 0 ---- ARACAJU (AERO)
+83096 -1092  -3705  5 5 0 ---- ARACAJU
+83097 -1020  -3687  19 19 0 ---- PROPRIA
+83103 -2170  -4130  17 17 0 ---- CAMPOS DOS GOITACAZES
+83112 -2178  -4338  911 911 0 ---- JUIZ DE FORA (AERO)
+83114 -2283  -4218  5 6 0 ---- IGUABA GRANDE
+83115 -2293  -4372  3 3 0 ---- SANTA CRUZ (AERO)
+83117 -2307  -4315  75 75 0 ---- ILHA RASA
+83118 -2127  -4375  1115 1115 0 ---- BARBACENA (AERO)
+83179 -1108  -4317  402 402 0 ---- BARRA
+83182 -1130  -4187  747 747 0 ---- IRECE
+83184 -1122  -4122  1005 1005 0 ---- MORRO DO CHAPEU
+83186 -1118  -4047  484 485 0 ---- JACOBINA
+83190 -1163  -3897  359 359 0 ---- SERRINHA
+83192 -1108  -3852  145 145 0 ---- CIPO
+83195 -1112  -3782  208 208 0 ---- ITABAIANINHA
+83208 -1270  -6010  612 612 0 T-T- VILHENA (AERO)
+83214 -1025  -5492  285 285 0 ---- MATUPA
+83220 -1200  -5340  300 300 0 ---- RIO XINGU
+83221 -1218  -3897  230 231 0 ---- FEIRA DE SANTANA
+83222 -1267  -3908  225 227 0 ---- CRUZ DAS ALMAS
+83228 -1205  -4853  250 243 0 ---- PEIXE
+83229 -1302  -3852  51 52 0 --T- SALVADOR
+83231 -1255  -4783  255 275 0 ---- PARANA
+83235 -1240  -4643  604 604 0 ---- TAGUATINGA
+83236 -1215  -4500  439 439 0 ---- BARREIRAS
+83242 -1257  -4138  439 439 0 ---- LENCOIS
+83244 -1255  -4043  249 249 0 ---- ITABERABA
+83248 -1290  -3833  6 6 0 ---- SALVADOR (AERO)
+83249 -1228  -3855  131 132 0 ---- ALAGOINHAS
+83264 -1220  -5650  415 415 0 ---- GLEBA CELESTE
+83267 -1343  -5672  350 350 0 ---- SAO JOSE DO RIO CLARO
+83270 -1350  -5250  430 430 0 ---- CANARANA
+83286 -1347  -4477  587 587 0 ---- CORRENTINA
+83288 -1327  -4342  440 440 0 --T- BOM JESUS DA LAPA
+83289 -1327  -4342  439 441 2 ---- BOM JESUS DA LAPA (AERO)
+83292 -1382  -4130  531 532 0 ---- ITUACU
+83295 -1337  -3995  755 756 0 ---- ITIRUCU
+83302 -1425  -5925  690 690 0 ---- ALCOMAT
+83309 -1440  -5645  286 286 0 ---- DIAMANTINO
+83319 -1470  -5235  316 316 0 ---- NOVA XAVANTINA
+83332 -1410  -4637  825 826 0 ---- POSSE
+83334 -1493  -4625  840 840 0 ---- FORMOSO
+83338 -1497  -4282  569 570 0 ---- ESPINOSA
+83339 -1405  -4262  882 882 2 ---- CAETITE
+83344 -1495  -4088  874 874 0 ---- VITORIA DA CONQUISTA
+83345 -1485  -4085  915 915 0 ---- VICTORIA DA CONQUISTA (AERO)
+83348 -1480  -3907  60 60 0 ---- ILHEUS
+83349 -1482  -3903  4 4 0 ---- ILHEUS (AERO)
+83350 -1522  -4900  651 651 0 ---- GOIANESIA
+83358 -1583  -5438  450 450 0 ---- POXOREO
+83359 -1587  -5238  350 350 0 ---- BARRA DO GARCAS
+83361 -1555  -5612  151 151 0 ---- CUIABA
+83362 -1565  -5610  187 187 0 T-T- CUIABA (AERO)
+83363 -1582  -5542  800 800 0 ---- SAO VICENTE
+83364 -1578  -5607  140 141 0 ---- P. RICARDO REMETTER
+83365 -1563  -5390  555 556 0 ---- SANGRADOURO
+83368 -1590  -5223  345 345 0 ---- ARAGARCAS
+83373 -1593  -4788  1100 1101 0 ---- RONCADOR
+83374 -1592  -5013  512 512 0 ---- GOIAS
+83375 -1605  -4805  0 0 0 ---- GAMA
+83376 -1585  -4897  730 740 0 ---- PIRENOPOLIS
+83377 -1578  -4793  1159 1159 2 ---- BRASILIA
+83378 -1587  -4793  1061 1061 0 T-T- BRASILIA (AERO)
+83379 -1553  -4733  912 912 0 ---- FORMOSA
+83383 -1562  -4642  600 600 0 ---- BURITIS
+83384 -1590  -4605  519 519 0 ---- ARINOS
+83386 -1543  -4437  473 474 0 ---- JANUARIA
+83388 -1508  -4275  603 603 0 ---- MONTE AZUL
+83389 -1505  -4402  452 452 0 ---- MOCAMBINHO
+83393 -1600  -4128  648 649 0 ---- PEDRA AZUL
+83395 -1578  -4330  516 516 0 ---- JANAUBA
+83398 -1567  -3895  5 5 0 ---- CANAVIEIRAS
+83405 -1605  -5768  118 118 0 ---- CACERES
+83408 -1417  -4392  556 440 0 ---- CARINHANHA
+83410 -1645  -5457  284 284 0 ---- RONDONOPOLIS
+83419 -1623  -4897  1137 1136 0 ---- ANAPOLIS (AERO)
+83423 -1667  -4925  741 741 0 ---- GOIANIA
+83424 -1663  -4922  747 747 0 ---- GOIANIA (AERO)
+83428 -1637  -4655  460 460 0 ---- UNAI
+83436 -1670  -4382  668 668 0 ---- MONTES CLAROS (AERO)
+83437 -1672  -4387  646 646 0 ---- MONTES CLAROS
+83441 -1618  -4228  472 471 0 ---- SALINAS
+83442 -1687  -4207  284 284 0 ---- ARACUAI
+83446 -1673  -3955  194 195 0 ---- GUARATINGUETA
+83452 -1678  -4372  650 650 0 ---- JURAMENTO
+83460 -1643  -3907  51 51 0 ---- PORTO SEGURO (AERO)
+83464 -1788  -5172  662 662 0 ---- JATAI
+83467 -1757  -5255  800 800 0 ---- LIMEIROS
+83470 -1792  -5092  727 727 0 ---- RIO VERDE
+83479 -1722  -4687  711 711 0 ---- PARACATU
+83481 -1770  -4617  760 760 0 ---- JOAO PINHEIRO
+83483 -1733  -4495  505 505 0 ---- PIRAPORA
+83485 -1753  -4300  736 736 0 ---- CARBONITA
+83488 -1785  -4285  1097 1097 0 ---- ITAMARANDIBA
+83492 -1785  -4152  356 356 0 ---- TEOFILO OTONI
+83497 -1763  -3925  4 4 0 ---- CARAVELAS (AERO)
+83498 -1773  -3925  3 3 0 --T- CARAVELAS
+83499 -1797  -3870  38 36 0 ---- ABROLHOS
+83512 -1850  -5477  287 287 0 ---- COXIM
+83513 -1898  -5665  89 89 0 ---- NHUMIRIM
+83514 -1868  -4957  620 621 0 ---- CAPINOPOLIS
+83521 -1897  -4952  560 561 0 ---- ITAITUBA
+83522 -1772  -4817  752 772 0 ---- IPAMERI
+83523 -1842  -4922  449 449 0 ---- ITUMNIARA
+83525 -1888  -4822  943 943 0 T-T- UBERLANDIA (AERO)
+83526 -1818  -4795  840 840 2 ---- CATALAO
+83531 -1860  -4652  940 940 0 ---- PATOS DE MINAS
+83533 -1972  -4537  695 695 0 ---- BOM DESPACHO
+83536 -1877  -4443  616 616 0 ---- CURVELO
+83538 -1825  -4360  1297 1297 0 ---- DIAMANTINA
+83543 -1885  -4193  277 190 0 ---- GOVERNADOR VALADARES
+83546 -1835  -4083  300 300 0 ---- ECOPORANGA
+83550 -1870  -3985  25 25 0 ---- SAO MATEUS
+83552 -1908  -5750  130 130 0 ---- CORUMBA
+83554 -1900  -5767  142 141 0 T-T- CORUMBA (AERO)
+83557 -1853  -4027  100 100 0 ---- BOA ESPERANCA
+83565 -1970  -5118  331 331 0 ---- PARANAIBA
+83566 -1962  -4397  828 827 0 T-T- CONFINS (AERO)
+83570 -1922  -4500  691 691 0 ---- POMPEU
+83571 -1990  -4398  927 927 0 ---- CARLOS PRATES
+83574 -2003  -4893  543 543 0 ---- FRUTAL
+83576 -1975  -4797  807 808 0 ---- UBERABA (AERO)
+83577 -1975  -4792  743 743 0 ---- UBERABA
+83579 -1957  -4693  1004 1004 0 ---- ARAXA
+83581 -1988  -4442  753 753 0 ---- FLORESTAL
+83582 -2000  -4598  661 661 0 ---- BAMBUI
+83583 -1985  -4395  785 785 0 ---- BELO HORIZONTE (AERO)
+83586 -1947  -4425  732 732 0 ---- SETE LAGOAS
+83587 -1993  -4393  850 850 0 ---- BELO HORIZONTE
+83588 -1965  -4388  852 852 0 ---- LAGOA SANTA
+83589 -1903  -4343  675 675 0 ---- CONCEICAO DO MATO DENTRO
+83591 -1983  -4312  859 859 0 ---- JOAO MONLEVADE
+83592 -1980  -4215  609 609 0 ---- CARATINGA
+83595 -1948  -4107  83 83 0 ---- AIMORES
+83596 -1940  -4053  85 85 0 ---- MARILANDIA
+83597 -1940  -4007  28 28 0 ---- LINHARES
+83599 -2405  -4627  100 100 0 ---- MOELA
+83609 -2020  -5092  402 402 0 ---- SANTA FE DO SUL
+83611 -2045  -5462  530 530 0 ---- CAMPO GRANDE
+83612 -2047  -5467  567 567 0 T-T- CAMPO GRANDE (AERO)
+83616 -2217  -5142  450 449 0 ---- PRESIDENTE PRUDENTE (AERO)
+83617 -2080  -5157  356 356 0 ---- URUBUPUNGA
+83618 -2078  -5170  313 313 0 ---- TRES LAGOAS
+83623 -2042  -4998  503 503 0 ---- VOTUPORANGA
+83629 -2000  -4777  560 560 0 ---- USINA JUNQUEIRA
+83630 -2055  -4743  1026 1026 2 ---- FRANCA
+83631 -2092  -4712  820 820 0 ---- S. SEBASTIAO DO PARAISO
+83632 -2002  -4405  814 814 0 ---- IBIRITE
+83635 -2017  -4487  788 789 0 ---- DIVINOPOLIS
+83637 -2068  -4482  966 966 0 ---- OLIVEIRA
+83639 -2052  -4187  843 843 0 ---- CAPARAO
+83642 -2075  -4285  690 690 0 ---- VICOSA
+83644 -2183  -4655  1260 1260 0 ---- POCOS DE CALDAS (AERO)
+83646 -2085  -4110  77 77 0 ---- CACHOEIRO ITAPEMIRIM
+83648 -2032  -4033  36 36 0 ---- VITORIA
+83649 -2027  -4028  4 4 0 T-T- VITORIA (AERO)
+83650 -2050  -2932  5 5 0 --T- TRINDADE (ILHA)
+83652 -2113  -4777  549 549 0 ---- RIBEIRAO PRETO (AERO)
+83654 -2172  -5788  98 97 0 ---- PORTO MURTINHO
+83659 -2223  -5482  452 452 0 ---- DOURADOS
+83660 -2305  -4360  16 10 4 ---- MARAMBAIA
+83663 -2288  -4303  2 1 0 ---- PONTA DA ARMACAO
+83668 -2118  -4780  621 621 0 ---- RIBEIRAO PRETO
+83669 -2148  -4755  617 617 0 ---- SAO SIMAO
+83671 -2198  -4733  598 597 2 ---- PIRASSUNUNGA
+83672 -2120  -5043  397 397 0 ---- ARACATUBA
+83674 -2167  -4975  426 426 0 ---- LINS
+83676 -2113  -4897  536 536 0 ---- CATANDUVA
+83681 -2192  -4638  1150 1150 0 ---- CALDAS
+83683 -2167  -4592  873 873 0 ---- MACHADO
+83687 -2123  -4500  919 919 2 ---- LAVRAS
+83688 -2130  -4427  991 991 2 ---- SAO JOAO DEL REI
+83689 -2125  -4377  1171 1126 0 ---- BARBACENA
+83692 -2177  -4335  939 939 0 ---- JUIZ DE FORA
+83695 -2120  -4188  123 123 0 ---- ITAPERUNA
+83696 -2195  -4200  620 620 0 ---- STA MARIA MADALENA
+83698 -2175  -4133  11 11 0 ---- CAMPOS
+83700 -2205  -4105  4 3 0 ---- SAO TOME
+83702 -2253  -5570  650 650 0 ---- PONTA PORA
+83703 -2255  -5570  660 660 0 ---- PONTA PORA (AERO)
+83704 -2232  -5393  369 369 0 ---- IVINHEMA
+83708 -2278  -4520  537 537 2 ---- GUARATINGUETA
+83714 -2273  -4558  1579 1579 0 ---- CAMPOS DO JORDAO
+83716 -2212  -5138  436 436 0 ---- PRESIDENTE PRUDENTE
+83718 -2203  -4237  485 485 0 ---- CORDEIRO
+83719 -2298  -4203  7 7 0 ---- CABO FRIO
+83721 -2300  -4713  661 661 0 ---- CAMPINAS (AERO)
+83722 -2233  -4905  615 615 0 ---- BAURU AERO
+83726 -2202  -4788  856 856 2 ---- SAO CARLOS
+83729 -2290  -4708  669 663 0 ---- CAMPINAS
+83732 -2228  -4655  925 925 0 ---- OURO FINO
+83736 -2210  -4502  900 900 0 ---- SAO LOURENCO
+83737 -2238  -4497  920 920 0 ---- PASSA QUATRO
+83738 -2248  -4447  440 440 0 ---- RESENDE
+83741 -2280  -4368  3 33 0 ---- ECOLOGIA AGRICOLA
+83742 -2240  -4367  437 437 0 ---- VASSOURAS
+83743 -2292  -4317  5 5 0 ---- RIO DE JANEIRO
+83744 -2307  -4315  75 73 0 ---- ILHA RASA
+83745 -2228  -4253  856 856 0 ---- NOVA FRIBURGO
+83746 -2282  -4325  6 6 0 T-T- GALEAO
+83748 -2287  -4338  34 34 0 ---- AFONSOS (AERO)
+83749 -2233  -4175  2 2 0 ---- MACAE (AERO)
+83755 -2290  -4317  3 4 0 ---- RIO DE JANEIRO (AERO)
+83757 -2263  -4390  545 388 0 ---- TREMEMBE (PIRAI)
+83759 -2282  -4210  11 10 0 ---- SAO PEDRO DA ALDEIA (AERO)
+83766 -2338  -5118  566 566 0 ---- LONDRINA
+83767 -2342  -5195  542 542 0 ---- MARINGA
+83768 -2333  -5113  569 569 0 T-T- LONDRINA (AERO)
+83769 -2315  -4997  471 471 0 ---- JACAREZINHO
+83773 -2310  -4892  793 793 0 ---- AVARE
+83774 -2395  -4888  647 647 0 ---- ITAPEVA
+83775 -2408  -5425  230 230 0 ---- GUAIRA
+83778 -2343  -4647  750 751 0 ---- GARULHOS (AERO)
+83779 -2350  -4663  722 722 0 T-T- MARTE (AERO)
+83780 -2362  -4665  803 803 0 ---- SAO PAULO (AERO)
+83781 -2350  -4662  792 792 0 ---- SAO PAULO
+83782 -2393  -4632  14 14 0 ---- SANTOS
+83783 -2405  -5237  616 616 0 ---- CAMPO MOURAO
+83784 -2302  -4557  577 577 0 ---- TAUBATE
+83786 -2345  -4507  8 8 0 ---- UBATUBA
+83787 -2405  -4627  101 100 0 ---- MOELA
+83788 -2302  -4432  2 2 0 ---- ANGRA DOS REIS
+83789 -2292  -4368  63 63 0 ---- SANTA CRUZ
+83801 -2287  -4342  42 42 0 ---- REALENGO
+83805 -2153  -4215  95 95 0 ---- STO ANTONIO DE PADUA
+83807 -2193  -4260  342 342 0 ---- CARMO
+83811 -2440  -5083  808 808 0 ---- IVAI
+83813 -2478  -5000  1009 1009 0 ---- CASTRO
+83814 -2425  -4970  923 923 0 ---- JAGUARIAIVA
+83818 -2393  -4630  3 3 0 ---- SANTOS (AERO)
+83821 -2472  -4755  3 3 0 ---- IGUAPE
+83824 -2327  -4728  616 616 0 ---- ITU
+83825 -2548  -4832  4 4 0 ---- ILHA DO MEL
+83827 -2552  -5458  180 180 0 T-T- FOZ DO IGUACU (AERO)
+83828 -2473  -5373  550 550 0 ---- TOLEDO
+83829 -2322  -4587  646 646 0 ---- SAO JOSE DOS CAMPOS (AERO)
+83831 -2533  -5425  290 290 0 ---- SAO MIGUEL IGUACU
+83836 -2547  -5063  837 837 0 ---- IRATI
+83837 -2510  -5017  868 868 2 ---- PONTA GROSSA
+83840 -2552  -4917  908 908 2 T-T- CURITIBA (AERO)
+83842 -2542  -4927  924 924 0 ---- CURITIBA
+83844 -2552  -4852  5 5 0 ---- PARANAGUA
+83851 -2348  -4743  645 645 0 ---- SOROCABA
+83857 -2397  -4555  546 547 0 ---- TREMEMBE
+83860 -2648  -5198  1090 1090 2 ---- PALMAS
+83864 -2623  -5107  778 778 0 ---- PORTO UNIAO
+83867 -2610  -4980  824 824 0 ---- RIO NEGRO
+83872 -2690  -4922  68 68 0 ---- INDAIAL
+83874 -2625  -4865  72 45 0 ---- SAO FRANCISCO DO SUL
+83881 -2718  -5323  247 247 0 ---- IRAI
+83883 -2712  -5262  679 679 0 ---- CHAPECO
+83887 -2740  -5120  947 947 0 ---- CAMPOS NOVOS
+83891 -2782  -5033  937 937 0 ---- LAGES
+83895 -2730  -4835  20 18 0 ---- ARVOREDO
+83897 -2758  -4857  2 2 0 ---- FLORIANOPOLIS
+83899 -2767  -4855  5 5 0 T-T- FLORIANOPOLIS (AERO)
+83905 -2622  -4878  4 4 0 ---- JOINVILLE
+83907 -2840  -5502  245 245 0 ---- SAO LUIZ GONZAGA
+83912 -2863  -5360  464 472 0 ---- CRUZ ALTA
+83914 -2825  -5240  684 684 0 ---- PASSO FUNDO
+83916 -2842  -5158  806 835 0 ---- LAGOA VERMELHA
+83918 -2855  -5087  955 955 0 ---- VACARIA
+83919 -2867  -5043  1048 1048 2 ---- BOM JESUS
+83920 -2828  -4992  1402 1402 0 ---- SAO JOAQUIM
+83923 -2852  -4932  48 49 0 ---- URUSSANGA
+83924 -2848  -4880  31 31 0 ---- LAGUNA
+83925 -2860  -4882  45 43 0 ---- SANTA MARTA
+83926 -2687  -4863  5 5 0 ---- NAVEGANTES (AERO)
+83927 -2975  -5708  62 62 0 ---- URUGUAIANA
+83928 -2978  -5703  74 74 0 T-T- URUGUAIANA (AERO)
+83931 -2968  -5552  121 121 0 ---- ALEGRETE
+83932 -2865  -5312  394 394 0 ---- IBIRUBA
+83936 -2970  -5370  95 95 0 ---- SANTA MARIA
+83937 -2972  -5370  85 85 0 T-T- SANTA MARIA (AERO)
+83941 -2925  -5152  619 671 0 ---- BENTO GONCALVES
+83942 -2917  -5120  759 759 0 ---- CAXIAS DO SUL
+83946 -2905  -5013  905 905 0 ---- CAMBARA DO SUL
+83948 -2933  -4973  31 31 0 ---- TORRES
+83952 -2993  -5113  9 8 0 ---- CANOAS
+83953 -3088  -5553  231 234 0 ---- SANTANA DO LIVRAMENTO
+83954 -2987  -5138  43 44 0 ---- TRIUNFO
+83961 -2968  -5105  25 26 0 ---- CAMPO BOM
+83964 -3053  -5252  428 428 0 ---- ENCRUZILHADA DO SUL
+83967 -3002  -5122  47 47 0 ---- PORTO ALEGRE
+83970 -3125  -5090  5 4 0 ---- MOSTARDAS
+83971 -3000  -5118  3 3 0 T-T- PORTO ALEGRE (AERO)
+83972 -2945  -5180  63 65 0 ---- TEUTONIA
+83980 -3133  -5410  242 242 0 ---- BAGE
+83981 -3135  -5412  180 180 0 ---- BAGE (AERO)
+83984 -3172  -5232  18 18 0 ---- PELOTAS (AERO)
+83985 -3178  -5242  13 13 0 ---- PELOTAS
+83995 -3202  -5208  2 2 0 ---- RIO GRANDE
+83997 -3352  -5335  24 24 0 ---- ST.VITORIA DO PALMAR
+83998 -3375  -5337  13 11 0 ---- CHUI
+86606 -1065  -5157  238 237 0 ---- CONFRESA
+86607 -1018  -4830  281 280 0 ---- PALMAS
+86609 -1072  -4365  503 502 0 ---- BURITIRAMA
+86610 -1045  -4120  638 637 0 ---- DELFINO
+86611 -1043  -4013  549 548 0 ---- SENHOR DO BONFIM
+86612 -1098  -3962  316 315 0 ---- QUEIMADAS
+86613 -1053  -3898  433 432 0 ---- EUCLIDES DA CUNHA
+86614 -1073  -3810  363 362 0 ---- POCO VERDE
+86615 -1038  -3773  309 308 0 ---- CARIRA
+86616 -1095  -5705  6 4 0 ---- ARACAJU
+86618 -1047  -3647  11 10 0 ---- BREJO GRANDE
+86619 -1012  -3628  75 74 0 ---- CORURIPE
+86620 -1102  -6873  218 217 0 ---- EPITACIOLANDIA
+86622 -1143  -6143  211 210 0 ---- CACOAL
+86624 -1137  -5877  375 374 0 ---- JUINA
+86625 -1127  -5752  261 260 0 ---- JUARA
+86626 -1197  -5555  372 371 0 ---- SINOP
+86628 -1162  -5072  219 218 0 ---- SAO FELIX DO ARAGUAIA
+86629 -1188  -4960  221 220 0 ---- FORMOSO DO ARAGUAIA
+86630 -1173  -4903  288 287 0 ---- GURUPI
+86632 -1158  -4683  733 732 0 ---- DIANOPOLIS
+86633 -1102  -4452  451 450 0 ---- SANTA RITA DE CASSIA
+86634 -1108  -4313  404 403 0 ---- BARRA
+86635 -1132  -4185  756 755 0 ---- IRECE
+86636 -1120  -4045  454 453 0 ---- JACOBINA
+86637 -1165  -3902  340 339 0 ---- SERRINHA
+86638 -1127  -3778  209 208 0 ---- ITABAIANINHA
+86639 -1180  -3760  15 14 0 ---- CONDE
+86642 -1273  -6015  591 590 0 ---- VILHENA
+86643 -1252  -5822  432 431 0 ---- NOVO MUNDO
+86645 -1253  -5570  381 380 0 ---- SORRISO
+86647 -1262  -5222  383 382 0 ---- QUERENCIA
+86649 -1202  -4853  243 242 0 ---- PEIXE
+86650 -1260  -4798  276 275 0 ---- PARANA
+86651 -1215  -4582  755 754 0 ---- LUIS EDUARDO MAGALHAES
+86652 -1215  -4500  471 470 0 ---- BARREIRAS
+86653 -1218  -4320  431 430 0 ---- IBOTIRAMA
+86654 -1255  -4138  440 439 0 ---- LENCOIS
+86655 -1212  -4035  381 380 0 ---- MACAJUBA
+86656 -1252  -4028  251 249 0 ---- ITABERABA
+86657 -1267  -3915  227 225 0 ---- CRUZ DAS ALMAS
+86658 -1218  -3897  232 231 0 ---- FEIRA DE SANTANA
+86659 -1275  -3817  12 10 0 ---- AREMBEPE
+86661 -1370  -5975  592 591 0 ---- COMODORO
+86662 -1378  -5783  571 570 0 ---- CAMPO NOVO DOS PARECIS
+86663 -1303  -5708  354 353 0 ---- NOVA MARINGA
+86664 -1345  -5667  351 350 0 ---- SAO JOSE DO RIO CLARO
+86665 -1340  -5475  519 518 0 ---- NOVA UBIRATA
+86666 -1318  -5325  380 379 0 ---- GAUCHA DO NORTE
+86670 -1323  -4688  1254 1253 0 ---- MONTE ALEGRE DE GOIAS
+86671 -1332  -4462  550 549 0 ---- CORRENTINA
+86672 -1327  -4342  441 440 0 ---- BOM JESUS DA LAPA
+86673 -1315  -4177  1291 1290 0 ---- PIATA
+86674 -1352  -4012  757 755 0 ---- ITIRUCU
+86675 -1300  -3962  408 407 0 ---- AMARGOSA
+86676 -1333  -3912  106 105 0 ---- VALENCA
+86677 -1390  -3897  11 10 0 ---- MARAU
+86678 -1300  -3850  52 51 0 ---- SALVADOR
+86682 -1465  -5742  323 321 0 ---- TANGARA DA SERRA
+86684 -1442  -5403  475 474 0 ---- PARANATINGA
+86685 -1492  -5388  649 648 0 ---- SANTO ANTONIO DO LESTE
+86686 -1400  -5220  433 432 0 ---- AGUA BOA
+86689 -1497  -4953  523 522 0 ---- ITAPACI
+86690 -1447  -4845  584 583 0 ---- NIQUELANDIA
+86691 -1412  -4752  1261 1260 0 ---- ALTO PARAISO DE GOIAS
+86692 -1408  -4635  835 834 0 ---- POSSE
+86693 -1440  -4440  513 512 0 ---- MONTALVANIA
+86694 -1420  -4273  552 551 0 ---- GUANAMBI
+86695 -1490  -4280  571 570 0 ---- ESPINOSA
+86696 -1417  -4167  471 470 0 ---- BRUMADO
+86697 -1488  -4080  874 876 0 ---- VITORIA DA CONQUISTA
+86698 -1417  -3968  126 125 0 ---- IPIAU
+86699 -1465  -3917  79 78 0 ---- ILHEUS
+86701 -1505  -5987  223 222 0 ---- VILA BELA DA S. TRINDADE
+86702 -1525  -5933  257 256 0 ---- PONTES E LACERDA
+86703 -1512  -5812  304 303 0 ---- SALTO DO CEU
+86704 -1532  -5722  146 145 0 ---- PORTO ESTRELA
+86705 -1562  -5610  152 151 0 ---- CUIABA
+86707 -1552  -5513  750 749 0 ---- CAMPO VERDE
+86709 -1590  -5223  348 347 0 ---- ARAGARCAS
+86712 -1593  -5013  513 512 0 ---- GOIAS
+86713 -1522  -4898  668 667 0 ---- GOIANESIA
+86714 -1590  -4812  1153 1152 0 ---- FACULDADE DA TERRA
+86715 -1578  -4792  1161 1159 0 ---- BRASILIA
+86716 -1558  -4762  1201 1200 0 ---- AGUAS EMENDADAS
+86718 -1552  -4643  895 894 0 ---- BURITIS
+86719 -1530  -4562  881 880 0 ---- CHAPADA GAUCHA
+86720 -1508  -4400  461 460 0 ---- MOCAMBINHO
+86721 -1572  -4243  854 853 0 ---- RIO PARDO DE MINAS
+86722 -1575  -4145  751 750 0 ---- AGUAS VERMELHAS
+86723 -1523  -4022  270 269 0 ---- ITAPETINGA
+86724 -1527  -3908  83 82 0 ---- UNA
+86728 -1645  -5457  285 284 0 ---- RONDONOPOLIS
+86729 -1633  -5375  527 526 0 ---- GUIRATINGA
+86730 -1697  -5182  738 737 0 ---- CAIPONIA
+86732 -1695  -5042  679 678 0 ---- PARAUNA
+86734 -1663  -4922  771 770 0 ---- GOIANIA
+86735 -1667  -4862  950 949 0 ---- SILVANIA
+86736 -1625  -4795  959 958 0 ---- LUZIANIA
+86737 -1678  -4760  1203 1202 0 ---- CRISTALINA
+86738 -1655  -4687  632 631 0 ---- UNAI
+86739 -1635  -4512  461 460 0 ---- SAO ROMAO
+86740 -1672  -4387  647 646 0 ---- MONTES CLAROS
+86741 -1615  -4230  496 495 0 ---- SALINAS
+86742 -1657  -4148  267 266 0 ---- ITAOBIM
+86743 -1617  -4068  209 208 0 ---- ALMENARA
+86744 -1608  -3920  89 88 0 ---- BELMONTE
+86745 -1638  -3917  86 85 0 ---- PORTO SEGURO
+86748 -1717  -5450  586 585 0 ---- ITIQUIRA
+86750 -1780  -5328  876 875 0 ---- ALTO TAQUARI
+86751 -1757  -5258  707 706 0 ---- MINEIROS
+86752 -1792  -5172  583 582 0 ---- JATAI
+86753 -1778  -5095  783 782 0 ---- RIO VERDE
+86755 -1772  -4910  772 771 0 ---- MORRINHOS
+86756 -1730  -4827  753 752 0 ---- PIRES DO RIO
+86757 -1755  -4718  1001 1000 0 ---- GUARDA-MOR
+86758 -1778  -4612  871 870 0 ---- JOAO PINHEIRO
+86759 -1725  -4483  504 503 0 ---- PIRAPORA
+86761 -1770  -4238  933 932 0 ---- CAPELINHA
+86762 -1788  -4150  476 475 0 ---- TEOFILO OTONI
+86763 -1778  -4025  209 208 0 ---- SERRA DOS AIMORES
+86764 -1773  -3925  4 2 0 ---- CARAVELAS
+86765 -1795  -3868  26 25 0 ---- ABROLHOS
+86767 -1898  -5763  127 126 0 ---- CORUMBA
+86768 -1898  -5662  105 104 0 ---- NHUMIRIM
+86770 -1850  -5473  253 252 0 ---- COXIM
+86772 -1880  -5260  819 818 0 ---- CHAPADAO DO SUL
+86773 -1897  -5062  490 488 0 ---- SAO SIMAO
+86774 -1840  -4918  489 488 0 ---- ITUMBIARA
+86775 -1895  -4952  561 560 0 ---- ITUIUTABA
+86776 -1892  -4825  870 869 0 ---- UBERLANDIA
+86777 -1815  -4792  891 890 0 ---- CATALAO
+86778 -1898  -4698  964 963 0 ---- PATROCINIO
+86779 -1820  -4545  922 921 0 ---- TRES MARIAS
+86780 -1873  -4445  671 670 0 ---- CURVELO
+86781 -1822  -4363  1357 1356 0 ---- DIAMANTINA
+86782 -1878  -4293  861 860 0 ---- GUANHAES
+86783 -1878  -4198  264 263 0 ---- GOVERNADOR VALADARES
+86784 -1877  -4098  271 270 0 ---- MANTENA
+86785 -1868  -4038  155 154 0 ---- NOVA VENECIA
+86786 -1870  -3983  40 39 0 ---- SAO MATEUS
+86789 -1942  -5455  648 647 0 ---- SAO GABRIEL DO OESTE
+86791 -1912  -5172  517 516 0 ---- CASSILANDIA
+86792 -1968  -5117  425 424 0 ---- PARANAIBA
+86793 -1953  -4952  548 547 0 ---- CAPINA VERDE
+86794 -1998  -4815  569 568 0 ---- CONCEICAO DAS ALAGOAS
+86795 -1987  -4743  913 912 0 ---- SACRAMENTO
+86796 -1960  -4693  1021 1020 0 ---- ARAXA
+86797 -1947  -4558  723 722 0 ---- DORES DO INDAIA
+86798 -1988  -4442  743 742 0 ---- FLORESTAL
+86800 -1988  -4397  870 869 0 ---- BELO HORIZONTE - PAMPULHA
+86801 -1958  -4263  334 333 0 ---- TIMOTEO
+86802 -1973  -4213  616 615 0 ---- CARATINGA
+86803 -1950  -4105  194 193 0 ---- AIMORES
+86804 -1998  -4057  989 988 0 ---- SANTA TEREZA
+86805 -1935  -4007  41 40 0 ---- LINHARES
+86807 -2038  -5642  141 140 0 ---- MIRANDA
+86808 -2047  -5578  156 155 0 ---- AQUIDAUANA
+86809 -2097  -5497  465 464 0 ---- SIDROLANDIA
+86810 -2045  -5462  531 530 0 ---- CAMPO GRANDE
+86812 -2042  -5287  339 338 0 ---- AGUA CLARA
+86813 -2078  -5170  314 313 0 ---- TRES LAGOAS
+86814 -2015  -5058  458 457 0 ---- JALES
+86815 -2042  -4995  487 486 0 ---- VOTUPORANGA
+86816 -2055  -4853  534 533 0 ---- BARRETOS
+86817 -2035  -4777  601 600 0 ---- ITUVERAVA
+86818 -2058  -4737  1027 1026 0 ---- FRANCA
+86819 -2073  -4663  785 784 0 ---- PASSOS
+86820 -2045  -4545  879 878 0 ---- FORMIGA
+86821 -2002  -4400  1209 1208 0 ---- IBIRITE (ROLA MOCA)
+86823 -2055  -4375  1062 1061 0 ---- OURO BRANCO
+86824 -2077  -4287  713 712 0 ---- VICOSA
+86825 -2025  -4217  837 836 0 ---- MANHUACU
+86828 -2075  -4148  139 138 0 ---- ALEGRE
+86829 -2063  -4073  36 35 0 ---- ALFREDO CHAVES
+86830 -2030  -4032  10 9 0 ---- VITORIA
+86833 -2170  -5755  86 85 0 ---- PORTO MURTINHO
+86834 -2160  -5517  402 401 0 ---- MARACAJU
+86836 -2177  -5452  330 329 0 ---- RIO BRILHANTE
+86838 -2132  -5092  375 374 0 ---- VALPARAISO
+86839 -2108  -4992  406 405 0 ---- JOSE BONIFACIO
+86840 -2165  -4973  460 459 0 ---- LINS
+86841 -2112  -4883  526 525 0 ---- ARIRANHA
+86842 -2133  -4810  545 544 0 ---- PRADOPOLIS
+86843 -2185  -4880  493 492 0 ---- IBITINGA
+86844 -2177  -4707  731 730 0 ---- CASA BRANCA
+86845 -2197  -4788  864 863 0 ---- SAO CARLOS
+86846 -2192  -4637  1151 1150 0 ---- CALDAS
+86848 -2157  -4540  926 925 0 ---- VARGINHA
+86849 -2110  -4425  992 991 0 ---- SAO JOAO DEL-REI
+86850 -2122  -4377  1156 1155 0 ---- BARBACENA
+86851 -2177  -4335  951 950 0 ---- JUIZ DE FORA
+86852 -2110  -4237  271 270 0 ---- MURIAE
+86853 -2110  -4103  81 80 0 ---- PRESIDENTE KENNEDY
+86854 -2158  -4195  36 35 0 ---- CAMBUCI
+86855 -2170  -4133  26 25 0 ---- CAMPOS
+86857 -2253  -5553  651 650 0 ---- PONTA PORA
+86858 -2218  -5490  470 469 0 ---- DOURADOS
+86859 -2285  -5460  380 379 0 ---- JUTI
+86860 -2230  -5382  374 373 0 ---- IVINHEMA
+86861 -2263  -5288  363 362 0 ---- DIAMANTE DO NORTE
+86862 -2265  -5213  312 311 0 ---- PARANAPOEMA
+86863 -2212  -5140  437 435 0 ---- PRESIDENTE PRUDENTE
+86864 -2237  -5097  351 350 0 ---- RANCHARIA
+86865 -2232  -4907  551 550 0 ---- BAURU
+86866 -2293  -4988  449 448 0 ---- OURINHOS
+86867 -2247  -4855  544 543 0 ---- BARRA BONITA
+86868 -2270  -4745  572 571 0 ---- PIRACICABA
+86869 -2240  -4680  634 633 0 ---- ITAPIRA
+86870 -2285  -4603  661 660 0 ---- MONTE VERDE
+86871 -2230  -4537  1277 1276 0 ---- MARIA DA FE
+86872 -2275  -4560  1581 1580 0 ---- CAMPOS DO JORDAO
+86873 -2238  -4495  1041 1040 0 ---- PASSA QUATRO
+86874 -2245  -4443  453 452 0 ---- RESENDE
+86875 -2235  -4368  358 357 0 ---- VALENCA
+86876 -2245  -4328  1778 1777 0 ---- PICO DO COUTO
+86877 -2258  -4327  34 33 0 ---- XEREM
+86878 -2280  -4368  35 34 0 ---- SEROPEDICA-ECOLOGIA AGRICOLA
+86879 -2285  -4340  46 45 0 ---- RIO DE JANEIRO-VILA MILITAR
+86881 -2290  -4322  15 14 0 ---- MARACANA
+86884 -2298  -4337  4 3 0 ---- RIO DE JANEIRO-JACAREPAGUA
+86887 -2298  -4318  981 980 0 ---- RIO DE JANEIRO-FORTE DE COPACABANA
+86888 -2243  -4298  981 980 0 ---- TERESOPOLIS
+86889 -2232  -4267  1047 1046 0 ---- NOVA FRIBURGO
+86890 -2203  -4105  5 4 0 ---- SAO TOME
+86891 -2237  -4180  33 32 0 ---- MACAE
+86892 -2297  -4202  5 4 0 ---- ARRAIAL DO CABO
+86894 -2300  -5532  432 431 0 ---- AMAMBAI
+86895 -2397  -5502  403 402 0 ---- SETE QUEDAS
+86896 -2343  -5417  337 336 0 ---- ITAQUIRAI
+86897 -2338  -5365  386 385 0 ---- ICARAIMA
+86898 -2335  -5292  382 381 0 ---- CIDADE GAUCHA
+86899 -2340  -5192  543 542 0 ---- MARINGA
+86901 -2340  -5057  669 668 0 ---- NOVA FATIMA
+86902 -2377  -5017  931 930 0 ---- IBAITI
+86903 -2350  -4993  523 522 0 ---- JOAQUIM TAVORA
+86904 -2308  -4893  726 725 0 ---- AVARE
+86905 -2397  -4888  708 707 0 ---- ITAPEVA
+86906 -2385  -4815  645 644 0 ---- SAO MIGUEL ARCANJO
+86907 -2342  -4758  610 609 0 ---- SOROCABA
+86910 -2348  -4662  793 792 0 ---- SAO PAULO-MIRANTE DE SANTANA
+86911 -2303  -4552  572 571 0 ---- TAUBATE
+86912 -2322  -4542  875 874 0 ---- SAO LUIS DO PARAITINGA
+86913 -2322  -4472  5 4 0 ---- PARATI
+86914 -2305  -4360  11 9 0 ---- RIO DE JANEIRO-MARAMBAIA
+86916 -2453  -5402  393 392 0 ---- MARECHAL CANDIDO RONDON
+86917 -2418  -5302  469 468 0 ---- GOIOERE
+86919 -2443  -5195  655 654 0 ---- NOVA TEBAS
+86921 -2478  -4998  1008 1007 0 ---- CASTRO
+86922 -2495  -4840  668 667 0 ---- BARRA DO TURVO
+86923 -2467  -4753  4 3 0 ---- IGUAPE
+86924 -2403  -4625  46 45 0 ---- MOELA
+86925 -2560  -5448  232 231 0 ---- FOZ DO IGUACU
+86926 -2572  -5373  347 346 0 ---- PLANALTO
+86927 -2568  -5308  521 520 0 ---- DOIS VIZINHOS
+86929 -2555  -5108  1261 1260 0 ---- INACIO MARTINS
+86930 -2500  -5085  809 808 0 ---- IVAI
+86933 -2543  -4922  925 923 0 ---- CURITIBA
+86934 -2550  -4880  60 59 0 ---- MORRETES
+86935 -2548  -4832  2 1 0 ---- ILHA DO MEL
+86936 -2628  -5362  811 810 0 ---- DIONISIO CERQUEIRA
+86937 -2677  -5350  666 665 0 ---- SAO MIGUEL DO OESTE
+86938 -2640  -5285  961 960 0 ---- NOVO HORIZONTE
+86939 -2642  -5233  981 980 0 ---- CLEVELANDIA
+86940 -2693  -5238  890 889 0 ---- XANXERE
+86941 -2638  -5135  1019 1018 0 ---- GEN. CARNEIRO
+86942 -2638  -5035  809 808 0 ---- MAJOR VIEIRA
+86943 -2682  -5083  953 952 0 ---- CACADOR
+86944 -2693  -5013  593 592 0 ---- RIO DO CAMPO
+86945 -2623  -4957  870 869 0 ---- RIO NEGRINHO
+86946 -2690  -4927  88 86 0 ---- INDAIAL
+86947 -2607  -4863  3 2 0 ---- ITAPOA
+86948 -2695  -4875  19 18 0 ---- ITAJAI
+86950 -2788  -5447  277 276 0 ---- SANTA ROSA
+86951 -2738  -5342  491 490 0 ---- FREDERICO WESTPHALEN
+86952 -2785  -5378  551 550 0 ---- SANTO AUGUSTO
+86953 -2792  -5332  643 642 0 ---- PALMEIRA DAS MISSOES
+86954 -2765  -5230  766 765 0 ---- ERECHIM
+86955 -2717  -5155  777 776 0 ---- JOACABA
+86956 -2728  -5060  983 982 0 ---- CURITIBANOS
+86957 -2742  -4963  485 484 0 ---- ITUPORANGA
+86958 -2760  -4862  3 1 0 ---- FLORIANOPOLIS-SAO JOSE
+86960 -2863  -5600  84 83 0 ---- SAO BORJA
+86961 -2842  -5495  246 245 0 ---- SAO LUIZ GONZAGA
+86962 -2860  -5367  433 432 0 ---- CRUZ ALTA
+86963 -2822  -5240  685 684 0 ---- PASSO FUNDO
+86964 -2885  -5253  668 667 0 ---- SOLEDADE
+86965 -2822  -5150  843 842 0 ---- LAGOA VERMELHA
+86966 -2850  -5087  987 986 0 ---- VACARIA
+86967 -2875  -5005  1245 1244 0 ---- SAO JOSE DOS AUSENTES
+86968 -2812  -4947  1811 1810 0 ---- URUBICI
+86969 -2827  -4993  1411 1410 0 ---- SAO JOAQUIM
+86970 -2852  -4930  49 48 0 ---- URUSSANGA
+86971 -2892  -4948  13 12 0 ---- ARARANGUA
+86972 -2860  -4880  53 52 0 ---- SANTA MARTA
+86973 -2983  -5707  63 62 0 ---- URUGUAIANA
+86975 -2970  -5552  122 121 0 ---- ALEGRETE
+86976 -2918  -5488  395 394 0 ---- SANTIAGO
+86977 -2970  -5370  96 95 0 ---- SANTA MARIA
+86978 -2987  -5237  112 111 0 ---- RIO PARDO
+86979 -2917  -5153  641 640 0 ---- BENTO GONCALVES
+86980 -2937  -5082  831 830 0 ---- CANELA
+86981 -2935  -4972  6 4 0 ---- TORRES
+86982 -3037  -5643  125 124 0 ---- QUARAI
+86983 -3083  -5560  329 328 0 ---- SANTANA DO LIVRAMENTO
+86984 -3033  -5430  127 126 0 ---- SAO GABRIEL
+86985 -3098  -5480  171 170 0 ---- DOM PEDRITO
+86986 -3053  -5347  451 450 0 ---- CACAPAVA DO SUL
+86988 -3005  -5117  48 46 0 ---- PORTO ALEGRE
+86989 -3080  -5183  109 108 0 ---- CAMAQUA
+86990 -3000  -5013  2 1 0 ---- TRAMANDAI
+86992 -3133  -5400  231 230 0 ---- BAGE
+86993 -3140  -5270  465 464 0 ---- CANGUCU
+86994 -3123  -5090  11 10 0 ---- MOSTARDAS
+86995 -3203  -5210  3 2 0 ---- RIO GRANDE
+86996 -3255  -5337  48 47 0 ---- JAGUARAO
+86998 -3373  -5337  27 26 0 ---- CHUI
+85406 -1835  -7033  0 55 0 ---- ARICA
+85418 -2053  -7017  0 48 0 ---- IQUIQUE
+85432 -2248  -6890  0 2282 0 ---- CALAMA
+85442 -2345  -7043  0 113 0 --T- ANTOFAGASTA
+85467 -2725  -7077  0 210 0 ---- DESIERTO DE ATACAMA
+85469 -2715  -10942 0 172 0 T--- ISLA DE PASCUA
+85488 -2992  -7120  0 142 0 ---- LA SERENA
+85574 -3338  -7078  0 481 0 ---- PUDAHUEL
+85577 -3343  -7067  0 520 0 ---- QUINTA NORMAL
+85585 -3363  -7883  0 29 0 ---- JUAN FERNANDEZ
+85586 -3365  -7160  0 73 0 T-T- SANTO DOMINGO
+85629 -3495  -7122  0 23 0 ---- CURICO
+85672 -3658  -7203  0 156 0 ---- CHILLAN
+85682 -3677  -7305  0 17 0 ---- CONCEPCION
+85743 -3877  -7263  0 92 0 ---- TEMUCO
+85766 -3965  -7208  0 18 0 ---- VALDIVIA
+85782 -4060  -7305  0 61 0 ---- OSORNO
+85799 -4143  -7308  0 84 0 --T- PUERTO MONTT
+85832 -4318  -7183  0 317 0 ---- FUTALEUFU
+85834 -4355  -7482  0 45 0 ---- ISLA HUAFO
+85864 -4558  -7310  0 302 0 ---- COYHAIQUE
+85874 -4590  -7168  0 516 0 ---- BALMACEDA
+85886 -4657  -7168  0 305 0 ---- CHILE CHICO
+85889 -4680  -7563  0 46 0 ---- FARO RAPER
+85892 -4723  -7258  0 182 0 ---- COCHRANE
+85896 -5238  -7512  0 56 0 ---- ISLOTES EVANGELISTAS
+85930 -5240  -7510  52 0 0 ---- FARO EVANGELISTA
+85934 -5300  -7083  0 38 0 --T- PUNTA ARENAS
+85968 -5492  -6760  0 26 0 ---- PUERTO WILLIAMS
+85972 -5647  -6872  0 11 0 ---- ISLA DIEGO RAMIREZ
+80009 1113   -7423  14 4 0 ---- SANTA MARTA/SIMON BOLIVAR
+80022 1045   -7552  12 1 0 ---- CARTAGENA/RAFAEL NUNEZ
+80028 1088   -7478  30 14 0 ---- BARRANQUILLA/ERNESTO CORTISSOZ
+80035 1153   -7293  0 4 0 --T- RIOHACHA/ALMIRANTE PADILLA
+80036 1043   -7325  0 138 0 ---- VALLEDUPAR/ALFONSO LOPEZ
+80044 933    -7528  86 81 0 ---- COROZAL/LAS BRUJAS
+80048 927    -7482  0 18 0 ---- MAGANGUE/BARACOA
+80062 812    -7673  5 1 0 ---- TURBO/GONZALO MEJIA
+80063 882    -7585  26 20 0 ---- MONTERIA/LOS GARZONES
+80074 907    -7398  0 34 0 ---- EL BANCO/LAS FLORES
+80077 832    -7337  0 1435 0 ---- OCANA/AGUAS CLARAS
+80084 782    -7670  0 20 0 ---- APARTADO/LOS CEDROS
+80089 700    -7472  0 0 0 ---- OTU *
+80091 702    -7380  134 126 0 ---- BARRANCABERMEJA/YARIGUIES
+80094 710    -7320  1189 1189 0 ---- BUCARAMANGA/PALONEGRO
+80097 793    -7252  317 250 0 ---- CUCUTA/CAMILO DAZA
+80099 707    -7073  128 128 0 ---- ARAUCA/SANTIAGO PEREZ
+80110 622    -7560  1499 1490 1 ---- MEDELLIN/OLAYA HERRERA
+80112 613    -7543  2142 2140 0 ---- RIONEGRO/J.M.CORDOVA
+80132 645    -7175  0 350 0 ---- TAME/TAME
+80139 617    -6750  55 55 0 ---- PUERTO CARRENO/A.GUAUQUEA
+80143 508    -7670  0 72 0 ---- CONDOTO/MANDINGA
+80144 572    -7662  53 53 0 ---- QUIBDO/EL CARANO
+80149 503    -7547  0 2080 0 ---- MANIZALES/LA NUBIA
+80175 543    -7165  0 217 0 ---- TRINIDAD/TRINIDAD
+80210 482    -7573  1342 1342 1 ---- PEREIRA/MATECANA
+80211 450    -7572  1219 1204 1 ---- ARMENIA/EL EDEN
+80214 443    -7515  928 928 0 ---- IBAGUE/PERALES
+80219 428    -7480  293 286 0 ---- GIRARDOT/SANTIAGO VILLA
+80222 470    -7415  2546 2547 1 T-T- BOGOTA/ELDORADO
+80234 417    -7362  431 423 0 ---- VILLAVICENCIO/VANGUARDIA
+80241 455    -7092  167 171 0 --T- LAS GAVIOTAS
+80252 385    -7697  15 14 0 ---- BUENAVENTURA
+80259 355    -7638  969 961 1 ---- CALI/ALFONSO BONILLA ARAGON
+80300 258    -7790  0 54 0 ---- GUAPI
+80308 247    -7660  0 0 0 ---- POPAYAN/MACHANGARA *
+80315 297    -7530  443 439 0 ---- NEIVA/BENITO SALAS
+80318 215    -7480  0 300 0 ---- SAN VICENTE DEL CAGUAN.
+80322 257    -7263  155 0 0 ---- SAN JOSE DEL GUAVIARE
+80336 182    -7875  6 3 0 ---- TUMACO/LA FLORIDA
+80337 185    -7877  0 0 0 ---- TUMACO *
+80342 142    -7727  0 0 0 ---- PASTO/ANTONIO NARINO
+80346 187    -7605  0 1320 0 ---- PITALITO
+80354 160    -7553  0 244 0 ---- FLORENCIA/CAPITOLIO
+80361 112    -7008  0 0 0 ---- MITU *
+80370 82     -7763  2691 2691 1 ---- IPIALES/SAN LUIS
+80372 50     -7650  0 254 0 ---- PUERTO ASIS
+80385 -20    -7477  0 147 0 ---- PUERTO LEGUIZAMO
+80398 -417   -6995  84 84 0 --T- LETICIA/VASQUEZ COBO
+84001 -45    -9025  0 63 4 ---- BALTRA AEROPUERTO (GALAPAGOS)
+84008 -90    -8960  6 8 4 --T- SAN CRISTOBAL RADIOSONDA (GALAPAGOS)
+84010 -90    -8962  0 18 4 ---- SAN CRISTOBAL AEROPUERTO (GALAPAGOS)
+84018 97     -7962  0 10 4 ---- ESMERALDAS (TACHINA) AEROPUERTO
+84027 80     -7770  0 2941 3 ---- TULCAN AEROPUERTO
+84036 60     -7782  0 2860 3 ---- SAN GABRIEL
+84043 33     -7813  0 2227 3 ---- IBARRA AEROPUERTO
+84045 25     -7873  0 3185 3 ---- INGUINCHO
+84050 2      -7937  0 360 4 ---- LA CONCORDIA
+84056 3      -7823  0 2790 3 ---- TOMALON
+84063 8      -7687  0 299 4 ---- NUEVA LOJA AEROPUERTO
+84069 -23    -7920  0 522 9 ---- SANTO DOMINGO AEROPUERTO
+84071 -13    -7848  0 2805 3 ---- QUITO AEROPUERTO
+84072 -17    -7848  0 2812 3 ---- INAQUITO
+84076 -22    -7837  0 2480 3 ---- LA TOLA
+84088 -37    -7855  0 3058 3 ---- IZOBAMBA
+84099 -45    -7698  0 254 4 ---- EL COCA AEROPUERTO
+84101 -60    -8040  0 3 4 ---- SAN VICENTE  AEROPUERTO
+84105 -47    -7933  0 260 4 ---- PUERTO ILA
+84117 -93    -8067  0 15 4 ---- MANTA AEROPUERTO
+84123 -90    -7860  0 2805 3 ---- LATACUNGA AEROPUERTO
+84132 -92    -7542  0 205 4 ---- NUEVO ROCAFUERTE
+84135 -103   -8045  0 60 4 ---- PORTOVIEJO
+84137 -103   -8047  0 40 4 ---- PORTOVIEJO AEROPUERTO
+84140 -110   -7945  0 120 4 ---- PICHILINGUE
+84143 -102   -7858  0 2628 3 ---- RUMIPAMBA
+84147 -120   -7857  0 2591 3 ---- AMBATO AEROPUERTO
+84149 -98    -7782  0 520 9 ---- TENA AEROPUERTO
+84160 -140   -7858  0 2940 3 ---- QUERO CHACA
+84163 -150   -7805  0 1056 2 ---- SHELL MERA AEROPUERTO
+84176 -165   -7865  0 2787 3 ---- RIOBAMBA AEROPUERTO
+84179 -150   -7793  0 960 9 ---- PUYO
+84200 -220   -8098  0 6 4 ---- SALINAS AEROPUERTO
+84202 -210   -7958  0 13 4 ---- MILAGRO
+84203 -215   -7988  0 6 4 ---- GUAYAQUIL AEROPUERTO
+84204 -220   -7988  0 6 4 ---- GUAYAQUIL INAMHI
+84217 -228   -7812  0 1043 2 ---- MACAS AEROPUERTO
+84226 -255   -7893  0 3083 3 ---- CANAR
+84239 -288   -7898  0 2532 3 ---- CUENCA AEROPUERTO
+84252 -343   -7998  0 7 4 ---- SANTA ROSA AEROPUERTO
+84265 -398   -7937  0 1237 2 ---- TOMO CATAMAYO AEROPUERTO
+84270 -403   -7920  0 2130 3 ---- LOJA LA ARGELIA
+81401 548    -5402  5 5 0 ---- SAINT-LAURENT
+81403 520    -5273  17 12 0 ---- KOUROU CSG
+81405 482    -5235  9 4 0 T-T- ROCHAMBEAU
+81406 517    -5268  9 0 1 ---- CAYENNE (CTBT)
+81408 388    -5180  7 6 0 ---- SAINT GEORGES
+81415 363    -5402  107 106 0 ---- MARIPASOULA
+81001 680    -5815  2 1 0 ---- GEORGETOWN
+81002 650    -5825  30 28 0 ---- TIMEHRI/CHEDDI JAGAN INTERNATIONAL
+81005 588    -6050  495 494 0 ---- KAMARANG
+81006 337    -5980  82 82 0 ---- LETHEM
+81010 557    -5778  29 28 0 ---- EBINI
+81058 625    -5730  1 1 0 ---- NEW AMSTERDAM
+81080 518    -5948  439 438 0 ---- KAIETEUR FALLS
+81100 820    -5978  50 50 0 ---- MABARUMA
+88878 -5132  -5960  16 0 0 ---- PEBBLE ISLAND
+88883 -5190  -6092  17 0 0 ---- WEDDELL ISLAND
+88889 -5182  -5843  74 74 0 T-T- MOUNT PLEASANT AIRPORT
+88897 -5243  -5908  15 0 0 ---- SEA LION ISLAND
+88900 -5400  -3805  2 2 0 ---- BIRD ISLAND, SOUTH GEORGIA
+88903 -5428  -3648  3 0 0 ---- GRYTVIKEN,  SOUTH GEORGIA
+88981 -5628  -2758  113 104 0 ---- ZAVODOVSKI IS.
+88986 -5945  -2732  268 78 0 ---- SOUTH THULE IS.
+86011 -1953  -5937  143 0 0 ---- BASE A. GRAL ADRIAN JARA
+86033 -2022  -5817  82 0 0 ---- BAHIA NEGRA
+86065 -2255  -6155  206 0 0 ---- PELAYO PRATS GILL
+86068 -2202  -6062  167 0 0 ---- MARISCAL ESTIGARRIBIA
+86086 -2228  -5793  78 0 0 ---- PUERTO CASADO
+86097 -2360  -5583  563 0 1 ---- PEDRO JUAN CABALLERO
+86128 -2350  -5878  98 0 0 ---- POZO COLORADO
+86134 -2343  -5742  98 0 0 ---- CONCEPCION
+86170 -2475  -5883  89 0 0 ---- GRAL. BRUGUEZ
+86185 -2408  -5708  81 0 0 ---- SAN PEDRO
+86192 -2467  -5645  183 0 0 ---- SAN ESTANISLAO
+86210 -2403  -5435  297 0 0 ---- SALTO DEL GUAIRA
+86218 -2527  -5763  83 0 0 ---- AEROPUERTO SILVIO PETTIROSSI, LUQUE
+86221 -2563  -5713  116 0 0 ---- PARAGUARI
+86233 -2575  -5643  263 0 0 ---- VILLARRICA
+86234 -2548  -5638  159 0 0 ---- CORONEL OVIEDO
+86246 -2545  -5483  247 0 0 ---- AEROPUERTO INT. GUARANI
+86255 -2688  -5832  58 0 0 ---- PILAR
+86260 -2667  -5713  131 0 0 ---- SAN JUAN BAUTISTA
+86268 -2618  -5635  142 0 0 ---- CAAZAPA
+86285 -2683  -5533  263 0 0 ---- CAPITAN MEZA
+86294 -2720  -5578  228 0 0 ---- CAPITAN MIRANDA
+86297 -2730  -5590  90 0 0 ---- ENCARNACION
+84370 -355   -8038  27 25 0 ---- TUMBES
+84377 -378   -7330  126 125 0 ---- IQUITOS
+84378 -373   -7325  117 0 0 --T- MORONA
+84390 -457   -8125  90 85 0 ---- TALARA
+84401 -520   -8060  55 49 0 ---- PIURA
+84410 -558   -7877  0 755 0 ---- JAEN
+84416 -518   -8060  52 0 0 --T- PIURA GRUP7
+84425 -588   -7612  184 179 0 ---- YURIMAGUAS
+84440 -607   -7715  789 792 0 ---- RIOJA
+84444 -620   -7785  2540 2435 6 ---- CHACHAPOYAS
+84452 -678   -7982  30 29 0 ---- CHICLAYO
+84455 -650   -7637  282 281 0 ---- TARAPOTO
+84472 -713   -7848  2622 2620 7 ---- CAJAMARCA
+84474 -717   -7672  363 350 0 ---- JUANJUI
+84501 -808   -7910  30 26 0 ---- TRUJILLO
+84515 -837   -7457  149 148 0 ---- PUCALLPA
+84531 -913   -7852  27 20 0 ---- CHIMBOTE
+84534 -928   -7600  665 664 0 ---- TINGO MARIA
+84542 -935   -7760  2760 2759 7 ---- ANTA/HUARAZ
+84564 -987   -7620  1860 1859 6 ---- HUANUCO
+84580 -1133  -7455  685 0 0 ---- MAZAMARI
+84593 -1072  -7377  275 274 0 ---- ATALAYA
+84605 -1177  -7547  3325 3324 0 ---- JAUJA
+84628 -1202  -7712  13 12 0 --T- LIMA/CALLAO
+84629 -1215  -7700  80 0 0 T-T- LAS PALMAS
+84658 -1260  -6922  201 200 0 ---- PUERTO MALDONADO
+84659 -1263  -6923  200 0 0 --T- PUERTO MALDONADO BAMAL
+84673 -1315  -7420  2741 2740 7 ---- AYACUCHO
+84686 -1353  -7193  3249 3248 7 ---- CUZCO
+84688 -1370  -7335  3445 3444 0 ---- ANDAHUALAYLAS
+84691 -1373  -7622  7 6 0 ---- PISCO
+84720 -1485  -7495  567 567 0 ---- NAZCA
+84735 -1547  -7015  3827 3826 8 ---- JULIACA
+84752 -1633  -7157  2539 2539 7 ---- AREQUIPA
+84773 -1768  -7135  9 9 0 ---- ILO
+84782 -1805  -7027  469 468 0 ---- TACNA
+81200 582    -5518  7 0 0 ---- ZORG EN HOOP
+81202 595    -5703  2 0 0 PPPP NICKERIE
+81209 435    -5442  52 0 0 --PP STOELMANSEILAND
+81225 545    -5520  15 0 0 PPPP ZANDERIJ
+81250 378    -5615  323 0 0 --PP TAFELBERG
+81251 203    -5612  265 0 0 --PP SIPALIWINI
+81253 337    -5733  165 0 0 --PP COEROENI
+81260 440    -5722  80 0 0 ---- KABALEBO
+86315 -3027  -5758  54 53 0 ---- BELLA UNION
+86330 -3038  -5650  121 120 0 ---- ARTIGAS
+86350 -3088  -5553  242 241 0 ---- RIVERA
+86360 -3143  -5797  42 41 0 ---- SALTO
+86370 -3170  -5598  134 134 0 ---- TACUAREMBO
+86430 -3233  -5803  0 61 0 ---- PAYSANDU
+86440 -3235  -5418  102 100 0 ---- MELO
+86450 -3268  -5763  81 80 0 ---- YOUNG
+86460 -3280  -5652  76 75 0 ---- PASO DE LOS TOROS
+86490 -3325  -5807  17 17 0 ---- MERCEDES
+86500 -3322  -5438  47 46 0 ---- TREINTA Y TRES
+86530 -3335  -5650  93 92 0 ---- DURAZNO
+86545 -3407  -5623  68 0 0 ---- FLORIDA
+86560 -3445  -5777  20 0 0 ---- COLONIA
+86565 -3448  -5430  19 18 0 ---- ROCHA
+86575 -3478  -5625  50 50 0 ---- MELILLA
+86580 -3483  -5600  33 32 0 ---- CARRASCO
+86585 -3485  -5620  17 16 0 ---- PRADO
+86586 -3485  -5508  34 0 0 ---- LAGUNA DEL SAUCE
+80403 1142   -6968  17 16 0 --PP CORO
+80405 1180   -6618  3 3 0 ---- LA ORCHILA
+80407 1057   -7173  65 66 0 --PP MARACAIBO-LA CHINITA
+80410 1007   -6932  614 613 0 --PP BARQUISIMETO
+80412 1050   -6800  2 2 0 ---- PTO. CABELLO
+80413 1025   -6765  437 436 0 --T- MARACAY - B.A. SUCRE
+80415 1060   -6698  48 43 0 --PP CARACAS/MAIQUETIA AEROP. INTL. SIMON BOLIVAR
+80416 1050   -6688  835 835 2 ---- CARACAS/LA CARLOTA
+80419 1012   -6468  7 7 0 --PP BARCELONA
+80420 1045   -6418  4 2 0 --P- CUMANA
+80421 1092   -6397  19 24 0 --PP PORLAMAR (AEROPUERTO INT. DEL CARIBE)
+80422 1067   -6325  0 10 0 --T- CARUPANO, SUCRE
+80423 1058   -6232  14 13 0 ---- GUIRIA
+80425 982    -7093  28 27 0 --PP MENE GRANDE
+80426 935    -7062  582 582 0 --PP VALERA
+80427 955    -6923  225 226 0 ---- ACARIGUA
+80428 902    -6973  163 163 0 ---- GUANARE
+80431 992    -6733  429 429 0 ---- SAN JUAN DE LOS MORROS
+80432 942    -6692  161 160 0 ---- CARRIZAL
+80434 922    -6602  0 125 0 ---- VALLE DE LA PASCUA
+80435 975    -6318  66 65 0 --PP MATURIN
+80437 863    -7165  103 0 0 ---- EL VIGIA
+80438 860    -7118  1498 1479 2 ---- MERIDA
+80440 862    -7022  204 203 0 ---- BARINAS
+80442 893    -6742  101 100 0 ---- CALABOZO
+80444 815    -6355  48 43 0 --T- CIUDAD BOLIVAR
+80447 785    -7245  378 377 0 --T- SAN ANTONIO DEL TACHIRA
+80448 723    -7080  131 130 0 --PP GUASDUALITO
+80450 790    -6742  48 47 0 --T- SAN FERNANDO DE APURE
+80453 730    -6145  181 180 0 --PP TUMEREMO
+80457 560    -6750  74 73 0 --PP PUERTO AYACUCHO
+80462 460    -6112  907 907 2 --T- SANTA ELENA DE UAIREN
+80472 1017   -6793  431 430 0 ---- VALENCIA
+80475 758    -7207  327 327 0 ---- STO. DOMINGO
+80476 1052   -7165  26 26 0 --T- LA CANADA
+80478 902    -6262  30 30 0 ---- TEMBLADOR
+80479 1030   -6823  0 1000 0 ---- PALMICHAL
+78846 1820   -6305  29 0 0 ---- ANGUILLA
+78862 1712   -6178  10 8 0 ---- VC BIRD INT'L AIRPORT ANTIGUA
+78061 2670   -7897  4 2 0 ---- WEST END, GRAND BAHAMA
+78062 2655   -7870  11 2 0 ---- FREEPORT, GRAND BAHAMA
+78065 2652   -7707  3 0 0 ---- MARSH HARBOUR, ABACO
+78066 2675   -7733  15 13 0 ---- GREEN TURTLE CAY,  ABACO
+78069 2570   -7925  3 0 0 ---- SOUTH BIMINI, BINIMI
+78070 2573   -7930  3 2 0 ---- ALICE TOWN, BIMINI
+78073 2505   -7747  7 0 0 --T- NASSAU AIRPORT NEW PROVIDENCE
+78075 2548   -7667  2 0 0 ---- NORTH ELEUTHERA, ELEUTHERA
+78077 2550   -7663  16 14 0 ---- DUNMORE TOWN, HARBOUR IS., ELEUTHERA
+78080 2475   -7615  3 0 0 ---- ROCK SOUND, ELEUTHERA
+78084 2415   -7757  3 0 0 ---- CONGO TOWN, ANDROS
+78086 2408   -7755  4 2 0 ---- KEMP'S BAY, ANDROS
+78087 2428   -7542  3 3 0 ---- THE BIGHT, CAT ISLAND
+78088 2405   -7453  5 3 0 ---- COCKBURN TOWN, SAN SALVADOR
+78089 2407   -7450  3 0 0 ---- COCKBURN TOWN, SAN SALVADOR
+78091 2355   -7587  3 0 0 ---- MOSS TOWN, EXUMA
+78092 2350   -7577  3 2 0 ---- GEORGE TOWN, EXUMA
+78094 2310   -7497  9 7 0 ---- DEADMAN'S CAY, LONG ISLAND
+78095 2310   -7497  9 7 0 ---- CLARENCE TOWN, LONG ISLAND
+78101 2220   -7573  13 11 0 ---- DUNCAN TOWN, RAGGED ISLAND
+78103 2275   -7423  29 12 0 ---- COLONEL HILL, CROOKED ISLAND
+78104 2275   -7423  29 12 0 ---- CHURCH GROVE,  CROOKED ISLAND
+78108 2238   -7302  4 0 0 ---- ABRAHAM'S BAY, MAYAGUANA
+78109 2237   -7297  3 1 0 ---- ABRAHAM'S BAY,  MAYAGUANA
+78120 2095   -7365  3 0 0 ---- MATTHEW TOWN, INAGUA
+78121 2095   -7368  4 2 0 ---- MATTHEW TOWN, INAGUA
+78954 1307   -5948  56 50 0 T-T- GRANTLEY ADAMS
+78955 1315   -5962  113 0 0 ---- CARIBBEAN METEOROLOGICAL INSTITUTE
+78583 1753   -8830  5 5 0 T-T- BELIZE/PHILLIP GOLDSTON INTL. AIRPORT
+78584 1752   -8820  1 0 0 ---- BELIZE/LANDIVAR
+78588 1718   -8750  0 0 0 ---- HALF MOON CAYE
+78596 1610   -8825  0 0 0 ---- HUNTING CAYE
+78016 3237   -6467  130 0 0 T-T- BERMUDA INTERNATIONAL AIRPORT
+78550 1845   -6453  0 4 0 ---- BEEF ISLAND, TORTOLA
+71001 6137   -13903 0 805 0 ---- BURWASH, YT
+71002 5355   -6410  0 439 0 ---- CHURCHILL FALLS, NFLD
+71003 5375   -7367  0 306 0 ---- LA GRANDE 4, QUE
+71004 4938   -12320 0 969 0 ---- CYPRESS BOWL FREESTYLE, BC
+71005 5310   -11117 0 658 0 ---- ALBERT HALL AGCM, ALTA
+71006 5230   -11177 0 737 0 ---- ALLIANCE AGCM, ALTA
+71007 5002   -11322 0 967 0 ---- BARONS AGCM, ALTA
+71008 5088   -11245 0 807 0 ---- BASSANO AGCM, ALTA
+71009 5137   -11335 0 896 0 ---- BEISEKER AGCM, ALTA
+71010 5257   -11145 0 721 0 ---- BELLSHILL AGCM, ALTA
+71011 5198   -11280 0 870 0 ---- BIG VALLEY AGCM, ALTA
+71012 5233   -11050 0 690 0 ---- CADOGAN AGCM, ALTA
+71013 5177   -11225 0 845 0 ---- CRAIGMYLE AGCM, ALTA
+71014 5217   -11317 0 889 0 ---- DELBURNE AGCM, ALTA
+71015 4928   -11253 0 1305 0 ---- MILK RIVER RIDGE RESERVOIR, ALTA
+71016 4915   -11355 0 1326 0 ---- BULLHORN HEADWATERS, ALTA
+71017 7375   -10528 0 11 0 ---- STEFANSSON ISLAND, NU
+71018 7470   -9497  0 30 0 ---- RESOLUTE CS, NU
+71019 4715   -6782  0 245 0 ---- ST LEONARD CS, NB
+71020 6123   -12373 0 204 0 ---- YOHIN, NWT
+71021 6125   -12447 0 283 0 ---- DEADMEN VALLEY, NWT
+71022 5428   -13043 0 35 0 ---- PRINCE RUPERT, BC
+71023 5490   -10995 0 637 0 ---- JIMMY LAKE AWOS, SASK
+71024 5837   -11603 0 289 0 ---- FORT VERMILION, ALTA
+71026 5002   -11072 717 715 0 ---- MEDICINE HAT RCS, ALTA
+71027 4667   -6040  9 8 0 ---- INGONISH BEACH CS, NS
+71028 5167   -12440 876 875 0 ---- TATLAYOKO LAKE RCS, BC
+71029 7075   -11780 0 29 0 ---- HOLMAN CS, NWT
+71030 4470   -6680  0 78 0 ---- GRAND MANAN SAR CS, NB
+71032 4947   -12050 0 700 0 ---- PRINCETON CS, BC
+71033 5725   -10560 0 513 0 ---- KEY LAKE, SK, SASK
+71035 5162   -11365 0 914 0 ---- LINDEN AGCM, ALTA
+71036 5110   -10005 0 304 0 ---- DAUPHIN, MAN
+71037 4932   -12325 0 35 0 ---- POINT ATKINSON, BC
+71039 6210   -13618 0 542 0 ---- CARMACKS CS, YT
+71040 4830   -7112  0 162 0 ---- LATERRIERE, QUE
+71041 4565   -6137  0 114 0 ---- PORT HAWKESBURY, NS
+71043 6527   -12680 0 72 0 ---- NORMAN WELLS A, NWT
+71043 6528   -12675 95 93 0 T-T- NORMAN WELLS UA, NWT
+71044 6757   -13983 0 251 0 ---- OLD CROW RCS, YT
+71045 6017   -13273 0 705 0 ---- TESLIN (AUT), YT
+71046 6960   -14018 0 13 0 ---- KOMAKUK BEACH, YT
+71047 5345   -11125 0 656 0 ---- MANNVILLE AGCM, ALTA
+71048 5105   -11032 0 735 0 ---- ACADIA VALLEY, ALTA
+71049 6587   -8943  0 18 0 ---- WAGER BAY (AUT), NU
+71050 5210   -12413 0 909 0 ---- PUNTZI MOUNTAIN (AUT), BC
+71051 4935   -11067 0 927 0 ---- MANYBERRIES AGCM, ALTA
+71055 6703   -12608 259 259 0 ---- COLVILLE LAKE, NWT
+71057 5067   -11333 0 965 0 ---- MOSSLEIGH AGCM, ALTA
+71059 6927   -11922 0 69 0 ---- CROKER RIVER, NU
+71060 5247   -11607 0 1362 0 ---- NORDEGG CS, ALTA
+71061 5408   -11443 0 648 0 ---- BARRHEAD CS, ALTA
+71062 5313   -11512 0 903 0 ---- VIOLET GROVE CS, ALTA
+71063 4538   -7572  0 79 0 ---- OTTAWA CDA RCS, ONT
+71064 6903   -10782 0 165 0 ---- CAPE PEEL WEST, NU
+71065 5372   -11110 0 580 0 ---- MYRNAM AGCM, ALTA
+71066 5862   -11715 0 338 0 ---- HIGH LEVEL, ALTA
+71067 5325   -11315 0 765 0 ---- NEW SEREPTA AGCM, ALTA
+71068 5622   -11743 0 570 0 ---- PEACE RIVER A, ALTA
+71069 5528   -11477 0 582 0 ---- SLAVE LAKE AWOS A, ALTA
+71070 4922   -11112 0 915 0 ---- PAKOWKI LAKE AGCM, ALTA
+71072 4837   -8932  0 199 0 ---- THUNDER BAY, ONT
+71073 5058   -11280 0 941 0 ---- QUEENSTOWN, ALTA
+71074 7878   -10355 0 58 0 ---- ISACHSEN (AUT), NU
+71075 5818   -10370 0 492 0 ---- COLLINS BAY, SASK
+71076 5957   -10848 320 318 0 ---- URANIUM CITY (AUT), SASK
+71077 5583   -10842 0 440 0 ---- BUFFALO NARROWS (AUT), SASK
+71078 5685   -10107 0 356 0 ---- LYNN LAKE, MAN
+71079 5580   -9785  0 223 0 ---- THOMPSON A, MAN
+71081 6877   -8123  0 9 0 ---- HALL BEACH A, NU
+71081 6877   -8122  0 5 0 T-T- HALL BEACH UA, NU
+71082 8250   -6233  75 65 0 T-T- ALERT UA, NU
+71083 6282   -9212  0 32 0 ---- RANKIN INLET A, NU
+71084 6832   -10008 0 36 0 ---- HAT ISLAND, NU
+71085 4952   -11398 0 1189 0 ---- PINCHER CREEK, ALTA
+71086 6167   -11725 0 159 0 --T- FT. PROVIDENCE, NWT
+71087 6132   -11760 0 161 0 ---- FORT PROVIDENCE, NWT
+71088 6908   -7903  0 41 0 ---- ROWLEY ISLAND, NU
+71089 5258   -11033 0 644 0 ---- RIBSTONE SOUTH AGCM, ALTA
+71090 7048   -6852  0 26 0 ---- CLYDE A, NU
+71091 6888   -7513  0 160 0 ---- LONGSTAFF BLUFF, NU
+71092 6865   -7117  0 526 0 ---- DEWAR LAKES, NU
+71093 6847   -6680  0 390 0 ---- CAPE HOOPER, NU
+71094 6665   -6138  0 725 0 ---- CAPE DYER, NU
+71095 7268   -7797  0 61 0 ---- POND INLET A, NU
+71096 6753   -6378  0 584 0 ---- FOX FIVE, NU
+71097 6333   -6413  0 376 0 ---- BREVOORT ISLAND, NU
+71098 5305   -9333  0 289 0 ---- SANDY LAKE, ONT
+71099 5602   -8767  0 15 0 ---- FORT SEVERN A, ONT
+71101 5325   -13180 0 6 0 ---- SANDSPIT AWOS, BC
+71102 5302   -11010 0 669 0 ---- RIVERCOURSE AGCM, ALTA
+71103 5302   -12250 0 545 0 ---- QUESNEL AWOS, BC
+71104 5217   -12205 0 940 0 ---- WILLIAMS LAKE A, BC
+71105 5025   -11170 0 645 0 ---- ROLLING HILLS AGCM, ALTA
+71107 5193   -13100 0 91 0 ---- CAPE ST JAMES CS, BC
+71108 4902   -12235 0 59 0 ---- ABBOTSFORD A, BC
+71109 5067   -12735 0 21 0 ---- PORT HARDY A, BC
+71109 5068   -12737 0 17 0 T-T- PORT HARDY UA, BC
+71110 4692   -5538  0 48 0 ---- ST LAWRENCE, NFLD
+71111 5325   -13180 0 6 0 ---- SANDSPIT, BC
+71112 4917   -12307 0 16 0 ---- RICHMOND OPERATIONS CENTRE, BC
+71113 4923   -12175 23 19 0 ---- AGASSIZ CS, BC
+71114 4937   -12148 0 39 0 ---- HOPE (AUT), BC
+71115 5022   -11918 0 482 0 ---- VERNON AUTO, BC
+71116 4912   -11047 0 935 0 ---- ONEFOUR CDA, ALTA
+71117 4000   -5000  0 0 0 ---- MOBILE UPPER AIR STATION-ONTARIO, ONT
+71118 5282   -11108 0 686 0 ---- WAINWRIGHT CFB AIRFIELD 21, ALTA
+71119 5353   -11410 0 766 0 T-T- EDMONTON STONY PLAIN, ALTA
+71120 5442   -11028 0 541 0 --PP COLD LAKE A, ALTA
+71121 5367   -11347 0 687 0 ---- EDMONTON NAMAO AWOS A, ALTA
+71122 5118   -11555 0 1396 0 ---- BANFF CS, ALTA
+71123 5332   -11358 0 723 0 ---- EDMONTON INT'L A, ALTA
+71125 5413   -10852 0 480 0 ---- MEADOW LAKE A, SASK
+71127 5353   -11410 0 766 0 ---- EDMONTON STONY PLAIN CS, ALTA
+71129 5152   -10918 0 694 0 ---- KINDERSLEY A, SASK
+71130 5332   -10400 0 371 0 ---- NIPAWIN, SASK
+71131 4943   -10898 0 1079 0 ---- EASTEND CYPRESS (AUT), SASK
+71132 5925   -10583 0 245 0 ---- STONY RAPIDS, SASK
+71133 5337   -10755 0 584 0 ---- SPIRITWOOD WEST, SASK
+71135 4917   -10597 0 917 0 ---- ROCKGLEN (AUT), SASK
+71136 4990   -9995  0 409 0 ---- BRANDON RCS, MAN
+71137 4905   -10758 798 796 0 ---- VAL MARIE SOUTHEAST, SASK
+71138 5127   -10247 0 498 0 ---- YORKTON, SASK
+71139 4963   -10950 0 1270 0 ---- CYPRESS HILLS PARK, SASK
+71140 4990   -9995  0 409 0 ---- BRANDON A, MAN
+71141 7062   -10027 0 20 0 ---- GATESHEAD ISLAND, NU
+71142 5028   -10768 0 819 0 ---- SWIFT CURRENT, SASK
+71143 5175   -9990  0 255 0 ---- BACHELORS ISLAND MARINE, MAN
+71144 5048   -9803  0 249 0 ---- OAKPOINT MARINE, MAN
+71145 5385   -9465  0 235 0 ---- ISLAND LAKE A, MAN
+71147 4948   -9802  0 268 0 ---- CARMAN U OF M CS, MAN
+71148 4918   -9890  474 470 0 ---- PILOT MOUND (AUT), MAN
+71149 5070   -9952  0 351 0 ---- MCCREARY, MAN
+71150 5045   -10060 0 561 0 ---- SHOAL LAKE CS, MAN
+71151 4978   -9437  0 412 0 ---- KENORA RCS, ONT
+71152 4762   -5762  0 10 0 ---- BURGEO NL, NFLD
+71153 4920   -11328 0 1136 0 ---- CARDSTON, ALTA
+71154 4912   -11380 0 1289 0 ---- WATERTON PARK GATE, ALTA
+71155 5330   -11360 0 715 0 ---- EDMONTON INTERNATIONAL CS, ALTA
+71156 5357   -11645 0 927 0 ---- EDSON CLIMATE, ALTA
+71157 5357   -11352 0 671 0 ---- EDMONTON MUNICIPAL CR10, ALTA
+71158 5235   -9702  0 221 0 ---- BERENS RIVER CS, MAN
+71159 4855   -5855  59 58 0 ---- STEPHENVILLE RCS, NFLD
+71160 6270   -10917 0 167 0 ---- FORT RELIANCE (AUT), NWT
+71161 4463   -7573  121 120 0 ---- BROCKVILLE CLIMATE, ONT
+71162 6192   -11372 0 165 0 ---- INNER WHALEBACKS, NWT
+71163 6313   -11723 0 271 0 ---- LAC LA MARTRE, NWT
+71164 6717   -13022 0 62 0 ---- LITTLE CHICAGO, NWT
+71165 6410   -11732 0 223 0 ---- RAE LAKES, NWT
+71166 6043   -12123 0 498 0 ---- TROUT LAKE, NWT
+71167 5357   -11645 0 926 0 ---- EDSON, ALTA
+71168 4373   -9662  0 481 0 ---- SIOUX FALLS CLIMATE, SD
+71170 4990   -9935  0 383 0 ---- CARBERRY CS, MAN
+71171 4318   -7940  0 79 0 ---- VINELAND STATION RCS, ONT
+71172 4533   -8003  0 176 0 ---- PARRY SOUND CCG, ONT
+71176 5998   -6415  0 551 0 ---- CAPE KAKKIVIAK, NFLD
+71177 5713   -6147  0 834 0 ---- CAPE KIGLAPAIT, NFLD
+71178 4867   -5310  29 25 0 ---- BONAVISTA, NFLD
+71179 5470   -5835  0 682 0 ---- TUKIALIK BAY, NFLD
+71180 4770   -5930  32 31 0 ---- WRECKHOUSE, NFLD
+71181 4713   -5532  0 29 0 ---- WINTERLAND, NFLD
+71183 4547   -7373  0 32 0 ---- MONTREAL/PIERRE ELLIOTT TRUDEAU INTL, QUE
+71184 4572   -7337  0 17 0 ---- VARENNES, QUE
+71185 5023   -5757  0 19 0 ---- DANIELS HARBOUR, NFLD
+71186 4837   -7053  0 7 0 ---- CAP-ROUGE, QUE
+71187 4937   -12148 0 39 0 ---- HOPE, BC
+71188 4877   -6447  0 34 0 ---- GASPE A, QUE
+71189 4825   -7010  0 4 0 ---- POINTE CLAVEAU, QUE
+71190 4813   -6970  0 7 0 ---- POINTE DE L'ISLET, QUE
+71191 4560   -6495  0 42 0 ---- FUNDY PARK (ALMA) CS, NB
+71192 5302   -12250 0 545 0 ---- QUESNEL, BC
+71193 4855   -8138  0 294 0 ---- TIMMINS CLIMATE, ONT
+71194 4000   -5000  0 0 0 ---- MOBILE UPPER AIR STATION-ATLANTIC, NS
+71196 4585   -7725  162 161 0 ---- PEMBROKE CLIMATE, ONT
+71197 4757   -5915  0 39 0 ---- PORT AUX BASQUES, NFLD
+71198 4618   -7292  0 16 0 ---- LAC SAINT-PIERRE, QUE
+71199 6012   -12882 0 689 0 ---- WATSON LAKE (AUT), YT
+71200 4840   -12332 0 69 0 ---- VICTORIA GONZALES CS, BC
+71201 4928   -12312 0 2 0 ---- VANCOUVER HARBOUR CS, BC
+71202 5277   -11242 0 712 0 ---- ROSALIND AGCM, ALTA
+71203 4995   -11937 0 433 0 ---- KELOWNA, BC
+71203 4993   -11940 0 456 0 T-T- KELOWNA UA, BC
+71207 4978   -12315 0 52 0 ---- SQUAMISH AUTO, BC
+71209 4910   -12330 0 0 0 ---- SANDHEADS CS, BC
+71212 4732   -7113  672 672 0 ---- FORET MONTMORENCY RCS, QUE
+71213 4768   -7983  0 0 0 ---- EARLTON CLIMATE, ONT
+71214 5212   -11010 0 687 0 ---- BODO AGDM, ALTA
+71215 4902   -11943 292 282 0 ---- OSOYOOS CS, BC
+71216 5025   -11780 0 512 0 ---- NAKUSP CS, BC
+71217 5027   -11335 0 1006 0 ---- CHAMPION AGDM, ALTA
+71218 5070   -11928 0 350 0 ---- SALMON ARM CS, BC
+71219 5417   -13035 0 5 0 ---- HOLLAND ROCK, BC
+71220 5435   -13072 0 26 0 ---- LUCY ISLAND LIGHTSTATION, BC
+71221 5630   -11973 0 630 0 ---- CLEARDALE AGDM, ALTA
+71222 5842   -13002 0 801 0 ---- DEASE LAKE (AUT), BC
+71223 5193   -11070 0 772 0 ---- CONSORT AGDM, ALTA
+71224 4905   -11282 0 1310 0 ---- DEL BONITA AGDM, ALTA
+71225 4948   -11148 0 881 0 ---- FOREMOST AGDM, ALTA
+71226 5538   -11647 0 601 0 ---- HIGH PRAIRIE AGDM, ALTA
+71227 5318   -11223 0 688 0 ---- HOLDEN AGDM, ALTA
+71228 5283   -11187 0 674 0 ---- KILLAM AGDM, ALTA
+71229 5697   -11745 0 457 0 ---- MANNING AGDM, ALTA
+71230 5518   -11938 0 745 0 ---- BEAVERLODGE RCS, ALTA
+71231 4973   -11145 0 816 0 ---- BOW ISLAND, ALTA
+71232 5108   -11507 0 1297 0 ---- BOW VALLEY, ALTA
+71233 5308   -11443 0 851 0 ---- BRETON PLOTS, ALTA
+71234 5000   -11363 0 1009 0 ---- CLARESHOLM, ALTA
+71235 5107   -11422 0 1235 0 ---- COP UPPER, ALTA
+71236 4962   -11447 0 1303 0 ---- CROWSNEST, ALTA
+71237 5143   -11267 0 678 0 ---- DRUMHELLER EAST, ALTA
+71238 5367   -11287 0 716 0 ---- ELK ISLAND NAT PARK, ALTA
+71239 4955   -9907  0 374 0 ---- CYPRESS RIVER RCS, MAN
+71240 5167   -11020 0 707 0 ---- ESTHER 1, ALTA
+71241 5345   -11447 0 746 0 ---- HIGHVALE, ALTA
+71242 5243   -11375 0 860 0 ---- LACOMBE CDA 2, ALTA
+71243 4968   -11277 921 910 0 ---- LETHBRIDGE CDA, ALTA
+71244 4913   -11205 0 1050 0 ---- MILK RIVER, ALTA
+71245 5093   -11518 0 2543 0 ---- NAKISKA RIDGETOP, ALTA
+71246 5655   -11527 0 546 0 ---- RED EARTH, ALTA
+71247 5002   -11072 0 716 0 ---- MEDICINE HAT, ALTA
+71248 5177   -11467 0 1114 0 ---- SUNDRE A, ALTA
+71249 5168   -11322 0 915 0 ---- THREE HILLS, ALTA
+71250 4750   -5278  0 110 0 ---- ST JOHNS WEST CLIMATE, NFLD
+71251 5005   -11213 0 779 0 ---- VAUXHALL CDA CS, ALTA
+71252 5338   -11833 0 1402 0 ---- WILLOW CREEK 1, ALTA
+71253 5870   -11385 0 240 0 ---- GARDEN RIVER, ALTA
+71254 5303   -11280 0 739 0 ---- CAMROSE, ALTA
+71255 5703   -11155 0 310 0 ---- MILDRED LAKE, ALTA
+71256 5413   -11578 0 784 0 ---- WHITECOURT, ALTA
+71257 5165   -11267 0 836 0 ---- MORRIN AGDM, ALTA
+71258 5175   -11408 0 1046 0 ---- OLDS AGDM, ALTA
+71259 5112   -11170 0 750 0 ---- POLLOCKVILLE AGDM, ALTA
+71260 4648   -8450  0 192 0 ---- SAULT STE MARIE A, ONT
+71261 4377   -8172  0 213 0 ---- GODERICH, ONT
+71263 4317   -7993  0 237 0 ---- HAMILTON A, ONT
+71264 4462   -6350  0 24 0 ---- SHEARWATER RCS, NS
+71265 4362   -7938  0 76 0 ---- TORONTO CITY CENTRE, ONT
+71267 4962   -11278 0 929 0 ---- LETHBRIDGE, ALTA
+71268 4635   -8255  0 331 0 ---- ELLIOT LAKE A, ONT
+71269 5030   -11008 0 800 0 ---- SCHULER AGDM, ALTA
+71270 4450   -8022  0 179 0 ---- COLLINGWOOD, ONT
+71271 5463   -11337 0 635 0 ---- ATHABASCA AGCM, ALTA
+71272 5870   -9850  0 281 0 ---- TADOULE LAKE, MAN
+71273 5402   -10913 0 545 0 ---- LOON LAKE RCS, SASK
+71274 5427   -11248 0 680 0 ---- SMOKY LAKE AGDM, ALTA
+71275 5400   -11127 0 649 0 ---- ST. PAUL AGCM, ALTA
+71276 5362   -11167 0 678 0 ---- TWO HILLS AGDM, ALTA
+71277 5508   -11718 0 698 0 ---- VALLEYVIEW AGDM, ALTA
+71278 5333   -11087 0 623 0 ---- VERMILION AGDM, ALTA
+71279 5022   -6625  0 52 0 ---- SEPT-ILES, QUE
+71281 4442   -7585  0 82 0 ---- GRENADIER ISLAND, ONT
+71282 4453   -7922  0 220 0 ---- LAGOON CITY, ONT
+71283 5612   -11788 0 748 0 ---- BROWNVALE AGCM, ALTA
+71284 5392   -11392 0 714 0 ---- BUSBY AGCM, ALTA
+71285 5428   -11297 0 664 0 ---- ABEE AGDM, ALTA
+71286 5392   -11227 0 625 0 ---- ANDREW AGDM, ALTA
+71287 5477   -11282 0 574 0 ---- ATMORE AGDM, ALTA
+71288 6910   -10513 0 18 0 ---- CAMBRIDGE BAY GSN, NU
+71289 5233   -11258 0 795 0 ---- STETTLER AGDM, ALTA
+71290 5528   -12313 0 690 0 ---- MACKENZIE, BC
+71291 4915   -8833  0 232 0 ---- CAMERON FALLS (AUT), ONT
+71292 5125   -10245 0 498 0 ---- YORKTON, SASK
+71294 4507   -7787  0 330 0 ---- BANCROFT AUTO, ONT
+71295 5062   -9322  0 362 0 ---- EAR FALLS (AUT), ONT
+71296 4423   -7978  0 251 0 ---- EGBERT CS, ONT
+71297 4328   -7990  0 102 0 ---- HAMILTON RBG CS, ONT
+71298 4203   -8290  192 191 0 ---- HARROW CDA AUTO, ONT
+71299 4940   -8243  0 218 0 ---- KAPUSKASING CDA ON, ONT
+71300 4500   -7563  0 99 0 ---- KEMPTVILLE CS, ONT
+71301 4815   -8000  0 324 0 ---- KIRKLAND LAKE CS, ONT
+71302 5388   -12267 0 680 0 ---- PRINCE GEORGE AIRPORT AUTO, BC
+71303 4193   -8252  0 176 0 ---- POINT PELEE CS, ONT
+71304 4947   -11417 0 1257 0 ---- BEAVER MINES, ALTA
+71305 5877   -11112 0 238 0 ---- FORT CHIPEWYAN, ALTA
+71306 5847   -7807  0 25 0 ---- INUKJUAK, QUE
+71307 4245   -8188  0 205 0 ---- RIDGETOWN RCS, ONT
+71308 4560   -6167  68 66 0 ---- TRACADIE, NS
+71309 5128   -8062  0 9 0 ---- MOOSONEE RCS, ONT
+71310 4645   -6257  30 29 0 ---- ST. PETERS, PEI
+71311 4575   -6423  20 19 0 ---- NAPPAN AUTO, NS
+71312 5333   -10400 0 371 0 ---- NIPAWIN, SASK
+71313 5028   -6360  0 37 0 ---- HAVRE-SAINT-PIERRE A, QUE
+71314 4448   -7955  0 289 0 ---- BARRIE-ORO, ONT
+71315 4798   -6633  0 42 0 ---- CHARLO AUTO, NB
+71316 5477   -11202 0 567 0 ---- LAC LA BICHE CLIMATE, ALTA
+71317 4542   -6347  38 37 0 ---- DEBERT, NS
+71318 5207   -11143 0 791 0 ---- CORONATION CLIMATE, ALTA
+71319 4728   -7063  0 722 0 ---- CHARLEVOIX (MRC), QUE
+71320 6877   -8123  0 8 0 ---- HALL BEACH CLIMATE, NU
+71321 6373   -6853  0 33 0 ---- IQALUIT CLIMATE, NU
+71322 6110   -9407  0 9 0 ---- ARVIAT CLIMATE, NU
+71323 4620   -7078  0 229 0 ---- BEAUCEVILLE, QUE
+71326 4458   -6355  0 52 0 ---- HALIFAX KOOTENAY, NS
+71331 5553   -10235 0 297 0 ---- ISLAND FALLS (AUT), SASK
+71332 6782   -11513 23 22 0 ---- KUGLUKTUK CLIMATE, NU
+71334 5870   -9850  0 262 0 ---- TADOULE LAKE CS, MAN
+71335 5833   -6258  0 500 0 ---- SAGLEK, NFLD
+71337 4992   -5567  0 194 0 ---- LA SCIE, NFLD
+71338 6753   -6402  0 5 0 ---- QIKIQTARJUAQ A, NU
+71339 5230   -5582  0 11 0 ---- MARY'S HARBOUR, NFLD
+71340 5432   -11395 0 614 0 ---- DAPP AGDM, ALTA
+71341 4962   -11382 0 1072 0 ---- BROCKET AGDM, ALTA
+71342 5138   -11035 0 766 0 ---- OYEN AGDM, ALTA
+71343 4950   -11212 0 943 0 ---- WRENTHAM AGDM, ALTA
+71344 5118   -11250 0 971 0 ---- HUSSAR AGDM, ALTA
+71345 4913   -11165 0 947 0 ---- MASINASIN AGDM, ALTA
+71346 4980   -11230 0 824 0 ---- BARNWELL AGDM, ALTA
+71347 5607   -11843 0 654 0 ---- FAIRVIEW AGDM, ALTA
+71348 5562   -11828 0 621 0 ---- PEORIA AGDM, ALTA
+71349 5450   -11170 0 585 0 ---- RICH LAKE AGDM, ALTA
+71350 4633   -6317  53 53 0 ---- HARRINGTON CDA CS, PEI
+71351 5365   -11335 0 665 0 ---- OLIVER AGDM, ALTA
+71352 4365   -8042  0 376 0 ---- ELORA RCS, ONT
+71353 5243   -11360 0 965 0 ---- PRENTISS, ALTA
+71354 5357   -11230 0 683 0 ---- MUNDARE AGDM, ALTA
+71355 8250   -6233  0 65 0 ---- ALERT CLIMATE, NU
+71356 6432   -9600  0 50 0 ---- BAKER LAKE CLIMATE, NU
+71357 6753   -6403  0 6 0 ---- QIKIQTARJUAQ CLIMATE, NU
+71358 7048   -6852  0 26 0 ---- CLYDE RIVER CLIMATE, NU
+71359 5365   -11058 0 616 0 ---- DEWBERRY AGCM, ALTA
+71360 5277   -11042 0 649 0 ---- EDGERTON AGCM, ALTA
+71361 6083   -11577 0 164 0 ---- HAY RIVER CLIMATE, NWT
+71362 6002   -11192 0 203 0 ---- FORT SMITH CLIMATE, NWT
+71363 6863   -9585  0 42 0 ---- GJOA HAVEN CLIMATE, NU
+71364 6832   -13352 0 103 0 ---- INUVIK CLIMATE, NWT
+71365 6175   -12123 0 168 0 ---- FORT SIMPSON CLIMATE, NWT
+71368 4345   -8037  0 321 0 ---- KITCHEN/WATERLOO, ONT
+71369 5528   -11477 0 582 0 ---- SLAVE LAKE, ALTA
+71370 4655   -7273  0 110 0 ---- SHAWINIGAN, QUE
+71371 4552   -7342  0 27 0 ---- MONTREAL/ST-HUBERT A, QUE
+71372 4528   -7333  0 43 0 ---- L'ACADIE, QUE
+71373 4505   -7285  0 152 0 ---- FRELIGHSBURG, QUE
+71374 5015   -6005  0 7 0 ---- CAPE WHITTLE, QUE
+71375 5022   -6420  0 9 0 ---- ILE AUX PERROQUETS, QUE
+71376 4607   -7455  0 238 0 ---- ST-JOVITE, QUE
+71377 4542   -7392  0 39 0 ---- STE-ANNE-DE-BELLEVUE 1, QUE
+71378 4740   -7278  0 168 0 ---- LA TUQUE, QUE
+71379 4883   -7253  0 137 0 ---- NORMANDIN, QUE
+71380 5272   -11390 0 855 0 ---- CRESTOMERE AGCM, ALTA
+71381 4858   -7170  0 112 0 ---- MISTOOK, QUE
+71382 4755   -7122  0 791 0 ---- L'ETAPE, QUE
+71383 5072   -7100  0 498 0 ---- BONNARD 1, QUE
+71384 4707   -7077  0 6 0 ---- CAP-TOURMENTE, QUE
+71385 4840   -6888  0 7 0 ---- ILE BICQUETTE, QUE
+71386 4847   -6743  0 166 0 ---- AMQUI, QUE
+71387 4888   -7102  0 304 0 ---- ONATCHIWAY, QUE
+71388 4828   -7092  0 151 0 ---- LA BAIE, QUE
+71389 4668   -7197  0 61 0 ---- DESCHAMBAULT, QUE
+71390 5015   -6643  0 24 0 ---- POINTE NOIRE CS, QUE
+71391 4583   -7563  0 194 0 ---- HIGH FALLS, QUE
+71392 4677   -7128  0 91 0 ---- STE-FOY (U. LAVAL), QUE
+71393 5110   -11400 0 1081 0 ---- CALGARY INT'L CS, ALTA
+71395 4488   -6352  0 145 0 ---- HALIFAX STANFIELD INT'L A, NS
+71397 4498   -6492  0 28 0 ---- GREENWOOD A, NS
+71398 5128   -8060  0 9 0 ---- MOOSONEE, ONT
+71399 5158   -11075 0 755 0 ---- SEDALIA AGCM, ALTA
+71400 4897   -5607  0 102 0 ---- BADGER (AUT), NFLD
+71402 4968   -5480  0 92 0 ---- TWILLINGATE (AUT), NFLD
+71403 4482   -6233  0 16 0 ---- BEAVER ISLAND (AUT), NS
+71404 5897   -11043 0 214 0 ---- EGG ISLAND, ALTA
+71405 5332   -11253 0 679 0 ---- SHONTS AGCM, ALTA
+71406 5102   -5710  0 5 0 ---- FEROLLE POINT (AUT), NFLD
+71407 6853   -8978  17 15 0 ---- KUGAARUK CLIMATE, NU
+71408 4737   -5578  0 59 0 ---- SAGONA ISLAND, NFLD
+71409 4955   -11105 0 845 0 ---- ETZICOM AGCM, ALTA
+71410 5395   -9783  0 223 0 ---- NORWAY HOUSE, MAN
+71411 4398   -6465  0 10 0 ---- WESTERN HEAD, NS
+71412 4645   -6198  0 7 0 ---- EAST POINT (AUT), PEI
+71413 5180   -11167 0 804 0 ---- SPONDIN AGCM, ALTA
+71414 5437   -11087 0 556 0 ---- DUPRE AGCM, ALTA
+71415 4577   -6268  0 2 0 ---- CARIBOU POINT (AUT), NS
+71417 5072   -5610  0 30 0 ---- ENGLEE (AUT), NFLD
+71418 4722   -6013  0 27 0 ---- ST PAUL ISLAND (AUT), NS
+71419 4535   -6098  0 8 0 ---- HART ISLAND (AUT), NS
+71421 5187   -6328  0 588 0 ---- LAC EON, QUE
+71423 4908   -6170  0 7 0 ---- HEATH POINT, QUE
+71424 4698   -7080  0 3 0 ---- ILE D'ORLEANS, QUE
+71425 4925   -6532  0 29 0 ---- CAP-MADELEINE, QUE
+71426 4807   -6955  0 5 0 ---- ILE ROUGE, QUE
+71427 4932   -6737  0 5 0 ---- POINTE-DES-MONTS, QUE
+71428 4910   -6665  0 5 0 ---- CAP-CHAT, QUE
+71429 4842   -6432  0 15 0 ---- CAP-D'ESPOIR, QUE
+71430 4383   -7715  0 78 0 ---- POINT PETRE (AUT), ONT
+71431 4395   -7817  0 77 0 ---- COBOURG (AUT), ONT
+71432 4325   -7922  0 79 0 ---- PORT WELLER (AUT), ONT
+71433 4733   -8583  189 187 0 ---- CARIBOU ISLAND (AUT), ONT
+71434 5498   -8543  53 52 0 ---- PEAWANUCK (AUT), ONT
+71435 4903   -9047  0 488 0 ---- UPSALA (AUT), ONT
+71436 4422   -7835  0 191 0 ---- PETERBOROUGH, ONT
+71437 4330   -7980  0 77 0 ---- BURLINGTON PIERS (AUT), ONT
+71438 4503   -8037  0 191 0 ---- WESTERN ISLAND (AUT), ONT
+71439 4533   -8173  0 180 0 ---- COVE ISLAND (AUT), ONT
+71440 5122   -11297 0 901 0 ---- STANDARD AGCM, ALTA
+71441 4902   -9755  0 252 0 ---- GRETNA (AUT), MAN
+71442 5108   -9755  0 253 0 ---- FISHER BRANCH (AUT), MAN
+71443 5210   -10122 0 334 0 ---- SWAN RIVER RCS, MAN
+71444 5065   -9993  627 627 0 ---- WASAGAMING, MAN
+71445 5282   -9760  0 222 0 ---- GEORGE ISLAND (AUT), MAN
+71446 5027   -10773 0 825 0 ---- SWIFT CURRENT CDA, SASK
+71447 4927   -10098 0 445 0 ---- MELITA, MAN
+71448 5017   -9605  0 268 0 ---- PINAWA, MAN
+71449 4902   -9558  0 328 0 ---- SPRAGUE, MAN
+71450 5113   -10658 594 595 0 ---- ELBOW CS, SASK
+71451 5633   -10328 0 344 0 ---- SOUTHEND, SASK
+71452 4970   -10380 0 588 0 ---- WEYBURN, SASK
+71453 4990   -10945 0 766 0 ---- MAPLE CREEK, SASK
+71454 5392   -10607 0 569 0 ---- WASKESIU LAKE, SASK
+71455 5095   -10715 0 664 0 ---- LUCKY LAKE, SASK
+71456 5282   -10460 0 490 0 ---- MELFORT, SASK
+71457 5055   -11183 0 747 0 ---- BROOKS, ALTA
+71458 5350   -11208 0 639 0 ---- VEGREVILLE, ALTA
+71459 5090   -10950 0 675 0 ---- LEADER AIRPORT, SASK
+71460 4597   -8148  0 196 0 ---- KILLARNEY (AUT), ONT
+71461 5580   -11788 0 563 0 ---- EAGLESHAM AGCM, ALTA
+71462 4563   -8295  183 182 0 ---- GREAT DUCK ISLAND (AUT), ONT
+71463 4287   -7925  0 183 0 ---- PORT COLBORNE (AUT), ONT
+71464 4257   -8005  170 175 0 ---- LONG POINT (AUT), ONT
+71465 4225   -8190  0 178 0 ---- ERIEAU (AUT), ONT
+71466 4183   -8247  0 195 0 ---- SOUTHEAST SHOAL (AUT), ONT
+71467 7198   -12525 88 87 0 ---- SACHS HARBOUR CLIMATE, NWT
+71470 6575   -11123 496 488 0 ---- LUPIN CS, NU
+71471 5573   -12017 0 654 0 ---- DAWSON CREEK A, BC
+71472 5330   -13277 0 14 0 ---- KINDAKUN ROCKS (AUT), BC
+71473 4878   -12303 0 24 0 ---- SATURNA ISLAND CS, BC
+71474 5113   -12150 0 1056 0 ---- CLINTON (AUT), BC
+71475 4932   -12492 0 76 0 ---- PORT ALBERNI (AUT), BC
+71476 5457   -13068 0 8 0 ---- GREY ISLET (AUT), BC
+71477 5415   -13165 0 6 0 ---- ROSE SPIT (AUT), BC
+71478 5082   -12890 111 111 0 ---- SARTINE ISLAND (AUT), BC
+71479 5010   -12793 0 98 0 ---- SOLANDER ISLAND (AUT), BC
+71480 6528   -12675 0 93 0 ---- NORMAN WELLS CLIMATE, NWT
+71481 5357   -11512 0 819 0 ---- EVANSBURG AGCM, ALTA
+71482 5218   -12747 0 31 0 ---- CATHEDRAL POINT (AUT), BC
+71483 5440   -11477 0 676 0 ---- FORT ASSINIBOINE AGCM, ALTA
+71484 5350   -13063 0 14 0 ---- BONILLA ISLAND (AUT), BC
+71485 5093   -12763 0 16 0 ---- HERBERT ISLAND (AUT), BC
+71486 5292   -11802 0 1020 0 ---- JASPER WARDEN, ALTA
+71487 4972   -10593 0 725 0 ---- ASSINIBOIA AIRPORT, SASK
+71488 4900   -11337 0 1354 0 ---- CARWAY, ALTA
+71489 5235   -10883 0 659 0 ---- SCOTT CDA, SASK
+71490 6508   -10242 0 243 0 ---- ROBERTSON LAKE (AUT), NU
+71491 6623   -12863 0 81 0 ---- FORT GOOD HOPE CS, NWT
+71492 6918   -12235 0 551 0 ---- TUKTUT NOGAIT, NWT
+71493 4540   -6433  0 30 0 ---- PARRSBORO, NS
+71494 4603   -7125  0 430 0 ---- THETFORD MINES RCS, QUE
+71495 5137   -11408 0 1145 0 ---- NEIR AGDM, ALTA
+71496 5217   -10672 505 504 0 ---- SASKATOON RCS, SASK
+71497 6023   -12347 0 213 0 ---- FORT LIARD, NWT
+71498 5093   -11293 0 907 0 ---- GLEICHEN AGCM, ALTA
+71499 5725   -10562 0 513 0 ---- KEY LAKE, SASK
+71500 5382   -11453 0 670 0 ---- GLENEVIS AGCM, ALTA
+71501 6957   -13890 0 1 0 ---- HERSCHEL ISLAND, YT
+71502 6962   -13543 0 17 0 ---- PELLY ISLAND, NWT
+71503 6520   -12343 0 212 0 ---- DELINE CS, NWT
+71504 5322   -11388 0 754 0 ---- THORSBY AGCM, ALTA
+71505 6077   -13757 0 595 0 ---- HAINES JUNCTION, YT
+71506 6697   -13622 0 731 0 ---- ROCK RIVER, YT
+71507 5725   -11728 0 455 0 ---- HAWK HILLS AGCM, ALTA
+71508 4367   -7940  0 112 0 ---- TORONTO CITY, ONT
+71509 4968   -11275 0 903 0 ---- LETHBRIDGE DEMO FARM AGDM, ALTA
+71510 5157   -10792 0 586 0 ---- ROSETOWN EAST, SASK
+71511 5167   -10540 0 525 0 ---- WATROUS EAST, SASK
+71512 5027   -6422  0 11 0 ---- LONGUE-POINTE-DE-MINGAN, QUE
+71513 5018   -6178  0 11 0 ---- NATASHQUAN, QUE
+71514 5043   -10467 0 577 0 ---- REGINA RCS, SASK
+71515 5055   -10365 580 579 0 ---- INDIAN HEAD CDA, SASK
+71516 4905   -10548 0 756 0 ---- CORONACH SPC, SASK
+71517 4957   -11305 0 980 0 ---- BLOOD TRIBE AGDM, ALTA
+71518 5018   -11243 0 801 0 ---- ENCHANT AGDM, ALTA
+71519 4987   -11138 0 799 0 ---- BOW ISLAND IRRIGATION AGDM, ALTA
+71520 5152   -7110  0 549 0 ---- LAC BENOIT, QUE
+71521 5065   -7052  0 497 0 ---- MANOUANE EST, QUE
+71522 4983   -7117  0 398 0 ---- CHUTE-DES-PASSES, QUE
+71523 4927   -7335  0 303 0 ---- CHAMOUCHOUANE, QUE
+71524 4580   -7343  0 21 0 ---- L'ASSOMPTION, QUE
+71525 4992   -11092 0 766 0 ---- SEVEN PERSONS AGDM, ALTA
+71526 5103   -11328 0 967 0 ---- STRATHMORE AGDM, ALTA
+71527 4982   -9273  0 412 0 ---- DRYDEN REGIONAL, ONT
+71528 4990   -11273 0 858 0 ---- IRON SPRINGS AGDM, ALTA
+71529 6240   -11068 0 178 0 ---- LUTSELK'E CS, NWT
+71531 4592   -7730  0 130 0 ---- PETAWAWA AWOS, ONT
+71532 4497   -7930  0 281 0 ---- MUSKOKA AWOS, ONT
+71534 4427   -7990  0 222 0 ---- BORDEN AWOS, ONT
+71535 4980   -11203 0 833 0 ---- FINCASTLE AGDM, ALTA
+71536 4948   -11268 0 937 0 ---- RAYMOND AGDM, ALTA
+71537 5083   -11205 0 714 0 ---- ROSEMARY AGDM, ALTA
+71538 4227   -8295  0 189 0 ---- WINDSOR A, ONT
+71539 5032   -10553 0 577 0 ---- MOOSE JAW CS, SASK
+71540 5230   -11448 0 965 0 ---- HESPERO AGCM, ALTA
+71541 5590   -11712 0 638 0 ---- JEAN COTE AGCM, ALTA
+71542 5817   -11633 0 323 0 ---- LA CRETE AGCM, ALTA
+71543 5542   -11925 0 760 0 ---- LA GLACE AGCM, ALTA
+71544 5400   -11347 0 680 0 ---- LEGAL AGCM, ALTA
+71545 5398   -11287 0 625 0 ---- RADWAY AGCM, ALTA
+71546 5577   -11867 0 575 0 ---- RYCROFT AGCM, ALTA
+71547 5607   -11933 0 703 0 ---- SAVANNA AGCM, ALTA
+71548 5427   -11145 0 619 0 ---- ST. LINA AGCM, ALTA
+71549 5428   -11352 0 611 0 ---- TAWATINAW AGCM, ALTA
+71550 5110   -10005 0 304 0 ---- DAUPHIN CS, MAN
+71551 5148   -10705 0 541 0 ---- OUTLOOK PFRA, SASK
+71552 5070   -9657  0 220 0 ---- VICTORIA BEACH (AUT), MAN
+71553 5118   -10135 0 539 0 ---- ROBLIN, MAN
+71554 4850   -6847  0 4 0 ---- POINTE-AU-PERE (INRS), QUE
+71555 5018   -11388 0 1363 0 ---- STAVELY AAFC, ALTA
+71556 5142   -10525 0 497 0 ---- LAST MOUNTAIN CS, SASK
+71557 5010   -12077 0 591 0 ---- MERRITT, BC
+71558 5138   -5610  0 29 0 ---- ST ANTHONY, NFLD
+71559 4922   -10297 0 580 0 ---- ESTEVAN, SASK
+71560 4900   -9723  0 242 0 ---- EMERSON AUTO, MAN
+71561 4423   -7978  0 252 0 ---- EGBERT UA, ONT
+71563 5017   -9837  0 248 0 ---- DELTA MARSH CS, MAN
+71564 4918   -9808  0 297 0 ---- MORDEN CDA CS, MAN
+71565 5255   -11447 0 947 0 ---- LEEDALE AGDM, ALTA
+71566 5343   -11472 0 814 0 ---- TOMAHAWK AGDM, ALTA
+71567 5393   -11057 0 630 0 ---- LINDBERGH AGDM, ALTA
+71569 5020   -10470 0 580 0 ---- BRATT'S LAKE CLIMATE, SASK
+71569 5020   -10470 0 580 0 ---- BRATT'S LAKE UA, SASK
+71570 5052   -9597  0 253 0 ---- GREAT FALLS CLIMATE, MAN
+71571 5568   -11922 1015 1015 0 ---- SPIRIT RIVER AUTO STATION, ALTA
+71572 5603   -9650  0 182 0 ---- KELSEY DAM CS, MAN
+71573 4287   -8055  0 231 0 ---- DELHI CS, ONT
+71574 4762   -6573  0 58 0 ---- BATHURST A, NB
+71575 6422   -7652  0 50 0 ---- CAPE DORSET CLIMATE, NU
+71576 7268   -7795  55 64 0 ---- POND INLET CLIMATE, NU
+71577 5062   -9697  0 217 0 ---- GIMLI HARBOUR CS, MAN
+71578 4683   -7118  0 10 0 ---- BEAUPORT, QUE
+71579 4988   -9712  0 230 0 ---- WINNIPEG THE FORKS, MAN
+71580 6953   -9357  0 28 0 ---- TALOYOAK A, NU
+71581 4553   -7827  0 397 0 ---- ALGONQUIN PARK EAST GATE, ONT
+71582 5218   -12815 0 43 0 ---- BELLA BELLA, BC
+71583 6825   -12210 0 548 0 ---- QAVVIK LAKE, NWT
+71584 5027   -6360  0 37 0 ---- HAVRE ST. PIERRE, QUE
+71585 5665   -11120 0 368 0 ---- FORT MCMURRAY CS, ALTA
+71586 5513   -10527 382 378 0 ---- LA RONGE RCS, SASK
+71587 4750   -5278  0 114 0 ---- ST JOHN'S WEST CDA CS, NFLD
+71588 4957   -5787  0 67 0 ---- ROCKY HARBOUR CS, NFLD
+71589 4855   -5397  107 106 0 ---- TERRA NOVA NAT PARK CS, NFLD
+71590 4742   -6832  156 154 0 ---- EDMUNDSTON, NB
+71592 7298   -8500  0 10 0 ---- ARCTIC BAY CS, NU
+71593 5862   -11167 0 211 0 ---- PRAIRIE RIVER, ALTA
+71598 4780   -6483  0 5 0 ---- BAS CARAQUET, NB
+71599 4442   -6520  0 165 0 ---- KEJIMKUJIK 1, NS
+71600 4392   -6000  0 5 0 T-T- SABLE ISLAND, NS
+71601 4463   -6350  0 50 0 ---- SHEARWATER A, NS
+71603 4382   -6608  0 43 0 ---- YARMOUTH A, NS
+71603 4387   -6610  9 8 0 T-T- YARMOUTH UA, NS
+71604 4682   -6067  0 439 0 ---- NORTH MOUNTAIN CS, NS
+71605 4952   -12348 0 122 0 ---- PORT MELLON, BC
+71607 4520   -6725  27 26 0 ---- ST. STEPHEN, NB
+71609 4532   -6588  0 108 0 ---- SAINT JOHN A, NB
+71610 4543   -7168  0 241 0 ---- SHERBROOKE, QUE
+71611 4537   -7182  0 181 0 ---- LENNOXVILLE, QUE
+71612 4550   -7357  0 73 0 ---- MCTAVISH, QUE
+71614 4517   -7367  0 53 0 ---- STE-CLOTHILDE, QUE
+71616 4630   -7205  0 97 0 ---- LEMIEUX, QUE
+71617 4842   -7113  0 127 0 ---- JONQUIERE, QUE
+71618 5873   -9405  0 29 0 ---- CHURCHILL, MAN
+71619 4800   -6532  0 46 0 ---- NEW CARLISLE 1, QUE
+71621 4412   -7753  0 86 0 --P- TRENTON A, ONT
+71622 4303   -8115  0 278 0 ---- LONDON CS, ONT
+71623 4302   -8115  0 278 0 ---- LONDON, ONT
+71624 4367   -7962  0 173 0 ---- TORONTO LESTER B. PEARSON INT'L A, ONT
+71625 4595   -7732  0 130 0 --T- PETAWAWA A, ONT
+71627 4547   -7375  0 35 0 ---- MONTREAL/PIERRE ELLIOTT TRUDEAU INT'L A, QUE
+71628 4532   -7567  0 114 0 ---- OTTAWA MACDONALD-CARTIER INT'L A, ONT
+71630 4497   -7930  0 281 0 ---- MUSKOKA A, ONT
+71631 4398   -8075  0 414 0 ---- MOUNT FOREST (AUT), ONT
+71632 5685   -10107 0 354 0 ---- LYNN LAKE RCS, MAN
+71633 4473   -8110  0 222 0 ---- WIARTON A, ONT
+71634 4743   -6558  0 124 0 ---- RED PINES, NB
+71638 4945   -12370 0 86 0 ---- SECHELT, BC
+71639 4385   -7937  0 198 0 ---- TORONTO BUTTONVILLE A, ONT
+71642 4782   -8333  0 448 0 ---- CHAPLEAU A, ONT
+71665 5655   -6168  12 7 0 ---- NAIN, NFLD
+71666 4642   -6477  0 35 0 ---- BUCTOUCHE CDA CS, NB
+71667 4837   -8932  0 199 0 ---- THUNDER BAY CS, ONT
+71668 4592   -6660  34 35 0 ---- FREDERICTON CDA CS, NB
+71670 4677   -6500  0 34 0 ---- KOUCHIBOUGUAC CS, NB
+71671 4507   -6448  0 48 0 ---- KENTVILLE CDA CS, NS
+71672 4435   -7830  217 216 0 ---- PETERBOROUGH TRENT U, ONT
+71673 5273   -11285 0 795 0 ---- FERINTOSH AGCM, ALTA
+71674 5253   -11212 0 721 0 ---- FORESTBURG AGCM, ALTA
+71675 5382   -8988  0 222 0 ---- BIG TROUT LAKE, ONT
+71679 5377   -12598 0 861 0 ---- OOTSA LAKESKINS LAKE CLIMATE, BC
+71680 6360   -11385 0 373 0 ---- LOWER CARP LAKE, NWT
+71681 5070   -12127 0 327 0 ---- ASHCROFT, BC
+71682 6112   -12285 0 183 0 ---- LINDBURG LANDING, NWT
+71683 6873   -13350 0 85 0 ---- TRAIL VALLEY, NWT
+71684 4768   -7983  0 243 0 ---- EARLTON, ONT
+71685 5097   -11818 0 444 0 ---- REVELSTOKE, BC
+71686 5842   -13002 0 802 0 ---- DEASE LAKE, BC
+71687 5012   -12295 0 659 0 ---- WHISTLER - NESTERS, BC
+71688 5013   -12310 0 884 0 ---- CALLAGHAN VALLEY, BC
+71689 5665   -11122 0 369 0 ---- FORT MCMURRAY, ALTA
+71690 5535   -11840 0 670 0 ---- TEEPEE CREEK AGCM, ALTA
+71691 4912   -6820  0 21 0 ---- BAIE-COMEAU, QUE
+71692 4732   -5458  26 21 0 ---- MARTICOT ISLAND, NFLD
+71694 4513   -7940  0 297 0 ---- BEATRICE CLIMATE, ONT
+71695 5397   -10110 0 274 0 ---- THE PAS CLIMATE, MAN
+71696 5873   -9407  0 28 0 ---- CHURCHILL CLIMATE, MAN
+71697 4392   -7888  0 139 0 ---- OSHAWA, ONT
+71700 4587   -6652  0 20 0 ---- FREDERICTON A, NB
+71701 4583   -6643  0 50 0 ---- GAGETOWN AWOS A, NB
+71701 4583   -6643  0 50 0 -T-- GAGETOWN A, NB
+71702 4643   -6383  0 12 0 ---- SUMMERSIDE, PEI
+71703 4715   -6782  0 241 0 ---- ST LEONARD A, NB
+71704 4298   -8230  0 181 0 ---- SARNIA, ONT
+71705 4610   -6468  0 70 0 ---- MONCTON A, NB
+71706 4628   -6312  0 48 0 ---- CHARLOTTETOWN A, PEI
+71707 4617   -6003  0 61 0 ---- SYDNEY A, NS
+71709 4742   -6178  0 10 0 ---- ILES DE LA MADELEINE A, QUE
+71710 4742   -6177  0 7 0 ---- ILES DE LA MADELEINE, QUE
+71712 4512   -7428  0 49 0 ---- ST-ANICET 1, QUE
+71713 4735   -7002  0 31 0 ---- LA POCATIERE, QUE
+71714 4678   -7138  0 74 0 ---- QUEBEC/JEAN LESAGE INTL, QUE
+71715 4780   -6953  0 146 0 ---- RIVIERE-DU-LOUP, QUE
+71716 4690   -7150  0 167 0 --T- VALCARTIER A, QUE
+71718 4860   -6822  0 52 0 ---- MONT-JOLI A, QUE
+71719 4800   -6448  5 4 0 ---- MISCOU ISLAND (AUT), NB
+71720 4983   -12448 0 125 0 ---- POWELL RIVER, BC
+71721 4627   -7598  0 199 0 ---- MANIWAKI AIRPORT, QUE
+71722 4630   -7600  187 188 0 T-T- MANIWAKI UA, QUE
+71723 4622   -7265  0 8 0 ---- NICOLET, QUE
+71724 4635   -7250  0 6 0 ---- TROIS-RIVIERES, QUE
+71725 4805   -7778  0 337 0 ---- VAL-D'OR A, QUE
+71726 4792   -7462  0 444 0 ---- PARENT, QUE
+71727 4833   -7100  0 159 0 ---- BAGOTVILLE A, QUE
+71728 4852   -7227  0 178 0 ---- ROBERVAL A, QUE
+71730 4662   -8078  0 347 0 ---- SUDBURY A, ONT
+71731 4635   -7942  0 370 0 ---- NORTH BAY A, ONT
+71732 4670   -7910  0 181 0 ---- BARRAGE TEMISCAMINGUE, QUE
+71734 4823   -7903  0 318 0 ---- ROUYN, QUE
+71736 4952   -11400 0 1190 0 ---- PINCHER CREEK CLIMATE, ALTA
+71737 4680   -7408  0 429 0 ---- SAINT-MICHEL-DES-SAINTS, QUE
+71738 4797   -8478  0 287 0 ---- WAWA A, ONT
+71739 4857   -8137  0 294 0 ---- TIMMINS VICTOR POWER A, ONT
+71741 5070   -12043 0 345 0 ---- KAMLOOPS AUT, BC
+71742 4893   -5457  0 151 0 ---- GANDER AIRPORT CS, NFLD
+71743 5790   -7297  0 171 0 ---- RIVIERE AUX FEUILLES, QUE
+71744 4700   -6545  33 33 0 ---- MIRAMICHI RCS, NB
+71746 4300   -8230  0 181 0 ---- SARNIA CLIMATE, ONT
+71747 4875   -9162  0 389 0 ---- ATIKOKAN (AUT), ONT
+71748 5063   -9705  230 230 0 ---- GIMLI CLIMATE, MAN
+71749 4837   -8932  0 199 0 ---- THUNDER BAY AWOS, ONT
+71750 4858   -8628  0 207 0 ---- PUKASKWA (AUT), ONT
+71751 4837   -8912  0 211 0 ---- WELCOME ISLAND (AUT), ONT
+71752 4297   -7933  180 178 0 ---- WELLAND-PELHAM, ONT
+71753 4522   -6305  24 23 0 ---- UPPER STEWIACKE RCS, NS
+71754 5277   -10825 0 548 0 ---- NORTH BATTLEFORD RCS, SASK
+71756 5010   -12293 0 937 0 ---- BLACKCOMB BASE SLIDING CENTER, BC
+71758 4615   -6003  0 62 0 ---- SYDNEY CS, NS
+71761 5412   -11192 0 645 0 ---- VILNA AGCM, ALTA
+71765 5022   -12157 0 225 0 ---- LYTTON RCS, BC
+71766 4933   -12438 0 58 0 ---- QUALICUM BEACH AIRPORT, BC
+71767 4523   -8163  0 213 0 ---- TOBERMORY RCS, ONT
+71768 4955   -11963 0 454 0 ---- SUMMERLAND CS, BC
+71769 4935   -12415 10 12 0 ---- BALLENAS ISLAND, BC
+71770 4907   -11650 0 646 0 ---- CRESTON CAMPBELL SCIENTIFIC, BC
+71771 5302   -13160 0 16 0 ---- CUMSHEWA ISLAND, BC
+71772 4922   -12380 0 5 0 ---- ENTRANCE ISLAND CS, BC
+71773 6072   -13508 0 707 0 ---- WHITEHORSE AUTO, YT
+71774 4857   -12352 0 365 0 ---- MALAHAT, BC
+71775 4920   -12268 0 5 0 ---- PITT MEADOWS CS, BC
+71776 4948   -11730 0 534 0 ---- NELSON CS, BC
+71777 5030   -12273 0 204 0 ---- PEMBERTON AIRPORT CS, BC
+71779 5302   -12250 0 545 0 ---- QUESNEL AIRPORT AUTO, BC
+71780 4837   -12392 0 22 0 ---- SHERINGHAM POINT, BC
+71781 4948   -12443 0 20 0 ---- SISTERS ISLAND, BC
+71782 4973   -11488 0 1137 0 ---- SPARWOOD CS, BC
+71783 4845   -12330 0 60 0 ---- VICTORIA UNIVERSITY CS, BC
+71784 4933   -12318 178 168 0 ---- WEST VANCOUVER AUT, BC
+71785 4902   -12278 0 13 0 ---- WHITE ROCK CAMPBELL SCIENTIFIC, BC
+71786 5143   -11633 0 1615 0 ---- YOHO PARK, BC
+71787 4568   -6515  404 403 0 ---- MECHANIC SETTLEMENT, NB
+71788 4987   -11172 0 783 0 ---- GRASSY LAKE, ALTA
+71789 4978   -11337 0 978 0 ---- FORT MACLEOD AGCM, ALTA
+71791 5307   -11062 0 647 0 ---- GILT EDGE NORTH AGCM, ALTA
+71792 5210   -11215 0 843 0 ---- HALKIRK AGCM, ALTA
+71793 5177   -11120 0 780 0 ---- HEMARUKA AGCM, ALTA
+71794 5257   -11078 0 703 0 ---- HUGHENDEN AGCM, ALTA
+71795 4998   -11025 0 795 0 ---- IRVINE AGCM, ALTA
+71796 5228   -11110 0 720 0 ---- KESSLER AGCM, ALTA
+71797 5335   -11040 0 664 0 ---- KITSCOTY AGCM, ALTA
+71799 4863   -12342 0 19 0 ---- VICTORIA INT'L A, BC
+71800 4665   -5307  0 26 0 ---- CAPE RACE (AUT), NFLD
+71801 4762   -5273  0 140 0 ---- ST.JOHN'S A, NFLD
+71802 4752   -5278  0 112 0 T-T- ST JOHN'S WEST UA, NFLD
+71803 4893   -5457  0 151 0 ---- GANDER INT'L A, NFLD
+71807 4728   -5398  0 19 0 ---- ARGENTIA (AUT), NFLD
+71808 5145   -5718  0 36 0 ---- BLANC-SABLON A, QUE
+71809 4922   -5740  0 21 0 ---- DEER LAKE A, NFLD
+71810 4983   -6428  0 55 0 ---- PORT-MENIER, QUE
+71811 5022   -6625  54 53 0 T-T- SEPT-ILES UA, QUE
+71812 6110   -9407  0 9 0 ---- ARVIAT A, NU
+71813 5018   -6180  0 10 0 ---- NATASHQUAN A, QUE
+71814 5045   -5963  0 7 0 ---- CHEVERY, QUE
+71815 4853   -5855  0 24 0 ---- STEPHENVILLE A, NFLD
+71815 4857   -5857  61 57 0 T-T- STEPHENVILLE UA, NFLD
+71816 5332   -6042  0 48 0 ---- GOOSE A, NFLD
+71816 5330   -6037  38 35 0 T-T- GOOSE UA, NFLD
+71817 5230   -5583  0 11 0 ---- MARY'S HARBOUR A, NFLD
+71818 5370   -5703  0 14 0 ---- CARTWRIGHT, NFLD
+71819 5138   -5607  0 32 0 ---- ST. ANTHONY, NFLD
+71820 4422   -7658  0 93 0 ---- KINGSTON CLIMATE, ONT
+71822 4977   -7453  0 387 0 ---- CHIBOUGAMAU-CHAPAIS A, QUE
+71823 5375   -7368  0 306 0 ---- LA GRANDE IV, QUE
+71823 5375   -7367  0 302 0 T-T- LA GRANDE IV UA, QUE
+71824 4982   -7497  0 381 0 ---- CHAPAIS, QUE
+71825 5292   -6687  0 551 0 ---- WABUSH LAKE A, NFLD
+71826 6613   -6570  0 22 0 ---- PANGNIRTUNG, NU
+71827 5363   -7770  0 194 0 ---- LA GRANDE RIVIERE A,  QUE
+71828 5480   -6680  0 521 0 ---- SCHEFFERVILLE A, QUE
+71829 4925   -6813  0 129 0 ---- BAIE-COMEAU, QUE
+71831 4940   -8247  0 226 0 ---- KAPUSKASING A, ONT
+71832 4973   -8415  0 264 0 ---- NAGAGAMI (AUT), ONT
+71833 4355   -8022  0 325 0 ---- GUELPH TURFGRASS, ONT
+71834 4977   -8692  0 348 0 ---- GERALDTON A, ONT
+71835 5143   -9022  0 390 0 ---- PICKLE LAKE (AUT), ONT
+71836 5128   -8060  0 9 0 ---- MOOSONEE A, ONT
+71836 5127   -8065  11 10 0 T-T- MOOSONEE UA, ONT
+71837 4935   -11310 0 1128 0 ---- ST. MARY RESERVOIR, ALTA
+71839 4928   -11335 0 1115 0 ---- BULLHORN COULEE RESERVOIR, ALTA
+71840 4938   -9832  0 341 0 ---- DEERWOOD RCS, MAN
+71841 5028   -8890  324 322 0 ---- ARMSTRONG (AUT), ONT
+71842 5012   -9190  0 383 0 ---- SIOUX LOOKOUT A, ONT
+71843 4988   -9713  0 251 0 ---- WINNIPEG UA, MAN
+71844 5380   -8988  0 222 0 ---- BIG TROUT LAKE READAC, ONT
+71845 5143   -9020  0 386 0 ---- PICKLE LAKE A, ONT
+71845 5145   -9020  0 386 0 T-T- PICKLE LAKE UA, ONT
+71846 5218   -8793  253 253 0 ---- LANSDOWNE HOUSE (AUT), ONT
+71848 5030   -11285 0 955 0 ---- TRAVERS AGCM, ALTA
+71849 4992   -9723  0 238 0 ---- WINNIPEG 'A' CS, MAN
+71850 4978   -9435  0 409 0 ---- KENORA A, ONT
+71851 4990   -9828  0 272 0 ---- PORTAGE SOUTHPORT, MAN
+71852 4992   -9723  0 238 0 ---- WINNIPEG RICHARDSON INT'L A, MAN
+71853 4977   -9963  0 375 0 T-T- SHILO, MAN
+71854 5107   -9378  0 385 0 ---- RED LAKE A, ONT
+71857 5365   -11007 0 596 0 ---- TULLIBY LAKE AGCM, ALTA
+71858 5318   -9927  0 222 0 ---- GRAND RAPIDS (AUT), MAN
+71860 5110   -11437 0 1200 0 ---- SPRINGBANK A, ALTA
+71861 5037   -10257 0 599 0 ---- BROADVIEW, SASK
+71862 4922   -10297 0 580 0 ---- ESTEVAN A, SASK
+71863 5043   -10467 0 577 0 ---- REGINA INT'L A, SASK
+71864 5033   -10555 0 576 0 ---- MOOSE JAW A, SASK
+71865 5177   -10420 0 560 0 ---- WYNYARD (AUT), SASK
+71866 5217   -10672 0 504 0 ---- SASKATOON DIEFENBAKER INT'L A, SASK
+71867 5397   -10110 0 270 0 ---- THE PAS A, MAN
+71867 5397   -10110 0 274 0 T-T- THE PAS UA, MAN
+71868 5282   -10232 0 358 0 ---- HUDSON BAY (AUT), SASK
+71869 5322   -10567 0 428 0 ---- PRINCE ALBERT A, SASK
+71871 5330   -11007 0 668 0 ---- LLOYDMINSTER, ALTA
+71872 5002   -11072 0 716 0 ---- MEDICINE HAT AWOS, ALTA
+71876 5277   -10825 0 548 0 ---- NORTH BATTLEFORD, SASK
+71877 5110   -11402 0 1084 0 ---- CALGARY INT'L A, ALTA
+71878 5217   -11388 0 904 0 ---- RED DEER A, ALTA
+71879 5357   -11352 0 671 0 ---- EDMONTON CITY CENTRE AWOS, ALTA
+71880 4960   -11577 0 940 0 ---- CRANBROOK A, BC
+71881 5357   -11645 0 926 0 ---- EDSON AWOS A, ALTA
+71882 5095   -11818 0 444 0 ---- REVELSTOKE A, BC
+71883 5212   -11928 0 682 0 ---- BLUE RIVER CS, BC
+71885 4933   -11352 0 1074 0 ---- GLENWOOD, ALTA
+71886 5125   -10245 0 498 0 ---- YORKTON, SASK
+71887 5070   -12043 0 345 0 ---- KAMLOOPS A, BC
+71888 5317   -11172 0 711 0 ---- VIKING AGCM, ALTA
+71889 4945   -11960 0 344 0 ---- PENTICTON A, BC
+71891 5022   -12157 0 225 0 ---- LYTTON, BC
+71892 4918   -12317 0 4 0 ---- VANCOUVER INT'L A, BC
+71893 4972   -12490 0 25 0 ---- COMOX A, BC
+71894 4937   -12653 0 7 0 ---- ESTEVAN POINT CS, BC
+71895 5297   -11343 0 774 0 ---- WETASKIWIN AGCM, ALTA
+71896 5388   -12267 0 691 0 ---- PRINCE GEORGE, BC
+71897 5225   -12872 0 25 0 ---- MCINNES ISLAND, BC
+71898 5428   -13043 0 35 0 ---- PRINCE RUPERT AWOS, BC
+71899 5425   -13305 0 40 0 ---- LANGARA, BC
+71900 5545   -6022  10 11 0 ---- HOPEDALE (AUT), NFLD
+71902 5655   -6168  0 6 0 ---- NAIN A, NFLD
+71903 5425   -13305 0 40 0 ---- LANGARA ISLAND CS, BC
+71904 5193   -11358 0 940 0 ---- WIMBORNE AGCM, ALTA
+71905 4567   -7403  0 82 0 ---- MONTREAL MIRABEL INT'L, QUE
+71906 5810   -6842  0 39 0 ---- KUUJJUAQ A, QUE
+71906 5812   -6842  65 60 0 T-T- KUUJJUAQ, UA, QUE
+71907 5847   -7808  0 25 0 ---- INUKJUAK A, QUE
+71907 5847   -7808  25 24 0 T-T- INUKJUAK UA, QUE
+71908 5390   -12278 0 600 0 T-T- PRINCE GEORGE UA, BC
+71909 6375   -6855  0 33 0 ---- IQALUIT A, NU
+71909 6375   -6855  0 21 0 T-T- IQALUIT UA, NU
+71910 6422   -7652  0 48 0 ---- CAPE DORSET A, NU
+71911 6882   -9343  0 42 0 ---- SHEPHERD BAY A, NU
+71912 5635   -9470  0 145 0 ---- GILLAM A, MAN
+71913 5873   -9407  0 28 0 T-T- CHURCHILL A UA, MAN
+71914 4877   -12312 0 178 0 ---- SATURNA CAPMON CS, BC
+71915 6418   -8335  0 62 0 ---- CORAL HARBOUR A, NU
+71915 6420   -8337  0 57 0 T-T- CORAL HARBOUR UA, NU
+71916 7322   -11953 0 41 0 ---- THOMSEN RIVER, NWT
+71917 7998   -8593  0 10 0 ---- EUREKA, NU
+71917 7998   -8593  0 10 0 T-T- EUREKA UA, NU
+71918 6843   -8972  0 328 0 ---- CAM FOUR, NU
+71920 4345   -6547  5 4 0 ---- BACCARO PT, NS
+71922 5515   -10527 0 378 0 ---- LA RONGE A, SASK
+71923 6112   -10088 0 353 0 ---- ENNADAI LAKE (AUT), NU
+71924 7472   -9497  0 67 0 ---- RESOLUTE CARS, NU
+71924 7470   -9497  0 46 0 T-T- RESOLUTE UA, NU
+71925 6910   -10513 0 27 0 ---- CAMBRIDGE BAY A, NU
+71925 6913   -10507 0 25 0 T-T- CAMBRIDGE BAY UA, NU
+71926 6428   -9607  0 18 0 ---- BAKER LAKE A, NU
+71926 6432   -9600  0 50 0 T-T- BAKER LAKE UA, NU
+71927 4882   -12372 0 60 0 ---- NORTH COWICHAN, BC
+71928 5242   -11490 0 988 0 ---- ROCKY MTN HOUSE (AUT), ALTA
+71930 5413   -11578 0 782 0 ---- WHITECOURT A, ALTA
+71931 4910   -5357  0 19 0 ---- POOLS ISLAND, NFLD
+71933 5877   -11112 0 238 0 ---- FORT CHIPEWYAN AWOS A, ALTA
+71934 6002   -11195 0 204 0 ---- FORT SMITH A, NWT
+71934 6002   -11192 0 204 0 T-T- FORT SMITH UA, NWT
+71935 6083   -11577 0 164 0 ---- HAY RIVER A, NWT
+71936 6245   -11443 0 205 0 ---- YELLOWKNIFE A, NWT
+71937 6850   -11322 0 15 0 ---- LADY FRANKLIN POINT A, NU
+71938 6782   -11513 0 22 0 ---- KUGLUKTUK A, NU
+71940 5517   -11888 0 669 0 ---- GRANDE PRAIRIE A, ALTA
+71941 4805   -7777  0 337 0 ---- VAL D' OR, QUE
+71943 5623   -12073 0 694 0 ---- FORT ST JOHN A, BC
+71944 5530   -12313 0 690 0 ---- MACKENZIE A, BC
+71945 5883   -12258 0 381 0 ---- FORT NELSON A, BC
+71945 5883   -12260 381 378 0 T-T- FORT NELSON UA, BC
+71946 6175   -12123 0 169 0 ---- FORT SIMPSON A, NWT
+71947 4975   -7780  0 279 0 ---- MATAGAMI, QUE
+71948 7017   -12472 0 86 0 ---- CAPE PARRY A, NWT
+71949 6220   -13337 717 716 0 ---- FARO (AUT), YT
+71950 5482   -12717 0 523 0 ---- SMITHERS, BC
+71951 5445   -12857 0 217 0 ---- TERRACE A, BC
+71952 5437   -12595 0 713 0 ---- BURNS LAKE DECKER LAKE, BC
+71954 5468   -10168 0 303 0 ---- FLIN FLON, MAN
+71956 4588   -8257  0 188 0 ---- GORE BAY CLIMATE, ONT
+71957 6830   -13348 0 68 0 ---- INUVIK AWOS A, NWT
+71957 6832   -13352 0 103 0 T-T- INUVIK UA, NWT
+71959 4663   -6093  0 43 0 ---- CHETICAMP CS, NS
+71960 6960   -13090 0 101 0 ---- LIVERPOOL BAY, NWT
+71962 4865   -9343  0 342 0 ---- FORT FRANCES RCS, ONT
+71963 6360   -10513 0 317 0 ---- HANBURY RIVER, NWT
+71964 6070   -13507 0 706 0 ---- WHITEHORSE A, YT
+71964 6073   -13507 0 707 0 T-T- WHITEHORSE UA, YT
+71966 6405   -13913 370 370 0 ---- DAWSON, YT
+71967 4582   -7253  0 85 0 ---- SAINT-GERMAIN-DE-GRANTHAM, QUE
+71968 6895   -13722 0 49 0 ---- SHINGLE POINT A, YT
+71970 5413   -10852 0 481 0 ---- MEADOW LAKE, SASK
+71971 7642   -8290  0 44 0 ---- GRISE FIORD CLIMATE, NU
+71972 6160   -6463  0 368 0 ---- RESOLUTION ISLAND, NU
+71973 4893   -5792  0 151 0 ---- CORNER BROOK, NFLD
+71974 7413   -11998 0 32 0 ---- AULAVIK NATIONAL PARK, NWT
+71975 6495   -6357  0 582 0 ---- CAPE MERCY, NU
+71976 6130   -7367  0 503 0 ---- PARC NATIONAL DES PINGUALUIT, QUE
+71977 6880   -14083 0 568 0 ---- MARGARET LAKE, YT
+71978 6915   -14015 0 243 0 ---- IVVAVIK NAT. PARK, YT
+71979 5378   -11843 0 1448 0 ---- HENDRICKSON CREEK, ALTA
+71980 6195   -12720 0 618 0 ---- RABBIT KETTLE, NWT
+71981 5050   -11400 0 1143 0 ---- AZURE, ALTA
+71982 5070   -11415 0 1156 0 ---- BLACK DIAMOND, ALTA
+71983 7537   -10570 0 15 0 ---- REA POINT, NU
+71984 6935   -12407 0 6 0 ---- PAULATUK, NWT
+71985 6943   -13302 5 4 0 ---- TUKTOYAKTUK, NWT
+71986 5080   -11100 0 795 0 ---- ATLEE AGCM, ALTA
+71987 4705   -6398  0 7 0 ---- NORTH CAPE, PEI
+71989 7623   -11933 0 1 0 ---- MOULD BAY CS, NWT
+71990 6323   -13003 0 1379 0 ---- MACMILLAN PASS, YT
+71999 5068   -12193 0 235 0 ---- LILLOOET, BC
+78383 1968   -7988  0 0 0 ---- CAYMAN BRAC
+78384 1928   -8135  3 3 0 T-T- OWEN ROBERTS AIRPORT GRAND CAYMAN
+78825 1028   -10922 2 1 0 ---- CLIPPERTON
+80001 1258   -8172  6 1 0 --T- SAN ANDRES (ISLA)/SESQUICENTENARIO
+80002 1337   -8135  0 6 0 ---- PROVIDENCIA (ISLA)/EL EMBRUJO
+78760 997    -8483  3 5 0 ---- PUNTARENAS
+78762 998    -8418  908 0 0 --T- JUAN SANTAMARIA INT. AIRPORT
+78764 995    -8413  997 0 0 ---- TOBIAS BOLANOS PALMA INTERNATIONAL AIRPORT
+78767 997    -8302  3 5 0 ---- PUERTO LIMON
+78774 1060   -8553  80 80 0 ---- DANIEL ODUBER INT. AIRPORT
+78221 2183   -8278  23 0 0 ---- NUEVA GERONA, ISLA DE PINOS
+78224 2298   -8240  75 0 0 ---- AEROPUERTO JOSE MARTI, RANCHO-BOYEROS,  HABANA
+78229 2302   -8143  65 0 0 ---- VARADERO/MT
+78244 2215   -8040  39 0 0 ---- CIENFUEGOS,  LAS VILLAS
+78255 2142   -7785  118 0 0 ---- CAMAGUEY AEROPUERTO
+78256 2033   -7712  60 0 0 ---- MANZANILLO, ORIENTE
+78264 1997   -7585  55 0 0 ---- SANTIAGO DE CUBA,  ORIENTE
+78267 2008   -7515  8 0 0 ---- GUANTANAMO, ORIENTE
+78268 2035   -7450  9 0 0 ---- BARACOA, ORIENTE
+78310 2187   -8495  8 0 0 ---- CABO SAN ANTONIO,  PINAR DEL RIO
+78311 2192   -8447  4 0 0 ---- LA BAJADA, PINAR DEL RIO
+78312 2267   -8397  24 0 0 ---- SANTA LUCIA,  PINAR DEL RIO
+78313 2217   -8410  28 0 0 ---- ISABEL RUBIO, PINAR DEL RIO
+78314 2228   -8383  30 0 0 ---- SAN JUAN Y MARTINEZ,  PINAR DEL RIO
+78315 2242   -8368  37 0 0 ---- PINAR DEL RIO
+78316 2277   -8355  47 0 0 ---- LA PALMA, PINAR DEL RIO
+78317 2255   -8330  44 0 0 ---- PASO REAL DE SAN DIEGO, PINAR DEL RIO
+78318 2292   -8317  3 0 0 ---- BAHIA HONDA, PINAR DEL RIO
+78319 2280   -8275  42 0 0 ---- ARTEMISA, LA HABANA
+78320 2278   -8252  10 0 0 ---- GUIRA DE MELENA,  LA HABANA
+78321 2173   -8277  32 0 0 ---- LA FE, ISLA DE LA JUVENTUD
+78322 2272   -8228  7 0 0 ---- BATABANO, LA HABANA
+78323 2285   -8203  55 0 0 ---- GUINES, LA HABANA
+78324 2155   -8253  10 0 0 ---- PUNTA DEL ESTE,  ISLA DE LA JUVENTUD
+78325 2317   -8235  50 0 0 --P- CASA BLANCA,  LA HABANA
+78327 2277   -8153  30 0 0 ---- UNION DE REYES,  MATANZAS
+78328 2325   -8142  0 0 0 ---- VARADERO
+78329 2282   -8100  19 0 0 ---- INDIO HATUEY,  MATANZAS
+78330 2278   -8118  25 0 0 ---- JOVELLANOS, MATANZAS
+78331 2263   -8127  5 0 0 ---- JAGUEY GRANDE,  MATANZAS
+78332 2268   -8093  35 0 0 ---- COLON, MATANZAS
+78333 2207   -8103  5 0 0 ---- PLAYA GIRON, MATANZAS
+78335 2238   -8085  27 0 0 ---- AGUADA DE PASAJEROS,  CIENFUEGOS
+78336 2192   -8017  1140 0 0 ---- PICO SAN JUAN,  CIENFUEGOS
+78337 2178   -7998  54 0 0 ---- TRINIDAD,  SANCTI SPIRITUS
+78338 2282   -8008  22 0 0 ---- SAGUA LA GRANDE,  VILLA CLARA
+78339 2252   -7845  2 0 0 ---- CAYO COCO,  CIEGO DE AVILA
+78340 2303   -8192  80 0 0 ---- BAINOA, LA HABANA
+78341 2172   -7922  30 0 0 ---- EL JIBARO,  SANCTI SPIRITUS
+78342 2192   -8002  771 0 0 ---- TOPES DE COLLANTES,  SANCTI SPIRITUS
+78343 2243   -7998  116 0 0 ---- EL YABU, VILLA CLARA
+78344 2192   -8017  42 0 0 ---- CANTARRANA,  CIENFUEGOS
+78345 2162   -7885  1 0 0 ---- JUCARO, CIEGO DE AVILA
+78346 2178   -7878  26 0 0 ---- VENEZUELA, CIEGO DE AVILA
+78347 2215   -7875  16 0 0 ---- CAMILO CIENFUEGOS,  CIEGO DE AVILA
+78348 2252   -7945  6 0 0 ---- CAIBARIEN, VILLA CLARA
+78349 2193   -7945  97 0 0 ---- SANCTI SPIRITUS,  SANCTI SPIRITUS
+78350 2152   -7823  58 0 0 ---- FLORIDA, CAMAGUEY
+78351 2072   -7800  2 0 0 ---- SANTA CRUZ DEL SUR,  CAMAGUEY
+78352 2185   -7812  31 0 0 ---- ESMERALDA, CAMAGUEY
+78353 2153   -7725  4 0 0 ---- NUEVITAS, CAMAGUEY
+78354 2113   -7732  96 0 0 ---- PALO SECO, CAMAGUEY
+78355 2140   -7785  122 0 0 --P- CAMAGUEY
+78357 2095   -7695  106 0 0 ---- LAS TUNAS, LAS TUNAS
+78358 2120   -7662  13 0 0 ---- PUERTO PADRE,  LAS TUNAS
+78359 2033   -7713  10 0 0 ---- MANSANILLO, GRANMA
+78360 1985   -7723  10 0 0 ---- CABO CRUZ, GRANMA
+78361 2067   -7690  12 0 0 ---- JUCARITO, GRANMA
+78362 2093   -7653  105 0 0 ---- LA JIQUIMA, HOLGUIN
+78363 2028   -7625  100 0 0 ---- CONTRAMAESTRE,  SANTIAGO DE CUBA
+78364 2005   -7582  38 0 0 ---- UNIVERSIDAD,  SANTIAGO DE CUBA
+78365 2107   -7562  4 0 0 ---- PUNTA LUCRECIA,  HOLGUIN
+78366 2003   -7563  1226 0 0 ---- GRAN PIEDRA,  SANTIAGO DE CUBA
+78367 1990   -7513  23 0 0 TPTP GUANTANAMO, ORIENTE
+78368 2013   -7523  55 0 0 ---- GUANTANAMO,  GUANTANAMO
+78369 2025   -7415  10 0 0 ---- PUNTA DE MAISI,  GUANTANAMO
+78370 2067   -7578  20 0 0 ---- GUARO, HOLGUIN
+78371 2048   -7580  646 0 0 ---- PINARES DE MAYARI,  HOLGUIN
+78373 2297   -8238  78 0 0 ---- SANTIAGO DE LAS VEGAS, CIUDAD HABANA
+78374 2302   -8213  120 0 0 ---- TAPASTE, LA HABANA
+78375 2277   -8213  25 0 0 ---- MELENA DEL SUR,  LA HABANA
+78376 2297   -8253  65 0 0 ---- BAUTA, LA HABANA
+78377 2032   -7688  30 0 0 ---- VEGUITAS, GRANMA
+78378 2108   -7630  35 0 0 ---- VELASCO, HOLGUIN
+78379 1992   -7742  900 0 0 ---- LOMA EL MANEY, GRANMA
+78988 1220   -6897  9 8 0 ---- HATO AIRPORT, CURACAO
+78988 1220   -6897  54 8 0 T-T- HATO AIRPORT, CURACAO
+78990 1215   -6828  7 6 0 ---- FLAMINGO AIRPORT,  BONAIRE
+78905 1553   -6130  16 14 0 ---- MELVILLE HALL AIRPORT
+78906 1533   -6138  5 5 0 ---- CANEFIELD AIRPORT
+78451 1988   -7165  2 0 0 ---- MONTE CRISTI
+78458 1975   -7055  0 5 0 ---- PUERTO PLATA
+78460 1945   -7070  0 183 0 ---- SANTIAGO
+78464 1963   -6988  14 0 0 ---- CABRERA
+78466 1920   -6945  42 0 0 ---- ARROYO BARRIL
+78467 1905   -6938  10 0 0 ---- SABANA DE LA MAR
+78470 1882   -7130  435 0 0 ---- SAN JUAN DE LA MAGUANA
+78473 1875   -6963  76 0 0 ---- BAYAGUANA
+78479 1857   -6837  0 12 0 ---- PUNTA CANA
+78480 1833   -7185  56 0 0 ---- JIMANI
+78482 1820   -7110  0 3 0 ---- BARAHONA
+78484 1847   -6997  0 65 0 ---- HERRERA
+78485 1843   -6967  0 18 0 ---- LAS AMERICAS
+78486 1843   -6988  14 0 0 --T- SANTO DOMINGO
+78488 1845   -6892  0 94 0 ---- AEROPUERTO INTERNACIONAL DE LA ROMANA
+78650 1357   -8983  12 15 0 ---- ACAJUTLA
+78655 1397   -8953  656 715 0 ---- SANTA ANA/UNICO
+78663 1368   -8912  617 616 0 ---- SAN SALVADOR/ILOPANGO
+78666 1343   -8905  21 25 0 ---- EL SALVADOR INTL. AIRPORT/COMALAPA
+78670 1343   -8815  0 117 0 ---- SAN MIGUEL/UES
+78672 1332   -8780  0 28 0 ---- LA UNION/CPI
+78958 1200   -6178  7 6 0 ---- POINT SALINES AIRPORT
+78890 1633   -6100  27 26 0 ---- LA DESIRADE METEO
+78891 1630   -6133  0 21 0 ---- LE MOULE
+78894 1790   -6285  45 44 0 ---- ST. BARTHELEMY METEO
+78896 1625   -6152  9 0 1 ---- POINTE-A-PITRE (CTBT)
+78897 1625   -6150  8 11 0 T-T- LE RAIZET AERO
+78615 1692   -8988  115 0 0 ---- TIKAL
+78625 1632   -8942  500 0 0 ---- POPTUN
+78627 1532   -9147  1901 0 0 ---- HUEHUETENANGO
+78629 1482   -9150  0 0 0 ---- QUETZALTENANGO
+78631 1548   -9032  1316 0 0 ---- COBAN A.V.
+78637 1572   -8860  1 0 0 ---- PUERTO BARRIOS
+78639 1453   -9167  239 0 0 ---- RETALHULEU
+78640 1458   -9052  1502 0 0 ---- GUATEMALA (OBSERVATORIO NACIONAL)
+78641 1458   -9052  1489 0 0 --T- GUATEMALA (AEROPUERTO LA AURORA)
+78647 1392   -9082  2 0 0 ---- SAN JOSE
+78649 1495   -8953  0 0 0 ---- LA FRAGUA, ZACAPA
+78401 1982   -7338  0 0 0 ---- MOLE SAINT-NICOLAS
+78409 1975   -7218  3 2 0 ---- CAP-HAITIEN
+78435 1862   -7408  0 0 0 ---- JEREMIE
+78437 1860   -7228  15 14 0 ---- PORT-AU-PRINCE (DAMIEN)
+78439 1857   -7230  34 31 0 ---- PORT-AU-PRINCE/AEROPORT INT.
+78447 1818   -7373  2 1 0 ---- LES CAYES
+78449 1823   -7253  0 0 0 ---- JACMEL
+78501 1740   -8393  11 9 0 ---- ISLAS DEL CISNE
+78700 1327   -8765  0 0 0 ---- AMAPALA
+78701 1647   -8592  2 2 0 ---- GUANAJA
+78703 1632   -8652  5 0 0 ---- ROATAN
+78704 1592   -8592  0 0 0 ---- TRUJILLO
+78705 1573   -8687  26 0 0 ---- LA CEIBA (AIRPORT)
+78706 1572   -8748  3 0 0 ---- TELA
+78707 1517   -8712  670 0 0 ---- YORO
+78708 1545   -8793  31 0 0 ---- LA MESA (SAN PEDRO SULA)
+78711 1522   -8380  13 0 0 ---- PUERTO LEMPIRA
+78714 1490   -8593  442 0 0 ---- CATACAMAS
+78717 1478   -8878  1079 0 0 ---- SANTA ROSA DE COPAN
+78718 1443   -8918  626 0 0 ---- NUEVA OCOTEPEQUE
+78719 1432   -8815  1674 0 0 ---- LA ESPERANZA
+78720 1405   -8722  1007 0 0 ---- TEGUCIGALPA
+78721 1437   -8762  628 0 0 --T- SOTO CANO AB
+78724 1332   -8715  57 0 0 ---- CHOLUTECA
+78387 1825   -7837  10 9 0 ---- NEGRIL POINT
+78388 1850   -7792  8 1 0 ---- MONTEGO BAY/SANGSTER
+78397 1793   -7678  14 3 0 T-T- KINGSTON/NORMAN MANLEY
+78397 1807   -7685  0 786 0 ---- COOPERS HILL
+78399 1792   -7618  2 2 0 ---- MORANT POINT
+78922 1477   -6087  39 26 0 ---- TRINITE-CARAVELLE
+78924 1450   -6102  0 353 0 ---- LE DIAMANT
+78925 1458   -6098  8 3 0 ---- LAMENTIN-AERO
+76040 3240   -11518 0 11 0 ---- EJIDO NUEVO LEON BC.
+76050 3167   -11657 0 10 0 ---- ENSENADA B.C. (FAM)
+76055 3102   -11482 0 15 0 ---- SAN FELIPE, BCN
+76061 3130   -11355 0 61 0 ---- PUERTO PENASCO, SON.
+76113 3072   -11183 0 397 0 ---- ALTAR, SON.
+76118 3037   -10968 0 1040 0 ---- PILARES DE NACOZARI,  SON.
+76122 3037   -10795 0 1468 0 ---- NUEVA CASAS GRANDES,  CHIH.
+76160 2908   -11093 0 211 0 ---- HERMOSILLO, SON.
+76220 2895   -10782 0 1932 0 ---- TEMOSACHIC, CHIH.
+76225 2867   -10603 0 1472 0 T-T- CHIHUAHUA, CHIH.
+76243 2870   -10052 0 250 0 ---- PIEDRAS NEGRAS, COAH.
+76253 2728   -11225 0 82 0 ---- SANTA ROSALIA, BCS
+76256 2795   -11080 0 12 0 ---- EMPALME, SON.
+76258 2748   -10992 0 38 0 ---- CIUDAD OBREGON, SON.
+76305 2602   -11133 0 7 0 ---- LORETO, BCS
+76311 2670   -10832 0 238 0 ---- CHOIX, SIN.
+76323 2692   -10567 0 1785 0 ---- HIDALGO DEL PARRAL,  CHIH.
+76342 2690   -10143 0 615 0 ---- MONCLOVA, COAH.
+76373 2533   -10572 0 1810 0 ---- TEPEHUANES, DGO.
+76382 2152   -10343 0 1123 0 ---- TORREON, COAH.
+76390 2537   -10102 0 1790 1 ---- SALTILLO, COAH.
+76393 2573   -10030 0 515 0 ---- MONTERREY, N.L.
+76394 2587   -10023 0 448 0 T-T- AEROP.INTERNACIONAL MONTERREY, N.L.
+76401 2447   -11183 0 5 0 ---- PUERTO CORTEZ, B.C. (SM)
+76402 2500   -11163 0 48 0 ---- CIUDAD CONSTITUCION, BCS
+76405 2412   -11032 0 18 0 T-T- LA PAZ, BCS
+76412 2463   -10743 0 39 0 ---- CULIACAN, SIN.
+76423 2408   -10460 0 1872 1 ---- DURANGO, DGO.
+76458 2322   -10640 0 3 0 T-T- COLONIA JUAN CARRASCO MAZATLAN, SIN.
+76471 2363   -10365 0 2351 0 ---- SOMBRERETE, ZAC.
+76491 2373   -9917  0 336 0 ---- CIUDAD VICTORIA,  TAMPS.
+76499 2377   -9820  0 21 0 ---- SOTO LA MARINA,  TAMPS.
+76519 2210   -10327 0 1736 0 ---- COLOTLAN, JAL.
+76525 2278   -10257 0 2612 0 ---- ZACATECAS, ZAC. (LA BUFA, ZAC.)
+76539 2220   -10102 0 1883 1 ---- SAN LUIS POTOSI,  S.L.P.
+76543 2200   -9878  0 23 0 ---- TAMUIN, S.L.P.
+76548 2220   -9785  0 25 0 ---- TAMPICO, TAMPS
+76551 2162   -10655 0 2 0 ---- ISLAS MARIAS, NAY.
+76556 2148   -10488 0 915 1 ---- TEPIC, NAY.
+76571 2185   -10228 0 1877 1 ---- AGUASCALIENTES, AGS.
+76573 2133   -10193 0 1920 0 ---- LAGOS DE MORENO, JAL.
+76577 2100   -10128 0 1999 0 ---- GUANAJUATO, GTO.
+76581 2192   -9998  0 983 1 ---- RIO VERDE, S.L.P.
+76585 2127   -9880  0 132 0 ---- MATLAPA, S.L.P.
+76593 2127   -8965  0 2 0 ---- PROGRESO, YUC.
+76595 2102   -8685  0 9 0 T-T- CANCUN
+76612 2070   -10338 0 1551 0 --T- GUADALAJARA, JAL.
+76625 2058   -10040 0 1880 1 ---- QUERETARO, QRO.
+76632 2012   -9875  0 2425 1 ---- PACHUCA, HGO.
+76634 2008   -9835  0 2214 0 ---- TULANCINGO, HGO.
+76640 2095   -9742  0 10 0 ---- TUXPAN.VER.
+76644 2095   -8965  0 11 0 T-T- AEROP.INTERNACIONAL MERIDA, YUC
+76647 2068   -8820  0 27 0 ---- VALLADOLID, YUC.
+76649 2052   -8693  0 4 0 ---- COZUMEL (FAM) Q. ROC
+76654 1907   -10433 0 3 0 T-T- MANZANILLO, COL.
+76656 1972   -10347 0 1515 1 ---- CIUDAD GUZMAN, JAL.
+76658 1923   -10372 0 444 0 ---- COLIMA, COL.
+76662 1998   -10232 0 1562 0 ---- ZAMORA, MICH.
+76665 1970   -10118 0 1913 0 ---- MORELIA, MICH.
+76670 1968   -9918  0 2251 0 ---- FES CUAUTITLAN
+76675 1928   -9970  0 2720 1 ---- TOLUCA, MEX.
+76679 1943   -9913  0 2235 0 T-T- AEROP. INTERNACIONAL MEXICO, D.F.
+76680 1940   -9918  0 2309 0 ---- MEXICO (CENTRAL),  D.F.
+76681 1932   -9918  0 2278 0 ---- GEOGRAFIA UNAM D.F.
+76683 1932   -9823  0 2248 1 ---- TLAXCALA, TLAX.
+76685 1905   -9817  0 2179 1 ---- PUEBLA, PUE.
+76687 1950   -9690  0 1360 0 ---- JALAPA, VER.
+76692 1915   -9613  0 19 0 T-T- HACIENDA YLANG YLANG VERACRUZ, VER.
+76695 1983   -9050  0 5 0 ---- CAMPECHE, CAMP.
+76698 1957   -8805  0 10 0 ---- FELIPE CARRILLO PUERTO, Q.ROO
+76723 1872   -11095 0 34 0 T-T- ISLA SOCORRO, COL.
+76726 1888   -9923  0 1618 0 ---- CUERNAVACA, MOR.
+76737 1885   -9710  0 1259 1 ---- ORIZABA, VER.
+76741 1818   -9450  0 16 0 ---- COATZACOALCOS, VER.
+76743 1798   -9293  0 6 0 --T- VILLAHERMOSA, TAB.
+76750 1848   -8830  0 9 0 ---- CHETUMAL, Q.R.
+76751 1900   -8632  0 13 0 ---- CHETUMAL, Q. ROO (FAM)
+76762 1755   -9950  0 1265 1 ---- CHILPANCINGO, RO.
+76773 1780   -9777  0 1680 0 ---- HUAJUAPAN DE LEON,  OAX.
+76775 1707   -9670  0 1519 0 ---- OAXACA, OAX.
+76805 1675   -9975  0 3 0 T-T- ACAPULCO, GRO.
+76833 1617   -9517  0 2 0 ---- SALINA CRUZ, OAX.
+76840 1623   -9390  0 48 0 ---- ARRIAGA, CHIS.
+76843 1675   -9313  0 570 0 ---- TUXTLA GUTIERREZ,  CHIS.
+76845 1673   -9263  0 2115 1 ---- SN. CRISTOBAL LAS CASAS, CHIS.
+76848 1623   -9213  0 1646 1 ---- COMITAN, CHIS.
+76855 1565   -9648  0 43 0 ---- PUERTO ANGEL, OAX.
+76903 1492   -9225  0 118 0 ---- TAPACHULA, CHIS
+78866 1803   -6312  4 3 0 T-T- JULIANA AIRPORT,  ST. MAARTEN
+78873 1748   -6298  40 39 0 ---- ROOSEVELT AIRPORT ST. EUSTATIUS
+78982 1250   -7002  5 3 0 ---- QUEEN BEATRIX AIRPORT, ARUBA
+78728 1290   -8618  465 0 0 ---- SAN ISIDRO
+78729 1337   -8640  560 0 0 ---- CONDEGA
+78730 1407   -8363  20 0 0 --T- PUERTO CABEZAS
+78731 1172   -8605  95 0 0 ---- NANDAIME
+78732 1190   -8615  450 0 0 ---- MASATEPE
+78733 1142   -8583  70 0 0 ---- RIVAS
+78734 1308   -8598  1032 0 0 ---- JINOTEGA
+78735 1210   -8537  90 0 0 ---- JUIGALPA
+78736 1255   -8698  80 0 0 ---- POSOLTEGA
+78737 1245   -8687  110 0 0 ---- LEON
+78738 1252   -8720  10 0 0 ---- CORINTO
+78739 1263   -8713  60 0 0 ---- CHINANDEGA
+78740 1362   -8647  612 0 0 ---- OCOTAL
+78741 1215   -8617  56 0 0 P-P- MANAGUA A.C.SANDINO
+78742 1225   -8655  76 0 0 ---- NAGAROTE
+78743 1277   -8563  320 0 0 ---- MUY MUY
+78744 1113   -8478  40 0 0 ---- SAN CARLOS
+78745 1200   -8377  5 0 0 ---- BLUEFIELDS
+78789 925    -7803  2 1 0 ---- AILIGANDI
+78792 905    -7937  0 45 0 ---- TOCUMEN
+78793 840    -8242  26 29 0 ---- DAVID
+78795 808    -8095  88 83 0 ---- SANTIAGO
+78807 897    -7957  0 7 0 --T- COROZAL OESTE
+78526 1842   -6598  3 4 0 T-T- SAN JUAN/INT.,  PUERTO RICO
+78535 1825   -6563  0 0 0 PPPP ROOSEVELT ROADS/NS,  PUERTO RICO
+78543 1833   -6497  67 3 0 ---- C. AMALIE/TRUMAN,  ST. THOMAS
+78545 1777   -6488  0 21 0 ---- HAM BLUFF LIGHT,  ST. CROIX
+78547 1770   -6480  17 17 0 ---- CHRISTIANSTED/ALEX. HAMILTON FIELD,  ST. CROIX
+78551 1770   -6478  13 0 0 ---- CHRISTAINSTED, VI, HENRY E ROHLSEN ARPT
+78857 1728   -6273  9 30 0 ---- BASSETERRE
+78858 1730   -6268  48 48 0 ---- GOLDEN ROCK
+78947 1402   -6100  2 2 0 ---- GEORGE F.L. CHARLES AIRPORT
+78948 1375   -6095  10 3 0 ---- HEWANORRA INT'L AIRPORT
+78951 1313   -6120  13 9 0 ---- ARNOS VALE
+71805 4675   -5617  7 8 0 ---- SAINT-PIERRE
+78962 1115   -6083  6 3 0 ---- CROWN POINT AIRPORT,  TOBAGO
+78969 1063   -6150  0 3 0 ---- PORT OF SPAIN
+78970 1062   -6135  15 12 0 --T- PIARCO INT. AIRPORT,  TRINIDAD
+78114 2177   -7227  4 0 0 ---- PROVIDENCIALES
+78118 2145   -7115  10 8 0 ---- TURKS ISLAND
+70026 7128   -15678 11 11 0 T-T- BARROW/W. POST W. ROGERS
+70086 7013   -14363 15 2 0 ---- BARTER ISLAND
+70104 6888   -16613 0 3 0 ---- CAPE LISBURNE AFS
+70116 6562   -16805 5 9 0 ---- WALES
+70117 6557   -16792 0 83 0 ---- TIN CITY AFS
+70119 6525   -16687 5 3 0 ---- PORT CLARENCE
+70121 6982   -16292 0 0 0 ---- POINT LAY
+70133 6688   -16260 5 5 0 T-T- KOTZEBUE, RALPH WIEN
+70162 6937   -15213 85 81 0 ---- UMIAT
+70173 6600   -15370 0 389 0 ---- INDIAN MOUNTAIN AFS
+70174 6692   -15152 196 196 0 ---- BETTLES
+70178 6517   -15210 67 69 0 ---- TANANA
+70194 6657   -14527 135 0 0 ---- FORT YUKON
+70197 6548   -14467 252 0 0 PPPP CENTRAL, AK
+70200 6450   -16543 11 6 0 T-T- NOME, AK
+70207 6388   -16080 6 6 0 ---- UNALAKLEET
+70212 6178   -16603 0 146 0 ---- CAPE ROMANZOFF AFS
+70218 6000   -16600 0 0 0 ---- NUNIVAK
+70219 6077   -16183 44 33 0 T-T- BETHEL/BETHEL AIRPORT, AK
+70222 6473   -15693 49 46 0 ---- GALENA A.
+70231 6295   -15558 103 103 0 T-T- MCGRATH, AK
+70232 6158   -15953 26 26 0 ---- ANIAK
+70235 6110   -15557 0 484 0 ---- SPARREVOHN AFS
+70246 6390   -15227 214 208 0 ---- MINCHUMINA
+70248 6252   -15388 458 468 0 ---- FAREWELL/INTERMEDIATE FIELD
+70249 6210   -15275 0 560 0 ---- PUNTILLA
+70251 6230   -15010 109 109 0 ---- TALKEETNA
+70252 6230   -15042 151 0 0 PPPP TALKEETNA, AK
+70259 6057   -15125 29 28 0 ---- KENAI
+70260 6455   -14908 0 110 0 ---- NENANA/MUN.
+70261 6480   -14787 135 133 0 T-T- FAIRBANKS/INT., AK
+70264 6333   -14913 0 734 0 ---- SUMMIT
+70265 6465   -14707 167 0 0 ---- FAIRBANKS/EIELSON AFB
+70266 6397   -14570 398 0 0 T-TT FORT GREELY, AK
+70267 6400   -14573 391 0 0 ---- FORT GREELY/ALLEN AAF, AK
+70268 6210   -14597 573 0 0 PPPP GLENNALLEN, AK
+70270 6127   -14965 115 0 0 ---- FT. RICHARDSON/BRYANT AHP, AK
+70271 6215   -14545 481 481 0 ---- GULKANA/INTL. FLD.
+70272 6125   -14980 59 0 0 ---- ANCHORAGE/ELMENDORF AFB
+70273 6115   -14998 43 52 0 T-T- ANCHORAGE/INT., AK
+70274 6160   -14908 0 71 0 ---- PALMER
+70275 6113   -14635 10 11 0 ---- VALDEZ
+70277 6012   -14945 18 9 0 ---- SEWARD
+70279 6023   -14665 56 56 0 ---- CAPE HINCHINBROOK
+70291 6297   -14193 525 523 0 ---- NORTHWAY
+70296 6050   -14550 13 12 0 ---- CORDOVA/MILE 13
+70298 6008   -14250 11 4 0 ---- YAKATAGA
+70305 5865   -16207 0 161 0 ---- CAPE NEWENHAM AFS
+70308 5715   -17022 9 10 0 T-T- ST. PAUL ISLANDS, AK
+70316 5520   -16270 32 25 0 T-T- COLD BAY, AK
+70321 5905   -15852 29 26 0 ---- DILLINGHAM MUNI, AK
+70326 5867   -15665 16 8 0 T-T- KING SALMON, AK
+70333 5695   -15862 0 29 0 ---- PORT HEIDEN
+70340 5975   -15492 49 63 0 ---- ILIAMNA/ILIAMNA AIRPORT
+70341 5963   -15150 22 24 0 ---- HOMER/MUNICIPAL
+70343 5943   -14633 14 27 0 ---- MIDDLETON ISLAND, AK
+70350 5773   -15248 33 5 0 T-T- KODIAK, AK
+70361 5952   -13967 13 10 0 T-T- YAKUTAT, AK
+70362 5947   -13530 5 16 0 ---- SKAGWAY
+70367 5842   -13573 9 11 0 ---- GUSTAVUS
+70371 5707   -13535 20 6 0 ---- SITKA
+70381 5837   -13458 7 5 0 ---- JUNEAU
+70383 5750   -13458 11 0 0 ---- ANGOON
+70385 5727   -13362 11 0 0 ---- FIVE FINGER LIGHT
+70386 5682   -13297 0 0 0 ---- PETERSBURG
+70387 5648   -13237 13 13 0 ---- WRANGELL
+70395 5535   -13170 29 29 0 ---- KETCHIKAN, INTL.
+70398 5503   -13157 35 34 0 T-T- ANNETTE ISLAND, AK
+70409 5283   17318  0 21 0 ---- ATTU
+70414 5272   17410  31 29 0 T-T- SHEMYA AFB
+70482 5295   -16885 0 21 0 ---- NIKOLSKI
+72201 2455   -8175  4 2 0 T-T- KEY WEST/INT., FL
+72202 2575   -8038  5 4 0 ---- MIAMI, FL
+72202 2575   -8037  4 4 0 T-T- MIAMI, FL
+72203 2668   -8010  6 7 0 ---- WEST PALM BEACH/ INT. FL.
+72205 2843   -8132  32 29 0 ---- ORLANDO/JETPORT FL.
+72206 3048   -8170  10 10 0 T-T- JACKSONVILLE/INTNL.,  FL.
+72207 3213   -8120  15 15 0 ---- SAVANNAH/MUNICIPAL,  GA.
+72208 3288   -8002  14 13 0 T-T- CHARLESTON/MUN., SC.
+72209 3188   -8157  14 14 0 TPTP FT. STEWART, GA
+72210 2770   -8240  14 13 0 T-T- TAMPA BAY AREA, FL.
+72211 2797   -8253  3 8 0 ---- TAMPA/INT., FL.
+72212 2962   -8310  13 13 0 ---- CROSS CITY/CROSS CITY A., FL.
+72213 3125   -8240  46 46 0 ---- WAYCROSS/WARE CO., GA
+72214 3043   -8428  52 52 0 T-T- TALLAHASSEE/MUN.,  FL.
+72215 3352   -8457  256 244 0 T-T- PEACHTREE CITY, GA.
+72216 3153   -8418  59 60 0 ---- ALBANY/MUN., GA
+72217 3270   -8365  110 108 0 ---- MACON/LEWIS B.WILSON, GA.
+72218 3337   -8197  45 44 0 ---- AUGUSTA/BUSH FIELD,  GA.
+72219 3365   -8442  315 312 0 ---- ATLANTA/MUN., GA.
+72220 2973   -8503  6 6 0 ---- APALACHICOLA/MUN.,  FL.
+72221 3048   -8652  29 0 0 --T- VALPARAISO/EGLIN AFB, FL.
+72222 3048   -8718  38 36 0 ---- PENSACOLA, FL
+72223 3068   -8825  67 66 0 ---- MOBILE/BATES FIELD,  AL.
+72224 2968   -8537  0 2 0 P-T- CAPE SAN BLAS, FL.
+72225 3233   -8483  130 0 0 --TT FORT BENNING, GA (ARMY)
+72226 3230   -8640  62 67 0 ---- MONTGOMERY/DANNELLY,  AL.
+72227 3392   -8452  326 0 0 ---- MARIETTA/DOBBINS AFB, GA.
+72228 3357   -8675  192 196 0 ---- BIRMINGHAM/MUN., AL.
+72229 3290   -8725  140 140 0 ---- CENTREVILLE, AL.
+72230 3317   -8677  175 174 0 T-T- BIRMINGHAM, AL
+72231 2998   -9025  9 1 0 ---- NEW ORLEANS/MOISANT INT., LA.
+72232 3053   -9113  21 0 0 ---- BATON ROUGE, LA, BATON ROUGE METROPOLITAN, RYAN FIELD ARPT
+72233 3033   -8982  10 9 0 T-T- SLIDELL/MUN. LA
+72234 3233   -8875  94 91 0 ---- MERIDIAN/KEY, MS.
+72235 3232   -9007  91 90 0 T-T- JACKSON/ALLEN C. THOMPSON FIELD, MS.
+72239 3103   -9303  110 0 0 --T- FORT POLK, LA. (ARMY)
+72240 3012   -9320  5 4 0 T-T- LAKE CHARLES/MUN.,  LA.
+72241 2995   -9402  7 5 0 ---- PORT ARTHUR/JEFFERSON CO., TX.
+72242 2930   -9480  16 2 0 ---- GALVESTON, TX.
+72243 2997   -9535  33 30 0 ---- HOUSTON/INTERCONTINENTAL, TX.
+72244 2963   -9527  15 0 0 ---- HOUSTON, TX WILLIAM P HOBBY ARPT
+72247 3235   -9465  124 124 0 ---- LONGVIEW, TX.
+72248 3245   -9383  85 85 0 T-T- SHREVEPORT/REG., LA.
+72249 3283   -9728  198 195 0 T-T- FORT WORTH, TX.
+72250 2592   -9742  7 7 0 T-T- BROWNSVILLE/INT., TX
+72251 2777   -9750  15 14 0 T-T- CORPUS CHRISTI/INT.,  TX.
+72253 2953   -9847  242 247 0 ---- SAN ANTONIO/INT.,  TX.
+72254 3030   -9770  189 193 0 ---- AUSTIN/CTY, TX.
+72255 2885   -9692  36 32 0 ---- VICTORIA/VICTORIA REGIONAL, TX.
+72256 3162   -9722  155 157 0 ---- WACO, MADISON-COOPER,  TX.
+72257 3110   -9733  270 0 0 --T- FORT HOOD, TX. (ARMY)
+72258 3283   -9685  156 0 0 ---- DALLAS, TX, DALLAS LOVE FIELD ARPT
+72259 3290   -9703  182 182 0 ---- DALLAS-FORT WORTH/FORT WORTH REG.AIRPORT, TX.
+72260 3222   -9818  402 402 0 ---- STEPHENVILLE/CLARK FIELD MUN., TX.
+72261 2937   -10092 314 314 0 T-T- DEL RIO/INT., TX.
+72262 3183   -10480 0 1662 0 ---- GUADELUPE PASS, TX.
+72263 3137   -10050 582 584 0 ---- SAN ANGELO/MATHIS,  TX.
+72264 3037   -10402 1481 1478 0 ---- MARFA/MUN., TX.
+72265 3193   -10218 874 874 0 T-T- MIDLAND/MIDLAND REG. AIR TERM., TX.
+72266 3242   -9968  546 542 0 ---- ABILENE/MUN., TX.
+72267 3365   -10182 988 996 0 ---- LUBBOCK/LUBBOCK INTERNATIONAL, TX.
+72268 3330   -10453 1118 1118 0 ---P ROSWELL/INDUSTRIAL AIR CENTER, NM
+72269 3238   -10648 1244 0 0 -TTT WHITE SANDS, NM.
+72270 3180   -10640 1194 1206 0 ---- EL PASO/INT., TX.
+72271 3323   -10727 1481 1481 0 ---- TRUTH OR CONSEQUENCES, NM
+72272 3147   -10960 1251 0 0 ---- DOUGLAS BISBEE, AZ, BISBEE DOUGLAS INT. ARPT
+72273 3158   -11033 1428 0 0 ---P FORT HUACHUCA, AZ.
+72274 3222   -11095 747 741 0 T-T- TUCSON, AZ.
+72278 3343   -11202 337 344 0 ---- PHOENIX/SKY HARBOR,  INT, AZ.
+72280 3265   -11460 34 0 0 --P- YUMA/YUMA INT., AZ.
+72281 3282   -11568 18 0 0 ---- EL CENTRO NAF, CA.
+72286 3390   -11725 468 0 0 ---- RIVERSIDE/MARCH AFB. CA.
+72289 3423   -11807 0 1739 0 ---- MOUNT WILSON, CA.
+72290 3273   -11717 9 5 0 ---- SAN DIEGO/LINDBERGH,  CA.
+72291 3325   -11945 174 153 0 ---T SAN NICOLAS IS./NF,  CA.
+72293 3283   -11712 133 133 0 T-T- SAN DIEGO/MIRAMAR,  NAS, CA.
+72295 3393   -11840 32 38 0 ---- LOS ANGELES /INT.,  CA.
+72297 3382   -11815 12 18 0 ---- LONG BEACH/LB AIRP. DAUGHERTY FIELD,  CA.
+72301 3573   -8138  357 0 0 ---- HICKORY, NC, HICKORY RGNL ARPT
+72302 3427   -7790  10 10 0 ---- WILMINGTON, NC.
+72303 3517   -7903  0 61 0 PPTT POPE AFB, NC.
+72304 3527   -7555  3 2 0 ---- CAPE HATTERAS, NC.
+72305 3477   -7687  10 10 0 T-T- NEWPORT, NC.
+72306 3587   -7878  134 132 0 ---- RALEIGH/RALEIGH-DURHAM, NC.
+72307 3625   -7617  12 0 0 ---- ELIZABETH CITY, NC, ELIZABETH CITY CG AIR STATION-RGNL ARPT
+72308 3690   -7620  9 8 0 ---- NORFOLK/INT., VA.
+72309 3485   -7688  13 0 0 ---- CHERRY POINT/MCAS,  NC.
+72310 3395   -8112  69 72 0 ---- COLUMBIA, SC.
+72311 3395   -8332  247 246 0 ---- ATHENS/MUN., GA.
+72312 3490   -8222  296 293 0 ---- GREENVILLE/GREENVILLE SPARTANBURG, SC.
+72314 3522   -8093  234 228 0 ---- CHARLOTTE/DOUGLAS,  NC.
+72315 3543   -8255  661 659 0 ---- ASHEVILLE/MUN., NC.
+72316 3153   -8250  44 0 0 ---- ALMA GA BACON COUNTY ARPT
+72317 3608   -7993  277 276 0 T-T- GREENSBORO/G.-HIGH PT., NC.
+72318 3720   -8040  641 639 0 T-T- BLACKSBURG, VA.
+72319 3448   -8270  240 0 0 ---- ANDERSON RGNL ARPT
+72320 3435   -8517  196 196 0 ---- ROME, GA
+72323 3465   -8677  196 191 0 ---- HUNTSVILLE/MADISON CO., AL.
+72324 3503   -8520  210 208 0 ---- CHATTANOOGA/LOVELL FIELD, TN.
+72325 3595   -8508  571 0 0 ---- CROSSVILLE, TN, CROSVILLE MEMORIAL-WHITSON FIELD ARPT
+72326 3582   -8398  299 299 0 ---- KNOXVILLE/MUN., TN.
+72327 3623   -8655  173 180 0 ---- NASHVILLE/METROPOLITAN, TN.
+72327 3623   -8655  172 180 0 T-T- NASHVILLE/OLD HICKORY, TN.
+72328 3662   -8740  171 0 0 ---- CLARKSVILLE, TN OUTLASW FIELD ARPT
+72329 3722   -8957  103 0 0 ---- CAPE GIRARDEAU, MO, CAPE GIRARDEAU RGNL ARPT
+72330 3677   -9047  146 0 0 ---- POPLAR BLUFF, MO.
+72332 3427   -8877  0 110 0 ---- TUPELO/C.D. LEMONS MUN, MS
+72334 3505   -9000  87 101 0 ---- MEMPHIS/INTNL., TN.
+72335 3647   -8238  469 0 0 ---- BRISTOL-JOHNSON-KINGSPORT, TN, TRI-CITIES RGNL TN-VA ARPT
+72340 3483   -9225  173 173 0 T-T- LITTLE ROCK/ADAMS FLD,  AR.
+72341 3468   -9462  883 0 0 ---- PAGE, OK.
+72344 3533   -9437  141 143 0 ---- FORT SMITH/MUN., AR.
+72345 3625   -9315  421 0 0 ---- HARRISON, AR, BOONE COUNTY ARPT
+72348 3673   -9185  308 307 0 ---- WEST PLAINS, MO
+72349 3690   -9400  437 437 0 ---- MONETTE, MO.
+72351 3397   -9848  314 309 0 ---- WICHITA FALLS/SHEPS AFB/WICHITA FALLS/MUN., TX.
+72352 3465   -9927  420 0 0 ---- ALTUS AFB, OK.
+72353 3538   -9760  398 395 0 ---- OKLAHOMA CITY/W. ROGERS WORLD, OK.
+72354 3542   -9738  397 0 0 ---- TINKER AFB, OK.
+72355 3460   -9840  360 0 0 --TT FORT SILL, OK. (ARMY)
+72356 3620   -9588  195 207 0 ---- TULSA/INT., OK.
+72357 3517   -9743  345 344 0 T-T- NORMAN/MAX WESTHEIMER A, OK.
+72360 3645   -10315 1515 1515 0 ---- CLAYTON/MUN., NM.
+72363 3522   -10170 1095 1095 0 T-T- AMARILLO/INTL., TX.
+72364 3187   -10668 1254 1254 0 T-T- SANTA TERESA, NM.
+72365 3503   -10662 1619 1619 0 T-T- ALBUQUERQUE/INT., NM.
+72366 3443   -10028 595 0 0 ---- CHILDRESS, TX CHILDRESS MUNI ARPT
+72370 3527   -11393 1033 1050 0 ---- KINGMAN/MOHAVE COUNTY A., AZ.
+72371 3693   -11145 1304 1314 0 ---- PAGE/PAGE A., AZ
+72374 3502   -11073 1488 1505 0 ---- WINSLOW, AZ.
+72376 3522   -11182 2181 2179 0 T-T- FLAGSTAFF, AZ
+72381 3492   -11790 705 0 0 ---- EDWARDS AFB, CA.
+72382 3463   -11808 774 775 0 ---- PALMDALE/INT., CA.
+72383 3475   -11873 1379 1377 0 ---- SANDBERG, CA.
+72384 3543   -11905 150 149 0 ---- BAKERSFIELD/MEADOWS,  CA.
+72386 3608   -11517 664 662 0 ---- LAS VEGAS/MCCARRAN,  NV.
+72387 3662   -11602 1006 1006 0 T-T- MERCURY/DESERT ROCK,  NV.
+72389 3677   -11972 100 101 0 ---- FRESNO/AIR TERM.,  CA.
+72390 3567   -12128 21 0 0 ---- SAN SIMEON/PT. PIEDRAS BLANCAS CGLS, CA.
+72391 3412   -11912 0 0 0 ---- POINT MUGU/NAS, CA.
+72393 3475   -12057 121 0 0 T-T- VANDENBERG AFB, CA.
+72394 3490   -12045 73 79 0 ---- SANTA MARIA,  CA.
+72398 3833   -7550  20 0 0 ---- SALISBURY, MD, WSALISBURY-OCEAN CITY WICOMICO RGNL ARPT
+72399 4018   -7675  96 0 0 ---- HARRISBURG, PA, HARRISBURG INT. ARPT
+72401 3750   -7733  54 51 0 ---- RICHMOND/BYRD, VA.
+72402 3793   -7548  12 12 0 T-T- WALLOPS ISLAND, VA.
+72403 3895   -7745  98 95 0 ---- WASHINGTON/DULLES INT., VA.
+72403 3897   -7748  88 88 0 T-T- STERLING, VA.
+72404 3828   -7640  14 0 0 ---- PATUXENT RIVER/NAS,  MD.
+72405 3885   -7703  20 5 0 ---- WASHINGTON/NAT., VA.
+72406 3918   -7667  47 48 0 ---- BALTIMORE/BALTIMORE-WASHINGTON INT., MD.
+72407 3945   -7457  20 21 0 ---- ATLANTIC CITY, NJ.
+72408 3988   -7525  9 4 0 ---- PHILADELPHIA/INT.,  PA.
+72409 4003   -7432  24 0 0 ---- LAKEHURST/NAS, NJ.
+72410 3733   -7920  286 285 0 ---- LYNCHBURG/MUN. P. GLENN, VA.
+72411 3732   -7997  358 358 0 ---- ROANOKE/MUN., VA.
+72412 3778   -8112  766 763 0 ---- BECKLEY (RALEIGH CTY. MEMORIAL AIRPORT),  WV.
+72414 3837   -8160  299 299 0 ---- CHARLESTON/KANAWHA.,  WV.
+72417 3888   -7985  609 606 0 ---- ELKINS/ELKINS-RANDOLPH CO., WV.
+72418 3967   -7560  23 0 0 ---- WILMINGTON, DE, NEW CASTLE ARPT
+72419 3758   -8330  414 0 0 ---- JACKSON, KY, JULIAN CARROL ARPT
+72420 4082   -8252  396 0 0 ---- MANSFIELD, OH, MANSFIELD LAHM RGNL ARPT
+72421 3905   -8467  267 271 0 ---- CINCINNATI/GREATER CINCINNATI, OH.
+72422 3803   -8460  301 298 0 ---- LEXINGTON/BLUE GRASS, KY.
+72423 3818   -8573  149 151 0 ---- LOUISVILLE/STANDIFORD, KY.
+72424 3790   -8597  230 0 0 --T- FT.KNOX, KY. (ARMY)
+72425 3837   -8255  255 252 0 ---- HUNTINGTON, WV.
+72426 3942   -8382  323 322 0 T-T- WILMINGTON, OH.
+72427 3602   -8422  279 0 0 ---- OAK RIDGE, TN
+72428 4000   -8288  254 247 0 ---- COLUMBUS/PORT COLUMBUS, OH.
+72429 3987   -8412  306 307 0 ---- DAYTON/. COX, OH.
+72429 3987   -8412  0 0 0 ---- SULPHUR GROVE, OH.
+72432 3805   -8753  118 127 0 ---- EVANSVILLE/REG., IN.
+72434 3875   -9037  172 174 0 ---- ST.LOUIS/LAMBERT,  ST.LOUIS INT., MO.
+72435 3707   -8877  126 0 0 ---- PADUCAH, KY.
+72438 3973   -8627  246 243 0 ---- INDIANAPOLIS/I.-MUN/WEIR COOK, IN.
+72439 3985   -8967  187 181 0 ---- SPRINGFIELD/CAPITAL,  IL.
+72440 3723   -9340  390 391 0 T-T- SPRINGFIELD/MUN., MO.
+72441 3977   -9490  252 0 0 ---- ST JOSEPH, MO, ROSECRANS MEMORIAL ARPT
+72442 3812   -9177  344 0 0 ---- ROLLA-VICHY, MO, ROLLA NATIONAL ARPT
+72443 3993   -9118  237 0 0 ---- QUINCY, IL, QUINCY RGNL-BALDWIN FIELD ARPT
+72445 3882   -9222  274 271 0 ---- COLUMBIA/REGIONAL,  MO.
+72446 3928   -9475  313 316 0 ---- KANSAS CITY,  INTNL., MO.
+72449 3977   -9492  249 252 0 ---- ST. JOSEPH/ROSE-CRANS, MO.
+72450 3765   -9743  409 406 0 ---- WICHITA/MID-CONTINENT, KS.
+72451 3775   -9997  789 786 0 T-T- DODGE CITY/MUN., KS.
+72452 3730   -9858  468 0 0 ---- MEDICINE LODGE, KS
+72453 3672   -9708  309 0 0 ---- PONCA CITY, OK PONCA CITY RGNL ARPT
+72455 3910   -9677  320 0 0 --TT FORT RILEY, KS. (ARMY)
+72456 3907   -9562  268 268 0 T-T- TOPEKA/MUN., KS.
+72458 3955   -9765  452 453 0 ---- CONCORDIA/BLOSSER MUN., KS.
+72460 3700   -10188 1102 0 0 ---- ELKHART/ELKHART-MORTON COUNTY A., KS
+72462 3743   -10587 2299 2297 0 ---- ALAMOSA, CO.
+72464 3828   -10450 1439 1441 0 ---- PUEBLO/MEMORIAL, CO.
+72465 3937   -10168 1124 1114 0 ---- GOODLAND/RENNER FIELD/GOODLAND/MUN. KS.
+72466 3882   -10472 1881 1873 0 ---- COLORADO SPRINGS/MUNICIPAL, CO.
+72468 3870   -10477 1789 0 0 --TT FORT CARSON, CO. (ARMY)
+72469 3977   -10487 1612 1611 0 T-T- DENVER/STAPLETON INT., CO.
+72470 3962   -11075 1799 1796 0 ---- PRICE/CARBON COUNTY A., UT.
+72475 3842   -11302 1536 1536 0 ---- MILFORD MUNICIPAL, UT.
+72476 3912   -10852 1473 1474 0 T-T- GRAND JUNCTION/WALKER FIELD, CO.
+72477 3960   -11600 1811 0 0 ---- EUREKA, NV, RAMOS
+72480 3737   -11837 1263 1255 0 ---- BISHOP, CA.
+72481 3737   -12057 60 0 0 PPPP MERCED/CASTLE AFB,  CA.
+72483 3852   -12150 8 6 0 ---- SACRAMENTO/EXECUTIVE CA.
+72486 3928   -11483 1908 1907 0 ---- ELY/YELLAND, NV.
+72487 3762   -11452 1335 0 0 ---- CALIENTE, NV.
+72488 3950   -11978 1341 1344 0 ---- RENO/INT., NV.
+72489 3957   -11978 1515 1518 0 T-T- RENO, NV.
+72491 3660   -12185 46 0 0 ---- MONTEREY/NAF, CA.
+72492 3790   -12125 8 9 0 ---- STOCKTON/METROPOLITAN CA.
+72493 3773   -12222 4 2 0 T-T- OAKLAND/METROP. OAKLAND INT., CA.
+72494 3762   -12238 5 6 0 ---- SAN FRANCISCO/INT.,  CA.
+72495 3798   -12205 12 0 0 ---- CONCORD, CA BUCHANAN FIELD ARPT
+72501 4085   -7285  26 19 0 T-T- UPTON, NY.
+72502 4070   -7417  9 5 0 ---- NEWARK/INT., NJ.
+72503 4077   -7390  9 7 0 ---- NEW YORK/LA GUARDIA,  NY.
+72504 4117   -7313  5 3 0 ---- BRIDGEPORT/IGOR I. SIKORSKY MEM., CT.
+72505 4078   -7310  44 0 0 ---- ISLIP, NY, LONG ISLAND ARTHUR ARPT
+72506 4077   -7397  48 0 0 ---- NEW YORK, NY, CENTRAL PARK
+72507 4173   -7143  19 17 0 ---- PROVIDENCE/GREEN STATE, RI.
+72508 4193   -7268  55 53 0 ---- HARTFORD/BRADLEY INTNL., CT.
+72509 4237   -7103  9 6 0 ---- BOSTON/LOGAN INT.,  MA.
+72510 4227   -7187  306 0 0 ---- WORCESTER, MA, WORCESTER RGNL ARPT
+72513 4133   -7573  289 292 0 ---- WILKES-BARRE-SCRANTON, PA.
+72514 4125   -7692  160 161 0 ---P WILLIAMSPORT/LYCOMING COUNTY, PA.
+72515 4222   -7598  497 497 0 ---- BINGHAMTON/BROOME CO., NY.
+72517 4065   -7543  117 118 0 ---- ALLENTOWN/A.-BETHLEHEM-EASTON, PA.
+72518 4275   -7380  89 88 0 ---- ALBANY COUNTY AIRPORT,  NY.
+72518 4268   -7382  89 93 0 T-T- ALBANY, NY.
+72519 4312   -7612  124 128 0 ---P SYRACUSE/HANCOCK,  NY.
+72520 4052   -8022  359 361 0 ---- PITTSBURGH/GREATER PITTSBURGH INT., PA.
+72520 4052   -8022  358 360 0 T-T- PITTSBURGH, PA.
+72521 4092   -8143  377 374 0 ---- AKRON/AKRON-CANTON REG. OH.
+72522 4333   -7360  104 0 0 ---- GLENN FALLS, NY, FLOYD BENNETT MEMORIAL ARPT
+72523 4257   -7772  209 202 0 ---- DANSVILLE/MUNICIPAL,  NY.
+72524 4142   -8187  245 241 0 ---- CLEVELAND/CLEVELAND-HOPKINS, OH.
+72525 4127   -8067  361 365 0 ---- YOUNGSTOWN, OH.
+72526 4208   -8018  225 223 0 ---- ERIE/INT., PA.
+72528 4293   -7872  217 218 0 T-T- BUFFALO/GREATER BUFFALO INT., NY.
+72529 4312   -7767  169 171 0 ---- ROCHESTER/ROCHESTER-MONROE CO., NY.
+72530 4198   -8790  205 203 0 ---- CHICAGO/O'HARE, IL.
+72531 4030   -8815  228 0 0 ---- RANTOUL/CHANUTE AFB,  IL.
+72532 4067   -8968  202 201 0 ---- PEORIA/GREATER PEORIA MUN., IL.
+72533 4100   -8520  252 245 0 ---P FORT WAYNE/MUN.,  BAER FLD., IN.
+72534 4178   -8775  190 189 0 ---- CHICAGO/MIDWAY, IL.
+72535 4170   -8632  236 241 0 ---- SOUTH BEND/ST.JOSEPH CO., IN.
+72536 4160   -8380  211 208 0 ---- TOLEDO/EXPRESS, OH.
+72537 4223   -8333  202 195 0 ---- DETROIT/METROPOLITAN, MI.
+72539 4277   -8460  266 261 0 ---- LANSING/CAPITAL CITY, MI.
+72540 4025   -9372  270 271 0 ---- SPICKARD, MO.
+72542 4077   -9112  212 0 0 ---- BURLINGTON, IA SOUTHEAST IOWA RGNL ARPT
+72543 4220   -8910  226 224 0 ---- ROCKFORD/GREATER ROCKFORD, IL.
+72544 4145   -9052  181 180 0 ---- MOLINE/QUAD CITY,  IL.
+72545 4188   -9170  265 263 0 ---- CEDAR RAPIDS, IA.
+72546 4153   -9365  294 292 0 ---- DES MOINES/MUN., IA.
+72547 4240   -9070  329 328 0 ---- DUBUQUE/MUN., IA.
+72548 4255   -9240  268 266 0 ---- WATERLOO/MUN., IA.
+72549 4255   -9418  355 354 0 ---- FORT DODGE, IA
+72550 4130   -9590  299 300 0 ---- EPPLEY FIELD, OMAHA,  NE.
+72551 4085   -9675  362 365 0 ---- LINCOLN/MUN., NE.
+72552 4095   -9832  566 563 0 ---- GRAND ISLAND/GR. IS. COUNTY, NE.
+72553 4137   -9602  406 399 0 ---- OMAHA, NE.
+72554 4112   -9590  315 0 0 ---- OMAHA/OFFUTT AFB,  NE.
+72556 4198   -9743  473 479 0 ---- NORFOLK/KARL STEFAN,  NE.
+72557 4240   -9638  336 334 0 ---- SIOUX CITY/MUN., IA.
+72558 4132   -9637  351 351 0 T-T- VALLEY, NE.
+72561 4110   -10298 1312 1314 0 ---- SIDNEY/MUN., NE.
+72562 4112   -10070 848 848 0 T-T- NORTH PLATTE/LEE BIRD, NE.
+72564 4115   -10482 1872 1876 0 ---- CHEYENNE, WY.
+72565 3987   -10467 1656 1656 0 ---- DENVER INTERNATIONAL AIRPORT, CO.
+72566 4187   -10360 1206 1209 0 ---- SCOTTSBLUFF, COUNTY,  NE.
+72567 4287   -10055 792 788 0 ---- VALENTINE/MILLER,  NE.
+72569 4292   -10647 1612 1630 0 ---- CASPER/NATRONA COUNTY, INTNL, WY.
+72570 4050   -10753 1915 0 0 ---- CRAIG/CRAIG-MOFFAT A., CO.
+72572 4077   -11195 1289 1289 0 T-T- SALT LAKE CITY/INTNL UT.
+72576 4282   -10873 1694 1703 0 ---- LANDER/HUNT, WY.
+72578 4292   -11260 1365 1355 0 ---- POCATELLO/MUN., ID.
+72581 4073   -11403 1292 1291 0 ---- WENDOVER/AF. AUX. FIELD, UT.
+72582 4085   -11573 1595 1593 0 T-T- ELKO, NV.
+72583 4090   -11780 1322 1315 0 ---- WINNEMUCCA/MUN., NV.
+72585 3765   -12212 19 0 0 ---- HAYWARD, CA, HAYWARD EXECUTIVE ARPT
+72591 4015   -12225 108 108 0 ---- RED BLUFF/MUN., CA.
+72592 4050   -12230 0 153 0 ---- REDDING/MUN, CA
+72593 3665   -12160 24 0 0 ---- SALINAS, CA, SALINAS MUNI ARPT
+72594 4080   -12417 18 13 0 ---- EUREKA, CA.
+72597 4237   -12287 398 398 0 T-T- MEDFORD/MEDFORD-JACKSON COUNTY, OR.
+72604 4422   -7175  287 0 0 ---- FRANCONIA, NH
+72605 4320   -7150  105 103 0 ---- CONCORD/MUN., NH.
+72606 4365   -7032  19 23 0 ---- PORTLAND/INTNL. JET PORT, ME.
+72607 4480   -6882  60 0 0 ---- BANGOR, ME BANGOR INT. ARPT
+72608 4492   -6700  23 24 0 ---- EASTPORT, ME.
+72612 4493   -7220  233 233 0 ---- NEWPORT, VT.
+72613 4427   -7130  1910 1909 0 ---- MOUNT WASHINGTON,  NH.
+72614 4442   -7202  217 203 0 ---- ST.JOHNSBURY, VT.
+72617 4447   -7315  104 102 0 ---- BURLINGTON/INT., VT.
+72618 4453   -7053  205 192 0 ---- RUMFORD, ME.
+72619 4547   -6958  316 0 0 ---- GREENVILLE, ME.
+72632 4268   -8347  321 330 0 T-T- WHITE LAKE, MI.
+72634 4490   -8472  448 447 0 T-T- GAYLORD, MI.
+72635 4288   -8552  245 242 0 ---- GRAND RAPIDS/KENT CO., MI.
+72636 4317   -8625  193 191 0 ---- MUSKEGON/COUNTY, MI.
+72637 4297   -8375  233 238 0 ---- FLINT/BISHOP, MI.
+72638 4437   -8468  0 351 0 ---- HOUGHTON LAKE/ROSCOMMON COUNTY,  MI.
+72639 4507   -8357  211 210 0 ---- ALPENA/PHELPS COLLINS, MI.
+72640 4295   -8790  211 220 0 ---- MILWAUKEE/GEN. MITCHELL, WI.
+72641 4313   -8933  264 263 0 ---- MADISON/DANE COUNTY REGIONAL WI.
+72643 4387   -9125  202 199 0 ---- LA CROSSE/MUN., WI.
+72644 4392   -9250  402 401 0 ---- ROCHESTER/MUN., MN.
+72645 4448   -8810  209 209 0 T-T- GREEN BAY/A.-STRAUBEL, WI.
+72648 4575   -8703  187 180 0 ---- ESCANABA, MI.
+72649 4483   -9355  287 290 0 T-T- CHANHASSEN, MN.
+72650 4317   -9515  408 404 0 ---- SPENCER, IA.
+72651 4358   -9673  435 435 0 ---- SIOUX FALLS/FOSS FIELD, SD.
+72652 4307   -9853  453 453 0 ---- PICKSTOWN, SD.
+72653 4380   -9932  530 530 0 ---- CHAMBERLAIN, SD
+72654 4438   -9822  393 392 0 ---- HURON/HURON REGIONAL SD.
+72655 4555   -9407  312 313 0 ---- ST.CLOUD/WHITNEY,  MN.
+72656 4437   -10028 527 0 0 ---- PIERRE, SD, PIERRE RGNL ARPT
+72658 4488   -9322  255 256 0 ---- MINNEAPOLIS/ST.PAUL INT., MN.
+72659 4545   -9840  399 398 0 T-T- ABERDEEN/REG., SD.
+72661 4527   -10353 925 924 0 ---- REDIG, SD.
+72662 4467   -10320 1030 0 0 ---- RAPID CITY/REGIONAL AIRPORT, SD.
+72662 4407   -10320 1031 1029 0 T-T- RAPID CITY WFO, SD.
+72665 4435   -10553 1230 1230 0 ---- GILLETTE/GILLETTE-CAMPBELL COUNTY A.,  WY.
+72666 4477   -10697 1209 1226 0 ---- SHERIDAN/COUNTY, WY.
+72669 4180   -10720 2065 0 0 ---- RAWLINGS, WY, RAWLINGS MUNI-HARVEY FIELD ARPT
+72670 4452   -10902 1553 1551 0 ---- CODY/MUN., WY.
+72671 4257   -11010 2124 2124 0 ---- BIG PINEY, WY
+72672 4305   -10847 1698 1699 0 T-T- RIVERTON, WY.
+72677 4580   -10853 1088 1099 0 ---- BILLINGS/LOGAN INT.,  MT
+72681 4357   -11620 873 873 0 T-T- BOISE/MUN., ID.
+72683 4358   -11895 1271 1265 0 ---- BURNS, OR.
+72688 4568   -11885 456 455 0 ---- PENDLETON, OR.
+72692 4425   -12115 936 0 0 ---- ROBERT FIELD ARPT
+72693 4412   -12322 114 111 0 ---- EUGENE/MAHLON SWEET,  OR.
+72694 4490   -12300 62 62 0 T-T- SALEM/MCNARY, OR.
+72698 4560   -12260 12 7 0 ---- PORTLAND/INT., OR.
+72712 4687   -6800  191 191 0 T-T- CARIBOU/MUN., ME.
+72713 4668   -6805  146 163 0 ---- PRESQUE ISLE, ME.
+72741 4593   -9045  469 462 0 ---- PARK FALLS, WI.
+72743 4653   -8755  434 434 0 ---- MARQUETTE, MI.
+72744 4717   -8850  329 333 0 ---- HOUGHTON/HOUGHTON COUNTY, MI.
+72745 4683   -9218  432 436 0 ---- DULUTH/INT., MN.
+72747 4855   -9338  361 357 0 T-T- INT.FALLS/FALLS INT. MN.
+72750 4660   -9432  390 0 0 ---- PEQUOT LAKE, MN
+72753 4690   -9680  274 274 0 ---- FARGO/HECTOR FIELD,  ND.
+72755 4750   -9493  420 423 0 ---- BEMIDJI/MUN., MN.
+72756 4893   -9535  328 0 0 ---- WARROAD, MN
+72757 4793   -9717  257 0 0 ---- GRAND FORKS, ND, GRAND FORKS INT. ARPT
+72758 4810   -9887  443 439 0 ---- DEVILS LAKE, ND.
+72763 4678   -10280 791 0 0 ---- DICKINSON, ND, DICKINSON - THEODORE ROOSEVELT RGNL ARPT
+72764 4677   -10075 505 506 0 T-T- BISMARCK/MUN., ND.
+72765 4775   -10183 624 0 0 ---- ROSEGLEN, ND.
+72767 4818   -10363 581 592 0 ---- WILLISTON/SLOULIN FIELD INT., ND.
+72768 4820   -10662 694 693 0 T-T- GLASGOW/INT., MT.
+72769 4860   -11237 1175 0 0 ---- CUT BANK, MT, CUT BANK MUNI ARPT
+72770 4525   -11255 1591 0 0 ---- DILLON, MT, DILLON ARPT
+72772 4660   -11200 1188 1186 0 ---- HELENA/COUNTY-CITY,  MT.
+72773 4692   -11408 972 976 0 ---- MISSOULA / JOHNSON-BELL FIELD, MT.
+72774 4595   -11250 1688 0 0 ---- BUTTE, MT BERT MOONEY ARPT
+72775 4748   -11137 1115 1118 0 ---- GREAT FALLS/INT.,  MT.
+72776 4745   -11138 1131 1132 0 T-T- GREAT FALLS, MT.
+72777 4855   -10977 792 789 0 ---- HAVRE/CITY COUNTY,  MT.
+72779 4830   -11427 906 906 0 ---- KALISPELL/GLACIER PARK INT., MT.
+72781 4657   -12053 325 332 0 ---- YAKIMA/YAKIMA AIR TERMINAL, WA.
+72783 4638   -11702 438 438 0 ---- LEWISTON/LEWISTON-NEZ PERCE CO., ID.
+72784 4657   -11960 223 0 0 ---- HANFORD, WA.
+72785 4763   -11753 721 720 0 ---- SPOKANE/INT., WA.
+72786 4767   -11762 728 729 0 T-T- SPOKANE, WA.
+72787 4797   -11742 670 0 0 ---- DEER PARK, WA, DEER PARK ARPT
+72788 4603   -11833 302 289 0 ---- WALLA WALLA, WA
+72789 4842   -11953 382 374 0 ---- OMAK, WA.
+72790 4730   -11950 384 0 0 ---- EPHRATA, WA, EPHRATA MUNI ARPT
+72791 4615   -12388 0 7 0 ---- ASTORIA/CLATSOP, OR.
+72792 4697   -12290 61 62 0 ---- OLYMPIA, WA.
+72793 4745   -12230 137 130 0 ---- SEATTLE/S.-TACOMA,  WA.
+72797 4793   -12455 57 56 0 T-T- QUILLAYUTE, WA.
+74001 3460   -8663  175 0 0 ---- REDSTONE ARSENAL, AL.
+74002 3950   -7617  5 0 0 ---- ABERDEEN PROVING GROUNDS, MD.
+74003 4017   -11293 1325 0 0 ---- DUGWAY PROVING GROUNDS, UT.
+74004 3250   -11400 231 0 0 ---- YUMA PROVING GROUNDS AZ.
+74201 4813   -12340 9 5 0 ---- PORT ANGELES/CGAS,  WA.
+74206 4715   -12248 87 0 0 ---- TACOMA/MC CHORD AFB,  WA.
+74207 4712   -12255 87 0 0 ---- FORT LEWIS/GRAY AAF,  WA.
+74230 4643   -10587 801 0 0 ---- MILES CITY, MT
+74341 4467   -9545  0 319 0 PPPP WOOD LAKE, MN.
+74357 4322   -9053  0 226 0 PPPP BLUE RIVER, WI.
+74365 4483   -8455  387 0 0 ---- GRAYING AF RANGE,  MI.
+74370 4405   -7573  207 0 0 ---- FORT DRUM/WHEELER-SACK AAF, NY
+74389 4388   -7025  118 124 0 T-T- GRAY, ME.
+74392 4388   -6993  24 0 0 ---- BRUNSWICK/NAS, ME.
+74393 4353   -7010  7 0 0 ---- PORTLAND, ME.
+74413 4253   -11570 1108 0 0 ---- SAYLOR CREEK GUNNERY RANGE, ID.
+74420 4030   -10998 1556 1553 0 ---- ROOSEVELT, UT
+74421 4050   -10752 1886 0 0 ---- CRAIG, CO
+74431 4190   -10618 0 1997 0 PPPP MEDICINE BOW, WY.
+74433 4008   -10065 0 800 0 PPPP MCCOOK, NE.
+74437 4290   -10170 0 991 0 PPPP MERRIMAN, NE.
+74440 4010   -9733  0 433 0 PPPP FAIRBURY, NE.
+74445 4220   -9780  0 524 0 PPPP NELIGH, NE.
+74449 4190   -9370  0 315 0 PPPP SLATER, IA.
+74455 4160   -9057  230 230 0 T-T- QUAD CITY, IA.
+74460 4137   -8868  225 223 0 ---- MARSEILLES, IL
+74465 4178   -8753  0 0 0 ---- DUNNE CRIB IL.
+74466 4082   -8705  0 212 0 PPPP WOLCOTT, IN.
+74468 3883   -8542  265 0 0 --T- JEFFERSON PROVING GROUND MADISON, IN.
+74480 4313   -7560  135 0 0 ---- VERONA, NY. (AF)
+74483 4288   -7288  482 0 0 ---- WILMINGTON, VT.
+74484 4293   -7287  595 0 0 ---- WEST DOVER, VT.
+74486 4065   -7378  7 4 0 ---- NEW YORK/JOHN F. KENNEDY INT., NY.
+74490 4247   -7128  41 41 0 ---- BEDFORD/HANSCOM AFB,  MA.
+74491 4220   -7253  75 0 0 ---- CHICOPEE FALLS/WESTOVER AFB, MA.
+74492 4222   -7112  0 195 0 ---- BLUE HILL OBS. MA.
+74494 4165   -6995  15 15 0 T-T- CHATHAM, MA.
+74500 3900   -12133 60 0 0 ---- SHERIDAN, CA
+74501 3875   -12052 1147 0 0 ---- FRESHPOND, CA
+74504 3750   -12250 49 0 0 ---- PILAR POINT AFS, CA.
+74506 3778   -12232 9 0 0 ---- ALAMEDA/NAS, CA.
+74509 3742   -12205 12 0 0 ---- MOUNTAIN VIEW (SUNNY-VALE)/MOFFETT NAS,  CA.
+74516 3827   -12195 22 0 0 ---- FAIRFIELD/TRAVIS AFB CA.
+74521 3720   -10782 2095 0 0 ---- DURANGO, CO
+74530 3777   -10218 0 1155 0 PPPP GRANADA, CO.
+74531 3897   -10482 1999 0 0 ---- AIR FORCE ACADEMY,  CO.
+74532 3918   -10370 1694 0 0 ---- LIMON, CO
+74533 4018   -10472 0 1524 0 PPPP PLATTEVILLE, CO.
+74541 3765   -9908  0 648 0 PPPP HAVILAND, KS.
+74542 3737   -9563  0 255 0 PPPP NEODESHA, KS.
+74545 3865   -9780  422 0 0 ---- SMOKEY HILL GUNNERY RANGE, KS.
+74546 3832   -9730  0 447 0 PPPP HILLSBORO, KS.
+74550 3752   -9270  0 390 0 PPPP CONWAY, MO.
+74551 3958   -9418  0 297 0 PPPP LATHROP, MO.
+74556 3965   -9048  0 170 0 PPPP WINCHESTER, IL.
+74560 4015   -8933  180 179 0 T-T- LINCOLN, IL.
+74570 3983   -8405  251 0 0 ---- DAYTON/WRIGHT-PATTERSON AFB, OH.
+74589 3690   -7572  23 0 0 ---- CHESAPEAKE, VA.
+74594 3882   -7685  88 0 0 ---- CAMP SPRINGS/ANDREWS AFB, MD.
+74595 3833   -7508  4 4 0 ---- OCEAN CITY, MD.
+74598 3708   -7635  6 0 0 ---- LANGLEY AFB, VA.
+74604 3478   -12053 0 170 0 PPPP VANDENBERG AFB, CA.
+74606 3465   -12057 112 0 0 ---- SOUTH VANDENBERG AFB CA.
+74611 3528   -11662 716 0 0 ---- BICYCLE LAKE AAF, CA
+74612 3568   -11768 696 0 0 --P- CHINA LAKE, NAF, CA.
+74614 3653   -11590 972 0 0 ---- INDIAN SPRINGS GUNNERY RANGE, NV.
+74618 3527   -11743 864 0 0 ---- CUDDLEBACK GUNNERY RANGE, CA.
+74619 3633   -11710 962 0 0 ---- SUPERIOR VALLEY GUNNERY RANGE, CA
+74626 3345   -11195 384 386 0 --P- WFO PHOENIX, AZ.
+74629 3240   -10633 0 1224 0 PPPP WHITE SANDS, NM.
+74630 3382   -10667 1506 0 0 ---- STALLION AAF, NM
+74631 3317   -10648 1235 0 0 ---- WHITE SANDS MISSILE RANGE SITE NO.32, NM
+74635 3683   -10790 0 1902 0 PPPP AZTEC, NM.
+74638 3430   -10380 1326 0 0 ---- MELROSE GUNNERY RANGE, NM.
+74640 3607   -9922  0 648 0 PPPP VICI, OK.
+74641 3628   -9977  669 0 0 ---- GAGE, OK, GAGE ARPT
+74647 3668   -9747  0 306 0 PPPP LAMONT, OK.
+74648 3580   -9578  0 212 0 PPPP HASKELL, OK.
+74649 3498   -9752  0 331 0 PPPP PURCELL, OK.
+74662 3688   -8997  0 130 0 PPPP BLOOMFIELD, MO.
+74671 3667   -8750  174 0 0 ---- FORT CAMPBELL AAF,  KY.
+74693 3513   -7893  74 0 0 ---- FORT BRAGG / SIMMONS AAF, NC.
+74695 3567   -7590  3 0 0 ---- DARE COUNTY GUNNERY RANGE, NC.
+74699 3348   -7758  0 0 0 ---- FRYING PAN SHOALS,  NC.
+74702 3633   -11995 73 0 0 ---- LEMOORE, CA. (NAS)
+74718 3322   -11587 -69 0 0 T-T- SALTON SEA, CA. (AFS)
+74724 3243   -11268 269 0 0 ---- GILA BEND AAF, AZ.
+74730 3017   -10242 865 0 0 ---- SANDERSON, TX.
+74731 3508   -10362 0 1241 0 PPPP TUCUMCARI, NM.
+74732 3285   -10610 1248 0 0 ---- HOLLOMAN AFB, NM
+74733 3390   -10640 1193 0 0 ---- NORTHRUP LANDING STRIP, NM
+74734 3263   -10640 1204 0 0 ---- WHITE SANDS MISSILE RANGE SITE NO.39
+74735 3302   -10098 0 707 0 PPPP JAYTON, TX.
+74736 3602   -10253 1217 0 0 ---- DALHART, TX, DALHART MUNI ARPT
+74739 3282   -9735  215 0 0 ---- FORT WORTH MEACHAM INT. ARPT
+74740 3050   -9977  522 527 0 ---- JUNCTION/KIMBLE COUNTY A., TX.
+74745 3018   -9768  202 165 0 ---- AUSTIN-BERGSTROM INTL AIRPORT, TX.
+74746 3058   -9635  100 0 0 ---- COLLEGE STATION, TX, EASTERWOOD FIELD ARPT
+74750 3178   -9572  0 119 0 PPPP PALESTINE, TX.
+74752 3412   -9428  0 195 0 PPPP DEQUEEN, AR.
+74753 3190   -9278  141 93 0 PPPP WINNFIELD, LA.
+74754 3132   -9255  27 0 0 ---- ENGLAND AFB, LA.
+74755 3113   -9257  67 0 0 --PP CLAIBORNE RANGE, LA. (AFS)
+74756 2968   -8227  46 0 0 ---- GAINSVILLE, FL GAINSVILLE RGNL ARPT
+74757 3040   -8907  16 0 0 ---- GULFPORT, MS, GULFPORT-BILOXI INT. ARPT
+74758 3348   -9008  45 0 0 ---- GREENWOOD, MS, GREENWOOD-LEFLORE ARPT
+74759 3125   -8925  45 0 0 ---- HATTIESBURG, MS, HATTIESBURG BOBBY L CHAIN MUNI ARPT
+74768 3347   -9098  46 0 0 ---- GREENVILLE, MS MID DELTA RGNL ARPT
+74769 3408   -8887  0 125 0 PPPP OKOLONA, MS.
+74775 3007   -8558  5 0 0 ---- TYNDALL AFB, FL.
+74777 3042   -8668  11 0 0 ---- HURLBURT FIELD, FL. (AF)
+74778 3057   -8632  48 0 0 ---- EGLIN AFB RANGE NO.52, FL.
+74780 3190   -8163  0 27 0 --TT FORT STEWART RESERVATION, GA
+74781 3097   -8320  71 0 0 ---- MOODY AFB, GA
+74782 3033   -8150  14 0 0 ---- JACKSONVILLE, FL CRAIG MUNI ARPT
+74783 2607   -8015  37 0 0 ---- FORT LAUDERDALE, FL, FORT LAUDERDALE-HOLYWOOD INT. ARPT
+74787 2917   -8105  10 0 0 ---- DAYTONA BEACH, FL, DAYTONA BEACH INT. ARPT
+74788 2785   -8250  4 0 0 ---- MACDILL AFB, FL.
+74790 3397   -8048  73 0 0 ---- SHAW AFB, SC.
+74791 3368   -7893  8 0 0 ---- MYRTLE BEACH AFB,  SC.
+74792 3385   -8048  68 0 0 ---- POINSETT RANGE,  SUMPTER SC.
+74793 2765   -8042  12 0 0 ---- VERO BEACH, FL, VERO BEACH MUNI ARPT
+74794 2847   -8055  0 0 0 TPTP CAPE KENNEDY, FL.
+74795 2823   -8060  3 0 0 ---- COCOA/PATRICK AFB,  FL.
+74796 2765   -8133  20 0 0 --PP AVON PARK GUNNERY RANGE, FL.
+80400 1570   -6363  8 14 0 ---- ISLA DE AVES (BASE CIENTIFICA NAVAL S. BOLIVAR)
+94995 -3153  15907  7 5 0 T--- LORD HOWE ISLAND AERO
+94996 -2903  16793  116 113 0 TPP- NORFOLK ISLAND AERO
+94997 -5310  7372   12 12 0 ---- HEARD ISLAND (THE SPIT)
+94998 -5448  15893  8 6 0 T-T- MACQUARIE ISLAND
+95995 -3153  15907  0 4 0 ---- LORD HOWE ISLAND WINDY POINT
+95997 -5302  7338   3 3 0 ---- HEARD ISLAND (ATLAS COVE)
+94100 -1428  12663  24 29 0 ---- KALUMBURU
+94102 -1375  12613  8 8 0 ---- TROUGHTON ISLAND
+94103 -1410  12353  4 3 0 ---- BROWSE ISLAND
+94106 -1472  13473  14 12 0 ---- NGUKURR AWS
+94108 -1115  13247  10 15 0 ---- CROKER ISLAND AIRPORT
+94109 -1153  13215  10 11 0 ---- MURGANELLA AIRSTRIP
+94110 -1232  13300  8 9 0 ---- OENPELLI AIRPORT
+94116 -1263  13037  4 3 0 ---- DUM IN MIRRIE AWS
+94117 -1373  13068  16 15 0 ---- MANGO FARM
+94119 -1140  13042  19 18 0 ---- PIRLANGIMPI
+94120 -1242  13088  35 31 0 TPTP DARWIN AIRPORT
+94121 -1317  13012  4 3 0 ---- CHANNEL POINT
+94122 -1175  13002  7 6 0 ---- POINT FAWCETT
+94125 -1305  13102  105 104 0 ---- BATCHELOR AERO
+94127 -1223  13187  1 1 0 ---- POINT STUART AWS
+94128 -1383  13118  44 42 0 ---- DOUGLAS RIVER
+94129 -1130  13175  20 19 0 ---- CAPE DON
+94130 -1493  13080  76 75 0 ---- BRADSHAW
+94131 -1452  13237  135 135 0 ---- TINDAL RAAF
+94132 -1447  13225  0 106 0 ---- KATHERINE COUNTRY CLUB
+94134 -1115  13213  10 5 0 ---- BLACK POINT
+94135 -1103  13297  2 1 0 ---- MCCLUER ISLAND
+94137 -1265  13288  28 25 0 ---- JABIRU AIRPORT
+94138 -1232  13305  9 6 0 ---- OENPELLI
+94139 -1165  13337  19 19 0 ---- WARRUWI
+94140 -1208  13488  16 16 0 ---- MILINGIMBI AWS
+94141 -1332  13308  416 416 0 ---- CENTRAL ARNHEM PLATEAU
+94143 -1367  13433  104 103 0 ---- BULMAN AWS
+94147 -1100  13675  19 18 0 ---- CAPE WESSEL
+94148 -1472  13472  34 34 0 ---- NGUKURR
+94150 -1227  13682  53 62 0 TPP- GOVE AIRPORT
+94151 -1363  13693  18 17 0 ---- NORTH EAST ISLAND
+94153 -1397  13645  14 17 0 ---- GROOTE EYLANDT AIRPORT AWS
+94170 -1267  14192  19 19 0 T--- WEIPA AERO
+94171 -1262  14208  40 40 0 ---- SCHERGER RAAF
+94174 -1058  14228  5 4 0 ---- HORN ISLAND
+94182 -1005  14307  4 3 0 ---- COCONUT ISLAND
+94183 -1375  14312  160 162 0 ---- COEN AIRPORT
+94186 -1278  14330  17 23 0 ---- LOCKHART RIVER AIRPORT
+94188 -1497  14530  19 18 0 ---- CAPE FLATTERY
+95100 -1060  12598  37 0 0 ---- NORTHERN ENDEAVOUR
+95101 -1408  12638  52 51 0 ---- TRUSCOTT
+95111 -1423  12952  29 27 0 ---- PORT KEATS AERO
+95121 -1260  13128  15 14 0 ---- MIDDLE POINT AWS
+95142 -1205  13423  29 27 0 ---- MANINGRIDA AERO
+95146 -1198  13557  9 8 0 ---- NGAYAWILI
+94152 -1607  13630  16 16 0 ---- BORROLOOLA
+94200 -1973  12083  8 7 0 ---- MANDORA
+94201 -1645  12300  9 7 0 ---- CYGNET BAY
+94202 -1868  12177  12 11 0 ---- BIDYADANGA
+94203 -1793  12223  9 17 0 TPP- BROOME AIRPORT
+94204 -1757  12382  78 91 0 ---- CURTIN AERO
+94206 -1817  12555  115 112 0 ---- FITZROY CROSSING AERO
+94207 -1752  11893  7 0 0 ---- ROWLEY SHOALS
+94210 -1550  12315  5 4 0 ---- ADELE ISLAND
+94211 -1642  12610  547 546 0 ---- MOUNT ELIZABETH
+94212 -1822  12765  423 410 0 PP-- HALLS CREEK AIRPORT
+94213 -1700  12822  205 203 0 ---- WARMUN
+94214 -1548  12812  16 11 0 ---- WYNDHAM
+94215 -1537  12630  386 400 0 ---- DOONGAN
+94216 -1577  12870  44 44 0 ---- KUNUNURRA AERO
+94217 -1663  12845  165 159 0 ---- ARGYLE AERODROME
+94220 -1565  13047  23 20 0 ---- TIMBER CREEK
+94225 -1573  13192  221 221 0 ---- DELAMERE WEAPONS RANGE
+94229 -1738  13112  198 196 0 ---- WAVE HILL
+94231 -1832  13063  316 318 0 ---- LAJAMANU
+94232 -1640  13100  90 88 0 ---- VICTORIA RIVER DOWNS
+94234 -1625  13337  211 209 0 ---- DALY WATERS AWS
+94236 -1755  13353  223 220 0 ---- ELLIOTT
+94237 -1557  13320  185 180 0 ---- LARRIMAH
+94238 -1963  13418  377 376 0 PPPP TENNANT CREEK AIRPORT
+94239 -1643  13607  41 39 0 ---- MCARTHUR RIVER MINE
+94242 -1863  13593  219 218 0 ---- BRUNETTE DOWNS
+94248 -1573  13682  12 12 0 ---- CENTRE ISLAND
+94255 -1992  13812  231 231 0 ---- CAMOOWEAL TOWNSHIP
+94256 -1665  13918  8 10 0 ---- MORNINGTON ISLAND
+94257 -1710  13958  4 4 0 ---- SWEERS ISLAND
+94258 -1720  13793  61 60 0 ---- WOLLOGORANG
+94260 -1773  13953  6 6 0 ---- BURKETOWN AIRPORT
+94266 -1768  14107  18 22 0 ---- NORMANTON AIRPORT
+94268 -1547  14173  10 10 0 ---- KOWANYAMA AIRPORT
+94269 -1820  14223  118 115 0 ---- CROYDON TOWNSHIP
+94274 -1830  14352  302 303 0 ---- GEORGETOWN AIRPORT
+94276 -1600  14407  204 203 0 ---- PALMERVILLE
+94284 -1672  14610  8 0 0 ---- ARLINGTON REEF
+94285 -1638  14555  3 2 0 ---- LOW ISLES LIGHTHOUSE
+94287 -1687  14573  8 3 0 PPP- CAIRNS AERO
+94289 -1647  14787  6 1 0 ---- HOLMES REEF
+94290 -1772  14843  6 2 0 ---- FLINDERS REEF
+94291 -1752  14603  10 10 0 ---- INNISFAIL
+94292 -1825  14602  8 4 0 ---- CARDWELL MARINE PDE
+94294 -1923  14675  9 5 0 TPP- TOWNSVILLE AERO
+94296 -1712  15200  8 3 0 ---- LIHOU REEF
+94298 -1908  15238  7 2 0 ---- MARION REEF
+94299 -1628  14995  9 8 0 TPP- WILLIS ISLAND
+94310 -1958  11908  9 9 0 ---- BEDOUT ISLAND
+95204 -1788  12230  32 32 0 ---- WEST ROEBUCK
+95205 -1737  12365  6 7 0 ---- DERBY AERO
+95214 -1550  12815  4 4 0 ---- WYNDHAM AERO
+95283 -1543  14518  5 7 0 ---- COOKTOWN AIRPORT
+95284 -1713  14542  594 594 0 ---- WALKAMIN RESEARCH STATION
+95286 -1707  14542  473 475 0 ---- MAREEBA AIRPORT
+95287 -1642  14598  2 2 0 ---- NORMAN REEF
+95288 -1548  14712  13 0 0 ---- BOUGAINVILLE REEF
+95290 -1685  14622  2 2 0 ---- MOORE REEF
+95291 -1863  14617  12 11 0 ---- INGHAM COMPOSITE
+95292 -1760  14598  18 18 0 ---- SOUTH JOHNSTONE EXP STN
+95293 -1942  14653  556 556 0 ---- WOOLSHED
+95295 -1962  14737  0 17 0 ---- AYR DPI RESEARCH STN
+95296 -1945  14748  7 7 0 ---- ALVA BEACH
+94261 -1875  13870  127 126 0 ---- CENTURY MINE
+94300 -2488  11367  8 4 0 PPPP CARNARVON AIRPORT
+94302 -2223  11408  5 6 0 T-T- LEARMONTH AIRPORT
+94303 -2145  11502  6 5 0 ---- THEVENARD ISLAND
+94306 -2118  11597  12 11 0 ---- MARDIE
+94307 -2035  11683  29 29 0 ---- LEGENDRE ISALND
+94308 -2075  11715  11 10 0 ---- ROEBOURNE AERO
+94309 -2077  11713  13 12 0 ---- ROEBOURNE
+94311 -2010  11957  10 9 0 ---- PARDOO STATION
+94312 -2037  11862  8 10 0 T--- PORT HEDLAND AIRPORT
+94313 -2223  11833  464 463 0 ---- WITTENOOM
+94316 -2317  11773  424 428 0 ---- PARABURDOO AERO
+94317 -2342  11978  524 525 0 ---- NEWMAN AERO
+94318 -2302  11503  112 111 0 ---- EMU CREEK STATION
+94319 -2170  12222  292 296 0 ---- TELFER AERO
+94320 -2013  12798  421 420 0 ---- BALGO HILLS
+94321 -2327  12937  455 454 0 ---- WULUNGURRU
+94322 -2320  13190  609 608 0 ---- PAPUNYA
+94323 -2428  13153  612 614 0 ---- WATARRKA
+94324 -2225  13180  668 667 0 ---- YUENDUMU
+94325 -2100  13440  376 375 0 ---- ALI CURUNG
+94326 -2378  13388  547 545 0 TPP- ALICE SPRINGS AIRPORT
+94327 -2293  13613  329 330 0 ---- JERVOIS
+94328 -2245  13363  567 565 0 ---- TERRITORY GRAPE FARM
+94332 -2067  13948  340 341 0 T--- MOUNT ISA AERO
+94333 -2290  13990  158 162 0 ---- BOULIA AIRPORT
+94334 -2435  13947  93 91 0 ---- BEDOURIE POLICE STATION
+94335 -2065  14050  186 187 0 ---- CLONCURRY AIRPORT
+94336 -2180  13992  289 280 0 ---- THE MONUMENT AIRPORT
+94337 -2067  14172  123 123 0 ---- JULIA CREEK AIRPORT
+94338 -2183  14088  267 271 0 ---- TREPELL AIRPORT
+94340 -2072  14313  214 211 0 ---- RICHMOND POST OFFICE
+94341 -2070  14312  207 206 0 ---- RICHMOND AIRPORT
+94342 -2235  14308  193 194 0 ---- WINTON AIRPORT
+94343 -2082  14423  317 317 0 ---- HUGHENDEN AIRPORT
+94344 -2158  13835  0 0 0 ---- URANDANGI AERODROME
+94345 -2425  14443  203 203 0 ---- ISISFORD POST OFFICE
+94346 -2343  14427  192 191 0 PPP- LONGREACH AERO
+94350 -2355  14528  266 266 0 ---- BARCALDINE POST OFFICE
+94355 -2487  14625  397 395 0 ---- TAMBO POST OFFICE
+94356 -2003  14627  291 291 0 ---- CHARTERS TOWERS AIRPORT
+94360 -2055  14783  196 196 0 ---- COLLINSVILLE POST OFFICE
+94363 -2357  14817  190 190 0 ---- EMERALD AIRPORT
+94365 -2048  14855  20 21 0 ---- PROSERPINE AIRPORT
+94366 -2000  14820  8 7 0 ---- BOWEN AIRPORT
+94367 -2112  14922  36 30 0 PP-- MACKAY M.O
+94368 -2035  14895  59 4 0 ---- HAMILTON ISLAND AIRPORT
+94370 -2273  15065  31 32 0 ---- SAMUEL HILL AERO
+94371 -2052  15037  6 1 0 ---- CREAL REEF
+94372 -2165  15027  209 208 0 ---- MIDDLE PERCY ISLAND
+94373 -2313  15075  5 5 0 ---- YEPPOON THE ESPLANADE
+94374 -2337  15047  15 10 0 TPP- ROCKHAMPTON AERO
+94376 -2448  15057  193 196 0 ---- THANGOOL AIRPORT
+94377 -2485  15112  250 239 0 ---- MONTO TOWNSHIP
+94378 -2352  15127  20 19 0 ---- RUNDLE ISLAND
+94379 -2197  15247  8 2 0 ---- GANNET CAY
+94380 -2385  15125  75 74 0 ---- GLADSTONE RADAR
+94381 -2387  15122  16 19 0 ---- GLADSTONE AIRPORT
+94384 -2415  15188  47 41 0 ---- SEVENTEEN SEVENTY
+94386 -2343  15190  5 3 0 ---- HERON ISLAND RES STN
+94387 -2490  15232  32 32 0 ---- BUNDABERG AERO
+94388 -2410  15270  4 3 0 ---- LADY ELLIOT ISLAND
+94390 -2472  15320  100 99 0 ---- SANDY CAPE LIGHTHOUSE
+94393 -2093  15440  12 4 0 ---- FREDERICK REEF
+94394 -2325  15553  7 6 0 ---- CATO ISLAND
+94395 -2277  14762  270 271 0 ---- CLERMONT AIRPORT
+94396 -2445  14862  220 223 0 ---- ROLLESTON AIRPORT
+94397 -2205  14807  232 234 0 ---- MORANBAH AIRPORT
+94399 -2393  14752  267 267 0 ---- LOCHINGTON
+95301 -2422  11338  0 12 0 ---- CAPE CUVIER WHARF
+95303 -2065  11557  24 24 0 ---- VARANUS ISLAND
+95304 -2087  11540  6 7 0 ---- BARROW ISLAND AIRPORT
+95305 -2167  11510  11 7 0 ---- ONSLOW AIRPORT
+95307 -2070  11677  5 9 0 ---- KARRATHA AERO
+95317 -2117  11973  182 182 0 ---- MARBLE BAR
+95322 -2017  13000  339 340 0 ---- RABBIT FLAT
+95323 -2345  13468  663 661 0 ---- ARLTUNGA
+95351 -2442  14542  282 282 0 ---- BLACKALL AIRPORT
+95362 -2412  14808  344 344 0 ---- SPRINGSURE DAME ST
+95367 -2117  14917  5 5 0 ---- MACKAY AERO
+95369 -2233  14952  9 9 0 ---- ST LAWRENCE
+95370 -2247  15017  28 27 0 ---- WILLIAMSON
+94401 -2770  11415  7 6 0 ---- KALBARRI
+94402 -2592  11352  9 9 0 ---- DENHAM
+94403 -2880  11468  30 36 0 TPP- GERALDTON AIRPORT
+94404 -2927  11768  340 339 0 ---- PAYNES FIND
+94405 -2830  11358  2 3 0 ---- NORTH ISLAND
+94406 -2680  11460  136 135 0 ---- BILLABONG ASA
+94410 -2505  11520  145 144 0 ---- GASCOYNE JUNCTION
+94411 -2853  11550  268 268 0 ---- MULLEWA
+94414 -2982  11527  100 100 0 ---- ENEABBA
+94415 -2968  11588  268 268 0 ---- CARNAMAH
+94417 -2920  11602  271 270 0 ---- MORAWA AIRPORT
+94422 -2688  11595  288 287 0 ---- MURCHISON
+94429 -2810  11783  408 411 0 ---- MOUNT MAGNET AERO
+94430 -2660  11853  519 522 0 T--- MEEKATHARRA AIRPORT
+94439 -2658  12022  519 521 0 ---- WILUNA
+94440 -2728  12008  488 498 0 ---- YEELIRRIE
+94444 -2848  11973  440 438 0 ---- BULGA DOWNS
+94448 -2888  12132  380 376 0 ---- LEONORA
+94449 -2860  12242  464 464 0 ---- LAVERTON AERO
+94450 -2887  12132  370 370 0 ---- LEONORA AERO
+94451 -2578  12297  449 452 0 ---- CARNEGIE
+94457 -2612  12658  459 457 0 ---- WARBURTON AIRFIELD
+94461 -2503  12830  599 580 0 TPP- GILES METEOROLOGICAL OFFICE
+94462 -2518  13097  492 495 0 ---- YULARA AERO
+94463 -2530  13175  491 489 0 ---- CURTIN SPRINGS
+94466 -2583  13330  510 508 0 ---- KULGERA
+94474 -2625  13217  703 706 0 ---- PUKATJA
+94476 -2755  13543  117 117 0 ---- OODNADATTA AIRPORT
+94477 -2730  13362  324 323 0 ---- MARLA POLICE STATION
+94480 -2963  13805  51 50 0 ---- MARREE COMPARISON
+94485 -2943  14200  184 183 0 ---- TIBOOBURRA POST OFFICE
+94488 -2542  14265  128 126 0 ---- WINDORAH POST OFFICE
+94494 -2660  14425  198 199 0 ---- QUILPIE AIRPORT
+94497 -2970  14413  108 108 0 ---- WANAARING POST OFFICE
+94498 -2942  14797  154 154 0 ---- LIGHTNING RIDGE VISITORS
+94500 -2807  14567  190 188 0 ---- CUNNAMULLA POST OFFICE
+94510 -2640  14625  303 305 0 T--- CHARLEVILLE AERO
+94511 -2583  14857  391 390 0 ---- INJUNE POST OFFICE
+94513 -2803  14747  184 182 0 ---- BOLLON MARY ST
+94514 -2648  14797  338 336 0 ---- MITCHELL POST OFFICE
+94515 -2653  14877  307 314 0 ---- ROMA AIRPORT
+94517 -2803  14858  199 199 0 ---- ST GEORGE AIRPORT
+94520 -2897  14898  160 160 0 ---- MUNGINDI POST OFFICE
+94521 -2715  14907  245 245 0 ---- SURAT
+94525 -2563  14978  200 199 0 ---- TAROOM POST OFFICE
+94530 -2852  15032  218 217 0 ---- GOONDIWINDI AIRPORT
+94541 -2977  15107  664 664 0 ---- INVERELL RESEARCH CENTRE
+94542 -2715  15125  344 346 0 ---- DALBY AIRPORT
+94544 -2938  15123  462 462 0 ---- PINDARI DAM
+94547 -2675  15285  425 425 0 ---- MALENY TAMARIND ST
+94549 -2657  15183  434 454 0 ---- KINGAROY AIRPORT
+94550 -2865  15193  784 784 0 ---- STANTHORPE LESLIE PARADE
+94552 -2740  15173  407 405 0 ---- OAKEY AERO
+94553 -2862  15195  872 871 0 ---- APPLETHORPE
+94555 -2820  15210  475 475 0 ---- WARWICK
+94556 -2903  15202  838 838 0 ---- TENTERFIELD (FEDERATION PARK)
+94557 -2665  15245  523 523 0 ---- JIMNA FORESTRY
+94558 -2597  15285  143 143 0 ---- TOOLARA (KELLY)
+94562 -2753  15233  0 89 0 ---- UNIVERSITY OF QUEENSLAND GATTON
+94564 -2590  15308  15 14 0 ---- RAINBOW BEACH
+94566 -2617  15263  65 64 0 ---- GYMPIE
+94567 -2550  15270  10 6 0 ---- MARYBOROUGH
+94568 -2762  15270  25 27 0 ---- AMBERLEY AMO
+94569 -2660  15308  4 3 0 ---- SUNSHINE COAST AIRPORT
+94570 -2638  15303  7 6 0 ---- TEWANTIN RSL PARK
+94571 -2967  15292  9 9 0 ---- GRAFTON OLYMPIC POOL
+94572 -2882  15325  9 9 0 ---- LISMORE AIRPORT AWS
+94573 -2887  15305  21 26 0 ---- CASINO AIRPORT AWS
+94575 -2757  15300  13 19 0 ---- ARCHERFIELD AIRPORT
+94576 -2747  15303  8 8 0 ---- BRISBANE
+94578 -2738  15312  9 4 0 TPPP BRISBANE AERO
+94580 -2793  15342  4 2 0 ---- GOLD COAST SEAWAY
+94581 -2703  15325  7 7 0 ---- SPITFIRE CHANNEL BEACON
+94582 -2833  15337  8 8 0 ---- MURWILLUMBAH (BRAY PARK)
+94584 -2592  15318  95 95 0 ---- DOUBLE ISLAND POINT LIGHTHOUSE
+94585 -2968  15168  1060 1060 0 ---- GLEN INNES AG RESEARCH STN
+94586 -2878  15333  105 105 0 ---- LISMORE (RICHMOND HILL)
+94587 -2875  15245  555 555 0 ---- TABULAM (MUIRNE)
+94588 -2967  15168  1044 1046 0 ---- GLEN INNES AIRPORT AWS
+94589 -2943  15335  27 27 0 ---- YAMBA PILOT STATION
+94590 -2725  15323  20 20 0 ---- INNER RECIPROCAL MARKER
+94591 -2752  15333  0 7 0 ---- BANANA BANK NORTH BEACON
+94592 -2817  15350  4 6 0 ---- COOLANGATTA
+94593 -2743  15353  0 41 0 ---- POINT LOOKOUT
+94594 -2702  15345  100 99 0 ---- CAPE MORETON LIGHTHOUSE
+94596 -2883  15355  2 2 0 ---- BALLINA AIRPORT AWS
+94597 -2752  15325  16 16 0 ---- REDLANDS HRS
+94598 -2917  15338  63 62 0 ---- EVANS HEAD RAAF BOMBING RANGE
+94599 -2863  15363  98 95 0 ---- CAPE BYRON AWS
+95402 -2588  11357  34 33 0 ---- SHARK BAY AIRPORT
+95448 -2783  12070  498 497 0 ---- LEINSTER AERO
+95458 -2903  13472  226 225 0 ---- COOBER PEDY AIRPORT
+95480 -2965  13807  50 50 0 ---- MARREE AERO
+95481 -2808  14018  38 43 0 ---- MOOMBA AIRPORT
+95482 -2588  13933  47 46 0 ---- BIRDSVILLE AIRPORT
+95485 -2943  14205  177 178 0 ---- TIBOOBURRA AIRPORT
+95487 -2740  14180  115 117 0 ---- BALLERA GAS FIELD
+95492 -2798  14380  131 132 0 ---- THARGOMINDAH AIRPORT
+95512 -2995  14685  115 115 0 ---- BREWARRINA HOSPITAL
+95520 -2953  14857  145 145 0 ---- COLLARENBRI (ALBERT ST)
+95527 -2948  14983  218 213 0 T--- MOREE AERO
+95529 -2665  15017  305 304 0 ---- MILES CONSTANCE STREET
+95533 -2885  15117  295 295 0 ---- TEXAS POST OFFICE
+95541 -2977  15110  635 582 0 ---- INVERELL (RAGLAN ST)
+95543 -2562  15160  111 112 0 ---- GAYNDAH AIRPORT
+95551 -2753  15190  641 635 0 ---- TOOWOOMBA AIRPORT
+95565 -2532  15287  13 18 0 ---- HERVEY BAY AIRPORT
+95566 -2695  15295  48 48 0 ---- BEERBURRUM FOREST STATION
+95570 -2975  15302  25 33 0 ---- GRAFTON AIRPORT AWS
+95571 -2962  15295  25 25 0 ---- GRAFTON RESEARCH STN
+95572 -2663  15293  54 53 0 ---- NAMBOUR DPI-HILLSIDE
+95573 -2833  15093  379 379 0 ---- INGLEVOOD FOREST
+95575 -2797  15298  48 47 0 ---- BEAUDESERT DRUMLEY STREET
+95581 -2768  15318  14 14 0 ---- LOGAN CITY WATER TREATMENT
+95591 -2722  15308  13 12 0 ---- REDCLIFFE
+95592 -2722  15312  0 3 0 ---- REDCLIFFE JETTY
+94600 -3353  11502  109 109 0 ---- CAPE NATURALISTE
+94601 -3437  11513  14 13 0 ---- CAPE LEEUWIN
+94602 -3200  11550  43 43 0 ---- ROTTNEST ISLAND
+94603 -3033  11553  275 275 0 ---- BADGINGARRA RESEARCH STN
+94604 -3335  11563  6 5 0 ---- BUNBURY
+94605 -3252  11570  3 3 0 ---- MANDURAH
+94607 -3175  11572  10 10 0 ---- OCEAN REEF
+94608 -3192  11587  25 24 0 ---- PERTH METRO
+94609 -3210  11587  30 30 0 ---- JANDAKOT AERO
+94610 -3192  11597  20 20 0 TPTP PERTH AIRPORT
+94612 -3167  11602  54 45 0 ---- PEARCE RAAF
+94614 -3195  11575  40 40 0 ---- SWANBOURNE
+94615 -3193  11605  220 220 0 ---- GOOSEBERY HILL
+94617 -3425  11613  287 286 0 ---- MANJIMUP
+94618 -3205  11573  60 60 0 ---- FREMANTLE PORT
+94620 -3270  11605  268 267 0 ---- DWELLINGUP
+94621 -3165  11665  170 170 0 ---- NORTHAM
+94622 -3088  11672  284 283 0 ---- WONGAN HILLS
+94623 -3188  11675  199 179 0 ---- YORK
+94625 -3237  11700  250 250 0 ---- BROOKTON
+94627 -3293  11717  338 338 0 ---- NARROGIN
+94628 -3310  11883  321 320 0 ---- NEWDEGATE RESEARCH STATION
+94630 -3462  11763  300 300 0 ---- MOUNT BARKER
+94631 -3457  11700  250 250 0 ---- ROCKY GULLY
+94632 -3080  11785  359 359 0 ---- BENCUBBIN
+94633 -3232  11787  296 295 0 ---- CORRIGIN
+94636 -3357  12003  234 232 0 ---- RAVENSTHORPE
+94637 -3078  12145  370 366 0 TP-- KALGOORLIE-BOULDER AIRPORT
+94638 -3382  12188  27 25 0 TPP- ESPERANCE
+94640 -3483  11602  2 4 0 ---- WINDY HARBOUR
+94641 -3368  11760  321 320 0 ---- KATANNING
+94642 -3245  12385  151 151 0 ---- BALLADONIA
+94644 -3220  12752  3 3 0 ---- RED ROCKS POINT
+94645 -3223  12630  6 5 0 ---- EYRE
+94647 -3167  12887  102 7 0 ---- EUCLA
+94651 -3143  13088  65 64 0 ---- NULLARBOR
+94653 -3212  13368  15 23 0 PPPP CEDUNA AMO
+94654 -3278  13420  14 13 0 ---- STREAKY BAY
+94655 -3070  13457  123 125 0 ---- TARCOOLA AERO
+94656 -3365  13488  9 7 0 ---- ELLISTON
+94657 -3313  13555  58 61 0 ---- KYANCUTTA
+94658 -3437  13537  28 28 0 ---- COLES POINT
+94659 -3115  13680  168 167 0 T--- WOOMERA AERODROME
+94661 -3370  13648  194 193 0 ---- CLEVE
+94662 -3370  13650  176 179 0 ---- CLEVE AERODROME
+94663 -3498  13738  53 53 0 ---- WAROOKA
+94665 -3437  13767  186 185 0 ---- MAITLAND
+94666 -3400  13752  1 1 0 ---- WARBURTO POINT
+94668 -3313  13640  280 280 0 ---- KIMBA
+94672 -3495  13852  8 6 0 TPPP ADELAIDE AIRPORT
+94673 -3188  13843  316 315 0 ---- HAWKER
+94674 -3058  13842  259 260 0 ---- LEIGH CREEK AIRPORT
+94675 -3492  13862  51 48 0 ---- KENT TOWN
+94676 -3030  13933  318 318 0 ---- ARKAROOLA
+94678 -3472  13892  525 525 0 ---- MT CRAWFORD AWS
+94679 -3302  13873  512 512 0 ---- YONGALA
+94680 -3417  13908  416 415 0 ---- EUDUNDA
+94681 -3447  13900  276 275 0 ---- NURIOOTPA VITICULTURAL
+94682 -3443  14058  30 30 0 ---- LOXTON RESEARCH CENTRE
+94684 -3257  13955  300 300 0 ---- YUNTA AIRSTRIP
+94685 -3397  13765  41 42 0 ---- KADINA AWS
+94686 -3108  14170  181 181 0 ---- FOWLERS GAP AWS
+94689 -3197  14147  0 315 0 ---- BROKEN HILL (PATTON STREET)
+94691 -3200  14147  281 292 0 ---- BROKEN HILL AIRPORT AWS
+94692 -3403  14125  0 26 0 ---- LAKE VICTORIA STORAGE
+94693 -3423  14208  52 50 0 P--- MILDURA AIRPORT
+94694 -3238  14242  61 61 0 ---- MENINDEE POST OFFICE
+94695 -3155  14337  75 75 0 ---- WILCANNIA (REID ST)
+94696 -3463  14355  61 61 0 ---- BALRANALD (RSL)
+94698 -3452  14485  94 93 0 ---- HAY (MILLER STREET)
+94700 -3348  14552  120 122 0 ---- HILLSTON AIRPORT
+94702 -3453  14483  92 93 0 ---- HAY AIRPORT AWS
+94703 -3003  14595  107 107 0 ---- BOURKE AIRPORT AWS
+94704 -3400  14778  250 250 0 ---- QUANDIALLA POST OFFICE
+94706 -3472  14655  173 173 0 ---- NARRANDERA GOLF CLUB
+94707 -3305  14722  195 195 0 ---- CONDOBOLIN AG RESEARCH STN
+94708 -3153  14718  173 173 0 ---- NYNGAN AIRPORT
+94709 -3392  14723  245 245 0 ---- WYALONG POST OFFICE
+94710 -3153  14578  218 220 0 ---- COBAR AIRPORT AWS
+94711 -3148  14582  263 260 0 T--- COBAR MO
+94712 -3423  14823  380 382 0 ---- YOUNG AIRPORT
+94714 -3462  14803  338 338 0 ---- COOTAMUNDRA AIRPORT
+94715 -3335  14792  231 231 0 ---- FORBES AIRPORT AWS
+94716 -3473  14970  670 670 0 ---- GOULBURN TAFE
+94717 -3313  14815  323 324 0 ---- PARKES (MACARTHUR STREET)
+94721 -3272  14818  285 285 0 ---- PEAK HILL POST OFFICE
+94723 -3255  14895  305 305 0 ---- WELLINGTON (AGROWPLOW)
+94725 -3388  14817  0 390 0 ---- GRENFELL (MANGANESE RD)
+94727 -3255  14960  471 471 0 ---- MUDGEE AIRPORT AWS
+94728 -3127  14927  510 505 0 ---- COONABARABRAN (NAMOI STREET)
+94729 -3340  14965  745 742 0 ---- BATHURST AIRPORT AWS
+94730 -3342  14955  713 713 0 ---- BATHURST AGRICULTURAL STATION
+94732 -3235  14952  475 475 0 ---- GULGONG POST OFFICE
+94733 -3258  15117  45 45 0 ---- SINGLETON STP
+94735 -3440  14982  845 845 0 ---- TARALGA POST OFFICE
+94736 -3382  15090  61 61 0 ---- PROSPECT RESERVOIR
+94738 -3205  15092  216 216 0 ---- SCONE SCS
+94739 -3248  15090  90 90 0 ---- JERRYS PLAINS POST OFFICE
+94740 -3102  15027  307 307 0 ---- GUNNEDAH RESOURCE CENTRE
+94741 -3347  15012  0 900 0 ---- LITHGOW (COOERWULL)
+94743 -3362  15027  1080 1080 0 ---- MOUNT BOYCE AWS
+94744 -3370  15030  1015 1015 0 ---- KATOOMBA (MURRI ST)
+94746 -3452  15042  679 678 0 ---- MOSS VALE AWS
+94747 -3448  15040  0 690 0 ---- BOWRAL (PARRY DRIVE)
+94749 -3437  15092  10 10 0 ---- BELLAMBI AWS
+94750 -3493  15053  105 122 0 ---T NOWRA RAN AIR STATION AWS
+94752 -3388  15072  82 81 0 ---- BADGERYS CREEK AIRPORT
+94754 -3272  15022  1130 1130 0 ---- NULLO MOUNTAIN AWS
+94755 -3403  15068  74 70 0 ---- CAMDEN AIRPORT AWS
+94756 -3175  15083  466 466 0 ---- MURRURUNDI POST OFFICE
+94757 -3405  15077  112 112 0 ---- CAMPBELL TOWN (MOUNT ANNAN)
+94759 -3368  15122  199 199 0 ---- TERREY HILLS AWS
+94760 -3385  15085  100 100 0 ---- HORSLEY PARK EQUESTRIAN CENTRE
+94761 -3037  15060  500 500 0 ---- BARRABA
+94762 -3397  15092  40 40 0 ---- HOLSWORTHY CONTROL RANGE
+94763 -3372  15067  24 24 0 ---- PENRITH LAKES AWS
+94764 -3378  15102  55 55 0 ---- PARRAMATTA NORTH (MASON DRIVE)
+94765 -3392  15098  7 8 0 ---- BANKSTOWN AIRPORT AWS
+94766 -3390  15110  3 3 0 ---- CANTERBURY RACECOURSE AWS
+94767 -3393  15117  5 6 0 PPPT SYDNEY AIRPORT AMO
+94768 -3385  15120  40 39 0 ---- SYDNEY (OBSERVATORY HILL)
+94769 -3385  15122  2 2 0 ---- FORT DENISON
+94772 -3020  15167  0 1329 0 ---- GUYRA HOSPITAL
+94773 -3052  15167  987 987 0 ---- ARMIDALE (TREE GROUP NURSERY)
+94774 -3292  15178  33 33 0 ---- NEWCASTLE NOBBYS SIGNAL STATION
+94775 -3262  15158  30 30 0 ---- TOCAL AWS
+94776 -3278  15183  8 9 0 T--- WILLIAMTOWN RAAF
+94777 -3338  15132  20 20 0 ---- GOSFORD (NARARA RESEARCH STATION)
+94780 -3397  15125  22 22 0 ---- LITTLE BAY (THE COAST GOLF CLUB)
+94781 -3288  15170  21 21 0 ---- NEWCASTLE UNIVERSITY
+94783 -3138  15223  155 155 0 ---- YARRAS (MOUNT SEAVIEW)
+94785 -3107  15277  14 16 0 ---- KEMPSEY AIRPORT AWS
+94786 -3143  15285  4 3 0 ---- PORT MACQUARIE AIRPORT AWS
+94788 -3107  15282  10 10 0 ---- KEMPSEY (WIDE STREET)
+94789 -3033  15272  746 746 0 ---- DORRIGO (OLD CORAMBA RD)
+94790 -3092  15308  120 117 0 ---- SMOKY CAPE LIGHTHOUSE
+94791 -3030  15312  6 5 0 P-P- COFFS HARBOUR MO
+94792 -3097  15133  910 910 0 ---- WOOLBROOK (DANGLEMAH ROAD)
+94802 -3493  11780  69 71 0 TPP- ALBANY AIRPORT
+95600 -3030  11502  8 1 0 ---- JURIEN BAY
+95601 -3083  11672  305 305 0 ---- WONGAN HILLS RES. STATION
+95602 -3362  11533  3 3 0 ---- BUSSELTON JETTY
+95603 -3162  11772  250 250 0 ---- KELLERBERRIN
+95604 -3203  11598  10 10 0 ---- GOSNELLS CITY
+95606 -3100  11532  5 4 0 ---- LANCELIN
+95607 -3223  11568  6 9 0 ---- GARDEN ISLAND HSF
+95608 -3222  11580  14 14 0 ---- MEDINA RESEARCH CENTRE
+95610 -3200  11613  385 384 0 ---- BICKLEY
+95611 -3368  11540  16 16 0 ---- BUSSELTON AERO
+95612 -3145  11585  74 74 0 ---- GINGIN AERO
+95613 -3443  11603  175 174 0 ---- PEMBERTON
+95614 -3243  11607  286 286 0 ---- KARNET
+95615 -3210  11692  199 199 0 ---- BEVERLEY
+95616 -3253  11707  297 297 0 ---- PINGELLY
+95617 -3457  11633  210 210 0 ---- SHANNON
+95618 -3330  11733  256 256 0 ---- WAGIN
+95620 -3198  11582  0 0 0 ---- INNER DOLPHIN PYLON
+95621 -3335  11617  200 200 0 ---- COLLIE EAST
+95622 -3357  11582  63 63 0 ---- DONNYBROOK
+95623 -3378  11565  130 130 0 ---- JARRAHWOOD
+95624 -3147  11827  0 315 0 ---- MERREDIN
+95625 -3162  11722  217 213 0 ---- CUNDERDIN AIRFIELD
+95626 -3205  11838  276 276 0 ---- NAREMBEEN
+95627 -3243  11888  299 299 0 ---- HYDEN
+95628 -3395  11848  288 286 0 ---- ONGERUP
+95629 -3027  11667  325 324 0 ---- DALWALLINU
+95631 -3128  11682  239 239 0 ---- GOOMALLING
+95632 -3393  11612  179 178 0 ---- BRIDGETOWN
+95634 -3123  11935  347 354 0 ---- SOUTHERN CROSS AIRFIELD
+95635 -3392  12012  27 26 0 ---- HOPETOUN NORTH
+95636 -3388  11910  306 305 0 ---- JACUP
+95637 -3310  11845  286 286 0 ---- LAKE GRACE
+95638 -3367  12182  142 143 0 ---- ESPERANCE AERO
+95639 -3298  12162  249 249 0 ---- SALMON GUMS RES. STN
+95640 -3267  11667  275 275 0 ---- WANDERING
+95641 -3402  11510  81 80 0 ---- WITCHCLIFFE
+95642 -3220  12175  263 262 0 ---- NORSEMAN AERO
+95643 -3307  11587  40 40 0 ---- HARVEY
+95644 -3355  12068  220 220 0 ---- MUNGLINUP WEST
+95646 -3083  12810  160 156 0 ---- FORREST
+95647 -3493  11672  73 73 0 ---- NORTH WALPOLE
+95653 -3217  13363  6 8 0 ---- THEVENARD WIND
+95654 -3303  13545  86 89 0 ---- WUDINNA AERO
+95655 -3252  13648  200 200 0 ---- NONNING
+95657 -3323  13800  12 12 0 ---- PORT PIRIE AERODROME
+95658 -3047  13687  99 104 0 ---- OLYMPIC DAM AERODROME
+95659 -3473  13752  32 34 0 ---- MINLATON AERO
+95660 -3043  13717  76 76 0 ---- ANDAMOOKA
+95661 -3458  13587  8 11 0 ---- PORT LINCOLN AERO
+95662 -3283  13515  166 165 0 ---- MINNIPA DPI
+95663 -3425  13570  60 60 0 ---- CUMMINS AERO
+95664 -3305  13752  7 12 0 ---- WHYALLA AERO
+95666 -3250  13770  14 17 0 ---- PORT AUGUSTA AERO
+95667 -3382  13858  396 395 0 ---- CLARE HIGH SCHOOL
+95668 -3375  14012  0 57 0 ---- GLUEPOT
+95669 -3428  13800  2 2 0 ---- PRICE
+95670 -3377  13822  109 109 0 ---- RAYVILLE PARK
+95671 -3450  13867  65 65 0 ---- ROSEWORTHY AWS
+95674 -3455  13883  116 116 0 ---- TURRETFIELD RESEARCH CENTRE
+95675 -3473  13845  8 8 0 ---- BLACK POLE
+95676 -3470  13862  17 20 0 ---- EDINBURGH RAAF
+95677 -3478  13862  10 17 0 ---- PARAFIELD AIRPORT
+95678 -3497  13870  685 685 0 ---- MOUNT LOFTY
+95687 -3418  14067  32 35 0 ---- RENMARK AERO
+95692 -3338  14257  53 53 0 ---- POONCARIE MAIL AGENCY
+95695 -3152  14338  94 95 0 ---- WILCANNIA AERODROME AWS
+95697 -3287  14430  100 100 0 ---- IVANHOE AERODROME AWS
+95699 -3085  14307  158 161 0 ---- WHITE CLIFFS AWS
+95704 -3423  14607  135 133 0 ---- GRIFFITH AIRPORT AWS
+95705 -3462  14642  164 164 0 ---- YANCO AGRICULTURAL INSTITUTE
+95706 -3470  14650  145 144 0 ---- NARRANDERA AIRPORT
+95707 -3328  14637  169 169 0 ---- LAKE CARGELLIGO AIRPORT
+95708 -3307  14720  193 199 0 ---- CONDOBOLIN AIRPORT AWS
+95709 -3393  14718  257 261 0 ---- WEST WYALONG AIRPORT AWS
+95710 -3198  14793  215 215 0 ---- TRANGIE RESEARCH STATION AWS
+95715 -3003  14812  134 133 0 ---- WALGETT AIRPORT AWS
+95716 -3480  14972  640 652 0 ---- GOULBURN AIRPORT AWS
+95717 -3312  14823  324 326 0 ---- PARKES AIRPORT AWS
+95718 -3097  14837  182 184 0 ---- COONAMBLE AIRPORT AWS
+95719 -3222  14857  285 285 0 ---- DUBBO AIRPORT AWS
+95721 -3383  14863  297 294 0 ---- COWRA AIRPORT AWS
+95722 -3442  14750  281 280 0 ---- TEMORA AIRPORT
+95723 -3482  14890  0 498 0 ---- YASS (RURAL FIRE SERVICE)
+95725 -3332  14907  922 922 0 ---- ORANGE AGRICULTURAL INSTITUTE
+95726 -3337  14912  948 949 0 ---- ORANGE AIRPORT AWS
+95727 -3200  14938  388 388 0 ---- DUNEDOO POST OFFICE
+95728 -3132  14927  645 645 0 ---- COONABARABRAN AIRPORT AWS
+95734 -3030  14982  229 240 0 ---- NARRABRI AIRPORT AWS
+95735 -3367  14983  0 1053 0 ---- OBERON (SPRINGBANK)
+95740 -3095  15023  263 263 0 ---- GUNNEDAH AIRPORT AWS
+95744 -3370  15058  320 320 0 ---- SPRINGWOOD (VALLEY HEIGHTS)
+95746 -3150  15067  390 390 0 ---- QUIRINDI POST OFFICE
+95747 -3173  15078  730 729 0 ---- MURRURUNDI GAP AWS
+95748 -3455  15078  8 9 0 ---- WOLLONGONG AIRPORT
+95749 -3465  15085  15 15 0 ---- KIAMA (BOMBO HEADLAND)
+95750 -3392  15088  20 20 0 ---- LIVERPOOL (MICHAEL WENDEN CENTRE)
+95752 -3413  15112  44 44 0 ---- WATTAMOLLA AWS
+95753 -3360  15077  20 20 0 ---- RICHMOND RAAF
+95754 -3218  15017  375 375 0 ---- MERRIWA (ROSCOMMON)
+95756 -3400  15120  4 4 0 ---- KURNELL AWS
+95758 -3203  15082  221 227 0 ---- SCONE AIRPORT AWS
+95761 -3398  15093  68 0 0 ---- HOLSWORTHY AERODROME AWS
+95762 -3107  15083  395 406 0 ---- TAMWORTH AIRPORT AWS
+95764 -3382  15115  40 40 0 ---- RIVERVIEW OBSERVATORY
+95765 -3383  15107  0 4 0 ---- SYDNEY OLYMPIC PARK AWS (ARCHERY CENTRE)
+95766 -3383  15125  6 6 0 ---- WEDDING CAKE WEST
+95767 -3308  15145  6 6 0 ---- LAKE MACQUARIE AWS
+95768 -3380  15128  90 90 0 ---- NORTH HEAD
+95770 -3327  15157  19 18 0 ---- NORAH HEAD AWS
+95771 -3278  15133  61 64 0 ---- CESSNOCK AIRPORT AWS
+95772 -3232  15145  200 200 0 ---- LOSTOCK DAM
+95773 -3052  15160  1079 1084 0 ---- ARMIDALE AIRPORT AWS
+95774 -3328  15120  305 305 0 ---- MANGROVE MOUNTAIN AWS
+95775 -3273  15157  5 5 0 ---- MAITLAND VISITORS CENTRE
+95778 -3217  15250  4 4 0 ---- FORSTER - TUNCURRY MARINE RESORT
+95779 -3270  15215  25 25 0 ---- NELSON BAY (NELSON HEAD)
+95784 -3188  15250  9 11 0 ---- TAREE AIRPORT AWS
+94677 -3552  13882  11 11 0 ---- HINDMARSH ISLAND AWS
+94683 -3517  13867  365 365 0 ---- KUITPO FOREST RESERVE
+94688 -3532  14052  100 99 0 ---- LAMEROO COMPARISON
+94690 -3537  14053  110 110 0 ---- AUSTIN PLAINS
+94801 -3502  11787  3 3 0 ---- ALBANY
+94804 -3533  13612  32 32 0 ---- NEPTUNE ISLAND
+94806 -3505  13885  0 363 0 ---- MOUNT BARKER
+94807 -3578  13723  0 165 0 ---- PARNDANA CFS AWS
+94808 -3515  13850  55 55 0 ---- NOARLUNGA
+94809 -3510  13773  7 6 0 ---- EDITHBURGH
+94811 -3557  13828  342 341 0 ---- SECOND VALLEY FOREST
+94812 -3715  13975  4 3 0 ---- ROBE COMPARISON
+94813 -3695  13970  18 17 0 ---- THE LIMESTONE
+94814 -3528  13888  58 58 0 ---- STRATHALBYN RACECOURSE
+94816 -3608  14035  30 29 0 ---- KEITH
+94817 -3728  14082  57 57 0 ---- COONAWARRA
+94820 -3697  14072  50 50 0 ---- NARACOORTE AERODROME
+94821 -3773  14077  69 64 0 T--- MOUNT GAMBIER AERO
+94822 -3583  13812  56 55 0 ---- CAPE WILLOUGHBY
+94826 -3842  14153  46 45 0 ---- CAPE NELSON LIGHTHOUSE
+94827 -3630  14163  139 138 0 ---- NHILL AERODROME
+94828 -3830  14147  81 80 0 ---- CASHMORE AIRPORT
+94829 -3763  14205  241 244 0 ---- HAMILTON AIRPORT
+94830 -3838  14223  10 10 0 ---- PORT FAIRY AWS
+94831 -3507  14230  0 65 0 ---- OUYEN (POST OFFICE)
+94833 -3728  14260  1150 1150 0 ---- MOUNT WILLIAM
+94834 -3727  14297  296 295 0 ---- ARARAT PRISON
+94835 -3722  14320  875 875 0 ---- BEN NEVIS
+94836 -3707  14273  235 246 0 ---- STAWELL AERODROME
+94837 -3828  14245  71 73 0 ---- WARRNAMBOOL AIRPORT NDB
+94838 -3570  14235  77 78 0 ---- HOPETOUN AIRPORT
+94839 -3628  14333  132 131 0 ---- CHARLTON
+94840 -3807  14277  131 130 0 ---- MORTLAKE RACECOURSE
+94841 -3625  14240  113 113 0 ---- WARRACKNABEAL MUSEUM
+94842 -3885  14350  83 82 0 ---- CAPE OTWAY LIGHTHOUSE
+94843 -3537  14353  71 71 0 ---- SWAN HILL AERODROME
+94844 -3572  14392  77 77 0 ---- KERANG
+94846 -3845  14408  95 95 0 ---- AIREYS INLET
+94847 -3808  14453  18 18 0 ---- POINT WILSON
+94849 -3705  14372  249 249 0 ---- MARYBOROUGH
+94850 -3987  14387  38 40 0 ---- KING ISLAND AIRPORT
+94852 -3750  14378  435 436 0 ---- BALLARAT AERODROME
+94853 -3830  14480  9 9 0 ---- SOUTH CHANNEL ISLAND
+94854 -3802  14447  10 10 0 ---- AVALON  AIRPORT
+94855 -3673  14432  208 214 0 ---- BENDIGO AIRPORT
+94857 -3817  14437  13 12 0 ---- GEELONG RACECOURSE
+94859 -3702  14452  290 290 0 ---- REDESDALE
+94860 -3737  14495  528 527 0 ---- KILMORE GAP
+94861 -3615  14475  99 98 0 ---- ECHUCA AERODROME
+94862 -3602  14602  129 128 0 ---- YARRAWONGA
+94863 -3790  14412  237 236 0 ---- SHEOAKS AWS
+94864 -3772  14540  83 76 0 ---- COLDSTREAM
+94865 -3785  14475  20 18 0 ---- LAVERTON RAAF
+94866 -3765  14482  118 132 0 TPTP MELBOURNE AIRPORT
+94868 -3780  14497  32 31 0 ---- MELBOURNE REGIONAL OFFICE
+94870 -3797  14508  12 13 0 ---- MOORABBIN AIRPORT
+94871 -3813  14510  6 6 0 ---- FRANKSTON AWS
+94872 -3787  14533  513 512 0 ---- FERNY CREEK
+94874 -3688  14518  141 142 0 ---- MANGALORE AIRPORT
+94875 -3642  14538  114 114 0 ---- SHEPPARTON AIRPORT
+94877 -3582  14560  114 114 0 ---- TOCUMWAL AIRPORT
+94878 -3620  14753  981 981 0 ---- HUNTERS HILL
+94879 -3813  14525  85 85 0 ---- CRANBOURNE BOTANIC GARDENS
+94881 -3720  14583  637 637 0 ---- EILDON FIRE TOWER
+94882 -3722  14590  230 230 0 ---- LAKE EILDON
+94883 -3850  14515  7 7 0 ---- PHILLIP ISLAND PENGUIN RESERVE
+94884 -3655  14598  171 173 0 ---- BENALLA AIRPORT
+94886 -3862  14580  3 3 0 ---- POUND CREEK
+94888 -3653  14748  365 365 0 ---- DARTMOUTH RESERVOIR
+94889 -3642  14630  153 153 0 ---- WANGARATTA AERO
+94890 -3503  14810  250 250 0 ---- GUNDAGAI (WILLIAM ST)
+94891 -3820  14647  56 54 0 ---- LATROBE VALLEY AIRPORT
+94892 -3845  14530  14 13 0 ---- RHYLL
+94893 -3912  14642  97 95 0 ---- WILSONS PROMONTORY LIGHTHOUSE
+94894 -3713  14643  1707 1707 0 ---- MOUNT BULLER
+94898 -3835  14517  13 12 0 ---- CERBERUS
+94899 -3617  14788  293 293 0 ---- CORRYONG AIRPORT
+94900 -3807  14620  161 161 0 ---- BLUE ROCK RESERVOIR
+94901 -3610  14702  184 184 0 ---- HUME RESERVOIR
+94903 -3687  14727  1770 1765 0 ---- FALLS CREEK
+94905 -3703  14733  1292 1298 0 ---- MT HOTHAM AIRPORT
+94906 -3697  14713  1849 1849 0 ---- MOUNT HOTHAM
+94907 -3810  14712  8 7 0 PPPP EAST SALE AIRPORT
+94908 -3710  14760  690 689 0 ---- OMEO
+94909 -3498  14858  390 390 0 ---- BURRINJUCK DAM
+94910 -3515  14745  213 220 0 TPP- WAGGA WAGGA AMO
+94912 -3787  14757  49 50 0 ---- BAIRNSDALE AIRPORT
+94913 -3722  14825  756 755 0 ---- GELANTIPY
+94914 -3733  14902  641 640 0 ---- COMBIENBAR AWS
+94915 -3640  14840  1738 1738 0 ---- PERISHER VALLEY AWS
+94917 -3768  14845  41 41 0 ---- ORBOST (COMPARISON)
+94918 -3577  14800  0 645 0 ---- TUMBARUMBA POST OFFICE
+94919 -3622  14813  340 339 0 ---- KHANCOBAN AWS
+94921 -3628  14897  931 946 0 ---- COOMA AIRPORT AWS
+94922 -3543  14893  700 700 0 ---- TINDBINBILLA NATURE RESERVE
+94923 -3622  14912  778 778 0 ---- COOMA VISITORS CENTRE
+94925 -3542  14908  587 586 0 ---- TUGGERANONG (ISABELLA PLAINS)
+94926 -3530  14920  577 575 0 ---- CANBERRA AIRPORT
+94927 -3542  14978  666 665 0 ---- BRAIDWOOD RACECOURSE AWS
+94928 -3690  14923  705 705 0 ---- BOMBALA (THERRY STREET)
+94929 -3700  14923  761 760 0 ---- BOMBALA AWS
+94930 -3768  14808  350 350 0 ---- MOUNT NOWA NOWA
+94932 -3780  14927  27 27 0 ---- POINT HICKS (LIGHTHOUSE)
+94933 -3757  14990  15 15 0 ---- GABO ISLAND LIGHTHOUSE
+94934 -3725  15005  20 19 0 ---- GREEN CAPE AWS
+94935 -3758  14972  22 31 0 ---- MALLACOOTA
+94937 -3590  15015  16 17 0 ---- MORUYA HEADS PILOT STATION
+94938 -3535  15047  36 35 0 ---- ULLADULLA AWS
+94939 -3625  15022  53 52 0 ---- MONTAGUE ISLAND LIGHHOUSE
+94941 -3572  15018  11 11 0 ---- BATEMANS BAY (CATALINA COUNTRY CLUB)
+94942 -3510  15008  630 630 0 ---- NERRIGA COMPOSITE
+94949 -3922  14698  117 116 0 ---- HOGAN ISLAND
+95679 -3532  13850  385 385 0 ---- MOUNT TERRIBLE RADAR
+95805 -3575  13658  158 158 0 ---- CAPE BORDA
+95806 -3527  13693  44 42 0 ---- STENHOUSE BAY
+95807 -3570  13752  6 7 0 ---- KINGSTONE AERO
+95811 -3555  13858  8 8 0 ---- ENCOUNTER BAY
+95812 -3512  13925  33 33 0 ---- MURRAY BRIDGE COMPARISON
+95813 -3508  13988  72 72 0 ---- KAROONDA
+95814 -3568  13933  3 3 0 ---- MENINGIE
+95815 -3610  14032  27 27 0 ---- MUNKORA
+95816 -3717  13980  3 3 0 ---- ROBE AIRFIELD
+95818 -3505  13922  45 54 0 ---- PALLAMANA AERODROME
+95822 -3792  14125  51 51 0 ---- DARTMOOR
+95823 -3665  14052  0 37 0 ---- PADTHAWAY SOUTH
+95825 -3757  14133  131 130 0 ---- CASTERTON
+95827 -3712  14180  189 188 0 ---- KANAGULK
+95831 -3512  14200  105 105 0 ---- WALPEUP RESEARCH
+95832 -3702  14125  155 155 0 ---- EDENHOPE AIRPORT
+95833 -3633  14505  105 105 0 ---- KYABRAM DPI
+95835 -3667  14228  133 133 0 ---- LONGERENONG
+95836 -3643  14527  114 114 0 ---- TATURA INST SUSTAINABLE AG
+95837 -3610  14650  175 175 0 ---- RUTHERGLEN RESEARCH
+95838 -3673  14647  365 365 0 ---- EDI UPPER VINEYARD
+95839 -3667  14217  134 135 0 ---- HORSHAM AERODROME
+95840 -3770  14293  226 226 0 ---- WESTMERE
+95843 -3683  14572  502 502 0 ---- STRATHBOGIE
+95845 -3823  14378  262 261 0 ---- MOUNT GELLIBRAND
+95853 -3707  14423  330 330 0 ---- CASTLEMAINE PRISON
+95864 -3785  14495  6 6 0 ---- ST KILDA HARBOUR RMYS
+95866 -3772  14490  78 86 0 ---- ESSENDON AIRPORT
+95867 -3787  14525  80 80 0 ---- SCORESBY RESEARCH INSTITUTE
+95869 -3555  14493  94 96 0 ---- DENILIQUIN AIRPORT AWS
+95872 -3795  14492  17 17 0 ---- FAWKNER BEACON
+95873 -3770  14503  83 83 0 ---- LATROBE UNIVERSITY
+95874 -3773  14508  66 66 0 ---- VIEWBANK (ARPNSA)
+95881 -3860  14558  42 51 0 ---- WONTHAGGI
+95890 -3855  14673  18 18 0 ---- YARRAM AIRPORT
+95895 -3598  14635  143 143 0 ---- COROWA AIRPORT
+95896 -3607  14695  164 165 0 ---- ALBURY AIRPORT AWS
+95901 -3783  14627  1561 1561 0 ---- MOUNT BAW BAW
+95904 -3787  14800  4 4 0 ---- LAKES ENTRANCE (EASTERN BEACH ROAD)
+95908 -3650  14830  1380 1380 0 ---- THREDBO VILLAGE
+95909 -3648  14828  1367 1957 0 ---- THREDBO AWS
+95912 -3643  14832  0 1755 0 ---- CHARLOTTE PASS (KOSCIUSKO CHALET)
+95913 -3773  14713  480 480 0 ---- MOUNT MOORNAPA
+95916 -3593  14837  1482 1482 0 ---- CABRAMURRA SMHEA AWS
+95918 -3768  14847  63 62 0 ---- ORBOST
+95925 -3552  14877  1760 1760 0 ---- MOUNT GININI AWS
+95929 -3690  14988  2 2 0 ---- MERIMBULA AIRPORT AWS
+95931 -3667  14982  42 41 0 ---- BEGA AWS
+95935 -3620  15013  25 25 0 ---- NAROOMA VMR
+95937 -3590  15013  4 4 0 ---- MORUYA AIRPORT AWS
+95940 -3508  15080  84 85 0 ---- POINT PERPENDICULAR AWS
+94950 -4090  14470  108 107 0 ---- MARRAWAH
+94951 -4290  14778  12 12 0 ---- DUNALLEY (STROUD POINT)
+94953 -4083  14508  8 9 0 ---- SMITHTON AERODROME
+94954 -4067  14468  92 94 0 ---- CAPE GRIM BAPS
+94955 -4138  14632  294 294 0 ---- SHEFFIELD SCHOOL FARM
+94956 -4215  14528  22 20 0 ---- STRAHAN AERODROME
+94957 -4248  14670  91 90 0 ---- OUSE FIRE STATION
+94958 -4105  14593  8 8 0 ---- BURNIE (ROUND HILL)
+94959 -4227  14627  667 667 0 ---- BUTLERS GORGE
+94960 -4245  14745  462 461 0 ---- TUNNAK FIRE STATION
+94961 -4332  14700  17 17 0 ---- DOVER
+94962 -4365  14627  147 146 0 ---- MAATSUYKER ISLAND LIGHTHOUSE
+94963 -4275  14662  281 281 0 ---- MAYDENA POST OFFICE
+94964 -4270  14688  27 27 0 ---- BUSHY PARK (BUSHY PARK ESTATES)
+94966 -4315  14692  55 55 0 ---- GEEVESTON (CEMETERY ROAD)
+94967 -4348  14713  56 55 0 ---- CAPE BRUNY LIGHTHOUSE
+94969 -4142  14712  5 5 0 ---- LAUNCESTON (TI TREE BEND)
+94970 -4288  14732  51 50 0 ---- HOBART (ELLERSLIE ROAD)
+94971 -4248  14718  0 238 0 ---- MELTON MOWBRAY (NORTH STOCKMAN)
+94972 -4117  14748  198 197 0 ---- SCOTTSDALE ( WEST MINSTONE ROAD)
+94974 -4218  14517  19 19 0 ---- CAPE SORELL
+94975 -4283  14750  27 4 0 TPTP HOBART AIRPORT
+94976 -4212  14617  0 742 0 ---- LAKE ST CLAIR NATIONAL PARK
+94977 -4320  14677  831 831 0 ---- HARTZ MOUNTAINS (KEOGHS PIMPLE)
+94979 -4200  14778  0 575 0 ---- LAKE LEAKE (ELIZABETH RIVER)
+94980 -4008  14800  9 10 0 ---- FLINDERS ISLAND AIRPORT
+94981 -4213  14807  11 10 0 ---- SWANSEA (FRANCIS STREET)
+94983 -4098  14833  20 19 0 ---- EDDYSTONE POINT
+94985 -4202  14748  0 186 0 ---- ROSS (THE BOULEVARDS)
+94987 -4198  14827  56 55 0 ---- FRIENDLY BEACHES
+94988 -4305  14735  6 6 0 ---- DENNES POINT
+95952 -4183  14553  1120 1119 0 ---- MOUNT READ
+95953 -4277  14603  322 322 0 ---- STRATHGORDON VILLAGE
+95954 -4067  14468  87 86 0 ---- CAPE GRIM
+95956 -4113  14515  344 344 0 ---- LUNCHEON HILL (FORESTRY)
+95957 -4098  14572  12 18 0 ---- WYNYARD AIRPORT
+95958 -4303  14627  408 408 0 ---- SCOTTS PEAK DAM
+95959 -4188  14667  1056 1057 0 ---- LIAWENEE
+95960 -4117  14642  9 10 0 ---- DEVONPORT AIRPORT
+95961 -4298  14550  34 34 0 ---- LOW ROCKY POINT
+95962 -4305  14670  495 495 0 ---- WARRA
+95964 -4105  14678  3 3 0 ---- LOW HEAD
+95966 -4153  14720  168 171 0 PPPP LAUNCESTON AIRPORT
+95967 -4348  14713  60 59 0 ---- CAPE BRUNY (CAPE BRUNY)
+95969 -4172  14707  148 148 0 ---- CRESSY RESEARCH STATION
+95972 -4268  14742  45 45 0 ---- CAMPANIA (KINKORA)
+95973 -4100  14738  52 52 0 ---- BRIDPORT (SEA VIEW VILLAS)
+95974 -4163  14795  237 237 0 ---- FINGAL (LEGGE STREET)
+95975 -4308  14735  46 46 0 ---- BULL BAY (LAURISTON)
+95977 -4298  14707  65 65 0 ---- GROVE (RESEARCH STATION)
+95979 -4288  14723  1260 1260 0 ---- MOUNT WELLINGTON
+95981 -4133  14827  49 47 0 ---- ST HELENS AERODROME
+95983 -4145  14825  3 3 0 ---- SCAMANDER
+95984 -4255  14787  14 14 0 ---- ORFORD (AUBIN COURT)
+95985 -4072  14812  15 15 0 ---- SWAN ISLAND
+95986 -4323  14800  241 240 0 ---- TASMAN ISLAND
+95988 -4265  14802  28 28 0 ---- MARIA ISLAND (POINT LESUEUR)
+95989 -4187  14830  11 11 0 ---- BICHENO (COUNCIL DEPOT)
+96315 493    11493  15 22 0 TPTP BRUNEI AIRPORT
+96323 458    11420  3 0 0 ---- KUALA BELAIT
+91801 -903   -15805 0 1 0 T--- PENRHYN
+91802 -903   -15805 0 1 0 ---- PENRHYN AWS
+91809 -1043  -16102 0 2 0 ---- MANIHIKI AWS
+91811 -1088  -16582 3 2 0 ---- PUKAPUKA
+91812 -1088  -16582 0 0 0 ---- PUKAPUKA AWS *
+91819 -1323  -16308 0 3 0 ---- SUWARROW
+91826 -1807  -16318 4 3 0 ---- PALMERSTON *
+91831 -1883  -15977 0 5 0 ---- AITUTAKI AWS
+91841 -2017  -15735 0 25 0 ---- MAUKE AWS
+91843 -2120  -15982 7 7 0 T-P- RAROTONGA
+91844 -2120  -15978 0 0 0 ---- RAROTONGA
+91848 -2192  -15795 0 41 0 ---- MANGAIA AWS
+91753 -1323  -17618 27 24 0 ---- HIHIFO (ILE WALLIS)
+91754 -1430  -17812 36 35 0 ---- MAOPOOPO (ILE FUTUNA)
+91533 -90    16953  66 65 0 ---- BANABA
+91960 -2507  -13010 265 264 0 ---- PITCAIRN
+91961 -2507  -13010 265 264 0 ---- PITCAIRN ISLAND AWS A
+91962 -2507  -13010 265 264 0 ---- PITCAIRN ISLAND AWS B
+91964 -2507  -13010 265 264 0 ---- PITCAIRN ISLAND AWS
+91997 -2925  -17792 49 38 0 T--- RAOUL ISLAND,  KERMADEC IS.
+91650 -1250  17705  27 26 0 ---- ROTUMA
+91652 -1613  -17998 63 62 0 ---- UDU POINT
+91656 -1643  17942  3 2 0 ---- LABASA
+91657 -1647  17935  16 12 0 ---- LAMBASA AIRPORT
+91659 -1700  17870  36 34 0 ---- NABOUWALU
+91660 -1670  17758  50 48 0 ---- YASAWA-I-RARA
+91663 -1680  17933  3 4 0 ---- SAVUSAVU
+91665 -1668  -17987 21 20 0 ---- MATEI
+91669 -1735  17822  15 14 0 ---- RAKIRAKI
+91670 -1715  17690  6 5 0 ---- VIWA
+91676 -1723  -17895 52 50 0 ---- VANUA BALAVU
+91679 -1760  17745  2 0 0 ---- LAUTOKA
+91680 -1775  17745  24 13 0 T-P- NADI AIRPORT
+91682 -1815  17742  9 8 0 ---- SIGATOKA
+91683 -1805  17857  7 5 0 ---- NAUSORI
+91689 -1813  17843  2 0 0 ---- SUVA
+91690 -1815  17845  9 6 0 ---- LAUTHALA BAY
+91691 -1823  -17880 3 2 0 ---- LAKEBA
+91693 -1905  17817  33 30 0 ---- VUNISEA
+91697 -1913  17975  5 3 0 ---- MATUKU
+91699 -2067  -17872 28 27 0 ---- ONO-I-LAU
+91954 -2337  -14952 3 2 0 T--- TUBUAI
+91958 -2762  -14433 2 2 0 ---T RAPA
+91921 -878   -14022 72 73 0 ---- NUKUATAHA AERO
+91925 -980   -13903 53 51 0 T--- HIVA-OA
+91929 -1643  -15175 3 3 0 ---- BORA-BORA
+91932 -1703  -14953 13 13 0 ---- TETIAROA
+91936 -1773  -14915 3 2 0 ---- TAIARAPU-EST
+91938 -1755  -14960 2 2 0 T-T- TAHITI-FAAA
+91939 -1757  -14957 320 0 1 ---- PAPPEETE, TAHITI (CTBT)
+91941 -1495  -14765 7 3 0 ---- RANGIROA
+91943 -1445  -14502 3 3 0 ---- TAKAROA
+91944 -1805  -14095 3 3 0 ---- HAO
+91945 -1990  -14493 3 2 0 ---- HEREHERETUE
+91948 -2312  -13495 89 91 0 T--- MANGAREVA
+96737 -612   10613  40 0 0 PPP- SERANG
+96739 -623   10665  46 0 0 P-P- CURUG/BUDIARTO
+96741 -610   10687  2 0 0 ---- JAKARTA/TANJUNG PRIOK
+96745 -618   10683  8 0 0 ---- JAKARTA/OBSERVATORY
+96749 -612   10665  8 0 0 TPTP JAKARTA/SOEKARNO-HATTA
+96751 -670   10693  0 0 0 ---- BOGOR/CITEKO
+96781 -690   10758  740 0 0 TP-- BANDUNG/HUSEIN
+96791 -675   10827  50 0 0 PPP- CIREBON/JATIWANGI
+96797 -685   10915  10 0 0 PPP- TEGAL
+96805 -773   10902  6 0 0 P-P- CILACAP
+96837 -697   11042  3 0 0 ---- SEMARANG
+96839 -698   11038  3 0 0 PPP- SEMARANG/AHMAD YANI
+96925 -585   11263  3 0 0 P-P- SANGKAPURA (BAWEAN IS.)
+96933 -722   11272  3 0 0 ---- SURABAYA/PERAK I
+96935 -737   11277  3 0 0 TPPP SURABAYA/JUANDA
+96937 -722   11272  3 0 0 ---- SURABAYA/PERAK II
+96973 -705   11397  3 0 0 P-P- KALIANGET (MADURA IS)
+96987 -822   11438  5 0 0 P-P- BANYUWANGI
+96505 373    11568  0 0 0 ---- LONG BAWAN/JUVAI SEMARING
+96509 333    11757  6 0 0 P-P- TARAKAN/JUWATA
+96525 285    11733  50 0 0 ---- TANJUNG SELOR/TANJUNG HARAPAN
+96529 212    11745  26 0 0 P--- TANJUNG REDEP/KALIMARAU
+96535 177    10930  15 0 0 P--- PALOH
+96557 -35    11178  37 0 0 ---- NANGAPINOH
+96559 12     11153  30 0 0 ---- SINTANG
+96565 88     11293  0 0 0 P--- PUTUSSIBAU/PAGSUMA
+96581 -15    10940  3 0 0 PPP- PONTIANAK/SUPADIO
+96595 -95    11490  60 0 0 P-P- MUARA TEWEH/BERINGIN
+96607 -62    11715  230 0 0 P-P- SAMARINDA/TEMINDUNG
+96615 -185   10997  9 0 0 ---- KETAPANG/RAHADI USMAN
+96633 -127   11690  3 0 0 P-P- BALIKPAPAN/SEPINGGAN
+96645 -270   11170  25 0 0 P-P- PANGKALAN BUN/ISKANDAR
+96655 -100   11400  27 0 0 P-P- PALANGKA RAYA/TJILIK RIWUT
+96685 -343   11475  20 0 0 P-P- BANJARMASIN/SYAMSUDIN NOOR
+96695 -340   11622  18 0 0 ---- KOTA BARU/STAGEN
+97406 182    12783  0 0 0 ---- GALELA/GAMAR MALAMU
+97430 77     12737  23 0 0 PPP- TERNATE/BABULLAH
+97460 -63    12750  3 0 0 P--- LABUHA/OESMAN SADIK
+97502 -93    13112  3 0 0 P--- SORONG/JEFMAN
+97530 -88    13405  3 0 0 P--- MANOKWARI/RENDANI
+97560 -118   13612  11 0 0 TPPP BIAK/FRANS KAISIEPO
+97570 -187   13623  3 0 0 ---- SERUI/SUJARWO CONDRO NEGORO
+97580 -183   13872  3 0 0 ---- SARMI/MARARENA
+97600 -208   12600  2 0 0 P-P- SANANA
+97630 -288   13225  130 0 0 ---- FAK-FAK/TOREA
+97682 -333   13550  3 0 0 ---- NABIRE
+97686 -407   13895  1660 0 0 P--- WAMENA
+97690 -257   14048  99 0 0 P--- JAYAPURA/SENTANI
+97698 -237   14072  3 0 0 ---- JAYAPURA/DOK II
+97700 -323   12708  20 0 0 ---- NAMLEA
+97722 -335   12888  10 0 0 ---- AMAHAI
+97724 -370   12808  12 0 0 TPPP AMBON/PATTIMURA
+97748 -380   13083  3 0 0 P-P- GESER
+97760 -367   13375  3 0 0 P--- KAIMANA/UTAROM
+97780 -392   13637  1770 0 0 ---- ENAROTALI
+97796 -500   13745  3 0 0 ---- TIMIKA
+97810 -568   13275  12 0 0 P-P- TUAL/DUMATUBUN
+97876 -610   14030  16 0 0 ---- TANAH MERAH
+97900 -798   13130  24 0 0 PPP- SAUMLAKI/OLILIT
+97980 -847   14038  3 0 0 TPP- MERAUKE/MOPAH
+97230 -875   11517  1 0 0 PPP- DENPASAR/NGURAH RAI
+97240 -875   11627  97 96 0 PPP- MATARAM/LOMBOK INTERNATIONAL AIRPORT
+97260 -843   11742  3 0 0 P-P- SUMBAWA BESAR/BRANGBIJI
+97270 -855   11870  2 0 0 PPP- BIMA/M.SALAHUDDIN
+97284 -863   12045  1170 0 0 ---- RUTENG/SATAR TACIK
+97300 -863   12225  3 0 0 PPP- MAUMERE/WAI OTI
+97310 -827   12297  0 0 0 ---- LARANTUKA/GEWAYANTANA
+97320 -822   12457  12 0 0 ---- ALOR/MALI KALAHAHI
+97340 -967   12033  12 0 0 PPP- WAINGAPU/MAU HAU
+97372 -1017  12367  108 0 0 TPPP KUPANG/ELTARI
+97378 -1073  12307  1 0 0 ---- ROTE/LEKUNIK BAA
+97380 -1050  12183  26 0 0 ---- SABU/TARDAMU
+97008 358    12547  38 0 0 P-P- NAHA/TAHUNA
+97014 153    12492  80 0 0 TPPP MENADO/ SAM RATULANGI
+97016 143    12518  3 0 0 ---- BITUNG
+97028 102    12080  2 0 0 PPP- TOLI-TOLI/LALOS
+97048 52     12307  2 0 0 P-P- GORONTALO/JALALUDDIN
+97072 -68    11973  6 0 0 TPP- PALU/MUTIARA
+97086 -90    12278  2 0 0 P--- LUWUK/BUBUNG
+97096 -138   12073  2 0 0 P--- POSO/KASIGUNCU
+97120 -250   11900  0 0 0 P--- MAJENE
+97126 -255   12037  50 0 0 ---- MASAMBA/ANDI JEMMA
+97142 -430   12153  3 0 0 ---- KOLAKA/POMALA
+97146 -410   12243  50 0 0 PP-- KENDARI/WOLTER MONGINSIDI
+97180 -507   11955  14 0 0 TPPP UJUNG PANDANG/HASANUDDIN
+97182 -507   11955  0 0 0 ---- UJANG PANDANG/PAOTERE
+97192 -547   12262  2 0 0 P-P- BAU-BAU/BETO AMBARI
+96001 587    9532   126 0 0 ---- SABANG/CUT BAU
+96009 518    9713   87 0 0 PPP- LHOKSEUMAWE/MALIKUSSALEH
+96011 552    9542   21 0 0 PPP- BANDA ACEH/BLANG BINTANG
+96015 425    9612   0 0 0 PPP- MEULABOH/CUT NYAK DHIEN
+96033 380    9870   3 0 0 ---- MEDAN/BELAWAN
+96035 357    9868   25 0 0 TPP- MEDAN/POLONIA
+96073 155    9888   3 0 0 PPP- SIBOLGA/PINANGSORI
+96075 127    9760   6 0 0 PPP- GUNUNG SITOLI/BINAKA
+96087 112    10412  24 0 0 ---- BATAM/HANG NADIM
+96091 92     10453  18 0 0 PPP- TANJUNG PINANG/KIJANG
+96109 47     10145  31 0 0 PPP- PEKAN BARU/SIMPANGTIGA
+96145 320    10625  3 0 0 PPP- TAREMPA
+96147 395    10838  2 0 0 T-T- RANAI
+96163 -88    10035  3 0 0 TPP- PADANG/TABING
+96171 -33    10232  46 0 0 P-P- RENGAT/JAPURA
+96179 -48    10458  31 0 0 P-P- SINGKEP/DABO
+96195 -163   10365  25 0 0 P-P- JAMBI/SULTAN TAHA
+96207 -277   10137  782 0 0 P--- KERINCI/DEPATI PARBO
+96221 -290   10470  10 0 0 PPP- PALEMBANG/ST. M. BADARUDIN II
+96237 -217   10613  33 0 0 TPP- PANGKAL PINANG
+96249 -275   10775  44 0 0 P-P- TANJUNG PANDAN/BULUH TUMBANG
+96253 -388   10233  16 0 0 PPP- BENGKULU/PADANG KEMILING
+96295 -510   10518  96 0 0 P-P- TANJUNG KARANG/RADIN INTEN II
+96995 -1045  10568  262 279 0 ---- CHRISTMAS ISLAND AERO
+96996 -1218  9683   4 3 0 T--- COCOS ISLAND AERO
+91066 2822   -17737 0 3 0 ---- MIDWAY ISLAND
+91155 2387   -16628 2 2 0 ---- FRENCH FRIGATE SHOALS
+91158 2222   -15945 0 98 0 ---- PRINCEVILLE, KAUAI, HAWAII
+91159 2198   -15977 0 3 0 ---- KEKAHA, KAUAI, HAWAII
+91161 2215   -15965 1280 0 0 ---- KOKEE, KAUAI, HAWAII
+91162 2207   -15978 0 0 0 ---- BARKING SANDS (BONHAM AUX.LDNG.FLD), KAUAI HAWAII
+91163 2190   -15960 0 7 0 ---- PORT ALLEN AIRPORT, KAUAI, HAWAII
+91164 2223   -15940 57 55 0 ---- KILAUEA POINT, KAUAI,  HAWAII
+91165 2198   -15933 31 32 0 T-T- LIHUE, KAUAI, HAWAII
+91166 2188   -15942 0 16 0 ---- MAKAHUENA POINT, KAUAI, HAWAII
+91167 2192   -15965 0 52 0 ---- HANAPEPE, KAUAI
+91168 2208   -15932 0 88 0 ---- KAPAA, KAUAI, HAWAII
+91169 2168   -15803 10 0 0 ---- WAIALEE, OAHU,  HAWAII
+91170 2148   -15803 290 0 0 ---- WAHIAWA (WHEELER/SCHOFIELD), OAHU,  HAWAII
+91171 2157   -15825 341 0 0 ---- KAENA POINT, OAHU
+91172 2143   -15813 35 0 0 ---- LUALUALEI, OAHU
+91176 2145   -15777 3 0 0 ---- KANEOHE BAY (MCAS),  OAHU, HAWAII
+91178 2132   -15807 15 0 0 ---- KALAELOA, OAHU, HI.
+91182 2135   -15793 5 2 0 PPPP HONOLULU, OAHU, HAWAII
+91184 2133   -15772 18 0 0 ---- WAIMANALO, OAHU
+91186 2115   -15710 137 134 0 ---- MOLOKAI, MOLOKAI, HAWAII
+91189 2092   -15668 0 0 0 ---- KAANAPALI, MAUI,  HAWAII
+91190 2090   -15643 20 18 0 PP-P KAHULUI AIRPORT, MAUI, HAWAII
+91191 2070   -15645 0 3 0 ---- KEAWAKAPU BEACH,  MAUI, HAWAII
+91194 2055   -15658 0 366 0 ---- KAHOOLAWE, HAWAII
+91195 2025   -15588 0 19 0 ---- UPOLU POINT (CG),  HAWAII, HAWAII
+91196 2090   -15622 0 213 0 ---- KAILUA (MAUI)HAWAII
+91198 2077   -15633 0 928 0 ---- KULA EXPERIMENTAL STATION (MAUI)HAWAII
+91199 2010   -15547 0 140 0 ---- HAINA, HAWAII,  HAWAII
+91202 1020   13980  0 2 0 ---- ULITHI AWS CAROLINE IS.
+91203 1003   13980  5 2 0 ---- FALALOP ISLAND (CG), ULITHI ATOLL
+91204 1003   13980  0 2 0 ---- FALALOP ISLAND, ULITHI ATOLL AWS
+91212 1347   14478  75 75 0 T-T- WEATHER FORECAST OFFICE, GUAM, MARIANA IS.
+91217 1355   14483  111 110 0 ---- WSMO AGANA, GUAM MARIANA IS.
+91218 1357   14492  162 0 0 ---- ANDERSEN AFB, GUAM, MARIANA IS.
+91221 1417   14525  0 179 0 ---- ROTA, MARIANA ISLANDS
+91222 1890   14560  0 2 0 ---- PAGAN ISLAND AWS, MARIANA IS.
+91231 1500   14563  0 82 0 ---- TINIAN, MARIANA ISLANDS
+91232 1512   14573  4 3 0 ---- SAIPAN (CG), MARIANA IS.
+91234 2005   14522  0 50 0 ---- MAUG AWS,  MARIANA IS.
+91246 1927   16663  5 0 0 ---- WAKE ISLAND WQ, WAKE ISLAND AIRFIELD ARPT
+91250 1135   16235  5 0 0 ---- ENEWETAK, MARSHALL IS
+91251 1137   16235  0 2 0 ---- ENIWETAK ATOLL AWS, MARSHALL IS.
+91258 1123   16985  2 0 0 ---- UTIRIK ATOLL,  MARSHALL IS.
+91259 1123   16968  0 3 0 ---- UTIRIK ATOLL AWS, MARSHALL IS.
+91275 1673   -16952 0 2 0 ---- JOHNSTON ISLAND
+91281 1965   -15600 9 0 0 ---- KONA, HAWAII IS.,  HAWAII
+91283 1987   -15565 1432 0 0 ---- WAIKII, HAWAII
+91284 1990   -15575 480 0 0 ---- WAIKOLOA MAUKA,  HAWAII
+91285 1972   -15505 10 11 0 T-T- HILO HI, HAWAII
+91287 1952   -15482 0 15 0 ---- CAPE KUMUKAHI, HAWAII
+91289 1940   -15528 1112 0 0 ---- HALEMAUMAU CRATER,  HAWAII
+91290 1935   -15525 1000 0 0 ---- HILINA PALI ROAD,  HAWAII
+91291 1947   -15535 1645 0 0 ---- MAUNA LOA STRIP ROAD HAWAII
+91293 1910   -15575 808 0 0 ---- SOUTH KONA, HAWAII,  HAWAII
+91294 1900   -15567 0 290 0 ---- SOUTH POINT, HAWAII
+91314 533    13238  0 3 0 ---- SONSOROL,  CAROLINE IS.
+91315 668    14308  0 3 0 ---- EAURIPIK, CAROLINE IS.
+91317 738    14392  4 2 0 ---- WOLEAI ATOLL, CAROLINE IS.
+91319 860    14455  0 2 0 ---- FARAULEP ISLAND AWS CAROLINE IS.
+91320 858    14965  0 0 0 ---- ONOUN
+91321 735    14722  0 3 0 ---- SATAWALL AWS,  CAROLINE IS.
+91324 735    14920  0 2 0 ---- PULUWAT ATOLL AWS,  CAROLINE IS.
+91325 670    14930  0 3 0 ---- PULUSUK,  CAROLINE IS.
+91326 858    14965  0 3 0 ---- ULUL AWS,  CAROLINE IS.
+91328 858    14965  0 0 0 ---- ULUL AWS, CAROLINE IS. *
+91329 855    15190  0 0 0 ---- FANANU
+91334 745    15183  3 3 0 T-T- WEATHER SERVICE OFFICE, CHUUK, ECI
+91338 533    15373  0 2 0 ---- SATAWAN ATOLL AWS, CAROLINE ISLANDS
+91339 550    15382  3 0 0 ---- LUKUNOCH ATOLL, CAROLINE ISLANDS
+91343 763    15517  0 3 0 ---- OROLUK ATOLL AWS, CAROLINE ISLANDS
+91348 695    15820  37 38 0 T-T- WEATHER SERVICE OFFICE, POHNPEI, CAROLINE IS.
+91350 667    15978  0 0 0 ---- MWOAKILLOA, CAROLINE IS.
+91352 622    16070  0 4 0 ---- PINGELAP ATOLL AWS, CAROLINE IS.
+91353 622    16070  4 2 0 ---- PINGELAP ATOLL, CAROLINE IS.
+91354 977    16098  0 3 0 ---- UJELANG,  CAROLINE IS.
+91355 535    16295  0 2 0 ---- KOSRAE AIRPORT AWS, CAROLINE IS.
+91356 533    16303  4 2 0 ---- KOSRAE AIRPORT VICE LELU, KOSRAE ATOLL, CAROLINE IS.
+91364 940    16747  4 0 0 ---- ROI-NAMUR
+91365 890    16573  0 2 0 ---- UJAE ATOLL AWS, MARSHALL IS.
+91366 873    16773  8 2 0 TP-P KWAJALEIN/BUCHOLZ AAF, MARSHALL IS.
+91367 727    16883  3 2 0 ---- AILINGLAPALAP ATOLL, MARSHALL IS.
+91368 727    16883  0 2 0 ---- AILINGLAPLAP, MARSHALL IS.
+91369 592    16965  3 2 0 ---- JALUIT ATOLL, MARSHALL IS.
+91371 947    17025  3 2 0 ---- WOTJE ATOLL, MARSHALL IS.
+91374 890    17085  0 3 0 ---- MALEOLAP, ATOLL AWS,  MARSHALL IS.
+91375 712    17135  0 0 0 ---- MAJURA, MARSHALL IS.
+91376 708    17138  2 3 0 T-T- MAJURO/MARSHALL IS. INTNL.
+91377 610    17140  0 2 0 ---- MILI ATOLL AWS, MARSHALL IS.
+91378 608    17173  4 3 0 ---- MILI ATOLL, MARSHALL IS.
+91385 588    -16205 2 0 0 ---- PALMYRA ISLAND
+91408 733    13448  29 30 0 T-T- WEATHER SERVICE OFFICE, KOROR, PALAU WCI.
+91410 302    13118  5 3 0 ---- TOBI ISLAND,  CAROLINE IS.
+91411 830    13748  0 3 0 ---- NGULU ATOLL AWS, CAROLINE IS.
+91413 948    13807  14 15 0 T-T- WEATHER SERVICE OFFICE, YAP, CAROLINE IS.
+91425 385    15502  4 2 0 ---- NUKUORO ATOLL, CAROLINE IS.
+91434 108    15477  3 0 0 ---- KAPINGAMARANGI ATOLL, CAROLINE IS.
+91442 460    16868  0 3 0 ---- EBON ATOLL AWS,  MARSHALL IS.
+91484 470    -16038 1 0 0 ---- WASHINGTON ISLAND
+91486 393    -15932 2 0 0 ---- FANNING ISLAND
+91487 385    -15937 5 3 0 ---- FANNING ISLAND
+91490 198    -15748 3 3 0 ---- CHRISTMAS ISLAND
+91491 172    -15717 2 0 0 ---- CHRISTMAS ISLAND
+91492 200    -15740 3 0 0 PPPP CHRISTMAS ISLAND
+91601 303    17278  0 1 0 ---- BUTARITARI
+91610 135    17292  4 2 0 T-P- TARAWA
+91611 135    17293  0 0 0 ---- TARAWA TIDE AWS
+91612 138    17315  2 2 0 ---- TARAWA (AERODROME)
+91623 -135   17600  3 2 0 ---- BERU
+91629 -267   17683  7 4 0 ---- ARORAE
+48600 633    9973   7 6 0 ---- LANGKAWI
+48601 530    10027  4 3 0 TPTP PENANG/BAYAN LEPAS
+48602 547    10038  4 3 0 PPPP BUTTERWORTH
+48603 620    10040  5 4 0 ---- ALOR STAR
+48604 648    10027  22 22 0 ---- CHUPING
+48615 617    10228  5 5 0 TPTP KOTA BHARU
+48616 553    10220  65 68 0 ---- KUALA KRAI
+48618 538    10310  6 5 0 ---- KUALA TRENGGANU
+48619 533    10313  36 35 0 ---- KUALA TRENGGANU/CLIM
+48620 422    10070  8 7 0 PPPP SITIAWAN
+48623 480    10090  78 77 0 ---- LUBUK MERBAU
+48625 457    10110  40 40 0 ---- IPOH
+48632 447    10137  0 1545 0 ---- CAMERON HIGHLANDS
+48642 397    10235  61 59 0 ---- BATU EMBUN
+48647 312    10155  22 27 0 PPPP KUALA LUMPUR/SUBANG
+48648 310    10165  47 46 0 ---- PETALING JAYA
+48649 305    10308  34 33 0 ---- MUADZAM SHAH
+48650 272    10170  17 21 0 TPTP KUALA LUMPUR INTERNATIONAL AIRPORT (KLIA)
+48653 347    10238  40 39 0 ---- TEMERLOH
+48657 378    10322  16 15 0 TPTP KUANTAN
+48665 227    10225  9 9 0 ---- MALACCA
+48670 187    10298  7 6 0 ---- BATU PAHAT
+48672 202    10332  86 88 0 ---- KLUANG
+48674 245    10383  45 44 0 ---- MERSING
+48679 163    10367  40 38 0 ---- JOHORE BHARU/SENAI
+96413 148    11033  27 22 0 TPTP KUCHING
+96418 122    11145  10 10 0 ---- SRI AMAN/SIMANGGANG
+96421 233    11183  31 31 0 ---- SIBU
+96441 320    11303  5 3 0 TPTP BINTULU
+96449 433    11398  18 17 0 ---- MIRI
+96465 530    11525  30 29 0 ---- LABUAN
+96471 593    11605  3 2 0 TPTP KOTA KINABALU
+96477 692    11683  5 3 0 ---- KUDAT
+96481 427    11788  20 20 0 T-T- TAWAU
+96491 590    11807  13 10 0 PPPP SANDAKAN
+91530 -53    16692  6 6 0 ---- NAURU AIRPORT
+91531 -50    16692  0 0 0 ---- NAURU
+91532 -52    16692  7 7 0 ---- NAURU ARC-2
+91570 -1847  16308  4 4 0 ---- ILE SURPRISE
+91571 -2045  16420  0 595 0 ---- THIEBAGI RADAR
+91573 -1972  16365  85 84 0 ---- ILE ART (BELEP)
+91574 -1997  15847  6 4 0 ---- ILE LOOP (CHESTERFIELD)
+91577 -2055  16428  18 23 0 ---- KOUMAC (NLLE-CALEDONIE)
+91579 -2063  16657  7 7 0 ---- OULOUP (ILE OUVEA)
+91582 -2077  16723  29 28 0 ---- OUANAHAM (ILE LIFOU)
+91583 -2092  16532  13 11 0 ---- POINDIMIE (NLLE-CALEDONIE)
+91587 -2147  16803  39 43 0 ---- LA ROCHE (ILE MARE)
+91590 -2202  16622  37 16 0 ---- LA TONTOUTA (NLLE-CALEDONIE)
+91592 -2227  16645  69 69 0 T-T- NOUMEA (NLLE-CALEDONIE)
+91596 -2258  16745  94 96 0 ---- MOUE (ILE DES PINS)
+91598 -2233  17135  28 27 0 ---- MATTHEW (ILOT)
+93004 -3442  17267  212 214 0 ---- CAPE REINGA AWS
+93012 -3505  17328  0 85 0 ---- KAITAIA AWS
+93021 -3525  17390  151 150 0 ---- KERIKERI AERO AWS
+93023 -3512  17402  86 84 0 ---- PURERUA AWS
+93034 -3542  17382  0 204 0 ---- KAIKOHE AWS
+93057 -3577  17435  37 41 0 ---- WHANGAREI AERO AWS
+93069 -3590  17510  59 69 0 ---- MOKOHINAU ISLAND AWS
+93098 -3678  17462  26 39 0 ---- WHENUAPAI AWS
+93103 -3660  17483  88 97 0 ---- WHANGAPARAOA AWS
+93110 -3700  17480  7 7 0 ---- AUCKLAND AERO AWS
+93112 -3678  17462  30 30 0 T-T- WHENUAPAI
+93128 -3703  17593  0 103 0 ---- SLIPPER ISLAND AWS
+93129 -3682  17567  5 5 0 ---- WHITIANGA AWS
+93130 -3750  17717  0 310 0 ---- WHITE ISLAND AWS
+93137 -3702  17497  41 34 0 ---- ARDMORE AERO AWS
+93143 -3713  17565  0 344 0 ---- KOPU EAST AWS
+93146 -3737  17568  18 17 0 ---- PAEROA AWS
+93173 -3785  17532  53 52 0 ---- HAMILTON AERO AWS
+93179 -3733  17588  248 241 0 ---- GOLDEN VALLEY AWS
+93182 -3787  17592  0 466 0 ---- KAIMAI AWS
+93186 -3767  17618  4 4 0 ---- TAURANGA AERO AWS
+93191 -3792  17692  7 6 0 ---- WHAKATANE AERO AWS
+93196 -3755  17830  46 44 0 ---- HICKS BAY AWS
+93201 -3815  17470  28 25 0 ---- PORT TAHAROA AWS
+93226 -3888  17532  185 184 0 ---- TAUMARUNUI AWS
+93227 -3902  17563  0 640 0 ---- TONGARIRO AWS
+93228 -3912  17578  0 710 0 ---- MOTUROA AWS
+93245 -3873  17607  401 407 0 ---- TAUPO AERO AWS
+93247 -3810  17630  285 286 0 ---- ROTORUA AERO AWS
+93251 -3887  17567  0 455 0 ---- KURATAU JUNCTION AWS
+93254 -3880  17625  0 745 0 ---- HIGH LEVEL ROAD AWS
+93257 -3840  17673  175 168 1 ---- GALATEA AWS
+93258 -3805  17605  617 599 1 ---- MAMAKU RADAR AWS
+93259 -3887  17638  0 750 0 ---- EASTERN RANGITAIKI AWS
+93263 -3988  17565  261 254 0 ---- FLAT HILLS AWS
+93285 -3837  17830  12 5 0 ---- TOLAGA BAY AWS
+93292 -3865  17798  5 5 0 ---- GISBORNE AERO AWS
+93294 -3917  17540  0 824 0 ---- NATIONAL PARK AWS
+93295 -3912  17552  0 880 0 ---- MANGATEPOPO AWS
+93305 -3953  17342  36 47 0 ---- MAUI A PLATFORM
+93309 -3900  17418  27 30 0 ---- NEW PLYMOUTH AERO AWS
+93313 -3960  17428  100 98 0 ---- HAWERA AWS
+93327 -3995  17502  14 8 0 ---- WANGANUI AERO AWS
+93334 -3947  17568  823 821 1 ---- WAIOURU AWS
+93339 -3943  17565  819 818 0 ---- WAIOURU AIRSTRIP
+93346 -3928  17573  1071 1066 0 ---- DESERT ROAD AWS
+93355 -3943  17528  0 517 0 ---- RAETIHI AWS
+93365 -3948  17567  819 813 0 ---- SOUTH WAIOURU AWS
+93369 -3912  17658  0 720 0 ---- TE HAROTO AWS
+93370 -3923  17668  0 471 0 ---- TE POHUE AWS
+93373 -3945  17685  3 2 0 ---- NAPIER AERO AWS
+93376 -3963  17708  113 109 0 ---- CAPE KIDNAPPERS AWS
+93387 -3937  17570  1001 996 1 ---- AQUEDUCT HILL AWS
+93388 -3942  17568  897 891 1 ---- WAIOURU NORTH AWS
+93393 -3912  17795  136 134 0 ---- MAHIA AWS
+93394 -3917  17788  419 403 0 ---- MAHIA RADAR AWS
+93402 -4018  17537  48 50 0 ---- OHAKEA AERO AWS
+93404 -4032  17560  39 46 0 ---- PALMERSTON NORTH AERO AWS
+93410 -4062  17525  15 13 0 ---- LEVIN AWS
+93417 -4090  17498  7 6 0 T-T- PARAPARAUMU AERODROME
+93420 -4090  17498  7 6 0 ---- PARAPARAUMU AERO AWS
+93437 -4128  17477  127 125 0 ---- KELBURN AWS
+93439 -4132  17480  4 13 0 ---- WELLINGTON AERO AWS
+93441 -4003  17627  347 346 0 ---- TAKAPAU PLAINS AWS
+93466 -4125  17478  11 7 0 ---- AOTEA QUAY AWS
+93467 -4097  17563  104 111 0 ---- MASTERTON AERO AWS
+93468 -4110  17522  0 555 0 ---- RIMUTAKA SUMMIT AWS
+93479 -4158  17523  7 5 0 ---- NGAWI AWS
+93480 -4110  17525  393 387 0 ---- RIMUTAKA PAGES POINT AWS
+93493 -4048  17660  292 285 0 ---- CAPE TURNAGAIN AWS
+93498 -4090  17620  120 118 0 ---- CASTLEPOINT AWS
+93515 -4173  17157  4 4 0 ---- WESTPORT AERO AWS
+93520 -4173  17145  0 72 0 ---- CAPE FOULWIND AWS
+93527 -4053  17300  4 3 0 ---- FAREWELL SPIT AWS
+93530 -4102  17290  0 655 0 ---- TAKAKA HILL AWS
+93537 -4170  17258  0 372 0 ---- KAWATIRI AWS
+93546 -4130  17320  6 5 0 ---- NELSON AERO AWS
+93552 -4233  17217  0 435 0 ---- SPRINGS JUNCTION AWS
+93562 -4065  17398  0 180 0 ---- STEPHENS ISLAND AWS
+93579 -4152  17385  35 33 0 ---- WOODBOURNE AERO AWS
+93581 -4133  17395  0 23 0 ---- KOROMIKO AWS
+93586 -4110  17443  68 68 0 ---- BROTHERS ISLAND AWS
+93597 -4172  17427  32 2 0 ---- CAPE CAMPBELL AWS
+93614 -4270  17098  40 45 0 P-PP HOKITIKA AERODROME
+93615 -4270  17098  40 45 0 ---- HOKITIKA AERO AWS
+93616 -4275  17592  0 13 0 ---- HOKITIKA SOUTH AWS
+93656 -4277  17288  181 174 0 ---- CULVERDEN AWS
+93661 -4287  17272  0 235 0 ---- HURUNUI AWS
+93678 -4242  17368  107 107 0 ---- KAIKOURA AWS
+93701 -4338  17015  0 129 0 ---- FRANZ JOSEF AWS
+93709 -4385  16900  5 3 0 ---- HAAST AWS
+93721 -4467  16792  3 3 0 ---- MILFORD AERO AWS
+93729 -4472  16923  351 348 0 ---- WANAKA AERO AWS
+93737 -4423  17012  460 480 0 ---- PUKAKI AERO AWS
+93745 -4403  17037  0 730 0 ---- TEKAPO AWS
+93747 -4452  16988  0 488 0 ---- TARA HILLS AWS
+93753 -4403  17077  403 396 0 ---- FAIRLIE AWS
+93756 -4360  17163  0 352 0 ---- METHVEN AWS
+93765 -4390  17180  0 90 0 ---- ASHBURTON AERO AWS
+93773 -4430  17122  27 27 0 ---- TIMARU AERO AWS
+93779 -4350  17273  13 8 0 ---- NEW BRIGHTON PIER AWS
+93781 -4348  17252  35 37 0 ---- CHRISTCHURCH AERO AWS
+93784 -4360  17263  0 496 0 ---- SUGARLOAF AWS
+93792 -4373  17312  237 236 0 ---- LE BON BAY AWS
+93796 -4497  17107  29 30 0 ---- OAMARU AERO AWS
+93800 -4522  16688  18 17 0 ---- SECRETARY ISLAND AWS
+93805 -4615  16660  44 44 0 ---- PUYSEGUR POINT AWS
+93811 -4552  16763  209 209 0 ---- MANAPOURI AERO AWS
+93819 -4610  16922  0 1225 0 ---- WAIPAHI AWS
+93820 -4620  16977  0 115 0 ---- BALCLUTHA AWS
+93822 -4480  16950  0 445 0 ---- CLUDEN HILL AWS
+93823 -4500  16877  0 370 0 ---- SHOTOVER AWS
+93824 -4500  16998  0 615 0 ---- WEDDERBURN AWS
+93825 -4512  16952  0 290 0 ---- OMAKAU AWS
+93826 -4565  16938  0 80 0 ---- MILLERS FLAT AWS
+93831 -4502  16873  354 357 0 ---- QUEENSTOWN AERO AWS
+93834 -4573  16843  194 192 0 ---- LUMSDEN AWS
+93835 -4558  16852  0 1271 0 ---- MID DOME AWS
+93838 -4593  16790  149 147 0 ---- BIRCHWOOD AWS
+93844 -4642  16832  4 2 0 T-TP INVERCARGILL AIRPORT
+93845 -4640  16832  2 2 0 ---- INVERCARGILL AERO AWS
+93851 -4552  16930  160 154 0 ---- ROXBURGH AWS
+93864 -4610  16888  0 123 0 ---- GORE AWS
+93878 -4633  16832  0 15 0 ---- WALLACETOWN AWS
+93887 -4643  16980  131 131 0 ---- NUGGET POINT AWS
+93891 -4592  17018  2 1 0 ---- DUNEDIN AERO AWS
+93898 -4580  17047  0 716 0 ---- SWAMPY SUMMIT AWS
+93909 -4727  16745  102 102 0 ---- SOUTH WEST CAPE AWS
+93929 -5048  16628  40 38 0 ---- ENDERBY ISLAND AWS
+93947 -5255  16913  19 18 0 ---- CAMPBELL ISLAND AWS
+93987 -4395  -17655 48 46 0 ---- CHATHAM ISLAND AWS
+93994 -2923  -17792 49 47 0 ---- RAOUL ISLAND AWS
+93997 -2923  -17792 49 47 0 T--- RAOUL ISLAND, KERMADEC IS.
+91822 -1907  -16992 22 20 0 ---- ALOFI
+91824 -1908  -16993 59 59 0 ---- HANAN AIRPORT
+92001 -608   14118  35 26 0 ---- KIUNGA W.O.
+92003 -908   14320  9 5 0 ---- DARU W.O.
+92004 -358   14367  4 6 0 ---- WEWAK W.O.
+92005 -583   14430  0 1631 0 ---- MT HAGEN ATS
+92006 -548   14460  0 884 0 ---- KOINAMBE
+92010 -607   14538  0 1587 0 ---- GOROKA ATS
+92011 -602   14497  0 1493 0 ---- KUNDIAWA
+92012 -795   14577  0 3 0 ---- KEREMA
+92013 -578   14033  0 1480 0 ---- OROBIGA
+92014 -522   14580  5 3 0 ---- MADANG W.O.
+92016 -632   14590  0 1554 0 ---- AIYURA
+92017 -422   14282  0 10 0 ---- AMBUNTI
+92021 -617   14367  0 1676 0 ---- MENDI
+92022 -270   14132  0 3 0 ---- VANIMO
+92023 -720   14665  0 583 0 ---- BULOLO
+92026 -408   14408  0 40 0 ---- SARAMANDI
+92031 -637   14330  0 807 0 ---- LAKE KUTUBU
+92035 -938   14722  48 48 0 T--- PORT MORESBY W.O.
+92036 -242   14738  0 1 0 ---- LOMBRUM, MANUS ISLAND
+92040 -202   14698  0 4 0 ---- BIPI
+92044 -205   14742  4 4 0 T--- MOMOTE W.O.
+92045 -390   14118  0 79 0 ---- GREEN RIVER
+92047 -657   14672  70 70 0 ---- NADZAB W.O.
+92051 -665   14388  0 1036 0 ---- ERAVE
+92057 -958   14863  0 45 0 ---- SAFIA
+92058 -908   14932  0 15 0 ---- TUFI
+92068 -997   14938  0 1005 0 ---- AGAUN
+92069 -1005  15100  0 3 0 ---- KURADA
+92070 -1062  15067  0 3 0 ---- SIDEIA
+92071 -617   15095  0 3 0 ---- UVOL
+92072 -547   15040  0 8 0 ---- HOSKINS W.O.
+92075 -548   15040  0 5 0 ---- DAMI
+92076 -257   15082  4 3 0 ---- KAVIENG W.O.
+92077 -1032  15033  23 20 0 ---- GURNEY W.O.
+92080 -967   15078  0 15 0 ---- SALAMO
+92082 -332   15467  0 3 0 ---- NUGURIA
+92083 -367   15245  0 42 0 ---- NAMATANAI
+92084 -402   15367  0 2 0 ---- FENI
+92087 -1068  15283  7 6 0 ---- MISIMA W.O.
+92090 -1132  15423  0 10 0 ---- JINJO
+92092 -1130  15327  0 3 0 ---- NIMOWA
+92100 -433   15237  13 10 0 ---- TOKUA W.O.
+98132 2080   12185  124 123 0 ---- ITBAYAT
+98133 1927   12147  13 12 0 ---- CALAYAN
+98134 2042   12197  167 166 0 ---- BASCO RADAR
+98135 2045   12197  11 10 0 P-P- BASCO
+98222 1788   12045  57 58 0 ---- SINAIT SYNOPTIC STATION
+98223 1817   12053  5 4 0 T--- LAOAG
+98231 1837   12162  0 0 0 ---- APARRI RADAR
+98232 1835   12162  3 2 0 ---- APARRI
+98233 1763   12175  62 61 0 ---- TUGUEGARAO
+98321 1635   12055  2256 2254 0 ---- STO. TOMAS
+98322 1532   12038  161 0 0 ---- CROW VALLEY GUNNERY RANGE
+98323 1570   11997  5 0 0 ---- NAULA POINT
+98324 1532   11997  5 4 0 ---- IBA
+98325 1608   12035  2 1 0 ---- DAGUPAN
+98326 1498   12048  46 0 0 ---- BASA AB
+98327 1518   12053  155 154 0 ---- CLARK AB
+98328 1640   12060  1501 1500 0 P-P- BAGUIO
+98329 1573   12093  76 75 0 ---- MUNOZ
+98330 1547   12093  32 31 0 ---- CABANATUAN
+98333 1575   12155  6 4 0 ---- BALER
+98334 1573   12162  178 175 0 ---- BALER RADAR
+98336 1625   12212  4 3 0 ---- CASIGURAN
+98425 1458   12097  13 0 0 ---- MANILA
+98426 1478   12027  19 18 0 ---- SUBIC BAY WEATHER STATION
+98427 1400   12160  158 157 0 ---- TAYABAS
+98428 1448   12088  4 3 0 ---- SANGLEY POINT
+98429 1450   12100  15 14 0 ---- NINOY AQUINO INTERNATIONAL AIRPORT
+98430 1463   12103  46 45 0 ---- SCIENCE GARDEN
+98431 1340   12118  41 39 0 ---- CALAPAN
+98432 1408   12105  11 10 0 ---- AMBULONG
+98433 1457   12137  651 650 0 T--- TANAY
+98434 1473   12163  7 5 0 ---- INFANTA
+98435 1410   12202  5 4 0 ---- ALABAT
+98436 1395   12138  372 0 0 ---- FERNANDO AB
+98437 1337   12252  45 44 0 ---- SAN FRANCISCO
+98440 1412   12297  4 3 0 ---- DAET
+98442 1357   12325  35 34 0 ---- PILI
+98444 1315   12372  17 16 0 T--- LEGASPI
+98446 1358   12420  40 39 0 ---- VIRAC
+98447 1365   12433  233 228 0 ---- CATANDUANES RADAR
+98526 1222   12018  60 59 0 ---- CORON
+98531 1235   12103  3 2 0 ---- SAN JOSE
+98536 1258   12227  47 46 0 ---- ROMBLON
+98538 1160   12273  4 3 0 ---- ROXAS
+98543 1235   12362  6 0 0 ---- MASBATE
+98546 1250   12462  7 6 0 ---- CATARMAN
+98548 1177   12488  5 3 0 ---- CATBALOGAN
+98550 1122   12502  3 2 0 ---- TACLOBAN
+98553 1165   12543  3 2 0 ---- BORONGAN
+98558 1103   12575  60 56 0 ---- GUIUAN
+98618 973    11875  15 13 0 T--- PUERTO PRINCESA
+98630 1085   12100  4 3 0 P-P- CUYO
+98637 1070   12253  8 7 0 ---- ILOILO
+98642 932    12328  8 5 0 ---- DUMAGUETE
+98644 967    12385  8 7 0 ---- TAGBILARAN
+98645 1033   12390  35 33 0 ---- LAHUG
+98646 1032   12397  24 23 0 T--- MACTAN
+98648 1013   12485  72 71 0 ---- MAASIN
+98653 977    12548  55 54 0 P-P- SURIGAO
+98712 818    11730  3 2 0 ---- BUGSUK
+98741 860    12333  5 3 0 ---- DIPOLOG
+98746 715    12420  62 0 0 ---- COTOBATO
+98747 840    12460  188 186 0 ---- LUMBIA AIRPORT
+98748 848    12463  6 5 0 ---- CAGAYAN DE ORO
+98751 815    12513  627 626 0 ---- MALAYBALAY
+98752 893    12547  46 45 0 ---- BUTUAN
+98753 712    12565  18 17 0 P-P- DAVAO AIRPORT
+98755 835    12633  3 2 0 ---- HINATUAN
+98815 700    11808  34 33 0 ---- CAGAYAN DE TAWI-TAWI
+98830 605    12100  13 11 0 ---- JOLO
+98836 692    12205  6 5 0 P-P- ZAMBOANGA
+98851 605    12510  133 132 0 ---- GENERAL SANTOS
+98904 1707   12243  16 15 0 ---- PALANAN
+91701 -277   -17172 2 2 0 T--- KANTON ISLAND
+91756 -1382  -17175 0 0 0 ---- APIA WHARF
+91759 -1382  -17200 5 1 0 ---- FALEOLO AIRPORT
+91760 -1350  -17263 4 4 0 ---- ASAU
+91762 -1380  -17178 2 2 0 PPPP APIA
+91764 -1433  -17083 0 0 0 ---- CAPE TAPUTAPU AWS, AMERICAN SAMOA *
+91765 -1433  -17072 4 5 0 T-T- PAGO PAGO/INT.AIRP. AMERICAN SAMOA
+91766 -1432  -17057 0 0 0 ---- CAPE MATATULA AWS, AMERICAN SAMOA *
+91768 -1418  -16950 0 0 0 ---- TA'U AWS, AMERICAN SAMOA *
+48687 138    10372  12 15 0 ---- SINGAPORE/TENGAH
+48692 142    10388  14 11 0 ---- SINGAPORE/SELETAR
+48694 137    10392  32 18 0 ---- SINGAPORE/PAYA LEBAR
+48698 137    10398  16 5 0 TPTP SINGAPORE/CHANGI AIRPORT
+91502 -670   15638  3 2 0 ---- TARO ISLAND
+91503 -833   15727  6 6 0 ---- MUNDA
+91507 -878   16073  11 10 0 ---- AUKI
+91517 -942   15997  56 55 0 TPPP HONIARA
+91520 -942   16005  9 8 0 ---- HONIARA/HENDERSON
+91527 -1042  16192  3 5 0 ---- KIRA KIRA
+91541 -1070  16580  24 23 0 ---- SANTA CRUZ
+91901 -38    -16002 2 0 0 ---- JARVIS ISLAND
+91902 -405   -15500 2 0 0 ---- MALDEN ISLAND (NORPAX)
+91903 -405   -15500 2 0 0 ---- MALDEN ISLAND (UNIV. OF HAWAII)
+97385 -920   12437  5 0 0 P--- OE-CUSSIE
+97388 -855   12657  0 0 0 P--- DILLI/COMORO
+97389 -855   12552  0 0 0 ---- COMORO
+97390 -857   12557  6 0 0 ---- DILLI/DILLI AIRPORT
+97394 -887   12637  47 0 0 ---- VIQUEQUE
+97395 -850   12640  522 0 0 ---- BAU CAU
+91720 -853   -17252 3 2 0 ---- ATAFU
+91723 -920   -17190 3 3 0 ---- NUKUNONU AWS
+91724 -920   -17192 3 1 0 ---- NUKUNONO
+91727 -938   -17127 4 3 0 ---- FENUAFALA/FAKAOFO
+91772 -1557  -17562 61 60 0 ---- NIUAFOOU
+91776 -1595  -17377 3 2 0 ---- KEPPEL/MATA'AHO AIRPORT
+91779 -1858  -17397 70 67 0 ---- LUPEPAU'U
+91780 -1865  -17398 10 9 0 ---- VAVAU
+91784 -1980  -17435 3 2 0 ---- HAAPAI
+91785 -1995  -17470 0 4 0 ---- HA'AFEVA
+91786 -2025  -17480 36 35 0 ---- NOMUKA
+91789 -2113  -17518 0 0 0 ---- NUKU'ALOFA
+91792 -2123  -17515 41 38 0 PPPP FUA'AMOTU
+91631 -567   17613  3 2 0 ---- NANUMEA
+91636 -723   17715  2 1 0 ---- NUI
+91642 -850   17922  0 0 0 ---- FUNAFUTI
+91643 -852   17922  2 1 0 T-P- FUNAFUTI
+91648 -1075  17950  3 2 0 ---- NIULAKITA
+91551 -1385  16755  18 17 0 ---- SOLA (VANUA LAVA)
+91554 -1552  16722  44 41 0 ---- PEKOA AIRPORT (SANTO)
+91555 -1642  16780  26 26 0 ---- LAMAP (MALEKULA)
+91557 -1770  16830  21 20 0 T--- BAUERFIELD (EFATE)
+91565 -1945  16922  8 0 0 ---- WHITE GRASS AIRPORT
+91568 -2023  16977  7 6 0 ---- ANEITYUM
+13600 4210   1953   43 43 0 ---- SHKODRA
+13601 4133   1980   97 90 0 ---- TIRANA-LA PRAKA
+13610 4203   2042   354 354 0 ---- KUKES
+13611 4130   1945   12 15 0 ---- DURRES
+13615 4133   1978   90 89 0 -PPP TIRANA
+13619 4168   2043   653 657 0 ---- PESHKOPI
+13622 4047   1948   5 1 0 ---- VLORE
+13624 4080   1990   33 32 0 ---- QYTETI STALIN
+13625 4008   2015   194 193 0 ---- GJIROKASTRA
+13629 4060   2077   899 889 0 ---- KORCA
+37609 4102   4387   2011 0 2 ---- ASHOTSK
+37618 4112   4427   1507 0 2 ---- TASHIR
+37626 4125   4482   450 0 0 ---- BAGRATASHEN
+37627 4105   4460   1105 0 2 ---- ODZUN
+37682 4093   4377   1876 0 2 ---- AMASIA
+37686 4077   4385   1512 0 2 ---- GYUMRI
+37689 4062   4395   1724 0 2 ---- ARTIK
+37690 4062   4422   2100 0 2 ---- TSAHKAHOVIT
+37693 4100   4440   1397 0 2 ---- STEPANAVAN
+37694 4090   4443   2066 0 2 ---- PUSHKINI CANYON
+37698 4063   4448   1991 0 2 ---- HANKAVAN
+37699 4053   4438   1889 0 2 ---- APARAN
+37704 4083   4443   1375 0 2 ---- VANADZOR
+37706 4073   4485   1256 0 2 ---- DILIJAN
+37708 4065   4488   2104 0 2 ---- SEMYONOVKA
+37711 4087   4513   732 0 0 ---- IDJEVAN
+37717 4055   4500   1917 0 2 ---- SEVAN OZERO
+37719 4058   4535   1852 0 2 ---- TCHAMBARAK
+37770 4095   4377   1842 0 2 ---- APARAN JRAMBAR
+37772 4038   4388   1636 0 2 ---- TALIN
+37781 4047   4417   3227 0 3 ---- ARAGATS H/M
+37782 4038   4425   2071 0 2 ---- AMBERD
+37783 4018   4440   942 0 0 ---- MERDZAVAN
+37785 4028   4435   1090 0 2 ---- ASHTARAK
+37786 4032   4447   1336 0 2 ---- EGVARD
+37787 4013   4390   860 0 0 ---- ARMAVIR
+37788 4015   4440   854 0 0 ---- YEREVAN ZVARTNOTS
+37789 4020   4452   1013 0 2 ---- YEREVAN ARABKIR
+37789 4022   4450   1134 0 2 T--- YEREVAN AERO
+37791 4038   4467   1779 0 2 ---- FANTAN
+37792 4048   4475   1765 0 2 ---- HRAZDAN
+37801 4035   4512   1960 0 2 ---- GAVAR
+37802 4048   4527   1917 0 2 ---- SHORJA
+37808 4013   4528   1943 0 2 ---- MARTUNI
+37815 4020   4575   1934 0 2 ---- MASRIK
+37871 3992   4452   829 0 0 ---- ARTASHAT
+37872 3992   4482   1063 0 2 ---- URTSADZOR
+37873 3995   4523   2334 0 3 ---- YANIKH
+37874 3982   4457   817 0 0 ---- ARARAT
+37875 3972   4505   1008 0 2 ---- ARENI
+37878 4095   4507   2122 0 2 ---- ANANUN CANYON
+37880 3970   4572   2387 0 3 ---- VOROTANI CANYON
+37882 3982   4567   2064 0 2 ---- JERMUK
+37897 3950   4603   1580 0 2 ---- SISIAN
+37950 3915   4613   1842 0 2 ---- KAJARAN
+37953 3950   4633   1550 0 2 ---- GORIS
+37958 3890   4623   626 0 0 ---- MEGHRI
+37959 3920   4643   704 0 0 ---- KAPAN
+11001 4810   1367   618 638 0 ---- WOLFSEGG
+11004 4832   1337   351 351 0 ---- REICHERSBERG
+11008 4857   1398   602 596 0 ---- ROHRBACH
+11010 4823   1418   313 298 0 -T-- LINZ/HOERSCHING-FLUGHAFEN
+11012 4805   1412   389 382 0 ---- KREMSMUENSTER
+11015 4850   1450   548 549 0 ---- FREISTADT
+11018 4810   1488   269 266 0 ---- AMSTETTEN
+11019 4868   1537   606 598 0 ---- ALLENTSTEIG
+11020 4862   1520   505 502 0 ---- STIFT ZWETTL
+11021 4895   1503   555 564 0 ---- LITSCHAU
+11022 4875   1593   320 320 0 ---- RETZ
+11023 4858   1567   272 267 0 ---- GARS AM KAMP
+11024 4833   1533   1000 1003 2 ---- JAUERLING
+11025 4870   1488   569 571 0 ---- WEITRA
+11027 4838   1618   202 202 0 ---- STOCKERAU
+11030 4832   1612   176 175 0 ---- TULLN/LANGENLEBARN
+11031 4817   1593   490 490 0 ---- KOHLREITHBERG
+11032 4867   1663   194 197 0 ---- POYSDORF
+11034 4818   1637   177 177 0 ---- WIEN/INNERE STADT
+11035 4823   1635   200 198 0 ---- WIEN/HOHE WARTE
+11035 4823   1635   209 197 0 TPTP WIEN/HOHE WARTE
+11036 4810   1657   184 184 0 ---- WIEN/SCHWECHAT-FLUGHAFEN
+11037 4818   1655   152 154 0 ---- GROSSENZERSDORF
+11038 4807   1653   0 205 0 ---- RAUCHENWARTH BEI SCHWECHAT
+11040 4812   1642   200 201 0 ---- WIEN/UNTERLAA
+11051 4822   1302   390 382 0 ---- RANSHOFEN
+11052 4805   1305   0 550 0 ---- FELDKIRCHEN
+11053 4822   1347   429 427 0 ---- RIED IM INNKREIS
+11055 4845   1343   312 306 0 ---- SCHAERDING
+11059 4815   1407   312 309 0 ---- WELS/SCHLEISSHEIM
+11060 4828   1428   262 261 0 ---- LINZ-STADT
+11070 4842   1562   203 203 0 ---- KREMS
+11075 4847   1568   208 206 0 ---- LANGENLOIS
+11078 4802   1558   695 696 0 ---- LILIENFELD/TARSCHBERG
+11080 4820   1622   227 225 0 ---- WIEN/MARIABRUNN
+11081 4800   1623   241 244 0 ---- BADEN
+11082 4803   1627   221 219 0 ---- GUMPOLDSKIRCHEN
+11083 4855   1637   458 456 0 ---- LEISER BERGE
+11085 4833   1682   145 143 0 ---- ZWERNDORF-MARCHEGG
+11090 4825   1643   161 161 0 ---- WIEN-DONAUFELD
+11101 4750   973    439 424 0 ---- BREGENZ
+11105 4727   960    435 438 0 ---- FELDKIRCH
+11109 4713   1027   1285 1285 0 ---- ST. ANTON ARLBERG TUNNEL
+11110 4712   1022   2089 2083 2 ---- GALZIG
+11111 4750   1050   1097 1099 0 ---- TANNHEIM
+11112 4713   1055   806 796 0 ---- LANDECK
+11113 4688   1048   1341 1330 0 ---- NAUDERS
+11119 4732   1117   1182 1182 2 ---- SEEFELD
+11120 4725   1135   593 579 0 T--- INNSBRUCK-FLUGHAFEN
+11121 4725   1135   584 579 0 ---- INNSBRUCK-FLUGHAFEN (AUTOMAT)
+11124 4715   1020   0 2809 0 ---- VALLUGA (RADAR)
+11126 4720   1145   2252 2247 2 ---- PATSCHERKOFEL
+11127 4687   1102   1939 1941 2 ---- OBERGURGL
+11128 4700   1150   1639 1371 2 ---- BRENNER
+11130 4757   1215   491 490 0 ---- KUFSTEIN
+11135 4742   1235   1763 1790 2 ---- HAHNENKAMM/EHRENBACHHOEHE
+11136 4722   1217   1009 1009 2 ---- KRIMML
+11137 4740   1290   794 792 0 ---- MARIA ALM
+11138 4713   1262   2310 2304 3 ---- RUDOLFSHUETTE-ALPINZENTRUM
+11140 4757   1268   624 624 0 ---- LOFER
+11141 4740   1322   547 549 0 ---- BISCHOFSHOFEN
+11144 4732   1278   767 766 0 ---- ZELL AM SEE
+11146 4705   1295   3111 3105 3 ---- SONNBLICK
+11147 4738   1345   859 858 0 ---- RADSTADT
+11148 4708   1362   1051 1051 0 ---- ST. MICHAEL/LUNGAU
+11149 4723   1355   1743 1763 2 ---- OBERTAUERN
+11150 4780   1300   450 430 0 ---- SALZBURG-FLUGHAFEN
+11152 4797   1310   503 505 0 ---- MATTSEE
+11153 4785   1333   482 480 0 ---- MONDSEE
+11154 4790   1380   425 424 0 ---- GMUNDEN
+11155 4782   1372   1621 1618 2 ---- FEUERKOGEL
+11157 4752   1413   651 641 0 ---- AIGEN IM ENNSTAL
+11161 4752   1495   1211 1214 0 ---- PRAEBICHL
+11164 4705   1457   0 2372 0 ---- ZIRBITZKOGEL
+11170 4785   1507   611 611 0 ---- LUNZ
+11171 4778   1530   865 863 0 ---- MARIAZELL/ST SEBASTIAN
+11173 4743   1563   1037 1034 0 ---- FISCHBACH
+11174 4733   1500   572 580 0 ---- ST. MICHAEL/LEOBEN
+11175 4740   1523   483 481 0 ---- BRUCK/MUR
+11180 4772   1577   1557 1547 2 ---- RAX/SEILBAHN-BERGSTATION
+11182 4782   1622   285 319 0 ---- WIENER NEUSTADT
+11185 4750   1603   995 990 2 ---- MOENICHKIRCHEN
+11190 4785   1653   200 200 0 ---- EISENSTADT
+11192 4720   1633   267 265 0 ---- KLEINZICKEN
+11193 4733   1622   0 340 0 ---- BAD TATZMANNSDORF
+11194 4795   1683   149 148 0 ---- NEUSIEDL
+11201 4673   1242   1088 1086 2 ---- SILLIAN
+11204 4682   1280   668 661 0 ---- LIENZ
+11206 4695   1290   1079 1078 0 ---- DOELLACH
+11212 4660   1367   2160 2140 2 ---- VILLACHER ALPE
+11213 4662   1387   494 493 0 ---- VILLACH
+11214 4693   1492   1035 1035 0 ---- PREITENEGG
+11215 4680   1357   719 719 0 ---- MILLSTATT
+11220 4707   1442   871 869 0 ---- NEUMARKT
+11221 4707   1508   0 462 0 ---- KOEFLACH
+11225 4683   1418   716 708 0 ---- WEITENSFELD
+11227 4672   1408   546 546 0 ---- FELDKIRCHEN
+11228 4695   1440   644 644 0 ---- FRIESACH
+11229 4675   1482   408 406 0 ---- ST. ANDRAE I.L.
+11231 4663   1432   476 450 0 ---- KLAGENFURT-FLUGHAFEN
+11232 4655   1477   530 531 0 ---- FEISTRITZ OB BLEIBURG
+11234 4648   1458   620 623 0 ---- BAD EISENKAPPEL
+11237 4673   1438   460 462 0 ---- ST.VEIT/GLAN
+11238 4703   1540   355 356 0 ---- GRAZ/STRASSGANG
+11240 4698   1543   363 340 0 -T-- GRAZ-THALERHOF-FLUGHAFEN
+11241 4718   1545   1438 1443 2 ---- SCHOECKL
+11242 4717   1548   730 725 0 ---- ST. RADEGUND
+11243 4722   1563   465 468 0 ---- WEIZ
+11244 4687   1590   271 269 0 ---- BAD GLEICHENBERG
+11248 4668   1597   216 210 0 ---- BAD RADKERSBURG
+11252 4700   1245   1192 1211 0 ---- VIRGEN
+11255 4667   1298   711 714 0 ---- KOETSCHACH-MAUTHEN
+11260 4698   1315   1189 1185 2 ---- MALLNITZ-BAD
+11261 4692   1322   811 809 0 ---- OBERVELLACH
+11263 4672   1328   954 945 2 ---- WEISSENSEE/GATSCHACH
+11265 4660   1367   2157 2156 2 ---- VILLACHER ALPE- AUTOM.
+11270 4673   1307   627 628 0 ---- DELLACH IM DRAUTAL
+11272 4678   1348   543 541 0 ---- SPITTAL/DRAU
+11275 4672   1385   869 870 0 ---- ARRIACH
+11278 4662   1415   453 450 0 ---- POERTSCHACH
+11280 4710   1417   814 815 0 ---- MURAU
+11285 4682   1522   355 354 0 ---- DEUTSCHLANDSBERG
+11290 4707   1543   378 366 0 ---- GRAZ UNIVERSITAET
+11292 4707   1558   529 530 0 ---- LASSNITZHOEHE
+11296 4677   1555   268 267 0 ---- LEIBNITZ
+11298 4693   1587   320 323 0 ---- FELDBACH
+11301 4745   983    715 715 0 ---- ALBERSCHWENDE
+11302 4742   972    407 407 0 ---- DORNBIRN
+11304 4710   973    1032 1029 0 ---- BRAND
+11305 4707   987    1004 1006 2 ---- LATSCHAU/TSCHAGGUNS
+11306 4725   1008   1260 1260 2 ---- SCHROECKEN
+11307 4712   1012   1216 1221 2 ---- LANGEN/ARLBERG
+11308 4725   1018   1470 1478 2 ---- WARTH
+11310 4697   1032   2319 2323 3 ---- ISCHGL/IDALPE
+11312 4697   1018   1576 1587 2 ---- GALTUER
+11314 4748   1070   843 841 0 ---- REUTTE
+11315 4725   1033   1140 1140 0 ---- HOLZGAU
+11316 4692   1087   2843 2913 3 ---- PITZTALER GLETSCHER
+11318 4690   1085   0 3440 0 ---- BRUNNENKOGEL/OETZTALER ALPEN
+11325 4738   1175   539 530 2 ---- JENBACH
+11328 4752   1170   908 904 2 ---- ACHENKIRCH
+11330 4717   1185   633 633 0 ---- MAYRHOFEN
+11331 4663   1432   452 450 0 ---- KLAGENFURT-FLUGHAFEN (AUTOMAT)
+11332 4857   1660   195 195 0 ---- MISTELBACH
+11336 4743   1238   748 746 0 ---- KITZBUEHEL
+11337 4758   1263   1627 1623 2 ---- LOFERER ALM
+11339 4747   1262   959 961 2 ---- HOCHFILZEN
+11340 4732   1273   1953 1973 2 ---- SCHMITTENHOEHE
+11343 4705   1295   3111 3105 3 ---- SONNBLICK - AUTOM.
+11345 4733   1315   750 750 0 ---- ST. VEIT IM PONGAU
+11346 4722   1298   942 933 2 ---- RAURIS
+11348 4715   1373   1151 1153 2 ---- MARIAPFARR
+11349 4705   1360   1635 1633 2 ---- KATSCHBERG
+11350 4778   1305   418 418 0 ---- SALZBURG/FREISAAL
+11351 4742   1363   1209 1203 2 ---- RAMSAU/DACHSTEIN
+11352 4798   1342   571 571 0 ---- FRANKENMARKT
+11354 4763   1362   503 502 0 ---- BAD GOISERN
+11355 4772   1432   597 599 0 ---- WINDISCHGARSTEN
+11356 4760   1377   664 665 0 ---- BAD AUSSEE
+11357 4773   1345   537 539 0 ---- ST. WOLFGANG
+11358 4755   1393   801 814 0 ---- BAD MITTERNDORF
+11359 4743   1390   768 765 0 ---- GROEBMING
+11362 4742   1475   746 743 0 ---- KALWANG
+11365 4720   1475   684 671 0 ---- ZELTWEG/AUTOM. STAT.
+11367 4838   1500   969 970 0 ---- BAERNKOPF
+11368 4795   1478   374 365 0 ---- WAIDHOFEN/YBBS
+11370 4743   1528   505 505 0 ---- KAPFENBERG
+11372 4710   1313   1093 1092 0 ---- BAD GASTEIN
+11375 4753   1523   775 783 0 ---- AFLENZ
+11378 4787   1587   710 708 0 ---- GUTENSTEIN-MARIAHILFBERG
+11380 4768   1583   487 488 0 ---- REICHENAU/RAX
+11382 4778   1590   586 583 0 ---- PUCHBERG
+11383 4762   1582   993 985 2 ---- SEMMERING
+11384 4762   1583   1320 1318 2 ---- HIRSCHENKOGEL
+11385 4782   1603   937 936 2 ---- HOHE WAND/HOCHKOGELHAUS
+11386 4752   1618   541 545 0 ---- KRUMBACH I. D. BUCKLIGEN WELT
+11387 4797   1650   185 185 0 ---- SEIBERSDORF
+11389 4818   1562   269 273 0 ---- ST.POELTEN LANDHAUS
+11390 4727   1597   336 329 0 ---- HARTBERG
+11393 4745   1663   200 201 0 ---- LUTZMANNSBURG
+11395 4777   1703   121 117 0 ---- ANDAU
+37575 4167   4665   490 487 0 ---- ZAKATALA
+37579 4165   4672   1746 1747 2 ---- ALIBAY
+37590 4153   4707   1794 1790 2 ---- SARIBASH
+37636 4130   4547   421 410 0 ---- JEYRANCHEL
+37639 4113   4542   333 331 0 ---- AGSTAPHA AIRPORT
+37642 4110   4355   333 333 0 ---- TOVUZ
+37661 4122   4717   641 639 0 ---- SHAKI
+37668 4107   4747   598 583 0 ---- OGUZ
+37670 4178   4870   -15 -16 0 ---- NABRAN
+37673 4142   4888   27 27 0 ---- KHACHMAZ AERODROME
+37674 4122   4823   2071 2071 2 ---- GIRIZ
+37675 4137   4852   552 550 0 ---- GUBA
+37676 4118   4813   2305 2301 2 ---- KHINALIG
+37677 4100   4870   1107 1104 2 ---- KHALTAN
+37729 4068   4582   1476 1480 2 ---- GADABAY
+37734 4083   4603   410 404 0 ---- SHAMKIR
+37735 4072   4642   311 309 0 P-P- GANDJA
+37736 4073   4640   328 327 0 ---- GYANCA AIRPORT
+37740 4098   4787   682 679 0 ---- QABALA
+37744 4077   4705   94 93 0 ---- MINGACHEVIR
+37746 4060   4680   201 199 0 ---- NAFTALAN AIRPORT
+37747 4062   4715   15 13 0 P-P- EVLAKH AIRPORT
+37749 4065   4775   95 94 0 ---- GOYCHAY
+37750 4078   4813   550 549 0 ---- ISMAILLY
+37753 4087   4893   1082 1099 2 ---- ALTIAGACH
+37756 4053   4893   755 755 0 ---- MARAZA
+37759 4063   4863   892 902 0 ---- SHAMAKHY
+37769 4060   4963   -19 -20 0 ---- SUMGAIT
+37813 4050   4588   2478 2475 2 ---- SHAMKIR GYOL-GYOL
+37816 4047   4608   1658 1655 2 ---- DASHKASAN
+37825 4042   4633   1602 1606 2 ---- GYOY-GYOL
+37831 4035   4702   227 226 0 ---- TAR-TAR
+37832 4037   4712   69 67 0 ---- BARDA
+37835 4020   4722   -5 -6 0 ---- ZARDAB
+37843 4002   4847   -15 -17 0 ---- SABIRABAD
+37844 4033   4817   4 2 0 ---- KURDAMIR
+37849 4002   4892   -5 -7 0 ---- GAZIMAMMAD AERODROME
+37851 4042   4978   85 81 0 ---- BAKU (KHURDALAN)
+37852 4037   4977   224 237 0 ---- SHUBANY
+37853 4050   4998   -5 -5 0 ---- BAKU/ZABRAT AIRPORT
+37860 4053   5000   28 27 0 T-T- MASHTAGA
+37861 4023   5082   -15 -17 0 ---- NEFT DASHLARI
+37864 4045   5007   0 -5 2 PPPP BAKU/BINA AIRPORT
+37866 4047   5032   -24 -26 0 ---- PIRALLAHI
+37869 4033   5062   -17 -17 0 ---- CHILOV ISLAND
+37877 3955   4497   813 813 0 ---- SHARUR
+37883 3993   4597   2257 2294 2 ---- ISTISU
+37893 3998   4675   252 250 0 ---- AGDAM
+37895 3998   4675   828 827 0 ---- KHANKANDY
+37896 3990   4678   611 612 0 ---- KHOJALY AIRPORT
+37898 3965   4653   1099 1094 2 ---- LACHIN
+37899 3977   4675   1355 1358 2 ---- SHUSHA
+37901 3978   4710   399 414 0 ---- KHOJAVAND
+37905 3977   4775   71 69 0 ---- BEYLAGAN AERODROME
+37907 3960   4715   439 439 0 ---- FIZULY
+37912 3993   4853   -15 -16 0 ---- JAFARKHAN
+37913 3958   4897   -21 -22 0 ---- SALYAN
+37914 3987   4805   -1 -3 0 ---- IMISHLY
+37923 3997   4940   -16 -18 0 ---- ALAT
+37925 3940   4925   -24 -25 0 ---- NEFTCHALA
+37936 3920   4542   885 885 0 P-P- NAXCIVAN
+37941 3940   4557   1195 1199 2 ---- SHAHBUZ
+37946 3912   4598   2223 2217 2 ---- PARAGACHAY
+37947 3895   4563   717 714 0 ---- JULFA
+37952 3867   4838   1832 1830 2 ---- KALVAZ
+37957 3892   4602   787 785 0 ---- ORDUBAD
+37968 3900   4667   315 312 0 ---- MINJIVAN
+37972 3947   4855   3 2 0 ---- BILASUVAR
+37978 3970   4860   4 2 0 ---- GYOYTAPA
+37981 3890   4825   794 792 0 ---- YARDIMLI
+37984 3877   4840   1113 1113 2 ---- LERIK
+37985 3873   4883   -12 -13 0 T-T- LANKARAN
+37989 3845   4888   -22 -23 0 ---- ASTARA
+26554 5582   2793   132 0 0 ---- VERHNEDVINSK
+26643 5535   2745   131 0 0 ---- SHARCOVSCHINA
+26645 5503   2630   211 0 0 ---- LYNTUPY
+26653 5547   2875   132 0 0 ---- POLOTSK
+26657 5488   2775   193 0 0 ---- DOKSHITSY
+26659 5487   2870   174 0 0 ---- LEPEL
+26666 5525   3023   175 0 0 ---- VITEBSK
+26668 5480   2968   175 0 0 ---- SENNO
+26759 5425   2848   188 0 0 ---- BORISOV
+26763 5450   3043   185 0 0 ---- ORSHA
+26774 5430   3093   205 0 0 ---- GORKI
+26825 5360   2405   149 0 0 ---- GRODNO
+26832 5390   2532   156 0 0 ---- LIDA
+26850 5392   2763   223 0 0 ---- MINSK
+26853 5382   2898   154 0 0 ---- BEREZINO
+26855 5348   2813   177 0 0 ---- MARIYNA GORKA
+26863 5395   3008   192 0 0 ---- MOGILEV
+26864 5348   2930   155 0 0 ---- KLICHEV
+26878 5345   3100   169 0 0 ---- SLAVGOROD
+26887 5335   3207   167 0 0 ---- KOSTUCKOVICHI
+26941 5312   2597   193 0 0 ---- BARANOVICHI
+26951 5305   2755   162 0 0 ---- SLUTSK
+26961 5320   2912   156 0 0 ---- BOBRUISK
+26966 5288   3003   141 0 0 ---- ZHLOBIN
+33008 5212   2368   145 0 0 ---- BREST
+33008 5212   2368   145 0 0 T-T- BREST
+33019 5212   2610   142 0 0 ---- PINSK
+33027 5220   2787   136 0 0 ---- ZHITCKOVICHI
+33036 5203   2918   189 0 0 ---- MOZYR
+33038 5225   2983   142 0 0 ---- VASILEVICHI
+33041 5240   3095   126 0 0 ---- GOMEL
+33041 5240   3095   126 0 0 T--- GOMEL
+33124 5178   3023   116 0 0 ---- BRAGIN
+06400 5108   265    9 4 0 ---- KOKSIJDE
+06407 5120   287    6 4 0 ---- OOSTENDE (AIRPORT)
+06408 5123   292    9 7 0 ---- OOSTENDE (PIER)
+06414 5090   312    25 23 0 ---- BEITEM
+06418 5133   320    9 7 0 ---- ZEEBRUGGE
+06428 5093   367    37 36 0 ---- SEMMERZAKE
+06431 5118   380    8 6 0 ---- GENT/INDUSTRIE-ZONE
+06432 5057   383    63 60 0 ---- CHIEVRES
+06434 5098   382    15 13 0 ---- MELLE
+06447 5080   435    101 99 0 ---- UCCLE
+06449 5047   445    192 187 0 ---- CHARLEROI/GOSSELIES
+06450 5120   447    21 12 0 ---- ANTWERPEN/DEURNE
+06451 5090   453    58 55 0 ---- BRUSSELS NATIONAL (AIRPORT)
+06452 5133   450    23 22 0 ---- BRASSCHAAT
+06455 5010   460    233 231 0 ---- DOURBES
+06456 5023   465    299 279 0 ---- FLORENNES
+06458 5075   477    127 105 0 T--- BEAUVECHAIN
+06459 5057   468    157 155 0 ---- ERNAGE
+06464 5122   503    21 19 0 ---- RETIE
+06465 5100   507    54 30 0 ---- SCHAFFEN
+06472 5020   525    296 294 0 ---- HUMAIN
+06476 5003   540    557 563 0 ---- ST-HUBERT
+06477 5092   545    39 37 0 ---- DIEPENBEEK
+06478 5065   547    187 201 0 ---- BIERSET
+06479 5117   547    64 55 0 ---- KLEINE BROGEL
+06481 5093   550    63 61 0 ---- GENK
+06484 4962   558    324 322 0 ---- BUZENOL
+06490 5048   592    483 470 0 ---- SPA/LA SAUVENIERE
+06494 5052   607    673 671 0 ---- MONT-RIGI
+06496 5047   618    570 564 0 ---- ELSENBORN
+14528 4482   1588   250 246 0 ---- BIHAC
+14537 4477   1670   158 154 0 ---- SANSKI MOST
+14542 4478   1722   156 153 0 ---- BANJA LUKA
+14543 4435   1727   431 428 0 ---- JAJCE
+14544 4407   1747   566 562 0 ---- BUGOJNO
+14549 4422   1790   348 345 0 ---- ZENICA
+14554 4488   1843   140 136 0 ---- GRADACAC
+14557 4455   1870   307 305 0 ---- TUZLA
+14640 4383   1702   728 724 2 ---- LIVNO
+14648 4335   1780   108 99 0 ---- MOSTAR
+14650 4377   1803   972 970 2 ---- IVAN SEDLO
+14652 4372   1827   2070 2067 2 ---- BJELASNICA
+14654 4387   1843   638 630 0 ---- SARAJEVO-BJELAVE
+14656 4323   1860   1309 1305 2 ---- CEMERNO
+14657 4292   1760   14 13 0 ---- NEUM
+15501 4417   2280   38 36 0 ---- NOVO SELO
+15502 4398   2285   31 31 0 ---- VIDIN
+15505 4320   2353   310 308 0 ---- VRATZA
+15507 4342   2322   204 202 0 ---- MONTANA
+15511 4382   2325   33 32 0 ---- LOM
+15514 4368   2397   31 29 0 ---- ORYAHOVO
+15525 4315   2470   221 220 0 ---- LOVETCH
+15528 4340   2460   160 156 0 ---- PLEVEN
+15530 4308   2565   218 217 0 ---- VELIKO TARNOVO
+15533 4362   2535   26 24 0 ---- SVICHTOV
+15535 4385   2595   45 37 0 ---- ROUSSE
+15549 4357   2650   347 346 0 ---- RAZGRAD
+15550 4412   2727   16 16 0 ---- SILISTRA
+15552 4320   2795   43 40 0 ---- VARNA
+15561 4353   2853   28 27 0 ---- SHABLA
+15562 4337   2847   64 63 0 ---- KALIAKPA
+15600 4283   2367   1692 1687 2 ---- MOURGASH
+15601 4227   2277   527 522 0 ---- KUSTENDIL
+15605 4293   2293   716 714 0 ---- DRAGOMAN
+15613 4258   2327   2292 2286 3 ---- CHERNI VRAH (TOP/SOMMET)
+15614 4265   2338   591 595 0 --T- SOFIA (OBSERV.)
+15615 4218   2358   2927 2925 3 ---- MUSSALA (TOP/SOMMET)
+15625 4213   2475   185 179 0 ---- PLOVDIV-KRUMOVO
+15626 4207   2485   156 154 0 ---- PLOVDIV
+15627 4267   2483   2389 2384 3 ---- BOTEV VRAH (TOP/SOMMET)
+15628 4222   2433   214 213 0 ---- IVAILO
+15635 4220   2533   178 173 0 ---- CHIRPAN
+15640 4267   2633   0 257 0 ---- SLIVEN *
+15642 4218   2657   139 138 0 ---- ELHOVO
+15655 4250   2748   28 27 0 ---- BURGAS
+15661 4210   2785   19 18 0 ---- ACHTOPOL
+15712 4155   2327   207 203 0 ---- SANDANSKI
+15725 4167   2468   1930 1923 2 ---- SNEJANKA (TOP/SOMMET)
+15726 4188   2473   1750 1754 2 ---- ROJEN
+15730 4165   2538   331 330 0 ---- KURDJALI
+15741 4177   2620   55 54 0 ---- SVILENGRAD
+14216 4533   1443   124 120 4 ---- RIJEKA/KOZALA
+14219 4558   1462   863 863 2 ---- PARG
+14232 4548   1555   110 110 4 ---- KARLOVAC
+14234 4613   1588   203 202 4 ---- KRAPINA
+14235 4590   1597   992 991 2 ---- PUNTIJARKA
+14236 4580   1597   162 157 4 ---- ZAGREB/GRIC
+14240 4582   1603   127 123 4 T-T- ZAGREB/MAKSIMIR
+14241 4572   1605   108 107 4 ---- ZAGREB/PLESO
+14244 4548   1637   105 98 4 ---- SISAK
+14246 4627   1635   167 167 4 ---- VARAZDIN
+14248 4602   1655   142 157 4 ---- KRIZEVCI
+14253 4590   1687   142 141 4 ---- BJELOVAR
+14256 4588   1720   263 262 4 ---- BILOGORA
+14258 4558   1720   154 153 4 ---- DARUVAR
+14280 4550   1855   89 89 4 ---- OSIJEK-CEPIN
+14284 4547   1880   89 89 5 ---- OSIJEK/KLISA
+14307 4488   1392   62 63 4 ---- PULA AERODROME
+14308 4523   1393   292 291 4 ---- PAZIN
+14314 4452   1447   53 53 4 ---- MALI LOSINJ
+14317 4522   1457   82 85 4 ---- RIJEKA/OMISALJ
+14321 4475   1477   19 24 4 ---- RAB
+14323 4498   1490   27 26 4 ---- SENJ
+14324 4480   1497   1597 1594 2 ---- ZAVIZAN
+14328 4525   1522   328 328 4 ---- OGULIN
+14330 4455   1537   562 564 4 ---- GOSPIC
+14370 4515   1798   89 88 4 ---- SLAVONSKI BROD
+14382 4515   1870   98 97 4 ---- GRADISTE
+14428 4412   1520   5 5 4 ---- ZADAR/PUNTAMIKA
+14430 4408   1533   79 78 4 T-T- ZADAR RS
+14431 4408   1535   82 82 4 ---- ZADAR/ZEMUNIK
+14438 4372   1590   75 77 4 ---- SIBENIK
+14441 4303   1608   19 20 4 ---- KOMIZA
+14442 4403   1620   255 255 4 ---- KNIN
+14443 4238   1623   97 97 4 ---- PALAGRUZA
+14444 4353   1630   20 19 4 ---- SPLIT/RESNIK
+14445 4350   1642   128 122 4 ---- SPLIT/MARJAN
+14447 4317   1643   25 20 4 ---- HVAR
+14452 4277   1690   186 186 4 ---- LASTOVO
+14454 4328   1702   49 49 4 ---- MAKARSKA
+14462 4303   1743   5 2 4 ---- PLOCE
+14472 4263   1808   53 52 4 ---- DUBROVNIK/GORICA
+14474 4255   1827   167 157 4 ---- DUBROVNIK/CILIPI
+17600 3472   3248   7 8 0 ---- PAPHOS AP
+17601 3458   3265   26 23 0 ---- AKROTIRI
+17607 3513   3338   162 162 0 -TT- ATHALASSA
+17609 3487   3362   9 9 0 ---- LARNACA AIRPORT
+11406 5007   1240   490 483 0 ---- CHEB
+11414 5020   1290   607 606 9 ---- KARLOVY VARY
+11423 4967   1267   747 742 9 ---- PRIMDA
+11438 5037   1332   326 322 0 ---- TUSIMICE
+11450 4975   1337   371 359 0 ---- PLZEN-MIKULKA
+11457 4907   1360   1122 1117 2 ---- CHURANOV
+11464 5055   1392   838 833 9 ---- MILESOVKA
+11487 4945   1382   521 519 0 ---- KOCELOVICE
+11502 5068   1403   378 375 0 ---- USTI NAD LABEM
+11509 5045   1417   160 158 0 ---- DOKSANY
+11518 5010   1425   365 380 0 ---- PRAHA/RUZYNE
+11520 5000   1443   303 302 0 TTTT PRAHA-LIBUS
+11538 4918   1433   508 500 0 ---- TEMELIN
+11546 4895   1447   396 396 0 ---- C. BUDEJOVICE-ROZNOV
+11567 5012   1453   285 285 0 ---- PRAHA-KBELY
+11603 5077   1502   401 405 0 ---- LIBEREC
+11624 4993   1538   239 242 0 ---- CASLAV
+11628 4957   1507   532 529 0 ---- KOSETICE
+11636 4915   1543   572 569 9 ---- KOSTELNI MYSLOVA
+11643 5067   1572   820 816 9 ---- PEC POD SNEZKOU
+11652 5000   1573   230 226 0 ---- PARDUBICE
+11653 5073   1573   0 1602 0 ---- SNEZKA
+11659 4957   1575   536 532 0 ---- PRIBYSLAV
+11669 5035   1632   747 746 9 ---- POLOM
+11679 4997   1642   405 403 0 ---- USTI NAD ORLICI
+11683 4973   1603   740 735 9 ---- SVRATOUCH
+11692 4917   1612   479 473 0 ---- NAMEST NAD OSLAVOU
+11693 4908   1613   401 400 0 ---- DUKOVANY
+11698 4887   1608   338 334 0 ---- KUCHAROVICE
+11710 4965   1695   515 510 0 ---- LUKA
+11723 4915   1668   245 237 0 ---- BRNO/TURANY
+11730 5018   1710   1327 1328 2 ---- SERAK
+11748 4942   1740   207 202 0 ---- PREROV
+11766 4977   1753   753 748 9 ---- CERVENA U LIBAVE
+11774 4932   1757   223 222 0 ---- HOLESOV
+11782 4968   1812   251 257 0 ---- OSTRAVA/MOSNOV
+11787 4953   1843   1326 1322 2 ---- LYSA HORA
+06005 6208   -767   99 96 0 ---- MYKINES FYR
+06008 6153   -677   17 23 0 ---- FRODBA HELIPORT
+06009 6138   -667   101 99 0 ---- AKRABERG FYR
+06010 6205   -728   88 85 0 ---- VAGA FLOGHAVN
+06011 6202   -675   55 54 0 T-T- TORSHAVN
+06012 6232   -632   55 54 0 ---- KIRKJA
+06013 6222   -657   75 80 0 ---- KLAKSVIK HELIPORT
+06016 5550   787    21 23 0 ---- HORNS REV A
+06017 5558   762    10 26 0 ---- HORNS REV B
+06019 5692   863    0 41 0 ---- SILSTRUP
+06021 5712   858    0 3 0 ---- HANSTHOLM
+06022 5572   480    43 75 0 ---- TYRA OEST
+06024 5707   870    8 7 0 ---- THISTED LUFTHAVN
+06029 5703   1005   0 2 0 ---- GROENLANDSHAVNEN
+06030 5708   985    13 3 0 ---- FLYVESTATION AALBORG
+06031 5718   995    0 13 0 ---- TYLSTRUP
+06032 5737   1033   56 54 0 ---- STENHOEJ
+06033 5758   995    0 3 0 ---- HIRTSHALS
+06034 5750   1022   28 28 0 ---- SINDAL FLYVEPLADS
+06041 5773   1062   4 3 0 ---- SKAGEN FYR
+06042 5743   1053   0 3 0 ---- FREDERIKSHAVN
+06044 5698   1030   0 16 0 ---- HALS
+06049 5655   1008   89 87 0 ---- HALD VEST
+06051 5675   832    0 18 0 ---- VESTERVIG
+06052 5670   820    3 2 0 ---- THYBOROEN
+06055 5637   812    0 5 0 ---- TORSMINDE
+06056 5637   867    54 53 0 ---- MEJRUP
+06058 5600   813    4 2 0 ---- HVIDE SANDE
+06060 5628   910    53 52 0 -T-- FLYVESTATION KARUP
+06063 5688   917    0 2 0 ---- RONBJERG HUSE HAVN
+06065 5675   950    33 31 0 ---- AARS SYD
+06066 5598   835    6 5 0 ---- STAUNING LUFTHAVN
+06068 5608   917    61 60 0 ---- ISENVAD
+06069 5648   957    57 53 0 ---- FOULUM
+06070 5630   1062   23 24 0 ---- AARHUS LUFTHAVN
+06072 5630   1012   62 60 0 ---- OEDUM
+06073 5608   1050   5 4 0 ---- SLETTERHAGE FYR
+06074 5607   1013   55 53 0 ---- AARHUS SYD
+06079 5672   1150   3 1 0 ---- ANHOLT HAVN
+06081 5555   807    17 18 0 ---- BLAAVANDSHUK FYR
+06082 5595   862    0 25 0 ---- BORRIS
+06088 5543   838    0 4 0 ---- NORDBY
+06093 5528   865    4 3 0 ---- VESTER VEDSTED
+06096 5518   855    8 6 0 ---- ROEMOE/JUVRE
+06099 5508   855    0 3 0 ---- HAVNEBY
+06102 5587   978    23 22 0 ---- HORSENS/BYGHOLM
+06104 5573   917    80 75 0 ---- BILLUND LUFTHAVN
+06108 5543   933    45 43 0 ---- KOLDINGEGNENS LUFTHAVN
+06109 5547   910    0 62 0 ---- ASKOV
+06110 5522   925    47 42 0 ---- FLYVESTATION SKRYDSTRUP
+06116 5488   912    17 15 0 ---- STORE JYNDEVAD
+06118 5495   978    18 7 0 ---- SOENDERBORG LUFTHAVN
+06119 5485   998    18 17 0 ---- KEGNAES FYR
+06123 5523   988    3 1 0 ---- ASSENS/TOROE
+06124 5500   1057   7 6 0 ---- SYDFYNS FLYVEPLADS
+06126 5530   1043   50 49 0 ---- AARSLEV
+06132 5582   1062   0 16 0 ---- TRANEBJERG OEST
+06135 5532   1138   34 32 0 ---- FLAKKEBJERG
+06136 5523   1132   0 12 0 ---- TYSTOFTE
+06138 5482   1098   3 2 0 ---- LANGOE
+06141 5482   1132   9 7 0 ---- ABED
+06147 5487   1218   4 3 0 ---- VINDEBAEK KYST
+06149 5457   1193   4 3 0 ---- GEDSER
+06151 5515   1113   2 1 0 ---- OMOE FYR
+06154 5520   1185   46 44 0 ---- BRANDELEV
+06156 5573   1160   13 11 0 ---- HOLBAEK FLYVEPLADS
+06158 5567   1108   0 2 0 ---- KALUNDBORG
+06159 5573   1087   15 14 0 ---- ROESNAES FYR
+06165 5618   1170   17 16 0 ---- HESSELOE
+06168 5612   1233   43 37 0 ---- NAKKEHOVED FYR
+06169 5600   1127   15 14 0 ---- GNIBEN
+06170 5558   1213   43 44 0 ---- ROSKILDE LUFTHAVN
+06174 5538   1213   22 20 0 ---- TESSEBOELLE
+06180 5560   1263   5 5 0 ---- KOEBENHAVNS LUFTHAVN
+06181 5575   1252   42 40 0 ---- JAEGERSBORG
+06183 5553   1270   14 6 0 ---- DROGDEN FYR
+06184 5570   1255   9 8 0 ---- DMI
+06186 5568   1253   0 7 0 ---- KOEBENHAVN/LANDBOHOEJSKOLEN
+06187 5568   1258   0 20 0 ---- KOEBENHAVNS TOLDBOD
+06188 5587   1240   41 39 0 ---- SJAELSMARK
+06190 5507   1473   17 15 0 ---- BORNHOLMS LUFTHAVN
+06193 5528   1477   9 7 0 ---- HAMMER ODDE FYR
+06197 5505   1508   24 23 0 ---- NEXOE VEST
+26029 5938   2403   24 22 0 ---- PAKRI
+26038 5938   2460   34 32 0 T--- TALLINN-HARKU
+26045 5952   2653   2 1 0 ---- KUNDA
+26046 5932   2738   74 72 0 ---- JOHVI
+26058 5945   2803   7 6 0 ---- NARVA-JOESUU
+26115 5892   2205   8 7 0 ---- RISTNA
+26120 5885   2303   3 5 0 ---- HELTERMAA
+26124 5895   2380   25 23 0 ---- LAANE-NIGULA
+26128 5857   2350   3 2 0 ---- VIRTSU
+26134 5897   2473   54 52 0 ---- KUUSIKU
+26135 5880   2540   61 60 0 ---- TURI
+26141 5913   2622   122 120 0 ---- VAIKE-MAARJA
+26144 5873   2640   71 70 0 ---- JOGEVA
+26145 5885   2695   33 32 0 ---- TILRIKOJA
+26214 5837   2180   7 5 0 ---- VILSANDI
+26215 5822   2250   2 1 0 ---- KURESSAARE-ROOMASSAARE
+26218 5790   2205   4 2 0 ---- SORVE
+26226 5808   2397   4 2 0 ---- KIHNU
+26227 5778   2325   3 1 0 ---- RUHNU
+26231 5842   2447   13 11 0 ---- PARNU-SAUGA
+26233 5837   2560   87 86 0 ---- VILJANDI
+26242 5825   2645   71 70 0 ---- TARTU-TORAVERE
+26247 5778   2602   66 64 0 ---- VALGA
+26249 5783   2702   84 82 0 ---- VORU
+02701 6905   2085   1009 1007 0 ---- KILPISJARVI SAANA
+02702 6913   2727   0 156 0 ---- INARI KAAMANEN
+02703 6020   2475   32 31 0 ---- ESPOO SEPANKYLA
+02704 6112   2433   0 87 0 ---- HATTULA LEPAA AWS
+02705 6702   2722   493 491 0 ---- PELKOSENNIEMI PYHATUNTURI
+02706 6025   2405   0 37 0 ---- LOHJA PORLA
+02710 6295   2640   0 127 0 ---- VESANTO KK
+02711 6310   2162   13 15 0 ---- VAASA KESKUSTA
+02714 6448   2647   0 115 0 ---- VAALA PELSO
+02715 6483   2823   0 320 0 ---- HYRYNSALMI KYTOMAKI
+02716 6593   2652   0 154 0 ---- RANUA KK
+02717 6817   2577   0 272 0 ---- KITTILA POKKA
+02719 6782   2775   0 243 0 ---- SODANKYLA LOKKA
+02721 6395   2285   6 5 0 ---- KOKKOLA TANKAR
+02722 6842   2742   0 320 0 ---- INARI SAARISELKA
+02723 6778   2485   200 524 0 ---- KITTILA LEVITUNTURI
+02725 6345   2445   0 153 0 ---- HALSUA KANALA PUROLA
+02726 6860   2358   0 377 0 ---- ENONTEKIO NAKKALA
+02727 6127   2552   76 80 0 ---- ASIKKALA PULKKILANHARJU
+02728 6130   2818   88 86 0 ---- TAIPALSAARI KYLANIEMI
+02729 6188   2533   0 205 0 ---- JAMSA HIMOS
+02730 6183   2885   157 155 0 ---- SAVONLINNA RUUNAVUORI
+02731 6153   2820   127 125 0 ---- PUUMALA KK
+02732 6280   2790   87 86 0 ---- KUOPIO RITONIEMI
+02733 6103   2857   46 46 0 ---- JOUTSENO KONNUNSUO
+02734 6145   2947   75 74 0 ---- PARIKKALA KOITSANLAHTI
+02735 6233   2355   140 138 0 ---- VIRRAT AIJANNEVA
+02736 6190   2788   112 110 0 ---- JUVA PARTAALA
+02737 6382   2417   85 83 0 ---- TOHOLAMPI LAITALA
+02738 6373   2572   153 152 0 ---- PYHAJARVI OL OJAKYLA
+02739 6412   2835   163 161 0 ---- SOTKAMI KUOLANIEMI
+02740 6588   2427   9 8 0 ---- TORNIO LIAKKA
+02741 6018   1998   13 11 0 ---- JOMALA JOMALABY
+02743 5987   2220   0 8 0 ---- DRAGSF JARD VANO
+02745 6717   2918   215 213 0 ---- SALLA NARUSKA
+02746 5982   2292   28 11 0 ---- HANKO TULLINIEMI
+02747 6038   2210   6 4 0 ---- TURKU RAJAKARI
+02750 5985   2325   0 3 0 ---- HANKO TVARMINNE
+02751 6163   2138   5 3 0 ---- PORI TAHKOLUOTO
+02752 6220   2117   22 0 0 ---- KRISTIINANKAUPUNGIN MAJAKKA
+02753 6183   2247   123 122 0 ---- KANKAANPAA NIINISALO AWS
+02754 6100   2450   85 87 0 ---- HAMEENLINNA KATINEN
+02755 6403   2472   76 0 0 ---- YLIVIESKA AIRPORT
+02756 6037   2312   0 3 0 ---- SALO KARKKA
+02757 5982   2358   23 15 0 ---- TAMMISAARI JUSSARO
+02758 6042   2440   44 42 0 ---- VIHTI MAASOJA
+02759 6038   2562   24 22 0 ---- PORVOO HARABACKA
+02761 6115   2130   29 4 0 ---- RAUMA KYLMAPIHLAJA
+02762 6127   2225   39 37 0 ---- KOKEMAKI PEIPOHJA HYRKOLA
+02763 6147   2375   86 85 0 ---- TAMPERE HARMALA
+02765 6170   2552   83 81 0 ---- LUHANKA JUDINSALO
+02766 6315   3105   236 235 0 ---- ILOMANTSI POTSONVAARA
+02767 6105   2505   0 125 0 ---- LAMMI BIOLOGINEN ASEMA
+02768 6122   2605   0 100 0 ---- HEINOLA PLAANI
+02769 6242   2218   95 93 0 ---- KAUHAJOKI KUJA-KOKKO
+02770 6185   2428   0 153 0 ---- JUUPAJOKI HYYTIALA
+02771 6188   2610   0 146 0 ---- LEIVONMAKI SAVENAHO
+02772 6207   2857   80 79 0 ---- RANTASALMI RUKKASLUOTO
+02773 6045   2218   7 8 0 ---- TURKU ARTUKAINEN
+02777 6045   2365   121 116 0 ---- KIKALA AIRPORT
+02778 6180   2932   80 78 0 ---- PUNKAHARJU LAUKANSAARI
+02780 6293   2118   3 2 0 ---- KORSNAS BREDSKARET
+02781 6298   2075   4 2 0 ---- STROMMINGSBADAN
+02783 6118   2503   0 129 0 ---- LAMMI ISO-EVO
+02787 6308   2427   170 170 0 ---- ALAJARVI MOKSY
+02788 6315   2732   91 90 0 ---- MAANINKA HALOLA
+02789 6338   2867   166 166 0 ---- RAUTAVAARA YLA-LUOSTA
+02790 6025   2075   23 23 0 ---- KUMLINGE KK
+02791 6323   2923   0 116 0 ---- JUUKA NIEMELA
+02793 6255   2967   80 78 0 ---- LIPERI TUISKAVANLUOTO
+02794 5992   2435   0 2 0 ---- KIRKKONUMMI MAKILUOTO
+02795 6010   2498   6 3 0 ---- HELSINKI HARMAJA
+02796 6332   3005   0 98 0 ---- LIEKSA LAMPELA
+02797 6415   2543   0 112 0 ---- HAAPAVESI
+02798 6367   2883   0 115 0 ---- VALTIMO KK
+02799 6430   3017   198 197 0 ---- KUHMO KALLIOJOKI
+02800 6462   2390   24 0 0 ---- NAHKIAINEN
+02801 6905   2078   476 478 0 ---- KILPISJARVI
+02803 6468   2510   50 48 0 ---- RUUKKI REVONLAHTI
+02804 6557   2825   0 203 0 ---- TAIVALKOSKI PALOASEMA
+02805 6975   2703   101 107 0 ---- KEVO
+02807 6862   2742   148 147 0 ---- IVALO
+02808 6958   2885   132 130 0 ---- INARI SEVETTIJARVI
+02811 6637   2932   0 160 0 ---- KUUSAMO KIUTAKONGAS
+02812 6653   2465   0 91 0 ---- YLITORNIO MELTOSJARVI
+02813 6658   2602   107 106 0 ---- ROVANIEMI APUKKA
+02814 6672   2717   209 208 0 ---- KEMIJARVI LENTOKENTTA
+02815 6728   2818   0 180 0 ---- SAVUKOSKI KK
+02816 6808   2718   249 247 0 ---- SODANKYLA VUOTSO
+02817 6843   2745   432 430 0 ---- INARI SAARISELKA AWS
+02818 6848   2830   255 253 0 ---- INARI RAJAJOOSEPPI
+02819 6775   2962   0 370 0 ---- SALLA VARRIOTUNTURI
+02820 6807   2403   757 755 0 ---- KITTILA LAUKUKERO
+02821 6797   2412   566 565 0 ---- KITTILA SAMMALTUNTURI
+02823 6797   2368   253 253 0 ---- MUONIO
+02824 6798   2425   350 347 0 ---- KITTILA KENTTAROVA
+02825 7008   2795   0 35 0 ---- UTSJOKI NUORGAM
+02826 6737   2663   180 179 0 ---- SODANKYLA AWS
+02827 6907   2750   124 122 0 ---- INARI VAYLA
+02828 6038   2255   5 6 0 ---- PIIKKIO YLTOINEN
+02829 6060   2480   0 86 0 ---- HYVINKAA MUTILA
+02830 6070   2682   0 33 0 ---- ANJALANKOSKI ANJALA
+02831 6053   2768   0 5 0 ---- VIROLAHTI KOIVUNIEMI
+02832 6223   3035   0 90 0 ---- TOHMAJARVI KEMIE
+02833 6293   2248   32 26 0 ---- YLISTARO PELMA
+02834 6383   2722   208 207 0 ---- VIEREMA KAARAKKALA
+02835 6885   2830   125 123 0 ---- INARI NELLIM
+02836 6737   2663   179 179 0 T-T- SODANKYLA
+02844 6680   2400   84 84 0 ---- PELLO
+02845 6657   2583   201 197 0 ---- ROVANIEMI
+02847 6650   2572   82 85 0 ---- ROVANIEMI RAUTATIEASEMA
+02849 6683   2868   222 215 0 ---- SALLA KK
+02851 6493   2538   12 10 0 ---- OULUSALO PELLONPAA
+02862 6573   2452   7 3 0 ---- KEMI AJOS
+02863 6542   2413   19 19 0 ---- KEMI I
+02866 6540   2697   123 121 0 ---- PUDASJARVI
+02868 6617   2915   488 486 0 ---- KUUSAMO RUKATUNTURI
+02869 6597   2918   263 262 0 ---- KUUSAMO
+02872 6467   2442   2 2 0 ---- RAAHE LAPALUOTO
+02873 6503   2457   8 8 0 ---- MARJANIEM
+02874 6503   2473   7 8 0 ---- HAILUOTO
+02875 6493   2537   15 12 0 ---- OULU
+02876 6500   2540   5 3 0 ---- OULU VIHREASAARI
+02889 6493   2875   225 223 0 ---- SUOMUSSALMI PESIO
+02897 6428   2768   136 143 0 ---- KAJAANI
+02907 6433   2360   5 3 0 ---- ULKOKALLA
+02910 6343   2107   11 4 0 ---- VALASSAARET
+02911 6305   2177   8 4 0 ---- VAASA AIRPORT
+02913 6310   2303   44 42 0 ---- KAUHAVA
+02915 6308   2587   132 132 0 ---- VIITASAARI
+02917 6302   2780   102 98 0 ---- KUOPIO
+02920 6375   2253   19 2 0 ---- PIETARSAARI KALLAN
+02923 6082   2350   105 104 0 ---- JOKIOINEN AWS
+02924 6253   2402   161 157 0 ---- AHTARI
+02926 6148   2178   0 9 0 ---- PORI RAILWAY STATION
+02929 6267   2963   117 119 0 ---- JOENSUU
+02934 6017   2495   0 3 0 ---- HELSINKI RAILWAY STATION SQUARE
+02935 6240   2568   145 141 0 T-T- JYVASKYLA
+02937 6125   2235   39 38 0 ---- KOKEMAKI TULKKILA
+02939 6277   3097   157 152 0 ---- ILOMANTSI MEKRIJARVI
+02942 6185   2247   136 134 0 ---- NIINISALO
+02943 6152   2375   104 98 0 ---- TAMPERE SIILINKARI
+02944 6152   2375   112 112 0 ---- TAMPERE/PIRKKALA
+02945 6185   2480   145 143 0 ---- HALLI
+02946 6187   2482   0 144 0 ---- JAMSA HALLI LENTOASEMANTIE
+02947 6173   2730   138 138 0 ---- MIKKELI
+02948 6195   2895   95 95 0 ---- SAVONLINNA
+02950 6012   2170   6 4 0 ---- FAGERHOLM
+02952 6147   2180   17 13 0 ---- PORI
+02955 6290   2763   88 87 0 ---- KUOPIO SAVILAHTI
+02957 6310   2165   9 7 0 ---- VAASA KLEMETTILA
+02958 6105   2820   106 104 0 ---- LAPPEENRANTA
+02959 6105   2822   114 103 0 ---- LAPPEENRANTA LEPOLA
+02963 6082   2350   103 104 0 T-T- JOKIOINEN
+02964 6072   2102   4 4 0 ---- KUSTAVI ISOKARI
+02965 6097   2563   79 78 0 ---- LAHTI
+02966 6090   2693   100 100 0 ---- UTTI
+02967 6028   2718   6 4 0 ---- KOTKA HAAPASAARI
+02968 6038   2705   27 17 0 ---- KOTKA KIRKONMAA
+02972 6052   2227   59 47 0 ---- TURKU
+02973 6040   2377   86 84 0 ---- SUOMUSJARVI
+02974 6032   2497   56 51 0 ---- HELSINKI-VANTAA
+02976 6037   2697   12 11 0 ---- RANKKI
+02978 6018   2495   4 4 0 ---- HELSINKI KAISANIEMI
+02979 5950   2035   16 4 0 ---- BOGSKAR
+02980 5997   1997   10 8 0 ---- NYHAMN
+02981 5978   2138   7 9 0 ---- UTO
+02982 5977   2295   11 6 0 ---- RUSSARO
+02983 6052   2465   111 111 0 ---- NURMIJARVI GEOPHYSICAL OBSERVATORY
+02984 5993   2402   12 10 0 ---- BAGASKAR
+02987 5998   2560   23 23 0 ---- KALLBADAGRUND
+02988 6010   2507   7 4 0 ---- ISOSAARI
+02989 5995   2493   20 0 0 ---- HELSINKI LIGHTHOUSE
+02991 6020   2563   27 20 0 ---- PORVOO EMASALO
+02992 6027   2645   5 5 0 ---- PERNAJA ORRENGRUND
+02993 6030   1913   11 11 0 ---- MARKET
+02996 6040   2195   7 5 0 ---- RYMATTYLA RAULA
+07002 5072   158    68 73 0 ---- BOULOGNE
+07003 5050   162    20 6 0 ---- LE TOUQUET
+07005 5013   183    74 67 0 ---- ABBEVILLE
+07010 5105   233    16 11 0 ---- DUNKERQUE
+07015 5057   308    47 48 0 ---- LILLE-LESQUIN
+07020 4972   -193   7 6 0 ---- PTE DE LA HAGUE
+07024 4963   -145   138 140 0 ---- MAUPERTUS GONNEVILLE
+07027 4917   -45    67 78 0 ---- CAEN-CARPIQUET
+07028 4950   7      104 100 0 ---- CAP-DE-LA HEVE
+07031 4935   17     143 146 0 ---- ST GATIEN DES B
+07037 4937   117    152 156 0 ---- ROUEN-BOOS
+07038 4902   122    138 132 0 ---- EVREUX-HUEST
+07040 4992   108    40 38 0 ---- DIEPPE
+07046 4952   8      94 95 0 ---- LE HAVRE OCTEVILLE
+07055 4943   212    111 109 0 ---- BEAUVAIS-TILLE
+07057 4925   252    88 88 0 ---- CREIL
+07059 4997   270    112 111 0 ---- MEAULTE
+07061 4982   320    101 98 0 ---- SAINT-QUENTIN
+07072 4920   415    96 95 0 ---- REIMS-PRUNAY
+07075 4977   463    148 150 0 ---- CHARLEVILLE-MEZ
+07083 5012   380    0 192 0 ---- AVESNES RADAR
+07090 4907   612    191 192 0 ---- METZ-FRESCATY
+07093 4897   623    258 265 0 ---- GOIN AEROPORT M.N.L.
+07100 4847   -505   68 64 0 ---- OUESSANT-STIFF
+07103 4803   -472   81 67 0 ---- POINTE DU RAZ
+07107 4867   -432   18 9 0 ---- BRIGNOGAN
+07108 4845   -442   0 96 0 ---- PLABENNEC-RADAR
+07110 4843   -440   95 99 0 T-T- BREST-GUIPAVAS
+07117 4882   -347   58 55 0 ---- PLOUMANAC'H
+07118 4875   -347   87 88 0 ---- LANNION
+07120 4853   -285   136 130 0 ---- TREMUSON-ST-BRIEUC
+07125 4858   -207   59 67 0 ---- DINARD
+07129 4892   -13    0 155 0 ---- FALAISE-RADAR
+07130 4807   -173   43 38 0 ---- RENNES-SAINT JACQUES
+07134 4802   -73    100 101 0 ---- LAVAL-ETRONNIER
+07139 4843   10     144 146 0 ---- ALENCON
+07140 4805   137    127 132 0 ---- CHATEAUDUN
+07143 4845   150    156 155 0 ---- CHARTRES
+07145 4877   200    174 167 0 T-T- TRAPPES
+07146 4875   210    161 164 0 ---- TOUSSUS LE NOBLE
+07149 4872   238    90 89 0 ---- ORLY
+07150 4897   242    49 66 0 ---- LE BOURGET
+07153 4860   267    92 92 0 ---- MELUN
+07156 4882   233    77 75 0 ---- PARIS-MONTSOURIS
+07157 4900   253    112 119 0 ---- ROISSY
+07166 4877   415    167 179 0 ---- VATRY-AERO
+07167 4845   430    0 156 0 ---- ARCIS RADAR
+07168 4832   402    118 118 0 ---- TROYES-BARBEREY
+07169 4862   490    140 140 0 ---- SAINT-DIZIER
+07180 4868   622    213 229 0 ---- NANCY-ESSEY
+07181 4857   595    343 336 0 ---- NANCY-OCHEY
+07182 4870   657    0 286 0 ---- RECHICOURT-RADAR
+07190 4853   763    151 154 0 ---- STRASBOURG-ENTZHEIM
+07200 4778   -437   19 3 0 ---- PTE DE PENMARCH
+07201 4797   -417   94 91 0 ---- QUIMPER
+07203 4765   -350   45 41 0 ---- ILE DE GROIX
+07205 4775   -343   44 49 0 ---- LORIENT LANN BIHOUE
+07207 4728   -322   43 34 0 ---- BELLE ILE-LE TALUT
+07217 4730   -215   4 4 0 ---- SAINT-NAZAIRE-MONTOIR
+07222 4715   -160   26 27 0 ---- NANTES-BOUGUENAIS
+07223 4733   -165   0 69 0 ---- TREILLIERES-RADAR
+07230 4747   -60    48 50 0 ---- BEAUCOUZE
+07235 4793   18     52 59 0 ---- LE MANS
+07240 4743   72     112 109 0 ---- TOURS
+07245 4767   120    125 121 0 ---- BLOIS
+07247 4732   168    86 84 0 ---- ROMORANTIN
+07249 4798   177    125 125 0 ---- ORLEANS
+07255 4705   235    166 161 0 ---- BOURGES
+07257 4705   263    177 176 0 ---- AVORD
+07260 4698   310    177 183 0 ---- NEVERS-MARZY
+07265 4780   353    212 207 0 ---- AUXERRE
+07274 4735   477    0 592 0 ---- BLAISY HAUT RADAR
+07280 4727   508    227 222 0 ---- DIJON-LONGVIC
+07283 4783   533    467 467 0 ---- LANGRES
+07288 4723   598    310 307 0 ---- BESANCON
+07291 4737   702    0 913 0 ---- MONTACY-RADAR
+07292 4778   635    274 278 0 ---- LUXEUIL
+07296 4758   683    402 401 0 ---- DORANS
+07299 4760   750    273 270 0 ---- BALE-MULHOUSE
+07300 4668   -232   32 32 0 ---- L ILE D YEU
+07306 4670   -137   91 91 0 ---- LA ROCHE-SUR-YON
+07314 4603   -140   23 11 0 ---- POINTE DE CHASSIRON
+07316 4617   -118   20 23 0 ---- LA ROCHELLE AEROPORT ILE DE RE
+07330 4630   -40    61 61 0 ---- NIORT
+07335 4658   30     120 128 0 ---- POITIERS-BIARD
+07336 4668   5      0 159 0 ---- CHERVES RADAR
+07354 4687   173    157 161 0 ---- CHATEAUROUX DEOLS
+07361 4617   195    366 365 0 ---- GUERET ST LAURENT
+07374 4617   338    251 251 0 ---- VICHY-CHARMEIL
+07379 4640   402    244 242 0 ---- SAINT-YAN
+07381 4607   443    0 908 0 ---- SAINT NIZIER-RADAR
+07385 4628   478    217 222 0 ---- MACON
+07386 4703   542    195 197 0 ---- DOLE-TAVAUX
+07412 4565   -30    31 31 0 ---- COGNAC
+07434 4585   117    403 396 0 ---- LIMOGES-BELLEGARDE
+07436 4510   137    0 351 0 ---- GREZES-RADAR
+07438 4513   147    117 112 0 ---- BRIVE
+07460 4578   313    326 331 0 ---- CLERMONT-FERRAND
+07461 4528   370    0 1115 0 ---- SEMBADEL-RADAR
+07471 4507   375    833 832 2 ---- LE PUY-LOUDES
+07475 4552   428    402 404 0 ---- ST-ETIENNE BOUTHEON
+07480 4572   493    198 197 0 ---- LYON-BRON
+07481 4572   507    240 250 0 ---- LYON-ST EXUPERY
+07482 4597   532    252 251 0 ---- AMBERIEU
+07486 4535   530    386 397 0 ---- GRENOBLE-ST-GEOIRS
+07487 4522   583    220 220 0 ---- GRENOBLE-LVD
+07490 4592   610    459 458 0 ---- ANNECY-MEYTHET
+07491 4563   587    235 235 0 ---- CHAMBERY-AIX-LES-BAINS
+07497 4560   675    868 865 2 ---- BOURG ST-MAURICE
+07500 4462   -123   28 9 0 ---- LEGE-CAP FERRET
+07503 4442   -123   39 35 0 ---- BISCAROSSE
+07510 4482   -68    54 51 0 T-T- BORDEAUX MERIGNAC
+07524 4417   58     69 62 0 ---- AGEN
+07530 4482   52     52 52 0 ---- BERGERAC
+07535 4473   138    261 260 0 ---- GOURDON
+07540 4402   137    107 108 0 ---- MONTAUBAN
+07549 4488   242    640 639 0 ---- AURILLAC
+07552 4440   247    579 582 0 ---- SALLES LA SOURCE
+07554 4453   345    934 932 0 ---- MENDE
+07558 4412   302    716 714 0 ---- MILLAU
+07560 4412   357    1564 1567 2 ---- MONT AIGOUAL
+07563 4390   490    48 38 0 ---- AVIGNON
+07569 4432   475    0 309 0 ---- BOLLENE-RADAR
+07570 4453   437    280 281 0 ---- LANAS SYN
+07577 4457   472    74 73 0 ---- MONTELIMAR
+07579 4413   485    55 60 0 ---- ORANGE
+07586 4407   505    106 99 0 ---- CARPENTRAS
+07588 4405   598    461 461 0 ---- ST-AUBAN-SUR-DURANCE
+07591 4455   650    877 871 2 ---- EMBRUN
+07600 4338   -168   43 21 0 ---- POINTE DE SOCOA
+07602 4347   -153   71 75 0 ---- BIARRITZ-ANGLET
+07603 4368   -107   34 33 0 ---- DAX
+07606 4362   -60    0 126 0 ---- MOMUY RADAR
+07607 4390   -50    59 62 0 ---- MONT-DE-MARSAN
+07610 4338   -40    183 188 0 ---- PAU-UZEIN
+07621 4318   0      364 384 0 ---- TARBES-OSSUN
+07622 4368   60     128 125 0 ---- AUCH
+07627 4300   110    411 417 0 ---- SAINT GIRONS
+07628 4345   125    190 190 0 ---- MURET-LHERM
+07629 4357   137    0 158 0 ---- TOULOUSE RADAR
+07630 4362   137    150 152 0 ---- TOULOUSE BLAGNAC
+07632 4390   210    171 172 0 ---- ALBI
+07635 4320   228    130 132 0 ---- CARCASSONNE
+07637 4398   260    0 667 0 ---- MONTCLAR RADAR
+07638 4332   335    16 17 0 ---- BEZIERS-VIAS
+07641 4338   368    79 80 0 ---- SETE
+07643 4357   395    8 5 0 ---- MONTPELLIER
+07645 4385   440    62 60 0 T-T- NIMES-COURBESSAC
+07646 4375   440    105 94 0 ---- NIMES GARONS
+07647 4352   492    24 23 0 ---- ISTRES
+07648 4360   510    59 58 0 ---- SALON DE PROVENCE
+07650 4343   522    32 21 0 ---- MARIGNANE
+07658 4380   450    0 71 0 ---- NIMES-RADAR
+07661 4307   593    134 118 0 ---- CAP CEPET
+07666 4292   305    40 42 0 ---- LEUCATE
+07667 4308   613    4 2 0 ---- HYERES
+07671 4320   637    0 641 0 ---- COLLOBRIERES-RADAR
+07675 4337   638    82 81 0 ---- LE LUC
+07684 4353   695    4 3 0 ---- CANNES
+07690 4363   720    28 4 0 ---- NICE
+07745 4292   285    0 702 0 ---- OPOUL-RADAR
+07747 4273   287    44 44 0 ---- PERPIGNAN
+07749 4252   313    87 82 0 ---- CAP BEAR
+07753 4262   892    145 142 0 ---- ILE ROUSSE
+07754 4252   878    58 64 0 ---- CALVI
+07761 4192   878    9 5 0 T-T- AJACCIO
+07765 4192   938    17 9 0 ---- SOLENZARA
+07770 4137   917    116 107 0 ---- CAP PERTUSATO
+07774 4212   948    0 50 0 ---- ALERIA RADAR
+07775 4225   953    74 65 0 ---- ALISTRO
+07780 4148   908    23 27 0 ---- FIGARI
+07785 4300   935    113 104 0 ---- CAP CORSE
+07790 4253   948    12 8 0 ---- BASTIA
+37279 4252   4187   118 118 4 ---- ZUGDIDI
+37308 4252   4313   544 545 4 ---- AMBROLAURI
+37379 4213   4168   1 1 4 ---- POTI
+37395 4225   4262   113 114 4 ---- KUTAISI
+37409 4203   4348   1245 1242 2 ---- MTA-SABUETI
+37432 4235   4468   1071 1070 2 ---- PASANAURI
+37481 4187   4177   7 7 4 ---- KOBULETI
+37484 4163   4160   6 11 4 ---- BATUMI
+37492 4185   4232   1923 1926 2 ---- BAKHMARO
+37514 4165   4300   994 989 4 ---- AKHALTSIKHE
+37531 4198   4410   609 609 4 ---- GORI
+37545 4175   4477   428 427 4 ---- TBILISI
+37553 4192   4550   566 568 4 ---- TELAVI
+37621 4145   4455   537 534 4 ---- BOLNISI
+10004 5417   635    0 0 0 ---- UFS TW EMS
+10007 5418   743    0 0 0 ---- UFS DEUTSCHE BUCHT
+10015 5417   788    8 4 0 ---- HELGOLAND
+10020 5500   840    26 26 0 ---- LIST/SYLT
+10022 5478   893    7 7 0 ---- LECK
+10028 5432   860    11 5 0 ---- ST PETER-ORDING
+10033 5482   950    33 27 0 ---- GLUECKSBURG-MEIERWIK
+10035 5452   953    0 43 0 ---- SCHLESWIG
+10035 5453   955    48 47 0 T-T- SCHLESWIG
+10037 5445   952    25 21 0 ---- SCHLESWIG-JAGEL
+10038 5430   953    17 10 0 ---- HOHN
+10042 5463   1002   3 2 0 ---- SCHONHAGEN (OSTSEEBAD)
+10044 5450   1027   26 5 0 ---- LEUCHTTURM KIEL
+10046 5437   1013   31 27 0 ---- KIEL-HOLTENAU
+10055 5452   1105   8 3 0 ---- FEHMARN
+10067 5450   1123   12 5 0 ---- MARIENLEUCHTE
+10091 5467   1343   41 42 0 ---- ARKONA
+10093 5435   1347   40 39 0 ---- PUTBUS
+10097 5423   1390   11 12 0 ---- GREIFSWALDER OIE
+10113 5370   715    15 11 0 T-T- NORDERNEY
+10124 5387   813    30 32 0 ---- LEUCHTTURM ALTE WESER
+10126 5355   767    11 8 0 ---- WITTMUNDHAVEN
+10129 5353   857    10 7 0 ---- BREMERHAVEN
+10130 5407   900    4 3 0 ---- ELPERSBUETTEL
+10131 5387   870    12 5 0 ---- CUXHAVEN
+10136 5375   865    32 25 0 ---- NORDHOLZ (FLUGPLATZ)
+10139 5343   913    11 10 0 ---- BREMERVOERDE
+10142 5398   957    25 21 0 ---- ITZEHOE
+10146 5373   987    14 13 0 ---- QUICKBORN
+10147 5363   998    15 11 0 ---- HAMBURG-FUHLSBUETTEL
+10150 5417   1035   27 26 0 ---- DOERNICK
+10152 5408   1087   2 1 0 ---- PELZERHAKEN
+10156 5380   1068   15 17 0 ---- LUEBECK-BLANKENSEE
+10161 5400   1118   16 15 0 ---- BOLTENHAGEN
+10162 5363   1138   67 59 0 ---- SCHWERIN
+10168 5360   1210   59 58 0 ---- GOLDBERG
+10169 5417   1205   0 1 0 ---- ROSTOCK (RADAR)
+10170 5417   1207   12 4 0 ---- ROSTOCK-WARNEMUENDE
+10172 5392   1228   59 40 0 ---- LAAGE (FLUGPLATZ)
+10180 5433   1270   4 3 0 ---- BARTH
+10184 5408   1340   6 2 0 T-T- GREIFSWALD
+10193 5373   1407   2 1 0 ---- UECKERMUENDE
+10200 5338   722    -1 0 0 ---- EMDEN-FLUGPLATZ
+10204 5333   702    0 2 0 ---- EMDEN-KNOCK (RADAR)
+10210 5305   790    7 5 0 ---- FRIESOYTHE-ALTENOYTHE
+10224 5303   878    5 4 0 ---- BREMEN
+10235 5295   978    77 75 0 ---- SOLTAU
+10238 5282   993    77 70 0 TTTP BERGEN
+10246 5292   1018   87 73 0 ---- FASSBERG
+10249 5338   1068   45 45 0 ---- BOIZENBURG
+10253 5297   1113   18 17 0 ---- LUECHOW
+10261 5288   1172   23 21 0 ---- SEEHAUSEN
+10264 5332   1193   87 81 0 ---- MARNITZ
+10267 5293   1240   39 40 0 ---- KYRITZ
+10268 5352   1267   71 70 0 ---- WAREN
+10270 5290   1280   45 38 0 ---- NEURUPPIN
+10281 5360   1330   93 69 0 ---- TROLLENHAGEN
+10282 5332   1342   116 115 0 ---- FELDBERG/MECKLENBURG
+10289 5332   1393   57 55 0 ---- GRUENOW
+10291 5302   1398   55 54 0 ---- ANGERMUENDE
+10304 5273   733    41 0 0 -TT- MEPPEN
+10305 5252   730    26 22 0 ---- LINGEN
+10306 5228   738    48 40 0 ---- RHEINE-BENTLAGE
+10309 5207   693    46 45 0 ---- AHAUS
+10312 5232   817    104 103 0 ---- BELM
+10315 5213   770    52 47 0 ---- MUENSTER/OSNABRUECK
+10320 5192   830    71 72 0 ---- GUETERSLOH
+10321 5258   833    43 39 0 ---- DIEPHOLZ
+10325 5210   875    136 134 0 ---- BAD SALZUFLEN
+10334 5245   942    69 57 0 ---- WUNSTORF
+10335 5227   908    76 68 0 ---- BUECKEBURG
+10338 5245   967    59 55 0 ---- HANNOVER
+10343 5258   1002   52 39 0 ---- CELLE
+10348 5228   1043   87 81 0 ---- BRAUNSCHWEIG
+10356 5215   1117   162 162 0 ---- UMMENDORF
+10359 5250   1138   48 47 0 ---- GARDELEGEN
+10361 5210   1158   85 76 0 ---- MAGDEBURG
+10365 5238   1215   37 35 0 ---- GENTHIN
+10368 5212   1245   187 187 0 ---- WIESENBURG
+10376 5205   1350   55 54 0 ---- BARUTH
+10379 5238   1305   99 81 0 ---- POTSDAM
+10381 5247   1330   70 51 0 ---- BERLIN-DAHLEM
+10382 5255   1330   36 36 0 ---- BERLIN-TEGEL
+10384 5247   1340   49 48 0 ---- BERLIN-TEMPELHOF
+10385 5237   1352   50 46 0 ---- BERLIN-SCHOENEFELD
+10393 5220   1412   103 98 0 ---- LINDENBERG
+10393 5222   1412   115 112 0 TTTT LINDENBERG
+10394 5222   1412   0 101 0 ---- LINDENBERG (WP)
+10396 5253   1453   13 12 0 ---- MANSCHNOW
+10400 5128   677    40 36 0 ---- DUESSELDORF
+10404 5173   625    42 31 0 ---- KALKAR
+10410 5140   697    149 150 0 ---- ESSEN-BREDENEY
+10410 5140   697    153 153 0 T-T- ESSEN-BREDENEY
+10418 5123   763    389 386 0 ---- LUEDENSCHEID
+10424 5157   788    86 84 0 ---- WERL
+10427 5117   848    858 839 2 ---- KAHLER ASTEN
+10430 5178   883    158 157 0 ---- BAD LIPPSPRINGE
+10433 5187   927    259 258 0 ---- LUEGDE-PAENBRUCH
+10435 5150   910    236 235 0 ---- WARBURG
+10438 5128   943    231 231 0 ---- KASSEL
+10439 5112   928    181 172 0 ---- FRITZLAR (FLUGPLATZ)
+10440 5130   880    0 551 0 ---- FLECHTDORF (RADAR)
+10442 5197   980    145 143 0 ---- ALFELD
+10444 5150   995    168 167 0 ---- GOETTINGEN
+10449 5138   1030   353 356 0 ---- LEINEFELDE
+10452 5172   1060   608 607 0 ---- BRAUNLAGE
+10453 5180   1062   1152 1142 2 ---- BROCKEN
+10454 5183   1077   239 234 0 ---- WERNIGERODE
+10458 5165   1113   405 404 0 ---- HARZGERODE
+10460 5137   1128   165 164 0 ---- ARTERN
+10466 5150   1195   95 93 0 ---- HALLE-KROELLWITZ
+10469 5143   1223   135 131 0 ---- LEIPZIG/HALLE
+10471 5130   1243   138 138 0 ---- LEIPZIG-HOLZHAUSEN
+10474 5188   1263   105 105 0 ---- WITTENBERG
+10476 5177   1317   101 81 0 ---- HOLZDORF (FLUGPLATZ)
+10480 5128   1308   150 150 0 ---- OSCHATZ
+10488 5112   1375   232 227 0 ---- DRESDEN-KLOTZSCHE
+10490 5163   1357   97 96 0 ---- DOBERLUG-KIRCHHAIN
+10495 5145   1425   116 115 0 ---- HOYERSWERDA
+10496 5177   1432   69 69 0 ---- COTTBUS
+10499 5115   1495   239 238 0 ---- GOERLITZ
+10500 5097   605    97 90 0 ---- GEILENKIRCHEN
+10502 5082   665    133 111 0 ---- NOERVENICH (FLUGPLATZ)
+10505 5078   602    232 230 0 ---- AACHEN-ORSBACH
+10506 5035   687    488 485 0 ---- NUERBURG-BARWEILER
+10513 5085   715    99 92 0 ---- KOELN/BONN
+10516 5037   758    97 84 0 ---- KOBLENZ (FALKENSTEIN-KASERNE)
+10518 5070   703    160 158 0 ---- BONN-HARDTHOEHE
+10519 5073   718    160 159 0 ---- BONN-ROLEBER
+10520 5042   742    76 75 0 ---- ANDERNACH
+10526 5065   795    546 546 0 ---- BAD MARIENBERG
+10532 5060   863    204 202 0 ---- GIESSEN-WETTENBERG
+10534 5050   922    744 743 0 ---- HOHERODSKOPF-VOGELSBERG
+10537 5075   902    351 350 0 ---- NEU ULRICHSTEIN
+10540 5100   1035   313 312 0 ---- EISENACH
+10542 5085   973    270 272 0 ---- BAD HERSFELD
+10544 5048   993    925 921 2 ---- WASSERKUPPE
+10548 5055   1037   452 450 0 T-T- MEININGEN
+10552 5065   1077   939 937 2 ---- SCHMUECKE
+10554 5098   1095   322 316 0 ---- ERFURT-WEIMAR
+10557 5050   1113   851 845 2 ---- NEUHAUS A.R.
+10564 5057   1180   501 501 0 ---- SCHLEIZ
+10565 5108   1192   245 246 0 ---- OSTERFELD
+10567 5087   1212   311 311 0 ---- GERA-LEUMNITZ
+10569 5047   1212   388 386 0 ---- PLAUEN
+10574 5042   1260   899 897 2 ---- CARLSFELD
+10577 5078   1287   419 418 0 ---- CHEMNITZ
+10578 5042   1295   1214 1213 2 ---- FICHTELBERG
+10579 5065   1313   640 639 0 ---- MARIENBERG
+10582 5072   1375   882 877 2 ---- ZINNWALD-GEORGENFELD
+10591 5093   1420   319 321 0 ---- LICHTENHAIN-MITTELNDORF
+10605 5010   653    0 551 0 ---- NEUHEILENBACH (RADAR)
+10609 4973   665    273 265 0 ---- TRIER-PETRISBERG
+10613 5017   705    485 477 0 ---- BUECHEL (FLUGPLATZ)
+10615 4975   705    481 480 0 ---- DEUSELBACH
+10616 4993   725    503 497 0 ---- HAHN
+10618 4970   733    377 376 0 TTTP IDAR-OBERSTEIN
+10628 4998   795    111 110 0 ---- GEISENHEIM
+10629 4998   870    0 198 0 ---- OFFENTHAL (RADAR)
+10635 5022   843    826 825 2 ---- KLEINER FELDBERG/TAUNUS
+10637 5003   858    113 112 0 ---- FRANKFURT/MAIN
+10639 5002   867    135 125 0 ---- LANGEN
+10641 5008   878    120 118 0 ---- OFFENBACH-WETTERPARK
+10646 5000   942    340 339 0 ---- NEUHUTTEN-SPESSART
+10648 4972   910    454 453 0 ---- MICHELSTADT-VIELBRUNN
+10655 4977   995    272 268 0 ---- WUERZBURG
+10658 5022   1007   281 281 0 ---- BAD KISSINGEN
+10671 5030   1097   345 344 0 ---- LAUTERTAL-OBERLAUTER
+10675 4987   1092   240 240 0 ---- BAMBERG
+10685 5030   1187   566 565 0 ---- HOF
+10686 5002   1197   623 622 0 ---- WUNSIEDEL-SCHOENBRUNN
+10688 4965   1218   436 439 0 ---- WEIDEN
+10704 4925   668    363 363 0 ---- BERUS
+10706 4947   703    387 385 0 ---- THOLEY
+10708 4920   710    320 320 0 ---- SAARBRUECKEN/ENSHEIM
+10724 4937   812    558 553 0 ---- WEINBIET
+10729 4950   855    99 96 0 ---- MANNHEIM
+10731 4897   832    117 116 0 ---- RHEINSTETTEN
+10733 4928   890    239 236 0 ---- WAIBSTADT
+10736 4897   887    243 244 0 ---- MUEHLACKER
+10738 4868   922    391 371 0 ---- STUTTGART-ECHTERDINGEN
+10739 4882   920    317 314 0 ---- STUTTGART/SCHNARRENBERG
+10739 4883   920    315 314 0 T-T- STUTTGART/SCHNARRENBERG
+10742 4920   952    274 275 0 ---- OEHRINGEN
+10743 4938   995    472 473 0 ---- NIEDERSTETTEN
+10747 4892   968    489 488 0 ---- KAISERSBACH-CRONHUETTE
+10756 4915   1037   476 475 0 ---- FEUCHTWANGEN-HEILBRONN
+10761 4902   1095   423 422 0 ---- WEISSENBURG
+10763 4950   1105   317 314 0 ---- NUERNBERG
+10765 4920   1110   395 385 0 ---- ROTH
+10771 4942   1190   418 417 0 TTTP KUEMMERSBRUCK
+10776 4903   1210   369 365 0 ---- REGENSBURG
+10777 4893   1142   537 536 0 ---- GELBELSEE
+10780 4953   1240   0 771 0 ---- EISBERG (RADAR)
+10782 4938   1268   499 498 0 ---- WALDMUNCHEN
+10788 4882   1255   359 350 0 ---- STRAUBING
+10791 4910   1313   1445 1436 2 ---- GROSSER ARBER
+10796 4902   1323   616 615 0 ---- ZWIESEL
+10803 4802   783    237 236 0 ---- FREIBURG
+10805 4835   782    157 155 0 ---- LAHR
+10815 4845   840    800 796 2 ---- FREUDENSTADT
+10818 4810   875    974 973 2 ---- KLIPPENECK
+10827 4818   898    932 920 2 ---- MESSSTETTEN
+10832 4858   978    0 730 0 ---- TUERKHEIM (RADAR)
+10836 4867   985    738 733 0 ---- STOETTEN
+10837 4822   990    549 539 0 ---- LAUPHEIM
+10838 4838   995    570 566 0 ---- ULM
+10850 4878   1070   503 501 0 ---- HARBURG
+10852 4842   1093   476 461 0 ---- AUGSBURG
+10853 4870   1120   387 380 0 ---- NEUBURG/DONAU (FLUGPLATZ)
+10856 4818   1085   562 550 0 ---- LECHFELD
+10857 4807   1090   627 621 0 ---- LANDSBERG (FLUGPLATZ)
+10860 4870   1153   366 364 0 ---- INGOLSTADT (FLUGPLATZ)
+10863 4840   1168   478 477 0 ---- WEIHENSTEPHAN-DURNAST
+10865 4815   1153   525 515 0 ---- MUENCHEN-STADT
+10868 4825   1155   489 484 0 T-T- MUENCHEN-OBERSCHLEIBSHEIM
+10869 4832   1195   467 459 0 ---- ERDING
+10870 4833   1180   446 445 0 ---- MUENCHEN-FLUGHAFEN
+10871 4833   1160   0 489 0 ---- FUERHOLZEN (RADAR)
+10872 4865   1253   351 350 0 ---- GOTTFRIEDING
+10875 4827   1250   406 405 0 ---- MUEHLDORF
+10895 4853   1335   477 476 0 ---- FURSTENZELL
+10906 4790   790    1208 1205 1 ---- SCHAUINSLAND/FREIBURG (CTBT)
+10907 4787   800    0 1483 0 ---- FELDBERG (RADAR)
+10908 4787   800    1495 1489 2 ---- FELDBERG/SCHWARZWALD
+10929 4767   918    444 442 0 ---- KONSTANZ
+10945 4778   1003   673 671 0 ---- LEUTKIRCH-HERLAZHOFEN
+10946 4772   1033   705 705 0 ---- KEMPTEN
+10948 4738   1027   807 806 2 ---- OBERSTDORF
+10954 4783   1087   756 756 0 -PP- ALTENSTADT
+10961 4742   1098   2960 2964 3 ---- ZUGSPITZE
+10962 4780   1100   985 977 2 -T-- HOHENPEISSENBERG
+10963 4748   1105   720 719 0 ---- GARMISCH-PARTENKIRCHEN
+10982 4788   1253   552 551 0 ---- CHIEMING
+08495 3615   -533   0 5 0 ---- GIBRALTAR
+08495 3615   -535   4 3 0 T-T- GIBRALTAR
+16606 4107   2357   35 33 0 ---- SERRAI
+16613 4078   2140   662 650 0 ---- FLORINA
+16614 4045   2128   0 604 0 ---- KASTORIA (AIRPORT)
+16622 4052   2297   4 8 0 -PTP THESSALONIKI (AIRPORT)
+16624 4098   2460   5 5 0 ---- CHRYSOPOULI (AIRPORT)
+16627 4085   2592   3 7 0 ---- ALEXANDROUPOLI (AIRPORT)
+16632 4030   2178   627 634 0 ---- KOZANI (AIRPORT)
+16641 3962   1992   4 2 0 ---- KERKYRA (AIRPORT)
+16642 3970   2082   483 480 0 ---- IOANNINA (AIRPORT)
+16643 3862   2077   4 4 0 ---- AKTION (AIRPORT)
+16645 3955   2177   116 112 0 ---- TRIKALA
+16648 3963   2242   74 73 0 ---- LARISSA (AIRPORT)
+16650 3992   2523   4 5 0 ---- LIMNOS (AIRPORT)
+16654 3917   2100   11 10 0 ---- ARTA (HALKIADES)
+16665 3922   2280   15 25 0 ---- ANCHIALOS (AIRPORT)
+16667 3907   2660   5 3 0 ---- MYTILINI (AIRPORT)
+16672 3860   2135   24 24 0 ---- AGRINION (AIRPORT)
+16674 3838   2310   0 110 0 ---- ALIARTOS
+16675 3890   2240   144 144 0 ---- LAMIA
+16682 3792   2128   14 10 0 ---- ANDRAVIDA (AIRPORT)
+16684 3897   2448   28 27 0 ---- SKYROS (AIRPORT)
+16685 3812   2050   22 19 0 ---- KEFALHNIA (AIRPORT)
+16687 3815   2142   12 11 0 ---- ARAXOS (AIRPORT)
+16689 3825   2173   3 1 0 ---- PATRAI
+16699 3832   2353   140 148 0 ---- TANAGRA (AIRPORT)
+16701 3805   2367   138 136 0 ---- ATHINAI (FILADELFIA)
+16706 3833   2613   4 5 0 ---- CHIOS (AIRPORT)
+16710 3753   2240   652 644 0 ---- TRIPOLIS (AIRPORT)
+16715 3810   2378   235 239 0 ---- TATOI
+16716 3773   2373   10 28 0 TPTP ATHINAI AP HELLINIKON
+16717 3798   2357   2 2 0 ---- PIRAEUS
+16718 3807   2355   31 44 0 ---- ELEFSIS (AIRPORT)
+16723 3770   2692   7 2 0 ---- SAMOS
+16726 3707   2202   8 6 0 ---- KALAMATA (AIRPORT)
+16732 3710   2538   9 9 0 ---- NAXOS
+16734 3683   2170   34 33 0 ---- METHONI
+16738 3672   2445   183 182 0 ---- MILOS
+16741 3792   2392   72 0 0 ---- EL VENIZELOS
+16742 3678   2707   0 129 0 ---- KOS (AIRPORT)
+16743 3628   2302   167 167 0 ---- KYTHIRA
+16744 3642   2543   36 40 0 ---- THIRA (AIRPORT)
+16746 3548   2412   151 146 0 ---- SOUDA (AIRPORT)
+16749 3640   2808   11 4 0 ---- RHODES (AIRPORT)
+16754 3533   2518   39 37 0 TP-P HERAKLION (AIRPORT)
+16756 3500   2573   0 13 0 ---- IERAPETRA
+16757 3520   2610   28 25 0 ---- SITIA
+16758 3535   2452   7 7 0 ---- RETHYMNON
+16759 3500   2475   7 7 0 ---- TYMBAKION (AIRPORT)
+16760 3518   2532   336 360 0 ---- KASTELI (AIRPORT)
+16765 3552   2725   0 0 0 ---- KARPATHOS (AIRPORT)
+04202 7653   -6875  59 76 0 ---- PITUFFIK (THULE AIR BASE)
+04203 7663   -7300  15 13 0 ---- KITSISSUT (CAREY OEER)
+04205 7748   -6938  17 15 0 ---- MITTARFIK QAANAAQ
+04208 7403   -5782  39 37 0 ---- KITSISSORSUIT (EDDERFUGLEOEER)
+04211 7278   -5613  130 126 0 ---- MITTARFIK UPERNAVIK (UPERNAVIK LUFTHAVN)
+04213 7073   -5270  89 88 0 ---- MITTARFIK QAARSUT (UUMMANNAQ LUFTHAVN)
+04214 7068   -5462  28 26 0 ---- NUUSSUAQ
+04217 6882   -5117  13 21 0 ---- QASIGIANNGUIT HELIPORT
+04219 6925   -5353  2 2 0 ---- QEQERTARSUAQ HELIPORT
+04220 6870   -5285  41 43 0 T-T- AASIAAT (EGEDESMINDE)
+04221 6923   -5105  34 28 0 ---- MITTARFIK ILULISSAT (JAKOBSHAVN LUFTHAVN)
+04224 6872   -5278  27 22 0 ---- MITTARFIK AASIAAT (EGEDESMINDE LUFTHAVN)
+04228 6778   -5395  11 10 0 ---- KITSISSUT/ATTU
+04231 6702   -5072  53 50 0 ---- MITTARFIK KANGERLUSSUAQ (SDR. STROEMFJORD LUFTHAVN)
+04234 6695   -5372  8 10 0 ---- MITTARFIK SISIMIUT (HOLSTEINSBORG LUFTHAVN)
+04241 6542   -5293  32 27 0 ---- MITTARFIK MANIITSOQ (SUKKERTOPPEN LUFTHAVN)
+04242 6502   -5255  14 12 0 ---- SIORALIK
+04250 6417   -5175  83 80 0 ---- NUUK (GODTHAAB)
+04253 6257   -5040  22 22 0 ---- UKIIVIT
+04254 6420   -5168  87 86 0 ---- MITTARFIK NUUK (GODTHAAB LUFTHAVN)
+04260 6202   -4967  36 36 0 ---- MITTARFIK PAAMIUT (FREDERIKSHAAB LUFTHAVN)
+04266 6075   -4845  32 30 0 ---- NUNARSSUIT
+04270 6117   -4542  31 34 0 ---- MITTARFIK NARSARSUAQ
+04270 6117   -4542  0 0 0 T-T- MITTARFIK NARSARSUAQ
+04272 6070   -4603  57 56 0 ---- QAQORTOQ (JULIANEHAAB)
+04273 6072   -4603  21 16 0 ---- QAQORTOQ HELIPORT
+04280 6092   -4605  6 25 0 ---- NARSAQ HELIPORT
+04282 6047   -4558  8 27 0 ---- ALLUITSUP PAA HELIPORT
+04283 6013   -4523  0 5 0 ---- NANORTALIK HELIPORT
+04285 5998   -4513  16 14 0 ---- ANGISSOQ
+04301 8365   -3337  4 3 0 ---- KAP MORRIS JESUP
+04312 8160   -1665  36 34 0 ---- STATION NORD
+04313 8063   -1370  10 8 0 ---- HENRIK KROEYER HOLME
+04320 7677   -1867  12 11 0 T-T- DANMARKSHAVN
+04330 7430   -2022  15 13 0 ---- DANEBORG
+04339 7048   -2195  71 70 0 T-T- ITTOQQORTOORMIIT (SCORESBYSUND)
+04341 7075   -2265  12 13 0 ---- MITTARFIK NERLERIT INAAT (CONSTABLE PYNT)
+04351 6778   -3230  14 12 0 ---- APUTITEEQ
+04360 6560   -3763  55 54 0 T-T- TASIILAQ (AMMASSALIK)
+04361 6557   -3713  37 35 0 ---- MITTARFIK KULUSUK
+04373 6477   -4030  80 78 0 ---- IKERMIIT
+04382 6193   -4207  41 39 0 ---- IKERMIUARSSUK
+04390 6005   -4315  74 88 0 ---- IKERASASSUAQ (PRINS CHRISTIAN SUND)
+04416 7258   -3845  3207 3202 3 ---- SUMMIT
+04417 7257   -3845  3255 3255 0 T-T- GEOSUMMIT
+04418 7257   -3850  3199 3198 0 ---- SUMMIT-US
+04425 7800   -3398  2010 2009 0 ---- TUNU-N
+04432 7852   -5682  1993 1992 0 ---- HUMBOLDT
+04436 7750   -5087  2450 2449 0 ---- NEEM
+04452 6948   -4968  905 904 0 ---- JAR 1
+04458 6955   -4932  1093 1092 0 ---- SWISS CAMP
+04464 6647   -4627  2099 2098 0 ---- DYE 2
+04485 6598   -4450  2467 2466 0 ---- SADDLE
+04488 6647   -4248  2406 2405 0 ---- NASA-SE
+12756 4812   1952   153 152 0 ---- SZECSENY
+12766 4848   2053   0 305 0 ---- JOSVAFO
+12772 4810   2077   236 232 0 ---- MISKOLC
+12786 4840   2217   104 103 0 ---- ZAHONY
+12805 4768   1660   239 233 0 ---- SOPRON
+12812 4727   1663   221 220 0 ---- SZOMBATHELY
+12815 4788   1728   122 121 0 ---- MOSONMAGYAROVAR
+12822 4772   1768   117 116 0 ---- GYOR
+12825 4720   1750   146 145 0 ---- PAPA
+12830 4707   1783   281 280 0 ---- VESZPREM/SZENTKIRALYSZABADJA
+12836 4765   1832   129 128 0 ---- TATA
+12839 4743   1927   185 151 0 ---- BUDAPEST/FERIHEGY INTL
+12843 4743   1918   139 138 0 T-T- BUDAPEST/PESTSZENTLORINC
+12844 4735   1898   104 100 0 ---- TOKOL
+12846 4718   1862   106 105 0 ---- AGARD
+12847 4775   1860   109 108 0 ---- TAT
+12851 4787   2002   1015 1010 9 ---- KEKESTETO
+12860 4712   2023   94 89 0 ---- SZOLNOK
+12866 4765   2063   92 91 0 ---- POROSZLO
+12870 4790   2038   218 220 0 ---- EGER
+12882 4748   2160   109 108 0 ---- DEBRECEN
+12892 4797   2188   142 141 0 ---- NYIREGYHAZA/NAPKOR
+12910 4692   1632   313 312 0 ---- SZENTGOTTHARD/FARKASFA
+12915 4687   1680   180 179 0 ---- ZALAEGERSZEG/ANDRASHIDA
+12922 4668   1717   125 124 0 ---- SARMELLEK
+12925 4645   1697   141 139 0 ---- NAGYKANIZSA
+12932 4640   1792   156 156 0 ---- TASZAR
+12935 4692   1805   109 108 0 ---- SIOFOK
+12942 4600   1823   203 202 0 ---- PECS/POGANY
+12950 4658   1885   98 97 0 ---- PAKS
+12960 4618   1902   113 112 0 ---- BAJA
+12970 4692   1975   123 113 0 ---- KECSKEMET
+12982 4625   2010   83 82 0 T--- SZEGED
+12992 4668   2117   90 88 0 ---- BEKESCSABA
+04001 6553   -2435  0 20 0 ---- BREIDAVIK
+04003 6555   -2402  0 49 0 ---- KVIGINDISDALUR
+04005 6615   -2325  24 23 0 ---- BOLUNGAVIK
+04007 6587   -2360  0 30 0 ---- HOLAR I DYRAFIRDI
+04010 6480   -2303  0 8 0 ---- NEDRI-HOLL
+04013 6508   -2273  8 8 0 ---- STYKKISHOLMUR
+04014 6382   -2272  26 20 0 ---- REYKJANESVITI
+04017 6610   -2267  0 5 0 ---- AEDEY
+04018 6397   -2258  54 52 0 T-T- KEFLAVIKURFLUGVOLLUR
+04025 6545   -2220  0 11 0 ---- REYKHOLAR
+04027 6523   -2175  0 10 0 ---- ASGARDUR
+04030 6413   -2190  61 54 0 ---- REYKJAVIK
+04030 6413   -2193  61 14 0 ---- REYKJAVIK
+04034 6462   -2160  0 14 0 ---- STAFHOLTSEY
+04038 6387   -2115  5 5 0 ---- EYRARBAKKI
+04041 6528   -2110  0 8 0 ---- TANNSTADABAKKI
+04042 6425   -2042  0 101 0 ---- HJARDARLAND
+04044 6383   -2040  0 20 0 ---- HELLA
+04045 6567   -2030  22 23 0 ---- BLONDUOS
+04048 6340   -2028  124 118 0 ---- VESTMANNAEYJAR
+04050 6407   -2025  0 121 0 ---- HAELL
+04051 6612   -2012  0 3 0 ---- HRAUN A SKAGA
+04052 6468   -1948  0 240 0 ---- BASAR
+04053 6570   -1962  43 43 0 ---- BERGSTADIR
+04055 6545   -1937  0 115 0 ---- NAUTABU
+04056 6487   -1957  642 641 0 ---- HVERAVELLIR
+04058 6342   -1918  0 20 0 ---- VATNSSKARDSHOLAR
+04059 6618   -1897  0 30 0 ---- SAUDANESVITI
+04062 6350   -1838  0 18 0 ---- NORDURHJALEIGA
+04063 6568   -1808  27 23 0 ---- AKUREYRI
+04064 6378   -1807  38 32 0 ---- KIRKJUBAEJARKLAUSTUR
+04065 6653   -1802  16 15 0 ---- GRIMSEY
+04066 6445   -1875  0 610 0 ---- VERSALIR
+04069 6582   -1720  0 42 0 ---- STADARHOLL
+04071 6620   -1710  0 17 0 ---- MANARBAKKI
+04072 6388   -1665  0 46 0 ---- FAGURHOLSMYRI
+04073 6563   -1612  386 384 0 ---- GRIMSSTADIR
+04077 6645   -1595  8 8 0 ---- RAUFARHOFN
+04080 6480   -1563  0 810 0 ---- SNAEFELLSSKALI
+04081 6625   -1527  0 17 0 ---- SAUDANES
+04082 6430   -1522  21 17 0 ---- HOFN
+04085 6570   -1482  48 44 0 ---- SKJALDTHINGSSTADIR
+04087 6590   -1465  19 20 0 ---- STRANDHOFN
+04089 6528   -1440  23 23 0 ---- EGILSSTADIR
+04091 6503   -1423  0 25 0 ---- REYDARFJORDUR
+04094 6470   -1410  0 25 0 ---- NUPUR
+04097 6527   -1358  11 9 0 ---- DALATANGI
+04101 6550   -2452  36 35 0 ---- BJARGTANGAR
+04103 6560   -2400  4 3 0 ---- PATREKSFJORDUR
+04104 6490   -2393  7 6 0 ---- GUFUSKALAR
+04109 6605   -2332  753 752 0 ---- THVERFJALL
+04115 6570   -2308  621 620 0 ---- DYNJANDIHEIDI
+04119 6563   -2280  299 298 0 ---- THINGMANNAHEIDI
+04120 6385   -2242  4 3 0 ---- GRINDAVIK
+04124 6405   -2233  5 4 0 ---- STRAUMSVIK
+04126 6435   -2178  5 4 0 ---- GRUNDARTANGI
+04130 6413   -2190  53 52 0 ---- REYKJAVIK
+04131 6598   -2135  32 31 0 ---- GJOGUR
+04140 6385   -2138  5 4 0 ---- THORLAKSHOFN
+04149 6540   -1972  505 504 0 ---- KOLKA
+04154 6408   -1973  249 248 0 ---- BURFELL
+04160 6458   -1860  614 613 0 ---- THUFUVER
+04161 6597   -1853  4 3 0 ---- DALVIK
+04162 6440   -1850  648 647 0 ---- VEIDIVATNAHRAUN
+04165 6653   -1802  17 16 0 ---- GRIMSEY
+04166 6432   -1822  727 726 0 ---- JOKULHEIMAR
+04168 6493   -1798  821 820 0 ---- SANDBUDIR
+04170 6352   -1798  9 8 0 ---- SKARDSFJORUVITI
+04180 6423   -1520  5 4 0 ---- HVANNEY
+04183 6638   -1453  44 43 0 ---- FONTUR
+04193 6522   -1427  949 948 0 ---- GAGNHEIDI
+04196 6480   -1385  0 34 0 ---- KAMBANES
+04197 6527   -1358  11 10 0 ---- DALATANGI
+03951 5147   -942   21 0 0 ---- SHERKIN ISLAND
+03952 5180   -825   41 40 0 ---- ROCHES POINT
+03953 5193   -1023  25 23 0 ---- VALENTIA OBSERVATORY
+03953 5193   -1023  28 23 0 T-T- VALENTIA OBSERVATORY
+03955 5185   -848   162 153 0 ---- CORK AIRPORT
+03956 5228   -648   63 62 0 ---- JOHNSTOWN CASTLE
+03961 5285   -690   63 63 0 ---- OAK PARK, CARLOW
+03962 5270   -892   20 14 0 ---- SHANNON AIRPORT
+03963 5332   -990   23 0 0 ---- MACE HEAD
+03964 5328   -902   21 18 0 ---- GALWAY
+03966 5302   -800   76 0 0 ---- GURTEEN
+03967 5330   -643   93 97 0 ---- CASEMENT AERODROME
+03969 5343   -625   85 68 0 ---- DUBLIN AIRPORT
+03970 5372   -898   69 69 0 ---- CLAREMORRIS
+03971 5353   -737   100 100 0 ---- MULLINGAR
+03973 5390   -882   209 203 0 ---- CONNAUGHT AIRPORT
+03976 5422   -1000  9 8 0 ---- BELMULLET
+03978 5448   -823   34 37 0 ---- FINNER
+03979 5405   -730   79 79 0 ---- BALLYHAISE, CAVAN
+03980 5537   -733   21 20 0 ---- MALIN HEAD
+40153 3297   3550   934 0 2 ---- HAR-KNAAN (ZEFAT)
+40176 3210   3478   4 0 0 ---- SDE-DOV (TEL-AVIV)
+40179 3200   3482   35 0 0 TPTP BET DAGAN
+40180 3200   3490   49 40 0 ---- BEN-GURION INT. AIRPORT
+40183 3177   3522   815 815 2 ---- JERUSALEM CENTRE
+40184 3187   3522   757 757 2 ---- JERUSALEM
+40186 3187   3468   20 0 0 -T-T ASHDOD NORTH
+40190 3125   3480   280 280 0 ---- BEER SHEVA CITY
+40198 3000   3483   445 0 0 ---- OVDA
+40199 2955   3495   0 20 0 ---- EILAT
+16008 4675   1053   1461 1459 2 ---- S. VALENTINO ALLA MUTA
+16014 4688   1143   922 920 2 ---- VIPITENO
+16020 4645   1132   241 239 0 ---- BOLZANO
+16021 4628   1178   2006 2004 2 ---- PASSO ROLLE
+16022 4615   1103   2129 2125 2 ---- PAGANELLA
+16023 4602   1112   190 188 0 ---- TRENTO
+16033 4672   1222   1226 1222 2 ---- DOBBIACO
+16036 4602   1260   117 126 0 ---- AVIANO
+16037 4602   1258   115 113 0 ---- AVIANO
+16040 4650   1358   778 777 9 ---- TARVISIO
+16041 4650   1358   779 777 2 ---- TARVISIO
+16044 4603   1318   94 93 0 TTTT CAMPOFORMIDO RDS
+16045 4597   1303   53 51 0 ---- UDINE/RIVOLTO
+16046 4597   1303   54 52 0 ---- UDINE/RIVOLTO
+16052 4593   770    3488 3480 3 ---- PIAN ROSA
+16054 4573   735    552 550 0 ---- AOSTA POLLEIN
+16058 4493   682    1401 1399 2 ---- BOUSSON VALLE DI SUSA
+16059 4520   763    287 301 0 ---- TORINO CASELLE
+16060 4512   762    278 276 0 ---- TORINO VENARIA REALE
+16061 4503   772    710 709 9 ---- BRIC DELLA CROCE
+16064 4552   867    175 178 0 ---- NOVARA/CAMERI
+16066 4562   872    212 234 0 ---- MILANO MALPENSA
+16067 4563   880    239 237 0 ---- GALLARATE
+16068 4510   845    121 119 0 ---- CASALE MONFERRATO
+16076 4567   970    237 238 0 ---- BERGAMO ORIO AL SERIO
+16080 4543   927    103 108 0 ---- MILANO/LINATE
+16080 4545   927    105 104 0 TTTT MILANO LINATE RDS
+16081 4545   925    109 107 0 ---- MILANO/LINATE
+16084 4490   972    138 138 0 ---- PIACENZA S. DAMIANO
+16088 4542   1027   97 102 0 ---- BRESCIA/GHEDI
+16089 4545   1055   66 64 0 ---- DESENZANO
+16090 4538   1087   68 73 0 ---- VERONA/VILLAFRANCA
+16098 4568   1210   42 42 0 ---- TREVISO/ISTRANA
+16099 4565   1218   23 18 0 ---- TREVISO/S. ANGELO
+16101 4542   1238   6 4 0 ---- VENEZIA LIDO
+16105 4550   1235   6 2 0 ---- VENEZIA TESSERA
+16107 4575   1285   3 1 0 ---- CONCORDIA SAGITTARIA
+16108 4582   1347   11 12 0 ---- RONCHI DEI LEGIONARI
+16110 4567   1375   3 3 0 ---- TRIESTE
+16111 4423   820    1383 1381 2 ---- MONTE SETTEPANI
+16113 4453   760    386 385 0 T-T- CUNEO-LEVALDIGI RDS
+16114 4438   782    560 559 9 ---- MONDOVI
+16115 4417   757    1234 1232 2 ---- LIMONE COLLE DI TENDA
+16117 4455   762    387 385 0 ---- CUNEO LEVALDIGI
+16119 4455   893    488 487 0 ---- PASSO DEI GIOVI
+16120 4440   883    3 4 0 ---- GENOVA/SESTRI
+16121 4442   892    46 44 0 ---- GENOVA
+16122 4403   812    49 45 0 ---- ALBENGA
+16123 4432   933    31 29 0 ---- CHIAVARI
+16124 4447   992    1040 1039 2 ---- PASSO DELLA CISA
+16125 4408   998    10 13 0 ---- SARZANA-LUNI
+16126 4455   893    489 487 0 ---- PASSO DEI GIOVI
+16127 4408   997    10 8 0 ---- SARZANA
+16129 4407   980    522 520 2 ---- LA SPEZIA-LA CASTELLANA
+16130 4482   1028   52 50 0 ---- PARMA
+16131 4468   1030   181 180 0 ---- PARMA PANNOCCHIA
+16132 4452   1128   53 51 0 ---- BOLOGNA
+16133 4480   1160   11 9 0 ---- FERRARA
+16134 4418   1070   2173 2165 2 ---- MONTE CIMONE
+16135 4402   1100   1315 1313 2 ---- PASSO PORRETTA
+16138 4480   1160   9 8 0 ---- FERRARA
+16140 4452   1128   37 37 0 ---- BOLOGNA/BORGO PANIGALE
+16141 4480   1223   4 3 0 ---- VOLANO
+16143 4488   1087   22 21 0 ---- ROLO
+16144 4465   1162   12 10 0 T-T- S. PIETRO CAPOFIUME RDS
+16145 4443   1228   7 5 0 ---- PUNTA MARINA
+16146 4443   1228   6 2 0 ---- PUNTA MARINA
+16147 4418   1207   32 30 0 ---- FORLI
+16148 4422   1228   10 6 0 ---- CERVIA
+16149 4402   1260   13 12 0 ---- RIMINI
+16153 4395   817    221 220 0 ---- CAPO MELE
+16154 4342   988    259 254 0 ---- ISOLA GORGONA
+16155 4305   983    26 25 0 ---- ISOLA CAPRAIA
+16158 4367   1038   6 2 0 ---- PISA S. GIUSTO
+16165 4340   1085   576 555 2 ---- VOLTERRA
+16168 4238   1117   631 630 9 ---- MONTE ARGENTARIO
+16170 4380   1120   38 43 0 ---- FIRENZE PERETOLA
+16171 4378   1120   19 17 0 ---- FIRENZE
+16172 4345   1183   249 248 0 ---- AREZZO
+16178 4352   1272   575 573 2 ---- FRONTONE
+16179 4352   1272   574 570 9 ---- FRONTONE
+16181 4308   1250   204 212 0 ---- PERUGIA S. EGIDIO
+16182 4308   1250   206 204 0 ---- PERUGIA S. EGIDIO
+16190 4360   1352   143 141 0 ---- ANCONA
+16191 4362   1335   15 15 0 ---- FALCONARA
+16192 4342   1360   198 196 0 ---- LORETO
+16197 4272   1038   397 396 0 ---- MONTE CALAMITA
+16198 4272   1038   398 396 0 ---- ISOLA D'ELBA
+16204 4288   1177   828 816 9 ---- RADICOFANI
+16206 4273   1105   7 5 0 ---- GROSSETO
+16210 4198   1200   13 11 0 ---- FURBARA
+16214 4202   1182   4 3 0 ---- CIVITAVECCHIA
+16215 4202   1182   5 3 0 ---- CIVITAVECCHIA
+16216 4243   1205   308 300 0 ---- VITERBO
+16217 4247   1233   76 74 0 ---- ORTE
+16218 4243   1205   311 309 0 ---- VITERBO
+16219 4247   1298   1875 1874 2 ---- MONTE TERMINILLO
+16221 4242   1285   389 390 0 ---- RIETI
+16223 4207   1220   267 265 0 ---- VIGNA DI VALLE
+16224 4207   1220   266 260 0 ---- VIGNA DI VALLE
+16226 4237   1332   670 668 2 ---- L'AQUILA
+16227 4197   1360   651 649 2 ---- FUCINO
+16230 4243   1418   11 15 0 ---- PESCARA
+16231 4242   1420   181 179 0 ---- S. GIOVANNI TEATINO
+16232 4200   1498   44 16 0 ---- TERMOLI
+16233 4198   1273   91 89 0 ---- GUIDONIA
+16234 4198   1273   88 88 0 ---- GUIDONIA
+16235 4195   1250   24 17 0 ---- ROMA/URBE
+16238 4187   1255   54 52 0 ---- ROMA/CENTOCELLE
+16239 4180   1258   105 129 0 ---- ROMA/CIAMPINO
+16242 4180   1223   3 4 0 ---- ROMA/FIUMICINO
+16243 4153   1290   26 25 0 ---- LATINA
+16244 4163   1328   185 192 0 ---- FROSINONE
+16245 4165   1243   21 12 0 ---- PRATICA DI MARE
+16245 4167   1245   32 32 0 TTTT PRATICA DI MARE RDS
+16246 4163   1328   187 185 0 ---- FROSINONE
+16247 4153   1290   27 25 0 ---- LATINA
+16249 4125   1312   4 2 0 ---- TORRE OLEVOLA
+16252 4155   1465   807 793 9 ---- CAMPOBASSO
+16253 4105   1407   10 9 0 ---- GRAZZANISE
+16258 4170   1593   848 838 9 ---- MONTE S. ANGELO
+16261 4153   1570   60 57 0 ---- AMENDOLA
+16262 4103   1522   1094 1092 2 ---- TREVICO
+16263 4103   1522   1093 1085 2 ---- TREVICO
+16266 4188   1615   5 3 0 ---- VIESTE
+16270 4113   1675   49 57 0 ---- BARI/PALESE
+16271 4112   1688   12 10 0 ---- BARI
+16280 4090   1295   185 184 0 ---- PONZA
+16288 4107   1432   63 61 0 ---- CASERTA
+16289 4088   1428   72 90 0 ---- NAPOLI/CAPODICHINO
+16292 4062   1490   40 38 0 ---- PONTECAGNANO
+16294 4055   1420   161 160 0 ---- CAPRI
+16310 4002   1527   185 184 0 ---- CAPO PALINURO
+16312 4075   1693   351 345 0 ---- GIOIA DEL COLLE
+16314 4067   1665   498 496 0 ---- MATERA
+16316 4008   1600   896 888 9 ---- LATRONICO
+16317 4008   1600   897 895 2 ---- LATRONICO
+16318 4063   1720   415 413 0 ---- MARTINA FRANCA
+16320 4065   1795   10 14 0 ---- BRINDISI
+16320 4065   1795   4 3 0 TTTT BRINDISI RDS
+16324 4052   1738   69 66 0 ---- GROTTAGLIE
+16325 4042   1688   11 1 0 ---- MARINA DI GINOSA
+16332 4023   1813   53 48 0 ---- LECCE
+16333 4023   1813   49 47 0 ---- LECCE
+16334 4010   1850   81 79 0 ---- OTRANTO
+16336 3958   1588   486 484 0 ---- BONIFATI
+16337 3958   1588   485 484 0 ---- BONIFATI
+16342 3938   1715   5 3 0 ---- PUNTA ALICE
+16344 3932   1638   1677 1669 2 ---- MONTE SCURO
+16345 3932   1638   1679 1669 2 ---- MONTE SCURO
+16350 3898   1707   161 159 0 ---- CROTONE
+16351 3898   1707   156 154 0 ---- CROTONE
+16360 3980   1833   112 104 0 ---- S. MARIA DI LEUCA
+16362 3890   1623   16 12 0 ---- LAMEZIA TERME
+16364 3875   1637   998 996 2 ---- SERRALTA DI S. VITO
+16365 3890   1658   334 332 0 ---- CATANZARO
+16400 3870   1317   243 242 0 ---- USTICA
+16401 3870   1317   244 242 0 ---- USTICA
+16405 3817   1308   34 20 0 ---- PALERMO PUNTA RAISI
+16409 3810   1330   122 120 0 ---- PALERMO BOCCADIFALCO
+16415 3857   1487   47 45 0 ---- ISOLA SALINA
+16416 3880   1523   77 75 0 ---- ISOLA STROMBOLI
+16420 3818   1553   54 50 0 ---- MESSINA
+16422 3807   1565   21 29 0 ---- REGGIO CALABRIA
+16429 3790   1248   9 7 0 ---- TRAPANI BIRGI
+16429 3790   1248   9 7 0 TTTT TRAPANI BIRGI RDS
+16434 3772   1342   1035 1034 2 ---- PRIZZI
+16435 3772   1342   1036 1034 2 ---- PRIZZI
+16436 3750   1312   126 124 0 ---- SCIACCA
+16442 3798   1402   999 997 2 ---- GIBILMANNA
+16450 3757   1427   1003 1000 2 ---- ENNA
+16453 3707   1422   65 58 0 ---- GELA
+16454 3707   1422   65 79 0 ---- GELA
+16459 3740   1492   29 24 0 ---- CATANIA SIGONELLA
+16460 3747   1505   17 12 0 ---- CATANIA FONTANAROSSA
+16464 3705   1527   3 1 0 ---- SIRACUSA
+16465 3695   1495   640 638 2 ---- MEZZO GREGORIO
+16469 3792   1605   119 117 0 ---- CAPO SPARTIVENTO
+16470 3680   1197   198 191 0 ---- PANTELLERIA
+16471 3680   1195   186 184 0 ---- PANTELLERIA
+16480 3668   1512   51 46 0 ---- COZZO SPADARO
+16490 3548   1262   20 21 0 ---- LAMPEDUSA
+16491 3550   1262   51 49 0 ---- LAMPEDUSA
+16504 4083   840    8 6 0 ---- PORTO TORRES
+16520 4062   828    40 27 0 ---- ALGHERO
+16522 4055   815    204 200 0 ---- CAPO CACCIA
+16523 4057   815    205 203 0 ---- CAPO CACCIA
+16524 4025   873    587 585 2 ---- MACOMER SA' CRABARZA
+16531 4088   952    13 11 0 ---- OLBIA COSTA SMERALDA
+16532 4085   917    1364 1362 2 ---- MONTE LIMBARA
+16539 3973   845    95 89 0 ---- CAPO FRASCA
+16541 3967   943    606 608 9 ---- PERDASDEFOGU
+16542 3948   962    5 4 0 ---- CAPO S. LORENZO
+16543 3948   962    5 2 0 ---- CAPO S. LORENZO
+16545 3967   943    610 608 2 ---- PERDASDEFOGU
+16546 3933   897    24 29 0 ---- DECIMOMANNU
+16546 3933   897    24 29 0 TTTT DECIMOMANNU RDS
+16549 3913   830    13 11 0 ---- CARLOFORTE
+16550 3992   970    150 138 0 ---- CAPO BELLAVISTA
+16560 3923   905    5 4 0 ---- CAGLIARI ELMAS
+16564 3910   950    118 116 0 ---- CAPO CARBONARA
+16565 3910   950    119 117 0 ---- CAPO CARBONARA
+16570 3898   865    52 50 0 ---- TEULADA
+40250 3250   3820   683 0 0 ---- H-4 RWASHED
+40253 3263   3562   -170 0 0 ---- BAQURA
+40255 3255   3585   616 0 0 ---- IRBED
+40256 3240   3558   -200 0 0 ---- WADI RAYAN
+40257 3237   3575   1150 0 0 ---- RAS MUNEEF
+40260 3220   3713   674 674 0 ---- H-5 'SAFAWI'
+40265 3237   3625   683 683 0 T--- MAFRAQ
+40267 3215   3628   580 0 0 ---- WADI DHULAIL
+40268 3203   3573   915 0 0 ---- SALT
+40270 3198   3598   779 778 0 ---- AMMAN AIRPORT
+40272 3172   3598   722 720 0 ---- QUEEN ALIA AIRPORT
+40275 3125   3612   768 0 0 ---- QATRANEH
+40280 3187   3550   -275 -276 0 ---- JERICHO
+40285 3222   3562   -224 0 0 ---- DEIR ALLA
+40288 3183   3682   527 527 0 ---- AZRAQ SOUTH
+40290 3187   3522   759 749 0 -P-- JERUSALEM AIRPORT
+40292 3127   3575   920 0 0 ---- ER RABBAH
+40296 3103   3547   -350 0 0 ---- GHOR SAFI
+40298 3078   3572   1200 0 0 ---- TAFILEH
+40300 3052   3553   1365 0 0 ---- SHOUBAK
+40305 3028   3615   853 861 0 ---- JAFER
+40310 3017   3578   1069 0 0 ---- MA'AN
+40340 2955   3500   51 53 0 ---- AQABA AIRPORT
+34398 4967   4948   10 0 0 ---- ZHALPAKTAL
+34691 4790   4880   -10 0 0 ---- NOVYJ USHTOGAN
+34798 4660   4927   -23 0 0 ---- GANJUSHKINO
+26229 5787   2435   7 6 0 ---- AINAZI
+26238 5788   2537   68 67 0 ---- RUIJENA
+26313 5773   2258   5 4 0 ---- KOLKA
+26314 5738   2153   3 1 0 ---- VENTSPILS
+26318 5718   2255   81 79 0 ---- STENDE
+26324 5733   2310   5 4 0 ---- MERSRAGS
+26326 5730   2440   8 7 0 ---- SKULTE
+26335 5730   2533   123 121 0 ---- PRIEKULI
+26339 5713   2590   188 187 0 ---- ZOSENI
+26346 5743   2703   197 196 0 ---- ALUKSNE
+26348 5712   2672   142 141 0 ---- GULBENE
+26403 5688   2118   9 8 0 ---- PAVILOSTA
+26406 5647   2102   4 3 0 ---- LIEPAJA
+26416 5667   2250   113 112 0 ---- SALDUS
+26422 5692   2397   8 10 0 ---- RIGA
+26424 5662   2332   43 41 0 ---- DOBELE
+26425 5667   2373   5 4 0 ---- JELGAVA
+26429 5640   2417   31 30 0 ---- BAUSKA
+26435 5663   2512   80 79 0 T--- SKRIVERI
+26436 5652   2592   108 106 0 ---- ZILANI
+26446 5653   2727   158 157 0 ---- REZEKNE
+26447 5683   2623   132 132 0 ---- MADONA
+26503 5615   2117   18 19 0 ---- RUCAVA
+26544 5593   2665   125 123 0 ---- DAUGAVPILS
+40100 3382   3548   19 29 0 T-T- BEYROUTH (AEROPORT)
+40101 3382   3585   920 0 0 ---- HOUCHE-AL-OUMARA
+40102 3387   3600   920 927 2 ---- RAYACK
+40103 3445   3580   5 0 0 ---- TRIPOLI
+40104 3337   3558   773 0 0 ---- MERDJAYOUN
+40105 3425   3605   1916 0 2 ---- AL-ARZ (LES CEDRES)
+40110 3382   3577   1524 0 2 ---- DAHR BAIDAR
+26502 5597   2108   15 10 0 ---- PALANGA
+26509 5572   2108   7 6 0 ---- KLAIPEDA
+26515 5598   2225   151 153 0 ---- TELSIAI
+26518 5560   2223   165 165 0 ---- LAUKUVA
+26524 5593   2332   107 105 0 ---- SIAULIAI
+26529 5573   2442   58 57 0 ---- PANEVEZYS
+26531 5618   2477   61 60 0 ---- BIRZAI
+26547 5552   2630   167 164 0 ---- DUKSTAS
+26600 5535   2143   5 2 0 ---- SILUTE
+26603 5530   2100   2 2 0 ---- NIDA
+26620 5538   2385   77 69 0 ---- DOTNUVA
+26621 5538   2312   110 110 0 ---- RASEINIAI
+26629 5488   2383   76 76 0 ---- KAUNAS
+26629 5488   2383   76 76 0 T--- KAUNAS
+26633 5550   2558   105 104 0 ---- UTENA
+26634 5525   2475   73 72 0 ---- UKMERGE
+26713 5463   2278   59 57 0 ---- KYBARTAI
+26728 5422   2350   133 133 0 ---- LAZDIJAI
+26730 5462   2510   155 162 0 ---- VILNIUS
+26732 5463   2528   196 211 0 ---- VILNIUS
+26737 5423   2455   110 109 0 ---- VARENA
+06585 5005   602    454 0 0 ---- CLERVAUX
+06589 4965   613    235 0 0 ---- LUXEMBOURG (BEGGEN)
+06590 4962   622    376 376 0 ---- LUXEMBOURG/LUXEMBOURG
+06597 4980   645    244 0 0 ---- ECHTERNACH
+16597 3585   1448   0 91 0 ---- LUQA
+16599 3585   1450   0 78 0 ---- GUDJA
+13361 4315   1913   1450 1450 2 ---- ZABLJAK
+13363 4335   1935   788 784 2 ---- PLJEVLJA
+13455 4245   1855   10 10 0 ---- HERCEG NOVI-IGALO
+13457 4240   1873   5 5 0 ---- TIVAT
+13459 4277   1895   647 647 0 ---- NIKSIC
+13461 4210   1908   6 4 0 ---- BAR
+13462 4237   1925   33 33 0 ---- PODGORICA-GOLUBOVCI
+13463 4243   1928   50 49 0 ---- PODGORICA-GRAD
+13464 4192   1922   29 24 0 ---- ULCINJ
+13465 4283   1953   945 944 2 ---- KOLASIN
+06201 5432   293    35 42 0 ---- D15-FA-1
+06203 5235   333    23 41 0 ---- P11-B
+06204 5327   362    27 41 0 ---- K14-FA-1C
+06205 5538   380    33 48 0 ---- A12-CPP
+06206 5412   400    27 43 0 ---- F16-A
+06207 5360   495    29 44 0 ---- L9-FF-1
+06208 5348   593    26 40 0 ---- AWG-1
+06209 5245   452    0 0 0 ---- IJMOND WP
+06210 5217   442    1 0 0 ---- VALKENBURG AWS
+06211 5382   293    34 45 0 ---- J6-A
+06212 5292   415    40 50 0 ---- HOORN-A
+06225 5245   455    0 4 0 ---- IJMUIDEN WP
+06229 5298   472    0 1 0 ---- TEXELHORS WP
+06235 5292   477    1 1 0 -T-- DE KOOIJ VK
+06239 5485   468    24 50 0 ---- F3-FB-1
+06240 5230   478    -2 -3 0 ---- AMSTERDAM AP SCHIPHOL
+06242 5323   492    10 10 0 ---- VLIELAND
+06248 5262   517    0 0 0 ---- WIJDENES WP
+06249 5263   497    0 -2 0 ---- BERKHOUT AWS
+06251 5338   533    2 0 0 ---- TERSCHELLING HOORN AWS
+06252 5322   322    31 37 0 ---- K13-A
+06257 5250   460    0 8 0 ---- WIJK AAN ZEE AWS
+06258 5263   540    0 7 0 ---- HOUTRIBDIJK WP
+06260 5208   517    3 1 0 T-T- DE BILT AWS
+06267 5288   538    0 -1 0 ---- STAVOREN AWS
+06269 5245   552    -3 -3 0 ---- LELYSTAD AP
+06270 5322   575    1 1 0 ---- LEEUWARDEN
+06273 5270   588    0 -3 0 ---- MARKNESSE AWS
+06275 5205   587    46 48 0 ---- DEELEN
+06277 5340   618    0 2 0 ---- LAUWERSOOG AWS
+06278 5243   625    0 3 0 ---- HEINO AWS
+06279 5273   657    17 15 0 ---- HOOGEVEEN AWS
+06280 5312   658    4 5 0 ---- GRONINGEN AP EELDE
+06283 5207   665    0 29 0 ---- HUPSEL AWS
+06285 5357   638    0 0 0 ---- HUIBERTGAT WP
+06286 5318   713    0 0 0 ---- NIEUW BEERTA AWS
+06290 5227   688    34 34 0 ---- TWENTE AWS
+06308 5137   337    0 0 0 ---- CADZAND WP
+06310 5143   358    9 8 0 ---- VLISSINGEN AWS
+06311 5137   367    0 0 0 ---- HOOFDPLAAT
+06312 5177   362    0 0 0 ---- OOSTERSCHELDE WP
+06313 5150   323    0 0 0 ---- VLAKTE VAN RAAN
+06315 5143   398    0 0 0 ---- HANSWEERT
+06316 5165   368    0 0 0 ---- OOSTERSCHELDE 4
+06319 5122   385    3 1 0 ---- WESTDORPE AWS
+06320 5192   367    19 23 0 ---- LICHTEILAND GOEREE
+06321 5198   327    17 19 0 ---- EURO PLATFORM
+06323 5152   388    3 1 0 ---- WILHELMINADORP AWS
+06324 5158   400    0 0 0 ---- STAVENISSE
+06330 5198   412    12 11 0 ---- HOEK VAN HOLLAND AWS
+06331 5147   418    0 0 0 ---- MAROLLEGAT
+06340 5143   433    16 19 0 ---- WOENSDRECHT
+06343 5188   430    0 3 0 ---- ROTTERDAM GEULHAVEN
+06344 5195   443    -4 -4 0 ---- ROTTERDAM THE HAGUE AP
+06348 5197   492    0 0 0 ---- CABAUW TOWER AWS
+06350 5155   493    13 14 0 ---- GILZE RIJEN
+06356 5185   513    2 0 0 ---- HERWIJNEN AWS
+06370 5143   537    22 22 0 ---- EINDHOVEN AP
+06375 5165   570    21 21 0 ---- VOLKEL
+06377 5118   575    0 30 0 ---- ELL AWS
+06380 5090   575    113 114 0 ---- MAASTRICHT AACHEN AP
+06391 5148   618    0 19 0 ---- ARCEN AWS
+01001 7092   -867   9 10 0 ---- JAN MAYEN
+01001 7093   -867   0 9 0 T-T- JAN MAYEN
+01002 8005   1625   8 8 0 ---- VERLEGENHUKEN
+01003 7700   1550   11 10 0 ---- HORNSUND
+01004 7892   1192   0 8 0 --T- NY-ALESUND II
+01006 7825   2282   14 14 0 ---- EDGEOYA
+01007 7892   1192   7 8 0 ---- NY-ALESUND
+01008 7825   1547   26 28 0 ---- SVALBARD AP
+01009 8065   2500   0 5 0 ---- KARL XII OYA
+01010 6930   1612   13 10 0 ---- ANDOYA
+01011 8007   3150   0 10 0 ---- KVITOYA
+01015 6960   1783   0 14 0 ---- HEKKINGEN LH
+01016 7892   2888   0 20 0 ---- KONGSOYA
+01017 7768   1478   6 6 0 ---- AKSELOYA
+01020 7647   1653   0 10 0 ---- SORKAPPOYA
+01023 6905   1853   76 76 0 ---- BARDUFOSS
+01025 6967   1890   8 8 0 ---- TROMSO/LANGNES
+01026 6965   1893   114 100 0 ---- TROMSO
+01027 6965   1890   20 10 0 ---- TROMSO-HOLT
+01028 7452   1900   0 18 0 ---- BJORNOYA
+01028 7450   1900   0 20 0 T-T- BJORNOYA
+01033 7023   1950   24 21 0 ---- TORSVAG LH
+01035 6955   2008   0 710 0 ---- LYNGEN GJERDVASSBU
+01037 6938   2025   4 5 0 ---- SKIBOTN 2
+01043 7040   2282   0 10 0 ---- ROGNSUNDET
+01044 7048   2213   6 6 0 ---- HASVIK AP
+01045 6983   2188   0 6 0 ---- NORDSTRAUM I KVAENANGEN
+01046 6978   2095   4 6 0 ---- SORKJOSEN
+01047 6898   2303   307 307 0 ---- KAUTOKEINO
+01049 6997   2335   2 3 0 ---- ALTA LUFTHAVN
+01052 7067   2367   79 81 0 ---- HAMMERFEST AP
+01055 7108   2397   14 13 0 ---- FRUHOLMEN LH
+01057 6937   2442   0 286 0 ---- CUOVDDATMOHKKI
+01058 6957   2353   381 381 0 ---- SUOLOVUOPMI LULIT
+01059 7005   2498   7 5 0 ---- BANAK
+01062 7650   2500   10 6 0 ---- HOPEN
+01065 6945   2550   130 131 0 ---- KARASJOK
+01068 7100   2597   13 14 0 ---- HONNINGSVAG AP
+01074 7102   2782   13 11 0 ---- MEHAMN AP
+01075 7038   2818   11 10 0 ---- RUSTEFJELBMA
+01078 7108   2822   8 8 0 ---- SLETTNES LH
+01083 7087   2903   13 12 0 ---- BERLEVAG AP
+01084 6945   3003   27 0 0 ---- PASVIK
+01086 7060   2970   152 149 0 ---- BATSFJORD AP
+01088 7005   2983   39 38 0 ---- VADSO AP
+01089 6972   2988   86 89 0 ---- KIRKENES
+01092 7070   3007   0 9 0 ---- MAKKAUR LH
+01098 7037   3108   14 14 0 ---- VARDO
+01099 7035   3103   12 12 0 ---- VARDO AP
+01102 6520   1098   15 23 0 ---- SKLINNA LH
+01105 6837   1593   0 8 0 ---- ROTVAER
+01107 6752   1210   2 4 0 ---- ROST AP
+01108 6570   1185   9 4 0 ---- VEGA-VALLSJO
+01112 6545   1222   9 7 0 ---- BRONNOYSUND AP
+01114 6690   1363   8 9 0 ---- REIPA
+01115 6675   1248   16 17 0 ---- MYKEN
+01116 6595   1247   17 17 0 ---- SANDNESSJOEN AP
+01117 6582   1242   21 0 0 ---- TJOTTA
+01121 6637   1260   10 10 0 ---- SOLVAER III
+01122 6578   1322   72 72 0 ---- MOSJOEN AP
+01132 6515   1337   319 319 0 ---- MAJAVATN V
+01133 6562   1328   0 50 0 ---- LAKSFORS
+01135 6612   1358   123 126 0 ---- SELJELIA
+01139 6765   1272   4 3 0 ---- VAEROY HELIPORT
+01143 6803   1608   0 19 0 ---- DRAG-AJLUOKTA
+01144 6740   1388   0 24 0 ---- HELLIGVAER II
+01146 6623   1388   0 5 0 ---- SKAMDAL
+01147 6582   1418   0 406 0 ---- VARNTRESK
+01148 6638   1452   0 110 0 ---- STORFORSHEI
+01150 6648   1495   0 251 0 ---- HJARTASEN
+01151 6635   1430   70 69 0 ---- MO I RANA AP
+01152 6727   1435   12 11 0 ---- BODO VI
+01152 6728   1445   0 31 0 T-T- BODO
+01153 6728   1445   33 0 0 ---- BODO-VAGONES
+01156 6860   1442   7 7 0 ---- BO I VESTERALEN
+01158 6715   1548   7 7 0 ---- SETSA
+01160 6815   1465   11 11 0 ---- SKROVA LH
+01161 6823   1467   9 8 0 ---- SVOLVAER AP
+01162 6857   1502   3 3 0 ---- STOKMARKNES AP
+01167 6870   1542   3 3 0 ---- SORTLAND
+01169 6693   1530   37 37 0 ---- SALTDAL-NORDNES
+01180 6880   1653   46 45 0 ---- HARSTAD
+01183 6848   1668   26 25 0 ---- EVENES AP
+01192 6842   1765   0 200 0 ---- STRAUMSNES
+01193 6843   1738   31 28 0 ---- NARVIK AP
+01198 6877   1970   203 204 0 ---- DIVIDALEN II
+01199 6875   2353   383 382 0 ---- SIHCCAJAVRI
+01203 6203   498    39 75 0 ---- KRAKENES
+01205 6232   527    37 38 0 ---- SVINOY LH
+01207 6210   557    0 41 0 ---- FISKABYGD
+01209 6217   607    74 74 0 ---- ORSTA-VOLDA AP
+01210 6255   610    21 22 0 ---- ALESUND/VIGRA
+01212 6285   653    14 13 0 ---- ONA II
+01214 6265   675    0 43 0 ---- REKDAL
+01217 6273   725    3 3 0 ---- MOLDE AP
+01218 6222   742    17 11 0 ---- TAFJORD
+01220 6245   777    1294 0 0 ---- MANNEN
+01221 6305   907    0 450 0 ---- TAGDALEN
+01223 6310   780    62 62 0 ---- KRISTIANSUND AP
+01224 6247   620    0 15 0 ---- AALESUND
+01225 6352   793    5 5 0 ---- VEIHOLMEN
+01228 6383   847    5 5 0 ---- SULA
+01230 6225   818    0 579 0 ---- BJORLI
+01232 6243   783    64 67 0 ---- MARSTEIN
+01233 6207   910    0 638 0 ---- DOMBAAS
+01234 6330   983    0 4 0 ---- ORKDAL-THAMSHAMN
+01237 6352   910    13 13 0 ---- HITRA
+01238 6210   928    974 973 0 ---- FOKSTUGU
+01239 6222   953    0 1012 0 ---- HJERKINN II
+01240 6417   940    15 16 0 ---- HALTEN LH
+01241 6370   960    8 10 0 ---- ORLAND III
+01241 6370   960    0 10 0 T-T- ORLAND III
+01242 6395   1020   0 20 0 ---- AFJORD II
+01245 6260   967    598 604 0 ---- OPPDAL-SETER
+01250 6212   998    694 0 0 ---- FOLLDAL-FREDHEIM
+01253 6295   1017   0 299 0 ---- SOKNEDAL
+01254 6297   1055   0 127 0 ---- KOTSOY
+01257 6340   1045   131 127 0 ---- TRONDHEIM/VOLL
+01259 6440   1045   18 18 0 ---- BUHOLMRASA LH
+01262 6478   1053   0 33 0 ---- NORDOYAN LH
+01265 6227   1072   482 482 0 ---- TYNSET-HANSMOEN
+01270 6348   1087   40 0 0 ---- KVITHAMAR
+01271 6345   1093   17 12 0 ---- TRONDHEIM/VERNES
+01272 6355   1068   70 0 0 ---- FROSTA
+01273 6322   1100   161 160 0 ---- SELBU
+01277 6402   1145   0 6 0 ---- STEINKJER
+01278 6377   1167   83 81 0 ---- VERDAL-REPPE
+01281 6473   1283   0 140 0 ---- NAMSSKOGAN
+01282 6483   1113   4 4 0 ---- RORVIK AP
+01287 6267   1182   0 760 0 ---- SOLENDET
+01288 6257   1135   626 625 0 ---- ROROS AP
+01290 6447   1157   2 2 0 ---- NAMSOS AP
+01291 6452   1238   0 95 0 ---- GARTLAND
+01293 6340   1172   169 169 0 ---- MERAKER-EGGE
+01298 6443   1372   0 433 0 ---- NORDLI-HOLAND
+01300 6120   227    80 80 0 ---- GULLFAKS C
+01304 6157   467    25 26 0 ---- YTTEROYANE LH
+01307 6077   472    18 19 0 ---- FEDJE
+01308 6128   503    7 0 0 ---- FURUNESET
+01310 6157   502    9 11 0 ---- FLORO AP
+01311 6028   522    50 48 0 ---- BERGEN/FLESLAND
+01314 6052   572    0 10 0 ---- FOSSMARK
+01315 6063   610    0 17 0 ---- EVANGER
+01317 6037   533    12 12 0 ---- BERGEN/FLORIDA
+01318 6178   618    0 51 0 ---- SANDANE
+01319 6102   537    0 38 0 ---- TAKLE
+01320 6182   610    60 59 0 ---- SANDANE AP
+01321 6190   655    208 208 0 ---- STRYN
+01322 6145   592    0 64 0 ---- FORDE-TEFRE
+01323 6138   575    321 318 0 ---- FORDE AP
+01326 6085   597    0 125 0 ---- MODALEN III
+01327 6038   595    0 455 0 ---- KVAMSKOGEN-JONSHOGDI
+01329 6035   627    49 49 0 ---- KVAMSOY
+01332 6142   675    0 3 0 ---- FJAERLAND-BREMUSEET
+01337 6062   642    55 54 0 ---- VOSSEVANGEN
+01338 6117   663    54 49 0 ---- VANGSNES
+01340 6040   727    735 735 0 ---- FET I EIDFJORD
+01342 6032   665    12 0 0 ---- ULLENSVANG
+01344 6070   693    0 695 0 ---- MJOLFJELL
+01346 6065   727    0 1162 0 ---- MIDTSTOVA
+01347 6115   713    497 498 0 ---- SOGNDAL AP
+01350 6058   752    1209 1210 0 ---- FINSEVATN
+01352 6018   747    0 1250 0 ---- SANDHAUG
+01355 6110   750    4 2 0 ---- LAERDAL IV
+01358 6085   858    604 0 0 ---- HEMSEDAL II
+01359 6052   818    773 772 0 ---- GEILO-OLDEBRATEN
+01360 6188   788    0 664 0 ---- BRATA-SLETTOM
+01361 6200   765    871 872 0 ---- GROTLI III
+01362 6167   837    1894 0 0 ---- JUVVASSHOE
+01364 6117   810    955 956 0 ---- FILEFJELL
+01365 6125   892    0 965 0 ---- BEITOSTOLEN II
+01366 6155   798    1413 1413 0 ---- SOGNEFJELL
+01367 6098   923    365 365 0 ---- FAGERNES
+01368 6100   928    822 822 0 ---- FAGERNES AP
+01369 6092   928    0 639 0 ---- ABJORSBRATEN
+01370 6152   940    0 928 0 ---- SKABU
+01371 6112   905    521 0 0 ---- LOKEN I VOLBU
+01373 6057   913    167 166 0 ---- NESBYEN-TODOKK
+01374 6093   1003   0 542 0 ---- VEST-TORPA II
+01375 6145   1012   0 1030 0 ---- KVITFJELL
+01376 6037   960    0 142 0 ---- GULSVIK II
+01378 6108   1047   242 240 0 ---- LILLEHAMMER-SAETHERENGEN
+01380 6165   1010   0 930 0 ---- VENABU
+01381 6070   1087   264 0 0 ---- APELSVOLL
+01382 6077   1080   128 0 0 ---- KISE
+01383 6142   1107   257 257 0 ---- EVENSTAD-DIH
+01384 6020   1107   207 202 0 ---- OSLO/GARDERMOEN
+01385 6082   1107   222 221 0 ---- HAMAR
+01386 6080   1108   0 132 0 ---- HAMAR II
+01387 6145   1018   200 0 0 ---- FAVANG
+01389 6118   1137   255 255 0 ---- RENA AP
+01392 6060   1200   184 185 0 ---- FLISA II
+01393 6188   1203   673 672 0 ---- DREVSJO
+01397 6128   1227   361 360 0 ---- TRYSIL VEGSTASJON
+01400 5650   320    48 50 0 ---- EKOFISK
+01400 5653   320    0 52 0 T-T- EKOFISK
+01403 5930   487    56 55 0 ---- UTSIRA LH
+01406 5990   507    16 25 0 ---- SLATTEROY LH
+01408 5933   518    24 26 0 ---- HAUGESUND AP
+01411 5907   540    22 21 0 ---- KVITSOY - NORDBO
+01412 5865   555    25 24 0 ---- OBRESTAD
+01413 5875   565    87 0 0 ---- SAERHEIM
+01414 5943   507    0 25 0 ---- ROVER
+01415 5888   563    8 7 0 ---- STAVANGER/SOLA
+01415 5887   565    0 37 0 T-T- STAVANGER/SOLA
+01416 5895   572    0 72 0 ---- STAVANGER VAALAND
+01417 5948   575    64 64 0 ---- NEDRE VATS
+01418 6002   520    0 32 0 ---- AUSTEVOLL
+01419 5905   612    0 300 0 ---- LIARVATN
+01422 5915   603    0 30 0 ---- FISTER_SIGMUNDSTAD
+01424 5963   635    2 5 0 ---- SAUDA
+01425 5850   650    66 65 0 ---- EIK HOVE
+01426 5843   587    0 49 0 ---- EIGEROYA
+01427 5810   657    13 14 0 ---- LISTA LH
+01430 5802   745    0 10 0 ---- MANDAL III
+01431 5892   690    555 560 0 ---- SIRDAL-SINNES
+01433 5983   698    1081 1079 0 ---- MIDTLAEGER
+01434 5975   735    822 821 0 ---- VAAGSLI
+01436 5797   703    0 13 0 ---- LINDESNES LH
+01439 5827   737    0 263 0 ---- KONSMO-HOYLAND
+01440 5933   687    0 1050 0 ---- BLASJO
+01441 5958   740    836 841 0 ---- HOVDEN-LUNDANE
+01442 5867   780    211 212 0 ---- BYGLANDSFJORD
+01444 5920   752    0 302 0 ---- VALLE
+01447 5948   818    561 560 0 ---- HOYDALSMO II
+01448 5807   805    8 9 0 ---- OKSOY LH
+01449 5887   902    0 32 0 ---- GJERSTAD
+01450 5983   817    0 977 0 ---- MOSSTRAND II
+01452 5820   807    17 12 0 ---- KRISTIANSAND/KJEVIK
+01453 5860   840    0 162 0 ---- HYNNEKLEIV
+01455 5902   852    254 252 0 ---- TVEITSUND
+01459 5865   862    0 142 0 ---- NELAUG
+01463 5965   1077   89 0 0 ---- AS
+01464 5833   852    6 0 0 ---- LANDVIK
+01465 5838   878    15 12 0 ---- TORUNGEN LH
+01466 5997   1103   109 108 0 ---- KJELLER AP
+01467 5863   915    4 4 0 ---- LYNGOR LH
+01468 6018   1200   0 148 0 ---- KONGSVINGER
+01469 6015   1023   141 140 0 ---- HONEFOSS-HOYBY
+01470 5937   920    93 93 0 ---- GVARV
+01471 6003   913    0 275 0 ---- VEGGLI II
+01473 5962   963    0 172 0 ---- KONGSBERG BRANNSTASJON
+01476 5885   957    5 5 0 ---- JOMFRULAND LH
+01477 5970   1013   0 193 0 ---- KONNERUD
+01478 5897   1013   0 15 0 ---- SVENNER LH
+01480 5975   1012   0 8 0 ---- DRAMMEN BERSKOG
+01481 5922   1033   0 26 0 ---- MELSOM
+01482 5902   1052   7 6 0 ---- FERDER LH
+01483 5918   1025   87 88 0 ---- TORP
+01484 5990   1157   127 128 0 ---- AURSKOG
+01485 5962   1020   60 0 0 ---- SANDE-GALLEBERG
+01486 5985   1043   0 163 0 ---- ASKER
+01487 5992   1083   0 90 0 ---- ALNA
+01488 6012   1082   0 170 0 ---- HAKADAL
+01489 6005   1068   360 0 0 ---- BJORNHOLT
+01490 5998   1067   0 514 0 ---- TRYVANNSHOGDA
+01492 5993   1072   96 94 0 ---- OSLO-BLINDERN
+01492 5995   1072   97 0 0 ---- OSLO-BLINDERN
+01493 5928   1110   0 57 0 ---- SARPSBORG
+01494 5937   1078   53 40 0 ---- RYGGE
+01495 5915   1082   10 10 0 ---- STROMTANGEN LH
+40215 3232   3502   0 0 0 ---- TULKARM
+40223 3222   3525   0 0 0 ---- NABLUS
+40224 3235   3527   0 0 0 ---- MEITHLOUN
+40226 3247   3530   0 0 0 ---- JENIN
+40230 3123   3427   0 0 0 ---- GAZA INTERNATIONAL AIRPORT
+40233 3150   3445   0 0 0 ---- GAZA
+40240 3153   3510   0 0 0 ---- HEBRON
+40242 3193   3522   0 0 0 ---- AL-ARROUB
+12001 5547   1817   46 46 0 ---- PETROBALTIC BETA
+12100 5417   1557   5 3 0 ---- KOLOBRZEG
+12105 5420   1615   34 33 0 ---- KOSZALIN
+12115 5458   1685   10 3 0 ---- USTKA
+12120 5475   1753   5 1 0 T-T- LEBA
+12125 5455   1775   40 38 0 ---- LEBORK
+12135 5460   1880   2 1 0 ---- HEL
+12140 5438   1868   7 2 0 ---- GDANSK PORT PN.
+12145 5452   1855   21 2 0 ---- GDYNIA
+12150 5437   1847   138 135 0 ---- GDANSK-REBIECHOWO
+12160 5415   1942   42 39 0 ---- ELBLAG
+12185 5407   2137   109 106 0 ---- KETRZYN
+12195 5412   2293   185 184 0 ---- SUWALKI
+12200 5392   1423   5 4 0 ---- SWINOUJSCIE
+12205 5338   1462   6 1 0 ---- SZCZECIN
+12206 5358   1488   37 46 0 ---- GOLENIOW
+12210 5377   1540   55 50 0 ---- RESKO
+12215 5370   1673   142 139 0 ---- SZCZECINEK
+12230 5312   1673   73 72 0 ---- PILA
+12235 5370   1752   171 165 0 ---- CHOJNICE
+12240 5308   1798   72 71 0 ---- BYDGOSZCZ
+12250 5303   1858   72 68 0 ---- TORUN
+12270 5310   2035   148 147 0 ---- MLAWA
+12272 5377   2042   136 133 0 ---- OLSZTYN
+12280 5378   2158   128 127 0 ---- MIKOLAJKI
+12285 5307   2153   94 94 0 ---- OSTROLEKA
+12295 5310   2317   150 148 0 ---- BIALYSTOK
+12300 5273   1527   72 71 0 ---- GORZOW WLKP
+12310 5233   1458   24 20 0 ---- SLUBICE
+12312 5213   1578   63 57 0 ---- ZIELONA GORA-BABIMOST
+12330 5242   1683   88 88 0 ---- POZNAN
+12345 5220   1865   117 115 0 ---- KOLO
+12360 5258   1972   108 105 0 ---- PLOCK
+12372 5227   2095   99 99 0 ---- WARSZAWA BIELANY
+12374 5240   2095   96 94 0 T-T- LEGIONOWO
+12375 5215   2095   106 106 0 ---- WARSZAWA-OKECIE
+12385 5217   2223   154 151 0 ---- SIEDLCE
+12399 5207   2362   137 133 0 ---- TERESPOL
+12400 5192   1552   192 191 0 ---- ZIELONA GORA
+12415 5118   1620   123 122 0 ---- LEGNICA
+12418 5183   1653   93 90 0 ---- LESZNO
+12424 5110   1690   120 120 0 ---- WROCLAW II
+12425 5110   1687   0 119 0 T-T- WROCLAW I
+12435 5177   1807   138 137 0 ---- KALISZ
+12455 5120   1855   200 199 0 ---- WIELUN
+12465 5172   1938   190 179 0 ---- LODZ
+12469 5135   1985   189 188 0 ---- SULEJOW
+12471 5183   2078   0 180 0 ---- BELSK
+12488 5155   2153   126 123 0 ---- KOZIENICE
+12491 5140   2195   142 141 0 ---- PULAWY
+12495 5122   2238   239 237 0 ---- LUBLIN RADAWIEC
+12497 5155   2352   179 176 0 ---- WLODAWA
+12500 5090   1578   343 342 0 ---- JELENIA GORA
+12510 5073   1573   1613 1603 2 ---- SNIEZKA
+12520 5043   1660   356 356 0 ---- KLODZKO
+12530 5062   1797   162 162 0 ---- OPOLE
+12540 5005   1818   205 205 0 ---- RACIBORZ
+12550 5080   1908   295 293 0 ---- CZESTOCHOWA
+12555 5047   1907   304 299 0 ---- KATOWICE-PYRZOWICE
+12560 5023   1902   280 278 0 ---- KATOWICE
+12566 5007   1980   241 236 0 ---- KRAKOW-BALICE
+12570 5080   2068   261 260 0 ---- KIELCE-SUKOW
+12575 5002   2098   209 209 0 ---- TARNOW
+12580 5010   2202   212 211 0 ---- RZESZOW-JASIONKA
+12585 5068   2170   218 216 0 ---- SANDOMIERZ
+12595 5068   2320   213 222 0 ---- ZAMOSC
+12600 4980   1900   399 395 0 ---- BIELSKO-BIALA
+12625 4928   1995   857 854 9 ---- ZAKOPANE
+12650 4922   1997   1988 1990 2 ---- KASPROWY WIERCH
+12660 4962   2068   295 291 0 ---- NOWY SACZ
+12670 4970   2177   331 329 0 ---- KROSNO
+12690 4945   2233   422 420 0 ---- LESKO
+12695 4980   2277   280 279 0 ---- PRZEMYSL
+08501 3945   -3113  29 28 0 ---- FLORES (ACORES)
+08502 3967   -3112  26 18 0 ---- CORVO (ACORES)
+08505 3852   -2872  41 40 0 ---- HORTA/CASTELO BRANCO (ACORES)
+08506 3852   -2863  62 60 0 ---- HORTA (ACORES)
+08507 3910   -2803  28 26 0 TTTT GRACIOSA/AERODROME
+08508 3877   -2708  72 73 0 T-T- LAJES (ACORES)
+08509 3877   -2710  54 52 0 ---- LAJES (ACORES)
+08511 3867   -2722  76 74 0 ---- ANGRA DO HEROISMO (ACORES)
+08512 3773   -2570  72 71 0 ---- PONTA DELGADA/NORDELA (ACORES)
+08513 3775   -2567  36 35 0 ---- PONTA DELGADA/OBS. (ACORES)
+08515 3697   -2517  100 100 0 ---- SANTA MARIA (ACORES)
+08530 3935   -940   34 32 0 ---- CABO CARVOEIRO
+08532 3883   -933   130 134 0 ---- SINTRA/GRANJA
+08533 3700   -895   26 25 0 ---- SAGRES
+08534 3870   -903   11 14 0 ---- MONTIJO
+08535 3872   -915   95 77 0 ---- LISBOA/GEOF
+08536 3877   -913   123 114 0 ---- LISBOA/PORTELA
+08537 3888   -903   3 3 0 ---- ALVERCA
+08538 3700   -895   25 25 0 ---- SAGRES
+08539 3912   -898   49 41 0 ---- OTA
+08540 3983   -888   54 52 0 ---- MONTE REAL
+08541 3795   -887   103 98 0 ---- SINES/MONTES CHAOS
+08544 4092   -863   22 17 0 ---- OVAR/MACEDA
+08545 4123   -868   77 69 0 ---- PORTO/PEDRAS RUBRAS
+08546 4113   -860   100 93 0 ---- PORTO/SERRA DO PILAR
+08548 4015   -847   179 0 0 ---- COIMBRA/CERNACHE
+08550 3907   -840   167 167 0 ---- CORUCHE, CRUZ DO LEAO
+08551 4163   -880   48 0 0 ---- VIANA DO CASTELO-CHAFE
+08552 3948   -843   80 83 0 ---- TANCOS
+08553 3730   -795   587 616 0 ---- LOULE, CAVALOS DO CALDEIRAO
+08554 3702   -797   8 7 0 ---- FARO/AEROPORTO
+08555 3702   -792   8 27 0 ---- FARO/CIDADE
+08557 3857   -790   321 309 0 ---- EVORA
+08558 3853   -790   246 245 0 ---- EVORA/C. COORD
+08560 4072   -788   644 644 0 ---- VISEU
+08561 3807   -792   203 194 0 ---- BEJA/B. AEREA
+08562 3802   -787   247 246 0 ---- BEJA
+08567 4127   -772   562 561 0 ---- VILA REAL
+08568 4042   -755   1388 1380 2 ---- PENHAS DOURADAS
+08570 3983   -748   384 386 0 ---- CASTELO BRANCO
+08571 3928   -742   590 597 0 ---- PORTALEGRE
+08575 4180   -673   692 691 0 ---- BRAGANCA
+08579 3877   -913   105 104 0 T-T- LISBOA/GAGO COUTINHO
+33664 4835   2708   261 0 0 ---- BRICENI
+33678 4820   2830   173 0 0 ---- SOROCA
+33679 4803   2870   154 0 0 ---- CAMENCA
+33744 4758   2770   162 0 0 ---- FALESTI
+33745 4778   2795   102 0 0 ---- BALTI
+33748 4733   2808   232 0 0 ---- CORNESTI
+33749 4737   2843   78 0 0 ---- BRAVICEA
+33754 4777   2902   119 0 0 ---- RIBNITA
+33810 4712   2837   157 0 0 ---- CODRII
+33815 4702   2898   173 0 0 T-T- CHISINAU
+33821 4728   2913   40 0 0 ---- DUBASARI
+33824 4705   2903   79 0 0 ---- BALTATA
+33829 4690   2960   40 0 0 ---- TIRASPOL
+33881 4648   2828   156 0 0 ---- LEOVA
+33883 4630   2863   133 0 0 ---- KOMRAT
+33885 4588   2823   113 0 0 ---- CAHUL
+33886 4610   2890   180 0 0 ---- CEADIR-LUNGA
+33892 4652   2948   173 0 0 ---- STEFAN-VODA
+15000 4818   2657   260 259 0 ---- DARABANI
+15004 4793   2390   276 275 0 ---- SIGHETUL MARMATIEI
+15007 4783   2588   390 389 0 ---- RADAUTI
+15010 4772   2288   124 123 0 ---- SATU MARE
+15014 4765   2348   217 216 0 ---- BAIA MARE
+15015 4777   2393   504 503 9 ---- OCNA SUGATAG
+15020 4773   2663   162 161 0 ---- BOTOSANI
+15023 4762   2623   352 350 0 ---- SUCEAVA
+15025 4782   2722   110 110 0 ---- STANCA STEFANESTI
+15033 4760   2463   1787 1785 2 ---- IEZER
+15042 4733   2208   113 124 0 ---- SACUIENI
+15044 4745   2278   160 159 0 ---- SUPURO DE JOS
+15047 4743   2387   365 363 0 ---- TARGU LAPUS
+15056 4735   2692   292 289 0 ---- COTNARI
+15063 4718   2303   296 295 0 ---- ZALAU
+15069 4732   2513   924 923 9 ---- POIANA STAMPEI
+15073 4720   2637   388 387 0 ---- TARGU NEAMT
+15080 4703   2188   137 136 0 ---- ORADEA
+15083 4712   2388   233 232 0 ---- DEJ
+15085 4713   2450   367 366 0 ---- BISTRITA
+15088 4708   2523   2023 2022 2 ---- CALIMANI RETITIS
+15090 4717   2762   103 102 0 ---- IASI
+15094 4700   2757   400 396 0 ---- BARNOVA
+15095 4698   2258   317 333 0 ---- BOROD
+15099 4685   2302   561 560 9 ---- HUEDIN
+15107 4692   2535   688 687 9 ---- TOPLITA
+15108 4697   2595   1898 1897 2 ---- CEAHLAU TOACA
+15109 4693   2638   361 360 0 ---- PIATRA NEAMT
+15111 4697   2690   217 216 0 ---- ROMAN
+15113 4683   2743   131 133 0 ---- NEGRESTI
+15117 4678   2210   163 163 0 ---- HOLOD
+15118 4668   2262   1109 1108 2 ---- STANA DE VALE
+15119 4675   2278   1837 1836 2 ---- VLADEASA 1800
+15120 4677   2357   410 410 0 TP-- CLUJ-NAPOCA
+15123 4673   2415   398 399 0 ---- SARMASU
+15124 4688   2463   450 449 0 ---- BATOS
+15127 4670   2550   751 750 9 ---- JOSENI
+15136 4652   2153   97 96 0 ---- CHISINEU-CRIS
+15138 4663   2217   587 586 9 ---- DUMBRAVITA DE CODRU
+15143 4657   2378   428 427 0 ---- TURDA
+15145 4653   2453   309 308 0 ---- TARGU MURES
+15148 4663   2528   1279 1282 2 ---- BUCIN
+15150 4652   2690   185 184 0 ---- BACAU
+15154 4663   2770   117 116 0 ---- VASLUI
+15160 4652   2245   279 278 0 ---- STEI
+15162 4635   2303   592 591 9 ---- CAMPENI
+15163 4653   2330   1356 1360 2 ---- BAISOARA
+15165 4635   2422   524 523 9 ---- TARNAVENI
+15168 4628   2528   524 523 9 ---- ODORHEIUL SECUIESC
+15170 4637   2577   662 661 9 ---- MIERCUREA CIUC
+15179 4625   2165   474 473 0 ---- SIRIA
+15182 4627   2233   178 177 0 ---- GURAHONT
+15184 4632   2313   1197 1196 2 ---- ROSIA MONTANA
+15189 4622   2458   319 318 0 ---- DUMBRAVENI
+15194 4627   2663   243 242 0 ---- TARGU OCNA
+15197 4622   2763   173 172 0 ---- BARLAD
+15199 4607   2060   86 85 0 ---- SANNICOLAU MARE
+15200 4613   2135   117 116 0 ---- ARAD
+15204 4602   2215   157 156 0 ---- VARADIA DE MURES
+15206 4617   2272   274 273 0 ---- TEBEA
+15208 4605   2355   247 246 0 ---- ALBA IULIA
+15209 4617   2393   338 337 0 ---- BLAJ
+15215 4607   2558   509 508 9 ---- BARAOLT
+15217 4598   2610   569 568 9 ---- TARGU SECUIESC
+15219 4610   2717   102 101 0 ---- ADJUD
+15230 4585   2288   241 240 0 ---- DEVA
+15231 4595   2353   254 253 0 ---- SEBES ALBA
+15235 4583   2493   429 428 0 ---- FAGARAS
+15238 4587   2580   524 523 9 ---- SFANTU GHEORGHE COVASNA
+15245 4577   2070   79 79 0 ---- JIMBOLIA
+15247 4577   2125   87 86 0 ---- TIMISOARA
+15254 4565   2392   1454 1453 2 ---- PALTINIS SIBIU
+15260 4578   2408   444 443 0 ---- SIBIU
+15261 4567   2605   708 707 9 ---- INTORSURA BUZAULUI
+15262 4582   2637   1785 1776 2 ---- LACAUTI
+15264 4568   2718   58 57 0 ---- FOCSANI
+15265 4583   2740   61 60 0 ---- TECUCI
+15270 4568   2193   124 123 0 ---- LUGOJ
+15277 4565   2427   519 518 9 ---- BOITA
+15279 4560   2460   2047 2070 2 ---- BALEA LAC
+15280 4543   2545   2511 2504 3 ---- VARFU OMU
+15284 4560   2640   1633 1632 2 ---- PENTELEU
+15285 4553   2670   833 850 9 ---- BISOCA
+15289 4537   2113   82 83 0 ---- BANLOC
+15292 4542   2222   242 241 0 ---- CARANSEBES
+15296 4540   2337   599 607 9 ---- PETROSANI
+15297 4543   2362   1349 1348 2 ---- OBARSIA LOTRULUI
+15300 4568   2552   535 534 9 ---- BRASOV-GHIMBAV
+15301 4542   2527   1383 1384 2 ---- FUNDATA
+15302 4550   2558   1091 1090 2 ---- PREDEAL
+15307 4538   2703   153 152 0 ---- RAMNICU SARAT
+15310 4547   2802   70 69 0 ---- GALATI
+15314 4530   2188   280 279 0 ---- RESITA
+15315 4517   2205   1433 1432 2 ---- SEMENIC
+15316 4530   2250   1450 1456 2 ---- CUNTU
+15317 4527   2252   2186 2180 2 ---- TARCU
+15319 4540   2397   575 573 9 ---- VOINEASA
+15320 4538   2345   1549 1548 2 ---- PARANG
+15324 4527   2503   680 680 9 ---- CAMPULUNG MUSCEL
+15325 4535   2550   1511 1510 2 ---- SINAIA-1500
+15328 4532   2637   290 289 0 ---- PATARLAGELE
+15333 4520   2792   15 14 0 ---- BRAILA
+15335 4518   2882   5 4 0 ---- TULCEA
+15336 4517   2915   3 2 0 ---- GORGOVA
+15337 4508   2907   168 167 0 ---- MAHMUDIA
+15338 4503   2170   310 309 0 ---- ORAVITA
+15340 4503   2325   204 203 0 ---- TARGU JIU
+15341 4498   2285   251 250 0 ---- APA NEAGRA
+15344 4515   2380   532 531 9 ---- POLOVRAGI
+15345 4500   2457   549 548 9 ---- MORARESTI
+15346 4508   2435   238 237 0 ---- RAMNICU VALCEA
+15347 4517   2467   449 448 0 ---- CURTEA DE ARGES
+15349 4513   2573   461 461 0 ---- CAMPINA
+15350 4512   2685   98 97 0 ---- BUZAU
+15360 4513   2975   13 12 0 ---- SULINA
+15364 4492   2200   257 256 0 ---- BOZOVICI
+15366 4487   2240   191 190 0 ---- BAILE HERCULANE
+15369 4487   2370   265 262 0 ---- TARGU LOGRESTI
+15373 4483   2485   317 316 0 ---- PITESTI
+15375 4492   2542   297 296 0 ---- TARGOVISTE
+15377 4495   2598   178 177 0 ---- PLOIESTI
+15387 4488   2958   2 1 0 ---- SFANTU GHEORGHE DELTA
+15388 4472   2163   83 82 0 ---- MOLDOVA VECHE
+15395 4465   2423   281 280 0 ---- DRAGASANI
+15402 4472   2665   61 60 0 ---- URZICENI
+15405 4473   2728   50 50 0 ---- GRIVITA
+15406 4468   2795   38 37 0 ---- HARSOVA
+15408 4473   2833   220 219 0 ---- CORUGEA
+15409 4475   2887   38 37 0 ---- JURILOVCA
+15410 4462   2262   78 77 0 ---- DROBETA TURNU SEVERIN
+15412 4447   2310   313 313 0 ---- BACLES
+15416 4455   2478   209 208 0 ---- STOLNICI
+15419 4465   2557   160 159 0 ---- TITU
+15420 4450   2607   91 90 0 TPT- BUCURESTI BANEASA
+15421 4450   2620   91 90 1 ---- BUCURESTI AFUMATI
+15422 4440   2608   83 82 0 ---- BUCARESTI FILARET
+15425 4455   2738   52 51 0 ---- SLOBOZIA
+15428 4468   2898   3 2 0 ---- GURA PORTITEI
+15434 4443   2435   173 172 0 ---- SLATINA
+15444 4438   2783   60 58 0 ---- FETESTI
+15445 4433   2803   87 87 0 ---- CERNADOVA
+15450 4430   2387   193 192 0 ---- CRAIOVA
+15455 4427   2553   107 106 0 ---- VIDELE
+15460 4420   2733   19 18 0 ---- CALARASI
+15462 4423   2825   70 69 0 ---- MEDGIDIA
+15465 4402   2332   58 57 0 ---- BAILESTI
+15469 4410   2435   107 106 0 ---- CARACAL
+15470 4410   2497   103 102 0 ---- ROSIORII DE VEDE
+15475 4407   2663   15 14 0 ---- OLTENITA
+15477 4450   2955   26 24 0 ---- PLATFORMA GLORIA
+15479 4408   2795   159 158 0 ---- ADAMCLISI
+15480 4420   2863   14 12 0 ---- CONSTANTA
+15482 4398   2293   62 61 0 ---- CALAFAT
+15489 4397   2535   76 75 0 ---- ALEXANDRIA
+15490 4375   2487   31 30 0 ---- TURNU-MAGURELE
+15491 4387   2592   24 23 0 ---- GIURGIU
+15494 4378   2393   37 36 0 ---- BECHET
+15498 4365   2535   34 33 0 ---- ZIMNICEA
+15499 4380   2858   7 6 0 ---- MANGALIA
+20107 7805   1422   75 73 0 ---- BARENTSBURG
+22003 6993   3197   7 8 0 ---- VAJDA-GUBA
+22004 6940   3020   92 105 0 ---- NIKEL'
+22012 6972   3308   10 7 0 ---- TSYP-NAVOLOK
+22028 6920   3510   30 33 0 ---- TERIBERKA
+22100 6853   2892   115 120 0 ---- VERHOV'E R LOTTY
+22101 6897   2877   101 98 0 ---- YANISKOSKI
+22105 6835   3072   90 98 0 ---- NIVANKYL'
+22106 6860   3180   62 61 0 ---- PADUN
+22113 6895   3303   50 57 0 ---- MURMANSK
+22113 6898   3312   121 121 0 T-T- MURMANSK
+22127 6800   3502   161 159 0 ---- LOVOZERO
+22133 6880   3732   64 69 0 ---- OSTROV HARLOV
+22140 6815   3975   12 12 0 ---- SVYATOJ NOS
+22165 6865   4328   48 47 0 ---- KANIN NOS
+22193 6877   4930   7 8 0 ---- BUGRINO
+22212 6793   3292   131 140 0 ---- MONCHEGORSK
+22213 6755   3335   133 132 0 ---- APATITY
+22217 6717   3235   25 26 0 T-T- KANDALAKSHA
+22235 6735   3705   157 155 0 ---- KRASNOSCEL'E
+22249 6712   3965   150 149 0 ---- KANEVKA
+22271 6787   4417   8 4 0 T-T- SHOJNA
+22282 6780   4665   5 5 0 ---- MYS MIKULKIN
+22292 6768   4868   4 2 0 ---- INDIGA
+22305 6625   3112   119 122 0 ---- ZASHEEK
+22312 6668   3288   17 30 0 ---- KOVDA
+22324 6667   3433   39 39 0 ---- UMBA
+22334 6633   3602   3 2 0 ---- KASHKARANTSY
+22349 6618   3952   8 8 0 ---- PJALICA
+22361 6672   4248   16 14 0 ---- MORZHOVEC
+22365 6640   4327   20 19 0 ---- ABRAMOVSKIJ MAJAK
+22383 6673   4772   13 11 0 ---- NIZHNYAYA PESHA
+22408 6522   3115   120 118 0 ---- KALEVALA
+22413 6578   3393   80 79 0 ---- ENGOZERO
+22422 6590   3477   12 8 0 ---- GRIDINO
+22429 6502   3568   7 6 0 ---- SOLOVKI
+22438 6520   3682   16 25 0 ---- ZHIZHGIN
+22446 6547   3973   77 83 0 ---- ZIMNEGORSKIJ MAJAK
+22456 6537   4187   68 69 0 ---- KEPINO
+22471 6587   4420   18 13 0 ---- MEZEN'
+22481 6577   4620   42 40 0 ---- MOSEEVO
+22520 6498   3480   7 7 0 ---- KEM' - PORT
+22522 6495   3465   8 8 0 T-T- KEM'
+22525 6457   3492   9 9 0 ---- RAZNAVOLOK
+22529 6423   3588   5 4 0 ---- KOLEZMA
+22541 6483   3840   4 2 0 ---- UNSKIJ MAJAK
+22543 6462   4050   6 4 0 T-T- ARHANGEL'SK
+22546 6455   3975   7 3 0 ---- SEVERODVINSK
+22550 6450   4072   8 8 0 ---- ARHANGEL'SK
+22551 6485   4027   2 1 0 ---- MUD'JUG
+22559 6422   4165   12 9 0 ---- HOLMOGORY
+22563 6470   4338   30 28 0 ---- PINEGA
+22573 6490   4577   71 64 0 ---- LESUKONSKOE
+22583 6475   4765   64 63 0 ---- KOJNAS
+22602 6383   3082   182 180 0 ---- REBOLY
+22619 6327   3342   130 130 0 ---- PADANY
+22621 6377   3428   112 111 0 ---- SEGEZA
+22638 6332   3670   182 181 0 ---- KALGACHIHA
+22641 6390   3812   12 11 0 ---- ONEGA
+22648 6312   3923   35 35 0 ---- TURCASOVO
+22656 6347   4178   18 15 0 ---- EMECK
+22671 6400   4443   65 63 0 ---- KARPOGORY
+22676 6358   4563   62 62 0 ---- SURA
+22686 6345   4790   79 78 0 ---- VENDINGA
+22695 6345   4892   122 131 0 ---- KOSLAN
+22717 6210   3238   156 158 0 ---- SUOYARVI
+22721 6292   3443   81 79 0 ---- MEDVEZEGORSK
+22727 6217   3430   38 41 0 ---- KONDOPOGA
+22749 6213   3930   101 99 0 ---- KONEVO
+22762 6282   4278   31 29 0 ---- DVINSKIJ BEREZNIK
+22768 6210   4290   44 39 0 ---- SHENKURSK
+22778 6223   4502   57 54 0 ---- VERHNJAJA TOJMA
+22798 6217   4910   91 88 0 ---- JARENSK
+22802 6172   3072   19 17 0 ---- SORTAVALA
+22805 6137   3088   16 19 0 ---- VALAAM
+22820 6182   3427   111 110 0 T-T- PETROZAVODSK
+22829 6102   3548   41 40 0 ---- VOSNESEN'E
+22831 6180   3658   48 44 0 ---- PUDOZ
+22837 6102   3645   56 55 0 ---- VYTEGRA
+22845 6150   3893   126 124 0 T-T- KARGOPOL'
+22854 6167   4018   232 232 0 ---- NJANDOMA
+22867 6107   4207   90 89 0 ---- VEL'SK
+22869 6113   4335   117 119 0 ---- SHANGALY
+22876 6153   4593   59 58 0 ---- KRASNOBORSK
+22887 6123   4668   55 54 0 ---- KOTLAS
+22889 6112   4798   69 68 0 ---- VILEGODSKOE
+22891 6055   3032   70 68 0 ---- SOSNOVO
+22892 6072   2873   13 10 0 ---- VYBORG
+22897 6022   2900   11 4 0 ---- OZERKI
+22912 6098   3298   12 11 0 ---- OLONEC
+22913 6072   3355   23 21 0 ---- LODEJNOE POLE
+22917 6012   3232   9 12 0 ---- NOVAJA LADOGA
+22925 6063   3478   111 109 0 ---- VINNICY
+22939 6002   3775   130 130 0 ---- BELOZERSK
+22951 6098   4025   226 225 0 ---- KONOSHA
+22954 6047   4018   201 199 0 ---- VOZEGA
+22974 6040   4422   136 133 0 ---- NYUKSENITSA
+22981 6077   4625   98 93 0 ---- VELIKIJ USTJUG
+22983 6070   4760   84 83 0 ---- LAL'SK
+22996 6037   4965   152 148 0 ---- OB'JACEVO
+26059 5937   2860   19 17 0 ---- KINGISEPP
+26063 5997   3030   6 3 0 ---- ST.PETERSBURG (VOEJKOVO)
+26063 5995   3070   75 72 0 T-T- ST.PETERSBURG (VOEJKOVO)
+26067 5943   2950   129 127 0 ---- VOLOSOVO
+26069 5935   3013   90 88 0 ---- BELOGORKA
+26072 5993   3100   16 14 0 ---- SHLISSEL'BURG
+26078 5935   3123   39 36 0 ---- LJUBAN'
+26080 5945   3203   26 25 0 ---- KIRISHI
+26094 5965   3355   61 60 0 ---- TIHVIN
+26099 5950   3470   176 173 0 ---- EFIMOVSKAJA
+26157 5873   2783   41 39 0 ---- GDOV
+26167 5857   2980   91 91 0 ---- NIKOLAEVSKOE
+26179 5852   3125   24 24 0 ---- NOVGOROD
+26258 5782   2833   44 44 0 ---- PSKOV
+26264 5827   2910   129 127 0 ---- STRUGI KRASNYE
+26268 5782   2995   65 63 0 ---- DNO
+26275 5802   3132   25 24 0 ---- STARAYA RUSSA
+26285 5827   3253   63 62 0 ---- KRESTCY
+26291 5842   3390   89 87 0 ---- BOROVICI
+26298 5788   3403   186 186 0 T-T- BOLOGOE
+26359 5702   2890   108 108 0 ---- PUSKINSKIE GORY
+26378 5715   3118   71 70 0 ---- HOLM
+26381 5765   3247   61 59 0 ---- DEMJANSK
+26389 5712   3310   214 214 0 ---- OSTASKOV
+26393 5753   3455   168 167 0 ---- VYSNIJ VOLOCEK
+26456 5672   2872   99 97 0 ---- OPOCHKA
+26477 5635   3062   103 97 0 T-T- VELIKIE LUKI
+26479 5648   3163   187 187 0 ---- TOROPEC
+26499 5648   3492   185 184 0 ---- STARITSA
+26578 5562   3118   166 165 0 ---- VELIZH
+26585 5583   3293   222 220 0 ---- BELYJ
+26695 5517   3440   250 243 0 ---- VJAZ'MA
+26702 5472   2055   21 19 0 T-T- KALININGRAD
+26711 5463   2178   31 32 0 ---- CHERNYAHOVSK
+26781 5475   3207   238 240 0 T-T- SMOLENSK
+26784 5442   3243   201 200 0 ---- POCHINOK
+26795 5442   3402   238 238 0 ---- SPAS-DEMENSK
+26882 5393   3283   224 219 0 ---- ROSLAVL'
+26894 5353   3375   176 175 0 ---- ZUKOVKA
+26898 5325   3432   216 213 0 ---- BRJANSK
+26976 5302   3160   148 146 0 ---- KRASNAJA GORA
+26997 5258   3377   178 177 0 ---- TRUBCHEVSK
+27008 5940   3590   137 136 0 ---- BABAEVO
+27020 5995   3858   120 118 0 ---- YARSHEVO
+27026 5960   3917   132 132 0 ---- KOROBOVO
+27037 5932   3992   129 124 0 ---- VOLOGDA
+27038 5932   3992   133 124 0 T-T- VOLOGDA
+27051 5997   4277   135 134 0 ---- TOT'MA
+27066 5953   4545   142 141 0 ---- NIKOL'SK
+27083 5985   4828   179 178 0 ---- OPARINO
+27097 5938   4898   212 211 0 ---- MURASI
+27106 5885   3643   125 124 0 ---- USTYUZHNA
+27108 5857   3563   147 149 0 ---- OHONY
+27113 5927   3802   117 112 0 ---- CEREPOVEC
+27164 5882   4432   151 150 0 ---- KOLOGRIV
+27176 5893   4677   159 159 0 ---- VOHMA
+27198 5858   4940   127 0 1 ---- KIROV (CTBT)
+27199 5857   4957   158 156 0 T-T- KIROV
+27208 5780   3590   142 140 0 ---- MAKSATIKHA
+27215 5803   3710   166 166 0 ---- KRASNYJ HOLM
+27223 5848   3913   117 117 0 ---- POSHEHON'E
+27225 5810   3868   105 104 0 ---- RYBINSK
+27242 5848   4153   103 102 0 ---- BUJ
+27243 5838   4237   132 134 0 ---- GALIC
+27252 5835   4338   144 149 0 ---- NIKOLO-POLOMA
+27271 5837   4553   125 118 0 ---- SAR'JA
+27277 5785   4577   135 133 0 ---- VETLUGA
+27281 5830   4712   166 166 0 ---- SABALINO
+27283 5830   4835   126 125 0 ---- KOTEL'NIC
+27296 5810   4992   177 175 0 ---- KUMENY
+27316 5733   3757   138 137 0 ---- KASIN
+27321 5750   3830   122 120 0 ---- UGLIC
+27329 5720   3942   100 99 0 ---- ROSTOV
+27333 5773   4078   125 125 0 ---- KOSTROMA
+27346 5742   4218   127 125 0 ---- KINESMA
+27347 5695   4097   125 124 0 ---- IVANOVO
+27355 5733   4312   132 131 0 ---- JUR'EVEC
+27369 5713   4517   110 111 0 ---- KRASNYE BAKI
+27373 5767   4663   175 175 0 ---- SAKUN'JA
+27393 5755   4995   134 136 0 ---- NOLINSK
+27402 5688   3587   145 140 0 ---- TVER'
+27415 5673   3725   118 0 1 ---- DUBNA (CTBT)
+27417 5635   3675   167 166 0 ---- KLIN
+27428 5640   3875   184 185 0 ---- ALEKSANDROV
+27441 5685   4140   99 99 0 ---- SHUYA
+27453 5668   4343   103 101 0 ---- GORODEC
+27459 5627   4400   157 161 0 T-T- NIZHNIJ NOVGOROD
+27462 5673   4452   117 117 0 ---- SEMENOV
+27479 5633   4658   107 108 0 ---- KOZ'MODEM'JANSK
+27480 5698   4732   103 103 0 ---- SANCURSK
+27485 5663   4777   119 116 0 ---- JOSKAR-OLA
+27491 5700   4873   143 143 0 ---- NOVYJ TOR'JAL
+27502 5602   3593   198 196 0 ---- VOLOKOLAMSK
+27507 5552   3503   196 192 0 ---- GAGARIN
+27509 5552   3600   184 184 0 ---- MOZAJSK
+27511 5590   3682   162 159 0 ---- NOVO-JERUSALIM
+27523 5577   3868   132 134 0 ---- PAVLOVSKIJ POSAD
+27532 5612   4035   172 167 0 ---- VLADIMIR
+27539 5560   4065   135 136 0 ---- GUS'-HRUSTAL'NYJ
+27549 5560   4203   115 115 0 ---- MUROM
+27577 5553   4550   125 126 0 ---- SERGACH
+27581 5608   4733   163 162 0 ---- CEBOKSARY
+27587 5552   4747   183 181 0 ---- KANASH
+27593 5608   4985   152 150 0 ---- ARSK
+27595 5573   4920   118 115 0 ---- KAZAN'
+27595 5560   4928   115 115 0 T-T- KAZAN'
+27606 5502   3648   197 195 0 ---- MALOJAROSLAVEC
+27611 5538   3670   193 190 0 ---- NARO-FOMINSK
+27612 5583   3762   156 147 0 ---- MOSKVA VDNH
+27612 5592   3752   190 187 0 T-T- MOSKVA (DOLGOPRUDNYJ)
+27618 5493   3747   166 164 0 ---- SERPUHOV
+27625 5513   3873   114 112 0 ---- KOLOMNA
+27627 5483   3815   221 221 0 ---- KASIRA
+27643 5533   4212   113 113 0 ---- VYKSA
+27648 5495   4177   135 132 0 ---- ELAT'MA
+27653 5537   4378   123 120 0 ---- ARZAMAS
+27665 5503   4450   218 217 0 ---- LUKOJANOV
+27675 5518   4633   136 135 0 ---- PORETSKOE
+27679 5482   4658   180 178 0 ---- ALATYR'
+27697 5493   4878   156 155 0 ---- TETJUSI
+27703 5457   3640   200 198 0 ---- KALUGA
+27707 5410   3535   238 237 0 T-T- SUHINICHI
+27719 5423   3762   205 202 0 ---- TULA
+27729 5423   3903   173 173 0 ---- MIHAJLOV
+27730 5463   3970   156 155 0 T-T- RYAZAN'
+27736 5430   4088   98 98 0 ---- SILOVO
+27745 5437   4193   114 114 0 ---- SASOVO
+27752 5463   4323   138 138 0 ---- TEMNIKOV
+27756 5443   4377   188 185 0 ---- KRASNOSLOBODSK
+27758 5408   4325   198 197 0 ---- TORBEEVO
+27760 5413   4525   200 195 0 ---- SARANSK
+27776 5448   4670   99 100 0 ---- SURSKOE
+27785 5432   4833   129 122 0 ---- UL' YANOVSK (BARATAEVKA)
+27786 5432   4833   129 122 0 ---- ULYANOVSK
+27799 5423   4960   73 72 0 ---- DIMITROVGRAD
+27817 5338   3653   201 199 0 ---- MCENSK
+27821 5400   3813   230 226 0 ---- UZLOVAJA
+27823 5378   3925   209 209 0 ---- PAVELEC
+27835 5372   4012   127 125 0 ---- RYAZHSK
+27848 5345   4180   142 143 0 ---- MORSANSK
+27857 5348   4263   131 130 0 ---- ZAMETCHINO
+27858 5333   4332   261 259 0 ---- PACHELMA
+27872 5385   4642   175 174 0 ---- INZA
+27894 5360   4883   143 141 0 ---- NOVODEVIC'E
+27906 5293   3600   195 193 0 ---- OREL
+27921 5315   3812   214 216 0 ---- EFREMOV
+27928 5263   3852   167 166 0 ---- ELEC
+27930 5270   3952   177 176 0 ---- LIPETSK
+27935 5288   4048   158 148 0 ---- MICURINSK
+27944 5273   4147   161 0 0 ---- TAMBOV
+27947 5280   4133   128 126 0 ---- TAMBOV
+27955 5297   4340   205 204 0 ---- BELINSKIJ
+27957 5267   4272   168 168 0 ---- KIRSANOV
+27962 5312   4502   172 169 0 T-T- PENZA
+27972 5305   4643   252 253 0 ---- RADISHCHEVO
+27981 5315   4752   98 107 0 ---- KANADEJ
+27983 5318   4840   103 103 0 ---- SYZRAN'
+27995 5298   4943   45 44 0 T-T- SAMARA (BEZENCHUK)
+34003 5232   3630   250 274 0 ---- PONYRI
+34009 5177   3617   247 246 0 T-T- KURSK
+34013 5243   3760   179 177 0 ---- LIVNY
+34047 5183   4148   147 144 0 ---- ZERDEVKA
+34056 5225   4378   212 211 0 ---- RTISHCHEVO
+34063 5228   4540   199 197 0 ---- PETROVSK
+34069 5187   4503   207 210 0 ---- ATKARSK
+34072 5233   4637   301 300 0 ---- KARABULAK
+34083 5250   4808   88 77 0 ---- HVALYNSK
+34098 5203   4883   37 36 0 ---- PUGACEV
+34109 5120   3632   192 190 0 ---- OBOJAN'
+34110 5117   3735   225 223 0 ---- BOGORODITSKOE-FENINO
+34116 5130   3788   216 216 0 ---- STARYJ OSKOL
+34122 5165   3925   104 100 0 T-T- VORONEZ
+34123 5170   3922   148 147 0 ---- VORONEZ
+34139 5105   4070   194 193 0 ---- KAMENNAJA STEP'
+34146 5137   4208   105 104 0 ---- BORISOGLEBSK
+34152 5155   4315   158 156 0 ---- BALASHOV
+34163 5163   4545   200 202 0 ---- OKTYABRSKY GORODOK
+34171 5155   4603   156 0 0 ---- SARATOV
+34172 5155   4603   166 0 0 T-T- SARATOV
+34186 5137   4830   110 109 0 ---- ERSHOV
+34199 5120   4973   103 104 0 ---- OZINKI
+34202 5080   3577   225 225 0 ---- GOTNJA
+34213 5075   3787   139 138 0 ---- NOVYJ OSKOL
+34214 5063   3658   223 223 0 ---- BELGOROD
+34231 5100   3950   115 113 0 ---- LISKI
+34238 5148   4042   153 152 0 ---- ANNA
+34240 5080   4200   105 105 0 ---- URJUPINSK
+34247 5042   4105   91 90 0 T-T- KALACH
+34253 5095   4373   132 131 0 ---- ELAN'
+34254 5053   4268   97 96 0 ---- NOVOANNENSKIJ
+34262 5083   4457   114 115 0 ---- RUDNYA
+34267 5037   4412   101 100 0 ---- DANILOVKA
+34273 5095   4697   50 48 0 ---- KRASNYJ KUT
+34321 5022   3810   112 111 0 ---- VALUJKI
+34336 4993   4057   83 85 0 ---- BOGUCAR
+34344 4980   4115   71 68 0 ---- KAZANSKAJA
+34356 4980   4367   118 117 0 ---- FROLOVO
+34357 4957   4273   129 123 0 ---- SERAFIMOVIC
+34363 5008   4537   118 120 0 ---- KAMYSIN
+34373 5005   4688   36 34 0 ---- PALLASOVKA
+34391 5015   4855   24 23 0 ---- ALEKSANDROV-GAJ
+34432 4938   4017   145 144 0 ---- CERTKOVO
+34438 4893   4038   155 153 0 ---- MILLEROVO
+34445 4922   4183   91 90 0 ---- BOKOVSKAJA
+34461 4930   4400   44 43 0 ---- ILOVLYA
+34467 4878   4433   141 0 0 T-T- VOLGOGRAD
+34476 4913   4685   5 4 0 ---- EL'TON
+34535 4830   4030   57 56 0 ---- KAMENSK-SAHTINSKIJ
+34545 4835   4187   89 88 0 ---- MOROZOVSK
+34555 4833   4312   74 67 0 ---- NIZHNY-CHIR
+34560 4878   4437   134 0 0 ---- VOLGOGRAD
+34578 4807   4612   5 4 0 ---- CERNYJ JAR
+34579 4822   4673   34 33 0 ---- VERHNIJ BASKUNCHAK
+34625 4757   3888   42 42 0 ---- MATVEEV KURGAN
+34635 4770   4027   117 116 0 ---- SAHTY
+34644 4758   4110   62 63 0 ---- KONSTANTINOVSK
+34646 4763   4212   65 64 0 ---- TSIMLJANSK
+34655 4763   4315   46 46 0 ---- KOTEL'NIKOVO
+34662 4793   4470   9 7 0 ---- MALYE DERBETY
+34720 4720   3890   32 30 0 ---- TAGANROG
+34723 4712   3942   4 0 0 ---- AZOV
+34727 4680   3827   2 1 0 ---- EJSK
+34730 4725   3982   82 81 0 ---- ROSTOV-NA-DONU
+34731 4725   3982   78 0 0 T-T- ROSTOV-NA-DONU
+34737 4653   3962   21 20 0 ---- KUSHCHEVSKAJA
+34740 4652   4135   78 79 0 ---- GIGANT
+34743 4715   4248   72 71 0 ---- ZIMOVNIKI
+34759 4657   4367   106 104 0 ---- REMONTNOE
+34772 4713   4632   2 1 0 ---- YUSTA
+34785 4692   4793   -18 -19 0 ---- DOSANG
+34824 4603   3815   3 2 0 ---- PRIMORSKO-AHTARSK
+34825 4607   3897   17 16 0 ---- KANEVSKAJA
+34838 4585   4008   77 76 0 ---- TIHORECK
+34845 4607   4197   86 86 0 ---- GORODOVIKOVSK
+34858 4592   4335   86 85 0 T-T- DIVNOE
+34861 4630   4418   197 195 0 ---- ELISTA
+34866 4618   4535   -6 -6 0 ---- YASHKUL'
+34868 4580   4463   112 111 0 ---- IKI-BURUL
+34871 4637   4602   -7 -8 0 ---- UTTA
+34880 4628   4798   -20 -21 0 ---- ASTRAHAN'
+34882 4628   4798   -17 0 0 T-T- ASTRAHAN'
+34887 4580   4722   -18 -17 0 ---- LIMAN
+34915 4532   3738   2 2 0 ---- KUBANSKAYA (TEMRYUK)
+34922 4563   3893   21 20 0 ---- TIMASEVSKAJA
+34924 4528   3812   8 7 0 ---- SLAVJANSK-NA-KUBANI
+34927 4505   3903   29 27 0 ---- KRASNODAR-KRUGLIK
+34929 4503   3915   34 34 0 ---- KRASNODAR
+34936 4543   4057   105 104 0 ---- KROPOTKIN
+34949 4512   4208   451 451 0 ---- STAVROPOL'
+34954 4535   4285   140 141 0 ---- SVETLOGRAD
+34958 4510   4345   162 161 0 ---- BLAGODARNYJ
+34964 4540   4420   102 101 0 ---- ARZGIR
+34975 4535   4603   -1 -2 0 ---- KOMSOMOL' SKIJ
+34984 4540   4735   -24 -24 0 ---- LAGAN'
+37001 4488   3728   32 29 0 ---- ANAPA
+37004 4457   3808   14 15 0 ---- GELENDZHIK
+37006 4472   3787   2 10 0 ---- NOVOROSSIJSK
+37009 4433   3872   22 19 0 ---- DZHUBGA
+37011 4410   3903   94 0 0 T-T- TUAPSE
+37013 4475   3990   138 132 0 ---- BELORECENSK
+37014 4463   3910   61 60 0 ---- GORJACIJ KLJUC
+37017 4428   3927   323 325 0 ---- GORNYIJ
+37018 4410   3907   61 59 0 ---- TUAPSE
+37021 4462   4008   219 215 0 ---- MAJKOP
+37031 4498   4112   159 158 0 ---- ARMAVIR
+37036 4463   4197   342 341 0 ---- NEVINNOMYSSK
+37054 4423   4307   328 323 0 ---- MINERAL'NYE VODY
+37055 4422   4310   312 0 0 T-T- MINERAL'NYE VODY
+37058 4413   4345   287 287 0 ---- GEORGIEVSK
+37061 4478   4413   135 134 0 ---- BUDENNOVSK
+37085 4440   4655   -21 -23 0 ---- KOCHUBEJ
+37089 4447   4748   -23 -24 0 ---- OSTROV TJULENIJ
+37099 4358   3977   131 141 0 ---- SOTCHI
+37107 4368   4020   567 564 0 ---- KRASNAYA POLYANA
+37126 4373   4267   2056 2069 2 ---- SHADZHATMAZ
+37144 4375   4405   199 199 0 ---- PROHLADNAYA
+37145 4373   4467   136 135 0 ---- MOZDOK
+37163 4383   4672   -4 -5 0 ---- KIZLJAR
+37171 4343   3990   12 11 0 ---- SOCHI (ADLER)
+37193 4345   4173   1325 1328 2 ---- TEBERDA
+37212 4353   4363   424 424 0 ---- NAL'CIK
+37218 4315   4485   664 663 0 ---- NAZRAN'
+37228 4303   4468   703 701 0 ---- VLADIKAVKAZ
+37235 4325   4572   257 255 0 ---- GROZNYJ
+37244 4335   4612   75 74 0 ---- GUDERMES
+37248 4325   4658   116 114 0 ---- HASAVJURT
+37259 4300   4750   -18 -19 0 T-T- MAHACHKALA
+37463 4240   4697   1408 1420 2 ---- GUNIB
+37470 4207   4830   -17 -18 0 ---- DERBENT
+37471 4282   4712   466 472 0 ---- BUJNAKSK
+37472 4300   4750   -18 -19 0 ---- MAHACHKALA
+37473 4253   4792   -16 -19 0 ---- IZBERG
+37597 4167   4805   477 473 0 ---- KASUMKENT
+37663 4147   4775   1015 1015 2 ---- AKHTY
+13067 4610   1977   105 102 0 ---- PALIC
+13160 4577   1915   89 87 0 ---- SOMBOR
+13168 4533   1985   87 86 0 ---- NOVI SAD RIMSKI SANCEVI
+13173 4537   2042   82 80 0 ---- ZRENJANIN
+13174 4585   2047   82 81 0 ---- KIKINDA
+13180 4505   2103   91 90 0 ---- BANATSKI KARLOVAC
+13183 4515   2132   85 83 0 ---- VRSAC
+13262 4455   1923   122 121 0 ---- LOZNICA
+13266 4510   1955   83 82 0 ---- SREMSKA MITROVICA
+13269 4432   1992   177 176 0 ---- VALJEVO
+13272 4482   2028   99 96 0 ---- BEOGRAD/SURCIN
+13274 4480   2047   132 132 0 ---- BEOGRAD
+13275 4477   2042   203 203 0 T--- BEOGRAD/KOSUTNJAK
+13278 4403   2093   185 183 0 ---- KRAGUJEVAC
+13279 4437   2095   122 121 0 ---- SMEDEREVSKA PALANKA
+13285 4475   2152   84 82 0 ---- VELIKO GRADISTE
+13289 4412   2195   1039 1037 2 ---- CRNI VRH
+13295 4423   2255   44 42 0 ---- NEGOTIN
+13367 4373   1972   1029 1029 2 ---- ZLATIBOR
+13369 4328   2000   1039 1038 2 ---- SJENICA
+13370 4383   2003   312 310 0 ---- POZEGA UZICKA
+13376 4370   2070   217 215 0 ---- KRALJEVO
+13378 4328   2080   1713 1711 2 ---- KOPAONIK
+13383 4357   2135   167 166 0 ---- KRUSEVAC
+13384 4393   2138   125 123 0 ---- CUPRIJA
+13388 4333   2190   202 202 0 ---- NIS
+13389 4298   2195   232 230 0 ---- LESKOVAC
+13397 4302   2275   450 448 0 ---- DIMITROVGRAD
+13473 4267   2030   499 498 0 ---- PEC
+13477 4222   2073   403 402 0 ---- PRIZREN
+13481 4265   2115   576 573 0 ---- PRISTINA
+13489 4255   2192   434 433 0 ---- VRANJE
+11801 4840   1715   207 205 0 ---- MALACKY
+11816 4820   1720   134 133 0 ---- BRATISLAVA-LETISKO
+11819 4848   1767   178 176 0 ---- JASLOVSKE BOHUNICE
+11826 4862   1783   164 163 0 ---- PIESTANY
+11841 4923   1862   311 310 0 ---- ZILINA/HRICOV
+11855 4828   1813   136 135 0 ---- NITRA
+11856 4828   1845   262 261 0 ---- MOCHOVCE
+11858 4787   1820   124 115 0 ---- HURBANOVO
+11867 4877   1860   261 260 0 ---- PRIEVIDZA
+11880 4817   1887   140 139 0 ---- DUDINCE
+11903 4865   1915   315 314 0 ---- SLIAC
+11916 4898   1960   2007 2005 2 ---- CHOPOK
+11918 4937   1968   693 692 9 ---- LIESEK
+11927 4833   1973   215 214 0 ---- LUCENEC
+11930 4920   2022   2635 2634 3 ---- LOMNICKY STIT
+11933 4912   2008   1356 1354 2 ---- STRBSKE PLESO
+11934 4907   2025   696 694 9 ---- POPRAD/TATRY
+11938 4885   2018   906 901 9 ---- TELGART
+11952 4903   2032   703 0 9 TPT- POPRAD-GANOVCE
+11955 4903   2132   324 307 0 ---- PRESOV
+11958 4878   2098   1246 1244 2 ---- KOJSOVSKA HOLA
+11968 4867   2122   231 230 0 ---- KOSICE
+11976 4922   2165   217 216 0 ---- STROPKOV, TISINEC
+11978 4867   2173   106 105 0 ---- MILHOSTOV
+11993 4893   2200   178 176 0 ---- KAMENICA NAD CIROCHOU
+14006 4625   1383   0 1535 0 ---- VOGEL
+14007 4648   1370   864 864 2 ---- RATECE
+14008 4637   1383   2515 2514 3 ---- KREDARICA
+14009 4602   1390   0 1067 0 ---- VOJSKO
+14010 4635   1417   0 515 0 ---- LESCE
+14012 4608   1437   0 685 0 ---- KATARINA
+14014 4622   1447   383 388 0 ---- LJUBLJANA/BRNIK
+14015 4605   1450   297 299 0 -T-- LJUBLJANA/BEZIGRAD
+14021 4648   1510   0 444 0 ---- SLOVENJ GRADEC
+14023 4623   1522   243 241 0 ---- CELJE
+14024 4607   1528   944 947 2 ---- LISCA
+14026 4647   1567   265 267 0 ---- MARIBOR/SLIVNICA
+14031 4665   1618   186 188 0 ---- MURSKA SOBOTA
+14105 4547   1360   3 2 0 ---- PORTOROZ/SECOVLJE
+14106 4588   1362   56 55 0 ---- NOVA GORICA
+14112 4575   1418   0 533 0 ---- POSTOJNA
+14118 4563   1485   0 467 0 ---- KOCEVJE
+14120 4555   1513   0 157 0 ---- CRNOMELJ
+14121 4580   1517   220 220 0 ---- NOVO MESTO
+14122 4588   1552   161 154 0 ---- CERKLJE OB KRKI
+08001 4337   -842   67 58 0 T-T- LA CORUNA
+08002 4330   -837   103 97 0 ---- LA CORUNA/ALVEDRO
+08007 4317   -852   0 595 0 ---- CERCEDA
+08008 4310   -745   446 445 0 ---- LUGO/ROZAS
+08011 4357   -603   130 127 0 ---- ASTURIAS/AVILES
+08014 4355   -568   6 5 0 ---- GIJON-MUSEL
+08015 4335   -587   339 336 0 ---- OVIEDO
+08019 4345   -630   0 923 0 ---- AGUION
+08021 4342   -382   1 5 0 ---- SANTANDER/PARAYAS
+08023 4348   -378   59 52 0 T-T- SANTANDER
+08025 4328   -290   39 42 0 ---- BILBAO/AEROPUERTO
+08027 4330   -203   259 251 0 ---- SAN SEBASTIAN/IGUELDO
+08029 4335   -178   8 4 0 ---- SAN SEBASTIAN/FUENTERRABIA
+08042 4288   -840   367 370 0 ---- SANTIAGO/LABACOLLA
+08044 4243   -860   108 108 0 ---- PONTEVEDRA
+08045 4223   -862   258 261 0 ---- VIGO/PEINADOR
+08048 4232   -785   147 143 0 ---- ORENSE
+08053 4255   -660   550 534 0 ---- PONFERRADA
+08055 4258   -563   914 916 9 ---- LEON/VIRGEN DEL CAMINO
+08072 4198   -460   0 874 9 ---- PALENCIA-AUTILLA PINO
+08075 4235   -362   892 891 9 ---- BURGOS/VILLAFRIA
+08080 4287   -273   510 513 0 ---- VITORIA
+08081 4340   -283   0 576 0 ---- BAQUIO
+08084 4245   -232   363 353 0 ---- LOGRONO/AGONCILLO
+08085 4277   -165   453 459 0 ---- PAMPLONA/NOAIN
+08087 4218   -147   295 295 0 ---- BARDENAS REALES
+08094 4208   -32    554 541 0 ---- HUESCA/PIRINEOS
+08112 4220   85     800 799 2 ---- TALARN
+08117 4233   193    1702 1704 2 ---- LA MOLINA
+08130 4152   -573   667 656 0 ---- ZAMORA
+08140 4170   -485   846 846 9 ---- VALLADOLID/VILLANUBLA
+08141 4165   -477   735 735 0 ---- VALLADOLID
+08148 4177   -247   1082 1082 2 ---- SORIA
+08157 4110   -140   779 779 9 ---- DAROCA
+08160 4165   -100   258 263 0 T-T- ZARAGOZA/AEROPUERTO
+08162 4173   -53    0 820 0 ---- PERDIGUERA
+08171 4162   58     199 192 0 ---- LLEIDA
+08175 4113   117    76 71 0 ---- REUS/AEROPUERTO
+08179 4140   188    0 651 0 ---- CORBERA
+08181 4128   207    5 4 0 ---- BARCELONA/AEROPUERTO
+08184 4190   275    129 143 0 ---- GIRONA/COSTA BRAVA
+08190 4138   212    91 95 0 T-T- BARCELONA SERVEI
+08202 4095   -548   794 790 9 ---- SALAMANCA/MATACAN
+08210 4065   -467   1132 1130 2 ---- AVILA
+08213 4093   -412   1005 1005 2 ---- SEGOVIA
+08215 4077   -400   1888 1894 2 ---- NAVACERRADA
+08219 4068   -375   998 1004 9 ---- COLMENAR VIEJO/FAMET
+08220 4045   -372   669 664 0 ---- MADRID/C. UNIVERSITARIA
+08221 4047   -355   582 609 0 ---- MADRID/BARAJAS
+08221 4047   -357   633 631 0 T-T- MADRID/BARAJAS RS
+08222 4040   -367   667 667 0 ---- MADRID, RETIRO
+08223 4037   -378   687 690 0 ---- MADRID/CUATRO VIENTOS
+08224 4030   -372   617 620 0 ---- MADRID/GETAFE
+08226 4065   -317   640 639 0 ---- GUADALAJARA
+08227 4048   -345   612 607 0 ---- MADRID/TORREJON
+08228 4017   -370   0 704 0 ---- TORREJON DE VELASCO
+08231 4007   -213   946 945 9 ---- CUENCA
+08232 4083   -188   1063 1056 2 ---- MOLINA DE ARAGON
+08233 4092   -128   889 890 9 ---- CALAMOCHA
+08235 4035   -112   902 900 9 ---- TERUEL
+08238 4082   48     50 44 0 ---- TORTOSA
+08261 3947   -633   405 405 0 ---- CACERES
+08262 3942   -628   0 652 0 ---- SIERRA DE FUENTES
+08272 3988   -403   516 515 0 ---- TOLEDO
+08280 3895   -185   704 702 0 ---- ALBACETE/LOS LLANOS
+08284 3948   -47    62 69 0 ---- VALENCIA/AEROPUERTO
+08285 3947   -35    11 11 0 ---- VALENCIA
+08286 3995   -7     35 35 0 ---- CASTELLON
+08289 3917   -23    0 234 0 ---- CULLERA
+08301 3955   262    6 3 0 ---- PALMA DE MALLORCA
+08302 3960   270    41 41 0 T-T- MALLORCA-SON BONET
+08306 3955   273    5 8 0 ---- PALMA DE MALLORCA/SON SAN JUAN
+08308 3937   278    0 113 0 ---- LLUCMAYOR
+08314 3985   420    86 91 0 ---- MENORCA/MAHON
+08330 3888   -682   192 185 0 ---- BADAJOZ/TALAVERA LA REAL
+08335 3850   -512   541 540 0 ---- HINOJOSA DEL DUQUE
+08348 3898   -392   629 628 0 ---- CIUDAD REAL
+08349 3895   -373   622 622 0 ---- ALMAGRO-FAMET
+08359 3837   -48    82 81 0 ---- ALICANTE
+08360 3827   -57    31 43 0 ---- ALICANTE/EL ALTET
+08364 3825   -118   0 1261 0 ---- FORTUNA
+08373 3887   138    17 6 0 ---- IBIZA/ES CODOLA
+08383 3727   -690   20 19 0 ---- HUELVA
+08386 3768   -632   0 517 0 ---- CASTILLO LAS GUARDAS
+08391 3742   -587   31 34 0 ---- SEVILLA/SAN PABLO
+08397 3715   -560   88 87 0 ---- MORON DE LA FRONTERA
+08410 3783   -483   92 90 0 ---- CORDOBA/AEROPUERTO
+08417 3777   -380   580 582 0 ---- JAEN
+08419 3718   -378   570 567 0 ---- GRANADA/AEROPUERTO
+08420 3713   -362   692 687 0 ---- GRANADA/BASE AEREA
+08429 3795   -122   75 75 0 ---- MURCIA/AL CANTARILLA
+08430 3800   -117   62 61 0 T-T- MURCIA
+08433 3778   -80    3 4 0 ---- MURCIA/SAN JAVIER
+08449 3663   -632   23 21 0 ---- ROTA
+08451 3675   -605   28 27 0 ---- JEREZ DE LA FRONTERA AEROPUERTO
+08452 3650   -625   9 1 0 ---- CADIZ, OBS.
+08458 3600   -558   25 32 0 ---- TARIFA
+08475 3660   -465   0 1147 0 ---- ALHAURIN EL GRANDE
+08482 3667   -448   7 16 0 ---- MALAGA/AEROPUERTO
+08487 3683   -235   21 21 0 ---- ALMERIA/AEROPUERTO
+08489 3683   -207   0 486 0 ---- NIJAR
+08911 4275   -62    0 1540 0 ---- ARAGUES DEL PUERTO, LIZARRA
+08912 4295   -80    0 1591 0 ---- ISABA,  EL FERIAL
+08913 4288   -78    0 1340 0 ---- ANSO, REFUGIO DE LINZA
+08914 4278   -52    0 1560 0 ---- CANDANCHU, ETUKSA
+08917 4275   -38    0 1780 0 ---- SALLENT DE GALLEGO,  FURCO
+08918 4277   -35    0 1560 0 ---- SALLENT DE GALLEGO,  FORMIGAL
+08920 4282   -28    0 2180 0 ---- SALLENT DE GALLEGO,  RESPOMUSO
+08922 4275   -23    0 1660 0 ---- PANTICOSA, REFUGIO CASA PIEDRA
+08924 4270   -27    0 1830 0 ---- PANTICOSA, ESQUI
+08925 4262   45     0 2150 0 ---- ERISTE, REFUGIO ANGEL ORUS
+08926 4265   0      0 2215 0 ---- FANLO, REFUGIO DE GORIZ
+08927 4267   8      0 1350 0 ---- BIELSA, REFUGIO DE PINETA
+08928 4267   47     0 1890 0 ---- BENASQUE, REFUGIO DE ESTOS
+08930 4255   53     0 2020 0 ---- CERLER, ESQU COTA 2000
+08932 4247   87     0 2280 0 ---- BOI TAHULL
+08934 4270   95     0 1870 0 ---- BAQUEIRA
+08936 4240   112    0 680 0 ---- SORT
+08938 4242   120    0 2080 0 ---- PORT AINE
+08940 4263   125    0 1100 0 ---- TAVESCAN
+08942 4217   155    0 1750 0 ---- PORT DEL COMTE
+08944 4233   190    0 2150 0 ---- MASELLA
+08946 4238   215    0 1967 0 ---- NURIA
+08948 4243   225    0 2160 0 ---- VALLTER 2000
+08958 4012   -103   0 1520 0 ---- CAMARENA DE LA SIERRA
+08960 4037   -62    0 1975 0 ---- VALDELINARES, ESQUI
+02013 6772   1747   542 541 0 ---- RITSEM
+02019 6842   1817   516 514 0 ---- KATTERJAKK A
+02020 6842   1817   517 516 0 ---- KATTERJAKK
+02024 6748   1828   0 425 0 ---- STORA SJOFALLET
+02028 6790   1860   0 1144 0 ---- TARFALA, SOL
+02029 6790   1860   1146 1144 0 ---- TARFALA
+02031 6807   1983   0 493 0 ---- RENSJON
+02036 6785   1902   467 466 0 ---- NIKKALUOKTA
+02038 6725   2027   0 453 0 ---- LATNIVAARA
+02044 6782   2033   446 460 0 ---- KIRUNA
+02045 6783   2040   424 424 0 ---- KIRUNA, SOL
+02049 6713   2063   359 358 0 ---- GALLIVARE
+02054 6803   2175   0 360 0 ---- NEDRE SOPPERO
+02055 6867   2152   0 402 0 ---- NAIMAKKA
+02064 6733   2223   0 240 0 ---- SAITTAROVA
+02071 5857   1613   58 55 0 ---- NORRKOPING, SOL
+02072 6772   2282   313 312 0 ---- PARKALOMPOLO
+02081 6843   2243   331 329 0 ---- KARESUANDO
+02091 5767   1833   49 49 0 ---- VISBY, SOL
+02095 6720   2338   165 163 0 ---- PAJALA
+02101 6580   1507   463 458 0 ---- HEMAVAN
+02102 6508   1450   0 1036 0 ---- STEKENJOKK
+02103 6577   1505   0 793 0 ---- HEMAVAN-GIEREVARTO
+02110 6532   1507   0 577 0 ---- GIELAS
+02119 6688   1802   316 314 0 ---- KVIKKJOKK ARRENJARKA A
+02120 6688   1802   315 320 0 ---- KVIKKJOKK-ARRENJARKA
+02121 6667   1610   615 614 0 ---- MIERKENIS
+02123 6632   1708   0 552 0 ---- JAKKVIK
+02124 6605   1783   432 431 0 ---- ARJEPLOG
+02126 6500   1768   277 275 0 ---- GUNNARN A
+02128 6500   1767   283 280 0 ---- GUNNARN
+02130 6648   1642   0 481 0 ---- ROPARUDDEN
+02135 6555   1785   0 393 0 ---- BURESJON
+02141 6630   1920   582 581 0 ---- TJAKAAPE
+02146 6650   1967   0 324 0 ---- VAJMAT
+02147 6515   1858   0 362 0 ---- MALA-BRANNAN
+02149 6558   1927   383 382 0 ---- ARVIDSJAUR
+02151 6648   2017   275 275 0 ---- JOKKMOKK FPL
+02154 6587   2015   182 182 0 ---- VIDSEL
+02161 6675   2092   0 327 0 ---- NATTAVAARA
+02170 6575   2175   0 12 0 ---- SAVAST
+02171 6580   2163   26 25 0 ---- BODEN
+02173 6567   2105   0 43 0 ---- ALVSBYN
+02174 6627   2112   186 184 0 ---- LAKATRASK
+02176 6503   2155   0 4 0 ---- PITE-RONNSKAR
+02181 6625   2283   61 60 0 ---- OVERKALIX-SVARTBYN
+02183 6553   2210   0 32 0 ---- LULEA, SOL
+02184 6680   2233   228 227 0 ---- PAHAROVA
+02185 6553   2210   34 17 0 T--- LULEA-KALLAX
+02186 6553   2212   17 17 0 ---- LULEA-KALLAX
+02188 6530   2237   0 1 0 ---- RODKALLEN
+02191 6568   2310   0 3 0 ---- STORON
+02196 6583   2410   6 6 0 ---- HAPARANDA
+02197 6582   2410   15 13 0 ---- HAPARANDA A
+02199 6662   2347   0 132 0 ---- YLINENJARVI
+02206 6328   1213   0 583 0 ---- STORLIEN-STORVALLEN
+02207 6327   1212   585 583 0 ---- STORLIEN-STORVALLEN A
+02209 6303   1227   0 1030 0 ---- SYLARNA
+02210 6318   1217   0 1090 0 ---- BLAHAMMAREN A
+02216 6330   1387   0 355 0 ---- MATTMAR
+02217 6337   1315   0 435 0 ---- ARE
+02219 6450   1422   555 553 0 ---- GADDEDE A
+02221 6383   1350   0 716 0 ---- KORSVATTNET
+02226 6318   1450   359 375 0 ---- OSTERSUND FROSON
+02229 6318   1447   0 374 0 ---- OSTERSUND, SOL
+02230 6422   1555   0 309 0 ---- GUBBHOGEN
+02231 6367   1460   0 361 0 ---- FOLLINGE
+02233 6497   1537   0 545 0 ---- SAXNAS
+02236 6377   1532   376 375 0 ---- HALLHAXASEN
+02242 6408   1623   0 241 0 ---- HOTING
+02243 6368   1695   220 218 0 ---- JUNSELE
+02245 6457   1683   349 348 0 ---- VILHELMINA
+02247 6315   1617   184 182 0 ---- KRANGEDE
+02254 6415   1732   308 307 0 ---- ASELE
+02256 6473   1740   0 575 0 ---- RISTRASK
+02260 6312   1825   142 141 0 ---- VASTMARKUM
+02261 6453   1872   211 209 0 ---- LYCKSELE
+02263 6407   1835   0 327 0 ---- FREDRIKA
+02265 6365   1855   183 182 0 ---- HEMLING
+02267 6340   1897   100 108 0 ---- ORNSKOLDSVIK
+02269 6318   1902   0 11 0 ---- SKAGSUDDE
+02271 6492   1937   310 309 0 ---- NORSJO
+02282 6457   1968   0 258 0 ---- PETISTRASK
+02283 6380   2023   0 22 0 ---- UMEA, SOL
+02284 6343   1967   7 6 0 ---- JARNASKLUBB
+02286 6380   2028   7 7 0 ---- UMEA
+02287 6380   2085   7 6 0 ---- HOLMON
+02292 6443   2127   0 105 0 ---- HOKMARKSBERGET
+02293 6462   2107   43 47 0 ---- SKELLEFTEA
+02297 6447   2157   36 39 0 ---- BJUROKLUBB
+02302 6183   1228   0 664 0 ---- STORBO/IDRE
+02303 6272   1272   0 995 0 ---- FLATRUET
+02307 6188   1285   0 868 0 ---- IDRE FJALL
+02308 6245   1267   724 723 0 ---- TANNAS
+02311 6115   1310   0 744 0 ---- HOGFJALLSHOTELLET
+02317 6208   1360   0 566 0 ---- DRAVAGEN
+02319 6275   1383   0 466 0 ---- BORTNAN
+02321 6125   1403   252 251 0 ---- ALVDALEN
+02324 6202   1418   363 360 0 ---- SVEG
+02325 6248   1415   802 801 0 ---- KLOVSJOHOJDEN
+02327 6203   1440   359 357 0 ---- SVEG A
+02329 6165   1498   455 453 0 ---- HAMRA
+02331 6275   1508   0 343 0 ---- HUNGE
+02337 6225   1567   0 320 0 ---- NORRHOG
+02338 6135   1572   184 183 0 ---- EDSBYN
+02343 6248   1627   100 98 0 ---- TORPSHAMMAR
+02347 6182   1653   71 70 0 ---- DELSBO
+02349 6275   1673   0 205 0 ---- SILLRE
+02354 6242   1733   0 80 0 ---- RASTA
+02355 6170   1752   10 8 0 ---- KUGGOREN
+02365 6252   1743   3 3 0 T-T- SUNDSVALL HARNOSAND
+02366 6252   1743   8 5 0 ---- SUNDSVALL HARNOSAND
+02368 6222   1773   0 17 0 ---- BRAMON
+02382 6263   1808   0 17 0 ---- LUNGO
+02403 5868   1310   0 53 0 ---- NAVEN
+02407 6067   1370   304 302 0 ---- MALUNG A
+02408 5922   1207   171 169 0 ---- BLOMSKOG
+02411 5967   1263   67 65 0 ---- ARVIKA
+02413 6075   1277   0 205 0 ---- BRATTMON
+02417 5875   1315   0 50 0 ---- PALGRUNDEN
+02418 5943   1333   99 107 0 ---- KARLSTAD FLYGPLATS
+02419 5935   1347   0 46 0 ---- KARLSTAD, SOL
+02423 5985   1312   0 109 0 ---- SUNNE
+02426 6015   1380   188 187 0 ---- GUSTAVSFORS
+02429 5965   1417   0 133 0 ---- DAGLOSEN
+02431 5987   1525   284 282 0 ---- KLOTEN
+02432 5922   1503   53 54 0 ---- OREBRO
+02435 6042   1550   149 145 0 ---- BORLANGE
+02440 6095   1642   0 161 0 ---- AMOT
+02441 6095   1450   197 195 0 ---- MORA
+02443 5965   1712   26 26 0 ---- ENKOPING
+02449 5937   1645   12 10 0 ---- ESKILSTUNA
+02450 6072   1755   0 3 0 ---- EGGEGRUND
+02452 5928   1488   0 218 0 ---- KILSBERGEN-SUTTARBODA
+02453 6072   1715   0 16 0 ---- GAVLE
+02456 6023   1790   34 33 0 ---- FILM
+02458 5990   1758   21 21 0 ---- UPPSALA
+02460 5962   1795   27 42 0 ---- STOCKHOLM-ARLANDA
+02462 5987   1763   13 13 0 ---- UPPSALA UNIVERSITY
+02464 5935   1788   13 15 0 ---- STOCKHOLM/BROMMA
+02468 6037   1513   0 492 0 ---- STORA SPANSBERGET
+02469 5917   1790   0 44 0 ---- TULLINGE
+02472 6012   1512   0 240 0 ---- SKEPPMORA
+02476 5905   1638   33 31 0 ---- FLODA
+02481 5990   1668   58 56 0 ---- SALA
+02482 6027   1697   57 55 0 ---- KERSTINBO
+02483 5935   1805   0 30 0 ---- STOCKHOLM, SOL
+02484 5935   1807   0 44 0 ---- STOCKHOLM/OBSERVATORIET
+02485 5935   1807   52 44 0 ---- STOCKHOLM
+02486 5935   1752   0 6 0 ---- ADELSO
+02487 5928   1870   17 16 0 ---- STAVSNAS
+02488 6052   1837   9 8 0 ---- ORSKAR
+02489 5907   1810   6 4 0 ---- BERGA
+02490 5982   1863   16 14 0 ---- SVANBERGA
+02492 5943   1950   0 10 0 ---- SVENSKA HOGARNA, SOL
+02493 5975   1940   0 14 0 ---- SODERARM
+02496 5943   1950   12 10 0 ---- SVENSKA HOGARNA
+02498 5943   1950   13 12 0 ---- SVENSKA HOGARNA A
+02500 5888   1100   34 33 0 ---- NORDKOSTER
+02501 5857   1105   23 22 0 ---- VADEROARNA
+02503 5888   1100   0 33 0 ---- NORDKOSTER, SOL
+02505 5808   1133   0 15 0 ---- MASESKAR
+02507 5865   1142   0 80 0 ---- HUD
+02513 5770   1198   3 2 0 ---- GOTEBORG
+02515 5818   1215   0 20 0 ---- TORPABRON
+02516 5762   1160   19 17 0 ---- VINGA
+02518 5730   1190   0 1 0 ---- NIDINGEN
+02520 5842   1270   54 54 0 ---- SATENAS
+02521 5860   1240   0 55 0 ---- BERGARUD
+02526 5767   1228   155 154 0 ---- GOTEBORG-LANDVETTER
+02527 5765   1228   164 164 0 T--- GOTEBORG/LANDVETTER
+02531 5768   1197   0 94 0 ---- GOTEBORG, SOL
+02536 5778   1317   298 297 0 ---- RANGEDALA
+02539 5710   1277   0 122 0 ---- ULLARED
+02540 5860   1218   0 173 0 ---- KROPPEFJALL-GRANAN
+02542 5832   1303   71 70 0 ---- HALLUM
+02544 5850   1450   93 94 0 ---- KARLSBORG
+02545 5857   1457   93 91 0 ---- AXSTAL
+02546 5887   1438   212 210 0 ---- GARDSJO
+02548 5808   1440   0 94 0 ---- VISINGSO
+02549 5748   1447   0 356 0 ---- TOMTABACKEN
+02550 5775   1407   223 220 0 ---- JONKOPING/AXAMO
+02552 5807   1523   0 197 0 ---- MALEXANDER
+02553 5807   1378   0 220 0 ---- KYMBO
+02554 5870   1502   0 225 0 ---- KETTSTAKA
+02556 5728   1413   169 169 0 ---- HAGSHULT
+02557 5788   1585   91 90 0 ---- HORN
+02558 5868   1630   154 153 0 ---- KOLMARDEN-STROMSFORS
+02559 5770   1645   0 30 0 ---- GLADHAMMAR
+02561 5863   1543   73 71 0 ---- KVARN
+02562 5838   1552   93 93 0 ---- LINKOPING/MALMSLATT
+02563 5825   1700   17 13 0 ---- HARSTENA
+02565 5738   1580   97 95 0 ---- MALILLA
+02567 5873   1787   19 18 0 ---- LANDSORT
+02573 5737   1708   0 2 0 ---- ORLANDS NORRA UDDE, SOL
+02574 5857   1613   34 33 0 ---- NORRKOPING
+02575 5737   1708   3 2 0 ---- OLANDS NORRA UDDE
+02587 5792   1895   0 12 0 ---- FAROSUND-AR
+02589 5838   1918   17 16 0 ---- GOTSKA SANDON
+02590 5767   1835   47 51 0 ---- VISBY
+02591 5765   1835   47 45 0 T-T- VISBY AEROLOGISKA STATION
+02595 5753   1842   0 35 0 ---- ROMA
+02598 5743   1898   0 5 0 ---- OSTERGARNSHOLM
+02602 5640   1293   0 140 0 ---- HALLANDSASEN
+02603 5685   1265   0 47 0 ---- BROEN
+02605 5643   1253   0 10 0 ---- HALLANDS VADERO
+02607 5628   1283   36 18 0 ---- ANGELHOLM-BARKAKRA
+02609 5547   1367   0 50 0 ---- RYNGE
+02611 5602   1275   44 43 0 ---- HELSINGBORG
+02615 5538   1282   3 1 0 ---- FALSTERBO A
+02616 5538   1282   5 3 0 ---- FALSTERBO
+02618 5693   1305   134 132 0 ---- TORUP
+02622 5685   1387   0 148 0 ---- LJUNGBY
+02623 5585   1367   0 113 0 ---- HORBY
+02625 5548   1432   5 4 0 ---- SKILLINGE
+02628 5600   1483   0 60 0 ---- HANO
+02629 5627   1393   104 102 0 ---- HASTVEDA
+02632 5595   1570   0 2 0 ---- UTKLIPPAN
+02633 5570   1320   0 86 0 ---- LUND, SOL
+02635 5557   1307   20 19 0 ---- MALMO
+02636 5552   1337   73 72 0 ---- MALMO-STURUP
+02643 5692   1472   0 182 0 ---- VAXJO, SOL
+02644 5618   1640   3 1 0 ---- OLANDS SODRA UDDE
+02646 5667   1645   0 0 0 ---- OLANDSBRON LAG
+02648 5683   1482   200 198 0 ---- VAXJO
+02652 5602   1410   0 10 0 ---- KRISTIANSTAD
+02661 5683   1547   231 230 0 ---- KOSTA (ORREFORS)
+02664 5627   1527   58 58 0 ---- RONNEBY-BREDAKRA
+02665 5610   1562   0 8 0 ---- KARLSKRONA, SOL
+02667 5613   1558   4 2 0 ---- KARLSKRONA-SODERSTJERNA
+02670 5668   1630   4 6 0 ---- KALMAR
+02679 5692   1815   36 34 0 ---- HOBURG A
+06600 4757   768    0 493 0 ---- ST. CHRISCHONA
+06601 4753   758    317 316 0 ---- BASEL / BINNINGEN
+06602 4735   733    439 439 0 ---- DELEMONT
+06604 4700   695    485 485 0 ---- NEUCHATEL
+06605 4712   705    1595 1599 2 ---- CHASSERAL
+06606 4703   705    432 431 0 ---- CRESSIER
+06607 4712   725    0 433 0 ---- BIEL
+06608 4705   698    1141 1073 2 ---- CHAUMONT
+06609 4653   702    1975 1974 2 ---- LE MOLESON
+06610 4680   693    490 490 0 T-T- PAYERNE
+06612 4708   678    1018 1018 2 ---- LA CHAUX-DE-FONDS
+06616 4742   693    597 596 0 ---- FAHY
+06617 4697   660    0 1048 0 ---- LA BREVINE
+06618 4675   658    436 435 0 ---- MATHOD
+06619 4683   657    1206 1205 2 ---- BULLET / LA FRETAZ
+06620 4768   862    439 438 0 ---- SCHAFFHAUSEN
+06621 4760   927    441 440 0 ---- GUETTINGEN
+06622 4778   858    0 740 0 ---- BARGEN
+06623 4765   902    719 718 2 ---- SALEN-REUTENEN
+06624 4768   847    420 419 0 ---- HALLAU
+06625 4677   710    647 646 2 ---- FRIBOURG / POSIEUX
+06626 4735   797    381 380 0 ---- GOESGEN
+06627 4647   713    1030 1029 2 ---- CHATEAU-D'OEX
+06628 4673   725    1043 1042 2 ---- PLAFFEIEN
+06629 4695   727    0 775 0 ---- MUEHLEBERG / STOCKEREN
+06630 4690   748    0 510 0 ---- BERN-BELPMOOS
+06631 4698   745    554 552 0 ---- BERN / ZOLLIKOFEN
+06632 4717   740    431 430 0 ---- GRENCHEN
+06633 4738   807    388 386 0 ---- BUCHS / AARAU
+06634 4697   752    0 941 0 ---- BANTIGER
+06635 4712   760    485 484 0 ---- KOPPIGEN
+06636 4697   727    481 479 0 ---- MUEHLEBERG
+06637 4672   817    590 588 0 ---- MEIRINGEN
+06638 4693   780    746 745 2 ---- LANGNAU I.E.
+06639 4700   793    1405 1403 2 ---- NAPF
+06641 4757   787    345 344 0 ---- MOEHLIN
+06643 4725   778    423 422 0 ---- WYNAU
+06644 4723   822    453 452 0 ---- MOSEN
+06645 4743   787    612 611 2 ---- RUENENBERG
+06646 4755   823    327 325 0 ---- BEZNAU
+06647 4753   822    335 334 0 ---- WUERENLINGEN
+06648 4717   800    522 521 0 ---- EGOLZWIL
+06650 4703   830    455 454 0 ---- LUZERN
+06651 4693   800    743 742 2 ---- SCHUEPFHEIM
+06655 4682   840    1036 1035 2 ---- ENGELBERG
+06656 4673   805    568 567 0 ---- BRIENZ
+06657 4683   818    476 475 0 ---- GISWIL
+06658 4693   828    0 442 0 ---- ALPNACH
+06659 4697   825    2103 2106 2 ---- PILATUS
+06660 4737   855    557 555 0 ---- ZUERICH / FLUNTERN
+06661 4728   850    0 928 0 ---- ALBIS
+06664 4742   852    444 443 0 ---- ZUERICH / AFFOLTERN
+06666 4758   818    342 341 0 ---- LEIBSTADT
+06669 4747   838    845 845 2 ---- LAEGERN
+06670 4747   853    427 426 0 ---- ZUERICH / KLOTEN
+06671 4767   897    399 398 0 ---- STECKBORN
+06672 4688   862    439 438 0 ---- ALTDORF
+06673 4722   867    486 485 0 ---- WAEDENSWIL
+06674 4718   845    442 440 0 ---- CHAM
+06675 4712   875    911 910 2 ---- EINSIEDELN
+06676 4713   860    0 724 0 ---- OBERAEGERI
+06677 4735   848    0 854 0 ---- UETLIBERG
+06678 4748   923    468 470 0 ---- BISCHOFSZELL
+06679 4747   890    539 539 0 ---- AADORF / TAENIKON
+06680 4723   933    2494 2502 3 ---- SAENTIS
+06681 4742   938    777 775 2 ---- ST. GALLEN
+06682 4692   917    959 958 2 ---- ELM
+06683 4722   893    409 408 0 ---- SCHMERIKON
+06685 4703   907    517 516 0 ---- GLARUS
+06686 4702   950    497 496 0 ---- BAD RAGAZ
+06687 4712   920    420 419 0 ---- QUINTEN
+06688 4683   917    2481 2480 3 ---- CRAP MASEGN
+06689 4737   893    1134 1132 2 ---- HOERNLI
+06690 4748   955    399 398 0 ---- ALTENRHEIN
+06693 4727   910    624 623 2 ---- EBNAT-KAPPEL
+06695 4663   858    906 1442 0 ---- ANDERMATT
+06699 4642   608    0 1680 0 ---- LA DOLE
+06700 4623   612    412 420 0 ---- GENEVE-COINTRIN
+06701 4658   622    0 1015 0 ---- LE CHENIT
+06702 4642   608    1670 1669 2 ---- LA DOLE
+06704 4652   633    684 683 2 ---- BIERE
+06705 4640   622    459 455 0 ---- NYON / CHANGINS
+06706 4648   643    0 425 0 ---- ST-PREX
+06708 4657   685    828 827 2 ---- ORON
+06709 4638   685    375 374 0 ---- BOUVERET
+06711 4650   667    456 455 0 ---- PULLY
+06712 4632   692    382 381 0 ---- AIGLE
+06714 4632   720    0 2966 0 ---- LES DIABLERETS
+06715 4617   702    0 480 0 ---- EVIONNAZ
+06717 4587   717    2487 2472 3 ---- COL DU GRAND ST-BERNARD
+06720 4622   732    482 482 0 ---- SION
+06722 4610   750    1828 1825 2 ---- EVOLENE / VILLA
+06723 4608   727    2734 2730 3 ---- LES ATTELAS
+06724 4628   745    1424 1427 2 ---- MONTANA
+06725 4642   782    0 1535 0 ---- BLATTEN, LOETSCHENTAL
+06727 4630   783    640 639 2 ---- VISP
+06728 4620   783    0 1550 0 ---- GRAECHEN
+06729 4660   793    0 2230 0 ---- MAENNLICHEN
+06730 4653   798    3576 3580 3 ---- JUNGFRAUJOCH
+06731 4675   760    0 560 0 ---- THUN
+06732 4673   757    0 638 0 ---- AMSOLDINGEN
+06733 4662   738    0 820 0 ---- BOLTIGEN
+06734 4667   787    578 577 0 ---- INTERLAKEN
+06735 4648   755    1326 1320 2 ---- ADELBODEN
+06739 4642   808    2894 2893 3 ---- EGGISHORN
+06740 4677   842    0 3040 0 ---- TITLIS
+06744 4657   833    1961 1980 2 ---- GRIMSEL HOSPIZ
+06745 4650   830    1347 1345 2 ---- ULRICHEN
+06747 4595   780    2887 2885 3 ---- MONTE ROSA
+06748 4602   775    1639 1638 2 ---- ZERMATT
+06749 4597   778    3130 3130 3 ---- GORNERGRAT
+06750 4665   860    2289 2287 2 ---- GUETSCH OB ANDERMATT
+06751 4643   850    1896 1894 2 ---- ROBIEI
+06752 4632   860    0 416 0 ---- CEVIO
+06753 4650   868    990 990 2 ---- PIOTTA
+06754 4640   892    0 2171 0 ---- MATRO
+06756 4645   893    576 575 0 ---- ACQUAROSSA / COMPROVASCO
+06757 4628   898    0 261 0 ---- LODRINO
+06758 4625   915    0 382 0 ---- GRONO
+06759 4620   878    1662 1661 2 ---- CIMETTA
+06760 4617   878    374 366 0 ---- LOCARNO / MONTI
+06762 4615   893    204 203 0 ---- MAGADINO / CADENAZZO
+06768 4603   883    0 1625 0 ---- MONTE LEMA
+06770 4600   895    301 273 0 ---- LUGANO
+06771 4583   892    352 353 0 ---- STABIO
+06775 4600   890    0 279 0 ---- LUGANO-AGNO
+06777 4592   900    1617 1608 2 ---- MONTE GENEROSO
+06778 4663   1027   1969 1968 2 ---- BUFFALORA
+06779 4643   975    0 1798 0 ---- SEGL-MARIA
+06780 4683   980    2673 2690 3 ---- WEISSFLUHJOCH
+06781 4675   903    0 800 0 ---- TAVANASA
+06782 4670   885    1198 1197 2 ---- DISENTIS / SEDRUN
+06783 4645   918    1640 1638 2 ---- S. BERNARDINO
+06784 4680   983    1595 1594 2 ---- DAVOS
+06785 4677   967    1846 1840 2 ---- AROSA
+06786 4687   952    557 556 0 ---- CHUR
+06787 4660   942    988 987 2 ---- ANDEER
+06791 4642   982    3302 3305 3 ---- PIZ CORVATSCH
+06792 4652   987    1709 1708 2 ---- SAMEDAN
+06793 4675   955    1570 1569 2 ---- VALBELLA
+06794 4633   1005   1079 1078 2 ---- POSCHIAVO / ROBBIA
+06795 4657   952    2671 2670 3 ---- PIZ MARTEGNAS
+06796 4660   1042   1384 1383 2 ---- STA. MARIA, VAL MUESTAIR
+06797 4640   1002   2257 2307 2 ---- PASSO DEL BERNINA
+06798 4678   1028   1305 1303 2 ---- SCUOL
+06799 4682   1025   2401 2400 3 ---- NALUNS / SCHLIVERA
+06801 4683   692    0 445 0 ---- PAYERNE
+06802 4622   733    0 482 0 ---- SION
+06805 4708   830    0 426 0 ---- EMMEN
+06806 4697   838    0 442 0 ---- BUOCHS
+06807 4738   862    0 435 0 ---- DUEBENDORF
+06808 4617   887    0 196 0 ---- MAGADINO
+06809 4628   898    0 259 0 ---- LODRINO
+06810 4707   907    0 447 0 ---- MOLLIS
+06842 4750   925    0 506 0 TPTP SITTERDORF
+06843 4585   893    0 360 0 TPTP LIGORNETTO
+06845 4743   787    0 611 0 TPTP RUENENBERG MIL
+06846 4672   950    0 2323 0 ---- SCALOTTAS
+06847 4678   803    0 2280 0 ---- BRIENZER ROTHORN
+06848 4693   960    0 1120 0 ---- VALZEINA
+06849 4722   948    0 436 0 TPTP SALEZ
+06850 4728   888    0 1115 0 ---- BACHTEL
+06851 4723   877    0 496 0 ---- HOMBRECHTIKON
+06852 4682   1033   0 1420 0 ---- SENT
+06853 4697   863    0 1921 0 ---- FRONALPSTOCK
+06901 4695   743    532 560 0 ---- BERN / BOLLWERK
+06902 4703   697    1138 1135 2 ---- CHAUMONT / BOSSET
+06903 4680   985    1639 1637 2 ---- DAVOS / SEEHORNWALD
+06904 4740   860    434 432 0 ---- DUEBENDORF / GIESSEN
+06905 4730   782    432 430 0 ---- HAERKINGEN
+06906 4747   835    690 688 2 ---- LAEGEREN / ZINDELEN
+06907 4652   663    527 535 0 ---- LAUSANNE
+06908 4707   845    1032 1031 2 ---- RIGI / SEEBODENALP
+06909 4737   852    407 409 0 ---- ZUERICH
+06990 4712   952    458 457 0 ---- VADUZ
+40001 3705   4122   455 455 0 ---- KAMISHLI
+40005 3682   3800   351 351 0 ---- JARABLUS
+40007 3618   3720   384 393 0 ---- ALEPPO INT. AEROPORT
+40007 3633   3722   425 424 0 T--- ALEPPO MESELME
+40009 3670   3895   349 348 0 ---- TEL ABIADH
+40016 3650   4075   308 307 0 ---- HASSAKAH
+40017 3593   3662   451 450 0 ---- EDLEB
+40022 3553   3577   7 7 0 ---- LATTAKIA
+40025 3540   3593   50 48 0 ---- BASEL ASSAD INT.  AIRPORT
+40027 3540   3785   460 458 0 ---- ETHERIA
+40029 3500   3703   481 480 0 ---- SALAMYA
+40030 3512   3675   303 301 0 ---- HAMA
+40039 3593   3902   246 245 0 ---- RAQQA
+40041 3493   3673   450 480 0 ---- AL-RASTAN
+40045 3532   4015   212 215 0 ---- DEIR EZZOR
+40050 3488   3588   5 3 0 ---- TARTOUS
+40055 3475   3672   485 483 0 ---- HOMS
+40061 3455   3830   404 408 0 ---- PALMYRA
+40066 3482   3613   359 353 0 ---- SAFITA
+40067 3270   3560   997 995 2 ---- SWEIDA
+40072 3442   4092   182 180 0 ---- ABUKMAL
+40080 3342   3652   609 608 0 --T- DAMASCUS INT. AIRPORT
+40083 3403   3672   1333 1330 2 ---- NABK
+40087 3348   3867   708 707 0 ---- JABAL ETTANF
+40095 3260   3610   543 543 0 ---- DARA'A
+13492 4102   2088   1750 0 2 ---- POPOVA SAPKA
+13493 4220   2233   696 691 0 ---- KRIVA PALANKA
+13571 4200   2097   462 0 0 ---- TETOVO
+13573 4152   2053   675 0 0 ---- DEBAR
+13575 4185   2087   885 0 0 ---- POZARANE-PGC
+13576 4170   2075   1240 0 2 ---- MAVROVO
+13577 4153   2070   1321 1332 2 ---- LAZAROPOLE
+13578 4112   2080   761 760 2 ---- OHRID
+13579 4110   2082   700 705 0 ---- OHRID-AERODROME
+13580 4085   2107   910 912 0 ---- PRETOR-PGC
+13581 4122   2147   0 0 2 ---- TOPOLCANI-PGC
+13582 4137   2125   1230 0 2 ---- KRUSEVO
+13583 4105   2137   589 586 0 ---- BITOLA
+13584 4173   2152   2540 0 3 ---- SOLUNSKA GLAVA
+13585 4133   2157   674 673 0 ---- PRILEP
+13586 4197   2165   239 238 0 T--- SKOPJE PETROVEC
+13588 4202   2140   301 302 0 ---- SKOPJE-ZAJCEV RID
+13589 4213   2172   0 338 0 ---- KUMANOVO
+13590 4190   2185   856 854 0 ---- GURISTE-PGC
+13591 4175   2218   327 326 0 ---- STIP
+13592 4142   2225   126 125 0 ---- DEMIR KAPIJA
+13593 4130   2242   1030 1031 0 ---- POZAR-PGC
+13594 4188   2250   513 518 0 ---- VINICA-PGC
+13595 4143   2265   224 0 0 ---- STRUMICA
+13597 4115   2250   59 60 0 ---- GEVGELIJA
+13598 4172   2285   836 834 2 ---- BEROVO
+13599 4143   2203   260 0 0 ---- KAVADARCI
+17020 4163   3233   33 30 0 ---- BARTIN
+17022 4145   3180   137 137 0 ---- ZONGULDAK
+17024 4198   3378   64 64 0 ---- INEBOLU
+17026 4203   3517   32 32 0 ---- SINOP
+17029 4128   3633   168 165 0 ---- SAMSUN/MEYDAN
+17030 4128   3630   4 4 0 T-T- SAMSUN
+17031 4125   3655   7 5 0 ---- CARSAMBA/SAMSUN
+17033 4098   3790   4 4 0 ---- ORDU
+17034 4092   3838   37 37 0 ---- GIRESUN
+17038 4100   3972   34 29 0 ---- TRABZON
+17040 4103   4052   9 9 0 ---- RIZE
+17042 4140   4143   33 33 0 ---- HOPA
+17045 4118   4182   628 628 0 ---- ARTVIN
+17046 4112   4272   1829 1829 2 ---- ARDAHAN
+17050 4167   2657   51 51 0 ---- EDIRNE
+17052 4173   2723   232 232 0 ---- KIRKLARELI
+17054 4113   2792   160 174 0 ---- CORLU
+17056 4098   2755   3 3 0 ---- TEKIRDAG
+17059 4125   2903   30 30 0 ---- KUMKOY
+17060 4097   2882   33 48 0 ---- ISTANBUL/ATATURK
+17061 4113   2907   58 30 0 ---- SARIYER
+17062 4090   2915   18 0 0 T-T- ISTANBUL/GOZTEPE
+17063 4088   2930   99 95 0 ---- SABIHA GOKCEN
+17067 4067   2983   18 18 0 ---- GOLCUK/DUMLUPINAR
+17068 4085   2990   70 54 0 ---- CENGIZTOPEL
+17069 4078   3042   30 30 0 ---- ADAPAZARI
+17070 4073   3160   743 743 0 ---- BOLU
+17072 4083   3117   146 146 0 ---- DUZCE
+17074 4137   3378   800 800 0 ---- KASTAMONU
+17078 4120   3263   259 259 0 ---- KARABUK
+17080 4060   3362   751 751 0 ---- CANKIRI
+17082 4085   3558   535 544 0 ---- MERZIFON
+17084 4055   3495   776 776 0 ---- CORUM
+17085 4065   3585   412 412 0 ---- AMASYA
+17086 4030   3657   608 608 0 ---- TOKAT
+17088 4047   3947   1219 1219 2 ---- GUMUSHANE
+17089 4025   4023   1584 1584 2 ---- BAYBURT
+17090 3975   3702   1285 1285 2 ---- SIVAS
+17092 3970   3952   1154 1153 2 ---- ERZINCAN
+17095 3990   4128   1869 1869 0 T-T- ERZURUM BOLGE
+17096 3995   4117   1758 1755 2 ---- ERZURUM
+17098 4055   4308   1795 1794 2 ---- KARS
+17099 3973   4305   1632 1632 2 ---- AGRI
+17100 3992   4405   858 858 0 ---- IGDIR
+17110 4018   2590   72 42 0 ---- GOKCEADA
+17111 3983   2607   30 30 0 ---- BOZCAADA
+17112 4013   2640   6 6 0 ---- CANAKKALE
+17115 4032   2797   42 51 0 ---- BANDIRMA
+17116 4018   2907   100 100 0 ---- BURSA
+17118 4023   2953   238 232 0 ---- YENISEHIR
+17119 4067   2928   4 4 0 ---- YALOVA
+17120 4015   2997   539 539 0 ---- BILECIK
+17124 3978   3057   786 786 0 ---- ESKISEHIR
+17127 4007   3257   840 843 0 ---- AKINCI
+17128 4012   3300   959 953 0 ---- ESENBOGA
+17129 3995   3268   806 799 0 ---- ETIMESGUT
+17130 3995   3288   891 891 0 T-T- ANKARA/CENTRAL
+17131 3993   3275   823 820 0 ---- GUVERCINLIK
+17135 3985   3352   748 748 0 ---- KIRIKKALE
+17140 3982   3480   1298 1298 2 ---- YOZGAT
+17145 3958   2702   21 21 0 ---- EDREMIT
+17150 3962   2792   102 103 0 ---- BALIKESIR
+17155 3942   2997   969 969 0 ---- KUTAHYA
+17160 3915   3417   1007 1000 2 ---- KIRSEHIR
+17162 3918   3607   1171 1171 2 ---- GEMEREK
+17165 3912   3955   981 981 0 ---- TUNCELI
+17170 3847   4335   0 1671 2 ---- VAN
+17175 3930   2670   4 4 0 ---- AYVALIK
+17180 3907   2688   3 3 0 ---- DIKILI
+17184 3892   2785   93 93 0 ---- AKHISAR
+17186 3862   2743   71 71 0 ---- MANISA
+17188 3868   2940   919 919 0 ---- USAK
+17189 3873   3060   1001 1012 2 ---- AFYONKARAHISAR/MEYDAN
+17190 3875   3053   1034 1034 2 ---- AFYON
+17191 3865   3295   969 969 0 ---- CIHANBEYLI
+17192 3838   3405   961 961 0 ---- AKSARAY
+17193 3862   3470   1260 1260 2 ---- NEVSEHIR
+17194 3877   3453   945 947 0 ---- KAPODOKYA
+17195 3882   3543   1054 1055 2 ---- KAYSERI/ERKILET
+17199 3835   3832   948 948 0 ---- MALATYA/BOLGE
+17200 3843   3808   849 862 0 ---- MALATYA/ERHAC
+17202 3860   3928   881 902 0 ---- ELAZIG
+17203 3887   4050   1177 1177 2 ---- BINGOL
+17204 3873   4152   1320 1320 2 ---- MUS
+17205 3848   4230   1665 1665 2 ---- TATVAN
+17210 3792   4195   896 890 0 ---- SIIRT
+17218 3852   2702   5 5 0 ---- IZMIR/CIGLI
+17219 3827   2715   120 125 0 ---- IZMIR/A. MENDERES
+17220 3843   2717   29 25 0 T-T- IZMIR/GUZELYALI
+17221 3830   2630   5 5 0 ---- CESME
+17232 3787   2725   22 20 0 ---- KUSADASI
+17234 3785   2785   56 55 0 ---- AYDIN
+17237 3778   2908   425 425 0 ---- DENIZLI
+17238 3767   3033   967 967 0 ---- BURDUR
+17239 3835   3142   1002 1002 2 ---- AKSEHIR
+17240 3775   3055   997 997 0 T-T- ISPARTA
+17241 3785   3037   870 864 0 ---- ISPARTA/SULEYMAN DEMIREL
+17244 3797   3255   1031 1032 2 ---- KONYA
+17246 3720   3322   1023 1023 2 ---- KARAMAN
+17248 3750   3405   1044 1044 2 ---- EREGLI/KONYA
+17250 3797   3468   1210 1208 2 ---- NIGDE
+17255 3760   3693   572 572 0 ---- KAHRAMANMARAS
+17260 3708   3737   701 705 0 ---- GAZIANTEP
+17262 3672   3712   638 638 0 ---- KILIS
+17265 3775   3828   672 672 0 ---- ADIYAMAN
+17270 3713   3877   549 549 0 ---- SANLIURFA
+17271 3743   3890   822 830 0 ---- GAP MEYDAN
+17272 3710   3885   452 452 0 ---- SANLIURFA/MEYDAN
+17275 3730   4073   1050 1050 2 ---- MARDIN
+17280 3788   4020   674 687 0 ---- DIYARBAKIR
+17281 3790   4020   675 675 0 T-T- DIYARBAKIR-BOLGE
+17282 3788   4112   540 545 0 ---- BATMAN
+17285 3757   4377   1728 1728 2 ---- HAKKARI
+17289 3723   2767   11 6 0 ---- BODRUM/MILAS
+17290 3703   2743   26 15 0 ---- BODRUM
+17291 3723   2767   11 6 0 ---- BODRUM MILAS
+17292 3722   2837   646 646 0 ---- MUGLA
+17295 3670   2878   5 7 0 ---- DALAMAN
+17296 3662   2912   3 3 0 ---- FETHIYE
+17297 3670   2767   28 10 0 ---- DATCA
+17298 3685   2827   16 5 0 ---- MARMARIS
+17300 3687   3073   64 51 0 ---- ANTALYA
+17302 3687   3070   47 45 0 ---- ANTALYA-BOLGE
+17310 3655   3200   6 6 0 ---- ALANYA
+17320 3608   3283   4 3 0 ---- ANAMUR
+17330 3638   3393   15 15 0 ---- SILIFKE
+17340 3680   3463   3 3 0 ---- MERSIN
+17350 3700   3542   66 73 0 ---- ADANA/INCIRLIK
+17351 3698   3535   27 27 0 T-T- ADANA/BOLGE
+17352 3698   3530   20 20 0 ---- ADANA
+17355 3717   3617   120 120 0 ---- OSMANIYE
+17370 3658   3617   4 4 0 ---- ISKENDERUN
+17372 3620   3617   100 100 0 ---- HATAY-ANTAKYA
+17375 3630   3015   2 2 0 ---- FINIKE
+17380 3620   2965   153 153 0 ---- KAS
+33049 5218   3258   161 160 0 ---- SEMENOVKA
+33058 5205   3395   190 190 0 ---- DRUZHBA
+33088 5128   2662   156 154 0 ---- SARNY
+33135 5147   3125   141 139 0 ---- CHERNIHIV
+33173 5122   2468   174 173 0 ---- KOVEL'
+33177 5083   2432   194 193 0 ---- VOLODYMYR-VOLYNS'KYI
+33187 5070   2550   232 233 0 ---- LUTS'K
+33213 5132   2878   170 168 0 ---- OVRUCH
+33228 5070   2958   132 132 0 ---- TETERIV
+33231 5128   3023   127 123 0 ---- CHORNOBYL'
+33246 5105   3190   126 124 0 ---- NIZHYN
+33261 5123   3320   149 144 0 ---- KONOTOP
+33268 5077   3345   169 168 0 ---- ROMNY
+33275 5085   3467   181 180 0 ---- SUMY
+33287 5025   2363   251 252 0 ---- RAVA-RUS'KA
+33297 5010   2515   228 227 0 ---- BRODY
+33301 5058   2613   231 227 0 ---- RIVNE
+33312 5060   2763   218 216 0 ---- NOVOHRAD-VOLYNS'KYI
+33317 5017   2703   278 277 0 T-T- SHEPETIVKA
+33325 5023   2873   224 219 0 ---- ZHYTOMYR
+33345 5040   3057   167 166 0 T-T- KIEV
+33347 5033   3097   122 121 0 ---- BORYSPIL'
+33356 5022   3180   128 125 0 ---- YAHOTYN
+33362 5058   3238   133 132 0 ---- PRILUKY
+33376 5037   3398   154 154 0 ---- HADIACH
+33377 5000   3302   158 156 0 ---- LUBNY
+33393 4982   2395   323 319 0 T-T- L'VIV
+33398 4935   2352   276 275 0 ---- DROHOBYCH
+33409 4943   2495   304 303 0 ---- BEREZHANY
+33415 4953   2567   329 327 0 ---- TERNOPIL'
+33429 4943   2698   350 350 0 ---- KHMEL'NYTS'KYI
+33446 4983   2888   258 257 0 ---- BILOPILLJA
+33464 4975   3012   180 179 0 ---- BILA TSERKVA
+33466 4967   3100   153 151 0 ---- MYRONIVKA
+33484 4968   3252   96 94 0 ---- ZOLOTONOSHA
+33487 4942   3205   107 106 0 ---- CHERKASY
+33495 4962   3327   96 96 0 ---- VESELYI PODIL
+33506 4960   3455   160 160 0 ---- POLTAVA
+33526 4897   2440   280 275 0 ---- IVANO-FRANKIVS'K
+33536 4902   2580   318 320 0 ---- CHORTKIV
+33548 4865   2667   222 217 0 ---- KAMIANETS'-PODIL' SKYI
+33557 4885   2727   290 292 0 ---- NOVA USHYTSIA
+33562 4923   2860   298 296 0 ---- VINNYTSIA
+33577 4880   2940   211 210 0 ---- HAISYN
+33586 4908   3090   215 214 0 ---- ZVENIHORODKA
+33587 4877   3023   216 214 0 ---- UMAN'
+33605 4908   3267   124 123 0 ---- CHYHYRYN
+33609 4872   3267   181 180 0 ---- ZNAMIANKA
+33614 4905   3325   84 85 0 ---- SVITLOVODS'K
+33621 4915   3420   118 115 0 ---- KOBELIAKY
+33631 4863   2227   124 115 0 T-T- UZHHOROD
+33651 4853   2503   298 295 0 ---- KOLOMYIA
+33657 4787   2522   763 762 0 ---- SELIATYN
+33658 4837   2590   246 242 0 T-T- CHERNIVTSI
+33663 4845   2778   78 77 0 ---- MOHYLIV-PODIL'S'KYI
+33699 4805   3085   103 105 0 ---- PERVOMAIS'K
+33705 4823   3140   211 211 0 ---- POMICHNA
+33711 4852   3220   171 170 0 ---- KIROVOHRAD
+33717 4807   3215   143 142 0 ---- BOBRYNETS'
+33723 4843   3390   118 118 0 ---- KOMISARIVKA
+33761 4785   3027   183 181 0 ---- LIUBASHIVKA
+33777 4757   3133   34 26 0 ---- VOZNESENS'K
+33791 4803   3322   124 123 0 T-T- KRYVYI RIH
+33805 4758   3445   55 53 0 ---- NIKOPOL'
+33833 4702   3075   73 72 0 ---- SERBKA
+33834 4685   3008   148 146 0 ---- ROZDIL'NA
+33837 4643   3077   42 42 0 T-T- ODESA
+33846 4703   3195   50 49 0 ---- MIKOLAIV
+33862 4732   3328   56 57 0 ---- VELYKA OLEKSANDRIVKA
+33869 4678   3337   25 26 0 ---- NOVA KAKHOVKA
+33877 4685   3440   53 54 0 ---- NIZHNI SIROHOZY
+33889 4537   2885   30 28 0 ---- IZMAIL
+33896 4602   2967   14 12 0 ---- SARATA
+33902 4663   3257   54 47 0 ---- KHERSON
+33907 4625   3230   7 6 0 ---- BEKHTERY
+33910 4617   3482   15 14 0 ---- HENICHES'K
+33915 4645   3388   30 28 0 ---- ASKANIIA-NOVA
+33924 4552   3270   10 9 0 ---- CHORNOMORS'KE
+33929 4518   3337   6 1 0 ---- YEVPATORIIA
+33939 4565   3420   37 37 0 ---- KLEPYNINE
+33945 4483   3395   176 172 0 ---- POSHTOVE
+33946 4468   3413   181 180 0 ---- SIMFEROPOL'
+33959 4468   3443   7 3 0 ---- ALUSHTA
+33962 4545   3473   20 19 0 ---- NYZHNIOHIRS'K
+33966 4503   3458   204 204 0 T-T- KRYMSKA
+33976 4503   3538   26 22 0 ---- FEODOSIIA
+33983 4540   3642   49 46 0 ---- KERCH
+33990 4448   3417   72 66 0 ---- YALTA
+33998 4443   3408   1180 1180 2 ---- AI-PETRI
+34300 4997   3613   155 154 0 T-T- KHARKIV
+34302 5020   3553   203 202 0 ---- BOHODUKHIV
+34312 5007   3738   175 174 0 ---- VELYKYI BURLUK
+34319 4963   3770   83 87 0 ---- KUPIANS'K
+34401 4938   3545   159 158 0 ---- KRASNOHRAD
+34407 4880   3525   127 127 0 ---- HUBYNYKHA
+34409 4890   3632   177 175 0 ---- LOZOVA
+34415 4918   3730   78 77 0 ---- IZIUM
+34421 4942   3817   89 86 0 ---- SVATOVE
+34434 4922   3958   75 74 0 ---- BILOVODS'K
+34504 4860   3497   143 141 0 ---- DNIPROPETROVS'K
+34509 4813   3623   175 173 0 ---- CHAPLYNE
+34510 4860   3798   124 123 0 ---- ARTEMIVS'K
+34519 4807   3777   225 224 0 ---- DONETS'K
+34523 4857   3925   62 59 0 ---- LUHANS'K
+34524 4835   3843   334 334 0 ---- DEBAL'TSEVE
+34537 4808   3950   302 300 0 ---- DAR'IVKA
+34601 4780   3502   112 107 0 ---- ZAPORIZHZHIA
+34607 4727   3533   88 87 0 ---- PRYSHYB
+34609 4733   3633   221 221 0 ---- KYRYLIVKA
+34615 4762   3735   267 266 0 ---- VOLNOVAKHA
+34622 4780   3852   164 164 0 ---- AMVROSIIVKA
+34704 4683   3537   34 33 0 ---- MELITOPOL'
+34708 4668   3585   19 17 0 ---- BOTIEVE
+34712 4703   3750   70 68 0 ---- MARIUPOL'
+03002 6073   -85    15 15 0 ---- BALTASOUND NO.2
+03005 6013   -118   82 82 0 T-T- LERWICK
+03008 5952   -162   57 68 0 ---- FAIR ISLE
+03010 5907   -440   12 12 0 ---- SULE SKERRY
+03014 6010   -205   22 22 0 ---- FOULA NO2
+03017 5895   -290   26 17 0 ---- KIRKWALL
+03023 5735   -738   4 4 0 T--- SOUTH UIST RANGE
+03026 5820   -632   15 7 0 ---- STORNOWAY AIRPORT
+03031 5772   -488   269 269 0 ---- LOCH GLASCARNOCH
+03034 5785   -562   11 11 0 ---- AULTBEA NO2
+03037 5725   -580   18 18 0 ---- SKYE:LUSA
+03039 5742   -568   0 773 0 ---- BEALACH NA BA NO2
+03041 5682   -497   0 1130 0 ---- AONACH MOR
+03044 5828   -443   81 81 0 ---- ALTNAHARRA NO2
+03047 5687   -470   249 249 0 ---- TULLOCH BRIDGE
+03062 5782   -397   4 4 0 ---- TAIN RANGE
+03063 5720   -382   228 228 0 ---- AVIEMORE
+03065 5710   -363   0 1237 0 ---- CAIRNGORM SUMMIT
+03066 5763   -355   5 6 0 T--- KINLOSS
+03068 5770   -332   7 12 0 ---- LOSSIEMOUTH
+03072 5687   -342   0 928 0 ---- CAIRNWELL
+03075 5845   -308   36 38 0 ---- WICK AIRPORT
+03080 5707   -283   140 140 0 ---- ABOYNE NO2
+03088 5685   -225   134 134 0 ---- INVERBERVIE NO.2
+03091 5720   -220   65 65 0 ---- DYCE
+03092 5750   -177   0 15 0 ---- PETERHEAD HARBOUR
+03100 5650   -687   9 11 0 ---- TIREE
+03105 5567   -623   13 17 0 ---- ISLAY:PORT ELLEN
+03111 5543   -568   10 12 0 ---- MACHRIHANISH
+03132 5485   -493   11 11 0 ---- WEST FREUGH
+03134 5590   -452   59 59 0 ---- GLASGOW BISHOPTON
+03136 5550   -458   27 19 0 ---- PRESTWICK, GANNET
+03144 5632   -372   35 35 0 ---- STRATHALLEN AIRFIELD
+03148 5642   -432   0 564 0 ---- GLEN OGLE
+03153 5480   -400   113 113 0 ---- DUNDRENNAN
+03155 5562   -373   245 245 0 ---- DRUMALBIN
+03158 5570   -238   112 112 0 ---- CHARTERHALL
+03162 5530   -320   236 236 0 ---- ESKDALEMUIR
+03166 5592   -333   57 57 0 ---- EDINBURGH GOGARBANK
+03171 5637   -285   10 11 0 T--- LEUCHARS
+03204 5408   -462   16 16 0 ---- RONALDSWAY
+03210 5452   -360   124 124 0 ---- ST BEES HEAD NO.2
+03212 5460   -315   81 81 0 ---- KESWICK
+03214 5412   -325   15 15 0 ---- WALNEY ISLAND
+03220 5493   -295   28 28 0 ---- CARLISLE
+03224 5505   -255   285 285 0 ---- SPADEADAM NO2
+03225 5450   -268   252 252 0 ---- SHAP
+03226 5457   -240   227 227 0 ---- WARCOP RANGE
+03227 5468   -245   0 847 0 ---- GREAT DUN FELL NO2
+03230 5528   -227   211 211 0 ---- REDESDALE CAMP
+03238 5502   -187   142 142 0 T-T- ALBEMARLE
+03240 5542   -160   23 22 0 ---- BOULMER
+03257 5428   -152   33 40 0 T--- LEEMING
+03261 5413   -140   33 35 0 ---- DISHFORTH AIRFIELD
+03265 5420   -138   25 28 0 ---- TOPCLIFFE
+03266 5403   -125   14 16 0 ---- LINTON-ON-OUSE
+03275 5455   -85    158 158 0 ---- LOFTUS
+03281 5435   -67    0 262 0 ---- FYLINGDALES
+03292 5408   -17    15 15 0 ---- BRIDLINGTON MRSC
+03301 5325   -437   60 61 0 ---- MONA
+03302 5325   -453   10 11 0 ---- VALLEY
+03305 5308   -393   216 216 0 ---- CAPEL CURIG NO3
+03313 5325   -350   77 77 0 ---- RHYL NO2
+03316 5348   -305   9 9 0 ---- CROSBY
+03318 5377   -303   0 10 0 ---- BLACKPOOL, SQUIRES GATE
+03321 5317   -298   10 13 0 ---- HAWARDEN AIRPORT
+03330 5312   -197   298 298 0 ---- LEEK THORNCLIFFE
+03344 5380   -187   262 262 0 ---- BINGLEY NO.2
+03346 5360   -167   0 267 0 ---- EMLEY MOOR NO 2
+03348 5333   -215   88 89 0 ---- WOODFORD
+03354 5300   -125   117 117 0 T-T- NOTTINGHAM, WATNALL
+03355 5383   -118   9 8 0 ---- CHURCH FENTON
+03373 5330   -53    57 61 0 ---- SCAMPTON
+03377 5317   -52    68 70 0 T--- WADDINGTON
+03379 5302   -50    63 66 0 ---- CRANWELL
+03382 5387   -43    7 8 0 ---- LECONFIELD
+03385 5347   15     8 8 0 ---- DONNA NOOK NO.2
+03391 5308   -17    6 7 0 ---- CONINGSBY
+03392 5308   27     3 3 0 ---- WAINFLEET NO2
+03405 5278   -473   95 95 0 ---- ABERDARON
+03409 5290   -357   0 163 0 ---- BALA
+03410 5275   -345   360 360 0 ---- LAKE VYRNWY NO2
+03414 5278   -265   72 75 0 T--- SHAWBURY
+03462 5260   -45    73 83 0 ---- WITTERING
+03469 5287   13     3 3 0 ---- HOLBEACH NO2
+03482 5265   55     21 23 0 ---- MARHAM
+03488 5293   112    21 21 0 ---- WEYBOURNE
+03502 5213   -457   133 133 0 --T- ABERPORTH
+03503 5233   -393   63 63 0 ---- TRAWSGOED
+03507 5205   -360   307 307 0 ---- SENNYBRIDGE NO2
+03520 5223   -288   99 99 0 ---- SHOBDON AIRFIELD
+03522 5207   -280   76 76 0 ---- HEREFORD, CREDENHILL
+03529 5213   -203   35 35 0 ---- PERSHORE
+03535 5247   -168   96 96 0 ---- COLESHILL
+03544 5235   -132   107 107 0 ---- CHURCH LAWFORD
+03560 5222   -45    85 85 0 ---- BEDFORD
+03590 5212   95     89 86 0 T--- WATTISHAM
+03604 5170   -505   44 44 0 ---- MILFORD HAVEN CONSERVANCY BOARD
+03605 5170   -437   6 3 0 ---- PEMBREY SANDS
+03609 5155   -397   43 43 0 ---- MUMBLES HEAD
+03628 5152   -257   59 56 0 ---- FILTON
+03647 5185   -168   210 210 0 ---- LITTLE RISSINGTON
+03649 5175   -157   82 87 0 T--- BRIZE NORTON
+03658 5162   -108   57 61 0 ---- BENSON
+03660 5167   -80    204 204 0 ---- HIGH WYCOMBE HQAIR
+03672 5153   -42    33 37 0 ---- NORTHOLT
+03684 5188   45     87 87 0 ---- ANDREWSFIELD
+03693 5155   82     2 2 0 ---- SHOEBURYNESS, LANDWICK
+03696 5185   127    0 5 0 ---- WALTON-ON-THE-NAZE
+03707 5108   -413   6 8 0 ---- CHIVENOR
+03710 5108   -360   348 348 0 ---- LISCOMBE
+03716 5140   -343   49 49 0 ---- ST. ATHAN
+03740 5150   -198   145 156 0 ---- LYNEHAM
+03743 5120   -180   132 132 0 --T- LARKHILL
+03746 5115   -175   126 124 0 ---- BOSCOMBE DOWN
+03749 5113   -157   90 90 0 ---- MIDDLE WALLOP
+03761 5123   -93    118 123 0 ---- ODIHAM
+03768 5127   -77    65 65 0 ---- SOUTH FARNBOROUGH
+03769 5113   -22    67 67 0 ---- CHARLWOOD
+03770 5150   -12    0 5 0 ---- LONDON, ST JAMES PARK
+03772 5147   -45    25 24 0 ---- HEATHROW
+03781 5130   -8     170 170 0 ---- KENLEY AIRFIELD
+03784 5145   30     3 3 0 ---- GRAVESEND, BROADNESS
+03796 5113   133    117 117 0 ---- LANGDON BAY
+03797 5133   133    49 54 0 ---- MANSTON
+03803 4990   -628   31 36 0 ---- SCILLY: ST MARY'S AIRPORT
+03808 5022   -532   87 87 0 T-T- CAMBORNE
+03809 5008   -525   76 81 0 ---- CULDROSE
+03823 5050   -467   200 200 0 ---- CARDINHAM, BODMIN
+03827 5035   -412   50 50 0 ---- PLYMOUTH, MOUNT BATTEN
+03839 5073   -340   0 31 0 ---- EXETER AIRPORT
+03840 5085   -323   252 255 0 PPPP DUNKESWELL AERODROME
+03853 5100   -263   20 22 0 ---- YEOVILTON
+03857 5052   -245   52 52 0 ---- ISLE OF PORTLAND
+03862 5077   -183   10 11 0 ---- HURN
+03866 5057   -128   20 20 0 ---- WIGHT: ST. CATHERINES POINT
+03872 5080   -92    4 4 0 ---- THORNEY ISLAND
+03874 5080   -120   9 9 0 ---- SOLENT
+03876 5083   -28    2 2 0 ---- SHOREHAM AIRPORT
+03882 5088   32     52 52 0 T-T- HERSTMONCEUX, WEST END
+03894 4942   -258   101 102 0 ---- GUERNSEY AIRPORT
+03895 4920   -218   84 84 0 ---- JERSEY AIRPORT
+03901 5432   -758   72 72 0 ---- THOMASTOWN
+03903 5438   -763   47 47 0 ---- ST ANGELO
+03904 5470   -757   49 49 0 ---- CASTLEDERG
+03907 5515   -693   0 6 0 ---- MAGILLIGAN NO 2
+03911 5472   -680   225 225 0 ---- LOUGH FEA
+03915 5485   -645   64 64 0 ---- PORTGLENONE
+03916 5517   -615   156 156 0 ---- BALLYPATRICK FOREST
+03917 5465   -622   63 81 0 ---- ALDERGROVE
+03918 5450   -633   18 0 0 T--- CASTOR BAY
+03923 5423   -650   161 161 0 ---- GLENANNE NO2
+88963 -6340  -5698  24 0 0 ---- BASE ESPERANZA
+88968 -6073  -4473  8 0 0 ---- BASE ORCADAS
+89034 -7787  -3462  256 0 0 ---- BASE BELGRANO II
+89053 -6223  -5863  11 0 0 ---- BASE JUBANY
+89055 -6423  -5672  200 208 0 --T- BASE MARAMBIO (CENTRO MET. ANTARTICO)
+89066 -6812  -6713  7 0 0 ---- BASE SAN MARTIN
+89564 -6760  6287   16 9 0 --T- MAWSON
+89570 -6847  7882   546 543 0 ---- DAVIS (WHOOP WHOOP)
+89571 -6857  7797   23 18 0 T--- DAVIS
+89577 -8037  7737   4084 4084 0 ---- DOME A
+89578 -7642  7702   2824 2824 0 ---- EAGLE
+89586 -6912  8598   2078 2078 0 ---- MOUNT BROWN
+89610 -6583  11307  90 90 0 ---- CASEY (CAPE POINSETT)
+89611 -6627  11052  42 40 0 T-T- CASEY
+89614 -6668  11150  727 727 0 ---- WILKINS RUNWAY WEST
+89615 -6667  11152  754 753 0 ---- WILKINS RUNWAY EAST
+89767 -7088  6987   84 84 0 ---- AMERY (G3)
+89807 -6655  10775  42 40 0 ---- CASEY (SNYDER ROCKS)
+89809 -6628  11075  398 392 0 ---- CASEY SKIWAY SOUTH
+89811 -6672  11283  1368 1366 0 ---- CASEY (LAW DOME SUMMIT)
+89815 -6657  11068  63 63 0 ---- CASEY (HAUPT NUNATAK)
+89250 -6208  -5840  267 0 0 ---- KING GEORGE ISLAND
+89252 -6208  -5838  18 20 0 ---- COMANDANTE FERRAZ
+89253 -6318  -5540  75 0 0 ---- JOINVILLE ISLAND
+89263 -6600  -6613  20 0 0 ---- BISCOE ISLANDS
+89056 -6218  -5898  0 48 0 ---- CENTRO MET. ANTARTICO PDTE. EDUARDO FREI
+89057 -6250  -5968  5 0 0 ---- BASE ARTURO PRAT
+89059 -6332  -5668  10 0 0 ---- BASE BERNARDO O'HIGGINS
+89058 -6222  -5897  10 0 0 ---- GREAT WALL
+89573 -6937  7637   18 0 0 ---- ZHONGSHAN
+89014 -7305  -1338  497 0 0 ---- NORDENSKIOLD BASE
+89642 -6665  14000  43 43 0 T--- DUMONT D'URVILLE
+89002 -7067  -825   50 50 0 --T- NEUMAYER
+89005 -7420  -975   1440 0 0 ---- KOTTAS ARGOS ID 3314
+89259 -8317  -5958  165 0 0 ---- FICHNER-RONNE SCHELFICE
+89514 -7077  1175   0 0 0 ---- MAITRI
+89625 -7510  12340  3234 3233 3 --T- CONCORDIA
+89646 -7165  14865  2095 2094 2 ---- SITRY POINT
+89648 -7253  14585  2510 2509 3 ---- MID POINT
+89659 -7363  16063  1925 1924 2 ---- PRIESTLEY GLACIER
+89661 -7352  16973  569 568 9 ---- CAPE PHILLIPS
+89662 -7468  16408  93 92 0 T-T- MARIO ZUCHELLI STATION (BAIA TERRA NOVA)
+89666 -7670  16297  151 150 0 ---- CAPE ROSS
+89532 -6900  3957   21 18 0 T-T- SYOWA
+89504 -7202  253    1284 1277 0 ---- TROLL
+89052 -6217  -5847  2 3 0 ---- ARCTOWSKI
+89004 -7170  -280   817 815 0 ---- S.A.N.A.E. AWS
+89064 -6265  -6038  12 0 0 ---- JUAN CARLOS I AWS
+89003 -7115  -668   694 0 0 ---- HALVFARRYGGEN EP11
+89016 -7310  -1315  363 0 0 ---- WASA EP5
+89018 -7447  -1152  1160 0 0 ---- SVEA EP6
+89507 -7500  0      2892 0 0 ---- KOHNEN EP9
+89251 -6222  -5875  11 10 0 ---- KING SEJONG
+89050 -6218  -5888  15 14 0 ---- BELLINGSHAUSEN
+89132 -7475  -13678 141 140 0 ---- RUSSKAJA
+89512 -7077  1182   123 118 0 T--- NOVOLAZAREVSKAJA
+89542 -6765  4585   50 48 0 ---- MOLODEZNAJA
+89574 -6937  7638   14 13 0 ---- PROGRESS
+89575 -6973  7370   46 45 0 ---- DRUZHNAYA-4
+89592 -6655  9300   44 43 0 T--- MIRNYJ
+89606 -7845  10685  3489 3488 3 ---- VOSTOK
+89657 -6950  15938  291 292 0 ---- LENINGRADSKAJA
+89108 -8900  -102   2755 0 0 ---- UNIV. WI ID 8985 (HENRY)
+89257 -7587  -5915  59 0 0 ---- UNIV. WI ID 8925 (LIMBERT AWS)
+89261 -6407  -6162  17 0 0 ---- UNIV. WI ID 8947 (RACER ROCK)
+89262 -6700  -6147  45 0 0 ---- UNIV. WI ID 8926 (LARSEN ICE SHELF)
+89266 -7220  -6017  115 0 0 ---- UNIV. WI ID 8902 (BUTLER ISLAND)
+89269 -6478  -6407  8 0 0 ---- UNIV. WI ID 8923 (BONAPARTE POINT)
+89272 -7478  -7148  1589 0 0 ---- UNIV. WI ID 8917 (SKY-BLU)
+89314 -8460  -11582 1463 0 0 ---- UNIV. WI ID 21358 (THERESA)
+89324 -8000  -11940 1530 0 0 ---- UNIV. WI ID 8903 (BYRD STATION)
+89327 -7320  -12705 230 0 0 ---- UNIV. WI ID 8981 (MOUNT SIPLE)
+89329 -8300  -12138 945 0 0 ---- UNIV. WI (HARRY)
+89332 -8262  -13708 549 0 0 ---- UNIV. WI ID 21361 (ELIZABETH)
+89345 -8165  -14878 620 0 0 ---- UNIV. WI ID 8900 (SIPLE DOME)
+89371 -6737  -17997 30 0 0 ---- UNIV. WI ID 8983 (SCOTT ISLAND)
+89376 -7998  -17860 55 55 0 ---- UNIV. WI ID 8911 (GILL)
+89377 -8252  -17445 55 0 0 ---- UNIV. WI ID 8908 (LETTAU)
+89643 -6682  14138  39 0 0 ---- UNIV. WI ID 8934 (PORT MARTIN)
+89667 -7795  16650  10 0 0 ---- UNIV. WI ID 8927 (PEGASUS NORTH)
+89734 -7732  3970   3810 0 0 ---- UNIV. WI ID 8982 (DOME FUJI)
+89744 -7402  4305   3353 0 0 ---- UNIV. WI ID 8918 (RELAY STAT)
+89768 -7855  16665  920 0 0 ---- UNIV. WI ID 21360 (MINNA BLUFF)
+89769 -7847  16838  50 0 0 ---- UNIV. WI ID 8919 (LINDA)
+89799 -8900  8967   2935 0 0 ---- UNIV. WI ID 8924 (NICO)
+89828 -7512  12337  3250 0 0 ---- UNIV. WI ID 8989 (DOME C II)
+89832 -6672  13983  243 0 0 ---- UNIV. WI ID 8914 (D-10)
+89834 -6740  13873  1560 0 0 ---- UNIV. WI ID 8916 (D-47)
+89847 -6762  14618  30 0 0 ---- UNIV. WI ID 8929 (PENGUIN POINT)
+89864 -7495  16368  80 0 0 ---- UNIV. WI ID 8905 (MANUELA)
+89865 -7613  16838  274 0 0 ---- UNIV. WI ID 8921 (WHITLOCK)
+89866 -7743  16375  84 0 0 ---- UNIV. WI ID 8906 (MARBLE POINT)
+89867 -7750  16715  3700 0 0 ---- UNIV. WI ID 8911
+89868 -7990  16998  60 0 0 ---- UNIV. WI ID 8913 (SCHWERDTFEGER)
+89869 -7995  16512  75 0 0 ---- UNIV. WI ID 8931 (MARILYN)
+89872 -7790  17082  45 0 0 ---- UNIV. WI ID 8934 (FERRELL)
+89873 -8313  17417  60 0 0 ---- UNIV. WI ID 8915 (ELAINE)
+89879 -7188  17120  30 0 0 ---- UNIV. WI ID 8984 (POSSESSION IS.)
+89009 -9000  0      2835 0 0 T-T- AMUNDSEN-SCOTT
+89049 -8567  -4638  1860 0 0 ---- AGO-2
+89061 -6477  -6408  8 0 0 ---- PALMER STATION
+89083 -7592  -8392  914 0 0 ---- SIPLE STATION
+89175 -7880  -17467 15 0 0 ---- BROCKTON
+89528 -8277  2858   2912 0 0 ---- AGO-3
+89598 -8202  9677   3565 0 0 ---- AGO-4
+89627 -7723  12352  3084 0 0 ---- AGO-5
+89628 -8387  12962  2865 0 0 ---- AGO-1
+89637 -6952  13002  2560 0 0 ---- AGO-6
+89664 -7785  16667  24 0 0 T-T- MCMURDO
+89674 -7787  16697  8 0 0 ---- WILLIAMS FIELD
+89013 -8277  -1305  1968 0 0 ---- BALDRICK AWS
+89020 -7558  -2617  0 0 0 ---- BRUNT AWS
+89022 -7558  -2670  33 33 0 --T- HALLEY
+89062 -6757  -6812  33 0 0 ---- ROTHERA
+89062 -6755  -6812  0 3 0 --T- ROTHERA
+89065 -7132  -6828  66 0 0 ---- FOSSIL BLUFF
+89081 -8030  -8133  905 0 0 ---- PATRIOT HILLS AWS
+89087 -8520  -8788  1634 0 0 ---- THIEL MOUNTAINS AWS
+89063 -6525  -6427  11 0 0 ---- VERNADSKY
+89054 -6218  -5885  17 0 0 ---- DINAMET-URUGUAY
+99020 7150   1900   0 0 0 ---- AMI (RESEARCH VESSEL)
+99090 6600   200    0 0 0 TPTP FORMER MIKE
+11134 4722   1203   0 1250 0 ---- GERLOS
diff --git a/src/Stations/station.h b/src/Stations/station.h
new file mode 100755
index 0000000..00c1104
--- /dev/null
+++ b/src/Stations/station.h
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _STATION_H_
+#define _STATION_H_
+
+
+typedef struct {
+	long lat;
+	long lon;
+	char flags[13];
+	int station_height;
+} position;
+
+typedef struct {
+	int ident;
+	position pos;
+	int barometre_height;
+	int pressure_level;
+	char name[1024];
+} station;
+
+
+#if 0
+/* utils.cc */
+int same(const char *p, const char *q);
+int inbox(double lat, double lon, double north, double west, double south, double east);
+
+/* this function now in Mars:
+char *upcase(const char *p); */
+
+char *nice_name(const char *p);
+int open_database(char c);
+
+int open_EPS_stationfile( ifstream* EPS_file );
+int read_one_station( ifstream* EPS_file, station& st );
+#endif
+
+
+#endif
diff --git a/src/Stations/stbase.c b/src/Stations/stbase.c
new file mode 100644
index 0000000..4935afc
--- /dev/null
+++ b/src/Stations/stbase.c
@@ -0,0 +1,696 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <stdlib.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/CascadeB.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/List.h>
+#include <Xm/PanedW.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/Separator.h>
+#include <Xm/TextF.h>
+#include <Xm/ToggleB.h>
+#include <Xm/CascadeBG.h>
+#include <Xm/LabelG.h>
+
+#include <Drag.h>
+#define XmCreateDrawingArea CreateDragWidget
+
+#include "stbase.h"
+
+extern void help_callback(Widget, XtPointer, XtPointer) ;
+extern void text_activate_callback(Widget, XtPointer, XtPointer) ;
+extern void list_browse_callback(Widget, XtPointer, XtPointer) ;
+extern void quit_callback(Widget, XtPointer, XtPointer) ;
+extern void plot_sel_callback(Widget, XtPointer, XtPointer) ;
+extern void plot_all_callback(Widget, XtPointer, XtPointer) ;
+extern void clear_callback(Widget, XtPointer, XtPointer) ;
+extern void names_callback(Widget, XtPointer, XtPointer) ;
+
+Widget xd_links [ 5 ];
+
+void XDmanage_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtManageChild ( *(Widget *)client_data );
+}
+
+void XDunmanage_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtUnmanageChild ( *(Widget *)client_data );
+}
+
+void XDpopup_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtPopup ( *(Widget *)client_data, XtGrabNone );
+}
+
+void XDpopdown_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtPopdown ( *(Widget *)client_data );
+}
+
+void XDmap_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtMapWidget (*(Widget *)client_data);
+}
+
+void XDunmap_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtUnmapWidget (*(Widget *)client_data);
+}
+
+void XDenable_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtSetSensitive (*(Widget *)client_data, TRUE);
+}
+
+void XDdisable_link ( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	if ( client_data && *(Widget *)client_data )
+		XtSetSensitive (*(Widget *)client_data, FALSE);
+}
+
+Widget top = (Widget) NULL;
+Widget form = (Widget) NULL;
+Widget label_info = (Widget) NULL;
+Widget sub_form = (Widget) NULL;
+Widget search_option = (Widget) NULL;
+Widget search_menu = (Widget) NULL;
+Widget row_pos = (Widget) NULL;
+Widget label_lat = (Widget) NULL;
+Widget text_lat = (Widget) NULL;
+Widget label2 = (Widget) NULL;
+Widget text_lon = (Widget) NULL;
+Widget label_thr = (Widget) NULL;
+Widget text_thr = (Widget) NULL;
+Widget row_area = (Widget) NULL;
+Widget label_n = (Widget) NULL;
+Widget text_n = (Widget) NULL;
+Widget label_w = (Widget) NULL;
+Widget text_w = (Widget) NULL;
+Widget label_s = (Widget) NULL;
+Widget text_s = (Widget) NULL;
+Widget label_e = (Widget) NULL;
+Widget text_e = (Widget) NULL;
+Widget row_name = (Widget) NULL;
+Widget text_name = (Widget) NULL;
+Widget row_ident = (Widget) NULL;
+Widget text_ident = (Widget) NULL;
+Widget row_wmo = (Widget) NULL;
+Widget text_wmo = (Widget) NULL;
+Widget drag = (Widget) NULL;
+Widget list_stbase = (Widget) NULL;
+Widget plot_sel_button = (Widget) NULL;
+Widget plot_all_button = (Widget) NULL;
+Widget helpw = (Widget) NULL;
+
+
+
+void create_top (Display *display, char *app_name, int app_argc, char **app_argv)
+{
+	Widget children[8];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XtPointer tmp_value;             /* ditto */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget label1 = (Widget)NULL;
+	Widget cascade1 = (Widget)NULL;
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button5 = (Widget)NULL;
+	Widget panedWindow1 = (Widget)NULL;
+	Widget scrolledWin1 = (Widget)NULL;
+	Widget scrollbar1 = (Widget)NULL;
+	Widget scrollbar2 = (Widget)NULL;
+	Widget scrolledList1 = (Widget)NULL;
+	Widget button6 = (Widget)NULL;
+	Widget separator1 = (Widget)NULL;
+	Widget menuBar1 = (Widget)NULL;
+	Widget cascade2 = (Widget)NULL;
+	Widget menu1 = (Widget)NULL;
+	Widget button7 = (Widget)NULL;
+	Widget cascade3 = (Widget)NULL;
+	Widget menu2 = (Widget)NULL;
+	Widget separator2 = (Widget)NULL;
+	Widget toggle1 = (Widget)NULL;
+	Widget toggle2 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Metview Stations Database"); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	top = XtAppCreateShell ( app_name, "Metview", applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form = XmCreateForm ( top, "form", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+	label_info = XmCreateLabel ( form, "label_info", al, ac );
+	ac = 0;
+	sub_form = XmCreateForm ( form, "sub_form", al, ac );
+	search_option = XmCreateOptionMenu ( sub_form, "search_option", al, ac );
+	label1 = XmOptionLabelGadget ( search_option );
+	cascade1 = XmOptionButtonGadget ( search_option );
+	XtSetArg(al[ac], XmNx, 3); ac++;
+	XtSetArg(al[ac], XmNy, 3); ac++;
+	XtSetValues ( label1,al, ac );
+	ac = 0;
+	search_menu = XmCreatePulldownMenu ( search_option, "search_menu", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Search by Name", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button1 = XmCreatePushButton ( search_menu, "NAME", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Search by Identifier", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button2 = XmCreatePushButton ( search_menu, "IDENT", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Search by WMO block", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button3 = XmCreatePushButton ( search_menu, "WMO_BLOCK", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Search by Position", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button4 = XmCreatePushButton ( search_menu, "POSITION", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Search by Area", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button5 = XmCreatePushButton ( search_menu, "AREA", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNx, 10); ac++;
+	XtSetArg(al[ac], XmNy, 3); ac++;
+	XtSetValues ( cascade1,al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNnumColumns, 0); ac++;
+	XtSetArg(al[ac], XmNspacing, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
+	row_pos = XmCreateRowColumn ( sub_form, "POSITION", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 28); ac++;
+	XtSetArg(al[ac], XmNheight, 29); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Lat", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	XtSetArg(al[ac], XmNrecomputeSize, TRUE); ac++;
+	label_lat = XmCreateLabel ( row_pos, "label_lat", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNwidth, 37); ac++;
+	XtSetArg(al[ac], XmNheight, 29); ac++;
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_lat = XmCreateTextField ( row_pos, "P", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_lat, "51.38" );
+	xmstrings[0] = XmStringCreateLtoR ( "Lon", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	label2 = XmCreateLabel ( row_pos, "label2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_lon = XmCreateTextField ( row_pos, "P", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_lon, "-0.78" );
+	XtSetArg(al[ac], XmNwidth, 30); ac++;
+	XtSetArg(al[ac], XmNheight, 30); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Toler", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	label_thr = XmCreateLabel ( row_pos, "label_thr", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNwidth, 76); ac++;
+	XtSetArg(al[ac], XmNheight, 31); ac++;
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_thr = XmCreateTextField ( row_pos, "P", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_thr, "0.5" );
+	xd_links [3] = row_pos;
+	XtSetArg(al[ac], XmNnumColumns, 0); ac++;
+	XtSetArg(al[ac], XmNspacing, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
+	row_area = XmCreateRowColumn ( sub_form, "AREA", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringCreateLtoR ( "N", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	label_n = XmCreateLabel ( row_area, "label_n", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_n = XmCreateTextField ( row_area, "A", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_n, "52.0" );
+	xmstrings[0] = XmStringCreateLtoR ( "W", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	label_w = XmCreateLabel ( row_area, "label_w", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_w = XmCreateTextField ( row_area, "A", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_w, "-1.0" );
+	xmstrings[0] = XmStringCreateLtoR ( "S", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	label_s = XmCreateLabel ( row_area, "label_s", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_s = XmCreateTextField ( row_area, "A", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_s, "51.0" );
+	xmstrings[0] = XmStringCreateLtoR ( "E", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
+	label_e = XmCreateLabel ( row_area, "label_e", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNcolumns, 7); ac++;
+	text_e = XmCreateTextField ( row_area, "A", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_e, "0.0" );
+	xd_links [2] = row_area;
+	XtSetArg(al[ac], XmNnumColumns, 0); ac++;
+	XtSetArg(al[ac], XmNspacing, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
+	row_name = XmCreateRowColumn ( sub_form, "NAME", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNcolumns, 20); ac++;
+	text_name = XmCreateTextField ( row_name, "N", al, ac );
+	ac = 0;
+	xd_links [4] = row_name;
+	XtSetArg(al[ac], XmNnumColumns, 0); ac++;
+	XtSetArg(al[ac], XmNspacing, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
+	row_ident = XmCreateRowColumn ( sub_form, "IDENT", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNcolumns, 5); ac++;
+	text_ident = XmCreateTextField ( row_ident, "I", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_ident, "03772" );
+	xd_links [1] = row_ident;
+	XtSetArg(al[ac], XmNnumColumns, 0); ac++;
+	XtSetArg(al[ac], XmNspacing, 0); ac++;
+	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
+	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
+	row_wmo = XmCreateRowColumn ( sub_form, "WMO_BLOCK", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNcolumns, 5); ac++;
+	text_wmo = XmCreateTextField ( row_wmo, "W", al, ac );
+	ac = 0;
+	XmTextFieldSetString ( text_wmo, "03" );
+	xd_links [0] = row_wmo;
+	panedWindow1 = XmCreatePanedWindow ( form, "panedWindow1", al, ac );
+	XtSetArg(al[ac], XmNscrollBarDisplayPolicy, XmSTATIC); ac++;
+	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
+	scrolledWin1 = XmCreateScrolledWindow ( panedWindow1, "scrolledWin1", al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar1); ac++;
+	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar2); ac++;
+	XtGetValues(scrolledWin1, al, ac );
+	ac = 0;
+	drag = XmCreateDrawingArea ( scrolledWin1, "drag", al, ac );
+	XtSetArg(al[ac], XmNvisibleItemCount, 11); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	list_stbase = XmCreateScrolledList ( panedWindow1, "list_stbase", al, ac );
+	ac = 0;
+	scrolledList1 = XtParent ( list_stbase );
+
+	XtSetArg(al[ac], XmNvisibleItemCount, 11); ac++;
+	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
+	XtSetValues ( list_stbase,al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringCreateLtoR ( "Close", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNmarginTop, 5); ac++;
+	XtSetArg(al[ac], XmNmarginBottom, 5); ac++;
+	XtSetArg(al[ac], XmNmarginLeft, 5); ac++;
+	XtSetArg(al[ac], XmNmarginRight, 5); ac++;
+	button6 = XmCreatePushButton ( form, "button6", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	separator1 = XmCreateSeparator ( form, "separator1", al, ac );
+	menuBar1 = XmCreateMenuBar ( form, "menuBar1", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "File", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	cascade2 = XmCreateCascadeButton ( menuBar1, "cascade2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	menu1 = XmCreatePulldownMenu ( menuBar1, "menu1", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Close", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button7 = XmCreatePushButton ( menu1, "button7", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Plot", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	cascade3 = XmCreateCascadeButton ( menuBar1, "cascade3", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	menu2 = XmCreatePulldownMenu ( menuBar1, "menu2", al, ac );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "Selection", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	plot_sel_button = XmCreatePushButton ( menu2, "plot_sel_button", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
+	xmstrings[0] = XmStringCreateLtoR ( "All", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	plot_all_button = XmCreatePushButton ( menu2, "plot_all_button", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	separator2 = XmCreateSeparator ( menu2, "separator2", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Clear plot window", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	XtSetArg(al[ac], XmNset, TRUE); ac++;
+	toggle1 = XmCreateToggleButton ( menu2, "toggle1", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Names", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	toggle2 = XmCreateToggleButton ( menu2, "toggle2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Help", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	helpw = XmCreateCascadeButton ( menuBar1, "helpw", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	XtSetArg(al[ac], XmNmenuHelpWidget, helpw); ac++;
+	XtSetValues ( menuBar1,al, ac );
+	ac = 0;
+
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, separator1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNrightWidget, button6); ac++;
+	XtSetValues ( label_info,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, separator1); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( sub_form,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopWidget, menuBar1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, sub_form); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( panedWindow1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( button6,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, button6); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( separator1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( menuBar1,al, ac );
+	ac = 0;
+	if (form)
+		XtAddCallback( form, XmNhelpCallback, help_callback, (XtPointer) 0 );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( search_option,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 187); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( row_pos,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, -1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 186); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( row_area,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, search_option); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( row_name,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, search_option); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( row_ident,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftWidget, search_option); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetValues ( row_wmo,al, ac );
+	ac = 0;
+	XtAddCallback (button1,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[0] );
+	XtAddCallback (button1,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[1] );
+	XtAddCallback (button1,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[2] );
+	XtAddCallback (button1,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[3] );
+	XtAddCallback (button1,XmNactivateCallback, XDmanage_link, (XtPointer) &xd_links[4] );
+	XtAddCallback (button2,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[0] );
+	XtAddCallback (button2,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[4] );
+	XtAddCallback (button2,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[2] );
+	XtAddCallback (button2,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[3] );
+	XtAddCallback (button2,XmNactivateCallback, XDmanage_link, (XtPointer) &xd_links[1] );
+	XtAddCallback (button3,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[3] );
+	XtAddCallback (button3,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[2] );
+	XtAddCallback (button3,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[4] );
+	XtAddCallback (button3,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[1] );
+	XtAddCallback (button3,XmNactivateCallback, XDmanage_link, (XtPointer) &xd_links[0] );
+	XtAddCallback (button4,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[0] );
+	XtAddCallback (button4,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[1] );
+	XtAddCallback (button4,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[4] );
+	XtAddCallback (button4,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[2] );
+	XtAddCallback (button4,XmNactivateCallback, XDmanage_link, (XtPointer) &xd_links[3] );
+	XtAddCallback (button5,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[0] );
+	XtAddCallback (button5,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[1] );
+	XtAddCallback (button5,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[4] );
+	XtAddCallback (button5,XmNactivateCallback, XDunmanage_link, (XtPointer) &xd_links[3] );
+	XtAddCallback (button5,XmNactivateCallback, XDmanage_link, (XtPointer) &xd_links[2] );
+	children[ac++] = button1;
+	children[ac++] = button2;
+	children[ac++] = button3;
+	children[ac++] = button4;
+	children[ac++] = button5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, search_menu); ac++;
+	XtSetValues(cascade1, al, ac );
+	ac = 0;
+	if (text_lat)
+		XtAddCallback( text_lat, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	if (text_lon)
+		XtAddCallback( text_lon, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	if (text_thr)
+		XtAddCallback( text_thr, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	children[ac++] = label_lat;
+	children[ac++] = text_lat;
+	children[ac++] = label2;
+	children[ac++] = text_lon;
+	children[ac++] = label_thr;
+	children[ac++] = text_thr;
+	XtManageChildren(children, ac);
+	ac = 0;
+	if (text_n)
+		XtAddCallback( text_n, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	if (text_w)
+		XtAddCallback( text_w, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	if (text_s)
+		XtAddCallback( text_s, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	if (text_e)
+		XtAddCallback( text_e, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	children[ac++] = label_n;
+	children[ac++] = text_n;
+	children[ac++] = label_w;
+	children[ac++] = text_w;
+	children[ac++] = label_s;
+	children[ac++] = text_s;
+	children[ac++] = label_e;
+	children[ac++] = text_e;
+	XtManageChildren(children, ac);
+	ac = 0;
+	if (text_name)
+		XtAddCallback( text_name, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	children[ac++] = text_name;
+	XtManageChildren(children, ac);
+	ac = 0;
+	if (text_ident)
+		XtAddCallback( text_ident, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	children[ac++] = text_ident;
+	XtManageChildren(children, ac);
+	ac = 0;
+	if (text_wmo)
+		XtAddCallback( text_wmo, XmNactivateCallback, text_activate_callback, (XtPointer) 0 );
+	children[ac++] = text_wmo;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = search_option;
+	children[ac++] = row_pos;
+	children[ac++] = row_area;
+	children[ac++] = row_name;
+	children[ac++] = row_ident;
+	children[ac++] = row_wmo;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = drag;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XmScrolledWindowSetAreas(scrolledWin1, scrollbar1, scrollbar2, drag );
+	if (list_stbase)
+		XtAddCallback( list_stbase, XmNbrowseSelectionCallback, list_browse_callback, (XtPointer) 0 );
+	XtManageChild(list_stbase);
+	children[ac++] = scrolledWin1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	if (button6)
+		XtAddCallback( button6, XmNactivateCallback, quit_callback, (XtPointer) 0 );
+	if (button7)
+		XtAddCallback( button7, XmNactivateCallback, quit_callback, (XtPointer) 0 );
+	children[ac++] = button7;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu1); ac++;
+	XtSetValues(cascade2, al, ac );
+	ac = 0;
+	if (plot_sel_button)
+		XtAddCallback( plot_sel_button, XmNactivateCallback, plot_sel_callback, (XtPointer) 0 );
+	if (plot_all_button)
+		XtAddCallback( plot_all_button, XmNactivateCallback, plot_all_callback, (XtPointer) 0 );
+	if (toggle1)
+		XtAddCallback( toggle1, XmNvalueChangedCallback, clear_callback, (XtPointer) 0 );
+	if (toggle2)
+		XtAddCallback( toggle2, XmNvalueChangedCallback, names_callback, (XtPointer) 0 );
+	children[ac++] = plot_sel_button;
+	children[ac++] = plot_all_button;
+	children[ac++] = separator2;
+	children[ac++] = toggle1;
+	children[ac++] = toggle2;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu2); ac++;
+	XtSetValues(cascade3, al, ac );
+	ac = 0;
+	if (helpw)
+		XtAddCallback( helpw, XmNactivateCallback, help_callback, (XtPointer) 0 );
+	children[ac++] = cascade2;
+	children[ac++] = cascade3;
+	children[ac++] = helpw;
+	XtManageChildren(children, ac);
+	ac = 0;
+	children[ac++] = label_info;
+	children[ac++] = sub_form;
+	children[ac++] = panedWindow1;
+	children[ac++] = button6;
+	children[ac++] = separator1;
+	children[ac++] = menuBar1;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form);
+}
+
diff --git a/src/Stations/stbase.h b/src/Stations/stbase.h
new file mode 100644
index 0000000..2c467f1
--- /dev/null
+++ b/src/Stations/stbase.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+#ifndef _stbase_h
+#define _stbase_h
+
+#define XD_MOTIF
+
+
+
+extern Widget top;
+extern Widget form;
+extern Widget label_info;
+extern Widget sub_form;
+extern Widget search_option;
+extern Widget search_menu;
+extern Widget row_pos;
+extern Widget label_lat;
+extern Widget text_lat;
+extern Widget label2;
+extern Widget text_lon;
+extern Widget label_thr;
+extern Widget text_thr;
+extern Widget row_area;
+extern Widget label_n;
+extern Widget text_n;
+extern Widget label_w;
+extern Widget text_w;
+extern Widget label_s;
+extern Widget text_s;
+extern Widget label_e;
+extern Widget text_e;
+extern Widget row_name;
+extern Widget text_name;
+extern Widget row_ident;
+extern Widget text_ident;
+extern Widget row_wmo;
+extern Widget text_wmo;
+extern Widget eps_only;
+extern Widget drag;
+extern Widget list_stbase;
+extern Widget plot_sel_button;
+extern Widget plot_all_button;
+extern Widget helpw;
+
+extern void create_top (Display *display, char *app_name, int app_argc, char **app_argv)
+;
+
+#endif
diff --git a/src/Stations/stcback.cc b/src/Stations/stcback.cc
new file mode 100644
index 0000000..9d22a65
--- /dev/null
+++ b/src/Stations/stcback.cc
@@ -0,0 +1,925 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <inc_iostream.h>
+#include <Xm/Xm.h>
+#include <Xm/List.h>
+#include <Xm/Text.h>
+#include <mars.h>
+#include <drop.h>
+#include <math.h>
+#include <gdbm.h>
+#include <fcntl.h>
+#include <Metview.h>
+#include "station.h"
+#include "utils.h"
+
+extern "C" {
+	void quit_callback(Widget,XtPointer,XtPointer);
+	void text_activate_callback(Widget,XtPointer,XtPointer);
+	void list_browse_callback(Widget,XtPointer,XmListCallbackStruct*);
+	void help_callback(Widget,XtPointer,XtPointer);
+	void clear_callback(Widget,XtPointer,XmToggleButtonCallbackStruct*);
+	void names_callback(Widget,XtPointer,XmToggleButtonCallbackStruct*);
+	void map_callback(Widget,XtPointer,XtPointer);
+	void plot_sel_callback(Widget,XtPointer,XtPointer);
+	void plot_all_callback(Widget,XtPointer,XtPointer);
+	void EPS_only_callback(Widget,XtPointer,XtPointer);
+#include <xec.h>
+#include "stbase.h"
+};
+
+svc *service;
+char title[256];
+
+XtAppContext app_context;
+Display *display;       /*  Display             */
+
+XtWorkProcId wp   = 0;  // NULL;
+char *name        = 0;
+svcid *curr_id    = 0; 
+long wmo_ident    = 0;  //-- 'ident' caused problems on HP
+char mode         = 'n';
+double north,south,east,west,threshold;
+Boolean   clear   = True;
+Boolean   names   = False;
+MvRequest  window;
+Boolean    user_defined = False;
+
+ifstream* EPS_file = NULL;
+int  current_EPS_mode = 0;
+int  EPS_mode         = 0;
+
+Icon       icon_sel   = NULL;
+Icon       icon_all   = NULL;
+request   *req_sel    = NULL;
+request   *req_all    = NULL;
+
+int cnt;
+
+
+Boolean work(XtPointer);
+Boolean work_WMO_stations();
+Boolean work_EPS_stations();
+
+
+class ReqId {
+public:
+	ReqId(const char *s,request *r)     { call_service(service,s,r,long(this)); }
+	virtual void reply(request *) = 0;
+	virtual ~ReqId()              {};
+};
+
+void EPS_only_callback(Widget,XtPointer,XtPointer)
+{
+  if( current_EPS_mode == 0 )
+    {
+      ++current_EPS_mode;
+    }
+  else
+    {
+      current_EPS_mode = 0;
+    }
+}
+
+
+void help_callback(Widget w,XtPointer,XtPointer)
+{
+	if(w == helpw) w = form;
+	show_help_page(service,XtName(w),XtName(w));
+}
+
+void clear_callback(Widget,XtPointer,XmToggleButtonCallbackStruct *cb)
+{
+	clear = cb->set;
+}
+
+void names_callback(Widget,XtPointer,XmToggleButtonCallbackStruct *cb)
+{
+	names = cb->set;
+}
+
+void plot(request *r,Icon icon)
+{
+  const char cTAB = '\t';
+  err e;
+
+  MvRequest in = r;
+  //  in.print();
+
+  if(window == NULL)                    //-- build display window (mapview)
+    {
+      MvRequest coast = "PCOAST";
+
+      coast("SUBPAGE_FRAME_COLOUR") = "TAN";
+      coast("MAP_COASTLINE_COLOUR") = "OCHRE";
+      coast("MAP_GRID_COLOUR")      = "TAN";
+      coast("MAP_LABEL")            = "OFF";
+
+      MvRequest w = "MAPVIEW";
+      w("COASTLINES")             = coast;
+      w("PAGE_ID_LINE_USER_TEXT") = "Station database results";
+      w("MAP_PROJECTION")         = "CYLINDRICAL";
+
+      window = MvRequest(wait_service(service,"PlotMod",w,&e));
+    }
+
+  in("_CLASS") = "STATIONS";
+  in("_NAME")  = DragGetIconName(drag,icon);
+
+  MvRequest st = wait_service(service,"station",in,&e);
+
+  const char* gpfname = marstmp();      //-- create GeoPoints file --
+  ofstream gpf( gpfname );
+  if( ! gpf )
+    {
+      marslog( LOG_EROR, "Unable to open GeoPoints work file...\n" );
+      return;
+    }
+
+  gpf << "#GEO\n";
+  gpf << "#FORMAT XYV\n";
+  gpf << "#DATA" << endl;
+
+  while( st )                           //-- if several stations
+    {
+      MvRequest one = st.justOneRequest();
+
+      double x = one( "LONGITUDE" );
+      double y = one( "LATITUDE" );
+
+      static char fixed[ 512 ];
+      strcpy( fixed, one( "NAME" ) );
+      char* p = fixed;
+      while( p && *p )
+	{
+	  if( *p == ' ' )   //-- Q&D fix to keep name together
+	    *p = '_';       //-- i.e. replace spaces by underlines
+	  ++p;
+	}
+
+      gpf  << x << cTAB << y << cTAB << fixed << endl;
+      cout << x << cTAB << y << cTAB << fixed << endl;
+
+      st.advance();
+    }
+
+  gpf.close();
+
+  MvRequest req = window;                //-- display window (via mapview)
+  if(clear)
+    req = req + MvRequest("CLEAN");
+
+  MvRequest gp( "GEOPOINTS" );
+  gp( "PATH" ) = gpfname;
+
+  req = req + gp;                        //-- geopoints file
+
+  MvRequest marker = "PSYMB";
+  marker("SYMBOL_TYPE") = "MARKER";
+  marker("SYMBOL_INPUT_MARKER_LIST") = 15;
+  marker("SYMBOL_COLOUR") = "RED";
+
+  req = req + marker;                    //-- symbol marker visdef
+	
+  if(names)
+    {
+      MvRequest name = "PSYMB";
+      name("SYMBOL_TYPE") = "TEXT";
+
+      req = req + name;                  //-- symbol name (if requested)
+    }
+
+  //  req.print();
+
+  call_service(service,"PlotMod",req,0); //-- let PlotMod plot geopoints
+}
+
+void plot_sel_callback(Widget,XtPointer,XtPointer)
+{
+	plot(req_sel,icon_sel);
+}
+
+void plot_all_callback(Widget,XtPointer,XtPointer)
+{
+	plot(req_all,icon_all);
+}
+
+void add(station& st)
+{
+
+	char buf[1024];
+
+	char ns = st.pos.lat>0?'N':'S';
+	char ew = st.pos.lon>0?'E':'W';
+
+	int lat = st.pos.lat> 0 ? st.pos.lat : -st.pos.lat;
+	int lon = st.pos.lon> 0 ? st.pos.lon : -st.pos.lon;
+
+
+	sprintf(buf,
+		"%05d  %2d.%02d%c %3d.%02d%c  %s  %s",
+		st.ident,
+		lat/100,lat%100,ns,
+		lon/100,lon%100,ew,
+		st.pos.flags,
+		nice_name(st.name));
+
+	xec_AddListItem(list_stbase,buf);
+}
+
+Boolean work(XtPointer)
+{
+  if( EPS_mode != 0 )
+    return work_EPS_stations();
+  else
+    return work_WMO_stations();
+}
+
+Boolean work_WMO_stations()
+{
+	static datum key;  /* static because we need to keep it for subsequent searches */
+	if(db == NULL) {
+		open_database(mode);
+		if(db == NULL) {
+			xec_SetLabel(label_info,"Cannot open WMO station database");
+			wp = 0;   //NULL;
+			return True;
+		}
+		key = gdbm_firstkey(db);
+		cnt = 0;
+		xec_SetLabel(label_info,"Searching...");
+		user_defined = False;
+	}
+	else key = gdbm_nextkey(db, key);
+
+	if(key.dptr == NULL)
+	{
+		gdbm_close(db);
+		wp = 0;  // NULL;
+		db = NULL;
+		if(cnt == 0)
+			xec_SetLabel(label_info,"No WMO stations found");
+		else
+			xec_VaSetLabel(label_info,
+				"%d matching record%s found, make your selection!",cnt,cnt>1?"s":"");
+		return True;
+	}
+
+	datum content = gdbm_fetch(db,key);
+	station st;
+	memcpy(&st,content.dptr,MIN(content.dsize,sizeof(st)));
+
+	int ok = 0;
+
+	switch(mode)
+	{
+		case 'n':
+			ok = (name==0) || same(name,st.name);
+			break;
+
+		case 'i':
+			if(wmo_ident < 100) ok = st.ident / 1000 == wmo_ident;
+			else ok = wmo_ident == st.ident;
+			break;
+
+		case 'l':
+			ok = inbox(st.pos.lat/100.0,st.pos.lon/100.0,north,west,south,east);
+			break;
+	}
+
+	if(ok)
+	{
+		add(st);
+		cnt++;
+		if(cnt == 1) {
+			XtSetSensitive(plot_all_button,True);
+			icon_all =  DragAddIcon(drag,"STATIONS",title,(void*)&req_all,0,0);
+		}
+	}
+
+	return False;
+
+}
+Boolean work_EPS_stations()
+{
+  if( EPS_file == NULL )
+    {
+      if( ! open_EPS_stationfile( EPS_file ) )
+	{
+	  xec_SetLabel(label_info,"Cannot open EPS station file");
+	  wp = 0;   // NULL;
+	  return true;
+	}
+      cnt = 0;
+      xec_SetLabel(label_info,"Searching...");
+      user_defined = False;
+    }
+
+  station st;
+
+  if( ! read_one_station( EPS_file, st ) )
+    {
+      //-- search is over; clean up...
+      delete EPS_file;
+      EPS_file = NULL;
+      wp = 0;  // NULL;
+
+      if( cnt == 0 )
+	xec_SetLabel(label_info,"No EPS stations found");
+      else
+	xec_VaSetLabel(label_info,
+		       "%d matching record%s found, make your selection!",cnt,cnt>1?"s":"");
+      return True;
+    }
+
+  int ok = 0;
+
+  switch(mode)
+    {
+      case 'n':
+	ok = (name==0) || same(name,st.name);
+	break;
+
+      case 'i':
+	if(wmo_ident < 100)
+	  ok = st.ident / 1000 == wmo_ident;
+	else
+	  ok = wmo_ident == st.ident;
+	break;
+
+      case 'l':
+	ok = inbox(st.pos.lat/100.0,st.pos.lon/100.0,north,west,south,east);
+	break;
+    }
+
+  if( ok )
+    {
+      //-- station matches, add it...
+      add( st );
+      ++cnt;
+      if( cnt == 1 )
+	{
+	  XtSetSensitive(plot_all_button,True);
+	  icon_all = DragAddIcon(drag,"STATIONS",title,(void*)&req_all,0,0);
+	}
+    }
+
+  return False;
+}
+
+void delete_sel_icon()
+{
+	if(icon_sel) DragDeleteIcon(drag,icon_sel);
+	icon_sel = NULL;
+	XtSetSensitive(plot_sel_button,False);
+}
+
+void delete_all_icon()
+{
+	if(icon_all) DragDeleteIcon(drag,icon_all);
+	icon_all = NULL;
+	XtSetSensitive(plot_all_button,False);
+}
+
+void stop()
+{
+	delete_sel_icon();
+	if(db) gdbm_close(db);
+	if(wp) XtRemoveWorkProc(wp);
+	wp = 0; // NULL;
+	db = NULL;
+}
+
+void build_list(void)
+{
+	stop();
+	EPS_mode = current_EPS_mode;
+	delete_all_icon();
+	XmListDeleteAllItems(list_stbase);
+	XtSetSensitive(plot_all_button,False);
+	wp = XtAppAddWorkProc(app_context,work,NULL);
+}
+
+double text2num(Widget w)
+{
+	char *p = XmTextGetString(w);
+	double n = atof(p);
+	XtFree(p);
+	return n;
+}
+
+void quit_callback(Widget,XtPointer,XtPointer)
+{
+  if(curr_id)
+    send_reply(curr_id,0);
+
+  exit(0);
+}
+
+void list_browse_callback(Widget,XtPointer,XmListCallbackStruct *cb)
+{
+	char *p = xec_GetString(cb->item);
+	int  nameOffset = current_EPS_mode ? 25 : 29;
+
+	delete_sel_icon();
+
+	char id[80];
+
+	sscanf(p,"%s",id);
+
+	request *r = empty_request("INPUT");
+	set_value(r,"NAME", "%s",p+nameOffset);
+	set_value(r,"IDENT","%s",id);
+	set_value(r,"WMO_BLOCK","%02d",atol(id)/1000);
+
+	if(req_sel) free_all_requests(req_sel);
+	if(user_defined) 
+		req_sel = clone_all_requests(req_all);
+	else
+	{
+		req_sel = empty_request("STATIONS");
+		set_value(req_sel,"IDENT","%s",id);
+		set_value(req_sel,"SEARCH_KEY","IDENT");
+		set_value(req_sel,"SEARCH_STATIONS_DATABASE","YES");
+	}
+
+	if( EPS_mode != 0 )
+	  set_value(req_sel,"SEARCH_STATIONS_DATABASE","EPS");
+
+	icon_sel =  DragAddIcon(drag,"STATIONS",p+nameOffset,(void*)&req_sel,0,0);
+	XtSetSensitive(plot_sel_button,True);
+
+	if(curr_id) 
+	  send_progress(curr_id,NULL,r);
+
+	free_all_requests(r);
+	XtFree(p);
+}
+
+void show(const char *p)
+{
+	Widget w1 = XtNameToWidget(search_menu,p);
+	Widget w2 = XtNameToWidget(sub_form,p);
+
+	if(!w1 || !w2) return;
+
+	Arg arg;
+	XtSetArg(arg,XmNmenuHistory, w1 );
+	XtSetValues(search_option,&arg,1);
+
+	XtUnmanageChild(row_pos);
+	XtUnmanageChild(row_area);
+	XtUnmanageChild(row_name);
+	XtUnmanageChild(row_ident);
+	XtUnmanageChild(row_wmo);
+
+	XtManageChild(w2);
+}
+
+void set_text(Widget w,const char *x)
+{
+	XmTextSetString(w,(char*)(x?x:""));
+}
+
+void set_text(Widget w,long n)
+{
+	char buf[30];
+	sprintf(buf,"%ld",n);
+	set_text(w,buf);
+}
+
+void set_text(Widget w,double n)
+{
+	char buf[30];
+	sprintf(buf,"%g",n);
+	set_text(w,buf);
+}
+
+void new_req_all(char p)
+{
+	double a,b,c,d;
+	int n,w,s,e;
+
+	if(req_all) free_all_requests(req_all);
+	req_all = empty_request("STATIONS");
+
+	if( EPS_mode != 0 )
+	  set_value(req_all,"SEARCH_STATIONS_DATABASE","EPS");
+	else
+	  set_value(req_all,"SEARCH_STATIONS_DATABASE","YES");
+
+	switch(p)
+	{
+		case 'N':
+			sprintf(title,"Name starts with '%s'",name);
+			set_value(req_all,"NAME","%s",name);
+			set_value(req_all,"SEARCH_KEY","NAME");
+			break;
+		
+		case 'I':
+			sprintf(title,"Identifier is %05d",wmo_ident);
+			set_value(req_all,"IDENT","%05d",wmo_ident);
+			set_value(req_all,"SEARCH_KEY","IDENT");
+			break;
+
+		case 'W':
+			sprintf(title,"WMO block is %02d",wmo_ident);
+			set_value(req_all,"WMO_BLOCK","%02d",wmo_ident);
+			set_value(req_all,"SEARCH_KEY","WMO_BLOCK");
+			break;
+
+		case 'P':
+			a = north - threshold;
+			b = west  + threshold;
+			n = int(fabs(a)*100);
+			w = int(fabs(b)*100);
+			e = int(fabs(threshold)*100);
+			sprintf(title,"Position is %d.%0d%c %d.%0d%c (+-%d.%0d)",
+				n/100,n%100,a>0?'N':'S',
+				w/100,w%100,b>0?'E':'W',
+				e/100,e%100);
+			set_value(req_all,"POSITION","%g",a);
+			add_value(req_all,"POSITION","%g",b);
+			set_value(req_all,"THRESHOLD","%g",threshold);
+			set_value(req_all,"SEARCH_KEY","POSITION");
+			break;
+
+		case 'A':
+			a = north; n = int(fabs(a)*100);
+			b = west ; w = int(fabs(b)*100);
+			c = south; s = int(fabs(c)*100);
+			d = east ; e = int(fabs(d)*100);
+			sprintf(title,"Area is %d.%0d%c %d.%0d%c %d.%0d%c %d.%0d%c",
+				n/100,n%100,a>0?'N':'S',
+				w/100,w%100,b>0?'E':'W',
+				s/100,s%100,c>0?'N':'S',
+				e/100,e%100,d>0?'E':'W'
+				);
+			set_value(req_all,"AREA","%g",a);
+			add_value(req_all,"AREA","%g",b);
+			add_value(req_all,"AREA","%g",c);
+			add_value(req_all,"AREA","%g",d);
+			set_value(req_all,"SEARCH_KEY","AREA");
+			break;
+	}
+
+}
+
+void map_callback(Widget w,XtPointer,XtPointer)
+{
+}
+
+void text_activate_callback(Widget w,XtPointer,XtPointer)
+{
+	char c = *XtName(w);
+	char *p;
+
+	switch(c)
+	{
+		case 'N':
+			mode = 'n';
+			p = XmTextGetString(text_name);
+			strfree(name);
+			name = strcache(p);
+			XtFree(p);
+			break;
+		
+		case 'I':
+			mode = 'i';
+			wmo_ident = (long)text2num(text_ident);
+			break;
+
+		case 'W':
+			mode = 'i';
+			wmo_ident = (long)text2num(text_wmo);
+			break;
+
+		case 'P':
+			mode = 'l';
+			threshold = text2num(text_thr);
+			north     = text2num(text_lat); north += threshold;
+			west      = text2num(text_lon); west  -= threshold;
+			south     = text2num(text_lat); south -= threshold;
+			east      = text2num(text_lon); east  += threshold;
+			break;
+
+		case 'A':
+			mode = 'l';
+			north  = text2num(text_n);
+			west   = text2num(text_w);
+			south  = text2num(text_s);
+			east   = text2num(text_e);
+			if(north < south)
+			{
+				double tmp = north;
+				north      = south;
+				south      = tmp;
+			}
+			break;
+	}
+	new_req_all(c);
+	build_list();
+}
+
+void serve_station(svcid *id,request *,void *)
+{
+	if(XtIsRealized(top))
+		XMapRaised(XtDisplay(top),XtWindow(top));
+	send_reply(id,0);
+}
+
+void serve_input(svcid *id,request *r,void *)
+{
+  //if(curr_id)
+  //	send_reply(curr_id,0);
+
+	curr_id = id;
+		
+	if(XtIsRealized(top))
+		XMapRaised(XtDisplay(top),XtWindow(top));
+
+	print_all_requests(r);
+
+	const char *p;
+	stop();
+
+	if(p = get_value(r,"NAME",0))
+	{
+		mode = 'n';
+		strfree(name);
+		name = strcache(p);
+		set_text(text_name,p);
+		show("NAME");
+		new_req_all('N');
+	}
+
+	if(p = get_value(r,"IDENT",0))
+	{
+		mode = 'i';
+		wmo_ident = atol(p);
+		set_text(text_ident,p);
+		show("IDENT");
+		new_req_all('I');
+	}
+
+	if(p = get_value(r,"WMO_BLOCK",0))
+	{
+		mode = 'i';
+		wmo_ident = atol(p);
+		set_text(text_wmo,p);
+		show("WMO_BLOCK");
+		new_req_all('W');
+	}
+
+	build_list();
+}
+
+
+void serve_drop(svcid *id,request *r,void *)
+{
+	r = r->next;
+
+	while(r)
+	{
+		if(strcmp(r->name,"STATIONS") == 0)
+		{
+			const char *p = get_value(r,"SEARCH_STATIONS_DATABASE",0);
+			if(p)
+			{
+				if(*p == 'N')
+				{
+					stop();
+					XmListDeleteAllItems(list_stbase);
+					delete_all_icon();
+					xec_SetLabel(label_info,"User defined location");
+					user_defined = True;
+					station st;
+
+					p = get_value(r,"IDENT",0);
+					st.ident   = p?atol(p):0;
+					set_text(text_ident,(long)st.ident);
+
+					p = get_value(r,"POSITION",0);
+					st.pos.lat = long(p?atof(p)*100.0:0.0);
+					set_text(text_lat,st.pos.lat/100.0);
+
+					p = get_value(r,"POSITION",1);
+					st.pos.lon = long(p?atof(p)*100.0:0.0);
+					set_text(text_lon,st.pos.lon/100.0);
+
+					p = get_value(r,"NAME",0);
+					strcpy(st.name,p?p:"?");
+					set_text(text_name,st.name);
+					add(st);
+
+					if(req_all) free_all_requests(req_all);
+					req_all = clone_all_requests(r);
+					XtSetSensitive(plot_all_button,True);
+					icon_all =  DragAddIcon(drag,"STATIONS",
+						mbasename(get_value(r,"_NAME",0)),(void*)&req_all,0,0);
+				}
+				else
+				{
+					p = get_value(r,"SEARCH_KEY",0);
+					if(p)
+					{
+						char c;
+						show(p);
+						stop();
+						switch(c = *p)
+						{
+						case 'N':
+							mode = 'n';
+							strfree(name);
+							name = strcache(get_value(r,"NAME",0));
+							set_text(text_name,name);
+							break;
+
+						case 'I':
+							mode = 'i';
+							p = get_value(r,"IDENT",0);
+							set_text(text_ident,p);
+							wmo_ident   = p?atol(p):0;
+							break;
+
+						case 'W':
+							mode = 'i';
+							p = get_value(r,"WMO_BLOCK",0);
+							set_text(text_wmo,p);
+							wmo_ident   = p?atol(p):0;
+							break;
+
+						case 'P':
+							mode = 'l';
+
+							p = get_value(r,"THRESHOLD",0);
+							set_text(text_thr,p);
+							threshold = p?atof(p):0;
+
+							p = get_value(r,"POSITION",0);
+							set_text(text_lat,p);
+							north     = p?atof(p):0; north += threshold;
+
+							p = get_value(r,"POSITION",1);
+							set_text(text_lon,p);
+							west      = p?atof(p):0; west  -= threshold;
+
+							south     = north - 2*threshold;
+							east      = west  + 2*threshold;
+							break;
+
+						case 'A':
+							mode = 'l';
+							p = get_value(r,"AREA",0);
+							set_text(text_n,p);
+							north  = p?atof(p):0;
+							p = get_value(r,"AREA",1);
+							set_text(text_w,p);
+							west   = p?atof(p):0;
+							p = get_value(r,"AREA",2);
+							set_text(text_s,p);
+							south  = p?atof(p):0;
+							p = get_value(r,"AREA",3);
+							set_text(text_e,p);
+							east   = p?atof(p):0;
+							if(north < south)
+							{
+								double tmp = north;
+								north      = south;
+								south      = tmp;
+							}
+							break;
+						}
+						new_req_all(c);
+						build_list();
+					}
+				}
+			}
+		}
+		else xec_SetLabel(label_info,"Cannot use this icon");
+
+		r = r->next;
+	}
+
+	send_reply(id,NULL);
+}
+
+void dropTargetCB(Widget w,dropid *id,void*)
+{
+	id->action = DROP_ACTION_DEFINITION;
+	id->header = empty_request("DROP");
+	set_value(id->header,"SELECT","%d",w == drag);
+}
+
+static void dropSourceCB(Widget,dropid *id,void*)
+{
+	request *r = clone_all_requests(id->header);
+	request *t = r;
+	int i;
+
+	switch(id->action)
+	{
+		case DROP_ACTION_NAME_AND_CLASS:
+			for(i = 0 ; i < id->count ; i++)
+			{
+				add_value(r,"NAME","%s",id->cb[i].icon_name);
+				add_value(r,"CLASS","%s",id->cb[i].icon_class);
+			}
+			break;
+
+		case DROP_ACTION_DEFINITION:
+		case DROP_ACTION_RESOLVE:
+			for(i = 0 ; i < id->count ; i++)
+			{
+				request *s = clone_all_requests(*(request**)id->cb[i].icon_data);
+				set_value(s,"_NAME","%s",id->cb[i].icon_name);
+				set_value(s,"_CLASS","%s",id->cb[i].icon_class);
+
+				if(id->action == DROP_ACTION_RESOLVE)
+				{
+					err e;
+					request *u = wait_service(service,"station",s,&e);
+					free_all_requests(s);
+					s = u;
+				}
+
+                if(t == NULL)
+                    r = t = s;
+                else
+                {
+                    request *q = t;
+                    while(t) { q = t; t = t->next; }
+                    q->next = s;
+                    t = s;
+                }
+			}
+			break;
+	}
+
+	call_service(id->s,id->service,r,0);   //NULL);
+	free_all_requests(r);
+}
+
+void reply(svcid *,request *,void*)
+{
+  marslog( LOG_DBUG, "...non-implemented reply method...\n" );
+}
+
+int main (int argc,char **argv)
+{
+    marsinit(&argc,argv,0,0,0);
+	XtToolkitInitialize ();
+	app_context = XtCreateApplicationContext ();
+	display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+	    NULL, 0, &argc, argv);
+	if (!display)
+	{
+		printf("%s: can't open display, exiting...\n", argv[0]);
+		exit (-1);
+	}
+
+#if (XmVersion < 2000)
+	/* Register converters, just in case you are really unlucky !! */
+	XmRegisterConverters();
+#endif
+
+	/* String to unit type doesn't get added !! */
+	XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
+	create_top ( display, argv[0], argc, argv );
+	/* build_list(); */
+	XtRealizeWidget (top);
+	xec_SetLabel(label_info,"Enter a search string and hit Return (or drop an icon)");
+
+	service = RegisterService(app_context,progname());
+
+	add_service_callback(service,"STATION",serve_station,NULL);
+	add_service_callback(service,"INPUT",serve_input,NULL);
+	add_service_callback(service,"DROP",serve_drop,NULL);
+	add_reply_callback(service,NULL,reply,NULL);
+
+	RegisterDropTarget(service, list_stbase, dropTargetCB,NULL);
+	RegisterDropTarget(service, drag, dropTargetCB,NULL);
+	RegisterDropSource(service, drag, dropSourceCB,NULL);
+
+
+	XrmDatabase database = XtDatabase(display);
+
+    char res[1024];
+    sprintf(res, "%s/icons/STATIONS.icon",getenv("METVIEW_DIR_SHARE"));
+    XrmPutStringResource(&database,"Metview*STATIONS.iconLargeBitmap",res);
+
+	XtUnmanageChild(row_ident);
+	XtUnmanageChild(row_wmo);
+	XtUnmanageChild(row_area);
+	XtUnmanageChild(row_pos);
+
+	XtAppMainLoop (app_context);
+	exit (0);
+}
diff --git a/src/Stations/utils.cc b/src/Stations/utils.cc
new file mode 100644
index 0000000..bb55a33
--- /dev/null
+++ b/src/Stations/utils.cc
@@ -0,0 +1,232 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <inc_iostream.h>
+#include <stdio.h>
+#include <gdbm.h>
+#include <fcntl.h>
+#include <math.h>
+#include <ctype.h>
+#include <Metview.h>
+#include "station.h"
+#include "utils.h"
+
+#define MAX_LIST 30
+
+
+const int cBUFSIZ = 100;
+static char buf[ cBUFSIZ ];
+
+extern "C" {GDBM_FILE db = NULL;}
+
+int same(const char *p,const char *q)
+{
+/* check if station matches with user entry. */
+	while(*p)
+	{
+		int x = islower(*p)?toupper(*p):*p;
+		int y = islower(*q)?toupper(*q):*q;
+
+		//-- '/' chars have been converted: ignore them!
+		if( x != y && x != '/' && y != '/' ) 
+		  return 0;
+
+		p++;
+		q++;
+	}
+
+	return 1;
+}
+
+int inbox(double lat,double lon,double north,double west,double south,double east)
+{
+/* check if chosen station is in the user box. */
+
+        while (east > 540.0) east -=360.0;  
+        while (west > 540.0) west -=360.0;  
+
+        while (east < -180.0) east +=180.0;
+        while (west < -180.0) west +=180.0;
+		
+        if (east >= 360.0  && west > 360.0) {
+		east -= 360.0;
+                west -= 360.0;
+	}
+
+        if (east >= 0.0  && west <= 0.0) {
+		east += 360.0;
+                west += 360.0;
+		lon +=360.0;
+	}
+
+	if (east < 0.0  && west > 0.0) {
+		east += 360.0;
+                west += 180.0;
+		lon +=360.0;
+	}
+
+        if (lat > north || lat < south) return 0;
+
+        if (lon > east || lon < west ) return 0;
+
+	return 1;
+}
+
+#if 0
+//-- this function now in Mars (980429/vk) --//
+char *upcase(const char *p)
+{
+	static char buf[1024];
+	int i = 0;
+
+	while(*p)
+	{
+		if(islower(*p))
+			buf[i++] = toupper(*p);
+		else
+			buf[i++] = *p;
+		p++;
+	}
+	buf[i] = 0;
+	return buf;
+}
+#endif
+
+char *nice_name(const char *p)
+{
+/* Write station name nicely with first character(s) as upper character */
+
+	static char buf[250];
+	int i = 0;
+	int is_first = 1;
+
+	while(*p)
+	  {
+	    if( isalpha(*p) && isupper(*p) && ! is_first )
+	      {
+		buf[i++] = tolower(*p); //-- uppercase letter: copy to lower case
+	      }
+	    else
+	      {
+		if( *p == '/' )  //-- '/' is list separator: replace with '-'
+		  { 
+		    buf[i++] = '-';
+		  }
+		else
+		  {
+		    buf[i++] = *p;
+		  }
+	      }
+	    is_first = ! isalpha( *p ); //-- starting a new word?
+	    p++;                        //-- next character
+	  }
+
+	buf[i] = 0;                     //-- terminate string
+
+	for( int j=i-1; j>0; --j )     	//-- remove possible trailing spaces
+	{
+	   if( buf[j] != ' ' )
+	      break;
+	   buf[j] = '\0';
+	}
+
+	return buf;
+}
+
+
+int open_database (char c)
+{
+	char database[1024];
+	int blocksize = 0;  /* less than 512 forces the system default */
+	sprintf(database, "%s-%c.db", getenv("METVIEW_STATIONS"),c);
+	db = gdbm_open(database, blocksize, GDBM_READER,0777, 0);  /* last arg is pointer to callback fn */
+
+	if(db == NULL)
+		return 1;
+	else
+		return 0;
+
+}
+
+int open_EPS_stationfile( ifstream*& EPS_file )
+{
+  //-- first try to open the real-time cached station file --
+  if( ! open_cached_EPS_stationfile( EPS_file ) )
+    {
+      //-- real-time cached file not ok => use one stored in 'etc'
+      const char* rootdir = getenv("METVIEW_DIR_SHARE");
+      Cached path = Cached(rootdir) + "/etc/EPS_stations";
+      cout << "Opening EPS stationfile in 'etc' directory" << endl;
+      EPS_file = new ifstream( (const char*)path, ios::in );
+    }
+
+  if( EPS_file->good() )
+    {
+      EPS_file->getline( buf, cBUFSIZ ); //-- skip first title line
+      EPS_file->getline( buf, cBUFSIZ ); //-- skip second title line
+      return 1;   //-- success/true
+    }
+  else
+    {
+      marslog(LOG_EROR, "Stations: cannot open EPS stations file!" );
+      return 0;   //-- failure/false
+    }
+}
+
+int open_cached_EPS_stationfile( ifstream*& EPS_file )
+{
+  //-- filename: /vol/metgram/vvvv/yyyymmddhh/eps_stat
+
+  const char emos_version[] = "0001";
+  MvDate     yesterday( -1 );
+
+  ostrstream helper;
+  helper << "/vol/metgram/"
+         << emos_version 
+	 << "/"
+         << yesterday.YyyyMmDd()
+         << "12"
+         << "/eps_stat" 
+	 << ends;
+
+  const char* filename = helper.str();
+  EPS_file = new ifstream( filename, ios::in );
+  delete [] filename;
+
+  if( EPS_file->good() )
+    {
+      cout << "opened cached EPS stationfile" << endl;
+      return 1;
+    }
+  else
+    {
+      delete EPS_file;
+      cout << "Cannot open cached EPS stationfile!!!" << endl;
+      return 0;
+    }
+}
+
+int read_one_station( ifstream*& EPS_file, station& st )
+{
+  EPS_file->get( buf, 41 );  //-- read numeric fields part only
+  if( EPS_file->eof() )
+    return 0;                //-- failure/false
+
+  istrstream helper( buf );  //-- read numeric values into station structure
+  helper >> st.ident
+         >> st.pos.lat 
+	 >> st.pos.lon 
+	 >> st.pos.station_height;
+
+  EPS_file->getline( buf, cBUFSIZ ); //-- read rest-of-line: station name
+  strcpy( st.name, buf );
+  st.pos.flags[ 0 ] = '\0'; //-- 'available obs.types' flags not available
+
+  return 1;
+}
diff --git a/src/Stations/utils.h b/src/Stations/utils.h
new file mode 100755
index 0000000..1488236
--- /dev/null
+++ b/src/Stations/utils.h
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _UTILS_H_
+#define _UTILS_H_
+
+#include <inc_iostream.h>
+//#include <fstream.h>
+//#include <strstream.h>
+
+
+extern "C" {extern GDBM_FILE db;}
+
+/* utils.cc */
+int same(const char *p, const char *q);
+int inbox(double lat, double lon, double north, double west, double south, double east);
+
+char *nice_name(const char *p);
+int open_database(char c);
+
+int open_EPS_stationfile( ifstream*& EPS_file );
+int open_cached_EPS_stationfile( ifstream*& EPS_file );
+int read_one_station( ifstream*& EPS_file, station& st );
+
+#endif
diff --git a/src/Stations/writebase.c b/src/Stations/writebase.c
new file mode 100755
index 0000000..f200449
--- /dev/null
+++ b/src/Stations/writebase.c
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <gdbm.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+/* #include <getopt.h> some machines need*/
+#include "station.h"
+
+void usage(char *name)
+{
+  fprintf(stderr,"usage: %s -l|-n|-i ",name);
+  exit(1);
+}
+
+int
+main(int argc,char **argv)
+{
+
+  char *defbase;
+  FILE  *f;
+  GDBM_FILE db;
+  datum key;
+  datum content;
+  int   n, i, c, z;
+  char buf[1024],tmp_buf[1024];
+  station st;
+  position pos;
+  extern char *optarg;
+  extern int optind, opterr;
+  char mode = 0;
+  int errflg = 0,counter = 0;
+  char *p;
+  char base[1024];
+  char last_char = 'X';
+  int blocksize = 0;  /* less than 512 forces the system default */
+  while ((c = getopt(argc, argv, "l:n:i:")) != -1)
+    switch (c) {
+
+    case 'l':
+    case 'n':
+    case 'i':
+      mode = c;
+      defbase = optarg;
+      break;
+
+    case '?':
+      errflg++;
+    }
+
+  if (errflg)    usage(argv[0]);
+  if (mode == 0) usage(argv[0]);
+
+  sprintf(base,"%s-%c.db",defbase,mode);
+
+  db = gdbm_open(base, blocksize, GDBM_NEWDB, 0777, 0);  /* last arg is pointer to callback fn */
+
+  if(!db)
+    {
+      perror("dbm_open");
+      exit(1);
+    }
+
+
+  /* write database with a key to search with. */
+
+  while(gets(buf))
+    {
+      /* Read the last field as 1023c as it may contain whitespace. */
+      memset(tmp_buf,'\0',1024);
+      sscanf(buf,"%d %li %li %d %d %d %s %1023c",
+	     &st.ident,  &st.pos.lat, &st.pos.lon,
+	     &st.barometre_height, &st.pos.station_height , 
+	     &st.pressure_level,
+	     st.pos.flags,tmp_buf);
+	  
+      /* Eat multiple whitespace to make the name look OK. */
+      p = tmp_buf;
+      counter = 0;
+	  
+      while(*p) 
+	{
+	  if ( last_char == ' ' && *p == ' ') 
+	    {
+	      p++;
+	      continue;
+	    }
+	  else
+	    {
+	      st.name[counter] = *p;
+	      last_char = *p;
+	      p++;
+	      counter++;
+	    }
+	}
+      st.name[counter] = '\0';
+	  
+	  
+      switch(mode)
+	{
+	case 'i':
+	  key.dptr      = (char*)&st.ident;
+	  key.dsize     = sizeof(st.ident);
+	  break;
+	case 'l':
+	  key.dptr      = (char*)&st.pos;
+	  key.dsize     = sizeof(st.pos);
+	  break;
+	case 'n':
+	  key.dptr      = (char*)&st.name;
+	  key.dsize     = strlen(st.name)+1;
+	  break;
+	}
+
+      content.dptr  = (char*)&st;
+      content.dsize = sizeof(st) - sizeof(st.name) + strlen(st.name) + 1;
+
+      gdbm_store(db,key,content,GDBM_INSERT);
+
+    }
+
+  gdbm_close(db);
+  exit(0);
+}
diff --git a/src/StdAppManager/INPUTVISUALISER.svg b/src/StdAppManager/INPUTVISUALISER.svg
new file mode 100644
index 0000000..80d8a46
--- /dev/null
+++ b/src/StdAppManager/INPUTVISUALISER.svg
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64"
+   height="64"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="INPUTVISUALISER.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="6.796875"
+     inkscape:cx="32"
+     inkscape:cy="31.565804"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     width="64px"
+     height="64px"
+     inkscape:window-width="772"
+     inkscape:window-height="646"
+     inkscape:window-x="521"
+     inkscape:window-y="172"
+     showgrid="false" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="circle">
+    <text
+       xml:space="preserve"
+       style="font-size:13px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="2.6482759"
+       y="14.271264"
+       id="text6928"><tspan
+         sodipodi:role="line"
+         id="tspan6930"
+         x="2.6482759"
+         y="14.271264">4/8/15/16</tspan><tspan
+         sodipodi:role="line"
+         x="2.6482759"
+         y="30.521264"
+         id="tspan6932">6/7/8/9/9</tspan><tspan
+         sodipodi:role="line"
+         x="2.6482759"
+         y="46.771264"
+         id="tspan6934">3/5/6/8/4</tspan><tspan
+         sodipodi:role="line"
+         x="2.6482759"
+         y="63.021264"
+         id="tspan6936">23/42/10</tspan></text>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="text">
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3142"
+       style="font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion3144"><rect
+           id="rect3146"
+           width="24.422989"
+           height="14.565517"
+           x="21.333334"
+           y="26.188505"
+           style="font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara3148">SassdfsfdffsSQ</flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3150"
+       style="font-family:Bitstream Vera Sans Mono"><flowRegion
+         id="flowRegion3152"><rect
+           id="rect3154"
+           width="18.096552"
+           height="12.8"
+           x="23.834482"
+           y="27.954023"
+           style="font-family:Bitstream Vera Sans Mono" /></flowRegion><flowPara
+         id="flowPara3156">SQ</flowPara></flowRoot>    <g
+       style="display:inline"
+       id="g6326"
+       transform="matrix(2.1061635,0,0,2.1061635,-2.6698689,-2.7501989)">
+      <rect
+         rx="0"
+         ry="0.76569498"
+         y="25.690905"
+         x="20.200878"
+         height="1.53139"
+         width="3.6325176"
+         id="rect4235"
+         style="opacity:1;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.85816514;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <rect
+         ry="1.2517357"
+         y="27.350697"
+         x="13.411453"
+         height="2.7717004"
+         width="17.032545"
+         id="rect4233"
+         style="fill:#b6c6cc;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.95899999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <g
+         id="g6294">
+        <rect
+           style="fill:#e7e4e0;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:1.00858581;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           id="rect4231"
+           width="18.368809"
+           height="12.378362"
+           x="12.631559"
+           y="13.338168"
+           ry="1.2467414" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#e52626;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+           d="M 17.43489,21.539066 L 20.832458,15.548617 L 21.994785,20.108511 L 24.542961,17.962678 C 25.541369,18.812071 26.251737,19.373422 27.538186,20.510855"
+           id="path5224"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#1f283c;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 14.752598,15.056863 C 14.797303,23.506079 14.797303,23.595489 14.797303,23.595489"
+           id="path5226" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#1f283c;stroke-width:1.00666595px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 14.308883,23.726271 L 29.323046,23.688232"
+           id="path5228" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/StdAppManager/INPUTVISUALISER.xpm b/src/StdAppManager/INPUTVISUALISER.xpm
new file mode 100644
index 0000000..433b418
--- /dev/null
+++ b/src/StdAppManager/INPUTVISUALISER.xpm
@@ -0,0 +1,153 @@
+/* XPM */
+static char *INPUTVISUALISER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 115 2",
+"   c #1D54204D1A68",
+".  c #27122B07267E",
+"X  c #2A412D4128B8",
+"o  c #2D5A31F22D2F",
+"O  c #313633EE2EA7",
+"+  c #3129359730CB",
+"@  c #35E239D134F5",
+"#  c #39963C3D36F8",
+"$  c #3A613E073923",
+"%  c #3D3C41373BD8",
+"&  c #402B42E23D9B",
+"*  c #3E46455D5610",
+"=  c #421146C34202",
+"-  c #441948274351",
+";  c #48EF4B7745CD",
+":  c #46524ED04C5B",
+">  c #4C194EF24984",
+",  c #4F1052844DBC",
+"<  c #504452C94D3D",
+"1  c #546E56A050E1",
+"2  c #574159CD5514",
+"3  c #5D9B5D9B5D9B",
+"4  c #5EDD60665A58",
+"5  c #607962245CEA",
+"6  c #4EBE54F5636B",
+"7  c #5065567064EF",
+"8  c #589C5E506B76",
+"9  c #594F632A61F4",
+"0  c #6350637B6317",
+"q  c #6C6A6CDB6C2B",
+"w  c #612A6638726F",
+"e  c #742274C173B0",
+"r  c #76E8789173E2",
+"t  c #7A6F7B627611",
+"y  c #7D487D787D2D",
+"u  c #E60935B0354F",
+"i  c #E6253CB83C47",
+"p  c #E63D4D364C62",
+"a  c #E65650554F8C",
+"s  c #E6635351526D",
+"d  c #E66A5C435B0E",
+"f  c #E6C060925F96",
+"g  c #E68B62C3613F",
+"h  c #E67F6DEA6C84",
+"j  c #E6AE70746EBE",
+"k  c #E6BB78477675",
+"l  c #E6AD7ABD790A",
+"z  c #81BB83657FD3",
+"x  c #E6EE81197F03",
+"c  c #786F8454858B",
+"v  c #8425846483E6",
+"b  c #8800893B85FC",
+"n  c #890388FC838E",
+"m  c #8C038C4D8B8F",
+"M  c #904C90918FFF",
+"N  c #8EF09C3A9F43",
+"B  c #9405941793EC",
+"V  c #97E098ED9720",
+"C  c #9C9A9CBD9C7E",
+"Z  c #9FCEA1589E8A",
+"A  c #A444A3539E54",
+"S  c #8FEB9D36A042",
+"D  c #90D29E33A149",
+"F  c #98F89AA3A0C0",
+"G  c #9F5FA0C7A620",
+"H  c #A42EA44EA45B",
+"J  c #A858A765A25B",
+"K  c #AB28AA2EA53A",
+"L  c #A49CA5C5AA5B",
+"P  c #AC45AC61AC61",
+"I  c #AFBBAF8EB078",
+"U  c #A7A9B6D5BBAA",
+"Y  c #A8A8B7D4BCB2",
+"T  c #B2F0B2EDB30C",
+"R  c #BBF4BBF7BBF2",
+"E  c #E6C385D883BA",
+"W  c #E6E1899D87A4",
+"Q  c #E7168E0F8C0B",
+"!  c #E72391FE8FD3",
+"~  c #E8879602938A",
+"^  c #E7159EE49C44",
+"/  c #E6F3A2B89FF1",
+"(  c #E74AA7FEA55C",
+")  c #E9E0A847A57D",
+"_  c #E74DABE5A929",
+"`  c #E956ADA7AA99",
+"'  c #E837B7FDB4DF",
+"]  c #E77BB8F9B603",
+"[  c #E77ABC22B8FF",
+"{  c #C486C476C43D",
+"}  c #C8E4C9B3C825",
+"|  c #CC3DCC4CCC11",
+" . c #D507D00BCE84",
+".. c #D376D1AED022",
+"X. c #D3D5D376D317",
+"o. c #D822D869D7C4",
+"O. c #DCD0DC52DB7F",
+"+. c #E783C652C2F1",
+"@. c #E78DCB61C7E9",
+"#. c #E79ACEF7CB7A",
+"$. c #E7B5D2B5CF0A",
+"%. c #E7B5D6E4D313",
+"&. c #EA5FD7BBD42D",
+"*. c #E7C1DA6FD6AB",
+"=. c #E7C8DE04DA2A",
+"-. c #EA70DE39DA66",
+";. c #E73FE300DF37",
+":. c #E8FFE3AFDF97",
+">. c #E618E502E305",
+",. c #E9EBE719E308",
+"<. c #EC0AE972E57B",
+"1. c #ECA7ECA7ECA7",
+"2. c #F080F0B9F033",
+"3. c #F4D1F4D3F4CD",
+"4. c #FF7DFF7EFF7D",
+/* pixels */
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.",
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.",
+"4.4.4.T } 4.1.| X.C T 3.4.| o.C { 4.>.V C o.4.>.X.R C 3.4.>.H V ",
+"4.4.X.0 V 4.{ H b R v X.1.B O.B B 4.{ y | 1.4.P { } q >.4.m L | ",
+"4.3.C C C 4.C X.C r r >.} P 4.{ V 4.X.y y { 3.B 1.3.v >.1.3 b y ",
+"4.R e r q O.B >.v R m { H X.4.{ V 4.4.3.{ y o.C 4.3.v >.1.3 O.V ",
+"4.1.| B b { H 3.y K y T B 3.1.B q O.O.R m V T R 4.} 3 P 3.B H e ",
+"4.4.4.1.>.R X.4.>.T } o.T 4.1.R T O.>.T R 1.P >.4.X.T { 3.1.R { ",
+"4.4.4.4.4.3.4.4.4.4.4.4.3.4.4.4.4.4.4.4.4.4.3.4.4.4.4.4.4.4.4.4.",
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.",
+"4.4.O.K { 4.3.X.{ P K >.4.o.<.R T 1.4.>.>.{ L >.4.3.o.o.H } 4.4.",
+"4.1.v T X.4.} K o.R 0 O.1.M V b m V 2.V V e C t >.R B e C e X.4.",
+"4.{ 3 m P 4.H X.4.X.b >.r # $ & = # < # # $ , O > & $ + < @ 2 } ",
+"4.{ q O.e X.B 1.4.C R C - A P K K K K K P K K K K K K K K K 4 2 ",
+"4.>.y T e R H 4.1.y 1.t r } L ;.,.,.,.-.) &.,.,.,.,.,.,.,.<.J % ",
+"4.4.| H X.T | 4.1.| 4.t t G w O.,.>.,./ u ( ,.>.>.>.>.>.>.,.J % ",
+"4.4.4.4.4.3.4.4.4.4.4.t t H w O.,.>.$.d i x >.>.*.:.>.>.>.,.J % ",
+"4.4.4.4.4.4.4.4.4.4.4.t t L w O.,.>.Q f ! g %.^ d ^ ;.>.>.,.J % ",
+"4.3.{ R 1.4.3.O.X.R | e t L w O.,.+.a _ +.p j s x s W =.>.,.J % ",
+"4.3.R H m 4.| H b C } e t L w O.:.l h =.*.d s ] ,.] d k *.,.J % ",
+"4.4.>.V m 4.L } m v P e t L w O.' p [ ,.>.+. at .,.>.,.+.E #.<.J % ",
+"4.4.>.C b <.B 1.1.O.e - t L w O.` ~ :.,.,.,.,.,.,.,.,.:.,.<.J % ",
+"4.3.O.{ e { C 4.O.o.e ; t L 8 }  . .X.X.X.X.X.X.......X...O.J % ",
+"4.<.C B | R { 4.P m T e t P * 6 7 7 7 7 6 6 6 6 6 6 6 6 6 F K % ",
+"4.4.4.4.4.3.4.4.4.4.4.v 5 { P P P P P P P I I T T T T T T { n - ",
+"4.4.4.4.4.4.4.4.4.4.4.| ; ; 1 1 1 1 1 > ; ; ; ; < 1 1 1 1 < % V ",
+"4.3.X.} 3.4.o.| 1.4.4.1.O.H v m b e z >   o X   5 m m b r B | 4.",
+"4.>.H m B 3.T C b 3.>.H { < % = = % % @ o + + o $ - - = % % z 3.",
+"4.4.4.X.y 3.3.T y 3.R T r 9 U U U U U Y Y Y Y Y U U U U Y D % { ",
+"4.4.1.m } 4.<.C v 1.C | 1 : N N S D D N N N N S D S N D D c % | ",
+"4.1.y H 1.3.>.O.e } V 1.C q @ , # X $ ; % > 1 $ . % , + + @ Z 3.",
+"4.o.q v H ,.B t H { L 4.4.3.H O.C 0 e P m o.>.v 0 M >.H 0 P 4.4."
+};
diff --git a/src/StdAppManager/InputVisualiserDef b/src/StdAppManager/InputVisualiserDef
new file mode 100644
index 0000000..4081898
--- /dev/null
+++ b/src/StdAppManager/InputVisualiserDef
@@ -0,0 +1,137 @@
+INPUT_VISUALISER; Input Visualiseer Application
+{
+     INPUT_PLOT_TYPE
+     {
+#         HISTOGRAM
+          XY_POINTS
+          GEO_POINTS
+          XY_AREA
+          XY_VECTORS
+          GEO_VECTORS
+          XY_BINNING
+          GEO_BINNING
+#         XY_BOXES
+#         GEO_BOXES
+#         HOR_BAR
+#         VER_BAR
+     } = XY_POINTS
+
+     INPUT_X_TYPE
+     {
+          NUMBER	; NUMBER
+          DATE		; DATE
+     } = NUMBER
+
+     INPUT_Y_TYPE
+     {
+          NUMBER	; NUMBER
+          DATE		; DATE
+     } = NUMBER
+
+     INPUT_X_VALUES { * / }
+     INPUT_Y_VALUES { * / }
+     
+     INPUT_X2_VALUES { * / }
+     INPUT_Y2_VALUES { * / }
+     
+     INPUT_X_MISSING_VALUE { * } = -21.e6
+     INPUT_Y_MISSING_VALUE { * } = -21.e6
+     
+     INPUT_DATE_X_VALUES { @ / }
+     INPUT_DATE_Y_VALUES { @ / }
+     
+     INPUT_DATE_X2_VALUES { @ / }
+     INPUT_DATE_Y2_VALUES { @ / }
+     
+     INPUT_LONGITUDE_VALUES { * / }
+     INPUT_LATITUDE_VALUES { * / }
+
+     INPUT_X_COMPONENT_VALUES { @ / }
+     INPUT_Y_COMPONENT_VALUES { @ / }
+
+     INPUT_VALUES { * / }
+
+     INPUT_BINNING
+     [ interface       = icon,
+       class           = MBINNING,
+       exclusive       = true,
+       help            = help_data,
+       help_directory  = '/System/Defaults',
+       help_name       = Binning,
+       help_class      = MBINNING,
+       help_definition = (MBINNING)
+     ]
+     { @ }
+
+}
+
+INPUT_XY_BOXES; XYBoxes
+{
+	INPUT_X_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+
+	INPUT_X_VALUES { * / }
+
+	INPUT_DATE_X_VALUES { @ / }
+
+	INPUT_Y_MIN_VALUES 		{ * / }
+	INPUT_Y_10_VALUES		{ * / }
+	INPUT_Y_25_VALUES		{ * / }
+	INPUT_Y_MEDIUM_VALUES	{ * / }
+	INPUT_Y_75_VALUES		{ * / }
+	INPUT_Y_90_VALUES		{ * / }
+	INPUT_Y_MAX_VALUES		{ * / }
+}
+
+#---------------------------------------------------------------------
+
+INPUT_GEO_BOXES; GeoBoxes
+{
+	INPUT_LONGITUDE_VALUES { * / }
+	INPUT_LATITUDE_VALUES { * / }
+
+	INPUT_Y_MIN_VALUES		{ * / }
+	INPUT_Y_10_VALUES		{ * / }
+	INPUT_Y_25_VALUES		{ * / }
+	INPUT_Y_MEDIUM_VALUES	{ * / }
+	INPUT_Y_75_VALUES		{ * / }
+	INPUT_Y_90_VALUES		{ * / }
+	INPUT_Y_MAX_VALUES		{ * / }
+}
+
+#---------------------------------------------------------------------
+
+INPUT_HOR_BAR; HorizontalBar
+{
+	INPUT_Y_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+
+	INPUT_X_LOWER_VALUES { * / }
+	INPUT_X_UPPER_VALUES { * / }
+
+	INPUT_Y_VALUES		{ * / }
+	INPUT_DATE_Y_VALUES { @ / }
+}
+
+#---------------------------------------------------------------------
+
+INPUT_VER_BAR; VerticalBar
+{
+	INPUT_X_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+
+	INPUT_Y_LOWER_VALUES { * / }
+	INPUT_Y_UPPER_VALUES { * / }
+
+	INPUT_X_VALUES		{ * / }
+	INPUT_DATE_X_VALUES { @ / }
+}
diff --git a/src/StdAppManager/InputVisualiserRules b/src/StdAppManager/InputVisualiserRules
new file mode 100644
index 0000000..dcc7c45
--- /dev/null
+++ b/src/StdAppManager/InputVisualiserRules
@@ -0,0 +1,90 @@
+%if INPUT_X_TYPE = DATE %then
+     %unset INPUT_X_VALUES
+     %unset INPUT_X2_VALUES
+     %unset INPUT_X_MISSING_VALUE
+
+%if INPUT_X_TYPE <> DATE %then
+     %unset INPUT_DATE_X_VALUES
+     %unset INPUT_DATE_X2_VALUES
+     
+%if INPUT_Y_TYPE = DATE %then
+     %unset INPUT_Y_VALUES 
+     %unset INPUT_Y2_VALUES
+     %unset INPUT_Y_MISSING_VALUE
+
+%if INPUT_Y_TYPE <> DATE %then
+     %unset INPUT_DATE_Y_VALUES
+%if INPUT_Y_TYPE <> DATE %then
+     %unset INPUT_DATE_Y2_VALUES
+
+%if INPUT_PLOT_TYPE <> XY_AREA %then
+     %unset INPUT_X2_VALUES
+     %unset INPUT_Y2_VALUES
+     %unset INPUT_DATE_X2_VALUES
+     %unset INPUT_DATE_Y2_VALUES
+
+%if INPUT_PLOT_TYPE = XY_POINTS %then
+     %unset INPUT_LONGITUDE_VALUES
+     %unset INPUT_LATITUDE_VALUES
+     %unset INPUT_X_COMPONENT_VALUES
+     %unset INPUT_Y_COMPONENT_VALUES
+     %unset INPUT_BINNING
+
+%if INPUT_PLOT_TYPE = GEO_POINTS %then
+     %unset INPUT_X_TYPE
+     %unset INPUT_Y_TYPE
+     %unset INPUT_X_VALUES
+     %unset INPUT_X2_VALUES
+     %unset INPUT_Y_VALUES
+     %unset INPUT_Y2_VALUES
+     %unset INPUT_X_MISSING_VALUE
+     %unset INPUT_Y_MISSING_VALUE
+     %unset INPUT_DATE_X_VALUES
+     %unset INPUT_DATE_Y_VALUES 
+     %unset INPUT_DATE_X2_VALUES
+     %unset INPUT_DATE_Y2_VALUES
+     %unset INPUT_X_COMPONENT_VALUES
+     %unset INPUT_Y_COMPONENT_VALUES
+     %unset INPUT_BINNING
+
+%if INPUT_PLOT_TYPE = XY_VECTORS %then
+     %unset INPUT_LONGITUDE_VALUES
+     %unset INPUT_LATITUDE_VALUES
+     %unset INPUT_BINNING
+
+%if INPUT_PLOT_TYPE = GEO_VECTORS %then
+     %unset INPUT_X_TYPE
+     %unset INPUT_Y_TYPE
+     %unset INPUT_X_VALUES
+     %unset INPUT_Y_VALUES
+     %unset INPUT_X2_VALUES
+     %unset INPUT_Y2_VALUES
+     %unset INPUT_X_MISSING_VALUE
+     %unset INPUT_Y_MISSING_VALUE
+     %unset INPUT_DATE_X_VALUES
+     %unset INPUT_DATE_Y_VALUES
+     %unset INPUT_DATE_X2_VALUES
+     %unset INPUT_DATE_Y2_VALUES
+     %unset INPUT_BINNING
+
+%if INPUT_PLOT_TYPE = XY_BINNING %then
+     %unset INPUT_LONGITUDE_VALUES
+     %unset INPUT_LATITUDE_VALUES
+     %unset INPUT_X_COMPONENT_VALUES
+     %unset INPUT_Y_COMPONENT_VALUES
+
+%if INPUT_PLOT_TYPE = GEO_BINNING %then
+     %unset INPUT_X_TYPE
+     %unset INPUT_Y_TYPE
+     %unset INPUT_X_VALUES
+     %unset INPUT_Y_VALUES
+     %unset INPUT_X2_VALUES
+     %unset INPUT_Y2_VALUES
+     %unset INPUT_X_MISSING_VALUE
+     %unset INPUT_Y_MISSING_VALUE
+     %unset INPUT_DATE_X_VALUES
+     %unset INPUT_DATE_Y_VALUES
+     %unset INPUT_DATE_X2_VALUES
+     %unset INPUT_DATE_Y2_VALUES
+     %unset INPUT_X_COMPONENT_VALUES
+     %unset INPUT_Y_COMPONENT_VALUES
diff --git a/src/StdAppManager/Makefile.am b/src/StdAppManager/Makefile.am
new file mode 100644
index 0000000..9a06fbe
--- /dev/null
+++ b/src/StdAppManager/Makefile.am
@@ -0,0 +1,47 @@
+bin_PROGRAMS = bin/StdAppManager
+
+bin_StdAppManager_SOURCES  = StdAppManager.cc StdAppManager.h
+bin_StdAppManager_CPPFLAGS = -I../libUtil
+bin_StdAppManager_LDFLAGS =
+bin_StdAppManager_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_StdAppManager_DEPENDENCIES =
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.StdAppManager \
+                 $(local_sharedir)/InputVisualiserDef $(local_sharedir)/InputVisualiserRules \
+                 $(local_sharedir)/NetcdfPlusDef $(local_sharedir)/NetcdfPlusRules \
+                 $(local_sharedir)/TableVisualiserDef $(local_sharedir)/TableVisualiserRules
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+
+icons:
+	${INSTALL} INPUTVISUALISER.svg $(local_iconsdir)
+	${INSTALL} INPUTVISUALISER.xpm $(local_iconsdir)
+	${INSTALL} NETCDFPLUS.svg $(local_iconsdir)
+	${INSTALL} NETCDFPLUS.xpm $(local_iconsdir)
+	${INSTALL} TABLEVISUALISER.svg $(local_iconsdir)
+	${INSTALL} TABLEVISUALISER.xpm $(local_iconsdir)
+
+
+CLEANFILES = $(share_DATA) \
+             $(local_iconsdir)/INPUTVISUALISER.svg $(local_iconsdir)/INPUTVISUALISER.xpm \
+             $(local_iconsdir)/NETCDFPLUS.svg $(local_iconsdir)/NETCDFPLUS.xpm \
+             $(local_iconsdir)/TABLEVISUALISER.svg $(local_iconsdir)/TABLEVISUALISER.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.StdAppManager \
+             INPUTVISUALISER.svg INPUTVISUALISER.xpm InputVisualiserDef InputVisualiserRules \
+             NETCDFPLUS.svg NETCDFPLUS.xpm NetcdfPlusDef NetcdfPlusRules \
+             TABLEVISUALISER.svg TABLEVISUALISER.xpm TableVisualiserDef TableVisualiserRules
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/StdAppManager/Makefile.in b/src/StdAppManager/Makefile.in
new file mode 100644
index 0000000..6ee7ef3
--- /dev/null
+++ b/src/StdAppManager/Makefile.in
@@ -0,0 +1,744 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/StdAppManager$(EXEEXT)
+subdir = src/StdAppManager
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_StdAppManager_OBJECTS =  \
+	bin_StdAppManager-StdAppManager.$(OBJEXT)
+bin_StdAppManager_OBJECTS = $(am_bin_StdAppManager_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_StdAppManager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_StdAppManager_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_StdAppManager_SOURCES)
+DIST_SOURCES = $(bin_StdAppManager_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_StdAppManager_SOURCES = StdAppManager.cc StdAppManager.h
+bin_StdAppManager_CPPFLAGS = -I../libUtil
+bin_StdAppManager_LDFLAGS = 
+bin_StdAppManager_LDADD = $(STANDARD_METVIEW_LIBS)
+bin_StdAppManager_DEPENDENCIES = 
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.StdAppManager \
+                 $(local_sharedir)/InputVisualiserDef $(local_sharedir)/InputVisualiserRules \
+                 $(local_sharedir)/NetcdfPlusDef $(local_sharedir)/NetcdfPlusRules \
+                 $(local_sharedir)/TableVisualiserDef $(local_sharedir)/TableVisualiserRules
+
+CLEANFILES = $(share_DATA) \
+             $(local_iconsdir)/INPUTVISUALISER.svg $(local_iconsdir)/INPUTVISUALISER.xpm \
+             $(local_iconsdir)/NETCDFPLUS.svg $(local_iconsdir)/NETCDFPLUS.xpm \
+             $(local_iconsdir)/TABLEVISUALISER.svg $(local_iconsdir)/TABLEVISUALISER.xpm
+
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.StdAppManager \
+             INPUTVISUALISER.svg INPUTVISUALISER.xpm InputVisualiserDef InputVisualiserRules \
+             NETCDFPLUS.svg NETCDFPLUS.xpm NetcdfPlusDef NetcdfPlusRules \
+             TABLEVISUALISER.svg TABLEVISUALISER.xpm TableVisualiserDef TableVisualiserRules
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/StdAppManager/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/StdAppManager/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/StdAppManager$(EXEEXT): $(bin_StdAppManager_OBJECTS) $(bin_StdAppManager_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/StdAppManager$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_StdAppManager_LINK) $(bin_StdAppManager_OBJECTS) $(bin_StdAppManager_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_StdAppManager-StdAppManager.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_StdAppManager-StdAppManager.o: StdAppManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_StdAppManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_StdAppManager-StdAppManager.o -MD -MP -MF $(DEPDIR)/bin_StdAppManager-StdAppManager.Tpo -c -o bin_StdAppManager-StdAppManager.o `test -f 'StdAppManager.cc' || echo '$(srcdir)/'`StdAppManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_StdAppManager-StdAppManager.Tpo $(DEPDIR)/bin_StdAppManager-StdAppManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='StdAppManager.cc' object='bin_StdAppManager-StdAppManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_StdAppManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_StdAppManager-StdAppManager.o `test -f 'StdAppManager.cc' || echo '$(srcdir)/'`StdAppManager.cc
+
+bin_StdAppManager-StdAppManager.obj: StdAppManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_StdAppManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_StdAppManager-StdAppManager.obj -MD -MP -MF $(DEPDIR)/bin_StdAppManager-StdAppManager.Tpo -c -o bin_StdAppManager-StdAppManager.obj `if test -f 'StdAppManager.cc'; then $(CYGPATH_W) 'StdAppManager.cc'; else $(CYGPATH_W) '$(srcdir)/StdAppManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_StdAppManager-StdAppManager.Tpo $(DEPDIR)/bin_StdAppManager-StdAppManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='StdAppManager.cc' object='bin_StdAppManager-StdAppManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_StdAppManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_StdAppManager-StdAppManager.obj `if test -f 'StdAppManager.cc'; then $(CYGPATH_W) 'StdAppManager.cc'; else $(CYGPATH_W) '$(srcdir)/StdAppManager.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} INPUTVISUALISER.svg $(local_iconsdir)
+	${INSTALL} INPUTVISUALISER.xpm $(local_iconsdir)
+	${INSTALL} NETCDFPLUS.svg $(local_iconsdir)
+	${INSTALL} NETCDFPLUS.xpm $(local_iconsdir)
+	${INSTALL} TABLEVISUALISER.svg $(local_iconsdir)
+	${INSTALL} TABLEVISUALISER.xpm $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/StdAppManager/NETCDFPLUS.svg b/src/StdAppManager/NETCDFPLUS.svg
new file mode 100644
index 0000000..da1d244
--- /dev/null
+++ b/src/StdAppManager/NETCDFPLUS.svg
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64"
+   height="64"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="NETCDFPLUS.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/var/tmp/cgi/PERFORCE/metview_4/metview/share/metview/icons/NETCDF.png"
+   inkscape:export-xdpi="45"
+   inkscape:export-ydpi="45">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="6.796875"
+     inkscape:cx="33.618391"
+     inkscape:cy="29.873382"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     width="64px"
+     height="64px"
+     inkscape:window-width="772"
+     inkscape:window-height="646"
+     inkscape:window-x="680"
+     inkscape:window-y="122"
+     showgrid="false" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="circle">
+    <rect
+       style="opacity:0.8699187;fill:#00222b;fill-opacity:1;fill-rule:nonzero;stroke:#00222b;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2194"
+       width="10.264623"
+       height="10.264623"
+       x="3.5481482"
+       y="9.9755964" />
+    <rect
+       style="opacity:0.8699187;fill:#004455;fill-opacity:1;fill-rule:nonzero;stroke:#004455;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2198"
+       width="10.264623"
+       height="10.264623"
+       x="19.290678"
+       y="9.9755964"
+       inkscape:transform-center-x="-5.5402987"
+       inkscape:transform-center-y="3.5310345" />
+    <rect
+       style="opacity:0.8699187;fill:#6f918a;fill-opacity:1;fill-rule:nonzero;stroke:#6f918a;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2200"
+       width="10.264623"
+       height="10.264623"
+       x="34.591827"
+       y="9.9755964"
+       inkscape:transform-center-y="3.8252874"
+       inkscape:transform-center-x="1.0298851" />
+    <rect
+       style="opacity:0.8699187;fill:#dbe3e2;fill-opacity:1;fill-rule:nonzero;stroke:#dbe3e2;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2202"
+       width="10.264623"
+       height="10.264623"
+       x="49.157345"
+       y="9.9755964"
+       inkscape:transform-center-x="9.416092"
+       inkscape:transform-center-y="2.0597701"
+       inkscape:export-xdpi="45"
+       inkscape:export-ydpi="45" />
+    <rect
+       style="opacity:0.8699187;fill:#004455;fill-opacity:1;fill-rule:nonzero;stroke:#004455;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2204"
+       width="10.264623"
+       height="10.264623"
+       x="3.5481482"
+       y="24.881483"
+       inkscape:transform-center-x="-5.5402987"
+       inkscape:transform-center-y="3.5310345" />
+    <rect
+       style="opacity:0.49322492;fill:#b7c8c4;fill-opacity:1;fill-rule:nonzero;stroke:#b7c8c4;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2206"
+       width="10.264623"
+       height="10.264623"
+       x="3.5481482"
+       y="41.212517"
+       inkscape:transform-center-y="3.8252874"
+       inkscape:transform-center-x="1.0298851" />
+    <rect
+       style="opacity:0.8699187;fill:#93aca7;fill-opacity:1;fill-rule:nonzero;stroke:#93aca7;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2210"
+       width="10.264623"
+       height="10.264623"
+       x="19.290678"
+       y="24.881483"
+       inkscape:transform-center-y="3.8252874"
+       inkscape:transform-center-x="1.0298851" />
+    <rect
+       style="opacity:0.49322492;fill:#dbe3e2;fill-opacity:1;fill-rule:nonzero;stroke:#dbe3e2;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2212"
+       width="10.264623"
+       height="10.264623"
+       x="19.290678"
+       y="41.065388"
+       inkscape:transform-center-x="9.416092"
+       inkscape:transform-center-y="2.0597701" />
+    <rect
+       style="opacity:0.8699187;fill:#93aca7;fill-opacity:1;fill-rule:nonzero;stroke:#93aca7;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2214"
+       width="10.264623"
+       height="10.264623"
+       x="34.591827"
+       y="25.175734"
+       inkscape:transform-center-x="9.416092"
+       inkscape:transform-center-y="2.0597701" />
+    <rect
+       style="opacity:0.8699187;fill:#dbe3e2;fill-opacity:1;fill-rule:nonzero;stroke:#dbe3e2;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2216"
+       width="10.264623"
+       height="10.264623"
+       x="49.157345"
+       y="25.469988"
+       inkscape:transform-center-x="9.416092"
+       inkscape:transform-center-y="2.0597701" />
+    <rect
+       style="opacity:0.49322492;fill:#dbe3e2;fill-opacity:1;fill-rule:nonzero;stroke:#dbe3e2;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2218"
+       width="10.264623"
+       height="10.264623"
+       x="34.591827"
+       y="40.476883"
+       inkscape:transform-center-x="9.416092"
+       inkscape:transform-center-y="2.0597701" />
+    <rect
+       style="opacity:0.49322493;fill:#dbe3e2;fill-opacity:1;fill-rule:nonzero;stroke:#dbe3e2;stroke-width:0.81597477;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2220"
+       width="10.264623"
+       height="10.264623"
+       x="49.157345"
+       y="40.035503"
+       inkscape:transform-center-x="9.416092"
+       inkscape:transform-center-y="2.0597701" />
+    <g
+       style="display:inline"
+       id="g6326"
+       transform="matrix(2.2375662,0,0,2.0356045,-5.9321915,-2.0574251)">
+      <rect
+         rx="0"
+         ry="0.76569498"
+         y="25.690905"
+         x="20.200878"
+         height="1.53139"
+         width="3.6325176"
+         id="rect4235"
+         style="opacity:1;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.85816514;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <rect
+         ry="1.2517357"
+         y="27.350697"
+         x="13.411453"
+         height="2.7717004"
+         width="17.032545"
+         id="rect4233"
+         style="fill:#b6c6cc;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.95899999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <g
+         id="g6294">
+        <rect
+           style="fill:#e7e4e0;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:1.00858581;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           id="rect4231"
+           width="18.368809"
+           height="12.378362"
+           x="12.631559"
+           y="13.338168"
+           ry="1.2467414" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#e52626;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+           d="M 17.43489,21.539066 L 20.832458,15.548617 L 21.994785,20.108511 L 24.542961,17.962678 C 25.541369,18.812071 26.251737,19.373422 27.538186,20.510855"
+           id="path5224"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#1f283c;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 14.752598,15.056863 C 14.797303,23.506079 14.797303,23.595489 14.797303,23.595489"
+           id="path5226" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#1f283c;stroke-width:1.00666595px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 14.308883,23.726271 L 29.323046,23.688232"
+           id="path5228" />
+      </g>
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="text">
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3142"
+       style="font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion3144"><rect
+           id="rect3146"
+           width="24.422989"
+           height="14.565517"
+           x="21.333334"
+           y="26.188505"
+           style="font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara3148">SassdfsfdffsSQ</flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3150"
+       style="font-family:Bitstream Vera Sans Mono"><flowRegion
+         id="flowRegion3152"><rect
+           id="rect3154"
+           width="18.096552"
+           height="12.8"
+           x="23.834482"
+           y="27.954023"
+           style="font-family:Bitstream Vera Sans Mono" /></flowRegion><flowPara
+         id="flowPara3156">SQ</flowPara></flowRoot>  </g>
+</svg>
diff --git a/src/StdAppManager/NETCDFPLUS.xpm b/src/StdAppManager/NETCDFPLUS.xpm
new file mode 100644
index 0000000..9c8b7a6
--- /dev/null
+++ b/src/StdAppManager/NETCDFPLUS.xpm
@@ -0,0 +1,207 @@
+/* XPM */
+static char *NETCDFPLUS[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 169 2",
+"   c #1DCB217F1B65",
+".  c #21AE24F21F5B",
+"X  c #229C262220AE",
+"o  c #2674298E23DA",
+"O  c #2DCE310C2AA1",
+"+  c #39463CD4368A",
+"@  c #3EBC42893D17",
+"#  c #402542D43D38",
+"$  c #1EE83D4C446D",
+"%  c #207B3EB045BB",
+"&  c #22BE409C47AE",
+"*  c #23B3416B4881",
+"=  c #2B0547C74E9B",
+"-  c #2BEA48A04F48",
+";  c #3F2044F340BA",
+":  c #3A1454815B59",
+">  c #1E415A486984",
+",  c #212F5C676B75",
+"<  c #2B8664037267",
+"1  c #37296CB87A6D",
+"2  c #39CC6EAD7C37",
+"3  c #3F7C72747F86",
+"4  c #451747744112",
+"5  c #440A4A084606",
+"6  c #4A984CDE46A4",
+"7  c #44634C3B4915",
+"8  c #4C7A4F764A37",
+"9  c #4D2550574B42",
+"0  c #44154AFC5AA0",
+"q  c #4E6B57285514",
+"w  c #49BE50385F57",
+"e  c #5211556950C4",
+"r  c #57C25982536B",
+"t  c #59FB5C7B5734",
+"y  c #5D055EFC5938",
+"u  c #5E9B61785CA8",
+"i  c #609D63645ED0",
+"p  c #4C5152AF6169",
+"a  c #42E35C2962B7",
+"s  c #401572E67FEC",
+"d  c #61F464D66032",
+"f  c #6CA86DBA67D8",
+"g  c #671D6EE469D6",
+"h  c #6C0B6F486ADF",
+"j  c #62EC71D06C07",
+"k  c #73B574806ED3",
+"l  c #6F27738E7E76",
+"z  c #6D3578457890",
+"x  c #739D75D871B9",
+"c  c #708F74C37F80",
+"v  c #71A17D267AF5",
+"b  c #E62735E63591",
+"n  c #E63744044370",
+"m  c #E6524E664D8D",
+"M  c #E66752425147",
+"N  c #E66B59A75881",
+"B  c #E69C64576313",
+"V  c #E676690967AD",
+"C  c #E6AD6D526BDE",
+"Z  c #E6C371056F57",
+"A  c #E6B174D17326",
+"S  c #721983017D46",
+"D  c #7EF281147D28",
+"F  c #43587577822E",
+"G  c #49CF7A30867F",
+"H  c #71E6762280A2",
+"J  c #59D985F5915D",
+"K  c #5D1888759384",
+"L  c #77E983A384B4",
+"P  c #795C8513862C",
+"I  c #6D11942C9E23",
+"U  c #873387A682E6",
+"Y  c #880188748393",
+"T  c #8932898584B8",
+"R  c #810184128D14",
+"E  c #90B4925F8F0A",
+"W  c #8705897E9144",
+"Q  c #8A268CF29435",
+"!  c #8F2891CF98A1",
+"~  c #81C29F0C98F9",
+"^  c #92AF964A9300",
+"/  c #95B498DA95B8",
+"(  c #9C1C9D8A9A1B",
+")  c #850CA1A79BC5",
+"_  c #88D3A4939ED2",
+"`  c #9EF0A045A4FC",
+"'  c #9888A658A9D6",
+"]  c #95B8AE64A971",
+"[  c #9D49AA76ADF6",
+"{  c #9B7CB2DAAE21",
+"}  c #8D4FAC0EB3ED",
+"|  c #9257AFB8B755",
+" . c #975EB387BA5B",
+".. c #98C9B4A1BB52",
+"X. c #A7F0A6CDA21F",
+"o. c #A6E1AA16A778",
+"O. c #A678B2F5B666",
+"+. c #A8B4B44DB755",
+"@. c #A813B73EBC3B",
+"#. c #AB1FBA78BFA0",
+"$. c #B4E6B61CB3E6",
+"%. c #BD09BB68B7AF",
+"&. c #B19CBC29BE98",
+"*. c #BE54BEE7BDBF",
+"=. c #E6D785D28404",
+"-. c #E6E08A278802",
+";. c #E8E08F698D4B",
+":. c #E72096F9949B",
+">. c #E7199A0397A0",
+",. c #C132BF54BAED",
+"<. c #E740A38CA0F5",
+"1. c #E74FAB39A853",
+"2. c #E744B2A9AFB6",
+"3. c #E76FB703B3EF",
+"4. c #EAE3B4F8B187",
+"5. c #E77ABE19BACB",
+"6. c #B131C0B5BCFB",
+"7. c #C216C045BBD7",
+"8. c #E7A6C0A8BD59",
+"9. c #E981C0BFBD99",
+"0. c #A768BF35C539",
+"q. c #A886C036C638",
+"w. c #C0B5C015C0A6",
+"e. c #B810C89CC533",
+"r. c #B8C5C935C5D0",
+"t. c #B743CAD9CFC5",
+"y. c #BED4C968CA15",
+"u. c #B8CECBB8D083",
+"i. c #BFC8D0E7D550",
+"p. c #C1E2C13EC1C8",
+"a. c #C97AC80AC6B2",
+"s. c #CA9EC926C7AD",
+"d. c #C0CAC970CB6F",
+"f. c #CACFCB14C958",
+"g. c #D1E4CFDECC5A",
+"h. c #D2BCD173CF97",
+"j. c #C730CEE9D0DD",
+"k. c #CE6BDABBD9AE",
+"l. c #D84CD5D8D19B",
+"z. c #D95FD6E1D2A5",
+"x. c #D420DC9FDBFF",
+"c. c #D95FDE46DFD1",
+"v. c #E79BC7C9C44C",
+"b. c #E7A7CE58CAB9",
+"n. c #E7B6D68FD2E0",
+"m. c #E7C8DAF4D72A",
+"M. c #EB4DDBCDD790",
+"N. c #E7CDDFD0DBF3",
+"B. c #E9CEDD82D992",
+"V. c #E02BE0B7DFB4",
+"C. c #E7DFE28BDE93",
+"Z. c #ED60E3B5DF2B",
+"A. c #D3CADFCAE284",
+"S. c #D66EE189E4A6",
+"D. c #DC60E4F2E32F",
+"F. c #E05EE8D1EAF3",
+"G. c #E574E699E461",
+"H. c #EA00E72EE328",
+"J. c #E280E8EBE736",
+"K. c #EB52E8F6E492",
+"L. c #E53EEB22EACB",
+"P. c #EC9EED4BECA8",
+"I. c #EC9EF0DCEFD4",
+"U. c #EAAFF050F1DE",
+"Y. c #EE58F28EF230",
+"T. c #F464F703F705",
+"R. c #F64FF882F7EA",
+"E. c #F74FF9C2F9DE",
+"W. c #FF75FF97FF91",
+/* pixels */
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.",
+"W.L.d.y.y.y.j.R.W.F.i.i.i.i.k.E.W.L.D.D.D.D.I.W.E.E.E.E.E.E.W.W.",
+"W.[ = - - = a c.W.| < < < < G Y.R.{ _ _ _ _ y.W.Y.J.J.J.J.L.W.W.",
+"W.' $ % % $ : x.W.} > , , > 3 U.R.] ~ ~ ~ ~ e.W.Y.J.J.J.J.L.W.W.",
+"W.' $ % % % : x.W.} , , , > s U.R.] ~ ~ ~ ~ e.W.Y.J.J.J.J.L.W.W.",
+"W.' $ % % $ : x.W.} > , , > 3 U.R.] ~ ~ ~ ~ e.W.Y.J.J.J.J.L.W.W.",
+"W.[ & * * & : c.W.} , , , , F Y.R.] ) ) ) ) r.W.Y.J.J.J.J.L.W.W.",
+"W.D.+.O.+.O.&.T.W.A.0.0.q.q.t.E.W.D.k.k.k.k.L.W.E.T.R.R.T.E.W.W.",
+"W.W.E.E.E.E.E.W.W.W.W.E.P.K.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.P.E.",
+"W.u.K K K K I L.W.D.6.g # @ @ # # @ @ @ @ @ # # # # # # # @ 5 D ",
+"W. .> > > > 1 S.W.x.S + X.%.*.,.,.,.,.,.,.,.,.,.,.,.,.,.,.7.( O ",
+"W...> , , , 2 S.W.x.j t h.R h.K.H.H.K.9.;.B.H.H.H.H.H.H.H.K.z.6 ",
+"W...> , , , 2 S.W.x.j y a.0 p.H.H.H.m.B b 8.H.H.H.H.H.H.H.H.l.6 ",
+"W. .> > > > 1 S.W.x.j y s.w p.H.H.H.>.m M :.K.m.5.m.H.H.H.H.l.6 ",
+"W.t.J J J J I L.W.D.v y s.w p.H.H.v.M <.-.C v.Z n A b.H.H.H.l.6 ",
+"W.E.T.T.T.T.T.W.W.W./ y s.p w.H.C.A C N.3.n m C 2.V N 3.C.H.l.6 ",
+"W.W.W.W.W.W.W.W.W.W.( y s.p *.H.1.m 8.H.n.V -.m.H.m.=.M 5.H.l.6 ",
+"W.R.I.I.I.I.Y.W.W.W./ y s.p *.B.B ;.H.H.C.m.C.H.H.H.C.3.b.H.l.6 ",
+"W.Y.D.D.D.D.D.E.W.E.^ y f.p p.Z.4.M.K.K.K.K.K.K.K.K.K.K.K.K.l.6 ",
+"W.Y.D.D.D.D.D.E.W.E.^ y f.0 H Q Q Q Q Q Q Q Q Q Q Q W W W ` g.6 ",
+"W.Y.D.D.D.D.D.E.W.E.^ r h.R l l l l l c c c c c c H H H c ! f.4 ",
+"W.Y.D.D.D.D.D.E.W.E.*.+ k Y U U U U U T T T T T Y Y Y Y Y T f O ",
+"W.T.J.J.J.J.L.E.W.E.P.o.h u y u u u t o . o o   8 u u u u u x $.",
+"W.W.W.W.W.W.W.W.W.W.W.R.( d u u u u t o   X .   9 u u u u i / P.",
+"W.W.W.W.W.W.W.W.W.W.W.$.@ z L L L L L P P P P P L L L L L v @ E ",
+"W.W.W.W.W.W.W.W.W.W.W.( 7 O.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. at .q x ",
+"W.W.W.W.W.W.W.W.W.W.W.V.y @ 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ; e s.",
+"W.W.W.W.W.W.W.W.W.W.W.W.P.h.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.P.W.",
+"W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W.W."
+};
diff --git a/src/StdAppManager/NetcdfPlusDef b/src/StdAppManager/NetcdfPlusDef
new file mode 100644
index 0000000..89d8cf8
--- /dev/null
+++ b/src/StdAppManager/NetcdfPlusDef
@@ -0,0 +1,61 @@
+NETCDF_VISUALISER; Netcdf Visualiser Application
+{
+     NETCDF_PLOT_TYPE
+     {
+          GEO_POINTS
+          GEO_VECTORS
+          GEO_MATRIX
+          XY_POINTS
+          XY_MATRIX
+     } = GEO_POINTS
+
+     NETCDF_FILENAME
+     {
+          OFF ; OFF
+          @
+     } = OFF
+
+     NETCDF_DATA
+     [ interface = icon, class = NETCDF/SCM_INPUT_DATA/SCM_OUTPUT_DATA, exclusive = false,
+       help = help_data,
+       help_directory  = '/System/Defaults',
+       help_name       = Data
+     ]
+     { @ / }
+
+     NETCDF_LATITUDE_VARIABLE
+     { @ } = ''
+
+     NETCDF_LONGITUDE_VARIABLE
+     { @ } = ''
+
+     NETCDF_X_VARIABLE
+     { @ } = ''
+
+     NETCDF_Y_VARIABLE
+     { @ } = ''
+
+     NETCDF_VALUE_VARIABLE
+     { @ } = ''
+
+     NETCDF_DIMENSION_SETTING
+     {
+          /
+          @
+     }
+
+     NETCDF_X_COMPONENT_VARIABLE
+     { @ } = ''
+
+     NETCDF_Y_COMPONENT_VARIABLE
+     { @ } = ''
+
+     NETCDF_POSITION_TYPE
+     { 
+          ARRAY
+          MATRIX
+     } = ARRAY
+
+     NETCDF_MISSING_ATTRIBUTE
+     { @ } = MISSING_VALUE
+}
diff --git a/src/StdAppManager/NetcdfPlusRules b/src/StdAppManager/NetcdfPlusRules
new file mode 100644
index 0000000..bb9c316
--- /dev/null
+++ b/src/StdAppManager/NetcdfPlusRules
@@ -0,0 +1,31 @@
+%if NETCDF_PLOT_TYPE = GEO_POINTS %then
+     %unset NETCDF_X_VARIABLE
+     %unset NETCDF_Y_VARIABLE
+     %unset NETCDF_X_COMPONENT_VARIABLE
+     %unset NETCDF_Y_COMPONENT_VARIABLE
+     %unset NETCDF_POSITION_TYPE
+
+%if NETCDF_PLOT_TYPE = GEO_VECTORS %then
+     %unset NETCDF_X_VARIABLE
+     %unset NETCDF_Y_VARIABLE
+     %unset NETCDF_VALUE_VARIABLE
+     %unset NETCDF_POSITION_TYPE
+
+%if NETCDF_PLOT_TYPE = GEO_MATRIX %then
+     %unset NETCDF_X_VARIABLE
+     %unset NETCDF_Y_VARIABLE
+     %unset NETCDF_X_COMPONENT_VARIABLE
+     %unset NETCDF_Y_COMPONENT_VARIABLE
+
+%if NETCDF_PLOT_TYPE = XY_POINTS %then
+     %unset NETCDF_LATITUDE_VARIABLE
+     %unset NETCDF_LONGITUDE_VARIABLE
+     %unset NETCDF_X_COMPONENT_VARIABLE
+     %unset NETCDF_Y_COMPONENT_VARIABLE
+     %unset NETCDF_POSITION_TYPE
+
+%if NETCDF_PLOT_TYPE = XY_MATRIX %then
+     %unset NETCDF_LATITUDE_VARIABLE
+     %unset NETCDF_LONGITUDE_VARIABLE
+     %unset NETCDF_X_COMPONENT_VARIABLE
+     %unset NETCDF_Y_COMPONENT_VARIABLE
diff --git a/src/StdAppManager/ObjectSpec.StdAppManager b/src/StdAppManager/ObjectSpec.StdAppManager
new file mode 100644
index 0000000..747f937
--- /dev/null
+++ b/src/StdAppManager/ObjectSpec.StdAppManager
@@ -0,0 +1,84 @@
+##################################################################
+# NETCDF objects
+##################################################################
+
+object,
+     class           = NETCDF_VISUALISER,
+     can_be_created  = True,
+     definition_file = '$METVIEW_DIR_SHARE/etc/NetcdfPlusDef',
+     rules_file      = '$METVIEW_DIR_SHARE/etc/NetcdfPlusRules',
+     default_name    = 'NetCDF Visualiser',
+#    help_page       = to_be_added_once_written,
+     type            = Data,
+     macro           = netcdf_visualiser,
+     expand          = 512, # EXPAND_DEFAULTS
+     editor_type     = SimpleEditor,
+     pixmap          = '$METVIEW_DIR_SHARE/icons/NETCDFPLUS.icon'
+
+state,
+     class   = NETCDF_VISUALISER,
+     action  = execute/visualise/prepare/drop,
+     service = StdAppManager
+
+state,
+     class   = NETCDF_GEO_POINTS/NETCDF_GEO_MATRIX/NETCDF_XY_MATRIX/NETCDF_XY_POINTS/NETCDF_GEO_VECTORS,
+     action  = visualise,
+     service = uPlotManager
+
+service,
+     timeout  = $timeout,
+     name     = 'StdAppManager',
+     fullname = StdAppManager,
+     cmd      = "$metview_command $METVIEW_BIN/StdAppManager"
+
+##################################################################
+# INPUT objects
+##################################################################
+
+object,
+     class               = INPUT_VISUALISER,
+     can_be_created      = True,
+     definition_file     = '$METVIEW_DIR_SHARE/etc/InputVisualiserDef',
+     rules_file          = '$METVIEW_DIR_SHARE/etc/InputVisualiserRules',
+     default_name        = 'Input Visualiser',
+     type                = Data,
+     expand              = 512, # EXPAND_DEFAULTS
+     macro               = input_visualiser,
+     editor_type         = SimpleEditor,
+     pixmap              = '$METVIEW_DIR_SHARE/icons/INPUTVISUALISER.icon'
+
+state,
+     class   = INPUT_VISUALISER,
+     action  = execute/visualise/prepare/drop,
+     service = StdAppManager
+
+state,
+     class   = INPUT_HISTOGRAM/INPUT_XY_POINTS/INPUT_GEO_POINTS/INPUT_XY_VECTORS/INPUT_GEO_VECTORS/INPUT_XY_BINNING/INPUT_GEO_BINNING/INPUT_XY_BOXES/INPUT_GEO_BOXES/INPUT_HOR_BAR/INPUT_VER_BAR,
+     action  = visualise,
+     service = uPlotManager
+
+##################################################################
+# TABLE objects
+##################################################################
+
+object,
+     class               = TABLE_VISUALISER,
+     can_be_created      = True,
+     definition_file     = '$METVIEW_DIR_SHARE/etc/TableVisualiserDef',
+     rules_file          = '$METVIEW_DIR_SHARE/etc/TableVisualiserRules',
+     default_name        = 'Table Visualiser',
+     type                = Data,
+     expand              = 512, # EXPAND_DEFAULTS
+     macro               = table_visualiser,
+     editor_type         = SimpleEditor,
+     pixmap              = '$METVIEW_DIR_SHARE/icons/TABLEVISUALISER.icon'
+
+state,
+     class   = TABLE_VISUALISER,
+     action  = execute/visualise/prepare/drop,
+     service = StdAppManager
+
+state,
+     class   = TABLE_HISTOGRAM/TABLE_XY_POINTS/TABLE_GEO_POINTS/TABLE_XY_VECTORS/TABLE_GEO_VECTORS/TABLE_XY_BINNING/TABLE_GEO_BINNING/TABLE_XY_BOXES/TABLE_GEO_BOXES/TABLE_HOR_BAR/TABLE_VER_BAR,
+     action  = visualise,
+     service = uPlotManager
diff --git a/src/StdAppManager/StdAppManager.cc b/src/StdAppManager/StdAppManager.cc
new file mode 100644
index 0000000..8199f3a
--- /dev/null
+++ b/src/StdAppManager/StdAppManager.cc
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "StdAppManager.h"
+
+StdAppManager::StdAppManager(const char* kw): MvService(kw)
+{
+}
+
+void StdAppManager::serve(MvRequest& in,MvRequest& out)
+{
+	cout << "StdAppManager::serve in" << endl;
+	in.print();
+
+	// Get prefix
+	string verb = in.getVerb();
+	size_t found = verb.find('_');
+	if (found == string::npos)
+	{
+		cout << "ERROR StdAppManager: prefix not found" << endl;
+		return;
+	}
+	string prefix = verb.substr(0,found+1);
+
+     // Build the application verb
+     string plotType = prefix + "PLOT_TYPE";
+     const char* type = in(plotType.c_str());
+     prefix += type;
+
+
+     // special case - INPUT_XY_AREA only exists in Metview - 
+     // Magics should see it as INPUT_XY_POINTS
+
+     if (prefix == "INPUT_XY_AREA")
+        prefix = "INPUT_XY_POINTS";
+
+
+     // Create output request
+     out = in;
+     out.setVerb(prefix.c_str());
+     out.unsetParam(plotType.c_str());
+     out("_VERB")  = prefix.c_str();
+     out("_CLASS") = prefix.c_str();
+
+     cout << "StdAppManager::serve out" << endl;
+     out.print();
+}
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+
+     StdAppManager input("INPUT_VISUALISER");
+     StdAppManager table("TABLE_VISUALISER");
+     StdAppManager netcd("NETCDF_VISUALISER");
+
+	theApp.run();
+}
diff --git a/src/StdAppManager/StdAppManager.h b/src/StdAppManager/StdAppManager.h
new file mode 100644
index 0000000..2fd9653
--- /dev/null
+++ b/src/StdAppManager/StdAppManager.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef STDAPPMANAGER_H
+#define STDAPPMANAGER_H
+
+/************************************
+  Application StdAppManager
+
+  Manager a standard Metview module
+************************************/
+
+#include "Metview.h"
+
+class StdAppManager : public MvService {
+
+public:
+
+	// Constructor
+	StdAppManager(const char* kw);
+
+	// Destructor
+	~StdAppManager() {}
+
+	void serve(MvRequest&,MvRequest&);
+
+protected:
+
+
+};
+
+#endif
diff --git a/src/StdAppManager/TABLEVISUALISER.svg b/src/StdAppManager/TABLEVISUALISER.svg
new file mode 100644
index 0000000..9139cce
--- /dev/null
+++ b/src/StdAppManager/TABLEVISUALISER.svg
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64"
+   height="64"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="TABLEVISUALISER.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="6.796875"
+     inkscape:cx="32"
+     inkscape:cy="31.565804"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     width="64px"
+     height="64px"
+     inkscape:window-width="772"
+     inkscape:window-height="646"
+     inkscape:window-x="567"
+     inkscape:window-y="193"
+     showgrid="false" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="circle">
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 14.5,4.5 C 14.5,59.5 14.5,59.5 14.5,59.5 L 14.5,59.5"
+       id="path2173" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 29.5,4.5 C 29.5,59.5 29.5,59.5 29.5,59.5 L 29.5,59.5"
+       id="path2175" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 44.5,4.5 C 44.5,59.5 44.5,59.5 44.5,59.5"
+       id="path2177" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 59.5,4.5 C 59.5,59.5 59.5,59.5 59.5,59.5"
+       id="path2179" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="18.140732"
+       y="11.057471"
+       id="text2183"><tspan
+         sodipodi:role="line"
+         id="tspan2185"
+         x="18.140732"
+         y="11.057471">A</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="32.411995"
+       y="11.057471"
+       id="text2187"><tspan
+         sodipodi:role="line"
+         id="tspan2189"
+         x="32.411995"
+         y="11.057471">B</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="47.418892"
+       y="10.887549"
+       id="text2191"><tspan
+         sodipodi:role="line"
+         id="tspan2193"
+         x="47.418892"
+         y="10.887549">C</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="3.7669091"
+       y="27.748047"
+       id="text2195"><tspan
+         sodipodi:role="line"
+         id="tspan2197"
+         x="3.7669091"
+         y="27.748047">1</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="3.6516747"
+       y="41.650116"
+       id="text2199"><tspan
+         sodipodi:role="line"
+         id="tspan2201"
+         x="3.6516747"
+         y="41.650116">2</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="3.4114404"
+       y="55.627129"
+       id="text2203"><tspan
+         sodipodi:role="line"
+         id="tspan2205"
+         x="3.4114404"
+         y="55.627129">3</tspan></text>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 5,14 C 65,14 65,14 65,14"
+       id="path2207" />
+    <rect
+       style="opacity:0.38172043;fill:#c4d1e6;fill-opacity:1;stroke:#6391d7;stroke-width:1.74761665;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2188"
+       width="62.58112"
+       height="10.792613"
+       x="1.0036925"
+       y="1.8864518"
+       ry="5.3963065"
+       rx="0" />
+    <rect
+       style="opacity:0.38172043;fill:#c4d1e6;fill-opacity:1;stroke:#6391d7;stroke-width:1.707569;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect5217"
+       width="12.156798"
+       height="46.143005"
+       x="0.98366958"
+       y="14.372176"
+       ry="0" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 3.1632183,30.455172 C 61.866667,30.455172 61.866667,30.455172 61.866667,30.455172"
+       id="path5221" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 3.1632182,45.756322 C 61.866667,45.756322 61.866667,45.756322 61.866667,45.756322"
+       id="path5223"
+       inkscape:transform-center-x="19.714943"
+       inkscape:transform-center-y="-7.6505747" />
+    <g
+       style="display:inline"
+       id="g6326"
+       transform="matrix(2.1061635,0,0,2.1061635,-2.6698689,-2.7501989)">
+      <rect
+         rx="0"
+         ry="0.76569498"
+         y="25.690905"
+         x="20.200878"
+         height="1.53139"
+         width="3.6325176"
+         id="rect4235"
+         style="opacity:1;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.85816514;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <rect
+         ry="1.2517357"
+         y="27.350697"
+         x="13.411453"
+         height="2.7717004"
+         width="17.032545"
+         id="rect4233"
+         style="fill:#b6c6cc;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.95899999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <g
+         id="g6294">
+        <rect
+           style="fill:#e7e4e0;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:1.00858581;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           id="rect4231"
+           width="18.368809"
+           height="12.378362"
+           x="12.631559"
+           y="13.338168"
+           ry="1.2467414" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#e52626;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+           d="M 17.43489,21.539066 L 20.832458,15.548617 L 21.994785,20.108511 L 24.542961,17.962678 C 25.541369,18.812071 26.251737,19.373422 27.538186,20.510855"
+           id="path5224"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#1f283c;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 14.752598,15.056863 C 14.797303,23.506079 14.797303,23.595489 14.797303,23.595489"
+           id="path5226" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#1f283c;stroke-width:1.00666595px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 14.308883,23.726271 L 29.323046,23.688232"
+           id="path5228" />
+      </g>
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="text">
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3142"
+       style="font-family:Bitstream Vera Sans"><flowRegion
+         id="flowRegion3144"><rect
+           id="rect3146"
+           width="24.422989"
+           height="14.565517"
+           x="21.333334"
+           y="26.188505"
+           style="font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara3148">SassdfsfdffsSQ</flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3150"
+       style="font-family:Bitstream Vera Sans Mono"><flowRegion
+         id="flowRegion3152"><rect
+           id="rect3154"
+           width="18.096552"
+           height="12.8"
+           x="23.834482"
+           y="27.954023"
+           style="font-family:Bitstream Vera Sans Mono" /></flowRegion><flowPara
+         id="flowPara3156">SQ</flowPara></flowRoot>  </g>
+</svg>
diff --git a/src/StdAppManager/TABLEVISUALISER.xpm b/src/StdAppManager/TABLEVISUALISER.xpm
new file mode 100644
index 0000000..f16a0ed
--- /dev/null
+++ b/src/StdAppManager/TABLEVISUALISER.xpm
@@ -0,0 +1,210 @@
+/* XPM */
+static char *TABLEVISUALISER[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 172 2",
+"   c #1DE520DE1B00",
+".  c #2BB72DC02937",
+"X  c #2D7932112D50",
+"o  c #30E936543193",
+"O  c #362E3BE33723",
+"+  c #3A553CD73790",
+"@  c #3B683DEC387B",
+"#  c #3D2D40D73B1C",
+"$  c #3F4044E54069",
+"%  c #3E46455D5610",
+"&  c #455D47724174",
+"*  c #42F9484543A6",
+"=  c #497F4BCC45DF",
+"-  c #4C154E96494B",
+";  c #4BA450E34C9A",
+":  c #510D536D4E06",
+">  c #53CA565650CF",
+",  c #5441581E538D",
+"<  c #588659C2567F",
+"1  c #5B475D3E5B4D",
+"2  c #5E6B5FF459E5",
+"3  c #607C62575D5B",
+"4  c #4EBE54F5636B",
+"5  c #5065567064EF",
+"6  c #589C5E506B76",
+"7  c #591162EC61B6",
+"8  c #637C65746441",
+"9  c #68756ACD66B1",
+"0  c #612A6638726F",
+"q  c #73427512752B",
+"w  c #7A017B3475FC",
+"e  c #7ADF7C857AFD",
+"r  c #E60935B0354F",
+"t  c #E6253CB83C47",
+"y  c #E63D4D354C62",
+"u  c #E65650554F8C",
+"i  c #E6635351526D",
+"p  c #E66A5C435B0E",
+"a  c #E6C060925F96",
+"s  c #E68B62C3613F",
+"d  c #E67F6DEA6C84",
+"f  c #E6AE70746EBE",
+"g  c #E6BB78477675",
+"h  c #E6AD7ABD790A",
+"j  c #7ED780F97D27",
+"k  c #E6EE81197F03",
+"l  c #6DD675AD81D0",
+"z  c #6D98791D8B11",
+"x  c #76D682BB83F2",
+"c  c #7B8981E48BC0",
+"v  c #80A7825A8517",
+"b  c #85FC881584A0",
+"n  c #8923891D83AF",
+"m  c #8DC78F038BC3",
+"M  c #8F1390498D0D",
+"N  c #8F7C94019A90",
+"B  c #8E849BD09EDB",
+"V  c #90CE91069082",
+"C  c #97FA99CF96BA",
+"Z  c #949896CB9A1C",
+"A  c #95C2997C9FBA",
+"S  c #9C639C849C4B",
+"D  c #A319A2289D2A",
+"F  c #8EE09A78AC58",
+"G  c #96BC9BA2A378",
+"H  c #993A9D42A45B",
+"J  c #9596A000AFF8",
+"K  c #8E0A9D5BB536",
+"L  c #9272A02CA36D",
+"P  c #9F0EA20DA73A",
+"I  c #9D77A265AA25",
+"U  c #9C0FA5DFB52C",
+"Y  c #9F1AAAA0BCA5",
+"T  c #A459A58BA6EA",
+"R  c #A858A765A25B",
+"E  c #AABAA9F3A517",
+"W  c #A37CA657AC53",
+"Q  c #AD50AD5FADD3",
+"!  c #A544AA3AB1E4",
+"~  c #AB9FAF0AB476",
+"^  c #A309AD25BCE3",
+"/  c #AC2BB117B817",
+"(  c #A79CB6C8BB9D",
+")  c #AA97B555BBB2",
+"_  c #B102B0F7B177",
+"`  c #B2CCB6BDBCE1",
+"'  c #BD38BE3DBF7C",
+"]  c #E6C385D883BA",
+"[  c #E6E1899D87A4",
+"{  c #E7168E0F8C0B",
+"}  c #E72391FE8FD3",
+"|  c #E8879602938A",
+" . c #E7159EE49C44",
+".. c #E6F3A2B89FF1",
+"X. c #E74AA7FEA55C",
+"o. c #E9E0A847A57D",
+"O. c #E74DABE5A929",
+"+. c #E956ADA7AA99",
+"@. c #E837B7FDB4DF",
+"#. c #E77BB8F9B603",
+"$. c #E77ABC22B8FF",
+"%. c #9E0EAE04C6DF",
+"&. c #AB2AB642C768",
+"*. c #AA73B6DAC9B8",
+"=. c #B4EFB9F0C17B",
+"-. c #BCB1BF4FC359",
+";. c #B4BFBE3ACD1A",
+":. c #B8D1C025CBDF",
+">. c #B2C0BF77D310",
+",. c #BEAEC0D8C3C3",
+"<. c #BF5BC44FCB56",
+"1. c #B467C136D4FC",
+"2. c #BD1FC76FD731",
+"3. c #B373C355DC09",
+"4. c #B9B4C73FDC5B",
+"5. c #BF8CCB7BDE10",
+"6. c #C6B9C64DC4D4",
+"7. c #C87EC94DC7BF",
+"8. c #C165C632CD99",
+"9. c #C417C88DCF21",
+"0. c #CDDBCDFECD50",
+"q. c #D507D00BCE84",
+"w. c #D376D1AED022",
+"e. c #C082C7D6D375",
+"r. c #C64DCB8ED31C",
+"t. c #C8C3CDC3D545",
+"y. c #C85CCFAFDB45",
+"u. c #CB70D075D7F3",
+"i. c #CE26D3B7DC23",
+"p. c #D3A4D220D0A7",
+"a. c #D158D676DE00",
+"s. c #D3BCD8A4DFF1",
+"d. c #DE5ADDB4DC9D",
+"f. c #E783C652C2F1",
+"g. c #E78DCB61C7E9",
+"h. c #E79ACEF7CB7A",
+"j. c #E7B5D2B5CF0A",
+"k. c #E7B5D6E4D313",
+"l. c #EA5FD7BBD42D",
+"z. c #E7C1DA6FD6AB",
+"x. c #E7C8DE04DA2A",
+"c. c #EA70DE39DA66",
+"v. c #E73FE300DF37",
+"b. c #E8FFE3AFDF97",
+"n. c #CF88D76CE389",
+"m. c #D598DAE4E292",
+"M. c #D97EDEB8E642",
+"N. c #D477DE00ECE6",
+"B. c #CDF2DC6AF2E0",
+"V. c #D205DF57F428",
+"C. c #DC10E103E810",
+"Z. c #DD4FE312EB84",
+"A. c #D6C0E1D4F2D8",
+"S. c #DB55E52BF488",
+"D. c #DF62E8CAF7B7",
+"F. c #E7A8E590E1C3",
+"G. c #E9EBE719E308",
+"H. c #EC0AE972E57B",
+"J. c #E199E6F6EEBF",
+"K. c #E3D8E8CBEFCD",
+"L. c #ECFAED3AECA1",
+"P. c #F04AF080EFFB",
+"I. c #E15EE7ACF0C1",
+"U. c #E526EB9BF516",
+"Y. c #EA4FEF7AF6BC",
+"T. c #E6ECEE40F967",
+"R. c #EA09F022F8E0",
+"E. c #EC2DF11BF803",
+"W. c #ED43F245F951",
+"Q. c #F2A4F2DBF265",
+"!. c #F758F888FA6F",
+"~. c #FFA8FFB0FFBB",
+/* pixels */
+"U.D.D.D.D.D.D.D.D.D.S.S.D.D.D.D.S.N.A.D.D.D.D.D.D.N.n.S.D.D.D.D.",
+"B.A.S.S.S.S.A.A.S.S.&.U A.S.A.S.2.F U ;.S.A.A.S.;.J U ;.S.A.A.B.",
+"B.U.Y.Y.Y.Y.C.<.E.K.W G m.E.<.Z.8.W -.W Y.C.<.J.I m.U.J.Y.<.C.A.",
+"B.U.Y.Y.Y.Y.m.~ W.u.I ~ =.W.~ m.8.N I ~ U.m./ C.I K.E.Y.E.~ m.A.",
+"B.U.Y.Y.Y.Y.m./ E.~ I ! H I./ m.8.~ i.H J.m./ U.W 8.m.s.E./ m.A.",
+"B.D.U.U.U.T.n.^ I.:.Z.U.:.Z.^ m.i.U ^ e.U.n.^ T.m.) ^ y.T.^ n.A.",
+"B.B.3.%.%.%.K z ^ Y ^ ^ Y ^ z F ^ Y Y ^ ^ F z ^ ^ ^ ^ ^ ^ z F Y ",
+"B.V.5.&.*.*.F q ,.' ' ' ' ,.q T -.-.' ' -.T q ,.' ' ' ' ,.q T -.",
+"B.U.Y.W.E.R.1.Z ~.~.~.~.~.~.S d.~.~.~.~.~.d.S ~.~.~.~.~.~.S d.~.",
+"B.T.a./ m.R.>.Z ~.~.~.~.~.~.S d.~.~.~.~.~.d.S ~.~.~.~.~.~.S d.~.",
+"B.U.M.I 9.R.>.Z ~.~.~.~.~.~.S d.~.~.~.~.~.d.S ~.~.~.~.~.~.S d.~.",
+"B.U.W.` 9.R.>.Z ~.~.~.~.!.Q.V 0.L.L.L.L.L.0.V P.L.L.L.L.P.V d.~.",
+"B.U.Y./ 8.R.>.Z ~.~.~.H.j : + = : : : : : = + : : : : : : + 8 7.",
+"B.T.m.G W Z.1.Z ~.~.~.S & D Q E E E E E E E E E E E E E E E 2 < ",
+"B.M.9.,.,.r.U v d.d.d.9 w 6.W v.G.G.G.c.o.l.G.G.G.G.G.G.G.H.R # ",
+"V.<.Z Z Z N l 1 S S S - w P 0 d.F.F.F...r X.G.F.F.F.F.F.F.G.R # ",
+"B.U.r./ t.R.1.Z ~.~.~.w w T 0 d.F.F.j.p t k F.F.z.b.F.F.F.G.R # ",
+"B.U.m.i.I C.>.Z ~.~.~.w w T 0 d.F.F.{ a } s k. .p  .v.F.F.G.R # ",
+"B.U.E.i.W J.>.Z ~.~.~.w w T 0 d.G.f.u O.f.y f i k i [ x.F.G.R # ",
+"B.U.a.I a.Y.>.Z ~.~.~.w w W 0 d.b.h d x.z.p i #.F.#.p g z.G.R # ",
+"B.U.! G ` Z.>.Z ~.~.~.w w W 0 d. at .y $.F.F.f.g.F.F.F.f.] h.H.R # ",
+"B.U.K.Z.Z.Y.1.Z ~.~.~.w w W 0 d.+.| b.G.G.G.G.G.G.G.G.b.F.H.R # ",
+"B.r.P P P P c 8 Q Q Q > w W 6 7.q.q.p.p.p.p.p.p.w.w.w.p.w.d.R # ",
+"B.a.A c H -.F e p.0.0.3 w Q % 4 5 5 5 5 4 4 4 4 4 4 4 4 4 G E # ",
+"B.U.C.r.I J.1.Z ~.~.~.b 3 6.~ Q Q Q Q Q Q ~ ~ _ _ _ _ _ _ 6.n & ",
+"B.U.J.! I I.>.Z ~.~.~.0.= = ; : > > > - = = = = : > > > > = @ C ",
+"B.U.I.m.H M.>.Z ~.~.~.~.F.E < e m m M -   X .   9 M m m m 1 ' !.",
+"B.I.-.! ! J.>.Z ~.~.~.~.6.> O $ * * * O X o o X # * * * * o e Q.",
+"B.U.Z.M.U.Y.>.Z ~.~.~.~.q 7 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( L # 6.",
+"B.S.I.U.I.D.4.` ~.~.~.~.j ; B B B B B B B B B B B B B B B x # 0.",
+"S.S.S.S.S.S.S.!.~.~.~.~.d.q , , , , , , , , , , , , , , , 1 T !.",
+"~.~.~.~.~.~.~.~.~.~.~.~.~.!.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.Q.~.~."
+};
diff --git a/src/StdAppManager/TableVisualiserDef b/src/StdAppManager/TableVisualiserDef
new file mode 100644
index 0000000..728412d
--- /dev/null
+++ b/src/StdAppManager/TableVisualiserDef
@@ -0,0 +1,214 @@
+TABLE_VISUALISER; Table Visualiser Application
+{
+     TABLE_PLOT_TYPE
+     {
+#         HISTOGRAM
+          XY_POINTS
+          GEO_POINTS
+          XY_VECTORS
+          GEO_VECTORS
+          XY_BINNING
+          GEO_BINNING
+#         XY_BOXES
+#         GEO_BOXES
+#         HOR_BAR
+#         VER_BAR
+     } = XY_POINTS
+
+     TABLE_FILENAME
+     {
+          OFF ; OFF
+          @
+     } = OFF
+
+     TABLE_DATA
+          [ interface = icon, class = TABLE/GEOPOINTS/NOTE, exclusive = true,
+            help = help_data,
+            help_directory = '/System/Defaults',
+            help_name      = Data ]
+     { @ / }
+
+     TABLE_X_TYPE
+     {
+          NUMBER    ; NUMBER
+          DATE      ; DATE
+     } = NUMBER
+
+     TABLE_Y_TYPE
+     {
+          NUMBER    ; NUMBER
+          DATE      ; DATE
+     } = NUMBER
+
+     TABLE_VARIABLE_IDENTIFIER_TYPE
+     {
+          NAME
+          INDEX
+     } = NAME
+
+     TABLE_X_VARIABLE {@} = ''
+     TABLE_Y_VARIABLE {@} = ''
+     TABLE_X_MISSING_VALUE { * } = -21.e6
+     TABLE_Y_MISSING_VALUE { * } = -21.e6
+     
+     TABLE_LONGITUDE_VARIABLE   {@} = ''
+     TABLE_LATITUDE_VARIABLE    {@} = ''
+     TABLE_X_COMPONENT_VARIABLE {@} = ''
+     TABLE_Y_COMPONENT_VARIABLE {@} = ''
+     TABLE_VALUE_VARIABLE       {@} = ''
+
+     TABLE_BINNING
+     [ interface       = icon,
+       class           = MBINNING,
+       exclusive       = true,
+       help            = help_data,
+       help_directory  = '/System/Defaults',
+       help_name       = Binning,
+       help_class      = MBINNING,
+       help_definition = (MBINNING)
+     ]
+     { @ }
+
+%include TableCommonDef
+}
+
+#---------------------------------------------------------------------
+
+TABLE_HISTOGRAM; Histogram
+{
+
+     TABLE_DATA
+          [ interface = icon, class = TABLE, exclusive = true,
+            help = help_data,
+            help_directory  = '/System/Defaults',
+            help_name       = Data ]
+     { @ }
+   TABLE_USE_COLUMN_NAME {
+        ON
+        OFF
+    } = OFF
+     TABLE_VARIABLE_INDEX { * } = -1
+    TABLE_VARIABLE_NAME { @ } = ''
+%include TableCommonDef
+}
+
+#---------------------------------------------------------------------
+
+TABLE_XY_BOXES; XYBoxes
+{
+
+	TABLE_DATA
+		[ interface = icon, class = TABLE, exclusive = true,
+		  help = help_data,
+		  help_directory  = '/System/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+    TABLE_USE_COLUMN_NAME {
+        ON
+        OFF
+    } = OFF
+	TABLE_X_VARIABLE_INDEX { * } = 1
+
+	TABLE_X_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+
+	TABLE_Y_MIN_VARIABLE_INDEX    { @ } = ''
+	TABLE_Y_10_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_25_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_MEDIUM_VARIABLE_INDEX { @ } = ''
+	TABLE_Y_75_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_90_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_MAX_VARIABLE_INDEX    { @ } = ''
+%include TableCommonDef
+}
+
+#---------------------------------------------------------------------
+
+TABLE_GEO_BOXES; GeoBoxes
+{
+
+	TABLE_DATA
+		[ interface = icon, class = TABLE, exclusive = true,
+		  help = help_data,
+		  help_directory  = '/System/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+    TABLE_USE_COLUMN_NAME {
+        ON
+        OFF
+    } = OFF
+	TABLE_LONGITUDE_VARIABLE_INDEX { @ } = ''
+	TABLE_LATITUDE_VARIABLE_INDEX  { @ } = ''
+
+	TABLE_Y_MIN_VARIABLE_INDEX    { @ } = ''
+	TABLE_Y_10_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_25_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_MEDIUM_VARIABLE_INDEX { @ } = ''
+	TABLE_Y_75_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_90_VARIABLE_INDEX     { @ } = ''
+	TABLE_Y_MAX_VARIABLE_INDEX    { @ } = ''
+%include TableCommonDef
+}
+
+#---------------------------------------------------------------------
+
+TABLE_HOR_BAR; HorizontalBar
+{
+
+	TABLE_DATA
+		[ interface = icon, class = TABLE, exclusive = true,
+		  help = help_data,
+		  help_directory  = '/System/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+    TABLE_USE_COLUMN_NAME {
+        ON
+        OFF
+    } = OFF
+	TABLE_X_LOWER_VARIABLE_INDEX { @ } = ''
+	TABLE_X_UPPER_VARIABLE_INDEX { @ } = ''
+	TABLE_Y_VARIABLE_INDEX       { @ } = ''
+
+	TABLE_Y_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+%include TableCommonDef
+}
+
+#---------------------------------------------------------------------
+
+TABLE_VER_BAR; VerticalBar
+{
+
+	TABLE_DATA
+		[ interface = icon, class = TABLE, exclusive = true,
+		  help = help_data,
+		  help_directory  = '/System/Defaults',
+		  help_name       = Data ]
+	{ @ / }
+    TABLE_USE_COLUMN_NAME {
+        ON
+        OFF
+    } = OFF
+	TABLE_Y_LOWER_VARIABLE_INDEX { * } = 1
+	TABLE_Y_UPPER_VARIABLE_INDEX { @ } = ''
+	TABLE_X_VARIABLE_INDEX       { @ } = ''
+
+	TABLE_X_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+
+	TABLE_Y_TYPE
+	{
+		NUMBER	; NUMBER
+		DATE		; DATE
+	} = NUMBER
+%include TableCommonDef
+}
diff --git a/src/StdAppManager/TableVisualiserRules b/src/StdAppManager/TableVisualiserRules
new file mode 100644
index 0000000..e06f5ba
--- /dev/null
+++ b/src/StdAppManager/TableVisualiserRules
@@ -0,0 +1,80 @@
+! This is the magics check file
+!
+! Each request is checked again each rule
+! The rules have the following syntax:
+!
+!   RULE   ---> if TEST then ACTION 
+!
+!
+!   TEST   ---> PARAMETER  =  VALUE
+!          ---> PARAMETER  >  VALUE
+!          ---> PARAMETER  <  VALUE
+!          ---> PARAMETER  >= VALUE
+!          ---> PARAMETER  <= VALUE
+!          ---> PARAMETER  <> VALUE
+!          ---> PARAMETER  in LIST_OF_VALUES
+!          ---> not TEST
+!          ---> TEST and TEST
+!          ---> TEST or TEST
+!          ---> ( TEST )
+!
+!
+!   ACTION ---> error    MESSAGE
+!          ---> warning	 MESSAGE
+!		   ---> set      PARAMETER = VALUE
+!		   ---> unset    PARAMETER 
+!
+! B.Raoult
+! Wed Feb 13 15:07:49 GMT 1991
+!
+! J.Daabeck
+! Thu Nov 3
+!
+
+%if TABLE_PLOT_TYPE = XY_POINTS %then
+     %unset TABLE_LONGITUDE_VARIABLE
+     %unset TABLE_LATITUDE_VARIABLE
+     %unset TABLE_X_COMPONENT_VARIABLE
+     %unset TABLE_Y_COMPONENT_VARIABLE
+     %unset TABLE_BINNING
+
+%if TABLE_PLOT_TYPE = GEO_POINTS %then
+     %unset TABLE_X_VARIABLE
+     %unset TABLE_Y_VARIABLE
+     %unset TABLE_X_COMPONENT_VARIABLE
+     %unset TABLE_Y_COMPONENT_VARIABLE
+     %unset TABLE_X_TYPE
+     %unset TABLE_Y_TYPE
+     %unset TABLE_BINNING
+     %unset TABLE_X_MISSING_VALUE
+     %unset TABLE_Y_MISSING_VALUE
+
+%if TABLE_PLOT_TYPE = XY_VECTORS %then
+     %unset TABLE_LONGITUDE_VARIABLE
+     %unset TABLE_LATITUDE_VARIABLE
+     %unset TABLE_BINNING
+
+%if TABLE_PLOT_TYPE = GEO_VECTORS %then
+     %unset TABLE_X_VARIABLE
+     %unset TABLE_Y_VARIABLE
+     %unset TABLE_X_TYPE
+     %unset TABLE_Y_TYPE
+     %unset TABLE_BINNING 
+     %unset TABLE_X_MISSING_VALUE
+     %unset TABLE_Y_MISSING_VALUE
+
+%if TABLE_PLOT_TYPE = XY_BINNING %then
+     %unset TABLE_LONGITUDE_VARIABLE
+     %unset TABLE_LATITUDE_VARIABLE
+     %unset TABLE_X_COMPONENT_VARIABLE
+     %unset TABLE_Y_COMPONENT_VARIABLE
+
+%if TABLE_PLOT_TYPE = GEO_BINNING %then
+     %unset TABLE_X_VARIABLE
+     %unset TABLE_Y_VARIABLE
+     %unset TABLE_X_COMPONENT_VARIABLE
+     %unset TABLE_Y_COMPONENT_VARIABLE
+     %unset TABLE_X_TYPE
+     %unset TABLE_Y_TYPE
+     %unset TABLE_X_MISSING_VALUE
+     %unset TABLE_Y_MISSING_VALUE
diff --git a/src/Velstr/Makefile.am b/src/Velstr/Makefile.am
new file mode 100644
index 0000000..5dde5b5
--- /dev/null
+++ b/src/Velstr/Makefile.am
@@ -0,0 +1,15 @@
+   
+bin_PROGRAMS = bin/Velstr
+
+
+bin_Velstr_SOURCES  = velstr-exFortran.cc Velstr.cc Velstr.h
+bin_Velstr_CPPFLAGS = -I../PottF/include
+bin_Velstr_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS)
+
+
+
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/Velstr/Makefile.in b/src/Velstr/Makefile.in
new file mode 100644
index 0000000..e50dadb
--- /dev/null
+++ b/src/Velstr/Makefile.in
@@ -0,0 +1,681 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/Velstr$(EXEEXT)
+subdir = src/Velstr
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_Velstr_OBJECTS = bin_Velstr-velstr-exFortran.$(OBJEXT) \
+	bin_Velstr-Velstr.$(OBJEXT)
+bin_Velstr_OBJECTS = $(am_bin_Velstr_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_Velstr_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_Velstr_SOURCES)
+DIST_SOURCES = $(bin_Velstr_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_Velstr_SOURCES = velstr-exFortran.cc Velstr.cc Velstr.h
+bin_Velstr_CPPFLAGS = -I../PottF/include
+bin_Velstr_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Velstr/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Velstr/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/Velstr$(EXEEXT): $(bin_Velstr_OBJECTS) $(bin_Velstr_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/Velstr$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_Velstr_OBJECTS) $(bin_Velstr_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Velstr-Velstr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_Velstr-velstr-exFortran.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_Velstr-velstr-exFortran.o: velstr-exFortran.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Velstr-velstr-exFortran.o -MD -MP -MF $(DEPDIR)/bin_Velstr-velstr-exFortran.Tpo -c -o bin_Velstr-velstr-exFortran.o `test -f 'velstr-exFortran.cc' || echo '$(srcdir)/'`velstr-exFortran.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Velstr-velstr-exFortran.Tpo $(DEPDIR)/bin_Velstr-velstr-exFortran.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='velstr-exFortran.cc' object='bin_Velstr-velstr-exFortran.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Velstr-velstr-exFortran.o `test -f 'velstr-exFortran.cc' || echo '$(srcdir)/'`velstr-exFortran.cc
+
+bin_Velstr-velstr-exFortran.obj: velstr-exFortran.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Velstr-velstr-exFortran.obj -MD -MP -MF $(DEPDIR)/bin_Velstr-velstr-exFortran.Tpo -c -o bin_Velstr-velstr-exFortran.obj `if test -f 'velstr-exFortran.cc'; then $(CYGPATH_W) 'velstr-exFortran.cc'; else $(CYGPATH_W) '$(srcdir)/velstr-exFortran.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Velstr-velstr-exFortran.Tpo $(DEPDIR)/bin_Velstr-velstr-exFortran.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='velstr-exFortran.cc' object='bin_Velstr-velstr-exFortran.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Velstr-velstr-exFortran.obj `if test -f 'velstr-exFortran.cc'; then $(CYGPATH_W) 'velstr-exFortran.cc'; else $(CYGPATH_W) '$(srcdir)/velstr-exFortran.cc'; fi`
+
+bin_Velstr-Velstr.o: Velstr.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Velstr-Velstr.o -MD -MP -MF $(DEPDIR)/bin_Velstr-Velstr.Tpo -c -o bin_Velstr-Velstr.o `test -f 'Velstr.cc' || echo '$(srcdir)/'`Velstr.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Velstr-Velstr.Tpo $(DEPDIR)/bin_Velstr-Velstr.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Velstr.cc' object='bin_Velstr-Velstr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Velstr-Velstr.o `test -f 'Velstr.cc' || echo '$(srcdir)/'`Velstr.cc
+
+bin_Velstr-Velstr.obj: Velstr.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_Velstr-Velstr.obj -MD -MP -MF $(DEPDIR)/bin_Velstr-Velstr.Tpo -c -o bin_Velstr-Velstr.obj `if test -f 'Velstr.cc'; then $(CYGPATH_W) 'Velstr.cc'; else $(CYGPATH_W) '$(srcdir)/Velstr.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_Velstr-Velstr.Tpo $(DEPDIR)/bin_Velstr-Velstr.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Velstr.cc' object='bin_Velstr-Velstr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_Velstr_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_Velstr-Velstr.obj `if test -f 'Velstr.cc'; then $(CYGPATH_W) 'Velstr.cc'; else $(CYGPATH_W) '$(srcdir)/Velstr.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Velstr/Velstr.cc b/src/Velstr/Velstr.cc
new file mode 100644
index 0000000..4c848c9
--- /dev/null
+++ b/src/Velstr/Velstr.cc
@@ -0,0 +1,212 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Velstr.h"
+#include "MvFortran.h"
+
+
+#ifdef FORTRAN_UPPERCASE
+#define velstr_ VELSTR
+#endif
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define velstr_ velstr
+#endif
+
+extern "C" void velstr_(void);
+
+#define VORTICITY	138
+#define DIVERGENCE	155
+
+void Velstr :: serve(MvRequest& in,MvRequest& out)
+{
+	cout << "\n---> Entering Velstr::serve..." << endl;
+	in.print();
+	 // Get data
+	if (!GetData(in)) return;
+
+	// Compute output field
+	if (!Apply(out)) return;
+
+	cout << "<--- Done OK! Leaving Velstr::serve.\n" << endl;
+}
+
+int Velstr :: GetField (MvRequest& grib, int param, MvFieldSet& fs)
+{
+	MvFilter		filter("PARAM");	// filter
+	MvFieldSet		fset(grib);		// field set
+	MvFieldSetIterator 	fsiter(fset);		// field set iterator
+	MvField			field;			// auxiliary field
+	int			nfields;		// number of fields
+
+	// Get fields
+
+	nfields = 0;
+	fsiter.setFilter(filter == param);
+	while(field=fsiter())
+	{
+		nfields++;
+		fs += field;
+	}
+
+	return nfields;
+}
+
+bool Velstr :: GetDataGen(MvRequest& in)
+{
+	// Get spectral truncation, smoothng indicator and constants
+
+	if(strcmp(in("TRUNCATION"),"AV") == 0)
+	  Vtrunc = 0.;
+	else
+	  Vtrunc = (int)in("TRUNCATION");
+
+	strcpy(Vsmoothing,in("SMOOTHING"));
+	strcpy(Vscaling,  in("SCALING"));
+
+	if ((const char*)in("FLTC"))
+	  Vfltc = (double)in("FLTC");
+	else
+	  Vfltc = 19.4;
+
+	if ((const char*)in("MFLTEXP"))
+	  Vmfltexp = (double)in("MFLTEXP");
+	else
+	  Vmfltexp = 2.;
+
+	return true;
+}
+
+bool Velstr :: Apply(MvRequest& out)
+{
+#if 0
+	MvFortran	velstrf("Velstr");	// fortran subroutine
+
+	// Call the fortran routines
+
+	velstrf.addParameter(Vfieldset);	// setup fortran params
+	velstrf.addParameter(Vtrunc);
+	velstrf.addParameter(Vsmoothing);
+	velstrf.addParameter( Vscaling );
+	velstrf.addParameter(Vfltc);
+	velstrf.addParameter(Vmfltexp);
+
+	putenv("VELSTR_ENV=OK");
+	velstr_();
+	char* penv=getenv("VELSTR_ENV");
+	if(strcmp(penv,"OK"))
+	{
+		setError(1,penv);
+		return false;
+	}
+
+	// Get the result
+
+	out = velstrf.getResult();
+#endif
+  for( int f=0; f < Vnfield; ++f )
+  {
+     MvField myField = Vfieldset[ f ];
+     grib_handle* gh = myField.getGribHandle();
+
+     if( ! isValidData_DVVALID( gh ) )
+     {
+        marslog(LOG_EROR,"Velstr: invalid data");
+        return false;
+     }
+
+     checkOutputTruncation( gh );
+
+//-- <aki> change param value (maybe later...)
+
+     convert_DVTOVS( gh, Vtrunc );
+
+     if( Vsmoothing[0] == 'Y' )
+        smooth_BPPSMTH( gh );
+
+     if( Vscaling[0] == 'Y' )
+        scaleData( gh );
+  }
+
+  out = Vfieldset.getRequest();
+  out.print();
+
+  return true;
+}
+
+bool Velpot :: GetData(MvRequest& in)
+{
+	MvRequest 	grib;			// grib file
+
+	 // Get data from request
+
+	in.getValue(grib,"DATA");
+
+	// Get divergence field
+
+	Vnfield = GetField(grib,DIVERGENCE,Vfieldset);
+	if(Vnfield == 0)
+	{
+		setError(1,"Field is not Divergence..");
+		return false;
+	}
+
+	// get general data
+	if (!GetDataGen(in)) return false;
+
+	return true;
+}
+
+bool Streamfn :: GetData(MvRequest& in)
+{
+	MvRequest 	grib;			// grib file
+
+	 // Get data from request
+
+	in.getValue(grib,"DATA");
+
+	// Get divergence field
+
+	Vnfield = GetField(grib,VORTICITY,Vfieldset);
+	if(Vnfield == 0)
+	{
+		setError(1,"Field is not Vorticity..");
+		return false;
+	}
+
+	// get general data
+	if (!GetDataGen(in)) return false;
+
+	return true;
+}
+
+bool
+Velstr::badRetVal( int ret, const char* gribApiFunc, const char* MvFunc )
+{
+  if( ret != 0 )
+  {
+     sendProgress( ">>> %s returned %d in %s", gribApiFunc, ret, MvFunc );
+     cerr << ">>> '" << gribApiFunc << "' returned " << ret
+          << " in '" << MvFunc << "'" << endl;
+
+     return true;
+  }
+  else
+     return false;
+}
+
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	Velpot velpot("VELPOT");
+	Streamfn strfn("STREAMFN");
+
+	theApp.run();
+}
diff --git a/src/Velstr/Velstr.h b/src/Velstr/Velstr.h
new file mode 100644
index 0000000..0260f1f
--- /dev/null
+++ b/src/Velstr/Velstr.h
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//--
+
+#ifndef VELSTR_H
+#define VELSTR_H
+
+#include "Metview.h"
+
+
+
+class Velstr : public MvService
+{
+ protected :
+	char		Vsmoothing[4];		// smoothing (YES/NO)
+	char		Vscaling[4];		// scaling   (YES/NO)
+	int		Vtrunc;			// truncation
+	double		Vfltc;			// constant
+	double		Vmfltexp;		// exponent
+	int		Vnfield;		// number of fields
+	MvFieldSet	Vfieldset;		// Vorticity or divergence field set
+
+ public:
+	Velstr(char* a) : MvService(a) {}
+	~Velstr() {}
+	void serve(MvRequest&,MvRequest&);
+
+	virtual bool GetData(MvRequest&) = 0;
+	bool GetDataGen(MvRequest&);
+	bool Apply(MvRequest&);
+	int  GetField (MvRequest&, int, MvFieldSet&);
+
+	bool isValidData_DVVALID( grib_handle* gh );
+	void convert_DVTOVS( grib_handle* gh, int trunc_out );
+	bool smooth_BPPSMTH( grib_handle* gh );
+	bool checkOutputTruncation( grib_handle* gh );
+	void scaleData( grib_handle* gh );
+	bool badRetVal( int ret, const char* gribApiFunc, const char* MvFunc );
+};
+
+
+class Velpot : public Velstr
+{
+ public :
+	Velpot(char* a) : Velstr(a) {}
+	virtual bool GetData(MvRequest&);
+};
+
+
+class Streamfn : public Velstr
+{
+ public :
+	Streamfn(char* a) : Velstr(a) {}
+	virtual bool GetData(MvRequest&);
+};
+
+#endif
+/* VELSTR_H */
diff --git a/src/Velstr/velstr-exFortran.cc b/src/Velstr/velstr-exFortran.cc
new file mode 100644
index 0000000..54dcf0a
--- /dev/null
+++ b/src/Velstr/velstr-exFortran.cc
@@ -0,0 +1,541 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- This file contains the new C++ code for old Fortran functions,
+//-- from obsolete files velstr.F, dvvalid.F, and bppsmth.F. The old
+//-- Fortran code has been left here for possible verifications. (090820/vk)
+
+#include <math.h>
+#include "Velstr.h"
+#include "grib_api.h"
+
+#if 0
+      SUBROUTINE VELSTR
+C
+C          COMPUTE STREAM FUNCTION IF VORTICITY SUPPLIED
+C          COMPUTE VELOCITY POTENTIAL IF DIVERGENCE SUPPLIED
+C
+C        Input:
+C          Fieldset of vorticity or divergence (spherical harmonics)
+C          Spectral truncation required
+C          Indicator for whether spatial smoothing required
+C          Smoothing constants
+C
+C        Output:
+C          Fieldset of stream function or velocity potential
+C           (spherical harmonics)
+C
+C        Author:
+C          B. Norris,  November 1994
+C
+#include <grbsh.h>
+#include <grbsec.h>
+C
+      integer cputenv
+
+#ifdef __alpha
+      INTEGER*8 IGRIB1,ICNT,IGRIB2,JMGRIBB,IWORD
+#endif
+
+      DIMENSION IGRIB(JMGRIB)
+      DIMENSION ISEC0(JSEC0)
+      DIMENSION ISEC1(JSEC1)
+      DIMENSION ISEC2(JSEC2)
+      DIMENSION ISEC3(JSEC3)
+      DIMENSION ISEC4(JSEC4)
+      DIMENSION ZSEC2(JPSEC2)
+      DIMENSION ZSEC3(JPSEC3)
+      DIMENSION RD(JMUAF)
+      LOGICAL NLSMTH, NLSCAL
+      CHARACTER*4 YSMTH
+      INTEGER	IERROR		!AUXILIARY VARIABLE
+
+c
+c -------------------------------------------------------------------
+c
+C     GET FIRST ARGUMENT AS A FIELDSET OF VORTICITY OR DIVERGENCE.
+C               ICNT IS THE NUMBER OF FIELDS
+
+      CALL MGETG(IGRIB1,ICNT)
+
+C        GET USER OPTIONS
+C
+C           Spectral truncation
+      CALL MGETN (RTOUT)
+
+C           Smoothing and scaling indicators and constants
+      CALL MGETS (YSMTH)
+      NLSMTH=.FALSE.
+      IF(YSMTH(1:1).EQ.'y'.OR.YSMTH(1:1).EQ.'Y') NLSMTH=.TRUE.
+
+      CALL MGETS (YSMTH)
+      NLSCAL=.FALSE.
+      IF(YSMTH(1:1).EQ.'y'.OR.YSMTH(1:1).EQ.'Y') NLSCAL=.TRUE.
+
+      CALL MGETN (FLTC)
+      CALL MGETN (RFLTEXP)
+      MFLTEXP = NINT (RFLTEXP)
+
+C     CREATE A NEW FIELDSET
+
+      CALL MNEWG(IGRIB2)
+C
+c -------------------------------------------------------------------
+c
+C     LOOP ON FIELDS
+
+      DO 10 I=1,ICNT
+
+C       GET NEXT FIELD FROM FIELDSET
+
+	JMGRIBB = JMGRIB	!POINTERS BETWEEN C AND FORTRAN MUST BE 8 BYTES
+        CALL MLOADG(IGRIB1,IGRIB,JMGRIBB)
+        IPNTS = JMUAF
+        IERR = 0
+        CALL GRIBEX (ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,
+     C             RD,IPNTS,IGRIB,JMGRIB,IWORD,'D',IERR)
+
+C           VALIDATE
+
+        CALL DVVALID (ISEC1,ISEC2,IERROR)
+	IF(IERROR.NE.0) RETURN
+
+C           COMPUTE VELOCITY POTENTIAL OR STREAM FUNCTION
+
+        ITIN = ISEC2(2)
+        NTOUT = NINT (RTOUT)
+        IF (NTOUT.GT.ITIN) THEN
+C	 CALL PUTENV
+	 JJ=cputenv
+     +   ('VELSTR_ENV=OUTPUT TRUNCATION GREATER THAN INPUT TRUNCATION')
+	 RETURN
+	ENDIF
+        IF (NTOUT.EQ.0) NTOUT=ITIN
+        IF(ISEC1(6).EQ.138) THEN
+C             IF(I.EQ.1) CALL MSETS ('str')
+Cvk          NFIELDR=215
+C            -- WMO Table 2 version 1: 35=Stream function --
+             NFIELDR=35
+        ELSE
+C             IF(I.EQ.1) CALL MSETS ('vel')
+Cvk          NFIELDR=214
+C            -- WMO Table 2 version 1: 36=Velocity potential --
+             NFIELDR=36
+        ENDIF
+        CALL DVTOVS (RD,JMUAF,ITIN,NTOUT)
+
+C           SMOOTHING
+
+        ITIN = NTOUT
+        NPREL4 = ITIN+1
+        I1 = JMUAF
+        IF(NLSMTH) CALL BPPSMTH (RD,I1,FLTC,MFLTEXP,NPREL4)
+
+C          SCALE AND REPACK DERIVED FIELD
+C       streamfunction should not be scaled => new param (030331/vk)
+
+        IF( NLSCAL ) THEN
+           PRINT*,' Scale the result!!!'
+           IPNTS = (NTOUT+1)*(NTOUT+2)
+           DO 152 KD=1,IPNTS
+              RD(KD)=RD(KD)*0.000001
+  152      CONTINUE
+        ELSE
+           PRINT*,' _NO_ scaling of the result!!!'
+        END IF
+Cvk     -- use parameter numbers from WMO GRIB Table 2 version 1  --
+Cvk     -- use this old table as Magics does not yet have 2 nor 3 --
+        ISEC1(1) = 1
+        ISEC1(6) = NFIELDR
+
+        ISEC2(2) = NTOUT
+        ISEC2(3) = NTOUT
+        ISEC2(4) = NTOUT
+C        IF(ISEC2(6).EQ.2) CALL GRSMKP (1)
+C           FORCE SIMPLE PACKING
+        ISEC2(6) = 1
+        ISEC4(1) = IPNTS
+        DO 162 K4=3,JSEC4
+           ISEC4(K4) = 0
+  162   CONTINUE
+
+        IF(I.EQ.1) THEN
+             CALL GRPRS0 (ISEC0)
+             CALL GRPRS1 (ISEC0,ISEC1)
+             CALL GRPRS2 (ISEC0,ISEC2,ZSEC2)
+             CALL GRPRS3 (ISEC0,ISEC3,ZSEC3)
+             CALL GRPRS4 (ISEC0,ISEC4,RD)
+        ENDIF
+
+        RMIN=1.0E10
+        RMAX=-1.0E10
+        DO 202 KD=1,IPNTS
+        IF(RD(KD).LT.RMIN) RMIN=RD(KD)
+        IF(RD(KD).GT.RMAX) RMAX=RD(KD)
+  202   CONTINUE
+        WRITE (*,*) ' RMIN ',RMIN,' RMAX ',RMAX
+
+        IERR = 0
+        CALL GRIBEX (ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,
+     C             RD,IPNTS,IGRIB,JMGRIB,IWORD,'C',IERR)
+
+C          ADD TO FIELDSET
+
+        CALL MSAVEG(IGRIB2,IGRIB,IWORD)
+
+10    CONTINUE
+
+c --------------------------------------------------------------------
+
+C     SET RESULT
+      CALL MSETG(IGRIB2)
+
+      RETURN
+      END
+#endif
+
+//CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+//_____________________________________________________________________________
+#if 0
+      SUBROUTINE DVTOVS(P,K1,KTIN,KTOUT)
+C
+C     CALCULATE THE SPERICAL HARMONIC COEFFICIENTS OF VELOCITY
+C     POTENTIAL OR STREAM FUNCTION GIVEN THE COEFICIENTS OF
+C     DIVERGENCE OR VORTICITY, RESPECTIVELY
+C
+C    INPUT :
+C     P     : SPECTRAL FIELD
+C     K1    : LENGTH OF ARRAY P
+C     KTIN  : TRUNCATE INPUT (ORIGINAL) VALUE
+C     KTOUT : TRUNCATE OUTPUT VALUE
+C
+C    OUTPUT :
+C     P     : SPECTRAL FIELD OVER USER SELECTED AREA
+C     KTIN  : TRUNCATE INPUT (VALUE EQUAL KTOUT)
+C
+C
+      INTEGER     K1,KTIN,KTOUT
+      DIMENSION P(K1)
+
+      PARAMETER (JMTRUNC=213)
+      PARAMETER (JMUAF=(JMTRUNC+1)*(JMTRUNC+2))
+      DIMENSION  DUMMY(JMUAF)
+
+      REARTH=6.371E6
+      REARTHS = -REARTH*REARTH
+      ITINP1  = KTIN  + 1
+      ITOUTP1 = KTOUT + 1
+
+      DUMMY(1) = 0.
+      DO 1 N=2,ITINP1
+         DUMMY(N) = REARTHS/FLOAT((N-1)*N)
+ 1    CONTINUE
+
+      I  = 1
+      II = 1
+      DO 2 M=1,ITOUTP1
+         DO 20 N=M,ITOUTP1
+            P(II  ) = DUMMY(N)*P(I  )
+            P(II+1) = DUMMY(N)*P(I+1)
+              I     = I  + 2
+              II    = II + 2
+ 20      CONTINUE
+         I = I + (ITINP1 - ITOUTP1)*2
+ 2    CONTINUE
+      KTIN=KTOUT
+
+      RETURN
+      END
+#endif
+
+void
+Velstr::convert_DVTOVS( grib_handle* gh, int trunc_out )
+{
+  const double earth  = 6.371e6;
+  const double earths = -earth*earth;
+
+  size_t len = 0;                              //-- data values count
+  int ret = grib_get_size( gh, "values", &len );
+  badRetVal( ret, "grib_get_size", "Velstr::convert_DVTOVS" );
+
+  double* data = new double[len];            //-- get data values
+  ret = grib_get_double_array( gh, "values", data, &len );
+  badRetVal( ret, "grib_get_double_array", "Velstr::convert_DVTOVS" );
+
+  long truncIn = 0;                          //-- get truncation
+  ret = grib_get_long( gh, "pentagonalResolutionParameterJ", &truncIn );
+  badRetVal( ret, "grib_get_long", "Velstr::convert_DVTOVS" );
+
+  int jmuaf = (trunc_out+1)*(trunc_out+2)+1;
+  double* dummy = new double[jmuaf];
+  dummy[0] = 0;
+  for( int n=1; n < jmuaf; ++n )
+  {
+     dummy[n] = earths / (double)(n*(n+1));
+  }
+
+  int itinp1  = truncIn + 1;
+  int itoutp1 = trunc_out + 1;
+  int i  = 0;
+  int ii = 0;
+  for( int m=0; m < itoutp1; ++m )
+  {
+     for( int n=m; n < itoutp1; ++n )
+     {
+         data[ii  ] = dummy[n]*data[i];
+         data[ii+1] = dummy[n]*data[i+1];
+         i  += 2;
+         ii += 2;
+     }
+     i += ( itinp1 - itoutp1 )*2;
+  }
+
+  ret = grib_set_long( gh, "pentagonalResolutionParameterJ", trunc_out );
+  ret = grib_set_long( gh, "pentagonalResolutionParameterK", trunc_out );
+  ret = grib_set_long( gh, "pentagonalResolutionParameterM", trunc_out );
+
+  ret = grib_set_double_array( gh, "values", data, ii );
+  badRetVal( ret, "grib_set_double_array", "Velstr::convert_DVTOVS" );
+
+  //trunc = trunc_out;
+  delete [] data;
+  delete [] dummy;
+  return;
+}
+//_____________________________________________________________________________
+#if 0
+      SUBROUTINE DVVALID(ISEC1,ISEC2,IERROR)
+
+	integer cputenv
+
+C     VALIDATE THE FIELD
+C       Check for vorticity or divergence in spherical harmonics
+
+      DIMENSION ISEC1(*),ISEC2(*)
+      INTEGER   IERROR
+
+      IERROR = 0
+      IF(ISEC1(6).NE.138.AND.ISEC1(6).NE.155) THEN
+C		CALL PUTENV('VELSTR_ENV=FIELD IS NOT VORTICITY OR DIVERGENCE')
+		JJ=cputenv('VELSTR_ENV=FIELD IS NOT VORTICITY OR DIVERGENCE')
+		IERROR = 1
+		RETURN
+	ENDIF
+
+      IF(ISEC2(1).NE.50) THEN
+C		CALL PUTENV('VELSTR_ENV=FIELD IS NOT SPHERICAL HARMONICS')
+		JJ=cputenv('VELSTR_ENV=FIELD IS NOT SPHERICAL HARMONICS')
+		IERROR = 1
+		RETURN
+	ENDIF
+
+      RETURN
+      END
+#endif
+
+bool
+Velstr::isValidData_DVVALID( grib_handle* gh )
+{
+  const string cVORTICITY ( "138.128" );
+  const string cDIVERGENCE( "155.128" );
+  const string cSPECTRAL( "sh" );
+
+  const int cBUFLEN = 50;
+  char charBuf[ cBUFLEN+1 ];
+
+  size_t len = cBUFLEN;                      //-- is spectral or not?
+  int ret = grib_get_string( gh, "gridType", charBuf, &len );
+  badRetVal( ret, "grib_get_string/gridType"
+           , "Velstr::isValidData_DVVALID" );
+
+  if( string(charBuf) != cSPECTRAL )
+  {
+     marslog(LOG_EROR,"Velstr: data is '%s', must be spectral ('%s')"
+            ,charBuf
+            ,cSPECTRAL.c_str() );
+     return false;
+  }
+
+  long param;
+  ret = grib_get_long( gh, "mars.param", &param );
+  badRetVal( ret, "grib_get_long/mars.param"
+           , "Velstr::isValidData_DVVALID" );
+
+  if( param == atol(cVORTICITY.c_str()) )        //-- if vorticity then OK and change
+  {                                              //-- paramId to 1 = Stream function
+     ret = grib_set_long( gh, "paramId", 1 );
+     badRetVal( ret, "grib_set_long/paramId=1", "Velstr::isValidData_DVVALID" );
+     return true;
+  }
+  if( param == atol(cDIVERGENCE.c_str()) )       //-- if divergence then OK and change
+  {                                              //-- param to 2 = Velocity potential
+     ret = grib_set_long( gh, "paramId", 2 );
+     badRetVal( ret, "grib_set_long/paramId=2", "Velstr::isValidData_DVVALID" );
+     return true;
+  }
+
+  marslog(LOG_EROR
+         ,"Velstr: param is '%s', must be vorticity (%s) or divergence (%s)"
+         ,charBuf
+         ,cVORTICITY.c_str()
+         ,cDIVERGENCE.c_str() );
+  return false;
+}
+//_____________________________________________________________________________
+#if 0
+      SUBROUTINE BPPSMTH(P,KZ,FLTC,MFLTEXP,NPREL4)
+C
+C    F. II		ECMWF		SET-92
+C    PERFORMS SPATIAL SMOOTHING ON THE SPHERE
+C    FILTER IS OF THE FORM
+C    SN = EXP( -K*(N(N+1))**R )
+C    REF:- SARDESHMUKH AND HOSKINS(1984) MWR,112,P2524
+C
+C    INPUT :
+C	P	: SPECTRAL FIELD
+C	KZ	: LENGTH OF ARRAY P
+C	FLTC	:
+C	MFLTEXP	:
+C	NPREL4	:
+C
+C    OUTPUT :
+C	P	: SPECTRAL FIELD SMOOTHED
+C
+C    ORIGINAL W.A.HECKLEY
+C
+C
+      DIMENSION P(KZ)
+C
+      PARAMETER (MPLON=1284)
+      DIMENSION	DUMMY(MPLON)
+C
+      FLTCONS = -1./((FLTC*(FLTC+1))**MFLTEXP)
+      WRITE(*,'('' SPATIAL SMOOTHING,   K = '',E13.4)')FLTCONS
+      WRITE(*,'(''               EXPONENT = ''I3)')MFLTEXP
+
+      ITINP1 = NPREL4
+      DUMMY(1) = 1.0
+      DO 1 N=2,ITINP1
+         DUMMY(N) = EXP( FLTCONS*FLOAT( ((N-1)*N)**MFLTEXP ))
+ 1    CONTINUE
+C
+CDIR$ IVDEP
+      I  = 1
+      II = 1
+      DO 2 M=1,ITINP1
+         DO 20 N=M,ITINP1
+            P(II  ) = DUMMY(N)*P(I  )
+            P(II+1) = DUMMY(N)*P(I+1)
+              I     = I  + 2
+              II    = II + 2
+ 20      CONTINUE
+ 2    CONTINUE
+C
+      RETURN
+      END
+#endif
+
+bool
+Velstr::smooth_BPPSMTH( grib_handle* gh )
+{
+  size_t len = 0;                              //-- data values count
+  int ret = grib_get_size( gh, "values", &len );
+  badRetVal( ret, "grib_get_size", "Velstr::smooth_BPPSMTH" );
+
+  double* data = new double[len];            //-- get data values
+  ret = grib_get_double_array( gh, "values", data, &len );
+  badRetVal( ret, "grib_get_double_array", "Velstr::smooth_BPPSMTH" );
+
+  long truncIn = 0;                          //-- get truncation
+  ret = grib_get_long( gh, "pentagonalResolutionParameterJ", &truncIn );
+  badRetVal( ret, "pentagonalResolutionParameterJ", "Velstr::smooth_BPPSMTH" );
+
+                                             //-- prepare smoothing stuff
+  double fltcons = -1./pow( Vfltc*(Vfltc+1), Vmfltexp );
+  sendProgress( "Spatial smoothing, Fltc = %g, Mfltexp = %g"
+              , Vfltc, Vmfltexp );
+  cout << "Spatial smoothing, Fltc = " << Vfltc
+       << ",  Mfltexp = " << Vmfltexp << endl;
+
+  long itinp1 = truncIn;  //-- NPREL4
+  double* dummy = new double[ itinp1 ];      //-- compute final smoothing coefficients
+  dummy[0] = 1.0;
+  for( int n=1; n<itinp1; ++n )
+  {
+     dummy[ n ] = exp( fltcons * pow( (double)(n*(n+1)), Vmfltexp ) );
+  }
+
+  int i  = 0;                                //-- do the smoothing
+  int ii = 0;
+  for( int m=0; m<itinp1; ++m )
+  for( int n=m; n<itinp1; ++n )
+  {
+     data[ ii   ] = dummy[ n ] * data[ i   ];
+     data[ ii+1 ] = dummy[ n ] * data[ i+1 ];
+     i  += 2;
+     ii += 2;
+  }
+                                             //-- put back the smoothed data
+  ret = grib_set_double_array( gh, "values", data, len );
+  badRetVal( ret, "grib_set_double_array", "Velstr::smooth_BPPSMTH" );
+
+  delete [] dummy;
+  delete [] data;
+
+  return true;
+}
+
+void
+Velstr::scaleData( grib_handle* gh )
+{
+  size_t len = 0;                              //-- data values count
+  int ret = grib_get_size( gh, "values", &len );
+  badRetVal( ret, "grib_get_size", "Velstr::scaleData" );
+
+  double* data = new double[len];            //-- get data values
+  ret = grib_get_double_array( gh, "values", data, &len );
+  badRetVal( ret, "grib_get_double_array", "Velstr::scaleData" );
+
+  sendProgress( "Output data scaled" );
+  cout << "Output data scaled" << endl;
+
+  for( int i=0; i<len; ++i )
+  {
+     data[ i ] *= 0.000001;
+  }
+                                             //-- put back the scaled data
+  ret = grib_set_double_array( gh, "values", data, len );
+  badRetVal( ret, "grib_set_double_array", "Velstr::scaleData" );
+
+  delete [] data;
+}
+
+bool
+Velstr::checkOutputTruncation( grib_handle* gh )
+{
+  long truncIn = 0;                          //-- get truncation
+  int ret = grib_get_long( gh, "pentagonalResolutionParameterJ", &truncIn );
+  badRetVal( ret, "pentagonalResolutionParameterJ", "Velstr::smooth_BPPSMTH" );
+
+  if( Vtrunc > truncIn )
+  {
+     marslog( LOG_EROR, "Oops, requested output truncation %d greater than input %d..."
+            , Vtrunc, (int)truncIn );
+     marslog( LOG_EROR, "... setting output truncation to %d", (int)truncIn );
+     cerr << "Oops, requested output truncation " << Vtrunc
+          << " greater than input " << truncIn << endl
+          << "... setting output truncation to " << truncIn << endl;
+
+     Vtrunc = truncIn;                       //-- fall back to input truncation
+
+     return false;
+  }
+  else
+     return true;
+}
diff --git a/src/VisTools/Makefile.am b/src/VisTools/Makefile.am
new file mode 100644
index 0000000..4cd83ee
--- /dev/null
+++ b/src/VisTools/Makefile.am
@@ -0,0 +1,13 @@
+
+bin_PROGRAMS = bin/gribtool
+
+
+bin_gribtool_SOURCES  = gribcback.cc gribmain.c
+bin_gribtool_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_gribtool_LDADD    = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS)
+
+
+BUILT_SOURCES = bin
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/VisTools/Makefile.in b/src/VisTools/Makefile.in
new file mode 100644
index 0000000..23e36b5
--- /dev/null
+++ b/src/VisTools/Makefile.in
@@ -0,0 +1,706 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/gribtool$(EXEEXT)
+subdir = src/VisTools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_gribtool_OBJECTS = bin_gribtool-gribcback.$(OBJEXT) \
+	bin_gribtool-gribmain.$(OBJEXT)
+bin_gribtool_OBJECTS = $(am_bin_gribtool_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_gribtool_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_gribtool_SOURCES)
+DIST_SOURCES = $(bin_gribtool_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_gribtool_SOURCES = gribcback.cc gribmain.c
+bin_gribtool_CPPFLAGS = $(MV_MOTIF_FLAGS)
+bin_gribtool_LDADD = $(MV_MOTIF_UTIL_LIB) $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(FLIBS)
+BUILT_SOURCES = bin
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/VisTools/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/VisTools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/gribtool$(EXEEXT): $(bin_gribtool_OBJECTS) $(bin_gribtool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/gribtool$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_gribtool_OBJECTS) $(bin_gribtool_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_gribtool-gribcback.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_gribtool-gribmain.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bin_gribtool-gribmain.o: gribmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_gribtool-gribmain.o -MD -MP -MF $(DEPDIR)/bin_gribtool-gribmain.Tpo -c -o bin_gribtool-gribmain.o `test -f 'gribmain.c' || echo '$(srcdir)/'`gribmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_gribtool-gribmain.Tpo $(DEPDIR)/bin_gribtool-gribmain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gribmain.c' object='bin_gribtool-gribmain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_gribtool-gribmain.o `test -f 'gribmain.c' || echo '$(srcdir)/'`gribmain.c
+
+bin_gribtool-gribmain.obj: gribmain.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_gribtool-gribmain.obj -MD -MP -MF $(DEPDIR)/bin_gribtool-gribmain.Tpo -c -o bin_gribtool-gribmain.obj `if test -f 'gribmain.c'; then $(CYGPATH_W) 'gribmain.c'; else $(CYGPATH_W) '$(srcdir)/gribmain.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_gribtool-gribmain.Tpo $(DEPDIR)/bin_gribtool-gribmain.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gribmain.c' object='bin_gribtool-gribmain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_gribtool-gribmain.obj `if test -f 'gribmain.c'; then $(CYGPATH_W) 'gribmain.c'; else $(CYGPATH_W) '$(srcdir)/gribmain.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_gribtool-gribcback.o: gribcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_gribtool-gribcback.o -MD -MP -MF $(DEPDIR)/bin_gribtool-gribcback.Tpo -c -o bin_gribtool-gribcback.o `test -f 'gribcback.cc' || echo '$(srcdir)/'`gribcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_gribtool-gribcback.Tpo $(DEPDIR)/bin_gribtool-gribcback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='gribcback.cc' object='bin_gribtool-gribcback.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_gribtool-gribcback.o `test -f 'gribcback.cc' || echo '$(srcdir)/'`gribcback.cc
+
+bin_gribtool-gribcback.obj: gribcback.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_gribtool-gribcback.obj -MD -MP -MF $(DEPDIR)/bin_gribtool-gribcback.Tpo -c -o bin_gribtool-gribcback.obj `if test -f 'gribcback.cc'; then $(CYGPATH_W) 'gribcback.cc'; else $(CYGPATH_W) '$(srcdir)/gribcback.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_gribtool-gribcback.Tpo $(DEPDIR)/bin_gribtool-gribcback.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='gribcback.cc' object='bin_gribtool-gribcback.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_gribtool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_gribtool-gribcback.obj `if test -f 'gribcback.cc'; then $(CYGPATH_W) 'gribcback.cc'; else $(CYGPATH_W) '$(srcdir)/gribcback.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/VisTools/gribcback.cc b/src/VisTools/gribcback.cc
new file mode 100644
index 0000000..8d6b57e
--- /dev/null
+++ b/src/VisTools/gribcback.cc
@@ -0,0 +1,590 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+ ** Generated by X-Designer 
+ */
+/*
+ **LIBS: -lXm -lXt -lX11
+ */
+
+#include "inc_iostream.h"
+
+#include "mars.h"
+#include <math.h>
+#include <float.h>
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+#include <X11/cursorfont.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/DrawingA.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/ToggleB.h>
+#include <Xm/Text.h>
+#include <Xm/PushB.h>
+#include <Xm/Protocols.h>
+
+#include "Drag.h"
+#include "MvVisTool.h"
+#include "MvXApplication.h"
+
+#include "MvObs.h"
+#include "MvMatrix.h"
+#include "MvGeoPoints.h"
+
+enum {CURSOR_BUSY,CURSOR_OK};
+enum {DECODE_ALL= 1, DECODE_GRIB, DECODE_BUFR };
+
+static int decode_choice = DECODE_ALL;
+static int expand_bitmaps = 0;
+
+extern "C" {
+  XtAppContext app_context;
+  Display *display;
+  extern Widget top,out_txt,info_label_1,bufr_toggle;
+  void create_top ( Display*, char*, int, char** );
+  void close_callback(Widget,XtPointer,XtPointer);
+  void empty_txt_callback(Widget,XtPointer,XtPointer);
+  void decode_choice_cb(Widget,XtPointer,XtPointer);
+  void expand_bitmaps_cb(Widget,XtPointer,XtPointer);
+
+#include <xec.h>
+}
+
+void select_input(Widget,Boolean);
+void set_cursor(int);
+
+// In order for ordinary motif callbacks to access
+// this class, it contains a static pointer to 
+// itself. Probably not the best way to do it,
+// but the XDesigner generated code is kept as it
+// was.
+class GribTool : public MvVisTool {
+  virtual void windowClosed();
+  virtual void windowChanged();
+  virtual void info(MvRequest&);
+  virtual void startUp(MvRequest&);
+  void add_wm_quit();
+  void print_msg(Widget,char *);
+  double get_field_val(MvRequest &);
+  bool getMatrixNN(MvRequest &r, MvMatrix& mat);
+  int get_closest(const char *,MvLocation &);
+
+  static GribTool *self;
+  int txt_pos;
+  MvObs myObs;
+  double lat,lon;
+  FILE *fp_;             // file containing the point values
+
+public:
+  GribTool();
+      virtual ~GribTool();
+  static GribTool *get_this() { return self; }
+};
+
+GribTool *GribTool::self = NULL;
+
+// Constructor. Keeps a static copy of the this pointer
+// in order for callbacks to call member functions.
+GribTool::GribTool() : lat(kFortranBufrMissingValue),lon(kFortranBufrMissingValue)
+{
+  self = this;
+  add_wm_quit();
+
+  // If METVIEW_EXAMINE_FILE is defined then create the output file
+  fp_ = 0;
+  char* s1 = getenv("METVIEW_EXAMINE_FILE");
+  if ( s1 && strlen(s1) > 0)
+  {
+	string path(s1);
+	fp_ = fopen(path.c_str(),"w");
+	if ( !fp_ )
+	{
+	      string str = "ERROR -> Can not open output file: " + path + "\n\n";
+	      print_msg(out_txt,(char*)str.c_str());
+	}
+	else
+	{
+	      string str = "Output file will be created at " + path + "\n\n";
+	      print_msg(out_txt,(char*)str.c_str());
+	}
+  }
+}
+
+GribTool::~GribTool()
+{
+  if ( fp_ )
+	fclose(fp_);
+}
+
+void GribTool::windowChanged()
+{
+  // Rais window ...
+  if(XtIsRealized(top))
+    XMapRaised(XtDisplay(top),XtWindow(top));
+}
+
+static Cached IMAGE = "IMAGE";
+static Cached GRIB  = "GRIB";
+static Cached BUFR  = "BUFR";
+static Cached INPUT = "INPUT";
+static Cached GEOPOINTS  = "GEOPOINTS";
+static Cached VECTOR_FIELD  = "VECTOR_FIELD";
+
+void GribTool::info(MvRequest&r )
+{
+  ostrstream oss_pos,oss_bufr,oss_grib;
+
+  int nr_bufr = 0,nr_grib = 0;
+  
+  char* mytext = NULL,*mypos = NULL;
+
+  MvRequest tmpreq;
+
+//cout << "\nENTERING GribTool::info..." << endl;
+//r.print();
+
+  lat = kFortranBufrMissingValue;
+  lon = kFortranBufrMissingValue;
+
+  set_cursor(CURSOR_BUSY);
+  txt_pos =  XmTextGetLastPosition (out_txt);
+
+  while(r)
+    {
+      const char *v = r.getVerb();
+      if(v == INPUT)
+	{
+	  lat = r("LATITUDE");
+	  lon = r("LONGITUDE");
+
+	  int a = int(fabs(lat)*10.0);
+	  int b = int(fabs(lon)*10.0);
+	  oss_pos << "====================== ";
+	  oss_pos << "Position " <<  (a/10) << "." << (a%10) << (lat>=0?'N':'S');
+	  oss_pos << " " << (b/10) << "." << (b%10) << (lon>=0?'E':'W');
+	  oss_pos << " ======================\n" << ends;
+	  mypos = oss_pos.str();
+	}
+      else if( v == GRIB || v == BUFR || v == GEOPOINTS || v == VECTOR_FIELD || v == IMAGE )
+	{
+	  const char *name = r("_NAME");
+	  if(!name) name = "???";
+
+	  if ( lat == kFortranBufrMissingValue || lon == kFortranBufrMissingValue )
+	    {
+	      oss_bufr << "----  " << name << "  ----" << endl;
+	      oss_bufr << "No latitude/longitude given" << endl;
+	      nr_bufr++;
+	      break; 
+	    }
+
+	  r("LENGTH") = 0; // Just testing
+
+	  if( v == GRIB )
+	    {
+              if ( decode_choice == DECODE_ALL || decode_choice == DECODE_GRIB )
+		{
+		  oss_grib  << "----  " << name << "  ----" << endl;
+
+		  double val =  get_field_val(r);
+		  if ( val == DBL_MAX ) 
+		    {
+		      oss_grib << 
+			"Missing value or interpolation " <<
+			  "for this grid type not supported" << endl;
+		    }
+		  else
+		    oss_grib << val << endl;
+
+		  nr_grib++;
+		}
+	    }
+	  else if( v == IMAGE )
+	    {
+              if ( decode_choice == DECODE_ALL || decode_choice == DECODE_GRIB )
+	      {
+		  oss_grib  << "----  " << name << "  ----" << endl;
+
+		  int MLIN=5, MCOL=5;
+		  MvMatrix mat(MLIN,MCOL);
+		  if ( !getMatrixNN(r,mat) )
+		      oss_grib << "Error retrieving image values" << endl;
+		  else
+		  {
+		      int i,j;
+		      for ( i = 0; i < MLIN; i++ )
+		      {
+			      for ( j = 0; j < MCOL; j++ )
+			      {
+				      oss_grib << setw(4) << mat.Mget(i,j);
+			      }
+			      oss_grib << endl;
+		      }
+		  }
+		  nr_grib++;
+	      }
+	    }
+	  else if( v == VECTOR_FIELD )
+	    {
+              if ( decode_choice == DECODE_ALL || decode_choice == DECODE_GRIB )
+		{
+
+		  MvRequest rsub = r.getSubrequest("U_COMPONENT");
+		  double uval =  get_field_val(rsub);
+
+		  name = rsub("_NAME");
+		  oss_grib  << "----  " << name << "  ----" << endl;
+
+		  rsub = r.getSubrequest("V_COMPONENT");
+		  double vval =  get_field_val(rsub);
+
+		  if ( uval != DBL_MAX && vval != DBL_MAX )
+		    { 
+		      oss_grib << "u: " << uval << endl;
+		      oss_grib << "v: " << vval << endl;
+		    }
+		  else
+		      oss_grib << "Missing wind component(s) or interpolation "
+		               << "for this grid type not supported"
+			       << endl;
+
+		  nr_grib++;
+		}
+	    }
+	  else if( v == BUFR )  
+	    {
+	      if ( decode_choice == DECODE_ALL || decode_choice == DECODE_BUFR )
+		{
+		  oss_bufr << "----  " << name << "  ----" << endl;
+		  const char* bufr_path = r("PATH");
+		  
+		  int count = 0;
+		  if ( bufr_path ) 
+		    {
+		      MvLocation closest;
+		      count = get_closest(bufr_path,closest);
+		      
+		      if ( count == 0 )
+			oss_bufr <<  "No observation found" << endl;
+		      else
+			{
+			  MvObsSet myBufr(bufr_path);
+			  MvObsSetIterator exactBufrIter( myBufr );
+			  exactBufrIter.setArea(closest,closest);
+			  
+			  count = 0;
+			  while ( myObs =exactBufrIter()  )
+			    {
+			      oss_bufr << "Message nr : " <<  ++count << endl;
+			      if ( expand_bitmaps ) 
+				myObs.writeBufrBox( oss_bufr );
+			      else 
+				myObs.writeAllValues( oss_bufr );
+
+			    }
+			  myBufr.close();
+			}
+		    }
+		  else
+		    {
+		      oss_bufr <<  "BUFR decoding could not be done." << endl;
+		    }
+		  nr_bufr++;
+		}
+	    }
+	  else if( v == GEOPOINTS )
+	    {
+	      if ( decode_choice == DECODE_ALL || decode_choice == DECODE_BUFR )
+		{
+		  const char* geop_path = r("PATH");
+		  if( geop_path )
+		    {
+		      MvGeoPoints geop( geop_path );
+		      if( geop.count() > 0 )
+			{
+			  MvGeoP1 geop_nearest = geop.nearestPoint( lat, lon );
+			  oss_bufr << "Nearest geopoint:\n" << geop_nearest << endl;
+			  ++nr_bufr;
+			}
+		    }
+		}
+	    } 
+	}
+      r.advance();
+    }
+
+  if ( !mypos )   // No pos, info called for zoom or similar.
+    { 
+      set_cursor(CURSOR_OK); 
+      XmUpdateDisplay(top);
+      return;
+    }
+  print_msg(out_txt,mypos);
+  delete [] mypos;
+  if ( nr_bufr > 0 ) 
+    {
+      oss_bufr << ends;
+      mytext = oss_bufr.str();
+      print_msg(out_txt,mytext);
+      delete [] mytext;
+    }
+  if ( nr_grib > 0 ) 
+    {
+      oss_grib << ends;
+      mytext = oss_grib.str();
+      print_msg(out_txt,mytext);
+      delete [] mytext;
+    }
+
+  set_cursor(CURSOR_OK);
+}
+
+void GribTool::startUp(MvRequest& r)
+{
+//  cout << "In startup" << endl;
+  const char *p = r("TITLE");
+  xec_SetLabel(info_label_1,p?p:"-");
+  txt_pos =  XmTextGetLastPosition (out_txt);
+}
+
+void GribTool::windowClosed()
+{
+  exit(0);
+}
+
+// Function that prints messages to a common text widget. It
+// takes a widget and a string as arguments
+void GribTool::print_msg(Widget out_txt,char *str )
+{
+  XmTextInsert(out_txt,txt_pos,str);
+  txt_pos += strlen(str);
+  XmTextShowPosition(out_txt,txt_pos);
+
+  if ( fp_ )
+	fprintf(fp_,"%s",str);
+}
+
+double GribTool::get_field_val(MvRequest &r)
+{
+   MvFieldSet fs(r);
+   MvField f = fs[0];
+   return f.interpolateAt(lon,lat);
+}
+
+bool GribTool::getMatrixNN(MvRequest &r, MvMatrix& mat)
+{
+   MvFieldSet fs(r);
+   MvField f = fs[0];
+
+   return f.getMatrixNN(lon,lat,mat);
+}
+int GribTool::get_closest(const char *bufr_path,MvLocation &closest )
+{
+  MvObsSet         myBufr( bufr_path );
+  MvObsSetIterator myBufrIter( myBufr );
+  myBufrIter.setArea( MvLocation( lat - 10.0, lon - 10.0 ),
+		     MvLocation( lat + 10.0, lon + 10.0 ) );
+  
+  int count = 0;
+  MvLocation exact(lat,lon);
+  float closest_dist;
+  while ( myObs = myBufrIter()  )
+    {
+      if ( count == 0 ) 
+	{
+	  closest = myObs.location();
+	  closest_dist = exact.distanceInDegrees(closest);
+	}
+      else
+	{
+	  
+	  if ( exact.distanceInDegrees(myObs.location()) < closest_dist )
+	    {
+	      closest =  myObs.location();
+	      closest_dist = exact.distanceInDegrees(closest);
+	    }
+	}
+      count++;
+    }
+  myBufr.close();
+  return count;
+}
+// Close callback needs to tell VisMod to clean up after 
+// the gribtool with this id, or gribtool will be "called"
+// twice if restarted.
+// Destructor is called explicitly because the
+// function disconnect() is private in the MvVisTool
+// class. The destructor is public, and will call
+// disconnect.
+void close_callback(Widget,XtPointer,XtPointer)
+{ 
+  GribTool::get_this()->~GribTool();
+  exit(0);
+}
+
+void empty_txt_callback(Widget,XtPointer,XtPointer)
+{
+  XmTextSetString(out_txt,"");
+  
+}
+
+// Set variable deciding what to decode. Called from
+// option menu.
+void decode_choice_cb(Widget,XtPointer cl_data,XtPointer)
+{
+  decode_choice = (long) cl_data; //-- 'hpcd' C++ fails with 'int' cast
+  if ( decode_choice == DECODE_GRIB ) 
+    XtSetSensitive (bufr_toggle, FALSE);
+  else
+    XtSetSensitive (bufr_toggle, TRUE);
+}
+void expand_bitmaps_cb(Widget,XtPointer,XtPointer call_data)
+{
+  XmToggleButtonCallbackStruct *xx = (XmToggleButtonCallbackStruct*)call_data;
+  expand_bitmaps = xx->set;
+}
+
+//  Catch quit messages from window manager menu 
+void GribTool::add_wm_quit()
+{
+  Atom WM_DELETE_WINDOW = XmInternAtom(XtDisplay(top),
+				       "WM_DELETE_WINDOW",
+				       False);
+  
+  XmAddWMProtocolCallback(top,WM_DELETE_WINDOW,
+			  close_callback,(XtPointer)NULL);
+}
+
+///////////// Functions to set cursor busy and disable input.
+void set_cursor(int status)
+{
+  static Display   *display = NULL;
+  static Window    win;
+  static Cursor cursor;
+  static Widget xx_top = top;
+
+  while ( !XtIsShell(xx_top)) xx_top = XtParent(xx_top);
+  display = XtDisplay (xx_top);
+  win  = XtWindow(xx_top);  
+  cursor  = XCreateFontCursor (display, XC_watch);
+  
+  if ( status == CURSOR_BUSY)
+    {
+      /* Set X stuff to busy/insensitive */
+      XDefineCursor (display, win, cursor);
+      XtSetSensitive(xx_top,False); 
+      select_input(xx_top,False);
+      XmUpdateDisplay(xx_top);
+    }
+  else 
+    {
+      /* Reset X stuff  */
+      XUndefineCursor (display, win);
+      //XSync(display,True);
+      select_input(xx_top,True);
+      XtSetSensitive(xx_top,True);
+      XmUpdateDisplay(xx_top);
+    }
+}
+
+void select_input(Widget w,Boolean choice)
+{
+  WidgetList wl;
+  Cardinal num;
+
+  if ( XtIsComposite(w))
+    {
+      XtVaGetValues(w,
+            XtNnumChildren,&num,
+            XtNchildren, &wl,
+            NULL);
+ 
+      for ( int i = 0; i < (int)num;i++)
+	if (XtWindow(wl[i]))
+	  select_input(wl[i],choice);
+    }
+
+  if ( choice )
+    {
+      if (XtIsWidget(w))
+	XSelectInput(XtDisplay(w),
+             XtWindow(w),
+             XtBuildEventMask(w));
+    }
+  else 
+    if (XtIsWidget(w))
+      XSelectInput(XtDisplay(w),
+           XtWindow(w),
+           (long)(LeaveWindowMask|Button1MotionMask|Button2MotionMask|
+              Button3MotionMask|Button4MotionMask|Button5MotionMask|
+              ButtonMotionMask|
+              ExposureMask|VisibilityChangeMask|StructureNotifyMask|
+              SubstructureNotifyMask|
+              SubstructureRedirectMask|PropertyChangeMask|
+              FocusChangeMask|ColormapChangeMask|OwnerGrabButtonMask));
+
+  return;
+}
+
+
+static int xerror(Display *d, XErrorEvent *e)
+{
+  cout << "\nXlib error encountered!!!" << endl;
+  cout << "   To find the originating location in the source code, i.e." << endl;
+  cout << "   to get a proper call stack, run MetviewUI in a debugger" << endl;
+  cout << "   with run-time flag '-synchronous' (otherwise call stack" << endl;
+  cout << "   will not correspond to the originating error location).\n" << endl;
+
+  char buf[1024];
+  XGetErrorText(d,e->error_code,buf,sizeof(buf));
+  cout << "xerror: " << buf << "\n" << endl;
+
+  abort();
+  return 0;    //-- we could use this for non-fatal errors...
+}
+
+
+int main (int argc,char **argv)
+{
+
+  XtToolkitInitialize ();
+  app_context = XtCreateApplicationContext ();
+  display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+			   NULL, 0, &argc, argv);
+  if (!display)
+    {
+      printf("%s: can't open display, exiting...\n", argv[0]);
+      exit (-1);
+    }
+
+#if (XmVersion < 2000)
+  /* Register converters, just in case you are really unlucky !! */
+  XmRegisterConverters();
+#endif
+
+  /* String to unit type doesn't get added !! */
+  XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
+  create_top ( display, argv[0], argc, argv );
+  XtRealizeWidget (top);
+
+  XSetErrorHandler(xerror);
+
+  // Create an MvApplication
+
+  MvXApplication app(app_context,argc,argv);
+  GribTool      tool;
+  app.run();
+}
diff --git a/src/VisTools/gribmain.c b/src/VisTools/gribmain.c
new file mode 100644
index 0000000..c05b60d
--- /dev/null
+++ b/src/VisTools/gribmain.c
@@ -0,0 +1,277 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+** Generated by X-Designer
+*/
+/*
+**LIBS: -lXm -lXt -lX11
+*/
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Label.h>
+#include <Xm/PushB.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Text.h>
+#include <Xm/ToggleB.h>
+#include <Xm/CascadeBG.h>
+#include <Xm/LabelG.h>
+
+
+extern void close_callback() ;
+extern void empty_txt_callback() ;
+extern void decode_choice_cb() ;
+extern void expand_bitmaps_cb() ;
+
+void XDmanage_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtManageChild ( *(Widget *)client_data );
+}
+
+void XDunmanage_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtUnmanageChild ( *(Widget *)client_data );
+}
+
+void XDpopup_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtPopup ( *(Widget *)client_data, XtGrabNone );
+}
+
+void XDpopdown_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtPopdown ( *(Widget *)client_data );
+}
+
+void XDmap_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtMapWidget (*(Widget *)client_data);
+}
+
+void XDunmap_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtUnmapWidget (*(Widget *)client_data);
+}
+
+void XDenable_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtSetSensitive (*(Widget *)client_data, TRUE);
+}
+
+void XDdisable_link ( w, client_data, call_data)
+Widget w;		/*  widget id           */
+XtPointer client_data;	/*  data from application   */
+XtPointer call_data;      /*  data from widget class  */
+{
+	if ( client_data && *(Widget *)client_data )
+		XtSetSensitive (*(Widget *)client_data, FALSE);
+}
+
+
+Widget top = (Widget) NULL;
+Widget form = (Widget) NULL;
+Widget info_label_1 = (Widget) NULL;
+Widget scr_txt = (Widget) NULL;
+Widget out_txt = (Widget) NULL;
+Widget bufr_toggle = (Widget) NULL;
+
+
+
+void create_top (display, app_name, app_argc, app_argv)
+Display *display;
+char *app_name;
+int app_argc;
+char **app_argv;
+{
+	Widget children[6];      /* Children to manage */
+	Arg al[64];                    /* Arg List */
+	register int ac = 0;           /* Arg Count */
+	XmString xmstrings[16];    /* temporary storage for XmStrings */
+	Widget button1 = (Widget)NULL;
+	Widget button2 = (Widget)NULL;
+	Widget optionMenu1 = (Widget)NULL;
+	Widget cascade1 = (Widget)NULL;
+	Widget menu1 = (Widget)NULL;
+	Widget button3 = (Widget)NULL;
+	Widget button4 = (Widget)NULL;
+	Widget button5 = (Widget)NULL;
+
+	XtSetArg(al[ac], XmNwidth, 600); ac++;
+	XtSetArg(al[ac], XmNheight, 350); ac++;
+	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
+	XtSetArg(al[ac], XmNtitle, "Decoding Tool"); ac++;
+	XtSetArg(al[ac], XmNargc, app_argc); ac++;
+	XtSetArg(al[ac], XmNargv, app_argv); ac++;
+	top = XtAppCreateShell ( app_name, "Metview", applicationShellWidgetClass, display, al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 600); ac++;
+	XtSetArg(al[ac], XmNheight, 350); ac++;
+	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
+	form = XmCreateForm ( top, "form", al, ac );
+	ac = 0;
+	xmstrings[0] = XmStringCreateLtoR ( "Close", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button1 = XmCreatePushButton ( form, "button1", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	info_label_1 = XmCreateLabel ( form, "info_label_1", al, ac );
+	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
+	out_txt = XmCreateScrolledText ( form, "out_txt", al, ac );
+	ac = 0;
+	scr_txt = XtParent ( out_txt );
+
+	xmstrings[0] = XmStringCreateLtoR ( "Clear", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button2 = XmCreatePushButton ( form, "button2", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	optionMenu1 = XmCreateOptionMenu ( form, "optionMenu1", al, ac );
+	cascade1 = XmOptionButtonGadget ( optionMenu1 );
+	menu1 = XmCreatePulldownMenu ( optionMenu1, "menu1", al, ac );
+	xmstrings[0] = XmStringCreateLtoR ( "Decode all", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button3 = XmCreatePushButton ( menu1, "button3", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Decode GRIB", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button4 = XmCreatePushButton ( menu1, "button4", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Decode BUFR", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	button5 = XmCreatePushButton ( menu1, "button5", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+	xmstrings[0] = XmStringCreateLtoR ( "Expand BUFR bitmaps", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
+	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
+	bufr_toggle = XmCreateToggleButton ( form, "bufr_toggle", al, ac );
+	ac = 0;
+	XmStringFree ( xmstrings [ 0 ] );
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( button1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( info_label_1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNtopOffset, 5); ac++;
+	XtSetArg(al[ac], XmNtopWidget, info_label_1); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNbottomWidget, button1); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNrightOffset, 5); ac++;
+	XtSetValues ( scr_txt,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 5); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( button2,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 30); ac++;
+	XtSetArg(al[ac], XmNleftWidget, button2); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( optionMenu1,al, ac );
+	ac = 0;
+
+	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
+	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+	XtSetArg(al[ac], XmNbottomOffset, 5); ac++;
+	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
+	XtSetArg(al[ac], XmNleftOffset, 30); ac++;
+	XtSetArg(al[ac], XmNleftWidget, optionMenu1); ac++;
+	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
+	XtSetValues ( bufr_toggle,al, ac );
+	ac = 0;
+	XtAddCallback( button1, XmNactivateCallback, close_callback, (XtPointer) 0 );
+	XtManageChild(out_txt);
+	XtAddCallback( button2, XmNactivateCallback, empty_txt_callback, (XtPointer) 0 );
+	XtAddCallback( button3, XmNactivateCallback, decode_choice_cb, (XtPointer)1 );
+	XtAddCallback( button4, XmNactivateCallback, decode_choice_cb, (XtPointer)2 );
+	XtAddCallback( button5, XmNactivateCallback, decode_choice_cb, (XtPointer)3 );
+	children[ac++] = button3;
+	children[ac++] = button4;
+	children[ac++] = button5;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtSetArg(al[ac], XmNsubMenuId, menu1); ac++;
+	XtSetValues ( cascade1, al, ac );
+	ac = 0;
+	XtAddCallback( bufr_toggle, XmNvalueChangedCallback, expand_bitmaps_cb, (XtPointer) 0 );
+	children[ac++] = button1;
+	children[ac++] = info_label_1;
+	children[ac++] = button2;
+	children[ac++] = optionMenu1;
+	children[ac++] = bufr_toggle;
+	XtManageChildren(children, ac);
+	ac = 0;
+	XtManageChild ( form);
+}
+
diff --git a/src/WebAccess/Makefile.am b/src/WebAccess/Makefile.am
new file mode 100644
index 0000000..c1adba8
--- /dev/null
+++ b/src/WebAccess/Makefile.am
@@ -0,0 +1,31 @@
+AUTOMAKE_OPTIONS = foreign
+bin_PROGRAMS = bin/WebAccess
+
+bin_WebAccess_SOURCES  = WebAccess.cc remote.c
+bin_WebAccess_CPPFLAGS = 
+bin_WebAccess_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.WebAccess \
+		 $(local_sharedir)/WebAccessDef  \
+		 $(local_sharedir)/WebAccessRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} WEBACCESS.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/WEBACCESS.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = vroot.h ObjectSpec.WebAccess WebAccessDef WebAccessRules WEBACCESS.xpm
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/WebAccess/Makefile.in b/src/WebAccess/Makefile.in
new file mode 100644
index 0000000..7acdc1b
--- /dev/null
+++ b/src/WebAccess/Makefile.in
@@ -0,0 +1,768 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/WebAccess$(EXEEXT)
+subdir = src/WebAccess
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_WebAccess_OBJECTS = bin_WebAccess-WebAccess.$(OBJEXT) \
+	bin_WebAccess-remote.$(OBJEXT)
+bin_WebAccess_OBJECTS = $(am_bin_WebAccess_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_WebAccess_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_WebAccess_SOURCES)
+DIST_SOURCES = $(bin_WebAccess_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign
+bin_WebAccess_SOURCES = WebAccess.cc remote.c
+bin_WebAccess_CPPFLAGS = 
+bin_WebAccess_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.WebAccess \
+		 $(local_sharedir)/WebAccessDef  \
+		 $(local_sharedir)/WebAccessRules
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/WEBACCESS.xpm
+BUILT_SOURCES = bin icons
+EXTRA_DIST = vroot.h ObjectSpec.WebAccess WebAccessDef WebAccessRules WEBACCESS.xpm
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/WebAccess/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/WebAccess/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/WebAccess$(EXEEXT): $(bin_WebAccess_OBJECTS) $(bin_WebAccess_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/WebAccess$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_WebAccess_OBJECTS) $(bin_WebAccess_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WebAccess-WebAccess.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_WebAccess-remote.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bin_WebAccess-remote.o: remote.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_WebAccess-remote.o -MD -MP -MF $(DEPDIR)/bin_WebAccess-remote.Tpo -c -o bin_WebAccess-remote.o `test -f 'remote.c' || echo '$(srcdir)/'`remote.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WebAccess-remote.Tpo $(DEPDIR)/bin_WebAccess-remote.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remote.c' object='bin_WebAccess-remote.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_WebAccess-remote.o `test -f 'remote.c' || echo '$(srcdir)/'`remote.c
+
+bin_WebAccess-remote.obj: remote.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bin_WebAccess-remote.obj -MD -MP -MF $(DEPDIR)/bin_WebAccess-remote.Tpo -c -o bin_WebAccess-remote.obj `if test -f 'remote.c'; then $(CYGPATH_W) 'remote.c'; else $(CYGPATH_W) '$(srcdir)/remote.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WebAccess-remote.Tpo $(DEPDIR)/bin_WebAccess-remote.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remote.c' object='bin_WebAccess-remote.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bin_WebAccess-remote.obj `if test -f 'remote.c'; then $(CYGPATH_W) 'remote.c'; else $(CYGPATH_W) '$(srcdir)/remote.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_WebAccess-WebAccess.o: WebAccess.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WebAccess-WebAccess.o -MD -MP -MF $(DEPDIR)/bin_WebAccess-WebAccess.Tpo -c -o bin_WebAccess-WebAccess.o `test -f 'WebAccess.cc' || echo '$(srcdir)/'`WebAccess.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WebAccess-WebAccess.Tpo $(DEPDIR)/bin_WebAccess-WebAccess.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='WebAccess.cc' object='bin_WebAccess-WebAccess.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WebAccess-WebAccess.o `test -f 'WebAccess.cc' || echo '$(srcdir)/'`WebAccess.cc
+
+bin_WebAccess-WebAccess.obj: WebAccess.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_WebAccess-WebAccess.obj -MD -MP -MF $(DEPDIR)/bin_WebAccess-WebAccess.Tpo -c -o bin_WebAccess-WebAccess.obj `if test -f 'WebAccess.cc'; then $(CYGPATH_W) 'WebAccess.cc'; else $(CYGPATH_W) '$(srcdir)/WebAccess.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_WebAccess-WebAccess.Tpo $(DEPDIR)/bin_WebAccess-WebAccess.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='WebAccess.cc' object='bin_WebAccess-WebAccess.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_WebAccess_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_WebAccess-WebAccess.obj `if test -f 'WebAccess.cc'; then $(CYGPATH_W) 'WebAccess.cc'; else $(CYGPATH_W) '$(srcdir)/WebAccess.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} WEBACCESS.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/WebAccess/ObjectSpec.WebAccess b/src/WebAccess/ObjectSpec.WebAccess
new file mode 100644
index 0000000..3712d59
--- /dev/null
+++ b/src/WebAccess/ObjectSpec.WebAccess
@@ -0,0 +1,68 @@
+
+object,
+	class		= WEBACCESS,
+	definition_file	= '$METVIEW_DIR_SHARE/etc/WebAccessDef',
+	rules_file	= '$METVIEW_DIR_SHARE/etc/WebAccessRules',
+	type		= Data,
+	expand		= 75,
+	can_be_created	= True,
+	default_name	= Web Access,
+	help_page	= Web_Access,
+	macro		= webaccess,
+	editor_type	= SimpleEditor,
+	pixmap		= '$METVIEW_DIR_SHARE/icons/WEBACCESS.icon'
+
+state,
+	class		= WEBACCESS,
+	service		= WebAccess
+
+service,
+	timeout		= $timeout,
+	name		= WebAccess,
+	fullname	= Web Access,
+	x_resource_name = Navigator, # Drop in netscape
+	cmd		= "$metview_command $METVIEW_BIN/WebAccess"
+
+web,
+	page = webmars,
+	url  = '$WEBMARS_URL'
+
+web,
+	page = catalogue,
+	url  = '$WEBMARS_URL/d/catalog'
+
+web,
+	page = catalogue_help,
+	url  = '$WEBMARS_URL/metview'
+
+web,
+	page = index,
+	url  = '$METVIEW_URL/manual/index.html'
+
+web,
+	page = MetviewUI,
+	url  = '$METVIEW_URL/manual/The_Metview_Desktop.html'
+
+web,
+	page = PlotMod,
+	url  = '$METVIEW_URL/manual/The_Display_Layout.html'
+
+web,
+	page = Macro,
+	url  = '$METVIEW_URL/manual/Macro_Language.html'
+
+web,
+	page = applications,
+	url  = '$METVIEW_URL/manual/Icon_Reference.html'
+
+web,
+	page = app_help,
+	url  = '$METVIEW_URL/manual'
+
+web,
+	page = support,
+	url  = '$METVIEW_URL'
+
+web,
+	page = updates,
+	url  = '$METVIEW_URL/install'
diff --git a/src/WebAccess/WEBACCESS.xpm b/src/WebAccess/WEBACCESS.xpm
new file mode 100644
index 0000000..ceeb71b
--- /dev/null
+++ b/src/WebAccess/WEBACCESS.xpm
@@ -0,0 +1,643 @@
+/* XPM */
+static char * WEBACCESS_xpm[] = {
+"32 32 608 2",
+"  	c None",
+". 	c #FFFFFF",
+"+ 	c #10217B",
+"@ 	c #1A73C7",
+"# 	c #409FA8",
+"$ 	c #6DB9D2",
+"% 	c #9EDBE7",
+"& 	c #A3DDEA",
+"* 	c #90C9F7",
+"= 	c #1D79D0",
+"- 	c #3672CA",
+"; 	c #0E6EA1",
+"> 	c #331E7E",
+", 	c #166DC5",
+"' 	c #80B7CA",
+") 	c #81B9C9",
+"! 	c #83C0EC",
+"~ 	c #6FBAD3",
+"{ 	c #9CDAE6",
+"] 	c #A3DEEA",
+"^ 	c #98D5E7",
+"/ 	c #6AB4D5",
+"( 	c #5FABD0",
+"_ 	c #5EA7CA",
+": 	c #1B6F99",
+"< 	c #204B67",
+"[ 	c #3168C5",
+"} 	c #1790CA",
+"| 	c #7FB8E9",
+"1 	c #69B4D1",
+"2 	c #6FB6CF",
+"3 	c #6EB5CF",
+"4 	c #73BAD3",
+"5 	c #9CD9E6",
+"6 	c #A3DEE9",
+"7 	c #9BD9E6",
+"8 	c #71BBD5",
+"9 	c #87C1EE",
+"0 	c #639AC9",
+"a 	c #61739C",
+"b 	c #C6B06A",
+"c 	c #D4D318",
+"d 	c #303A45",
+"e 	c #EC9A47",
+"f 	c #07629B",
+"g 	c #2F6CC4",
+"h 	c #5AA7CC",
+"i 	c #69AFC8",
+"j 	c #75B1C4",
+"k 	c #74AFBF",
+"l 	c #8EA0A4",
+"m 	c #72B7CE",
+"n 	c #9BD8E5",
+"o 	c #A0DCE7",
+"p 	c #99D8E5",
+"q 	c #71BAD4",
+"r 	c #6BB3D1",
+"s 	c #689BCA",
+"t 	c #5B91B0",
+"u 	c #527789",
+"v 	c #5C5C3E",
+"w 	c #E4A21D",
+"x 	c #EAB115",
+"y 	c #F7A111",
+"z 	c #E48C3B",
+"A 	c #DF7427",
+"B 	c #2E4764",
+"C 	c #244B92",
+"D 	c #2A7298",
+"E 	c #6392AC",
+"F 	c #6F96A5",
+"G 	c #D69950",
+"H 	c #C89B63",
+"I 	c #5C8BA6",
+"J 	c #8DC5CA",
+"K 	c #8FCCD1",
+"L 	c #72CDF1",
+"M 	c #8DCAD3",
+"N 	c #6EB9D2",
+"O 	c #6DA6CF",
+"P 	c #89C0CA",
+"Q 	c #5082A6",
+"R 	c #426E71",
+"S 	c #C7C760",
+"T 	c #E0D957",
+"U 	c #F1E370",
+"V 	c #F8AD13",
+"W 	c #F7A50D",
+"X 	c #CF9080",
+"Y 	c #DE7632",
+"Z 	c #DB6E21",
+"` 	c #D99960",
+" .	c #CF9A67",
+"..	c #D09C67",
+"+.	c #D39D63",
+"@.	c #D6812E",
+"#.	c #CE8438",
+"$.	c #58776B",
+"%.	c #6AB0C0",
+"&.	c #69C6CA",
+"*.	c #6BCACE",
+"=.	c #6BC9CF",
+"-.	c #6BBAD3",
+";.	c #6DC7ED",
+">.	c #8EC8CE",
+",.	c #8CC4CA",
+"'.	c #65B5BD",
+").	c #414E71",
+"!.	c #404363",
+"~.	c #323341",
+"{.	c #DFD81B",
+"].	c #F4E94F",
+"^.	c #FDEF06",
+"/.	c #D15114",
+"(.	c #D76A17",
+"_.	c #E58934",
+":.	c #F59254",
+"<.	c #E58E3B",
+"[.	c #DF7B20",
+"}.	c #DD791C",
+"|.	c #DE7617",
+"1.	c #CC741E",
+"2.	c #579287",
+"3.	c #68ACBF",
+"4.	c #67C6CB",
+"5.	c #67C8CC",
+"6.	c #67B9CF",
+"7.	c #69B9D1",
+"8.	c #89C8CF",
+"9.	c #6DC8CF",
+"0.	c #6DBACE",
+"a.	c #85BAC3",
+"b.	c #3D4E7A",
+"c.	c #172F62",
+"d.	c #1B2368",
+"e.	c #4D5262",
+"f.	c #E4C416",
+"g.	c #F2D90D",
+"h.	c #FDD10D",
+"i.	c #FFF785",
+"j.	c #C8490F",
+"k.	c #E0781C",
+"l.	c #E1761E",
+"m.	c #E07719",
+"n.	c #E1761F",
+"o.	c #DF751C",
+"p.	c #DF731A",
+"q.	c #DE7212",
+"r.	c #D46F16",
+"s.	c #B75222",
+"t.	c #78A2AB",
+"u.	c #77ABB6",
+"v.	c #71B1BE",
+"w.	c #6BC1C5",
+"x.	c #69B8CF",
+"y.	c #69B8D0",
+"z.	c #66C5CA",
+"A.	c #67B6CC",
+"B.	c #64AFC8",
+"C.	c #5FA4C2",
+"D.	c #37699A",
+"E.	c #4981AB",
+"F.	c #5388A4",
+"G.	c #5A785F",
+"H.	c #E6B111",
+"I.	c #F6BE15",
+"J.	c #FEF45A",
+"K.	c #E8923E",
+"L.	c #E17A1B",
+"M.	c #DE7413",
+"N.	c #DF731B",
+"O.	c #DF7319",
+"P.	c #DA6C11",
+"Q.	c #C4511C",
+"R.	c #D36727",
+"S.	c #CA6D34",
+"T.	c #BD6F3C",
+"U.	c #68BABE",
+"V.	c #62B0CA",
+"W.	c #62B0CB",
+"X.	c #5EACC7",
+"Y.	c #3E9AA5",
+"Z.	c #59A5C2",
+"`.	c #59A3C2",
+" +	c #4E8EB5",
+".+	c #4F90B7",
+"++	c #548EAE",
+"@+	c #607F8D",
+"#+	c #E09A1F",
+"$+	c #F3AA19",
+"%+	c #FDF056",
+"&+	c #E69038",
+"*+	c #E38020",
+"=+	c #DE7819",
+"-+	c #DD7416",
+";+	c #DD6F1A",
+">+	c #CA5319",
+",+	c #E9CB98",
+"'+	c #D49B68",
+")+	c #535472",
+"!+	c #5B94B2",
+"~+	c #5DA9C7",
+"{+	c #1E5584",
+"]+	c #5299BD",
+"^+	c #336A99",
+"/+	c #114979",
+"(+	c #174E7D",
+"_+	c #4D8EB5",
+":+	c #5191B8",
+"<+	c #528BAD",
+"[+	c #998055",
+"}+	c #A57C41",
+"|+	c #F9EB76",
+"1+	c #FBE016",
+"2+	c #F8AB0D",
+"3+	c #E4862D",
+"4+	c #E9943E",
+"5+	c #DE7618",
+"6+	c #DE731D",
+"7+	c #DA802D",
+"8+	c #C0956A",
+"9+	c #5E83A0",
+"0+	c #5A92B3",
+"a+	c #62AAC8",
+"b+	c #59A2C3",
+"c+	c #154A9A",
+"d+	c #293D72",
+"e+	c #093C8E",
+"f+	c #06396E",
+"g+	c #3A6D9A",
+"h+	c #4988B0",
+"i+	c #4D8DB4",
+"j+	c #4E86A9",
+"k+	c #323D4E",
+"l+	c #E3C064",
+"m+	c #F9F078",
+"n+	c #FBE117",
+"o+	c #FBDD05",
+"p+	c #ECA35A",
+"q+	c #E38022",
+"r+	c #E07617",
+"s+	c #DF741D",
+"t+	c #E28129",
+"u+	c #D48B3F",
+"v+	c #56748B",
+"w+	c #63A4BE",
+"x+	c #5595BC",
+"y+	c #63ADCC",
+"z+	c #5CA5C7",
+"A+	c #154A7C",
+"B+	c #093A71",
+"C+	c #05356B",
+"D+	c #04366B",
+"E+	c #0B3D6F",
+"F+	c #437DA7",
+"G+	c #4681AA",
+"H+	c #154572",
+"I+	c #4C7383",
+"J+	c #E2E224",
+"K+	c #FEF577",
+"L+	c #F8C61A",
+"M+	c #FDCE07",
+"N+	c #E48937",
+"O+	c #E27E29",
+"P+	c #E27B1C",
+"Q+	c #DC701A",
+"R+	c #D96B19",
+"S+	c #D66718",
+"T+	c #D26A1E",
+"U+	c #D2843B",
+"V+	c #C49155",
+"W+	c #4A7476",
+"X+	c #508FB3",
+"Y+	c #5495BC",
+"Z+	c #619AC8",
+"`+	c #5D95C4",
+" @	c #4785AE",
+".@	c #295C8D",
+"+@	c #043367",
+"@@	c #023064",
+"#@	c #053366",
+"$@	c #0D285B",
+"%@	c #132653",
+"&@	c #466C90",
+"*@	c #55755D",
+"=@	c #EAC81B",
+"-@	c #FEF554",
+";@	c #FEF154",
+">@	c #F7BC0F",
+",@	c #C1240E",
+"'@	c #E17F2E",
+")@	c #DE7515",
+"!@	c #AA3C07",
+"~@	c #A51604",
+"{@	c #9D1D0F",
+"]@	c #57655D",
+"^@	c #547992",
+"/@	c #4F7C9F",
+"(@	c #4F8DB2",
+"_@	c #5191B9",
+":@	c #5392BA",
+"<@	c #5291B9",
+"[@	c #4B87B0",
+"}@	c #103F71",
+"|@	c #0A2459",
+"1@	c #062054",
+"2@	c #071E52",
+"3@	c #061543",
+"4@	c #172449",
+"5@	c #67667D",
+"6@	c #BF8C2E",
+"7@	c #ECB712",
+"8@	c #FDF32F",
+"9@	c #FEF451",
+"0@	c #F9AB14",
+"a@	c #BE1D0B",
+"b@	c #D96916",
+"c@	c #DD751D",
+"d@	c #DF741B",
+"e@	c #DE711B",
+"f@	c #D76717",
+"g@	c #A61604",
+"h@	c #B52308",
+"i@	c #AE2C11",
+"j@	c #4F5F5D",
+"k@	c #4D7697",
+"l@	c #4979A3",
+"m@	c #4A7CA6",
+"n@	c #508EB5",
+"o@	c #528EB5",
+"p@	c #508CB3",
+"q@	c #4674A0",
+"r@	c #2F3C6D",
+"s@	c #0B2356",
+"t@	c #071C50",
+"u@	c #071A4E",
+"v@	c #081644",
+"w@	c #212845",
+"x@	c #D5CA58",
+"y@	c #ED9D14",
+"z@	c #F5A80C",
+"A@	c #FDED09",
+"B@	c #FBE013",
+"C@	c #FECE34",
+"D@	c #BC1C09",
+"E@	c #D76816",
+"F@	c #E4862E",
+"G@	c #DF741C",
+"H@	c #CE5710",
+"I@	c #BE2F0B",
+"J@	c #C03709",
+"K@	c #C63C09",
+"L@	c #C66A27",
+"M@	c #556B82",
+"N@	c #5C7791",
+"O@	c #5D7993",
+"P@	c #5D7B94",
+"Q@	c #5E7B94",
+"R@	c #6E7091",
+"S@	c #4B6C8E",
+"T@	c #476A8E",
+"U@	c #111A45",
+"V@	c #051040",
+"W@	c #050F3F",
+"X@	c #0A1745",
+"Y@	c #45617B",
+"Z@	c #DC9320",
+"`@	c #F6A111",
+" #	c #F6B508",
+".#	c #FAD605",
+"+#	c #F9AF14",
+"@#	c #FEEE7B",
+"##	c #A81506",
+"$#	c #DD7122",
+"%#	c #DF751D",
+"&#	c #DA6A18",
+"*#	c #C6420B",
+"=#	c #CF450A",
+"-#	c #D9540A",
+";#	c #D46A1D",
+">#	c #CD6F26",
+",#	c #CA732C",
+"'#	c #CB732D",
+")#	c #CA712D",
+"!#	c #BF6E30",
+"~#	c #A79E7D",
+"{#	c #805435",
+"]#	c #0E1640",
+"^#	c #010435",
+"/#	c #090F3F",
+"(#	c #47637B",
+"_#	c #E3993C",
+":#	c #FCA52C",
+"<#	c #F7B60C",
+"[#	c #F6B60D",
+"}#	c #F8AA19",
+"|#	c #FDCA5C",
+"1#	c #BE1E0D",
+"2#	c #DE7624",
+"3#	c #DF7515",
+"4#	c #DD6E19",
+"5#	c #D34F0D",
+"6#	c #DD560A",
+"7#	c #DC570A",
+"8#	c #AE4006",
+"9#	c #D56818",
+"0#	c #D46A18",
+"a#	c #D46A19",
+"b#	c #CE681C",
+"c#	c #AB4218",
+"d#	c #251716",
+"e#	c #110E35",
+"f#	c #080633",
+"g#	c #030436",
+"h#	c #0E0B34",
+"i#	c #181D43",
+"j#	c #534C57",
+"k#	c #E4DB39",
+"l#	c #FCE74B",
+"m#	c #F8AA13",
+"n#	c #F7BB17",
+"o#	c #FDED79",
+"p#	c #F9A71D",
+"q#	c #E28330",
+"r#	c #DE7415",
+"s#	c #DF7119",
+"t#	c #DF6E18",
+"u#	c #DF5B0B",
+"v#	c #DD5A0A",
+"w#	c #DB6011",
+"x#	c #A21E07",
+"y#	c #983809",
+"z#	c #8F350B",
+"A#	c #90370D",
+"B#	c #8A3510",
+"C#	c #3D2E4F",
+"D#	c #0C0632",
+"E#	c #010131",
+"F#	c #010133",
+"G#	c #0A0835",
+"H#	c #3D3351",
+"I#	c #C37D1B",
+"J#	c #64564D",
+"K#	c #EACF13",
+"L#	c #FADC14",
+"M#	c #F9B11D",
+"N#	c #FEF261",
+"O#	c #FFF683",
+"P#	c #DC722D",
+"Q#	c #DD6F1B",
+"R#	c #DC6D12",
+"S#	c #DE7112",
+"T#	c #DE7012",
+"U#	c #DF7017",
+"V#	c #DA6D14",
+"W#	c #CF6519",
+"X#	c #3C1A28",
+"Y#	c #2A142C",
+"Z#	c #241233",
+"`#	c #372C59",
+" $	c #11093B",
+".$	c #060337",
+"+$	c #020133",
+"@$	c #0B0632",
+"#$	c #1D1233",
+"$$	c #97602E",
+"%$	c #D28511",
+"&$	c #EB990D",
+"*$	c #F3BE07",
+"=$	c #F8AD11",
+"-$	c #FDF18F",
+";$	c #FFFA5F",
+">$	c #FFFF63",
+",$	c #C1310C",
+"'$	c #CE530E",
+")$	c #DB6910",
+"!$	c #DB6F14",
+"~$	c #DF7318",
+"{$	c #D56E1A",
+"]$	c #CB691C",
+"^$	c #BC6720",
+"/$	c #312C49",
+"($	c #423377",
+"_$	c #3C1059",
+":$	c #190C33",
+"<$	c #190D31",
+"[$	c #27142F",
+"}$	c #BF631F",
+"|$	c #D26F1D",
+"1$	c #DF7D18",
+"2$	c #E69007",
+"3$	c #F3AF0C",
+"4$	c #F7AC16",
+"5$	c #FEF415",
+"6$	c #FFFC14",
+"7$	c #BA1307",
+"8$	c #CA3203",
+"9$	c #BF2009",
+"0$	c #D96818",
+"a$	c #DD6F19",
+"b$	c #DE7213",
+"c$	c #DD7212",
+"d$	c #D56F1C",
+"e$	c #CD6D22",
+"f$	c #C46726",
+"g$	c #A1582A",
+"h$	c #743A30",
+"i$	c #BC611F",
+"j$	c #CB681D",
+"k$	c #D46E1C",
+"l$	c #DE721B",
+"m$	c #DF7317",
+"n$	c #E47E06",
+"o$	c #E88D0D",
+"p$	c #FDED66",
+"q$	c #FBE40D",
+"r$	c #FBE605",
+"s$	c #BA0F07",
+"t$	c #C82E03",
+"u$	c #BE1B0A",
+"v$	c #DD7022",
+"w$	c #DC6B19",
+"x$	c #DC6C12",
+"y$	c #DA6C12",
+"z$	c #DC6D10",
+"A$	c #DC7011",
+"B$	c #DC7012",
+"C$	c #DC741D",
+"D$	c #D7701D",
+"E$	c #D76F1D",
+"F$	c #D96F1C",
+"G$	c #DF711B",
+"H$	c #DF7118",
+"I$	c #E2640A",
+"J$	c #E47208",
+"K$	c #FAE60A",
+"L$	c #FDED28",
+"M$	c #FDD00A",
+"N$	c #B80D07",
+"O$	c #BA1208",
+"P$	c #BD1B0C",
+"Q$	c #DB702A",
+"R$	c #C0200B",
+"S$	c #CC3805",
+"T$	c #DA6816",
+"U$	c #C7470E",
+"V$	c #DB6C19",
+"W$	c #DF761B",
+"X$	c #E07922",
+"Y$	c #E07B24",
+"Z$	c #E0640A",
+"`$	c #E57F06",
+" %	c #F7CE04",
+".%	c #FAE704",
+"+%	c #F5BB07",
+"@%	c #F7A30B",
+"#%	c #9F0202",
+"$%	c #B70B07",
+"%%	c #BA1109",
+"&%	c #BB1309",
+"*%	c #BB1207",
+"=%	c #BC1608",
+"-%	c #BF2E0C",
+";%	c #DA7229",
+">%	c #C5410E",
+",%	c #C5430D",
+"'%	c #DA6A19",
+")%	c #DC6D19",
+"!%	c #DD7118",
+"~%	c #D7770A",
+"{%	c #E28B07",
+"]%	c #F0AB05",
+"^%	c #F4CE06",
+"/%	c #E89D07",
+"(%	c #E79707",
+"_%	c #B80B07",
+":%	c #B80F07",
+"<%	c #BC240B",
+"[%	c #BB1709",
+"}%	c #BB1909",
+"|%	c #BC2A0A",
+"1%	c #C23C0B",
+"2%	c #C5430B",
+"3%	c #D0580F",
+"4%	c #D5670D",
+"5%	c #D67709",
+"6%	c #E28C07",
+"7%	c #D59A02",
+"8%	c #E49408",
+"9%	c #E08028",
+"0%	c #B60B07",
+"a%	c #A20302",
+"b%	c #BA1D09",
+"c%	c #BA1E09",
+"d%	c #BA2209",
+"e%	c #BB2709",
+"f%	c #C23A09",
+"g%	c #CD480A",
+"h%	c #D05A0E",
+"i%	c #D66A0B",
+"j%	c #E18B07",
+"k%	c #DF7916",
+"l%	c #B81007",
+"m%	c #BA2509",
+"n%	c #C13909",
+"o%	c #CD460A",
+"p%	c #CF4B0B",
+"q%	c #DA7118",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . + @ # $ % & * = - ; . . . . . . . . . . . . ",
+". . . . . . . . > , ' ) ! ~ { ] ^ / ( _ : < . . . . . . . . . . ",
+". . . . . . . [ } | 1 2 3 4 5 6 7 8 9 0 a b c d . . . . . . . . ",
+". . . e . . f g h i j k l m n o p q r s t u v w x y . . . . . . ",
+". . . z A B C D E F G H I J K L M N O P Q R S T U V W . . . . . ",
+". . X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^.. . . . . ",
+". . /.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.. . . ",
+". . j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.. . . ",
+". . K.L.M.p.N.N.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++ at +#+$+%+. . . ",
+". &+*+=+-+N.N.N.N.N.;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+. . ",
+". 3+4+5+p.N.N.N.N.N.6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+. . ",
+". p+q+r+N.N.N.N.N.s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+. . ",
+". N+O+P+p.N.Q+R+S+T+U+V+W+X+Y+Z+`+ @. at +@@@#@$@%@&@*@=@-@;@>@. . ",
+". ,@'@)@N.N.R+!@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@3 at 4@5 at 6@7 at 8@9 at 0@. . ",
+". a at b@c at d@e at f@g at h@i at j@k at l@m at n@o at p@q at r@s at t@u at v@w at x@y at z@A at B@C at . . ",
+". D at E@F at G@e at H@I at J@K at L@M at N@O at P@Q at R@S at T@U at V@W at X@Y at Z@`@ #.#+#@#. . ",
+". ##$#%#d at e@&#*#=#-#;#>#,#'#'#)#!#~#{#]#^#^#/#(#_#:#<#[#}#|#. . ",
+". 1#2#3#p.N.4#5#6#7#8#9#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#. . ",
+". . q#r#O.p.s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#. . . ",
+". . P#Q#R#S#O.s#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$. . . ",
+". . . ,$'$)$!$O.q.~$q.{$]$^$/$($_$:$<$[$}$|$1$2$3$4$5$6$. . . . ",
+". . . 7$8$9$0$a$b$q.~$q.c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$. . . . ",
+". . . . s$t$u$v$w$x$y$z$A$B$-+C$D$E$F$l$G$H$I$J$K$L$M$. . . . . ",
+". . . . . N$O$P$Q$R$S$T$U$V$W$X$Y$N.N.p.~$Z$`$ %.%+%@%. . . . . ",
+". . . . . #%$%%%%%&%*%=%-%;%>%,%'%)%a$!%~%{%]%^%/%(%. . . . . . ",
+". . . . . . . _%$%$%$%:%<%[%}%|%1%2%3%4%5%6%7%8%9%. . . . . . . ",
+". . . . . . . . 0%a%0%N$b%:%c%d%e%f%g%h%i%j%k%. . . . . . . . . ",
+". . . . . . . . . . 0%N$N$N$N$l%m%n%o%p%q%. . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/src/WebAccess/WebAccess.cc b/src/WebAccess/WebAccess.cc
new file mode 100644
index 0000000..f6420c8
--- /dev/null
+++ b/src/WebAccess/WebAccess.cc
@@ -0,0 +1,214 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <X11/Xlib.h>
+#include <Metview.h>
+#include <Cached.h>
+
+//-- env.variables MV_BROWSER_* defined in: ./scripts/metview_local.*
+Cached myBrowser  = "firefox";    //-- can be set with MV_BROWSER_NAME
+char expMozVers[] = "5.1\0     "; //-- can be set with MV_BROWSER_VERS
+
+const char* expected_mozilla_version = (const char*)expMozVers;
+
+
+extern "C" int mozilla_remote_commands (Display *dpy, Window window, char **commands);
+extern "C" int mozilla_remote_check_window (Display *dpy, Window window);
+
+class WebAccess : public MvService {
+protected:
+	Display *dpy_;
+	WebAccess(char* a);
+	void send(MvRequest&,Window);
+};
+
+class NormalAccess : public WebAccess {
+	void serve(MvRequest&,MvRequest&);
+public:
+	NormalAccess() : WebAccess("WEBACCESS")			{};
+};
+
+class DropAccess : public WebAccess {
+	Cached applications_;
+	Cached catalogue_;
+	void serve(MvRequest&,MvRequest&);
+public:
+	DropAccess();
+};
+
+static int xerror(Display*,XErrorEvent*)
+{
+	return 0;
+}
+
+WebAccess::WebAccess(char *name):
+	MvService(name)
+{
+	saveToPool(0);
+	dpy_ = XOpenDisplay(0);
+	XSetErrorHandler(xerror);
+	if( getenv("MV_BROWSER_NAME") )
+	{
+		myBrowser = getenv("MV_BROWSER_NAME");
+		cout << "Help browser set to " << (const char*)myBrowser << endl;
+	}
+	if( getenv("MV_BROWSER_VERS") )
+	{
+		strcpy( expMozVers, getenv("MV_BROWSER_VERS"));
+		cout << "Help browser version set to " << expected_mozilla_version << endl;
+	}
+}
+
+
+void WebAccess::send(MvRequest& in,Window w)
+{
+	char buf1[10240];
+	char buf2[10240];
+	int n = 0;
+	char* cmd[10];
+
+	in.print();
+
+	const char* url     = in("URL");
+	const char* save    = in("SAVE");
+	const char* type    = in("TYPE");
+
+	if(url)
+	{
+		sprintf(buf1,"openURL(%s)",url);
+		cmd[n++] = buf1;
+	}
+
+	if(save)
+	{
+		if(!type) type = "HTML";
+		sprintf(buf2,"saveAs(%s,%s)",save,type);
+		cmd[n++] = buf2;
+	}
+
+	cmd[n] = 0;
+
+
+	if(mozilla_remote_commands (dpy_,w,cmd) != 0)
+	{
+		// Start netscape first
+		Cached myStartCmd = myBrowser + "&";
+		system( (const char*)myStartCmd );
+
+		for(int i = 0; i < 5; i++)
+		{
+			sleep(2);
+			if(mozilla_remote_commands (dpy_,0,cmd) == 0)
+				return;
+		}
+		setError(1,"Could not connect to a Netscape window");
+	}
+
+
+}
+
+void NormalAccess::serve(MvRequest& in,MvRequest& out)
+{
+	send(in,0);
+}
+
+DropAccess::DropAccess() : WebAccess("DROP")
+{
+	request* r  = mars.setup;
+	Cached web       = "web";
+	Cached catalogue = "catalogue";
+	Cached applications = "applications";
+
+	while(r)
+	{
+		if(r->name == web)
+		{
+			const char* p = get_value(r,"page",0);
+			if(p == catalogue)    catalogue_ = get_value(r,"url",0);
+			if(p == applications) applications_ = get_value(r,"url",0);
+		}
+		r = r->next;
+	}
+}
+
+const Cached RETRIEVE  = "RETRIEVE";
+const Cached WEBACCESS = "WEBACCESS";
+
+void DropAccess::serve(MvRequest& in,MvRequest& out)
+{
+	Window w = long(in("WINDOW"));
+
+	while(w &&  !mozilla_remote_check_window(dpy_,w))
+	{
+		Window  root;
+		Window* children;
+		unsigned int num = 0;
+
+		XQueryTree(dpy_,w,&root,&w,&children,&num);
+		XFree(children);
+	}
+
+
+	in.advance();
+	const char* v = in.getVerb();
+
+	if(v == RETRIEVE)
+	{
+		const request   *s = in;
+		const parameter *p = s->params;
+
+		Cached url;
+
+		while(p)
+		{
+			if(p->name[0] != '_')
+			{
+				Cached values;
+				value * v = p->values;
+				while(v)
+				{
+					if(values)  values = values + ";";
+					values = values + v->name;
+					v = v->next;
+				}
+
+				if(url) url = url + "/";
+				url = url + p->name + "=" + values;
+			}
+			p = p->next;
+		}
+
+		if(url)
+		{
+			MvRequest r("WEBACCESS");
+			r("URL") = catalogue_ + "/" + url;
+			send(r,w);
+		}
+	}
+	else if(v == WEBACCESS)
+	{
+		send(in,w);
+	}
+	else {
+		MvRequest r("WEBACCESS");
+		r("URL") = applications_ + "/" + v + ".html";
+		send(r,w);
+	}
+}
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	theApp.setFork(0);
+
+	NormalAccess   web1;
+	DropAccess     web2;
+
+	theApp.run();
+}
diff --git a/src/WebAccess/WebAccessDef b/src/WebAccess/WebAccessDef
new file mode 100644
index 0000000..562f822
--- /dev/null
+++ b/src/WebAccess/WebAccessDef
@@ -0,0 +1,6 @@
+WEBACCESS
+{
+	URL {
+		@
+	} = 'http://'
+}
diff --git a/src/WebAccess/WebAccessRules b/src/WebAccess/WebAccessRules
new file mode 100644
index 0000000..8cb7cb9
--- /dev/null
+++ b/src/WebAccess/WebAccessRules
@@ -0,0 +1,2 @@
+ 
+
diff --git a/src/WebAccess/remote.c b/src/WebAccess/remote.c
new file mode 100644
index 0000000..aaeb23c
--- /dev/null
+++ b/src/WebAccess/remote.c
@@ -0,0 +1,707 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+/*
+	Original in http://home.netscape.com/newsref/std/remote.c
+
+*/
+#define STANDALONE
+#define DEBUG_PROPS
+
+
+/* -*- Mode:C; tab-width: 8 -*-
+ * remote.c --- remote control of Netscape Navigator for Unix.
+ * version 1.1.3, for Netscape Navigator 1.1 and newer.
+ *
+ * Copyright � 1996 Netscape Communications Corporation, all rights reserved.
+ * Created: Jamie Zawinski <jwz at netscape.com>, 24-Dec-94.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or
+ * implied warranty.
+ *
+ * To compile:
+ *
+ *    cc -o netscape-remote remote.c -DSTANDALONE -lXmu -lX11
+ *
+ * To use:
+ *
+ *    netscape-remote -help
+ *
+ * Documentation for the protocol which this code implements may be found at:
+ *
+ *    http://home.netscape.com/newsref/std/x-remote.html
+ *
+ * Bugs and commentary to x_cbug at netscape.com.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xmu/WinUtil.h>	/* for XmuClientWindow() */
+
+
+/* vroot.h is a header file which lets a client get along with `virtual root'
+   window managers like swm, tvtwm, olvwm, etc.  If you don't have this header
+   file, you can find it at "http://home.netscape.com/newsref/std/vroot.h".
+   If you don't care about supporting virtual root window managers, you can
+   comment this line out.
+ */
+#include "vroot.h"
+
+ static const char *progname = "browser";
+ extern const char *expected_mozilla_version;
+
+#define MOZILLA_VERSION_PROP   "_MOZILLA_VERSION"
+#define MOZILLA_LOCK_PROP      "_MOZILLA_LOCK"
+#define MOZILLA_COMMAND_PROP   "_MOZILLA_COMMAND"
+#define MOZILLA_RESPONSE_PROP  "_MOZILLA_RESPONSE"
+static Atom XA_MOZILLA_VERSION  = 0;
+static Atom XA_MOZILLA_LOCK     = 0;
+static Atom XA_MOZILLA_COMMAND  = 0;
+static Atom XA_MOZILLA_RESPONSE = 0;
+
+static void
+mozilla_remote_init_atoms (Display *dpy)
+{
+  if (! XA_MOZILLA_VERSION)
+    XA_MOZILLA_VERSION = XInternAtom (dpy, MOZILLA_VERSION_PROP, False);
+  if (! XA_MOZILLA_LOCK)
+    XA_MOZILLA_LOCK = XInternAtom (dpy, MOZILLA_LOCK_PROP, False);
+  if (! XA_MOZILLA_COMMAND)
+    XA_MOZILLA_COMMAND = XInternAtom (dpy, MOZILLA_COMMAND_PROP, False);
+  if (! XA_MOZILLA_RESPONSE)
+    XA_MOZILLA_RESPONSE = XInternAtom (dpy, MOZILLA_RESPONSE_PROP, False);
+}
+
+static Window
+mozilla_remote_find_window (Display *dpy)
+{
+  int i;
+  Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy));
+  Window root2, parent, *kids;
+  unsigned int nkids;
+  Window result = 0;
+  Window tenative = 0;
+  unsigned char *tenative_version = 0;
+
+  if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids))
+    {
+      fprintf (stderr, "%s: XQueryTree failed on display %s\n", progname,
+	       DisplayString (dpy));
+      exit (2);
+    }
+
+  /* root != root2 is possible with virtual root WMs. */
+
+  if (! (kids && nkids))
+    {
+      fprintf (stderr, "%s: root window has no children on display %s\n",
+	       progname, DisplayString (dpy));
+      exit (2);
+    }
+
+  for (i = nkids-1; i >= 0; i--)
+    {
+      Atom type;
+      int format;
+      unsigned long nitems, bytesafter;
+      unsigned char *version = 0;
+      Window w = XmuClientWindow (dpy, kids[i]);
+      int status = XGetWindowProperty (dpy, w, XA_MOZILLA_VERSION,
+				       0, (65536 / sizeof (long)),
+				       False, XA_STRING,
+				       &type, &format, &nitems, &bytesafter,
+				       &version);
+      if (! version)
+	continue;
+      if (strcmp ((char *) version, expected_mozilla_version) &&
+	  !tenative)
+	{
+	  tenative = w;
+	  tenative_version = version;
+	  continue;
+	}
+      XFree (version);
+      if (status == Success && type != None)
+	{
+	  result = w;
+	  break;
+	}
+    }
+
+  if (result && tenative)
+    {
+      fprintf (stderr,
+	       "%s: warning: both version %s (0x%x) and version\n"
+	       "\t%s (0x%x) are running.  Using version %s.\n",
+	       progname, tenative_version, (unsigned int) tenative,
+	       expected_mozilla_version, (unsigned int) result,
+	       expected_mozilla_version);
+      XFree (tenative_version);
+      return result;
+    }
+  else if (tenative)
+    {
+      fprintf (stderr,
+	       "%s: warning: expected version %s but found version\n"
+	       "\t%s (0x%x) instead.\n",
+	       progname, expected_mozilla_version,
+	       tenative_version, (unsigned int) tenative);
+      XFree (tenative_version);
+      return tenative;
+    }
+  else if (result)
+    {
+      return result;
+    }
+  else
+    {
+      fprintf (stderr, "%s: not running on display %s\n", progname,
+	       DisplayString (dpy));
+      return 0;
+    }
+}
+
+int
+mozilla_remote_check_window (Display *dpy, Window window)
+{
+  Atom type;
+  int format;
+  unsigned long nitems, bytesafter;
+  unsigned char *version = 0;
+  int status = XGetWindowProperty (dpy, window, XA_MOZILLA_VERSION,
+				   0, (65536 / sizeof (long)),
+				   False, XA_STRING,
+				   &type, &format, &nitems, &bytesafter,
+				   &version);
+  if (status != Success || !version)
+    {
+      fprintf (stderr, "%s: window 0x%x is not a Netscape window.\n",
+	       progname, (unsigned int) window);
+      return 0;
+    }
+  else if (strcmp ((char *) version, expected_mozilla_version))
+    {
+      fprintf (stderr,
+	       "%s: warning: window 0x%x is Netscape version %s;\n"
+	       "\texpected version %s.\n",
+	       progname, (unsigned int) window,
+	       version, expected_mozilla_version);
+    }
+  XFree (version);
+  return 1;
+}
+
+
+static char *lock_data = 0;
+
+static void
+mozilla_remote_obtain_lock (Display *dpy, Window window)
+{
+  Bool locked = False;
+  Bool waited = False;
+
+  if (! lock_data)
+    {
+      lock_data = (char *) malloc (255);
+      sprintf (lock_data, "pid%d@", getpid ());
+      if (gethostname (lock_data + strlen (lock_data), 100))
+	{
+	  perror ("gethostname");
+	  exit (-1);
+	}
+    }
+
+  do
+    {
+      int result;
+      Atom actual_type;
+      int actual_format;
+      unsigned long nitems, bytes_after;
+      unsigned char *data = 0;
+
+      XGrabServer (dpy);   /* ################################# DANGER! */
+
+      result = XGetWindowProperty (dpy, window, XA_MOZILLA_LOCK,
+				   0, (65536 / sizeof (long)),
+				   False, /* don't delete */
+				   XA_STRING,
+				   &actual_type, &actual_format,
+				   &nitems, &bytes_after,
+				   &data);
+      if (result != Success || actual_type == None)
+	{
+	  /* It's not now locked - lock it. */
+#ifdef DEBUG_PROPS
+	  fprintf (stderr, "%s: (writing " MOZILLA_LOCK_PROP
+		   " \"%s\" to 0x%x)\n",
+		   progname, lock_data, (unsigned int) window);
+#endif
+	  XChangeProperty (dpy, window, XA_MOZILLA_LOCK, XA_STRING, 8,
+			   PropModeReplace, (unsigned char *) lock_data,
+			   strlen (lock_data));
+	  locked = True;
+	}
+
+      XUngrabServer (dpy); /* ################################# danger over */
+      XSync (dpy, False);
+
+      if (! locked)
+	{
+	  /* We tried to grab the lock this time, and failed because someone
+	     else is holding it already.  So, wait for a PropertyDelete event
+	     to come in, and try again. */
+
+	  fprintf (stderr, "%s: window 0x%x is locked by %s; waiting...\n",
+		   progname, (unsigned int) window, data);
+	  waited = True;
+
+	  while (1)
+	    {
+	      XEvent event;
+	      XNextEvent (dpy, &event);
+	      if (event.xany.type == DestroyNotify &&
+		  event.xdestroywindow.window == window)
+		{
+		  fprintf (stderr, "%s: window 0x%x unexpectedly destroyed.\n",
+			   progname, (unsigned int) window);
+		  exit (6);
+		}
+	      else if (event.xany.type == PropertyNotify &&
+		       event.xproperty.state == PropertyDelete &&
+		       event.xproperty.window == window &&
+		       event.xproperty.atom == XA_MOZILLA_LOCK)
+		{
+		  /* Ok!  Someone deleted their lock, so now we can try
+		     again. */
+#ifdef DEBUG_PROPS
+		  fprintf (stderr, "%s: (0x%x unlocked, trying again...)\n",
+			   progname, (unsigned int) window);
+#endif
+		  break;
+		}
+	    }
+	}
+      if (data)
+	XFree (data);
+    }
+  while (! locked);
+
+  if (waited)
+    fprintf (stderr, "%s: obtained lock.\n", progname);
+}
+
+
+static void
+mozilla_remote_free_lock (Display *dpy, Window window)
+{
+  int result;
+  Atom actual_type;
+  int actual_format;
+  unsigned long nitems, bytes_after;
+  unsigned char *data = 0;
+
+#ifdef DEBUG_PROPS
+	  fprintf (stderr, "%s: (deleting " MOZILLA_LOCK_PROP
+		   " \"%s\" from 0x%x)\n",
+		   progname, lock_data, (unsigned int) window);
+#endif
+
+  result = XGetWindowProperty (dpy, window, XA_MOZILLA_LOCK,
+			       0, (65536 / sizeof (long)),
+			       True, /* atomic delete after */
+			       XA_STRING,
+			       &actual_type, &actual_format,
+			       &nitems, &bytes_after,
+			       &data);
+  if (result != Success)
+    {
+      fprintf (stderr, "%s: unable to read and delete " MOZILLA_LOCK_PROP
+	       " property\n",
+	       progname);
+      return;
+    }
+  else if (!data || !*data)
+    {
+      fprintf (stderr, "%s: invalid data on " MOZILLA_LOCK_PROP
+	       " of window 0x%x.\n",
+	       progname, (unsigned int) window);
+      return;
+    }
+  else if (strcmp ((char *) data, lock_data))
+    {
+      fprintf (stderr, "%s: " MOZILLA_LOCK_PROP
+	       " was stolen!  Expected \"%s\", saw \"%s\"!\n",
+	       progname, lock_data, data);
+      return;
+    }
+
+  if (data)
+    XFree (data);
+}
+
+
+static int
+mozilla_remote_command (Display *dpy, Window window, const char *command,
+			Bool raise_p)
+{
+  int result;
+  Bool done = False;
+  char *new_command = 0;
+
+  /* The -noraise option is implemented by passing a "noraise" argument
+     to each command to which it should apply.
+   */
+  if (! raise_p)
+    {
+      char *close;
+      new_command = (char *) malloc (strlen (command) + 20);
+      strcpy (new_command, command);
+      close = strrchr (new_command, ')');
+      if (close)
+	strcpy (close, ", noraise)");
+      else
+	strcat (new_command, "(noraise)");
+      command = new_command;
+    }
+
+#ifdef DEBUG_PROPS
+  fprintf (stderr, "%s: (writing " MOZILLA_COMMAND_PROP " \"%s\" to 0x%x)\n",
+	   progname, command, (unsigned int) window);
+#endif
+
+  XChangeProperty (dpy, window, XA_MOZILLA_COMMAND, XA_STRING, 8,
+		   PropModeReplace, (unsigned char *) command,
+		   strlen (command));
+
+  while (!done)
+    {
+      XEvent event;
+      XNextEvent (dpy, &event);
+      if (event.xany.type == DestroyNotify &&
+	  event.xdestroywindow.window == window)
+	{
+	  /* Print to warn user...*/
+	  fprintf (stderr, "%s: window 0x%x was destroyed.\n",
+		   progname, (unsigned int) window);
+	  result = 6;
+	  goto DONE;
+	}
+      else if (event.xany.type == PropertyNotify &&
+	       event.xproperty.state == PropertyNewValue &&
+	       event.xproperty.window == window &&
+	       event.xproperty.atom == XA_MOZILLA_RESPONSE)
+	{
+	  Atom actual_type;
+	  int actual_format;
+	  unsigned long nitems, bytes_after;
+	  unsigned char *data = 0;
+
+	  result = XGetWindowProperty (dpy, window, XA_MOZILLA_RESPONSE,
+				       0, (65536 / sizeof (long)),
+				       True, /* atomic delete after */
+				       XA_STRING,
+				       &actual_type, &actual_format,
+				       &nitems, &bytes_after,
+				       &data);
+#ifdef DEBUG_PROPS
+	  if (result == Success && data && *data)
+	    {
+	      fprintf (stderr, "%s: (server sent " MOZILLA_RESPONSE_PROP
+		       " \"%s\" to 0x%x.)\n",
+		       progname, data, (unsigned int) window);
+	    }
+#endif
+
+	  if (result != Success)
+	    {
+	      fprintf (stderr, "%s: failed reading " MOZILLA_RESPONSE_PROP
+		       " from window 0x%0x.\n",
+		       progname, (unsigned int) window);
+	      result = 6;
+	      done = True;
+	    }
+	  else if (!data || strlen((char *) data) < 5)
+	    {
+	      fprintf (stderr, "%s: invalid data on " MOZILLA_RESPONSE_PROP
+		       " property of window 0x%0x.\n",
+		       progname, (unsigned int) window);
+	      result = 6;
+	      done = True;
+	    }
+	  else if (*data == '1')	/* positive preliminary reply */
+	    {
+	      fprintf (stderr, "%s: %s\n", progname, data + 4);
+	      /* keep going */
+	      done = False;
+	    }
+#if 1
+	  else if (!strncmp ((char *)data, "200", 3)) /* positive completion */
+	    {
+	      result = 0;
+	      done = True;
+	    }
+#endif
+	  else if (*data == '2')		/* positive completion */
+	    {
+	      fprintf (stderr, "%s: %s\n", progname, data + 4);
+	      result = 0;
+	      done = True;
+	    }
+	  else if (*data == '3')	/* positive intermediate reply */
+	    {
+	      fprintf (stderr, "%s: internal error: "
+		       "server wants more information?  (%s)\n",
+		       progname, data);
+	      result = 3;
+	      done = True;
+	    }
+	  else if (*data == '4' ||	/* transient negative completion */
+		   *data == '5')	/* permanent negative completion */
+	    {
+	      fprintf (stderr, "%s: %s\n", progname, data + 4);
+	      result = (*data - '0');
+	      done = True;
+	    }
+	  else
+	    {
+	      fprintf (stderr,
+		       "%s: unrecognised " MOZILLA_RESPONSE_PROP
+		       " from window 0x%x: %s\n",
+		       progname, (unsigned int) window, data);
+	      result = 6;
+	      done = True;
+	    }
+
+	  if (data)
+	    XFree (data);
+	}
+#ifdef DEBUG_PROPS
+      else if (event.xany.type == PropertyNotify &&
+	       event.xproperty.window == window &&
+	       event.xproperty.state == PropertyDelete &&
+	       event.xproperty.atom == XA_MOZILLA_COMMAND)
+	{
+	  fprintf (stderr, "%s: (server 0x%x has accepted "
+		   MOZILLA_COMMAND_PROP ".)\n",
+		   progname, (unsigned int) window);
+	}
+#endif /* DEBUG_PROPS */
+    }
+
+ DONE:
+
+  if (new_command)
+    free (new_command);
+
+  return result;
+}
+
+int
+mozilla_remote_commands (Display *dpy, Window window, char **commands)
+{
+  Bool raise_p = True;
+  int status = 0;
+  mozilla_remote_init_atoms (dpy);
+
+  if(!mozilla_remote_check_window(dpy, window))
+	window = 0;
+
+  if (window == 0)
+    window = mozilla_remote_find_window (dpy);
+
+  if(window == 0)
+	return -1;
+
+  XSelectInput (dpy, window, (PropertyChangeMask|StructureNotifyMask));
+
+  /* mozilla_remote_obtain_lock (dpy, window); */
+
+  while (*commands)
+    {
+      if (!strcmp (*commands, "-raise"))
+	raise_p = True;
+      else if (!strcmp (*commands, "-noraise"))
+	raise_p = False;
+      else
+	status = mozilla_remote_command (dpy, window, *commands, raise_p);
+
+      if (status != 0)
+	break;
+      commands++;
+    }
+
+  /* When status = 6, it means the window has been destroyed */
+  /* It is invalid to free the lock when window is destroyed. */
+
+  /* if ( status != 6 ) mozilla_remote_free_lock (dpy, window); */
+
+  return status;
+}
+
+
+#ifdef STANDALONE
+
+static void
+usage (void)
+{
+  fprintf (stderr, "usage: %s [ options ... ]\n\
+       where options include:\n\
+\n\
+       -help                     to show this message.\n\
+       -display <dpy>            to specify the X server to use.\n\
+       -remote <remote-command>  to execute a command in an already-running\n\
+                                 Netscape process.  See the manual for a\n\
+                                 list of valid commands.\n\
+       -id <window-id>           the id of an X window to which the -remote\n\
+                                 commands should be sent; if unspecified,\n\
+                                 the first window found will be used.\n\
+       -raise                    whether following -remote commands should\n\
+                                 cause the window to raise itself to the top\n\
+                                 (this is the default.)\n\
+       -noraise                  the opposite of -raise: following -remote\n\
+                                 commands will not auto-raise the window.\n\
+",
+	   progname);
+}
+
+
+void
+XXXXXXXmain (int argc, char **argv)
+{
+  Display *dpy;
+  char *dpy_string = 0;
+  char **remote_commands = 0;
+  int remote_command_count = 0;
+  int remote_command_size = 0;
+  unsigned long remote_window = 0;
+  Bool sync_p = False;
+  int i;
+
+  progname = strrchr (argv[0], '/');
+  if (progname)
+    progname++;
+  else
+    progname = argv[0];
+
+  /* Hack the -help and -version arguments before opening the display. */
+  for (i = 1; i < argc; i++)
+    {
+      if (!strcasecmp (argv [i], "-h") ||
+	  !strcasecmp (argv [i], "-help"))
+	{
+	  usage ();
+	  exit (0);
+	}
+      else if (!strcmp (argv [i], "-d") ||
+	       !strcmp (argv [i], "-dpy") ||
+	       !strcmp (argv [i], "-disp") ||
+	       !strcmp (argv [i], "-display"))
+	{
+	  i++;
+	  dpy_string = argv [i];
+	}
+      else if (!strcmp (argv [i], "-sync") ||
+	       !strcmp (argv [i], "-synchronize"))
+	{
+	  sync_p = True;
+	}
+      else if (!strcmp (argv [i], "-remote"))
+	{
+	  if (remote_command_count == remote_command_size)
+	    {
+	      remote_command_size += 20;
+	      remote_commands =
+		(remote_commands
+		 ? realloc (remote_commands,
+			    remote_command_size * sizeof (char *))
+		 : calloc (remote_command_size, sizeof (char *)));
+	    }
+	  i++;
+	  if (!argv[i] || *argv[i] == '-' || *argv[i] == 0)
+	    {
+	      fprintf (stderr, "%s: invalid `-remote' option \"%s\"\n",
+		       progname, argv[i] ? argv[i] : "");
+	      usage ();
+	      exit (-1);
+	    }
+	  remote_commands [remote_command_count++] = argv[i];
+	}
+      else if (!strcmp (argv [i], "-raise") ||
+	       !strcmp (argv [i], "-noraise"))
+	{
+	  char *r = argv [i];
+	  if (remote_command_count == remote_command_size)
+	    {
+	      remote_command_size += 20;
+	      remote_commands =
+		(remote_commands
+		 ? realloc (remote_commands,
+			    remote_command_size * sizeof (char *))
+		 : calloc (remote_command_size, sizeof (char *)));
+	    }
+	  remote_commands [remote_command_count++] = r;
+	}
+      else if (!strcmp (argv [i], "-id"))
+	{
+	  char c;
+	  if (remote_command_count > 0)
+	    {
+	      fprintf (stderr,
+		"%s: the `-id' option must preceed all `-remote' options.\n",
+		       progname);
+	      usage ();
+	      exit (-1);
+	    }
+	  else if (remote_window != 0)
+	    {
+	      fprintf (stderr, "%s: only one `-id' option may be used.\n",
+		       progname);
+	      usage ();
+	      exit (-1);
+	    }
+	  i++;
+	  if (argv[i] &&
+	      1 == sscanf (argv[i], " %ld %c", &remote_window, &c))
+	    ;
+	  else if (argv[i] &&
+		   1 == sscanf (argv[i], " 0x%lx %c", &remote_window, &c))
+	    ;
+	  else
+	    {
+	      fprintf (stderr, "%s: invalid `-id' option \"%s\"\n",
+		       progname, argv[i] ? argv[i] : "");
+	      usage ();
+	      exit (-1);
+	    }
+	}
+    }
+
+  dpy = XOpenDisplay (dpy_string);
+  if (! dpy)
+    exit (-1);
+
+  if (sync_p)
+    XSynchronize (dpy, True);
+
+  exit (mozilla_remote_commands (dpy, (Window) remote_window,
+				 remote_commands));
+}
+
+#endif /* STANDALONE */
diff --git a/src/WebAccess/vroot.h b/src/WebAccess/vroot.h
new file mode 100644
index 0000000..e1d33da
--- /dev/null
+++ b/src/WebAccess/vroot.h
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*****************************************************************************/
+/**                   Copyright 1991 by Andreas Stolcke                     **/
+/**               Copyright 1990 by Solbourne Computer Inc.                 **/
+/**                          Longmont, Colorado                             **/
+/**                                                                         **/
+/**                           All Rights Reserved                           **/
+/**                                                                         **/
+/**    Permission to use, copy, modify, and distribute this software and    **/
+/**    its documentation  for  any  purpose  and  without  fee is hereby    **/
+/**    granted, provided that the above copyright notice appear  in  all    **/
+/**    copies and that both  that  copyright  notice  and  this  permis-    **/
+/**    sion  notice appear in supporting  documentation,  and  that  the    **/
+/**    name of Solbourne not be used in advertising                         **/
+/**    in publicity pertaining to distribution of the  software  without    **/
+/**    specific, written prior permission.                                  **/
+/**                                                                         **/
+/**    ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/
+/**    WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF    **/
+/**    MERCHANTABILITY  AND  FITNESS,  IN  NO  EVENT SHALL ANDREAS STOLCKE  **/
+/**    OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL    **/
+/**    DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA   **/
+/**    OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER    **/
+/**    TORTIOUS ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE    **/
+/**    OR PERFORMANCE OF THIS SOFTWARE.                                     **/
+/*****************************************************************************/
+/*
+ * vroot.h -- Virtual Root Window handling header file
+ *
+ * This header file redefines the X11 macros RootWindow and DefaultRootWindow,
+ * making them look for a virtual root window as provided by certain `virtual'
+ * window managers like swm and tvtwm. If none is found, the ordinary root
+ * window is returned, thus retaining backward compatibility with standard
+ * window managers.
+ * The function implementing the virtual root lookup remembers the result of
+ * its last invocation to avoid overhead in the case of repeated calls
+ * on the same display and screen arguments. 
+ * The lookup code itself is taken from Tom LaStrange's ssetroot program.
+ *
+ * Most simple root window changing X programs can be converted to using
+ * virtual roots by just including
+ *
+ * #include <X11/vroot.h>
+ *
+ * after all the X11 header files.  It has been tested on such popular
+ * X clients as xphoon, xfroot, xloadimage, and xaqua.
+ * It also works with the core clients xprop, xwininfo, xwd, and editres
+ * (and is necessary to get those clients working under tvtwm).
+ * It does NOT work with xsetroot; get the xsetroot replacement included in
+ * the tvtwm distribution instead.
+ *
+ * Andreas Stolcke <stolcke at ICSI.Berkeley.EDU>, 9/7/90
+ * - replaced all NULL's with properly cast 0's, 5/6/91
+ * - free children list (suggested by Mark Martin <mmm at cetia.fr>), 5/16/91
+ * - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91
+ */
+
+#ifndef _VROOT_H_
+#define _VROOT_H_
+
+#include <X11/X.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+
+static Window
+VirtualRootWindowOfScreen(screen)
+	Screen *screen;
+{
+	static Screen *save_screen = (Screen *)0;
+	static Window root = (Window)0;
+
+	if (screen != save_screen) {
+		Display *dpy = DisplayOfScreen(screen);
+		Atom __SWM_VROOT = None;
+		int i;
+		Window rootReturn, parentReturn, *children;
+		unsigned int numChildren;
+
+		root = RootWindowOfScreen(screen);
+
+		/* go look for a virtual root */
+		__SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False);
+		if (XQueryTree(dpy, root, &rootReturn, &parentReturn,
+				 &children, &numChildren)) {
+			for (i = 0; i < numChildren; i++) {
+				Atom actual_type;
+				int actual_format;
+				unsigned long nitems, bytesafter;
+				Window *newRoot = (Window *)0;
+
+				if (XGetWindowProperty(dpy, children[i],
+					__SWM_VROOT, 0, 1, False, XA_WINDOW,
+					&actual_type, &actual_format,
+					&nitems, &bytesafter,
+					(unsigned char **) &newRoot) == Success
+				    && newRoot) {
+				    root = *newRoot;
+				    break;
+				}
+			}
+			if (children)
+				XFree((char *)children);
+		}
+
+		save_screen = screen;
+	}
+
+	return root;
+}
+
+#undef RootWindowOfScreen
+#define RootWindowOfScreen(s) VirtualRootWindowOfScreen(s)
+
+#undef RootWindow
+#define RootWindow(dpy,screen) VirtualRootWindowOfScreen(ScreenOfDisplay(dpy,screen))
+
+#undef DefaultRootWindow
+#define DefaultRootWindow(dpy) VirtualRootWindowOfScreen(DefaultScreenOfDisplay(dpy))
+
+#endif /* _VROOT_H_ */
diff --git a/src/XSection/Makefile.am b/src/XSection/Makefile.am
new file mode 100644
index 0000000..3c75f8a
--- /dev/null
+++ b/src/XSection/Makefile.am
@@ -0,0 +1,37 @@
+bin_PROGRAMS = bin/XSection
+
+bin_XSection_SOURCES  = MvXsectFrame.cc Xsect.cc MvXsectFrame.h
+bin_XSection_CPPFLAGS = $(METVIEW_NETCDF_FLAGS)
+bin_XSection_LDADD    = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB)
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA     = $(local_sharedir)/ObjectSpec.XSection \
+		 $(local_sharedir)/XSectionDef \
+		 $(local_sharedir)/XSectionRules \
+		 $(local_sharedir)/XAverageDef \
+		 $(local_sharedir)/XAverageRules \
+		 $(local_sharedir)/VProfileDef \
+		 $(local_sharedir)/VProfileRules
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} XSECTION.xpm  $(local_iconsdir)
+	${INSTALL} XAVERAGE.xpm  $(local_iconsdir)
+	${INSTALL} VPROFILE.xpm  $(local_iconsdir)
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/XSECTION.xpm \
+	     $(local_iconsdir)/XAVERAGExpm $(local_iconsdir)/VPROFILE.xpm
+
+BUILT_SOURCES = bin icons
+
+EXTRA_DIST = ObjectSpec.XSection XAVERAGE.xpm XAverageDef XAverageRules XSECTION.xpm XSectionDef XSectionRules VPROFILE.xpm VProfileDef VProfileRules
+
+bin:
+	ln -s ../../bin bin
diff --git a/src/XSection/Makefile.in b/src/XSection/Makefile.in
new file mode 100644
index 0000000..98b5723
--- /dev/null
+++ b/src/XSection/Makefile.in
@@ -0,0 +1,751 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = bin/XSection$(EXEEXT)
+subdir = src/XSection
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_bin_XSection_OBJECTS = bin_XSection-MvXsectFrame.$(OBJEXT) \
+	bin_XSection-Xsect.$(OBJEXT)
+bin_XSection_OBJECTS = $(am_bin_XSection_OBJECTS)
+am__DEPENDENCIES_1 =
+bin_XSection_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_XSection_SOURCES)
+DIST_SOURCES = $(bin_XSection_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_XSection_SOURCES = MvXsectFrame.cc Xsect.cc MvXsectFrame.h
+bin_XSection_CPPFLAGS = $(METVIEW_NETCDF_FLAGS)
+bin_XSection_LDADD = $(STANDARD_METVIEW_LIBS) $(METVIEW_UTIL_LIB) $(METVIEW_NETCDF_LIB)
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+local_iconsdir = ../../share/metview/icons
+share_DATA = $(local_sharedir)/ObjectSpec.XSection \
+		 $(local_sharedir)/XSectionDef \
+		 $(local_sharedir)/XSectionRules \
+		 $(local_sharedir)/XAverageDef \
+		 $(local_sharedir)/XAverageRules \
+		 $(local_sharedir)/VProfileDef \
+		 $(local_sharedir)/VProfileRules
+
+CLEANFILES = $(share_DATA) $(local_iconsdir)/XSECTION.xpm \
+	     $(local_iconsdir)/XAVERAGExpm $(local_iconsdir)/VPROFILE.xpm
+
+BUILT_SOURCES = bin icons
+EXTRA_DIST = ObjectSpec.XSection XAVERAGE.xpm XAverageDef XAverageRules XSECTION.xpm XSectionDef XSectionRules VPROFILE.xpm VProfileDef VProfileRules
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/XSection/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/XSection/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/XSection$(EXEEXT): $(bin_XSection_OBJECTS) $(bin_XSection_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/XSection$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_XSection_OBJECTS) $(bin_XSection_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_XSection-MvXsectFrame.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_XSection-Xsect.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_XSection-MvXsectFrame.o: MvXsectFrame.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_XSection-MvXsectFrame.o -MD -MP -MF $(DEPDIR)/bin_XSection-MvXsectFrame.Tpo -c -o bin_XSection-MvXsectFrame.o `test -f 'MvXsectFrame.cc' || echo '$(srcdir)/'`MvXsectFrame.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_XSection-MvXsectFrame.Tpo $(DEPDIR)/bin_XSection-MvXsectFrame.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvXsectFrame.cc' object='bin_XSection-MvXsectFrame.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_XSection-MvXsectFrame.o `test -f 'MvXsectFrame.cc' || echo '$(srcdir)/'`MvXsectFrame.cc
+
+bin_XSection-MvXsectFrame.obj: MvXsectFrame.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_XSection-MvXsectFrame.obj -MD -MP -MF $(DEPDIR)/bin_XSection-MvXsectFrame.Tpo -c -o bin_XSection-MvXsectFrame.obj `if test -f 'MvXsectFrame.cc'; then $(CYGPATH_W) 'MvXsectFrame.cc'; else $(CYGPATH_W) '$(srcdir)/MvXsectFrame.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_XSection-MvXsectFrame.Tpo $(DEPDIR)/bin_XSection-MvXsectFrame.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvXsectFrame.cc' object='bin_XSection-MvXsectFrame.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_XSection-MvXsectFrame.obj `if test -f 'MvXsectFrame.cc'; then $(CYGPATH_W) 'MvXsectFrame.cc'; else $(CYGPATH_W) '$(srcdir)/MvXsectFrame.cc'; fi`
+
+bin_XSection-Xsect.o: Xsect.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_XSection-Xsect.o -MD -MP -MF $(DEPDIR)/bin_XSection-Xsect.Tpo -c -o bin_XSection-Xsect.o `test -f 'Xsect.cc' || echo '$(srcdir)/'`Xsect.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_XSection-Xsect.Tpo $(DEPDIR)/bin_XSection-Xsect.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Xsect.cc' object='bin_XSection-Xsect.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_XSection-Xsect.o `test -f 'Xsect.cc' || echo '$(srcdir)/'`Xsect.cc
+
+bin_XSection-Xsect.obj: Xsect.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_XSection-Xsect.obj -MD -MP -MF $(DEPDIR)/bin_XSection-Xsect.Tpo -c -o bin_XSection-Xsect.obj `if test -f 'Xsect.cc'; then $(CYGPATH_W) 'Xsect.cc'; else $(CYGPATH_W) '$(srcdir)/Xsect.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_XSection-Xsect.Tpo $(DEPDIR)/bin_XSection-Xsect.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Xsect.cc' object='bin_XSection-Xsect.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_XSection_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_XSection-Xsect.obj `if test -f 'Xsect.cc'; then $(CYGPATH_W) 'Xsect.cc'; else $(CYGPATH_W) '$(srcdir)/Xsect.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+icons:
+	${INSTALL} XSECTION.xpm  $(local_iconsdir)
+	${INSTALL} XAVERAGE.xpm  $(local_iconsdir)
+	${INSTALL} VPROFILE.xpm  $(local_iconsdir)
+
+bin:
+	ln -s ../../bin bin
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/XSection/MvXsectFrame.cc b/src/XSection/MvXsectFrame.cc
new file mode 100644
index 0000000..344c347
--- /dev/null
+++ b/src/XSection/MvXsectFrame.cc
@@ -0,0 +1,1324 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include "MvXsectFrame.h"
+
+const char *stringModes[] =
+{ "AVERAGE_NS","AVERAGE_EW","XSECT",
+  "VP_POINT","VP_POINT","VP_AREA","VP_AREA2",0};
+
+const double cCDR = atan(1.0)/45.0; //-- conversion factor Degrees->Radians
+                                  //-- atan(1)/45 = (PI/4)/45 = PI/180
+
+// convienience method, (vk/1999-08-05)
+// checks if x is between r1 and r2
+bool isWithinRange( double r1, double r2, double x )
+{
+    if( r1 <= x && x <= r2 )
+        return true;
+
+    if( r2 <= x && x <= r1 )
+        return true;
+
+    return false;
+}
+
+// Deletes all info about a parameter, including all space used
+// for the level data.
+ParamInfo::~ParamInfo()
+{
+  LevelIterator ii;
+
+  for ( ii = levels_.begin();ii != levels_.end(); ii++ )
+    {
+      if ((*ii).second )
+	delete [] (*ii).second->xvalues_;
+    }
+}
+
+string ParamInfo::ExpVerTitle()
+{
+  if( expver_ == "_" )      //-- missing ExpVer is stored as "_"
+    return string("");
+  else
+    return string( "Expver " ) + expver_;
+}
+
+// Fill in data into a level in the LevelMap. Generate the level if needed,
+// and delete any old values from the level.
+void ParamInfo::Level(double* x,string lev, int n,int modlev)
+{
+  double flev = atof(lev.c_str() );
+
+  //	Save date for one level
+  LevelIterator ii = levels_.find(lev);
+
+  if ( ii == levels_.end() )
+    {
+      //levels_.insert(pair<string,LevelInfo*>(lev,new LevelInfo(flev,modlev)));
+      levels_[ lev ] = new LevelInfo( flev, modlev );
+      ii = levels_.find(lev);
+    }
+  else
+    {
+      if ( (*ii).second->xvalues_ )
+	{
+	  delete [] (*ii).second->xvalues_;
+	  (*ii).second->xvalues_ = 0;
+	}
+      if ( (*ii).second->yvalue_ == DONTCARE )
+	(*ii).second->yvalue_ = modlev ? flev : flev * 100;
+    }
+
+  if (  (*ii).second->xvalues_ == 0 )
+    (*ii).second->xvalues_ = new double[n];
+
+  double *xx = (*ii).second->xvalues_;
+  for (int i = 0; i<n; i++)
+    xx[i] = x[i];
+
+}
+
+void ParamInfo::UpdateLevels(int modlev)
+{
+  LevelIterator ii;
+
+  for ( ii = levels_.begin();ii != levels_.end(); ii++ )
+    {
+      double flev = atof((*ii).first.c_str());
+      (*ii).second->UpdateLevel(flev,modlev);
+    }
+}
+/////////////////// ApplicationInfo /////////////////////
+// Update the levels according to the modlev parameter.
+// This info is not known when the parameters and levels were added.
+
+void ApplicationInfo::UpdateLevels(ParamMap &params,int modlev)
+{
+  ParamIterator ii;
+  for ( ii = params.begin(); ii != params.end(); ii++)
+    (*ii).second->UpdateLevels(modlev);
+}
+
+
+void ApplicationInfo::Grid( double ns, double ew )
+{
+  gridNS_ = ns;
+  gridEW_ = ew;
+
+  if ( ns == cValueNotGiven || ew == cValueNotGiven )
+    {
+      //-- has to be synchronised with averageAlong() (020731/vk)
+      gridNS_ = gridEW_ = 1.0;
+    }
+}
+
+// Fill lat/long values if this is an XSection.
+
+void ApplicationInfo::setLine(double* lon, double* lat)
+{
+  double  dx = double( x2_ - x1_ ) / double(nrPoints_ -1);
+  double  dy = double( y2_ - y1_ ) / double(nrPoints_ -1);
+
+  lon[0] = x1_;
+  lat[0] = y1_;
+
+  if( viaPole() )
+    {
+      double lat_k_prev = y1_;            //-- xsect line over a pole
+//      double lon_0      = x1_;
+      bool overThePole  = false;
+
+      for( int k = 1;  k< nrPoints_; k++ )
+	{
+	  lon[k] = lon[k-1] + dx;
+
+	  double lat_k = lat_k_prev + dy;
+
+	  if( ( lat_k < -90.0 || lat_k > 90.0 ) && ! overThePole )
+	    {
+	      lat_k_prev += dy;           //-- compensate for mirroring
+
+	      dy = -dy;                   //-- start mirroring backwards
+	      if( lat_k < -90.0 )
+		lat_k = -180.0 - lat_k;   //-- fix for South Pole
+	      else
+		lat_k = 180.0 - lat_k;    //-- fix for North Pole
+
+	      if( dx == 0 )
+		{
+		  lon[k] = x1_ + 180.0;   //-- straight over the pole
+		  if( lon[k] > 360.0 )    //-- ensure inside normal range
+		    lon[k] = lon[k] - 360.0;
+		}
+
+	      overThePole = true;
+	    }
+
+	  lat[k] = lat_k;
+	  lat_k_prev += dy;
+	  //cout << k << "\t" << lat[k] << "\t" << lon[k] << endl;
+	}
+    }
+  else
+    {
+      for (int k = 1;  k < nrPoints_; k++) //-- no pole
+	{
+	  lon[k] = lon[k-1] + dx;
+	  lat[k] = lat[k-1] + dy;
+	}
+    }
+}
+
+void ApplicationInfo::mapValues(ParamInfo &par_uv, ParamInfo *par_u,
+				ParamInfo *par_v)
+{
+  //	Map U/V into planes
+  LevelMap  lmap_u = par_u->Levels();
+  LevelMap  lmap_v = par_v->Levels();
+  LevelIterator uu = lmap_u.begin(), vv = lmap_v.begin();
+  double *uValues,*vValues;
+
+  double *valuesuv = new double[nrPoints_];
+
+  for (; uu != lmap_u.end(), vv != lmap_v.end();uu++,vv++)
+    {
+      uValues = (*uu).second->XValues();
+      vValues = (*vv).second->XValues();
+
+      for ( int i=0; i < nrPoints_; i++)
+	{
+	  if (uValues[i] < BIGDOUBLE && vValues[i] < BIGDOUBLE)
+	    {
+	      if (currentHC_ == PERPENDICULAR )
+		valuesuv[i] = -uValues[i]*ansin_ + vValues[i] * ancos_;
+	      else if (currentHC_ == PARALLEL )
+		valuesuv[i] = uValues[i]*ancos_ + vValues[i] * ansin_;
+	      else
+		valuesuv[i] =  sqrt (uValues[i] * uValues[i] +
+				     vValues[i] * vValues[i]);
+	    }
+	  else
+	    valuesuv[i] = MAXDOUBLE;
+	}
+
+      par_uv.Level(valuesuv,(*uu).first,nrPoints_,modlev_);
+    }
+  delete [] valuesuv;
+  return;
+}
+
+// Compute number of points etc.
+int ApplicationInfo::EvaluateBlot(double L1, double L2, double R1, double R2,
+				  double P1, double P2 )
+{
+  PresBot_ = 100.*P2;
+  PresTop_ = 100.*P1;
+
+  nrLevels_ = 85;
+
+  x1_ = L1;
+  x2_ = L2;
+  y1_ = R1;
+  y2_ = R2;
+
+  if ( y1_ > 90. || y1_ < -90. || y2_ > 90. || y2_ < -90.)
+    {
+      if( mode_ == XSECT )
+	viaPole_ = true;
+      else
+	return 0;
+    }
+
+  if( mode_ == AVERAGE_NS  || mode_ == AVERAGE_EW )
+    {
+      int numberNS_ = (int)( fabs( (y1_-y2_)/gridNS_ ) + 0.0000001) + 1;  // avoid precision errors
+      int numberEW_ = (int)( fabs( (x2_-x1_)/gridEW_ ) + 0.0000001) + 1;  // avoid precision errors
+      nrPoints_ = ( mode_ == AVERAGE_NS ) ? numberEW_ : numberNS_;
+    }
+  else if ( mode_ == VP_POINT || mode_ == VP_GRIDPOINT || mode_ == VP_AREA || mode_ == VP_AREA2 )
+    {
+      nrPoints_ = 1;
+    }
+  else
+    {
+      double	dellat = ABS(y2_-y1_), dellon = ABS(x2_-x1_);
+      double	latm = (y1_+y2_)/2.;
+      double	dellona = dellon*cos( cCDR*latm );
+
+      dist_ = 110442.3*sqrt (dellat*dellat + dellona*dellona);
+
+      double angle = atan2 (y2_ - y1_,x2_ - x1_);
+      ancos_ = cos (angle);
+      ansin_ = sin (angle);
+
+      int i = int( sqrt( dellon*dellon + dellat*dellat )/MAX(gridNS_,gridEW_));
+
+      nrPoints_ = MAX(i,64);
+    }
+
+  return nrPoints_;
+}
+
+
+// We have all the values for one parameter ( for the same date, time,step and expver).
+// Call functions to write the values to netcdf file.
+// Note that only curveValues() requires the min/max_level parameters. 
+bool ApplicationInfo::generateData(ParamMap &params, MvNetCDF &cdf,MvField &field,
+				   const string& key, double *splin, double *min_level, double *max_level)
+{
+  bool ret_val = false;
+
+  ParamIterator ii = params.find(key);
+  if ( ii == params.end() )
+    return ret_val;
+
+  int param = (*ii).second->Parameter();
+
+  if ( (mode_ == VP_POINT || mode_ == VP_GRIDPOINT || mode_ == VP_AREA || mode_ == VP_AREA2) && param != LnPress )
+    ret_val = curveValues(params,cdf,key,field,splin, min_level, max_level);
+  else if ( mode_ == XSECT && param != LnPress)
+    ret_val = generateXsectData(params,cdf,key,field, splin);
+  else if ( mode_ == XSECT && modlev_ == 1 && param == LnPress )
+    ret_val = generateLnSP(cdf,key,splin);
+  else  if ( (mode_ == AVERAGE_NS || mode_ == AVERAGE_EW) &&
+	     param != LnPress )
+    ret_val = generateAverageData(params,cdf,key,field, splin);
+  else // param probably lnsp
+    return true;
+
+  return ret_val;
+
+}
+
+// Write curve values to file ( for vertical profile ).
+// We also make a note of the min and max levels so that later on we can
+// correctly construct the Y-axis
+bool ApplicationInfo::curveValues(ParamMap &params,MvNetCDF& cdf,
+				  const string& key,MvField &field,
+				  double *splin, double *min_level, double *max_level)
+{
+    char titlestr[150];
+    ParamIterator ii = params.find(key);
+    LevelMap lmap = (*ii).second->Levels();
+    LevelIterator jj;
+    MvNcVar *ncx;
+
+
+    if ( ii == params.end() )
+        return false;
+
+    ParamInfo *par = (*ii).second;
+
+
+    int dimsize;
+
+    // Generate the netCDf axes variables
+    //if ( !GenerateNetcdfAxesVariables(params,cdf,key) )
+        //return false;
+
+    double *y_values = new double[lmap.size()];
+    double *x_values = new double[lmap.size()];
+    int i = 0;
+    double oneY;
+    *min_level =  999999;
+    *max_level = -999999;
+
+    for ( jj = lmap.begin(); jj != lmap.end(); jj++)
+    {
+        if ( modlev_ == 1)
+            //oneY = field.modelLevelToPressure(*splin,(*jj).second->YValue() -1 )/100.;
+            oneY = field.meanML_to_Pressure_byLNSP(*splin,(int)((*jj).second->YValue()) -1 )/100.;
+        else if ( modlev_ == -1 || modlev_ == cML_UKMO_ND )
+            oneY = (*jj).second->YValue();
+        else
+        {
+            oneY = (*jj).second->YValue()/100;
+            if ( oneY < (PresTop_/100) || oneY > (PresBot_/100) )
+                continue;
+        }
+
+        y_values[i] = oneY;
+        x_values[i] = ((*jj).second->XValues())[0];
+        i++;
+
+
+        // update the min/max y values
+        
+        if (oneY < *min_level)
+            *min_level = oneY;
+
+        if (oneY > *max_level)
+            *max_level = oneY;
+    }
+
+    dimsize = i;
+
+
+    // add the 'levels' variable to the netCDF
+
+    vector<long> levels_dimsize(1,dimsize);
+    vector<string> levels_name(1,"levels");
+    MvNcVar *nclevels = cdf.addVariable(levels_name[0],ncDouble,levels_dimsize,levels_name);
+    nclevels->addAttribute("units", "hPa");
+    nclevels->addAttribute("positive", "down");
+    nclevels->put(y_values,(long)dimsize);
+
+
+
+    // add the 'values' variable to the netCDF
+
+    vector<long> values_dimsize(1,dimsize);
+    vector<string> values_name(1,"values");
+    MvNcVar *ncvalues = cdf.addVariable(values_name[0],ncDouble,values_dimsize,values_name);
+    ncvalues->put(x_values,(long)dimsize);
+
+
+
+    // add the coordinates variables to the netCDF
+
+    vector<long> coord_dimsize(1,1);
+    vector<string> coord_name(1,"latitude");
+    MvNcVar *nccoord = cdf.addVariable(coord_name[0],ncDouble,coord_dimsize,coord_name);
+    nccoord->addAttribute("standard_name", "latitude");
+    nccoord->addAttribute("units", "degrees_north");
+
+    nccoord->put(&y1_, 1);
+
+    coord_name[0] = "longitude";
+    nccoord = cdf.addVariable(coord_name[0],ncDouble,coord_dimsize,coord_name);
+    nccoord->addAttribute("standard_name", "longitude");
+    nccoord->addAttribute("units", "degrees_east");
+    nccoord->put(&x1_, 1);
+
+
+    ncx = cdf.addVariable(key.c_str(), ncDouble,2,dimsize);
+    ncx->addAttribute("MV_VERB","CURVE");
+    ncx->addAttribute("_REQUEST_NAMES","DATA_X_VALUES/DATA_Y_VALUES");
+
+    // Add data for matching
+    AddMetadata(ncx,key);
+    AddLevels(ncx,par);
+
+    SetArea(ncx);
+
+    if ( mode_ == VP_POINT )
+        sprintf(titlestr,"Vertical profile of %s %d %02d step %d %s point (%.1f,%.1f)",
+            par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+            par->ExpVerTitle().c_str(), y1_, x1_ );
+    else if ( mode_ == VP_GRIDPOINT )
+        sprintf(titlestr,"Vertical profile of %s %d %02d step %d %s nearest gridpoint (%.2f,%.2f)",
+            par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+            par->ExpVerTitle().c_str(), y1_,x1_ );
+    else if ( mode_ == VP_AREA )
+        sprintf(titlestr,"Vertical profile of %s %d %02d step %d %s area [%.1f,%.1f,%.1f,%.1f]",
+            par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+            par->ExpVerTitle().c_str(), y1_, x1_, y2_,x2_ );
+    else //-- VP_AREA2
+        sprintf(titlestr,"Vertical profile of %s %d %02d step %d %s area2 [%.1f,%.1f,%.1f,%.1f]",
+        par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+        par->ExpVerTitle().c_str(), y1_,x1_, y2_,x2_ );
+
+    //ncx->addAttribute("MV_TITLE",titlestr);
+    cdf.addAttribute("title",titlestr);
+
+
+    if ( logax_ )
+        ncx->addAttribute("AXIS_TICK_POSITIONING","LOGARITHMIC");
+
+    ncx->put(x_values,1, dimsize);
+    ncx->setCurrent(1);
+    ncx->put(y_values,1,dimsize);
+
+    delete [] x_values;
+    delete [] y_values;
+
+    return true;
+}
+
+
+
+// Generate data for Xsection. If some parameters are generated together, like in some cases
+// U&V or u,v&w, just return if we have not got all the params. Otherwise, generate the
+// data according to the values set.
+bool ApplicationInfo::generateXsectData(ParamMap &params,MvNetCDF &cdf, const string& key,
+					MvField& field, double *splin)
+{
+  ParamIterator ii = params.find(key);
+  if ( ii == params.end() )
+    return false;
+
+  ParamInfo *par = (*ii).second;
+
+  // Since the data are sorted by parameter, we wait until we get the
+  // highest interesting parameter before doing the work.
+  if ( foundUV_ && par->Parameter() == U_FIELD ||
+       (( foundW_ && (par->Parameter() == U_FIELD ||
+		      par->Parameter() == V_FIELD ) ) && !foundUV_) )
+    return true;
+
+  // Generate the netCDf axes variables
+  if ( !GenerateNetcdfAxesVariables(params,cdf,key) )
+	return false;
+
+  // Generate the netCDF parameter variable
+  if ( foundUV_ && par->Parameter() == V_FIELD )
+    return windValues(params,cdf,key,field,splin);
+
+  else if ( foundW_ && par->Parameter() == W_FIELD )
+    return velocityValues(params,cdf,key,field,splin);
+
+  else
+    return contourValues(params,cdf,key,field,splin);
+}
+
+// Generate data for average aplication.
+bool ApplicationInfo::generateAverageData(ParamMap &params,MvNetCDF &cdf,
+					const string& key,
+					MvField& field, double *splin)
+{
+  // Generate the netCDf axes variables
+  if ( !GenerateNetcdfAxesVariables(params,cdf,key) )
+	return false;
+
+  // Generate the netCDF parameter variable
+  return contourValues(params,cdf,key,field,splin);
+}
+
+// Generate contour data ( for xsection or average).
+bool ApplicationInfo::contourValues(ParamMap &params,MvNetCDF &cdf,
+				    const string& key,
+				    MvField& field, double *splin)
+{
+  int i;
+  char titlestr[250];
+
+  ParamIterator ii = params.find(key);
+  if ( ii == params.end() )
+    return false;
+
+  ParamInfo *par = (*ii).second;
+
+  int nrLevels = NrLevels(par);
+
+  double **cp =	new double* [ nrLevels ];
+  for (i=0; i < nrLevels; i++)
+    cp[i] = new double [ nrPoints_ ];
+
+
+  if( modlev_ != 1 )
+    InterpolateVerticala(cp,par);
+  else
+    InterpolateVerticalb(field,cp,par,splin);
+
+  // Generate NetCDF Parameter variable
+  vector<long> dimsize(2);
+  vector<string> vname(2);
+  dimsize[0] = nrLevels;
+  dimsize[1] = nrPoints_;
+  vname[0]   = "levels";
+  vname[1]   = "longitude";
+  MvNcVar *ncvar = cdf.addVariable(key.c_str(),ncDouble,dimsize,vname);
+
+  ncvar->addAttribute("MV_VERB","PCONT");
+  ncvar->addAttribute("missing_value",DONTCARE);
+
+  // Add data for matching
+  AddMetadata(ncvar,key);
+
+  AddLevels(ncvar,par);
+  SetArea(ncvar);
+
+  if ( mode_ == AVERAGE_EW )
+    sprintf(titlestr,"Average of %s %d %02d step %d %s (%.1f%s-%.1f%s)",
+	    par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+	    par->ExpVerTitle().c_str(),
+	    (x1_< 0) ? -x1_ : x1_, (x1_<0) ? "W" : "E",
+	    (x2_< 0) ? -x2_ : x2_, (x2_<0) ? "W" : "E"
+	    );
+  else if ( mode_ == AVERAGE_NS )
+    sprintf(titlestr,"Average of %s %d %02d step %d %s (%.1f%s-%.1f%s)",
+	    par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+	    par->ExpVerTitle().c_str(),
+	    (y1_< 0) ? -y1_ : y1_, (y1_<0) ? "S" : "N",
+	    (y2_< 0) ? -y2_ : y2_, (y2_<0) ? "S" : "N"
+	    );
+  else  //-- XSECT
+    sprintf(titlestr,"Cross section of %s %d %02d step %d %s",
+	    par->ParamName().c_str(), par->Date(),par->Time(),par->Step(),
+	    par->ExpVerTitle().c_str() );
+
+  //ncvar->addAttribute("MV_TITLE",titlestr);
+  cdf.addAttribute("title",titlestr);
+
+  if ( logax_ )
+    ncvar->addAttribute("AXIS_TICK_POSITIONING","LOGARITHMIC");
+
+  setYValues(ncvar,par);
+
+  for ( i=0; i< nrLevels ;i++)
+    {
+      ncvar->setCurrent(i);
+      ncvar->put(cp[i],1,(long)nrPoints_);
+      delete [] cp[i];
+    }
+
+  delete [] cp;
+
+  return true;
+}
+
+
+// Generate data for plotting lnsp curve in xsection view.
+bool ApplicationInfo::generateLnSP(MvNetCDF &cdf, const string& key, double *splin)
+{
+    double low = PresTop_/100., high = PresBot_/100.;
+
+    MvNcVar *ncx = cdf.addVariable(key.c_str(),ncDouble,2,nrPoints_);
+    ncx->addAttribute("MV_VERB","CURVE");
+    ncx->addAttribute("_REQUEST_NAMES","DATA_X_VALUES/DATA_Y_VALUES");
+
+
+    ncx->addAttribute("BOTTOM_PRESSURE",high);
+    ncx->addAttribute("TOP_PRESSURE",low);
+    if ( logax_ )
+        ncx->addAttribute("AXIS_TICK_POSITIONING","LOGARITHMIC");
+
+    // Add data for matching
+    AddMetadata(ncx,key);
+    SetArea(ncx);
+
+    double *y1_values = new double[nrPoints_];
+    double *y2_values = new double[nrPoints_];
+    double *x_values  = new double[nrPoints_];
+
+    for ( int i = 0; i < nrPoints_; i++ )
+    {
+        x_values[i] = i-180;
+        double w = exp(splin[i]);
+
+        if ( w > BIGDOUBLE )
+            y1_values[i] = high;
+        else
+        {
+            w /= 100;
+            w = MAX(low,w);
+            w = MIN(high,w);
+            y1_values[i] = w;
+        }
+        y2_values[i] = 1050;   // XXXXXXXX
+    }
+
+
+
+
+    // add the 'x_values' variable to the netCDF
+
+    vector<long> x_dimsize(1,nrPoints_);
+    vector<string> x_name(1,"orography_x_values");
+    MvNcVar *ncxx = cdf.addVariable(x_name[0],ncDouble,x_dimsize,x_name);
+    ncxx->put(x_values,(long)nrPoints_);
+
+    // add the 'y1_values' variable to the netCDF
+
+    vector<long> y1_dimsize(1,nrPoints_);
+    vector<string> y1_name(1,"orography_y1_values");
+    MvNcVar *ncy1 = cdf.addVariable(y1_name[0],ncDouble,y1_dimsize,y1_name);
+    ncy1->put(y1_values,(long)nrPoints_);
+
+
+    // add the 'y2_values' variable to the netCDF
+
+    vector<long> y2_dimsize(1,nrPoints_);
+    vector<string> y2_name(1,"orography_y2_values");
+    MvNcVar *ncy2 = cdf.addVariable(y2_name[0],ncDouble,y2_dimsize,y2_name);
+    ncy2->put(y2_values,(long)nrPoints_);
+
+
+    // add the 'values' variable to the netCDF
+
+    //vector<long> values_dimsize(1,nrPoints_);
+    //vector<string> values_name(1,"orography_values");
+    //MvNcVar *ncvalues = cdf.addVariable(values_name[0],ncDouble,values_dimsize,values_name);
+    //ncvalues->put(y_values,(long)nrPoints_);
+
+
+
+    ncx->put(x_values,1,nrPoints_);
+    ncx->setCurrent(1);
+    ncx->put(y1_values,1,nrPoints_);
+    ncx->setCurrent(2);
+    ncx->put(y2_values,1,nrPoints_);
+
+    delete [] x_values;
+    delete [] y1_values;
+    delete [] y2_values;
+
+    return true;
+}
+
+// Generate values for contouring u&v.
+bool ApplicationInfo::windValues(ParamMap &params,MvNetCDF &cdf,
+				 const string& key,
+				 MvField& field, double *splin)
+{
+  int i;
+  char titlestr[150];
+
+  ParamIterator ii = params.find(key);
+  if ( ii == params.end() )
+    return false;
+
+  ParamInfo *par_v = (*ii).second;
+
+
+
+  // The paraminfo contains the v field, now find the u field,
+  // substitute u for v in the key and find info in list.
+  char ukey[60];
+  sprintf(ukey,"p%03d%s",U_FIELD,key.substr(4,50).c_str() );
+  ii =  params.find(string(ukey));
+  if ( ii == params.end() )
+    return false;
+  ParamInfo *par_u = (*ii).second;
+
+  // Temporary used for holding mapped u/v values.
+  ParamInfo par_uv( par_v->Parameter()
+                  , par_v->Date()
+		  , par_v->Time()
+		  , par_v->Step()
+		  , par_v->ParamName()
+		  );
+
+  int nrLevels = NrLevels(&par_uv);
+
+  double **cp =	new double* [ nrLevels ];
+  for (i=0; i < nrLevels; i++)
+    cp[i] = new double [ nrPoints_ ];
+
+  int hc_perp = hcPerpendicular_, hc_int = hcIntensity_;
+
+  for (i = 0; i < hcNumber_;i++ )
+    {
+      if ( hc_perp )
+	{
+	  currentHC_ = hc_perp; hc_perp = 0;
+	}
+      else if ( hc_int )
+	{
+	  currentHC_ = hc_int; hc_int = 0;
+	}
+
+      mapValues(par_uv,par_u,par_v);
+
+      if( modlev_ != 1 )
+	InterpolateVerticala(cp,&par_uv);
+      else
+	InterpolateVerticalb(field,cp,&par_uv,splin);
+
+      // Generate the variables and fill with the uv values.
+      // as the variable name is the same.
+      MvNcVar *ncvar = cdf.addVariable(key,ncDouble,nrLevels,nrPoints_);
+
+      ncvar->addAttribute("MV_VERB","PCONT");
+
+      if ( logax_ )
+	ncvar->addAttribute("AXIS_TICK_POSITIONING","LOGARITHMIC");
+      // Add data for matching
+      AddMetadata(ncvar,key);
+
+      AddLevels(ncvar,&par_uv);
+      SetArea(ncvar);
+
+      setYValues(ncvar, &par_uv);
+
+      // Generate a title.
+      sprintf(titlestr,"Cross section of wind %s %d %02d step %d %s",
+	      (currentHC_ == hcPerpendicular_ ) ? "perp." : "intens.",
+	      par_v->Date(),par_v->Time(),par_v->Step(),
+	      par_v->ExpVerTitle().c_str() );
+      ncvar->addAttribute("MV_TITLE",titlestr);
+
+      // X values
+      for ( int j= 0; j < nrLevels; j++ )
+	{
+	  ncvar->setCurrent(j);
+	  ncvar->put(cp[j],1,(long)nrPoints_);
+	}
+    }
+
+  delete [] cp;
+
+  return true;
+}
+
+// Generate wind data for u,v&w.
+bool ApplicationInfo::velocityValues(ParamMap &params,MvNetCDF &cdf,
+				     const string& key,
+				     MvField& field, double *splin)
+{
+  int i;
+  char titlestr[150];
+  ParamIterator ii = params.find(key);
+  if ( ii == params.end() )
+    return false;
+  ParamInfo *par_w = (*ii).second;
+
+// The paraminfo contains the w field, now find the u and field,
+  // substitute u for v in the key and find info in list.
+   char ukey[60];
+   sprintf(ukey,"p%03d%s",U_FIELD,key.substr(4,50).c_str() );
+   ii =  params.find(string(ukey));
+   if ( ii == params.end() )
+     return false;
+
+   ParamInfo *par_u = (*ii).second;
+    sprintf(ukey,"p%03d%s",V_FIELD,key.substr(4,50).c_str() );
+    ii =  params.find(string(ukey));
+   if ( ii == params.end() )
+     return false;
+   ParamInfo *par_v = (*ii).second;
+
+
+
+   currentHC_ = hcParallel_;
+
+   scaleVelocity(par_w);
+
+   ParamInfo par_uv( par_v->Parameter()
+                   , par_v->Date()
+		   , par_v->Time()
+		   , par_v->Step()
+		   , par_v->ParamName()
+		   );
+   mapValues(par_uv,par_u,par_v);
+
+   int nrLevels = NrLevels(&par_uv);
+
+   double **cp = new double* [ nrLevels ];
+   for (i=0; i < nrLevels; i++)
+     cp[i] = new double [ nrPoints_ ];
+
+   if( modlev_ != 1 )
+     InterpolateVerticala(cp,&par_uv);
+   else
+     InterpolateVerticalb(field,cp,&par_uv,splin);
+
+
+   MvNcVar *ncvar = cdf.addVariable(key,ncDouble,2,
+				    nrLevels,nrPoints_);
+
+   ncvar->addAttribute("MV_VERB","PWIND");
+
+   // Add data for matching
+   AddMetadata(ncvar,key);
+
+   AddLevels(ncvar,&par_uv);
+   SetArea(ncvar);
+
+   if ( logax_ )
+     ncvar->addAttribute("AXIS_TICK_POSITIONING","LOGARITHMIC");
+
+   // Generate a title.
+   sprintf(titlestr,"Cross section of UVW parallel %d %02d step %d %s",
+	   par_v->Date(),par_v->Time(),par_v->Step(),
+	   par_v->ExpVerTitle().c_str() );
+   ncvar->addAttribute("MV_TITLE",titlestr);
+
+   setYValues(ncvar, &par_uv);
+
+   int j;
+   for ( j= 0; j < nrLevels; j++ )
+     {
+       ncvar->setCurrent(0,j);
+       ncvar->put(cp[j],1,1,(long)nrPoints_);
+     }
+
+   // Now for the velocity values.
+   if( modlev_ != 1 )
+     InterpolateVerticala(cp,par_w);
+   else
+     InterpolateVerticalb(field,cp,par_w,splin);
+
+   for ( j= 0; j < nrLevels; j++ )
+     {
+       ncvar->setCurrent(1,j);
+       ncvar->put(cp[j],1,1,(long)nrPoints_);
+     }
+
+   // Delete after use.
+   for ( i=0; i< nrLevels;i++)
+     delete [] cp[i];
+   delete [] cp;
+
+   return true;
+}
+
+
+// Generate data values.
+// Only ever called if modlev_ != 1, ie if we use pressure levels
+// or UKMO model levels
+void ApplicationInfo::InterpolateVerticala(double **cp,ParamInfo *param)
+{
+
+  if ( ! interpolate_ )
+    {
+      FillValues(cp,param);
+      return;
+    }
+
+  int i,kmodel;
+  double lpa,pk;
+  LevelInfo *firstlev, *nextlev;
+
+  for ( int k = 0; k < nrLevels_; k++ )
+    {
+     // Invert Model level data, except for UKMO
+     kmodel = (modlev_ == cML_UKMO_ND) ? k : (nrLevels_)-k-1;
+
+     pk = GetInterpolatedYValue(k);
+
+     if ( findPressure(param->Levels(),pk,firstlev, nextlev) )
+	{
+	  if ( modlev_ )
+	    lpa = ( pk - firstlev->YValue()) /
+	      (nextlev->YValue() - firstlev->YValue());
+	  else
+	    if ( logax_ )
+	      lpa = ( pk - firstlev->YValue()) /
+		(nextlev->YValue() - firstlev->YValue());
+	    else
+	      lpa = log( pk/firstlev->YValue()) /
+		log(nextlev->YValue()/firstlev->YValue());
+
+	  double *xvals = firstlev->XValues();
+	  double *xnext = nextlev->XValues();
+
+	  for (i = 0; i < nrPoints_; i++ )
+	    {
+	      if ( xvals[i] < BIGDOUBLE && xnext[i] < BIGDOUBLE )
+		cp[kmodel][i] = xvals[i] + ( xnext[i] - xvals[i]) *lpa; //replace k with kmodel
+	      else
+		cp[kmodel][i] = DONTCARE; // replace k with kmodel
+	    }
+	}
+      else
+	for (i=0;i<nrPoints_;i++)
+	  cp[kmodel][i] = DONTCARE;
+    }
+}
+
+// Generate data values.
+// Only ever called if modlev_ == 1, ie if we use non-UKMO model levels
+void ApplicationInfo::InterpolateVerticalb(MvField &field,double **cp,
+					   ParamInfo *param,double *splin)
+{
+
+  if ( ! interpolate_ )
+    {
+      FillValues(cp,param);
+      return;
+    }
+
+  int i,kmodel;
+  double zdp = ( PresBot_ - PresTop_)/ ( nrLevels_ - 1 );
+  double deltalog,lpa;
+  double *sp = new double[nrPoints_];
+  LevelInfo *firstlev,*nextlev;
+  double  firstval, nextval;
+
+  if ( logax_ )
+    deltalog = (log10(PresBot_) - log10(PresTop_))/(nrLevels_ - 1);
+
+  for (i=0; i < nrPoints_; i++)
+    sp[i] = exp(splin[i]);
+
+  for ( int k = 0; k < nrLevels_; k++ )
+    {
+      double pk = logax_ ? exp((log10(PresTop_) + k * deltalog) *log(10.0)) :
+	PresTop_ + k * zdp;
+
+      // Invert Model level data
+      kmodel = nrLevels_-k-1;
+
+      for ( i =0; i < nrPoints_;i++)
+	{
+	  if ( sp[i] > BIGDOUBLE )
+	  {
+	    cp[kmodel][i] = DONTCARE;
+	    continue;
+	  }
+
+	  if ( findModelPressure(param->Levels(),pk,sp[i],field,
+				 firstlev,nextlev, firstval, nextval) )
+	    {
+	      lpa = logax_ ? (pk - firstval)/(nextval - firstval) :
+		log(pk/firstval)/log(nextval/firstval);
+
+	      cp[kmodel][i] = firstlev->XValues()[i] +
+		( nextlev->XValues()[i] - firstlev->XValues()[i] ) * lpa;
+	    }
+	  else
+	  {
+		cp[kmodel][i] = DONTCARE;
+		//		cp[k][i] = firstlev->XValues()[i];
+		//		cout <<  	cp[k][i] << endl;
+	   }
+	}
+    }
+
+  delete [] sp;
+}
+
+
+bool ApplicationInfo::findPressure(LevelMap &lmap,double  value, LevelInfo *&l1,
+			       LevelInfo *&l2)
+{
+
+  LevelIterator ii = lmap.begin();
+  LevelInfo *tmp1 = (*ii).second, *tmp2;
+
+  ii++;
+
+  for (; ii != lmap.end(); ii++ )
+    {
+      tmp2 = (*ii).second;
+      if ( isWithinRange( tmp1->YValue(), tmp2->YValue(), value ) )
+	{
+	  l1 = tmp1;
+	  l2 = tmp2;
+	  return true;
+	}
+
+      tmp1 = tmp2;
+    }
+
+  return false;
+}
+
+
+bool ApplicationInfo::findModelPressure(LevelMap &lmap,double value,
+					double splin, MvField &field,
+					LevelInfo *&l1, LevelInfo *&l2,
+					double &val1,double &val2)
+{
+  LevelIterator ii = lmap.begin();
+  double tmpval1, tmpval2;
+  LevelInfo *tmpl1, *tmpl2;
+
+  tmpl1 = (*ii).second;
+  ii++;
+  tmpval1 = field.meanML_to_Pressure_bySP(splin,(int)(tmpl1->YValue()));
+
+  for (; ii != lmap.end(); ii++ )
+    {
+      tmpl2 = (*ii).second;
+      tmpval2 = field.meanML_to_Pressure_bySP(splin,(int)(tmpl2->YValue()));
+
+      if ( isWithinRange( tmpval1, tmpval2, value ) )
+	{
+	  l1 = tmpl1; l2 = tmpl2;
+	  val1 = tmpval1; val2 = tmpval2;
+	  return true;
+	}
+
+      tmpl1 = tmpl2;
+      tmpval1 = tmpval2;
+    }
+
+  l1 = tmpl1;
+  return false;
+}
+
+void ApplicationInfo::scaleVelocity(ParamInfo *par)
+{
+
+  LevelMap lmap = par->Levels();
+  LevelIterator ii = lmap.begin();
+
+  double hscale = 21./dist_;
+  double vscale = 12./(PresBot_ - PresTop_);
+
+  if (modlev_ == -1 ) vscale = 12./(100 * 1000);
+
+  double factor = -vscale/hscale;
+  double *values;
+  for ( ; ii  != lmap.end(); ii++ )
+    {
+      values = (*ii).second->XValues();
+
+      for (int i=0; i<nrPoints_; i++)
+	{
+	  if (values[i] < BIGDOUBLE)
+	    values[i] *= factor;
+	  else
+	    values[i] = MAXDOUBLE;
+	}
+    }
+  return;
+}
+
+void ApplicationInfo::setMinMax( ParamMap &params)
+{
+  // Find the min and max pressures if modlev_ == -1
+  if ( modlev_ == -1 || modlev_ == cML_UKMO_ND )
+    {
+
+      double p;
+
+      PresTop_ = 5000;
+      PresBot_ = -5000;
+
+      ParamIterator ii;
+      LevelMap lmap;
+      LevelIterator jj;
+
+      for ( ii = params.begin(); ii != params.end(); ii++ )
+	{
+	  lmap = (*ii).second->Levels();
+	  for ( jj = lmap.begin(); jj != lmap.end();jj++ )
+	    {
+	      p = (*jj).second->YValue();
+	      PresTop_ = MIN(PresTop_,p);
+	      PresBot_ = MAX(PresBot_,p);
+	    }
+	}
+
+      nrLevels_ = (int)( PresBot_ - PresTop_ ) + 1;
+    }
+}
+
+void ApplicationInfo::setYValues(MvNcVar *yvar, ParamInfo *par)
+{
+  int nrY = NrYValues(par);
+  double *yvalues = new double[nrY];
+
+  // Retrieve y values
+  if ( interpolate_ )
+    {
+      if ( modlev_ == -1 )
+	{
+	  yvalues[0] = PresTop_;
+	  yvalues[1] = PresBot_;
+	}
+      else if ( modlev_ == cML_UKMO_ND )
+	{
+	  yvalues[1] = PresTop_;
+	  yvalues[0] = PresBot_;
+	}
+      else
+	{
+	  yvalues[0] = PresTop_/100;
+	  yvalues[1] = PresBot_/100;
+	}
+    }
+  else
+    {
+      LevelMap lmap = par->Levels();
+        int i = 0;   // the index of the first axis value to set
+        int inc = 1; // the amount to increment the axis value index by
+
+        if ( modlev_ == cML_UKMO_ND )  // UK Met Office model levels are 'upside-down'
+	{
+            i = nrY - 1;
+            inc = -1;
+        }
+
+        for ( LevelIterator ii = lmap.begin(); ii != lmap.end(); ii++, i+=inc )
+        {
+	  yvalues[i] = (*ii).second->YValue();
+	  if ( modlev_ == 0 ) yvalues[i] /= 100;
+	}
+    }
+
+  // Insert Y values as an attribute of the input variable
+  yvar->addAttribute("_Y_VALUES",nrY,yvalues);
+
+  // Insert Y values as a new variable
+/*
+  vector<long> dimsize(1,nrY);
+  vector<string> vname(1,"levels");
+  cdf.setCurrent(2);
+  MvNcVar *ncvar = cdf.addVariable("levels",ncDouble,dimsize,vname);
+*/
+  delete [] yvalues;
+}
+
+void ApplicationInfo::AddMetadata(MvNcVar *var, const string &key)
+{
+  // Split the string back into individual components.
+  var->addAttribute("PARAM",key.substr(1,3).c_str());
+  var->addAttribute("DATE",key.substr(4,8).c_str());
+  var->addAttribute("TIME",key.substr(12,4).c_str());
+  var->addAttribute("STEP",key.substr(16,4).c_str());
+  var->addAttribute("EXPVER",key.substr(20,4).c_str());
+  var->addAttribute("MODE",stringModes[mode_]);
+  var->addAttribute("LEVTYPE",(modlev_) ? "ML" : "PL");
+}
+
+void ApplicationInfo::AddLevels(MvNcVar *var, ParamInfo *par)
+{
+  if ( ! interpolate_ )
+    {
+      // Get levelist
+      int nrY = NrYValues(par);
+      double *yvalues = new double[nrY];
+      LevelMap lmap = par->Levels();
+      int i = 0;
+
+      for ( LevelIterator ii = lmap.begin(); ii != lmap.end(); ii++, i++ )
+	{
+	  yvalues[i] = (*ii).second->YValue();
+	  if ( modlev_ == 0 ) yvalues[i] /= 100;
+	}
+
+      // Insert levelist as a netCDF attributes
+      var->addAttribute("LEVELIST",nrY,yvalues);
+
+      delete [] yvalues;
+    }
+}
+
+void ApplicationInfo::FillValues(double **cp, ParamInfo *par )
+{
+  LevelMap lmap = par->Levels();
+  LevelIterator ii;
+  int nrY = NrYValues(par);
+  int k = nrY - 1;      // the index of the first level to set
+  int kinc = -1;   // the amount to increment the level index by
+
+  if ( modlev_ == cML_UKMO_ND )  // UK Met Office model levels are 'upside-down'
+  {
+    k = 0;
+    kinc = 1;
+  }
+
+  for (ii = lmap.begin(); ii != lmap.end(); ii++, k+=kinc )
+    {
+      LevelInfo *lInfo = (*ii).second;
+      for (int i = 0; i < nrPoints_; i++ )
+	cp[k][i] = lInfo->XValues()[i];
+    }
+}
+
+void ApplicationInfo::SetArea(MvNcVar *var)
+{
+  double area[4];
+  area[1] = x1_; area[3] = x2_;
+  area[0] = y1_;area[2] = y2_;
+
+  var->addAttribute("AREA",4,area);
+
+  double grid[2];
+  grid[0] = gridEW_; grid[1] = gridNS_;
+  var->addAttribute("GRID",2,grid);
+}
+
+
+double* ApplicationInfo::GetYValues(ParamInfo *param)
+{
+ 	// Interpolation
+	if ( interpolate_ )
+	{
+		double *yvals = new double[nrLevels_];
+            	int i = nrLevels_ - 1; // should not do this
+
+		// Retrieve y values
+ 		for ( int k = 0; k < nrLevels_; k++ )
+		{
+			yvals[i] = GetInterpolatedYValue(k);
+			if ( modlev_ == 0 || haveLNSP() ) yvals[i] /= 100;
+			i--;
+		}
+
+		return yvals;
+	}
+
+	// No interpolation
+	int nrY = NrYValues(param);
+	double *yvals = new double[nrY];
+	LevelMap lmap = param->Levels();
+        int i = nrY - 1;   // the index of the first axis value to set
+        int inc = -1; // the amount to increment the axis value index by
+	if ( modlev_ == cML_UKMO_ND )  // UK Met Office model levels are 'upside-down'
+	{
+            	i = 0;
+            	inc = 1;
+        }
+
+	for ( LevelIterator ii = lmap.begin(); ii != lmap.end(); ii++, i+=inc )
+	{
+		yvals[i] = (*ii).second->YValue();
+		if ( modlev_ == 0 ) yvals[i] /= 100;
+	}
+
+	return yvals;
+}
+
+double ApplicationInfo::GetInterpolatedYValue(int index)
+{
+	double pk;
+
+	// Interpolation
+	if ( logax_ )
+	{
+		double deltalog = (log10(PresBot_) - log10(PresTop_))/(nrLevels_ - 1);
+		pk = exp((log10(PresTop_) + (double)index*deltalog)*log(10.));
+	}
+	else
+	{
+		double zdp = ( PresBot_ - PresTop_)/ ( nrLevels_ - 1 );
+		pk = modlev_ == cML_UKMO_ND ? PresTop_ + index : PresTop_+ index * zdp;
+	}
+
+	return pk;
+}
+
+bool ApplicationInfo::GenerateNetcdfAxesVariables(ParamMap &params, MvNetCDF &cdf, const string& key)
+{
+	// Generate the netCDf axes variables, if they do not exist yet
+	// IMPORTANT: It assumes that all field parameters have the same
+	// levels. This needs to be tested somewhere else in the code.
+
+	// Find parameter map
+	ParamIterator ii = params.find(key);
+	if ( ii == params.end() )
+		return false;
+
+	ParamInfo *par = (*ii).second;
+
+	// Create Levels variable
+	int nrLevels = NrLevels(par);
+	vector<long> dimsize1(1,nrLevels);
+	vector<string> vname1(1,"levels");
+	MvNcVar *ncvar = cdf.addVariable("levels",ncDouble,dimsize1,vname1);
+	double* lev = GetYValues(par);
+	ncvar->put(lev,(long)nrLevels);
+	delete []lev;
+
+	// Create Longitude variable
+	dimsize1[0] = nrPoints_;
+	vname1[0]   = "longitude";
+//  MvNcVar *nclon = cdf.addVariable("longitude",ncDouble,dimsize1,vname1);
+	ncvar = cdf.addVariable("longitude",ncDouble,dimsize1,vname1);
+	double *lon = new double [nrPoints_];
+	double *lat = new double [nrPoints_];
+	this->setLine(lon,lat);
+	ncvar->put(lon,(long)nrPoints_);
+	delete []lon;
+
+	// Create Latitude variable
+	vname1[0] = "latitude";
+	ncvar = cdf.addVariable("latitude",ncDouble,dimsize1,vname1);
+	ncvar->put(lat,(long)nrPoints_);
+	delete []lat;
+
+	return true;
+}
diff --git a/src/XSection/MvXsectFrame.h b/src/XSection/MvXsectFrame.h
new file mode 100644
index 0000000..ab536c8
--- /dev/null
+++ b/src/XSection/MvXsectFrame.h
@@ -0,0 +1,270 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// -*-C++-*-
+// Header file for Xsect application. This is really 3 applications : Xsection,
+// Average and Vertical Profile, depending on which request it receives.
+
+
+#ifndef MVXSECTFRAME_H
+#define MVXSECTFRAME_H
+
+#include <math.h>
+
+#include <string.h>
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#include "Metview.h"
+#include "MvNetCDF.h"
+
+//const double CDR = 0.017453293;
+const double MAXDOUBLE = 3.4E37;
+const double BIGDOUBLE = 3.4E35;
+const double DONTCARE =	1.0E22;
+
+//-- Q&D trick: still use global vars
+//-- but let them be non-const!
+#ifdef INITIALISE_HERE
+ int	U_FIELD = 131;
+ int	V_FIELD = 132;
+ int	W_FIELD = 135;
+ int	LnPress = 152;
+#else
+ extern int	U_FIELD;
+ extern int	V_FIELD;
+ extern int	W_FIELD;
+ extern int	LnPress;
+#endif
+
+// Application mode.
+enum AppMode { AVERAGE_NS,AVERAGE_EW,XSECT,VP_POINT,VP_GRIDPOINT,VP_AREA,VP_AREA2 };
+
+// Which application is running.
+enum {AppAverage, AppXsect, AppVertprof };
+
+// Wind values
+enum {PERPENDICULAR=1,PARALLEL, INTENSITY };
+
+// Holds info about the values for 1 level.
+class LevelInfo
+{
+public:
+
+  double* XValues() { return xvalues_; }
+  double   YValue() { return yvalue_; }
+
+private:
+  friend class ParamInfo;
+
+  void UpdateLevel(double lev, int modlev)
+    { yvalue_ = modlev ? lev : lev * 100; }
+
+  LevelInfo(double lev, int modlev) : xvalues_(0)
+    { yvalue_ = modlev ? lev : lev * 100; }
+
+  LevelInfo() : xvalues_(0),yvalue_(DONTCARE) {}
+
+  double *xvalues_,yvalue_;
+};
+
+// Do a numeric comparison for the level map, instead
+// of the normal alphabetic one.
+class LevelCompare
+{
+public:
+  bool operator() ( const string& s1,const string& s2 ) const
+    {
+      return ( atof(s1.c_str() ) < atof(s2.c_str() ) );
+    }
+};
+typedef map<string,LevelInfo*, LevelCompare > LevelMap;
+typedef LevelMap::iterator LevelIterator;
+
+
+// Info about a parameter at one date, time and step.
+// Contains  a LevelMap with info about the levels.
+class ParamInfo
+{
+public:
+  ParamInfo(): param_(0),date_(0),step_(0),time_(0) { }
+  ParamInfo(int i1,int i2,int i3,int i4, string pn) :
+    param_(i1),date_(i2), step_(i4),time_(i3),paramName_(pn)
+	    { }
+
+  ~ParamInfo();
+
+  int Date() { return date_;}
+  int Time() { return time_;}
+  int Step() { return step_;}
+  int Parameter()  { return param_; }
+  string ParamName() { return paramName_; }
+  const char *ExpVer() { return expver_.c_str(); }
+  string ExpVerTitle();
+  void ExpVer(const char *xx) { expver_ = xx; }
+  void Level(double*,string, int,int);
+  LevelMap& Levels() { return levels_; }
+
+  void AddLevel(string lev)
+    {
+      if ( levels_.find(lev) == levels_.end() )
+        {
+	      //levels_.insert(pair<string,LevelInfo*>(lev,new LevelInfo));
+	      levels_[ lev ] = new LevelInfo;
+        }
+    }
+  void UpdateLevels(int modlev);
+
+  int NrLevels() { return levels_.size(); }
+  void Print() {
+    printf("P: %d %d %d %d \n",param_,date_,step_,time_);
+  };
+
+  friend int operator<(const ParamInfo &p1, const ParamInfo &p2)
+    {
+      return ( p1.param_ < p2.param_ || p1.date_ < p2.date_
+	       || p1.time_ < p2.time_ || p1.step_ < p2.step_ );
+    }
+
+private:
+  int param_, date_, step_, time_;
+  string paramName_;
+  string expver_;
+  LevelMap levels_;
+
+};
+
+typedef map<string,ParamInfo * > ParamMap;
+typedef ParamMap::iterator ParamIterator;
+typedef pair<ParamIterator,bool> ParamInsertPair;
+typedef pair<const string,ParamInfo*> ParamPair;
+
+
+//------------------------------ General info for application.
+
+class ApplicationInfo
+{
+public:
+  ApplicationInfo() :
+    mode_(XSECT),logax_(false),
+    North_(0),South_(0),East_(0),West_(0),
+    x1_(0), x2_(0), y1_(0), y2_(0),
+    gridNS_(0), gridEW_(0),ancos_(0), ansin_(0),
+    dist_(0), PresTop_(0),PresBot_(0),
+    nrPoints_(0),nrLevels_(0),modlev_(0),
+    hcNumber_(0),hcPerpendicular_(0),hcParallel_(0),
+    hcIntensity_(0),currentHC_(0),
+    foundUV_(false), foundW_(false), interpolate_(true),
+    viaPole_(false), haveLNSP_(false)
+  {}
+
+  void LevelType(int ml) { modlev_ = ml; }
+  void AxisType(bool logaxis) { logax_ = logaxis; }
+  void setLine(double *lon, double *lat);
+
+  int EvaluateBlot(double, double, double, double,
+		   double, double );
+
+  void setGlobe(double N, double S,double E, double W)
+    {
+      if ( N == 0 && S == 0 && E == 0 && W == 0 )
+	{
+	  N = 90; S = -90; E = 180; W = -180;
+	}
+
+      North_ = N; South_ = S; East_ = E; West_ = W;
+    }
+
+  void   Grid( double ns, double ew );
+
+  double GridNS() { return gridNS_; }
+  double GridEW() { return gridEW_; }
+
+  void Mode(AppMode mode) { mode_ = mode; }
+  AppMode Mode() { return mode_; }
+
+  void setHorComp(int no,int perp,int par, int intens,bool foundUV,bool foundW)
+    {
+      hcNumber_ = no; hcPerpendicular_ = perp; hcParallel_ = par;
+      hcIntensity_ = intens;
+      foundUV_ = foundUV; foundW_ = foundW;
+    }
+
+  void UpdateLevels(ParamMap &, int);
+  void setMinMax(ParamMap &);
+  void setYValues(MvNcVar*, ParamInfo *);
+
+  void mapValues(ParamInfo&, ParamInfo *, ParamInfo *);
+  void scaleVelocity(ParamInfo *);
+  void InterpolateVerticala(double **cp,ParamInfo *par);
+  void InterpolateVerticalb(MvField &,double **cp,ParamInfo *par,double *splin);
+
+  bool findModelPressure(LevelMap &lmap,double value,
+			 double splin, MvField &field,
+			 LevelInfo *&l1, LevelInfo *&l2,
+			 double &val1,double &val2);
+
+  bool findPressure(LevelMap &lmap,double value, LevelInfo *&l1, LevelInfo *&l2);
+
+  // The following functions write the data to netcdf file.
+  bool generateData(ParamMap &params, MvNetCDF &cdf,MvField&,
+		    const  string&, double *, double *, double *);
+  bool generateXsectData(ParamMap &params,MvNetCDF &cdf, const string&,
+			 MvField&, double *);
+  bool generateAverageData(ParamMap &params,MvNetCDF &cdf,
+			   const string&,MvField&, double *);
+  bool generateLnSP(MvNetCDF &cdf, const string&, double *);
+  bool curveValues(ParamMap &params,MvNetCDF &cdf, const string&,
+		   MvField&, double *, double *, double *);
+
+  bool contourValues(ParamMap &params,MvNetCDF &cdf, const string&,
+		     MvField&, double *);
+  bool windValues(ParamMap &params,MvNetCDF &cdf, const string&,
+		     MvField&, double *);
+  bool velocityValues(ParamMap &params,MvNetCDF &cdf, const string&,
+		     MvField&, double *);
+
+
+  bool Interpolate() { return interpolate_; }
+  void Interpolate(bool xx) { interpolate_ = xx; }
+
+  int NrLevels(ParamInfo *par ) { return interpolate_ ? nrLevels_ : par->NrLevels(); }
+  int NrYValues(ParamInfo *par ) { return interpolate_ ? 2 : par->NrLevels(); }
+  void FillValues(double **cp, ParamInfo *par );
+  bool viaPole()  {return viaPole_;}
+  bool haveLNSP() {return haveLNSP_;}
+  void haveLNSP(bool have) {haveLNSP_ = have;}
+
+  bool GenerateNetcdfAxesVariables(ParamMap&, MvNetCDF&, const string&);
+
+private:
+
+  void AddMetadata(MvNcVar *, const string&);
+  void AddLevels(MvNcVar*, ParamInfo *);
+  void SetArea(MvNcVar*);
+  double GetInterpolatedYValue(int);
+  double* GetYValues(ParamInfo*);
+
+  AppMode mode_;
+  bool logax_;
+
+  double North_,South_,East_,West_;
+  double x1_, x2_, y1_, y2_;
+  double gridNS_, gridEW_;
+  double ancos_, ansin_,dist_;
+  double PresTop_,PresBot_;
+
+  int nrPoints_,nrLevels_,modlev_;
+  int hcNumber_,hcPerpendicular_,hcParallel_,hcIntensity_,currentHC_;
+  bool foundUV_, foundW_, interpolate_;
+  bool viaPole_;
+  bool haveLNSP_;
+};
+
+#endif
diff --git a/src/XSection/ObjectSpec.XSection b/src/XSection/ObjectSpec.XSection
new file mode 100644
index 0000000..8359326
--- /dev/null
+++ b/src/XSection/ObjectSpec.XSection
@@ -0,0 +1,63 @@
+object,
+    class           = PM_XSECT,
+    icon_box        = To be organised,
+    can_be_created  = True,
+    definition_file = '$METVIEW_DIR_SHARE/etc/XSectionDef',
+    rules_file      = '$METVIEW_DIR_SHARE/etc/XSectionRules',
+    default_name    = Cross Section Data,
+    help_page       = Cross_Section_Data,
+    type            = Data,
+    expand          = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+    macro           = cross_sect,
+    editor_type     = SimpleEditor,
+    pixmap          = '$METVIEW_DIR_SHARE/icons/XSECTION.icon'
+
+state,
+    class        = PM_XSECT,
+    output_class = NETCDF,
+    service      = XSection
+
+service,
+    timeout  = $timeout,
+    name     = 'XSection',
+    fullname = Cross Section,
+    cmd      = "$metview_command $METVIEW_BIN/XSection"
+
+object,
+    class           = PM_AVERAGE,
+    icon_box        = To be organised,
+    can_be_created  = True,
+    definition_file = '$METVIEW_DIR_SHARE/etc/XAverageDef',
+    rules_file      = '$METVIEW_DIR_SHARE/etc/XAverageRules',
+    default_name    = Average Data,
+    help_page       = Average_Data,
+    type            = Data,
+    expand          = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+    macro           = xs_average,
+    editor_type     = SimpleEditor,
+    pixmap          = '$METVIEW_DIR_SHARE/icons/XAVERAGE.icon'
+
+state,
+    class        = PM_AVERAGE,
+    output_class = NETCDF,
+    service      = XSection
+
+object,
+    class           = PM_VPROF,
+    icon_box        = To be organised,
+    can_be_created  = True,
+    definition_file = '$METVIEW_DIR_SHARE/etc/VProfileDef',
+    rules_file      = '$METVIEW_DIR_SHARE/etc/VProfileRules',
+    default_name    = Vertical Profile Data,
+    help_page       = Vertical_Profile_Data,
+    type            = Data,
+    expand          = 75, # EXPAND_DATE|EXPAND_TIME|EXPAND_LISTS|EXPAND_LAST_NAME
+    macro           = vert_prof,
+    editor_type     = SimpleEditor,
+    pixmap          = '$METVIEW_DIR_SHARE/icons/VPROFILE.icon'
+
+state,
+    class        = PM_VPROF,
+    output_class = NETCDF,
+    service      = XSection
+
diff --git a/src/XSection/VPROFILE.xpm b/src/XSection/VPROFILE.xpm
new file mode 100644
index 0000000..fde1380
--- /dev/null
+++ b/src/XSection/VPROFILE.xpm
@@ -0,0 +1,45 @@
+/* XPM */
+static char * VPROF_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" 	c white",
+".	c magenta",
+"X	c #777777",
+"o	c #CCCCFF",
+"O	c black",
+"+	c #00007F7FFFFF",
+"@	c #D9D9B7B77777",
+/* pixels */
+"         .                      ",
+"          .                     ",
+"           .                    ",
+"            ..                  ",
+"              .                 ",
+"              ..                ",
+"               ...              ",
+"         XXXXXXXX.XXXXX         ",
+"     XXXXoooooooo.oooooXXXX     ",
+"  XXXoooooooooooo.oooooooooXXX  ",
+" Xooooooooooooooo.ooooooooooooX ",
+"Xoooooooooooooooo.oooooooooooooX",
+"oooooooooXXXXXX...XXXXXooooooooo",
+"oooooXXXXooooo..oooooooXXXXooooo",
+"ooXXXoooooo....ooooooooooooXXXoo",
+"oXooooooooo.ooooooooooooooooooXo",
+"Xoooooooooo.oooooooooooooooooooX",
+"oooooooooXX.XXXXXXXXXXXooooooooo",
+"oooooXXXXoo..ooooooooooXXXXooooo",
+"ooXXXooooooo...ooooooooooooXXXoo",
+"oXooooooooooooo....oooooooooooXo",
+"Xooooooooooooooooo...ooooooooooX",
+"oooooooooXXXXXXXXXXX...ooooooooo",
+"oooooXXXXooooooooooooo..XXXooooo",
+"ooXXXoooooooooooooooooo..ooXXXoo",
+"oXoooooooooooooooooooooo.oooooXo",
+"Xooooooooooooooooooooooo.ooooooX",
+"oooooooooOOOOOOOOOOOOOOo.ooooooo",
+"oooooOOOO++++++@@@@@@@@OOOOOoooo",
+"ooOOO+++++++++@@@@@@@@@@@@@OOOoo",
+"oO++++++++++@@@@@@@@@@@@@@@@@@Oo",
+"O++++++++++@@@@@@@@@@@@@@@@@@@@O"};
diff --git a/src/XSection/VProfileDef b/src/XSection/VProfileDef
new file mode 100644
index 0000000..0d9fc47
--- /dev/null
+++ b/src/XSection/VProfileDef
@@ -0,0 +1,66 @@
+PM_VPROF; Metview; Specific Application
+{
+    DATA
+        [
+            interface       = icon,
+            class           = GRIB,
+            exclusive       = false,
+            help            = help_data,
+            help_directory  = '/System/Defaults',
+            help_name       = Data for Profile,
+            help_class      = RETRIEVE,
+            help_definition = ( RETRIEVE, TYPE = FC, LEVTYPE = PL,
+                                PARAM = T, DATE = '-1',
+                                LEVELIST = 1000/850/700/500/400/300,
+                                STEP = 12, GRID = 1.5/1.5 ) 
+         ]
+    {
+        @
+    }
+
+    INPUT_MODE
+    {
+        POINT             ; POINT
+        NEAREST_GRIDPOINT ; GPOINT
+        AREA              ; AREA
+        AREA_2            ; AREA2
+    } = POINT
+
+    POINT
+        [
+            help         = help_input,
+            input_type   = point,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 0./0.
+
+    AREA
+        [
+            help         = help_input,
+            input_type   = area,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 30./-30./-30./30.
+
+    BOTTOM_PRESSURE
+    {
+        *
+    } = 1015.0
+
+    TOP_PRESSURE
+    {
+        *
+    } = 10.0
+
+    PRESSURE_LEVEL_AXIS
+    {
+        LINEAR
+        LOG
+    } = LINEAR
+}
diff --git a/src/XSection/VProfileRules b/src/XSection/VProfileRules
new file mode 100644
index 0000000..0a1d489
--- /dev/null
+++ b/src/XSection/VProfileRules
@@ -0,0 +1,8 @@
+%if INPUT_MODE = POINT
+%then
+%unset AREA
+
+%if INPUT_MODE = AREA
+%then
+%unset POINT
+
diff --git a/src/XSection/XAVERAGE.xpm b/src/XSection/XAVERAGE.xpm
new file mode 100644
index 0000000..8ad63af
--- /dev/null
+++ b/src/XSection/XAVERAGE.xpm
@@ -0,0 +1,45 @@
+/* XPM */
+static char * AVERAGE_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" 	c white",
+".	c #777777",
+"X	c #CCCCFF",
+"o	c magenta",
+"O	c black",
+"+	c #00007F7FFFFF",
+"@	c #D9D9B7B77777",
+/* pixels */
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"         ..............         ",
+"     ....XXXXXXXXXXXXXX....     ",
+"  ...XXXXXXXXXXXXXXXXXXXXXX...  ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXoXXXXXXXXoXXXXXXXXXX.",
+"XXXXXXXXX..oo......oo..XXXXXXXXX",
+"XXXXX....XXoooXXXXoooXX....XXXXX",
+"XXoooooooooooooXXooooooooooooo.X",
+"X.XXXXXXXXXoooXXXXoooXXXXXXXXX.X",
+".XXXXXXXXXXooXXXXXXooXXXXXXXXXX.",
+"XXXXXXXXX..o........o..XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXXOOOOOOOOOOOOOOXXXXXXXXX",
+"XXXXXOOOO++++++@@@@@@@@OOOOOXXXX",
+"XXOOO+++++++++@@@@@@@@@@@@@OOOXX",
+"XO++++++++++@@@@@@@@@@@@@@@@@@OX",
+"O++++++++++@@@@@@@@@@@@@@@@@@@@O"};
diff --git a/src/XSection/XAverageDef b/src/XSection/XAverageDef
new file mode 100644
index 0000000..2ff1f5c
--- /dev/null
+++ b/src/XSection/XAverageDef
@@ -0,0 +1,60 @@
+PM_AVERAGE; Metview; Specific Application
+{
+    DATA
+        [ 
+            interface       = icon,
+            class           = GRIB,
+            exclusive       = false,
+            help            = help_data,
+            help_directory  = '/System/Defaults',
+            help_name       = Data for Average,
+            help_class      = RETRIEVE,
+            help_definition = ( RETRIEVE, TYPE = FC, LEVTYPE = PL,
+                                PARAM = T, DATE = '-1',
+                                LEVELIST = 1000/850/700/500/400/300,
+                                STEP = 12, GRID = 1.5/1.5 ) 
+        ]
+    {
+        @
+    }
+
+    AREA
+        [
+            help         = help_input,
+            help_icon    = 'help_area',
+            input_type   = area,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 90./-180./-90./180.
+
+    DIRECTION
+    {
+        NORTH SOUTH	; NS
+        EAST WEST	; EW
+    } = NS
+
+    BOTTOM_PRESSURE
+    {
+        *
+    } = 1015.0
+
+    TOP_PRESSURE
+    {
+        *
+    } = 10.0
+
+    PRESSURE_LEVEL_AXIS
+    {
+        LINEAR
+        LOG
+    } = LINEAR
+
+    INTERPOLATE_VALUES
+    {
+        YES
+        NO
+    } = YES
+}
diff --git a/src/XSection/XAverageRules b/src/XSection/XAverageRules
new file mode 100644
index 0000000..54f7821
--- /dev/null
+++ b/src/XSection/XAverageRules
@@ -0,0 +1,2 @@
+%if INTERPOLATE_VALUES = NO %then
+     %unset PRESSURE_LEVEL_AXIS
\ No newline at end of file
diff --git a/src/XSection/XSECTION.xpm b/src/XSection/XSECTION.xpm
new file mode 100644
index 0000000..48837cb
--- /dev/null
+++ b/src/XSection/XSECTION.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static char * XSECT_icon[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 6 1",
+/* colors */
+" 	c white",
+".	c #777777",
+"X	c #CCCCFF",
+"o	c black",
+"O	c #00007F7FFFFF",
+"+	c #D9D9B7B77777",
+/* pixels */
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"         ..............         ",
+"     ....XXXXXXXXXXXXXX....     ",
+"  ...XXXXXXXXXXXXXXXXXXXXXX...  ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXX..............XXXXXXXXX",
+"XXXXX....XXXXXXXXXXXXXX....XXXXX",
+"XX...XXXXXXXXXXXXXXXXXXXXXX...XX",
+"X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
+"XXXXXXXXXooooooooooooooXXXXXXXXX",
+"XXXXXooooOOOOOO++++++++oooooXXXX",
+"XXoooOOOOOOOOO+++++++++++++oooXX",
+"XoOOOOOOOOOO++++++++++++++++++oX",
+"oOOOOOOOOOO++++++++++++++++++++o"};
diff --git a/src/XSection/XSectionDef b/src/XSection/XSectionDef
new file mode 100644
index 0000000..6fad03f
--- /dev/null
+++ b/src/XSection/XSectionDef
@@ -0,0 +1,97 @@
+PM_XSECT; Metview; Specific Application
+{
+    DATA
+        [
+            interface       = icon,
+            class           = GRIB,
+            exclusive       = false,
+            help            = help_data,
+            help_directory  = '/System/Defaults',
+            help_name       = Data for XSection,
+            help_class      = RETRIEVE,
+            help_definition = ( RETRIEVE, TYPE = FC, LEVTYPE = PL,
+                                PARAM = T, DATE = '-1',
+                                LEVELIST = 1000/850/700/500/400/300,
+                                STEP = 12, GRID = 1.5/1.5 ) 
+        ]
+    { @ }
+
+    LINE
+        [
+            help         = help_input,
+            help_icon    = 'help_line',
+            input_type   = line,
+            input_window = '/System/Defaults/Input Window'
+        ]
+    {
+        *
+        /
+    } = 0./-180./0./180.
+
+    PRESSURE_LEVEL_AXIS
+    {
+        LINEAR
+        LOG
+    } = LINEAR
+
+    BOTTOM_PRESSURE
+    {
+        *
+    } = 1015.0
+
+    TOP_PRESSURE
+    {
+        *
+    } = 10.0
+
+    WIND_PARALLEL
+    {
+        ON
+        OFF
+    } = ON
+
+    WIND_PERPENDICULAR
+    {
+        ON
+        OFF
+    } = OFF
+
+    WIND_INTENSITY
+    {
+        ON
+        OFF
+    } = OFF
+
+    WIND_HORIZONTAL_COMPONENT [ visible = false ]
+    {
+        PERPENDICULAR   ; PER
+        PARALLEL        ; PAR
+        INTENSITY       ; INT
+    } = PAR
+
+    INTERPOLATE_VALUES
+    {
+        YES
+        NO
+    } = YES
+
+    LNSP_PARAM
+    {
+        *
+    } = 152
+
+    U_WIND_PARAM
+    {
+        *
+    } = 131
+
+    V_WIND_PARAM
+    {
+        *
+    } = 132
+
+    W_WIND_PARAM
+    {
+        *
+    } = 135
+}
diff --git a/src/XSection/XSectionRules b/src/XSection/XSectionRules
new file mode 100644
index 0000000..6c8eddc
--- /dev/null
+++ b/src/XSection/XSectionRules
@@ -0,0 +1,8 @@
+%if WIND_HORIZONTAL_COMPONENT = PER %then
+	%set WIND_PERPENDICULAR = ON
+
+%if WIND_HORIZONTAL_COMPONENT = INT %then
+	%set WIND_INTENSITY = ON
+
+%if INTERPOLATE_VALUES = NO %then
+     %unset PRESSURE_LEVEL_AXIS
diff --git a/src/XSection/Xsect.cc b/src/XSection/Xsect.cc
new file mode 100644
index 0000000..e386b91
--- /dev/null
+++ b/src/XSection/Xsect.cc
@@ -0,0 +1,819 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <inc_iostream.h>
+
+#define  INITIALISE_HERE
+#include "MvXsectFrame.h"
+
+
+/**************
+  Application for Xsection, Average and Vertical Profile.
+  It takes a GRIB file as input (in addition to the values
+  given by the user),  and produces an NetCDF
+  file as output. There is no metadata on output request,
+  only the path to NetCDF file.
+
+  First the GRIB while is read, and info about all
+  parameters and level are stored. Then several
+  flags is set, based on the data and the input
+  request, to determine how the application should
+  run.
+
+  The file is rewound, and sorted by param, date,
+  time, step and expver. All fields with the
+  same values for the sorting parameters are
+  one plot. If any of these values change, all
+  data are written out as netcdf variables with
+  names put together from the sorting values.
+
+***************/
+
+
+
+class Xsect : public MvService {
+protected:
+  int			mode;
+  string                view_;
+  Xsect(const char* kw) : MvService(kw)	{};
+
+public:
+
+  void serve(MvRequest&,MvRequest&);
+
+  bool fillValues(MvField &,double*,double,double,double,double,
+		  AppMode,double*,double*,int);
+
+  void generateKey(string&,int,int,int,int,const char *);
+};
+
+
+class Vprofile	:	public Xsect {
+public:
+  Vprofile()	:	Xsect("PM_VPROF")
+  { mode = AppVertprof; view_ = "MVERTPROFVIEW";  }
+};
+
+class CrossS	:	public Xsect {
+public:
+  CrossS()	:	Xsect("PM_XSECT")
+  {mode = AppXsect; view_ = "MXSECTVIEW";}
+};
+
+class Average	:	public Xsect {
+public:
+  Average()	:	 Xsect("PM_AVERAGE")
+ {  mode = AppAverage;  view_ = "MAVERAGEVIEW"; }
+};
+
+
+// different: returns true if d1 and d2 are larger than e apart
+
+inline static bool different (double d1, double d2, double e)
+{
+    return (fabs(d1 - d2) > e);
+}
+
+void Xsect::serve(MvRequest& in,MvRequest& out)
+{
+	cout << "request IN" << endl;
+	in.print();
+
+	const double epsilon = 0.0015;  // difference allowed in field coordinates
+	MvField   field;
+	MvRequest grib;
+	int i;
+
+	in.getValue(grib,"DATA");
+	int nn = in.countValues("DATA");
+	if ( !nn ) {
+		setError(1, "No Data files specified...");
+		return;
+	}
+
+	MvFieldSet		fs(grib);
+	MvFieldSetIterator	iter(fs);
+
+	// Normal interpolation of levels unless INTERPOLATE_VALUES = NO
+	bool interpolate = true;
+	if ( (const char*)in("INTERPOLATE_VALUES") &&
+		strcmp(in("INTERPOLATE_VALUES"),"NO") == 0 )
+	interpolate = false;
+
+
+	double pBottom = in("BOTTOM_PRESSURE"), pTop = in("TOP_PRESSURE");\
+
+	bool logax = false;
+	AppMode appMode = XSECT;
+	double		Y1,Y2,X1,X2;
+	Y1 = Y2 = X1 = X2 = 0;
+
+	if ( mode == AppVertprof)
+	{
+		// Vertical profile
+		if( strcmp(in("INPUT_MODE"),"AREA") == 0 || strcmp(in("INPUT_MODE"),"AREA2") == 0 )
+		{
+			appMode = strcmp(in("INPUT_MODE"),"AREA") == 0 ? VP_AREA : VP_AREA2;
+
+			Y1 = in("AREA",0);
+			X1 = in("AREA",1);
+			Y2 = in("AREA",2);
+			X2 = in("AREA",3);
+
+			if ( X1 > X2 )
+			{
+				double W = X1;
+				X1 = X2;
+				X2 = W;
+			}
+
+			if( Y2 > Y1 )
+			{
+				double W = Y1;
+				Y1 = Y2;
+				Y2 = W;
+			}
+		}
+		else
+		{
+			if( strcmp(in("INPUT_MODE"),"POINT") == 0)
+				appMode = VP_POINT;
+			else
+				appMode = VP_GRIDPOINT;
+
+			Y1 = Y2 = in("POINT",0);
+			X1 = X2 = in("POINT",1);
+		}
+	}
+
+	else if( mode == AppXsect )
+	{
+		// Cross Section
+		Y1 = in("LINE",0);
+		X1 = in("LINE",1);
+		Y2 = in("LINE",2);
+		X2 = in("LINE",3);
+	}
+	else if( mode == AppAverage )
+	{
+		// Average Application
+        if ( strcmp(in("DIRECTION"),"NS") == 0 || strcmp(in("DIRECTION"),"NORTH SOUTH") == 0 )
+            appMode = AVERAGE_NS;
+        else
+            appMode = AVERAGE_EW;
+
+		Y1 = in("AREA",0);
+		X1 = in("AREA",1);
+		Y2 = in("AREA",2);
+		X2 = in("AREA",3);
+
+		if ( X1 > X2 )
+		{
+			double W = X1;
+			X1 = X2;
+			X2 = W;
+		}
+
+		if( Y2 > Y1 )
+		{
+			double W = Y1;
+			Y1 = Y2;
+			Y2 = W;
+		}
+	}
+
+	else
+	{
+		setError(1,"Invalid Operation...");
+		return;
+	}
+
+
+
+	if( pTop == pBottom )
+	{
+		setError(1,"Invalid Pressure Parameters ...");
+		return;
+	}
+
+	if( pTop > pBottom )
+	{
+		setError(0,"Top Pressure > Bottom (swapping)...");
+		double      w;
+		w = pBottom;
+		pBottom = pTop;
+		pTop = w;
+	}
+
+	int hc_perp = 0,hc_parallel = 0,hc_intensity = 0;
+	int hc_number = 0;
+
+	if ( mode == AppXsect )
+	{
+		if( strcmp(in("WIND_PERPENDICULAR"),"ON") == 0 ||
+			strcmp(in("WIND_PERPENDICULAR"),"On") == 0)
+		{
+			hc_number++;
+			hc_perp = PERPENDICULAR;
+		}
+
+		if( strcmp(in("WIND_PARALLEL"),"ON") == 0 ||
+			strcmp(in("WIND_PARALLEL"),"On") == 0)
+		hc_parallel = PARALLEL;
+
+		if( strcmp(in("WIND_INTENSITY"),"ON") == 0 ||
+			strcmp(in("WIND_INTENSITY"),"On") == 0)
+		{
+			hc_number++;
+			hc_intensity = INTENSITY;
+		}
+	}
+
+	bool foundLNSP = false;
+	ParamMap params;
+	ParamIterator paramIter;
+	string keystr;
+
+	bool foundU = false, foundV = false, foundW = false;
+
+	field = iter();
+	double North   = field.north();
+	double South   = field.south();
+	double East    = field.east();
+	double West    = field.west();
+	double Grid_ns = field.gridNS();    //-- may return cValueNotGiven!
+	double Grid_ew = field.gridWE();    //-- may return cValueNotGiven!
+
+	// Check settings.
+	int modlev = 0;
+	boolean isML = field.isModelLevel();
+	boolean isPL = field.isPressureLevel();
+	if( isML && field.levelTypeString() == cML_UKMO_ND_STR )
+		modlev = field.levelType();
+
+	if( ! isML && ! field.isPressureLevel() )
+		marslog(LOG_WARN,"Xsect: Unknown level type!");
+
+	if ( (const char *)in("PRESSURE_LEVEL_AXIS") &&
+		strcmp(in("PRESSURE_LEVEL_AXIS"),"LOG") == 0 )
+	logax = true;
+
+	if( appMode == VP_GRIDPOINT )
+	{
+		MvLocation nearestGridPoint = field.nearestGridPointLocation( MvLocation( Y1, X1 ) );
+		if( nearestGridPoint.ok() )
+		{
+			X1 = nearestGridPoint.x();
+			Y1 = nearestGridPoint.y();
+		}
+	}
+
+	ApplicationInfo appInfo;
+
+	appInfo.setGlobe(North,South,East,West);
+	appInfo.Grid(Grid_ns,Grid_ew);
+	appInfo.Mode(appMode);
+	appInfo.Interpolate(interpolate);
+
+	int npoint = appInfo.EvaluateBlot(X1,X2,Y1,Y2,pTop,pBottom );
+	if( appInfo.viaPole() )
+    	setError( 0, "Xsect line via Pole" );
+
+	if( !npoint )
+	{
+		setError(1,"Invalid Area/Line!");
+		return;
+	}
+
+                                        //-- get wind & lnsp param numbers
+                                        //-- (mostly for non-ECMWF data)
+	if( (const char*)in( "U_WIND_PARAM" ) )
+		U_FIELD = (int)in( "U_WIND_PARAM" );
+
+	if( (const char*)in( "V_WIND_PARAM" ) )
+		V_FIELD = (int)in( "V_WIND_PARAM" );
+
+	if( (const char*)in( "W_WIND_PARAM" ) )
+		W_FIELD = (int)in( "W_WIND_PARAM" );
+
+	if( (const char*)in( "LNSP_PARAM" ) )
+		LnPress = (int)in( "LNSP_PARAM" );
+
+
+	double *lon    = new double [ npoint ];
+	double *lat    = new double [ npoint ];
+	double *xint   = new double [ npoint ];
+	double *splin  = new double [ npoint ];
+
+	for ( i = 0; i < npoint; i++ )
+		splin[i] = 0;
+
+	int idate = 0;
+	int itime = 0;
+	const char* expver = 0;
+
+	// Cross section
+	if( appMode == XSECT )
+		appInfo.setLine(lon,lat);
+
+	iter.rewind();
+
+	while( field =iter() )
+	{
+		MvRequest rq=field.getRequest();
+		i = rq("PARAM");
+		const char *lev = rq("LEVELIST");
+		int istp = rq("STEP");
+		idate  = rq("DATE");
+		itime  = rq("TIME");
+		expver = rq("EXPVER");
+
+		// check that this field's vital statistics match those of the others
+		// - this is important only in the Average application
+
+		if (appMode == AVERAGE_NS || appMode == AVERAGE_EW )
+		{
+			if ( different (field.north  (), North,   epsilon) ||
+				different (field.south  (), South,   epsilon) ||
+				different (field.east   (), East,    epsilon) ||
+				different (field.west   (), West,    epsilon) ||
+				different (field.gridNS (), Grid_ns, epsilon) ||
+				different (field.gridWE (), Grid_ew, epsilon))
+			{
+				setError(1, "Fields must all have the same dimensions and resolution.");
+				return;
+			}
+		}
+
+		if( ! lev || field.levelTypeString() == cML_UKMO_ND_STR )
+		{
+			double dlev = field.level();
+			if( field.levelTypeString() == cML_UKMO_ND_STR )
+				dlev = field.level_L2();
+
+			const int cLVLBUF = 64;
+			static char buf[ cLVLBUF ];
+			ostrstream s( buf, cLVLBUF );
+			s << dlev << ends;
+
+			lev = buf;
+		}
+
+		if ( i == LnPress )
+		{
+			foundLNSP = true;
+			appInfo.haveLNSP(true);
+			fillValues(field,splin,X1,X2,Y1,Y2,appMode,lat,lon,npoint);
+			generateKey(keystr,i,idate,itime,istp,expver);
+			params.insert(ParamPair(keystr,new ParamInfo(i,idate,itime,istp,string(field.magicsName()) )) );
+		}
+		else
+		{
+			if ( i == U_FIELD )
+				foundU = true;
+			if ( i == V_FIELD )
+				foundV = true;
+			if ( i == W_FIELD )
+				foundW = true;
+
+			generateKey(keystr,i,idate,itime,istp,expver);
+
+
+			ParamInsertPair inserted =
+				params.insert(ParamPair(keystr,new ParamInfo(i,idate,itime,istp,string(field.magicsName()) )) );
+
+			ParamInfo *pp = (*(inserted.first)).second;
+			pp->AddLevel(lev);
+		}
+	}
+
+
+	if (params.size() == 0 )
+	{
+		setError(1,"GRIB file invalid, no parameters found.");
+		return;
+	}
+
+	// Rewind iterator.
+	iter.rewind();
+
+
+	bool UV_B = foundU && foundV && hc_number;
+	bool W_B  = foundU && foundV && foundW && hc_parallel;
+	appInfo.setHorComp(hc_number,hc_perp,hc_parallel,hc_intensity,UV_B,W_B);
+
+
+	if ( foundLNSP )
+	{
+		if( modlev != cML_UKMO_ND )
+			modlev = 1;
+	}
+	else
+	{
+		if( modlev == cML_UKMO_ND )
+		{
+			if ( logax )
+				setError(0,"No Log Axis for Model Levels...");
+			logax = false;
+		}
+		else if ( isML )
+		{
+			modlev = -1;
+			if ( logax )
+				setError(0,"No Log Axis for Model Levels...");
+			logax = false;
+		}
+		else if ( isPL )
+		{
+			modlev = 0;
+		}
+		else
+		{
+			setError(1,"Unimplemented level type (not ML/PL)");
+			return;
+		}
+	}
+
+	iter.rewind();
+	appInfo.UpdateLevels(params,modlev);
+	appInfo.LevelType(modlev);
+	appInfo.AxisType(logax);
+	appInfo.setMinMax(params);
+
+	// Initialize netCDF file
+	// Create netCDF file
+	string name(marstmp());
+	MvNetCDF netcdf(name,'w');
+	netcdf.addAttribute("_VIEW",view_.c_str() );
+
+	int istep;
+	string lastKey        = "FIRSTFIELD";
+	string lastNonLNSPKey = "NONE";
+	MvField lastField;
+
+	iter.sort("LEVELIST");
+	iter.sort("STEP");
+	iter.sort("EXPVER");
+	iter.sort("TIME");
+	iter.sort("DATE");
+	iter.sort("PARAM");
+
+	int currentGenerated = 0,lastNrGenerated = -1;
+	double min_level, max_level;
+
+	while( field = iter() )
+	{
+		currentGenerated++;
+		MvRequest	r = field.getRequest();
+		int p = r("PARAM");
+
+		idate = r("DATE");
+		itime = r("TIME");
+		istep = r("STEP");
+		expver= r("EXPVER");
+
+		const char *clev = r("LEVELIST");
+		if( ! clev || field.levelTypeString() == cML_UKMO_ND_STR )
+		{
+			double myLevel = field.level();
+			if( field.levelTypeString() == cML_UKMO_ND_STR )
+				myLevel = field.level_L2();
+
+			const int cLVLBUF = 64;
+			static char buf[ cLVLBUF ];
+			ostrstream s( buf, cLVLBUF );
+			s << myLevel << ends;
+
+			clev = buf;
+		}
+			generateKey(keystr,p,idate,itime,istep,expver);
+
+
+		if ( p != LnPress ) // Already done for lnsp
+		{
+			bool ok = fillValues(field,xint,X1,X2,Y1,Y2,appMode,lat,lon,npoint);
+
+			if ( !ok )
+			{
+				// Error in computing data values. The error message is
+				// already written in the marslog file.
+				// That said, the user should be told, otherwise they stare at
+				// a blank plot!
+				setError(1, "Error when filling the values.");
+				return;
+			}
+
+			if ( ( paramIter = params.find(keystr) ) == params.end() )
+			{
+				setError(0,"Something strange ??");
+				continue;
+			}
+			else
+			{
+				(*paramIter).second->Level(xint,clev,npoint,modlev);
+				(*paramIter).second->ExpVer(expver?expver:"_");
+			}
+		}
+
+		// Write out the data if we have the end of what can be grouped together.
+		if ( lastKey != keystr && lastKey != string("FIRSTFIELD") )
+		{
+			appInfo.generateData(params,netcdf,lastField,lastKey,splin,&min_level,&max_level);
+			lastNrGenerated = currentGenerated;
+
+		}
+
+		lastKey = keystr;
+		lastField = field;
+
+		if (p != LnPress)
+		{
+			lastNonLNSPKey = keystr;
+		}
+
+
+
+	}  // end while
+
+	// Write out the last data
+	if ( lastNrGenerated <=  currentGenerated )
+	{
+		if ( ! appInfo.generateData(params,netcdf,lastField,lastKey,splin,&min_level,&max_level) )
+		{
+			setError(1,"Could not generate NETCDF data");
+			return;
+		}
+	}
+
+	// Close netCDF file
+	netcdf.close();
+
+	// Release memory allocation
+	delete [] xint;
+	delete [] lat;
+	delete [] lon;
+	delete [] splin;
+	// Free memory for parameters
+	for (paramIter = params.begin(); paramIter != params.end(); paramIter++)
+		delete (*paramIter).second;
+
+
+
+
+	// Create output request
+
+	bool verticalProfile = (appMode == VP_POINT || appMode == VP_GRIDPOINT || appMode == VP_AREA || appMode == VP_AREA2);
+
+
+	MvRequest xs("NETCDF");
+	xs("PATH") = name.c_str();
+
+	MvRequest out1("NETCDF_XY_MATRIX");
+	if (verticalProfile)
+		out1.setVerb("NETCDF_XY_POINTS");
+
+	out1("NETCDF_DATA") = xs;
+	out1("NETCDF_Y_VARIABLE") = "levels";
+
+	if (verticalProfile)
+		out1("NETCDF_X_VARIABLE") = "values";
+	else if (appMode == AVERAGE_NS )
+		out1("NETCDF_X_VARIABLE") = "longitude";
+	else if (appMode == XSECT )
+	{
+		if (X1 == X2)  // difficulity when plotting an axis from 0 to 0
+		{
+			out1("NETCDF_X_VARIABLE")           = "latitude";
+			out1("NETCDF_X_AUXILIARY_VARIABLE") = "longitude";  // cross section requires 2 variables to describe the axes
+		}
+		else
+			out1("NETCDF_X_VARIABLE")           = "longitude";
+			out1("NETCDF_X_AUXILIARY_VARIABLE") = "latitude";  // cross section requires 2 variables to describe the axes
+	}
+	else
+		out1("NETCDF_X_VARIABLE") = "latitude";
+
+
+
+	if (!verticalProfile)
+		out1("NETCDF_VALUE_VARIABLE") = lastNonLNSPKey.c_str();
+
+
+//	out1("_VERB") = "NETCDF_MATRIX";
+	if ( (const char *)in("_NAME") )
+		out1("_NAME") = in("_NAME");
+
+
+	// mode-specific options
+
+	const char *xAxisType = "regular";
+	if      (appMode == XSECT)      xAxisType = "geoline";
+	else if (appMode == AVERAGE_NS) xAxisType = "longitude";
+	else if (appMode == AVERAGE_EW) xAxisType = "latitude";
+
+	const char *yAxisType = (logax) ? "logarithmic" : "regular";
+
+	MvRequest viewReq("CARTESIANVIEW");  // Create view subrequest
+	viewReq("X_AXIS_TYPE") = xAxisType;  // AXIS_TYPE *must* be in the request
+	viewReq("X_AUTOMATIC") = "on";
+	//viewReq("Y_AUTOMATIC") = "on";
+	//viewReq("X_MIN_LONGITUDE") = X1;
+	//viewReq("X_MAX_LONGITUDE") = X2;
+	//viewReq("X_MIN_LATITUDE")  = Y1;
+	//viewReq("X_MAX_LATITUDE")  = Y2;
+	viewReq("Y_AXIS_TYPE") = yAxisType;  // AXIS_TYPE *must* be in the request
+
+	if (verticalProfile)  // for xy/points plots, we need to hard-code the y-axis to ensure correct vertical ordering
+	{
+		viewReq("Y_MIN") = max_level;
+		viewReq("Y_MAX") = min_level;
+	}
+	else
+	{
+		viewReq("Y_AUTOMATIC") = "on";  // for matrices (e.g. cross section), the ordering of the y-axis comes from the data
+	}
+		//viewReq("Y_MIN") = pBottom-5;
+		//viewReq("Y_MAX") = pTop;
+
+
+	char *yAxisTitle;
+	if (modlev == 0 || foundLNSP) yAxisTitle = "Pressure (hPa)";
+	else                          yAxisTitle = "Model level";
+
+	MvRequest yAxisReq("MAXIS");
+	yAxisReq("AXIS_ORIENTATION") = "Vertical";
+	yAxisReq("AXIS_TITLE_TEXT")  = yAxisTitle;
+	viewReq("VERTICAL_AXIS")     = yAxisReq;
+
+	//out1("_VIEW") = "CARTESIANVIEW";    // add the view specification to the request
+	//out1("_VIEW_REQUEST") = viewReq;    // add the view specification to the request
+	//out1 = viewReq + out1;    // add the view specification to the request
+
+#if 0 //FAMI03-2012 uPlot should associate the default visdef to the data according to
+      // uPlotTable
+	if (verticalProfile)  // for vertical profile, we want the default visual definition to be Graph Plotting
+	{
+		MvRequest visdefReq("MGRAPH");	// create Graph Plotting subrequest
+		out1 = out1 + visdefReq;		// add it to the request
+	}
+#endif
+
+
+	// add the orography curve visualiser?
+	
+	if (0)
+	{
+	    MvRequest out_orog("NETCDF_XY_POINTS");
+		out_orog("NETCDF_DATA") = xs;
+		out_orog("NETCDF_Y_VARIABLE") = "orography_y1_values";
+
+		if (appMode == XSECT || appMode == AVERAGE_NS )
+			out_orog("NETCDF_X_VARIABLE") = "orography_x_values"; //"longitude";
+		else
+			out_orog("NETCDF_X_VARIABLE") = "orography_x_values"; //"latitude";
+
+		//if (appMode == XSECT )  // cross section requires 2 variables to describe the axes
+		//	out_orog("NETCDF_X_AUXILIARY_VARIABLE") = "latitude";
+
+		MvRequest visdefReq("MGRAPH");	// create Graph Plotting subrequest
+        visdefReq("GRAPH_TYPE") = "AREA";
+        visdefReq("GRAPH_SHADE_COLOUR") = "CYAN";
+		out_orog = out_orog + visdefReq;		// add it to the request
+
+		//MvRequest viewReq2("CARTESIANVIEW");  // Create view subrequest
+		//viewReq2("X_AXIS_TYPE") = xAxisType;   // AXIS_TYPE *must* be in the request
+		//viewReq2("X_AUTOMATIC") = "on";
+		//viewReq2("Y_AXIS_TYPE") = yAxisType;   // AXIS_TYPE *must* be in the request
+		//viewReq2("Y_MIN")       = 1015;
+		//viewReq2("Y_MAX")       = 400;
+		//out2("_VIEW") = "CARTESIANVIEW";    // add the view specification to the request
+		//out2("_VIEW_REQUEST") = viewReq2;    // add the view specification to the request
+
+		//out2 = viewReq2;// + out2;
+
+		out1 = out_orog + out1;
+
+	}
+
+
+
+
+
+	//out = MvRequest("NETCDF_VISUALISER") + out1;
+	out = viewReq + out1;
+
+	cout << "request OUT" << endl;
+	out.print();
+
+	return;
+}
+
+void Xsect::generateKey(string &str,int par,int date,int time, int step,
+			const char *expver)
+{
+	// Do it with good old sprintf PPPYYYYMMDDHHmmSSSSVVVV
+	//char key[40];
+	//sprintf(key,"%03d%08d%-04.4d%04d%04s",par,date,time,step,expver?expver:"_");
+	//str = key;
+
+	// But man page says "behaviour of %04s is undefined...", and indeed:
+	//  - on SGI leading zeros are printed
+	//  - on g++ leading spaces are printed => NetCDF key error!
+	// thus let us try smart new iostreams:
+	// (Should we already start using standard stringstreams?)
+
+	char key[40];
+	ostrstream oss( key, sizeof( key ) );
+	oss << setfill( '0' )
+		<< "p"
+		<< setw( 3 ) << par
+		<< setw( 8 ) << date
+		<< setw( 4 ) << time
+		<< setw( 4 ) << step
+		<< setw( 4 ) << ( expver ? expver : "_" )
+		<< ends;
+
+//  cout << " Key " << key << endl;
+	str = key;
+}
+
+bool Xsect::fillValues(MvField &field,double *vals,double X1,
+		       double X2, double Y1,double Y2,
+		       AppMode appMode, double *lat,
+		       double *lon, int npoint)
+{
+	MvFieldExpander x(field);
+	bool ok = false;
+
+	// Average over area
+	if( appMode == AVERAGE_NS ||
+		appMode == AVERAGE_EW  )
+	{
+		ok = field.averageAlong(vals,X1,Y1,X2,Y2,appMode,npoint);
+
+		//-- averageAlong() does not know array size,
+		//-- if it fails then return array remains empty,
+		//-- thus fill with missing values here!
+		if( ! ok )
+		{
+			for (int i = 0; i < npoint; i++ )
+				vals[i] = DBL_MAX;
+
+			return false;
+
+		}
+	}
+	else if ( appMode == VP_POINT )          //-- Vertical Profile at interpolated point
+	{
+		vals[0] =  field.interpolateAt(X1,Y1);
+	}
+	else if ( appMode == VP_GRIDPOINT )      //-- Vertical Profile at nearest gridpoint
+	{
+		vals[0] =  field.nearestGridpoint(X1,Y1);
+	}
+	else if ( appMode == VP_AREA )           //-- Vertical Profile for area (buggy???)
+	{
+		vals[0] = field.averageAt(X1,Y1,X2,Y2);
+	}
+	else if ( appMode == VP_AREA2 )          //-- Vertical Profile for new area computation method
+	{
+		vals[0] = field.integrate( Y1, X1, Y2, X2 );
+	}
+	else                                     //-- Interpolatate along XS line
+	{
+		for ( int k = 0; k < npoint; k++)
+			vals[k] = field.interpolateAt(lon[k], lat[k]);
+	}
+
+	return true;
+}
+
+
+
+int main(int argc,char **argv)
+{
+	MvApplication theApp(argc,argv);
+	CrossS	c;
+	Average	a;
+	Vprofile v;
+
+
+	// The applications don't try to read or write from pool, this
+	// should not be done with the new PlotMod.
+	//a.addModeService("GRIB", "DATA");
+	a.saveToPool(false);
+
+	//v.addModeService("GRIB", "DATA");
+	v.saveToPool(false);
+
+	//c.addModeService("GRIB", "DATA");
+	c.saveToPool(false);
+
+	theApp.run();
+}
diff --git a/src/images/Makefile.am b/src/images/Makefile.am
new file mode 100644
index 0000000..3503a60
--- /dev/null
+++ b/src/images/Makefile.am
@@ -0,0 +1,78 @@
+
+EXTRA_DIST = add.svg\
+             animation.svg \
+	     antialias.svg \
+	     arrow_bottom.svg \
+             arrow_down.svg \
+             arrow_left.svg \
+             arrow_top.svg \
+             arrow_up.svg \
+             check_consistency.svg \
+	     check_syntax.svg \
+	     clear_left.svg \
+             close.svg \
+	     configure.svg \
+	     connectAnimations.svg \
+	     create_mars.svg \
+	     data_probe.svg \
+             edit.svg \
+	     editcopy.svg \
+	     editcut.svg \
+ 	     editpaste.svg \
+	     exit.svg \
+	     fileInfo.svg \
+	     filesave.svg\
+	     filesaveas.svg \
+	     gunsight.svg \
+	     highlight_scene.svg \
+	     histogram.svg \
+	     insert_licence.svg \
+	     key.svg \
+	     layers.svg \
+	     log.svg \
+	     macro.svg \
+	     magnifier.svg \
+	     magnifier_handler.png \
+	     meta_data.svg \
+	     metview_logo.png \
+	     monitor.svg \
+             overwrite_steps.svg \
+             player_end.svg \
+	     player_next.svg \
+             player_play.svg \
+	     player_prev.svg \
+             player_start.svg \
+	     player_stop.svg \
+             print.svg \
+  	     profile.svg \
+	     profile_add.svg \
+	     profile_delete.svg \
+	     profile_import.svg \
+	     profile_manage.svg \
+	     profile_save.svg \
+	     profile_duplicate.svg \
+	     redo.svg \
+	     reload.svg \
+	     remove.svg \
+	     reset.svg \
+	     run_options.svg \
+             search.svg \
+	     select_all.svg \
+	     select_line.svg \
+	     select_point.svg \
+	     select_rect.svg \
+             show_editable_only.svg \
+	     sidebar.svg \
+	     size_up.svg \
+	     size_down.svg \
+	     stats.svg \
+	     swap_direction.svg \
+             triangle_left.svg \
+             triangle_right.svg \
+	     undo.svg \
+	     wizard.svg \
+	     zoom.svg \
+             zoom_in.svg \
+	     zoom_out.svg \
+	     zoom_stack.svg 
+	    	 
\ No newline at end of file
diff --git a/src/images/Makefile.in b/src/images/Makefile.in
new file mode 100644
index 0000000..7086241
--- /dev/null
+++ b/src/images/Makefile.in
@@ -0,0 +1,522 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/images
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = add.svg\
+             animation.svg \
+	     antialias.svg \
+	     arrow_bottom.svg \
+             arrow_down.svg \
+             arrow_left.svg \
+             arrow_top.svg \
+             arrow_up.svg \
+             check_consistency.svg \
+	     check_syntax.svg \
+	     clear_left.svg \
+             close.svg \
+	     configure.svg \
+	     connectAnimations.svg \
+	     create_mars.svg \
+	     data_probe.svg \
+             edit.svg \
+	     editcopy.svg \
+	     editcut.svg \
+ 	     editpaste.svg \
+	     exit.svg \
+	     fileInfo.svg \
+	     filesave.svg\
+	     filesaveas.svg \
+	     gunsight.svg \
+	     highlight_scene.svg \
+	     histogram.svg \
+	     insert_licence.svg \
+	     key.svg \
+	     layers.svg \
+	     log.svg \
+	     macro.svg \
+	     magnifier.svg \
+	     magnifier_handler.png \
+	     meta_data.svg \
+	     metview_logo.png \
+	     monitor.svg \
+             overwrite_steps.svg \
+             player_end.svg \
+	     player_next.svg \
+             player_play.svg \
+	     player_prev.svg \
+             player_start.svg \
+	     player_stop.svg \
+             print.svg \
+  	     profile.svg \
+	     profile_add.svg \
+	     profile_delete.svg \
+	     profile_import.svg \
+	     profile_manage.svg \
+	     profile_save.svg \
+	     profile_duplicate.svg \
+	     redo.svg \
+	     reload.svg \
+	     remove.svg \
+	     reset.svg \
+	     run_options.svg \
+             search.svg \
+	     select_all.svg \
+	     select_line.svg \
+	     select_point.svg \
+	     select_rect.svg \
+             show_editable_only.svg \
+	     sidebar.svg \
+	     size_up.svg \
+	     size_down.svg \
+	     stats.svg \
+	     swap_direction.svg \
+             triangle_left.svg \
+             triangle_right.svg \
+	     undo.svg \
+	     wizard.svg \
+	     zoom.svg \
+             zoom_in.svg \
+	     zoom_out.svg \
+	     zoom_stack.svg 
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/images/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/images/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/images/add.svg b/src/images/add.svg
new file mode 100644
index 0000000..33d11d5
--- /dev/null
+++ b/src/images/add.svg
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="add.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3608">
+      <stop
+         id="stop3610"
+         offset="0"
+         style="stop-color:#2eaf1d;stop-opacity:1;" />
+      <stop
+         id="stop3612"
+         offset="1"
+         style="stop-color:#91ff44;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3612">
+      <stop
+         style="stop-color:#616161;stop-opacity:1;"
+         offset="0"
+         id="stop3614" />
+      <stop
+         style="stop-color:#383838;stop-opacity:1;"
+         offset="1"
+         id="stop3616" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3601">
+      <stop
+         style="stop-color:#a2a2a2;stop-opacity:1;"
+         offset="0"
+         id="stop3603" />
+      <stop
+         style="stop-color:#343434;stop-opacity:1;"
+         offset="1"
+         id="stop3605" />
+    </linearGradient>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective2825"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2841"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3601"
+       id="linearGradient3607"
+       x1="10.653805"
+       y1="3.7712457"
+       x2="24.085051"
+       y2="29.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.96774194,0,0,-0.96774194,0.58051457,31.158684)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3612"
+       id="linearGradient3618"
+       x1="3"
+       y1="28.806061"
+       x2="29"
+       y2="28.806061"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3612"
+       id="linearGradient3620"
+       gradientUnits="userSpaceOnUse"
+       x1="3"
+       y1="28.806061"
+       x2="29"
+       y2="28.806061"
+       gradientTransform="translate(0,-32.806061)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3608"
+       id="linearGradient3606"
+       x1="24"
+       y1="26"
+       x2="7"
+       y2="8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0.80606061,-0.19393939)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="-8.2472301"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1524"
+     inkscape:window-height="855"
+     inkscape:window-x="227"
+     inkscape:window-y="134"
+     inkscape:window-maximized="0"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title></dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="plus"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3606);fill-opacity:1;stroke:#367425;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 12.806061,2.8060606 7,0 0,10.0000004 10,0 0,7 -10,0 0,10 -7,0 0,-10 -10.0000004,0 0,-7 10.0000004,0 0,-10.0000004 z"
+       id="path2826"
+       sodipodi:nodetypes="ccccccccccccc" />
+  </g>
+</svg>
diff --git a/src/images/animation.svg b/src/images/animation.svg
new file mode 100644
index 0000000..a9c9292
--- /dev/null
+++ b/src/images/animation.svg
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32px"
+   height="32px"
+   id="svg2160"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="animation.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/U_animation_control_24.png"
+   inkscape:export-xdpi="67.5"
+   inkscape:export-ydpi="67.5"
+   version="1.1">
+  <defs
+     id="defs2162">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3307">
+      <stop
+         style="stop-color:#1a52af;stop-opacity:1"
+         offset="0"
+         id="stop3309" />
+      <stop
+         style="stop-color:#63acb6;stop-opacity:0.5529412"
+         offset="1"
+         id="stop3311" />
+    </linearGradient>
+    <filter
+       inkscape:collect="always"
+       x="-0.20994624"
+       width="1.4198925"
+       y="-0.2159447"
+       height="1.4318894"
+       id="filter3288">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.56246638"
+         id="feGaussianBlur3290" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3307"
+       id="linearGradient3313"
+       x1="23.72184"
+       y1="29.276804"
+       x2="9.0845423"
+       y2="4.4139843"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       inkscape:collect="always"
+       x="-0.088873641"
+       width="1.1777473"
+       y="-0.14319746"
+       height="1.2863949"
+       id="filter3505">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.59249095"
+         id="feGaussianBlur3507" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       x="-0.22985655"
+       width="1.4597131"
+       y="-0.096048883"
+       height="1.1920978"
+       id="filter3602">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.29786549"
+         id="feGaussianBlur3604" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.197802"
+     inkscape:cx="16"
+     inkscape:cy="15.486836"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="772"
+     inkscape:window-height="648"
+     inkscape:window-x="20"
+     inkscape:window-y="51" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description> Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.98999999;fill:url(#linearGradient3313);fill-opacity:1;fill-rule:evenodd;stroke:#eab624;stroke-width:1.41400003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2168"
+       sodipodi:cx="17.994602"
+       sodipodi:cy="17.622179"
+       sodipodi:rx="12.547105"
+       sodipodi:ry="12.502454"
+       d="M 30.541707 17.622179 A 12.547105 12.502454 0 1 1  5.4474974,17.622179 A 12.547105 12.502454 0 1 1  30.541707 17.622179 z"
+       transform="matrix(1.1316171,0,0,1.1356586,-4.3630012,-4.0127788)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="shadow">
+    <path
+       transform="translate(7.264966,-1.9597642)"
+       d="M 14.288518 12.085378 A 3.2149167 3.1256135 0 1 1  7.858685,12.085378 A 3.2149167 3.1256135 0 1 1  14.288518 12.085378 z"
+       sodipodi:ry="3.1256135"
+       sodipodi:rx="3.2149167"
+       sodipodi:cy="12.085378"
+       sodipodi:cx="11.073602"
+       id="path3292"
+       style="opacity:0.98999999;fill:#120808;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41400003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3288)"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.98999999;fill:#120808;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41400003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3288)"
+       id="path2171"
+       sodipodi:cx="11.073602"
+       sodipodi:cy="12.085378"
+       sodipodi:rx="3.2149167"
+       sodipodi:ry="3.1256135"
+       d="M 14.288518 12.085378 A 3.2149167 3.1256135 0 1 1  7.858685,12.085378 A 3.2149167 3.1256135 0 1 1  14.288518 12.085378 z"
+       transform="translate(0.1413156,-1.9597642)" />
+    <rect
+       ry="1.3650651"
+       y="14.68737"
+       x="7.5440941"
+       height="7.6977458"
+       width="13.767554"
+       id="rect3459"
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#060000;stroke-width:2.23244596;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3505)" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path3524"
+       d="M 26.758921,22.222252 L 26.758395,15.261564 L 24.141021,17.395218 L 24.130979,20.321545 L 26.758921,22.222252 z "
+       style="fill:#091010;fill-opacity:1;fill-rule:evenodd;stroke:#0c0808;stroke-width:0.48215941;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3602)"
+       transform="matrix(1.3383058,0,0,1.1306671,-9.1081745,-3.4578539)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="camera">
+    <path
+       d="M 14.288518 12.085378 A 3.2149167 3.1256135 0 1 1  7.858685,12.085378 A 3.2149167 3.1256135 0 1 1  14.288518 12.085378 z"
+       sodipodi:ry="3.1256135"
+       sodipodi:rx="3.2149167"
+       sodipodi:cy="12.085378"
+       sodipodi:cx="11.073602"
+       id="path3144"
+       style="opacity:0.98999999;fill:#fcfcfc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41400003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       sodipodi:type="arc"
+       transform="translate(6.7114822,-2.9597642)" />
+    <path
+       transform="translate(-0.2885178,-2.9597642)"
+       d="M 14.288518 12.085378 A 3.2149167 3.1256135 0 1 1  7.858685,12.085378 A 3.2149167 3.1256135 0 1 1  14.288518 12.085378 z"
+       sodipodi:ry="3.1256135"
+       sodipodi:rx="3.2149167"
+       sodipodi:cy="12.085378"
+       sodipodi:cx="11.073602"
+       id="path3146"
+       style="opacity:0.98999999;fill:#fcfcfc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.41400003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       sodipodi:type="arc" />
+    <rect
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fefefe;stroke-width:2.23244596;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3315"
+       width="13.767554"
+       height="7.6977458"
+       x="7.1162238"
+       y="13.560908"
+       ry="1.3650651" />
+    <path
+       style="fill:#edf0f0;fill-opacity:1;fill-rule:evenodd;stroke:#fff2f2;stroke-width:0.58618188;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 26.156779,20.706909 L 26.156095,12.79443 L 22.752884,15.219836 L 22.739827,18.546303 L 26.156779,20.706909 z "
+       id="path3514"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/src/images/antialias.svg b/src/images/antialias.svg
new file mode 100644
index 0000000..94847db
--- /dev/null
+++ b/src/images/antialias.svg
@@ -0,0 +1,397 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="60"
+   inkscape:export-xdpi="60"
+   width="32"
+   height="32"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="antialias.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1"
+   style="display:inline">
+  <metadata
+     id="metadata20">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description> Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     stroke="#3465a4"
+     fill="#729fcf"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.25490196"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="23.8125"
+     inkscape:cx="14.679458"
+     inkscape:cy="14.582104"
+     inkscape:current-layer="layer4"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="true"
+     inkscape:window-width="1521"
+     inkscape:window-height="1096"
+     inkscape:window-x="193"
+     inkscape:window-y="35"
+     gridtolerance="10000"
+     inkscape:grid-points="true"
+     showborder="true"
+     borderlayer="false"
+     inkscape:snap-grids="true"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2841"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <defs
+     id="defs3" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="bg"
+     style="display:none">
+    <rect
+       style="fill:#5c84bc;fill-opacity:1;stroke:#92a8ce;stroke-width:2.0999999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3619"
+       width="30"
+       height="30"
+       x="1"
+       y="1"
+       ry="2.7585204" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="bg1"
+     style="display:inline">
+    <rect
+       style="fill:#e5eaf0;fill-opacity:1;fill-rule:evenodd;stroke:#8996cb;stroke-width:1;stroke-opacity:1"
+       id="rect3648"
+       width="30"
+       height="30"
+       x="1"
+       y="1"
+       ry="2.4063163" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="rects"
+     style="display:inline">
+    <rect
+       style="fill:#afc6e9;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect2845"
+       width="8"
+       height="8"
+       x="4"
+       y="4"
+       ry="0" />
+    <rect
+       ry="0"
+       y="4"
+       x="12"
+       height="8"
+       width="8"
+       id="rect3621"
+       style="fill:#d7e3f4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#f8f9fb;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3623"
+       width="8"
+       height="8"
+       x="20"
+       y="4"
+       ry="0" />
+    <rect
+       ry="0"
+       y="12"
+       x="4"
+       height="8"
+       width="8"
+       id="rect3627"
+       style="fill:#6d97d6;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#afc6e9;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3629"
+       width="8"
+       height="8"
+       x="12"
+       y="12"
+       ry="0" />
+    <rect
+       ry="0"
+       y="12"
+       x="20"
+       height="8"
+       width="8"
+       id="rect3631"
+       style="fill:#d7e3f4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#214478;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3635"
+       width="8"
+       height="8.000001"
+       x="2"
+       y="-11"
+       ry="0" />
+    <rect
+       ry="0"
+       y="-11"
+       x="7"
+       height="5.0341206"
+       width="5.0000005"
+       id="rect3637"
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#5f8dd3;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3639"
+       width="5.0000005"
+       height="5.0341206"
+       x="12"
+       y="-11"
+       ry="0" />
+    <rect
+       ry="0"
+       y="-11"
+       x="17"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3608"
+       style="fill:#87aade;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#afc6e9;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3610"
+       width="5.0000005"
+       height="5.0000005"
+       x="22"
+       y="-11"
+       ry="0" />
+    <rect
+       ry="0"
+       y="-6"
+       x="1.9999995"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3632"
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#214478;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3634"
+       width="5.0000005"
+       height="5.034121"
+       x="7"
+       y="-6"
+       ry="0" />
+    <rect
+       ry="0"
+       y="-6"
+       x="12"
+       height="5.0341206"
+       width="5.0000005"
+       id="rect3636"
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#5f8dd3;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3638"
+       width="5.0000005"
+       height="5.034121"
+       x="17"
+       y="-6"
+       ry="0" />
+    <rect
+       ry="0"
+       y="-6"
+       x="22"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3640"
+       style="fill:#87aade;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#5f8dd3;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3642"
+       width="5"
+       height="4.9658799"
+       x="4"
+       y="48.965881"
+       ry="0" />
+    <rect
+       ry="0"
+       y="48.965881"
+       x="9"
+       height="4.9658799"
+       width="5.000001"
+       id="rect3644"
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#214478;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3646"
+       width="5.0000005"
+       height="5.0682411"
+       x="14"
+       y="48.965881"
+       ry="0" />
+    <rect
+       ry="0"
+       y="49"
+       x="19"
+       height="4.9658799"
+       width="5.0000005"
+       id="rect3649"
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#5f8dd3;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3651"
+       width="5.0000005"
+       height="4.9658799"
+       x="24"
+       y="49"
+       ry="0" />
+    <rect
+       style="fill:#87aade;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3653"
+       width="5"
+       height="5.0000005"
+       x="4"
+       y="53.965881"
+       ry="0" />
+    <rect
+       ry="0"
+       y="53.965881"
+       x="9"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3655"
+       style="fill:#5f8dd3;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3657"
+       width="5.0000005"
+       height="5.0341206"
+       x="14"
+       y="53.931759"
+       ry="0" />
+    <rect
+       ry="0"
+       y="53.965881"
+       x="19"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3659"
+       style="fill:#214478;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3661"
+       width="5.0000005"
+       height="4.9658799"
+       x="24"
+       y="54"
+       ry="0" />
+    <rect
+       ry="0"
+       y="58.965881"
+       x="3.9999995"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3663"
+       style="fill:#aaccff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#87aade;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3665"
+       width="5.0000005"
+       height="5.0000005"
+       x="9"
+       y="58.965881"
+       ry="0" />
+    <rect
+       ry="0"
+       y="58.897636"
+       x="14"
+       height="5.0682411"
+       width="5.0000005"
+       id="rect3667"
+       style="fill:#5f8dd3;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3669"
+       width="5.0000005"
+       height="4.9658799"
+       x="19"
+       y="58.965881"
+       ry="0" />
+    <rect
+       ry="0"
+       y="58.965881"
+       x="24"
+       height="5.0000005"
+       width="5.0000005"
+       id="rect3671"
+       style="fill:#214478;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#436fb5;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3675"
+       width="8"
+       height="8"
+       x="4"
+       y="20"
+       ry="0" />
+    <rect
+       ry="0"
+       y="20"
+       x="12"
+       height="8"
+       width="8"
+       id="rect3677"
+       style="fill:#6d97d6;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <rect
+       style="fill:#afc6e9;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3679"
+       width="8"
+       height="8"
+       x="20"
+       y="20"
+       ry="0" />
+  </g>
+</svg>
diff --git a/src/images/arrow_bottom.svg b/src/images/arrow_bottom.svg
new file mode 100644
index 0000000..a64cc2a
--- /dev/null
+++ b/src/images/arrow_bottom.svg
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="arrow_bottom.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3612">
+      <stop
+         style="stop-color:#616161;stop-opacity:1;"
+         offset="0"
+         id="stop3614" />
+      <stop
+         style="stop-color:#383838;stop-opacity:1;"
+         offset="1"
+         id="stop3616" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3601">
+      <stop
+         style="stop-color:#a2a2a2;stop-opacity:1;"
+         offset="0"
+         id="stop3603" />
+      <stop
+         style="stop-color:#343434;stop-opacity:1;"
+         offset="1"
+         id="stop3605" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3601"
+       id="linearGradient3607"
+       x1="10.653805"
+       y1="3.7712457"
+       x2="24.085051"
+       y2="29.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.96774194,0,0,0.96774194,0.64516103,0.5483869)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3612"
+       id="linearGradient3618"
+       x1="3"
+       y1="28.806061"
+       x2="29"
+       y2="28.806061"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.9111108"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1280"
+     inkscape:window-height="740"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3607);fill-opacity:1.0;stroke:#2e2e2e;stroke-width:0.96774190999999998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 12.258064,2.4838708 12.258064,17 5.4838707,12.16129 1.612903,17 16.129032,28.612903 30.645161,17 26.774193,12.16129 20,17 20,2.4838708 l -7.741936,0 z"
+       id="path2850"
+       sodipodi:nodetypes="cccccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar">
+    <rect
+       style="fill:url(#linearGradient3618);fill-opacity:1;stroke:none"
+       id="rect3610"
+       width="26"
+       height="4"
+       x="3"
+       y="26.806061"
+       ry="0.71111113" />
+  </g>
+</svg>
diff --git a/src/images/arrow_down.svg b/src/images/arrow_down.svg
new file mode 100644
index 0000000..b096b9e
--- /dev/null
+++ b/src/images/arrow_down.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="arrow_down.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3601">
+      <stop
+         style="stop-color:#a2a2a2;stop-opacity:1;"
+         offset="0"
+         id="stop3603" />
+      <stop
+         style="stop-color:#343434;stop-opacity:1;"
+         offset="1"
+         id="stop3605" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3601"
+       id="linearGradient3607"
+       x1="10.653805"
+       y1="3.7712457"
+       x2="24.085051"
+       y2="29.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.96774194,0,0,0.96774194,0.58051457,1.1586837)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.9111108"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1280"
+     inkscape:window-height="740"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3607);fill-opacity:1;stroke:#2e2e2e;stroke-width:0.96774191px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 12.193418,3.0941677 0,14.5161293 -6.7741938,-4.83871 -3.8709677,4.83871 14.5161295,11.612903 14.516129,-11.612903 -3.870968,-4.83871 -6.774193,4.83871 0,-14.5161293 -7.741936,0 z"
+       id="path2850"
+       sodipodi:nodetypes="cccccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar" />
+</svg>
diff --git a/src/images/arrow_left.svg b/src/images/arrow_left.svg
new file mode 100644
index 0000000..b01813f
--- /dev/null
+++ b/src/images/arrow_left.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="arrow_left.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3601">
+      <stop
+         style="stop-color:#a2a2a2;stop-opacity:1;"
+         offset="0"
+         id="stop3603" />
+      <stop
+         style="stop-color:#343434;stop-opacity:1;"
+         offset="1"
+         id="stop3605" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3601"
+       id="linearGradient3607"
+       x1="10.653805"
+       y1="3.7712457"
+       x2="24.085051"
+       y2="29.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,-0.96774194,-0.96774194,0,31.064386,31.642555)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.9111108"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1179"
+     inkscape:window-x="1916"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3607);fill-opacity:1;stroke:#2e2e2e;stroke-width:0.96774191px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 29.128902,20.029652 -14.516129,0 4.83871,6.774193 -4.83871,3.870968 L 2.9998696,16.158684 14.612773,1.6425546 l 4.83871,3.870968 -4.83871,6.7741934 14.516129,0 0,7.741936 z"
+       id="path2850"
+       sodipodi:nodetypes="cccccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar" />
+</svg>
diff --git a/src/images/arrow_top.svg b/src/images/arrow_top.svg
new file mode 100644
index 0000000..1ae12cf
--- /dev/null
+++ b/src/images/arrow_top.svg
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="arrow_top.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3612">
+      <stop
+         style="stop-color:#616161;stop-opacity:1;"
+         offset="0"
+         id="stop3614" />
+      <stop
+         style="stop-color:#383838;stop-opacity:1;"
+         offset="1"
+         id="stop3616" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3601">
+      <stop
+         style="stop-color:#a2a2a2;stop-opacity:1;"
+         offset="0"
+         id="stop3603" />
+      <stop
+         style="stop-color:#343434;stop-opacity:1;"
+         offset="1"
+         id="stop3605" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3601"
+       id="linearGradient3607"
+       x1="10.653805"
+       y1="3.7712457"
+       x2="24.085051"
+       y2="29.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.96774194,0,0,-0.96774194,0.64516103,32.257674)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3612"
+       id="linearGradient3620"
+       gradientUnits="userSpaceOnUse"
+       x1="3"
+       y1="28.806061"
+       x2="29"
+       y2="28.806061"
+       gradientTransform="translate(0,-32.806061)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.9111108"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1280"
+     inkscape:window-height="740"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3607);fill-opacity:1;stroke:#2e2e2e;stroke-width:0.96774191px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 12.258064,30.32219 0,-14.516129 -6.7741933,4.83871 L 1.612903,15.806061 16.129032,4.1931576 30.645161,15.806061 26.774193,20.644771 20,15.806061 l 0,14.516129 -7.741936,0 z"
+       id="path2850"
+       sodipodi:nodetypes="cccccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar">
+    <rect
+       style="fill:url(#linearGradient3620);fill-opacity:1;stroke:none"
+       id="rect3610"
+       width="26"
+       height="4"
+       x="3"
+       y="-6"
+       ry="0.71111113"
+       transform="scale(1,-1)" />
+  </g>
+</svg>
diff --git a/src/images/arrow_up.svg b/src/images/arrow_up.svg
new file mode 100644
index 0000000..7eed43e
--- /dev/null
+++ b/src/images/arrow_up.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="arrow_up.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3601">
+      <stop
+         style="stop-color:#a2a2a2;stop-opacity:1;"
+         offset="0"
+         id="stop3603" />
+      <stop
+         style="stop-color:#343434;stop-opacity:1;"
+         offset="1"
+         id="stop3605" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3601"
+       id="linearGradient3607"
+       x1="10.653805"
+       y1="3.7712457"
+       x2="24.085051"
+       y2="29.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.96774194,0,0,-0.96774194,0.58051457,31.158684)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.9111108"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1280"
+     inkscape:window-height="740"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3607);fill-opacity:1;stroke:#2e2e2e;stroke-width:0.96774191px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 12.193418,29.2232 0,-14.516129 -6.7741938,4.83871 -3.8709677,-4.83871 14.5161295,-11.6129033 14.516129,11.6129033 -3.870968,4.83871 -6.774193,-4.83871 0,14.516129 -7.741936,0 z"
+       id="path2850"
+       sodipodi:nodetypes="cccccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar" />
+</svg>
diff --git a/src/images/check_consistency.svg b/src/images/check_consistency.svg
new file mode 100644
index 0000000..defb28a
--- /dev/null
+++ b/src/images/check_consistency.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="check_consistency.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3693">
+      <stop
+         id="stop3695"
+         offset="0"
+         style="stop-color:#42f56a;stop-opacity:1;" />
+      <stop
+         id="stop3697"
+         offset="1"
+         style="stop-color:#00a100;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3710-9">
+      <stop
+         id="stop3712-2"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="6.1443644"
+       x2="23.48575"
+       y1="30.518726"
+       x1="4.5201936"
+       gradientTransform="matrix(1.0420975,0,0,0.96389885,-0.17180634,0.90619192)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3110"
+       xlink:href="#linearGradient3710-9"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3693"
+       id="linearGradient3691"
+       x1="14.173127"
+       y1="27.414982"
+       x2="13.18478"
+       y2="9.1505356"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-0.79904875,1.3317479)" />
+    <linearGradient
+       y2="13.539209"
+       x2="25.816109"
+       y1="13.5"
+       x1="-0.5"
+       gradientTransform="matrix(-0.4901308,0,0,0.48520668,2.0508751,4.1217947)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient2990"
+       xlink:href="#linearGradient11462"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient11462">
+      <stop
+         id="stop11464"
+         offset="0"
+         style="stop-color:#b3caff;stop-opacity:1;" />
+      <stop
+         id="stop11466"
+         offset="1"
+         style="stop-color:#5a98ec;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3630"
+       id="linearGradient3636"
+       x1="13.045778"
+       y1="7.4768147"
+       x2="20.514267"
+       y2="32.043404"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.66985248,0,0,0.94377063,16.337689,-0.88872133)" />
+    <linearGradient
+       id="linearGradient3630">
+      <stop
+         style="stop-color:#f6e1c0;stop-opacity:1;"
+         offset="0"
+         id="stop3632" />
+      <stop
+         style="stop-color:#f5e7d1;stop-opacity:1;"
+         offset="1"
+         id="stop3634" />
+    </linearGradient>
+    <linearGradient
+       y2="30.458979"
+       x2="10.126635"
+       y1="7.4387646"
+       x1="2.0493469"
+       gradientTransform="matrix(0.70225464,0,0,0.94234674,17.220617,-0.34925834)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient2977"
+       xlink:href="#linearGradient3630"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.09375"
+     inkscape:cx="14.716168"
+     inkscape:cy="16"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1484"
+     inkscape:window-height="1143"
+     inkscape:window-x="2036"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false"
+     inkscape:snap-to-guides="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="data"
+     style="display:inline">
+    <rect
+       ry="0"
+       y="1.9813973"
+       x="18.28945"
+       height="27.358311"
+       width="6.9206729"
+       id="rect3622"
+       style="fill:url(#linearGradient2977);fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+    <rect
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:0.99999988;stroke-opacity:1;display:inline"
+       id="rect3626"
+       width="6.7127609"
+       height="3.8724737"
+       x="18.289448"
+       y="2.0172534" />
+    <rect
+       style="fill:#ffb380;fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="rect2855"
+       width="6.3543396"
+       height="27.395958"
+       x="6.7145567"
+       y="2.0372152"
+       ry="0" />
+    <rect
+       y="2.0731208"
+       x="6.7145567"
+       height="3.8778026"
+       width="6.3298063"
+       id="rect2859"
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:1;stroke-opacity:1;display:inline" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="mark"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3691);fill-opacity:1;stroke:#295723;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="M 2.3590963,17.769322 5.7835909,15.029727 10.045184,20.546968 27.434007,7.5719382 29.907253,11.034483 9.0558853,26.634959 2.3590963,17.769322 z"
+       id="path2911"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+</svg>
diff --git a/src/images/check_syntax.svg b/src/images/check_syntax.svg
new file mode 100644
index 0000000..7d4438b
--- /dev/null
+++ b/src/images/check_syntax.svg
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="check_syntax.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3693">
+      <stop
+         id="stop3695"
+         offset="0"
+         style="stop-color:#42f56a;stop-opacity:1;" />
+      <stop
+         id="stop3697"
+         offset="1"
+         style="stop-color:#00a100;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3710-9">
+      <stop
+         id="stop3712-2"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="6.1443644"
+       x2="23.48575"
+       y1="30.518726"
+       x1="4.5201936"
+       gradientTransform="matrix(1.0420975,0,0,0.96389885,-0.17180634,0.90619192)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3110"
+       xlink:href="#linearGradient3710-9"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3693"
+       id="linearGradient3691"
+       x1="14.173127"
+       y1="27.414982"
+       x2="13.18478"
+       y2="9.1505356"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-0.79904875,1.3317479)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="15.499443"
+     inkscape:cy="15.079834"
+     inkscape:current-layer="layer6"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1438"
+     inkscape:window-height="1096"
+     inkscape:window-x="543"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="paper 2"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3110);fill-opacity:1;stroke:#717171;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 5.0386825,2.8339896 0,26.9891684 21.8840475,0 0,-19.277978 -8.044056,0.06932 0.07493,-7.7111895 -13.9149278,-0.06931 z"
+       id="path3698-4"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="paper"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)"
+     style="display:inline">
+    <path
+       style="fill:none;stroke:#717171;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="m 19.119196,18.848334 7.917942,7.552847"
+       id="path3783-4"
+       sodipodi:nodetypes="cc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="pencil"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3691);fill-opacity:1;stroke:#295723;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="M 2.3590963,17.769322 5.7835909,15.029727 10.045184,20.546968 27.434007,7.5719382 29.907253,11.034483 9.0558853,26.634959 2.3590963,17.769322 z"
+       id="path2911"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+</svg>
diff --git a/src/images/clear_left.svg b/src/images/clear_left.svg
new file mode 100644
index 0000000..7297061
--- /dev/null
+++ b/src/images/clear_left.svg
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="clear_left.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3606">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3608" />
+      <stop
+         style="stop-color:#cdc5c5;stop-opacity:1;"
+         offset="1"
+         id="stop3610" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3606"
+       id="linearGradient3612"
+       x1="20"
+       y1="28"
+       x2="20"
+       y2="5"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="13.436084"
+     inkscape:cy="15.888631"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1127"
+     inkscape:window-height="732"
+     inkscape:window-x="5"
+     inkscape:window-y="-14"
+     inkscape:window-maximized="0"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3612);stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
+       d="M 29,7 29,25 10,25 2.7797985,15.385859 10,7 29,7 z"
+       id="path2836"
+       sodipodi:nodetypes="cccccc" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:none"
+       id="rect3616"
+       width="2.9999995"
+       height="13.820202"
+       x="-0.13554154"
+       y="16.856846"
+       ry="1.0476104"
+       transform="matrix(0.70238772,-0.71179456,0.71179456,0.70238772,0,0)" />
+    <rect
+       ry="1.0476104"
+       y="-5.6178875"
+       x="-25.12775"
+       height="13.820202"
+       width="2.9999995"
+       id="rect3618"
+       style="fill:#ffffff;fill-opacity:1;stroke:none"
+       transform="matrix(-0.71179456,-0.70238772,0.70238772,-0.71179456,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar" />
+</svg>
diff --git a/src/images/close.svg b/src/images/close.svg
new file mode 100644
index 0000000..87dfebd
--- /dev/null
+++ b/src/images/close.svg
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="close.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3795">
+      <stop
+         style="stop-color:#c53143;stop-opacity:1;"
+         offset="0"
+         id="stop3797" />
+      <stop
+         style="stop-color:#b8382b;stop-opacity:0;"
+         offset="1"
+         id="stop3799" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#fa0c1e;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#d9afb1;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#e8220f;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#932626;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#bc4343;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3795"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="12.549147"
+     inkscape:cy="15.367291"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1005"
+     inkscape:window-height="751"
+     inkscape:window-x="214"
+     inkscape:window-y="-17"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <text
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Calibri;-inkscape-font-specification:Calibri"
+       x="3.8399999"
+       y="21.973333"
+       id="text3783"><tspan
+         sodipodi:role="line"
+         id="tspan3785"
+         x="3.8399999"
+         y="21.973333" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="7.2533331"
+       y="15.146667"
+       id="text3787"><tspan
+         sodipodi:role="line"
+         id="tspan3789"
+         x="7.2533331"
+         y="15.146667" /></text>
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:3.33834791;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3809"
+       width="1.4149849"
+       height="17.969641"
+       x="-0.80126238"
+       y="13.517637"
+       ry="0.11241483"
+       transform="matrix(0.69887353,-0.71524526,0.71524526,0.69887353,0,0)" />
+    <rect
+       ry="0.11177491"
+       y="-9.1074448"
+       x="-23.50547"
+       height="17.86735"
+       width="1.4193591"
+       id="rect3811"
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:3.33397388;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       transform="matrix(-0.71524526,-0.69887353,0.69887353,-0.71524526,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#b72f3d;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/configure.svg b/src/images/configure.svg
new file mode 100644
index 0000000..e1a3bf3
--- /dev/null
+++ b/src/images/configure.svg
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="32"
+   height="32"
+   id="svg4895"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="configure.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/var/tmp/cgr/PERFORCE/metview_4/src/images/new/profile_manage.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   style="display:inline">
+  <sodipodi:namedview
+     inkscape:window-height="1070"
+     inkscape:window-width="1339"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="4.5"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="25.28125"
+     inkscape:cx="16"
+     inkscape:cy="16"
+     inkscape:window-x="2458"
+     inkscape:window-y="101"
+     inkscape:current-layer="layer1"
+     width="32px"
+     height="32px"
+     showgrid="true"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid25877"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3436">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3362">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 16 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="32 : 16 : 1"
+       inkscape:persp3d-origin="16 : 10.666667 : 1"
+       id="perspective2941" />
+    <!-- -->
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3685-4"
+       id="linearGradient3763"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0001757,0,0,1.0001944,0.74496639,-1.080628)"
+       x1="12"
+       y1="28"
+       x2="7"
+       y2="23" />
+    <linearGradient
+       id="linearGradient3685-4">
+      <stop
+         id="stop3687-6"
+         offset="0"
+         style="stop-color:#c78e5b;stop-opacity:1;" />
+      <stop
+         id="stop3689-9"
+         offset="1"
+         style="stop-color:#cf7d3e;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3675-2"
+       id="linearGradient3765"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0001759,0,0,1.0001946,0.74496691,-0.78037688)"
+       x1="-0.31687203"
+       y1="24.091682"
+       x2="15.869606"
+       y2="24.091682" />
+    <linearGradient
+       id="linearGradient3675-2">
+      <stop
+         id="stop3677-2"
+         offset="0"
+         style="stop-color:#e6bc10;stop-opacity:1;" />
+      <stop
+         id="stop3679-4"
+         offset="1"
+         style="stop-color:#dbe683;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3665-7">
+      <stop
+         id="stop3667-7"
+         offset="0"
+         style="stop-color:#b7b7b7;stop-opacity:1;" />
+      <stop
+         id="stop3669-5"
+         offset="1"
+         style="stop-color:#f1f1f1;stop-opacity:0.99215686;" />
+    </linearGradient>
+    <linearGradient
+       y2="15.711069"
+       x2="24.332083"
+       y1="3.2495306"
+       x1="8.3320827"
+       gradientTransform="matrix(1.0001759,0,0,1.0001946,0.74496691,-0.78037688)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3914"
+       xlink:href="#linearGradient3665-7"
+       inkscape:collect="always" />
+  </defs>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="config"
+     style="display:inline" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="spanner">
+    <path
+       sodipodi:nodetypes="casaacsascaaca"
+       id="path2891"
+       d="M 23.749009,10.221763 C 22.585888,10.103352 21.383966,8.9410984 21.22886,7.7822583 21.097175,6.7981935 21.496505,6.3104209 22.748842,5.2207875 24.001159,4.1311753 25.377728,3.2448739 24.749191,2.2201997 23.26421,-0.20069559 18.359173,1.2771432 16.28804,3.2203978 14.211767,5.168476 14.747438,11.621658 14.747438,11.621658 L 2.0453827,24.224479 c -1.06790401,1.059565 0.035818,3.363169 1.1615552,4.36108 1.1434739,1.013638 3.4568786,1.718519 4.5392626,0.639893 L 20.080453,16.934144  [...]
+       style="fill:url(#linearGradient3914);fill-opacity:1;stroke:#2f2f2f;stroke-width:0.99999875px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+    <path
+       sodipodi:nodetypes="ccsasc"
+       id="path3673"
+       d="m 9.7465533,15.79319 6.3707227,6.064979 -8.3710755,8.367487 c -1.4631079,1.462478 -4.7383953,0.05653 -6.001058,-1.581921 -1.00486417,-1.304093 -1.17069324,-3.781517 0,-4.939047 L 9.7465533,15.79319 z"
+       style="fill:url(#linearGradient3765);fill-opacity:1;stroke:#9f7220;stroke-width:0.99999875000000005px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+    <path
+       sodipodi:nodetypes="cccaac"
+       id="path3683"
+       d="m 12.747082,19.92344 2.000348,1.700146 -8.0014087,8.301791 c 0,0 -1.6197056,0.08989 -2.0003505,-0.480385 -0.4011723,-0.601154 0.00703,-1.500433 0.3415224,-2.141127 1.6406915,-3.143228 7.6598888,-7.380425 7.6598888,-7.380425 z"
+       style="fill:url(#linearGradient3763);fill-opacity:1;stroke:none;display:inline" />
+    <path
+       sodipodi:nodetypes="ccaaccaacaaccc"
+       id="path3731"
+       d="M 15.548048,20.360225 20,16 c 0,0 5.715587,0.316106 7.720907,-1.359499 C 29.258484,13.355732 29.924009,10.999776 29.798821,9 29.751911,8.2506444 29.445056,7.155524 28.76267,7 27.460284,8.151868 26.497,9.8929691 25,11 23.83512,11.290913 22.427413,10.808297 21.539715,9.9998089 20.745078,9.2761228 20.198252,8.0618699 20.359394,6.9992226 20.650274,5.0810275 24.798463,4.17522 24,2.4579961 23.643649,1.6915805 21.995265,1.8193843 20.999291,1.9982499 19.26857,2.3090677 17.358203,3.0945 [...]
+       style="fill:none;stroke:#7a8ca4;stroke-width:0.90000027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+  </g>
+</svg>
diff --git a/src/images/connectAnimations.svg b/src/images/connectAnimations.svg
new file mode 100644
index 0000000..d2fdd36
--- /dev/null
+++ b/src/images/connectAnimations.svg
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3187"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="connectAnimations.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3189" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="10.390625"
+     inkscape:cx="46.434336"
+     inkscape:cy="32"
+     inkscape:current-layer="layer5"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1498"
+     inkscape:window-height="1098"
+     inkscape:window-x="2091"
+     inkscape:window-y="39"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2822" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="rect"
+     style="display:inline">
+    <rect
+       style="fill:#94a6cd;fill-opacity:1;fill-rule:evenodd;stroke:#202830;stroke-width:1.24500000000000011;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect5213"
+       width="26"
+       height="16"
+       x="12"
+       y="12" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="rect1">
+    <rect
+       style="fill:#678ca8;fill-opacity:1;fill-rule:evenodd;stroke:#202830;stroke-width:1.245;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="rect5213-4"
+       width="26"
+       height="16.290253"
+       x="27"
+       y="35" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <rect
+       style="fill:none;stroke:#354454;stroke-width:3.64499998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:7.28999967, 3.64499985;stroke-dashoffset:0"
+       id="rect3652"
+       width="58"
+       height="58.000004"
+       x="3.0000002"
+       y="3.0000002" />
+  </g>
+</svg>
diff --git a/src/images/create_mars.svg b/src/images/create_mars.svg
new file mode 100644
index 0000000..b606b13
--- /dev/null
+++ b/src/images/create_mars.svg
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90"
+   inkscape:export-xdpi="90"
+   width="32"
+   height="32"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="create_mars.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0"
+   style="display:inline">
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     stroke="#3465a4"
+     fill="#729fcf"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.25490196"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.40625"
+     inkscape:cx="8.153975"
+     inkscape:cy="15.13615"
+     inkscape:current-layer="layer4"
+     showgrid="true"
+     inkscape:grid-bbox="false"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="1467"
+     inkscape:window-height="966"
+     inkscape:window-x="188"
+     inkscape:window-y="35"
+     gridtolerance="50"
+     inkscape:grid-points="false"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     objecttolerance="0.4"
+     inkscape:object-paths="true"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0">
+    <sodipodi:guide
+       orientation="horizontal"
+       position="50.977307"
+       id="guide9112" />
+    <inkscape:grid
+       type="xygrid"
+       id="grid2855" />
+  </sodipodi:namedview>
+  <defs
+     id="defs3" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="tape line"
+     style="display:inline">
+    <rect
+       style="fill:#871e28;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect2860"
+       width="12.062091"
+       height="1.955911"
+       x="19.048203"
+       y="27.586374" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="disk"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#1c1f2b;stroke-width:1.0086019;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       id="path4193"
+       sodipodi:cx="17.300776"
+       sodipodi:cy="16.889763"
+       sodipodi:rx="11.62326"
+       sodipodi:ry="11.355031"
+       d="m 28.924035,16.889763 a 11.62326,11.355031 0 1 1 -23.246519,0 11.62326,11.355031 0 1 1 23.246519,0 z"
+       transform="matrix(1.2120855,0,0,1.2071206,-4.992487,-4.5623266)" />
+    <path
+       transform="matrix(1.1438237,0,0,1.1391384,-3.7890371,-3.3048256)"
+       d="m 28.924035,16.889763 a 11.62326,11.355031 0 1 1 -23.246519,0 11.62326,11.355031 0 1 1 23.246519,0 z"
+       sodipodi:ry="11.355031"
+       sodipodi:rx="11.62326"
+       sodipodi:cy="16.889763"
+       sodipodi:cx="17.300776"
+       id="path4203"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#b9bdc7;stroke-width:0.65199035;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       sodipodi:type="arc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="center"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#1329cb;stroke-width:1.64234912;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       id="path4195"
+       sodipodi:cx="17.725471"
+       sodipodi:cy="17.448572"
+       sodipodi:rx="6.1022115"
+       sodipodi:ry="6.3257356"
+       d="m 23.827683,17.448572 a 6.1022115,6.3257356 0 1 1 -12.204423,0 6.1022115,6.3257356 0 1 1 12.204423,0 z"
+       transform="matrix(0.95928278,0,0,0.93330669,-0.953455,-0.5256397)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="arrow"
+     style="display:inline" />
+</svg>
diff --git a/src/images/data_probe.svg b/src/images/data_probe.svg
new file mode 100644
index 0000000..260ccc3
--- /dev/null
+++ b/src/images/data_probe.svg
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg3187"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="data_probe.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3189">
+    <linearGradient
+       id="linearGradient3648">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="0"
+         id="stop3650" />
+      <stop
+         style="stop-color:#4a4a4a;stop-opacity:0.55263156;"
+         offset="1"
+         id="stop3652" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3632">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3634" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3636" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3625">
+      <stop
+         style="stop-color:#000000;stop-opacity:0.36842105;"
+         offset="0"
+         id="stop3627" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3629" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3632"
+       id="linearGradient3638"
+       x1="15.962039"
+       y1="32.721233"
+       x2="15.962037"
+       y2="51.54266"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.423939,8.0615911,-30.659657)" />
+    <linearGradient
+       id="linearGradient3648-6">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="0"
+         id="stop3650-9" />
+      <stop
+         id="stop3724"
+         offset="0.5"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+      <stop
+         style="stop-color:#4a4a4a;stop-opacity:0.79824561;"
+         offset="1"
+         id="stop3652-2" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3632"
+       id="linearGradient3712"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.3695659,8.0279112,-108.83751)"
+       x1="15.962039"
+       y1="32.721233"
+       x2="15.962039"
+       y2="50.969902" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3632"
+       id="linearGradient3716"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.4330012,23.904731,-94.927526)"
+       x1="15.962039"
+       y1="32.721233"
+       x2="15.962037"
+       y2="48.909447" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3632"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.374097,23.919058,-44.976484)"
+       x1="15.962039"
+       y1="32.721233"
+       x2="15.962038"
+       y2="47.905415" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3648-6"
+       id="radialGradient3722"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.6360718,0,0,1.6342738,-2.6946061,13.917486)"
+       cx="16"
+       cy="15.886121"
+       fx="16"
+       fy="15.886121"
+       r="13.228944" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="19.125"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:current-layer="layer5"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="701"
+     inkscape:window-height="497"
+     inkscape:window-x="2662"
+     inkscape:window-y="119"
+     inkscape:snap-grids="false"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2826"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="rect under"
+     style="display:inline"
+     transform="translate(0,-16)">
+    <path
+       style="fill:url(#radialGradient3722);fill-opacity:1;stroke:#898989;stroke-width:1;stroke-opacity:1;display:inline"
+       d="m 23.504989,18.251224 c -11.953374,0 -21.6822765,9.693746 -21.6822765,21.633988 0,11.940239 9.7289025,21.633987 21.6822765,21.633987 11.953376,0 21.585697,-9.693748 21.585697,-21.633987 0,-11.940242 -9.632321,-21.633988 -21.585697,-21.633988 z m 0.193161,12.796891 c 5.047392,0 9.126838,4.084994 9.126838,9.126837 0,5.041846 -4.079446,9.126839 -9.126838,9.126839 -5.047393,0 -9.126839,-4.084993 -9.126839,-9.126839 0,-5.041843 4.079446,-9.126837 9.126839,-9.126837 z"
+       id="path3703" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="point"
+     style="display:inline"
+     transform="translate(0,-16)">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#000000;stroke-width:1.22890472;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3609"
+       sodipodi:cx="16"
+       sodipodi:cy="15.886121"
+       sodipodi:rx="13.228944"
+       sodipodi:ry="13.912218"
+       d="m 29.228944,15.886121 a 13.228944,13.912218 0 1 1 -26.4578878,0 13.228944,13.912218 0 1 1 26.4578878,0 z"
+       transform="matrix(1.6689656,0,0,1.5869973,-2.916612,14.953924)" />
+    <rect
+       style="fill:url(#linearGradient3638);fill-opacity:1;stroke:none"
+       id="rect3611"
+       width="2.6192172"
+       height="16.431883"
+       x="22.71402"
+       y="15.933385" />
+    <rect
+       y="-64.023636"
+       x="22.680342"
+       height="15.804432"
+       width="2.6192172"
+       id="rect3710"
+       style="fill:url(#linearGradient3712);fill-opacity:1;stroke:none"
+       transform="scale(1,-1)" />
+    <rect
+       y="-48.037956"
+       x="38.557159"
+       height="16.536459"
+       width="2.6192172"
+       id="rect3714"
+       style="fill:url(#linearGradient3716);fill-opacity:1;stroke:none"
+       transform="matrix(0,1,-1,0,0,0)" />
+    <rect
+       transform="matrix(0,1,1,0,0,0)"
+       style="fill:url(#linearGradient3720);fill-opacity:1;stroke:none"
+       id="rect3718"
+       width="2.6192172"
+       height="15.85672"
+       x="38.571487"
+       y="-0.014330625" />
+  </g>
+</svg>
diff --git a/src/images/edit.svg b/src/images/edit.svg
new file mode 100644
index 0000000..4f9be60
--- /dev/null
+++ b/src/images/edit.svg
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="edit.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3710-9">
+      <stop
+         id="stop3712-2"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="6.1443644"
+       x2="23.48575"
+       y1="30.518726"
+       x1="4.5201936"
+       gradientTransform="matrix(1.0420975,0,0,0.96389885,-0.17180634,0.90619192)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3110"
+       xlink:href="#linearGradient3710-9"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3869-6"
+       id="linearGradient3031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0884669,-0.47416089,0.46157136,1.1181553,-7.8141323,11.773461)"
+       x1="19.055012"
+       y1="7.0745502"
+       x2="22.446272"
+       y2="10.200515" />
+    <linearGradient
+       id="linearGradient3869-6">
+      <stop
+         style="stop-color:#ffad02;stop-opacity:1;"
+         offset="0"
+         id="stop3871-9" />
+      <stop
+         style="stop-color:#c4ba4a;stop-opacity:1;"
+         offset="1"
+         id="stop3873-2" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3829"
+       id="linearGradient3835"
+       x1="20.204853"
+       y1="14.127702"
+       x2="18.328623"
+       y2="13.355288"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3829">
+      <stop
+         style="stop-color:#786535;stop-opacity:1;"
+         offset="0"
+         id="stop3831" />
+      <stop
+         style="stop-color:#cd6938;stop-opacity:1;"
+         offset="1"
+         id="stop3833" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3821">
+      <stop
+         style="stop-color:#050505;stop-opacity:1;"
+         offset="0"
+         id="stop3823" />
+      <stop
+         style="stop-color:#949494;stop-opacity:1;"
+         offset="1"
+         id="stop3825" />
+    </linearGradient>
+    <linearGradient
+       y2="19.714443"
+       x2="15.984475"
+       y1="23.807344"
+       x1="13.555334"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4051"
+       xlink:href="#linearGradient3821"
+       inkscape:collect="always" />
+    <filter
+       inkscape:collect="always"
+       id="filter4742"
+       x="-0.092902908"
+       width="1.1858058"
+       y="-0.16145338"
+       height="1.3229068">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.87966724"
+         id="feGaussianBlur4744" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="22.500632"
+     inkscape:cy="15.079834"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1438"
+     inkscape:window-height="1096"
+     inkscape:window-x="385"
+     inkscape:window-y="10"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="paper 2"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3110);fill-opacity:1;stroke:#717171;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 5.0386825,2.8339896 0,26.9891684 21.8840475,0 0,-19.277978 -8.044056,0.06932 0.07493,-7.7111895 -13.9149278,-0.06931 z"
+       id="path3698-4"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="paper"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)"
+     style="display:inline">
+    <path
+       style="fill:none;stroke:#717171;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="m 19.119196,18.848334 7.917942,7.552847"
+       id="path3783-4"
+       sodipodi:nodetypes="cc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer8"
+     inkscape:label="shadow">
+    <g
+       style="opacity:0.5375;fill:#7d7d7d;fill-opacity:1;stroke:none;display:inline;filter:url(#filter4742)"
+       transform="matrix(0.58253309,0.54132302,-0.52314054,0.60277984,20.919382,3.5243966)"
+       id="g4016-7">
+      <path
+         sodipodi:nodetypes="cccccac"
+         id="path3867-2"
+         d="M 20.627643,0.76015116 13.43532,18.950953 l -0.001,5.07806 4.010906,-3.362709 7.198968,-18.3772475 c 0,0 -1.194687,-0.8032788 -1.861149,-1.0587055 C 22.096384,0.96718296 20.627643,0.76015116 20.627643,0.76015116 z"
+         style="fill:#7d7d7d;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccccac"
+         id="path3877-7"
+         d="M 24.471152,2.3346905 17.287658,20.620719 15.938556,20.322441 23.189372,1.5289365 c 0,0 0.483607,0.2563827 0.714453,0.402877 0.195836,0.1242772 0.567327,0.402877 0.567327,0.402877 z"
+         style="fill:#7d7d7d;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3883-2"
+         d="m 13.340389,19.108085 -0.04097,5.072043 4.262629,-3.362811 -4.221661,-1.709232 z"
+         style="fill:#7d7d7d;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3887-9"
+         d="m 13.555334,20.697405 6.24e-4,3.109939 2.428517,-2.113485 -2.429141,-0.996454 z"
+         style="fill:#7d7d7d;fill-opacity:1;stroke:none;display:inline" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="pencil"
+     style="display:inline">
+    <g
+       transform="translate(2.0404101,1.4175463)"
+       id="g4016">
+      <path
+         sodipodi:nodetypes="cccccac"
+         id="path3867"
+         d="M 20.627643,0.76015116 13.43532,18.950953 l -0.001,5.07806 4.010906,-3.362709 7.198968,-18.3772475 c 0,0 -1.194687,-0.8032788 -1.861149,-1.0587055 C 22.096384,0.96718296 20.627643,0.76015116 20.627643,0.76015116 z"
+         style="fill:url(#linearGradient3031);fill-opacity:1;stroke:#c6a22a;stroke-width:0.40000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccccac"
+         id="path3877"
+         d="M 24.471152,2.3346905 17.287658,20.620719 15.938556,20.322441 23.189372,1.5289365 c 0,0 0.483607,0.2563827 0.714453,0.402877 0.195836,0.1242772 0.567327,0.402877 0.567327,0.402877 z"
+         style="fill:url(#linearGradient3835);fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3883"
+         d="m 13.340389,19.108085 -0.04097,5.072043 4.262629,-3.362811 -4.221661,-1.709232 z"
+         style="fill:#c8a656;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3887"
+         d="m 13.555334,20.697405 6.24e-4,3.109939 2.428517,-2.113485 -2.429141,-0.996454 z"
+         style="fill:url(#linearGradient4051);fill-opacity:1;stroke:none;display:inline" />
+    </g>
+  </g>
+</svg>
diff --git a/src/images/editcopy.svg b/src/images/editcopy.svg
new file mode 100644
index 0000000..f1441b1
--- /dev/null
+++ b/src/images/editcopy.svg
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="editcopy.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3710-9">
+      <stop
+         id="stop3712-2"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="6.1443644"
+       x2="23.48575"
+       y1="30.518726"
+       x1="4.5201936"
+       gradientTransform="matrix(0.68515292,0,0,0.71929209,-1.0125311,0.17780731)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3110"
+       xlink:href="#linearGradient3710-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3710-9-6">
+      <stop
+         id="stop3712-2-9"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714-2-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="6.1443644"
+       x2="23.48575"
+       y1="30.518726"
+       x1="4.5201936"
+       gradientTransform="matrix(0.68515292,0,0,0.71113853,11.810444,8.9975262)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3975"
+       xlink:href="#linearGradient3710-9-6"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="15.499443"
+     inkscape:cy="16.184033"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1438"
+     inkscape:window-height="1146"
+     inkscape:window-x="300"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="paper 2"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3110);fill-opacity:1;stroke:#717171;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 2.4132344,1.6163914 0,20.1401796 14.3882116,0 0,-14.3858432 -5.288765,0.051729 0.04926,-5.7543356 -9.1487157,-0.051721 z"
+       id="path3698-4"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="paper"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)"
+     style="display:inline">
+    <path
+       style="fill:none;stroke:#717171;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 11.661407,17.554636 5.216396,5.6884"
+       id="path3783-4"
+       sodipodi:nodetypes="cc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="paper3">
+    <path
+       style="fill:url(#linearGradient3975);fill-opacity:1;stroke:#717171;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 15.23621,10.419803 0,19.91188 14.388211,0 0,-14.222772 -5.288765,0.05114 0.04926,-5.689108 -9.148716,-0.05114 z"
+       id="path3698-4-2"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="fill:none;stroke:#717171;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 24.508121,10.336588 5.24502,5.693268"
+       id="path3783-4-4"
+       sodipodi:nodetypes="cc" />
+  </g>
+</svg>
diff --git a/src/images/editcut.svg b/src/images/editcut.svg
new file mode 100644
index 0000000..b60e4c2
--- /dev/null
+++ b/src/images/editcut.svg
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="editcut.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3961">
+      <stop
+         style="stop-color:#df2026;stop-opacity:1;"
+         offset="0"
+         id="stop3963" />
+      <stop
+         style="stop-color:#ee8689;stop-opacity:1;"
+         offset="1"
+         id="stop3965" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3885">
+      <stop
+         style="stop-color:#d2d2d2;stop-opacity:1;"
+         offset="0"
+         id="stop3887" />
+      <stop
+         style="stop-color:#d4d4d4;stop-opacity:1;"
+         offset="1"
+         id="stop3889" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3885"
+       id="linearGradient3883"
+       x1="8.1800003"
+       y1="10.106667"
+       x2="18.700001"
+       y2="10.106667"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1429766,0,0,1.1424986,-2.323788,-1.252433)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3885-4"
+       id="linearGradient3883-0"
+       x1="8.1800003"
+       y1="10.106667"
+       x2="18.700001"
+       y2="10.106667"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.1429766,0,0,1.1424986,34.566951,-1.4917397)" />
+    <linearGradient
+       id="linearGradient3885-4">
+      <stop
+         style="stop-color:#d7d7d7;stop-opacity:1;"
+         offset="0"
+         id="stop3887-1" />
+      <stop
+         style="stop-color:#d4d4d4;stop-opacity:1;"
+         offset="1"
+         id="stop3889-7" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3961"
+       id="linearGradient3967"
+       x1="30.860857"
+       y1="23.480301"
+       x2="17.047523"
+       y2="24.546968"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3961"
+       id="linearGradient3975"
+       x1="3.0097287"
+       y1="23.240993"
+       x2="15.19564"
+       y2="23.240993"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="8.7199422"
+     inkscape:cy="16.554812"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer6"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1599"
+     inkscape:window-height="990"
+     inkscape:window-x="214"
+     inkscape:window-y="35"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="Layer">
+    <path
+       style="fill:url(#linearGradient3967);fill-opacity:1;stroke:#551f1f;stroke-width:0.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 19.950018,16.286884 -2.652494,2.245168 2.32208,3.159179 c 0,0 -0.527451,3.24619 0.22873,4.66016 1.105756,2.067637 3.678215,4.809379 6.369676,4.24816 1.094569,-0.228236 2.54978,-1.57872 2.712531,-2.68448 0.220716,-1.499587 -0.269923,-3.789582 -1.08806,-5.06577 C 27.263919,21.946819 25.96586,21.068499 25.035848,20.534903 24.259643,20.089549 22.43234,19.435957 22.43234,19.435957 l -2.482322,-3.149073 z m 3.459753,6.008936 c 0.499058,0.09591 1.021836,0.53355 1.424902,0.799132 0.7 [...]
+       id="path3865"
+       sodipodi:nodetypes="cccssssscccscsssc" />
+    <path
+       style="fill:url(#linearGradient3883);fill-opacity:1;stroke:#4e4e4e;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 17.37347,18.566209 c 0,0 -8.6152304,-8.6521771 -9.6391977,-14.3121167 C 7.574868,3.3729914 8.3591107,1.6415621 8.3591107,1.6415621 L 19.933647,16.326744 17.37347,18.566209 z"
+       id="path3873"
+       sodipodi:nodetypes="caccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer7"
+     inkscape:label="left">
+    <path
+       style="fill:url(#linearGradient3975);fill-opacity:1.0;stroke:#551f1f;stroke-width:0.50000000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 12.293146,16.047577 2.652494,2.245168 -2.32208,3.159179 c 0,0 0.527451,3.24619 -0.22873,4.66016 -1.105756,2.067637 -3.6782157,4.809379 -6.3696767,4.24816 -1.094569,-0.228236 -2.54978,-1.57872 -2.712531,-2.68448 -0.220716,-1.499587 0.269923,-3.789582 1.08806,-5.06577 0.578562,-0.902482 1.876621,-1.780802 2.806633,-2.314398 0.776205,-0.445354 2.6035083,-1.098946 2.6035083,-1.098946 l 2.4823224,-3.149073 z m -3.4597537,6.008936 c -0.499058,0.09591 -1.021836,0.53355 -1.424902,0.7 [...]
+       id="path3865-9"
+       sodipodi:nodetypes="cccssssscccscsssc" />
+    <path
+       style="fill:url(#linearGradient3883-0);fill-opacity:1;stroke:#4e4e4e;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 14.869694,18.326902 c 0,0 8.61523,-8.6521764 9.639198,-14.3121164 0.159404,-0.8811009 -0.624839,-2.6125302 -0.624839,-2.6125302 l -11.574536,14.6851816 2.560177,2.239465 z"
+       id="path3873-3"
+       sodipodi:nodetypes="caccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer8"
+     inkscape:label="screw">
+    <path
+       sodipodi:type="arc"
+       style="fill:#848484;fill-opacity:1;fill-rule:evenodd;stroke:#818181;stroke-width:0.60638487;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3938"
+       sodipodi:cx="16.24"
+       sodipodi:cy="14.4"
+       sodipodi:rx="0.88"
+       sodipodi:ry="0.95999998"
+       d="m 17.12,14.4 a 0.88,0.95999998 0 1 1 -1.76,0 0.88,0.95999998 0 1 1 1.76,0 z"
+       transform="matrix(0.98935781,0,0,0.98958336,-0.04987001,0.10666684)" />
+  </g>
+</svg>
diff --git a/src/images/editpaste.svg b/src/images/editpaste.svg
new file mode 100644
index 0000000..354e711
--- /dev/null
+++ b/src/images/editpaste.svg
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="editpaste.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3706">
+      <stop
+         id="stop3708"
+         offset="0"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+      <stop
+         id="stop3710"
+         offset="1"
+         style="stop-color:#fffefb;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3710">
+      <stop
+         id="stop3712"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3710"
+       id="linearGradient3090"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.72601648,0,0,0.71232532,11.187144,24.74439)"
+       x1="2.996588"
+       y1="30.701927"
+       x2="21.976355"
+       y2="5.9961967" />
+    <linearGradient
+       id="linearGradient3650-6">
+      <stop
+         style="stop-color:#e59111;stop-opacity:1;"
+         offset="0"
+         id="stop3652-9" />
+      <stop
+         style="stop-color:#f8e56c;stop-opacity:1"
+         offset="1"
+         id="stop3654-2" />
+    </linearGradient>
+    <linearGradient
+       y2="5.6694412"
+       x2="13.08918"
+       y1="26.634958"
+       x1="13.08918"
+       gradientTransform="matrix(0.89464883,0,0,0.95480226,1.1696858,0.90911403)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3675"
+       xlink:href="#linearGradient3650-6"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3706"
+       id="linearGradient3704"
+       x1="12.423306"
+       y1="5.6367421"
+       x2="12.423306"
+       y2="0.10856482"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0245614,0,0,1.0420146,0.51293991,0.58323042)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="22.464065"
+     inkscape:cy="16.05888"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1438"
+     inkscape:window-height="1096"
+     inkscape:window-x="152"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="paper 2">
+    <path
+       style="fill:none;stroke:#717171;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;stroke-miterlimit:4;stroke-dasharray:none"
+       d="m 24.665907,10.10844 5.535581,5.615569"
+       id="path3783-4-7"
+       sodipodi:nodetypes="cc" />
+    <rect
+       style="fill:url(#linearGradient3675);fill-opacity:1;fill-rule:evenodd;stroke:#ed8c12;stroke-opacity:1;display:inline"
+       id="rect2876"
+       width="20.356718"
+       height="25.72176"
+       x="2.701546"
+       y="3.2342448"
+       ry="0.8719241" />
+    <path
+       style="fill:url(#linearGradient3704);fill-opacity:1;stroke:#999999;stroke-width:0.69999993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 7.686088,5.8961419 11.110583,0.039649 c 0,0 -1.235673,-2.4746752 -2.261102,-3.3304819 C 15.649172,1.8655347 14.524398,1.230427 13.377826,1.2176079 12.031389,1.2025542 10.668471,1.8856562 9.635313,2.763903 8.70312,3.5563234 7.686088,5.8961419 7.686088,5.8961419 z"
+       id="path3696"
+       sodipodi:nodetypes="ccaaac" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="paper"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3090);fill-opacity:1;stroke:#717171;stroke-width:0.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 14.817226,26.169041 0,19.945109 15.246346,0 0,-14.246507 -5.604195,0.05122 0.05221,-5.698602 -9.694359,-0.05123 z"
+       id="path3698"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+</svg>
diff --git a/src/images/exit.svg b/src/images/exit.svg
new file mode 100644
index 0000000..a48d2f7
--- /dev/null
+++ b/src/images/exit.svg
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="exit.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient4000">
+      <stop
+         style="stop-color:#da0a0a;stop-opacity:1;"
+         offset="0"
+         id="stop4002" />
+      <stop
+         style="stop-color:#f9bdbd;stop-opacity:1;"
+         offset="1"
+         id="stop4004" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4000"
+       id="linearGradient4006"
+       x1="0.76666671"
+       y1="30.486666"
+       x2="33.526669"
+       y2="7.0666671"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.93451327,0,0,0.98521257,1.0298524,0.55304991)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="8.7199422"
+     inkscape:cy="16.554812"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer6"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1599"
+     inkscape:window-height="990"
+     inkscape:window-x="797"
+     inkscape:window-y="87"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="Layer">
+    <rect
+       style="fill:url(#linearGradient4006);fill-opacity:1;fill-rule:evenodd;stroke:#bd1b1b;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3998"
+       width="28.160002"
+       height="28.426666"
+       x="2.0266666"
+       y="1.8666666"
+       ry="1.4187062" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer7"
+     inkscape:label="left">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:3.33834791;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       id="rect3809"
+       width="1.4149849"
+       height="17.969641"
+       x="-0.88293612"
+       y="13.929389"
+       ry="0.11241483"
+       transform="matrix(0.69887353,-0.71524526,0.71524526,0.69887353,0,0)" />
+    <rect
+       ry="0.11177491"
+       y="-9.1891193"
+       x="-23.917221"
+       height="17.86735"
+       width="1.4193591"
+       id="rect3811"
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:3.33397388;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       transform="matrix(-0.71524526,-0.69887353,0.69887353,-0.71524526,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer8"
+     inkscape:label="screw" />
+</svg>
diff --git a/src/images/fileInfo.svg b/src/images/fileInfo.svg
new file mode 100644
index 0000000..1a65ee9
--- /dev/null
+++ b/src/images/fileInfo.svg
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="fileInfo.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="4.2024803"
+     inkscape:cy="15.367291"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1408"
+     inkscape:window-height="1096"
+     inkscape:window-x="2082"
+     inkscape:window-y="75"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <text
+       xml:space="preserve"
+       style="font-size:20;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Calibri;-inkscape-font-specification:Calibri"
+       x="3.8399999"
+       y="21.973333"
+       id="text3783"><tspan
+         sodipodi:role="line"
+         id="tspan3785"
+         x="3.8399999"
+         y="21.973333" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="7.2533331"
+       y="15.146667"
+       id="text3787"><tspan
+         sodipodi:role="line"
+         id="tspan3789"
+         x="7.2533331"
+         y="15.146667" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:30px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif"
+       x="10.559999"
+       y="26.773333"
+       id="text3791"><tspan
+         sodipodi:role="line"
+         id="tspan3793"
+         x="10.559999"
+         y="26.773333"
+         style="font-size:30px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif">i</tspan></text>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/filesave.svg b/src/images/filesave.svg
new file mode 100644
index 0000000..57a792a
--- /dev/null
+++ b/src/images/filesave.svg
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="filesave.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient12168">
+      <stop
+         style="stop-color:#858585;stop-opacity:1;"
+         offset="0"
+         id="stop12170" />
+      <stop
+         id="stop12172"
+         offset="0.5"
+         style="stop-color:#cbcbcb;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop12174" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11450">
+      <stop
+         style="stop-color:#191919;stop-opacity:1;"
+         offset="0"
+         id="stop11452" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop11454" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2263">
+      <stop
+         style="stop-color:#3e848c;stop-opacity:1;"
+         offset="0"
+         id="stop2265" />
+      <stop
+         style="stop-color:#b3c7de;stop-opacity:1;"
+         offset="1"
+         id="stop2267" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2263"
+       id="linearGradient7454"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9673902,0,0,-1.1589562,-0.79677103,52.162489)"
+       x1="28.673536"
+       y1="2.2797322"
+       x2="9.2870998"
+       y2="46.581879" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12168"
+       id="linearGradient7458"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0595231,0,0,-1.0264164,-2.3364269,49.429715)"
+       x1="13.444483"
+       y1="41.398193"
+       x2="38.408127"
+       y2="31.618719" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient11450"
+       id="linearGradient11456"
+       x1="19.784695"
+       y1="29.870388"
+       x2="19.784693"
+       y2="42.991951"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.903975,0,0,0.6975501,11.791609,-36.457522)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="27.1875"
+     inkscape:cx="3.6965521"
+     inkscape:cy="18.390381"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1585"
+     inkscape:window-height="1096"
+     inkscape:window-x="198"
+     inkscape:window-y="35"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <g
+       style="display:inline"
+       id="g7418"
+       inkscape:label="Layer 1"
+       transform="matrix(0.75450459,0,0,0.71126951,-2.1666557,-1.4575482)">
+      <path
+         sodipodi:nodetypes="ccccccccc"
+         id="path7428"
+         d="m 6.518876,43.354968 35.286861,0 c 0.534691,0 0.965147,-0.454103 0.965147,-1.018168 l 0,-36.1483706 c 0,-0.5640634 -0.430456,-1.0181674 -0.965147,-1.0181674 l -32.740934,0 c 0,0 -3.6085747,3.8629739 -3.6085747,3.8629739 L 5.553727,42.3368 c 0,0.564065 0.4304565,1.018168 0.965149,1.018168 z"
+         style="fill:url(#linearGradient7454);fill-opacity:1;stroke:#25375f;stroke-width:1.09204853;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+      <path
+         sodipodi:nodetypes="ccccccc"
+         id="path7444"
+         d="m 15.597127,17.861022 17.95215,0 c 0.807146,0 1.456942,-0.646926 1.456942,-1.450506 l 0,-11.3734517 c 0,0 -20.866034,0 -20.866034,0 l 0,11.3734517 c 0,0.80358 0.649796,1.450506 1.456942,1.450506 z"
+         style="fill:url(#linearGradient7458);fill-opacity:1;stroke:#371d1d;stroke-width:0.80249828;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+      <rect
+         ry="0.47095141"
+         rx="0.63196307"
+         y="-14.153564"
+         x="27.560804"
+         height="6.3106155"
+         width="4.2313471"
+         id="rect7446"
+         style="fill:url(#linearGradient11456);fill-opacity:1;stroke:#251818;stroke-width:0.65857965;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         transform="scale(1,-1)" />
+    </g>
+    <g
+       inkscape:groupmode="layer"
+       id="layer3"
+       inkscape:label="white"
+       style="display:inline">
+      <rect
+         y="-27.690033"
+         x="5.7776341"
+         height="12.439459"
+         width="20.560297"
+         id="rect7430"
+         style="fill:#ffffff;fill-opacity:1;stroke:#371d1d;stroke-width:0.63016373;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+         transform="scale(1,-1)" />
+    </g>
+    <g
+       inkscape:groupmode="layer"
+       id="layer2"
+       inkscape:label="label"
+       style="display:inline">
+      <rect
+         style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.4163833;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+         id="rect11357"
+         width="15.208806"
+         height="0.61792487"
+         x="8.3011494"
+         y="-19.845976"
+         rx="0.10916411"
+         ry="0"
+         transform="scale(1,-1)" />
+      <rect
+         transform="scale(1,-1)"
+         ry="0"
+         rx="0.10925798"
+         y="-24.18055"
+         x="8.3313904"
+         height="0.58149546"
+         width="15.221885"
+         id="rect13161"
+         style="fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.4040966;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+    </g>
+  </g>
+</svg>
diff --git a/src/images/filesaveas.svg b/src/images/filesaveas.svg
new file mode 100644
index 0000000..6fda59e
--- /dev/null
+++ b/src/images/filesaveas.svg
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="filesaveas.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3829">
+      <stop
+         style="stop-color:#786535;stop-opacity:1;"
+         offset="0"
+         id="stop3831" />
+      <stop
+         style="stop-color:#cd6938;stop-opacity:1;"
+         offset="1"
+         id="stop3833" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3821">
+      <stop
+         style="stop-color:#050505;stop-opacity:1;"
+         offset="0"
+         id="stop3823" />
+      <stop
+         style="stop-color:#949494;stop-opacity:1;"
+         offset="1"
+         id="stop3825" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12168">
+      <stop
+         style="stop-color:#858585;stop-opacity:1;"
+         offset="0"
+         id="stop12170" />
+      <stop
+         id="stop12172"
+         offset="0.5"
+         style="stop-color:#cbcbcb;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop12174" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11450">
+      <stop
+         style="stop-color:#191919;stop-opacity:1;"
+         offset="0"
+         id="stop11452" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop11454" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2263">
+      <stop
+         style="stop-color:#3e848c;stop-opacity:1;"
+         offset="0"
+         id="stop2265" />
+      <stop
+         style="stop-color:#b3c7de;stop-opacity:1;"
+         offset="1"
+         id="stop2267" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2263"
+       id="linearGradient7454"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9673902,0,0,-1.1589562,-0.79677103,52.162489)"
+       x1="28.673536"
+       y1="2.2797322"
+       x2="9.2870998"
+       y2="46.581879" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12168"
+       id="linearGradient7458"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0595231,0,0,-1.0264164,-2.3364269,49.429715)"
+       x1="13.444483"
+       y1="41.398193"
+       x2="38.408127"
+       y2="31.618719" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient11450"
+       id="linearGradient11456"
+       x1="19.784695"
+       y1="29.870388"
+       x2="19.784693"
+       y2="42.991951"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.903975,0,0,0.6975501,11.791609,-36.457522)" />
+    <linearGradient
+       id="linearGradient3869-6">
+      <stop
+         style="stop-color:#ffad02;stop-opacity:1;"
+         offset="0"
+         id="stop3871-9" />
+      <stop
+         style="stop-color:#c4ba4a;stop-opacity:1;"
+         offset="1"
+         id="stop3873-2" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3869-6"
+       id="linearGradient3031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0884669,-0.47416089,0.46157136,1.1181553,-7.8141323,11.773461)"
+       x1="19.055012"
+       y1="7.0745502"
+       x2="22.446272"
+       y2="10.200515" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3821"
+       id="linearGradient3827"
+       x1="13.555334"
+       y1="23.807344"
+       x2="15.984475"
+       y2="19.714443"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3829"
+       id="linearGradient3835"
+       x1="20.204853"
+       y1="14.127702"
+       x2="18.328623"
+       y2="13.355288"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="27.1875"
+     inkscape:cx="8.3310349"
+     inkscape:cy="18.390381"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer5"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1585"
+     inkscape:window-height="1096"
+     inkscape:window-x="198"
+     inkscape:window-y="35"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <g
+       style="display:inline"
+       id="g7418"
+       inkscape:label="Layer 1"
+       transform="matrix(0.75450459,0,0,0.71126951,-2.1666557,-1.4575482)">
+      <path
+         sodipodi:nodetypes="ccccccccc"
+         id="path7428"
+         d="m 6.518876,43.354968 35.286861,0 c 0.534691,0 0.965147,-0.454103 0.965147,-1.018168 l 0,-36.1483706 c 0,-0.5640634 -0.430456,-1.0181674 -0.965147,-1.0181674 l -32.740934,0 c 0,0 -3.6085747,3.8629739 -3.6085747,3.8629739 L 5.553727,42.3368 c 0,0.564065 0.4304565,1.018168 0.965149,1.018168 z"
+         style="fill:url(#linearGradient7454);fill-opacity:1;stroke:#25375f;stroke-width:1.09204853;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+      <path
+         sodipodi:nodetypes="ccccccc"
+         id="path7444"
+         d="m 15.597127,17.861022 17.95215,0 c 0.807146,0 1.456942,-0.646926 1.456942,-1.450506 l 0,-11.3734517 c 0,0 -20.866034,0 -20.866034,0 l 0,11.3734517 c 0,0.80358 0.649796,1.450506 1.456942,1.450506 z"
+         style="fill:url(#linearGradient7458);fill-opacity:1;stroke:#371d1d;stroke-width:0.80249828;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+      <rect
+         ry="0.47095141"
+         rx="0.63196307"
+         y="-14.153564"
+         x="27.560804"
+         height="6.3106155"
+         width="4.2313471"
+         id="rect7446"
+         style="fill:url(#linearGradient11456);fill-opacity:1;stroke:#251818;stroke-width:0.65857965;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         transform="scale(1,-1)" />
+    </g>
+    <g
+       inkscape:groupmode="layer"
+       id="layer3"
+       inkscape:label="white">
+      <rect
+         y="-27.690033"
+         x="5.7776341"
+         height="12.439459"
+         width="20.560297"
+         id="rect7430"
+         style="fill:#ffffff;fill-opacity:1;stroke:#371d1d;stroke-width:0.63016373;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+         transform="scale(1,-1)" />
+    </g>
+    <g
+       inkscape:groupmode="layer"
+       id="layer2"
+       inkscape:label="label">
+      <rect
+         style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.4163833;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+         id="rect11357"
+         width="15.208806"
+         height="0.61792487"
+         x="8.3011494"
+         y="-19.845976"
+         rx="0.10916411"
+         ry="0"
+         transform="scale(1,-1)" />
+      <rect
+         transform="scale(1,-1)"
+         ry="0"
+         rx="0.10925798"
+         y="-24.18055"
+         x="8.3313904"
+         height="0.58149546"
+         width="15.221885"
+         id="rect13161"
+         style="fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.4040966;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="pencil">
+    <g
+       id="g4016">
+      <path
+         sodipodi:nodetypes="cccccac"
+         id="path3867"
+         d="M 20.627643,0.76015116 13.43532,18.950953 l -0.001,5.07806 4.010906,-3.362709 7.198968,-18.3772475 c 0,0 -1.194687,-0.8032788 -1.861149,-1.0587055 C 22.096384,0.96718296 20.627643,0.76015116 20.627643,0.76015116 z"
+         style="fill:url(#linearGradient3031);fill-opacity:1;stroke:#c6a22a;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccccac"
+         id="path3877"
+         d="M 24.471152,2.3346905 17.287658,20.620719 15.938556,20.322441 23.189372,1.5289365 c 0,0 0.483607,0.2563827 0.714453,0.402877 0.195836,0.1242772 0.567327,0.402877 0.567327,0.402877 z"
+         style="fill:url(#linearGradient3835);fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3883"
+         d="m 13.340389,19.108085 -0.04097,5.072043 4.262629,-3.362811 -4.221661,-1.709232 z"
+         style="fill:#c8a656;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3887"
+         d="m 13.555334,20.697405 6.24e-4,3.109939 2.428517,-2.113485 -2.429141,-0.996454 z"
+         style="fill:url(#linearGradient3827);fill-opacity:1;stroke:none;display:inline" />
+    </g>
+  </g>
+</svg>
diff --git a/src/images/gunsight.svg b/src/images/gunsight.svg
new file mode 100644
index 0000000..3f14b7d
--- /dev/null
+++ b/src/images/gunsight.svg
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2458"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/gunsight_32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="gunsight.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0">
+  <defs
+     id="defs2460">
+    <filter
+       inkscape:collect="always"
+       x="-1.1821257"
+       width="3.3642516"
+       y="-0.039314177"
+       height="1.0786284"
+       id="filter6147">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.47726173"
+         id="feGaussianBlur6149" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       x="-0.024194833"
+       width="1.0483897"
+       y="-0.72611344"
+       height="2.4522269"
+       id="filter6177">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.29257427"
+         id="feGaussianBlur6179" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter7371">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.69225203"
+         id="feGaussianBlur7373" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter7375">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.42111106"
+         id="feGaussianBlur7377" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.412504"
+     inkscape:cx="18.56067"
+     inkscape:cy="15.865453"
+     inkscape:current-layer="layer5"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1180"
+     inkscape:window-height="849"
+     inkscape:window-x="2186"
+     inkscape:window-y="52">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3243" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="circle shadow"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000113;stroke-width:1.22966075;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline;filter:url(#filter7375)"
+       id="path7151"
+       sodipodi:cx="18.406313"
+       sodipodi:cy="17.843506"
+       sodipodi:rx="12.261304"
+       sodipodi:ry="12.031584"
+       d="M 30.667617 17.843506 A 12.261304 12.031584 0 1 1  6.145009,17.843506 A 12.261304 12.031584 0 1 1  30.667617 17.843506 z"
+       transform="matrix(1.012505,0,-8.4974631e-3,1.0318536,-1.9877988,-1.8854839)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000113;stroke-width:2.08310509;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline;filter:url(#filter7371)"
+       id="path7153"
+       sodipodi:cx="18.406313"
+       sodipodi:cy="17.843506"
+       sodipodi:rx="12.261304"
+       sodipodi:ry="12.031584"
+       d="M 30.667617 17.843506 A 12.261304 12.031584 0 1 1  6.145009,17.843506 A 12.261304 12.031584 0 1 1  30.667617 17.843506 z"
+       transform="matrix(0.6159126,0,-5.1638622e-3,0.6277128,5.4087962,5.169076)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#e9ab4e;stroke-width:1.22966075;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2197"
+       sodipodi:cx="18.406313"
+       sodipodi:cy="17.843506"
+       sodipodi:rx="12.261304"
+       sodipodi:ry="12.031584"
+       d="M 30.667617 17.843506 A 12.261304 12.031584 0 1 1  6.145009,17.843506 A 12.261304 12.031584 0 1 1  30.667617 17.843506 z"
+       transform="matrix(1.012505,0,-8.4974631e-3,1.0318536,-2.4413599,-2.4551575)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#e9ab4e;stroke-width:2.08310509;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       id="path3170"
+       sodipodi:cx="18.406313"
+       sodipodi:cy="17.843506"
+       sodipodi:rx="12.261304"
+       sodipodi:ry="12.031584"
+       d="M 30.667617 17.843506 A 12.261304 12.031584 0 1 1  6.145009,17.843506 A 12.261304 12.031584 0 1 1  30.667617 17.843506 z"
+       transform="matrix(0.6159126,0,-5.1638622e-3,0.6277128,4.9552349,4.5994024)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="cross1 shadow"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       style="fill:#d45500;fill-rule:evenodd;stroke:#000000;stroke-width:0.96895629px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;filter:url(#filter6147)"
+       d="M 17.484478,2.8864881 L 17.484478,31.052777 L 17.484478,31.052777 L 17.484478,31.052777 L 17.484478,31.052777"
+       id="path3172"
+       transform="matrix(1.2283071,0,-2.4211798e-2,0.9963444,-3.3512449,-0.3399762)" />
+    <path
+       style="fill:#280b0b;fill-rule:evenodd;stroke:#040302;stroke-width:0.96703655px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;filter:url(#filter6177)"
+       d="M 2.4835183,16.516482 L 30.538308,16.516482"
+       id="path6151"
+       transform="matrix(1,0,0,2.0340868,-0.2279086,-16.906357)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="cross1"
+     style="display:inline">
+    <path
+       style="fill:#280b0b;fill-rule:evenodd;stroke:#e9ab4e;stroke-width:2.06699991;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 2.0335,15.9665 L 30.08829,15.9665"
+       id="path4131" />
+    <path
+       style="fill:#e7cab7;fill-opacity:1;fill-rule:evenodd;stroke:#e9ab4e;stroke-width:2.06900001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 16.424979,2.0345 L 16.424979,30.200789 L 16.424979,30.200789 L 16.424979,30.200789 L 16.424979,30.200789"
+       id="path4134" />
+  </g>
+</svg>
diff --git a/src/images/highlight_scene.svg b/src/images/highlight_scene.svg
new file mode 100644
index 0000000..ccb9b97
--- /dev/null
+++ b/src/images/highlight_scene.svg
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="highlight_scene.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3608">
+      <stop
+         style="stop-color:#92bdbe;stop-opacity:1"
+         offset="0"
+         id="stop3610" />
+      <stop
+         style="stop-color:#ebeeee;stop-opacity:1"
+         offset="1"
+         id="stop3612" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3608"
+       id="linearGradient3614"
+       x1="1.25"
+       y1="35.268987"
+       x2="46.75"
+       y2="35.268987"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.72727271,0,0,1.2845525,1.545455,-27.804864)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="12.145833"
+     inkscape:cx="26.381324"
+     inkscape:cy="24.041166"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-width="1287"
+     inkscape:window-height="840"
+     inkscape:window-x="1911"
+     inkscape:window-y="101"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2845" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <rect
+       style="fill:#dee3e4;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="rect2161-4-3"
+       width="34"
+       height="25"
+       x="9"
+       y="18" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="l1"
+     style="display:inline">
+    <rect
+       style="fill:url(#linearGradient3614);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4,4;stroke-dashoffset:0"
+       id="rect2161"
+       width="32"
+       height="25"
+       x="3"
+       y="5" />
+  </g>
+</svg>
diff --git a/src/images/histogram.svg b/src/images/histogram.svg
new file mode 100644
index 0000000..54ea81a
--- /dev/null
+++ b/src/images/histogram.svg
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="histogram.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.541667"
+     inkscape:cx="24"
+     inkscape:cy="24"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-width="1966"
+     inkscape:window-height="956"
+     inkscape:window-x="128"
+     inkscape:window-y="27"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3896" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="l1"
+     style="display:inline" />
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <rect
+       style="fill:#daa652;fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:1.17260385;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3153"
+       width="11"
+       height="17"
+       x="2"
+       y="28" />
+    <rect
+       y="3"
+       x="24"
+       height="42"
+       width="11.000001"
+       id="rect4670"
+       style="fill:#daa652;fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:1.20156145;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <rect
+       style="fill:#daa652;fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:1.17260396;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect4674"
+       width="11.000001"
+       height="33"
+       x="13"
+       y="12" />
+    <rect
+       y="18"
+       x="35"
+       height="27"
+       width="11.000001"
+       id="rect4678"
+       style="fill:#daa652;fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:1.02990973;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  </g>
+</svg>
diff --git a/src/images/insert_licence.svg b/src/images/insert_licence.svg
new file mode 100644
index 0000000..1975023
--- /dev/null
+++ b/src/images/insert_licence.svg
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="insert_licence.svg"
+   sodipodi:version="0.32"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="21.564063"
+     inkscape:cy="15.831345"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="2222"
+     inkscape:window-y="240"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <rect
+       style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.25920561;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2198"
+       width="29.102459"
+       height="30.249128"
+       x="1.1296028"
+       y="0.62126851" />
+    <text
+       xml:space="preserve"
+       style="font-size:6.55096817px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="2.9268942"
+       y="8.6737432"
+       id="text3171"
+       transform="scale(0.9529241,1.0494015)"><tspan
+         sodipodi:role="line"
+         id="tspan3173"
+         x="2.9268942"
+         y="8.6737432">LICENCE</tspan></text>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#5b5b5b;stroke-width:0.498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 4.7510006,16.25942 L 25.751,16.25942"
+       id="path5153" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#5b5b5b;stroke-width:0.498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 4.7510006,18.382314 L 25.751,18.382314"
+       id="path6124" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#5b5b5b;stroke-width:0.498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 4.7510006,20.50521 L 25.751,20.50521"
+       id="path6126" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#5b5b5b;stroke-width:0.498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 4.7510006,22.628105 L 25.751,22.628105"
+       id="path6128" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#5b5b5b;stroke-width:0.498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 4.7510006,24.751 L 25.751,24.751"
+       id="path6130" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top" />
+</svg>
diff --git a/src/images/key.svg b/src/images/key.svg
new file mode 100644
index 0000000..ea1b177
--- /dev/null
+++ b/src/images/key.svg
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="key.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient4510">
+      <stop
+         style="stop-color:#5f5e52;stop-opacity:1;"
+         offset="0"
+         id="stop4512" />
+      <stop
+         style="stop-color:#5d5e52;stop-opacity:1;"
+         offset="1"
+         id="stop4514" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4320">
+      <stop
+         style="stop-color:#3a3232;stop-opacity:1;"
+         offset="0"
+         id="stop4322" />
+      <stop
+         style="stop-color:#170f0f;stop-opacity:0.50196081;"
+         offset="1"
+         id="stop4324" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4312">
+      <stop
+         style="stop-color:#808080;stop-opacity:1;"
+         offset="0"
+         id="stop4314" />
+      <stop
+         style="stop-color:#808080;stop-opacity:0;"
+         offset="1"
+         id="stop4316" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4300">
+      <stop
+         style="stop-color:#d5d4d3;stop-opacity:1;"
+         offset="0"
+         id="stop4302" />
+      <stop
+         style="stop-color:#d5d4d3;stop-opacity:0;"
+         offset="1"
+         id="stop4304" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4029-9-3">
+      <stop
+         style="stop-color:#a0a0a0;stop-opacity:1"
+         offset="0"
+         id="stop4031-5-9" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop4033-4-1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4029-9-3-4"
+       id="linearGradient4310-8"
+       gradientUnits="userSpaceOnUse"
+       x1="16"
+       y1="17"
+       x2="-3"
+       y2="9"
+       gradientTransform="matrix(0.83983946,-0.67027576,0.67027576,0.83983946,-0.29237046,8.7754415)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4029-9-3-4">
+      <stop
+         style="stop-color:#a0a0a0;stop-opacity:1"
+         offset="0"
+         id="stop4031-5-9-6" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop4033-4-1-6" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4320-2"
+       id="linearGradient4326-7"
+       x1="4.1529493"
+       y1="15.362765"
+       x2="28.208597"
+       y2="15.362765"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4320-2">
+      <stop
+         style="stop-color:#3a3232;stop-opacity:1;"
+         offset="0"
+         id="stop4322-7" />
+      <stop
+         style="stop-color:#170f0f;stop-opacity:0.50196081;"
+         offset="1"
+         id="stop4324-4" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4312-0"
+       id="linearGradient4318-1"
+       x1="4.7266846"
+       y1="35.758335"
+       x2="5.7941823"
+       y2="13.580407"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4312-0">
+      <stop
+         style="stop-color:#808080;stop-opacity:1;"
+         offset="0"
+         id="stop4314-0" />
+      <stop
+         style="stop-color:#808080;stop-opacity:0;"
+         offset="1"
+         id="stop4316-6" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4300-4">
+      <stop
+         style="stop-color:#d5d4d3;stop-opacity:1;"
+         offset="0"
+         id="stop4302-3" />
+      <stop
+         style="stop-color:#d5d4d3;stop-opacity:0;"
+         offset="1"
+         id="stop4304-7" />
+    </linearGradient>
+    <linearGradient
+       y2="8.5"
+       x2="-3.4615383"
+       y1="8.5"
+       x1="-11.538462"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4440"
+       xlink:href="#linearGradient4300-4"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4029-9-3"
+       id="linearGradient4491"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.83983946,-0.67027576,0.67027576,0.83983946,-0.29237046,8.7754415)"
+       x1="16"
+       y1="17"
+       x2="-3"
+       y2="9" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4320"
+       id="linearGradient4493"
+       gradientUnits="userSpaceOnUse"
+       x1="4.1529492"
+       y1="15.362765"
+       x2="28.208598"
+       y2="15.362765" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4312"
+       id="linearGradient4495"
+       gradientUnits="userSpaceOnUse"
+       x1="4.7266846"
+       y1="35.758335"
+       x2="5.7941823"
+       y2="13.580407" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4300"
+       id="linearGradient4497"
+       gradientUnits="userSpaceOnUse"
+       x1="-11.538462"
+       y1="8.5"
+       x2="-3.4615384"
+       y2="8.5" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4510"
+       id="linearGradient4516"
+       x1="1.03125"
+       y1="5.7266711"
+       x2="17.84375"
+       y2="5.7266711"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0152334,0,0,1.0158282,-0.26801323,-0.02918325)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16.270833"
+     inkscape:cx="7.1944503"
+     inkscape:cy="16"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer6"
+     showgrid="true"
+     inkscape:window-width="1393"
+     inkscape:window-height="1042"
+     inkscape:window-x="2120"
+     inkscape:window-y="103"
+     inkscape:window-maximized="0"
+     inkscape:snap-nodes="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="ring back">
+    <path
+       style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#686a57;fill-opacity:1;stroke:#80807e;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline; [...]
+       d="m 23.73783,1.4019889 c 0,0 -0.714549,0.974756 -0.97605,1.236496 -0.5723,0.572821 -2.244913,1.822204 -2.244913,1.822204 l 1.138724,1.594429 c 0,0 1.641234,-1.152693 2.505194,-2.017441 0.55316,-0.553665 1.171259,-1.464271 1.171259,-1.464271 L 23.73783,1.4019889 z"
+       id="path4504-1" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="key">
+    <path
+       id="path3983"
+       d="m -1,6.01887 c -2.811074,0 -5.115895,2.183096 -5.115895,4.905653 0,2.722556 2.304821,4.905653 5.115895,4.905653 2.811074,0 5.115895,-2.183097 5.115895,-4.905653 C 4.115895,8.201966 1.811074,6.01887 -1,6.01887 z M -1,7 c 2.294555,0 4.134765,1.767434 4.134765,3.924523 0,2.157089 -1.84021,3.924522 -4.134765,3.924522 -2.294555,0 -4.134765,-1.767433 -4.134765,-3.924522 C -5.134765,8.767434 -3.294555,7 -1,7 z"
+       style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:none;stroke:none;stroke-width:0.8918283;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera S [...]
+    <g
+       id="g4403"
+       transform="matrix(0.94427091,0,0,0.94427091,4.0967121,2.0568119)">
+      <path
+         style="fill:url(#linearGradient4491);fill-opacity:1;stroke:url(#linearGradient4493);stroke-width:1.05901814;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="M 7.685107,3.2678593 C 4.2063781,6.0442324 3.6370061,11.114994 6.4133793,14.593723 c 1.9254355,2.412525 4.9638087,3.41439 7.7999347,2.882834 l 2.932456,3.674297 3.020231,0.339128 -0.339127,3.02023 3.02023,0.339128 -0.339127,3.02023 5.200621,1.348531 -0.57951,-6.755123 -7.289249,-9.133254 C 21.282804,10.583925 21.069836,7.1192959 19.010971,4.5395871 16.234598,1.0608581 11.163836,0.49148597 7.685107,3.2678593 z m 2.935449,1.094185 C 12.012047,3.2514953 14.040352,3.4792439 15.15 [...]
+         id="path4169-8" />
+      <rect
+         transform="matrix(0.78159274,-0.62378906,0.62378906,0.78159274,0,0)"
+         style="fill:url(#linearGradient4495);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="rect4171-7"
+         width="2.1490462"
+         height="11.819755"
+         x="3.968169"
+         y="22.794291" />
+      <path
+         transform="matrix(-0.70991314,0.53277381,0.53277381,0.70991314,2.7823666,4.8262502)"
+         d="M -4,8.5 C -4,10.432997 -5.5670034,12 -7.5,12 -9.4329966,12 -11,10.432997 -11,8.5 -11,6.5670034 -9.4329966,5 -7.5,5 -5.5670034,5 -4,6.5670034 -4,8.5 z"
+         sodipodi:ry="3.5"
+         sodipodi:rx="3.5"
+         sodipodi:cy="8.5"
+         sodipodi:cx="-7.5"
+         id="path4276-0"
+         style="fill:none;stroke:url(#linearGradient4497);stroke-width:1.1931324;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+         sodipodi:type="arc" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="key1"
+     style="display:inline">
+    <g
+       transform="matrix(0.45793896,0.83037273,-0.83037273,0.45793896,15.058727,-5.2012384)"
+       id="g4403-3">
+      <path
+         style="fill:url(#linearGradient4310-8);fill-opacity:1;stroke:url(#linearGradient4326-7);stroke-width:1.05454552;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="M 7.685107,3.2678593 C 4.2063781,6.0442324 3.6370061,11.114994 6.4133793,14.593723 c 1.9254355,2.412525 4.9638087,3.41439 7.7999347,2.882834 l 2.932456,3.674297 3.020231,0.339128 -0.339127,3.02023 3.02023,0.339128 -0.339127,3.02023 5.200621,1.348531 -0.57951,-6.755123 -7.289249,-9.133254 C 21.282804,10.583925 21.069836,7.1192959 19.010971,4.5395871 16.234598,1.0608581 11.163836,0.49148597 7.685107,3.2678593 z m 2.935449,1.094185 C 12.012047,3.2514953 14.040352,3.4792439 15.15 [...]
+         id="path4169-8-4" />
+      <rect
+         transform="matrix(0.78159274,-0.62378906,0.62378906,0.78159274,0,0)"
+         style="fill:url(#linearGradient4318-1);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="rect4171-7-7"
+         width="2.1490462"
+         height="11.819755"
+         x="3.968169"
+         y="22.794291" />
+      <path
+         transform="matrix(-0.70991314,0.53277381,0.53277381,0.70991314,2.7823666,4.8262502)"
+         d="M -4,8.5 C -4,10.432997 -5.5670034,12 -7.5,12 -9.4329966,12 -11,10.432997 -11,8.5 -11,6.5670034 -9.4329966,5 -7.5,5 -5.5670034,5 -4,6.5670034 -4,8.5 z"
+         sodipodi:ry="3.5"
+         sodipodi:rx="3.5"
+         sodipodi:cy="8.5"
+         sodipodi:cx="-7.5"
+         id="path4276-0-2"
+         style="fill:none;stroke:url(#linearGradient4440);stroke-width:1.18809342;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+         sodipodi:type="arc" />
+    </g>
+    <path
+       style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:url(#linearGradient4516);fill-opacity:1;stroke:#80807e;stroke-width:0.60000002;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility [...]
+       d="M 2.3652484,1.84375 1.0327546,3.2087691 C 1.9926043,4.1615764 2.9008012,5.3829124 4.2053589,6.3514876 5.7558762,7.5026767 7.1979053,8.6991545 9.2180739,9.3037383 11.011751,9.840539 13.261814,9.809575 15.02394,9.5576954 15.978034,9.4213164 16.88257,8.9928989 17.593749,8.6371011 L 16.737146,6.922891 C 16.09468,7.2443119 15.280085,7.5801243 14.770132,7.6530175 13.258547,7.8690845 11.120669,7.8292963 9.7891426,7.4308051 8.1865621,6.9511945 6.9267873,5.9685528 5.3474965,4.7960007 4. [...]
+       id="path4501" />
+  </g>
+</svg>
diff --git a/src/images/layers.svg b/src/images/layers.svg
new file mode 100644
index 0000000..3eb11c4
--- /dev/null
+++ b/src/images/layers.svg
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="layers.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3134">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3136" />
+      <stop
+         style="stop-color:#a6b1b4;stop-opacity:1;"
+         offset="1"
+         id="stop3138" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3134"
+       id="linearGradient3157"
+       gradientUnits="userSpaceOnUse"
+       x1="4.3908644"
+       y1="4.6571741"
+       x2="73.456528"
+       y2="103.58132"
+       gradientTransform="matrix(0.50347246,0,0,0.36013852,-0.86285617,3.2368992)" />
+    <linearGradient
+       id="linearGradient3134-64">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3136-6" />
+      <stop
+         style="stop-color:#a6b1b4;stop-opacity:1;"
+         offset="1"
+         id="stop3138-25" />
+    </linearGradient>
+    <linearGradient
+       y2="103.58132"
+       x2="73.456528"
+       y1="4.6571741"
+       x1="4.3908644"
+       gradientTransform="matrix(0.50347246,0,0,0.36013852,-10.118017,18.588515)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3771"
+       xlink:href="#linearGradient3134-64"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3134-4">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3136-7" />
+      <stop
+         style="stop-color:#a6b1b4;stop-opacity:1;"
+         offset="1"
+         id="stop3138-24" />
+    </linearGradient>
+    <linearGradient
+       y2="103.58132"
+       x2="73.456528"
+       y1="4.6571741"
+       x1="4.3908644"
+       gradientTransform="matrix(0.50347246,0,0,0.36013852,-19.020083,33.529962)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3771-0"
+       xlink:href="#linearGradient3134-4"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.958333"
+     inkscape:cx="23.56546"
+     inkscape:cy="24.134142"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-width="1610"
+     inkscape:window-height="1033"
+     inkscape:window-x="204"
+     inkscape:window-y="35"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3811" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="l3">
+    <rect
+       style="fill:url(#linearGradient3771-0);fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:2.00852919;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="rect2161-6"
+       width="30.870663"
+       height="22.001993"
+       x="-18.253405"
+       y="34.028423"
+       transform="matrix(1,0,0.59579679,0.80313522,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="l2">
+    <rect
+       style="fill:url(#linearGradient3771);fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:2.00852919;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="rect2161-8"
+       width="30.870663"
+       height="22.001993"
+       x="-9.3513403"
+       y="19.086977"
+       transform="matrix(1,0,0.59579679,0.80313522,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="l1"
+     style="display:inline">
+    <rect
+       style="fill:url(#linearGradient3157);fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:2.00852919;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2161"
+       width="30.870663"
+       height="22.001993"
+       x="-0.096178085"
+       y="3.7353611"
+       transform="matrix(1,0,0.59579679,0.80313522,0,0)" />
+  </g>
+</svg>
diff --git a/src/images/log.svg b/src/images/log.svg
new file mode 100644
index 0000000..e7c7384
--- /dev/null
+++ b/src/images/log.svg
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="log.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="13.90625"
+     inkscape:cx="3.087099"
+     inkscape:cy="15.435982"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1213"
+     inkscape:window-height="690"
+     inkscape:window-x="636"
+     inkscape:window-y="12"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="book"
+     style="display:inline">
+    <path
+       style="fill:#5a7e8c;fill-opacity:1;stroke:#23205f;stroke-width:1.04872465000000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 16.56064,27.30401 29.743852,21.813133 22.692367,8.1601396 12.881604,12.018594 3.3347987,7.7103514 5.5756327,23.011803 16.56064,27.30401 z"
+       id="path2875"
+       sodipodi:nodetypes="ccccccc" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="page"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)"
+     style="display:inline">
+    <path
+       style="fill:#f9f9f9;stroke:#6f777b;stroke-width:0.62923479;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 16.790579,42.933004 10.960463,-7.049099 -7.281426,-14.098199 -7.511365,6.307089 3.832328,14.840209 z"
+       id="path3664"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="page2">
+    <path
+       style="fill:#f9f9f9;fill-opacity:1;stroke:#6f777b;stroke-width:0.62923479;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="M 13.264837,12.018593 16.795317,26.870257 21.497451,15.758428 16.362992,1.237932 13.264837,12.018593 z"
+       id="path3660"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#f9f9f9;stroke:#6f777b;stroke-width:0.62923479;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="M 16.790579,27.229809 7.1361197,21.799387 4.546071,5.9762356 l 8.488826,5.9681564 3.755682,15.285417 z"
+       id="path3662"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/src/images/macro.svg b/src/images/macro.svg
new file mode 100644
index 0000000..02c0b57
--- /dev/null
+++ b/src/images/macro.svg
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg2160"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="macro.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/macro.png"
+   inkscape:export-xdpi="45"
+   inkscape:export-ydpi="45"
+   version="1.1">
+  <defs
+     id="defs2162">
+    <linearGradient
+       id="linearGradient3143">
+      <stop
+         style="stop-color:#ec6a4e;stop-opacity:1"
+         offset="0"
+         id="stop3145" />
+      <stop
+         style="stop-color:#f1a394;stop-opacity:1"
+         offset="1"
+         id="stop3147" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3143"
+       id="linearGradient3152"
+       x1="12.037533"
+       y1="15.457104"
+       x2="50.160858"
+       y2="45.912868"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0026322,0,0,0.7350282,-8.4226285e-2,8.0357927)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.65625"
+     inkscape:cx="32"
+     inkscape:cy="33.418031"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1166"
+     inkscape:window-height="956"
+     inkscape:window-x="2072"
+     inkscape:window-y="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="bg">
+    <path
+       style="fill:url(#linearGradient3152);fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:0.94039041px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 2.4701952,49.529805 L 61.529803,49.529805 L 61.529803,12.470196 L 18.674981,12.619931 L 2.4701952,24.598794 L 2.4701952,49.529805 z "
+       id="path2169"
+       sodipodi:nodetypes="cccccc" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="holes"
+     inkscape:groupmode="layer">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3151"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,6.5395477,15.213011)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3156"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,6.5395477,23.773008)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3158"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,25.486737,23.773008)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3160"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,6.5395477,32.333006)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3162"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,36.456161,15.213011)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3164"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,45.431144,15.213011)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3166"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,25.486737,32.333006)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3168"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,25.486737,7.9427495)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3170"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,16.054581,23.773008)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3172"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,25.486737,15.213011)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3174"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,36.456161,32.333006)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#040d02;fill-opacity:1;fill-rule:evenodd;stroke:#040d02;stroke-width:1.64576399;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3176"
+       sodipodi:cx="17.818182"
+       sodipodi:cy="29.454546"
+       sodipodi:rx="3.2727273"
+       sodipodi:ry="3.090909"
+       d="M 21.090909 29.454546 A 3.2727273 3.090909 0 1 1  14.545455,29.454546 A 3.2727273 3.090909 0 1 1  21.090909 29.454546 z"
+       transform="matrix(0.4377048,0,0,0.3789124,45.431144,23.773008)" />
+  </g>
+</svg>
diff --git a/src/images/magnifier.svg b/src/images/magnifier.svg
new file mode 100644
index 0000000..aa394fe
--- /dev/null
+++ b/src/images/magnifier.svg
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32px"
+   height="32px"
+   id="svg2458"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/magnifier_32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="magnifier.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs2460">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient19371">
+      <stop
+         style="stop-color:#eac98a;stop-opacity:1"
+         offset="0"
+         id="stop19373" />
+      <stop
+         style="stop-color:#df8828;stop-opacity:0.98823529"
+         offset="1"
+         id="stop19375" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3395">
+      <stop
+         style="stop-color:#293859;stop-opacity:1"
+         offset="0"
+         id="stop3397" />
+      <stop
+         id="stop3409"
+         offset="0.4180212"
+         style="stop-color:#a8b6db;stop-opacity:0.49803922;" />
+      <stop
+         style="stop-color:#cacfe0;stop-opacity:0.20707071"
+         offset="1"
+         id="stop3399" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3353">
+      <stop
+         style="stop-color:#e1e251;stop-opacity:1"
+         offset="0"
+         id="stop3355" />
+      <stop
+         style="stop-color:#e8e5ba;stop-opacity:0.97647059"
+         offset="1"
+         id="stop3357" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3353"
+       id="linearGradient3361"
+       x1="4.5406423"
+       y1="11.025381"
+       x2="20.880678"
+       y2="11.025381"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3395"
+       id="linearGradient3401"
+       x1="3.8413179"
+       y1="13.044749"
+       x2="22.375635"
+       y2="13.380711"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient19371"
+       id="linearGradient19377"
+       x1="6.1605738"
+       y1="18.068695"
+       x2="31.535086"
+       y2="18.068695"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       inkscape:collect="always"
+       id="filter19454">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.57079813"
+         id="feGaussianBlur19456" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.412504"
+     inkscape:cx="18.56067"
+     inkscape:cy="15.865453"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="931"
+     inkscape:window-height="849"
+     inkscape:window-x="91"
+     inkscape:window-y="26">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3243" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer9"
+     inkscape:label="shadow"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#0b0a09;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.31299996;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter19454)"
+       id="path19380"
+       sodipodi:cx="17.142853"
+       sodipodi:cy="15.804742"
+       sodipodi:rx="11.974154"
+       sodipodi:ry="11.428569"
+       d="M 29.117007 15.804742 A 11.974154 11.428569 0 1 1  5.1686983,15.804742 A 11.974154 11.428569 0 1 1  29.117007 15.804742 z"
+       transform="matrix(1.0021584,0,0,1.0692214,0.3607054,-0.6790978)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.31299996;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path19458"
+       sodipodi:cx="15.161518"
+       sodipodi:cy="15.718596"
+       sodipodi:rx="11.830579"
+       sodipodi:ry="11.399854"
+       d="M 26.992097 15.718596 A 11.830579 11.399854 0 1 1  3.3309393,15.718596 A 11.830579 11.399854 0 1 1  26.992097 15.718596 z"
+       transform="matrix(0.9540657,0,0,0.9649247,2.822065,0.8327384)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="text"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <text
+       xml:space="preserve"
+       style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="2.8567436"
+       y="20.635447"
+       id="text2202"
+       transform="scale(1.0554392,0.9474729)"><tspan
+         sodipodi:role="line"
+         id="tspan2204"
+         x="2.8567436"
+         y="20.635447">ag</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="-0.12109375"
+       y="18.369726"
+       id="text2206"><tspan
+         sodipodi:role="line"
+         id="tspan2208"
+         x="-0.12109375"
+         y="18.369726"
+         style="font-size:8px">M</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="26.781666"
+       y="17"
+       id="text2210"><tspan
+         sodipodi:role="line"
+         id="tspan2212"
+         x="26.781666"
+         y="17"
+         style="font-size:8px">n</tspan></text>
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="lens"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient19377);stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2468"
+       sodipodi:cx="17.726692"
+       sodipodi:cy="18.068695"
+       sodipodi:rx="10.225221"
+       sodipodi:ry="9.2875366"
+       d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+       transform="matrix(1.1013322,0,0,1.1814466,-3.3138853,-5.8449262)" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient3401);fill-opacity:1;stroke:none;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3393"
+       sodipodi:cx="15.512691"
+       sodipodi:cy="13.380711"
+       sodipodi:rx="6.8629441"
+       sodipodi:ry="6.8832488"
+       d="M 22.375635 13.380711 A 6.8629441 6.8832488 0 1 1  8.6497464,13.380711 A 6.8629441 6.8832488 0 1 1  22.375635 13.380711 z"
+       transform="matrix(1.4212897,0,0,1.367537,-5.9294917,-2.7888247)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="frame"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3361);stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3341"
+       sodipodi:cx="12.71066"
+       sodipodi:cy="11.025381"
+       sodipodi:rx="7.6345177"
+       sodipodi:ry="7.3299494"
+       d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+       transform="matrix(1.4575222,0,0,1.4832711,-2.4279253,-0.816943)" />
+  </g>
+</svg>
diff --git a/src/images/magnifier_handler.png b/src/images/magnifier_handler.png
new file mode 100644
index 0000000..eefbb06
Binary files /dev/null and b/src/images/magnifier_handler.png differ
diff --git a/src/images/meta_data.svg b/src/images/meta_data.svg
new file mode 100644
index 0000000..58dbd47
--- /dev/null
+++ b/src/images/meta_data.svg
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="meta_data.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.958333"
+     inkscape:cx="23.56546"
+     inkscape:cy="25.107521"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer5"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-width="1610"
+     inkscape:window-height="1033"
+     inkscape:window-x="214"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3811" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="circle">
+    <path
+       sodipodi:type="arc"
+       style="fill:#ececec;fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:3.71428585;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3835"
+       sodipodi:cx="22.5"
+       sodipodi:cy="24.5"
+       sodipodi:rx="19.5"
+       sodipodi:ry="19.5"
+       d="m 42,24.5 a 19.5,19.5 0 1 1 -39,0 19.5,19.5 0 1 1 39,0 z"
+       transform="matrix(1.0769231,0,0,1.0769231,-0.2307702,-2.3846159)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="text">
+    <text
+       xml:space="preserve"
+       style="font-size:52.47582245px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr;text-anchor:start;fill:#24344d;fill-opacity:1;stroke:none;font-family:Credit River;-inkscape-font-specification:Credit River Bold"
+       x="18"
+       y="38"
+       id="text3838"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3840"
+         x="18"
+         y="38">i</tspan></text>
+  </g>
+</svg>
diff --git a/src/images/metview_logo.png b/src/images/metview_logo.png
new file mode 100644
index 0000000..bf204e0
Binary files /dev/null and b/src/images/metview_logo.png differ
diff --git a/src/images/monitor.svg b/src/images/monitor.svg
new file mode 100644
index 0000000..1edb56d
--- /dev/null
+++ b/src/images/monitor.svg
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="monitor.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         style="stop-color:#0ce83c;stop-opacity:1"
+         offset="0"
+         id="stop3758" />
+      <stop
+         style="stop-color:#00c600;stop-opacity:1"
+         offset="1"
+         id="stop3760" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3750">
+      <stop
+         id="stop3752"
+         offset="0"
+         style="stop-color:#727272;stop-opacity:1;" />
+      <stop
+         style="stop-color:#0e0d0d;stop-opacity:1;"
+         offset="0.31103334"
+         id="stop3798" />
+      <stop
+         id="stop3754"
+         offset="1"
+         style="stop-color:#919191;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3750"
+       id="linearGradient3748"
+       x1="6.9599886"
+       y1="3.8620682"
+       x2="24.202913"
+       y2="28.274254"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0.53269917,13.070156)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3763"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.89494682,0,0,0.88495575,2.5170643,-1.0721329)"
+       x1="3.9946434"
+       y1="12.26528"
+       x2="27.072405"
+       y2="12.49358" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="15.499443"
+     inkscape:cy="16.184033"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1438"
+     inkscape:window-height="1096"
+     inkscape:window-x="2006"
+     inkscape:window-y="75"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="base">
+    <path
+       style="fill:#4d5e5f;fill-opacity:1;stroke:#39525c;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline"
+       d="m 6.2782394,29.693355 19.4815696,0.04267 c 0,0 -4.188195,-1.05274 -5.704064,-2.432351 -0.601832,-0.547735 -1.140812,-2.133642 -1.140812,-2.133642 l -5.704063,1e-6 c 0,0 -0.736849,1.61742 -1.404078,2.176314 -1.523569,1.276198 -4.0367207,1.650016 -5.5285526,2.347006 z"
+       id="path3765"
+       sodipodi:nodetypes="ccaccac" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="screen"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)"
+     style="display:inline">
+    <rect
+       style="fill:url(#linearGradient3748);fill-opacity:1;fill-rule:evenodd;stroke:#466069;stroke-width:1.69999999999999996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3740"
+       width="29.907253"
+       height="22.030916"
+       x="1.1414982"
+       y="18.663494"
+       ry="3.1961939" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="graph"
+     style="display:inline">
+    <path
+       style="fill:none;stroke:url(#linearGradient3763);stroke-width:1.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 3.5386444,16.63961 c 0,0 2.6901612,2.862163 2.6901612,2.862163 0,0 2.3836383,-4.074373 2.3836383,-4.074373 0,0 1.9669941,3.400923 1.9669941,3.400923 0,0 4.620415,-6.869193 4.620415,-6.869193 0,0 5.535391,8.283438 5.535391,8.283438 0,0 3.291759,-7.609988 4.937638,-11.4149818 1.157791,3.5243898 2.315582,7.0487798 3.473373,10.5731698"
+       id="path3720"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+</svg>
diff --git a/src/images/overwrite_steps.svg b/src/images/overwrite_steps.svg
new file mode 100644
index 0000000..a1feea9
--- /dev/null
+++ b/src/images/overwrite_steps.svg
@@ -0,0 +1,259 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="overwrite_steps.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3630">
+      <stop
+         style="stop-color:#f6e1c0;stop-opacity:1;"
+         offset="0"
+         id="stop3632" />
+      <stop
+         style="stop-color:#f5e7d1;stop-opacity:1;"
+         offset="1"
+         id="stop3634" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3630"
+       id="linearGradient3636"
+       x1="13.045778"
+       y1="7.4768147"
+       x2="20.514267"
+       y2="32.043404"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.66985248,0,0,0.94377063,16.281271,0.02521365)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3630"
+       id="linearGradient3644"
+       x1="2.0493469"
+       y1="7.4387646"
+       x2="10.126635"
+       y2="30.458979"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.70225464,0,0,0.94234674,16.167792,0.06647306)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3869-6-3"
+       id="linearGradient3031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0884669,-0.47416089,0.46157136,1.1181553,-7.8141323,11.773461)"
+       x1="19.055012"
+       y1="7.0745502"
+       x2="22.446272"
+       y2="10.200515" />
+    <linearGradient
+       id="linearGradient3869-6-3">
+      <stop
+         style="stop-color:#ffad02;stop-opacity:1;"
+         offset="0"
+         id="stop3871-9-9" />
+      <stop
+         style="stop-color:#c4ba4a;stop-opacity:1;"
+         offset="1"
+         id="stop3873-2-4" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3829-9"
+       id="linearGradient3835"
+       x1="20.204853"
+       y1="14.127702"
+       x2="18.328623"
+       y2="13.355288"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3829-9">
+      <stop
+         style="stop-color:#786535;stop-opacity:1;"
+         offset="0"
+         id="stop3831-5" />
+      <stop
+         style="stop-color:#cd6938;stop-opacity:1;"
+         offset="1"
+         id="stop3833-5" />
+    </linearGradient>
+    <linearGradient
+       y2="19.714443"
+       x2="15.984475"
+       y1="23.807344"
+       x1="13.555334"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4051"
+       xlink:href="#linearGradient3821-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3821-7">
+      <stop
+         style="stop-color:#050505;stop-opacity:1;"
+         offset="0"
+         id="stop3823-3" />
+      <stop
+         style="stop-color:#949494;stop-opacity:1;"
+         offset="1"
+         id="stop3825-9" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11462">
+      <stop
+         id="stop11464"
+         offset="0"
+         style="stop-color:#b3caff;stop-opacity:1;" />
+      <stop
+         id="stop11466"
+         offset="1"
+         style="stop-color:#5a98ec;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="13.539209"
+       x2="25.816109"
+       y1="13.5"
+       x1="-0.5"
+       gradientTransform="matrix(-0.4901308,0,0,0.48520668,20.224138,10.381934)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient2990"
+       xlink:href="#linearGradient11462"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="17.267038"
+     inkscape:cy="15.883455"
+     inkscape:current-layer="layer4"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1513"
+     inkscape:window-height="1152"
+     inkscape:window-x="2340"
+     inkscape:window-y="185"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="Layer">
+    <rect
+       ry="0"
+       y="2.3971286"
+       x="17.236624"
+       height="27.358311"
+       width="6.9206729"
+       id="rect3622"
+       style="fill:url(#linearGradient3644);fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <rect
+       style="fill:url(#linearGradient3636);fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3624"
+       width="6.4994006"
+       height="27.399651"
+       x="23.978601"
+       y="2.3953011"
+       ry="0" />
+    <rect
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:0.99999988;stroke-opacity:1"
+       id="rect3626"
+       width="6.7127609"
+       height="3.8724737"
+       x="17.236622"
+       y="2.4329848" />
+    <rect
+       y="2.3971286"
+       x="23.890947"
+       height="3.8724737"
+       width="6.5958886"
+       id="rect3628"
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:1;stroke-opacity:1" />
+    <rect
+       style="fill:#ffb380;fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2855"
+       width="6.3543396"
+       height="27.395958"
+       x="1.5219982"
+       y="2.2829964"
+       ry="0" />
+    <rect
+       y="2.318902"
+       x="1.5219975"
+       height="3.8778026"
+       width="6.3298063"
+       id="rect2859"
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:1;stroke-opacity:1" />
+    <path
+       style="fill:url(#linearGradient2990);fill-opacity:1;stroke:#25557e;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 20.186088,16.80377 -6.803805,-6.1266 0.03805,3.548368 -7.390012,0 0.03805,5.294455 7.2378119,0.03805 0,3.324835 6.879905,-6.079108 z"
+       id="path4788"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="pencil" />
+</svg>
diff --git a/src/images/player_end.svg b/src/images/player_end.svg
new file mode 100644
index 0000000..bbb7962
--- /dev/null
+++ b/src/images/player_end.svg
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="player_end.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="20.240115"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="310"
+     inkscape:window-y="190"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item">
+    <path
+       sodipodi:type="star"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="path3872"
+       sodipodi:sides="3"
+       sodipodi:cx="5.8133335"
+       sodipodi:cy="7.4133334"
+       sodipodi:r1="9.3406448"
+       sodipodi:r2="4.6703224"
+       sodipodi:arg1="2.0906507"
+       sodipodi:arg2="3.1378482"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 1.1733331,15.52 1.1127546,-0.65835807 15.153913,7.3783584 1.1733331,15.52 z"
+       transform="matrix(0.6690081,0,0,1.0507865,8.5816473,8.7051273)" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3895"
+       width="3.9608102"
+       height="14.52"
+       x="20.160002"
+       y="9.2666674" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/player_next.svg b/src/images/player_next.svg
new file mode 100644
index 0000000..6349240
--- /dev/null
+++ b/src/images/player_next.svg
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="player_next.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="20.240115"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="2113"
+     inkscape:window-y="131"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3895"
+       width="3.791712"
+       height="13.900102"
+       x="-5.1273565"
+       y="13.769272"
+       transform="matrix(-0.71569124,0.69841681,0.69841681,0.71569124,0,0)" />
+    <rect
+       transform="matrix(-0.71569124,-0.69841681,0.69841681,-0.71569124,0,0)"
+       y="-9.3413725"
+       x="-27.754707"
+       height="13.900102"
+       width="3.791712"
+       id="rect3941"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/player_play.svg b/src/images/player_play.svg
new file mode 100644
index 0000000..25302cb
--- /dev/null
+++ b/src/images/player_play.svg
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="player_play.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="10.746782"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="2040"
+     inkscape:window-y="130"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item">
+    <path
+       sodipodi:type="star"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="path3872"
+       sodipodi:sides="3"
+       sodipodi:cx="5.8133335"
+       sodipodi:cy="7.4133334"
+       sodipodi:r1="9.3406448"
+       sodipodi:r2="4.6703224"
+       sodipodi:arg1="2.0906507"
+       sodipodi:arg2="3.1378482"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 1.1733331,15.52 1.1127546,-0.65835807 15.153913,7.3783584 1.1733331,15.52 z"
+       transform="matrix(0.87411631,0,0,1.1970725,10.060078,7.2347687)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/player_prev.svg b/src/images/player_prev.svg
new file mode 100644
index 0000000..8b2ac4f
--- /dev/null
+++ b/src/images/player_prev.svg
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="player_prev.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="20.240115"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="2113"
+     inkscape:window-y="131"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3895"
+       width="3.791712"
+       height="13.900102"
+       x="17.483927"
+       y="-8.2962484"
+       transform="matrix(0.71569124,0.69841681,-0.69841681,0.71569124,0,0)" />
+    <rect
+       transform="matrix(0.71569124,-0.69841681,-0.69841681,-0.71569124,0,0)"
+       y="-31.406893"
+       x="-5.143424"
+       height="13.900102"
+       width="3.791712"
+       id="rect3941"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/player_start.svg b/src/images/player_start.svg
new file mode 100644
index 0000000..44c88d3
--- /dev/null
+++ b/src/images/player_start.svg
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="player_start.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="20.240115"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="310"
+     inkscape:window-y="190"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item">
+    <path
+       sodipodi:type="star"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="path3872"
+       sodipodi:sides="3"
+       sodipodi:cx="5.8133335"
+       sodipodi:cy="7.4133334"
+       sodipodi:r1="9.3406448"
+       sodipodi:r2="4.6703224"
+       sodipodi:arg1="2.0906507"
+       sodipodi:arg2="3.1378482"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 1.1733331,15.52 1.1127546,-0.65835807 15.153913,7.3783584 1.1733331,15.52 z"
+       transform="matrix(-0.6690081,0,0,1.0507865,22.610847,8.651794)" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       id="rect3895"
+       width="3.9608102"
+       height="14.52"
+       x="7.9466686"
+       y="9.2133341" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/player_stop.svg b/src/images/player_stop.svg
new file mode 100644
index 0000000..d129d3c
--- /dev/null
+++ b/src/images/player_stop.svg
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="player_stop.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="10.586782"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1382"
+     inkscape:window-height="888"
+     inkscape:window-x="2251"
+     inkscape:window-y="99"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:none"
+       id="rect3809"
+       width="13.2"
+       height="13.253333"
+       x="9.5887995"
+       y="9.4133348"
+       ry="0" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/print.svg b/src/images/print.svg
new file mode 100644
index 0000000..b09e7ae
--- /dev/null
+++ b/src/images/print.svg
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="24"
+   height="24"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="print.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   style="display:inline">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3623">
+      <stop
+         style="stop-color:#c9c9c9;stop-opacity:1;"
+         offset="0"
+         id="stop3625" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop3627" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4633">
+      <stop
+         style="stop-color:#d2d2d2;stop-opacity:1;"
+         offset="0"
+         id="stop4635" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop4637" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7165">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop7167" />
+      <stop
+         style="stop-color:#95c4e6;stop-opacity:1;"
+         offset="1"
+         id="stop7169" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7165"
+       id="linearGradient7171"
+       x1="3.6199553"
+       y1="8.1005716"
+       x2="17.599459"
+       y2="14.912779"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0064674,0,0,0.8439275,0.12112278,1.9888448)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4633"
+       id="linearGradient4639"
+       x1="6.5343666"
+       y1="1.0500693"
+       x2="15.471074"
+       y2="9.1029615"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0.11900827,0)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3623"
+       id="linearGradient3629"
+       x1="17.384298"
+       y1="25.293703"
+       x2="9.2628098"
+       y2="20.295353"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1477318,0.19834712,-3.4346316)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3623"
+       id="linearGradient3645"
+       x1="33.123966"
+       y1="17.077766"
+       x2="-0.99173558"
+       y2="8.9032192"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.72791961,0.11900827,5.6183458)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="50"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="25.208333"
+     inkscape:cx="25.064764"
+     inkscape:cy="12.887302"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer12"
+     width="24px"
+     height="24px"
+     showgrid="true"
+     inkscape:window-width="1493"
+     inkscape:window-height="1013"
+     inkscape:window-x="344"
+     inkscape:window-y="80"
+     inkscape:grid-bbox="false"
+     inkscape:window-maximized="0"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4121" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer12"
+     inkscape:label="rectangle"
+     style="display:inline">
+    <rect
+       style="fill:url(#linearGradient3645);fill-opacity:1;stroke:#5f6d7b;stroke-width:1.04637336999999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2219"
+       width="21.821478"
+       height="9.1272631"
+       x="1.2082694"
+       y="11.52232"
+       ry="2.1110678"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="paper"
+     style="display:inline">
+    <rect
+       style="fill:url(#linearGradient4639);fill-opacity:1;stroke:#585858;stroke-width:0.72299999;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect5217"
+       width="8.2314062"
+       height="9.5884304"
+       x="7.8876019"
+       y="1.4115694" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer7"
+     inkscape:label="topmiddle"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient7171);fill-opacity:1;fill-rule:evenodd;stroke:#545d67;stroke-width:0.92162113999999995px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 7.1586777,9.2859504 c 0,0 -1.1978671,4.5780556 -1.1978671,4.5780556 0,0 2.5289078,0.192544 5.7425334,0.24507 2.259596,0.03693 4.919216,-0.174093 6.613531,-0.32441 L 17.158678,9.3256198 C 13.780939,9.3620198 7.1586777,9.2859504 7.1586777,9.2859504 z"
+       id="path2192"
+       sodipodi:nodetypes="ccsccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer9"
+     inkscape:label="traybox"
+     style="display:inline">
+    <rect
+       style="fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none"
+       id="rect2204"
+       width="14.912128"
+       height="2.9517994"
+       x="4.5249262"
+       y="15.969557"
+       ry="0" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer8"
+     inkscape:label="tray"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3629);fill-opacity:1;fill-rule:evenodd;stroke:#585858;stroke-width:0.73199999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="M 7.1787503,17.085258 4.6802975,22.61147 C 10.7048,22.68893 14.476405,22.52405 19.795735,22.59926 l -2.575311,-5.514003 -10.0416737,0 z"
+       id="path2201"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/src/images/profile.svg b/src/images/profile.svg
new file mode 100644
index 0000000..20f2a28
--- /dev/null
+++ b/src/images/profile.svg
@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="profile.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4861">
+      <stop
+         style="stop-color:#e68740;stop-opacity:1;"
+         offset="0"
+         id="stop4863" />
+      <stop
+         style="stop-color:#e68740;stop-opacity:0;"
+         offset="1"
+         id="stop4865" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4853">
+      <stop
+         style="stop-color:#e67f40;stop-opacity:1;"
+         offset="0"
+         id="stop4855" />
+      <stop
+         style="stop-color:#e67f40;stop-opacity:0;"
+         offset="1"
+         id="stop4857" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4845">
+      <stop
+         style="stop-color:#e6b940;stop-opacity:1;"
+         offset="0"
+         id="stop4847" />
+      <stop
+         style="stop-color:#e6b940;stop-opacity:0;"
+         offset="1"
+         id="stop4849" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4837">
+      <stop
+         style="stop-color:#e6b940;stop-opacity:1;"
+         offset="0"
+         id="stop4839" />
+      <stop
+         style="stop-color:#e6b940;stop-opacity:0;"
+         offset="1"
+         id="stop4841" />
+    </linearGradient>
+    <linearGradient
+       y2="5.3949285"
+       x2="-2.1777394"
+       y1="5.868176"
+       x1="34.234921"
+       gradientTransform="matrix(0.7826755,0,0,0.4880342,0.477191,0.7718313)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient10515"
+       xlink:href="#linearGradient5774"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="37.150795"
+       x2="14.976191"
+       y1="6.0793653"
+       x1="15.444444"
+       gradientTransform="matrix(0.7580546,0,0,0.6650478,0.868119,1.0219346)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient10513"
+       xlink:href="#linearGradient5790"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         id="stop5776"
+         offset="0"
+         style="stop-color:#304fdc;stop-opacity:1;" />
+      <stop
+         id="stop5778"
+         offset="1"
+         style="stop-color:#8fbac7;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="71.243797"
+       x2="43.653599"
+       y1="98.746101"
+       x1="51.9683"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient5790">
+      <stop
+         id="stop5792"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5800"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4837"
+       id="linearGradient4843"
+       x1="3.8934064"
+       y1="10.058296"
+       x2="25.999999"
+       y2="10.058296"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0348886,0,0,1,-1.0292432,0.8834081)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4845"
+       id="linearGradient4851"
+       x1="3.9999986"
+       y1="18.058296"
+       x2="25.999999"
+       y2="18.058296"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0348886,0,0,1,-1.0292432,0.8834081)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4853"
+       id="linearGradient4859"
+       x1="3.9999986"
+       y1="22.058296"
+       x2="26.999999"
+       y2="22.058296"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0348886,0,0,1,-1.0292432,0.8834081)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4861"
+       id="linearGradient4867"
+       x1="3.8934064"
+       y1="14.058296"
+       x2="26.999999"
+       y2="14.058296"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0348886,0,0,1,-1.0292432,0.8834081)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="24"
+     inkscape:cx="9.873597"
+     inkscape:cy="15.794088"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer4"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1445"
+     inkscape:window-height="978"
+     inkscape:window-x="2082"
+     inkscape:window-y="42"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="prof header"
+     style="display:inline">
+    <g
+       id="g3845"
+       transform="translate(1.0000014,1)">
+      <g
+         style="display:inline"
+         inkscape:label="rect"
+         id="layer14"
+         transform="matrix(1.2361243,0,0,1.2247586,-1.23828,0.7736482)">
+        <g
+           transform="translate(2.6328225,1)"
+           id="g10484">
+          <g
+             id="layer13"
+             inkscape:label="rect">
+            <g
+               transform="translate(-2.632824,-1.0000001)"
+               id="use10505"
+               inkscape:label="rect#1"
+               style="display:inline">
+              <rect
+                 style="fill:url(#linearGradient10513);fill-opacity:1;fill-rule:evenodd;stroke:#2f27c4;stroke-width:0.50212628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+                 id="rect10509"
+                 width="23.497875"
+                 height="20.620165"
+                 x="1.2510631"
+                 y="1.3526168" />
+              <rect
+                 style="fill:url(#linearGradient10515);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:0.5197314;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+                 id="rect10511"
+                 width="23.480268"
+                 height="3.9202135"
+                 x="1.2598658"
+                 y="1.2598658" />
+            </g>
+          </g>
+          <g
+             inkscape:label="Layer 1"
+             id="g10501"
+             style="display:inline" />
+        </g>
+      </g>
+      <g
+         style="display:inline"
+         inkscape:label="add"
+         id="layer7" />
+      <rect
+         style="fill:url(#linearGradient4843);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="rect3860"
+         width="22.877859"
+         height="2.1165919"
+         x="2.9999986"
+         y="9.8834076"
+         rx="1.9139456"
+         ry="0" />
+      <rect
+         ry="0"
+         rx="2.0005238"
+         y="13.883408"
+         x="2.9999986"
+         height="2.1165919"
+         width="23.912748"
+         id="rect4831"
+         style="fill:url(#linearGradient4867);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <rect
+         style="fill:url(#linearGradient4851);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="rect4833"
+         width="22.76755"
+         height="2.1165919"
+         x="3.1103096"
+         y="17.883408"
+         rx="1.904717"
+         ry="0" />
+      <rect
+         ry="0"
+         rx="1.9912951"
+         y="21.883408"
+         x="3.1103096"
+         height="2.1165919"
+         width="23.802437"
+         id="rect4835"
+         style="fill:url(#linearGradient4859);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </g>
+  </g>
+</svg>
diff --git a/src/images/profile_add.svg b/src/images/profile_add.svg
new file mode 100644
index 0000000..0e16873
--- /dev/null
+++ b/src/images/profile_add.svg
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="profile_add.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   style="display:inline">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5790"
+       gradientUnits="userSpaceOnUse"
+       x1="51.9683"
+       y1="98.746101"
+       x2="43.653599"
+       y2="71.243797">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop5792" />
+      <stop
+         offset="1"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         id="stop5800" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         style="stop-color:#304fdc;stop-opacity:1;"
+         offset="0"
+         id="stop5776" />
+      <stop
+         style="stop-color:#8fbac7;stop-opacity:1;"
+         offset="1"
+         id="stop5778" />
+    </linearGradient>
+    <linearGradient
+       y2="5.3949285"
+       x2="-2.1777394"
+       y1="5.868176"
+       x1="34.234921"
+       gradientTransform="matrix(0.7653975,0,0,0.5168907,0.7536402,0.5021448)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3776"
+       xlink:href="#linearGradient5774"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="37.150795"
+       x2="14.976191"
+       y1="6.0793653"
+       x1="15.444444"
+       gradientTransform="matrix(0.742259,0,0,0.6653783,1.1209128,1.0166462)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3774"
+       xlink:href="#linearGradient5790"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3608">
+      <stop
+         id="stop3610"
+         offset="0"
+         style="stop-color:#2eaf1d;stop-opacity:1;" />
+      <stop
+         id="stop3612"
+         offset="1"
+         style="stop-color:#91ff44;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="8"
+       x2="7"
+       y1="26"
+       x1="24"
+       gradientTransform="matrix(0.80827886,0,0,0.85185185,5.3006542,4.9259263)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3038"
+       xlink:href="#linearGradient3608"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.4375"
+     inkscape:cx="13.415042"
+     inkscape:cy="15.49508"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer14"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1536"
+     inkscape:window-height="1029"
+     inkscape:window-x="351"
+     inkscape:window-y="26"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer14"
+     inkscape:label="rect"
+     style="display:inline">
+    <g
+       inkscape:label="rect"
+       id="g5164"
+       transform="translate(-0.9999999,-1)">
+      <g
+         transform="translate(20.375001,9.3333312)"
+         id="g3744">
+        <g
+           style="display:inline"
+           inkscape:label="rect"
+           id="g3760"
+           transform="translate(-20.375001,-8.8071128)">
+          <g
+             transform="translate(2.6328225,1)"
+             id="g3762">
+            <g
+               id="g3764"
+               inkscape:label="rect">
+              <g
+                 transform="translate(-2.632824,-1.0000001)"
+                 id="g3766"
+                 inkscape:label="rect#1"
+                 style="display:inline">
+                <rect
+                   style="fill:url(#linearGradient3774);fill-opacity:1;fill-rule:evenodd;stroke:#353193;stroke-width:0.99175197;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+                   id="rect3768"
+                   width="23.008247"
+                   height="20.630413"
+                   x="1.4958774"
+                   y="1.3474927" />
+                <rect
+                   style="fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:1.03807104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+                   id="rect3770"
+                   width="22.961929"
+                   height="4.1520081"
+                   x="1.519037"
+                   y="1.0190356" />
+              </g>
+            </g>
+            <g
+               inkscape:label="Layer 1"
+               id="g3772"
+               style="display:inline" />
+          </g>
+        </g>
+      </g>
+    </g>
+    <path
+       style="fill:url(#linearGradient3038);fill-opacity:1;stroke:#367425;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+       d="m 15,7.481482 5.657953,0 0,8.518518 8.082788,0 0,5.962963 -8.082788,0 0,8.518519 -5.657953,0 0,-8.518519 -8.082788,0 L 6.917212,16 15,16 15,7.481482 z"
+       id="path2826"
+       sodipodi:nodetypes="ccccccccccccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer7"
+     inkscape:label="add"
+     style="display:inline" />
+</svg>
diff --git a/src/images/profile_delete.svg b/src/images/profile_delete.svg
new file mode 100644
index 0000000..320a32d
--- /dev/null
+++ b/src/images/profile_delete.svg
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="profile_delete.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5790"
+       gradientUnits="userSpaceOnUse"
+       x1="51.9683"
+       y1="98.746101"
+       x2="43.653599"
+       y2="71.243797">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop5792" />
+      <stop
+         offset="1"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         id="stop5800" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         style="stop-color:#304fdc;stop-opacity:1;"
+         offset="0"
+         id="stop5776" />
+      <stop
+         style="stop-color:#8fbac7;stop-opacity:1;"
+         offset="1"
+         id="stop5778" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5790"
+       id="linearGradient10513"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7580546,0,0,0.6650478,0.868119,1.0219346)"
+       x1="15.444444"
+       y1="6.0793653"
+       x2="14.976191"
+       y2="37.150795" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5774"
+       id="linearGradient10515"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7826755,0,0,0.4880342,0.477191,0.7718313)"
+       x1="34.234921"
+       y1="5.868176"
+       x2="-2.1777394"
+       y2="5.3949285" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.72236028,0,0,-0.82472629,8.928348,33.462646)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#fa0c1e;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#d9afb1;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3795"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.72236028,0,0,-0.82472629,8.928348,33.462646)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       id="linearGradient3795">
+      <stop
+         style="stop-color:#c53143;stop-opacity:1;"
+         offset="0"
+         id="stop3797" />
+      <stop
+         style="stop-color:#b8382b;stop-opacity:0;"
+         offset="1"
+         id="stop3799" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#e8220f;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#932626;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#bc4343;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       y2="31.085577"
+       x2="15.413333"
+       y1="12.89746"
+       x1="15.413333"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3338"
+       xlink:href="#linearGradient3614"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="31.085577"
+       x2="15.413333"
+       y1="2.2337441"
+       x1="15.413333"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3340"
+       xlink:href="#linearGradient3602"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="12.612317"
+     inkscape:cx="9.6468094"
+     inkscape:cy="6.0416667"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1445"
+     inkscape:window-height="978"
+     inkscape:window-x="342"
+     inkscape:window-y="57"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer14"
+     inkscape:label="rect"
+     style="display:inline">
+    <g
+       id="g10484"
+       transform="translate(2.6328225,1)">
+      <g
+         inkscape:label="rect"
+         id="layer13">
+        <g
+           style="display:inline"
+           inkscape:label="rect#1"
+           id="use10505"
+           transform="translate(-2.632824,-1.0000001)">
+          <rect
+             y="1.3526168"
+             x="1.2510631"
+             height="20.620165"
+             width="23.497875"
+             id="rect10509"
+             style="fill:url(#linearGradient10513);fill-opacity:1;fill-rule:evenodd;stroke:#2f27c4;stroke-width:0.50212628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+          <rect
+             y="1.2598658"
+             x="1.2598658"
+             height="3.9202135"
+             width="23.480268"
+             id="rect10511"
+             style="fill:url(#linearGradient10515);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:0.5197314;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+        </g>
+      </g>
+      <g
+         style="display:inline"
+         id="g10501"
+         inkscape:label="Layer 1" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="delete"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3338);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3340);stroke-width:1.31483269;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(0.71215817,0,0,-0.81223657,9.260019,33.450637)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       d="m 28.991472,15.273329 c -1.272899,2.614372 -4.167254,5.299387 -7.983956,7.055429 -3.713894,1.708743 -7.436686,2.145693 -10.123746,1.444798 1.492717,3.771219 5.037309,6.429353 9.180398,6.429353 5.489532,0 9.939678,-4.657378 9.939678,-10.402546 0,-1.627202 -0.375896,-3.155458 -1.012374,-4.527034 z"
+       id="path3695" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:2.33915567;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       id="rect3809"
+       width="0.97875857"
+       height="12.416986"
+       x="0.15683465"
+       y="22.1761"
+       ry="0.077678442"
+       transform="matrix(0.68281296,-0.73059323,0.69952796,0.71460523,0,0)" />
+    <rect
+       ry="0.077315763"
+       y="-5.5886297"
+       x="-29.077671"
+       height="12.359016"
+       width="0.98077428"
+       id="rect3811"
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:2.33515382;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       transform="matrix(-0.69952796,-0.71460523,0.68281296,-0.73059323,0,0)" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#b72f3d;stroke-width:1.79558361;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(0.70128545,0,0,0.74744727,8.83053,6.565881)" />
+  </g>
+</svg>
diff --git a/src/images/profile_duplicate.svg b/src/images/profile_duplicate.svg
new file mode 100644
index 0000000..aaab6d7
--- /dev/null
+++ b/src/images/profile_duplicate.svg
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="profile_duplicate.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         id="stop5776"
+         offset="0"
+         style="stop-color:#304fdc;stop-opacity:1;" />
+      <stop
+         id="stop5778"
+         offset="1"
+         style="stop-color:#8fbac7;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="71.243797"
+       x2="43.653599"
+       y1="98.746101"
+       x1="51.9683"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient5790">
+      <stop
+         id="stop5792"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5800"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5790"
+       id="linearGradient3774"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.742259,0,0,0.6653783,1.1209128,1.0166462)"
+       x1="15.444444"
+       y1="6.0793653"
+       x2="14.976191"
+       y2="37.150795" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5774"
+       id="linearGradient3776"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7653975,0,0,0.5168907,0.7536402,0.5021448)"
+       x1="34.234921"
+       y1="5.868176"
+       x2="-2.1777394"
+       y2="5.3949285" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5790"
+       id="linearGradient4603"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.742259,0,0,0.6653783,1.1209128,1.0166462)"
+       x1="15.444444"
+       y1="6.0793653"
+       x2="14.976191"
+       y2="37.150795" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5774"
+       id="linearGradient4605"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7653975,0,0,0.5168907,0.7536402,0.5021448)"
+       x1="34.234921"
+       y1="5.868176"
+       x2="-2.1777394"
+       y2="5.3949285" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="24"
+     inkscape:cx="9.873597"
+     inkscape:cy="10.165832"
+     inkscape:document-units="px"
+     inkscape:current-layer="g3744"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1445"
+     inkscape:window-height="978"
+     inkscape:window-x="1639"
+     inkscape:window-y="73"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="rect">
+    <g
+       id="g3744"
+       transform="translate(20.375001,9.3333312)">
+      <g
+         transform="translate(-20.375001,-8.8071128)"
+         id="g3760"
+         inkscape:label="rect"
+         style="display:inline">
+        <g
+           id="g3762"
+           transform="translate(2.6328225,1)">
+          <g
+             inkscape:label="rect"
+             id="g3764">
+            <g
+               style="display:inline"
+               inkscape:label="rect#1"
+               id="g3766"
+               transform="translate(-2.632824,-1.0000001)">
+              <rect
+                 y="1.3474927"
+                 x="1.4958774"
+                 height="20.630413"
+                 width="23.008247"
+                 id="rect3768"
+                 style="opacity:1;fill:url(#linearGradient3774);fill-opacity:1;fill-rule:evenodd;stroke:#353193;stroke-width:0.99175197;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+              <rect
+                 y="1.0190356"
+                 x="1.519037"
+                 height="4.1520081"
+                 width="22.961929"
+                 id="rect3770"
+                 style="opacity:1;fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:1.03807104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+            </g>
+          </g>
+          <g
+             style="display:inline"
+             id="g3772"
+             inkscape:label="Layer 1" />
+        </g>
+      </g>
+      <g
+         transform="translate(-14.375001,-0.8071128)"
+         id="g4589"
+         inkscape:label="rect"
+         style="display:inline">
+        <g
+           id="g4591"
+           transform="translate(2.6328225,1)">
+          <g
+             inkscape:label="rect"
+             id="g4593">
+            <g
+               style="display:inline"
+               inkscape:label="rect#1"
+               id="g4595"
+               transform="translate(-2.632824,-1.0000001)">
+              <rect
+                 y="1.3474927"
+                 x="1.4958774"
+                 height="20.630413"
+                 width="23.008247"
+                 id="rect4597"
+                 style="opacity:1;fill:url(#linearGradient4603);fill-opacity:1;fill-rule:evenodd;stroke:#353193;stroke-width:0.99175197;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+              <rect
+                 y="1.0190356"
+                 x="1.519037"
+                 height="4.1520081"
+                 width="22.961929"
+                 id="rect4599"
+                 style="opacity:1;fill:url(#linearGradient4605);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:1.03807104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+            </g>
+          </g>
+          <g
+             style="display:inline"
+             id="g4601"
+             inkscape:label="Layer 1" />
+        </g>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/images/profile_import.svg b/src/images/profile_import.svg
new file mode 100644
index 0000000..f25b30f
--- /dev/null
+++ b/src/images/profile_import.svg
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="profile_import.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5790"
+       gradientUnits="userSpaceOnUse"
+       x1="51.9683"
+       y1="98.746101"
+       x2="43.653599"
+       y2="71.243797">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop5792" />
+      <stop
+         offset="1"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         id="stop5800" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         style="stop-color:#304fdc;stop-opacity:1;"
+         offset="0"
+         id="stop5776" />
+      <stop
+         style="stop-color:#8fbac7;stop-opacity:1;"
+         offset="1"
+         id="stop5778" />
+    </linearGradient>
+    <linearGradient
+       y2="5.3949285"
+       x2="-2.1777394"
+       y1="5.868176"
+       x1="34.234921"
+       gradientTransform="matrix(0.7653975,0,0,0.5168907,0.7536402,0.5021448)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3776"
+       xlink:href="#linearGradient5774"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="37.150795"
+       x2="14.976191"
+       y1="6.0793653"
+       x1="15.444444"
+       gradientTransform="matrix(0.7390913,0,0,0.8159919,1.1716091,0.9970213)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3774"
+       xlink:href="#linearGradient5790"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient11462">
+      <stop
+         id="stop11464"
+         offset="0"
+         style="stop-color:#91ff44;stop-opacity:1;" />
+      <stop
+         id="stop11466"
+         offset="1"
+         style="stop-color:#3b9d12;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient11462"
+       id="linearGradient4796"
+       x1="-0.5"
+       y1="13.5"
+       x2="25.5"
+       y2="13.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(5.7083333,5.0000003)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="24"
+     inkscape:cx="12.661122"
+     inkscape:cy="16"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer7"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1445"
+     inkscape:window-height="978"
+     inkscape:window-x="2009"
+     inkscape:window-y="37"
+     width="32px"
+     height="32px"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:window-maximized="0"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="8.1666667"
+       id="guide3153" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer14"
+     inkscape:label="rect"
+     style="display:inline">
+    <g
+       inkscape:label="rect"
+       id="g5164"
+       transform="matrix(1.1753472,0,0,1.0441511,0.21674688,1.0540567)">
+      <g
+         transform="translate(20.375001,9.3333312)"
+         id="g3744">
+        <g
+           style="display:inline"
+           inkscape:label="rect"
+           id="g3760"
+           transform="translate(-20.375001,-8.8071128)">
+          <g
+             transform="translate(2.6328225,1)"
+             id="g3762">
+            <g
+               id="g3764"
+               inkscape:label="rect">
+              <g
+                 transform="translate(-2.6346456,-1.002738)"
+                 id="g3766"
+                 inkscape:label="rect#1"
+                 style="display:inline">
+                <rect
+                   style="fill:url(#linearGradient3774);fill-opacity:1;fill-rule:evenodd;stroke:#353193;stroke-width:1.09593046;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+                   id="rect3768"
+                   width="22.910055"
+                   height="25.300268"
+                   x="1.5449734"
+                   y="1.4027575" />
+                <rect
+                   style="fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:1.03807104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+                   id="rect3770"
+                   width="22.961929"
+                   height="4.1520081"
+                   x="1.519037"
+                   y="1.0190356" />
+              </g>
+            </g>
+            <g
+               inkscape:label="Layer 1"
+               id="g3772"
+               style="display:inline" />
+          </g>
+        </g>
+      </g>
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer7"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient4796);fill-opacity:1.0;stroke:#257e31;stroke-width:1.29999994999999990;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 5.7083333,18 9.9999997,-8 0,3 15,0 0,10.833333 -15,0 0,3.166667 -9.9999997,-9 z"
+       id="path4788" />
+  </g>
+</svg>
diff --git a/src/images/profile_manage.svg b/src/images/profile_manage.svg
new file mode 100644
index 0000000..0f8da31
--- /dev/null
+++ b/src/images/profile_manage.svg
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="32"
+   height="32"
+   id="svg4895"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="profile_manage.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/var/tmp/cgr/PERFORCE/metview_4/src/images/new/profile_manage.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   style="display:inline">
+  <sodipodi:namedview
+     inkscape:window-height="1020"
+     inkscape:window-width="1379"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="4.5"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="23.71875"
+     inkscape:cx="10.988695"
+     inkscape:cy="16"
+     inkscape:window-x="418"
+     inkscape:window-y="0"
+     inkscape:current-layer="layer1"
+     width="32px"
+     height="32px"
+     showgrid="true"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5538" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3362">
+    <linearGradient
+       id="linearGradient5790"
+       gradientUnits="userSpaceOnUse"
+       x1="51.9683"
+       y1="98.746101"
+       x2="43.653599"
+       y2="71.243797">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1"
+         id="stop5792" />
+      <stop
+         offset="1"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         id="stop5800" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         style="stop-color:#304fdc;stop-opacity:1;"
+         offset="0"
+         id="stop5776" />
+      <stop
+         style="stop-color:#8fbac7;stop-opacity:1;"
+         offset="1"
+         id="stop5778" />
+    </linearGradient>
+    <!-- -->
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5790"
+       id="linearGradient3774"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.742259,0,0,0.6653783,1.1209128,1.0166462)"
+       x1="15.444444"
+       y1="6.0793653"
+       x2="14.976191"
+       y2="37.150795" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5774"
+       id="linearGradient3776"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7653975,0,0,0.5168907,0.7536402,0.5021448)"
+       x1="34.234921"
+       y1="5.868176"
+       x2="-2.1777394"
+       y2="5.3949285" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3685-4-4"
+       id="linearGradient3763-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0001757,0,0,1.0001944,0.997536,-0.7042144)"
+       x1="12"
+       y1="28"
+       x2="7"
+       y2="23" />
+    <linearGradient
+       id="linearGradient3685-4-4">
+      <stop
+         id="stop3687-6-7"
+         offset="0"
+         style="stop-color:#c78e5b;stop-opacity:1;" />
+      <stop
+         id="stop3689-9-3"
+         offset="1"
+         style="stop-color:#cf7d3e;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3675-2-5"
+       id="linearGradient3765-6"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0001759,0,0,1.0001946,0.997537,-0.4039633)"
+       x1="-0.31687203"
+       y1="24.091682"
+       x2="15.869606"
+       y2="24.091682" />
+    <linearGradient
+       id="linearGradient3675-2-5">
+      <stop
+         id="stop3677-2-6"
+         offset="0"
+         style="stop-color:#e6bc10;stop-opacity:1;" />
+      <stop
+         id="stop3679-4-1"
+         offset="1"
+         style="stop-color:#dbe683;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3665-7-6">
+      <stop
+         id="stop3667-7-5"
+         offset="0"
+         style="stop-color:#b7b7b7;stop-opacity:1;" />
+      <stop
+         id="stop3669-5-1"
+         offset="1"
+         style="stop-color:#f1f1f1;stop-opacity:0.99215686;" />
+    </linearGradient>
+    <linearGradient
+       y2="15.711069"
+       x2="24.332083"
+       y1="3.2495306"
+       x1="8.3320827"
+       gradientTransform="matrix(1.0001759,0,0,1.0001946,0.997537,-0.4039633)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3879"
+       xlink:href="#linearGradient3665-7-6"
+       inkscape:collect="always" />
+  </defs>
+  <g
+     inkscape:groupmode="layer"
+     id="layer8"
+     inkscape:label="rect"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <g
+       id="g6146"
+       transform="translate(23.204115,3.3440341)">
+      <g
+         style="display:inline"
+         inkscape:label="rect"
+         id="layer14"
+         transform="translate(-23.204115,-3.3440341)">
+        <g
+           transform="translate(-0.9999999,-1)"
+           id="g5164"
+           inkscape:label="rect">
+          <g
+             id="g3744"
+             transform="translate(20.375001,9.3333312)">
+            <g
+               transform="translate(-20.375001,-8.8071128)"
+               id="g3760"
+               inkscape:label="rect"
+               style="display:inline">
+              <g
+                 id="g3762"
+                 transform="translate(2.6328225,1)">
+                <g
+                   inkscape:label="rect"
+                   id="g3764">
+                  <g
+                     style="display:inline"
+                     inkscape:label="rect#1"
+                     id="g3766"
+                     transform="translate(-2.632824,-1.0000001)">
+                    <rect
+                       y="1.3474927"
+                       x="1.4958774"
+                       height="20.630413"
+                       width="23.008247"
+                       id="rect3768"
+                       style="fill:url(#linearGradient3774);fill-opacity:1;fill-rule:evenodd;stroke:#353193;stroke-width:0.99175197;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+                    <rect
+                       y="1.0190356"
+                       x="1.519037"
+                       height="4.1520081"
+                       width="22.961929"
+                       id="rect3770"
+                       style="fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:1.03807104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+                  </g>
+                </g>
+                <g
+                   style="display:inline"
+                   id="g3772"
+                   inkscape:label="Layer 1" />
+              </g>
+            </g>
+          </g>
+        </g>
+      </g>
+      <g
+         sodipodi:insensitive="true"
+         style="display:none"
+         inkscape:label="delete"
+         id="layer2" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="Layer">
+    <path
+       sodipodi:nodetypes="casaacsascaaca"
+       id="path2891-6"
+       d="M 24.001579,10.598177 C 22.838458,10.479766 21.636536,9.317512 21.48143,8.1586719 21.349745,7.1746071 21.749075,6.6868345 23.001412,5.5972011 24.253729,4.5075889 25.630298,3.6212875 25.001761,2.5966133 23.51678,0.1757181 18.611743,1.6535568 16.54061,3.5968114 14.464337,5.5448896 15.000008,11.998072 15.000008,11.998072 L 2.297953,24.600893 c -1.067904,1.059565 0.03582,3.363169 1.161555,4.36108 1.143474,1.013638 3.456879,1.718519 4.539263,0.639893 L 20.333023,17.310558 c 0,0 6.77 [...]
+       style="fill:url(#linearGradient3879);fill-opacity:1;stroke:#2f2f2f;stroke-width:0.99999875px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+    <path
+       sodipodi:nodetypes="ccsasc"
+       id="path3673-3"
+       d="m 9.999123,16.169604 6.370723,6.064979 -8.371075,8.367487 c -1.463108,1.462478 -4.738396,0.05653 -6.001058,-1.581921 -1.004865,-1.304093 -1.170694,-3.781517 0,-4.939047 l 8.00141,-7.911498 z"
+       style="fill:url(#linearGradient3765-6);fill-opacity:1;stroke:#9f7220;stroke-width:0.99999875px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+    <path
+       sodipodi:nodetypes="cccaac"
+       id="path3683-4"
+       d="M 12.999652,20.299854 15,22 6.998591,30.301791 c 0,0 -1.619705,0.08989 -2.00035,-0.480385 -0.401172,-0.601154 0.007,-1.500433 0.341522,-2.141127 1.640692,-3.143228 7.659889,-7.380425 7.659889,-7.380425 z"
+       style="fill:url(#linearGradient3763-4);fill-opacity:1;stroke:none;display:inline" />
+    <path
+       sodipodi:nodetypes="ccaaccaacaaccc"
+       id="path3731-1"
+       d="m 15.800618,20.736639 3.872489,-4.138192 c 0,0 6.174573,0.266178 8.30037,-1.581532 1.499077,-1.302974 2.027225,-3.657598 1.919694,-5.6408814 C 29.855033,8.6726266 29.682391,7.6162591 29,7.4607351 27.697614,8.6126031 26.497,10.10074 25,11.207771 23.83512,11.498684 22.619183,11.108575 21.792285,10.376222 20.987685,9.6636177 20.450822,8.4382835 20.611964,7.3756362 20.902844,5.4574411 25.051033,4.5516336 24.25257,2.8344097 23.896219,2.0679941 22.247835,2.1957979 21.251861,2.3746635 [...]
+       style="fill:none;stroke:#7a8ca4;stroke-width:0.90000027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+  </g>
+</svg>
diff --git a/src/images/profile_save.svg b/src/images/profile_save.svg
new file mode 100644
index 0000000..993bdc5
--- /dev/null
+++ b/src/images/profile_save.svg
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="profile_save.svg"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5774">
+      <stop
+         id="stop5776"
+         offset="0"
+         style="stop-color:#304fdc;stop-opacity:1;" />
+      <stop
+         id="stop5778"
+         offset="1"
+         style="stop-color:#8fbac7;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="71.243797"
+       x2="43.653599"
+       y1="98.746101"
+       x1="51.9683"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient5790">
+      <stop
+         id="stop5792"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop5800"
+         style="stop-color:#d1d1d1;stop-opacity:1;"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5790"
+       id="linearGradient3774"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.742259,0,0,0.6653783,1.1209128,1.0166462)"
+       x1="15.444444"
+       y1="6.0793653"
+       x2="14.976191"
+       y2="37.150795" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5774"
+       id="linearGradient3776"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7653975,0,0,0.5168907,0.7536402,0.5021448)"
+       x1="34.234921"
+       y1="5.868176"
+       x2="-2.1777394"
+       y2="5.3949285" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient11450-3"
+       id="linearGradient11456-8"
+       x1="19.784695"
+       y1="29.870388"
+       x2="19.784693"
+       y2="42.991951"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.59314295,0,0,0.43142519,11.080918,-27.167407)" />
+    <linearGradient
+       id="linearGradient11450-3">
+      <stop
+         style="stop-color:#191919;stop-opacity:1;"
+         offset="0"
+         id="stop11452-2" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop11454-9" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12168-4"
+       id="linearGradient7458-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.69520576,0,0,-0.63482447,1.8108124,35.190531)"
+       x1="13.444483"
+       y1="41.398193"
+       x2="38.408127"
+       y2="31.618719" />
+    <linearGradient
+       id="linearGradient12168-4">
+      <stop
+         style="stop-color:#858585;stop-opacity:1;"
+         offset="0"
+         id="stop12170-3" />
+      <stop
+         id="stop12172-9"
+         offset="0.5"
+         style="stop-color:#cbcbcb;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop12174-4" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2263-5">
+      <stop
+         style="stop-color:#3e848c;stop-opacity:1;"
+         offset="0"
+         id="stop2265-5" />
+      <stop
+         style="stop-color:#b3c7de;stop-opacity:1;"
+         offset="1"
+         id="stop2267-7" />
+    </linearGradient>
+    <linearGradient
+       y2="46.581879"
+       x2="9.2870998"
+       y1="2.2797322"
+       x1="28.673536"
+       gradientTransform="matrix(0.63475282,0,0,-0.71679855,2.8210575,36.880715)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient6550"
+       xlink:href="#linearGradient2263-5"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#efefef"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.40625"
+     inkscape:cx="10.376569"
+     inkscape:cy="16"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:showpageshadow="false"
+     showborder="true"
+     borderlayer="top"
+     showgrid="true"
+     inkscape:grid-points="false"
+     inkscape:window-width="1465"
+     inkscape:window-height="1068"
+     inkscape:window-x="290"
+     inkscape:window-y="35"
+     width="32px"
+     height="32px"
+     inkscape:window-maximized="0"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#9f9f9f"
+       empcolor="#9f9f9f"
+       opacity="0.10196078"
+       empopacity="0.25490196"
+       empspacing="10" />
+  </sodipodi:namedview>
+  <g
+     inkscape:groupmode="layer"
+     id="layer13"
+     inkscape:label="rect"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <g
+       id="g6344"
+       transform="translate(36.579166,8)">
+      <g
+         style="display:inline"
+         inkscape:label="rect"
+         id="layer14"
+         transform="translate(-36.579166,-8)">
+        <g
+           transform="translate(-0.9999999,-1)"
+           id="g5164"
+           inkscape:label="rect">
+          <g
+             id="g3744"
+             transform="translate(20.375001,9.3333312)">
+            <g
+               transform="translate(-20.375001,-8.8071128)"
+               id="g3760"
+               inkscape:label="rect"
+               style="display:inline">
+              <g
+                 id="g3762"
+                 transform="translate(2.6328225,1)">
+                <g
+                   inkscape:label="rect"
+                   id="g3764">
+                  <g
+                     style="display:inline"
+                     inkscape:label="rect#1"
+                     id="g3766"
+                     transform="translate(-2.632824,-1.0000001)">
+                    <rect
+                       y="1.3474927"
+                       x="1.4958774"
+                       height="20.630413"
+                       width="23.008247"
+                       id="rect3768"
+                       style="fill:url(#linearGradient3774);fill-opacity:1;fill-rule:evenodd;stroke:#353193;stroke-width:0.99175197;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+                    <rect
+                       y="1.0190356"
+                       x="1.519037"
+                       height="4.1520081"
+                       width="22.961929"
+                       id="rect3770"
+                       style="fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:#3a358c;stroke-width:1.03807104;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+                  </g>
+                </g>
+                <g
+                   style="display:inline"
+                   id="g3772"
+                   inkscape:label="Layer 1" />
+              </g>
+            </g>
+          </g>
+        </g>
+      </g>
+      <g
+         sodipodi:insensitive="true"
+         style="display:none"
+         inkscape:label="delete"
+         id="layer2" />
+    </g>
+  </g>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <path
+       sodipodi:nodetypes="ccccccccc"
+       id="path7428"
+       d="m 7.621217,31.433381 23.153463,0 c 0.350839,0 0.633282,-0.280851 0.633282,-0.62972 l 0,-22.3572729 c 0,-0.3488654 -0.282443,-0.6297225 -0.633282,-0.6297225 l -21.4829534,0 c 0,0 -2.3677649,2.3891954 -2.3677649,2.3891954 l 0.063974,20.5978 c 0,0.348869 0.2824434,0.62972 0.6332819,0.62972 z"
+       style="fill:url(#linearGradient6550);fill-opacity:1;stroke:#25375f;stroke-width:0.79999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="path7444"
+       d="m 13.577907,15.665729 11.779301,0 c 0.529608,0 0.955973,-0.400117 0.955973,-0.897122 l 0,-7.0343225 c 0,0 -13.691244,0 -13.691244,0 l 0,7.0343225 c 0,0.497005 0.426365,0.897122 0.95597,0.897122 z"
+       style="fill:url(#linearGradient7458-5);fill-opacity:1;stroke:#371d1d;stroke-width:0.58788472;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;display:inline" />
+    <rect
+       ry="0.29127699"
+       rx="0.41466233"
+       y="-13.372715"
+       x="21.427872"
+       height="3.9030292"
+       width="2.776397"
+       id="rect7446"
+       style="fill:url(#linearGradient11456-8);fill-opacity:1;stroke:#251818;stroke-width:0.48245448;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       transform="scale(1,-1)" />
+    <rect
+       y="-29.964291"
+       x="10.252553"
+       height="10.816766"
+       width="17.880121"
+       id="rect7430"
+       style="fill:#ffffff;fill-opacity:1;stroke:#371d1d;stroke-width:0.63016379;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       transform="scale(1,-1)" />
+    <rect
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.41638336;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="rect11357"
+       width="13.226233"
+       height="0.53731823"
+       x="12.447113"
+       y="-23.143465"
+       rx="0.094933808"
+       ry="0"
+       transform="scale(1,-1)" />
+    <rect
+       transform="scale(1,-1)"
+       ry="0"
+       rx="0.095015459"
+       y="-26.912609"
+       x="12.473413"
+       height="0.50564092"
+       width="13.237607"
+       id="rect13161"
+       style="fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.40409663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+  </g>
+</svg>
diff --git a/src/images/redo.svg b/src/images/redo.svg
new file mode 100644
index 0000000..d736f68
--- /dev/null
+++ b/src/images/redo.svg
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="redo.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3650">
+      <stop
+         style="stop-color:#45d04f;stop-opacity:1;"
+         offset="0"
+         id="stop3652" />
+      <stop
+         style="stop-color:#d8ecdc;stop-opacity:1;"
+         offset="1"
+         id="stop3654" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3650"
+       id="linearGradient3656"
+       x1="15.603005"
+       y1="11.415942"
+       x2="14.703928"
+       y2="5.6313658"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0480094,0.17867819,-0.16288865,1.1495978,2.2419773,-3.7945046)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="13.946609"
+     inkscape:cy="16.554812"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1285"
+     inkscape:window-height="990"
+     inkscape:window-x="214"
+     inkscape:window-y="35"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3656);fill-opacity:1;stroke:#3e773e;stroke-width:0.80000000999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 2.7435209,15.694049 c 0,0 -0.1253927,0.480966 0.4369907,-1.87208 C 3.8743895,10.918745 6.6037093,8.0755264 8.9875804,6.7745262 11.371451,5.473526 13.643428,5.5293861 16.187724,6.0555164 c 2.046302,0.4231508 4.289942,1.5257702 5.655439,2.9107958 1.365497,1.3850258 3.433756,4.3424528 3.433756,4.3424528 L 30.470832,9.103897 28.610894,21.834403 16.416689,20.59974 21.876924,16.023316 C 19.942919,12.6162 17.982538,10.434874 14.290279,9.7507683 11.508491,9.3068022 10.101388,9.396637 [...]
+       id="path2876"
+       sodipodi:nodetypes="cszssccccccsc" />
+  </g>
+</svg>
diff --git a/src/images/reload.svg b/src/images/reload.svg
new file mode 100644
index 0000000..0de45ad
--- /dev/null
+++ b/src/images/reload.svg
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="reload.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3756">
+      <stop
+         id="stop3758"
+         offset="0"
+         style="stop-color:#519aed;stop-opacity:1;" />
+      <stop
+         id="stop3760"
+         offset="1"
+         style="stop-color:#e9dddd;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#f1f3fb;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#273df9;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#2c71d9;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#141bc6;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3756"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="12.549147"
+     inkscape:cy="16.502353"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1005"
+     inkscape:window-height="751"
+     inkscape:window-x="214"
+     inkscape:window-y="-17"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <path
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+       d="M 23.308883,5.5222291 16.827886,15.567481 25.770781,14.235498 23.308883,5.5222291 z"
+       id="path3872"
+       sodipodi:nodetypes="cccc" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#ffffff;stroke-width:3.36740041;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3008"
+       sodipodi:cx="18.133333"
+       sodipodi:cy="19.786667"
+       sodipodi:rx="8.4266663"
+       sodipodi:ry="8.5333338"
+       d="M 26.559999,19.786667 A 8.4266663,8.5333338 0 1 1 16.366947,11.442916"
+       sodipodi:start="0"
+       sodipodi:end="4.5012041"
+       sodipodi:open="true"
+       transform="matrix(0.60281508,0.6467517,-0.63948552,0.59604253,17.699987,-7.0720911)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#2f6ab7;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/remove.svg b/src/images/remove.svg
new file mode 100644
index 0000000..4fe54cd
--- /dev/null
+++ b/src/images/remove.svg
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="remove.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3795">
+      <stop
+         style="stop-color:#c53143;stop-opacity:1;"
+         offset="0"
+         id="stop3797" />
+      <stop
+         style="stop-color:#b8382b;stop-opacity:0;"
+         offset="1"
+         id="stop3799" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3728">
+      <stop
+         style="stop-color:#fa0c1e;stop-opacity:1;"
+         offset="0"
+         id="stop3730" />
+      <stop
+         style="stop-color:#d9afb1;stop-opacity:0;"
+         offset="1"
+         id="stop3732" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3614">
+      <stop
+         style="stop-color:#e8220f;stop-opacity:1;"
+         offset="0"
+         id="stop3616" />
+      <stop
+         style="stop-color:#ececec;stop-opacity:1;"
+         offset="1"
+         id="stop3618" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3602">
+      <stop
+         style="stop-color:#932626;stop-opacity:1;"
+         offset="0"
+         id="stop3604" />
+      <stop
+         style="stop-color:#bc4343;stop-opacity:1;"
+         offset="1"
+         id="stop3606" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614"
+       id="linearGradient3691"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602"
+       id="linearGradient3693"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3728"
+       id="linearGradient3710"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="15.413333"
+       y1="3.4795053"
+       x2="15.941438"
+       y2="18.883736" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3795"
+       id="linearGradient3720"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0688752,0,0,-1.1672542,-0.7930209,35.114)"
+       x1="24.437176"
+       y1="3.4853487"
+       x2="15.941438"
+       y2="18.883736" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="12.549147"
+     inkscape:cy="15.367291"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1005"
+     inkscape:window-height="751"
+     inkscape:window-x="214"
+     inkscape:window-y="-17"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="circle"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3691);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3693);stroke-width:0.90856528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path2820"
+       sodipodi:cx="15.413333"
+       sodipodi:cy="16.559999"
+       sodipodi:rx="13.76"
+       sodipodi:ry="12.613334"
+       d="m 29.173333,16.559999 a 13.76,12.613334 0 1 1 -27.5200003,0 13.76,12.613334 0 1 1 27.5200003,0 z"
+       transform="matrix(1.0537791,0,0,-1.1495772,-0.30224808,35.097001)" />
+    <path
+       style="fill:url(#linearGradient3710);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 28.894346,9.3702377 C 27.010842,13.07042 22.728069,16.870583 17.080503,19.355951 11.585061,21.774374 6.0764534,22.392799 2.1004164,21.400807 c 2.2087693,5.337492 7.4536969,9.09961 13.5842156,9.09961 8.12285,0 14.707722,-6.591694 14.707722,-14.722963 0,-2.303016 -0.556212,-4.465993 -1.498008,-6.4072163 z"
+       id="path3695" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <text
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Calibri;-inkscape-font-specification:Calibri"
+       x="3.8399999"
+       y="21.973333"
+       id="text3783"><tspan
+         sodipodi:role="line"
+         id="tspan3785"
+         x="3.8399999"
+         y="21.973333" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="7.2533331"
+       y="15.146667"
+       id="text3787"><tspan
+         sodipodi:role="line"
+         id="tspan3789"
+         x="7.2533331"
+         y="15.146667" /></text>
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:3.33834791;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3809"
+       width="1.4149849"
+       height="17.969641"
+       x="-0.80126238"
+       y="13.517637"
+       ry="0.11241483"
+       transform="matrix(0.69887353,-0.71524526,0.71524526,0.69887353,0,0)" />
+    <rect
+       ry="0.11177491"
+       y="-9.1074448"
+       x="-23.50547"
+       height="17.86735"
+       width="1.4193591"
+       id="rect3811"
+       style="fill:#ffffff;fill-opacity:1;stroke:#fffcfc;stroke-width:3.33397388;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       transform="matrix(-0.71524526,-0.69887353,0.69887353,-0.71524526,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="top"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#b72f3d;stroke-width:1.24076998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3786"
+       sodipodi:cx="16.213333"
+       sodipodi:cy="17.973333"
+       sodipodi:rx="13.973333"
+       sodipodi:ry="13.706667"
+       d="m 30.186666,17.973333 a 13.973333,13.706667 0 1 1 -27.9466662,0 13.973333,13.706667 0 1 1 27.9466662,0 z"
+       transform="matrix(1.0376908,0,0,1.0578794,-0.937761,-2.9536141)" />
+  </g>
+</svg>
diff --git a/src/images/reset.svg b/src/images/reset.svg
new file mode 100644
index 0000000..6994ab7
--- /dev/null
+++ b/src/images/reset.svg
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="reset.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 16 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="32 : 16 : 1"
+       inkscape:persp3d-origin="16 : 10.666667 : 1"
+       id="perspective15" />
+    <linearGradient
+       id="linearGradient3650">
+      <stop
+         style="stop-color:#449abb;stop-opacity:1;"
+         offset="0"
+         id="stop3652" />
+      <stop
+         style="stop-color:#fcfcfe;stop-opacity:1;"
+         offset="1"
+         id="stop3654" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3650"
+       id="linearGradient3656"
+       x1="15.603005"
+       y1="11.415942"
+       x2="14.703928"
+       y2="5.6313658"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.86061684,0.15090715,-0.13376284,0.97092167,5.6361914,-5.6778006)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3650"
+       id="linearGradient3593"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.86061684,-0.15090715,0.13376284,-0.97092167,25.859568,37.645443)"
+       x1="15.603005"
+       y1="11.415942"
+       x2="14.703928"
+       y2="5.6313658" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="-5.3600576"
+     inkscape:cy="16.554812"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1566"
+     inkscape:window-height="990"
+     inkscape:window-x="214"
+     inkscape:window-y="35"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3656);fill-opacity:1;stroke:#3e5b77;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 6.048055,10.781746 c 0,0 -0.1029715,0.406212 0.3588532,-1.5811113 0.5698069,-2.4519914 2.8111024,-4.8533024 4.7687178,-5.9520951 1.957615,-1.0987924 3.823344,-1.0516143 5.912699,-0.6072578 1.680407,0.3573826 3.522866,1.2886275 4.644201,2.4583855 1.121335,1.169758 2.819773,3.667528 2.819773,3.667528 L 28.817498,5.2158683 27.290132,15.967736 17.276349,14.92497 21.76025,11.059837 C 20.172061,8.1822713 18.562212,6.3399783 15.530159,5.7621993 13.245777,5.3872373 12.090275,5.463110 [...]
+       id="path2876"
+       sodipodi:nodetypes="cszssccccccsc" />
+    <path
+       sodipodi:nodetypes="cszssccccccsc"
+       id="path3591"
+       d="m 25.447704,21.185896 c 0,0 0.102971,-0.406212 -0.358853,1.581112 -0.569807,2.451991 -2.811103,4.853302 -4.768718,5.952095 -1.957615,1.098792 -3.823344,1.051614 -5.912699,0.607258 C 12.727027,28.968978 10.884568,28.037733 9.763233,26.867975 8.6418983,25.698217 6.94346,23.200447 6.94346,23.200447 L 2.678261,26.751774 4.205627,15.999906 14.21941,17.042672 9.735509,20.907805 c 1.588189,2.877566 3.198038,4.719859 6.230091,5.297638 2.284382,0.374962 3.439884,0.299089 5.510776,-1.102 [...]
+       style="fill:url(#linearGradient3593);fill-opacity:1;stroke:#3e5b77;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  </g>
+</svg>
diff --git a/src/images/run_options.svg b/src/images/run_options.svg
new file mode 100644
index 0000000..b0dff8e
--- /dev/null
+++ b/src/images/run_options.svg
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="32"
+   height="32"
+   id="svg4895"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="run_options.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/var/tmp/cgr/PERFORCE/metview_4/src/images/new/profile_manage.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   style="display:inline"
+   enable-background="new">
+  <sodipodi:namedview
+     inkscape:window-height="1070"
+     inkscape:window-width="1478"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="4.5"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="16.65625"
+     inkscape:cx="7.534709"
+     inkscape:cy="16.10098"
+     inkscape:window-x="2133"
+     inkscape:window-y="60"
+     inkscape:current-layer="layer2"
+     width="32px"
+     height="32px"
+     showgrid="true"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       snapvisiblegridlinesonly="true"
+       enabled="true"
+       visible="true"
+       empspacing="5"
+       id="grid25877"
+       type="xygrid" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3362">
+    <!-- -->
+    <linearGradient
+       y2="18.883736"
+       x2="15.941438"
+       y1="3.4795053"
+       x1="15.413333"
+       gradientTransform="matrix(1.0576883,0,0,-1.1550377,-0.37665679,34.813916)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3710-718"
+       xlink:href="#linearGradient3728-197"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3728-197">
+      <stop
+         id="stop2891"
+         offset="0"
+         style="stop-color:#e6e7ec;stop-opacity:1;" />
+      <stop
+         id="stop2893"
+         offset="1"
+         style="stop-color:#f6f6f6;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       y2="18.883736"
+       x2="15.941438"
+       y1="3.4853487"
+       x1="24.437176"
+       gradientTransform="matrix(1.0576883,0,0,-1.1550377,-0.37665679,34.813916)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3720-136"
+       xlink:href="#linearGradient3756-317"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3756-317">
+      <stop
+         style="stop-color:#398cea;stop-opacity:1;"
+         offset="0"
+         id="stop2897" />
+      <stop
+         style="stop-color:#decdcd;stop-opacity:0;"
+         offset="1"
+         id="stop2899" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3614-239"
+       id="linearGradient4009-917"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="12.89746"
+       x2="15.413333"
+       y2="31.085577"
+       gradientTransform="matrix(1.0427502,0,0,-1.1375457,0.10897959,34.797095)" />
+    <linearGradient
+       id="linearGradient3614-239">
+      <stop
+         id="stop2903"
+         offset="0"
+         style="stop-color:#2365c7;stop-opacity:1;" />
+      <stop
+         id="stop2905"
+         offset="1"
+         style="stop-color:#dfdfdf;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3602-835"
+       id="linearGradient4011-245"
+       gradientUnits="userSpaceOnUse"
+       x1="15.413333"
+       y1="2.2337441"
+       x2="15.413333"
+       y2="31.085577"
+       gradientTransform="matrix(1.0427502,0,0,-1.1375457,0.10897959,34.797095)" />
+    <linearGradient
+       id="linearGradient3602-835">
+      <stop
+         id="stop2909"
+         offset="0"
+         style="stop-color:#e8e8e8;stop-opacity:1;" />
+      <stop
+         id="stop2911"
+         offset="1"
+         style="stop-color:#1117ae;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3685-4-4">
+      <stop
+         id="stop3687-6-7"
+         offset="0"
+         style="stop-color:#c78e5b;stop-opacity:1;" />
+      <stop
+         id="stop3689-9-3"
+         offset="1"
+         style="stop-color:#cf7d3e;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3675-2-5"
+       id="linearGradient3765-6"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.79082494,0,0,0.79087577,1.7709069,-0.4027696)"
+       x1="-0.31687203"
+       y1="24.091682"
+       x2="15.869606"
+       y2="24.091682" />
+    <linearGradient
+       id="linearGradient3675-2-5">
+      <stop
+         id="stop3677-2-6"
+         offset="0"
+         style="stop-color:#e6bc10;stop-opacity:1;" />
+      <stop
+         id="stop3679-4-1"
+         offset="1"
+         style="stop-color:#dbe683;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3665-7-6">
+      <stop
+         id="stop3667-7-5"
+         offset="0"
+         style="stop-color:#b7b7b7;stop-opacity:1;" />
+      <stop
+         id="stop3669-5-1"
+         offset="1"
+         style="stop-color:#f1f1f1;stop-opacity:0.99215686;" />
+    </linearGradient>
+    <linearGradient
+       y2="15.711069"
+       x2="24.332083"
+       y1="3.2495306"
+       x1="8.3320827"
+       gradientTransform="matrix(0.79082494,0,0,0.79087577,1.7709069,-0.4027696)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4168"
+       xlink:href="#linearGradient3665-7-6"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3685-4-4"
+       id="linearGradient4211"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.79082472,0,0,0.7908756,1.7709065,-0.6401846)"
+       x1="12"
+       y1="28"
+       x2="7"
+       y2="23" />
+  </defs>
+  <g
+     style="display:inline"
+     inkscape:label="button"
+     id="layer5"
+     inkscape:groupmode="layer">
+    <path
+       id="path2820"
+       d="m 30.529478,15.95934 c 0,-7.924317 -6.423925,-14.3482444 -14.348242,-14.3482444 -7.9243144,0 -14.3482418,6.4239274 -14.3482418,14.3482444 0,7.924315 6.4239274,14.348243 14.3482418,14.348243 7.924317,0 14.348242,-6.423928 14.348242,-14.348243 z"
+       style="fill:url(#linearGradient4009-917);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4011-245);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;display:inline" />
+    <path
+       id="path3695"
+       d="m 29,9.3395882 c -1.863791,3.6614558 -6.101738,7.4218468 -11.690199,9.8812028 -5.437927,2.393111 -10.8888789,3.005063 -14.8233025,2.023454 2.1856515,5.28163 7.3756845,9.004374 13.4420425,9.004374 8.037836,0 14.553789,-6.522706 14.553789,-14.568873 0,-2.278912 -0.550389,-4.419252 -1.48233,-6.3401578 z"
+       style="fill:url(#linearGradient3710-718);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3720-136);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+    <path
+       id="path3872"
+       d="M 11.377747,25.610588 11.325352,6.4466148 23.470504,15.966457 11.377751,25.610588 z"
+       style="fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    <path
+       id="path3786"
+       d="m 30.476701,15.959338 c 0,7.924317 -6.423925,14.348245 -14.348242,14.348245 -7.9243152,0 -14.3482425,-6.423928 -14.3482425,-14.348245 0,-7.924315 6.4239273,-14.3482419 14.3482425,-14.3482419 7.924317,0 14.348242,6.4239269 14.348242,14.3482419 z"
+       style="fill:none;stroke:#889ab0;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="Layer">
+    <path
+       sodipodi:nodetypes="casaacsascaaca"
+       id="path2891-6"
+       d="M 19.959878,8.2968635 C 19.040214,8.2032339 18.089872,7.2842139 17.967231,6.3678931 17.86311,5.5897721 18.178855,5.2040794 19.16906,4.3424826 20.159248,3.4809024 21.247683,2.7800844 20.750708,1.9698521 19.576554,0.05559714 15.69821,1.2241566 14.060595,2.7607307 12.418916,4.3011187 12.842463,9.4037908 12.842463,9.4037908 L 2.7991274,19.369117 c -0.8443765,0.837822 0.02832,2.659332 0.918425,3.448401 0.9041288,0.801506 2.7333054,1.35887 3.5891312,0.505979 l 9.7525184,-9.719008 c 0 [...]
+       style="fill:url(#linearGradient4168);fill-opacity:1;stroke:#2f2f2f;stroke-width:0.99999875px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+    <path
+       sodipodi:nodetypes="ccsasc"
+       id="path3673-3"
+       d="m 8.8883335,12.702312 5.0372415,4.795712 -6.6188914,6.616355 c -1.1568589,1.156414 -3.7465828,0.0447 -4.7449518,-1.25086 -0.7945325,-1.031174 -0.9256511,-2.990128 0,-3.905411 l 6.3266017,-6.255796 z"
+       style="fill:url(#linearGradient3765-6);fill-opacity:1;stroke:#9f7220;stroke-width:0.99999875px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+    <path
+       sodipodi:nodetypes="cccaac"
+       id="path3683-4"
+       d="m 11.260809,15.96819 1.581647,1.344345 -6.3266005,6.564407 c 0,0 -1.2806779,0.0711 -1.5816485,-0.37985 -0.3172008,-0.475348 0.00556,-1.186426 0.2700366,-1.693038 1.297272,-2.485417 6.0565654,-5.835864 6.0565654,-5.835864 z"
+       style="fill:url(#linearGradient4211);fill-opacity:1;stroke:none;display:inline" />
+    <path
+       sodipodi:nodetypes="ccaaccaacaaccc"
+       id="path3731-1"
+       d="m 13.475494,16.313568 3.061922,-3.272162 c 0,0 4.882147,0.210474 6.562986,-1.250549 C 24.2857,10.760566 24.7033,8.8987139 24.618278,7.3304879 24.58812,6.7742891 24.451616,5.9389958 23.912058,5.8160195 22.88228,6.7268276 21.932972,7.9035298 20.749315,8.7788826 19.828262,9.0089135 18.866836,8.7004436 18.21302,8.1213585 17.576834,7.557887 17.152344,6.5889884 17.279757,5.7487303 17.509752,4.2319713 20.789666,3.5157295 20.158331,2.1578828 19.876571,1.5518613 18.573217,1.6529185 17.7 [...]
+       style="fill:none;stroke:#7a8ca4;stroke-width:0.90000027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+  </g>
+</svg>
diff --git a/src/images/search.svg b/src/images/search.svg
new file mode 100644
index 0000000..1be41e3
--- /dev/null
+++ b/src/images/search.svg
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="search.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3617">
+      <stop
+         style="stop-color:#f7f6f2;stop-opacity:1;"
+         offset="0"
+         id="stop3619" />
+      <stop
+         style="stop-color:#0e729a;stop-opacity:1;"
+         offset="1"
+         id="stop3621" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3776">
+      <stop
+         id="stop3778"
+         offset="0"
+         style="stop-color:#61728a;stop-opacity:1;" />
+      <stop
+         id="stop3780"
+         offset="1"
+         style="stop-color:#b1bec2;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3717-3">
+      <stop
+         style="stop-color:#9cb1da;stop-opacity:1;"
+         offset="0"
+         id="stop3719-8" />
+      <stop
+         style="stop-color:#ecf0f1;stop-opacity:1;"
+         offset="1"
+         id="stop3721-3" />
+    </linearGradient>
+    <linearGradient
+       y2="15.173333"
+       x2="1.2925488"
+       y1="17.239738"
+       x1="14.005093"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3742"
+       xlink:href="#linearGradient3717-3"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3776"
+       id="linearGradient3774"
+       x1="3.7666667"
+       y1="14.746666"
+       x2="14.473333"
+       y2="14.746666"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1525856,0,0,1.176793,-2.8500882,-4.1345884)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3776"
+       id="linearGradient3784"
+       gradientUnits="userSpaceOnUse"
+       x1="3.7666667"
+       y1="14.746666"
+       x2="14.473333"
+       y2="14.746666"
+       gradientTransform="matrix(-1.1525856,0,0,1.176793,35.01619,-3.9463015)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3776"
+       id="linearGradient3794"
+       x1="13.42"
+       y1="14.373333"
+       x2="19.433332"
+       y2="14.373333"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1525856,0,0,0.6516306,-2.8500882,1.3715682)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3776"
+       id="linearGradient3808"
+       x1="9.5699997"
+       y1="8.0531826"
+       x2="13.843333"
+       y2="8.0531826"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1525856,0,0,1.176793,-2.8500882,-4.1345884)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3776"
+       id="linearGradient3812"
+       gradientUnits="userSpaceOnUse"
+       x1="9.5699997"
+       y1="8.0531826"
+       x2="13.843333"
+       y2="8.0531826"
+       gradientTransform="matrix(-1.1525856,0,0,1.176793,35.200604,-4.1973507)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3617"
+       id="linearGradient3623"
+       x1="21.992538"
+       y1="20.895681"
+       x2="29.517824"
+       y2="20.895681"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5924365,0,0,1.3590954,-13.867526,-6.3764839)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3717-3"
+       id="linearGradient3629"
+       gradientUnits="userSpaceOnUse"
+       x1="-0.6270647"
+       y1="15.173333"
+       x2="12.680784"
+       y2="15.173333" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3617"
+       id="linearGradient3631"
+       gradientUnits="userSpaceOnUse"
+       x1="21.531857"
+       y1="21.114134"
+       x2="30.434032"
+       y2="20.544064"
+       gradientTransform="matrix(1.5272525,0.09090763,-0.09780102,1.4196061,-26.990579,-9.755383)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="2.1170357"
+     inkscape:cy="14.995068"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1599"
+     inkscape:window-height="990"
+     inkscape:window-x="131"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="body">
+    <path
+       style="fill:url(#linearGradient3774);fill-opacity:1;stroke:#2f2f2f;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 2.0676104,20.217181 7.53855,7.790247 c 0,0 0.9478833,-1.1223639 1.5982523,-1.3807701 0.477769,-0.1898283 1.0298637,-0.2863523 1.5367807,-0.1882865 0.594496,0.1150091 1.163989,0.4757986 1.598252,0.8786721 0.421361,0.3909043 0.854443,0.9250476 0.860598,1.5062955 l 0.122941,11.611023 -4.6718127,-3.828499 -4.7332852,1.004196 -1.7826657,2.824303 z"
+       id="path3766"
+       sodipodi:nodetypes="ccsssscccc" />
+    <path
+       sodipodi:nodetypes="ccsssscccc"
+       id="path3782"
+       d="M 30.098491,20.405467 24.627551,7.9785327 c 0,0 -0.947883,-1.1223628 -1.598251,-1.380769 C 22.551532,6.4079353 21.999436,6.3114113 21.49252,6.4094772 20.898023,6.524486 20.32853,6.8852757 19.894267,7.2881493 19.472906,7.6790542 19.039825,8.2131958 19.03367,8.794443 l -0.122942,11.611024 4.671812,-3.828499 4.733285,1.004196 1.782666,2.824303 z"
+       style="fill:url(#linearGradient3784);fill-opacity:1;stroke:#2f2f2f;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:url(#linearGradient3794);fill-opacity:1;stroke:#2f2f2f;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 13.193903,13.15305 c 0,0 1.044201,-0.623788 1.598252,-0.695072 0.679306,-0.0874 1.432757,-0.169394 2.028551,0.03475 l 2.028551,0.695072 0.122942,-3.92716 c 0,0 -1.235224,-0.809396 -2.090022,-0.973102 -0.543747,-0.1041358 -1.227554,-0.1309539 -1.721194,0.03475 l -1.96708,0.660323 0,4.170436 z"
+       id="path3786"
+       sodipodi:nodetypes="cssccsscc" />
+    <path
+       style="fill:#7d90b6;fill-opacity:1;stroke:#2f2f2f;stroke-width:0.80000000999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 13.191421,15.615925 c 0,0 1.701995,-0.53666 2.684947,-0.566886 0.982953,-0.03023 3.02057,0.79364 3.02057,0.79364 l 0.06712,-2.324232 c 0,0 -1.936689,-1.18361 -3.087693,-1.190461 -1.018136,-0.0061 -2.752076,1.020395 -2.752076,1.020395 l 0.06713,2.267544 z"
+       id="path3796"
+       sodipodi:nodetypes="czccacc" />
+    <path
+       sodipodi:nodetypes="caccacc"
+       id="path3820"
+       d="m 26.641081,13.87819 c -1.436229,-1.093784 -2.24622,-1.174867 -3.43994,-1.066959 -1.392876,0.125911 -2.73957,0.943029 -3.737171,1.945632 l -0.109255,4.760504 c 1.178172,-1.838929 2.679064,-3.299007 4.584776,-3.442497 1.868641,-0.140698 3.406025,0.642174 4.950355,2.664303 L 26.641081,13.87819 z"
+       style="fill:#7e94af;fill-opacity:1;stroke:#2f2f2f;stroke-opacity:1;stroke-width:0.40000000000000002;stroke-miterlimit:4;stroke-dasharray:none" />
+    <path
+       style="fill:#7e94af;fill-opacity:1;stroke:#2f2f2f;stroke-width:0.40000001000000002;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 5.4968133,13.71819 c 1.436229,-1.093784 2.2462197,-1.174867 3.4399397,-1.066959 1.392876,0.125911 2.73957,0.943029 3.737171,1.945632 l 0.109255,4.760504 C 11.605007,17.518438 10.104115,16.05836 8.198403,15.91487 6.3297623,15.774172 4.7923783,16.557044 3.2480483,18.579173 l 2.248765,-4.860983 z"
+       id="path3633"
+       sodipodi:nodetypes="caccacc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="connect" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="lens">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3742);fill-opacity:1;fill-rule:evenodd;stroke:#2f2f2f;stroke-width:0.70575148;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3707-2"
+       sodipodi:cx="6.9866667"
+       sodipodi:cy="15.173333"
+       sodipodi:rx="5.2800002"
+       sodipodi:ry="5.1999998"
+       d="m 12.266667,15.173333 a 5.2800002,5.1999998 0 1 1 -10.5600005,0 5.2800002,5.1999998 0 1 1 10.5600005,0 z"
+       transform="matrix(1.1132929,0,0,1.1541624,16.734088,4.3914265)" />
+    <path
+       style="fill:url(#linearGradient3623);fill-opacity:1;stroke:none"
+       d="m 24.350951,18.19596 c -0.437882,1.196616 1.849199,2.091132 2.038322,3.334314 0.198075,1.302055 -0.896035,2.532939 -1.019161,3.841711 -0.03633,0.386099 -0.350504,1.05056 0.08493,1.159762 2.292543,0.574943 4.274413,-2.889788 4.246496,-4.928988 -0.02381,-1.739691 -1.745103,-3.761374 -3.736916,-4.131648 -0.593917,-0.110411 -1.432466,0.229665 -1.61367,0.724849 z"
+       id="path2843"
+       sodipodi:nodetypes="caaaaaa" />
+    <path
+       transform="matrix(1.1132929,0,0,1.1541624,-0.17050107,4.5169511)"
+       d="m 12.266667,15.173333 a 5.2800002,5.1999998 0 1 1 -10.5600005,0 5.2800002,5.1999998 0 1 1 10.5600005,0 z"
+       sodipodi:ry="5.1999998"
+       sodipodi:rx="5.2800002"
+       sodipodi:cy="15.173333"
+       sodipodi:cx="6.9866667"
+       id="path3625"
+       style="fill:url(#linearGradient3629);fill-opacity:1;fill-rule:evenodd;stroke:#2f2f2f;stroke-width:0.70575148;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:nodetypes="caaaaaa"
+       id="path3627"
+       d="m 7.8952401,18.09288 c -0.5060682,1.224893 1.6230246,2.289799 1.7149469,3.599127 0.096277,1.371334 -1.0416278,2.59456 -1.2538948,3.954574 -0.062619,0.401215 -0.4117544,1.077324 -0.002,1.216245 2.1573288,0.731416 4.3073958,-2.774435 4.4273648,-4.906018 0.102346,-1.818507 -1.403,-4.028466 -3.2866367,-4.528933 -0.5616604,-0.149234 -1.3903564,0.158116 -1.5997778,0.665003 z"
+       style="fill:url(#linearGradient3631);fill-opacity:1;stroke:none" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="okulars">
+    <path
+       style="fill:url(#linearGradient3808);fill-opacity:1;stroke:#2f2f2f;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 9.5056303,4.4638459 c 0,0 0.8999197,-0.6695808 1.4138367,-0.6276229 0.602407,0.049183 0.836459,0.3727283 1.515999,0.9947677 l 0.02078,2.0178222 c 0,0 -1.11229,-0.6074965 -1.721194,-0.6276229 C 9.9895833,6.19655 8.5835613,6.8488129 8.5835613,6.8488129 l 0.922069,-2.384967 z"
+       id="path3800"
+       sodipodi:nodetypes="caccacc" />
+    <path
+       sodipodi:nodetypes="caccacc"
+       id="path3810"
+       d="m 22.844886,4.4010836 c 0,0 -0.900231,-0.645254 -1.413837,-0.6276229 -0.668628,0.022952 -1.103126,0.319395 -1.782666,0.9414344 l 0,2.0711556 c 0,0 1.280166,-0.6190011 1.967078,-0.6276229 0.745806,-0.00936 2.151494,0.6276229 2.151494,0.6276229 L 22.844886,4.4010836 z"
+       style="fill:url(#linearGradient3812);fill-opacity:1;stroke:#2f2f2f;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  </g>
+</svg>
diff --git a/src/images/select_all.svg b/src/images/select_all.svg
new file mode 100644
index 0000000..c0d1fc6
--- /dev/null
+++ b/src/images/select_all.svg
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg2160"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="select_all.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs2162" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.525398"
+     inkscape:cx="32.293516"
+     inkscape:cy="17.129819"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1199"
+     inkscape:window-height="876"
+     inkscape:window-x="1963"
+     inkscape:window-y="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="rect frame" />
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       style="opacity:1;fill:#d4daec;fill-opacity:0.66666669;fill-rule:evenodd;stroke:#090c0f;stroke-width:1.464;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2168"
+       width="25.23642"
+       height="25.289553"
+       x="19.38179"
+       y="19.328659" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="rect inner" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="arrows">
+    <path
+       sodipodi:type="star"
+       style="opacity:1;fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#0a3d91;stroke-width:1.55299997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3153"
+       sodipodi:sides="3"
+       sodipodi:cx="28.181818"
+       sodipodi:cy="34.727272"
+       sodipodi:r1="7.7352901"
+       sodipodi:r2="3.867645"
+       sodipodi:arg1="2.625362"
+       sodipodi:arg2="3.6725595"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 21.454545,38.545454 L 28.238812,26.992192 L 34.852097,38.64417 L 21.454545,38.545454 z "
+       transform="matrix(0.9204684,-7.5606998e-3,7.7546359e-3,0.8151309,5.6111023,-17.948776)" />
+    <path
+       transform="matrix(0.9204976,1.8605846e-3,2.7068159e-3,-0.8151633,6.5940883,82.230821)"
+       d="M 21.454545,38.545454 L 28.238812,26.992192 L 34.852097,38.64417 L 21.454545,38.545454 z "
+       inkscape:randomized="0"
+       inkscape:rounded="0"
+       inkscape:flatsided="true"
+       sodipodi:arg2="3.6725595"
+       sodipodi:arg1="2.625362"
+       sodipodi:r2="3.867645"
+       sodipodi:r1="7.7352901"
+       sodipodi:cy="34.727272"
+       sodipodi:cx="28.181818"
+       sodipodi:sides="3"
+       id="path3163"
+       style="opacity:1;fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#0a3d91;stroke-width:1.55299997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       sodipodi:type="star" />
+    <path
+       sodipodi:type="star"
+       style="opacity:1;fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#0a3d91;stroke-width:1.55269866;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3165"
+       sodipodi:sides="3"
+       sodipodi:cx="28.181818"
+       sodipodi:cy="34.727272"
+       sodipodi:r1="7.7352901"
+       sodipodi:r2="3.867645"
+       sodipodi:arg1="2.625362"
+       sodipodi:arg2="3.6725595"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 21.454545,38.545454 L 28.238812,26.992192 L 34.852097,38.64417 L 21.454545,38.545454 z "
+       transform="matrix(1.0358576e-2,0.9204412,-0.8151036,1.0232321e-2,81.86893,3.8526441)" />
+    <path
+       transform="matrix(-1.0358576e-2,0.9204412,0.8151036,1.0232321e-2,-18.036288,4.8526441)"
+       d="M 21.454545,38.545454 L 28.238812,26.992192 L 34.852097,38.64417 L 21.454545,38.545454 z "
+       inkscape:randomized="0"
+       inkscape:rounded="0"
+       inkscape:flatsided="true"
+       sodipodi:arg2="3.6725595"
+       sodipodi:arg1="2.625362"
+       sodipodi:r2="3.867645"
+       sodipodi:r1="7.7352901"
+       sodipodi:cy="34.727272"
+       sodipodi:cx="28.181818"
+       sodipodi:sides="3"
+       id="path3167"
+       style="opacity:1;fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#0a3d91;stroke-width:1.55269866;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       sodipodi:type="star" />
+  </g>
+</svg>
diff --git a/src/images/select_line.svg b/src/images/select_line.svg
new file mode 100644
index 0000000..e7c2694
--- /dev/null
+++ b/src/images/select_line.svg
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3187"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="select_line.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3189" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="10.390625"
+     inkscape:cx="32"
+     inkscape:cy="32"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1146"
+     inkscape:window-height="875"
+     inkscape:window-x="1711"
+     inkscape:window-y="61" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="rect under" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="rect">
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3.83869386;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:7.67738762, 7.67738762;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 6.9193469,49.080653 L 55.080653,3.5110751 L 55.080653,3.5110751"
+       id="path8281" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:#678ca8;fill-opacity:1;fill-rule:evenodd;stroke:#0e1215;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 48.833402,61.418045 L 39.049457,42.299663 L 30.99511,52.457854 L 27,15.399482 L 56.970623,37.683287 L 44.043921,39.365506 L 55.974121,57.360933 L 48.833402,61.418045 z "
+       id="path5208"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+</svg>
diff --git a/src/images/select_point.svg b/src/images/select_point.svg
new file mode 100644
index 0000000..937f2bc
--- /dev/null
+++ b/src/images/select_point.svg
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3187"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="select_point.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3189" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="8.546875"
+     inkscape:cx="29.728551"
+     inkscape:cy="32"
+     inkscape:current-layer="layer5"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1146"
+     inkscape:window-height="796"
+     inkscape:window-x="163"
+     inkscape:window-y="20"
+     inkscape:snap-grids="false"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2826" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="rect under"
+     style="display:inline" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="point"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#24303a;stroke-width:1.6654489;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3602"
+       sodipodi:cx="33.462524"
+       sodipodi:cy="36.446068"
+       sodipodi:rx="21.996344"
+       sodipodi:ry="20.767824"
+       d="m 55.458868,36.446068 a 21.996344,20.767824 0 1 1 -43.992687,0 21.996344,20.767824 0 1 1 43.992687,0 z"
+       transform="matrix(1.4002327,0,0,1.4830634,-14.646304,-22.021849)" />
+    <path
+       sodipodi:type="arc"
+       style="fill:#adbcc9;fill-opacity:1;stroke:#0e1215;stroke-width:4.27947664;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="path3602-2"
+       sodipodi:cx="33.462524"
+       sodipodi:cy="36.446068"
+       sodipodi:rx="21.996344"
+       sodipodi:ry="20.767824"
+       d="m 55.458868,36.446068 a 21.996344,20.767824 0 1 1 -43.992687,0 21.996344,20.767824 0 1 1 43.992687,0 z"
+       transform="matrix(0.54493018,0,0,0.57716549,13.832764,10.843814)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="arrow"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <path
+       style="fill:#678ca8;fill-opacity:1;fill-rule:evenodd;stroke:#0e1215;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       d="M 56.501835,59.727125 44.343205,45.98106 39.910966,56.115784 28.646712,26.273161 58.078415,38.329013 47.816261,42.48376 61.497058,54.84119 56.501835,59.727125 z"
+       id="path5208"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+</svg>
diff --git a/src/images/select_rect.svg b/src/images/select_rect.svg
new file mode 100644
index 0000000..fef671b
--- /dev/null
+++ b/src/images/select_rect.svg
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3187"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="select_rect.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3189" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="10.390625"
+     inkscape:cx="32"
+     inkscape:cy="32"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1146"
+     inkscape:window-height="875"
+     inkscape:window-x="1943"
+     inkscape:window-y="45" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="rect">
+    <rect
+       style="opacity:1;fill:#e3e7f4;fill-opacity:1;fill-rule:evenodd;stroke:#202830;stroke-width:2.245;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4.49,4.49;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect5213"
+       width="39.554913"
+       height="28.290253"
+       x="7.1578817"
+       y="5.0872474" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:#678ca8;fill-opacity:1;fill-rule:evenodd;stroke:#0e1215;stroke-width:1.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 51.543982,60.818563 L 41.760037,41.700181 L 33.70569,51.858372 L 29.71058,14.8 L 59.681203,37.083805 L 46.754501,38.766024 L 58.684701,56.761451 L 51.543982,60.818563 z "
+       id="path5208"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+</svg>
diff --git a/src/images/show_editable_only.svg b/src/images/show_editable_only.svg
new file mode 100644
index 0000000..3db2773
--- /dev/null
+++ b/src/images/show_editable_only.svg
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="show_editable_only.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1"
+   style="display:inline">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3630">
+      <stop
+         style="stop-color:#f6e1c0;stop-opacity:1;"
+         offset="0"
+         id="stop3632" />
+      <stop
+         style="stop-color:#f5e7d1;stop-opacity:1;"
+         offset="1"
+         id="stop3634" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3710-9">
+      <stop
+         id="stop3712-2"
+         offset="0"
+         style="stop-color:#cccccc;stop-opacity:1" />
+      <stop
+         id="stop3714-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3869-6">
+      <stop
+         style="stop-color:#ffad02;stop-opacity:1;"
+         offset="0"
+         id="stop3871-9" />
+      <stop
+         style="stop-color:#c4ba4a;stop-opacity:1;"
+         offset="1"
+         id="stop3873-2" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3829">
+      <stop
+         style="stop-color:#786535;stop-opacity:1;"
+         offset="0"
+         id="stop3831" />
+      <stop
+         style="stop-color:#cd6938;stop-opacity:1;"
+         offset="1"
+         id="stop3833" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3821">
+      <stop
+         style="stop-color:#050505;stop-opacity:1;"
+         offset="0"
+         id="stop3823" />
+      <stop
+         style="stop-color:#949494;stop-opacity:1;"
+         offset="1"
+         id="stop3825" />
+    </linearGradient>
+    <filter
+       inkscape:collect="always"
+       id="filter4742"
+       x="-0.092902906"
+       width="1.1858058"
+       y="-0.16145338"
+       height="1.3229069"
+       color-interpolation-filters="sRGB">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.87966724"
+         id="feGaussianBlur4744" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3630"
+       id="linearGradient3636"
+       x1="13.045778"
+       y1="7.4768147"
+       x2="20.514267"
+       y2="32.043404"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.94901309,4.4137931,-0.48260097)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3630"
+       id="linearGradient3644"
+       x1="2.0493469"
+       y1="7.4387646"
+       x2="10.126635"
+       y2="30.458979"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.95150721,4.4137931,-0.48886445)" />
+    <linearGradient
+       y2="32.043404"
+       x2="20.514267"
+       y1="7.4768147"
+       x1="13.045778"
+       gradientTransform="matrix(1,0,0,0.99606815,9.6076088,-0.86527545)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3664"
+       xlink:href="#linearGradient3630"
+       inkscape:collect="always" />
+    <inkscape:perspective
+       id="perspective3859"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3869-6-3"
+       id="linearGradient3031"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0884669,-0.47416089,0.46157136,1.1181553,-7.8141323,11.773461)"
+       x1="19.055012"
+       y1="7.0745502"
+       x2="22.446272"
+       y2="10.200515" />
+    <linearGradient
+       id="linearGradient3869-6-3">
+      <stop
+         style="stop-color:#ffad02;stop-opacity:1;"
+         offset="0"
+         id="stop3871-9-9" />
+      <stop
+         style="stop-color:#c4ba4a;stop-opacity:1;"
+         offset="1"
+         id="stop3873-2-4" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3829-9"
+       id="linearGradient3835"
+       x1="20.204853"
+       y1="14.127702"
+       x2="18.328623"
+       y2="13.355288"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3829-9">
+      <stop
+         style="stop-color:#786535;stop-opacity:1;"
+         offset="0"
+         id="stop3831-5" />
+      <stop
+         style="stop-color:#cd6938;stop-opacity:1;"
+         offset="1"
+         id="stop3833-5" />
+    </linearGradient>
+    <linearGradient
+       y2="19.714443"
+       x2="15.984475"
+       y1="23.807344"
+       x1="13.555334"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4051"
+       xlink:href="#linearGradient3821-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3821-7">
+      <stop
+         style="stop-color:#050505;stop-opacity:1;"
+         offset="0"
+         id="stop3823-3" />
+      <stop
+         style="stop-color:#949494;stop-opacity:1;"
+         offset="1"
+         id="stop3825-9" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.28125"
+     inkscape:cx="16.832936"
+     inkscape:cy="15.883455"
+     inkscape:current-layer="layer4"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1513"
+     inkscape:window-height="1140"
+     inkscape:window-x="2143"
+     inkscape:window-y="44"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="Layer">
+    <rect
+       ry="0"
+       y="1.864447"
+       x="5.9357915"
+       height="27.624258"
+       width="9.8549337"
+       id="rect3622"
+       style="fill:url(#linearGradient3644);fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <rect
+       style="fill:url(#linearGradient3636);fill-opacity:1;fill-rule:evenodd;stroke:#7b7b7b;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3624"
+       width="9.702734"
+       height="27.551849"
+       x="15.904876"
+       y="1.9006518"
+       ry="0" />
+    <rect
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:1;stroke-opacity:1"
+       id="rect3626"
+       width="9.931035"
+       height="3.9101176"
+       x="5.935791"
+       y="1.9006518" />
+    <rect
+       y="1.864447"
+       x="15.790727"
+       height="3.9101176"
+       width="9.7788363"
+       id="rect3628"
+       style="fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#70707d;stroke-width:1;stroke-opacity:1" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="pencil">
+    <g
+       style="display:inline"
+       transform="translate(6.3181858,2.3307449)"
+       id="g4016">
+      <path
+         sodipodi:nodetypes="cccccac"
+         id="path3867"
+         d="M 20.627643,0.76015116 13.43532,18.950953 l -0.001,5.07806 4.010906,-3.362709 7.198968,-18.3772475 c 0,0 -1.194687,-0.8032788 -1.861149,-1.0587055 C 22.096384,0.96718296 20.627643,0.76015116 20.627643,0.76015116 z"
+         style="fill:url(#linearGradient3031);fill-opacity:1;stroke:#c6a22a;stroke-width:0.40000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccccac"
+         id="path3877"
+         d="M 24.471152,2.3346905 17.287658,20.620719 15.938556,20.322441 23.189372,1.5289365 c 0,0 0.483607,0.2563827 0.714453,0.402877 0.195836,0.1242772 0.567327,0.402877 0.567327,0.402877 z"
+         style="fill:url(#linearGradient3835);fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3883"
+         d="m 13.340389,19.108085 -0.04097,5.072043 4.262629,-3.362811 -4.221661,-1.709232 z"
+         style="fill:#c8a656;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3887"
+         d="m 13.555334,20.697405 6.24e-4,3.109939 2.428517,-2.113485 -2.429141,-0.996454 z"
+         style="fill:url(#linearGradient4051);fill-opacity:1;stroke:none;display:inline" />
+    </g>
+  </g>
+</svg>
diff --git a/src/images/sidebar.svg b/src/images/sidebar.svg
new file mode 100644
index 0000000..ad3c2ae
--- /dev/null
+++ b/src/images/sidebar.svg
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="sidebar.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3159">
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1;"
+         offset="0"
+         id="stop3161" />
+      <stop
+         style="stop-color:#5e9aa7;stop-opacity:0;"
+         offset="1"
+         id="stop3163" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3134">
+      <stop
+         style="stop-color:#dee3e4;stop-opacity:1;"
+         offset="0"
+         id="stop3136" />
+      <stop
+         style="stop-color:#dee3e4;stop-opacity:0;"
+         offset="1"
+         id="stop3138" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3134"
+       id="linearGradient3157"
+       gradientUnits="userSpaceOnUse"
+       x1="0.99999994"
+       y1="31.930655"
+       x2="63.361065"
+       y2="31.930655"
+       gradientTransform="matrix(0.7010416,0,0,0.6043896,1.4704382,4.701441)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3159"
+       id="linearGradient3165"
+       x1="62.518417"
+       y1="30.428375"
+       x2="40.084583"
+       y2="30.690311"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.688908,0,0,0.6311989,3.2671546,3.8016354)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.958333"
+     inkscape:cx="22.945355"
+     inkscape:cy="24.134142"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-width="1128"
+     inkscape:window-height="928"
+     inkscape:window-x="577"
+     inkscape:window-y="25" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="l1"
+     style="display:inline">
+    <rect
+       style="opacity:1;fill:url(#linearGradient3157);fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:1.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2161"
+       width="42.984715"
+       height="36.924061"
+       x="2.5379691"
+       y="5.5379701" />
+  </g>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <rect
+       style="opacity:1;fill:url(#linearGradient3165);fill-opacity:1;fill-rule:evenodd;stroke:#24344d;stroke-width:1.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3153"
+       width="12.739919"
+       height="36.920658"
+       x="32.720413"
+       y="5.5396705" />
+  </g>
+</svg>
diff --git a/src/images/size_down.svg b/src/images/size_down.svg
new file mode 100644
index 0000000..f7dfa9f
--- /dev/null
+++ b/src/images/size_down.svg
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   style="display:inline"
+   sodipodi:docname="size_down.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3637">
+      <stop
+         style="stop-color:#72a7b9;stop-opacity:1;"
+         offset="0"
+         id="stop3639" />
+      <stop
+         style="stop-color:#f6fdff;stop-opacity:1;"
+         offset="1"
+         id="stop3641" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3637"
+       id="linearGradient3643"
+       x1="2"
+       y1="3"
+       x2="16"
+       y2="17"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.875"
+     inkscape:cx="14.29036"
+     inkscape:cy="15.852849"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:window-width="1447"
+     inkscape:window-height="975"
+     inkscape:window-x="2183"
+     inkscape:window-y="108"
+     inkscape:window-maximized="0"
+     gridtolerance="3">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="Layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3643);fill-opacity:1;fill-rule:evenodd;stroke:#424c58;stroke-width:0.53253859;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3635"
+       sodipodi:cx="9"
+       sodipodi:cy="10"
+       sodipodi:rx="7"
+       sodipodi:ry="7"
+       d="M 16,10 A 7,7 0 1 1 2,10 7,7 0 1 1 16,10 z"
+       transform="matrix(1.5022378,0,0,1.5022378,2.4798598,1.1087882)" />
+  </g>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1020.3622)"
+     style="display:inline">
+    <path
+       style="fill:none;stroke:#221f5f;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 8.488813,1036.4934 15.022381,0"
+       id="path3645" />
+  </g>
+</svg>
diff --git a/src/images/size_up.svg b/src/images/size_up.svg
new file mode 100644
index 0000000..e5f4003
--- /dev/null
+++ b/src/images/size_up.svg
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   style="display:inline"
+   sodipodi:docname="size_up.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3637">
+      <stop
+         style="stop-color:#72a7b9;stop-opacity:1;"
+         offset="0"
+         id="stop3639" />
+      <stop
+         style="stop-color:#f6fdff;stop-opacity:1;"
+         offset="1"
+         id="stop3641" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3637"
+       id="linearGradient3643"
+       x1="2"
+       y1="3"
+       x2="16"
+       y2="17"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.875"
+     inkscape:cx="14.29036"
+     inkscape:cy="15.852849"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:window-width="1447"
+     inkscape:window-height="975"
+     inkscape:window-x="2247"
+     inkscape:window-y="39"
+     inkscape:window-maximized="0"
+     gridtolerance="3">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="Layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#linearGradient3643);fill-opacity:1;fill-rule:evenodd;stroke:#424c58;stroke-width:0.5340063;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3635"
+       sodipodi:cx="9"
+       sodipodi:cy="10"
+       sodipodi:rx="7"
+       sodipodi:ry="7"
+       d="M 16,10 A 7,7 0 1 1 2,10 7,7 0 1 1 16,10 z"
+       transform="matrix(1.4981089,0,0,1.4981089,2.5171612,1.0188729)" />
+  </g>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1020.3622)"
+     style="display:inline">
+    <path
+       style="fill:none;stroke:#221f5f;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 8.5095988,1036.3622 14.9810922,0"
+       id="path3645" />
+    <path
+       id="path3689"
+       d="m 16.000149,1028.872 0,14.9809"
+       style="fill:none;stroke:#221f5f;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  </g>
+</svg>
diff --git a/src/images/stats.svg b/src/images/stats.svg
new file mode 100644
index 0000000..00a0e7b
--- /dev/null
+++ b/src/images/stats.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="stats.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.541667"
+     inkscape:cx="-3.1658255"
+     inkscape:cy="20.587512"
+     inkscape:document-units="px"
+     inkscape:current-layer="text2844-4"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-width="1912"
+     inkscape:window-height="1067"
+     inkscape:window-x="1919"
+     inkscape:window-y="35"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3896" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="l1"
+     style="display:inline">
+    <g
+       transform="matrix(1.0202252,0,0,0.98017574,0.15340207,-0.29130612)"
+       style="font-size:76.1570282px;font-style:normal;font-weight:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#ff9955;fill-opacity:1;stroke:none"
+       id="text2844-4">
+      <path
+         d="m 45.329794,5.3983239 0,5.4291631 -10.746768,0 c 3.297125,3.074078 4.945704,7.858678 4.945744,14.353815 -4e-5,7.065362 -1.809759,12.271403 -5.429163,15.61814 -3.594682,3.321955 -7.970236,4.98293 -13.126675,4.982931 -5.354807,-10e-7 -9.767547,-1.735348 -13.2382338,-5.206047 C 4.263996,37.105636 2.5286488,31.961571 2.5286513,25.144116 2.5286488,18.128375 4.3259727,12.934728 7.9206284,9.5631614 11.540059,6.191665 15.890822,4.5058991 20.972932,4.5058587 c 1.859279,4.04e-5 3.96648 [...]
+         id="path2821-6"
+         style="fill:#daa652;fill-opacity:1;stroke:#4e4e4e;stroke-width:0.89999998000000003;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+  </g>
+</svg>
diff --git a/src/images/swap_direction.svg b/src/images/swap_direction.svg
new file mode 100644
index 0000000..8c36769
--- /dev/null
+++ b/src/images/swap_direction.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg3187"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="swap_direction.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.1">
+  <defs
+     id="defs3189" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="10.390625"
+     inkscape:cx="32"
+     inkscape:cy="32"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1146"
+     inkscape:window-height="875"
+     inkscape:window-x="2360"
+     inkscape:window-y="123" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="rect" />
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:#678ca8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.67700005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 36.092718,38.867956 L 28.694056,47.092452 L 34.225993,52.188917 L 13.770477,57.514268 L 17.702797,37.223952 L 23.443175,42.302123 L 30.921362,34.079445 L 36.092718,38.867956 z "
+       id="path5208"
+       sodipodi:nodetypes="cccccccc" />
+    <path
+       sodipodi:nodetypes="cccccccc"
+       id="path6220"
+       d="M 35.8385,28.939105 L 43.237161,20.714608 L 37.705224,15.618143 L 58.16074,10.292792 L 54.228419,30.583108 L 48.488042,25.504937 L 41.009855,33.727615 L 35.8385,28.939105 z "
+       style="fill:#e1e4e5;fill-opacity:1;fill-rule:evenodd;stroke:#0e1c29;stroke-width:1.67700005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+    <path
+       style="fill:#0a1a1f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.94701552px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 11.398482,27.751584 C 11.885501,25.334419 12.89216,21.776636 13.860381,19.263232 C 15.562439,16.557347 15.914914,15.49878 18.158193,13.633565 C 20.416707,11.755681 23.276461,10.308011 25.979957,8.9820775 C 24.990546,7.6952608 24.386096,6.6971658 23.396685,5.4103491 C 27.260004,5.8790023 31.123323,6.3476568 34.986642,6.8163112 C 33.79439,9.7796087 32.255759,13.212315 31.063506,16.175613 C 30.118431,14.797925 32.352601,18.015914 28.343741,12.042549 C 25.978379,12.907601 24.4687 [...]
+       id="path6240"
+       sodipodi:nodetypes="ccscccccscccccc" />
+  </g>
+</svg>
diff --git a/src/images/triangle_left.svg b/src/images/triangle_left.svg
new file mode 100644
index 0000000..64701c2
--- /dev/null
+++ b/src/images/triangle_left.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="triangle_left.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3624">
+      <stop
+         style="stop-color:#b2b2b2;stop-opacity:1;"
+         offset="0"
+         id="stop3626" />
+      <stop
+         style="stop-color:#515151;stop-opacity:1;"
+         offset="1"
+         id="stop3628" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3624"
+       id="linearGradient3637"
+       gradientUnits="userSpaceOnUse"
+       x1="-1.0861593"
+       y1="1.5796016"
+       x2="1.4876401"
+       y2="14.414459"
+       gradientTransform="matrix(1.3085509,-0.07148507,0.06477452,1.4441149,13.089661,4.2483786)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.8464643"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1179"
+     inkscape:window-x="1916"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3637);fill-opacity:1;stroke:#2e2e2e;stroke-width:0.95382041;stroke-miterlimit:4;stroke-opacity:1"
+       d="m 22.614605,25.96002 c 0.0048,2.624135 -1.711885,1.152379 -3.129604,0.03768 L 8.9069503,17.68058 c -1.484268,-1.167024 -1.435926,-1.708735 -1.373352,-2.16241 0.06257,-0.453676 -0.05911,-0.766164 1.394668,-1.857508 L 19.69852,5.5754974 c 1.611094,-1.2094383 2.875853,-1.4951629 2.878085,-0.2810829 l 0.038,20.6656055 z"
+       id="path3622"
+       sodipodi:nodetypes="csszsssz" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar" />
+</svg>
diff --git a/src/images/triangle_right.svg b/src/images/triangle_right.svg
new file mode 100644
index 0000000..b985738
--- /dev/null
+++ b/src/images/triangle_right.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="triangle_right.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3624">
+      <stop
+         style="stop-color:#b2b2b2;stop-opacity:1;"
+         offset="0"
+         id="stop3626" />
+      <stop
+         style="stop-color:#515151;stop-opacity:1;"
+         offset="1"
+         id="stop3628" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3624"
+       id="linearGradient3637"
+       gradientUnits="userSpaceOnUse"
+       x1="-1.0861593"
+       y1="1.5796016"
+       x2="1.4876401"
+       y2="14.414459"
+       gradientTransform="matrix(-1.3085509,-0.07148507,-0.06477452,1.4441149,19.232806,5.0241361)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.46875"
+     inkscape:cx="3.9111108"
+     inkscape:cy="16.354555"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:window-width="1280"
+     inkscape:window-height="740"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:snap-to-guides="false"
+     inkscape:snap-grids="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2831"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="arrow"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3637);fill-opacity:1;stroke:#2e2e2e;stroke-width:0.95382041;stroke-miterlimit:4;stroke-opacity:1"
+       d="m 9.7078635,26.735778 c -0.0048,2.624135 1.7118845,1.152379 3.1296025,0.03768 l 10.578051,-8.31712 c 1.484268,-1.167024 1.435926,-1.708735 1.373352,-2.16241 -0.06257,-0.453676 0.05911,-0.766164 -1.394668,-1.857508 L 12.623947,6.3512549 C 11.012854,5.1418166 9.7480955,4.856092 9.7458635,6.070172 l -0.038,20.665606 z"
+       id="path3622"
+       sodipodi:nodetypes="csszsssz" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="bar" />
+</svg>
diff --git a/src/images/undo.svg b/src/images/undo.svg
new file mode 100644
index 0000000..29d3b8f
--- /dev/null
+++ b/src/images/undo.svg
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="undo.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3679">
+      <stop
+         id="stop3681"
+         offset="0"
+         style="stop-color:#ebb938;stop-opacity:1;" />
+      <stop
+         id="stop3683"
+         offset="1"
+         style="stop-color:#e9e998;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3679"
+       id="linearGradient3656"
+       x1="15.603005"
+       y1="11.415942"
+       x2="14.703928"
+       y2="5.6313658"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.0480094,0.17867819,0.16288865,1.1495978,30.960449,-3.7945046)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="18.75"
+     inkscape:cx="13.946609"
+     inkscape:cy="16.554812"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:snap-grids="false"
+     inkscape:window-width="1285"
+     inkscape:window-height="990"
+     inkscape:window-x="214"
+     inkscape:window-y="35"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2816"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="item"
+     style="display:inline">
+    <path
+       style="fill:url(#linearGradient3656);fill-opacity:1;stroke:#b88a17;stroke-width:0.80000000999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 30.458905,15.694049 c 0,0 0.125393,0.480966 -0.43699,-1.87208 C 29.328037,10.918745 26.598717,8.0755264 24.214846,6.7745262 21.830975,5.473526 19.558998,5.5293861 17.014702,6.0555164 14.9684,6.4786672 12.72476,7.5812866 11.359263,8.9663122 9.9937663,10.351338 7.9255073,13.308765 7.9255073,13.308765 L 2.7315943,9.103897 4.5915323,21.834403 16.785737,20.59974 11.325502,16.023316 c 1.934005,-3.407116 3.894386,-5.588442 7.586645,-6.2725477 2.781788,-0.4439661 4.188891,-0.3541304  [...]
+       id="path2876"
+       sodipodi:nodetypes="cszssccccccsc" />
+  </g>
+</svg>
diff --git a/src/images/wizard.svg b/src/images/wizard.svg
new file mode 100644
index 0000000..6babfd5
--- /dev/null
+++ b/src/images/wizard.svg
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg1455"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="wizard.svg"
+   inkscape:export-xdpi="120.00000"
+   inkscape:export-ydpi="120.00000"
+   version="1.1">
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient3667">
+      <stop
+         style="stop-color:#363636;stop-opacity:1;"
+         offset="0"
+         id="stop3669" />
+      <stop
+         style="stop-color:#fdfdfd;stop-opacity:1;"
+         offset="1"
+         id="stop3671" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3657">
+      <stop
+         style="stop-color:#fcfdd1;stop-opacity:1;"
+         offset="0"
+         id="stop3659" />
+      <stop
+         style="stop-color:#ffd203;stop-opacity:1;"
+         offset="1"
+         id="stop3661" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3657"
+       id="linearGradient3663"
+       x1="11"
+       y1="11"
+       x2="16"
+       y2="3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1014799,0,0,1.1014799,-1.3186478,1.034797)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3667"
+       id="linearGradient3673"
+       x1="-7.1498078"
+       y1="30.5"
+       x2="-3.8501922"
+       y2="30.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.94324744,-1.6333833e-8,1.6333833e-8,0.94324744,4.8821097,13.62446)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="13.90625"
+     inkscape:cx="13.303371"
+     inkscape:cy="16"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1020"
+     inkscape:window-height="690"
+     inkscape:window-x="157"
+     inkscape:window-y="5"
+     inkscape:window-maximized="0"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3734"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)">
+    <rect
+       style="fill:url(#linearGradient3673);fill-opacity:1;stroke:#363636;stroke-width:0.28261161;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3665"
+       width="2.8297427"
+       height="19.808197"
+       x="-1.7206225"
+       y="32.489407"
+       ry="0.94324756"
+       transform="matrix(0.88327725,-0.46885105,0.46885105,0.88327725,0,0)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="star">
+    <path
+       sodipodi:type="star"
+       style="fill:#ffffff;fill-opacity:1;stroke:none"
+       id="path3743"
+       sodipodi:sides="3"
+       sodipodi:cx="-17"
+       sodipodi:cy="16"
+       sodipodi:r1="8.6023253"
+       sodipodi:r2="4.3011625"
+       sodipodi:arg1="0.62024949"
+       sodipodi:arg2="1.667447"
+       inkscape:flatsided="false"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M -9.9999999,21 -17.415063,20.281089 -24.830127,19.562178 -20.5,13.5 -16.169873,7.437822 -13.084936,14.218911 -9.9999999,21 z" />
+    <path
+       style="fill:url(#linearGradient3663);fill-opacity:1;stroke:#ba590b;stroke-width:0.44059196;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 22.470695,14.50455 -6.734744,0.136502 -3.816056,5.4659 L 9.8364621,13.928039 3.3795547,12.197187 8.8266661,8.2419167 8.6521298,1.7062922 14.102071,5.4407165 20.451095,3.1323225 18.372226,9.3955984 22.470695,14.50455 z"
+       id="path2882"
+       sodipodi:nodetypes="ccccccccccc" />
+  </g>
+</svg>
diff --git a/src/images/zoom.svg b/src/images/zoom.svg
new file mode 100644
index 0000000..307cddd
--- /dev/null
+++ b/src/images/zoom.svg
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2458"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/zoom_32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="zoom.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0">
+  <defs
+     id="defs2460">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient19264">
+      <stop
+         style="stop-color:#5e4c1e;stop-opacity:1"
+         offset="0"
+         id="stop19266" />
+      <stop
+         style="stop-color:#a07847;stop-opacity:0.98823529"
+         offset="1"
+         id="stop19268" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient18283">
+      <stop
+         style="stop-color:#84b7ca;stop-opacity:1"
+         offset="0"
+         id="stop18285" />
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1"
+         offset="1"
+         id="stop18287" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3353">
+      <stop
+         style="stop-color:#428dc7;stop-opacity:1;"
+         offset="0"
+         id="stop3355" />
+      <stop
+         style="stop-color:#428dc7;stop-opacity:0.99215686"
+         offset="1"
+         id="stop3357" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3353"
+       id="linearGradient3361"
+       x1="4.5406423"
+       y1="11.025381"
+       x2="20.880678"
+       y2="11.025381"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient18283"
+       id="linearGradient18289"
+       x1="5.48851"
+       y1="13.277822"
+       x2="23.054197"
+       y2="13.277822"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient19264"
+       id="linearGradient19270"
+       x1="17.714294"
+       y1="25.441625"
+       x2="27.404643"
+       y2="25.441625"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       inkscape:collect="always"
+       id="filter19332">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.65537828"
+         id="feGaussianBlur19334" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.412504"
+     inkscape:cx="18.56067"
+     inkscape:cy="15.865453"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="931"
+     inkscape:window-height="849"
+     inkscape:window-x="0"
+     inkscape:window-y="98">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3243" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="shadow"
+     style="display:inline">
+    <g
+       id="g5350"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter19332)"
+       transform="translate(1.2306377,0.225891)">
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5325"
+         sodipodi:cx="17.726692"
+         sodipodi:cy="18.068695"
+         sodipodi:rx="10.225221"
+         sodipodi:ry="9.2875366"
+         d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+         transform="matrix(0.8224526,0,0,0.8919559,-2.2517642,-5.0155567)" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5327"
+         sodipodi:cx="15.512691"
+         sodipodi:cy="13.380711"
+         sodipodi:rx="6.8629441"
+         sodipodi:ry="6.8832488"
+         d="M 22.375635 13.380711 A 6.8629441 6.8832488 0 1 1  8.6497464,13.380711 A 6.8629441 6.8832488 0 1 1  22.375635 13.380711 z"
+         transform="matrix(1.0613905,0,0,1.0324484,-4.2050462,-2.708294)" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.96200001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 16.237869,19.513646 L 18.394744,22.492518 L 20.826967,20.678501 L 18.67009,17.766365 L 16.237869,19.513646 z "
+         id="path5329" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.13095403;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 18.279771,23.516488 L 19.384209,25.533297 L 21.547066,28.100147 L 24.124089,30.208632 L 26.839166,28.05431 L 25.550654,25.074931 L 23.560365,22.370572 L 21.96123,20.674617 L 18.279771,23.516488 z "
+         id="path5331" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5333"
+         sodipodi:cx="12.71066"
+         sodipodi:cy="11.025381"
+         sodipodi:rx="7.6345177"
+         sodipodi:ry="7.3299494"
+         d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+         transform="matrix(1.0884482,0,0,1.1198241,-1.5901471,-1.219584)" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="inner"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient18289);fill-opacity:1;fill-rule:evenodd;stroke:#45719f;stroke-width:1.31299996;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path17312"
+       sodipodi:cx="14.271354"
+       sodipodi:cy="13.277822"
+       sodipodi:rx="8.1263437"
+       sodipodi:ry="8.0976295"
+       d="M 22.397697 13.277822 A 8.1263437 8.0976295 0 1 1  6.14501,13.277822 A 8.1263437 8.0976295 0 1 1  22.397697 13.277822 z"
+       transform="translate(-2.0541974,-2.0674798)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="handler"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#50506c;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2468"
+       sodipodi:cx="17.726692"
+       sodipodi:cy="18.068695"
+       sodipodi:rx="10.225221"
+       sodipodi:ry="9.2875366"
+       d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+       transform="matrix(0.8224526,0,0,0.8919559,-2.2517642,-5.0155567)" />
+    <path
+       style="fill:#b2aad8;fill-opacity:1;fill-rule:evenodd;stroke:#474a5a;stroke-width:0.96200001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 16.237869,19.513646 L 18.394744,22.492518 L 20.826967,20.678501 L 18.67009,17.766365 L 16.237869,19.513646 z "
+       id="path3411" />
+    <path
+       style="fill:#e0b478;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient19270);stroke-width:1.13095403;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 18.279771,23.516488 L 19.384209,25.533297 L 21.547066,28.100147 L 24.124089,30.208632 L 26.839166,28.05431 L 25.550654,25.074931 L 23.560365,22.370572 L 21.96123,20.674617 L 18.279771,23.516488 z "
+       id="path3413" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="frame"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3361);stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3341"
+       sodipodi:cx="12.71066"
+       sodipodi:cy="11.025381"
+       sodipodi:rx="7.6345177"
+       sodipodi:ry="7.3299494"
+       d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+       transform="matrix(1.0884482,0,0,1.1198241,-1.5901471,-1.219584)" />
+  </g>
+</svg>
diff --git a/src/images/zoom_in.svg b/src/images/zoom_in.svg
new file mode 100644
index 0000000..dcfb1fd
--- /dev/null
+++ b/src/images/zoom_in.svg
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2458"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/zoom_32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="zoom_in.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0">
+  <defs
+     id="defs2460">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient19264">
+      <stop
+         style="stop-color:#5e4c1e;stop-opacity:1"
+         offset="0"
+         id="stop19266" />
+      <stop
+         style="stop-color:#a07847;stop-opacity:0.98823529"
+         offset="1"
+         id="stop19268" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient18283">
+      <stop
+         style="stop-color:#84b7ca;stop-opacity:1"
+         offset="0"
+         id="stop18285" />
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1"
+         offset="1"
+         id="stop18287" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3353">
+      <stop
+         style="stop-color:#428dc7;stop-opacity:1;"
+         offset="0"
+         id="stop3355" />
+      <stop
+         style="stop-color:#428dc7;stop-opacity:0.99215686"
+         offset="1"
+         id="stop3357" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3353"
+       id="linearGradient3361"
+       x1="4.5406423"
+       y1="11.025381"
+       x2="20.880678"
+       y2="11.025381"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient18283"
+       id="linearGradient18289"
+       x1="5.48851"
+       y1="13.277822"
+       x2="23.054197"
+       y2="13.277822"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient19264"
+       id="linearGradient19270"
+       x1="17.714294"
+       y1="25.441625"
+       x2="27.404643"
+       y2="25.441625"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9848439,0,0,0.991732,0.2713268,-0.224937)" />
+    <filter
+       inkscape:collect="always"
+       id="filter19332">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.65537828"
+         id="feGaussianBlur19334" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       x="-0.055110518"
+       width="1.110221"
+       y="-0.21586984"
+       height="1.4317397"
+       id="filter3641">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.25863019"
+         id="feGaussianBlur3643" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.412504"
+     inkscape:cx="18.56067"
+     inkscape:cy="15.865453"
+     inkscape:current-layer="layer6"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="931"
+     inkscape:window-height="849"
+     inkscape:window-x="939"
+     inkscape:window-y="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3243" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="shadow"
+     style="display:inline">
+    <g
+       id="g5350"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter19332)"
+       transform="matrix(0.9848439,0,0,0.9917321,1.4833129,-9.1352759e-4)">
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5325"
+         sodipodi:cx="17.726692"
+         sodipodi:cy="18.068695"
+         sodipodi:rx="10.225221"
+         sodipodi:ry="9.2875366"
+         d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+         transform="matrix(0.8224526,0,0,0.8919559,-2.2517642,-5.0155567)" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5327"
+         sodipodi:cx="15.512691"
+         sodipodi:cy="13.380711"
+         sodipodi:rx="6.8629441"
+         sodipodi:ry="6.8832488"
+         d="M 22.375635 13.380711 A 6.8629441 6.8832488 0 1 1  8.6497464,13.380711 A 6.8629441 6.8832488 0 1 1  22.375635 13.380711 z"
+         transform="matrix(1.0613905,0,0,1.0324484,-4.2050462,-2.708294)" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.96200001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 16.237869,19.513646 L 18.394744,22.492518 L 20.826967,20.678501 L 18.67009,17.766365 L 16.237869,19.513646 z "
+         id="path5329" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.13095403;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 18.279771,23.516488 L 19.384209,25.533297 L 21.547066,28.100147 L 24.124089,30.208632 L 26.839166,28.05431 L 25.550654,25.074931 L 23.560365,22.370572 L 21.96123,20.674617 L 18.279771,23.516488 z "
+         id="path5331" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5333"
+         sodipodi:cx="12.71066"
+         sodipodi:cy="11.025381"
+         sodipodi:rx="7.6345177"
+         sodipodi:ry="7.3299494"
+         d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+         transform="matrix(1.0884482,0,0,1.1198241,-1.5901471,-1.219584)" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="inner"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient18289);fill-opacity:1;fill-rule:evenodd;stroke:#45719f;stroke-width:1.31299996;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path17312"
+       sodipodi:cx="14.271354"
+       sodipodi:cy="13.277822"
+       sodipodi:rx="8.1263437"
+       sodipodi:ry="8.0976295"
+       d="M 22.397697 13.277822 A 8.1263437 8.0976295 0 1 1  6.14501,13.277822 A 8.1263437 8.0976295 0 1 1  22.397697 13.277822 z"
+       transform="matrix(0.9848439,0,0,0.9917321,-1.7517369,-2.2753232)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="handler"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#50506c;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2468"
+       sodipodi:cx="17.726692"
+       sodipodi:cy="18.068695"
+       sodipodi:rx="10.225221"
+       sodipodi:ry="9.2875366"
+       d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+       transform="matrix(0.8103245,0,0,0.8684268,-1.9537836,-5.0687743)" />
+    <path
+       style="fill:#b2aad8;fill-opacity:1;fill-rule:evenodd;stroke:#474a5a;stroke-width:0.95072734;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 16.263094,19.127373 L 18.387281,22.081615 L 20.78264,20.282596 L 18.658453,17.394537 L 16.263094,19.127373 z "
+       id="path3411" />
+    <path
+       style="fill:#e0b478;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient19270);stroke-width:1.11770165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 18.27405,23.09712 L 19.361748,25.097254 L 21.491827,27.642882 L 24.029791,29.733933 L 26.703718,27.597424 L 25.434734,24.642677 L 23.474611,21.960679 L 21.899713,20.278745 L 18.27405,23.09712 z "
+       id="path3413" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="frame"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3361);stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3341"
+       sodipodi:cx="12.71066"
+       sodipodi:cy="11.025381"
+       sodipodi:rx="7.6345177"
+       sodipodi:ry="7.3299494"
+       d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+       transform="matrix(1.0719516,0,0,1.1105655,-1.2947198,-1.4344376)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="symbol">
+    <rect
+       ry="0"
+       y="21.534828"
+       x="2.5897698"
+       height="2.8754015"
+       width="11.263049"
+       id="rect3407"
+       style="opacity:1;fill:#1e2818;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.17953944;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3641)"
+       transform="matrix(0.9335874,0,0,0.9662998,-1.4177765,3.4123999)" />
+    <rect
+       ry="0"
+       y="21.534828"
+       x="2.5897698"
+       height="2.8754015"
+       width="11.263049"
+       id="rect3715"
+       style="opacity:1;fill:#1e2818;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.17953944;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3641)"
+       transform="matrix(0,-0.9029936,1.0062455,0,-16.669324,33.075085)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="symbol 1">
+    <rect
+       style="opacity:1;fill:#27b027;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.17953944;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3405"
+       width="10"
+       height="2.8754015"
+       x="1"
+       y="23.59799"
+       ry="0" />
+    <rect
+       style="opacity:1;fill:#27b027;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.17953944;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3713"
+       width="10"
+       height="2.8754015"
+       x="-30"
+       y="4.4928684"
+       ry="0"
+       transform="matrix(0,-1,1,0,0,0)" />
+  </g>
+</svg>
diff --git a/src/images/zoom_out.svg b/src/images/zoom_out.svg
new file mode 100644
index 0000000..a8120dd
--- /dev/null
+++ b/src/images/zoom_out.svg
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2458"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/zoom_32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="zoom_out.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0">
+  <defs
+     id="defs2460">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient19264">
+      <stop
+         style="stop-color:#5e4c1e;stop-opacity:1"
+         offset="0"
+         id="stop19266" />
+      <stop
+         style="stop-color:#a07847;stop-opacity:0.98823529"
+         offset="1"
+         id="stop19268" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient18283">
+      <stop
+         style="stop-color:#84b7ca;stop-opacity:1"
+         offset="0"
+         id="stop18285" />
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1"
+         offset="1"
+         id="stop18287" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3353">
+      <stop
+         style="stop-color:#428dc7;stop-opacity:1;"
+         offset="0"
+         id="stop3355" />
+      <stop
+         style="stop-color:#428dc7;stop-opacity:0.99215686"
+         offset="1"
+         id="stop3357" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3353"
+       id="linearGradient3361"
+       x1="4.5406423"
+       y1="11.025381"
+       x2="20.880678"
+       y2="11.025381"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient18283"
+       id="linearGradient18289"
+       x1="5.48851"
+       y1="13.277822"
+       x2="23.054197"
+       y2="13.277822"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient19264"
+       id="linearGradient19270"
+       x1="17.714294"
+       y1="25.441625"
+       x2="27.404643"
+       y2="25.441625"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9848439,0,0,0.991732,0.2713268,-0.224937)" />
+    <filter
+       inkscape:collect="always"
+       id="filter19332">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.65537828"
+         id="feGaussianBlur19334" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       x="-0.055110518"
+       width="1.110221"
+       y="-0.21586984"
+       height="1.4317397"
+       id="filter3641">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.25863019"
+         id="feGaussianBlur3643" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="17.412504"
+     inkscape:cx="18.56067"
+     inkscape:cy="15.865453"
+     inkscape:current-layer="layer6"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="931"
+     inkscape:window-height="849"
+     inkscape:window-x="0"
+     inkscape:window-y="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3243" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="shadow"
+     style="display:inline">
+    <g
+       id="g5350"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter19332)"
+       transform="matrix(0.9848439,0,0,0.9917321,1.4833129,-9.1352759e-4)">
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5325"
+         sodipodi:cx="17.726692"
+         sodipodi:cy="18.068695"
+         sodipodi:rx="10.225221"
+         sodipodi:ry="9.2875366"
+         d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+         transform="matrix(0.8224526,0,0,0.8919559,-2.2517642,-5.0155567)" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5327"
+         sodipodi:cx="15.512691"
+         sodipodi:cy="13.380711"
+         sodipodi:rx="6.8629441"
+         sodipodi:ry="6.8832488"
+         d="M 22.375635 13.380711 A 6.8629441 6.8832488 0 1 1  8.6497464,13.380711 A 6.8629441 6.8832488 0 1 1  22.375635 13.380711 z"
+         transform="matrix(1.0613905,0,0,1.0324484,-4.2050462,-2.708294)" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.96200001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 16.237869,19.513646 L 18.394744,22.492518 L 20.826967,20.678501 L 18.67009,17.766365 L 16.237869,19.513646 z "
+         id="path5329" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.13095403;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 18.279771,23.516488 L 19.384209,25.533297 L 21.547066,28.100147 L 24.124089,30.208632 L 26.839166,28.05431 L 25.550654,25.074931 L 23.560365,22.370572 L 21.96123,20.674617 L 18.279771,23.516488 z "
+         id="path5331" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5333"
+         sodipodi:cx="12.71066"
+         sodipodi:cy="11.025381"
+         sodipodi:rx="7.6345177"
+         sodipodi:ry="7.3299494"
+         d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+         transform="matrix(1.0884482,0,0,1.1198241,-1.5901471,-1.219584)" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="inner"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient18289);fill-opacity:1;fill-rule:evenodd;stroke:#45719f;stroke-width:1.31299996;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path17312"
+       sodipodi:cx="14.271354"
+       sodipodi:cy="13.277822"
+       sodipodi:rx="8.1263437"
+       sodipodi:ry="8.0976295"
+       d="M 22.397697 13.277822 A 8.1263437 8.0976295 0 1 1  6.14501,13.277822 A 8.1263437 8.0976295 0 1 1  22.397697 13.277822 z"
+       transform="matrix(0.9848439,0,0,0.9917321,-1.7517369,-2.2753232)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="handler"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#50506c;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2468"
+       sodipodi:cx="17.726692"
+       sodipodi:cy="18.068695"
+       sodipodi:rx="10.225221"
+       sodipodi:ry="9.2875366"
+       d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+       transform="matrix(0.8103245,0,0,0.8684268,-1.9537836,-5.0687743)" />
+    <path
+       style="fill:#b2aad8;fill-opacity:1;fill-rule:evenodd;stroke:#474a5a;stroke-width:0.95072734;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 16.263094,19.127373 L 18.387281,22.081615 L 20.78264,20.282596 L 18.658453,17.394537 L 16.263094,19.127373 z "
+       id="path3411" />
+    <path
+       style="fill:#e0b478;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient19270);stroke-width:1.11770165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 18.27405,23.09712 L 19.361748,25.097254 L 21.491827,27.642882 L 24.029791,29.733933 L 26.703718,27.597424 L 25.434734,24.642677 L 23.474611,21.960679 L 21.899713,20.278745 L 18.27405,23.09712 z "
+       id="path3413" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="frame"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3361);stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3341"
+       sodipodi:cx="12.71066"
+       sodipodi:cy="11.025381"
+       sodipodi:rx="7.6345177"
+       sodipodi:ry="7.3299494"
+       d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+       transform="matrix(1.0719516,0,0,1.1105655,-1.2947198,-1.4344376)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="symbol">
+    <rect
+       ry="0"
+       y="21.534828"
+       x="2.5897698"
+       height="2.8754015"
+       width="11.263049"
+       id="rect3407"
+       style="opacity:1;fill:#1e2818;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.17953944;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3641)"
+       transform="matrix(0.887859,0,0,1.0262183,0.7006494,2.5477653)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer6"
+     inkscape:label="symbol 1">
+    <rect
+       style="opacity:1;fill:#27b027;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.17953944;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3405"
+       width="10"
+       height="2.8754015"
+       x="2.4256999"
+       y="24"
+       ry="0" />
+  </g>
+</svg>
diff --git a/src/images/zoom_stack.svg b/src/images/zoom_stack.svg
new file mode 100644
index 0000000..c34bcb8
--- /dev/null
+++ b/src/images/zoom_stack.svg
@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2458"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   inkscape:export-filename="/tmp/cgr/work/icons/metview/zoom_32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="zoom_stack.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0">
+  <defs
+     id="defs2460">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient19264">
+      <stop
+         style="stop-color:#5e4c1e;stop-opacity:1"
+         offset="0"
+         id="stop19266" />
+      <stop
+         style="stop-color:#a07847;stop-opacity:0.98823529"
+         offset="1"
+         id="stop19268" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient18283">
+      <stop
+         style="stop-color:#84b7ca;stop-opacity:1"
+         offset="0"
+         id="stop18285" />
+      <stop
+         style="stop-color:#f5f5f5;stop-opacity:1"
+         offset="1"
+         id="stop18287" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3353">
+      <stop
+         style="stop-color:#428dc7;stop-opacity:1;"
+         offset="0"
+         id="stop3355" />
+      <stop
+         style="stop-color:#428dc7;stop-opacity:0.99215686"
+         offset="1"
+         id="stop3357" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3353"
+       id="linearGradient3361"
+       x1="4.5406423"
+       y1="11.025381"
+       x2="20.880678"
+       y2="11.025381"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient18283"
+       id="linearGradient18289"
+       x1="5.48851"
+       y1="13.277822"
+       x2="23.054197"
+       y2="13.277822"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient19264"
+       id="linearGradient19270"
+       x1="17.714294"
+       y1="25.441625"
+       x2="27.404643"
+       y2="25.441625"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.6806179,0,0,0.6939914,4.1059266,8.8344479)" />
+    <filter
+       inkscape:collect="always"
+       id="filter19332">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.65537828"
+         id="feGaussianBlur19334" />
+    </filter>
+    <filter
+       id="filter16239"
+       height="1.2390391"
+       y="-0.11951957"
+       width="1.1884188"
+       x="-0.094209409"
+       inkscape:collect="always">
+      <feGaussianBlur
+         id="feGaussianBlur16241"
+         stdDeviation="0.40609806"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       id="filter16158"
+       inkscape:collect="always">
+      <feGaussianBlur
+         id="feGaussianBlur16160"
+         stdDeviation="0.54529716"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       id="filter13194"
+       inkscape:collect="always">
+      <feGaussianBlur
+         id="feGaussianBlur13196"
+         stdDeviation="0.80518673"
+         inkscape:collect="always" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="19.96875"
+     inkscape:cx="18.699673"
+     inkscape:cy="13.227023"
+     inkscape:current-layer="layer2"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="931"
+     inkscape:window-height="849"
+     inkscape:window-x="1831"
+     inkscape:window-y="33">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3243" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="Apache License 2.0" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title />
+          </cc:Agent>
+        </dc:creator>
+        <dc:publisher>
+          <cc:Agent>
+            <dc:title>ECMWF</dc:title>
+          </cc:Agent>
+        </dc:publisher>
+        <dc:language>en-GB</dc:language>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>Metview icon</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:description>Metview icon</dc:description>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="rects"
+     style="display:inline">
+    <g
+       id="g2373"
+       inkscape:label="shadow1"
+       style="display:none"
+       transform="matrix(0.9476345,0,0,0.8562642,-0.9196838,3.7691163)">
+      <rect
+         ry="1.316434"
+         y="3"
+         x="3.1365795"
+         height="27.157673"
+         width="27.86342"
+         id="rect12185"
+         style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.22300005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline;filter:url(#filter13194)"
+         transform="matrix(0.9207959,0,0,0.9160289,0.1118503,0.6091825)" />
+    </g>
+    <g
+       inkscape:label="rect1"
+       id="g2376"
+       style="fill:#e2e1cc;fill-opacity:1;display:inline;stroke:#536a97;stroke-opacity:1;stroke-width:1.37824196;stroke-miterlimit:4;stroke-dasharray:none"
+       transform="matrix(0.8143271,0,0,0.7708954,-1.2479093,-0.2800522)">
+      <rect
+         style="opacity:1;fill:#e2e1cc;fill-opacity:1;fill-rule:evenodd;stroke:#536a97;stroke-width:1.37824196;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="rect2160"
+         width="24.292278"
+         height="22.630211"
+         x="2.5212083"
+         y="2.8485799"
+         ry="1.0969708" />
+    </g>
+    <g
+       id="layer6"
+       inkscape:label="shadow2"
+       style="display:none"
+       transform="matrix(0.9476345,0,0,0.8562642,-0.9196838,3.7691163)">
+      <rect
+         ry="1.3569907"
+         y="6.4644165"
+         x="5"
+         height="17.535583"
+         width="19.726389"
+         id="rect15142"
+         style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.22300005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline;filter:url(#filter16158)" />
+    </g>
+    <g
+       id="g2381"
+       inkscape:label="rect2"
+       style="fill:#e2e1cc;fill-opacity:1;stroke:#536a97;stroke-width:1.11086171;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       transform="matrix(0.974462,0,5.1887712e-3,0.9011904,-3.3178312,-3.1609224)">
+      <rect
+         style="opacity:1;fill:#e2e1cc;fill-opacity:1;fill-rule:evenodd;stroke:#536a97;stroke-width:1.11086171;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+         id="rect3134"
+         width="20.382238"
+         height="18.186834"
+         x="7.9847422"
+         y="9.6330194"
+         ry="1.4073876" />
+    </g>
+    <g
+       id="layer8"
+       inkscape:label="shadow3"
+       style="display:none"
+       transform="matrix(0.9476345,0,0,0.8562642,-0.9196838,3.7691163)">
+      <rect
+         style="opacity:1;fill:#111b1b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.10399997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline;filter:url(#filter16239)"
+         id="rect16176"
+         width="10.345414"
+         height="8.1546087"
+         x="10.654586"
+         y="11"
+         ry="0.63104427" />
+    </g>
+    <g
+       id="layer7"
+       inkscape:label="rect3"
+       style="fill:#e2e1cc;fill-opacity:1;stroke:#536a97;stroke-width:0.83316892;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       transform="matrix(1.3057375,0,0,1.191545,-11.140266,-11.198601)">
+      <rect
+         ry="1.0282111"
+         y="16.6565"
+         x="15.056539"
+         height="13.286962"
+         width="15.286962"
+         id="rect16168"
+         style="opacity:1;fill:#e2e1cc;fill-opacity:1;fill-rule:evenodd;stroke:#536a97;stroke-width:0.83316892;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="shadow"
+     style="display:inline">
+    <g
+       id="g5350"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter19332)"
+       transform="matrix(0.6806179,0,0,0.6939914,4.9435206,8.9912143)">
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5325"
+         sodipodi:cx="17.726692"
+         sodipodi:cy="18.068695"
+         sodipodi:rx="10.225221"
+         sodipodi:ry="9.2875366"
+         d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+         transform="matrix(0.8224526,0,0,0.8919559,-2.2517642,-5.0155567)" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5327"
+         sodipodi:cx="15.512691"
+         sodipodi:cy="13.380711"
+         sodipodi:rx="6.8629441"
+         sodipodi:ry="6.8832488"
+         d="M 22.375635 13.380711 A 6.8629441 6.8832488 0 1 1  8.6497464,13.380711 A 6.8629441 6.8832488 0 1 1  22.375635 13.380711 z"
+         transform="matrix(1.0613905,0,0,1.0324484,-4.2050462,-2.708294)" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.96200001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 16.237869,19.513646 L 18.394744,22.492518 L 20.826967,20.678501 L 18.67009,17.766365 L 16.237869,19.513646 z "
+         id="path5329" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.13095403;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="M 18.279771,23.516488 L 19.384209,25.533297 L 21.547066,28.100147 L 24.124089,30.208632 L 26.839166,28.05431 L 25.550654,25.074931 L 23.560365,22.370572 L 21.96123,20.674617 L 18.279771,23.516488 z "
+         id="path5331" />
+      <path
+         sodipodi:type="arc"
+         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         id="path5333"
+         sodipodi:cx="12.71066"
+         sodipodi:cy="11.025381"
+         sodipodi:rx="7.6345177"
+         sodipodi:ry="7.3299494"
+         d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+         transform="matrix(1.0884482,0,0,1.1198241,-1.5901471,-1.219584)" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="inner"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:url(#linearGradient18289);fill-opacity:1;fill-rule:evenodd;stroke:#45719f;stroke-width:1.31299996;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path17312"
+       sodipodi:cx="14.271354"
+       sodipodi:cy="13.277822"
+       sodipodi:rx="8.1263437"
+       sodipodi:ry="8.0976295"
+       d="M 22.397697 13.277822 A 8.1263437 8.0976295 0 1 1  6.14501,13.277822 A 8.1263437 8.0976295 0 1 1  22.397697 13.277822 z"
+       transform="matrix(0.6806179,0,0,0.6939914,2.7078026,7.3996348)" />
+  </g>
+  <g
+     id="layer1"
+     inkscape:label="handler"
+     inkscape:groupmode="layer"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:#50506c;stroke-width:2.68179536;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path2468"
+       sodipodi:cx="17.726692"
+       sodipodi:cy="18.068695"
+       sodipodi:rx="10.225221"
+       sodipodi:ry="9.2875366"
+       d="M 27.951913 18.068695 A 10.225221 9.2875366 0 1 1  7.5014715,18.068695 A 10.225221 9.2875366 0 1 1  27.951913 18.068695 z"
+       transform="matrix(0.5597759,0,0,0.6190097,2.5733346,5.3536948)" />
+    <path
+       style="fill:#b2aad8;fill-opacity:1;fill-rule:evenodd;stroke:#474a5a;stroke-width:0.66115582;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 15.15771,22.376751 L 16.625718,24.444062 L 18.281132,23.18515 L 16.813124,21.164153 L 15.15771,22.376751 z "
+       id="path3411" />
+    <path
+       style="fill:#e0b478;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient19270);stroke-width:0.77727312;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 16.547466,25.154689 L 17.299165,26.554337 L 18.771245,28.335708 L 20.525213,29.798979 L 22.373143,28.303898 L 21.496159,26.236234 L 20.141532,24.359432 L 19.053132,23.182454 L 16.547466,25.154689 z "
+       id="path3413" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="frame"
+     style="display:inline">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3361);stroke-width:1.07099998;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path3341"
+       sodipodi:cx="12.71066"
+       sodipodi:cy="11.025381"
+       sodipodi:rx="7.6345177"
+       sodipodi:ry="7.3299494"
+       d="M 20.345178 11.025381 A 7.6345177 7.3299494 0 1 1  5.0761423,11.025381 A 7.6345177 7.3299494 0 1 1  20.345178 11.025381 z"
+       transform="matrix(0.7408172,0,0,0.7771483,3.0236436,7.9880671)" />
+  </g>
+</svg>
diff --git a/src/libFTimeUtil/Makefile.am b/src/libFTimeUtil/Makefile.am
new file mode 100644
index 0000000..1d75db9
--- /dev/null
+++ b/src/libFTimeUtil/Makefile.am
@@ -0,0 +1,11 @@
+ 
+noinst_LIBRARIES = lib/libFTimeUtil.a
+
+lib_libFTimeUtil_a_SOURCES = fmettim.cc fdyntime.cc fstatime.cc fsortabl.cc fobject.cc fdyntime.h fmettim.h fobject.h fsortabl.h fstatime.h
+
+
+
+BUILT_SOURCES = lib
+
+lib:
+	ln -s ../../lib lib
diff --git a/src/libFTimeUtil/Makefile.in b/src/libFTimeUtil/Makefile.in
new file mode 100644
index 0000000..c417c81
--- /dev/null
+++ b/src/libFTimeUtil/Makefile.in
@@ -0,0 +1,609 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/libFTimeUtil
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libFTimeUtil_a_AR = $(AR) $(ARFLAGS)
+lib_libFTimeUtil_a_LIBADD =
+am_lib_libFTimeUtil_a_OBJECTS = fmettim.$(OBJEXT) fdyntime.$(OBJEXT) \
+	fstatime.$(OBJEXT) fsortabl.$(OBJEXT) fobject.$(OBJEXT)
+lib_libFTimeUtil_a_OBJECTS = $(am_lib_libFTimeUtil_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libFTimeUtil_a_SOURCES)
+DIST_SOURCES = $(lib_libFTimeUtil_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = lib/libFTimeUtil.a
+lib_libFTimeUtil_a_SOURCES = fmettim.cc fdyntime.cc fstatime.cc fsortabl.cc fobject.cc fdyntime.h fmettim.h fobject.h fsortabl.h fstatime.h
+BUILT_SOURCES = lib
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libFTimeUtil/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libFTimeUtil/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libFTimeUtil.a: $(lib_libFTimeUtil_a_OBJECTS) $(lib_libFTimeUtil_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libFTimeUtil.a
+	$(AM_V_AR)$(lib_libFTimeUtil_a_AR) lib/libFTimeUtil.a $(lib_libFTimeUtil_a_OBJECTS) $(lib_libFTimeUtil_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libFTimeUtil.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fdyntime.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fmettim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fobject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fsortabl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fstatime.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+lib:
+	ln -s ../../lib lib
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libFTimeUtil/fdyntime.cc b/src/libFTimeUtil/fdyntime.cc
new file mode 100644
index 0000000..0c47438
--- /dev/null
+++ b/src/libFTimeUtil/fdyntime.cc
@@ -0,0 +1,171 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 000802 -------------------------
+
+#include "inc_iostream.h"
+#include <time.h>
+
+#include  "fdyntime.h"
+
+
+const
+int firstYear = 1830;         /* oldest comparable year ! */
+
+static
+int
+   monthLength[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+   dayCount [] = {0, 31, 59, 90,120,151,181,212,243,273,304,334,365};
+static
+const char*
+    weekdays [] = {"Monday", "Tuesday", "Wednesday", "Thursday",
+                   "Friday", "Saturday", "Sunday"};
+
+//_________________________________________________________________________
+// Q&D hack to use Metview Date and Time fields in constructor:
+// - datePart should be <= 10 (relative) or in format YYMMDD (absolute)
+// - timePart is interpreted as hours HH when < 24, otherwise in format HHMM
+
+TDynamicTime :: TDynamicTime ( const long datePart, const long timePart )
+{
+  _setCurrent();
+
+  if( datePart <= 10 )
+    ChangeByDays( (short)datePart );
+  else
+  {
+    if( datePart > 101 )
+      SetDate( (short)(datePart / 10000)
+             , (short)((datePart / 100) % 100)
+             , (short)(datePart % 100) );
+  }
+
+  if( timePart < 24 )
+    SetTime( (short)timePart, 0 ,0 );
+  else
+    SetTime( (short)(timePart / 100), (short)(timePart % 100), 0 );
+}
+
+/**-----------------------------------------------------------------------*/
+
+void TDynamicTime :: ChangeByMinutes(const short minutes)
+{
+    DecodeCompareValue (GetCompareValue() + (long)minutes);
+}
+
+void TDynamicTime :: ChangeByHours(const short hours)
+{
+    DecodeCompareValue (GetCompareValue() + 60L * (long)hours);
+}
+
+void TDynamicTime :: ChangeByDays(const short days)
+{
+    DecodeCompareValue (GetCompareValue() + 60L * 24L * (long)days);
+}
+
+
+long TDynamicTime :: DifferenceInMinutes(const TDynamicTime& anotherTime) const
+{
+    return  GetCompareValue() - anotherTime.GetCompareValue();
+}
+
+long TDynamicTime :: DifferenceInHours (const TDynamicTime& anotherTime) const
+{
+    return  DifferenceInMinutes(anotherTime) / 60L;
+}
+
+long TDynamicTime :: DifferenceInDays (const TDynamicTime& anotherTime) const
+{
+    return  DifferenceInMinutes(anotherTime) / 60L / 24L;
+}
+//_______________________________________________________ ClockInSeconds
+// added 941229/vk
+
+long
+TDynamicTime :: ClockInSeconds( void ) const
+{
+   return 3600L*(long)GetHour() + 60L*(long)GetMin() + (long)GetSec();
+}
+//_______________________________________________________ GetWeekday
+
+short TDynamicTime :: GetWeekday(void) const   // mon=1, tue=2,..., sat=6,  sun=7
+{
+ TDynamicTime Sunday((short)1830, (short)1, (short)4);
+
+   return 1 + DifferenceInDays(Sunday) % 7;
+}
+void TDynamicTime :: PrintWeekday(void) const
+{
+   cout << weekdays [ GetWeekday() - 1 ] ;
+}
+
+
+                                           //  p r i v a t e  functions
+long TDynamicTime :: GetCompareValue(void) const
+{
+ long days = 0;
+
+    for (short v = firstYear; v < GetYear(); ++v)
+        days += (long)DaysInYear (v);
+
+    days += (long)dayCount[GetMonth() - 1] + (long)(GetDay() - 1);
+    if (GetMonth() > 2 && DaysInYear(GetYear()) == 366)
+       ++days;
+
+    return  24L*60L*(long)days
+	      + 60L*(long)GetHour()
+		  + (long)GetMin();
+}
+
+void TDynamicTime :: DecodeCompareValue(const long& aCompareValue)
+{
+ short xYear, xMonth;
+ long  aValue = aCompareValue;
+
+    for (short y = firstYear; aValue >= 0; xYear = y++)
+	aValue -= 24L*60L*(long)DaysInYear (y);
+    if (aValue < 0)
+	aValue += 24L*60L*(long)DaysInYear (xYear);
+
+    for (short m = 1; aValue >= 0; xMonth = m++)
+	aValue -= 24L*60L*(long)DaysInMonth (m, xYear);
+    if (aValue < 0)
+	aValue += 24L*60L*(long)DaysInMonth (xMonth, xYear);
+
+    SetYear (xYear);
+    SetMonth (xMonth);
+    SetDay ( (short)(aValue / (60L*24L) + 1));
+
+    aValue %= (60L*24L);
+    SetHour ( (short)(aValue / 60L) );
+
+    aValue %= 60L;
+    SetMin ( (short)aValue );
+}
+
+short TDynamicTime :: DaysInYear (const short aYear) const
+{
+    if ( (aYear % 4) != 0)
+       return 365;
+    else {
+        if (aYear == 1900)
+            return 365;
+        else
+            return 366;
+    }
+}
+
+short TDynamicTime :: DaysInMonth (const short aMonth, const short aYear) const
+{
+    if (aMonth == 2)
+        return monthLength[1] + DaysInYear(aYear) - 365;
+    else
+        return monthLength[aMonth-1];
+}
+
diff --git a/src/libFTimeUtil/fdyntime.h b/src/libFTimeUtil/fdyntime.h
new file mode 100644
index 0000000..33ad150
--- /dev/null
+++ b/src/libFTimeUtil/fdyntime.h
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 941229 ---------------------------- TDynamicTime
+
+#ifndef __TDYNAMICTIME_H__
+#define __TDYNAMICTIME_H__
+
+#include  "fstatime.h"
+
+class TDynamicTime : public TStaticTime
+{
+ public:
+    TDynamicTime () : TStaticTime() { }
+    TDynamicTime (const TStaticTime& aTime) : TStaticTime (aTime) { }
+    TDynamicTime ( const long datePart, const long timePart );
+    TDynamicTime (const short year, const short month, const short day)
+    : TStaticTime (year, month, day) { }
+    TDynamicTime (const short year, const short month, const short day
+	     ,const short hour, const short minute=0, const short sec=0)
+    : TStaticTime (year, month, day, hour, minute, sec) { }
+
+    void  ChangeByMinutes (const short minutes);
+    void  ChangeByHours (const short hours);
+    void  ChangeByDays (const short days);
+
+    long  DifferenceInMinutes (const TDynamicTime& anotherTime) const;
+    long  DifferenceInHours (const TDynamicTime& anotherTime) const;
+    long  DifferenceInDays (const TDynamicTime& anotherTime) const;
+
+    long  ClockInSeconds( void ) const;  // add/vk 941229
+
+    short GetWeekday(void) const;   // mon=1, tue=2,..., sat=6,  sun=7
+    void  PrintWeekday(void) const;
+
+ protected:
+    long  GetCompareValue ( void ) const;
+    void  DecodeCompareValue (const long& aCompareValue);
+    short DaysInYear (const short aYear) const;
+    short DaysInMonth (const short aMonth, const short aYear) const;
+
+ private:
+};
+
+#endif
+//__TDYNAMICTIME_H__
diff --git a/src/libFTimeUtil/fmettim.cc b/src/libFTimeUtil/fmettim.cc
new file mode 100644
index 0000000..9f7d1d3
--- /dev/null
+++ b/src/libFTimeUtil/fmettim.cc
@@ -0,0 +1,210 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 940913 -------------------------- fmettim.cc
+
+#include "inc_iostream.h"
+#include <time.h>
+
+#ifndef __FMETTIM_H__
+#include "fmettim.h"
+#endif//__FMETTIM_H__
+
+//__________________________________________________________________
+
+TMetTime :: TMetTime( void ) : TDynamicTime()
+{
+ TDynamicTime aTimeNow;
+
+   ConstructMetTime( 60 );
+   if( *this > aTimeNow )
+   {
+      PreviousMetTime();
+   }
+}
+//__________________________________________________________________
+
+void TMetTime :: ConstructMetTime( const short timeStepInMinutes )
+{
+   fTimeStepInMinutes = timeStepInMinutes;
+   NearestMetTime();
+}
+//__________________________________________________________________
+
+TMetTime& TMetTime :: operator= ( const TMetTime& aTime )
+{
+   TStaticTime::operator= ( aTime );    // retain present time step
+   NearestMetTime( GetTimeStep() );
+   return *this;
+}
+//__________________________________________________________________
+
+ostream& operator<< ( ostream& oStream, const TMetTime& myTime)
+{
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetDay() << ".";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetMonth() << "." << myTime.GetYear() << " ";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetHour() << ":";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetMin();
+   // no seconds for MetTime!
+
+   return oStream;
+}
+
+//__________________________________________________________________
+
+TMetTime TMetTime :: operator++ ( void )              // prefix++
+{
+   NextMetTime( GetTimeStep() );
+   return *this;
+}
+//__________________________________________________________________
+
+TMetTime TMetTime :: operator++ ( int )              // postfix++
+{
+   NextMetTime( GetTimeStep() );
+   return *this;
+}
+//__________________________________________________________________
+
+TMetTime TMetTime :: operator-- ( void )              // prefix++
+{
+   PreviousMetTime( GetTimeStep() );
+   return *this;
+}
+//__________________________________________________________________
+
+TMetTime TMetTime :: operator-- ( int )              // postfix++
+{
+   PreviousMetTime( GetTimeStep() );
+   return *this;
+}
+//__________________________________________________________________
+
+void TMetTime :: NextMetTime( void )
+{
+   NextMetTime( GetTimeStep() );
+}
+//__________________________________________________________________
+
+void TMetTime :: NextMetTime( const short deltaInMinutes )
+{
+ long extraMinutes = ( 60*GetHour() + GetMin() ) % deltaInMinutes;
+
+   // add observation interval and delete extra minutes (if any)
+   DecodeCompareValue( GetCompareValue() + deltaInMinutes - extraMinutes );
+   SetSec( (short) 0 );
+}
+//__________________________________________________________________
+
+void TMetTime :: PreviousMetTime( void )
+{
+   PreviousMetTime( GetTimeStep() );
+}
+//__________________________________________________________________
+
+void TMetTime :: PreviousMetTime( const short deltaInMinutes )
+{
+ long extraMinutes = ( 60*GetHour() + GetMin() ) % deltaInMinutes;
+
+   if( extraMinutes > 0 )
+      // delete only extra minutes
+      DecodeCompareValue( GetCompareValue() -  extraMinutes );
+   else
+      // subtract given interval
+      DecodeCompareValue( GetCompareValue() - deltaInMinutes );
+
+   SetSec( (short) 0 );
+}
+//__________________________________________________________________
+
+void TMetTime :: NearestMetTime( void )
+{
+   NearestMetTime( GetTimeStep() );
+}
+//__________________________________________________________________
+
+void TMetTime :: NearestMetTime( const short deltaInMinutes )
+{
+ long extraMinutes = ( 60*GetHour() + GetMin() ) % deltaInMinutes;
+
+   if( extraMinutes == 0 )  // already a meteorological time!
+      return;               // add vk 940824
+
+   if( extraMinutes < ( deltaInMinutes - extraMinutes ) )
+       PreviousMetTime( deltaInMinutes );
+   else
+       NextMetTime( deltaInMinutes );
+}
+/*
+//__________________________________________________________________ ???
+
+TMetTime TMetTime :: NextObservation (const short deltaInMinutes) const
+{
+ int minutesSoFar = 60*GetHour() + GetMin();
+ TMetTime aNewTime;
+
+   aNewTime.DecodeCompareValue (GetCompareValue() +
+			(long)(deltaInMinutes - (minutesSoFar % deltaInMinutes))
+			       );
+   aNewTime.SetSec((short) 0);
+   return aNewTime;
+}
+//__________________________________________________________________ ???
+
+TMetTime TMetTime :: PreviousObservation (const short deltaInMinutes) const
+{
+ int minutesSoFar = 60*GetHour() + GetMin();
+ TMetTime aNewTime;
+
+   aNewTime.DecodeCompareValue (GetCompareValue() -
+			 (long)(minutesSoFar % deltaInMinutes)
+			       );
+   aNewTime.SetSec((short) 0);
+   return aNewTime;
+}
+//__________________________________________________________________ ???
+
+TMetTime TMetTime :: NearestObservation (const short deltaInMinutes) const
+{
+ int minutesSoFar = 60*GetHour() + GetMin();
+
+   if ( (deltaInMinutes - (minutesSoFar % deltaInMinutes)) <
+	(minutesSoFar % deltaInMinutes))
+       return NextObservation (deltaInMinutes);
+   else
+       return PreviousObservation (deltaInMinutes);
+}
+*/
+//__________________________________________________________________
+
+void TMetTime :: SetTimeStep( const short timeStepInMinutes )
+{
+   fTimeStepInMinutes = timeStepInMinutes;
+}
+//__________________________________________________________________
+
+short TMetTime :: GetTimeStep( void ) const
+{
+   return fTimeStepInMinutes;
+}
+//__________________________________________________________________
+
+short TMetTime :: GetLocalHour () const
+{
+   return (GetHour() + 2) % 24;   //testiarvona vakioero
+}
+
diff --git a/src/libFTimeUtil/fmettim.h b/src/libFTimeUtil/fmettim.h
new file mode 100644
index 0000000..cd94c50
--- /dev/null
+++ b/src/libFTimeUtil/fmettim.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 941021 ------------------------- TMetTime
+
+#ifndef __FMETTIM_H__
+#define __FMETTIM_H__
+
+#include  "fdyntime.h"
+
+// TMetTime: Discrete time object for meteorological observations and
+//           forecasts.  Watch out for the "="-operator and constructors
+//           with 'out of phase' times as the TMetTime object will always
+//           try to fit itself into 'the correct phase'!
+
+class TMetTime : public TDynamicTime
+{
+ friend ostream& operator<< ( ostream& oStream, const TMetTime& myTime);
+
+ public:
+    TMetTime( void );                               // latest present MetTime
+             // : TDynamicTime();  // { ConstructMetTime( 60 ); }
+    TMetTime( const int timeStepInMinutes )
+     : TDynamicTime() { ConstructMetTime( timeStepInMinutes ); }
+    TMetTime ( const long datePart, const long timePart )
+    : TDynamicTime ( datePart,  timePart ) { SetTimeStep( 60 ); }
+    TMetTime( const TMetTime& aMetTime )
+     : TDynamicTime( aMetTime ) { SetTimeStep( aMetTime.GetTimeStep() ); }
+
+    TMetTime( const TStaticTime& aTime )
+     : TDynamicTime( aTime ) { ConstructMetTime( 60 ); }
+    TMetTime( const short year, const short month, const short day )
+     : TDynamicTime( year, month, day ) { ConstructMetTime( 60 ); }
+    TMetTime( const short year, const short month, const short day
+	    , const short hour, const short minute=0, const short sec=0 )
+     : TDynamicTime( year, month, day
+	       , hour, minute, sec ) { ConstructMetTime( 60 ); }
+
+    TMetTime& operator= ( const TMetTime& );
+    TMetTime  operator++ ( void );          // prefix
+    TMetTime  operator++ ( int );           // postfix
+    TMetTime  operator-- ( void );          // prefix
+    TMetTime  operator-- ( int );           // postfix
+
+    void NextMetTime( void );
+    void NextMetTime( const short deltaInMinutes );
+    void PreviousMetTime( void );
+    void PreviousMetTime( const short deltaInMinutes );
+    void NearestMetTime( void );
+    void NearestMetTime( const short deltaInMinutes );
+    // I think these should change the internal value of the object, but return the
+    // new value, leaving the object unchanged values! For the sake of clarity, should be
+    // GetNextObservation (), Get ...
+//    TMetTime NextObservation( const short deltaInMinutes ) const;
+//    TMetTime PreviousObservation( const short deltaInMinutes ) const;
+//    TMetTime NearestObservation( const short deltaInMinutes ) const;
+
+    void  SetTimeStep( const short timeStepInMinutes );
+    short GetTimeStep( void ) const;
+
+    short GetLocalHour () const;
+
+ private:
+    void  ConstructMetTime( const short timeStepInMinutes );
+
+ private:
+    short fTimeStepInMinutes;
+};
+
+#endif //__FMETTIM_H__
diff --git a/src/libFTimeUtil/fobject.cc b/src/libFTimeUtil/fobject.cc
new file mode 100644
index 0000000..2f81576
--- /dev/null
+++ b/src/libFTimeUtil/fobject.cc
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// fobject.cpp
+// rev vk 940824
+
+#include <stddef.h>
+#include "inc_iostream.h"
+
+#include  "fobject.h"
+
+//_________________________________________________________ TFObject
+
+TFObject::TFObject(void)
+{
+}
+//_________________________________________________________ ~TFObject
+
+TFObject::~TFObject(void)
+{
+}
+//_________________________________________________________ operator==
+
+bool TFObject::operator == (const TFObject & aObjTest) const
+{
+  return (IsEqual ( aObjTest ));
+}
+//_________________________________________________________ operator!=
+
+bool TFObject::operator != (const TFObject & aObjTest) const
+{
+  return (bool) ( !(IsEqual ( aObjTest )));
+}
diff --git a/src/libFTimeUtil/fobject.h b/src/libFTimeUtil/fobject.h
new file mode 100644
index 0000000..bbefb97
--- /dev/null
+++ b/src/libFTimeUtil/fobject.h
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// fobject.h
+// rev vk 940630
+
+#ifndef __TOBJECT_H__
+#define __TOBJECT_H__
+
+
+class TFObject
+{
+ public:
+    TFObject(void);
+    virtual ~TFObject(void);
+
+    virtual bool    IsEqual(const TFObject &) const = 0;
+
+    bool operator == (const TFObject &aObjTest) const;
+    bool operator != (const TFObject &aObjTest) const;
+};
+
+#endif //__TOBJECT_H__
diff --git a/src/libFTimeUtil/fsortabl.cc b/src/libFTimeUtil/fsortabl.cc
new file mode 100644
index 0000000..f13e641
--- /dev/null
+++ b/src/libFTimeUtil/fsortabl.cc
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// fsortabl.cc
+// rev vk 940824
+
+#include  "fsortabl.h"
+
+bool TSortable::operator <  (const TSortable & aDateObject) const
+{
+  return (IsLessThan(aDateObject) );
+}
+
+
+bool TSortable::operator >  (const TSortable & aDateObject) const
+{
+  return (bool) (!( *this < aDateObject ) &&  (*this != aDateObject));
+}
+
+
+bool TSortable::operator >=  (const TSortable & aDateObject) const
+{
+  return (bool) (!(*this < aDateObject));
+}
+
+bool TSortable::operator <=  (const TSortable & aDateObject) const
+{
+  return (bool) ( *this < aDateObject || *this == aDateObject );
+}
+
+
+
+
+
diff --git a/src/libFTimeUtil/fsortabl.h b/src/libFTimeUtil/fsortabl.h
new file mode 100644
index 0000000..6256c0e
--- /dev/null
+++ b/src/libFTimeUtil/fsortabl.h
@@ -0,0 +1,34 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// fsortabl.h
+// rev vk 940824
+
+#ifndef __TSORTABLE_H__
+#define __TSORTABLE_H__
+
+#include  "fobject.h"
+
+
+class TSortable : public TFObject {
+public:
+
+  virtual bool IsEqual(const TFObject & aDateObject) const = 0;
+  virtual bool IsLessThan(const TFObject & aDateObject) const = 0;
+
+  // methods as 'const', vk 940824
+  bool operator <  (const TSortable&) const;
+  bool operator >  (const TSortable&) const;
+  bool operator >= (const TSortable&) const;
+  bool operator <= (const TSortable&) const;
+
+};
+
+#endif
+//__TSORTABLE_H__
diff --git a/src/libFTimeUtil/fstatime.cc b/src/libFTimeUtil/fstatime.cc
new file mode 100644
index 0000000..a59a1d2
--- /dev/null
+++ b/src/libFTimeUtil/fstatime.cc
@@ -0,0 +1,354 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 981001 --------------------- fstatime.cc
+
+#include <time.h>
+#include "inc_iostream.h"
+
+#include  "fstatime.h"
+
+
+static char charValueString[ 100 ];
+
+
+/**-----------------------------------------------------------------------*/
+
+TStaticTime :: TStaticTime (void)
+{
+   _setCurrent();
+}
+//__________________________________________________________________
+
+TStaticTime :: TStaticTime(const TStaticTime &from)
+{
+   fYear = from.fYear;
+   fMonth = from.fMonth;
+   fDay = from.fDay;
+   fHour = from.fHour;
+   fMin = from.fMin;
+   fSec = from.fSec;
+}
+//__________________________________________________________________
+
+TStaticTime :: TStaticTime (const short aY, const short aM, const short aD)
+{
+   SetDate (aY, aM, aD);
+   SetTime (0, 0, 0);
+}
+//__________________________________________________________________
+
+TStaticTime :: TStaticTime (const short aY, const short aM, const short aD
+		           ,const short aH, const short aMin, const short aSec)
+{
+   SetDate (aY, aM, aD);
+   SetTime (aH, aMin, aSec);
+}
+//__________________________________________________________________
+ void
+TStaticTime :: _setCurrent( void )
+{
+time_t     tTime;
+ struct tm *xTime;
+
+   (void) time (&tTime);
+   xTime = localtime (&tTime);
+
+   SetYear (xTime->tm_year + 1900);
+   SetMonth(xTime->tm_mon + 1);
+   SetDay  (xTime->tm_mday);
+   SetHour (xTime->tm_hour);
+   SetMin  (xTime->tm_min);
+   SetSec  (xTime->tm_sec);
+}
+//__________________________________________________________________
+
+TStaticTime& TStaticTime::operator= (const TStaticTime &from)       //   =
+{
+   fYear = from.fYear;
+   fMonth = from.fMonth;
+   fDay = from.fDay;
+   fHour = from.fHour;
+   fMin = from.fMin;
+   fSec = from.fSec;
+   return *this;
+}
+//__________________________________________________________________
+//            "yyyy-mm-dd"
+const char*
+TStaticTime::CharDate() const
+{
+   ostrstream ss( charValueString, sizeof( charValueString ) );
+   ss << setfill( '0' )
+      << setw( 4 ) << GetYear() << "-"
+      << setw( 2 ) << GetMonth() << "-"
+      << setw( 2 ) << GetDay() << ends;
+
+   return charValueString;
+}
+//__________________________________________________________________
+//            "hh:mm"
+const char*
+TStaticTime::CharHhMm() const
+{
+   ostrstream ss( charValueString, sizeof( charValueString ) );
+   ss << setfill( '0' )
+      << setw( 2 ) << GetHour() << ":"
+      << setw( 2 ) << GetMin()  << ends;
+
+   return charValueString;
+}
+//__________________________________________________________________
+//            "yyyy-mm-dd hh:mm:ss"
+const char*
+TStaticTime::CharValue( void ) const
+{
+   ostrstream ss( charValueString, sizeof( charValueString ) );
+   ss << CharDate() << " "
+      << setfill( '0' )
+      << setw( 2 ) << GetHour() << ":"
+      << setw( 2 ) << GetMin() << ":"
+      << setw( 2 ) << GetSec() << ends;
+
+   return charValueString;
+}
+//__________________________________________________________________
+//            "yymmdd hhmm"
+const char*
+TStaticTime::ShorterCharValue( void ) const
+{
+   ostrstream ss( charValueString, sizeof( charValueString ) );
+   ss << setfill( '0' )
+      << setw( 2 ) << ( GetYear() % 100 )
+      << setw( 2 ) << GetMonth()
+      << setw( 2 ) << GetDay() << " "
+      << setw( 2 ) << GetHour()
+      << setw( 2 ) << GetMin() << ends;
+
+   return charValueString;
+}
+//__________________________________________________________________
+
+bool TStaticTime :: IsEqual (const TFObject& anotherTime) const
+{
+   if (GetYear()  != ((const TStaticTime *)&anotherTime)->GetYear())
+      return false;
+
+   if (GetMonth() != ((const TStaticTime *)&anotherTime)->GetMonth())
+      return false;
+
+   if (GetDay()   != ((const TStaticTime *)&anotherTime)->GetDay())
+      return false;
+
+   if (GetHour()  != ((const TStaticTime *)&anotherTime)->GetHour())
+      return false;
+
+   if (GetMin()   != ((const TStaticTime *)&anotherTime)->GetMin())
+      return false;
+
+   if (GetSec()   != ((const TStaticTime *)&anotherTime)->GetSec())
+      return false;
+
+   return true;
+}
+//__________________________________________________________________
+
+bool TStaticTime :: IsLessThan (const TFObject& anotherTime) const
+{
+   if (GetYear()  > ((const TStaticTime *)&anotherTime)->GetYear())
+      return false;
+   else
+   {
+      if (GetYear()  < ((const TStaticTime *)&anotherTime)->GetYear())
+	 return true;
+   }
+
+   if (GetMonth() > ((const TStaticTime *)&anotherTime)->GetMonth())
+      return false;
+   else
+   {
+      if (GetMonth() < ((const TStaticTime *)&anotherTime)->GetMonth())
+	 return true;
+   }
+
+   if (GetDay() > ((const TStaticTime *)&anotherTime)->GetDay())
+      return false;
+   else
+   {
+      if (GetDay() < ((const TStaticTime *)&anotherTime)->GetDay())
+	 return true;
+   }
+
+   if (GetHour() > ((const TStaticTime *)&anotherTime)->GetHour())
+      return false;
+   else
+   {
+      if (GetHour() < ((const TStaticTime *)&anotherTime)->GetHour())
+	 return true;
+   }
+
+   if (GetMin() > ((const TStaticTime *)&anotherTime)->GetMin())
+      return false;
+   else
+   {
+      if (GetMin() < ((const TStaticTime *)&anotherTime)->GetMin())
+	 return true;
+   }
+
+   if (GetSec() < ((const TStaticTime *)&anotherTime)->GetSec())
+      return true;
+
+   return false;
+}
+
+//__________________________________________________________________
+
+void TStaticTime :: SetYear (const short aYear)
+{
+   fYear = aYear;
+
+   if (fYear < 25)
+      fYear += 2000;       //-- assume 2000+
+
+   if (fYear < 200)
+      fYear += 1900;       //-- assume 1900+
+}
+void TStaticTime :: SetMonth (const short aMonth)
+{
+   if (aMonth >= 1 && aMonth <= 12)
+      fMonth = aMonth;
+   else {
+      fMonth = 0;
+      cerr << "'TStaticTime::SetMonth': erroneous month value: "
+	   << aMonth << "\n";
+   }
+}
+void TStaticTime :: SetDay (const short aDay)
+{
+   if (aDay >= 1 && aDay <= 31)
+      fDay = aDay;
+   else {
+      fDay = 0;
+      cerr << "'TStaticTime::SetDay': erroneous day value: "
+	   << aDay << "\n";
+   }
+}
+//__________________________________________________________________
+
+void TStaticTime :: SetHour (const short aHour)
+{
+   if (aHour >= 0 && aHour <=23)
+      fHour = aHour;
+   else {
+      fHour = 0;
+      cerr << "'TStaticTime::SetHour': erroneous hour value: "
+	   << aHour << "\n";
+   }
+}
+
+void TStaticTime :: SetMin (const short aMin)
+{
+   if (aMin >= 0 && aMin <= 59)
+      fMin = aMin;
+   else {
+      fMin = 0;
+      cerr << "'TStaticTime::SetMin': erroneous minutes value: "
+	   << aMin << "\n";
+   }
+}
+
+void TStaticTime :: SetSec (const short aSec)
+{
+   if (aSec >= 0 && aSec <=59)
+      fSec = aSec;
+   else {
+      fSec = 0;
+      cerr << "'TStaticTime::SetSec': erroneous seconds value: "
+	   << aSec << "\n";
+   }
+}
+//__________________________________________________________________
+
+void TStaticTime ::  SetDate(const short year, const short month, const short day)
+{
+   SetYear(year);
+   SetMonth(month);
+   SetDay(day);
+}
+void TStaticTime ::  GetDate(short &year, short &month, short &day) const
+{
+   year = GetYear();
+   month = GetMonth();
+   day = GetDay();
+}
+void TStaticTime ::  SetTime(const short hour, const short minute, const short sec)
+{
+   SetHour(hour);
+   SetMin(minute);
+   SetSec(sec);
+}
+void TStaticTime ::  GetTime(short &hour, short &minute, short &sec) const
+{
+   hour = GetHour();
+   minute = GetMin();
+   sec =GetSec();
+}
+//__________________________________________________________________
+
+void TStaticTime :: ReadDateTime(void)                   // test function!!!!
+{
+ short y,m,d,h;
+   cout << " Input date 'yy mm dd hh': ";
+   cin >> y >> m >> d >> h;
+   SetDate(y,m,d);
+   SetTime(h,0,0);
+}
+//__________________________________________________________________
+
+void TStaticTime :: XPrint(void) const			  // test function!!!!
+{
+    Print();
+}
+void TStaticTime :: XPrint(const char *str) const	          // test function!!!!
+{
+    cout << str << ": ";
+    XPrint();
+}
+//__________________________________________________________________
+
+void TStaticTime :: Print(void) const			  // test function!!!!
+{
+    cout << fDay << "." << fMonth << "." << fYear << " "
+	 << fHour << ":" << fMin   << ":" << fSec ; //<< "\n";
+}
+//__________________________________________________________________
+
+ostream& operator<< ( ostream& oStream, const TStaticTime& myTime)
+{
+   oStream << myTime.CharValue();  //-- ISO date format
+#if 0
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetDay() << ".";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetMonth() << "." << myTime.GetYear() << " ";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetHour() << ":";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetMin() << ":";
+   oStream.width( 2 );
+   oStream.fill( '0' );
+   oStream << myTime.GetSec();
+#endif
+   return oStream;
+}
+
diff --git a/src/libFTimeUtil/fstatime.h b/src/libFTimeUtil/fstatime.h
new file mode 100644
index 0000000..01560ae
--- /dev/null
+++ b/src/libFTimeUtil/fstatime.h
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 970214 -------------------------- TStaticTime
+
+#ifndef __TSTATICTIME_H__
+#define __TSTATICTIME_H__
+
+#include  "inc_iostream.h"
+#include  "fsortabl.h"
+#ifdef METVIEW
+#include  "MvDate.h"
+#endif
+
+
+class TStaticTime : public TSortable
+{
+ friend ostream& operator<< ( ostream& oStream, const TStaticTime& myTime);
+
+ public:
+    TStaticTime ();
+    TStaticTime (const TStaticTime&);
+    TStaticTime (const short year, const short month, const short day);
+    TStaticTime (const short year, const short month, const short day
+		,const short hour, const short minute=0, const short sec=0);
+
+    virtual bool IsEqual (const TFObject& anotherTime) const;
+    virtual bool IsLessThan (const TFObject& anotherTime) const;
+
+    TStaticTime& operator= (const TStaticTime&);
+#ifdef METVIEW
+    operator MvDate( void ) const { return MvDate( CharValue() ); }
+#endif
+    void  SetDate (const short year, const short month, const short day);
+    void  GetDate (short &year, short &month, short &day) const;
+    void  SetTime( const short hour, const short min=0, const short sec=0 );
+    void  GetTime (short &hour, short &min, short &sec) const;
+
+   short  GetYear( void ) const  { return fYear; }
+   short  GetMonth( void ) const { return fMonth; }
+   short  GetDay( void ) const   { return fDay; }
+   short  GetHour( void ) const  { return fHour; }
+   short  GetMin( void ) const   { return fMin; }
+   short  GetSec( void ) const   { return fSec; }
+   // short GetLocalHour () const;
+   const char* CharDate() const;
+   const char* CharHhMm() const;
+   const char* CharValue( void ) const;
+   const char* ShorterCharValue( void ) const;
+
+    void  ReadDateTime ();                     // for testing
+    void  XPrint (void) const;                 // for testing
+    void  XPrint (const char *str) const;      // for testing
+    virtual void Print (void) const;
+
+ protected:
+    void  SetYear (const short year);
+    void  SetMonth (const short month);
+    void  SetDay (const short day);
+    void  SetHour (const short hour);
+    void  SetMin (const short minute);
+    void  SetSec (const short sec);
+    void  _setCurrent( void );
+
+ private:
+    short   fYear;
+    short   fMonth;
+    short   fDay;
+    short   fHour;
+    short   fMin;
+    short   fSec;
+};
+
+#endif //__TSTATICTIME_H__
diff --git a/src/libMars/Makefile.am b/src/libMars/Makefile.am
new file mode 100644
index 0000000..b734f2c
--- /dev/null
+++ b/src/libMars/Makefile.am
@@ -0,0 +1,116 @@
+target=lib/libMars.a
+target2=lib/libmacro_api_f90.a
+#target3=lib/libMacroApiF77.a
+lib_LIBRARIES = $(target) $(target2)
+
+AR=ar
+RPCGEN  = rpcgen
+CP = cp -p
+SOURCES_lex = langy.y
+
+include_dir = ../../include
+
+BUILT_SOURCES = lib $(include_dir) macro_header rpcmars.h
+
+lib_libMars_a_SOURCES = $(SOURCES_lex) tcp.c server.c request.c expand.c \
+	hash.c memory.c logfile.c options.c \
+	api.c apibase.c base.c netbase.c nullbase.c gribbase.c nfdbbase.c dhsbase.c odbbase.c \
+	multibase.c archive.c retrieve.c ibmblk.c \
+	lock.c files.c sh2ll.c guess.c hypercube.c \
+	check.c environ.c \
+	handler.c target.c grib.c calc.c field.c \
+	list.c tools.c hidden.c index.c bufr.c \
+	externf.c service.c xservice.c \
+	udp.c queue.c variable.c \
+	filebase.c account.c cos.c llmatrix.c pproc.c restricted.c \
+	wind.c control.c stream.c \
+	remove.c authenticate.c flatfilebase.c time.c timer.c json.c \
+	version.c statistics.c metadata.c webbase.c ecaccess.c free.c \
+	schedule.c \
+	macro_api.c \
+	api.h base.h bufr.h control.h cos.h ecaccess.h field.h globals.h grib.h hypercube.h \
+	ibmblk.h index.h json.h lang.h macro_api.h macro_api_internals.h mars.h mcs.h \
+	netbase.h proto.h queue.h restricted.h tools.h variable.h 
+
+if METVIEW_MARS_ODB
+lib_libMars_a_SOURCES += odb.cc odb.h
+lib_libMars_a_CPPFLAGS = $(ODB_CPPFLAGS)
+endif
+
+
+nodist_lib_libMars_a_SOURCES = rpcmars.h rpcmars.c
+
+lib_libmacro_api_f90_a_SOURCES = macro_api_f90.f90
+
+include_HEADERS = macro_api.h
+
+# for the fortran macro_api library
+# note that we need to put FCFLAGS first in case the user's flags
+# need to overide the autotools flags
+# lib_libmacro_api_f90_a_FCFLAGS = ${FCFLAGS} @METVIEW_FC_FLAGS@
+
+#noinst_lib_libMars_a_HEADERS  = base.h bufr.h control.h \
+#	field.h globals.h grib.h \
+#	ibmblk.h lang.h mars.h mcs.h \
+#	netbase.h proto.h rpcmars.h tools.h \
+#	cos.h
+
+#all: lib
+#	$(UPDATE_TITLE)
+
+lib:
+	ln -s ../../lib lib
+
+
+$(include_dir):
+	mkdir $(include_dir)
+
+macro_header: $(include_dir)/macro_api.h
+
+$(include_dir)/macro_api.h: macro_api.h
+	${INSTALL} macro_api.h $(include_dir)
+
+
+langy.c : langl.c
+langl.c : langl.l
+	$(LEX) $(LFLAGS) langl.l
+	sed -e s/yy/yy_mars/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+langy.c : langy.y
+	$(YACC) $(YFLAGS) langy.y
+	sed -e s/yy/yy_mars/g < y.tab.c > $@
+	$(RM) y.tab.c
+
+rpcmars.h : rpcmars.x
+	$(RPCGEN) -h -o rpcmars.h rpcmars.x
+	- chmod a+rw rpcmars.h
+
+rpcmars.c : rpcmars.x
+	$(RPCGEN) -c -o rpcmars.c rpcmars.x
+	- chmod a+rw rpcmars.c
+
+
+# a note about cleaning: in order that the end user does not need to
+# install lex and yacc, we distribute the generated source files. We also
+# don't want these to be cleaned during a normal clean, because the end user
+# would then need to have lex and yacc installed... so we don't clean
+# these by default, but instead have a separate target, 'cleanall' which
+# remove the lex/yacc generated source.
+
+clean-all: clean
+	-rm -f langy.c langl.c
+
+
+
+# ensure we clean up all the lexical files
+CLEANFILES = rpcmars.h rpcmars.c lex.yy.c y.tab.c y.output y.tab.h
+
+EXTRA_DIST = rpcmars.x langl.l langy.y langl.c
+
+
+# do not distribute certain files in the tarball...
+#dist-hook:
+#	rm -f $(distdir)/langy.c $(distdir)/langl.c
+
+
+
diff --git a/src/libMars/Makefile.in b/src/libMars/Makefile.in
new file mode 100644
index 0000000..80c40a7
--- /dev/null
+++ b/src/libMars/Makefile.in
@@ -0,0 +1,2092 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ at METVIEW_MARS_ODB_TRUE@am__append_1 = odb.cc odb.h
+subdir = src/libMars
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in langy.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+LIBRARIES = $(lib_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libMars_a_AR = $(AR) $(ARFLAGS)
+lib_libMars_a_LIBADD =
+am__lib_libMars_a_SOURCES_DIST = langy.y tcp.c server.c request.c \
+	expand.c hash.c memory.c logfile.c options.c api.c apibase.c \
+	base.c netbase.c nullbase.c gribbase.c nfdbbase.c dhsbase.c \
+	odbbase.c multibase.c archive.c retrieve.c ibmblk.c lock.c \
+	files.c sh2ll.c guess.c hypercube.c check.c environ.c \
+	handler.c target.c grib.c calc.c field.c list.c tools.c \
+	hidden.c index.c bufr.c externf.c service.c xservice.c udp.c \
+	queue.c variable.c filebase.c account.c cos.c llmatrix.c \
+	pproc.c restricted.c wind.c control.c stream.c remove.c \
+	authenticate.c flatfilebase.c time.c timer.c json.c version.c \
+	statistics.c metadata.c webbase.c ecaccess.c free.c schedule.c \
+	macro_api.c api.h base.h bufr.h control.h cos.h ecaccess.h \
+	field.h globals.h grib.h hypercube.h ibmblk.h index.h json.h \
+	lang.h macro_api.h macro_api_internals.h mars.h mcs.h \
+	netbase.h proto.h queue.h restricted.h tools.h variable.h \
+	odb.cc odb.h
+am__objects_1 = lib_libMars_a-langy.$(OBJEXT)
+ at METVIEW_MARS_ODB_TRUE@am__objects_2 = lib_libMars_a-odb.$(OBJEXT)
+am_lib_libMars_a_OBJECTS = $(am__objects_1) \
+	lib_libMars_a-tcp.$(OBJEXT) lib_libMars_a-server.$(OBJEXT) \
+	lib_libMars_a-request.$(OBJEXT) lib_libMars_a-expand.$(OBJEXT) \
+	lib_libMars_a-hash.$(OBJEXT) lib_libMars_a-memory.$(OBJEXT) \
+	lib_libMars_a-logfile.$(OBJEXT) \
+	lib_libMars_a-options.$(OBJEXT) lib_libMars_a-api.$(OBJEXT) \
+	lib_libMars_a-apibase.$(OBJEXT) lib_libMars_a-base.$(OBJEXT) \
+	lib_libMars_a-netbase.$(OBJEXT) \
+	lib_libMars_a-nullbase.$(OBJEXT) \
+	lib_libMars_a-gribbase.$(OBJEXT) \
+	lib_libMars_a-nfdbbase.$(OBJEXT) \
+	lib_libMars_a-dhsbase.$(OBJEXT) \
+	lib_libMars_a-odbbase.$(OBJEXT) \
+	lib_libMars_a-multibase.$(OBJEXT) \
+	lib_libMars_a-archive.$(OBJEXT) \
+	lib_libMars_a-retrieve.$(OBJEXT) \
+	lib_libMars_a-ibmblk.$(OBJEXT) lib_libMars_a-lock.$(OBJEXT) \
+	lib_libMars_a-files.$(OBJEXT) lib_libMars_a-sh2ll.$(OBJEXT) \
+	lib_libMars_a-guess.$(OBJEXT) \
+	lib_libMars_a-hypercube.$(OBJEXT) \
+	lib_libMars_a-check.$(OBJEXT) lib_libMars_a-environ.$(OBJEXT) \
+	lib_libMars_a-handler.$(OBJEXT) lib_libMars_a-target.$(OBJEXT) \
+	lib_libMars_a-grib.$(OBJEXT) lib_libMars_a-calc.$(OBJEXT) \
+	lib_libMars_a-field.$(OBJEXT) lib_libMars_a-list.$(OBJEXT) \
+	lib_libMars_a-tools.$(OBJEXT) lib_libMars_a-hidden.$(OBJEXT) \
+	lib_libMars_a-index.$(OBJEXT) lib_libMars_a-bufr.$(OBJEXT) \
+	lib_libMars_a-externf.$(OBJEXT) \
+	lib_libMars_a-service.$(OBJEXT) \
+	lib_libMars_a-xservice.$(OBJEXT) lib_libMars_a-udp.$(OBJEXT) \
+	lib_libMars_a-queue.$(OBJEXT) lib_libMars_a-variable.$(OBJEXT) \
+	lib_libMars_a-filebase.$(OBJEXT) \
+	lib_libMars_a-account.$(OBJEXT) lib_libMars_a-cos.$(OBJEXT) \
+	lib_libMars_a-llmatrix.$(OBJEXT) lib_libMars_a-pproc.$(OBJEXT) \
+	lib_libMars_a-restricted.$(OBJEXT) \
+	lib_libMars_a-wind.$(OBJEXT) lib_libMars_a-control.$(OBJEXT) \
+	lib_libMars_a-stream.$(OBJEXT) lib_libMars_a-remove.$(OBJEXT) \
+	lib_libMars_a-authenticate.$(OBJEXT) \
+	lib_libMars_a-flatfilebase.$(OBJEXT) \
+	lib_libMars_a-time.$(OBJEXT) lib_libMars_a-timer.$(OBJEXT) \
+	lib_libMars_a-json.$(OBJEXT) lib_libMars_a-version.$(OBJEXT) \
+	lib_libMars_a-statistics.$(OBJEXT) \
+	lib_libMars_a-metadata.$(OBJEXT) \
+	lib_libMars_a-webbase.$(OBJEXT) \
+	lib_libMars_a-ecaccess.$(OBJEXT) lib_libMars_a-free.$(OBJEXT) \
+	lib_libMars_a-schedule.$(OBJEXT) \
+	lib_libMars_a-macro_api.$(OBJEXT) $(am__objects_2)
+nodist_lib_libMars_a_OBJECTS = lib_libMars_a-rpcmars.$(OBJEXT)
+lib_libMars_a_OBJECTS = $(am_lib_libMars_a_OBJECTS) \
+	$(nodist_lib_libMars_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+lib_libmacro_api_f90_a_AR = $(AR) $(ARFLAGS)
+lib_libmacro_api_f90_a_LIBADD =
+am_lib_libmacro_api_f90_a_OBJECTS = macro_api_f90.$(OBJEXT)
+lib_libmacro_api_f90_a_OBJECTS = $(am_lib_libmacro_api_f90_a_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS)
+LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
+AM_V_FC = $(am__v_FC_$(V))
+am__v_FC_ = $(am__v_FC_$(AM_DEFAULT_VERBOSITY))
+am__v_FC_0 = @echo "  FC    " $@;
+FCLD = $(FC)
+FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_FCLD = $(am__v_FCLD_$(V))
+am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_FCLD_0 = @echo "  FCLD  " $@;
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+AM_V_YACC = $(am__v_YACC_$(V))
+am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY))
+am__v_YACC_0 = @echo "  YACC  " $@;
+YLWRAP = $(top_srcdir)/config/ylwrap
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libMars_a_SOURCES) $(nodist_lib_libMars_a_SOURCES) \
+	$(lib_libmacro_api_f90_a_SOURCES)
+DIST_SOURCES = $(am__lib_libMars_a_SOURCES_DIST) \
+	$(lib_libmacro_api_f90_a_SOURCES)
+HEADERS = $(include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = ar
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = lib/libMars.a
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+target2 = lib/libmacro_api_f90.a
+#target3=lib/libMacroApiF77.a
+lib_LIBRARIES = $(target) $(target2)
+RPCGEN = rpcgen
+CP = cp -p
+SOURCES_lex = langy.y
+include_dir = ../../include
+BUILT_SOURCES = lib $(include_dir) macro_header rpcmars.h
+lib_libMars_a_SOURCES = $(SOURCES_lex) tcp.c server.c request.c \
+	expand.c hash.c memory.c logfile.c options.c api.c apibase.c \
+	base.c netbase.c nullbase.c gribbase.c nfdbbase.c dhsbase.c \
+	odbbase.c multibase.c archive.c retrieve.c ibmblk.c lock.c \
+	files.c sh2ll.c guess.c hypercube.c check.c environ.c \
+	handler.c target.c grib.c calc.c field.c list.c tools.c \
+	hidden.c index.c bufr.c externf.c service.c xservice.c udp.c \
+	queue.c variable.c filebase.c account.c cos.c llmatrix.c \
+	pproc.c restricted.c wind.c control.c stream.c remove.c \
+	authenticate.c flatfilebase.c time.c timer.c json.c version.c \
+	statistics.c metadata.c webbase.c ecaccess.c free.c schedule.c \
+	macro_api.c api.h base.h bufr.h control.h cos.h ecaccess.h \
+	field.h globals.h grib.h hypercube.h ibmblk.h index.h json.h \
+	lang.h macro_api.h macro_api_internals.h mars.h mcs.h \
+	netbase.h proto.h queue.h restricted.h tools.h variable.h \
+	$(am__append_1)
+ at METVIEW_MARS_ODB_TRUE@lib_libMars_a_CPPFLAGS = $(ODB_CPPFLAGS)
+nodist_lib_libMars_a_SOURCES = rpcmars.h rpcmars.c
+lib_libmacro_api_f90_a_SOURCES = macro_api_f90.f90
+include_HEADERS = macro_api.h
+
+# ensure we clean up all the lexical files
+CLEANFILES = rpcmars.h rpcmars.c lex.yy.c y.tab.c y.output y.tab.h
+EXTRA_DIST = rpcmars.x langl.l langy.y langl.c
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .f90 .lo .o .obj .y
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libMars/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libMars/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  if test -f $$p; then \
+	    $(am__strip_dir) \
+	    echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+	    ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \
+	cd "$(DESTDIR)$(libdir)" && rm -f $$files
+
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libMars.a: $(lib_libMars_a_OBJECTS) $(lib_libMars_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libMars.a
+	$(AM_V_AR)$(lib_libMars_a_AR) lib/libMars.a $(lib_libMars_a_OBJECTS) $(lib_libMars_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libMars.a
+lib/libmacro_api_f90.a: $(lib_libmacro_api_f90_a_OBJECTS) $(lib_libmacro_api_f90_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libmacro_api_f90.a
+	$(AM_V_AR)$(lib_libmacro_api_f90_a_AR) lib/libmacro_api_f90.a $(lib_libmacro_api_f90_a_OBJECTS) $(lib_libmacro_api_f90_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libmacro_api_f90.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-account.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-api.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-apibase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-archive.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-authenticate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-base.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-bufr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-calc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-check.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-control.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-cos.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-dhsbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-ecaccess.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-environ.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-expand.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-externf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-field.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-filebase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-files.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-flatfilebase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-free.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-grib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-gribbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-guess.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-handler.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-hash.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-hidden.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-hypercube.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-ibmblk.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-index.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-json.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-langy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-llmatrix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-lock.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-logfile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-macro_api.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-memory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-metadata.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-multibase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-netbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-nfdbbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-nullbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-odb.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-odbbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-options.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-pproc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-queue.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-remove.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-request.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-restricted.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-retrieve.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-rpcmars.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-schedule.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-server.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-service.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-sh2ll.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-statistics.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-stream.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-target.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-tcp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-time.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-timer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-tools.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-udp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-variable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-version.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-webbase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-wind.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMars_a-xservice.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+lib_libMars_a-langy.o: langy.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-langy.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-langy.Tpo -c -o lib_libMars_a-langy.o `test -f 'langy.c' || echo '$(srcdir)/'`langy.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-langy.Tpo $(DEPDIR)/lib_libMars_a-langy.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='langy.c' object='lib_libMars_a-langy.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-langy.o `test -f 'langy.c' || echo '$(srcdir)/'`langy.c
+
+lib_libMars_a-langy.obj: langy.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-langy.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-langy.Tpo -c -o lib_libMars_a-langy.obj `if test -f 'langy.c'; then $(CYGPATH_W) 'langy.c'; else $(CYGPATH_W) '$(srcdir)/langy.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-langy.Tpo $(DEPDIR)/lib_libMars_a-langy.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='langy.c' object='lib_libMars_a-langy.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-langy.obj `if test -f 'langy.c'; then $(CYGPATH_W) 'langy.c'; else $(CYGPATH_W) '$(srcdir)/langy.c'; fi`
+
+lib_libMars_a-tcp.o: tcp.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-tcp.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-tcp.Tpo -c -o lib_libMars_a-tcp.o `test -f 'tcp.c' || echo '$(srcdir)/'`tcp.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-tcp.Tpo $(DEPDIR)/lib_libMars_a-tcp.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tcp.c' object='lib_libMars_a-tcp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-tcp.o `test -f 'tcp.c' || echo '$(srcdir)/'`tcp.c
+
+lib_libMars_a-tcp.obj: tcp.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-tcp.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-tcp.Tpo -c -o lib_libMars_a-tcp.obj `if test -f 'tcp.c'; then $(CYGPATH_W) 'tcp.c'; else $(CYGPATH_W) '$(srcdir)/tcp.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-tcp.Tpo $(DEPDIR)/lib_libMars_a-tcp.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tcp.c' object='lib_libMars_a-tcp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-tcp.obj `if test -f 'tcp.c'; then $(CYGPATH_W) 'tcp.c'; else $(CYGPATH_W) '$(srcdir)/tcp.c'; fi`
+
+lib_libMars_a-server.o: server.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-server.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-server.Tpo -c -o lib_libMars_a-server.o `test -f 'server.c' || echo '$(srcdir)/'`server.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-server.Tpo $(DEPDIR)/lib_libMars_a-server.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='server.c' object='lib_libMars_a-server.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-server.o `test -f 'server.c' || echo '$(srcdir)/'`server.c
+
+lib_libMars_a-server.obj: server.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-server.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-server.Tpo -c -o lib_libMars_a-server.obj `if test -f 'server.c'; then $(CYGPATH_W) 'server.c'; else $(CYGPATH_W) '$(srcdir)/server.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-server.Tpo $(DEPDIR)/lib_libMars_a-server.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='server.c' object='lib_libMars_a-server.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-server.obj `if test -f 'server.c'; then $(CYGPATH_W) 'server.c'; else $(CYGPATH_W) '$(srcdir)/server.c'; fi`
+
+lib_libMars_a-request.o: request.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-request.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-request.Tpo -c -o lib_libMars_a-request.o `test -f 'request.c' || echo '$(srcdir)/'`request.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-request.Tpo $(DEPDIR)/lib_libMars_a-request.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='request.c' object='lib_libMars_a-request.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-request.o `test -f 'request.c' || echo '$(srcdir)/'`request.c
+
+lib_libMars_a-request.obj: request.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-request.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-request.Tpo -c -o lib_libMars_a-request.obj `if test -f 'request.c'; then $(CYGPATH_W) 'request.c'; else $(CYGPATH_W) '$(srcdir)/request.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-request.Tpo $(DEPDIR)/lib_libMars_a-request.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='request.c' object='lib_libMars_a-request.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-request.obj `if test -f 'request.c'; then $(CYGPATH_W) 'request.c'; else $(CYGPATH_W) '$(srcdir)/request.c'; fi`
+
+lib_libMars_a-expand.o: expand.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-expand.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-expand.Tpo -c -o lib_libMars_a-expand.o `test -f 'expand.c' || echo '$(srcdir)/'`expand.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-expand.Tpo $(DEPDIR)/lib_libMars_a-expand.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expand.c' object='lib_libMars_a-expand.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-expand.o `test -f 'expand.c' || echo '$(srcdir)/'`expand.c
+
+lib_libMars_a-expand.obj: expand.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-expand.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-expand.Tpo -c -o lib_libMars_a-expand.obj `if test -f 'expand.c'; then $(CYGPATH_W) 'expand.c'; else $(CYGPATH_W) '$(srcdir)/expand.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-expand.Tpo $(DEPDIR)/lib_libMars_a-expand.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='expand.c' object='lib_libMars_a-expand.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-expand.obj `if test -f 'expand.c'; then $(CYGPATH_W) 'expand.c'; else $(CYGPATH_W) '$(srcdir)/expand.c'; fi`
+
+lib_libMars_a-hash.o: hash.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-hash.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-hash.Tpo -c -o lib_libMars_a-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-hash.Tpo $(DEPDIR)/lib_libMars_a-hash.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hash.c' object='lib_libMars_a-hash.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+
+lib_libMars_a-hash.obj: hash.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-hash.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-hash.Tpo -c -o lib_libMars_a-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-hash.Tpo $(DEPDIR)/lib_libMars_a-hash.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hash.c' object='lib_libMars_a-hash.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`
+
+lib_libMars_a-memory.o: memory.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-memory.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-memory.Tpo -c -o lib_libMars_a-memory.o `test -f 'memory.c' || echo '$(srcdir)/'`memory.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-memory.Tpo $(DEPDIR)/lib_libMars_a-memory.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='memory.c' object='lib_libMars_a-memory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-memory.o `test -f 'memory.c' || echo '$(srcdir)/'`memory.c
+
+lib_libMars_a-memory.obj: memory.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-memory.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-memory.Tpo -c -o lib_libMars_a-memory.obj `if test -f 'memory.c'; then $(CYGPATH_W) 'memory.c'; else $(CYGPATH_W) '$(srcdir)/memory.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-memory.Tpo $(DEPDIR)/lib_libMars_a-memory.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='memory.c' object='lib_libMars_a-memory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-memory.obj `if test -f 'memory.c'; then $(CYGPATH_W) 'memory.c'; else $(CYGPATH_W) '$(srcdir)/memory.c'; fi`
+
+lib_libMars_a-logfile.o: logfile.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-logfile.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-logfile.Tpo -c -o lib_libMars_a-logfile.o `test -f 'logfile.c' || echo '$(srcdir)/'`logfile.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-logfile.Tpo $(DEPDIR)/lib_libMars_a-logfile.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='logfile.c' object='lib_libMars_a-logfile.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-logfile.o `test -f 'logfile.c' || echo '$(srcdir)/'`logfile.c
+
+lib_libMars_a-logfile.obj: logfile.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-logfile.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-logfile.Tpo -c -o lib_libMars_a-logfile.obj `if test -f 'logfile.c'; then $(CYGPATH_W) 'logfile.c'; else $(CYGPATH_W) '$(srcdir)/logfile.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-logfile.Tpo $(DEPDIR)/lib_libMars_a-logfile.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='logfile.c' object='lib_libMars_a-logfile.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-logfile.obj `if test -f 'logfile.c'; then $(CYGPATH_W) 'logfile.c'; else $(CYGPATH_W) '$(srcdir)/logfile.c'; fi`
+
+lib_libMars_a-options.o: options.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-options.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-options.Tpo -c -o lib_libMars_a-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-options.Tpo $(DEPDIR)/lib_libMars_a-options.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='options.c' object='lib_libMars_a-options.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
+
+lib_libMars_a-options.obj: options.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-options.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-options.Tpo -c -o lib_libMars_a-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-options.Tpo $(DEPDIR)/lib_libMars_a-options.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='options.c' object='lib_libMars_a-options.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
+
+lib_libMars_a-api.o: api.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-api.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-api.Tpo -c -o lib_libMars_a-api.o `test -f 'api.c' || echo '$(srcdir)/'`api.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-api.Tpo $(DEPDIR)/lib_libMars_a-api.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='api.c' object='lib_libMars_a-api.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-api.o `test -f 'api.c' || echo '$(srcdir)/'`api.c
+
+lib_libMars_a-api.obj: api.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-api.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-api.Tpo -c -o lib_libMars_a-api.obj `if test -f 'api.c'; then $(CYGPATH_W) 'api.c'; else $(CYGPATH_W) '$(srcdir)/api.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-api.Tpo $(DEPDIR)/lib_libMars_a-api.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='api.c' object='lib_libMars_a-api.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-api.obj `if test -f 'api.c'; then $(CYGPATH_W) 'api.c'; else $(CYGPATH_W) '$(srcdir)/api.c'; fi`
+
+lib_libMars_a-apibase.o: apibase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-apibase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-apibase.Tpo -c -o lib_libMars_a-apibase.o `test -f 'apibase.c' || echo '$(srcdir)/'`apibase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-apibase.Tpo $(DEPDIR)/lib_libMars_a-apibase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='apibase.c' object='lib_libMars_a-apibase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-apibase.o `test -f 'apibase.c' || echo '$(srcdir)/'`apibase.c
+
+lib_libMars_a-apibase.obj: apibase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-apibase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-apibase.Tpo -c -o lib_libMars_a-apibase.obj `if test -f 'apibase.c'; then $(CYGPATH_W) 'apibase.c'; else $(CYGPATH_W) '$(srcdir)/apibase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-apibase.Tpo $(DEPDIR)/lib_libMars_a-apibase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='apibase.c' object='lib_libMars_a-apibase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-apibase.obj `if test -f 'apibase.c'; then $(CYGPATH_W) 'apibase.c'; else $(CYGPATH_W) '$(srcdir)/apibase.c'; fi`
+
+lib_libMars_a-base.o: base.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-base.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-base.Tpo -c -o lib_libMars_a-base.o `test -f 'base.c' || echo '$(srcdir)/'`base.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-base.Tpo $(DEPDIR)/lib_libMars_a-base.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='base.c' object='lib_libMars_a-base.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-base.o `test -f 'base.c' || echo '$(srcdir)/'`base.c
+
+lib_libMars_a-base.obj: base.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-base.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-base.Tpo -c -o lib_libMars_a-base.obj `if test -f 'base.c'; then $(CYGPATH_W) 'base.c'; else $(CYGPATH_W) '$(srcdir)/base.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-base.Tpo $(DEPDIR)/lib_libMars_a-base.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='base.c' object='lib_libMars_a-base.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-base.obj `if test -f 'base.c'; then $(CYGPATH_W) 'base.c'; else $(CYGPATH_W) '$(srcdir)/base.c'; fi`
+
+lib_libMars_a-netbase.o: netbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-netbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-netbase.Tpo -c -o lib_libMars_a-netbase.o `test -f 'netbase.c' || echo '$(srcdir)/'`netbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-netbase.Tpo $(DEPDIR)/lib_libMars_a-netbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='netbase.c' object='lib_libMars_a-netbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-netbase.o `test -f 'netbase.c' || echo '$(srcdir)/'`netbase.c
+
+lib_libMars_a-netbase.obj: netbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-netbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-netbase.Tpo -c -o lib_libMars_a-netbase.obj `if test -f 'netbase.c'; then $(CYGPATH_W) 'netbase.c'; else $(CYGPATH_W) '$(srcdir)/netbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-netbase.Tpo $(DEPDIR)/lib_libMars_a-netbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='netbase.c' object='lib_libMars_a-netbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-netbase.obj `if test -f 'netbase.c'; then $(CYGPATH_W) 'netbase.c'; else $(CYGPATH_W) '$(srcdir)/netbase.c'; fi`
+
+lib_libMars_a-nullbase.o: nullbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-nullbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-nullbase.Tpo -c -o lib_libMars_a-nullbase.o `test -f 'nullbase.c' || echo '$(srcdir)/'`nullbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-nullbase.Tpo $(DEPDIR)/lib_libMars_a-nullbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='nullbase.c' object='lib_libMars_a-nullbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-nullbase.o `test -f 'nullbase.c' || echo '$(srcdir)/'`nullbase.c
+
+lib_libMars_a-nullbase.obj: nullbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-nullbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-nullbase.Tpo -c -o lib_libMars_a-nullbase.obj `if test -f 'nullbase.c'; then $(CYGPATH_W) 'nullbase.c'; else $(CYGPATH_W) '$(srcdir)/nullbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-nullbase.Tpo $(DEPDIR)/lib_libMars_a-nullbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='nullbase.c' object='lib_libMars_a-nullbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-nullbase.obj `if test -f 'nullbase.c'; then $(CYGPATH_W) 'nullbase.c'; else $(CYGPATH_W) '$(srcdir)/nullbase.c'; fi`
+
+lib_libMars_a-gribbase.o: gribbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-gribbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-gribbase.Tpo -c -o lib_libMars_a-gribbase.o `test -f 'gribbase.c' || echo '$(srcdir)/'`gribbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-gribbase.Tpo $(DEPDIR)/lib_libMars_a-gribbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gribbase.c' object='lib_libMars_a-gribbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-gribbase.o `test -f 'gribbase.c' || echo '$(srcdir)/'`gribbase.c
+
+lib_libMars_a-gribbase.obj: gribbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-gribbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-gribbase.Tpo -c -o lib_libMars_a-gribbase.obj `if test -f 'gribbase.c'; then $(CYGPATH_W) 'gribbase.c'; else $(CYGPATH_W) '$(srcdir)/gribbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-gribbase.Tpo $(DEPDIR)/lib_libMars_a-gribbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gribbase.c' object='lib_libMars_a-gribbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-gribbase.obj `if test -f 'gribbase.c'; then $(CYGPATH_W) 'gribbase.c'; else $(CYGPATH_W) '$(srcdir)/gribbase.c'; fi`
+
+lib_libMars_a-nfdbbase.o: nfdbbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-nfdbbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-nfdbbase.Tpo -c -o lib_libMars_a-nfdbbase.o `test -f 'nfdbbase.c' || echo '$(srcdir)/'`nfdbbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-nfdbbase.Tpo $(DEPDIR)/lib_libMars_a-nfdbbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='nfdbbase.c' object='lib_libMars_a-nfdbbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-nfdbbase.o `test -f 'nfdbbase.c' || echo '$(srcdir)/'`nfdbbase.c
+
+lib_libMars_a-nfdbbase.obj: nfdbbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-nfdbbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-nfdbbase.Tpo -c -o lib_libMars_a-nfdbbase.obj `if test -f 'nfdbbase.c'; then $(CYGPATH_W) 'nfdbbase.c'; else $(CYGPATH_W) '$(srcdir)/nfdbbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-nfdbbase.Tpo $(DEPDIR)/lib_libMars_a-nfdbbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='nfdbbase.c' object='lib_libMars_a-nfdbbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-nfdbbase.obj `if test -f 'nfdbbase.c'; then $(CYGPATH_W) 'nfdbbase.c'; else $(CYGPATH_W) '$(srcdir)/nfdbbase.c'; fi`
+
+lib_libMars_a-dhsbase.o: dhsbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-dhsbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-dhsbase.Tpo -c -o lib_libMars_a-dhsbase.o `test -f 'dhsbase.c' || echo '$(srcdir)/'`dhsbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-dhsbase.Tpo $(DEPDIR)/lib_libMars_a-dhsbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dhsbase.c' object='lib_libMars_a-dhsbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-dhsbase.o `test -f 'dhsbase.c' || echo '$(srcdir)/'`dhsbase.c
+
+lib_libMars_a-dhsbase.obj: dhsbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-dhsbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-dhsbase.Tpo -c -o lib_libMars_a-dhsbase.obj `if test -f 'dhsbase.c'; then $(CYGPATH_W) 'dhsbase.c'; else $(CYGPATH_W) '$(srcdir)/dhsbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-dhsbase.Tpo $(DEPDIR)/lib_libMars_a-dhsbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dhsbase.c' object='lib_libMars_a-dhsbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-dhsbase.obj `if test -f 'dhsbase.c'; then $(CYGPATH_W) 'dhsbase.c'; else $(CYGPATH_W) '$(srcdir)/dhsbase.c'; fi`
+
+lib_libMars_a-odbbase.o: odbbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-odbbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-odbbase.Tpo -c -o lib_libMars_a-odbbase.o `test -f 'odbbase.c' || echo '$(srcdir)/'`odbbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-odbbase.Tpo $(DEPDIR)/lib_libMars_a-odbbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='odbbase.c' object='lib_libMars_a-odbbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-odbbase.o `test -f 'odbbase.c' || echo '$(srcdir)/'`odbbase.c
+
+lib_libMars_a-odbbase.obj: odbbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-odbbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-odbbase.Tpo -c -o lib_libMars_a-odbbase.obj `if test -f 'odbbase.c'; then $(CYGPATH_W) 'odbbase.c'; else $(CYGPATH_W) '$(srcdir)/odbbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-odbbase.Tpo $(DEPDIR)/lib_libMars_a-odbbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='odbbase.c' object='lib_libMars_a-odbbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-odbbase.obj `if test -f 'odbbase.c'; then $(CYGPATH_W) 'odbbase.c'; else $(CYGPATH_W) '$(srcdir)/odbbase.c'; fi`
+
+lib_libMars_a-multibase.o: multibase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-multibase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-multibase.Tpo -c -o lib_libMars_a-multibase.o `test -f 'multibase.c' || echo '$(srcdir)/'`multibase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-multibase.Tpo $(DEPDIR)/lib_libMars_a-multibase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='multibase.c' object='lib_libMars_a-multibase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-multibase.o `test -f 'multibase.c' || echo '$(srcdir)/'`multibase.c
+
+lib_libMars_a-multibase.obj: multibase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-multibase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-multibase.Tpo -c -o lib_libMars_a-multibase.obj `if test -f 'multibase.c'; then $(CYGPATH_W) 'multibase.c'; else $(CYGPATH_W) '$(srcdir)/multibase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-multibase.Tpo $(DEPDIR)/lib_libMars_a-multibase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='multibase.c' object='lib_libMars_a-multibase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-multibase.obj `if test -f 'multibase.c'; then $(CYGPATH_W) 'multibase.c'; else $(CYGPATH_W) '$(srcdir)/multibase.c'; fi`
+
+lib_libMars_a-archive.o: archive.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-archive.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-archive.Tpo -c -o lib_libMars_a-archive.o `test -f 'archive.c' || echo '$(srcdir)/'`archive.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-archive.Tpo $(DEPDIR)/lib_libMars_a-archive.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='archive.c' object='lib_libMars_a-archive.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-archive.o `test -f 'archive.c' || echo '$(srcdir)/'`archive.c
+
+lib_libMars_a-archive.obj: archive.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-archive.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-archive.Tpo -c -o lib_libMars_a-archive.obj `if test -f 'archive.c'; then $(CYGPATH_W) 'archive.c'; else $(CYGPATH_W) '$(srcdir)/archive.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-archive.Tpo $(DEPDIR)/lib_libMars_a-archive.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='archive.c' object='lib_libMars_a-archive.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-archive.obj `if test -f 'archive.c'; then $(CYGPATH_W) 'archive.c'; else $(CYGPATH_W) '$(srcdir)/archive.c'; fi`
+
+lib_libMars_a-retrieve.o: retrieve.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-retrieve.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-retrieve.Tpo -c -o lib_libMars_a-retrieve.o `test -f 'retrieve.c' || echo '$(srcdir)/'`retrieve.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-retrieve.Tpo $(DEPDIR)/lib_libMars_a-retrieve.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='retrieve.c' object='lib_libMars_a-retrieve.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-retrieve.o `test -f 'retrieve.c' || echo '$(srcdir)/'`retrieve.c
+
+lib_libMars_a-retrieve.obj: retrieve.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-retrieve.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-retrieve.Tpo -c -o lib_libMars_a-retrieve.obj `if test -f 'retrieve.c'; then $(CYGPATH_W) 'retrieve.c'; else $(CYGPATH_W) '$(srcdir)/retrieve.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-retrieve.Tpo $(DEPDIR)/lib_libMars_a-retrieve.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='retrieve.c' object='lib_libMars_a-retrieve.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-retrieve.obj `if test -f 'retrieve.c'; then $(CYGPATH_W) 'retrieve.c'; else $(CYGPATH_W) '$(srcdir)/retrieve.c'; fi`
+
+lib_libMars_a-ibmblk.o: ibmblk.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-ibmblk.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-ibmblk.Tpo -c -o lib_libMars_a-ibmblk.o `test -f 'ibmblk.c' || echo '$(srcdir)/'`ibmblk.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-ibmblk.Tpo $(DEPDIR)/lib_libMars_a-ibmblk.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ibmblk.c' object='lib_libMars_a-ibmblk.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-ibmblk.o `test -f 'ibmblk.c' || echo '$(srcdir)/'`ibmblk.c
+
+lib_libMars_a-ibmblk.obj: ibmblk.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-ibmblk.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-ibmblk.Tpo -c -o lib_libMars_a-ibmblk.obj `if test -f 'ibmblk.c'; then $(CYGPATH_W) 'ibmblk.c'; else $(CYGPATH_W) '$(srcdir)/ibmblk.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-ibmblk.Tpo $(DEPDIR)/lib_libMars_a-ibmblk.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ibmblk.c' object='lib_libMars_a-ibmblk.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-ibmblk.obj `if test -f 'ibmblk.c'; then $(CYGPATH_W) 'ibmblk.c'; else $(CYGPATH_W) '$(srcdir)/ibmblk.c'; fi`
+
+lib_libMars_a-lock.o: lock.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-lock.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-lock.Tpo -c -o lib_libMars_a-lock.o `test -f 'lock.c' || echo '$(srcdir)/'`lock.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-lock.Tpo $(DEPDIR)/lib_libMars_a-lock.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lock.c' object='lib_libMars_a-lock.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-lock.o `test -f 'lock.c' || echo '$(srcdir)/'`lock.c
+
+lib_libMars_a-lock.obj: lock.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-lock.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-lock.Tpo -c -o lib_libMars_a-lock.obj `if test -f 'lock.c'; then $(CYGPATH_W) 'lock.c'; else $(CYGPATH_W) '$(srcdir)/lock.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-lock.Tpo $(DEPDIR)/lib_libMars_a-lock.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lock.c' object='lib_libMars_a-lock.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-lock.obj `if test -f 'lock.c'; then $(CYGPATH_W) 'lock.c'; else $(CYGPATH_W) '$(srcdir)/lock.c'; fi`
+
+lib_libMars_a-files.o: files.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-files.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-files.Tpo -c -o lib_libMars_a-files.o `test -f 'files.c' || echo '$(srcdir)/'`files.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-files.Tpo $(DEPDIR)/lib_libMars_a-files.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='files.c' object='lib_libMars_a-files.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-files.o `test -f 'files.c' || echo '$(srcdir)/'`files.c
+
+lib_libMars_a-files.obj: files.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-files.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-files.Tpo -c -o lib_libMars_a-files.obj `if test -f 'files.c'; then $(CYGPATH_W) 'files.c'; else $(CYGPATH_W) '$(srcdir)/files.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-files.Tpo $(DEPDIR)/lib_libMars_a-files.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='files.c' object='lib_libMars_a-files.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-files.obj `if test -f 'files.c'; then $(CYGPATH_W) 'files.c'; else $(CYGPATH_W) '$(srcdir)/files.c'; fi`
+
+lib_libMars_a-sh2ll.o: sh2ll.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-sh2ll.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-sh2ll.Tpo -c -o lib_libMars_a-sh2ll.o `test -f 'sh2ll.c' || echo '$(srcdir)/'`sh2ll.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-sh2ll.Tpo $(DEPDIR)/lib_libMars_a-sh2ll.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sh2ll.c' object='lib_libMars_a-sh2ll.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-sh2ll.o `test -f 'sh2ll.c' || echo '$(srcdir)/'`sh2ll.c
+
+lib_libMars_a-sh2ll.obj: sh2ll.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-sh2ll.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-sh2ll.Tpo -c -o lib_libMars_a-sh2ll.obj `if test -f 'sh2ll.c'; then $(CYGPATH_W) 'sh2ll.c'; else $(CYGPATH_W) '$(srcdir)/sh2ll.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-sh2ll.Tpo $(DEPDIR)/lib_libMars_a-sh2ll.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sh2ll.c' object='lib_libMars_a-sh2ll.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-sh2ll.obj `if test -f 'sh2ll.c'; then $(CYGPATH_W) 'sh2ll.c'; else $(CYGPATH_W) '$(srcdir)/sh2ll.c'; fi`
+
+lib_libMars_a-guess.o: guess.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-guess.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-guess.Tpo -c -o lib_libMars_a-guess.o `test -f 'guess.c' || echo '$(srcdir)/'`guess.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-guess.Tpo $(DEPDIR)/lib_libMars_a-guess.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='guess.c' object='lib_libMars_a-guess.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-guess.o `test -f 'guess.c' || echo '$(srcdir)/'`guess.c
+
+lib_libMars_a-guess.obj: guess.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-guess.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-guess.Tpo -c -o lib_libMars_a-guess.obj `if test -f 'guess.c'; then $(CYGPATH_W) 'guess.c'; else $(CYGPATH_W) '$(srcdir)/guess.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-guess.Tpo $(DEPDIR)/lib_libMars_a-guess.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='guess.c' object='lib_libMars_a-guess.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-guess.obj `if test -f 'guess.c'; then $(CYGPATH_W) 'guess.c'; else $(CYGPATH_W) '$(srcdir)/guess.c'; fi`
+
+lib_libMars_a-hypercube.o: hypercube.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-hypercube.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-hypercube.Tpo -c -o lib_libMars_a-hypercube.o `test -f 'hypercube.c' || echo '$(srcdir)/'`hypercube.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-hypercube.Tpo $(DEPDIR)/lib_libMars_a-hypercube.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hypercube.c' object='lib_libMars_a-hypercube.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-hypercube.o `test -f 'hypercube.c' || echo '$(srcdir)/'`hypercube.c
+
+lib_libMars_a-hypercube.obj: hypercube.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-hypercube.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-hypercube.Tpo -c -o lib_libMars_a-hypercube.obj `if test -f 'hypercube.c'; then $(CYGPATH_W) 'hypercube.c'; else $(CYGPATH_W) '$(srcdir)/hypercube.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-hypercube.Tpo $(DEPDIR)/lib_libMars_a-hypercube.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hypercube.c' object='lib_libMars_a-hypercube.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-hypercube.obj `if test -f 'hypercube.c'; then $(CYGPATH_W) 'hypercube.c'; else $(CYGPATH_W) '$(srcdir)/hypercube.c'; fi`
+
+lib_libMars_a-check.o: check.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-check.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-check.Tpo -c -o lib_libMars_a-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-check.Tpo $(DEPDIR)/lib_libMars_a-check.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='check.c' object='lib_libMars_a-check.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-check.o `test -f 'check.c' || echo '$(srcdir)/'`check.c
+
+lib_libMars_a-check.obj: check.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-check.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-check.Tpo -c -o lib_libMars_a-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-check.Tpo $(DEPDIR)/lib_libMars_a-check.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='check.c' object='lib_libMars_a-check.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-check.obj `if test -f 'check.c'; then $(CYGPATH_W) 'check.c'; else $(CYGPATH_W) '$(srcdir)/check.c'; fi`
+
+lib_libMars_a-environ.o: environ.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-environ.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-environ.Tpo -c -o lib_libMars_a-environ.o `test -f 'environ.c' || echo '$(srcdir)/'`environ.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-environ.Tpo $(DEPDIR)/lib_libMars_a-environ.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='environ.c' object='lib_libMars_a-environ.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-environ.o `test -f 'environ.c' || echo '$(srcdir)/'`environ.c
+
+lib_libMars_a-environ.obj: environ.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-environ.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-environ.Tpo -c -o lib_libMars_a-environ.obj `if test -f 'environ.c'; then $(CYGPATH_W) 'environ.c'; else $(CYGPATH_W) '$(srcdir)/environ.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-environ.Tpo $(DEPDIR)/lib_libMars_a-environ.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='environ.c' object='lib_libMars_a-environ.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-environ.obj `if test -f 'environ.c'; then $(CYGPATH_W) 'environ.c'; else $(CYGPATH_W) '$(srcdir)/environ.c'; fi`
+
+lib_libMars_a-handler.o: handler.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-handler.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-handler.Tpo -c -o lib_libMars_a-handler.o `test -f 'handler.c' || echo '$(srcdir)/'`handler.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-handler.Tpo $(DEPDIR)/lib_libMars_a-handler.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='handler.c' object='lib_libMars_a-handler.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-handler.o `test -f 'handler.c' || echo '$(srcdir)/'`handler.c
+
+lib_libMars_a-handler.obj: handler.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-handler.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-handler.Tpo -c -o lib_libMars_a-handler.obj `if test -f 'handler.c'; then $(CYGPATH_W) 'handler.c'; else $(CYGPATH_W) '$(srcdir)/handler.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-handler.Tpo $(DEPDIR)/lib_libMars_a-handler.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='handler.c' object='lib_libMars_a-handler.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-handler.obj `if test -f 'handler.c'; then $(CYGPATH_W) 'handler.c'; else $(CYGPATH_W) '$(srcdir)/handler.c'; fi`
+
+lib_libMars_a-target.o: target.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-target.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-target.Tpo -c -o lib_libMars_a-target.o `test -f 'target.c' || echo '$(srcdir)/'`target.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-target.Tpo $(DEPDIR)/lib_libMars_a-target.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='target.c' object='lib_libMars_a-target.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-target.o `test -f 'target.c' || echo '$(srcdir)/'`target.c
+
+lib_libMars_a-target.obj: target.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-target.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-target.Tpo -c -o lib_libMars_a-target.obj `if test -f 'target.c'; then $(CYGPATH_W) 'target.c'; else $(CYGPATH_W) '$(srcdir)/target.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-target.Tpo $(DEPDIR)/lib_libMars_a-target.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='target.c' object='lib_libMars_a-target.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-target.obj `if test -f 'target.c'; then $(CYGPATH_W) 'target.c'; else $(CYGPATH_W) '$(srcdir)/target.c'; fi`
+
+lib_libMars_a-grib.o: grib.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-grib.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-grib.Tpo -c -o lib_libMars_a-grib.o `test -f 'grib.c' || echo '$(srcdir)/'`grib.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-grib.Tpo $(DEPDIR)/lib_libMars_a-grib.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grib.c' object='lib_libMars_a-grib.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-grib.o `test -f 'grib.c' || echo '$(srcdir)/'`grib.c
+
+lib_libMars_a-grib.obj: grib.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-grib.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-grib.Tpo -c -o lib_libMars_a-grib.obj `if test -f 'grib.c'; then $(CYGPATH_W) 'grib.c'; else $(CYGPATH_W) '$(srcdir)/grib.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-grib.Tpo $(DEPDIR)/lib_libMars_a-grib.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='grib.c' object='lib_libMars_a-grib.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-grib.obj `if test -f 'grib.c'; then $(CYGPATH_W) 'grib.c'; else $(CYGPATH_W) '$(srcdir)/grib.c'; fi`
+
+lib_libMars_a-calc.o: calc.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-calc.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-calc.Tpo -c -o lib_libMars_a-calc.o `test -f 'calc.c' || echo '$(srcdir)/'`calc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-calc.Tpo $(DEPDIR)/lib_libMars_a-calc.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='calc.c' object='lib_libMars_a-calc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-calc.o `test -f 'calc.c' || echo '$(srcdir)/'`calc.c
+
+lib_libMars_a-calc.obj: calc.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-calc.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-calc.Tpo -c -o lib_libMars_a-calc.obj `if test -f 'calc.c'; then $(CYGPATH_W) 'calc.c'; else $(CYGPATH_W) '$(srcdir)/calc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-calc.Tpo $(DEPDIR)/lib_libMars_a-calc.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='calc.c' object='lib_libMars_a-calc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-calc.obj `if test -f 'calc.c'; then $(CYGPATH_W) 'calc.c'; else $(CYGPATH_W) '$(srcdir)/calc.c'; fi`
+
+lib_libMars_a-field.o: field.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-field.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-field.Tpo -c -o lib_libMars_a-field.o `test -f 'field.c' || echo '$(srcdir)/'`field.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-field.Tpo $(DEPDIR)/lib_libMars_a-field.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='field.c' object='lib_libMars_a-field.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-field.o `test -f 'field.c' || echo '$(srcdir)/'`field.c
+
+lib_libMars_a-field.obj: field.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-field.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-field.Tpo -c -o lib_libMars_a-field.obj `if test -f 'field.c'; then $(CYGPATH_W) 'field.c'; else $(CYGPATH_W) '$(srcdir)/field.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-field.Tpo $(DEPDIR)/lib_libMars_a-field.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='field.c' object='lib_libMars_a-field.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-field.obj `if test -f 'field.c'; then $(CYGPATH_W) 'field.c'; else $(CYGPATH_W) '$(srcdir)/field.c'; fi`
+
+lib_libMars_a-list.o: list.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-list.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-list.Tpo -c -o lib_libMars_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-list.Tpo $(DEPDIR)/lib_libMars_a-list.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='list.c' object='lib_libMars_a-list.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+
+lib_libMars_a-list.obj: list.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-list.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-list.Tpo -c -o lib_libMars_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-list.Tpo $(DEPDIR)/lib_libMars_a-list.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='list.c' object='lib_libMars_a-list.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+
+lib_libMars_a-tools.o: tools.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-tools.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-tools.Tpo -c -o lib_libMars_a-tools.o `test -f 'tools.c' || echo '$(srcdir)/'`tools.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-tools.Tpo $(DEPDIR)/lib_libMars_a-tools.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tools.c' object='lib_libMars_a-tools.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-tools.o `test -f 'tools.c' || echo '$(srcdir)/'`tools.c
+
+lib_libMars_a-tools.obj: tools.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-tools.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-tools.Tpo -c -o lib_libMars_a-tools.obj `if test -f 'tools.c'; then $(CYGPATH_W) 'tools.c'; else $(CYGPATH_W) '$(srcdir)/tools.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-tools.Tpo $(DEPDIR)/lib_libMars_a-tools.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tools.c' object='lib_libMars_a-tools.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-tools.obj `if test -f 'tools.c'; then $(CYGPATH_W) 'tools.c'; else $(CYGPATH_W) '$(srcdir)/tools.c'; fi`
+
+lib_libMars_a-hidden.o: hidden.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-hidden.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-hidden.Tpo -c -o lib_libMars_a-hidden.o `test -f 'hidden.c' || echo '$(srcdir)/'`hidden.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-hidden.Tpo $(DEPDIR)/lib_libMars_a-hidden.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hidden.c' object='lib_libMars_a-hidden.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-hidden.o `test -f 'hidden.c' || echo '$(srcdir)/'`hidden.c
+
+lib_libMars_a-hidden.obj: hidden.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-hidden.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-hidden.Tpo -c -o lib_libMars_a-hidden.obj `if test -f 'hidden.c'; then $(CYGPATH_W) 'hidden.c'; else $(CYGPATH_W) '$(srcdir)/hidden.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-hidden.Tpo $(DEPDIR)/lib_libMars_a-hidden.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hidden.c' object='lib_libMars_a-hidden.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-hidden.obj `if test -f 'hidden.c'; then $(CYGPATH_W) 'hidden.c'; else $(CYGPATH_W) '$(srcdir)/hidden.c'; fi`
+
+lib_libMars_a-index.o: index.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-index.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-index.Tpo -c -o lib_libMars_a-index.o `test -f 'index.c' || echo '$(srcdir)/'`index.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-index.Tpo $(DEPDIR)/lib_libMars_a-index.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='index.c' object='lib_libMars_a-index.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-index.o `test -f 'index.c' || echo '$(srcdir)/'`index.c
+
+lib_libMars_a-index.obj: index.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-index.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-index.Tpo -c -o lib_libMars_a-index.obj `if test -f 'index.c'; then $(CYGPATH_W) 'index.c'; else $(CYGPATH_W) '$(srcdir)/index.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-index.Tpo $(DEPDIR)/lib_libMars_a-index.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='index.c' object='lib_libMars_a-index.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-index.obj `if test -f 'index.c'; then $(CYGPATH_W) 'index.c'; else $(CYGPATH_W) '$(srcdir)/index.c'; fi`
+
+lib_libMars_a-bufr.o: bufr.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-bufr.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-bufr.Tpo -c -o lib_libMars_a-bufr.o `test -f 'bufr.c' || echo '$(srcdir)/'`bufr.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-bufr.Tpo $(DEPDIR)/lib_libMars_a-bufr.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='bufr.c' object='lib_libMars_a-bufr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-bufr.o `test -f 'bufr.c' || echo '$(srcdir)/'`bufr.c
+
+lib_libMars_a-bufr.obj: bufr.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-bufr.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-bufr.Tpo -c -o lib_libMars_a-bufr.obj `if test -f 'bufr.c'; then $(CYGPATH_W) 'bufr.c'; else $(CYGPATH_W) '$(srcdir)/bufr.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-bufr.Tpo $(DEPDIR)/lib_libMars_a-bufr.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='bufr.c' object='lib_libMars_a-bufr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-bufr.obj `if test -f 'bufr.c'; then $(CYGPATH_W) 'bufr.c'; else $(CYGPATH_W) '$(srcdir)/bufr.c'; fi`
+
+lib_libMars_a-externf.o: externf.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-externf.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-externf.Tpo -c -o lib_libMars_a-externf.o `test -f 'externf.c' || echo '$(srcdir)/'`externf.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-externf.Tpo $(DEPDIR)/lib_libMars_a-externf.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='externf.c' object='lib_libMars_a-externf.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-externf.o `test -f 'externf.c' || echo '$(srcdir)/'`externf.c
+
+lib_libMars_a-externf.obj: externf.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-externf.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-externf.Tpo -c -o lib_libMars_a-externf.obj `if test -f 'externf.c'; then $(CYGPATH_W) 'externf.c'; else $(CYGPATH_W) '$(srcdir)/externf.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-externf.Tpo $(DEPDIR)/lib_libMars_a-externf.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='externf.c' object='lib_libMars_a-externf.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-externf.obj `if test -f 'externf.c'; then $(CYGPATH_W) 'externf.c'; else $(CYGPATH_W) '$(srcdir)/externf.c'; fi`
+
+lib_libMars_a-service.o: service.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-service.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-service.Tpo -c -o lib_libMars_a-service.o `test -f 'service.c' || echo '$(srcdir)/'`service.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-service.Tpo $(DEPDIR)/lib_libMars_a-service.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='service.c' object='lib_libMars_a-service.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-service.o `test -f 'service.c' || echo '$(srcdir)/'`service.c
+
+lib_libMars_a-service.obj: service.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-service.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-service.Tpo -c -o lib_libMars_a-service.obj `if test -f 'service.c'; then $(CYGPATH_W) 'service.c'; else $(CYGPATH_W) '$(srcdir)/service.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-service.Tpo $(DEPDIR)/lib_libMars_a-service.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='service.c' object='lib_libMars_a-service.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-service.obj `if test -f 'service.c'; then $(CYGPATH_W) 'service.c'; else $(CYGPATH_W) '$(srcdir)/service.c'; fi`
+
+lib_libMars_a-xservice.o: xservice.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-xservice.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-xservice.Tpo -c -o lib_libMars_a-xservice.o `test -f 'xservice.c' || echo '$(srcdir)/'`xservice.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-xservice.Tpo $(DEPDIR)/lib_libMars_a-xservice.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='xservice.c' object='lib_libMars_a-xservice.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-xservice.o `test -f 'xservice.c' || echo '$(srcdir)/'`xservice.c
+
+lib_libMars_a-xservice.obj: xservice.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-xservice.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-xservice.Tpo -c -o lib_libMars_a-xservice.obj `if test -f 'xservice.c'; then $(CYGPATH_W) 'xservice.c'; else $(CYGPATH_W) '$(srcdir)/xservice.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-xservice.Tpo $(DEPDIR)/lib_libMars_a-xservice.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='xservice.c' object='lib_libMars_a-xservice.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-xservice.obj `if test -f 'xservice.c'; then $(CYGPATH_W) 'xservice.c'; else $(CYGPATH_W) '$(srcdir)/xservice.c'; fi`
+
+lib_libMars_a-udp.o: udp.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-udp.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-udp.Tpo -c -o lib_libMars_a-udp.o `test -f 'udp.c' || echo '$(srcdir)/'`udp.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-udp.Tpo $(DEPDIR)/lib_libMars_a-udp.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='udp.c' object='lib_libMars_a-udp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-udp.o `test -f 'udp.c' || echo '$(srcdir)/'`udp.c
+
+lib_libMars_a-udp.obj: udp.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-udp.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-udp.Tpo -c -o lib_libMars_a-udp.obj `if test -f 'udp.c'; then $(CYGPATH_W) 'udp.c'; else $(CYGPATH_W) '$(srcdir)/udp.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-udp.Tpo $(DEPDIR)/lib_libMars_a-udp.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='udp.c' object='lib_libMars_a-udp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-udp.obj `if test -f 'udp.c'; then $(CYGPATH_W) 'udp.c'; else $(CYGPATH_W) '$(srcdir)/udp.c'; fi`
+
+lib_libMars_a-queue.o: queue.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-queue.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-queue.Tpo -c -o lib_libMars_a-queue.o `test -f 'queue.c' || echo '$(srcdir)/'`queue.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-queue.Tpo $(DEPDIR)/lib_libMars_a-queue.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='queue.c' object='lib_libMars_a-queue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-queue.o `test -f 'queue.c' || echo '$(srcdir)/'`queue.c
+
+lib_libMars_a-queue.obj: queue.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-queue.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-queue.Tpo -c -o lib_libMars_a-queue.obj `if test -f 'queue.c'; then $(CYGPATH_W) 'queue.c'; else $(CYGPATH_W) '$(srcdir)/queue.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-queue.Tpo $(DEPDIR)/lib_libMars_a-queue.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='queue.c' object='lib_libMars_a-queue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-queue.obj `if test -f 'queue.c'; then $(CYGPATH_W) 'queue.c'; else $(CYGPATH_W) '$(srcdir)/queue.c'; fi`
+
+lib_libMars_a-variable.o: variable.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-variable.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-variable.Tpo -c -o lib_libMars_a-variable.o `test -f 'variable.c' || echo '$(srcdir)/'`variable.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-variable.Tpo $(DEPDIR)/lib_libMars_a-variable.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='variable.c' object='lib_libMars_a-variable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-variable.o `test -f 'variable.c' || echo '$(srcdir)/'`variable.c
+
+lib_libMars_a-variable.obj: variable.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-variable.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-variable.Tpo -c -o lib_libMars_a-variable.obj `if test -f 'variable.c'; then $(CYGPATH_W) 'variable.c'; else $(CYGPATH_W) '$(srcdir)/variable.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-variable.Tpo $(DEPDIR)/lib_libMars_a-variable.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='variable.c' object='lib_libMars_a-variable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-variable.obj `if test -f 'variable.c'; then $(CYGPATH_W) 'variable.c'; else $(CYGPATH_W) '$(srcdir)/variable.c'; fi`
+
+lib_libMars_a-filebase.o: filebase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-filebase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-filebase.Tpo -c -o lib_libMars_a-filebase.o `test -f 'filebase.c' || echo '$(srcdir)/'`filebase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-filebase.Tpo $(DEPDIR)/lib_libMars_a-filebase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='filebase.c' object='lib_libMars_a-filebase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-filebase.o `test -f 'filebase.c' || echo '$(srcdir)/'`filebase.c
+
+lib_libMars_a-filebase.obj: filebase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-filebase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-filebase.Tpo -c -o lib_libMars_a-filebase.obj `if test -f 'filebase.c'; then $(CYGPATH_W) 'filebase.c'; else $(CYGPATH_W) '$(srcdir)/filebase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-filebase.Tpo $(DEPDIR)/lib_libMars_a-filebase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='filebase.c' object='lib_libMars_a-filebase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-filebase.obj `if test -f 'filebase.c'; then $(CYGPATH_W) 'filebase.c'; else $(CYGPATH_W) '$(srcdir)/filebase.c'; fi`
+
+lib_libMars_a-account.o: account.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-account.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-account.Tpo -c -o lib_libMars_a-account.o `test -f 'account.c' || echo '$(srcdir)/'`account.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-account.Tpo $(DEPDIR)/lib_libMars_a-account.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='account.c' object='lib_libMars_a-account.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-account.o `test -f 'account.c' || echo '$(srcdir)/'`account.c
+
+lib_libMars_a-account.obj: account.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-account.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-account.Tpo -c -o lib_libMars_a-account.obj `if test -f 'account.c'; then $(CYGPATH_W) 'account.c'; else $(CYGPATH_W) '$(srcdir)/account.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-account.Tpo $(DEPDIR)/lib_libMars_a-account.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='account.c' object='lib_libMars_a-account.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-account.obj `if test -f 'account.c'; then $(CYGPATH_W) 'account.c'; else $(CYGPATH_W) '$(srcdir)/account.c'; fi`
+
+lib_libMars_a-cos.o: cos.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-cos.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-cos.Tpo -c -o lib_libMars_a-cos.o `test -f 'cos.c' || echo '$(srcdir)/'`cos.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-cos.Tpo $(DEPDIR)/lib_libMars_a-cos.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cos.c' object='lib_libMars_a-cos.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-cos.o `test -f 'cos.c' || echo '$(srcdir)/'`cos.c
+
+lib_libMars_a-cos.obj: cos.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-cos.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-cos.Tpo -c -o lib_libMars_a-cos.obj `if test -f 'cos.c'; then $(CYGPATH_W) 'cos.c'; else $(CYGPATH_W) '$(srcdir)/cos.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-cos.Tpo $(DEPDIR)/lib_libMars_a-cos.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cos.c' object='lib_libMars_a-cos.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-cos.obj `if test -f 'cos.c'; then $(CYGPATH_W) 'cos.c'; else $(CYGPATH_W) '$(srcdir)/cos.c'; fi`
+
+lib_libMars_a-llmatrix.o: llmatrix.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-llmatrix.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-llmatrix.Tpo -c -o lib_libMars_a-llmatrix.o `test -f 'llmatrix.c' || echo '$(srcdir)/'`llmatrix.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-llmatrix.Tpo $(DEPDIR)/lib_libMars_a-llmatrix.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='llmatrix.c' object='lib_libMars_a-llmatrix.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-llmatrix.o `test -f 'llmatrix.c' || echo '$(srcdir)/'`llmatrix.c
+
+lib_libMars_a-llmatrix.obj: llmatrix.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-llmatrix.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-llmatrix.Tpo -c -o lib_libMars_a-llmatrix.obj `if test -f 'llmatrix.c'; then $(CYGPATH_W) 'llmatrix.c'; else $(CYGPATH_W) '$(srcdir)/llmatrix.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-llmatrix.Tpo $(DEPDIR)/lib_libMars_a-llmatrix.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='llmatrix.c' object='lib_libMars_a-llmatrix.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-llmatrix.obj `if test -f 'llmatrix.c'; then $(CYGPATH_W) 'llmatrix.c'; else $(CYGPATH_W) '$(srcdir)/llmatrix.c'; fi`
+
+lib_libMars_a-pproc.o: pproc.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-pproc.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-pproc.Tpo -c -o lib_libMars_a-pproc.o `test -f 'pproc.c' || echo '$(srcdir)/'`pproc.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-pproc.Tpo $(DEPDIR)/lib_libMars_a-pproc.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pproc.c' object='lib_libMars_a-pproc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-pproc.o `test -f 'pproc.c' || echo '$(srcdir)/'`pproc.c
+
+lib_libMars_a-pproc.obj: pproc.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-pproc.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-pproc.Tpo -c -o lib_libMars_a-pproc.obj `if test -f 'pproc.c'; then $(CYGPATH_W) 'pproc.c'; else $(CYGPATH_W) '$(srcdir)/pproc.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-pproc.Tpo $(DEPDIR)/lib_libMars_a-pproc.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pproc.c' object='lib_libMars_a-pproc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-pproc.obj `if test -f 'pproc.c'; then $(CYGPATH_W) 'pproc.c'; else $(CYGPATH_W) '$(srcdir)/pproc.c'; fi`
+
+lib_libMars_a-restricted.o: restricted.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-restricted.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-restricted.Tpo -c -o lib_libMars_a-restricted.o `test -f 'restricted.c' || echo '$(srcdir)/'`restricted.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-restricted.Tpo $(DEPDIR)/lib_libMars_a-restricted.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='restricted.c' object='lib_libMars_a-restricted.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-restricted.o `test -f 'restricted.c' || echo '$(srcdir)/'`restricted.c
+
+lib_libMars_a-restricted.obj: restricted.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-restricted.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-restricted.Tpo -c -o lib_libMars_a-restricted.obj `if test -f 'restricted.c'; then $(CYGPATH_W) 'restricted.c'; else $(CYGPATH_W) '$(srcdir)/restricted.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-restricted.Tpo $(DEPDIR)/lib_libMars_a-restricted.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='restricted.c' object='lib_libMars_a-restricted.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-restricted.obj `if test -f 'restricted.c'; then $(CYGPATH_W) 'restricted.c'; else $(CYGPATH_W) '$(srcdir)/restricted.c'; fi`
+
+lib_libMars_a-wind.o: wind.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-wind.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-wind.Tpo -c -o lib_libMars_a-wind.o `test -f 'wind.c' || echo '$(srcdir)/'`wind.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-wind.Tpo $(DEPDIR)/lib_libMars_a-wind.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='wind.c' object='lib_libMars_a-wind.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-wind.o `test -f 'wind.c' || echo '$(srcdir)/'`wind.c
+
+lib_libMars_a-wind.obj: wind.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-wind.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-wind.Tpo -c -o lib_libMars_a-wind.obj `if test -f 'wind.c'; then $(CYGPATH_W) 'wind.c'; else $(CYGPATH_W) '$(srcdir)/wind.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-wind.Tpo $(DEPDIR)/lib_libMars_a-wind.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='wind.c' object='lib_libMars_a-wind.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-wind.obj `if test -f 'wind.c'; then $(CYGPATH_W) 'wind.c'; else $(CYGPATH_W) '$(srcdir)/wind.c'; fi`
+
+lib_libMars_a-control.o: control.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-control.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-control.Tpo -c -o lib_libMars_a-control.o `test -f 'control.c' || echo '$(srcdir)/'`control.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-control.Tpo $(DEPDIR)/lib_libMars_a-control.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='control.c' object='lib_libMars_a-control.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-control.o `test -f 'control.c' || echo '$(srcdir)/'`control.c
+
+lib_libMars_a-control.obj: control.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-control.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-control.Tpo -c -o lib_libMars_a-control.obj `if test -f 'control.c'; then $(CYGPATH_W) 'control.c'; else $(CYGPATH_W) '$(srcdir)/control.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-control.Tpo $(DEPDIR)/lib_libMars_a-control.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='control.c' object='lib_libMars_a-control.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-control.obj `if test -f 'control.c'; then $(CYGPATH_W) 'control.c'; else $(CYGPATH_W) '$(srcdir)/control.c'; fi`
+
+lib_libMars_a-stream.o: stream.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-stream.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-stream.Tpo -c -o lib_libMars_a-stream.o `test -f 'stream.c' || echo '$(srcdir)/'`stream.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-stream.Tpo $(DEPDIR)/lib_libMars_a-stream.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='stream.c' object='lib_libMars_a-stream.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-stream.o `test -f 'stream.c' || echo '$(srcdir)/'`stream.c
+
+lib_libMars_a-stream.obj: stream.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-stream.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-stream.Tpo -c -o lib_libMars_a-stream.obj `if test -f 'stream.c'; then $(CYGPATH_W) 'stream.c'; else $(CYGPATH_W) '$(srcdir)/stream.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-stream.Tpo $(DEPDIR)/lib_libMars_a-stream.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='stream.c' object='lib_libMars_a-stream.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-stream.obj `if test -f 'stream.c'; then $(CYGPATH_W) 'stream.c'; else $(CYGPATH_W) '$(srcdir)/stream.c'; fi`
+
+lib_libMars_a-remove.o: remove.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-remove.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-remove.Tpo -c -o lib_libMars_a-remove.o `test -f 'remove.c' || echo '$(srcdir)/'`remove.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-remove.Tpo $(DEPDIR)/lib_libMars_a-remove.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remove.c' object='lib_libMars_a-remove.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-remove.o `test -f 'remove.c' || echo '$(srcdir)/'`remove.c
+
+lib_libMars_a-remove.obj: remove.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-remove.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-remove.Tpo -c -o lib_libMars_a-remove.obj `if test -f 'remove.c'; then $(CYGPATH_W) 'remove.c'; else $(CYGPATH_W) '$(srcdir)/remove.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-remove.Tpo $(DEPDIR)/lib_libMars_a-remove.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='remove.c' object='lib_libMars_a-remove.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-remove.obj `if test -f 'remove.c'; then $(CYGPATH_W) 'remove.c'; else $(CYGPATH_W) '$(srcdir)/remove.c'; fi`
+
+lib_libMars_a-authenticate.o: authenticate.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-authenticate.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-authenticate.Tpo -c -o lib_libMars_a-authenticate.o `test -f 'authenticate.c' || echo '$(srcdir)/'`authenticate.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-authenticate.Tpo $(DEPDIR)/lib_libMars_a-authenticate.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='authenticate.c' object='lib_libMars_a-authenticate.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-authenticate.o `test -f 'authenticate.c' || echo '$(srcdir)/'`authenticate.c
+
+lib_libMars_a-authenticate.obj: authenticate.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-authenticate.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-authenticate.Tpo -c -o lib_libMars_a-authenticate.obj `if test -f 'authenticate.c'; then $(CYGPATH_W) 'authenticate.c'; else $(CYGPATH_W) '$(srcdir)/authenticate.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-authenticate.Tpo $(DEPDIR)/lib_libMars_a-authenticate.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='authenticate.c' object='lib_libMars_a-authenticate.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-authenticate.obj `if test -f 'authenticate.c'; then $(CYGPATH_W) 'authenticate.c'; else $(CYGPATH_W) '$(srcdir)/authenticate.c'; fi`
+
+lib_libMars_a-flatfilebase.o: flatfilebase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-flatfilebase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-flatfilebase.Tpo -c -o lib_libMars_a-flatfilebase.o `test -f 'flatfilebase.c' || echo '$(srcdir)/'`flatfilebase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-flatfilebase.Tpo $(DEPDIR)/lib_libMars_a-flatfilebase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='flatfilebase.c' object='lib_libMars_a-flatfilebase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-flatfilebase.o `test -f 'flatfilebase.c' || echo '$(srcdir)/'`flatfilebase.c
+
+lib_libMars_a-flatfilebase.obj: flatfilebase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-flatfilebase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-flatfilebase.Tpo -c -o lib_libMars_a-flatfilebase.obj `if test -f 'flatfilebase.c'; then $(CYGPATH_W) 'flatfilebase.c'; else $(CYGPATH_W) '$(srcdir)/flatfilebase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-flatfilebase.Tpo $(DEPDIR)/lib_libMars_a-flatfilebase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='flatfilebase.c' object='lib_libMars_a-flatfilebase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-flatfilebase.obj `if test -f 'flatfilebase.c'; then $(CYGPATH_W) 'flatfilebase.c'; else $(CYGPATH_W) '$(srcdir)/flatfilebase.c'; fi`
+
+lib_libMars_a-time.o: time.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-time.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-time.Tpo -c -o lib_libMars_a-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-time.Tpo $(DEPDIR)/lib_libMars_a-time.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='time.c' object='lib_libMars_a-time.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c
+
+lib_libMars_a-time.obj: time.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-time.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-time.Tpo -c -o lib_libMars_a-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-time.Tpo $(DEPDIR)/lib_libMars_a-time.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='time.c' object='lib_libMars_a-time.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi`
+
+lib_libMars_a-timer.o: timer.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-timer.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-timer.Tpo -c -o lib_libMars_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-timer.Tpo $(DEPDIR)/lib_libMars_a-timer.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='timer.c' object='lib_libMars_a-timer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c
+
+lib_libMars_a-timer.obj: timer.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-timer.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-timer.Tpo -c -o lib_libMars_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-timer.Tpo $(DEPDIR)/lib_libMars_a-timer.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='timer.c' object='lib_libMars_a-timer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`
+
+lib_libMars_a-json.o: json.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-json.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-json.Tpo -c -o lib_libMars_a-json.o `test -f 'json.c' || echo '$(srcdir)/'`json.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-json.Tpo $(DEPDIR)/lib_libMars_a-json.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='json.c' object='lib_libMars_a-json.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-json.o `test -f 'json.c' || echo '$(srcdir)/'`json.c
+
+lib_libMars_a-json.obj: json.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-json.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-json.Tpo -c -o lib_libMars_a-json.obj `if test -f 'json.c'; then $(CYGPATH_W) 'json.c'; else $(CYGPATH_W) '$(srcdir)/json.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-json.Tpo $(DEPDIR)/lib_libMars_a-json.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='json.c' object='lib_libMars_a-json.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-json.obj `if test -f 'json.c'; then $(CYGPATH_W) 'json.c'; else $(CYGPATH_W) '$(srcdir)/json.c'; fi`
+
+lib_libMars_a-version.o: version.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-version.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-version.Tpo -c -o lib_libMars_a-version.o `test -f 'version.c' || echo '$(srcdir)/'`version.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-version.Tpo $(DEPDIR)/lib_libMars_a-version.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='version.c' object='lib_libMars_a-version.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-version.o `test -f 'version.c' || echo '$(srcdir)/'`version.c
+
+lib_libMars_a-version.obj: version.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-version.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-version.Tpo -c -o lib_libMars_a-version.obj `if test -f 'version.c'; then $(CYGPATH_W) 'version.c'; else $(CYGPATH_W) '$(srcdir)/version.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-version.Tpo $(DEPDIR)/lib_libMars_a-version.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='version.c' object='lib_libMars_a-version.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-version.obj `if test -f 'version.c'; then $(CYGPATH_W) 'version.c'; else $(CYGPATH_W) '$(srcdir)/version.c'; fi`
+
+lib_libMars_a-statistics.o: statistics.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-statistics.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-statistics.Tpo -c -o lib_libMars_a-statistics.o `test -f 'statistics.c' || echo '$(srcdir)/'`statistics.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-statistics.Tpo $(DEPDIR)/lib_libMars_a-statistics.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='statistics.c' object='lib_libMars_a-statistics.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-statistics.o `test -f 'statistics.c' || echo '$(srcdir)/'`statistics.c
+
+lib_libMars_a-statistics.obj: statistics.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-statistics.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-statistics.Tpo -c -o lib_libMars_a-statistics.obj `if test -f 'statistics.c'; then $(CYGPATH_W) 'statistics.c'; else $(CYGPATH_W) '$(srcdir)/statistics.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-statistics.Tpo $(DEPDIR)/lib_libMars_a-statistics.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='statistics.c' object='lib_libMars_a-statistics.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-statistics.obj `if test -f 'statistics.c'; then $(CYGPATH_W) 'statistics.c'; else $(CYGPATH_W) '$(srcdir)/statistics.c'; fi`
+
+lib_libMars_a-metadata.o: metadata.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-metadata.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-metadata.Tpo -c -o lib_libMars_a-metadata.o `test -f 'metadata.c' || echo '$(srcdir)/'`metadata.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-metadata.Tpo $(DEPDIR)/lib_libMars_a-metadata.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='metadata.c' object='lib_libMars_a-metadata.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-metadata.o `test -f 'metadata.c' || echo '$(srcdir)/'`metadata.c
+
+lib_libMars_a-metadata.obj: metadata.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-metadata.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-metadata.Tpo -c -o lib_libMars_a-metadata.obj `if test -f 'metadata.c'; then $(CYGPATH_W) 'metadata.c'; else $(CYGPATH_W) '$(srcdir)/metadata.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-metadata.Tpo $(DEPDIR)/lib_libMars_a-metadata.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='metadata.c' object='lib_libMars_a-metadata.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-metadata.obj `if test -f 'metadata.c'; then $(CYGPATH_W) 'metadata.c'; else $(CYGPATH_W) '$(srcdir)/metadata.c'; fi`
+
+lib_libMars_a-webbase.o: webbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-webbase.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-webbase.Tpo -c -o lib_libMars_a-webbase.o `test -f 'webbase.c' || echo '$(srcdir)/'`webbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-webbase.Tpo $(DEPDIR)/lib_libMars_a-webbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='webbase.c' object='lib_libMars_a-webbase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-webbase.o `test -f 'webbase.c' || echo '$(srcdir)/'`webbase.c
+
+lib_libMars_a-webbase.obj: webbase.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-webbase.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-webbase.Tpo -c -o lib_libMars_a-webbase.obj `if test -f 'webbase.c'; then $(CYGPATH_W) 'webbase.c'; else $(CYGPATH_W) '$(srcdir)/webbase.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-webbase.Tpo $(DEPDIR)/lib_libMars_a-webbase.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='webbase.c' object='lib_libMars_a-webbase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-webbase.obj `if test -f 'webbase.c'; then $(CYGPATH_W) 'webbase.c'; else $(CYGPATH_W) '$(srcdir)/webbase.c'; fi`
+
+lib_libMars_a-ecaccess.o: ecaccess.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-ecaccess.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-ecaccess.Tpo -c -o lib_libMars_a-ecaccess.o `test -f 'ecaccess.c' || echo '$(srcdir)/'`ecaccess.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-ecaccess.Tpo $(DEPDIR)/lib_libMars_a-ecaccess.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ecaccess.c' object='lib_libMars_a-ecaccess.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-ecaccess.o `test -f 'ecaccess.c' || echo '$(srcdir)/'`ecaccess.c
+
+lib_libMars_a-ecaccess.obj: ecaccess.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-ecaccess.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-ecaccess.Tpo -c -o lib_libMars_a-ecaccess.obj `if test -f 'ecaccess.c'; then $(CYGPATH_W) 'ecaccess.c'; else $(CYGPATH_W) '$(srcdir)/ecaccess.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-ecaccess.Tpo $(DEPDIR)/lib_libMars_a-ecaccess.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ecaccess.c' object='lib_libMars_a-ecaccess.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-ecaccess.obj `if test -f 'ecaccess.c'; then $(CYGPATH_W) 'ecaccess.c'; else $(CYGPATH_W) '$(srcdir)/ecaccess.c'; fi`
+
+lib_libMars_a-free.o: free.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-free.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-free.Tpo -c -o lib_libMars_a-free.o `test -f 'free.c' || echo '$(srcdir)/'`free.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-free.Tpo $(DEPDIR)/lib_libMars_a-free.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='free.c' object='lib_libMars_a-free.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-free.o `test -f 'free.c' || echo '$(srcdir)/'`free.c
+
+lib_libMars_a-free.obj: free.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-free.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-free.Tpo -c -o lib_libMars_a-free.obj `if test -f 'free.c'; then $(CYGPATH_W) 'free.c'; else $(CYGPATH_W) '$(srcdir)/free.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-free.Tpo $(DEPDIR)/lib_libMars_a-free.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='free.c' object='lib_libMars_a-free.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-free.obj `if test -f 'free.c'; then $(CYGPATH_W) 'free.c'; else $(CYGPATH_W) '$(srcdir)/free.c'; fi`
+
+lib_libMars_a-schedule.o: schedule.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-schedule.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-schedule.Tpo -c -o lib_libMars_a-schedule.o `test -f 'schedule.c' || echo '$(srcdir)/'`schedule.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-schedule.Tpo $(DEPDIR)/lib_libMars_a-schedule.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='schedule.c' object='lib_libMars_a-schedule.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-schedule.o `test -f 'schedule.c' || echo '$(srcdir)/'`schedule.c
+
+lib_libMars_a-schedule.obj: schedule.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-schedule.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-schedule.Tpo -c -o lib_libMars_a-schedule.obj `if test -f 'schedule.c'; then $(CYGPATH_W) 'schedule.c'; else $(CYGPATH_W) '$(srcdir)/schedule.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-schedule.Tpo $(DEPDIR)/lib_libMars_a-schedule.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='schedule.c' object='lib_libMars_a-schedule.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-schedule.obj `if test -f 'schedule.c'; then $(CYGPATH_W) 'schedule.c'; else $(CYGPATH_W) '$(srcdir)/schedule.c'; fi`
+
+lib_libMars_a-macro_api.o: macro_api.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-macro_api.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-macro_api.Tpo -c -o lib_libMars_a-macro_api.o `test -f 'macro_api.c' || echo '$(srcdir)/'`macro_api.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-macro_api.Tpo $(DEPDIR)/lib_libMars_a-macro_api.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='macro_api.c' object='lib_libMars_a-macro_api.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-macro_api.o `test -f 'macro_api.c' || echo '$(srcdir)/'`macro_api.c
+
+lib_libMars_a-macro_api.obj: macro_api.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-macro_api.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-macro_api.Tpo -c -o lib_libMars_a-macro_api.obj `if test -f 'macro_api.c'; then $(CYGPATH_W) 'macro_api.c'; else $(CYGPATH_W) '$(srcdir)/macro_api.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-macro_api.Tpo $(DEPDIR)/lib_libMars_a-macro_api.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='macro_api.c' object='lib_libMars_a-macro_api.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-macro_api.obj `if test -f 'macro_api.c'; then $(CYGPATH_W) 'macro_api.c'; else $(CYGPATH_W) '$(srcdir)/macro_api.c'; fi`
+
+lib_libMars_a-rpcmars.o: rpcmars.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-rpcmars.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-rpcmars.Tpo -c -o lib_libMars_a-rpcmars.o `test -f 'rpcmars.c' || echo '$(srcdir)/'`rpcmars.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-rpcmars.Tpo $(DEPDIR)/lib_libMars_a-rpcmars.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rpcmars.c' object='lib_libMars_a-rpcmars.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-rpcmars.o `test -f 'rpcmars.c' || echo '$(srcdir)/'`rpcmars.c
+
+lib_libMars_a-rpcmars.obj: rpcmars.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libMars_a-rpcmars.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-rpcmars.Tpo -c -o lib_libMars_a-rpcmars.obj `if test -f 'rpcmars.c'; then $(CYGPATH_W) 'rpcmars.c'; else $(CYGPATH_W) '$(srcdir)/rpcmars.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-rpcmars.Tpo $(DEPDIR)/lib_libMars_a-rpcmars.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rpcmars.c' object='lib_libMars_a-rpcmars.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libMars_a-rpcmars.obj `if test -f 'rpcmars.c'; then $(CYGPATH_W) 'rpcmars.c'; else $(CYGPATH_W) '$(srcdir)/rpcmars.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+lib_libMars_a-odb.o: odb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libMars_a-odb.o -MD -MP -MF $(DEPDIR)/lib_libMars_a-odb.Tpo -c -o lib_libMars_a-odb.o `test -f 'odb.cc' || echo '$(srcdir)/'`odb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-odb.Tpo $(DEPDIR)/lib_libMars_a-odb.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='odb.cc' object='lib_libMars_a-odb.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMars_a-odb.o `test -f 'odb.cc' || echo '$(srcdir)/'`odb.cc
+
+lib_libMars_a-odb.obj: odb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libMars_a-odb.obj -MD -MP -MF $(DEPDIR)/lib_libMars_a-odb.Tpo -c -o lib_libMars_a-odb.obj `if test -f 'odb.cc'; then $(CYGPATH_W) 'odb.cc'; else $(CYGPATH_W) '$(srcdir)/odb.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMars_a-odb.Tpo $(DEPDIR)/lib_libMars_a-odb.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='odb.cc' object='lib_libMars_a-odb.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMars_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMars_a-odb.obj `if test -f 'odb.cc'; then $(CYGPATH_W) 'odb.cc'; else $(CYGPATH_W) '$(srcdir)/odb.cc'; fi`
+
+.f90.o:
+	$(AM_V_FC) @AM_BACKSLASH@
+	$(FCCOMPILE) -c -o $@ $<
+
+.f90.obj:
+	$(AM_V_FC) @AM_BACKSLASH@
+	$(FCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.f90.lo:
+	$(AM_V_FC) @AM_BACKSLASH@
+	$(LTFCCOMPILE) -c -o $@ $<
+
+.y.c:
+	$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-rm -f langy.c
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES clean-libtool ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-includeHEADERS install-info \
+	install-info-am install-libLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includeHEADERS \
+	uninstall-libLIBRARIES
+
+
+# for the fortran macro_api library
+# note that we need to put FCFLAGS first in case the user's flags
+# need to overide the autotools flags
+# lib_libmacro_api_f90_a_FCFLAGS = ${FCFLAGS} @METVIEW_FC_FLAGS@
+
+#noinst_lib_libMars_a_HEADERS  = base.h bufr.h control.h \
+#	field.h globals.h grib.h \
+#	ibmblk.h lang.h mars.h mcs.h \
+#	netbase.h proto.h rpcmars.h tools.h \
+#	cos.h
+
+#all: lib
+#	$(UPDATE_TITLE)
+
+lib:
+	ln -s ../../lib lib
+
+$(include_dir):
+	mkdir $(include_dir)
+
+macro_header: $(include_dir)/macro_api.h
+
+$(include_dir)/macro_api.h: macro_api.h
+	${INSTALL} macro_api.h $(include_dir)
+
+langy.c : langl.c
+langl.c : langl.l
+	$(LEX) $(LFLAGS) langl.l
+	sed -e s/yy/yy_mars/g < lex.yy.c > $@
+	$(RM) lex.yy.c
+langy.c : langy.y
+	$(YACC) $(YFLAGS) langy.y
+	sed -e s/yy/yy_mars/g < y.tab.c > $@
+	$(RM) y.tab.c
+
+rpcmars.h : rpcmars.x
+	$(RPCGEN) -h -o rpcmars.h rpcmars.x
+	- chmod a+rw rpcmars.h
+
+rpcmars.c : rpcmars.x
+	$(RPCGEN) -c -o rpcmars.c rpcmars.x
+	- chmod a+rw rpcmars.c
+
+# a note about cleaning: in order that the end user does not need to
+# install lex and yacc, we distribute the generated source files. We also
+# don't want these to be cleaned during a normal clean, because the end user
+# would then need to have lex and yacc installed... so we don't clean
+# these by default, but instead have a separate target, 'cleanall' which
+# remove the lex/yacc generated source.
+
+clean-all: clean
+	-rm -f langy.c langl.c
+
+# do not distribute certain files in the tarball...
+#dist-hook:
+#	rm -f $(distdir)/langy.c $(distdir)/langl.c
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libMars/account.c b/src/libMars/account.c
new file mode 100644
index 0000000..b5d316e
--- /dev/null
+++ b/src/libMars/account.c
@@ -0,0 +1,207 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+
+#include "mars.h"
+
+/*
+
+	This file implements different authetication methods:
+	ecmwf: is the method used at ECMWF. Each MARS request is
+		   verified once against a list of MARS restrictions
+		   for the user requesting the data.
+	eccert: is the method used for the MARS client installed
+			in Member States or Co-operating States to
+			access ECMWF MARS. 
+
+	The method can be defined per request (see options.c) or
+	per database (see netbase.c).
+
+	MARS administrators wanting to add new validation methods
+	should give it a name and create a validate proc (see below).
+*/
+
+typedef err (*validateproc) (request *,request *);
+
+typedef struct validation_handler {
+	const char   *name;
+	validateproc proc;
+} validation_handler;
+
+err eccert_validate(request *r,request *e);
+err ecmwf_validate(request *r,request *e);
+err ams_validate(request *r,request *e);
+err null_validate(request *r,request *e);
+
+static validation_handler handlers[] = {
+	{"eccert",  eccert_validate},
+	{"ecmwf",   ecmwf_validate},
+	{"null",    null_validate},
+	{"ams",     ams_validate},
+};
+
+
+err ams_validate(request *r,request *e)
+{
+	mars.request_id = 42;
+	return 0;
+}
+
+err ecmwf_validate(request *r,request *e)
+{
+	err ret = 0;
+	char buf[80];
+
+	marslog(LOG_DBUG,"Validation using ECMWF restrictions");
+
+	mars.request_id = -1;
+	start_timer();
+	ret = local_validate_request(r,e);
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG,"Request after authentication:");
+		print_all_requests(r);
+	}
+	stop_timer(buf);
+	if(*buf) marslog(LOG_DBUG,"Authentication time: %s",buf);
+	return ret;
+}
+
+int eccert_validate(request *r,request *e)
+{
+	char *buf;
+	XDR x;
+	netblk blk;
+	char *tmp;
+	FILE *f;
+	err ret = 0;
+	int len;
+	int ok = 0;
+	int buflen;
+
+	marslog(LOG_DBUG,"Validation using ECCERT");
+
+	memset(&blk,0,sizeof(blk));
+	blk.req = clone_one_request(r);
+	blk.env = clone_one_request(e);
+
+	buflen = 4096;
+	buf    = MALLOC(buflen);
+
+	do{
+		xdrmem_create(&x,buf,buflen,XDR_ENCODE);
+		if(!xdr_netblk(&x,&blk))
+		{
+			xdr_destroy(&x);
+			FREE(buf);
+			buflen += buflen / 2 + 1;
+			buf = MALLOC(buflen);
+		} else ok = 1;
+	} while(!ok);
+
+	free_all_requests(blk.req);
+	free_all_requests(blk.env);
+
+	len = xdr_getpos(&x);
+	xdr_destroy(&x);
+
+	tmp = marstmp();
+	f = fopen(tmp,"w");
+
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",tmp);
+		return -2;
+	}
+
+	if(fwrite(buf,1,len,f) != len)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fwrite(%s)",tmp);
+		fclose(f);
+		FREE(buf);
+		return -2;
+	}
+
+	if(fclose(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"fclose(%s)",tmp);
+		FREE(buf);
+		return -2;
+	}
+
+	sprintf(buf,"eccmd ecmars -q %s",tmp);
+	marslog(LOG_DBUG,"%s",buf);
+
+	f = popen(buf,"r");
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot execute %s",buf);
+		return -2;
+	}
+
+	len = fread(buf,1,buflen,f);
+	marslog(LOG_DBUG,"token len %d",len);
+	if(len<=0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fread");
+		ret = -2;
+	}
+
+	if(len == buflen )
+	{
+		marslog(LOG_EROR,"Certificate to long");
+		ret = -2;
+	}
+
+	if(pclose(f) != 0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Got non zero code from eccert");
+		ret =  -2;
+	}
+	unlink(tmp);
+
+	if(ret == 0)
+	{
+		FREE(mars.certstr);
+		mars.certstr = 0;
+		mars.certstr = MALLOC(len);
+		memcpy(mars.certstr,buf,len);
+		mars.certlen = len;
+	}
+
+	FREE(buf);
+
+	return ret;
+}
+
+err null_validate(request *r,request *e)
+{
+	mars.request_id = -1;
+	marslog(LOG_DBUG,"NO Validation performed");
+	return NOERR;
+}
+
+err validate_request(request *r,request *e, const char *method)
+{
+	err ret = NOERR;
+	int i = 0;
+
+	for(i=0;i<NUMBER(handlers);i++)
+		if(method && EQ(handlers[i].name,method))
+		{
+			ret |= handlers[i].proc(r,e);
+		}
+	
+	return ret;
+}
+
diff --git a/src/libMars/api.c b/src/libMars/api.c
new file mode 100644
index 0000000..74ab381
--- /dev/null
+++ b/src/libMars/api.c
@@ -0,0 +1,565 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <strings.h>
+#ifndef NOCURL
+#include <curl/curl.h>
+#include "api.h"
+#include "json.h"
+#include "mars.h"
+
+#define SKIP_PEER_VERIFICATION
+
+#define INITIAL_BUFFER_SIZE 10240
+
+
+static CURLM *multi_handle = 0;
+static int first = 1;
+
+struct _ecmwf_api {
+    int error;
+
+    char *key;
+    char *email;
+    char *url;
+
+    char* location;
+    size_t location_len;
+
+    char* type;
+    size_t type_len;
+
+
+    int retry_wait;
+    int retry_count;
+    long code;
+
+    long verbose;
+
+    char* buffer;
+    size_t pos;
+    size_t len;
+
+    int offset;
+    int limit;
+
+    CURL *curl;
+    struct curl_slist *chunk;
+    FILE *file;
+
+    int active;
+
+    json_value* value;
+
+    CURLcode curl_error;
+
+    typeproc typecb;
+    void* typecb_data;
+};
+
+#define _(a) _call(api,#a,a)
+
+static void _call(ecmwf_api* api, const char* what, CURLcode code)
+{
+    api->curl_error = code;
+    if(code != CURLE_OK)
+    {
+        marslog(LOG_EROR,"%s failed: %s", what, curl_easy_strerror(code));
+        api->error++;
+    }
+}
+
+static void wait_for_data(ecmwf_api *api, size_t size)
+{
+    fd_set fdr, fdw, fdx;
+    struct timeval timeout;
+
+    if((!api->active) || (api->pos > size))
+        return;
+
+    do {
+        int maxfd = -1;
+        long time = -1;
+
+        FD_ZERO(&fdr);
+        FD_ZERO(&fdw);
+        FD_ZERO(&fdx);
+
+        _(curl_multi_timeout(multi_handle, &time));
+        if(time >= 0) {
+            timeout.tv_sec = time / 1000;
+            if(timeout.tv_sec > 1)
+                timeout.tv_sec = 1;
+            else
+                timeout.tv_usec = (time % 1000) * 1000;
+        }
+        else
+        {
+            timeout.tv_sec = 60;
+            timeout.tv_usec = 0;
+        }
+
+        _(curl_multi_fdset(multi_handle, &fdr, &fdw, &fdx, &maxfd));
+
+        if(select(maxfd+1, &fdr, &fdw, &fdx, &timeout) == -1)
+        {
+            perror("select");
+            api->error++;
+        }
+        else {
+            _(curl_multi_perform(multi_handle, &api->active));
+        }
+
+    } while(api->active && (api->pos < size));
+
+}
+
+void ecmwf_wait_for_data(ecmwf_api *api, size_t size)
+{
+    wait_for_data(api, size);
+}
+
+
+size_t ecmwf_api_transfer_read(ecmwf_api* api, void *ptr, size_t size)
+{
+    wait_for_data(api, size);
+
+    if(api->pos == 0)
+        return 0; /* EOF */
+
+    if(api->pos < size)
+        size = api->pos;
+
+    memcpy(ptr, api->buffer, size);
+
+    if(api->pos - size <= 0)
+    {
+        api->pos=0;
+    }
+    else
+    {
+        memmove(api->buffer, api->buffer + size, api->pos - size);
+        api->pos -= size;
+    }
+
+    return size;
+}
+
+
+static size_t write_callback( void *ptr, size_t size, size_t nmemb, void *userdata)
+{
+    ecmwf_api* api = (ecmwf_api*)userdata;
+    size *= nmemb;
+
+    if(api->buffer == NULL)
+    {
+        api->len    = INITIAL_BUFFER_SIZE;
+        api->buffer = malloc(api->len);
+    }
+
+    if(api->pos + size > api->len) {
+
+        while(api->pos + size > api->len) {
+            api->len *= 2;
+        }
+
+        api->buffer = realloc(api->buffer, api->len);
+        if(!api->buffer)
+        {
+            api->error++;
+            return 0;
+        }
+    }
+
+    memcpy(api->buffer + api->pos, ptr, size);
+    api->pos += size;
+
+    return size;
+}
+
+static void print_messages(int i, json_value* e,  void *userdata)
+{
+    ecmwf_api* api = (ecmwf_api*)userdata;
+    if(api->verbose) printf("   ECMWF => %s\n",json_get_string(e));
+    api->offset = i+1;
+}
+
+
+static size_t headers_callback( void *ptr, size_t size, size_t nmemb, void *userdata)
+{
+    ecmwf_api* api = (ecmwf_api*)userdata;
+
+    char* p    = (char*)ptr;
+    char* q    = (char*)ptr;
+    int  count = size * nmemb;
+
+    while(count-->0) {
+        if(*p == ':') {
+            if(q == (char*)ptr) {
+                char *s = q;
+                *p = 0;
+                q = p;
+                if(strcasecmp("location",s) == 0)    {
+                    while(count-->0) {
+                        if(*p == '\r') {
+                            *p = 0;
+                            if(api->location_len < p - q) {
+                                free(api->location);
+                                api->location = NULL;
+                            }
+                            if(!api->location)  {
+                                api->location_len  = p - q;
+                                api->location = malloc(api->location_len);
+                                if(!api->location)
+                                {
+                                    api->error++;
+                                    return 0;
+                                }
+                            }
+                            strcpy(api->location, q+2);
+                            *p = '\n';
+                        }
+                        p++;
+                    }
+                }
+                if(strcasecmp("content-type",s) == 0)    {
+                    while(count-->0) {
+                        if(*p == '\r') {
+                            *p = 0;
+                            if(api->type_len < p - q) {
+                                free(api->type);
+                                api->type = NULL;
+                            }
+                            if(!api->type)  {
+                                api->type_len  = p - q;
+                                api->type = malloc(api->type_len);
+                                if(!api->type)
+                                {
+                                    api->error++;
+                                    return 0;
+                                }
+                            }
+                            strcpy(api->type, q+2);
+                            *p = '\n';
+                        }
+                        p++;
+                    }
+
+                    if(api->typecb) {
+                        api->typecb(api->type, api->typecb_data);
+                    }
+                }
+                if(strcasecmp("retry-after",s) == 0) {
+                    while(count-->0) {
+                        if(*p == '\r') {
+                            *p = 0;
+                            api->retry_wait = atol(q+2);
+                            *p = '\r';
+                        }
+                        p++;
+                    }
+                }
+                *q = ':';
+            }
+        }
+        p++;
+    }
+
+    return size*nmemb;
+
+}
+
+static void init(ecmwf_api* api, const char* method, const char* url)
+{
+    api->curl  = curl_easy_init();
+    api->error = 0;
+
+    if(!api->curl)
+    {
+        api->error++;
+        return;
+    }
+
+    _(curl_easy_setopt(api->curl, CURLOPT_VERBOSE, api->verbose));
+
+    _(curl_easy_setopt(api->curl, CURLOPT_URL, url));
+
+    api->chunk = curl_slist_append(api->chunk, "Accept: application/json");
+    api->chunk = curl_slist_append(api->chunk, "Content-Type: application/json");
+    api->chunk = curl_slist_append(api->chunk, "charsets: utf-8");
+    api->chunk = curl_slist_append(api->chunk, api->key);
+    api->chunk = curl_slist_append(api->chunk, api->email);
+
+#ifdef SKIP_PEER_VERIFICATION
+    _(curl_easy_setopt(api->curl, CURLOPT_SSL_VERIFYPEER, 0L));
+#endif
+
+#ifdef SKIP_HOSTNAME_VERIFICATION
+    _(curl_easy_setopt(api->curl, CURLOPT_SSL_VERIFYHOST, 0L));
+#endif
+
+    _(curl_easy_setopt(api->curl, CURLOPT_HTTPHEADER, api->chunk));
+    _(curl_easy_setopt(api->curl, CURLOPT_CUSTOMREQUEST, method));
+    _(curl_easy_setopt(api->curl, CURLOPT_USERAGENT, "mars/1.0"));
+
+
+}
+
+static void cleanup(ecmwf_api* api)
+{
+    /* always cleanup */
+    if(api->curl)
+        curl_easy_cleanup(api->curl);
+
+    if(api->chunk)
+        curl_slist_free_all(api->chunk);
+
+    api->curl  = NULL;
+    api->chunk = NULL;
+    api->pos   = 0;
+
+}
+
+const json_value* _ecmwf_api_call(ecmwf_api* api, const char* method, const char* url, const char *json)
+{
+
+    char buf[10240];
+
+    json_free(api->value);
+    api->value = NULL;
+
+    api->error = 0;
+
+    if(strcmp(method,"GET") == 0)
+    {
+        init(api, method, url);
+    }
+    else
+    {
+        sprintf(buf, "%s?offset=%d&limit=%d" , url, api->offset,api->limit);
+        init(api, method, buf);
+    }
+
+
+    if(json) {
+        _(curl_easy_setopt(api->curl, CURLOPT_POSTFIELDS, json));
+    }
+
+    api->pos  = 0;
+    _(curl_easy_setopt(api->curl, CURLOPT_HEADERFUNCTION , &headers_callback));
+    _(curl_easy_setopt(api->curl, CURLOPT_HEADERDATA , api));
+
+    _(curl_easy_setopt(api->curl, CURLOPT_WRITEFUNCTION, &write_callback));
+    _(curl_easy_setopt(api->curl, CURLOPT_WRITEDATA, api));
+
+    /* Perform the request, res will get the return code */
+    _(curl_easy_perform(api->curl));
+    _(curl_easy_getinfo (api->curl, CURLINFO_RESPONSE_CODE, &api->code));
+
+
+    api->value = json_parse_string(api->buffer,api->pos);
+    json_array_each(json_object_find(api->value,"messages"),print_messages,api);
+
+    cleanup(api);
+
+    return api->value;
+}
+
+const char* ecmwf_api_must_retry(ecmwf_api* api) {
+    int retry = 0;
+
+    switch(api->code)
+    {
+
+        case 301:
+        case 302:
+            printf("redirect to %s\n",api->location);
+            return api->location;
+            break;
+
+
+        case 503:
+            retry = 1;
+            break;
+
+    }
+
+    if(retry) {
+        fprintf(stderr,"ecmwf_api: error %ld, retrying...\n", api->code);
+        api->retry_count++;
+        sleep(60);
+
+        if(api->location_len < 10240) {
+            free(api->location);
+            api->location = NULL;
+        }
+        if(!api->location)  {
+            api->location_len  = 10240;
+            api->location = malloc(api->location_len);
+            if(!api->location)
+            {
+                api->error++;
+                return 0;
+            }
+        }
+
+        _(curl_easy_getinfo(api->curl,CURLINFO_EFFECTIVE_URL,api->location));
+        printf("retry %s\n",api->location);
+
+
+        return api->location;
+
+    }
+
+    return NULL;
+
+}
+
+const json_value* ecmwf_api_call(ecmwf_api* api, const char* method, const char* url, const char *json) {
+
+    char buffer[10240];
+    const json_value* v;
+    api->retry_count = 0;
+    const char *where = buffer;
+
+    if(api->url && url[0] == '/') {
+        sprintf( buffer, "%s%s" , api->url, url);
+    }
+    else
+    {
+        strcpy(buffer, url);
+    }
+
+    do {
+        v = _ecmwf_api_call(api, method, where, json);
+    }
+    while((where = ecmwf_api_must_retry(api)) != NULL);
+    return v;
+}
+
+ecmwf_api* ecmwf_api_create(const char *url, const char* key, const char *email)
+{
+    ecmwf_api* api = calloc(1,sizeof(ecmwf_api));
+    if(first) {
+        curl_global_init(CURL_GLOBAL_DEFAULT);
+        first = 0;
+    }
+    api->limit = 500;
+
+    if(key) {
+        api->key = malloc(strlen(key) + strlen("X-ECMWF-KEY: ") + 1);
+        sprintf(api->key, "X-ECMWF-KEY: %s", key);
+    }
+
+    if(email) {
+        api->email = malloc(strlen(email) + strlen("From: ") + 1);
+        sprintf(api->email, "From: %s", email);
+    }
+
+    if(url)
+        api->url = strdup(url);
+
+    return api;
+}
+
+void ecmwf_api_destroy(ecmwf_api* api)
+{
+    cleanup(api);
+    json_free(api->value);
+    api->value = NULL;
+    if(api->buffer)   free(api->buffer);
+    if(api->location) free(api->location);
+    if(api->type) free(api->type);
+    if(api->key) free(api->key);
+    if(api->email) free(api->email);
+    if(api->url) free(api->url);
+    free(api);
+    /* curl_global_cleanup(); */
+}
+
+int ecmwf_api_in_progress(ecmwf_api *api)
+{
+    return api->code == 202;
+}
+
+int ecmwf_api_transfer_ready(ecmwf_api *api)
+{
+    return api->code == 303;
+}
+
+void ecmwf_api_in_wait(ecmwf_api *api)
+{
+    if(api->retry_wait)
+        sleep(api->retry_wait);
+}
+
+const char* ecmwf_api_location(ecmwf_api *api)
+{
+    return api->location;
+}
+
+const char* ecmwf_api_content_type(ecmwf_api *api)
+{
+    return api->type;
+}
+
+int ecmwf_api_error(ecmwf_api *api)
+{
+    return api->error;
+}
+
+void ecmwf_api_verbose(ecmwf_api *api, int v)
+{
+    api->verbose = v;
+}
+
+long long ecmwf_api_transfer_start(ecmwf_api *api, const char* url, typeproc typecb, void* typecb_data)
+{
+
+    init(api, "GET", url);
+
+    if(!multi_handle)
+        multi_handle = curl_multi_init();
+
+    api->typecb = typecb;
+    api->typecb_data = typecb_data;
+
+    api->pos  = 0;
+    _(curl_easy_setopt(api->curl, CURLOPT_HEADERFUNCTION , &headers_callback));
+    _(curl_easy_setopt(api->curl, CURLOPT_HEADERDATA , api));
+
+    _(curl_easy_setopt(api->curl, CURLOPT_WRITEFUNCTION, &write_callback));
+    _(curl_easy_setopt(api->curl, CURLOPT_WRITEDATA, api));
+
+    _(curl_multi_add_handle(multi_handle, api->curl));
+
+    _(curl_multi_perform(multi_handle, &api->active));
+
+    if((api->pos == 0) && (!api->active)) {
+        curl_multi_remove_handle(multi_handle, api->curl);
+        api->error++;
+    }
+
+    return json_get_integer(json_object_find(api->value,"size"));
+
+}
+
+int ecmwf_api_transfer_end(ecmwf_api *api)
+{
+    curl_easy_getinfo (api->curl, CURLINFO_RESPONSE_CODE, &api->code);
+    cleanup(api);
+    if(api->code != 200)
+        marslog(LOG_EROR,"Transfer return code is %d", api->code);
+    return api->code == 200;
+}
+
+#endif
diff --git a/src/libMars/api.h b/src/libMars/api.h
new file mode 100644
index 0000000..5bb9748
--- /dev/null
+++ b/src/libMars/api.h
@@ -0,0 +1,37 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+#ifndef api_H
+#define api_H
+#include "json.h"
+
+typedef struct _ecmwf_api ecmwf_api;
+
+typedef void (*typeproc)(const char *type, void *data);
+
+ecmwf_api* ecmwf_api_create(const char *url, const char* key, const char *email);
+
+long long ecmwf_api_transfer (ecmwf_api *api, const char *url, const char *target);
+const json_value *ecmwf_api_call (ecmwf_api *api, const char *method, const char *url, const char *json);
+
+void ecmwf_api_destroy (ecmwf_api *api);
+int ecmwf_api_in_progress (ecmwf_api *api);
+int ecmwf_api_transfer_ready (ecmwf_api *api);
+void ecmwf_api_in_wait (ecmwf_api *api);
+const char *ecmwf_api_location (ecmwf_api *api);
+const char *ecmwf_api_content_type (ecmwf_api *api);
+
+long long ecmwf_api_transfer_start (ecmwf_api *api, const char *url, typeproc typecb, void *typecb_data);
+int ecmwf_api_transfer_end (ecmwf_api *api);
+size_t ecmwf_api_transfer_read(ecmwf_api *api, void*, size_t);
+const char* ecmwf_api_must_retry(ecmwf_api* api);
+
+void ecmwf_api_verbose(ecmwf_api* api, int on);
+
+#endif
diff --git a/src/libMars/apibase.c b/src/libMars/apibase.c
new file mode 100644
index 0000000..71dca9c
--- /dev/null
+++ b/src/libMars/apibase.c
@@ -0,0 +1,366 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ *
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
+ * In applying this licence, ECMWF does not waive the privileges and immunities
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "api.h"
+
+
+#ifndef NOCURL
+
+typedef struct apidata {
+    ecmwf_api* api;
+    char* last;
+    long long total;
+    long long length;
+    int tranfer;
+    double start;
+    char status[80];
+    int wmo;
+	int content_type_known;
+} apidata;
+
+static void apibase_init(void);
+
+static err     apibase_open(void *data,request*,request* env,int);
+static err     apibase_close(void *data);
+static err     apibase_read(void *data,request *r,void *buffer,long *length);
+static err     apibase_write(void *data,request *r,void *buffer,long *length);
+static err     apibase_cntl(void *data,int code,void *param,int size);
+static boolean apibase_check(void *data,request *r);
+static err     apibase_validate(void *data,request*,request*,int);
+
+static option opts[] = {
+    #if 0
+    {"host","MARS_api_HOST",NULL,"wms.ecmwf.int:443",t_str,
+     sizeof(char*),OFFSET(apidata,host)},
+
+    {"url","MARS_api_URL",NULL,"/services/mars/d/apibase",t_str,
+     sizeof(char*),OFFSET(apidata,url)},
+
+    {"openssl","MARS_api_OPENSSL",NULL,"/usr/local/openssl/bin/openssl",t_str,
+     sizeof(char*),OFFSET(apidata,openssl)},
+
+    {"proxy","MARS_api_PROXY",NULL,NULL/*"carbad:3333"*/,t_str,
+     sizeof(char*),OFFSET(apidata,proxy)},
+
+    #endif
+};
+
+static base_class _apibase_base = {
+
+    NULL,                          /* parent class */
+    "apibase",                     /* name         */
+
+    false,                         /* inited       */
+
+    sizeof(apidata),               /* private_size  */
+    NUMBER(opts),                  /* options_count */
+    opts,                          /* options       */
+
+    apibase_init,                  /* init          */
+
+    apibase_open,                  /* open          */
+    apibase_close,                 /* close         */
+
+    apibase_read,                  /* read          */
+    apibase_write,                 /* write         */
+
+    apibase_cntl,                  /* control       */
+
+    apibase_check,                 /* check         */
+
+    NULL,                      	   /* query        */
+
+    NULL,                          /* archive      */
+    NULL,                          /* admin        */
+
+    apibase_validate,              /* validate */
+
+};
+
+/* the only 'public' variable ... */
+
+base_class *apibase = &_apibase_base;
+
+static FILE* post_open(apidata*,const char*,const char*,const char*);
+
+static void apibase_init(void)
+{
+}
+
+static char* proxies[] = {"HTTP_PROXY",
+                          "FTP_PROXY",
+                          "HTTPS_PROXY",
+                          "http_proxy",
+                          "https_proxy",
+                          "no_proxy",
+                          "ftp_proxy",
+                         };
+
+
+static void typecb(const char* type, void *data)
+{
+    apidata* api = (apidata*)data;
+
+    marslog(LOG_INFO,"Type is %s", type);
+    if(strcmp(type,"application/x-grib") == 0 || strcmp(type,"application/x-bufr") == 0)
+    {
+        api->wmo = 1;
+    }
+    else
+    {
+        api->wmo = 0;
+    }
+	api->content_type_known = 1;
+}
+
+static err  apibase_open(void *data,request *r,request *env,int mode)
+{
+    apidata* api = (apidata*)data;
+    char path[PATH_MAX];
+    json_value* v;
+    const char* key , *email, *url;
+    char* tmp;
+    char* rs;
+    char *s;
+    int i;
+
+    sprintf(path,"%s/.ecmwfapirc", getenv("HOME"));
+    if(access(path,F_OK) == 0) {
+        v = json_read_file(path);
+
+        key   = json_get_string(json_object_find(v,"key"));
+        email = json_get_string(json_object_find(v,"email"));
+        url   = json_get_string(json_object_find(v,"url"));
+    }
+    else
+    {
+        marslog(LOG_EROR|LOG_PERR,"Cannot open %s", path);
+    }
+
+    if(!key) {
+        marslog(LOG_EROR,"API KEY is missing");
+        return -1;
+    }
+
+    if(!url) {
+        marslog(LOG_EROR,"API URL is missing");
+        return -1;
+    }
+
+    if(!email) {
+        marslog(LOG_EROR,"API EMAIL is missing");
+        return -1;
+    }
+
+
+    api->api = ecmwf_api_create(url, key, email);
+
+    marslog(LOG_INFO,"ECMWF API is at %s", url);
+
+    for(i = 0; i < NUMBER(proxies); i++) {
+        char *p = getenv(proxies[i]);
+        if(p) {
+            marslog(LOG_INFO,"Proxy settings: %s=%s", proxies[i], p);
+            if(*p && p[strlen(p) - 1] == '/') {
+                marslog(LOG_WARN,"Libcurl does not use proxy settings that finish with a '/'");
+            }
+        }
+    }
+
+    ecmwf_api_verbose(api->api, mars.debug);
+
+    v = ecmwf_api_call(api->api, "GET",  "/who-am-i", NULL);
+    if(!v) {
+        marslog(LOG_EROR,"API: Failed to get user information");
+        return -1;
+    }
+
+    marslog(LOG_INFO,"ECMWF user id is '%s'", json_get_string(json_object_find(v, "uid")));
+
+    v = ecmwf_api_call(api->api, "GET",  "/services/mars/news", NULL);
+
+    if((v != NULL) && ((v = json_object_find(v, "news")) != NULL)) {
+        char *p = strdup(json_get_string(v));
+        char *q = p;
+        char *tok = "\n";
+        while(strtok(p,tok)) {
+            marslog(LOG_INFO,"%s", p);
+            p = NULL;
+        }
+        free(q);
+    }
+
+    rs = request2string(r);
+    tmp = MALLOC(strlen(rs)*3);
+    v = ecmwf_api_call(api->api, "POST", "/services/mars/requests", json_encode_string(request2string(r), tmp));
+    FREE(tmp);
+
+    if(!v) {
+        marslog(LOG_EROR,"API: Failed to send request");
+        return -1;
+    }
+
+    marslog(LOG_INFO,"Request ID is %s", json_get_string(json_object_find(v, "name")));
+    s = json_get_string(json_object_find(v, "status"));
+    if(s && strcmp(s,api->status) != 0) {
+        strcpy(api->status,s);
+        marslog(LOG_INFO,"Request is %s", s);
+    }
+
+    api->last = strcache(ecmwf_api_location(api->api));
+
+    while(ecmwf_api_in_progress(api->api))
+    {
+        ecmwf_api_in_wait(api->api);
+        strfree(api->last);
+        api->last = strcache(ecmwf_api_location(api->api));
+        v = ecmwf_api_call(api->api, "GET",  ecmwf_api_location(api->api) , NULL);
+        if(!v) {
+            marslog(LOG_EROR,"API: Failed to get request status");
+            return -1;
+        }
+        s = json_get_string(json_object_find(v, "status"));
+        if(s && strcmp(s,api->status) != 0) {
+            strcpy(api->status,s);
+            marslog(LOG_INFO,"Request is %s", s);
+        }
+    }
+
+    if(!ecmwf_api_transfer_ready(api->api)) {
+        marslog(LOG_EROR,"API: Failed to initiate transfer");
+        return -1;
+    }
+
+    api->tranfer = 1;
+
+    url = ecmwf_api_location(api->api);
+
+    api->total  = 0;
+    api->length = ecmwf_api_transfer_start(api->api, url, typecb, api );
+
+    marslog(LOG_INFO,"Transfering %s from %s", bytename(api->length), url);
+    timer_start(get_timer("Transfer", NULL,0));
+    api->start = timer_value(get_timer("Transfer", NULL,0));
+
+    return 0;
+}
+
+static err  apibase_close(void *data)
+{
+    apidata* api = (apidata*)data;
+    int e = 0;
+    if(api->tranfer) {
+        timer_stop(get_timer("Transfer", NULL,0),api->length);
+        timer_partial_rate(get_timer("Transfer", NULL,0), api->start, api->length);
+        if(!ecmwf_api_transfer_end(api->api)) {
+            marslog(LOG_EROR,"API: Transfer failed");
+            e = -1;
+        }
+    }
+    if(api->last) {
+        ecmwf_api_call(api->api, "DELETE", api->last, NULL);
+        strfree(api->last);
+    }
+    ecmwf_api_destroy(api->api);
+
+    return e;
+}
+
+static long readcb(void *data, void *buffer, long len)
+{
+    apidata* api = (apidata*)data;
+
+    long size = ecmwf_api_transfer_read(api->api,buffer,len);
+    if(size > 0)
+        api->total += size;
+    return size?size:EOF;
+}
+
+static err  apibase_read(void *data,request *r,void *buffer,long *length)
+{
+    apidata* api = (apidata*)data;
+    size_t len = *length;
+
+	if(!api->content_type_known)
+	{
+		ecmwf_wait_for_data(api->api,1024);
+		if(!api->content_type_known) {
+			marslog(LOG_WARN,"apibase_read: Did not receive the header information");
+			return -12;
+		}
+
+	}
+
+
+    if(api->wmo) {
+        err ret =  wmo_read_any_from_stream(data,&readcb,buffer,&len);
+        *length = len;
+        return ret;
+    }
+    else
+    {
+        long size = ecmwf_api_transfer_read(api->api,buffer,len);
+        if(size > 0) {
+            *length = size;
+            api->total += size;
+            return 0;
+
+        }
+        return -1;
+    }
+}
+
+static err  apibase_write(void *data,request *r,void *buffer,long *length)
+{
+    return -1;
+}
+
+static err  apibase_list(void *data,request *r)
+{
+    return -1;
+}
+
+static err  apibase_cntl(void *data,int code,void *param,int size)
+{
+    switch(code)
+    {
+    case CNTL_LIST:
+        return -1;
+        /*NOTREACHED*/
+        break;
+
+    default:
+        return -1;
+        /*NOTREACHED*/
+        break;
+    }
+    return -1;
+}
+
+static boolean  apibase_check(void *data,request *r)
+{
+    return true;
+}
+
+static err apibase_validate(void *data, request *r, request *e, int mode)
+{
+    err ret = NOERR;
+
+    /*	if(net->validate)*/
+    /*		ret = validate_request(r,e,net->validate);*/
+
+    return ret;
+}
+
+#else
+extern base_class _nullbase;
+base_class *apibase = &_nullbase;
+#endif
diff --git a/src/libMars/archive.c b/src/libMars/archive.c
new file mode 100755
index 0000000..4d16145
--- /dev/null
+++ b/src/libMars/archive.c
@@ -0,0 +1,229 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+   B.Raoult
+   ECMWF Oct-93
+
+ */
+
+#include <errno.h>
+#include "mars.h"
+
+err feed(database *bout,request *r)
+{
+	extern base_class *netbase;
+	extern base_class *gribbase;
+	static long  buflen = 1024*800;
+	static char *buffer = NULL;
+	database   *bin;
+	int i;
+	int cnt = 0;
+	err ret;
+
+	bin  = database_open(gribbase,NULL,r,get_environ(),READ_MODE);
+	if(!bin) return -2;
+
+	if(!buffer) buffer = reserve_mem(buflen);
+
+	if(observation(r)) r = 0;
+
+	do
+	{
+		request *s = clone_all_requests(r);
+		long length = buflen;
+
+		ret = database_read(bin,s,buffer,&length);
+
+		if(ret == BUF_TO_SMALL)
+		{
+			release_mem(buffer);
+			buflen = length;
+			buffer = reserve_mem(buflen);
+
+			ret = 0;
+			database_close(bin);
+			bin  = database_open(gribbase,NULL,r,get_environ(),	
+					READ_MODE);
+
+			for(i=0;i<(cnt+1);i++)
+				ret = database_read(bin,s,buffer,&length);
+		}
+
+		if(ret == 0) {
+			ret = database_write(bout,s,buffer,&length);
+			cnt++;
+		}
+
+		free_all_requests(s);
+
+		if(ret == EOF)
+		{
+			ret = 0;
+			break;
+		}
+
+	}while(ret == 0);
+
+	database_close(bin);
+
+	marslog(LOG_INFO,"%d records fed to database '%s'",cnt,bout->name);
+
+	return ret;
+
+}
+
+static request* make_arc_request(const char *path)
+{
+	const char *x;
+	long buflen = 0;
+	long length = 0;
+	char *buffer;
+	request *a = empty_request("ARCHIVE");
+	err e;
+	int cnt = 0;
+
+	buflen = mars.readany_buffer_size;
+	length = buflen;
+
+	FILE *f = fopen(path,"r");
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"ARCHIVE : '%s'",path);
+		marsexit(1);
+	}
+
+	buffer = reserve_mem(length);
+	length = buflen;
+	while((e = _readany(f,buffer,&length)) == NOERR || (e == BUF_TO_SMALL))
+	{
+		request *g = empty_request(0);
+		grib_to_request(g,buffer,length);
+		reqmerge(a,g);
+		free_all_requests(g);
+		length = buflen;
+		cnt++;
+	}
+
+#if 0
+	x = get_value(a,"_RESOL",0);    if(x) add_value(a,"RESOL",x);
+	x = get_value(a,"_GAUSSIAN",0); if(x) add_value(a,"RESOL",x);
+	x = get_value(a,"_GRID_EW",0);  if(x) add_value(a,"RESOL","%d",
+			(int)(360.0/atof(x)));
+	x = get_value(a,"_GRID_NS",0);  if(x) add_value(a,"RESOL","%d",
+			(int)(360.0/atof(x)));
+#endif
+
+	set_value(a,"EXPECT","%d",cnt);
+
+	return a;
+}
+
+err handle_archive(request *r,void *data)
+{
+	int i    = 0;		
+	err e = 0;
+	const char *s  = 0;
+
+	mars.fields_are_ok = true;
+	mars.fields_in_order = true;
+	mars.fields_have_same_size = true;
+
+	if(mars.autoarch)
+	{
+		const char *s = no_quotes(get_value(r,"SOURCE",0));
+		request *a = make_arc_request(s);
+
+		if(mars.autoarch != 2)
+		{
+			unset_value(r,"CLASS");
+			unset_value(r,"TYPE");
+			unset_value(r,"STREAM");
+			unset_value(r,"EXPVER");
+			unset_value(r,"LEVTYPE");
+			unset_value(r,"LEVELIST");
+			unset_value(r,"REPRES");
+			unset_value(r,"DOMAIN");
+			unset_value(r,"PARAM");
+			unset_value(r,"DATE");
+			unset_value(r,"TIME");
+			unset_value(r,"STEP");
+			unset_value(r,"DISP");
+			unset_value(r,"RESOL");
+			unset_value(r,"NUMBER");
+			unset_value(r,"METHOD");
+			unset_value(r,"SYSTEM");
+		}
+
+		reqcpy(r,a);
+		free_all_requests(a);
+
+		marslog(LOG_INFO,"Archive request changed to: ");
+		print_one_request(r);
+	}
+
+	while( s = get_value(r,"DATABASE",i++) )
+	{
+		database   *base;
+		const char *name = 0;
+		request    *cache = 0;
+		int retry = 0;
+		int slp = 1;
+
+		request *b = findbase(s);
+		if(!b) return -2;
+
+		for(;;)
+		{
+
+			base = openbase(b,r,&name,&cache,WRITE_MODE);
+			if(base) {
+				e = database_archive(base,r);
+				marslog(LOG_INFO,"database_archive return %d", e);
+				database_close(base);
+			} else e = -2;
+
+			if(e != RETRY_FOREVER_ERR && e != RETRY_ERR)
+				break;
+
+			if(e == RETRY_ERR)
+			{
+				if(retry<mars.maxretries)
+				{
+					retry++;
+					marslog(LOG_WARN,"Sleeping %d minutes",slp);
+					sleep(slp*60);
+				}
+				else
+				{
+					e = -2;
+					marslog(LOG_WARN,"Giving up after %d retries",retry);
+					break;
+				}
+			}
+
+			if(e == RETRY_FOREVER_ERR)
+			{
+				if(slp<5) 
+					slp += 1;
+				marslog(LOG_WARN,"Sleeping %d minutes",slp);
+				sleep(slp*60);
+			}
+
+		}
+
+		if(e != 0)
+			break;
+
+	}
+
+	return e;
+}
diff --git a/src/libMars/authenticate.c b/src/libMars/authenticate.c
new file mode 100644
index 0000000..f00421d
--- /dev/null
+++ b/src/libMars/authenticate.c
@@ -0,0 +1,985 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <time.h>
+#include <sys/time.h>
+#include <grp.h>
+
+/* All possible categories in a restriction */
+const char *names[] = {
+	"user",
+	"group",
+	"host",
+	"domain",
+};
+
+/* For validation date/time computation */
+typedef struct marsdate {
+	int date;
+	int time;
+} marsdate;
+
+/* Restriction handler */
+typedef int  (*restrictproc) (request*,request*,request*,void*);
+
+typedef struct restriction_handler {
+	const char  *name;
+	restrictproc proc;
+} restriction_handler;
+
+static const char* alias2group(const char* alias)
+{
+	static request *aliases = 0;
+
+	if(!aliases)
+		aliases = empty_request("alias");
+
+	if(count_values(aliases,alias) == 0)
+	{
+		struct group *grmain = 0;
+		gid_t gid;
+		char grname[1024];
+
+		if( (grmain = getgrnam(alias)) != NULL)
+		{
+			gid = grmain->gr_gid;
+			strcpy(grname,grmain->gr_name);
+
+			setgrent();
+			while (grmain = getgrent())
+				if(gid == grmain->gr_gid)
+					if(strlen(grname) > strlen(grmain->gr_name))
+					{
+						gid = grmain->gr_gid;
+						strcpy(grname,grmain->gr_name);
+					}
+
+			endgrent();
+			set_value(aliases,alias,grname);
+			marslog(LOG_DBUG,"unalias: %s to %s",alias,grname);
+		}
+		else
+		{
+			marslog(LOG_WARN,"unknown group '%s'. Setting to 'unknown'",alias);
+			set_value(aliases,alias,"unknown");
+		}
+	}
+
+	return get_value(aliases,alias,0);
+}
+
+/* SIMPLE restriction */
+static int handle_simple(request *req, request *restriction, request* reply, void *data)
+{
+    const char *par = get_value(restriction,"param",0);
+    const char *val = get_value(restriction,"value",0);
+	boolean    match = false;
+
+    int i   = 0;
+    const char *v = 0;
+
+	marslog(LOG_DBUG,"Handle simple par=%s, val=%s",par,val);
+	if(is_number(val))
+	{
+		while((v = get_value(req,par,i++)) != 0)
+			if(atoi(v) == atoi(val))
+				match = true;
+	}
+	else
+		while((v = get_value(req,par,i++)) != 0)
+			if(strcmp(val,upcase(v)) == 0)
+				match = true;
+
+    return match;
+}
+/* end of SIMPLE restriction */
+
+/* NOT restriction */
+static int handle_not(request *req, request *restriction, request* reply, void *data)
+{
+    const char *par = get_value(restriction,"param",0);
+    const char *val = get_value(restriction,"value",0);
+	boolean    match = false;
+
+    int i   = 0;
+    const char *v = 0;
+
+	marslog(LOG_DBUG,"Handle not par=%s, val=%s",par,val);
+	if(is_number(val))
+	{
+		while((v = get_value(req,par,i++)) != 0)
+			if(atoi(v) != atoi(val))
+				match = true;
+	}
+	else
+		while((v = get_value(req,par,i++)) != 0)
+			if(strcmp(val,upcase(v)) != 0)
+				match = true;
+
+	/* The parameter is not found in the request */
+	if(v == 0 && i == 1)
+		match = true;
+
+    return match;
+}
+/* end of NOT restriction */
+
+/* DATE restriction */
+static void marsdates(request *r, marsdate* max, marsdate *min, marsdate* today, boolean include_step)
+{
+	int i;
+	int v;
+	int maxstep = 0;
+	int minstep = INT_MAX;
+	int steps   = count_values(r,"STEP");
+	int fcmonth_days = 0;
+
+	time_t now;
+	struct tm *t;
+
+	if(!steps || !include_step)
+	{
+		/* the case of observations */
+		maxstep = 0;
+		minstep = 0;
+	}
+	else
+		for(i=0;i<count_values(r,"STEP");i++)
+		{
+			int n = atoi(get_value(r,"STEP",i));
+			if(n>maxstep) maxstep = n;
+			if(n<minstep) minstep = n;
+		}
+
+	for(i=0;i<count_values(r,"DATE");i++)
+	{
+		const char* p = get_value(r,"DATE",i);
+		int n;
+		if(is_number(p))
+			n = atoi(p);
+		else
+		{
+			long julian = 0,second = 0; boolean isjul;
+			parsedate(p,&julian,&second,&isjul);
+			n = julian_to_date(julian,mars.y2k);
+		}
+		if(n>max->date) max->date = n;
+		if(n<min->date) min->date = n;
+	}
+
+	/* Consider 30 day months */
+	for(i=0;i<count_values(r,"FCMONTH");i++)
+	{
+		const char* p = get_value(r,"FCMONTH",i);
+		int n = atoi(p) * 30;
+		if(n>fcmonth_days) fcmonth_days = n;
+	}
+
+	for(i=0;i<count_values(r,"TIME");i++)
+	{
+		const char *time = get_value(r,"TIME",i);
+		/* when a range of times is not expanded */
+		if(is_number(time))
+		{
+			int n = atoi(get_value(r,"TIME",i));
+			if(n>max->time) max->time = n;
+			if(n<min->time) min->time = n;
+		}
+	}
+
+	v = date_to_julian(max->date) + (max->time/100 + maxstep)/24;
+	if(mars.valid_data_includes_fcmonth)
+		v += fcmonth_days;
+	max->date=julian_to_date(v,mars.y2k);
+	max->time=(max->time/100 + maxstep)%24;
+
+	v = date_to_julian(min->date) + (min->time/100 + minstep)/24;
+	min->date=julian_to_date(v,mars.y2k);
+	min->time=(min->time/100 + minstep)%24;
+
+	time(&now);
+	t = gmtime(&now);
+
+	today->date = (t->tm_year+1900) * 10000 + (t->tm_mon+1)* 100 + t->tm_mday;
+	today->time = t->tm_hour;
+}
+
+static int handle_date(request *req, request *restriction, request *reply, void *data)
+{
+	int      hours = atoi(get_value(restriction,"value",0));
+	const char *param = get_value(restriction,"param",0);
+	boolean reverse = (param != 0) && (strcmp(param,"ETAD")==0);
+	marsdate max   = { 0,0,};
+	marsdate min   = {INT_MAX, INT_MAX,};
+	marsdate today = { 0,0,};
+	const char *type = get_value(req,"TYPE",0);
+	boolean include_step = true;
+
+	marslog(LOG_DBUG,"Handle date par=%s, val=%d",param,hours);
+	/* Climatology does not have a date, and no restrictions */
+	if(type && EQ(type,"CL"))
+		return false;
+
+	marsdates(req,&max,&min,&today,include_step);
+
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG,"Maximum date %d, time %d",max.date,max.time);
+		marslog(LOG_DBUG,"Minimum date %d, time %d",min.date,min.time);
+		marslog(LOG_DBUG,"Now date %d, time %d",today.date,today.time);
+	}
+
+	if(reverse)
+	{
+		/* long requestdate   = (min.date + (min.time+hours)/24)*100 + (min.time + hours)%24; */
+		int reqjulian      = date_to_julian(min.date)+ (min.time + hours)/24;
+		long requestdate   =  julian_to_date(reqjulian,mars.y2k)*100 + (min.time + hours)%24;
+		long todaydate     = today.date*100 +today.time; 
+		if((requestdate) <= (todaydate))
+		{
+			marslog(LOG_DBUG,"requestdate (%ld) <= todaydate (%ld)",requestdate,todaydate);
+			return true;
+		}
+	}
+	else
+	{
+		int reqjulian      = date_to_julian(max.date)+ (max.time + hours)/24;
+		long requestdate   =  julian_to_date(reqjulian,mars.y2k)*100 + (max.time + hours)%24;
+
+		/* long requestdate   = (max.date + (max.time + hours)/24)*100 + (max.time + hours)%24; */
+		long todaydate     = today.date*100 +today.time;
+
+		if(requestdate >= todaydate)
+		{
+			marslog(LOG_DBUG,"requestdate (%ld) >= todaydate (%ld)",requestdate,todaydate);
+			return true;
+		}
+	}
+
+	return false;
+}
+/* end of DATE restriction */
+
+static int handle_basetime(request *req, request *restriction, request *reply, void *data)
+{
+	int      hours = atoi(get_value(restriction,"value",0));
+	marsdate max   = { 0,0,};
+	marsdate min   = {INT_MAX, INT_MAX,};
+	marsdate today = { 0,0,};
+	const char *type = get_value(req,"TYPE",0);
+	boolean  include_step = false;
+
+	marslog(LOG_DBUG,"Handle basetime val=%d",hours);
+	/* Climatology does not have a date, and no restrictions */
+	if(type && EQ(type,"CL"))
+		return false;
+
+	marsdates(req,&max,&min,&today,include_step);
+
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG,"Maximum date %d, time %d",max.date,max.time);
+		marslog(LOG_DBUG,"Minimum date %d, time %d",min.date,min.time);
+		marslog(LOG_DBUG,"Now date %d, time %d",today.date,today.time);
+	}
+
+	{
+		int reqjulian      = date_to_julian(max.date)+ (max.time + hours)/24;
+		long requestdate   =  julian_to_date(reqjulian,mars.y2k)*100 + (max.time + hours)%24;
+
+		/* long requestdate   = (max.date + (max.time + hours)/24)*100 + (max.time + hours)%24; */
+		long todaydate     = today.date*100 +today.time;
+
+		if(requestdate >= todaydate)
+		{
+			marslog(LOG_DBUG,"requestdate (%ld) >= todaydate (%ld)",requestdate,todaydate);
+			return true;
+		}
+	}
+
+	return false;
+}
+/* end of DATE restriction */
+
+
+typedef struct seasonaldate_ {
+	long  date;
+	long  yyyymm;
+	long  dd;
+	float dayofmonth;
+	long  time;
+} seasonaldate ;
+
+/* DAYOFMONTH restriction */
+static int handle_dayofmonth(request *r, request *restriction, request *reply, void *d)
+{
+	float  dayofmonth = atof(get_value(restriction,"value",0));
+	time_t now;
+	struct tm *t;
+	seasonaldate today;
+	seasonaldate data;
+	int i = 0;
+
+	marslog(LOG_DBUG,"Handle dayofmonth %f",dayofmonth);
+
+	/* Get GMT date/time, not localtime (to avoid users manipulate TZ env. variable) */
+	time(&now);
+	t = gmtime(&now);
+
+	today.yyyymm = (t->tm_year+1900) * 100 + (t->tm_mon+1);
+	today.dd     = t->tm_mday;
+	today.time   = t->tm_hour;
+	today.dayofmonth = (float)t->tm_mday + (float)today.time/24.0; 
+
+	/* Get data's date */
+	data.date = -1;
+	for(i=0;i<count_values(r,"DATE");i++)
+	{
+		const char* p = get_value(r,"DATE",i);
+		int n;
+		if(is_number(p))
+			n = atoi(p);
+		else
+		{
+			long julian = 0,second = 0; boolean isjul;
+			parsedate(p,&julian,&second,&isjul);
+			n = julian_to_date(julian,mars.y2k);
+		}
+		if(n>data.date) data.date = n;
+	}
+
+	/* Get data's time */
+	data.time=-1;
+	for(i=0;i<count_values(r,"TIME");i++)
+	{
+		const char *time = get_value(r,"TIME",i);
+		if(is_number(time))
+		{
+			int n = atoi(get_value(r,"TIME",i));
+			if(n>data.time) data.time = n;
+		}
+	}
+
+	data.yyyymm = (int)(data.date/100);
+	data.dd     = (int)(data.date%100);
+
+
+	marslog(LOG_DBUG,"Today's month %ld",today.yyyymm);
+	marslog(LOG_DBUG,"Data's month %ld",data.yyyymm);
+	marslog(LOG_DBUG,"Today's dayofmonth %lf",today.dayofmonth);
+	marslog(LOG_DBUG,"Restriction's dayofmonth %lf",dayofmonth);
+	/* The logic: 
+	   Note that data in the future, ie (today.yyyymm < data.yyyymm), is always restricted */
+	if( (today.yyyymm > data.yyyymm) ||
+		((today.yyyymm == data.yyyymm) && (today.dayofmonth >= dayofmonth)))
+	{
+		marslog(LOG_DBUG,"Data is not restricted");
+		return false;
+	}
+
+	marslog(LOG_DBUG,"Data is RESTRICTED");
+	return true;
+}
+/* end of DAYOFMONTH restriction */
+
+
+/* AND restriction */
+static int handle_and(request *req, request *restriction, request *reply, void *data)
+{
+	request *left  = get_subrequest(restriction,"left",0);
+	request *right = get_subrequest(restriction,"right",0);
+
+	boolean ll = handle_restriction(req,left,reply,data);
+	boolean rr = handle_restriction(req,right,reply,data);
+
+	free_all_requests(left);
+	free_all_requests(right);
+
+	if(ll && rr)
+		return true;
+
+	return false;
+}
+/* end of AND restriction */
+
+/* FILTER restriction */
+static int handle_filter(request *req, request *restriction, request *reply, void *data)
+{
+    const char *par = get_value(restriction,"param",0);
+    const char *val = get_value(restriction,"value",0);
+	boolean found = false;
+
+    int i   = 0;
+    const char *v = 0;
+
+	marslog(LOG_DBUG,"Handle filter par=%s, val=%s",par,val);
+	if(is_number(val))
+	{
+		while((v = get_value(req,par,i++)) != 0 && !found)
+			if(atoi(v) == atoi(val))
+				found = true;
+	}
+	else
+		while((v = get_value(req,par,i++)) != 0 && !found)
+			if(strcmp(val,upcase(v)) == 0)
+				found = true;
+
+	if(found)
+	{
+		set_value(reply,"filter",par);
+		add_value(reply,"filter",val);
+	}
+    return false;
+}
+/* end of FILTER restriction */
+
+
+/* FILTEROUT restriction */
+static int handle_filterout(request *req, request *restriction, request *reply, void *data)
+{
+    const char *par = get_value(restriction,"param",0);
+    const char *val = 0;
+	int i = 0;
+	request *filter = 0;
+
+	marslog(LOG_DBUG,"Handle filterout par=%s",par);
+	/* If the request does not contain the parameter, stop here */
+	if(count_values(req,par) == 0)
+		return false;
+
+	filter = empty_request(par);
+
+	/* For each value in the request, check whether it is restricted */
+	while((val = get_value(req,par,i++)) != NULL)
+	{
+		int j = 0;
+		const char *vrestr = 0;
+		boolean found = false;
+
+		if(is_number(val))
+		{
+			int v = atoi(val);
+			while(!found && (vrestr = get_value(restriction,"value",j++)) != NULL)
+				found = (v == atoi(vrestr));
+		}
+		else
+			while(!found && (vrestr = get_value(restriction,"value",j++)) != NULL)
+				found = (strcmp(upcase(val),vrestr)==0);
+			
+
+		if(found)
+			add_value(filter,"remove","%s",val);
+		else
+			add_value(filter,"keep","%s",val);
+
+	}
+
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG,"Filter out the following request:");
+		print_all_requests(filter);
+	}
+
+	/* Set the values not found in the restriction */
+	if(count_values(filter,"keep") != 0)
+	{
+		valcpy(req,filter,(char *)par,"keep");
+	}	
+	else
+	{
+		marslog(LOG_WARN,"Values provided for %s are restricted",(char *)par);
+		/* marslog(LOG_EXIT,"Please, contact User Support for any queries"); */
+		set_value(filter,"accept","no");
+		return true;
+	}
+
+	free_all_requests(filter);
+
+    return false;
+}
+/* end of FILTEROUT restriction */
+
+static restriction_handler handlers[] = {
+	{ "simple",    handle_simple},
+	{ "not",       handle_not},
+	{ "date",      handle_date},
+	{ "and",       handle_and,},
+	{ "filter",    handle_filter,},
+	{ "filterout", handle_filterout,},
+	{ "dayofmonth",handle_dayofmonth,},
+	{ "hoursfrombasetime",  handle_basetime,},
+};
+
+boolean handle_restriction(request *req, request *r, request *reply, void *data)
+{
+	int i = 0;
+	request *restriction = r;
+
+	while(restriction)
+	{
+		restrictproc handler = 0;
+		for(i=0;i<NUMBER(handlers) && !handler;i++)
+			if(strcmp(handlers[i].name,restriction->name)==0)
+				handler = handlers[i].proc;
+
+		if(handler)
+		{
+			if(handler(req,restriction,reply,data))
+			{
+				const char *info = no_quotes(get_value(restriction,"info",0));
+				const char *url = get_value(restriction,"url",0);
+				set_value(reply,"accept","no");
+				if(info)
+					set_value(reply,"info","restricted access to %s data.",info);
+				if(url)
+				{
+					set_value(reply,"url","For more information, look at ");
+					add_value(reply,"url","%s.",url);
+				}
+				return true;
+			}
+		}
+		else
+		{
+			FILE *f  = mail_open("mar","Mars account internal error");
+			mail_msg(f,"Internal error. No handler for restriction '%s'",restriction->name);
+			mail_request(f,"Restriction rule:",restriction);
+			mail_close(f);
+		}
+		restriction = restriction->next;
+	}
+
+	set_value(reply,"accept","yes");
+	set_value(reply,"reqid","-1");
+	return false;
+}
+
+static request* mars_environment(request *environ, request *r)
+{
+	request *defaults  = 0;
+	int     nameidx   = 0;
+	request *nenviron = 0;
+
+	defaults = r;
+	while(defaults)
+	{
+		const char *category = names[nameidx];
+
+		if(strcmp(defaults->name,"default") == 0)
+		{
+			const char *restricted = 0;
+			int i = 0;
+
+			/* Scan all categories */
+			while((restricted = get_value(defaults,category,i++)) != 0)
+			{
+				const char *user = 0;
+				int j = 0;
+				if(strcmp(restricted,"*") == 0)
+				{
+					nenviron = clone_one_request(environ);
+					return nenviron;
+				}
+
+				while((user = get_value(environ,category,j++)) != 0)
+				{
+					if(category == names[1])
+						user = alias2group(user);
+						
+					if(strcmp(restricted,user) == 0)
+					{
+						const char *marsrest = 0;
+						int k = 0;
+
+						/* Create MARS environment with MARS restrictions */
+						/* except those to which the user belong          */
+						nenviron = empty_request("environ");
+						while((marsrest = get_value(defaults,"restriction",k++)) != 0)
+						{
+							const char *marsgroup = 0;
+							int l = 0;
+							boolean belong = false;
+
+							/* Check if user belongs to the restriction group */
+							while((marsgroup = get_value(environ,"group",l++)) != 0 && !belong)
+								if(strcmp(alias2group(marsgroup),marsrest) == 0)
+									belong = true;
+
+							/* If not in this group, the restriction applies */
+							if(!belong)
+								add_value(nenviron,"group",marsrest);
+						}
+						return nenviron;
+					}
+				}
+			}
+		}
+
+		defaults = defaults->next;
+		if(!defaults && (++nameidx < NUMBER(names)))
+			defaults = r;
+	}
+
+	return nenviron;
+}
+
+static request* mars_ems_categories(request *environ, request *r)
+{
+	request *rule  = 0;
+	request *nenviron = empty_request("environ");
+
+
+	rule = r;
+	while(rule)
+	{
+		if(strcmp(rule->name,"rule") == 0)
+		{
+			const char *rulcat = 0;
+			int i = 0;
+			int match = 0;
+
+
+			/* Scan all categories */
+			while((rulcat = get_value(rule,"category",i++)) != 0 && !match)
+			{
+				const char *usercat = 0;
+				int j = 0;
+
+				while((usercat = get_value(environ,"category",j++)) != 0 && !match)
+				{
+					if(strcmp(rulcat,usercat) == 0)
+					{
+						if(mars.debug)
+						{
+							marslog(LOG_DBUG,"Got match on '%s'",rulcat);
+							print_one_request(environ);
+							print_one_request(rule);
+						}
+						match++;
+					}
+				}
+			}
+
+			if(match)
+			{
+				const char *p = 0;
+				int k = 0;
+				while((p = get_value(rule,"restrict",k++)) != 0)
+					add_unique_value(nenviron,"group",p);
+			}
+		}
+		rule = rule->next;
+	}
+
+	rule = r;
+	while(rule)
+	{
+		if(strcmp(rule->name,"rule") == 0)
+		{
+			const char *rulcat = 0;
+			int i = 0;
+			int match = 0;
+
+
+			/* Scan all categories */
+			while((rulcat = get_value(rule,"category",i++)) != 0 && !match)
+			{
+				const char *usercat = 0;
+				int j = 0;
+
+				while((usercat = get_value(environ,"category",j++)) != 0 && !match)
+				{
+					if(strcmp(rulcat,usercat) == 0)
+					{
+						if(mars.debug)
+						{
+							marslog(LOG_DBUG,"Got match on '%s'",rulcat);
+							print_one_request(environ);
+							print_one_request(rule);
+						}
+						match++;
+					}
+				}
+			}
+
+			if(match)
+			{
+				const char *p = 0;
+				int k = 0;
+				while((p = get_value(rule,"grant",k++)) != 0)
+				{
+					if(strcmp(p,"all") == 0)
+					{
+						unset_value(nenviron,"group");
+						return nenviron;
+					}
+					unset_param_value(nenviron,"group",p);
+				}
+
+			}
+		}
+		rule = rule->next;
+	}
+
+	return nenviron;
+}
+
+static void validate_user(request *req, request *env, request *reply)
+{
+	static request *r = 0;
+	request *restriction = 0;
+	request *access      = 0;
+	int     nameidx = 0;
+	int     i       = 0;
+	int     j       = 0;
+	request *environ = 0;
+	
+	if(!r) r = read_request_file(mars.authfile);
+
+	if(get_value(env,"category",0) != NULL)
+	{
+		environ = mars_ems_categories(env,r);
+	}
+	else
+	{
+		/* Get 'default' mars restrictions */
+		environ = mars_environment(env,r);
+	}
+
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG,"Default mars environment");
+		if(environ)
+			print_all_requests(environ);
+		else
+			marslog(LOG_DBUG,"(empty)");
+	}
+
+	if(!environ)
+	{
+		set_value(reply,"accept","no");
+		set_value(reply,"info","User is not registered");
+
+		return;
+	}
+
+	/* Scan restriction requests, following 'names' order */
+	access = r;
+	while(access)
+	{
+		const char *category = names[nameidx];
+		const char *restricted = 0;
+
+		if(strcmp(access->name,"access") == 0)
+		{
+
+			i = 0;
+			/* Scan a given category */
+			while((restricted = get_value(access,category,i++)) != 0)
+			{
+				const char *user = 0;
+				j = 0;
+				while((user = get_value(environ,category,j++)) != 0)
+				{
+					if(strcmp(restricted,user) == 0)
+					{
+						request *more = get_subrequest(access,"restriction",0);
+						if(!restriction)
+							restriction = more;
+						else
+						{
+							request *s = restriction;
+							while(s->next) s = s->next;
+							s->next = more;
+						}
+					}
+				}
+			}
+		}
+
+		access = access->next;
+		if(!access && (++nameidx < NUMBER(names)))
+			access = r;
+	}
+	
+	handle_restriction(req,restriction,reply,NULL);
+
+	if(restriction)
+		free_all_requests(restriction);
+
+	if(environ)
+		free_all_requests(environ);
+}
+
+static request *change_environment(request *real)
+{
+	const char *useTest    = getenv("MARS_ENV");
+	const char *who        = get_value(real,"user",0);
+
+	if(!who || !EQ(who,"max"))
+		return 0;
+
+	if(useTest)
+	{
+		request *s = read_request_file(useTest);
+		marslog(LOG_WARN,"User %s has changed the environment",who);
+		print_all_requests(s);
+		return s;
+	}
+	return 0;
+}
+
+err local_validate_request(request *req, request *env)
+{
+	request *reply   = empty_request("reply");
+	err     ret      = 0;
+	const char *p    = 0;
+
+	validate_user(req,env,reply);
+
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG,"Environment:");
+		print_all_requests(env);
+		marslog(LOG_DBUG,"Authentication:");
+		print_all_requests(reply);
+	}
+
+	p = get_value(reply,"accept",0);
+	if(p && (*p == 'n'))
+	{
+		int i = 0;
+
+		marslog(LOG_EROR,"Request validation failed:");
+		while(p = get_value(reply,"info",i++))
+			marslog(LOG_EROR,"%s",p);
+
+		i=0;
+		while(p = get_value(reply,"url",i++))
+			marslog(LOG_EROR,"%s",p);
+
+		marslog(LOG_EROR,"For any queries, please, contact User Support");
+		ret = -2;
+	}
+
+	p = get_value(reply,"filter",0);
+	if(p) mars.restriction = true;
+
+	p = get_value(reply,"reqid",0);
+	if(p) mars.request_id = atol(p);
+	set_value(req,"_REQID","%ld",mars.request_id);
+
+	if(ret)
+	{
+		FILE *f = mail_open(mars.authmail,"Mars account failure");
+		const char *inf = 0;
+		int k = 0;
+		while((inf = get_value(reply,"info",k++)) != 0)
+			mail_msg(f,"%s",inf);
+		mail_request(f,"MARS Environment:",env);
+		mail_request(f,"MARS Request:",req);
+		mail_close(f);
+	}
+
+	free_all_requests(reply);
+
+	return ret;
+}
+
+void print_user_restrictions(request *env, request *auth)
+{
+	request *environ     = 0;
+	request *access      = 0;
+	request *restriction = 0;
+	int      nameidx     = 0;
+
+	if(!env)
+	{
+		marslog(LOG_EROR,"Empty environment");
+		return;
+	}
+	
+	if(!auth)
+	{
+		marslog(LOG_EROR,"Empty authentication file");
+		return;
+	}
+	
+	environ = mars_environment(env,auth);
+	if(!environ)
+	{
+		const char *user = get_value(env,"user",0);
+		if(user)
+			printf("User '%s' is not registered\n",user);
+		return;
+	}
+
+	access = auth;
+	while(access)
+	{
+		const char *category = names[nameidx];
+		const char *restricted = 0;
+
+		if(strcmp(access->name,"access") == 0)
+		{
+			int i = 0;
+			/* Scan a given category */
+			while((restricted = get_value(access,category,i++)) != 0)
+			{
+				const char *user = 0;
+				int j = 0;
+				while((user = get_value(environ,category,j++)) != 0)
+				{
+					if(strcmp(restricted,user) == 0)
+					{
+						static boolean z00 = false;
+						if(strcmp(restricted,"mars0z")==0)
+							z00 = true;
+						if(! (strcmp(restricted,"mars0a") == 0 && z00))
+						{
+							request *more = get_subrequest(access,"restriction",0);
+							if(!restriction)
+								restriction = more;
+							else
+							{
+								request *s = restriction;
+								while(s->next) s = s->next;
+								s->next = more;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		access = access->next;
+		if(!access && (++nameidx < NUMBER(names)))
+			access = auth;
+	}
+
+	if(restriction)
+	{
+		request *r = restriction;
+		printf("User '%s' has restricted/filtered access to the following MARS data :\n",get_value(env,"user",0));
+		while(r)
+		{
+			const char *msg = get_value(r,"info",0);
+			if(msg)
+				printf("  - %s\n",msg);
+			r = r->next;
+		}
+	}
+	else
+	{
+		printf("User '%s' has unrestricted access to MARS data\n",get_value(env,"user",0));
+	}
+}
+
diff --git a/src/libMars/base.c b/src/libMars/base.c
new file mode 100755
index 0000000..48be500
--- /dev/null
+++ b/src/libMars/base.c
@@ -0,0 +1,266 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+*/
+
+#include "mars.h"
+#include "base.h"
+#ifdef sgi
+#include <bstring.h>
+#endif
+
+/* extern base_class *cachebase; */
+extern base_class *netbase;
+extern base_class *nfdbbase;
+extern base_class *filebase;
+extern base_class *targetbase;
+extern base_class *nullbase;
+extern base_class *dhsbase;
+extern base_class *flatfilebase;
+extern base_class *multibase;
+extern base_class *apibase;
+extern base_class *odbbase;
+
+static base_class **bases[] = {
+	&nullbase,
+	&targetbase,
+	&filebase,
+#ifdef ECMWF
+#ifndef NOFDB
+	&nfdbbase,
+#endif
+#endif
+	&odbbase,
+	&netbase,
+	/* &cachebase, */
+	&dhsbase,
+	&flatfilebase,
+	&multibase,
+    &apibase,
+};
+
+static database* open_db = 0;
+
+base_class *base_class_by_name(const char *name)
+{
+	int i;
+
+	for(i=0;i<NUMBER(bases);i++)
+		if(strcasecmp(name,(*bases[i])->name)==0)
+			return *bases[i];
+
+	marslog(LOG_EROR,"Cannot find base class named '%s'",name);
+	/* return NULL; */
+	return nullbase; /* return nullbase, so request can progress */
+}
+
+static database* new_database(base_class *driver,const char *name)
+{
+	database   *b;
+
+	if(driver == NULL) return NULL;
+
+	b = NEW_CLEAR(database);
+
+	if(!driver->inited)
+	{
+		if(driver->init) driver->init();
+		driver->inited = true;
+	}
+
+	b->next   = open_db;
+	b->driver = driver;
+	b->name   = strcache(name);
+
+	if(driver->private_size)
+	{
+		b->data   = MALLOC(driver->private_size);
+		bzero(b->data,(driver->private_size));
+
+		get_options(driver->name,name,
+		    b->data,driver->options_count,driver->options);
+	}
+
+	open_db = b;
+
+	return b;
+}
+
+static void free_database(database *b)
+{
+	database *p = open_db;
+	database *q = 0;
+	while(p)
+	{
+		if(p == b)
+		{
+			if(q) q->next = b->next;
+			else  open_db = b->next;
+			break;
+		}
+		q = p;
+		p = p->next;
+	}
+
+	if(b->data) FREE(b->data);
+	strfree(b->name);
+	FREE(b);
+}
+
+database *database_of(void *data)
+{
+	database* d = open_db;
+	while(d)
+	{
+		if(d->data == data)
+			return d;
+		d = d->next;
+	}
+	return 0;
+}
+
+const char* database_name(void *data)
+{
+	database* d = database_of(data);
+	return d?d->name:"<unknown>";
+}
+
+
+err database_validate(base_class *driver,const char *name,
+	request *r,request *e,int mode)
+{
+	int ret = 0;
+
+
+	if(ret == 0)
+	{
+		database  *b = new_database(driver,name);
+		if(!b) return -1;
+		if(driver->validate != NULL && 
+				driver->validate(b->data,r,e,mode) != NOERR)
+					ret = -1;
+		 free_database(b);
+	}
+	 return ret;
+}
+
+typedef struct validate_data {
+    char* file;
+    char* only;
+} validate_data;
+
+static option validate_opts[] = {
+	{"rules",NULL,NULL,NULL, t_str,sizeof(char*),OFFSET(validate_data,file),},
+	{"only",    NULL,NULL,NULL, t_str,sizeof(char*),OFFSET(validate_data,only),},
+};
+
+database *database_open(base_class *driver,const char *name,
+request *r,request *e,int mode)
+{
+	database  *b;
+	validate_data data;	
+
+	if(name)
+	{
+		get_options(driver->name,name,&data,NUMBER(validate_opts),
+			validate_opts);
+
+		if(data.only)
+		{
+			char h[80];
+			gethostname(h,sizeof(h));
+			if(strncmp(data.only,h,strlen(data.only)) != 0)
+				return NULL;
+		}
+
+		if(data.file)
+		{
+			rule *rules = read_check_file(config_file(data.file));
+			int e = check_one_request(rules,r)?NOERR:-1;
+			free_rule(rules);
+			if(e) return NULL;
+		}
+	}
+
+	b = new_database(driver,name);
+	if(!b) return NULL;
+
+	if(driver->validate != NULL && driver->validate(b->data,r,e,mode) != NOERR)
+	{
+		free_database(b);
+		return NULL;
+	}
+
+	if(driver->open(b->data,r,e,mode) != NOERR)
+	{
+		database_close(b);
+		return NULL;
+	}
+
+	return b;
+}
+
+err database_read(database *b,request *r,void *buffer,long *length)
+{
+	return b->driver->read(b->data,r,buffer,length);
+}
+
+err database_write(database *b,request *r,void *buffer,long *length)
+{
+	return b->driver->write(b->data,r,buffer,length);
+}
+
+err database_control(database *b,int code,void *param,int size)
+{
+	if( b->driver->control)
+		return b->driver->control(b->data,code,param,size);
+	else
+		return -1;
+}
+
+err database_archive(database *b,request* r)
+{
+	if( b->driver->archive)
+		return b->driver->archive(b->data,r);
+	else
+		return feed(b,r);
+}
+
+
+boolean database_check(database *b,request *r)
+{
+	if(b->driver->check == NULL) return true;
+	return b->driver->check(b->data,r);
+}
+
+err database_close(database *b)
+{
+	err ret =  b->driver->close(b->data);
+	free_database(b);
+	return ret;
+}
+
+void database_admin(base_class *driver)
+{
+	if(driver->admin != NULL)
+	{
+		database *b = database_open(driver,NULL,NULL,NULL,ADMIN_MODE);
+		if(b != 0)
+		{
+			driver->admin(b->data);
+			database_close(b);
+		}
+	}
+}
diff --git a/src/libMars/base.h b/src/libMars/base.h
new file mode 100755
index 0000000..c976308
--- /dev/null
+++ b/src/libMars/base.h
@@ -0,0 +1,70 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#ifndef _H_BASE_
+#define _H_BASE_
+
+#define READ_MODE	0
+#define WRITE_MODE	1
+#define ADMIN_MODE  2
+
+typedef void   (*initproc)    (void);
+typedef err    (*openproc)    (void *data,request *r,request *e,int mode);
+typedef err    (*validproc)   (void *data,request *r,request *e,int mode);
+typedef err    (*closeproc)   (void *data);
+typedef err    (*readproc)    (void *data,request *r,void *buffer,long *length);
+typedef err    (*writeproc)   (void *data,request *r,void *buffer,long *length);
+typedef err    (*cntlproc)    (void *data,int code,void *param,int size);
+typedef err    (*archproc)    (void *data,request *r);
+typedef void   (*adminproc)   (void*);
+
+
+typedef boolean  (*checkproc)   (void *data,request *r);
+typedef err      (*queryproc)   (void *data,request *r,long *length);
+
+typedef struct base_class {
+
+	struct base_class *parent;
+	char              *name;
+
+	boolean           inited;
+
+	int               private_size;
+	int               options_count;
+	option            *options;
+	
+
+	initproc          init;
+	openproc          open;
+	closeproc         close;
+	readproc          read;
+	writeproc         write;
+	cntlproc          control;
+
+	checkproc         check;
+	queryproc         query;
+
+	archproc          archive;
+	adminproc         admin;
+
+	validproc         validate;
+
+} base_class;
+
+typedef struct database {
+	base_class        *driver;
+	void              *data;
+	char              *name;
+	struct database   *next;
+} database;
+
+extern  base_class _nullbase;
+
+#endif
diff --git a/src/libMars/bufr.c b/src/libMars/bufr.c
new file mode 100755
index 0000000..bbbdc8c
--- /dev/null
+++ b/src/libMars/bufr.c
@@ -0,0 +1,765 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+*/
+
+#include "mars.h"
+#include <ctype.h>
+
+#ifdef FORTRAN_UPPERCASE
+#define bufrex_ BUFREX
+#endif
+#ifdef FORTRAN_NO_UNDERSCORE
+#define bufrex_ bufrex
+#endif
+
+
+#ifdef FORTRAN_UPPERCASE
+#define busel_ BUSEL
+#endif
+#ifdef FORTRAN_NO_UNDERSCORE
+#define busel_ busel
+#endif
+
+#define MASK(n) ((unsigned char)(~(0xff<<(n))))
+
+unsigned long getbits(unsigned char *p,int skip,int len)
+{
+	int             s = skip%8;
+	int             n = 8-s;
+	unsigned long   ret=0;
+
+	p += (skip >> 3); /* skip the bytes */
+
+	if(s) {
+		ret = (MASK(n) & *p++);
+		len -= n;
+	}
+
+	while(len >= 8)
+	{
+		ret = (ret<<8) + *p++;
+		len -= 8;
+	}
+
+	ret = (ret << len) + (*p >> (8-len));
+
+	return ret;
+}
+
+
+/* Use these macros only here...
+Some BUFR messages have a wrong length (65535) in the key 
+on purpose. This indicates the length has to be read from
+section 0 instead of from the key. Ask Milan for more 
+details */
+
+#define WRONG_KEY_LENGTH 65535
+#ifdef LITTLE_END
+#define KEY_LENGTH(k)       ((unsigned int)getbits( (unsigned char*)k->length, 0, 16))
+#else
+#define KEY_LENGTH(k)       (k->length)
+#endif
+
+unsigned long key_length(const char *buffer, const packed_key *k)
+{
+	unsigned long length = KEY_LENGTH(k);
+	if((length == WRONG_KEY_LENGTH) || ( length == 0))
+	{
+		length = (unsigned long)getbits((unsigned char *)(buffer+4),0,24);
+	}
+	return length;
+}
+
+void set_key_length(packed_key *key, unsigned long keylength)
+{
+	if(keylength >= WRONG_KEY_LENGTH)
+		return;
+	SET_KEY_LENGTH(*key,keylength);
+}
+
+boolean get_packed_key(char *buffer,packed_key *k)
+{
+	/* skip section 0 , check for BUFR version */
+	if((unsigned char)buffer[7]>1)
+		buffer += 8;
+	else
+		buffer += 4;
+
+	/* check if the key is present */
+
+	if(SEC1_FLAGS(buffer))
+	{
+		buffer += SEC1_LENGTH(buffer);  /* skip section 1 */
+		buffer += 4;                    /* skip header of section 2 */
+		/* now copy the packed key minus the size of two_byte_n_of_subset */
+		memcpy((void*)k, (void*)buffer, sizeof(packed_key));
+		return true;
+	}
+
+	return false;
+
+}
+
+boolean get_packed_section_1(char *buffer,packed_section_1* section)
+{
+	/* skip section 0 , check for BUFR version */
+	if((unsigned char)buffer[7]>1)
+		buffer += 8;
+	else
+		buffer += 4;
+
+	memcpy((void*) section,buffer,sizeof(packed_section_1));
+
+	return true;
+}
+
+int subset_count(char *buffer)
+{
+	/* skip section 0 , check for BUFR version */
+	if((unsigned char)buffer[7]>1)
+		buffer += 8;
+	else
+		buffer += 4;
+
+	/* check if the key is present */
+
+	if(SEC1_FLAGS(buffer))
+	{
+		char *p;
+		unsigned long sec2len;
+
+		buffer += SEC1_LENGTH(buffer);  /* skip section 1 */
+		p = buffer;						/* p pointing to section 2 */
+		/*--------------------------------------------------------*/
+		/* There is a number of subsets field in the packed key   */
+		/* which is either 8 bits or 16 bits long depending on	  */
+		/* subtypes. It is also present at the beginning of 	  */
+		/* section 3 where it is coded using 16 bits.             */
+		/*--------------------------------------------------------*/
+		sec2len = getbits((unsigned char*) p,0,24);  /* get len of section 2 */
+		p += sec2len;							  /* p pointing to section 3 */
+		/*------------------------------------------------------------*/
+		/* get the number of subsets skipping the length of section 3 */
+		/* ( 3 bytes) and a byte set to 0 							  */
+		/*------------------------------------------------------------*/
+		return getbits((unsigned char*) p,32,16);
+	}
+	 
+	return 0;
+}
+
+int bufr_sat_id(char *buffer,packed_key* k)
+{
+	unsigned char *p = (unsigned char*) k;
+	int id;
+	int offset = 192;
+
+	int n = subset_count(buffer);
+	if (n > 255 || (k->header.subtype >= 121 && k->header.subtype <= 130) 
+					|| k->header.subtype==31)
+	{
+		offset = 200;
+	}		
+
+	id = p[offset/8];
+	id = id << 8;
+	id += p[(offset/8)+1];
+
+	return id;
+}
+
+void set_bufr_sat_id(char* buffer,int id,packed_key* k)
+{
+	char *p = (char*) k;
+	int offset = 192;
+
+	int n = subset_count(buffer);
+	if (n > 255 || (k->header.subtype >= 121 && k->header.subtype <= 130) 
+					|| k->header.subtype==31)
+	{
+		offset = 200;
+	}		
+
+#ifdef LITTLE_END
+	p[offset/8 + 1] = id >> 8;
+	p[offset/8] = id;
+#else
+	p[offset/8] = id >> 8;
+	p[offset/8 + 1] = id;
+#endif
+}
+
+static packed_key* get_packed_key_addr(char *buffer)
+{
+	/* skip section 0 , check for BUFR version */
+	if((unsigned char)buffer[7]>1)
+		buffer += 8;
+	else
+		buffer += 4;
+
+	/* check if the key is present */
+
+	if(SEC1_FLAGS(buffer))
+	{
+		buffer += SEC1_LENGTH(buffer);  /* skip section 1 */
+		buffer += 4;                    /* skip header of section 2 */
+		return (packed_key*) buffer;
+	}
+
+	return NULL;
+}
+
+boolean replace_key(char* buffer,packed_key* key)
+{
+	packed_key* k = get_packed_key_addr(buffer);
+	if (k)
+	{
+		memcpy(k,key,sizeof(packed_key));
+		return true;
+	}
+	return false;
+}
+
+boolean patch_key_date(char* buffer,int y,int m,int d,int H, int M,
+	int S)
+{
+	packed_key* k = get_packed_key_addr(buffer);
+	if (k)
+	{
+
+		packed_key p;
+		memcpy(&p,k,sizeof(packed_key));
+
+		if (H == 24 && M == 0 && S == 0)
+		{
+			H = 23;
+			M = 59;
+			S = 59;
+		}
+
+#ifdef LITTLE_END
+		marslog( LOG_WARN, "Set date & time not implemented on little-endian architecture");
+		marslog( LOG_EXIT, "If needed, bufr.c needs modifications. Exiting...");
+#else
+		p.header.year   = y;		
+		p.header.month  = m;		
+		p.header.day    = d;		
+		p.header.hour   = H;		
+		p.header.minute = M;		
+		p.header.second = S;		
+#endif
+		memcpy(k,&p,sizeof(packed_key));
+		marslog(LOG_INFO,"New date %d-%d-%d %d:%d:%d (%d)",
+			y,m,d,H,M,S,sizeof(packed_key));
+
+		return true;
+	}
+
+	return false;
+}
+
+boolean patch_key_ident(char* buffer,int ident)
+{
+#if 0
+	packed_key* k = get_packed_key_addr(buffer);
+	if (k)
+	{
+		char s[10];
+		char p[10];
+
+		packed_key p;
+		memcpy(&p,k,sizeof(packed_key));
+
+		/* put the ident value followed by spaces in 9 chars.  */
+		sprintf(p,"%d",ident);
+		memset(s,' ',9);
+		s[9] = 0;
+		memcpy(s,p,strlen(p));
+
+/*  NOT FINISHED */
+
+		memcpy(k,&p,sizeof(packed_key));
+
+		return true;
+	}
+#endif
+
+	return false;
+}
+
+boolean patch_key_length(char* buffer,unsigned int new_value)
+{
+	packed_key* k = get_packed_key_addr(buffer);
+
+	if(new_value == WRONG_KEY_LENGTH)
+	{
+		marslog(LOG_WARN,"Cannot set rdbkey length to %d",new_value);
+		return false;
+	}
+
+	if (k)
+	{
+		packed_key p;
+		memcpy(&p,k,sizeof(packed_key));
+		SET_KEY_LENGTH( p, new_value );
+		memcpy(k,&p,sizeof(packed_key));
+		return true;
+	}
+
+	return false;
+}
+
+boolean shift_packed_key_ident(char* buffer)
+{
+	packed_key* k = get_packed_key_addr(buffer);
+	if (k)
+	{
+		char *ident = KEY_IDENT(k);
+		int i = 0;
+		int j;
+		while (i < 9 && ident[i] == ' ') /* ident len = 9 */
+			i++;
+		if (i < 9)
+			memcpy(ident,&ident[i],9-i);
+		for (j = 8; j > 9-i; j--)
+			ident[j] = ' ';
+		return true;
+	}
+
+	return false;
+}
+
+void set_bufr_mars_type(request *r, const packed_key* key)
+{
+	set_value(r,"TYPE","OB");
+
+	if(KEY_TYPE(key) == BUFR_TYPE_TRACK)
+	{
+		set_value(r,"TYPE","TF");
+	}
+}
+
+err bufr_to_request(request *r,char *buffer,long length)
+{
+	packed_key  ky;
+	packed_key *k = &ky;
+	char buf[10];
+	int  i;
+	char *p;
+
+	if(!get_packed_key(buffer,k))
+	{
+		marslog(LOG_WARN,"BUFR message without key found");
+		return -1;
+	}
+
+	if(mars.debug)
+		print_packed_key(buffer,k); 
+
+	set_bufr_mars_type(r,k);
+
+	set_value(r,"_BUFR_TYPE","%d",KEY_TYPE(k));
+	set_value(r,"_BUFR_SUBTYPE","%d",KEY_SUBTYPE(k));
+	set_value(r,"OBSTYPE","%d",KEY_SUBTYPE(k));
+
+	set_value(r,"DATE","%04d%02d%02d",KEY_YEAR(k),KEY_MONTH(k),KEY_DAY(k));
+	set_value(r,"TIME","%02d%02d",KEY_HOUR(k),KEY_MINUTE(k));
+
+
+	if(IS_SATTELITE(k))
+	{
+		/* set_value(r,"_IS_SATTELITE","true"); */
+
+		set_value(r,"_LATITUDE1","%.4f",UNLAT(KEY_LATITUDE1(k)));
+		set_value(r,"_LATITUDE2","%.4f",UNLAT(KEY_LATITUDE2(k)));
+		set_value(r,"_LONGITUDE1","%.4f",UNLON(KEY_LONGITUDE1(k)));
+		set_value(r,"_LONGITUDE2","%.4f",UNLON(KEY_LONGITUDE2(k)));
+		/* set_value(r,"IDENT","%d",KEY_IDSAT(k)); */
+	}
+	else
+	{
+		/* set_value(r,"_IS_SATTELITE","false"); */
+
+		set_value(r,"_LATITUDE1","%.4f",UNLAT(KEY_LATITUDE(k)));
+		set_value(r,"_LATITUDE2","%.4f",UNLAT(KEY_LATITUDE(k)));
+		set_value(r,"_LONGITUDE1","%.4f",UNLON(KEY_LONGITUDE(k)));
+		set_value(r,"_LONGITUDE2","%.4f",UNLON(KEY_LONGITUDE(k)));
+
+		memcpy(buf,KEY_IDENT(k),9);
+		i = 0;
+		p = buf;
+		buf[9] = 0;
+
+		while(*p) {
+			if(isalnum(*p)) buf[i++] = *p;
+			p++;
+		}
+		buf[i] = 0;
+		set_value(r,"IDENT",buf);
+	}
+
+	set_value(r,"_NOBS","%d",KEY_NOBS(k));
+	set_value(r,"_RDBDAY","%d",KEY_RDBDAY(k));
+	set_value(r,"_RDBHOUR","%d",KEY_RDBHOUR(k));
+	set_value(r,"_RDBMINUTE","%d",KEY_RDBMINUTE(k));
+	set_value(r,"_RDBSECOND","%d",KEY_RDBSECOND(k));
+
+	set_value(r,"_RECDAY","%d",KEY_RECDAY(k));
+	set_value(r,"_RECHOUR","%d",KEY_RECHOUR(k));
+	set_value(r,"_RECMINUTE","%d",KEY_RECMINUTE(k));
+	set_value(r,"_RECSECOND","%d",KEY_RECSECOND(k));
+
+	set_value(r,"_CORR1","%d",KEY_CORR1(k));
+	set_value(r,"_CORR2","%d",KEY_CORR2(k));
+	set_value(r,"_CORR3","%d",KEY_CORR3(k));
+	set_value(r,"_CORR4","%d",KEY_CORR4(k));
+
+	set_value(r,"_PART1","%d",KEY_PART1(k));
+	set_value(r,"_PART2","%d",KEY_PART2(k));
+	set_value(r,"_PART3","%d",KEY_PART3(k));
+	set_value(r,"_PART4","%d",KEY_PART4(k));
+
+	set_value(r,"_QC","%d",KEY_QC(k));
+
+
+	if(mars.debug)
+		print_one_request(r);
+
+	return 0;
+}
+
+boolean verify_bufr_key(const char* buffer, long length, const packed_key* key)
+{
+	boolean ok = true;
+	unsigned long klength = key_length(buffer,key);
+
+	if (klength != length)
+	{
+		marslog(LOG_EROR,"Wrong key length in bufr message %d != %d",klength
+			,length);
+		return false;
+	}
+		
+	{
+		char *p = (char*) buffer + length -4;
+		ok = (p[0] == '7' && p[1] == '7' && p[2] == '7' 
+				&& p[3] == '7');
+		if (!ok)
+		{
+			marslog(LOG_EROR,"7777 not found at offset+key length");
+			return false;
+			
+		}
+	}
+	{
+		char s[100];
+		long date = KEY_YEAR(key) * 10000 + 
+			    KEY_MONTH(key) * 100 + 
+			    KEY_DAY(key);
+		if (julian_to_date(date_to_julian(date),true) != date)
+		{
+			marslog(LOG_EROR,"date is weird %d",date);
+			return false;
+		}
+
+		if ( KEY_HOUR(key) >= 24)
+		{
+			print_key_time(key,s);
+			marslog(LOG_EROR,"time is weird %s",s);
+			return false;
+		}
+
+		if ( KEY_MINUTE(key) >= 60)
+		{
+			print_key_time(key,s);
+			marslog(LOG_EROR,"time is weird %s",s);
+			return false;
+		}
+
+		if ( KEY_SECOND(key) >= 60)
+		{
+			print_key_time(key,s);
+			marslog(LOG_EROR,"time is weird %s",s);
+			return false;
+		}
+	}
+
+	return ok;
+}
+
+static void zero_spaces(char* p)
+{
+	while (*p)
+	{
+		if (*p == ' ')
+			*p = '0';
+		p++;
+	}
+}
+
+void print_key_date(const packed_key* keyptr,char* s)
+{
+	sprintf(s,"%2d/%2d/%4d",KEY_DAY(keyptr),KEY_MONTH(keyptr),KEY_YEAR(keyptr));
+	zero_spaces(s);
+}
+
+void print_key_time(const packed_key* keyptr,char* s)
+{
+	sprintf(s,"%2d:%2d:%2d",KEY_HOUR(keyptr),
+						  KEY_MINUTE(keyptr),
+						  KEY_SECOND(keyptr));
+	zero_spaces(s);
+}
+
+static void set_subset_count(char* buffer,packed_key* k)
+{
+	char* p = (char*) k;
+	p[23] = subset_count(buffer);
+}
+
+int build_packed_key(char* buffer, fortint length, packed_key* k)
+{
+	fortint kerr = 0;
+
+#if 0
+
+#define KVALS 			80000
+
+	fortint ksup[9];
+	fortint ksec0[3];
+	fortint ksec1[100];
+	fortint ksec2[64];
+	fortint ksec3[4];
+	fortint ksec4[2];
+
+	fortfloat values[KVALS];
+	char cnames[20000*64];
+	char cunits[20000*24];
+	char cvals[KVALS*80];
+
+	int i;
+	char name[65];
+	fortint kvals = KVALS;
+	fortint kelem = KVALS / subset_count(buffer);
+	fortint ktdexl;
+
+
+	/* for busel */
+	fortint ktdlst[2000];
+	fortint ktdexp[2000];
+
+	int	year	= -1;
+	int month	= -1;
+	int day		= -1;
+	int hour	= -1;
+	int	minute	= -1;
+	int	second	= -1;
+	int	block	= -1;
+	int station	= -1;
+	int	id		= -1;
+	int	id_type	= 0;
+	int lat		= -1;
+	int	lon		= -1;
+
+	memset((void*) k,0,sizeof(*k));
+
+	bufrex_(&length,
+	    buffer,
+	    ksup,
+	    ksec0, ksec1, ksec2, ksec3, ksec4,
+
+	    &kelem,
+
+	    cnames,
+	    cunits,
+
+	    &kvals,
+
+	    values,
+	    cvals,
+	    &kerr,
+
+	    64,
+	    24,
+	    80);
+	if (kerr)
+		return kerr;
+
+		
+	busel_(&kelem,ktdlst,&ktdexl,ktdexp,&kerr);
+	if (kerr)
+		return kerr;
+
+	for (i = 0; i < 13; i++)
+	{
+		switch (ktdexp[i])
+		{
+			case 1006:
+			case 1007:
+			case 1005:
+			case 1008:
+			case 1011:
+				id = i;
+				id_type = ktdexp[i];
+				break;
+			case 1001:
+				block = i;
+				id_type++;
+				break;
+			case 1002:
+				id_type++;
+				station = i;
+				break;
+			case 4001:
+				year = i;
+				break;
+			case 4002:
+				month = i;
+				break;
+			case 4003:
+				day = i;
+				break;
+			case 4004:
+				hour = i;
+				break;
+			case 4005:
+				minute = i;
+				break;
+			case 4006:
+				second = i;
+				break;
+			case 5001:
+				lat = i;
+				break;
+			case 6001:
+				lon = i;
+				break;
+			case 5002:
+				lat = i;
+				break;
+			case 6002:
+				lon = i;
+				break;
+		}
+	}
+
+	if (year == -1 || month == -1 || day == -1 || hour == -1 || minute == -1 ||
+		  lat == -1 || lon == -1)
+		return -10;
+
+	KEY_YEAR(k) 	= values[year];
+	KEY_MONTH(k)	= values[month];
+	KEY_DAY(k)		= values[day];
+	KEY_HOUR(k)		= values[hour];
+	KEY_MINUTE(k)	= values[minute];
+	KEY_SECOND(k)	= second == -1 ? 0 : values[second];
+
+	/* id */
+	switch (id_type)
+	{
+		char ident[10];
+		int i;
+		int indx;
+		int l;
+
+		case 1007: /* SATELLITE IDENTIFIER INDEX */
+			set_bufr_sat_id(buffer,values[id],k);
+			break;
+
+		case 1005: /* BUOY/PLATFORM IDENTIFIER INDEX */
+			i = values[id];
+			set_bufr_sat_id(buffer,i,k);
+			sprintf(ident,"%5d",i);
+			zero_spaces(ident);
+			memcpy(KEY_IDENT(k),ident,5);
+			break;
+
+		case 1006: /* AIRCRAFT FLIGHT NUMBER INDEX */
+		case 1008: /* AIRCRAFT REGISTRATION NUMBER INDEX */
+		case 1011: /* SHIPS' CALL SIGN INDEX */
+			indx = (int) values[id] / 1000; /* index in cvals where data is */
+			l = (int) values[id] % 1000; 	/* length of data in cvals */
+			for (i = 0; i < l; i++)
+				KEY_IDENT(k)[i] = cvals[indx++];
+			break;
+
+		case 2:    /* WMO BLOCK AND STATION NUMBER */
+			i = values[block]*1000+values[station];
+			set_bufr_sat_id(buffer,i,k);
+			sprintf(ident,"%5d",i);
+			zero_spaces(ident);
+			memcpy(KEY_IDENT(k),ident,5);
+			break;
+
+		default:
+			kerr = -9;
+			break;
+	}
+	if (kerr)
+		return kerr;
+
+	if (abs(values[lon] - 1.7E38) < 10.E-11 ||
+		abs(values[lat] - 1.7E38) < 10.E-11)
+		return -8;
+
+#if 0
+	printf("LAT: %d\n",(int) (values[lat]) * 100000.0+9000000.0));
+	printf("LON: %d\n",(int) ((values[lon]+180) * 100000.0+18000000.0));
+#endif
+
+	k->length = length;
+	set_subset_count(buffer,k);
+	
+#endif
+	return kerr;
+}
+
+
+void print_packed_key(char* buffer,packed_key* k)
+{
+	printf("------------------------------------------------\n");
+	printf("------------------------------------------------\n");
+	printf("type                  %d\n",KEY_TYPE(k));
+	printf("subtype               %d\n",KEY_SUBTYPE(k));
+	printf("year                  %d\n",KEY_YEAR(k));
+	printf("month                 %d\n",KEY_MONTH(k));
+	printf("day                   %d\n",KEY_DAY(k));
+	printf("hour                  %d\n",KEY_HOUR(k));
+	printf("minute                %d\n",KEY_MINUTE(k));
+	printf("second                %d\n",KEY_SECOND(k));
+	printf("--------------------------------------------\n");
+	printf("latitude1             %d\n",KEY_LATITUDE1(k));
+	printf("longitude1            %d\n",KEY_LONGITUDE1(k));
+	if (IS_SATTELITE(k))
+	{
+		printf("latitude2             %d\n",KEY_LATITUDE2(k));
+		printf("longitude2            %d\n",KEY_LONGITUDE2(k));
+	}
+	printf("------------------------------------------------\n");
+	printf("length                %d\n",key_length(buffer,k));
+	printf("number of subsets     %d\n",KEY_NOBS(k));
+	printf("------------------------------------------------\n");
+	if (IS_SATTELITE(k))
+		printf("ident                 %d\n", bufr_sat_id(buffer,k));
+	else
+	{
+		char id[6];
+		memcpy(id,KEY_IDENT(k),5);
+		id[5] = 0;
+		printf("ident                 %s\n", id);
+	}
+	printf("\n");
+}
diff --git a/src/libMars/bufr.h b/src/libMars/bufr.h
new file mode 100644
index 0000000..6d2a4dd
--- /dev/null
+++ b/src/libMars/bufr.h
@@ -0,0 +1,231 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/************************************************************
+
+ RDB package
+
+ B.Raoult Wed Apr 17 16:07:11 BST 1991
+
+ Definition of the BUFR format.
+
+*************************************************************/
+
+
+#define BUFR_TYPE_TRACK     40
+
+#ifdef LITTLE_END
+#define KEY_TYPE(k)         ((unsigned int)k->header.type)
+#define KEY_SUBTYPE(k)      ((unsigned int)k->header.subtype)
+#define KEY_YEAR(k)         ((unsigned int)getbits( (unsigned char*)k->header.date_time,  0, 12 ))
+#define KEY_MONTH(k)        ((unsigned int)getbits( (unsigned char*)k->header.date_time, 12,  4 ))
+#define KEY_DAY(k)          ((unsigned int)getbits( (unsigned char*)k->header.date_time, 16,  6 ))
+#define KEY_HOUR(k)         ((unsigned int)getbits( (unsigned char*)k->header.date_time, 22,  5 ))
+#define KEY_MINUTE(k)       ((unsigned int)getbits( (unsigned char*)k->header.date_time, 27,  6 ))
+#define KEY_SECOND(k)       ((unsigned int)getbits( (unsigned char*)k->header.date_time, 33,  6 ))
+#else
+#define KEY_TYPE(k)         (k->header.type)
+#define KEY_SUBTYPE(k)      (k->header.subtype)
+#define KEY_YEAR(k)         (k->header.year)
+#define KEY_MONTH(k)        (k->header.month)
+#define KEY_DAY(k)          (k->header.day)
+#define KEY_HOUR(k)         (k->header.hour)
+#define KEY_MINUTE(k)       (k->header.minute)
+#define KEY_SECOND(k)       (k->header.second)
+#endif
+
+#define KEY_CORR1(k)        CORR_CORR(k->corr1)
+#define KEY_CORR2(k)        CORR_CORR(k->corr2)
+#define KEY_CORR3(k)        CORR_CORR(k->corr3)
+#define KEY_CORR4(k)        CORR_CORR(k->corr4)
+#define KEY_IDENT(k)        ((char*)k+15)
+#define KEY_LATITUDE(k)     ((unsigned long)getbits((unsigned char*)k,88,25))
+#define KEY_LATITUDE1(k)    ((unsigned long)getbits((unsigned char*)k,88,25))
+#define KEY_LATITUDE2(k)    ((unsigned long)getbits((unsigned char*)k,152,25))
+
+#ifdef LITTLE_END
+#define SET_KEY_LENGTH(k,v) (k).length[0]=(unsigned char)((v)/256);(k).length[1]=(unsigned char)((v)%256);
+#else
+#define SET_KEY_LENGTH(k,v) (k).length = (v)
+#endif
+
+#define KEY_LONGITUDE(k)    ((unsigned long)getbits((unsigned char*)k,56,26))
+#define KEY_LONGITUDE1(k)   ((unsigned long)getbits((unsigned char*)k,56,26))
+#define KEY_LONGITUDE2(k)   ((unsigned long)getbits((unsigned char*)k,120,26))
+#define KEY_NOBS(k)         ((unsigned long)getbits((unsigned char*)k,184,8))
+#define KEY_PART1(k)        CORR_PART(k->corr1) 
+#define KEY_PART2(k)        CORR_PART(k->corr2) 
+#define KEY_PART3(k)        CORR_PART(k->corr3) 
+#define KEY_PART4(k)        CORR_PART(k->corr4) 
+#define KEY_QC(k)           (k->qc) 
+#define KEY_RDBDAY(k)       TIME_DAY(k->rdbtime)    
+#define KEY_RDBHOUR(k)      TIME_HOUR(k->rdbtime)
+#define KEY_RDBMINUTE(k)    TIME_MINUTE(k->rdbtime)
+#define KEY_RDBSECOND(k)    TIME_SECOND(k->rdbtime)
+#define KEY_RECDAY(k)       TIME_DAY(k->rectime)
+#define KEY_RECHOUR(k)      TIME_HOUR(k->rectime)
+#define KEY_RECMINUTE(k)    TIME_MINUTE(k->rectime)
+#define KEY_RECSECOND(k)    TIME_SECOND(k->rectime)
+
+/* day 6 bits,hour 5 bits, min 6 sec 6  1 spare*/
+
+#define TIME_DAY(a)     (unsigned long)((a[0] & 0xFC)>>2)
+#define TIME_HOUR(a)    (unsigned long)(((a[0]&0x3)<<3)+((a[1]&0xE0)>>5))
+#define TIME_MINUTE(a)  (unsigned long)(((a[1]&0x1F)<<1)+((a[2]&0x8)>>3))
+#define TIME_SECOND(a)  (unsigned long)((a[2] & 0x7E)>>1)
+
+#define CORR_CORR(a)        (unsigned long)((unsigned char)((unsigned char)a & (unsigned char)0xFC) >>  (unsigned char)2)
+#define CORR_PART(a)        (unsigned long)((unsigned char)((unsigned char)a & (unsigned char)0x02) >>  (unsigned char)1)
+
+#define IS_SATTELITE(k)     (KEY_TYPE(k)==2||KEY_TYPE(k)==3||KEY_TYPE(k)==12)
+
+#define UNLAT(l) ((double)(l)/100000.  -90.)
+#define UNLON(l) ((double)(l)/100000. -180.)
+
+/* Definition of rdb key */
+
+typedef struct
+{
+#ifdef LITTLE_END
+    unsigned char     type;
+    unsigned char     subtype;
+    unsigned char     date_time[ 5 ];
+    unsigned char     spare02[ 25 ];
+#else
+    unsigned int      type       :8;     /* 8   bits =  1  bytes   */
+    unsigned int      subtype    :8;     /* 16  bits =  2  bytes   */
+    unsigned int      year       :12;    /* 28                     */
+    unsigned int      month      :4;     /* 32  bits =  4  bytes   */
+    unsigned int      day        :6;     /* 38                     */
+    unsigned int      hour       :5;     /* 43                     */
+    unsigned int      minute     :6;     /* 49                     */
+    unsigned int      second     :6;     /* 55                     */
+    unsigned int      spare01    :1;     /* 56  bits =  7   bytes  */
+    char              spare02    [25];   /* 256 bits = 32   bytes  */
+#endif
+} keyheader;
+
+typedef unsigned char timec[3];
+typedef unsigned char correction;
+
+
+typedef struct
+{
+#ifdef LITTLE_END
+    keyheader        header;
+    unsigned char    length[ 2 ];
+    timec            rdbtime;
+    timec            rectime;
+    correction       corr1;
+    correction       corr2;
+    correction       corr3;
+    correction       corr4;
+    unsigned char    qc;
+    unsigned char    spare09[ 3 ];
+#else
+    keyheader        header;
+    unsigned int     length:16;
+    timec            rdbtime;
+    timec            rectime;
+    correction       corr1;
+    correction       corr2;
+    correction       corr3;
+    correction       corr4;
+    unsigned int     qc          :8;
+    unsigned int     spare09     :24;   /* 48 bytes */
+#endif
+} packed_key; 
+
+#define SEC1_LENGTH(a)  (getbits((unsigned char*)a,0,24))
+#define SEC1_FLAGS(a)   (getbits((unsigned char*)a,56,8))
+
+#ifdef LITTLE_END
+#define SEC1_TYPE(s1)         ((unsigned int)s1.packed_section_1_data[8])
+#define SEC1_SUBTYPE(s1)      ((unsigned int)s1.packed_section_1_data[9])
+#define SEC1_YEAR(s1)         ((unsigned int)s1.packed_section_1_data[12])
+#define SEC1_MONTH(s1)        ((unsigned int)s1.packed_section_1_data[13])
+#define SEC1_DAY(s1)          ((unsigned int)s1.packed_section_1_data[14])
+#define SEC1_HOUR(s1)         ((unsigned int)s1.packed_section_1_data[15])
+#define SEC1_MINUTE(s1)       ((unsigned int)s1.packed_section_1_data[16])
+#else
+#define SEC1_TYPE(s1)         (s1.type)
+#define SEC1_SUBTYPE(s1)      (s1.subtype)
+#define SEC1_YEAR(s1)         (s1.year)
+#define SEC1_MONTH(s1)        (s1.month)
+#define SEC1_DAY(s1)          (s1.day)
+#define SEC1_HOUR(s1)         (s1.hour)
+#define SEC1_MINUTE(s1)       (s1.minute)
+#endif
+
+typedef struct
+{
+#ifdef LITTLE_END
+        unsigned char    packed_section_1_data[32];
+#else
+	unsigned int	 length:24;			  /* length                 */  /* 3 -> 0-2   */
+	unsigned int	 editon:8;			  /* edition number         */  /* 1 -> 3     */
+	unsigned int     centre:16;           /* originating centre     */  /* 2 -> 4-5   */
+	unsigned int	 seq:8;				  /* sequence number        */  /* 1 -> 6     */
+	unsigned int	 key:8;				  /* presence of section 2  */  /* 1 -> 7     */
+	unsigned int	 type:8;		  	  /* type of message        */  /* 1 -> 8     */
+	unsigned int     subtype:8;			  /* subtype of message	    */  /* 1 -> 9     */
+	unsigned int     table:16;            /* used WMO 94 table      */  /* 2 -> 10-11 */
+	unsigned int     year:8;              /* year of century	    */  /* 1 -> 12    */
+	unsigned int     month:8;			  /* month                  */  /* 1 -> 13    */
+	unsigned int     day:8;               /* day                    */  /* 1 -> 14    */
+	unsigned int     hour:8;              /* hour                   */  /* 1 -> 15    */
+	unsigned int     minute:8;            /* minute                 */  /* 1 -> 16    */
+	/* more after this .................. */
+#endif
+} packed_section_1;
+
+/*=================================================================*/
+/* Structure returned by bufrdc                                    */
+/*=================================================================*/
+
+typedef struct {
+    fortint length;       /* 1 */
+    fortint edition;      /* 2 */
+    fortint center;       /* 3 */
+    fortint update;       /* 4 */
+    fortint flag;         /* 5 */
+    fortint type;         /* 6 */
+    fortint subtype;      /* 7 */
+    fortint version;      /* 8 */
+    fortint century;      /* 9 */
+    fortint month;        /* 10 */
+    fortint day;
+    fortint hour;
+    fortint minute;
+    fortint table;
+    fortint table_version;
+    fortint junk[40];
+} obssec1;
+
+typedef struct {
+    fortint sec2len;          /* 1 */
+    fortint type;             /* 2 */
+    fortint subtype;          /* 3 */
+    fortint year;             /* 4 */
+    fortint month;            /* 5 */
+    fortint day;              /* 6 */
+    fortint hour;             /* 7 */
+    fortint minute;           /* 8 */
+    fortint second;           /* 9 */
+    fortint longitude1;       /* 10 */
+    fortint latitude1;        /* 11 */
+    fortint longitude2;       /* 12 */
+    fortint latitude2;        /* 13 */
+    fortint no_subsets;       /* 14 */
+    fortint satellite_id;     /* 15 */
+    fortint ident[9];         /* 16-24 */
+    fortint length;           /* 25 */
+    fortint junk[40];            
+} obskey;
diff --git a/src/libMars/calc.c b/src/libMars/calc.c
new file mode 100644
index 0000000..d7952c8
--- /dev/null
+++ b/src/libMars/calc.c
@@ -0,0 +1,2266 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+   B.Raoult
+   ECMWF Oct-93
+
+ */
+
+
+#include "mars.h"
+#include <math.h>
+#include <errno.h>
+#include <signal.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+
+static boolean comperr;
+static char* form = NULL;
+
+static math *readpower(void);
+static math *readatom(void);
+static math *readfactor(void);
+static math *readterm(void);
+static math *readtest(void);
+static math *readlist(int*);
+static void advance(void);
+
+typedef real (*fop1)(real);
+typedef real (*fop2)(real,real);
+
+
+#ifdef notCRAY
+
+#define BI_FUNC(a,b)	(a)+(b)
+#define BI_NAME         v_add
+#include "calc.h"
+
+#define BI_FUNC(a,b)	(a)-(b)
+#define BI_NAME         v_sub
+#include "calc.h"
+
+#define BI_FUNC(a,b)	(a)+(b)
+#define BI_NAME         v_mul
+#include "calc.h"
+
+#define BI_FUNC(a,b)	(a)/(b)
+#define BI_NAME         v_div
+#include "calc.h"
+
+
+#endif
+
+/* save every 10 fields */
+#define SAVE_CNT 10
+
+static int merr = 0;
+
+
+static real b_max(real a,real b) {
+	return a>b?a:b;
+}
+
+static real b_min(real a,real b) {
+	return a<b?a:b;
+}
+
+static real b_add(real a,real b) {
+	return a+b;
+}
+static real b_sub(real a,real b) {
+	return a-b;
+}
+static real b_div(real a,real b) {
+	return a/b;
+}
+static real b_mul(real a,real b) {
+	return a*b;
+}
+
+static real b_pow(real a,real b) {
+	return pow(a,b);
+}
+
+static real b_mod(real a,real b) {
+	return (long)a % (long)b;
+}
+
+static real b_idiv(real a,real b) {
+	return (long)a / (long)b;
+}
+
+static real b_eq(real a,real b) {
+	return (real)(a == b);
+}
+
+static real b_ne(real a,real b) {
+	return (real)(a != b);
+}
+
+static real b_ge(real a,real b) {
+	return (real)(a >= b);
+}
+
+static real b_gt(real a,real b) {
+	return (real)(a > b);
+}
+
+
+static real b_le(real a,real b) {
+	return (real)(a <= b);
+}
+
+static real b_lt(real a,real b) {
+	return (real)(a < b);
+}
+
+static real b_and(real a,real b) {
+	return (real)((a != 0)  &&  (b != 0));
+}
+
+static real b_or(real a,real b) {
+	return (real)((a != 0)  ||  (b != 0));
+}
+
+static real m_sgn(real a)
+{
+	if(a>0.0) return  1.0;
+	if(a<0.0) return -1.0;
+	return 0;
+}
+
+static real m_int(real a)
+{
+	return (long)a;
+}
+
+static real m_neg(real a)
+{
+	return -a;
+}
+
+static real m_not(real a)
+{
+	/* return 1.0-(a != 0.0) ; */
+	if(a != 0.0)
+		return 0.0;
+	else
+		return 1.0;
+}
+
+static err f_count(math *p,void *data)
+{
+	variable *v = pop();
+	if(!v) return -1;
+	marslog(LOG_DBUG,"f_count");
+	if(v->scalar) return push_scalar(0.0);
+	return push_scalar(v->fs->count);
+}
+
+static err f_v_minmax(math *p,fop2 f)
+{
+	int i,j;
+	variable *v = pop();
+	real m;
+	field *g;
+	char formula[10240];
+
+	if(!v) return -1;
+
+	marslog(LOG_DBUG,"f_v_minmax: %s",p->name);
+
+	sprintf(formula,"%s(%s)",p->name,v->name);
+
+	if(v->scalar) return push_named_scalar(strcache(formula),v->val);
+
+	g = get_nonmissing_field(v->fs,expand_mem);
+	if(MISSING_FIELD(g))
+	{
+		inform_missing_fieldset(v->name);
+		marslog(LOG_EROR,"Cannot continue COMPUTE of '%s'",formula);
+		return -1;
+	}
+	else
+	{
+		m = g->values[0];
+		if(FIELD_HAS_BITMAP(g)) {
+			int i = 0;
+			while(MISSING_VALUE(m) && i != g->value_count)
+				m = g->values[i++];
+		}
+
+		release_field(g);
+
+		for(i=0;i<v->fs->count;i++)
+		{
+			field *g = get_field(v->fs,i,expand_mem);
+
+			if(! MISSING_FIELD(g))
+			{
+				if(FIELD_HAS_BITMAP(g))
+				{
+					for(j=0;j<g->value_count;j++)
+						if( ! MISSING_VALUE(g->values[j]))
+							m = f(m,g->values[j]);
+				}
+				else
+					for(j=0;j<g->value_count;j++)
+						m = f(m,g->values[j]);
+			}
+
+
+			release_field(g);
+		}
+	}
+	return push_named_scalar(strcache(formula),m);
+}
+
+static err unop(math *p,fop1 f)
+{
+	variable *va;
+	fieldset *vc;
+	int i,j;
+	char formula[10240];
+	err e = NOERR;
+
+	marslog(LOG_DBUG,"unop : %s ",p->name);
+
+	if(!(va = pop()))
+		return -1;
+
+	sprintf(formula,"%s(%s)",p->name,va->name);
+
+	if(va->scalar)
+		return push_named_scalar(strcache(formula),f(va->val));
+
+	vc     = new_fieldset(va->fs->count);
+
+	for(i=0;i<va->fs->count;i++)
+	{
+		field *ga = get_field(va->fs,i,expand_mem);
+		field *gc;
+
+		if(MISSING_FIELD(ga))
+		{
+			gc = copy_field(ga,true);
+		}
+		else
+		{
+			gc = copy_field(ga,false);
+			for(j=0;j<ga->value_count;j++)
+				gc->values[j] = f(ga->values[j]);
+			copy_bitmap(gc,ga,0);
+		}
+
+		set_field(vc,gc,i);
+		if( ((i+1) % SAVE_CNT) == 0) 
+			e = e | save_fieldset(vc);
+
+		release_field(ga);
+
+	}
+
+	e = e | push_named_fieldset(strcache(formula),vc);
+	return e;
+
+}
+
+static err binop(math *p,fop2 f)
+{
+	variable *va,*vb;
+	fieldset *vc;
+	int i,j;
+	char formula[10240];
+	int missing = 0;
+	err e = NOERR;
+
+	marslog(LOG_DBUG,"binop : %s ",p->name);
+
+	if(!(vb = pop()))
+		return -1;
+
+	if(!(va = pop()))
+		return -1;
+
+	sprintf(formula,"%s %s %s",va->name,p->name,vb->name);
+
+	if(va->scalar && vb->scalar)
+		return push_named_scalar(strcache(formula),f(va->val,vb->val));
+
+	if(va->scalar)
+	{
+		real x = va->val;
+		vc     = new_fieldset(vb->fs->count);
+
+		for(i=0;i<vb->fs->count;i++)
+		{
+			field *gb = get_field(vb->fs,i,expand_mem);
+			field *gc ;
+
+
+			if(MISSING_FIELD(gb))
+			{
+				gc = copy_field(gb,true);
+				missing++;
+			}
+			else
+			{
+				gc = copy_field(gb,false);
+				for(j=0;j<gb->value_count;j++)
+					gc->values[j] = f(x,gb->values[j]);
+				copy_bitmap(gc,0,gb);
+			}
+
+			set_field(vc,gc,i);
+
+			if( ((i+1) % SAVE_CNT) == 0) 
+				e = e | save_fieldset(vc);
+
+			release_field(gb);
+		}
+		if(missing == vb->fs->count)
+		{
+			inform_missing_fieldset(vb->name);
+			marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		}
+		e = e | push_named_fieldset(strcache(formula),vc);
+		return e;
+	}
+
+	if(vb->scalar)
+	{
+		real x = vb->val;
+		vc     = new_fieldset(va->fs->count);
+
+		for(i=0;i<va->fs->count;i++)
+		{
+			field *ga = get_field(va->fs,i,expand_mem);
+			field *gc;
+
+			if(MISSING_FIELD(ga))
+			{
+				gc = copy_field(ga,true);
+				missing++;
+			}
+			else
+			{
+				gc = copy_field(ga,false);
+				for(j=0;j<ga->value_count;j++)
+					gc->values[j] = f(ga->values[j],x);
+				copy_bitmap(gc,ga,0);
+			}
+
+			set_field(vc,gc,i);
+			if( ((i+1) % SAVE_CNT) == 0) 
+				e = e | save_fieldset(vc);
+
+			release_field(ga);
+		}
+		if(missing == va->fs->count)
+		{
+			inform_missing_fieldset(va->name);
+			marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		}
+		e = e | push_named_fieldset(strcache(formula),vc);
+		return e;
+	}
+
+	if(va->fs->count != vb->fs->count)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' need the same number of fields",
+				p->name);
+		return -1;
+	}
+
+	vc  = new_fieldset(va->fs->count);
+	for(i=0;i<va->fs->count;i++)
+	{
+		field *ga = get_field(va->fs,i,expand_mem);
+		field *gb = get_field(vb->fs,i,expand_mem);
+		field *gc;
+
+		if(ga->value_count != gb->value_count)
+		{
+			marslog(LOG_EROR,
+					"compute: function '%s' need the same number of grid points",
+					p->name);
+			return -1;
+		}
+
+		if(MISSING_FIELD(ga))
+		{
+			gc = copy_field(ga,true);
+			missing++;
+		}
+		else if(MISSING_FIELD(gb))
+		{
+			gc = copy_field(gb,true);
+			missing++;
+		}
+		else
+		{
+			gc = copy_field(ga,false);
+
+			for(j=0;j<ga->value_count;j++)
+				gc->values[j] = f(ga->values[j],gb->values[j]);
+
+			copy_bitmap(gc,ga,gb);
+		}
+
+		set_field(vc,gc,i);
+		if( ((i+1) % SAVE_CNT) == 0) 
+			e = e | save_fieldset(vc);
+
+		release_field(ga);
+		release_field(gb);
+
+	}
+	if(missing == va->fs->count)
+	{
+		inform_missing_fieldset(formula);
+	}
+	e = e | push_named_fieldset(strcache(formula),vc);
+	return e;
+
+}
+
+static err f_sum(math *p,void *data)
+{
+	variable *vin;
+	fieldset *vout;
+	int i,j;
+	field *gin,*gout;
+	char formula[10240];
+
+	marslog(LOG_DBUG,"f_sum");
+
+	if(!(vin = pop()))
+		return -1;
+
+	if(vin->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s(%s)",p->name,vin->name);
+
+	vout = new_fieldset(1);
+
+	gin  = get_nonmissing_field(vin->fs,expand_mem);
+	if(MISSING_FIELD(gin))
+	{
+		gout = copy_field(gin,true);
+		release_field(gin);
+		inform_missing_fieldset(vin->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+	}
+	else
+	{
+		gout = copy_field(gin,false);
+		for(j=0;j<gin->value_count;j++)
+			gout->values[j] = 0;
+		release_field(gin);
+
+		for(i=0;i<vin->fs->count;i++)
+		{
+			gin  = get_field(vin->fs,i,expand_mem);
+
+			if(! MISSING_FIELD(gin))
+				for(j=0;j<gin->value_count;j++)
+					gout->values[j] += gin->values[j];
+
+			copy_bitmap(gout,gin,0);
+			release_field(gin);
+
+		}
+	}
+
+	set_field(vout,gout,0);
+	return push_named_fieldset(strcache(formula),vout);
+
+}
+
+static err f_mean(math *p,void *data)
+{
+	variable *vin;
+	fieldset *vout;
+	int i,j;
+	field *gin,*gout;
+	int missing = 0;
+	char formula[10240];
+	err e = 0;
+
+	marslog(LOG_DBUG,"f_mean");
+
+	if(!(vin = pop()))
+		return -1;
+
+	if(vin->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s(%s)",p->name,vin->name);
+	vout = new_fieldset(1);
+
+	gin  = get_nonmissing_field(vin->fs,expand_mem);
+	if(MISSING_FIELD(gin))
+	{
+		gout = copy_field(gin,true);
+		release_field(gin);
+		inform_missing_fieldset(vin->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+	}
+	else
+	{
+		gout = copy_field(gin,false);
+		for(j=0;j<gin->value_count;j++)
+			gout->values[j] = 0;
+		release_field(gin);
+
+		for(i=0;i<vin->fs->count && e == 0;i++)
+		{
+			gin  = get_field(vin->fs,i,expand_mem);
+
+			if(! MISSING_FIELD(gin))
+			{
+				if(gin->value_count != gout->value_count)
+				{
+					marslog(LOG_EROR,
+							"compute: function '%s', not all fields have the same number of values ",
+							p->name);
+					e = -1;
+				}
+				else
+					for(j=0;j<gin->value_count;j++)
+						gout->values[j] += gin->values[j];
+			}
+			else
+				missing++;
+
+			if(e == 0)
+				copy_bitmap(gout,gin,0);
+			release_field(gin);
+
+		}
+
+		for(j=0;j<gout->value_count;j++)
+			if( ! MISSING_VALUE(gout->values[j]))
+				gout->values[j] /= (vin->fs->count - missing);
+	}
+
+	set_field(vout,gout,0);
+	return e ? e : push_named_fieldset(strcache(formula),vout);
+
+}
+
+static err f_rms(math *p,void *data)
+{
+	variable *vin;
+	fieldset *vout;
+	int i,j;
+	field *gin,*gout;
+	int missing = 0;
+	char formula[10240];
+
+	marslog(LOG_DBUG,"f_rms");
+
+	if(!(vin = pop()))
+		return -1;
+
+	if(vin->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+	sprintf(formula,"%s(%s)",p->name,vin->name);
+	vout = new_fieldset(1);
+
+	gin  = get_nonmissing_field(vin->fs,expand_mem);
+	if(MISSING_FIELD(gin))
+	{
+		gout = copy_field(gin,true);
+		release_field(gin);
+		inform_missing_fieldset(vin->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+	}
+	else
+	{
+		gout = copy_field(gin,false);
+
+		for(j=0;j<gin->value_count;j++)
+			gout->values[j] = 0;
+
+		release_field(gin);
+
+
+		for(i=0;i<vin->fs->count;i++)
+		{
+			gin  = get_field(vin->fs,i,expand_mem);
+
+			if(! MISSING_FIELD(gin))
+				for(j=0;j<gin->value_count;j++)
+					gout->values[j] += (gin->values[j]*gin->values[j]);
+			else
+				missing++;
+
+			copy_bitmap(gout,gin,0);
+			release_field(gin);
+
+		}
+
+		for(j=0;j<gout->value_count;j++)
+			if( ! MISSING_VALUE(gout->values[j]))
+			{
+				gout->values[j] /= (vin->fs->count - missing);
+				gout->values[j]  = sqrt(gout->values[j]);
+			}
+	}
+
+	set_field(vout,gout,0);
+	return push_named_fieldset(strcache(formula),vout);
+
+}
+
+static err f_minmax(math *p,fop2 f)
+{
+	variable *vin;
+	fieldset *vout;
+	int i,j;
+	field *gin,*gout;
+	char formula[10240];
+
+	marslog(LOG_DBUG,"f_minmax");
+
+	if(p->arity == 1)
+	{
+		if(!(vin = pop()))
+			return -1;
+
+		if(vin->scalar)
+		{
+			marslog(LOG_EROR,
+					"compute: function '%s' works only on fields",p->name);
+			return -1;
+		}
+		sprintf(formula,"%s(%s)",p->name,vin->name);
+		vout = new_fieldset(1);
+
+		gin  = get_nonmissing_field(vin->fs,expand_mem);
+		gout = copy_field(gin,true);
+		release_field(gin);
+
+		if(MISSING_FIELD(gout))
+		{
+			inform_missing_fieldset(vin->name);
+			marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		}
+		else
+			for(i=0;i<vin->fs->count;i++)
+			{
+				gin  = get_field(vin->fs,i,expand_mem);
+
+				if(! MISSING_FIELD(gin))
+				{
+					if(FIELD_HAS_BITMAP(gin) || FIELD_HAS_BITMAP(gout))
+					{
+						for(j=0;j<gin->value_count;j++)
+							if( ! (MISSING_VALUE(gin->values[j]) || MISSING_VALUE(gout->values[j])) )
+								gout->values[j] = f(gin->values[j],gout->values[j]);
+						copy_bitmap(gout,gin,0);
+
+					}
+					for(j=0;j<gin->value_count;j++)
+						gout->values[j] = f(gin->values[j],gout->values[j]);
+				}
+
+				release_field(gin);
+
+			}
+
+		set_field(vout,gout,0);
+		return push_named_fieldset(strcache(formula),vout);
+	}
+	else {
+		int n = p->arity-1;
+		int m = 0;
+		fieldset *fs = 0;
+		err e;
+		while(n--) {
+
+			variable *v = stack_top();
+			fs = v->scalar?0:v->fs;
+
+			if(e = binop(p,f)) 
+				return e;
+
+			if(m && n && fs)
+				free_fieldset(fs);
+
+			m++;
+
+		}
+		if(p->arity>2 && fs) free_fieldset(fs);
+		return NOERR;
+	}
+
+}
+
+/* #define QSORT */
+#ifdef QSORT
+
+static int cmp_double(const void *a, const void *b)
+{
+	double x =  *(double*)a;
+	double y =  *(double*)b;
+
+	if(x == y)
+		return 0;
+
+	if(x < y)
+		return -1;
+
+	return 1;
+}
+
+#else
+
+static void swap(double *a, double *b) { double t=*a; *a=*b; *b=t; }
+
+static void sort(double arr[], int beg, int end) {
+	if (end > beg + 1) {
+		double piv = arr[beg];
+		int l = beg + 1, r = end;
+		while (l < r) {
+			if (arr[l] <= piv) 
+				l++;
+			else 
+				swap(&arr[l], &arr[--r]);
+		}
+		swap(&arr[--l], &arr[beg]);
+		sort(arr, beg, l);
+		sort(arr, r, end);
+	}
+}
+
+#endif
+
+
+static err f_distribution(math *p,void *data)
+{
+	variable *v;
+	int cnt = p->arity;
+	int i,j,k;
+	int size = 0;
+	int n;
+	field **g;
+	err e = 0;
+	fieldset *w;
+	double *tmp;
+
+
+	marslog(LOG_DBUG,"f_distribution");
+
+	if(cnt != 1 && cnt != 2)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' needs one or two arguments",p->name);
+		return -1;
+	}
+
+	if(!(v = pop())) 
+		return -1;
+
+	if(cnt == 2)
+	{
+		if(!v->scalar)
+		{
+			marslog(LOG_EROR,
+					"compute: function '%s' second argument must be a scalar",p->name);
+			return -1;
+		}
+
+		size = v->val;
+		if(!(v = pop())) 
+			return -1;
+
+	}
+
+	if(v->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' first argument must be a field",p->name);
+		return -1;
+	}
+
+	if(cnt == 1)
+		size = v->fs->count;
+
+	if(size < 1)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s', invalid size %d",p->name,size);
+		return -1;
+	}
+
+	if((v->fs->count/size)*size != v->fs->count)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s', invalid size %d, fieldset is %d long",
+				p->name,size,v->fs->count);
+		return -1;
+	}
+
+	w = new_fieldset(v->fs->count);
+	g = NEW_ARRAY_CLEAR(field*,size);
+	tmp = NEW_ARRAY_CLEAR(double,size);
+	n = 0;
+
+	for(i = 0,n = 0; i < v->fs->count/size ; i++, n+=size)
+	{
+		int count = 0;
+		int bitmap = 0;
+		for(j = 0; j < size ; j++)
+		{
+			field *f = get_field(v->fs,n+j,expand_mem);
+
+			if(MISSING_FIELD(f))
+			{
+				marslog(LOG_EROR,
+						"compute: function '%s', field %d is missing",p->name,n+j+1);
+				e = -1;
+			}
+
+			if(FIELD_HAS_BITMAP(f)) 
+				bitmap++;
+
+			if(count && count != f->value_count)
+			{
+				marslog(LOG_EROR,
+						"compute: function '%s', not all fields have the same number of values ",
+						p->name);
+			}
+			count = f->value_count;
+
+			g[j] = copy_field(f,true);
+			set_field(w,g[j],n+j);
+			release_field(f);
+		}
+
+		if(bitmap)
+			for(j = 0; j < size ; j++)
+				g[j]->bitmap = true;
+
+
+
+		for(k = 0; k < count ; k++)
+		{
+			for(j = 0; j < size ; j++)
+				tmp[j] = g[j]->values[k];
+
+#ifdef QSORT
+			qsort(tmp,size,sizeof(double),cmp_double);
+#else
+			sort(tmp,0,size);
+#endif
+
+			for(j = 0; j < size ; j++)
+				g[j]->values[k] = tmp[j];
+
+			if(bitmap) {
+				int ok = 0;
+				for(j = 0; j < size ; j++)
+					if(MISSING_VALUE(tmp[j]))
+						ok++;
+
+				if(ok)
+					for(j = 0; j < size ; j++)
+						g[j]->values[k]  = mars.grib_missing_value;
+
+
+			}
+
+		}
+
+
+		save_fieldset(w);
+
+
+	}
+	FREE(g);
+	FREE(tmp);
+
+	return e ? e : push_fieldset(w);
+
+}
+
+static err f_merge(math *p,void *data)
+{
+	variable *v;
+	fieldset *z;
+	fieldset *w = NULL;
+	int cnt = p->arity;
+
+
+	marslog(LOG_DBUG,"f_merge");
+
+	if(cnt < 2)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' needs at least two arguments",p->name);
+		return -1;
+	}
+
+	while(cnt--)
+	{
+
+		if(!(v = pop())) return -1;
+
+		if(v->scalar) { 
+			marslog(LOG_EROR, 
+					"compute: function '%s' works only on fields",p->name);
+			return -1;
+		}
+
+		z = w;
+		w = merge_fieldsets(v->fs,w);
+		if(z) free_fieldset(z);
+	}
+
+	return push_fieldset(w);
+
+}
+
+static err f_stdev(math *p,void *data)
+{
+	variable *vin;
+	fieldset *vout;
+	int i,j;
+	field *gin,*gout;
+	double *x;
+	double *y;
+	double d;
+	int missing = 0;
+	char formula[10240];
+
+
+	marslog(LOG_DBUG,"f_stdev");
+
+	if(!(vin = pop()))
+		return -1;
+
+	if(vin->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s(%s)",p->name,vin->name);
+
+	vout = new_fieldset(1);
+
+	gin  = get_nonmissing_field(vin->fs,expand_mem);
+	if(MISSING_FIELD(gin))
+	{
+		gout = copy_field(gin,true);
+		release_field(gin);
+		inform_missing_fieldset(vin->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+	}
+	else
+	{
+		gout = copy_field(gin,false);
+
+		x = NEW_ARRAY_CLEAR(double,gin->value_count);
+		y = NEW_ARRAY_CLEAR(double,gin->value_count);
+
+		for(j=0;j<gin->value_count;j++)
+			gout->values[j] = 0;
+
+		release_field(gin);
+
+
+		for(i=0;i<vin->fs->count;i++)
+		{
+			gin  = get_field(vin->fs,i,expand_mem);
+
+
+			if( ! MISSING_FIELD(gin))
+				for(j=0;j<gin->value_count;j++)
+				{
+					x[j] += gin->values[j];
+					y[j] += (gin->values[j]*gin->values[j]);
+				}
+			else
+				missing++;
+
+			copy_bitmap(gout,gin,0);
+			release_field(gin);
+
+		}
+
+		for(j=0;j<gout->value_count;j++)
+			if( ! MISSING_VALUE(gout->values[j]))
+			{
+				x[j]     /= (vin->fs->count - missing);
+				y[j]     /= (vin->fs->count - missing);
+				d         = y[j] - x[j]*x[j];
+				if(d<0) d = 0;
+
+				gout->values[j] = sqrt(d);
+			}
+
+		FREE(x);
+		FREE(y);
+	}
+
+	set_field(vout,gout,0);
+	return push_named_fieldset(strcache(formula),vout);
+
+}
+
+static err f_var(math *p,void *data)
+{
+	variable *vin;
+	fieldset *vout;
+	int i,j;
+	field *gin,*gout;
+	double *x;
+	int missing = 0;
+	char formula[10240];
+
+	marslog(LOG_DBUG,"f_var");
+
+	if(!(vin = pop()))
+		return -1;
+
+	if(vin->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s(%s)",p->name,vin->name);
+	vout = new_fieldset(1);
+
+	gin  = get_nonmissing_field(vin->fs,expand_mem);
+	if(MISSING_FIELD(gin))
+	{
+		gout = copy_field(gin,true);
+		release_field(gin);
+		inform_missing_fieldset(vin->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+	}
+	else
+	{
+		gout = copy_field(gin,false);
+
+		x = NEW_ARRAY_CLEAR(double,gin->value_count);
+
+		for(j=0;j<gin->value_count;j++)
+			gout->values[j] = 0;
+
+		release_field(gin);
+
+
+		for(i=0;i<vin->fs->count;i++)
+		{
+			gin  = get_field(vin->fs,i,expand_mem);
+
+			if(!gin->missing)
+				for(j=0;j<gin->value_count;j++)
+				{
+					x[j]           += gin->values[j];
+					gout->values[j] += (gin->values[j]*gin->values[j]);
+				}
+			else
+				missing++;
+
+			copy_bitmap(gout,gin,0);
+
+			release_field(gin);
+
+		}
+
+		for(j=0;j<gout->value_count;j++)
+			if( ! MISSING_VALUE(gout->values[j]))
+			{
+				x[j]           /= (vin->fs->count-missing);
+				gout->values[j] /= (vin->fs->count-missing);
+
+				gout->values[j] = gout->values[j] - x[j]*x[j];
+			}
+
+		FREE(x);
+
+	}
+	set_field(vout,gout,0);
+	return push_named_fieldset(strcache(formula),vout);
+
+}
+
+/*****************************************************************************
+
+  Co-Variance
+
+ *****************************************************************************/
+
+static err f_covar(math *p,void *data)
+{
+	variable *vx,*vy;
+	fieldset *vout;
+	int i,j;
+	field *gx,*gy,*gout;
+	double *x;
+	double *y;
+	int missing = 0;
+	char formula[10240];
+
+	marslog(LOG_DBUG,"f_covar");
+
+	if(!(vx = pop()))
+		return -1;
+
+	if(!(vy = pop()))
+		return -1;
+
+	if(vx->scalar || vy->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+
+	if(vx->fs->count != vy->fs->count)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' need the same number of fields",
+				p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s %s %s",vx->name,p->name,vy->name);
+	vout = new_fieldset(1);
+
+	gx  = get_nonmissing_field(vx->fs,expand_mem);
+	gy  = get_nonmissing_field(vy->fs,expand_mem);
+
+	if(gx->value_count != gy->value_count)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' need the same number of grid points",
+				p->name);
+		return -1;
+	}
+
+	if(MISSING_FIELD(gx) || MISSING_FIELD(gy))
+	{
+		copy_field(gx,true);
+
+		if(MISSING_FIELD(gx))
+			inform_missing_fieldset(vx->name);
+		if(MISSING_FIELD(gy))
+			inform_missing_fieldset(vy->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		release_field(gx);
+		release_field(gy);
+	}
+	else
+	{
+		gout = copy_field(gx,false);
+
+		x  = NEW_ARRAY_CLEAR(double,gx->value_count);
+		y  = NEW_ARRAY_CLEAR(double,gy->value_count);
+
+		for(j=0;j<gx->value_count;j++)
+			gout->values[j] = 0;
+		copy_bitmap(gout,gx,gy);
+
+		release_field(gx);
+		release_field(gy);
+
+
+		for(i=0;i<vx->fs->count;i++)
+		{
+			gx  = get_field(vx->fs,i,expand_mem);
+			gy  = get_field(vy->fs,i,expand_mem);
+
+			if(gx->value_count != gy->value_count)
+			{
+				marslog(LOG_EROR,
+						"compute: function '%s' need the same number of grid points",
+						p->name);
+				FREE(x);
+				FREE(y);
+				return -1;
+			}
+
+			if(gx->missing || gy->missing)
+				missing++;
+			else
+				for(j=0;j<gx->value_count;j++)
+				{
+					x[j]           += gx->values[j];
+					y[j]           += gy->values[j];
+					gout->values[j] += (gx->values[j] * gy->values[j]);
+				}
+
+			copy_bitmap(gout,gx,gy);
+
+			release_field(gx);
+			release_field(gy);
+
+		}
+
+		for(j=0;j<gout->value_count;j++)
+			if( ! MISSING_VALUE(gout->values[j]))
+			{
+				x[j]           /= (vx->fs->count - missing);
+				y[j]           /= (vx->fs->count - missing);
+				gout->values[j] /= (vx->fs->count - missing);
+
+				gout->values[j] = gout->values[j] - x[j]*y[j];
+			}
+
+	}
+
+	FREE(x);
+	FREE(y);
+
+	set_field(vout,gout,0);
+	return push_named_fieldset(strcache(formula),vout);
+}
+
+static err f_rms2(math *p,void *data)
+{
+	variable *vx,*vy;
+	int i,j;
+	field *gx,*gy;
+	int missing = 0;
+	char formula[10240];
+	double result = 0;
+	int count = 0;
+
+	marslog(LOG_DBUG,"f_rms2");
+
+	if(!(vx = pop()))
+		return -1;
+
+	if(!(vy = pop()))
+		return -1;
+
+	if(vx->scalar || vy->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' works only on fields",p->name);
+		return -1;
+	}
+
+	if(vx->fs->count != vy->fs->count)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' need the same number of fields",
+				p->name);
+		return -1;
+	}
+
+	if(vx->fs->count != 1)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' takes only one field per fieldset",
+				p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s %s %s",vx->name,p->name,vy->name);
+
+	gx  = get_nonmissing_field(vx->fs,expand_mem);
+	gy  = get_nonmissing_field(vy->fs,expand_mem);
+
+	if(gx->value_count != gy->value_count)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' need the same number of grid points",
+				p->name);
+		return -1;
+	}
+
+	if(MISSING_FIELD(gx) || MISSING_FIELD(gy))
+	{
+		copy_field(gx,true);
+
+		if(MISSING_FIELD(gx))
+			inform_missing_fieldset(vx->name);
+		if(MISSING_FIELD(gy))
+			inform_missing_fieldset(vy->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		release_field(gx);
+		release_field(gy);
+	}
+	else
+	{
+		gx  = get_field(vx->fs,0,expand_mem);
+		gy  = get_field(vy->fs,0,expand_mem);
+
+		if(gx->value_count != gy->value_count)
+		{
+			marslog(LOG_EROR,
+					"compute: function '%s' need the same number of grid points",
+					p->name);
+			return -1;
+		}
+
+		if(!gx->missing && !gy->missing)
+			for(j=0;j<gx->value_count;j++)
+				if(!MISSING_VALUE(gx->values[j]))
+					if(!MISSING_VALUE(gy->values[j]))
+					{
+						double d = gx->values[j] - gy->values[j];
+						count++;
+						result  += d*d;
+					}
+
+		release_field(gx);
+		release_field(gy);
+
+	}
+
+	if(count == 0)
+	{
+		marslog(LOG_EROR, "compute: function '%s' no grid points", p->name);
+		return -1;
+	}
+
+	return push_scalar(sqrt(result/count));
+
+}
+
+/******************************************************
+
+  x = bitmap(y,n), creates a fieldset 'x' with the same
+  number of fields than 'y', setting grib_missing_value 
+  for those points on 'y' with value n (depending on
+  parameter).
+
+  x = bitmap(y,z) [count(y) == count(z)], creates a fieldset 'x', where 
+  x[i] = bitmap of z[i] applied to y[i].
+
+  x = bitmap(y,z) [count(z) == 1], creates a fieldset 'x', where 
+  x[i] = bitmap of z applied to y[i].
+
+ *******************************************************/
+
+static err f_bitmap(math *p,void *data)
+{
+	variable *vx,*vy;
+	fieldset *vout;
+	field *gx;
+	int i,j;
+	char formula[10240];
+	err e = NOERR;
+
+	marslog(LOG_DBUG,"f_bitmap");
+
+	if(!(vy = pop()))
+		return -1;
+
+	if(!(vx = pop()))
+		return -1;
+
+	if(vx->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' needs a fieldset as 1st parameter",p->name);
+		return -1;
+	}
+
+	if(!vy->scalar && (vx->fs->count != vy->fs->count) && (vy->fs->count != 1))
+	{
+		marslog(LOG_EROR,
+				"fieldset %s has %d fields and fieldset %s has %d",
+				vx->name,vx->fs->count,vy->name,vy->fs->count);
+		return -1;
+	}
+
+
+	sprintf(formula,"%s(%s,%s)",p->name,vx->name,vy->name);
+	vout = new_fieldset(1);
+
+	gx = get_nonmissing_field(vx->fs,expand_mem);
+	if(MISSING_FIELD(gx))
+	{
+		field *gout = copy_field(gx,true);
+		release_field(gx);
+		inform_missing_fieldset(vx->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		set_field(vout,gout,0);
+	}
+	else 		/* Start function */
+	{
+		if(vy->scalar)
+		{
+			/* Second parameter is a scalar */
+			for(i=0;i<vx->fs->count;i++)
+			{
+				field *ga = get_field(vx->fs,i,expand_mem);
+				field *gc;
+				if(MISSING_FIELD(ga))
+					gc = copy_field(ga,true);
+				else
+				{
+					gc = copy_field(ga,true);
+					for(j=0;j<ga->value_count;j++)
+						if(ga->values[j] == vy->val)
+						{
+							gc->values[j] = mars.grib_missing_value;
+							gc->bitmap = true;
+						}
+				}
+				set_field(vout,gc,i);
+				if( ((i+1) % SAVE_CNT) == 0)
+					e = e | save_fieldset(vout);
+
+				release_field(ga);
+			}
+		}
+		else if(vx->fs->count == vy->fs->count)
+		{
+			/* Both fieldsets have the same number of fields */
+			for(i=0;i<vx->fs->count;i++)
+			{
+				field *ga = get_field(vx->fs,i,expand_mem);
+				field *gb = get_field(vy->fs,i,expand_mem);
+				field *gc;
+
+				if(ga->value_count != gb->value_count)
+				{
+					marslog(LOG_EROR,
+							"compute: function '%s' need the same number of grid points",
+							p->name);
+					return -1;
+				}
+
+				if(MISSING_FIELD(ga))
+					gc = copy_field(ga,true);
+				else if(MISSING_FIELD(gb))
+					gc = copy_field(gb,true);
+				else
+				{
+					gc = copy_field(ga,true);
+					if(FIELD_HAS_BITMAP(gb)) 
+						copy_bitmap(gc,gb,0);
+				}
+
+				set_field(vout,gc,i);
+				if( ((i+1) % SAVE_CNT) == 0) 
+					e = e | save_fieldset(vout);
+
+				release_field(ga);
+				release_field(gb);
+			}
+		}
+		else 
+		{
+			/* second parameter has 1 field */
+			field *gb = get_field(vy->fs,0,expand_mem);
+			if(MISSING_FIELD(gb))
+			{
+				for(i=0;i<vx->fs->count;i++)
+				{
+					set_field(vout,copy_field(gb,true),i);
+					if( ((i+1) % SAVE_CNT) == 0) 
+						e = e | save_fieldset(vout);
+				}
+			}
+			for(i=0;i<vx->fs->count;i++)
+			{
+				field *ga = get_field(vx->fs,i,expand_mem);
+				field *gc;
+
+				if(MISSING_FIELD(ga))
+					gc = copy_field(ga,true);
+				else
+				{
+					if(ga->value_count != gb->value_count)
+					{
+						marslog(LOG_EROR,
+								"compute: function '%s' need the same number of grid points",
+								p->name);
+						return -1;
+					}
+					gc = copy_field(ga,true);
+					if(FIELD_HAS_BITMAP(gb)) 
+						copy_bitmap(gc,gb,0);
+				}
+				set_field(vout,gc,i);
+				if( ((i+1) % SAVE_CNT) == 0) 
+					e = e | save_fieldset(vout);
+
+				release_field(ga);
+			}
+			release_field(gb);
+		}
+	}
+
+	e = e | push_named_fieldset(strcache(formula),vout);
+	return e;
+}
+
+/******************************************************
+
+  x = nobitmap(y,n), creates a fieldset 'x' with the same
+  number of fields than 'y', setting n as value 
+  for those points on 'y' with grib_missing_value
+  (i.e., for those points of the bitmap).
+
+ *******************************************************/
+
+static err f_nobitmap(math *p,void *data)
+{
+	variable *vx,*vy;
+	fieldset *vout;
+	field *gx;
+	int i,j;
+	char formula[10240];
+	err e = NOERR;
+
+	marslog(LOG_DBUG,"f_bitmap");
+
+	if(!(vy = pop()))
+		return -1;
+
+	if(!(vx = pop()))
+		return -1;
+
+	if(vx->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' needs a fieldset as 1st parameter",p->name);
+		return -1;
+	}
+
+	if(!vy->scalar)
+	{
+		marslog(LOG_EROR,
+				"compute: function '%s' needs a scalar as 2nd parameter",p->name);
+		return -1;
+	}
+
+	sprintf(formula,"%s(%s,%s)",p->name,vx->name,vy->name);
+	vout = new_fieldset(1);
+
+	gx = get_nonmissing_field(vx->fs,expand_mem);
+	if(MISSING_FIELD(gx))
+	{
+		field *gout = copy_field(gx,true);
+		release_field(gx);
+		inform_missing_fieldset(vx->name);
+		marslog(LOG_WARN,"COMPUTE of '%s' not done",formula);
+		set_field(vout,gout,0);
+	}
+	else 		/* Start function */
+	{
+		/* Second parameter is a scalar */
+		for(i=0;i<vx->fs->count;i++)
+		{
+			field *ga = get_field(vx->fs,i,expand_mem);
+			field *gc = copy_field(ga,true);
+			if(FIELD_HAS_BITMAP(ga))
+			{
+				for(j=0;j<ga->value_count;j++)
+					if(MISSING_VALUE(ga->values[j]))
+						gc->values[j] = vy->val;
+				remove_bitmap(gc);
+			}
+
+			set_field(vout,gc,i);
+			if( ((i+1) % SAVE_CNT) == 0)
+				e = e | save_fieldset(vout);
+
+			release_field(ga);
+		}
+	}
+
+	e = e | push_named_fieldset(strcache(formula),vout);
+	return e;
+}
+
+static err f_duplicate(math *p,void* data)
+{
+	variable *va,*vb;
+	fieldset *vc;
+	int i;
+	char formula[10240];
+	err e = NOERR;
+	field *f;
+
+
+	if(!(vb = pop()))
+		return -1;
+
+	if(!(va = pop()))
+		return -1;
+
+	sprintf(formula,"%s(%s,%s)",p->name,va->name,vb->name);
+
+	if(!vb->scalar)
+	{
+		marslog(LOG_EROR, "duplicate: parameter 2 should be a scalar");
+		return -1;
+	}
+
+	if(va->scalar)
+	{
+		marslog(LOG_EROR, "duplicate: parameter 1 should be a fieldset");
+		return -1;
+	}
+
+	if(va->fs->count != 1)
+	{
+		marslog(LOG_EROR, "duplicate: parameter 1 should be a fieldset with 1 field");
+		return -1;
+	}
+
+	vc  = new_fieldset(vb->val);
+	f   = get_field(va->fs,0,packed_file);
+
+	for(i=0;i<vb->val;i++)
+		set_field(vc,f,i);
+
+	release_field(f);
+	e = e | push_named_fieldset(strcache(formula),vc);
+	return e;
+
+}
+
+
+static err notimp(math *p)
+{
+	marslog(LOG_EROR,"Function '%s' not yet implemented",p->name);
+	return -1;
+}
+
+static func builtins[] = {
+
+#ifdef notCRAY
+	{"+",   (funcproc)v_add,(mathproc)NULL,2,},
+	{"-",   (funcproc)v_sub,(mathproc)NULL,2,},
+	{"*",   (funcproc)v_mul,(mathproc)NULL,2,},
+	{"/",   (funcproc)v_div,(mathproc)NULL,2,},
+#else
+	{"+",   (funcproc)binop,(mathproc)b_add,2,},
+	{"-",   (funcproc)binop,(mathproc)b_sub,2,},
+	{"*",   (funcproc)binop,(mathproc)b_mul,2,},
+	{"/",   (funcproc)binop,(mathproc)b_div,2,},
+#endif
+
+
+	{"^",   (funcproc)binop,(mathproc)b_pow,2,},
+	{"=",   (funcproc)binop,(mathproc)b_eq,2,},
+	{"<",   (funcproc)binop,(mathproc)b_lt,2,},
+	{">",   (funcproc)binop,(mathproc)b_gt,2,},
+	{"<=",  (funcproc)binop,(mathproc)b_le,2,},
+	{">=",  (funcproc)binop,(mathproc)b_ge,2,},
+	{"<>",  (funcproc)binop,(mathproc)b_ne,2,},
+	{"and",  (funcproc)binop,(mathproc)b_and,2,},
+	{"or",  (funcproc)binop,(mathproc)b_or,2,},
+	{"mod",  (funcproc)binop,(mathproc)b_mod,2,},
+	{"div",  (funcproc)binop,(mathproc)b_idiv,2,},
+	{"max", (funcproc)f_minmax,(mathproc)b_max,-1,"Maximum"},
+	{"min", (funcproc)f_minmax,(mathproc)b_min,-1,"Minimum"},
+	{"maxvalue", (funcproc)f_v_minmax,(mathproc)b_max,-1,"Maximum value of a variable"},
+	{"minvalue", (funcproc)f_v_minmax,(mathproc)b_min,-1,"Minimum value of a variable"},
+	/* {"meanvalue", (funcproc)f_v_mean,(mathproc)NULL,-1,"Mean value of a variable"}, */
+	{"neg", (funcproc)unop,(mathproc)m_neg,1,},
+	{"sgn", (funcproc)unop,(mathproc)m_sgn,1, "Signe"},
+	{"not", (funcproc)unop,(mathproc)m_not,1,},
+	{"int",  (funcproc)unop, (mathproc)m_int,1,"Integer part" },
+	{"exp",  (funcproc)unop, (mathproc)exp,1, "Exponatial"},
+	{"log",  (funcproc)unop, (mathproc)log,1, "Natural logarythme"},
+	{"log10",(funcproc)unop, (mathproc)log10,1, "Base 10 logarythme"},
+	{"sin",  (funcproc)unop, (mathproc)sin,1, "Sine"},
+	{"cos",  (funcproc)unop, (mathproc)cos,1, "Cosine"},
+	{"tan",  (funcproc)unop, (mathproc)tan,1, "Tangent" },
+	{"asin", (funcproc)unop, (mathproc)asin,1, "Arc sine"},
+	{"acos", (funcproc)unop, (mathproc)acos,1, "Arc cosine"},
+	{"atan", (funcproc)unop, (mathproc)atan,1, "Arc tangent"},
+	{"atan2", (funcproc)binop, (mathproc)atan2,2, "Arc tangent of 2 variables"},
+	{"abs",  (funcproc)unop, (mathproc)fabs,1, "Absolute value"},
+	{"sqrt", (funcproc)unop, (mathproc)sqrt,1,"Square root" },
+	{"count",(funcproc)f_count, (mathproc)NULL,1,
+		"Returns the number of fields in a variable"},
+		{"sum",  (funcproc)f_sum, (mathproc)NULL,1, 
+			"Returns a field sum of all the fields of a variable"},
+			{"mean",  (funcproc)f_mean, (mathproc)NULL,1,
+				"Returns the mean of all the fields"},
+
+				{"rms",  (funcproc)f_rms2, (mathproc)NULL,2,
+					"Returns the rms of two fieldsets"},
+
+					{"rms",  (funcproc)f_rms, (mathproc)NULL,1,
+						"Returns the root mean square of all the fields of a variable"},
+						{"stdev",  (funcproc)f_stdev, (mathproc)NULL,1,
+							"Returns the standard deviation of all the fields of a variable"},
+							{"var",  (funcproc)f_var, (mathproc)NULL,1,
+								"Returns the variance of all the fields of a variable"},
+
+								{"covar",  (funcproc)f_covar, (mathproc)NULL,2,
+									"Returns the covariance of all two fieldsets"},
+
+									{"distribution",  (funcproc)f_distribution, (mathproc)NULL,2,
+										"Returns the distribution of fields"},
+
+										{"duplicate",  (funcproc)f_duplicate, (mathproc)NULL,2,
+											"Duplicates a field N times"},
+											{"repeat",  (funcproc)f_duplicate, (mathproc)NULL,2,
+												"Repeats a field N times"},
+
+												{"merge", (funcproc)f_merge, (mathproc)NULL,-1, "Merge several fieldsets"},
+												{"&",     (funcproc)f_merge, (mathproc)NULL,-1, "Merge several fieldsets"},
+												{"bitmap",(funcproc)f_bitmap, (mathproc)NULL,2, 
+													"Apply bitmap of 2nd fieldset to 1st fieldset"}, 
+													{"nobitmap",(funcproc)f_nobitmap, (mathproc)NULL,2, 
+														"Clear bitmap of 1st fieldset assigning value instead"}, 
+
+														{ NULL,},
+};
+
+func *mars_functions(void)
+{
+	return builtins;
+}
+/* to do : ceil an friends erf dran48 lgamma */
+
+static void list_funcs()
+{
+	int i;
+	marslog(LOG_INFO,"These functions are now implented:");
+	for(i=0;builtins[i].name;i++)
+		if(builtins[i].arity<0)
+			printf("%-8s any number of arguments : %s\n",builtins[i].name,
+					builtins[i].info?builtins[i].info:"No information available");
+		else
+			printf("%-8s %d argument(s)          : %s\n",builtins[i].name,
+					builtins[i].arity,builtins[i].info?builtins[i].info:
+					"No information available");
+
+}
+
+static err call_math_func(math *p,void *data)
+{
+	int i;
+	funcproc  f =  (funcproc)extern_func;
+	mathproc  d = NULL;
+
+	for(i=0;builtins[i].name;i++)
+		if(strcasecmp(builtins[i].name,p->name)==0)
+			if((builtins[i].arity < 0) || (builtins[i].arity == p->arity))
+		{
+			f = builtins[i].addr;
+			d = builtins[i].proc;
+			return f(p,d);
+		}
+
+	for(i=0;builtins[i].name;i++)
+		if(strcasecmp(builtins[i].name,p->name)==0)
+		{
+			f = builtins[i].addr;
+			d = builtins[i].proc;
+			if(builtins[i].arity >= 0)
+				if(builtins[i].arity != p->arity)
+				{
+					marslog(LOG_EROR,"Function '%s' is expecting %d argument(s)"
+							,builtins[i].name,builtins[i].arity);
+					return -1;
+				}
+			break;
+		}
+	return f(p,d);
+}
+
+static err call_load(math *p,void *data)
+{
+	variable *v;
+
+	marslog(LOG_DBUG,"Loading '%s'",p->name);
+	if(is_number(p->name))
+		return push_named_scalar(p->name,atof(p->name));
+	else 
+	{
+		int	args[3];
+		int i;
+		int arity = -p->arity;
+
+		if(arity > 3)
+		{
+			marslog(LOG_EROR,"Wrong number of indices for field name '%s'",
+					p->name);
+			return -1;
+		}
+
+		args[0] = args[1] = args[2] = 0;
+
+		for(i=0;i<arity;i++)
+		{
+			if(!(v = pop())) return -1;
+			if(!v->scalar)
+			{
+				marslog(LOG_EROR,"Bad index for field name '%s': not a scalar",
+						p->name);
+				return -1;
+			}
+
+			args[arity - i - 1] = (int)v->val;
+		}
+
+		v = find_variable(p->name);
+		if(v == NULL)
+		{
+			marslog(LOG_EROR,"Cannot find variable %s",p->name);
+			return -2;
+		}
+		if(v->name)
+			return push_named_fieldset(v->name,sub_fieldset(v->fs,args[0],args[1],args[2]));
+		return push_fieldset(sub_fieldset(v->fs,args[0],args[1],args[2]));
+	}
+}
+
+
+static void advance(void)
+{
+	form++;
+	while(isspace(*form)) form++;
+}
+
+static math *readatom()
+{
+	math *p;
+	int i;
+	char buf[1024];
+
+	switch(*form)
+	{
+		case '(':
+			advance();
+			p = readtest();
+			if(*form != ')')
+			{
+				marslog(LOG_EROR,"Formula: missing )");
+				comperr = 1;
+			}
+			advance();
+			break;
+
+		case '-':
+			p        = NEW_CLEAR(math);
+			p->arity = 1;
+			p->name  = strcache("neg");
+			advance();
+			p->left  = readatom();
+			break;
+
+		case '\0':
+			marslog(LOG_EROR,"Formula: syntax error");
+			comperr = 1;
+			return NULL;
+			/*NOTREACHED*/
+			break;
+
+		default:
+			i = 0;
+
+			if(*form == '\'' || *form == '"')
+			{
+				char c = *form++;
+				while(*form && *form != c) 
+					buf[i++] = *form++;
+				if(*form) form++;
+			}
+			else while(isalpha(*form)||isdigit(*form)||*form =='.'
+					||*form == '_')
+				buf[i++] = *form++;
+
+			buf[i] = 0;
+			if(isspace(*form)) advance();
+
+			p = NEW_CLEAR(math);
+			p->name  = strcache(buf);
+
+			switch(*form)
+			{
+				case '(':
+					advance();
+					p->arity = 0;
+					p->left = readlist(&p->arity);
+					if(*form != ')')
+					{
+						marslog(LOG_EROR,"Formula: missing )");
+						comperr = 1;
+					}
+					advance();
+					break;
+
+				case '[':
+					advance();
+					p->arity = 0;
+					p->left = readlist(&p->arity);
+					if(*form != ']')
+					{
+						marslog(LOG_EROR,"Formula: missing ]");
+						comperr = 1;
+					}
+					p->arity = -p->arity;
+					advance();
+					break;
+
+				default:
+					p->arity = 0;
+					break;
+			}
+
+			break;
+	}
+
+	return p;
+}
+
+static char *opname(char *p,int n)
+{
+	char buf[5];
+	strncpy(buf,p,n);
+	buf[n] = 0;
+	return strcache(buf);
+}
+
+void print_math(math *m)
+{
+	if(m)
+	{
+		putchar('(');
+		print_math(m->left);
+		printf("%s",m->name);
+		print_math(m->right);
+		putchar(')');
+	}
+}
+
+static math *readpower()
+{
+	math *p = readatom();
+
+	while(*form == '^' || (*form == '*' && *(form + 1) == '*') )
+	{
+		math *q  = NEW_CLEAR(math);
+		q->left  = p;
+		q->arity = 2;
+
+		if(*form == '*') { advance(); *form = '^'; }
+
+		q->name     = opname(form,1);
+		advance();
+		q->right    = readatom();
+		p = q;
+	}
+	return p;
+}
+
+static math *readlist(int *n)
+{
+	math *p;
+
+	if(*form == ')') return NULL;
+
+	p  = readtest();
+	*n = 1;
+
+	while(*form == ',')
+	{
+		math *q = NEW_CLEAR(math);
+
+
+		(*n)++;
+
+		q->left  = p;
+
+		advance();
+
+		q->right    = readtest();
+
+		p = q;
+	}
+	return p;
+}
+
+
+static math *readfactor()
+{
+	math *p = readpower();
+	while(*form == '*' || *form == '/')
+	{
+		math *q = NEW_CLEAR(math);
+
+
+		q->arity    = 2;
+		q->left     = p;
+		q->name     = opname(form,1);
+
+		advance();
+
+		q->right    = readpower();
+
+		p = q;
+	}
+	return p;
+}
+
+static math *readterm()
+{
+	math *p = readfactor();
+	while(*form == '+' || *form == '-')
+	{
+		math *q = NEW_CLEAR(math);
+
+
+		q->arity    = 2;
+		q->left     = p;
+		q->name     = opname(form,1);
+
+		advance();
+
+		q->right    = readfactor();
+
+		p = q;
+
+	}
+	return p;
+}
+
+static math *readtest()
+{
+	math *p = readterm();
+	while(*form == '<' || *form == '>' || *form == '=')
+	{
+		math *q = NEW_CLEAR(math);
+		char *x = form;
+		int   n = 1;
+
+
+		q->arity    = 2;
+		q->left     = p;
+
+		advance();
+		if(*form == '=' || *form == '>')
+		{
+			n = 2;
+			advance();
+		}
+
+		q->name = opname(x,n);
+
+		q->right    = readterm();
+
+		p = q;
+
+	}
+	return p;
+}
+
+math *clone_math(math *m)
+{
+	math *n = NULL;
+	if(m)
+	{
+		n = NEW_CLEAR(math);
+		n->arity = m->arity;
+		n->name  = strcache(m->name);
+		n->left  = clone_math(m->left);
+		n->right = clone_math(m->right);
+	}
+	return n;
+}
+
+math *compmath(const char*formula)
+{
+	math *x;
+	char buf[1024];
+
+	strcpy(buf,formula);
+	form = buf;
+
+	comperr = 0;
+	x = readtest();
+	if(comperr)
+		return NULL;
+
+	if(*form)
+	{
+		marslog(LOG_EROR,"Part of the formula was not processed: '%s'",form);
+		return NULL;
+	}
+
+
+	return x;
+}
+
+static err compute(math *p,void *data)
+{
+	err e = NOERR;
+	if(p)
+	{
+		if(e = compute(p->left,data))
+			return e;
+
+		if(e= compute(p->right,data))
+			return e;
+
+		if(p->name)
+			if(p->arity <= 0)
+				return call_load(p,data);
+			else
+				return call_math_func(p,data);
+
+	}
+	return NOERR;
+}
+
+static void fpe(int sig)
+{
+	merr++;
+	signal(SIGFPE,fpe);
+}
+
+void free_math(math *m)
+{
+	if(m)
+	{
+		free_math(m->left);
+		free_math(m->right);
+		strfree(m->name);
+		FREE(m);
+	}
+}
+
+
+err calculate(math *c,const char *f,void *data)
+{
+	int saveerrno = errno;
+	int savemerr  = merr ;
+	err e = 0;
+	variable *v ;
+
+	if(mars.debug)
+	{
+		marslog(LOG_DBUG|LOG_NOCR,"Formula is : ");
+		print_math(c);
+		putchar('\n');
+	}
+
+	/* signal(SIGFPE,fpe); */
+	merr = 0;
+	errno = 0;
+	e = compute(c,data);
+
+	if(merr)  marslog(LOG_WARN,"%d math error(s) where reported",merr);
+
+	if(e == NOERR)
+	{
+		v = pop();
+		if(v) if(v->scalar)
+			marslog(LOG_INFO,"The result of compute is a scalar: %g",v->val); 
+		else
+			marslog(LOG_INFO,"%d resulting field(s) put in fieldset '%s'",
+					v->fs->count,f);
+		new_variable(f,v->fs,v->val);
+	}
+
+	errno = saveerrno;
+	merr  = savemerr;
+	return e;
+}
+
+err handle_compute(request *r,void *data)
+{
+	const char *s = get_value(r,"FORMULA",0);
+	const char *f = get_value(r,"FIELDSET",0);
+	const char *tgt = get_value(r,"TARGET",0); 
+	math *c = compmath(no_quotes(s));
+	err  e;
+
+
+
+#ifndef METVIEW
+	timer *t;
+	char buf[1024];
+	sprintf(buf,"Computing %s",s);
+	t=get_timer(buf,NULL,false);
+	timer_start(t);
+#endif
+
+    if(mars.webmars_target && tgt) {
+        tgt = mars.webmars_target;
+    }
+
+	marslog(LOG_DBUG,"Formula is: %s",s);
+	if(!c) { free_math(c); return -1; }
+
+	e = calculate(c,f,data);
+	free_math(c);
+
+#ifndef METVIEW
+	timer_stop(t,0);
+
+	if((e == NOERR) && tgt)
+	{
+		extern base_class *targetbase;
+		variable *v = find_variable(f);
+		database *target;
+
+		if(!v) {
+			marslog(LOG_EROR,"Fieldset not found: '%s'",f);
+			return -1;
+		}
+
+		if(v->scalar)
+		{
+			marslog(LOG_EROR,"WRITE failed. Field '%s' is a scalar (%g)",
+					s,v->val);
+			return -1;
+		}
+
+		target = database_open(targetbase,NULL,r,NULL,WRITE_MODE);
+
+		if(target == NULL)
+			return -1;
+
+		e = write_fieldset(v->fs,target);
+
+		database_close(target);
+
+		if(e) return e;
+
+		marslog(LOG_INFO,"WRITE %d field(s) from fieldset %s to file '%s'", v->fs->count,f,tgt);
+		return NOERR;
+	}
+
+#endif
+
+	return e;
+}
diff --git a/src/libMars/check.c b/src/libMars/check.c
new file mode 100644
index 0000000..694d17e
--- /dev/null
+++ b/src/libMars/check.c
@@ -0,0 +1,479 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+*/
+
+#include "mars.h"
+#include "lang.h"
+
+void print_conditions(condition *c)
+{
+	static char *opnames[] = {
+		"val","%or","%and",
+		"%not","=","<",">","<>",">=","<=","%in",
+	};
+	value *v;
+
+	if(c)
+	{
+		putchar('[');
+
+		switch(c->op)
+		{
+
+		case t_val:
+			v = (value*)c->left;
+			printf("%s\n",v->name);
+			break;
+
+		case t_func:
+			printf("%s(%s)\n",(char*)c->left, (char*)c->right);
+			break;
+
+		case t_not:
+			printf("%%not ");
+			print_conditions(c->left);
+			break;
+
+		default:
+			print_conditions(c->left);
+			printf(" %s ",opnames[c->op]);
+			print_conditions(c->right);
+			break;
+		}
+
+		putchar(']');
+	}
+}
+
+static boolean bad_param;
+
+static int compvalues(request  *r,condition *t)
+{
+	condition *t1 = t->left;
+	condition *t2 = t->right;
+	char      *name;
+	const char      *par;
+	char      *val;
+
+	if(t1->op != t_val || t2->op != t_val)
+		marslog(LOG_EXIT,"Bad test");
+
+	name = ((value*)(t1->left))->name;
+
+
+	par = get_value(r,name,0);
+
+	if(par == NULL) {
+		bad_param=true;
+		return -1;
+	}
+
+	val = ((value*)(t2->left))->name;
+
+
+	if(is_number(par) && is_number(val))
+		if(EQ(name,"DATE"))
+			return date_to_julian(atol(par)) - date_to_julian(atol(val));
+		else
+			return atof(par) - atof(val);
+
+	return strcmp(par,val);
+
+}
+
+
+static int complist(request  *r,condition *t)
+{
+	marslog(LOG_WARN,"IN TEST NOT IMP.");
+	return 0;
+}
+
+boolean old_expver_func(request* r,char *n, char *a) {
+
+	/* TODO: Create a global option... */
+	const char* c = get_value(r,"CLASS",0);
+	const char* e = no_quotes(get_value(r,"EXPVER",0));
+	char path[1024];
+	char line[1024];
+	FILE* f;
+
+	if(a) c = a;
+
+	if(!c) { marslog(LOG_WARN,"old_expver_func: CLASS is not defined"); return false; }
+	if(!e) { marslog(LOG_WARN,"old_expver_func: EXPVER is not defined"); return false; }
+
+	sprintf(path,"%s/etc/old_expver.%s", getenv("MARS_HOME") ? getenv("MARS_HOME") : ".", lowcase(c));
+
+	f = fopen(path,"r");
+	if(!f) {
+		marslog(LOG_EXIT|LOG_PERR,"old_expver_func: cannot open %s",path);
+		return false; 
+	}
+
+	while(fgets(line, sizeof(line), f))
+	{
+		if(strncmp(e,line,4) == 0)
+			return true;
+	}
+
+	fclose(f);
+
+	return false;
+}
+
+
+boolean call_func(request* c,char *f, char *a) {
+/* For now, hardcoded ... */
+	if(strcmp(f,"old_expver") == 0) return old_expver_func(c,f,a);
+	marslog(LOG_EXIT,"Invalid function in chk [%s](%s)", f, a?a:"null");
+}
+
+boolean condition_check(request *c,condition *t)
+{
+	boolean b;
+	char *p,*q;
+
+	switch (t->op)
+	{
+	case t_or :
+		b =  condition_check(c,t->left) || condition_check(c,t->right);
+		break;
+
+	case t_and  :
+		b =  condition_check(c,t->left) && condition_check(c,t->right);
+		break;
+
+	case t_not :
+		b =  !condition_check(c,t->left);
+		break;
+
+	case t_val :
+		b =  count_values(c,((value*)(t->left))->name) != 0;
+		break;
+
+	case t_func :
+		p = (char*)t->left;
+		q = (char*)t->right;
+		return call_func(c, p,q);
+		break;
+
+	case t_eq :
+		b =  compvalues(c,t) == 0;
+		break;
+
+	case t_lt :
+		b =  compvalues(c,t) < 0;
+		break;
+
+	case t_gt :
+		b =  compvalues(c,t) > 0;
+		break;
+
+	case t_ne :
+		b =  compvalues(c,t) != 0;
+		break;
+
+	case t_ge :
+		b =  compvalues(c,t) >= 0;
+		break;
+
+	case t_le :
+		b =  compvalues(c,t) <= 0;
+		break;
+
+	case t_in :
+		b = complist(c,t);
+		break;
+
+
+	}
+
+	/*
+	if(mars.debug)
+	{
+		print_conditions(t);
+		putchar('\n');
+		marslog(LOG_DBUG," -> %s",b?"true":"false");
+	}
+	*/
+
+	return b;
+}
+
+rule *read_check_file(const char *fname)
+{
+	extern rule *parser_ruls;
+	rule  *r;
+	if(parser(fname,false) != NOERR)
+	{
+		free_rule(parser_ruls);
+		parser_ruls = NULL;
+		return NULL;
+	}
+	r    = parser_ruls;
+	parser_ruls = NULL;
+	return r;
+}
+
+
+void print_actions(action *a)
+{
+
+}
+
+void print_rules(rule *r)
+{
+	while(r)
+	{
+		printf("%%if ");
+		print_conditions(r->test);
+		printf(" %%then\n");
+		print_actions(r->doit);
+		putchar('\n');
+		r = r->next;
+	}
+}
+
+boolean doaction(rule *c,request *r,action *a)
+{
+	FILE    *f   = 0;
+	request *env = 0;
+	char *s;
+	parameter *p;
+	value     *v;
+	boolean   b;
+	boolean   x = true;
+
+	while(a)
+	{
+		switch(a->op)
+		{
+		case a_set:
+			p = (parameter*)a->param;
+			marslog(LOG_DBUG,"Setting param %s to:",
+			    p->name);
+
+			if(mars.debug)
+			{
+				printf("%s\n",p->values->name);
+				putchar('\n');
+			}
+
+			v = p->values;
+			b = false;
+			while(v)
+			{
+				if(b) add_value(r,p->name,v->name);
+				else set_value(r,p->name,v->name);
+				b = true;
+				v = v->next;
+			}
+			break;
+
+		case a_unset:
+			s = (char*)a->param;
+			marslog(LOG_DBUG,"Unsetting param %s",s);
+			unset_value(r,s);
+			add_value(r,"_UNSET","%s",s);
+			break;
+
+		case a_warning:
+			s = (char*)a->param;
+			marslog(LOG_WARN,"%s",no_quotes(s));
+			break;
+
+		case a_info:
+			s = (char*)a->param;
+			marslog(LOG_INFO,"%s",no_quotes(s));
+			break;
+
+		case a_mail:
+			env = get_environ();
+			s = (char*)a->param;
+			f = mail_open(mars.dhsmail,"%s",no_quotes(s));
+			mail_request(f,"MARS Request:",r);
+			mail_request(f,"MARS Environment:",env);
+			mail_close(f);
+			break;
+
+		case a_mailuser:
+			notify_user(s,r);
+			break;
+
+		case a_error:
+			s = (char*)a->param;
+			marslog(LOG_EROR,"%s",no_quotes(s));
+			x = false;
+			break;
+
+		case a_exit:
+			s = (char*)a->param;
+			marslog(LOG_EXIT,"%s",no_quotes(s));
+			break;
+
+		case a_fail:
+			x = false;
+			marslog(LOG_DBUG,"Fail");
+			if(mars.debug)
+			{
+				print_one_request(r);
+				putchar('\n');
+				print_conditions(c->test);
+				putchar('\n');
+			}
+			break;
+		}
+		a = a->next;
+	}
+
+	return x;
+}
+
+boolean check_one_request(rule *c,request *r)
+{
+	boolean b = true;
+
+	if(r == NULL) return true;
+
+	set_value(r,"_VERB",r->name);
+	if(mars.appl)
+		set_value(r,"_APPL",mars.appl);
+
+	while(c)
+	{
+		bad_param = false;
+
+		if(condition_check(r,c->test) && !bad_param)
+			b = doaction(c,r,c->doit) && b;
+		c = c->next;
+	}
+
+
+	return b;
+}
+
+rule *new_rule(condition *c,action *a)
+{
+	rule *r = NEW_CLEAR(rule);
+	r->test = c;
+	r->doit = a;
+	return r;
+}
+
+condition *new_condition(testop op,condition *l,condition *r)
+{
+	condition *c = NEW_CLEAR(condition);
+	c->op    = op;
+	c->left  = l;
+	c->right = r;
+	return c;
+}
+
+action *new_action(actop op,void *parm)
+{
+	action *a = NEW_CLEAR(action);
+	a->op    = op;
+	a->param = parm;
+	return a;
+}
+
+condition *clone_condition(condition *c)
+{
+	if(!c) return NULL;
+
+	if(c->op == t_func)
+		return new_condition(t_func,
+			(condition*)strcache((char*)c->left),
+			(condition*)strcache((char*)c->right));
+	else if(c->op == t_val)
+		return new_condition(t_val,
+			(condition*)clone_all_values((value*)(c->left)),
+		    NULL);
+	else
+		return new_condition(c->op,
+		    clone_condition(c->left),
+		    clone_condition(c->right)
+		    );
+}
+
+void free_action(action *a)
+{
+	while(a)
+	{
+		action *b = a->next;
+
+		switch(a->op)
+		{
+
+		case a_set:
+			free_all_parameters((parameter*)a->param);
+			break;
+
+		case a_unset:
+		case a_warning:
+		case a_info:
+		case a_mail:
+		case a_mailuser:
+		case a_error:
+		case a_exit:
+			strfree((char*)a->param);
+			break;
+
+		case a_fail:
+			break;
+
+		default:
+			marslog(LOG_EXIT,"free_action : unknown action");
+			break;
+
+		}
+		FREE(a);
+		a = b;
+	}
+
+}
+
+void free_condition(condition *c)
+{
+	if(c)
+	{
+		if(c->op == t_func)
+		{
+			strfree((char*)c->left);
+			strfree((char*)c->right);
+		}
+		else if(c->op == t_val)
+			free_all_values((value*)(c->left));
+		else
+		{
+			free_condition(c->left);
+			free_condition(c->right);
+		}
+		FREE(c);
+	}
+}
+
+void free_rule(rule *r)
+{
+	while(r)
+	{
+		rule *n = r->next;
+		free_condition(r->test);
+		free_action(r->doit);
+		FREE(r);
+		r = n;
+	}
+}
diff --git a/src/libMars/control.c b/src/libMars/control.c
new file mode 100644
index 0000000..8a3b9f6
--- /dev/null
+++ b/src/libMars/control.c
@@ -0,0 +1,109 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+M.Fuentes
+ECMWF Mar-97
+
+(Groups auxiliary verbs as: FLUSH, LIST, REMOVE, ...
+*/
+
+#include <errno.h>
+#include "mars.h"
+
+struct cntl { 
+	char* verb;
+	int   code;
+} controls[] =
+{
+	{"FLUSH",  CNTL_FLUSH, },
+	{"LIST",   CNTL_LIST, },
+	{"BROWSE",   CNTL_LIST, },
+	{"REMOVE", CNTL_REMOVE, },
+	{"ATTACH", CNTL_ATTACH, },
+	{"STAGE",  CNTL_STAGE, },
+	{"STORE",  CNTL_STORE, },
+	{"GET",   CNTL_LIST, },
+	{ NULL,    0, },
+};
+
+static err control(request *b,request *r, int code)
+{
+	database   *bout;
+	err ret;
+	const char *name = 0;
+	request    *cache = 00;
+
+	bout = openbase(b,r,&name,&cache,READ_MODE);
+	if(!bout) return -2;
+
+	ret = database_control(bout,code,r,0);
+	database_close(bout);
+
+	marslog(LOG_INFO,"Request performed on database '%s'",name);
+
+	return ret;
+}
+
+err handle_control(request *r,void *data)
+{
+	const char    *s = get_value(r,"DATABASE",0);
+	const char    *v = request_verb(r);
+	int visit = 0;
+
+	if(s == 0)
+	{
+		marslog(LOG_EROR,"%s needs DATABASE set",v);
+		return -5;
+	}
+	else
+	{
+		int i    = 0;		
+		int code = 0;		
+		err last = 0;
+
+
+		/* Lookup control code */
+
+		while(controls[i].verb)
+			if(EQ(v,controls[i].verb))
+				break;
+			else
+				i++;
+
+		if( ! controls[i].verb)
+		{
+			marslog(LOG_EROR,"%s confused MARS",v);
+			return -5;
+		}
+		else
+			code = controls[i].code;
+
+		i=0;
+		while( s = get_value(r,"DATABASE",i++) )
+		{
+			request *b = findbase(s);
+			if(!b) return -2;
+
+			last = control(b,r,code);
+			if(last == NOERR)
+				visit++;
+
+			if(visit>0)
+				last=NOERR;
+		}
+
+		return last;
+	}
+
+	/*NOTREACHED*/
+	return 0;
+}
diff --git a/src/libMars/control.h b/src/libMars/control.h
new file mode 100755
index 0000000..d76430f
--- /dev/null
+++ b/src/libMars/control.h
@@ -0,0 +1,25 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/* common control code for all databases */
+
+#define CNTL_REWIND		1
+#define CNTL_HASDATA	2 /* arg is boolean true is data ready */
+
+#define CNTL_FLUSH      3
+#define CNTL_LIST       4
+#define CNTL_REMOVE     5
+#define CNTL_ATTACH     6
+#define CNTL_STAGE      7
+#define CNTL_ERROR      8
+
+#define CNTL_REGISTER   9
+#define CNTL_STORE      10
+#define CNTL_FETCH      11
diff --git a/src/libMars/cos.c b/src/libMars/cos.c
new file mode 100644
index 0000000..fd3dbb2
--- /dev/null
+++ b/src/libMars/cos.c
@@ -0,0 +1,259 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*****************************************************************************
+
+  These routines implemente a C access to COS blocked files
+
+  B.Raoult
+
+  Thu May  9 09:36:24 BST 1991
+
+*****************************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+#include "cos.h"
+
+#define CRAYBLK		4096
+
+/*****************************************************************************
+
+  This routine checks if the current control word is a valid BCW
+  It needs to be improved.
+
+*****************************************************************************/
+
+static validate_bcw(cf)
+COSFILE *cf;
+{
+	if(M(cf->cw)==0) /* is it a BCW ? */
+	{
+		if(BN(cf->cw) != cf->block) return FALSE;
+		cf->block++;
+		return TRUE;
+	}
+	else return FALSE;
+}
+
+/*****************************************************************************
+
+  This routine checks if the current control word is a valid RCW
+  It needs to be improved.
+
+*****************************************************************************/
+
+static validate_rcw(cf)
+COSFILE *cf;
+{
+	if(M(cf->cw)!=0) /* is it a RCW ? */
+	{
+		return TRUE;
+	}
+	else return FALSE;
+}
+
+/*****************************************************************************
+
+  Reads a control word. Checks if is it a valid block.
+
+*****************************************************************************/
+
+static void read_control_word(cf,blocktype)
+COSFILE *cf;
+int     blocktype;
+{
+
+	int validflag = FALSE;
+
+	if(!fread(&(cf->cw),sizeof(crayword),1,cf->f))
+		cf->err = errno?errno:-1;
+	else {
+
+		if(blocktype & BCW) validflag = validate_bcw(cf);
+		if(blocktype & RCW) validflag = validflag | validate_rcw(cf);
+
+		if(!validflag)
+		{
+			cf->err = -1;
+			fprintf(stderr,"Bad control word file %s\n",cf->fname);
+			/* exit(1); it is a fatal error  */
+		}
+	}
+
+}
+
+/*****************************************************************************
+
+   opening a cos blocked file.
+
+*****************************************************************************/
+
+COSFILE *cos_open(const char *fname)
+{
+	COSFILE 	*cf = (COSFILE*)malloc(sizeof(COSFILE));
+
+	if(cf==NULL)
+	{
+		/* perror("Opening file"); */
+		return NULL;
+	}
+
+	cf->f = fopen(fname,"r");
+
+	cf->buffer = NULL;
+	cf->cnt    = CRAYBLK;
+
+	if(cf->f==NULL)
+	{
+		free(cf);
+		perror("Opening file");
+		return NULL;
+	}
+
+	cf->err   = 0;
+	cf->block = 0;
+	cf->fname = (char*)strdup(fname);
+
+	read_control_word(cf,BCW);
+	if(cf->err) 
+	{
+		cos_close(cf);
+		return NULL;
+	}
+
+	return cf;
+}
+
+/*****************************************************************************
+
+   reading a cos blocked file. On exit buf contains the data,
+   len the number of bytes read. The return code is 0 if all Ok,
+   -1 if  end of file, anything else otherwise.
+
+
+   Note: buf must be big enough to hold the data.
+
+*****************************************************************************/
+
+int cos_read(cf,buf,len)
+COSFILE *cf;
+char *buf;
+long *len;
+{
+	long		offset;
+
+	*len = 0;
+
+	do
+	{
+		offset = FWI(cf->cw);
+		if(offset)
+		{
+			if(!fread(buf,offset,1,cf->f))
+			{
+				/* perror("Reading data"); */
+				cf->err = errno?errno:-1;
+				return cf->err;
+			}
+			*len += offset;
+			buf  += offset;
+		}
+		read_control_word(cf,BCW | RCW);
+
+	}while(M(cf->cw)==0);
+
+	if(M(cf->cw) == COSEOF) return EOF;
+	return 0;
+
+}
+
+/*****************************************************************************
+******************************************************************************/
+
+int cos_write(cf,buf,len)
+COSFILE *cf;
+char *buf;
+long len;
+{
+
+	if(len==0)return 0;
+	if(!cf->buffer) 
+	{ 
+		cf->cnt    = CRAYBLK;
+		cf->buffer = (char*) malloc(CRAYBLK);
+		if(!cf->buffer) return -1;
+	}
+
+
+	
+	
+	return 0;
+}
+
+
+/*****************************************************************************
+
+   Close a cos blocked file.
+
+*****************************************************************************/
+
+cos_close(cf)
+COSFILE *cf;
+{
+	fclose(cf->f);
+	if(cf->buffer) free(cf->buffer);
+	free(cf->fname);
+	free(cf);
+	return errno;
+}
+
+
+/****************************************************************************
+
+
+  FORTRAN interface : 
+
+  CALL COSOPEN(ICF,'MYFILE',IERR)
+  CALL COSREAD(ICF,IARRAY,ILEN,IERR)
+  CALL COSCLOSE(ICF,IERR)
+
+*****************************************************************************/
+
+void COSOPEN(filedesc,fname,e)
+char	*fname;
+long	*e;
+COSFILE **filedesc;
+{
+	COSFILE *cf ;
+
+	cf = *filedesc = cos_open(fname);
+	if (cf == NULL) *e = errno?errno:1;
+	else *e = cf->err;
+}
+
+void COSCLOSE(filedesc,e)
+long	*e;
+COSFILE **filedesc;
+{
+	*e = cos_close(*filedesc);
+}
+
+void COSREAD(filedesc,buffer,len,e)
+char	*buffer;
+long	*e;
+long	*len;
+COSFILE **filedesc;
+{
+	*e=cos_read(*filedesc,buffer,len);
+
+}
diff --git a/src/libMars/cos.h b/src/libMars/cos.h
new file mode 100644
index 0000000..0a0159c
--- /dev/null
+++ b/src/libMars/cos.h
@@ -0,0 +1,82 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+
+/*
+
+0123456789012345678901234567890123456789012345678901234567890123
+0         1         2         3         4         5         6
+
+Block control word (BCW)
+
+XXXXX...........................................................  -> M
+...........X....................................................  -> BDF
+...............................XXXXXXXXXXXXXXXXXXXXXXXX.........  -> BDN
+.......................................................XXXXXXXXX  -> FWI
+
+Record control word (RCW)
+
+XXXXX...........................................................  -> M
+.....XXXXXX.....................................................  -> UBC
+....................XXXXXXXXXXXXXXXXXXXXX.......................  -> PFI
+.........................................XXXXXXXXXXXXXX.........  -> PRI
+.......................................................XXXXXXXXX  -> FWI
+
+*/
+
+#define FWI(x)   (((x.loword) & 0x000001FF) <<  3) /* forward index         */
+#define PRI(x)   (((x.loword) & 0x00FFFE00) >>  6) /* previous record index */
+#define PFI(x)   (((x.loword) & 0x00FFFE00) >>  6) /* previous record index */
+#define UBC(x)   (((x.loword) & 0x0FC00000) >> 20) /* unused bit count      */
+#define M(x)     (((x.hiword) & 0xF0000000) >> 28) /* type of block         */
+#define BDF(x)   (((x.hiword) & 0x00100000) >> 28) /* bad data flag         */
+#define BN(x)    (((x.loword) & 0xFFFFFE00) >>  9) /* block number          */
+
+#define COSEOF     0xE		/* COS end of file */
+
+#define BCW		 1			/* block control word  */
+#define RCW      2          /* record control word */
+
+#define COSFILE  cosfile	
+#ifndef TRUE
+#define TRUE	 1
+#endif
+#ifndef FALSE
+#define FALSE	 0
+#endif
+
+/* a cray word is 64 bits = 2x32 bits = 2x1 sun word */
+
+typedef struct {
+	unsigned int	hiword:32;
+	unsigned int	loword:32;
+} crayword;
+
+/* definition of a cosfile */
+
+typedef struct {
+	FILE 	 		*f;     /* current file              */
+	crayword 		cw;     /* current control word      */
+	unsigned int	block;  /* current BCW number        */
+	int				err;    /* last error                */
+	char			*buffer;/* used for cos_write        */
+	long			cnt;    /* number of bytes in buffer */
+	char			*fname; /* file name                 */
+} cosfile;
+
+/* prototypes */
+/* C interface */
+
+COSFILE *cos_open (const char *fname);
+int cos_read (COSFILE *cf, char *buf, long *len);
+int cos_close(COSFILE *cf);
+
+
+#undef _Z
diff --git a/src/libMars/dhsbase.c b/src/libMars/dhsbase.c
new file mode 100755
index 0000000..c56b58e
--- /dev/null
+++ b/src/libMars/dhsbase.c
@@ -0,0 +1,2817 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#ifdef ODB_SUPPORT
+#include "odb.h"
+#endif
+#include <setjmp.h>
+#include <signal.h>
+#include <errno.h>
+
+
+
+#ifdef AIX
+#include <netdb.h>
+#endif
+
+static jmp_buf env;
+
+static void catch_alarm(int sig)
+{
+	longjmp(env,1);
+}
+
+static void dhs_init(void);
+
+static err  dhs_open(void *data,request*,request*,int);
+static err  dhs_close(void *data);
+static err  dhs_read(void *data,request *r,void *buffer,long *length);
+static err  dhs_write(void *data,request *r,void *buffer,long *length);
+static err  dhs_cntl(void *data,int code,void *param,int size);
+static err  dhs_archive(void *data,request *r);
+static boolean dhs_check(void *data,request *r);
+static err  dhs_validate(void *data,request*,request*,int);
+
+typedef struct dhsdata {
+	int               port;
+	char              *host;
+	char              *address;
+	int               local_port;
+
+	int               csoc; /* Current sockect */
+	int               asoc; /* Accept socket */
+	ulong64           id;
+	mstream           s;
+	request           *req;
+	boolean  		  finished;
+	boolean  		  obs;
+	boolean  		  finish_on_error;
+	boolean			  is_bufrfile;
+	boolean			  odb;
+	FILE			  *f;
+	int               count;
+	int               retry;
+	int               timeout;
+	wind*             u_v;
+	long64            total_read;
+	long64            total_toread;
+	long64            total_tosend;
+	long64            data_size;
+	long			  save_expansion_flags;
+	boolean           know_obs;
+
+	boolean		      fetch;
+	request          *metadata;
+	request          *current;
+	int              index;
+	long64           *reclen;
+
+	boolean          quiet;
+	boolean          open;
+
+	char             *check;
+	boolean          retry_on_client;
+	boolean          retry_forever_on_client;
+
+	boolean          server_send_error;
+	boolean          server_send_data;
+
+	char             *read_disk_buffer;
+
+	boolean          print_callback;
+	boolean          skip_odb_check;
+
+	mars_grib_index* head_idx;
+	mars_grib_index* tail_idx;
+
+} dhsdata;
+
+static option opts[] = {
+
+	{"port","MARS_DHS_PORT","-dhsport","9000",t_int,sizeof(int),
+		OFFSET(dhsdata,port)},
+
+	{"host","MARS_DHS_HOST","-dhshost","porthos",t_str,sizeof(char*),
+		OFFSET(dhsdata,host)},
+
+	{"retry",NULL,NULL,"0",t_int,sizeof(int),
+		OFFSET(dhsdata,retry)},
+
+	{"timeout","MARS_DHS_TIMEOUT",NULL,"20",t_int,sizeof(int),
+		OFFSET(dhsdata,timeout)},
+
+	{NULL,"MARS_DHS_LOCALHOST",NULL,NULL,t_str,sizeof(char*),
+		OFFSET(dhsdata,address)},
+
+	{"local_port","MARS_DHS_LOCALPORT",NULL,"0",t_int,sizeof(int),
+		OFFSET(dhsdata,local_port)},
+
+
+	{"obs","MARS_KNOW_OBS",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(dhsdata,know_obs)},
+
+	{"finish_on_error","MARS_FINISH_ON_ERROR",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(dhsdata,finish_on_error)},
+
+	{"check","MARS_DHSBASE_CHECK",NULL,"chk/dhs.chk",t_str,sizeof(char*),
+		OFFSET(dhsdata,check)},
+
+	{"print_callback","MARS_DHS_PRINT_CALLBACK",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(dhsdata,print_callback)},
+
+	{"skip_odb_check","MARS_DHS_SKIP_ODB_CHECK",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(dhsdata,skip_odb_check)},
+
+};
+
+base_class _dhsbase = {
+
+	NULL,                      /* parent class */
+	"dhsbase",                 /* name         */
+
+	false,                     /* inited       */
+
+	sizeof(dhsdata),           /* private size */
+	NUMBER(opts),              /* option count */
+	opts,                      /* options      */
+
+	dhs_init,                  /* init         */
+
+	dhs_open,                  /* open         */
+	dhs_close,                 /* close        */
+
+	dhs_read,                  /* read         */
+	dhs_write,                 /* write        */
+
+	dhs_cntl,                  /* control      */
+
+	dhs_check,                 /* check        */
+	NULL,                      /* query        */
+
+	dhs_archive,               /* archive      */
+	NULL,                      /* admin        */
+
+	dhs_validate,              /* validate */
+};
+
+
+base_class *dhsbase = &_dhsbase;
+
+static err  dhs_wait(dhsdata*);
+
+static void dhs_init(void)
+{
+}
+
+
+/* Checks that all single values contained in request 'a' 
+   are in request 'b' */
+static err fix_check(const request *grib,const request *req, int cnt)
+{
+	/* Should have everything which is not used for field ordering */
+
+	static struct {
+		const char *name;     /* Name of the MARS parameter to check */
+		boolean     always;   /* If consistency grib<->request must always exist */
+	} checks [] = {
+
+		{ "CLASS",    true, },
+		{ "TYPE",     true, },
+		{ "STREAM",   true, },
+		{ "LEVTYPE",  true, },
+		{ "_GRID_EW", false, },
+		{ "_GRID_NS", false, },
+		{ "ORIGIN",   true, },
+		{ "MODEL",   true, },
+
+		{ "PRODUCT",   true, },
+		{ "SECTION",   true, },
+		{ "METHOD",    true, },
+		{ "SYSTEM",    true, },
+
+		/* Already in field_order */
+		/* "EXPVER", */
+		/* "DATE", */
+		/* "TIME", */
+		/* "REFERENCE", */
+		/* "STEP", */
+		/* "FCMONTH", */
+		/* "FCPERIOD", */
+		/* "DOMAIN", */
+		/* "DIAGNOSTIC", */
+		/* "ITERATION", */
+		/* "NUMBER", */
+		/* "LEVELIST", */
+		/* "LATITUDE", */
+		/* "LONGITUDE", */
+		/* "RANGE", */
+		/* "PARAM", */
+		/* "FREQUENCY", */
+		/* "DIRECTION", */
+
+	};
+
+	int j = 0;
+	if(mars.pseudogrib)
+		return NOERR;
+
+	if(grib && req)
+	{
+		while(j < NUMBER(checks))
+		{
+			int i = 0;
+			const char *p = checks[j].name;
+			const char *s = get_value(grib,p,i);
+			const char *r = get_value(req,p,i);
+
+#if 1
+			/* This extra check needs 
+			   exhaustive testing */
+			/* If value is provided in the request
+			   but not in the GRIB header, fail */
+			if(r && !s)
+			{
+				marslog(LOG_EROR,"Cannot determine '%s' from GRIB header for grib %d",p,cnt);
+				marslog(LOG_EROR,"Grib description follows:");
+				print_all_requests(grib);
+				return -6; 
+			}
+#endif
+
+			while(s)
+			{
+				if( !value_exist(req,p,s) )
+				{
+#if 0
+					const char *str  = get_value(grib,"STREAM",0);
+					const char *clss = get_value(grib,"CLASS",0);
+					boolean     grid = ( strcmp(p,"_GRID_EW")==0 || strcmp(p,"_GRID_NS")==0);
+					/* In ERA 40 they do not care about the grid */
+					boolean     supd = ( strcmp(str,"SUPD") == 0 && strcmp(str,"E4") == 0);
+
+					if( supd || (!supd && !grid))
+					{
+#endif
+						marslog(LOG_EROR,"Grib %d contains %s = %s. Grib description follows:",cnt,p,s);
+						print_all_requests(grib);
+						return -6;
+#if 0
+					}
+#endif
+				}
+				s = get_value(grib,p,++i);
+			}
+			j++;
+		}
+	}
+	return NOERR;
+}
+
+static const char* fast_value(const request *r,const char* name)
+{
+	if(r && name)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			if(p->name == name) return p->values?p->values->name:NULL;
+			p = p->next;
+		}
+	}
+	return NULL;
+}
+
+static int cmp_no_hidden(const request *a,const request *b)
+{
+	int n;
+
+	static const char* repres   = 0;
+
+	if(repres == 0)
+		repres   = strcache("REPRES");
+
+	if(a && b)
+	{
+		parameter *p = a->params;
+
+		while(p)
+		{
+			const char *s = fast_value(a,p->name);
+			const char *t = fast_value(b,p->name);
+
+			if(s && t && (*p->name!='_') && p->name != repres )
+			{
+
+				n = (s != t);
+				if(n != 0 && is_number(s)) n = atof(s) - atof(t);
+				if(n) {
+					if(mars.debug)
+						marslog(LOG_DBUG,"Compare failed: %s -> %s <> %s",p->name,s,t);
+					return n;
+				}
+			}
+
+			p = p->next;
+		}
+	}
+	return 0;
+}
+
+static int find_order(request **v,request *g)
+{
+	request *w = 0;
+	request *u = *v;
+
+	while(u)
+	{
+		if(cmp_no_hidden(u,g) == 0)
+		{
+			int order = u->order;
+			if(w != 0)
+				w->next = u->next;
+			else
+				*v = u->next;
+
+#if 1
+			/* try to reorganise the list so next time we scan the minumum */
+
+			if(w != 0)
+			{
+				request *z = w->next;
+				request *p = 0;
+
+				while(z) { p = z; z = z->next; }
+
+
+				if(p != 0)
+				{
+					p->next = *v;
+					*v      = w->next;
+					w->next = 0;
+				}
+
+			}
+#endif
+
+			u->next = NULL;
+			free_one_request(u);
+
+			return order;
+		}
+		w = u;
+		u = u->next;
+	}
+
+	return -1;
+}
+
+int find_long(long* p,int count,long search)
+{
+	int i;
+	for (i = 0; i < count; i++)
+		if (p[i] == search)
+			return TRUE;
+	return FALSE;
+}
+
+static err init_subtype_tables(request* r,
+		char* subtype_group,
+		char* known_subtypes)
+{
+	memset((void*) subtype_group,0,256);
+	memset((void*) known_subtypes,0,256);
+
+	if (count_values(r,"OBSGROUP") == 1)
+	{
+		request*	dummy_request;
+		request*	expanded_request;
+		int			count;
+		int			i;
+
+		/*----------------------------------------------------------------*/
+		/* We expand a dummy request with the obstype value to get all    */
+		/* the subtypes in the obstypes. We put 2 into every entry in the */
+		/* table                                                          */
+		/*----------------------------------------------------------------*/
+		count = count_values(r,"OBSTYPE");
+		for (i = 0; i < count; i++)
+		{
+			long st = atol(get_value(r,"OBSTYPE",i));
+			if (st < 0 || st > 255)
+			{
+				marslog(LOG_EROR,"Subtype %d is greater than 255. "\
+						"If this is a valid subtype, please contact the MARS group",
+						st);
+				return -6;
+			}
+			subtype_group[st] = 2;
+		}
+
+		/*----------------------------------------------------------------*/
+		/* We expand a dummy request with the obsgroup value to get all   */
+		/* the subtypes in the obsgroup. Whenever an entry contains 2     */
+		/* it means that it was in the OBSTYPE, we put 1 in it meaning    */
+		/* it is also in the obsgroup.                                    */
+		/*----------------------------------------------------------------*/
+		dummy_request = empty_request("ARCHIVE");
+		set_value(dummy_request,"TYPE","OB");
+		set_value(dummy_request,"OBSTYPE",get_value(r,"OBSGROUP",0));
+		expanded_request = expand_mars_request(dummy_request);
+		count = count_values(expanded_request,"OBSTYPE");
+
+		for (i = 0; i < count; i++)
+		{
+			long st = atol(get_value(expanded_request,"OBSTYPE",i));
+			if (st < 0 || st > 255)
+			{
+				marslog(LOG_EROR,"Subtype %d is greater than 255. "\
+						"If this is a valid subtype, please contact the MARS group",
+						st);
+				return -6;
+			}
+			if (subtype_group[st] == 2)
+				subtype_group[st] = 1;
+		}
+		free_one_request(expanded_request);
+
+		/*----------------------------------------------------------------*/
+		/* After this, if there are any 2s left in the table, then        */
+		/* OBSTYPE is not a subset of OBSGROUP.                           */
+		/*----------------------------------------------------------------*/
+		for (i = 0; i < 256; i++)
+		{
+			if (subtype_group[i] == 2)
+			{
+				marslog(LOG_EROR,"OBSTYPE %d is not a subset of OBSGROUP",i);
+				marslog(LOG_EROR,"Add it to OBSGROUP %s in mars.def",get_value(r,"OBSGROUP",0));
+				return -6;
+			}
+		}
+
+		/*----------------------------------------------------------------*/
+		/* We expand a dummy request with the all the known subtypes      */
+		/* (KNOWN).														  */
+		/*----------------------------------------------------------------*/
+		set_value(dummy_request,"OBSTYPE","KNOWN");
+		expanded_request = expand_mars_request(dummy_request);
+		count = count_values(expanded_request,"OBSTYPE");
+		for (i = 0; i < count; i++)
+		{
+			long st = atol(get_value(expanded_request,"OBSTYPE",i));
+			if (st < 0 || st > 255)
+			{
+				marslog(LOG_EROR,"Subtype %d is greater than 255. "\
+						"If you think this is a valid subtype, please contact the MARS team",
+						st);
+				return -6;
+			}
+			known_subtypes[st] = TRUE;
+		}
+
+		free_one_request(dummy_request);
+		free_one_request(expanded_request);
+	}
+	else
+	{
+		marslog(LOG_EROR,"Archiving requires only one OBSGROUP value");	
+		return -6;	
+	}
+
+	return 0;
+}
+
+/* assumes only one date, one time, one range */
+static void get_archive_period(request* r,time_interval* t)
+{
+	long time = atol(get_value(r,"TIME",0));
+	datetime begin = date_time_2_datetime(
+			date_to_julian(atol(get_value(r,"DATE",0))),
+			time / 100,
+			time % 100,
+			0);
+	long range = atol(get_value(r,"RANGE",0));
+
+	/* range is in minutes */
+	init_time_interval(t,begin,range * 60 + 59);
+}
+
+static err dhs_fb_check(dhsdata* dhs,request* original_req)
+{
+	marslog(LOG_INFO,"No checking is carried out on extraction/feedback data");
+
+	return 0;
+}
+
+static err dhs_bias_check(dhsdata* dhs,request* original_req)
+{
+	marslog(LOG_INFO,"No checking is carried out on bias data");
+
+	return 0;
+}
+
+static err dhs_track_check(dhsdata* dhs,request* original_req)
+{
+	marslog(LOG_INFO,"No client check carried out on track data");
+	return 0;
+}
+
+static long64 file_size(int fd)
+{
+	long64 size = 0;
+
+#ifdef linux
+	/* On Linux -m32, lseek64 doesn't work. Use fstat64 instead */
+	struct stat st;
+	if(fstat(fd,&st) == -1)
+		size = -1;
+	else
+		size = st.st_size;
+
+#else
+	if((size = lseek(fd,0,SEEK_END)) < 0)
+		size = -1;
+#endif
+	return size;
+}
+
+static err dhs_obs_check(dhsdata* dhs,request* original_req)
+{
+	long 			length = 1310720;
+	char 			buffer[1310720];
+	int  			cnt = 0;
+	err 			e    = 0;
+	FILE 			*f;
+	char 			buf[80];
+	int				q = 0;
+	const 			char* s;
+	time_interval	archive_period;
+	long			err_count = 0;
+
+	long64			file_length = 0;
+
+	/*----------------------------------------------------------------*/
+	/* We want to make sure that data included in the file to be	  */
+	/* archived complies with the description given in the request.	  */
+	/* 1. the subtypes found in the BUFR files have to be known in    */
+	/*    mars language. Otherwise failure.                           */
+	/* 2. the subtypes in the OBSTYPE parameter have to be the same   */
+	/*    as in the OBSGROUP or a subset of it. Otherwise failure.	  */
+	/*	  This ensures that what is archived is what people who are   */
+	/*    archiving think is being archived.                          */
+	/* 3. There sould only be one date in the request.				  */
+	/* 4. There sould only be one time in the request.				  */
+	/* 5. There sould only be one range in the request.				  */
+	/* 6. Messages which are not in the [date.time,date.time+range]   */
+	/*    are not accepted, failure.                                  */
+	/* 7. I should have started with this: any problem in the BUFR    */
+	/*    file (key missing, wrong length etc..) is a failure.        */
+	/*                                                                */
+	/* Any other idea?                                                */
+	/*----------------------------------------------------------------*/
+
+	/*----------------------------------------------------------------*/
+	/* We check subtypes assuming a subtype is less than 256 which is */
+	/* currently the case. This speeds up dramatically data processing*/
+	/* since we use a table.										  */
+	/* If subtypes were codes using more than a byte in the future,   */
+	/* this code should be changed (dream on).                        */
+	/*                                                                */
+	/* Ths subtype_group array contains all the subtypes in the       */
+	/* OBSGROUP less the subtypes which are not in the OBSTYPE.       */
+	/* Any discrepancy between those cause init_subtype_tables to     */
+	/* return an error.                                               */
+	/*----------------------------------------------------------------*/
+	char		subtype_group[256];
+	char		known_subtypes[256];
+
+	e = init_subtype_tables(dhs->req,subtype_group,known_subtypes);
+	if (e != 0)
+		return e;
+
+	if (count_values(dhs->req,"DATE") > 1)
+	{
+		marslog(LOG_EROR,"Only one date must be specified for archiving data");
+		return -6;
+	}
+	if (count_values(dhs->req,"TIME") > 1)
+	{
+		marslog(LOG_EROR,"Only one time must be specified for archiving data");
+		return -6;
+	}
+
+	get_archive_period(dhs->req,&archive_period);
+
+	dhs->total_tosend = 0;
+
+	start_timer();
+
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+		s = no_quotes(s);
+
+		marslog(LOG_INFO,"Scanning and analysing BUFR file %s",s);
+
+		f = fopen(s,"r");
+		if(f == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"ARCHIVE : '%s'",s);
+			e = -6;
+			break;
+		}
+
+		if((file_length = file_size(fileno(f))) < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot compute size on '%s'",s);
+			e = -2;
+		}
+		else
+		{
+			if (dhs->total_tosend == 0)
+				set_value_long64(original_req,"_length",file_length);
+			else
+				add_value_long64(original_req,"_length",file_length);
+			dhs->total_tosend += file_length;
+		}
+
+		if(fseek(f,(file_offset)0,SEEK_SET) != 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"fseek(%s)",s);
+			e = -2;
+		}
+
+		length = sizeof(buffer);
+		while( !e && (e = _readany(f,buffer,&length)) == NOERR )
+			/* || (e == BUF_TO_SMALL)) */
+		{
+			packed_key k;
+			packed_key* keyptr=&k;
+			int keyOk;
+
+			keyOk = get_packed_key(buffer,&k);
+			if (keyOk)
+				keyOk = verify_bufr_key(buffer,length,&k);
+			if (keyOk)
+			{	
+				datetime obs_date;
+				long subtype;
+				const char *obsgroup = get_value(dhs->req,"OBSGROUP",0);
+				/*------------------------------------------------------*/
+				/* if conventional data, IDENT is checked.				*/
+				/* since subtypes 82 to 88 are in the conventional group*/
+				/* and these are satellite data, we skip them.			*/
+				/*------------------------------------------------------*/
+#if 0
+				if (EQ(obsgroup,"CONVENTIONAL"))
+				{
+					if (k.header.subtype < 82 || k.header.subtype > 88)
+						if (KEY_IDENT(&k)[0] == ' ')
+						{
+							marslog(LOG_EROR,
+									"IDENT of report %d, subtype %d is left justified.",
+									cnt+1,k.header.subtype);
+							err_count++;
+						}
+				}
+#endif
+				/*------------------------------------------------------*/
+				/* check subtypes to be archived						*/
+				/*------------------------------------------------------*/
+				subtype = k.header.subtype;
+				if (subtype < 0 || subtype > 255)
+				{
+					marslog(LOG_EROR,"Subtype %d is greater than 255. "\
+							"If this is a valid subtype, please contact the MARS team",
+							subtype);
+					err_count++;
+				} 
+				else if (!known_subtypes[subtype])
+				{
+					marslog(LOG_EROR,"Found report %d with subtype %d which "\
+							"is unknown",cnt+1,subtype);
+					err_count++;
+					marslog(LOG_EROR,"If valid, add %d to the list of KNOWN subtypes in mars.def",subtype);
+				}
+				else if (!subtype_group[subtype])
+				{
+					marslog(LOG_EROR,"Found report %d with subtype %d which "\
+							"does not match the specified OBSTYPE/OBSGROUP",cnt+1,
+							subtype);
+					err_count++;
+				}
+
+				/*------------------------------------------------------*/
+				/* check the message is in archive period				*/
+				/*------------------------------------------------------*/
+				obs_date = key_2_datetime(keyptr);
+				if (obs_date < archive_period.begin || 
+						obs_date > archive_period.end && e == 0)
+				{
+					char date[20];
+					char time[20];
+					print_key_date(keyptr,date);
+					print_key_time(keyptr,time);
+					marslog(LOG_EROR,"Bufr message n.%d %s %s is out of the archiving period specified in the request",
+							cnt+1,date,time);
+					err_count++;
+				}
+
+				cnt++;
+			}
+			else
+			{
+				marslog(LOG_EROR,
+						"Key of report %d is not valid",cnt+1);
+				err_count++;
+			}
+			length = sizeof(buffer);
+
+			if (err_count > 50)
+				e = -6;
+		}
+
+		if(e == EOF) e = 0;
+		if(f) fclose(f);
+
+	} /* Loop on sources */
+
+	if (err_count > 0)
+		e = -6;
+
+	if(e == NOERR)
+	{
+		marslog(LOG_INFO,"Archiving %d report(s) from %d file(s)",cnt,q-1);
+		dhs->count = cnt;
+	}
+
+	set_value(original_req,"_SIZE","%d",cnt);
+
+	stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Analyse time: %s",buf);
+
+	return e;
+}
+
+typedef struct multidatabase {
+	boolean done;
+	long64  total_tosend;
+	int     databases;
+} multidatabase;
+
+static err sanity_check(request* r)
+{
+	const char *suite = getenv("SUITE");
+	const char *t = get_value(r,"STREAM",0);
+
+	if(suite && EQ(suite,"bc") && t)
+	{
+		if((!EQ(t,"SCWV") && !EQ(t,"SCDA")))
+		{
+			int exp = atol(get_value(r,"EXPVER",0));
+			FILE *f = mail_open(mars.dhsmail,"sanity check failed stream: %s",t);
+			mail_msg(f,"Archiving from suite bc stream %s",t);
+			mail_request(f,"MARS Request:",r);
+			mail_close(f);
+
+			if(exp == 1)
+			{
+				marslog(LOG_EROR,"Archiving from suite %s stream %s. Exiting...",suite,t);
+				return -10;
+			}
+
+			marslog(LOG_WARN,"Archiving from suite %s stream %s",suite,t);
+		}
+	}
+	return NOERR;
+
+}
+
+static long compute_total(request *r)
+{
+	long n      = 1;
+	parameter *p = r->params;
+	while(p)
+	{
+		n *= count_values(r,p->name);
+		p = p->next;
+	}
+	return n;
+}
+
+static err previous_dhs_grib_check(dhsdata *dhs,request* original_req)
+{
+	long length = 1024*1024*64;
+	long field_length;
+#ifdef fujitsu
+	char *buffer = valloc(length);
+#else
+	char *buffer = reserve_mem(length);
+#endif
+	int  cnt = 0;
+	err e    = 0;
+	FILE *f;
+	char buf[80];
+	int q = 0;
+	const char* s,*t, *cl;
+	int count,total;
+	char *found;
+	boolean isfg = false;
+	static multidatabase once = { false, 0, 0};
+	request *u = unwind_one_request(dhs->req);
+	int dbcount = count_values(dhs->req,"DATABASE");
+	long64			file_length = 0;
+
+	timer *read_for_analyse = get_timer("Read GRIBs for analyse",NULL,true);
+
+	s  = get_value(dhs->req,"TYPE",0);
+	t  = get_value(dhs->req,"STREAM",0);
+	cl = get_value(dhs->req,"CLASS",0);
+
+	isfg = (s && t && EQ(s,"FG") && !EQ(t,"WAVE") && !EQ(t,"SCWV") && !EQ(cl,"MS"));
+
+	if(isfg)
+	{
+		request *k = un_first_guess_all(u);
+		free_all_requests(u);
+		u = k;
+		marslog(LOG_INFO,"Data is first-guess");
+		if(mars.debug)
+			print_one_request(u);
+#ifndef FG_IS_REAL_FG
+		set_value(dhs->req,"TYPE","FC");
+#endif
+	}
+
+
+	/* If language accept multi TYPE/CLASS/..., update count_fields 
+	   and fixed_check */
+
+	count = count_fields(dhs->req);
+	total = compute_total(dhs->req);
+
+	/* Avoid performing the check for the same database */
+	if(once.done)
+	{
+		marslog(LOG_INFO,"Source data already analysed");
+
+
+		dhs->total_tosend = once.total_tosend;
+		once.databases++;
+
+		/* Reset it for further requests */
+		if(once.databases == dbcount)
+		{
+			once.done = false;
+			once.databases = 0;
+			once.total_tosend = 0;
+		}
+
+		return NOERR;
+	}
+
+	found = NEW_ARRAY_CLEAR(char,total);
+
+	dhs->total_tosend = 0;
+
+	if(mars.debug)
+		print_all_requests(u);
+
+	start_timer();
+
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+
+		s = no_quotes(s);
+
+		marslog(LOG_INFO,"Scanning and analysing %s",s);
+
+		f = fopen(s,"r");
+		if(f == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"ARCHIVE : '%s'",s);
+			e = -6;
+			break;
+		}
+
+		if((file_length = file_size(fileno(f))) < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot compute size on '%s'",s);
+			e = -2;
+		}
+		else
+			dhs->total_tosend += file_length;
+
+		if(fseek(f,(file_offset)0,SEEK_SET) != 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"fseek(%s)",s);
+			e = -2;
+		}
+
+		if(mars.readdisk_buffer > 0)
+		{
+			if(setvbuf(f,dhs->read_disk_buffer,_IOFBF,mars.readdisk_buffer))
+				marslog(LOG_WARN|LOG_PERR,"setvbuf failed");
+		}
+
+		field_length = length;
+		while( !e && (e = timed_readany(f,buffer,&field_length,read_for_analyse)) == NOERR )
+		{
+			int n = -1;
+			request *g = empty_request("GRIB");
+
+			if((e = grib_to_request(g,buffer,field_length)) != NOERR)
+			{
+				marslog(LOG_EROR,"Error while building MARS request from GRIB %d",cnt+1);
+				marslog(LOG_EROR,"MARS description for Grib %d is:",cnt+1);
+				print_all_requests(g);
+			}
+
+			if(mars.debug)
+			{
+				marslog(LOG_DBUG,"Field %d:",cnt);
+				print_all_requests(g);
+			}
+
+			if((e == NOERR) && (e = fix_check(g,dhs->req,cnt+1)) == NOERR)
+			{
+				n = find_order(&u,g);
+
+				if(n < 0 ) 
+				{
+					if(field_order(dhs->req,g) >= 0)
+						marslog(LOG_EROR,"Grib %d in '%s' is duplicated",cnt+1,s);
+					else
+						marslog(LOG_EROR,"Grib %d is not in ARCHIVE request",cnt+1);
+					marslog(LOG_EROR,"MARS description for Grib %d is:",cnt+1);
+					print_all_requests(g);
+					e = -6;
+				} 
+				else if(n >= total)
+				{
+					marslog(LOG_EROR,"MARS internal error analysing grib %d",cnt+1);
+					marslog(LOG_EROR,"MARS description for Grib %d is:",cnt+1);
+					print_all_requests(g);
+					e = -6;
+				}
+				else if(found[n])
+				{
+					marslog(LOG_EROR,"Grib %d in '%s' is duplicated",cnt+1,s);
+					marslog(LOG_EROR,"MARS description for Grib %d is:",cnt+1);
+					print_all_requests(g);
+					e = -6;
+				}
+			}
+
+			if((e == NOERR) /*|| (e == BUF_TO_SMALL)*/)
+			{
+				found[n] = true;
+				cnt++;
+			}
+
+			free_all_requests(g);
+			field_length = length;
+		}
+
+		if(e == EOF) e = 0;
+		if(f) fclose(f);
+
+	} /* Loop on sources */
+
+	free_all_requests(u);
+	FREE(found);
+
+#ifdef fujitsu
+	free(buffer);
+#else
+	release_mem(buffer);
+#endif
+
+	if(!e && cnt != count)
+	{
+		marslog(LOG_EROR,"Wrong number of fields :");
+		marslog(LOG_EROR,"Request describes %d field(s)",count);
+		marslog(LOG_EROR,"Source contains %d field(s)",cnt);
+		e = -6;
+	}
+	else if(e == NOERR)
+	{
+		if(dbcount > 1)
+		{
+			once.done = true;
+			once.total_tosend = dhs->total_tosend;
+			once.databases++;
+		}
+		marslog(LOG_INFO,"Archiving %d field(s) from %d file(s)",cnt,q-1);
+		dhs->count = cnt;
+	}
+
+	set_value(original_req,"_SIZE","%d",cnt);
+
+
+	stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Analyse time: %s",buf);
+
+	if(isfg) set_value(dhs->req,"TYPE","FG"); /* Reset type */
+
+	return e;
+}
+
+static err dhs_odb_check(dhsdata *dhs, request* original_req)
+{
+	err e = NOERR;
+
+#ifdef ODB_SUPPORT
+	if(dhs->skip_odb_check)
+	{
+		marslog(LOG_WARN,"Skip analysing ODB file");
+		return NOERR;
+	}
+
+	timer *read_for_analyse = get_timer("Read ODB contents for analysis", NULL, true);
+	const char *s;
+	int q = 0;
+
+	unsigned long long cnt = 0;
+	while(e == 0 && (s = get_value(dhs->req, "SOURCE", q++)) != NULL)
+	{
+		const char *fileName = no_quotes(s);
+		marslog(LOG_INFO, "Scanning and analysing ODB file '%s'", fileName);
+		request *r = empty_request(0);
+
+		if ((e = odb_to_request_from_file(r, fileName, &cnt)) != 0)
+		{
+			marslog(LOG_EROR, "odb_to_request_from_file: %d", e);
+			return e;
+		}
+		else
+		{
+			if (mars.debug)
+			{
+				marslog(LOG_INFO, "file's metadata:");
+				print_all_requests(r);
+				marslog(LOG_INFO, "user's request:");
+				print_all_requests(original_req);
+			}
+
+			if ((e = odb_compare_attributes_of_first_request(r, original_req)) != 0)
+			{
+				marslog(LOG_INFO, "file's metadata:");
+				print_all_requests(r);
+				marslog(LOG_EROR, "odb_compare_attributes_of_first_request: %d", e);
+				return e;
+			} 
+
+		}
+	}
+#else
+	marslog(LOG_EROR,"This MARS client doesn't support ODB");
+	marslog(LOG_EROR,"Please, contact the MARS team");
+	e = -1;
+#endif
+
+	return e;
+}
+
+static err dhs_grib_check(dhsdata *dhs,request* original_req)
+{
+#if 0
+	long length  = preferred_IO_blocksize(no_quotes(get_value(dhs->req,"SOURCE",0)),1024*1024*20);
+#endif
+	long length = 0;
+	char *buffer;
+	int  cnt = 0;
+	err e    = 0;
+	FILE *f;
+	char buf[80];
+	int q = 0;
+	const char* s,*t, *cl;
+	int count;
+	boolean isfg = false;
+	boolean isclim = false;
+	static multidatabase once = { false, 0, 0};
+	int dbcount = count_values(dhs->req,"DATABASE");
+	long64			file_length = 0;
+	hypercube  *h = 0;
+	long field_length = length;
+	long64   total_prev_files = 0;
+
+	if(mars.autoarch) {
+		marslog(LOG_INFO,"Source data already analysed (MARS_AUTO_ARCH=%ld)", mars.autoarch);
+		return 0;
+	}
+
+	length = mars.readany_buffer_size;
+	field_length = length;
+
+	timer *read_for_analyse = get_timer("Read GRIBs for analyse",NULL,true);
+
+	t  = get_value(dhs->req,"TYPE",0);
+	s  = get_value(dhs->req,"STREAM",0);
+	cl = get_value(dhs->req,"CLASS",0);
+
+	isfg   = (s && t && EQ(t,"FG") && !EQ(s,"WAVE") && !EQ(s,"SCWV") && !EQ(cl,"MS"));
+	isclim = (s && t && EQ(t,"CL") && EQ(s,"MNTH"));
+
+
+	if(isfg || isclim)
+	{
+		marslog(LOG_INFO,"Special check on first-guess or climatology");
+		return previous_dhs_grib_check(dhs,original_req);
+	}
+
+#ifdef fujitsu
+	buffer = valloc(length);
+#else
+	buffer = reserve_mem(length);
+#endif
+
+	/* If language accept multi TYPE/CLASS/..., update count_fields 
+	   and fixed_check */
+
+	count = count_fields(dhs->req);
+
+	/* Avoid performing the check for the same database */
+	if(once.done)
+	{
+		marslog(LOG_INFO,"Source data already analysed");
+
+
+		dhs->total_tosend = once.total_tosend;
+		once.databases++;
+
+		/* Reset it for further requests */
+		if(once.databases == dbcount)
+		{
+			once.done = false;
+			once.databases = 0;
+			once.total_tosend = 0;
+		}
+
+		return NOERR;
+	}
+
+	dhs->total_tosend = 0;
+
+	start_timer();
+
+	h = new_hypercube_from_mars_request(dhs->req);
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+		int field = 0;
+
+		s = no_quotes(s);
+
+		marslog(LOG_INFO,"Scanning and analysing GRIB file %s",s);
+
+		f = fopen(s,"r");
+		if(f == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"ARCHIVE : '%s'",s);
+			e = -6;
+			break;
+		}
+
+		if((file_length = file_size(fileno(f))) < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot compute size on '%s'",s);
+			e = -2;
+		}
+		else
+			dhs->total_tosend += file_length;
+
+		if(fseek(f,(file_offset)0,SEEK_SET) != 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"fseek(%s)",s);
+			e = -2;
+		}
+
+
+		field_length = length;
+		while( !e && (e = timed_readany(f,buffer,&field_length,read_for_analyse)) == NOERR )
+			/* || (e == BUF_TO_SMALL)) */
+		{
+			mars_grib_index* idx = NULL;
+
+			request *g = empty_request(0);
+
+			/* if(e == BUF_TO_SMALL) e = NOERR; */
+
+			if( mars.build_grib_index ) {
+
+				file_offset here = ftell(f) + total_prev_files;
+				idx = mars_grib_index_new( here - field_length, field_length); /* we are at the ed of the message */
+
+				if( dhs->head_idx == NULL )
+				{
+					dhs->head_idx = dhs->tail_idx = idx;
+				}
+				else
+				{
+					dhs->tail_idx->next = idx;
+					dhs->tail_idx = idx;
+				}
+			}
+
+			if((e = grib_to_request_index(g,buffer,field_length,idx)) != NOERR)
+			{
+				marslog(LOG_EROR,"Error while building MARS request from GRIB %d",cnt+1);
+				marslog(LOG_EROR,"MARS description for Grib %d is:",cnt+1);
+				print_all_requests(g);
+			}
+
+			/* If BUDG or TIDE, create request from GRIB with 
+			   original request as template */
+			if(mars.pseudogrib)
+			{
+				request *copy = get_cubelet(h,0);
+
+				free_all_requests(g);
+				g = clone_one_request(copy);
+
+				if((e = grib_to_request_index(g,buffer,field_length,idx)) != NOERR)
+				{
+					marslog(LOG_EROR,"Error while building MARS request from pseudo-GRIB %d",cnt+1);
+					marslog(LOG_EROR,"MARS description for pseudo-GRIB %d is:",cnt+1);
+					print_all_requests(g);
+				}
+
+			}
+
+			if(mars.debug)
+			{
+				marslog(LOG_DBUG,"Field %d:",cnt);
+				print_all_requests(g);
+			}
+
+			if(e == NOERR)
+				e = remove_field_from_hypercube(h,g,cnt+1);
+
+			if(e == NOERR)
+			{
+				cnt++;
+				field++;
+			}
+
+			field_length = length;
+			free_all_requests(g);
+		}
+
+		if(e == EOF) e = 0;
+		if(e != 0)
+			marslog(LOG_EROR,"Error occured for field %d",field+1);
+
+		if(f) fclose(f);
+
+		total_prev_files += file_length;
+	} /* Loop on sources */
+
+	free_hypercube(h);
+
+#ifdef fujitsu
+	free(buffer);
+#else
+	release_mem(buffer);
+#endif
+
+	if(!e && cnt != count)
+	{
+		marslog(LOG_EROR,"Wrong number of fields :");
+		marslog(LOG_EROR,"Request describes %d field(s)",count);
+		marslog(LOG_EROR,"Source contains %d field(s)",cnt);
+		e = -6;
+	}
+	else if(e == NOERR)
+	{
+		if(dbcount > 1)
+		{
+			once.done = true;
+			once.total_tosend = dhs->total_tosend;
+			once.databases++;
+		}
+		marslog(LOG_INFO,"Archiving %d field(s) from %d file(s)",cnt,q-1);
+		dhs->count = cnt;
+	}
+
+	set_value(original_req,"_SIZE","%d",cnt);
+
+
+	stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Analyse time: %s",buf);
+
+	if(isfg) set_value(dhs->req,"TYPE","FG"); /* Reset type */
+
+	return e;
+}
+
+static err dhs_image_check(dhsdata *dhs)
+{
+	err e    = 0;
+	FILE *f;
+	int q = 0;
+	const char* s;
+	char buf[80];
+	long64 file_length = 0;
+
+
+	dhs->total_tosend = 0;
+	start_timer();
+
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+		s = no_quotes(s);
+		marslog(LOG_INFO,"Scanning %s",s);
+
+		f = fopen(s,"r");
+		if(f == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"ARCHIVE : '%s'",s);
+			e = -6;
+			break;
+		}
+
+		if((file_length = file_size(fileno(f))) < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot compute size on '%s'",s);
+			e = -2;
+		}
+		else
+			dhs->total_tosend += file_length;
+
+		fclose(f);
+
+	} /* Loop on sources */
+
+
+	stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Scanning time: %s",buf);
+
+	return e;
+}
+
+static err dhs_store_check(dhsdata *dhs)
+{
+	long length = 32768;
+	char buffer[32768];
+	err e    = 0;
+	FILE *f;
+	char buf[80];
+	int q = 0;
+	const char* s;
+	long64 file_length = 0;
+
+	dhs->total_tosend = 0;
+
+	start_timer();
+
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+
+		s = no_quotes(s);
+
+		marslog(LOG_INFO,"Scanning and analysing %s",s);
+
+		f = fopen(s,"r");
+		if(f == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"STORE : '%s'",s);
+			e = -6;
+			break;
+		}
+
+		if((file_length = file_size(fileno(f))) < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot compute size on '%s'",s);
+			e = -2;
+		}
+		else
+			dhs->total_tosend += file_length;
+
+		rewind(f);
+
+		/*---------------------------*/
+
+		/* Check for GRIB or BUFR */
+
+		if(_readany(f,buffer,&length) != -1)
+		{
+			marslog(LOG_EROR,"STORE: %s contains GRIB or BUFR",s);
+			e = -7;
+		}
+
+		rewind(f);
+
+		/* check for something else....*/
+
+		/*---------------------------*/
+
+		fclose(f);
+
+	} /* Loop on sources */
+
+	stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Analyse time: %s",buf);
+
+	return e;
+}
+
+/* End of Aux functions */
+
+static err send_request(mstream* s,request *r)
+{
+	int n = 0;
+	parameter *p = r->params;
+
+	/* stream_write_start(s,"Request"); */
+	stream_write_string(s,r->name);
+
+	/* count */
+
+	while(p) { n++; p = p->next; }
+	stream_write_int(s,n);
+
+	p = r->params;
+	while(p)
+	{
+		value *v = p->values;
+
+		if( p->values == NULL) 
+			marslog(LOG_EXIT,"Internal error: missing value for %s",p->name);
+
+		stream_write_string(s,p->name);
+
+		n = 0;
+		while(v) { n++; v = v->next; }
+		stream_write_int(s,n);
+
+		v = p->values;
+		while(v) 
+		{
+			stream_write_string(s,v->name);
+			v = v->next;
+		}
+
+		p = p->next;
+	}
+
+	/* stream_write_end(s); */
+
+	return s->error;
+}
+
+static err compute_size(dhsdata *dhs)
+{
+	int q = 0;
+	err e = 0;
+	const char* s = NULL;
+	struct stat st;
+
+	dhs->total_tosend = 0;
+
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+		s = no_quotes(s);
+		if(stat(s,&st))
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot stat %s",s);
+			return -2;
+		}
+		dhs->total_tosend += st.st_size;
+	}
+
+	return e;
+}
+
+static err send_source(dhsdata *dhs)
+{
+	long length  = preferred_IO_blocksize(no_quotes(get_value(dhs->req,"SOURCE",0)),1024*1024);
+#ifdef fujitsu
+	char *buffer = valloc(length);
+#else
+	char *buffer = (char *) reserve_mem(length);
+#endif
+	long readbufferlen = 1024*1024*20;
+	char *readbuffer = NULL;
+	err e = 0;	
+	const char *s;
+	int q = 0;
+	long64 total = 0;
+	long n;
+	FILE *f;
+	unsigned long crc = 0xffffffffL;
+
+	timer *disk_time = get_timer("Read from disk",NULL,true);
+	timer *net_time  = get_timer("Write to network","transfertime",true);
+	timer *send_time = get_timer("Transfer to server",NULL,true);
+
+	double start_send_time = timer_value(send_time);
+	double start_disk_time = timer_value(disk_time);
+	double start_net_time = timer_value(net_time);
+
+	if(dhs->total_tosend == 0)
+	{
+		e = compute_size(dhs);
+		if(e) return e;
+	}
+
+	timer_start(send_time);
+
+	stream_write_longlong(&dhs->s,dhs->total_tosend);
+
+	while(e == 0 && (s = get_value(dhs->req,"SOURCE",q++)) != NULL)
+	{
+		s = no_quotes(s);
+		marslog(LOG_INFO,"Sending %s",s);
+
+		f = fopen(s,"r");
+
+		if(!f) 
+		{
+			marslog(LOG_EROR|LOG_PERR,"fopen(%s)",s);
+			e =  -2;
+			break;
+		}
+
+		if(mars.readdisk_buffer > 0)
+		{
+			if(setvbuf(f,dhs->read_disk_buffer,_IOFBF,mars.readdisk_buffer))
+				marslog(LOG_WARN|LOG_PERR,"setvbuf failed");
+		}
+
+		while( (n = timed_fread(buffer,1,length,f,disk_time))  > 0 )
+		{
+			if(timed_writetcp(&dhs->csoc,buffer,n,net_time) != n)
+			{
+
+				marslog(LOG_EROR|LOG_PERR,"writetcp(%s)",s);
+
+				if(errno > 0)
+				{
+					char h[80];
+					FILE *f = 0;
+
+					gethostname(h,sizeof(h));
+					f = mail_open(mars.dhsmail,"(%s) from %s to %s", no_quotes(strerror(errno)), h, dhs->host);
+					mail_msg(f,"Archive job failed");
+					mail_request(f,"MARS Request:",dhs->req);
+					mail_close(f);
+				}
+
+				e = RETRY_FOREVER_ERR;
+				break;
+			}
+			total += n;
+		}
+
+		if(dhs->obs || dhs->is_bufrfile)
+			log_statistics("reports","%d",dhs->count);
+		else
+			log_statistics("fields","%d",dhs->count);
+		log_statistics("database","%s",database_name(dhs));
+		log_statistics_unique("bytes","%lld",total);
+
+		if(ferror(f))
+		{
+			marslog(LOG_EROR|LOG_PERR,"fread(%s)",s);
+			e = -2;
+		}
+
+		fclose(f);
+
+	}
+
+	if(total != dhs->total_tosend)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Only %lld bytes out of %lld sent.",
+				total,dhs->total_tosend);
+		e = e ? e : -2;
+	}
+
+	/* Send CRC */
+
+	{
+		crc ^= 0xffffffff;
+		stream_write_ulong(&dhs->s,2);      /* crc version */
+		stream_write_ulonglong(&dhs->s,crc);
+		if(mars.crc) marslog(LOG_INFO,"CRC %u\n",crc);
+	}
+
+	timer_stop(send_time,total);
+
+	timer_partial_rate(send_time,start_send_time,total);
+	timer_partial_rate(disk_time,start_disk_time,total);
+	timer_partial_rate(net_time,start_net_time,total);
+
+
+#ifdef fujitsu
+	free(buffer);
+#else
+	release_mem(buffer);
+#endif
+
+	return e;
+
+}
+
+static err receive_data(dhsdata *dhs)
+{
+	long64 total = 0;
+	long len;
+	char buffer[1024*100];
+	unsigned int n = sizeof(buffer);
+	long64 size;
+
+	size = stream_read_longlong(&dhs->s);
+
+	while( (len = readtcp(&dhs->csoc,buffer,n)) >= 0)
+		total += len;
+
+	marslog(LOG_INFO,"%lld bytes received",total);
+
+	if(size != total)
+	{
+		marslog(LOG_EROR,"Got only %lld bytes out of %lld", total, size);
+		return -2;
+	}
+
+	return 0;
+
+}
+
+typedef struct retrymsg_ {
+	char    *msg;
+	boolean forever;
+} retrymsg;
+
+static void check_msg(dhsdata *dhs, const char* msg)
+{
+	static retrymsg retry[] ={
+		{ "Retry: ",             true},   /* Server asks for a retry */
+		{ "ANS1314E (RC14)",     false},  /* File data currently unavailable on server */
+		{ "ANS1017E (RC-50)",    false},  /* Session rejected: TCP/IP connection failure */
+		{ "ANS1301E (RC1)",      false},  /* Server detected system error */
+		{ "ANS1351E (RC51)",     false},  /* Session rejected: all server sessions are currently in use */
+		{ "ANS0221E (RC2014)",   false},  /* There was an error in the TSM API internals */
+		{ "Bad Tag",             false},  /* MARS server error */
+		{ "Bad tag",             false},  /* MARS server error */
+		{ "Write error on pipe", false},  /* MARS server error */
+		{ "Failed HPSS call",    true},   /* Calls to HPSS unrecoverable on server for time being */
+		{ "Double buffer error: Failed HPSS call",    true},   /* Calls to HPSS unrecoverable on server for time being */
+	};
+
+	if(*msg)
+	{
+		int i = 0;
+		for(i=0; i<NUMBER(retry); ++i)
+		{
+			int msglen = strlen(msg);
+			int len = strlen(retry[i].msg);
+			int min = len<msglen?len:msglen;
+
+			if(strncmp(retry[i].msg,msg,min) == 0)
+			{
+				if(retry[i].forever)
+				{
+					dhs->retry_forever_on_client = true;
+					marslog(LOG_WARN,"Retry failure forever");
+				}
+				else
+					dhs->retry_on_client = true;
+
+			}
+		}
+	}
+}
+
+static void msg(dhsdata *dhs,int flg)
+{
+	const char* p = stream_read_string(&dhs->s);
+	if(*p) marslog(flg,"%s [%s]",p,database_name(dhs));
+	check_msg(dhs,p);
+}
+
+
+static void notification(dhsdata *dhs)
+{
+	const char* p = stream_read_string(&dhs->s);
+	if(*p) {
+		if(strcmp(p,"wind conversion requested") == 0) {
+			mars.wind_requested_by_server = true;
+			marslog(LOG_INFO,"Wind conversion requested by server");
+		}
+		else {
+			marslog(LOG_WARN,"Unknown notification receieved: %s [%s]",p,database_name(dhs));
+		}
+	}
+	/* Send acknowlegment */
+	stream_write_int(&dhs->s,0);
+}
+
+static void notificationStart(dhsdata *dhs)
+{
+
+
+	/* Send acknowlegment */
+	stream_write_int(&dhs->s,0);
+}
+
+static void statistics(dhsdata *dhs)
+{
+	int n = stream_read_int(&dhs->s);
+	char *log_server_statistics = getenv("MARS_LOG_SERVER_STATISTICS");
+
+	marslog(LOG_DBUG,"Got %d statistics from server",n);
+	if(!log_server_statistics)
+		marslog(LOG_DBUG,"Server statistics disabled. Set MARS_LOG_SERVER_STATISTICS to enable");
+
+	while(n-->0)
+	{
+		char* a = strcache(stream_read_string(&dhs->s));
+		char* b = strcache(stream_read_string(&dhs->s));
+		if(a && b && log_server_statistics) 
+		{
+			marslog(LOG_DBUG,"Server statistics %s = %s",a,b);
+			log_statistics(a,"%s",b);
+		}
+		strfree(a);
+		strfree(b);
+	}
+}
+
+static err list(dhsdata* dhs)
+{
+	char buffer[1024];
+	int length = sizeof(buffer);
+	int n;
+	FILE *f = stdout;
+	err e = 0;
+	const char *target = no_quotes(mars.webmars_target ? mars.webmars_target : get_value(dhs->req,"TARGET",0));
+	static int first = true;
+	long long size = 0;
+
+	int dbcount = count_values(dhs->req,"DATABASE");
+
+	if(target)
+	{
+		if(first)
+		{
+			f  = fopen(target,target_open_mode(target));
+		}
+		else
+			f = fopen(target,"a+");
+
+		if(!f) 
+		{
+			marslog(LOG_EROR|LOG_PERR,"fopen(%s)",target);
+			return -2;
+		}
+	}
+
+	if(dbcount>1)
+	{
+		if(!first)
+			fprintf(f,"\n\n==================================================================\n\n");
+		fprintf(f,"datab   = %s\n",database_name(dhs));
+	}
+
+	if(first)
+		first = false;
+
+	while( (n = fread(buffer,1,length,dhs->f))  > 0 )
+	{
+		fwrite(buffer,1,n,f);
+		length = sizeof(buffer);
+		size += n;
+	}
+
+	if(ferror(dhs->f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error during list");
+		e = -2;
+	}
+
+	socket_file_close(dhs->f);
+	dhs->f = NULL;
+
+	if(dhs->total_toread != 0 && dhs->total_toread != size)
+	{
+		marslog(LOG_EROR,"LIST: read only %lld out of %lld",size,dhs->total_toread);
+		e = -2;
+	}
+
+	if(target && f) 
+	{
+		if(fclose(f) != 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"fclose(%s)",target);
+			return -2;
+		}
+	}
+
+	return e;
+}
+
+static err get(dhsdata* dhs)
+{
+	char buffer[1024*1024];
+	int length = sizeof(buffer);
+	int n;
+	err e = 0;
+	const char *target = no_quotes(mars.webmars_target ? mars.webmars_target : get_value(dhs->req,"TARGET",0));
+	FILE *f = 0;
+
+	if(target)
+	{
+
+		if(*target == '|')
+			f = popen(target+1,"w");
+		else
+			f = fopen(target,"w");
+		if( !f )
+		{
+			marslog(LOG_EROR|LOG_PERR,"fopen(%s)",target);
+			return -2;
+		}
+	}
+	else
+	{
+		marslog(LOG_EROR,"Missing target");
+		return -2;
+	}
+
+	while( (n = fread(buffer,1,length,dhs->f))  > 0 )
+	{
+		if(fwrite(buffer,1,n,f) != n)
+		{
+			marslog(LOG_EROR|LOG_PERR,"fwrite(%s)",target);
+			e = -2;
+			break;
+		}
+		length = sizeof(buffer);
+	}
+
+	if(ferror(dhs->f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error during list");
+		e = -2;
+	}
+
+	socket_file_close(dhs->f);
+	dhs->f = NULL;
+
+	n = (*target == '|') ? pclose(f) : fclose(f);
+	if(n)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fclose(%s)",target);
+		return -2;
+	}
+
+	return e;
+}
+
+static err read_metadata(dhsdata *dhs)
+{
+	const char *name;
+	int version = 0;
+	long64 length = 0;
+	mstream s;
+
+	if(dhs->total_read == dhs->total_toread)
+		return EOF;
+
+	make_file_stream(&s,dhs->f);
+
+	free_all_requests(dhs->metadata);
+	dhs->metadata = NULL;
+
+	FREE(dhs->reclen);
+	dhs->reclen = NULL;
+
+	name    = stream_read_start(&s);
+	version = stream_read_long(&s);
+	length  = stream_read_longlong(&s);
+
+	marslog(LOG_DBUG,"read_metadata(%s)",name);
+	marslog(LOG_DBUG,"read_metadata(%d)",version);
+	marslog(LOG_DBUG,"read_metadata(%lld)",length);
+
+	stream_read_start(&s);
+	dhs->metadata = read_request(&s);
+	stream_read_end(&s);
+	stream_read_end(&s);
+
+	if(mars.debug)
+		print_all_requests(dhs->metadata);
+
+	dhs->total_read += s.in;
+	dhs->data_size   = length;
+
+	return s.error?RETRY_ERR:0;
+}
+
+static err timed_dhs_wait(dhsdata *dhs)
+{
+	err e = 0;
+	char buf[1024];
+	timer *wait_time = 0;
+
+	sprintf(buf,"Processing in %s",database_name(dhs));
+	wait_time=get_timer(buf,NULL,true);
+
+	timer_start(wait_time);
+	e = dhs_wait(dhs);
+	timer_stop(wait_time,0);
+	return e;
+}
+
+static err dhs_wait(dhsdata *dhs)
+{
+	struct sockaddr_in from;
+	marssocklen_t fromlen = sizeof(struct sockaddr_in);
+	ulong64 id;
+	char code;
+	err e = 0;
+	long t = 0;
+	static int protocol_mismatch = 0;
+
+	if(dhs->finished)
+		return EOF;
+
+	if(dhs->csoc < 0) 
+	{
+		if(setjmp(env) != 0) {
+			marslog(LOG_WARN,"Timeout waiting for %s",dhs->host);
+			return -2;
+		}
+
+		if(dhs->timeout) {
+			signal(SIGALRM,catch_alarm);
+			alarm(dhs->timeout*60);
+		}
+
+		socket_buffers(dhs->asoc);
+
+		/* marslog(LOG_INFO,"Opening socket"); */
+		dhs->csoc =  accept(dhs->asoc, (struct sockaddr*)&from, &fromlen);
+
+		alarm(0);
+
+		if(dhs->csoc < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"accept");
+			return -2;
+		}
+
+		if(!dhs->quiet)
+		{
+			print_address("Mars client is on",addr_of(dhs->csoc));
+			traceroute(&from);
+			print_address("Mars server is on",&from);
+			dhs->quiet = true;
+		}
+
+
+		if(dhs->print_callback)
+		{
+			print_address("Got connection from", &from);
+		}
+	}
+	else
+	{
+		/* marslog(LOG_INFO,"Socket already open"); */
+	}
+
+	id = stream_read_ulonglong(&dhs->s);
+
+	if(dhs->s.error) 
+	{
+		marslog(LOG_WARN,"dhs_wait: stream_read_ulonglong: got error %d",dhs->s.error);
+		return dhs->s.error;
+	}
+
+	if(id != dhs->id)
+	{
+		marslog(LOG_EROR,"Failed to check callback id");
+		return -1;
+	}
+
+	code = stream_read_char(&dhs->s);
+	if(dhs->s.error) 
+	{
+		marslog(LOG_WARN,"dhs_wait: stream_read_char: got error %d",dhs->s.error);
+		return dhs->s.error;
+	}
+
+	marslog(LOG_DBUG,"Code = %c",code);
+
+	switch(code)
+	{
+		/* OK */
+		case 'o':
+			dhs->finished = true;
+			if(EQ(dhs->req->name,"RETRIEVE") && (!dhs->server_send_error && !dhs->server_send_data))
+			{
+				marslog(LOG_EROR,"Receive end of request from server without data. Retrying %d",++protocol_mismatch);
+				if(protocol_mismatch < 3)
+					e = RETRY_ERR;
+				else
+					marslog(LOG_EROR,"Too many errors in protocol. Give up");
+			}
+			break;
+
+			/* Aknowlegde */
+		case 'a': 
+			break;
+
+			/* read source */
+		case 'r':
+			e = send_source(dhs);
+			if(e == RETRY_ERR || e == RETRY_FOREVER_ERR)
+			{
+				dhs->retry_on_client         = (e == RETRY_ERR);
+				dhs->retry_forever_on_client = (e == RETRY_FOREVER_ERR);
+				marslog(LOG_WARN,"Transfer failed, retrying...");
+				e = 0; /* Reset error, we will be called again */
+			}
+			break;
+
+		case 'h':
+			dhs->f = fdopen(dhs->csoc,"r");
+			dhs->total_toread = 0;
+			dhs->csoc = -1;
+			return get(dhs);
+			/* break; */
+
+			/* read source */
+		case 'w':
+
+			dhs->server_send_data = true;
+			dhs->f = fdopen(dhs->csoc,"r");
+			dhs->total_toread = stream_read_longlong(&dhs->s);
+
+			if(dhs->total_toread)
+				marslog(LOG_INFO,"Transfering %lld bytes",dhs->total_toread);
+
+			dhs->csoc = -1;
+			if(dhs->s.error)  return RETRY_ERR;
+
+			/* it's a LIST */
+			if(EQ(dhs->req->name,"LIST"))
+				return list(dhs);
+
+			if(EQ(dhs->req->name,"BROWSE"))
+				return list(dhs);
+
+			/* it's a GET */
+			if(EQ(dhs->req->name,"GET"))
+				return get(dhs);
+
+			return 0;
+			/* break; */
+
+		case 'm':
+			e =  read_metadata(dhs);
+			break;
+
+		case 'X':
+			if(mars.private_key)
+			{
+				/* Authentication challenge */
+				char cmd[1024];
+				long size = 0;
+				char *tmp = marstmp();
+				FILE *f;
+				const char *message = stream_read_blob(&dhs->s, &size);
+				sprintf(cmd,"openssl dgst -sha1 -sign %s -out %s", mars.private_key, tmp);
+				f = popen(cmd,"w");
+				if(!f) {  e = -2;  }
+				else {
+					char digest[4096];
+					if(fwrite(message,1,size,f) != size) { e = -2; } 
+					if(pclose(f)) { e = -2 ; }
+					f = fopen(tmp,"r"); unlink(tmp);
+					if(!f) {e = -2; }
+					else {
+						char digest[4096];
+						size = fread(digest,1,sizeof(digest),f);
+						if(size <=0 || size >= sizeof(digest))
+						{
+							e = -2;
+						}
+						fclose(f);
+						stream_write_blob(&dhs->s,digest,size);
+
+					}
+
+				}
+
+				if(e) {
+					marslog(LOG_EROR,"Server requested authentication, error during signing");
+				}
+			}
+			else
+			{
+				marslog(LOG_EROR,"Server requested authentication, but MARS_PRIVATE_KEY not defined");
+				e = -2;
+			}
+			break;
+
+		case 'e':
+
+			marslog(LOG_EROR,"Mars server task finished in error");
+
+			dhs->server_send_error = true;
+			if(dhs->finish_on_error)
+				dhs->finished=true;
+
+			msg(dhs,LOG_EROR);
+			if(dhs->retry_on_client)
+				e = RETRY_ERR;
+			else if(dhs->retry_forever_on_client)
+				e = RETRY_FOREVER_ERR;
+			else
+				e = -2;
+
+			marslog(LOG_EROR,"Error code is %d", e);
+
+			break;
+
+		case 'y':    /* retry */
+			dhs->finished=true;
+			msg(dhs,LOG_WARN);	
+			e = RETRY_ERR;
+			break;
+
+		case 'I': /* info */
+			msg(dhs,LOG_INFO);
+			break;
+
+		case 'W': /* warning */
+			msg(dhs,LOG_WARN);
+			break;
+
+		case 'D': /* debug */
+			msg(dhs,LOG_DBUG);
+			break;
+
+		case 'E': /* error */
+			msg(dhs,LOG_EROR);
+			break;
+
+		case 'G': /* send the grib scan */
+			marslog(LOG_INFO,"Sending GRIB index");
+			if( dhs->head_idx )
+			{
+				timer *send_time = get_timer("Transfer GRIB index to server",NULL,true);
+				timer_start(send_time);
+				e = mars_grib_index_send(dhs->head_idx,&dhs->s);
+				timer_stop(send_time,0);
+			}else
+			{
+				marslog(LOG_EROR,"Could not find grib index");
+				e =  -2;
+			}
+			break;
+
+		case 'N': /* notification */
+
+			notification(dhs);
+			break;
+
+		case 'p': /* ping */
+			stream_write_char(&dhs->s,'p');
+			break;
+
+		case 's': /* statistics */
+			statistics(dhs);
+			break;
+
+		case 'S': /* notification start */
+			notificationStart(dhs);
+			break;
+
+		case 't': /* new timeout */
+			t = stream_read_long(&dhs->s);
+			if(t != 0) /* New timeout requested */
+			{
+				if(t < 0) /* Infinite */
+				{
+					marslog(LOG_INFO,"New MARS server: timeout set to infinite");
+					dhs->timeout = 0;
+				}
+				else {
+					marslog(LOG_INFO,"New MARS server: timeout set to %d minute(s)",t);
+					dhs->timeout = t;
+				}
+			}
+			break;
+
+		default:
+			marslog(LOG_EROR,"Unknown code %c (%d)",code,code);
+			e =  -2;
+			break;
+	}
+
+	socket_close(dhs->csoc); 
+	dhs->csoc = -1;
+
+	if(e == NOERR && dhs->s.error) e =  dhs->s.error;
+
+	if(e)
+		dhs->finished = true;
+
+	if(dhs->retry_on_client) e = RETRY_ERR;
+	if(dhs->retry_forever_on_client) e = RETRY_FOREVER_ERR;
+
+	return e;	
+
+}
+
+static err dhs_send(dhsdata *dhs,request *r,request *e)
+{
+	char address[80];
+	int  port;
+	char *addr;
+	timer *connect_time = 0;
+	char buf[1024];
+#if AIX
+	int  retry = 0;
+#endif
+
+	sprintf(buf,"Connecting to %s",database_name(dhs));
+	connect_time=get_timer(buf,NULL,true);
+
+	/* Open the callback port */
+
+	if(dhs->local_port)
+	{
+		port = dhs->local_port;
+		dhs->asoc = tcp_server(port);
+		gethostname(address,sizeof(address));
+	}
+	else
+	{
+		dhs->asoc = server_mode(&port,address);
+	}
+
+	if(dhs->asoc<0)
+		return -1;
+
+#if AIX
+	if(!dhs->local_port)
+		while(++retry<10)
+		{
+			int tmp = dhs->asoc;
+			struct servent *tcpserv = getservbyport(port,"tcp");
+			if(tcpserv == NULL)
+				break;
+			marslog(LOG_INFO,"port %d already defined for service '%s'",port,tcpserv->s_name); 
+			dhs->asoc = server_mode(&port,address);
+			if(dhs->asoc<0)
+				return -1;
+			close(tmp);
+		}
+#endif
+
+	marslog(LOG_INFO,"Calling mars on '%s', callback on %d",dhs->host,port);
+
+	timer_start(connect_time);
+	dhs->csoc = call_server(dhs->host,dhs->port,dhs->retry);
+	timer_stop(connect_time,0);
+	if(dhs->csoc<0) 
+		return -1;
+
+
+	/* Set up the stream to send the request */
+
+	make_socket_stream(&dhs->s,&dhs->csoc);
+
+	/* This should be unique */
+
+	dhs->id     =  (((ulong64)getpid()) << 32) | (ulong64)time(0);
+
+	/* Send info */
+
+	stream_write_start(&dhs->s,"MarsTask");
+
+	/* send id */
+	stream_write_ulonglong(&dhs->s,0);
+
+	/* Send requests */
+
+	send_request(&dhs->s,r);
+	send_request(&dhs->s,e);
+
+	/* Send cb info */
+
+	addr = dhs->address?dhs->address:address;
+	if(mars.show_hosts)
+		if(dhs->address)
+			marslog(LOG_INFO,"Callback at address %s, port %d",addr,port);
+
+	stream_write_string(&dhs->s,addr);
+	stream_write_int(&dhs->s,port);
+	stream_write_ulonglong(&dhs->s,dhs->id);
+
+	/* Send datahandle */
+
+	stream_write_start(&dhs->s,"MarsHandle");
+
+	stream_write_string(&dhs->s,addr);
+	stream_write_int(&dhs->s,port);
+	stream_write_ulonglong(&dhs->s,dhs->id);
+
+	stream_write_int(&dhs->s,mars.crc);
+
+	stream_write_end(&dhs->s);
+
+	stream_write_end(&dhs->s);
+
+	if(dhs->s.error)
+		return dhs->s.error;
+
+
+	dhs->u_v   = wind_new(r,&dhs->total_read);
+
+	return timed_dhs_wait(dhs);
+}
+
+static err check_file_sizes(const request *r)
+{
+	err e = NOERR;
+	int q = 0;
+	const char *s = 0;
+
+	while(e == 0 && (s = get_value(r,"SOURCE",q++)) != NULL)
+	{
+		long64 file_length = 0;
+		FILE *f = NULL;
+		s = no_quotes(s);
+
+		f = fopen(s,"r");
+		if(f == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"ARCHIVE : '%s'",s);
+			e = -6;
+			break;
+		}
+
+		if((file_length = file_size(fileno(f))) < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot compute size on '%s'",s);
+			e = -1;
+		}
+		else
+		{
+			marslog(LOG_DBUG,"File '%s': %sbyte(s)",s,bytename(file_length));
+
+			if(mars.max_filesize && file_length > mars.max_filesize)
+			{
+				marslog(LOG_EROR,"File '%s': %sbyte(s)",s,bytename(file_length));
+				marslog(LOG_EROR,"MARS can archive files up to %sbyte(s)",bytename(mars.max_filesize));
+				marslog(LOG_EROR,"Please, split source file and archive request");
+				e = -1;
+			}
+		}
+
+		if(f) fclose(f);
+
+	}
+	return e;
+}
+
+
+static err  dhs_open(void *data,request *r,request *e,int mode)
+{
+	dhsdata *dhs = (dhsdata*)data;
+	err error = 0;
+	int maxretry = 10;
+	int retry = 0;
+
+	mars.wind_requested_by_server = false;
+
+	set_value(r,"_client_can_index_grib", "%d", mars.build_grib_index );
+	set_value(r,"_accept_client_notifications", "1");
+	if(mars.private_key) 
+	{
+		if(access(mars.private_key, R_OK) == 0)
+			set_value(r,"_accept_authentication_requests", "1" );
+		else
+			marslog(LOG_WARN|LOG_PERR,"%s",mars.private_key);
+	}
+
+	dhs->req             = clone_one_request(r);
+	dhs->is_bufrfile     = feedback(r) || bias(r) || track(r);
+	dhs->obs             = observation(r);
+	dhs->odb             = is_odb(r);
+	dhs->open            = false;
+	dhs->retry_on_client         = false;
+	dhs->retry_forever_on_client = false;
+
+	if(mars.readdisk_buffer > 0)
+		dhs->read_disk_buffer = reserve_mem(mars.readdisk_buffer);
+	else
+		dhs->read_disk_buffer = NULL;
+
+	if( fetch(r) )
+		dhs->fetch = true;
+	else if( EQ(r->name,"STORE") )
+	{
+		if((error = dhs_store_check(dhs)))
+			return error;
+	}
+	else if( EQ(r->name,"ARCHIVE") )
+	{
+		const char *s = strcache(no_quotes(get_value(r,"SOURCE",0)));
+
+		if(s == NULL)
+		{
+			marslog(LOG_EROR,"SOURCE parameter in missing");
+			return -5;
+		}
+
+		if((error = sanity_check(dhs->req)) != NOERR)
+			return error;
+
+		if((error = check_file_sizes(dhs->req) != NOERR))
+			return error;
+
+		if(observation(r))
+		{
+			if((error = dhs_obs_check(dhs,r)))
+				return error;
+		}
+		/* Images should be checked as other GRIB, from grib_api 1.10.0 */
+		else if (image(r))
+		{
+			if(error = dhs_image_check(dhs))
+				return error;
+		}
+		else if (feedback(r))
+		{
+			if(error = dhs_fb_check(dhs,r))
+				return error;
+		}
+		else if (bias(r))
+		{
+			if(error = dhs_bias_check(dhs,r))
+				return error;
+		}
+		else if (track(r))
+		{
+			if(error = dhs_track_check(dhs,r))
+				return error;
+		}
+		else if (is_odb(r))
+		{
+			if(error = dhs_odb_check(dhs,r))
+				return error;
+		}
+		else
+		{
+			if(error = dhs_grib_check(dhs,r))
+				return error;
+		}
+
+		if(getenv("MARS_NO_ARCH"))
+		{
+			marslog(LOG_WARN,"'MARS_NO_ARCH' selected. Skipping archive");
+			dhs->finished = true;
+			return 0;
+		}
+
+		if(!mars.fields_are_ok)
+		{
+			FILE *f = mail_open(mars.dhsmail,"Mars ARCHIVE failure (dhsbase)");
+			mail_request(f,"MARS Request:",r);
+			mail_request(f,"MARS Environment:",e);
+			mail_close(f);
+
+			marslog(LOG_EROR,"Some of the fields are rejected by the new mars server");
+			return -1;
+		}
+
+	}
+
+	while( (error = dhs_send(dhs,r,e)) != 0 && (retry++ < maxretry))
+	{
+		marslog(LOG_WARN,"Error %d received while calling server on '%s', retrying.",error,dhs->host);
+		dhs_close(dhs);
+		dhs->req         = clone_one_request(r);
+		sleep(10);
+	}
+
+	if(!error)
+		dhs->open = true;
+
+	return error;
+}
+
+static err  dhs_close(void *data)
+{
+	dhsdata *dhs = (dhsdata*)data;
+	err e = 0;
+	int retrieve = EQ(dhs->req->name,"RETRIEVE") && (dhs->total_toread != 0);
+
+#if 1
+	int retry = 0;
+	int maxretry = 5;
+	int save_time = dhs->timeout;
+
+	dhs->timeout = 1;
+
+	if(dhs->f)       socket_file_close(dhs->f);
+	if(dhs->csoc>=0) socket_close(dhs->csoc);
+
+
+	if(dhs->open)
+		while(!(dhs->finished) && (retry++ < maxretry))
+		{
+			if(timed_dhs_wait(dhs) != NOERR)
+				dhs->finished = true;
+		}
+	if(dhs->asoc>=0) socket_close(dhs->asoc);
+
+	dhs->timeout = save_time;
+
+#else
+	if(dhs->csoc == -1 && dhs->asoc == -1 && dhs->f == NULL)
+		timed_dhs_wait(dhs);
+
+	if(dhs->f) 
+	{
+		socket_file_close(dhs->f);
+	}
+	if(dhs->open)
+	{
+		if(dhs->csoc>=0) socket_close(dhs->csoc);
+		if(dhs->asoc>=0) socket_close(dhs->asoc);
+	}
+#endif
+	wind_free(dhs->u_v);
+	free_all_requests(dhs->req);
+	free_all_requests(dhs->metadata);
+	FREE(dhs->reclen);
+
+	marslog(LOG_DBUG,"%d messages received from '%s'",dhs->count,dhs->host);
+
+	if(dhs->total_read != dhs->total_toread)
+		marslog(LOG_WARN,"Got %lld out of %lld bytes",
+				dhs->total_read,dhs->total_toread);
+
+	/* mars_grib_index_print( dhs->head_idx ); */
+	mars_grib_index_free( dhs->head_idx );
+
+	dhs->csoc   = dhs->asoc = -1;
+	dhs->f      = NULL;
+	dhs->u_v    = NULL;
+	dhs->total_read = dhs->total_toread = 0;
+	dhs->req    = NULL;
+	dhs->total_tosend = 0;
+
+	if(dhs->read_disk_buffer)
+		release_mem(dhs->read_disk_buffer);
+
+	if(mars.wind_requested_by_server && retrieve) {
+		marslog(LOG_EXIT,"Convertion from VO/D to U/V was requested by server, but not done on client");
+	}
+
+	return e;
+}
+
+static err  dhs_read(void *data,request *r,void *buffer,long *length)
+{
+	dhsdata *dhs = (dhsdata*)data;
+	err e = 0;
+
+	/* Timers */
+	timer *net_time  = get_timer("Read from network","transfertime",true);
+
+	for(;;)
+	{
+		/* Server send OK, but not all data has been received */
+		if(dhs->finished)
+		{
+			if(dhs->total_read < dhs->total_toread)
+				return -2;
+
+			return EOF;
+		}
+
+		if(dhs->f) {
+
+			if(dhs->fetch)
+			{
+				long len;
+
+				while(dhs->reclen[dhs->index] == 0)
+				{
+					dhs->current = dhs->current->next;
+					if(dhs->current == NULL)
+						return EOF;
+					dhs->index++;
+					dhs->count++;
+				}
+
+				len = MIN(*length,dhs->reclen[dhs->index]);
+
+				if(timed_fread((char *) buffer, 1, len, dhs->f, net_time) != len)
+				{
+					marslog(LOG_EROR|LOG_PERR,"fetch");
+					return RETRY_ERR;
+				}
+
+				*length                  = len;
+				dhs->reclen[dhs->index] -= len;
+				dhs->total_read         += len;
+
+				if(r) reqcpy(r,dhs->current);
+			}
+			else if(dhs->obs)
+			{
+				e = timed_readany(dhs->f, (char *)buffer, length, net_time);
+				if(e == 0) 
+				{
+					dhs->count++;
+					dhs->total_read += *length;
+				}
+			}
+			else if (dhs->is_bufrfile)
+			{
+				e = 0;
+				if (dhs->data_size ==0)
+				{
+					e = read_metadata(dhs);
+					if(r) reqcpy(r,dhs->metadata);
+				}
+				if(e == 0)
+				{
+					e = timed_readany(dhs->f, (char *) buffer, length, net_time);
+					if(e == 0) 
+					{
+						dhs->count++;
+						dhs->total_read += *length;
+						dhs->data_size  -= *length;
+					}
+				}
+			}
+			else if (dhs->odb)
+			{
+#ifdef ODB_SUPPORT
+				{ 
+					const char *target = no_quotes(mars.webmars_target ? mars.webmars_target : get_value(dhs->req, "TARGET", 0));
+					const char *filter = get_value(dhs->req, "FILTER", 0);
+					FILE *out = NULL;
+					if(target)
+					{
+						out = fopen(target, target_open_mode(target));
+						if(! out) 
+						{
+							marslog(LOG_EROR|LOG_PERR, "fopen(%s)", target);
+							return -2;
+						}
+					}
+					dhs->total_read = odb_filter(filter, dhs->f, out, dhs->total_toread);
+                    e = fclose(out);
+                    if(e == 0)
+                        e = EOF;
+					/* If odb_filter fails, do not retry */
+					if(dhs->total_read == -1)
+						e = ODB_ERROR;
+
+				}
+#else
+				marslog(LOG_EROR,"This MARS client doesn't support ODB");
+				marslog(LOG_EROR,"Please, contact the MARS team");
+				e = -1;
+#endif
+			}
+			else
+			{
+				e =  timed_wind_next(dhs->u_v, dhs->f, (char *) buffer, length, net_time);
+				if(e == 0)
+				{
+					dhs->count++;
+					if(r)
+					{
+						grib_to_request(r, (char *)buffer, *length);
+						set_value(r,"_ORIGINAL_FIELD","1");
+					}
+				}
+
+			}
+
+			if(e == POSTPROC_ERROR)
+				return e;
+
+			if(getenv("MARS_STOP_TRANSFER_RANDOM") != 0)
+			{
+				static int count = 0;
+				marslog(LOG_INFO,"read number %d",count);
+				if(count > 11)
+				{
+					marslog(LOG_WARN,"Forcing failure, count %d",count);
+					e = RETRY_ERR;
+					count = 0;
+				}
+				count++;
+			}
+			if(e && (dhs->total_read < dhs->total_toread))
+			{
+				marslog(LOG_DBUG,"ftell: %d",ftell(dhs->f));
+				marslog(LOG_WARN,"Transfer interrupted, got %lld out of %lld bytes err=%d", dhs->total_read,dhs->total_toread,e);
+				if(e == NOT_FOUND_7777)
+				{
+					marslog(LOG_WARN,"Group 7777 not found at the end of GRIB message");
+				}
+				if(e == ODB_ERROR)
+				{
+					marslog(LOG_WARN,"Error decoding ODB data");
+				}
+				else
+				{
+					e = RETRY_ERR;
+				}
+				socket_file_close(dhs->f);
+				dhs->f = NULL;
+				dhs->total_read = 0;
+			}
+
+			return e;
+		}
+		e =  timed_dhs_wait(dhs);
+		if(e) break;
+	}
+
+	return e;
+}
+
+static err  dhs_write(void *data,request *r,void *buffer,long *length)
+{
+	return -1;
+}
+
+static err  dhs_archive(void *data,request *r)
+{
+	dhsdata *dhs = (dhsdata*)data;
+	err e = 0;
+	while(!dhs->finished)
+	{
+		e = timed_dhs_wait(dhs);
+		if(e) return e;
+	}
+	return 0;
+}
+
+static err  dhs_cntl(void *data,int code,void *param,int size)
+{
+	dhsdata *dhs = (dhsdata*)data;
+	err ret = -120;
+
+	marslog(LOG_DBUG,"Control in dhsbase, code %d",code);
+
+	switch(code)
+	{
+		case CNTL_FLUSH:
+		case CNTL_LIST:
+		case CNTL_STAGE:
+		case CNTL_REGISTER:
+		case CNTL_ATTACH:
+		case CNTL_REMOVE:
+		case CNTL_STORE:
+		case CNTL_FETCH:
+			while(!dhs->finished)
+			{
+				err e = timed_dhs_wait(dhs);
+				if(e) return e;
+			}
+			ret = 0;
+			marslog(LOG_DBUG,"Remove finished %d, return of %d", dhs->finished, ret);
+			break;
+
+		default:
+			marslog(LOG_WARN,"Unknown control %d on dhsbase",code);
+			return -1;
+			/*NOTREACHED*/
+			break;
+
+	}
+	marslog(LOG_DBUG,"Control finished in dhsbase with %d",ret);
+	return ret;
+}
+
+static boolean dhs_check(void *data,request *r)
+{
+	return true;
+}
+
+static err  dhs_validate(void *data,request* r,request* env,int mode)
+{
+	return 0;
+}
diff --git a/src/libMars/ecaccess.c b/src/libMars/ecaccess.c
new file mode 100644
index 0000000..c082310
--- /dev/null
+++ b/src/libMars/ecaccess.c
@@ -0,0 +1,113 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <string.h>
+#include "mars.h"
+#include "ecaccess.h"
+
+typedef struct ecaccessdata 
+{
+	char    *echost;
+	char    *eccommand;
+	char    *ecaccesshome;
+	int     eccertport;
+	char    *ecservice;
+
+} ecaccessdata;
+
+static option ecaccessopts[] = {
+	{"echost","ECHOST",NULL,"ecaccess.ecmwf.int",t_str,
+	sizeof(char*),OFFSET(ecaccessdata,echost)},
+	{"eccertport","ECCERTPORT",NULL,"443",t_int,
+	sizeof(int),OFFSET(ecaccessdata,eccertport)},
+	{"ecaccesshome","ECACCESS_HOME",NULL,".",t_str,
+	sizeof(char*),OFFSET(ecaccessdata,ecaccesshome)},
+	{"ectool","ECCOMMAND",NULL,"client/tools/eccert",t_str,
+	sizeof(char*),OFFSET(ecaccessdata,eccommand)},
+	{"ecservice","EC_MARS_SERVICE",NULL,"ecmars",t_str,
+	sizeof(char*),OFFSET(ecaccessdata,ecservice)},
+};
+
+static ecaccessdata setup;
+
+err ecaccess_connect(char* host, int* port, char* uid)
+{
+	int perr = 0;
+    char buf[BUFSIZ];
+	char cmd[10240];
+    FILE *file;
+	char *p,*q;
+
+	/* call get_options */
+	get_options("mars","ecaccess",&setup,NUMBER(ecaccessopts),ecaccessopts);
+
+	marslog(LOG_DBUG,"ecaccess_connect new version"); 
+
+    sprintf(cmd,"%s/%s -echost %s -ecport %d -tunnel %s",
+			setup.ecaccesshome,
+			setup.eccommand,
+			setup.echost,
+			setup.eccertport,
+			setup.ecservice
+			);
+
+	/* printf("%s\n",cmd); */
+
+	if ((file = popen(cmd, "r")) == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot run %s",cmd);
+		return -1;
+	}
+
+	memset(buf,0,sizeof(buf));
+	fgets(buf, BUFSIZ - 1, file); 
+	if(strlen(buf)) buf[strlen(buf)-1] = 0;
+
+	if( (perr = pclose(file)) != 0)
+	{
+		marslog(LOG_EROR,"pclose(%s) returns %d.",cmd,perr);
+		return -1;
+	}
+
+	/* parse the received string */
+	p = buf;
+	q = p;
+
+	host[0] = uid[0] = 0; *port = 0;
+
+	while(*p)
+	{
+		switch(*p)
+		{
+			case '@':
+				*p = 0;
+				strcpy(uid,q);
+				q = p+1;
+				*p = '@';
+				break;
+
+			case ':':
+				*p  = 0;
+				strcpy(host,q);
+				*port = atoi(p+1);
+				*p = ':';
+				break;
+		}
+		p++;
+	}
+
+	if(!host[0] || !uid[0] || !*port)
+	{
+		marslog(LOG_EROR,"Cannot parse [%s] output of %s",buf,cmd);
+		return -1;
+	}
+
+    return 0;	
+}
diff --git a/src/libMars/ecaccess.h b/src/libMars/ecaccess.h
new file mode 100644
index 0000000..53212fa
--- /dev/null
+++ b/src/libMars/ecaccess.h
@@ -0,0 +1,20 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+typedef struct ecaccess_info 
+{
+   /* char  *echost; */
+   /* char  *ecaccesshome; */
+   /* char  *ectool; */
+   /* int   eccertport; */
+   char  connect_host[80];
+   int   connect_port;
+   char  uid[80];
+} ecaccess_info;
diff --git a/src/libMars/environ.c b/src/libMars/environ.c
new file mode 100755
index 0000000..a2e4bf4
--- /dev/null
+++ b/src/libMars/environ.c
@@ -0,0 +1,381 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <pwd.h>
+#include <grp.h>
+#include <errno.h>
+
+
+
+void add_groups(const char *u,request *r)
+{
+#ifdef ECMWF
+	struct group *gr;
+	char **cp;
+	int found = false;
+
+	setgrent();
+	while (gr = getgrent()) {
+
+		for (cp = gr->gr_mem; cp && *cp; cp++)
+			if (EQ(*cp, u)) 
+			{
+				add_value(r,"group","%s",gr->gr_name);
+				found=true;
+			}
+	}
+
+	if(!found)
+	{
+		FILE *f = mail_open(mars.dhsmail,"getgrent failed for %s",u);
+		mail_request(f,"Environment :",r);
+		mail_close(f);
+
+		marslog(LOG_WARN,"Unable to get group information, getgrent");
+		add_value(r,"group","unknown");
+	}
+
+	endgrent();
+#endif
+}
+
+#ifdef ECMWF
+#define READ_EMS_MAX_TRY 5
+static void read_ems_cache(const char* who,request* env)
+{
+	char buf[1024];
+	FILE* in = NULL;
+	typedef enum reason { 
+		  notfound, 
+		  cantopen
+	} reason;
+	reason why;
+	int retry = 1;
+
+	/* Try to read cached file several times, in case of updates happenning */
+	while(retry++ < READ_EMS_MAX_TRY)
+	{
+		if((in = fopen(mars.emsfile,"r")) != NULL)
+		{
+			while(fgets(buf,sizeof(buf)-1,in))
+			{
+				char user[1024]; 
+				char category[1024];
+				sscanf(buf,"%s %s",user,category);
+				if(EQ(user,who))
+				{
+					marslog(LOG_DBUG,"Using EMS categories '%s'",category);
+					set_list(env,"category",category);
+					fclose(in);
+					return;
+				}
+			}
+
+			fclose(in);
+			if(mars.marslite_mode == 1)
+			{
+				const char *c = getenv("MARS_EMS_CATEGORY_MARSLITE_MODE");
+				if(c == NULL)
+					c = "public";
+				set_list(env,"category",c);
+				return;
+			}
+
+			marslog(LOG_WARN,"Can't find EMS categories for user '%s'",who);
+			why = notfound;
+		}
+		else
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot open %s",mars.emsfile);
+			why = cantopen;
+		}
+		sleep(2);
+	}
+
+	/* Inform about problems with EMS */
+	{
+		int e = errno;
+		FILE *f = mail_open(mars.dhsmail,"read_ems_cache failed for %s",who);
+		switch(why)
+		{
+			case notfound:
+				mail_msg(f,"Can't find EMS categories for user '%s'",who);
+				mail_msg(f,"in EMS file %s",mars.emsfile);
+				break;
+			case cantopen:
+				mail_msg(f,"Cannot open %s",mars.emsfile);
+				if(e)
+					mail_msg(f,"(%s)",strerror(e));
+				break;
+			default:
+				mail_msg(f,"Unknown reason (%d) for user '%s'",why,who);
+				break;
+		}
+		mail_request(f,"Environment :",env);
+		mail_close(f);
+	}
+
+	marslog(LOG_WARN,"Using NIS group information");
+	/* temp fix */ add_groups(who,env);
+}
+
+
+#define READ_EMS_ACCOUNT_MAX_TRY 5
+static void read_ems_accounts(const char* who,request* env)
+{
+	char buf[1024];
+	FILE* in = NULL;
+	typedef enum reason { 
+		  notfound, 
+		  cantopen
+	} reason;
+	reason why;
+	int retry = 1;
+
+	/* Try to read cached file several times, in case of updates happenning */
+	while(retry++ < READ_EMS_ACCOUNT_MAX_TRY)
+	{
+		if((in = fopen(mars.emsaccountsfile,"r")) != NULL)
+		{
+			while(fgets(buf,sizeof(buf)-1,in))
+			{
+				char user[1024]; 
+				char account[1024];
+				sscanf(buf,"%s %s",user,account);
+				if(EQ(user,who))
+				{
+					marslog(LOG_DBUG,"Using EMS accounts '%s'",account);
+					set_list(env,"account",account);
+					fclose(in);
+					return;
+				}
+			}
+
+			fclose(in);
+			if(mars.marslite_mode == 1)
+			{
+				const char *c = getenv("MARS_EMS_ACCOUNT_MARSLITE_MODE");
+				if(c == NULL)
+					c = "dspublic";
+				set_list(env,"account",c);
+				return;
+			}
+			marslog(LOG_WARN,"Can't find EMS accounts for user '%s'",who);
+			why = notfound;
+		}
+		else
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot open %s",mars.emsaccountsfile);
+			why = cantopen;
+		}
+		sleep(2);
+	}
+
+	/* Inform about problems with EMS */
+	{
+		if(mars.enable_ecaccount_email)
+		{
+			int e = errno;
+			FILE *f = mail_open(mars.dhsmail,"read_ems_accounts failed for %s",who);
+			switch(why)
+			{
+				case notfound:
+					mail_msg(f,"Can't find EMS accounts for user '%s'",who);
+					mail_msg(f,"in EMS file %s",mars.emsaccountsfile);
+					break;
+				case cantopen:
+					mail_msg(f,"Cannot open %s",mars.emsaccountsfile);
+					if(e>0)
+						mail_msg(f,"(%s)",strerror(e));
+					break;
+				default:
+					mail_msg(f,"Unknown reason (%d) for user '%s'",why,who);
+					break;
+			}
+			mail_request(f,"Environment :",env);
+			mail_close(f);
+		}
+	}
+
+	/* temp fix */ 
+	set_value(env,"account","unknown");
+}
+
+#endif
+static request *env = NULL;
+
+#ifdef ECMWF
+boolean user_in_ABC_account(const char *user, const char *account, const request *env)
+{
+	int     i     = 0;
+	boolean match = false;
+	const char *v = NULL;
+
+	while((v = get_value(env,"account",i++)) != 0)
+	{
+		if(EQ(account,v))
+			match = true;
+	}
+	return match;
+}
+
+#endif
+
+request *get_environ(void)
+{
+	char buf[1024];
+	unsigned long id;
+	char *useWebmars     = getenv("WEBMARS_USER");
+	char *emosChangeUser = getenv("EMOS_CHANGE_USER");
+	const char *who      = user();
+	char *useTest        = getenv("MARS_ENV");
+	const char *abc      = strcache(getenv("ECACCOUNT"));
+	const char *owner    = strcache(getenv("ECREALOWNER"));
+	char *environment    = getenv("ENVIRONMENT");
+	char *marsClientHost = getenv("MARS_CLIENT_HOSTNAME");
+
+	if(env) return env;
+
+	if(useTest && EQ(who,"max"))
+	{
+		env = read_request_file(useTest);
+		marslog(LOG_WARN,"User %s has changed the environment",who);
+		print_all_requests(env);
+		return env;
+	}
+
+	env = new_request(strcache("environ"),NULL);
+
+#ifdef ECMWF
+	if((useWebmars && EQ(who,"max")) ||
+	   (emosChangeUser && EQ(who,"emos")))
+	{
+		char *u = useWebmars;
+		if(emosChangeUser)
+			u = emosChangeUser;
+		set_value(env,"user",u);
+		if(getenv("MARS_EMS_CATEGORIES"))
+		{
+			if(mars.show_hosts)
+				marslog(LOG_INFO,"Using EMS categories '%s'",getenv("MARS_EMS_CATEGORIES"));
+			set_list(env,"category",getenv("MARS_EMS_CATEGORIES"));
+		}
+		else
+		{
+			if(mars.show_hosts)
+				marslog(LOG_WARN,"User '%s' executes request as user '%s'",who,u);
+			if(mars.emsfile)
+				read_ems_cache(u,env);
+			else
+				add_groups(u,env);
+		}
+		if(mars.show_hosts)
+			print_all_requests(env);
+		who = u;
+	}
+	else
+	{
+		set_value(env,"user",who);
+		if(mars.emsfile)
+			read_ems_cache(who,env);
+		else
+			add_groups(who,env);
+	}
+
+	if(mars.debug_ems)
+	{
+		marslog(LOG_INFO,"MARS environment for '%s':",who);
+		print_all_requests(env);
+	}
+
+	if(owner)
+		set_value(env,"owner",owner);
+
+	if(abc)
+	{
+		const char *name = who;
+		if(mars.emsaccountsfile)
+		{
+			if(owner)
+				name = owner;
+			read_ems_accounts(name,env);
+		}
+
+		/* Check that the value provided for this user is valid */
+		if(!user_in_ABC_account(name,abc,env))
+		{
+			if(mars.enable_ecaccount_email)
+			{
+				FILE *f = mail_open(mars.dhsmail,"MARS ABC account mismatch for user %s [%s] , account %s",name,who,abc);
+				mail_request(f,"Environment :",env);
+				mail_close(f);
+			}
+			/* For now, log users and continue even if their account doesn't match */
+		}
+		set_value(env,"abc",abc);
+	}
+#endif
+	if(environment)
+		set_value(env,"environment",environment);
+
+	if(gethostname(buf,sizeof(buf)) == 0)
+		set_value(env,"host",buf);
+
+	if(marsClientHost)
+		set_value(env,"host",marsClientHost);
+
+	if(getdomainname(buf,sizeof(buf)) == 0)
+		set_value(env,"domain",buf);
+
+	set_value(env,"sourcebranch","%s",marssourcebranch());
+
+#ifndef hpux
+	id = (unsigned long)gethostid();
+	sprintf(buf,"%d.%d.%d.%d",
+		(id & 0xff000000) >> 24,
+		(id & 0x00ff0000) >> 16,
+		(id & 0x0000ff00) >>  8,
+		(id & 0x000000ff));
+
+	add_value(env,"host",buf);
+#endif
+		
+	set_value(env,"pid","%d",getpid());
+
+	return env;
+}
+
+void set_environ(request *e)
+{
+	free_all_requests(env);
+	env = clone_all_requests(e);
+}
+
+void new_user(const char* u)
+{
+	request *e = get_environ();	
+	set_value(e,"user","%s",u);
+	unset_value(e,"group");
+	add_groups(u,e);
+#ifdef ECMWF
+	if(mars.emsfile)
+		read_ems_cache(u,e);
+	if(mars.emsaccountsfile)
+		read_ems_accounts(u,e);
+	if(mars.force_setting_ecaccount)
+	{
+		const char *v = NULL;
+		if(v = get_value(e,"account",0))
+			set_value(e,"abc",v);
+	}
+#endif
+	set_value(e,"pid","%d",getpid());
+}
diff --git a/src/libMars/expand.c b/src/libMars/expand.c
new file mode 100755
index 0000000..0918c1e
--- /dev/null
+++ b/src/libMars/expand.c
@@ -0,0 +1,1387 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "lang.h"
+#include <ctype.h>
+#include <assert.h>
+
+#define PERFECT_MATCH 10000
+
+static err  langerr = 0;
+
+void free_one_value(value *p)
+{
+	strfree(p->name);
+	FREE(p);
+}
+
+void  free_all_values(value *p)
+{
+	while(p)
+	{
+		value *q = p->next;
+		free_one_value(p);
+		p = q;
+	}
+}
+
+void free_one_parameter(parameter *p)
+{
+	strfree(p->name);
+	free_all_values(p->values);
+	free_all_values(p->current_values);
+	free_all_values(p->default_values);
+	free_all_values(p->ibm_values);
+	free_all_requests(p->subrequest);
+	free_all_requests(p->interface);
+	FREE(p);
+}
+
+void free_all_parameters(parameter *p)
+{
+	while(p)
+	{
+		parameter *q = p->next;
+		free_one_parameter(p);
+		p = q;
+	}
+}
+
+void free_one_request(request *r)
+{
+	strfree(r->name);
+	strfree(r->kind);
+	strfree(r->info);
+	free_all_parameters(r->params);
+	FREE(r);
+}
+
+void free_all_requests(request *p)
+{
+	while(p)
+	{
+		request *q = p->next;
+		free_one_request(p);
+		p = q;
+	}
+}
+
+/*==================================================================*/
+
+
+value *clone_one_value(const value *p)
+{
+	value *q  = NEW_CLEAR(value);
+	q->next   = NULL;
+	q->name   = strcache(p->name);
+	return q;
+}
+
+value *clone_all_values(const value *p)
+{
+	if(p)
+	{
+		value *q = clone_one_value(p);
+		q->next  = clone_all_values(p->next);
+		/* q->alias = cone_value(p->alias); */
+		return q;
+	}
+	return NULL;
+}
+
+parameter *clone_one_parameter(const parameter *p)
+{
+	parameter *q = NEW_CLEAR(parameter);
+	q->next   = NULL;
+	q->name   = strcache(p->name);
+	q->values = clone_all_values(p->values);
+	q->current_values   = clone_all_values(p->current_values);
+	q->default_values   = clone_all_values(p->default_values);
+	q->ibm_values   = clone_all_values(p->ibm_values);
+	q->subrequest       = clone_all_requests(p->subrequest);
+	q->interface        = clone_all_requests(p->interface);
+	return q;
+}
+
+parameter *clone_all_parameters(const parameter *p)
+{
+	if(p)
+	{
+		parameter *q = clone_one_parameter(p);
+		q->next = clone_all_parameters(p->next);
+		return q;
+	}
+	return NULL;
+}
+
+request *clone_one_request(const request *r)
+{
+	if(r)
+	{
+		request *p = NEW_CLEAR(request);
+		p->name   = strcache(r->name);
+		p->info   = strcache(r->info);
+		p->kind   = strcache(r->kind);
+		p->params = clone_all_parameters(r->params);
+		p->next   = NULL;
+		return p;
+	}
+	return NULL;
+}
+
+request *clone_all_requests(const request *p)
+{
+	if(p)
+	{
+		request *q = clone_one_request(p);
+		q->next = clone_all_requests(p->next);
+		return q;
+	}
+	return NULL;
+}
+/*==================================================================*/
+static unsigned char charmap[] = {
+
+#if 0
+	'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+	'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+	'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+	'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+	'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+	'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+	'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+	'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+	'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+	'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+	'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+	'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+	'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+	'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+	'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+	'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+	'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+	'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+	'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+	'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+	'\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+	'\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
+	'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+	'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+#else
+0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 
+0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 
+0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 
+0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 
+0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 
+0x1e, 0x1f, ' ' /*   */,'!' /* ! */,'"' /* " */,'#' /* # */,
+'$' /* $ */,'%' /* % */,'&' /* & */,0x27, '(' /* ( */,')' /* ) */,
+'*' /* * */,'+' /* + */,',' /* , */,'-' /* - */,'.' /* . */,'/' /* / */,
+'0' /* 0 */,'1' /* 1 */,'2' /* 2 */,'3' /* 3 */,'4' /* 4 */,'5' /* 5 */,
+'6' /* 6 */,'7' /* 7 */,'8' /* 8 */,'9' /* 9 */,':' /* : */,';' /* ; */,
+'<' /* < */,'=' /* = */,'>' /* > */,'?' /* ? */,'@' /* @ */,'A' /* A */,
+'B' /* B */,'C' /* C */,'D' /* D */,'E' /* E */,'F' /* F */,'G' /* G */,
+'H' /* H */,'I' /* I */,'J' /* J */,'K' /* K */,'L' /* L */,'M' /* M */,
+'N' /* N */,'O' /* O */,'P' /* P */,'Q' /* Q */,'R' /* R */,'S' /* S */,
+'T' /* T */,'U' /* U */,'V' /* V */,'W' /* W */,'X' /* X */,'Y' /* Y */,
+'Z' /* Z */,'[' /* [ */,0x5c, ']' /* ] */,'^' /* ^ */,' ' /* _ */,
+'`' /* ` */,'A' /* a */,'B' /* b */,'C' /* c */,'D' /* d */,'E' /* e */,
+'F' /* f */,'G' /* g */,'H' /* h */,'I' /* i */,'J' /* j */,'K' /* k */,
+'L' /* l */,'M' /* m */,'N' /* n */,'O' /* o */,'P' /* p */,'Q' /* q */,
+'R' /* r */,'S' /* s */,'T' /* t */,'U' /* u */,'V' /* v */,'W' /* w */,
+'X' /* x */,'Y' /* y */,'Z' /* z */,'{' /* { */,'|' /* | */,'}' /* } */,
+'~' /* ~ */,0x7f, 0x80, 0x81, 0x82, 0x83, 
+0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 
+0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 
+0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 
+0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 
+0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 
+0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 
+0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 
+0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 
+0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 
+0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 
+0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 
+0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 
+0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 
+0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 
+0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 
+0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 
+0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 
+0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 
+0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 
+0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 
+0xfc, 0xfd, 0xfe, 0xff, 
+#endif
+};
+
+
+static int count_matches(const char *a,const char *b)
+{
+	int match = 0;
+	register char *cm = (char*)charmap;
+
+	if(b[1] == 0) /* Allow words starting with a @, *, ... */
+		switch(b[0])
+		{
+
+		case '@':
+			return PERFECT_MATCH;
+
+		case '*':
+			if(is_number(a))
+				return PERFECT_MATCH;
+			else if(isrange(a)) /* <------------ come back here !!! */
+				return PERFECT_MATCH;
+			else if(isdate(a)) /* <------------ come back here !!! */
+				return PERFECT_MATCH;
+			else if(istime(a)) /* <------------ come back here !!! */
+				return PERFECT_MATCH;
+			else
+				return 0;
+			/*NOTREACHED*/
+			break;
+
+		case '"':
+		case '\'':
+			if(*a == '"' || *a == '\'')
+				return PERFECT_MATCH;
+			else
+				return 0;
+
+			/*NOTREACHED*/
+			break;
+
+		case '/':
+			/* obsolete ... */
+			break;
+		}
+
+	/* match for DAY 1, WEEK 6, ... */
+	if(b[0] == '*' && b[1] != 0)
+	{
+		char buf[80];
+		int  value;
+		if(sscanf(a,"%s %d",buf,&value) == 2)
+		{
+			if(count_matches(buf,b+1)) {
+				return PERFECT_MATCH;
+			}
+		}
+	}
+
+	while(*a && *b && cm[*a] == cm[*b])
+	{
+		match++;
+		a++;
+		b++;
+	}
+
+	/*
+	if(*a != 0) return 0;
+	if(*b == 0) return PERFECT_MATCH;
+	*/
+
+	if(*a == 0 && *b == 0) return PERFECT_MATCH;
+
+	return match;
+}
+
+
+void update_step_list(int p, int n, int by, value *v)
+{
+	value *nv;
+	parameter *np;
+	value *save;
+	value *first = 0;
+	value *last = 0;
+	char buf[80];
+
+	sprintf(buf,"%d",p*24);  
+	first = nv = new_value(strcache(buf));
+
+	nv->next = new_value(strcache("TO"));
+	nv = nv->next ;
+
+	sprintf(buf,"%d",(int)((p+n-by/24.0)*24)); 
+	nv->next = new_value(strcache(buf));
+	nv = nv->next ;
+		
+	nv->next = new_value(strcache("BY"));
+	nv = nv->next;
+
+	sprintf(buf,"%d",by); 
+	nv->next = new_value(strcache(buf));
+	nv = nv->next ;
+
+
+	np = new_parameter(strcache("STEP"),first);
+	np->count = 5;
+	/* print_all_requests(new_request(strcache("STEP"),np)); */
+
+	check_for_to_by_list(np);
+
+	/* print_all_requests(new_request(strcache("STEP"),np)); */
+
+	nv = first = np->values;
+	while(nv) { last = nv; nv = nv->next; }
+
+	last->next  = v->next;
+	v->next     = first->next;
+	first->next = 0;
+
+	strfree(v->name);
+	v->name = strcache(first->name);
+
+	free_all_parameters(np);
+
+}
+
+static err replace_value(value* v,long val)
+{
+	char buf[80];
+	sprintf(buf,"%d",val);
+	strfree(v->name);
+	v->name = strcache(buf);
+	return 0;
+}
+
+static err expand_steps_day(value* v,int val,request *r)
+{
+	return replace_value(v,val*24);
+}
+
+static err expand_steps_week(value* v,int val,request *r)
+{
+	return replace_value(v,val*7*24);
+}
+
+static err expand_steps_verify(value* v,int val,request *r)
+{
+	const char *date = get_value(r,"DATE",0);
+	const char *time = get_value(r,"TIME",0);
+	long d1,d2;
+
+	if(count_values(r,"DATE") != 1)
+	{
+		marslog(LOG_EROR,"Only one DATE can be given when STEPs are be specified as VERIFY");
+		return -2;
+	}
+
+	if(count_values(r,"TIME") != 1)
+	{
+		marslog(LOG_EROR,"Only one TIME can be given when STEPs are be specified as VERIFY");
+		return -2;
+	}
+
+	d1 = date_to_julian(atol(date));
+	d2 = date_to_julian(val);
+	/* t = atol(time); if(t>100) t /= 100; */
+
+	return replace_value(v,(d2-d1)*24);
+
+
+}
+
+static err expand_steps_month(value* v,int val,request *r)
+{
+	const char *date = get_value(r,"DATE",0);
+	long d1,d2,d0;
+	int i;
+	int n = 0;
+	int p = 0;
+	const char *time = get_value(r,"TIME",0);
+
+	if(count_values(r,"DATE") != 1)
+	{
+		marslog(LOG_EROR,"Only one DATE can be given when STEPs are be specified in MONTH");
+		return -2;
+	}
+
+	d2 = d1 = date_to_julian(atol(date) / 100 * 100 + 01);
+	for(i = 0; i < val; i++)
+	{
+		d2 = julian_to_date(d2 + 32,mars.y2k);
+		d2 = date_to_julian(d2 / 100 * 100 + 1);
+	}
+
+	p = d2-d1;
+
+	printf("validate %d",julian_to_date(date_to_julian(atol(date)) + p,mars.y2k));
+
+	return replace_value(v,p*24);
+
+}
+
+static err expand_steps(request *r)
+{
+	const char *step;
+	parameter* p = find_parameter(r,"STEP");
+	value *v;
+
+	if(!p) return 0;
+
+	v = p->values;
+	while(v)
+	{
+		char buf[80]; int val;
+		if(sscanf(v->name,"%s %d", buf,&val) == 2)
+		{
+			if(EQ(buf,"DAY"))        { if(expand_steps_day(v,val,r) != 0) return -2; }
+			else if(EQ(buf,"WEEK"))  { if(expand_steps_week(v,val,r) != 0) return -2; }
+			else if(EQ(buf,"VERIFY"))  { if(expand_steps_verify(v,val,r) != 0) return -2; }
+			else if(EQ(buf,"MONTH")) { if(expand_steps_month(v,val,r) != 0) return -2; }
+			else {
+				marslog(LOG_EROR,"Unknow value for STEP: %s",buf);
+				return -2;
+			}
+		}
+		v = v->next;
+	}
+	return 0;
+}
+
+
+
+void check_for_date(parameter *p,value *r)
+{
+	char buf[80];
+
+	if(EQ(p->name,"DATE"))
+	{
+
+		if(is_number(r->name))
+		{
+			int n = atoi(r->name);
+			int m;
+
+
+			/* special case for monthly means */
+
+			if( n > 0 && (n % 100) == 0 && n>=100000)
+				m = julian_to_date(date_to_julian(n+1),mars.y2k) - 1;
+			else if(n > 0 && n<100000)
+			/* special case for 'by' value */
+				m = n;
+			else {
+				m = julian_to_date(date_to_julian(n),mars.y2k);
+			}
+
+			if(n != m)
+			{
+				sprintf(buf,"%d",m);
+				strfree(r->name);
+				r->name = strcache(buf);
+			}
+		}
+		else if(isdate(r->name))
+		{
+			int m;
+			long julian,second;boolean isjul;
+			parsedate(r->name,&julian,&second,&isjul);
+			if(second)
+				marslog(LOG_WARN,"HH:MM:SS lost in %s",r->name);
+			if(!isjul) 
+			{
+				m = julian_to_date(julian,mars.y2k);
+				sprintf(buf,"%d",m);
+				strfree(r->name);
+				r->name = strcache(buf);
+			}
+		}
+		
+	}
+}
+
+void check_for_time(parameter *p,value *r)
+{
+	char buf[80];
+
+	if(EQ(p->name,"TIME"))
+	{
+
+		if(is_number(r->name))
+		{
+			if(strlen(r->name) <= 2)
+			{
+				int n = atoi(r->name);
+				sprintf(buf,"%04d",100*n);
+				strfree(r->name);
+				r->name = strcache(buf);
+			}
+		}
+		else if(istime(r->name))
+		{
+			int h,m,s;
+			parsetime(r->name,&h,&m,&s);
+			if(s)
+				marslog(LOG_WARN,"seconds ignored in %s",r->name);
+			 sprintf(buf,"%02d%02d",h,m);
+			 strfree(r->name);
+			 r->name = strcache(buf);
+		}
+	}
+}
+
+static void match_values(value *l,value *r,value **match1,value **match2,int *best_match)
+{
+	while(l)
+	{
+		value *o = l;
+
+		if(l->ref) match_values(l->ref,r,match1,match2,best_match);
+		else 
+			while(o)
+			{
+				int match = count_matches(r->name,o->name);
+
+				if(match == *best_match)
+				{
+					/* only if it is not already this value */
+					if(*match2 != l)
+					{
+						*match1 = *match2;
+						*match2 = l;
+					}
+				}
+
+				if(match > *best_match)
+				{
+					*best_match = match;
+					*match2 = l;
+					*match1 = NULL;
+				}
+				o = o->other_names;
+			}
+		l = l->next;
+	}
+}
+
+static boolean expand_value(parameter *p,value *r,value *lang)
+{
+	value  *match1     = NULL;
+	value  *match2     = NULL;
+	int     best_match = 0;
+	value   *a,*b;
+
+	match_values(lang,r,&match1,&match2,&best_match);
+
+	if(!best_match)
+	{
+		value *v = lang;
+
+		marslog(LOG_EROR,"undefined value : %s for parameter %s",
+		    r->name,p->name);
+
+		if(mars.verbose)
+		{
+			marslog(LOG_EROR,"Values are : ");
+
+
+			while(v)
+			{
+				value *o = v;
+				while(o)
+				{
+					const char* n = o->name;
+					switch(n[0])
+					{
+					case '*':
+						if(n[1])
+						{
+							printf("%s N",n+1);
+						}
+						else
+							printf("any number");
+						break;
+
+					case '"':
+					case '\'':
+						printf("any string");
+						break;
+
+					case '/':
+						printf("a list");
+						break;
+
+					default:
+						printf("%s",n);
+						break;
+
+					}
+					if(o->other_names) printf(" or ");
+					o = o->other_names;
+				}
+				putchar('\n');
+				v = v->next;
+			}
+		}
+
+
+		/* if don't fail use default values */
+		if(mars.expflags & EXPAND_DONT_FAIL)
+		{
+			langerr = 0;
+			marslog(LOG_WARN,"Ignoring parameter %s, using defaults",p->name);
+			if ( EQ(lang->name,"*") ) /* avoid crashing */
+			{
+				strfree(r->name);
+				r->name = strcache("1");
+			}
+			else
+			{
+				free_all_values(r);
+				r = clone_one_value(lang);
+			}
+
+			return false;
+		}
+		langerr = -1;
+		return false;
+	}
+
+	if(match1 && match2 && (match1 != match2) && best_match != PERFECT_MATCH)
+	{
+		marslog(LOG_EROR,"Ambiguous : %s could be %s or %s",
+		    r->name,
+		    match1->name,
+		    match2->name);
+		langerr = -1;
+		return false;
+	}
+
+	if(match2->name[0] == '*' && 
+	   match2->name[1] != 0 && 
+	   strlen(match2->name)>2 )  /* Metview simple formula uses '* ' */
+	{
+		/* case of DAY 1, WEEK 2, ... */
+		char buf[80];
+		long value;
+
+		sscanf(r->name,"%s %d",buf,&value);
+		sprintf(buf,"%s %d",match2->name+1,value);
+		strfree(r->name);
+		r->name = strcache(buf);
+
+	}
+	else if(match2->name[0] == '*' && match2->name[1] == 0)
+	{
+		/* remove ending . in numbers */
+
+		int len = strlen(r->name) - 1;
+		if(len >0 && (r->name[len]  == '.'))
+		{
+			char buf[80];
+			strcpy(buf,r->name);
+			strfree(r->name);
+			buf[len] = 0;
+		    r->name = strcache(buf);
+		}
+	}
+	else if( /* match2->name[1] != 0 || */
+			(match2->name[0] != '"'  && 
+			 match2->name[0] != '\'' && 
+			 match2->name[0] != '@') )
+	{
+
+		/* find last alias */
+
+		a = match2;
+		b = match2;
+
+		if(mars.expflags & EXPAND_LAST_NAME)
+			while(a) {
+				b = a;
+				a = a->other_names;
+			}
+		else if(mars.expflags & EXPAND_2ND_NAME)
+			if(a->other_names) b = a->other_names;
+
+		strfree(r->name);
+		r->name = strcache(b->name);
+
+		if(b->expand != NULL && ((mars.expflags & EXPAND_SUB_LISTS) != 0)) 
+		{
+			value *x = p->values;		
+			value *y = 0;
+			value *z = clone_all_values(b->expand);
+
+			if(p->ibm_values == 0)
+				p->ibm_values = clone_all_values(p->values);
+
+			while(x != r)
+			{
+				y = x;
+				x = x->next;
+			}
+
+			if(y) y->next  = z;
+			else  p->values = z;
+
+			y = 0;
+			while(z != NULL)
+			{
+				y = z;
+				z = z->next;
+			}
+
+			y->next = r->next;
+			r->next = 0;
+			free_one_value(r);
+
+			return true;
+			
+		}
+	}
+
+	if(mars.expflags & EXPAND_DATE) check_for_date(p,r);
+	if(mars.expflags & EXPAND_TIME) check_for_time(p,r);
+
+	return false;
+}
+
+static parameter* match_parameter(parameter *r,parameter *lang,boolean verbose)
+{
+	parameter *l         = lang;
+	parameter *match1    = NULL;
+	parameter *match2    = NULL;
+	int       best_match = 0;
+
+	while(l)
+	{
+		int match = count_matches(r->name,l->name);
+
+		if(match == best_match)
+		{
+			match1 = match2;
+			match2 = l;
+		}
+
+		if(match > best_match)
+		{
+			best_match = match;
+			match2 = l;
+			match1 = NULL;
+		}
+
+		l = l->next;
+	}
+
+
+	if(!best_match)
+	{
+		if(verbose)
+			marslog(LOG_EROR,"Undefined parameter: %s",r->name);
+		return NULL;
+	}
+
+	if(match1 && match2)
+	{
+
+		const char *prio1 = get_value(match1->interface,"priority",0);
+		const char *prio2 = get_value(match2->interface,"priority",0);
+
+		boolean prio = prio1 && prio2 && atol(prio1) != atol(prio2);
+
+		if(verbose)
+			marslog(prio?LOG_WARN:LOG_EROR,
+				"Ambiguous parameter: %s could be %s or %s",
+				r->name,
+				match1->name,
+				match2->name);
+
+		if(prio)
+		{
+			if(atol(prio1) > atol(prio2))
+				match2 = match1;
+			if(verbose)
+				marslog(LOG_WARN,"Assuming that '%s' means '%s'",r->name,match2->name);
+		}
+		else {
+			return NULL;
+		}
+	}
+
+	return match2;
+}
+
+
+static void expand_parameter(parameter *r,parameter *lang)
+{
+	parameter *match     = match_parameter(r,lang,true);
+	value     *p;
+
+	if(match == NULL)
+	{
+		langerr = -1;
+		return;
+	}
+
+	strfree(r->name);
+	r->name = strcache(match->name);
+
+	p = r->values;
+	while(p)
+	{
+		if(expand_value(r,p,match->values))
+			p = r->values;
+		else
+			p = p->next;
+	}
+
+	free_all_values(match->current_values);
+	free_all_values(match->ibm_values);
+
+	match->current_values = clone_all_values(r->values);
+	match->ibm_values     = clone_all_values(r->ibm_values);
+
+	match->subrequest = clone_all_requests(r->subrequest);
+}
+
+
+static request *strip_off_values(request *lang,request *r)
+{
+	parameter *p = r->params;
+	parameter *l = lang->params;
+	parameter *q = NULL;
+
+	while(p)
+	{
+		value *v     = p->current_values;
+		int flg      = 0;
+		int count    = 0;
+		parameter *s = p->next;
+
+		free_all_values(p->values);
+		p->values = p->current_values;
+		p->current_values   = NULL;
+
+		free_all_values(p->default_values);
+		p->default_values = clone_all_values(p->ibm_values);
+
+		if(v == NULL) { count = 1; flg = 1; }
+		while(v)
+		{
+			if(v->name == NULL)
+				{ count = 1; flg = 1; break; }
+			else if(mars.expflags & EXPAND_NO_OFF)
+			{
+				if(EQ(v->name,"O")    ) flg++;
+				else
+				if(EQ(v->name,"OFF")  ) flg++;
+				else
+				if(EQ(v->name,"\"\"") ) flg++;
+				else
+				if(EQ(v->name,"") ) flg++;
+			}
+
+			count++;
+
+			v = v->next;
+		}
+
+		if(mars.expflags & EXPAND_NO_DEFAULT)
+		{
+			value *d = l->default_values;
+			value *v = p->values;
+
+			while(d && v)
+			{
+				if(d->name != v->name) break;
+				d = d->next;
+				v = v->next;
+			}
+
+			if(v == NULL && d == NULL)
+				{ count = 1; flg = 1; }
+
+		}
+
+		/* if(p->values == NULL) { count = 1; flg = 1; } */
+
+		if((mars.expflags & (EXPAND_NO_OFF|EXPAND_NO_DEFAULT)) && 
+			(count == 1) && flg)
+		{
+			if(q) q->next = p->next;
+			else r->params = p->next;
+			free_one_parameter(p);
+		}
+		else
+			q = p;
+
+		p = s;
+		l = l->next;
+	}
+
+	if(mars.expflags & EXPAND_STEP)
+	{
+		if(expand_steps(r) != 0)
+			return 0;
+	}
+
+	if(mars.expflags & EXPAND_LISTS)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			count_values(r,p->name);
+			p = p->next;
+		}
+	}
+
+	return r;
+}
+
+static boolean probe_parameters(parameter* p,parameter* lang)
+{
+	while(p)
+	{
+		if(*p->name != '_') 
+		{
+			parameter* match;
+			if(match = match_parameter(p,lang,mars.debug))
+			{
+				value* v = p->values;
+				while(v)
+				{
+					value  *match1     = NULL;
+					value  *match2     = NULL;
+					int     best_match = 0;
+
+					match_values(match->values,v,&match1,&match2,&best_match);
+					/* Undefined value */
+
+					if(!best_match) 
+					{
+						marslog(LOG_DBUG,"No best match for %s",p->name);
+						return false;
+					}
+
+					/* ambiguous */
+					if(match1 && match2 && (match1 != match2) && 
+						best_match != PERFECT_MATCH)
+					{
+						marslog(LOG_DBUG,"Two best match for %s %s %s", p->name,match1->name,match2->name);
+						return false;
+					}
+
+					v = v->next;
+				}
+			}
+			else
+			{
+				marslog(LOG_DBUG,"No match for %s",p->name);
+				return false;
+			}
+		}
+		p = p->next;
+	}
+	return true;
+}
+
+static request *match_verb(const request* r,request *lang)
+{
+	request *l         = lang;
+	request *matches[1024];
+	int     best_match = 0;
+	int top = 0;
+	int use = -1;
+	boolean tell = false;
+
+	while(l)
+	{
+		int match = count_matches(r->name,l->name);
+
+		if(match == best_match)
+		{
+			if(top == NUMBER(matches)-1)
+				marslog(LOG_EXIT,"Match stack too small");
+			matches[top++] = l;
+		}
+
+		if(match > best_match)
+		{
+			top = 0;
+			matches[top++] = l;
+			best_match = match;
+		}
+
+		l = l->next;
+	}
+
+	if(!best_match)
+	{
+		marslog(LOG_EROR,"Undefined verb: %s",r->name);
+		return NULL;
+	}
+
+	if(top > 1)
+	{
+		int i;
+		/* Try to resolve ambiguity */
+		boolean ok[1024];
+		int n = 0;
+		use = -1;
+		for(i = 0 ; i < top ; i++)
+		{
+			marslog(LOG_DBUG,"Probing %s (%s)",matches[i]->name,matches[i]->kind);
+			if(ok[i] =  probe_parameters(r->params,matches[i]->params))
+			{
+				if(use < 0) use = i;
+				n++;
+				marslog(LOG_DBUG,"ok");
+			}
+			else
+			{
+				marslog(LOG_DBUG,"fail");
+			}
+		}
+
+		if(n > 1)
+		{
+			marslog(LOG_WARN,"Ambiguous verb: '%s' could be:",r->name);
+			for(i = 0; i < top; i++)
+				if(ok[i])
+					marslog(LOG_WARN,"  %s (%s)",matches[i]->name,matches[i]->kind);
+			tell = true;
+		}
+	}
+
+	if(use < 0) 
+		use = 0;
+
+	if(tell)
+		marslog(LOG_INFO,"Choosing %s (%s)", matches[use]->name, matches[use]->kind);
+	return matches[use];
+}
+
+static request *expand_one_request(const request *r,request *lang)
+{
+	request   *match  = match_verb(r,lang);
+	parameter *p  = r->params;
+
+	if(!match) 
+	{
+		langerr = -1;
+		return NULL;
+	}
+
+	while(p)
+	{
+		if(*p->name != '_') expand_parameter(p,match->params);
+		p = p->next;
+	}
+
+	return strip_off_values(match,clone_one_request(match));
+}
+
+static void chk_defaults(request *r)
+{
+	while(r)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			value *v = p->default_values;
+			while(v)
+			{
+				if(expand_value(p,v,p->values))
+					v = p->default_values;
+				else
+					v = v->next;
+			}
+			p = p->next;
+		}
+		r = r->next;
+	}
+}
+
+
+static value *resolve(request *lang,char *ref,char *name)
+{
+	request *r = lang;
+
+	while(r)
+	{
+		if(r->name == ref)
+		{
+			parameter *p = r->params;
+			while(p)
+			{
+				if(p->name == name)
+					return p->values;
+				p = p->next;
+			}
+		}
+		r = r->next;
+	}
+
+	marslog(LOG_EXIT,"Reference not found parameter %s of verb %s",name,ref);
+	return 0;
+}
+
+
+static void resolve_references(request *lang,request *r)
+{
+	while(r)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			value *v = p->values;
+			while(v)
+			{
+				if(v->ref)
+					v->ref = resolve(lang,(char*)v->ref,v->name);
+				v = v->next;
+			}
+			p = p->next;
+		}
+		r = r->next;
+	}
+}
+
+request *read_language_file(const char *name)
+{
+	extern request *parser_lang;
+	request *r;
+
+	if(parser(name,false) != NOERR)
+	{
+		free_all_requests(parser_lang);
+		parser_lang = NULL;
+		return NULL;
+	}
+	r = parser_lang;
+	parser_lang = NULL;
+	resolve_references(r,r);
+	chk_defaults(r);
+	reset_language(r);
+
+	return r;
+}
+
+static request *expand0(request *lang,rule *test,const request *r)
+{
+	if(r)
+	{
+		request *q = expand_one_request(r,lang);
+
+		if(!check_one_request(test,q))
+			langerr = -1;
+
+		if(q) q->next = expand0(lang,test,r->next);
+		return q;
+	}
+	return NULL;
+}
+
+long expand_flags(long flags)
+{
+	long old = mars.expflags;
+	mars.expflags = flags;
+	return old;
+}
+
+request *expand_all_requests(request *lang,rule *test,const request *r)
+{
+	request* s;
+	langerr  = 0;
+	s = expand0(lang,test,r);
+	if(langerr) free_all_requests(s);
+	return langerr?NULL:s;
+}
+
+void reset_language(request *lang)
+{
+	request *r = lang;
+	while(r)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			free_all_values(p->current_values);
+			free_all_requests(p->subrequest);
+			p->subrequest = 0;
+			p->current_values = clone_all_values(p->default_values);
+			p = p->next;
+		}
+		r = r->next;
+	}
+}
+
+static void loopuk_loop(value *v,lookupproc c,void *d)
+{
+	while(v)
+	{
+		if(v->ref) loopuk_loop(v->ref,c,d);
+		else c(v->name,d);
+		v = v->next;
+	}
+}
+
+request *closest_verb(request *lang,const char *name)
+{
+	request *l = lang;
+	int best = 1;
+	request *r = NULL;
+
+	while(l)
+	{
+		int match = count_matches(name,l->name);
+		if(match > best) { r = l; best = match; };
+		l = l->next;
+	}
+
+	return r;
+}
+
+parameter *closest_parameter(request *lang,const char *name)
+{
+	parameter *l =  lang?lang->params:NULL;
+	parameter *w = NULL;
+	int	best = 1;
+
+	while(l)
+	{
+		int match = count_matches(name,l->name);
+		if(match > best) { w = l; best = match; };
+		l = l->next;
+	}
+
+	return w;
+}
+
+void loopuk_language(request *lang,const char *v,const char *p,lookupproc c,void *d)
+{
+	request *r = closest_verb(lang,v);
+
+	if(r == NULL) return;
+
+	/* just params */
+
+	if(p == NULL)
+	{
+		parameter *w = r->params;
+		while(w)
+		{
+			c(w->name,d);
+			w = w->next;
+		}
+	}
+	else
+	{
+		parameter *w = closest_parameter(r,p);
+		if(w) loopuk_loop(w->values,c,d);
+	}
+}
+
+static request *trim(request *lang,request *r)
+{
+	while(lang)
+	{
+		if(lang->name == r->name)
+		{
+			parameter *p = r->params;
+			request   *s = empty_request(r->name);
+			parameter *t = NULL;
+
+			while(p)
+			{
+				parameter *q = lang->params;
+				while(q)
+				{
+					if(q->name == p->name)
+					{
+						parameter *u = clone_one_parameter(p);
+						if(t) t->next   = u;
+						else s->params = u;
+						t = u;
+						break;
+					}
+
+					q = q->next;
+				}
+
+				p = p->next;
+			}
+			return s;
+		}
+		lang = lang->next;
+	}
+	return NULL;
+}
+
+request *trim_all_requests(request *lang,request *r)
+{
+	request *s = NULL;
+	request *t = NULL;
+	request *u = NULL;
+
+	while(r)
+	{
+		u = trim(lang,r);
+		if(u)
+		{
+			if(t) t->next = u;
+			else s       = u;
+			t             = u;
+		}
+
+		r = r->next;
+	}
+	return s;
+}
+
+request *expand_mars_request(const request* r)
+{
+	return expand_all_requests(mars_language(),mars_rules(),r);
+}
+
+request* mars_language_from_request(const request* r)
+{
+	request *lang = mars_language();
+	while(lang)
+	{
+		if(lang->name == r->name && lang->kind == r->kind)
+			return lang;
+		lang = lang->next;
+	}
+	return NULL;
+}
+
+void copy_to_ibm_values(request* r,const char* name)
+{
+	parameter* p = find_parameter(r,name);
+	if (p)
+	{
+		free_all_values(p->default_values);
+		p->default_values = clone_all_values(p->values);
+	}
+}
+
+void move_to_ibm_values(request* source,request* dest,const char* name)
+{
+	parameter* p = find_parameter(source,name);
+	parameter* q = find_parameter(dest,name);
+	if (p && q)
+	{
+		free_all_values(q->default_values);
+		q->default_values = clone_all_values(p->values);
+	}
+}
diff --git a/src/libMars/externf.c b/src/libMars/externf.c
new file mode 100644
index 0000000..a4b0def
--- /dev/null
+++ b/src/libMars/externf.c
@@ -0,0 +1,71 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <errno.h>
+
+
+
+
+static err setargs(FILE *f,int n)
+{
+	if(n == 0)                return 0;
+	if(!(pop()))              return -1;
+	if(setargs(f,n-1))        return -1;
+	abort();
+
+	return 0;
+}
+
+
+err extern_func(math *p)
+{
+	marslog(LOG_EROR,"Undefined function '%s' with %d arguments",p->name,p->arity);
+	return -1;
+
+#if 0
+	char buf[1024];
+	request *r;
+	int saveerr = errno;
+	char *tmp = marstmp();
+	FILE *f = fopen(tmp,"w");
+	err e;
+
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"%s",tmp);
+		return -2;
+	}
+	e = setargs(f,p->arity);
+	fclose(f);
+
+	if(e == NOERR)
+	{
+		sprintf(buf,"env MNAME=%s MREQUEST=%s %s",p->name,tmp,p->name);
+		if(system(buf) != 0) e = -2;
+		else
+		{
+			r = read_request_file(tmp);
+			abort();
+			/*
+			if(r && (v = request_to_fieldset(NULL,r)))
+				push_fieldset(v,p);
+			else e = -2;
+			*/
+			free_all_requests(r);
+		}
+	}
+
+
+
+	errno = saveerr;
+	return e;
+#endif
+}
diff --git a/src/libMars/field.c b/src/libMars/field.c
new file mode 100644
index 0000000..96c215f
--- /dev/null
+++ b/src/libMars/field.c
@@ -0,0 +1,1150 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+B.Raoult
+ECMWF Oct-93
+
+ */
+
+#include "mars.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef CRAY
+#include <sys/mman.h>
+#endif
+#include <fcntl.h>
+#include <errno.h>
+#ifndef SYSV
+#include <strings.h>
+#endif
+#if defined(CRAY)
+extern int strcasecmp(const char*,const char*);
+#endif
+#include <math.h>
+
+#define PAD(l,n)     ( ( ( (l)+(n)-1 ) / (n) * (n) ) - (l) )
+
+#define INIT_SIZE	50 /* Allocate 50 fields at a time */
+
+#define GRIB		0x47524942
+
+#define STACK_SIZE 50
+
+#ifndef SEEK_SET
+#define SEEK_SET 0 /* stupid CodeCenter */
+#endif
+
+
+static mempool varmem = {
+	10, /* 10 pages = 40k */
+	1,  /* clear */
+};
+
+#define FASTNEW(type)  	     (type*)fast_new(sizeof(type),&varmem)
+#define FASTDEL(x)           fast_delete(x,&varmem)
+
+
+gribfile* new_gribfile(const char *name)
+{
+	gribfile* g = FASTNEW(gribfile);
+	g->fname = strcache(name?name:marstmp());
+	g->temp  = name == NULL;
+	g->file  = NULL;
+	marslog(LOG_DBUG,"create %s",g->fname);
+	return g;
+}
+
+FILE *open_gribfile(gribfile *g, const char *mode)
+{
+	if(g->file)
+		return g->file;
+
+	g->file = fopen(g->fname,mode);
+	if(g->file == NULL)
+		marslog(LOG_WARN|LOG_PERR,"fopen(%s)",g->fname);
+
+	return g->file;
+}
+
+void close_gribfile(gribfile *g)
+{
+	if(g->file)
+	{
+		if(fclose(g->file))
+			marslog(LOG_WARN|LOG_PERR,"fclose(%s)",g->fname);
+		g->file = NULL;
+	}
+}
+
+void free_gribfile(gribfile *g)
+{
+	if(!g) return;
+	g->refcnt--;
+	if(g->refcnt <= 0)
+	{
+		close_gribfile(g);
+		if(g->temp)
+		{
+			marslog(LOG_DBUG,"unlink %s",g->fname);
+			unlink(g->fname);
+		}
+
+		strfree(g->fname);
+		FASTDEL(g);
+	}
+}
+
+field_request* new_field_request(request *r)
+{
+	field_request* g = FASTNEW(field_request);
+	g->r = clone_one_request(r);
+	return g;
+}
+
+void free_field_request(field_request* g)
+{
+	if(!g) return;
+	g->refcnt--;
+	if(g->refcnt <= 0)
+	{
+		free_all_requests(g->r);
+		FASTDEL(g);
+	}
+}
+
+static void *alloc_empty(long size)
+{
+	void *p = reserve_mem(size);
+	memset(p,0,size);
+	return p;
+}
+
+
+
+void free_field(field *g)
+{
+	if(!g) return;
+	g->refcnt--;
+	if(g->refcnt <= 0)
+	{
+		free_gribfile(g->file);
+		free_field_request(g->r);
+		if(g->values)  release_mem(g->values);
+		grib_handle_delete(g->handle);
+		FASTDEL(g);
+	}
+}
+
+void free_fieldset(fieldset *v)
+{
+	int i;
+	if(!v) return;
+	v->refcnt--;
+	if(v->refcnt <= 0)
+	{
+		marslog(LOG_DBUG,"free_fieldset (%d fields) : ",v->count);
+
+		for(i=0;i<v->count;i++)
+			free_field(v->fields[i]);
+
+		release_mem(v->fields);
+		FASTDEL(v);
+	}
+}
+
+field *new_field()
+{
+	return FASTNEW(field);
+}
+
+
+static void grow_fieldset(fieldset *v,int n)
+{
+	int i;
+	int m = v->count;
+	int x = v->max;
+
+	if(n < v->count) return;
+
+	v->count = n;
+
+	while(v->count >= v->max)
+		if(v->max< INIT_SIZE)
+			v->max = INIT_SIZE;
+		else
+			v->max += v->max/2 +1;
+
+	if(v->max != x)
+	{
+		if( v->fields == NULL)
+			v->fields = (field**)reserve_mem(sizeof(field*)*v->max);
+		else
+		{
+			field** f = (field**)reserve_mem(sizeof(field*)*v->max);
+			for(i=0;i<m;i++)
+				f[i] = v->fields[i];
+			release_mem(v->fields);
+			v->fields = f;
+		}
+
+		for(i=m;i<v->max;i++)
+			v->fields[i] = NULL;
+	}
+}
+
+fieldset *new_fieldset(int n)
+{
+	fieldset *f = FASTNEW(fieldset);
+	grow_fieldset(f,n);
+	return f;
+}
+
+field* read_field(gribfile *file,file_offset pos,long length)
+{
+	field *g = new_field();
+
+	g->file   = file;
+	file->refcnt++;
+	g->offset = pos;
+
+	if(length == 0)
+	{
+		FILE *f = open_gribfile(file,"r");
+		if(f)
+		{
+			fseek(f,pos,SEEK_SET);
+			_readgrib(f,NULL,&length);
+			close_gribfile(file);
+		}
+	}
+	g->length = length;
+	g->shape  = packed_file;
+
+	return g;
+}
+
+err add_field(fieldset *v,field *g)
+{
+	int m = v->count;
+	grow_fieldset(v, v->count + 1);
+	v->fields[m] = g;
+	g->refcnt++;
+	return NOERR;
+}
+
+err set_field(fieldset *v,field *g,int pos)
+{
+	field *h;
+	if(pos >= 0)
+	{
+		grow_fieldset(v,pos+1);
+		h = v->fields[pos];
+		v->fields[pos] = g;
+		g->refcnt++;
+		if(h) free_field(h);
+	}
+	return NOERR;
+}
+
+err check_fieldset(fieldset *v, int expect)
+{
+	int i;
+	int hole = 0;
+	for(i=0;i<v->count;i++)
+		if(v->fields[i] == 0)
+			hole++;
+
+	if((v->count - hole) != expect)
+	{
+		marslog(LOG_EROR,"Inconsistency in field ordering, expected %d, recognised %d",expect,v->count - hole);
+		return -2;
+	}
+
+	return NOERR;
+}
+
+field *copy_field(field *gx,boolean copydata)
+{
+	field *gv   = new_field();
+
+	gv->value_count = gx->value_count;
+	gv->shape   = gx->shape;
+	gv->missing = gx->missing;
+	gv->bitmap  = gx->bitmap;
+
+	if(gx->r) {
+		gv->r = gx->r;
+		gv->r->refcnt++;
+	}
+
+	if(gx->handle)
+		gv->handle = grib_handle_clone(gx->handle);
+
+	if(gx->shape == expand_mem)
+	{
+		gv->values   = (double*)reserve_mem(sizeof(double)*gx->value_count);
+		if(copydata)
+			memcpy((void*)gv->values,(void*)gx->values,
+					gv->value_count*sizeof(double));
+	}
+
+
+	return gv;
+}
+
+void copy_bitmap(field *gc, field *ga, field *gb)
+{
+	boolean doit = ( ga && ga->bitmap) || (gb && gb->bitmap);
+
+	if(doit)
+	{
+		field *f = (ga)?ga:gb;
+		field *g = (gb)?gb:ga;
+		int j = 0;
+		if(f == g)
+		{
+			for(j=0;j<f->value_count;j++)
+				if(MISSING_VALUE(f->values[j]))
+					gc->values[j] = mars.grib_missing_value;
+		}
+		else
+		{
+			for(j=0;j<f->value_count;j++)
+				if(MISSING_VALUE(f->values[j]) ||  MISSING_VALUE(g->values[j]))
+					gc->values[j] = mars.grib_missing_value;
+		}
+
+		gc->bitmap = true;
+	}
+}
+
+void remove_bitmap(field *gc)
+{
+	int err;
+#ifdef COMEBACK
+	gc->bitmap = false;
+	gc->ksec1[4] &= ~0x40; /* ~0x40 == 0xAF */
+#endif
+	gc->bitmap = false;
+	err = grib_set_long(gc->handle,"bitmapPresent",0);
+	if(err) {
+		marslog(LOG_EXIT,"grib_set_long(bitmapPresent) failed: %s", grib_get_error_message(err));
+	}
+}
+
+fieldset *copy_fieldset(fieldset *x,int count,boolean copydata)
+{
+	fieldset *v = new_fieldset(count);
+
+	if( count != 0 )
+	{
+		int i;
+		for(i=0;i<count;i++)
+		{
+			field *gx = get_field(x,i,expand_mem);
+			v->fields[i] = copy_field(gx,copydata);
+			v->fields[i]->refcnt++;
+			release_field(gx);
+		}
+	}
+	return v;
+
+}
+
+fieldset *merge_fieldsets(fieldset *x,fieldset *y)
+{
+	int i;
+	int xcnt    = x ? x->count : 0;
+	int ycnt    = y ? y->count : 0;
+	fieldset *v = new_fieldset(xcnt + ycnt);
+
+	if( (v->count = xcnt + ycnt) != 0 )
+	{
+		for(i=0;i<xcnt;i++)
+		{
+			field *g = x->fields[i];
+			v->fields[i] = g;
+			g->refcnt++;
+		}
+
+		for(i=0;i<ycnt;i++)
+		{
+			field *g = y->fields[i];
+			v->fields[i + xcnt] = g;
+			g->refcnt++;
+		}
+	}
+
+	return v;
+
+}
+
+static void check(int *v,int a,int b)
+{
+	if(*v < a)
+	{
+		marslog(LOG_WARN,"Bad index : %d < %d",*v,a);
+		marslog(LOG_WARN,"The value is changed to %d",a);
+		*v = a;
+	}
+
+	if(*v > b)
+	{
+		marslog(LOG_WARN,"Bad index : %d > %d",*v,b);
+		marslog(LOG_WARN,"The value is changed to %d",b);
+		*v = b;
+	}
+
+}
+
+fieldset *sub_fieldset(fieldset *v,int from,int to,int step)
+{
+	fieldset *w;
+	int count,i,n;
+
+	if(from == 0 && to == 0 && step == 0)
+		return v;
+
+	if(to   == 0) to   = from;
+	if(step == 0) step = 1;
+
+	check(&from,1,v->count);
+	check(&to  ,1,v->count);
+
+	count = (to - from) / step + 1;
+
+	if ( count <= 0)
+	{
+		marslog(LOG_EROR,"Cannot range from %d to %d by %d",from,to,step);
+		return NULL;
+	}
+
+	w = new_fieldset(count);
+
+	for(i=0,n=from-1;i<count;i++,n+=step)
+	{
+		field *g = v->fields[n];
+		w->fields[i] = g;
+		g->refcnt++;
+	}
+
+	return w;
+
+}
+
+int best_packing(fortint current)
+{
+	if(mars.accuracy > 0)
+	{
+		marslog(LOG_DBUG,"best_packing: Using %d bits for packing",mars.accuracy);
+		return mars.accuracy;
+	}
+
+	if(mars.accuracy == -1)
+		return current;
+
+	return 24;
+}
+
+static err to_packed_mem(field *g)
+{
+
+	err e = NOERR;
+	int i;
+
+	if(g->shape == packed_mem) return NOERR;
+
+	if(g->shape == expand_mem)
+	{
+		/* Accuracy */
+		long accuracy = -1;
+		if((e = grib_get_long(g->handle,"numberOfBitsContainingEachPackedValue",&accuracy)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot get accuracy %s",grib_get_error_message(e));
+			return e;
+		}
+
+		accuracy = best_packing(accuracy);
+		if(e = grib_set_long(g->handle,"numberOfBitsContainingEachPackedValue",accuracy))
+		{
+			marslog(LOG_EROR,"grib_api: cannot set accuracy to %ld (%s)",accuracy,grib_get_error_message(e));
+			return e;
+
+		}
+
+		/* Bitmap */
+		if((e = grib_set_double(g->handle,"missingValue",mars.grib_missing_value)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot set missingValue %s",grib_get_error_message(e));
+			return e;
+		}
+		if(g->bitmap)
+		{
+			if((e = grib_set_long(g->handle,"bitmapPresent",1)))
+			{
+				marslog(LOG_EROR,"grib_api: cannot set bitmapPresent %s",grib_get_error_message(e));
+				return e;
+			}
+		}
+
+
+		/* Compute flag */
+		if(mars.computeflg)
+		{
+			if(e = grib_set_long(g->handle,"generatingProcessIdentifier",mars.computeflg))
+			{
+				marslog(LOG_EROR,"grib_api: cannot set generating process to %ld (%s)",mars.computeflg,grib_get_error_message(e));
+				return e;
+			}
+		}
+
+		/* Avoid computing Laplacian Operator, so results are bit comparable with MARS/gribex */
+		{
+			char grid_type[80];
+			size_t size;
+			size = sizeof(grid_type);
+			if(e = grib_get_string(g->handle,"typeOfGrid",grid_type,&size))
+			{
+				marslog(LOG_EROR,"grib_api: cannot get typeOfGrid %s",grib_get_error_message(e));
+				return e;
+			}
+
+			if(strcmp(grid_type,"sh") == 0)
+				grib_set_long(g->handle,"computeLaplacianOperator",0);
+
+		}
+
+
+		if((e = grib_set_double_array(g->handle,"values",g->values,g->value_count)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot encode values %s",grib_get_error_message(e));
+			return e;
+		}
+		release_mem(g->values);
+		g->values      = NULL;
+		g->value_count = 0;
+		g->shape  = packed_mem;
+		return NOERR;
+	}
+
+	if(g->shape == packed_file)
+	{
+		const void* dummy = NULL;
+
+		FILE *f = open_gribfile(g->file,"r");
+		if(!f)
+		{
+			marslog(LOG_EROR|LOG_PERR,"%s",g->file->fname);
+			return -1;
+		}
+		marslog(LOG_DBUG,"loading file %s",g->file->fname);
+
+		if( g->offset )
+		   fseek(f,g->offset,SEEK_SET);
+
+		g->handle = grib_handle_new_from_file(0,f,&e);
+
+		if( g->handle )
+			grib_get_message(g->handle,&dummy,&g->length);
+
+		close_gribfile(g->file);
+		g->shape = packed_mem;
+		if(e) return e;
+	}
+	return NOERR;
+}
+
+
+
+
+static err to_expand_mem(field *g)
+{
+	err e;
+	int i;
+
+	if(g->shape == expand_mem)  return NOERR;
+
+	if(g->shape == packed_file)
+	{
+		const void* dummy = NULL;
+
+		FILE *f = open_gribfile(g->file,"r");
+		if(!f)
+		{
+			marslog(LOG_EROR|LOG_PERR,"%s",g->file->fname);
+			return -1;
+		}
+		marslog(LOG_DBUG,"loading file %s",g->file->fname);
+
+		if( g->offset )
+		   fseek(f,g->offset,SEEK_SET);
+
+		g->handle = grib_handle_new_from_file(0,f,&e);
+
+		if( g->handle )
+			grib_get_message(g->handle,&dummy,&g->length);
+
+		close_gribfile(g->file);
+		if(!g->handle)
+			return -1;
+
+		if(g->values) release_mem(g->values);
+		g->values = NULL;
+	}
+
+	if(g->values == NULL)
+	{
+		size_t count = 0;
+		long bitmap = 0;
+
+		if((e = grib_get_size(g->handle,"values",&g->value_count)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot get number of values %s",grib_get_error_message(e));
+			return e;
+		}
+
+		count = g->value_count;
+
+		if((e = grib_set_double(g->handle,"missingValue",mars.grib_missing_value)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot set missingValue %s",grib_get_error_message(e));
+			return e;
+		}
+
+		g->values = (double*)reserve_mem(sizeof(double)*g->value_count);
+		if((e = grib_get_double_array(g->handle,"values",g->values,&count)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot get decode values %s",grib_get_error_message(e));
+			return e;
+		}
+
+		if(count != g->value_count)
+			marslog(LOG_EXIT,"grib_api: value count mismatch %d %d",count,g->value_count);
+
+		if((e = grib_get_long(g->handle,"bitmapPresent",&bitmap)))
+		{
+			marslog(LOG_EROR,"grib_api: cannot get bitmapPresent %s",grib_get_error_message(e));
+			return e;
+		}
+
+		g->bitmap = (bitmap != 0);
+
+#ifdef COMEBACK
+		set g->missing
+#endif
+	}
+
+
+	g->shape =  expand_mem;
+
+	return e;
+}
+
+void set_field_state(field *g,field_state shape)
+{
+	switch(shape)
+	{
+		case expand_mem:
+			to_expand_mem(g);
+			break;
+
+		case packed_mem:
+			to_packed_mem(g);
+			break;
+
+		case packed_file:
+			release_field(g);
+			break;
+
+		default:
+			marslog(LOG_EXIT,"Internal error %s %d",__FILE__,__LINE__);
+			break;
+
+	}
+}
+
+field *get_field(fieldset *v,int n,field_state shape)
+{
+	field *g = v->fields[n];
+	set_field_state(g,shape);
+	return g;
+}
+
+field *get_nonmissing_field(fieldset *v,field_state shape)
+{
+	int n = 0;
+	field *g = v->fields[n];
+
+	/* Try to get a non missing field */
+	while(g->missing && ++n<v->count)
+	{
+		g = v->fields[n];
+	}
+
+	if(n==v->count) /* If all missing, take the first */
+		g = v->fields[0];
+
+	set_field_state(g,shape);
+	return g;
+}
+
+void inform_missing_fieldset(const char *name)
+{
+	if(name)
+		marslog(LOG_WARN,"All fields in '%s' are missing",name);
+	else
+		marslog(LOG_WARN,"All fields in fieldset are missing");
+}
+
+void release_field(field *g)
+{
+	if(g->file) {
+		if(g->values)  release_mem(g->values);
+		g->values  = NULL;
+		g->shape  = packed_file;
+		grib_handle_delete(g->handle);
+		g->handle = NULL;
+	}
+}
+
+const void *field_message(field *g,long* s)
+{
+	const void *p;
+	size_t size;
+	err e;
+
+	if( (e=grib_get_message(g->handle,&p,&size)) )
+	{
+		marslog(LOG_EROR,"grib_api: cannot set message %s",grib_get_error_message(e));
+		return NULL;
+	}
+
+	*s = size;
+	return p;
+}
+
+err write_field(FILE *f,field *g)
+{
+	int pad;
+	err e = 0;
+	static int first = true;
+	static char c[10240];      /* 10Kb of padding should be enough */
+	long size;
+	const void *p = field_message(g,&size);
+
+	if(!p) return -1;
+
+
+	if(fwrite(p,1,size,f) != size)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error while writing to disk");
+		e = -2;
+	}
+
+	pad = PAD(size,120);
+
+	if(first)
+	{
+		memset(c,0,sizeof(c));
+		first=false;
+	}
+
+	if(fwrite(c,1,pad,f) != pad)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error while writing to disk");
+		return -2;
+	}
+
+	return e;
+}
+
+err save_fieldset(fieldset *v)
+{
+	int i;
+	err e = NOERR;
+	gribfile *file = NULL;
+	gribfile *last = NULL;
+	FILE *f = 0;
+
+	for(i=0;i<v->count;i++)
+	{
+		field *g = v->fields[i];
+
+		/* find last file used */
+		if(g != NULL && g->file != NULL && g->file->temp)
+			last = g->file;
+
+		if(g != NULL && g->file == NULL)
+		{
+			if(file == NULL)
+			{
+				file = last?last:new_gribfile(NULL);
+
+				f = fopen(file->fname,"a");
+				if(!f)
+				{
+					marslog(LOG_EROR|LOG_PERR,"Cannot open %s",file->fname);
+					return -2;
+				}
+			}
+			set_field_state(g,packed_mem);
+			g->file = file;
+			file->refcnt++;
+			g->offset = ftell(f);
+			e = write_field(f,g);
+			release_field(g);
+		}
+	}
+
+	if(f)
+	{
+		if(fclose(f))
+		{
+			marslog(LOG_EROR|LOG_PERR,"Error while writing to disk");
+			e = -2;
+		}
+	}
+
+	return e;
+}
+
+fieldset *read_fieldset(const char *fname,request *filter)
+{
+	fieldset *v;
+	FILE *f;
+	long i;
+	file_offset offset;
+	err e = 0;
+	long  buflen = 0;
+	long length = 0;
+	char *buffer = NULL;
+	request *r = NULL;
+	gribfile *file;
+	hypercube *h = NULL;
+	timer *t;
+	char buf[1024];
+
+#ifndef METVIEW
+	sprintf(buf,"Reading file %s",fname);
+	t=get_timer(buf,NULL,true);
+#endif
+
+	if(filter)
+		h = new_hypercube_from_mars_request(filter);
+
+
+	f = fopen(fname,"r");
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",fname);
+		return NULL;
+	}
+
+	v = new_fieldset(0);
+
+	if(filter) r = empty_request(NULL);
+
+
+	/* count fields */
+
+	i = offset = length = 0;
+	buflen = mars.readany_buffer_size;
+	length = buflen;
+	buffer = reserve_mem(length);
+	file = new_gribfile(fname);
+#ifndef METVIEW
+	timer_start(t);
+#endif
+
+	if(mars.readdisk_buffer > 0)
+	{
+		if(mars.readdisk_buffer > buflen)
+			marslog(LOG_WARN,"Cannot use %d bytes for setvbuf, maximum size is %ld",mars.readdisk_buffer,buflen);
+		else
+		{
+			marslog(LOG_DBUG,"Setting I/O read buffer to %d bytes",mars.readdisk_buffer);
+			if(setvbuf(f,buffer,_IOFBF,mars.readdisk_buffer))
+				marslog(LOG_WARN|LOG_PERR,"setvbuf failed");
+		}
+	}
+
+	while((e = _readany(f,buffer,&length)) == NOERR || (e == BUF_TO_SMALL))
+	{
+		boolean ok = true;
+
+		if(filter)
+		{
+			grib_to_request(r,buffer,length);
+			ok = cube_order(h,r) != -1;
+		}
+
+		if(ok) set_field(v,read_field(file,offset,length),i++);
+
+		if(mars.progress)
+		{
+			mars.done += length;
+			mars.progress();
+		}
+
+		offset = ftell(f);
+		length = buflen;
+	}
+
+	fclose(f);
+#ifndef METVIEW
+	timer_stop(t,0);
+#endif
+
+	if(buffer) release_mem(buffer);
+	free_all_requests(r);
+	if(h)
+		free_hypercube(h);
+
+
+	if(e != EOF)
+	{
+		marslog(LOG_EROR,"Error %d while reading %s",e,fname);
+		return NULL;
+	}
+
+	return v;
+}
+
+static fieldset *_request_to_fieldset(request *r)
+{
+	const char *path = get_value(r,"PATH",0);
+	fieldset *v = NULL;
+	int n = count_values(r,"OFFSET");
+	int m = count_values(r,"LENGTH");
+	int p = count_values(r,"INDEX");
+	/* 	char *temp = get_value(r,"TEMPORARY",0); */
+	/*  int tmp = temp?atoi(temp):0; */
+
+	int i;
+
+	if(n == 0 && m == 0)
+	{
+		v = read_fieldset(path,NULL);
+		if(!v) return NULL;
+		/* 		if(v->count) */
+		/* 			v->fields[0]->file->temp = tmp; */
+	}
+	else if(n != m)          /*-- [vk] fails here when LENGTH has not been set! --*/
+		marslog(LOG_EROR,
+				"Bad data request: offsets != lengths (%d and %d)",n,m);
+	else
+	{
+		gribfile *file = new_gribfile(path);
+
+		/* file->temp = tmp; */
+
+		v = new_fieldset(n);
+
+		for(i=0;i<n;i++)
+		{
+			long length = atol(get_value(r,"LENGTH",i));
+			file_offset offset;
+#ifdef LARGE_FILES_SUPPORT
+			offset = atoll(get_value(r,"OFFSET",i));
+#else
+			offset = atol(get_value(r,"OFFSET",i));
+#endif 
+			set_field(v,read_field(file,offset,length),i);
+			if(mars.progress) {
+				mars.done += length;
+				mars.progress();
+			}
+		}
+	}
+	return v;
+}
+
+
+fieldset *request_to_fieldset(request *r)
+{
+	fieldset *v = NULL;
+
+	if(mars.progress) {
+		/* Count size */
+		request *u = r;
+		mars.todo = 0;
+		mars.done = 0;
+		while(r && EQ(r->name,"GRIB"))
+		{
+			int m = count_values(r,"LENGTH");
+			if(m)  {
+				int i;
+				for(i=0;i<m;i++)
+					mars.todo += atol(get_value(r,"LENGTH",i));
+			}
+			else {
+				const char* p = get_value(r,"PATH",0);
+				struct stat s;
+				if(p && stat(p,&s) == 0)
+					mars.todo += s.st_size;
+			}
+			r = r->next;
+		}
+		mars.progress();
+		r = u;
+	}
+
+	if(r && (r->next == NULL || !EQ(r->next->name,"GRIB")) )
+		return _request_to_fieldset(r);
+	while(r)
+	{
+		fieldset *w = _request_to_fieldset(r);
+		fieldset *x = merge_fieldsets(v,w);
+		free_fieldset(w);
+		free_fieldset(v);
+		v = x;
+		r = r->next;
+	}
+	return v;
+}
+
+static request *_make_one_request(fieldset *v)
+{
+	char *tmp = marstmp();
+	FILE *f = fopen(tmp,"w");
+	err e = 0;
+	int i;
+	request *r;
+
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"%s",tmp);
+		return NULL;
+	}
+
+	for(i=0;i<v->count;i++)
+	{
+		field *g = v->fields[i];
+		set_field_state(g,packed_mem);
+		e = e?e:write_field(f,g);
+		release_field(g);
+	}
+
+	if(fclose(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error while writing to disk");
+		return NULL;
+	}
+	if(e) return NULL;
+
+	r = empty_request("GRIB");
+	set_value(r,"PATH","%s",tmp);
+	set_value(r,"TEMPORARY","1");
+	return r;
+}
+
+request *fieldset_to_request(fieldset *v)
+{
+	request *r = NULL;
+	request *first = NULL;
+	request *last = NULL;
+	char *path = NULL;
+	int i;
+	int n = 0;
+
+	if(save_fieldset(v))
+		return NULL;
+
+	/* no multi  grib yet... */
+#if 1
+	for(i=0;i<v->count;i++)
+	{
+		field *g = v->fields[i];
+		if(g->file->fname != path)
+		{
+			path = g->file->fname;
+			n++;
+		}
+	}
+	path = NULL;
+
+	if(n > 1)
+		return _make_one_request(v);
+
+#endif
+
+	for(i=0;i<v->count;i++)
+	{
+		field *g = v->fields[i];
+		if(g->file->fname != path)
+		{
+			path = g->file->fname;
+			r = empty_request("GRIB");
+			set_value(r,"PATH","%s",path);
+			set_value(r,"TEMPORARY","%d",g->file->temp);
+
+			/* If a requests is made, some other modules
+			   needs the data, so make it non-temporary*/
+
+			g->file->temp = false;
+
+			if(first == NULL) first = r;
+			if(last) last->next = r;
+			last = r;
+		}
+#ifdef LARGE_FILES_SUPPORT
+		add_value(r,"OFFSET","%lld",g->offset);
+#else
+		add_value(r,"OFFSET","%d",g->offset);
+#endif
+
+		add_value(r,"LENGTH","%d",g->length);
+	}
+
+
+	return first;
+
+}
+
+request *fieldset_to_mars_request(fieldset *fs)
+{
+	int i;
+	request* r = empty_request("GRIB");
+
+	if(!fs)
+		return 0;
+
+	for(i = 0; i < fs->count; i++)
+	{
+		request *s = field_to_request(fs->fields[i]);
+		reqmerge(r,s);
+	}
+
+	return r;
+}
+
+request* field_to_request(field* f)
+{
+	if(f->r == 0)
+	{
+		field_state state = f->shape;
+		request *r = empty_request(
+#ifdef COMEBACK
+				((f->ksec1 == NULL) || (f->ksec1[2] != mars.computeflg)) ? "GRIB" : "COMPUTED");
+#else
+		"GRIB");
+#endif
+
+		set_field_state(f,packed_mem);
+		handle_to_request(r,f->handle,NULL);
+		set_field_state(f,state);
+
+		f->r = new_field_request(r);
+		free_all_requests(r);
+	}
+	return f->r->r;
+}
diff --git a/src/libMars/field.h b/src/libMars/field.h
new file mode 100755
index 0000000..d1fea69
--- /dev/null
+++ b/src/libMars/field.h
@@ -0,0 +1,76 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <grib_api.h>
+
+/* This should be c++ ... */
+
+typedef  enum field_state {
+	unknown,packed_mem,packed_file,expand_mem}
+field_state;
+
+typedef struct gribfile {
+	struct gribfile *next;
+	char   *fname;
+	int    refcnt;
+	boolean temp;
+	FILE    *file;
+} gribfile;
+
+typedef struct {
+	int      refcnt;
+	request* r;
+} field_request;
+
+/* One field .. */
+
+typedef struct field {
+
+	int     refcnt;
+
+	field_state shape;
+
+	grib_handle* handle;
+	double*      values;
+	size_t         value_count;
+
+
+	/* if on file */
+
+	file_offset   offset;
+	size_t        length;
+	gribfile      *file;
+
+	/* missing fields/values */
+
+	boolean   missing;         /* field is missing */
+	boolean   bitmap;          /* field has missing values (= bitmap) */
+
+	field_request *r;
+
+} field;
+
+typedef struct fieldset {
+
+	int     refcnt;
+
+	/* if fields */
+
+	int   max;
+	int   count;
+
+	field **fields;
+
+}fieldset;
+
+
+#define MISSING_VALUE(n)      ((n) == mars.grib_missing_value)
+#define MISSING_FIELD(f)      ((f)->missing)
+#define FIELD_HAS_BITMAP(f)   ((f)->bitmap)
diff --git a/src/libMars/filebase.c b/src/libMars/filebase.c
new file mode 100644
index 0000000..a42b362
--- /dev/null
+++ b/src/libMars/filebase.c
@@ -0,0 +1,297 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <ctype.h>
+
+
+static void     file_init(void);
+static err      file_open(void *data,request*,request*,int);
+static err      file_close(void *data);
+static err      file_read(void *data,request *r,void *buffer,long *length);
+static err      file_write(void *data,request *r,void *buffer,long *length);
+static boolean  file_check(void *data,request *r);
+
+typedef struct filedata {
+	char    *root;
+	char    *tmplate;
+	char    *order;
+	request *w;
+	request *u;
+} filedata;
+
+static option opts[] = {
+	{"fileroot","FILE_ROOT",NULL,"/tmp/",
+	t_str,sizeof(char*),
+	OFFSET(filedata,root)},
+
+	{"template","TEMPLATE",NULL,
+
+	"(TYPE,%s).(STREAM,%s).(LEVTYPE,%s).(DOMAIN,%s)"
+	".(NUMBER,%04d).(_EXPVER,%04X).(_REPRES,%02s)"
+	"/(_AREA_N,%.6f).(_AREA_W,%.6f).(_AREA_S,%.6f).(_AREA_E,%.6f)."
+	"(_ROTATION_LAT,%.6f).(_ROTATION_LON,%.6f)."
+	"(_GRID_NS,%.6f).(_GRID_EW,%.6f).(_GAUSSIAN,%4d).(_TRUNCATION,%4d)/"
+	"(PARAM,%03d).(LEVELIST,%04d).(DATE,%06d).(TIME,%04d).(STEP,%04d)"
+
+	,
+
+	t_str,sizeof(char*),
+	OFFSET(filedata,tmplate)},
+
+	{"fileorder","FILE_ORDER",NULL,NULL, /* default : mars order */
+	t_str,sizeof(char*),
+	OFFSET(filedata,order)},
+};
+
+
+base_class _filebase = {
+
+	NULL,                      /* parent class */
+	"filebase",                /* name         */
+
+	false,                     /* inited       */
+
+	sizeof(filedata),           /* private size */
+	NUMBER(opts),              /* option count */
+	opts,                      /* options      */
+
+	file_init,                  /* init         */
+
+	file_open,                  /* open         */
+	file_close,                 /* close        */
+
+	file_read,                  /* read         */
+	file_write,                 /* write        */
+
+	NULL,                      /* control      */
+
+	file_check,                 /* check        */
+
+};
+
+
+base_class *filebase = &_filebase;
+
+static void file_init(void)
+{
+}
+
+static err  file_open(void *data,request *r,request *e,int mode)
+{
+	filedata *file = (filedata*)data;
+
+	if(file->order == NULL)
+		file->u     = unwind_one_request(r);
+	else
+	{
+		char **names;
+		int cnt = 1;
+		int i = 0;
+		char *p = file->order;
+		char *q;
+
+		while(*p) { if(*p == ',') cnt++; p++; }
+
+		names = NEW_ARRAY(char*,cnt);
+
+		p = file->order;
+		while(q = strtok(p,","))
+		{
+			names[i++] = q;
+			p = NULL;
+		}
+
+
+		file->u = custom_unwind_one_request(r,cnt,names);
+
+		for(i=1;i<cnt;i++)
+		{
+			p     = names[i];
+			p[-1] = 0;
+		}
+
+		FREE(names);
+
+	}
+	file->w     = file->u;
+	return NOERR;
+}
+
+static err  file_close(void *data)
+{
+	filedata *file = (filedata*)data;
+	free_all_requests(file->u);
+	return 0;
+}
+
+static err findpath(filedata *file,request *r,char *path)
+{
+	char *p = file->tmplate;	
+	int i = 0;
+	int state = 0;
+
+	char word[64];
+	char ident[64];
+	char buf[64];
+	const char *s,*q;
+	char c;
+
+	strcpy(path,file->root);
+
+	while(*p)
+	{
+		switch(*p)
+		{
+			case '(':
+				word[i]  = 0;
+				strcat(path,word);
+				state = 1;
+				i     = 0;
+				break;
+
+			case ',':
+				if(state != 1) return -9;
+				word[i]  = 0;
+				strcpy(ident,word);
+				state = 2;	
+				i = 0;
+				break;
+
+			case ')':
+				if(state != 2) return -9;
+				word[i] = 0;
+				state   = 0;	
+				i       = 0;
+
+				s = get_value(r,ident,0);
+				q = word;
+				c = 0;
+				while(*q) { if(isalpha(*q)) c = *q; q++; };
+
+				if(s)
+				{
+					if(strchr("diouxX",c))
+						sprintf(buf,word,atol(s));
+					else if(strchr("feEgG",c))
+						sprintf(buf,word,atof(s));
+					else if(strchr("s",c))
+						sprintf(buf,word,s);
+					else return -9;
+
+					strcat(path,buf);
+
+				} else {
+					/* ???? */
+					strcat(path,"x");
+				}
+
+				break;
+
+			default:
+				if(i>=sizeof(word)) return -9;
+				word[i++] = *p;
+				break;
+		}
+		p++;
+	}
+	word[i]  = 0;
+	strcat(path,word);
+	return 0;
+}
+
+static err  file_read(void *data,request *r,void *buffer,long *length)
+{
+	filedata *file = (filedata*)data;
+	char path[1024];
+	FILE *f;
+	err  ret = 0;
+
+	if(file->w == NULL)
+		return EOF;
+
+
+	if(r) reqcpy(r,file->w);
+
+	if(ret = findpath(file,file->w,path))
+	{
+		marslog(LOG_EROR,"Cannot parse %s",file->tmplate);
+		return ret;
+	}
+		
+	file->w = file->w->next;
+
+
+	f = fopen(path,"r");
+	if(f == NULL)
+	{
+		marslog(LOG_DBUG|LOG_PERR,"Cannot open %s",path);
+		return -2;
+	}
+
+
+	marslog(LOG_DBUG,"Open: %s",path);
+
+	ret = _readany(f,buffer,length);
+
+	fclose(f);
+	if(ret == EOF)
+	{
+		marslog(LOG_EROR|LOG_PERR,"EOF in file %s",path);
+		ret = -2;
+	}
+
+	return ret;
+}
+
+static err  file_write(void *data,request *r,void *buffer,long *length)
+{
+	filedata *file = (filedata*)data;
+	err ret = 0;
+	char path[1024];
+	const char *dir;
+	long len;
+	FILE *f;
+
+	if(ret = findpath(file,r,path))
+	{
+		marslog(LOG_EROR,"Cannot parse %s",file->tmplate);
+		return ret;
+	}
+
+
+	dir = dirname(path);
+	if(access(dir,F_OK)!=0)
+		mkdirp(dir,0777);
+
+	f = fopen(path,"w");
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",path);
+		return -2;
+	}
+
+
+	len = *length;
+	if((*length = fwrite(buffer,1,len,f)) != len)
+	{
+		ret = -2;
+		marslog(LOG_EROR|LOG_PERR,"Error writing to %s",path);
+	}
+
+	fclose(f);
+	return ret;
+
+}
+
+static boolean  file_check(void *data,request *r)
+{
+	return true;
+}
diff --git a/src/libMars/files.c b/src/libMars/files.c
new file mode 100644
index 0000000..f0f8606
--- /dev/null
+++ b/src/libMars/files.c
@@ -0,0 +1,27 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+char *marstmp(void)
+{
+	static char name[1024];
+	char *p;
+
+	p = tempnam(getenv("TMPDIR"),"mars");
+	strcpy(name,p);
+	free(p);
+
+	close(creat(name,0777));
+	return name;
+}
diff --git a/src/libMars/flatfilebase.c b/src/libMars/flatfilebase.c
new file mode 100755
index 0000000..a11c192
--- /dev/null
+++ b/src/libMars/flatfilebase.c
@@ -0,0 +1,215 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+typedef struct flatfiledata {
+
+	char	*source;
+	boolean	obs;
+	wind    *u_v;
+	hypercube *h;
+
+	FILE	*s;
+	void    *buffer;
+
+}flatfiledata;
+
+static void flatfile_init(void);
+static err  flatfile_open(void *data,request*,request*,int);
+static err  flatfile_close(void *data);
+static err  flatfile_read(void *data,request *r,void *buffer,long *length);
+static err  flatfile_write(void *data,request *r,void *buffer,long *length);
+
+
+static base_class _flatfilebase = {
+
+	NULL,                       /* parent class */
+	"flatfilebase",             /* name         */
+
+	false,                      /* inited       */
+
+	sizeof(flatfiledata),       /* private size */
+	0,                          /* option count */
+	NULL,                       /* options      */
+
+
+
+	flatfile_init,              /* init         */
+
+	flatfile_open,              /* open         */
+	flatfile_close,             /* close        */
+
+	flatfile_read,              /* read         */
+	flatfile_write,             /* write        */
+
+};
+
+/* the only 'public' variable ... */
+
+base_class *flatfilebase = &_flatfilebase;
+
+
+static void flatfile_init(void)
+{
+}
+
+static err flatfile_open(void *data,request *r,request *e,int mode)
+{
+	flatfiledata *g = (flatfiledata*)data;
+
+	g->obs = observation(r) || track(r);
+
+	if(g->source == NULL && r != NULL )
+		g->source = strcache(no_quotes(get_value(r,"SOURCE",0)));
+
+	g->h = new_hypercube_from_mars_request(r);
+
+	if(g->source != NULL)
+	{
+		marslog(LOG_DBUG,"Trying to open flatfile %s",g->source);
+
+		if(g->s = fopen(g->source,"r"))
+		{
+			marslog(LOG_INFO,"Opening file '%s'",g->source);
+			/* Modify disk I/O buffer, if application buffer allows for that */
+			if(mars.readdisk_buffer > 0)
+			{
+				if(g->buffer == NULL)
+					g->buffer = reserve_mem(mars.readdisk_buffer);
+				marslog(LOG_DBUG,"Setting I/O read buffer to %d bytes",mars.readdisk_buffer);
+				if(setvbuf(g->s,g->buffer,_IOFBF,mars.readdisk_buffer))
+					marslog(LOG_WARN|LOG_PERR,"setvbuf failed");
+			}
+		}
+		else
+			marslog(LOG_EROR|LOG_PERR,"Error opening file '%s'",g->source);
+	}
+
+	if(!g->obs)
+		g->u_v = wind_new(r,0);
+
+	return g->s == NULL ? -1 : 0;
+}
+
+static err  flatfile_close(void *data)
+{
+	flatfiledata *g = (flatfiledata*)data;
+	if(g->s) fclose(g->s);
+	strfree(g->source);
+
+	if(g->u_v) 
+		wind_free(g->u_v);
+	if(g->h)
+		free_hypercube(g->h);	
+
+	if(mars.readdisk_buffer)
+		if(g->buffer != NULL)
+		{
+			release_mem(g->buffer);
+			g->buffer = NULL;
+		}
+
+	return 0;
+}
+
+static err readmany(struct flatfiledata *data,char* buff,long* len)
+{
+	int  count = 0;
+	long a = *len;
+	long b = *len;
+	long n;
+	int pad = sizeof(long);		
+	int rnd;
+	file_offset pos = ftell(data->s);
+
+	err e = 0;
+	*len = 0;
+
+	n = a - pad;
+	while(a > 10240 && (e = _readbufr(data->s,buff,&n)) == 0)
+	{
+		a = n;	
+		rnd = ((a + pad - 1)/pad)*pad - a;
+		while(rnd-->0) buff[a++] = 0;
+
+		buff += a; /* should round to 8 ... */
+		b    -= a;
+		*len += a;
+		a     = b;
+		count++;
+		n     = a - pad;
+		pos   = ftell(data->s);
+	}
+
+	if(count == 0 && (e == -3 || e == -4)) *len = a;
+
+	if(count && (e == -1 || e == -3 || e == -4)) {
+		fseek(data->s,pos,SEEK_SET);
+		return 0;
+	}
+
+	return e;
+}
+
+/* Reads next field contained in request 'r' */
+static err next_field(flatfiledata *g, request *r,void *buffer,long *length)
+{
+	err  ret   = 0;
+	boolean match = false;
+	long len   = *length;
+	timer *fileread_time  = get_timer("Read from file","readfiletime",true);
+	
+	while((ret == 0) && !match)
+	{
+		*length = len;
+		ret = wind_next(g->u_v,g->s,buffer,length,fileread_time);
+		if(ret == NOERR)
+		{
+			request *u = empty_request(0);
+
+			grib_to_request(u,buffer,*length);
+
+			if(cube_order(g->h,u) != -1)
+				match = true;
+			free_all_requests(u);
+		}
+	}
+
+	return ret;
+}
+
+
+static err  flatfile_read(void *data,request *r,void *buffer,long *length)
+{
+	flatfiledata *g = (flatfiledata*)data;
+	err ret;
+
+	if(g->obs)
+		ret = _readany(g->s,buffer,length);
+	else
+		ret = next_field(g,r,buffer,length);
+
+	if(ret != 0 && ret != -3)
+		*length = 0;
+
+	if(ret == 0 && r)
+		if(g->obs)
+			bufr_to_request(r,buffer,*length);
+		else
+			grib_to_request(r,buffer,*length);
+
+	return ret;
+}
+
+static err  flatfile_write(void *data,request *r,void *buffer,long *length)
+{
+	return -1;
+}
diff --git a/src/libMars/free.c b/src/libMars/free.c
new file mode 100644
index 0000000..11bfe76
--- /dev/null
+++ b/src/libMars/free.c
@@ -0,0 +1,441 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+typedef struct _buffer {
+	char* ptr;
+	int  size;
+	int  pos;
+} _buffer;
+
+static int put_bytes(void *data, void* p, unsigned int len)
+{
+	_buffer *b = (_buffer*)data;
+	if(b->pos + len > b->size)
+	{
+		marslog(LOG_EROR,"free format buffer too small %d %d %d",b->size,b->pos,len);
+		return -1;
+	}
+	memcpy(b->ptr + b->pos,p, len);
+	b->pos += len;
+	return len;
+}
+
+int n = 0;
+
+static int get_bytes(void *data, void* p, unsigned int len)
+{
+	_buffer *b = (_buffer*)data;
+	if(b->pos + len > b->size)
+	{
+		marslog(LOG_EXIT,"free format buffer too small %d %d %d",b->size,b->pos,len);
+		return -1;
+	}
+	memcpy(p,b->ptr + b->pos, len);
+	 /* printf("read %d %02x\n",len,(int)*(char*)p);  */
+	b->pos += len;
+	return len;
+}
+
+static err put_request(mstream* s,const request *r)
+{
+	int n = 0;
+	parameter *p = r->params;
+
+	/* stream_write_start(s,"Request"); */
+	stream_write_string(s,r->name);
+
+	/* count */
+	
+	while(p) { n++; p = p->next; }
+	stream_write_int(s,n);
+
+	p = r->params;
+	while(p)
+	{
+		value *v = p->values;
+
+		if( p->values == NULL) 
+			marslog(LOG_EXIT,"Internal error: missing value for %s",p->name);
+
+		stream_write_string(s,p->name);
+
+		n = 0;
+		while(v) { n++; v = v->next; }
+		stream_write_int(s,n);
+
+		v = p->values;
+		while(v) 
+		{
+			stream_write_string(s,v->name);
+			v = v->next;
+		}
+		
+		p = p->next;
+	}
+
+	/* stream_write_end(s); */
+
+	return s->error;
+}
+
+static request* get_request(mstream* s)
+{
+    request* r = empty_request(stream_read_string(s));
+    int      n = stream_read_int(s);
+    int      i;
+	/* printf("getrequest %d %s\n",n,r->name); */
+
+    for(i = 0; i < n; i++)
+    {
+        const char* p = stream_read_string(s);
+        int m         = stream_read_int(s);
+        int j;
+        char *q = strcache(p);
+	/* printf("getrequest %s %d\n",p,m); */
+
+        for(j = 0; j < m; j++)
+            add_value(r,q,"%s",stream_read_string(s));
+
+        strfree(q);
+    }
+
+    return r;
+}
+
+err encode_free_format(void *buffer, long* length,
+	const request* r,const void* blob,long bloblen)
+{
+	mstream s = {0,};
+	_buffer b;
+
+	b.ptr  = (char*)buffer;
+	b.size = *length;
+	b.pos  = 0;
+
+	s.data  = &b;
+	s.write = put_bytes;
+
+	stream_write_int(&s,1);  /* number of requests */
+	put_request(&s,r);
+
+	stream_write_blob(&s,blob,bloblen); 
+
+	*length = b.pos;
+
+	return s.error;
+
+
+}
+
+request* decode_free_format_request(void *buffer, long length)
+{
+	mstream s = {0,};
+	_buffer b;
+
+	b.ptr  = (char*)buffer;
+	b.size = length;
+	b.pos  = 0;
+
+	s.data  = &b;
+	s.read = get_bytes;
+
+	n = stream_read_int(&s);  /* number of requests */
+	/* printf("n = %d\n",n); */
+	return get_request(&s);
+}
+
+long decode_free_format_blob(void *buffer, long length,void* blob,long max)
+{
+	int n;
+	mstream s = {0,};
+	_buffer b;
+	const void *data;
+	long len = 0;
+
+	b.ptr  = (char*)buffer;
+	b.size = length;
+	b.pos  = 0;
+
+	s.data  = &b;
+	s.read = get_bytes;
+
+	n = stream_read_int(&s);  /* number of requests */
+	while(n-- > 0)
+		free_all_requests(get_request(&s));
+
+	data = stream_read_blob(&s,&len);
+	if(len < 0)
+	{
+		marslog(LOG_EROR,"Read blob failed\n");
+		return -1;
+	}
+
+	if(len > max)
+	{
+		marslog(LOG_EROR,"Blob too large: %d > %d",len,max);
+		return -1;
+	}
+
+	memcpy(blob,data,len);
+	return len;
+
+}
+
+err encode_free_format_grib(
+	unsigned char* bin, unsigned char* bout,
+	fortint* length,fortint maxlen,
+	request *r, 
+	int marsclass, int type, int stream, char* expver)
+{
+	unsigned char *in  = bin;
+	unsigned char *out = bout;
+	long len;
+	fortint outlen;
+	unsigned char local[10240];
+	unsigned char newlocal[10240];
+	unsigned char ff[10240];
+	int locallen;
+	int newlocallen;
+	int n;
+	int i = 0;
+	boolean localdef = false;
+	int fixedlensec1 = 40;
+
+	unsigned char subcenter;
+
+	if(in[7] != 1) {
+		marslog(LOG_EROR,"encode_free_format_grib only supported for grib edition 1 (edition is %ld)", (long)in[7]);
+		return -2;
+	}
+
+	/* copy sec0 */
+	memcpy(out,in,8);
+	marslog(LOG_DBUG,"memcpy in -> out 8 bytes");
+	out += 8;
+	marslog(LOG_DBUG,"advance 'out' of 8 bytes");
+	in  += 8;
+	marslog(LOG_DBUG,"advance 'in' of 8 bytes");
+
+	/* sec 1 */
+	len = (in[0] << 16) | (in[1] << 8) | (in[2] << 0);
+	subcenter = in[25];
+	localdef = (len>40);
+	fixedlensec1 = localdef ? 40:len;
+
+	marslog(LOG_DBUG,"sec1 len: %d, fixedlensec1 %d",len,fixedlensec1);
+
+	memcpy(out,in,fixedlensec1);
+	out[25] = 98; /* sub-center ecmwf */
+	if(localdef)
+	{
+		locallen = len - 40;
+		if(locallen > sizeof(local))
+		{
+			marslog(LOG_EROR,"Original local definition too large %d, sec1 len: %d",locallen,len);
+			return -2;
+		}
+
+		marslog(LOG_DBUG,"Save original local extension");
+
+		/* save original local extension */
+		memcpy(local,in+40,locallen);
+	}
+	else
+	{
+		marslog(LOG_DBUG,"GRIB doesn't have local extension");
+		locallen = 0;
+	}
+	in  += locallen + fixedlensec1;
+	marslog(LOG_DBUG,"advance 'in' of %d bytes (%d + %d)",locallen + fixedlensec1,locallen,fixedlensec1);
+
+	/* put ours */
+	memset(newlocal,0,sizeof(newlocal));
+	n = 0;
+
+	newlocal[n++] = 191;
+	newlocal[n++] = marsclass; /* class */
+	newlocal[n++] = type; /* type */
+
+	newlocal[n++] = (stream >> 8) & 0xff; /* stream */
+	newlocal[n++] = (stream >> 0) & 0xff; /* stream */
+
+	newlocal[n++] = expver[0]; /* expver */
+	newlocal[n++] = expver[1]; /* expver */
+	newlocal[n++] = expver[2]; /* expver */
+	newlocal[n++] = expver[3]; /* expver */
+
+	newlocal[n++] = 0; /* spare */
+	newlocal[n++] = 0; /* spare */
+
+	newlocal[n++] = 1; /* version */
+	newlocal[n++] = 0; /* sub-version */
+
+	newlocal[n++] = subcenter; /* origial sub-center */
+	newlocal[n++] = 0; /* origial local def */
+
+	newlocal[n++] = 0; /* spare */
+	newlocal[n++] = 0; /* spare */
+	newlocal[n++] = 0; /* spare */
+
+
+	/* encode original local extension */
+	len = sizeof(newlocal) - n - 80;
+	if(encode_free_format(ff,&len,r,local,locallen))
+		marslog(LOG_EXIT,"Encode error");
+
+	newlocal[n++] = (len >> 8) & 0xff; /* len */
+	newlocal[n++] = (len >> 0) & 0xff; /* len */
+
+	marslog(LOG_DBUG,"copy original local def encoded, len = %d, pos = %d",len, out-bout + 40 + n); 
+
+	i = 0;
+	while(len-- > 0) newlocal[n++] = ff[i++];
+
+	/* add padding */
+
+	/* The section is padded with zeroes to make the overall */
+	/* length of the section = 60 + 80*M for some M > 0      */
+	while( ((40+n)<60+80) || (((n + 40) - 60) % 80) ) newlocal[n++] = 0;
+	marslog(LOG_DBUG,"pad newlocal extension with %d bytes", n - 40);
+
+	if(n > sizeof(newlocal))
+		marslog(LOG_EXIT,"Local extension buffer too small");
+
+	newlocallen = n;
+	marslog(LOG_DBUG,"newlocal extension length %d bytes",newlocallen);
+
+	memcpy(out+40,newlocal,newlocallen);
+	marslog(LOG_DBUG,"copy newlocal extension into 'out+40', %d bytes",newlocallen);
+
+	/* set length */
+	len = 40 + newlocallen;
+	out[0] = (len >> 16) & 0xff;
+	out[1] = (len >> 8) & 0xff;
+	out[2] = (len) & 0xff;
+	marslog(LOG_DBUG,"set grib section 1 length to %d bytes",len);
+
+	out += 40 + newlocallen;
+	marslog(LOG_DBUG,"advance 'out' of %d bytes",40 + newlocallen);
+
+	/* copy rest */
+
+	outlen = (*length) - locallen + newlocallen + (40 - fixedlensec1);;
+	if(outlen > maxlen)
+		marslog(LOG_EXIT,"Output buffer too small %d > %d",outlen,maxlen);
+	marslog(LOG_DBUG,"copy rest, outlen %d, input length %d",outlen,*length);
+
+	marslog(LOG_DBUG,"memcpy in -> out, %d bytes",*length - (in -bin));
+	memcpy(out,in,*length - (in -bin));
+	*length = outlen;
+
+	/* update length */
+	bout[4] = ( (*length) >> 16 ) & 0xff;
+	bout[5] = ( (*length) >>  8 ) & 0xff;
+	bout[6] = ( (*length) >>  0 ) & 0xff;
+	marslog(LOG_DBUG,"update full GRIB length to %d bytes",*length);
+
+	return 0;
+}
+
+err decode_free_format_grib(unsigned char* bin, unsigned char* bout,fortint* length,fortint maxlen,request *r)
+{
+	unsigned char *in  = bin;
+	unsigned char *out = bout;
+	long len = 0;
+	fortint outlen;
+	unsigned char local[10240];
+	int sec1len;
+
+	if(in[7] != 1) {
+		marslog(LOG_EROR,"decode_free_format_grib only supported for grib edition 1 (edition is %ld)", (long)in[7]);
+		return -2;
+	}
+
+	/* copy sec0 */
+	memcpy(out,in,8);
+	out += 8;
+	in  += 8;
+
+	/* sec 1 */
+	sec1len = (in[0] << 16) | (in[1] << 8) | (in[2] << 0);
+
+	if(in[25] != 98 && in[40] != 191)
+		marslog(LOG_EXIT,"Grib not local");
+
+	memcpy(out,in,40);
+
+	/* put sub-center back */
+	out[25] = in[53];
+
+	len = decode_free_format_blob(in+60,len-60,local,sizeof(local));
+	if(len < 0)
+		marslog(LOG_EXIT,"Cannot get local extension");
+
+	memcpy(out+40,local,len);
+
+	/* set length */
+	len = 40 + len;
+	out[0] = (len >> 16) & 0xff;
+	out[1] = (len >> 8) & 0xff;
+	out[2] = (len) & 0xff;
+
+	out += len;
+	in  += sec1len;
+
+	/* copy rest */
+
+	outlen = (*length) - sec1len + len;
+	if(outlen > maxlen)
+		marslog(LOG_EXIT,"Output buffer too small %d > %d",outlen,maxlen);
+
+	memcpy(out,in,*length - (in -bin));
+	*length = outlen;
+
+	/* update length */
+	bout[4] = ( (*length) >> 16 ) & 0xff;
+	bout[5] = ( (*length) >>  8 ) & 0xff;
+	bout[6] = ( (*length) >>  0 ) & 0xff;
+
+	return 0;
+}
+
+err original_grib(char* bin, fortint* length)
+{
+	unsigned char* in = (unsigned char*)bin;
+	static char *out = 0;
+	static int outlen = 0;
+	err e = 0;
+
+	in  += 8;
+
+	if(in[25] != 98 && in[40] != 191)	
+		return 0;
+
+	if(out == 0 || outlen < *length)
+	{
+		if(out) release_mem(out);
+		out = reserve_mem(*length);
+		outlen = *length;
+	}
+
+
+	e = decode_free_format_grib(
+		(unsigned char*) bin, 
+		(unsigned char*) out,
+		length,outlen,0);
+
+	if(e == 0)
+		memcpy(bin,out,*length);
+	
+	return e;
+
+}
diff --git a/src/libMars/globals.h b/src/libMars/globals.h
new file mode 100644
index 0000000..59024b5
--- /dev/null
+++ b/src/libMars/globals.h
@@ -0,0 +1,174 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+
+typedef void (*msgproc)(int,const char*);
+typedef void (*cplproc)(request*,int,err);
+typedef int  (*memproc)(void*);
+
+typedef void (*progress_proc)(void);
+
+typedef struct globals {
+
+	char    *appl;       /* name of appl: mars, xmars, ... */
+
+	boolean	debug;       /* debug mode */
+	boolean	echo;        /* echo user request */
+	boolean verbose;     /* echo compiled request */
+	boolean casecomp;    /* fielset names are case sensitive */
+	boolean nofork;      /* no forks */
+	boolean restriction; /* restrict observation access */
+	boolean quiet;       /* quiet */
+	boolean infomissing; /* inform missing fields from database */
+
+	request  *setup;
+
+	/* files */
+
+	char    *mars_home;
+
+	char    *config;
+	char    *langfile;
+	char    *testfile;
+
+	/* User authentication */
+	char    *authfile;
+	char    *authmail;
+	char    *validate;
+	char    *emsfile; 
+
+	/* Mailer */
+	char    *mailer;
+
+	char    *monhost;
+	int     monport;
+
+	msgproc  outproc;  /* where go the messages    */
+	cplproc  complete; /* completion proc          */
+
+	/* progress */
+	progress_proc progress;
+	long64        todo;
+	long64        done;
+
+	long     expflags; /* expand flags             */
+	int      maxforks; /* maximun forks            */
+
+	int       computeflg; /* value set to computed gribs */
+	double    grib_missing_value; /* Missing value for gribex */
+
+	long     request_id; /* current request id */
+
+	int      certlen;  /* certificate length */
+	char    *certstr;  /* certificate string */
+	boolean  certify;  
+
+	char    *dhsmail;    /* Mail if DHS archive failed */
+
+	/* For archive */
+
+	boolean    fields_are_ok;         /* For new ibm */
+	boolean    fields_in_order;       /* For old ibm */
+	boolean    fields_have_same_size; /* For ensemble */
+	boolean    pseudogrib;            /* for BUDG/TIDE */
+	boolean    dont_check_pseudogrib;            /* for BUDG/TIDE */
+
+	boolean    y2k;
+	boolean    y2k_fail;              /* Fail if dates entered are not 4 digit years */
+	boolean    crc;
+	boolean    ignore_7777;           /* to ignore missing 7777 error */
+	boolean    autoresol;             /* use AUTO RESOLUTION */
+	long       autoarch;             /* use AUTO RESOLUTION */
+
+	long    y2k_problem;           /* Y2K problems */
+	char*   sms_label;             /* MARS is under sms control */
+
+	int     number_of_requests;    
+	int     current_request;
+
+	boolean    patch_sst;             /* Patch request to use new SST */
+
+	/* For compute */
+	int     accuracy;
+
+	boolean    warning;               /* display warnings */
+
+	int     sockbuf;               /* for setsockopt */
+
+	/* In server mode, number of clients to accept */
+	int     clients;
+
+	int     show_pid;				/* Will output pid on output */
+
+	char*   statfile;               /* File for statistics */
+
+	long    mail_frequency;         /* How frequent to send e-mail in seconds */
+	char*   home;                   /* User home directory for MARS: usually ~/.marsrc */
+
+	long64  max_filesize;           /* Maximum file size client can archive */
+
+	int     maxretries;             /* Maximum number of retries */
+	boolean	paramtable;             /* Set table for parameter in grib2request */
+
+	boolean	grib_postproc;          /* Whether to allow GRIB post-processing (default true) */
+
+	boolean bufr_empty_target;      /* Whether a retrieval of BUFR for no data should create an empty target */
+
+	boolean mm_firstofmonth;        /* If true, monthly means date is 1st of month */
+
+	boolean use_intuvp;             /* Whether to use INTUVP for wind interpolation */
+
+	boolean debug_ems;              /* Whether to print EMS information */
+
+	boolean can_do_vector_postproc; /* Whether to call intvect for winds, etc... */
+
+	boolean    info;                /* display info */
+	boolean    gridded_observations_postproc;    /* Whether we can post-process gridded observations */
+	int        dissemination_schedule;           /* Whether MARS should fail, inform or just log when requests have 
+	                                                been submitted earlier than the dissemination schedule */
+	char*      dissemination_schedule_file;      /* File containing dissemination schedule */
+	boolean daily_climatology;      /* in order to be able to compare two dates: ????mmdd with yyyymmdd */
+
+	boolean no_special_fp;      /* whether Forecast probabilities are p1-p2 (true) or d1d2 with p1+24 for rain (false) in FDB. */
+	int        year_for_daily_climatology;       /* What year to use in grib2request for Daily Climatology */
+	boolean    notimers;        /* Set to 1 in order to disable timers */
+	boolean    valid_data_includes_fcmonth;   /* Set to != 0 in order to consider FCMONTH when deciding */
+	                                          /* if it is valid data or not */
+
+	boolean    exit_on_failed_expand;    /* Set to 1 in order to force MARS to exit when expand of language file */
+	                                     /* doesn't work, for example, if language file is not found */
+	char       *emsaccountsfile; 
+	boolean    force_setting_ecaccount;  /* Set to 1 in order to force MARS to set the value of ECACCOUNT */
+	boolean    enable_ecaccount_email;   /* Set to 0 in order to avoid receiving emails when ECACCOUNT */
+	                                     /* is not in the list of valid ECACCOUNTs for the user */
+	              
+	char       *timers_file;             /* Filename were to print timers */
+
+    boolean     wind_requested_by_server;
+
+	int         readdisk_buffer;         /* Size of buffer to read from disk. Calls setvbuf */
+
+	char*       ecflow_label;             /* MARS is under ecflow control */
+	char*       private_key;             /* PATH to private key, e.g. ~/.ssh/id_rsa */
+
+	boolean     build_grib_index;        /* prepare index to send to server */
+	int         readany_buffer_size;     /* Size of buffer to pass to readany */
+
+	char*      webmars_target;          /* Used by mars when serving web requests */
+	boolean    show_hosts;              /* Show hosts in logfiles */
+
+	boolean    marslite_mode;           /* Whether this client is running on behalf of a marslite client */
+
+} globals;
+
+
+
+extern globals mars;
+
diff --git a/src/libMars/grib.c b/src/libMars/grib.c
new file mode 100755
index 0000000..467e638
--- /dev/null
+++ b/src/libMars/grib.c
@@ -0,0 +1,184 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <stdio.h>
+#include <grib_api.h>
+#include <ctype.h>
+
+#include "mars.h"
+
+
+static void upper_case(char *p)
+{
+	while(*p)
+	{
+		if(islower(*p)) *p = toupper(*p);
+		p++;
+	}
+
+}
+
+err handle_to_request (request *r, grib_handle* g, mars_grib_index* idx )
+{
+	grib_keys_iterator* ks;
+	char name[80];
+	char value[80];
+	size_t len = sizeof(value);
+	long local;
+	int e;
+	const char *p;
+	const char *stream = get_value(r,"STREAM",0);
+	const char *number = get_value(r,"NUMBER",0);
+
+	if(!g) return -1;
+
+
+	/* printf("------------\n"); */
+	ks  = grib_keys_iterator_new(g,GRIB_KEYS_ITERATOR_ALL_KEYS,"mars");
+
+	while(grib_keys_iterator_next(ks))
+	{
+
+		strcpy(name,grib_keys_iterator_get_name(ks));
+
+		if(e = grib_keys_iterator_get_string(ks,value,&len))
+			marslog(LOG_EROR,"Cannot get %s as string %d (%s)",name,e,
+					grib_get_error_message(e));
+
+		/* printf("MARS -> %s ... %s\n",name,c); */
+
+		if(idx)
+		{
+			double d;
+			long l;
+			boolean d_ok, l_ok;
+			
+        	len = 1;
+        	d_ok = (grib_keys_iterator_get_double(ks,&d,&len) == 0);
+
+	        len = 1;
+    	    l_ok = (grib_keys_iterator_get_long(ks,&l,&len) == 0);
+
+			mars_grib_index_add(idx, name, 1, value, l_ok, l, d_ok, d);
+		}
+
+		upper_case(name);
+
+		if(!EQ(name,"EXPVER"))
+			upper_case(value);
+
+
+		set_value(r,name,"%s",value);
+		len = sizeof(value);
+	}
+
+	strcpy(name,"identifier");
+	len = sizeof(value);
+	if(e = grib_get_string(g,name,value,&len))
+	{
+		marslog(LOG_EXIT,"Cannot get %s as string %d (%s)",name,e,
+				grib_get_error_message(e));
+		mars.pseudogrib =  0;
+	}
+	else
+	{
+		mars.pseudogrib = (strcmp(value,"BUDG") == 0) || (strcmp(value,"TIDE") == 0);
+		if(mars.pseudogrib)
+		{
+			marslog(LOG_WARN,"Pseudo GRIB encountered (%s)",value);
+			if(stream == NULL)
+				stream = getenv("MARS_PSEUDOGRIB_STREAM");
+
+			if(stream != NULL)
+			{
+				marslog(LOG_DBUG,"Setting STREAM to '%s'",stream);
+				set_value(r,"STREAM","%s",stream);
+			}
+
+			if(number != NULL)
+			{
+				marslog(LOG_DBUG,"Setting NUMBER to '%s'",number);
+				set_value(r,"NUMBER","%s",number);
+			}
+		}
+		else {
+			if(strcmp(value,"GRIB") != 0)
+				marslog(LOG_EXIT,"Unexpected message type (%s)",value);
+			else
+			{
+				/* Get the edition */
+				long edition = 0;
+				if(e = grib_get_long(g,"edition",&edition))
+				{
+					marslog(LOG_EXIT,"Cannot get edition as long: %d (%s)",e,
+							grib_get_error_message(e));
+				}
+				set_value(r,"_EDITION","%ld",edition);
+			}
+		}
+	}
+
+	if(grib_get_long(g,"localDefinitionNumber",&local) ==  0 && local == 191) /* TODO: Not grib2 compatible, but speed-up process */
+	if(grib_get_size(g,"freeFormData",&len) ==  0 && len != 0)
+	{
+		char buffer[10240];
+		len = sizeof(buffer);
+		if(e = grib_get_bytes(g,"freeFormData",buffer,&len))
+			marslog(LOG_EROR,"Cannot get freeFormData %d (%s)",name,e,
+					grib_get_error_message(e));
+		else {
+			request* s = decode_free_format_request(buffer,len);
+
+			if(mars.debug)
+			{
+				marslog(LOG_DBUG,"Free format request:");
+				print_all_requests(s);
+			}
+			/* set_value(r,"PARAM","%d.%d",s1->parameter,s1->version); */
+
+			reset_language(mars_language());
+			mars.expflags = EXPAND_MARS | EXPAND_NO_DEFAULT;
+			s = expand_mars_request(s);
+			if( s == NULL)
+			{
+				/* if(mars.exit_on_failed_expand) */
+				{
+					e = -2;
+					marslog(LOG_EROR,"Failed to expand request");
+				}
+			}
+			mars.expflags = EXPAND_MARS;
+			reqcpy(r,s);
+			free_all_requests(s);
+
+		}
+
+	}
+
+	grib_keys_iterator_delete(ks);
+	return e;
+}
+
+err grib_to_request_index (request *r, char *buffer, long length, mars_grib_index* idx )
+{
+	err e;
+	grib_handle *g = grib_handle_new_from_message(0,buffer,length);
+	e = handle_to_request(r,g,idx);
+	grib_handle_delete(g);
+	return e;
+}
+
+err grib_to_request (request *r, char *buffer, long length)
+{
+	return grib_to_request_index(r,buffer,length,NULL);
+}
+
+
+
diff --git a/src/libMars/grib.h b/src/libMars/grib.h
new file mode 100755
index 0000000..6b54718
--- /dev/null
+++ b/src/libMars/grib.h
@@ -0,0 +1,872 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+ *
+ * These are array offsets associated with arrays generated from
+ * the MARS routine GRIBEX
+ *
+ * These are the limits required for return arrays of GRIBEX call
+ */
+
+#define     ISECTION_0  2
+#define     ISECTION_1  1024     /* beware of  for ocean data */
+#define		ISECTION_2	3000
+#define		ISECTION_3	3
+#define		ISECTION_4	512
+
+#define		RSECTION_2	512	
+#define		RSECTION_3	2
+#define		RSECTION_4	1
+
+/*
+ * This is the GRIBEX return code for Pseudo-grib data
+ */
+#define		PSEUDO_GRIB	-6
+
+/*
+#ifdef AIX
+#pragma options align=twobyte
+#endif
+*/
+
+typedef struct griboffset {
+	fortint section0;
+	fortint section1;
+	fortint section2;
+	fortint section3;
+	fortint section4;
+	fortint edition;
+} griboffset;
+
+#define MAX_LOCALDEF 20
+typedef struct multilocaldef_190 {
+	fortint     number;
+	fortint     length;
+} multilocaldef_190;
+
+typedef struct gribsec0 {
+	fortint		size;
+	fortint		edition;
+} gribsec0;
+
+typedef struct extra_spectra {
+	fortint     system;
+	fortint     method;
+	fortint     reference_date;
+	fortint     climate_from;
+	fortint     climate_to;
+	fortint     leg_base_date;
+	fortint     leg_base_time;
+	fortint     leg_number;
+} extra_spectra;
+
+typedef struct griblocsec1 {
+
+/*  37 */ 	fortint		ecmwf_local_id; 
+/*  38 */ 	fortint		mars_class;
+/*  39 */ 	fortint		mars_type;
+/*  40 */ 	fortint		mars_stream;
+/*  41 */ 	fortint		mars_expver;
+
+
+	union extrasec1 {
+
+	struct {
+
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		reference_date;
+
+	} hindcast;
+
+	struct {
+
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		clustering_method;
+/*  45 */ 	fortint		clustering_start_step;
+/*  46 */ 	fortint		clustering_end_step;
+/*  47 */ 	fortint		mars_north;
+/*  48 */ 	fortint		mars_west;
+/*  49 */ 	fortint		mars_south;
+/*  50 */ 	fortint		mars_east;
+/*  51 */ 	fortint		clustering_operational_forecast_number;
+/*  52 */ 	fortint		clustering_control_forecast_number;
+/*  53 */ 	fortint		clustering_total_forecast_number;
+/*  54 */ 	fortint		tube_reference;
+
+	} enfo;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		ocean_coupling;
+/*  45 */ 	fortint		spare;
+/*  46 */ 	fortint		leg_base_date;
+/*  47 */ 	fortint		leg_base_time;
+/*  48 */ 	fortint		leg_number;
+/*  49 */ 	fortint		date_of_forecast_run; /* same as coupled_atmospheric_ocean.reference_date */
+/*  50 */ 	fortint		climate_date_from;
+/*  51 */ 	fortint		climate_date_to;
+	} variable_resolution;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		threshold_decimal_scale_factor;
+/*  45 */ 	fortint		threshold_indicator;
+/*  46 */ 	fortint		lower_threshold;
+/*  47 */ 	fortint		upper_threshold;
+
+	} probability;
+
+	struct {
+/*  42 */ 	fortint		iteration; 
+/*  43 */ 	fortint		dummy1;
+/*  44 */ 	fortint		dummy2;
+/*  45 */ 	fortint		diagnostic;
+	} sens;
+
+	struct {
+/*  42 */ 	fortint		analysis_class; 
+/*  43 */ 	fortint		analysis_type;
+/*  44 */ 	fortint		analysis_stream;
+/*  45 */ 	fortint		analysis_version;
+/*  46 */ 	fortint		analysis_year;
+/*  47 */ 	fortint		analysis_month;
+/*  48 */ 	fortint		analysis_day;
+/*  49 */ 	fortint		analysis_hour;
+/*  50 */ 	fortint		analysis_minute;
+/*  51 */ 	fortint		analysis_century;
+/*  52 */ 	fortint		analysis_center;
+/*  53 */ 	fortint		analysis_subcenter;
+	} sst;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		direction;
+/*  45 */ 	fortint		frequency;
+/*  46 */ 	fortint		n_directions;
+/*  47 */ 	fortint		n_frequencies;
+/*  48 */ 	fortint		d_scale_factor;
+/*  49 */ 	fortint		f_scale_factor;
+/*  .. */   fortint     extra[1];
+	} spectra;
+
+	struct {
+/*  42 */ 	fortint		type; 
+/*  43 */ 	fortint		function_code; 
+/*  44 */ 	fortint		spare; 
+	} image;
+
+	struct {
+/*  42 */ 	fortint		satellite_id;
+/*  43 */ 	fortint		instrument; 
+/*  44 */ 	fortint		channel; 
+/*  45 */   fortint     function_code;
+	} satellite_image; /* including pseudo-images */
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		channel;
+/*  45 */ 	fortint		frequency_factor;
+/*  46 */ 	fortint		nb_frequency;
+/*  47...   list of scaled frequencies */
+	} brigthness_temperature;
+
+	struct {
+
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		iterations; 
+/*  44 */ 	fortint		sv_computed; 
+/*  45 */ 	fortint		norm_initial_time; 
+/*  46 */ 	fortint		norm_final_time; 
+/*  47 */ 	fortint		ll_factor; 
+/*  48 */ 	fortint		mars_north; 
+/*  49 */ 	fortint		mars_west; 
+/*  50 */ 	fortint		mars_south; 
+/*  51 */ 	fortint		mars_east; 
+/*  52 */ 	fortint		accuracy; 
+/*  53 */ 	fortint		sv_evolved; 
+/*  54 */ 	fortint		ritz_1; 
+/*  55 */ 	fortint		ritz_2; 
+
+	} singular_vector;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		system;
+/*  45 */ 	fortint		method;
+/*  46 */ 	fortint		space_unit;
+/*  47 */ 	fortint		vertical_coordinate;
+/*  48 */ 	fortint		horizontal_coordinates;
+/*  49 */ 	fortint		time_unit;
+/*  50 */ 	fortint		time_coordinate;
+/*  51 */ 	fortint		mixed_coordinate;
+/*  52 */ 	fortint		coordinate_1_locating;
+/*  53 */ 	fortint		coordinate_1_averaging;
+/*  54 */ 	fortint		coordinate_1_start_position;
+/*  55 */ 	fortint		coordinate_1_end_position;
+/*  56 */ 	fortint		coordinate_2_locating;
+/*  57 */ 	fortint		coordinate_2_averaging;
+/*  58 */ 	fortint		coordinate_2_start_position;
+/*  59 */ 	fortint		coordinate_2_end_position;
+/*  60 */ 	fortint		coordinate_3_axis;
+/*  61 */ 	fortint		coordinate_4_axis;
+/*  62 */ 	fortint		coordinate_4_start_grid_point;
+/*  63 */ 	fortint		coordinate_3_start_grid_point;
+/*  64 */ 	fortint		coordinate_4_end_grid_point;
+/*  65 */ 	fortint		coordinate_3_end_grid_point;
+/*  66 */ 	fortint		i_increment;
+/*  67 */ 	fortint		j_increment;
+/*  68 */ 	fortint		irregular_grid_coordinates;
+/*  69 */ 	fortint		staggered_grid;
+/*  70 */ 	fortint		further_information;
+/*  71 */ 	fortint		dimension_horizontal_coordinates;
+/*  72 */ 	fortint		dimension_mixed_coordinates;
+/*  73 */ 	fortint		dimension_grid_coordinates;
+/*  74 */ 	fortint		dimension_auxiliary_array;
+	} ocean;
+
+	struct {
+
+/*  42 */ 	fortint		mars_number;   /* 2 bytes */
+/*  43 */ 	fortint		extra;         /* 0 */
+/*  44 */ 	fortint		system;   
+/*  45 */ 	fortint		method;   
+
+	} seasonal;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		system;
+/*  45 */ 	fortint		method;
+/*  46 */ 	fortint		verifying_month; /* yyyymm */
+/*  47 */ 	fortint		averaging_period;
+/*  48 */ 	fortint		forecast_month;
+	} seasonal_means;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		system;
+/*  45 */ 	fortint		method;
+/*  46 */ 	fortint		forecast_period; /* dddddd day1-day2*/
+/*  47 */ 	fortint		averaging_period;
+	} monthly_forecast_means;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		system;
+/*  45 */ 	fortint		method;
+/*  46 */ 	fortint		verifying_month; /* Seasonal Forecast: yyyymm or Monthly Forecast: day1-day2 */ 
+/*  47 */ 	fortint		averaging_period;
+/*  48 */ 	fortint		forecast_month;
+/*  49 */ 	fortint		reference_date; /* same as variable_resolution.date_of_forecast_run */
+/*  50 */ 	fortint		climateDateFrom;
+/*  51 */ 	fortint		climateDateTo;
+/*  52 */ 	fortint		spareProbabilities[10];
+	} coupled_atmospheric_ocean;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		origin;
+/*  45 */ 	fortint		model;
+/*  46 */ 	fortint		count;
+	} multi_analysis;
+
+	struct {
+/*  42 */ 	fortint		component_index; 
+/*  43 */ 	fortint		number_of_components;
+/*  44 */ 	fortint		model_error_type;
+	} model_error;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		version_major_number;
+/*  45 */ 	fortint		version_minor_number;
+/*  46 */ 	fortint		original_subcenter;
+/*  47 */ 	fortint		spare1;
+/*  48 */ 	fortint		spare2;
+/*  49 */ 	fortint		spare3;
+/*  50 */ 	fortint		spare4;
+/*  51 */ 	fortint		length;
+/*  -- */ 	char  		data[4096];
+	} free_format;
+
+	struct {
+/*  42 */ 	fortint		    mars_number; 
+/*  43 */ 	fortint		    mars_total;
+/*  44 */ 	fortint		    number;
+/*  45 */ 	multilocaldef_190 def[MAX_LOCALDEF];
+/*  .. */
+	} multi_definition_190;
+
+	struct {
+/*  42 */ 	fortint		    mars_number; 
+/*  43 */ 	fortint		    mars_total;
+/*  44 */ 	fortint		    number;
+/*  45 */ 	fortint		    localdef[2]; /* This is used as a pointer to memory */
+
+	} multi_definition;
+
+    struct {
+
+	/*  42 */   fortint     iteration;
+	/*  43 */   fortint     total_iterations;
+
+	} increments;
+
+	struct {
+
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		iterations; 
+/*  44 */ 	fortint		sv_computed; 
+/*  45 */ 	fortint		norm_initial_time; 
+/*  46 */ 	fortint		norm_final_time; 
+/*  47 */ 	fortint		ll_factor; 
+/*  48 */ 	fortint		mars_north; 
+/*  49 */ 	fortint		mars_west; 
+/*  50 */ 	fortint		mars_south; 
+/*  51 */ 	fortint		mars_east; 
+/*  52 */ 	fortint		accuracy; 
+/*  53 */ 	fortint		sv_evolved; 
+/*  54 */ 	fortint		ritz_1; 
+/*  55 */ 	fortint		ritz_2; 
+/*  56 */ 	fortint		optimisation_time;
+/*  57 */ 	fortint		lead_time;
+/*  58 */ 	fortint		domain;
+/*  59 */ 	fortint		method;
+/*  60 */ 	fortint		mars_total;
+/*  61 */ 	fortint		shape;
+/*  .. */
+	} sensitive_area_prediction ;
+
+    struct {
+
+/*  42 */ 	fortint		mars_number;  /* Zero */
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		scale_climate_weight;
+/*  45 */ 	fortint		weight;
+/*  46 */ 	fortint		first_month_climate_1;
+/*  47 */ 	fortint		last_month_climate_1;
+/*  48 */ 	fortint		first_month_climate_2;
+/*  49 */ 	fortint		last_month_climate_2;
+/*  50 */ 	fortint		order;
+/*  .. */ 	
+
+	} extreme_forecast_index;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		forecast_month;
+/*  45 */ 	fortint		date_of_forecast_run; 
+/*  46 */ 	fortint		number_of_models;
+	} eurosip;
+
+	struct {
+/*  42 */ 	fortint		mars_number; 
+/*  43 */ 	fortint		mars_total;
+/*  44 */ 	fortint		EPS_base_date;
+/*  45 */ 	fortint		EPS_base_time;
+/*  46 */ 	fortint		representative_member_number;
+/*  47 */ 	fortint		members_in_cluster;
+/*  48 */ 	fortint		total_EPS_members;
+/*  52 */ 	fortint		spare[10];
+	} cosmo;
+
+	} u;
+
+} griblocsec1;
+
+
+typedef struct gribsec1 {
+/*   1 */ 	fortint		version;  
+/*   2 */ 	fortint		center;
+/*   3 */ 	fortint		generation;
+/*   4 */ 	fortint		grid_definition;
+/*   5 */ 	fortint		flags;
+/*   6 */ 	fortint		parameter;
+/*   7 */ 	fortint		level_type;
+/*   8 */ 	fortint		top_level;
+/*   9 */ 	fortint		bottom_level;
+/*  10 */ 	fortint		year;
+/*  11 */ 	fortint		month;
+/*  12 */ 	fortint		day;
+/*  13 */ 	fortint		hour;
+/*  14 */ 	fortint		minute;
+/*  15 */ 	fortint		time_unit;
+/*  16 */ 	fortint		p1;
+/*  17 */ 	fortint		p2;
+/*  18 */ 	fortint		range;
+/*  19 */ 	fortint		range_include;
+/*  20 */ 	fortint		range_missing;
+/*  21 */ 	fortint		century;
+/*  22 */ 	fortint		sub_centre;
+/*  23 */ 	fortint		scale_factor;
+/*  24 */ 	fortint		local_use;
+/*  25 */ 	fortint		reserved_25;
+/*  26 */ 	fortint		reserved_26;
+/*  27 */ 	fortint		reserved_27;
+/*  28 */ 	fortint		reserved_28;
+/*  29 */ 	fortint		reserved_29;
+/*  30 */ 	fortint		reserved_30;
+/*  31 */ 	fortint		reserved_31;
+/*  32 */ 	fortint		reserved_32;
+/*  33 */ 	fortint		reserved_33;
+/*  34 */ 	fortint		reserved_34;
+/*  35 */ 	fortint		reserved_35;
+/*  36 */ 	fortint		reserved_36;
+
+/*  37...*/ griblocsec1 local;
+
+	fortint		stuff[ISECTION_1];
+
+} gribsec1;
+
+/* To point to any group of atributes which are not
+   at fixed offset on section 1 */
+typedef struct gribsec1_extra {
+
+union {
+
+	struct {
+/* n   */   fortint     count;		
+/* n+1 */   fortint     base_date;		
+/* n+2 */   fortint     base_time;		
+/* n+3 */   fortint     step;		
+	} ocean;
+
+} u ;
+
+} gribsec1_extra;
+
+typedef struct stepRange {
+	long from;
+	long to;
+} stepRange;
+
+#define   	GRIB_ENSEMBLE_FORECAST       1
+#define   	GRIB_CLUSTER_MEANS           2
+#define    	GRIB_SATELLITE_IMAGE         3
+#define    	GRIB_OCEAN_MODEL_DATA        4
+#define    	GRIB_FORECAST_PROBABILITY    5
+#define    	GRIB_SURFACE_TEMPERATURE     6
+#define    	GRIB_SENSITIVITY             7
+#define    	GRIB_REANALYSIS              8
+#define    	GRIB_SINGULAR_VECTOR         9
+#define    	GRIB_TUBE   			    10
+#define    	GRIB_SST   			        11
+#define    	GRIB_WAVE2D   			    13
+#define    	GRIB_BRIGHTNESS_TEMPERATURE 14
+#define    	GRIB_SEASONAL_FORECAST      15
+#define    	GRIB_SEASONAL_FORECAST_MEAN 16
+#define    	GRIB_SEA_ICE_TEMPERATURE    17
+#define    	GRIB_MULTI_ANALYSIS         18
+#define    	GRIB_EFI                    19
+#define    	GRIB_4V_INCREMENTS          20
+#define    	GRIB_SENSITIVE_AREA_PREDICTION          21
+#define    	GRIB_MULTI_DEFINITION_190   190
+#define    	GRIB_FREE_FORMAT            191
+#define    	GRIB_MULTI_DEFINITION       192
+
+#define     GRIB_COUPLED_ATMOSPHERIC_OCEAN        23
+#define     GRIB_NEW_SATELLITE_IMAGE              24
+#define     GRIB_MODEL_ERROR                      25
+
+#define   	GRIB_HINDCAST                26
+#define     	GRIB_VARIABLE_RESOLUTION_OBSOLETE     27
+#define   	GRIB_COSMO                      28
+#define   	GRIB_COSMO_CLUSTER_INFORMATION  29
+#define     	GRIB_VARIABLE_RESOLUTION     30
+#define    	GRIB_EUROSIP                31
+#define    	GRIB_EXTERNAL_DATA           50
+#define   	GRIB_SREPS 				244
+
+#define		GRIB_CLASS_OD			1
+#define		GRIB_CLASS_RD			2
+#define		GRIB_CLASS_ER			3
+#define		GRIB_CLASS_CS			4
+#define		GRIB_CLASS_ERA_40		5
+#define		GRIB_CLASS_DEMETER		6
+#define		GRIB_CLASS_PROVOST		7
+#define		GRIB_CLASS_ELDAS  		8
+#define		GRIB_CLASS_TOST   		9
+#define		GRIB_CLASS_COSMO   		10
+#define		GRIB_CLASS_ENSEMBLES 	11
+#define		GRIB_CLASS_TIGGE     	12
+#define		GRIB_CLASS_MERSEA 	    13
+#define		GRIB_CLASS_ERA_INTERIM  14
+#define		GRIB_CLASS_SREPS   		15
+#define		GRIB_CLASS_DTS   		16
+#define		GRIB_CLASS_LACE   		17
+#define		GRIB_CLASS_YOTC   		18
+#define		GRIB_CLASS_MS			121
+
+#define		GRIB_CLASS_TEST		    99
+#define		GRIB_CLASS_METAPS		199
+
+#define     GRIB_STREAM_OPER     1025
+#define 	GRIB_STREAM_SHORT_CUT_OFF        1026
+#define 	GRIB_STREAM_SHORT_CUT_OFF_WAVE   1027
+#define 	GRIB_STREAM_DELAYED_CUT_OFF      1028
+#define 	GRIB_STREAM_DELAYED_CUT_OFF_WAVE 1029
+#define     GRIB_STREAM_ENFO     1035
+#define     GRIB_STREAM_ENFO_OVERLAP     1034
+#define     GRIB_STREAM_TOGA     1041
+#define     GRIB_STREAM_SUPD     1044
+#define     GRIB_STREAM_WAVE     1045
+#define     GRIB_STREAM_OCEA     1046
+#define     GRIB_STREAM_FGGE     1047
+#define     GRIB_STREAM_SENS     1036
+#define     GRIB_STREAM_MNTH     1043
+#define     GRIB_STREAM_WAMO     1080
+#define     GRIB_STREAM_WAEF     1081
+#define     GRIB_STREAM_WASF     1082
+#define     GRIB_STREAM_WAEF_OVERLAP     1086
+#define     GRIB_STREAM_WAVE_STANDALONE_MODEL     1087
+#define     GRIB_STREAM_EGRR     1050  /* Bracknell */
+#define     GRIB_STREAM_KWBC     1051  /* Washington */
+#define     GRIB_STREAM_EDZW     1052  /* Offenbach */
+#define     GRIB_STREAM_LFPW     1053  /* Paris or Toulouse */
+#define     GRIB_STREAM_RJTD     1054  /* Tokyo */
+#define     GRIB_STREAM_CWAO     1055  /* Montreal */
+#define     GRIB_STREAM_AMMC     1056  /* Melbourne */
+#define     GRIB_STREAM_CNRM     2231
+#define     GRIB_STREAM_MPIC     2232
+#define     GRIB_STREAM_UKMO     2233
+#define     GRIB_STREAM_CHER     1042
+
+
+/* Hindcasts */
+#define     GRIB_STREAM_OPER_HINDCAST   1024
+#define     GRIB_STREAM_ENFO_HINDCAST_OBSOLETE   1039
+#define     GRIB_STREAM_WAEF_HINDCAST_OBSOLETE   1084
+#define     GRIB_STREAM_WAVE_HINDCAST   1085
+
+#define GRIB_STREAM_ENFH_HINDCAST 1033 
+#define GRIB_STREAM_ENWH_HINDCAST 1079 
+#define GRIB_STREAM_EFHO_HINDCAST 1032 
+#define GRIB_STREAM_EWHO_HINDCAST 1078 
+#define GRIB_STREAM_ENSEMBLE_HINDCAST_STATISTICS 1040 
+#define GRIB_STREAM_WAVE_ENSEMBLE_HINDCAST_STATISTICS 1077 
+
+
+#define     GRIB_STREAM_MV       1070
+#define     GRIB_STREAM_MODA     1071
+#define     GRIB_STREAM_MOR      1072
+#define     GRIB_STREAM_MVR      1073
+#define     GRIB_STREAM_MSDA     1074
+#define     GRIB_STREAM_MDFA     1075
+#define     GRIB_STREAM_DACL     1076
+#define     GRIB_STREAM_DACW     1089
+
+#define     GRIB_STREAM_SEAS             1090
+#define     GRIB_STREAM_SEAS_MM          1091
+#define     GRIB_STREAM_SEAS_MMA         1097
+#define     GRIB_STREAM_WAVE_SEAS_MM     1092
+
+#define     GRIB_STREAM_MONTHLY_FC          1093
+#define     GRIB_STREAM_MONTHLY_FC_MEANS    1094
+#define     GRIB_STREAM_WV_MONTHLY_FC       1095
+#define     GRIB_STREAM_WV_MONTHLY_FC_MEANS 1096
+
+#define     GRIB_STREAM_MAED 1037
+#define     GRIB_STREAM_AMAP 1038
+#define     GRIB_STREAM_MAWV 1083
+
+#define     GRIB_STREAM_SENS_AREA_PREDICTION 1110
+
+/* Definition of new Monthly Forecasts */
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST                       1200
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_HINDCAST              1201
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_ANOMALY               1202
+
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_WAVE                  1203
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_HINDCAST_WAVE         1204
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_ANOMALY_WAVE          1205
+
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_MEANS                 1206
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_HINDCAST_MEANS        1207
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_ANOMALY_MEANS         1208
+
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_WAVE_MEANS            1209
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_HINDCAST_WAVE_MEANS   1210
+#define     GRIB_STREAM_NEW_MONTHLY_FORECAST_ANOMALY_WAVE_MEANS    1211
+
+/* Definition of Multi-model Seasonal Forecasts */
+#define     GRIB_STREAM_MULTIMODEL_SEASONAL_FORECAST                 1220
+#define     GRIB_STREAM_MULTIMODEL_SEASONAL_FORECAST_MEANS           1221
+#define     GRIB_STREAM_MULTIMODEL_SEASONAL_FORECAST_WAVE            1222
+#define     GRIB_STREAM_MULTIMODEL_SEASONAL_FORECAST_WAVE_MEANS      1223
+#define     GRIB_STREAM_MULTIMODEL_SEASONAL_FORECAST_MEAN_ANOMALIES  1224
+
+/* Definition of EUROSIP */
+#define     GRIB_STREAM_EUROSIP_MONTHLY_MEANS                        1240
+#define     GRIB_STREAM_EUROSIP_HINDCAST_MONTHLY_MEANS               1241
+
+/* Definition of Multi-model Multi-Annual Forecasts */
+#define     GRIB_STREAM_MULTIMODEL_MULTIANNUAL_FORECAST              1230
+#define     GRIB_STREAM_MULTIMODEL_MULTIANNUAL_FORECAST_MEANS        1231
+#define     GRIB_STREAM_MULTIMODEL_MULTIANNUAL_FORECAST_WAVE         1232
+#define     GRIB_STREAM_MULTIMODEL_MULTIANNUAL_FORECAST_WAVE_MEANS   1233
+
+/* Definition of Ensemble Data Assimilation */
+#define     GRIB_STREAM_ENSEMBLE_DATA_ASSIMILATION                   1030
+#define     GRIB_STREAM_ENSEMBLE_WAVE_DATA_ASSIMILATION              1088
+
+
+typedef struct gribsec2_ll {
+/*   1 */ 	fortint	data_rep;
+/*   2 */ 	fortint	points_parallel;
+/*   3 */ 	fortint	points_meridian;
+/*   4 */ 	fortint	limit_north;
+/*   5 */ 	fortint	limit_west;
+/*   6 */ 	fortint	resolution;
+/*   7 */ 	fortint	limit_south;
+/*   8 */ 	fortint	limit_east;
+/*   9 */ 	fortint	grid_ew;
+/*  10 */ 	fortint	grid_ns;
+/*  11 */ 	fortint	scan_mode;
+/*  12 */ 	fortint	vertical;
+/*  13 */ 	fortint	rotation_lat;
+/*  14 */ 	fortint	rotation_lon;
+/*  15 */ 	fortint	stretch_lat;
+/*  16 */ 	fortint	stretch_lon;
+/*  17 */ 	fortint	quasi_regular;
+/*  18 */ 	fortint	stuff[ISECTION_2];
+}gribsec2_ll;
+
+typedef struct gribsec2_og {
+/*   1 */ 	fortint	data_rep;
+/*   2 */ 	fortint	points_parallel;
+/*   3 */ 	fortint	points_meridian;
+/*   4 */ 	fortint	reserved_1;
+/*   5 */ 	fortint	reserved_2;
+/*   6 */ 	fortint	reserved_3;
+/*   7 */ 	fortint	reserved_4;
+/*   8 */ 	fortint	reserved_5;
+/*   9 */ 	fortint	reserved_6;
+/*  10 */ 	fortint	reserved_7;
+/*  11 */ 	fortint	scan_mode;
+/*  12 */ 	fortint	reserved_8;
+/*  13 */ 	fortint	reserved_9;
+/*  14 */ 	fortint	reserved_10;
+/*  15 */ 	fortint	reserved_11;
+/*  16 */ 	fortint	reserved_12;
+/*  17 */ 	fortint	reserved_13;
+/*  18 */ 	fortint	stuff[ISECTION_2];
+}gribsec2_og;
+
+typedef struct gribsec2_gg {
+/*   1 */ 	fortint	data_rep;
+/*   2 */ 	fortint	points_parallel;
+/*   3 */ 	fortint	points_meridian;
+/*   4 */ 	fortint	limit_north;
+/*   5 */ 	fortint	limit_west;
+/*   6 */ 	fortint	resolution;
+/*   7 */ 	fortint	limit_south;
+/*   8 */ 	fortint	limit_east;
+/*   9 */ 	fortint	grid_ew;
+/*  10 */ 	fortint	gauss_trunc;
+/*  11 */ 	fortint	scan_mode;
+/*  12 */ 	fortint	vertical;
+/*  13 */ 	fortint	rotation_lat;
+/*  14 */ 	fortint	rotation_lon;
+/*  15 */ 	fortint	stretch_lat;
+/*  16 */ 	fortint	stretch_lon;
+/*  17 */ 	fortint	quasi_regular;
+/*  18 */ 	fortint	earth_flag;
+/*  19 */ 	fortint	components_flags;
+/*  20 */ 	fortint	reserved_20;
+/*  21 */ 	fortint	reserved_21;
+/*  22 */ 	fortint	reserved_22;
+/*  23 */ 	fortint	stuff[ISECTION_2];
+}gribsec2_gg;
+
+typedef struct gribsec2_sh {
+/*   1 */ 	fortint	data_rep;
+/*   2 */ 	fortint	j_resolution;
+/*   3 */ 	fortint	k_resolution;
+/*   4 */ 	fortint	m_resolution;
+/*   5 */ 	fortint	rep_type;
+/*   6 */ 	fortint	rep_mode;
+/*   7 */ 	fortint	reserved_1;
+/*   8 */ 	fortint	reserved_2;
+/*   9 */ 	fortint	reserved_3;
+/*  10 */ 	fortint	reserved_4;
+/*  11 */ 	fortint	reserved_5;
+/*  12 */ 	fortint	reserved_6;
+/*  13 */ 	fortint	reserved_7;
+/*  14 */ 	fortint	rotation_lat;
+/*  15 */ 	fortint	rotation_lon;
+/*  16 */ 	fortint	stuff[ISECTION_2];
+}gribsec2_sh;
+
+typedef struct gribsec2_sv {
+/*   1 */ 	fortint	data_rep;
+/*   2 */ 	fortint	nx;
+/*   3 */ 	fortint	ny;
+/*   4 */ 	fortint	latitude_point;
+/*   5 */ 	fortint	longitude_point;
+/*   6 */ 	fortint	resolution;
+/*   7 */ 	fortint	x_diameter;
+/*   8 */ 	fortint	y_diameter;
+/*   9 */ 	fortint	x_coordinate;
+/*  10 */ 	fortint	y_coordinate;
+/*  11 */ 	fortint	scan_mode;
+/*  12 */ 	fortint	vertical_coordinates;
+/*  13 */ 	fortint	orientation;
+/*  14 */ 	fortint	altitude;
+/*  15 */ 	fortint	x_origin;
+/*  16 */ 	fortint	y_origin;
+/*  17 */ 	fortint	stuff[ISECTION_2];
+}gribsec2_sv;
+
+typedef union gribsec2 {
+	gribsec2_ll	ll;
+	gribsec2_og	og;
+	gribsec2_gg	gg;
+	gribsec2_sh	sh;
+	gribsec2_sv	sv;
+} gribsec2;
+
+/*
+ * These are the offset of the data representation type in GRIB sections 2
+ * plus the values used for further analysis
+ */
+
+
+#define     GRIB_LAT_LONG			0
+#define     GRIB_ROTATED_LAT_LONG	10
+#define     GRIB_OCEAN_GRID         192
+#define     GRIB_GAUSSIAN			4
+#define     GRIB_ROTATED_GAUSSIAN	14
+#define     GRIB_STRETCHED_GAUSSIAN	24
+#define     GRIB_SPHERICAL_HARMONIC	50
+#define     GRIB_ROTATED_SPHERICAL_HARMONIC	60
+#define     GRIB_STRETCHED_SPHERICAL_HARMONIC 70
+#define     GRIB_SPACE_VIEW         90
+
+/*
+ *	The first value is the scale factor for the degree values stored in grib
+ *
+ *	GRIB_DEGREE = int (REAL_DEGREE * GRIB_FACTOR)
+ *
+ *	The second factor is the additional factor used for calculating the
+ *	correct degree values. This has to be used for 640 by 320 grids
+ */
+
+#define		GRIB_FACTOR				1000
+#define		GRIB_EXTRA_FACTOR		10
+#define		WORK_FACTOR				(GRIB_FACTOR*GRIB_EXTRA_FACTOR)
+#define		GLOBE360				(360*WORK_FACTOR)
+#define		POLE90					(90*GRIB_FACTOR)
+
+/*
+ * Definitions for Gaussian grids
+ *
+ * Values 1 through 8 are identical to latitude/longitude grids
+ */
+
+#define     GRIB_QUASI_REGULAR		16
+
+/*
+ * These are the GRIB_LEVEL_TYPE_1 values in use at ECMWF
+ */
+
+#define	  GRIB_SURFACE                       1
+#define	  GRIB_CLOUD_BASE                    2
+#define	  GRIB_CLOUD_TOP                     3
+#define	  GRIB_ISO_0                         4
+
+#define   GRIB_TOP_OF_ATMOSPHERE             8
+#define	  GRIB_PRESSURE_LEVEL                100
+#define	  GRIB_ABOVE_1HPA                    210
+#define	  GRIB_MEAN_SEA_LEVEL                102
+#define	  GRIB_HEIGHT_ABOVE_GROUND           105
+#define	  GRIB_SIGMA_LEVEL                   108
+#define	  GRIB_MODEL_LEVEL                   109
+#define	  GRIB_MODEL_LEVEL_LAYER             110
+#define	  GRIB_DEPTH_BELOW_LAND              111
+#define	  GRIB_SUB_SURFACE                   112
+#define	  GRIB_POTENTIAL_TEMPERATURE         113
+#define	  GRIB_POTENTIAL_VORTICITY           117
+#define	  GRIB_DEPTH_BELOW_SEA_LEVEL         160
+#define	  GRIB_ATMOSPHERE_AS_SINGLE_LAYER    200
+
+#define	  GRIB_OCEAN_WAVE_LEVEL              211
+
+#define	  GRIB_WMO_TABLE_1                     1
+#define	  GRIB_WMO_TABLE_2                     2
+#define	  GRIB_WMO_TABLE_3                     3
+#define	  GRIB_ATMOSPHERE_TABLE              128
+#define	  GRIB_ATMOSPHERE_TABLE_GRADIENTS    129
+#define	  GRIB_ASTEX_TABLE                   130
+#define	  GRIB_PROBABILITY_TABLE             131
+#define	  GRIB_EFI_TABLE                     132
+#define	  GRIB_WAVE_TABLE                    140
+#define	  GRIB_PRELIMINARY_OCEAN_TABLE       150
+#define	  GRIB_OPERATIONAL_OCEAN_TABLE       151
+#define	  GRIB_REANALYSIS_STATISTICS_TABLE   160
+#define	  GRIB_VERTICAL_INTEGRALS_TABLE      162
+#define	  GRIB_SEASONAL_FORECAST_TABLE       170
+#define	  GRIB_CLIMATE_SIMULATION_TABLE      180
+#define	  GRIB_DEMETER_TABLE                 190
+#define	  GRIB_INCREMENTS_TABLE              200
+
+/* Tables for DWD and Italy */
+#define	  GRIB_TABLE_201                     201
+#define	  GRIB_TABLE_202                     202
+
+#define	  GRIB_MODEL_OD                      40
+#define	  GRIB_MODEL_WAVE_G                  104
+#define	  GRIB_MODEL_WAVE_M                  204
+
+#define	  GRIB_DEPTH                         2 
+#define	  GRIB_LONGITUDE                     3  
+#define	  GRIB_LATITUDE                      4
+
+
+/* WMO Centre identifier */
+
+#define WMO_CENTRE_ID_ECMF   98 /* ecmwf */
+#define WMO_CENTRE_ID_AMMC    1 /* melbourne */
+#define WMO_CENTRE_ID_KWBC    7 /* washington */
+#define WMO_CENTRE_ID_CWAO   54 /* montreal */
+#define WMO_CENTRE_ID_PARIS  84 /* toulouse */
+#define WMO_CENTRE_ID_LFPW   85 /* toulouse */
+#define WMO_CENTRE_ID_EGRR   74 /* bracknell */
+#define WMO_CENTRE_ID_EDZW   78 /* offenbach */
+#define WMO_CENTRE_ID_RJTD   34 /* tokyo */
+#define WMO_CENTRE_ID_FNMO   58 /* Fleet Numerical Meteorology and Oceanography Centre */
+#define WMO_CENTRE_ID_RSMC   80 /* roma */
+#define WMO_CENTRE_ID_EHDB   99   /* De Bilt */
+#define WMO_CENTRE_ID_LEMM   214  /* Spanish INM */ 
+#define WMO_CENTRE_ID_LACE   224  /* LACE or Vienna? */ 
+#define WMO_CENTRE_ID_INGV   235  /* INGV-Bologna */
+#define WMO_CENTRE_ID_CRFC   239  /* CERFACS */
+#define WMO_CENTRE_ID_VUWIEN 244  /* University of Veterinary Medicine Vienna */
+#define WMO_CENTRE_ID_KNMI   245  /* KNMI */   /* THIS IS WRONG. SHOULD BE 99, De Bilt, CCCC=EHDB */
+#define WMO_CENTRE_ID_IFMK   246  /* Institut fuer Meererskunde-Kiel */
+
+#ifdef AIX
+#pragma options align=reset
+#endif
+
diff --git a/src/libMars/gribbase.c b/src/libMars/gribbase.c
new file mode 100755
index 0000000..243ae78
--- /dev/null
+++ b/src/libMars/gribbase.c
@@ -0,0 +1,132 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+#ifndef CRAY
+#define PBGRIB	pbgrib_
+#endif
+
+typedef struct gribdata {
+
+	boolean    obs;
+	char       *gname;
+	char       *bname;
+	FILE       *f;
+
+}gribdata;
+
+static void grib_init(void);
+static err  grib_open(void *data,request*,request*,int);
+static err  grib_close(void *data);
+static err  grib_read(void *data,request *r,void *buffer,long *length);
+static err  grib_write(void *data,request *r,void *buffer,long *length);
+
+
+static option opts[] = {
+	{"grib",NULL,"-grib",NULL,t_str,sizeof(char*),OFFSET(gribdata,gname)},
+	{"bufr",NULL,"-bufr",NULL,t_str,sizeof(char*),OFFSET(gribdata,bname)},
+};
+
+static base_class _gribbase = {
+
+	NULL,                       /* parent class */
+	"gribbase",                 /* name         */
+
+	false,                      /* inited       */
+
+	sizeof(gribdata),           /* private size */
+	NUMBER(opts),               /* option count */
+	opts,                       /* options      */
+
+
+	grib_init,                  /* init         */
+
+	grib_open,                  /* open         */
+	grib_close,                 /* close        */
+
+	grib_read,                  /* read         */
+	grib_write,                 /* write        */
+
+};
+
+/* the only 'public' variable ... */
+
+base_class *gribbase = &_gribbase;
+
+
+static void grib_init(void)
+{
+}
+
+static err  grib_open(void *data,request *r,request *e,int mode)
+{
+	gribdata *g = (gribdata*)data;
+
+
+	if(g->gname == NULL && r != NULL )
+		g->gname = strcache(no_quotes(get_value(r,"SOURCE",0)));
+
+	if(g->gname != NULL)
+	{
+		marslog(LOG_DBUG,"Trying to open GRIB %s",g->gname);
+
+		g->f    = fopen(g->gname,mode == WRITE_MODE ? "w" : "r");
+		g->obs = false;
+		marslog(LOG_DBUG|LOG_PERR,"File is %x",g->f);
+	}
+	if(!g->f && g->bname)
+	{
+		marslog(LOG_DBUG,"Trying to open BUFR %s",g->bname);
+		g->f    = fopen(g->bname,mode == WRITE_MODE ? "w" : "r");
+		g->obs = true;
+	}
+
+	if(g->f == NULL)
+		marslog(LOG_EROR|LOG_PERR,"cannot open %s",g->gname?g->gname:g->bname);
+
+	return g->f == NULL ? -1 : 0;
+}
+
+static err  grib_close(void *data)
+{
+	gribdata *g = (gribdata*)data;
+	if(g->f) fclose(g->f);
+	strfree(g->gname);
+	return 0;
+}
+
+static err  grib_read(void *data,request *r,void *buffer,long *length)
+{
+	gribdata *g = (gribdata*)data;
+	err ret;
+
+	if(g->obs)
+		ret = _readbufr(g->f,buffer,length);
+	else
+		ret = _readany(g->f,buffer,length);
+
+	if(ret != 0 && ret != -3)
+		*length = 0;
+
+	if(ret == 0 && r)
+		if(g->obs)
+			bufr_to_request(r,buffer,*length);
+		else
+			grib_to_request(r,buffer,*length);
+
+	return ret;
+}
+
+static err  grib_write(void *data,request *r,void *buffer,long *length)
+{
+	marslog(LOG_WARN,"now in grib_write. Sorry not implemeted");
+	return EOF;
+}
diff --git a/src/libMars/guess.c b/src/libMars/guess.c
new file mode 100644
index 0000000..dc08f4d
--- /dev/null
+++ b/src/libMars/guess.c
@@ -0,0 +1,163 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <ctype.h>
+#include <sys/types.h>
+
+static char *scan_file(const char *file)
+{
+	FILE *f = fopen(file,"r");
+	int len;
+	int max;
+	unsigned char c = ' ';
+
+	union {
+		char  c;
+		short s;
+		long  l;
+		char  ch[8];
+	} buf;
+
+	if(f == NULL)
+		return "BAD";
+
+	memset(&buf,0,sizeof(buf));
+
+
+	if((len = fread((char*)&buf,1,sizeof(buf),f)) < 0)
+	{
+		fclose(f);
+		marslog(LOG_DBUG,"Bad len '%d' while reading '%s'",len,file);
+		return "BAD";
+	}
+
+	if(strncmp(buf.ch,"%!",2) == 0)
+	{
+		fclose(f);
+		return "PSFILE";
+	}
+
+	if(strncmp(buf.ch,"#!",2) == 0)
+	{
+		fclose(f);
+		return "SHELL";
+	}
+
+	if(strncmp(buf.ch,"GRIB",4) == 0)
+	{
+		fclose(f);
+		return "GRIB";
+	}
+
+	if(strncmp(buf.ch,"TIDE",4) == 0)
+	{
+		fclose(f);
+		return "GRIB";
+	}
+
+	if(strncmp(buf.ch,"BUDG",4) == 0)
+	{
+		fclose(f);
+		return "GRIB";
+	}
+
+	if(strncmp(buf.ch,"BUFR",4) == 0)
+	{
+		fclose(f);
+		return "BUFR";
+	}
+
+	if(strncmp(buf.ch,"%!",2) == 0)
+	{
+		fclose(f);
+		return "POSTSCRIPT";
+	}
+
+	if(strncmp(buf.ch,"#GEO",4) == 0)
+	{
+		fclose(f);
+		return "GEOPOINTS";
+	}
+
+	if(strncmp(buf.ch,"#LLM",4) == 0)
+	{
+		fclose(f);
+		return "LLMATRIX";
+	}
+
+	if(strncmp(buf.ch+2,"GRIB",4) == 0)
+	{
+		fclose(f);
+		return "GRIB";
+	}
+
+	if(strncmp(buf.ch+4,"GRIB",4) == 0)
+	{
+		fclose(f);
+		return "GRIB";
+	}
+
+	if(strncmp(buf.ch+2,"BUFR",4) == 0)
+	{
+		fclose(f);
+		return "BUFR";
+	}
+
+	if(strncmp(buf.ch+4,"BUFR",4) == 0)
+	{
+		fclose(f);
+		return "BUFR";
+	}
+
+	if(strncmp(buf.ch,"CDF",3) == 0)
+	{
+		fclose(f);
+		return "NETCDF";
+	}
+
+	rewind(f);
+
+	max = 4096; /* 4 K */
+	while(max-->0 && !feof(f))
+	{
+		fread((char*)&c,1,1,f);
+		if(!isprint(c) && !isspace(c))
+		{
+			fclose(f);
+			return "BINARY";
+		}
+	}
+
+	fclose(f);
+	return "NOTE";
+}
+
+char *guess_class(const char *file)
+{
+
+	struct stat buf;
+
+	if(stat(file,&buf) <0)
+		return "BAD";
+
+	switch(buf.st_mode & S_IFMT)
+	{
+	case S_IFDIR:
+		return "FOLDER";
+
+	case S_IFREG:
+		return scan_file(file);
+
+	default:
+		return "SPECIAL";
+	}
+
+}
diff --git a/src/libMars/handler.c b/src/libMars/handler.c
new file mode 100644
index 0000000..6195ad3
--- /dev/null
+++ b/src/libMars/handler.c
@@ -0,0 +1,187 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+#define VALIDATE   0x01
+#define STATISTICS 0x02
+#define SCHEDULE   0x04
+/* MARSLITE defines those verbs which can be executed when the client is running on behalf of a marslite client */
+#define MARSLITE   0x08
+
+
+static handler handlers[] = {
+	{"RETRIEVE",handle_retrieve, VALIDATE | STATISTICS | SCHEDULE | MARSLITE, },
+	{"WRITE",   handle_write,    0,},
+	{"READ",    handle_read,     0,},
+	{"COMPUTE", handle_compute,  0,},
+	{"ARCHIVE", handle_archive,  VALIDATE | STATISTICS,},
+#ifdef ECMWF
+	{"REMOVE",  handle_remove, VALIDATE | STATISTICS,},
+#endif
+
+	{"DEFAULT", handle_default,  0,},
+
+    /* On new DHS */
+
+	{"ERASE",   handle_retrieve,   VALIDATE | STATISTICS,},
+	{"FLUSH",   handle_control, VALIDATE | STATISTICS,},
+	{"ATTACH",  handle_control, VALIDATE | STATISTICS,},
+	{"LIST",    handle_control, },
+	{"BROWSE",  handle_control, VALIDATE,},
+	{"STAGE",   handle_control, VALIDATE | STATISTICS | MARSLITE,},
+
+	{"GET",     handle_control, 0,},
+
+	{"STORE",   handle_control, VALIDATE | STATISTICS,},
+	{"FETCH",   handle_retrieve, VALIDATE | STATISTICS,},
+
+	{"END",     handle_end,     0,},
+};
+
+
+err handle_request(request *r,void *data)
+{
+	int i;
+	char buf[80];
+
+	if(!r)
+	{
+		marslog(LOG_EROR,"Cannot handle null requests");
+		return -2;
+	}
+
+	if(mars.verbose)
+	{
+		static int n = 0;
+
+		putchar('\n');
+		marslog(LOG_INFO,"Processing request %d",++n);
+	}
+
+	add_hidden_parameters(r);
+
+	
+	if(mars.marslite_mode)
+	{
+        const char *force = get_value(r,"_WEBMARS_DATABASE",0);
+        if(force == NULL)
+            unset_value(r,"DATABASE");
+		unset_value(r,"TARGET");
+		unset_value(r,"FIELDSET");
+	}
+
+	if(mars.verbose)
+	{
+		putchar('\n');
+		print_one_request(r);
+	}
+
+
+	for(i=0;i<NUMBER(handlers);i++)
+		if(EQ(handlers[i].name,r->name))
+		{
+			err e;
+			err ret;
+			request *env    = get_environ();
+			clock_t cpu     = 0;
+			double  elapsed = 0;
+			boolean    logstat = handlers[i].flags & STATISTICS;
+
+			if(logstat) 
+				init_statistics(r,env);
+
+			if( (handlers[i].flags & VALIDATE) == 0)
+				mars.request_id = -1;
+			else
+				if((e = validate_request(r,env,mars.validate)) != 0)
+				{
+					if(logstat)
+					{
+						log_statistics("status","restricted");
+						log_errors();
+						flush_statistics(r,env);
+					}
+					return e;
+				}
+
+#ifdef ECMWF
+			if((handlers[i].flags & SCHEDULE))
+			{
+				if((e = check_dissemination_schedule(r,env,logstat)) != 0)
+				{
+					/* Fail if dissemination schedule */
+					if(mars.dissemination_schedule & SCHEDULE_FAIL)
+					{
+						if(logstat)
+						{
+							log_statistics("status","before_schedule");
+							flush_statistics(r,env);
+							log_errors();
+						}
+						return e;
+					}
+				}
+			}
+#endif
+
+			if(!(handlers[i].flags & MARSLITE) && mars.marslite_mode)
+			{
+				int j = 0;
+				marslog(LOG_WARN,"MARS running on behalf of marslite client");
+				marslog(LOG_EROR,"Verb: %s disabled",handlers[i].name);
+				marslog(LOG_WARN,"Allowed verbs in this mode:");
+				for(j=0; j<NUMBER(handlers);j++)
+				{
+					if(handlers[j].flags & MARSLITE)
+						marslog(LOG_WARN,"   %s",handlers[j].name);
+				}
+				log_statistics("status","marslite");
+				return -1;
+			}
+
+
+			qenter(r);
+			start_timer(); 
+			e = handlers[i].proc(r,data);
+			elapsed = stop_timer(buf);
+			cpu     = timer_cpu();
+			if(*buf) marslog(LOG_INFO,"Request time: %s",buf);
+			qleave();
+
+			print_all_timers();
+			reset_all_timers();
+
+			if((ret = fflush(stdout)) != 0)
+				marslog(LOG_WARN,"Error while flushing output (%d)",ret);
+
+			if(logstat)
+			{
+				log_statistics("cpu","%ld",(long)cpu);
+				log_statistics("elapsed","%ld",(long)elapsed);
+				log_statistics("status","%s",e==NOERR?"ok":"fail");
+				if(e) log_errors();
+				flush_statistics(r,env);
+			}
+
+
+			return e;
+		}
+
+	marslog(LOG_EROR,"No handler for verb '%s' found",r->name);
+	return -1;
+}
+
+err handle_end(request *r,void *data)
+{
+	marslog(LOG_INFO,"Note: in this version of MARS, END is not compulsary");
+	marslog(LOG_INFO,"Any remaining requests ignored");
+	return END_REQUEST;
+}
diff --git a/src/libMars/hash.c b/src/libMars/hash.c
new file mode 100755
index 0000000..09cafe2
--- /dev/null
+++ b/src/libMars/hash.c
@@ -0,0 +1,137 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <stdio.h>
+#include "mars.h"
+
+#define SIZE 	((int)4097)
+
+typedef struct hashrec {
+	struct hashrec  *next;
+	char   *name;
+	int    cnt;
+} hashrec;
+
+static hashrec *table[SIZE] = { 
+	NULL, };
+
+
+static int hash(const char *name)
+{
+	int n = 0;
+
+	while(*name)
+		n +=  (*name++ - 'A') + (n << 5);
+
+#ifdef CRAY
+	if(n<0) n = -n;
+#else
+	if(n<0)  {
+		int m = -n/SIZE;
+		n += (m+1)*SIZE;
+	}
+#endif
+	return n % SIZE;
+}
+
+void hash_stat()
+{
+	int i;
+	int a=0,b=0,c=0;
+	hashrec *h;
+
+	printf("Table size is %d. ",SIZE);
+
+	for(i=0;i<SIZE;i++)
+		if(h = table[i])
+		{
+			a++;
+			while(h) { b++; c += h->cnt; h = h->next; };
+		}
+
+	printf("Used: %d, Total: %d, Strings: %d\n",a,b,c);
+}
+
+char *strcache(const char *name)
+{
+	hashrec *h;
+	int      n;
+
+	if(name == NULL) return NULL;
+
+	n = hash(name);
+	h = table[n];
+
+	while(h)
+	{
+		if(EQ(h->name,name))
+		{
+			h->cnt++;
+			return h->name;
+		}
+		h = h->next;
+	}
+
+	h        = NEW(hashrec);
+	h->name  = NEW_STRING(name);
+	h->next  = table[n];
+	h->cnt   = 1;
+	table[n] = h;
+
+	return h->name;
+}
+
+void strfree(char *name)
+{
+
+	hashrec *h;
+	hashrec *p = NULL;
+	int      n;
+
+	if(name == NULL) return;
+
+	n = hash(name);
+	h = table[n];
+
+	while(h)
+	{
+		if(h->name == name)
+		{
+			h->cnt--;
+			break;
+		}
+		p = h;
+		h = h->next;
+	}
+
+	if(h == NULL)
+	{
+		marslog(LOG_WARN,"%s was not in hash table",name);
+		abort();
+		printf("n=%d\n",n);
+		h = table[n];
+		while(h)
+		{
+			printf("%s %d\n",h->name,h->cnt);
+			h = h->next;
+		}
+		return;
+	}
+
+	if(h->cnt == 0)
+	{
+		if(p) p->next = h->next;
+		else table[n] = h->next;
+		FREE(h->name);
+		FREE(h);
+	}
+}
+
+
diff --git a/src/libMars/hidden.c b/src/libMars/hidden.c
new file mode 100644
index 0000000..656bb95
--- /dev/null
+++ b/src/libMars/hidden.c
@@ -0,0 +1,564 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <ctype.h>
+
+
+typedef int (*sortproc) (int,int);
+
+static int sort_up  (int a,int b) {
+	return a-b;
+}
+static int sort_152 (int a,int b) {
+	if(a==152 && b != 127 ) a = -1;
+	if(b==152 && a != 127)  b = -1; 
+	return a-b;
+}
+static int sort_down(int a,int b) {
+	return b-a;
+}
+
+static void sort_params(request *r,parameter *p,sortproc proc)
+{
+
+}
+
+static void hidden_sort_request(request *r)
+{
+	sortproc proc;
+	const char *s;
+	parameter *p = r->params;
+
+	while(p)
+	{
+		if(count_values(r,p->name)>1)
+		{
+			proc = sort_up;
+
+			if(EQ(p->name,"PARAM"))
+				proc = sort_152;
+
+			if((EQ(p->name,"LEVELIST")) &&
+					(s = get_value(r,"LEVTYPE",0) )  &&
+					(EQ(s,"PL")))
+				proc = sort_down;
+
+			sort_params(r,p,proc);
+		}
+		p = p->next;
+	}
+}
+
+static char *names[] = {
+	"DATE",
+	"TIME",
+	"STEP",
+	"STREAM",
+};
+
+
+static void unfg(const request *r,int count,char *names[],
+		char *vals[],void *data)
+{
+	request *z = (request *)data;
+	int d = date_to_julian(atol(vals[0]));
+	int t = atoi(vals[1])/100;
+	int s = atoi(vals[2]);
+	const char *stream = vals[3];
+	int monthly = (stream[0]=='M' && stream[1]=='O' && stream[2]==0);
+
+	if(s == 0) s = 6;
+
+	if(monthly)
+	{
+		d = julian_to_date(d,mars.y2k);
+		d += 2;
+		d = date_to_julian(d);
+	}
+	marslog(LOG_DBUG,"Un first-guessing:  time %d date %d",t,
+			julian_to_date(d,mars.y2k));
+
+	t -= s;
+
+	while(t <0)
+	{
+		t += 24;
+		d -= 1;
+	}
+
+	marslog(LOG_DBUG,"Un first-guessing:  time %d date %d",t,
+			julian_to_date(d,mars.y2k));
+
+	if(monthly)
+	{
+		if(mars.mm_firstofmonth)
+			add_unique_value(z,"DATE","%d",(julian_to_date(d,mars.y2k)/100*100)+1);
+		else
+			add_unique_value(z,"DATE","%d",julian_to_date(d,mars.y2k)/100*100);
+	}
+	else
+		add_unique_value(z,"DATE","%d",julian_to_date(d,mars.y2k));
+	add_unique_value(z,"TIME","%04d",t*100);
+	add_unique_value(z,"STEP","%d",s);
+
+}
+
+request *un_first_guess(const request *r)
+{
+	if(r)
+	{
+		const char *s;
+		request *z = clone_one_request(r);
+
+#ifndef FG_IS_REAL_FG
+		int m;
+
+		int n = count_values(z,"DATE") * 
+			count_values(z,"TIME") * 
+			count_values(z,"STEP");
+
+		if(s = get_value(r,"TYPE",0))
+			if(EQ(s,"FG"))
+			{
+
+				if(s =  get_value(r,"STREAM",0))
+					if(EQ(s,"WAVE"))
+						return z;
+
+				marslog(LOG_DBUG,"Un first-guessing...");
+				if(mars.debug)
+					print_one_request(z);
+
+				set_value(z,"TYPE","FC");
+				unset_value(z,"DATE");
+				unset_value(z,"TIME");
+				unset_value(z,"STEP");
+
+				values_loop(r,NUMBER(names),names,unfg,z);
+				if(mars.debug)
+					print_one_request(z);
+
+				m = count_values(z,"DATE") * 
+					count_values(z,"TIME") * 
+					count_values(z,"STEP");
+
+				if(m != n)
+				{
+					free_all_requests(z);
+					z = clone_one_request(r);
+					marslog(LOG_WARN,
+							"Multi date/time first-guess requests cannot be cached");
+				}
+			}
+#endif
+
+		return z;
+	}
+	return NULL;
+}
+
+request *un_first_guess_all(const request *r)
+{
+	request *first = NULL;
+	request *last = NULL;
+
+	while(r)
+	{
+		request *s = un_first_guess(r);
+		s->order = r->order;
+		if(first == NULL) 
+			first = s;
+		else 
+			last->next = s;
+		last = s;
+		r = r->next;
+	}
+
+	return first;
+}
+
+static void check_one(const request *r,const char *p)
+{
+	if(count_values(r,p) != 1)
+	{
+		marslog(LOG_WARN,"'VERIFY' needs 1 %s",p);
+
+		if(count_values(r,p)>1)
+		{
+			marslog(LOG_EROR,"Cannot make 1 request with multiple '%s's",p);
+			marslog(LOG_EROR,"for the same 'VERIFY'");
+
+			marsexit(1);
+		}
+	}
+
+}
+
+static void verifydate_to_basedate(request *r)
+{
+	long bjulian = 0;
+	const char* pdate = NULL;
+	long second = 0; boolean isjul;
+	long bdate = 0;
+	long btime = 0;
+	int i     = 0;
+	int bstep = 0;
+
+	check_one(r,"DATE");
+	check_one(r,"TIME");
+	check_one(r,"STEP");
+
+	pdate = get_value(r,"DATE",0);
+	if(is_number(pdate))
+	{
+		bdate   = atoi(pdate);
+		bjulian = date_to_julian(bdate);
+	}
+	else
+	{
+		parsedate(pdate,&bjulian,&second,&isjul);
+		bdate = julian_to_date(bjulian,mars.y2k);
+	}
+
+	btime = atoi(get_value(r,"TIME",0));
+	bstep = atoi(get_value(r,"STEP",0));
+	unset_value(r,"STEP");
+
+	for(i=0;i<count_values(r,"VERIFY");i++)
+	{
+		const char* p = get_value(r,"VERIFY",i);
+		long vjulian = 0;
+		long vdate = 0;
+
+		if(is_number(p))
+		{
+			vdate   = atoi(p);
+			vjulian = date_to_julian(vdate);
+		}
+		else
+		{
+			parsedate(p,&vjulian,&second,&isjul);
+			vdate = julian_to_date(vjulian,mars.y2k);
+		}
+
+		if(vdate<bdate)
+		{
+			marslog(LOG_EROR,"'VERIFY' (%s) cannot preceed 'DATE' (%s)",p,pdate);
+			marsexit(1);
+		}
+		else
+		{
+			int n = (vjulian - bjulian) * 24 + bstep; /* - 23; */
+			add_value(r,"STEP","%d",n);
+
+			marslog(LOG_DBUG,"Converting vdate (%ld) to STEP (%d) from DATE (%ld), TIME (%d), STEP (%d)",
+					vdate,n,bdate,btime,bstep);
+
+		}
+	}
+
+	unset_value(r,"VERIFY");
+}
+
+static void validation_date(request *r)
+{
+	int i;
+	int date = 0;
+	int time = 0;
+	int step = 0;
+	int v;
+
+	for(i=0;i<count_values(r,"STEP");i++)
+	{
+		int n = atoi(get_value(r,"STEP",i));
+		if(n>step) step = n;
+	}
+
+	for(i=0;i<count_values(r,"DATE");i++)
+	{
+		const char* p = get_value(r,"DATE",i);
+		int n;
+		if(is_number(p))
+			n = atoi(p);
+		else
+		{
+			long julian = 0,second = 0; boolean isjul;
+			parsedate(p,&julian,&second,&isjul);
+			n = julian_to_date(julian,mars.y2k);
+		}
+		if(n>date) date = n;
+	}
+
+	for(i=0;i<count_values(r,"TIME");i++)
+	{
+		int n = atoi(get_value(r,"TIME",i));
+		if(n>time) time = n;
+	}
+
+	v = date_to_julian(date) + (time/100 + step + 23)/24;
+	set_value(r,"_VERIF_DATE","%d",julian_to_date(v,mars.y2k));
+	v -= date_to_julian(0) ;
+	set_value(r,"_DELTA_DATE","%d",v);
+	set_value(r,"_CURRENT_DATA","%s",v>=1?"YES":"NO");
+}
+
+void ensemble_to_number(request *r)
+{
+	static request *done = 0;
+
+	if(done != r)
+	{
+		valcpy(r,r,"NUMBER","ENSEMBLE");    
+		valcpy(r,r,"NUMBER","CLUSTER");     
+		valcpy(r,r,"NUMBER","PROBABILITY"); 
+		unset_value(r,"ENSEMBLE");
+		unset_value(r,"CLUSTER");
+		unset_value(r,"PROBABILITY");
+		done = r;
+	}
+}
+
+err add_hidden_parameters(request *r)
+{
+	const char *s;
+	int  i,n;
+	int j = 0;
+
+	while(s = no_quotes(get_value(r,"EXPVER",j++)))
+	{
+		if(is_number(s))
+		{
+			n = atoi(s);
+			add_value(r,"TMPEXPVER","%04d",n);
+		}
+		else if(strlen(s) == 4)
+		{
+			add_value(r,"TMPEXPVER","%s",lowcase(s));
+			n = 0;
+			while(*s) 
+				n = (n <<8) + (unsigned char)*s++; 
+		}
+		else n = -1;
+		add_value(r,"_EXPVER","%d",n);
+	}
+
+	valcpy(r,r,"EXPVER","TMPEXPVER"); 
+	unset_value(r,"TMPEXPVER");
+
+	if(s = get_value(r,"RESOL",0))
+	{
+		if(!EQ(s,"AV") && !EQ(s,"AUTO") && s[0] != 'N')
+			set_value(r,"_TRUNCATION",s);
+	}
+
+	/* Changes in accuracy:                   mars.accuracy
+AV : output same as input             -1 
+N  : output same as input             -1
+nn : output with nn bits per value    nn
+L or R : output 8 bits per value       8
+<nothing> :                            0
+
+interpolation    in compute
+=============    ==========
+mars.accuracy == 0  => same as input    24
+mars.accuracy == n  => n                n
+mars.accuracy == -1 => same as input    same as input
+
+	 */
+	if((s = get_value(r,"ACCURACY",0)))
+	{
+		if(isdigit(*s))
+		{
+			int n = atoi(s);
+			if(n)
+				mars.accuracy = n;
+			marslog(LOG_DBUG,"hidden: Using %d bits for accuracy",mars.accuracy);
+		}
+		else
+		{
+			if((strcmp(s,"N")==0) || (strcmp(s,"AV")==0))
+			{
+				mars.accuracy = -1;
+				marslog(LOG_INFO,"Accuracy %s selected. Using input field accuracy",s);
+				marslog(LOG_DBUG,"hidden: Same bits as input for accuracy (%d)",mars.accuracy);
+			}
+			else
+				mars.accuracy = 0;
+		}
+	}
+	else
+		mars.accuracy = 0;
+
+	if(i = count_values(r,"AREA"))
+	{
+		int n,s;
+
+		if(i != 4)
+		{
+			marslog(LOG_EROR,"AREA must have 4 values");
+			return -2;
+		}
+
+		n = 0;
+		s = 2;
+
+		if(atof(get_value(r,"AREA",2)) > atof(get_value(r,"AREA",0)))
+		{
+			const char *level = get_value(r,"LEVTYPE",0);
+			boolean     ocean = level && (strcmp(level,"DP") == 0);            /* Level depth means ocean data */
+
+			/* Don't check if ocean */
+			if(!ocean)
+			{
+				n = 2;
+				s = 0;
+				marslog(LOG_WARN,"SOUTH and NORTH parts of AREA were swapped");
+			}
+		}
+
+		set_value(r,"_AREA_N",get_value(r,"AREA",n));
+		set_value(r,"_AREA_W",get_value(r,"AREA",1));
+		set_value(r,"_AREA_S",get_value(r,"AREA",s));
+		set_value(r,"_AREA_E",get_value(r,"AREA",3));
+
+		if(s == 0)
+		{
+			set_value(r,"AREA","%s",get_value(r,"_AREA_N",0));
+			add_value(r,"AREA","%s",get_value(r,"_AREA_W",0));
+			add_value(r,"AREA","%s",get_value(r,"_AREA_S",0));
+			add_value(r,"AREA","%s",get_value(r,"_AREA_E",0));
+		}
+	}
+
+	set_value(r,"_MARS_VERSION","%ld",marsversion());
+
+	ensemble_to_number(r);
+
+	switch(count_values(r,"GRID"))
+	{
+		case 0:
+			break;
+
+		case 1:
+
+			/* It's Gaussian !! */
+
+			set_value(r,"_GAUSSIAN",get_value(r,"GRID",0));
+			break;
+
+		case 2:
+
+			/* It's lat/lon */
+
+			set_value(r,"_GRID_EW",get_value(r,"GRID",0));
+			set_value(r,"_GRID_NS",get_value(r,"GRID",1));
+
+			break;
+	}
+
+
+	switch(count_values(r,"ROTATION"))
+	{
+		case 0:
+			break;
+
+		case 1:
+			marslog(LOG_EROR,"ROTATION must have 2 values");
+			return -2;
+
+		case 2:
+			set_value(r,"_ROTATION_LAT",get_value(r,"ROTATION",0));	
+			set_value(r,"_ROTATION_LON",get_value(r,"ROTATION",1));	
+			break;
+	}
+
+#if 0
+	if(count_values(r,"VERIFY"))
+		verifydate_to_basedate(r);
+#endif
+
+	validation_date(r);
+
+	pprotation(r);
+
+	ppstyle(r);
+
+	pparea(r);
+
+	patch_ranges(r);
+
+	patch_steprange(r);
+
+	return NOERR;
+}
+
+void patch_ranges(request* r)
+{
+	if (observation(r))
+	{
+		if (count_values(r,"TIME") == 3 && EQ(get_value(r,"TIME",1),"TO"))
+		{
+			long from = atol(get_value(r,"TIME",0));
+			long to = atol(get_value(r,"TIME",2));
+
+			long start = from / 100 * 60 + from % 100;	
+			long end = to / 100 * 60 + to % 100;	
+			long range = end - start;
+			while (range < 0)
+				range += 24 * 60;
+			marslog(LOG_WARN,"Changing time %04d/to/%04d to range %d",
+					from,to,range);
+
+			copy_to_ibm_values(r,"TIME");
+
+			set_value(r,"RANGE","%d",range);
+			set_value(r,"TIME","%04d",from);
+
+		}
+		else if (count_values(r,"TIME") == 1 && count_values(r,"RANGE") != 0)
+		{
+			request *clone = clone_one_request(r);
+			char	tmp[32];
+			char	*p;
+
+			long from=atol(get_value(r,"TIME",0));
+			long range=atol(get_value(r,"RANGE",0));
+			long to;
+
+			to=from / 100 * 60 + from % 100+range;
+			to = to / 60 * 100 + to % 60;
+
+			/* printf("%4ld %4ld\n",from,to); */
+
+			sprintf(tmp,"%4ld",from);
+			p = tmp;
+			while (*p) { if (*p == ' ') *p = '0'; p++; }
+			set_value(clone,"TIME",tmp);
+			add_value(clone,"TIME","TO");
+			sprintf(tmp,"%4ld",to);
+			p = tmp;
+			while (*p) { if (*p == ' ') *p = '0'; p++; }
+			add_value(clone,"TIME",tmp);
+
+			move_to_ibm_values(clone,r,"TIME");
+			free_all_requests(clone);
+		}
+	}
+	else 
+	{
+		/* Fields */
+		const char *levtype = get_value(r,"LEVTYPE",0);
+		boolean ocean = levtype && EQ(levtype,"DP");
+
+		if(!ocean)
+			unset_value(r,"RANGE");
+	}
+}
diff --git a/src/libMars/hypercube.c b/src/libMars/hypercube.c
new file mode 100755
index 0000000..e67ad6d
--- /dev/null
+++ b/src/libMars/hypercube.c
@@ -0,0 +1,942 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#ifndef mars_H
+#include "mars.h"
+#endif
+
+int static eq_pseudo_ok(const char* l,const char* r)
+{
+	if(mars.pseudogrib && mars.dont_check_pseudogrib) {
+		if(!eq_string(l,r))
+			marslog(LOG_WARN,"PSEUDO GRIB mismatch ignored: %s %s",l,r);
+		return 1;
+	}
+	return eq_string(l,r);
+}
+
+
+static axis_t axis[] = {
+
+	/* From dhsbase.c 'check_grib' */
+	{"CLASS",       eq_pseudo_ok, },
+	{"TYPE",        eq_pseudo_ok, },
+	{"STREAM",      eq_pseudo_ok, },
+	{"LEVTYPE",     eq_string, },
+
+	{"ORIGIN",      eq_string, },
+	{"PRODUCT",     eq_string, },
+	{"SECTION",     eq_string, },
+	{"METHOD",      eq_integer, },
+	{"SYSTEM",      eq_integer, },
+
+	/* testing */
+	/* {"REPRES",      eq_null, }, */
+
+	/* From field order */
+	{"DATE",        eq_date, },
+	{"REFDATE",     eq_date, },
+	{"HDATE",       eq_date, },
+	{"TIME",        eq_time, },
+	{"ANOFFSET",   eq_range, },
+
+	{"REFERENCE",   eq_range, },
+	{"STEP",        eq_range, },
+	{"FCMONTH",     eq_integer, },
+	{"FCPERIOD",    eq_range, },
+
+	{"LEADTIME",    eq_range, },
+	{"OPTTIME",     eq_range, },
+
+	{"EXPVER",      eq_pseudo_ok, },
+	{"DOMAIN",      eq_string, },
+
+	{"DIAGNOSTIC",  eq_integer, },
+	{"ITERATION",   eq_integer, },
+
+	{"QUANTILE",    eq_range, },
+	{"NUMBER",      eq_integer, },
+
+	{"LEVELIST",    eq_coord, },
+	{"LATITUDE",    eq_coord, },
+	{"LONGITUDE",   eq_coord, },
+	{"RANGE",       eq_range, },
+
+	{"PARAM",       eq_param, },
+
+	{"IDENT",       eq_integer, },
+	{"OBSTYPE",     eq_integer, },
+	{"INSTRUMENT",  eq_integer, },
+
+	{"FREQUENCY",   eq_integer, },
+	{"DIRECTION",   eq_integer, },
+
+	{"CHANNEL",     eq_integer, },
+};
+
+static axis_t axisnew[1024]; /* May be enough language attributes for the time being... */
+static int init_axis(const request *r)
+{
+	parameter *p = r->params;
+	static int count = 0;
+
+	if(count)
+		return count;
+
+	while(p)
+	{
+		const request *i = p->interface;
+		boolean take = true;
+		const char *check = NULL;
+
+		if(i && (((check = get_value(i,"check",0)) != NULL) && EQ(check,"false")))
+			take = false;
+
+		if(take)
+		{
+			const char *type = get_value(i,"type",0);
+			namecmp cmp = eq_default;
+
+			axisnew[count].name    = p->name;
+			if(type)
+			{
+				if(EQ(type,"string"))
+					cmp = eq_string;
+				else if(EQ(type,"null"))
+					cmp = eq_null;
+				else if(EQ(type,"date"))
+					cmp = eq_date;
+				else if(EQ(type,"time"))
+					cmp = eq_time;
+				else if(EQ(type,"step"))
+					cmp = eq_range;
+				else if(EQ(type,"integer"))
+					cmp = eq_integer;
+				else if(EQ(type,"coord"))
+					cmp = eq_coord;
+				else if(EQ(type,"real"))
+					cmp = eq_real;
+				else if(EQ(type,"default"))
+					cmp = eq_default;
+			}
+			axisnew[count].compare = cmp;
+		}
+		count++;
+		p = p->next;
+	}
+	return count;
+}
+
+int axisindex(const char *name)
+{
+	int i = 0;
+	for(i = 0 ; i < NUMBER(axis) ; i++)
+	{
+		if(EQ(name,axis[i].name))
+			return i;
+	}
+	return -1;
+}
+
+namecmp comparator(const char *name)
+{
+	static char *dontcompare = NULL;
+	static boolean first = true;
+	int i = 0;
+
+	if(first)
+	{
+		dontcompare = getenv("MARS_DONT_CHECK");
+		first = false;
+	}
+
+	if(dontcompare != NULL)
+	{
+		if(EQ(dontcompare,name))
+			return eq_null;
+	}
+
+	if((i = axisindex(name))!= -1)
+		return axis[i].compare;
+	marslog(LOG_WARN,"No comparator for %s",name);
+	return eq_string;
+}
+
+/********************/
+/* index accessors  */
+/********************/
+
+static int count_index(const hypercube *h)
+{
+	int i = 0, n = 0;
+
+	for(i = 0; i<h->size; ++i)
+		n += h->set[i];
+	return n;
+}
+
+static int count_holes(const hypercube *h, int cnt)
+{
+	int i = 0, n = 0;
+
+	for(i = 0; i<cnt;++i)
+		n += h->set[i];
+
+	return (n==cnt)?0:(cnt - n);
+}
+
+void print_hypercube_index(const hypercube *h)
+{
+	int i = 0;
+
+	for(i = 0; i<h->size; ++i)
+		printf(" %d",h->set[i]);
+	printf("\n");
+}
+
+static void reset_index(hypercube *h, int v)
+{
+	memset(h->set,v,h->size);
+}
+
+
+static int pos_to_index(const hypercube *h, int pos, int *from, int *last)
+{
+	for(; *from < h->size; ++(*from))
+	{
+		*last += h->set[*from];
+		if(*last > pos)
+			return (*from)++;
+	}
+	return -1;
+}
+
+static void set_index(hypercube *h, int index, int value)
+{
+	if(index < 0 || index >= h->count)
+	{
+		marslog(LOG_EXIT,"Internal error, bad hypercube index %d",index);
+	}
+
+	if(index >= h->max)
+	{
+		int old = h->max;
+		while(index>= h->max)
+			h->max += 4096;
+
+		h->set = h->set?REALLOC(h->set,h->max):MALLOC(h->max);
+		memset(h->set+old,0,h->max - old);
+	}
+
+	if(index >= h->size)
+		h->size = index+1;
+
+	h->set[index] = value;
+}
+
+static int get_index(hypercube *h, int index)
+{
+	if(index < 0 || index >= h->count)
+	{
+		marslog(LOG_EXIT,"Internal error, bad hypercube index %d",index);
+	}
+
+	if(index >= h->size)
+		return 0;
+
+	return h->set[index];
+}
+
+static int cmp_index(const hypercube *a, const hypercube *b)
+{
+	if(sizeof(a->set) == sizeof(b->set))
+		return memcmp(a->set,b->set,sizeof(a->set));
+	return -1;
+}
+
+/**************************/
+/* End of index accessors */
+/**************************/
+
+
+/*******************/
+/* axis accessors  */
+/*******************/
+
+static int count_axis(const hypercube *h)
+{
+	if(h && h->cube)
+		return count_values(h->cube,"AXIS");
+
+	return -1;
+}
+
+
+static const char* get_axis(const hypercube *h, int pos)
+{
+	const char *axis = NULL;
+	if(pos<count_axis(h))
+	{
+		axis = get_value(h->cube,"AXIS",pos);
+	}
+	return axis;
+}
+
+static void add_axis(hypercube *h, const char *axis)
+{
+	add_value(h->cube,"AXIS","%s",axis);		
+}
+
+static void reset_axis(hypercube *h)
+{
+	unset_value(h->cube,"AXIS");
+}
+
+static void remove_axis(hypercube *h, const char *axis)
+{
+	unset_param_value(h->cube,"AXIS",axis);
+}
+
+static void cube_values(hypercube *h, const char *p)
+{
+	valcpy(h->cube,h->r,(char *)p,(char *)p);
+}
+
+static int count_dimensions(const hypercube *, const char *);
+
+static int set_axis(hypercube *h)
+{
+	int i     = 0;
+	int count = (h && h->r) ? 1 : -1;
+
+	reset_axis(h);
+	for(i = (NUMBER(axis) -1) ; i>=0; --i)
+	{
+		int n = count_dimensions(h,axis[i].name);
+		if(n > 1)
+		{
+			add_axis(h,axis[i].name);
+			cube_values(h,axis[i].name);
+			count *= n;
+		}
+	}	
+
+	return count;
+}
+
+/*************************/
+/* End of axis accessors */
+/*************************/
+
+/*******************/
+/* Cube dimensions */
+/*******************/
+
+
+static int count_dimensions(const hypercube *h, const char *axis)
+{
+	int dims  = -1;
+	if(h && h->r)
+		dims = count_values(h->r,axis);
+	return dims;
+}
+
+/**************************/
+/* End of cube dimensions */
+/**************************/
+
+/**************************/
+/* Auxiliary functions    */
+/**************************/
+
+
+static int count_hypercube(const request *r)
+{
+	int i = 0, count = 1;
+	for(i = 0 ; i< NUMBER(axis); ++i)
+	{
+		int c = count_values(r,axis[i].name);
+		count *= c?c:1;
+	}
+
+	return count;
+}
+
+int cube_order(const hypercube *h, const request *r)
+{
+	return _cube_position(h,r,true);
+}
+
+static int cube_position(const hypercube *h, const request *r)
+{
+	return _cube_position(h,r,false);
+}
+
+static void reserve_index_cache(hypercube *h, int size)
+{
+	if(size == 0)
+		return;
+
+	if(h->index_cache != 0)
+		FREE(h->index_cache);
+	marslog(LOG_DBUG,"Allocating hypercube index_cache: %d entries",size);
+	h->index_cache = NEW_ARRAY_CLEAR(int,size);
+	h->index_cache_size = size;
+}
+
+int _cube_position(const hypercube *h, const request *r,boolean remove_holes)
+{
+	request *cube = h->cube;
+	int     c     = count_axis(h);
+	int     index = 0;
+	int     i     = 0;
+	int     n     = 1;
+	int     ok    = 0;
+
+	if(h->index_cache == 0 || h->index_cache_size != c)
+		reserve_index_cache((hypercube*)h,c);
+
+	for(i=0; i<c;++i)
+	{
+		const char *axis = get_axis(h,i);
+		const char *v    = get_value(r,axis,0);
+		const char *w    = NULL;
+		int        dims  = count_dimensions(h,axis);
+		int        k     = 0;
+		int        count = count_values(cube,axis);
+		int        last  = h->index_cache[i];
+
+		for(k = 0; k < count; k++)	
+		{
+			int j = (k+last)%count;
+			w = get_value(cube,axis,j);
+			if(h->compare ? h->compare[i](w,v) : (w == v))
+			{
+				index += j*n;
+				n     *= dims;
+				ok++;
+				((hypercube*)h)->index_cache[i]  = j;
+				break;
+			}
+			else
+				marslog(LOG_DBUG,"_cube_position, %s, %s != %s [%scompare function available]",axis,w,v,h->compare ? "" : "no ");
+		}
+	}
+
+	if(remove_holes)
+	{
+		int holes = 0;
+		if(count_index(h) != h->size)
+			holes = count_holes(h,index);
+		index -= holes;
+	}
+
+	return (ok == c) ? index : -1;
+}
+
+static void explain_cube_position(const hypercube *h, const request *r)
+{
+	request *cube = h->cube;
+	int     c     = count_axis(h);
+	int     i = 0;
+
+	if(h->index_cache == 0 || h->index_cache_size != c)
+		reserve_index_cache((hypercube*)h,c);
+
+	for(i=0; i<c;++i)
+	{
+		const char *axis = get_axis(h,i);
+		const char *v    = get_value(r,axis,0);
+		const char *w    = NULL;
+		int        k     = 0;
+		int        count = count_values(cube,axis);
+		int        last  = h->index_cache[i];
+		int        ok    = 0;
+
+
+		for(k = 0; k < count; k++)
+		{
+			int j = (k+last)%count;
+			w = get_value(cube,axis,j);
+			if(h->compare ? h->compare[i](w,v) : (w == v))
+			{
+				ok++;
+				((hypercube*)h)->index_cache[i]  = j;
+				break;
+			}
+		}
+
+		if(!ok)
+			marslog(LOG_EROR,"Could not match %s (%s)",axis,v?v:"(null)");
+	}
+
+}
+
+boolean cube_contains(const hypercube *h, const request *r)
+{
+	request *cube = h->cube;
+	int     c     = count_axis(h);
+	int     i = 0;
+	int     j = 0;
+
+	if(h->index_cache == 0 || h->index_cache_size != c)
+		reserve_index_cache((hypercube*)h,c);
+
+	for(i=0; i<c;++i)
+	{
+		const char *axis = get_axis(h,i);
+
+		const char *w    = NULL;
+		int        k     = 0;
+		int        count = count_values(cube,axis);
+		int        last  = h->index_cache[i];
+
+		int        j     = 0;
+		const char *v    = get_value(r,axis,j++);
+		int        ok    = (v == NULL);
+
+		while(v && !ok)
+		{
+
+			for(k = 0; k < count && !ok; k++)
+			{
+				int j = (k+last)%count;
+				w = get_value(cube,axis,j);
+				/* printf("w: %s, axis: %s, j: %d\n",w,axis,j); */
+				if(h->compare ? h->compare[i](w,v) : (w == v))
+				{
+					ok++;
+					((hypercube*)h)->index_cache[i]  = j;
+					break;
+				}
+			}
+			v = get_value(r,axis,j++);
+		}
+
+		if(!ok)
+		{
+			marslog(LOG_DBUG,"cube_contais: Could not match %s (%s)",axis,v?v:"(null)");
+			return false;
+		}
+	}
+	return true;
+
+}
+void cube_indexes(const hypercube *h, request *r, int *indexes, int size)
+{
+	request *cube = h->cube;
+	int     c     = count_axis(h);
+	int     i     = 0;
+	int     index = 0;
+	int     n     = 1;
+	int     ok    = 0;
+
+	if(size < c)
+	{
+		marslog(LOG_WARN,"MARS internal error in cube_indexes. size=%d < axis=%d",size,c);
+	}
+
+	if(h->index_cache == 0 || h->index_cache_size != c)
+		reserve_index_cache((hypercube*)h,c);
+
+	for(i=0; i<c;++i)
+	{
+		const char *axis = get_axis(h,i);
+		const char *v    = get_value(r,axis,0);
+		const char *w    = NULL;
+		int        dims  = count_dimensions(h,axis);
+		int        j     = 0;
+		int        k     = 0;
+		int        count = count_values(cube,axis);
+		int        last  = h->index_cache[i];
+
+
+		for(k = 0; k < count; k++)
+		{
+			j = (k+last)%count;
+			w = get_value(cube,axis,j);
+			if(h->compare ? h->compare[i](w,v) : (w == v))
+			{
+				index += j*n;
+				n     *= dims;
+				ok++;
+				((hypercube*)h)->index_cache[i]  = j;
+				break;
+
+			}
+		}
+		indexes[i] = j;
+	}
+
+}
+
+/*********************************/
+/* End of Auxiliary functions    */
+/*********************************/
+
+
+hypercube *new_hypercube(const request *r)
+{
+	hypercube *h = NEW_CLEAR(hypercube);
+	int total = 0, count = 0;
+	int n = 0;
+	const char *val = 0;
+
+	h->r    = clone_one_request(r);
+	h->cube = empty_request("CUBE");
+
+	h->count = total = count_hypercube(r);
+	count = set_axis(h);
+
+	h->compare = 0;
+
+	if((total != count) || (count == 0))
+	{
+		marslog(LOG_EROR,"Internal error while computing hypercube fields");
+		marslog(LOG_EROR,"Number of fields in request %d",total);
+		marslog(LOG_EROR,"Number of fields in hypercube %d",count);
+	}
+	set_index(h,count-1,1);
+	memset(h->set,1,count);
+
+	/* This is expensive, but makes the iterator with only
+	   those parameters found as axis */
+	h->iterator = empty_request(0);
+	for(n = 0; n < NUMBER(axis); ++n)
+		if(val = get_value(h->r,axis[n].name,0))
+			set_value(h->iterator,axis[n].name,val);
+
+	return h;	
+}
+
+int add_field_to_hypercube(hypercube *h,request* r)
+{
+	return -1;
+}
+
+int remove_field_from_hypercube(hypercube *h,request* r,int n)
+{
+	parameter *p;
+	int o = cube_position(h,r);
+
+	if(o < 0)
+	{
+		marslog(LOG_EROR,"Field %d is unknown",n);
+		explain_cube_position(h,r);
+		print_one_request(r);
+		return HYPERCUBE_ERROR;
+	}
+
+	if(get_index(h,o) == 0)
+	{
+		marslog(LOG_EROR,"Field %d is duplicated or not described in request",n);
+		print_one_request(r);
+		return HYPERCUBE_ERROR;
+	}
+
+	p = r->params;
+	while(p)
+	{
+		if(*p->name != '_' && !count_values(h->cube,p->name))
+		{
+			if(axisindex(p->name) != -1)
+			{
+				marslog(LOG_EROR,"Field %d has %s = %s, but %s is not in request",n,p->name,get_value(r,p->name,0),p->name);
+				print_one_request(r);
+				return HYPERCUBE_ERROR;
+			}
+		}
+		p = p->next;
+	}
+
+	set_index(h,o,0);
+
+	return NOERR;
+
+}
+
+void remove_name_from_hypercube(hypercube *h,const char *ignore)
+{
+	unset_value(h->r,ignore);
+	unset_value(h->cube,ignore);
+	unset_param_value(h->cube,"AXIS",ignore);
+}
+
+void print_hypercube(const hypercube *h)
+{
+	print_all_requests(h->r);
+	print_all_requests(h->cube);
+	marslog(LOG_INFO,"%d active out of %d fields described\n",count_index(h),h->size);
+}
+
+void free_hypercube(hypercube *h)
+{
+	free_all_requests(h->r);
+	free_all_requests(h->cube);
+	free_all_requests(h->iterator);
+	FREE(h->index_cache);
+	FREE(h->compare);
+	FREE(h->set);
+	FREE(h);
+}
+
+request *_get_cubelet(hypercube *h, int index)
+{
+	int i = 0;
+	int c = count_axis(h);
+
+	for(i=0; i<c;++i)
+	{
+		const char *axis = get_axis(h,i);
+		int        dims  = count_dimensions(h,axis);
+		int        coord = index % dims;
+		const char *val  = get_value(h->r,axis,coord);
+
+		if(!val)
+		{
+			marslog(LOG_EROR,"MARS internal error handling field %d",index);
+			marslog(LOG_EROR,"No value for '%s'[%d] from request",axis,coord);
+			marslog(LOG_EROR,"Contact the MARS group");
+			marsexit(1);
+		}
+		set_value(h->iterator,axis,"%s",val);
+		index    /= dims;
+	}
+	return h->iterator; 
+}
+
+request *get_cubelet(hypercube *h, int index)
+{
+	int from = 0, last = 0;
+	int pos = pos_to_index(h,index, &from, &last);
+
+	return (pos>=0) ? _get_cubelet(h,pos) : NULL;
+}
+
+request *next_cubelet(hypercube *h, int *from, int *last)
+{
+	int pos = pos_to_index(h,*last, from, last);
+	return (pos>=0) ? _get_cubelet(h,pos) : NULL;
+}
+
+static void copy_cube(hypercube *a , const hypercube *b, int v)
+{
+	request *r = NULL;
+	int from = 0, last = 0;
+
+	while(r = next_cubelet((hypercube *)b,&from,&last))
+	{
+		int     new_index = cube_position(a,r);
+		set_index(a,new_index,v);
+	}
+}
+
+
+hypercube *merge_cube(const hypercube *a, const hypercube *b, int init, int va, int vb)
+{
+	hypercube *n = NULL;
+	request *r = clone_one_request(a->r);
+
+	reqmerge(r,b->r);
+
+	n = new_hypercube(r);
+	free_all_requests(r);
+
+	reset_index(n,init);
+
+	copy_cube(n,a,va);
+	copy_cube(n,b,vb);
+
+	return n;
+
+}
+
+struct stuff_1 {
+	hypercube *c;
+	request   *r;
+};
+
+static void reqcb_1(const request *r,int count,char *names[],
+		char *vals[],void *data)
+{
+	struct stuff_1 *s = (struct stuff_1*)data;
+	int i;
+
+	for(i=0;i<count;i++)
+		if(vals[i])
+			set_value(s->r,names[i],vals[i]);
+
+	set_index(s->c,cube_position(s->c,s->r),1);
+}
+
+hypercube *new_hypercube_from_mars_request(const request *r)
+{
+	int i;
+	int n;
+
+	struct stuff_1 s;
+
+#if 0
+	const request *lang = mars_language_from_request(r);
+	int count = 0;
+
+	count = init_axis(lang);
+	marslog(LOG_DBUG,"cube %s",r->kind);
+	/* print_all_requests(mars_language_from_request(r)); */
+	marslog(LOG_INFO,"NUMBER(axis): %d, number axisnew: %d",NUMBER(axis),count);
+#endif
+
+	s.c = new_hypercube(r);
+	s.r = clone_one_request(r);
+
+	reset_index(s.c,0);
+	names_loop(r,reqcb_1,&s);
+
+	free_one_request(s.r);
+
+	/* add single paramters */	
+
+	for(i = 0; i < NUMBER(axis) ; i++)
+	{
+		int m = count_values(r,axis[i].name);
+		if(m == 1)
+		{
+			add_value(s.c->cube,"AXIS",axis[i].name);
+			set_value(s.c->cube,axis[i].name,get_value(r,axis[i].name,0));
+		}
+	}
+
+	n =  count_values(s.c->cube,"AXIS");
+	if(n)
+		s.c->compare = NEW_ARRAY(namecmp,n);
+
+	for(i = 0; i < n; i++)
+		s.c->compare[i] = comparator(get_value(s.c->cube,"AXIS",i));
+
+	return s.c;
+}
+
+/* This one doesn't have single parameters in CUBE */
+hypercube *new_simple_hypercube_from_mars_request(const request *r)
+{
+	int i;
+	int n;
+
+	struct stuff_1 s;
+	s.c = new_hypercube(r);
+	s.r = clone_one_request(r);
+
+	reset_index(s.c,0);
+	names_loop(r,reqcb_1,&s);
+
+	free_one_request(s.r);
+	n =  count_values(s.c->cube,"AXIS");
+	if(n)
+		s.c->compare = NEW_ARRAY(namecmp,n);
+
+	for(i = 0; i < n; i++)
+		s.c->compare[i] = comparator(get_value(s.c->cube,"AXIS",i));
+
+	return s.c;
+}
+
+hypercube *new_hypercube_from_fieldset_cb(fieldset *fs, void (*callback)(request*,void*), void *data)
+{
+	int i;
+	request* r = empty_request(0);
+	hypercube *c;
+
+	if(!fs)
+		return 0;
+
+	for(i = 0; i < fs->count; i++)
+	{
+		request *s = field_to_request(fs->fields[i]);
+		reqmerge(r,s);
+	}
+
+	callback(r,data);
+
+	c = new_hypercube(r);
+	reset_index(c,0);
+	for(i = 0; i < fs->count; i++)
+	{
+		request *s = field_to_request(fs->fields[i]);
+		set_index(c,cube_position(c,s),1);
+	}
+
+	if(fs->count != count_index(c))
+	{
+		marslog(LOG_EROR,"Duplicate fields found in fieldset");
+		marslog(LOG_EROR,"Number of fields in fieldset %d",fs->count);
+		marslog(LOG_EROR,"Number of fields in hypercube %d",count_index(c));
+		free_hypercube(c);
+		return 0;
+	}
+
+	return c;
+}
+
+static void empty_callback(request *r, void *data) 
+{ 
+	/* Empty */
+}
+
+hypercube *new_hypercube_from_fieldset(fieldset *fs)
+{
+	return new_hypercube_from_fieldset_cb(fs,empty_callback,NULL);
+}
+
+
+hypercube *new_hypercube_from_file(const char* path)
+{
+	fieldset *fs = read_fieldset(path,0);
+	hypercube *c = new_hypercube_from_fieldset(fs);
+	free_fieldset(fs);
+
+	return c;
+}
+
+hypercube * add_cube(const hypercube *a, const hypercube *b)
+{
+	return merge_cube(a,b,0,1,1);
+}
+
+hypercube *remove_cube(const hypercube *a, const hypercube *b)
+{
+	return merge_cube(a,b,0,1,0);
+}
+
+int hypercube_field_count(const hypercube *a)
+{
+	return count_index(a);
+}
+
+int hypercube_cube_size(const hypercube *a)
+{
+	return count_hypercube(a->r);
+}
+
+int hypercube_compare(const hypercube *a, const hypercube *b)
+{
+	if(hypercube_field_count(a) != hypercube_field_count(b))
+	{
+		return 1;
+	}
+
+	if(cmp_index(a,b) != 0)
+	{
+		return 1;
+	}
+
+	return 0;
+}
+
+
diff --git a/src/libMars/hypercube.h b/src/libMars/hypercube.h
new file mode 100755
index 0000000..99fc11e
--- /dev/null
+++ b/src/libMars/hypercube.h
@@ -0,0 +1,29 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+typedef struct hypercube {
+	request *cube;
+	request *r;
+	request *iterator;
+	char    *set;
+	int     count;
+	int     size;
+	int     max;
+	int*    index_cache;
+	int     index_cache_size;
+	namecmp *compare;
+} hypercube;
+
+
+typedef struct axis_t {
+	const char *name;
+	namecmp    compare;
+} axis_t;
+
diff --git a/src/libMars/ibmblk.c b/src/libMars/ibmblk.c
new file mode 100755
index 0000000..48fba0c
--- /dev/null
+++ b/src/libMars/ibmblk.c
@@ -0,0 +1,384 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "ibmblk.h"
+
+#ifdef  CHECK_ALIGN
+#define COPY(a,b,c)   mycopy((char*)(a),(char*)(b),c)
+#else
+#define COPY(a,b,c)	  memcpy(a,b,c)
+#endif
+
+#define FILL_CHR(x,y) fill_chr(x, y, sizeof(x))
+#define FILL_INT(x,y) fill_int (x, y, sizeof(x))
+#define GET_CHR(x)    get_chr ((char*)&x,    sizeof(x))
+#define GET_INT(x)    get_int  ((char*)&x,    sizeof(x))
+
+static void mycopy(char *a,char *b,int c)
+{
+	while(c--) *a++ = *b++;
+}
+
+
+static char block[MAX_NET_BLOCK];
+
+static void upper_case(request *r,char *name)
+{
+	const char *s = get_value(r,name,0);
+	char *p,*q;
+
+	if(!s) return;
+
+	q = p = NEW_STRING(s);
+	while(*p) 
+	{ 
+		if(islower(*p)) 
+		*p = toupper(*p); 
+		p++;
+	}
+	set_value(r,name,q);
+	FREE(q);
+}
+
+static void fill_chr(char *p,const char *q,int n)
+{
+	char buf[256];
+	sprintf(buf,"%*s",-n,q);
+	COPY(p,buf,n);
+}
+
+static void fill_int(char *p,int m,int n)
+{
+	char buf[256];
+	sprintf(buf,"%0*d",n,m);
+	COPY(p,buf,n);
+}
+
+static char *get_chr(char *p,int n)
+{
+	static char buf[256];
+	COPY(buf,p,n);
+	buf[n] = 0;
+	return buf;
+}
+
+static int get_int(char *p,int n)
+{
+	return atoi(get_chr(p,n));
+}
+
+static int add_1_value(value *v,int offset,int shift)
+{
+	_bvalue   bvalue;
+	int       len = strlen(v->name + shift);
+	int		  off = offset + OFFSET(_bvalue,value) + len;
+
+	memset(&bvalue,'*',sizeof(bvalue));
+
+	strncpy(bvalue.value, v->name + shift,len);
+
+	FILL_INT(bvalue.vlen,  len);
+	FILL_INT(bvalue.ptype, 
+		*(v->name + shift) == '"' ? STR_TYPE :
+		(is_number(v->name + shift)?NUM_TYPE:CHR_TYPE)
+		);
+
+	COPY(block+offset,&bvalue,OFFSET(_bvalue,value)+len);
+
+	return off;
+}
+
+static int add_1_parameter(parameter *p,int offset)
+{
+	_bparam	  bparam;
+	value     *v  = p->default_values?p->default_values:p->values;
+	int       cnt = 0;
+	int       len = strlen(p->name);
+	int		  off = offset + OFFSET(_bparam,param) + len;
+
+	memset(&bparam,'*',sizeof(bparam));
+
+	strncpy(bparam.param, p->name,len);
+
+	FILL_INT(bparam.plen,  len);
+
+	while(v)
+	{
+		int shift = 0;
+		if(strcmp(p->name,"DATE") == 0 && strlen(v->name) == 8) shift = 2;
+
+		off = add_1_value(v,off,shift);
+		cnt++;
+		v = v->next;
+	}
+	
+
+	FILL_INT(bparam.nvalues,cnt);
+	COPY(block+offset,&bparam,OFFSET(_bparam,param)+len);
+	return off;
+}
+
+static int add_1_request(request *r,int offset)
+{
+	_subhdr   subhdr;
+	parameter *p  = r->params;
+	int       cnt = 0;
+	int		  off = offset + SUB_SIZE;
+
+
+	memset(&subhdr,'*',sizeof(subhdr));
+
+	FILL_INT(subhdr.shdrlen,OFFSET(_subhdr,nparms));
+	FILL_CHR(subhdr.action,r->name);
+	FILL_INT(subhdr.mode,1);
+	FILL_INT(subhdr.ccode,0);
+	FILL_INT(subhdr.escode,0);
+
+	while(p)
+	{
+		if(*(p->name) != '_' )
+		{
+			off = add_1_parameter(p,off);
+			cnt++;
+		}
+		p = p->next;
+	}
+	
+
+	FILL_INT(subhdr.nparms,cnt);
+	FILL_INT(subhdr.blklen,off-offset);
+	COPY(block+offset,&subhdr,SUB_SIZE);
+	return off;
+}
+
+
+char *buildblock(request *r,int actcls)
+{
+	_prmhdr prmhdr;
+	int       cnt = 0;
+	int		  off = PRM_SIZE;
+	char buf[10]; 
+	const char *s;
+	long t;
+	request *e = (request*)get_environ();
+
+	memset(block,0,sizeof(block));
+
+	memset(&prmhdr,'*',sizeof(prmhdr));
+
+	FILL_INT(prmhdr.hdrlen,PRM_SIZE);
+
+	s = getenv("ARCH");
+	s = s?s:"unk";
+	FILL_CHR(prmhdr.userid,s); 
+	FILL_CHR(prmhdr.compid,s); 
+
+	s = get_value(e,"user",0);
+	FILL_CHR(prmhdr.sendid,s?s:"???");
+
+
+	/* Expever should be uppercase */
+
+	upper_case(r,"EXPVER");
+	upper_case(r,"CFSPATH");
+	upper_case(r,"PASSWORD");
+
+
+	s = get_value(e,"account",0);
+	FILL_CHR(prmhdr.account,s?s:"ECFSUN");
+
+	gethostname(buf,sizeof(buf));
+	FILL_CHR(prmhdr.recid,buf);
+
+	if(s = getenv("QSUB_REQNAME"))
+	{
+		strncpy(buf,s,9);
+		buf[9] = 0;
+	}
+
+	FILL_CHR(prmhdr.userjob,buf);
+	FILL_INT(prmhdr.pswitch,mars.debug?8:0);
+	FILL_INT(prmhdr.hdrvers,2);
+
+	time(&t);
+	strftime(buf,10,"%y%m%d",gmtime(&t));
+	FILL_CHR(prmhdr.subdate,buf);
+	FILL_INT(prmhdr.recdate,getpid()); 
+
+	strftime(buf,10,"%H%M%S",gmtime(&t));
+	FILL_CHR(prmhdr.subtime,buf);
+	FILL_CHR(prmhdr.rectime,buf);
+	FILL_INT(prmhdr.nihdr,  0);
+	FILL_INT(prmhdr.actmod, 1);
+	FILL_INT(prmhdr.suberr, 0);
+	FILL_INT(prmhdr.status, 1);
+	FILL_INT(prmhdr.actcls, actcls);
+
+#ifdef ALL_REQS
+	while(r)
+	{
+		off = add_1_request(r,off);
+		cnt++;
+		r = r->next;
+	}
+#else
+
+	off = add_1_request(r,off);
+	cnt++;
+
+#endif
+
+
+	FILL_INT(prmhdr.noshdr, cnt);
+ 	FILL_INT(prmhdr.msglen, off);
+	COPY(block,&prmhdr,PRM_SIZE);
+
+	if(mars.debug)
+	{
+		request *u = procces_reply(block);
+		print_one_request(u);
+		free_all_requests(u);
+	}
+
+	return block;
+}
+
+static request *procces_subhdr(int *offset)
+{
+	_subhdr subhdr;
+	char    buf[256];
+	int n;
+	int i;
+	int off   = *offset;
+	request   *r1;
+	parameter *p1,*p2;
+	value     *v1,*v2;
+
+	COPY(&subhdr,block+(*offset),sizeof(subhdr));	
+
+	*offset += GET_INT(subhdr.shdrlen);
+
+	strcpy(buf,GET_CHR(subhdr.action));
+	i = strlen(buf);
+	while(i>=0 && (buf[i] == 0 || buf[i] == ' ')) buf[i--] = 0;
+
+	r1 = new_request(strcache(buf),NULL);
+
+	n = GET_INT(subhdr.nparms);
+
+	off += SUB_SIZE;
+
+	for(i=0;i<n;i++)
+	{
+		int len,j,cnt;
+		_bparam bparam;
+
+		COPY(&bparam,block+off,sizeof(bparam));
+
+		len = GET_INT(bparam.plen);
+		cnt = GET_INT(bparam.nvalues);
+
+		strncpy(buf,bparam.param,len); buf[len] = 0;
+
+		off += len + OFFSET(_bparam,param);
+
+
+		p2 = new_parameter(strcache(buf),NULL);
+		if(r1->params == NULL)
+			r1->params = p2;
+		else 
+			p1->next = p2;
+		p1 = p2;
+
+
+		for(j=0;j<cnt;j++)
+		{
+			_bvalue bvalue;
+			COPY(&bvalue,block+off,sizeof(bvalue));
+
+			len = GET_INT(bvalue.vlen);
+
+			strncpy(buf,bvalue.value,len); buf[len] = 0;
+
+			v2 = new_value(strcache(buf));
+			if(p2->values == NULL)
+				p2->values = v2;
+			else
+				v1->next = v2;
+			v1 = v2;
+
+			off += len + OFFSET(_bvalue,value);
+		}
+
+	}
+	return r1;
+
+}
+
+int actcls(char *block)
+{
+	_prmhdr prmhdr;
+	COPY(&prmhdr,block,sizeof(prmhdr));
+	return GET_INT(prmhdr.actcls);
+}
+
+void geterrors(char *block,int req,int *e1,int *e2,int *e3)
+{
+	_prmhdr prmhdr;
+	_subhdr subhdr;
+	int n,i;
+	int	off = PRM_SIZE;
+
+	COPY(&prmhdr,block,sizeof(prmhdr));
+
+	n   = GET_INT(prmhdr.noshdr);
+	*e1 = GET_INT(prmhdr.suberr);
+
+	for(i=0;i<n;i++)
+	{
+		COPY(&subhdr,block+off,sizeof(subhdr));	
+		*e2 = GET_INT(subhdr.ccode);
+		*e3 = GET_INT(subhdr.escode);
+		off += GET_INT(subhdr.shdrlen);
+		if(i == req) break;
+	}
+
+
+}
+
+request *procces_reply(char *block)
+{
+	_prmhdr prmhdr;
+	request *r1 = NULL;
+	request *r2 = NULL;
+	request *r3 = NULL;
+	int     off = PRM_SIZE;
+
+	int i;
+	int n;
+
+	COPY(&prmhdr,block,sizeof(prmhdr));
+
+	n = GET_INT(prmhdr.noshdr);
+
+	for(i=0;i<n;i++)
+	{
+
+		r3 = procces_subhdr(&off);
+
+		if(r1==NULL) r1 = r3; else  r2->next = r3;
+		r2 = r3;
+
+	}
+	return r1;
+
+}
+
diff --git a/src/libMars/ibmblk.h b/src/libMars/ibmblk.h
new file mode 100755
index 0000000..7c0ef09
--- /dev/null
+++ b/src/libMars/ibmblk.h
@@ -0,0 +1,95 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#define CHR_TYPE 1
+#define NUM_TYPE 2
+#define STR_TYPE 3
+
+#define CHECK_ALIGN
+
+#define MAX_NET_BLOCK	32768
+
+typedef struct {
+
+	char hdrlen[2];
+
+	char userid[4];
+	char compid[4];
+	char sendid[7];
+	char recid[7];
+
+	char subdate[6];
+	char subtime[6];
+
+	char recdate[6];
+	char rectime[6];
+
+	char nihdr[2];
+	char noshdr[2];
+
+	char suberr[2];
+	char status[1];
+
+	char actcls[1];
+	char msglen[5];
+
+	char actmod[1];
+	char account[8];
+	char userjob[7];
+	char pswitch[1];
+	char hdrvers[2];
+
+#ifdef CHECK_ALIGN
+	char __dummy[2];
+#endif
+
+} _prmhdr;
+
+
+typedef struct {
+
+	char shdrlen[2];
+	char action[8];
+	char mode[1];
+	char blklen[5];
+	char reser1[4];
+	char ccode[4];
+	char escode[4];
+	char reser2[2];
+	char nparms[3];
+
+#ifdef CHECK_ALIGN
+	char __dummy[2];
+#endif
+
+}_subhdr;
+
+typedef struct {
+	char nvalues[2];
+	char plen[2];
+	char param[256];
+} _bparam;
+
+typedef struct {
+	char ptype[1];
+	char vlen[2];
+	char value[256];
+} _bvalue;
+
+#ifdef CHECK_ALIGN 
+#define PRM_SIZE	OFFSET(_prmhdr,__dummy)
+#define SUB_SIZE	OFFSET(_subhdr,__dummy)
+#else
+#define PRM_SIZE	sizeof(_prmhdr)
+#define SUB_SIZE	sizeof(_subhdr)
+#endif
+
+request *procces_reply(char *block);
+char    *buildblock(request *cmds,int);
diff --git a/src/libMars/index.c b/src/libMars/index.c
new file mode 100644
index 0000000..57119f1
--- /dev/null
+++ b/src/libMars/index.c
@@ -0,0 +1,143 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include  "mars.h"
+
+void mars_grib_index_add(mars_grib_index* idx, const char* name, boolean s_ok, const char* s, boolean l_ok, long l, boolean d_ok, double d)
+{
+	mars_grib_map* m  = NEW_CLEAR(mars_grib_map);
+	m->name = strcache(name);
+	m->s_ok = s_ok;
+	m->s_value = strcache(s);
+	m->l_ok = l_ok;
+	m->l_value = l;
+	m->d_ok = d_ok;
+	m->d_value = d;
+
+	if(idx->head == NULL) 
+		idx->head = m;
+	else
+		idx->tail->next = m;
+
+	idx->tail = m;
+}
+
+mars_grib_index* mars_grib_index_new( file_offset offset, long length )
+{
+	mars_grib_index* idx = NEW_CLEAR( mars_grib_index );
+	idx->offset = offset;
+	idx->length = length;
+	return idx;
+}
+
+static void send_map( mstream* s, mars_grib_map* m )
+{
+	while( m )
+	{
+		stream_write_int(s,1);
+		stream_write_string(s, m->name);
+
+		stream_write_int(s,m->s_ok);
+		if(m->s_ok) stream_write_string(s, m->s_value);
+
+		stream_write_int(s,m->l_ok);
+		if(m->l_ok) stream_write_long(s, m->l_value);
+
+		stream_write_int(s,m->d_ok);
+		if(m->d_ok) stream_write_double(s, m->d_value);
+
+		m = m->next;
+	}
+	stream_write_int(s,0);
+}
+
+err mars_grib_index_send(mars_grib_index* idx, mstream* s)
+{
+	unsigned long count = 0;
+	mars_grib_index* p = idx;
+	while( p )
+	{	
+		count++;
+		p = p->next;
+	}
+	stream_write_ulong(s, count);
+
+	p = idx;
+	while( p )
+	{
+		stream_write_ulonglong(s,p->offset);	
+		stream_write_ulonglong(s,p->length);	
+
+		send_map(s, p->head);
+
+		p = p->next;
+	}
+	
+	if(s->error)
+	{
+		marslog(LOG_EROR,"Error occurred when sending GRIB index to server");
+	}
+
+	return s->error;
+}
+
+static void free_map( mars_grib_map* m )
+{
+	while( m )
+	{
+		mars_grib_map* next = m->next;
+		strfree(m->name);
+		strfree(m->s_value);
+		FREE( m );
+		m = next;
+	}
+}
+
+void mars_grib_index_free( mars_grib_index* idx )
+{
+	while( idx )
+	{
+		mars_grib_index* next = idx->next;
+		free_map( idx->head);
+		FREE( idx );
+		idx = next;
+	}
+}
+
+static void print_map( mars_grib_map* m )
+{
+	while( m )
+	{
+		mars_grib_map* next = m->next;
+		printf(" %s", m->name);
+		if(m->s_ok) printf(" s: %s",m->s_value);
+		if(m->l_ok) printf(" l: %ld",m->l_value);
+		if(m->d_ok) printf(" d: %g",m->d_value);
+		m = next;
+	}
+}
+
+void mars_grib_index_print( mars_grib_index* idx )
+{
+	while( idx )
+	{
+		mars_grib_index* next = idx->next;
+		
+		printf( "offset = %lld length = %lld", idx->offset, idx->length );
+		print_map( idx->head );
+		printf("\n");
+
+		idx = next;
+	}
+}
+
+
+
+
diff --git a/src/libMars/index.h b/src/libMars/index.h
new file mode 100644
index 0000000..0786276
--- /dev/null
+++ b/src/libMars/index.h
@@ -0,0 +1,38 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+typedef struct mars_grib_map {
+	struct mars_grib_map* next;
+
+	char* name;
+
+	boolean     s_ok;
+	char* s_value;
+
+	boolean  d_ok;
+	double   d_value;
+
+	boolean  l_ok;
+	long     l_value ;
+
+} mars_grib_map;
+
+typedef struct mars_grib_index {
+
+	struct mars_grib_index* next;
+
+	file_offset offset;
+	long    length;
+
+	mars_grib_map* head;
+	mars_grib_map* tail;
+
+
+} mars_grib_index;
diff --git a/src/libMars/json.c b/src/libMars/json.c
new file mode 100644
index 0000000..56a0f0c
--- /dev/null
+++ b/src/libMars/json.c
@@ -0,0 +1,769 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include "json.h"
+
+enum json_type {
+    json_type_null, json_type_true, json_type_false, json_type_integer, json_type_real,
+    json_type_string,  json_type_object, json_type_array
+} ;
+
+struct _json_value {
+    enum json_type type;
+
+    double real;
+    long long integer;
+
+    struct _json_value* object;
+    struct _json_value* array;
+    struct _json_value* next;
+    struct _json_value* value;
+
+    char *string;
+
+};
+
+
+typedef size_t (*fillproc)(char*, size_t, void*);
+
+typedef struct json_parser {
+    int error;
+    char buffer[10240];
+    int pos;
+    int len;
+    void* data;
+    fillproc fill;
+
+} json_parser;
+
+
+
+void json_free(json_value* v) {
+    if(v) {
+        if(v->string) free(v->string);
+        if(v->object) json_free(v->object);
+        if(v->array) json_free(v->array);
+        if(v->next) json_free(v->next);
+        if(v->value) json_free(v->value);
+        free(v);
+    }
+}
+
+const char* json_get_string(json_value* v)
+{
+    if(v != NULL && v->type == json_type_string)
+        return v->string;
+    return "";
+}
+
+long long json_get_integer(json_value* v)
+{
+    if(v != NULL && v->type == json_type_integer)
+        return v->integer;
+    return 0;
+}
+
+
+static void _json_print_string(const char *s, FILE* out)
+{
+    fputc('"',out);
+    while(*s)
+    {
+        switch(*s)
+        {
+        case '"': fprintf(out,"\\\""); break;
+        case '\n': fprintf(out,"\\n"); break;
+        case '\b': fprintf(out,"\\b"); break;
+        case '\f': fprintf(out,"\\f"); break;
+        case '\r': fprintf(out,"\\r"); break;
+        case '\t': fprintf(out,"\\t"); break;
+        case '\\': fprintf(out,"\\\\"); break;
+        default:
+            fputc(*s,out);
+            break;
+        }
+        s++;
+    }
+
+    fputc('\"', out);
+}
+
+const char* json_encode_string(const char *s, char* out)
+{
+    char *p = out;
+    *out++ = '"';
+    while(*s)
+    {
+        switch(*s)
+        {
+        case '"':  *out++ = '\\'; *out++ = '"'; break;
+        case '\n': *out++ = '\\'; *out++ = 'n'; break;
+        case '\b': *out++ = '\\'; *out++ = 'b'; break;
+        case '\f': *out++ = '\\'; *out++ = 'f'; break;
+        case '\r': *out++ = '\\'; *out++ = 'r'; break;
+        case '\t': *out++ = '\\'; *out++ = 't'; break;
+        case '\\': *out++ = '\\'; *out++ = '\\'; break;
+        default:
+            *out++ = *s;
+            break;
+        }
+        s++;
+    }
+
+    *out++ = '"';
+    *out++ = 0;
+    return p;
+
+}
+
+static void _json_print(const json_value* v, FILE* out, int depth) {
+    int i;
+    json_value *p;
+    if(v)
+        switch(v->type) {
+        case json_type_null:
+            fprintf(out,"null");
+            break;
+        case json_type_true:
+            fprintf(out,"true");
+            break;
+        case json_type_false:
+            fprintf(out,"false");
+            break;
+        case json_type_integer:
+            fprintf(out,"%lld",v->integer);
+            break;
+        case json_type_real:
+            fprintf(out,"%g",v->real);
+            break;
+        case json_type_string:
+            _json_print_string(v->string, out);
+            break;
+        case json_type_object:
+            for(i = 0; i < depth; i++) fprintf(out,"   ");
+            fprintf(out,"{");
+            fprintf(out,"\n");
+            p = v->object;
+            while(p) {
+                for(i = 0; i < depth+1; i++) fprintf(out,"   ");
+                _json_print(p, out, depth);
+                fprintf(out,": ");
+                _json_print(p->value, out, depth+1);
+                if(p->next)
+                {
+                    fprintf(out,", ");
+                    fprintf(out,"\n");
+                }
+                p = p->next;
+            }
+            fprintf(out,"\n");
+            for(i = 0; i < depth-1; i++) fprintf(out,"   ");
+            fprintf(out,"}");
+            fprintf(out,"\n");
+            break;
+
+        case  json_type_array:
+            /* for(i = 0; i < depth; i++) fprintf(out,"   "); */
+            fprintf(out,"[");
+            p = v->array;
+            if(p && p->next)
+            {
+
+                fprintf(out,"\n");
+                while(p) {
+                    for(i = 0; i < depth+1; i++) fprintf(out,"   ");
+                    _json_print(p, out, depth+2);
+                    if(p->next)
+                    {
+                        fprintf(out,", ");
+                    }
+                    fprintf(out,"\n");
+                    p = p->next;
+                }
+                /* fprintf(out,"\n"); */
+                for(i = 0; i < depth+1; i++) fprintf(out,"   ");
+            }
+            fprintf(out,"]");
+            /* fprintf(out,"\n"); */
+            break;
+        }
+}
+
+void json_print(const json_value* v) 
+{
+    _json_print(v,stdout,0);
+}
+
+void json_println(const json_value* v)
+{
+    _json_print(v,stdout,0);
+    printf("\n");
+}
+
+static char next(json_parser* p)
+{
+    char c;
+
+
+    if(p->pos == p->len) {
+        p->pos = 0;
+        p->len = p->fill(p->buffer, sizeof(p->buffer), p->data);
+    }
+
+    if(p->pos == p->len) {
+        printf("next: eof reached\n");
+        p->error++;
+        return 0;
+    }
+    c = p->buffer[p->pos];
+    while(isspace(c))
+    {
+        p->pos++;
+
+        if(p->pos == p->len) {
+            p->pos = 0;
+            p->len = p->fill(p->buffer, sizeof(p->buffer), p->data);
+        }
+
+        if(p->pos == p->len) {
+            printf("next: eof reached\n");
+            p->error++;
+            return 0;
+        }
+        c = p->buffer[p->pos];
+    }
+    p->pos++;
+    return c;
+}
+
+static char next_space(json_parser* p)
+{
+    char c;
+    if(p->pos == p->len) {
+        p->pos = 0;
+        p->len = p->fill(p->buffer, sizeof(p->buffer), p->data);
+    }
+    if(p->pos == p->len) {
+        printf("next_space: eof reached\n");
+        p->error++;
+        return 0;
+    }
+    c = p->buffer[p->pos];
+    p->pos++;
+    return c;
+}
+
+static char peek(json_parser* p)
+{
+    char c;
+    if(p->pos == p->len) {
+        p->pos = 0;
+        p->len = p->fill(p->buffer, sizeof(p->buffer), p->data);
+    }
+    if(p->pos == p->len) return 0;
+    c = p->buffer[p->pos];
+    while(isspace(c))
+    {
+        p->pos++;
+        if(p->pos == p->len) {
+            p->pos = 0;
+            p->len = p->fill(p->buffer, sizeof(p->buffer), p->data);
+        }
+        if(p->pos == p->len) return 0;
+        c = p->buffer[p->pos];
+    }
+    return c;
+}
+
+static int consume_char(json_parser* p, char s)
+{
+    char c = next(p);
+    if(c != s)
+    {
+        printf("consume_char: expect %c, got %c\n", s, c);
+        p->error = 1;
+        return 0;
+    }
+    return 1;
+}
+
+static int consume_str(json_parser* p, const char* s)
+{
+    while(*s) {
+        if(!consume_char(p,*s)) {
+            return 0;
+        }
+        s++;
+    }
+    return 1;
+}
+
+static json_value* parse_value(json_parser* p);
+
+static json_value* parse_true(json_parser* p)
+{
+    if(consume_str(p,"true")) {
+        json_value* j = calloc(1,sizeof(json_value));
+        j->type = json_type_true;
+        return j;
+    }
+    return NULL;
+}
+
+static json_value* parse_false(json_parser* p)
+{
+    if(consume_str(p,"false")) {
+        json_value* j = calloc(1,sizeof(json_value));
+        j->type = json_type_false;
+        return j;
+    }
+    return NULL;
+}
+
+static json_value* parse_null(json_parser* p)
+{
+    if(consume_str(p,"null")) {
+        json_value* j = calloc(1,sizeof(json_value));
+        j->type = json_type_null;
+        return j;
+    }
+    return NULL;
+}
+
+
+static json_value* parse_number(json_parser* p)
+{
+    json_value* j;
+    int real = 0;
+    char s[1024];
+    int i = 0;
+    char c = next(p);
+    if(c == '-') {
+        s[i++] = c;
+        c = next(p);
+    }
+
+    switch(c) {
+    case '0': s[i++] = c; break;
+    case '1':
+    case '2':
+    case '3':
+    case '4':
+    case '5':
+    case '6':
+    case '7':
+    case '8':
+    case '9':
+        s[i++] = c;
+        while(isdigit(peek(p))) {
+            s[i++] = next(p);
+        }
+        break;
+    default:
+        printf("parse_number: invalid char %c\n", c);
+        p->error++;
+        return NULL;
+        break;
+    }
+
+    if(peek(p) == '.') {
+        real = 0;
+        s[i++] = next(p);
+        c = next(p);
+        if(!isdigit(c))
+        {
+            printf("parse_number: invalid char %c\n", c);
+            p->error++;
+            return NULL;
+        }
+        s[i++] = c;
+        while(isdigit(peek(p))) {
+            s[i++] = next(p);
+        }
+    }
+
+
+    c = peek(p);
+    if(c == 'e' || c == 'E') {
+        real = 1;
+        s[i++] = next(p);
+
+        c = next(p);
+        if(c == '-' || c == '+')
+        {
+            s[i++] = c;
+            c = next(p);
+        }
+
+        if(!isdigit(c))
+        {
+            p->error++;
+            printf("parse_number: invalid char %c\n", c);
+            return NULL;
+        }
+        s[i++] = c;
+        while(isdigit(peek(p))) {
+            s[i++] = next(p);
+        }
+
+    }
+
+    s[i] = 0;
+    j = calloc(1,sizeof(json_value));
+
+    if(real) {
+        j->type = json_type_real;
+        j->real = atof(s);
+    }
+    else
+    {
+        j->type    = json_type_integer;
+        j->integer = atoll(s);
+    }
+    return j;
+}
+
+static json_value* parse_string(json_parser* p)
+{
+    consume_char(p,'"');
+    char s[10240];
+    int i = 0;
+    for(;;)
+    {
+        char c = next_space(p);
+        if(c == '\\')
+        {
+            c = next_space(p);
+            switch(c) {
+
+            case '"':
+                s[i++] = '"';
+                break;
+
+            case '\\':
+                s[i++] = '\\';
+                break;
+
+            case '/':
+                s[i++] = '/';
+                break;
+
+            case 'b':
+                s[i++] = '\b';
+                break;
+
+            case 'f':
+                s[i++] = '\f';
+                break;
+
+            case 'n':
+                s[i++] = '\n';
+                break;
+
+            case 'r':
+                s[i++] = '\r';
+                break;
+
+            case 't':
+                s[i++] = '\t';
+                break;
+
+            case 'u':
+                p->error++;
+                printf("parse_string: \\uXXXX format not supported\n");
+                return NULL;
+                break;
+
+            case 0:
+                p->error++;
+                printf("parse_string: missing closing quote\n");
+                return NULL;
+
+            default:
+                p->error++;
+                printf("parse_string: invalid \\ char %c\n",c);
+                return NULL;
+                break;
+            }
+        }
+        else
+        {
+            if(c == '"')
+            {
+                json_value* j = calloc(1,sizeof(json_value));
+                j->type = json_type_string;
+                s[i] = 0;
+                j->string = strdup(s);
+                return j;
+            }
+            if (c ==  0) {
+                p->error++;
+                printf("parse_string: missing closing quote\n");
+                return NULL;
+            }
+
+            s[i++] = c;
+        }
+
+    }
+
+}
+
+static json_value* parse_object(json_parser* p)
+{
+
+    json_value* last = 0;
+    json_value* j = calloc(1,sizeof(json_value));
+    j->type = json_type_object;
+
+    consume_char(p, '{');
+    char c = peek(p);
+    if(c == '}')
+    {
+        consume_char(p, c);
+        return j;
+    }
+
+    for(;;) {
+
+        json_value* k = parse_string(p);
+
+        if(!k) return j;
+
+        consume_char(p, ':');
+        k->value = parse_value(p);
+
+        if(j->object == NULL)
+            j->object = k;
+
+        if(last)
+            last->next = k;
+
+        last = k;
+
+        char c = peek(p);
+        if(c == '}')
+        {
+            consume_char(p, c);
+            return j;
+        }
+        consume_char(p, ',');
+    }
+}
+
+static json_value* parse_array(json_parser* p)
+{
+    json_value* last = 0;
+    json_value* j = calloc(1,sizeof(json_value));
+    j->type = json_type_array;
+
+    consume_char(p, '[');
+    char c = peek(p);
+    if(c == ']')
+    {
+        consume_char(p, c);
+        return j;
+    }
+
+    for(;;) {
+
+        json_value* v = parse_value(p);
+
+        if(j->array == NULL)
+            j->array = v;
+
+        if(last)
+            last->next = v;
+        last = v;
+
+        char c = peek(p);
+        if(c == ']')
+        {
+            consume_char(p, c);
+            return j;
+        }
+
+        consume_char(p, ',');
+
+    }
+}
+
+
+static json_value* parse_value(json_parser* p)
+{
+    char c = peek(p);
+    switch(c)
+    {
+
+    case 't': return parse_true(p); break;
+    case 'f': return parse_false(p); break;
+    case 'n': return parse_null(p); break;
+    case '{': return parse_object(p); break;
+    case '[': return parse_array(p); break;
+    case '\"': return parse_string(p); break;
+
+    case '-': return parse_number(p); break;
+    case '0': return parse_number(p); break;
+    case '1': return parse_number(p); break;
+    case '2': return parse_number(p); break;
+    case '3': return parse_number(p); break;
+    case '4': return parse_number(p); break;
+    case '5': return parse_number(p); break;
+    case '6': return parse_number(p); break;
+    case '7': return parse_number(p); break;
+    case '8': return parse_number(p); break;
+    case '9': return parse_number(p); break;
+
+    default:
+        p->error++;
+        printf("parse_value unexpected char %c %x\n",c, c);
+        return NULL;
+        break;
+    }
+}
+
+struct string_reader_data {
+    const char* buf;
+    size_t len;
+    size_t pos;
+};
+
+static size_t string_reader(char* buffer, size_t len, void *data)
+{
+    struct string_reader_data* p = (struct string_reader_data*) data;
+    size_t left = p->len - p->pos;
+    if(left < len) len = left;
+    memcpy(buffer,p->buf + p->pos, len);
+    p->pos += len;
+    return len;
+}
+
+json_value* json_parse_string(const char* str, size_t len)
+{
+    char c;
+    json_value* v;
+    json_parser p= {0,};
+    struct string_reader_data r= {0,};
+
+    if(!len) return NULL;
+
+    r.buf = str;
+    r.len = len;
+
+    p.fill = &string_reader;
+    p.data = &r;
+
+    v = parse_value(&p);
+    c = peek(&p);
+    if(c != 0)
+    {
+        printf("json_parse_string: extra char %c",c);
+        p.error++;
+    }
+
+    if(p.error)
+    {
+        json_free(v);
+        v = NULL;
+    }
+
+    return v;
+
+}
+
+void json_array_each(json_value* a, void (*proc)(int, json_value*, void*), void* data)
+{
+    if(a != NULL && a->type == json_type_array)
+    {
+        json_value *e = a->array;
+        int i = 0;
+        while(e) {
+            proc(i++, e, data);
+            e = e->next;
+        }
+    }
+}
+
+void json_object_each(json_value* a, void (*proc)(const char*, json_value*, void*), void* data)
+{
+    if(a != NULL && a->type == json_type_object)
+    {
+        json_value *e = a->object;
+        while(e) {
+            proc(e->string, e->value, data);
+            e = e->next;
+        }
+    }
+}
+
+json_value* json_object_find(json_value* a, const char* key)
+{
+    if(a != NULL && a->type == json_type_object)
+    {
+        json_value *e = a->object;
+        while(e) {
+            if(strcmp(e->string, key) == 0)
+                return e->value;
+            e = e->next;
+        }
+    }
+    return NULL;
+}
+
+struct file_reader_data {
+    FILE *file;
+};
+
+static size_t file_reader(char* buffer, size_t len, void *data)
+{
+    struct file_reader_data* p = (struct file_reader_data*) data;
+    int size = fread(buffer,1,len,p->file);
+    return size;
+}
+
+json_value* json_read_file(const char* path)
+{
+    char c;
+    json_value* v;
+    json_parser p = {0,};
+    struct file_reader_data r= {0,};
+
+    r.file = fopen(path, "r");
+    if(!r.file) {
+        perror(path);
+        return NULL;
+    }
+
+    p.fill = &file_reader;
+    p.data = &r;
+
+    v = parse_value(&p);
+    c = peek(&p);
+    if(c != 0)
+    {
+        printf("json_parse_string: extra char %c",c);
+        p.error++;
+    }
+
+    fclose(r.file);
+
+    if(p.error)
+    {
+        json_free(v);
+        v = NULL;
+    }
+
+    return v;
+
+}
+
diff --git a/src/libMars/json.h b/src/libMars/json.h
new file mode 100644
index 0000000..7a640c1
--- /dev/null
+++ b/src/libMars/json.h
@@ -0,0 +1,35 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+#ifndef json_H
+#define json_H
+
+typedef struct _json_value json_value;
+
+
+void json_free (json_value *v);
+const char *json_get_string (json_value *v);
+long long json_get_integer (json_value *v);
+void json_print (const json_value *v);
+void json_println(const json_value *v);
+
+void json_write (const json_value *v, FILE* out);
+
+json_value *json_parse_string (const char *str, size_t len);
+json_value *json_read_file (const char *path);
+
+
+void json_array_each (json_value *a, void (*proc )(int, json_value *, void *), void *data);
+void json_object_each (json_value *a, void (*proc )(const char *, json_value *, void *), void *data);
+json_value *json_object_find (json_value *a, const char *key);
+
+const char* json_encode_string(const char *s, char* out);
+
+
+#endif
diff --git a/src/libMars/lang.h b/src/libMars/lang.h
new file mode 100755
index 0000000..2f079ec
--- /dev/null
+++ b/src/libMars/lang.h
@@ -0,0 +1,67 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#ifndef _H_LANG_
+#define _H_LANG_
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+request   *expand(request *);
+
+
+request   *new_request(char *,parameter *);
+parameter *new_parameter(char *,value *);
+value     *new_value(char *);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+typedef enum { t_val, t_or, t_and, t_not, t_eq,t_lt,t_gt,t_ne,t_ge,t_le,t_in, t_func} testop;
+
+typedef struct condition {
+	testop           op;
+	struct condition *left;
+	struct condition *right;
+}condition;
+
+typedef enum {a_set,a_unset,a_warning,a_error,a_exit,a_fail,a_info,a_mail, a_mailuser} actop;
+
+typedef struct action {
+	struct action *next;
+	actop         op;
+	void          *param;
+} action;
+
+
+typedef struct rule {
+	struct rule  *next;
+	condition    *test;
+	action       *doit;
+} rule;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+rule      *new_rule(condition*,action*);
+condition *new_condition(testop,condition*,condition*);
+action    *new_action(actop,void*);
+
+rule      *read_chk(char*);
+boolean   chkrequest(rule*,request *);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif
diff --git a/src/libMars/langl.c b/src/libMars/langl.c
new file mode 100644
index 0000000..860ee65
--- /dev/null
+++ b/src/libMars/langl.c
@@ -0,0 +1,2274 @@
+
+#line 3 "lex.yy_mars.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 33
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yy_marsconst const
+#else
+#define yy_marsconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_mars_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_mars_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yy_marsrestart(yy_marsin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_mars_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_mars_buffer_state *YY_BUFFER_STATE;
+#endif
+
+extern int yy_marsleng;
+
+extern FILE *yy_marsin, *yy_marsout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    /* Note: We specifically omit the test for yy_mars_rule_can_match_eol because it requires
+     *       access to the local variable yy_mars_act. Since yy_marsless() is a macro, it would break
+     *       existing scanners that call yy_marsless() from OUTSIDE yy_marslex. 
+     *       One obvious solution it to make yy_mars_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-yy_marslineno scanner, because yy_mars_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int yy_marsl;\
+                for ( yy_marsl = n; yy_marsl < yy_marsleng; ++yy_marsl )\
+                    if ( yy_marstext[yy_marsl] == '\n' )\
+                        --yy_marslineno;\
+            }while(0)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yy_marsless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yy_marstext. */ \
+        int yy_marsless_macro_arg = (n); \
+        YY_LESS_LINENO(yy_marsless_macro_arg);\
+		*yy_mars_cp = (yy_mars_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(yy_mars_c_buf_p) = yy_mars_cp = yy_mars_bp + yy_marsless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yy_marstext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yy_marsunput( c, (yy_marstext_ptr)  )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef unsigned int yy_mars_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_mars_buffer_state
+	{
+	FILE *yy_mars_input_file;
+
+	char *yy_mars_ch_buf;		/* input buffer */
+	char *yy_mars_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_mars_size_t yy_mars_buf_size;
+
+	/* Number of characters read into yy_mars_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_mars_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_mars_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_mars_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_mars_at_bol;
+
+    int yy_mars_bs_lineno; /**< The line count. */
+    int yy_mars_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_mars_fill_buffer;
+
+	int yy_mars_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yy_marsrestart()), so that the user can continue scanning by
+	 * just pointing yy_marsin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_mars_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_mars_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_mars_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_mars_buffer_stack) \
+                          ? (yy_mars_buffer_stack)[(yy_mars_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_mars_buffer_stack)[(yy_mars_buffer_stack_top)]
+
+/* yy_mars_hold_char holds the character lost when yy_marstext is formed. */
+static char yy_mars_hold_char;
+static int yy_mars_n_chars;		/* number of characters read into yy_mars_ch_buf */
+int yy_marsleng;
+
+/* Points to current character in buffer. */
+static char *yy_mars_c_buf_p = (char *) 0;
+static int yy_mars_init = 0;		/* whether we need to initialize */
+static int yy_mars_start = 0;	/* start state number */
+
+/* Flag which is used to allow yy_marswrap()'s to do buffer switches
+ * instead of setting up a fresh yy_marsin.  A bit of a hack ...
+ */
+static int yy_mars_did_buffer_switch_on_eof;
+
+void yy_marsrestart (FILE *input_file  );
+void yy_mars_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE yy_mars_create_buffer (FILE *file,int size  );
+void yy_mars_delete_buffer (YY_BUFFER_STATE b  );
+void yy_mars_flush_buffer (YY_BUFFER_STATE b  );
+void yy_marspush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void yy_marspop_buffer_state (void );
+
+static void yy_marsensure_buffer_stack (void );
+static void yy_mars_load_buffer_state (void );
+static void yy_mars_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER yy_mars_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_mars_scan_buffer (char *base,yy_mars_size_t size  );
+YY_BUFFER_STATE yy_mars_scan_string (yy_marsconst char *yy_mars_str  );
+YY_BUFFER_STATE yy_mars_scan_bytes (yy_marsconst char *bytes,int len  );
+
+void *yy_marsalloc (yy_mars_size_t  );
+void *yy_marsrealloc (void *,yy_mars_size_t  );
+void yy_marsfree (void *  );
+
+#define yy_mars_new_buffer yy_mars_create_buffer
+
+#define yy_mars_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        yy_marsensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_mars_create_buffer(yy_marsin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_mars_is_interactive = is_interactive; \
+	}
+
+#define yy_mars_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        yy_marsensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_mars_create_buffer(yy_marsin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_mars_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_mars_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *yy_marsin = (FILE *) 0, *yy_marsout = (FILE *) 0;
+
+typedef int yy_mars_state_type;
+
+#define YY_FLEX_LEX_COMPAT
+extern int yy_marslineno;
+
+int yy_marslineno = 1;
+
+extern char yy_marstext[];
+
+static yy_mars_state_type yy_mars_get_previous_state (void );
+static yy_mars_state_type yy_mars_try_NUL_trans (yy_mars_state_type current_state  );
+static int yy_mars_get_next_buffer (void );
+static void yy_mars_fatal_error (yy_marsconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yy_marstext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(yy_marstext_ptr) = yy_mars_bp; \
+	yy_marsleng = (size_t) (yy_mars_cp - yy_mars_bp); \
+	(yy_mars_hold_char) = *yy_mars_cp; \
+	*yy_mars_cp = '\0'; \
+	if ( yy_marsleng + (yy_mars_more_offset) >= YYLMAX ) \
+		YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
+	yy_mars_flex_strncpy( &yy_marstext[(yy_mars_more_offset)], (yy_marstext_ptr), yy_marsleng + 1 ); \
+	yy_marsleng += (yy_mars_more_offset); \
+	(yy_mars_prev_more_offset) = (yy_mars_more_offset); \
+	(yy_mars_more_offset) = 0; \
+	(yy_mars_c_buf_p) = yy_mars_cp;
+
+#define YY_NUM_RULES 25
+#define YY_END_OF_BUFFER 26
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_mars_trans_info
+	{
+	flex_int32_t yy_mars_verify;
+	flex_int32_t yy_mars_nxt;
+	};
+static yy_marsconst flex_int16_t yy_mars_acclist[76] =
+    {   0,
+       26,   24,   25,   22,   24,   25,   22,   25,    2,   24,
+       25,    3,   24,   25,    2,   24,   25,   24,   25,   24,
+       25,   20,   21,   24,   25,   20,   24,   25,    1,   24,
+       25,   22,   23,   21,   20,   20,   21,   20,   21,   20,
+       21,   20,   20,   21,   20,    5,   10,    9,   21,   21,
+       21,   21,   20,   21,   20,   21,   20,   21,   20,   21,
+        7,    8,   11,   21,   21,   18,   19,   14,   15,    6,
+       17,   12,    4,   13,   16
+    } ;
+
+static yy_marsconst flex_int16_t yy_mars_accept[95] =
+    {   0,
+        1,    1,    1,    2,    4,    7,    9,   12,   15,   18,
+       20,   22,   26,   29,   32,   33,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   35,
+       36,   38,   40,   42,   43,   45,   46,   46,   46,   46,
+       46,   47,   48,   48,   48,   49,   49,   49,   49,   49,
+       50,   51,   52,   53,   55,   57,   59,   61,   62,   62,
+       62,   62,   62,   62,   62,   63,   64,   64,   64,   64,
+       65,   66,   66,   67,   68,   68,   69,   70,   71,   71,
+       71,   72,   72,   72,   73,   73,   73,   73,   73,   74,
+       74,   75,   76,   76
+
+    } ;
+
+static yy_marsconst flex_int32_t yy_mars_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    4,    5,    6,    1,    7,    1,    8,    1,
+        1,    9,   10,    1,   11,   12,    1,   13,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,   14,    1,    1,
+        1,    1,    1,    1,   15,   15,   15,   15,   16,   15,
+       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
+       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
+        1,    1,    1,    1,   15,    1,   17,   15,   18,   19,
+
+       20,   21,   22,   23,   24,   15,   15,   25,   26,   27,
+       28,   15,   15,   29,   30,   31,   32,   15,   33,   34,
+       15,   15,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yy_marsconst flex_int32_t yy_mars_meta[35] =
+    {   0,
+        1,    2,    1,    1,    1,    1,    1,    1,    1,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2
+    } ;
+
+static yy_marsconst flex_int16_t yy_mars_base[96] =
+    {   0,
+        0,  172,  180,  182,   33,   35,  175,  182,  182,   22,
+       45,   57,   64,  182,   38,  182,  151,   31,  160,   24,
+      159,  147,  145,  153,  149,  144,  153,   50,   69,   70,
+       81,   94,  113,   88,   74,   95,  150,  139,  143,  142,
+      182,   26,  141,  133,  182,  132,  142,  131,  131,  106,
+      146,    0,  121,   99,    0,  108,  132,  182,  130,  126,
+      131,  130,  126,  128,  182,  182,  124,  130,  122,  134,
+      133,  111,  182,  182,  107,  182,  106,  182,  105,  111,
+      182,  111,   98,  182,   95,   98,   91,   81,  182,   64,
+      182,  182,  182,   86,   62
+
+    } ;
+
+static yy_marsconst flex_int16_t yy_mars_def[96] =
+    {   0,
+       93,    1,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   94,   94,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   95,
+       95,   95,   94,   94,   33,   95,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       29,   29,   93,   95,   32,   32,   33,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       29,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,    0,   93,   93
+
+    } ;
+
+static yy_marsconst flex_int16_t yy_mars_nxt[217] =
+    {   0,
+        4,    5,    6,    7,    8,    9,   10,    8,    4,    4,
+       11,   11,   12,    4,   13,   13,   13,   13,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
+       13,   13,   13,   13,   15,   15,   15,   15,   17,   15,
+       15,   18,   19,   62,   41,   20,   63,   21,   22,   23,
+       42,   24,   25,   26,   27,   28,   28,   29,   30,   38,
+       28,   28,   29,   36,   39,   30,   31,   31,   32,   33,
+       30,   30,   35,   36,   36,   36,   35,   30,   50,   50,
+       51,   52,   30,   30,   53,   36,   57,   34,   53,   30,
+       31,   31,   92,   54,   30,   30,   30,   36,   36,   36,
+
+       30,   30,   91,   31,   31,   32,   55,   30,   30,   56,
+       90,   54,   30,   56,   30,   50,   50,   89,   70,   36,
+       54,   88,   31,   31,   32,   33,   30,   87,   35,   86,
+       50,   50,   35,   70,   85,   84,   53,   83,   82,   81,
+       53,   36,   36,   36,   57,   71,   70,   34,   80,   79,
+       78,   34,   77,   76,   75,   74,   73,   72,   71,   69,
+       68,   67,   66,   65,   64,   61,   60,   59,   58,   49,
+       48,   47,   46,   45,   44,   43,   40,   37,   16,   93,
+       14,    3,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93
+    } ;
+
+static yy_marsconst flex_int16_t yy_mars_chk[217] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    5,    5,    6,    6,   10,   15,
+       15,   10,   10,   42,   20,   10,   42,   10,   10,   10,
+       20,   10,   10,   10,   10,   11,   11,   11,   12,   18,
+       28,   28,   28,   95,   18,   13,   12,   12,   12,   12,
+       12,   30,   12,   13,   13,   13,   12,   13,   29,   29,
+       29,   29,   31,   30,   29,   35,   35,   94,   29,   34,
+       31,   31,   90,   31,   31,   32,   36,   34,   34,   34,
+
+       54,   34,   88,   32,   32,   32,   32,   32,   36,   32,
+       87,   54,   54,   32,   33,   50,   50,   86,   50,   56,
+       56,   85,   33,   33,   33,   33,   33,   83,   33,   82,
+       53,   53,   33,   53,   80,   79,   53,   77,   75,   72,
+       53,   57,   57,   57,   57,   71,   70,   57,   69,   68,
+       67,   57,   64,   63,   62,   61,   60,   59,   51,   49,
+       48,   47,   46,   44,   43,   40,   39,   38,   37,   27,
+       26,   25,   24,   23,   22,   21,   19,   17,    7,    3,
+        2,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93
+    } ;
+
+/* Table of booleans, true if rule could match eol. */
+static yy_marsconst flex_int32_t yy_mars_rule_can_match_eol[26] =
+    {   0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 1, 0, 0, 0,     };
+
+extern int yy_mars_flex_debug;
+int yy_mars_flex_debug = 0;
+
+static yy_mars_state_type *yy_mars_state_buf=0, *yy_mars_state_ptr=0;
+static char *yy_mars_full_match;
+static int yy_mars_lp;
+#define REJECT \
+{ \
+*yy_mars_cp = (yy_mars_hold_char); /* undo effects of setting up yy_marstext */ \
+yy_mars_cp = (yy_mars_full_match); /* restore poss. backed-over text */ \
+++(yy_mars_lp); \
+goto find_rule; \
+}
+
+static int yy_mars_more_offset = 0;
+static int yy_mars_prev_more_offset = 0;
+#define yy_marsmore() ((yy_mars_more_offset) = yy_mars_flex_strlen( yy_marstext ))
+#define YY_NEED_STRLEN
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET \
+	{ \
+	(yy_mars_more_offset) = (yy_mars_prev_more_offset); \
+	yy_marsleng -= (yy_mars_more_offset); \
+	}
+#ifndef YYLMAX
+#define YYLMAX 8192
+#endif
+
+char yy_marstext[YYLMAX];
+char *yy_marstext_ptr;
+#line 1 "langl.l"
+#line 2 "langl.l"
+
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+
+#undef YYLMAX
+#define YYLMAX 1024
+
+#include <setjmp.h>
+#include <stdarg.h>
+static jmp_buf env;
+#define exit(a)    jumpexit(a)
+#define fprintf    jumpprtf
+
+static void include(const char*);
+/* void yy_marserror(char*); */
+
+#define STRIP_SPACES
+static char *clean(char *);
+
+#ifndef METVIEW
+#define SHOW_INPUT
+#endif
+
+
+#ifdef FLEX_SCANNER
+#define YY_INPUT(buf,result,max_size) \
+               { \
+               int c = getc(yy_marsin); \
+               result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
+               }
+#endif
+
+
+
+#ifdef SHOW_INPUT
+/* These two routines are very inneficient .. */
+
+#define MAXLINE 256
+static int  echomode;
+static char line[MAXLINE];
+static int  charpos = 0;
+
+static void showc(char);
+#ifdef hpux
+static void shows(unsigned char*);
+#else
+static void shows(char*);
+#endif
+
+
+#else
+
+#define showc(x) 
+#define shows(x)
+#define syntax_echo(x)
+
+#endif
+
+
+static void jumpexit(int n)
+{
+	longjmp(env,1);
+}
+
+static void jumpprtf(FILE *f,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	int len;
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	len = strlen(buf);
+	if(len && buf[len-1] == '\n')
+		buf[len-1] = 0;
+
+	marslog(LOG_EROR,"Parser error: %s",buf);
+}
+
+
+#line 675 "lex.yy_mars.c"
+
+#define INITIAL 0
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_mars_init_globals (void );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yy_marswrap (void );
+#else
+extern int yy_marswrap (void );
+#endif
+#endif
+
+    static void yy_marsunput (int c,char *buf_ptr  );
+    
+#ifndef yy_marstext_ptr
+static void yy_mars_flex_strncpy (char *,yy_marsconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_mars_flex_strlen (yy_marsconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yy_marsinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yy_marstext, yy_marsleng, 1, yy_marsout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_mars_is_interactive ) \
+		{ \
+		int c = '*'; \
+		size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yy_marsin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yy_marsin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, yy_marsin))==0 && ferror(yy_marsin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(yy_marsin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yy_marsterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yy_marsterminate
+#define yy_marsterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_mars_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yy_marslex (void);
+
+#define YY_DECL int yy_marslex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yy_marstext and yy_marsleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	if ( yy_marsleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_at_bol = \
+				(yy_marstext[yy_marsleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_mars_state_type yy_mars_current_state;
+	register char *yy_mars_cp, *yy_mars_bp;
+	register int yy_mars_act;
+    
+#line 96 "langl.l"
+
+
+
+#line 835 "lex.yy_mars.c"
+
+	if ( !(yy_mars_init) )
+		{
+		(yy_mars_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! (yy_mars_state_buf) )
+            (yy_mars_state_buf) = (yy_mars_state_type *)yy_marsalloc(YY_STATE_BUF_SIZE  );
+
+		if ( ! (yy_mars_start) )
+			(yy_mars_start) = 1;	/* first start state */
+
+		if ( ! yy_marsin )
+			yy_marsin = stdin;
+
+		if ( ! yy_marsout )
+			yy_marsout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			yy_marsensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				yy_mars_create_buffer(yy_marsin,YY_BUF_SIZE );
+		}
+
+		yy_mars_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_mars_cp = (yy_mars_c_buf_p);
+
+		/* Support of yy_marstext. */
+		*yy_mars_cp = (yy_mars_hold_char);
+
+		/* yy_mars_bp points to the position in yy_mars_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_mars_bp = yy_mars_cp;
+
+		yy_mars_current_state = (yy_mars_start);
+		yy_mars_current_state += YY_AT_BOL();
+
+		(yy_mars_state_ptr) = (yy_mars_state_buf);
+		*(yy_mars_state_ptr)++ = yy_mars_current_state;
+
+yy_mars_match:
+		do
+			{
+			register YY_CHAR yy_mars_c = yy_mars_ec[YY_SC_TO_UI(*yy_mars_cp)];
+			while ( yy_mars_chk[yy_mars_base[yy_mars_current_state] + yy_mars_c] != yy_mars_current_state )
+				{
+				yy_mars_current_state = (int) yy_mars_def[yy_mars_current_state];
+				if ( yy_mars_current_state >= 94 )
+					yy_mars_c = yy_mars_meta[(unsigned int) yy_mars_c];
+				}
+			yy_mars_current_state = yy_mars_nxt[yy_mars_base[yy_mars_current_state] + (unsigned int) yy_mars_c];
+			*(yy_mars_state_ptr)++ = yy_mars_current_state;
+			++yy_mars_cp;
+			}
+		while ( yy_mars_base[yy_mars_current_state] != 182 );
+
+yy_mars_find_action:
+		yy_mars_current_state = *--(yy_mars_state_ptr);
+		(yy_mars_lp) = yy_mars_accept[yy_mars_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( (yy_mars_lp) && (yy_mars_lp) < yy_mars_accept[yy_mars_current_state + 1] )
+				{
+				yy_mars_act = yy_mars_acclist[(yy_mars_lp)];
+					{
+					(yy_mars_full_match) = yy_mars_cp;
+					break;
+					}
+				}
+			--yy_mars_cp;
+			yy_mars_current_state = *--(yy_mars_state_ptr);
+			(yy_mars_lp) = yy_mars_accept[yy_mars_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+		if ( yy_mars_act != YY_END_OF_BUFFER && yy_mars_rule_can_match_eol[yy_mars_act] )
+			{
+			int yy_marsl;
+			for ( yy_marsl = (yy_mars_prev_more_offset); yy_marsl < yy_marsleng; ++yy_marsl )
+				if ( yy_marstext[yy_marsl] == '\n' )
+					   
+    yy_marslineno++;
+;
+			}
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( yy_mars_act )
+	{ /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+#line 99 "langl.l"
+{ int c; 
+			 shows(yy_marstext);
+			 while((c = input()) && (c != '\n')) showc(c); showc(c);
+			 if(c == '\n') unput(c);
+		    }
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 105 "langl.l"
+{ int c; shows(yy_marstext);while((c = input()) && (c != '\n')) showc(c); showc(c);}
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 108 "langl.l"
+{ 
+				   int c,q = yy_marstext[0]; 
+
+				   if(q == '\'') yy_marsleng = 0;
+
+				   while((c = input()) && c != q && c != '\n') 
+				   {
+					   if(c == '\\') yy_marstext[yy_marsleng++] = input();
+					   else yy_marstext[yy_marsleng++] =  c;
+				   }
+
+				   if(c == '"') 
+					yy_marstext[yy_marsleng++] = c;
+
+				   yy_marstext[yy_marsleng++] = 0;
+				   shows(yy_marstext);
+				   yy_marslval.str = strcache(yy_marstext); 
+				   return WORD;
+				 }
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 128 "langl.l"
+{ 
+					char word[1024];
+					int  i = 0;
+					int c;
+					while((c = input()) && isspace(c) && c != '\n') ;
+					while(c && !isspace(c) && c != '\n') 
+					{
+						word[i++] = c;
+						c = input();
+					}
+					word[i] = 0;
+					include(no_quotes(word));
+				 }
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 142 "langl.l"
+{ shows(yy_marstext); return IF; }
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 143 "langl.l"
+{ shows(yy_marstext); return THEN; }
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 144 "langl.l"
+{ shows(yy_marstext); return AND; }
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 145 "langl.l"
+{ shows(yy_marstext); return NOT; }
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 146 "langl.l"
+{ shows(yy_marstext); return OR; }
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 147 "langl.l"
+{ shows(yy_marstext); return IN; }
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 148 "langl.l"
+{ shows(yy_marstext); return SET; }
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 149 "langl.l"
+{ shows(yy_marstext); return UNSET; }
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 150 "langl.l"
+{ shows(yy_marstext); return WARNING; }
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 151 "langl.l"
+{ shows(yy_marstext); return INFO; }
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 152 "langl.l"
+{ shows(yy_marstext); return MAIL; }
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 153 "langl.l"
+{ shows(yy_marstext); return MAILUSER; }
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 154 "langl.l"
+{ shows(yy_marstext); return ERROR; }
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 155 "langl.l"
+{ shows(yy_marstext); return EXIT; }
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 156 "langl.l"
+{ shows(yy_marstext); return FAIL; }
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 158 "langl.l"
+{ shows(yy_marstext); yy_marslval.str = clean(yy_marstext); return WORD; }
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 159 "langl.l"
+{ shows(yy_marstext); yy_marslval.str = clean(yy_marstext); return WORD; }
+	YY_BREAK
+case 22:
+/* rule 22 can match eol */
+YY_RULE_SETUP
+#line 160 "langl.l"
+{ shows(yy_marstext); }
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 161 "langl.l"
+{ shows(yy_marstext); } 
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 162 "langl.l"
+{ showc(*yy_marstext); return *yy_marstext; }
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 163 "langl.l"
+ECHO;
+	YY_BREAK
+#line 1096 "lex.yy_mars.c"
+			case YY_STATE_EOF(INITIAL):
+				yy_marsterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_mars_amount_of_matched_text = (int) (yy_mars_cp - (yy_marstext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_mars_cp = (yy_mars_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_mars_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yy_marsin at a new source and called
+			 * yy_marslex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(yy_mars_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_mars_input_file = yy_marsin;
+			YY_CURRENT_BUFFER_LVALUE->yy_mars_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_mars_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_mars_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (yy_mars_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[(yy_mars_n_chars)] )
+			{ /* This was really a NUL. */
+			yy_mars_state_type yy_mars_next_state;
+
+			(yy_mars_c_buf_p) = (yy_marstext_ptr) + yy_mars_amount_of_matched_text;
+
+			yy_mars_current_state = yy_mars_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_mars_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_mars_next_state = yy_mars_try_NUL_trans( yy_mars_current_state );
+
+			yy_mars_bp = (yy_marstext_ptr) + YY_MORE_ADJ;
+
+			if ( yy_mars_next_state )
+				{
+				/* Consume the NUL. */
+				yy_mars_cp = ++(yy_mars_c_buf_p);
+				yy_mars_current_state = yy_mars_next_state;
+				goto yy_mars_match;
+				}
+
+			else
+				{
+				yy_mars_cp = (yy_mars_c_buf_p);
+				goto yy_mars_find_action;
+				}
+			}
+
+		else switch ( yy_mars_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(yy_mars_did_buffer_switch_on_eof) = 0;
+
+				if ( yy_marswrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_mars_get_next_buffer() to have set up
+					 * yy_marstext, we can now set up
+					 * yy_mars_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(yy_mars_c_buf_p) = (yy_marstext_ptr) + YY_MORE_ADJ;
+
+					yy_mars_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (yy_mars_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(yy_mars_c_buf_p) =
+					(yy_marstext_ptr) + yy_mars_amount_of_matched_text;
+
+				yy_mars_current_state = yy_mars_get_previous_state(  );
+
+				yy_mars_cp = (yy_mars_c_buf_p);
+				yy_mars_bp = (yy_marstext_ptr) + YY_MORE_ADJ;
+				goto yy_mars_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(yy_mars_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[(yy_mars_n_chars)];
+
+				yy_mars_current_state = yy_mars_get_previous_state(  );
+
+				yy_mars_cp = (yy_mars_c_buf_p);
+				yy_mars_bp = (yy_marstext_ptr) + YY_MORE_ADJ;
+				goto yy_mars_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of yy_marslex */
+
+/* yy_mars_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_mars_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf;
+	register char *source = (yy_marstext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (yy_mars_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[(yy_mars_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_mars_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (yy_mars_c_buf_p) - (yy_marstext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((yy_mars_c_buf_p) - (yy_marstext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_mars_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars = (yy_mars_n_chars) = 0;
+
+	else
+		{
+			int num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_mars_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[number_to_move]),
+			(yy_mars_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars = (yy_mars_n_chars);
+		}
+
+	if ( (yy_mars_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yy_marsrestart(yy_marsin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_mars_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	(yy_mars_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[(yy_mars_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[(yy_mars_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(yy_marstext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_mars_get_previous_state - get the state just before the EOB char was reached */
+
+    static yy_mars_state_type yy_mars_get_previous_state (void)
+{
+	register yy_mars_state_type yy_mars_current_state;
+	register char *yy_mars_cp;
+    
+	yy_mars_current_state = (yy_mars_start);
+	yy_mars_current_state += YY_AT_BOL();
+
+	(yy_mars_state_ptr) = (yy_mars_state_buf);
+	*(yy_mars_state_ptr)++ = yy_mars_current_state;
+
+	for ( yy_mars_cp = (yy_marstext_ptr) + YY_MORE_ADJ; yy_mars_cp < (yy_mars_c_buf_p); ++yy_mars_cp )
+		{
+		register YY_CHAR yy_mars_c = (*yy_mars_cp ? yy_mars_ec[YY_SC_TO_UI(*yy_mars_cp)] : 1);
+		while ( yy_mars_chk[yy_mars_base[yy_mars_current_state] + yy_mars_c] != yy_mars_current_state )
+			{
+			yy_mars_current_state = (int) yy_mars_def[yy_mars_current_state];
+			if ( yy_mars_current_state >= 94 )
+				yy_mars_c = yy_mars_meta[(unsigned int) yy_mars_c];
+			}
+		yy_mars_current_state = yy_mars_nxt[yy_mars_base[yy_mars_current_state] + (unsigned int) yy_mars_c];
+		*(yy_mars_state_ptr)++ = yy_mars_current_state;
+		}
+
+	return yy_mars_current_state;
+}
+
+/* yy_mars_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_mars_try_NUL_trans( current_state );
+ */
+    static yy_mars_state_type yy_mars_try_NUL_trans  (yy_mars_state_type yy_mars_current_state )
+{
+	register int yy_mars_is_jam;
+    
+	register YY_CHAR yy_mars_c = 1;
+	while ( yy_mars_chk[yy_mars_base[yy_mars_current_state] + yy_mars_c] != yy_mars_current_state )
+		{
+		yy_mars_current_state = (int) yy_mars_def[yy_mars_current_state];
+		if ( yy_mars_current_state >= 94 )
+			yy_mars_c = yy_mars_meta[(unsigned int) yy_mars_c];
+		}
+	yy_mars_current_state = yy_mars_nxt[yy_mars_base[yy_mars_current_state] + (unsigned int) yy_mars_c];
+	yy_mars_is_jam = (yy_mars_current_state == 93);
+	if ( ! yy_mars_is_jam )
+		*(yy_mars_state_ptr)++ = yy_mars_current_state;
+
+	return yy_mars_is_jam ? 0 : yy_mars_current_state;
+}
+
+    static void yy_marsunput (int c, register char * yy_mars_bp )
+{
+	register char *yy_mars_cp;
+    
+    yy_mars_cp = (yy_mars_c_buf_p);
+
+	/* undo effects of setting up yy_marstext */
+	*yy_mars_cp = (yy_mars_hold_char);
+
+	if ( yy_mars_cp < YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = (yy_mars_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_mars_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf )
+			*--dest = *--source;
+
+		yy_mars_cp += (int) (dest - source);
+		yy_mars_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars =
+			(yy_mars_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_mars_buf_size;
+
+		if ( yy_mars_cp < YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_mars_cp = (char) c;
+
+    if ( c == '\n' ){
+        --yy_marslineno;
+    }
+
+	(yy_marstext_ptr) = yy_mars_bp;
+	(yy_mars_hold_char) = *yy_mars_cp;
+	(yy_mars_c_buf_p) = yy_mars_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yy_marsinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(yy_mars_c_buf_p) = (yy_mars_hold_char);
+
+	if ( *(yy_mars_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_mars_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (yy_mars_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_mars_ch_buf[(yy_mars_n_chars)] )
+			/* This was really a NUL. */
+			*(yy_mars_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			int offset = (yy_mars_c_buf_p) - (yy_marstext_ptr);
+			++(yy_mars_c_buf_p);
+
+			switch ( yy_mars_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_mars_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yy_marsrestart(yy_marsin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yy_marswrap( ) )
+						return EOF;
+
+					if ( ! (yy_mars_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yy_marsinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(yy_mars_c_buf_p) = (yy_marstext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (yy_mars_c_buf_p);	/* cast for 8-bit char's */
+	*(yy_mars_c_buf_p) = '\0';	/* preserve yy_marstext */
+	(yy_mars_hold_char) = *++(yy_mars_c_buf_p);
+
+	YY_CURRENT_BUFFER_LVALUE->yy_mars_at_bol = (c == '\n');
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_mars_at_bol )
+		   
+    yy_marslineno++;
+;
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void yy_marsrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        yy_marsensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            yy_mars_create_buffer(yy_marsin,YY_BUF_SIZE );
+	}
+
+	yy_mars_init_buffer(YY_CURRENT_BUFFER,input_file );
+	yy_mars_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void yy_mars_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		yy_marspop_buffer_state();
+	 *		yy_marspush_buffer_state(new_buffer);
+     */
+	yy_marsensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_mars_c_buf_p) = (yy_mars_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_buf_pos = (yy_mars_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars = (yy_mars_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	yy_mars_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yy_marswrap()) processing, but the only time this flag
+	 * is looked at is after yy_marswrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(yy_mars_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_mars_load_buffer_state  (void)
+{
+    	(yy_mars_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars;
+	(yy_marstext_ptr) = (yy_mars_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_mars_buf_pos;
+	yy_marsin = YY_CURRENT_BUFFER_LVALUE->yy_mars_input_file;
+	(yy_mars_hold_char) = *(yy_mars_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE yy_mars_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) yy_marsalloc(sizeof( struct yy_mars_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_mars_create_buffer()" );
+
+	b->yy_mars_buf_size = size;
+
+	/* yy_mars_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_mars_ch_buf = (char *) yy_marsalloc(b->yy_mars_buf_size + 2  );
+	if ( ! b->yy_mars_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_mars_create_buffer()" );
+
+	b->yy_mars_is_our_buffer = 1;
+
+	yy_mars_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_mars_create_buffer()
+ * 
+ */
+    void yy_mars_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_mars_is_our_buffer )
+		yy_marsfree((void *) b->yy_mars_ch_buf  );
+
+	yy_marsfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yy_marsrestart() or at EOF.
+ */
+    static void yy_mars_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	yy_mars_flush_buffer(b );
+
+	b->yy_mars_input_file = file;
+	b->yy_mars_fill_buffer = 1;
+
+    /* If b is the current buffer, then yy_mars_init_buffer was _probably_
+     * called from yy_marsrestart() or through yy_mars_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_mars_bs_lineno = 1;
+        b->yy_mars_bs_column = 0;
+    }
+
+        b->yy_mars_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void yy_mars_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->yy_mars_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_mars_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_mars_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_mars_buf_pos = &b->yy_mars_ch_buf[0];
+
+	b->yy_mars_at_bol = 1;
+	b->yy_mars_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		yy_mars_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void yy_marspush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	yy_marsensure_buffer_stack();
+
+	/* This block is copied from yy_mars_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_mars_c_buf_p) = (yy_mars_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_buf_pos = (yy_mars_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_mars_n_chars = (yy_mars_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(yy_mars_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from yy_mars_switch_to_buffer. */
+	yy_mars_load_buffer_state( );
+	(yy_mars_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void yy_marspop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	yy_mars_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((yy_mars_buffer_stack_top) > 0)
+		--(yy_mars_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		yy_mars_load_buffer_state( );
+		(yy_mars_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void yy_marsensure_buffer_stack (void)
+{
+	int num_to_alloc;
+    
+	if (!(yy_mars_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(yy_mars_buffer_stack) = (struct yy_mars_buffer_state**)yy_marsalloc
+								(num_to_alloc * sizeof(struct yy_mars_buffer_state*)
+								);
+		
+		memset((yy_mars_buffer_stack), 0, num_to_alloc * sizeof(struct yy_mars_buffer_state*));
+				
+		(yy_mars_buffer_stack_max) = num_to_alloc;
+		(yy_mars_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((yy_mars_buffer_stack_top) >= ((yy_mars_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (yy_mars_buffer_stack_max) + grow_size;
+		(yy_mars_buffer_stack) = (struct yy_mars_buffer_state**)yy_marsrealloc
+								((yy_mars_buffer_stack),
+								num_to_alloc * sizeof(struct yy_mars_buffer_state*)
+								);
+
+		/* zero only the new slots.*/
+		memset((yy_mars_buffer_stack) + (yy_mars_buffer_stack_max), 0, grow_size * sizeof(struct yy_mars_buffer_state*));
+		(yy_mars_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE yy_mars_scan_buffer  (char * base, yy_mars_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_marsalloc(sizeof( struct yy_mars_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_mars_scan_buffer()" );
+
+	b->yy_mars_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_mars_buf_pos = b->yy_mars_ch_buf = base;
+	b->yy_mars_is_our_buffer = 0;
+	b->yy_mars_input_file = 0;
+	b->yy_mars_n_chars = b->yy_mars_buf_size;
+	b->yy_mars_is_interactive = 0;
+	b->yy_mars_at_bol = 1;
+	b->yy_mars_fill_buffer = 0;
+	b->yy_mars_buffer_status = YY_BUFFER_NEW;
+
+	yy_mars_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yy_marslex() will
+ * scan from a @e copy of @a str.
+ * @param str a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       yy_mars_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_mars_scan_string (yy_marsconst char * yy_marsstr )
+{
+    
+	return yy_mars_scan_bytes(yy_marsstr,strlen(yy_marsstr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yy_marslex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_mars_scan_bytes  (yy_marsconst char * yy_marsbytes, int  _yy_marsbytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_mars_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yy_marsbytes_len + 2;
+	buf = (char *) yy_marsalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_mars_scan_bytes()" );
+
+	for ( i = 0; i < _yy_marsbytes_len; ++i )
+		buf[i] = yy_marsbytes[i];
+
+	buf[_yy_marsbytes_len] = buf[_yy_marsbytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_mars_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_mars_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_mars_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_mars_fatal_error (yy_marsconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yy_marsless() so it works in section 3 code. */
+
+#undef yy_marsless
+#define yy_marsless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yy_marstext. */ \
+        int yy_marsless_macro_arg = (n); \
+        YY_LESS_LINENO(yy_marsless_macro_arg);\
+		yy_marstext[yy_marsleng] = (yy_mars_hold_char); \
+		(yy_mars_c_buf_p) = yy_marstext + yy_marsless_macro_arg; \
+		(yy_mars_hold_char) = *(yy_mars_c_buf_p); \
+		*(yy_mars_c_buf_p) = '\0'; \
+		yy_marsleng = yy_marsless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int yy_marsget_lineno  (void)
+{
+        
+    return yy_marslineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *yy_marsget_in  (void)
+{
+        return yy_marsin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *yy_marsget_out  (void)
+{
+        return yy_marsout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+int yy_marsget_leng  (void)
+{
+        return yy_marsleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *yy_marsget_text  (void)
+{
+        return yy_marstext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void yy_marsset_lineno (int  line_number )
+{
+    
+    yy_marslineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see yy_mars_switch_to_buffer
+ */
+void yy_marsset_in (FILE *  in_str )
+{
+        yy_marsin = in_str ;
+}
+
+void yy_marsset_out (FILE *  out_str )
+{
+        yy_marsout = out_str ;
+}
+
+int yy_marsget_debug  (void)
+{
+        return yy_mars_flex_debug;
+}
+
+void yy_marsset_debug (int  bdebug )
+{
+        yy_mars_flex_debug = bdebug ;
+}
+
+static int yy_mars_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from yy_marslex_destroy(), so don't allocate here.
+     */
+
+    /* We do not touch yy_marslineno unless the option is enabled. */
+    yy_marslineno =  1;
+    
+    (yy_mars_buffer_stack) = 0;
+    (yy_mars_buffer_stack_top) = 0;
+    (yy_mars_buffer_stack_max) = 0;
+    (yy_mars_c_buf_p) = (char *) 0;
+    (yy_mars_init) = 0;
+    (yy_mars_start) = 0;
+
+    (yy_mars_state_buf) = 0;
+    (yy_mars_state_ptr) = 0;
+    (yy_mars_full_match) = 0;
+    (yy_mars_lp) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yy_marsin = stdin;
+    yy_marsout = stdout;
+#else
+    yy_marsin = (FILE *) 0;
+    yy_marsout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * yy_marslex_init()
+     */
+    return 0;
+}
+
+/* yy_marslex_destroy is for both reentrant and non-reentrant scanners. */
+int yy_marslex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		yy_mars_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		yy_marspop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	yy_marsfree((yy_mars_buffer_stack) );
+	(yy_mars_buffer_stack) = NULL;
+
+    yy_marsfree ( (yy_mars_state_buf) );
+    (yy_mars_state_buf)  = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * yy_marslex() is called, initialization will occur. */
+    yy_mars_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yy_marstext_ptr
+static void yy_mars_flex_strncpy (char* s1, yy_marsconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_mars_flex_strlen (yy_marsconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *yy_marsalloc (yy_mars_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *yy_marsrealloc  (void * ptr, yy_mars_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void yy_marsfree (void * ptr )
+{
+	free( (char *) ptr );	/* see yy_marsrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yy_marstables"
+
+#line 163 "langl.l"
+
+
+
+#define MAXINCLUDE 10
+
+typedef struct {
+	char *name;
+	FILE *file;
+	int  line;
+} context;
+
+static context stack[MAXINCLUDE];
+static int     top = 0;
+static err    parse_err = NOERR;
+static char *first = 0;
+extern FILE *yy_marsin;
+extern int yy_marslineno;
+
+yy_marswrap()
+{
+
+#ifdef SHOW_INPUT
+	charpos  = 0;
+#endif
+
+	top--;
+	fclose(stack[top].file);
+	yy_marslineno = stack[top].line;
+	strfree(stack[top].name);
+
+	if(top)
+	{
+		yy_marsin = stack[top-1].file;
+		return 0;
+	}
+	return 1;
+}
+
+#ifdef STRIP_SPACES
+static char *clean(char *p)
+{
+	char *q = p;
+	char *r = p;
+	int  space = 0;
+
+	while(*p)
+	{
+		/* if(islower(*p)) *p = toupper(*p); */
+		/* if(isspace(*p)) */
+		if(*p == ' ' || *p == '\t')
+			space++;
+		else 
+		{
+			if(space) *q++ = ' ';
+			space = 0;
+			*q++ = *p;
+		}
+
+		*p++;
+	}
+	*q = 0;
+
+	return  strcache(r);
+}
+#endif
+
+#ifdef SHOW_INPUT
+
+static void showc(char c)
+{
+	if(charpos<MAXLINE)
+		line[charpos++] = c;
+	if(c == '\n') charpos = 0;
+	if(echomode) putchar(c);
+}
+
+#ifdef hpux
+static void shows(unsigned char* q)
+{
+	char *p = (char*)q;
+	while(*p) showc(*p++);
+}
+#else
+static void shows(char *p)
+{
+	while(*p) showc(*p++);
+}
+#endif
+
+
+static void syntax_echo(boolean onoff)
+{
+	echomode = onoff;
+}
+
+static void syntax_error(char *file,char *message,int  c)
+{
+	int i;
+
+	line[charpos] = 0;
+	printf("\n\n%s\n",line);
+
+	for(i=0;i<charpos;i++) putchar(' ');
+	putchar('^');
+	putchar('\n');
+	for(i=0;i<charpos;i++) putchar('-');
+	putchar('-');
+	putchar('\n');
+
+	marslog(LOG_EROR,"file %s line %d : %s",file,yy_marslineno,message);
+	if(isprint(c))
+		marslog(LOG_EROR,"file %s line %d : unexpected character in input '%c'",
+		    file,yy_marslineno,c);
+	else
+		marslog(LOG_EROR,"file %s line %d : error code %d",
+		    file,yy_marslineno,c);
+}
+
+#else
+
+static void syntax_error(char *file,char *message,int  c)
+{
+	marslog(LOG_EROR,"file %s line %d : %s",file,yy_marslineno,message);
+	if(isprint(c))
+		marslog(LOG_EROR,"file %s line %d : unexpected character in input '%c'",
+		    file,yy_marslineno,c);
+	else
+		marslog(LOG_EROR,"file %s line %d : error code %d",
+		    file,yy_marslineno,c);
+}
+#endif
+
+
+err parser(const char *fname,boolean echo)
+{
+	extern FILE *yy_marsin;
+
+	if(fname)
+	{
+		yy_marsin = fopen(fname,"r");
+		if(yy_marsin == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot open file %s",fname);
+			return -1;
+		}
+	}
+	else
+	{
+		fname = "(standard input)";
+		yy_marsin = stdin;
+	}
+	parse_err = NOERR;
+	syntax_echo(echo);
+
+	top = 1;
+	stack[0].file = yy_marsin;
+	stack[0].name = strcache(fname);
+	stack[0].line = 0;
+
+	first = strcache(fname);
+
+	if(setjmp(env))
+		return 1;
+
+	yy_marsparse();
+
+	strfree(first);
+
+	return parse_err;
+}
+
+static void include(const char *fname)
+{
+	int n   = top-1;
+	const char *q = config_file(fname);
+	const char *p = makepath(dirname(stack[n].name),q);
+	FILE *f = fopen(p,"r");
+
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open file %s",p);
+		yy_marserror("Cannot include file");
+	}
+	else
+	{
+		yy_marsin            = f;
+		stack[top].file = f;
+		stack[top].name = strcache(p);
+		stack[top].line = yy_marslineno;
+#ifdef FLEX_SCANNER
+		yy_marslineno=0;
+#endif
+		top++;
+	}
+}
+
+yy_marserror(char *msg)
+{
+	if(top)
+		syntax_error(stack[top-1].name,msg,yy_marschar);
+	else
+		syntax_error(first,msg,yy_marschar);
+	parse_err = -1;
+}
+
diff --git a/src/libMars/langl.l b/src/libMars/langl.l
new file mode 100644
index 0000000..048f938
--- /dev/null
+++ b/src/libMars/langl.l
@@ -0,0 +1,365 @@
+%{
+
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+
+#undef YYLMAX
+#define YYLMAX 1024
+
+#include <setjmp.h>
+#include <stdarg.h>
+static jmp_buf env;
+#define exit(a)    jumpexit(a)
+#define fprintf    jumpprtf
+
+static void include(const char*);
+/* void yyerror(char*); */
+
+#define STRIP_SPACES
+static char *clean(char *);
+
+#ifndef METVIEW
+#define SHOW_INPUT
+#endif
+
+
+#ifdef FLEX_SCANNER
+#define YY_INPUT(buf,result,max_size) \
+               { \
+               int c = getc(yyin); \
+               result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
+               }
+#endif
+
+
+
+#ifdef SHOW_INPUT
+/* These two routines are very inneficient .. */
+
+#define MAXLINE 256
+static int  echomode;
+static char line[MAXLINE];
+static int  charpos = 0;
+
+static void showc(char);
+#ifdef hpux
+static void shows(unsigned char*);
+#else
+static void shows(char*);
+#endif
+
+
+#else
+
+#define showc(x) 
+#define shows(x)
+#define syntax_echo(x)
+
+#endif
+
+
+static void jumpexit(int n)
+{
+	longjmp(env,1);
+}
+
+static void jumpprtf(FILE *f,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	int len;
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	len = strlen(buf);
+	if(len && buf[len-1] == '\n')
+		buf[len-1] = 0;
+
+	marslog(LOG_EROR,"Parser error: %s",buf);
+}
+
+
+%}
+
+BLANK	[ \t\n]+
+IDENT   [_0-9A-Za-z]+[_\.\-\+A-Za-z0-9:\t ]*[_\.\-\+A-Za-z0-9]* 
+NUMB    [\-\.]*[0-9]+[\.0-9]*[Ee]*[\-\+]*[0-9]*
+%%
+
+
+^\*        { int c; 
+			 shows(yytext);
+			 while((c = input()) && (c != '\n')) showc(c); showc(c);
+			 if(c == '\n') unput(c);
+		    }
+
+\!|\# 		 { int c; shows(yytext);while((c = input()) && (c != '\n')) showc(c); showc(c);}
+
+
+\"|\'            { 
+				   int c,q = yytext[0]; 
+
+				   if(q == '\'') yyleng = 0;
+
+				   while((c = input()) && c != q && c != '\n') 
+				   {
+					   if(c == '\\') yytext[yyleng++] = input();
+					   else yytext[yyleng++] =  c;
+				   }
+
+				   if(c == '"') 
+					yytext[yyleng++] = c;
+
+				   yytext[yyleng++] = 0;
+				   shows(yytext);
+				   yylval.str = strcache(yytext); 
+				   return WORD;
+				 }
+
+"%include"       { 
+					char word[1024];
+					int  i = 0;
+					int c;
+					while((c = input()) && isspace(c) && c != '\n') ;
+					while(c && !isspace(c) && c != '\n') 
+					{
+						word[i++] = c;
+						c = input();
+					}
+					word[i] = 0;
+					include(no_quotes(word));
+				 }
+
+"%if"      { shows(yytext); return IF; }
+"%then"    { shows(yytext); return THEN; }
+"%and"     { shows(yytext); return AND; }
+"%not"     { shows(yytext); return NOT; }
+"%or"      { shows(yytext); return OR; }
+"%in"      { shows(yytext); return IN; }
+"%set"     { shows(yytext); return SET; }
+"%unset"   { shows(yytext); return UNSET; }
+"%warning" { shows(yytext); return WARNING; }
+"%info"    { shows(yytext); return INFO; }
+"%mail"    { shows(yytext); return MAIL; }
+"%mailuser" { shows(yytext); return MAILUSER; }
+"%error"   { shows(yytext); return ERROR; }
+"%exit"    { shows(yytext); return EXIT; }
+"%fail"    { shows(yytext); return FAIL; }
+
+{IDENT}          { shows(yytext); yylval.str = clean(yytext); return WORD; }
+{NUMB}           { shows(yytext); yylval.str = clean(yytext); return WORD; }
+{BLANK}          { shows(yytext); }
+\!\!             { shows(yytext); } 
+.                { showc(*yytext); return *yytext; }
+%%
+
+#define MAXINCLUDE 10
+
+typedef struct {
+	char *name;
+	FILE *file;
+	int  line;
+} context;
+
+static context stack[MAXINCLUDE];
+static int     top = 0;
+static err    parse_err = NOERR;
+static char *first = 0;
+extern FILE *yyin;
+extern int yylineno;
+
+yywrap()
+{
+
+#ifdef SHOW_INPUT
+	charpos  = 0;
+#endif
+
+	top--;
+	fclose(stack[top].file);
+	yylineno = stack[top].line;
+	strfree(stack[top].name);
+
+	if(top)
+	{
+		yyin = stack[top-1].file;
+		return 0;
+	}
+	return 1;
+}
+
+#ifdef STRIP_SPACES
+static char *clean(char *p)
+{
+	char *q = p;
+	char *r = p;
+	int  space = 0;
+
+	while(*p)
+	{
+		/* if(islower(*p)) *p = toupper(*p); */
+		/* if(isspace(*p)) */
+		if(*p == ' ' || *p == '\t')
+			space++;
+		else 
+		{
+			if(space) *q++ = ' ';
+			space = 0;
+			*q++ = *p;
+		}
+
+		*p++;
+	}
+	*q = 0;
+
+	return  strcache(r);
+}
+#endif
+
+#ifdef SHOW_INPUT
+
+static void showc(char c)
+{
+	if(charpos<MAXLINE)
+		line[charpos++] = c;
+	if(c == '\n') charpos = 0;
+	if(echomode) putchar(c);
+}
+
+#ifdef hpux
+static void shows(unsigned char* q)
+{
+	char *p = (char*)q;
+	while(*p) showc(*p++);
+}
+#else
+static void shows(char *p)
+{
+	while(*p) showc(*p++);
+}
+#endif
+
+
+static void syntax_echo(boolean onoff)
+{
+	echomode = onoff;
+}
+
+static void syntax_error(char *file,char *message,int  c)
+{
+	int i;
+
+	line[charpos] = 0;
+	printf("\n\n%s\n",line);
+
+	for(i=0;i<charpos;i++) putchar(' ');
+	putchar('^');
+	putchar('\n');
+	for(i=0;i<charpos;i++) putchar('-');
+	putchar('-');
+	putchar('\n');
+
+	marslog(LOG_EROR,"file %s line %d : %s",file,yylineno,message);
+	if(isprint(c))
+		marslog(LOG_EROR,"file %s line %d : unexpected character in input '%c'",
+		    file,yylineno,c);
+	else
+		marslog(LOG_EROR,"file %s line %d : error code %d",
+		    file,yylineno,c);
+}
+
+#else
+
+static void syntax_error(char *file,char *message,int  c)
+{
+	marslog(LOG_EROR,"file %s line %d : %s",file,yylineno,message);
+	if(isprint(c))
+		marslog(LOG_EROR,"file %s line %d : unexpected character in input '%c'",
+		    file,yylineno,c);
+	else
+		marslog(LOG_EROR,"file %s line %d : error code %d",
+		    file,yylineno,c);
+}
+#endif
+
+
+err parser(const char *fname,boolean echo)
+{
+	extern FILE *yyin;
+
+	if(fname)
+	{
+		yyin = fopen(fname,"r");
+		if(yyin == NULL)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot open file %s",fname);
+			return -1;
+		}
+	}
+	else
+	{
+		fname = "(standard input)";
+		yyin = stdin;
+	}
+	parse_err = NOERR;
+	syntax_echo(echo);
+
+	top = 1;
+	stack[0].file = yyin;
+	stack[0].name = strcache(fname);
+	stack[0].line = 0;
+
+	first = strcache(fname);
+
+	if(setjmp(env))
+		return 1;
+
+	yyparse();
+
+	strfree(first);
+
+	return parse_err;
+}
+
+static void include(const char *fname)
+{
+	int n   = top-1;
+	const char *q = config_file(fname);
+	const char *p = makepath(dirname(stack[n].name),q);
+	FILE *f = fopen(p,"r");
+
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open file %s",p);
+		yyerror("Cannot include file");
+	}
+	else
+	{
+		yyin            = f;
+		stack[top].file = f;
+		stack[top].name = strcache(p);
+		stack[top].line = yylineno;
+#ifdef FLEX_SCANNER
+		yylineno=0;
+#endif
+		top++;
+	}
+}
+
+yyerror(char *msg)
+{
+	if(top)
+		syntax_error(stack[top-1].name,msg,yychar);
+	else
+		syntax_error(first,msg,yychar);
+	parse_err = -1;
+}
diff --git a/src/libMars/langy.c b/src/libMars/langy.c
new file mode 100644
index 0000000..6138098
--- /dev/null
+++ b/src/libMars/langy.c
@@ -0,0 +1,2109 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy_mars or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yy_marstokentype {
+     IF = 258,
+     AND = 259,
+     NOT = 260,
+     OR = 261,
+     THEN = 262,
+     WARNING = 263,
+     INFO = 264,
+     MAIL = 265,
+     MAILUSER = 266,
+     ERROR = 267,
+     EXIT = 268,
+     SET = 269,
+     UNSET = 270,
+     IN = 271,
+     FAIL = 272,
+     WORD = 273
+   };
+#endif
+/* Tokens.  */
+#define IF 258
+#define AND 259
+#define NOT 260
+#define OR 261
+#define THEN 262
+#define WARNING 263
+#define INFO 264
+#define MAIL 265
+#define MAILUSER 266
+#define ERROR 267
+#define EXIT 268
+#define SET 269
+#define UNSET 270
+#define IN 271
+#define FAIL 272
+#define WORD 273
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 1 "langy.y"
+
+
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "lang.h"
+
+static request *reverse(request*);
+static value *reverse_other(value *r,value *s);
+static value *reverse_value(value *r,value *s);
+request *parser_lang;
+request *parser_reqs;
+rule    *parser_ruls;
+
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 25 "langy.y"
+{
+    char       *str;
+	request    *req;
+	parameter  *par;
+	value      *val;
+	rule       *rul;
+	action     *act;
+	condition  *con;
+	testop      top;
+}
+/* Line 187 of yacc.c.  */
+#line 167 "y.tab.c"
+	YYSTYPE;
+# define yy_marsstype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+#line 180 "y.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yy_marstype_uint8;
+#else
+typedef unsigned char yy_marstype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yy_marstype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yy_marstype_int8;
+#else
+typedef short int yy_marstype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yy_marstype_uint16;
+#else
+typedef unsigned short int yy_marstype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yy_marstype_int16;
+#else
+typedef short int yy_marstype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined yy_marsoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yy_marsoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yy_marsoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yy_marsalloc
+{
+  yy_marstype_int16 yy_marsss;
+  YYSTYPE yy_marsvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yy_marsalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yy_marstype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yy_marsi;				\
+	  for (yy_marsi = 0; yy_marsi < (Count); yy_marsi++)	\
+	    (To)[yy_marsi] = (From)[yy_marsi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yy_marsnewbytes;						\
+	YYCOPY (&yy_marsptr->Stack, Stack, yy_marssize);				\
+	Stack = &yy_marsptr->Stack;						\
+	yy_marsnewbytes = yy_marsstacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yy_marsptr += yy_marsnewbytes / sizeof (*yy_marsptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  34
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   166
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  37
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  30
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  81
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  139
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   273
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yy_marstranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yy_marstype_uint8 yy_marstranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    27,     2,     2,     2,    34,     2,
+      23,    24,    28,     2,    19,     2,    20,    26,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    21,    31,
+      36,    22,    35,     2,    25,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    29,     2,    30,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    32,     2,    33,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yy_marstype_uint8 yy_marsprhs[] =
+{
+       0,     0,     3,     5,     7,     9,    11,    13,    16,    18,
+      22,    25,    30,    34,    36,    40,    45,    52,    58,    60,
+      64,    66,    68,    73,    75,    77,    79,    80,    82,    85,
+      88,    90,    97,   103,   105,   108,   114,   122,   124,   128,
+     130,   133,   135,   139,   141,   143,   147,   149,   155,   160,
+     162,   165,   170,   172,   175,   177,   181,   183,   187,   191,
+     194,   198,   200,   202,   204,   209,   213,   215,   217,   219,
+     222,   225,   228,   230,   233,   236,   239,   242,   245,   248,
+     251,   254
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yy_marstype_int8 yy_marsrhs[] =
+{
+      38,     0,    -1,    45,    -1,    46,    -1,    39,    -1,    57,
+      -1,    40,    -1,    39,    40,    -1,    18,    -1,    18,    19,
+      41,    -1,    18,    20,    -1,    18,    19,    41,    20,    -1,
+      21,    41,    21,    -1,    42,    -1,    41,    19,    42,    -1,
+      18,    51,    22,    43,    -1,    18,    51,    22,    23,    39,
+      24,    -1,    18,    25,    18,    22,    43,    -1,    44,    -1,
+      43,    26,    44,    -1,    18,    -1,    27,    -1,    28,    29,
+      18,    30,    -1,    28,    -1,    26,    -1,    25,    -1,    -1,
+      48,    -1,    46,    48,    -1,    31,    18,    -1,    45,    -1,
+      18,    47,    47,    32,    49,    33,    -1,    18,    47,    47,
+      32,    33,    -1,    50,    -1,    49,    50,    -1,    18,    51,
+      32,    52,    33,    -1,    18,    51,    32,    52,    33,    22,
+      43,    -1,    45,    -1,    29,    41,    30,    -1,    53,    -1,
+      52,    53,    -1,    55,    -1,    55,    31,    54,    -1,    56,
+      -1,    55,    -1,    54,    31,    55,    -1,    44,    -1,    44,
+      22,    23,    43,    24,    -1,    34,    18,    34,    18,    -1,
+      58,    -1,    58,    57,    -1,     3,    60,     7,    59,    -1,
+      66,    -1,    66,    59,    -1,    61,    -1,    61,     6,    60,
+      -1,    62,    -1,    62,     4,    61,    -1,    63,    65,    63,
+      -1,     5,    60,    -1,    23,    60,    24,    -1,    63,    -1,
+      64,    -1,    43,    -1,    18,    23,    18,    24,    -1,    18,
+      23,    24,    -1,    22,    -1,    35,    -1,    36,    -1,    35,
+      22,    -1,    36,    22,    -1,    36,    35,    -1,    16,    -1,
+      14,    42,    -1,    15,    18,    -1,     8,    18,    -1,    10,
+      18,    -1,    11,    18,    -1,     9,    18,    -1,    12,    18,
+      -1,    13,    18,    -1,    17,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yy_marstype_uint16 yy_marsrline[] =
+{
+       0,    94,    94,    95,    96,    97,   100,   101,   105,   106,
+     107,   108,   109,   112,   113,   116,   118,   125,   131,   132,
+     134,   135,   136,   142,   143,   144,   147,   153,   154,   157,
+     158,   161,   167,   174,   175,   177,   179,   187,   188,   191,
+     192,   196,   197,   200,   203,   204,   207,   208,   212,   217,
+     218,   222,   225,   226,   229,   230,   233,   234,   237,   238,
+     239,   240,   241,   244,   247,   248,   252,   253,   254,   255,
+     256,   257,   258,   261,   263,   264,   265,   266,   267,   268,
+     269,   270
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yy_marstname[] =
+{
+  "$end", "error", "$undefined", "IF", "AND", "NOT", "OR", "THEN",
+  "WARNING", "INFO", "MAIL", "MAILUSER", "ERROR", "EXIT", "SET", "UNSET",
+  "IN", "FAIL", "WORD", "','", "'.'", "':'", "'='", "'('", "')'", "'@'",
+  "'/'", "'\"'", "'*'", "'['", "']'", "';'", "'{'", "'}'", "'&'", "'>'",
+  "'<'", "$accept", "all", "requests", "request", "parameters",
+  "parameter", "values", "value", "empty", "verbs", "info", "verb",
+  "parameter_list", "parameter_desc", "intf", "value_list", "value_desc",
+  "aliases", "alias", "reference", "rules", "rule", "actions", "term",
+  "factor", "test", "atom", "func", "op", "action", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yy_marstype_uint16 yy_marstoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,    44,
+      46,    58,    61,    40,    41,    64,    47,    34,    42,    91,
+      93,    59,   123,   125,    38,    62,    60
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yy_marstype_uint8 yy_marsr1[] =
+{
+       0,    37,    38,    38,    38,    38,    39,    39,    40,    40,
+      40,    40,    40,    41,    41,    42,    42,    42,    43,    43,
+      44,    44,    44,    44,    44,    44,    45,    46,    46,    47,
+      47,    48,    48,    49,    49,    50,    50,    51,    51,    52,
+      52,    53,    53,    53,    54,    54,    55,    55,    56,    57,
+      57,    58,    59,    59,    60,    60,    61,    61,    62,    62,
+      62,    62,    62,    63,    64,    64,    65,    65,    65,    65,
+      65,    65,    65,    66,    66,    66,    66,    66,    66,    66,
+      66,    66
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yy_marstype_uint8 yy_marsr2[] =
+{
+       0,     2,     1,     1,     1,     1,     1,     2,     1,     3,
+       2,     4,     3,     1,     3,     4,     6,     5,     1,     3,
+       1,     1,     4,     1,     1,     1,     0,     1,     2,     2,
+       1,     6,     5,     1,     2,     5,     7,     1,     3,     1,
+       2,     1,     3,     1,     1,     3,     1,     5,     4,     1,
+       2,     4,     1,     2,     1,     3,     1,     3,     3,     2,
+       3,     1,     1,     1,     4,     3,     1,     1,     1,     2,
+       2,     2,     1,     2,     2,     2,     2,     2,     2,     2,
+       2,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yy_marstype_uint8 yy_marsdefact[] =
+{
+      26,     0,     8,     0,     0,     4,     6,     2,     3,    27,
+       5,    49,     0,    20,     0,    25,    24,    21,    23,    63,
+      18,     0,    54,    56,    61,    62,     0,    10,     0,    30,
+      26,    26,     0,    13,     1,     8,     7,    26,    28,    50,
+      59,     0,     0,     0,     0,     0,     0,     0,    72,    66,
+      67,    68,     0,     9,    29,     0,     0,     0,    37,     0,
+       0,    12,     0,    65,    60,     0,    20,    19,     0,     0,
+       0,     0,     0,     0,     0,     0,    81,    51,    52,    55,
+      57,    69,    70,    71,    58,    11,     0,     0,     0,     0,
+      14,    64,    22,    75,    78,    76,    77,    79,    80,    73,
+      74,    53,    26,    32,     0,    33,     0,    38,     0,    15,
+       0,    31,    34,    17,     0,     0,    16,     0,    46,     0,
+      39,    41,    43,     0,     0,    35,    40,     0,     0,     0,
+       0,    42,    44,    48,     0,    36,     0,    47,    45
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yy_marstype_int16 yy_marsdefgoto[] =
+{
+      -1,     4,     5,     6,    32,    33,    19,    20,    29,     8,
+      30,     9,   104,   105,    59,   119,   120,   131,   121,   122,
+      10,    11,    77,    21,    22,    23,    24,    25,    52,    78
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -87
+static const yy_marstype_int8 yy_marspact[] =
+{
+       4,     3,    44,     0,    42,    47,   -87,   -87,    63,   -87,
+     -87,    59,     3,    43,     3,   -87,   -87,   -87,    67,    71,
+     -87,    95,   100,   103,    11,   -87,     0,   -87,    90,   -87,
+      79,    10,    51,   -87,   -87,    80,   -87,    79,   -87,   -87,
+     -87,    16,    87,    94,    65,     2,     3,     3,   -87,   -87,
+      91,    36,    65,    85,   -87,    82,    97,     0,   -87,    96,
+       0,   -87,    92,   -87,   -87,    89,   -87,   -87,    99,   102,
+     104,   105,   106,   107,     0,   108,   -87,   -87,     2,   -87,
+     -87,   -87,   -87,   -87,   -87,   -87,    -9,   109,    48,    61,
+     -87,   -87,   -87,   -87,   -87,   -87,   -87,   -87,   -87,   -87,
+     -87,   -87,    98,   -87,    41,   -87,    65,   -87,    47,    71,
+     101,   -87,   -87,    71,    77,    27,   -87,   110,   112,    23,
+     -87,   111,   -87,   113,   114,   116,   -87,    65,   117,    65,
+      65,   115,   -87,   -87,    56,    71,    65,   -87,   -87
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yy_marstype_int16 yy_marspgoto[] =
+{
+     -87,   -87,    13,    -5,   -21,   -37,   -86,   -42,     1,   -87,
+     118,   121,   -87,    26,    30,   -87,    17,   -87,   -67,   -87,
+     128,   -87,    62,    -8,   119,   -87,    93,   -87,   -87,   -87
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -27
+static const yy_marstype_int16 yy_marstable[] =
+{
+      36,     7,    67,   109,    40,    53,    42,     1,    12,   102,
+      68,    69,    70,    71,    72,    73,    74,    75,    31,    76,
+     113,    13,     2,    90,   103,     3,    14,    48,    15,    16,
+      17,    18,    58,    49,    62,    56,    88,    99,    79,    57,
+      63,    66,    34,   134,   135,    66,    50,    51,    15,    16,
+      17,    18,    15,    16,    17,    18,   125,   117,    82,   102,
+     132,   117,     1,    26,    27,    35,    41,    60,     3,   138,
+      60,    83,    61,   118,   111,    28,   -26,   118,   107,    66,
+     137,    37,    44,    66,   108,   118,    15,    16,    17,    18,
+      15,    16,    17,    18,   118,    35,    43,    44,     3,    26,
+      27,   116,    45,    58,    60,    85,    46,    47,    54,    36,
+      28,    64,    65,    81,    86,    87,    91,    93,    89,    92,
+      94,   114,    95,    96,    97,    98,   100,    57,   123,    38,
+     112,   106,   110,   115,   124,   133,   126,   129,   130,    39,
+     101,     0,   127,     0,     0,    84,   136,   128,    55,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    80
+};
+
+static const yy_marstype_int16 yy_marscheck[] =
+{
+       5,     0,    44,    89,    12,    26,    14,     3,     5,    18,
+       8,     9,    10,    11,    12,    13,    14,    15,    18,    17,
+     106,    18,    18,    60,    33,    21,    23,    16,    25,    26,
+      27,    28,    31,    22,    18,    25,    57,    74,    46,    29,
+      24,    18,     0,   129,   130,    18,    35,    36,    25,    26,
+      27,    28,    25,    26,    27,    28,    33,    34,    22,    18,
+     127,    34,     3,    19,    20,    18,    23,    19,    21,   136,
+      19,    35,    21,   115,    33,    31,    32,   119,    30,    18,
+      24,    18,    26,    18,    23,   127,    25,    26,    27,    28,
+      25,    26,    27,    28,   136,    18,    29,    26,    21,    19,
+      20,    24,     7,   102,    19,    20,     6,     4,    18,   114,
+      31,    24,    18,    22,    32,    18,    24,    18,    22,    30,
+      18,   108,    18,    18,    18,    18,    18,    29,    18,     8,
+     104,    22,   102,    32,    22,    18,   119,    23,    22,    11,
+      78,    -1,    31,    -1,    -1,    52,    31,    34,    30,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    47
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yy_marstype_uint8 yy_marsstos[] =
+{
+       0,     3,    18,    21,    38,    39,    40,    45,    46,    48,
+      57,    58,     5,    18,    23,    25,    26,    27,    28,    43,
+      44,    60,    61,    62,    63,    64,    19,    20,    31,    45,
+      47,    18,    41,    42,     0,    18,    40,    18,    48,    57,
+      60,    23,    60,    29,    26,     7,     6,     4,    16,    22,
+      35,    36,    65,    41,    18,    47,    25,    29,    45,    51,
+      19,    21,    18,    24,    24,    18,    18,    44,     8,     9,
+      10,    11,    12,    13,    14,    15,    17,    59,    66,    60,
+      61,    22,    22,    35,    63,    20,    32,    18,    41,    22,
+      42,    24,    30,    18,    18,    18,    18,    18,    18,    42,
+      18,    59,    18,    33,    49,    50,    22,    30,    23,    43,
+      51,    33,    50,    43,    39,    32,    24,    34,    44,    52,
+      53,    55,    56,    18,    22,    33,    53,    31,    34,    23,
+      22,    54,    55,    18,    43,    43,    31,    24,    55
+};
+
+#define yy_marserrok		(yy_marserrstatus = 0)
+#define yy_marsclearin	(yy_marschar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yy_marsacceptlab
+#define YYABORT		goto yy_marsabortlab
+#define YYERROR		goto yy_marserrorlab
+
+
+/* Like YYERROR except do call yy_marserror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yy_marserrlab
+
+#define YYRECOVERING()  (!!yy_marserrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yy_marschar == YYEMPTY && yy_marslen == 1)				\
+    {								\
+      yy_marschar = (Token);						\
+      yy_marslval = (Value);						\
+      yy_marstoken = YYTRANSLATE (yy_marschar);				\
+      YYPOPSTACK (1);						\
+      goto yy_marsbackup;						\
+    }								\
+  else								\
+    {								\
+      yy_marserror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yy_marslex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yy_marslex (YYLEX_PARAM)
+#else
+# define YYLEX yy_marslex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yy_marsdebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yy_marsdebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_mars_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_mars_symbol_value_print (FILE *yy_marsoutput, int yy_marstype, YYSTYPE const * const yy_marsvaluep)
+#else
+static void
+yy_mars_symbol_value_print (yy_marsoutput, yy_marstype, yy_marsvaluep)
+    FILE *yy_marsoutput;
+    int yy_marstype;
+    YYSTYPE const * const yy_marsvaluep;
+#endif
+{
+  if (!yy_marsvaluep)
+    return;
+# ifdef YYPRINT
+  if (yy_marstype < YYNTOKENS)
+    YYPRINT (yy_marsoutput, yy_marstoknum[yy_marstype], *yy_marsvaluep);
+# else
+  YYUSE (yy_marsoutput);
+# endif
+  switch (yy_marstype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_mars_symbol_print (FILE *yy_marsoutput, int yy_marstype, YYSTYPE const * const yy_marsvaluep)
+#else
+static void
+yy_mars_symbol_print (yy_marsoutput, yy_marstype, yy_marsvaluep)
+    FILE *yy_marsoutput;
+    int yy_marstype;
+    YYSTYPE const * const yy_marsvaluep;
+#endif
+{
+  if (yy_marstype < YYNTOKENS)
+    YYFPRINTF (yy_marsoutput, "token %s (", yy_marstname[yy_marstype]);
+  else
+    YYFPRINTF (yy_marsoutput, "nterm %s (", yy_marstname[yy_marstype]);
+
+  yy_mars_symbol_value_print (yy_marsoutput, yy_marstype, yy_marsvaluep);
+  YYFPRINTF (yy_marsoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_mars_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_mars_stack_print (yy_marstype_int16 *bottom, yy_marstype_int16 *top)
+#else
+static void
+yy_mars_stack_print (bottom, top)
+    yy_marstype_int16 *bottom;
+    yy_marstype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yy_marsdebug)							\
+    yy_mars_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_mars_reduce_print (YYSTYPE *yy_marsvsp, int yy_marsrule)
+#else
+static void
+yy_mars_reduce_print (yy_marsvsp, yy_marsrule)
+    YYSTYPE *yy_marsvsp;
+    int yy_marsrule;
+#endif
+{
+  int yy_marsnrhs = yy_marsr2[yy_marsrule];
+  int yy_marsi;
+  unsigned long int yy_marslno = yy_marsrline[yy_marsrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yy_marsrule - 1, yy_marslno);
+  /* The symbols being reduced.  */
+  for (yy_marsi = 0; yy_marsi < yy_marsnrhs; yy_marsi++)
+    {
+      fprintf (stderr, "   $%d = ", yy_marsi + 1);
+      yy_mars_symbol_print (stderr, yy_marsrhs[yy_marsprhs[yy_marsrule] + yy_marsi],
+		       &(yy_marsvsp[(yy_marsi + 1) - (yy_marsnrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yy_marsdebug)				\
+    yy_mars_reduce_print (yy_marsvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yy_marsdebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+

+
+#if YYERROR_VERBOSE
+
+# ifndef yy_marsstrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yy_marsstrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yy_marsstrlen (const char *yy_marsstr)
+#else
+static YYSIZE_T
+yy_marsstrlen (yy_marsstr)
+    const char *yy_marsstr;
+#endif
+{
+  YYSIZE_T yy_marslen;
+  for (yy_marslen = 0; yy_marsstr[yy_marslen]; yy_marslen++)
+    continue;
+  return yy_marslen;
+}
+#  endif
+# endif
+
+# ifndef yy_marsstpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yy_marsstpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yy_marsstpcpy (char *yy_marsdest, const char *yy_marssrc)
+#else
+static char *
+yy_marsstpcpy (yy_marsdest, yy_marssrc)
+    char *yy_marsdest;
+    const char *yy_marssrc;
+#endif
+{
+  char *yy_marsd = yy_marsdest;
+  const char *yy_marss = yy_marssrc;
+
+  while ((*yy_marsd++ = *yy_marss++) != '\0')
+    continue;
+
+  return yy_marsd - 1;
+}
+#  endif
+# endif
+
+# ifndef yy_marstnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yy_marserror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yy_marstname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yy_marstnamerr (char *yy_marsres, const char *yy_marsstr)
+{
+  if (*yy_marsstr == '"')
+    {
+      YYSIZE_T yy_marsn = 0;
+      char const *yy_marsp = yy_marsstr;
+
+      for (;;)
+	switch (*++yy_marsp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yy_marsp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yy_marsres)
+	      yy_marsres[yy_marsn] = *yy_marsp;
+	    yy_marsn++;
+	    break;
+
+	  case '"':
+	    if (yy_marsres)
+	      yy_marsres[yy_marsn] = '\0';
+	    return yy_marsn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yy_marsres)
+    return yy_marsstrlen (yy_marsstr);
+
+  return yy_marsstpcpy (yy_marsres, yy_marsstr) - yy_marsres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yy_marssyntax_error (char *yy_marsresult, int yy_marsstate, int yy_marschar)
+{
+  int yy_marsn = yy_marspact[yy_marsstate];
+
+  if (! (YYPACT_NINF < yy_marsn && yy_marsn <= YYLAST))
+    return 0;
+  else
+    {
+      int yy_marstype = YYTRANSLATE (yy_marschar);
+      YYSIZE_T yy_marssize0 = yy_marstnamerr (0, yy_marstname[yy_marstype]);
+      YYSIZE_T yy_marssize = yy_marssize0;
+      YYSIZE_T yy_marssize1;
+      int yy_marssize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yy_marsarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yy_marsx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yy_marsfmt;
+      char const *yy_marsf;
+      static char const yy_marsunexpected[] = "syntax error, unexpected %s";
+      static char const yy_marsexpecting[] = ", expecting %s";
+      static char const yy_marsor[] = " or %s";
+      char yy_marsformat[sizeof yy_marsunexpected
+		    + sizeof yy_marsexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yy_marsor - 1))];
+      char const *yy_marsprefix = yy_marsexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yy_marsxbegin = yy_marsn < 0 ? -yy_marsn : 0;
+
+      /* Stay within bounds of both yy_marscheck and yy_marstname.  */
+      int yy_marschecklim = YYLAST - yy_marsn + 1;
+      int yy_marsxend = yy_marschecklim < YYNTOKENS ? yy_marschecklim : YYNTOKENS;
+      int yy_marscount = 1;
+
+      yy_marsarg[0] = yy_marstname[yy_marstype];
+      yy_marsfmt = yy_marsstpcpy (yy_marsformat, yy_marsunexpected);
+
+      for (yy_marsx = yy_marsxbegin; yy_marsx < yy_marsxend; ++yy_marsx)
+	if (yy_marscheck[yy_marsx + yy_marsn] == yy_marsx && yy_marsx != YYTERROR)
+	  {
+	    if (yy_marscount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yy_marscount = 1;
+		yy_marssize = yy_marssize0;
+		yy_marsformat[sizeof yy_marsunexpected - 1] = '\0';
+		break;
+	      }
+	    yy_marsarg[yy_marscount++] = yy_marstname[yy_marsx];
+	    yy_marssize1 = yy_marssize + yy_marstnamerr (0, yy_marstname[yy_marsx]);
+	    yy_marssize_overflow |= (yy_marssize1 < yy_marssize);
+	    yy_marssize = yy_marssize1;
+	    yy_marsfmt = yy_marsstpcpy (yy_marsfmt, yy_marsprefix);
+	    yy_marsprefix = yy_marsor;
+	  }
+
+      yy_marsf = YY_(yy_marsformat);
+      yy_marssize1 = yy_marssize + yy_marsstrlen (yy_marsf);
+      yy_marssize_overflow |= (yy_marssize1 < yy_marssize);
+      yy_marssize = yy_marssize1;
+
+      if (yy_marssize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yy_marsresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yy_marsp = yy_marsresult;
+	  int yy_marsi = 0;
+	  while ((*yy_marsp = *yy_marsf) != '\0')
+	    {
+	      if (*yy_marsp == '%' && yy_marsf[1] == 's' && yy_marsi < yy_marscount)
+		{
+		  yy_marsp += yy_marstnamerr (yy_marsp, yy_marsarg[yy_marsi++]);
+		  yy_marsf += 2;
+		}
+	      else
+		{
+		  yy_marsp++;
+		  yy_marsf++;
+		}
+	    }
+	}
+      return yy_marssize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+

+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_marsdestruct (const char *yy_marsmsg, int yy_marstype, YYSTYPE *yy_marsvaluep)
+#else
+static void
+yy_marsdestruct (yy_marsmsg, yy_marstype, yy_marsvaluep)
+    const char *yy_marsmsg;
+    int yy_marstype;
+    YYSTYPE *yy_marsvaluep;
+#endif
+{
+  YYUSE (yy_marsvaluep);
+
+  if (!yy_marsmsg)
+    yy_marsmsg = "Deleting";
+  YY_SYMBOL_PRINT (yy_marsmsg, yy_marstype, yy_marsvaluep, yy_marslocationp);
+
+  switch (yy_marstype)
+    {
+
+      default:
+	break;
+    }
+}
+

+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yy_marsparse (void *YYPARSE_PARAM);
+#else
+int yy_marsparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yy_marsparse (void);
+#else
+int yy_marsparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int yy_marschar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE yy_marslval;
+
+/* Number of syntax errors so far.  */
+int yy_marsnerrs;
+
+
+
+/*----------.
+| yy_marsparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yy_marsparse (void *YYPARSE_PARAM)
+#else
+int
+yy_marsparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yy_marsparse (void)
+#else
+int
+yy_marsparse ()
+
+#endif
+#endif
+{
+  
+  int yy_marsstate;
+  int yy_marsn;
+  int yy_marsresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yy_marserrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int yy_marstoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yy_marsmsgbuf[128];
+  char *yy_marsmsg = yy_marsmsgbuf;
+  YYSIZE_T yy_marsmsg_alloc = sizeof yy_marsmsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `yy_marsss': related to states,
+     `yy_marsvs': related to semantic values,
+     `yy_marsls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yy_marsoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  yy_marstype_int16 yy_marsssa[YYINITDEPTH];
+  yy_marstype_int16 *yy_marsss = yy_marsssa;
+  yy_marstype_int16 *yy_marsssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yy_marsvsa[YYINITDEPTH];
+  YYSTYPE *yy_marsvs = yy_marsvsa;
+  YYSTYPE *yy_marsvsp;
+
+
+
+#define YYPOPSTACK(N)   (yy_marsvsp -= (N), yy_marsssp -= (N))
+
+  YYSIZE_T yy_marsstacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yy_marsval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yy_marslen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yy_marsstate = 0;
+  yy_marserrstatus = 0;
+  yy_marsnerrs = 0;
+  yy_marschar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yy_marsssp = yy_marsss;
+  yy_marsvsp = yy_marsvs;
+
+  goto yy_marssetstate;
+
+/*------------------------------------------------------------.
+| yy_marsnewstate -- Push a new state, which is found in yy_marsstate.  |
+`------------------------------------------------------------*/
+ yy_marsnewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yy_marsssp++;
+
+ yy_marssetstate:
+  *yy_marsssp = yy_marsstate;
+
+  if (yy_marsss + yy_marsstacksize - 1 <= yy_marsssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yy_marssize = yy_marsssp - yy_marsss + 1;
+
+#ifdef yy_marsoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yy_marsvs1 = yy_marsvs;
+	yy_marstype_int16 *yy_marsss1 = yy_marsss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yy_marsoverflow is a macro.  */
+	yy_marsoverflow (YY_("memory exhausted"),
+		    &yy_marsss1, yy_marssize * sizeof (*yy_marsssp),
+		    &yy_marsvs1, yy_marssize * sizeof (*yy_marsvsp),
+
+		    &yy_marsstacksize);
+
+	yy_marsss = yy_marsss1;
+	yy_marsvs = yy_marsvs1;
+      }
+#else /* no yy_marsoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yy_marsexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yy_marsstacksize)
+	goto yy_marsexhaustedlab;
+      yy_marsstacksize *= 2;
+      if (YYMAXDEPTH < yy_marsstacksize)
+	yy_marsstacksize = YYMAXDEPTH;
+
+      {
+	yy_marstype_int16 *yy_marsss1 = yy_marsss;
+	union yy_marsalloc *yy_marsptr =
+	  (union yy_marsalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yy_marsstacksize));
+	if (! yy_marsptr)
+	  goto yy_marsexhaustedlab;
+	YYSTACK_RELOCATE (yy_marsss);
+	YYSTACK_RELOCATE (yy_marsvs);
+
+#  undef YYSTACK_RELOCATE
+	if (yy_marsss1 != yy_marsssa)
+	  YYSTACK_FREE (yy_marsss1);
+      }
+# endif
+#endif /* no yy_marsoverflow */
+
+      yy_marsssp = yy_marsss + yy_marssize - 1;
+      yy_marsvsp = yy_marsvs + yy_marssize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yy_marsstacksize));
+
+      if (yy_marsss + yy_marsstacksize - 1 <= yy_marsssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yy_marsstate));
+
+  goto yy_marsbackup;
+
+/*-----------.
+| yy_marsbackup.  |
+`-----------*/
+yy_marsbackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  yy_marsn = yy_marspact[yy_marsstate];
+  if (yy_marsn == YYPACT_NINF)
+    goto yy_marsdefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (yy_marschar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yy_marschar = YYLEX;
+    }
+
+  if (yy_marschar <= YYEOF)
+    {
+      yy_marschar = yy_marstoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yy_marstoken = YYTRANSLATE (yy_marschar);
+      YY_SYMBOL_PRINT ("Next token is", yy_marstoken, &yy_marslval, &yy_marslloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yy_marsn += yy_marstoken;
+  if (yy_marsn < 0 || YYLAST < yy_marsn || yy_marscheck[yy_marsn] != yy_marstoken)
+    goto yy_marsdefault;
+  yy_marsn = yy_marstable[yy_marsn];
+  if (yy_marsn <= 0)
+    {
+      if (yy_marsn == 0 || yy_marsn == YYTABLE_NINF)
+	goto yy_marserrlab;
+      yy_marsn = -yy_marsn;
+      goto yy_marsreduce;
+    }
+
+  if (yy_marsn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yy_marserrstatus)
+    yy_marserrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yy_marstoken, &yy_marslval, &yy_marslloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (yy_marschar != YYEOF)
+    yy_marschar = YYEMPTY;
+
+  yy_marsstate = yy_marsn;
+  *++yy_marsvsp = yy_marslval;
+
+  goto yy_marsnewstate;
+
+
+/*-----------------------------------------------------------.
+| yy_marsdefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yy_marsdefault:
+  yy_marsn = yy_marsdefact[yy_marsstate];
+  if (yy_marsn == 0)
+    goto yy_marserrlab;
+  goto yy_marsreduce;
+
+
+/*-----------------------------.
+| yy_marsreduce -- Do a reduction.  |
+`-----------------------------*/
+yy_marsreduce:
+  /* yy_marsn is the number of a rule to reduce with.  */
+  yy_marslen = yy_marsr2[yy_marsn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yy_marsval = yy_marsvsp[1-yy_marslen];
+
+
+  YY_REDUCE_PRINT (yy_marsn);
+  switch (yy_marsn)
+    {
+        case 3:
+#line 95 "langy.y"
+    { parser_lang  = reverse((yy_marsvsp[(1) - (1)].req));  }
+    break;
+
+  case 4:
+#line 96 "langy.y"
+    { parser_reqs  = reverse((yy_marsvsp[(1) - (1)].req));  }
+    break;
+
+  case 5:
+#line 97 "langy.y"
+    { parser_ruls  = (yy_marsvsp[(1) - (1)].rul);           }
+    break;
+
+  case 7:
+#line 101 "langy.y"
+    { (yy_marsval.req) = (yy_marsvsp[(2) - (2)].req); (yy_marsvsp[(2) - (2)].req)->next = (yy_marsvsp[(1) - (2)].req);   }
+    break;
+
+  case 8:
+#line 105 "langy.y"
+    { (yy_marsval.req) = new_request((yy_marsvsp[(1) - (1)].str),NULL);     }
+    break;
+
+  case 9:
+#line 106 "langy.y"
+    { (yy_marsval.req) = new_request((yy_marsvsp[(1) - (3)].str),(yy_marsvsp[(3) - (3)].par));       }
+    break;
+
+  case 10:
+#line 107 "langy.y"
+    { (yy_marsval.req) = new_request((yy_marsvsp[(1) - (2)].str),NULL);     }
+    break;
+
+  case 11:
+#line 108 "langy.y"
+    { (yy_marsval.req) = new_request((yy_marsvsp[(1) - (4)].str),(yy_marsvsp[(3) - (4)].par));       }
+    break;
+
+  case 12:
+#line 109 "langy.y"
+    { (yy_marsval.req) = new_request(0,(yy_marsvsp[(2) - (3)].par));        }
+    break;
+
+  case 14:
+#line 113 "langy.y"
+    { (yy_marsval.par) = (yy_marsvsp[(3) - (3)].par); (yy_marsvsp[(3) - (3)].par)->next = (yy_marsvsp[(1) - (3)].par);   }
+    break;
+
+  case 15:
+#line 117 "langy.y"
+    { (yy_marsval.par) = new_parameter((yy_marsvsp[(1) - (4)].str),(yy_marsvsp[(4) - (4)].val)); (yy_marsval.par)->interface = (yy_marsvsp[(2) - (4)].req); }
+    break;
+
+  case 16:
+#line 119 "langy.y"
+    {   (yy_marsval.par) = new_parameter((yy_marsvsp[(1) - (6)].str),NULL);
+						(yy_marsval.par)->interface = (yy_marsvsp[(2) - (6)].req);
+						(yy_marsval.par)->subrequest = reverse((yy_marsvsp[(5) - (6)].req));    }
+    break;
+
+  case 17:
+#line 125 "langy.y"
+    {
+											(yy_marsval.par) = new_parameter((yy_marsvsp[(3) - (5)].str),(yy_marsvsp[(5) - (5)].val));      
+											(yy_marsval.par)->default_values=new_value((yy_marsvsp[(1) - (5)].str));
+										}
+    break;
+
+  case 19:
+#line 132 "langy.y"
+    { (yy_marsval.val) = (yy_marsvsp[(3) - (3)].val); (yy_marsvsp[(3) - (3)].val)->next = (yy_marsvsp[(1) - (3)].val);   }
+    break;
+
+  case 20:
+#line 134 "langy.y"
+    { (yy_marsval.val) = new_value((yy_marsvsp[(1) - (1)].str));             }
+    break;
+
+  case 21:
+#line 135 "langy.y"
+    { (yy_marsval.val) = new_value(strcache("\"")); }
+    break;
+
+  case 22:
+#line 136 "langy.y"
+    { 
+											char buf[1024];
+											sprintf(buf,"*%s",(yy_marsvsp[(3) - (4)].str));
+											(yy_marsval.val) = new_value(strcache(buf));  
+											strfree((yy_marsvsp[(3) - (4)].str));
+										}
+    break;
+
+  case 23:
+#line 142 "langy.y"
+    { (yy_marsval.val) = new_value(strcache("*"));  }
+    break;
+
+  case 24:
+#line 143 "langy.y"
+    { (yy_marsval.val) = new_value(strcache("/"));  }
+    break;
+
+  case 25:
+#line 144 "langy.y"
+    { (yy_marsval.val) = new_value(strcache("@"));  }
+    break;
+
+  case 28:
+#line 154 "langy.y"
+    { (yy_marsval.req) = (yy_marsvsp[(2) - (2)].req); (yy_marsvsp[(2) - (2)].req)->next = (yy_marsvsp[(1) - (2)].req);   }
+    break;
+
+  case 29:
+#line 157 "langy.y"
+    { (yy_marsval.str) =  (yy_marsvsp[(2) - (2)].str); }
+    break;
+
+  case 30:
+#line 158 "langy.y"
+    { (yy_marsval.str) =  NULL; }
+    break;
+
+  case 31:
+#line 162 "langy.y"
+    { 
+					  (yy_marsval.req) = new_request((yy_marsvsp[(1) - (6)].str),(yy_marsvsp[(5) - (6)].par)); 
+					  (yy_marsval.req)->info = (yy_marsvsp[(2) - (6)].str);
+					  (yy_marsval.req)->kind = (yy_marsvsp[(3) - (6)].str);
+					}
+    break;
+
+  case 32:
+#line 168 "langy.y"
+    { 
+					  (yy_marsval.req) = new_request((yy_marsvsp[(1) - (5)].str),NULL); 
+					  (yy_marsval.req)->info = (yy_marsvsp[(2) - (5)].str);
+					  (yy_marsval.req)->kind = (yy_marsvsp[(3) - (5)].str);
+					}
+    break;
+
+  case 34:
+#line 175 "langy.y"
+    { (yy_marsval.par) = (yy_marsvsp[(2) - (2)].par); (yy_marsvsp[(2) - (2)].par)->next = (yy_marsvsp[(1) - (2)].par);   }
+    break;
+
+  case 35:
+#line 177 "langy.y"
+    { (yy_marsval.par) = new_parameter((yy_marsvsp[(1) - (5)].str),(yy_marsvsp[(4) - (5)].val)); 
+					   (yy_marsval.par)->interface = (yy_marsvsp[(2) - (5)].req); }
+    break;
+
+  case 36:
+#line 180 "langy.y"
+    { 
+						(yy_marsval.par) = new_parameter((yy_marsvsp[(1) - (7)].str),(yy_marsvsp[(4) - (7)].val)); 
+						(yy_marsval.par)->interface = (yy_marsvsp[(2) - (7)].req);
+						(yy_marsval.par)->default_values = (yy_marsvsp[(7) - (7)].val);
+					}
+    break;
+
+  case 37:
+#line 187 "langy.y"
+    { (yy_marsval.req) = NULL; }
+    break;
+
+  case 38:
+#line 188 "langy.y"
+    { (yy_marsval.req) = new_request(NULL,(yy_marsvsp[(2) - (3)].par)); }
+    break;
+
+  case 40:
+#line 192 "langy.y"
+    { (yy_marsval.val) = (yy_marsvsp[(2) - (2)].val); (yy_marsvsp[(2) - (2)].val)->next = (yy_marsvsp[(1) - (2)].val);   }
+    break;
+
+  case 42:
+#line 197 "langy.y"
+    { (yy_marsval.val) = (yy_marsvsp[(1) - (3)].val); 
+						  	(yy_marsvsp[(1) - (3)].val)->other_names = reverse_other((yy_marsvsp[(3) - (3)].val),NULL);
+						  }
+    break;
+
+  case 45:
+#line 204 "langy.y"
+    { (yy_marsval.val) = (yy_marsvsp[(3) - (3)].val); (yy_marsvsp[(3) - (3)].val)->other_names = (yy_marsvsp[(1) - (3)].val);  }
+    break;
+
+  case 47:
+#line 208 "langy.y"
+    { (yy_marsval.val) = (yy_marsvsp[(1) - (5)].val); (yy_marsvsp[(1) - (5)].val)->expand = reverse_value((yy_marsvsp[(4) - (5)].val),0); }
+    break;
+
+  case 48:
+#line 212 "langy.y"
+    { (yy_marsval.val) = new_reference((yy_marsvsp[(2) - (4)].str),(yy_marsvsp[(4) - (4)].str)); }
+    break;
+
+  case 50:
+#line 218 "langy.y"
+    { (yy_marsval.rul) = (yy_marsvsp[(1) - (2)].rul); (yy_marsvsp[(1) - (2)].rul)->next = (yy_marsvsp[(2) - (2)].rul);}
+    break;
+
+  case 51:
+#line 222 "langy.y"
+    { (yy_marsval.rul) = new_rule((yy_marsvsp[(2) - (4)].con),(yy_marsvsp[(4) - (4)].act));}
+    break;
+
+  case 53:
+#line 226 "langy.y"
+    { (yy_marsval.act) = (yy_marsvsp[(1) - (2)].act); (yy_marsvsp[(1) - (2)].act)->next = (yy_marsvsp[(2) - (2)].act);}
+    break;
+
+  case 55:
+#line 230 "langy.y"
+    { (yy_marsval.con) = new_condition(t_or,(yy_marsvsp[(1) - (3)].con),(yy_marsvsp[(3) - (3)].con));}
+    break;
+
+  case 57:
+#line 234 "langy.y"
+    { (yy_marsval.con) = new_condition(t_and,(yy_marsvsp[(1) - (3)].con),(yy_marsvsp[(3) - (3)].con));}
+    break;
+
+  case 58:
+#line 237 "langy.y"
+    { (yy_marsval.con) = new_condition((yy_marsvsp[(2) - (3)].top),(yy_marsvsp[(1) - (3)].con),(yy_marsvsp[(3) - (3)].con)); }
+    break;
+
+  case 59:
+#line 238 "langy.y"
+    { (yy_marsval.con) = new_condition(t_not,(yy_marsvsp[(2) - (2)].con),NULL); }
+    break;
+
+  case 60:
+#line 239 "langy.y"
+    { (yy_marsval.con) = (yy_marsvsp[(2) - (3)].con); }
+    break;
+
+  case 63:
+#line 244 "langy.y"
+    { (yy_marsval.con) = new_condition(t_val,(condition*)(yy_marsvsp[(1) - (1)].val),NULL);}
+    break;
+
+  case 64:
+#line 247 "langy.y"
+    { (yy_marsval.con) = new_condition(t_func,(condition*)strcache((yy_marsvsp[(1) - (4)].str)),(condition*)strcache((yy_marsvsp[(3) - (4)].str)));}
+    break;
+
+  case 65:
+#line 248 "langy.y"
+    { (yy_marsval.con) = new_condition(t_func,(condition*)strcache((yy_marsvsp[(1) - (3)].str)),NULL);}
+    break;
+
+  case 66:
+#line 252 "langy.y"
+    { (yy_marsval.top) = t_eq;}
+    break;
+
+  case 67:
+#line 253 "langy.y"
+    { (yy_marsval.top) = t_gt;}
+    break;
+
+  case 68:
+#line 254 "langy.y"
+    { (yy_marsval.top) = t_lt;}
+    break;
+
+  case 69:
+#line 255 "langy.y"
+    { (yy_marsval.top) = t_ge;}
+    break;
+
+  case 70:
+#line 256 "langy.y"
+    { (yy_marsval.top) = t_le;}
+    break;
+
+  case 71:
+#line 257 "langy.y"
+    { (yy_marsval.top) = t_ne;}
+    break;
+
+  case 72:
+#line 258 "langy.y"
+    { (yy_marsval.top) = t_in;}
+    break;
+
+  case 73:
+#line 261 "langy.y"
+    { (yy_marsval.act) = new_action(a_set,(yy_marsvsp[(2) - (2)].par)); 
+			           (yy_marsvsp[(2) - (2)].par)->values = reverse_value((yy_marsvsp[(2) - (2)].par)->values,NULL);  }
+    break;
+
+  case 74:
+#line 263 "langy.y"
+    { (yy_marsval.act) = new_action(a_unset,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 75:
+#line 264 "langy.y"
+    { (yy_marsval.act) = new_action(a_warning,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 76:
+#line 265 "langy.y"
+    { (yy_marsval.act) = new_action(a_mail,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 77:
+#line 266 "langy.y"
+    { (yy_marsval.act) = new_action(a_mailuser,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 78:
+#line 267 "langy.y"
+    { (yy_marsval.act) = new_action(a_info,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 79:
+#line 268 "langy.y"
+    { (yy_marsval.act) = new_action(a_error,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 80:
+#line 269 "langy.y"
+    { (yy_marsval.act) = new_action(a_exit,(yy_marsvsp[(2) - (2)].str)); }
+    break;
+
+  case 81:
+#line 270 "langy.y"
+    { (yy_marsval.act) = new_action(a_fail,NULL); }
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+#line 1839 "y.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yy_marsr1[yy_marsn], &yy_marsval, &yy_marsloc);
+
+  YYPOPSTACK (yy_marslen);
+  yy_marslen = 0;
+  YY_STACK_PRINT (yy_marsss, yy_marsssp);
+
+  *++yy_marsvsp = yy_marsval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yy_marsn = yy_marsr1[yy_marsn];
+
+  yy_marsstate = yy_marspgoto[yy_marsn - YYNTOKENS] + *yy_marsssp;
+  if (0 <= yy_marsstate && yy_marsstate <= YYLAST && yy_marscheck[yy_marsstate] == *yy_marsssp)
+    yy_marsstate = yy_marstable[yy_marsstate];
+  else
+    yy_marsstate = yy_marsdefgoto[yy_marsn - YYNTOKENS];
+
+  goto yy_marsnewstate;
+
+
+/*------------------------------------.
+| yy_marserrlab -- here on detecting error |
+`------------------------------------*/
+yy_marserrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yy_marserrstatus)
+    {
+      ++yy_marsnerrs;
+#if ! YYERROR_VERBOSE
+      yy_marserror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yy_marssize = yy_marssyntax_error (0, yy_marsstate, yy_marschar);
+	if (yy_marsmsg_alloc < yy_marssize && yy_marsmsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yy_marsalloc = 2 * yy_marssize;
+	    if (! (yy_marssize <= yy_marsalloc && yy_marsalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yy_marsalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yy_marsmsg != yy_marsmsgbuf)
+	      YYSTACK_FREE (yy_marsmsg);
+	    yy_marsmsg = (char *) YYSTACK_ALLOC (yy_marsalloc);
+	    if (yy_marsmsg)
+	      yy_marsmsg_alloc = yy_marsalloc;
+	    else
+	      {
+		yy_marsmsg = yy_marsmsgbuf;
+		yy_marsmsg_alloc = sizeof yy_marsmsgbuf;
+	      }
+	  }
+
+	if (0 < yy_marssize && yy_marssize <= yy_marsmsg_alloc)
+	  {
+	    (void) yy_marssyntax_error (yy_marsmsg, yy_marsstate, yy_marschar);
+	    yy_marserror (yy_marsmsg);
+	  }
+	else
+	  {
+	    yy_marserror (YY_("syntax error"));
+	    if (yy_marssize != 0)
+	      goto yy_marsexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yy_marserrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (yy_marschar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yy_marschar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yy_marsdestruct ("Error: discarding",
+		      yy_marstoken, &yy_marslval);
+	  yy_marschar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto yy_marserrlab1;
+
+
+/*---------------------------------------------------.
+| yy_marserrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yy_marserrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yy_marserrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yy_marserrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yy_marslen);
+  yy_marslen = 0;
+  YY_STACK_PRINT (yy_marsss, yy_marsssp);
+  yy_marsstate = *yy_marsssp;
+  goto yy_marserrlab1;
+
+
+/*-------------------------------------------------------------.
+| yy_marserrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yy_marserrlab1:
+  yy_marserrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yy_marsn = yy_marspact[yy_marsstate];
+      if (yy_marsn != YYPACT_NINF)
+	{
+	  yy_marsn += YYTERROR;
+	  if (0 <= yy_marsn && yy_marsn <= YYLAST && yy_marscheck[yy_marsn] == YYTERROR)
+	    {
+	      yy_marsn = yy_marstable[yy_marsn];
+	      if (0 < yy_marsn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yy_marsssp == yy_marsss)
+	YYABORT;
+
+
+      yy_marsdestruct ("Error: popping",
+		  yy_marsstos[yy_marsstate], yy_marsvsp);
+      YYPOPSTACK (1);
+      yy_marsstate = *yy_marsssp;
+      YY_STACK_PRINT (yy_marsss, yy_marsssp);
+    }
+
+  if (yy_marsn == YYFINAL)
+    YYACCEPT;
+
+  *++yy_marsvsp = yy_marslval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yy_marsstos[yy_marsn], yy_marsvsp, yy_marslsp);
+
+  yy_marsstate = yy_marsn;
+  goto yy_marsnewstate;
+
+
+/*-------------------------------------.
+| yy_marsacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yy_marsacceptlab:
+  yy_marsresult = 0;
+  goto yy_marsreturn;
+
+/*-----------------------------------.
+| yy_marsabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yy_marsabortlab:
+  yy_marsresult = 1;
+  goto yy_marsreturn;
+
+#ifndef yy_marsoverflow
+/*-------------------------------------------------.
+| yy_marsexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yy_marsexhaustedlab:
+  yy_marserror (YY_("memory exhausted"));
+  yy_marsresult = 2;
+  /* Fall through.  */
+#endif
+
+yy_marsreturn:
+  if (yy_marschar != YYEOF && yy_marschar != YYEMPTY)
+     yy_marsdestruct ("Cleanup: discarding lookahead",
+		 yy_marstoken, &yy_marslval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yy_marslen);
+  YY_STACK_PRINT (yy_marsss, yy_marsssp);
+  while (yy_marsssp != yy_marsss)
+    {
+      yy_marsdestruct ("Cleanup: popping",
+		  yy_marsstos[*yy_marsssp], yy_marsvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yy_marsoverflow
+  if (yy_marsss != yy_marsssa)
+    YYSTACK_FREE (yy_marsss);
+#endif
+#if YYERROR_VERBOSE
+  if (yy_marsmsg != yy_marsmsgbuf)
+    YYSTACK_FREE (yy_marsmsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yy_marsresult);
+}
+
+
+#line 273 "langy.y"
+
+
+#include "langl.c"
+
+static value *reverse_other(value *r,value *s)
+{
+	value *v;
+
+	if(r == NULL) return s;
+
+	v              = r->other_names;
+	r->other_names = s;
+	return reverse_other(v,r); 
+}
+
+static value *reverse_value(value *r,value *s)
+{
+	value *v;
+
+	if(r == NULL) return s;
+
+	v              = r->next;
+	r->next        = s;
+	return reverse_value(v,r); 
+}
+
+static parameter *reverse_parameter(parameter *r,parameter *s)
+{
+	parameter *v;
+
+	if(r == NULL) return s;
+
+	r->values         = reverse_value(r->values,NULL);
+	r->default_values = reverse_value(r->default_values,NULL);
+	v                 = r->next;
+	r->next           = s;
+
+	return reverse_parameter(v,r); 
+}
+
+static request *reverse_request(request *r,request *s)
+{
+	request *v;
+
+	if(r == NULL) return s;
+
+	r->params = reverse_parameter(r->params,NULL);
+	v         = r->next;
+	r->next   = s;
+	return reverse_request(v,r); 
+}
+
+static request *reverse(request *r)
+{
+	return reverse_request(r,NULL);
+}
+
diff --git a/src/libMars/langy.y b/src/libMars/langy.y
new file mode 100644
index 0000000..83aae06
--- /dev/null
+++ b/src/libMars/langy.y
@@ -0,0 +1,328 @@
+%{
+
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "lang.h"
+
+static request *reverse(request*);
+static value *reverse_other(value *r,value *s);
+static value *reverse_value(value *r,value *s);
+request *parser_lang;
+request *parser_reqs;
+rule    *parser_ruls;
+
+%}
+
+%union {
+    char       *str;
+	request    *req;
+	parameter  *par;
+	value      *val;
+	rule       *rul;
+	action     *act;
+	condition  *con;
+	testop      top;
+}
+
+%start all
+
+%token IF
+%token AND
+%token NOT
+%token OR
+%token THEN
+%token WARNING
+%token INFO
+%token MAIL
+%token MAILUSER
+%token ERROR
+%token EXIT
+%token SET
+%token UNSET
+%token IN
+%token FAIL
+
+%token <str>WORD
+
+%type  <req>verb
+%type  <req>verbs
+%type  <req>requests
+%type  <req>request
+%type  <req>intf
+
+%type  <rul>rule;
+%type  <rul>rules;
+
+%type  <act>action;
+%type  <act>actions;
+
+%type  <top>op;
+%type  <con>term;
+%type  <con>factor;
+%type  <con>atom;
+%type  <con>func;
+%type  <con>test;
+
+%type  <par>parameter_list
+%type  <par>parameter_desc
+%type  <par>parameters
+%type  <par>parameter
+
+%type  <str>info
+
+%type  <val>value_list
+%type  <val>value_desc
+%type  <val>reference
+
+%type  <val>aliases
+%type  <val>alias
+
+%type  <val>values
+%type  <val>value
+
+%%
+
+all        : empty
+           | verbs                      { parser_lang  = reverse($1);  }
+           | requests                   { parser_reqs  = reverse($1);  }
+		   | rules                      { parser_ruls  = $1;           }
+		   ;
+
+requests   : request 
+           | requests request           { $$ = $2; $2->next = $1;   }
+           ;
+
+
+request    : WORD                       { $$ = new_request($1,NULL);     }
+           | WORD ',' parameters        { $$ = new_request($1,$3);       }
+           | WORD '.'                   { $$ = new_request($1,NULL);     }
+           | WORD ',' parameters '.'    { $$ = new_request($1,$3);       }
+           | ':' parameters ':'         { $$ = new_request(0,$2);        }
+           ;
+
+parameters : parameter
+           | parameters ',' parameter   { $$ = $3; $3->next = $1;   }
+           ;
+
+parameter  : WORD intf '=' values            
+					{ $$ = new_parameter($1,$4); $$->interface = $2; }
+           | WORD intf '=' '(' requests ')'  
+					{   $$ = new_parameter($1,NULL);
+						$$->interface = $2;
+						$$->subrequest = reverse($5);    }
+
+			/* used for marsgen ... */
+
+           | WORD '@' WORD '=' values   {
+											$$ = new_parameter($3,$5);      
+											$$->default_values=new_value($1);
+										}
+		   ;
+
+values     : value
+           | values '/' value           { $$ = $3; $3->next = $1;   }
+
+value      : WORD                       { $$ = new_value($1);             }     
+           | '\"'                       { $$ = new_value(strcache("\"")); }
+		   | '*'  '[' WORD ']'          { 
+											char buf[1024];
+											sprintf(buf,"*%s",$3);
+											$$ = new_value(strcache(buf));  
+											strfree($3);
+										}
+		   | '*'                        { $$ = new_value(strcache("*"));  }
+		   | '/'                        { $$ = new_value(strcache("/"));  }
+		   | '@'                        { $$ = new_value(strcache("@"));  }
+		   ;
+
+empty      :
+           ;
+
+/*-------------------------------------------------------------------*/
+
+
+verbs            : verb 
+                 | verbs verb            { $$ = $2; $2->next = $1;   }
+                 ;
+
+info             : ';' WORD { $$ =  $2; }
+				 | empty    { $$ =  NULL; }
+				 ;
+
+verb             : WORD info info '{' parameter_list '}' 
+					{ 
+					  $$ = new_request($1,$5); 
+					  $$->info = $2;
+					  $$->kind = $3;
+					}
+                 | WORD info info  '{' '}'                
+					{ 
+					  $$ = new_request($1,NULL); 
+					  $$->info = $2;
+					  $$->kind = $3;
+					}
+
+parameter_list   : parameter_desc
+                 | parameter_list parameter_desc { $$ = $2; $2->next = $1;   }
+
+parameter_desc   : WORD intf '{' value_list '}' { $$ = new_parameter($1,$4); 
+					   $$->interface = $2; }
+			     | WORD intf '{' value_list '}' '=' values 
+				 	{ 
+						$$ = new_parameter($1,$4); 
+						$$->interface = $2;
+						$$->default_values = $7;
+					}
+				 ;
+
+intf             : empty { $$ = NULL; }
+				 | '[' parameters ']' { $$ = new_request(NULL,$2); }
+				 ;
+
+value_list       : value_desc
+			     | value_list value_desc { $$ = $2; $2->next = $1;   }
+				 ;
+
+
+value_desc       : alias
+				 | alias ';' aliases { $$ = $1; 
+						  	$1->other_names = reverse_other($3,NULL);
+						  }
+				 | reference 
+				 ;
+
+aliases          : alias
+				 | aliases ';' alias { $$ = $3; $3->other_names = $1;  }
+				 ;
+
+alias            : value
+				 | value '=' '(' values ')' { $$ = $1; $1->expand = reverse_value($4,0); }
+				 ;
+
+
+reference        : '&' WORD '&' WORD { $$ = new_reference($2,$4); }
+				 ;
+
+/*-------------------------------------------------------------------*/
+
+rules  : rule
+	   | rule rules { $$ = $1; $1->next = $2;}
+	   ;
+
+
+rule   : IF term THEN actions { $$ = new_rule($2,$4);}
+	   ;
+
+actions : action 
+		| action actions { $$ = $1; $1->next = $2;}
+		;
+
+term   : factor 
+	   | factor OR  term   { $$ = new_condition(t_or,$1,$3);}
+	   ;
+
+factor : test   
+	   | test   AND factor { $$ = new_condition(t_and,$1,$3);}
+	   ; 
+
+test   : atom op atom     { $$ = new_condition($2,$1,$3); }
+	   | NOT term         { $$ = new_condition(t_not,$2,NULL); }
+	   | '(' term ')'     { $$ = $2; }
+	   | atom             
+	   | func
+	   ;
+
+atom   : values           { $$ = new_condition(t_val,(condition*)$1,NULL);} 
+	   ;
+
+func:    WORD '(' WORD ')' { $$ = new_condition(t_func,(condition*)strcache($1),(condition*)strcache($3));}
+	| WORD '(' ')' { $$ = new_condition(t_func,(condition*)strcache($1),NULL);}
+    ;
+
+
+op     : '='      { $$ = t_eq;}
+	   | '>'      { $$ = t_gt;}
+	   | '<'      { $$ = t_lt;}
+	   | '>' '='  { $$ = t_ge;}
+	   | '<' '='  { $$ = t_le;}
+	   | '<' '>'  { $$ = t_ne;}
+	   | IN       { $$ = t_in;}
+	   ;
+
+action : SET parameter { $$ = new_action(a_set,$2); 
+			           $2->values = reverse_value($2->values,NULL);  }
+	   | UNSET WORD    { $$ = new_action(a_unset,$2); }
+	   | WARNING WORD  { $$ = new_action(a_warning,$2); }
+	   | MAIL    WORD  { $$ = new_action(a_mail,$2); }
+	   | MAILUSER WORD { $$ = new_action(a_mailuser,$2); }
+	   | INFO    WORD  { $$ = new_action(a_info,$2); }
+	   | ERROR   WORD  { $$ = new_action(a_error,$2); }
+	   | EXIT    WORD  { $$ = new_action(a_exit,$2); }
+	   | FAIL          { $$ = new_action(a_fail,NULL); }
+	   ;
+
+%%
+
+#include "langl.c"
+
+static value *reverse_other(value *r,value *s)
+{
+	value *v;
+
+	if(r == NULL) return s;
+
+	v              = r->other_names;
+	r->other_names = s;
+	return reverse_other(v,r); 
+}
+
+static value *reverse_value(value *r,value *s)
+{
+	value *v;
+
+	if(r == NULL) return s;
+
+	v              = r->next;
+	r->next        = s;
+	return reverse_value(v,r); 
+}
+
+static parameter *reverse_parameter(parameter *r,parameter *s)
+{
+	parameter *v;
+
+	if(r == NULL) return s;
+
+	r->values         = reverse_value(r->values,NULL);
+	r->default_values = reverse_value(r->default_values,NULL);
+	v                 = r->next;
+	r->next           = s;
+
+	return reverse_parameter(v,r); 
+}
+
+static request *reverse_request(request *r,request *s)
+{
+	request *v;
+
+	if(r == NULL) return s;
+
+	r->params = reverse_parameter(r->params,NULL);
+	v         = r->next;
+	r->next   = s;
+	return reverse_request(v,r); 
+}
+
+static request *reverse(request *r)
+{
+	return reverse_request(r,NULL);
+}
diff --git a/src/libMars/list.c b/src/libMars/list.c
new file mode 100755
index 0000000..fffdba7
--- /dev/null
+++ b/src/libMars/list.c
@@ -0,0 +1,34 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+boolean in_list(marslist *l,const char *name,void *data)
+{
+	while(l)
+	{
+		if(EQ(l->name,name)) 
+			return true;
+		l = l->next;
+	}
+	return false;
+
+}
+
+
+void add_to_list(marslist **l,const char *name,void *data)
+{
+	marslist *f = NEW(marslist);
+	f->name = strcache(name);
+	f->next = *l;
+	f->data = data;
+	*l = f;
+}
+
diff --git a/src/libMars/llmatrix.c b/src/libMars/llmatrix.c
new file mode 100644
index 0000000..761b908
--- /dev/null
+++ b/src/libMars/llmatrix.c
@@ -0,0 +1,274 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <math.h>
+#include <limits.h>
+#include "mars.h"
+
+/*
+ LLMATRIX
+ AREA
+ GRID
+ NORTH
+ WEST
+ EAST
+ SOUTH
+ NLAT
+ NLON
+ DATA
+*/
+
+
+err llmatrix_to_grib(const char *in,const char *out)
+{
+	fortint     ksec0[ISECTION_0];
+	gribsec1    ksec1;
+	gribsec2_ll ksec2;
+	fortint     ksec3[ISECTION_3];
+	fortint     ksec4[ISECTION_4];
+
+	fortfloat   psec2[RSECTION_2];
+	fortfloat   psec3[RSECTION_3];
+	fortfloat   missing = FLT_MAX;
+
+
+	err e = 0;
+	int miss = 0;
+	fortint nlat,nlon,nbits;
+	fortfloat north,west,south,east,ew,ns;
+	char *buffer =NULL;
+	fortint buflen;
+	fortfloat *psec4 =NULL;
+	fortint i,npoints;
+	int n = 0;
+	char line[1024];
+	char *tmp = marstmp();
+	FILE *f,*g;
+	request *r;
+	const char *p;
+
+	CLEAR(ksec0);
+	CLEAR(ksec1);
+	CLEAR(ksec2);
+	CLEAR(ksec3);
+	CLEAR(ksec4);
+	CLEAR(psec2);
+	CLEAR(psec3);
+
+	f = fopen(in,"r");
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",in);
+		return -1;
+	}
+
+	g = fopen(tmp,"w");
+	if(!g)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",tmp);
+		fclose(f);
+		return -1;
+	}
+
+
+	while(fgets(line,sizeof(line),f))
+	{
+		if(*line != '#')
+		{
+			int l = strlen(line)-1;
+
+			while(l >= 0 && (
+					line[l] == ' '  || 
+					line[l] == '\n' || 
+					line[l] == ','  || 
+					line[l] == '\t')
+					)
+				line[l--] = 0;
+
+
+			if(n == 0) {
+				/* Look for a = */
+				char *p  = line;
+				int flg  = 0;
+				while(*p) if(*p++ == '=') flg++;
+				/* If a =, add a verb */
+				if(flg) {
+					fprintf(g,"LLMATRIX");
+					fprintf(g,",%s",line);
+				}
+				else fprintf(g,"%s",line);
+			}
+			else fprintf(g,",%s",line);
+			n++;
+		}
+		if(strncmp(line,"#DATA",5)==0) 
+			break;
+	}
+
+	fclose(g);
+
+	r = read_request_file(tmp);
+	unlink(tmp);
+	print_all_requests(r);
+
+	north   = atof((p=get_value(r,"NORTH",0))?p:"0");
+	west    = atof((p=get_value(r,"WEST", 0))?p:"0");
+	ew      = atof((p=get_value(r,"GRID", 0))?p:"0");
+	ns      = atof((p=get_value(r,"GRID", 1))?p:"0");
+	nlat    = atol((p=get_value(r,"NLAT", 0))?p:"0");
+	nlon    = atol((p=get_value(r,"NLON", 0))?p:"0");
+	missing = (p=get_value(r,"MISSING", 0))?atof(p):missing;
+
+	if(ew == 0 || ns == 0 || nlat == 0 || nlon == 0)
+	{
+		marslog(LOG_EROR,"Invalid ll-matrix");
+		fclose(f);
+		return -1;
+	}
+
+	npoints = nlat * nlon;
+
+	south   = north - (nlat-1) * ns;
+	east    = west  + (nlon-1) * ew;
+
+	/* ============================================================ */
+
+	psec4 = NEW_ARRAY(fortfloat,npoints);
+
+	n = 0;
+	for(i=0;i<npoints;i++)
+	{
+#ifndef R64
+		if(fscanf(f,"%f",&psec4[i])>0)
+#else
+		if(fscanf(f,"%lf",&psec4[i])>0)
+#endif
+		{
+			n++;
+			if(psec4[i] == missing)
+				miss++;
+		}
+	}
+	fclose(f);
+
+	if(n != npoints)
+	{
+		marslog(LOG_EROR,"File %s, read %d values out of %d expected",
+			in,n,npoints);
+		e = -1;
+		goto error;
+	}
+
+	 /* 1 k header + 32 bit packing */
+
+	buflen = (npoints + 1024)*4;
+	buffer = (char*)MALLOC(buflen);
+
+	/* ============================================================ */
+
+	ksec1.version         = 128;
+	ksec1.center          =  98;
+	ksec1.generation      = mars.computeflg;
+	ksec1.grid_definition = 255;
+	ksec1.flags           = miss?192:128;
+
+
+	ksec1.parameter       = 255;
+	ksec1.level_type      = GRIB_SURFACE;
+
+	ksec1.year            = 94;
+	ksec1.month           = 1;
+	ksec1.day             = 1;
+	ksec1.century         = 20;
+
+
+	ksec1.time_unit       = 1;
+	ksec1.local_use       = 1;
+	ksec1.local.ecmwf_local_id  = GRIB_ENSEMBLE_FORECAST;
+	ksec1.local.mars_class      = GRIB_CLASS_OD;
+	ksec1.local.mars_type       = 3;    /* IA */
+	ksec1.local.mars_stream     = 1025; /* DA */
+	ksec1.local.mars_expver     = 0x30303031; /* 01 */
+
+	ksec2.data_rep        = GRIB_LAT_LONG;
+	ksec2.points_parallel = nlon;
+	ksec2.points_meridian = nlat;
+
+	ksec2.limit_north = (fortint)(north * GRIB_FACTOR);
+	ksec2.limit_west  = (fortint)(west * GRIB_FACTOR);
+	ksec2.resolution  = 128;
+	ksec2.limit_south = (fortint)(south * GRIB_FACTOR);
+	ksec2.limit_east  = (fortint)(east * GRIB_FACTOR);
+	ksec2.grid_ew     = (fortint)(ew * GRIB_FACTOR);
+	ksec2.grid_ns     = (fortint)(ns * GRIB_FACTOR);
+
+
+	/*  Missing value */
+
+	ksec3[0] = 0;
+	ksec3[1] = INT_MAX;
+	psec3[1] = missing;
+
+	/*  Data */
+
+	ksec4[0] = npoints;
+	ksec4[1] = nbits = best_packing(ksec4[1]);
+
+	printf("nbits   = %d\n",nbits);
+	printf("missing = %g\n",missing);
+
+	if(cgribex( ksec0,(fortint*)&ksec1, (fortint*)&ksec2,psec2,
+		ksec3,psec3, ksec4,psec4,
+		npoints, buffer, &buflen, "C") != 0)
+	{
+		marslog(LOG_EROR,"Error encoding GRIB");
+		e = -1;
+		goto error;
+	}
+
+/*
+	psec3[1] = 9999;
+	e = cgribex( ksec0,(fortint*)&ksec1, (fortint*)&ksec2,psec2,
+		ksec3,psec3, ksec4,psec4,
+		npoints, buffer, &buflen, "D");
+	printf("decode %d\n",e);
+*/
+
+	f = fopen(out,"w");
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",out);
+		e = -1;
+		goto error;
+	}
+
+	if(fwrite(buffer,1,buflen,f) != buflen)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fwrite(%s) failed",out);
+		e = -1;
+	}
+		
+	if(fclose(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"fclose(%s) failed",out);
+		e = -1;
+	}
+
+error:
+	FREE(psec4);
+	FREE(buffer);
+	return e;
+}
+
+
+err grib_to_llmatrix(const char *g,const char *m)
+{
+	return -1;
+}
diff --git a/src/libMars/lock.c b/src/libMars/lock.c
new file mode 100755
index 0000000..63200be
--- /dev/null
+++ b/src/libMars/lock.c
@@ -0,0 +1,20 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+void marslock(char *resource,boolean shared)
+{
+}
+
+void marsunlock(char *resource)
+{
+}
+
diff --git a/src/libMars/logfile.c b/src/libMars/logfile.c
new file mode 100755
index 0000000..40c6687
--- /dev/null
+++ b/src/libMars/logfile.c
@@ -0,0 +1,327 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <malloc.h>
+#include <errno.h>
+#include <time.h>
+#include "mars.h"
+
+static FILE *marslogf = NULL;
+
+static char *titles[] = {
+	"DEBUG ",
+	"INFO  ",
+	"WARN  ",
+	"ERROR ",
+	"FATAL ",
+};
+
+typedef struct exitrec {
+	struct exitrec *next;
+	exitproc        proc;
+	void           *data;
+	long			pid;
+} exitrec;
+
+static exitrec *exits = NULL;
+
+#define MAXKEEP 5
+
+static int keepptr =  0;
+
+static char *keep[MAXKEEP] = {
+	0,
+};
+
+typedef struct logmessage {
+	struct logmessage *next;
+	char              *msg;
+} logmessage;
+
+static boolean already_logged(char *msg)
+{
+    static logmessage *messages = NULL;
+	logmessage *l = messages;
+	logmessage *n = NULL;
+
+	char *m = strcache(msg);
+
+	while(l)
+	{
+		if(l->msg == m)
+			return true;
+		l = l->next;
+	}
+
+	n = NEW_CLEAR(logmessage);
+	n->msg    = m;
+	n->next   = messages;
+	messages  = n;
+
+	return false;
+}
+
+void marsdebug(boolean on)
+{
+	mars.debug = on;
+}
+
+FILE* marslogfile(FILE* f)
+{
+	FILE* old = marslogf;
+	marslogf = f;
+	return old;
+}
+
+void mars_grib_api_log(const grib_context* c, int level, const char* msg)
+{
+	int lvl = LOG_EROR;
+	int debug_setting = mars.debug;
+	switch(level) {
+		case GRIB_LOG_INFO:    lvl = LOG_INFO; break;
+		case GRIB_LOG_WARNING: lvl = LOG_WARN; break;
+		case GRIB_LOG_ERROR:   lvl = LOG_EROR; break;
+		case GRIB_LOG_FATAL:   lvl = LOG_EXIT; break;
+		case GRIB_LOG_DEBUG:   lvl = LOG_DBUG; break;
+	}
+
+	/* If GRIB_LOG_DEBUG, we need to set mars.debug in order for MARS to print it */
+	if(level == GRIB_LOG_DEBUG) mars.debug=true;
+	marslog(lvl,"%s [grib_api]",msg);
+	if(level == GRIB_LOG_DEBUG) mars.debug=debug_setting;
+}
+
+
+void marslog(int level,char *fmt,...)
+{
+	char buf[80];
+	va_list list;
+	time_t now;
+	int     lvl  = level & (~(LOG_PERR | LOG_NOCR | LOG_ONCE));
+	boolean per  = (boolean)((level & LOG_PERR) == LOG_PERR);
+	boolean nocr = (boolean)((level & LOG_NOCR) == LOG_NOCR);
+	boolean once = (boolean)((level & LOG_ONCE) == LOG_ONCE);
+	boolean out  = (boolean)((mars.outproc == NULL||lvl == LOG_DBUG||lvl == LOG_EXIT));
+
+	char msg[1024];
+
+	if(marslogf == NULL)
+		marslogf = stdout;
+
+	if(mars.quiet) 
+	{
+		if(lvl == LOG_EXIT) marsexit(1);
+		return;
+	}
+
+	if(lvl == LOG_DBUG &&  !mars.debug)
+		return;
+
+	if(lvl == LOG_WARN && !mars.warning)
+		return;
+
+	if(lvl == LOG_INFO && !mars.info)
+		return;
+
+	/* if(lvl == LOG_SMS) */
+	if((mars.sms_label || mars.ecflow_label) && (lvl != LOG_DBUG))
+	{
+		char buf[1024];
+		char cmd[1024];
+
+		if(!mars.sms_label && !mars.ecflow_label)
+			return;
+
+		va_start(list,fmt);
+		vsprintf(buf, fmt, list);
+		va_end(list);
+
+		if(mars.sms_label && !mars.ecflow_label)
+		{
+			sprintf(cmd,"env SMSDENIED=1 smslabel %s '%d out of %d' '%s' 2>&1 >/dev/null &",
+				mars.sms_label,
+				mars.current_request,
+				mars.number_of_requests,
+				buf);
+		}
+
+		if(mars.ecflow_label)
+		{
+			sprintf(cmd,"env ECF_DENIED=1 ecflow_client --label %s '%d out of %d' '%s' 2>&1 >/dev/null &",
+				mars.ecflow_label,
+				mars.current_request,
+				mars.number_of_requests,
+				buf);
+		}
+		system(cmd);
+
+		/* return; */
+	}
+
+	va_start(list,fmt);
+	vsprintf(msg, fmt, list);
+	va_end(list);
+
+	if(once && already_logged(msg) && (lvl != LOG_DBUG))
+		return;
+
+	time(&now);
+	strftime(buf,sizeof(buf),"%Y%m%d.%H%M%S",gmtime(&now));
+	if(!mars.show_pid)		
+		fprintf(marslogf,"%s - %s - %s - ",progname(),titles[lvl],buf);
+	else
+		fprintf(marslogf,"%s [%6d] - %s - %s - ",progname(),mars.show_pid,titles[lvl],buf);
+
+	fprintf(marslogf,"%s",msg);
+
+	if(per && errno)
+		fprintf(marslogf," (%s)",strerror(errno));
+
+	if(!nocr) {
+		fputc('\n',marslogf);
+		fflush(marslogf);
+	}
+		
+	if(!out)
+	{
+		char buf[1024];
+		va_start(list,fmt);
+		vsprintf(buf, fmt, list);
+		va_end(list);
+
+
+		level &= ~LOG_NOCR;
+		level &= ~LOG_PERR;
+
+		if(level == LOG_EXIT)
+			level = LOG_EROR;
+
+		if(per && errno)
+		{
+			strcat(buf," (");
+			strcat(buf,strerror(errno));
+			strcat(buf," )");
+		}
+
+		mars.outproc(level,buf);
+
+	}
+
+	level &= ~LOG_NOCR;
+	level &= ~LOG_PERR;
+	if(level == LOG_EXIT || level == LOG_EROR)
+	{
+		char buf[1024];
+		va_start(list,fmt);
+		vsprintf(buf, fmt, list);
+		va_end(list);
+
+		if(per && errno)
+		{
+			strcat(buf," (");
+			strcat(buf,strerror(errno));
+			strcat(buf," )");
+		}
+
+		strfree(keep[keepptr]);
+		keep[keepptr++] = strcache(buf);
+		keepptr %= MAXKEEP;
+	}
+
+	if(lvl == LOG_EXIT)
+		marsexit(1);
+
+}
+
+void log_errors()
+{
+	int i;
+	for(i=0;i<MAXKEEP;i++)
+	{
+		char *p = keep[(keepptr+i)%MAXKEEP];
+		if(p) log_statistics("reason","%s",p);
+	}
+}
+
+void install_exit_proc(exitproc p,void *data)
+{
+	exitrec *e = NEW_CLEAR(exitrec);
+
+	e->pid  = getpid();
+	e->proc = p;
+	e->data = data;
+	e->next = exits;
+	exits = e;
+}
+
+void remove_exit_proc(exitproc p,void *data)
+{
+	exitrec *e = exits;
+	exitrec *f = NULL;
+
+	while(e)
+	{
+		exitrec *g = e->next;
+		if(e->proc == p && e->data == data)
+		{
+			if(f) f->next = e->next;
+			else exits = e->next;
+			FREE(e);
+		}
+		else
+			f = e;
+		e = g;
+	}
+}
+
+
+
+static void cleanup(int code)
+{
+	static boolean done = false;
+	exitrec *e = exits;
+	long pid = getpid();
+
+	if(done) return;
+
+	done = true;
+	while(e)
+	{
+		if(e->pid == pid)
+			e->proc(code,e->data);
+		e = e->next;
+	}
+}
+
+void _marsexit(void)
+{
+	cleanup(0);
+}
+
+void marsexit(int code)
+{
+	code = code ? 1 : 0;
+	cleanup(code);
+	exit(code);
+}
+
+#if 0
+void dumpmem(void)
+{
+#ifndef VMS
+	static long last = 0;
+	struct mallinfo minfo = mallinfo();
+	marslog(LOG_INFO,"memory : %d (%d)",minfo.uordblks,minfo.uordblks - last);
+	last = minfo.uordblks;
+#endif
+}
+#endif
diff --git a/src/libMars/macro_api.c b/src/libMars/macro_api.c
new file mode 100644
index 0000000..c8e460f
--- /dev/null
+++ b/src/libMars/macro_api.c
@@ -0,0 +1,1310 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "mars.h"
+
+/* macro_api.h has no dependencies on mars.h */
+#include "macro_api.h"
+
+/* macro_api_internals.h hides Mars dependancies, it includes mars.h */
+#include "macro_api_internals.h"
+
+/*=====================================
+
+ Mars to external routines communication
+
+ This file contains the implementation for:
+ - the original Fortran interface routines ('MGET*'/'MSET*')
+ - the second generation Fortran interface routines ('mfi_*')
+   - except two routines implemented in file macro_api_f90.f90
+   - internal Fortran interface routines ('mifi_*')
+ - C/C++ interface functions ('mci_*')
+
+=====================================*/
+
+/* int mgetg_C( gribarg** g, int* c ); */
+
+#ifdef FORTRAN_UPPERCASE
+#define marscnt_ MARSCNT
+#define marsarg_ MARSARG
+#define marsret_ MARSRET
+#define marsend_ MARSEND
+#define marsout_ MARSOUT
+#define gribnew_ GRIBNEW
+#define gribcnt_ GRIBCNT
+#define gribcopy_ GRIBCOPY
+#define gribdata_ GRIBDATA
+#define gribfile_ GRIBFILE
+#define gribfree_ GRIBFREE
+#define gribnext_ GRIBNEXT
+#define gribsave_ GRIBSAVE
+#define mfail_ MFAIL
+#define mgetb_ MGETB
+#define mgetg_ MGETG
+#define mgeti_ MGETI
+#define mgetm_ MGETM
+#define mgetn2_ MGETN2
+#define mgetn_ MGETN
+#define mgets_ MGETS
+#define mgetv_ MGETV
+#define msetb_ MSETB
+#define msetg_ MSETG
+#define mseti_ MSETI
+#define msetm_ MSETM
+#define msetn2_ MSETN2
+#define msetn_ MSETN
+#define msets_ MSETS
+#define msetv_ MSETV
+#define mloadb_ MLOADB
+#define mloadg_ MLOADG
+#define mnewb_ MNEWB
+#define mnewg_ MNEWG
+#define mrewg_ MREWG
+#endif
+
+
+static int       argc = 0;
+static int       argn = 0;
+static arg*      args = NULL;
+static boolean sFirst = true;
+static char*    sName = NULL;
+static char*    sFile = NULL;
+
+
+/* To avoid sending pointers back to the user program, we maintain a list of all
+   gribarg pointers generated here and return indexes into our list instead.
+*/
+
+static fortint num_gribargs = 0;
+static void **gribargs = NULL;
+
+
+
+static fortint add_new_gribarg_pointer (void *new_gribarg_ptr)
+{
+    num_gribargs++;
+    gribargs = realloc (gribargs, num_gribargs * sizeof(void *));
+    gribargs[num_gribargs-1] = new_gribarg_ptr;
+    return num_gribargs-1;
+}
+
+static void *get_gribarg_ptr_from_index (int index)
+{
+    return gribargs[index];
+}
+
+
+static fortint get_gribarg_index_from_ptr (void *ptr)
+{
+    fortint i;
+    
+    for (i = 0 ; i < num_gribargs; i++)
+    {
+        if (gribargs[i] == ptr)
+            return i;
+    }
+    
+    marslog(LOG_EXIT,"get_gribarg_index_from_ptr: pointer not found in list of %d pointers.", num_gribargs);
+    return 0;
+}
+
+
+
+static void mout(int lvl,char *msg)
+{
+}
+
+static void the_end(int code,void *data)
+{
+	printf("end is %d\n",code);
+}
+
+static void minit(void)
+{
+	int      ac;
+	char    *av;
+	request *r,*s;
+	int     i;
+
+	if(!sFirst)
+	   return;
+
+	sFirst = false;
+
+	sFile = getenv("MREQUEST");
+	sName = getenv("MNAME");
+
+	ac = 1;
+	av = strcache(sName?sName:"external");
+
+	marsinit(&ac,&av,0,0,0);
+
+	if(!sFile)
+	   marslog(LOG_EXIT,"Mars/Metview external environment not set");
+
+	/* mars.outproc = mout; */
+
+	s = r = read_request_file(sFile);
+	while(s) {
+		s = s->next;
+		argc++;
+	}
+
+	/* empty file */
+	fclose(fopen(sFile,"w"));
+
+	if(argc == 0)
+	   return;
+
+	args = NEW_ARRAY(arg,argc);
+	i = 0;
+
+	while(r)
+	{
+		const char *t = r->name;
+		const char *v = get_value(r,"VALUE",0);
+
+		if(t == NULL)
+			marslog(LOG_EXIT,"No data type");
+		else if( EQ(t,"NUMBER"))
+		{
+			args[i].kind = 'N';
+			args[i].u.dval = v?atof(v):0.0;
+		}
+		else if( EQ(t,"STRING") )
+		{
+			args[i].kind = 'S';
+			args[i].u.sval = strcache(v?v:"");
+		}
+		else if( EQ(t,"GRIB") )
+		{
+			args[i].kind = 'G';
+			args[i].u.rval = r;
+		}
+		else if( EQ(t,"BUFR") )
+		{
+			args[i].kind = 'B';
+			args[i].u.rval = r;
+		}
+		else if( EQ(t,"IMAGE") )
+		{
+			args[i].kind = 'I';
+			args[i].u.rval = r;
+		}
+		else if( EQ(t,"VECTOR") )
+		{
+			args[i].kind = 'V';
+			args[i].u.rval = r;
+		}
+		else marslog(LOG_EXIT,"Unsupported type %s",t);
+
+		r = r->next;
+		i++;
+	}
+
+	/* install_exit_proc(the_end,NULL); */
+
+}
+
+static void mcheck(fortint *n,char kind, char *name)
+{
+	minit();
+
+	if(*n == 0)
+	   *n = argn+1;
+
+	if(*n < 1 || *n > argc)
+		marslog(LOG_EXIT,"Parameter %d is is out of range."
+		    " Only %d parameters where passed",*n,argc);
+	if(args[*n-1].kind != kind)
+		marslog(LOG_EXIT,"Parameter %d is not of type %s",*n,name);
+
+	argn = *n;
+}
+
+
+/* read_vector_from_request 
+     Reads the given request and reads in the associated vector file.
+     Memory is allocated here for the vector, so it is then the responsibility
+     of the called to handle it.
+     Returns 0 if ok, 1 on error.
+*/
+int read_vector_from_request( request *r, double** vec, int* length )
+{
+   int size, i;
+   const char *c;
+   const char *path;
+   double *v;
+   char buf[20] = "";
+   FILE *f;
+   int read;
+
+   path = get_value( r, "PATH", 0 );     /* get the path to the storage file */
+
+   f = fopen(path, "r");
+   
+   if (!f)
+   {
+      marslog( LOG_EXIT, "read_vector_from_request: unable to load file %s", path);
+   }
+   else
+   {
+      fread (buf, sizeof(char), 14, f);
+      buf[14] = '\0';
+
+      if (strcmp(buf, "METVIEW_VECTOR"))
+      {
+         marslog (LOG_EXIT, "read_vector_from_request: start of vector file should be METVIEW_VECTOR. Is: %s", buf);
+      }
+
+      read = fread (&size, sizeof(int),    1,    f);  /* read the number of values */
+
+
+      /*-- vector to be returned, must be free'd by the calling pgm --*/
+      v = malloc( size*sizeof(double) );
+      if( !v )
+      {
+          marslog( LOG_EXIT
+              ,"read_vector_from_request: unable to get memory for %d elements"
+              ,size );
+      }
+
+      read = fread (v, sizeof(double), size, f);  /* read the values */
+
+      if (read != size)
+      {
+          marslog (LOG_EXIT, "read_vector_from_request: tried to write %d elements - managed %d.", size, read);
+      }
+
+     *vec    = v;
+     *length = size;
+    } 
+}
+
+
+
+int write_vector_to_file(FILE *f, int size, double *values)
+{
+	size_t written;
+
+	fprintf (f, "METVIEW_VECTOR");
+	written = fwrite (&size,   sizeof(int),    1,    f);  /* write the number of values */
+	written = fwrite (values,  sizeof(double), size, f);  /* write the values */
+
+	if (written != size)
+	{
+		marslog(LOG_EXIT, "Tried to write %d elements - managed %d.", size, written);
+	}
+
+	return ferror(f);
+}
+
+
+
+
+
+static void getn(fortint n,double *d)
+{
+	mcheck(&n,'N',"number");
+	*d = args[n-1].u.dval;
+}
+
+void mgetn_(fortfloat *f)
+{
+	double d;
+	getn(0,&d);
+	*f = d;
+}
+
+void mgetn2_(double *d)
+{
+	getn(0,d);
+}
+
+void mgetv_(fortint *s, fortfloat *v)
+{
+   fortint n = 0;
+   int i, length;
+   fortint size;
+   request* r;
+   double *vec;
+
+   mcheck( &n, 'V', "vector" );         /* ensure that next is a vector */
+   r = args[n-1].u.rval;
+
+   read_vector_from_request(r, &vec, &length);
+   size = (fortint) length;
+
+
+   if (size > *s)
+   {
+       marslog( LOG_EROR
+               , "MGETV: Fortran array too small, only %d first vector values returned"
+               , *s );
+       size = *s;
+   }
+
+   /* convert to fortfloat */
+   for (i=0; i<size; ++i)
+   {
+      v[i] = (fortfloat)vec[i];
+   }
+
+
+   /* we are responsible for freeing the memory allocated by read_vector_from_request(). */
+   
+   if (vec)
+     free (vec);
+
+  *s = size;
+}
+
+void mgets_(char *s,fortint l_s)
+{
+	fortint n = 0;
+	char *p;
+	mcheck(&n,'S',"string");
+	p = args[n-1].u.sval;
+	n = strlen(p);
+	memset(s,' ',l_s);
+
+	if(n > l_s)
+	{
+		marslog(LOG_EROR,"MGETS, string too small %d>%d",
+		    n,l_s);
+		n = l_s;
+	}
+
+	strncpy(s,p,n);
+}
+
+
+static fieldset *getg(fortint n)
+{
+	mcheck(&n,'G',"fieldset");
+	/*-- we have to process one request at a time in case mgetg is called */
+	/*-- more than once (in case there are several fieldset parameters)   */
+	return request_to_fieldset( clone_one_request(args[n-1].u.rval) );
+}
+
+
+static int mgetg_C( gribarg** g, int* c)
+{
+	fieldset *v = getg(0);
+	if(!v)
+	    return 1;
+
+	*g = NEW_CLEAR(gribarg);
+	*c = v->count;
+	(*g)->v = v;
+	return 0;
+}
+
+void mgetg_(fortint* g,fortint* c)
+{
+	fortint newga;
+	gribarg* gc;
+	int err = mgetg_C( &gc, (int*)c );
+	if( err )
+	    marslog(LOG_EXIT,"MGETG, Cannot load grib file");
+
+    newga = add_new_gribarg_pointer(gc);
+	*g = newga;
+}
+
+static fieldset *geti(fortint n)
+{
+	mcheck(&n,'I',"image");
+	return request_to_fieldset(args[n-1].u.rval);
+}
+
+
+void mfail_(char *msg,fortint l_msg);
+
+void mnewb_()  {
+	mfail_("MNEWB is not yet implemeted",0);
+}
+void mgetb_()  {
+	mfail_("MGETB is not yet implemeted",0);
+}
+void msetb_()  {
+	mfail_("MSETB is not yet implemeted",0);
+}
+void mloadb_() {
+	mfail_("MLOADB is not yet implemeted",0);
+}
+void msaveb_() {
+	mfail_("MSAVEB is not yet implemeted",0);
+}
+void mgetm_()  {
+	mfail_("MGETM is not yet implemeted",0);
+}
+void msetm_()  {
+	mfail_("MSETM is not yet implemeted",0);
+}
+
+void mgeti_(fortint *g,fortint  *c)
+{
+	fortint newga;
+	fieldset *v = geti(0);
+	gribarg  *a = NEW_CLEAR(gribarg);
+	if(!v)
+	   marslog(LOG_EXIT,"MGETI, Cannot load image file");
+
+	*c = v->count;
+	a->v = v;
+	newga = add_new_gribarg_pointer(a);
+	*g = newga;
+}
+
+void mloadg_(fortint *g,char *p,fortint *c)
+{
+	gribarg  *a = (gribarg*)(get_gribarg_ptr_from_index(*g));
+	fieldset *v = a->v;
+	int i = a->cnt++;
+	long int msg_len = (*c)*sizeof(fortint);
+
+	minit();
+
+	if(i < 0 || i >= v->count)
+		marslog(LOG_EXIT,"MLOADG, No more fields");
+
+
+	if( (*c)*sizeof(fortint) < v->fields[i]->length)
+		marslog(LOG_EXIT,"MLOADG, Buffer too small %d words (should be %d words)",
+		    *c, (v->fields[i]->length + (sizeof(fortint) - 1) )/ sizeof(fortint));
+
+	if(a->f == NULL || a->file != v->fields[i]->file->fname)
+	{
+		if(a->f)
+		   fclose(a->f);
+		strfree(a->file);
+		a->file = strcache(v->fields[i]->file->fname);
+		a->f = fopen(a->file,"r");
+		if(a->f == NULL)
+			marslog(LOG_EXIT|LOG_PERR,"MLOADG, cannot open %s",a->file);
+	}
+
+	if(fseek(a->f,v->fields[i]->offset,0) < 0)
+		marslog(LOG_EXIT|LOG_PERR,"MLOADG, cannot position to grib");
+
+	if(_readany(a->f,p,&msg_len))
+		marslog(LOG_EXIT|LOG_PERR,"MLOADG, cannot read grib");
+
+	v->fields[i]->length = msg_len;
+}
+
+void mnewg_(fortint *g)
+{
+	fortint newga;
+	gribarg  *a ;
+	minit();
+	a = NEW_CLEAR(gribarg);
+	newga = add_new_gribarg_pointer(a);
+	*g = newga;
+}
+
+void mrewg_(fortint *g)  /*-- mrewg: rewind fieldset (warning: no checks done!) --*/
+{
+	gribarg *a  = (gribarg*)(get_gribarg_ptr_from_index(*g));
+	a->cnt = 0;
+}
+
+/* here *c gives the length of GRIB msg in Fortran integers */
+void msaveg_(fortint *g,char *p,fortint *c)
+{
+	fortint c2bytes = (*c )* sizeof(fortint);
+	msavebyteg_( g, p, &c2bytes );
+}
+
+/* here *c gives the length of GRIB msg in bytes (chars) */
+void msavebyteg_(fortint *g,char *p,fortint *c)
+{
+	gribarg *a  = (gribarg*)(get_gribarg_ptr_from_index(*g));
+	fortint j,length, pad;
+	char x;
+	minit();
+
+	if(a->f == NULL)
+	{
+		a->file = strcache(marstmp());
+		a->f = fopen(a->file,"w");
+		if(a->f == NULL)
+			marslog(LOG_EXIT|LOG_PERR,"MSAVEG: Cannot open %s",a->file);
+	}
+
+	length = *c;
+	pad    = ((length + 119)/120) * 120 - length;
+
+	if(fwrite(p,1,length,a->f) != length)
+		marslog(LOG_EXIT|LOG_PERR,"MSAVEG: Error while writing to disk");
+
+	x = 0;
+	for(j=0;j<pad;j++)
+		if(fwrite(&x,1,1,a->f) != 1)
+			marslog(LOG_EXIT|LOG_PERR,"MSAVEG: Error while writing to disk");
+
+}
+
+void msetg_(fortint *g)
+{
+	gribarg *a = (gribarg*)(get_gribarg_ptr_from_index(*g));
+	FILE *f ;
+
+	minit();
+
+	if(a->f)
+	   fclose(a->f);
+	a->f = NULL;
+
+	f = fopen(sFile,"a+");
+	fprintf(f,"GRIB,TEMPORARY=1,PATH='%s'\n",
+	    a->file);
+	fclose(f);
+
+}
+
+void mseti_(fortint *g)
+{
+	gribarg *a = (gribarg*)(get_gribarg_ptr_from_index(*g));
+	FILE *f ;
+
+	minit();
+
+	if(a->f)
+	   fclose(a->f);
+	a->f = NULL;
+
+	f = fopen(sFile,"a+");
+	fprintf(f,"IMAGE,TEMPORARY=1,PATH='%s'\n",
+	    a->file);
+	fclose(f);
+}
+
+void msets_(char *s,fortint l_s)
+{
+	FILE *f;
+	int space = 0;
+	minit();
+	f = fopen(sFile,"a+");
+	fprintf(f,"STRING,VALUE=\"");
+
+	space = 0;
+
+	while(*s && l_s--)
+	{
+		if(*s == '"' || *s == '\\')
+		   fputc('\\',f);
+		if(*s == ' ')
+		   space++;
+		else
+		{
+			while(space-->0) fputc(' ',f);
+			fputc(*s,f);
+		}
+		s++;
+	}
+	fprintf(f,"\"\n");
+	fclose(f);
+}
+
+void msetn2_(double *d)
+{
+	FILE *f;
+	minit();
+	f = fopen(sFile,"a+");
+	fprintf(f,"NUMBER,VALUE=%g\n",*d);
+	fclose(f);
+}
+
+void msetn_(fortfloat *f)
+{
+	double d = *f;
+	msetn2_(&d);
+}
+
+void msetv_(fortint* s, fortfloat* v)
+{
+  FILE *f;
+  fortint i;
+
+  minit();
+
+  f = fopen(sFile,"a+");
+
+  fprintf(f,"VECTOR,SIZE=%d,VALUES=", *s);
+  if( *s > 0 )
+    {
+      for( i=0; i<*s; ++i )
+	{
+	  fprintf( f, "%g", (double)v[i] );
+	  if( (i+1) < *s )
+	    fprintf( f, "/" );
+	}
+    }
+  else
+    {
+      fprintf( f, "0" );
+    }
+  fprintf( f, "\n" );
+
+  fclose(f);
+}
+
+void mfail_(char *msg,fortint l_msg)
+{
+	char buf[512];                  /* no '\0' in Fortran strings! */
+	size_t len = l_msg < 512 ? l_msg : 511;
+	strncpy( buf, msg, len );
+	buf[ len ] = '\0';              /* make sure we have terminating null */
+
+	minit();
+
+	marslog(LOG_EXIT,"%s",buf);
+}
+
+void margs_(fortint *cnt,char *types,fortint l_types)
+{
+	int i,n;
+
+	minit();
+	*cnt = argc;
+
+	memset(types,0,l_types);
+	n = argc;
+
+	if(n > l_types)
+	{
+		marslog(LOG_EROR,"MARGS, string to small %d>%d",
+		    n,l_types);
+		n = l_types;
+	}
+
+	for(i=0;i<n;i++)
+		types[i] = args[i].kind;
+}
+
+
+/* Versions with no underscore */
+void mgetn(fortfloat *f) { mgetn_(f); }
+void mgetn2(double *d) { mgetn2_(d); }
+void msetn2(double *d) { msetn2_(d); }
+void msetn(fortfloat *f) { msetn_(f); }
+
+void mgets(char *s, fortint l_s) { mgets_(s,l_s); }
+void msets(char *s, fortint l_s) { msets_(s,l_s); }
+
+void mgetg(fortint *g, fortint *c) { mgetg_(g,c); }
+void mloadg(fortint *g, char *p, fortint *c) { mloadg_(g,p,c); }
+void mnewg(fortint *g) { mnewg_(g); }
+void mrewg(fortint *g) { mrewg_(g); }
+void msaveg(fortint *g, char *p, fortint *c) { msaveg_(g,p,c); }
+void msavebyteg(fortint *g, char *p, fortint *c) { msavebyteg_(g,p,c); }
+void msetg(fortint *g) { msetg_(g); }
+
+void mgetv(fortint *s, fortfloat *v) { mgetv_(s,v); }
+void msetv(fortint* s, fortfloat* v) { msetv_(s,v); }
+
+void mgeti(fortint *g, fortint *c) { mgeti_(g,c); }
+void mseti(fortint *g) { mseti_(g); }
+
+void mfail(char *msg, fortint l_msg) { mfail_(msg,l_msg); }
+
+void margs(fortint *cnt, char *types, fortint l_types) { margs_(cnt,types,l_types); }
+
+void mnewb(void) { mnewb_(); }
+void mgetb(void) { mgetb_(); }
+void msetb(void) { msetb_(); }
+void mloadb(void) { mloadb_(); }
+void msaveb(void) { msaveb_(); }
+
+void mgetm(void) { mgetm_(); }
+void msetm(void) { msetm_(); }
+
+
+/*=====================================
+
+ Macro to external C/C++ routines communication: 'mci_*'
+
+=====================================*/
+
+
+double
+mci_get_number()
+{
+   double d;
+   mgetn2_( &d );
+   return d;
+}
+void
+mci_return_number( double d )
+{
+   msetn2_( &d );
+}
+
+/*----------------------------------------------------------==
+**
+**  WARNING: Memory for the string is reused for each call to this function!!!
+*/
+const char*
+mci_get_string()
+{
+   static char* strbuf = 0;
+   static int  sbuflen = 0;
+   fortint  n = 0;
+   char *p;
+
+   mcheck( &n, 'S', "string" );
+   p = args[n-1].u.sval;
+   n = strlen(p);
+
+   if( (n+1) > sbuflen )
+   {
+     free( strbuf );
+     sbuflen = n+1;
+     strbuf = (char*)malloc(sbuflen);
+   }
+
+   strcpy( strbuf, p );
+
+   return strbuf;
+}
+void
+mci_return_string( const char* s )
+{
+   msets_( (char*)s, strlen(s) );
+}
+
+/*----------------------------------------------------------==
+**
+**  NOTE: Memory for the vector is allocated here,
+**        but freeing it is up to the calling pgm!!!
+*/
+void
+mci_get_vector( double** vec, int* length )
+{
+   fortint n = 0;
+   int size, i;
+   request* r;
+   const char *c;
+   const char *path;
+   double *v;
+   FILE *f;
+   char buf[20] = "";
+   int read;
+
+   mcheck( &n, 'V', "vector" );         /* ensure that next is a vector */
+   r = args[n-1].u.rval;
+
+   read_vector_from_request(r, vec, length);
+}
+
+void
+mci_return_vector( double* vec, int length )
+{
+   FILE *f;
+   int   i;
+   char *path;
+   FILE *fv;
+
+   minit();
+
+   f = fopen( sFile, "a+" );            /* append to the return request file */
+
+   path = marstmp();
+   fv = fopen (path, "w");
+		
+   if (fv)
+   {
+      write_vector_to_file (fv, length, vec);
+      fprintf(f,"VECTOR,TEMPORARY=1,PATH='%s'\n", path);
+   }
+
+   fprintf( f, "\n" );
+
+   fclose(f);                           /* close the return request file */
+}
+
+/*----------------------------------------------------------==
+**
+**  NOTE: Memory for the fieldset ptr is allocated here,
+**        but freeing it is up to the calling pgm!!!
+*/
+void*
+mci_get_fieldset( int* field_count )
+{
+   fortint newga;
+   gribarg* ga = (gribarg*)malloc( sizeof(gribarg) );
+   if( mgetg_C( &ga, field_count ) != 0 )
+   {
+     field_count = 0;
+     marslog( LOG_EROR, "mci_get_fieldset: next parameter is not a fieldset!" );
+     return NULL;
+   }
+
+   newga = add_new_gribarg_pointer(ga);
+
+   return (void*)ga;
+}
+
+#ifdef MV_ALLOW_DEPRECATED_MCI_NAMES
+void*
+mci_get_grib_id_ptr( int* field_count )
+{
+   marslog( LOG_WARN, "'mci_get_grib_id_ptr' is deprecated, use 'mci_get_fieldset'" );
+   return mci_get_fieldset( field_count );
+}
+#endif
+
+/*
+**  NOTE: Memory for the grib handle is allocated here,
+**        but freeing it is up to the calling pgm!!!
+*/
+grib_handle*
+mci_load_one_grib( void* fieldset_ptr )
+{
+   gribarg*     ga = (gribarg*)fieldset_ptr;
+   char*  grib_msg = NULL;
+   field* cur_msg  = NULL;
+   long int msg_len  = 0;
+   grib_handle* gh;
+   fieldset* fs;
+   int       fi;
+   FILE* f;
+
+   if( ! ga )                           /* ensure fieldset exists */
+   {
+      marslog( LOG_EROR, "mci_load_one_grib: fieldset_ptr is NULL" );
+      return NULL;
+   }
+
+   fs = ga->v;
+   fi = ga->cnt++;                      /*-- field index for the next field (in the fieldset) --*/
+
+   minit();                             /* ensure input request stuff is initialised */
+
+   if( fi < 0 || fi >= fs->count )      /* ensure a field exists */
+   {
+      marslog( LOG_EROR, "mci_load_one_grib: no more fields" );
+      return NULL;
+   }
+
+   cur_msg = fs->fields[fi];
+   msg_len = cur_msg->length;           /* get msg length and allocate memory */
+
+   grib_msg = (char*)malloc( msg_len*sizeof(char) );
+
+   f = fopen( cur_msg->file->fname, "r" );/* ensure file exists */
+   if( ! f )
+      marslog( LOG_EXIT|LOG_PERR, "mci_load_one_grib: unable to open GRIB file" );
+
+   if( fseek( f, cur_msg->offset, 0 ) < 0 )/* skip to the current field */
+      marslog( LOG_EXIT|LOG_PERR, "mci_load_one_grib: cannot position to GRIB file" );
+
+   if( _readany( f, grib_msg, &msg_len ) )/* read current field */
+      marslog( LOG_EXIT|LOG_PERR, "mci_load_one_grib: cannot read GRIB file" );
+
+   fclose( f );                         /* close fieldset file */
+
+   /*-- grib handle to be returned, must be free'd by the calling pgm --*/
+   gh = grib_handle_new_from_message_copy( NULL, grib_msg, msg_len );
+
+   free( grib_msg );
+
+   return gh;
+}
+
+void
+mci_rewind_fieldset( void* fieldset )
+{
+   fortint index;
+   index = get_gribarg_index_from_ptr(fieldset);
+   mrewg_( &index );
+}
+
+#ifdef MV_ALLOW_DEPRECATED_MCI_NAMES
+void
+mci_rewind_grib( void* fieldset_ptr )
+{
+   marslog( LOG_WARN, "'mci_rewind_grib' is deprecated, use 'mci_rewind_fieldset'" );
+   mci_rewind_fieldset( fieldset_ptr );
+}
+#endif
+
+/*
+**  NOTE: Memory for the grib id ptr is allocated here,
+**        but freeing it is up to the calling pgm!!!
+*/
+void*
+mci_new_fieldset()
+{
+   /*gribarg* a = (gribarg*)malloc( sizeof(gribarg) );*/
+   fortint a;
+   mnewg_( &a );
+   gribarg *ga = (gribarg*)get_gribarg_ptr_from_index(a);
+   return (void*)ga;
+}
+
+#ifdef MV_ALLOW_DEPRECATED_MCI_NAMES
+void*
+mci_new_grib_id_ptr()
+{
+   marslog( LOG_WARN, "'mci_new_grib_id_ptr' is deprecated, use 'mci_new_fieldset'" );
+   return mci_new_fieldset();
+}
+#endif
+
+void
+mci_save_grib( void* fieldset_ptr, grib_handle* gh )
+{
+   /* writes a GRIB msg into fieldset created by 'mci_new_fieldset' */
+   const void* buffer = NULL;
+   size_t      size = 0;
+   int         err = 0;
+   fortint     sizeint = 0;
+
+                                        /* get the coded message in a buffer */
+   err = grib_get_message( gh, &buffer, &size );
+   if( err )
+      marslog(LOG_EXIT|LOG_PERR,"mci_save_grib: error in 'grib_get_message': %d!", err );
+
+   fortint index = get_gribarg_index_from_ptr(fieldset_ptr);
+
+   sizeint = size; /* we need to pass it as a fortint */
+   msavebyteg_( &index, (char*)buffer, (fortint*)&sizeint );
+}
+
+void
+mci_return_fieldset( void* fieldset )
+{
+   fortint index = get_gribarg_index_from_ptr(fieldset);
+   msetg_( &index );          /* append return request with output fieldset params */
+}
+
+#ifdef MV_ALLOW_DEPRECATED_MCI_NAMES
+void
+mci_return_grib( void* grib_id_ptr )
+{
+   marslog( LOG_WARN, "'mci_return_grib' is deprecated, use 'mci_return_fieldset'" );
+   mci_return_fieldset( grib_id_ptr );
+}
+#endif
+
+
+/*----------------------------------------------------------*/
+
+int
+mci_arg_count()
+{
+  minit();
+  return argc;                          /* return argument count */
+}
+
+const char*
+mci_args()
+{
+
+#define  cBufMax  64
+
+  static int  tbuflen  = 0;
+  static char typesbuf[ cBufMax ];
+  int i;
+
+  if( tbuflen == 0 )
+  {
+    minit();
+
+    tbuflen = argc > cBufMax ? cBufMax - 1 : argc;
+
+    for(i=0; i<tbuflen; i++)
+      typesbuf[i] = args[i].kind;       /* add a corresponding letter to output string */
+
+    typesbuf[tbuflen] = '\0';           /* terminate output string */
+  }
+
+  return typesbuf;                      /* return the string of argument type letters */
+}
+
+void
+mci_fail( const char* msg )
+{
+  mfail_( (char*)msg, strlen(msg) );              /* issue error msg and exit! */
+}
+
+/*-------------------------------------     m f i _     ---------------------------------*/
+
+/*-------------------------------------------------------- mfi-number
+*/
+void
+mfi_get_number_( fortfloat* d )
+{
+  *d = mci_get_number();
+}
+
+void
+mfi_return_number_( fortfloat* d )
+{
+  mci_return_number( *d );
+}
+
+/*-------------------------------------------------------- mfi-string
+*/
+void
+mfi_get_string_( char* s, fortint s_len )
+{
+  int i=0;
+  const char* c_str = mci_get_string(); /* get a C string + memory! */
+
+  strncpy( s, c_str, s_len );           /* use strncpy for safety */
+
+  /* Fortran strings do not use the terminating null
+   * character, so we need to remove it and fill the
+   * rest with spaces (if 's' longer than 'str'), i.e.
+   * we need to convert the C string to a Fortran string:
+   */
+  if( strlen(c_str) < s_len )           /* append spaces... */
+  {
+     for( i=s_len; i>strlen(c_str); --i )
+        s[i-1] = ' ';
+  }
+  else if( strlen(c_str) > s_len )      /* ...unless a string overflow */
+  {
+     marslog( LOG_EROR, "mfi_get_string: string too long: %d chars", strlen(c_str) );
+     marslog( LOG_EROR, "mfi_get_string: got only the first %d chars", s_len );
+  }
+}
+
+void
+mfi_return_string_( char* s, fortint s_len )
+{
+  /* Fortran string 's' does not contain the terminating
+   * null character, so we need to add it, i.e.
+   * we need to convert the Fortran string to a C string:
+   */
+  char* str = (char*)malloc( s_len+1 ); /* temporary only */
+  strncpy( str, s, s_len );             /* need to use 'strncpy' */
+  str[s_len] = '\0';                    /* add the terminator */
+
+  mci_return_string( str );             /* return as a C string */
+
+  free( str );                          /* not needed anymore */
+}
+
+/*-------------------------------------------------------- mfi-vector
+*/
+void
+mfi_get_vector_( double* vec, int* length )
+{
+  double*  v;
+  int      l, i;
+
+  mci_get_vector( &v, &l );             /* also allocates memory for 'v' */
+
+  if( l > *length )                     /* check that 'vec' is long enough */
+  {
+     marslog( LOG_EROR, "mfi_get_vector: vector too long: it has %d elems", l );
+     marslog( LOG_EROR, "mfi_get_vector: got only the first %d elements", *length );
+     l = *length;
+  }
+
+  for( i=0; i<l; ++i )
+     vec[i] = v[i];                     /* copy values to Fortran array */
+  *length = l;
+
+  free(v);                              /* free the allocated memory */
+}
+
+void
+mfi_return_vector_( double* vec, int* length )
+{
+  mci_return_vector( vec, *length );
+}
+
+/*-------------------------------------------------------- mfi-fieldset
+*/
+
+
+/* To avoid sending pointers back to the user program, we maintain a list of all
+   fieldset_id pointers generated here and return indexes into our list instead.
+*/
+
+static int num_fieldsets = 0;
+static void **fieldsets = NULL;
+
+static int add_new_mfi_fieldset_pointer (void *new_fieldset_id)
+{
+    num_fieldsets++;
+    fieldsets = realloc (fieldsets, num_fieldsets * sizeof(void *));
+    fieldsets[num_fieldsets-1] = new_fieldset_id;
+    return num_fieldsets-1;
+}
+
+static void *get_fieldset_id_ptr_from_index (fortint index)
+{
+    return fieldsets[index];
+}
+
+
+void
+mfi_get_fieldset_( fortint* fieldset_id, fortint* field_count )
+{
+  int fc = 0;
+  void *new_id_ptr = mci_get_fieldset( &fc );
+  int new_id = add_new_mfi_fieldset_pointer(new_id_ptr);
+  *fieldset_id = new_id;
+  *field_count = fc;
+}
+
+void
+mfi_rewind_fieldset_( fortint* fieldset_id_index )
+{
+  mci_rewind_fieldset( get_fieldset_id_ptr_from_index(*fieldset_id_index) );
+}
+
+
+void
+mfi_new_fieldset_( fortint* fieldset_id )
+{
+  void *new_id_ptr = mci_new_fieldset();
+  *fieldset_id = add_new_mfi_fieldset_pointer(new_id_ptr);
+}
+
+void
+mfi_return_fieldset_( fortint* fieldset_id_index )
+{
+  mci_return_fieldset( get_fieldset_id_ptr_from_index(*fieldset_id_index) );
+}
+
+
+/*-------------------------------------------------------- mfi-misc
+*/
+
+void
+mfi_args_( fortint* c, char* a, fortint s_len )
+{
+  /* about Fortran strings: see mfi_get_string_ and mfi_return_string_ */
+
+  int i=0;
+  const char* c_str = mci_args();       /* get args as C string   */
+  *c = mci_arg_count();                 /* equal to strlen(c_str) */
+
+  strncpy( a, c_str, s_len );           /* copy to Fortran string */
+
+  if( strlen(c_str) < s_len )           /* remove '\0' and add trailing spaces... */
+  {
+     for( i=s_len; i>strlen(c_str); --i )
+        a[i-1] = ' ';
+  }
+  else if( strlen(c_str) > s_len )      /* ...unless a string overflow */
+  {
+     marslog( LOG_EROR, "mfi_args: string too long: %d chars", strlen(c_str) );
+     marslog( LOG_EROR, "mfi_args: got only the first %d chars", s_len );
+  }
+}
+
+void
+mfi_fail_( char* msg, fortint s_len )
+{
+  char* str = (char*)malloc( s_len+1 ); /* temporary only */
+  strncpy( str, msg, s_len );           /* need to use 'strncpy' */
+  str[s_len] = '\0';                    /* add the terminator */
+
+  mci_fail( str );                      /* issue msg and exit !! */
+
+  free( str );                          /* thus we never get here */
+}
+
+/*----------- mifi = M(acro) I(nternal) F(ortran) I(nterface) ------------*/
+
+/*
+ *  'mifi_get_msg_length_' is called from Fortran code of 'mfi_load_one_grib'
+ */
+void
+mifi_get_msg_length_( fortint* fieldset_id_index, fortint* msg_len )
+{
+   int current;
+   void *fieldset_id = get_fieldset_id_ptr_from_index(*fieldset_id_index);
+   gribarg* ga = (gribarg*)(fieldset_id);
+   if( ! ga )                           /* ensure fieldset exists */
+   {
+      marslog( LOG_EROR, "mfi_load_one_grib: fieldset_id is NULL" );
+      return;
+   }
+
+   current = ga->cnt;
+   if( current < 0 || current >= ga->v->count ) /* ensure a field exists */
+   {
+      marslog( LOG_EROR, "mfi_load_one_grib: no more fields" );
+      return;
+   }
+
+   *msg_len = ga->v->fields[current]->length;   /* get length from inside the struct */
+   return;
+}
+
+/*
+ *  'mifi_load_one_grib_to_memory_' is called from Fortran code of 'mfi_load_one_grib'
+ */
+void
+mifi_load_one_grib_to_memory_( fortint* fieldset_id_index, char* grib_in_memory )
+{
+   void *fieldset_id = get_fieldset_id_ptr_from_index(*fieldset_id_index);
+   gribarg*     ga = (gribarg*)(fieldset_id);
+   field* cur_msg  = NULL;
+   long int msg_len  = 0;
+   grib_handle* gh;
+   fieldset* fs;
+   int       fi;
+   FILE* f;
+
+   if( ! ga )                           /* ensure fieldset exists */
+   {
+      marslog( LOG_EROR, "mfi_load_one_grib: fieldset_id is NULL" );
+      return;
+   }
+
+   fs = ga->v;                          /* fieldset pointer */
+   fi = ga->cnt++;                      /* index for the next field within the fieldset */
+
+   minit();                             /* ensure input request stuff is initialised */
+
+   if( fi < 0 || fi >= fs->count )      /* ensure a field exists */
+   {
+      marslog( LOG_EROR, "mfi_load_one_grib: no more fields" );
+      return;
+   }
+
+   cur_msg = fs->fields[fi];
+   msg_len = cur_msg->length;           /* get msg length and allocate memory */
+
+   f = fopen( cur_msg->file->fname, "r" );/* ensure file exists */
+   if( ! f )
+      marslog( LOG_EXIT|LOG_PERR, "mfi_load_one_grib: unable to open GRIB file" );
+
+   if( fseek( f, cur_msg->offset, 0 ) < 0 )/* skip to the current field */
+      marslog( LOG_EXIT|LOG_PERR, "mfi_load_one_grib: cannot position to GRIB file" );
+
+   if( _readany( f, grib_in_memory, &msg_len ) )/* read current field */
+      marslog( LOG_EXIT|LOG_PERR, "mfi_load_one_grib: cannot read GRIB file" );
+
+   fclose( f );                         /* close fieldset file */
+}
+
+
+/*
+ *  'mifi_save_one_grib_to_file_' is called from Fortran code of 'mfi_save_grib'
+ */
+void
+mifi_save_one_grib_to_file_( fortint* fieldset_id_index, char* grib_data, fortint *bytecount )
+{
+   void *fieldset_id = get_fieldset_id_ptr_from_index(*fieldset_id_index);
+   fortint ga_index = get_gribarg_index_from_ptr(fieldset_id);
+
+   msavebyteg_(&ga_index, grib_data, bytecount);
+}
diff --git a/src/libMars/macro_api.h b/src/libMars/macro_api.h
new file mode 100644
index 0000000..c6343bd
--- /dev/null
+++ b/src/libMars/macro_api.h
@@ -0,0 +1,145 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*--  Header file for Metview Macro C/C++ interface functions  --*/
+
+#ifndef MACRO_API_H
+#define MACRO_API_H
+
+#include "grib_api.h"
+
+#ifndef fortint
+#define fortint int
+#endif
+
+#ifndef fortfloat
+#define fortfloat double
+#endif
+
+#define MV_ALLOW_DEPRECATED_MCI_NAMES 1
+
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+
+/*------------------------  macro C/C++ interface routines --------------------------*/
+
+      /*--   'mci_' : M(acro) C I(nterface)   --*/
+
+      double  mci_get_number();
+        void  mci_return_number( double d );
+
+  const char* mci_get_string();
+        void  mci_return_string( const char* s );
+
+        void  mci_get_vector( double** vec, int* length );
+        void  mci_return_vector( double* vec, int length );
+
+        void* mci_get_fieldset( int* field_count );/* use 'void*' in order to hide 'mars.h' */
+ grib_handle* mci_load_one_grib( void* fieldset_ptr ); /* handle must be deleted by calling pgm */
+        void  mci_rewind_fieldset( void* fieldset_ptr );
+
+        void* mci_new_fieldset();                  /* use 'void*' in order to hide 'mars.h' */
+        void  mci_save_grib( void* fieldset_ptr, grib_handle* gh );
+        void  mci_return_fieldset( void* fieldset_ptr );
+
+#ifdef MV_ALLOW_DEPRECATED_MCI_NAMES
+        /*--  old names that confusingly use 'grib_id' for a 'fieldset' --*/
+        void* mci_get_grib_id_ptr( int* field_count ); /* mci_get_fieldset()    */
+        void  mci_rewind_grib( void* grib_id_ptr );    /* mci_rewind_fieldset() */
+        void* mci_new_grib_id_ptr();                   /* mci_new_fieldset()    */
+        void  mci_return_grib( void* grib_id_ptr );    /* mci_return_fieldset() */
+#endif
+
+         int  mci_arg_count();
+  const char* mci_args();
+        void  mci_fail( const char* msg );
+
+
+/*---------------------- second generation macro Fortran interface routines -----------------------*/
+
+        /*-- 'mfi_' : M(acro) F(ortran) I(nterface) / functions written in C --*/
+
+        void  mfi_get_number_( fortfloat* d );
+        void  mfi_return_number_( fortfloat* d );
+
+        void  mfi_get_string_( char* s, fortint s_len );
+        void  mfi_return_string_( char* s, fortint s_len );
+
+        void  mfi_get_vector_( double* vec, int* length );
+        void  mfi_return_vector_( double* vec, int* length );
+
+        void  mfi_get_fieldset_( fortint* fieldset_id_index, fortint* field_count );
+        void  mfi_rewind_fieldset_( fortint* fieldset_id );
+
+        void  mfi_new_fieldset_( fortint* fieldset_id_index );
+        void  mfi_return_fieldset_( fortint* fieldset_id );
+
+        void  mfi_args_( fortint* c, char* a, fortint a_len );
+        void  mfi_fail_( char* msg, fortint a_len );
+
+        /*--  'mfi_' : M(acro) F(ortran) I(nterface) / routines written in Fortran 90  --*/
+
+/*      subroutine mfi_load_one_grib( ifieldset_id, igrib_id ) - implemented in Fortran90 */
+/*      subroutine mfi_save_grib( ifieldset_id, igrib_id )     - implemented in Fortran90 */
+
+
+        /*-- 'mifi_' : M(acro) I(nternal) F(ortran) I(nterface) --*/
+
+        void  mifi_get_msg_length_( fortint* fieldset_id_index, fortint* msg_len );
+        void  mifi_load_one_grib_to_memory_( fortint* fieldset_id_index, char* grib_in_memory );
+        void  mifi_save_one_grib_to_file_( fortint* fieldset_id_index, char* grib_data, fortint *bytecount );
+
+
+/*-- original first generation Fortran callable interface (sub)routines --*/
+
+void mnewb_();                               /*-- b: BUFR - not yet implemented --*/
+void mgetb_();
+void msetb_();
+void mloadb_();
+void msaveb_();
+
+void mgetg_(fortint* g, fortint* c);               /*-- g: fieldsets (GRIB msgs) --*/
+void mloadg_(fortint* g, char* p, fortint* c);
+void mrewg_(fortint* g);
+void mnewg_(fortint* g);
+void msaveg_(fortint* g, char* p, fortint* c);
+void msavebyteg_(fortint* g, char* p, fortint* c);
+void msetg_(fortint* g);
+
+void mgeti_(fortint* g, fortint* c);               /*-- i: images --*/
+void mseti_(fortint* g);
+
+void mgetm_();                               /*-- m: matrices - not yet implemented --*/
+void msetm_();
+
+void mgetn_(fortfloat* f);                   /*-- n: floats (numbers, size of  Fortran REAL) --*/
+void msetn_(fortfloat* f);
+
+void mgetn2_(double* d);                     /*-- n2: doubles (numbers, size of C double) --*/
+void msetn2_(double* d);
+
+void mgets_(char* s, fortint l_s);              /*-- s: strings --*/
+void msets_(char* s, fortint l_s);
+
+void mgetv_(fortint* s, fortfloat* v);       /*-- v: vectors --*/
+void msetv_(fortint* s, fortfloat* v);
+
+                                             /*-- miscellenius --*/
+void margs_(fortint* cnt, char* types, fortint l_types);
+void mfail_(char* msg, fortint l_msg);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif
+/*-- MACRO_API_H --*/
diff --git a/src/libMars/macro_api_f90.f90 b/src/libMars/macro_api_f90.f90
new file mode 100644
index 0000000..6c8715e
--- /dev/null
+++ b/src/libMars/macro_api_f90.f90
@@ -0,0 +1,78 @@
+!                                                                     vk/Oct09
+!--------------------------------     m f i _     ----------------------------
+!
+!	GRIB_API Fortran and C interfaces have a major difference in accessing
+!	GRIB messages:
+!	- C interface uses 'grib_handle' structures
+!	- Fortran interface uses 'gribid' integers
+!
+!	These two methods are not interchangable!
+!
+!	This file hides the source code for those 'mfi_*' routines that require
+!	GRIB_API Fortran libraries (i.e. use 'gribid' integer), so that C/C++
+!	programs do not need to know (link) with GRIB_API Fortran libs.
+!
+!	Subroutines starting with 'mifi_' are "Macro Internal Fortran Interface"
+!	routines written in C.
+
+!-------------------------------------------------------- mfi-grib
+!
+
+subroutine mfi_load_one_grib( fieldset_id, grib_id )
+
+  use grib_api
+  implicit none
+
+  integer   fieldset_id, grib_id
+  integer   msg_len, istatus, ista2
+  character err_msg*77
+  character, allocatable :: grib_msg(:)
+
+  call mifi_get_msg_length( fieldset_id, msg_len )
+  allocate( grib_msg( msg_len ) )
+
+  call mifi_load_one_grib_to_memory( fieldset_id, grib_msg )
+
+  call grib_new_from_message( grib_id, grib_msg, istatus )
+  if( istatus .ne. 0 ) then
+     print*,'GRIB_API error (grib_new_from_message):', istatus
+     call grib_get_error_string( istatus, err_msg, ista2 )
+     print*,'GRIB_API error msg: ', err_msg
+     call mfi_fail( 'mfi_load_one_grib failed!' )
+  endif
+
+  return
+end
+
+
+subroutine mfi_save_grib( fieldset_id, grib_id )
+
+  use grib_api
+  implicit none
+
+  integer   fieldset_id, grib_id
+  integer   (kind=kindOfSize_t) byte_size
+  integer   istatus, ista2, byte_size_as_int
+  character err_msg*77
+  character, allocatable :: grib_msg(:)
+
+  call grib_get_message_size( grib_id, byte_size, istatus )
+  if( istatus .ne. 0 ) then
+     print*,'GRIB_API error (grib_get_message_size):', istatus
+     call grib_get_error_string( istatus, err_msg, ista2 )
+     print*,'GRIB_API error msg: ', err_msg
+     call mfi_fail( 'mfi_save_grib failed!' )
+  endif
+
+  allocate( grib_msg(byte_size) )
+
+  call grib_copy_message( grib_id, grib_msg, istatus ) !-- byte_size ) !, status ) <-- doc error
+
+  byte_size_as_int = byte_size  !-- because it's passed as a pointer to fortint
+  call mifi_save_one_grib_to_file( fieldset_id, grib_msg, byte_size_as_int )
+
+  deallocate( grib_msg )
+
+  return
+end
+
diff --git a/src/libMars/macro_api_internals.h b/src/libMars/macro_api_internals.h
new file mode 100755
index 0000000..9ec0721
--- /dev/null
+++ b/src/libMars/macro_api_internals.h
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "mars.h"
+
+#ifndef MACRO_API_INTERNALS_H
+#define MACRO_API_INTERNALS_H
+
+/*
+ *  This header file hides 'mars.h' from user programs.
+ *
+ *  This header is included only in 'macro_api.c' while compiling
+ *  the interface functions, it is not included in 'macro_api.h'.
+ *
+ *  Thus 'macro_api.h' can be included in users' Macro C/C++ programs
+ *  without the overhead of 'mars.h'.
+ */
+
+typedef struct gribarg {
+	FILE     *f;
+	fieldset *v;
+	int      cnt;
+	char     *file;
+}gribarg;
+
+
+typedef struct bufrarg {
+	FILE     *f;
+	char     *file;
+}bufrarg;
+
+
+typedef struct arg {
+	char    kind;
+	union {
+		double  dval;
+		char    *sval;
+		request *rval;
+	} u;
+}arg;
+
+#endif
diff --git a/src/libMars/mars.h b/src/libMars/mars.h
new file mode 100755
index 0000000..c78075e
--- /dev/null
+++ b/src/libMars/mars.h
@@ -0,0 +1,716 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#ifndef _H_MARS
+
+/* For empress <c.h>  header file */
+#define SYSTEM_BOOLEAN
+#define _H_MARS
+
+/* This is for name clashes with struct queue in sys/stream.h,
+   included from netinet/in.h, and use of stl with mars. The
+   define is reverted after mars has included the files.
+   There is probably a safer way of doing this
+*/
+
+#ifdef sun
+#define queue system_queue
+#endif
+
+#ifdef linux
+#ifndef __USE_LARGEFILE64
+#define __USE_LARGEFILE64
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+/* Contains definitions like stat64 */
+#include <glob.h>
+#endif
+
+#define readany(a)  /*ERROR DONT CALL READANY*/
+#define readprod(a) /*ERROR DONT CALL READPROD*/
+#define readgrib(a) /*ERROR DONT CALL READPROD*/
+#define readbufr(a) /*ERROR DONT CALL READPROD*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <malloc.h>
+#include <unistd.h>
+#include <limits.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#include <rpc/rpc.h>
+#include <rpc/xdr.h>
+
+#include <time.h>  /* for clock_t */
+#ifdef __GNUC__
+#include <float.h> /* for FLT_MAX */
+#endif
+
+
+#include <errno.h>
+#if !defined(linux) && !defined(CYGWIN)
+#ifdef VMS
+#include <sys/perror.h>
+#else
+extern char *sys_errlist[];
+extern int sys_nerr;
+#endif
+#endif
+
+#ifdef sun
+#define system_queue queue
+#endif
+
+/* when the ibm goes down, undef this variable. Even better, grep it
+  and remove the code in it */
+#define OBSOLETE
+
+#ifdef sun
+#define boolean mars_bool
+#endif
+
+#ifdef __uxp__
+#define fujitsu
+#endif
+
+#define C2FORT(x) (x)
+
+#ifdef CRAY
+#include <fortran.h>
+#define FORTRAN_UPPERCASE
+#undef  C2FORT
+#define C2FORT(x)  _cptofcd(x,strlen(x))
+#endif
+
+#ifdef AIX
+#if !defined(FORTRAN_NO_UNDERSCORE) && !defined(METVIEW)
+#define FORTRAN_NO_UNDERSCORE
+#endif
+#define LARGE_FILES_SUPPORT
+#endif
+
+#ifdef p690
+#undef FORTRAN_NO_UNDERSCORE
+#endif
+
+#ifdef __hpux
+#ifndef hpux
+#define hpux
+#endif
+#endif
+
+#ifdef __ia64
+#ifndef ia64
+#define ia64
+#endif
+#endif
+
+
+#ifdef hpux
+#if !defined(FORTRAN_NO_UNDERSCORE) && !defined(METVIEW)
+#ifndef ia64
+#define FORTRAN_NO_UNDERSCORE
+#endif
+#endif
+#endif
+
+#if defined(fujitsu) || defined(hpux) || defined(AIX) || defined(__alpha)
+#define NO_ATOLL_SUPPORT
+#endif
+
+#ifdef ia64
+/* man htonl on hpia64 */
+#ifdef _XOPEN_SOURCE_EXTENDED
+#include <arpa/inet.h>
+#endif
+#endif
+
+#ifdef linux
+#define LARGE_FILES_SUPPORT
+# if !defined __off64_t_defined
+typedef __off64_t off64_t;
+#define __off64_t_defined
+#endif
+#endif
+
+
+#ifdef LARGE_FILES_SUPPORT
+#define file_offset  off64_t
+#ifdef linux
+#define fopen(a,b)   (FILE*)fopen64(a,b)
+#else
+#define fopen(a,b)   fopen64(a,b)
+#endif
+#define fseek(a,b,c) fseeko64(a,b,c)
+#define ftell(a)     ftello64(a)
+#define fsetpos(a,b) fsetpos64(a,b,c)
+#define fgetpos(a,b) fgetpos64(a,b)
+#define lseek(a,b,c) lseek64(a,b,c)
+#define lstat(a,b)   lstat64(a,b)
+#define fstat(a,b)   fstat64(a,b)
+#define stat         stat64
+#else
+#define file_offset off_t
+#endif
+
+/*=======================================================================*/
+/* Fortran types                                                         */
+
+#if !defined(I32) && !defined(I64) && !defined(I128)
+#define I32
+#endif
+
+#if !defined(R32) && !defined(R64) && !defined(R128)
+#define R32
+#endif
+
+#define INT_MISSING_VALUE INT_MAX
+#ifdef hpux
+#define FLOAT_MISSING_VALUE 3.40282346638528859812E+38F
+#else
+#define FLOAT_MISSING_VALUE FLT_MAX
+#endif
+
+
+#ifdef I32
+typedef int  fortint;    /* fortran integer */
+#endif
+
+#ifdef I64
+typedef long long fortint;
+#endif
+
+#ifdef R32
+typedef float fortfloat; /* fortran single precision float */
+#define PFLOAT "f"
+#endif
+
+#ifdef R64
+typedef double fortfloat;
+#define FLOAT "lf"
+#endif
+
+/*===========================================================================*/
+/* Common mars types                                                         */
+
+#if !defined(__cplusplus) && !defined(c_plusplus)
+#ifndef false
+#define true 1
+#define false 0
+#endif
+#endif
+
+typedef int                 err;
+typedef double				real;
+typedef long long           long64;
+typedef unsigned long long  ulong64;
+typedef int                 boolean;
+
+#include "rpcmars.h"
+/*===========================================================================*/
+/* Mars logging routines                                                     */
+/*===========================================================================*/
+
+
+#define LOG_DBUG		0	/* debugging message    */
+#define LOG_INFO		1	/* informative message  */
+#define LOG_WARN 		2	/* warning message      */
+#define LOG_EROR		3	/* error   message      */
+#define LOG_EXIT		4	/* fatal error message  */
+#define LOG_SMS		    5	/* sms message  */
+#define LOG_PERR    	256	/* print errno          */
+#define LOG_NOCR    	512	/* no carriage-return   */
+#define LOG_ONCE	    1024 /* print messages only once */
+
+typedef void (*loopproc)(const request*,int,char**,char**,void*);
+typedef void (*exitproc)(int,void*);
+typedef void (*cbackproc)(void*); /* simple call back */
+
+/*===========================================================================*/
+/* Usefull macros                                                            */
+/*===========================================================================*/
+
+
+#ifndef NUMBER
+#define NUMBER(a)    (sizeof(a)/sizeof(a[0])) /* number of elem. of an array */
+#endif
+#ifndef MAX
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+#ifndef MIN
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+#define ABS(a)       ((a)<0?-(a):(a))
+#define ROUND(a)     ((long)((a)+0.5))
+#define EQ(a,b)      ((*(a) == *(b)) && (strcmp(a,b) == 0))
+#define LT(a,b)      ((*(a) <  *(b)) || (strcmp(a,b) < 0))
+
+
+/*===========================================================================*/
+/* Memory mamagement                                                         */
+/*===========================================================================*/
+
+/* Use the macros ... */
+
+#define NEW(type)       (type*)get_mem(sizeof(type)) 
+#define NEW_CLEAR(type) (type*)get_mem_clear(sizeof(type))
+#define MALLOC(size)    get_mem(size)
+#define NEW_ARRAY(type,cnt) (type*)get_mem((cnt)*(sizeof(type)))
+#define NEW_ARRAY_CLEAR(type,cnt) (type*)get_mem_clear((cnt)*(sizeof(type)))
+#define FREE(x)          free_mem(x)
+#define NEW_STRING(s)    new_string(s)
+#define REALLOC(x,n)     re_alloc(x,n)
+#define CLEAR(a)         memset(&a,0,sizeof(a))
+
+typedef struct {
+	int   pages;     /* Number of pages to allocate */
+	int   clear;     /* clear newly allocated memory */
+	void *priv;
+} mempool;
+
+extern mempool *permanent_mem;
+extern mempool *transient_mem;
+
+
+/*===========================================================================*/
+/* Expand flags                                                              */
+/*===========================================================================*/
+
+#define EXPAND_DATE				1   /* expand dates           */
+#define EXPAND_TIME				2   /* expand times           */
+#define EXPAND_NO_OFF			4   /* remove off values      */
+#define EXPAND_LAST_NAME		8   /* name is last           */
+#define EXPAND_2ND_NAME		    16  /* name is second         */
+#define EXPAND_FIRST_NAME		32  /* name is first          */
+#define EXPAND_LISTS			64  /* expand lists (not imp) */
+#define EXPAND_NO_DEFAULT	   128  /* expand, no default val */
+#define EXPAND_DEFAULTS	   	   512  /* expand, default as well*/
+#define EXPAND_DONT_FAIL	  1024  /* expand, don't fail     */
+#define EXPAND_SUB_LISTS	  2048  /* expand values into lists*/
+#define EXPAND_STEP			  4096   /* expand steps           */
+
+#define EXPAND_MARS           (EXPAND_DATE|EXPAND_TIME|EXPAND_STEP|EXPAND_NO_OFF|\
+							   EXPAND_LAST_NAME|EXPAND_LISTS|EXPAND_SUB_LISTS)
+
+
+/*===========================================================================*/
+/* Schedule flags                                                            */
+/*===========================================================================*/
+
+#define SCHEDULE_FAIL   0x01
+#define SCHEDULE_INFORM 0x02
+#define SCHEDULE_LOG    0x04
+#define SCHEDULE_INFORM_FUTURE_CHANGE    0x08
+#define SCHEDULE_MAIL   0x10
+
+/* compare two values */
+typedef boolean (*namecmp)(const char *, const char *);
+/*===========================================================================*/
+/*                                                                           */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Lex & Yacc                                                                */
+/*===========================================================================*/
+#define YYMAXDEPTH 300
+
+/*===========================================================================*/
+/* Language                                                                  */
+/*===========================================================================*/
+
+typedef void (*lookupproc)(char*,void*);   
+
+/*===========================================================================*/
+/* Networking                                                                */
+/*===========================================================================*/
+
+typedef void (*taskproc)(int,int,void*);   
+typedef void (*udpproc)(char*,int*,int,void*);   
+
+typedef struct udpinfo {
+	int soc;
+	struct sockaddr_in sin;
+	struct timeval     timeout;
+} udpinfo;
+
+typedef struct firewall_info firewall_info;
+
+#if defined(AIX) || (defined(ia64) && defined(_XOPEN_SOURCE_EXTENDED))
+#ifdef __64BIT__
+	typedef socklen_t marssocklen_t;
+#else
+	typedef size_t marssocklen_t;
+#endif
+#else
+	typedef int marssocklen_t;
+#endif
+
+/*===========================================================================*/
+/* Post-processing                                                           */
+/*===========================================================================*/
+
+/* Vector Post-processing */
+typedef struct ppbuffer_t {
+	char *buffer;
+	long buflen;
+	long inlen;
+	long outlen;
+} ppbuffer_t;
+
+typedef err (*postproc)(ppbuffer_t *,long *);
+
+/*===========================================================================*/
+/* Handler                                                                   */
+/*===========================================================================*/
+
+typedef err  (*handlerproc) (request*,void*);
+
+typedef struct handler {
+	char        *name;
+	handlerproc proc;
+	long        flags;
+} handler;
+
+/*===========================================================================*/
+/* Service                                                                   */
+/*===========================================================================*/
+
+typedef struct svc svc;
+
+
+typedef struct svcid {
+	struct svcid *next;
+	request      *r;
+	svc          *s;
+	void         *data;
+} svcid;
+
+typedef void (*svcproc)(svcid *,request *,void *);
+typedef boolean (*inputproc)(FILE *,void *); /* return false on eof */
+
+typedef struct svcprocs {
+	struct svcprocs *next;
+	char            *name;
+	svcproc          proc;
+	void            *data;
+	request         *args;
+} svcprocs;
+
+typedef struct inputprocs {
+	struct inputprocs *next;
+	inputproc          proc;
+	void              *data;
+	FILE 			  *f;
+} inputprocs;
+
+struct svc {
+	int	    soc;
+	XDR     x;
+
+	svcid   *id;
+
+	svcproc  waitp; /* wait for      */
+	err      waite; /* wait error    */
+
+	svcprocs *serv; /* services   cb */
+	svcprocs *repl; /* replies    cb */
+	svcprocs *mess; /* messages   cb */
+	svcprocs *prog; /* progession cb */
+	svcprocs *fncs; /* functions  cb */
+	svcprocs *drop; /* drag-drop  cb */
+
+	inputprocs *input; /* input procs */
+
+	boolean recording;
+
+	int	    port;   /* pid on server side */
+	char    *host;
+	char    *name;
+	char    *user;  /* server only */
+
+	long    context;
+	long    flags;
+	long    timeout;
+
+	long	replies; /* number of outstanding replies */
+
+	request *r;
+};
+
+/*===========================================================================*/
+/* Service functions                                                         */
+/*===========================================================================*/
+
+enum argtype {
+
+	tnumber  = 1L, /* warning : for recording, it's a double ... */
+	tstring  = 2L,
+	tdate    = 4L,
+	tmatrix  = 8L,
+	tgrib    = 16L,
+	tbufr    = 32L,
+	tlist    = 64L,
+	trequest = 128L,
+	tfile    = 256L,
+	tdefered = 512L,
+	terror   = 1024L,
+	timage   = 2048L,
+	tvector  = 4096L,
+	tgeopts  = 32768L,
+	tvis5d   = 65536L,
+	tnil     = 131072L,
+	tnetcdf  = 262144L,
+	tobject  = 524288L,
+	todb     = 1048576L, 
+	ttable   = 2097152L, 
+
+	/* used only for recording .. */
+
+	tinteger = 8192L,
+	tboolean = 16384L, 
+
+
+	tany    = ~0L,
+	tnone   = 0L
+};
+
+typedef enum argtype argtype;
+
+typedef struct {
+	char    *name;
+	char    *def;
+	argtype kind;
+} argdef;
+
+/*===========================================================================*/
+/* Stream                                                                    */
+/*===========================================================================*/
+
+typedef struct mstream {
+	long64 in;
+	long64 out;
+	err  error;
+	void *data;
+	int (*read) (void*,void*,unsigned int);
+	int (*write)(void*,void*,unsigned int);
+} mstream;
+
+/*===========================================================================*/
+/* Options                                                                   */
+/*===========================================================================*/
+
+typedef enum {t_char,t_int,t_long,t_long64,t_str,t_ptr,t_double,t_boolean,t_fortfloat} type;
+
+typedef struct option {
+
+	char *name;            /* Option name          */
+	char *env;             /* Environment variable */
+	char *opt;             /* command line option  */
+	char *def;             /* default value        */
+	type  kind;            /* type of variable     */
+	int   size;            /* field size           */
+	int   offset;          /* field offset         */
+
+}option;
+
+#define OFFSET(type,field) (((char*)(&(((type*)NULL)->field)))-((char*)NULL))
+
+typedef struct _wind wind;
+
+/*===========================================================================*/
+/* Time                                                                      */
+/*===========================================================================*/
+#define SECS_IN_DAY	86400
+
+typedef long64 datetime;
+
+typedef struct time_interval {
+
+	datetime begin;
+	datetime end;
+	
+} time_interval;
+
+/*===========================================================================*/
+/* Timer                                                                     */
+/*===========================================================================*/
+
+typedef struct timer {
+
+	struct timeval start_;
+	double timer_;
+	boolean   active_;
+	char   *name_;
+	int    count_;
+	long64 total_;
+
+	boolean elapsed_;
+	double  cpu_;
+	double  total_cpu_;
+
+	char   *statname_;
+
+	struct timer *next_;
+} timer;
+
+/*===========================================================================*/
+/* Errors                                                                    */
+/*===========================================================================*/
+
+
+#define NOERR           0
+#ifndef EOF
+#define EOF             -1
+#endif
+#define BUF_TO_SMALL    -3
+#define COMPRESS_ERR	-4
+#define NOT_FOUND_7777  -5
+#define END_REQUEST     -6
+#define HYPERCUBE_ERROR -7
+#define POSTPROC_ERROR -8
+#define FAILED_EXPAND   -9
+#define ODB_ERROR       -10
+
+#define NOT_READY_ERR	-42
+#define TOO_SHORT_ERR	-43
+
+#define RETRY_FOREVER_ERR   -7776
+#define RETRY_ERR           -7777
+
+
+#define EMPRESS_ERR     -1000
+
+#define QUALBUILD_ERR	(-1  + EMPRESS_ERR)
+#define LOCK_ERR		(-2  + EMPRESS_ERR)
+#define ADD_ERR			(-3  + EMPRESS_ERR)
+#define CONVERT_ERR		(-4  + EMPRESS_ERR)
+#define DUPLICATE_ERR	(-5  + EMPRESS_ERR)
+#define REQUEST_ERR		(-6  + EMPRESS_ERR)
+#define WRITEBLOB_ERR	(-7  + EMPRESS_ERR)
+#define OPENTABLE_ERR	(-8  + EMPRESS_ERR)
+#define UPDATE_ERR		(-9  + EMPRESS_ERR)
+#define ATTRLIST_ERR	(-10 + EMPRESS_ERR)
+
+typedef struct math{
+	struct math *left;
+	struct math *right;
+	char        *name;
+	int         arity;
+}math;
+
+typedef double (*mathproc)();
+typedef err    (*funcproc)(math*,mathproc);
+
+typedef struct func {
+	char    *name;
+	funcproc addr;
+	mathproc proc;
+	int      arity;
+	char     *info;
+}func;
+
+#include "grib.h"
+#include "bufr.h"
+#include "field.h"
+#include "variable.h"
+#include "tools.h"
+#include "globals.h"
+#include "lang.h"
+#include "base.h"
+#include "control.h"
+#include "hypercube.h"
+#include "index.h"
+
+typedef struct marslist {
+	struct marslist  *next;
+	char             *name;
+	void             *data;
+} marslist;
+
+
+#ifdef __alpha
+/* Alpha has its own dirname() basename(), but not with 'const' */
+/* rename ours to mdirname and mbasename. Beware not to include
+string.h after mars.h
+*/
+#define dirname  mdirname
+#define basename mbasename
+#endif
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/* used to certify requests */
+typedef struct ECMarsCertReply eCMarsCertReply;
+
+#include "cos.h"
+#include "proto.h"
+extern err parser(const char*,boolean);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+/* xdr routines */
+
+#if (defined(CRAY) || defined(__alpha))
+typedef void* mxdrparam; 
+typedef int (*mxdrproc)();
+typedef void* msockopt;
+#elif defined(sgi)
+typedef void* mxdrparam; 
+typedef int (*mxdrproc)(void*,void*,u_int);
+typedef void* msockopt;
+#elif defined(fujitsu)
+typedef caddr_t mxdrparam; 
+typedef int (*mxdrproc)(void*,caddr_t,int);
+typedef char* msockopt;
+#elif defined(linux)
+typedef caddr_t mxdrparam;
+typedef int (*mxdrproc)(char*,char*,int);
+typedef __ptr_t msockopt;
+#else
+typedef caddr_t mxdrparam; 
+typedef int (*mxdrproc)(void*,caddr_t,int);
+typedef void* msockopt;
+#endif
+
+
+
+
+#ifndef SEEK_SET
+#define SEEK_SET 0 /* stupid codecenter */
+#endif
+
+#ifdef AIX
+/* stupid ibm got it wrong ... */
+#define strcasecmp casecompare
+
+#endif
+
+#endif
+
+#ifdef XtSpecificationRelease
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+svc *RegisterService(XtAppContext app_context,const char *name);
+void ListenToService(XtAppContext app_context,svc *s);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif
diff --git a/src/libMars/mcs.h b/src/libMars/mcs.h
new file mode 100644
index 0000000..d66b75c
--- /dev/null
+++ b/src/libMars/mcs.h
@@ -0,0 +1,92 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/* Title:	MARS CACHING SYSTEM DATABASE */
+/* Part:	Include file */
+/* Author:	a.hofstadler */
+/* Version:	2.0	93-MAY-21 */
+/* Changes:	 */
+
+
+#include <mscc.h>
+
+#define MCS_DBASE     "/mcs/mcs"
+#define MCS_SQL       "/usr/local/lib/metaps/sql"
+#define MCS_CHK       "/usr/local/lib/metaps/chk/mcs.chk"
+#define MCS_DEFAULT_MSPATH "/usr/local/apps/empress/v6.2"
+
+/* pattern searched in sql-script for: if there store data in compressed form */
+#define MCS_COMPRESSED_PATTERN	"(in compressed form)"
+
+#define MCS_TAB_CHAR		15			/* max. # of characters of tablename */
+#define MCS_MAX_LINE_CHAR 100
+
+#define MCS_USE_TRANSACTION_AT_TABLECREATION false
+
+typedef struct attribute{
+
+	struct attribute *next;
+
+	char    *name;				/* mars and empress parameter name */
+	addr    emp_desc;			/* attribute descriptor */
+	boolean qual_flag;			/* flag if used in qualification or not */
+
+}attribute;
+
+
+typedef struct emp_bulk{
+	long	len;
+	long	buf;
+}emp_bulk;
+
+
+typedef struct mcs_private{
+
+	/* filled outside */
+
+	char	*dbname;
+	char	*sql;
+	char	*chk;
+	int		maxtry;
+	int		sleeptime;
+	boolean compress;
+
+	/* filled inside */
+
+	rule    *_rules;            /* checking rules from check file */
+
+	char	*_tab_name;			/* first characters of tablename: eg.: grb_ */
+
+	const char	*_date;
+	int		_date_cnt;
+
+	const char	*_type;
+
+	char	_sql[MCS_MAX_LINE_CHAR];
+
+	addr	_tab;				/* table descriptor */
+
+	addr	_rec;				/* record descriptor */
+	addr	_new_rec;			/* second record descriptor for updates */
+
+	addr	_qual;				/* qualification descriptor */
+	boolean	_qual_is_null;
+
+	addr	_ret;				/* retrieval descriptor */
+
+	attribute *_first;			/* begin of linked list of attributes */
+
+	int		_dim_priv_attr;		/* dimension of private attribute array */
+
+	boolean _compress;			/* flag determined from sql-script */
+
+	request *_r;				/* THE request */
+
+}mcs_private;
diff --git a/src/libMars/memory.c b/src/libMars/memory.c
new file mode 100755
index 0000000..39af95a
--- /dev/null
+++ b/src/libMars/memory.c
@@ -0,0 +1,392 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mars.h"
+
+/* #define CHECK_FOR_LEAKS */
+
+union align {
+	double d;
+	int    n;
+	char * p;
+	long64 l;
+};
+
+#define WORD sizeof(union align)
+
+static int page_size = 0;
+
+static boolean exit_on_failure = true;
+
+typedef struct memblk {
+	struct memblk *next;
+	long     cnt;
+	long     left;
+	long     size;
+	char     buffer[WORD];
+} memblk;
+
+typedef struct memprocs {
+	struct memprocs *next;
+	memproc          proc;
+	void            *data;
+} memprocs;
+
+static memprocs *mprocs = NULL;
+
+#define HEADER_SIZE  (sizeof(memblk) - WORD)
+
+static mempool _transient_mem = {
+	1,
+	0,
+};
+
+mempool *transient_mem = &_transient_mem;
+
+static mempool _permanent_mem = {
+	1,
+	0,
+};
+
+mempool *permanent_mem = &_permanent_mem;
+
+#if defined(CRAY)
+int getpagesize() { return 4096; }
+#endif
+
+void mem_exit_on_failure(boolean n)
+{
+	exit_on_failure = n;
+}
+
+static int recover_some_space(void)
+{
+	memprocs *p = mprocs;
+	marslog(LOG_WARN,"Memory is low, trying to recover some");
+
+	if(mars.debug)
+	{
+		long bytes = proc_mem();
+		marslog(LOG_DBUG,"Current memory used: %sbyte(s)",bytename((double)bytes));
+	}
+
+	memory_info();
+
+	while(p)
+	{
+		if(p->proc(p->data))
+			return 1;
+		p = p->next;
+	}	
+	return 0;
+}
+
+static int fail_nil(void *p,int size)
+{
+	if(p) return 0;
+	if(!exit_on_failure) return 0;
+
+	if(recover_some_space())
+		return 1;
+
+	marslog(LOG_EROR,"%s, out of memory allocating %d bytes",
+	    progname(),
+	    size);
+	marsexit(1);
+	return 0;
+}
+
+void *re_alloc(void *p,int size)
+{
+	void *x = realloc(p,size);
+
+	while(fail_nil(x,size))
+		x = realloc(p,size);
+
+	return x;
+}
+
+char *new_string(const char *p)
+{
+	char *q = (char*)strdup(p);
+	if(!q) {
+		while(fail_nil(q,strlen(p)))
+			q = (char*)strdup(p);
+	}
+	return q;
+}
+
+void *get_mem(int size)
+{
+	void *x = malloc(size);
+
+	while(fail_nil(x,size))
+		x = malloc(size);
+
+	return x;
+}
+
+void *get_mem_clear(int size)
+{
+	void *x = calloc(1,size);
+
+	while(fail_nil(x,size))
+		x = calloc(1,size);
+
+	return x;
+}
+
+void *free_mem(void *x)
+{
+	if(x) free(x);
+	return NULL;
+}
+
+static memblk *reserve = NULL;
+
+#ifdef CHECK_FOR_LEAKS
+
+void *fast_new(int s, mempool *pool) { return calloc(1,s); }
+void *fast_realloc(void *p, int s, mempool *pool) { return realloc(p,s); }
+void fast_delete(void *p, mempool *pool) { free(p); }
+void *reserve_mem(int s) { return malloc(s); }
+void release_mem(void *p) { free(p); }
+
+void memory_info()
+{
+	long bytes = proc_mem();
+	marslog(LOG_INFO,"Memory used: %sbyte(s)",bytename((double)bytes));
+}
+
+#else
+void *fast_new(int s,mempool *pool)
+{
+	char *p;
+	memblk *m = (memblk*)pool->priv;
+
+	/* align */
+
+	s = ((s+WORD-1)/WORD)*WORD;
+
+	while(m && (m->left < s))
+		m = m->next;
+
+	if(m == NULL)
+	{
+		memblk *p;
+		int    size;
+		if(!page_size) page_size = getpagesize();
+
+		size = page_size*pool->pages;
+
+		if(s > size - HEADER_SIZE)
+		{
+			marslog(LOG_WARN,"Object of %d bytes is too big for fast_new",s);
+			marslog(LOG_WARN,"Block size if %d bytes", size - HEADER_SIZE);
+			size = ((s + HEADER_SIZE + (page_size-1)) / page_size) * page_size;
+		}
+
+		p = (memblk*)(pool->clear?calloc(size,1):malloc(size));
+		while(fail_nil(p,size))
+			p = (memblk*)(pool->clear?calloc(size,1):malloc(size));
+		if(!p) return NULL;
+
+		p->next = (memblk*)pool->priv;
+		p->cnt  = 0;
+		p->size = p->left = size-HEADER_SIZE;
+		m       = p;
+		pool->priv = (void*)p;
+	}
+
+	p       = &m->buffer[m->size - m->left];
+	m->left -= s;
+	m->cnt++;
+	return p;
+}
+
+void *fast_realloc(void *p,int s,mempool *pool)
+{
+	void *q;
+
+	/* I'll come back here later... */
+
+	if((q = fast_new(s,pool)) == NULL) return NULL;
+	memcpy(q,p,s);
+
+	fast_delete(p,pool);
+
+	return q;
+}
+
+void fast_delete(void *p,mempool *pool)
+{
+	memblk *m = (memblk*)pool->priv;
+	memblk *n = NULL;
+	while(m)
+	{
+		if( ((char*)p >= (char*)&m->buffer[0]) && 
+		    ((char*)p < (char*)&m->buffer[m->size]))
+		{
+			m->cnt--;
+			if(m->cnt == 0)
+			{
+				if(n) n->next = m->next;
+				else pool->priv = (void*)m->next;
+				free((void*)m);
+			}
+			return;
+		}
+
+		n = m;
+		m = m->next;
+	}
+	marslog(LOG_EROR,"Bad fast_delete!!");
+	abort();
+}
+
+void fast_memory_info(const char *title,mempool *pool)
+{
+	memblk *m = (memblk*)pool->priv;
+	int count = 0;
+	int size = 0;
+	while(m)
+	{
+		count++;
+		size += m->size;
+		m = m->next;
+	}
+	marslog(LOG_INFO,"%s : %sbytes %d blocks",
+		title,
+		bytename(size),count);
+}
+
+void memory_info()
+{
+	memblk *r = reserve;
+	long size = 0;
+	while(r)
+	{
+		marslog(LOG_INFO,"Large buffer: %sbytes %s",
+				bytename(r->size),r->cnt?"in use":"free");
+		size += r->size;
+		r = r->next;
+	}
+
+	marslog(LOG_INFO,"Total large : %sbytes",bytename(size));
+	fast_memory_info("Transient memory",transient_mem);
+	fast_memory_info("Permanent memory",permanent_mem);
+}
+
+void *reserve_mem(int s)
+{
+	static int first = 1;
+	memblk *r;
+
+	if(first)
+	{
+		install_memory_proc((memproc)purge_mem,NULL);
+		first = 0;
+	}
+
+	s = ((s+WORD-1)/WORD)*WORD;
+	r = reserve;
+	while(r)
+	{ 
+		if(r->cnt == 0 && r->size == s)
+			break;
+		r = r->next;
+	}
+
+	if(r)
+	{
+		marslog(LOG_DBUG,"Reusing %ld bytes %d",s,r->size);
+	}
+	else
+	{
+		int size = s + HEADER_SIZE;
+		marslog(LOG_DBUG,"Allocating %d (%d)bytes",s,size);
+		r = (memblk*)malloc(size);
+		while(fail_nil(r,size))
+			r = (memblk*)malloc(size);
+		if(!r) return NULL;
+		r->next = reserve;
+		reserve = r;
+	}
+	r->size = s;
+	r->cnt  = 1;
+	return &r->buffer[0];
+
+}
+
+void release_mem(void *p)
+{
+	memblk *r = (memblk*)(((char*)p) - HEADER_SIZE);
+	memblk *s = reserve;
+	while(s && (s!=r)) s = s->next;
+	if(s == NULL)
+		marslog(LOG_WARN,"release_mem: invalid pointer");
+	else
+	{
+		marslog(LOG_DBUG,"Release %d bytes %d",s->size,r->size);
+		s->cnt = 0;
+	}
+}
+
+#endif
+
+int purge_mem(void)
+{
+	memblk *p = reserve;
+	memblk *q = NULL;
+	while(p)
+	{
+		if(p->cnt == 0)
+		{
+			if(q) q->next = p->next;
+			else reserve = p->next;
+			free(p);
+			return 1;
+		}
+		q = p;
+		p = p->next;
+	}
+	return 0;
+}
+
+void install_memory_proc(memproc proc,void *data)
+{
+	memprocs *p = NEW_CLEAR(memprocs);
+	p->proc = proc;
+	p->data = data;
+	p->next = mprocs;
+	mprocs  = p;
+}
+
+void remove_memory_proc(memproc proc,void *data)
+{
+	memprocs *p = mprocs;
+	memprocs *q = NULL;
+
+	while(p)
+	{
+		if(p->proc == proc && p->data == data)
+		{
+			if(q) q->next = p->next; else mprocs = p->next;
+			FREE(p);
+			return;
+		}
+		q = p;
+		p = p->next;
+	}
+	marslog(LOG_WARN,"remove_memory_proc: cannot find proc");
+}
diff --git a/src/libMars/metadata.c b/src/libMars/metadata.c
new file mode 100644
index 0000000..10e575b
--- /dev/null
+++ b/src/libMars/metadata.c
@@ -0,0 +1,33 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+request* read_request(mstream* s)
+{
+    request* r = empty_request(upcase(stream_read_string(s)));
+    int      n = stream_read_int(s);
+    int      i;
+
+    for(i = 0; i < n; i++)
+    {
+        const char* p = upcase(stream_read_string(s));
+        int m         = stream_read_int(s);
+        int j;
+        char *q = strcache(p);
+
+        for(j = 0; j < m; j++)
+            add_value(r,q,"%s",upcase(stream_read_string(s)));
+
+        strfree(q);
+    }
+
+    return r;
+}
diff --git a/src/libMars/multibase.c b/src/libMars/multibase.c
new file mode 100644
index 0000000..89f27bc
--- /dev/null
+++ b/src/libMars/multibase.c
@@ -0,0 +1,249 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <ctype.h>
+
+#define DB_COUNT 2
+
+static void     multi_init(void);
+static err      multi_open(void *data,request*,request*,int);
+static err      multi_close(void *data);
+static err      multi_read(void *data,request *r,void *buffer,long *length);
+static err      multi_write(void *data,request *r,void *buffer,long *length);
+static boolean  multi_check(void *data,request *r);
+static err      multi_validate(void *data,request*,request*,int);
+
+
+typedef struct multidata {
+	char     *base[2];
+	database *db[2];
+	request  *r;
+	hypercube  *cube;
+	request  *grib;
+	int      current;
+	int      count;
+	int      got;
+	int      expect;
+	char     *found;
+} multidata;
+
+static option opts[] = {
+    {"base1",NULL,NULL,"mars1",
+    t_str,sizeof(char*), OFFSET(multidata,base[0])},
+
+    {"base2",NULL,NULL,"mars2",
+    t_str,sizeof(char*), OFFSET(multidata,base[1])},
+};
+
+
+base_class _multibase = {
+
+	NULL,                      /* parent class */
+	"multibase",                /* name         */
+
+	false,                     /* inited       */
+
+	sizeof(multidata),           /* private size */
+	NUMBER(opts),              /* option count */
+	opts,                      /* options      */
+
+	multi_init,                  /* init         */
+
+	multi_open,                  /* open         */
+	multi_close,                 /* close        */
+
+	multi_read,                  /* read         */
+	multi_write,                 /* write        */
+
+	NULL,                      /* control      */
+
+	multi_check,                 /* check        */
+    NULL,                      /* query        */
+
+    NULL,                      /* archive      */
+    NULL,                      /* admin        */
+
+    multi_validate,            /* validate */
+
+
+};
+
+
+base_class *multibase = &_multibase;
+
+static void multi_init(void)
+{
+}
+
+
+static err open_next(multidata *multi)
+{
+	const char   *name;
+	request      *cachesetup = 0;
+	request *setup;
+
+	if(multi->current >= 0 && multi->db[multi->current])
+	{
+		err e = database_close(multi->db[multi->current]);
+		multi->db[multi->current] = NULL;
+		if(e) return e;
+	}
+
+	multi->current++;
+	if(multi->current >= DB_COUNT)
+		return EOF;
+
+	setup = findbase(multi->base[multi->current]);
+	if(!setup)
+		return -2;
+	
+	multi->db[multi->current] = openbase(setup,multi->r,&name,&cachesetup,READ_MODE);
+	if(!multi->db[multi->current])
+		return -2;
+
+	return NOERR;
+}
+
+static err  multi_open(void *data,request *r,request *e,int mode)
+{
+	multidata *multi = (multidata*)data;
+	multi->current = -1;
+
+	multi->expect = count_fields(r);
+	multi->r = clone_all_requests(r);
+
+	multi->cube = new_hypercube_from_mars_request(multi->r);
+
+	unset_value(multi->r,"EXPECT");
+	multi->count = count_fields(multi->r);
+
+	if(multi->count)
+		multi->found = NEW_ARRAY_CLEAR(char,multi->count);
+
+	multi->grib = empty_request("GRIB");
+	return open_next(multi);
+}
+
+static err  multi_close(void *data)
+{
+	multidata *multi = (multidata*)data;
+	int ret = 0;
+	int i;
+	int e;
+
+	for(i = 0; i < DB_COUNT; i++)
+		if(multi->db[i] != 0)
+		{
+			e = database_close(multi->db[i]);
+			if(e) ret = e;
+		}
+
+	free_all_requests(multi->grib);
+	free_all_requests(multi->r);
+	free_hypercube(multi->cube);
+	FREE(multi->found);
+
+	return ret;
+}
+
+static boolean not_duplicate(multidata *multi,void *buffer,long length)
+{
+	int i = 0;
+
+	if(multi->expect == 0 || multi->count == 0)
+		return true;
+
+	if( grib_to_request(multi->grib,buffer,length) != NOERR)
+	{
+		marslog(LOG_WARN,"Multi-base: error in grib_to_request");	
+		return true;
+	}
+
+	i = cube_order(multi->cube, multi->grib);
+
+	if( i < 0 || i >= multi->count)
+	{
+		marslog(LOG_WARN,"Multi-base: unexpected grib");	
+		print_all_requests(multi->grib);
+		return true;
+	}
+
+	if(multi->found[i])
+		return false;
+	
+	multi->got++;
+	multi->found[i] = true;
+
+	return true;
+}
+
+static err  multi_read(void *data,request *r,void *buffer,long *length)
+{
+	multidata *multi = (multidata*)data;
+	int ret = 0;
+	long save = *length;
+
+
+	/* To see.... */
+	if(multi->expect > 0 && multi->got == multi->expect)
+		return EOF;
+
+	while(multi->current < DB_COUNT)
+	{
+		*length = save;
+		ret = database_read(multi->db[multi->current],r,buffer,length);
+
+		switch(ret)
+		{
+			case NOERR:
+				if(not_duplicate(multi,buffer,*length))
+					return NOERR;
+				break;
+
+			default:
+				ret = open_next(multi);
+				if(ret) return ret;
+				break;
+		}
+	}
+
+	return EOF;
+}
+
+static err  multi_write(void *data,request *r,void *buffer,long *length)
+{
+	marslog(LOG_EROR,"Cannot write on Multi-database");
+	return -2;
+}
+
+static boolean  multi_check(void *data,request *r)
+{
+	return is_grib(r) || is_bufr(r);
+}
+
+static err      multi_validate(void *data,request *r,request *e,int mode)
+{
+	multidata *multi = (multidata*)data;
+	const char   *name;
+	request     *setup;
+	int i;
+
+	for(i = 0; i < DB_COUNT; i++)
+	{
+		setup = findbase(multi->base[i]);
+		if(!setup) return -1;
+		name  = get_value(setup,"class",0);
+		if(database_validate(base_class_by_name(name),multi->base[i],r,e,mode) != 0)
+			return -1;
+	}
+
+	return 0;
+}
diff --git a/src/libMars/netbase.c b/src/libMars/netbase.c
new file mode 100755
index 0000000..38056c6
--- /dev/null
+++ b/src/libMars/netbase.c
@@ -0,0 +1,1107 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "ecaccess.h"
+#include "base.h"
+#include "netbase.h"
+#include <signal.h>
+#include <setjmp.h>
+#include <time.h>
+#ifdef sgi
+#include <bstring.h>
+#endif
+
+#ifdef CRAY
+typedef u_long xdr_t;
+#else
+typedef void *xdr_t;
+#endif
+
+static jmp_buf env;
+
+#define NET_BUFFER	20480
+
+typedef struct netdata {
+
+    boolean server;
+	int    port;
+	char   *host;
+	int    soc;
+	int    cb_soc;
+	XDR    x;
+	netblk blk;
+	request *r;
+	request *e;
+	int     retries;
+	boolean compress;
+	boolean validate_grib;
+	boolean callback;
+	int     timeout;
+	int     bufsize;
+	pid_t   pid;
+	time_t  time;
+	char    *validate;
+
+	boolean    ecaccess;
+	char      *echost;
+	char      *ecaccesshome;
+	int        eccertport;
+	char      *eccommand;
+	char      *ecservice;
+} netdata;
+
+
+static void netbase_init(void);
+
+static err     netbase_open(void *data,request*,request*,int);
+static err     netbase_close(void *data);
+static err     netbase_read(void *data,request *r,void *buffer,long *length);
+static err     netbase_write(void *data,request *r,void *buffer,long *length);
+static err     netbase_cntl(void *data,int code,void *param,int size);
+static boolean netbase_check(void *data,request *r);
+static err     netbase_validate(void *data,request*,request*,int);
+
+static option opts[] = {
+	{"port","NETBASE_PORT",NULL,"7000",t_int,
+	sizeof(int),OFFSET(netdata,port)},
+	{"host","NETBASE_HOST",NULL,"munin",t_str,
+	sizeof(char*),OFFSET(netdata,host)},
+	{"retry","NETBASE_RETRY","-retry","5",t_int,
+	sizeof(int),OFFSET(netdata,retries)},
+	{"compress",NULL,NULL,"0",t_boolean,
+	sizeof(boolean),OFFSET(netdata,compress)},
+	{"validate_grib","VALIDATE_GRIB",NULL,"0",t_boolean,
+	sizeof(boolean),OFFSET(netdata,validate_grib)},
+	{"timeout","NETBASE_TIMEOUT","-timeout","0",t_int,
+	sizeof(int),OFFSET(netdata,timeout)},
+	{"callback","NETBASE_CALLBACK",NULL,"0",t_boolean,
+	sizeof(boolean),OFFSET(netdata,callback)},
+	{"bufsize",NULL,NULL,"65536",t_int,
+	sizeof(int),OFFSET(netdata,bufsize)},
+	{"validate","NETBASE_VALIDATE",NULL,NULL,t_str,
+	sizeof(char*),OFFSET(netdata,validate)},
+
+	/* ecaccess stuff */
+	{"ecaccess",NULL,NULL,"0",t_boolean,
+	sizeof(boolean),OFFSET(netdata,ecaccess)},
+	{"echost","ECHOST",NULL,"ecaccess.ecmwf.int",t_str,
+	sizeof(char*),OFFSET(netdata,echost)},
+    {"ecaccesshome","ECACCESS_HOME",NULL,".",t_str,
+    sizeof(char*),OFFSET(netdata,ecaccesshome)},
+    {"eccertport","ECCERTPORT",NULL,"443",t_int,
+    sizeof(int),OFFSET(netdata,eccertport)},
+    {"eccommand","ECCOMMAND",NULL,"client/tools/eccert",t_str,
+    sizeof(char*),OFFSET(netdata,eccommand)},
+    {"ecservice","EC_MARS_SERVICE",NULL,"ecmars",t_str,
+    sizeof(char*),OFFSET(netdata,ecservice)},
+};
+
+static base_class _netbase_base = {
+
+	NULL,                          /* parent class */
+	"netbase",                     /* name         */
+
+	false,                         /* inited       */
+
+	sizeof(netdata),               /* private_size  */
+	NUMBER(opts),                  /* options_count */
+	opts,                          /* options       */
+
+	netbase_init,                  /* init          */
+
+	netbase_open,                  /* open          */
+	netbase_close,                 /* close         */
+
+	netbase_read,                  /* read          */
+	netbase_write,                 /* write         */
+
+	netbase_cntl,                  /* control       */
+
+	netbase_check,                 /* check         */
+
+	NULL,                      	   /* query        */
+
+	NULL,                          /* archive      */
+	NULL,                          /* admin        */
+
+	netbase_validate,              /* validate */
+
+};
+
+static long compression_encode(unsigned char* in, long in_len, unsigned char* out, long out_len)
+{
+    marslog(LOG_EROR,"Compression not supported");
+    return -1;
+}
+
+static long compression_decode(unsigned char* in, long in_len, unsigned char* out, long out_len)
+{
+    marslog(LOG_EROR,"Compression not supported");
+    return -1;
+}
+
+/* the only 'public' variable ... */
+
+base_class *netbase = &_netbase_base;
+
+static void netbase_init(void)
+{
+}
+
+static void catch_alarm(int sig)
+{
+	longjmp(env,1);
+}
+
+static request *messages = NULL;
+
+static void msgout(int lvl,const char *msg)
+{
+
+	lvl &= ~(LOG_ONCE);
+
+	if(messages == NULL)
+		messages = empty_request("MESSAGES");
+
+	add_value(messages,"LVL","%d",lvl);
+	add_value(messages,"MSG","%s",msg);
+}
+
+static void putmsgs(netdata *net)
+{
+	request *r = net->blk.env;
+	if(r)
+	{
+		int n = 0;
+		const char *lvl,*msg;
+		while( (lvl = get_value(r,"LVL",n)) && (msg = get_value(r,"MSG",n)))
+		{
+			marslog(atoi(lvl),"%s [%s]",msg,database_name(net));
+			n++;
+		}
+	}
+}
+
+static void freeblk(netdata *net)
+{
+	err e = net->blk.error;
+
+	xdr_free((xdrproc_t) xdr_netblk, (char*) &net->blk);
+	bzero(&(net->blk),sizeof(netblk));
+	net->blk.error = e;
+}
+
+static err sendblk(netdata *net)
+{
+	if(net->callback && net->server)
+	{
+		static request *r = 0;
+		net->callback = false;
+		net->soc = call_server(net->host,net->port,20);
+		if(net->soc == -1) {
+			marslog(LOG_EROR,"Failed to reconnect to client %s %d",
+				net->host,net->port);
+			return -2;
+		}
+		xdrrec_create(&net->x,net->bufsize,net->bufsize,(mxdrparam)&net->soc,
+			(mxdrproc)readtcp,(mxdrproc)writetcp);
+
+		
+		if(!r) r = empty_request("check");
+		set_value(r,"cb_pid","%ld",(long)net->pid);
+		set_value(r,"cb_time","%ld",(long)net->time);
+		net->blk.env = r;
+	}
+
+	if(setjmp(env) != 0) {
+		marslog(LOG_WARN,"Timeout when sending data to %s",net->host);
+		close(net->soc);net->soc = -1; 
+		return 1;
+	}
+
+	if(net->timeout) {
+		signal(SIGALRM,catch_alarm);
+		alarm(net->timeout*60);
+	}
+
+	net->x.x_op = XDR_ENCODE;
+
+	marslog(LOG_DBUG,"sendblk");
+
+	if(!xdr_netblk(&net->x,&net->blk))
+	{
+		marslog(LOG_WARN,"Failed to send data to %s",net->host);
+		if(net->timeout) alarm(0);
+		return 1;
+	}
+
+	if(!xdrrec_endofrecord(&net->x,true))
+	{
+		marslog(LOG_WARN,"Failed to send data to %s",net->host);
+		if(net->timeout) alarm(0);
+		return 1;
+	}
+
+	if(net->timeout) alarm(0);
+
+
+	if(net->callback && !net->server) 
+	{
+		close(net->soc); 
+		net->soc = -1;
+		xdr_destroy(&net->x);
+	}
+
+	return 0;
+}
+
+static err recvblk(netdata *net)
+{
+	int check;
+
+retry:
+	check = 0;
+
+	if(net->callback && !net->server)
+	{
+		struct sockaddr_in from;
+		marssocklen_t fromlen = sizeof(from);
+
+		net->callback = false;
+		net->soc    = accept(net->cb_soc,(struct sockaddr*)&from, &fromlen);
+		if(net->soc <0)
+		{
+			 marslog(LOG_WARN|LOG_PERR,"accept");
+			 return -2;
+		}
+
+		xdrrec_create(&net->x,net->bufsize,net->bufsize,(mxdrparam)&net->soc,
+			(mxdrproc)readtcp,(mxdrproc)writetcp);
+
+		check = 1;
+	}
+
+	if(setjmp(env) != 0) {
+		marslog(LOG_WARN,"Timeout when receiving data from %s",net->host);
+		close(net->soc);net->soc = -1; 
+		return 1;
+	}
+
+	if(net->timeout) {
+		signal(SIGALRM,catch_alarm);
+	    alarm(net->timeout*60);
+	}
+
+	net->x.x_op = XDR_DECODE;
+
+	marslog(LOG_DBUG,"recvblk");
+
+	if(!xdrrec_skiprecord(&net->x))
+	{
+		marslog(LOG_WARN,"Failed to receive data from %s",net->host);
+		if(net->timeout) alarm(0);
+		return 1;
+	}
+
+	if(!xdr_netblk(&net->x,&net->blk))
+	{
+		marslog(LOG_WARN,"Failed to receive data from %s",net->host);
+		if(net->timeout) alarm(0);
+		return 1;
+	}
+
+	if(net->timeout) alarm(0);
+
+	if(check)
+	{
+		const char *p = get_value(net->blk.env,"cb_pid",0);
+		const char *t = get_value(net->blk.env,"cb_time",0);
+
+		if(p == 0 || t == 0 || atol(p) != net->pid || atol(t) != net->time)
+		{
+			marslog(LOG_WARN,"Wrong callback !!");
+			net->callback = true;
+			close(net->soc);net->soc = -1;
+			xdr_destroy(&net->x);
+			goto retry;
+		}
+	}
+
+	return 0;
+}
+
+
+static err ecaccess_connect(netdata *net, char *host, int *port, char *uid)
+{
+	int perr = 0;
+    char buf[BUFSIZ];
+	char cmd[10240];
+    FILE *file;
+	char *p,*q;
+
+	marslog(LOG_DBUG,"ecaccess_connect new version"); 
+
+    sprintf(cmd,"%s/%s -echost %s -ecport %d -tunnel %s",
+			net->ecaccesshome,
+			net->eccommand,
+			net->echost,
+			net->eccertport,
+			net->ecservice
+			);
+
+	marslog(LOG_DBUG,"Command to execute: '%s'",cmd);
+
+	if ((file = popen(cmd, "r")) == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot run %s",cmd);
+		return -1;
+	}
+
+	memset(buf,0,sizeof(buf));
+	fgets(buf, BUFSIZ - 1, file); 
+	if(strlen(buf)) buf[strlen(buf)-1] = 0;
+
+	if( (perr = pclose(file)) != 0)
+	{
+		marslog(LOG_EROR,"pclose(%s) returns %d.",cmd,perr);
+		return -1;
+	}
+
+	/* parse the received string */
+	p = buf;
+	q = p;
+
+	host[0] = uid[0] = 0; *port = 0;
+
+	while(*p)
+	{
+		switch(*p)
+		{
+			case '@':
+				*p = 0;
+				strcpy(uid,q);
+				q = p+1;
+				*p = '@';
+				break;
+
+			case ':':
+				*p  = 0;
+				strcpy(host,q);
+				*port = atoi(p+1);
+				*p = ':';
+				break;
+		}
+		p++;
+	}
+
+	if(!host[0] || !uid[0] || !*port)
+	{
+		marslog(LOG_EROR,"Cannot parse [%s] output of %s",buf,cmd);
+		return -1;
+	}
+
+    return 0;	
+}
+
+
+static err  netbase_open(void *data,request *r,request *v,int mode)
+{
+	netdata *net = (netdata*)data;
+	err     e = NOERR;
+	int     code;
+	int     wait;
+
+	for(;;)
+	{
+
+		signal(SIGPIPE,SIG_IGN);
+
+		if(net->ecaccess)
+		{
+			char host[1024];
+			char uid[80];
+			int  port;
+
+			/* update the ecaccess host & port */ 
+			if(ecaccess_connect(net,host,&port,uid) != NOERR)
+			{
+				marslog(LOG_EROR,"Received error %d",e);
+				net->soc = -1;
+			}
+			else
+			{
+				marslog(LOG_INFO,"Connecting to ecaccess host %s port %d as user %s",host,port,uid);
+				net->soc    = call_server(host,port,net->retries);
+				marslog(LOG_INFO,"Connected to ecaccess host %s port %d as user %s",host,port,uid);
+				set_value(v,"user","%s",uid);
+			}
+		}
+		else
+		{
+			net->soc    = call_server(net->host,net->port,net->retries);
+		}
+
+		net->cb_soc = -1;
+
+		xdrrec_create(&net->x,net->bufsize,net->bufsize,(mxdrparam)&net->soc,
+			(mxdrproc)readtcp,(mxdrproc)writetcp);
+
+		marslog(LOG_DBUG,"netbase_open");
+
+		if(net->soc<0)
+			return -2;
+
+		bzero(&net->blk,sizeof(netblk));
+		net->blk.code = NET_OPEN;
+		net->blk.req  = r;
+		net->blk.env  = v;
+		net->blk.mode = mode;
+		net->blk.data.data_len = mars.certlen;
+		net->blk.data.data_val = mars.certstr;
+
+		if(mars.infomissing)
+			net->blk.mode |= NET_MISSING;
+
+		if(net->callback)
+		{
+			int port;
+			char host[80];
+
+			net->cb_soc = server_mode(&port,host);
+
+			if(net->cb_soc == -1)
+			{
+				marslog(LOG_EROR,"Callback mode switched off");
+				net->callback = false;
+			}
+			else
+			{
+				net->pid  = getpid();
+				net->time = time(0);
+
+				set_value(v,"cb_port","%d",port);
+				set_value(v,"cb_host","%s",host);
+				set_value(v,"cb_pid","%ld",(long)net->pid);
+				set_value(v,"cb_time","%ld",(long)net->time);
+
+				net->blk.mode |= NET_CALLBACK;
+			}
+		}
+
+		if(sendblk(net)) e = -2;
+
+		net->blk.req  = NULL;
+		net->blk.env  = NULL;
+		net->blk.data.data_len = 0;
+		net->blk.data.data_val = 0;
+
+		if(e == 0)
+			if(recvblk(net))
+				e = -2;
+
+		wait = net->blk.mode;
+		code = net->blk.code;
+
+		putmsgs(net);
+		freeblk(net);
+
+		e = e?e:net->blk.error;
+
+		if(e || (code != NET_WAIT))
+			return e;
+
+		/* for the time being, don't wait */
+
+		return -1;
+		/*NOTREACHED*/
+
+		/* wait a little bit ... */
+
+		close(net->soc);
+		xdr_destroy(&net->x);
+
+		marslog(LOG_INFO,"Server on %s port %d is busy, waiting...",
+		    net->host,net->port);
+
+		if(wait < 1  ) wait = 1;
+		if(wait > 60 ) wait = 60;
+		sleep(wait);
+
+	}
+
+}
+
+static err  netbase_close(void *data)
+{
+	netdata *net = (netdata*)data;
+	err        e = 0;
+	marslog(LOG_DBUG,"netbase_close");
+
+	if(net->soc != -1)
+	{
+		bzero(&net->blk,sizeof(netblk));
+		net->blk.code = NET_CLOSE;
+
+		if(sendblk(net)) e = -2;
+		else
+			if(recvblk(net)) e = -2;
+
+		marslog(LOG_DBUG,"netbase_close");
+		putmsgs(net);
+
+		e =  e?e:net->blk.error;
+		freeblk(net);
+
+		close(net->soc);
+	}
+	xdr_destroy(&net->x);
+
+	return e;
+}
+
+static boolean is_valid(netdata *net,request *r,void *buffer,long length)
+{
+	boolean b;
+	if(!net->validate_grib) return true;
+	if(observation(r)) return true;
+
+#ifdef COMEBACK
+	b = validate_grib(buffer,length);
+#else
+	b = true;
+#endif
+
+	if(!b) print_all_requests(r);
+
+	return b;
+}
+
+static err timed_recvblk(netdata *net, timer *t)
+{
+	int e;
+	long64 total = 0;
+	timer_start(t);
+	if((e = recvblk(net)) == NOERR)
+		total = net->blk.bufsize;
+	timer_stop(t,total);
+
+	return e;
+}
+
+static err  netbase_read(void *data,request *r,void *buffer,long *length)
+{
+	netdata *net = (netdata*)data;
+	char timermsg[1024];
+	timer   *nettimer;
+
+	sprintf(timermsg,"Transfer from %s",net->host);
+	nettimer=get_timer(timermsg,"transfertime",true);
+
+	marslog(LOG_DBUG,"netbase_read");
+
+	bzero(&net->blk,sizeof(netblk));
+
+	net->blk.code = NET_READ;
+	net->blk.mode = net->compress?NET_COMPRESS:0; /* ask for compression */
+
+	net->blk.bufsize = *length;
+
+	if(sendblk(net)) {
+		freeblk(net);
+		return -2;
+	}
+
+	net->blk.data.data_val = buffer;
+
+	if(timed_recvblk(net,nettimer)) {
+		net->blk.data.data_val = NULL;
+		putmsgs(net);
+		freeblk(net);
+		return -2;
+	}
+
+	putmsgs(net);
+	/* was the data compressed ? */
+
+	if(net->blk.error == 0 && net->blk.mode == NET_COMPRESS)
+	{
+		char *temp = malloc(*length);
+		if(temp)
+		{
+			long len   = compression_decode((unsigned char*)buffer,
+			    net->blk.data.data_len,
+			    (unsigned char*)temp,*length);
+
+
+			if(len < 0) {
+				net->blk.error   = -3; /* too small */
+				net->blk.bufsize = -len;
+			} else {
+				memcpy(buffer,temp,len);
+				net->blk.bufsize = len;
+			}
+			FREE(temp);
+		}
+	}
+
+	net->blk.data.data_val = NULL;
+
+	if(r && net->blk.req) {
+		if(mars.debug) {
+			print_all_requests(r);
+			print_all_requests(net->blk.req);
+		}
+		reqcpy(r,net->blk.req);
+	}
+
+	*length  =  net->blk.bufsize;
+
+	freeblk(net);
+
+	if((net->blk.error == 0) && !is_valid(net,r,buffer,*length))
+		return -2;
+
+	return net->blk.error;
+}
+
+static err  netbase_write(void *data,request *r,void *buffer,long *length)
+{
+	netdata *net = (netdata*)data;
+	err e = 0;
+
+	marslog(LOG_DBUG,"netbase_write");
+
+	if(!is_valid(net,r,buffer,*length))
+		return -2;
+
+	bzero(&net->blk,sizeof(netblk));
+	net->blk.code = NET_WRITE;
+
+	net->blk.data.data_len = *length;
+	net->blk.data.data_val = buffer;
+	net->blk.req           = r;
+
+	if(sendblk(net)) e = -2;
+
+	net->blk.req           = NULL;
+	net->blk.data.data_val = NULL;
+	net->blk.data.data_len = 0;
+
+	if(e == 0)
+	{
+		if(recvblk(net)) e = -2;
+		*length  =  net->blk.bufsize;
+	}
+
+	putmsgs(net);
+	freeblk(net);
+
+	return e?e:net->blk.error;
+
+}
+
+static err netbase_list(void *data, request *r)
+{
+	char buffer[1024];
+	long length = sizeof(buffer);
+	int n;
+	FILE *f = stdout;
+	const char *target = no_quotes(get_value(r,"TARGET",0));
+	err e = 0;
+
+	if(target)
+	{
+		f  = fopen(target,target_open_mode(target));
+		if(!f) 
+		{
+			marslog(LOG_EROR|LOG_PERR,"fopen(%s)",target);
+			return -2;
+		}
+	}
+
+	while( (n = netbase_read(data,r,buffer,&length))  == NOERR )
+	{
+		fwrite(buffer,1,length,f);
+		length = sizeof(buffer);
+	}
+
+	if(n != EOF)
+		marslog(LOG_WARN,"Got error %d during list",n);
+
+	if(ferror(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error during list");
+		e = -2;
+	}
+
+	if(target && f) 
+	{
+		if(fclose(f) != 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"fclose(%s)",target);
+			return -2;
+		}
+	}
+
+	return e;
+}
+
+static err  netbase_cntl(void *data,int code,void *param,int size)
+{
+	switch(code)
+	{
+	case CNTL_LIST:
+		netbase_list(data,(request*)param);
+		return 0;
+		/*NOTREACHED*/
+		break;
+
+	default:
+		return -1;
+		/*NOTREACHED*/
+		break;
+	}
+	return -1;
+}
+
+static boolean  netbase_check(void *data,request *r)
+{
+	netdata *net = (netdata*)data;
+	boolean b;
+	err     e = NOERR;
+
+	marslog(LOG_DBUG,"netbase_check");
+
+	bzero(&net->blk,sizeof(netblk));
+	net->blk.code = NET_CHECK;
+
+	net->blk.req           = r;
+	if(sendblk(net)) e  = -2;
+	net->blk.req           = NULL;
+
+	if(e == 0) recvblk(net);
+	putmsgs(net);
+
+	if(net->blk.error || e)
+		b = false;
+	else
+		b = net->blk.check;
+
+
+	freeblk(net);
+
+	return b;
+
+}
+/*====================================================================*/
+/* Server side.                                                       */
+/*====================================================================*/
+
+
+
+static database *net_open(netdata *net,base_class *driver)
+{
+	database *b;
+
+	if(net->blk.mode & NET_CALLBACK)
+	{
+		net->callback = true;
+		net->pid      = atol(get_value(net->blk.env,"cb_pid",0));
+		net->time     = atol(get_value(net->blk.env,"cb_time",0));
+		net->port     = atoi(get_value(net->blk.env,"cb_port",0));
+		net->port     = atoi(get_value(net->blk.env,"cb_port",0));
+		net->host     = strcache(get_value(net->blk.env,"cb_host",0));
+	}
+
+	if(net->blk.mode & NET_MISSING)
+		mars.infomissing = true;
+
+	net->r = clone_all_requests(net->blk.req);
+	net->e = clone_all_requests(net->blk.env);
+
+
+
+#ifndef METVIEW
+#ifdef ECMWF
+
+	if(mars.certify)
+	{
+		int e;
+
+		set_environ(net->e);
+
+		 e = certify(net->r,net->e,
+			net->blk.data.data_val,
+			net->blk.data.data_len);
+			
+		if(e){
+			net->blk.error = -2;
+			freeblk(net);
+			return NULL;
+		}
+	}
+	else
+	{
+		const char *user = get_value(net->e,"user",0);
+		new_user(user);
+		print_all_requests(get_environ());
+		print_all_requests(net->r);
+	}
+#endif
+#endif
+
+	b = database_open(driver,NULL,net->r,net->e,net->blk.mode&0x7);
+
+	net->blk.req = NULL;
+	net->blk.env = NULL;
+
+	if(b == NULL)
+		net->blk.error = -2;
+
+	freeblk(net);
+
+	return b;
+}
+
+static err net_close(netdata *net,database *b)
+{
+	free_all_requests(net->r);
+	free_all_requests(net->e);
+	freeblk(net);
+	return net->blk.error = database_close(b);
+}
+
+
+static err net_read(netdata *net,database *b)
+{
+	long length  = net->blk.bufsize;
+	char *buffer = MALLOC(length);
+	request   *r = empty_request(NULL);
+	boolean comp = net->blk.mode == NET_COMPRESS;
+
+	freeblk(net);
+
+
+	net->blk.error = database_read(b,r,buffer,&length);
+	net->blk.bufsize = length;
+
+	if((net->blk.error == 0) && !is_valid(net,r,buffer,length))
+		net->blk.error = -2;
+
+	if(comp && net->blk.error == 0) /* compression requested */
+	{
+		char *temp = (char*)MALLOC(length);
+		long len   = compression_encode((unsigned char*)buffer,length,
+		    (unsigned char*)temp,length);
+
+		if(len < 0)
+		{
+			/* compression failed */
+			FREE(temp);
+		}
+		else
+		{
+			/* compression succeded */
+			net->blk.mode = NET_COMPRESS;
+			FREE(buffer);
+			buffer = temp;
+			length = len;
+		}
+	}
+
+	if(net->blk.error == NOERR)
+	{
+		net->blk.data.data_len = length;
+		net->blk.data.data_val = buffer;
+	}
+
+	net->blk.req  = r;
+
+	marslog(LOG_DBUG,"net_read : %d",length);
+
+	return net->blk.error;
+}
+
+static err net_write(netdata *net,database *b)
+{
+	long length  = net->blk.data.data_len;
+	char *buffer = net->blk.data.data_val;
+	request *r   = clone_all_requests(net->blk.req);
+
+	if(is_valid(net,r,buffer,length))
+		net->blk.error = database_write(b,r,buffer,&length);
+	else
+		net->blk.error = -2;
+
+
+	free_all_requests(r);
+	/* net->blk.req = NULL; */
+
+	freeblk(net);
+
+	net->blk.bufsize = length;
+
+	return net->blk.error;
+}
+
+static err net_check(netdata *net,database *b)
+{
+	boolean c =  database_check(b,net->blk.req);
+	freeblk(net);
+	net->blk.check = c;
+	return NOERR;
+}
+
+static err net_raw(netdata *net,database *b)
+{
+	return 0;
+}
+
+void basetask(int soc,int count, void *data)
+{
+
+	base_class *driver = (base_class*)data;
+	netdata  net;
+	database *b = NULL;
+	boolean  stop = false;
+
+	bzero(&net,sizeof(net));
+
+	net.soc    = soc;
+	net.server = true;
+
+	signal(SIGPIPE,SIG_IGN);
+
+#if 0
+	xdrrec_create(&net.x,net.bufsize,net.bufsize,(mxdrparam)&net.soc,
+		(mxdrproc)readtcp,(mxdrproc)writetcp);
+#else
+	/* Improve transfers:
+		- Set socket buffer sizes to MARS_SOCKBUF
+		- Set buffer sizes to the same as socket buffer sizes
+	*/
+	socket_buffers(net.soc);
+	xdrrec_create(&net.x,mars.sockbuf,mars.sockbuf,(mxdrparam)&net.soc,
+		(mxdrproc)readtcp,(mxdrproc)writetcp);
+
+#endif
+
+	marslog(LOG_DBUG,"Starting basetask %d...",count);
+	net.host = strcache(host_of(addr_of(soc)));
+
+	mars.outproc = msgout;
+
+
+	while(!stop)
+	{
+
+		marslog(LOG_DBUG,"Waiting...");
+		/* dumpmem(); */
+
+		if(recvblk(&net))
+			stop = true;
+
+		switch(net.blk.code)
+		{
+
+		case NET_OPEN:
+			/* Tell remote guy to sleep a bit ... */
+			if(mars.maxforks && count >= mars.maxforks)
+			{
+				bzero(&(net.blk),sizeof(netblk));
+				net.blk.code = NET_WAIT;
+				net.blk.mode = 20;      /* 20 sec. */
+				stop = true;
+			}
+			else
+			{
+				marslog(LOG_DBUG,"get NET_OPEN");
+				b = net_open(&net,driver);
+				if(b == NULL)
+					stop = true;
+			}
+			break;
+
+		case NET_CLOSE:
+			marslog(LOG_DBUG,"get NET_CLOSE");
+			net_close(&net,b);
+			stop = true;
+			b = NULL;
+			break;
+
+		case NET_READ:
+			marslog(LOG_DBUG,"get NET_READ");
+			if(net_read(&net,b) != 0)
+				/* stop = true; */
+				;
+			break;
+
+		case NET_WRITE:
+			marslog(LOG_DBUG,"get NET_WRITE");
+			if(net_write(&net,b) != 0)
+				/* stop = true; */
+				;
+			break;
+
+		case NET_CHECK:
+			marslog(LOG_DBUG,"get NET_CHECK");
+			if(net_check(&net,b) != 0)
+				/* stop = true; */
+				;
+			break;
+
+		case NET_ABORT:
+			marslog(LOG_INFO,"Abort cmd received");
+			marsexit(9);
+			break;
+
+		case NET_RAW:
+			net_raw(&net,b);
+			break;
+
+		default:
+			if(b) net_close(&net,b);
+			marslog(LOG_EROR,"Unknown tag received : %d",net.blk.code);
+			stop = true;
+			break;
+
+		}
+
+		net.blk.env = messages;
+
+		if(sendblk(&net))
+			stop = true;
+
+		free_all_requests(messages);
+		net.blk.env = messages = NULL;
+
+		freeblk(&net);
+
+	}
+
+	mars.outproc = NULL;
+
+	database_admin(driver);
+
+	marslog(LOG_DBUG,"Ending basetask...");
+
+}
+
+static err netbase_validate(void *data, request *r, request *e, int mode)
+{
+	netdata *net = (netdata*)data;
+	err ret = NOERR;
+	
+	if(net->validate)
+		ret = validate_request(r,e,net->validate);
+
+	return ret;
+}
diff --git a/src/libMars/netbase.h b/src/libMars/netbase.h
new file mode 100755
index 0000000..9213363
--- /dev/null
+++ b/src/libMars/netbase.h
@@ -0,0 +1,28 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#define NET_ERROR	-1
+#define NET_OK      0
+
+#define NET_OPEN	1
+#define NET_CLOSE	2
+#define NET_READ	3
+#define NET_WRITE	4
+#define NET_CHECK	5
+#define NET_QUERY	6
+#define NET_WAIT 	7
+#define NET_RAW 	8
+
+#define NET_COMPRESS 8
+#define NET_CALLBACK 16
+#define NET_MISSING  32
+
+#define NET_ABORT	255
+
diff --git a/src/libMars/nfdbbase.c b/src/libMars/nfdbbase.c
new file mode 100644
index 0000000..62a6470
--- /dev/null
+++ b/src/libMars/nfdbbase.c
@@ -0,0 +1,1091 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#define HYPERCUBE
+
+#if defined(ECMWF) && !defined(NOFDB)
+
+#define PARAM_U  131
+#define PARAM_V  132
+#define PARAM_VO 138
+#define PARAM_D  155
+
+extern int initfdb(void);
+extern int openfdb(char*,int*,char*);
+extern int openfdb_remote(char*,int*,char*,char*);
+extern int readfdb(int*,void*,int*);
+extern int writefdb(int*,void*,int*);
+extern int closefdb(int*);
+extern int setvalfdb(int*,char*,char*);
+extern int setvalfdb_f(int*,char*,float);
+extern int setvalfdb_i(int*,char*,int);
+extern int isfdb_attribute(int*,char*);
+
+static void     nfdb_init(void);
+static err      nfdb_open(void *data,request*,request*,int);
+static err      nfdb_close(void *data);
+static err      nfdb_read(void *data,request *r,void *buffer,long *length);
+static err      nfdb_write(void *data,request *r,void *buffer,long *length);
+static boolean  nfdb_check(void *data,request *r);
+
+typedef struct fdbdata {
+	int     ref;
+	request *w;
+	request *u;
+	hypercube *h;
+	int        index;
+	boolean u_and_v;
+	boolean retrieve;
+	boolean opened;
+	char    *u_grib;
+	char    *v_grib;
+	long    u_len;
+	long    v_len;
+	char    *host;
+	int     retry;
+	int     timeout;
+	char    *buffer;
+	long    length;
+	long    buflen;
+	long    pos;
+	boolean    more;
+	boolean    y2k;
+	boolean    expect;
+	boolean    expect_any;
+	char    *fdbname;
+	timer   *fdbtimer;
+	int      repres;
+	boolean    nomissing;
+	boolean    uv_from_fdb;
+	boolean  leg_done;
+	boolean  set_table;
+} fdbdata;
+
+static option opts[] = {
+	{"host","FDB_SERVER_HOST",NULL,"vpp700-x08",t_str,sizeof(char*), OFFSET(fdbdata,host)},
+	{"retry",NULL,NULL,"5",t_int,sizeof(int), OFFSET(fdbdata,retry)},
+	{"timeout",NULL,NULL,"120",t_int,sizeof(int), OFFSET(fdbdata,timeout)},
+	{"fdbname",NULL,NULL,"fdb",t_str,sizeof(char*), OFFSET(fdbdata,fdbname)},
+
+	{"buffer","MARS_FDB_BUFFER",NULL,"10485760",t_int,sizeof(int),
+		OFFSET(fdbdata,buflen)},
+	{"retrieve","MARS_FDB_RETRIEVE",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(fdbdata,retrieve)},
+	{"y2k","MARS_FDB_Y2K",NULL,"1",t_boolean,sizeof(boolean),
+		OFFSET(fdbdata,y2k)},
+	{"nomissing","MARS_FDB_SUPPRES_MISSING",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(fdbdata,nomissing)},
+	{"uv_from_fdb","MARS_UV_FROM_FDB",NULL,"1",t_boolean,sizeof(boolean),
+		OFFSET(fdbdata,uv_from_fdb)},
+	{"set_table","MARS_FDB_SET_TABLE",NULL,"0",t_boolean,sizeof(boolean),
+		OFFSET(fdbdata,set_table)},
+};
+
+
+base_class _nfdbbase = {
+
+	NULL,                      /* parent class */
+	"nfdbbase",                /* name         */
+
+	false,                     /* inited       */
+
+	sizeof(fdbdata),           /* private size */
+	NUMBER(opts),              /* option count */
+	opts,                      /* options      */
+
+	nfdb_init,                  /* init         */
+
+	nfdb_open,                  /* open         */
+	nfdb_close,                 /* close        */
+
+	nfdb_read,                  /* read         */
+	nfdb_write,                 /* write        */
+
+	NULL,                      /* control      */
+
+	nfdb_check,                 /* check        */
+
+};
+
+
+base_class *nfdbbase = &_nfdbbase;
+
+static err timed_readfdb(int *ref, void *buffer, int *length, timer *t)
+{
+	int e;
+	long64 total = 0;
+	timer_start(t);
+	if((e = readfdb(ref,buffer,length)) == NOERR)
+		total = *length;
+	timer_stop(t,total);
+
+	return e;
+}
+
+/* 
+   n=100000 for step range or fcperiod
+   n=1000 for quantile
+*/
+static long range2fdb(const char *r, long n)
+{
+	const char *p = r+strlen(r);
+	stepRange sr;
+
+	sr.from = atol(r);
+	sr.to   = 0;
+
+	while(p>r)
+	{
+		if(*p == '-' || *p == ':')
+		{
+			++p;
+			sr.to   = atol(p);
+			break;	
+		}
+		--p;
+	}
+	return (sr.from * n + sr.to);
+}
+
+
+static void nfdb_init(void)
+{
+	initfdb();
+}
+
+static int opened = false;
+static int first  = true;
+static int ref    = 0;
+
+static err setallvalues(fdbdata*,request*);
+
+static void close_fdb(int code,void *data)
+{
+ 	if(opened) {
+		closefdb(&ref);
+		opened = false;
+	}
+}
+
+static err  nfdb_open(void *data,request *r,request *ev,int mode)
+{
+	err e = 0;
+	fdbdata *fdb   = (fdbdata*)data;
+	const char *p = get_value(r,"EXPECT",0);
+	const char *fdbmode = getenv("FDB_CONFIG_MODE");
+
+	boolean local = fdbmode && (strcmp(fdbmode,"standalone") == 0);
+	char    msg[1024];
+
+#ifndef HYPERCUBE
+	fdb->u      = unwind_one_request(r);
+	fdb->w      = fdb->u;
+
+#else
+	fdb->h      = new_hypercube_from_mars_request(r);
+	fdb->u      = clone_one_request(r);
+#endif
+
+	fdb->expect     = p?atol(p):0;
+	fdb->expect_any = (p && (atol(p) == 0));
+
+	if(fdb->expect)
+		if(count_values(r,"DATABASE") == 1)	
+			marslog(LOG_INFO,"Trying to retrieve %d fields from the fdb",
+				fdb->expect);
+
+	if(local)
+		sprintf(msg,"Transfer from local FDB");
+	else
+		sprintf(msg,"Transfer from %s",fdb->host);
+
+	fdb->fdbtimer=get_timer(msg,"transfertime",true);
+
+	if(mars.debug)
+	{
+		print_all_requests(r);
+		print_all_requests(fdb->u);
+	}
+
+	/* int setclientfdb(int retries, int timeout); */
+	/* setclientfdb(5,60*10); */
+	setclientfdb(fdb->retry,fdb->timeout);
+
+	if(!opened)
+	{
+		char buf[1024];
+		timer *connect_time = 0;
+
+		sprintf(buf,"Connecting to %s",database_name(fdb));
+		connect_time=get_timer(buf,NULL,true);
+
+		timer_start(connect_time);
+		e = openfdb_remote(fdb->fdbname,&fdb->ref,"r",fdb->host);
+		timer_stop(connect_time,0);
+		opened = (e == 0);
+		ref    = fdb->ref;
+	}
+	else fdb->ref = ref;
+
+	if(e == 0 && fdb->retrieve)
+	{
+		if(fdb->expect)
+		{
+			marslog(LOG_WARN,"EXPECT does not work with MARS_FDB_RETRIEVE");
+			marslog(LOG_WARN,"mode MARS_FDB_RETRIEVE disabled");
+			fdb->retrieve = 0;
+		}
+		else
+		{
+			fdb->more     = true;
+			fdb->buffer   = reserve_mem(fdb->buflen);
+			setallvalues(fdb,r);
+			if(first) {
+				install_exit_proc(close_fdb,0);
+				first = false;
+				marslog(LOG_INFO,"Using MARS_FDB_RETRIEVE flag");
+			}
+		}
+
+	}
+
+	return e;
+}
+
+static err  nfdb_close(void *data)
+{
+	fdbdata *fdb = (fdbdata*)data;
+	if(fdb->u_grib) release_mem(fdb->u_grib);
+	if(fdb->v_grib) release_mem(fdb->v_grib);
+	if(fdb->buffer) release_mem(fdb->buffer);
+	free_all_requests(fdb->u);
+
+	if(fdb->repres)
+	{
+		if(fdb->repres>1)
+			marslog(LOG_WARN,"%d fields were retrieved from a different representation", fdb->repres);
+		else
+			marslog(LOG_WARN,"1 field was retrieved from a different representation");
+	}
+
+#ifdef HYPERCUBE
+	free_hypercube(fdb->h);
+#endif
+
+	opened = false;
+	first  = false;
+	return closefdb(&fdb->ref);
+}
+
+static void SETVALFDB(int *f,const char *a, const char *b)
+{
+	if(mars.debug)
+		marslog(LOG_DBUG,"SETVALFDB: %s %s",a,b);
+	setvalfdb(f,(char *)a,(char *)b);
+}
+
+static void SETVALFDBF(int *f,const char *a, float b)
+{
+	int   s  = b/abs(b);
+	float pr = 1000.0;
+	float p  = ((int)((b * pr) + (s*0.499))) / pr;
+
+	if(mars.debug)
+		marslog(LOG_DBUG,"SETVALFDB_F: %s %f",a,p);
+	setvalfdb_f(f,(char *)a,p);
+}
+
+static void SETVALFDB_OCEAN(int *f,const char *a, const char *str)
+{
+	fortfloat b  = atof(str);
+	int       p  = round_decimal(b) * 1000;
+
+	if(mars.debug)
+		marslog(LOG_DBUG,"SETVALFDB_OCEAN: %s %d",a,p);
+	setvalfdb_i(f,(char *)a,p);
+}
+
+static const char * REPRES[] = { "sh", "gg", "ll", };
+
+static err check_repres(fdbdata *fdb,char *buffer,long *length)
+{
+	const char *repres = get_value(fdb->w,"REPRES",0);
+	const char *res = repres?lowcase(repres):NULL;
+	int i;
+	err ret = -1;
+
+	if(!res) return -1;
+
+	for(i = 0; i < NUMBER(REPRES); i++)
+	{
+		int len = *length;
+
+
+		if(EQ(REPRES[i],res)) continue;
+
+		marslog(LOG_DBUG,"TRY %s",REPRES[i]);
+
+		setvalfdb(&fdb->ref,"repres",(char*)REPRES[i]);
+
+		if((ret = timed_readfdb(&fdb->ref,buffer,&len,fdb->fdbtimer)) == 0)
+		{
+			*length = len;
+			fdb->repres++;
+			marslog(LOG_DBUG,"OK %s",REPRES[i]);
+			break;
+		}
+
+	}
+	setvalfdb(&fdb->ref,"repres",(char*)res);
+	return ret;
+}
+
+static err check_uv(fdbdata *fdb,char *buffer,long *length)
+{
+
+	err ret = -1;
+	char *vo_grib = NULL;
+	char *d_grib  = NULL;
+	int vo_len;
+	int d_len;
+
+	int p = get_value(fdb->w,"PARAM",0)?atoi(get_value(fdb->w,"PARAM",0)):0;
+
+	/* u and v requested */
+
+	if(p != PARAM_U && p != PARAM_V) goto fail;
+
+	/* Check if previouly converted */
+
+	if(p == PARAM_U && fdb->u_grib != 0)
+	{
+		if(*length < fdb->u_len) {
+			ret     = -3;
+			*length = fdb->u_len;
+			goto fail;
+		}
+		*length = fdb->u_len;
+		memcpy(buffer,fdb->u_grib,fdb->u_len);
+		release_mem(fdb->u_grib);
+		fdb->u_grib = NULL;
+		marslog(LOG_DBUG,"U ready...");
+		return 0;
+	}
+
+	if(p == PARAM_V && fdb->v_grib != 0)
+	{
+		if(*length < fdb->v_len) {
+			ret     = -3;
+			*length = fdb->v_len;
+			goto fail;
+		}
+		*length = fdb->v_len;
+		memcpy(buffer,fdb->v_grib,fdb->v_len);
+		release_mem(fdb->v_grib);
+		fdb->v_grib = NULL;
+		marslog(LOG_DBUG,"V is ready...");
+		return 0;
+	}
+
+	/* look for vo and d */
+
+	/* Get vorticity */
+
+	setvalfdb(&fdb->ref,"param","138");
+	vo_grib = reserve_mem(vo_len = *length);
+
+	if((ret = timed_readfdb(&fdb->ref,vo_grib,&vo_len,fdb->fdbtimer)) != 0)
+		goto fail;
+
+
+	/* Get divergence */
+	setvalfdb(&fdb->ref,"param","155");
+	d_grib = reserve_mem(d_len = *length);
+	if((ret = timed_readfdb(&fdb->ref,d_grib,&d_len,fdb->fdbtimer)) != 0)
+		goto fail;
+
+#if 1
+	if(fdb->uv_from_fdb)
+	{
+		fdb->uv_from_fdb = false; /* From now, don't try UV anymore */
+		marslog(LOG_INFO,"U and V not found in FDB, using VO and D for this request");
+	}
+#endif
+
+	if(fdb->u_grib) release_mem(fdb->u_grib); fdb->u_grib = NULL;
+	if(fdb->v_grib) release_mem(fdb->v_grib); fdb->v_grib = NULL;
+
+	if(p == PARAM_U)
+	{
+		fdb->v_grib  = reserve_mem(fdb->v_len = *length);
+		ret = makeuv(vo_grib,d_grib,vo_len,buffer,fdb->v_grib,length);
+		fdb->v_len = *length;
+	}
+	else
+	{
+		fdb->u_grib     = reserve_mem(fdb->u_len = *length);
+		ret = makeuv(vo_grib,d_grib,vo_len,fdb->u_grib,buffer,length);
+		fdb->u_len = *length;
+	}
+
+
+fail:
+	if(vo_grib) release_mem(vo_grib);
+	if(d_grib)  release_mem(d_grib);
+
+	setvalfdb(&fdb->ref,"param",(char *)get_value(fdb->w,"PARAM",0));
+
+	return ret;
+}
+
+boolean windgust(request *s)
+{
+	boolean windgust = false;
+	int i = 0;
+	const char *param;
+
+	while( ((param = get_value(s,"PARAM",i++)) != NULL) && !windgust )
+	{
+		long par = 0;
+		long table = -1;
+
+		paramtable(lowcase(no_quotes(param)),&par,&table,false);
+		if((par == 49) || (par == 123))
+		{
+			windgust = true;
+			if(count_values(s,"PARAM")>1)
+			{
+				marslog(LOG_WARN,"Wind gust STEP needs special handling retrieving from FDB");
+				marslog(LOG_WARN,"Please, split your MARS request to retrieve param 49 alone");
+			}
+		}
+	}
+	return windgust;
+}
+
+static err setallvalues(fdbdata *fdb,request *s)
+{
+
+	parameter *p = 0;
+	request   *r = empty_request(0);
+	boolean wave_fg = false;
+	const char *type   = get_value(s,"TYPE",0);
+	const char *stream = get_value(s,"STREAM",0);
+	boolean fp = false;   /* Forecast Probability */
+	boolean stream_enfo = false;
+	const char *ignore_wave_fg = getenv("MARS_IGNORE_WAVE_FG_FDB");
+
+	if(type && stream && EQ(type,"FG") && (EQ(stream,"WAVE") || EQ(stream,"SCWV")))
+		wave_fg = true;
+
+	if(type && EQ(type,"FP") && stream && (EQ(stream,"ENFO") || EQ(stream,"WAEF")))
+	{
+		if(!windgust(s))
+			fp = true;
+	}
+
+	if(stream && EQ(stream,"ENFO"))
+		stream_enfo = true;
+
+	/* Override behaviour via environment variable */
+	/* All this code should go once dissemination can handle step ranges for FP */
+	if(mars.no_special_fp)
+		fp = false;
+
+	names_loop(s,sort_request,&r);
+
+
+	p = s->params;
+	while(p)
+	{
+		if(get_value(r,p->name,0) == 0)
+			valcpy(r,s,p->name,p->name);
+			
+		p = p->next;
+	}
+
+	/* print_all_requests(r); */
+
+	p = r->params;
+
+	if(get_value(r,"LEVTYPE",0) && (strcmp(get_value(r,"LEVTYPE",0),"SFC") == 0))
+		setvalsfdb(&fdb->ref,"levelist","0000");
+
+	while(p)
+	{
+		if(mars.debug)
+		{
+			char buf[10240];
+			value *v = p->values;
+			buf[0] = '\0';
+			while(v)
+			{
+				strcat(buf,v->name);
+				if(v->next) strcat(buf,"/");
+				v = v->next;
+			}
+			marslog(LOG_DBUG,"setvalsfdb: %s %s",p->name,buf);
+		}
+
+		if(strcmp(p->name,"STREAM") == 0)
+		{
+			stream_enfo = (strcmp(p->values->name,"ENFO") == 0) ;
+			setvalsfdb(&fdb->ref,p->name,(char *)lowcase(p->values->name));
+		}
+		else if (strcmp(p->name,"DATE") == 0)
+		{
+			int n = 0;
+			if(strlen(p->values->name) == 8 && !fdb->y2k) n = 2;
+			setvalsfdb(&fdb->ref,p->name,(char *)lowcase(no_quotes(p->values->name+n)));
+		}
+		else if(strcmp(p->name,"LEVTYPE")==0)
+		{
+			char levtype[3];
+			int fdb_len = 1; /* Length of levtype in FDB */
+			levtype[0] = p->values->name[0];
+			if(strcmp(p->values->name,"DP") == 0)
+			{
+				SETVALFDB(&fdb->ref,"levelist","off");
+				SETVALFDB(&fdb->ref,"latitude","off");
+				SETVALFDB(&fdb->ref,"longitude","off");
+			}
+			else
+			{
+				if(strcmp(p->values->name,"PT") == 0)
+					levtype[0] = 't';
+				else
+				if(strcmp(p->values->name,"PV") == 0)
+					levtype[0] = 'v';
+				else
+				if(strcmp(p->values->name,"WV") == 0)
+				{
+					/* Ugly: quick hack to get it working */
+					levtype[1] = p->values->name[1];
+					fdb_len=2;
+				}
+			}
+			levtype[fdb_len] = '\0';
+			setvalsfdb(&fdb->ref,"LEVTYPE",(char *)lowcase(levtype));
+		}
+		else if(strcmp(p->name,"STEP")==0 && wave_fg && (ignore_wave_fg == NULL))
+				setvalsfdb(&fdb->ref,p->name,"6");
+		else if((strcmp(p->name,"STEP")==0) || (strcmp(p->name,"FCPERIOD")==0))
+		{
+			const char *q = 0;
+			int i = 0;
+			while(q = get_value(r,p->name,i++))
+			{
+				if(isrange(q))
+				{
+					char buf[12];
+					/* Once FP in FDB is like EFI (ranges), we can remove 
+					   next test and only set ranges as p1*100000+p2 */
+					if(!fp)
+					{
+						long s = range2fdb(q,100000);
+						sprintf(buf,"%ld",s);
+					}
+					else
+					{
+						stepRange sr;
+						str2range(q,&sr);
+						sprintf(buf,"%02l%02l",sr.from/24,sr.to/24);
+					}
+					setvalsfdb(&fdb->ref,p->name,buf);
+				}
+				else
+					setvalsfdb(&fdb->ref,p->name,q);
+			}
+		}
+		else if(strcmp(p->name,"QUANTILE")==0)
+		{
+			const char *q = 0;
+			int i = 0;
+			while(q = get_value(r,p->name,i++))
+			{
+				if(isrange(q))
+				{
+					char buf[12];
+					long s = range2fdb(q,1000);
+
+					sprintf(buf,"%ld",s);
+					setvalsfdb(&fdb->ref,p->name,buf);
+				}
+				else
+					setvalsfdb(&fdb->ref,p->name,q);
+			}
+		}
+		else if(strcmp(p->name,"PARAM") == 0)
+		{
+			const char *q = 0;
+			int i = 0;
+			while(q = get_value(r,p->name,i++))
+			{
+				long par = 0;
+				long table = -1;
+
+				paramtable(lowcase(no_quotes(q)),&par,&table,false);
+				if(table >= 210 || table == 201 || table == 162 || (fdb->set_table && table != -1) || (stream_enfo && (table == 171 || table == 173)))
+				{
+					char npar[7];
+					sprintf(npar,"%ld%03ld",table,par);
+					setvalsfdb(&fdb->ref,p->name,npar);
+				}
+				else
+					setvalsfdb(&fdb->ref,p->name,(char *)lowcase(no_quotes(q)));
+			}
+		}
+		else if(strcmp(p->name,"LEVELIST")==0)
+		{
+			const char *q = 0;
+			int i = 0;
+			while(q = get_value(r,p->name,i++))
+			{
+				char buf[5];
+
+				if(atof(q) == atol(q))
+					sprintf(buf,"%04ld",atol(q));
+				else
+				{
+					int n = 4-strlen(q);
+					strcpy(buf,q);
+					while(n-->0) strcat(buf,"0");
+				}	
+				setvalsfdb(&fdb->ref,"levelist",buf);
+			}
+		}
+		else
+		{
+			const char *q = 0;
+			int i = 0;
+			while(q = get_value(r,p->name,i++))
+				setvalsfdb(&fdb->ref,p->name,(char *)lowcase(no_quotes(q)));
+		}
+		p = p->next;
+	}
+
+	free_all_requests(r);
+	return 0;
+}
+
+static fortint fdbseek(void* data, fortint offset, fortint whence)
+{
+	marslog(LOG_WARN,"No seek backwards on fdb");
+	return -1;
+}
+
+static fortint fdbtell(void* data)
+{
+	fdbdata *fdb = (fdbdata*)data;
+	return fdb->pos;
+}
+
+static long read1(void *data,void *buf,long len)
+{
+	fdbdata *fdb = (fdbdata*)data;
+
+	if(fdb->pos >= fdb->length)
+	{
+		if(fdb->more)
+		{
+			err ret = 0;
+			fdb->pos    = 0;
+			fdb->length = fdb->buflen;
+			ret = retrievefdb(&fdb->ref,fdb->buffer,&fdb->length);
+			if(ret != 0 && ret != -103)
+				return -1;
+			fdb->more = (ret == -103);
+		}else return -1;
+	}
+
+	if(fdb->length - fdb->pos < len)
+		len = fdb->length - fdb->pos;
+
+	memcpy(buf,fdb->buffer+fdb->pos,len);
+
+	fdb->pos += len;
+
+	return len;
+}
+
+void request_to_fdb(int ref,request *r,int y2k)
+{
+	err  ret = 0;
+	parameter *p = r->params;
+	boolean wave_fg = false;
+	int llen;
+	boolean ocean = false;
+	int parm = 0;
+	boolean fp = false; /* Forecast Probability */
+	const char *type   = 0;
+	boolean has_param  = true;
+	const char *levtype = get_value(r,"LEVTYPE",0);
+	const char *stream  = get_value(r,"STREAM",0);
+	const char *leg     = get_value(r,"_LEG_NUMBER",0);
+	boolean stream_enfo = false;
+	const char *ignore_wave_fg = getenv("MARS_IGNORE_WAVE_FG_FDB");
+
+
+	/* It's part of structure "fdb", but it can't be passed as parameter */
+	const char *mars_fdb_set_table = getenv("MARS_FDB_SET_TABLE");
+	boolean set_table = false;
+	if(mars_fdb_set_table != NULL)
+		set_table = EQ(mars_fdb_set_table,"1");
+
+	if(levtype && (strcmp(levtype,"SFC") == 0))
+		SETVALFDB(&ref,"levelist","0000");
+
+	type   = get_value(r,"TYPE",0);
+	if(type && EQ(type,"FP") && stream && (EQ(stream,"ENFO") || EQ(stream,"WAEF")))
+	{
+		if(!windgust(r))
+			fp = true;
+	}
+
+	if(stream && EQ(stream,"ENFO"))
+		stream_enfo = true;
+
+	/* Override behaviour via environment variable */
+	/* All this code should go once dissemination can handle step ranges for FP */
+	if(mars.no_special_fp)
+		fp = false;
+
+	/* Special case for grib2fdb of hindcast 2d-wave spectra*/
+	if(stream && (EQ(stream,"ENWH") || EQ(stream,"EWHO")))
+	{
+		SETVALFDB(&ref,"frequency","off");
+		SETVALFDB(&ref,"direction","off");
+	}
+
+
+	if(levtype && strcmp(levtype,"DP") == 0)
+	{
+		ocean = true;
+		SETVALFDB(&ref,"levelist","off");
+		SETVALFDB(&ref,"latitude","off");
+		SETVALFDB(&ref,"longitude","off");
+	}
+
+	if(leg != NULL)
+	{
+		SETVALFDB(&ref,"leg",no_quotes(leg));
+	}
+	else
+	{
+#ifdef p690
+#if 0
+		if(isfdb_attribute(&ref,"leg"))
+			SETVALFDB(&ref,"leg","1");
+#endif
+#endif
+	}
+
+	while(p)
+	{
+		if((p->name[0] == '_') || 
+			(strcmp(p->name,"REPRES") == 0))
+		{
+			/* Skip */
+		}
+		else if(strcmp(p->name,"STREAM") == 0)
+		{
+		 	if(strcmp(p->values->name,"DA") == 0) 
+				SETVALFDB(&ref,"stream","oper");
+			else
+		 	if(strcmp(p->values->name,"SD") == 0) 
+				SETVALFDB(&ref,"stream","supd");
+			else
+		 	if(strcmp(p->values->name,"WAVE") == 0) 
+			{
+				if(strcmp(get_value(r,"TYPE",0),"FG") == 0)
+					wave_fg = true;
+				SETVALFDB(&ref,"stream","wave");
+			}
+			else
+		 	if(strcmp(p->values->name,"SCWV") == 0) 
+			{
+				if(strcmp(get_value(r,"TYPE",0),"FG") == 0)
+					wave_fg = true;
+				SETVALFDB(&ref,"stream","scwv");
+			}
+			else
+		 	if(strcmp(p->values->name,"EF") == 0) 
+				SETVALFDB(&ref,"stream","enfo");
+			else
+		 	if(strcmp(p->values->name,"SF") == 0) 
+				SETVALFDB(&ref,"stream","sens");
+			else
+		 	if(strcmp(p->values->name,"MO") == 0) 
+			{
+				SETVALFDB(&ref,"stream","mnth");
+			}
+			else
+				SETVALFDB(&ref,p->name,lowcase(p->values->name));
+		}
+		else if (strcmp(p->name,"DATE") == 0)
+		{
+			int n = 0;
+				if(strlen(p->values->name) == 8 && !y2k) n = 2;
+				SETVALFDB(&ref,p->name,lowcase(no_quotes(p->values->name+n)));
+		}
+		else if(strcmp(p->name,"LEVTYPE")==0)
+		{
+			char levtype[3];
+			int fdb_len = 1; /* Length of levtype in FDB */
+			levtype[0] = p->values->name[0];
+			if(strcmp(p->values->name,"DP") != 0)
+			{
+				if(strcmp(p->values->name,"PT") == 0)
+					levtype[0] = 't';
+				else
+				if(strcmp(p->values->name,"PV") == 0)
+					levtype[0] = 'v';
+				else
+				if(strcmp(p->values->name,"WV") == 0)
+				{
+					/* Ugly: quick hack to get it working */
+					levtype[1] = p->values->name[1];
+					fdb_len=2;
+				}
+			}
+			levtype[fdb_len] = '\0';
+			SETVALFDB(&ref,"LEVTYPE",(char *)lowcase(levtype));
+		}
+		else
+		if(strcmp(p->name,"LEVELIST")==0 && !ocean)
+		{
+			char buf[5];
+
+			if(atof(p->values->name) == atol(p->values->name))
+				sprintf(buf,"%04ld",atol(p->values->name));
+			else
+			{
+				int n = 4-strlen(p->values->name);
+				strcpy(buf,p->values->name);
+				while(n-->0) strcat(buf,"0");
+
+			}	
+			SETVALFDB(&ref,"levelist",buf);
+		}
+		else
+		if(strcmp(p->name,"STEP")==0 && wave_fg && (ignore_wave_fg == NULL))
+				SETVALFDB(&ref,p->name,"6");
+		else if((strcmp(p->name,"STEP")==0) || (strcmp(p->name,"FCPERIOD")==0))
+		{
+			if(isrange(p->values->name))
+			{
+				char buf[12];
+				if(!fp)
+				{
+					long s = range2fdb(p->values->name,100000);
+					sprintf(buf,"%ld",s);
+				}
+				else
+				{
+					stepRange sr;
+					str2range(p->values->name,&sr);
+					sprintf(buf,"%02d%02d",sr.from/24,sr.to/24);
+				}
+				SETVALFDB(&ref,p->name,buf);
+			}
+			else
+			{
+				SETVALFDB(&ref,p->name,lowcase(no_quotes(p->values->name)));
+			}
+		}
+		else if(strcmp(p->name,"QUANTILE")==0)
+		{
+			if(isrange(p->values->name))
+			{
+				char buf[12];
+				long s = range2fdb(p->values->name,1000);
+
+				sprintf(buf,"%ld",s);
+				SETVALFDB(&ref,p->name,buf);
+			}
+			else
+			{
+				SETVALFDB(&ref,p->name,lowcase(no_quotes(p->values->name)));
+			}
+		}
+		else if(strcmp(p->name,"PARAM")==0)
+		{
+			const char *q = lowcase(no_quotes(p->values->name));
+			int i = 0;
+			long par = 0;
+			long table = -1;
+			char npar[7];
+
+			paramtable(q,&par,&table,false);
+			if(table >= 210 || table == 201 || table == 162 || (set_table && table != -1) || (stream_enfo && (table == 171 || table == 173)))
+				sprintf(npar,"%ld%03ld",table,par);
+			else
+				sprintf(npar,"%ld",par);
+			SETVALFDB(&ref,p->name,npar);
+		}
+		else
+		if((strcmp(p->name,"LEVELIST") == 0 && ocean) ||
+		   (strcmp(p->name,"LATITUDE") == 0) ||
+		   (strcmp(p->name,"LONGITUDE") ==0))
+		{
+			SETVALFDB_OCEAN(&ref,p->name,p->values->name);
+		}
+		else
+			SETVALFDB(&ref,p->name,lowcase(no_quotes(p->values->name)));
+		p = p->next;
+	}
+}
+
+static err  _nfdb_read(void *data,request *r,void *buffer,long *length)
+{
+	fdbdata *fdb = (fdbdata*)data;
+	err  ret = 0;
+	parameter *p;
+	long len = *length;
+	boolean wave_fg = false;
+	int llen;
+	boolean ocean = false;
+	int parm = 0;
+	boolean fp = false; /* Forecast Probability */
+	const char *type   = 0;
+	boolean has_param  = true;
+
+
+#ifdef HYPERCUBE
+	request *z = get_cubelet(fdb->h,fdb->index++);
+	fdb->w = z;
+#endif
+	
+	if(fdb->retrieve)
+	{
+		long64 total = 0;
+		timer_start(fdb->fdbtimer);
+		ret = wmo_read_any_from_stream(fdb,read1,buffer,length);
+		if(ret == 0)
+			total = *length;
+		timer_stop(fdb->fdbtimer,total);
+
+		if(ret)
+			return ret;
+
+
+		if(ret == 0 && r && !observation(r) && !track(r))
+		{
+			grib_to_request(r,buffer,*length);
+			set_value(r,"_ORIGINAL_FIELD","1");
+		}
+
+		if((ret != BUF_TO_SMALL) && (ret != 0))
+			notify_missing_field(fdb->w,fdb->host);
+
+		return ret;
+	}
+
+	if(fdb->w == NULL)
+		return EOF;
+
+#if 0
+	if(!fdb->leg_done)
+	{
+		if(isfdb_attribute(&ref,"leg")) 
+			SETVALFDB(&ref,"leg","off");
+		fdb->leg_done = true;
+	}
+#endif
+
+	request_to_fdb(fdb->ref,fdb->w,fdb->y2k);
+
+	has_param = (get_value(fdb->w,"PARAM",0) != NULL);
+	/* Fail if parameter is either U or V */
+	/* Don't even read the FDB */
+	parm = has_param?atoi(get_value(fdb->w,"PARAM",0)):0;
+	if(!fdb->uv_from_fdb && (parm == PARAM_U || parm == PARAM_V))
+	{
+		ret = -1;
+	}
+	else
+	{
+		marslog(LOG_DBUG,"before readfdb");
+		llen = *length;
+		ret = timed_readfdb(&fdb->ref,buffer,&llen,fdb->fdbtimer);
+		*length = llen;
+		marslog(LOG_DBUG,"after readfdb, ret %d, len %d",ret,len);
+	}
+
+	if((ret == -1 || ret == -2) && has_param) {
+		*length = len;
+		ret = check_uv(fdb,buffer,length);
+		if(ret == -1 || ret == -2)
+		{
+			*length = len;
+			ret = check_repres(fdb,buffer,length);
+		}
+	}
+
+	if((ret == -1  || ret == -2) && (fdb->expect != 0 || fdb->expect_any)) 
+	    return -42;
+
+	if(ret == 0 && r && !observation(r) && !track(r))
+	{
+		*length = grib_length(buffer,*length);
+		grib_to_request(r,buffer,*length);
+		set_value(r,"_ORIGINAL_FIELD","1");
+	}
+
+	if(ret != BUF_TO_SMALL && ret != 0)
+		notify_missing_field(fdb->w,fdb->host);
+
+#ifndef HYPERCUBE
+    fdb->w = fdb->w->next;
+#endif
+
+	return ret;
+}
+
+static err  nfdb_read(void *data,request *r,void *buffer,long *length)
+{
+	fdbdata *fdb = (fdbdata*)data;
+	err ret = _nfdb_read(data,r,buffer,length);
+
+	while((ret == -42) && (fdb->expect != 0 || fdb->expect_any))
+	{
+		/* If expect is set or expect any, try to get more */
+
+		/* Inform about missing fields */
+		if(! fdb->nomissing)
+			notify_missing_field(fdb->w,fdb->host);
+		ret =  _nfdb_read(data,r,buffer,length);
+	}
+
+	return ret;
+}
+
+static err  nfdb_write(void *data,request *r,void *buffer,long *length)
+{
+	marslog(LOG_EXIT,"FDB write no implemeted");
+	return EOF;
+}
+
+static boolean  nfdb_check(void *data,request *r)
+{
+	if(track(r))
+		return true;
+
+	if(is_bufr(r) || image(r))
+		return false;
+
+	return true;
+}
+
+#else
+extern base_class _nullbase;
+base_class *nfdbbase = &_nullbase;
+#endif
diff --git a/src/libMars/nullbase.c b/src/libMars/nullbase.c
new file mode 100755
index 0000000..7f30395
--- /dev/null
+++ b/src/libMars/nullbase.c
@@ -0,0 +1,75 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+static void null_init(void);
+
+static err  null_open(void *data,request*,request*,int);
+static err  null_close(void *data);
+static err  null_read(void *data,request *r,void *buffer,long *length);
+static err  null_write(void *data,request *r,void *buffer,long *length);
+
+#ifdef VMS
+/* externaldef(base_class)  */
+#endif
+
+base_class _nullbase = {
+
+	NULL,                       /* parent class */
+	"nullbase",                 /* name         */
+
+	false,                      /* inited       */
+
+	0,                          /* private size */
+	0,                          /* option count */ 
+	NULL,                       /* options      */
+
+	null_init,                  /* init         */
+
+	null_open,                  /* open         */
+	null_close,                 /* close        */
+
+	null_read,                  /* read         */
+	null_write,                 /* write        */
+
+};
+
+
+#ifdef VMS
+/* externaldef(base_class)  */
+#endif
+
+base_class *nullbase = &_nullbase;
+
+
+static void null_init(void)
+{
+}
+
+static err  null_open(void *data,request *r,request *e,int mode)
+{
+	return 0;
+}
+
+static err  null_close(void *data)
+{
+	return 0;
+}
+
+static err  null_read(void *data,request *r,void *buffer,long *length)
+{
+	return EOF;
+}
+
+static err  null_write(void *data,request *r,void *buffer,long *length)
+{
+	return 0;
+}
diff --git a/src/libMars/odb.cc b/src/libMars/odb.cc
new file mode 100644
index 0000000..56359fc
--- /dev/null
+++ b/src/libMars/odb.cc
@@ -0,0 +1,304 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+///
+/// \file odb.cc
+///
+/// @author Piotr Kuchta, ECMWF May 2009
+///
+
+#ifdef ODB_SUPPORT
+
+#include "mars.h"
+
+#ifdef OLD_ODB_API
+# include "oda.h"
+# include "FILEHandle.h"
+# include "PathName.h"
+# include "Length.h"
+# include "odbcapi.h"
+# include "FastODA2Request.h"
+# include "StringTool.h"
+typedef FILEHandle StdFileHandle;
+#else
+# include "odblib/odb_api.h"
+# include "eclib_version.h"
+# include "eclib/StdFileHandle.h"
+# include "eclib/PathName.h"
+# include "eclib/Length.h"
+# include "eclib/Exceptions.h"
+# include "odblib/odbcapi.h"
+# include "odblib/FastODA2Request.h"
+# include "odblib/StringTool.h"
+#endif
+
+#include "odb.h"
+#include <set>
+
+
+#if !defined(OLD_ODB_API)
+
+	/* valid for versions of ODB_API > 0.9.20 or so */
+	#define ECLIB_FULL_VERSION  ((ECLIB_MAJOR_VERSION)*10000) + ((ECLIB_MINOR_VERSION)*100)  + (ECLIB_PATCH_VERSION)
+
+	/* From version 7.3.0, eclib is protected by a namespace */
+	#if ECLIB_FULL_VERSION >= 70300
+		using namespace eclib;
+	#endif
+
+	/* The name of the eclib function to check whether a path exists changed. We try to keep compatibility with older versions. */
+	#define ECLIB_PATH_EXIST_FN exists
+
+#else
+    #define ECLIB_PATH_EXIST_FN exist
+#endif
+
+
+
+boolean is_part_of_mars_language(const char *n)
+{
+	static request *archive = NULL;
+	const char *s = NULL;
+
+	if(!archive)
+	{
+		request *r = mars_language();
+		while(r && !EQ(r->name, "ARCHIVE"))
+			r = r->next;
+		if(r == NULL)
+		{
+			marslog(LOG_EROR, const_cast<char *>("ARCHIVE request not found in language. OOOPPPSSS!!!"));
+			marsexit(1);
+		}
+
+		archive = r;
+	}
+
+	if((s = get_value(archive,n,0)) != NULL)
+		return true;
+
+	return false;
+}
+
+// TODO: In //depot/mars/client/dev/oda/etc then to install in: /usr/local/lib/metaps/etc/ 
+// TODO: Tell Cristian if this is deployed in a config file eventually....
+const char* odb2request_config = "/usr/local/lib/metaps/etc/";
+const char * cfg = 
+"CLASS: class\n"
+"DATE: andate\n"
+"TIME: antime\n"
+"TYPE: type\n"
+"OBSGROUP: groupid\n"
+"REPORTYPE: reportype\n"
+"STREAM: stream\n"
+"EXPVER: expver\n"
+;
+
+err odb_to_request_from_file(request *r, const char *fileName, unsigned long long *cnt)
+{
+	err e = NOERR;
+	try { 
+		odb_start();
+		marslog(LOG_DBUG, const_cast<char *>("odb_to_request_from_file: fileName = %s."), fileName); 
+
+		PathName pn(fileName);
+		if (! pn.ECLIB_PATH_EXIST_FN())
+		{
+			marslog(LOG_EROR, (char *)"oda_to_request_from_file: file '%s' does not exist.", (char *) fileName);
+			return e = TOO_SHORT_ERR;
+		}
+		if (! pn.size())
+		{
+			marslog(LOG_EROR, (char *)"oda_to_request_from_file: file '%s' empty.", fileName);
+			return e = TOO_SHORT_ERR;
+		}
+
+		odb::FastODA2Request<odb::ODA2RequestClientTraits> o2r;
+		o2r.parseConfig(cfg);
+
+		eclib::OffsetList offsets;
+		eclib::LengthList lengths;
+		vector<ODAHandle*> handles;
+		bool rc = o2r.scanFile(fileName, offsets, lengths, handles);
+		for (size_t i = 0; i < handles.size(); ++i)
+			delete handles[i];
+		handles.clear();
+		if (! rc) return HYPERCUBE_ERROR;
+
+		ASSERT(lengths.size());
+		ASSERT(lengths.size() == offsets.size());
+		for(size_t i = 1; i < offsets.size(); i++)
+			ASSERT(offsets[i] > offsets[i-1]);
+		size_t last = offsets.size()-1;
+		ASSERT(PathName(fileName).size() == offsets[last] + lengths[last]);
+
+		*cnt = o2r.rowsNumber();
+
+		string filesRequest = "ARCHIVE,\n";
+		filesRequest += o2r.genRequest();
+
+		Log::debug() << "odb_to_request_from_file: " << filesRequest << endl;
+		request *n = string2request(filesRequest.c_str());
+		if (! n)
+		{
+			marslog(LOG_EROR, (char *)"Error creating a MARS request from data");
+			return e = TOO_SHORT_ERR;
+		}
+		//Log::debug() << "odb_to_request_from_file: converted to request:" << endl;
+		//print_all_requests(n);
+		reqmerge(r, n);
+		free_all_requests(n);
+		return e;
+	}
+	catch (Exception& ex)
+	{
+		marslog(LOG_EROR, (char *)"Error making a request from file %s\n",ex.what());
+		marslog(LOG_EROR, (char *)"Exception ignored");
+		e = TOO_SHORT_ERR;
+		return e;
+	}
+	return e;
+}
+
+typedef map<string, set<string> > Parameters ;
+
+Parameters parameters(request* r)
+{
+	Parameters ret;
+
+	for (parameter *p = r->params; p; p = p->next)
+	{
+		string parameterName = p->name;
+		size_t n = count_values(r, p->name);
+		if (n == 0)
+		{
+			marslog(LOG_EROR, (char *)"parameters: no values of param '%s'", p->name);
+			ASSERT(n != 0);
+		}
+		set<string> values;
+		for (size_t i = 0; i < n; ++i)
+			values.insert(get_value(r, p->name, i));
+		ret[parameterName] = values;
+	}
+	return ret;
+}
+
+err odb_compare_attributes_of_first_request(request* first, request* second)
+{
+	typedef Parameters P;
+
+	P firstParams = parameters(first);
+	P secondParams = parameters(second);
+
+	for (P::iterator it = firstParams.begin(); it != firstParams.end(); ++it)
+	{
+		const string& paramName = it->first;
+		const set<string>& values = it->second;
+
+		P::iterator jt = secondParams.find(paramName);
+		if (jt == secondParams.end())
+		{
+			marslog(LOG_EROR, (char *)"odb_compare_attributes_of_first_request: second request has no param '%s'", paramName.c_str());
+			return -1;
+		}
+		const set<string>& otherValues = jt->second;
+		if (values != otherValues)
+		{
+			stringstream ss;
+			if (values.size() == 1 && otherValues.size() == 1)
+			{
+				ss << "Values of '" << paramName << "' differ: " << *values.begin() << " <> " << *otherValues.begin();
+				marslog(LOG_EROR, (char *)"odb_compare_attributes_of_first_request: %s", ss.str().c_str());
+			}
+			else
+			{
+				marslog(LOG_EROR, (char *)"odb_compare_attributes_of_first_request: values for param '%s' differ", paramName.c_str());
+				ostream_iterator<string> out(ss, ", ");
+				set_symmetric_difference(values.begin(), values.end(), otherValues.begin(), otherValues.end(), out);
+				marslog(LOG_EROR,(char *)
+					"odb_compare_attributes_of_first_request: values present in one of the sets, but not in the other: %s",
+					ss.str().c_str());
+			}
+			return -1;
+		}
+	}
+	return NOERR;
+}
+
+long long odb_filter(const char *sql, FILE *fin, FILE *fout, long long total_to_read)
+{
+	try { 
+		odb_start();
+		marslog(LOG_INFO, const_cast<char *>("odb_filter: sql = '%s', total_to_read = %lld"),
+			((sql == 0) ? "NULL" : sql),
+			total_to_read);
+
+		if (total_to_read == 0)
+			return 0;
+
+		// TODO: check sql is a select really and does not have INTO clause (?)
+		StdFileHandle fhin(fin), fhout(fout); 
+		fhin.openForRead();
+
+		if (! sql)
+		{
+			Length n = fhin.saveInto(fhout);
+			ASSERT(total_to_read == n);
+		}
+		else
+		{
+			using namespace odb;
+			string s(sql);
+			StringTool::trimInPlace(s);
+			s = StringTool::isInQuotes(s) ? StringTool::unQuote(s) : s;
+
+			odb::Select odb(s, fhin); 
+			odb::Select::iterator it = odb.begin();
+			odb::Select::iterator end = odb.end();
+
+			odb::Writer<> writer(fhout);
+			odb::Writer<>::iterator outit = writer.begin(); 
+			outit->pass1(it, end);
+		}
+		marslog(LOG_INFO, const_cast<char *>(" => odb_filter"));
+	}
+	catch (Exception &ex)
+	{
+		marslog(LOG_EROR, (char*)"Error in odb_filter %s\n",ex.what());
+		return -1;
+	}
+
+	// TODO: make sure the below is true
+	return total_to_read;
+}
+
+static int test()
+{
+	odb_start();
+	const char *sql = "select lat, lon";
+	FILE *fin = fopen("input.oda", "r");
+	FILE *fout = fopen("output.oda", "w");
+
+	long long total_to_read = 0; // ? Do we really need this? maybe
+	long long total_read = odb_filter(sql, fin, fout, total_to_read);
+
+	//assert(total_to_read == total_read);
+
+	fclose(fin);
+	fclose(fout);
+	
+	return total_to_read;
+}
+
+//int main(int argc, char *argv[]) { return test(); }
+
+#else
+#include "mars.h"
+#endif
diff --git a/src/libMars/odb.h b/src/libMars/odb.h
new file mode 100644
index 0000000..0209f6e
--- /dev/null
+++ b/src/libMars/odb.h
@@ -0,0 +1,35 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#ifndef ODB_H
+#define ODB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef ODB_SUPPORT
+///
+/// \file odb.h
+///
+/// @author Piotr Kuchta, ECMWF May 2009
+///
+
+err odb_to_request_from_file(request *r, const char *fileName, unsigned long long *cnt);
+err odb_compare_attributes_of_first_request(request*, request*);
+long long odb_filter(const char *, FILE *fin, FILE *fout, long long total_to_read);
+
+#endif
+
+#ifdef __cplusplus
+}  // extern "C" 
+#endif
+
+#endif
diff --git a/src/libMars/odbbase.c b/src/libMars/odbbase.c
new file mode 100644
index 0000000..e4bc2b8
--- /dev/null
+++ b/src/libMars/odbbase.c
@@ -0,0 +1,442 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+#ifdef ODBSERVER
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <ctype.h>
+
+
+/* db prototypes */
+
+static void    odb_init(void);
+static err     odb_open(void *data, request *r, request *e, int mode);
+static err     odb_close(void *data);
+static err     odb_read(void *data, request *r, void *buffer, long *length);
+static err     odb_write(void *data, request *r, void *buffer, long *length);
+static err     odb_query(void *data, request *r, long *length);
+static boolean odb_check(void *data, request *r);
+
+struct CurrentFile {
+	FILE      *f;
+	long long size;
+	long long offset;
+
+	size_t    currentBlock;
+	size_t    numberOfBlocks;
+	off64_t*  offsets;
+	size_t*   sizes;
+};
+
+typedef struct odbdata {
+	char      *root;
+
+	struct CurrentFile currentFile;
+
+	long 	  nbfiles;     
+	long 	  fileIndex;     
+	char      **files;
+} odbdata;
+
+
+static option opts[] = {
+	{"odb_server_root","ODB_SERVER_ROOT","-odb_server_root",".",
+	t_str,sizeof(char*),OFFSET(odbdata,root) },
+};
+
+
+/* End of ODB interface */
+
+
+base_class _odbbase = {
+
+	NULL,                   /* parent class */
+	"odbbase",             /* name         */
+
+	false,                  /* inited       */
+
+	sizeof(odbdata),         /* private size */
+	NUMBER(opts),            /* option count */
+	opts,                    /* options      */
+
+	odb_init,               /* init         */
+
+	odb_open,               /* open         */
+	odb_close,              /* close        */
+
+	odb_read,               /* read         */
+	odb_write,              /* write        */
+
+	NULL,                   /* control      */
+
+	odb_check,				/* check */
+
+};
+
+
+
+/* the only 'public' variable ... */
+
+base_class *odbbase = &_odbbase;
+
+
+static void odb_init(void)
+{
+	marslog(LOG_DBUG,"odb_init:Initialize odb");
+	odb_start();
+}
+/* ==========================================*/
+typedef char *(*chkproc)(request *r,const char*,const char*,int idx);
+
+static char *extchar(request *r,const char*,const char*,int idx);
+static char *extlong(request *r,const char*,const char*,int idx);
+static char *extreal(request *r,const char*,const char*,int idx);
+
+typedef struct chktype{
+	char    *name;
+	char    *format;
+	int     size;
+	chkproc extract;
+	boolean in_request;
+} chktype;
+
+static chktype checks_odb[] = {
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"CLASS"        ,"%s",  2, 	extchar, true,  },
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"STREAM"       ,"%s",  4, 	extchar, true,  },
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"EXPVER"       ,"%s",  4,  extchar, true,  },
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"DATE"         ,"%s",  8, 	extchar, true,  },
+	{"/"            ,"%s",  0,  extchar, false, }, 
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"TIME"         ,"%04d",4,  extlong, true,  },
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"TYPE"         ,"%s",  3, 	extchar, true,  },
+	{":"            ,"%s",  0,  extchar, false, }, 
+	{"OBSGROUP"     ,"%s",  0, 	extchar, true,  },
+	{"/"            ,"%s",  0,  extchar, false, }, 
+	{"REPORTYPE"    ,"%s",  0,  extchar, true,  },
+	{"."            ,"%s",  0,  extchar, false, }, 
+	{"odb"          ,"%s",  0,  extchar, false, }, 
+};
+
+
+static char *filename(request *r)
+{
+	static char buf[1024];
+	int i;
+
+	chktype *checks = checks_odb;
+	int n = NUMBER(checks_odb);
+
+	marslog(LOG_DBUG,"filename(r) checks: %d",n);
+	
+	buf[0] = 0;
+	for(i=0;i<n;i++)
+	{
+		if(checks[i].in_request)
+			strcat(buf,checks[i].extract(r,checks[i].name,checks[i].format,checks[i].size));
+		else
+			strcat(buf,checks[i].name);
+		marslog(LOG_DBUG,"filename(r) intermediate: '%s'",buf);
+	}
+
+	marslog(LOG_DBUG,"filename(r) returns: '%s'",buf);
+
+	return buf;
+}
+
+static void complete(char *p,int len)
+{
+	len -= strlen(p);
+	while(len--) strcat(p,"x");
+}
+
+static char *extchar(request *r,const char* name,const char* format,int size)
+{
+	static char buf[200];
+	const char *x = get_value(r,name,0);
+	buf[0] = 0;
+	if(x) sprintf(buf,format,lowcase(x));
+	if(size>0)
+		complete(buf,size);
+	return buf;
+}
+
+static char *extlong(request *r,const char* name,const char* format,int size)
+{
+	static char buf[200];
+	const char *x = get_value(r,name,0);
+	buf[0] = 0;
+	if(x) sprintf(buf,format,atol(x));
+	if(size>0)
+		complete(buf,size);
+	return buf;
+}
+
+/* ===== odb file operations ===== */
+
+static err odbfile_open(odbdata *odb, int i)
+{
+	char *s = odb->files[i];
+	FILE *f = fopen(s,"r");
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR, "odbfile_open: '%s'", s);
+		return -2;
+	}
+
+	marslog(LOG_DBUG, "odbfile_open (%s) index %d", s, i);
+
+	odb->currentFile.numberOfBlocks = 0;
+	odb->currentFile.offsets = 0;
+	odb->currentFile.sizes = 0;
+
+	int rc = get_blocks_offsets(s, &odb->currentFile.numberOfBlocks, &odb->currentFile.offsets, &odb->currentFile.sizes);
+
+	/* Position at the end to get size */
+	if(fseek(f,0,SEEK_END) != 0)
+	{
+		marslog(LOG_EROR|LOG_PERR, "fseek(%s)", s);
+		return -2;
+	}
+	odb->currentFile.size = ftell(f);
+
+	/* Re-position at the begining */
+	if(fseek(f,0,SEEK_SET) != 0)
+	{
+		marslog(LOG_EROR|LOG_PERR, "fseek(%s)", s);
+		return -2;
+	}
+
+	odb->fileIndex = i;
+	odb->currentFile.f = f;
+	odb->currentFile.offset = 0;
+	odb->currentFile.currentBlock = 0;
+
+	return NOERR;
+}
+
+static err odbfile_close(odbdata *odb, int i)
+{
+	marslog(LOG_DBUG,"odbfile_close (%s) index %d", odb->files[i], i);
+
+	fclose(odb->currentFile.f);
+	odb->currentFile.f = NULL;
+
+	odb_start();
+	release_blocks_offsets(&odb->currentFile.offsets);
+	release_blocks_sizes(&odb->currentFile.sizes);
+
+	odb->currentFile.offsets = 0;
+	odb->currentFile.sizes = 0;
+
+	return NOERR;
+}
+
+/*
+TODO: set disk buffer sizes
+	if(mars.readdisk_buffer > 0) { if(setvbuf(f,dhs->read_disk_buffer,_IOFBF,mars.readdisk_buffer)) marslog(LOG_WARN|LOG_PERR,"setvbuf failed"); }
+*/
+
+/* TODO: Check different cases
+- buffer smaller than file to read
+- buffer bigger than file to read
+- read from more than one file
+*/
+static err odbfile_read(odbdata *odb, char* buffer, long* length)
+{
+	timer *disk_time = get_timer("Read from disk", NULL, true);
+	long read = 0;
+
+	marslog(LOG_DBUG, "odbfile_read %ld bytes", *length);
+
+	if (odb->currentFile.currentBlock >= odb->currentFile.numberOfBlocks)
+	{
+		if (++odb->fileIndex >= odb->nbfiles)
+			return EOF;
+
+		odbfile_close(odb, odb->fileIndex);
+		odbfile_open(odb, ++odb->fileIndex);
+		return odbfile_read(odb, buffer, length);
+	}
+
+	size_t blockSize = odb->currentFile.sizes[odb->currentFile.currentBlock];
+	if (blockSize > *length)
+	{
+		marslog(LOG_EROR, "Block %d is too large.", odb->currentFile.currentBlock);
+		return -3;
+	}
+
+	long n = timed_fread(buffer, 1, blockSize, odb->currentFile.f, disk_time);
+	if (n != blockSize)
+	{
+		marslog(LOG_EROR, "Error reading block %d.", odb->currentFile.currentBlock);
+		return -2;
+	}
+	*length = blockSize;
+	return NOERR;
+}
+
+/* ==========================================*/
+
+static err odb_open(void *data, request *r, request *e, int mode)
+{
+	odbdata *odb = (odbdata*)data;
+    parameter *p = 0;
+	long      flags  = expand_flags(EXPAND_MARS| EXPAND_SUB_LISTS);
+	request   *s = 0;
+	const char *type = 0;
+	char *fname = NULL;
+	request *u = NULL;
+	request *a = NULL;
+	int i = 0;
+
+	marslog(LOG_DBUG,"odb_open");
+
+	unset_value(r,"TARGET");
+	s = expand_all_requests(mars_language(),mars_rules(),r);
+	type = get_value(s,"TYPE",0);
+
+	expand_flags(flags);
+	reset_language(mars_language());
+
+	marslog(LOG_INFO,"ODB_SERVER_ROOT=%s",odb->root);
+
+	/* Find the file names to open */
+	u = unwind_one_request(r);
+	odb->nbfiles = count_requests(u);
+	marslog(LOG_DBUG,"Files to open: %ld",odb->nbfiles);
+
+	odb->files = (char **)reserve_mem(odb->nbfiles * sizeof(char *));
+	a = u;
+	i = 0;
+	while(a)
+	{
+		char *f = filename(a);
+		char name[1024];
+		sprintf(name,"%s/%s",odb->root,f);
+		/* marslog(LOG_INFO,"Request: "); */
+		print_one_request(a);
+		/* marslog(LOG_INFO,"Filename for request: '%s'",name); */
+		if(faccess(name,0) == 0)
+			odb->files[i++] = strcache(name);
+		else
+		{
+			marslog(LOG_EROR|LOG_PERR,"file %s",name);
+		}
+		a = a->next;
+	}
+	odb->nbfiles = i;
+
+	marslog(LOG_DBUG,"Filenames found: ");
+	for(i = 0; i<odb->nbfiles; ++i)
+		marslog(LOG_INFO,"ODB file: '%s'",odb->files[i]);
+
+	free_all_requests(u);
+	free_all_requests(s);
+
+	/* If no files found, there is no data for this request. Return */
+	if(odb->nbfiles == 0)
+		return -1;
+
+	odbfile_open(odb,0);
+
+	return NOERR;
+}
+
+
+static err odb_close(void *data)
+{
+	odbdata *odb = (odbdata*)data;
+	int i = 0;
+	marslog(LOG_DBUG,"odb_close");
+	
+	for(i = 0; i<odb->nbfiles; ++i)
+		strfree(odb->files[i]);
+
+	release_mem(odb->files);
+	odb->files = NULL;
+	if(odb->currentFile.f != NULL)
+		fclose(odb->currentFile.f);
+	odb->currentFile.f = NULL;
+	odb->currentFile.size = 0;
+	odb->currentFile.offset = 0;
+	odb->nbfiles = 0;
+	odb->fileIndex = 0;
+	return NOERR;
+}
+
+
+
+static err odb_read(void *data,request *r,void *buffer,long *length)
+{
+	odbdata *odb = (odbdata*)data;
+	static int count = 0;
+	long size = *length;
+	err e = NOERR;
+	boolean save = (getenv("SAVE_DATA_READodb") != NULL);
+
+	marslog(LOG_DBUG,"-> odb_read: %ld bytes",*length);
+
+	e = odbfile_read(odb,buffer,length);
+
+	marslog(LOG_DBUG,"<- odb_read: %ld bytes, return code %d",*length,e);
+	if(*length > size)
+		marslog(LOG_EROR,"Read %ld bytes > buffer size (%ld bytes)",*length,size);
+
+	if(save)
+	{
+		FILE   *fd;
+		char fname[50];
+		sprintf(fname,"readodb.buffer.%d",count);
+		if( (fd = fopen(fname,"w")) == NULL)
+			marslog(LOG_EROR|LOG_PERR,"Error saving buffer read from odb. Can't open file %s",fname);
+		else
+		{
+			if(fwrite(buffer,1,*length,fd) != *length)
+				marslog(LOG_EROR|LOG_PERR,"Error writing to file %s",fname);
+		}
+		fclose(fd);
+	}
+	
+	count++;
+	marslog(LOG_DBUG,"odb_read returns %d",e);
+	return e;
+}
+
+
+static err odb_write(void *data, request *r, void *buffer, long *length)
+{
+	marslog(LOG_EROR,"odb_write:Not implemented");
+
+	return NOERR;
+}
+
+
+static boolean odb_check(void  *data, request *r)
+{
+	const char *type = get_value(r,"TYPE",0);
+
+	marslog(LOG_DBUG,"odb_check: ");
+	if(is_odb(r))
+		return true;
+
+	return false;
+}
+#else
+extern base_class _nullbase;
+base_class *odbbase = &_nullbase;
+#endif
diff --git a/src/libMars/options.c b/src/libMars/options.c
new file mode 100755
index 0000000..62a5378
--- /dev/null
+++ b/src/libMars/options.c
@@ -0,0 +1,552 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <signal.h>
+
+globals mars;
+
+#define THEQUOTE(x) #x
+#define QUOTE(x)    THEQUOTE(x)
+
+static option mars_opts[] = {
+
+	NULL,"MARS_HOME",NULL,
+	".",
+	t_str,sizeof(char*),OFFSET(globals,mars_home),
+
+	"debug","MARS_DEBUG","-debug","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,debug),
+
+	"nofork","MARS_NOFORK","-nofork","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,nofork),
+
+	"maxforks","MARS_MAXFORKS","-maxforks","20",
+	t_int,sizeof(int),OFFSET(globals,maxforks),
+
+	"echo","MARS_ECHO","-echo","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,echo),
+
+	"quiet",NULL,"-quiet","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,quiet),
+
+	"config","MARS_CONFIG","-config",
+	NULL,
+	t_str,sizeof(char*),OFFSET(globals,config),
+
+	"emsfile","MARS_EMS_FILE","-emsfile",
+	NULL,
+	t_str,sizeof(char*),OFFSET(globals,emsfile),
+
+	"authfile","MARS_AUTH_FILE","-authfile",
+	"etc/mars.authentication",
+	t_str,sizeof(char*),OFFSET(globals,authfile),
+
+	"authmail","MARS_AUTH_MAIL","-authmail",
+	"usu",
+	t_str,sizeof(char*),OFFSET(globals,authmail),
+
+	"mailer","MARS_MAILER","-mailer",
+	"/usr/bin/mailx",
+	t_str,sizeof(char*),OFFSET(globals,mailer),
+
+	"monhost","MARS_MONITOR_HOST","-monhost",
+	"aramis",
+	t_str,sizeof(char*),OFFSET(globals,monhost),
+
+	"monport","MARS_MONITOR_PORT","-monport",
+	"8901",
+	t_int,sizeof(int),OFFSET(globals,monport),
+
+	"langfile","MARS_LANGUAGE_FILE","-langfile",
+	"etc/mars.def",
+	t_str,sizeof(char*),OFFSET(globals,langfile),
+
+	"testfile","MARS_TEST_FILE","-testfile",
+	"chk/mars.chk",
+	t_str,sizeof(char*),OFFSET(globals,testfile),
+
+	"computeflg","MARS_COMPUTE_FLAG",NULL,
+	"255",
+	t_int,sizeof(int),OFFSET(globals,computeflg),
+
+	"certify",NULL,"-certify",
+	"0",
+	t_boolean,sizeof(boolean),OFFSET(globals,certify),
+
+	"infomissing","MARS_INFORM_MISSING","-infomissing",
+	"0",
+	t_boolean,sizeof(boolean),OFFSET(globals,infomissing),
+
+	"dhsmail","MARS_DHS_MAIL","-dhsmail",
+	"max at ecmwf.int",
+	t_str,sizeof(char*),OFFSET(globals,dhsmail),
+
+	"y2k","MARS_Y2K","-y2k","1",
+	t_boolean,sizeof(boolean),OFFSET(globals,y2k),
+
+	"y2k_problem","MARS_Y2K_PROBLEM","-y2k_problem","0",
+	t_long,sizeof(long),OFFSET(globals,y2k_problem),
+
+	"y2k_fail","MARS_Y2K_FAIL","-y2k_fail","1",
+	t_boolean,sizeof(boolean),OFFSET(globals,y2k_fail),
+
+	"crc","MARS_CRC","-crc","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,crc),
+
+	"ignore_7777","MARS_IGNORE_7777","-ignore_7777","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,ignore_7777),
+
+	"autoresol","MARS_AUTO_RESOL","-autoresol","1",
+	t_boolean,sizeof(boolean),OFFSET(globals,autoresol),
+
+	"autoarch","MARS_AUTO_ARCH","-autoarch","0",
+	t_long,sizeof(long),OFFSET(globals,autoarch),
+
+	"sms_label","MARS_SMS_LABEL","-sms_label",NULL,
+	t_str,sizeof(char*),OFFSET(globals,sms_label),
+
+	"patch_sst","MARS_PATCH_SST","-patch_sst","0",
+	t_boolean,sizeof(boolean),OFFSET(globals,patch_sst),
+
+	"accuracy","MARS_PACK_BITS","-accuracy",
+	"0",
+	t_int,sizeof(int),OFFSET(globals,accuracy),
+
+	"grib_missing_value","MARS_MISSING_VALUE","-missing_value", 
+#ifdef linux
+	"3.40282347E+38F",
+#else
+	QUOTE(FLOAT_MISSING_VALUE),
+#endif
+	t_fortfloat,sizeof(fortfloat),OFFSET(globals,grib_missing_value),
+
+	"warning","MARS_WARNING","-warning","1",
+	t_boolean,sizeof(boolean),OFFSET(globals,warning),
+
+	"info","MARS_INFO","-info","1",
+	t_boolean,sizeof(boolean),OFFSET(globals,info),
+
+	"sockbuf","MARS_SOCKBUF","-sockbuf",
+	"524288",
+	t_int,sizeof(int),OFFSET(globals,sockbuf),
+
+	"validate","MARS_VALIDATE","-validate",
+#ifdef ECMWF
+	"ecmwf",
+#else
+	"null",
+#endif
+	t_str,sizeof(char*),OFFSET(globals,validate),
+
+	"clients","MARS_CLIENTS","-clients",
+	"0",
+	t_int,sizeof(int),OFFSET(globals,clients),
+
+	"show_pid","MARS_SHOW_PID","-show_pid",
+	"0",
+	t_int,sizeof(int),OFFSET(globals,show_pid),
+
+	"statfile","MARS_STATISTICS_FILE","-statfile",NULL,
+	t_str,sizeof(char*),OFFSET(globals,statfile),
+
+	"mail_frequency","MARS_MAIL_FREQUENCY","-mail_frequency","0",
+	t_long,sizeof(long),OFFSET(globals,mail_frequency),
+
+	"home","MARS_USER_HOME","-home",
+	NULL,
+	t_str,sizeof(char*),OFFSET(globals,home),
+
+	"max_filesize","MARS_MAX_FILESIZE","-max_filesize",
+	"0",
+	t_long64,sizeof(long64),OFFSET(globals,max_filesize),
+
+	"maxretries","MARS_MAX_RETRIEVE_RETRY","-maxretries",
+	"5",
+	t_int,sizeof(int),OFFSET(globals,maxretries),
+
+	"paramtable","MARS_PARAM_TABLE","-paramtable","1",
+	t_boolean,sizeof(boolean),OFFSET(globals,paramtable),
+
+	"grib_postproc", "MARS_GRIB_POSTPROC", "-grib_postproc", "1",
+	t_boolean,sizeof(boolean),OFFSET(globals,grib_postproc),
+
+	"dont_check_pseudogrib", "MARS_DONT_CHECK_PSEUDOGRIB", "-dont_check_pseudogrib", "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,dont_check_pseudogrib),
+
+	"bufr_empty_target", "MARS_BUFR_EMPTY_TARGET", "-bufr_empty_target", "1",
+	t_boolean,sizeof(boolean),OFFSET(globals,bufr_empty_target),
+
+	"mm_firstofmonth", "MARS_MM_FIRSTOFMONTH", "-mm_firstofmonth", "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,mm_firstofmonth),
+
+	"use_intuvp", "MARS_USE_INTUVP", "-use_intuvp", "1",
+	t_boolean,sizeof(boolean),OFFSET(globals,use_intuvp),
+
+	"debug_ems", "MARS_DEBUG_EMS", "-debug_ems", "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,debug_ems),
+
+	"can_do_vector_postproc", "MARS_CAN_DO_VECTOR_POSTPROC", "-can_do_vector_postproc", "1",
+	t_boolean,sizeof(boolean),OFFSET(globals,can_do_vector_postproc),
+
+	"gridded_observations_postproc", "MARS_GRIDDED_OBSERVATIONS_INTERP", "-gridded_observations_postproc", "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,gridded_observations_postproc),
+
+/*
+#define SCHEDULE_FAIL   0x01
+#define SCHEDULE_INFORM 0x02
+#define SCHEDULE_LOG    0x04
+#define SCHEDULE_INFORM_FUTURE_CHANGE    0x08
+#define SCHEDULE_MAIL   0x10
+
+*** After 1st of February ***
+SCHEDULE_FAIL | SCHEDULE_INFORM | SCHEDULE_LOG = 7
+SCHEDULE_FAIL | SCHEDULE_INFORM | SCHEDULE_LOG | SCHEDULE_MAIL = 23
+
+
+*** Before 1st of February ***
+SCHEDULE_INFORM_FUTURE_CHANGE | SCHEDULE_LOG = 12
+SCHEDULE_INFORM_FUTURE_CHANGE | SCHEDULE_LOG | SCHEDULE_MAIL = 28
+
+*** Other tests ****
+SCHEDULE_FAIL | SCHEDULE_INFORM_FUTURE_CHANGE | SCHEDULE_LOG = 13
+*/
+
+	"dissemination_schedule", "MARS_DISSEMINATION_SCHEDULE", "-dissemination_schedule", "30",
+	t_int,sizeof(int),OFFSET(globals,dissemination_schedule),
+
+	"dissemination_schedule_file","MARS_DISSEMINATION_SCHEDULE_FILE","-dissemination_schedule_file",
+	"etc/mars.dissemination.schedule.file",
+	t_str,sizeof(char*),OFFSET(globals,dissemination_schedule_file),
+
+	"daily_climatology", NULL, NULL , "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,daily_climatology),
+
+	"no_special_fp", "MARS_FDB_NO_SPECIAL_FP", "-no_special_fp", "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,no_special_fp),
+
+	"year_for_daily_climatology","MARS_YEAR_DAILY_CLIMATOLOGY","-year_for_daily_climatology",
+	"2004",
+	t_int,sizeof(int),OFFSET(globals,year_for_daily_climatology),
+
+	"notimers", "MARS_NO_TIMERS", "-notimers", "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,notimers),
+
+	"valid_data_includes_fcmonth", "MARS_VALID_DATA_INCLUDES_FCMONTH", NULL, "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,valid_data_includes_fcmonth),
+
+	"valid_data_includes_fcmonth", "MARS_VALID_DATA_INCLUDES_FCMONTH", NULL, "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,valid_data_includes_fcmonth),
+
+	"exit_on_failed_expand", "MARS_EXIT_ON_FAILED_EXPAND", NULL, "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,exit_on_failed_expand),
+
+	"emsaccountsfile","MARS_EMS_ACCOUNTS_FILE","-emsaccountsfile",
+	NULL,
+	t_str,sizeof(char*),OFFSET(globals,emsaccountsfile),
+
+	"force_setting_ecaccount", "MARS_FORCE_SETTING_ECACCOUNT", NULL, "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,force_setting_ecaccount),
+
+	"enable_ecaccount_email", "MARS_ENABLE_ECACCOUNT_EMAIL", NULL, "1",
+	t_boolean,sizeof(boolean),OFFSET(globals,enable_ecaccount_email),
+
+	"timers_file","MARS_TIMERS_FILE",NULL,
+	NULL,
+	t_str,sizeof(char*),OFFSET(globals,timers_file),
+
+	"readdisk_buffer","MARS_READDISK_BUFFER",NULL,
+	"0",
+	t_int,sizeof(int),OFFSET(globals,readdisk_buffer),
+
+	"ecflow_label","MARS_ECFLOW_LABEL","-ecflow_label",NULL,
+	t_str,sizeof(char*),OFFSET(globals,ecflow_label),
+
+	"private_key", "MARS_PRIVATE_KEY", NULL, NULL,
+	t_str,sizeof(char*),OFFSET(globals,private_key),
+	
+	"build_grib_index", "MARS_BUILD_GRIB_INDEX", NULL, "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,build_grib_index),
+
+	"readany_buffer_size","MARS_READANY_BUFFER_SIZE",NULL,
+	"67108864",
+	t_int,sizeof(int),OFFSET(globals,readany_buffer_size),
+
+	"webmars_target","WEBMARS_TARGET","-webmars_target",
+	NULL,
+	t_str,sizeof(char*),OFFSET(globals,webmars_target),
+
+	"show_hosts", "MARS_SHOW_HOSTS", NULL, "1",
+	t_boolean,sizeof(boolean),OFFSET(globals,show_hosts),
+
+	"marslite_mode", "MARS_MARSLITE_MODE", NULL, "0",
+	t_boolean,sizeof(boolean),OFFSET(globals,marslite_mode),
+
+};
+
+static int    ac     = 0;
+static char **av     = NULL;
+static char   me[20];
+
+static char *cmdopt(const char *clss,const char *name,const char *opt,boolean isbool)
+{
+	int i;
+
+	if(!av) return NULL;
+
+	for(i=0;i<ac;i++)
+		if(EQ(opt,av[i]))
+			if(isbool) return "1";
+			else
+				return av[i+1];
+
+	return NULL;
+}
+
+static const char *config(const char *clss,const char *name,const char *opt)
+{
+	request *r = mars.setup;
+
+	while(r)
+	{
+		const char *c = get_value(r,"class",0);
+		const char *n = get_value(r,"name",0);
+
+		if( clss && c && (EQ(clss,c)))
+			if( (name == NULL) || (n != NULL && EQ(name,n)))
+				return no_quotes(get_value(r,opt,0));
+		r = r->next;
+	}
+	return NULL;
+}
+
+static const char *get_opt_value(const char *clss,const char *name,option *opt)
+{
+	const char *val = opt->def;  /* default is default, of course */
+	const char *p;
+
+
+	/* then, from config file  */
+
+	if(opt->name && (p = config(clss,name,opt->name)))
+		val = p;
+
+
+
+	/* then from env */
+
+	if(opt->env && (p = getenv(opt->env)))
+		val = p;
+
+
+	/* then from command options  */
+
+	if(opt->opt && (p =  cmdopt(clss,name,opt->opt,(boolean)(opt->kind == t_boolean))))
+		val = p;
+
+
+
+	return val;
+
+}
+
+#ifdef NO_ATOLL_SUPPORT
+extern long64 atoll(const char *);
+#endif
+
+void get_options(const char *clss,const char *name,void *addr,int count,option opts[])
+{
+	int i;
+	int size;
+
+	union {
+		char    c;
+		int     i;
+		long    l;
+		long64  ll;
+		char   *s;
+		void   *p;
+		double  d;
+		boolean b;
+		fortfloat f;
+	} u;
+
+	for(i=0;i<count;i++)
+	{
+		switch(opts[i].kind)
+		{
+		case t_char:
+			u.c = *get_opt_value(clss,name,&opts[i]);
+			size = sizeof(char);
+			break;
+
+		case t_int:
+			u.i = atoi(get_opt_value(clss,name,&opts[i]));
+			size = sizeof(int);
+			break;
+
+		case t_long:
+			u.l = atol(get_opt_value(clss,name,&opts[i]));
+			size = sizeof(long);
+			break;
+
+		case t_long64:
+			u.ll = atoll(get_opt_value(clss,name,&opts[i]));
+			size = sizeof(long64);
+			break;
+
+		case t_str:
+			u.s = strcache(get_opt_value(clss,name,&opts[i]));
+			size = sizeof(char*);
+			break;
+
+		case t_ptr:
+			u.p = NULL;
+			marslog(LOG_WARN,"t_ptr options are not implemented.");
+			size = sizeof(void*);
+			break;
+
+		case t_double:
+			u.d = atof(get_opt_value(clss,name,&opts[i]));
+			size = sizeof(double);
+			break;
+
+		case t_boolean:
+			u.b = (boolean)(atoi(get_opt_value(clss,name,&opts[i])) != 0);
+			size = sizeof(boolean);
+			break;
+
+		case t_fortfloat:
+			u.f = (fortfloat)atof(get_opt_value(clss,name,&opts[i]));
+			size = sizeof(fortfloat);
+			break;
+
+		default:
+			marslog(LOG_EXIT,"Error in var_options type=%d",
+			    opts[i].kind);
+			break;
+		}
+
+		if(size != opts[i].size)
+			marslog(LOG_EXIT,
+			    "Error in var_options size %d != %d (type=%d)",
+			    size,opts[i].size,opts[i].kind);
+
+		memcpy((char*)addr+opts[i].offset,(char*)&u,opts[i].size);
+	}
+}
+
+char *progname(void)
+{
+	return me;
+}
+
+static void trap(int n
+#if defined(__cplusplus) || defined(c_plusplus)
+    ,...
+#endif
+
+)
+{
+	marslog(LOG_EXIT,"Signal %d received",n);
+}
+
+static void toggle_debug(int n
+#if defined(__cplusplus) || defined(c_plusplus)
+    ,...
+#endif
+)
+{
+	marslog(LOG_INFO,"Toggeling debugging");
+	mars.debug = (boolean)! mars.debug;
+	signal(n,toggle_debug);
+}
+
+void trap_all_signals()
+{
+	signal(SIGINT, trap);
+	signal(SIGHUP, trap);
+	signal(SIGQUIT,trap);
+	signal(SIGTERM,trap);
+	signal(SIGALRM,trap);
+
+#if 0
+	signal(SIGBUS, trap);
+	signal(SIGSEGV,trap);
+#endif
+
+#ifndef __i386__
+	signal(SIGSYS, trap);
+#endif
+
+	signal(SIGUSR2,toggle_debug);
+
+	/* don't trap SIGCHLD, otherwise pclose won't return a usable value */
+	/* signal(SIGCHLD,SIG_IGN); */
+}
+
+void marsinit(int *argc,char **argv,void *addr,int count,option opts[])
+{
+	char *p;
+	static int done =0;
+	if(done) return;
+	done =1;
+
+	strncpy(me,mbasename(argv[0]),19);
+	me[19] = 0;
+	p = me;
+	while(*p) {
+		if (*p=='.') *p=0; 
+		p++;
+	}
+
+
+
+	ac = *argc-1;
+	av = argv+1;
+
+	trap_all_signals();
+
+	mars.expflags    = EXPAND_MARS;
+	mars.restriction = false;
+
+	get_options("application",me,&mars,NUMBER(mars_opts),mars_opts);
+
+	if(mars.config)
+		mars.setup = read_request_file(mars.config);
+
+	get_options("application",me,&mars,NUMBER(mars_opts),mars_opts);
+
+	get_options("application",me,addr, count,opts);
+
+	/* read config */
+
+
+	/* if(mars.debug) */
+	/* print_all_requests(mars.setup); */
+
+	mars.appl = strcache(mbasename(me));
+#ifdef sun_bsd
+	on_exit(_marsexit,NULL);
+#else
+	atexit(_marsexit);
+#endif
+
+	/* Initialise grib_api settings */
+	mars_grib_api_init();
+}
+
+const char* config_file(const char* p)
+{
+	static char path[1024];
+	if(*p != '~') return p;
+	sprintf(path,"%s/%s",mars.mars_home,p+1);
+	return path;
+}
diff --git a/src/libMars/pproc.c b/src/libMars/pproc.c
new file mode 100644
index 0000000..236f553
--- /dev/null
+++ b/src/libMars/pproc.c
@@ -0,0 +1,2049 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <errno.h>
+#include <ctype.h>
+#include <math.h>
+
+#ifdef NOPPROC
+
+fortint intout_(char* a,fortint* b,fortfloat* c,const char* d,fortint e,fortint f) { return 0;}
+fortint intin_(char* a,fortint* b,fortfloat* c,const char* d,fortint e,fortint f) {return 0;}
+
+fortint areachk_(fortfloat* a,fortfloat* b,fortfloat* c,fortfloat* d,fortfloat* e,fortfloat* f) { return 0; }
+
+fortint intf2(char* grib_in, fortint *length_in, char* grib_out, fortint *length_out) { *length_out = 0;return 0; }
+fortint intuvs2_(char *vort_grib_in, char *div_grib_in, fortint *length_in, char *vort_grib_out, char *div_grib_out, fortint *length_out) { return -1; }
+fortint intuvp2_(char *vort_grib_in, char *div_grib_in, fortint * length_in, char *vort_grib_out, char *div_grib_out, fortint *length_out) { return -1; }
+fortint intvect2_(char *u_grib_in, char *v_grib_in, fortint *length_in, char *u_grib_out, char *v_grib_out, fortint *length_out) { return -1; }
+
+
+fortint emosnum_(fortint* a) { return *a;}
+
+fortint ibasini_(fortint*a ) { return -1; }
+int emosPrecision() { return 0; }
+int intlogs() { return 0; }
+#endif
+
+#ifdef FORTRAN_UPPERCASE
+#define intout_    INTOUT
+#define intin_     INTIN
+/* #define intf_      INTF */
+/* #define intvect_   INTVECT */
+/* #define intuvs_    INTUVS */
+/* #define intuvp_    INTUVP */
+#define bus012_    BUS012
+#define buukey_    BUUKEY
+#define iscrsz_    ISCRSZ
+#define ibasini_   IBASINI
+#define intlogm_   INTLOGM
+#define areachk_   AREACHK
+#define mbufr_mars_filter_    MBUFR_MARS_FILTER 
+#define emosnum_ EMOSNUM
+#endif
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define intout_    intout
+#define intin_     intin
+/* #define intf_      intf */
+/* #define intvect_   intvect */
+/* #define intuvs_    intuvs */
+/* #define intuvp_    intuvp */
+#define bus012_    bus012
+#define buukey_    buukey
+#define iscrsz_    iscrsz
+#define ibasini_   ibasini
+#define intlogm_   intlogm
+#define areachk_   areachk
+#define mbufr_mars_filter_    mbufr_mars_filter 
+#define emosnum_ emosnum
+#endif
+
+fortint intout_(char*,fortint*,fortfloat*,const char*,fortint,fortint);
+fortint intin_(char*,fortint*,fortfloat*,const char*,fortint,fortint);
+/* fortint intf_(char*,fortint*,fortfloat*,char*,fortint*,fortfloat*); */
+
+
+/* Interpolation merged with grib_api */
+extern fortint intf2(char* grib_in, fortint *length_in, char* grib_out, fortint *length_out);
+extern fortint intuvs2_(char *vort_grib_in, char *div_grib_in, fortint *length_in, char *vort_grib_out, char *div_grib_out, fortint *length_out);
+extern fortint intuvp2_(char *vort_grib_in, char *div_grib_in, fortint * length_in, char *vort_grib_out, char *div_grib_out, fortint *length_out);
+extern fortint intvect2_(char *u_grib_in, char *v_grib_in, fortint *length_in, char *u_grib_out, char *v_grib_out, fortint *length_out);
+
+
+fortint iscrsz_();
+fortint ibasini_(fortint*);
+void	bus012_(fortint*,char*,fortint*,fortint*,obssec1*,fortint*,fortint*);
+void	buukey_(obssec1*,fortint*,obskey*,fortint*,fortint*);
+void    intlogm_(fortint (*)(char*,fortint));
+fortint areachk_(fortfloat*,fortfloat*,fortfloat*,fortfloat*,fortfloat*,
+	fortfloat*);
+fortint emosnum_(fortint*);
+
+#define TRACE(a) \
+	do { marslog(LOG_DBUG,"-> %s",#a); a ; marslog(LOG_DBUG,"<- %s",#a); } while(0)
+
+#ifdef OBSOLETE
+/* For duplicates .. */
+#define KEY_SIZE 32
+
+typedef struct node{
+	char key[KEY_SIZE];
+	struct node *left;
+	struct node *right;
+} node;
+#endif
+
+static struct {
+
+	int   busy;
+	int   quiet;
+
+#ifdef OBSOLETE
+	int   no_duplicates;
+	node  *top;
+	int   dup_count;
+#endif
+
+	int   in_count;
+	int   out_count;
+	int   res_count;
+	int   bad_count;
+
+	int   area_cnt;
+	int   north;
+	int   south;
+	int   east;
+	int   west;
+	int   inter_cnt;
+
+	int   type_cnt;
+	int   *types;
+
+	int   block_cnt;
+	int   *blocks;
+
+	int   interval_cnt;
+	time_interval  *intervals;
+
+	boolean is_bufrfile;
+	boolean original_grib;
+
+	int     ident_cnt;
+	int     *idents;
+	int     instrument_cnt;
+	fortint *instruments;
+
+	long   estimate;
+	long   edition;
+	long   derive_uv;
+
+	char *odb_sql;
+
+} ppdata = {
+	0,};
+
+static timer *pptimer = NULL;
+static timer *memcpytimer = NULL;
+
+static err no_scalar_postproc(char *buff,long inlen,long *outlen);
+static err no_postproc(ppbuffer_t *pp, long *nbuffer);
+static err grib_vector_postproc(ppbuffer_t *ppin, long *nbuffer);
+static err grib_scalar_postproc(char *buffer,long inlen,long *outlen);
+static err grib_postproc(ppbuffer_t *pp, long *nbuffer);
+static err track_postproc(ppbuffer_t *pp, long *nbuffer);
+static err track_scalar_postproc(char *buffer,long inlen,long *outlen);
+static err obs_postproc(ppbuffer_t *pp, long *nbuffer);
+static err obs_scalar_postproc(char *buffer,long inlen,long *outlen);
+static err odb_postproc(ppbuffer_t *pp, long *nbuffer);
+static err odb_scalar_postproc(char *buffer,long inlen,long *outlen);
+
+static void ppinfo()
+{
+	int i;
+	if(ppdata.area_cnt == 4)
+		printf("AREA %d-%d-%d-%d\n",
+		    ppdata.north,ppdata.west,ppdata.south,ppdata.east);
+	if(ppdata.type_cnt) {
+		printf("OBSTYPE ");
+		for(i=0;i<ppdata.type_cnt;i++)
+			printf("%d ",ppdata.types[i]);
+		putchar('\n');
+	}
+	if(ppdata.interval_cnt) {
+		printf("INTERVALS ");
+		for(i=0;i<ppdata.interval_cnt;i++)
+			printf("[%lld,%lld] ",ppdata.intervals[i].begin,
+								ppdata.intervals[i].end);
+		putchar('\n');
+	}
+	if(ppdata.block_cnt) {
+		printf("BLOCK ");
+		for(i=0;i<ppdata.block_cnt;i++)
+			printf("%d ",ppdata.blocks[i]);
+		putchar('\n');
+	}
+	if(ppdata.ident_cnt) {
+		printf("IDENT ");
+		for(i=0;i<ppdata.ident_cnt;i++)
+			printf("%d ",ppdata.idents[i]);
+		putchar('\n');
+	}
+	if(ppdata.instrument_cnt) {
+		printf("INSTRUMENT ");
+		for(i=0;i<ppdata.instrument_cnt;i++)
+			printf("%d ",ppdata.instruments[i]);
+		putchar('\n');
+	}
+}
+
+#ifdef OBSOLETE
+/* Binary tree to find duplicates */
+
+static int find_key(node *n,char *key,node **which,int *where)
+{
+	*which = NULL;
+
+	while(n)
+	{
+		*which = n;
+		*where = memcmp(key,n->key,KEY_SIZE);
+
+		if(*where == 0)
+		{
+			
+			return 1;
+		}
+
+		if(*where>0)
+			n = n->right;
+		else
+			n = n->left;
+	}
+	return 0;
+}
+
+static int add_key(node **top,char *k)
+{
+	node *which;
+	node *p;
+	int where;
+
+	if(find_key(*top,k,&which,&where))
+		return 1;
+
+	p  = NEW(node);
+
+	memcpy(p->key,k,KEY_SIZE);
+
+	p->left = p->right = NULL;
+	if(which)
+		if(where>0)
+			which->right = p;
+		else 
+			which->left = p;
+	else *top = p;
+	return 0;
+}
+
+static void delete_node(node *n)
+{
+	if(n) {
+		delete_node(n->left);
+		delete_node(n->right);
+		FREE(n);
+	}
+}
+
+#endif
+
+static err ppout(char* s,fortint n,fortfloat *array, const char *p)
+{
+	err e ;
+	static const char *empty = "";
+	if(!p)
+		p = empty;
+	TRACE(e = intout_(C2FORT(s),&n,array,C2FORT(p),strlen(s),strlen(p)));
+	return e;
+}
+
+static err ppin(char* s,fortint n,fortfloat *array, const char *p)
+{
+	err e ;
+	static const char *empty = "";
+	if(!p)
+		p = empty;
+	TRACE(e = intin_(C2FORT(s),&n,array,C2FORT(p),strlen(s),strlen(p)));
+	return e;
+}
+
+static err no_scalar_postproc(char *buff,long inlen,long *outlen)
+{
+	*outlen = inlen;
+
+	if(ppdata.original_grib)
+	{
+		fortint len = *outlen;
+		err ret = original_grib(buff,&len);
+		*outlen = len;
+		return ret;
+	}
+
+	return NOERR;
+}
+
+static err no_postproc(ppbuffer_t *pp, long *nbuffer)
+{
+	*nbuffer = 1;
+	return no_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);
+}
+
+#define PPROC_PRECISION "%.15g"
+
+err ppstyle(const request *r)
+{
+	err       ret     = NOERR;
+	fortfloat array[4];
+	fortint   n       = 0; 
+
+	if(get_value(r,"STYLE",0))
+	{
+		const char *style = no_quotes(get_value(r,"STYLE",0));
+		marslog(LOG_DBUG,"Setting post-processing style to: '%s'",style);
+		ret  = ppout("style",n,array,lowcase(style));
+		if(ret) return ret;
+		if(EQ(style,"DISSEMINATION"))
+		{
+			marslog(LOG_WARN,"With style=dissemination, avoid intermediate packing");
+			mars.use_intuvp = 1;
+		}
+	}
+	return NOERR;
+}
+
+err pprotation(const request *r)
+{
+	err       ret     = NOERR;
+	fortfloat array[4];
+	fortint   n       = 0;
+
+	/* rotation */
+	if(get_value(r,"_ROTATION_LAT",0) || get_value(r,"_ROTATION_LON",0))
+	{
+		array[0] = atof(get_value(r,"_ROTATION_LAT",0));
+		array[1] = atof(get_value(r,"_ROTATION_LON",0));
+		ret      = ppout("rotation",n,array,0);
+		if(ret) return ret;
+	}
+	return NOERR;
+}
+
+err pparea(request *r)
+{
+	const char *p;
+	fortfloat ew = 0,ns = 0,n = 0,s = 0,e = 0,w = 0;
+	fortfloat ew_ = 0, ns_ = 0,n_ = 0,s_ = 0,e_ = 0,w_ = 0;
+
+	const char *level = get_value(r,"LEVTYPE",0);
+	boolean     ocean = level && (strcmp(level,"DP") == 0);            /* Level depth means ocean data */
+
+	if( p = get_value(r,"_AREA_N",0)) n_  = n = atof(p);
+	if( p = get_value(r,"_AREA_S",0)) s_  = s = atof(p);
+	if( p = get_value(r,"_AREA_E",0)) e_  = e = atof(p);
+	if( p = get_value(r,"_AREA_W",0)) w_  =  w  = atof(p);
+	if( p = get_value(r,"_GRID_EW",0))ew_ =  ew = atof(p);
+	if( p = get_value(r,"_GRID_NS",0))ns_ =  ns = atof(p);
+	if( p = get_value(r,"_GAUSSIAN",0)) ew_ =  ew = atof(p);
+
+
+	if(ew == 0 && ns == 0)
+		return 0;
+
+	if(ocean) 
+		marslog(LOG_INFO,"Ocean field. Don't check AREA boundaries");
+	else
+	{
+		if(areachk_(&ew,&ns,&n,&w,&s,&e))
+			marslog(LOG_WARN,"AREACHK returns an error");
+	}
+		
+
+	if(ew_ != 0 && ew_ != ew || ns_ != ns)
+	{
+		if(ns == 0)
+		{
+			marslog(LOG_WARN,"Grid not supported, changed from "PPROC_PRECISION" to "PPROC_PRECISION,
+				ew_,ew);
+			set_value(r,"_GAUSSIAN",PPROC_PRECISION,ew);
+			set_value(r,"GRID","%g",ew);
+		}
+		else
+		{
+			marslog(LOG_WARN,"Grid not supported, changed from "PPROC_PRECISION"/"PPROC_PRECISION" to "PPROC_PRECISION"/"PPROC_PRECISION,
+				ew_,ns_,ew,ns);
+			set_value(r,"_GRID_EW",PPROC_PRECISION,ew);
+			set_value(r,"_GRID_NS",PPROC_PRECISION,ns);
+			set_value(r,"GRID",PPROC_PRECISION,ew);
+			add_value(r,"GRID",PPROC_PRECISION,ns);
+		}
+	}
+
+	if(n_ != 0 || s_ != 0 || e_ != 0 || w_ != 0)
+	if(n_ != n || s_ != s || e_ != e || w_ != w)
+	{
+		if((e_ != e && e_ != (e - 360)) || 
+		   (w_ != w  && w_ != (w - 360)) ||
+		   (n_ != n)                     ||
+		   (s_ != s)
+		   )
+		{
+			marslog(LOG_WARN,"Area not compatible with grid");
+			marslog(LOG_WARN,"Area changed from "PPROC_PRECISION"/"PPROC_PRECISION"/"PPROC_PRECISION"/"PPROC_PRECISION" to "PPROC_PRECISION"/"PPROC_PRECISION"/"PPROC_PRECISION"/"PPROC_PRECISION, 
+				n_,w_,s_,e_,
+				n,w,s,e);
+		}
+
+		set_value(r,"_GRID_N",PPROC_PRECISION,n);
+		set_value(r,"_GRID_W",PPROC_PRECISION,w);
+		set_value(r,"_GRID_S",PPROC_PRECISION,s);
+		set_value(r,"_GRID_E",PPROC_PRECISION,e);
+
+		set_value(r,"AREA",PPROC_PRECISION,n);
+		add_value(r,"AREA",PPROC_PRECISION,w);
+		add_value(r,"AREA",PPROC_PRECISION,s);
+		add_value(r,"AREA",PPROC_PRECISION,e);
+
+		set_value(r,"_AREA_N",PPROC_PRECISION,n);
+		set_value(r,"_AREA_S",PPROC_PRECISION,s);
+		set_value(r,"_AREA_E",PPROC_PRECISION,e);
+		set_value(r,"_AREA_W",PPROC_PRECISION,w);
+	}
+
+	return 0;
+}
+
+static int get_parameter(void *buffer, long length, err *ret);
+
+static err ppintf(char *inbuf,long inlen,char *outbuf,long *outlen,boolean copy)
+{
+	fortint out = *outlen;
+	fortint in  = inlen;
+	int ret = 0;
+
+	if(mars.pseudogrib)
+	{
+		marslog(LOG_WARN,"Pseudo GRIB not interpolated");
+		*outlen = 0;
+	}
+	else
+	{
+		int p = get_parameter(inbuf,inlen,&ret);
+		if(mars.use_intuvp && is_wind(p) && (ppdata.derive_uv > 0))
+		{
+			marslog(LOG_DBUG,"Avoid calling intf2 when intuvp set and U/V");
+			*outlen = out=0;
+			ret=0;
+			ppdata.derive_uv--;
+		}
+		else
+		{
+			timer_start(pptimer);
+			TRACE(ret = intf2(inbuf,&in,outbuf,&out));
+			timer_stop(pptimer,0);
+			*outlen = out;
+			marslog(LOG_DBUG,"intf2 returns %d",ret);
+		}
+	}
+
+	if(ret)
+	{
+		marslog(LOG_EROR,"Interpolation failed (%d)",ret);
+		return ret;
+	}
+
+	if(ret == 0 && *outlen == 0)
+	{
+		/* marslog(LOG_INFO,"No interpolation done"); */
+		if(copy) {
+			timer_start(memcpytimer);
+			memcpy(outbuf,inbuf,inlen);
+			timer_stop(memcpytimer,inlen);
+			*outlen = inlen;
+		}
+	}
+
+	return ret;
+}
+
+/**************************/
+/* Vector Post-Processing */
+/**************************/
+
+typedef struct pairs_t {
+	int param;
+	char *buffer;
+	int len;
+} pairs_t;
+
+#define NPARAMS 257000
+pairs_t pair[NPARAMS];
+
+static void set_pair(int p, int q)
+{
+	pair[p].param  = q;
+	pair[p].buffer = NULL;
+	pair[p].len    = 0;
+
+	pair[q].param  = p;
+	pair[q].buffer = NULL;
+	pair[q].len    = 0;
+}
+
+static void init_pairs()
+{
+	int i = 0;
+	static boolean first = true;
+	if(!first)
+		return;
+	first = false;
+
+	for(i = 0; i<NPARAMS; ++i)
+	{
+		pair[i].param  = 0; 
+		pair[i].buffer = NULL; 
+		pair[i].len    = 0;
+	}
+	/* Need to consider table as well: COME BACK HERE */
+	set_pair(131,132);
+	set_pair(129131,129132);
+	set_pair(200131,200132);
+	set_pair(165,166);
+}
+
+
+static boolean is_vector_parameter(int p)
+{
+	init_pairs();
+
+    /* For parameter 3.228, we allow syntax 228003 */
+	if(p>257)
+		p %= 1000;
+
+	if(pair[p].param)
+		return true;
+
+	return false;
+}
+
+static boolean vector_parameter_requested(const request *r)
+{
+	int i = 0;
+	const char *param = NULL;
+
+	init_pairs();
+
+	param = r?get_value(r,"PARAM",i++):NULL;
+	while(param)
+	{
+		int p = atoi(param);
+		if(is_vector_parameter(p))
+		{
+			marslog(LOG_DBUG,"Vector parameter %d requested",p);
+			return true;
+		}
+		else
+		{
+			marslog(LOG_DBUG,"Param %d is not vector",p);
+		}
+		param = get_value(r,"PARAM",i++);
+	}
+	return false;
+}
+
+static int vector_pair(int p)
+{
+	if(is_vector_parameter(p))
+		return pair[p].param;
+
+	return -1;
+}
+
+
+static int get_parameter(void *buffer, long length, err *ret)
+{
+	grib_handle *g = grib_handle_new_from_message(0,buffer,length);
+	long n;
+	*ret = grib_get_long(g,"paramId",&n);
+	grib_handle_delete(g);
+	return n;
+}
+
+
+err vector_postproc(ppbuffer_t *pp, long *nbuffer)
+{
+	int ret = 0;
+	int p = get_parameter(pp[0].buffer,pp[0].inlen,&ret);
+	int q;
+
+	if(ret != 0)
+	{
+		marslog(LOG_WARN,"Error %d in vector_postproc while getting parameter number",ret);
+		marslog(LOG_WARN,"Interpolation not done");
+		nbuffer = 0;
+		return ret;
+	}
+
+	marslog(LOG_DBUG,"vector_postproc called for parameter %d",p);
+	if(!is_vector_parameter(p))
+	{
+		marslog(LOG_DBUG,"Parameter %d is not vector. Calling scalar post-processing",p);
+		*nbuffer = 1;
+		return grib_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);	
+	}
+
+
+	if((q = vector_pair(p)) == 0)
+	{
+		marslog(LOG_WARN,"Vector pair for parameter %d not found",p);
+		marslog(LOG_WARN,"Perform scalar post-processing");
+		marslog(LOG_WARN,"Please, inform MARS analyst");
+
+		*nbuffer = 1;
+		return grib_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);
+	}
+
+	/* Copy input buffer */
+	pair[p].len    = pp[0].inlen;
+	pair[p].buffer = reserve_mem(pair[p].len);
+	memcpy(pair[p].buffer, pp[0].buffer, pp[0].inlen);
+
+	if(pair[q].buffer)
+	{
+		err ret = 0;
+		char *pufield = (p<q)?pair[p].buffer:pair[q].buffer;
+		char *pvfield = (p<q)?pair[q].buffer:pair[p].buffer;
+
+		fortint   out = pp[0].buflen;
+
+		marslog(LOG_DBUG,"Got parameters %d and %d. Calling vector post-processing",p,q);
+
+		if(mars.debug)
+		{
+			request *r = empty_request("WIND");
+
+			marslog(LOG_DBUG,"Buffer for %d at address %x, length %d",p,pair[p].buffer,pair[p].len,pair[p].len);
+			grib_to_request(r,pair[p].buffer,pair[p].len);
+			print_all_requests(r);
+			free_all_requests(r);
+
+			r = empty_request("WIND");
+			marslog(LOG_DBUG,"Buffer for %d at address %x, length %d",q,pair[q].buffer,pair[q].len);
+			grib_to_request(r,pair[q].buffer,pair[q].len);
+			print_all_requests(r);
+			free_all_requests(r);
+
+		}
+
+		/* If MARS_USE_INTUVP set and deriving U/V, convertion + interpolation 
+		has already been done
+		*/
+		if(mars.use_intuvp && is_wind(p) && (ppdata.derive_uv > 0))
+		{
+			marslog(LOG_DBUG,"MARS_USE_INTUVP set and parameters are U/V. Avoid calling intvect_");
+			memcpy(pp[0].buffer,pufield,pp[0].inlen);
+			memcpy(pp[1].buffer,pvfield,pp[0].inlen);
+			out=0;
+			/* ppdata.inter_cnt+=2; */
+			ret=0;
+			ppdata.derive_uv -= 2;
+		}
+		else
+		{
+			/* Call vector interpolation */
+			timer_start(pptimer);
+			TRACE(ret= intvect2_(pufield,pvfield,&pair[p].len,pp[0].buffer,pp[1].buffer,&out));
+			timer_stop(pptimer,0);
+
+		}
+		marslog(LOG_DBUG,"intvect2_ returns %d",ret);
+
+
+		/* If 0, no interpolation as been done.. */
+
+		if((out != 0) && (mars.grib_postproc == 0))
+		{
+			marslog(LOG_EROR,"Env variable MARS_GRIB_POSTPROC has been set to 0");
+			marslog(LOG_EROR,"and some field(s) need interpolation");
+			return POSTPROC_ERROR;
+		}
+
+		if((out != 0) && (mars.gridded_observations_postproc == 0))
+		{
+			marslog(LOG_EROR,"Gridded observations need interpolation. In order to force");
+			marslog(LOG_EROR,"interpolation, please, set MARS_GRIDDED_OBSERVATIONS_INTERP to 1");
+			return POSTPROC_ERROR;
+		}
+
+		if(out == 0)
+		{
+			pp[0].outlen = pp[1].outlen = pp[0].inlen;
+		}
+		else {
+			pp[0].outlen = pp[1].outlen = out;
+			ppdata.inter_cnt++;
+			ppdata.inter_cnt++;
+		}
+
+		if(pp[0].outlen > pp[0].buflen)
+		{
+			marslog(LOG_EROR,"INTVECT2 output is %d bytes",pp[0].outlen);
+			marslog(LOG_EXIT,"Buffer is only %d bytes",pp[0].buflen);
+			return BUF_TO_SMALL;
+		}
+
+		if(ret < 0)
+		{
+			marslog(LOG_EROR,"Vector interpolation failed (%d)",ret);
+			out = 0;
+			nbuffer = 0;
+			return ret;
+		}
+		else
+		{
+
+			if(ret)
+			{
+				marslog(LOG_EROR,"Vector interpolation failed (%d)",ret);
+				return ret;
+			}
+
+			/* Inform 2 buffers are ready */
+			*nbuffer = 2;
+
+			/* Release input buffers */
+			release_mem(pair[p].buffer);
+			pair[p].buffer = NULL;
+			pair[p].len    = 0;
+
+			release_mem(pair[q].buffer);
+			pair[q].buffer = NULL;
+			pair[q].len    = 0;
+		}
+	}
+	else
+	{
+		/* We don't have q. Keep p and wait for q */
+		*nbuffer = 0;
+		marslog(LOG_DBUG,"Vector parameter %d kept. Waiting for parameter %d",p,q);
+		ret = 0;
+	}
+
+	return ret;
+}
+
+
+static err grib_vector_postproc(ppbuffer_t *ppin, long *nbuffer)
+{
+	if(mars.can_do_vector_postproc)
+		return vector_postproc(ppin,nbuffer);
+
+	*nbuffer = 1;
+	return grib_scalar_postproc(ppin[0].buffer,ppin[0].inlen,&ppin[0].outlen);
+}
+
+static err grib_scalar_postproc(char *buffer,long inlen,long *outlen)
+{
+	long      ret   = 0;
+	static    char  *result = NULL;
+	static    long   length = 0;
+	long      size  = MAX(*outlen,ppestimate());
+
+	if(length < size)
+	{
+		if(result) release_mem(result);
+		length = size;
+		result = (char*)reserve_mem(length);
+	}
+
+	ret  = ppintf(buffer,inlen,result,&size,false);
+
+	/* If 0, no interpolation as been done.. */
+
+	if((size != 0) && (mars.grib_postproc == 0))
+	{
+		marslog(LOG_EROR,"Env variable MARS_GRIB_POSTPROC has been set to 0");
+		marslog(LOG_EROR,"and some field(s) need interpolation");
+		return POSTPROC_ERROR;
+	}
+
+	if((size != 0) && (mars.gridded_observations_postproc == 0))
+	{
+		marslog(LOG_EROR,"Gridded observations need interpolation. In order to force");
+		marslog(LOG_EROR,"interpolation, please, set MARS_GRIDDED_OBSERVATIONS_INTERP to 1");
+		return POSTPROC_ERROR;
+	}
+
+	if(size == 0)
+	{
+		size = *outlen = inlen;
+	}
+	else {
+		if(ret == 0)
+		{
+			if(*outlen < size)
+			{
+				*outlen = size;
+				return BUF_TO_SMALL;
+			}
+
+			*outlen = size;
+			ppdata.inter_cnt++;
+			memcpy(buffer,result,size);
+		}
+	}
+
+	if(ppdata.original_grib)
+	{
+		fortint len = size;
+		ret = original_grib(buffer,&len);
+		*outlen = len;
+	}
+
+	return ret;
+}
+
+static err grib_postproc(ppbuffer_t *pp, long *nbuffer)
+{
+	*nbuffer = 1;
+	return grib_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);
+}
+
+err makeuv(char *vo,char *d,long inlen,char *u,char *v,long *outlen)
+{
+	err e;
+	fortint out = *outlen;
+	fortint in  = inlen;
+
+	if(mars.grib_postproc == 0)
+	{
+		marslog(LOG_EROR,"Env variable MARS_GRIB_POSTPROC has been set to 0");
+		marslog(LOG_EROR,"and convertion to U/V requested");
+		return POSTPROC_ERROR;
+	}
+
+	if(!ppdata.quiet)
+	{
+		marslog(LOG_INFO,"Deriving U and V from vorticity and divergence");
+		ppdata.quiet = 1;
+	}
+
+	marslog(LOG_DBUG,"-> INTUV%s in=%d out=%d",mars.use_intuvp?"P":"S",*outlen,out);
+	timer_start(pptimer);
+	if(mars.use_intuvp)
+	{
+		e = intuvp2_(vo,d,&in,u,v,&out);
+		if(in != out)
+			ppdata.inter_cnt+=2;
+		marslog(LOG_DBUG,"MARS_USE_INTUVP set and parameters are U/V. Avoid calling intf2");
+		ppdata.derive_uv += 2;
+	}
+	else
+		e = intuvs2_(vo,d,&in,u,v,&out);
+	timer_stop(pptimer,0);
+
+	marslog(LOG_DBUG,"<- INTUV%s in=%d out=%d",mars.use_intuvp?"P":"S",*outlen,out);
+
+	if(out >  *outlen)
+	{
+		marslog(LOG_EROR,"INTUV%s output is %d bytes",mars.use_intuvp?"P":"S",out);
+		marslog(LOG_EXIT,"Buffer is only %d bytes",*outlen);
+	}
+
+	*outlen = out;
+
+	/* Check if rounding to a multiple of 4 changes */
+	/* the actual size.                             */
+
+	if( *outlen > (inlen+sizeof(fortint)))
+	{
+		marslog(LOG_DBUG,"INTUV%s returns bigger field %d > %d",mars.use_intuvp?"P":"S",*outlen ,inlen);
+		/* return -3; */
+	}
+
+	return e;
+}
+
+static err odb_postproc(ppbuffer_t *pp, long *nbuffer)
+{
+	*nbuffer = 1;
+	return odb_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);
+}
+
+static err odb_scalar_postproc(char *buffer,long inlen, long *outlen)
+{
+#if 0
+	/* */
+	marslog(LOG_DBUG,"in odb_scalar_postproc....inlen: %ld, outlen: %ld",inlen,*outlen);
+	marslog(LOG_DBUG,"in odb_scalar_postproc, filter %s",ppdata.odb_sql);
+	*outlen = inlen;
+	if(ppdata.odb_sql != NULL)
+	{
+		//marslog(LOG_INFO|LOG_ONCE, "Apply ODB filter '%s'", ppdata.odb_sql);
+		marslog(LOG_INFO, "Apply ODB filter '%s'", ppdata.odb_sql);
+
+		size_t filteredLength = 0;
+		odb_start();
+		marslog(LOG_INFO, "in odb_scalar_postproc, calling filter_in_place: inlen=%ld", inlen);
+		int rc = filter_in_place(buffer, inlen, &filteredLength, no_quotes(ppdata.odb_sql));
+		if (rc) return rc;
+		*outlen = filteredLength;
+	}
+#endif
+
+	return NOERR;
+}
+
+static err track_postproc(ppbuffer_t *pp, long *nbuffer)
+{
+	*nbuffer = 1;
+	return track_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);
+}
+
+static err track_scalar_postproc(char *buffer,long inlen,long *outlen)
+{
+	packed_key	key;
+	packed_key*	keyptr = &key;
+
+	char *p = buffer;
+	char *q = buffer;
+
+	unsigned long klength = 0;
+
+	*outlen = 0;
+
+
+	marslog(LOG_DBUG,"=> Enter track_postproc");
+	while(inlen>0)
+	{
+		int i;
+		int ok = 1;
+
+		/* Move to next BUFR */
+		while( (p[0]!='B' || p[1]!='U' || p[2]!='F' || p[3]!='R') && inlen>0)
+		{
+			p++;
+			inlen--;
+		}
+
+		if(inlen <= 0) break;
+
+		if (!get_packed_key(p,keyptr))
+		{
+			ok = 0;
+			set_key_length(&key,1);
+		}
+
+		/* Types */
+		if(ok && ppdata.type_cnt>0)
+		{
+			ok = 0;
+			for(i = 0;i<ppdata.type_cnt;i++)
+				if(ppdata.types[i] == KEY_SUBTYPE(keyptr))
+				{
+					ok = 1;
+					break;
+				}
+			marslog(LOG_DBUG,"=> subtype %d %s match",KEY_SUBTYPE(keyptr),(ok?"":"DONT"));
+		}
+
+		/* Ident ... */
+		if(ok && ppdata.ident_cnt > 0)
+		{
+			unsigned char *buf = (unsigned char *)KEY_IDENT(keyptr);
+			int ident = 0;
+			ok = 0;
+
+			for(i=0;i<3;i++)
+				ident = ident * 10 + (buf[i] - '0');
+
+			for(i = 0;i<ppdata.ident_cnt;i++)
+			{
+				marslog(LOG_DBUG,"=> ident %d: %d, (KEY_IDENT %s => %d)", i,ppdata.idents[i], 
+														  KEY_IDENT(keyptr),ident);
+				if(ppdata.idents[i] == ident)
+				{
+					ok = 1;
+					marslog(LOG_DBUG,"      MATCH");
+					break;
+				}
+				else
+					marslog(LOG_DBUG," DONT MATCH");
+					
+			}
+		}
+
+		/* Time */
+		if(ok && ppdata.interval_cnt > 0)
+		{
+			double obs_date;
+
+			ok = 0;
+			obs_date = key_2_datetime(keyptr);
+			for (i = 0; i < ppdata.interval_cnt; i++)
+			{
+				if (obs_date >= ppdata.intervals[i].begin &&
+					obs_date <= ppdata.intervals[i].end)
+				{
+					ok = 1;
+					break;
+				}
+			}
+			marslog(LOG_DBUG,"=> obs_date_time %lf %s match",obs_date,(ok?"":"DONT"));
+		}
+
+		/* Check for area */
+		if(ok && ppdata.area_cnt == 4)
+		{
+			if(KEY_LATITUDE1(keyptr) > ppdata.north ||
+				KEY_LATITUDE1(keyptr) < ppdata.south)
+				ok = 0;
+			if(ppdata.west <  ppdata.east)
+			{
+				if(KEY_LONGITUDE1(keyptr) < ppdata.west ||
+					KEY_LONGITUDE1(keyptr) > ppdata.east)
+					ok = 0;
+			}
+			else
+			{
+				if(!(KEY_LONGITUDE1(keyptr) > ppdata.west ||
+					KEY_LONGITUDE1(keyptr) < ppdata.east))
+					ok = 0;
+
+			}
+			marslog(LOG_DBUG,"=> lat: %ld, lon: %lf %s match",KEY_LATITUDE1(keyptr),KEY_LONGITUDE1(keyptr),(ok?"":"DONT"));
+		}
+
+		klength = key_length(p,keyptr);
+		if(ok)
+		{
+			if(p != q) memcpy(q,p,klength);
+			q      += klength;
+			(*outlen) += klength;
+			ppdata.out_count++;
+		}
+
+		p     += klength;
+		inlen -= klength;
+		ppdata.in_count++;
+	}
+	return 0;
+
+}
+
+
+static err obs_postproc(ppbuffer_t *pp, long *nbuffer)
+{
+	*nbuffer = 1;
+	return obs_scalar_postproc(pp[0].buffer,pp[0].inlen,&pp[0].outlen);
+}
+
+static err obs_scalar_postproc(char *buffer,long inlen,long *outlen)
+{
+	int    		issat;
+	packed_key	key;
+	packed_key*	keyptr = &key;
+
+	char *p = buffer;
+	char *q = buffer;
+
+	unsigned long klength = 0;
+
+	*outlen = 0;
+
+
+	while(inlen>0)
+	{
+		int i;
+		int ok = 1;
+		unsigned int keylength = 0;
+
+		/* Move to next BUFR */
+		while( (p[0]!='B' || p[1]!='U' || p[2]!='F' || p[3]!='R') && inlen>0)
+		{
+			p++;
+			inlen--;
+		}
+
+		if(inlen <= 0) break;
+
+		if (!get_packed_key(p,keyptr))
+		{
+			ok = 0;
+			set_key_length(&key,1);
+		}
+
+		issat = (KEY_TYPE(keyptr) == 2) || 
+				(KEY_TYPE(keyptr) == 3) || 
+				(KEY_TYPE(keyptr) == 12);
+
+		/* WMO block ... */
+		if(ok && ppdata.block_cnt>0)
+		{
+			int wmo   = (KEY_IDENT(keyptr)[0] - '0')*10 
+						+ (KEY_IDENT(keyptr)[1] - '0');
+			ok = 0;
+			if(!issat)
+			{
+				for(i = 0;i<ppdata.block_cnt;i++)
+					if(ppdata.blocks[i] == wmo)
+					{
+						ok = 1;
+						break;
+					}
+			}
+		}
+
+		/* Types */
+		if(ok && ppdata.type_cnt>0)
+		{
+			ok = 0;
+			for(i = 0;i<ppdata.type_cnt;i++)
+				if(ppdata.types[i] == KEY_SUBTYPE(keyptr))
+				{
+					ok = 1;
+					break;
+				}
+		}
+
+		/* Ident ... */
+		if(ok && ppdata.ident_cnt > 0)
+		{
+			ok = 0;
+			if(issat)
+			{
+				int ident = bufr_sat_id(p,keyptr);
+
+				for(i = 0;i<ppdata.ident_cnt;i++)
+					if(ppdata.idents[i] == ident)
+					{
+						ok = 1;
+						break;
+					}
+			}
+			else
+			{
+				int ident = 0;
+				for(i=0;i<5;i++)
+					ident = 10*ident + (KEY_IDENT(keyptr)[i]-'0');
+
+				for(i = 0;i<ppdata.ident_cnt;i++)
+					if(ppdata.idents[i] == ident)
+					{
+						ok = 1;
+						break;
+					}
+			}
+		}
+
+		/* time . Note that time is irrelevant for SSMI (126) data */
+		if(ok && ppdata.interval_cnt > 0 && 
+		   KEY_SUBTYPE(keyptr)!= 126 &&
+		   !ppdata.is_bufrfile)
+		{
+			double obs_date;
+
+			ok = 0;
+			obs_date = key_2_datetime(keyptr);
+			for (i = 0; i < ppdata.interval_cnt; i++)
+			{
+				if (obs_date >= ppdata.intervals[i].begin &&
+					obs_date <= ppdata.intervals[i].end)
+				{
+					ok = 1;
+					break;
+				}
+			}
+		}
+
+		/* Check for area */
+		if(ok && ppdata.area_cnt == 4)
+		{
+			if(issat)
+			{
+				if(KEY_LATITUDE1(keyptr) > ppdata.north ||
+				    KEY_LATITUDE2(keyptr) < ppdata.south)
+					ok = 0;
+				if((KEY_LONGITUDE1(keyptr) < ppdata.west ||
+				    KEY_LONGITUDE2(keyptr) > ppdata.east) &&
+					!(ppdata.west == ppdata.east))
+					ok = 0;
+			}
+			else {
+				if(KEY_LATITUDE1(keyptr) > ppdata.north ||
+				    KEY_LATITUDE1(keyptr) < ppdata.south)
+					ok = 0;
+				if(ppdata.west <  ppdata.east)
+				{
+					if(KEY_LONGITUDE1(keyptr) < ppdata.west ||
+						KEY_LONGITUDE1(keyptr) > ppdata.east)
+						ok = 0;
+				}
+				else
+				{
+					if(!(KEY_LONGITUDE1(keyptr) > ppdata.west ||
+						KEY_LONGITUDE1(keyptr) < ppdata.east))
+						ok = 0;
+
+				}
+#if 0
+					if(ok)
+					{
+					marslog(LOG_INFO,"longitude: %d, west: %d, east: %d ",
+							KEY_LONGITUDE1(keyptr),
+							ppdata.west,
+							ppdata.east);
+					}
+#endif
+			}
+		}
+
+		if(ok && issat && (ppdata.instrument_cnt > 0))
+		{
+#if defined(BUFR_FILTER)
+			fortint n_instr = ppdata.instrument_cnt;
+			fortint found   = 0;
+			fortint e       = 0;
+			timer *filter_instruments = get_timer("Filter instruments",NULL,true);
+			fortint orig_len  = inlen;
+			char    *orig_buf = p;
+
+			timer_start(filter_instruments);
+			mbufr_mars_filter_(&n_instr,ppdata.instruments,&orig_len,orig_buf,&found,&e);
+			timer_stop(filter_instruments,0);
+			if(e != 0)
+				marslog(LOG_WARN,"Error %d while filtering instruments on message %d",e,ppdata.in_count);
+			else
+				ok = found;
+#else
+			marslog(LOG_WARN,"Filter by instrument not active");
+#endif
+		}
+
+#ifdef OBSOLETE
+		if(ok && ppdata.no_duplicates)
+		{
+			if(add_key(&ppdata.top,(char*)&key))
+			{
+				ppdata.dup_count++;
+				ok = 0;
+			}
+		}
+#endif
+
+
+#ifdef ECMWF
+		if(ok && mars.restriction)
+		{
+			if(restricted(keyptr))
+			{
+				ok = 0;
+				ppdata.res_count++;
+			}
+		}
+#endif
+
+		klength = key_length(p,keyptr);
+
+		if(klength <= 4 || klength > inlen ||
+			p[klength-4] != '7' ||
+			p[klength-3] != '7' ||
+			p[klength-2] != '7' ||
+			p[klength-1] != '7'
+		)
+		{
+			/* Some obs are wrong... june in 1990 */
+			unsigned char *s = (unsigned char*)(p + 4); /* skip BUFR */
+			int len = 8;
+			int nsec = 4;
+
+
+			/* skip section 0 , check for BUFR version */
+			char* sec1_start = p;
+			if((unsigned char)sec1_start[7]>1) sec1_start += 8;
+			else sec1_start += 4;
+			if(SEC1_FLAGS(sec1_start)== 0)
+			{
+				marslog(LOG_WARN,"Report %d has no key but was included",
+					ppdata.in_count+1);
+				ok = 1;
+				nsec = 3;
+			}
+
+			for(i=0;i< nsec && len <= inlen ;i++)
+			{
+				int sec = (s[0] << 16) + (s[1] << 8) + s[2]; 
+				len += sec; 
+				s   += sec;
+			}
+			ppdata.bad_count++;
+
+			set_key_length(&key,len);
+			
+			klength = key_length(p,keyptr);
+			if (SEC1_FLAGS(p)!= 0)
+			{
+				if(len <= 4 || len > inlen ||
+				p[klength-4] != '7' ||
+				p[klength-3] != '7' ||
+				p[klength-2] != '7' ||
+				p[klength-1] != '7')
+				{
+					ok = 0;
+					set_key_length(&key,sizeof(long));
+					marslog(LOG_EROR,"Bad report found at position %d, skipped",
+						ppdata.in_count+1);
+				}
+			}
+
+		}
+
+		keylength  = key_length(p,keyptr);
+
+		set_key_length(&key,((keylength + sizeof(long)-1)/sizeof(long))*sizeof(long));
+
+		if( ok && keylength > inlen)
+		{
+			ok = 0;
+			set_key_length(&key,sizeof(long));
+			marslog(LOG_EROR,"Report to large found at position %d, skipped",
+				ppdata.in_count+1);
+		}
+
+		klength = key_length(p,keyptr);
+		if(ok)
+		{
+			if(p != q) memcpy(q,p,klength);
+			q      += klength;
+			(*outlen) += klength;
+			ppdata.out_count++;
+		}
+
+		p     += klength;
+		inlen -= klength;
+		ppdata.in_count++;
+	}
+	return 0;
+}
+
+/* Initialise post-processing .... */
+
+static void pperror(char *msg)
+{
+	marslog(LOG_WARN|LOG_ONCE,"%s",msg);
+}
+
+long ppestimate()
+{
+	return ppdata.estimate;
+}
+
+long emoscycle()
+{
+	fortint off    = 1;
+	long    ecycle = (long)emosnum_(&off);
+	return ecycle;
+}
+
+err ppinit(const request *r, postproc *proc)
+{
+	fortfloat array[4];
+	fortint   n = 0;
+	err       ret;
+	int      i;
+	const char *p;
+	const char *mars_postproc = get_value(r,"_POSTPROCESSING",0);
+
+	*proc = no_postproc;
+
+	if(ppdata.busy)
+	{
+		marslog(LOG_EROR,"Post-processing pacake already opened");
+		return -2;
+	}
+
+	intlogs(pperror);
+
+	/* Reset */
+	n = 1;
+	TRACE(ibasini_(&n));
+	n = 0;
+
+	ppdata.derive_uv = 0;
+	ppdata.busy = 1;
+	ppdata.inter_cnt = 
+	ppdata.in_count = ppdata.out_count = ppdata.bad_count =
+	    ppdata.res_count = 0;
+
+	pptimer = get_timer("Post-processing","postprocessing",false);
+	memcpytimer = get_timer("Memory copy",NULL,false);
+
+#ifdef OBSOLETE
+	ppdata.dup_count = 0;
+#endif
+
+	if(p = get_value(r,"GRIB",0))
+	{
+		ppdata.original_grib = EQ(p,"ORIGINAL");
+	}
+
+	if(mars_postproc && !(atol(mars_postproc)))
+	{
+		*proc = no_postproc;
+	} 
+	else if(fetch(r))
+	{
+		*proc = no_postproc;
+	}
+	else if (feedback(r) || bias(r))
+	{
+		*proc = no_postproc;
+	}
+	else if (is_netcdf(r))
+	{
+		*proc = no_postproc;
+	}
+	else if (is_odb(r))
+	{
+#ifdef ODB_SUPPORT
+		/* Filter */
+		const char *filter = get_value(r, "FILTER", 0);
+		ppdata.odb_sql = NULL;
+		if(filter)
+			ppdata.odb_sql = strcache(filter);
+
+		marslog(LOG_DBUG,"filter is: %s",ppdata.odb_sql);
+		*proc = odb_postproc;
+#else
+		marslog(LOG_EROR,"This MARS client doesn't support ODB");
+		marslog(LOG_EROR,"Please, contact the MARS team");
+		*proc = no_postproc;
+#endif
+
+	}
+	else if (track(r))
+	{
+		long time_count;
+		long date_count;
+
+		/* Ident */
+
+		if(ppdata.idents) FREE(ppdata.idents);
+
+		if(ppdata.ident_cnt = count_values(r,"IDENT"))
+			ppdata.idents = NEW_ARRAY(int,ppdata.ident_cnt);
+
+		for(i = 0;i<ppdata.ident_cnt;i++)
+		{
+			const char *p = no_quotes(get_value(r,"IDENT",i));
+			int ident;
+			int n = 0;
+
+			if(p) n = strlen(p);
+
+			/* Tropical cyclones have a alph num ident */
+			char buf[8];
+			int j;
+
+			ident = 0;
+			sprintf(buf,"%s",p);
+			for(j=0;j<n;j++)
+			{
+				if(islower(buf[j])) buf[j] = toupper(buf[j]);
+				ident = ident * 10 + (buf[j] - '0');
+			}
+
+			ppdata.idents[i] = ident;
+			marslog(LOG_DBUG,"Requested ident %d: %s [%s]. Internal representation: %d",i,p,buf,ident);
+		}
+
+		/* Types */
+
+		if(ppdata.types) FREE(ppdata.types);
+
+		if(ppdata.type_cnt = count_values(r,"OBSTYPE"))
+		{
+			int zero = 0;
+			ppdata.types = NEW_ARRAY(int,ppdata.type_cnt);
+			for(i = 0;i<ppdata.type_cnt;i++)
+			{
+				ppdata.types[i] = atoi(get_value(r,"OBSTYPE",i));
+				if(ppdata.types[i] == 0) zero++;
+			}
+
+			if(zero > 0 && ppdata.type_cnt != zero)
+			{
+				marslog(LOG_WARN,
+				    "Cannot mix types and subtypes when retrieving tracks");
+				marslog(LOG_WARN, "Only corresponding types will be returned");
+			}
+
+			if(zero) ppdata.type_cnt = 0;
+		}
+
+		/* Time  */
+
+		if(ppdata.intervals) 
+			FREE(ppdata.intervals);
+
+		time_count =  count_values(r,"TIME");
+		date_count =  count_values(r,"DATE");
+		ppdata.interval_cnt = time_count * date_count;	
+
+		ppdata.intervals = NEW_ARRAY(time_interval, ppdata.interval_cnt);
+		for (i = 0; i < date_count; i++)
+		{
+			int j;
+			long date = get_julian_from_request(r,i);
+			for (j = 0; j < time_count; j++)
+			{
+				long time = atol(get_value(r,"TIME",j));
+				double dt = date_time_2_datetime(date,
+											time / 100,
+											time % 100,
+											0);
+				ppdata.intervals[i*time_count+j].begin = dt;
+				ppdata.intervals[i*time_count+j].end   = dt;
+			}
+		}
+
+		/* Area ... */
+		ppdata.area_cnt  = count_values(r,"AREA");
+		if(ppdata.area_cnt == 4)
+		{
+			ppdata.north = atof(get_value(r,"_AREA_N",0))*100000.0+9000000.0;
+			ppdata.south = atof(get_value(r,"_AREA_S",0))*100000.0+9000000.0;
+			ppdata.east  = atof(get_value(r,"_AREA_E",0))*100000.0+18000000.0;
+			ppdata.west  = atof(get_value(r,"_AREA_W",0))*100000.0+18000000.0;
+			ppdata.east %= 36000000;
+			ppdata.west %= 36000000;
+		}
+
+		*proc = track_postproc;
+	}
+	else if(observation(r))
+	{
+		long time_count;
+		long date_count;
+		const char *p;
+
+		ppdata.is_bufrfile = feedback(r) || bias(r);
+
+		/* Ident */
+
+		if(ppdata.idents) FREE(ppdata.idents);
+
+		if(ppdata.ident_cnt = count_values(r,"IDENT"))
+			ppdata.idents = NEW_ARRAY(int,ppdata.ident_cnt);
+
+		for(i = 0;i<ppdata.ident_cnt;i++)
+		{
+			const char *p = get_value(r,"IDENT",i);
+			int ident;
+
+			if(is_number(p))
+				ident = atoi(p);
+			else {
+				/* Ships have a alph num ident */
+				char buf[8];
+				int j;
+
+				ident = 0;
+				sprintf(buf,"%-5s",p);
+				for(j=0;j<5;j++)
+				{
+					if(islower(buf[j])) buf[j] = toupper(buf[j]);
+					ident = ident * 10 + (buf[j] - '0');
+				}
+
+			}
+
+			ppdata.idents[i] = ident;
+		}
+
+		/* Instruments */
+		if(ppdata.instruments) FREE(ppdata.instruments);
+
+		if(ppdata.instrument_cnt = count_values(r,"INSTRUMENT"))
+			ppdata.instruments = NEW_ARRAY(fortint,ppdata.instrument_cnt);
+
+		for(i = 0;i<ppdata.instrument_cnt;i++)
+			ppdata.instruments[i] = atoi(get_value(r,"INSTRUMENT",i));
+
+		/* Types */
+
+		if(ppdata.types) FREE(ppdata.types);
+
+		if(ppdata.type_cnt = count_values(r,"OBSTYPE"))
+		{
+			int zero = 0;
+			ppdata.types = NEW_ARRAY(int,ppdata.type_cnt);
+			for(i = 0;i<ppdata.type_cnt;i++)
+			{
+				ppdata.types[i] = atoi(get_value(r,"OBSTYPE",i));
+				if(ppdata.types[i] == 0) zero++;
+			}
+
+			if(zero > 0 && ppdata.type_cnt != zero)
+			{
+				marslog(LOG_WARN,
+				    "Cannot mix types and subtypes when retrieving observations");
+				marslog(LOG_WARN, "Only corresponding types will be returned");
+			}
+
+			if(zero) ppdata.type_cnt = 0;
+		}
+
+		/* WMO block */
+
+		if(ppdata.blocks) FREE(ppdata.blocks);
+
+		if(ppdata.block_cnt = count_values(r,"BLOCK"))
+			ppdata.blocks = NEW_ARRAY(int,ppdata.block_cnt);
+
+		for(i = 0;i<ppdata.block_cnt;i++)
+			ppdata.blocks[i] = atoi(get_value(r,"BLOCK",i));
+
+
+		/* Time  */
+
+		if(ppdata.intervals) 
+			FREE(ppdata.intervals);
+
+		time_count =  count_values(r,"TIME");
+		date_count =  count_values(r,"DATE");
+		ppdata.interval_cnt = time_count * date_count;	
+
+		/* if the time/to/time is not expanded in this version */
+		if (time_count == 3 && (strcmp(get_value(r,"TIME",1),"TO") == 0))
+		{
+			long time1 = atoi(get_value(r,"TIME",0));
+			long time2 = atoi(get_value(r,"TIME",2));
+			ppdata.intervals = NEW_ARRAY(time_interval,
+									date_count);
+			for (i = 0; i < date_count; i++)
+			{
+				long date = get_julian_from_request(r,i);
+				ppdata.intervals[i].begin = 
+						date_time_2_datetime(date,time1 / 100,
+											time1 % 100,
+											0);
+				ppdata.intervals[i].end = 
+						date_time_2_datetime(date,time2 / 100,
+											time2 % 100,
+											59);
+			}
+			ppdata.interval_cnt = date_count;
+		}
+		else
+		{
+			long range = 0;
+			if (count_values(r,"RANGE") != 0)
+				range = atol(get_value(r,"RANGE",0));
+			ppdata.intervals = NEW_ARRAY(time_interval,
+							ppdata.interval_cnt);
+			for (i = 0; i < date_count; i++)
+			{
+				int j;
+				long date = get_julian_from_request(r,i);
+				for (j = 0; j < time_count; j++)
+				{
+					long time = atol(get_value(r,"TIME",j));
+					double dt = date_time_2_datetime(date,
+											time / 100,
+											time % 100,
+											0);
+					init_time_interval(&ppdata.intervals[i*time_count+j],
+										dt,range * 60 + 59);
+				}
+			}
+		}
+
+		/* Area ... */
+		ppdata.area_cnt  = count_values(r,"AREA");
+		if(ppdata.area_cnt == 4)
+		{
+			ppdata.north = atof(get_value(r,"_AREA_N",0))*100000.0+9000000.0;
+			ppdata.south = atof(get_value(r,"_AREA_S",0))*100000.0+9000000.0;
+			ppdata.east  = atof(get_value(r,"_AREA_E",0))*100000.0+18000000.0;
+			ppdata.west  = atof(get_value(r,"_AREA_W",0))*100000.0+18000000.0;
+			ppdata.east %= 36000000;
+			ppdata.west %= 36000000;
+		}
+
+#ifdef OBSOLETE
+		p = get_value(r,"DUPLICATES",0);
+		ppdata.no_duplicates = p && (*p == 'R');
+#endif
+
+		/* ppinfo(); */
+
+		*proc = obs_postproc;
+	}
+	else if(image(r) || simulated_image(r))
+		*proc = no_postproc;
+	else if(gridded_observations(r) && !mars.gridded_observations_postproc)
+		*proc = no_postproc;
+	else {
+		/* Check for vector parameters */
+		boolean vector = vector_parameter_requested(r);
+		*proc = grib_postproc;
+		ppdata.estimate = 0;
+
+		if(!gridded_observations(r))
+			mars.gridded_observations_postproc = 1;
+
+		/* By default, copy edition from intput to output: edition=0*/
+		ppdata.edition = 0;
+		if(p = get_value(r,"FORMAT",0))
+		{
+			if(EQ(p,"GRIB1")) ppdata.edition = 1;	
+			if(EQ(p,"GRIB2")) ppdata.edition = 2;	
+			marslog(LOG_WARN,"Format conversion not enabled");
+
+#if 0
+			if(ppdata.edition > 0)
+			{
+				marslog(LOG_DBUG,"ppout: setting edition to %d",ppdata.edition);
+				ret  = ppout("edition",ppdata.edition,array,0);
+				if(ret) return ret;
+			}
+#endif
+
+		}
+
+		/* set grid */
+
+		if(get_value(r,"_GRID_EW",0))
+		{
+
+			array[0] = atof(get_value(r,"_GRID_EW",0));
+			array[1] = atof(get_value(r,"_GRID_NS",0));
+			ret      = ppout("grid",n,array,0);
+			if(ret) return ret;
+			ppdata.estimate = (360.0/array[0] + 1) * (180.0 / array[1] + 1);
+		}
+
+		/* set area */
+
+		if(get_value(r,"_AREA_N",0))
+		{
+			array[0] = atof(get_value(r,"_AREA_N",0));
+			array[1] = atof(get_value(r,"_AREA_W",0));
+			array[2] = atof(get_value(r,"_AREA_S",0));
+			array[3] = atof(get_value(r,"_AREA_E",0));
+
+			/* If AREA not specified (0/0/0/0), don't call intout to avoid
+			   interpolation sw. to be called when no post-processing is
+			   required */
+			if(!(array[0] == 0 && array[1] == 0 && array[2] == 0 && array[3] == 0))
+			{
+				ret = ppout("area",n,array,0);
+				if(ret) return ret;
+			}
+		}
+
+		/* set frame */
+		if(get_value(r,"FRAME",0))
+		{
+			n = atoi(get_value(r,"FRAME",0));
+			ret  = ppout("frame",n,array,0);
+			if(ret) return ret;
+		}
+
+		/* set bitmap */
+		if(get_value(r,"BITMAP",0))
+		{
+			const char *bitmap = no_quotes(get_value(r,"BITMAP",0));
+			marslog(LOG_DBUG,"bitmap file is: '%s'",bitmap);
+			ret  = ppout("bitmap",n,array,bitmap);
+			if(ret) return ret;
+		}
+
+		/* gaussian */
+
+		if(get_value(r,"_GAUSSIAN",0))
+		{
+			long guess;
+			const char *gaussian = "GAUSSIAN";
+			const char *g = get_value(r,"GAUSSIAN",0);
+			const char *oldgauss = getenv("MARS_REGULAR_GRID");
+
+			if(g != NULL)
+			{
+				gaussian = g;
+			}
+
+			n    = atoi(get_value(r,"_GAUSSIAN",0));
+
+			if(oldgauss && atoi(oldgauss))
+			{
+				gaussian  = "REGULAR";
+				marslog(LOG_WARN,"Please, specify new keyword ");
+				marslog(LOG_WARN,"GAUSSIAN=REGULAR in your request");
+			}
+
+			ret  = ppout((char *)lowcase(gaussian),n,array,0);
+			if(ret) return ret;
+			guess = n * n * 8;
+			if( guess > ppdata.estimate ) ppdata.estimate = guess;
+		}
+
+		/* Interpolation */
+		
+		if(get_value(r,"INTERPOLATION",0))
+		{
+			const char *method  = get_value(r,"INTERPOLATION",0);
+
+			if(strcmp(method,"NEAREST NEIGHBOUR") == 0)
+				method = "nearest neighbour";
+			else if(strcmp(method,"NEAREST LSM") == 0)
+				method = "nearest lsm";
+			else if(strcmp(method,"BILINEAR") == 0)
+				method = "bilinear";
+			else
+			{
+				marslog(LOG_WARN,"Ignoring unknown interpolation method '%s'",method);
+				method = NULL;
+			}
+
+			if(method)
+			{
+				ret = ppout("interpolation",n,array,method);
+				if(ret) return ret;
+			}
+		}
+
+		/* Auto Resolution */
+
+		if(get_value(r,"RESOL",0))
+		{
+			const char *trunc = get_value(r,"RESOL",0);
+			if(trunc)
+			{
+				if(EQ(trunc,"AUTO"))
+				{
+					if(mars.autoresol)
+					{
+						marslog(LOG_DBUG,"Using Auto-Resolution");
+						ret = ppout("autoresol",1,array,0);
+						if(ret) marslog(LOG_EROR,"Auto Resolution error %d",ret);
+					}
+				}
+				if(trunc[0] == 'N')
+				{
+					n    = atoi(trunc+1);
+					marslog(LOG_DBUG,"Using GG double interpolation to %d",n);
+					ret = ppout("intermediate_gaussian",n,array,0);
+					if(ret) marslog(LOG_EROR,"Double interpolation error %d",ret);
+				}
+			}
+
+		}
+
+		/* truncation */
+
+		if(get_value(r,"_TRUNCATION",0))
+		{
+			long guess;
+			const char *trunc = get_value(r,"_TRUNCATION",0);
+
+			n  = atoi(trunc);
+			ret     = ppout("truncation",n,array,0);
+			ret     = ppin("truncation",n,array,0); 
+
+			marslog(LOG_DBUG,"Setting truncation to %d",n);
+			guess = (n+1)*(n+4);
+			if( guess > ppdata.estimate ) ppdata.estimate = guess;
+		}
+
+		/* style */
+		if(get_value(r,"STYLE",0))
+		{
+			ret = ppstyle(r);
+			if(ret) return ret;
+		}
+
+		/* rotation */
+		if(get_value(r,"_ROTATION_LAT",0) || get_value(r,"_ROTATION_LON",0))
+		{
+			ret = pprotation(r);
+			if(ret) return ret;
+
+			if(vector)
+				*proc = grib_vector_postproc;
+
+		}
+
+		/* accuracy */
+
+		if(mars.accuracy > 0)
+		{
+			marslog(LOG_DBUG,"ppout: Using %d bit packing",mars.accuracy);
+			ret  = ppout("accuracy",mars.accuracy,array,0);
+			if(ret) return ret;
+		}
+
+#if 0
+		/* land-sea mask */
+		if(get_value(r,"LSM",0))
+		{
+			const char *lsm = no_quotes(get_value(r,"LSM",0));
+			marslog(LOG_DBUG,"Using LSM from '%s'",lsm);
+			ret  = ppin("islscp",n,array,lsm);
+			if(ret) return ret;
+		}
+		else
+		{
+			 marslog(LOG_DBUG,"Setting LSM to 'off'");	
+			 ret  = ppin("islscp",n,array,"off");
+			 if(ret) return ret;
+		}
+#endif
+
+		/* packing */
+		if(get_value(r,"PACKING",0))
+		{
+			const char *packing = no_quotes(get_value(r,"PACKING",0));
+			marslog(LOG_DBUG,"Packing set to '%s'",packing);
+			ret  = ppout("packing",n,array,lowcase(packing));
+			if(ret) return ret;
+		}
+
+		/* specification */
+		if(get_value(r,"SPECIFICATION",0)) 
+		{
+			const char *spec = get_value(r,"SPECIFICATION",0);
+			marslog(LOG_DBUG,"Specification set to '%s'",spec);
+			n = atoi(spec);
+			ret  = ppout("specification",n,array,0);
+			if(ret) return ret;
+		}
+
+		/* ppdata.estimate contains the number of point, we need 
+		the header and sizeof(fortint) bytes per value */
+
+		if(ppdata.estimate)
+			ppdata.estimate = ppdata.estimate * sizeof(fortint) + 4096;
+
+	}
+	return 0;
+}
+
+err ppdone(void)
+{
+	if(!ppdata.busy) marslog(LOG_EROR,"Post-processing package already closed");
+	ppdata.busy  = 0;
+	ppdata.quiet = 0;
+#ifdef OBSOLETE
+	delete_node(ppdata.top);
+	ppdata.top   = 0;
+	if(ppdata.dup_count)
+		marslog(LOG_INFO,"%d duplicates reports",ppdata.dup_count);
+#endif
+	if(ppdata.res_count)
+		marslog(LOG_DBUG,"%d restricted reports found",ppdata.res_count);
+
+	if(ppdata.inter_cnt)
+	{
+		char host[80];
+		char s[1024] = "";
+		gethostname(host,sizeof(host));
+		if(mars.show_hosts)
+			sprintf(s,"on '%s'",host);
+		marslog(LOG_INFO,"%d field%s ha%s been interpolated %s",
+			ppdata.inter_cnt,
+				ppdata.inter_cnt==1?"":"s",
+				ppdata.inter_cnt==1?"s":"ve",
+				s);
+	}
+	log_statistics("interpolated","%d",ppdata.inter_cnt);
+		
+	return 0;
+}
+
+err ppcount(int *in,int *out)
+{
+	if(ppdata.bad_count)
+	{
+		marslog(LOG_WARN,"%d report(s) have a wrong length in their key.",
+			ppdata.bad_count);
+		marslog(LOG_WARN,"Please inform Mars group");
+	}
+	*in  = ppdata.in_count;
+	*out = ppdata.out_count;
+	return 0;
+}
+
+/*========================================================================*/
+/*========================================================================*/
+/*========================================================================*/
+
+fieldset *pp_fieldset(const char *file,request *filter)
+{
+	fieldset *v = read_fieldset(file,filter);
+	fieldset *w = NULL;
+	err e = 0;
+	int i;
+	postproc proc;
+
+	if(!v) return NULL;
+	if(e = ppinit(filter,&proc)) {
+		marslog(LOG_EROR,"Interpolation initialisation failed (%d)",e);
+		ppdone();
+		return NULL;
+	}
+
+
+	w = new_fieldset(v->count);
+
+	for(i=0;i<v->count && e == 0;i++)
+	{
+		field *g   = get_field(v,i,packed_mem);
+		/* On Rotation, output header can be bigger than 
+		   the input header. Give a bit of space */
+		long len   = MAX(g->length+5*sizeof(fortint),ppestimate());
+		const void *ibuff = NULL;
+		size_t ibuff_len;
+		char *obuff = (char*)reserve_mem(len);
+		size_t ilen = len;
+		
+		grib_get_message(g->handle,&ibuff,&ibuff_len);
+		e =  ppintf((char *)ibuff,g->length,obuff,&len,true);
+
+		release_field(g);
+
+		if(e == 0)
+		{
+			g = w->fields[i] = new_field();
+			g->handle = grib_handle_new_from_message_copy(0,obuff, len);
+			g->shape  = packed_mem;
+			g->length = len;
+			g->refcnt++;
+			save_fieldset(w);
+		}
+
+		release_mem(obuff);
+	}
+
+	ppdone();
+
+	return e == 0?w:NULL;
+}
diff --git a/src/libMars/proto.h b/src/libMars/proto.h
new file mode 100755
index 0000000..d89daa2
--- /dev/null
+++ b/src/libMars/proto.h
@@ -0,0 +1,727 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/* tcp.c */
+void socket_buffers(int s);
+int writetcp(void *p, void *buf, u_int len);
+boolean tcp_read_ready(int soc);
+int readtcp(void *p, void *buf, u_int len);
+boolean is_hostname(const char *host);
+void traceroute(struct sockaddr_in *from);
+int call_server(const char *host, int port, int retries);
+int socket_close(int s);
+int socket_file_close(FILE *f);
+
+/* server.c */
+struct sockaddr_in *addr_of(int soc);
+int tcp_server(int port);
+const char *host_of(struct sockaddr_in *from);
+int port_of(struct sockaddr_in *from);
+void print_address(const char *name, struct sockaddr_in *from);
+void server_run(int port, taskproc task, void *data);
+int server_mode(int *port, char *address);
+
+/* udp.c */
+int readudp(void *p, void *buf, u_int len);
+int writeudp(void *p, void *buf, u_int len);
+int udp_socket(int port);
+udpinfo *udp_server(int port);
+udpinfo *udp_call(const char *host, int port);
+void udp_free(udpinfo *info);
+
+/* service.c */
+err encode_request(const request *r, XDR *x);
+request *decode_request(XDR *x);
+void destroy_service(svc *s);
+err svc_connect(svc *s);
+svc *create_service(const char *name);
+void set_svc_err(svcid *id, err e);
+err get_svc_err(svcid *id);
+void set_svc_ref(svcid *id, long r);
+long get_svc_ref(svcid *id);
+const char *get_svc_target(svcid *id);
+const char *get_svc_source(svcid *id);
+const char *get_svc_msg(svcid *id, int n);
+void set_svc_msg(svcid *id, char *fmt, ...);
+err send_drop_info(svc *s, char *target, request *r, long ref);
+err send_message(svc *s, request *r);
+err send_progress(svcid *id, const char *msg, request *r);
+int fork_service(svcid *id);
+err send_reply(svcid *id, request *r);
+err send_later(svcid *id);
+err send_number_reply(svcid *id, double d);
+err send_string_reply(svcid *id, char *p);
+err call_switchboard(svc *s, request *r);
+err call_service(svc *s, const char *target, const request *r, long ref);
+request *wait_service(svc *s, char *target, request *r, err *e);
+err call_function(svc *s, const char *target, const request *r, long ref);
+void keep_alive(svc *s, int alive);
+void stop_all(svc *s, const char *p, int code);
+void set_maximum(svc *s, int max);
+void exit_timeout(svc *s, int timeout);
+void add_progress_callback(svc *s, const char *name, svcproc p, void *data);
+void add_reply_callback(svc *s, const char *name, svcproc p, void *data);
+void add_drop_callback(svc *s, const char *name, svcproc p, void *data);
+void add_message_callback(svc *s, const char *name, svcproc p, void *data);
+void add_function_callback(svc *s, const char *name, svcproc p, const char *cmt, argdef *args, void *data);
+void add_input_callback(svc *s, FILE *f, inputproc p, void *data);
+void add_service_callback(svc *s, const char *name, svcproc p, void *data);
+boolean service_ready(svc *s);
+err re_dispatch(svcid *id, request *r);
+err process_service(svc *s);
+int service_sync(svc *s);
+void service_run(svc *s);
+request *pool_fetch(svc *s, const char *name, const char *clss);
+void pool_store(svc *s, const char *name, const char *clss, const request *r);
+void pool_link(svc *s, const char *name1, const char *name2);
+void pool_link_objects(svc *s, request *r);
+void recording(svc *s, boolean on);
+void support_recording(svc *s);
+void record_request(svc *s, char *name, request *r);
+void record_function(svc *s, const char *name, argdef *args, va_list list);
+void record_line(svc *s, const char *fmt, ...);
+void show_help_page(svc *s, const char *page, char *topic);
+void show_help_text(svc *s, const char *page, const char *topic, const char *fmt, ...);
+void show_help_file(svc *s, const char *page, const char *topic, const char *file);
+request *get_preferences(svc *s, const char *name);
+void set_preferences(svc *s, request *r, const char *name);
+
+/* queue.c */
+err encode_netblk(XDR *x, netblk *blk);
+err decode_netblk(XDR *x, netblk *blk);
+void free_netblk(netblk *blk);
+err qmonitor(char *fmt, ...);
+err qenter(request *r);
+err qleave(void);
+err qslave(int port);
+err qsync(void);
+err qflush(int code);
+
+/* request.c */
+void str2range(const char *l, stepRange *r);
+void patch_steprange(request *r);
+boolean eq_range(const char *l, const char *r);
+void paramtable(const char *p, long *param, long *table, boolean paramIdMode);
+boolean eq_param(const char *l, const char *r);
+boolean eq_string(const char *l, const char *r);
+boolean eq_integer(const char *l, const char *r);
+boolean eq_real(const char *l, const char *r);
+boolean eq_coord(const char *l, const char *r);
+boolean eq_null(const char *l, const char *r);
+boolean eq_date(const char *l, const char *r);
+boolean eq_time(const char *l, const char *r);
+boolean eq_default(const char *l, const char *r);
+char **mars_order(void);
+int mars_order_count(void);
+namecmp compare_parameters(const char *name);
+boolean parsetime(const char *name, int *h, int *m, int *s);
+boolean parsedate(const char *name, long *julian, long *second, boolean *isjul);
+boolean isdate(const char *name);
+boolean istime(const char *name);
+boolean is_integer(const char *name);
+boolean is_number(const char *name);
+boolean isrange(const char *name);
+long julian_to_date(long jdate, boolean century);
+long today(void);
+long date_to_julian(long ddate);
+void check_for_to_by_list(parameter *p);
+long get_julian_from_request(const request *req, int i);
+boolean fetch(const request *r);
+boolean observation(const request *r);
+boolean image(const request *r);
+boolean simulated_image(const request *r);
+boolean gridded_observations(const request *r);
+boolean feedback(const request *r);
+boolean bias(const request *r);
+boolean track(const request *r);
+boolean is_bufr(const request *r);
+boolean is_netcdf(const request *r);
+boolean is_odb(const request *r);
+boolean is_grib(const request *r);
+boolean wave2d(const request *r);
+parameter *find_parameter(const request *r, const char *parname);
+parameter *find_case_parameter(const request *r, const char *parname);
+boolean value_exist(const request *r, const char *param, const char *val);
+int count_values(const request *r, const char *parname);
+const char *get_value(const request *r, const char *parname, int nth);
+const char *case_get_param(const request *r, const char *parname);
+const char *case_get_value(const request *r, const char *parname, int nth);
+int case_count_values(const request *r, const char *parname, int nth);
+const char *get_operator(const request *r, const char *parname, int nth);
+void unset_value(request *r, const char *parname);
+void set_value(request *r, const char *parname, const char *fmt, ...);
+void set_value_int(request *r, const char *p, long64 v);
+void add_value_int(request *r, const char *p, long64 v);
+void set_list(request *r, const char *parname, const char *plist);
+void add_unique_value(request *r, const char *parname, const char *fmt, ...);
+void add_ordered_value(request *r, const char *parname, const char *fmt, ...);
+void add_unique_ordered_value(request *r, const char *parname, const char *fmt, ...);
+void add_value(request *r, const char *parname, const char *fmt, ...);
+void set_value_long64(request *r, const char *parname, long64 l);
+void add_value_long64(request *r, const char *parname, long64 l);
+const char *request_verb(const request *r);
+void values_loop(const request *r, int count, char *parnames[], loopproc callback, void *data);
+request *new_request(char *name, parameter *p);
+request *empty_request(const char *name);
+parameter *new_parameter(char *name, value *v);
+value *new_value(char *name);
+value *new_expansion(value *val);
+value *new_reference(const char *refname, char *name);
+void save_one_request(FILE *f, const request *r);
+void save_all_requests(FILE *f, const request *r);
+void print_one_request(const request *r);
+void print_all_requests(const request *r);
+request *read_request_file(const char *fname);
+request *unwind_one_request(const request *r);
+request *custom_unwind_one_request(const request *r, int cnt, char *names[]);
+void names_loop(const request *r, loopproc proc, void *data);
+boolean all_is_used(const request *r);
+int count_fields(request *r);
+int count_fields_in_request(request *r);
+int reqcmp(const request *a, const request *b, boolean verbose);
+int field_order(const request *r, const request *u);
+void valcpy(request *a, request *b, char *aname, char *bname);
+void reqcpy(request *a, const request *b);
+void reqmerge(request *a, const request *b);
+void unset_param_value(request *r, const char *param, const char *par_val);
+request *string2request(const char *p);
+void value2string(value *r, char *buf);
+void parameter2string(parameter *r, char *buf);
+char *request2string(const request *r);
+request *mars_language(void);
+rule *mars_rules(void);
+request *build_mars_request(request *r);
+request *read_mars_request(const char *fname);
+err handle_default(request *r, void *data);
+void add_subrequest(request *r, const char *name, const request *s);
+void set_subrequest(request *r, const char *name, const request *s);
+request *get_subrequest(const request *r, const char *name, int n);
+void notify_missing_field(const request *r, const char *name);
+void sort_request(const request *r, int count, char *names[], char *vals[], void *data);
+int count_requests(const request *r);
+
+/* expand.c */
+void free_one_value(value *p);
+void free_all_values(value *p);
+void free_one_parameter(parameter *p);
+void free_all_parameters(parameter *p);
+void free_one_request(request *r);
+void free_all_requests(request *p);
+value *clone_one_value(const value *p);
+value *clone_all_values(const value *p);
+parameter *clone_one_parameter(const parameter *p);
+parameter *clone_all_parameters(const parameter *p);
+request *clone_one_request(const request *r);
+request *clone_all_requests(const request *p);
+void update_step_list(int p, int n, int by, value *v);
+void check_for_date(parameter *p, value *r);
+void check_for_time(parameter *p, value *r);
+request *read_language_file(const char *name);
+long expand_flags(long flags);
+request *expand_all_requests(request *lang, rule *test, const request *r);
+void reset_language(request *lang);
+request *closest_verb(request *lang, const char *name);
+parameter *closest_parameter(request *lang, const char *name);
+void loopuk_language(request *lang, const char *v, const char *p, lookupproc c, void *d);
+request *trim_all_requests(request *lang, request *r);
+request *expand_mars_request(const request *r);
+request *mars_language_from_request(const request *r);
+void copy_to_ibm_values(request *r, const char *name);
+void move_to_ibm_values(request *source, request *dest, const char *name);
+
+/* calc.c */
+func *mars_functions(void);
+void print_math(math *m);
+math *clone_math(math *m);
+math *compmath(const char *formula);
+void free_math(math *m);
+err calculate(math *c, const char *f, void *data);
+err handle_compute(request *r, void *data);
+
+/* hidden.c */
+request *un_first_guess(const request *r);
+request *un_first_guess_all(const request *r);
+void ensemble_to_number(request *r);
+err add_hidden_parameters(request *r);
+void patch_ranges(request *r);
+
+/* environ.c */
+void add_groups(const char *u, request *r);
+boolean user_in_ABC_account(const char *user, const char *account, const request *env);
+request *get_environ(void);
+void set_environ(request *e);
+void new_user(const char *u);
+
+/* check.c */
+void print_conditions(condition *c);
+boolean old_expver_func(request *r, char *n, char *a);
+boolean call_func(request *c, char *f, char *a);
+boolean condition_check(request *c, condition *t);
+rule *read_check_file(const char *fname);
+void print_actions(action *a);
+void print_rules(rule *r);
+boolean doaction(rule *c, request *r, action *a);
+boolean check_one_request(rule *c, request *r);
+rule *new_rule(condition *c, action *a);
+condition *new_condition(testop op, condition *l, condition *r);
+action *new_action(actop op, void *parm);
+condition *clone_condition(condition *c);
+void free_action(action *a);
+void free_condition(condition *c);
+void free_rule(rule *r);
+
+/* hypercube.c */
+int axisindex(const char *name);
+namecmp comparator(const char *name);
+void print_hypercube_index(const hypercube *h);
+int cube_order(const hypercube *h, const request *r);
+int _cube_position(const hypercube *h, const request *r, boolean remove_holes);
+boolean cube_contains(const hypercube *h, const request *r);
+void cube_indexes(const hypercube *h, request *r, int *indexes, int size);
+hypercube *new_hypercube(const request *r);
+int add_field_to_hypercube(hypercube *h, request *r);
+int remove_field_from_hypercube(hypercube *h, request *r, int n);
+void remove_name_from_hypercube(hypercube *h, const char *ignore);
+void print_hypercube(const hypercube *h);
+void free_hypercube(hypercube *h);
+request *_get_cubelet(hypercube *h, int index);
+request *get_cubelet(hypercube *h, int index);
+request *next_cubelet(hypercube *h, int *from, int *last);
+hypercube *merge_cube(const hypercube *a, const hypercube *b, int init, int va, int vb);
+hypercube *new_hypercube_from_mars_request(const request *r);
+hypercube *new_simple_hypercube_from_mars_request(const request *r);
+hypercube *new_hypercube_from_fieldset_cb(fieldset *fs, void (*callback )(request *, void *), void *data);
+hypercube *new_hypercube_from_fieldset(fieldset *fs);
+hypercube *new_hypercube_from_file(const char *path);
+hypercube *add_cube(const hypercube *a, const hypercube *b);
+hypercube *remove_cube(const hypercube *a, const hypercube *b);
+int hypercube_field_count(const hypercube *a);
+int hypercube_cube_size(const hypercube *a);
+int hypercube_compare(const hypercube *a, const hypercube *b);
+
+/* hash.c */
+void hash_stat(void);
+char *strcache(const char *name);
+void strfree(char *name);
+
+/* memory.c */
+int getpagesize(void);
+void mem_exit_on_failure(boolean n);
+void *re_alloc(void *p, int size);
+char *new_string(const char *p);
+void *get_mem(int size);
+void *get_mem_clear(int size);
+void *free_mem(void *x);
+void *fast_new(int s, mempool *pool);
+void *fast_realloc(void *p, int s, mempool *pool);
+void fast_delete(void *p, mempool *pool);
+void *reserve_mem(int s);
+void release_mem(void *p);
+void memory_info(void);
+void *fast_new(int s, mempool *pool);
+void *fast_realloc(void *p, int s, mempool *pool);
+void fast_delete(void *p, mempool *pool);
+void fast_memory_info(const char *title, mempool *pool);
+void memory_info(void);
+void *reserve_mem(int s);
+void release_mem(void *p);
+int purge_mem(void);
+void install_memory_proc(memproc proc, void *data);
+void remove_memory_proc(memproc proc, void *data);
+
+/* tools.c */
+boolean init_process(void);
+long64 proc_mem(void);
+long64 proc_mem(void);
+long64 proc_mem(void);
+double proc_cpu(void);
+const char *user(void);
+err mars_compress(void *in, void *out, long inlen, long *outlen);
+err mars_uncompress(void *in, void *out, long inlen, long *outlen);
+const char *no_quotes(const char *in);
+int casecompare(const char *a, const char *b);
+void start_timer(void);
+char *timename(double t);
+double stop_timer(char *text);
+clock_t timer_cpu(void);
+const char *bytename(double bytes);
+int mkdirp(const char *path, int mode);
+const char *makepath(const char *dname, const char *fname);
+const char *mbasename(const char *fname);
+const char *dirname(const char *fname);
+int deletefile(const char *name);
+int movefile(const char *from, const char *to);
+int copylink(const char *from, const char *to);
+int copydata(const char *from, const char *to);
+int copydir(const char *from, const char *to);
+int copyfile(const char *from, const char *to);
+const char *relpath(const char *from, const char *to);
+void dumpenv(void);
+int faccess(const char *fname, int flags);
+const char *lowcase(const char *p);
+const char *upcase(const char *p);
+void print_environment(FILE *f);
+FILE *mail_open(const char *to, char *fmt, ...);
+void notify_user(const char *what, const request *r);
+FILE *mail_once(const char *mark, const char *to, char *fmt, ...);
+void mail_msg(FILE *f, char *fmt, ...);
+void mail_request(FILE *f, const char *msg, const request *r);
+void mail_close(FILE *f);
+const char *real_name(const char *fname);
+void nfs_lookup(const char *fname, char *host, char *path);
+boolean if_check(const char *host);
+boolean if_check(const char *p);
+void check_nfs_target(const char *path);
+long grib_length(const char *buffer, long length);
+void mars_grib_api_init(void);
+long _readany(FILE *f, char *b, long *l);
+long _readgrib(FILE *f, char *b, long *l);
+long _readbufr(FILE *f, char *b, long *l);
+void touch(const char *path);
+time_t age(const char *path);
+long preferred_IO_blocksize(const char *path, long base);
+double round_decimal(double f);
+long64 atoll(const char *str);
+void print_memory_usage(char *s);
+void check_emoscycle(void);
+void check_precision(void);
+
+/* list.c */
+boolean in_list(marslist *l, const char *name, void *data);
+void add_to_list(marslist **l, const char *name, void *data);
+
+/* timer.c */
+timer *get_timer(const char *name, const char *statname, boolean elapsed);
+int timer_start(timer *t);
+int timer_stop(timer *t, long64 total);
+double timer_value(timer *t);
+void timer_print_to_file(timer *t, FILE *f);
+void timer_print(timer *t);
+void timer_partial_rate(timer *t, double start, long64 total);
+void print_all_timers(void);
+void reset_all_timers(void);
+int timed_fread(char *buffer, int n, int length, FILE *f, timer *t);
+int timed_wind_next(wind *w, FILE *f, char *buffer, long *length, timer *t);
+int timed_fwrite(char *buffer, int n, int length, FILE *f, timer *t);
+int timed_fclose(FILE *f, timer *t);
+int timed_writetcp(void *data, char *buffer, int n, timer *t);
+int timed_readtcp(void *data, char *buffer, int n, timer *t);
+int timed_readany(FILE *f, char *buffer, long *length, timer *t);
+
+/* logfile.c */
+void marsdebug(boolean on);
+FILE *marslogfile(FILE *f);
+void mars_grib_api_log(const grib_context *c, int level, const char *msg);
+void marslog(int level, char *fmt, ...);
+void log_errors(void);
+void install_exit_proc(exitproc p, void *data);
+void remove_exit_proc(exitproc p, void *data);
+void _marsexit(void);
+void marsexit(int code);
+void dumpmem(void);
+
+/* options.c */
+void get_options(const char *clss, const char *name, void *addr, int count, option opts[]);
+char *progname(void);
+void trap_all_signals(void);
+void marsinit(int *argc, char **argv, void *addr, int count, option opts[]);
+const char *config_file(const char *p);
+
+/* files.c */
+char *marstmp(void);
+
+/* stream.c */
+void stream_write_char(mstream *s, char c);
+void stream_write_uchar(mstream *s, unsigned char c);
+void stream_write_int(mstream *s, int c);
+void stream_write_uint(mstream *s, unsigned int c);
+void stream_write_long(mstream *s, long c);
+void stream_write_ulong(mstream *s, unsigned long c);
+void stream_write_longlong(mstream *s, long64 n);
+void stream_write_ulonglong(mstream *s, ulong64 n);
+void stream_write_double(mstream *s, double x);
+void stream_write_short(mstream *s, short c);
+void stream_write_ushort(mstream *s, unsigned short c);
+void stream_write_string(mstream *s, const char *p);
+void stream_write_blob(mstream *s, const void *d, long len);
+void stream_write_start(mstream *s, const char *p);
+void stream_write_end(mstream *s);
+char stream_read_char(mstream *s);
+unsigned char stream_read_uchar(mstream *s);
+int stream_read_int(mstream *s);
+unsigned int stream_read_uint(mstream *s);
+long stream_read_long(mstream *s);
+unsigned long stream_read_ulong(mstream *s);
+short stream_read_short(mstream *s);
+unsigned short stream_read_ushort(mstream *s);
+const char *stream_read_string(mstream *s);
+const void *stream_read_blob(mstream *s, long *size);
+long64 stream_read_longlong(mstream *s);
+ulong64 stream_read_ulonglong(mstream *s);
+const char *stream_read_start(mstream *s);
+void stream_read_end(mstream *s);
+void make_socket_stream(mstream *s, int *soc);
+void make_file_stream(mstream *s, FILE *f);
+
+/* cos.c */
+COSFILE *cos_open(const char *fname);
+int cos_read(COSFILE *cf, char *buf, long *len);
+int cos_write(COSFILE *cf, char *buf, long len);
+int cos_close(COSFILE *cf);
+void COSOPEN(COSFILE **filedesc, char *fname, long *e);
+void COSCLOSE(COSFILE **filedesc, long *e);
+void COSREAD(COSFILE **filedesc, char *buffer, long *len, long *e);
+
+/* time.c */
+datetime date_time_2_datetime(long julian_date, long hour, long min, long sec);
+datetime key_2_datetime(const packed_key *keyptr);
+void init_time_interval(time_interval *t, datetime begin, long range);
+
+/* guess.c */
+char *guess_class(const char *file);
+
+/* statistics.c */
+err locked_write(const char *fname, char *str, long len);
+void init_statistics(const request *r, const request *e);
+void log_statistics(const char *name, char *fmt, ...);
+void log_statistics_unique(const char *name, char *fmt, ...);
+void flush_statistics(const request *r, const request *env);
+void test_statistics(void);
+
+/* metadata.c */
+request *read_request(mstream *s);
+
+/* free.c */
+err encode_free_format(void *buffer, long *length, const request *r, const void *blob, long bloblen);
+request *decode_free_format_request(void *buffer, long length);
+long decode_free_format_blob(void *buffer, long length, void *blob, long max);
+err encode_free_format_grib(unsigned char *bin, unsigned char *bout, fortint *length, fortint maxlen, request *r, int marsclass, int type, int stream, char *expver);
+err decode_free_format_grib(unsigned char *bin, unsigned char *bout, fortint *length, fortint maxlen, request *r);
+err original_grib(char *bin, fortint *length);
+
+/* index.c */
+void mars_grib_index_add(mars_grib_index *idx, const char *name, boolean s_ok, const char *s, boolean l_ok, long l, boolean d_ok, double d);
+mars_grib_index *mars_grib_index_new(file_offset offset, long length);
+err mars_grib_index_send(mars_grib_index *idx, mstream *s);
+void mars_grib_index_free(mars_grib_index *idx);
+void mars_grib_index_print(mars_grib_index *idx);
+
+/* base.c */
+base_class *base_class_by_name(const char *name);
+database *database_of(void *data);
+const char *database_name(void *data);
+err database_validate(base_class *driver, const char *name, request *r, request *e, int mode);
+database *database_open(base_class *driver, const char *name, request *r, request *e, int mode);
+err database_read(database *b, request *r, void *buffer, long *length);
+err database_write(database *b, request *r, void *buffer, long *length);
+err database_control(database *b, int code, void *param, int size);
+err database_archive(database *b, request *r);
+boolean database_check(database *b, request *r);
+err database_close(database *b);
+void database_admin(base_class *driver);
+
+/* netbase.c */
+void basetask(int soc, int count, void *data);
+
+/* nullbase.c */
+
+/* handler.c */
+err handle_request(request *r, void *data);
+err handle_end(request *r, void *data);
+
+/* nfdbbase.c */
+boolean windgust(request *s);
+void request_to_fdb(int ref, request *r, int y2k);
+
+/* msbase.c */
+
+/* gribbase.c */
+
+/* filebase.c */
+
+/* dhsbase.c */
+int find_long(long *p, int count, long search);
+
+/* flatfilebase.c */
+
+/* target.c */
+char *target_open_mode(const char *target);
+err send_remote_targets(void);
+
+/* feedtask.c */
+void feedtask(int soc, int count, void *data);
+
+/* rdb.c */
+
+/* multibase.c */
+
+/* cachebase.c */
+
+/* webbase.c */
+
+/* odbbase.c */
+
+/* archive.c */
+err feed(database *bout, request *r);
+err handle_archive(request *r, void *data);
+
+/* retrieve.c */
+boolean enough(request *r, int count);
+request *findbase(const char *name);
+database *openbase(request *s, request *r, const char **name, request **cache, int mode);
+void mars_task(void);
+err handle_retrieve(request *r, void *data);
+
+/* control.c */
+err handle_control(request *r, void *data);
+
+/* remove.c */
+err handle_remove(request *r, void *data);
+
+/* grib.c */
+err handle_to_request(request *r, grib_handle *g, mars_grib_index *idx);
+err grib_to_request_index(request *r, char *buffer, long length, mars_grib_index *idx);
+err grib_to_request(request *r, char *buffer, long length);
+
+/* pproc.c */
+err ppstyle(const request *r);
+err pprotation(const request *r);
+err pparea(request *r);
+err vector_postproc(ppbuffer_t *pp, long *nbuffer);
+err makeuv(char *vo, char *d, long inlen, char *u, char *v, long *outlen);
+long ppestimate(void);
+long emoscycle(void);
+err ppinit(const request *r, postproc *proc);
+err ppdone(void);
+err ppcount(int *in, int *out);
+fieldset *pp_fieldset(const char *file, request *filter);
+
+/* wind.c */
+wind *wind_new(request *r, long64 *total);
+void wind_free(wind *w);
+boolean is_wind(long param);
+err wind_next(wind *w, FILE *f, char *buffer, long *length, timer *t);
+
+/* ocean.c */
+int grib_ocean_fix_section_1(gribsec1 *s1, request *r);
+
+/* multidef.c */
+int decode_multi_local_definition_190(gribsec1 *s1, request *r, char *grib);
+int decode_multi_local_definition(gribsec1 *s1, request *r, char *grib);
+
+/* bufr.c */
+unsigned long getbits(unsigned char *p, int skip, int len);
+unsigned long key_length(const char *buffer, const packed_key *k);
+void set_key_length(packed_key *key, unsigned long keylength);
+boolean get_packed_key(char *buffer, packed_key *k);
+boolean get_packed_section_1(char *buffer, packed_section_1 *section);
+int subset_count(char *buffer);
+int bufr_sat_id(char *buffer, packed_key *k);
+void set_bufr_sat_id(char *buffer, int id, packed_key *k);
+boolean replace_key(char *buffer, packed_key *key);
+boolean patch_key_date(char *buffer, int y, int m, int d, int H, int M, int S);
+boolean patch_key_ident(char *buffer, int ident);
+boolean patch_key_length(char *buffer, unsigned int new_value);
+boolean shift_packed_key_ident(char *buffer);
+void set_bufr_mars_type(request *r, const packed_key *key);
+err bufr_to_request(request *r, char *buffer, long length);
+boolean verify_bufr_key(const char *buffer, long length, const packed_key *key);
+void print_key_date(const packed_key *keyptr, char *s);
+void print_key_time(const packed_key *keyptr, char *s);
+int build_packed_key(char *buffer, fortint length, packed_key *k);
+void print_packed_key(char *buffer, packed_key *k);
+
+/* field.c */
+gribfile *new_gribfile(const char *name);
+FILE *open_gribfile(gribfile *g, const char *mode);
+void close_gribfile(gribfile *g);
+void free_gribfile(gribfile *g);
+field_request *new_field_request(request *r);
+void free_field_request(field_request *g);
+void free_field(field *g);
+void free_fieldset(fieldset *v);
+field *new_field(void);
+fieldset *new_fieldset(int n);
+field *read_field(gribfile *file, file_offset pos, long length);
+err add_field(fieldset *v, field *g);
+err set_field(fieldset *v, field *g, int pos);
+err check_fieldset(fieldset *v, int expect);
+field *copy_field(field *gx, boolean copydata);
+void copy_bitmap(field *gc, field *ga, field *gb);
+void remove_bitmap(field *gc);
+fieldset *copy_fieldset(fieldset *x, int count, boolean copydata);
+fieldset *merge_fieldsets(fieldset *x, fieldset *y);
+fieldset *sub_fieldset(fieldset *v, int from, int to, int step);
+int best_packing(fortint current);
+void set_field_state(field *g, field_state shape);
+field *get_field(fieldset *v, int n, field_state shape);
+field *get_nonmissing_field(fieldset *v, field_state shape);
+void inform_missing_fieldset(const char *name);
+void release_field(field *g);
+const void *field_message(field *g, long *s);
+err write_field(FILE *f, field *g);
+err save_fieldset(fieldset *v);
+fieldset *read_fieldset(const char *fname, request *filter);
+fieldset *request_to_fieldset(request *r);
+request *fieldset_to_request(fieldset *v);
+request *fieldset_to_mars_request(fieldset *fs);
+request *field_to_request(field *f);
+
+/* variable.c */
+err push_scalar(double d);
+err push_named_scalar(char *name, double d);
+err push_fieldset(fieldset *f);
+err push_named_fieldset(char *name, fieldset *f);
+err push(variable *v);
+variable *pop(void);
+variable *stack_top(void);
+variable *find_variable(const char *name);
+err name_variable(variable *v, char *name);
+variable *new_variable(const char *name, fieldset *f, double d);
+void free_variable(variable *v);
+
+/* externf.c */
+err extern_func(math *p);
+
+/* sh2ll.c */
+err write_fieldset(fieldset *v, database *b);
+err handle_read(request *r, void *data);
+err handle_write(request *r, void *data);
+
+/* account.c */
+err ams_validate(request *r, request *e);
+err ecmwf_validate(request *r, request *e);
+int eccert_validate(request *r, request *e);
+err null_validate(request *r, request *e);
+err validate_request(request *r, request *e, const char *method);
+
+/* authenticate.c */
+boolean handle_restriction(request *req, request *r, request *reply, void *data);
+err local_validate_request(request *req, request *env);
+void print_user_restrictions(request *env, request *auth);
+
+/* certify.c */
+err certify(request *r, request *e, char *data, int length);
+
+/* eccert.c */
+char *verify_ecmars_certificate(char *data, int len, char *marsCert, int marsCertLen, eCMarsCertReply *reply);
+
+/* restricted.c */
+int restricted(void *p);
+
+/* version.c */
+long marsversion(void);
+long marsemoscycle(void);
+const char *marssourcebranch(void);
+long marsgribapi(void);
+long marsodbapi(void);
+
+/* schedule.c */
+boolean check_dissemination_schedule(request *user, request *env, boolean logstat);
diff --git a/src/libMars/queue.c b/src/libMars/queue.c
new file mode 100644
index 0000000..66711bb
--- /dev/null
+++ b/src/libMars/queue.c
@@ -0,0 +1,304 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "queue.h"
+#include <setjmp.h>
+#include <signal.h>
+
+
+#ifdef ECMWF
+static XDR xmon;
+static udpinfo *udpmon = 0;
+static netblk blk = { 0,};
+#endif
+
+static jmp_buf env;
+
+static void catch_alarm(int sig)
+{
+	longjmp(env,1);
+}
+
+
+err encode_netblk(XDR *x,netblk* blk)
+{
+	x->x_op = XDR_ENCODE;
+
+	if(!xdr_netblk(x,blk))
+	{
+		/* marslog(LOG_WARN,"encode_request : xdr_netblk"); */
+		return -2;
+	}
+
+	if(!xdrrec_endofrecord(x,true))
+	{
+		/* marslog(LOG_WARN,"encode_request : xdrrec_endofrecord"); */
+		return -2;
+	}
+
+	return 0;
+}
+
+err decode_netblk(XDR *x,netblk *blk)
+{
+
+	bzero(blk,sizeof(netblk));
+	x->x_op = XDR_DECODE;
+
+	if(!xdrrec_skiprecord(x))
+	{
+		/* marslog(LOG_WARN,"decode_request : xdrrec_skiprecord"); */
+		return -2;
+	}
+
+	if(!xdr_netblk(x, blk))
+	{
+		/* marslog(LOG_WARN,"decode_request : xdr_netblk"); */
+		return -2;
+	}
+
+	return 0;
+}
+
+void free_netblk(netblk *blk)
+{
+	xdr_free((xdrproc_t) xdr_netblk, (char *) blk);
+	bzero(blk,sizeof(netblk));
+}
+
+static void flush_queue(int code,void *data)
+{
+	qflush(code);
+}
+
+static err queue(int code,request *r,char *cinfo,long ninfo)
+{
+#ifdef AMS
+	return 0;
+#endif
+#ifndef ECMWF
+	return 0;
+#else
+	static request *q = 0;
+	int more;
+	int maxtry = 10;
+	int try    = 0;
+
+	if(mars.request_id == -1) return -1;
+
+
+	if(setjmp(env) != 0) return -1;
+
+	signal(SIGALRM,catch_alarm);
+	alarm(20);
+
+	if(!q) {
+		q = empty_request("QUEUE");
+#ifdef METVIEW
+		set_value(q,"PROGRAM","metview");
+#else
+		set_value(q,"PROGRAM","%s",progname());
+#endif
+		install_exit_proc(flush_queue,0);
+	}
+
+	if(!udpmon)
+	{
+		udpmon = udp_call(mars.monhost,mars.monport);
+		xdrrec_create(&xmon,0,0,(mxdrparam)udpmon,
+		    (mxdrproc)readudp,(mxdrproc)writeudp);
+	}
+
+	more = 1;
+	while(more && try++ < maxtry )
+	{
+		static int check = 0;
+		int ok = 1;
+		struct timeval start;
+
+		bzero(&blk,sizeof(blk));
+		set_value(q,"REQID","%ld",mars.request_id);
+		set_value(q,"CINFO","%s",cinfo?cinfo:"");
+		set_value(q,"NINFO","%ld",ninfo);
+		blk.code = code;
+		q->next = r;
+		blk.req = q;
+		blk.check = ++check;
+
+		more = 0;
+
+		if(code == Q_ENTER || code == Q_SLAVE)
+			blk.env = get_environ();
+
+		gettimeofday(&start,0);
+
+		ok = 1;
+		if(encode_netblk(&xmon,&blk) != 0)
+			ok = 0;
+	
+		while(ok)
+		{
+			if(decode_netblk(&xmon,&blk) != 0)
+				ok   = 0;
+			else if(blk.check == check) /* we got the right one ... */
+			{
+				const char *p;
+				int i = 0;
+				struct timeval stop;
+				struct timeval diff;
+
+				gettimeofday(&stop,0);
+
+				diff.tv_sec  = stop.tv_sec  - start.tv_sec;
+				diff.tv_usec = stop.tv_usec - start.tv_usec;
+
+				while(diff.tv_usec < 0)
+				{
+					diff.tv_sec--;
+					diff.tv_usec += 1000000;
+				}
+
+				/* update timeout to 100% more */
+				udpmon->timeout.tv_sec  = diff.tv_sec  * 2;
+				udpmon->timeout.tv_usec = diff.tv_usec * 2;
+
+				while (udpmon->timeout.tv_usec >= 1000000)
+				{
+					diff.tv_sec++;
+					diff.tv_usec -= 1000000;
+				}
+
+				i = 0;
+				while(p = get_value(blk.req,"MESSAGE",i++))
+					marslog(LOG_INFO,"%s",p);
+
+				switch(blk.code)
+				{
+
+				case Q_ENTER:
+					more = 1;
+					/* try  = 0; */
+					code = Q_ENTER;
+					break;
+
+				case Q_CONT:
+					break;
+
+				case Q_WAIT:
+					marslog(LOG_EXIT,"Waiting %d minutes...", blk.check);
+					sleep(blk.check*60);
+					more = 1;
+					/* try  = 0; */
+					code = Q_CHECK;
+					break;
+
+				case Q_DIE:
+					marslog(LOG_EXIT,"Request aborted by operators");
+					break;
+
+				default:
+					marslog(LOG_WARN,
+					    "Unexpected code received from queue manager %d",blk.code);
+					break;
+				}
+
+				break;
+			}
+			else if(blk.check < check) /* we receive older replies ....*/
+				;
+			else if(blk.check > check)
+			{
+				marslog(LOG_WARN,"Something is strange in the queue manager!");
+				ok = 0;
+			}
+			free_netblk(&blk);
+		}
+
+		if(!ok) {
+			/* increase timeout */
+			udpmon->timeout.tv_usec += 1000000/2;     /* 1/2 sec */
+			while(udpmon->timeout.tv_usec >= 1000000)
+			{
+				udpmon->timeout.tv_usec -= 1000000;
+				udpmon->timeout.tv_sec++;
+			}
+
+#if 0
+			/* server IP address may have changed */
+			if(try > maxtry/2)
+			{
+				udp_free(udpmon);
+				udpmon = udp_call(mars.monhost,mars.monport);
+			}
+
+#endif
+			/* this is important to do, to get rid of incomplete messages */
+
+			xdr_destroy(&xmon);
+			xdrrec_create(&xmon,0,0,(mxdrparam)udpmon,
+			    (mxdrproc)readudp,(mxdrproc)writeudp);
+
+
+		}
+
+	}
+
+	alarm(0);
+
+	if(try >= maxtry)
+	{
+		marslog(LOG_WARN,"Mars queue manager on %s, port %d is not available",
+		    mars.monhost,mars.monport);
+		return -1;
+	}
+
+	return 0;
+#endif
+}
+
+err qmonitor(char *fmt,...)
+{
+	va_list list;
+
+	char buf[1024];
+
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	/* call queue */
+	return queue(Q_CHECK,0,buf,0);
+}
+
+err qenter(request *r)
+{
+	return queue(Q_ENTER,r,0,0);
+}
+
+err qleave(void)
+{
+	return queue(Q_LEAVE,0,0,0);
+}
+
+err qslave(int port)
+{
+	return queue(Q_SLAVE,0,0,port);
+}
+
+err qsync(void)
+{
+	return queue(Q_SYNC,0,0,0);
+}
+
+err qflush(int code)
+{
+	return queue(Q_FLUSH,0,0,code);
+}
diff --git a/src/libMars/queue.h b/src/libMars/queue.h
new file mode 100644
index 0000000..8d40486
--- /dev/null
+++ b/src/libMars/queue.h
@@ -0,0 +1,21 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#define Q_ENTER 1
+#define Q_LEAVE 2
+#define Q_CHECK 3
+
+#define Q_CONT  5
+#define Q_WAIT  6
+#define Q_DIE   7
+
+#define Q_SLAVE 8
+#define Q_SYNC  9
+#define Q_FLUSH 10
diff --git a/src/libMars/remove.c b/src/libMars/remove.c
new file mode 100644
index 0000000..5ed3e5f
--- /dev/null
+++ b/src/libMars/remove.c
@@ -0,0 +1,70 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+/*
+
+M.Fuentes
+ECMWF Jul-97
+
+Exactly the same as 'handle_control', but it does not
+fail if one of the databases succeded
+
+*/
+
+#include <errno.h>
+#include "mars.h"
+
+err handle_remove(request *r,void *data)
+{
+	const char *s = get_value(r,"DATABASE",0);
+
+	if(s == 0)
+	{
+		marslog(LOG_EROR,"%s needs DATABASE set",request_verb(r));
+		return -5;
+	}
+	else
+	{
+		err e = 0;
+		int i = 0;
+		int success = 0;
+
+		while( s = get_value(r,"DATABASE",i++) )
+		{
+			const char *name  = 0;
+			request    *cache = 0;
+			database   *bout  = 0;
+
+			request    *b    = findbase(s);
+			if(!b) return -2;
+
+			bout = openbase(b,r,&name,&cache,READ_MODE);
+			if(!bout)
+				e = -1;
+			else
+			{
+				e = database_control(bout,CNTL_REMOVE,r,0);
+				database_close(bout);
+				if(e)
+					marslog(LOG_WARN,"REMOVE failed for database '%s'",name);
+				else
+				{
+					marslog(LOG_INFO,"REMOVE performed on database '%s'",name);
+					success++;
+				}
+			}
+		}
+
+		return (success>0)?NOERR:-2;
+	}
+
+	/*NOTREACHED*/
+	return 0;
+}
diff --git a/src/libMars/request.c b/src/libMars/request.c
new file mode 100755
index 0000000..df48c31
--- /dev/null
+++ b/src/libMars/request.c
@@ -0,0 +1,2673 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include "mars.h"
+#include "lang.h"
+
+/* This function should not exist, only for historical reasons.
+   Once everybody uses ranges, it can dissapear */
+static void days2range(const char *l, stepRange* r, boolean waves, boolean sfc)
+{
+	long step = atol(l);
+	switch(step)
+	{
+		case 507:              /* In grib header 132-168 */
+			/* r->from = 120; */
+			r->from = 132;
+			r->to   = 168;
+			break;
+		case 710:              /* In grib header 180-240 */
+			/* r->from = 168; */
+			r->from = 180;
+			r->to   = 240;
+			break;
+		case 510:              /* In grib header 132-240 */
+			/* r->from = 120; */
+			r->from = 132;
+			r->to   = 240;
+			break;
+		case 607:              /* In grib header 120-168 */
+			if(sfc && mars.no_special_fp)
+				r->from = 120;
+			else
+				r->from =  144;
+			r->to   = 168;
+			break;
+		case 810:              /* In grib header 168-240 */
+			if(sfc && mars.no_special_fp)
+				r->from = 168;
+			else
+				r->from = 192;
+			r->to   = 240;
+			break;
+		case 610:              /* In grib header 120-240 */
+			if(sfc && mars.no_special_fp)
+				r->from = 120;
+			else
+				r->from = 144;
+			r->to   = 240;
+			break;
+		case 1015:
+			if(sfc && mars.no_special_fp)
+				r->from = 240;
+			else
+				r->from = 252;
+			r->to = 360;
+			break;
+		case 1115:
+			r->from = 264;
+			r->to = 360;
+			break;
+		default:
+			marslog(LOG_WARN,"Unknown range of days %ld",step);
+	}
+/*
+	if(waves)
+		r->from += 12;
+*/
+}
+
+/* Converts a string into a range when '-' found */
+void str2range(const char *l, stepRange* r)
+{
+	const char *p = l+strlen(l);
+	r->from  = 0;
+	r->to    = atol(l);
+
+	/* If there's a -, process it as a range */
+	/* COME BACK HERE */
+	while(p>l)
+	{
+		if(*p == '-' || *p == ':')
+		{
+			++p;
+			r->from = atol(l);
+			r->to   = atol(p);
+			break;	
+		}
+		--p;
+	}
+}
+
+void patch_steprange(request *r)
+{
+	const char *type = get_value(r,"TYPE",0);
+
+	if(type && EQ(type,"FA"))
+	{
+		int i = 0;
+		int n = count_values(r,"STEP");
+		request *s = empty_request("EMPTY");
+		for(i = 0; i<n; ++i)
+		{
+			const char *prev = get_value(r,"STEP",i);
+			stepRange range;
+
+			if(EQ(prev,"ALL"))
+			{
+				add_value(s,"STEP","ALL");
+			}
+			else
+			{
+				str2range(prev,&range);
+				add_value(s,"STEP","%ld-%ld",range.from,range.to);
+			}
+		}
+		valcpy(r,s,"STEP","STEP");
+		free_all_requests(s);
+	}
+
+	if(type && EQ(type,"FP"))
+	{
+		int i = 0;
+		int n = count_values(r,"STEP");
+		request *s = empty_request("EMPTY");
+		for(i = 0; i<n; ++i)
+		{
+			const char *prev = get_value(r,"STEP",i);
+
+			/* Change syntax fromdaytoday into fromstep-tostep */
+			if((strlen(prev) == 4) && !isrange(prev))
+			{
+				const char *stream = get_value(r,"STREAM",0);
+				const char *levtype = get_value(r,"LEVTYPE",0);
+				boolean waves = (stream && (strcmp(stream,"WAEF")==0));
+				boolean sfc = (levtype && (strcmp(levtype,"SFC")==0));
+				stepRange range;
+				days2range(prev,&range, waves, sfc);
+				marslog(LOG_DBUG,"patch_steprange: convert step '%s' into '%ld-%ld'",prev,range.from,range.to);
+				add_value(s,"STEP","%ld-%ld",range.from,range.to);
+			}
+			else
+			{
+				marslog(LOG_DBUG,"patch_steprange: keep step '%s'",prev);
+				add_value(s,"STEP","%s",prev);
+			}
+		}
+		valcpy(r,s,"STEP","STEP");
+		free_all_requests(s);
+	}
+}
+
+boolean eq_range(const char *l, const char *r)
+{
+	stepRange lrange, rrange;
+
+	if(l && r)
+	{
+		str2range(l,&lrange);
+		str2range(r,&rrange);
+
+		marslog(LOG_DBUG,"Compared range [%ld,%ld] and [%ld,%ld]",
+				lrange.from,lrange.to,rrange.from,rrange.to);
+
+		return ((lrange.from == rrange.from) && (lrange.to == rrange.to));
+	}
+
+	return false;
+}
+
+#define NO_TABLE -1
+#define NO_PARAM  0
+
+void paramtable(const char *p, long *param, long *table, boolean paramIdMode)
+{
+	const char *q = p;
+	int len = strlen(p);
+
+	*param = atol(p);
+
+	while(p && (*p != '.') && ((p-q)<len))
+		++p;
+
+	if((*p == '.'))
+		*table = atol(++p);
+
+/* This version is grib_api... It should rely on what grib_api returns,
+   either param.table or paramId
+*/
+	if(paramIdMode)
+	{
+		/* Special case for param=228015 => 15.228 */
+		if((*param != NO_PARAM) && (*table == NO_TABLE) && (len==6))
+		{
+			p = q;
+			char tbl[4];
+			char par[4];
+			strncpy(tbl,p,3); tbl[3]='\0';
+			strncpy(par,p+3,3); par[3]='\0';
+			*param = atol(par);
+			*table = atol(tbl);
+			marslog(LOG_DBUG,"Translate %s => param=%ld, table=%ld",p,*param,*table);
+		}
+	}
+}
+
+
+boolean eq_param(const char *l, const char *r)
+{
+	if(l && r)
+	{
+		long lpar = NO_PARAM;
+		long ltable = NO_TABLE;
+		long rpar = NO_PARAM;
+		long rtable = NO_TABLE;
+
+		paramtable(l,&lpar,&ltable,true);
+		paramtable(r,&rpar,&rtable,true);
+		
+		if((ltable != NO_TABLE) && (rtable != NO_TABLE) && (ltable!=rtable))
+			return false;
+
+		return (lpar == rpar);
+	}
+	return false;
+}
+
+boolean eq_string(const char *l, const char *r)
+{
+	if(l && r)
+		return l == r;
+	return false;
+}
+
+boolean eq_integer(const char *l, const char *r)
+{
+	if(l && r)
+		return atol(l) == atol(r);
+	return false;
+}
+
+boolean eq_real(const char *l, const char *r)
+{
+	if(l && r)
+		return atof(l) == atof(r);
+	return false;
+}
+
+boolean eq_coord(const char *l, const char *r)
+{
+	if(l && r)
+	{
+		if(EQ(l,r)) return true;
+
+#ifndef linux
+		return round_decimal(atof(l)) == round_decimal(atof(r));
+#else
+/* 
+   Warning: This code optimized on linux (-O1,2,3) gives rounding errors while
+            calling routine round_decimal. If the code is included here, the 
+			error dissapears.
+
+*/
+		{
+			double ld = atof(l);
+			double rd = atof(r);
+			double x;
+
+			ld = ((long)((1000.0 * ld) + 0.5)) / 1000.0;
+			rd = ((long)((1000.0 * rd) + 0.5)) / 1000.0;
+			x = ld - rd;
+			marslog(LOG_DBUG,"%g, l=%s, r=%s",x,l,r);
+
+			return x == 0;
+		}
+#endif
+	}
+	return false;
+}
+
+boolean eq_null(const char *l, const char *r)
+{
+	return true;
+}
+
+static long name_to_date(const char *, boolean ,boolean* );
+static boolean get_date_parts(const char* name,int *year, int* month, int* day);
+
+boolean eq_date(const char *l, const char *r)
+{
+	if(l && r)
+	{
+		boolean isjul = false;
+		long lndate;
+		long rndate;
+
+		/* marslog(LOG_INFO,"eq_date(%s,%s)",l,r); */
+
+		if(isalpha(l[0]) || isalpha(r[0])) 
+		{
+			int ly = 0,lm = 0,ld = 0;
+			int ry = 0,rm = 0,rd = 0;
+			int lp = get_date_parts(l,&ly,&lm,&ld);
+			int rp = get_date_parts(r,&ry,&rm,&rd);
+
+			/* marslog(LOG_INFO,"eq_date(%d,%d)",lp,rp); */
+
+
+			if(lp && !rp) {
+				rndate = julian_to_date(name_to_date(r,false,&isjul), mars.y2k);
+				if(ld) { rd = rndate % 100; }
+				if(lm) { rm = (rndate/100) % 100; }
+			}
+
+			if(!lp && rp) {
+				lndate = julian_to_date(name_to_date(l,false,&isjul), mars.y2k);
+				if(rd) { ld = lndate % 100; }
+				if(rm) { lm = (lndate/100) % 100; }
+			}
+
+			return (ly == ry) && (lm == rm) && (ld == rd);
+
+		}
+
+		/* What is that ? */
+#if 0
+		if((strlen(l) == 5) || (strlen(r) == 5))
+		{
+			char tmp1[80];
+			char tmp2[80];
+			int i,j;
+
+			const char *t1 = l;
+			const char *t2 = r;
+
+
+			i = 0; while(*t1 && i < 10) { if(isdigit(*t1)) tmp1[i++] = *t1; t1++; }; tmp1[i] = 0;
+			j = 0; while(*t2 && j < 10) { if(isdigit(*t2)) tmp2[j++] = *t2; t2++; }; tmp2[j] = 0;
+			
+			if(mars.debug)
+				marslog(LOG_DBUG,"eq_date: %s(%s) %s %s(%s)",l , tmp1, 
+					(strcmp(tmp1+i-4,tmp2+j-4)==0)?" == ":" != ",r,tmp2);
+
+			return (strcmp(tmp1+i-4,tmp2+j-4) == 0);
+		}
+#endif
+
+		lndate = name_to_date(l,false,&isjul);
+		rndate = name_to_date(r,false,&isjul);
+
+
+		if(mars.debug)
+			marslog(LOG_DBUG,"eq_date: %ld %s %ld",lndate,lndate==rndate?" == ":" != ",rndate);
+
+		return lndate==rndate;
+	}
+	return false;
+}
+
+boolean eq_time(const char *l, const char *r)
+{
+	if(l && r)
+		return atol(l) == atol(r);
+	return false;
+}
+
+boolean eq_default(const char *l, const char *r)
+{
+	boolean ok = false;
+	/* printf("eq_default %s %s\n",l,r); */
+	
+	if(!l || !r)
+		return false;
+
+	if(is_number(r))
+	{
+		if(atof(l) == atof(r))
+			ok = true;
+	}
+	else 
+		if(EQ(l,r))
+			ok = true;
+	return ok;
+}
+
+
+/* Keep in sync with 'names' below ... */
+
+#define DATE_INDIX	0
+#define TIME_INDIX	2
+#define STEP_INDIX	4
+
+/* Used, among other things (??), for field ordering
+   in a fieldset */
+static char *names[] = {
+
+	"DATE",
+	"HDATE",
+	"TIME",
+
+	"REFERENCE",
+	"STEP",
+	"VERIFY",
+	"FCMONTH",
+	"FCPERIOD",
+	"LEADTIME",
+	"OPTTIME",
+
+	"EXPVER",
+	"ORIGIN",
+	"DOMAIN",
+	"METHOD",
+
+	"DIAGNOSTIC",
+	"ITERATION",
+
+	"NUMBER",
+	"QUANTILE",
+
+	"LEVELIST",
+	"LATITUDE",
+	"LONGITUDE",
+	"RANGE",
+
+	"PARAM",
+
+	"IDENT",
+	"OBSTYPE",
+	"REPORTYPE",
+
+	 /* For 2-d wave-spectra products */
+	"FREQUENCY",
+	"DIRECTION",
+
+	/* For EA, EF */
+	"CHANNEL",
+
+};
+
+char** mars_order()
+{
+	return names;
+}
+
+int mars_order_count()
+{
+	return NUMBER(names);
+}
+
+static namecmp cmpnames[] = {
+	eq_default,   /* DATE */
+	eq_default,   /* HDATE */
+	eq_default,   /* TIME */
+	eq_default,   /* REFERENCE */
+
+	eq_range,     /* STEP */
+	eq_default,   /* VERIFY */
+	eq_default,   /* FCMONTH */
+	eq_range,     /* FCPERIOD: It's like step range */
+	eq_range,     /* LEADTIME */
+	eq_range,     /* OPTTIME */
+
+	eq_default,   /* EXPVER */
+
+	eq_string,    /* ORIGIN */
+	eq_string,    /* DOMAIN */
+	eq_integer,   /* METHOD */
+	eq_integer,   /* DIAGNOSTIC */
+	eq_integer,   /* ITERATION */
+
+	eq_integer,   /* NUMBER */
+	eq_range,     /* QUANTILE */
+
+	eq_real,      /* LEVELIST */
+	eq_real,      /* LATITUDE */
+	eq_real,      /* LONGITUDE */
+	eq_default,   /* RANGE */
+
+	eq_param,     /* PARAM */
+
+	eq_integer,   /* IDENT */
+	eq_integer,   /* OBSTYPE */
+	eq_integer,   /* REPORTYPE */
+
+	eq_integer,   /* FREQUENCY */
+	eq_integer,   /* DIRECTION */
+
+	eq_integer,   /* CHANNEL */
+};
+
+static char *names2[] = {
+
+	"CLASS",
+	"STREAM",
+	"TYPE",
+	"LEVTYPE",
+	"PRODUCT",
+	"SECTION",
+};
+
+static namecmp cmpnames2[] = {
+	eq_string, /* CLASS */
+	eq_string, /* STREAM */
+	eq_string, /* TYPE */
+	eq_string, /* LEVTYPE */
+	eq_string, /* PRODUCT */
+	eq_string, /* SECTION */
+};
+
+
+namecmp compare_parameters(const char *name)
+{
+	int i = 0;
+	for(i = 0 ; i < NUMBER(cmpnames) ; i++)
+		if(EQ(name,names[i]))
+			return cmpnames[i];
+
+	for(i = 0 ; i < NUMBER(cmpnames2) ; i++)
+		if(EQ(name,names2[i]))
+			return cmpnames2[i];
+
+	marslog(LOG_WARN,"No comparator for %s",name);
+	return eq_string;
+}
+
+
+#define CASEEQ(a,b) (strcasecmp(a,b)==0)
+
+static const char *parse1(const char *p,int* x,int *n)
+{
+	*x = *n = 0;
+	while(*p && isdigit(*p))
+	{
+		(*x) *= 10;
+		(*x) += *p - '0';
+		(*n)++;
+		*p++;
+	}
+	return p;
+}
+
+
+boolean parsetime(const char *name,int* h,int *m,int* s)
+{
+	const char *p = name;
+	int n;
+	int H=0,M=0,S=0;
+
+	/* hour */
+
+	p = parse1(p,&H,&n);
+	if(n != 0)
+	{
+		if(n != 2) return false;
+
+		/* minute */
+		if(*p++ != ':') return false;
+
+		p = parse1(p,&M,&n);
+		if(n != 2) return false;
+
+		if(*p != 0)
+		{
+			/* second */
+
+			if(*p++ != ':') return false;
+			p = parse1(p,&S,&n);
+			if(n != 2) return false;
+		}
+	}
+
+	*h = H;
+	*m = M;
+	*s = S;
+
+	return *p == 0 ? true : false;
+}
+
+boolean parsedate(const char *name,long* julian,long *second,boolean* isjul)
+{
+	const char *p = name;
+	int n;
+	int y=0,m=0,d=0,H=0,M=0,S=0;
+
+	*julian = *second = 0;
+	*isjul = false;
+
+	if(p == 0 || *p == 0) return false;
+
+	/* year */
+	p = parse1(p,&y,&n);
+	if(n != 2 && n != 4) return false;
+	if(*p++ != '-') return false;
+
+	/* month */
+	p = parse1(p,&m,&n);
+	if(n == 2)
+	{
+		/* day */
+		if(*p++ != '-') return false;
+		p = parse1(p,&d,&n);
+		if(n != 2) return false;
+	}
+	else if(n == 3)
+	{
+	    long j = date_to_julian(y*10000 + 101) + m - 1;
+		j = julian_to_date(j,mars.y2k && !mars.daily_climatology);
+		/* julian day */;
+		d = j % 100;
+		m = (j % 10000)/100;
+		*isjul = true;
+	}
+	else 
+		return false;
+
+	while(*p && isspace(*p)) p++;
+
+	/* hour */
+
+	p = parse1(p,&H,&n);
+	if(n != 0)
+	{
+		if(n != 2) return false;
+
+		/* minute */
+		if(*p++ != ':') return false;
+
+		p = parse1(p,&M,&n);
+		if(n != 2) return false;
+
+		if(*p != 0)
+		{
+			/* second */
+
+			if(*p++ != ':') return false;
+			p = parse1(p,&S,&n);
+			if(n != 2) return false;
+		}
+	}
+
+	*julian = date_to_julian(y*10000 + m*100 + d);
+	*second = H*3600 + M*60 + S;
+
+	return *p == 0 ? true : false;
+
+}
+
+boolean isdate(const char *name)
+{
+	long dummy1,dummy2;
+	boolean dummy3;
+	return parsedate(name,&dummy1,&dummy2,&dummy3);
+}
+
+boolean istime(const char *name)
+{
+	int h,m, s;
+	return parsetime(name,&h,&m,&s);
+}
+
+boolean is_integer(const char *name)
+{
+	const char *p = name;
+	int x,n;
+
+	if(p == 0 || *p == 0) return false;
+
+	if(*p == '-') p++;
+	else if(*p == '+') p++;
+	
+	p = parse1(p,&x,&n); 
+	if(*p) return false;
+
+	return true;
+}
+
+boolean is_number(const char *name)
+{
+	const char *p = name;
+	int x,n;
+
+	if(p == 0 || *p == 0) return false;
+
+	if(*p == '-') p++;
+	else if(*p == '+') p++;
+	
+	p = parse1(p,&x,&n); if(n==0 && *p != '.') return false;
+
+	if(*p == '.') {
+		p++;
+		p = parse1(p,&x,&n);
+	}
+
+	if(*p == 'e' || *p == 'E')
+	{
+		p++;
+		if(*p == '-') p++;
+		else if(*p == '+') p++;
+		p = parse1(p,&x,&n); if(n==0) return false;
+	}
+
+	return *p == 0 ? true : false;
+}
+
+boolean isrange(const char *name)
+{
+	const char *p = name;
+	int x,n;
+
+	if(p == 0 || *p == 0) return false;
+
+	p = parse1(p,&x,&n); if(n==0) return false;
+
+	if(*p != '-' && *p != ':') return false;
+
+	p++;
+	p = parse1(p,&x,&n);
+
+	return *p == 0 ? true : false;
+}
+
+static void count_parval(parameter *p)
+{
+	int n = 0;
+	value *v = p->values;
+
+	while(v)
+	{
+		n++;
+		v = v->next;
+	}
+
+	p->count = n;
+
+}
+
+long julian_to_date(long jdate,boolean century)
+{
+	long x,y,d,m,e;
+	long day,month,year;
+
+	x = 4 * jdate - 6884477;
+	y = (x / 146097) * 100;
+	e = x % 146097;
+	d = e / 4;
+
+	x = 4 * d + 3;
+	y = (x / 1461) + y;
+	e = x % 1461;
+	d = e / 4 + 1;
+
+	x = 5 * d - 3;
+	m = x / 153 + 1;
+	e = x % 153;
+	d = e / 5 + 1;
+
+	if( m < 11 )
+		month = m + 2;
+	else
+		month = m - 10;
+
+
+	day = d;
+	year = y + m / 11;
+
+	if(century)
+		return year * 10000 + month * 100 + day;
+	else
+		return (year % 100) * 10000 + month * 100 + day;
+}
+
+long today(void)
+{
+	static long td = 0;
+	if(td == 0)
+	{
+		time_t now;
+		struct tm *t;
+
+		time(&now);
+
+		t = localtime(&now);
+
+		td = (t->tm_year+1900) * 10000 + (t->tm_mon+1)* 100 + t->tm_mday;
+		td = date_to_julian(td);
+
+	}
+	return td;
+}
+
+long date_to_julian(long ddate)
+{
+	long  m1,y1,a,b,c,d,j1;
+
+	long month,day,year;
+
+	if(ddate <=0)
+	{
+		const char *ref = getenv("MARS_REFERENCE_DATE");
+		if(ref) {
+			long date = atol(ref);
+			date = julian_to_date(date_to_julian(date),mars.y2k);
+			marslog(LOG_WARN,"Using reference date %d",date);
+			return date_to_julian(date) + ddate;
+		}
+		return today() + ddate;
+	}
+
+	year = ddate / 10000;
+	ddate %= 10000;
+	month  = ddate / 100;
+	ddate %= 100;
+	day = ddate;
+
+
+	if (year < 100)
+	{
+		static int first = 1;
+		if(first)
+		{
+			if(mars.y2k)
+			{
+				marslog(LOG_WARN,"** Y2K ALERT ** Dates should be specified with a four digits year");
+				marslog(LOG_WARN,"** Y2K ALERT ** ");
+				marslog(LOG_WARN,"** Y2K ALERT ** Use of two digit year format will be illegal in MARS requests.");
+				marslog(LOG_WARN,"** Y2K ALERT ** For more details see Computer News Sheet Number 359.");
+				marslog(LOG_WARN,"** Y2K ALERT ** ");
+
+				mars.y2k_problem = year;
+				if(!mars.y2k_problem)
+					mars.y2k_problem = -1;
+
+				first = 0;
+			}
+
+		}
+		year = year + 1900;
+	}
+
+	if (month > 2)
+	{
+		m1 = month - 3;
+		y1 = year;
+	}
+	else
+	{
+		m1 = month + 9;
+		y1 = year - 1;
+	}
+	a = 146097*(y1/100)/4;
+	d = y1 % 100;
+	b = 1461*d/4;
+	c = (153*m1+2)/5+day+1721119;
+	j1 = a+b+c;
+
+	return(j1);
+}
+
+static char * months[] = {
+"jan", "feb", "mar", "apr", "may", "jun",
+"jul", "aug", "sep", "oct", "nov", "dec",
+};
+
+static boolean get_date_parts(const char* name,int *year, int* month, int* day)
+{
+	int i;
+	char tmp[80];
+
+	*year = *month = *day;
+
+	int l = strlen(name);
+	switch(l) {
+		case 3:
+			for(i = 0; i < NUMBER(months); i++)
+				if(strcasecmp(name, months[i]) == 0)
+				{
+					*month = i + 1;
+					return true;
+				}
+			break;
+
+		case 6:
+			strncpy(tmp,name,3); tmp[3] = 0;
+			for(i = 0; i < NUMBER(months); i++)
+				if(strcasecmp(tmp, months[i]) == 0)
+				{
+					if(name[3] == '-') {
+						*day   = atol(&name[4]);
+						*month = i + 1;
+						return true;
+					}
+				}
+			break;
+
+		default:
+			break;
+	}
+	return false;
+}
+
+
+static long name_to_date(const char *name, boolean by,boolean* isjul)
+{
+	long julian,second, i, tmp[4];
+	if(by)
+		return atol(name);
+
+
+	if(parsedate(name,&julian,&second,isjul))
+	{
+		if(second)
+			marslog(LOG_WARN,"HH:MM:SS Information lost from %s",name); 
+		return julian;
+	}
+	return date_to_julian(atol(name));
+}
+
+/* this is too specific... I'd like to change it later */
+
+static long name_to_time(const char *name, boolean by)
+{
+	long t = atol(name);
+	return (t/100)*60+(t%100);
+}
+
+static long name_to_int(const char *p,char *name, boolean by,boolean* isjul)
+{
+	if(EQ(p,"DATE"))
+		return name_to_date(name,by,isjul);
+	else if(EQ(p,"TIME"))
+		return name_to_time(name,by);
+	else
+		return atol(name);
+}
+
+static char *int_to_name(const char *p,int n,boolean isjul)
+{
+	static char buf[20];
+	char *fmt = "%d";
+	int k = 0;
+
+	if(EQ(p,"DATE")) {
+		if(isjul)
+		{
+			long year  = julian_to_date(n,mars.y2k) / 10000;
+			long delta = n - date_to_julian(year*10000+101);
+			n = year;
+			k = delta+1;
+			fmt = "%d-%03d";
+			
+		}
+		else n = julian_to_date(n,mars.y2k);
+	}
+	else if(EQ(p,"TIME"))
+	{
+		int h = n/60;
+		int m = n%60;
+		n = h*100+m;
+		fmt = "%04d";
+	}
+	sprintf(buf,fmt,n,k);
+	return buf;
+}
+
+void check_for_to_by_list(parameter *p)
+{
+	value *q[5];
+	int i = 0;
+	value *v = p->values;
+	int from,to,by;
+	int doit;
+	boolean isjul = false;
+
+
+
+	while(v)
+	{
+		q[i++] = v;
+		v = v->next;
+	}
+
+	if(p->count == 5)
+	{
+		doit = EQ(q[1]->name,"TO") &&
+			   EQ(q[3]->name,"BY") &&
+			   (is_number(q[0]->name) || isdate(q[0]->name)) &&
+			   (is_number(q[2]->name) || isdate(q[2]->name)) &&
+			   is_number(q[4]->name);
+
+		if(doit)
+		{
+
+			from = name_to_int(p->name,q[0]->name,false,&isjul);
+			to   = name_to_int(p->name,q[2]->name,false,&isjul);
+			by   = name_to_int(p->name,q[4]->name,true,&isjul);
+		}
+
+	}
+	else
+	{
+		doit = EQ(q[1]->name,"TO") &&
+			(is_number(q[0]->name) || isdate(q[0]->name)) &&
+			(is_number(q[2]->name) || isdate(q[2]->name));
+
+		if(doit)
+		{
+
+			from = name_to_int(p->name,q[0]->name,false,&isjul);
+			to   = name_to_int(p->name,q[2]->name,false,&isjul);
+			by = 1;
+			if(EQ(p->name,"DATE")) by = 1;
+			if(EQ(p->name,"STEP")) by = 12;
+			if(EQ(p->name,"TIME")) by = 6*60;
+		}
+	}
+
+	if( doit )
+	{
+		int n    = 0;
+		value  *f = NULL,*l = NULL;
+		long val;
+		long cnt;
+
+		if(by == 0) by = 1;
+		
+		if( (to - from) / (double)by < 0 )
+		{
+			marslog(LOG_WARN,"Expanding list of %s in reverse order",p->name);
+			by = -by;
+		}
+
+		cnt =  (to - from)/by + 1;
+
+		val = from;
+		for(i=0 ; i < cnt ; i++)
+		{
+			v = new_value(strcache(int_to_name(p->name,val,isjul)));
+			val += by;
+
+
+			if(f) l->next = v;
+			else f = v;
+			l = v;
+			n++;
+		}
+
+		if(n>99)
+		{
+			/* due to a bug on the ibm, save the original stuff here */
+			value *w;
+
+			w = v = new_value(strcache(int_to_name(p->name,from,isjul)));
+			v = (v->next = new_value(strcache("BY")));
+			v = (v->next = new_value(strcache(int_to_name("DUMMY",by,isjul))));
+			v = (v->next = new_value(strcache("TO")));
+			v = (v->next = new_value(strcache(int_to_name(p->name,to,isjul))));
+
+			p->ibm_values = w;
+		}
+
+		free_all_values(p->values);
+		p->values  = f;
+		p->count = n;
+
+	}
+
+}
+
+long get_julian_from_request(const request* req,int i)
+{
+	long req_date;
+	const char* p = get_value(req,"DATE",i);
+	if(is_number(p))
+		req_date = date_to_julian(atol(p));
+	else
+	{
+		long second = 0; boolean isjul;
+		parsedate(p,&req_date,&second,&isjul);
+	}
+
+	return req_date;
+}
+
+boolean fetch(const request *r)
+{
+	const char* p = get_value(r,"TRANSFER",0);
+	if(p && EQ(p,"HANDLE"))
+		return true;
+
+	return EQ(r->name,"FETCH");
+}
+
+boolean observation(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	const char *s = get_value(r,"STREAM",0);
+	return s && t && (EQ(t,"OB") || EQ(t,"FB") || EQ(s,"SSMI"));
+}
+
+boolean image(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	const char *s = get_value(r,"STREAM",0);
+	return s && t && (EQ(t,"IM")) && !EQ(s,"SSMI");
+}
+
+boolean simulated_image(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	return t && (EQ(t,"SIM"));
+}
+
+boolean gridded_observations(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	return t && (EQ(t,"GO"));
+}
+
+boolean feedback(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	return t && (EQ(t,"AI") || EQ(t,"AF"));
+}
+
+boolean bias(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	return t && (EQ(t,"AB"));
+}
+
+boolean track(const request *r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	return t && (EQ(t,"TF"));
+}
+
+boolean is_bufr(const request* r)
+{
+	return feedback(r) || observation(r) || bias(r) || track(r);
+}
+
+boolean is_netcdf(const request* r)
+{
+	const char *t = get_value(r,"CLASS",0);
+	return t && (EQ(t,"NC"));
+}
+
+boolean is_odb(const request* r)
+{
+	const char *t = get_value(r,"TYPE",0);
+	return t && (EQ(t,"OFB") || EQ(t,"MFB"));
+}
+
+boolean is_grib(const request* r)
+{
+	return !is_bufr(r);
+}
+
+boolean wave2d(const request *r)
+{
+	const char *s;
+	const char *t = get_value(r,"STREAM",0);
+	boolean is250 = false;
+	int n = 0;
+
+	if(t && !EQ(t,"WAVE"))
+		return false;
+
+	while((s = get_value(r,"PARAM",n++)) != NULL)
+		if((EQ(s,"250")) || (EQ(s,"250.141")) || (EQ(s,"ALL")))
+			is250 = true;
+
+	return is250;
+}
+
+/* end of specific code
+=====================*/
+
+
+parameter *find_parameter(const request *r,const char *parname)
+{
+	if(!parname) return 0;
+	if(r)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			if(EQ(p->name,parname))
+				return p;
+			p = p->next;
+		}
+	}
+	return NULL;
+
+}
+
+parameter *find_case_parameter(const request *r,const char *parname)
+{
+	if(!parname) return 0;
+	if(r)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			if(CASEEQ(p->name,parname)==0)
+				return p;
+			p = p->next;
+		}
+	}
+	return NULL;
+
+}
+
+boolean value_exist(const request *r, const char *param, const char *val)
+{
+	boolean found=false;
+	value *v;
+	boolean num = is_number(val);
+	double dval = atof(val);
+
+	char *vcache = strcache(val);
+
+	parameter *p = find_parameter(r,param);
+	if(!p) return false;
+
+	v = p->values;
+
+	while(v && !found)
+	{
+		if(num)
+			found = (dval == atof(v->name));
+		else
+			found = (vcache == v->name);
+		v = v->next;
+	}
+	strfree(vcache);
+
+	return found;
+}
+
+int count_values(const request *r,const char *parname)
+{
+	parameter *p = find_parameter(r,parname);
+
+	if(p == NULL) return 0;
+	if(p->count)  return p->count;
+
+	count_parval(p);
+
+	if(mars.expflags & EXPAND_LISTS)
+	{
+		if(p->count == 5 || p->count == 3)
+			/* small patch */
+			if(!EQ(parname,"TIME")  || !(observation(r)))
+				check_for_to_by_list(p);
+	}
+
+	if((mars.expflags & EXPAND_DATE) && (EQ(parname,"DATE")))
+	{
+		value *v = p->values;
+		while(v)
+		{
+			check_for_date(p,v);
+			v = v->next;
+		}
+	}
+
+	if((mars.expflags & EXPAND_TIME) && (EQ(parname,"TIME")))
+	{
+		value *v = p->values;
+		while(v)
+		{
+			check_for_time(p,v);
+			v = v->next;
+		}
+	}
+
+	return p->count;
+}
+
+
+const char *get_value(const request *r,const char *parname,int nth)
+{
+	parameter *p = find_parameter(r,parname);
+	value *v;
+	int i = 0;
+
+	if(p == NULL) return NULL;
+
+	if(!p->count) count_values(r,parname);
+
+	v = p->values;
+
+	while(v)
+	{
+		if(nth == i++) return v->name;
+		v = v->next;
+	}
+
+	return NULL;
+}
+
+const char *case_get_param(const request *r,const char *parname)
+{
+	parameter *p = find_case_parameter(r,parname);
+	return p?p->name:NULL;
+}
+
+const char *case_get_value(const request *r,const char *parname,int nth)
+{
+	parameter *p = find_case_parameter(r,parname);
+	return p?get_value(r,p->name,nth):NULL;
+}
+
+int case_count_values(const request *r,const char *parname,int nth)
+{
+	parameter *p = find_case_parameter(r,parname);
+	return p?count_values(r,p->name):0;
+}
+
+const char *get_operator(const request *r,const char *parname,int nth)
+{
+
+	return NULL;
+}
+
+static void put_value(request *r,const char *parname,const char *valname,
+boolean append,boolean unique, boolean ascending)
+{
+	parameter *p;
+	value     *v;
+
+	if(!r) return;
+
+
+	if( (p = find_parameter(r,parname)) != NULL )
+	{
+		if(append)
+		{
+			value *a = p->values,*b= NULL,*c=NULL;
+			while(a)
+			{
+				b = a;
+				if(unique)
+				{
+					if(is_number(a->name) && is_number(valname))
+					{
+						if(atof(a->name) == atof(valname))
+							return;
+					}
+					else if(EQ(a->name,valname))
+						return;
+				}
+
+				if(ascending)
+				{
+					if(is_number(a->name))
+					{
+						if(atof(valname)  < atof(a->name))
+							break;
+					}
+					else if(LT(valname,a->name))
+						break;
+				}
+				c = b;	
+				a = a->next;
+			}
+			v = new_value(strcache(valname));
+			if(ascending)
+			{
+				if(c)
+				{
+					if(b && b!=c) v->next = b;
+					c->next = v;
+				}
+				else
+				{
+					if(a) v->next = a;
+					p->values = v;
+				}
+			}
+			else
+			{
+				if(b) b->next = v;
+				else p->values = v;
+			}
+			/* p->count++; */
+			p->count = 0;
+		}
+		else
+		{
+			if(p->values)
+			{
+				free_all_values(p->values->next);
+				p->values->next = NULL;
+				/* p->count = 1; */
+				p->count = 0;
+				if(EQ(p->values->name,valname))
+					return;
+				else
+				{
+					strfree(p->values->name);
+					p->values->name = strcache(valname);
+				}
+			}
+			else
+			{
+				v = new_value(strcache(valname));
+				p->values = v;
+				/* p->count = 1; */
+				p->count = 0;
+			}
+		}
+	}
+	else
+	{
+		parameter *q = NULL;
+		parameter *s = r->params;
+		v = new_value(strcache(valname));
+		p = new_parameter(strcache(parname),v);
+		while(s) {
+			q = s;
+			s=s->next;
+		}
+		if(q) q->next = p;
+		else r->params = p;
+	}
+
+}
+
+void unset_value(request *r,const char *parname)
+{
+	parameter *p,*q=NULL;
+	if(!r) return;
+
+	p = r->params;
+	while(p)
+	{
+		if(EQ(parname,p->name))
+		{
+			if(q) q->next = p->next;
+			else r->params = p->next;
+			free_one_parameter(p);
+			return;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+void set_value(request *r,const char *parname,const char *fmt,...)
+{
+	char buffer[10240];
+	va_list list;
+
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+
+	put_value(r,parname,buffer,false,false,false);
+}
+
+void set_value_int(request *r, const char *p, long64 v)
+{
+	set_value(r,p,"%lld",v);
+}
+
+void add_value_int(request *r, const char *p, long64 v)
+{
+	add_value(r,p,"%lld",v);
+}
+
+void set_list(request *r,const char *parname,const char *plist)
+{
+	const char *p = plist;
+	int i = 0,space = 0;
+	char buf[1024];
+	boolean append = false;
+
+	while(*p)
+	{
+		switch(*p)
+		{
+		case '\t':
+		case ' ':
+			space++;
+			break;
+
+		case '/':
+			if(i)
+			{
+				buf[i] = 0;
+				put_value(r,parname,buf,append,false,false);
+			}
+			space = i = 0;
+			append= true;
+			break;
+
+		default:
+			if(i && space) while(space-->0) buf[i++] = ' ';
+			buf[i++] = *p;
+			space = 0;
+			break;
+		}
+		p++;
+	}
+
+	if(i)
+	{
+		buf[i] = 0;
+		put_value(r,parname,buf,append,false,false);
+	}
+}
+
+void add_unique_value(request *r,const char *parname,const char *fmt,...)
+{
+	char buffer[1024];
+	va_list list;
+
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+
+	put_value(r,parname,buffer,true,true,false);
+	va_end(list);
+}
+
+void add_ordered_value(request *r,const char *parname,const char *fmt,...)
+{
+	char buffer[1024];
+	va_list list;
+
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+
+	put_value(r,parname,buffer,true,false,true);
+	va_end(list);
+}
+
+void add_unique_ordered_value(request *r,const char *parname,const char *fmt,...)
+{
+	char buffer[1024];
+	va_list list;
+
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+
+	put_value(r,parname,buffer,true,true,true);
+	va_end(list);
+}
+
+void add_value(request *r,const char *parname,const char *fmt,...)
+{
+	char buffer[1024];
+	va_list list;
+
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+
+	put_value(r,parname,buffer,true,false,false);
+	va_end(list);
+}
+
+void set_value_long64(request *r,const char *parname,long64 l)
+{
+	char buffer[1024];
+	long64 i;
+
+	sprintf(buffer,"%lld",l);
+	sscanf(buffer,"%lld",&i);
+
+	/* i = strtoll(buffer,(char **)NULL, 10); */
+	if (i != l)
+	{
+		marslog(LOG_EROR,"Error in converting 64 bit long to ascii");
+		marsexit(-99);
+	}
+
+	put_value(r,parname,buffer,false,false,false);
+}
+
+void add_value_long64(request *r,const char *parname,long64 l)
+{
+	char buffer[1024];
+	long64 i;
+
+	sprintf(buffer,"%lld",l);
+	sscanf(buffer,"%lld",&i);
+
+	/* i = strtoll(buffer,(char **)NULL, 10); */
+	if (i != l)
+	{
+		marslog(LOG_EROR,"Error in converting 64 bit long to ascii");
+		marsexit(-99);
+	}
+
+	put_value(r,parname,buffer,true,false,false);
+
+}
+
+const char *request_verb(const request *r)
+{
+	return r?r->name:NULL;
+}
+
+/* 
+	Parameter 127 && 128 && 152 are only at level 1 !!!!
+	129 is at level 1
+*/
+
+static boolean chk_152(int count,char *names[],char *vals[])
+{
+	int flg = 0;
+	int i,n;
+
+	for(i=0;i<count;i++)
+	{
+		if((EQ(names[i],"PARAM")) && vals[i] && ( n = atoi(vals[i])) )
+		{
+			if(n == 22 || n == 127 || n == 128 || n == 129 || n == 152 || n == 200152 || n == 200129 || n == 129152 || n == 129129)
+			{
+				/* Only for tables < 210 */
+				long par = NO_PARAM;
+				long table = NO_TABLE;
+				paramtable(vals[i],&par,&table,true);
+				if(table <210)
+					flg++;
+			}
+		}
+
+		if(EQ(names[i],"LEVELIST") && vals[i] && !EQ(vals[i],"1"))
+			flg++;
+	}
+
+	return (boolean)(flg != 2);
+}
+
+static void loop(const request *r,boolean ml,int index,int count,char *strings[],
+char *values[],
+loopproc callback,void *data)
+{
+	if(index < count)
+	{
+		parameter  *p = find_parameter(r,strings[index]);
+
+		(void)count_values(r,strings[index]); /* force list expension */
+
+		if(p)
+		{
+			value      *v = p->values;
+
+			while(v)
+			{
+				values[index] = v->name;
+				loop(r,ml,index+1,count,strings,values,callback,data);
+				v = v->next;
+			}
+		}
+		else
+		{
+			values[index] = NULL;
+			loop(r,ml,index+1,count,strings,values,callback,data);
+		}
+
+	}
+	else
+		if( !ml || chk_152(count,strings,values))
+			callback(r,count,strings,values,data);
+}
+
+void values_loop(const request *r,int count,
+char *parnames[],loopproc callback,void *data)
+{
+	char **values = (char**)MALLOC(sizeof(char*)*count);
+	const char * p      = get_value(r,"LEVTYPE",0);
+	boolean ml    = (boolean)(p && (EQ(p,"ML")));
+
+	if(ml) {
+		p = get_value(r,"EXPECT",0);
+		if(p && atol(p) != 0)
+		{
+			marslog(LOG_WARN,"EXPECT provided, special treatment of LNSP");
+			marslog(LOG_WARN,"and other single level parameters disabled");
+			ml = false;
+		}
+	}
+
+	loop(r,ml,0,count,parnames,values,callback,data);
+
+	FREE(values);
+}
+
+
+
+request *new_request(char *name,parameter *p)
+{
+	request *r = NEW_CLEAR(request);
+	r->name    = name;
+	r->params  = p;
+	return r;
+}
+
+request *empty_request(const char *name)
+{
+	return new_request(name?strcache(name):strcache(""),NULL);
+}
+
+parameter *new_parameter(char *name,value *v)
+{
+	parameter *p = NEW_CLEAR(parameter);
+	p->name    = name;
+	p->values  = v;
+	return p;
+}
+
+value *new_value(char *name)
+{
+	value *v = NEW_CLEAR(value);
+	v->name  = name;
+	return v;
+}
+
+
+value *new_expansion(value* val)
+{
+	value *v  = NEW_CLEAR(value);
+	v->expand = val;
+	return v;
+}
+
+value *new_reference(const char *refname,char *name)
+{
+	value *v = NEW_CLEAR(value);
+	v->ref   = (value*)refname;
+	v->name  = name;
+	return v;
+}
+
+
+static boolean need_quotes(const char *p)
+{
+	int n;
+	const char *q;
+
+	switch(*p)
+	{
+		case '-':
+		case '.':
+			return !is_number(p);
+			/*NOTREACHED*/
+			break;
+
+		case '"':
+			n = 0;
+			q = p;
+			while(*q) if(*q++ == '"') n++;
+			if(n != 2) return true;
+			if(p[strlen(p)-1] != '"') return true;
+			break;
+
+		default:
+			if(!isalnum(*p) && *p != '_') 
+				return true;
+
+			while(*p)
+			{
+				if(!isalnum(*p) && 
+				   *p != ' ' && 
+				   *p != '_' &&
+				   *p != '-' &&
+				   *p != '.' &&
+				   *p != '\t') return true;
+
+				 p++;
+			}
+
+			break;
+	}
+
+	return false;
+}
+
+static void save_name(FILE *f,const char* name,int n)
+{
+	const char *p = name;
+	int i = 0,cnt = 0;
+
+	if(name == NULL)
+	{
+		marslog(LOG_WARN,"save_name called with empty name");
+		return;
+	}
+
+	if(need_quotes(p))
+	{
+		cnt = 2;
+		putc('\'',f);
+		while(*p) {
+			if(*p=='\\' || *p == '\n' || *p == '\'') { putc('\\',f);i++; }
+			putc(*p,f);
+			p++;
+			i++;
+		}
+		putc('\'',f);
+	}
+	else cnt = fprintf(f,"%s",name);
+
+	for(i=cnt;i<n;i++)
+		putc(' ',f);
+}
+
+static void save_one_value(FILE *f,value *r)
+{
+	save_name(f,r->name,0);
+}
+
+static void save_all_values(FILE *f,value *r)
+{
+	while(r)
+	{
+		save_one_value(f,r);
+		if(r->next) putc('/',f);
+		r = r->next;
+	}
+
+#if 0
+	value *o = r->other_names;
+	if(o)
+	{
+		fprintf(f," ## Other names: ");
+		while(o)
+		{
+			save_one_value(f,o);
+			if(o->next) putc('/',f);
+			o = o->next;
+		}
+	}
+#endif
+}
+
+
+static void save_all_parameters(FILE *f,parameter *r)
+{
+	while(r)
+	{
+		if(mars.debug || *r->name != '_')
+		{
+			if(r->subrequest)
+			{
+				fprintf(f,",\n    ");
+				save_name(f,r->name,10);
+				fprintf(f," = (");
+				save_all_requests(f,r->subrequest);
+				fprintf(f,")");
+			}
+			else
+				if(r->values)
+				{
+					fprintf(f,",\n    ");
+					save_name(f,r->name,10);
+					fprintf(f," = ");
+					save_all_values(f,r->values);
+				}
+#if 0
+			if(r->default_values)
+			{
+				putc('\n',f);
+				putc('#',f);
+				save_all_values(f,r->default_values);
+				putc('\n',f);
+
+			}
+#endif
+		}
+		r = r->next;
+	}
+	putc('\n',f);
+}
+
+
+void save_one_request(FILE *f,const request *r)
+{
+	if(r)
+	{
+		save_name(f,r->name,0);
+		save_all_parameters(f,r->params);
+		putc('\n',f);
+	}
+}
+
+
+void save_all_requests(FILE *f,const request *r)
+{
+	while(r)
+	{
+		save_one_request(f,r);
+		r = r->next;
+	}
+}
+
+void print_one_request(const request *r)
+{
+	save_one_request(stdout,r);
+}
+
+void print_all_requests(const request *r)
+{
+	save_all_requests(stdout,r);
+}
+
+request *read_request_file(const char *fname)
+{
+	extern request *parser_reqs;
+	request *r;
+
+	if(parser(fname,mars.echo) != NOERR)
+	{
+		free_all_requests(parser_reqs);
+		parser_reqs = NULL;
+		return NULL;
+	}
+	else
+	{
+		r = parser_reqs;
+		parser_reqs = NULL;
+		return r;
+	}
+}
+
+
+static request *first;
+static request *last;
+
+static void reqcb(const request *r,int count,char *names[],
+char *vals[],void *data)
+{
+	request *w = clone_one_request(r);
+	int     i;
+	/*request **d = (request**)data;*/
+
+	int *n = (int*)data;
+
+	w->order = (*n)++;
+	for(i=0;i<count;i++)
+	{
+		/* printf("%s = %s\n",names[i],vals[i]); */
+		if(vals[i])
+			put_value(w,names[i],vals[i],false,false,false);
+	}
+
+	if(first == NULL)
+		first = w;
+	else
+		last->next = w;
+	last = w;
+}
+
+request *unwind_one_request(const request *r)
+{
+
+	int n = 0;
+	first = last = NULL;
+	names_loop(r,reqcb,&n);
+	return first;
+}
+
+request *custom_unwind_one_request(const request *r,int cnt,char *names[])
+{
+	int n = 0;
+	first = last = NULL;
+	values_loop(r,cnt,names,reqcb,&n);
+	return first;
+}
+
+void names_loop(const request *r,loopproc proc,void *data)
+{
+	if(NUMBER(names) != NUMBER(cmpnames))
+	{
+		marslog(LOG_EROR,"MARS internal error in request.c");
+		marslog(LOG_EROR,"NUMBER(names) [%d] != NUMBER(cmpnames) [%d]",NUMBER(names),NUMBER(cmpnames)); 
+		marslog(LOG_EROR,"Exiting...");
+		marsexit(1);
+	}
+	values_loop(r,NUMBER(names),names,proc,data);
+}
+
+static void cntcb(const request *r,int count,char *names[],
+char *vals[],void *data)
+{
+	int *n = (int*)data;
+	(*n)++;
+}
+
+boolean all_is_used(const request *r)
+{
+	static const request *r_keep  = 0;
+	static       boolean     all     = false;
+	       const char    *s       = 0;
+	             int      i       = 0;
+
+	if(r_keep == r)
+		return all;
+	r_keep = r;
+
+	for(i=0;i<NUMBER(names);i++)
+		if((s = get_value(r,names[i],0)) != NULL)
+			if(EQ(s,"ALL"))
+			{
+				all = true;
+				break;
+			}
+
+	return all;
+}
+
+int count_fields(request *r)
+{
+	int  n = 0;
+	const char *s = get_value(r,"EXPECT",0);
+
+	if(s != NULL)
+		return atol(s);
+
+	if(is_bufr(r) || image(r) ) return 0;
+
+	if(fetch(r))
+		return 0;
+
+	if(all_is_used(r))
+		return 0;
+
+	if (is_netcdf(r))
+		return 1;
+
+	if (is_odb(r))
+		return 0; 
+
+	names_loop(r,cntcb,&n);
+
+	return n;
+}
+
+int count_fields_in_request(request *r)
+{
+	int  n = 0;
+
+	if(is_bufr(r) || image(r) ) return 0;
+
+	if(fetch(r))
+		return 0;
+
+	if(all_is_used(r))
+		return 0;
+
+	if (is_netcdf(r))
+		return 1;
+
+	if (is_odb(r))
+		return 0; 
+
+	names_loop(r,cntcb,&n);
+
+	return n;
+}
+
+
+int reqcmp(const request *a,const request *b,boolean verbose)
+{
+	int n;
+	if(a && b)
+	{
+		parameter *p = a->params;
+
+		while(p)
+		{
+			const char *s = get_value(a,p->name,0);
+			const char *t = get_value(b,p->name,0);
+
+			if(s && t)
+			{
+				if(is_number(s))
+					n = atof(s) - atof(t);
+				else
+					n = strcmp(s,t);
+
+				if(n) {
+					if(verbose)
+						marslog(LOG_INFO,
+						    "Compare failed: %s -> %s <> %s",p->name,s,t);
+					return n;
+				}
+			}
+
+			p = p->next;
+		}
+	}
+	return 0;
+}
+
+typedef struct {
+	const   request *r;
+	int     order;
+	int     cnt;
+	int     fguess;
+	int     fcast;
+} s_order;
+
+static void ordercb(const request *r,int count,char *names[],
+char *vals[],void *data)
+{
+	s_order *o = (s_order *)data;
+	char buf[10];
+	char buf2[10];
+	int i;
+	const char *t;
+	char *s;
+	boolean ok = true;
+
+	for(i=0;i<count && ok;i++)
+		if((s = vals[i]) && (t = get_value(o->r,names[i],0)))
+		{
+			if(o->fguess && o->fcast)
+			{
+				boolean isjul = false;
+				int date = name_to_date(vals[DATE_INDIX],false,&isjul);
+				int time = atol(vals[TIME_INDIX])/ 100;
+				int step = atol(vals[STEP_INDIX]);
+
+				if(step == 0) step = 6;
+				time -= step;
+
+				while(time < 0)
+				{
+					time += 24;
+					date -= 1;
+				}
+
+				if(EQ(names[i],"DATE"))
+				{
+
+					long n = name_to_date(t,false,&isjul);
+					sprintf(buf2,"%ld",julian_to_date(n,mars.y2k));
+					t = buf2;
+
+					sprintf(buf,"%ld",julian_to_date(date,mars.y2k));
+					s = buf;
+				}
+
+				if(EQ(names[i],"TIME"))
+				{
+					sprintf(buf,"%d",time*100);
+					s = buf;
+				}
+
+				if(EQ(names[i],"STEP"))
+				{
+					sprintf(buf,"%d",step);
+					s = buf;
+				}
+
+			}
+
+			if(!cmpnames[i](s,t))
+				ok = false;
+
+			if(!ok && mars.debug)
+				marslog(LOG_DBUG,"%s different %s <> %s",names[i],s,t);
+		}
+
+
+	if(ok) o->order = o->cnt;
+
+	o->cnt++;
+
+}
+
+int field_order(const request *r,const request *u)
+{
+	s_order o;
+	const char    *kindr = get_value(r,"TYPE",0);
+	const char    *kindu = get_value(u,"TYPE",0);
+
+	o.r      = u;
+	o.order  = -1;
+	o.cnt    = 0;
+	o.fguess = kindr?strcmp(kindr,"FG")==0:false;
+	o.fcast  = kindu?strcmp(kindu,"FC")==0:false;
+
+	names_loop(r,ordercb,&o);
+
+	if(mars.debug) {
+		marslog(LOG_DBUG,"Order : %d",o.order);
+		print_all_requests(r);
+		print_all_requests(u);
+	}
+
+	return o.order;
+}
+
+void valcpy(request *a,request *b,char *aname,char *bname)
+{
+	parameter *p;
+	if(a && b && (p = find_parameter(b,bname)) )
+	{
+		boolean z = false;
+		value *v = p->values;
+		while(v)
+		{
+			put_value(a,aname,v->name,z,false,false);
+			z = true;
+			v = v->next;
+		}
+	}
+}
+
+void reqcpy(request *a,const request *b)
+{
+	if(a && b)
+	{
+		parameter *p = b->params;
+
+		while(p)
+		{
+			boolean b = false;
+			value *v = p->values;
+
+			while(v)
+			{
+				put_value(a,p->name,v->name,b,false,false);
+				b = true;
+				v = v->next;
+			}
+
+			if(p->subrequest) set_subrequest(a,p->name,p->subrequest);
+
+			/* For marsgen */
+			{
+				parameter* q = find_parameter(a, p->name);
+				if(q) {
+					free_all_values(q->default_values);
+					q->default_values = clone_all_values(p->default_values);
+				}
+			}
+
+			p = p->next;
+		}
+	}
+}
+
+static void _reqmerge(parameter *pa,const parameter *pb,request *a)
+{
+	const value *vb = pb->values;
+
+	if(pa->name != pb->name)
+		return;
+
+	while(vb) {
+		value   *va   = pa->values;
+		value   *last = 0;
+		const char    *nb   = vb->name;
+		boolean add   = true;
+			
+		while(va)
+		{
+			if(va->name == nb)
+			{
+				add = false;
+				break;
+			}
+
+			last = va;
+			va   = va->next;
+		}
+
+		if(add)
+		{
+			value* v = new_value(strcache(nb));
+			if(last) last->next = v; else pa->values = v;
+			pa->count = 0;
+		}
+
+		vb = vb->next;
+	}
+
+	if(pb->subrequest) 
+		set_subrequest(a,pb->name,pb->subrequest);
+}
+
+/* Fast version if a && b same */
+
+static boolean _reqmerge1(request *a,const request *b)
+{
+	parameter *pa = a->params;
+	const parameter *pb = b->params;
+
+	while(pa && pb)
+	{
+		if(pa->name != pb->name)
+			return false;
+
+		_reqmerge(pa,pb,a);
+
+		pa = pa->next;
+		pb = pb->next;
+	}
+
+	return (pa == NULL && pb == NULL);
+}
+
+static void _reqmerge2(request *a,const request *b)
+{
+	const parameter *pb = b->params;
+
+	while(pb)
+	{
+		parameter* pa = find_parameter( a, pb->name);
+
+		if(pa == NULL)
+		{
+			value *v = pb->values;
+			while(v)
+			{
+				put_value(a,pb->name,v->name,true,true,false);
+				v = v->next;
+			}
+			if(pb->subrequest) set_subrequest(a,pb->name,pb->subrequest);
+		}
+		else
+		{
+			_reqmerge(pa,pb,a);
+		}
+
+
+		pb = pb->next;
+	}
+}
+
+void reqmerge(request *a,const request *b)
+{
+	if(a && b)
+	{
+		if(!_reqmerge1(a,b))
+			_reqmerge2(a,b);
+	}
+}
+
+void unset_param_value(request *r, const char *param, const char *par_val)
+/*
+    Removes value from the parameter in the request
+*/
+{
+	parameter * p;
+	value * v, * q = NULL;
+
+	/* First check if the parameter exists in the request */
+
+	p = find_parameter( r, param);
+	if ( p == NULL ) return;
+
+	/* If it does, make sure its values have been counted */
+
+	if ( !p->count ) count_values( r, param);
+
+	/* Run through the values in the parameter */
+
+	v = p->values;
+	while(v)
+	{
+		if ( EQ( v->name, par_val) )          /* if value matchs input */
+		{
+			if (q) q->next = v->next;        /* delete value from param */
+			else p->values = v->next;
+			free_one_value(v);
+
+			p->count--;                      /* Update value counter */
+			return;
+		}
+		q = v;
+		v = v->next;
+	}
+
+	return;
+}
+
+/* Quick and dirty hack */
+request *string2request(const char *p)
+{
+	request *r;
+	char *tmp = marstmp();
+	FILE *f = fopen(tmp,"w");
+
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"%s",tmp);
+		return NULL;
+	}
+
+	fprintf(f,"%s\n",p);
+	fclose(f);
+
+	r = read_request_file(tmp);
+	unlink(tmp);
+	return r;
+}
+
+void value2string(value *r,char *buf)
+{
+	if(r) value2string(r->other_names,buf);
+	while(r)
+	{
+		strcat(buf,r->name);
+		if(r->next) strcat(buf,"/");
+		r = r->next;
+	}
+}
+
+
+void parameter2string(parameter *r,char *buf)
+{
+	char tmp[80];
+
+	while(r)
+	{
+		if(mars.debug || *r->name != '_')
+		{
+			sprintf(tmp," ,\n    %-10s = ",r->name);
+			strcat(buf,tmp);
+			value2string(r->values,buf);
+		}
+		r = r->next;
+	}
+	strcat(buf,"\n");
+}
+
+
+char *request2string(const request *r)
+{
+	static char *buf = NULL;
+	file_offset n;
+
+	char *tmp = marstmp();
+	FILE *f = fopen(tmp,"w");
+
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"%s",tmp);
+		return NULL;
+	}
+	save_all_requests(f,r);
+	fclose(f);
+
+	f = fopen(tmp,"r");
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"%s",tmp);
+		return NULL;
+	}
+
+	if(buf) free(buf);
+
+	fseek(f,0,2);
+	n = ftell(f);
+	rewind(f);
+	buf = (char*)MALLOC(n+2);
+
+	n = fread(buf,1,n,f);
+	buf[n] = 0;
+
+	fclose(f);
+
+	unlink(tmp);
+
+	return buf;
+#if 0
+	buf[0] = 0;
+
+	if(r)
+	{
+		strcat(buf,r->name);
+		parameter2string(r->params,buf);
+		/* strcat('\n'); */
+		return buf;
+	}
+	return "#empty request";
+#endif
+}
+
+
+/*
+	MARS specific language and test files 
+*/
+
+request *mars_language(void)
+{
+	static request *lang = NULL;
+	if(lang == NULL)
+		lang = read_language_file(mars.langfile);
+	return lang;
+}
+
+rule *mars_rules(void)
+{
+	static rule    *test = NULL;
+	if(test == NULL)
+		test = read_check_file(mars.testfile);
+	return test;
+}
+
+
+request *build_mars_request(request *r)
+{
+	request *lang;
+	rule    *test;
+	request *s = r;
+	long    flags;
+
+	flags = expand_flags(EXPAND_MARS);
+
+	if((lang = mars_language()) == NULL)
+		return NULL;
+
+	if((test = mars_rules()) == NULL)
+		return NULL;
+
+	r = expand_all_requests(lang,test,r);
+
+	expand_flags(flags);
+
+	free_all_requests(s);
+
+	mars.number_of_requests = count_requests(r);
+
+	return r;
+}
+
+request *read_mars_request(const char *fname)
+{
+	request *r = read_request_file(fname);
+
+	return build_mars_request(r);
+}
+
+err handle_default(request *r,void *data)
+{
+	reset_language(mars_language());
+	return 0;
+}
+
+void add_subrequest(request *r,const char *name,const request *s)
+{
+	parameter *p = find_parameter(r,name);
+
+	if(p && p->subrequest)
+		set_subrequest(p->subrequest,"next",s);
+	else
+		set_subrequest(r,name,s);
+}
+
+void set_subrequest(request *r,const char *name,const request *s)
+{
+	parameter *p;
+	if(!r || !name) return;
+	if (s == NULL)
+	{
+		unset_value(r, name);
+		return;
+	}
+	put_value(r,name,"#",false,false,false);
+	p = find_parameter(r,name);
+	free_all_requests(p->subrequest);
+
+	/* p = find_parameter(r,name); */
+	p->subrequest = clone_all_requests(s);
+}
+
+request *get_subrequest(const request *r,const char *name,int n)
+{
+	if(!name) return NULL;
+	else 
+	{
+		parameter *p = find_parameter(r,name);
+		int i = 0;
+		request *s;
+
+		r = p?p->subrequest:NULL;
+		while(r && (i < n))
+		{
+			p = find_parameter(r,"next");
+			r = p?p->subrequest:NULL;
+			i++;
+		}
+
+		s = clone_all_requests(r);
+		unset_value(s,"next");
+		return s;
+	}
+}
+
+static struct {
+	char *param;
+	char *title;
+} messages[] =  {
+	{"PARAM",      "parameter", },
+	{"LEVELIST",   "level", },
+	{"DATE",       "date", },
+	{"TIME",       "time", },
+	{"REFERENCE",  "reference", },
+	{"STEP",       "step", },
+	{"DIAGNOSTIC", "diagnostic", },
+	{"ITERATION",  "iteration", },
+	{"NUMBER",     "number", },
+	{"DOMAIN",     "domain", },
+	{"FREQUENCY",  "frequency", },
+	{"DIRECTION",  "direction", },
+};
+
+void notify_missing_field(const request* r, const char *name)
+{
+	if(mars.infomissing)
+	{
+		int i = 0;
+		char tmp[80];
+		char buf[10240];
+		const char *p = 0;
+		char c = ' ';
+
+		strcpy(buf,"Missing");
+		for(i = 0; i < NUMBER(messages); i++)
+			if((p = get_value(r,messages[i].param,0)) != NULL)
+			{
+				sprintf(tmp,"%c%s %s",c,messages[i].title,p);
+				c=',';
+				strcat(buf,tmp);
+			}
+
+		marslog(LOG_INFO,"%s",buf);
+	} 
+}
+
+void sort_request(const request *r,int count,char *names[], char *vals[],void *data)
+{
+	int i;
+	request **x = (request**)data;
+	for(i=0;i<count;i++)
+		 if(vals[i]) add_unique_value(*x,names[i],"%s",vals[i]);
+}
+
+
+int count_requests(const request* r)
+{
+	int n = 0;
+
+	while(r)
+	{
+		n++;
+		r=r->next;
+	}
+	return n;
+
+}
diff --git a/src/libMars/restricted.c b/src/libMars/restricted.c
new file mode 100644
index 0000000..9696816
--- /dev/null
+++ b/src/libMars/restricted.c
@@ -0,0 +1,55 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+#define H(x) (1<<(x))
+
+typedef struct station {
+	int ident;
+	int time_restricted;
+} station;
+
+static station restrictions[] = 
+{
+#include "restricted.h"
+};
+
+
+static int compare(const void *x1,const void *x2)
+{
+	return ((station*)x1)->ident - ((station*)x2)->ident;
+}
+
+int restricted(void *p)
+{
+	packed_key *k = (packed_key*)p;
+	station st;
+	station *s;
+	int i;
+
+	if(KEY_SUBTYPE(k) > 4) return 0;
+
+	st.ident = 0;
+
+	for(i=0;i<5;i++)
+		st.ident = st.ident*10 + (KEY_IDENT(k)[i]-'0');
+		
+	if(s = bsearch(&st,restrictions,NUMBER(restrictions),sizeof(station),compare))
+	{
+		if( (s->time_restricted & (1<<KEY_HOUR(k))) != 0)
+		{
+/* marslog(LOG_INFO,"RESTRICTED ident: %d, rest time: %04x, obs time: %04x, real obs key time: %d",st.ident,s->time_restricted,1<<KEY_HOUR(k),KEY_HOUR(k)); */
+			return 1;
+		}
+/* marslog(LOG_INFO,"INCLUDED ident: %d, rest time: %04x, obs time: %04x, real obs key time: %d",st.ident,s->time_restricted,1<<KEY_HOUR(k),KEY_HOUR(k)); */
+	}
+	return 0;
+}
diff --git a/src/libMars/restricted.h b/src/libMars/restricted.h
new file mode 100644
index 0000000..a8a157e
--- /dev/null
+++ b/src/libMars/restricted.h
@@ -0,0 +1,185 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#define TYPE_1 (H(1)|H(2)|H(4)|H(5)|H(7)|H(8)|H(10)|H(11)|H(13)|H(14)|H(16)|H(17)|H(19)|H(20)|H(22)|H(23))
+#define TYPE_2 (H(0)|H(1)|H(2)|H(3)|H(4)|H(5)|H(6)|H(7)|H(8)|H(9)|H(10)|H(11)|H(12)|H(13)|H(14)|H(15)|H(16)|H(17)|H(18)|H(19)|H(20)|H(21)|H(22)|H(23))
+{ 10004, TYPE_1, }, /* SNDL41 */
+{ 10005, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10007, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10015, TYPE_1, }, /* SNDL41 */
+{ 10020, TYPE_1, }, /* SNDL41 */
+{ 10022, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10026, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10035, TYPE_1, }, /* SNDL41 */
+{ 10042, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10044, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10046, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10055, TYPE_1, }, /* SNDL41 */
+{ 10091, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10093, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10113, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10124, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10129, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10130, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10131, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10139, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10147, TYPE_1, }, /* SNDL41 */
+{ 10152, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10156, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10161, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10162, TYPE_1, }, /* SNDL41 */
+{ 10168, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10170, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10177, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10180, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10184, TYPE_1, }, /* SNDL41 */
+{ 10193, TYPE_2, }, /* SIDL44  SMDL44  SNDL44 */
+{ 10200, TYPE_1, }, /* SNDL41 */
+{ 10215, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10224, TYPE_1, }, /* SNDL41 */
+{ 10235, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10249, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10253, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10261, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10264, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10267, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10268, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10270, TYPE_1, }, /* SNDL41 */
+{ 10277, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10280, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10289, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10291, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10305, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10315, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10317, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10321, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10325, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10338, TYPE_1, }, /* SNDL41 */
+{ 10348, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10356, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10359, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10361, TYPE_1, }, /* SNDL41 */
+{ 10365, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10368, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10376, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10379, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10381, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10382, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10384, TYPE_1, }, /* SNDL41 */
+{ 10385, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10389, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10393, TYPE_1, }, /* SNDL41 */
+{ 10396, TYPE_2, }, /* SIDL45  SMDL45  SNDL45 */
+{ 10400, TYPE_1, }, /* SNDL41 */
+{ 10406, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10410, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10418, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10427, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10430, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10432, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10435, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10438, TYPE_1, }, /* SNDL41 */
+{ 10444, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10449, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10452, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10453, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10454, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10458, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10460, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10466, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10469, TYPE_1, }, /* SNDL41 */
+{ 10471, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10474, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10480, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10488, TYPE_1, }, /* SNDL41 */
+{ 10490, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10496, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10499, TYPE_2, }, /* SIDL42  SMDL42  SNDL42 */
+{ 10501, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10506, TYPE_1, }, /* SNDL41 */
+{ 10513, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10515, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10517, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10526, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10532, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10535, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10542, TYPE_2, }, /* SIDL46  SMDL46  SNDL46 */
+{ 10544, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10546, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10548, TYPE_1, }, /* SNDL41 */
+{ 10552, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10554, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10555, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10557, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10558, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10564, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10565, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10567, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10569, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10574, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10575, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10577, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10578, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10579, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10582, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10591, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10609, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10615, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10616, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10635, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10637, TYPE_1, }, /* SNDL41 */
+{ 10645, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10648, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10655, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10658, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10671, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10675, TYPE_2, }, /* SIDL47  SMDL47  SNDL47 */
+{ 10685, TYPE_1, }, /* SNDL41 */
+{ 10688, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10704, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10706, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10708, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10724, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10727, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10729, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10735, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10736, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10738, TYPE_1, }, /* SNDL41 */
+{ 10739, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10742, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10761, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10763, TYPE_1, }, /* SNDL41 */
+{ 10776, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10777, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10788, TYPE_1, }, /* SNDL41 */
+{ 10791, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10796, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10803, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10805, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10815, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10818, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10836, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10838, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10850, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10852, TYPE_1, }, /* SNDL41 */
+{ 10865, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10870, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10875, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10895, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10908, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10929, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10946, TYPE_1, }, /* SNDL41 */
+{ 10948, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10961, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10962, TYPE_2, }, /* SIDL43  SMDL43  SNDL43 */
+{ 10963, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10980, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+{ 10982, TYPE_2, }, /* SIDL48  SMDL48  SNDL48 */
+
diff --git a/src/libMars/retrieve.c b/src/libMars/retrieve.c
new file mode 100644
index 0000000..f47e978
--- /dev/null
+++ b/src/libMars/retrieve.c
@@ -0,0 +1,628 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+extern base_class *targetbase;
+
+static int visited = 0;
+
+boolean enough(request *r, int count)
+{
+	static int  need   = 0;
+	static boolean init   = false;
+	static boolean fields = false;
+	static request *p = NULL;
+
+	if(p != r || !init)
+	{
+		p = r;
+		need = count_fields(r);
+		if(is_bufr(r))
+			fields = false;
+		else if(fetch(r))
+			fields = false;
+		else if(is_netcdf(r))
+			fields = false;
+		else if(is_odb(r))
+			fields = false;
+		else
+			fields = true;
+		init = true;
+
+	}
+
+	if(!fields && count>=need && count > 0)
+		return true;
+
+    if( need != 0 && count == need)
+        return true;
+
+	/* In case of ALL */
+	if( need == 0 && count != 0)
+		return true;
+
+	return false;
+}
+
+request *findbase(const char *name)
+{
+	request *t = 0;
+	request *s = mars.setup;
+
+	if(!name) return 0;
+
+	while(s && !t)
+	{
+		if(EQ(s->name,"database"))
+		{
+			const char *p ; int i = 0;
+					
+			while( (p = get_value(s,"name",i++)) && !t )
+					if(strcasecmp(p,name) == 0) 
+						t = s;
+		}
+		s = s->next;
+	}
+
+	if(t == 0)
+	{
+		request *s = mars.setup;
+
+		marslog(LOG_EROR,"The database '%s' is not known",name);
+		marslog(LOG_EROR,"The valid values are: ");
+
+		while(s)
+		{
+			if(EQ(s->name,"database"))
+			{
+				const char *p ; int i = 0;
+				while( (p = get_value(s,"name",i++)) )
+					marslog(LOG_INFO,"%s",p);
+			}
+			s = s->next;
+		}
+	}
+
+	return t;
+}
+
+database *openbase(request *s,request *r,const char **name,request **cache,int  mode)
+{
+	request *env = get_environ();
+	const char    *c   = get_value(s,"class",0);
+	const char    *n   = get_value(s,"name" ,0);
+	const char    *x   = get_value(s,"cache",0);
+	const char    *a   = get_value(s,"active",0);
+	database *base = 0;
+
+	if(a && EQ(a,"false")) {
+		marslog(LOG_EROR,"Database %s is not active",n);
+		return NULL;
+	}
+
+	*name  = n;
+	*cache = NULL;
+
+	qmonitor("open %s for %s",n,mode == READ_MODE?"read":"write");
+	base  = database_open(base_class_by_name(c),n,r,env,mode);
+
+
+	if(base && !database_check(base,r))
+	{
+		database_close(base);
+		qmonitor("close %s",n);
+		return NULL;
+	}
+
+	*cache = findbase(x);
+
+	return base;
+}
+
+
+static err retrieve(request *r,request* setup,database *target,int *cnt, 
+	postproc pproc)
+{
+	request      *w;
+	int		     ret    = NOERR;
+	long         length;
+	boolean      done = false;
+	const char   *name;
+	database     *base  = NULL;
+	database     *cache = NULL;
+	request      *cachesetup = 0;
+	const char   *cachename = 0;
+	boolean      fields;
+	long64       total        = 0;
+	long64       total_target = 0;
+
+	/* Structure to return 2 or more fields from post-processing.
+	   Most times (ie, scalar post-processing), only 1 field is returned */
+	static ppbuffer_t *pp       = NULL;
+	static int        nbuffers  = 2;
+	static long       buflen    = 0;
+	       int        i         = 0; 
+	static boolean    inform    = true;
+
+	buflen = mars.readany_buffer_size;
+
+	if(ppestimate() > buflen)
+	{
+		buflen = ppestimate() + 1024*1024;
+		if(inform)
+		{
+			marslog(LOG_WARN,"Using large buffer for post-processing (%sbytes)",bytename(buflen));
+			inform = false;
+		}
+	}
+
+	if(pp == NULL)
+	{
+		pp = reserve_mem(sizeof(ppbuffer_t)*nbuffers);	
+		for(i = 0; i<nbuffers; ++i)
+		{
+			pp[i].buffer=NULL;
+			pp[i].buflen=buflen;
+			pp[i].outlen=0;
+		}
+	}
+
+	for(i=0; i<nbuffers; ++i)
+	{
+		if(pp[i].buflen < buflen)
+		{
+			if(pp[i].buffer) release_mem(pp[i].buffer);
+			pp[i].buflen = buflen;
+			pp[i].buffer = NULL;
+		}
+
+		if(pp[i].buffer == NULL)
+		{
+			marslog(LOG_DBUG,"Work buffer is %d",pp[i].buflen);
+			pp[i].buffer = reserve_mem(pp[i].buflen);
+		}
+	}
+
+	base = openbase(setup,r,&name,&cachesetup,READ_MODE);
+	if(!base) return TOO_SHORT_ERR;
+
+	/* rewind target */
+	database_control(target,CNTL_REWIND,NULL,0);
+
+	visited++;
+
+	ret  = NOERR;
+	*cnt = 0;
+
+	if(is_bufr(r))
+	{
+		w      = NULL;
+		cache  = NULL;
+		fields = false;
+
+		/* For AI or AF we receive metadata request from DHS */
+		if(feedback(r))
+			w = clone_one_request(r);
+	}
+	else if(fetch(r))
+	{
+		fields = false;
+		w      = clone_one_request(r);
+		cache  = NULL;
+	}
+	else if(is_netcdf(r))
+	{
+		fields = false;
+		w      = clone_one_request(r);
+		cache  = NULL;
+	}
+	else if(is_odb(r))
+	{
+		fields = false;
+		w      = clone_one_request(r);
+		cache  = NULL;
+	}
+	else
+	{
+		fields = true;
+		w      = clone_one_request(r);
+		cache  = NULL;
+	}
+
+	while(!done)
+	{
+		long   len = pp[0].buflen;
+		char   *buffer = pp[0].buffer;
+		long   n       = 0;
+
+		length = pp[0].buflen;
+
+		ret = database_read(base,w,buffer,&length);
+
+		switch(ret)
+		{
+		case NOERR:
+
+			total += length;
+
+			/* open the cache if needed */
+			if(cachesetup && !cache)
+			{
+
+				if(!is_bufr(r))
+				{
+					request *dummy;
+					cache = openbase(cachesetup,r,&cachename, &dummy,WRITE_MODE);
+				}
+
+				/* don't try to open more than once */
+
+				cachesetup = NULL;
+			}
+
+			/* write to cache before pproc */
+
+			if(cache) {
+				long len = length;
+				if(database_write(cache,w,buffer,&len) != 0)
+				{
+					database_close(cache);
+					cache = NULL;
+				}
+			}
+
+			pp[0].inlen  = length;
+			pp[0].outlen = pp[0].buflen;
+			n = 0;
+			ret = pproc(pp,&n);
+			length = pp[0].outlen;
+			buffer = pp[0].buffer;
+
+			if(ret == 0)
+			{
+				int i = 0;
+				for(i = 0; i<n; ++i)
+				{
+					long written = pp[i].outlen;
+					if(fields)
+						grib_to_request(w,pp[i].buffer,written);
+					ret = database_write(target,w,pp[i].buffer,&written);
+					if(ret == NOERR)
+						(*cnt)++;
+					else 
+						done = true;
+					total_target += written;
+				}
+			}
+			else 
+			{
+				if(ret == BUF_TO_SMALL)
+				{
+					marslog(LOG_WARN,
+						"Buffer is too small (%d bytes, %d needed. Retrying)",
+						buflen,length);
+					release_mem(buffer);
+					buffer = NULL;
+					buflen = length;
+				}
+			
+				done = true;
+			}
+			break;
+
+		case EOF:
+			ret  = 0;
+			done = true;
+			break;
+
+		case BUF_TO_SMALL:
+			marslog(LOG_WARN,
+			    "Buffer is too small (%d bytes, %d needed. Retrying)",
+			    buflen,length);
+			release_mem(buffer);
+			buffer = NULL;
+			buflen = length;
+			done = true;
+			break;
+
+
+		case RETRY_ERR:
+			marslog(LOG_WARN,"Retrying..");
+			(*cnt) = 0;
+			database_control(target,CNTL_REWIND,NULL,0);
+			done = true;
+			break;
+
+		case NOT_FOUND_7777:
+			marslog(LOG_EROR,"Group 7777 not found at the end of GRIB message");
+			database_control(target,CNTL_ERROR,&ret,sizeof(ret));
+			done = true;
+			break;
+
+		case POSTPROC_ERROR:
+			marslog(LOG_EROR,"Error in interpolation. Exit");
+			database_control(target,CNTL_ERROR,&ret,sizeof(ret));
+			done = true;
+			break;
+
+		default:
+			marslog(LOG_DBUG,"Get error %d while reading data",ret);
+			done = true;
+			break;
+		}
+	}
+
+	/* ppdone(); */
+
+	for(i=0; i<nbuffers; ++i)
+	{
+		if(pp[i].buffer) release_mem(pp[i].buffer);
+		pp[i].buffer = NULL;
+	}
+
+	free_all_requests(w);
+
+	if(ret == NOERR)
+	{
+
+		if( enough(r,*cnt) )
+		{
+			if(fetch(r))
+			{
+				/* some message here */
+			}
+			if(observation(r) || track(r))
+			{
+				int in,out;
+				ppcount(&in,&out);
+				marslog(LOG_INFO,"%d reports retrieved from '%s'",in,name);
+				marslog(LOG_INFO,"%d reports left after filtering",out);
+				log_statistics("reports","%d",out);
+			}
+			else if(feedback(r) || bias(r))
+			{
+				marslog(LOG_INFO,"%d reports retrieved from '%s'",*cnt,name);
+				log_statistics("reports","%d",*cnt);
+			}
+			else if(is_odb(r))
+			{
+				marslog(LOG_INFO,"%d ODB message%s retrieved from '%s'",*cnt,*cnt==1?"":"s",name);
+				log_statistics("odbs","%d",*cnt);
+			}
+			else
+			{
+				marslog(LOG_INFO,"%d field%s retrieved from '%s'",*cnt,*cnt==1?"":"s",name);
+				log_statistics("fields","%d",*cnt);
+			}
+
+			log_statistics("database","%s",name);
+			log_statistics("bytes","%lld",total);
+			log_statistics("written","%lld",total_target);
+		}
+		else
+			ret = TOO_SHORT_ERR; /* we don't have enough data */
+
+	}
+
+	if(base)  {
+		database_close(base);
+		qmonitor("close %s",name);
+	}
+	if(cache) {
+		database_close(cache);
+		qmonitor("close %s",cachename);
+	}
+
+	return ret;
+}
+
+void mars_task(void)
+{
+}
+
+
+static err visit_database(request *r,request *s,
+	database *target,int need,int* cnt, postproc pproc)
+{
+	err e = 0;
+	char buf[1024];
+	timer *t;
+	int retry = 0;
+	int slp = 2;
+	const char *dbname = get_value(s,"name",0);
+
+	sprintf(buf,"Visiting %s",dbname);
+	t=get_timer(buf,NULL,true);
+
+	timer_start(t);
+	do { 
+		*cnt = need;
+		marslog(LOG_DBUG,"Visiting database '%s'",dbname);
+		e  = retrieve(r,s,target,cnt, pproc); 
+		if(e == RETRY_ERR)
+		{
+			if(retry<mars.maxretries)
+			{
+				retry++;
+				marslog(LOG_WARN,"Sleeping %d minutes",slp);
+				sleep(slp*60);
+			}
+			else
+			{
+				e = -2;
+				marslog(LOG_WARN,"Giving up after %d retries",retry);
+			}
+		}
+
+		if(e == RETRY_FOREVER_ERR)
+		{
+			if(slp<20) 
+				slp += 2;
+			marslog(LOG_WARN,"Sleeping %d minutes",slp);
+			sleep(slp*60);
+		}
+
+	} while(e == BUF_TO_SMALL || e == RETRY_ERR || e == RETRY_FOREVER_ERR);
+	timer_stop(t,0);
+
+	return e;
+}
+
+err handle_retrieve(request *r,void *data)
+{
+	int need = count_fields(r);
+	int cnt  = 0;
+	database *target;
+	err e,f;
+	request *u   = r->next;
+	request *env = get_environ();
+	request *s   = mars.setup;
+	int bases = count_values(r,"DATABASE");
+	postproc  pproc;
+	boolean isbufr = is_bufr(r);
+	boolean fields = !isbufr && !fetch(r) && !image(r) && !is_odb(r);
+
+	const char *p      = get_value(r,"EXPECT",0);
+	boolean    expect     = p?atol(p):0;
+	boolean  expect_any   = (p && (atol(p) == 0));
+
+	visited = 0;
+
+	if(expect_any)
+	{
+		marslog(LOG_INFO,"Requesting any number of %s (request describes %d)",fields?"fields":"observations",count_fields_in_request(r));
+	}
+	else if(fields)
+	{
+		if(all_is_used(r))
+		{
+			marslog(LOG_WARN,"Cannot compute number of fields from request.");
+			marslog(LOG_WARN,"Try to avoid the use of the value 'ALL'");
+		}
+		else
+		{
+			if(need == 0)
+			{
+				marslog(LOG_WARN,"The request does not represent any field");
+				marslog(LOG_WARN,"Inform the MARS group if you think it is unusual");
+			}
+			else
+			{
+				marslog(LOG_INFO,"Requesting %d field%s",need,need==1?"":"s");
+			}
+		}
+	}
+
+	e = -1;
+	target = database_open(targetbase,NULL,r,env,WRITE_MODE);
+	if(target == NULL)
+		return -1;
+
+
+	if(isbufr && mars.bufr_empty_target)
+	{
+		/* For obs, make sure we have at least an empty file */
+		long length = 0;
+		database_write(target,0,0,&length); 
+	}
+
+	r->next = NULL; /* avoid sending to much on the net */
+
+	ppinit(r,&pproc);	
+
+	if(bases != 0)
+	{
+		int i;
+		for(i=0;i<bases;i++)	
+		{
+			const char *b = get_value(r,"DATABASE",i);
+			request *t    = findbase(b);
+			if(t)
+			{
+				int last = i==(bases-1);
+				boolean save = mars.infomissing;
+
+				if(last) mars.infomissing=true;
+				e = visit_database(r,t,target,need,&cnt,pproc);
+				mars.infomissing=save;
+				if(e == NOERR) break;
+			}
+		}
+	}
+	else
+	{
+		while(s)
+		{
+			if(EQ(s->name,"database"))
+			{
+				const char *p = get_value(s,"visit",0);
+				if(p == 0 || !EQ(p,"false"))
+				{
+					e = visit_database(r,s,target,need,&cnt,pproc);
+					if(e == NOERR) break;
+				}
+			}
+
+			s = s->next;
+		}
+	}
+
+	r->next = u;
+
+	ppdone();
+
+	if((e == EOF) || (e == TOO_SHORT_ERR) )
+	{
+
+		if(!enough(r,cnt) && (is_bufr(r) || is_odb(r)) && visited > 0)
+		{
+			e = NOERR;
+		} 
+		else if(!enough(r,cnt))
+		{
+			const char* expect = get_value(r,"EXPECT",0);
+			if(expect == NULL || atol(expect) != 0)
+			{
+				if(all_is_used(r))
+					marslog(LOG_EROR,"MARS considers %d fields retrieved are not enough",cnt);
+				else
+					marslog(LOG_EROR,"Expected %d, got %d.", need,cnt);
+				e = -1;
+			}
+			else {
+				if(e == TOO_SHORT_ERR)
+				{
+					long length = 0;
+					marslog(LOG_WARN,"No data, but EXPECT was provided");
+					database_write(target,0,0,&length); 
+					e = 0;
+				}
+			}
+		}
+	}
+
+	if(e)
+		database_control(target,CNTL_ERROR,&e,sizeof(e));
+
+	f = database_close(target);
+	if(f && !e) e = f;
+
+	if(visited == 0)
+	{
+		marslog(LOG_EROR,"Could not find a MARS database to perform request");
+		e = -2;
+	}
+
+	if(e) marslog(LOG_EROR,"Request failed");
+
+	return e;
+
+}
diff --git a/src/libMars/rpcmars.x b/src/libMars/rpcmars.x
new file mode 100644
index 0000000..1b94271
--- /dev/null
+++ b/src/libMars/rpcmars.x
@@ -0,0 +1,134 @@
+%#include <stdio.h>
+%#include <rpc/xdr.h>
+#ifdef RPC_HDR
+%typedef char *cache_t;
+%typedef void *void_t;
+#endif
+
+struct value {
+
+%	/*  request part */
+
+	struct value *next;
+	cache_t         name;
+
+%	/* language part */
+
+	struct value     *other_names;
+	struct value     *ref;
+
+#ifdef RPC_HDR
+	struct value     *expand;
+#endif
+
+};
+
+struct request {
+	struct request   *next;
+	struct parameter *params;
+	cache_t         name;
+	cache_t         info;
+	cache_t         kind;
+
+#ifdef RPC_HDR
+	void_t           data; /* user data */
+	long             order;
+#endif
+
+};
+
+struct parameter {
+
+%	/*  request part */
+
+	struct parameter *next;
+	struct value     *values;
+	cache_t         name;
+	int              count;
+	struct request   *subrequest;
+
+%	/* language part */
+
+	struct value     *default_values;
+	struct value     *current_values;
+#ifdef RPC_HDR
+	struct value     *ibm_values;
+	struct request   *interface;
+#endif
+
+
+};
+
+struct netblk {
+	int            vers;
+	int            code;
+	int            error;
+
+    struct request *req;
+    struct request *env;
+
+	int            mode;
+	int            check;
+
+	long           bufsize;
+	opaque         data<>;
+};
+
+struct netlock {
+	string			resource<>;
+	int				mode;
+};
+
+struct cache_index {
+	struct request *index;
+};
+
+#ifdef RPC_XDR
+
+%/* on hp, xdr don't use malloc.... , so let's
+%override the calls */
+
+#ifdef hpux
+%char *_rpc_malloc(int size)
+%{
+%  return (char*)malloc(size);
+%}
+%
+%void _rpc_free(char *p)
+%{
+%  free(p);
+%}
+#endif
+
+%bool_t xdr_cache_t(XDR *xdrs,char **name)
+%{
+%   extern char* strcache();
+%	char *sp = *name;
+%
+%	switch (xdrs->x_op)
+%	{
+%
+%	case XDR_FREE:
+%		if(sp != NULL) strfree(sp);
+%		*name = NULL;
+%		break;
+%
+%	case XDR_ENCODE:
+%		if(sp == NULL) sp = "";
+%		return xdr_string(xdrs,&sp, ~0);
+%		break;
+%
+%	case XDR_DECODE:
+%
+%		if(!xdr_string(xdrs,&sp, ~0))
+%			return FALSE;
+%
+%		*name = strcache(sp);
+%		free(sp);
+%
+%		break;
+%	}
+%	return TRUE;
+%}
+
+#endif
diff --git a/src/libMars/schedule.c b/src/libMars/schedule.c
new file mode 100644
index 0000000..39c8098
--- /dev/null
+++ b/src/libMars/schedule.c
@@ -0,0 +1,366 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <time.h>
+#include <sys/time.h>
+
+static void get_date_for_schedule(long *year,long *month,long *day,long *hour,long *minute,long *second)
+{
+	char *schedule_fake_now = getenv("SCHEDULE_FAKE_NOW");
+	const char *who  = user();	
+	time_t now;
+	struct tm* t;
+	time(&now);
+	t = gmtime(&now);
+
+	marslog(LOG_DBUG,"-> get_date_for_schedule");
+	/* Only 'max' can fake current time in order to test the schedule */
+	if((schedule_fake_now != NULL) && EQ(who,"max"))
+	{
+		request *rnow = read_request_file(schedule_fake_now);
+		*year   = atol(get_value(rnow,"year",0));
+		*month  = atol(get_value(rnow,"month",0));
+		*day    = atol(get_value(rnow,"day",0));
+		*hour   = atol(get_value(rnow,"hour",0));
+		*minute = atol(get_value(rnow,"minute",0));
+		*second = atol(get_value(rnow,"second",0));
+		marslog(LOG_WARN,"Date has been changed to: %d%02d%02d %02d:%02d:%02d",*year,*month,*day,*hour,*minute,*second);
+		free_all_requests(rnow);
+	}
+	else
+	{
+		*year   = (t->tm_year+1900);
+		*month  = (t->tm_mon+1);
+		*day    = t->tm_mday;
+		*hour   = t->tm_hour;
+		*minute = t->tm_min;
+		*second = t->tm_sec;
+	}
+	marslog(LOG_DBUG,"<- get_date_for_schedule");
+}
+
+
+static boolean user_category_allowed(request *allow, request *env)
+{
+	request *r = env;
+	int i = 0;
+	const char *allowed_category = NULL;
+	boolean ok = false;
+
+	while( (allowed_category = get_value(allow,"category",i++)) && !ok)
+	{
+		int j =  0;
+		const char *cat = NULL;
+
+		while((cat = get_value(env,"category",j++)) && !ok)
+			ok = EQ(cat,allowed_category);
+
+		if(!ok)
+			marslog(LOG_DBUG,"user_category_allowed did not match category '%s'",allowed_category);
+		else
+			marslog(LOG_DBUG,"User category '%s' allowed to retrieve products before schedule",allowed_category);
+	}
+
+	return ok;
+}
+
+
+static void debug_schedule()
+{
+
+	if(mars.dissemination_schedule & (SCHEDULE_INFORM & SCHEDULE_INFORM_FUTURE_CHANGE))
+	{
+		marslog(LOG_WARN,"MARS internal error: SCHEDULE_INFORM & SCHEDULE_INFORM_FUTURE_CHANGE set");
+	}
+
+	if(mars.debug)
+	{
+		if(mars.dissemination_schedule & SCHEDULE_INFORM)
+			marslog(LOG_INFO,"mars.dissemination_schedule & SCHEDULE_INFORM set");
+		if(mars.dissemination_schedule & SCHEDULE_INFORM_FUTURE_CHANGE)
+			marslog(LOG_INFO,"mars.dissemination_schedule & SCHEDULE_INFORM_FUTURE_CHANGE set");
+		if(mars.dissemination_schedule & SCHEDULE_FAIL)
+			marslog(LOG_INFO,"mars.dissemination_schedule & SCHEDULE_FAIL set");
+		if(mars.dissemination_schedule & SCHEDULE_LOG)
+			marslog(LOG_INFO,"mars.dissemination_schedule & SCHEDULE_LOG set");
+		if(mars.dissemination_schedule & SCHEDULE_MAIL)
+			marslog(LOG_INFO,"mars.dissemination_schedule & SCHEDULE_MAIL set");
+	}
+}
+
+
+boolean check_dissemination_schedule(request *user, request *env, boolean logstat)
+{
+	static request *r = 0;
+	request *schedule = NULL;
+	err e = NOERR;
+	int i = 0;
+	hypercube *cube = new_hypercube_from_mars_request(user);
+	long release_seconds = -1;
+	request *max_schedule = NULL;
+	request *allow = NULL;
+	boolean allowed = false;
+	boolean dont_log_users_product_before_schedule = (getenv("MARS_DONT_LOG_USERS_PRODUCT_BEFORE_SCHEDULE") != NULL);
+	char buf[80];
+
+
+	start_timer();
+	marslog(LOG_DBUG,"Enter 'check_dissemination_schedule'");
+
+	debug_schedule();
+
+	if(!r) r = read_request_file(mars.dissemination_schedule_file);
+
+	allow = empty_request("allow");
+	set_value(allow,"category","product_before_schedule");
+
+	if(!r)
+	{
+		FILE *f  = mail_open("max at ecmwf.int","Error while reading MARS schedule");
+		mail_msg(f,"Error while reading MARS schedule from '%s'",mars.dissemination_schedule_file);
+		mail_request(f,"User:",env);
+		mail_request(f,"User request:",user);
+		mail_close(f);
+
+		marslog(LOG_WARN,"Error while reading MARS schedule from '%s'",mars.dissemination_schedule_file);
+		marslog(LOG_WARN,"Please, inform mars at ecmwf.int");
+
+		/* Allowed users will carry on*/
+		if(allowed = user_category_allowed(allow,env))
+		{
+			marslog(LOG_WARN,"MARS schedule ignored");
+			return 0;
+		}
+		return -1;
+	}
+	else
+	{
+		schedule = r;
+	}
+
+	if(EQ("allow",r->name))
+	{
+		free_all_requests(allow);
+		allow = r;
+		schedule = r->next;
+	}
+
+	if((allowed = user_category_allowed(allow,env)) && dont_log_users_product_before_schedule)
+		return 0; 
+
+	while(schedule)
+	{
+		const request *schedule_request = get_subrequest(schedule,"request",0);
+		const request *release_request  = get_subrequest(schedule,"release",0);
+		int release_delta_day = -1;
+
+		if(cube_contains(cube,schedule_request))
+		{
+			long t = atol(get_value(release_request,"release_seconds",0));
+			long d = atol(get_value(release_request,"release_delta_day",0));
+
+			t += d*24*3600;
+
+			if(t > release_seconds)
+			{
+				release_seconds = t;
+				max_schedule = schedule;
+			}
+			marslog(LOG_DBUG,"check_dissemination_schedule: cube_order %d",cube_contains(cube,schedule_request));
+
+			if(mars.debug)
+			{
+				marslog(LOG_DBUG,"schedule request is:");
+				print_all_requests(schedule_request);
+
+				marslog(LOG_DBUG,"release request is:");
+				print_all_requests(release_request);
+			}
+
+		}
+
+		schedule = schedule->next;
+	}
+	marslog(LOG_DBUG,"Release seconds: %ld",release_seconds);
+
+    stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Verify schedule: %s",buf);
+
+	if(release_seconds != -1)
+	{
+		double jnow, judate, delta;
+		long year, month, day, hour, minute, second;
+		long user_date = 0;
+
+		get_date_for_schedule(&year,&month,&day,&hour,&minute,&second);
+
+		jnow   = date_to_julian(year*10000+month*100+day) + hour/24.0 + minute/24.0/60.0 + second/24.0/60.0/60.0;
+
+		/* This causes problems with Climatology, Monthly means and
+		   the like, although they should not match any dissemination schedule */
+		for(i = 0; i<count_values(user,"DATE");++i)
+		{
+			const char *p = get_value(user,"DATE",i);
+			long d = 0;
+			if(is_number(p))
+				d = atol(p);
+			else
+			{
+				long julian = 0,second = 0; boolean isjul;
+				parsedate(p,&julian,&second,&isjul);
+				d = julian_to_date(julian,mars.y2k);
+			}
+			if(d > user_date)
+				user_date = d;
+		}
+		/* For Hindcasts, date to block is REFDATE */
+		for(i = 0; i<count_values(user,"REFDATE");++i)
+		{
+			const char *p = get_value(user,"REFDATE",i);
+			long d = 0;
+			if(is_number(p))
+				d = atol(p);
+			else
+			{
+				long julian = 0,second = 0; boolean isjul;
+				parsedate(p,&julian,&second,&isjul);
+				d = julian_to_date(julian,mars.y2k);
+			}
+			if(d > user_date)
+				user_date = d;
+		}
+
+		judate = date_to_julian(user_date) + release_seconds/24.0/60.0/60.0;
+		delta  = (judate-jnow)* 24*60*60;
+		
+		marslog(LOG_DBUG,"jnow: %0.30f judate : %0.30f",jnow,judate);
+		if(judate <= jnow)
+		{
+			delta = -delta;
+			/* printf("OK since %ld sec=%ld min=%ld hour\n",delta,delta/60,delta/60/60); */
+			e = 0;
+		}
+		else
+		{
+			struct {
+				long second;
+				long minute;
+				long hour;
+				long days;
+			} release;
+			const request *schedule_request = get_subrequest(max_schedule,"request",0);
+			const request *release_request  = get_subrequest(max_schedule,"release",0);
+			long release_second = delta + hour*60*60 + minute*60 + second + 0.5;
+			long release_minute = 0;
+			long release_hour   = 0;
+			long release_days   = 0;
+			char msg[64];
+
+			if(logstat)
+			{
+				const char *trigger = getenv("MSJ_PATH");
+				boolean suite = (trigger != NULL);
+
+				if(allowed)
+				{
+					log_statistics("schedule","allowed");
+				}
+				else
+				{
+					if(suite)
+						log_statistics("schedule","%s",trigger);
+					else
+						log_statistics("schedule","user");
+				}
+			}
+
+			if(allowed)
+			{
+				/* We could print a message to tell allowed users that this data 
+				   should not be passed on externally, if HO wants */
+				return 0;
+			}
+
+			release.second = delta + hour*60*60 + minute*60 + second + 0.5;
+			release.minute = 0;
+			release.hour   = 0;
+			release.days   = 0;
+
+			release.hour    = release.second/60/60;
+			release.second -= release.hour*60*60;
+			if(release.hour>=24)
+			{
+				release.days  = (int)(release.hour/24);
+				release.hour -= release.days*24;
+				sprintf(msg,"after %ld day%s at",release.days,(release.days>1)?"s":"");
+			}
+			else
+				sprintf(msg,"for after");
+
+			release.minute  = release.second/60;
+			release.second -= release.minute*60;
+
+			if((mars.dissemination_schedule & SCHEDULE_INFORM_FUTURE_CHANGE) && !allowed)
+			{
+				marslog(LOG_WARN,"On 1st February 2006, MARS access will be");
+				marslog(LOG_WARN,"harmonised with the dissemination schedule");
+				marslog(LOG_WARN,"Executing this request after that day will");
+				marslog(LOG_WARN,"fail and show the following warning:");
+			}
+
+			if((mars.dissemination_schedule & SCHEDULE_INFORM ||
+			   mars.dissemination_schedule & SCHEDULE_INFORM_FUTURE_CHANGE) && !allowed)
+			{
+				int loglevel = LOG_WARN;
+
+				if(mars.dissemination_schedule & SCHEDULE_FAIL)
+					loglevel = LOG_EROR;
+				marslog(loglevel,"Data not yet available. Scheduled %s %02ld:%02ld:%02ld, (%s)",
+							msg, release.hour,release.minute,release.second,
+			                get_value(release_request,"release_time",0));
+
+				marslog(loglevel,"User request matches the following schedule rule:");
+				marslog(loglevel,"      DATE = %ld",user_date);
+				marslog(loglevel,"      TIME = %s",get_value(schedule_request,"TIME",0));
+				if(get_value(schedule_request,"STEP",0) != 0)
+				{
+					if(count_values(schedule_request,"STEP") > 1)
+						marslog(loglevel,"      STEP = %s/...",get_value(schedule_request,"STEP",0));
+					else
+						marslog(loglevel,"      STEP = %s",get_value(schedule_request,"STEP",0));
+				}
+				marslog(loglevel,"      RELEASE = %s",get_value(release_request,"release_time",0));
+			/* printf("NOT OK %ld sec=%ld min=%ld hour\n",delta,delta/60,delta/60/60); */
+			}
+
+			if((mars.dissemination_schedule & SCHEDULE_INFORM_FUTURE_CHANGE) && !allowed)
+				marslog(LOG_WARN,"Continue with the request execution");
+
+			if(mars.dissemination_schedule & SCHEDULE_MAIL)
+			{
+				FILE *f  = mail_open(mars.authmail,"MARS request issued before schedule");
+				marslog(LOG_DBUG,"check_dissemination_schedule: send email to '%s'",mars.authmail);
+				mail_msg(f,"Request issued on %d%02d%02d at %02d:%02d:%02d",year,month,day,hour,minute,second);
+				mail_request(f,"User:",env);
+				mail_request(f,"Matching schedule:",schedule_request);
+				mail_request(f,"User request:",user);
+				mail_close(f);
+			}
+			e = 1;
+		}
+	}
+
+	marslog(LOG_DBUG,"Exit 'check_dissemination_schedule'");
+
+	free_hypercube(cube);
+
+	return e;
+}
diff --git a/src/libMars/server.c b/src/libMars/server.c
new file mode 100755
index 0000000..584c0c8
--- /dev/null
+++ b/src/libMars/server.c
@@ -0,0 +1,371 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include <signal.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include "mars.h"
+#ifdef sgi
+#include <bstring.h>
+#endif
+
+static int cnt = 0;     /* Number of kids */
+static int clients = 0; /* Number of clients processed */
+
+static void no_zombies(int sig
+#if defined(__cplusplus) || defined(c_plusplus)
+	,...
+#endif
+)
+{
+	int status;
+	pid_t pid;
+
+
+#ifdef sun_bsd
+	while((pid = wait3(&status,WNOHANG,NULL)) > 0 ) {
+#else
+	pid = wait(&status);
+#endif
+	cnt--;
+	marslog(LOG_DBUG,"Remaining tasks %d",cnt);
+
+
+	if(WIFEXITED(status) && WEXITSTATUS(status))
+	{
+		marslog(LOG_WARN,"task pid %d terminated with exit %d",
+		    pid,WEXITSTATUS(status));
+		if(WEXITSTATUS(status) == 9)
+			marslog(LOG_EXIT,"Exiting...");
+	}
+
+	if(WIFSIGNALED(status))
+	{
+		marslog(LOG_WARN,"task pid %d terminated by signal %d",
+		    pid,WTERMSIG(status));
+
+		/* due to s sgi bug, exit if child is dead ... */
+
+		if(WTERMSIG(status) == SIGBUS || WTERMSIG(status) == SIGSEGV )
+			marslog(LOG_EXIT,"Exiting...");
+	}
+
+	if(WIFSTOPPED(status))
+		marslog(LOG_WARN,"task pid %d stopped by signal %d",
+		    pid,WSTOPSIG(status));
+
+	/* SysV need signal handler to be reinstalled */
+
+#ifdef sun_bsd
+	} /* end of while loop */
+#endif
+	signal(SIGCHLD,no_zombies);
+}
+
+struct sockaddr_in* addr_of(int soc)
+{
+	static struct sockaddr_in sin;
+	marssocklen_t len = sizeof(sin);
+
+	if(getsockname(soc,(struct sockaddr*)&sin,&len) != 0)
+		marslog(LOG_EROR|LOG_PERR,"getsockname");
+	return &sin;
+}
+
+int tcp_server(int port)
+{
+
+	int flg;
+	int s;
+	struct sockaddr_in sin;
+
+#ifdef SO_LINGER
+	struct  linger ling;
+#endif
+
+	s = socket(AF_INET, SOCK_STREAM, 0);
+
+	if (s < 0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"socket");
+		return -1;
+	}
+
+	if(port != 0)
+	{
+		flg = 1 ;
+		if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (msockopt)&flg, sizeof(flg))<0)
+			marslog(LOG_WARN|LOG_PERR,"setsockopt SO_REUSEADDR");
+	}
+
+	flg = 1 ;
+	if(setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (msockopt)&flg, sizeof(flg))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_KEEPALIVE");
+
+
+#if 0
+#ifdef SO_REUSEPORT
+	flg = 1 ;
+	if(setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (msockopt)&flg, sizeof(flg))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_REUSEPORT");
+#endif
+#endif
+
+#ifdef SO_LINGER
+	ling.l_onoff = 0;
+	ling.l_linger = 0;
+	if(setsockopt(s, SOL_SOCKET, SO_LINGER, (msockopt)&ling, sizeof(ling))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_LINGER");
+#else
+#ifdef SO_DONTLINGER
+	if(setsockopt(s, SOL_SOCKET, SO_DONTLINGER, NULL, 0)<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_DONTLINGER");
+#endif
+#endif
+
+
+	bzero(&sin, sizeof(struct sockaddr_in));
+	sin.sin_port        = htons(port);
+	sin.sin_family      = AF_INET;
+	sin.sin_addr.s_addr = INADDR_ANY;
+
+	while (bind(s, (struct sockaddr*)&sin, sizeof(struct sockaddr_in)) == -1 )
+	{
+		marslog(LOG_WARN|LOG_PERR,"bind port = %d",port);
+		if(port == 0) {
+			close(s);
+			return -1;
+		}
+		sleep(5);
+	}
+
+	socket_buffers(s);
+
+	if(listen(s, 5)==-1)
+	{
+		close(s);
+		marslog(LOG_EROR|LOG_PERR,"listen");
+		return -1;
+	}
+
+	signal(SIGPIPE,SIG_IGN);
+
+	return s;
+
+}
+
+const char *host_of(struct sockaddr_in* from)
+{
+	struct hostent  *remote;
+
+	remote = gethostbyaddr((char*)&from->sin_addr,
+	    sizeof(from->sin_addr),
+	    from->sin_family);
+
+	if(remote) 
+		return remote->h_name;
+	else 
+		return inet_ntoa(from->sin_addr);
+
+}
+
+int port_of(struct sockaddr_in *from)
+{
+	return ntohs(from->sin_port);
+}
+
+void print_address(const char* name, struct sockaddr_in *from)
+{
+    if(mars.show_hosts)
+    {
+        if(from->sin_family == AF_INET)
+        {
+            char *net = inet_ntoa(from->sin_addr);
+            struct hostent  *remote;
+
+            remote = gethostbyaddr((char*)&from->sin_addr,
+                sizeof(from->sin_addr),
+                from->sin_family);
+
+            if(remote)
+                marslog(LOG_INFO,"%s %s (%s) %d",name,
+                    remote->h_name,net,ntohs(from->sin_port));
+            else
+                marslog(LOG_INFO,"%s %s %d",name,net,ntohs(from->sin_port));
+
+        }
+        else marslog(LOG_INFO,"%s (connection is not from internet) %d",name,from->sin_family);
+    }
+}
+
+void server_run(int port,taskproc task,void *data)
+{
+
+	struct sockaddr_in from;
+	int s;
+	int snew;
+	marssocklen_t fromlen;
+#ifdef SIG_BLOCK 
+	sigset_t set;
+#endif
+
+	/* Start real server */
+
+	s = tcp_server(port);
+	if(s < 0) marslog(LOG_EXIT,"Exiting server");
+
+	/* Dont't create zombies */
+
+	signal(SIGCHLD,no_zombies);
+
+	/* Dont't get killed by pipes */
+	signal(SIGPIPE,SIG_IGN);
+
+	/* Ignore hang up */
+	signal(SIGHUP,SIG_IGN);
+
+	/* loginit(stdout,stdout); */
+	marslog(LOG_INFO,"Starting Server - port %d",port);
+
+	for(;;)
+	{
+
+		fromlen = sizeof(from);
+		if((snew = accept(s, (struct sockaddr*)&from, &fromlen))<0)
+		{
+			if(errno != EINTR)
+				/* Interrupted system call : got on SIGCHLD signals */
+				marslog(LOG_WARN|LOG_PERR,"accept");
+		}
+		else
+		{
+			pid_t child_pid;
+			marslog(LOG_DBUG,"Got connection");
+
+			if(from.sin_family != AF_INET)
+			{
+				marslog(LOG_INFO,"connection is not from internet");
+				close(snew);
+				continue;
+			}
+			else if(mars.debug)
+				print_address("Got tcp connection",&from);
+
+			fflush(0);
+#ifdef SIG_BLOCK 
+            sigemptyset(&set);
+            sigaddset(&set, SIGCHLD);
+            sigprocmask(SIG_BLOCK, &set, NULL);
+#else
+			sighold(SIGCHLD);
+#endif
+
+			if(mars.nofork)
+			{
+				task(snew,1,data);
+				close(snew);
+			}
+			else switch(child_pid = fork())
+			{
+			case 0:
+				close(s);
+				if(mars.show_pid)
+					mars.show_pid = getpid();
+				task(snew,cnt+1,data);
+				marsexit(0);
+				break;
+
+			case -1:
+				marslog(LOG_EROR|LOG_PERR,"Cannot fork");
+				close(snew);
+				break;
+
+			default:
+				cnt++;
+				clients++;
+				close(snew);
+				break;
+			}
+
+			if(mars.clients && (clients == mars.clients))
+			{
+				int status;
+				marslog(LOG_INFO,"%d connection(s) satisfied",clients);
+				marslog(LOG_INFO,"%d outstanding task(s)",cnt);
+				marslog(LOG_INFO,"Waiting for child process id %d to finish",child_pid);
+				waitpid(child_pid,&status,0);
+				marslog(LOG_INFO,"Exiting...");
+				marsexit(0);
+			}
+
+#ifdef SIG_BLOCK 
+			sigprocmask(SIG_UNBLOCK, &set, NULL);  
+#else
+			sigrelse(SIGCHLD);
+#endif
+
+		}
+	}
+}
+
+int server_mode(int *port,char *address)
+{
+	char    me[MAXHOSTNAMELEN];
+	int     s = tcp_server(0); /* 0 means system chooses port */
+	struct hostent *h;
+	struct  sockaddr_in sin;
+	marssocklen_t len = sizeof(sin);
+	int     max = 10;
+	int     cnt = 0;
+
+	while(s<0) {
+		sleep(10);
+		s = tcp_server(0);
+		if(cnt++ > max)
+			return -1;
+	}
+
+	if(getsockname(s,(struct sockaddr*)&sin,&len)<0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"getsockname");
+		close(s);
+		return -1;
+	}
+
+	*port = ntohs(sin.sin_port);
+
+	if(gethostname(me,sizeof(me))<0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"gethostname");
+		close(s);
+		return -1;
+	}
+
+	if((h = gethostbyname(me)) == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"gethostbyname");
+		close(s);
+		return -1;
+	}
+
+	bcopy(h->h_addr_list[0],&sin.sin_addr,h->h_length);
+
+
+	strcpy(address,inet_ntoa(sin.sin_addr));
+
+	return s;
+
+}
diff --git a/src/libMars/service.c b/src/libMars/service.c
new file mode 100644
index 0000000..380fc55
--- /dev/null
+++ b/src/libMars/service.c
@@ -0,0 +1,1225 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <stdarg.h>
+#include <errno.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <sys/wait.h>
+#ifdef sgi
+#include <bstring.h>
+#endif
+
+/* #include <netinet/tcp.h> */
+
+#ifdef CRAY
+typedef u_long xdr_t;
+#else
+typedef void *xdr_t;
+#endif
+
+
+static err send_any(svc *s,char *name,const request *r,request *info);
+
+static void server_dead(svc *s)
+{
+	close(s->soc);
+	s->soc = -1;
+	marslog(LOG_EXIT,"Server %s port %d is dead",s->host,s->port);
+}
+
+err encode_request(const request *r,XDR *x)
+{
+	struct netblk blk;
+	extern int _tcpdbg;
+	/* _tcpdbg = 1;  */
+
+	bzero(&blk,sizeof(blk));
+	blk.req = (request*)r;
+	x->x_op = XDR_ENCODE;
+
+	marslog(LOG_DBUG,"encode_request : xdr_netblk %s %s",
+	    r?r->name:"?",(r && r->next)?r->next->name:"?");
+
+	if(!xdr_netblk(x,&blk))
+	{
+		/* marslog(LOG_WARN,"encode_request : xdr_netblk"); */
+		return -2;
+	}
+
+	marslog(LOG_DBUG,"encode_request : xdrrec_endofrecord");
+
+	if(!xdrrec_endofrecord(x,true))
+	{
+		/* marslog(LOG_WARN,"encode_request : xdrrec_endofrecord"); */
+		return -2;
+	}
+
+
+	/* _tcpdbg = 0; */
+	return 0;
+}
+
+request *decode_request(XDR *x)
+{
+	struct netblk blk;
+	request *r;
+	request *s;
+	extern int _tcpdbg;
+	/* _tcpdbg = 1;  */
+
+	bzero(&blk,sizeof(blk));
+
+
+	x->x_op = XDR_DECODE;
+
+	marslog(LOG_DBUG,"decode_request : xdrrec_skiprecord");
+
+	if(!xdrrec_skiprecord(x))
+	{
+		/* marslog(LOG_WARN,"decode_request : xdrrec_skiprecord"); */
+		return (void*)-1;
+	}
+
+	marslog(LOG_DBUG,"decode_request : xdr_netblk");
+
+	if(!xdr_netblk(x,&blk))
+	{
+		/* marslog(LOG_WARN,"decode_request : xdr_netblk"); */
+		return (void*)-1;
+	}
+
+	r = blk.req;
+
+	marslog(LOG_DBUG,"decode_request : --------> %s %s",
+	    r?r->name:"?",(r && r->next)?r->next->name:"?");
+
+	blk.req = NULL;
+	xdr_free((xdrproc_t) xdr_netblk, (char*) &blk);
+
+	/* _tcpdbg = 0; */
+
+	s = r;
+	while(s)
+	{
+		parameter *p = s->params;
+		while(p)
+		{
+			p->count = 0;
+			p = p->next;
+		}
+		s = s->next;
+	}
+
+
+	return r;
+}
+
+
+void destroy_service(svc *s)
+{
+	send_any(s,"EXIT",NULL,NULL);
+	close(s->soc);
+	xdr_destroy(&s->x);
+	FREE(s);
+}
+
+static void register_service(svc *s)
+{
+	char    host[80];
+	request *r = empty_request("REGISTER");
+
+	gethostname(host,sizeof(host));
+
+	set_value(r,"USER",   "%s", user());
+	set_value(r,"NAME",   "%s", s->name);
+	set_value(r,"HOST",   "%s", host);
+	set_value(r,"PID",    "%d", getpid());
+
+	svc_connect(s);
+	if(encode_request(r,&s->x)<0) server_dead(s);
+	free_all_requests(r);
+}
+
+err svc_connect(svc *s)
+{
+
+	if(s->soc>=0)
+		return 0;
+
+	if((s->soc = call_server(s->host,s->port,1))<0)
+	{
+		marslog(LOG_EROR,"Cannot connect to server");
+		exit(8); /* The value 8 is used in the script */
+	}
+
+	if(fcntl(s->soc,F_SETFD,FD_CLOEXEC)<0)
+		marslog(LOG_EROR|LOG_PERR,"fcntl");
+
+	marslog(LOG_DBUG,"Connected to server");
+	register_service(s);
+
+	return 0;
+}
+
+static void _record(svcid *id,request *r,void *data)
+{
+	const char *p = get_value(r,"switch",0);
+	id->s->recording = p && (strcmp(p,"on") == 0);
+}
+
+svc  *create_service(const char *name)
+{
+	char    buf[128];
+	svc     *s = NEW_CLEAR(svc);
+	char    *host = getenv("EVENT_HOST");
+	char    *port = getenv("EVENT_PORT");
+
+	s->host = host?host:"localhost";
+	s->port = port?atoi(port):8000;
+
+	if(name == NULL) {
+		sprintf(buf,"%s@%d",progname(),getpid());
+		name = buf;
+	}
+
+	s->soc   = -1;
+	s->name  = strcache(name);
+
+	xdrrec_create(&s->x,0,0,(mxdrparam)&s->soc,
+	    (mxdrproc)readtcp,(mxdrproc)writetcp);
+
+	svc_connect(s);
+
+
+	return s;
+}
+
+
+static svcid *new_id(svc *s,request *r)
+{
+	svcid *id  = NEW_CLEAR(svcid);
+
+	id->s     = s;
+	id->r     = r;
+	id->next  = s->id;
+	s->id     = id;
+
+	return id;
+
+}
+
+void set_svc_err(svcid *id,err e)
+{
+	set_value(id->r,"ERR_CODE","%d",e);
+}
+
+err get_svc_err(svcid *id)
+{
+	const char *e = get_value(id->r,"ERR_CODE",0);
+	return e?atoi(e):0;
+}
+
+void set_svc_ref(svcid *id,long r)
+{
+	set_value(id->r,"USER_REF","%ld",r);
+}
+
+long get_svc_ref(svcid *id)
+{
+	const char *r = get_value(id->r,"USER_REF",0);
+	return r?atol(r):0;
+}
+
+const char *get_svc_target(svcid *id)
+{
+	return get_value(id->r,"TARGET",0);
+}
+
+const char *get_svc_source(svcid *id)
+{
+	return get_value(id->r,"SOURCE",0);
+}
+
+const char *get_svc_msg(svcid *id,int n)
+{
+	char *q;
+
+	if(count_values(id->r,"ERROR"))
+		q = "ERROR";
+	else
+		q = "PROGRESS";
+	return get_value(id->r,q,n);
+}
+
+void set_svc_msg(svcid *id,char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+	add_value(id->r,"ERROR","%s",buf);
+}
+
+static void free_id(svc *s,svcid *id)
+{
+	svcid *p = s->id;
+	svcid *q = NULL;
+
+	while(p)
+	{
+		if(p == id)
+		{
+			free_all_requests(p->r);
+			if(q) q->next = p->next;
+			else s->id = p->next;
+			FREE(p);
+			return;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+/*****************************************************************************/
+/* messages */
+/*****************************************************************************/
+
+static err send_any(svc *s,char *name,const request *r,request *info)
+{
+	request *t = empty_request(name);
+
+	/* set_value(t,"SOURCE","%s",s->name); */
+
+	if(info) reqcpy(t,info);
+	t->next = (request*)r;
+
+	svc_connect(s);
+	if(encode_request(t,&s->x)<0) server_dead(s);
+
+	t->next = NULL;
+
+	free_all_requests(t);
+	return 0;
+}
+
+err send_drop_info(svc *s,char *target,request *r,long ref)
+{
+	request *t = empty_request(NULL);
+	err e;
+	set_value(t,"USER_REF", "%ld", ref);
+	if(target) set_value(t,"TARGET",   "%s", target);
+	e = send_any(s,"DROP",r,t);
+	free_all_requests(t);
+	return e;
+}
+
+err send_message(svc *s,request *r)
+{
+	return send_any(s,"MESSAGE",r,NULL);
+}
+
+err send_progress(svcid *id,const char *msg,request *r)
+{
+	err e;
+
+	if(msg) set_value(id->r,"PROGRESS", "%s", msg);
+
+	/*
+	Sylvie and Elisa change this line:e = send_any(id->s,"PROGRESS",NULL,id->r);
+*/
+	e = send_any(id->s,"PROGRESS",r,id->r);
+	unset_value(id->r,"PROGRESS");
+
+	return e;
+}
+
+static int children = 0;
+
+static void death(int sig)
+{
+	int status;
+#ifdef sun
+	while(wait3(&status,WNOHANG,NULL) > 0 )
+		children--;
+#else
+	wait(&status);
+	children--;
+#endif
+	signal(SIGCHLD,death);
+}
+
+int fork_service(svcid *id)
+{
+	int f;
+	char buf[1024];
+#ifdef SIG_BLOCK
+    sigset_t set;
+#endif
+
+
+	if(mars.nofork) return -1;
+
+	if(mars.maxforks > 0 && children>=mars.maxforks)
+		return -1;
+
+	signal(SIGCHLD,death);
+
+#if 0
+	if(mars.maxforks > 0 && children>=mars.maxforks)
+	{
+		marslog(LOG_INFO,"To many requests for service %s, queuing....",
+		    id->s->name);
+		while(children>=mars.maxforks)
+			pause();
+	}
+#endif
+
+#ifdef SIG_BLOCK
+            sigemptyset(&set);
+            sigaddset(&set, SIGCHLD);
+            sigprocmask(SIG_BLOCK, &set, NULL);
+#else
+            sighold(SIGCHLD);
+#endif
+
+	switch(f = fork())
+	{
+	case 0:
+#ifdef SIG_BLOCK
+        sigprocmask(SIG_UNBLOCK, &set, NULL);
+#else
+        sigrelse(SIGCHLD);
+#endif
+		signal(SIGCHLD,SIG_DFL);
+		id->s->waitp = NULL;
+
+		/* disconnect */
+
+		close(id->s->soc);
+		xdr_destroy(&id->s->x);
+		xdrrec_create(&id->s->x,0,0,
+		    (mxdrparam)&id->s->soc,(mxdrproc)readtcp,(mxdrproc)writetcp);
+		id->s->soc = -1;
+
+		/* rename */
+
+		sprintf(buf,"%s@%d",id->s->name,getpid());
+		strfree(id->s->name);
+		id->s->name = strcache(buf);
+		svc_connect(id->s);
+
+		/* follow request */
+
+		send_any(id->s,"FOLLOWUP",NULL,id->r);
+		break;
+
+	case -1:
+		marslog(LOG_EROR|LOG_PERR,"fork");
+		break;
+
+	default:
+		children++;
+		free_id(id->s,id);
+		break;
+	}
+
+#ifdef SIG_BLOCK
+	sigprocmask(SIG_UNBLOCK, &set, NULL);
+#else
+	sigrelse(SIGCHLD);
+#endif
+
+	return f;
+}
+
+err send_reply(svcid *id,request *r)
+{
+	err e = 0;
+
+	/* copy underscores ... */
+
+	if(r && id->r && id->r->next)
+	{
+		parameter *s = id->r->next->params;
+		while(s)
+		{
+			if(*s->name == '_')
+			{
+				request *x = get_subrequest(r,s->name,0);
+				if(x == NULL)
+				{
+					if(x = get_subrequest(id->r->next,s->name,0))
+						set_subrequest(r,s->name,x);
+					else if(get_value(r,s->name,0) == NULL)
+					{
+						value *v = s->values;
+						while(v)
+						{
+							add_value(r,s->name,"%s",v->name);
+							v=v->next;
+						}
+					}
+				}
+				free_all_requests(x);
+			}
+			s = s->next;
+		}
+	}
+
+	e = send_any(id->s,"REPLY",r,id->r);
+
+	free_id(id->s,id);
+	return e;
+}
+
+err send_later(svcid *id)
+{
+	char buf[1024];
+	sprintf(buf,"Service %s cannot handle this request now, queuing",
+	    id->s->name);
+	send_progress(id,buf,0);
+	send_any(id->s,"LATER",id->r,0);
+	free_id(id->s,id);
+	return 0;
+}
+
+err send_number_reply(svcid *id,double d)
+{
+	err e;
+	request *r = empty_request("NUMBER");
+	set_value(r,"VALUE","%g",d);
+	e = send_reply(id,r);
+	free_all_requests(r);
+	return e;
+}
+
+err send_string_reply(svcid *id,char *p)
+{
+	err e;
+	request *r = empty_request("STRING");
+	set_value(r,"VALUE","%s",p);
+	e = send_reply(id,r);
+	free_all_requests(r);
+	return e;
+}
+
+err call_switchboard(svc *s,request *r)
+{
+	svc_connect(s);
+	if(encode_request(r,&s->x)<0) server_dead(s);
+	s->replies++;
+	return 0;
+}
+
+err call_service(svc *s,const char *target,const request *r,long ref)
+{
+	request *t = empty_request(NULL);
+	err e;
+
+	set_value(t,"USER_REF", "%ld", ref);
+
+	if(s->waitp != NULL)
+		set_value(t,"WAITMODE", "1");
+
+	if(target) set_value(t,"TARGET",   "%s", target);
+
+	e = send_any(s,"SERVICE",r,t);
+	s->replies++;
+
+	free_all_requests(t);
+
+	return e;
+}
+
+static err _e = 0;
+
+static void waitp(svcid *id,request *r,void *data)
+{
+	id->s->r = clone_all_requests(r);
+	id->s->waitp = NULL;
+	_e = get_svc_err(id);
+}
+
+request *wait_service(svc *s,char *target,request *r,err *e)
+{
+	s->waitp = waitp;
+
+	_e = 0;
+	call_service(s,target,r,0);
+	while(service_sync(s) && (s->waitp != NULL) )
+		;
+
+	*e = _e;
+
+	s->waitp = NULL;
+	r = s->r;
+	s->r = NULL;
+	return r;
+
+}
+
+err call_function(svc *s,const char *target,const request *r,long ref)
+{
+	return call_service(s,target,r,ref);
+}
+
+/*****************************************************************************/
+/* Call backs                                                                */
+/*****************************************************************************/
+
+static void add_callback(svcprocs **s,const char *name,svcproc p,
+request *r,void *data)
+{
+	svcprocs *q = NEW_CLEAR(svcprocs);
+	q->name  = strcache(name);
+	q->proc  = p;
+	q->next  = *s;
+	q->args  = r;
+	q->data  = data;
+	*s 		 = q;
+}
+
+static void want(svc *s,const char *name,const char *kind)
+{
+	/* tell event which messages we want ... */
+	request *r = empty_request(NULL);
+	if(name) set_value(r,"NAME","%s",name);
+	set_value(r,"TYPE","%s",kind);
+	send_any(s,"WANT",NULL,r);
+	free_all_requests(r);
+}
+
+void keep_alive(svc *s,int alive)
+{
+	request *r = empty_request(NULL);
+	set_value(r,"ALIVE","%d",alive);
+	send_any(s,"ALIVE",NULL,r);
+	free_all_requests(r);
+}
+
+void stop_all(svc *s,const char *p,int code)
+{
+	request *r = empty_request(NULL);
+	set_value(r,"STOP","%d",code);
+	if(p) set_value(r,"INFO","%s",p);
+	send_any(s,"STOP",NULL,r);
+	free_all_requests(r);
+}
+
+void set_maximum(svc *s,int max)
+{
+	request *r = empty_request(NULL);
+	set_value(r,"MAXIMUM","%d",max);
+	send_any(s,"MAXIMUM",NULL,r);
+	free_all_requests(r);
+}
+
+void exit_timeout(svc *s,int timeout)
+{
+	request *r = empty_request(NULL);
+	set_value(r,"TIMEOUT","%d",timeout);
+	send_any(s,"TIMEOUT",NULL,r);
+	free_all_requests(r);
+}
+
+void add_progress_callback(svc *s,const char *name,svcproc p,void *data)
+{
+	want(s,name,"PROGRESS");
+	add_callback(&s->prog,name,p,NULL,data);
+}
+
+void add_reply_callback(svc *s,const char *name,svcproc p,void *data)
+{
+	add_callback(&s->repl,name,p,NULL,data);
+}
+
+void add_drop_callback(svc *s,const char *name,svcproc p,void *data)
+{
+	add_callback(&s->drop,name,p,NULL,data);
+}
+
+void add_message_callback(svc *s,const char *name,svcproc p,void *data)
+{
+	want(s,name,"MESSAGE");
+	add_callback(&s->mess,name,p,NULL,data);
+}
+
+static void _dictionary(svcid *id,request *r,void *data)
+{
+	svcprocs *p = id->s->fncs;
+	request  *u = NULL;
+
+	while(p)
+	{
+		request *r = empty_request(p->name);
+		reqcpy(r,p->args);
+		r->next = u;
+		u = r;
+		p = p->next;
+	}
+	send_reply(id,u);
+	free_all_requests(u);
+}
+
+void add_function_callback(svc *s,const char *name,svcproc p,
+const char   *cmt,argdef *args, void *data)
+{
+	int i = 0;
+	request *r = empty_request(name);
+
+	if(s->fncs == NULL)
+		add_service_callback(s,"_dictionary",_dictionary,NULL);
+
+	add_value(r,"_reply","%d",tany);
+	if(cmt) add_value(r,"_info", "%s",cmt);
+
+	while(args[i].name)
+	{
+		if(args[i].def)
+			set_value(r,args[i].name,"%s",args[i].def);
+		add_value(r,"_types","%d",args[i].kind);
+		i++;
+	}
+
+	add_callback(&s->fncs,name,p,r,data);
+	add_service_callback(s,name,p,data);
+}
+
+void add_input_callback(svc *s,FILE *f,inputproc p,void *data)
+{
+	inputprocs *q = NEW_CLEAR(inputprocs);
+	q->proc  = p;
+	q->next  = s->input;
+	q->data  = data;
+	q->f     = f;
+	s->input  = q;
+}
+
+void add_service_callback(svc *s,const char *name,svcproc p,void *data)
+{
+	add_callback(&s->serv,name,p,NULL,data);
+}
+
+/**************************************************************************/
+/* Dispatching */
+/**************************************************************************/
+
+static boolean nextevent(svc *s,struct timeval *timeout)
+{
+	fd_set   fds;
+	inputprocs *p,*q;
+
+
+	for(;;)
+	{
+		FD_ZERO(&fds);
+		FD_SET(s->soc,&fds);
+
+		p = s->input;
+		while(p)
+		{
+			FD_SET(fileno(p->f),&fds);
+			p = p->next;
+		}
+
+		switch(select(FD_SETSIZE,&fds,NULL,NULL,timeout))
+		{
+		case -1:
+			if(errno != EINTR)
+				marslog(LOG_EXIT|LOG_PERR,"select");
+			break;
+
+			/* return timeout */
+		case 0:
+			return false;
+			/*NOTREACHED*/
+			break;
+
+		default:
+			/* something came */
+			if(FD_ISSET(s->soc,&fds))
+				return true;
+
+			/* dispatch input */
+			p = s->input;
+			q = NULL;
+			while(p)
+			{
+				if(FD_ISSET(fileno(p->f),&fds))
+					if(!p->proc(p->f,p->data))
+					{
+						if(q) q->next = p->next;
+						else s->input = p->next;
+						FREE(p);
+						break;
+					}
+				q = p;
+				p = p->next;
+			}
+
+			break;
+		}
+	}
+}
+
+boolean service_ready(svc *s)
+{
+	struct timeval timeout = {
+		0 , 1,				};
+	return nextevent(s,&timeout);
+}
+
+static void terminate(const char *msg)
+{
+	marslog(LOG_EXIT,"Connection terminated: %s",msg);
+}
+
+
+err re_dispatch(svcid* id,request  *r)
+{
+	svcprocs *p = id->s->serv;
+	boolean  ok = false;
+
+	if(!r) return 0;
+
+	while(p)
+	{
+		if( *r->name != '_' && p->name == r->name)
+		{
+
+			request* old = id->r->next;
+			id->r->next = clone_all_requests(r);
+			free_all_requests(old);
+			p->proc(id,r,p->data);
+
+			ok = true;
+			break;
+		}
+		p = p->next;
+	}
+
+	/* services keep the id until send reply */
+
+	if(!ok)
+	{
+		set_svc_err(id,-63);
+		set_svc_msg(id,"Service %s has no handler for request %s",
+		    id->s->name,r->name);
+		send_reply(id,NULL);
+	}
+
+	return 0;
+}
+
+err process_service(svc *s)
+{
+	struct timeval timeout;
+
+	if(s->timeout)
+	{
+		timeout.tv_sec  = s->timeout;
+		timeout.tv_usec = 0;
+	}
+
+
+	if(!nextevent(s,s->timeout?&timeout:NULL))
+		return 1;
+
+	do 
+	{
+		request  *r = NULL;
+		svcprocs *p = NULL;
+		svcid    *id;
+		boolean  serve;
+		boolean  ok = false;
+		int     try = 0;
+
+		r = decode_request(&s->x);
+
+		while ( r == (request*)(void*)-1 )
+		{
+			alarm(1);
+			r = decode_request(&s->x);
+			alarm(0);
+
+			if(try++>3)
+			{
+				server_dead(s);
+				return 1;
+			}
+		}
+
+		if(r == NULL) return 0;
+
+		if(mars.debug)
+		{
+			marslog(LOG_DBUG,"get service:");
+			print_all_requests(r);
+		}
+
+		id = new_id(s,r);
+
+		if(serve = (strcmp(r->name,"SERVICE")==0)) p = s->serv;
+		else if(strcmp(r->name,"REPLY")==0)   {
+			p = s->repl;
+			s->replies--;
+		}
+		else if(strcmp(r->name,"REPLY")==0)    p = s->repl;
+		else if(strcmp(r->name,"DROP")==0)     p = s->drop;
+		else if(strcmp(r->name,"MESSAGE")==0)  p = s->mess;
+		else if(strcmp(r->name,"PROGRESS")==0) p = s->prog;
+		else if(strcmp(r->name,"EXIT")==0) terminate(get_value(r,"MESSAGE",0));
+		else {
+			marslog(LOG_WARN,"Unknow request received:");
+			print_all_requests(r);
+			continue;
+		}
+
+		if(s->waitp != NULL &&
+		    strcmp(r->name,"REPLY")==0  && 
+		    get_value(r,"WAITMODE",0) != NULL)
+		{
+			s->waitp(id,r->next,NULL);
+			ok = true;
+		}
+		else {
+			/* Try named ... */
+			svcprocs *x = p;
+			while(p)
+			{
+				if(p->name != NULL && r->next != NULL && p->name == r->next->name)
+				{
+					p->proc(id,r->next,p->data);
+					ok = true;
+					if(serve) break;
+				}
+				p = p->next;
+			}
+
+			/* Try NULL */
+			if(!ok)
+			{
+				p = x;
+				while(p)
+				{
+				    if( 
+						(p->name == NULL && 
+							(r->next != NULL && r->next->name != NULL && 
+						(*r->next->name != '_' ))) ||
+						(r->next == NULL && p->name == NULL))
+					{
+						 p->proc(id,r->next,p->data);
+						 ok = true;
+						 if(serve) break;
+					}
+					p = p->next;
+				}
+			}
+
+		}
+
+		/* services keep the id until send reply */
+
+		if(serve)
+		{
+			if(!ok)
+			{
+				set_svc_err(id,-63);
+				set_svc_msg(id,"Service %s has no handler for request %s",
+				    s->name,
+				    r->next?r->next->name:"(no name)");
+				send_reply(id,NULL);
+			}
+		}
+		else
+			free_id(s,id);
+
+	}while(!xdrrec_eof(&s->x));
+
+	return 0;
+
+}
+
+int service_sync(svc *s)
+{
+	if(s->replies)
+	{
+		svc_connect(s);
+		process_service(s);
+	}
+	return s->replies;
+}
+
+void service_run(svc *s)
+{
+	for(;;) {
+		svc_connect(s);
+		if(process_service(s))
+			break; /* Timeout */
+	}
+}
+/*****************************************************************************/
+/* Utilities                                                                 */
+/*****************************************************************************/
+
+request *pool_fetch(svc *s,const char *name,const char *clss)
+{
+	static request *u = NULL;
+	request *r;
+	err e;
+	if(!name) return NULL;
+	if(u == NULL) u = empty_request("FETCH");
+	set_value(u,"NAME","%s",name);
+	if(clss)
+		set_value(u,"CLASS","%s",clss);
+	else
+		unset_value(u,"CLASS");
+	r =  wait_service(s,"pool",u,&e);
+	if(e) {
+		free_all_requests(r);
+		return NULL;
+	}
+	return r;
+}
+
+void pool_store(svc *s,const char *name,const char *clss,const request *r)
+{
+	err e;
+	static request *u = NULL;
+	if (!name) return;
+	if(u == NULL) u = empty_request("STORE");
+	set_value(u,"NAME", "%s",name);
+	if(clss)
+		set_value(u,"CLASS","%s",clss);
+	else
+		unset_value(u,"CLASS");
+	u->next = (request*)r;
+	wait_service(s,"pool",u,&e);
+}
+
+void pool_link(svc *s,const char *name1,const char *name2)
+{
+	err e;
+	static request *u = NULL;
+
+	if(!name1 || !name2) return;
+
+	if(u == NULL) u = empty_request("LINK");
+	set_value(u,"NAME1","%s",name1);
+	set_value(u,"NAME2","%s",name2);
+	wait_service(s,"pool",u,&e);
+}
+
+void pool_link_objects(svc *s,request *r)
+{
+	const char *name = get_value(r,"_NAME",0);
+	while(r)
+	{
+		parameter *p = r->params;
+		while(p)
+		{
+			request *t = p->subrequest;
+			while(t)
+			{
+				const char *other = get_value(t,"_NAME",0);
+				if(other) pool_link(s,name,other);
+				pool_link_objects(s,t);
+				t = t->next;
+			}
+
+			p = p->next;
+		}
+		r = r->next;
+	}
+}
+
+
+static void _birth(svcid *id,request *r,void *data)
+{
+	/* tell newcomers ... */
+	if(id->s->recording) recording(id->s,true);
+}
+
+void recording(svc *s,boolean on)
+{
+	static boolean first = true;
+	request *u = empty_request("_record");
+	set_value(u,"switch",on?"on":"off");
+	send_message(s,u);
+	free_all_requests(u);
+
+	s->recording = on;
+
+	if(first)
+	{
+		first = true;
+		/* tell future modules about recording */
+		add_message_callback(s,"BIRTH",_birth,NULL);
+	}
+}
+
+void support_recording(svc *s)
+{
+	add_message_callback(s,"_record",_record,NULL);
+}
+
+static int tempvars = 0;
+
+void record_request(svc *s,char *name,request *r)
+{
+	if(!s->recording) return;
+	record_line(s,"%s = some_request_not_yet_implemeted()",name);
+}
+
+void record_function(svc *s,const char *name,argdef *args,va_list list)
+{
+	int     n,i;
+	char   *p;
+	double  d;
+	request *r;
+	char line[1024],buf[1024];
+
+	if(!s->recording) return;
+
+	sprintf(line,"%s(",name);
+
+	i = 0;
+	while(args[i].name)
+	{
+		switch(args[i].kind)
+		{
+		case tinteger:
+			n = va_arg(list,int);
+			sprintf(buf,"%d",n);
+			break;
+
+		case tnumber:
+			d = va_arg(list,double);
+			sprintf(buf,"%g",d);
+			break;
+
+		case tstring:
+			p = va_arg(list,char*);
+			sprintf(buf,"\"%s\"",p);
+			break;
+
+		case trequest:
+			r = va_arg(list,request*);
+			sprintf(buf,"_%s_temp_var_%d_",s->name,tempvars++);
+			record_request(s,buf,r);
+			break;
+
+		default:
+			marslog(LOG_WARN,"record_function : unsupported type");
+			break;
+		}
+
+		strcat(line,buf);
+
+		if(args[i+1].name) strcat(line,",");
+
+		i++;
+	}
+	strcat(line,")");
+
+	record_line(s,"%s",line);
+}
+
+void record_line(svc *s,const char *fmt,...)
+{
+	if(s->recording)
+	{
+		va_list list;
+		char buf[1024];
+		static request *u = NULL;
+		if(u == NULL) u = empty_request("RECORD");
+
+		va_start(list,fmt);
+		vsprintf(buf, fmt, list);
+		va_end(list);
+
+		set_value(u,"TEXT","%s",buf);
+		send_message(s,u);
+	}
+
+}
+
+void show_help_page(svc *s,const char *page,char *topic)
+{
+	request *u = empty_request("HELP");
+	if(page)  set_value(u,"PAGE","%s",page);
+	if(topic) set_value(u,"TOPIC","%s",topic);
+	call_service(s,"help",u,0);
+	free_all_requests(u);
+}
+
+void show_help_text(svc *s,const char *page,const char *topic,const char *fmt,...)
+{
+	va_list list;
+	char buf[1024];
+
+	request *u = empty_request("HELP");
+
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	if(page)  set_value(u,"PAGE","%s",page);
+	if(topic) set_value(u,"TOPIC","%s",topic);
+
+	set_value(u,"TEXT","%s",buf);
+
+	call_service(s,"help",u,0);
+	free_all_requests(u);
+}
+
+void show_help_file(svc *s,const char *page,const char *topic,const char *file)
+{
+	request *u = empty_request("HELP");
+	if(page)  set_value(u,"PAGE","%s",page);
+	if(topic) set_value(u,"TOPIC","%s",topic);
+	set_value(u,"FILE","%s",file);
+	call_service(s,"help",u,0);
+	free_all_requests(u);
+}
+
+#ifdef METVIEW
+request *get_preferences(svc *s,const char *name)
+{
+	char buf[1024];
+	sprintf(buf,"%s/Metview/Preferences/%s",
+	    getenv("METVIEW_USER_DIRECTORY"),name?name:"General");
+	return read_request_file(buf);
+}
+
+void set_preferences(svc *s,request *r,const char *name)
+{
+	char buf[1024];
+	FILE *f;
+	sprintf(buf,"%s/Metview/Preferences/%s",
+	    getenv("METVIEW_USER_DIRECTORY"),name?name:"General");
+	f = fopen(buf,"w");
+	if(!f) {
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",buf);
+		return;
+	}
+	save_all_requests(f,r);
+	fclose(f);
+
+	sprintf(buf,"/Metview/Preferences/%s",name?name:"General");
+	set_value(r,"_NAME","%s",name);
+	send_message(s,r);
+}
+
+#endif
+
diff --git a/src/libMars/sh2ll.c b/src/libMars/sh2ll.c
new file mode 100644
index 0000000..904ce9f
--- /dev/null
+++ b/src/libMars/sh2ll.c
@@ -0,0 +1,170 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <errno.h>
+
+err write_fieldset(fieldset *v,database *b)
+{
+	int i;
+	err e = NOERR;
+
+	for(i=0;i<v->count;i++)
+	{
+
+		long length;
+		
+		if(v->fields[i] != NULL)
+		{
+			field *g = get_field(v,i,packed_mem);
+
+			if(g == NULL)
+				return -1;
+
+			if(g != NULL)
+			{
+				const void *buffer = field_message(g,&length);
+				if(!buffer) return -1;
+	
+				if(e = database_write(b,NULL,(char*)buffer,&length))
+					return e;
+
+				release_field(g);
+			}
+		}
+	}
+	return NOERR;
+
+}
+
+err handle_read(request *r,void *data)
+{
+	const char *s     = get_value(r,"FIELDSET",0);
+	const char *f     = no_quotes(get_value(r,"SOURCE",0));
+	const char *c     = no_quotes(get_value(r,"CFSPATH",0));
+	fieldset    *v;
+	boolean     pp = false;
+
+	if(c && f)
+	{
+		marslog(LOG_WARN,"Cannot have CFSPATH and SOURCE together");
+		marslog(LOG_WARN,"Ignoring CFSPATH");
+		c = NULL;
+	}
+
+	if(f && ((strncmp(f,"ec:",3)==0) || (strncmp(f,"ectmp:",6)==0)))
+	{
+		char buf[1024];
+		const char *tmp = marstmp();
+
+		unlink(tmp);
+		sprintf(buf,"$ECFS_SYS_PATH/ecp.p %s %s",f,tmp);
+
+
+		marslog(LOG_INFO,"getting %s from ECFS",f);
+		errno = 0;
+		if(system(buf))
+		{
+			marslog(LOG_EROR|LOG_PERR,"Fail to execute ",buf);
+			return -2;
+		}
+		else
+			f = tmp;
+	}
+
+	if(c)
+	{
+		char buf[1024];
+		f = marstmp();
+
+		unlink(f);
+		sprintf(buf,"ecfile -p %s get %s",c,f);
+
+
+		marslog(LOG_INFO,"getting %s with ecfile",c);
+		errno = 0;
+		if(system(buf))
+		{
+			marslog(LOG_EROR|LOG_PERR,"Fail to execute ecfile");
+			marslog(LOG_EROR,"Have you used cfslogin ?");
+			return -2;
+		}
+	}
+
+	pp = ( (count_values(r,"GRID")  != 0) || 
+		   (count_values(r,"AREA")  == 4) ||
+		   (count_values(r,"RESOL") != 0) || 
+		   (count_values(r,"ROTATION") == 2) || 
+		   (mars.accuracy > 0));
+
+	if(pp)
+	{
+		marslog(LOG_INFO,"GRIB conversion needed...");
+		v = pp_fieldset(f,r);
+	} else v = read_fieldset(f,r);
+
+	if(!v) return -2;
+
+	new_variable(s,v,0);
+
+	marslog(LOG_INFO,"%d field(s) read from file %s into '%s'",
+	    v->count,c?c:f,s);
+
+	if(count_values(r,"TARGET"))
+	{
+		request *s = empty_request("WRITE");
+		err e;
+
+		reqcpy(s,r);
+		e = handle_write(s,data);
+
+		free_all_requests(s);
+		return e;
+	}
+
+	return NOERR;
+}
+
+err handle_write(request *r,void *data)
+{
+	const char *s = get_value(r,"FIELDSET",0);
+	extern base_class *targetbase;
+	err e;
+	variable *v = find_variable(s);
+	database *target;
+
+	if(!v) {
+		marslog(LOG_EROR,"Fieldset not found: '%s'",s);
+		return -1;
+	}
+
+	if(v->scalar)
+	{
+		marslog(LOG_EROR,"WRITE failed. Field '%s' is a scalar (%g)",
+		    s,v->val);
+		return -1;
+	}
+
+	target = database_open(targetbase,NULL,r,NULL,WRITE_MODE);
+
+	if(target == NULL)
+		return -1;
+
+	e = write_fieldset(v->fs,target);
+
+	database_close(target);
+
+	if(e) return e;
+
+	marslog(LOG_INFO,"WRITE %d field(s) from '%s' to file %s",
+	    v->fs->count,s,get_value(r,"TARGET",0));
+	return NOERR;
+
+}
diff --git a/src/libMars/statistics.c b/src/libMars/statistics.c
new file mode 100644
index 0000000..af3c59f
--- /dev/null
+++ b/src/libMars/statistics.c
@@ -0,0 +1,402 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <fcntl.h>
+
+/********************************************************/
+/* General Purpose locking funcions on File Descriptors */
+/********************************************************/
+/* Do not use standard I/O library because of internal buffering performed */
+/*                                              */
+/* DO NOT USE IT ON FILES IN AN MVFS FILESYSTEM */
+/*                                              */
+#include <signal.h>
+#include <setjmp.h>
+
+static jmp_buf env;
+
+/* Lock errors (must be negative) */
+#define FCNTL_ERROR   -1
+#define LOCK_TIMEOUT  -2
+
+static void catch_alarm(int sig)
+{
+	longjmp(env,1);
+}
+
+
+static int lock_fd(int fd)
+{
+	int ret = 0;
+	struct flock lock;
+	
+	lock.l_type   = F_WRLCK;
+	lock.l_whence = SEEK_SET;
+	lock.l_start  = 0;
+	lock.l_len    = 0;        /* write lock entire file */
+
+	if(setjmp(env) != 0) {
+		marslog(LOG_WARN,"Timeout while waiting for lock");
+		return LOCK_TIMEOUT;
+	}
+	signal(SIGALRM,catch_alarm);
+	alarm(60);
+
+	ret = fcntl(fd, F_SETLK, &lock);
+	alarm(0);
+
+	return ret;
+
+}
+
+static int unlock_fd(int fd)
+{
+	struct flock lock;
+	
+	lock.l_type   = F_UNLCK;
+	lock.l_whence = SEEK_SET;
+	lock.l_start  = 0;
+	lock.l_len    = 0;        /* write lock entire file */
+
+	return fcntl(fd, F_SETLK, &lock);
+}
+
+/********************************************************/
+
+#define MAX_LOCK_RETRY 40
+err locked_write(const char *fname, char *str, long len)
+{
+	boolean locked = false;
+	int retry      = 0;
+	int fd         = 0;
+	struct flock lock = {F_WRLCK,SEEK_SET,0,0};   /* Write lock entire file */
+	err ret        = NOERR;
+	long pid       = getpid();
+
+	while(!locked && retry<MAX_LOCK_RETRY)
+	{
+		if((fd = open(fname,O_WRONLY | O_APPEND | O_CREAT,0777)) >= 0)
+		{
+			if((ret = fcntl(fd, F_SETLK, &lock) ) == -1)
+			{
+				int e = errno;
+				if(++retry == MAX_LOCK_RETRY)
+				{
+					FILE *f = NULL;
+
+					marslog(LOG_WARN|LOG_PERR,"Error locking '%s'",fname);
+					
+					f = mail_open(mars.dhsmail,"Error while locking statistics");
+					mail_msg(f,"Statistics file: %s",fname);
+					if(e>0)
+						mail_msg(f,"(%s)", strerror(e));
+					mail_close(f);
+
+				}
+				close(fd);
+				/* If you reduce from 100 msec., the sleep() is less effective == useless */
+				usleep(pid*retry%(100000*retry));
+			}
+			else
+			{
+				locked=true;
+			}
+		}
+		else
+		{
+			int e = errno;
+			FILE *f = NULL;
+
+			marslog(LOG_WARN|LOG_PERR,"Error opening '%s'",fname);
+					
+			f = mail_open(mars.dhsmail,"Error while opening statistics");
+			mail_msg(f,"Statistics file: %s",fname);
+			if(e > 0)
+				mail_msg(f,"(%s)", strerror(e));
+			mail_close(f);
+			retry = MAX_LOCK_RETRY;
+		}
+	}
+
+	if(locked)
+	{
+		if(len>0)
+		{
+			fchmod(fd,S_IRWXU|S_IRWXG|S_IRWXO);
+			write(fd,str,len);
+		}
+
+		lock.l_type   = F_UNLCK;
+		if( (ret = fcntl(fd, F_SETLK, &lock)) == -1)
+		{
+			marslog(LOG_WARN|LOG_PERR,"Error unlocking '%s'",fname);
+		}
+		close(fd);
+	}
+
+	return ret;
+}
+
+/********************************************************/
+
+static request *statistics = 0;
+
+void init_statistics(const request *r, const request *e)
+{
+	char sdate[24];
+	char stime[24];
+	time_t now;
+	const char *verb = r&&r->name?r->name:0;
+
+	if(statistics)
+	{
+		/* Free statistics */
+		free_all_requests(statistics);
+		statistics = 0;
+	}
+
+	/* Create a new statistics request */
+	statistics = empty_request("STAT");
+
+	/* Get the time stamp */
+	time(&now);
+	strftime(sdate,sizeof(sdate),"%Y%m%d",gmtime(&now));
+	strftime(stime,sizeof(stime),"%H:%M:%S",gmtime(&now));
+	set_value(statistics,"startdate","%s",sdate);
+	set_value(statistics,"starttime","%s",stime);
+
+	if(verb) set_value(statistics,"verb",verb);
+	set_value(statistics,"version","%ld",marsversion());
+	if(mars.appl)
+		set_value(statistics,"application","%s",mars.appl);
+
+	if(r)
+	{
+		long date = get_julian_from_request(r,0);
+		long td = today();
+		const char *type = get_value(r,"TYPE",0);
+		const char *class = get_value(r,"CLASS",0);
+		const char *stream = get_value(r,"STREAM",0);
+		const char *expver = get_value(r,"EXPVER",0);
+		if(class)
+			set_value(statistics,"class",  "%s", class);
+		if(type)
+			set_value(statistics,"type",   "%s", type);
+		if(stream)
+			set_value(statistics,"stream", "%s", stream);
+		if(expver)
+			set_value(statistics,"expver", "%s", expver);
+		if( type && !EQ(type,"CL") )
+		{
+			set_value(statistics,"retdate","%ld",julian_to_date(date,mars.y2k));
+			set_value(statistics,"age","%ld",td - date);
+		}
+		set_value(statistics,"nbdates","%d",count_values(r,"DATE"));
+	}
+}
+
+void log_statistics(const char *name, char *fmt,...)
+{
+	char buf[1024000];
+	va_list list;
+
+	if(!mars.statfile)
+		return;
+
+	if(!statistics)
+		return;
+
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	add_value(statistics,name,"%s",buf);
+} 
+
+void log_statistics_unique(const char *name, char *fmt,...)
+{
+	char buf[1024000];
+	va_list list;
+
+	if(!mars.statfile)
+		return;
+
+	if(!statistics)
+		return;
+
+	va_start(list,fmt);
+	vsprintf(buf, fmt, list);
+	va_end(list);
+
+	set_value(statistics,name,"%s",buf);
+} 
+
+static char *flush_request(char *buf, const request *r, const char *prefix, size_t l)
+{
+	char      *p   = buf;
+	parameter *par = r->params;
+
+	while(par)
+	{
+		int    n = count_values(r,par->name);
+		value *v = par->values;
+		int    count = 0;
+
+		if(*(par->name) != '_')
+		{
+			p += sprintf(p,"$%s%s=",prefix,lowcase(par->name));
+			switch(n)
+			{
+				case 0:
+					p += sprintf(p,"\"\"");
+					break;
+
+				case 1:
+					if(v) p += sprintf(p,"\"%s\"",lowcase(no_quotes(v->name)));
+					break;
+
+				default:
+					p += sprintf(p,"\"");
+					while(v)
+					{
+						/* Do not print more than 400 values */
+						if(count >= 400)
+						{
+							int remain = n - count - 1;
+							const char *last = get_value(r,par->name,n-1);
+							p += sprintf(p,"(%d)|%s\"",remain,lowcase(no_quotes(last)));
+							break;
+						}
+
+						p += sprintf(p,"%s",lowcase(no_quotes(v->name)));
+						v = v->next;
+						if(v)
+							p += sprintf(p,"|");   /* more values */
+						else
+							p += sprintf(p,"\"");  /* last value */
+						count++;
+					}
+					break;
+			}
+
+			p += sprintf(p,";");
+
+			if(p-buf > l/2)
+			{
+				p += sprintf(p,"# incomplete line");
+				break;
+			}
+		}
+		par = par->next;
+	}
+
+	return p;
+}
+
+void flush_statistics(const request *r, const request *env)
+{
+	char    sdate[24];
+	char    stime[24];
+	char    fname[256];
+	char    buf[1024000];
+	time_t  now = 0;
+	char    *p = buf;
+	size_t  l = sizeof(buf);
+
+	if(!mars.statfile)
+		return;
+
+	if(!statistics)
+	{
+		FILE *f = mail_open(mars.dhsmail,"MARS internal Error with statistics");
+		mail_msg(f,"Trying to flush uninitialesed statistics");
+		mail_close(f);
+		return;
+	}
+
+	/* Get time stamp */
+	time(&now);
+	strftime(sdate,sizeof(sdate),"%Y%m%d",gmtime(&now));
+	strftime(stime,sizeof(stime),"%H:%M:%S",gmtime(&now));
+	set_value(statistics,"stopdate","%s",sdate);
+	set_value(statistics,"stoptime","%s",stime);
+
+	/* Create string for output */
+	p = buf;
+	l = sizeof(buf);
+	p = flush_request(p,statistics,"",l - (p-buf));
+	p = flush_request(p,env,       "",l - (p-buf));
+	p = flush_request(p,r,         "r_",l - (p-buf));
+	sprintf(p,"\n");
+
+	/* Choose statistics file */
+	sprintf(fname,"%s.%s.%ld",mars.statfile,sdate,marsversion());
+
+	/* Perform unbuffered output locking the file */
+	locked_write(fname,buf,strlen(buf));
+
+    /* Write statistics to a user provided file */
+    if(get_value(r,"LOGSTATS",0))
+    {
+        const char *extfile = no_quotes(get_value(r,"LOGSTATS",0));
+        locked_write(extfile,buf,strlen(buf));
+    }
+
+	/* Free statistics */
+	if(statistics)
+		free_all_requests(statistics);
+	statistics = 0;
+}
+
+
+
+void test_statistics()
+{
+	char    sdate[24];
+	char    stime[24];
+	char    fname[256];
+	char    buf[1024000];
+	time_t  now = 0;
+	char    *p = buf;
+	size_t  l = sizeof(buf);
+
+	request *statistics = empty_request("statistics");
+	request *env = get_environ();
+
+
+	const char *path = "/home/ma/mar/marslog/statistics/test";
+
+	marslog(LOG_INFO,"test_statistics()");
+	/* Get time stamp */
+	time(&now);
+	strftime(sdate,sizeof(sdate),"%Y%m%d",gmtime(&now));
+	strftime(stime,sizeof(stime),"%H:%M:%S",gmtime(&now));
+
+	set_value(statistics,"stopdate","%s",sdate);
+	set_value(statistics,"stoptime","%s",stime);
+
+	/* Create string for output */
+	p = buf;
+	l = sizeof(buf);
+	p = flush_request(p,statistics,"",l - (p-buf));
+	p = flush_request(p,env,       "",l - (p-buf));
+	sprintf(p,"\n");
+
+	print_all_requests(statistics);
+
+	/* Choose statistics file */
+	sprintf(fname,"%s.%s.%ld",path,sdate,marsversion());
+
+	/* Perform unbuffered output locking the file */
+	locked_write(fname,buf,strlen(buf));
+
+	free_all_requests(statistics);
+}
diff --git a/src/libMars/stream.c b/src/libMars/stream.c
new file mode 100644
index 0000000..c260bca
--- /dev/null
+++ b/src/libMars/stream.c
@@ -0,0 +1,498 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+/* This should be included from the proper file */
+
+typedef enum tag {
+	tag_zero,
+	tag_start_obj,
+	tag_end_obj,
+	tag_char,
+	tag_unsigned_char,
+	tag_int,
+	tag_unsigned_int,
+	tag_short,
+	tag_unsigned_short,
+	tag_long,
+	tag_unsigned_long, 
+	tag_long_long,
+	tag_unsigned_long_long, 
+	tag_float,
+	tag_double,
+	tag_string,
+	tag_blob,
+	tag_exception,
+	tag_start_rec,
+	tag_end_rec,
+	tag_eof,
+	last_tag
+} 
+tag;
+
+static char *tag_names[] = {
+	"0",
+	"start of object",
+	"end of object",
+	"char",
+	"unsigned char",
+	"int",
+	"unsigned int",
+	"short",
+	"unsigned short",
+	"long",
+	"unsigned long",
+	"long long",
+	"unsigned long long",
+	"float",
+	"double",
+	"string",
+	"blob",
+	"exception",
+	"start of record",
+	"end of record",
+	"end of file",
+};
+
+/* Write --------------------------- */
+
+static void stream_putbytes(mstream* s,void *p,int len)
+{
+	if(s->write(s->data,p,len) != len)
+		s->error = -2;
+	else
+		s->out += len;
+}
+
+static void stream_putchar(mstream* s,unsigned char c)
+{
+	stream_putbytes(s,&c,1);
+}
+
+static void stream_putlong(mstream* s,unsigned long p)
+{
+	if(sizeof(unsigned long) != 4)
+	{
+		if( sizeof(unsigned int) == 4 )
+		{
+			unsigned int x = htonl(p);
+			stream_putbytes(s,&x,sizeof(x));
+		}
+		else if(sizeof(unsigned short) == 4)
+		{
+			unsigned short x = htons(p);
+			stream_putbytes(s,&x,sizeof(x));
+		}
+		else {
+			marslog(LOG_EXIT,"Cannot run on this architecture");
+		}
+	}
+	else
+	{
+		p = htonl(p);
+		stream_putbytes(s,&p,sizeof(p));
+	}
+}
+
+static void stream_write_tag(mstream* s,tag t)
+{
+	stream_putchar(s,(unsigned char)t);
+}
+
+void stream_write_char(mstream* s,char c)
+{
+	stream_write_tag(s,tag_char);
+	stream_putchar(s,c);
+}
+
+void stream_write_uchar(mstream* s,unsigned char c)
+{
+	stream_write_tag(s,tag_unsigned_char);
+	stream_putchar(s,c);
+}
+
+void stream_write_int(mstream* s,int c)
+{
+	stream_write_tag(s,tag_int);
+	stream_putlong(s,c);
+}
+
+void stream_write_uint(mstream* s,unsigned int c)
+{
+	stream_write_tag(s,tag_unsigned_int);
+	stream_putlong(s,c);
+}
+
+void stream_write_long(mstream* s,long c)
+{
+	stream_write_tag(s,tag_long);
+	stream_putlong(s,c);
+}
+
+void stream_write_ulong(mstream* s,unsigned long c)
+{
+	stream_write_tag(s,tag_unsigned_long);
+	stream_putlong(s,c);
+}
+
+void stream_write_longlong(mstream* s,long64 n)
+{
+	unsigned long hi = (n >> 32);
+	unsigned long lo = (n & 0xffffffff);
+
+	stream_write_tag(s,tag_long_long);
+	stream_putlong(s,hi);
+	stream_putlong(s,lo);
+}
+
+void stream_write_ulonglong(mstream* s,ulong64 n)
+{
+	unsigned long hi = (n >> 32);
+	unsigned long lo = (n & 0xffffffff);
+
+	stream_write_tag(s,tag_unsigned_long_long);
+	stream_putlong(s,hi);
+	stream_putlong(s,lo);
+}
+
+union Double {
+	double d;
+#if __SIZEOF_LONG__ == 4
+	struct { unsigned long hi; unsigned long lo; } s;
+#else
+	struct { unsigned int hi; unsigned int lo; } s;
+#endif
+};
+
+void stream_write_double(mstream* s, double x)
+{
+	union Double d;
+	stream_write_tag(s,tag_double);
+	if( sizeof(d.d) != 2*sizeof(d.s.hi))
+	{
+		marslog(LOG_EXIT,"Double is foobar" );
+	}
+	/* ASSERT(sizeof(d.d) == 2*sizeof(d.s.hi)); */
+	d.d = x;
+	stream_putlong(s,d.s.hi);
+	stream_putlong(s,d.s.lo);
+}
+
+void stream_write_short(mstream* s,short c)
+{
+	stream_write_tag(s,tag_short);
+	stream_putlong(s,c);
+}
+
+void stream_write_ushort(mstream* s,unsigned short c)
+{
+	stream_write_tag(s,tag_unsigned_short);
+	stream_putlong(s,c);
+}
+
+void stream_write_string(mstream* s,const char* p)
+{
+	int len = p?strlen(p):0;
+
+	stream_write_tag(s,tag_string);
+	stream_putlong(s,len);
+	while(p && *p) stream_putchar(s,(unsigned char)*p++);
+}
+
+void stream_write_blob(mstream* s,const void* d,long len)
+{
+	const char* p = (const char*)d;
+	stream_write_tag(s,tag_blob);
+	stream_putlong(s,len);
+	while(len-->0) stream_putchar(s,(unsigned char)*p++);
+}
+
+void stream_write_start(mstream* s,const char* p)
+{
+	stream_write_tag(s,tag_start_obj);	
+	stream_write_string(s,p);
+}
+
+void stream_write_end(mstream* s)
+{
+	stream_write_tag(s,tag_end_obj);	
+}
+
+
+/* Read --------------------------- */
+
+static void stream_getbytes(mstream* s,void *p,int len)
+{
+	char *q = (char*)p;
+	while(len > 0 )
+	{
+		int l = s->read(s->data,q,len);
+		if(l <= 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Failed to read %d",len);
+			s->error = -32;
+			return;
+		}
+
+		q     += l;
+		len   -= l;	
+		s->in += l;
+	}
+}
+
+static unsigned char stream_getchar(mstream* s)
+{
+	unsigned char c = 0;
+	stream_getbytes(s,&c,1);
+	return c;
+}
+
+static unsigned long stream_getlong(mstream* s)
+{
+	unsigned long l = 0;
+
+	if(sizeof(unsigned long) != 4)
+	{
+		if( sizeof(unsigned int) == 4 )
+		{
+			unsigned int x;
+			stream_getbytes(s,&x,sizeof(x));
+			l = ntohl(x);
+		}
+		else if(sizeof(unsigned short) == 4)
+		{
+			unsigned short x;
+			stream_getbytes(s,&x,sizeof(x));
+			l = ntohs(x);
+		}
+		else {
+			marslog(LOG_EXIT,"Cannot run on this architecture");
+		}
+	}
+	else
+	{
+		long p;
+		stream_getbytes(s,&p,sizeof(p));
+		l = ntohl(p);
+	}
+
+	return l;
+}
+
+static void stream_read_tag(mstream* s,tag t)
+{
+	unsigned char c = stream_getchar(s);
+	if(t != (enum tag)c)
+	{
+		char *name = c < NUMBER(tag_names) ? tag_names[c] : "(invalid)";
+		marslog(LOG_EROR,"Bad tag '%s' (should be '%s')",name,tag_names[t]);
+		s->error = -2;
+	}
+}
+
+char stream_read_char(mstream* s)
+{
+	stream_read_tag(s,tag_char);
+	return stream_getchar(s);
+}
+
+unsigned char stream_read_uchar(mstream* s)
+{
+	stream_read_tag(s,tag_unsigned_char);
+	return stream_getchar(s);
+}
+
+int stream_read_int(mstream* s)
+{
+	stream_read_tag(s,tag_int);
+	return (int)stream_getlong(s);
+}
+
+unsigned int stream_read_uint(mstream* s)
+{
+	stream_read_tag(s,tag_unsigned_int);
+	return  (unsigned int)stream_getlong(s);
+}
+
+long stream_read_long(mstream* s)
+{
+	stream_read_tag(s,tag_long);
+	return (long)stream_getlong(s);
+}
+
+unsigned long stream_read_ulong(mstream* s)
+{
+	stream_read_tag(s,tag_unsigned_long);
+	return (unsigned long)stream_getlong(s);
+}
+
+short stream_read_short(mstream* s)
+{
+	stream_read_tag(s,tag_short);
+	return (short)stream_getlong(s);
+}
+
+unsigned short stream_read_ushort(mstream* s)
+{
+	stream_read_tag(s,tag_unsigned_short);
+	return (unsigned short)stream_getlong(s);
+}
+
+const char* stream_read_string(mstream* s)
+{
+	static char *p   = NULL; 
+	static long plen = -1;
+
+	char *q;
+	long len;
+
+	stream_read_tag(s,tag_string);
+	if(s->error) 
+		return "<invalid-string>";
+
+	len = stream_getlong(s);
+	if(s->error) 
+		return "<invalid-string-length>";
+
+
+	if(p == NULL || len >= plen)
+	{
+		FREE(p);
+		p = MALLOC( plen = len+1 );
+	}
+
+	q = p;
+	while(len-->0) 
+		*q++ = stream_getchar(s);
+	*q = 0;
+
+	return p;
+}
+
+const void* stream_read_blob(mstream* s,long* size)
+{
+	static char *p   = NULL; 
+	static long plen = -1;
+
+	char *q;
+	long len;
+
+	stream_read_tag(s,tag_blob);
+	if(s->error) 
+	{
+		*size = -1;
+		return 0;
+	}
+
+	len = stream_getlong(s);
+	if(s->error) 
+	{
+		*size = -1;
+		return 0;
+	}
+
+
+	if(p == NULL || len > plen)
+	{
+		if(len > 0) /* It seems there can be 0 length blobs (?) */
+		{
+			FREE(p);
+			p = MALLOC( plen = len );
+		}
+	}
+	*size = len;
+
+	q = p;
+	while(len-->0) 
+		*q++ = stream_getchar(s);
+
+	return p;
+}
+
+
+long64 stream_read_longlong(mstream* s)
+{
+	unsigned long hi;
+	unsigned long lo;
+	long64 n;
+
+	stream_read_tag(s,tag_long_long);
+
+	hi = stream_getlong(s);
+	lo = stream_getlong(s);
+
+	n = hi;
+	n <<= 32;
+	n |= lo;
+
+	return n;
+
+}
+
+ulong64 stream_read_ulonglong(mstream* s)
+{
+	unsigned long hi;
+	unsigned long lo;
+	ulong64 n;
+
+	stream_read_tag(s,tag_unsigned_long_long);
+
+	hi = stream_getlong(s);
+	lo = stream_getlong(s);
+
+	n = hi;
+	n <<= 32;
+	n |= lo;
+
+	return n;
+}
+
+
+const char* stream_read_start(mstream* s)
+{
+	stream_read_tag(s,tag_start_obj);	
+	return s->error?0:stream_read_string(s);
+}
+
+void stream_read_end(mstream* s)
+{
+	stream_read_tag(s,tag_end_obj);	
+}
+
+
+void make_socket_stream(mstream* s,int* soc)
+{
+	s->error = 0;
+	s->read  = readtcp;
+	s->write = writetcp;
+	s->data  = soc;
+	s->in    = 0;
+	s->out   = 0;
+}
+
+static int readfile(void *p,void *buf,u_int len)
+{
+	return fread(buf,1,len,(FILE*)p);
+}
+
+static int writefile(void *p,void *buf,u_int len)
+{
+	return fwrite(buf,1,len,(FILE*)p);
+}
+
+void make_file_stream(mstream* s,FILE* f)
+{
+	s->error = 0;
+	s->read  = readfile;
+	s->write = writefile;
+	s->data  = f;
+	s->in    = 0;
+	s->out   = 0;
+}
diff --git a/src/libMars/target.c b/src/libMars/target.c
new file mode 100644
index 0000000..3fb26c4
--- /dev/null
+++ b/src/libMars/target.c
@@ -0,0 +1,850 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+#define PAD(l,n)     ( ( ( (l)+(n)-1 ) / (n) * (n) ) - (l) )
+
+static marslist *targets = NULL;
+
+#define MAXKEY 20
+
+typedef struct remotefile {
+	struct remotefile* next;
+	char* local;
+	char* remote;
+	char* host;
+	boolean  ecfs;
+} remotefile;
+
+static remotefile* remote_files = NULL;
+
+typedef struct targetfile {
+
+	struct targetfile *next;
+	FILE              *file;
+	char              *name;
+	char*             key;
+	file_offset	      start;
+
+	char              *buffer;
+
+	int               pipe;
+
+} targetfile;
+
+static timer *target_timer = NULL;
+
+typedef struct targetdata {
+
+	gribfile  *file;
+	int	   	   padding;
+	int	   	   bufr_padding;
+	int        count;
+	int        expect;    /* initialised with count_fields() */
+	fieldset   *fs;
+	hypercube  *cube;     /* Hypercube to speed up field_order(). Call cube_order */
+	variable   *v;
+	boolean    order;
+	request    *r;
+	boolean    split;
+	boolean       dispnew;
+	char       *target;
+
+	targetfile* current;
+	targetfile* files;
+
+	int    keycount;
+	char*  key[MAXKEY];
+	int    api[MAXKEY];
+
+	boolean    has_error;
+
+	int               bufsize;
+	boolean           multitarget_format;
+
+	boolean inited;
+
+}targetdata;
+
+static void target_init(void);
+static err  target_open(void *data,request*,request*,int);
+static err  target_close(void *data);
+static err  target_read(void *data,request *r,void *buffer,long *length);
+static err  target_write(void *data,request *r,void *buffer,long *length);
+static err  target_cntl(void *data,int code,void *param,int size);
+
+
+static option opts[] = {
+	{"padding","MARS_PADDING","-padding","120",t_int,sizeof(int),
+		OFFSET(targetdata,padding),},
+
+		{"bufr_padding","MARS_BUFR_PADDING","-bufr_padding","8",t_int,sizeof(int),
+			OFFSET(targetdata,bufr_padding),},
+
+			{"bufsize","MARS_WRITE_BUFFER","-bufsize","0",t_int,sizeof(int),
+				OFFSET(targetdata,bufsize),},
+
+				{"multitarget_format","MARS_MULTITARGET_STRICT_FORMAT","-multitarget_format","0",t_boolean,sizeof(boolean),
+					OFFSET(targetdata,multitarget_format),},
+};
+
+static base_class _targetbase = {
+
+	NULL,                       /* parent class */
+	"targetbase",                 /* name         */
+
+	false,                      /* inited       */
+
+	sizeof(targetdata),           /* private size */
+	NUMBER(opts),               /* option count */
+	opts,                       /* options      */
+
+
+	target_init,                  /* init         */
+
+	target_open,                  /* open         */
+	target_close,                 /* close        */
+
+	target_read,                  /* read         */
+	target_write,                 /* write        */
+
+	target_cntl,                  /* cntl        */
+
+};
+
+
+base_class *targetbase = &_targetbase;
+
+
+static void target_init(void)
+{
+	target_timer = get_timer("Writing to target file","writetarget",false);
+}
+
+
+static err close_all(targetdata *g)
+{
+	targetfile *f = g->files;
+	err e = 0;
+	f = g->files;
+	while(f) 
+	{
+		targetfile *n = f->next;
+		if(f->pipe)
+		{
+			if(pclose(f->file))
+			{
+				marslog(LOG_EROR|LOG_PERR,"pclose(%s)",f->name);
+				e = -2;
+			}
+		}
+
+		else
+		{
+			if(timed_fclose(f->file,target_timer))
+			{
+				marslog(LOG_EROR|LOG_PERR,"fclose(%s)",f->name);
+				e = -2;
+			}
+		}
+
+		strfree(f->name);
+		if(f->buffer) free(f->buffer);
+		strfree(f->key);
+
+		FREE(f);
+		f = n;
+	}
+
+	g->files = g->current = NULL;
+
+	return e;
+}
+
+static targetfile* open_file(targetdata *g,const char *name,int* error)
+{
+	targetfile *f = NEW_CLEAR(targetfile);
+	char   *cmode = target_open_mode(name);
+	*error = 0;
+
+	if(*name == '|')
+	{
+		f->file = popen(name+1,cmode);
+		f->pipe = 1;
+	}
+	else
+	{
+		if(g->dispnew) cmode = "w+";
+		f->file  = fopen(name,cmode);
+		*error = errno;
+	}
+	marslog(LOG_DBUG,"target_open, mode: %s",cmode);
+
+	if(f->file == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"cannot open %s",name);
+		FREE(f);
+		return NULL;
+	}
+
+	f->name = strcache(name);
+
+	if(g->bufsize)
+	{
+		f->buffer = valloc(g->bufsize);
+		if(!f->buffer) 
+			marslog(LOG_WARN,"Could not valloc buffer %d", g->bufsize);
+		else
+			if(setvbuf(f->file,f->buffer,_IOFBF,g->bufsize))
+				marslog(LOG_WARN|LOG_PERR,"setvbuf failed");
+	}
+
+
+	if(!f->pipe)
+	{
+		check_nfs_target(name);
+
+		fseek(f->file,(file_offset)0,SEEK_END);
+		f->start = ftell(f->file);
+	}
+
+	f->next  = g->files;
+	g->files = f;
+
+	return f;
+}
+
+#define IS_ECFS(x) ((strcmp(x,"ec") == 0) || (strcmp(x,"ectmp") == 0))
+
+static char *make_target(targetdata* g,request* r,void* message,long length)
+{
+	static char  target[1024];
+	char  word[1024];
+	char  name[1024];
+	char  host[1024];
+	char val[1024];
+	size_t k       = 0;
+	int mode       = 0;
+	boolean remote  = false;
+	const char *value;
+	const char *p = g->target;
+	int api = 0;
+
+	target[0] = 0;
+	host[0]   = 0;
+
+	while(*p)
+	{
+		switch(*p)
+		{
+
+			case ':':
+
+				if(!remote && k != 0 && strncmp(g->target,word,k) == 0)
+				{
+					word[k] = 0;
+
+					/* check if it is a valide host name */
+
+					if(is_hostname(word))
+					{
+						k      = 0;
+						strcpy(host,word);
+						remote = true;
+					} else if(IS_ECFS(word))
+					{
+						k      = 0;
+						strcpy(host,"ectmp");
+						remote = true;
+					} else word[k++] = *p;
+				}
+				else word[k++] = *p;
+
+				break;
+
+			case '{':
+			case '[':
+				if(mode == 0)
+				{
+					word[k] = 0;
+					strcat(target,word);
+					mode = *p;
+					k    = 0;
+					api  = *p == '{';
+				}
+				else
+					word[k++] = *p;
+				break;
+
+			case ']':
+			case '}':
+				if( (*p == ']' && mode != '[') || (*p == '}' && mode != '{') )
+					word[k++] = *p;
+				else
+				{
+					char tmp[1024];
+					size_t size = 0;
+
+					word[k] = 0;
+
+					if(mode != 0)
+					{
+						if(api)
+						{
+							size_t size = sizeof(val);
+							strcpy(name,word);
+							if(message != NULL)
+							{
+								grib_handle *h = grib_handle_new_from_message(0,message,length);
+								if(h) {
+									if(grib_get_string(h,word,val,&size) == 0)
+										value = val;
+									grib_handle_delete(h);
+								}
+							}
+							else
+							{
+								value = NULL;
+								strcat(target,"{");
+								strcat(target,word);
+								strcat(target,"}");
+							}
+						}
+						else
+						{
+							value = get_value(r,upcase(word),0);
+							strcpy(name,upcase(word));
+							if(value == NULL)
+							{
+								strcat(target,"[");
+								strcat(target,word);
+								strcat(target,"]");
+							}
+						}
+						size = 0;
+					}
+					else size = atol(word);
+					if(value)
+					{
+						static boolean already_logged = false;
+						/* New style, more strict to MARS output values, 
+						   eg, time=0000 instead of 0 */
+						if(g->multitarget_format)
+						{
+							sprintf(tmp,"%0*s",size,value);
+							if(!already_logged)
+								log_statistics("multitarget","new");
+
+						}
+						else
+						{
+							if(!already_logged)
+							{
+								marslog(LOG_WARN,"In order to get filenames according to MARS values,");
+								marslog(LOG_WARN,"please, set env. var. MARS_MULTITARGET_STRICT_FORMAT=1");
+								marslog(LOG_WARN,"before executing your MARS request");
+								log_statistics("multitarget","old");
+							}
+							if(is_number(value))
+								sprintf(tmp,"%0*d",size,atol(value));
+							else
+								sprintf(tmp,"%0*s",size,value);
+						}
+						already_logged=true;
+
+						if(!g->inited) {
+							if(g->keycount >= MAXKEY)
+							{
+								marslog(LOG_EROR,"Target name: maximum number of variables is %d",MAXKEY);
+								return 0;
+							}
+							g->api[g->keycount  ] = api;
+							g->key[g->keycount++] = strcache(name);
+						}
+
+						strcat(target,tmp);
+					}
+					mode = 0;
+					k = 0;
+				}
+				break;
+
+			case ',':
+				if(mode == 1)
+				{
+					mode    = 2;
+					word[k] = 0;
+					value   = get_value(r,word,0);
+					strcpy(name,word);
+					if(value == NULL)
+					{
+						strcat(target,"[");
+						strcat(target,word);
+						strcat(target,",");
+						mode = 0;
+					}
+					k = 0;
+				}
+				else word[k++] = *p;
+				break;
+
+			default:
+				word[k++] = *p;
+				break;
+		}
+		p++;
+	}
+
+	word[k] = 0;
+	strcat(target,word);
+
+	if(!g->inited && g->keycount != 0)
+	{
+		int i;
+		marslog(LOG_INFO,"Enabling automatic target name generation using:");
+		for(i = 0 ; i < g->keycount; i++)
+			marslog(LOG_INFO,"%s",g->key[i]);
+		g->split = true;
+		g->inited = true;
+	}
+
+	if(g->keycount) marslog(LOG_INFO,"Creating target name: %s",target);
+
+	if(remote) {
+
+		remotefile* f = remote_files;
+		while(f)
+		{
+			if(strcmp(host,f->host) == 0 && strcmp(target,f->remote) == 0)
+				return f->local;
+			f = f->next;
+		}
+
+		f = NEW_CLEAR(remotefile);
+		f->host   = strcache(host);
+		f->remote = strcache(target);
+		f->next   = remote_files;
+		f->local  = strcache(marstmp());
+		f->ecfs   = IS_ECFS(f->host);
+		remote_files  = f;
+
+		if(f->ecfs)
+			log_statistics("target","ecfs");
+		else
+			log_statistics("target","rcp:%s",f->host);
+
+		strcpy(target,f->local);
+
+	}
+
+	return target;
+}
+
+static err select_file(targetdata *g,request *r,int retry, void* message,long length)
+{
+
+	int error = 0;
+	int i;
+	char buffer[1024];
+	char val[1024];
+	char *k = NULL;
+	char *t = NULL;
+	targetfile *f = 0;
+
+	if(!g->inited)
+	{
+		/* First time in */
+		t = make_target(g,r,message,length);
+		g->inited = true;
+		if(!t) return -1;
+	}
+	else if(!g->split) 
+		return 0;
+
+	buffer[0] = 0;
+
+	for(i = 0; i < g->keycount; i++)
+	{
+		const char* value   = NULL;
+
+		if(g->api[i])
+		{
+			size_t size = sizeof(val);
+			if(message != NULL)
+			{
+				grib_handle *h = grib_handle_new_from_message(0,message,length);
+				if(h) {
+					if(grib_get_string(h,g->key[i],val,&size) == 0)
+						value = val;
+					grib_handle_delete(h);
+				}
+			}
+		}
+		else
+			value = get_value(r,g->key[i],0);
+
+		if(value == NULL)
+		{
+			marslog(LOG_EROR,"Target split: no value for %s",g->key[i]);
+			return -1;
+		}
+
+		strcat(buffer,value);
+		strcat(buffer,"+");
+	}
+
+	k = strcache(buffer);
+
+	if(g->current && g->current->key == k)
+		return 0;
+
+	f = g->files;
+	while(f) 
+	{
+		if(f->key == k)
+		{
+			g->current = f;
+			return 0;
+		}
+		f = f->next;
+	}
+
+
+	t = t?t:make_target(g,r,message,length);
+	if(!t) return -1;
+
+	g->current = open_file(g,t,&error);
+	if(!g->current) {
+
+		if(error == EMFILE && retry)
+		{
+			err e;
+			marslog(LOG_WARN,"Closing all target files");
+			
+			e  = close_all(g);
+			if(e) return e;
+			return select_file(g,r,0,message,length);
+		}
+	
+		return -1;
+	}
+	else
+	{
+		if(!in_list(targets,t,NULL))
+			add_to_list(&targets,t,NULL);
+	}
+
+	g->current->key = k;
+
+	return 0;
+}
+
+static err target_open(void *data,request *r,request *e,int mode)
+{
+	targetdata *g      = (targetdata*)data;
+	const char *fs     = get_value(r,"FIELDSET",0);
+	const char *target = no_quotes(get_value(r,"TARGET",0));
+	boolean isfield    = (!observation(r) && !image(r) && !simulated_image(r) && !fetch(r) && !feedback(r) && !bias(r) && !track(r));
+	const char *disp   = get_value(r,"DISP",0);
+	const char *padding= get_value(r,"PADDING",0);
+
+	const char *type   = get_value(r,"TYPE",0);
+	boolean isfg       = type && EQ(type,"FG");
+
+    if( (target || (!target && !fs))  && mars.webmars_target) {
+        target = mars.webmars_target;
+    }
+
+
+	if(isfg)
+		g->r = un_first_guess(r);
+	else
+		g->r = clone_all_requests(r);
+
+	g->dispnew = (disp && EQ(disp,"NEW"));
+
+	if(mode == WRITE_MODE)
+	{
+		if(observation(r))
+			g->padding = g->bufr_padding;
+
+		if(fetch(r))
+			g->padding = 0;
+
+		if(is_netcdf(r))
+			g->padding = 0;
+
+		if(is_odb(r))
+			g->padding = 0;
+
+		if(target == NULL && fs == NULL)
+		{
+            marslog(LOG_EROR,"TARGET or FIELDSET value is missing");
+            return -1;
+		}
+
+		/* Use provided padding if any */
+		if(padding)
+			if(isdigit(*padding))
+				g->padding = atoi(padding);
+
+		/* No fieldset allowed for image or */
+
+		if(target == NULL && !isfield)
+		{
+			marslog(LOG_EROR,"FIELDSET not valid for non-field requests");
+			return -2;
+		}
+
+		if((target == NULL || fs == NULL) && (EQ(r->name,"WRITE") || EQ(r->name,"COMPUTE")))
+		{
+			marslog(LOG_EROR,"TARGET and FIELDSET value are missing");
+			return -2;
+		}
+
+		if(fs && (!(EQ(r->name,"WRITE") || EQ(r->name,"COMPUTE"))) && isfield)
+		{
+			int count = count_fields(r);
+
+			g->expect = count;
+
+			g->fs = new_fieldset(count);
+			if(g->fs == NULL) return -1;
+			g->v = new_variable(fs,g->fs,0);
+
+			if((count == 0) && EQ(r->name,"RETRIEVE"))
+				g->order = false;
+			else 
+				g->order = true;
+
+			g->file = new_gribfile(NULL);
+			target = g->file->fname;
+
+			g->cube = new_hypercube_from_mars_request(g->r);
+		}
+
+		g->target = strcache(target);
+
+	}
+	else
+	{
+		marslog(LOG_EXIT,"target_open read not imp");
+	}
+
+	return 0;
+}
+
+char* target_open_mode(const char* target)
+{
+	if(*target== '|')
+		return "w";
+
+	if(in_list(targets,target,NULL))
+		return "a+";
+	else
+	{
+		add_to_list(&targets,target,NULL);
+		return "w+";
+	}
+}
+
+static err  target_close(void *data)
+{
+	targetdata *g = (targetdata*)data;
+	targetfile *f = NULL;
+	err e = 0;
+	int i;
+
+	marslog(LOG_DBUG,"target_close");
+
+	free_all_requests(g->r);
+
+	e = close_all(g);
+
+	strfree(g->target);
+
+	for(i = 0; i < MAXKEY; i++)
+		strfree(g->key[i]);
+
+	if(g->fs && !g->has_error)
+	{
+		free_hypercube(g->cube);
+		/* if EXPECT=ANY, g->expect is 0, so don't check */
+		if(g->expect && check_fieldset(g->fs,g->expect))
+		{
+			free_variable(g->v);
+			e =  -2;
+		}
+	}
+
+	return e;
+}
+
+static err  target_read(void *data,request *r,void *buffer,long *length)
+{
+	return -1;
+}
+
+static err  target_write(void *data,request *r,void *buffer,long *length)
+{
+	long len = *length;
+	targetdata *g = (targetdata*)data;
+	file_offset pos;
+
+	if(select_file(g,r,1,buffer,*length) != 0)
+		return -2;
+
+	if(g->fs) pos = ftell(g->current->file);
+
+	/* marslog(LOG_DBUG,"target_write"); */
+
+	if((len = timed_fwrite(buffer,1,*length,g->current->file,target_timer)) != *length)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Error while writing to disk");
+		*length = len;
+		return EOF;
+	}
+
+	if(*length == 0)
+		return 0;
+
+	if(g->padding)
+	{
+		static int first = true;
+		size_t pad = PAD(len,g->padding);
+		static char c[10240];      /* 10Kb of padding should be enough */
+
+		if(first)
+		{
+			memset(c,0,sizeof(c));
+			first=false;
+		}
+
+		timer_start(target_timer);
+		if(fwrite(c,1,pad,g->current->file) != pad)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Error while writing to disk");
+			timer_stop(target_timer,0);
+			*length = len;
+			return EOF;
+		}
+		timer_stop(target_timer,(long64)pad);
+	}
+
+	if(g->fs)
+	{
+		int n = g->order? cube_order(g->cube,r): g->count++;
+		if(n < 0)
+		{
+			if(mars.debug)
+			{
+				request *w = empty_request("GRIB");
+				marslog(LOG_DBUG,"Got order %d for following field",n);
+				grib_to_request(w,buffer,*length);
+				print_one_request(w);
+				free_all_requests(w);
+			}
+		}
+
+		return set_field(g->fs,read_field(g->file,pos,*length),n);
+	}
+
+	return 0;
+}
+
+static err  target_cntl(void *data,int code,void *param,int size)
+{
+	targetdata *g = (targetdata*)data;
+	targetfile *f = 0;
+	switch(code)
+	{
+		case CNTL_REWIND:
+			g->count = 0;
+			f = g->files;
+			while(f) 
+			{
+				if(f->pipe)
+				{
+					marslog(LOG_EROR,"Cannot rewind a pipe");
+					return -2;
+				}
+				fseek(f->file,f->start,SEEK_SET);
+				ftruncate(fileno(f->file),f->start);
+				f = f->next;
+			}
+			marslog(LOG_DBUG,"target_cntl");
+			return NOERR;
+			/*NOTREACHED*/
+			break;
+
+		case CNTL_ERROR:
+			g->has_error = true;
+			marslog(LOG_DBUG,"target_cntl");
+			return NOERR;
+			/*NOTREACHED*/
+			break;
+
+		default:
+			return -1;
+	}
+}
+
+err send_remote_targets()
+{
+
+	remotefile *f = remote_files;
+	char buf[80];
+	char buffer[2048];
+	err e = 0;
+	char *cmd = 0;
+
+	if(remote_files == NULL)
+		return 0;
+
+	start_timer();
+
+	while(f != NULL && e == 0)
+	{
+		marslog(LOG_INFO,"Sending %s:%s",f->host,f->remote);
+
+		if(f->ecfs)
+			cmd = "$ECFS_SYS_PATH/ecp.p -o";
+		else
+			cmd = "scp";
+
+		sprintf(buffer,"%s %s %s:%s 2>&1",cmd,f->local,f->host,f->remote);
+
+		if(system(buffer) != 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"Command \"%s\" failed",buffer);
+			e = -2;
+		}
+
+		f = f->next;
+	}
+
+
+	f = remote_files;
+	while(f)
+	{
+		remotefile *n = f->next;
+		strfree(f->host);
+		strfree(f->local);
+		strfree(f->remote);
+		FREE(f);
+		f = n;
+	}
+
+	stop_timer(buf);
+	if(*buf) marslog(LOG_INFO,"Sending time %s",buf);
+
+	return e;
+}
diff --git a/src/libMars/tcp.c b/src/libMars/tcp.c
new file mode 100755
index 0000000..c71b23e
--- /dev/null
+++ b/src/libMars/tcp.c
@@ -0,0 +1,383 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <errno.h>
+#include <ctype.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/ioctl.h>
+#if defined(sgi) || defined(fujitsu) || defined(sun)
+#include <sys/filio.h>  /* For FIONREAD */
+#endif
+#ifdef sgi
+#include <bstring.h>
+#endif
+
+int _tcpdbg = 0;
+
+static void pbuf(char *name,char *buf,int len)
+{
+	if(_tcpdbg)
+	{
+		int col = 0;
+		printf("%s len = %d\n",name,len);
+		while(len--)
+		{
+			if(isprint(*buf)) {
+				putchar(*buf);
+				if((++col % 60) == 0) putchar('\n');
+			}
+			buf++;
+		}
+		putchar('\n');
+	}
+}
+
+void socket_buffers(int s)
+{
+#ifdef ECMWF
+#ifndef hpux
+	int flg = 0;
+	marssocklen_t flgsize = sizeof(flg);
+
+	/* Check Socket buffers */
+	if(getsockopt(s, SOL_SOCKET, SO_SNDBUF, (msockopt)&flg, &flgsize)<0)
+		marslog(LOG_WARN|LOG_PERR,"getsockopt SO_SNDBUF");
+	if(flg != mars.sockbuf && mars.sockbuf)
+	{
+		if(setsockopt(s, SOL_SOCKET, SO_SNDBUF, (msockopt)&mars.sockbuf, sizeof(mars.sockbuf))<0)
+			marslog(LOG_WARN|LOG_PERR,"setsockopt SO_SNDBUF");
+		marslog(LOG_DBUG,"Changing Send socket buffers from %d to %d",flg,mars.sockbuf);
+	}
+
+	if(getsockopt(s, SOL_SOCKET, SO_RCVBUF, (msockopt)&flg, &flgsize)<0)
+		marslog(LOG_WARN|LOG_PERR,"getsockopt SO_RCVBUF");
+	if(flg != mars.sockbuf && mars.sockbuf)
+	{
+		if(setsockopt(s, SOL_SOCKET, SO_RCVBUF, (msockopt)&mars.sockbuf, sizeof(mars.sockbuf))<0)
+			marslog(LOG_WARN|LOG_PERR,"setsockopt SO_RCVBUF");
+		marslog(LOG_DBUG,"Changing Receive socket buffers from %d to %d",flg,mars.sockbuf);
+	}
+#endif
+#endif
+}
+
+int writetcp(void *p,void *buf,u_int len)
+{
+	size_t i;
+	size_t cnt;
+	int   soc = *(int*)p;
+	char  *b = (char*)buf;
+
+	pbuf("writetcp",(char*)buf,len);
+
+	for (cnt = len; cnt > 0; cnt -= i, b += i)
+		switch(i = write(soc, b, cnt))
+		{
+		case 0:
+			/* marslog(LOG_EROR,"tcp write: premature eof"); */
+			return -1;
+			/* break; */
+
+		case -1:
+			/* marslog(LOG_EROR|LOG_PERR,"tcp write failed"); */
+			return -1;
+			/* break; */
+		}
+
+
+	return len;
+}
+
+boolean tcp_read_ready(int soc)
+{
+	struct timeval timeout = { 
+		0, 100, 			}; /* 1 10th sec */
+	fd_set readfds;
+
+	FD_ZERO(&readfds);
+	FD_SET(soc,&readfds);
+
+	for(;;)
+		switch(select(FD_SETSIZE,
+			&readfds,
+			NULL,NULL,&timeout))
+		{
+			/* time out */
+		case 0:
+			return false;
+			/* break; */
+
+		case -1:
+			if(errno != EINTR)
+			{
+				marslog(LOG_EROR|LOG_PERR,"select");
+				return true;
+			}
+			break;
+
+		default:
+			return true;
+			/* break; */
+		}
+}
+
+int readtcp(void *p,void *buf,u_int len)
+{
+	struct timeval timeout = { 20,0}; /* 20 sec. */
+	int   soc = *(int*)p;
+	int   l = len;
+	fd_set readfds;
+
+	if(l == 0) return 0;
+
+    FD_ZERO(&readfds);
+	FD_SET(soc,&readfds);
+
+	
+	if(select(FD_SETSIZE,
+			&readfds, NULL,NULL,&timeout) == 0)
+	{
+		/* after 20 sec. , send 0 bytes */
+		if(write(soc,buf,0) != 0)
+		{
+			marslog(LOG_EROR,"tcp read: write(0) failed");
+			return 0;
+		}
+	}
+	
+
+	switch(l =  read(soc,buf,l))
+	{
+	case 0:
+		/* marslog(LOG_EROR,"tcp read: premature eof"); */
+		return -1;
+		/* break; */
+
+	case -1:
+		/* marslog(LOG_EROR|LOG_PERR,"tcp read failed"); */
+		return -1;
+		/* break; */
+
+	}
+	pbuf("readtcp",(char*)buf,l);
+
+	return l;
+}
+
+boolean is_hostname(const char *host)
+{
+#ifdef INADDR_NONE
+
+	in_addr_t addr;
+	in_addr_t none = INADDR_NONE;
+
+#else
+
+#ifdef __alpha
+    unsigned int  none = (unsigned int)~0;
+#elif defined(fujitsu)
+    u_int none = (u_int)~0;
+#elif defined(__64BIT__)
+	uint32_t none = (uint32_t)-1;
+#else
+    unsigned long none = (unsigned long)-1;
+#endif
+
+#endif
+
+	if(inet_addr(host) != none) 
+		return true;
+
+	return (gethostbyname(host) != NULL);
+}
+
+void traceroute(struct sockaddr_in *from)
+{
+	char *tracecmd = getenv("MARS_TRACEROUTE");
+
+	if(!tracecmd)
+		return;
+	
+	if(from->sin_family == AF_INET)
+	{
+		char *net = inet_ntoa(from->sin_addr);
+		struct hostent  *remote;
+		char cmd[2048];
+
+		remote = gethostbyaddr((char*)&from->sin_addr,
+		    sizeof(from->sin_addr),
+		    from->sin_family);
+
+		if(remote)
+		{
+			sprintf(cmd,"%s %s",tracecmd,remote->h_name);
+			if(system(cmd) != 0)
+			{
+				 marslog(LOG_EROR|LOG_PERR,"Command \"%s\" failed",cmd);
+			}
+		}
+	}
+}
+
+int call_server(const char *host, int port, int retries)
+{
+	struct sockaddr_in s_in;
+	struct hostent *him;
+	int s;
+	int status;
+	int tries = 0;
+	int flg;
+
+#ifdef INADDR_NONE
+
+	in_addr_t addr;
+	in_addr_t none = INADDR_NONE;
+
+#else
+
+#ifdef __alpha
+	unsigned int  addr;
+    unsigned int  none = (unsigned int)~0;
+#elif defined(fujitsu)
+	u_int addr;
+    u_int none = (u_int)~0;
+#elif defined(__64BIT__)
+	unsigned long addr;
+	uint32_t none = (uint32_t)-1;
+#else
+	unsigned long addr;
+    unsigned long none = (unsigned long)-1;
+#endif
+
+#endif
+
+	boolean quiet = (retries <= 0);
+
+	if(retries <= 0) retries = -retries;
+
+	bzero(&s_in,sizeof(s_in));
+
+	s_in.sin_port = htons(port);
+	s_in.sin_family = AF_INET;
+
+	marslog(LOG_DBUG,"Calling \"%s\" port %d",host,port);
+
+	addr = inet_addr(host);
+	s_in.sin_addr.s_addr = addr;
+
+	if(addr == none) {
+		if ((him=gethostbyname(host))==NULL)
+		{
+			marslog(LOG_EROR,"unknown host : %s",host);
+			return -1;
+		}
+
+		s_in.sin_family = him->h_addrtype;
+
+		bcopy(him->h_addr_list[0],&s_in.sin_addr,him->h_length);
+	}
+
+	do
+	{
+
+		s = socket(AF_INET, SOCK_STREAM, 0);
+		if (s < 0)
+		{
+			marslog(LOG_EROR|LOG_PERR,"socket");
+			return(-1);
+		}
+
+		socket_buffers(s);
+
+		if(getenv("MARS_BIND"))
+		{
+			struct sockaddr_in sin;
+			memset(&sin, 0, sizeof(struct sockaddr_in));
+			sin.sin_port        = htons(0);
+			sin.sin_family      = AF_INET;
+
+			marslog(LOG_INFO,"Binding socket to %s",getenv("MARS_BIND"));
+			sin.sin_addr.s_addr = inet_addr(getenv("MARS_BIND"));
+
+			if(bind(s,(struct sockaddr*)&sin,sizeof(sin)) == -1) 
+			{
+				marslog(LOG_EROR|LOG_PERR,"bind");
+				close(s);
+				return -1;
+			}
+
+		}
+
+		status = connect(s,(struct sockaddr*)&s_in,sizeof(s_in));
+
+		if (status < 0)
+		{
+			if(!quiet)
+				marslog(LOG_WARN|LOG_PERR,"connect : %s %d",host,port);
+			socket_close(s);
+
+			if(retries != 0 && ++tries >= retries)
+			{
+				if(!quiet)
+					marslog(LOG_EROR,"To many retries. Giving up.");
+				return -1;
+			}
+
+			sleep(5);
+		}
+		else
+			marslog(LOG_DBUG,"Connected to address %s",
+				inet_ntoa(s_in.sin_addr));
+
+	}while(status<0);
+
+	flg = 1;
+	if(setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (msockopt)&flg, sizeof(flg))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_KEEPALIVE");
+
+ 	/* Dont't get killed by pipes */
+ 	signal(SIGPIPE,SIG_IGN);
+
+	return (s);   /* OK */
+}
+
+static void bytes_left(int s)
+{
+	int nbytes=0;
+
+	if(s == -1) 
+		return;
+
+	if(ioctl(s,FIONREAD,&nbytes) == -1)
+		marslog(LOG_PERR,"Cannot determine socket status");
+	else
+		if(nbytes)
+			marslog(LOG_WARN,"Closing connection with %d byte%s outstanding",
+								nbytes,nbytes>1?"s":"");
+}
+
+int socket_close(int s)
+{
+	bytes_left(s);
+	return close(s);
+}
+
+int socket_file_close(FILE* f)
+{
+	bytes_left(fileno(f));
+	return fclose(f);
+}
diff --git a/src/libMars/time.c b/src/libMars/time.c
new file mode 100644
index 0000000..ef02c50
--- /dev/null
+++ b/src/libMars/time.c
@@ -0,0 +1,40 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+datetime date_time_2_datetime(long julian_date,
+									 long hour,
+									 long min,
+									 long sec)
+{
+	return julian_date * SECS_IN_DAY + hour * 3600 + min * 60 + sec; 
+}
+
+datetime key_2_datetime(const packed_key* keyptr)
+{
+	long date;
+
+	date = KEY_YEAR(keyptr)*10000 + 
+		KEY_MONTH(keyptr) * 100 + 
+		KEY_DAY(keyptr);		
+	date = date_to_julian(date);
+	return date * SECS_IN_DAY + 
+		   KEY_HOUR(keyptr) * 3600 + 
+		   KEY_MINUTE(keyptr) * 60 + 
+		   KEY_SECOND(keyptr); 
+}
+
+/* range is expected in seconds */
+void init_time_interval(time_interval* t,datetime begin,long range)
+{
+	t->begin = begin;	
+	t->end = begin + range;
+}
diff --git a/src/libMars/timer.c b/src/libMars/timer.c
new file mode 100644
index 0000000..ae8d670
--- /dev/null
+++ b/src/libMars/timer.c
@@ -0,0 +1,331 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+static timer *timers = NULL;
+
+timer *get_timer(const char* name, const char *statname, boolean elapsed)
+{
+	timer *t = timers;
+
+	while(t)
+	{
+		if(strcmp(name,t->name_) == 0)
+			return t;
+		t = t->next_;
+	}
+
+	t = NEW_CLEAR(timer);
+	t->name_	= strcache(name);
+	t->active_  = false;
+	t->count_   = 0;
+	t->timer_   = 0;
+	t->total_   = 0;
+
+	t->elapsed_    = elapsed; /* Whether to print CPU usage */
+	t->cpu_        = 0;
+	t->total_cpu_  = 0;
+
+	t->statname_ = 0;
+	if(statname)
+		t->statname_ = strcache(statname);
+
+	t->next_    = timers;
+	timers      = t;
+
+	return t;
+}
+
+int timer_start(timer* t)
+{
+	int e = 0;
+	if(mars.notimers || (t == NULL))
+		return 0;
+
+	e = gettimeofday(&t->start_,NULL);
+	if(e != 0)
+		marslog(LOG_WARN|LOG_PERR,"Error starting timer '%s'",t->name_?t->name_:"unnamed");
+	t->active_ = true;
+	t->cpu_    = proc_cpu();
+	return e;
+}
+
+int timer_stop(timer* t, long64 total)
+{
+	struct timeval stop, diff;
+	int e;
+	double c;
+
+	if(mars.notimers || (t == NULL))
+		return 0;
+
+	e = gettimeofday(&stop,NULL);
+	c = proc_cpu();
+
+	if(e != 0)
+		marslog(LOG_WARN|LOG_PERR,"Error stopping timer '%s'",t->name_?t->name_:"unnamed");
+
+	if(!t->active_)
+	{
+		marslog(LOG_WARN,"Stopping non-started timer '%s'",t->name_?t->name_:"unnamed");
+		return 1;
+	}
+
+	diff.tv_sec  = stop.tv_sec  - t->start_.tv_sec;
+	diff.tv_usec = stop.tv_usec - t->start_.tv_usec;
+	if (diff.tv_usec < 0)
+	{
+		diff.tv_sec--;
+		diff.tv_usec += 1000000;
+	}
+
+	t->timer_ += (double)diff.tv_sec + ((double)diff.tv_usec / 1000000.);
+	t->total_ += total;
+	t->total_cpu_ += (c - t->cpu_);
+
+	t->active_=false;
+	t->count_++;
+
+	return e;
+
+}
+
+double timer_value(timer *t)
+{
+	if(mars.notimers || (t == NULL))
+		return 0.0;
+
+	return t->timer_;
+}
+
+void timer_print_to_file(timer* t, FILE *f)
+{
+	fprintf(f,"%g:%d:%s:%d:%lld:%d:%g:%g\n",
+				t->timer_, 
+				t->active_, 
+				t->name_, 
+				t->count_, 
+				t->total_, 
+				t->elapsed_, 
+				t->cpu_, 
+				t->total_cpu_);
+				/* t->statname_ */ /* Not all stats have a name */
+}
+
+void timer_print(timer* t)
+{
+	char *name;
+	if(mars.notimers)
+	{
+		marslog(LOG_WARN,"Timers are disabled");
+		return;
+	}
+	if(t == NULL)
+	{
+		marslog(LOG_WARN,"Internal error: timer_print() called with NULL timer");
+		return;
+	}
+
+	
+	name = t->name_?t->name_:"";
+	/* Print timers longer than 1 second or those that have a rate */
+	if((t->timer_>=1) || (t->total_ != 0)) 
+	{
+		char cpu[1024] = "";
+
+		if(! t->elapsed_ && t->total_cpu_ >= 1.0)
+			sprintf(cpu,"cpu: %s",timename(t->total_cpu_));
+
+		if(t->total_ != 0)
+		{
+			double rate = (double)t->total_/t->timer_;
+			char bytes[80];
+			sprintf(bytes,"%sbyte(s)",bytename(t->total_));
+			marslog(LOG_INFO,"  %s: %s in %s [%sbyte/sec] %s",
+							 name,bytes,(t->timer_>=1)?timename(t->timer_):"< 1 sec",bytename(rate),cpu);
+		}
+		else
+			marslog(LOG_INFO,"  %s: wall: %s%s",name,timename(t->timer_),cpu);
+
+		if(t->statname_)
+			log_statistics(t->statname_,"%ld",(long)t->timer_);
+	}
+}
+
+void timer_partial_rate(timer *t, double start, long64 total)
+{
+	if(mars.notimers)
+	{
+		marslog(LOG_WARN,"Timers are disabled");
+		return;
+	}
+	if(t == NULL)
+	{
+		marslog(LOG_WARN,"Internal error: timer_partial_rate() called with NULL timer");
+		return;
+	}
+
+	{
+	double ptime = t->timer_ - start;
+	long64 ptotal = total;
+	char *name = t->name_?t->name_:"";
+	if(ptime>=1)
+	{
+		double rate = (double)ptotal/ptime;
+		char bytes[80];
+		sprintf(bytes,"%sbyte(s)",bytename(ptotal));
+		marslog(LOG_INFO,"  %s: %s in %s [%sbyte/sec]",
+						name,bytes,timename(ptime),bytename(rate));
+	}
+	}
+}
+
+void print_all_timers()
+{
+	timer *t = timers;
+	FILE  *f = NULL;
+
+	if(mars.timers_file)
+	{
+		if((f = fopen(mars.timers_file,"a")) == NULL)
+		{
+			marslog(LOG_WARN|LOG_PERR,"Cannot open '%s'",mars.timers_file);
+			marslog(LOG_WARN,"Disable printing timers to file");
+			mars.timers_file = NULL;
+		}
+		else
+			marslog(LOG_INFO,"Printing timers to file '%s'",mars.timers_file);
+	}
+	
+	while(t)
+	{
+		timer_print(t);
+		if(mars.timers_file)
+			timer_print_to_file(t,f);
+		t = t->next_;
+	}
+
+	if(mars.timers_file)
+	{
+		long long bytes = proc_mem();
+		fprintf(f,"%lld:%s\n",bytes,"Memory used");
+	}
+}
+
+void reset_all_timers()
+{
+	timer *t = timers;
+	while(t)
+	{
+		t->count_     = 0;
+		t->timer_     = 0;
+		t->active_    = 0;
+		t->total_     = 0;
+		t->total_cpu_ = 0;
+		t->cpu_       = 0;
+		t->elapsed_   = 0;
+		t = t->next_;
+	}
+}
+
+
+/*************************************************
+* Timed functions
+**************************************************/
+
+int timed_fread(char *buffer, int n, int length, FILE *f, timer *t)
+{
+	int r = 0;
+	long64 total = 0;
+	timer_start(t);
+	if((r = fread(buffer,n,length,f)) > 0)
+		total = r*n;
+
+	timer_stop(t,total);
+
+	return r;
+}
+
+int timed_wind_next(wind* w, FILE *f, char *buffer, long *length, timer *t)
+{
+	int r = 0;
+	long64 total = 0;
+	if((r = wind_next(w,f,buffer,length,t)) == 0)
+		total = *length;
+
+	return r;
+}
+
+int timed_fwrite(char *buffer, int n, int length, FILE *f, timer *t)
+{
+	int r = 0;
+	long64 total = 0;
+	timer_start(t);
+	if((r = fwrite(buffer,n,length,f)) > 0)
+		total = r*n;
+	timer_stop(t,total);
+
+	return r;
+}
+
+int timed_fclose(FILE *f, timer *t)
+{
+	int r = 0;
+	timer_start(t);
+	r = fclose(f);
+	timer_stop(t,0);
+
+	return r;
+}
+
+int timed_writetcp(void *data, char *buffer, int n, timer *t)
+{
+	int r = 0;
+	long64 total = 0;
+	timer_start(t);
+	if((r = writetcp(data,buffer,n)) > 0)
+		total = r;
+	timer_stop(t,total);
+
+	return r;
+}
+
+int timed_readtcp(void *data, char *buffer, int n, timer *t)
+{
+	int r = 0;
+	long64 total = 0;
+	timer_start(t);
+	if((r = readtcp(data,buffer,n)) > 0)
+		total = r;
+	timer_stop(t,total);
+	return r;
+}
+
+int timed_readany(FILE *f, char *buffer, long *length, timer *t)
+{
+	int e;
+	long original = *length;
+	long64 total = 0;
+	timer_start(t);
+	if(((e = _readany(f,buffer,length)) == NOERR) || (e == BUF_TO_SMALL))
+		total = (e == BUF_TO_SMALL)?original:*length;
+	timer_stop(t,total);
+
+	if(e != NOERR && e != BUF_TO_SMALL && e != EOF)
+	{
+		if(e == NOT_FOUND_7777)
+			marslog(LOG_WARN,"Group 7777 not found by readany",e);
+		else
+			marslog(LOG_WARN,"Error %d returned by readany",e);
+	}
+
+	return e;
+}
diff --git a/src/libMars/tools.c b/src/libMars/tools.c
new file mode 100755
index 0000000..88d64ae
--- /dev/null
+++ b/src/libMars/tools.c
@@ -0,0 +1,1735 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include "grib_api.h"
+#include <unistd.h>
+#include <math.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pwd.h>
+#include <ctype.h>
+#ifdef sgi
+#include <bstring.h>
+#endif
+#include <string.h>
+
+#include <sys/param.h>
+
+#include <dirent.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/time.h>
+
+#include <grib_api.h>
+
+#if defined(sgi)
+#define _MNT_ENT_ 
+#endif
+
+
+#ifdef _MNT_ENT_
+#include <mntent.h>
+#endif
+
+/* #include <sys/dir.h> */
+#ifndef S_IAMB
+#define S_IAMB 0777
+#endif
+
+#ifndef S_ISLNK
+#define S_ISLNK(a) ((a)&S_IFLNK != 0)
+#endif
+
+
+#define MAX_TIMER 10
+#ifndef NGROUPS
+#define NGROUPS 20
+#endif
+
+#include <sys/resource.h>
+
+#if !defined(hpux) && !defined(AIX) && !defined(linux) && !defined(CYGWIN)
+
+#include <sys/procfs.h>
+
+typedef struct procfs {
+	int        fd;
+	prpsinfo_t ps;
+	prstatus_t status;
+	char       fname[1024];
+} procfs_t;
+
+static procfs_t process;
+
+boolean init_process()
+{
+	pid_t pid;
+
+	static boolean inited = false;	
+	if(inited)
+		return inited;
+
+	pid = getpid();
+	sprintf(process.fname,"/proc/%d",pid);
+
+	if( (process.fd = open(process.fname,O_RDONLY | O_EXCL)) != -1)
+		inited = true;
+	else
+		marslog(LOG_WARN|LOG_PERR,"Failed to open process information file (%s)",process.fname);
+
+	return inited;
+}
+
+long64 proc_mem()
+{
+	if(init_process())
+	{
+		if(ioctl(process.fd,PIOCPSINFO,&(process.ps)) == -1)
+			marslog(LOG_WARN|LOG_PERR,"ioctl(...,PIOCPSINFO,...) failed on %s [fd=%d]",process.fname,process.fd);
+		else
+			return (process.ps.pr_size * getpagesize());
+	}
+	return 0;
+}
+
+#elif defined(AIX)
+
+#define PROCS_SIZE 1
+#include <procinfo.h>
+long64 proc_mem()
+{
+	pid_t p = getpid();
+	struct procsinfo  pinfos[PROCS_SIZE];
+	int n = getprocs(pinfos,sizeof(struct procsinfo),0,sizeof(struct fdsinfo),&p,PROCS_SIZE);
+	if(n)
+	{
+		/* return (pinfos[0].pi_dvm + pinfos[0].pi_tsize + pinfos[0].pi_sdsize ); */
+		return pinfos[0].pi_size * getpagesize();
+	}
+	return 0;
+}
+
+#else
+
+long64 proc_mem()
+{
+	return 0;
+}
+
+#endif
+
+
+double proc_cpu()
+{
+	struct rusage rup;
+
+	if(getrusage(RUSAGE_SELF,&rup) != -1)
+	{
+		return (rup.ru_utime.tv_sec + rup.ru_utime.tv_usec / 1000000.0 +
+			   rup.ru_stime.tv_sec + rup.ru_stime.tv_usec / 1000000.0);
+	}
+	return clock()/(double)CLOCKS_PER_SEC;
+}
+
+
+const char *user(void)
+{
+	static char *u;
+	struct passwd *pw;
+
+	if(u) return u;
+
+	setpwent();
+	if((pw = getpwuid(getuid())) == NULL)
+		marslog(LOG_EXIT|LOG_PERR,"Cannot get user name");
+
+	endpwent();
+
+	return u = strcache(pw->pw_name);
+}
+
+
+static err z(char *cmd,void *inbuf,void *outbuf,long inlen,long *outlen,long max)
+{
+	int toc[2];
+	int top[2];
+	int toz,frz;
+	fd_set fdr,fdw;
+	int nfd;
+	char *p,*q;
+	int  cnt;
+	boolean eof = false;
+	long sav = inlen;
+
+	if(pipe(top) < 0)
+	{
+		marslog(LOG_EROR | LOG_PERR,"(un)compress pipe (top)");
+		return -2;
+	}
+
+	if(pipe(toc) < 0)
+	{
+		marslog(LOG_EROR | LOG_PERR,"(un)compress pipe (toc)");
+		return -2;
+	}
+
+
+	switch(fork())
+	{
+	case 0:
+		if(dup2(toc[0],0)<0)
+			marslog(LOG_EXIT|LOG_PERR,"(un)compress dup2 (toc)");
+
+		if(dup2(top[1],1)<0)
+			marslog(LOG_EXIT|LOG_PERR,"(un)compress dup2 (top)");
+
+		close(toc[0]);
+		close(toc[1]);
+		close(top[0]);
+		close(top[1]);
+
+		execlp(cmd,cmd,"-c","-v",NULL);
+		marslog(LOG_EXIT|LOG_PERR,"(un)compress execlp");
+
+		break;
+
+	case -1:
+		marslog(LOG_EROR | LOG_PERR,"(un)compress fork");
+		return -2;
+		/*NOTREACHED*/
+		break;
+
+	default:
+
+		toz = toc[1];
+		frz = top[0];
+		close(toc[0]);
+		close(top[1]);
+
+		nfd = toz;
+		if(frz>nfd) nfd = frz;
+		nfd++;
+
+		p = inbuf;
+		q = outbuf;
+		cnt = 0;
+
+		/*
+		if(fcntl(toz,F_GETFL,&flags) < 0)
+		{
+			marslog(LOG_EROR | LOG_PERR,"(un)compress fcntl-F_GETFL(toz)");
+			close(toz);
+			close(frz);
+			return -2;
+		}
+*/
+
+		if( fcntl(toz,F_SETFL,O_NONBLOCK) <0 )
+		{
+			marslog(LOG_EROR | LOG_PERR,"(un)compress fcntl-F_SETFL(toz)");
+			close(toz);
+			close(frz);
+			return -2;
+		}
+
+		/*
+		if(fcntl(frz,F_GETFL,&flags) < 0 )
+		{
+			marslog(LOG_EROR | LOG_PERR,"(un)compress fcntl-F_GETFL(frz)");
+			close(toz);
+			close(frz);
+			return -2;
+		}
+*/
+		if( fcntl(frz,F_SETFL, O_NONBLOCK) <0 )
+		{
+			marslog(LOG_EROR | LOG_PERR,"(un)compress fcntl-F_SETFL(frz)");
+			close(toz);
+			close(frz);
+			return -2;
+		}
+
+		while(!eof)
+		{
+			FD_ZERO(&fdr);
+			FD_ZERO(&fdw);
+			if(toz >= 0) FD_SET(toz,&fdw);
+			if(frz >= 0) FD_SET(frz,&fdr);
+
+#if defined(hpux) && !defined(R64)
+			if(select(nfd,(int *) &fdr,(int *) &fdw,NULL,NULL) < 0)
+#else
+			if(select(nfd,&fdr,&fdw,NULL,NULL) < 0)
+#endif
+			{
+				marslog(LOG_EROR | LOG_PERR,"(un)compress select");
+				close(toz);
+				close(frz);
+				return -2;
+			}
+
+			if(toz >= 0  && FD_ISSET(toz,&fdw))
+			{
+				int len = write(toz,p,inlen);
+
+				if(len == -1 && errno != EAGAIN)
+				{
+					marslog(LOG_EROR | LOG_PERR,"(un)compress write");
+					close(toz);
+					close(frz);
+					return -2;
+				}
+
+				if(len > 0)
+				{
+					inlen -= len;
+					p      += len;
+
+					if(inlen <= 0)
+					{
+						close(toz);
+						toz = -1;
+					}
+				}
+			}
+
+			if(FD_ISSET(frz,&fdr))
+			{
+
+				/* long bytes = MIN(PIPE_BUF,max); */
+				long bytes = MIN(fpathconf(frz,_PC_PIPE_BUF),max);
+				long len;
+
+				len = read(frz,q,bytes);
+
+				if(len == -1 && errno != EAGAIN)
+				{
+					marslog(LOG_EROR | LOG_PERR,"(un)compress read");
+					close(toz);
+					close(frz);
+					return -2;
+				}
+
+
+				if(len == 0)
+					eof = true;
+
+				if(len > 0)
+				{
+					q  += len;
+					cnt+= len;
+					max-=len;
+
+					if(max<=0)
+					{
+						*outlen = sav;
+						close(toz);
+						close(frz);
+						marslog(LOG_DBUG,"Cannot %s",cmd);
+						return -1;
+					}
+				}
+			}
+
+		}
+
+		*outlen = cnt;
+
+		close(toz);
+		close(frz);
+
+		marslog(LOG_DBUG,"%s : %d -> %d (%5.2f%%)",cmd,
+		    sav,cnt,
+		    ABS((double)sav-(double)cnt)/
+		    (double)sav*100.0);
+
+	}
+	return NOERR;
+}
+
+
+err mars_compress(void *in,void *out,long inlen,long *outlen)
+{
+	return z("compress",in,out,inlen,outlen,inlen);
+}
+
+err mars_uncompress(void *in,void *out,long inlen,long *outlen)
+{
+	return z("uncompress",in,out,inlen,outlen,LONG_MAX);
+}
+
+/* s_stop() */
+/* { */
+/* } */
+
+const char *no_quotes(const char *in)
+{
+	static char buf[1024];
+	char *p = buf;
+
+
+	if(!in) return NULL;
+
+	strcpy(buf,in);
+
+	if(*buf == '"') /* || *buf == '\'') */
+	{
+		p = buf+1;
+		buf[strlen(buf)-1] = 0;
+	}
+	return p;
+}
+
+#ifdef VMS
+/* void bzero(void *a,int b) { memset(a,0,b); } */
+/* char *strdup(char *a) { char *p = MALLOC(strlen(a)+1);strcpy(p,a);return p;} */
+#endif
+
+#ifdef AIX
+int casecompare(const char *a,const char *b)
+{
+	char x,y;
+
+	while(*a && *b)
+	{
+		x = islower(*a) ? toupper(*a) : *a;
+		y = islower(*b) ? toupper(*b) : *b;
+
+		if(x != y) return x-y;
+
+		a++;
+		b++;
+	}
+	x = islower(*a) ? toupper(*a) : *a;
+	y = islower(*b) ? toupper(*b) : *b;
+
+	return x-y;
+}
+#endif
+
+
+static struct timeval start[MAX_TIMER];
+static double startcpu[MAX_TIMER];
+static int top = 0;
+
+void start_timer(void)
+{
+	if(mars.notimers)
+		return;
+	gettimeofday(&start[top],NULL);
+	startcpu[top] = proc_cpu();
+	top++;
+}
+
+static char *timetext(char *pfx,double ds,char *text)
+{
+	long s = ROUND(ds);
+	long x = s;
+	long n;
+	char sec[20];
+	char min[20];
+	char hou[20];
+	char day[20];
+
+	*text = *sec = *min = *hou = *day = 0;
+	if(s)
+	{
+
+		if((n = x % 60) != 0) sprintf(sec,"%ld sec ",n);
+		x /= 60;
+		if((n = x % 60) != 0) sprintf(min,"%ld min ",n);
+		x /= 60;
+		if((n = x % 24) != 0) sprintf(hou,"%ld hour ",n);
+		x /= 24;
+		if((n = x) != 0) sprintf(day,"%ld day ",n);
+
+		sprintf(text,"%s%s%s%s%s",pfx,day,hou,min,sec);
+	}
+
+	return text;
+
+}
+
+char *timename(double t)
+{
+	static char buf[80];
+	return timetext("",t,buf);
+}
+
+double stop_timer(char *text)
+{
+	if(mars.notimers)
+	{
+		*text = 0;
+		return 0.0;
+	}
+
+	{
+	struct timeval stop;
+	struct timeval diff;
+	double   s;
+	clock_t cpu =  proc_cpu();
+
+	top--;
+
+
+	gettimeofday(&stop,NULL);
+
+
+	diff.tv_sec  = stop.tv_sec  - start[top].tv_sec;
+	diff.tv_usec = stop.tv_usec - start[top].tv_usec;
+
+	if (diff.tv_usec < 0)
+	{
+		diff.tv_sec--;
+		diff.tv_usec += 1000000;
+	}
+
+	s = (double)diff.tv_sec + ((double)diff.tv_usec / 1000000.);
+
+	if(text)
+	{
+		char t1[80];
+		char t2[80];
+
+		sprintf(text,"%s%s",
+		    timetext(" wall: ",s,t1),
+			timetext(" cpu: ",(cpu-startcpu[top]),t2));
+	}
+
+	return s;
+	}
+}
+
+clock_t timer_cpu()
+{
+	if(mars.notimers)
+		return 0;
+
+	return proc_cpu()-startcpu[top];
+}
+
+const char *bytename(double bytes)
+{
+	static char *names[] = { "","K","M","G","T","P","E","Z","Y" }; 
+    double x = bytes; 
+    int    n = 0;
+	static char buf[20];
+
+	while(x>=1024.0 && n < NUMBER(names))
+	{
+		x /= 1024.0;
+		n++;
+	}
+
+	sprintf(buf,"%.2f %s",x,names[n]);
+
+	return buf;
+}
+
+int mkdirp(const char *path,int mode)
+{
+	const char *p = path + 1;
+
+	while(*p)
+	{
+		if(*p == '/')
+		{
+			char *q = (char*)p;
+			*q = 0;
+			mkdir(path,mode);
+			*q = '/';
+		}
+		p++;
+	}
+	return mkdir(path,mode);
+}
+
+const char *makepath(const char *dname,const char *fname)
+{
+	static char buf[1024];
+	char        tmp[1024];
+	char *p;
+	char *q;
+	char *r = NULL;
+	boolean more = true;
+
+	*buf = 0;
+
+	if(fname && *fname == '/') return fname;
+
+	if(dname[0] == '/' || dname[0] == '.' || dname[0] == '\0')
+		sprintf(tmp,"%s/%s",dname,fname);
+	else
+		sprintf(tmp,"./%s/%s",dname,fname);
+
+	while(more)
+	{
+		more = false;
+		p = tmp;
+		r = NULL;
+		*buf = 0;
+
+
+		while((q = strtok(p,"/")) && !more)
+		{
+			if(strcmp(q,".") == 0)
+			{
+				if(r == NULL) strcat(buf,q);
+			}
+			else if((strcmp(q,"..") == 0)) {
+				if(r == NULL) strcat(buf,q);
+				else
+				{
+					more = true;
+					*r   = 0;
+					strcat(buf,"/");
+					strcat(buf,q+3);
+				}
+			}
+			else {
+				r = buf + strlen(buf);
+				strcat(buf,"/");
+				strcat(buf,q);
+			}
+
+			p = NULL;
+		}
+		strcpy(tmp,buf);
+	}
+
+	return buf;
+}
+
+const char *mbasename(const char *fname)
+{
+	static char buf[1024];
+
+	*buf = 0;
+
+	if(fname)
+	{
+		int n = -1;
+		int i = 0;
+		const char *q = fname;
+
+		while(*q) {
+			if(*q == '/') n = i;
+			q++;
+			i++;
+		}
+		strcat(buf,fname+(n+1));
+	}
+
+
+	return buf;
+}
+
+const char *dirname(const char *fname)
+{
+	static char buf[1024];
+
+	strcpy(buf,".");
+
+	if(fname)
+	{
+		int n = -1;
+		int i = 0;
+		char *q = buf;
+		strcpy(buf,fname);
+		while(*q) {
+			if(*q == '/') n = i;
+			q++;
+			i++;
+		}
+
+		switch(n)
+		{
+		case -1:
+			strcpy(buf,".");
+			break;
+
+		case 0:
+			strcpy(buf,"/");
+			break;
+
+		default:
+			buf[n] = 0;
+		}
+	}
+
+
+	return buf;
+}
+
+int deletefile(const char *name)
+{
+	int e = 0;
+	struct stat st;
+
+	if((e = lstat(name,&st)) != 0) /*  Don't follow link */
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot stat %s",name);
+		return e;
+	}
+
+	if(S_ISDIR(st.st_mode) && !S_ISLNK(st.st_mode))
+	{
+		struct dirent *s;
+		DIR *d;
+
+		d = opendir(name);
+		if(!d) {
+			marslog(LOG_EROR|LOG_PERR,"opendir %s",name);
+			return -1;
+		}
+
+		while((s = readdir(d)) && (e == 0))
+		{
+			if(strcmp(s->d_name,".") != 0 && strcmp(s->d_name,"..") != 0)
+			{
+				char buf[1024];
+				sprintf(buf,"%s/%s",name,s->d_name);
+				e = deletefile(buf);
+			}
+		}
+		closedir(d);
+		if(e == 0)
+		{
+			e = rmdir(name);
+			if(e) marslog(LOG_EROR|LOG_PERR,"Cannot rmdir %s",name);
+		}
+	}
+	else
+	{
+		e = unlink(name);
+		if(e) marslog(LOG_EROR|LOG_PERR,"Cannot unlink %s",name);
+	}
+	return e;
+}
+
+int movefile(const char *from,const char *to)
+{
+	int e = rename(from,to);
+	if(e)
+	{
+		if(errno == EXDEV) /* different file systems */
+		{
+			e = copyfile(from,to);
+			if(e == 0) e = deletefile(from);
+		}
+		else marslog(LOG_EROR|LOG_PERR,"Cannot rename %s to %s",from,to);
+	}
+	return e;
+}
+
+int copylink(const char *from,const char *to)
+{
+	int e = 0;
+	int x;
+	char buf[1024];
+
+	if(access(to,0) == 0)
+	{
+		marslog(LOG_EROR,"copy: %s exists",to);
+		return -1;
+	}
+
+	if((x = readlink(from,buf,sizeof(buf)-1))<0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"readlink(%s)",from);
+		return e;
+	}
+
+	buf[x] = 0;
+
+	if(e = symlink(buf,to))
+	{
+		marslog(LOG_EROR|LOG_PERR,"symlink(%s,%s)",buf,to);
+		return e;
+	}
+	return 0;
+
+}
+
+int copydata(const char *from,const char *to)
+{
+	FILE *f,*g;
+	char buf[10240];
+	int   e = 0;
+	int n;
+
+	if(faccess(to,0) == 0)
+	{
+		marslog(LOG_EROR,"copy: %s exists",to);
+		return -1;
+	}
+
+	f = fopen(from,"r");
+	if(f == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fopen(%s)",from);
+		return -1;
+	}
+
+	g = fopen(to,"w");
+	if(g == NULL)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fopen(%s)",to);
+		return -1;
+	}
+
+	while( (n = fread(buf,1,sizeof(buf),f)) > 0)
+	{
+		if(ferror(f)) {
+			marslog(LOG_EROR|LOG_PERR,"Read error file %s",from);
+			e=1;
+		}
+		fwrite(buf,1,n,g);
+		if(ferror(g)) {
+			marslog(LOG_EROR|LOG_PERR,"Write error file %s",to);
+			e=1;
+		}
+	}
+
+	if(fflush(g))
+	{
+		marslog(LOG_EROR|LOG_PERR,"Write error file %s",to);
+		e=1;
+	}
+
+	fclose(f);
+	fclose(g);
+
+	return e;
+
+}
+
+int copydir(const char *from,const char *to)
+{
+	struct dirent *s;
+	DIR *d;
+	int e = 0;
+
+	if(faccess(to,0) == 0)
+	{
+		marslog(LOG_EROR,"copy: %s exists",to);
+		return -1;
+	}
+	if(e = mkdir(to,0777))
+	{
+		marslog(LOG_EROR|LOG_PERR,"mkdir %s",to);
+		return e;
+	}
+
+	d = opendir(from);
+	if(!d) {
+		marslog(LOG_EROR|LOG_PERR,"opendir %s",from);
+		return -1;
+	}
+
+	while((s = readdir(d)) && (e == 0))
+	{
+		if(strcmp(s->d_name,".") != 0 && strcmp(s->d_name,"..") != 0)
+		{
+			char buf1[1024];
+			char buf2[1024];
+			sprintf(buf1,"%s/%s",from,s->d_name);
+			sprintf(buf2,"%s/%s",to  ,s->d_name);
+			e = copyfile(buf1,buf2);
+		}
+	}
+	closedir(d);
+	return e;
+}
+
+int copyfile(const char *from,const char *to)
+{
+	int e = 0;
+	struct stat stf,stt;
+	boolean newfile = false;
+	boolean dirt = false,dirf = false;
+
+	mode_t mask = umask(0);
+	umask(mask);
+
+	if(e = lstat(from,&stf)) /*  Don't follow link */
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot stat %s",from);
+		return e;
+	}
+	/* from is a directory */
+	dirf = (S_ISDIR(stf.st_mode) && !S_ISLNK(stf.st_mode));
+
+	if(e = lstat(to,&stt)) /*  Don't follow link */
+	{
+		if(errno != ENOENT) /* File not found */
+		{
+			marslog(LOG_EROR|LOG_PERR,"Cannot stat %s",to);
+			return e;
+		}
+		newfile = true;
+		/* to is a directory */
+	} else dirt = (S_ISDIR(stt.st_mode) && !S_ISLNK(stt.st_mode));
+
+	/* There already is a file */
+	if(!newfile)
+	{
+		if(stt.st_dev == stf.st_dev && stt.st_ino == stf.st_ino)
+		{
+			marslog(LOG_INFO,"Cannot copy file %s and %s are identical",
+			    from,to);
+			return -1;
+		}
+		if(dirf && !dirt)
+		{
+			marslog(LOG_INFO,"Cannot copy directory %s onto file %s",from,to);
+			return -1;
+		}
+
+		/* The target is a directory */
+		if(dirt)
+		{
+			char buf[1024];
+			const char *p = mbasename(from);
+			sprintf(buf,"%s/%s",to,p);
+			return copyfile(from,buf);
+		}
+		/* The target is a file */
+		else
+		{
+			if(e = unlink(to))
+			{
+				marslog(LOG_EROR|LOG_PERR,"Cannot unlink %s",to);
+				return e;
+			}
+			if(S_ISLNK(stf.st_mode)) return copylink(from,to);
+			if(S_ISDIR(stf.st_mode)) return copydir(from,to);
+			e = copydata(from,to);
+
+			if(e == 0)
+			{
+				mode_t mode = 0777 & ~mask;
+				if(e = chmod(to,mode))
+					marslog(LOG_EROR|LOG_PERR,"chmod(%s,%o) failed",to,mode);
+			}
+			return e;
+		}
+
+	}
+	else /* There is no target file */
+	{
+		if(S_ISLNK(stf.st_mode)) return copylink(from,to);
+		if(S_ISDIR(stf.st_mode)) return copydir(from,to);
+		e = copydata(from,to);
+		if(e == 0)
+		{
+			mode_t mode = 0777 & ~mask;
+			if(e = chmod(to,stf.st_mode&S_IAMB))
+				marslog(LOG_EROR|LOG_PERR,"chmod(%s,%o) failed",to,mode);
+		}
+		return e;
+	}
+}
+
+/* find a relative path */
+
+const char *relpath(const char *from,const char *to)
+{
+	static char buf[1024];
+	const char *p1,*p2,*p,*q;
+
+	if(*from != '/' && *to != '/') return to;
+
+	p = p1 = from;
+	q = p2 = to;
+
+	/* If exactly same pathname, stop at the end of string */
+	while((*p1 != '\0') && (*p2  != '\0') && (*p1 == *p2)) {
+		if (*p1 == '/') {
+			p = p1+1;
+			q = p2+1;
+		}
+		p1++;
+		p2++;
+	}
+
+	buf[0] = 0;
+	while(*p)
+	{
+		if(*p == '/') strcat(buf,"../");
+		p++;
+	}
+
+	strcat(buf,q);
+	return buf;
+
+
+}
+
+void dumpenv(void)
+{
+	/*
+	extern char **environ;
+	int n = 0;
+
+	while(environ[n])
+		marslog(LOG_INFO,"Env : '%s'",environ[n++]);
+		*/
+
+}
+
+static int saccess(struct stat *s,int flags)
+{
+	static gid_t groups[NGROUPS];
+	static int first = 1;
+	static uid_t user;
+	static int ngrp;
+	int u,g,o;
+	int i;
+
+	if(first)
+	{
+		first = 0;
+		user  = getuid();
+		ngrp  = getgroups(NGROUPS,groups);
+	}
+
+
+	if(flags & R_OK) 
+	{
+		flags &= ~R_OK;
+		u = s->st_mode & S_IRUSR;
+		g = s->st_mode & S_IRGRP;
+		o = s->st_mode & S_IROTH;
+
+		if(user  == s->st_uid) return u?0:-1;
+		for(i=0;i<ngrp;i++)
+			if(groups[i] == s->st_gid) return g?0:-1;
+		return o?0:-1;
+	}
+
+	if(flags & W_OK) 
+	{
+		flags &= ~W_OK;
+		u = s->st_mode & S_IWUSR;
+		g = s->st_mode & S_IWGRP;
+		o = s->st_mode & S_IWOTH;
+
+		if(user  == s->st_uid) return u?0:-1;
+		for(i=0;i<ngrp;i++)
+			if(groups[i] == s->st_gid) return g?0:-1;
+		return o?0:-1;
+	}
+
+	if(flags & X_OK) 
+	{
+		flags &= ~X_OK;
+		u = s->st_mode & S_IXUSR;
+		g = s->st_mode & S_IXGRP;
+		o = s->st_mode & S_IXOTH;
+
+		if(user  == s->st_uid) return u?0:-1;
+		for(i=0;i<ngrp;i++)
+			if(groups[i] == s->st_gid) return g?0:-1;
+		return o?0:-1;
+	}
+
+	if(flags != 0) 
+		marslog(LOG_WARN,"saccess: bad flags");
+	return 0;
+}
+
+int faccess(const char *fname,int flags)
+{
+	struct stat s;
+	if(stat(fname,&s)) return -1;
+	return saccess(&s,flags);
+}
+
+const char *lowcase(const char *p)
+{
+	static char buf[10240];
+	int i = 0;
+	while(*p)
+	{
+		if(isupper(*p)) 
+			buf[i] = tolower(*p);
+		else 
+			buf[i] = *p;
+		i++;
+		p++;
+	}
+	buf[i] = 0;
+	return buf;
+}
+
+const char *upcase(const char *p)
+{
+	static char buf[1024];
+	int i = 0;
+	while(*p)
+	{
+		if(islower(*p)) 
+			buf[i] = toupper(*p);
+		else 
+			buf[i] = *p;
+		i++;
+		p++;
+	}
+	buf[i] = 0;
+	return buf;
+}
+
+static int cmpstringp(const void *p1, const void *p2)
+{
+	return strcmp(* (char * const *) p1, * (char * const *) p2);
+}
+
+void print_environment(FILE *f)
+{
+#if defined(__STDC__)
+#ifndef __alpha
+#  define environ _environ
+#endif
+#endif
+
+	extern char **environ;
+	int n = 0;
+	int s = 0;
+	while(environ[s]) s++;
+
+	qsort(environ, s, sizeof(char *), cmpstringp);
+
+	while(environ[n])
+		fprintf(f,"%s\n",environ[n++]);
+}
+
+/* Creates an e-mail to 'to' with 'subject' and a timestamp */
+FILE* mail_open(const char* to, char *fmt,...)
+{
+	FILE  *f = 0;
+	char  buf[1024];
+	char subject[512];
+	va_list list;
+
+	va_start(list,fmt);
+	vsprintf(subject, fmt, list);
+	va_end(list);
+
+	if(to)
+		sprintf(buf,"%s -s '%s' %s",mars.mailer,subject,to);
+	else
+		marslog(LOG_EROR|LOG_EXIT,"MARS internal error. Mail recipient not specified");
+
+	marslog(LOG_DBUG,"Seding email with command '%s'",buf);
+	if(f = popen(buf,"w")) {
+		char timestamp[80];
+		time_t now;
+		char host[1024];
+
+		if(gethostname(host,sizeof(host)) != 0)
+			strcpy(host,"unknown");
+
+		/* Timestamp */
+		time(&now);
+		strftime(timestamp,sizeof(timestamp),"%Y-%m-%d %H:%M:%S",gmtime(&now));
+		fprintf(f,"Mail sent on %s from %s\n\n",timestamp,host);
+
+	} else {
+		marslog(LOG_EROR|LOG_PERR,"popen: '%s'",buf);
+		f = stdout;
+	}
+
+	return f;		
+}
+
+void notify_user(const char *what, const request *r)
+{
+#if 0
+	char message[256];
+	FILE* f;
+	char *subject;
+
+	sprintf(message,"%s/chk/%s.mail",mars.mars_home,what);
+
+	f = mail_once(what, user,"%s",subject);
+#endif
+}
+
+FILE* mail_once(const char *mark, const char* to, char *fmt,...)
+{
+	FILE *f = 0;
+	char markfile[256];
+	time_t last = 0;
+	boolean send = true;
+			
+
+	if(!mars.home)
+		return 0;
+
+	sprintf(markfile,"%s/%s",mars.home,mark);
+
+	last = age(markfile);	
+
+	/* Send if mark does not exist or 
+	   the user wants always an e-mail or
+	   is old enough */
+	send = (faccess(markfile,0) != 0) || 
+		   (!mars.mail_frequency) || 
+		   (last > mars.mail_frequency);
+	if(send)
+	{
+		char subject[512];
+		va_list list;
+		
+
+		va_start(list,fmt);
+		vsprintf(subject, fmt, list);
+		va_end(list);
+
+		f = mail_open(to,subject);
+		fprintf(f,"The frequency of this automatic message is controlled\n");
+		fprintf(f,"with the environment variable MARS_MAIL_FREQUENCY.\n");
+		fprintf(f,"Set it to 0 before calling MARS if you want to receive an\n"); 
+		fprintf(f,"e-mail for each occurrence of such situation.\n");
+		fprintf(f,"Otherwise, it is expressed in seconds\n");
+		if(mars.mail_frequency > 0)
+			fprintf(f,"Its current value is: %s \n\n",timename(mars.mail_frequency));
+		else
+			fprintf(f,"Its current value is: %d\n\n",mars.mail_frequency);
+
+		touch(markfile);
+	}
+
+	return f;
+}
+
+void mail_msg(FILE *f, char *fmt,...)
+{
+	if(f) {
+		char buf[1024];
+		va_list list;
+
+		va_start(list,fmt);
+		vsprintf(buf, fmt, list);
+		va_end(list);
+
+		fprintf(f,"%s\n",buf);
+	}
+}
+
+void mail_request(FILE *f, const char *msg, const request *r)
+{
+	if(f) {	
+		if(msg)
+			fprintf(f,"\n%s\n",msg);
+		save_all_requests(f,r);
+	}
+}
+
+void mail_close(FILE *f)
+{
+	if(f) {
+		fprintf(f,"\nUnix Environment:\n");
+		print_environment(f);
+		pclose(f);
+	}
+}
+
+const char *real_name(const char* fname)
+{
+	char buf[1014];
+	static char tmp[1024];
+	char *c = buf;
+	char *p;
+	int last = 0,n;
+	char dir[1024];
+	char lasttmp[1024];
+
+	if(*fname != '/')
+	{
+		getcwd(dir,1024);
+		sprintf(tmp,"%s/%s",dir,fname);
+	}
+	else strcpy(tmp,fname);
+
+	*lasttmp = 0;
+
+	for(;;)
+	{
+		strcpy(buf,tmp);
+
+		*tmp = 0;
+		c = buf;
+		last = 0;
+
+
+		while(p=strtok(c,"/"))
+		{
+
+			c = NULL;
+			if(strcmp(p,".") == 0) continue;
+
+			if(strcmp(p,"..") == 0)
+			{
+				tmp[last] = 0;
+				while(tmp[last] != '/') last--;
+			}
+			else
+			{
+				last = strlen(tmp);
+				strcat(tmp,"/");
+				strcat(tmp,p);
+			}
+
+			/* sun specific */
+
+			while((n=readlink(tmp,dir,1024))>0)
+			{
+				dir[n] = 0;
+
+
+				if(*dir != '/')
+				{
+					tmp[last] = 0;
+					strcat(tmp,"/");
+					strcat(tmp,dir);
+				}
+				else strcpy(tmp,dir);
+
+				last = strlen(tmp);
+
+				while(tmp[last] != '/') last--;
+			}
+			/* end sun specific */
+
+
+		}
+
+		if(strcmp(lasttmp,tmp)==0) break;
+		strcpy(lasttmp,tmp);
+	}
+
+	return tmp;
+
+}
+
+
+void nfs_lookup(const char* fname, char *host, char *path)
+{
+	
+#ifdef _MNT_ENT_
+	FILE *f;
+	char dir[1024];
+	struct mntent *ent;
+#endif
+	char buf[1024];
+	const char *rname;
+	int max = 0;
+	char *q;
+
+	rname = real_name(fname);
+
+#ifndef _MNT_ENT_
+
+	strcpy(host,"");
+
+#else
+	f = setmntent("/etc/mtab","r");
+	while(ent = getmntent(f))
+	{
+
+		int len = strlen(ent->mnt_dir);
+
+		if(strcmp(ent->mnt_type,"ignore") != 0 &&
+		    strncmp(ent->mnt_dir,rname,len)==0)
+		{
+			if(len>=max)
+			{
+				max = len;
+				strcpy(host,ent->mnt_fsname);
+				strcpy(dir,ent->mnt_dir);
+			}
+		}
+	}
+	endmntent(f);
+#endif
+
+	if((strtok(host,":")) && (q = strtok(NULL,":")))
+	{
+		if(*q == '/')
+		{
+			sprintf(buf,"%s%s",q,rname+max);
+			rname = buf;
+		}
+	}
+	else gethostname(host,80);
+
+	strcpy(path,rname);
+}
+
+#ifdef sgi 
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+
+
+boolean if_check(const char* host)
+{
+	struct hostent *h = gethostbyname(host);  /* Incoming host */
+	struct ifconf i;                          /* Interfaces configuration */
+	int s = socket(AF_INET, SOCK_STREAM, 0);  /* Socket to get interfaces */
+
+	int  buflen     = (sizeof(struct ifreq)*32); /* Maximum of 32 interfaces */
+	char *ptr, *buf = reserve_mem(buflen);       /* Buffer to hold interfaces */
+	boolean found   = false;
+	err     ioctlerr = false;
+
+	/* Initialize buf to avoid 'UMR: Uninitialized memory read'*/
+	bzero(buf,buflen);
+
+	/* Get list of all interfaces */
+	i.ifc_len = buflen;
+	i.ifc_req = (struct ifreq*)buf;
+	if(ioctl(s,SIOCGIFCONF,&i) < 0)
+	{
+		marslog(LOG_WARN|LOG_PERR,"ioctl on ifconf request: ");
+		return found;
+	}
+
+	/* Process inet address of all interfaces */
+	for(ptr = buf; ptr < (buf + i.ifc_len); ptr += sizeof(struct ifreq))
+	{
+		struct ifreq flags;
+		struct ifreq *ireq = (struct ifreq *)ptr;
+		int len = 0;
+
+		/* Check if interface is UP or DOWN */
+		memcpy(flags.ifr_name,ireq->ifr_name,IFNAMSIZ);
+		if(ioctl(s,SIOCGIFFLAGS,&flags) <0)
+		{
+			marslog(LOG_WARN|LOG_PERR,"ioctl on interface flags request: ");
+			continue;
+		}
+
+		if( (flags.ifr_flags & IFF_UP) == 0)
+		{
+			marslog(LOG_DBUG,"Interface '%s' is down",flags.ifr_name);
+			continue;
+		}
+
+
+#ifdef _HAVE_SA_LEN
+		len = max(sizeof(struct sockaddr),ireq->ifr_addr.sa_len);
+#else
+		marslog(LOG_DBUG,"Cheking interface family %d for '%s'", ireq->ifr_addr.sa_family, ireq->ifr_name);
+		switch(ireq->ifr_addr.sa_family)
+		{
+#ifdef IPV6
+			case AF_INET6:
+				len = sizeof(struct sockaddr_in6);
+				break;
+#endif
+			case AF_INET:
+				len = sizeof(struct sockaddr);
+				break;
+
+			default:
+				marslog(LOG_DBUG,"Unknown interface family %d for '%s'", ireq->ifr_addr.sa_family, ireq->ifr_name);
+				len = sizeof(struct sockaddr);
+				break;
+		}
+#endif
+
+		/* Get the flags for the interface to check if it is UP */
+		memcpy(flags.ifr_name,ireq->ifr_name,IFNAMSIZ);
+		memcpy(&flags.ifr_addr,&ireq->ifr_addr,len);
+		if(ioctl(s,SIOCGIFFLAGS,&flags) <0)
+		{
+			marslog(LOG_WARN|LOG_PERR,"ioctl on interface flags request: ");
+			ioctlerr = true;
+		}
+
+		if(!ioctlerr && (flags.ifr_flags & IFF_UP))
+		{
+			struct ifaliasreq alias;
+			alias.cookie = 1;
+
+			/* Process all aliases for this interface */
+			while(alias.cookie != -1 && !found && !ioctlerr)
+			{
+				char **addr;
+				struct in_addr *ain_addr = 0;
+
+				/* Get inet address of alias for this interface */
+				memcpy(alias.ifra_name,ireq->ifr_name,IFNAMSIZ);
+				memcpy(&alias.ifra_addr,&ireq->ifr_addr,len);
+				if(ioctl(s,SIOCLIFADDR,&alias) <0)
+				{
+					marslog(LOG_WARN|LOG_PERR,"ioctl on iterface alias request: ");
+					ioctlerr = true;
+				}
+				else
+				{
+					/* Compare alias inet address with host's address list */
+					ain_addr = &((struct sockaddr_in *)&alias.ifra_addr)->sin_addr;
+					for(addr = h->h_addr_list; *addr; addr++)
+					{
+						if(memcmp(*addr,ain_addr,h->h_length) == 0) 
+							found = true;
+					}
+				}
+			}
+		}
+	}
+
+	release_mem(buf);
+	close(s);
+	return found;
+}
+
+#else
+boolean if_check(const char *p)
+{
+	return false;
+}
+#endif
+
+void check_nfs_target(const char* path)
+{
+	static int done = 0;
+	char remote[80]	;
+	char me[80]	;
+	char file[1024];
+
+	gethostname(me,80);
+
+	nfs_lookup(path,remote,file);
+
+	if(!(EQ(me,remote) || if_check(remote))) 
+	{
+		log_statistics("target","nfs:%s",remote);
+		if(!done && !getenv("MARS_DONT_DISPLAY_NFS"))
+		{
+			marslog(LOG_WARN,"");
+			marslog(LOG_WARN,"The file '%s' is on the NFS server %s and",path,remote);
+			marslog(LOG_WARN,"the data will be transfered twice over the network.");
+			marslog(LOG_WARN,"First from the MARS server to %s, then from %s to %s.",me,me,remote);
+			marslog(LOG_WARN,"NFS trafic is very, very slow, so if you retrieve a lot of data,");
+			marslog(LOG_WARN,"you can either run your request on %s, or have a local target.",remote);
+			marslog(LOG_WARN,"");
+			done = 1;
+		}
+	}
+
+}
+
+/* This should be in the GribAPI. COME BACK HERE! */
+long grib_length(const char *buffer, long length)
+{
+
+	long len;
+	err e = NOERR;
+	grib_handle *h = grib_handle_new_from_message_copy(0,buffer,length);
+	if( e = grib_get_long(h,"totalLength",&len))
+	{
+		marslog(LOG_WARN,"Cannot get totalLength for message");
+	}
+	grib_handle_delete(h);
+	return len;
+
+}
+
+/*
+Trick to avoid re-declaring all long length to fortint in mars source code
+*/
+
+
+#if 0
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+extern fortint readgrib(FILE *,char*,fortint*);
+extern fortint readbufr(FILE *,char*,fortint*);
+extern fortint readany(FILE *,char*,fortint*);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+#endif
+
+void mars_grib_api_init()
+{
+	/* Set grib_api debug logging with marslog */
+	grib_context_set_logging_proc(NULL, mars_grib_api_log);
+
+	/* grib_api compatibility mode with GRIBEX on */
+	grib_gribex_mode_on(NULL);
+}
+
+
+long _readany(FILE *f, char *b, long *l)
+{
+	size_t len = *l;
+	long e =  wmo_read_any_from_file(f,(unsigned char*)b,&len);
+	*l = len;
+
+	if(e && e != GRIB_END_OF_FILE) 
+		marslog(LOG_EROR|LOG_PERR,"wmo_read_any_from_file: error %d (%s) l=%ld, len=%ld",e,
+			grib_get_error_message(e),len);
+
+	return e;
+}
+
+long _readgrib(FILE *f, char *b, long *l)
+{
+	size_t len = *l;
+	long e =  wmo_read_grib_from_file(f,(unsigned char*)b,&len);
+	*l = len;
+	return e;
+}
+
+long _readbufr(FILE *f, char *b, long *l)
+{
+	size_t len = *l;
+	long e =  wmo_read_bufr_from_file(f,(unsigned char*)b,&len);
+	*l = len;
+	return e;
+}
+
+void touch(const char* path)
+{
+	FILE *f = fopen(path,"a");
+	if(!f)
+	{
+		marslog(LOG_WARN|LOG_PERR,"Cannot open '%s'",path);
+		return;
+	}
+	if(fclose(f) == -1)
+	{
+		marslog(LOG_WARN|LOG_PERR,"Cannot close '%s'",path);
+		return;
+	}
+}
+
+
+time_t age(const char* path)
+{
+	time_t now;
+	struct stat st;
+	err    e = NOERR;
+
+	if(e = stat(path,&st))
+	{
+		return e;
+	}
+	time(&now);
+
+	return now-st.st_mtime;
+}
+
+/* base: depending on what the buffer is used for, base could
+		 be different: 
+         - For GRIB headers, good size could be 32 Kb. 
+         - For data transfers, good size could be 1 Mb
+		 - Set base=0 in order to accept whatever the filesystem prefers
+*/
+
+
+long preferred_IO_blocksize(const char *path, long base)
+{
+	struct stat buf;
+
+	if(stat(path,&buf))
+	{
+		marslog(LOG_WARN|LOG_PERR,"Cannot stat '%s'",path);
+		return 1024*1024;    /* 1Mb by default */
+	}
+
+	if(buf.st_blksize == 0)
+	{
+		marslog(LOG_WARN,"stat(%s) does not return a block size",path);
+		return 1024*1024;    /* 1Mb by default */
+	}
+
+	/* Take rounding max of preferred filesystem size and base */
+	return ((base + (buf.st_blksize - 1))/buf.st_blksize)*buf.st_blksize;
+}
+
+double round_decimal(double f)
+{
+	double precision;
+	/* Warning, gcc wants two lines here */
+	double x ;
+	precision = 1000.0;
+	x = floor(precision * f + 0.5) / precision; 
+	return x;
+}
+
+#ifdef NO_ATOLL_SUPPORT
+long64 atoll(const char *str)
+{
+	long64 ll = 0;
+	sscanf(str,"%lld",&ll);
+	return ll;
+}
+#endif
+
+
+void print_memory_usage(char *s)
+{
+	long long bytes = proc_mem();
+	if(bytes)
+	{
+		if(s)
+			marslog(LOG_INFO,"(%s) Memory used: %sbyte(s)",s,bytename((double)bytes));
+		else
+			marslog(LOG_INFO,"Memory used: %sbyte(s)",bytename((double)bytes));
+	}
+}
+
+
+#ifndef ECMWF
+void check_emoscycle()
+{
+	fortint off    = 1;
+	long    ecycle = (long)emosnum_(&off);
+	long    mcycle = marsemoscycle();
+
+	if(ecycle < mcycle)
+	{
+		marslog(LOG_WARN,"LIBEMOS linked with this MARS client is cycle '%ld'",ecycle);
+		marslog(LOG_WARN,"Ideal LIBEMOS for this version is cycle '%ld'",mcycle);
+	}
+}
+
+void check_precision()
+{
+	long mprecision  = sizeof(fortfloat) * 8;
+	long eprecision = emosPrecision();
+
+	if(eprecision != mprecision)
+	{
+		marslog(LOG_WARN,"MARS and LIBEMOS have different precisions for reals");
+		marslog(LOG_WARN,"MARS precision    : %ld",mprecision);
+		marslog(LOG_WARN,"LIBEMOS precision : %ld",eprecision);
+		marslog(LOG_WARN,"Note both packages need the same precision.");
+	}
+}
+
+#endif
diff --git a/src/libMars/tools.h b/src/libMars/tools.h
new file mode 100755
index 0000000..8de8e86
--- /dev/null
+++ b/src/libMars/tools.h
@@ -0,0 +1,20 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+err mars_compress(void *in,void *out,long inlen,long *outlen);
+err mars_uncompress(void *in,void *out,long inlen,long *outlen);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
diff --git a/src/libMars/udp.c b/src/libMars/udp.c
new file mode 100644
index 0000000..8b33e7e
--- /dev/null
+++ b/src/libMars/udp.c
@@ -0,0 +1,211 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <fcntl.h>
+#include <errno.h>
+
+int readudp(void *p,void *buf,u_int len)
+{
+	udpinfo *info = (udpinfo*)p;
+	marssocklen_t sinlen = sizeof(struct sockaddr_in);
+	int done = 0;
+
+	while(!done)
+	{
+		fd_set fds;
+		struct timeval *t = &info->timeout;
+
+		if(t->tv_sec == 0 && t->tv_usec == 0)
+			t = NULL;
+
+		FD_ZERO(&fds); 
+		FD_SET(info->soc,&fds);
+
+		switch(select(FD_SETSIZE,&fds,NULL,NULL,t))
+		{
+			case 0:
+				/* marslog(LOG_EROR,"readudp timeout"); */
+				/* time out */
+				return -1;
+				/* break; */
+
+			case -1:
+				if(errno != EINTR)
+				{
+					marslog(LOG_EROR|LOG_PERR,"select");
+					return -1;
+				}
+				break;
+
+			default:
+				done = 1;
+				break;
+		}
+	}
+
+	len = recvfrom(info->soc,buf,len,0,(struct sockaddr*)&info->sin,&sinlen);
+	/* print_address("recvfrom",&info->sin); */
+	return len;
+}
+
+int writeudp(void *p,void *buf,u_int len)
+{
+	udpinfo *info = (udpinfo*)p;
+	int n = sendto(info->soc,buf,len,0,(struct sockaddr*)&info->sin,
+		sizeof(struct sockaddr_in));
+	/* print_address("sendto",&info->sin); */
+	if(n != len)
+		marslog(LOG_EROR|LOG_PERR,"sendto failed");
+	return n;
+}
+
+int udp_socket(int port)
+{
+
+	int flg;
+	int s;
+
+#ifdef SO_LINGER
+	struct  linger ling;
+#endif
+	struct sockaddr_in sin;
+
+	s = socket(AF_INET, SOCK_DGRAM, 0);
+
+	if (s < 0)
+	{
+		marslog(LOG_EROR|LOG_PERR,"socket");
+		return -1;
+	}
+
+	flg = 1 ;
+	if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (msockopt)&flg, sizeof(flg))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_REUSEADDR");
+
+/*
+	flg = 1 ;
+	if(setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (msockopt)&flg, sizeof(flg))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_KEEPALIVE");
+*/
+
+#ifdef SO_REUSEPORT
+	flg = 1 ;
+	if(setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (msockopt)&flg, sizeof(flg))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_REUSEPORT");
+#endif
+
+#ifdef SO_LINGER
+	ling.l_onoff = 0;
+	ling.l_linger = 0;
+	if(setsockopt(s, SOL_SOCKET, SO_LINGER, (msockopt)&ling, sizeof(ling))<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_LINGER");
+#else
+#ifdef SO_DONTLINGER
+	if(setsockopt(s, SOL_SOCKET, SO_DONTLINGER, NULL, 0)<0)
+		marslog(LOG_WARN|LOG_PERR,"setsockopt SO_DONTLINGER");
+#endif
+#endif
+
+
+	bzero(&sin, sizeof(struct sockaddr_in));
+	sin.sin_port        = htons(port);
+	sin.sin_family      = AF_INET;
+	sin.sin_addr.s_addr = INADDR_ANY;
+
+	while (bind(s, (struct sockaddr*)&sin, sizeof(struct sockaddr_in)) == -1)
+	{
+		marslog(LOG_WARN|LOG_PERR,"bind port = %d",port);
+		sleep(5);
+	}
+
+	return s ;
+}
+
+udpinfo *udp_server(int port)
+{
+	udpinfo *info = NEW(udpinfo);
+	info->soc = udp_socket(port);
+	if(info->soc < 0) {
+		FREE(info);
+		return NULL;
+	}
+	bzero(&info->sin,sizeof(struct sockaddr_in ));
+	info->timeout.tv_sec  = 0;
+	info->timeout.tv_usec = 0;
+	return info;
+}
+
+udpinfo *udp_call(const char *host, int port)
+{
+#ifdef INADDR_NONE
+
+	in_addr_t addr;
+	in_addr_t none = INADDR_NONE;
+
+#else
+
+#ifdef __alpha
+	unsigned int  addr;
+    unsigned int  none = (unsigned int)~0;
+#elif defined(fujitsu)
+	u_int addr;
+    u_int none = (u_int)~0;
+#else
+	unsigned long addr;
+    unsigned long none = (unsigned long)-1;
+#endif
+#endif
+	struct hostent *him;
+	udpinfo *info = NEW(udpinfo);
+
+	/* create a socket first */	
+
+	info->soc = udp_socket(0);
+	if(info->soc < 0) {
+		FREE(info);
+		return NULL;
+	}
+
+	bzero(&info->sin,sizeof(struct sockaddr_in ));
+
+	info->sin.sin_port = htons(port);
+	info->sin.sin_family = AF_INET;
+
+	marslog(LOG_DBUG,"Calling \"%s\" port %d",host,port);
+
+	addr = inet_addr(host);
+	info->sin.sin_addr.s_addr = addr;
+
+	if(addr == none) {
+		if ((him=gethostbyname(host))==NULL)
+		{
+			marslog(LOG_EROR,"unknown host : %s",host);
+			close(info->soc);
+			FREE(info);
+			return NULL;
+		}
+		info->sin.sin_family = him->h_addrtype;
+		bcopy(him->h_addr_list[0],&info->sin.sin_addr,him->h_length);
+	}
+
+	info->timeout.tv_sec  = 2;
+	info->timeout.tv_usec = 0; /* 1/2 sec */
+
+	return info;
+}
+
+void udp_free(udpinfo *info)
+{
+	close(info->soc);
+	FREE(info);
+}
diff --git a/src/libMars/variable.c b/src/libMars/variable.c
new file mode 100644
index 0000000..a399ab6
--- /dev/null
+++ b/src/libMars/variable.c
@@ -0,0 +1,185 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+static mempool varmem = {
+	1, /* 1 page */
+	1, /* clear */
+};
+
+#define STACK_SIZE 10
+#define FASTNEW(type)        (type*)fast_new(sizeof(type),&varmem)
+#define FASTDEL(x)           fast_delete(x,&varmem)
+
+static variable *vars = NULL;
+
+static int top = 0;
+static variable stack[STACK_SIZE+1];
+
+err push_scalar(double d)
+{
+	if(top == STACK_SIZE)
+	{
+		marslog(LOG_EROR,"Stack is full");
+		return -2;
+	}
+	stack[top].scalar = true;
+	stack[top].val    = d;
+	stack[top].name   = NULL;
+	top++;
+	return NOERR;
+}
+
+err push_named_scalar(char *name, double d)
+{
+	if(top == STACK_SIZE)
+	{
+		marslog(LOG_EROR,"Stack is full");
+		return -2;
+	}
+	stack[top].scalar = true;
+	stack[top].val    = d;
+	stack[top].name   = name;
+	top++;
+	return NOERR;
+}
+
+err push_fieldset(fieldset *f)
+{
+	if(top == STACK_SIZE)
+	{
+		marslog(LOG_EROR,"Stack is full");
+		return -2;
+	}
+	stack[top].scalar = false;
+	stack[top].fs     = f;
+	stack[top].name   = NULL;
+	top++;
+	return NOERR;
+}
+
+err push_named_fieldset(char *name, fieldset *f)
+{
+	if(top == STACK_SIZE)
+	{
+		marslog(LOG_EROR,"Stack is full");
+		return -2;
+	}
+	stack[top].scalar = false;
+	stack[top].fs     = f;
+	stack[top].name   = name;
+	top++;
+	return NOERR;
+}
+
+err push(variable *v)
+{
+	abort();
+	return 0;
+}
+
+variable *pop()
+{
+	if(top == 0)
+	{
+		marslog(LOG_EROR,"Stack is empty");
+		return NULL;
+	}
+	return &stack[--top];
+}
+
+variable *stack_top()
+{
+	return &stack[top-1];
+}
+
+variable *find_variable(const char *name)
+{
+	variable *w = vars;
+	while(w)
+	{
+		if(w->name == name) return w;
+		w = w->next;
+	}
+	return NULL;
+}
+
+err name_variable(variable *v,char *name)
+{
+	abort();
+	return 0;
+}
+
+static void free_variables(int code,void *data)
+{
+	while(vars)
+		free_variable(vars);
+}
+
+variable *new_variable(const char *name,fieldset *f,double d)
+{
+	variable *w = find_variable(name);
+	variable *v  = FASTNEW(variable);
+
+	if(vars == 0)
+		install_exit_proc(free_variables,0);
+
+	v->name = name?strcache(name):NULL;
+
+	if(f)
+	{
+		v->fs   = f;
+		v->scalar = false;
+		f->refcnt++;
+		if(save_fieldset(f))
+		{
+			FASTDEL(v);
+			return NULL;
+		}
+	}
+	else
+	{
+		v->scalar = true;
+		v->fs  = NULL;
+		v->val = d;
+	}
+
+	if(w) free_variable(w);
+
+	v->next = vars;
+	vars = v;
+	return v;
+}
+
+void free_variable(variable *v)
+{
+	variable *w = vars;
+	variable *z = NULL;
+	while(w)
+	{
+		variable* n = w->next;
+
+		if(w == v)
+		{
+			if(z)
+				z->next = v->next;
+			else 
+				vars = v->next;
+			if(v->name)
+				strfree(v->name);
+			if(v->fs) free_fieldset(v->fs);
+			FASTDEL(v);
+		}
+		z = w;
+		w = n;
+	}
+}
+
diff --git a/src/libMars/variable.h b/src/libMars/variable.h
new file mode 100644
index 0000000..b5839ad
--- /dev/null
+++ b/src/libMars/variable.h
@@ -0,0 +1,17 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+typedef struct variable {
+	struct variable *next;
+	char    *name;
+	boolean  scalar;
+	double	 val;
+	fieldset *fs;
+} variable;
diff --git a/src/libMars/version.c b/src/libMars/version.c
new file mode 100644
index 0000000..e88f301
--- /dev/null
+++ b/src/libMars/version.c
@@ -0,0 +1,39 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+
+long marsversion() { 
+	static long version = 20130702; 
+	return version; 
+}
+
+long marsemoscycle() { 
+	static long emoscycle = 392; 
+	return emoscycle; 
+}
+
+const char *marssourcebranch() {
+#ifdef ODB_SUPPORT
+	static const char *branch = "grib_odb_api";
+#else
+	static const char *branch = "perforce_grib_api";
+#endif
+	return branch;
+}
+
+long marsgribapi() {
+	static long version = 20130625;
+	return version;
+}
+
+long marsodbapi() {
+	static long version = 20130628;
+	return version;
+}
diff --git a/src/libMars/webbase.c b/src/libMars/webbase.c
new file mode 100644
index 0000000..dcdba5f
--- /dev/null
+++ b/src/libMars/webbase.c
@@ -0,0 +1,613 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+#include <sys/ioctl.h>      
+#include <signal.h>                   
+#include <ctype.h>
+#if defined(sgi) || defined(fujitsu) || defined(sun)
+#include <sys/filio.h>  /* For FIONREAD */
+#endif
+/*
+
+TODO: 
+
+- Work on error messages
+- Check data size againts Content-Length
+- Implement list
+- check if certificate are 0500 as well as parent dir.
+- check fixed size buffers
+
+*/
+
+typedef struct webdata {
+	char *host;
+	char *url;
+	char *openssl;
+	char *object;
+	char *proxy;
+	request *header;
+	FILE  *f;
+	int   cleanup;
+	int   port;
+} webdata;
+
+static void webbase_init(void);
+
+static err     webbase_open(void *data,request*,request*,int);
+static err     webbase_close(void *data);
+static err     webbase_read(void *data,request *r,void *buffer,long *length);
+static err     webbase_write(void *data,request *r,void *buffer,long *length);
+static err     webbase_cntl(void *data,int code,void *param,int size);
+static boolean webbase_check(void *data,request *r);
+static err     webbase_validate(void *data,request*,request*,int);
+
+static option opts[] = {
+
+	{"host","MARS_WEB_HOST",NULL,"wms.ecmwf.int:443",t_str,
+	sizeof(char*),OFFSET(webdata,host)},
+
+	{"url","MARS_WEB_URL",NULL,"/services/mars/d/webbase",t_str,
+	sizeof(char*),OFFSET(webdata,url)},
+
+	{"openssl","MARS_WEB_OPENSSL",NULL,"/usr/local/openssl/bin/openssl",t_str,
+	sizeof(char*),OFFSET(webdata,openssl)},
+
+	{"proxy","MARS_WEB_PROXY",NULL,NULL/*"carbad:3333"*/,t_str,
+	sizeof(char*),OFFSET(webdata,proxy)},
+
+
+};
+
+static base_class _webbase_base = {
+
+	NULL,                          /* parent class */
+	"webbase",                     /* name         */
+
+	false,                         /* inited       */
+
+	sizeof(webdata),               /* private_size  */
+	NUMBER(opts),                  /* options_count */
+	opts,                          /* options       */
+
+	webbase_init,                  /* init          */
+
+	webbase_open,                  /* open          */
+	webbase_close,                 /* close         */
+
+	webbase_read,                  /* read          */
+	webbase_write,                 /* write         */
+
+	webbase_cntl,                  /* control       */
+
+	webbase_check,                 /* check         */
+
+	NULL,                      	   /* query        */
+
+	NULL,                          /* archive      */
+	NULL,                          /* admin        */
+
+	webbase_validate,              /* validate */
+
+};
+
+/* the only 'public' variable ... */
+
+base_class *webbase = &_webbase_base;
+
+static FILE* post_open(webdata*,const char*,const char*,const char*);
+
+static void webbase_init(void)
+{
+}
+
+static const char *escape(const char* p)
+{
+	static char buf[10240];
+	int i = 0;
+	while(*p)
+	{
+		char c = *p;
+		unsigned int h,l;
+
+		if(isalnum(c))
+			buf[i++] = c;
+		else {
+			buf[i++] = '%';
+
+			h = ((unsigned char)c) / 16;
+			l = ((unsigned char)c) % 16;
+
+			if(h>=10) c = h - 10 + 'A'; else c = h + '0';
+			buf[i++] = c;
+
+			if(l>=10) c = l - 10 + 'A'; else c = l + '0';
+			buf[i++] = c;
+		}
+			
+		p++;
+	}
+	buf[i] = 0;
+	return buf;
+}
+
+static int ok(const char *p)
+{
+	if(*p == '_')        return 0;
+	if(EQ(p,"TARGET"))   return 0;
+	if(EQ(p,"FIELDSET")) return 0;
+	if(EQ(p,"DATABASE")) return 0;
+	return 1;
+}
+
+static char *encode(request *r)
+{
+	parameter* p = r->params;
+	static char buf[10240];
+	buf[0] = 0;
+	while(p)
+	{
+		if(ok(p->name))
+		{
+			value *v = p->values;
+			while(v)
+			{
+				if(buf[0]) strcat(buf,"&");
+				strcat(buf,lowcase(p->name));
+				strcat(buf,"=");
+				strcat(buf,escape(lowcase(v->name)));
+				v = v->next;
+			}
+		}
+		p = p->next;
+	}
+	/*strcat(buf,"\n");*/
+	return buf;
+}
+
+static err parse_header(webdata* web,FILE* f)
+{
+	char buf[1024];
+	char param[1024];
+	char value[1024];
+
+	free_all_requests(web->header);
+	web->header = empty_request("header");
+
+	if(!fgets(buf,sizeof(buf),f))
+	{
+		marslog(LOG_EROR,"Cannot read result code");
+		return -2;
+	}
+
+	while(strlen(buf)>0 && isspace(buf[strlen(buf)-1])) 
+		buf[strlen(buf)-1] = 0;
+	set_value(web->header,"heading","%s",buf);
+
+	while(fgets(buf,sizeof(buf),f))
+	{
+		char *p = buf;
+		while(strlen(buf)>0 && isspace(buf[strlen(buf)-1])) 
+			buf[strlen(buf)-1] = 0;
+
+		if(*p == 0) 
+		{
+			const char *e = get_value(web->header,"Webmars-error",0);
+			const char *m = get_value(web->header,"Webmars-message",0);
+			if(mars.debug) 
+				print_all_requests(web->header);
+
+			if(e && atol(e) && m) marslog(LOG_EROR,"%s",m);
+
+			return e ? atol(e) : 0;
+		}
+
+		while(*p != 0 && *p != ':') p++;
+		if(*p == ':')
+		{
+			*p = 0;
+			strcpy(param,buf);
+			p++;
+			while(*p && isspace(*p)) p++;
+			strcpy(value,p);
+
+			add_value(web->header,param,"%s",value);
+		}
+		else {
+			marslog(LOG_EROR,"webbase: could not find : in <%s>",buf);
+		}
+
+		/*if(buf[0] == 0) return r;*/
+	}
+	marslog(LOG_EROR,"webbase: could not find empty line");
+	return -2;
+}
+
+static void split(const char* p,char *host,int *port)
+{
+	int i = 0;
+	while(*p && *p != ':' )
+		host[i++] = *p++;
+
+	host[i] = 0;
+	if(*p) { p++; *port = atol(p); }
+}
+
+static int copy(int in,int out)
+{
+	size_t size;
+	char buf[10240];
+
+	if(ioctl(in,FIONREAD,&size) < 0)
+		marslog(LOG_EXIT|LOG_PERR,"ioctl");
+				
+	if(size == 0)
+	{
+		/* marslog(LOG_INFO,"closing %d -> %d",in,out);      */
+		shutdown(in,0);
+		shutdown(out,1);
+		return -1;
+	}
+
+	/* marslog(LOG_INFO,"copy %d -> %d %d",in,out,size);      */
+
+	while(size > 0)
+	{
+		size_t len = MIN(size,sizeof(buf));
+		if(read(in,buf,len) != len)
+			marslog(LOG_EXIT|LOG_PERR,"read");
+			
+		if(write(out,buf,len) != len)
+			marslog(LOG_EXIT|LOG_PERR,"write");
+
+		size -= len;
+	}
+
+	return in;
+}
+
+
+static err run_proxy(webdata* web,int s0)
+{
+	int s1,s2,s3,s4;
+	char host[1024];
+	char buf[10240];
+	int port = 80;
+	char c;
+	int i = 0;
+	struct sockaddr_in from;
+	marssocklen_t fromlen = sizeof(struct sockaddr_in);
+
+	split(web->proxy,host,&port);
+
+
+	/* marslog(LOG_INFO,"Unsing %s on port %d",host,port); */
+	s1 = call_server(host,port,-1);
+	if(s1 < 0) return -1;
+
+	split(web->host,host,&port);
+	sprintf(buf,"CONNECT %s HTTP/1.0\r\n"
+				"User-Agent: ECMWF-MARS-%ld\r\n"
+				"Host: %s\r\n"
+				"Content-Length: 0\r\n"
+				"Proxy-Connection: Keep-Alive\r\n"
+				"Pragma: no-cache\r\n"
+				"\r\n",
+				web->host,
+				marsversion(),
+				host);
+
+	if(write(s1,buf,strlen(buf)) != strlen(buf))
+		marslog(LOG_EXIT|LOG_PERR,"write");
+
+		
+	i = 0;
+	while(read(s1,&c,1) == 1 && i < sizeof(buf)-1)
+	{
+		buf[i++] = c;
+		if(i > 4 && strncmp(&buf[i-4],"\r\n\r\n",4) == 0)
+			break;
+	}
+	buf[i] = 0;
+
+	/* ---- */
+
+	/* marslog(LOG_INFO,"Listen on port %d",web->port); */
+	
+	alarm(10);
+	s2 = accept(s0, (struct sockaddr*)&from, &fromlen);
+	alarm(0);
+
+	if(s2 < 0) {
+		marslog(LOG_EROR|LOG_PERR,"accept");
+		return -1;
+	}
+
+	s3 = s1;
+	s4 = s2;
+
+	while(s3 >= 0 || s4 >= 0)
+	{
+		fd_set fds;
+
+		FD_ZERO(&fds); 
+		if(s3 >= 0) FD_SET(s3,&fds); 
+		if(s4 >= 0) FD_SET(s4,&fds);
+
+
+		switch(select(FD_SETSIZE,&fds,0,0,0))
+		{
+		case -1:
+			if(errno != EINTR)
+			{
+				return -1;
+				marslog(LOG_EXIT|LOG_PERR,"select");
+			}
+			break;
+
+			/* return timeout */
+		case 0:
+			return -1;
+			/*NOTREACHED*/
+			break;
+
+		default:
+			if(s3 >= 0 && FD_ISSET(s3,&fds)) s3 = copy(s1,s2);
+			if(s4 >= 0 && FD_ISSET(s4,&fds)) s4 = copy(s2,s1);
+			break;
+		}
+	}
+	
+	/* marslog(LOG_EXIT,"End of proxy"); */
+	return 0;
+	
+}
+
+static err start_proxy(webdata* web)
+{
+	char address[80];
+	int s  = server_mode(&web->port,address);
+	if(s < 0) return -1;
+
+	switch(fork())
+	{
+		case 0:
+			run_proxy(web,s);
+			exit(0);
+			break;
+
+		case -1:
+			marslog(LOG_EROR|LOG_PERR,"Cannot fork proxy helper");
+			close(s);
+			return -2;
+
+		default:
+			close(s);
+			break;
+	}
+
+	return 0;
+}
+
+
+static err post_close(webdata* web,FILE* f)
+{
+	if(pclose(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"pclose");
+		return -1;
+	}
+	return 0;
+}
+
+static FILE* post_open(webdata* web, const char* req,const char* url,const char* arg)
+{
+	const char *home = getenv("HOME");
+	FILE *f;
+	char *tmp = marstmp();
+	char buf[1024];
+	char host[1024];
+
+	f = fopen(tmp,"w");
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fopen(%s)",tmp);
+		return NULL;
+	}
+
+	fprintf(f,"POST %s/%s HTTP/1.0\n",url,arg);
+	fprintf(f,"User-Agent: ECMWF-MARS-%ld\n",marsversion());
+	fprintf(f,"Content-Length: %d\n",strlen(req));
+	fprintf(f,"\n");
+	fprintf(f,"%s",req);
+
+	if(fclose(f))
+	{
+		marslog(LOG_EROR|LOG_PERR,"fclose(%s)",tmp);
+		return NULL;
+	}
+
+	if(web->proxy) {
+		if(start_proxy(web) != 0)
+			return NULL;
+		sprintf(host,"localhost:%d",web->port);
+	}
+	else
+		strcpy(host,web->host);
+
+
+	sprintf(buf,"%s s_client -quiet "
+		"-cert   %s/.marsrc/cert.pem "
+		"-key    %s/.marsrc/key.pem   "
+		"-CAfile %s/.marsrc/ca.pem "
+		"-connect %s < %s 2>/dev/null",
+			web->openssl,home,home,home,host,tmp);
+
+	f = popen(buf,"r");
+	if(!f)
+	{
+		marslog(LOG_EROR|LOG_PERR,"popen(%s)",buf);
+		return NULL;
+	}
+
+	if(parse_header(web,f) != 0)
+	{
+		post_close(web,f);
+		return 0;
+	}
+
+	return f;
+}
+
+static err  webbase_open(void *data,request *r,request *v,int mode)
+{
+	webdata* web = (webdata*)data;
+	const char *me = database_name(data);
+	FILE* f  ;
+	
+	marslog(LOG_INFO,"%s is at %s%s%s", me,web->host,web->proxy?",via proxy ":"",
+		web->proxy?web->proxy:"");
+	
+	f = post_open(web,encode(r),web->url,"open");
+
+	if(!f) return -2;
+
+	web->object = strcache(get_value(web->header,"Webmars-object",0));
+	post_close(web,f); 
+
+	web->cleanup = true; /* The request was started succesfully */
+	
+	{
+	char buf[1024];
+	const char *p;
+
+	sprintf(buf,"object=%s",web->object);
+	for(;;)
+	{
+		FILE* f = post_open(web,buf,web->url,"status");
+		if(!f) return -2;
+		if(post_close(web,f)) return -2; 
+
+		p = get_value(web->header,"Webmars-result",0);
+		if(!p)
+		{
+			marslog(LOG_EROR,"Cannot get result from web server");
+			p = get_value(web->header,"Webmars-message",0);            
+			if(p) marslog(LOG_EROR,"%s",p);
+			return -2;
+		}
+
+		if(EQ(p,"complete"))
+			break;
+
+		if(EQ(p,"aborted"))
+		{
+			marslog(LOG_EROR,"The web server could not retrieve the data");
+			return -2;
+		}
+
+		p = get_value(web->header,"Webmars-sleep",0); 
+		sleep(p?atol(p):2);
+	}
+
+	{
+		FILE* f = post_open(web,buf,web->url,"fetch");
+		if(!f) return -2;
+		if(post_close(web,f)) return -2;
+	}
+
+	p = get_value(web->header,"Webmars-result",0);
+	{
+		FILE* f = post_open(web,buf,p,"");
+		if(!f) return -2;
+	/*	if(post_close(web,f)) return -2;*/
+		web->f = f;
+	}
+	}
+
+	return 0;
+
+}
+
+static err  webbase_close(void *data)
+{
+	webdata* web = (webdata*)data;
+	strfree(web->object);
+	if(web->f) post_close(web,web->f);
+
+	if(web->cleanup)
+	{
+		FILE *f;
+		char buf[1024];
+		sprintf(buf,"object=%s",web->object);
+		f = post_open(web,buf,web->url,"close");
+		if(f) post_close(web,f);
+	}
+	return 0;
+}
+
+
+static err  webbase_read(void *data,request *r,void *buffer,long *length)
+{
+	webdata* web = (webdata*)data;
+	fortint len = *length;
+	err ret = 0;
+	if(web->f == 0)
+	{
+		return -1;
+	}
+
+	ret =  _readany(web->f,buffer,&len);
+	*length = len;
+	return ret;
+}
+
+static err  webbase_write(void *data,request *r,void *buffer,long *length)
+{
+	return -1;
+}
+
+static err  webbase_list(void *data,request *r)
+{
+	return -1;
+}
+
+static err  webbase_cntl(void *data,int code,void *param,int size)
+{
+	switch(code)
+	{
+	case CNTL_LIST:
+		webbase_list(data,(request*)param);
+		return 0;
+		/*NOTREACHED*/
+		break;
+
+	default:
+		return -1;
+		/*NOTREACHED*/
+		break;
+	}
+	return -1;
+}
+
+static boolean  webbase_check(void *data,request *r)
+{
+	return true;
+}
+
+static err webbase_validate(void *data, request *r, request *e, int mode)
+{
+	err ret = NOERR;
+	
+/*	if(net->validate)*/
+/*		ret = validate_request(r,e,net->validate);*/
+
+	return ret;
+}
diff --git a/src/libMars/wind.c b/src/libMars/wind.c
new file mode 100644
index 0000000..9603f1f
--- /dev/null
+++ b/src/libMars/wind.c
@@ -0,0 +1,536 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#include "mars.h"
+
+#define N_VO 0
+#define N_D  1
+#define N_U  2
+#define N_V  3
+
+/* TODO: Read from a file * */
+
+
+typedef struct wind_family {
+	long u;
+	long v;
+	long vo;
+	long d;
+} wind_family; 
+
+static const wind_family WIND_PARAMS[] = {
+	{     131  ,     132 ,    138,    155 },
+	{  129131  ,  129132 , 129138, 129155 },
+	{  200131  ,  200132 , 200138, 200155 },
+
+};
+
+struct wind_data {
+	struct wind_data *next;
+	request *r;
+	grib_handle *grib[4];
+	boolean given[4];
+    int family;
+};
+
+struct _wind {
+	struct wind_data *data;
+	request *r;
+	boolean want[4];
+	long64* total;
+};
+
+
+static struct wind_data* find_wind_data(request* r,struct wind_data *data, err *ret)
+{
+	while(data) {
+
+		if(reqcmp(r,data->r,false) == 0) {
+			marslog(LOG_DBUG,"MATCH for find_wind_data");
+			return data;
+		}
+
+		data = data->next;
+	}
+
+	marslog(LOG_DBUG,"NO MATCH for find_wind_data");
+	return NULL;
+}
+
+static struct wind_data* free_wind_data(struct wind_data *data)
+{
+	int i;
+	struct wind_data* next = data->next;
+/* printf("free_wind_data: %x\n",data); */
+	for(i=0;i<4;i++)
+		if(data->grib[i])
+		{
+/* printf("grib_handle_delete %x\n",data->grib[i]); */
+			grib_handle_delete(data->grib[i]);
+		}
+
+	free_all_requests(data->r);
+	FREE(data);
+	return next;
+}
+
+static boolean checkuv(wind *w,void *buffer,long length,err *ret)
+{
+	long param = 0;
+	struct wind_data* data;
+	int  which = -1;
+	int i;
+    int family;
+
+	request* r;
+	grib_handle *g = grib_handle_new_from_message_copy(0,buffer,length);
+	if(!g) {
+		marslog(LOG_EROR,"checkuv: grib_handle_new_from_message_copy() failed");
+		*ret = -2;
+	}
+
+	*ret = grib_get_long(g,"paramId",&param);
+
+/* printf("grib_handle_new_from_message_copy %x, param %ld\n",g,param); */
+
+	if(*ret) {
+		marslog(LOG_EROR,"grib_get_long(paramId) failed: %s",grib_get_error_message(*ret));
+/* printf("grib_handle_delete %x\n",g); */
+		grib_handle_delete(g);
+		return false;
+	}
+
+	marslog(LOG_DBUG,"WIND got param %ld",param);
+
+    for(i = 0; i < NUMBER(WIND_PARAMS); i++) {
+
+        if(param == WIND_PARAMS[i].vo) /* VO */
+        {
+            which = N_VO;
+            family = i;
+        }
+
+        if(param== WIND_PARAMS[i].d) /* D */
+        {
+            which = N_D;
+            family = i;
+        }
+
+        if(param == WIND_PARAMS[i].u) /* U */
+        {
+            which = N_U;
+            family = i;
+        }
+
+        if(param == WIND_PARAMS[i].v) /* V */
+        {
+            which = N_V;
+            family = i;
+        }
+
+    }
+
+	if(which == -1)
+	{
+/* printf("grib_handle_delete %x\n",g); */
+		grib_handle_delete(g);
+		return false;
+	}
+
+	r = empty_request(0);
+	*ret = handle_to_request(r,g,NULL);
+	unset_value(r,"PARAM");
+	if(mars.debug)
+		print_all_requests(r);
+
+	if(*ret) {
+		marslog(LOG_EROR,"handle_to_request failed: %s",grib_get_error_message(*ret));
+/* printf("grib_handle_delete %x\n",g); */
+		grib_handle_delete(g);
+		return false;
+	}
+
+
+	data = find_wind_data(r, w->data, ret);
+	if(!data)
+	{
+		struct wind_data *prev = w->data;
+		struct wind_data * d = w->data;
+		data = NEW_CLEAR(struct wind_data);	
+		data->r = r;
+        data->family = family;
+
+		while(d)
+		{
+			prev = d;
+			d = d->next;
+		}
+		if(prev) {
+			prev->next = data;
+		}
+		else  {
+			w->data = data;
+		}
+
+	}
+	else
+	{
+		free_all_requests(r);
+	}
+
+    if(data->family != family) {
+		marslog(LOG_EXIT,"wind family mimatch: %d %d", family, data->family);
+    }
+
+	if(data->grib[which]) {
+		marslog(LOG_EROR,"wind failed: duplicate field");
+		*ret = -2;
+		print_all_requests(data->r);
+/* printf("grib_handle_delete %x\n",g); */
+		grib_handle_delete(g);
+		return false;
+	}
+
+	data->grib[which] = g;
+
+	/* Assumes that VO/D comes after U/V */
+	if(data->grib[N_VO] && data->grib[N_D] && !(data->grib[N_U] || data->grib[N_V]))
+	{
+		long len;
+		size_t vo_len, d_len;
+		const void *vo_buffer, *d_buffer;
+		char *u_buffer;
+		char *v_buffer;
+        long param ;
+
+		grib_get_message(data->grib[N_VO], &vo_buffer, &vo_len);
+		grib_get_message(data->grib[N_D],  &d_buffer,  &d_len);
+		if(mars.debug)
+		{
+			marslog(LOG_EROR,"checkuv: VO D");
+			r = empty_request(0);
+			grib_to_request(r,(char *)vo_buffer, vo_len);
+			print_all_requests(r);
+			free_all_requests(r);
+
+			r = empty_request(0);
+			grib_to_request(r,(char *)d_buffer, d_len);
+			print_all_requests(r);
+			free_all_requests(r);
+		}
+
+		len = MAX(vo_len + 4096,ppestimate()); 
+
+		u_buffer = reserve_mem(len);
+		v_buffer = reserve_mem(len);
+
+		if(mars.debug) {
+			marslog(LOG_DBUG,"makeuv for:");
+			print_all_requests(data->r);
+		}
+
+        /* clear flag */
+        mars.wind_requested_by_server = false;
+
+		*ret = makeuv(
+				(char*)vo_buffer, 
+				(char*)d_buffer, 
+				d_len,
+				u_buffer,
+				v_buffer,
+				&len);
+
+
+		if(*ret == 0) {
+			grib_handle *u = grib_handle_new_from_message_copy(0,u_buffer,len);
+			grib_handle *v = grib_handle_new_from_message_copy(0,v_buffer,len);
+
+			if(!u) {
+				marslog(LOG_EXIT,"checkuv: grib_handle_new_from_message_copy() failed");
+				*ret = -2;
+			}
+
+            param = 0;
+            grib_get_long(u,"paramId",&param);
+            if(param != WIND_PARAMS[data->family].u)
+            {
+                marslog(LOG_WARN|LOG_ONCE,"makeuv returns invalid paramId for U %ld (should be %ld)", param, WIND_PARAMS[data->family].u);
+                *ret = grib_set_long(u, "paramId", WIND_PARAMS[data->family].u);
+            }
+
+			if(!v) {
+				marslog(LOG_EXIT,"checkuv: grib_handle_new_from_message_copy() failed");
+				*ret = -2;
+			}
+
+            param = 0;
+            grib_get_long(v,"paramId",&param);
+            if(param != WIND_PARAMS[data->family].v)
+            {
+                marslog(LOG_WARN|LOG_ONCE,"makeuv returns invalid paramId for V %ld (should be %ld)", param, WIND_PARAMS[data->family].v);
+                *ret = grib_set_long(v, "paramId", WIND_PARAMS[data->family].v);
+            }
+
+
+/* printf("grib_handle_new_from_message_copy %x, param %ld\n",g,param); */
+
+
+			if(mars.debug)
+			{
+				marslog(LOG_EROR,"checkuv: U V");
+				r = empty_request(0);
+				grib_to_request(r,u_buffer, len);
+				print_all_requests(r);
+				free_all_requests(r);
+				r = empty_request(0);
+				grib_to_request(r,v_buffer, len);
+				print_all_requests(r);
+				free_all_requests(r);
+			}
+
+			if(data->grib[N_U]) {
+				marslog(LOG_EROR,"wind failed: duplicate U field");
+				*ret = -2;
+				print_all_requests(data->r);
+/* printf("grib_handle_delete %x\n",u); */
+				grib_handle_delete(u);
+
+			}
+			else {
+				data->grib[N_U] = u;
+				marslog(LOG_DBUG,"U ready");
+			}
+
+			if(data->grib[N_V]) {
+				marslog(LOG_EROR,"wind failed: duplicate V field");
+				*ret = -2;
+				print_all_requests(data->r);
+/* printf("grib_handle_delete %x\n",v); */
+				grib_handle_delete(v);
+			}
+			else {
+				data->grib[N_V] = v;
+				marslog(LOG_DBUG,"V ready");
+			}
+
+			release_mem(u_buffer);
+			release_mem(v_buffer);
+
+
+			/* Try to recover some memory */
+			for(i = 0 ; i < 4; i++) {
+				if(!w->want[i] && data->grib[i]) {
+/* printf("grib_handle_delete %x\n",data->grib[i]); */
+					grib_handle_delete(data->grib[i]);
+					data->grib[i] = NULL;
+				}
+			}
+		}
+	}
+
+	return *ret?false:true;
+}
+
+wind *wind_new(request *r,long64* total)
+{
+	wind *w =  NEW_CLEAR(wind);
+
+	int i , n = count_values(r,"PARAM"), j;
+
+	w->total = total;
+
+	for(i=0;i<n;i++)
+	{
+		const char* p = get_value(r,"PARAM",i);
+        long param = 0, table = 0;
+        paramtable(p, &param, &table, false);
+
+        param += (table == 128 ? 0: table) * 1000;
+
+        marslog(LOG_DBUG,"wind param.... %d",param);
+
+        for(j = 0; j < NUMBER(WIND_PARAMS); j++) {
+
+            if(param == WIND_PARAMS[j].u) {
+                if(w->want[N_U]) marslog(LOG_WARN|LOG_ONCE,"Wind convertion: more than one U-like parameter requested.");
+                w->want[N_U]   = true;
+            }
+            if(param == WIND_PARAMS[j].v) {
+                if(w->want[N_V]) marslog(LOG_WARN|LOG_ONCE,"Wind convertion: more than one V-like parameter requested.");
+                w->want[N_V]   = true;
+            }
+            if(param == WIND_PARAMS[j].vo) {
+                if(w->want[N_VO]) marslog(LOG_WARN|LOG_ONCE,"Wind convertion: more than one VO-like parameter requested.");
+                w->want[N_VO]  = true;
+            }
+            if(param == WIND_PARAMS[j].d) {
+                if(w->want[N_D]) marslog(LOG_WARN|LOG_ONCE,"Wind convertion: more than one D-like parameter requested.");
+                w->want[N_D]   = true;
+            }
+
+        }
+	}
+
+/* printf("wind_new: %x\n",w); */
+	return w;
+}
+
+void wind_free(wind *w)
+{
+	int i;
+
+/* printf("wind_free: %x\n",w); */
+	if(w)
+	{
+		struct wind_data *data = w->data;
+		while(data) {
+			data = free_wind_data(data);
+		}
+		FREE(w);
+	}
+}
+
+static boolean wind_advance(wind *w,char *buffer,long *length,err *ret)
+{
+	struct wind_data* prev = NULL;
+	struct wind_data* data = w->data;
+	boolean done;
+	while(data) {
+		int i,j = -1;
+		for(i=0;i<4;i++)
+			if(w->want[i] && data->grib[i] && !data->given[i])
+			{
+				j   = i;
+				break;
+			}
+
+		if(j>=0)
+		{
+			size_t len;
+			const void *msg;
+			grib_get_message(data->grib[j],&msg, &len);
+
+			if(*length < len)
+			{
+				*length = len;
+				*ret = -3;
+				return true;
+			}
+
+			*length = len;
+			memcpy(buffer,msg,len);
+
+			data->given[j]  = true;
+
+			done = true;
+			for(i=0;i<4;i++)
+				if(w->want[i] && !data->given[i]) 
+					done = false;
+
+			if(done)
+			{
+				struct wind_data* next;
+
+				if(mars.debug) {
+					marslog(LOG_DBUG,"WIND free");
+					print_all_requests(data->r);
+				}
+
+				next = free_wind_data(data);
+				if(prev == NULL) {
+					w->data = next;		
+				}
+				else
+				{
+					prev->next = next;
+				}
+			}
+
+			return true;
+		}
+		prev = data;
+		data = data->next;
+	}
+
+
+	return false;
+}
+
+boolean is_wind(long param)
+{
+	boolean found = false;
+	int i = 0;
+	for(i = 0; i < NUMBER(WIND_PARAMS); i++) {
+
+        if(param == WIND_PARAMS[i].u) /* U */
+        {
+			found = true;
+        }
+
+        if(param == WIND_PARAMS[i].v) /* V */
+        {
+			found = true;
+        }
+		if(found)
+			break;
+
+	}
+	return found;
+}
+
+err wind_next(wind *w,FILE *f,char *buffer,long *length, timer *t)
+{
+	err ret = 0;
+	long inlen = *length;
+
+	if(w->want[N_U] || w->want[N_V])
+	{
+		for(;;)
+		{
+			*length = inlen;
+
+			/* Are they ready made fields ? */
+
+			if(wind_advance(w,buffer,length,&ret))
+				return ret;
+
+			/* ret = _readany(f,buffer,length); */
+			ret = timed_readany(f,buffer,length,t);
+			if(ret == 0) 
+			{
+				if(w->total) (*w->total) += *length;
+			}
+			else 
+				return ret;
+
+			if(!checkuv(w,buffer,*length,&ret))
+			{
+				/* other fields */	
+				return ret;
+			}
+
+		}
+
+	}
+	else {
+		/* ret = _readany(f,buffer,length); */
+		ret = timed_readany(f,buffer,length,t);
+		if(ret == NOT_FOUND_7777 && mars.ignore_7777)
+		{
+			marslog(LOG_WARN,"Group 7777 not found, but message included");
+			ret = 0;
+		}
+		if(ret == 0) {
+			if(w->total) (*w->total) += *length;
+		}
+	}
+
+	return ret;
+}
diff --git a/src/libMars/xservice.c b/src/libMars/xservice.c
new file mode 100644
index 0000000..dad8086
--- /dev/null
+++ b/src/libMars/xservice.c
@@ -0,0 +1,58 @@
+/*
+ * © Copyright 1996-2012 ECMWF.
+ * 
+ * This software is licensed under the terms of the Apache Licence Version 2.0
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
+ * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * granted to it by virtue of its status as an intergovernmental organisation nor
+ * does it submit to any jurisdiction.
+ */
+
+#ifdef METVIEW
+#include <X11/Intrinsic.h>
+#include "mars.h"
+
+static void svcinput(void *data,int *soc,XtInputId *id)
+{
+	svc *s = (svc*)data;
+	process_service(s);
+}
+
+static Boolean install_input(void *data)
+{
+	svc *s = (svc*)data;
+
+	svc_connect(s);
+
+	XtAppAddInput(
+	    (XtAppContext)s->context,
+	    s->soc,
+	    (XtPointer)XtInputReadMask,
+	    (XtInputCallbackProc)svcinput,
+	    (XtPointer)s);
+	return True;
+}
+
+
+void ListenToService(XtAppContext app_context,svc *s)
+{
+	s->context = (long)app_context;
+	XtAppAddWorkProc(app_context,(XtWorkProc)install_input,
+	    (XtPointer)s);
+}
+
+svc *RegisterService(XtAppContext app_context,const char *name)
+{
+	svc *s = create_service(name);
+
+	if(s) {
+		svc_connect(s);
+		s->context = (long)app_context;
+		XtAppAddWorkProc(app_context,
+		    (XtWorkProc)install_input,
+		    (XtPointer)s);
+	}
+	return s;
+}
+
+#endif
diff --git a/src/libMetview/Cached.h b/src/libMetview/Cached.h
new file mode 100644
index 0000000..b6e5616
--- /dev/null
+++ b/src/libMetview/Cached.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Cached_DEFINED
+#define Cached_DEFINED
+
+#include <mars.h>
+#include <string.h>
+#include <ctype.h>
+
+//! Obsolete caching string class (pre std::string)
+/*! Although this class, based on libMars C functions \c strcache()
+ *  and \c strfree(), is heavily used in Metview code, it is now
+ *  considered obsolete and superceded by standard std::string class
+ *  and the use of Cached in the new code is not recommended.
+ *  This documentation is mainly for understanding the old code
+ *  that still uses Cached.
+ */
+class Cached
+{
+    char *Str;
+
+public:
+
+    //! Constructor with a C string as argument
+    Cached(const char* s = NULL){ Str = strcache(s); }
+
+    //! Copy constructor
+    Cached(const Cached& c)     { Str = strcache(c.Str); }
+
+    //! Destructor
+    ~Cached()                   { strfree(Str); }
+
+    //! Operator to cast Cached into a C string
+    operator const char*() const      { return Str; }
+
+    //! Assignment operator for a C string
+    Cached& operator =(char* s)
+        { strfree(Str); Str = strcache(s); return *this; }
+
+    //! Assignment operator for Cached
+    Cached& operator =(const Cached& c)
+        { strfree(Str); Str = strcache(c.Str); return *this; }
+
+    //! Operator to test the equality
+    int operator==(const Cached& c) const { return Str == c.Str; }
+
+    //! Method to extract a substring
+    /*! Copies a substring of length \c Length, starting from
+     *  position \c StartPos.
+     *  The first character is in position \c 1. \n \n
+     *  NOTE: \c Length is not checked against a possible overflow
+     *  and for \c Length overflowing the original string the
+     *  substring will contain bytes after the original string!
+     */
+    Cached subString( int StartPos, int Length ) const;
+
+    //! Method to convert text to upper case
+    Cached toUpper();
+
+	//! Concatenation operator for \c int
+	/*! The numeric value is first converted to a number string
+	 *  and the number string is concatenated to the original string.
+         */
+	Cached operator+(int)         const;
+
+	//! Concatenation operator for \c long
+	/*! The numeric value is first converted to a number string
+	 *  and the number string is concatenated to the original string.
+         */
+	Cached operator+(long)        const;
+
+	//! Concatenation operator for \c double
+	/*! The numeric value is first converted to a number string
+	 *  and the number string is concatenated to the original string.
+         */
+	Cached operator+(double)      const;
+
+	//! Comparision operator
+	int operator<(const Cached& other) const
+		{ return strcmp(Str,other.Str) < 0; }
+
+	//! Comparision operator
+	bool less(const Cached& other) const
+		{ return ( strcmp(Str,other.Str) < 0) ? true : false; }
+
+};
+
+//! Function to concatenate a \c long and \c Cached
+Cached operator +(long,const Cached&);
+
+//! Function to concatenate a \c double and \c Cached
+Cached operator +(double,const Cached&);
+
+//! Function to concatenate a C string (<PRE>const char*</PRE>) and \c Cached
+Cached operator +(const char*,const Cached&);
+
+#endif
diff --git a/src/libMetview/LLMatrixToGRIB.cc b/src/libMetview/LLMatrixToGRIB.cc
new file mode 100644
index 0000000..c649781
--- /dev/null
+++ b/src/libMetview/LLMatrixToGRIB.cc
@@ -0,0 +1,387 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// This is an extended version of llmatrix_to_grib function
+// available in Mars library.  Within Metview both 'togrib'
+// and macro now use this extended version.
+//                                             vk/1999-07-19
+// Re-written to use GRIB_API                  vk/2009-07-07
+
+#include "inc_iostream.h"
+#include "Metview.h"
+#include "LLMatrixToGRIB.h"
+#include "UtilitiesC.h"
+#include "grib_api.h"
+#include <math.h>
+
+#define CLEAR(a) memset(&a,0,sizeof(a))
+
+
+void do_swap( double& s1, double& s2 )
+{
+    double t=s1;
+    s1=s2;
+    s2=t;
+}
+
+err LLMatrixToGRIB( const char* matrixFile, const char* gribFileName )
+{
+	//-- open LatLonMatrix file
+
+	ifstream matrixStream( matrixFile, ios::in );
+	if(!matrixStream)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",matrixFile);
+		return -1;
+	}
+
+	//-- temporary file to store LatLonMatrix metadata as a Request
+
+	char *requestFile = marstmp();
+	FILE *reqFILE = fopen( requestFile, "w" );
+	if(!reqFILE)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",requestFile);
+		return -1;
+	}
+
+	//-- extract LatLonMatrix metadata and write metadata into a Request file
+
+	int  n = 0;
+	char line[1024];
+	matrixStream.getline( line, sizeof(line) );
+	while( matrixStream.gcount() > 0 )
+	{
+		if(*line != '#')
+		{
+			int l = strlen(line)-1;
+
+			while(l >= 0 && (
+					line[l] == ' '  ||
+					line[l] == '\n' ||
+					line[l] == ','  ||
+					line[l] == '\t')
+					)
+				line[l--] = 0;
+
+
+			if(n == 0) {
+				// Look for a '='
+				char *p  = line;
+				int flg  = 0;
+				while(*p) if(*p++ == '=') flg++;
+				// If a '=', add a verb
+				if(flg) {
+					fprintf(reqFILE,"LLMATRIX");
+					fprintf(reqFILE,",%s",line);
+				}
+				else fprintf(reqFILE,"%s",line);
+			}
+			else fprintf(reqFILE,",%s",line);
+			n++;
+		}
+		if(strncmp(line,"#DATA",5)==0)
+			break;
+
+		matrixStream.getline( line, sizeof(line) );
+	}
+
+	fclose( reqFILE );
+
+	//-- read into an internal Request structure and remove the temporary file
+
+	request* r = read_request_file( requestFile );
+	unlink( requestFile );
+	print_all_requests(r);
+
+	//-- extract grid related metadata
+
+	const char* p;
+	double north   = atof((p=get_value(r,"NORTH",0))?p:"0");
+	double west    = atof((p=get_value(r,"WEST", 0))?p:"0");
+	int    nlat    = atol((p=get_value(r,"NLAT", 0))?p:"0");
+	int    nlon    = atol((p=get_value(r,"NLON", 0))?p:"0");
+	double ew      = atof((p=get_value(r,"GRID", 0))?p:"0");
+	double ns      = atof((p=get_value(r,"GRID", 1))?p:"0");
+
+	if( ns == 0 )
+		ns = ew;
+
+	if(ew == 0 || ns == 0 || nlat == 0 || nlon == 0)
+	{
+		marslog(LOG_EROR,"Invalid ll-matrix");
+		return -1;
+	}
+
+	p=get_value(r,"HSCAN", 0);    //-- 'WE' (default) or 'EW'
+	int  hscan = ( p && ( *p == 'E' || *p == 'e' ) ) ? 128 : 0;
+
+	p=get_value(r,"VSCAN", 0);    //-- 'NS' (default) or 'SN'
+	int  vscan = ( p && ( *p == 'S' || *p == 's' ) ) ? 64 : 0;
+
+	p=get_value(r,"SCANDIR", 0);  //-- 'HORIZONTAL' (default) or 'VERTICAL'
+	int  scandir = ( p && ( *p == 'V' || *p == 'v' ) ) ? 32 : 0;
+
+	double missing = (p=get_value(r,"MISSING", 0))?atof(p):mars.grib_missing_value;
+
+	//-- extract PARAM, TABLE2, LEVEL, CENTRE, DATE, FCAST
+
+	int   param   = (p=get_value(r,"PARAM", 0))?atol(p):255;
+	int   table   = (p=get_value(r,"TABLE2", 0))?atol(p):128;
+	int   level   = (p=get_value(r,"LEVEL", 0))?atol(p):0;
+	int   centre  = (p=get_value(r,"CENTRE", 0))?atol(p):localWmoSiteNumber();
+	if( param == 0 )
+	    param = 255;
+
+	long msave = expand_flags(0);
+	p = get_value(r,"DATE", 0);
+	double dseed = p ? atof(p) : 0.0;
+	MvDate    date( dseed );
+	expand_flags(msave);
+
+	int   fc_len  = ( p = get_value(r,"FCAST", 0) ) ? atol(p) : 0;
+
+
+	//-- set correct boarder values
+
+	double first_lat = north;
+	double last_lat  = north - (nlat-1) * ns;
+
+	if( vscan > 0 )
+		do_swap( first_lat, last_lat );
+
+	double first_lon = west;
+	double last_lon  = west + (nlon-1) * ew;
+
+	if( hscan > 0 )
+		do_swap( first_lon, last_lon );
+
+	/* ============================================================ */
+
+	//-- read data values from LatLonMatrix file
+
+	int npoints = nlat * nlon;
+	double* dataValues = new double[ npoints ];
+
+	n = 0;
+	int miss = 0;
+	for( int i = 0; i < npoints; ++i )
+	{
+		if( matrixStream.eof() )
+		{
+		   dataValues[i] = mars.grib_missing_value;
+		   miss++;
+		}
+		else
+		{
+		   double myValue = DBL_MAX;
+		   matrixStream >> myValue;
+
+		   if( myValue == DBL_MAX )  //-- check read success
+		   {
+		      dataValues[i] = mars.grib_missing_value;
+		      miss++;
+		   }
+		   else
+		   {
+		      dataValues[i] = myValue;
+		      ++n;
+
+		      if( dataValues[i] == missing )
+		      {
+		         miss++;             //-- adapt to mars
+		         dataValues[i] = mars.grib_missing_value;
+		      }
+		   }
+
+		   if( matrixStream.peek() == ',' )
+		       matrixStream.ignore(1,',');    //-- skip possible comma separators
+		}
+	}
+	matrixStream.close();
+
+	if( n != npoints )
+	{
+		marslog(LOG_EROR,"LLMatrixToGRIB: file %s, read %d values out of %d expected",
+			matrixFile, n, npoints );
+		return -1;
+	}
+
+	/* ============================================================ */
+
+	//-- create a new grib handle from a GRIB_API sample file
+
+	const char* sample = "regular_ll_sfc_grib1";
+
+	grib_handle* h = grib_handle_new_from_samples( 0, sample );
+	if( !h ) {
+	  marslog( LOG_EROR
+	         , "Failed to create handle from sample %s[.tmpl]", sample );
+	  return -1;
+	}
+
+	//-- start modifying the GRIB metadata, according to LatLonMatrix metadata
+
+	int stat = 0;
+	stat += grib_set_long( h, "table2Version", table );
+	stat += grib_set_long( h, "centre", centre );
+	stat += grib_set_long( h, "gridDefinition", 255 );
+	stat += grib_set_long( h, "section1Flags", miss ? 192 : 128 );
+	stat += grib_set_long( h, "indicatorOfParameter", param );
+
+	if( stat > 0 ) {
+		marslog( LOG_EROR, "Errors calling 'grib_api' (1)!" );
+		return -1;
+	}
+
+
+	//-- UKMO uses 'generating process' octet as part of their STASH code;
+	//-- use env.variable MV_GENERATING_PROCESS to set a custom value
+	const char* generProcAscii = getenv( "MV_GENERATING_PROCESS" );
+	if( generProcAscii )
+	  stat += grib_set_long( h, "generatingProcessIdentifier", atoi( generProcAscii ) );
+	else
+	  stat += grib_set_long( h, "generatingProcessIdentifier", mars.computeflg );
+
+	//-- value zero for 'generating process' causes problems!
+	long generProc = 0;
+	stat += grib_get_long( h, "generatingProcessIdentifier", &generProc );
+	if( generProc == 0 )
+	  stat += grib_set_long( h, "generatingProcessIdentifier", 255 );
+
+
+	stat += grib_set_long( h, "indicatorOfUnitOfTimeRange", 1 );
+	if( fc_len > 0 )
+	{
+	  stat += grib_set_long( h, "periodOfTime", fc_len );
+	  stat += grib_set_long( h, "marsType", 9 ); //-- forecast
+	}
+
+	if( level == 0 ) {
+		stat += grib_set_long( h, "levtype", GRIB_SURFACE );
+	} else {
+		stat += grib_set_long( h, "levtype", GRIB_PRESSURE_LEVEL );
+		stat += grib_set_long( h, "level", level );
+	}
+
+#if 0
+//??????
+	if( centre == 98 ) //-- ??????????????????? vk/20090707
+	{
+		locsec1.ecmwf_local_id  = GRIB_ENSEMBLE_FORECAST;
+		locsec1.mars_class      = GRIB_CLASS_OD;
+		locsec1.mars_type       = 2;          /* AN */
+		locsec1.mars_stream     = 1025;       /* DA */
+		locsec1.mars_expver     = 0x30303031; /* 01 */
+
+		ksec1.local_use         = 1;
+		ksec1.local             = locsec1;
+	}
+
+	ksec2.data_rep        = GRIB_LAT_LONG;
+#endif
+	stat += grib_set_long( h, "date", date.YyyyMmDd() );
+	stat += grib_set_long( h, "time", date.hhmmss()/100 );
+
+
+	stat += grib_set_long( h, "Ni", nlon );
+	stat += grib_set_long( h, "Nj", nlat );
+
+	stat += grib_set_double( h, "latitudeOfFirstGridPointInDegrees", first_lat );
+	stat += grib_set_double( h, "longitudeOfFirstGridPointInDegrees", first_lon );
+	stat += grib_set_double( h, "latitudeOfLastGridPointInDegrees", last_lat );
+	stat += grib_set_double( h, "longitudeOfLastGridPointInDegrees", last_lon );
+	stat += grib_set_long( h, "scanningMode", hscan + vscan + scandir );
+
+	if( stat > 0 ) {
+		marslog( LOG_EROR, "Errors calling 'grib_api' (2)!" );
+		return -1;
+	}
+
+	int ewi = ew * GRIB_FACTOR;
+	int nsi = ns * GRIB_FACTOR;
+
+	//----------------------------------------------------------//
+	//-- GRIB1 precision is millidegrees: 0.001 degrees only! --//
+	//-- If grid interval requires more precision then do not --//
+	//-- store grid intervals (let them to be computed).      --//
+	//----------------------------------------------------------//
+	bool not_enough_precision =
+	  (fabs( ew - (double)ewi/GRIB_FACTOR ) > 0.00005) ||
+	  (fabs( ns - (double)nsi/GRIB_FACTOR ) > 0.00005);
+
+	stat += grib_set_long( h, "ijDirectionIncrementGiven", not_enough_precision ? 0 : 1 );
+	stat += grib_set_double( h, "iDirectionIncrementInDegrees", not_enough_precision ? 0 : ew );
+	stat += grib_set_double( h, "jDirectionIncrementInDegrees", not_enough_precision ? 0 : ns );
+
+	if( stat > 0 ) {
+		marslog( LOG_EROR, "Errors calling 'grib_api' (3)!" );
+		return -1;
+	}
+
+
+	//  Missing value
+
+	stat += grib_set_long( h, "bitmapPresent", 1 );
+	stat += grib_set_double( h, "missingValue", mars.grib_missing_value );
+
+	if( stat > 0 ) {
+		marslog( LOG_EROR, "Errors calling 'grib_api' (4)!" );
+		return -1;
+	}
+
+	//--  Data
+
+	stat += grib_set_long( h, "numberOfPoints", npoints );
+
+	int nbits = 24;  //-- currently hard coded
+	stat += grib_set_long( h, "bitsPerValue", nbits );
+
+	printf("nbits   = %d\n",nbits);
+	printf("missing = %g\n",missing);
+
+	//-- set new grid point values
+	stat = grib_set_double_array( h, "values", dataValues, npoints );
+
+	//-- get the GRIB1 message into 'buffer'
+	size_t      buflen   = 0;
+	const void* buffer = NULL;
+	stat = grib_get_message( h, &buffer, &buflen );
+
+	if( stat > 0 ) {
+		marslog( LOG_EROR, "Errors calling 'grib_api' (5)!" );
+		return -1;
+	}
+
+	//-- write the GRIB1 message from 'buffer' to the file
+
+	FILE *gribFile = fopen(gribFileName,"w");
+	if(!gribFile)
+	{
+		marslog(LOG_EROR|LOG_PERR,"Cannot open %s",gribFileName);
+		return -1;
+	}
+
+	err e = 0;
+	if(fwrite(buffer,1,buflen,gribFile) != buflen)
+	{
+		marslog(LOG_EROR|LOG_PERR,"fwrite(%s) failed",gribFileName);
+		e = -1;
+	}
+
+	if(fclose(gribFile))
+	{
+		marslog(LOG_EROR|LOG_PERR,"fclose(%s) failed",gribFileName);
+		e = -1;
+	}
+
+	delete [] dataValues;
+//	delete [] buffer;
+	return e;
+}
diff --git a/src/libMetview/LLMatrixToGRIB.h b/src/libMetview/LLMatrixToGRIB.h
new file mode 100644
index 0000000..95b6b6d
--- /dev/null
+++ b/src/libMetview/LLMatrixToGRIB.h
@@ -0,0 +1,19 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef LLMatrixToGRIB_defined
+#define LLMatrixToGRIB_defined
+
+#include "mars.h"
+
+err LLMatrixToGRIB( const char *in, const char *out );
+
+#endif
+
diff --git a/src/libMetview/Makefile.am b/src/libMetview/Makefile.am
new file mode 100644
index 0000000..1294116
--- /dev/null
+++ b/src/libMetview/Makefile.am
@@ -0,0 +1,75 @@
+
+
+noinst_LIBRARIES = lib/libMetview.a
+
+SRC = MvService.cc       \
+      MvProtocol.cc      \
+      MvFunction.cc      \
+      MvApplication.cc   \
+      MvRequest.cc       \
+      MvLanguage.cc      \
+      MvGeoPoints.cc     \
+      MvGrid.cc          \
+      MvFieldSet.cc      \
+      MvFilter.cc        \
+      MvSerie.cc         \
+      MvTable.cc         \
+      MvFortran.cc       \
+      MvDate.cc          \
+      MvTimeSerie.cc     \
+      MvLocation.cc      \
+      MvObsSet.cc        \
+      MvObs.cc           \
+      MvObsUtil.cc       \
+      MvPrepBufrPrep.cc  \
+      MvTask.cc          \
+      MvServiceTask.cc   \
+      MvShellTask.cc     \
+      MvVisTool.cc       \
+      LLMatrixToGRIB.cc  \
+	  MvMatrix.cc        \
+	  MvScanFileType.cc  \
+	  MvDebugPrintControl.cc \
+	  Path.cc \
+	  Cached.h \
+	  LLMatrixToGRIB.h \
+	  Metview.h \
+	  MvApplication.h \
+	  MvDate.h \
+	  MvDebugPrintControl.h \
+	  MvFieldSet.h \
+	  MvFilter.h \
+	  MvFortran.h \
+	  MvFunction.h \
+	  MvGeoPoints.h \
+	  MvGrid.h \
+	  MvLanguage.h \
+	  MvLocation.h \
+	  MvMatrix.h \
+	  MvObs.h \
+	  MvBufr.h \
+	  MvBufrObs.h \
+	  MvObsSet.h \
+	  MvObsUtil.h \
+	  MvPrepBufrPrep.h \
+	  MvProtocol.h \
+	  MvRequest.h \
+	  MvScanFileType.h \
+	  MvSerie.h \
+	  MvService.h \
+	  MvServiceTask.h \
+	  MvShellTask.h \
+	  MvTable.h \
+	  MvTask.h \
+	  MvTemplates.h \
+	  MvTimeSerie.h \
+	  MvVisTool.h \
+	  Path.h
+
+lib_libMetview_a_SOURCES = $(SRC)
+
+
+BUILT_SOURCES = lib
+
+lib:
+	ln -s ../../lib lib
diff --git a/src/libMetview/Makefile.in b/src/libMetview/Makefile.in
new file mode 100644
index 0000000..9ac8c9a
--- /dev/null
+++ b/src/libMetview/Makefile.in
@@ -0,0 +1,708 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/libMetview
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libMetview_a_AR = $(AR) $(ARFLAGS)
+lib_libMetview_a_LIBADD =
+am__objects_1 = MvService.$(OBJEXT) MvProtocol.$(OBJEXT) \
+	MvFunction.$(OBJEXT) MvApplication.$(OBJEXT) \
+	MvRequest.$(OBJEXT) MvLanguage.$(OBJEXT) MvGeoPoints.$(OBJEXT) \
+	MvGrid.$(OBJEXT) MvFieldSet.$(OBJEXT) MvFilter.$(OBJEXT) \
+	MvSerie.$(OBJEXT) MvTable.$(OBJEXT) MvFortran.$(OBJEXT) \
+	MvDate.$(OBJEXT) MvTimeSerie.$(OBJEXT) MvLocation.$(OBJEXT) \
+	MvObsSet.$(OBJEXT) MvObs.$(OBJEXT) MvObsUtil.$(OBJEXT) \
+	MvPrepBufrPrep.$(OBJEXT) MvTask.$(OBJEXT) \
+	MvServiceTask.$(OBJEXT) MvShellTask.$(OBJEXT) \
+	MvVisTool.$(OBJEXT) LLMatrixToGRIB.$(OBJEXT) \
+	MvMatrix.$(OBJEXT) MvScanFileType.$(OBJEXT) \
+	MvDebugPrintControl.$(OBJEXT) Path.$(OBJEXT)
+am_lib_libMetview_a_OBJECTS = $(am__objects_1)
+lib_libMetview_a_OBJECTS = $(am_lib_libMetview_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libMetview_a_SOURCES)
+DIST_SOURCES = $(lib_libMetview_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = lib/libMetview.a
+SRC = MvService.cc       \
+      MvProtocol.cc      \
+      MvFunction.cc      \
+      MvApplication.cc   \
+      MvRequest.cc       \
+      MvLanguage.cc      \
+      MvGeoPoints.cc     \
+      MvGrid.cc          \
+      MvFieldSet.cc      \
+      MvFilter.cc        \
+      MvSerie.cc         \
+      MvTable.cc         \
+      MvFortran.cc       \
+      MvDate.cc          \
+      MvTimeSerie.cc     \
+      MvLocation.cc      \
+      MvObsSet.cc        \
+      MvObs.cc           \
+      MvObsUtil.cc       \
+      MvPrepBufrPrep.cc  \
+      MvTask.cc          \
+      MvServiceTask.cc   \
+      MvShellTask.cc     \
+      MvVisTool.cc       \
+      LLMatrixToGRIB.cc  \
+	  MvMatrix.cc        \
+	  MvScanFileType.cc  \
+	  MvDebugPrintControl.cc \
+	  Path.cc \
+	  Cached.h \
+	  LLMatrixToGRIB.h \
+	  Metview.h \
+	  MvApplication.h \
+	  MvDate.h \
+	  MvDebugPrintControl.h \
+	  MvFieldSet.h \
+	  MvFilter.h \
+	  MvFortran.h \
+	  MvFunction.h \
+	  MvGeoPoints.h \
+	  MvGrid.h \
+	  MvLanguage.h \
+	  MvLocation.h \
+	  MvMatrix.h \
+	  MvObs.h \
+	  MvBufr.h \
+	  MvBufrObs.h \
+	  MvObsSet.h \
+	  MvObsUtil.h \
+	  MvPrepBufrPrep.h \
+	  MvProtocol.h \
+	  MvRequest.h \
+	  MvScanFileType.h \
+	  MvSerie.h \
+	  MvService.h \
+	  MvServiceTask.h \
+	  MvShellTask.h \
+	  MvTable.h \
+	  MvTask.h \
+	  MvTemplates.h \
+	  MvTimeSerie.h \
+	  MvVisTool.h \
+	  Path.h
+
+lib_libMetview_a_SOURCES = $(SRC)
+BUILT_SOURCES = lib
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libMetview/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libMetview/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libMetview.a: $(lib_libMetview_a_OBJECTS) $(lib_libMetview_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libMetview.a
+	$(AM_V_AR)$(lib_libMetview_a_AR) lib/libMetview.a $(lib_libMetview_a_OBJECTS) $(lib_libMetview_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libMetview.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/LLMatrixToGRIB.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvApplication.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvDate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvDebugPrintControl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvFieldSet.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvFilter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvFortran.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvFunction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvGeoPoints.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvGrid.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvLanguage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvLocation.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvMatrix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvObs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvObsSet.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvObsUtil.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvPrepBufrPrep.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvProtocol.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvRequest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvScanFileType.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvSerie.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvServiceTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvShellTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvTable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvTimeSerie.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvVisTool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Path.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+lib:
+	ln -s ../../lib lib
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libMetview/Metview.h b/src/libMetview/Metview.h
new file mode 100644
index 0000000..3c417dc
--- /dev/null
+++ b/src/libMetview/Metview.h
@@ -0,0 +1,73 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <mars.h>
+#include <Cached.h>
+#include <MvRequest.h>
+#include <MvLanguage.h>
+#include <MvFilter.h>
+#include <MvApplication.h>
+#include <MvProtocol.h>
+#include <MvFunction.h>
+#include <MvFieldSet.h>
+#include <MvService.h>
+#include <MvSerie.h>
+#include "MvDebugPrintControl.h"
+// for observations:
+//#include <MvObs.h>
+//#include <MvBufr.h>
+//#include <MvLocation.h>
+
+/*! \mainpage Documentation of libMetview library
+ *
+ * \section intro_sec Introduction
+ *
+ * This is libMetview documentation, part of Metview Techical
+ * Documentation, documenting the classes whose source code is
+ * stored in directory 'src/libMetview'. Note that this document
+ * does not include classes whose source code is outside
+ * 'src/libMetview', such as 'src/libUtil', 'src/libMars', etc.
+ *
+ * This documentation is created by 'Doxygen'.
+ *
+ * \section build_sec How to update this documentation
+ *
+ * Whenever you edit such files in libMetview that are still
+ * missing the documentation (or having misleading documentation),
+ * you are invited to add and/or correct also the documentation
+ * comments.
+ *
+ * To (re)create this documentation simply run command 'doxygen'
+ * in directory 'src/libMetview'. The documentation is created
+ * according to 'doxygen' configuration file
+ * 'src/libMetview/Doxyfile'.
+ *
+ * The HTML index file (this page) will be written to
+ * 'src/libMetview/doxy/html/index.html'.
+ *
+ * \section pdf_sec PDF documentation
+ *
+ * Doxygen can be configured to create also PDF documentation by
+ * setting USE_PDFLATEX to YES. Currently (Dec 2008) some packages
+ * are missing and the PDF version cannot be created...
+ * (needs: pdflatex,... )
+ *
+ * \section doxy_sec About Doxygen
+ *
+ * To learn about Doxygen have a look at:
+ * http://www.stack.nl/~dimitri/doxygen/ \n \n
+ *
+ * Good Luck! \n \n
+ * Graphics Section \n
+ * ECMWF \n \n \n
+ *
+ * and continuous Happy Metviewing to everybody! \n
+ * Vesa Karhila, 2008-12-23, retiring from ECMWF
+ *
+ */
diff --git a/src/libMetview/MvApplication.cc b/src/libMetview/MvApplication.cc
new file mode 100644
index 0000000..1d78a11
--- /dev/null
+++ b/src/libMetview/MvApplication.cc
@@ -0,0 +1,197 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <stdarg.h>
+
+svc *MvApplication::Service = NULL;
+MvApplication* MvApplication::app = 0;
+int KeepAlive::count_ = 0;
+boolean MvApplication::ProcessReplies = 0;
+static const char* cPreferencesFile = "General";
+
+MvApplication::MvApplication(int& argc,char **argv,const char *name, void* aparg, int nopt, option* opt)
+{
+	app = this;
+
+	marsinit(&argc,argv,aparg,nopt,opt);
+	Service = create_service(name?name:progname());
+	MvServiceFactory::installServices();
+}
+
+boolean MvApplication::stopAll(const char* fmt,...)
+{
+	char *p = getenv("METVIEW_MODE");
+
+	if(!p)
+		return false;
+
+	if(strcmp(p,"batch") != 0)
+		return false;
+
+	va_list list;
+	char buf[1024];
+
+	va_start(list,fmt);
+	vsprintf(buf,fmt,list);
+	va_end(list);
+
+	stop_all(Service,buf,1);
+
+	return true;
+}
+
+void MvApplication::setKeepAlive(boolean on)
+{
+	keep_alive(Service,on?1:0);
+}
+
+void MvApplication::setMaximum(int n)
+{
+	set_maximum(Service,n);
+}
+
+void MvApplication::setExitTimeout(int minutes)
+{
+	exit_timeout(Service,minutes);
+}
+
+void MvApplication::run()
+{
+	/* if (!mars.nofork) setExitTimeout(1); // 1 minute */
+	service_run(Service);
+}
+
+void MvApplication::callService(const char* s, const MvRequest& r, void* d)
+{
+/*
+	if(ProcessReplies)
+		while(service_ready(Service))
+		{
+			marslog(LOG_DBUG,"Processing async replies...");
+			process_service(Service);
+		}
+*/
+	call_service(Service, s, r, (long) d);
+}
+
+MvRequest MvApplication::waitService(const char* s, const MvRequest& r, int& err)
+{
+	err = 0;
+	return MvRequest(wait_service(Service, (char*)s, r, &err),false);
+}
+
+void MvApplication::callFunction(const char* s, const MvRequest& r, void* d)
+{
+	call_function(Service, s, r, (long) d);
+}
+
+void MvApplication::sendMessage(const MvRequest& r)
+{
+	send_message(Service, r);
+}
+
+void MvApplication::recordOn(boolean on)
+{
+	recording(Service, on);
+
+}
+
+void MvApplication::setFork(boolean on)
+{
+	mars.nofork = !on;
+}
+
+void MvApplication::notifyIconCreation(const char *icon_name,const char *icon_class)
+{
+   request *u = empty_request("STATUS");
+   set_value(u,"NAME",  "%s", icon_name);
+   set_value(u,"CLASS", "%s", icon_class);
+   set_value(u,"STATUS", "CREATED");
+   send_message(Service,u);
+   free_all_requests(u);
+}
+
+void MvApplication::notifyIconModified(const char *icon_name,const char *icon_class)
+{
+   request *u = empty_request("STATUS");
+   set_value(u,"NAME",  "%s", icon_name);
+   set_value(u,"CLASS", "%s", icon_class);
+   set_value(u,"STATUS", "MODIFIED");
+   send_message(Service,u);
+   free_all_requests(u);
+}
+
+MvRequest MvApplication::getPreferences(const char *name)
+{
+	const char *prefs_name = (name == NULL) ? cPreferencesFile : name;
+	char buf[1024];
+	sprintf(buf,"%s/System/Preferences/%s",
+              getenv("METVIEW_USER_DIRECTORY"),prefs_name);
+
+	return read_request_file(buf);
+}
+
+MvRequest MvApplication::getExpandedPreferences(const char *name)
+{
+    	const char *prefs_name = (name == NULL) ? cPreferencesFile : name;
+	//MvRequest req=get_preferences(Service,prefs_name);	
+	MvRequest req=getPreferences(prefs_name);
+
+	char *shareDir=getenv("METVIEW_DIR_SHARE");
+	if(!shareDir)
+		return req;
+	
+	string path(shareDir);
+	path.append("/etc/");
+
+	string defFileName=path+ "ConfigDef";
+	string rulesFileName=path + "ConfigRules";
+
+	MvLanguage langMetview ( defFileName.c_str(),
+				 rulesFileName.c_str(),
+				 EXPAND_DEFAULTS);
+
+	return langMetview.expandOne ( req );
+}
+
+//! (used by MvApplication)
+/*! This class is used by method MvApplication::wantPreferences().
+ */
+class MvPreferenceMessage : public MvMessage{
+	MvApplication *appl;
+public:
+	MvPreferenceMessage(const char *name,MvApplication *a) : MvMessage(name),appl(a) {}
+	virtual void callback(MvRequest& r) { appl->newPreferences(r); }
+};
+
+void MvApplication::wantPreferences(const char *name)
+{
+	new MvPreferenceMessage(name?name:"GENERAL_PREFERENCES",this);
+}
+
+void MvApplication::addInputCallback(FILE *f,inputproc p,void *data)
+{
+	add_input_callback(Service,f,p,data);
+}
+
+
+MvRequest MvApplication::poolFetch(const char *icon_name,const char *icon_class) {
+	return pool_fetch(Service,icon_name,icon_class);
+}
+void MvApplication::poolStore(const char *icon_name,const char *icon_class,
+	const MvRequest& r)
+{
+	pool_store(Service,icon_name,icon_class,r);
+}
+
+void MvApplication::poolLink(const char *name1,const char *name2)
+{
+	pool_link(Service,name1,name2);
+}
diff --git a/src/libMetview/MvApplication.h b/src/libMetview/MvApplication.h
new file mode 100644
index 0000000..9459dbe
--- /dev/null
+++ b/src/libMetview/MvApplication.h
@@ -0,0 +1,100 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvApplication_DEFINED
+#define MvApplication_DEFINED
+
+#include <MvRequest.h>
+
+//! Establishes communication with \c event module
+/*! This class, together with MvService, form the basis
+ *  of Metview Application C++ Framework.
+ */
+
+class MvApplication {
+
+static  MvApplication* app;
+static	svc *Service;
+static  boolean ProcessReplies;
+
+
+public:
+
+//! The standard constructor
+/*! The standard constructor for a non X Window module. It gets the basic parameters
+ *  from the configuration file and command line, registers the service \c name
+ *  and starts the communication with \c event.
+ */
+	MvApplication(int& argc,char **argv,const char *name = NULL,
+		 void* aparg = NULL, int nopt = 0,option* = NULL);
+
+
+	static MvApplication& instance() { return *app; }
+
+	void wantPreferences(const char* = NULL);
+
+//! Starts the module's main loop.
+	virtual void run();
+
+	virtual void newPreferences(const MvRequest&) {}
+	virtual void addInputCallback(FILE*,inputproc,void*);
+
+static void setProcessReplies(boolean onOff) { ProcessReplies = onOff; }
+
+static MvRequest getPreferences(const char* = NULL);
+static MvRequest getExpandedPreferences(const char* = NULL);
+
+//! Sends request \c req to service \c name.
+static void callService(const char* name, const MvRequest& req, void* ref);
+
+static MvRequest waitService(const char*, const MvRequest&,int&);
+static void callFunction(const char*, const MvRequest&, void*);
+
+//! Broadcasts the message contained in request \c req.
+static void sendMessage(const MvRequest& req);
+
+static void recordOn(boolean = true);
+static void setFork(boolean);
+
+//! Defines the maximum time the module may stay in an idle state before being aborted.
+static void setExitTimeout(int minutes);
+
+static void destroyService() { destroy_service(Service); }
+static void setKeepAlive(boolean);
+static void setMaximum(int);
+static boolean stopAll(const char*,...);
+static void notifyIconCreation(const char *icon_name,const char *icon_class);
+static void notifyIconModified(const char *icon_name,const char *icon_class);
+
+//! Returns the service structure created by the constructor.
+static svc* getService()  { return Service; }
+
+
+static MvRequest poolFetch(const char *icon_name,const char *icon_class);
+static void      poolStore(const char *icon_name,const char *icon_class,
+	const MvRequest&);
+
+static void      poolLink(const char *name1,const char *name2);
+};
+
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+//-- obsolete? PlotMod and uPlot use directly MvApplication::setKeepAlive()
+
+class KeepAlive {
+	static int count_;
+public:
+	KeepAlive()  { if(++count_ == 1) MvApplication::setKeepAlive(true); }
+	~KeepAlive() { if(--count_ == 0) MvApplication::setKeepAlive(false); }
+};
+#endif
+
+#endif
diff --git a/src/libMetview/MvBufr.h b/src/libMetview/MvBufr.h
new file mode 100644
index 0000000..ad9c482
--- /dev/null
+++ b/src/libMetview/MvBufr.h
@@ -0,0 +1,444 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvBufr.h,   vk Sep94
+//        rev vk 010720
+
+#ifndef MvBufr_DEFINED_
+#define MvBufr_DEFINED_
+
+#include "fdyntime.h"
+#include <map>
+using namespace std;
+
+/*! \file */
+
+//--------------------------------------------------------
+// This constant should be removed into 'Site Dependent Values'...
+//--------------------------------------------------------
+const int BUFR_ORIGINATING_CENTER = 98;   // 98 == ECMWF
+
+
+//------------------------------------------------------//
+// missing value code to be used in C/C++ routines      //
+//------------------------------------------------------//
+const float     kBufrMissingValue = 1.7e38;
+const fortint   kBufrMissingIntValue = 2147483647;
+
+
+//------------------------------------------------------//
+// missing value code returned by FORTRAN routines      //
+//------------------------------------------------------//
+const fortfloat kFortranBufrMissingValue = 1.7e38;
+const fortint   kFortranBufrMissingIntValue = 2147483647;
+
+//--------------------------------------------------------
+// maximum sizes of arrays used in FORTRAN routines
+// NOTE: sizes for arrrays for BUBOX set in MvObs.cc!!!
+// NOTE2: IBM/AIX cannot handle bigger arrays in -q32 mode
+//--------------------------------------------------------
+#if defined(AIX) || defined(MV_USE_SMALL_ARRAYS)
+ const int MAX_KELEM=  40000;  //12000;
+ const int NUM_MAX_KVALS=3;
+ const int aMAX_KVALS[NUM_MAX_KVALS]={90000, 180000, 360000}; // previous max values: 80000
+ //                                      7MB    14MB   27MB
+//                                    (vals*80)/(1024*1024)MB
+ const int MAX_KVALS=aMAX_KVALS[NUM_MAX_KVALS-1]; // biggest entry in aMAX_KVALS
+#else
+ const int MAX_KELEM = 160000; // max allowed is 160,000 !!!  // 80000;  // 40000;   //12000;
+ const int NUM_MAX_KVALS=3;
+ const int aMAX_KVALS[NUM_MAX_KVALS]={600000, 1500000, 4096000};  //360000;   //80000;
+//                                      45MB    115MB   312MB
+//                                    (vals*80)/(1024*1024)MB
+ const int MAX_KVALS=aMAX_KVALS[NUM_MAX_KVALS-1]; // biggest entry in aMAX_KVALS
+#endif
+
+//! \enum EBufrInState Status of a BUFR message being read
+enum  EBufrInState
+{
+   kBufrIn_Error
+ , kBufrIn_Coded
+ , kBufrIn_Sections012Expanded
+ , kBufrIn_DataDecoded
+ , kBufrIn_DataAndDescriptorsDecoded
+};
+
+//! \enum EBufrOutState Status of a BUFR message being created
+enum  EBufrOutState
+{
+   kBufrOut_error
+  ,kBufrOut_noBuffers
+  ,kBufrOut_emptyBuffers
+  ,kBufrOut_formatedBuffers
+  ,kBufrOut_dataInBuffers
+};
+
+//! \enum EElementValueType Values for data element types
+enum EElementValueType
+{
+   kEVT_unknown
+  ,kEVT_missing
+  ,kEVT_numeric
+  ,kEVT_string
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+                                             //  Sections of a BUFR message
+typedef struct
+{
+   unsigned char startStr;       // "B"
+   unsigned char startStr2;      // "U"
+   unsigned char startStr3;      // "F"
+   unsigned char startStr4;      // "R"
+   unsigned char totalLen;    // 24 bits
+   unsigned char totalLen2;
+   unsigned char totalLen3;
+   unsigned char editionNr;
+} TSection0;
+#endif
+
+#if 0
+typedef struct
+{
+   unsigned char len;        // 24;  // 1-3
+   unsigned char len2;       // 24;  // 2
+   unsigned char len3;       // 24;  // 3
+   unsigned char masterTable;//  8;  // 4
+   unsigned char origCentre; // 16;  // 5-6
+   unsigned char origCentre2;// 16;  // 6
+   unsigned char updateSeq;  //  8;  // 7
+
+   unsigned char bitField;   //  8;  // 8...
+   unsigned char msgType;    //  8;
+   unsigned char msgSubtype; //  8;
+   unsigned char masterTableVers; //8;
+
+   unsigned char localTableVers; //8;  // 12...
+   unsigned char yearYY;     //  8;
+   unsigned char month;      //  8;
+   unsigned char day;        //  8;
+
+   unsigned char hour;       //  8;  // 16...
+   unsigned char minute;     //  8;
+} TSection1;
+#endif
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+// internal classes, should not be included in Doxygen docs
+
+const unsigned char cOctetMissingIndicator = 255;
+
+class Section1Base
+{
+ public:
+   Section1Base( const unsigned char* octs );
+   Section1Base( const Section1Base* aSec1 );
+   virtual ~Section1Base(){ delete [] octets_; }
+
+   int         len() const { return 65536*octets_[0] + 256*octets_[1] + octets_[2]; }
+   bool        isDifferent( const Section1Base* aSec1 ) const;
+   const unsigned char* start() const { return octets_; }
+
+   virtual bool     hasSection2() = 0;
+   virtual TDynamicTime date() = 0;
+   virtual int      msgType() = 0;
+   virtual int      msgSubtypeWMO() = 0;
+   virtual int      msgSubtypeLocal() = 0;
+   virtual int      msgSubtype() = 0;
+   virtual int      origCentre() = 0;
+   virtual int      origSubCentre() = 0;
+   virtual int      masterTable() = 0;
+   virtual int      masterTableVersion() = 0;
+   virtual int 	    localTableVersion() = 0;
+
+ protected:
+   unsigned char* octets_;
+};
+
+class Section1_preEd4 : public Section1Base
+{
+ public:
+   Section1_preEd4( const unsigned char* octs ) : Section1Base( octs ){};
+   Section1_preEd4( const Section1Base* aSec1 ) : Section1Base( aSec1 ){};
+
+   bool     hasSection2();
+   TDynamicTime date();
+   int      msgType();
+   int      msgSubtypeWMO();
+   int      msgSubtypeLocal();
+   int      msgSubtype();
+   int      origCentre();
+   int      origSubCentre();
+   int      masterTable();
+   int      masterTableVersion();
+   int 	    localTableVersion();
+};
+
+class Section1_Ed4 : public Section1Base
+{
+ public:
+   Section1_Ed4( const unsigned char* octs ) : Section1Base( octs ){};
+   Section1_Ed4( const Section1Base* aSec1 ) : Section1Base( aSec1 ){};
+
+   bool     hasSection2();
+   TDynamicTime date();
+   int      msgType();
+   int      msgSubtypeWMO();
+   int      msgSubtypeLocal();
+   int      msgSubtype();
+   int      origCentre();
+   int      origSubCentre();
+   int      masterTable();
+   int      masterTableVersion();
+   int 	    localTableVersion();
+};
+
+typedef struct
+{
+   unsigned char len;      // : 24;
+   unsigned char len2;
+   unsigned char len3;
+   unsigned char reserved; // :  8;
+} TSection2;
+
+typedef struct
+{
+   unsigned char len;      // : 24;
+   unsigned char len2;
+   unsigned char len3;
+   unsigned char reserved;   //  8;
+   unsigned char subsetCnt;  // 16;
+   unsigned char subsetCnt2;
+   unsigned char bitField;   //  8;
+} TSection3;
+
+typedef struct
+{
+   unsigned char len;      // : 24;
+   unsigned char len2;
+   unsigned char len3;
+   unsigned char reserved; // :  8;
+} TSection4;
+// DOXYGEN_SHOULD_SKIP_THIS
+#endif
+
+//--------------------------------------------------------------- MvBufrBase
+
+class MvObsSet;
+
+//! Wrapper around Fortran 'bufren', base class for MvBufr and MvBufrOut
+/*! This class and its methods are a lower level wrapper around Fortran
+ *  subroutine 'bufren'. This class should be hidden from Metview applications
+ *  and the methods of this class should be called only from MvObs.
+ */
+class MvBufrBase
+{
+ friend class MvBufrOut;  //???
+ //friend class MvObsSet;
+
+ protected:
+	 int  _refCount;
+	long  fMessageNumber;
+
+        long *longptr;
+	char *fMessage;
+	long  fMessageLength;
+   TSection0 *fSec0;
+   Section1Base* Sec1;
+   TSection2 *fSec2;
+   unsigned char *fTotalSec2;
+   TSection3 *fSec3;
+   TSection4 *fSec4;
+
+     fortint  fKERR;
+     fortint *fKSUP;   // [ 9 ];
+     fortint *fKSEC0;  // [ 3 ];
+     fortint *fKSEC1;  // [ 40 ];
+     fortint *fKSEC2;  // [ 64 ];
+     fortint *fKSEC3;  // [ 4 ];
+     fortint *fKSEC4;  // [ 2 ];
+
+ protected:
+	    MvBufrBase( const long len );  //( char *msg, long len );
+	    virtual ~MvBufrBase( void );
+
+      void  attach( void );   // { _refCount++; }
+      void  detach( void );   // { if( --_refCount == 0 ) delete this; }
+      void  createFortranArrays( void );
+    void  createDataArrays( void );
+    void  deleteDataArrays( void );
+      unsigned int unsignedInt( const unsigned char* firstOctet
+                              , int octetCount );
+      int subsetCount(){ return unsignedInt( &(fSec3->subsetCnt), 2); }
+      int totalLen() { return unsignedInt( &(fSec0->totalLen), 3); }
+};
+
+//--------------------------------------------------------------- MvBufr
+
+//! C++ wrapper around Fortran 'bufren', used by MvObs
+/*! This class and its methods are a lower level wrapper around Fortran
+ *   subroutine 'bufren'. These methods should be called only via MvObs class.
+ */
+class MvBufr : public MvBufrBase
+{
+ friend class MvObs;
+ friend class MvObsSet;
+ friend class MvObsSetIterator;
+ friend class MvBufrConfidence;
+ friend class MvBufrOut;
+
+   static long  _bufrIn_ref;
+
+ protected:
+	    MvBufr( char *msg, long len, long aMessageNumber=0 );
+	    ~MvBufr( void );  //?? {} missing??
+
+      void  Decode( void );
+      void  Decode_012( void );
+      void  ExpandDescriptors( int subsetNumber );
+       int  descriptorToFortranIndex( const long aDescr, const int firstIndex = 0 );
+      long  currentBufrRef( void ) const { return _bufrIn_ref; };
+
+ EElementValueType  elementValueType( const int aSubsetNr );
+ EElementValueType  elementValueType( const long aDescriptor, const int aSubsetNr );
+ EElementValueType  elementValueTypeByIndex( const int anIndex, const int aSubsetNr );
+
+ boolean  Value( const long aDescriptor
+		 , const long aSubsetNumber
+		 , fortfloat &aDataValue
+		 , int   firstIndex = 0 );
+     fortfloat  DataValue( const int aDescriptorArrayIndex
+		     , const long aSubsetNumber);
+     fortfloat  PeekDataValue( const int aDescriptorArrayIndex
+		         , const long aSubsetNumber);
+      long  intValue( const long aDescriptor, const int subsetNr );
+
+    double  feedbackValue( int col, int subset );
+    double  feedbackValue( int row, int col, int subset );
+    string   feedbackItemName( int row,int subset );
+    string   feedbackItemUnit( int row,int subset );
+
+  TDynamicTime  obsTime( const int subsetNr ); //- from msg body (section 4)
+  TDynamicTime  msgTime( void );               //- from msg header (section 1)
+
+    string  stringValue( const long aDescriptor, const int aSubsetNr );
+    string  stringValue( const int aSubsetNr );
+    string  stringValueByIndex( const int anIndex, const int aSubsetNr );
+
+    string  unit( const long aDescriptor );
+    string  unit( void );
+    string  unitByIndex( const int anIndex );
+
+    string  name( const long aDescriptor );
+    string  name( void );
+    string  nameByIndex( const int anIndex );
+
+   boolean  SetFirstDescriptor( void );
+   boolean  SetNextDescriptor( void );
+      long  CurrentDescriptor( void ){ return _currentDescr; }
+ fortfloat  CurrentValue( const int aSubsetNr ){ return DataValue( _currentDescrInd, aSubsetNr); }
+
+      bool  printSection(ostream &aStream,int which);
+      bool printSection_012( ostream& aStream,int which);
+      bool  writeBufrBox( int aSubsetNr );
+       int  fillBufrBox( int aSubsetNr );
+      bool  getBufrBoxSize( int& rows, int& cols, int aSubsetNr );
+
+      bool  getDataFromSection2(map<string,string> &data);
+      void  parseSection2(fortint *fKEY,map<string,string> &data);
+
+      void  setSubset( int subsetNumber ){ _lastKnownSubsetValue = subsetNumber; }
+
+ private:
+      void  computeIn_KELEM( void );
+
+ protected:
+  EBufrInState  _inState;
+	  long  _currentDescr;
+	  int   _currentDescrInd;
+	  int   _bufrBoxFilledSubset;
+	  fortint  _lastKnownSubsetValue; //-- Q&D trick, BUSEL2 requires
+};
+
+//--------------------------------------------------------------- MvBufrOut
+// A simple class capable of producing BUFR code only from 'MvObs'
+// objects i.e. usable in filtering applications which read a
+// BUFR file and write a new file with less messages...
+//---------------------------------------------------------------
+
+class MvObsSet;
+class MvObs;
+class MvBufrConfidence;
+
+const int MAX_KDLEN = 2000;  //-- big value needed for some NCEP PrepBUFR files
+
+//! Wrapper around Fortran 'bufren', for (re)encoding
+/*! This class and its methods are a lower level wrapper around Fortran
+ *  subroutine 'bufren'. These methods should be called only via MvObs class.
+ */
+class MvBufrOut : public MvBufrBase
+{
+ friend class MvObs;
+ friend class MvObsSet;
+ friend class MvObsSetIterator;
+
+ protected:
+	    MvBufrOut( const long len, MvObsSet* anOutSet );
+	    ~MvBufrOut( void );
+
+   static long  _bufrOut_ref;
+
+      void  createBuffers();
+      void  resetBuffers( void );
+      void  formatBuffers( const MvObs& anObs );
+      void  write( MvObs& anObs );
+      void  add( MvObs& anObs );
+      void  addIntoBuffers( MvObs& anObs );
+      void  encode( void );
+      void  checkDescriptors( const MvObs& anObs );
+       int  differentDescriptors( void ) const;
+       int  differentHeader( const MvObs& anObs ) const;
+       int  shouldBeWritten( void );
+      void  setSubsetCount( int MaxNrSubsets );
+   boolean  isDelayedDescriptor( const long aDescriptor ) const;
+     // long  msgLength( void ) { return _msgIntLen*sizeof( fortint ); }
+
+ protected:
+       MvObsSet* _outSet;
+            int  _maxNrSubsets;
+	    int  _nextValue;
+	    int  _nextCharParamPos;
+  EBufrOutState  _outState;
+        fortint  _KDLEN;
+        fortint  _KDATA[ MAX_KDLEN ];
+   Section1Base* _currentSec1;
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+//--------------------------------------------------------------- MvBufrParam
+
+class MvBufrParam
+{
+ public:
+        MvBufrParam( const char *aParamName );
+        MvBufrParam( const long anIntAsDescriptor ) {fDescriptor = anIntAsDescriptor;}
+
+  long  Descriptor( void ) const { return fDescriptor; }
+  void  PrintAllKnownParameters( void ) const;
+
+  operator int ( void ) const { return fDescriptor; }
+
+ private:
+     long  fDescriptor;
+};
+// DOXYGEN_SHOULD_SKIP_THIS
+#endif
+
+#endif
+// MvBufr_DEFINED
diff --git a/src/libMetview/MvBufrObs.h b/src/libMetview/MvBufrObs.h
new file mode 100644
index 0000000..fca7e63
--- /dev/null
+++ b/src/libMetview/MvBufrObs.h
@@ -0,0 +1,599 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvObs.h,   vk july94
+//        rev vk 010724
+
+#ifndef MvBufrObs_DEFINED
+#define MvBufrObs_DEFINED
+
+#include <string>
+#include "inc_iostream.h"
+//#include <fstream.h>
+//#include <strstream.h>
+#include "MvBufr.h"
+#include "MvLocation.h"
+#include "fmettim.h"
+
+#ifdef METVIEW
+//#   include "Metview.h"
+#    include "MvDate.h"
+#    include "MvRequest.h"
+#endif
+
+//---------------------------------------------------
+// Function definitions for the FORTRAN BUFR routines
+//---------------------------------------------------
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define  BUS012   bus012
+#define  BUPRS0   buprs0
+#define  BUPRS1   buprs1
+#define  BUPRS2   buprs2
+#define  BUFREX   bufrex
+#define  BUFREN   bufren
+#define  BUSEL    busel
+#define  BUSEL2   busel2
+#define  BUUKEY   buukey
+#define  BUPRS3   buprs3
+#define  BUBOX    bubox
+#define  BUPRTBOX buprtbox
+#define  FT_OP6   ft_op6
+#define  FT_CLO   ft_clo
+#else
+#define  BUS012   bus012_
+#define  BUPRS0   buprs0_
+#define  BUPRS1   buprs1_
+#define  BUPRS2   buprs2_
+#define  BUFREX   bufrex_
+#define  BUFREN   bufren_
+#define  BUSEL    busel_
+#define  BUSEL2   busel2_
+#define  BUUKEY   buukey_
+#define  BUPRS3   buprs3_
+#define  BUBOX    bubox_
+#define  BUPRTBOX buprtbox_
+#define  FT_OP6   ft_op6_
+#define  FT_CLO   ft_clo_
+#endif
+
+//--------------------------------------------------------------- MvObs
+//! A class to handle one observation report stored in a BUFR message
+/*! This class is used to request data and metadata from a single
+ *  BUFR message (Observation Report). Access to BUFR messages in
+ *  files is done using classes MvObsSet and MvObsSetIterator. \n
+ *
+ * <B>Descriptors</B> \n
+ * Elements within the message body are referenced by BUFR descriptors.
+ * These descriptors are of the form 'ZXXYYY', where Z=0, XX defines
+ * an element class and YYY defines an element within a class.
+ * Descriptor values can be found in "BUFR, User Guide and Reference Manual"
+ * by Milan Dragosavac (ECMWF). \n
+ * A Word of Warning: leave out leading zeroes when writing constants
+ * (such as descriptors) into your code, unless you intend to use
+ * octal constants! \n
+ *
+ * <B>Current Descriptor</B> \n
+ * Some member functions need no descriptor, because they will use
+ * the internal Current Descriptor set by a previously called member
+ * function which had a descriptor parameter. \n
+ *
+ * <B>Missing Values</B> \n
+ * Functions returning values from the message will return const kBufrMissingValue
+ * if the requested value is not available. Another const, called
+ * kBufrMissingIntValue is used for missing integer values.
+ */
+class MvObs
+{
+ friend class MvBufrOut;
+ friend class MvObsSet;
+ friend class MvObsSetIterator;
+
+	void _copy( MvBufr* b );
+	void _copy( const MvObs& b );
+	void _clean();
+
+public:
+//! Constructor
+/*! Arguments are mainly used by MvObsSet and MvObsSetIterator.
+ *  Applications normally call this constructor without arguments.
+ */
+	MvObs( MvBufr* b = NULL, int i = 1 );
+
+//! Copy constructor
+	MvObs( const MvObs&  b );
+
+	~MvObs();
+
+//! Assignment operator
+	MvObs& operator= ( const MvObs& b );
+
+//! Operator to test the validity of a new MvObs
+/*! In this example operator void*() is used implicitly
+ *  in testing the validity of MvObs object returned by
+ *  MvObsSetIterator object:
+ * <PRE>
+ *      MvObsSet mySet("/path/to/my/file");
+ *      MvObsSetIterator myIter(mySet);
+ *      ...
+ *      while(myObs=myIter()) //-- void*() is called here
+ *      {
+ *         ... //-- do the stuff
+ *      }
+ * </PRE>
+ */
+    operator void*();
+
+//! Returns the number of subsets available in this BUFR message
+/*! Use method Advance() to get to the next subset (in a multisubset BUFR message).
+ */
+        int  msgSubsetCount(){ return _bufrIn->subsetCount(); }
+
+//! Returns the current subset number (in a multisubset BUFR message)
+        int  subsetNumber() const { return _subsetNr; }
+
+//! Advances to the next subset in a multisubset BUFR message
+/*! Returns 'false' if current subset is the last (or the only)
+ *  one. Returns 'true' on success.
+ */
+	bool   Advance();
+
+//! Checks whether this MvObs contains a BUFR message or is empty
+    bool  operator! ();
+
+//! Checks that this MvObs contains a valid decodable BUFR message
+    bool  msg_ok() const; // { return _bufr_id == _bufrIn->currentBufrId(); }
+
+    // ----  A P I   f u n c t i o n s :  ---- //
+
+    //-- APIs for requesting parameter values --//
+
+//! Returns the value of an element defined by 'aDescriptor'
+/*! Also sets Current Descriptor.
+ *  Missing value indicator is returned if the observation report
+ *  does not contain elements of type 'aDescriptor', or if the element
+ *  does not have value.
+ */
+      float  value( long aDescriptor );
+
+//! Returns the value of an element defined by 'aDescriptor' as 'long'
+/*! Also sets Current Descriptor.
+ */
+       long  intValue( long aDescriptor );
+
+//! Returns the value of an element defined by 'aDescriptor' as 'string'
+/*! Also sets Current Descriptor.
+ */
+      string stringValue( long aDescriptor );
+
+//! Returns the value of Current Descriptor as a string
+      string stringValue();
+
+//! Returns the value of the next element with the same descriptor
+/*! Uses Current Descriptor to start looking for the next occurrence
+ *  of the same descriptor later in the message.
+ *  Updates Current Descriptor.
+ *  Returns 'kFortranBufrMissingValue' if no such element is found
+ *  or if such an element has no value.
+ */
+      float  nextValue();
+
+//! Returns the value corresponding to the 'n'th occurrence of descriptor 'descr'
+/*! Method searches the current subset from the beginning looking
+ *  for descriptors 'descr'. If BUFR message contains 'n' (or more)
+ *  occurrences of descriptor 'descr', the corresponding data value
+ *  is returned, otherwise 'kFortranBufrMissingValue' is returned.
+ */
+      float  valueByOccurrence( int n, long descr );
+
+//! Index access operator returns the 'n'th data value
+/*! This operator treats BUFR message as an array (as 'bufrdc' does)
+ *  and returns the value of the 'n'th element as 'double'.
+ *  Index 'n' starts from '1', i.e. n=1,2,3,...
+ */
+     double  operator[] ( int n );  //-- n starts from 1: 1,2,...,n
+
+//! Returns the value from the 'col'th feedback column for Current Descriptor
+/*! Uses 'bufrdc' subroutine 'BUBOX()' to arrange feedback values into
+ *  a two dimensional array. Argument 'col' refers to a column in this array.
+ */
+     double  feedbackValue( int col ){ return _bufrIn->feedbackValue( col, _subsetNr ); }
+
+//! Returns the value of the 'row'th element in the 'col'th feedback column
+/*! Uses 'bufrdc' subroutine 'BUBOX()' to arrange feedback values into
+ *  a two dimensional array. Arguments 'row' and 'col' are indices into
+ *  this array.
+ */
+     double  feedbackValue( int row, int col ){ return _bufrIn->feedbackValue( row, col, _subsetNr ); }
+
+     string  feedbackItemName( int row){ return _bufrIn->feedbackItemName( row, _subsetNr ); }
+     string  feedbackItemUnit( int row){ return _bufrIn->feedbackItemUnit( row, _subsetNr ); }
+
+    //-- APIs for requesting parameter metadata --//
+
+//! Returns the name of the data referenced by 'aDescriptor' (from BUFR Table B)
+     string  name( long aDescriptor );
+
+//! Returns the name of the data referenced by Current Descriptor
+     string  name();
+
+//! Returns the unit of the data referenced by 'aDescriptor' (from BUFR Table B)
+     string  unit( long aDescriptor );
+
+//! Returns the unit of the data referenced by Current Descriptor
+     string  unit();
+
+    //-- APIs for iterating through all parameters --//
+
+//! Sets the first expanded descriptor in the message as Current Descriptor
+/*! In case of decoding problems, returns 'false'.
+ */
+       bool  setFirstDescriptor(){ return _bufrIn->SetFirstDescriptor(); }
+
+//! Advances Current Descriptor to the next expanded descriptor in the message
+/*! Returns 'false' if message contains no more data (no more descriptors).
+ */
+       bool  setNextDescriptor(){ return _bufrIn->SetNextDescriptor(); }
+
+//! Returns the data value related to Current Descriptor
+      float  currentValue(){ return _bufrIn->CurrentValue( _subsetNr ); }
+
+//! Returns Current Descriptor
+       long  currentDescriptor(){ return _bufrIn->CurrentDescriptor(); }
+
+    //-- APIs for requesting parameter types --//
+
+//! Returns the type of data related to descriptor 'aDescriptor'
+ EElementValueType  elementValueType( long aDescriptor );
+
+//! Returns the type of data related to Current Descriptor
+ EElementValueType  elementValueType();
+
+    //-- APIs for requesting time and location data --//
+
+//! Returns the time from the observation report (from the data: BUFR section 4)
+        TDynamicTime  obsTime(){ return _bufrIn->obsTime( _subsetNr ); }
+
+//! Returns the time from the message metadata (from BUFR section 1)
+        TDynamicTime  msgTime(){ return _bufrIn->msgTime(); }
+
+//! Returns the location from the observation report (from the data: BUFR section 4)
+      MvLocation  location();
+
+    //-- APIs for message type, subtype, originating centre, etc --//
+
+//! Returns the Message Type code from BUFR section 1
+        int  messageType();
+
+//! Returns the locally defined Message Subtype code from BUFR section 1
+        int  messageSubtypeLocal();
+
+//! Returns the international Message Subtype code (WMO defined) from BUFR section 1
+/*! Note that this code is available only in BUFR Edition 4 messages. For Edition 3
+ *  messages a value of 255 is returned (255 corresponds to an octet with all bits '1').
+ */
+        int  messageSubtypeInternational();
+
+//! Returns either the local or the international message subtype
+/*! In BUFR Edition 3 only the local subtype was available.
+ *  In BUFR Edition 4 the WMO defined international subtype was
+ *  added. Local subtype was left for backwards compatibility.
+ *
+ *  For BUFR Edition 3 messages this function always returns the local subtype.
+ *
+ *  For later Editions this function returns the international subtype if
+ *  it has been set. If not set (has a value 255) then the local subtype
+ *  is returned
+ */
+        int  messageSubtype();
+
+//! Returns the Originating Centre code from BUFR section 1
+        int  originatingCentre();
+
+//! Returns the Originating Subcentre code from BUFR section 1
+        int  originatingSubCentre();
+
+//! Returns the Edition number from BUFR section 0
+        int editionNumber();
+
+//! Returns the Master Table code from BUFR section 1
+/*! Master Table 0 is for Meteorology, 10 is for Oceanography
+ */
+	int masterTable();
+
+//! Returns the Master Table version from BUFR section 1
+	int masterTableVersion();
+
+//! Returns the Local Table version from BUFR section 1
+	int localTableVersion();
+
+    //-- APIs for  --//
+//! Returns the total length of the message from BUFR section 0
+	int messageTotalLen();
+
+    //-- APIs for requesting weather station values --//
+//! Returns the 5 digit WMO station identifier
+/*! Looks for WMO block number 'BB' and station identifier 'SSS'
+ *  and returns the value of 'BBSSS' if found. Returns zero if
+ * 'BB' or 'SSS' is not found.
+ */
+       long  WmoIdentNumber();
+
+//! Returns the 2 digit WMO block identifier 'BB'
+/*! Returns zero if 'BB' not found.
+ */
+        int  WmoBlockNumber();
+
+//! Returns the 3 digit WMO station identifier 'SSS'
+/*! Returns zero if 'SSS' not found.
+ */
+        int  WmoStationNumber();
+
+//! Looks for an ident from the BUFR message
+/*! Looks for the following message identifiers: \n
+ *  - WMO Station Identifier 'BBSSS' \n
+ *  - Ship or mobile land station identifier (001011) \n
+ *  - Buoy/platform identifier (001005) \n
+ *  - Aircraft flight number (001006) \n
+ *  - Satellite identifier (001007) \n
+ *  - Aircraft registration number (001008) \n
+ *  - Stationary buoy platform identifier (001010) \n
+ *  - Storm identifier (001025)
+ *  - WMO storm name (001026)
+ *  - WMO long storm name (001027)
+ *
+ *  and returns the first one found, as a string. If none
+ *  of the above is found, returns "id???".
+ */
+     string  findSomeIdent();
+
+    //-- APIs for accessing replicated parameters --//
+
+//! Returns the number of times level coordinator descriptor 'levelDescriptor' is found
+	int  numberOfLevels( long levelDescriptor );
+
+//! Returns the first value related to 'levelDescriptor', i.e. value of the first level
+      float  firstLevel( long levelDescriptor );
+
+//! Returns the value of the next level related to Current Level Descriptor
+      float  nextLevel();
+
+//! Returns the value of the specified data for the specified level
+/*! First looks for a data block related to level 'aLevel' as the
+ *  value of the data element related to level descriptor 'aLevelDescriptor',
+ *  and then looks for a data element related to descriptor 'aDescriptor'
+ *  within this level.
+ */
+      float  valueByLevel( long  aLevelDescriptor
+                         , float aLevel
+			 , long  aDescriptor );
+			 
+      float  valueByLevelRange( long  aLevelDescriptor
+                         , float firstLevel
+			 , float seconLevel	
+			 , long  aDescriptor );
+			 		 
+//! Returns the number of pressure levels found in the observation report
+/*! Pressure level descriptor is 007004, so this is an alias for member function
+ *  numberOfLevels(7004).
+ */
+	int  numberOfPressureLevels();
+
+//! Returns the value of the first pressure level in hPa
+/*! Original pressure values are stored in Pa, so this is
+ *  the same as 100.0*firstLevel(7004).
+ */
+      float  firstPressureLevel();
+
+//! Returns the value of the next pressure level in hPa
+/*! Original pressure values are stored in Pa, so this is
+ *  the same as 100.0*nextLevel(7004).
+ */
+      float  nextPressureLevel();
+
+//! Returns the value of the data corresponding to 'aDescriptor' on level 'aLevel'
+/*! Here 'aLevel' is given in hPa. Original pressure values are stored in Pa,
+ *  so this is the same as \n
+ * <PRE>
+ *      valueByLevel( 7004, 100.0*aLevel, aDescriptor )
+ * </PRE>
+ */
+      float  valueByPressureLevel( float aLevel, long aDescriptor );
+
+//! Returns the value of the data corresponding to 'aDescriptor' in a layer
+/*! Level values are for the top and the bottom pressure values of a layer
+ *  and they are given in hPa. \n \n
+ *  This method looks for two consecutive pressure coordinate descriptors
+ *  007004 with the given values (hPa is first converted to Pa). If such
+ *  a layer is found and the layer contains 'aDescriptor' then the corresponding
+ *  data value is returned, otherwise 'kBufrMissingValue' is returned.
+ */
+      float  valueByLayer( float firstLevel
+		         , float secondLevel
+		         , long aDescriptor );
+
+    //-- APIs for printing obs --//
+    // Section 0,1,2 and 3 just delegated to bufr class.
+
+//! Prints BUFR section 0 to output stream 'aStream'
+    boolean  printSection0(ostream &aStream = cout)
+      { return _bufrIn->printSection_012(aStream,0); }
+
+//! Prints BUFR section 1 to output stream 'aStream'
+    boolean  printSection1(ostream &aStream = cout)
+      { return _bufrIn->printSection_012(aStream,1); }
+
+//! Prints BUFR section 2 to output stream 'aStream'
+    boolean  printSection2(ostream &aStream = cout)
+      { return _bufrIn->printSection_012(aStream,2); }
+
+//! Prints BUFR section 3 to output stream 'aStream'
+    boolean  printSection3(ostream &aStream = cout)
+      { return _bufrIn->printSection(aStream,3); }
+
+//! Decode BUFR section 2 and place the result into an std::map
+    bool getDataFromSection2(map<string,string> &data)
+	{ return _bufrIn->getDataFromSection2(data); }
+
+//! Prints all data values into standard output
+/*! For output format see method 'writeAllValues' below
+ */
+    boolean  printAllValues();
+
+//! Writes all data values into output stream 'aStream'
+/*! Writes the data, one data value per line. Each line consists of:
+ *  - index of the data
+ *  - data value
+ *  - name of the data
+ *  - unit of the data, in square brackets
+ *  - the corresponding BUFR descriptor, in parenthesis
+ *
+ *  Example output (an extract from a SYNOP report): \n
+ * <PRE>
+ *       1.      10 Wmo Block Number [NUMERIC] (01001)
+ *       2.     500 Wmo Station Number [NUMERIC] (01002)
+ *       3.       1 Type Of Station [CODE TABLE 002001] (02001)
+ *       4.    2007 Year [YEAR] (04001)
+ *       5.      11 Month [MONTH] (04002)
+ *       6.       6 Day [DAY] (04003)
+ *       7.      22 Hour [HOUR] (04004)
+ *       8.       0 Minute [MINUTE] (04005)
+ *       9.   50.97 Latitude (High Accuracy) [DEGREE] (05001)
+ *      10.    6.05 Longitude (High Accuracy) [DEGREE] (06001)
+ *      11.      98 Height Of Station [M] (07001)
+ *     ...
+ * </PRE>
+ */
+    boolean  writeAllValues( ostream& aStream );
+
+//! Writes all data values into file 'aPathName'
+/*! For output format see the version of method 'writeAllValues' above
+ */
+    boolean  writeAllValues( const char* aPathName );
+
+//! Calls 'bufren' routine BUPRTBOX to write feedback data into stream 'aStream'
+    boolean  writeBufrBox( ostream& aStream = cout );
+
+    //-- APIs for accessing original section 1 and 2 headers --//
+
+//	const unsigned char*
+//	         section1Ptr(){ return (unsigned char*)(_bufrIn->Sec1->start()); }
+
+//! Returns 'true' if BUFR message contains local section 2, 'false' if not
+	bool     hasSection2(){ return _bufrIn->fSec2 != NULL; }
+
+//! Returns a pointer to the beginning of local section 2 in BUFR message
+/*! Returns 0 (NULL) if message has no local section 2
+ */
+	const unsigned char*
+	         section2Ptr(){ return _bufrIn->fTotalSec2; }
+
+    //-- APIs for accessing confidence values --//
+
+//! Checks whether the BUFR message contains confidence values or not
+/*! Returns 'true' if operator descriptor 222000 is found in the
+ *  message, otherwise 'false'.
+ */
+       bool  hasConfidences();
+
+//! Returns the confidence value for the current data, if exists
+/*! Otherwise returns -1.
+ */
+        int  confidence();
+
+//! Writes confidence values into stream 'aStream'
+       bool  writeConfidenceValues( ostream& aStream );
+
+ bool  getBufrBoxSize( int& rows, int& cols )
+                 { return _bufrIn->getBufrBoxSize( rows, cols, _subsetNr ); }
+
+     //-- Q&D: valueBySpecifier & specifierIndex made public
+     //--      so that ObsPicker can use them freely (vk/Jul)
+     double  valueBySpecifier( long   aSpecifierDescriptor
+			     , double aSpecifierValue
+		             , long   aDescriptor
+			     , int   firstIndexValue = 0 );
+     int     specifierIndex( long   aSpecifierDescriptor
+		           , double aSpecifierValue
+		           , int    firstIndexValue = 0 );
+
+#ifdef METVIEW
+//! Decodes OPERA BUFR radar data into unsigned char array
+   unsigned char* OperaRadarImage( /* <aki> add arguments? */ );
+//! Retrieves metadata for OPERA radar image
+   bool  OperaRadarMetadata( /* <aki> add arguments? */ );
+#endif
+
+ private:
+ //protected:
+    float  pressureLevel( int firstIndexValue );
+    float  level( long levelDescriptor, int firstIndexValue );
+    boolean writeValues(ostream &aStream,int first, int last);
+
+ private:
+        int  subsetOffset() const;
+
+	const unsigned char*
+	         section1Ptr(){ return (unsigned char*)(_bufrIn->Sec1->start()); }
+
+ protected:
+ 	int     _subsetNr;
+	MvBufr* _bufrIn;
+	long    _bufr_id;
+ 	int     _lastSpecifierIndex; //required???? used by who?????
+	long    _currentLevelCoordinate;
+	int     _currentLevelIndex;
+	MvBufrConfidence* _confidence;
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+//--------------------------------------------------------------- MvBufrConfidence
+// Q&D hack for QC Feed Back using descr operator 222000; vk Apr-95
+
+//! \enum ESelectFilterState Used internally by MvBufrConfidence
+enum EBufrConfState
+{
+   kBCS_unknown
+  ,kBCS_missing
+  ,kBCS_exists
+};
+
+//------------------------------------------------------------------------------
+//! Auxiliary class to handle quality control feedback
+/*! Warning: This is Q&C ("quick&dirty") hack to access
+ *  QC FB data behind operator descriptor 222000.
+ */
+class MvBufrConfidence
+{
+ public:
+          MvBufrConfidence( MvBufr* aBufr, int aSubsetNr );
+          ~MvBufrConfidence();
+
+      bool  hasConfidences();
+       int  confidence( long aDescriptor );
+       int  confidenceByIndex( int anIndex );
+       int  lastDataIndex();
+
+ protected:
+       int  startOfDataPresent();
+       int  startOfConfidences();
+       int  delta( int anIndex );
+
+ private:
+   MvBufr*  _bufr;
+   int      _subsetNr;
+   int      _startOfDataPresent;
+   int      _startOfConfidences;
+   EBufrConfState _state;
+};
+#endif
+
+
+#endif
+// MvBufrObs_DEFINED
diff --git a/src/libMetview/MvDate.cc b/src/libMetview/MvDate.cc
new file mode 100644
index 0000000..a2c5fea
--- /dev/null
+++ b/src/libMetview/MvDate.cc
@@ -0,0 +1,507 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "MvApplication.h"
+#include "MvDate.h"
+
+const char *MvDate::stringFormat = "yyyy-mm-dd HH:MM:SS";
+const char *MvDate::numberFormat = "yyyymmdd";
+
+const double cSecEpsilon = 0.000001157; //-- 0.1 sec
+
+const char *_month[12][2] = {
+	{ "Jan","January",},
+	{ "Feb","February",},
+	{ "Mar","March",},
+	{ "Apr","April",},
+	{ "May","May",},
+	{ "Jun","June",},
+	{ "Jul","July",},
+	{ "Aug","August",},
+	{ "Sep","September",},
+	{ "Oct","October",},
+	{ "Nov","November",},
+	{ "Dec","December",},
+};
+
+const char *_day[7][2] = {
+	{ "Mon", "Monday", },
+	{ "Tue", "Tuesday", },
+	{ "Wed", "Wednesday", },
+	{ "Thu", "Thursday", },
+	{ "Fri", "Friday", },
+	{ "Sat", "Saturday", },
+	{ "Sun", "Sunday", },
+};
+
+
+//============================================================================
+
+int MvDate::Julian() const {
+	MvDate jan1(Year()*10000 + 100 + 1);
+	return (int)(*this - jan1 + 1);
+}
+
+static request *pref()
+{
+	static request *p = 0;
+	static MvRequest r;  // declare locally to avoid the destructor removing it
+
+	if(p == 0)
+	{
+		r = MvApplication::getPreferences();
+		p = r;
+	}
+	return p;
+}
+
+const char *MvDate::MonthName(int n, boolean full)
+{
+	request *p = pref();
+	const char *s = get_value(p,
+		full?"MONTH_LONG_NAMES":"MONTH_SHORT_NAMES",n-1);
+	return s?s:_month[n-1][int(full)];
+}
+
+const char *MvDate::DayName(int n, boolean full)
+{
+	request *p = pref();
+	const char *s = get_value(p,full?"DAY_LONG_NAMES":"DAY_SHORT_NAMES",n-1);
+	return s?s:_day[n-1][int(full)];
+}
+
+const char *MvDate::StringFormat(void)
+{
+	request *p = pref();
+	const char *s = no_quotes(get_value(p,"STRING_DATE_FORMAT",0));
+	return s?s:stringFormat;
+}
+
+const char *MvDate::NumberFormat(void)
+{
+	request *p = pref();
+	const char    *s = no_quotes(get_value(p,"NUMBER_DATE_FORMAT",0));
+	return s?s:numberFormat;
+}
+
+void MvDate::Print() const
+{
+	char buf[1024];
+	Format(StringFormat(),buf);
+    cout << buf ;
+}
+
+
+MvDate::MvDate(double n)
+{
+	julian   = (long)n;
+	double s = n - (double)julian;
+
+	if( s < 0.0 )
+	  { //-- 'n' is a negative decimal value; decimal part thus
+	    //-- protrudes into the previous julian day; also we need
+	    //-- to "reverse" decimal part, e.g.: -1.25 => -2 + 0.75
+	    julian--;
+	    second = (long)( (1.0 - (-s) + cSecEpsilon) * 86400.0 );
+	  }
+	else
+	  { //-- 'n' is an integer, or a positive decimal value
+	    second = (long)((n-julian+cSecEpsilon)*86400.0);
+	  }
+
+	julian = date_to_julian(julian);
+
+	while(second < 0)     { second += 86400; julian++; }
+	while(second > 86399) { second -= 86400; julian--; }
+}
+
+MvDate::MvDate(const char *s)
+ : second( 0 )
+{
+	if( isdate( s ) )
+	{
+		boolean dum;
+		parsedate(s,&julian,&second,&dum);
+	}
+	else
+	{
+		julian = atol( s );
+		julian = date_to_julian(julian);
+	}
+}
+
+
+MvDate& MvDate::operator+=(double n)
+{
+	long j = (long)n;
+	long s = (long)((n - j)*86400.0);
+
+	julian = julian +j;
+	second = second +s;
+
+	while(second < 0)     { second += 86400; julian--; }
+	while(second > 86399) { second -= 86400; julian++; }
+
+	return *this;
+}
+
+MvDate& MvDate::operator-=(double n)
+{
+	return operator+=(-n);
+}
+
+MvDate MvDate::operator+(double n) const
+{
+	MvDate date;
+	double secEps = n < 0.0 ? -cSecEpsilon : cSecEpsilon;
+
+	long j = (long)n;
+	long s = (long)(((n - (double)j) + secEps)*86400.0);
+
+	date.julian = julian +j;
+	date.second = second +s;
+
+	while(date.second < 0)     { date.second += 86400; date.julian--; }
+	while(date.second > 86399) { date.second -= 86400; date.julian++; }
+
+	return date;
+}
+
+MvDate MvDate::operator-(double n) const
+{
+	double m = -n;
+	return operator+(m);
+}
+
+double MvDate::operator-(const MvDate& d) const
+{
+	return (double)(julian - d.julian) + (double)(second - d.second)/86400.0;
+}
+
+double MvDate::YyyyMmDd_r() const
+{
+	double d1 = ( ((double)Hour()*60. + (double)Minute()) * 60. ) / 86400.;
+
+	return (double)YyyyMmDd() + d1;
+}
+
+//=============================================================================
+
+static int collect(const char* &f,char *buf,int& i,char &c)
+{
+	int n;
+	c = 0;
+	while(*f)
+	switch(*f)
+	{
+		case 'y':
+		case 'm':
+		case 'd':
+		case 'D':
+		case 'H':
+		case 'M':
+		case 'S':
+			c = *f;
+			n = 1;
+			while(*++f == c) n++;
+			return n;
+			// break;
+
+		default:
+			buf[i++] = *f++;
+			break;
+	}
+	return -1;
+}
+
+static void copy(char *buf,int& i,int n,char c)
+{
+	for(int j= 0;j<n;j++)
+		buf[i++] = c;
+}
+
+static void copy(char *buf,int& i,const char *f,int n)
+{
+	char tmp[20];
+	char *p = tmp;
+
+	sprintf(tmp,f,n);
+
+	while(*p) buf[i++] = *p++;
+}
+
+static void copy(char *buf,int& i,const char *p)
+{
+	while(*p) buf[i++] = *p++;
+}
+
+void MvDate::Format(const char *f,char *buf) const
+{
+	int  i = 0;
+	char c = 0;
+
+	for(;;)
+	{
+		int n = collect(f,buf,i,c);
+		switch(c)
+		{
+			case 'y':
+					switch(n)
+					{
+						case 2:
+							copy(buf,i,"%02d",Year() % 100);
+							break;
+
+						case 4:
+							copy(buf,i,"%04d",Year());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'm':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Month());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Month());
+							break;
+
+						case 3:
+							copy(buf,i,MonthName(Month(),false));
+							break;
+
+						case 4:
+							copy(buf,i,MonthName(Month(),true));
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'd':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Day());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Day());
+							break;
+
+						case 3:
+							copy(buf,i,DayName(DayOfWeek(),false));
+							break;
+
+						case 4:
+							copy(buf,i,DayName(DayOfWeek(),true));
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'D':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Julian());
+							break;
+
+						case 3:
+							copy(buf,i,"%03d",Julian());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'H':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Hour());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Hour());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'M':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Minute());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Minute());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+			case 'S':
+					switch(n)
+					{
+						case 1:
+							copy(buf,i,"%d",Second());
+							break;
+
+						case 2:
+							copy(buf,i,"%02d",Second());
+							break;
+
+						default:
+							copy(buf,i,n,c);
+							break;
+					}
+				break;
+
+		}
+
+		if(n < 0 ) break;
+
+	}
+
+	buf[i] = 0;
+
+}
+
+double MvDate::time_interval_days( const MvDate& d ) const
+{
+  return (double)(d.julian-julian) + (double)(d.second-second)/86400.0;
+}
+
+double MvDate::time_interval_hours( const MvDate& d ) const
+{
+  return time_interval_days(d) * 24.0;
+}
+
+double MvDate::time_interval_mins( const MvDate& d ) const
+{
+  return time_interval_hours(d) * 60.0;
+}
+
+
+//=============================================================================
+// Magics style dates.
+
+int MvDate::daysInMonth() const
+{
+	MvDate d1(Year()*10000+Month()*100+1);
+	MvDate d2 = d1 + 31;
+	MvDate d3(d2.Year()*10000+d2.Month()*100+1);
+	return (int)(d3-d1);
+}
+
+MvDate MvDate::magicsAdd(long n) const
+{
+	int yyyy = Year();
+	int mm   = Month() + n/10000;
+	int dd   = Day()   + (n/100)%100;
+	int MM   = Minute();
+	int SS   = Second();
+	int HH   = Hour()  + n%100;
+
+	return MvDate(yyyy*10000+mm*100+dd+(HH*3600+MM*60+SS)/86400.0);
+}
+
+//-- It seems that the old code of 'magicsSub' has some bugs;
+//-- to get the fixed code, set MvMAGSUBFIX to 1
+#define MvMAGSUBFIX 1
+//-- If the fix turns out to be wrong, then
+//-- to get the old code, set MvMAGSUBFIX to 0
+
+long MvDate::magicsSub(const MvDate& d) const
+{
+	MvDate d1 = *this;
+	MvDate d2 = d;
+	double x  = d1-d2;
+
+	if(x<0)
+	{
+		x = -x;
+		MvDate d = d1;
+		d1 = d2;
+		d2 = d;
+	}
+
+	int dd = int(x);
+#if MvMAGSUBFIX
+	int HH = int( ( x - double(dd) ) * 24.0 );
+#else
+	int HH = int(x*24)%100;
+#endif
+	int mm = 0;
+
+#if MvMAGSUBFIX
+	while( dd > d2.daysInMonth() )
+#else
+	while(dd>=100)
+#endif
+	{
+		int z = d2.daysInMonth();
+		dd -= z;
+		d2 += z;
+		mm++;
+	}
+
+	return mm*10000+dd*100+HH;
+}
+
+int MvDate::hhmmss(void) const
+{
+	return Hour() * 10000 + Minute() * 100 + Second();
+}
+
+int MvDate::yyyyddd(void) const
+{
+	return Year() * 1000 + Julian();
+}
+
+string
+MvDate::magicsDate() const
+{
+   static char buf[32];
+   Format("yyyy-mm-dd HH:MM",buf);
+   return string(buf);
+}
+
+ostream& operator<< ( ostream& aStream, const MvDate& d )
+{
+   char buf[512];
+   d.Format( d.StringFormat(), buf );
+   aStream << buf;
+   return aStream;
+}
+
diff --git a/src/libMetview/MvDate.h b/src/libMetview/MvDate.h
new file mode 100644
index 0000000..e3035c1
--- /dev/null
+++ b/src/libMetview/MvDate.h
@@ -0,0 +1,313 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _H_MvDATE_
+#define _H_MvDATE_
+
+#include "mars.h"
+#include "inc_iostream.h"
+#include <string>
+using std::string;
+
+//! Class to handle dates and times
+/*! This class stores the date as a Julian day (where the reference day #0
+ *  is Monday 01 January 4713 BCE). The time part is stored as seconds since
+ *  midnight.
+ *  The class contains methods, among others, to compare or increase or decrease
+ *  dates, extract different date and time components, and format for printing.\n \n
+ *  \b Customisable \n
+ *  Non-numeric date information (short and full month names, short and full
+ *  weekday names), as well as the default date formats, are user customisable
+ *  through Metview Preferences menu item.
+ *  This makes it very easy for non-English users to translate these texts
+ *  into their own language and to customise the default date format to their
+ *  own date writing standard (or for USA users to use their weird notation
+ *  of swapped month and day ;-).\n
+ *  For the time part, only formats for 24 hour clock have been implemented,
+ *  i.e. it is not possible to customise hours to be formatted like "6pm" or "10AM".\n \n
+ *  \b Reference: \n
+ *  Collected Algorithms from CACM.\n
+ *  Algorithm #199 - "Conversions between Calendar Date and Julian Day Number"
+ */
+
+class MvDate {
+	//! Friend function to write MvDate objects
+	/*! The format is taken from user's Metview Preferences.
+	 *  The default in Metview is ISO 8601 standard date and time format.
+	 */
+	friend ostream& operator<< ( ostream& aStream, const MvDate& dd );
+
+static const char *stringFormat;
+static const char *numberFormat;
+
+	long julian;
+	long second;
+
+	//! Internal comparision function
+	int compare(const MvDate& d) const
+		{ return julian!=d.julian?julian-d.julian:second-d.second;};
+public:
+	//! Constructor; by default sets today's date at 00UTC
+	/*! Negative values can be used to indicate a relative date.
+	 *  By default relative days are relative to today, unless
+	 *  environment variable \c MARS_REFERENCE_DATE has been set.\n \n
+	 *  The desimal part is interpreted as a fraction of a day (of 24 hours),
+	 *  thus 0.25 indicates 06 utc and 0.875 indicates 21 utc.\n \n
+	 *  NOTE that there is no validity test for the syntax and
+	 *  some clearly invalid values are converted to valid dates,
+	 *  for example \c 20081535 becomes 2009-04-06!
+	 */
+	MvDate(double n = 0);
+
+	//! Copy constructor
+	MvDate(const MvDate& d) { julian = d.julian; second = d.second;   };
+
+	//! Constructor from a string
+	/*! If \c dd has a valid date syntax, the constructor
+	 *  parses \c dd into the internal presentation.
+	 *  Otherwise first converts \c dd into an integer which
+	 *  is then interpreted as a date.\n \n
+	 *  NOTE that there is no validity test for the syntax and
+	 *  some clearly invalid values are converted to valid dates,
+	 *  for example "2008-15-35" becomes 2009-04-06!
+	 */
+	MvDate(const char* dd);
+
+	//! Assignment operator
+	MvDate& operator=(const MvDate& d) { julian = d.julian; second = d.second; return *this; }
+
+	//! Returns the internal Julian day number (days since 01 January 4713 BCE)
+	long _julian() const { return julian; };
+
+	//! Returns the internal time of the day, in seconds since midnight
+	long _second() const { return second; };
+
+	//! Decreases the date/time
+	/*! The integer part of \c ddtt represents days and the decimal part
+	 *  is for hours and minutes (as a fraction of 24 hours). Thus the value
+	 *  of \c 1.75 as an operand would "subtract" one day and 18 hours
+	 *  from the operand MvDate object.\n \n
+	 *  Example:\n
+	 *  <PRE>
+	 *     MvDate d;            //-- today at 00 utc
+	 *     MvDate x = d - 1.75; //-- day before yesterday at 06 utc
+	 *  </PRE>
+	 */
+	MvDate   operator-(double ddtt)const ;
+
+	//! Increases the date/time
+	/*! The integer part of \c ddtt represents days and the decimal part
+	 *  is for hours and minutes (as a fraction of a day). Thus the value
+	 *  of \c 1.25 as an argument would "add" one day and 6 hours
+	 *  to the operand MvDate object.
+	 */
+	MvDate   operator+(double ddtt)const ;
+
+	//! Increases the current date/time
+	/*! Example:\n
+	 *  <PRE>
+	 *     MvDate d(0);   //-- today at 00 utc
+	 *     d += 1.125;    //-- tomorrow at 03 utc
+	 *  </PRE>
+	 */
+	MvDate&  operator+=(double ddtt);
+
+	//! Decreases the current date/time
+	MvDate&  operator-=(double ddtt);
+
+	//! Returns the time difference between two MvDate objects
+	/*! The integer part of the returned value represents days
+	 *  and the decimal part represents the fraction of a day
+	 */
+	double operator-(const MvDate& )const ;
+
+	//! 'Greater-than' comparison operator
+	bool  operator>(const MvDate& d)const   { return compare(d) >  0; };
+
+	//! 'Less-than' comparison operator
+	bool  operator<(const MvDate& d)const   { return compare(d) <  0; };
+
+	//! 'Greater-or-equal' comparison operator
+	bool  operator>=(const MvDate& d)const  { return compare(d) >= 0; };
+
+	//! 'Less-or-equal' comparison operator
+	bool  operator<=(const MvDate& d)const  { return compare(d) <= 0; };
+
+	//! 'Equal' comparison operator
+	bool  operator==(const MvDate& d)const  { return compare(d) == 0; };
+
+	//! 'Non-equal' comparison operator
+	bool  operator!=(const MvDate& d)const  { return compare(d) != 0; };
+
+	//! "C" style print method for standard output
+	/*! Use "C++" style friend operator<<() for chaining several output
+	 *  objects or for writing to any stream
+	 */
+	void Print() const;
+
+	//! Returns the date part as an integer YYMMDD
+	/*! WARNING: two digit year!
+	 */
+	int  YyMmDd(void) const         { return julian_to_date(julian,false); }
+
+	//! Returns the date part as an integer YYYYMMDD
+	int  YyyyMmDd(void)  const      { return julian_to_date(julian,true); }
+
+	//! Returns the date part as an integer YYYYddd
+	/*! Digits \c ddd represent the running day (Julian) of the year
+	 */
+	int  yyyyddd(void)  const ;
+
+	//! Returns the year part of the date
+	int  Year(void)  const     { return YyyyMmDd() / 10000;       };
+
+	//! Returns the month part of the date
+	int  Month(void)  const    { return (YyyyMmDd() / 100) % 100; };
+
+	//! Returns the day part of the date
+	int  Day(void)   const     { return YyyyMmDd() % 100;         };
+
+	//! Returns the hour part of the time
+	int  Hour(void)  const     { return second / 3600;            };
+
+	//! Returns the minutes part of the time
+	int  Minute(void)  const   { return (second / 60) %60;        };
+
+	//! Returns the seconds part of the time
+	int  Second(void)  const   { return second % 60;              };
+
+	//! Returns the time as an integer HHMMSS
+	int  hhmmss()        const;
+
+	//! Returns the Julian day within the year of MvDate
+	int  Julian(void) const;
+
+	//! Returns the day of the week: 1=Monday, 7=Sunday
+	int  DayOfWeek(void) const { return julian % 7 + 1;           };
+
+	//! Creates a custom formatted date/time text string
+	/*! Argument \c fmt defines the format and \c buf is the target character array.
+	 *  Recognised format letter combinations are:
+	 *  <PRE>
+	 *     yy   - year with 2 digits
+	 *     yyyy - year with 4 digits
+	 *     m    - month with minimum digits
+	 *     mm   - month with 2 digits
+	 *     mmm  - short month name (user customisable)
+	 *     mmmm - full month name (user customisable)
+	 *     d    - day of the month with minimum digits
+	 *     dd   - day of the month with 2 digits
+	 *     ddd  - short weekday name (user customisable)
+	 *     dddd - full weekday name (user customisable)
+	 *     D    - Julian day with minimum digits
+	 *     DDD  - Julian day with 3 digits
+	 *     H    - hour with minimum digits (24 hour clock)
+	 *     HH   - hour with 2 digits (24 hour clock)
+	 *     M    - minutes with minimum digits
+	 *     MM   - minutes with 2 digits
+	 *     S    - seconds with minimum digits
+	 *     SS   - seconds with 2 digits
+	 *  </PRE> All other characters are used as is. Users can customise
+	 *  month and weekday names through Metview User Interface.\n
+	 *  Here are some (non-customised) examples:
+	 *  <PRE>
+	 *    MvDate d(20080105.375);
+	 *    std::cout << d << std::endl;   //-- 2008-01-05 09:00:00
+	 *
+	 *    char buf[100];
+	 *    d.Format("d mmm yyyy at H:M", buf);
+	 *    std::cout << buf << std::endl; //-- 5 Jan 2008 at 9:0
+	 *
+	 *    d.Format("d/m/yy - yymmdd:HH", buf);
+	 *    std::cout << buf << std::endl; //-- 5/1/08 - 080105:09
+	 *
+	 *    d.Format("dd/mm/yyyy @ HH:MM", buf);
+	 *    std::cout << buf << std::endl; //-- 05/01/2008 @ 09:00
+	 *
+	 *    d.Format("dddd d mmmm yyyy", buf);
+	 *    std::cout << buf << std::endl; //-- Saturday 5 January 2008
+	 *  </PRE>
+	 */
+	void Format(const char* fmt, char* buf) const;
+
+	//! Returns the number of days of the month in the current object
+	int  daysInMonth() const;
+
+	//! Subtracts date \c dd from the current object
+	/*! The returned value is an integer of the form \c mmddHH
+	 *  where \c mm is for months, \c dd for days, and \c HH for hours.
+	 *  Thus returned value \c 1506 indicates a difference of \c 0
+	 *  months, \c 15 days and \c 6 hours.
+	 */
+	long   magicsSub(const MvDate& dd) const;
+
+	//! Advances the current object date/time
+	/*! The argument \c mmddHH is an integer, as described
+	 *  for the return value from method magicsSub()
+	 */
+	MvDate magicsAdd(long mmddHH) const;
+
+	//! Returns the date formatted as "yyyy-mm-dd HH:MM", suitable for Magics 6
+	/*! See Format()
+	 */
+        string magicsDate() const;
+
+	//! Returns the date formatted as "yyyymmdd.f"
+	/*! Where \c .f is a fraction of a day (of 24 hours)
+	 */
+	double YyyyMmDd_r() const;
+
+	//! Returns the time difference between \c dd and the current object, in days
+	/*! The decimal part will represent a fraction of a day (of 24 hours),
+	 *  i.e. 3.25 would represent 3 days and 6 hours
+	 */
+	double time_interval_days( const MvDate& dd ) const;
+
+	//! Returns the time difference between \c dd and the current object, in hours
+	/*! The decimal part will represent a fraction of an hour (of 60 minutes)
+	 *  i.e. 3.25 would represent 3 hours and 15 minutes
+	 */
+	double time_interval_hours( const MvDate& dd ) const;
+
+	//! Returns the time difference between \c dd and the current object, in minutes
+	/*! The decimal part will represent a fraction of a minute (of 60 seconds)
+	 *  i.e. 3.2 would represent 3 minutes and 12 seconds
+	 */
+	double time_interval_mins( const MvDate& dd ) const;
+
+	//! Returns the default format string for text output
+	/*! The default format string is taken from user's Preferences
+	 *  and thus different users can have different defaults.
+	 */
+	static const char *StringFormat() ;
+
+	//! Returns the default format string for numeric output
+	/*! The default format string is taken from user's Preferences
+	 *  and thus different users can have different defaults.
+	 */
+	static const char *NumberFormat();
+
+	//! Returns the name of the month \c mm (\c mm = 1...12)
+	/*! If \c full is \c true, then the full name is returned,
+	 *  otherwise the short name is returned.
+	 *  The name is taken from user's Preferences
+	 *  and thus different users can have different defaults.
+	 */
+	static const char *MonthName(int mm, boolean full);
+
+	//! Returns the name of the day \c dd (\c dd = 1...7)
+	/*! If \c full is \c true, then the full name is returned,
+	 *  otherwise the short name is returned.
+	 *  The name is taken from user's Preferences
+	 *  and thus different users can have different defaults.
+	 */
+	static const char *DayName(int dd, boolean full);
+
+};
+#endif
diff --git a/src/libMetview/MvDebugPrintControl.cc b/src/libMetview/MvDebugPrintControl.cc
new file mode 100644
index 0000000..f5c0e02
--- /dev/null
+++ b/src/libMetview/MvDebugPrintControl.cc
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- MvDebugPrintControl.cc                       Jan04/vk
+//
+//  This function should be used to allow external control
+//  over the amount of information that Metview modules
+//  print for development purposes and/or into log files.
+//
+//  NOTE 041012: you can as well test 'mars.debug' before
+//               printing, or 'mars.info' if appropriate.
+//               Or even 'mars.warning'!
+//
+//  Usage:
+//
+//    //if( mvDebugPrint() ) //-- semi-obsolete
+//    if( mars.debug )
+//    {
+//       cout << "bla bla bla..." << endl;
+//       myRequest.print();
+//       // cerr << "an error..."   // NO! Always show error msgs!!
+//    }
+//
+
+
+#include <stdlib.h>
+#include "MvDebugPrintControl.h"
+#include "mars.h"
+
+
+bool mvDebugPrint()
+{
+
+  if( getenv("MV_DEBUG_PRINT") )
+    {
+      return atoi( getenv("MV_DEBUG_PRINT") ) != 0;
+    }
+
+  return false;
+
+}
+
+
+void mvSetMarslogLevel()
+{
+  const char* myEnv = getenv("MV_QLOG");   //-- "quiet log" - only errors!
+
+  if( myEnv && strcmp(myEnv,"yes")==0 )
+    {
+      mars.debug   = false;
+      mars.info    = false;
+      mars.warning = false;
+    }
+}
+
+
+
+
+
+
+
+
diff --git a/src/libMetview/MvDebugPrintControl.h b/src/libMetview/MvDebugPrintControl.h
new file mode 100644
index 0000000..a0b59c7
--- /dev/null
+++ b/src/libMetview/MvDebugPrintControl.h
@@ -0,0 +1,14 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//-- MvDebugPrintControl.h                       Jan04/vk
+
+bool mvDebugPrint();
+
+void mvSetMarslogLevel();
diff --git a/src/libMetview/MvFieldSet.cc b/src/libMetview/MvFieldSet.cc
new file mode 100644
index 0000000..468825c
--- /dev/null
+++ b/src/libMetview/MvFieldSet.cc
@@ -0,0 +1,2029 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#include <float.h>
+#include <math.h>
+#include <assert.h>
+
+#include "Metview.h"
+#include "MvGrid.h"
+#include "MvException.h"
+
+
+const bool cReleaseMemoryFalse = false;
+const bool cReleaseMemoryTrue  = true;
+const bool cReleaseMemoryFlag  = cReleaseMemoryTrue;
+
+
+const bool cExpandGridFalse = false;
+const bool cExpandGridTrue  = true;
+
+
+const double cGridEpsilon    = 5e-5;    //-- 0.05 millidegrees
+const double cFullGlobeLimit = 359.9;
+
+const double cCDR = atan(1.0)/45.0; //-- conversion factor Degrees->Radians
+                                  //-- atan(1)/45 = (PI/4)/45 = PI/180
+
+//
+//  A single function to maintain:
+//  -----------------------------
+//   Function 'interpolateValue' is to replace 'interpolate'
+//   in ./Macro/bufr.cc' (which has not been updated) and
+//   'MvField::interpolateAt' (which has been updated several
+//   times).  Rewritten 971212/vk.
+//
+
+//   Current implementation functions only with lat/long grids.
+//   Allowed scanning modes:
+//      - i direction increments from west to east only,
+//      - j-direction increment may be either way
+
+//   New general implementation in MvGrid.cc (lat-lon grids
+//   still use this external function).           010821/vk
+
+//   Moved inside MvLatLonGrid class in MvGrid.cc, 011025/vk
+
+#if 0
+
+double interpolateValue( field* Grib, double lat, double lon )
+{
+ //---
+ //-- get GRIB field parameters
+ //-
+
+  cout << "INFO: calling obsolete function interpolateValue(), relinking needed!!!!" << endl;
+
+   if( ( Grib->ksec2[0] != 0 ) &&       //-- Data Representation, GRIB Table 6
+       ( Grib->ksec2[0] != 10 ) )       //-- for rotated: use rotated coords!
+     {
+       return DBL_MAX;
+     }
+
+   int ipoints = (int) Grib->ksec2[1];  //-- number of points along parallel
+   int jpoints = (int) Grib->ksec2[2];  //-- number of points along meridian
+
+   double lat1 = Grib->ksec2[3]/1000.;  //-- latitude of the first grid point
+   double lon1 = Grib->ksec2[4]/1000.;  //-- longitude of the first grid point
+   double lat9 = Grib->ksec2[6]/1000.;  //-- latitude of the last grid point
+   double lon9 = Grib->ksec2[7]/1000.;  //-- longitude of the last grid point
+
+ //---
+ //-- Normalize longitudes to minimum positive range
+ //-
+   if( lon1 > lon9 )      //-- lon9 in western and >180, lon9 in eastern globe
+      lon1 -= 360;
+
+   while( lon1 < 0 )      //-- force longitudes >= 0
+   {
+      lon1 += 360.;
+      lon9 += 360.;
+   }
+   while( lon < lon1 )
+      lon += 360.;        //-- now point is either inside or above!
+
+   if( lat1 > lat9 )      //-- prefer lat1=southern, lat9=northern
+   {
+      double tmp = lat1; lat1 = lat9; lat9 = tmp;
+   }
+
+ //---
+ //-- Get and check increment values
+ //-
+   double ires  = Grib->ksec2[8]/1000.; //-- i direction increment
+   double ires2 = (lon9-lon1)/(ipoints-1.0);
+   if( fabs( ires-ires2 ) > cGridEpsilon )
+     {
+       cout << "use computed i increment: " << ires2 << ", not " << ires << endl;
+       ires = ires2;
+     }
+
+   double jres  = Grib->ksec2[9]/1000.; //-- j direction increment
+   double jres2 = (lat9-lat1)/(jpoints-1.0);
+   if( fabs( jres-jres2 ) > cGridEpsilon )
+     {
+       cout << "use computed j increment: " << jres2 << ", not " << jres << endl;
+       jres = jres2;
+     }
+
+   if( Grib->ksec2[5] == 0 )            //-- direction increments not given?
+   {
+      return DBL_MAX;                   //-- if ocean field then no interpolation!
+   }
+
+   int scanning_mode = (int) Grib->ksec2[10]; //-- see GRIB Table 8
+   switch( scanning_mode )
+   {
+     case 0:              //-- 00000000: +i -j directions (north->south)
+        jres = -jres;
+        break;
+     case 64:             //-- 01000000: +i +j directions (south->north)
+        break;
+     default:             //-- others not implemented!
+        return DBL_MAX;
+   }
+
+ //---
+ //-- Check if the point is outside grid
+ //-
+   char  globe = ipoints*ires > cFullGlobeLimit ? 'y' : 'n';
+
+   if( globe == 'n' && ( lon < lon1 || lon > lon9 ) )
+      return DBL_MAX;
+
+   if( lat < lat1 || lat > lat9 )
+      return DBL_MAX;
+
+ //---
+ //-- Let's find surrounding grid points
+ //-
+   int  ix1 = int((lon-lon1)/ires); //-- index for column on the east
+   int  ix2 = ix1 + 1;              //-- index for column on the west
+
+   if( ix2 > (ipoints-1) )
+   {
+      if( globe == 'y' )
+         ix2 = 0;                   //-- wrap around globe
+      else
+         ix2 = ix1;                 //-- possible if lon==lon9 (east boundary)
+   }
+
+   //-- start either from north or from south depending on scanning mode --
+   int  iy1 = int( ( lat - ( jres < 0 ? lat9 : lat1 ) ) / jres );
+   int  iy2 = iy1 + 1;
+
+   if( iy2 > (jpoints-1) )
+      iy2 = iy1;                    //-- possible at "higher" boarder
+
+ //---
+ //-- Get and check grid point values
+ //-
+   double  grid_11 = Grib->rsec4[ipoints*iy1+ix1];
+   double  grid_12 = Grib->rsec4[ipoints*iy1+ix2];
+   double  grid_21 = Grib->rsec4[ipoints*iy2+ix1];
+   double  grid_22 = Grib->rsec4[ipoints*iy2+ix2];
+
+   if( grid_11 == mars.grib_missing_value ||
+       grid_12 == mars.grib_missing_value ||
+       grid_21 == mars.grib_missing_value ||
+       grid_22 == mars.grib_missing_value    )
+   {
+      return DBL_MAX;
+   }
+
+ //---
+ //-- Interpolate
+ //-
+   double  lon_ix1 = lon1 + ix1*ires;
+   double  lat_iy1 = ( jres < 0 ? lat9 : lat1 ) + iy1*jres;
+
+   double w1   = (lon - lon_ix1)/ires;
+   double w2   = 1. - w1;
+   //double val1 = w2*Grib->rsec4[ipoints*iy1+ix1] + w1*Grib->rsec4[ipoints*iy1+ix2];
+   //double val2 = w2*Grib->rsec4[ipoints*iy2+ix1] + w1*Grib->rsec4[ipoints*iy2+ix2];
+   double val1 = w2*grid_11 + w1*grid_12;
+   double val2 = w2*grid_21 + w1*grid_22;
+
+   w1 = ( lat - lat_iy1 )/jres;
+   w2 = 1. - w1;
+   return val1*w2 + val2*w1;
+}
+#endif
+
+//==========================================================================
+
+#if 0
+static int inbox(double lon,double lat,double n,double w,double s,double e)
+{
+    if(lat > n || lat < s) return 0;
+
+    while(e   > w + 360.0) e   -= 360.0; while(e   < w) e   += 360.0;
+    while(lon > w + 360.0) lon -= 360.0; while(lon < w) lon += 360.0;
+
+    if(lon > e || lon < w) return 0;
+
+    return 1;
+}
+#endif
+
+//==========================================================================
+
+void MvFieldSet::_init()
+{
+	if(!Fs)
+	    Fs = new_fieldset(0); // Make sure we have something
+	Writable = false;
+
+	Fields = new MvField* [Fs->count];
+
+	for(int i = 0; i < Fs->count ; i++)
+	{
+	    Fields[i] = new MvField;
+	    Fields[i]->set_libmars_field( Fs->fields[i] );
+	}
+	Fs->refcnt++;
+}
+
+MvFieldSet::MvFieldSet(const char *file)
+{
+	Fs = read_fieldset(file,NULL);
+	_init();
+}
+
+MvFieldSet::MvFieldSet(const MvRequest& r)
+{
+	Fs = request_to_fieldset(r);
+	_init();
+}
+
+MvFieldSet::MvFieldSet()
+{
+	Fs = new_fieldset(0);
+	_init();
+}
+
+void MvFieldSet::_clean()
+{
+  	int fs_count = Fs->count;
+	Fs->refcnt--;
+	if(Fs->refcnt == 0)
+	   free_fieldset(Fs);
+	for( int i=0; i < fs_count; ++ i )
+	   delete Fields[i];
+	delete [] Fields;
+	Writable = false;
+
+}
+
+MvFieldSet::~MvFieldSet()
+{
+	_clean();
+}
+
+int MvFieldSet::countFields()
+{
+	return Fs->count;
+}
+
+//MvRequest MvFieldSet::getRequest( bool clone ) //original had an unused argument
+MvRequest MvFieldSet::getRequest()
+{
+     return MvRequest( fieldset_to_request(Fs), false ); //-- clone );
+}
+
+MvField& MvFieldSet::operator[](int n)
+{
+	// Force consruction of request, could be somewhere else ...
+
+	Fields[n]->getRequest();
+
+	return *(Fields[n]);
+}
+
+void MvFieldSet::_copy(const MvFieldSet& f)
+{
+	if(f.Writable)
+		Fs = copy_fieldset(f.Fs,f.Fs->count,true);
+	else
+		Fs = f.Fs;
+	save_fieldset(Fs);
+}
+
+MvFieldSet::MvFieldSet(const MvFieldSet& f)
+{
+	_copy(f);
+	_init();
+}
+
+void MvFieldSet::operator=(const MvFieldSet& f)
+{
+	_clean();
+	_copy(f);
+	_init();
+}
+
+void MvFieldSet::operator+=(const MvField& f)
+{
+//	MvFieldExpander expand(f);
+	add_field(Fs,copy_field(f.libmars_field(),true));
+
+	//-- add new field also to 'Fields'
+	int cnt = Fs->count;
+	MvField** tmp = new MvField* [cnt];
+
+	for(int i = 0; i < cnt-1 ; i++)  //-- copy existing pointers
+	    tmp[i] = Fields[i];
+
+	tmp[cnt-1] = new MvField;
+	tmp[cnt-1]->set_libmars_field( Fs->fields[cnt-1] );
+
+	delete [] Fields;
+
+	Fields = tmp;
+}
+
+//==========================================================================
+//
+
+MvFieldSetIterator::MvFieldSetIterator(MvFieldSet& fs)
+{
+	FieldSet = &fs;
+	Count    = fs.countFields();
+	Current  = 0;
+	Order    = new int[Count];
+
+	for(int i=0; i<Count;i++)
+		Order[i] = i;
+}
+
+MvField& MvFieldSetIterator::operator()()
+{
+	static MvField EmptyField; // Grib is NULL by default
+	MvField *Match = NULL;
+
+	if(Current >= Count) return EmptyField;
+
+	if(Filter)
+	{
+		do
+		{
+			MvField   *f = &((*FieldSet)[Order[Current++]]);
+			MvRequest  r = f->getRequest();
+
+			if(Filter(r))
+				return *f;
+
+		} while (Current<Count && Match == NULL);
+
+		return EmptyField; // if there is no match
+	}
+
+	return (*FieldSet)[Order[Current++]];
+}
+
+// Do a insertion sort, so the relative order is saved
+
+void MvFieldSetIterator::sort(const char* parm, char order)
+{
+	int down = (order == '>');
+	double cmp,valp1;
+	int i = 0;
+	int isdat,isnum;
+	long save = expand_flags(0); // So MvDate work..
+
+	while(i<Count-1)
+	{
+		MvField&   f1      = (*FieldSet)[Order[i]];
+		MvRequest& r1      = f1.getRequest();
+		const char *p1     = get_value(r1,parm,0);
+		if(p1 == NULL) p1 = "";
+
+		// This test is necessary to prevent infinit looping.
+		// EXPVER can be number and strings (e.g. if first field
+		// has EXPVER=18 and second field has EXPVER=e76j then
+		// 'i' will never be incremented).
+		if (strcmp(parm,"EXPVER") == 0)
+		{
+			isdat = isnum = 0;
+		}
+		else
+		{
+			isdat = isdate(p1);
+			isnum = is_number(p1);
+			valp1 = atof(p1);
+		}
+
+		MvDate datp1( isdat ? p1 : "0" ); //-- prevent Y2K warnings on non-dates
+
+		int j = i;
+		do
+		{
+			j++;
+
+			MvField&   f2     = (*FieldSet)[Order[j]];
+			MvRequest& r2     = f2.getRequest();
+			const char *p2    = get_value(r2,parm,0);
+			if(p2 == NULL) p2 = "";
+
+			if(isdat)
+				cmp = datp1-MvDate(p2);
+			else if(isnum)
+				cmp = valp1-atof(p2);
+			else
+				cmp = strcmp(p1,p2);
+			if (down) cmp = -cmp;
+
+		} while(cmp <= 0 && j < Count - 1);
+
+		if(cmp > 0)
+		{
+			int x = Order[j];
+			for(int k=j;k>i;k--)
+				Order[k] = Order[k-1];
+			Order[i] = x;
+
+		}
+		else i++;
+
+	}
+	expand_flags(save);
+}
+
+void MvFieldSetIterator::setFilter(const MvFilter& f)
+{
+	Filter = f;
+}
+
+MvFieldSetIterator::~MvFieldSetIterator()
+{
+	delete[] Order;
+}
+
+//==========================================================================
+//
+void MvField::ensurePackedMem()
+{
+//-- old MARS (based on now obsolete GRIBEX) had three field states:
+//--	- packed_file:	field is on disk as a coded GRIB msg
+//--			 (requires tiny piece of memory and no processing)
+//--	- packed_mem:	field is in memory as a coded GRIB msg
+//--			 (requires some memory and a little processing to read it)
+//--	- expanded_mem:	field is in memory, decoded into obsolete GRIBEX API arrays
+//--			 This field state, with GRIB_API, is now obsolete!
+//--
+//-- new MARS (based on GRIB_API) uses only the two first field states!
+//--
+//-- This method ensures that the field is in memory (in packed_mem state)
+//-- and thus allows easy access to GRIB1 sections 0 and 1.
+
+   if( mvgrid_->field_->shape == packed_file )
+       set_field_state( mvgrid_->field_, packed_mem );
+}
+
+MvFieldState::MvFieldState(const MvField& f, field_state s, field_state state_to_revert_to, bool readonlyflag)
+{
+    readonly = readonlyflag;
+	Field    = &(MvField&)f;
+
+	if(f.libmars_field())
+	{
+        if (state_to_revert_to == unknown)  // by default, we will revert to the previous state
+		OldState = f.libmars_field()->shape;
+        else
+		    OldState = state_to_revert_to; // otherwise, use the user-specified one
+
+		set_field_state(f.libmars_field(),s);
+	}
+}
+
+MvFieldState::~MvFieldState()
+{
+    // Restore field state
+    if (Field->mvgrid_ && Field->mvgrid_->fieldPtr())
+    {
+        // Note about mars.accuracy: currently, when we revert an expand_mem grib to
+        // packed_mem, libMars will always write the values back to the grib_handle.
+        // Ideally it should not do this, but in the meantime, we can at least ensure
+        // that it does not write them back with different accuracy (which forces grib_api
+        // to reallocate an array).
+
+        int prevAcc = mars.accuracy;
+        if (readonly) mars.accuracy = -1;
+
+        set_field_state( Field->mvgrid_->fieldPtr(), OldState );
+
+        if (readonly) mars.accuracy = prevAcc;
+    }
+}
+
+//==========================================================================
+
+MvField::MvField()
+{
+	//Grib = 0;
+	//Grd  = 0;
+	mvgrid_ = 0;
+}
+
+MvField::~MvField()
+{
+	delete mvgrid_; // Grd;
+}
+
+MvField::MvField(field* f)
+{
+	//Grib  = f;
+	//Grd   = 0;
+	mvgrid_ = MvGridFactory( f, cReleaseMemoryFlag, cExpandGridFalse );
+}
+
+MvField::MvField(const MvField& f)
+{
+	//Grib    = f.Grib;
+	//Grd     = 0;
+	Request = f.Request;
+	mvgrid_ = MvGridFactory( f.libmars_field(), cReleaseMemoryFlag, cExpandGridFalse );
+}
+
+MvField& MvField::operator=(const MvField& f)
+{
+   if( &f == this )
+    {
+      libmars_field()->refcnt++;
+    }
+   else
+    {
+      if( mvgrid_ )
+         delete mvgrid_;
+
+      mvgrid_ = MvGridFactory( f.libmars_field(), cReleaseMemoryFlag, cExpandGridFalse );
+      Request = f.Request;
+    }
+
+	return *this;
+}
+
+void MvField::set_libmars_field(field* f)
+{
+	delete mvgrid_;
+	mvgrid_ = MvGridFactory( f, cReleaseMemoryFlag, cExpandGridFalse );
+}
+
+MvRequest& MvField::getRequest(void)
+{
+	if (Request == NULL)
+	{
+        const bool cThrowOnError = 1;
+        string strGridType (mvgrid_->gridType());
+
+		//-- field_to_request() does the expansion!!!
+		//-- MvFieldLoader loader(*this); // Expand field
+
+		Request = MvRequest( field_to_request( libmars_field() ) );
+
+		long time  = Request("TIME");
+		long step  = MvField::stepRangeDecoder(Request("STEP"));
+
+		MvDate verif = (long)Request("DATE");
+		verif += double((time/100.0 + step)/24.0);
+
+		Request("VERIF") = verif;
+
+		Request("DERIVED") = isDerived();  // we will need this so that we know whether to apply automatic scaling or not
+
+
+        if (strGridType == cSatelliteImage)
+        {
+            Request ("REPRES") = "SV";
+            Request ("_IMAGE_MAP_COLUMNS")           = mvgrid_->getLong("numberOfPointsAlongXAxis",         cThrowOnError);
+            Request ("_IMAGE_MAP_ROWS")              = mvgrid_->getLong("numberOfPointsAlongYAxis",         cThrowOnError);
+            Request ("_IMAGE_MAP_SUB_SAT_LATITUDE")  = mvgrid_->getLong("latitudeOfSubSatellitePoint",      cThrowOnError);
+            Request ("_IMAGE_MAP_SUB_SAT_LONGITUDE") = mvgrid_->getLong("longitudeOfSubSatellitePoint",     cThrowOnError);
+            Request ("_IMAGE_MAP_X_EARTH_DIAMETER")  = mvgrid_->getLong("dx",                               cThrowOnError);
+            Request ("_IMAGE_MAP_Y_EARTH_DIAMETER")  = mvgrid_->getLong("dy",                               cThrowOnError);
+            Request ("_IMAGE_MAP_SUB_SAT_X")         = mvgrid_->getLong("XpInGridLengths",                  cThrowOnError);
+            Request ("_IMAGE_MAP_SUB_SAT_Y")         = mvgrid_->getLong("YpInGridLengths",                  cThrowOnError);
+            Request ("_IMAGE_MAP_GRID_ORIENTATION")  = mvgrid_->getLong("orientationOfTheGrid",             cThrowOnError);
+            Request ("_IMAGE_MAP_CAMERA_ALTITUDE")   = mvgrid_->getLong("NrInRadiusOfEarth",                cThrowOnError);
+            Request ("_IMAGE_MAP_INITIAL_COLUMN")    = mvgrid_->getLong("xCoordinateOfOriginOfSectorImage", cThrowOnError);
+            Request ("_IMAGE_MAP_INITIAL_ROW")       = mvgrid_->getLong("yCoordinateOfOriginOfSectorImage", cThrowOnError);
+        }
+    }
+
+	return Request;
+}
+
+MvField::operator void*()
+{
+	return libmars_field();
+}
+int
+MvField::operator !()
+{
+	return libmars_field() == 0;   // NULL;
+}
+
+
+//double MvField::modelLevelToPressureexp(double sp, int ml)
+double MvField::meanML_to_Pressure_bySP(double sp, int ml)
+{
+   //-- if GRIB header contains vertical coordinate
+   //-- coefficient only for a single level then
+   //-- method ML_to_Pressure_bySP() will be called
+
+   double p = 0;
+   if( mvgrid_->vertCoordCoefPairCount() > 1 )
+    {
+      double C11, C12, C21, C22;
+
+      mvgrid_->vertCoordCoefs( C11, C21, ml-1 );
+      mvgrid_->vertCoordCoefs( C12, C22, ml );
+
+      p = meanPressureLevel( C11, C12, C21, C22, sp );
+    }
+   else
+    {
+      p = ML_to_Pressure_bySP( sp, ml );
+    }
+
+   return p;
+
+#if 0
+   MvFieldExpander expand( *this ); //-- It is cheaper now, because we are
+	                            //-- not packing anymore
+
+   fortfloat* vert  = &Grib->rsec2[10];
+   int        nb    = (int)Grib->ksec2[11]/2-1;
+   double     plev  = 0;
+
+   if( nb > 0 )
+     {
+       plev = meanPressureLevel( vert[ml-1],  vert[ml],
+                                 vert[ml+nb], vert[ml+nb+1], sp );
+     }
+   else
+     {
+       plev = ML_to_Pressure_bySP( sp, ml );
+     }
+
+   return plev;
+#endif
+}
+
+//double MvField::modelLevelToPressure(double lnsp, int ml)
+double MvField::meanML_to_Pressure_byLNSP(double lnsp, int ml)
+{
+   return meanML_to_Pressure_bySP( exp(lnsp), ml );
+}
+
+//double MvField::modelLevelToPressure2(double lnsp, int ml)
+double MvField::ML_to_Pressure_byLNSP(double lnsp, int ml_in)
+{
+   return ML_to_Pressure_bySP( exp(lnsp), ml_in );
+}
+
+double MvField::ML_to_Pressure_bySP(double sp, int ml_in)
+{
+   //-- this one works also for fields that have been encoded
+   //-- with only one pair of coefficients in GRIB section 2
+   //--   (in which case input parameter ml_in is dummy!)
+
+   double C1, C2;
+   mvgrid_->vertCoordCoefs( C1, C2, ml_in );
+   return pressureLevel( C1, C2, sp );
+
+#if 0
+   assert(Grib->rsec2);
+
+   fortfloat* vert = &Grib->rsec2[10];          //-- start of coefficient pairs
+   int        nb   = (int) Grib->ksec2[11]/2-1; //-- nr of coefficient pairs
+   int        ml   = nb == 0 ? 0 : ml_in;       //-- if only one level coefficients
+
+   return pressureLevel( vert[ml], vert[ml+1+nb], sp );
+#endif
+}
+
+
+bool MvField::vertCoordCoefs( int level, double& C1, double& C2 )
+{
+   if( ! isModelLevel() )
+     {
+       cerr << "MvField::vertCoordCoefs: not a model level field" << endl;
+       return false;
+     }
+
+   return mvgrid_->vertCoordCoefs( C1, C2, level );
+
+#if 0
+   assert(Grib->rsec2);
+
+   fortfloat* vert = &Grib->rsec2[10];          //-- start of coefficient pairs
+   int        nb   = vertCoordCoefPairCount();
+   if( level > nb )
+     {
+       cerr << "MvField::vertCoordCoefs: not enough coefficients in GRIB header" << endl;
+       return false;
+     }
+
+   int ml = level;
+   C1 = vert[ml];
+   C2 = vert[ml+nb];
+
+   return true;
+#endif
+}
+
+bool MvField::vertCoordCoefs( double& C1, double& C2 )
+{
+   if( ! isModelLevel() )
+     {
+       cerr << "MvField::vertCoordCoefs: not a model level field" << endl;
+       return false;
+     }
+
+   int lev = mvgrid_->vertCoordCoefPairCount() == 1 ? 0 : (int)level();
+
+   return mvgrid_->vertCoordCoefs( C1, C2, lev );
+
+#if 0
+   assert(Grib->rsec2);
+
+   fortfloat* vert = &Grib->rsec2[10];          //-- start of coefficient pairs
+   int        nb   = vertCoordCoefPairCount();
+   int        ml   = nb == 1 ? 0 : (int)level();//-- if only one level coefficients
+
+   C1 = vert[ml];
+   C2 = vert[ml+nb];
+
+   return true;
+#endif
+}
+
+int MvField::vertCoordCoefPairCount()
+{
+   if( ! isModelLevel() )
+       return 0;
+
+   return mvgrid_->vertCoordCoefPairCount();
+
+   //assert(Grib->ksec2);
+   //-- C array index 11 = Fortran array index 12 (Emoslib API)
+   //return (int)Grib->ksec2[11]/2;
+}
+
+
+bool MvField::averageAlong (double* val,
+                            double X1, double Y1,
+                            double X2, double Y2,
+                            int equat, int npoints,
+                            double res, bool cUseNearestPoint,
+                            double* coords)
+{
+  mvgrid_->init();
+
+  if( ! mvgrid_->hasLocationInfo() )
+    {
+      marslog(LOG_EROR, "averageAlong(): unimplemented or spectral data - unable to extract location data" );
+      return false;
+    }
+
+  double       x, y, rx, ry;
+  double       cumul, cang, weight, myValue;
+  int	       i, j, samples;
+
+  // Set resolution. If it is not given, try to compute it.
+  if ( res == 0. )
+  {
+	  rx = gridWE();
+	  ry = gridNS();
+
+	  if( rx == cValueNotGiven || ry == cValueNotGiven ) //-- Gaussian has missing value...
+	  {
+		  //-- has to be synchronised with Xsect using averageAlong (020731/vk)
+		  rx = ry = 1.0;
+		  marslog( LOG_WARN, "averageAlong(): grid interval set to 1.0/1.0" );
+	  }
+  }
+  else
+	  rx = ry = res;
+
+  if( ry < 0 )
+    ry = -ry;                                    //-- internal grid scan mode S->N
+
+  double last_X =
+	  X2 > X1+cFullGlobeLimit ? X2-rx : X2;  //-- do not duplicate edges if global
+
+
+  if( equat == 1 )                               //-- average E->W
+  {
+
+      for (i = 0, y = Y1; y >= Y2;)
+      {
+
+        if( i == npoints )
+        {
+            marslog(LOG_EROR, "averageAlong(): too small output array!" );
+            return false;
+        }
+
+
+        val[i]  = DBL_MAX;
+        cumul   = 0;
+        samples = 0;
+
+        for (j = 0, x = X1; x <= last_X;)
+        {
+            if( cUseNearestPoint )
+            {
+		  MvGridPoint myPoint = mvgrid_->nearestGridpoint( y, x );
+                myValue = myPoint.value_;
+            }
+            else
+		  myValue = mvgrid_->interpolatePoint( y, x );
+
+            if( (myValue != DBL_MAX) && !(MISSING_VALUE(myValue)))
+            {
+                cumul += myValue;
+                samples++;
+            }
+
+            j++;
+            x = X1 + (j * rx);  // do not add within the loop becuase of cumulative errors
+        }
+
+        if (samples)
+            val[i] = cumul / (double)samples;
+
+        if (coords) // save geographical coordinates
+            coords[i] = y;
+
+        i++;
+        y = Y1 - (i * ry);  // do not add within the loop becuase of cumulative errors
+      }
+   }
+
+   else                                             //-- average N->S
+   {
+        for (x = X1, i = 0; x <= X2;)
+        {
+            if( i == npoints )
+            {
+                marslog(LOG_EROR, "averageAlong(): too small output array!" );
+                return false;
+            }
+
+            cumul = weight = 0;
+            val[i] = DBL_MAX;
+            samples = 0;
+
+            for (j = 0, y = Y1; y >= Y2;)
+            {
+	      cang = cos( cCDR*y );
+                if( cUseNearestPoint )
+                {
+		  MvGridPoint myPoint = mvgrid_->nearestGridpoint( y, x );
+                    myValue = myPoint.value_;
+                }
+                else
+		myValue = mvgrid_->interpolatePoint( y, x );
+
+                if( (myValue != DBL_MAX) && !(MISSING_VALUE(myValue)) )
+                {
+                    cumul  += cang*myValue;
+                    weight += cang;
+                    samples++;
+                }
+
+                j++;
+                y = Y1 - (j * ry);    // do not add within the loop becuase of cumulative errors
+            }
+
+            if( samples )
+                val[i] = cumul / weight;
+
+            if (coords) // save geographical coordinates
+                coords[i] = x;
+
+            i++;
+            x = X1 + (i * rx);   // do not add within the loop becuase of cumulative errors
+        }
+   }
+
+  return true;
+}
+
+//-------
+//------ averageAt() works fine when area coordinates fit
+//----- with the underlying lat-lon grid points; integrate()
+//---- works fine also when area and grid points mismatch!
+//---
+//-- averageAt() is not capable to handle grids other than
+//- non-rotated lat-lon; integrate() is much more versatile
+
+double MvField::averageAt(double X1, double Y1, double X2, double Y2)
+{
+#if 1
+   return integrate( Y1, X1, Y2, X2 );
+#else
+	MvFieldExpander expand(*this);            //-- Expand field
+	if( ! isLatLon() )
+	  {
+	    marslog(LOG_EROR,"old MvField::averageAt() works only woth lat-lon data" );
+	    return -9999 - level(); // DBL_MAX; //-- MagicsEngine starts looping with DBL_MAX!
+	  }
+                                                  //-- Where is this point in matrix ?
+	int nhcells = (int) Grib->ksec2[1];
+	int nvcells = (int) Grib->ksec2[2];
+
+	int	ix, iy;		                  // cell index that contains point
+	double	x1, y1,y1min;	                  // coordinates of cell that contains point
+	double	rx, ry;		                  // cell resolution
+	double	x,y,xx;
+
+	x1 = Grib->ksec2[4]/1000.;
+	y1 = Grib->ksec2[3]/1000.;
+	rx = gridWE();           //- Grib->ksec2[8]/1000.;
+	ry = gridNS();           //- Grib->ksec2[9]/1000.;
+	if( ry < 0 )
+	  {
+	    marslog(LOG_EROR,"old MvField::averageAt() cannot handle data scanning South->North" );
+	    return -9999 - level(); // DBL_MAX; //-- MagicsEngine starts looping with DBL_MAX!
+	  }
+	y1min = y1 - (nvcells-1)*ry;
+
+	int globe = FALSE;
+	if (nhcells*rx > cFullGlobeLimit)
+	  globe = TRUE;
+
+	int	i, j, samples = 0;
+	double	cang,
+		weight= 0.,
+		 val = 0.;
+
+	for (y = Y1, i = 0; y >= Y2;)       //-- Scan East->West
+	{
+		if( y>y1 || y <=y1min )
+		  continue;
+
+		iy = int((y1-y)/ry);
+		cang = cos( cCDR*y );
+		for (x = X1, j = 0; x <= X2;)
+		{
+			xx=x;
+
+			if (globe )                //-- Transform longitude from -180<->180 to 0<->360
+			{
+				if( xx < 0.) xx = 360. + xx;
+				else if (xx<180. && x1>180.) xx += 360.;
+			}
+
+			if (xx < x1)
+			  continue;
+
+			if (xx > (nhcells-1)*rx+x1 && !globe)
+			  continue;
+
+			ix = int((xx-x1)/rx);
+#if 1
+			//-- this block for debugging...
+			int    myInd = nhcells*iy + ix;
+			double myVal = Grib->rsec4[ myInd ];
+			val += cang*myVal;
+#else
+			val += cang*Grib->rsec4[nhcells*iy+ix];
+#endif
+			weight += cang;
+			samples++;
+
+			j++;
+			x = X1 + (j * rx);    // do not add within the loop becuase of cumulative errors
+		}
+
+		i++;
+		y = Y1 - (i * ry);    // do not add within the loop becuase of cumulative errors
+
+	}
+	if (samples)
+		val /= weight;
+	else
+		val = DBL_MAX;
+//cout << samples << '\t' << val << endl;
+	return val;
+#endif
+}
+
+double MvField::interpolateAt (double x_lon, double y_lat )
+{
+	mvgrid_->init();
+
+	return mvgrid_->interpolatePoint( y_lat, x_lon );
+
+}
+
+bool MvField::getMatrixNN (double x_lon, double y_lat, MvMatrix& mat )
+{
+	mvgrid_->init();
+
+	return mvgrid_->getMatrixNN( y_lat, x_lon, mat );
+
+}
+
+double MvField::nearestGridpoint (double x_lon, double y_lat )
+{
+	mvgrid_->init();
+
+	MvGridPoint gp = mvgrid_->nearestGridpoint( y_lat, x_lon );
+
+	return gp.value_;
+}
+
+
+#if 0
+// Where is this point in matrix ?
+
+	int nhcells = (int) Grib->ksec2[1];
+	int nvcells = (int) Grib->ksec2[2];
+
+	int	ix, iy, ix1, iy1;	// cell index that contains point
+	double	x1, y1;	// coordinates of cell that contains point
+	double	rx, ry;	// cell resolution
+
+	double w1, w2;
+	x1 = Grib->ksec2[4]/1000.;
+	y1 = Grib->ksec2[3]/1000.;
+
+	rx = gridWE();   //- Grib->ksec2[8]/1000.;
+	ry = gridNS();   //- Grib->ksec2[9]/1000.;
+
+	int globe = FALSE;
+	if (nhcells*rx > cFullGlobeLimit)
+	  globe = TRUE;
+
+// Transform longitude from -180<->180 to 0<->360
+
+	/* Bug fix for:
+	if (x < 0.) x = 360. + x;
+	else if (x<180. && x1>180.) x += 360.;
+	*/
+	if (globe )
+	{
+		if( x < 0.) x = 360. + x;
+		else if (x<180. && x1>180.) x += 360.;
+	}
+
+// Check if the point is inside grid
+
+	if (x < x1)                          return DBL_MAX;
+	if (x > (nhcells-1)*rx+x1 && !globe) return DBL_MAX;
+	if (y > y1 || y < y1-(nvcells-1)*ry) return DBL_MAX;
+
+// Let's find which cell contains the point
+
+	ix = int((x-x1)/rx);
+
+	double xx = x+rx;
+	// Arne's bugfix
+	//if (xx > (nhcells-1)*rx+x1)
+	if (xx >= nhcells*rx+x1)
+		if (globe) ix1 = 0;
+		else
+		ix1 = ix;
+	else
+	ix1 = int((xx-x1)/rx);
+
+	iy = int((y1-y)/ry);
+
+	double yy = y-ry;
+	if (yy < y1-(nvcells-1)*ry) iy1 = iy;
+	else
+	iy1 = int((y1-yy)/ry);
+
+	x1 += ix*rx;
+	y1 -= iy*ry;
+
+	w1 = (x - x1)/rx;
+	w2 = 1. - w1;
+
+	int		ix_found;
+	ix_found = (w1 < w2) ? ix : ix1;
+
+	w1 = (y1 - y)/ry;
+	w2 = 1. - w1;
+
+	int		iy_found;
+	iy_found =  (w1 < w2) ? iy : iy1;
+
+	return Grib->rsec4[nhcells*iy_found+ix_found];
+
+}
+#endif
+
+
+double MvField::cornerGridpoint (double x, double y,int c)
+{
+//	Find nearest  grid point
+
+//	MvFieldExpander expand(*this); // Expand field
+
+// Where is this point in matrix ?
+
+	int nhcells = mvgrid_->getLong("numberOfPointsAlongAParallel"); // (int) Grib->ksec2[1];
+	int nvcells = mvgrid_->getLong("numberOfPointsAlongAMeridian"); // (int) Grib->ksec2[2];
+
+	int	ix, iy, ix1, iy1;	// cell index that contains point
+	double	x1, y1;	// coordinates of cell that contains point
+	double	rx, ry;	// cell resolution
+	double val1,val2;
+
+	double w1=0.5, w2=0.5;
+	x1 = mvgrid_->getDouble("longitudeOfFirstGridPointInDegrees"); // Grib->ksec2[4]/1000.;
+	y1 = mvgrid_->getDouble("latitudeOfFirstGridPointInDegrees");  // Grib->ksec2[3]/1000.;
+
+	rx = gridWE();   //- Grib->ksec2[8]/1000.;
+	ry = gridNS();   //- Grib->ksec2[9]/1000.;
+
+	int globe = FALSE;
+	if (nhcells*rx > cFullGlobeLimit)
+	  globe = TRUE;
+
+// Transform longitude from -180<->180 to 0<->360
+
+	if (x < 0.) x = 360. + x;
+	else if (x<180. && x1>180.) x += 360.;
+
+// Check if the point is inside grid
+
+	if (x < x1)                          return DBL_MAX;
+	if (x > (nhcells-1)*rx+x1 && !globe) return DBL_MAX;
+	if (y > y1 || y < y1-(nvcells-1)*ry) return DBL_MAX;
+
+// Let's find which cell contains the point
+
+	ix = int((x-x1)/rx);
+
+	double xx = x+rx;
+	if (xx > (nhcells-1)*rx+x1)
+		if (globe) ix1 = 0;
+		else
+		ix1 = ix;
+	else
+	ix1 = int((xx-x1)/rx);
+
+	iy = int((y1-y)/ry);
+
+	double yy = y-ry;
+	if (yy < y1-(nvcells-1)*ry) iy1 = iy;
+	else
+	iy1 = int((y1-yy)/ry);
+
+	x1 += ix*rx;
+	y1 -= iy*ry;
+
+	int		ix_found,iy_found;
+	if (c == 0 )
+	{
+		ix_found = ix;
+		iy_found = iy;
+		val1 = (*mvgrid_)[ nhcells*iy_found+ix_found ];
+	} else if ( c == 1)
+	{
+		ix_found = ix;
+		iy_found = iy1;
+		val1 = (*mvgrid_)[nhcells*iy_found+ix_found];
+	} else if ( c == 2)
+	{
+		ix_found = ix1;
+		iy_found = iy1;
+		val1 = (*mvgrid_)[nhcells*iy_found+ix_found];
+	} else if ( c == 3)
+	{
+		ix_found = ix1;
+		iy_found = iy;
+		val1 = (*mvgrid_)[nhcells*iy_found+ix_found];
+	} else
+	{
+	val1 = w2*(*mvgrid_)[nhcells*iy+ix] + w1*(*mvgrid_)[nhcells*iy+ix1];
+
+	val2 = w2*(*mvgrid_)[nhcells*(iy1)+ix] + w1*(*mvgrid_)[nhcells*(iy1)+ix1];
+	val1 = w1*val1 + w2*val2;
+	}
+
+	return val1;
+
+}
+
+
+double MvField::integrate (double north, double west, double south, double east)
+{
+    MvGeoBox geoArea( north, west, south, east );
+
+    mvgrid_->init();
+
+    if( ! mvgrid_->hasLocationInfo() )
+    {
+        marslog(LOG_EROR, "integrate(): unimplemented or spectral data - unable to extract location data" );
+        return DBL_MAX;
+    }
+
+    double val  = 0;
+    double wght = 0;
+    double sum  = 0;
+    bool   have_valid_values = false;
+
+    for( int j=0; j < mvgrid_->length(); ++j )
+    {
+        if( geoArea.isInside( mvgrid_->lat_y(), mvgrid_->lon_x() ) )
+        {
+            double w = mvgrid_->weight();   //-- for debugging
+            double v = mvgrid_->value();    //-- for debugging
+
+            if (!MISSING_VALUE(v))  // only consider the non-missing values
+            {
+                wght += w;
+                sum  += w*v;
+                have_valid_values = true;
+            }
+        }
+
+        mvgrid_->advance();
+
+    }
+
+    if (have_valid_values)
+    {
+        if( wght )
+            val = sum / wght;
+    }
+    else
+        val = mars.grib_missing_value;  // all values were missing
+            
+//cout << pcnt << '\t' << val << endl;
+    return val;
+}
+
+//-- should be checked and tested!!! vk/981106...
+
+double MvField::stdev( double n, double w, double s, double e)
+{
+	MvGeoBox geoArea( n, w, s, e );
+
+	mvgrid_->init();
+
+	if( ! mvgrid_->hasLocationInfo() )
+	  {
+	    marslog(LOG_EROR, "stdev(): unimplemented or spectral data - unable to extract location data" );
+	    return DBL_MAX;
+	  }
+
+	double val  = 0;
+	double wght = 0;
+	double sum  = 0;
+	double sum2 = 0;
+	int    pcnt = 0;
+
+	for( int j=0; j < mvgrid_->length(); ++j )
+	  {
+
+	    if( geoArea.isInside( mvgrid_->lat_y(), mvgrid_->lon_x() ) )
+	      {
+		double w = mvgrid_->weight();   //-- for debugging
+		double v = mvgrid_->value();    //-- for debugging
+
+		wght += w;
+		sum  += w*v;
+		sum2 += w*v*v;
+		++pcnt;
+	      }
+
+	    mvgrid_->advance();
+
+	  }
+
+	if( wght )
+		val = sqrt( sum2/wght - (sum/wght)*(sum/wght) );
+
+	return val;
+}
+
+//-- should be checked and tested!!! vk/981106...
+
+double MvField::covar( MvField& other,  double n, double w, double s, double e)
+{
+
+	MvGeoBox geoArea( n, w, s, e );
+
+	mvgrid_->init();
+
+	if( ! mvgrid_->hasLocationInfo() )
+	  {
+	    marslog(LOG_EROR, "covar(): unimplemented or spectral data - unable to extract location data" );
+	    return DBL_MAX;
+	  }
+
+	//-- cReleaseMemoryFalse or cReleaseMemoryTrue???
+	auto_ptr<MvGridBase> grd2( MvGridFactory( other.libmars_field(), cReleaseMemoryTrue ) );
+
+	if( ! mvgrid_->isEqual( grd2.get() ) )
+	  {
+	    marslog(LOG_EROR, "Cannot compute covariance between different grids!" );
+	    return DBL_MAX;
+	  }
+
+	double val  = 0;
+	double wght = 0;
+	double sumx = 0;
+	double sumy = 0;
+	double sumxy= 0;
+	int    pcnt = 0;
+
+	for( int j=0; j < mvgrid_->length(); ++j )
+	  {
+	    if( geoArea.isInside( mvgrid_->lat_y(), mvgrid_->lon_x() ) )
+	      {
+		double w1 = mvgrid_->weight();   //-- for debugging
+		double v1 = mvgrid_->value();    //-- for debugging
+		double w2 = grd2->weight();  //-- for debugging
+		double v2 = grd2->value();   //-- for debugging
+
+		wght += w1;
+		sumx += w1*v1;
+		sumy += w2*v2;
+		sumxy+= w1*v1*v2;
+		++pcnt;
+	      }
+
+	    mvgrid_->advance();
+	    grd2->advance();
+
+	  }
+
+	if( wght )
+		val =  sumxy/wght - (sumx/wght)*(sumy/wght);
+
+	return val;
+}
+
+
+
+#if 0
+
+class MvFieldCreator : public MvObjectCreator {
+	MvObject *createObject(MvRequest& r)  { MvFieldSet *fs = new MvFieldSet(r); r.next(); return fs; }
+	MvFieldCreator() : MvObjectCreator("GRIB") {};
+};
+
+static MvFieldCreator GRIBCreator;
+
+#endif
+
+
+bool MvField::isLatLon()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return (s2->data_rep == GRIB_LAT_LONG);
+	//return mvgrid_->getLong("dataRepresentationType") == GRIB_LAT_LONG;
+    return mvgrid_->gridType() == cLatLonGrid;
+}
+
+int MvField::scanMode()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return s2->scan_mode;
+	return mvgrid_->getLong("scanningMode");
+}
+
+int MvField::numberOfLat()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return s2->points_meridian;
+	return mvgrid_->getLong("numberOfPointsAlongAMeridian");
+}
+
+int MvField::numberOfLon()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return s2->points_parallel;
+	return mvgrid_->getLong("numberOfPointsAlongAParallel");
+}
+
+double MvField::north()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return (double)s2->limit_north/(double)GRIB_FACTOR;
+	return mvgrid_->getDouble("latitudeOfFirstGridPointInDegrees");
+}
+
+double MvField::south()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return (double)s2->limit_south/(double)GRIB_FACTOR;
+	return mvgrid_->getDouble("latitudeOfLastGridPointInDegrees");
+}
+
+double MvField::east()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return (double)s2->limit_east/(double)GRIB_FACTOR;
+	return mvgrid_->getDouble("longitudeOfLastGridPointInDegrees");
+}
+
+double MvField::west()
+{
+	//gribsec2_ll *s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	//return (double)s2->limit_west/(double)GRIB_FACTOR;
+	return mvgrid_->getDouble("longitudeOfFirstGridPointInDegrees");
+}
+
+
+const fortint cOctetBit1 = 0x80;
+const fortint cOctetBit2 = 0x40;
+const fortint cOctetBit3 = 0x20;
+
+double MvField::gridNS()
+{
+	//gribsec2_ll*  s2 = (gribsec2_ll*) &Grib->ksec2[0];
+	double metadatum = mvgrid_->getDouble("jDirectionIncrementInDegrees"); // s2->grid_ns/(double)GRIB_FACTOR;
+	double computed  = (north() - south() ) / (numberOfLat() - 1);
+
+	//if( (s2->resolution & cOctetBit1) == 0 )  //-- increments not given?
+	if( (mvgrid_->getLong("resolutionAndComponentFlags") & cOctetBit1) == 0 )  //-- increments not given?
+	  {
+	    return numberOfLat() > 0 ? computed : cValueNotGiven;
+	  }
+
+	if( fabs( computed - metadatum ) > cGridEpsilon )
+	  {
+	    cout << "Grid NS: given=" << metadatum << ", computed=" << computed << endl;
+	    return computed;
+	  }
+
+	//if( (s2->scan_mode & cOctetBit2) != 0 )  //-- points scan in +j direction
+	if( (mvgrid_->getLong("scanningMode") & cOctetBit2) != 0 ) //-- points scan in +j direction
+	  {
+	    metadatum = -metadatum;
+	  }
+
+	return metadatum;
+}
+
+double MvField::gridWE()
+{
+	//gribsec2_ll* s2  = (gribsec2_ll*) &Grib->ksec2[0];
+	//double metadatum = s2->grid_ew/(double)GRIB_FACTOR;
+	double metadatum = mvgrid_->getDouble("iDirectionIncrementInDegrees");
+	double computed  = ( east() - west() ) / (numberOfLon() - 1);
+
+	//if( (s2->resolution & cOctetBit1) == 0 )  //-- increments not given?
+	if( (mvgrid_->getLong("resolutionAndComponentFlags") & cOctetBit1) == 0 )  //-- increments not given?
+	  {
+	    return numberOfLon() > 0 ? computed : cValueNotGiven;
+	  }
+
+	if( fabs( computed - metadatum ) > cGridEpsilon )
+	  {
+	    cout << "Grid WE: given=" << metadatum << ", computed=" << computed << endl;
+
+	    return computed;                     //-- GRIB header precision too small
+	  }
+
+	//if( (s2->scan_mode & cOctetBit1) != 0 )  //-- points scan in -i direction?
+	if( (mvgrid_->getLong("scanningMode") & cOctetBit1) != 0 ) //-- points scan in -i direction
+	  {
+	    metadatum = -metadatum;
+	  }
+
+	return metadatum;
+}
+
+bool MvField::isDerived()
+{
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->generation == mars.computeflg;
+	return mvgrid_->getLong("generatingProcessIdentifier") == mars.computeflg;
+}
+
+double MvField::parameter()
+{
+	//if( Grib->buffer )
+	//	return (unsigned char)*(Grib->buffer+(8+9-1)); //-- 9th octet in sec1
+
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->parameter;
+#if 1
+	//return mvgrid_->getDouble("mars.param"); //- does not work in GRIB 2 ???
+	string p = mvgrid_->getString("mars.param");
+	double d = atof( p.c_str() );
+	return d;
+#else
+	if( mvgrid_->getLong("editionNumber") > 1 )
+	   return mvgrid_->getDouble("parameterNumber"); //-- GRIB2 only
+	else
+	   return mvgrid_->getLong("indicatorOfParameter"); //-- grib1 only
+#endif
+}
+
+string MvField::parameterName()
+{
+	return mvgrid_->getString("mars.param");
+}
+
+int MvField::table()
+{
+	//if( Grib->buffer )
+	//	return (unsigned char)*(Grib->buffer+(8+4-1)); //-- 4th octet in sec1
+
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->version;
+
+	long ed = mvgrid_->getLong("editionNumber");
+	if( ed > 1 )
+	{
+	    marslog(LOG_INFO,"MvField::table(): No table 2 version in GRIB 2!");
+	    return 0;
+	}
+	else
+	    return mvgrid_->getLong("gribTablesVersionNo");
+}
+
+int MvField::centre()
+{
+	//if( Grib->buffer )
+	//	return (unsigned char)*(Grib->buffer+(8+5-1)); //-- 5th octet in sec1
+
+
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->center;
+	return mvgrid_->getLong("centre");
+}
+
+int MvField::generatingProcess()
+{
+	//if( Grib->buffer )
+	//	return (unsigned char)*(Grib->buffer+(8+6-1)); //-- 6th octet in sec1
+
+
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->generation;
+	return mvgrid_->getLong("generatingProcessIdentifier");
+}
+
+double MvField::level()
+{
+   double lev = mvgrid_->getDouble("level");
+   if( levelType() == GRIB_ABOVE_1HPA )
+      return lev / 100.0;
+   else
+      return lev;
+
+#if 0
+	gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	if(s1->level_type == GRIB_ABOVE_1HPA)
+		return  s1->top_level/100.0;
+	else
+		return s1->top_level;
+#endif
+}
+
+double MvField::level_L2()
+{
+   double lev = mvgrid_->getDouble("bottomLevel");
+   if( levelType() == GRIB_ABOVE_1HPA )
+      return lev / 100.0;
+   else
+      return lev;
+
+#if 0
+	gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	if(s1->level_type == GRIB_ABOVE_1HPA)
+		return  s1->bottom_level/100.0;
+	else
+		return s1->bottom_level;
+#endif
+}
+
+string MvField::levelTypeString()
+{
+	string levTyp = mvgrid_->getString("mars.levtype");
+	return levTyp;
+}
+
+int MvField::levelType()
+{
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->level_type;
+
+	int    lev = mvgrid_->getLong("levelType");
+	return lev;
+}
+
+int  MvField::dataRepres()
+{
+	//return (int)Grib->ksec2[0]; //-- fortran index (1)
+	//return mvgrid_->getLong("dataRepresentationType");
+
+
+    // maybe not the very best way to do it, but we have quite a few
+    // functions which expect an integer from this function, so we
+    // take our tried and tested mvgrid_->gridType() and convert it
+    // into a number. The problem is that GRIB 2 does not seem to
+    // be able to give dataRepresentationType as a number.
+    
+    string gridType = mvgrid_->gridType();
+
+         if (gridType == cLatLonGrid)           return GRIB_LAT_LONG;
+    else if (gridType == cLatLonRotatedGrid)    return GRIB_ROTATED_LAT_LONG;
+    else if (gridType == cGaussianGrid)         return GRIB_GAUSSIAN;        
+    else if (gridType == cPolarStereoGrid)      return 5;                    
+    else if (gridType == cLambertGrid)          return 3;                    
+    else if (gridType == cMercatorGrid)         return 1;                    
+    else if (gridType == cSatelliteImage)       return GRIB_SPACE_VIEW;      
+    else if (gridType == cLatLonReducedGrid)    return GRIB_LAT_LONG;        
+    else if (gridType == cGaussianReducedGrid)  return GRIB_GAUSSIAN;        
+    else return 100; // nonsense value
+}
+
+bool MvField::isModelLevel()
+{
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	//return s1->level_type == GRIB_MODEL_LEVEL;
+
+	//return levelType() == GRIB_MODEL_LEVEL || levelType() == cML_UKMO_ND;
+
+	string levTyp = mvgrid_->getString("mars.levtype");
+	return levTyp == "ml" || levTyp == cML_UKMO_ND_STR;
+}
+bool MvField::isPressureLevel()
+{
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+
+	//return  levelType() == GRIB_PRESSURE_LEVEL ||
+	//	levelType() == GRIB_ABOVE_1HPA;
+
+	string levTyp = mvgrid_->getString("mars.levtype");
+	return levTyp == "pl";
+}
+
+bool MvField::isDepth()
+{
+	//gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	return levelType() == GRIB_DEPTH_BELOW_SEA_LEVEL;
+}
+
+double MvField::yyyymmddFoh()
+{
+#if 0
+	gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	if ( s1 )
+	  {
+	    double year = (long)((s1->century-1) * 100 + s1->year);
+	    double d1   = year*10000. + (double)s1->month*100. + (double)s1->day;
+	    double d2 = (( (double)s1->hour*60. + (double)s1->minute ) * 60. ) / 86400.;
+
+	    return (d1 + d2);   //-- using obsolete GRIBEX API (needs struct expansion)
+	  }
+	else if( Grib->buffer )
+	  {
+	    //-- set octet ptr 'sec1' in such a way that following indices
+	    //-- refer to GRIB section 1 octets, i.e. skip section 0 except the last octet
+	    unsigned char* sec1 = (unsigned char*)(Grib->buffer + 7);
+
+	    double year = (long)((sec1[25]-1) * 100 + sec1[13]);
+	    double d1   = year*10000. + (double)sec1[14]*100. + (double)sec1[15];
+	    double d2   = (( (double)sec1[16]*60. + (double)sec1[17] ) * 60. ) / 86400.;
+
+	    return (d1 + d2);   //-- using original GRIB octets (works without expansion)
+	  }
+
+	return 0;               //-- failed to extract date
+#endif
+	double dat = mvgrid_->getDouble("date");
+	double tim = mvgrid_->getDouble("time");
+
+	//nontested_grib_api_port("MvField::yyyymmddFoh()");
+	return dat + tim/2400.0;  //--HHMM
+}
+
+double MvField::stepFoh()
+{
+#if 0
+	double d3 = 0.0;
+	gribsec1 *s1 = (gribsec1*)&Grib->ksec1[0];
+	if ( s1 )                //-- using obsolete GRIBEX API (needs expanding)
+	  {
+	    fortint p1 = s1->p1;
+	    if ( p1 > 0 )
+	      {
+		fortint timeUnit = s1->time_unit;
+		if ( timeUnit == 0 ) // minutes
+			d3 = (double)p1 / (24.*60.);
+		else if ( timeUnit == 1 ) // hours
+			d3 = (double)p1 / 24.;
+		else if ( timeUnit == 2 ) // days
+			d3 = (double)p1;
+		else
+			marslog(LOG_EROR,"Time unit code not implemented yet.  General date value used");
+	      }
+	  }
+	else if( Grib->buffer )  //-- use original GRIB octets (works without expansion)
+	  {
+	    //-- set octet ptr 'sec1' in such a way that following indices
+	    //-- refer to GRIB section 1 octets, i.e. skip section 0 except the last octet
+	    unsigned char* sec1 = (unsigned char*)(Grib->buffer + 7);
+
+	    double p1 = (double)sec1[19];
+	    if( sec1[21] == 10 )              //-- p1 may occupy both octets p1 & p2 ?
+	      p1 = 256.*p1 + (double)sec1[20];
+
+	    if( p1 > 0 )
+	      {
+		if( sec1[18] == 0 ) // minutes
+		  d3 = p1 / (24.*60.);
+		else if( sec1[18] == 1 ) // hours
+		  d3 = p1 / 24.;
+		else if( sec1[18] == 2 ) // days
+		  d3 = p1;
+		else
+		  marslog(LOG_EROR,"Time unit code not implemented yet.  General date value used");
+	      }
+	  }
+
+	return d3;
+#endif
+
+	double d3 = mvgrid_->getDouble("mars.step"); // stepInHours, periodOfTime
+
+
+	//nontested_grib_api_port("MvField::stepFoh()");
+	return d3/24.0;
+}
+
+
+// stepRangeDecoder
+// -- Returns the step number from a step string.
+// -- e.g. '72' -> 72;
+// -- e.g. '96-120' -> 120
+// -- See the header file for more information.
+// -- Note that this code is based on code in grib_api
+// -- (grib_accessor_class_g1step_range.c) which does the same thing, i.e., with
+// -- this data, grib_get_long() would return 120.
+
+int MvField::stepRangeDecoder (const char *stepString)
+{
+    char buff[100];
+    long start_step, step;
+    char* p=buff;
+
+    if (stepString != NULL)
+    {
+        strncpy (buff, stepString, sizeof(buff)-1);
+
+        start_step = strtol (stepString, &p, 10);  // convert to int, 'p' points to first non-numeric char
+
+        if ( *p==0 )    // step was just a number, so use that
+            step = start_step;
+        else            // step was a range, so use the number after the non-numeric char
+            step = strtol (++p, NULL, 10);
+
+        return step;
+    }
+
+    else
+    {
+        return 0;  // no step string
+    }
+}
+
+
+
+//________________________________________________________________
+//                                      Emoslib GRIB Table 2 stuff
+//  Emoslib GRIB Table 2 versions are
+//  used to get parameter MARS name.
+//
+
+Cached MvField::marsName()
+{
+    string p = mvgrid_->getString("shortName");
+    Cached c(p.c_str());
+
+	if( isDerived() )				  //-- generally ok?
+		return lowcase(c);  //-- ok for Vis5D!
+	else
+		return upcase(c);
+	      }
+
+
+Cached MvField::table2FileName()
+{
+	Cached dir;
+	char* envdir = getenv( "ECMWF_LOCAL_TABLE_PATH" ); //- changed 030321/vk
+	if( envdir )
+	    dir = envdir;
+	else
+	    dir = Cached( "/home/ma/emos/tables" );
+
+	char buf[ 512 ];
+	ostrstream fmt( buf, sizeof( buf ) );
+	fmt << dir
+	    << '/'
+	    << "local_table_2_version_"
+	    << setfill( '0' ) << setw( 3 ) << table()
+	    << ends;
+
+	return Cached( buf );
+}
+
+/* OBSOLETE: REMOVE LATER
+//________________________________________________________________
+//                                       Magics GRIB Table 2 stuff
+//  Magics Extended GRIB Table 2 versions
+//  are used to get vector pair info i.e.
+//  recognise wind and other vector fields.
+//
+
+Cached MvField::vectorPair()
+{
+	char buf[ 512 ];
+
+	ifstream istrm( (const char*)MagicsTable2FileName(), ios::in );
+	if( ! istrm )
+	{
+	    marslog(LOG_INFO, "Magics Extended GRIB Table 2 Version %d open error", table() );
+	    return Cached( "no_pair" );
+	}
+
+	char tableVers[ 5 ];
+	ostrstream tvstr( tableVers, sizeof( tableVers ) );
+	tvstr << "."
+	      << table()                 //-- required for new (030612) MARS param syntax
+	      << ends;
+
+	istrm.getline( buf, sizeof( buf ) );
+	int  current = atoi( buf );
+        int  param   = (int)parameter();
+
+	while( ! istrm.eof() && istrm.good() && current < param )
+	{
+	    istrm.getline( buf, sizeof( buf ) );
+	    current = atoi( buf );
+	}
+
+	if( current == param )
+	{
+	    //-- there are max 12 entries on a line, separated by '&'s
+	    //-- if 9th entry > 0
+	    //--    then entry 10 is the param number for the pair
+
+	    char* start = buf;
+	    for( int i=1; i<9; ++i )     //-- locate 9th entry
+	    {
+	        start = strstr( start, "&" );
+	        if( start )
+	            ++start;             //-- i:th entry exists
+	        else
+	            break;               //-- less than 9 entries
+	    }
+	    if( start )                  //-- did the 9th entry exist?
+	    {
+	        if( atol( start ) > 0 )  //-- entry value > 0 => has a pair
+	        {
+	            start = strstr( start, "&" );
+	            if( start )          //-- does the 10th entry exist?
+	            {
+	                ++start;
+	                while( *start == ' ' )
+	                    ++start;           //-- remove leading spaces
+
+	                char* amp = strstr( start, "&" );
+	                if( amp )
+	                {
+	                    *amp-- = '\0';
+	                    while( *amp == ' ' )
+	                        *amp-- = '\0';  //-- remove trailing spaces
+	                }
+
+	                return Cached( start ) + Cached( tableVers ); //-- OK, return pair!
+	            }
+	        }
+	    }
+
+	    return Cached( "no_pair" );         //-- scalar, has no pair!
+	}
+
+	marslog(LOG_INFO , "Param %d missing from Magics Extended GRIB Table 2 Vers %d"
+	      , param , table() );
+
+	return Cached( "no_pair" );
+}
+*/
+
+Cached MvField::magicsName()
+{
+#if 0
+	string par = mvgrid_->getString("mars.param");
+	return Cached( par.c_str() );
+#else
+	char buf[ 512 ];
+	int  param = (int)parameter();
+
+	ifstream istrm( (const char*)MagicsTable2FileName(), ios::in );
+	if( istrm )
+	  {
+	    istrm.getline( buf, sizeof( buf ) );
+	    int  current = atoi( buf );
+
+	    while( ! istrm.eof() && istrm.good() && current < param )
+	      {
+		istrm.getline( buf, sizeof( buf ) );
+		current = atoi( buf );
+	      }
+
+	    if( current == param )
+	      {
+		char* start = strstr( buf, "&" );
+		++start;
+		char* end = strstr( start, "&" );
+		if( end )
+		  {
+		    *end = '\0';
+		    return Cached( start );
+		  }
+	      }
+	  }
+	return Cached( "p" ) + param + Cached( "/t" ) + table();
+#endif
+}
+
+
+Cached MvField::MagicsTable2FileName()
+{
+  //-- tries different versions of Magics Extended GRIB Table 2
+  //-- file names, starting with the longest possible name and
+  //-- falling back into shorter names
+
+	Cached dir;
+	char* envdir = getenv( "MAG_HOME" );
+	if( envdir )
+	    dir = Cached( envdir ) + Cached( "/coast" );
+	else
+	    dir = Cached("/usr/local/apps/Magics/current/coast"); //-- ECMWF default
+
+	char buf[ 512 ];
+
+	ostrstream fmt( buf, sizeof( buf ) );
+	fmt << (const char *)dir
+	    << "/txtab2_"         //-- hopefully Alpha can now handle this (030320/vk)
+	    << table()
+	    << ends;
+
+	Cached path;
+	if( MagicsTable2FileCandidate( buf, 2, path ) ) //-- txtab2_vvv_ccc_ppp ?
+	  return path;
+
+	if( MagicsTable2FileCandidate( buf, 1, path ) ) //-- txtab2_vvv_ccc ?
+	  return path;
+
+	return Cached( buf );                           //-- txtab2_vvv
+}
+
+bool MvField::MagicsTable2FileCandidate( const char* pref, int form, Cached& path )
+{
+  //----
+  //--- builds a Magics Extended GRIB Table 2 name candidate
+  //--  and checks if the file exists.
+  //-
+  char myBuf[ 512 ];
+
+  ostrstream fmt( myBuf, sizeof( myBuf ) );
+  fmt << pref;
+
+  switch( form )
+    {
+    case 2:                              //-- txtab2_vvv_ccc_ppp
+      fmt << "_"
+          << setfill( '0' )
+	  << setw( 3 ) << centre()
+	  << "_"
+	  << setw( 3 ) << generatingProcess();
+      break;
+
+    case 1:                              //-- txtab2_vvv_ccc
+      fmt << "_"
+          << setfill( '0' )
+	  << setw( 3 ) << centre();
+      break;
+    }
+  fmt << ends;
+
+  path = Cached( myBuf );
+
+  ifstream istrm( myBuf, ios::in );
+  return istrm ? true : false;
+}
+
+MvLocation MvField::nearestGridPointLocation( const MvLocation& l )
+{
+  MvLocation  nearestLoc;
+  mvgrid_->init();
+
+  if( mvgrid_->hasLocationInfo() )
+    {
+      MvGridPoint nearestPoint = mvgrid_->nearestGridpoint( l.latitude(), l.longitude() );
+      nearestLoc = nearestPoint.loc_;
+    }
+  else
+    {
+      marslog(LOG_EROR, "nearestGridPointLocation(): unimplemented or spectral data - unable to extract location data" );
+    }
+
+  return nearestLoc;
+}
diff --git a/src/libMetview/MvFieldSet.h b/src/libMetview/MvFieldSet.h
new file mode 100644
index 0000000..abc4ef9
--- /dev/null
+++ b/src/libMetview/MvFieldSet.h
@@ -0,0 +1,667 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvFieldSet_DEFINED
+#define MvFieldSet_DEFINED
+
+#include "MvRequest.h"
+#include "MvFilter.h"
+#include "MvGrid.h"
+
+//-- activate next line if you need old ml-to-pressure methods
+//for-the-moment//#define INCLUDE_OLD_CODE
+
+
+const double cValueNotGiven  = DBL_MAX;
+const int    cML_UKMO_ND     =  205;     //-- level type for UKMO New Dynamics data
+const string cML_UKMO_ND_STR = "205";    //-- level type for UKMO New Dynamics data
+
+#if 0
+double interpolateValue( field* Grib, double lat, double lon );
+#endif
+
+
+class MvFieldSet;
+class MvFieldState;
+class MvGridBase;
+
+//=============================================================================
+
+//! Class to handle field data (stored as a GRIB message)
+/*! MvField contains the physical structure of a field in GRIB format
+ *  and its description as MvRequest.
+ *  The class is based on libMars structure \c field, implemented in files
+ *  \c libMars/field.h and \c libMars/field.c.
+ */
+class MvField {
+
+	friend class MvFieldSet;
+	friend class MvFieldState;
+
+	MvRequest   Request;
+	MvGridBase* mvgrid_;
+
+
+public:
+
+	//! Constructor
+	MvField();
+
+	//! Destructor
+	~MvField();
+
+	//! Copy constructor 1
+	/*! Builds a new MvField object by copying the internal pointers
+	 *  (GRIB data and request) from argument \c f .\n \n
+	 *  Note that both objects will share the same data!
+	 */
+	MvField(const MvField& f);
+
+	//! Copy constructor 2
+	/*! Builds a new MvField object from libMars \c field struct \c f. \n \n
+	 *  Note that the created object will share the GRIB data with struct \c f !
+	 */
+	MvField(field* f);
+
+	//! Assignment operator
+	/*! This operator copies the internal pointers (GRIB data and request)
+	 *  of object pointed by argument \c f to the other MvField
+	 *  in an assignment operation.\n \n
+	 *  Note that both objects will share the same data!
+	 */
+	MvField& operator=(const MvField& f);
+
+	//! Returns a pointer to the internal libMars \c field struct
+	field* libmars_field() const { return mvgrid_ ? mvgrid_->field_ : 0; }
+
+	//! Assigns the internal \c field struct pointer to point to \c f
+	void   set_libmars_field(field* f);
+
+// Converters
+	//! Returns a copy of the RETRIEVE command that describes the field contents.
+	/*! Creates the request if the request has not been given in the constructor
+	 *  or if not already created.
+	 */
+	MvRequest& getRequest();           // Create a MvRequest
+
+// Data access, expanding is taken care of
+	//! Non-OOP style method to calculate average in NS or WE direction over an area
+	bool   averageAlong (double*n, double,double,double,double,int,int,
+	                     double res=0.,bool useNearestPoint=true, double* coords=0);
+
+	//! Obsolete method. Internally calls integrate()
+	double averageAt(double,double,double,double);
+
+	//! Interpolates a value for the given geographical location
+	/*! Uses the internal MvGridBase object (method MvGridBase::interpolatePoint)
+	 *  to do the calculation (which depend on the underlying grid
+	 *  presentation.\n \n
+	 *  Note that arguments are (longitude, latitude).
+	 */
+	double interpolateAt(double x_lon, double y_lat);
+
+	//! Returns the value from a grid point nearest to the given geographical location
+	/*! Uses the internal MvGridBase object (method MvGridBase::nearestGridpoint)
+	 *  to do the search (which depends on the underlying grid presentation.\n \n
+	 *  Use method nearestGridPointLocation() to get the location of the nearest grid point.\n \n
+	 *  Note that arguments are (longitude, latitude).
+	 */
+	double nearestGridpoint(double x_lon, double y_lat);
+
+	//! (Not used. Obsolete?)
+	double cornerGridpoint(double,double,int);
+
+	//! Get a matrix of values around the given geographical location
+	/*! Uses the internal MvGridBase object (method MvGridBase::getMatrixNN)
+	 *  to extract the requested matrix. Used mainly for satellite images.
+	 */
+	bool   getMatrixNN(double,double,MvMatrix&);
+
+	//-- new versions --
+
+	//! Evaluates the corresponding pressure level for the given model level \c ml
+	/*! This method is for the vertical discretisation used at ECMWF, based on
+	 *  model level layers.
+	 *  The pressure level is evaluated using \c sp and the coefficient pairs ( \c C1
+	 *  and \c C2 ) for the two surrounding "half-levels" ( \c ml-0.5 and \c ml+0.5 ),
+	 *  stored in the GRIB header, using the layer mean.\n \n
+	 *  If the GRIB header contains only one pair of coefficients \c C1 and \c C2
+	 *  then method ML_to_Pressure_bySP() is called internally.
+	 */
+	double meanML_to_Pressure_bySP(double sp, int ml);
+
+	//! Evaluates the corresponding pressure level for a given model level \c ml
+	/*! Internally converts \c lnsp to \c sp and calls method meanML_to_Pressure_bySP()
+	 */
+	double meanML_to_Pressure_byLNSP(double lnsp, int ml);
+
+	//! Evaluates the corresponding pressure level for the given model level \c ml
+	/*! The pressure level is evaluated using \c sp and the coefficient pair \c C1
+	 *  and \c C2 stored in the GRIB header.
+	 */
+	double ML_to_Pressure_bySP(double sp, int ml);
+
+	//! Evaluates the corresponding pressure level for a given model level \c ml
+	/*! Internally converts \c lnsp to \c sp and calls method ML_to_Pressure_bySP()
+	 */
+	double ML_to_Pressure_byLNSP(double lnsp, int ml);
+
+	//! Computes the pressure level for a single model level
+	/*! Arguments \c C1 and \c C2 are the vertical coordinate coefficient pair
+	 *  and \c sp is the surface pressure.
+	 */
+	double pressureLevel(double C1, double C2, double sp)
+	                        { return C1 + C2*sp; }
+
+	//! Computes the pressure level for a model level layer
+	double meanPressureLevel(double C1a, double C1b,
+	                         double C2a, double C2b, double sp)
+	                        { return (C1a+C1b + (C2a+C2b)*sp)/2.0; }
+
+	//! Extracts vertical coordinate coefficient pair ( \c C1 , \c C2 ) from the GRIB header
+	bool vertCoordCoefs( double& C1, double& C2 );
+
+	//! Gets a vertical coordinate coefficient pair
+	/*! Vertical coordinate coefficient pair ( \c C1 , \c C2 )
+	 *  for level \c level is extracted from the GRIB header
+	 */
+	bool vertCoordCoefs( int level, double& C1, double& C2 );
+
+	//! Returns the number of vertical coordinate coefficient pairs stored in the GRIB header
+	int  vertCoordCoefPairCount();
+
+	//! Grid point weighted integration over the given area
+	/*! Weighting is done according to the geographical area that
+	 *  each grid point represents, e.g. in cylindrical projection
+	 *  grid points closer to the Poles represent smaller areas
+	 *  than those closer to the Equator
+	 */
+	double integrate( double north, double west, double south, double east);
+
+	//! Grid point weighted standard deviation calculated over the given area
+	/*! About the weighting used, see integrate().
+	 */
+	double stdev( double north, double west, double south, double east);
+
+	//! Grid point weighted covariance over the given area
+	/*! About the weighting used, see integrate().
+	 */
+	double covar( MvField& other, double north, double west, double south, double east);
+
+	//! Returns the offset of the GRIB message
+	/*! This is the offset from the beginning of the input file, in bytes
+	 */
+	long getOffset() {  if (libmars_field()) return (long)libmars_field()->offset; else return -1; }
+
+	//! Returns the length of the GRIB message, in octets (bytes)
+	long getLength() {  if (libmars_field()) return libmars_field()->length; else return -1; }
+
+// Data access, field should be expanded
+// inline for speed
+	//! Returns the number of grid points (or spectral coefficients) in the field
+	int        countValues()     { return libmars_field()->value_count;  }
+
+	//! Returns the value of the \c n'th element in the field
+	/*! Element type depends on the field presentation:
+	 *  it can be a value of a grid point or of a spectral coefficient.\n
+	 *  For the first element \c n = 0 ( \c n = 0, 1, 2, ...)
+	 */
+	double& operator[](int n) { return libmars_field()->values[n]; }
+
+	//! Returns \c true if the GRIB message contains a missing field
+	bool isMissing() { return libmars_field()->missing; }
+
+	//! Returns \c true if the grid presentation is cylindrical latitude-longitude grid
+	bool isLatLon();
+
+	//! Returns the number of grid points in latitude (j) direction
+	int numberOfLat();
+
+	//! Returns the number of grid points in longitude (i) direction
+	int numberOfLon();
+
+	//! Returns "scanning mode" octet (bit field, table 8 in GRIB 1)
+	int scanMode();
+
+	//! Returns the Northern coordinate of the grid area
+	double north();
+
+	//! Returns the Southern coordinate of the grid area
+	double south();
+
+	//! Returns the Eastern coordinate of the grid area
+	double east();
+
+	//! Returns the Western coordinate of the grid area
+	double west();
+
+	//! Returns the grid interval in j direction (North-South)
+	double gridNS();
+
+	//! Returns the grid interval in i direction (West-East)
+	double gridWE();
+
+	//! Returns \c true if the field is derived, \c false if retrieved
+	/*! Metview and MARS mark derived (computed) fields with a special
+	 *  value in generatingProcess() octet.\n \n
+	 *  In Metview visualisation derived fields
+	 *  are indicated by an extra asterisk in the parameter name
+	 *  in the plot title, and some fields get different unit conversions.
+	 *  For instance retrieved temperature field values (stored in Kelvin
+	 *  in GRIB message) are converted (by default) to Celsius for
+	 *  plotting, but a computed temperature difference field is plotted
+	 *  (by default) as is, without conversion.
+	 */
+	bool isDerived();
+
+	//! Returns the GRIB Edition number of the current GRIB message
+	int     edition(){ return mvgrid_->getLong("editionNumber"); }
+
+	//! Returns the code number for 'creating centre' (e.g. 98 is ECMWF)
+	int     centre();
+
+	//! Returns the code number for the parameter; the actual parameter depends also on table()
+	double  parameter();
+
+	//! Returns the parameter name used by MARS
+	string  parameterName();
+
+	//! Assigns a different parameter code number
+	void    setParameter(int v){mvgrid_->setLong("indicatorOfParameter",v);}
+
+	//! Returns (GRIB 1) Table 2 version number
+	int     table();
+
+	//! Assigns a different Table 2 version number
+	void    setTable(int v){ mvgrid_->setLong("gribTablesVersionNo",v);}
+
+	//! Returns the code number for the 'generating process'
+	/*! This code is also used by Metview/MARS to mark a field
+	 *  as 'computed', see isDerived().
+	 */
+	int     generatingProcess();
+
+	//! Returns the primary level value (octet 11, or combined octets 11&12 in GRIB 1)
+	double  level();
+
+	//! Returns the second level value (octet 12 in GRIB 1)
+	double  level_L2();
+
+	//! Returns the type of the level as a string
+	string  levelTypeString();
+
+	//! Returns the code number for the level type
+	int     levelType();
+
+	//! Returns the code number for the underlying geographical grid
+	int     dataRepres();
+
+	//! Returns the parameter name used by MARS
+	Cached  marsName();   //-- from Emoslib Table 2 versions
+	//Cached  fullName_DeleteMe();   //-- from Emoslib Table 2 versions
+
+	//! Returns the parameter name used by Magics 6
+	Cached  magicsName(); //-- from Magics Table 2 versions
+
+
+	//OBSOLETE: Remove later
+	//! Returns the pairing parameter for vector parameters, as a string
+	/*! Method searches Magics 6 Extended GRIB Table 2 files for the current
+	 *  parameter, to see if it is part of a vector pair (u/v, speed/direction,
+	 *  vorticity/divergence). If this is a part of a vector, then returns
+	 *  the other parameter code in format \c "ppp.tt" , where \c ppp is the code
+	 *  for the parameter in Table 2 version \c tt. \n \n
+	 *  Returns \c "no_pair" if this is a scalar parameter.
+	 */
+//	Cached  vectorPair(); //-- from Magics Table 2 versions
+
+	//! [Obsolete!]] Returns \c true if the GRIB message has been fully expanded into memory
+	/*! Expanded state was a requirement for the obsolete GRIBEX based implementation.
+	 *  With the current GRIB_API implementation messages do not need to be
+	 *  expanded in order to have access to data values, thus calling this
+	 *  calling this function is obsolete.
+	 */
+	bool isExpanded(){ return mvgrid_->field_->shape == expand_mem; }
+
+	//! This method reads the GRIB message into memory, in case it is not already there
+	void    ensurePackedMem(); //-- if only on disk, get into memory
+
+	//! This method sets the 'shape' (see libMars) of the field
+	void    setShape(field_state newState) {set_field_state(mvgrid_->field_, newState);}
+
+	//! Interface to GRIB_API to request a \c long valued keyword
+	long    getGribKeyValueLong   (const string &key)
+	                              {return mvgrid_->getLong  (key.c_str());}
+
+	//! Interface to GRIB_API to request a \c double valued keyword
+	double  getGribKeyValueDouble (const string &key)
+	                              {return mvgrid_->getDouble(key.c_str());}
+
+	//! Interface to GRIB_API to request a \c string valued keyword
+	string  getGribKeyValueString (const string &key)
+	                              {return mvgrid_->getString(key.c_str());}
+
+	//! Interface to GRIB_API to request a \c long valued array keyword
+	long    getGribKeyArrayLong   (const string &key, long   **lvals)
+	                              {return mvgrid_->getLongArray   (key.c_str(), lvals);}
+
+	//! Interface to GRIB_API to request a \c double valued array keyword
+	long    getGribKeyArrayDouble (const string &key, double **dvals)
+	                              {return mvgrid_->getDoubleArray (key.c_str(), dvals);}
+
+	//! Interface to GRIB_API to set a \c long valued keyword
+	bool    setGribKeyValueLong   (const string &key, long   value)
+	                              {return mvgrid_->setLong  (key.c_str(), value);}
+
+	//! Interface to GRIB_API to set a \c double valued keyword
+	bool    setGribKeyValueDouble (const string &key, double value)
+	                              {return mvgrid_->setDouble(key.c_str(), value);}
+
+	//! Interface to GRIB_API to set a \c string valued keyword
+	bool    setGribKeyValueString (const string &key, string &value)
+	                              {return mvgrid_->setString(key.c_str(), value);}
+
+	//! Returns \c true if the level type is model level
+	bool isModelLevel();
+
+	//! Returns \c true if the level type is surface level
+	bool isSurface();
+
+	//! Returns \c true if the level type is pressure level
+	bool isPressureLevel();
+
+	//! Returns \c true if the level type is depth level (e.g. ocean, soil)
+	bool isDepth();
+
+// Compare with NULL
+	//! Operator for testing the validity of MvField object
+	/*! This operator returns the pointer of the internal libMars
+	 *  GRIB structure as a \c void* .
+	 *  It is useful to compare the contents of a MvField to NULL
+	 *  in a \c while or \c if statements.\n \n
+	 *  Usage:
+	 * <PRE>
+	 *      MvField f;
+	 *      if ( f ) ...
+	 * </PRE>
+	 */
+	operator void*();
+
+	//! Operator for testing the validity of MvField object
+	/*! This operator compares the pointer of the internal libMars
+	 *  GRIB structure to NULL and returns the result.\n \n
+	 *  Usage:
+	 * <PRE>
+	 *       MvField f;
+	 *       if ( !f ) ...
+	 * </PRE>
+	 */
+	int operator !();
+
+// Clone the data...
+
+//	void clone(); //-- 080724/vk: this method was never implemented?
+
+
+//	fortfloat* coordinateLevelsA();
+//		{ return &Grib->rsec2[10]; }
+//
+//	fortfloat* coordinateLevelsB()
+//		{ return coordinateLevelsA() + coordinateLevelsCount(); }
+
+//	int coordinateLevelsCount();
+//		{ return Grib->ksec2[11]/2;}
+
+	//! Returns the location of the nearest grid point for the given geographical location
+	/*! Use method nearestGridpoint() to get the value of the grid point
+	 */
+	MvLocation nearestGridPointLocation( const MvLocation& l );
+
+	//! Returns the date as a double number
+	/*! Integer part shows \c yyyymmdd and the decimal part shows the hours
+	 *  as a fraction of a day. For instance 20080724.5 represents 12:00 UTC
+	 *  on 24 July 2008, and 20070620.75 represents 18:00 UTC on 20 June 2007.
+	 */
+	double yyyymmddFoh();  // return date: yyyymmdd.f, f=fraction of hour
+
+	//! Returns the forecast step in fractions of a day.
+	/*! For instance 0.25 represents a forecast of 6 hours,
+	 *  and 2.5 represents a forecast of 60 hours.
+	 */
+	double stepFoh();      // return step in fraction of hour
+
+	//! Returns the step number from a step string.
+	/*! Normally the two are basically the same (e.g. '72' -> 72), but
+	 *  in some cases the step is a range (e.g. '96-120').
+	 *  When we used grib_api <= 1.7.0, mars.step (string) was returning the 'endStep'
+	 *  parameter (in this case 120). However, with grib_api 1.8.0, mars.step
+	 *  returns the whole range. In this case, Metview was 'unthinkingly' converting
+	 *  to a number, and the result was the first in the range (in this case 96).
+	 *  The solution, it would appear, is to scan for a range and if so, then take
+	 * the second number. This will at least give the same results as previous versions.
+	 */
+	static int stepRangeDecoder(const char *stepString);
+
+	//! Returns the embedded grib_handle
+	/*! This method is for "lower" level GRIB access, for cases
+	 *  not available in MvField class
+	 */
+	grib_handle* getGribHandle(){ return mvgrid_->field_->handle; }
+
+protected:
+	Cached getLineFromTable2( int line );
+	Cached table2FileName();
+	Cached MagicsTable2FileName();
+        bool   MagicsTable2FileCandidate( const char* pref, int form, Cached& path );
+};
+
+// Stack based objects to change the state of gribs ....
+// This is a meta-class
+//! Base class for MvFieldLoader and MvFieldExpander
+/*! These classes are now obsolete!
+ *  They were needed when GRIB handling was done with the
+ *  obsolete \c GRIBEX routine. The porting of Metview code
+ *  to use \c GRIB_API has removed the requirement
+ *  to expand GRIB messages as \c GRIB_API provides
+ *  access to data and meta-data without the need to
+ *  explicitly expand the message.
+ */
+class MvFieldState {
+	MvField     *Field;
+	field_state  OldState;
+    bool         readonly;
+protected:
+	MvFieldState(const MvField&, field_state, field_state state_to_revert_to = unknown, bool readonlyflag = true);
+	virtual ~MvFieldState();
+};
+
+// ... this one load a field from file into memory, still in grib
+
+//! Loads a field (a GRIB message) from file to memory
+/*! This class is now semi-obsolete (see MvFieldState).
+ *  It is currently (July 2008) used in one Metview module
+ */
+class MvFieldLoader : public MvFieldState{
+public:
+	MvFieldLoader(const MvField& f, bool readonlyflag = true) : MvFieldState(f, packed_mem, unknown, readonlyflag) {}
+};
+
+// ... this one expand the grib
+
+//! Expands (decodes) a field (a GRIB message)
+/*! This class is now semi-obsolete (see MvFieldState), although
+ *  it is still (July 2008) used in several Metview modules
+ */
+class MvFieldExpander : public MvFieldState{
+public:
+	MvFieldExpander(const MvField& f, bool readonlyflag = true) : MvFieldState(f, expand_mem, unknown, readonlyflag) {}
+};
+
+
+// ... this one expands the grib and then frees it when destroyed
+
+//! Expands (decodes) a field (a GRIB message) and frees is when this pbject is destroyed
+/*! This class is now semi-obsolete (see MvFieldState), although
+ *  it is still (July 2008) used in several Metview modules
+ */
+class MvFieldExpandThenFree : public MvFieldState{
+public:
+	MvFieldExpandThenFree(const MvField& f, bool readonlyflag = true) : MvFieldState(f, expand_mem, packed_file, readonlyflag) {}
+};
+
+//===========================================================================
+
+//! MvFieldSet contains a set of MvField objects
+/*! This class is based on libMars structure \c fieldset, found
+ *  in files \c field.h and \c field.c in directory src/libMars.
+ */
+class MvFieldSet {
+
+	bool      Writable;
+	fieldset* Fs;
+	MvField** Fields;
+
+// Private stuff
+
+	void _init();
+	void _clean();
+	void _copy(const MvFieldSet&);
+
+// No copy allowed
+
+	void operator=(const MvFieldSet&);
+	MvFieldSet(const MvFieldSet&);
+
+public:
+
+	//! Constructor, creates an empty fieldset
+	MvFieldSet();                              // Create an empty fs
+
+	//! Constructor, reads fields from a file
+	/*! Reads the GRIB data file pointed by argument \c filename
+	 *  and builds the fieldset that contains all the fields in the file.
+	 */
+	MvFieldSet(const char* filename);	           // Contruction from a file name
+
+	//! Constructor, creates a fieldset from a request
+	/*! Builds a fieldset from a GRIB command.
+	 *  This command specifies the file name in parameter PATH.
+	 *  The order of the fields within the file may be specified
+	 *  by parameter INDEX or by parameters OFFSET and LENGTH.
+	 */
+	MvFieldSet(const MvRequest& req); // Contruction from a request
+
+	//! Destructor
+	~MvFieldSet();
+
+
+// Utility methods
+
+	//! Returns the number of fields in the fieldset
+	int countFields(void);               // number of fields
+
+	//! Returns one field from the fieldset
+	/*! Argument \c n defines which field to return.
+	 *  First field is returned when \c n = 0 (\c n = 0, 1, 2,...).
+	 */
+	MvField& operator[](int);            // Return a single field
+
+	//! Returns a request describing the fieldset
+	/*! Returns a GRIB command that describes the position of the fields
+	 *  within the file. The GRIB command contains the parameters:
+	 * <PRE>
+	 *      PATH - file name.
+	 *      TEMPORARY - 0 or 1. When 1, file may be deleted
+	 *      OFFSET - byte offset of field within file.
+	 *      LENGTH - size of field in bytes.
+	 * </PRE>
+	 */
+	MvRequest getRequest(); // Create a MvRequest
+//	MvRequest getRequest(bool clone=false); // original had an argument which is never used
+
+	//! Appends field \c f to the fieldset
+	void operator+=(const MvField& f);     // Append a field
+
+};
+
+//=============================================================================
+
+//! Allows changing the accessing order of MvField objects in MvFieldSet
+/*! This class can be used to change the accessing order of fields in MvFieldSet.
+ *  Fields can be sorted and - using one MvFilter object - filtered.\n \n
+ *  Sorting and filtering are done inside this class (MvFieldSet object
+ *  itself is not changed). Fields are accessed using the iterator operator()().
+ */
+class MvFieldSetIterator {
+
+	int         Count;
+	int         Current;
+	int        *Order;
+
+	MvFieldSet *FieldSet;
+	MvField    *Field;
+	MvFilter    Filter;
+
+public:
+
+	//! Constructor that associates fieldset \c fs to the iterator
+	MvFieldSetIterator(MvFieldSet& fs);
+
+	//! Destructor
+	~MvFieldSetIterator();
+
+	//! Method that associates MvFilter \c f to the iterator.
+	/*! Only fields that satisfy the filter conditions will be
+	 *  returned by the iterator
+	 */
+	void setFilter(const MvFilter& f);
+
+	//! This method specifies the sorting criteria to be used when accessing the fieldset
+	/*! Argument \c name defines which parameter of the field description command
+	 *  will be used as a sorting key.
+	 *  Argument \c ord specifies if fields will be sorted in
+	 *  ascending ('<') or descending ('>') order.
+	 *  When more than one parameter are defined as sorting key,
+	 *  the first one varies more quickly
+	 */
+	void sort(const char* name, char ord = '<'); //  '<' = ascending, '>' = descending
+
+	//! Returns the next iterated field
+	/*! This operator sequentially returns a MvField from a MvFieldSet
+	 *  in the order specified by method sort() and - if used - MvFilter object.\n \n
+	 *  Usage:\n
+	 * <PRE>
+	 *  MvRequest  grib;             // a GRIB command
+	 *  MvFieldSet fs(grib);         // construct field set
+	 *
+	 *  MvFieldSetIterator iter(fs); // define an iterator
+	 *  iter.sort("STEP,'>'");       // sort STEP in descending order
+	 *  iter.sort("DATE");           // sort DATE in ascending order
+	 *
+	 *  MvFilter level("LEVEL");
+	 *  MvFilter param("PARAM");
+	 *
+	 *  iter.setFilter(param==129 && level>5 && level<=20);
+	 *
+	 *  MvField field;
+	 *
+	 *  while(field = iter())
+	 *  {
+	 *  	// fields that have PARAM=129 and LEVEL in
+	 *  	// the range [6...20] may be accessed here
+	 *  }
+	 * </PRE>
+	 */
+	MvField& operator()();            // returns NULL at end of list
+
+	//! Rewinds the iterator
+	void rewind()                 { Current = 0; }
+
+};
+#endif
diff --git a/src/libMetview/MvFilter.cc b/src/libMetview/MvFilter.cc
new file mode 100644
index 0000000..f152fbe
--- /dev/null
+++ b/src/libMetview/MvFilter.cc
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+
+void MvFilter::_init(char *name)
+{
+	value *v = new_value(strcache(name));
+	Condition = new_condition(t_val,(condition*)v,NULL);
+}
+
+MvFilter::MvFilter(condition *c)
+{
+	Condition = c;
+}
+
+MvFilter::MvFilter(char *c)
+{
+	_init(c);
+}
+
+MvFilter::MvFilter(const MvFilter& f)
+{
+	Condition = clone_condition(f.Condition);
+}
+
+
+MvFilter::~MvFilter()
+{
+	free_condition(Condition);
+}
+
+
+MvFilter& MvFilter::operator=(const MvFilter& f)
+{
+	free_condition(Condition);Condition = NULL;
+	Condition = clone_condition(f.Condition);
+	return *this;
+}
+
+// Test
+
+
+int MvFilter::operator()(const MvRequest& r)
+{
+	return condition_check(r,Condition);
+}
+
+// Operators
+
+
+MvFilter MvFilter::operator&&(const MvFilter& f)
+{
+	condition *c = new_condition(t_and,
+		clone_condition(Condition),
+		clone_condition(f.Condition));
+	return MvFilter(c);
+}
+
+MvFilter MvFilter::operator||(const MvFilter& f)
+{
+	condition *c = new_condition(t_or,
+		clone_condition(Condition),
+		clone_condition(f.Condition));
+	return MvFilter(c);
+}
+
+MvFilter MvFilter::operator!()
+{
+	condition *c = new_condition(t_not,
+		clone_condition(Condition),NULL);
+	return MvFilter(c);
+}
+
+//------------------------------------------------------------------------
+
+MvFilter MvFilter::_newop(testop op,char *x)
+{
+	MvFilter f(x);
+	condition *c = new_condition(op,clone_condition(Condition),
+		clone_condition(f.Condition));
+	return MvFilter(c);
+}
+
+MvFilter MvFilter::_newop(testop op,double x)
+{
+	char buf[80];
+	sprintf(buf,"%g",x);
+	return _newop(op,buf);
+}
+
+MvFilter MvFilter::_newop(testop op,int x)
+{
+	char buf[80];
+	sprintf(buf,"%d",x);
+	return _newop(op,buf);
+}
+
+MvFilter MvFilter::operator ==(char* x)  { return _newop(t_eq,x); }
+MvFilter MvFilter::operator ==(double x) { return _newop(t_eq,x); }
+MvFilter MvFilter::operator ==(int x)    { return _newop(t_eq,x); }
+MvFilter MvFilter::operator !=(char* x)  { return _newop(t_ne,x); }
+MvFilter MvFilter::operator !=(double x) { return _newop(t_ne,x); }
+MvFilter MvFilter::operator !=(int x)    { return _newop(t_ne,x); }
+MvFilter MvFilter::operator <=(char* x)  { return _newop(t_le,x); }
+MvFilter MvFilter::operator <=(double x) { return _newop(t_le,x); }
+MvFilter MvFilter::operator <=(int x)    { return _newop(t_le,x); }
+MvFilter MvFilter::operator >=(char* x)  { return _newop(t_ge,x); }
+MvFilter MvFilter::operator >=(double x) { return _newop(t_ge,x); }
+MvFilter MvFilter::operator >=(int x)    { return _newop(t_ge,x); }
+MvFilter MvFilter::operator >(char* x)   { return _newop(t_gt,x); }
+MvFilter MvFilter::operator >(double x)  { return _newop(t_gt,x); }
+MvFilter MvFilter::operator >(int x)     { return _newop(t_gt,x); }
+MvFilter MvFilter::operator <(char* x)   { return _newop(t_lt,x); }
+MvFilter MvFilter::operator <(double x)  { return _newop(t_lt,x); }
+MvFilter MvFilter::operator <(int x)     { return _newop(t_lt,x); }
+
+
diff --git a/src/libMetview/MvFilter.h b/src/libMetview/MvFilter.h
new file mode 100644
index 0000000..15d88a2
--- /dev/null
+++ b/src/libMetview/MvFilter.h
@@ -0,0 +1,157 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvFilter_DEFINED
+#define MvFilter_DEFINED
+
+//! Define request filtering conditions
+/*! MvFilter defines filtering conditions on a general MvRequest.
+ *  For instance, MvFilter can be used with MvFieldSetIterator
+ *  to access - from a MvFieldSet - only those MvField objects
+ *  that match the given conditions.\n \n
+ *  This class encapsulates libMars structure \c condition, found in
+ *  files \c lang.h and \c check.c in directory src/libMars.\n \n
+ *  Example:
+ * <PRE>
+ *     MvFilter date ("DATE");
+ *     MvFilter param ("PARAM");
+ *
+ *     MvFilter clause = param==127 && date<20080101 && date>=20070101;
+ * </PRE>
+ */
+class MvFilter {
+
+	condition *Condition;
+
+// private
+
+	void _init(char*);
+	MvFilter _newop(testop,char*);
+	MvFilter _newop(testop,double);
+	MvFilter _newop(testop,int);
+
+	MvFilter(char*,testop,char*);
+
+public:
+        MvFilter(const MvFilter&);  //-- originally private
+
+	//! Constructor, defines the parameter that will be used in a filtering condition
+	MvFilter(char* param);
+
+	//! Constructor, may take an external condition to build the MvFilter or builds an empty MvFilter
+	MvFilter(condition* cond = NULL);
+
+	//! Destructor
+	~MvFilter();
+
+// Copy
+	//! Operator to copy one MvFilter to another in an assignment operation
+	MvFilter& operator=(const MvFilter&);
+
+//  Convertors
+	//! Operator that returns the pointer to the internal condition structure
+	/*! It may be used to check if a condition is defined.
+	 */
+	operator condition*() { return Condition;}
+
+//  Utilities
+	//! Tests \c req against the this filter
+	int operator()(const MvRequest& req);    // Test MvRequest against this
+
+	//! Equality test for a string
+	/*! These three operators build atomic comparison conditions
+	 *  that do an equality test between the parameter defined
+	 *  in the constructor and the argument of the operator
+	 */
+	MvFilter operator ==(char* str);
+
+	//! Equality test for a double
+	MvFilter operator ==(double val);
+
+	//! Equality test for an int
+	MvFilter operator ==(int val);
+
+	//! Non-equality test for a string
+	/*! These three operators build atomic comparison conditions
+	 *  that do a non-equality test between the parameter defined
+	 *  in the constructor and the argument of the operator
+	 */
+	MvFilter operator !=(char* str);
+
+	//! Non-equality test for a double
+	MvFilter operator !=(double val);
+
+	//! Non-equality test for an int
+	MvFilter operator !=(int val);
+
+	//! Less-or-equal test for a string
+	/*! These three operators build atomic comparison conditions
+	 *  that do a less-or-equal test between the parameter defined
+	 *  in the constructor and the argument of the operator
+	 */
+	MvFilter operator <=(char* str);
+
+	//! Less-or-equal test for a double
+	MvFilter operator <=(double val);
+
+	//! Less-or-equal test for an int
+	MvFilter operator <=(int val);
+
+	//! Greater-or-equal test for a string
+	/*! These three operators build atomic comparison conditions
+	 *  that do a greater-or-equal test between the parameter defined
+	 *  in the constructor and the argument of the operator
+	 */
+	MvFilter operator >=(char* str);
+
+	//! Greater-or-equal test for a double
+	MvFilter operator >=(double val);
+
+	//! Greater-or-equal test for an int
+	MvFilter operator >=(int val);
+
+	//! Greater-than test for a string
+	/*! These three operators build atomic comparison conditions
+	 *  that do a greater-than test between the parameter defined
+	 *  in the constructor and the argument of the operator
+	 */
+	MvFilter operator >(char* str);
+
+	//! Greater-than test for a double
+	MvFilter operator >(double val);
+
+	//! Greater-than test for an int
+	MvFilter operator >(int val);
+
+	//! Less-than test for a string
+	/*! These three operators build atomic comparison conditions
+	 *  that do a less-than test between the parameter defined
+	 *  in the constructor and the argument of the operator
+	 */
+	MvFilter operator <(char* str);
+
+	//! Less-than test for a double
+	MvFilter operator <(double val);
+
+	//! Less-than test for an int
+	MvFilter operator <(int val);
+
+	//! Operator that performs the logical \c AND operation on two MvFilter and returns the compound MvFilter
+	MvFilter operator &&(const MvFilter& f);
+
+	//! Operator that performs the logical \c OR operation on two MvFilter and returns the compound MvFilter
+	MvFilter operator ||(const MvFilter& f);
+
+	//! Operator that negates the condition in a MvFilter and returns the new condition
+	MvFilter operator !();
+
+
+};
+#endif
+
diff --git a/src/libMetview/MvFortran.cc b/src/libMetview/MvFortran.cc
new file mode 100644
index 0000000..3ce9df9
--- /dev/null
+++ b/src/libMetview/MvFortran.cc
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvFortran.h>
+#include <signal.h>
+
+MvFortran::MvFortran(const char *name):
+	Name(name),
+	Temp(marstmp())
+{
+	char buf[1024];
+
+	sprintf(buf,"MNAME=%s",(const char*)Name);
+	putenv(strcache(buf));
+
+	sprintf(buf,"MREQUEST=%s",(const char*)Temp);
+	putenv(strcache(buf));
+
+}
+
+MvFortran::~MvFortran()
+{
+	unlink(Temp);
+}
+
+
+void MvFortran::addParameter(double x)
+{
+	MvRequest r("NUMBER");
+	r("VALUE") = x;
+	Param = Param + r;
+	Param.save(Temp);
+}
+
+void MvFortran::addParameter(const char* x)
+{
+	MvRequest r("STRING");
+	r("VALUE") = x;
+	Param = Param + r;
+	Param.save(Temp);
+}
+
+void MvFortran::addParameter(MvFieldSet& fs)
+{
+	Param = Param + fs.getRequest();
+	Param.save(Temp);
+}
+
+int MvFortran::external(const char *cmd)
+{
+	char buf[1024];
+	sprintf(buf,"env PATH=$PATH:$METVIEW_BIN %s 2>&1",cmd);
+
+	int n = -1;
+
+	signal(SIGCLD,SIG_DFL);
+
+	FILE *f = popen(buf,"r");
+
+	if(f) {
+		while(fgets(buf,sizeof(buf),f))
+			marslog(LOG_INFO,"%s",buf);
+		n = pclose(f);
+	}
+
+	return n;
+}
+
+
+MvRequest MvFortran::getResult()
+{
+	Result.read(Temp);
+	return Result;
+}
diff --git a/src/libMetview/MvFortran.h b/src/libMetview/MvFortran.h
new file mode 100644
index 0000000..adcdaab
--- /dev/null
+++ b/src/libMetview/MvFortran.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvFortran_DEFINED
+#define MvFortran_DEFINED
+#include <Metview.h>
+
+//! Implements a wrapper around Fortran programs
+/*! This class is used for porting existing Fortran programs
+ *  to be used as Metview modules, like the ones in directories
+ *  \c src/Divrot, \c src/PottF , \c src/Spectra and \c src/Velstr. \n \n
+ *  The main program, normally written using Metview Application Framework
+ *  (C++), receives the input request, makes a Fortran readable version
+ *  of it using methods addParameter() and then calls the main
+ *  Fortran routine. Fortran routine uses MGET* and MLOADG functions to read
+ *  the input values (these are the very same "M*" functions that
+ *  are documented in Metview User Manual, in chapter 'Using
+ *  FORTRAN in Macro'), and MSET* and MNEWG functions to build
+ *  a reply request. Method getResult() is used in C++ code
+ *  to read the reply request.\n \n
+ *  There is a simple example program in \c src/libMetview,
+ *  files \c DemoFort.cc and \c demofort.f
+ */
+class MvFortran {
+
+	Cached Name;
+	Cached Temp;
+
+	MvRequest Param;
+	MvRequest Result;
+
+public:
+	//! Constructor
+	/*! Argument \c name is used in messages for identification.\n \n
+	 *  Constructor reserves an empty file for the "Fortranized" request
+	 *  and assigns environment variable \c MREQUEST to point to this file.
+	 */
+	MvFortran(const char* name);
+
+	//! Destructor
+	~MvFortran();
+
+	//! Add a numeric value \c val to the list of Fortran parameters
+	void addParameter(double val);
+
+	//! Add a string value \c str to the list of Fortran parameters
+	void addParameter(const char* str);
+
+	//! Add a fieldset \c fs to the list of Fortran parameters
+	void addParameter(MvFieldSet& fs);
+
+	//! Execute an external command \c cmd (rare)
+	int external(const char *cmd);
+
+	//! Get the replay request from the Fortran routine
+	MvRequest getResult();
+};
+
+
+#endif
diff --git a/src/libMetview/MvFunction.cc b/src/libMetview/MvFunction.cc
new file mode 100644
index 0000000..0fba944
--- /dev/null
+++ b/src/libMetview/MvFunction.cc
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdarg.h>
+#include <Metview.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+// it seems that this class is not used anywhere (2008-04-10/vk)
+
+MvFunction* MvFunction::First = NULL;
+
+MvFunction::MvFunction(const char *name, const argdef *args)
+{
+	Arguments = args;
+	Count     = 0;
+	Name      = strcache(name);
+
+	while ( args->name ) { Count++; args++; }
+
+
+	if (First == NULL) support_recording(MvApplication::getService());
+	Next = First;
+	First = this;
+
+	add_function_callback(MvApplication::getService(), Name,  _serve,
+				getInfo(), (argdef*)Arguments, (void *)this);
+}
+
+void MvFunction::record(const char* name, ...)
+{
+	MvFunction *f = First;
+
+	while (f) {
+		if (strcmp(name, f->Name) == 0)
+		{
+			va_list list;
+    		va_start(list,name);
+			record_function(MvApplication::getService(), name,
+				(argdef*)f->Arguments, list);
+			va_end(list);
+			return;
+		}
+		f = f->Next;
+	}
+	marslog(LOG_WARN, "Function %s not found", name);
+}
+#endif
+
diff --git a/src/libMetview/MvFunction.h b/src/libMetview/MvFunction.h
new file mode 100644
index 0000000..d7d7e61
--- /dev/null
+++ b/src/libMetview/MvFunction.h
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef MvFunction_DEFINED
+#define MvFunction_DEFINED
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+// it seems that this class is not used anywhere (2008-04-10/vk)
+
+class MvFunction: public MvTransaction
+{
+	static  MvFunction  *First;
+
+	const argdef 	*Arguments;
+	int		 Count;
+	const char    	*Name;
+	MvFunction 	*Next;
+
+protected:
+	virtual const char* getInfo(void)  { return "No help available"; }
+	MvFunction(MvTransaction*f) : MvTransaction(f) 	{};
+public:
+	MvFunction(const char *name, const argdef *args);
+	static  void record(const char*, ...);
+};
+#endif
+
+#endif
diff --git a/src/libMetview/MvGeoPoints.cc b/src/libMetview/MvGeoPoints.cc
new file mode 100644
index 0000000..fb35968
--- /dev/null
+++ b/src/libMetview/MvGeoPoints.cc
@@ -0,0 +1,1031 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvGeoPoints.cc,   apr03/vk
+
+
+#include "MvGeoPoints.h"
+#include "MvLocation.h"
+#include "MvMiscelaneous.h"
+#include "mars.h"
+#include "inc_stl.h"
+#include "Tokenizer.h"
+
+// the precision with which we write geopoints values
+#define VALUE_PRECISION  (10)
+
+//_____________________________________________________________________
+
+MvGeoP1::MvGeoP1() :
+  gfmt_     ( eGeoTraditional ),
+  latitude_ ( 0 ),
+  longitude_( 0 ),
+  height_   ( 0 ),
+  date_     ( 0 ),
+  time_     ( 0 ),
+  value_    ( 0 ),
+  strValue_ ( "" ),  //-- Doxygen comments!
+  value2_   ( 0 )
+{
+}
+//_____________________________________________________________________
+
+MvGeoP1::MvGeoP1( const MvGeoP1& in )
+{
+  _copy( in );
+}
+//_____________________________________________________________________
+void
+MvGeoP1::_copy( const MvGeoP1& in )
+{
+  gfmt_      = in.gfmt_;
+  latitude_  = in.lat_y();
+  longitude_ = in.lon_x();
+  height_    = in.height();
+  date_      = in.date();
+  time_      = in.time();
+  value_     = in.value();
+  strValue_  = in.strValue();
+  value2_    = in.direc();
+}
+//_____________________________________________________________________
+
+MvGeoP1&
+MvGeoP1::operator = ( const MvGeoP1& in )
+{
+  _copy( in );
+  return *this;
+}
+//_____________________________________________________________________
+
+bool
+MvGeoP1::operator == ( const MvGeoP1& in )
+{
+  if( gfmt_      != in.gfmt_      ) return false;
+  if( latitude_  != in.latitude_  ) return false;
+  if( longitude_ != in.longitude_ ) return false;
+  if( height_    != in.height_    ) return false;
+  if( date_      != in.date_      ) return false;
+  if( time_      != in.time_      ) return false;
+  if( value_     != in.value_     ) return false;
+  if( strValue_  != in.strValue_  ) return false;
+  if( value2_    != in.value2_    ) return false;
+  return true;
+}
+
+//_____________________________________________________________________
+bool
+MvGeoP1::operator <  ( const MvGeoP1& in )
+{
+    if( latitude_ != in.latitude_ )
+        return latitude_ > in.latitude_;      //-- from North to South
+
+    if( longitude_ != in.longitude_ )
+       return longitude_ < in.longitude_;     //-- from West to East
+
+    if(height_ != in.height_ )
+       return height_ < in.height_;
+
+    return false;
+}
+
+//_____________________________________________________________________
+void
+MvGeoP1::extract( const char* line, eGeoFormat geoFmt )
+{
+  char  buf[ 255 ];               //-- for numeric/string check
+
+  gfmt_ = geoFmt;
+
+  istrstream myInput( line );
+  if( gfmt_ == eGeoXYV )	  //-- XYV is 'X_lon,Y _lat, Val' format
+    {
+      myInput >> longitude_ >> latitude_ >> buf;
+
+      _stringOrNumber( buf );
+
+      height_ = 0;
+      date_   = time_  =  0;
+      value2_ = 0;
+    }
+  else
+    {
+      double   d_date;            //-- in case user has floating point valued dates
+      double   d_time;
+
+      if( hasVector() )           //-- polar or XY vector?
+	{
+	  myInput >> latitude_ >> longitude_ >> height_ >> d_date >> d_time >> value_ >> value2_;
+	}
+      else			  //-- TRADITIONAL: Lat/Lon/lev/dat/tim/Val
+	{
+	  myInput >> latitude_ >> longitude_ >> height_ >> d_date >> d_time >> buf;
+
+	  _stringOrNumber( buf );
+
+	  value2_ = 0;
+	}
+
+      date_ = (long)d_date;
+      time_ = (long)d_time;
+    }
+}
+
+//_____________________________________________________________________
+string
+MvGeoP1::column( int col, int& type )
+{
+	type = eGeoVDouble;
+	if ( gfmt_ == eGeoTraditional || gfmt_ == eGeoString )
+	{
+		if ( col == 1 )
+			return metview::toString(lat_y());
+		else if ( col == 2 )
+			return metview::toString(lon_x());
+		else if ( col == 3 )
+			return metview::toString(height());
+		else if ( col == 4 )
+		{
+			type = eGeoVLong;
+			return metview::toString(date());
+		}
+		else if ( col == 5 )
+		{
+			type = eGeoVLong;
+			return metview::toString(time());
+		}
+		else if ( col == 6 )
+			return metview::toString(value());
+		else
+			return string("VALUE NOT DEFINED");
+	}
+	else if ( gfmt_ == eGeoXYV )
+	{
+		if ( col == 1 )
+			return metview::toString(lon_x());
+		else if ( col == 2 )
+			return metview::toString(lat_y());
+		else if ( col == 3 )
+			return metview::toString(value());
+		else
+			return string("VALUE NOT DEFINED");
+	}
+	else if ( gfmt_ == eGeoVectorPolar || gfmt_ == eGeoVectorXY )
+	{
+		if ( col == 1 )
+			return metview::toString(lat_y());
+		else if ( col == 2 )
+			return metview::toString(lon_x());
+		else if ( col == 3 )
+			return metview::toString(height());
+		else if ( col == 4 )
+		{
+			type = eGeoVLong;
+			return metview::toString(date());
+		}
+		else if ( col == 5 )
+		{
+			type = eGeoVLong;
+			return metview::toString(time());
+		}
+		else if ( col == 6 )
+			return metview::toString(value());
+		else if ( col == 7 )
+			return metview::toString(value2());
+		else
+			return string("VALUE NOT DEFINED");
+	}
+
+	return string("FORMAT NOT DEFINED");
+}
+
+//_____________________________________________________________________
+void
+MvGeoP1::_stringOrNumber( char* buf )
+{
+  bool isNumeric = true;
+  int  dcnt = 0;
+  char* p   = buf;
+
+  if( *p == '-' || *p == '+' )         //-- sign is OK
+     ++p;
+
+  if( *p && isalpha( *p ) )
+   {
+     isNumeric = false;                //-- cannot be a number
+   }
+  else
+   {
+     dcnt = _countDigits( p );         //-- (leading) digits?
+     if( dcnt == 0 && *p != '.' )      //-- 0 digits => only decimal point is OK
+        isNumeric = false;
+
+     if( isNumeric && *p == '.' )
+      {
+        ++p;
+        dcnt += _countDigits( p );     //-- trailing digits?
+        if( dcnt == 0 )
+           isNumeric = false;          //-- decimal point without digits
+      }
+
+     if( isNumeric && ( *p == 'e' || *p == 'E' ) )
+      {
+        ++p;
+        if( *p == '-' || *p == '+' )   //-- exponent sign is OK
+           ++p;
+         if( _countDigits( p ) == 0 )
+           isNumeric = false;          //-- digits must follow
+      }
+
+     if( isNumeric && *p && isgraph( *p ) )
+        isNumeric = false;             //-- must not follow by a printable char
+   }
+
+  if( isNumeric )
+    {
+      value_ = atof( buf );            //-- is numeric: convert!
+    }
+  else
+    {
+      strValue_ = buf;                 //-- is string: copy!
+      value_    = 0;
+      gfmt_     = eGeoString;
+    }
+}
+
+//_____________________________________________________________________
+int
+MvGeoP1::_countDigits( char*& p )
+{
+  int dcnt = 0;
+
+  while( p && *p )
+   {
+     if( isdigit( *p ) )
+          ++dcnt;
+     else
+          break;
+
+     ++p;
+   }
+
+  return dcnt;
+}
+
+//_____________________________________________________________________
+bool
+MvGeoP1::sameLocation( const MvGeoP1& in )
+{
+  return latitude_ == in.lat_y() && longitude_ == in.lon_x() && height_ == in.height_;
+}
+
+//_____________________________________________________________________
+void
+MvGeoP1::location( double lat, double lon )
+{
+  while( lon < -180 )
+     lon += 360;
+  while( lon > 360 )
+     lon -= 360;
+  longitude_ = lon;
+
+  if( lat > 90 )
+  {
+     marslog(LOG_INFO, "Geopoint latitude value %g forced to be 90", lat );
+     lat = 90;
+  }
+  if( lat < -90 )
+  {
+     marslog(LOG_INFO, "Geopoint latitude value %g forced to be -90", lat );
+     lat = -90;
+  }
+  latitude_ = lat;
+}
+
+//_____________________________________________________________________
+
+ostream& operator<< ( ostream& aStream, const MvGeoP1& gp )
+{
+  const char cStartOfLine[] = " ";
+  const char cSeparator[]   = "\t";
+
+
+  // General note about precision settings: we must be careful if a
+  // user-callable function to set the precision is created. This is
+  // because we need to ensure that missing values are still correctly
+  // written and read. See the value defined for missing values in
+  // MvGeoPoints.h to see how many decimal places are required for
+  // faithful reading and writing of missing values.
+  // See also MvGeoPoints::write, as this also uses the precision value.
+
+
+  aStream << cStartOfLine;
+
+  int myOldPrec = aStream.precision(); //-- store current floating point precision
+  aStream.precision( 7 );              //-- default of 6 digits may not be enough
+
+  if( gp.format() == eGeoXYV )
+    {
+      aStream << gp.lon_x() << cSeparator
+	      << gp.lat_y() << cSeparator;
+    }
+  else
+    {
+      aStream << gp.lat_y()  << cSeparator
+              << gp.lon_x()  << cSeparator
+	      << gp.height() << cSeparator
+	      << gp.date()   << cSeparator
+              << gp.time()   << cSeparator;
+    }
+
+  aStream.precision( VALUE_PRECISION );  //-- value may need even more precision
+
+  switch( gp.format() )
+    {
+    case eGeoTraditional:
+    case eGeoXYV:
+      aStream << gp.value();
+      break;
+
+    case eGeoString:
+      aStream << gp.strValue().c_str();
+      break;
+
+    case eGeoVectorPolar:
+    case eGeoVectorXY:
+      aStream << gp.speed() << cSeparator
+	      << gp.direc();
+      break;
+    }
+
+  aStream.precision( myOldPrec );     //-- revert back to original precision
+
+  return aStream;
+}
+
+//_____________________________________________________________________
+
+MvGeoPoints::MvGeoPoints() :
+  gfmt_(eGeoTraditional),
+  pts_( 0 ),
+  count_( 0 ),
+  path_( "/file/name/not/given" ),
+  dbSystem_(""),
+  dbPath_("")
+{
+	this->setFormat();
+}
+
+//_____________________________________________________________________
+
+MvGeoPoints::MvGeoPoints( long count ) :
+  gfmt_(eGeoTraditional),
+  count_( count ),
+  path_( "/file/name/not/given" ),
+  dbSystem_(""),
+  dbPath_("")
+{
+	pts_  = new MvGeoP1[ count_ ];
+	this->setFormat();
+}
+
+//_____________________________________________________________________
+
+MvGeoPoints::MvGeoPoints( const MvGeoPoints& gp )
+{
+	_copy( gp );
+}
+
+//_____________________________________________________________________
+
+MvGeoPoints::MvGeoPoints( const char* name, const int nmax ) :
+  pts_( 0 ),
+  count_( 0 )
+{
+  path_ = name;
+  load( nmax );
+}
+
+//_____________________________________________________________________
+
+MvGeoPoints::~MvGeoPoints()
+{
+  delete [] pts_;
+}
+//_____________________________________________________________________
+void
+MvGeoPoints::_copy( const MvGeoPoints& gp )
+{
+  unload();
+
+  gfmt_  = gp.format();
+  count_ = gp.count();
+  sgfmt_ = gp.format();
+  ncols_ = gp.ncols();
+  scols_ = gp.scols();
+  dbSystem_ = gp.dbSystem();
+  dbColumn_ = gp.dbColumn();
+  dbColumnAlias_ = gp.dbColumnAlias();
+  dbPath_ = gp.dbPath();
+  dbQuery_ = gp.dbQuery();
+  
+  if( count_ > 0 )
+    {
+      pts_ = new MvGeoP1[ count_ ];
+      for( int p=0; p<count_; ++p )
+	{
+	  pts_[p] = gp[p];
+	}
+    }
+  else
+      pts_ = 0;
+}
+
+//_____________________________________________________________________
+MvGeoPoints&
+MvGeoPoints::operator = ( const MvGeoPoints& gp )
+{
+  if( &gp == this )
+    return *this;
+
+  unload();
+  _copy( gp );
+
+  return *this;
+}
+
+//_____________________________________________________________________
+void
+MvGeoPoints::newReservedSize( long size )
+{
+  unload();
+  count_ = size;
+  pts_   = new MvGeoP1[ count_ ];
+}
+//_____________________________________________________________________
+void
+MvGeoPoints::format( eGeoFormat fmt )
+{
+  gfmt_ = fmt;
+
+  if( count() > 0 )
+    {
+      for( int p=0; p<count(); ++p )
+	{
+	  pts_[ p ].format( fmt );     //-- change format for each point
+	}
+    }
+}
+
+//_____________________________________________________________________
+bool
+MvGeoPoints::load( const char* path )
+{
+  if( path_ != path && count_ > 0 )
+    unload();                          //-- unload if different data exist
+
+  path_ = path;
+
+  return load();
+}
+
+//_____________________________________________________________________
+bool
+MvGeoPoints::load( const int nmax )
+{
+   if( count_ )
+       return true;
+
+   ifstream f( path_.c_str() );
+   if( ! f )
+   {
+       marslog(LOG_EROR, "Could not open geopoints file: %s", path_.c_str());
+       return false;
+   }
+
+   char line[1024];
+   int  n = 0;
+
+   if ( nmax == 0 )
+   {
+      //-- first count the lines
+      while( f.getline( line, sizeof(line) ) )
+           n++;
+   }
+   else
+      n = nmax;
+
+   unload();
+   pts_ = new MvGeoP1[ n ];
+
+   f.clear();
+   f.seekg(0, ios::beg);
+
+   gfmt_ = eGeoTraditional;
+   n     = 0;
+
+   bool db_info = false;
+   bool db_query = false;
+
+   while( f.getline( line, sizeof(line) ) )
+   {
+      if( strncmp( line, "#DATA", 5 ) == 0 )
+      {
+          break;
+      }
+      else if( strncmp( line, "#FORMAT ", 8 ) == 0 )
+      {
+         const char* fp = line+7;
+         while( fp && *fp == ' ' )
+             ++fp;
+
+         if( strncmp( fp, "POLAR_VECTOR", 12 ) == 0 )
+         {
+            gfmt_ = eGeoVectorPolar;	      //-- polar vector extension
+         }
+         else if( strncmp( fp, "XY_VECTOR", 9 ) == 0 )
+         {
+            gfmt_ = eGeoVectorXY;           //-- cartesian vector extension
+         }
+         else if( strncmp( fp, "XYV", 3 ) == 0 )
+         {
+            gfmt_ = eGeoXYV;		      //-- "French" extension
+         }
+         else if( strncmp( fp, "LLV", 3 ) == 0 )
+         {
+            gfmt_ = eGeoXYV;		      //-- old name for XYV
+         }
+         else
+         {
+            marslog(LOG_EROR, "Unknown geopoints format: %s", fp );
+         }
+
+         // Set format info
+         this->setFormat();
+      }
+
+      //Information about the database, query etc. that
+        //generated the geopoints file
+      else if(strncmp( line, "#DB_INFO ", 8 ) == 0 )
+      {
+         db_info = true;
+      }
+
+      else if(db_info == true && strstr(line, "DB_SYSTEM:") != 0 )
+      {
+         string  sbuf(line);
+         string::size_type pos=sbuf.find("DB_SYSTEM:");
+         sbuf = sbuf.substr(pos+10);
+         dbSystem_=sbuf;
+      }
+
+      else if(db_info == true && strstr(line, "DB_COLUMN:") != 0 )
+      {
+          string  sbuf(line);
+          string::size_type pos=sbuf.find("DB_COLUMN:");
+          sbuf = sbuf.substr(pos+10);
+          vector<string> sv;
+
+          Tokenizer parse(";");
+          parse(sbuf,sv);
+
+          if( gfmt_ == eGeoTraditional && sv.size() == 6)
+          {
+             dbColumn_["lat"]=sv[0];
+             dbColumn_["lon"]=sv[1];
+             dbColumn_["level"]=sv[2];
+             dbColumn_["date"]=sv[3];
+             dbColumn_["time"]=sv[4];
+             dbColumn_["value"]=sv[5];
+          }
+          else if( gfmt_ == eGeoXYV && sv.size() == 3)
+          {
+             dbColumn_["lon"]=sv[0];
+             dbColumn_["lat"]=sv[1];
+             dbColumn_["value"]=sv[2];
+          }
+          else if( (gfmt_ == eGeoVectorPolar || gfmt_ == eGeoVectorXY) && sv.size() == 7)
+          {
+             dbColumn_["lat"]=sv[0];
+             dbColumn_["lon"]=sv[1];
+             dbColumn_["level"]=sv[2];
+             dbColumn_["date"]=sv[3];
+             dbColumn_["time"]=sv[4];
+             dbColumn_["value"]=sv[5];
+             dbColumn_["value2"]=sv[6];
+          }
+      }
+
+      else if(db_info == true && strstr(line, "DB_COLUMN_ALIAS:") != 0 )
+      {
+         string  sbuf(line);
+         string::size_type pos=sbuf.find("DB_COLUMN_ALIAS:");
+         sbuf = sbuf.substr(pos+16);
+
+         vector<string> sv;
+         Tokenizer parse(";");
+         parse(sbuf,sv);
+
+         if( gfmt_ == eGeoTraditional && sv.size() == 6)
+         {
+            dbColumnAlias_["lat"]=sv[0];
+            dbColumnAlias_["lon"]=sv[1];
+            dbColumnAlias_["level"]=sv[2];
+            dbColumnAlias_["date"]=sv[3];
+            dbColumnAlias_["time"]=sv[4];
+            dbColumnAlias_["value"]=sv[5];
+         }
+         else if( gfmt_ == eGeoXYV && sv.size() == 3)
+         {
+            dbColumnAlias_["lon"]=sv[0];
+            dbColumnAlias_["lat"]=sv[1];
+            dbColumnAlias_["value"]=sv[2];
+         }
+         else if( (gfmt_ == eGeoVectorPolar || gfmt_ == eGeoVectorXY) && sv.size() == 7)
+         {
+            dbColumnAlias_["lat"]=sv[0];
+            dbColumnAlias_["lon"]=sv[1];
+            dbColumnAlias_["level"]=sv[2];
+            dbColumnAlias_["date"]=sv[3];
+            dbColumnAlias_["time"]=sv[4];
+            dbColumnAlias_["value"]=sv[5];
+            dbColumnAlias_["value2"]=sv[6];
+         }
+      }
+
+      else if(db_info == true && strstr(line, "DB_PATH:") != 0 )
+      {
+         string  sbuf(line);
+         string::size_type pos=sbuf.find("DB_PATH:");
+         sbuf = sbuf.substr(pos+8);
+         dbPath_=sbuf;
+      }
+
+      else if(db_info == true && strstr(line, "DB_QUERY_BEGIN") != 0 )
+      {
+         db_query=true;
+      }
+
+      else if(db_info == true && db_query == true)
+      {
+         dbQuery_.push_back(line);
+      }
+      else if(strstr(line, "DB_QUERY_END") != 0 )
+      {
+         db_query=true;
+      }
+   }
+
+   db_info=false;
+   db_query=false;
+
+   // Read data
+   if ( nmax == 0 )
+   {
+      while( f.getline( line, sizeof(line) ) )
+      {
+         if( (*line != '#') && (strlen( line ) > 4) )
+         {
+            pts_[n].extract( line, gfmt_ );
+            n++;
+         }
+      }
+   }
+   else
+   {
+      for ( int i = 0; i < nmax; i++ )
+      {
+         if ( !f.getline( line, sizeof(line) ) )
+         {
+             marslog(LOG_EROR, "Geopoints file has less data than expected: %s", path_.c_str());
+             return false;
+         }
+
+         if( (*line != '#') && (strlen( line ) > 4) )
+         {
+            pts_[n].extract( line, gfmt_ );
+            n++;
+         }
+      }
+   }
+
+   count( n );
+
+  return true;
+}
+
+//_____________________________________________________________________
+void
+MvGeoPoints::unload()
+{
+  delete [] pts_;
+
+  pts_   = 0;
+  count_ = 0;
+}
+
+//_____________________________________________________________________
+bool
+MvGeoPoints::write( const char* filename )
+{
+    int nPreviousPrecision;
+
+  ofstream fout( filename );
+  if( ! fout )
+    {
+      marslog(LOG_EROR, "Unable to open geopoints file for writing: %s", filename );
+      return false;
+    }
+
+  fout << "#GEO\n";
+
+  switch( gfmt_ )
+    {
+    case eGeoVectorPolar:
+      fout << "#FORMAT POLAR_VECTOR\n"
+           << "# lat\tlon\theight\tdate\t\ttime\tspeed\tdirection\n";
+      break;
+
+    case eGeoVectorXY:
+      fout << "#FORMAT XY_VECTOR\n"
+           << "# lat\tlon\theight\tdate\t\ttime\tu\tv\n";
+      break;
+
+    case eGeoXYV:
+      fout << "#FORMAT XYV\n"
+           << "# lon-x\tlat-y\tvalue\n";
+      break;
+
+    default:
+      //-- this is for both eGeoTraditional and eGeoString
+      //-- no "#FORMAT" line is needed
+      fout << "# lat\tlon\theight\tdate\t\ttime\tvalue\n";
+      break;
+    }
+
+
+  // Insert a line that will tell the user which value represents missing points.
+  // Take care not to disturb the floating-point precision, but we need to use
+  // the correct one that will actually be used in the file.
+  // Note that the storing and restoring of the original precision value
+  // in the output stream is probably unnecessary, but it is done just once
+  // per geopoints file and so should be insignificant and allows the
+  // implementation of the << operator on a single geopoint to be changed
+  // without unexpected side-effects.
+
+  nPreviousPrecision = fout.precision();
+  fout.precision( VALUE_PRECISION );
+  fout << "# Missing values represented by " << GEOPOINTS_MISSING_VALUE
+       << " (not user-changeable)"           << endl;
+  fout.precision( nPreviousPrecision );
+
+
+  // start the data section
+
+  fout << "#DATA" << endl;
+
+  for( int p=0; p<count_; ++p )
+    {
+      fout << pts_[ p ]
+	   << endl;
+    }
+
+  return true;
+}
+
+//_____________________________________________________________________
+MvGeoP1
+MvGeoPoints::nearestPoint( double lat_y, double lon_x ) const
+{
+  if( count_ == 0 )
+    return MvGeoP1();  //-- should we...
+
+  MvLocation myInputLoc( lat_y, lon_x );
+  MvLocation myFirstLoc( pts_[0].lat_y(), pts_[0].lon_x() );
+
+  double     myShortestDist = myInputLoc.distanceInMeters( myFirstLoc );
+  long       myNearestPi    = 0;
+
+  for( int p=1; p<count_; ++p )
+    {
+      MvLocation myCurrentLoc( pts_[ p ].lat_y(), pts_[ p ].lon_x() );
+      double     myCurrentDist = myInputLoc.distanceInMeters( myCurrentLoc );
+
+      if( myCurrentDist < myShortestDist )
+	{
+	  myShortestDist = myCurrentDist;
+	  myNearestPi    = p;
+	}
+    }
+
+  return pts_[ myNearestPi ];
+}
+
+
+//_____________________________________________________________________
+// MvGeoPoints::indexOfFirstValidPoint
+// Returns the index of the first geopoint that is valid in the set.
+// If none are valid, then -1 is returned.
+// Note that this function only considers the first value in each
+// geopoint, ignoring value2.
+
+long
+MvGeoPoints::indexOfFirstValidPoint() const
+{
+  int i;
+
+  for (i = 0; i < count_; i++)
+  {
+    if (!pts_[i].value_missing())
+    {
+      return i;
+    }
+  }
+
+  // if we got to here, then there are no valid points
+
+  return -1;
+}
+
+//_____________________________________________________________________
+// MvGeoPoints::sort()
+// Sorts points geographically - from North to South, West to East
+void
+MvGeoPoints::sort()
+{
+  if( count() < 2 )   //-- no need to sort if empty or only one point
+     return;
+
+  //-- to make sort faster for huge files, copy input geopoints into
+  //-- several latitude band lists;
+  //-- here we define the width and the number of these latitude bands
+  const double cLatBandSize  = 1.0;
+  const int    cLatBandCount = (int)( 180.0 / cLatBandSize ) + 1;
+
+  //-- STL provides tools for sorting
+  vector< list<MvGeoP1> >  LatListVec;
+  list<MvGeoP1> emptyList;
+  LatListVec.assign( cLatBandCount+1, emptyList );
+
+  //-- first coarse distribution into STL lists that are stored in STL vector
+  for( int s = 0; s < count(); ++s )
+    {
+      int band = cLatBandCount - int( ( pts_[s].lat_y() + 90.5 ) / cLatBandSize );
+
+      //-- if invalid latitude band value then sort into head or tail
+      if( band < 0 )
+	band = 0;
+      else if( band > cLatBandCount )
+	band = cLatBandCount;
+
+      LatListVec[band].push_back( pts_[s] );
+    }
+
+  MvGeoP1* work = new MvGeoP1[ count_ ];
+  int      iOut = 0;
+
+  //-- sort each latitude band STL list and copy to output
+  for( int vecList=0; vecList < cLatBandCount+1; ++vecList )
+    {
+      list<MvGeoP1> curList = LatListVec[vecList];
+      if( ! curList.empty() )
+	{
+	  curList.sort();
+
+	  for( list<MvGeoP1>::iterator p = curList.begin(); p != curList.end(); ++p )
+	    {
+	      work[ iOut ] = *p;
+	      ++iOut;
+	    }
+
+	  curList.clear();
+	}
+    }
+
+  MvGeoP1* tmp = pts_;
+  pts_ = work;
+  delete [] tmp;
+}
+
+//_____________________________________________________________________
+void
+MvGeoPoints::removeDuplicates()
+{
+  if( count() > 0 )
+    {
+      sort();
+
+      MvGeoP1* work = new MvGeoP1[ count_ ];  //-- working point(er) array
+      int      iOut = 0;
+      int      iRem = 0;
+
+      MvGeoP1 curr = pts_[0];                 //-- store now in case there is just 1 point
+      MvGeoP1 prev = pts_[0];                 //-- store the first point
+
+      for( int p=1; p<count_; ++p )           //-- start from the second point
+        {
+          curr = pts_[p];                     //-- current geopoint
+          if( curr == prev )
+            {
+               ++iRem;                        //-- duplicate points => skip prev
+            }
+          else
+            {
+               work[ iOut++ ] = prev;         //-- points non-equal => copy prev
+            }
+          prev = curr;                        //-- store current as previous
+        }
+
+      work[ iOut++ ] = curr;                  //-- last point cannot be duplicate
+
+      MvGeoP1* tmp = pts_;                    //-- swap pointers and remove original geopoints
+      pts_ = work;
+      delete [] tmp;
+
+      count_ = iOut;                          //-- adjust current point count
+
+      // the following line removed at the request of Mark Rodwell
+      // marslog(LOG_INFO, "MvGeoPoints::removeDuplicates: %d duplicates removed", iRem);
+    }
+}
+//_____________________________________________________________________
+void
+MvGeoPoints::offset( double latOffset, double lonOffset )
+{
+  if( count() > 0 )
+    {
+      for( int p=0; p<count_; ++p )
+	{
+	  MvGeoP1 pt = pts_[p];
+	  pts_[p].location( pt.lat_y() + latOffset, pt.lon_x() + lonOffset );
+	}
+    }
+}
+
+void MvGeoPoints::setFormat()
+{
+	// Clean the structure
+	if ( scols_.size() )
+		scols_.clear();
+
+	if ( gfmt_ == eGeoTraditional || gfmt_ == eGeoString)
+	{
+		sgfmt_ = "Traditional";
+		ncols_ = 6;
+		scols_.reserve(ncols_);
+		scols_.push_back("Lat_y");
+		scols_.push_back("Lon_x");
+		scols_.push_back("Level");
+		scols_.push_back("Date");
+		scols_.push_back("Time");
+		scols_.push_back("Value");
+	}
+	else if ( gfmt_ == eGeoXYV )
+	{
+		sgfmt_ = "XYV";
+		ncols_ = 3;
+		scols_.reserve(ncols_);
+		scols_.push_back("Lon_x");
+		scols_.push_back("Lat_y");
+		scols_.push_back("Value");
+	}
+	else if ( gfmt_ == eGeoVectorPolar )
+	{
+		sgfmt_ = "Polar_Vector";
+		ncols_ = 7;
+		scols_.reserve(ncols_);
+		scols_.push_back("Lat_y");
+		scols_.push_back("Lon_x");
+		scols_.push_back("Level");
+		scols_.push_back("Date");
+		scols_.push_back("Time");
+		scols_.push_back("Speed");
+		scols_.push_back("Direction");
+	}
+	else if ( gfmt_ == eGeoVectorXY )
+	{
+		sgfmt_ = "XY_Vector";
+		ncols_ = 7;
+		scols_.reserve(ncols_);
+		scols_.push_back("Lat_y");
+		scols_.push_back("Lon_x");
+		scols_.push_back("Level");
+		scols_.push_back("Date");
+		scols_.push_back("Time");
+		scols_.push_back("U-comp");
+		scols_.push_back("V-comp");
+	}
+
+	return;
+}
+
+string MvGeoPoints::value (long row, int col, int& type)
+{
+	return pts_[ row ].column(col,type);
+}
diff --git a/src/libMetview/MvGeoPoints.h b/src/libMetview/MvGeoPoints.h
new file mode 100644
index 0000000..4772114
--- /dev/null
+++ b/src/libMetview/MvGeoPoints.h
@@ -0,0 +1,370 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvGeoPoints.h,   apr03/vk
+
+
+#include <string>
+#include "inc_iostream.h"
+#include <map>
+#include <vector>
+
+using namespace std;
+
+//! Geopoint missing value indicator
+/*! Background: the choice of value depended on three things:
+ * <UL>
+ *  <LI> it should be large enough to be outwith the theoretical
+ *     range of any meteorological parameter
+ *  <LI> it should be small enough to fit into a standard \c float
+ *     variable (courtesy to users who may write their own programs
+ *     that load geopoints files using single-precision floating point)
+ *  <LI> it should have a minimum number of digits in its printed value
+ *     so that it is immune to any change to the printed precision
+ *     of geopoints values (there may, in the future, be a user-callable
+ *     function to set this parameter).
+ * </UL>
+ */
+#define GEOPOINTS_MISSING_VALUE     3.0E+38
+
+
+//const double cIsStringValue = 0.5e37;
+
+//! \enum eGeoFormat Enum for different geopoints file types
+enum eGeoFormat
+{
+   eGeoTraditional    /**< - lat_y / lon_x / level / date / time / value */
+  ,eGeoString         /**< - lat_y / lon_x / level / date / time / stringValue */
+  ,eGeoXYV            /**< - lon_x / lat_y / value */
+  ,eGeoVectorPolar    /**< - lat_y / lon_x / level / date / time / speed / direction */
+  ,eGeoVectorXY       /**< - lat_y / lon_x / level / date / time / u-comp / v-comp */
+};
+
+//! \enum eGeoValueType Enum for different geopoints data types
+enum eGeoValueType { eGeoVString, eGeoVDouble, eGeoVLong };
+
+//_____________________________________________________________________
+//! A class for a single geopoint, normally stored in MvGeoPoints file
+/*! Geopoints is the format used by Metview to handle spatially irregular
+ *  data (e.g. observations) in a non-BUFR format.\n \n
+ *  Metview geopoints format has several flavours, see enum ::eGeoFormat.
+ */
+class MvGeoP1
+{
+    //! Friend function to write one point (one line) into a MvGeoPoints file
+    friend ostream& operator<< ( ostream& aStream, const MvGeoP1& gp );
+
+ public:
+    //! Constructor
+    MvGeoP1();
+
+    //! Copy constructor
+    MvGeoP1( const MvGeoP1& in );
+
+    //! Destructor
+    ~MvGeoP1(){}
+
+    //! Assignment operator
+    MvGeoP1& operator =  ( const MvGeoP1& gp1 );
+
+    //! Equality operator returns \c true when all data values are the same
+    /*! Note that the longitude values are compared as such, i.e.
+     *  they are not normalised for comparison. Thus points that otherwise
+     *  are equal and which represent the same geographical latitude point
+     *  but with different sign (e.g. -60E and 270E), are NOT considered equal.
+     */
+    bool     operator == ( const MvGeoP1& gp1 );
+
+    //! Less-than operator, used for sorting MvGeoPoints objects
+    /*! Compares the values of latitude, longitude, and height.
+     *  When deciding which geopoint is "less-than", latitude is
+     *  is considered as the most significant value and the height
+     *  is considered the least significant value. \n \n
+     *  Note that longitude values are compared as such, i.e.
+     *  they are not normalised for comparison. Thus the following
+     *  three points - all located on the same latitude circle and
+     *  have the same height - have the following relation (values
+     *  inside square brackets are [latitude,longitude,height]):
+     * <PRE>
+     *  [45,-60,1000] < [45,0,1000] < [45,270,1000]
+     * </PRE>
+     *  although in the real world the first point <TT>[45,-60,1000]</TT>
+     *  and the third point <TT>[45,270,1000]</TT> refer to the same
+     *  geographical location.
+     */
+    bool     operator <  ( const MvGeoP1& gp1 );
+
+    //! Extracts data values from a line from a geopoints file
+    /*! Used mainly by class MvGeoPoints to access geopoints files.
+     */
+    void   extract( const char* line, eGeoFormat geoFmt = eGeoTraditional );
+
+    //! Returns the column value
+    string column ( int, int& );
+
+    //! Returns the latitude value (alias \c Y value)
+    double lat_y()   const { return latitude_;  }
+
+    //! Returns the longitude value (alias \c X value)
+    double lon_x()   const { return longitude_; }
+
+    //! Returns the height value
+    double height()  const { return height_;    }
+
+    //! Returns the date value
+    long   date()    const { return date_;      }
+
+    //! Returns the time value
+    long   time()    const { return time_;      }
+
+    //! Returns the string value
+    /*! Returns an empty string if the point has a numerical value.
+     */
+    string strValue()const { return strValue_;  }
+
+    //! Returns the (first) value
+    double value()   const { return value_;     }
+
+    //! Alias for \c value(), returns the first value (wind speed)
+    double speed()   const { return value_;     }  //-- alias for value()
+
+    //! Returns the second value
+    double value2()  const { return value2_;    }
+
+    //! Alias for \c value2(), returns the second value (wind direction)
+    double direc()   const { return value2_;    }  //-- alias for value2()
+
+    //! Change the latitude value. No checks on the value are done.
+    void   lat_y( double lat ) { latitude_ = lat; }
+
+    //! Change the longitude value. No checks on the value are done.
+    void   lon_x( double lon ) { longitude_ = lon; }
+
+    //! Change the height value. No checks on the value are done.
+    void   height( double h ) { height_ = h; }
+
+    //! Change the date value. No checks on the value are done.
+    void   date( long d ) { date_ = d; }
+
+    //! Change the time value. No checks on the value are done.
+    void   time( long t ) { time_ = t; }
+
+    //! Change the (first) value
+    void   value( double v ) { value_ = v;  }      //-- set value
+
+    //! Change the second value
+    void   value2( double v ){ value2_ = v; }      //-- set value2
+
+    //! Change the wind speed (the second) value
+    void   direc( double v ) { value2_ = v; }      //-- set direction, alias for value2
+
+    //! Change the point format
+    void   format( eGeoFormat fmt ) { gfmt_ = fmt; }
+
+    //! Returns \c true when latitude, longitude and height values are equal
+    bool   sameLocation( const MvGeoP1& gp1 );
+
+    //! Assigns new latitude/longitude values to the point
+    /*! The given values are checked for validity:
+     *  the latitude value is forced between [-90...90] and the
+     *  longitude value is "semi-normalised" to fall between [-180...360].
+     */
+    void   location( double lat, double lon ); //{ latitude_=lat; longitude_=lon; }
+
+    //! Returns the enum value of the geopoint format of the point
+    eGeoFormat format() const { return gfmt_; }
+
+    //! Returns \c true if the point has a string value
+    bool       hasStringValue() const { return gfmt_ == eGeoString; }
+
+    //! Returns \c true if the point has two values, i.e. it represents a vector
+    bool       hasVector() const
+	               { return gfmt_ == eGeoVectorPolar || gfmt_ == eGeoVectorXY; }
+
+    //! Returns \c true if the (first) value is missing
+    bool    value_missing() const {return  (value_  == GEOPOINTS_MISSING_VALUE);}
+
+    //! Returns \c true if the second value is missing
+    bool    direc_missing() const {return  (value2_ == GEOPOINTS_MISSING_VALUE);}
+
+    //! Returns \c true if either of the values is missing
+    bool    any_missing()   const {return ((value_  == GEOPOINTS_MISSING_VALUE) || (value2_ == GEOPOINTS_MISSING_VALUE));}
+
+    //! Sets the (first) value missing
+    void    set_value_missing()   {value_  = GEOPOINTS_MISSING_VALUE;}  // set to missing
+
+    //! Sets the second value missing
+    void    set_direc_missing()   {value2_ = GEOPOINTS_MISSING_VALUE;}  // set to missing
+
+// protected:
+ private:
+    void   _copy( const MvGeoP1& gp1 );
+    void   _stringOrNumber( char* buf );
+    int    _countDigits( char*& p );
+
+ protected:
+    eGeoFormat gfmt_;
+    double     latitude_;
+    double     longitude_;
+    double     height_;
+    long       date_;
+    long       time_;
+    double     value_;             //-- value can be either numeric...
+    string     strValue_;          //-- ...or a string
+    double     value2_;            //-- for vector data (direction)
+};
+
+//_____________________________________________________________________
+//! A class for handling geopoints files
+/*! Geopoints is the format used by Metview to handle spatially irregular
+ *  data (e.g. observations) in a non-BUFR format.\n \n
+ *  Metview geopoints format has several flavours, see enum ::eGeoFormat.\n \n
+ *  Individual points are stored in an array of MvGeoP1 objects.
+ */
+class MvGeoPoints
+{
+
+ public:
+	//! Constructor
+	MvGeoPoints();
+
+	//! Copy constructor
+	MvGeoPoints( const MvGeoPoints& );
+
+	//! Constructor with a name of a geopoints file as the argument
+	/*! Loads geopoints from the file into memory. If nmax is given, only
+       nmax geopoints are loaded into memory.
+	 */
+	MvGeoPoints( const char *name, const int nmax=0 );
+
+	//! Constructor to create a geopoints object with \c count empty points
+	MvGeoPoints( long  count );
+	//	MvGeoPoints(fieldset*,int);
+	//	MvGeoPoints(MvGeoPoints *,fieldset*,int);
+
+	//! Destructor
+	~MvGeoPoints();
+
+	//! Assigment operator
+	MvGeoPoints& operator = ( const MvGeoPoints& gp );
+
+	//! Access operator to extract \c n'th point
+	/*! Index \c n starts from zero, i.e. n=0,1,2,3...
+	 */
+	MvGeoP1& operator [] ( long n ) const { return pts_[ n ]; }
+
+	//! Returns an element given row and column
+	string value (long, int, int&);
+
+	//! Returns the format of points in MvGeoPoints object
+	eGeoFormat format() const { return gfmt_; }
+	string sFormat() const { return sgfmt_; }
+
+	//! Sets the format for points in MvGeoPoints object
+	void format( eGeoFormat fmt );
+
+	//! Returns the column information
+	int ncols() const { return ncols_; }
+	vector<string> scols() const { return scols_; }
+	string scol( int index ) const { return scols_[index]; }
+
+	//! Set geopoints format info
+	void setFormat();
+
+	//! Returns \c true if MvGeoPoints object contains geovectors
+	bool       hasVectors() const
+	               { return gfmt_ == eGeoVectorPolar || gfmt_ == eGeoVectorXY; }
+
+	//! Resets the size of MvGeoPoints object to be \c n points
+	/*! Old points are deleted and \c n new empty points are created.
+	 */
+	void     newReservedSize( long n );
+
+	//! Returns the number of points in MvGeoPoints object
+	long     count()   const { return count_; }
+
+	//! Resets the number of points to be \c n
+	/*! Note that this method does not change point values and that
+	 *  it is meant to be used only to decrease the number of active
+	 *  points in the file.\n \n
+	 *  Use method newReservedSize() to increase the number of available points.
+	 */
+	void     count( long n ) { count_ = n; }    //-- make smaller only!!
+
+	//! Returns the geopoint closest to the given latitude-longitude location
+	MvGeoP1  nearestPoint( double lat_y, double lon_x ) const;
+
+	//! Returns the index of the first point not having a missing value
+	/*! Note: index starts from zero.
+	 */
+	long     indexOfFirstValidPoint() const;
+
+	//! Loads points data from file \c filename to memory
+	bool     load( const char* filename );
+
+	//! Releases points data from memory
+	void     unload();
+
+	//! Writes geopoints to file \c filename
+	bool     write( const char* filename );
+
+	//! Sorts geopoints using MvGeoP1::operator<
+	void     sort();
+
+	//! Removes duplicate geopoints
+	/*! First all points are sorted using sort() and then all duplicate
+	 *  points are removed. Operator MvGeoP1::operator== is used to
+	 *  test the equality.
+	 */
+	void     removeDuplicates();
+
+	//! Offsets the latitude/longitude values
+	/*! This method can be used to print values from two or more
+	 *  MvGeoPoints objects containing same locations, to prevent
+	 *  the values to be printed on top of each other.\n \n
+	 *  Note that the offset values are given in degrees and thus
+	 *  the visual offset on the plot depends on the scale of
+	 *  the plot (which also depends on the level of zooming).
+	 */
+	void     offset( double latOffset, double lonOffset );
+
+	//! Information about the database, query etc. that generated the geopoints data
+	string dbSystem() const {return dbSystem_;}
+	const map<string,string>& dbColumn() const {return dbColumn_;}
+ 	string dbColumn(string col)
+		{return (dbColumn_.find(col) != dbColumn_.end()) ? dbColumn_[col]:"";}
+	const map<string,string>& dbColumnAlias() const {return dbColumnAlias_;}
+	string dbColumnAlias(string col)
+		{return (dbColumnAlias_.find(col) != dbColumnAlias_.end()) ? dbColumnAlias_[col]:"";}
+	string dbPath() const {return dbPath_;}
+	const vector<string>& dbQuery() const {return dbQuery_;}
+
+	//! Members
+	//! Returns filename
+	string path() const { return path_; }
+
+ private:
+	void _copy( const MvGeoPoints& gp );
+	bool load( const int nmax=0 );
+
+ protected:
+	eGeoFormat		gfmt_;
+	MvGeoP1*			pts_;
+	long				count_;
+	string			path_;
+	string			sgfmt_;
+	vector<string>		scols_;
+	int				ncols_;
+
+	string     		dbSystem_;
+	map<string,string>	dbColumn_;
+	map<string,string>	dbColumnAlias_;
+	string			dbPath_;
+	vector<string>		dbQuery_;
+};
diff --git a/src/libMetview/MvGrid.cc b/src/libMetview/MvGrid.cc
new file mode 100644
index 0000000..b3ea9cb
--- /dev/null
+++ b/src/libMetview/MvGrid.cc
@@ -0,0 +1,2964 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvGrid.cc,    vk  Aug-98
+
+#include "inc_iostream.h"
+#include <math.h>
+#include <ctype.h>
+#include "MvGrid.h"
+#include "MvException.h"
+#include "proj_braz.hpp"
+
+// define this if you want to use a version of MvLatLonGrid::interpolatePoint()
+// which uses built_in grib_api functions to get the nearest 4 points.
+// Note that the grib_api version is probably slower (not tested), and it
+// chooses different points when the point to be interpolated lies on
+// a grid line. Still, it's interesting for comparison.
+
+#undef USE_GRIB_API_FOR_INTERPOLATE
+
+
+GaussianLatitudes MvGaussianGridBase::gLatitudes_;  // global variable for the class
+
+
+const long   cFirstLatInd       =  3; //--  4 in Fortran
+const long   cScanModeInd       = 10; //-- 11 in Fortran (CHECK if new classes added!!!)
+
+const long   cOctetBit1  =  0x80;
+const long   cOctetBit2  =  0x40;
+const long   cOctetBit3  =  0x20;
+
+const double cFullGlobeLimit    = 359.9;
+const double cGridEpsilon       = 5e-5;    //-- 0.05 millidegrees
+const double cToRadians         = M_PI/180.0;
+const double cToDegrees         = 180.0/M_PI;
+
+const double cEarthRadius       = 6371200.0;   //-- MARS code
+//const double cEarthRadius       = 6367470.0;   //-- WMO, for GRIB headers
+//const double cEarthRadius       = 6371221.3;   //-- NCAR Fortran routines
+
+
+//-- temporary function:
+void grib_api_port_missing( const char* msg )
+{
+   cout << ">>>>\n"
+        << ">>> GRIB_API port not done for: \n"
+        << ">> " << msg << "\n"
+        << ">  " << endl;
+   marslog(LOG_INFO,"grib_api missing: %s",msg);
+}
+
+//-- temporary function:
+void nontested_grib_api_port( const char* msg )
+{
+   marslog(LOG_INFO,"not-fully-tested grib_api mod: %s",msg);
+}
+
+
+//===================================================================
+//
+// MvGridBase:
+// ----------
+
+MvGridBase::MvGridBase( field* myfield, field_state oldState, bool memoryToBeReleased )
+ : field_( myfield )
+ , vertCoord_( 0 )
+ , vertCoordPairCount_( 0 )
+ , gridType_( "NA" )
+ , horisLines_( 0 )
+ , horisPoints_( 0 )
+ , horisPointCount_( 0 )
+ , currentIndex_( 0 )
+ , currentLaty_( 0.0 )
+ , currentLonx_( 0.0 )
+ , dx_( 0 )
+ , oldState_( oldState )
+ , memoryToBeReleased_( memoryToBeReleased )
+{
+   field_->refcnt++;
+
+
+   // Internally, libMars deletes a field's request after decrementing its request's
+   // reference. But the requests' references are not incremented by most
+   // procedures, but they are when copying a field to another because a copy
+   // is not made, just a pointer to the same request. If a copy has been made, then
+   // the ref counter for the request is now '1'. If both fields which use the same
+   // request are destroyed, then the first one sets the ref count to '0' and
+   // deletes the request memory. The second sets the ref count to '1' and tries
+   // to delete the request memory again! Therefore, we should increment the ref
+   // count here. As far as the current MARS code is concerned, there is no
+   // difference between a ref count of '0' and '1' - both are decremented
+   // and then tested: "if(g->refcnt <= 0)" - both pass this test. So this
+   // modification only affects the case when a copy of a field has been made,
+   // causing the ref count to be 2.
+
+   if (field_->r !=0) field_->r->refcnt++;
+}
+//------------------------------------------------------
+
+MvGridBase::~MvGridBase()
+{
+  if( field_ && memoryToBeReleased_ )
+    {
+//      if( memoryToBeReleased_ )
+//	{
+//	  release_field( field_ );
+//	}
+
+      bool restore_field_state = (field_->refcnt > 1);  // see comment below, and note that free_field will decrement field_->refcnt
+      free_field( field_ );
+
+
+      // it's possible that this will not have actually freed the field, for instance
+      // if the underlying field_ is used in another MvGrid. We check the reference counter
+      // because if it is <=0, then libMars/free_field() will have released the memory,
+      // but otherwise it will not have. In this case, we should reset the shape
+      // of the field to what it was before we instantiated this MvGrid.
+
+      if(restore_field_state)
+        set_field_state( field_, oldState_ );
+    }
+
+  if( vertCoord_ )
+     delete [] vertCoord_;
+
+  //  cout << "MvGridBase::~MvGridBase(): currentIndex_ = " << currentIndex_ << endl;
+}
+//------------------------------------------------------
+long
+MvGridBase::getLong( const char* name, bool throwOnError ) const
+{
+   long val = -999999999;
+   int  err = grib_get_long( field_->handle, name, &val );
+   if( err )
+     {
+       string ge = grib_get_error_message (err);
+       string s("grib_get_long: error getting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       if( throwOnError )
+            throw MvException( s.c_str() );
+     }
+
+   return val;
+}
+//------------------------------------------------------
+long
+MvGridBase::getLongArray( const char* name, long **lvals, bool throwOnError ) const
+{
+   size_t numVals = 0;
+
+   int err1 = grib_get_size(field_->handle, name, &numVals);
+   int err2 = 1;
+
+   if (!err1 && numVals != 0)
+   {
+        *lvals = (long *) malloc (numVals * sizeof(long));
+        err2 = grib_get_long_array (field_->handle, name, *lvals,  &numVals);
+   }
+
+   if( err1 || err2 )
+   {
+       string ge = grib_get_error_message (err1 ? err1 : err2);
+       string s("grib_get_long_array: error getting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       if( throwOnError )
+            throw MvException( s.c_str() );
+   }
+
+   return numVals;
+}
+//------------------------------------------------------
+bool
+MvGridBase::setLong( const char* name, long val )
+{
+   int  err = grib_set_long( field_->handle, name, val );
+   if( err )
+     {
+       string ge = grib_get_error_message (err);
+       string s("grib_set_long: error setting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       //throw MvException( s.c_str() );
+       return false;
+     }
+
+   return true;
+}
+//------------------------------------------------------
+double
+MvGridBase::getDouble( const char* name, bool throwOnError ) const
+{
+   double val = DBL_MAX;
+   int    err = grib_get_double( field_->handle, name, &val );
+   if( err )
+     {
+       string ge = grib_get_error_message (err);
+       string s("grib_get_double: error getting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       if( throwOnError )
+            throw MvException( s.c_str() );
+     }
+
+   return val;
+}
+//------------------------------------------------------
+long
+MvGridBase::getDoubleArray( const char* name, double **dvals, bool throwOnError ) const
+{
+   size_t numVals = 0;
+
+   int err1 = grib_get_size(field_->handle, name, &numVals);
+   int err2 = 1;
+
+   if (!err1 && numVals != 0)
+   {
+        *dvals = (double *) malloc (numVals * sizeof(double));
+        err2 = grib_get_double_array (field_->handle, name, *dvals,  &numVals);
+   }
+
+   if( err1 || err2 )
+   {
+       string ge = grib_get_error_message (err1 ? err1 : err2);
+       string s("grib_get_double_array: error getting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       if( throwOnError )
+            throw MvException( s.c_str() );
+   }
+
+   return numVals;
+}
+//------------------------------------------------------
+bool
+MvGridBase::setDouble( const char* name, double val )
+{
+   int  err = grib_set_double( field_->handle, name, val );
+   if( err )
+     {
+       string ge = grib_get_error_message (err);
+       string s("grib_set_double: error setting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       //throw MvException( s.c_str() );
+       return false;
+     }
+
+   return true;
+}
+//------------------------------------------------------
+bool
+MvGridBase::setString( const char* name, string &val )
+{
+   size_t len = val.size();
+   int  err = grib_set_string( field_->handle, name, val.c_str(), &len);
+   if( err )
+     {
+       string ge = grib_get_error_message (err);
+       string s("grib_set_string: error setting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       //throw MvException( s.c_str() );
+       return false;
+     }
+
+   return true;
+}
+//------------------------------------------------------string
+string
+MvGridBase::getString( const char* name, bool throwOnError ) const
+{
+   string val("NA");
+
+   const size_t cMaxBuf = 99;
+   char strbuf[ cMaxBuf+1 ];
+   size_t slen = cMaxBuf;
+
+   int  err = grib_get_string( field_->handle, name, strbuf, &slen);
+   if( err )
+     {
+       string ge = grib_get_error_message (err);
+       string s("grib_get_string: error getting ");
+       s = s + name + " (" + ge + ")";
+       marslog( LOG_WARN, "%s", s.c_str() );
+       cerr << ">>>>>-------------------------------------------------\n"
+            << ">>>>\n"
+            << ">>>  " << s <<"\n"
+	    << ">>\n"
+	    << ">" << endl;
+       if( throwOnError )
+            throw MvException( s.c_str() );
+     }
+   else
+     val = strbuf;
+
+   return val;
+}
+//------------------------------------------------------
+long
+MvGridBase::vertCoordCoefPairCount()
+{
+   if( vertCoordPairCount_ == 0 )
+      vertCoordPairCount_ = getLong("numberOfVerticalCoordinateValues") / 2;
+
+   return vertCoordPairCount_;
+}
+//------------------------------------------------------
+bool
+MvGridBase::vertCoordCoefs( double& C1, double& C2, int level)
+{
+   C1 = C2 = 0;
+
+   int nvccp = (int)vertCoordCoefPairCount();
+   if( level > nvccp )
+    {
+      marslog( LOG_EROR
+             , "MvGridBase::vertCoordCoefs: not enough coefficients in GRIB header for level %d"
+             , level );
+      return false;
+    }
+
+   if( ! vertCoord_ )                        //-- get vertical coordinate coefficients
+    {
+      size_t nvc_st = (size_t)(nvccp*2);
+      vertCoord_ = new double[nvc_st];
+      int   err  = grib_get_double_array( field_->handle, "pv", vertCoord_, &nvc_st );
+      if( err )
+       {
+         marslog(LOG_EROR, "MvGridBase::vertCoordCoefs: unable to access coefficients");
+         return false;
+       }
+    }
+
+   C1 = vertCoord_[ level ];
+   C2 = vertCoord_[ level + nvccp ];
+
+   return true;
+}
+
+//------------------------------------------------------
+#if 0
+bool
+MvGridBase::getValues()
+{
+   if( values_ )                              //-- got them already
+      return true;
+
+   if( ! field_ )                              //-- not possible!
+      return false;
+
+   size_t  values_length = 0;
+   grib_get_size( field_->handle, "values", &values_length );
+   values_ = new double[ values_length*sizeof(double) ];
+
+   int ret = grib_get_double_array( field_->handle, "values", values_, &values_length );
+
+   if( ret != GRIB_SUCCESS )
+     {
+        marslog(LOG_EROR, "MvGridBase::getValues(): grib_get_double_array() failed!");
+        return false;
+     }
+
+   return true;
+}
+#endif
+
+//------------------------------------------------------
+double
+MvGridBase::valueAt( int i ) const
+{
+    if (field_)
+    {
+        // if the field is not currently expanded in memory, then use grib_api's
+        // function to retrieve the value we want
+
+        if (field_->shape != expand_mem)
+        {
+            double val;
+
+            if (grib_get_double_element(field_->handle, "values", i, &val) == 0)
+                return val;
+            else
+                return mars.grib_missing_value;
+        }
+        else
+        {
+            // just index into our array of pre-loaded values
+
+            return field_->values[i];
+        }
+    }
+    else
+        return mars.grib_missing_value;
+}
+
+
+//------------------------------------------------------
+double
+MvGridBase::operator[](int index)
+{
+    return valueAt(index);
+}
+
+//------------------------------------------------------
+
+bool MvGridBase::isEqual( const MvGridBase* mygrid ) const
+{
+   if( ! ( field_ && mygrid->field_ ) )
+      return false;              //-- must contain fields
+
+   if( gridType_ != mygrid->gridType_ )
+      return false;              //-- must have same representation
+
+   if( length() != mygrid->length() )
+      return false;              //-- must have same size
+
+   //-- WARNING:
+   //-- cScanModeInd is the same for all so far implemented grid types (011025/vk)
+   //--
+   long scanMod1 = getLong( "scanningMode" );
+   long scanMod2 = mygrid->getLong( "scanningMode" );
+   if( scanMod1 != scanMod2 )
+      return false;              //-- must have same scanning mode
+
+   return true;
+}
+//------------------------------------------------------
+
+MvGridPoint MvGridBase::nearestGridpoint( double lat_y, double lon_x )
+{
+  //--
+  //--  This is a generic non-optimised method!
+  //--  Derived classes should provide optimised solutions.
+  //--
+
+   if( ! field_ )
+      return cMissingPoint;	//-- must be valid message
+
+   MvLocation myPoint( lat_y, lon_x );
+
+   init();
+   MvGridPoint myCurrentPoint = gridPoint();
+   MvGridPoint myClosestPoint = myCurrentPoint;
+   double      myClosestDistance = myCurrentPoint.loc_.distanceInMeters( myPoint );
+
+   for( int p=1; p<length(); ++p )
+   {
+      advance();
+      myCurrentPoint = gridPoint();
+      double myDistance = myCurrentPoint.loc_.distanceInMeters( myPoint );
+      if( myDistance < myClosestDistance )
+      {
+         myClosestPoint = myCurrentPoint;
+         myClosestDistance = myDistance;
+      }
+   }
+
+/*
+   cout << "INFO: "
+        << MvLocation(lat_y,lon_x)
+        << ": nearest grid point at "
+	<< myClosestPoint.loc_
+	<< ", distance "
+	<< ( (int)(myClosestDistance/100.0) / 10.0 )  //-- xx.x km
+	<< " km"
+	<< endl;
+*/
+   return myClosestPoint;
+}
+//------------------------------------------------------
+
+double MvGridBase::interpolatePoint( double lat_y, double lon_x )
+{
+  //--
+  //--  This is a generic Quick&Dirty approximation!
+  //--  Derived classes should provide accurate solutions.
+  //--
+
+  marslog( LOG_INFO, "Nearest grid point used (no interpolation for this grid type)" );
+  return nearestGridpoint( lat_y, lon_x ).value_;
+}
+//------------------------------------------------------
+
+bool MvGridBase::getMatrixNN( double, double, MvMatrix& )
+{
+  marslog( LOG_INFO, "Function GetMatrixNN not implemented for this grid type" );
+
+  return false;
+}
+//------------------------------------------------------
+
+void MvGridBase::init()
+{
+   //-- to access values (via MARS interface) msg needs to be expanded
+   // Aug 2008 - no, MvGrid is no longer just for accessing grid values
+   // - don't *assume* that we want the values at all now.
+   //ir set_field_state( field_, expand_mem );
+
+   currentIndex_ = 0;
+   currentLaty_  = firstLatY();
+   currentLonx_  = firstLonX();
+}
+//------------------------------------------------------
+
+bool
+MvGridBase::ScanModeCheck( double first, double last, double step ) const
+{
+  if( first > last && step < 0 )
+    return true;
+  if( first < last && step > 0 )
+    return true;
+
+  marslog( LOG_EROR
+	 , "Ambiguous grid definition: first=%g, last=%g, step=%g"
+	 , first
+	 , last
+	 , step
+	 );
+  return false;
+}
+//------------------------------------------------------
+
+double MvGridBase::weight() const
+{
+   return cos( lat_y() * cToRadians ) / horisPoints_;
+}
+//------------------------------------------------------
+//---  averageCalc - calculate averages within given area,
+//--   either NS or EW directions, into a vector with given
+//-    grid interval
+//
+vector<double>
+MvGridBase::averageCalc(bool isEW, double N, double W, double S, double E, double grid)
+{
+  const double cEps = 0.01;
+
+  if( ! field_ )
+    throw MvException("averageCalc: GRIB problems");
+
+  if( grid <= 0 )
+    {
+      grid = 1;
+      marslog(LOG_INFO, "average_xx: grid interval negative or zero, set to 1");
+    }
+
+  double dif        = ( E - W ) - 360.0; //-- check if E/W boarders coincide
+  bool   isGlobalEW = dif < cEps && dif > -cEps;
+
+  double halfGrid = grid/2;
+  double N2 = N + halfGrid;
+  double W2 = W - halfGrid;
+  double S2 = S - halfGrid + cEps/4; //-- full half grid may introduce index overflows!
+  double E2 = E + halfGrid - cEps/4;
+
+  MvGeoBox box( N2, W2, S2, E2 );
+  if( isGlobalEW )
+    {
+      box.set( N2, W, S2, E );  //-- if global then do not extend EW boarders
+      marslog( LOG_DBUG, "averageComp: area is global W->E!" );
+    }
+
+  double geoDif   = isEW ? (N-S) : (E-W);
+  int    listSize = (int)( geoDif / grid ) + 1;
+
+  vector<double>  sum( listSize, 0.0 );
+  vector<double>  wgt( listSize, 0.0 );
+
+  for( int p=0; p < length(); ++p )
+    {
+      if( box.isInside( lat_y(), lon_x() ) )
+	{
+	  //-- index: first distance from the edge (minus halfGrid), in degrees
+	  double dist;
+	  if( isEW )
+	      dist = N2 - lat_y();
+	  else
+	    {
+	      double lonX = lon_x();
+	      if( lonX > E2 )
+		dist = lonX-360.0 - W2;
+	      else
+		dist = lonX - W2;
+	    }
+
+	  //-- index 'ip': convert distance into output-grid intervals
+	  int ip = (int)( dist / grid );
+
+	  //-- Do we need latitude weighting for average? if not then use "#if 1"
+	  //-- Questions about weighting:
+	  //--    - What about points over Poles?
+	  //--          => With current weighting these are totally ignored!
+	  //--    - What if gridpoints are in Polar Stereographic grid?
+	  //--          => Should we use opposite type of weighting?
+#if 0
+	  sum[ip] += value();
+	  wgt[ip] += 1.0;
+#else
+	  if (hasValue())  // only count valid values
+	  {
+	    sum[ip] += weight()*value();
+	    wgt[ip] += weight();
+	  }
+#endif
+	}
+      advance();
+    }
+
+  if( ! isEW )         //-- in North-South average, check if W->E global
+    {
+      if( isGlobalEW ) //-- index calculation may split points at edges
+	{
+	  sum[0] += sum[listSize-1];
+	  wgt[0] += wgt[listSize-1];
+
+	  sum[listSize-1] = sum[0];
+	  wgt[listSize-1] = wgt[0];
+	}
+    }
+
+  for( int iv=0; iv < listSize; ++iv )
+    {
+      sum[iv] = wgt[iv] ? sum[iv]/wgt[iv] : missingValue();
+    }
+
+  return sum;
+}
+
+//===================================================================
+//
+// MvUnimplementedGrid:
+// -------------------
+
+MvUnimplementedGrid::MvUnimplementedGrid( field* myfield, field_state oldState )
+  : MvGridBase( myfield, oldState, false )
+{
+  //field_ = 0;
+  currentLaty_ = cMvlatLonMissingValue;
+  currentLonx_ = cMvlatLonMissingValue;
+}
+//------------------------------------------------------
+
+void MvUnimplementedGrid::init()
+{
+   MvGridBase::init();
+}
+//------------------------------------------------------
+
+bool MvUnimplementedGrid::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   return true;
+}
+//------------------------------------------------------
+
+vector<double>
+MvUnimplementedGrid::averageCalc(bool, double, double, double, double, double)
+{
+   throw MvException("averageCalc: not implemented for this type of grid!");
+}
+
+//===================================================================
+//
+// MvLatLonGrid:
+// ------------
+
+MvLatLonGrid::MvLatLonGrid( field* myfield
+			  , field_state oldState
+			  , bool memoryToBeReleased
+			  , bool isRotated )
+ : MvGridBase( myfield, oldState, memoryToBeReleased )
+{
+   gridType_ = getString( "typeOfGrid" );
+
+   if( ! ( isRotated || gridType_ == cLatLonGrid ) ) //-- check grid type
+     {
+       marslog( LOG_EROR, "MvLatLonGrid: GRIB data not latlon!" );
+       field_ = 0;
+       return;
+     }
+
+   long grid_ew         = getLong("iDirectionIncrementInDegrees");
+   long points_parallel = getLong("numberOfPointsAlongAParallel");
+   if( ! ( grid_ew || points_parallel ) )
+     {                                              //-- thinned grid needs to be implemented
+       field_ = 0;
+       marslog( LOG_EROR, "MvLatLonGrid: thinned latlon grid not yet supported!" );
+       return;
+     }
+
+   long scan_mode = getLong("scanningMode");
+   if(   (scan_mode & cOctetBit3)                   //-- adjacent points in j dir are consequtive
+      || (scan_mode & cOctetBit1) )                 //-- points scan in -i dir
+     {
+       marslog( LOG_EROR, "LatLon grid scanning mode %d not supported", scan_mode );
+       field_ = 0;
+       return;
+     }
+
+   horisLines_  = getLong("numberOfPointsAlongAMeridian");
+   horisPoints_ = getLong("numberOfPointsAlongAParallel");
+
+   firstLonX_ = DBL_MAX;
+   firstLatY_ = DBL_MAX;
+   lastLonX_  = DBL_MAX;
+   lastLatY_  = DBL_MAX;
+
+   currentLaty_ = firstLatY();
+   currentLonx_ = firstLonX();
+                                                    //--- check/assign dx_
+
+   double lon1  = firstLonX();
+   double lon9  = lastLonX();
+
+   long resol = getLong("resolutionAndComponentFlags");
+   if( (resol & cOctetBit1) == 0 )      //-- increments not given
+     {
+	     dx_ = (horisPoints_ == 1) ? 1 : (lon9-lon1) / (horisPoints_-1.0);
+     }
+   else                                             //-- increments given => check
+     {
+       dx_          = getDouble("iDirectionIncrementInDegrees"); // sec2_->grid_ew / cGridScaling;
+       double dx2   = (horisPoints_ == 1) ? 1 : (lon9-lon1)/(horisPoints_-1.0);
+       double dxErr = fabs(dx_-dx2);
+       if( dxErr > cGridEpsilon && dxErr < 1.0 )
+	 {
+	   marslog( LOG_INFO
+		  , "Using computed lon grid interval %g (instead of %g)"
+		  , dx2
+		  , dx_
+		  );
+	   dx_ = dx2;
+	 }
+     }
+                                                     //--- check/assign dy_
+
+   double lat1 = firstLatY();
+   double lat9 = lastLatY();
+
+   if( (resol & cOctetBit1) == 0 )       //-- increments not given
+     {
+	     dy_ =  (horisLines_ == 1) ? 1 : (MAX(lat9,lat1) - MIN(lat9,lat1)) / (horisLines_-1.0);
+     }
+   else                                              //-- increments given => check
+     {
+       dy_          = getDouble("jDirectionIncrementInDegrees"); // sec2_->grid_ns / cGridScaling;
+       double dy2   = (horisLines_ == 1) ? 1 : (MAX(lat9,lat1) - MIN(lat9,lat1))/(horisLines_-1.0);
+       double dyErr = fabs(dy_-dy2);
+       if( dyErr > cGridEpsilon && dyErr < 1.0 )
+	 {
+	   marslog( LOG_INFO
+		  , "Using computed lat grid interval %g (instead of %g)"
+		  , dy2
+		  , dy_
+		  );
+	   dy_ = dy2;
+	 }
+     }
+
+
+   if( (scan_mode & cOctetBit2) == 0 )     //-- points scan in -j dir
+     {
+         dy_ = -dy_;
+     }
+   if( ! ScanModeCheck( lat1, lat9, dy_ ) )
+     {
+       dy_ = -dy_;
+       marslog( LOG_INFO
+	      , "Ignoring Scanning Mode octet (%d), setting j step to %g"
+	      , (int)scan_mode
+	      , dy_
+	      );
+     }
+}
+//------------------------------------------------------
+
+double MvLatLonGrid::firstLonX()
+{
+   if (! field_)
+      return 0;			 //-- must be valid message
+
+   if (firstLonX_ == DBL_MAX)  // value not cached?
+   {
+      double x1 = getDouble("longitudeOfFirstGridPointInDegrees"); // sec2_->limit_west / cGridScaling;
+      double x9 = lastLonX();
+
+      if (x1 > x9)
+         x1 -= 360.0;
+
+      firstLonX_ = x1;
+   }
+
+   return firstLonX_;
+}
+//------------------------------------------------------
+
+double MvLatLonGrid::firstLatY()
+{
+   if( ! field_ )
+      return DBL_MAX;		//-- must be valid message
+
+
+   if (firstLatY_ == DBL_MAX)  // value not cached?
+   {
+      firstLatY_ = getDouble("latitudeOfFirstGridPointInDegrees");
+   }
+
+   return firstLatY_;
+}
+
+//------------------------------------------------------
+
+double MvLatLonGrid::lastLonX()
+{
+   if (! field_)
+      return 0;			 //-- must be valid message
+
+   if (lastLonX_ == DBL_MAX)  // value not cached?
+   {
+      lastLonX_ = getDouble("longitudeOfLastGridPointInDegrees");
+   }
+
+   return lastLonX_;
+}
+//------------------------------------------------------
+
+double MvLatLonGrid::lastLatY()
+{
+   if( ! field_ )
+      return DBL_MAX;		//-- must be valid message
+
+
+   if (lastLatY_ == DBL_MAX)  // value not cached?
+   {
+      lastLatY_ = getDouble("latitudeOfLastGridPointInDegrees");
+   }
+
+   return lastLatY_;
+}
+//------------------------------------------------------
+
+bool MvLatLonGrid::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   if( ++horisPointCount_ >= horisPoints_ )
+     {
+       currentLaty_ += dy_;
+       currentLonx_  = firstLonX();
+       horisPointCount_ = 0;
+     }
+   else
+     {
+       currentLonx_ += dx_;
+     }
+
+   return true;
+}
+
+//------------------------------------------------------
+
+MvGridPoint MvLatLonGrid::nearestGridpoint( double lat_y, double lon_x )
+{
+
+    if (!field_)
+    {
+        return cMissingPoint;
+    }
+
+
+/*
+    // grib_api version - no real need for this one, as it's probably overkill
+    // for a lat/long grid.
+
+    int is_lsm = 0;
+    int err;
+    double nearest_lon_x = 0.0, nearest_lat_y = 0.0, nearest_val = 0.0;
+    double nearest_distance = 0.0;
+    int nearest_index = 0;
+
+
+
+    err = grib_nearest_find_multiple (field_->handle, is_lsm, &lat_y, &lon_x, 1,
+          &nearest_lat_y, &nearest_lon_x, &nearest_val, &nearest_distance, &nearest_index);
+
+    if (!err)
+    {
+        //cout << "grib_api_nearest: " << nearest_lon_x << ", " << nearest_lat_y << ": " << nearest_val;
+        return MvGridPoint(nearest_val, nearest_lat_y, nearest_lon_x);
+    }
+
+    else
+    {
+        marslog(LOG_EROR,"MvLatLonGrid::nearestGridpoint grib_nearest_find_multiple() returned %d", err);
+        return cMissingPoint;
+    }
+*/
+
+//--
+//-- NOTE: prerequisite: horizontal scanning i.e. does not
+//--       function properly with vertical scanning (j faster)!
+//--
+
+   int    nlat = horisLines_;    //-- size of grid
+   int    nlon = horisPoints_; 
+
+   double lat1 = firstLatY();             //-- starting corner
+   double lon1 = firstLonX();
+   double lat9 = lat1 + (nlat-1) * dy_;   //-- ending corner
+   double lon9 = lon1 + (nlon-1) * dx_;
+
+   double east = lon1 < lon9 ? lon1 : lon9; //-- scanning E->W or W->E ?
+   double west = lon1 < lon9 ? lon9 : lon1;
+
+   MvGeoBox myArea( lat1, east , lat9, west );
+
+   if( lon9 - lon1 + dx_ > 359.9 )         //-- extend for globe
+   {
+      myArea.set( lat1, 0, lat9, 360 );
+   }
+
+   if( ! myArea.isInside( lat_y, lon_x ) )
+   {
+      return cMissingPoint; //-- outside grid area !
+   }
+
+   while( lon_x < east )                   //-- adjust longitude inside grid
+      lon_x += 360.0;
+   while( lon_x > west )
+      lon_x -= 360.0;
+
+   int j = int( rint( (lat_y - lat1) / dy_ ) ); //-- nearest gridpoint
+   int i = int( rint( (lon_x - lon1) / dx_ ) );
+                                          //-- prerequisite: horizontal scanning !
+   return MvGridPoint( valueAt( nlon*j + i )
+                     , (lat1+j*dy_)
+                     , (lon1+i*dx_) );
+}
+//------------------------------------------------------
+
+double MvLatLonGrid::interpolatePoint( double lat_y, double lon_x )
+{
+    const double cERRVAL = DBL_MAX;
+
+
+   if( ! field_ )
+    {
+        return cERRVAL;
+    }
+
+
+    // get GRIB field parameters
+
+   double lat1 = firstLatY();
+   double lon1 = firstLonX();
+   double lat9 = lastLatY();;
+   double lon9 = lastLonX();
+
+
+
+   while( lon1 < 0 )      //-- force longitudes >= 0
+   {
+      lon1 += 360.;
+      lon9 += 360.;
+   }
+
+   while( lon_x < lon1 )
+    {
+      lon_x += 360.;      //-- now point is either inside or above!
+    }
+
+
+    // check that lats are: lat1=southern, lat9=northern
+
+    if( lat1 > lat9 )
+   {
+      double tmp = lat1; lat1 = lat9; lat9 = tmp;
+   }
+
+
+    //-- check if the point is outside grid
+
+   char  globe = horisPoints_*dx_ > cFullGlobeLimit ? 'y' : 'n';
+
+   if( globe == 'n' && ( lon_x < lon1 || lon_x > lon9 ) )
+      return cERRVAL;
+
+   if( lat_y < lat1 || lat_y > lat9 )
+      return cERRVAL;
+
+
+
+
+#if defined (USE_GRIB_API_FOR_INTERPOLATE)
+
+    int err;
+    unsigned long flags = 0;
+    double nearest_lats      [4];
+    double nearest_lons      [4];
+    double nearest_vals      [4];
+    double nearest_distances [4];
+    int    nearest_indexes   [4];
+    size_t num_values [5] = {4, 4, 4, 4, 4};
+
+    grib_nearest *gn = grib_nearest_new (field_->handle, &err);
+
+    if (!err)
+    {
+        // use grib_api's function to get the nearest 4 points
+
+        err = grib_nearest_find (gn, field_->handle, lat_y, lon_x,
+                                 flags, nearest_lats, nearest_lons,
+                                 nearest_vals, nearest_distances, nearest_indexes, num_values);
+        if (!err)
+        {
+            // do not interpolate if one of the value is invalid
+
+            if ( nearest_vals[0] == mars.grib_missing_value ||
+                 nearest_vals[1] == mars.grib_missing_value ||
+                 nearest_vals[2] == mars.grib_missing_value ||
+                 nearest_vals[3] == mars.grib_missing_value  )
+            {
+                return cERRVAL;
+            }
+
+
+            // interpolate
+
+            double total_distance = nearest_distances[0] + nearest_distances[1] +
+                                    nearest_distances[2] + nearest_distances[3];
+
+            double weights[4];
+            double interpolated_value;
+
+            weights[0] = nearest_distances[0] / total_distance;
+            weights[1] = nearest_distances[1] / total_distance;
+            weights[2] = nearest_distances[2] / total_distance;
+            weights[3] = nearest_distances[3] / total_distance;
+
+            interpolated_value = nearest_vals[0] * weights[0] +
+                                 nearest_vals[1] * weights[1] +
+                                 nearest_vals[2] * weights[2] +
+                                 nearest_vals[3] * weights[3];
+
+
+            cout << "grib_api interpolating point: "  << "(" << lat_y << "," << lon_x << ")" << endl;
+            cout << "  nearest: (" << nearest_lats[0] << "," << nearest_lons[0] << ") "
+                 <<            "(" << nearest_lats[1] << "," << nearest_lons[1] << ") "
+                 <<            "(" << nearest_lats[2] << "," << nearest_lons[2] << ") "
+                 <<            "(" << nearest_lats[3] << "," << nearest_lons[3] << ")" << endl;
+            cout << "  indexes: (" << nearest_indexes[0] << "," << nearest_indexes[1] << ","
+                                   << nearest_indexes[2] << "," << nearest_indexes[3] << ")" << endl;
+            cout << "  values: (" << nearest_vals[0] << "," << nearest_vals[1] << ","
+                                  << nearest_vals[2] << "," << nearest_vals[3] << ")" << endl;
+            cout << "  grib_api interpolated: " << interpolated_value << endl;
+
+            return interpolated_value;
+
+
+        }
+
+        else
+        {
+            marslog(LOG_EROR,"MvLatLonGrid::interpolatePoint grib_nearest_find() returned %d", err);
+            grib_nearest_delete (gn);
+            return cERRVAL;
+        }
+
+        grib_nearest_delete (gn);
+    }
+    else
+    {
+        marslog(LOG_EROR,"MvLatLonGrid::interpolatePoint grib_nearest_new() returned %d", err);
+        return cERRVAL;
+    }
+
+#else
+
+    // use our own routine to find the 4 nearest grid points
+
+   int  ix1 = int((lon_x-lon1)/dx_); //-- index for column on the east
+   int  ix2 = ix1 + 1;              //-- index for column on the west
+
+   if( ix2 > (horisPoints_-1) )
+   {
+      if( globe == 'y' )
+         ix2 = 0;                   //-- wrap around globe
+      else
+         ix2 = ix1;                 //-- possible if lon==lon9 (east boundary)
+   }
+
+
+    // start either from north or from south depending on scanning mode --
+
+   int  iy1 = int( ( lat_y - ( dy_ < 0 ? lat9 : lat1 ) ) / dy_ );
+   int  iy2 = iy1 + 1;
+
+   if( iy2 > (horisLines_-1) )
+      iy2 = iy1;                    //-- possible at "higher" boarder
+
+
+    // get and check grid point values
+
+   double  grid_11 = valueAt(horisPoints_*iy1+ix1);
+   double  grid_12 = valueAt(horisPoints_*iy1+ix2);
+   double  grid_21 = valueAt(horisPoints_*iy2+ix1);
+   double  grid_22 = valueAt(horisPoints_*iy2+ix2);
+
+   if( grid_11 == mars.grib_missing_value ||
+       grid_12 == mars.grib_missing_value ||
+       grid_21 == mars.grib_missing_value ||
+       grid_22 == mars.grib_missing_value    )
+   {
+      return DBL_MAX;
+   }
+
+
+    // interpolate
+
+   double  lon_ix1 = lon1 + ix1*dx_;
+   double  lat_iy1 = ( dy_ < 0 ? lat9 : lat1 ) + iy1*dy_;
+
+   double w1   = (lon_x - lon_ix1)/dx_;
+   double w2   = 1. - w1;
+   double val1 = w2*grid_11 + w1*grid_12;
+   double val2 = w2*grid_21 + w1*grid_22;
+
+   w1 = ( lat_y - lat_iy1 )/dy_;
+   w2 = 1. - w1;
+
+/*
+    cout << "interpolating point: "  << "(" << lat_y << "," << lon_x << ")" << endl;
+    cout << "  nearest: (" << lat_iy1 << "," << lon_ix1 << ") " << endl;
+    cout << "  indexes: (" << horisPoints_*iy1+ix1 << "," << horisPoints_*iy1+ix2 << "," << horisPoints_*iy2+ix1 << "," << horisPoints_*iy2+ix2 << ")" <<  endl;
+    cout << "  values: (" << grid_11 << "," << grid_12 << "," << grid_21 << "," << grid_22 << ")" <<  endl;
+    cout << "  interpolated: " << val1*w2 + val2*w1 << endl;
+*/
+
+   return val1*w2 + val2*w1;
+
+#endif
+
+
+}
+
+//===================================================================
+//
+// MvLatLonRotatedGrid:
+// -------------------
+//  Methods in this class have been tested with HIRLAM rotated fields
+//
+
+MvLatLonRotatedGrid::MvLatLonRotatedGrid( field* myfield
+					, field_state oldState
+					, bool memoryToBeReleased )
+ : MvLatLonGrid( myfield, oldState, memoryToBeReleased, true )
+{
+  southPoleLaty_  = getDouble("latitudeOfSouthernPoleInDegrees"); // sec2_->rotation_lat / cGridScaling;
+  southPoleLonx_  = getDouble("longitudeOfSouthernPoleInDegrees");// sec2_->rotation_lon / cGridScaling;
+
+  if( gridType_ != cLatLonRotatedGrid )
+    {
+      marslog( LOG_EROR, "MvLatLonRotatedGrid: GRIB data not rotated latlon!" );
+      field_ = 0;
+    }
+}
+
+//------------------------------------------------------
+// unRotate is based on Fortran routine REGROT (see below)
+
+MvLocation MvLatLonRotatedGrid::unRotate( double lat_y, double lon_x) const
+{
+  double ZRADI  = 1./cToRadians;
+  double ZSYCEN = sin(cToRadians*(southPoleLaty_+90.));
+  double ZCYCEN = cos(cToRadians*(southPoleLaty_+90.));
+
+  double ZSXROT = sin(cToRadians*lon_x);
+  double ZCXROT = cos(cToRadians*lon_x);
+  double ZSYROT = sin(cToRadians*lat_y);
+  double ZCYROT = cos(cToRadians*lat_y);
+  double ZSYREG = ZCYCEN*ZSYROT + ZSYCEN*ZCYROT*ZCXROT;
+  ZSYREG = MAX( MIN(ZSYREG, +1.0), -1.0 );
+
+  double PYREG = asin(ZSYREG)*ZRADI;
+
+  double ZCYREG = cos(PYREG*cToRadians);
+  double ZCXMXC = (ZCYCEN*ZCYROT*ZCXROT - ZSYCEN*ZSYROT)/ZCYREG;
+  ZCXMXC = MAX( MIN(ZCXMXC, +1.0), -1.0 );
+  double ZSXMXC = ZCYROT*ZSXROT/ZCYREG;
+  double ZXMXC  = acos(ZCXMXC)*ZRADI;
+  if( ZSXMXC < 0.0)
+    ZXMXC = -ZXMXC;
+
+  double PXREG = ZXMXC + southPoleLonx_;
+
+  return MvLocation( PYREG, PXREG );
+}
+//------------------------------------------------------
+// rotate is based on Fortran routine REGROT (see below)
+
+MvLocation MvLatLonRotatedGrid::rotate( double lat_y, double lon_x) const
+{
+  double ZRADI  = 1./cToRadians;
+  double ZSYCEN = sin(cToRadians*(southPoleLaty_+90.));
+  double ZCYCEN = cos(cToRadians*(southPoleLaty_+90.));
+
+  double ZXMXC  = cToRadians*(lon_x - southPoleLonx_);
+  double ZSXMXC = sin(ZXMXC);
+  double ZCXMXC = cos(ZXMXC);
+  double ZSYREG = sin(cToRadians*lat_y);
+  double ZCYREG = cos(cToRadians*lat_y);
+  double ZSYROT = ZCYCEN*ZSYREG - ZSYCEN*ZCYREG*ZCXMXC;
+  ZSYROT = MAX( MIN(ZSYROT, +1.0), -1.0 );
+
+  double PYROT  = asin(ZSYROT)*ZRADI;
+
+  double ZCYROT = cos(PYROT*cToRadians);
+  double ZCXROT = (ZCYCEN*ZCYREG*ZCXMXC + ZSYCEN*ZSYREG)/ZCYROT;
+  ZCXROT = MAX( MIN(ZCXROT, +1.0), -1.0 );
+  double ZSXROT = ZCYREG*ZSXMXC/ZCYROT;
+
+  double PXROT = acos(ZCXROT)*ZRADI;
+
+  if( ZSXROT < 0.0)
+    PXROT = -PXROT;
+
+  return MvLocation( PYROT, PXROT );
+}
+
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - -
+//
+// Methods 'unRotate' and 'rotate' are based on this
+// Fortran routine that comes from Hirlam (thanks to
+// Laura Rontu, FMI).
+//                                       (010817/vk)
+
+#if 0
+c Library:util $RCSfile: REGROT.f,v $, $Revision: 1.1 $
+c checked in by $Author: GCats $ at $Date: 1996/09/06 14:36:57 $
+c $State: Stable $, $Locker:  $
+c $Log: REGROT.f,v $
+c Revision 1.1  1996/09/06 14:36:57  GCats
+c Created from util.apl, HIRLAM version 2.5.6, by Gerard Cats
+c
+C<A NAME="header">
+      SUBROUTINE REGROT(PXREG,PYREG,PXROT,PYROT,KXDIM,KYDIM,KX,KY,
+     +                  PXCEN,PYCEN,KCALL)
+C
+      IMPLICIT NONE
+C
+C - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+C
+C*    CONVERSION BETWEEN REGULAR AND ROTATED SPHERICAL COORDINATES.
+C*
+C*    PXREG     LONGITUDES OF THE REGULAR COORDINATES
+C*    PYREG     LATITUDES OF THE REGULAR COORDINATES
+C*    PXROT     LONGITUDES OF THE ROTATED COORDINATES
+C*    PYROT     LATITUDES OF THE ROTATED COORDINATES
+C*              ALL COORDINATES GIVEN IN DEGREES N (NEGATIVE FOR S)
+C*              AND DEGREES E (NEGATIVE VALUES FOR W)
+C*    KXDIM     DIMENSION OF THE GRIDPOINT FIELDS IN THE X-DIRECTION
+C*    KYDIM     DIMENSION OF THE GRIDPOINT FIELDS IN THE Y-DIRECTION
+C*    KX        NUMBER OF GRIDPOINT IN THE X-DIRECTION
+C*    KY        NUMBER OF GRIDPOINTS IN THE Y-DIRECTION
+C*    PXCEN     REGULAR LONGITUDE OF THE SOUTH POLE OF THE ROTATED GRID
+C*    PYCEN     REGULAR LATITUDE OF THE SOUTH POLE OF THE ROTATED GRID
+C*
+C*    KCALL=-1: FIND REGULAR AS FUNCTIONS OF ROTATED COORDINATES.
+C*    KCALL= 1: FIND ROTATED AS FUNCTIONS OF REGULAR COORDINATES.
+C*
+C*    J.E. HAUGEN   HIRLAM   JUNE -92
+C
+C - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+C
+      INTEGER KXDIM,KYDIM,KX,KY,KCALL
+      REAL PXREG(KXDIM,KYDIM),PYREG(KXDIM,KYDIM),
+     +     PXROT(KXDIM,KYDIM),PYROT(KXDIM,KYDIM),
+     +     PXCEN,PYCEN
+C
+C - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+C
+      REAL PI,ZRAD,ZSYCEN,ZCYCEN,ZXMXC,ZSXMXC,ZCXMXC,ZSYREG,ZCYREG,
+     X     ZSYROT,ZCYROT,ZCXROT,ZSXROT,ZRADI
+      INTEGER JY,JX
+C
+C - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+C
+      PI = 4.*ATAN(1.)
+      ZRAD = PI/180.
+      ZRADI = 1./ZRAD
+      ZSYCEN = SIN(ZRAD*(PYCEN+90.))
+      ZCYCEN = COS(ZRAD*(PYCEN+90.))
+C
+      IF (KCALL.EQ.1) THEN
+C
+      DO JY = 1,KY
+      DO JX = 1,KX
+C
+      ZXMXC  = ZRAD*(PXREG(JX,JY) - PXCEN)
+      ZSXMXC = SIN(ZXMXC)
+      ZCXMXC = COS(ZXMXC)
+      ZSYREG = SIN(ZRAD*PYREG(JX,JY))
+      ZCYREG = COS(ZRAD*PYREG(JX,JY))
+      ZSYROT = ZCYCEN*ZSYREG - ZSYCEN*ZCYREG*ZCXMXC
+      ZSYROT = MAX(ZSYROT,-1.0)
+      ZSYROT = MIN(ZSYROT,+1.0)
+C
+      PYROT(JX,JY) = ASIN(ZSYROT)*ZRADI
+C
+      ZCYROT = COS(PYROT(JX,JY)*ZRAD)
+      ZCXROT = (ZCYCEN*ZCYREG*ZCXMXC +
+     +          ZSYCEN*ZSYREG)/ZCYROT
+      ZCXROT = MAX(ZCXROT,-1.0)
+      ZCXROT = MIN(ZCXROT,+1.0)
+      ZSXROT = ZCYREG*ZSXMXC/ZCYROT
+C
+      PXROT(JX,JY) = ACOS(ZCXROT)*ZRADI
+C
+      IF (ZSXROT.LT.0.0) PXROT(JX,JY) = -PXROT(JX,JY)
+C
+      ENDDO
+      ENDDO
+C
+      ELSEIF (KCALL.EQ.-1) THEN
+C
+      DO JY = 1,KY
+      DO JX = 1,KX
+C
+      ZSXROT = SIN(ZRAD*PXROT(JX,JY))
+      ZCXROT = COS(ZRAD*PXROT(JX,JY))
+      ZSYROT = SIN(ZRAD*PYROT(JX,JY))
+      ZCYROT = COS(ZRAD*PYROT(JX,JY))
+      ZSYREG = ZCYCEN*ZSYROT + ZSYCEN*ZCYROT*ZCXROT
+      ZSYREG = MAX(ZSYREG,-1.0)
+      ZSYREG = MIN(ZSYREG,+1.0)
+C
+      PYREG(JX,JY) = ASIN(ZSYREG)*ZRADI
+C
+      ZCYREG = COS(PYREG(JX,JY)*ZRAD)
+      ZCXMXC = (ZCYCEN*ZCYROT*ZCXROT -
+     +          ZSYCEN*ZSYROT)/ZCYREG
+      ZCXMXC = MAX(ZCXMXC,-1.0)
+      ZCXMXC = MIN(ZCXMXC,+1.0)
+      ZSXMXC = ZCYROT*ZSXROT/ZCYREG
+      ZXMXC  = ACOS(ZCXMXC)*ZRADI
+      IF (ZSXMXC.LT.0.0) ZXMXC = -ZXMXC
+C
+      PXREG(JX,JY) = ZXMXC + PXCEN
+C
+      ENDDO
+      ENDDO
+C
+      ELSE
+      WRITE(6,'(1X,''INVALID KCALL IN REGROT'')')
+      STOP
+      ENDIF
+C
+      RETURN
+      END
+#endif
+
+//------------------------------------------------------
+
+MvGridPoint MvLatLonRotatedGrid::nearestGridpoint( double lat_y, double lon_x )
+{
+  MvLocation rLoc = rotate( lat_y, lon_x );
+  MvGridPoint  gp = MvLatLonGrid::nearestGridpoint( rLoc.latitude(), rLoc.longitude() );
+
+  //-- this one for debug checking, dbLoc should be equal to input loc --
+  MvLocation dbLoc = unRotate( gp.loc_.latitude(), gp.loc_.longitude( ) );
+
+  return MvGridPoint( gp.value_, dbLoc.latitude(), dbLoc.longitude() );
+}
+//------------------------------------------------------
+
+double MvLatLonRotatedGrid::interpolatePoint( double lat_y, double lon_x )
+{
+  MvLocation rLoc = rotate( lat_y, lon_x );
+  return MvLatLonGrid::interpolatePoint( rLoc.latitude(), rLoc.longitude() );
+}
+
+
+//===================================================================
+//
+// MvLambertGrid:
+// -------------
+//	20051101/vk: This Lambert class has not been heavily tested, thus
+//		     all feedback from usage with real data is welcome :-)
+//
+MvLambertGrid::MvLambertGrid( field* myfield
+			  , field_state oldState
+			  , bool memoryToBeReleased )
+ : MvGridBase( myfield, oldState, memoryToBeReleased )
+{
+#if 0
+ const int  cPointsAlongX  =  1;
+ const int  cPointsAlongY  =  2;
+ const int  cGridFirstLat  =  3;
+ const int  cGridFirstLon  =  4;
+ const int  cGridVertLon   =  6;
+ const int  cGridLenX      =  8;
+ const int  cGridLenY      =  9;
+ const int  cInterSecLat1  = 13;
+ const int  cInterSecLat2  = 14;
+#endif
+
+   gridType_ = getString("typeOfGrid");
+
+   if( gridType_ != cLambertGrid )  //-- check grid type
+     {
+       marslog( LOG_EROR, "MvLambertGrid: GRIB data not of known Lambert!" );
+       field_ = 0;
+       return;
+     }
+
+   long scanMode = getLong("scanningMode");
+   if(   (scanMode & cOctetBit3)            //-- adjacent points in j dir are consequtive
+      || (scanMode & cOctetBit1) )          //-- points scan in -i dir
+     {
+       marslog( LOG_EROR, "LatLon grid scanning mode %dl not supported", scanMode );
+       return;
+     }
+
+   dx_        = getDouble("DxInMetres");
+   double dy_ = getDouble("DyInMetres");
+   if( dy_ != dx_ )
+     {
+       marslog( LOG_EROR, "MvLambertGrid: dx!=dy: not implemented!" );
+       field_ = 0;
+       return;
+     }
+
+   earthRadius_ = cEarthRadius;
+
+   gridTanLat_ = getDouble("firstLatitudeInDegrees") * 1000; // sec2_[cInterSecLat1];
+   double tanLat2 = getDouble("secondLatitudeInDegrees") * 1000;
+   //if( sec2_[cInterSecLat2] != gridTanLat_ ) //-- two latitudes...?
+   if( tanLat2 != gridTanLat_ )
+     {
+       //-- The original Fortran code was made only for a projection defined
+       //-- by a single tangenting latitude. This is my personal solution
+       //-- to "convert" an intersecting projection (two latitudes given) to
+       //-- a tangenting projection...
+       //-- (To be honest: all the formulas I found in the web I found
+       //--  them to be quite hard to digest, thus this Q&D solution which
+       //--  shrinks Earth to touch the Lambert cone only in one latitude ;-)
+
+       //-- set tangenting latitude as the mean of the two latitudes
+       //gridTanLat_  = (sec2_[cInterSecLat1] + sec2_[cInterSecLat2]) / 2.0;
+       gridTanLat_  = (gridTanLat_ + tanLat2) / 2.0;
+
+       //-- use simple trigonometry to shrink the Earth radius
+       //double delta = 0.5 * (sec2_[cInterSecLat1] - sec2_[cInterSecLat2]) / cGridScaling;
+       double delta = 0.5 * (gridTanLat_ - tanLat2);
+       if( delta < 0 )
+           delta = -delta;
+       earthRadius_ = cos(delta*cToRadians) * cEarthRadius;
+
+       marslog( LOG_WARN, "MvLambertGrid: two tangenting latitudes - Q&D solution!" );
+     }
+
+   earthRadiusPerDx_ = earthRadius_ / dx_;
+   cout << "R, dx, R/dx:\t" << earthRadius_ << "\t" << dx_ << "\t" << earthRadiusPerDx_ << endl;
+
+   hemiSphere_ = gridTanLat_ > 0 ? 1 : 0;
+   gridTanLat_ = (gridTanLat_ / cGridScaling) * cToRadians;  //--aki cGridScaling--//
+   sinLatTan_  = hemiSphere_ * sin(gridTanLat_);
+   cosLatTan_  = cos(gridTanLat_);
+
+   gridVertLon_ = getDouble("orientationOfTheGridInDegrees"); // sec2_[cGridVertLon] / cGridScaling;
+
+   horisLines_  = getLong("numberOfPointsAlongYAxis"); //sec2_[cPointsAlongY];
+   horisPoints_ = getLong("numberOfPointsAlongXAxis"); // sec2_[cPointsAlongX];
+
+   gridLat1_    = getDouble("latitudeOfFirstGridPointInDegrees"); //sec2_[cGridFirstLat] / cGridScaling;
+   gridLon1_    = getDouble("longitudeOfFirstGridPointInDegrees"); // sec2_[cGridFirstLon] / cGridScaling;
+
+//-- based on Fortran code from 'http://maps.fsl.noaa.gov/fslparms/w3fb12.f':
+//--
+//-- SUBPROGRAM:  W3FB12        LAMBERT(I,J) TO LAT/LON FOR GRIB
+//--   PRGMMR: STACKPOLE        ORG: NMC42       DATE:88-11-28
+
+//        MAKE SURE THAT INPUT LONGITUDE DOES NOT PASS THROUGH
+//        THE CUT ZONE (FORBIDDEN TERRITORY) OF THE FLAT MAP
+//        AS MEASURED FROM THE VERTICAL (REFERENCE) LONGITUDE
+//
+   double ELON1L = gridLon1_;
+   if((gridLon1_-gridVertLon_) > 180.0 )
+      ELON1L = gridLon1_ - 360.0;
+   if( (gridLon1_-gridVertLon_) < -180.0 )
+      ELON1L = gridLon1_ + 360.0;
+
+   double ELONVR = gridVertLon_ * cToRadians;
+//
+//     RADIUS TO LOWER LEFT HAND (LL) CORNER
+//
+   double ALA1 = gridLat1_ * cToRadians;
+   double RMLL = earthRadiusPerDx_ *
+                 pow(cosLatTan_,(1.-sinLatTan_)) * pow((1.+sinLatTan_),sinLatTan_) *
+                 pow((cos(ALA1)/(1.+hemiSphere_*sin(ALA1))),sinLatTan_) / sinLatTan_;
+//
+//     USE LL POINT (LowerLeft) INFO TO LOCATE POLE POINT
+//
+   double ELO1 = ELON1L * cToRadians;
+   double ARG = sinLatTan_ * (ELO1-ELONVR);
+   poleI_ = 1. - hemiSphere_ * RMLL * sin(ARG);
+   poleJ_ = 1. + RMLL * cos(ARG);
+//
+//          NOW THE LATITUDE
+//          RECALCULATE THE THING ONLY IF MAP IS NEW SINCE LAST TIME
+//
+   double ANINV  = 1./sinLatTan_;
+   sinLatTanInvPer2_ = ANINV/2.;
+   theThing_ = pow((sinLatTan_/earthRadiusPerDx_), ANINV) /
+               ( pow(cosLatTan_,((1.-sinLatTan_)*ANINV)) * (1.+ sinLatTan_) );
+
+   currentLaty_ = firstLatY();
+   currentLonx_ = firstLonX();
+}
+//------------------------------------------------------
+
+double MvLambertGrid::firstLonX()
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   currentJ_ = 1;
+   return gridLon1_;
+}
+//------------------------------------------------------
+
+double MvLambertGrid::firstLatY()
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   currentI_ = 1;
+   return gridLat1_;
+}
+
+//------------------------------------------------------
+
+bool MvLambertGrid::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   if( ++currentI_ > horisPoints_ )
+     {
+       ++currentJ_;
+       currentI_ = 1;
+     }
+
+   return computeLatLon( currentI_, currentJ_ );
+}
+//------------------------------------------------------
+bool
+MvLambertGrid::computeLatLon( int ip, int jp )
+{
+//-- based on Fortran code from 'http://maps.fsl.noaa.gov/fslparms/w3fb12.f':
+//--
+//-- SUBPROGRAM:  W3FB12        LAMBERT(I,J) TO LAT/LON FOR GRIB
+//--   PRGMMR: STACKPOLE        ORG: NMC42       DATE:88-11-28
+
+    double XX = (double)ip - poleI_;
+    double YY = poleJ_ - (double)jp;
+    double R2 = XX*XX + YY*YY;
+//
+//        CHECK THAT THE REQUESTED I,J IS NOT IN THE FORBIDDEN ZONE
+//           YY MUST BE POSITIVE UP FOR THIS TEST
+//
+    double THETA = M_PI*(1.-sinLatTan_);
+    double BETA  = atan2(XX,-YY);
+    if( BETA < 0 )
+       BETA = -BETA;
+
+    if( BETA <= THETA )
+    {
+        currentLaty_ = 999.9;
+        currentLonx_ = 999.9;
+        return false;
+    }
+//
+//        NOW THE MAGIC FORMULAE
+//
+    if( R2 == 0 )
+    {
+        currentLaty_ = hemiSphere_ * 90.0;
+        currentLonx_ = gridVertLon_;
+    }
+    else
+    {
+        currentLonx_ = gridVertLon_ + atan2(hemiSphere_*XX,YY)/sinLatTan_ / cToRadians;
+        currentLonx_ = fmod(currentLonx_+360.0, 360.0);
+
+	currentLaty_ = hemiSphere_ *
+	               ( M_PI/2.0 - 2.0*atan( theThing_ * pow( R2, sinLatTanInvPer2_ ) ) )
+		      / cToRadians;
+    }
+
+    return true;
+}
+//------------------------------------------------------
+
+double
+MvLambertGrid::weight() const
+{
+   if( ! field_ )
+      return DBL_MAX;			 //-- must be valid message
+
+   return cos( lat_y() * cToRadians );
+}
+//------------------------------------------------------
+
+//-- To be implemented later (currently these functions will use the default functions in
+//-- Base class - they go through the whole field and pick the value of the closest point):
+
+//   virtual MvGridPoint MvLambertGrid::nearestGridpoint( double lat_y, double lon_x )
+//   virtual double      MvLambertGrid::interpolatePoint( double lat_y, double lon_x )
+
+//===================================================================
+
+
+//===================================================================
+//
+// MvIrregularGrid:
+// ------------------
+//  Methods in Irregular classes have been tested with ECMWF fields
+//  This covers Gaussian grids and reduced lat/long grids
+//
+
+MvIrregularGrid::MvIrregularGrid( field* myfield
+				      , field_state oldState
+				      , bool memoryToBeReleased )
+ : MvGridBase( myfield, oldState, memoryToBeReleased )
+{
+   gridType_ = getString("typeOfGrid");
+
+   if( ! ( gridType_==cGaussianGrid || gridType_==cGaussianReducedGrid || gridType_ == cLatLonReducedGrid) )
+   {
+      marslog( LOG_EROR, "MvIrregularGrid: GRIB data not Gaussian or reduced lat long!" );
+      field_ = 0;
+   }
+
+   long scanMode = getLong("scanningMode");
+   isSouthToNorthScanning_ = scanMode & cOctetBit2;
+   global_ = true;
+
+   horisLines_    = getLong("numberOfPointsAlongAMeridian"); // sec2_->points_meridian;
+
+   firstLonX_ = DBL_MAX;
+   lastLonX_  = DBL_MAX;
+}
+//------------------------------------------------------
+
+
+
+void MvIrregularGrid::checkAreaLimits()
+{
+  double firstLon, lastLon;
+  double firstLat, lastLat;
+  
+
+  firstLon = firstLonX();
+  lastLon  = lastLonX();
+  firstLat = getDouble("latitudeOfFirstGridPointInDegrees");
+  lastLat  = getDouble("latitudeOfLastGridPointInDegrees");
+
+
+
+  if( horisLines_ == numGlobalParallels_ )     //-- field is global (N <-> S)
+    {
+      firstLatIndex_ = 0;
+      lastLatIndex_  = horisLines_ - 1;
+
+      // some grids have rows with no points in them - skip past them
+      while (pointsInRow(firstLatIndex_) == 0 && firstLatIndex_ < horisLines_)
+      {
+         firstLatIndex_++;
+      }
+
+ 
+      // additional check to make sure it's global - we extend the grid by another point and see whether
+      // it would end up where the first point is - we use the 'middle' row, since that should extend
+      // the furthest
+      int numPoints = pointsInRow(horisLines_/2);  // middle line
+      double dx = (lastLon - firstLon) / (numPoints - 1);
+      double wrapAroundLong = dx * (numPoints);
+      double epsilon = dx * 0.9;
+
+      if (wrapAroundLong >= (360.0 - dx)) wrapAroundLong -= 360.0;
+
+      double diff = wrapAroundLong - firstLon;
+
+      // is the wraparound point close to the first point? If so, then it's global; otherwise not global
+      if (diff > epsilon || diff < -epsilon)
+      {
+         global_ = false;
+      }
+
+    }
+  else                                 //-- subarea only
+    {
+      firstLatIndex_ = findLatIndex( firstLat );
+      lastLatIndex_  = findLatIndex( lastLat );
+      global_ = false;
+    }
+
+  if( isSouthToNorthScanning_ )
+    {
+      long    tmp    = firstLatIndex_;
+      firstLatIndex_ = lastLatIndex_;
+      lastLatIndex_  = tmp;
+    }
+}
+//------------------------------------------------------
+// For subareas we need to find limiting latitudes from
+// the array containing all Gaussian latitudes
+
+int MvIrregularGrid::findLatIndex( double latitude )
+{
+    for( int indx=0; indx<numGlobalParallels_; ++indx )
+    {
+        double diff = latitudes_[ indx ] - latitude;
+        diff = diff < 0 ? -diff : diff;
+
+        if( diff < 0.001 )             //-- 0.001 = precision in GRIB header
+            return indx;               //-- OK, close enough
+    }
+
+    marslog( LOG_EROR
+            , "MvIrregularGrid: latitude %f not found in Gaussian N%d"
+            , latitude
+            , numGlobalParallels_ );
+
+    field_ = 0;        //-- set to 'non-valid'!
+
+    return -1;         //-- not found!
+}
+//------------------------------------------------------
+
+MvIrregularGrid::~MvIrregularGrid()
+{
+   delete [] latitudes_;
+}
+//------------------------------------------------------
+
+void MvIrregularGrid::init()
+{
+   MvGridBase::init();
+   currentLatIndex_ = firstLatIndex_;
+}
+//------------------------------------------------------
+
+double MvIrregularGrid::firstLonX()
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   if (firstLonX_ == DBL_MAX)  // value not cached?
+   {
+      double x0 = getDouble("longitudeOfFirstGridPointInDegrees"); // sec2_->limit_west / cGridScaling;
+
+      if( x0 > lastLonX() )
+         x0 -= 360.0;
+
+      firstLonX_ = x0;
+   }
+
+   return firstLonX_;
+}
+//------------------------------------------------------
+
+double MvIrregularGrid::lastLonX()
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   if (lastLonX_ == DBL_MAX)  // value not cached?
+   {
+      lastLonX_ = getDouble("longitudeOfLastGridPointInDegrees");
+   }
+
+   return lastLonX_;
+}
+//------------------------------------------------------
+
+double MvIrregularGrid::firstLatY()
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   //   return sec2_->limit_north / cGridScaling;
+   return latitudes_[ firstLatIndex_ ];
+}
+
+
+
+//------------------------------------------------------
+
+MvGridPoint MvIrregularGrid::nearestGridpoint( double lat_y, double lon_x )
+{
+  if( isSouthToNorthScanning_ )                  //-- not implemented => do it the hard way
+    {
+      return MvGridBase::nearestGridpoint( lat_y, lon_x );
+    }
+
+   //-- create a proper implementation here         (020227/vk)
+   //-- seems to work, but needs still more testing (020228/vk)
+
+   if( ! field_ )				 //-- non-valid msg?
+     return cMissingPoint;
+
+   if( lat_y > latitudes_[ firstLatIndex_ ] )              //-- before first row?
+     return cMissingPoint;
+   if( lat_y < latitudes_[ lastLatIndex_ ] )//-- after last row
+     return cMissingPoint;
+
+   int row9 = firstLatIndex_;                                 //-- find row S of pt
+   double lat9 = latitudes_[ row9 ];
+   while( lat9 > lat_y && row9 < firstLatIndex_+horisLines_ )
+     {
+       lat9 = latitudes_[ ++row9 ];
+     }
+
+   bool borderRow = (row9 == firstLatIndex_);
+   //-- what about South Polish?
+
+   int    row1 = borderRow ? row9 : row9 - 1;    //-- previous row is N of pt
+   double lat1 = latitudes_[ row1 ];
+
+   // to get the longitude interval, we need to consider the difference
+   // between a global grid and a sub-area grid. A global grid has its
+   // last point one interval before 360 degrees (because its first point
+   // is already at 0 degrees, which is 360). A sub-area does not have this
+   // feature, so its last grid point lies at the right-hand edge of the data.
+   // A global field is like a), a sub-area is like b) below:
+   //  a)   |o           o             o            |
+   //  b)   |o                 o                  o | 
+   
+   double dataLonWidth = (global_) ? 360.0 : lastLonX() - firstLonX();
+   int    numIntervals = (global_) ? pointsInRow( row1 ) : pointsInRow( row1 ) - 1;
+   double dx1  = dataLonWidth / numIntervals;    //-- N row increment
+
+   int firstIndex = 0;                           //-- => find pts on N row <= --//
+   for( int i=firstLatIndex_; i<row1; ++i )
+     firstIndex += pointsInRow( i );             //-- offset
+
+   double firstLon = firstLonX();
+   if( firstLon > lon_x )                        //-- normalise acording to lon_x
+     firstLon -= 360.0;
+
+   int ix1 = int((lon_x-firstLon)/dx1);          //-- column W of pt
+   int ix2 = (ix1 == (pointsInRow(row1)-1) ) ?   //-- column E of pt:
+              0 : ix1 + 1;                       //--    first or next!
+
+   if (ix1 > pointsInRow(row1))                  //-- outside the data row?
+   {
+     return cMissingPoint;
+   }
+
+   double  grid_11 = valueAt(firstIndex+ix1);    //-- value in W pt
+   double  grid_12 = valueAt(firstIndex+ix2);    //-- value in E pt
+   double  lon_x1  = firstLon + ix1*dx1;         //-- longitude of W pt
+
+   MvLocation  point( lat_y, lon_x );
+   MvGridPoint gridPoint[4];                      //-- surrounding grid points
+
+   gridPoint[0] = MvGridPoint( grid_11, lat1, lon_x1 );
+   gridPoint[1] = MvGridPoint( grid_12, lat1, lon_x1+dx1 );
+
+   double closestDistance = point.distanceInMeters( gridPoint[0].loc_ );
+   if( point.distanceInMeters( gridPoint[1].loc_ ) < closestDistance )
+     {
+       closestDistance = point.distanceInMeters( gridPoint[1].loc_ );
+       gridPoint[0] = gridPoint[1];
+     }
+
+   if( borderRow )
+     return gridPoint[0];
+
+                                           //-- => find pts on S row <= --//
+   firstIndex += pointsInRow( row1 );
+
+   numIntervals = (global_) ? pointsInRow( row9 ) : pointsInRow( row9 ) - 1;
+   double dx9  = dataLonWidth / numIntervals;    //-- S row increment
+
+   ix1 = int((lon_x-firstLon)/dx9);              //-- column W of pt
+   ix2 = ( ix1 == (pointsInRow(row9)-1) ) ?      //-- column E of pt:
+              0 : ix1 + 1;                       //--    first or next!
+
+   grid_11 = valueAt(firstIndex+ix1);            //-- value in W pt
+   grid_12 = valueAt(firstIndex+ix2);            //-- value in E pt
+
+   double lon_x9 = firstLon + ix1*dx9;
+
+   gridPoint[2] = MvGridPoint( grid_11, lat9, lon_x9 );
+   gridPoint[3] = MvGridPoint( grid_12, lat9, lon_x9+dx9 );
+
+   for(int p=2; p<4; ++p )                       //-- either one closer?
+     {
+       if( point.distanceInMeters( gridPoint[p].loc_ ) < closestDistance )
+       {
+         closestDistance = point.distanceInMeters( gridPoint[p].loc_ );
+         gridPoint[0] = gridPoint[p];
+       }
+     }
+
+#if 0
+   cout << "Closest point: "
+	<< ( (int)(closestDistance/100.0) / 10.0 )
+	<< "km"
+	<< endl;
+#endif
+
+   return gridPoint[0];
+
+}
+//------------------------------------------------------
+
+double MvIrregularGrid::interpolatePoint( double lat_y, double lon_x )
+{
+  if( isSouthToNorthScanning_ )
+    {
+      marslog( LOG_INFO, "Nearest grid point used (no interpolation yet for S->N Gaussian grids)" );
+      return nearestGridpoint( lat_y, lon_x ).value_;
+    }
+
+  if( ! field_ )					//-- non-valid msg?
+    return DBL_MAX;
+
+  // -- before first row or after last row ?
+  if( lat_y > latitudes_[firstLatIndex_] || lat_y < latitudes_[lastLatIndex_] )
+  {
+    if (global_)
+	    return extrapolatePoint( lat_y, lon_x );
+    else
+        return DBL_MAX;
+  }
+
+  int row9 = firstLatIndex_;                    //-- find row S of pt
+  double lat9 = latitudes_[ row9 ];
+  while( lat9 > lat_y && row9 < firstLatIndex_+horisLines_ )
+    {
+      lat9 = latitudes_[ ++row9 ];
+    }
+
+  bool borderRow = (row9 == firstLatIndex_);
+  //-- what about South Polish?
+
+  int    row1 = borderRow ? row9 : row9 - 1;    //-- previous row is N of pt
+  double lat1 = latitudes_[ row1 ];
+
+  // to get the longitude interval, we need to consider the difference
+  // between a global grid and a sub-area grid. A global grid has its
+  // last point one interval before 360 degrees (because its first point
+  // is already at 0 degrees, which is 360). A sub-area does not have this
+  // feature, so its last grid point lies at the right-hand edge of the data.
+  // A global field is like a), a sub-area is like b) below:
+  //  a)   |o           o             o            |
+  //  b)   |o                 o                  o | 
+   
+  double dataLonWidth = (global_) ? 360.0 : lastLonX() - firstLonX();
+  int    numIntervals = (global_) ? pointsInRow( row1 ) : pointsInRow( row1 ) - 1;
+  double dx1  = dataLonWidth / numIntervals;    //-- N row increment
+
+
+  int firstIndex = 0;                           //-- => find pts on N row <=
+  for( int i=firstLatIndex_; i<row1; ++i )
+    firstIndex += pointsInRow( i );             //-- offset
+
+  double firstLon = firstLonX();
+  if( firstLon > lon_x )                        //-- normalise acording to lon_x
+    firstLon -= 360.0;
+
+  int ix1 = int((lon_x-firstLon)/dx1);          //-- column W of pt
+  int ix2 = (ix1 == (pointsInRow(row1)-1) ) ?   //-- column E of pt:
+             0 : ix1 + 1;                       //--    first or next!
+
+   if (ix1 > pointsInRow(row1))                  //-- outside the data row?
+   {
+     return DBL_MAX;
+   }
+
+
+  double  grid_11 = valueAt(firstIndex+ix1);    //-- value in W pt
+  double  grid_12 = valueAt(firstIndex+ix2);    //-- value in E pt
+
+  if( grid_11 == mars.grib_missing_value ||
+      grid_12 == mars.grib_missing_value    )
+    {
+      return DBL_MAX;
+    }
+                                                //-- interpolate on N row
+  double lon_x1 = firstLon + ix1*dx1;
+  double w1   = (lon_x - lon_x1)/dx1;
+  double w2   = 1. - w1;
+  double val1 = w2*grid_11 + w1*grid_12;
+
+  if( borderRow )
+    return val1;
+                                                //-- => find pts on S row <=
+  firstIndex += pointsInRow( row1 );
+
+  numIntervals = (global_) ? pointsInRow( row9 ) : pointsInRow( row9 ) - 1;
+  double dx9  = dataLonWidth / numIntervals;    //-- S row increment
+  double dy  = lat1 - lat9;
+
+  ix1 = int((lon_x-firstLon)/dx9);              //-- column W of pt
+  ix2 = ( ix1 == (pointsInRow(row9)-1) ) ?      //-- column E of pt:
+             0 : ix1 + 1;                       //--    first or next!
+
+  grid_11 = valueAt(firstIndex+ix1);            //-- value in W pt
+  grid_12 = valueAt(firstIndex+ix2);            //-- value in E pt
+
+  if( grid_11 == mars.grib_missing_value ||
+      grid_12 == mars.grib_missing_value    )
+    {
+      return DBL_MAX;
+    }
+                                                //-- interpolate on S row
+  double lon_x9 = firstLon + ix1*dx9;
+
+  w1 = (lon_x - lon_x9)/dx9;
+  w2 = 1. - w1;
+  double val2 = w2*grid_11 + w1*grid_12;
+
+  w1 = ( lat_y - lat9 )/dy;                     //-- interpolate in lat
+  w2 = 1. - w1;
+  return val1*w1 + val2*w2;
+
+}
+
+
+
+//===================================================================
+//
+// MvReducedLatLongGrid:
+// ------------------
+//  Methods in reduced lat/long classes have been tested with ECMWF fields
+//
+
+MvReducedLatLongGrid::MvReducedLatLongGrid( field* myfield
+				      , field_state oldState
+				      , bool memoryToBeReleased )
+ : MvIrregularGrid( myfield, oldState, memoryToBeReleased )
+{
+   gridType_ = getString("typeOfGrid");
+
+   if( ! ( gridType_==cLatLonReducedGrid  ) )
+   {
+      marslog( LOG_EROR, "MvGaussianGridBase: GRIB data not reduced_ll!" );
+      field_ = 0;
+   }
+
+
+   // create and populate the array of latutudes (these are constantly spaced)
+
+   double dy = getDouble("jDirectionIncrementInDegrees"); // sec2_->grid_ew / cGridScaling;
+   numGlobalParallels_ = (long)(180.0 / dy) + 1;
+
+   latitudes_  = new double[ numGlobalParallels_ ];
+
+   for (int i = 0; i < numGlobalParallels_; i++)
+   {
+        latitudes_[i] = 90 - (dy * i);
+   }
+
+   pointsInRow_ = 0;
+   checkAreaLimits();           //-- maybe only a subarea
+
+   currentLatIndex_ = firstLatIndex_;
+   currentLaty_     = latitudes_[ currentLatIndex_ ];
+   currentLonx_     = firstLonX();
+
+   horisPoints_ = pointsInRow( currentLatIndex_ );
+   dx_          = horisPoints_ ? ( 360.0 / horisPoints_ ) : 0;
+
+}
+//------------------------------------------------------
+
+
+MvReducedLatLongGrid::~MvReducedLatLongGrid()
+{
+	if ( pointsInRow_ )
+	{
+		delete [] pointsInRow_;
+		pointsInRow_ = 0;
+	}
+}
+
+//------------------------------------------------------
+
+
+int MvReducedLatLongGrid::pointsInRow( int row )
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   if( ! pointsInRow_ )
+     {
+       size_t len   = horisLines_;
+       pointsInRow_ = new long[ len ];
+       int err = grib_get_long_array( field_->handle, "pl", pointsInRow_, &len );
+       if( err )
+          marslog(LOG_EROR,"MvReducedLatLongGrid::pointsInRow - grib_api: 'pl' not found!");
+     }
+
+  //--
+  //-- row: 0,1,2,...
+  //--
+  return pointsInRow_ ? pointsInRow_[row] : 0;
+}
+
+
+//------------------------------------------------------
+
+bool MvReducedLatLongGrid::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   if( ++horisPointCount_ >= horisPoints_ )
+     {
+       if( isSouthToNorthScanning_ )
+         --currentLatIndex_;
+       else
+         ++currentLatIndex_;
+
+       currentLaty_ = latitudes_[ currentLatIndex_ ];
+       currentLonx_ = firstLonX();
+       //horisPoints_ = field_->ksec2[ cNPtsIndexBegin + currentLatIndex_ ];
+       horisPoints_ = pointsInRow( currentLatIndex_ );
+       dx_          = ( 360.0 / horisPoints_ );
+       horisPointCount_ = 0;
+       //cout << currentIndex_ << '\t' << currentLaty_ << '\t' << horisPoints_ << endl;
+     }
+   else
+     {
+       currentLonx_ += dx_;
+     }
+
+   return true;
+}
+
+
+
+//===================================================================
+//
+// GaussianLatitudes:
+// ------------------
+//
+// returns the error code from GRIB_API's grib_get_gaussian_latitudes().
+
+
+int GaussianLatitudes::latitudes(long trunc, double *lats, unsigned int numLatitudes)
+{
+	int err = 0;
+	std::map<long, vector<double> >::iterator mapIterator;
+
+
+	// can we find a set of cached values for this grid?
+
+	mapIterator = cachedLatitudes_.find(trunc);
+
+	if (mapIterator == cachedLatitudes_.end()) // no - not cached yet
+	{
+		int err = grib_get_gaussian_latitudes (trunc, lats);  // this is the expensive call
+
+		if (!err)
+		{
+			vector<double> vec(lats, lats+numLatitudes);
+			cachedLatitudes_[trunc] = vec;
+		}
+	}
+	else  // yes, it has been cached, so just copy it over
+	{
+		vector<double> &v = cachedLatitudes_[trunc];
+
+		if (numLatitudes != v.size())  // wrong size?
+		{
+			marslog( LOG_EROR, "GaussianLatitudes::latitudes arrays not same size (%d and %d)",
+					 numLatitudes, v.size());
+			return 1;
+		}
+		else  // ok, copy the numbers over
+		{
+			memcpy(lats, &v[0], numLatitudes*sizeof(double));
+		}
+	}
+
+	return err;
+}
+
+
+//===================================================================
+//
+// MvGaussianGridBase:
+// ------------------
+//  Methods in Gaussian classes have been tested with ECMWF fields
+//
+
+MvGaussianGridBase::MvGaussianGridBase( field* myfield
+				      , field_state oldState
+				      , bool memoryToBeReleased )
+ : MvIrregularGrid( myfield, oldState, memoryToBeReleased )
+{
+
+   gridType_ = getString("typeOfGrid");
+
+   if( ! ( gridType_==cGaussianGrid || gridType_==cGaussianReducedGrid ) )
+   {
+      marslog( LOG_EROR, "MvGaussianGridBase: GRIB data not Gaussian!" );
+      field_ = 0;
+   }
+
+
+   long halfNumParallels_ = getLong("numberOfParallelsBetweenAPoleAndTheEquator"); // sec2_->gauss_trunc * 2;
+   numGlobalParallels_ = halfNumParallels_ * 2;
+   latitudes_ = new double[ numGlobalParallels_ ];
+
+
+   int err = MvGaussianGridBase::gLatitudes_.latitudes(halfNumParallels_, latitudes_, numGlobalParallels_);
+
+   if( err )
+   {
+       marslog(LOG_EROR,"MvGaussianGridBase: grib_get_gaussian_latitudes returned %d", err);
+       field_ = 0;                   //-- something is wrong, make 'non-valid'!
+   }
+}
+//------------------------------------------------------
+
+
+double MvGaussianGridBase::extrapolatePoint( double lat_y, double lon_x )
+{
+// 1. compute the mean of the first/last latitude values
+// 2. associate this mean value to the north/south pole
+// 3. retrieve the 2 nearest points along the first/last longitude values
+// 4. interpolate using these 3 values (triangle)
+
+   // Initialize variablesCompute the initial position and npoints in the data array
+   int i;
+   int firstIndex;	// first position in the data array
+   int np;		// number of points along the latitude
+   int row;		// index: first or last latitude line
+   double dy;		// latitude interval  = lat1 - lat9;
+   double wlat;		// latitude weight
+   if( lat_y > latitudes_[ 0 ] ) //north pole
+   {
+	np   = pointsInRow(0);
+	dy   = 90. - latitudes_[ 0 ];
+	wlat = (lat_y - latitudes_[ 0 ]) / dy;
+	firstIndex = row = 0;
+   }
+   else if ( lat_y < latitudes_[horisLines_-1] ) // south pole
+   {
+	np   = pointsInRow(horisLines_-1);
+	row  = horisLines_-1;
+	dy   = latitudes_[horisLines_-1] - (-90.);
+	wlat = (latitudes_[horisLines_-1] - lat_y) / dy;
+	firstIndex = length() - np;
+   }
+   else
+   {
+	marslog(LOG_EROR,"Point is inside the area, it can not be extrapolated");
+	return DBL_MAX;
+   }
+
+   // Compute the mean value
+   double mean = 0.;
+   for (i = 0; i < np; i++)
+	mean += valueAt(firstIndex+i);
+
+   mean = mean / (double)np;
+   if( mean == mars.grib_missing_value )
+      	return DBL_MAX;
+
+   // Retrieve the 2 nearest points along the first/last latitude line
+  double dx1  = 360.0 / pointsInRow( row );     //-- N row increment
+  double firstLon = firstLonX();		//-- first longitude value
+  if( firstLon > lon_x )                        //-- normalise acordingly
+	firstLon -= 360.0;
+
+  int ix1 = int((lon_x-firstLon)/dx1);          //-- column W of pt
+  int ix2 = (ix1 == (pointsInRow(row)) ) ?      //-- column E of pt:
+             0 : ix1 + 1;                       //--    first or next!
+
+  double grid_11 = valueAt(firstIndex+ix1);     //-- value in W pt
+  double grid_12 = valueAt(firstIndex+ix2);     //-- value in E pt
+
+  if( grid_11 == mars.grib_missing_value ||
+      grid_12 == mars.grib_missing_value    )
+      	return DBL_MAX;
+
+  // Interpolate on latitude row
+  double lon_x1 = firstLon + ix1*dx1;
+  double w1     = (lon_x - lon_x1)/dx1;
+  double w2     = 1. - w1;
+  double val1   = w2*grid_11 + w1*grid_12;
+
+   // Interpolate in lat
+  w2 = 1. - wlat;
+  return val1*w2 + mean*wlat;
+}
+
+//------------------------------------------------------
+
+#if 0
+//------------------------------------------------------
+
+double MvGaussianGridBase::weight() const
+{
+   if( ! field_ )
+      return DBL_MAX;			 //-- must be valid message
+
+   //-- should this one check the width of the lat band?
+   return cos( lat_y() * cToRadians ) / horisPoints_;
+}
+#endif
+
+
+
+
+
+
+
+//===================================================================
+//
+// MvGaussianGrid:
+// --------------
+
+MvGaussianGrid::MvGaussianGrid( field* myfield
+			      , field_state oldState
+			      , bool memoryToBeReleased )
+  : MvGaussianGridBase( myfield, oldState, memoryToBeReleased )
+{
+  if( field_ )
+    horisPoints_ = getLong("numberOfPointsAlongAParallel"); // sec2_->points_parallel;
+
+   checkAreaLimits();           //-- maybe only a subarea
+
+   currentLatIndex_ = firstLatIndex_;
+   currentLaty_     = latitudes_[ currentLatIndex_ ];
+   currentLonx_     = firstLonX();
+   dx_              = getDouble("iDirectionIncrementInDegrees"); // sec2_->grid_ew / cGridScaling;
+}
+//------------------------------------------------------
+
+bool MvGaussianGrid::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   if( ++horisPointCount_ >= horisPoints_ )
+     {
+       if( isSouthToNorthScanning_ )
+	 --currentLatIndex_;
+       else
+	 ++currentLatIndex_;
+
+       currentLaty_ = latitudes_[ currentLatIndex_ ];
+       currentLonx_ = firstLonX();
+       horisPointCount_ = 0;
+     }
+   else
+     {
+       currentLonx_ += dx_;
+     }
+
+   return true;
+}
+//------------------------------------------------------
+
+int MvGaussianGrid::pointsInRow( int )
+{
+  return horisPoints_;
+}
+
+
+//===================================================================
+//
+// MvReducedGaussianGrid:
+// ---------------------
+
+const int cNPtsIndexBegin = 22;  // Fortran index 23
+
+//------------------------------------------------------
+
+MvReducedGaussianGrid::MvReducedGaussianGrid( field*      myfield
+					    , field_state oldState
+					    , bool        memoryToBeReleased )
+ : MvGaussianGridBase( myfield, oldState, memoryToBeReleased )
+{
+  //horisPoints_ = field_->ksec2[ cNPtsIndexBegin ];
+
+
+   pointsInRow_ = 0;
+   checkAreaLimits();           //-- maybe only a subarea
+
+   currentLatIndex_ = firstLatIndex_;
+   currentLaty_     = latitudes_[ currentLatIndex_ ];
+   currentLonx_     = firstLonX();
+
+   horisPoints_ = pointsInRow( 0 );
+   dx_          = ( 360.0 / horisPoints_ );
+}
+
+//------------------------------------------------------
+
+bool MvReducedGaussianGrid::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   if( ++horisPointCount_ >= horisPoints_ )
+     {
+       if( isSouthToNorthScanning_ )
+	 --currentLatIndex_;
+       else
+	 ++currentLatIndex_;
+
+       currentLaty_ = latitudes_[ currentLatIndex_ ];
+       currentLonx_ = firstLonX();
+       //horisPoints_ = field_->ksec2[ cNPtsIndexBegin + currentLatIndex_ ];
+       horisPoints_ = pointsInRow( currentLatIndex_ );
+       dx_          = ( 360.0 / horisPoints_ );
+       horisPointCount_ = 0;
+       //cout << currentIndex_ << '\t' << currentLaty_ << '\t' << horisPoints_ << endl;
+     }
+   else
+     {
+       currentLonx_ += dx_;
+     }
+
+   return true;
+}
+//------------------------------------------------------
+
+int MvReducedGaussianGrid::pointsInRow( int row )
+{
+   if( ! field_ )
+      return 0;			 //-- must be valid message
+
+   if( ! pointsInRow_ )
+     {
+       size_t len   = horisLines_;
+       pointsInRow_ = new long[ len ];
+       int err = grib_get_long_array( field_->handle, "pl", pointsInRow_, &len );
+       if( err )
+          marslog(LOG_EROR,"MvReducedGaussianGrid::pointsInRow - grib_api: 'pl' not found!");
+     }
+
+  //--
+  //-- row: 0,1,2,...
+  //--
+  return pointsInRow_ ? pointsInRow_[row] : 0;
+}
+
+
+//===================================================================
+//
+// MvSatelliteImage:
+// ----------------
+
+#define SATHROW true
+
+MvSatelliteImage::MvSatelliteImage( field* myfield
+				    , field_state oldState
+				    , bool memoryToBeReleased
+                                  )
+: MvGridBase( myfield, oldState, memoryToBeReleased )
+{
+   nontested_grib_api_port("MvSatelliteImage()");
+
+   gridType_ = getString("typeOfGrid");
+
+   // Initialize Structures
+   pimin1_();
+
+   // Initialize Datum
+   double Prd  = 6378160.;
+   double Pflt = 0.00335289186;
+   pimind_(PROJSATELLITE,"satellite",0.,0.,0.,Prd,Pflt);
+
+   // Initialize Projection
+   pimp1_("satellite","image",0,PROJSATELLITE,0,0,0.,0.,0.,Prd,Pflt,0.,0.);
+   pimg1_(1,0.,0.,0.,0.);
+
+// Initialize Satellite projection
+   double  satnr = getLong("NrInRadiusOfEarth",SATHROW); //float(sec2_->altitude);
+   double  satdy = getLong("dy",SATHROW); //float(sec2_->y_diameter);
+   double  satdx = getLong("dx",SATHROW); //float(sec2_->x_diameter);
+
+   double SPri  = 2.0*asin(1.0/(satnr*0.000001)) / satdy;
+   double SPrj  = 2.0*asin(1.0/(satnr*0.000001)) / satdx;
+
+   double SPis  = getDouble("YpInGridLengths",SATHROW); //double(sec2_->y_coordinate);
+   double SPjs  = getDouble("XpInGridLengths",SATHROW); //double(sec2_->x_coordinate);
+
+   //double SPla0 = double(sec2_->latitude_point) * 0.001*CDR;
+   //double SPlo0 = double(sec2_->longitude_point) * 0.001*CDR;
+   double lat_pt = getDouble("latitudeOfSubSatellitePoint",SATHROW);
+   double lon_pt = getDouble("longitudeOfSubSatellitePoint",SATHROW);
+   double SPla0  = lat_pt * 0.001*CDR;
+   double SPlo0  = lon_pt * 0.001*CDR;
+
+   double SPrs  = double(satnr) * 0.000001 * EARTH_RADIUS;
+   double SPscn = getLong("scanningMode",SATHROW); //double(sec2_->scan_mode);
+
+   //double SPyaw = double(sec2_->orientation) * 0.001*CDR;
+   double orien = getDouble("orientationOfTheGrid",SATHROW); // previous key name (ga 1.8.0): orientationOfTheGridInMillidegrees
+   double SPyaw = orien * 0.001*CDR;
+
+   if( SPyaw < 0.0 )
+      SPyaw += PI;
+   else
+      SPyaw -= PI;
+
+   pims1_(SPri,SPrj,SPis,SPjs,SPla0,SPlo0,SPrs,SPscn,SPyaw);
+
+// Initialize Image
+   long          lin = getLong("numberOfPointsAlongYAxis",SATHROW); //short(sec2_->ny);
+   long          col = getLong("numberOfPointsAlongXAxis",SATHROW); //short(sec2_->nx);
+   double        satx0 = getDouble("xCoordinateOfOriginOfSectorImage",SATHROW); //double(sec2_->x_origin);
+   double        saty0 = getDouble("yCoordinateOfOriginOfSectorImage",SATHROW); //double(sec2_->y_origin);
+
+   double bllx = satx0*atan(tan(2.0*asin(1.0/(satnr*0.000001)) / satdx) *
+		     ((satnr*0.000001)-1.0)) * EARTH_RADIUS;
+
+   double blly = -(saty0 + lin-1)*atan(tan(2.*asin(1.0/(satnr*0.000001)) / satdy) *
+                                ((satnr*0.000001)-1.0)) * EARTH_RADIUS;
+
+   double burx = (satx0 + col-1)*atan(tan(2.*asin(1.0/(satnr*0.000001))/ satdx) *
+			       ((satnr*0.000001)-1.0)) * EARTH_RADIUS;
+
+   double bury = -saty0*atan(tan(2.0*asin(1.0/(satnr*0.000001)) / satdy) *
+		      ((satnr*0.000001)-1.0)) * EARTH_RADIUS;
+
+   double irx = (burx-bllx)/double(col-1);
+   double iry = (bury-blly)/double(lin-1);
+
+   // There is no need to allocate memory for the image.
+   // The program is using the MvField class.
+   pimii1_(bllx,blly,burx,bury,lin,col,irx,iry,0,0,Sbuf_);
+
+   currentLaty_ = cMvlatLonMissingValue;
+   currentLonx_ = cMvlatLonMissingValue;
+}
+
+MvSatelliteImage::~MvSatelliteImage ()
+{
+}
+
+//static int ftest=0;
+MvGridPoint MvSatelliteImage::nearestGridpoint( double lat_y, double lon_x )
+{
+
+//--
+//-- NOTE: prerequisite: horizontal scanning i.e. does not
+//--       function properly with vertical scanning (j faster)!
+//--
+
+   if( ! field_ )
+       return cMissingPoint;
+
+   // Compute image coordinates
+   Real col = lon_x * CDR;
+   Real lin = lat_y * CDR;
+   pll2ic (col,lin);
+
+
+#if 0
+//test
+if(ftest == 0)
+{
+   ftest=1;
+   int nlat = sec2_->ny;
+   int nlon = sec2_->nx;
+   long size = (long)nlat * (long)nlon;
+   double pix,rmax=0.,rmin=500.,rmean=0.;
+   int imin,imax,ii,jj;
+   long hist[256];
+   for (ii=0;ii<256;ii++) hist[ii]=0L;
+   for (ii=0; ii < nlat; ii++)
+   {
+     for (jj=0; jj < nlon; jj++)
+     {
+	pix = GetValue(ii,jj);
+        rmean += pix;
+        hist[(int)pix]++;
+        if(pix > rmax)
+        {
+	  rmax = pix;
+	  imax = ii;
+        }
+        if(pix < rmin)
+        {
+	  rmin = pix;
+	  imin = ii;
+        }
+     }
+   }
+   for (ii=0;ii<256;ii++)
+       cout << ii << " " << hist[ii] << endl;
+   cout << "rmin=" << rmin << " index=" << imin << endl;
+   cout << "rmax=" << rmax << " index=" << imax << endl;
+   cout << "min=" << rmean/(double)size << endl;
+}
+//end test
+#endif
+
+   double pixvalue = GetValue( (int)lin, (int)col );
+
+   return MvGridPoint( pixvalue, lat_y, lon_x);
+}
+
+bool MvSatelliteImage::getMatrixNN( double lat_y, double lon_x, MvMatrix& mat)
+{
+//--
+//-- NOTE: prerequisite: horizontal scanning i.e. does not
+//--       function properly with vertical scanning (j faster)!
+//--
+
+   if( ! field_ )
+       return false;
+
+   // Compute image coordinates
+   Real col = lon_x * CDR;
+   Real lin = lat_y * CDR;
+   pll2ic (col,lin);
+
+   // Compute area limits
+   int i,j,k,l;
+   int nlin = mat.Nlin();
+   int ncol = mat.Ncol();
+   int lmin = (int)lin - nlin/2;
+   int lmax = lmin + nlin - 1;
+   int cmin = (int)col - ncol/2;
+   int cmax = cmin + ncol - 1;
+
+   // Retrieve values
+   k = 0;
+   for ( i = lmin; i <= lmax; i++)
+   {
+	 l = 0;
+	 for ( j = cmin; j <= cmax; j++)
+	 {
+	       mat.Mput(k,l,GetValue(i,j));
+	       l++;
+	 }
+	 k++;
+   }
+
+   return true;
+}
+
+double MvSatelliteImage::interpolatePoint( double lat_y, double lon_x )
+{
+	// For Satellite images the nearest neighbour interpolation is used
+	MvGridPoint gp = nearestGridpoint (lat_y,lon_x);
+
+	return gp.value_;
+}
+
+double MvSatelliteImage::GetValue( int lin, int col )
+{
+   union{
+	 double dd;
+	 int ia[2];
+   };
+
+   // Check indexes
+   long nx = getLong("numberOfPointsAlongAParallel");
+   long ny = getLong("numberOfPointsAlongAMeridian");
+   if (lin < 0 || lin > ny || col < 0 || col > nx )
+	 return DBL_MAX;
+
+   // Retrieve image value
+   dd = valueAt( nx*(long)lin + (long)col );
+
+   long flg = getLong("section4.flag");
+   if ( flg == 0 )    // field_->ksec4[4] == 0 )
+	 return dd;               //float representation
+   else
+   {
+#ifdef LITTLE_END                 //integer representation
+	      return (double)ia[0];
+#else
+	      return (double)ia[1];
+#endif
+   }
+
+}
+//------------------------------------------------------
+
+bool MvSatelliteImage::advance()
+{
+   if( ! field_ || ++currentIndex_ >= length() )
+      return false;
+
+   currentLaty_ = cMvlatLonMissingValue;     //-- not yet implemented
+   currentLonx_ = cMvlatLonMissingValue;
+
+   return true;
+}
+
+
+
+//===================================================================
+//
+// MvGridFactory:
+// -------------
+//
+// Checks a raw GRIB field and if data representation is
+// any of the implemented ones creates a GRID object of
+// that type, otherwise returns zero.
+// Initialisation parameters:
+//   myfield:       the MARS field as input
+//   releaseMemory: copied to memoryToBeReleased
+//   expandGrid:    should we expand the grid data in memory?
+//------------------------------------------------------
+
+MvGridBase* MvGridFactory( field* myfield, bool releaseMemory, bool expandGrid )
+{
+   if( !myfield)
+      return 0;
+
+   bool memoryToBeReleased = releaseMemory;
+
+   field_state oldState = myfield->shape;
+
+   //-- ensure that GRIB msg is at least in memory, not necessarily expanded
+   // ideally should be packed_mem, but can only do this once we have ensured
+   // that it is expanded wherever it is needed, and preferably use
+   // grib_api's grib_nearest_find() function for interpolation purposes.
+
+   if (expandGrid)
+         set_field_state( myfield, expand_mem );  // (anything) -> expand_mem
+   else
+      if (oldState == packed_file)
+         set_field_state( myfield, packed_mem );  // packed_file -> packed_mem
+
+
+   const size_t cMaxBuf = 99;
+   char strbuf[ cMaxBuf+1 ];
+   size_t slen = cMaxBuf;
+
+   MvGridBase* grd = 0;
+   int err = grib_get_string(myfield->handle,"typeOfGrid",strbuf,&slen);
+   if( err != 0 )
+     {
+       grd = new MvUnimplementedGrid( myfield, oldState );
+       marslog( LOG_EROR,"MvGridFactory: failed getting grib_get_long->typeOfGrid");
+       return grd;
+     }
+
+   string myGridType(strbuf);
+
+   MvGridBase *grid = 0;
+
+   if( myGridType == cLatLonGrid )
+     grid = new MvLatLonGrid( myfield, oldState, memoryToBeReleased );
+
+   if( myGridType == cGaussianGrid )
+     grid = new MvGaussianGrid( myfield, oldState, memoryToBeReleased );
+
+   if( myGridType == cGaussianReducedGrid )
+     grid = new MvReducedGaussianGrid( myfield, oldState, memoryToBeReleased );
+
+   if( myGridType == cLatLonRotatedGrid )
+     grid = new MvLatLonRotatedGrid( myfield, oldState, memoryToBeReleased );
+
+   if( myGridType == cLatLonReducedGrid )
+   {
+     // no support for limited area fields of this grid type
+     MvReducedLatLongGrid *reducedGrid = new MvReducedLatLongGrid( myfield, oldState, memoryToBeReleased );
+
+     if (!reducedGrid->global_)
+     {
+        delete reducedGrid;
+        grid = new MvUnimplementedGrid( myfield, oldState );
+     }
+     else
+     {
+        grid = reducedGrid;
+     }
+   }
+
+   if( myGridType == cSatelliteImage )
+     grid = new MvSatelliteImage( myfield, oldState, memoryToBeReleased );
+
+   if( myGridType == cLambertGrid )
+     grid = new MvLambertGrid( myfield, oldState, memoryToBeReleased );
+
+   // if( myGridType == cPolarStereoGrid )
+   //   grid = new MvPolarStereoGrid( myfield, oldState, memoryToBeReleased );
+
+
+   if ((grid != 0) && (!grid->isValid())) // assigned, but not successfully constructed...
+   {
+        delete grid;
+        grid = 0;
+   }
+
+    if (grid == 0)
+        grid = new MvUnimplementedGrid( myfield, oldState );  // includes spectral fields
+
+
+   return grid;
+}
+
+
+//===================================================================
+//-------------------------------------------------------------------
+// MvGeoBox:
+// --------
+// Metview has "an Area Problem" i.e. areas are defined differently
+// for PlotWindow and Macroes. This class accepts geographical areas
+// defined in either form:
+//
+//     <1>  [upper left corner]-[lower right corner] e.g. [n,w,s,e]
+// or:
+//     <2>  [lower left corner]-[upper right corner] e.g. [s,w,n,e]
+//
+// where one corner value is a [latitude,longitude] pair.
+// NOTE: [latitude,longitude] corresponds to [y,x], NOT [x,y]!!
+//
+// Class asserts that internally:
+//    o  North >= South (North and South values swapped if <2> used)
+//    o   East >= West  (never swapped, only normalized)
+//
+// "East >= West" relation is guaranteed by normalising the values:
+//    o     0 <  East <= 360
+//    o  -360 <= West <= East
+//    o   (East-West) <= 360
+//
+// Member function 'isInside' tries to normalise the longitude parameter
+// between normalised East-West values.
+//
+// NOTE:
+// Prerequisite:
+// Class is designed to work properly with value ranges:
+//    o  -360 <= longitude <= +360
+//    o   -90 <= latitude  <=  +90.
+//
+
+//-------------------------------------------------------------------
+//    MvGeoBox::MvGeoBox and MvGeoBox::set prerequisite:
+//    -------------------------------------------------
+//     -360 <=  west,east <= 360
+//      -90 <= north,south <= 90
+//
+
+void MvGeoBox::set( double north, double west, double south, double east )
+{
+	n = north>south ? north : south;         //-- force n >= s
+	s = south<north ? south : north;         //-- force s <= n
+
+	e = east>0 ? east : east + 360.0;        //-- force 0 < e <= 360
+
+	if( west == east )
+	    w = e;                               //-- vertical line
+	else
+	    w = west>east ? west - 360.0 : west; //-- force -360 <= w <= e
+
+	if( (e - w) > 360.0 )                    //-- force (e-w) <= 360
+	    w += 360.0;
+
+//	marslog( LOG_DBUG, "MvGeoBox [ %g, %g, %g, %g ]", n,w,s,e );
+}
+
+//-------------------------------------------------------------------
+//   MvGeoBox::isInside prerequisite:
+//   -------------------------------
+//       -360 <= lon_x <= 360
+//        -90 <= lat_y <=  90
+//
+//   NOTE: parameters are (latitude,longitude) or (y,x), not (x,y)!!!
+//
+
+int MvGeoBox::isInside( double lat_y, double lon_x ) const
+{
+	if( lat_y > n || lat_y < s )
+	    return 0;                  //-- outside n-s band!
+
+	if( lon_x > e )                //-- assume -360 <= lon_x <= 360
+	    lon_x -= 360.0;            //-- and try to normalize
+	if( lon_x < w )
+	    lon_x += 360.0;
+
+	if( lon_x > e || lon_x < w )
+	    return 0;                  //-- outside!
+
+	return 1;
+}
+
+#if 0
+int inbox(double lon,double lat,double n,double w,double s,double e)
+{
+	if(lat > n || lat < s) return 0;
+
+	while(e   > w + 360.0) e   -= 360.0; while(e   < w) e   += 360.0;
+	while(lon > w + 360.0) lon -= 360.0; while(lon < w) lon += 360.0;
+//            ^
+//            !
+// should be  >=  (this one misses the exact western boarder line!!!)
+//
+// e.g. inbox( 330, lat, n, -30, s, 60 ) =>
+//
+//  while(330 > -30 + 360.0){skipped}; while(330 < -30){skipped}
+//  if(330 > 60 ...) return 0;   // boarder grid point missed!
+
+
+	if(lon > e || lon < w) return 0;
+
+	return 1;
+}
+#endif
+
diff --git a/src/libMetview/MvGrid.h b/src/libMetview/MvGrid.h
new file mode 100644
index 0000000..f6c063d
--- /dev/null
+++ b/src/libMetview/MvGrid.h
@@ -0,0 +1,637 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvGrid.h,    vk Aug-98
+
+#ifndef MvGrid_DEFINED
+#define MvGrid_DEFINED
+
+#include <float.h>
+
+#include "mars.h"
+#include <string>
+using std::string;
+
+#include "MvLocation.h"
+#include "MvMatrix.h"
+
+const string cLatLonGrid         ("regular_ll");
+const string cLatLonRotatedGrid  ("rotated_ll");
+const string cLatLonReducedGrid  ("reduced_ll");
+const string cGaussianGrid       ("regular_gg");
+const string cGaussianReducedGrid("reduced_gg");
+const string cPolarStereoGrid    ("polar_stereographic");
+const string cLambertGrid        ("lambert");
+const string cMercatorGrid       ("mercator");
+const string cSatelliteImage     ("space_view");
+
+const double cGridScaling      = 1000.0;
+//const int    cLevelNotGiven    = -999;
+
+
+//-- temporary functions:
+void grib_api_port_missing( const char* msg );
+void nontested_grib_api_port( const char* msg );
+
+
+class        MvGridBase;
+//! Function to create an instance of a suitable MvGrid object.
+MvGridBase*  MvGridFactory( field* myfield,
+                            bool memoryToBeReleased = true,
+                            bool expandGrid         = true);
+
+
+//===================================================================
+//
+// MvGridPoint:
+// -----------
+//! \brief Utility class (struct) for a single grid point
+//!
+//! A utility class to hold the value and the coordinates of
+//! a single grid point (or a location)
+//!
+
+struct MvGridPoint
+{
+    MvGridPoint( double value, double lat_y, double lon_x )
+               : value_( value ), loc_( lat_y, lon_x ){ }
+    MvGridPoint( double value, const MvLocation& loc )
+               : value_( value ), loc_( loc ){ }
+    MvGridPoint()
+               : value_( mars.grib_missing_value ), loc_( 0, 0 ){ }
+
+    double     value_;
+    MvLocation loc_;
+};
+
+const double      cMvGridMissingValue = DBL_MAX; // mars.grib_missing_value;
+const double      cMvlatLonMissingValue = -999.9; // mars.grib_missing_value;
+const MvGridPoint cMissingPoint( cMvGridMissingValue, cMvlatLonMissingValue, cMvlatLonMissingValue );
+
+//! Class to handle rectangular areas
+/*! Metview has "an Area Problem" i.e. areas are defined differently
+ *  for PlotWindow and for Macros. This class accepts geographical
+ *  areas defined in either form:
+ * <PRE>
+ *     (1) [upper left corner]-[lower right corner] i.e. [n,w,s,e] (Macro)
+ *  or:
+ *     (2) [lower left corner]-[upper right corner] i.e. [s,w,n,e] (Window)
+ * </PRE>
+ *  where one corner value is a [latitude,longitude] pair.
+ *
+ *  Class asserts that internally:
+ * <PRE>
+ *     o  North >= South (North and South values swapped if (2) used)
+ *     o   East >= West  (never swapped, only normalized)
+ * </PRE>
+ *  "East >= West" relation is guaranteed by normalising the values:
+ * <PRE>
+ *     o     0 <  East <= 360
+ *     o  -360 <= West <= East
+ *     o   (East-West) <= 360
+ * </PRE>
+ *  Prerequisite:\n
+ *  Class is designed to work properly with input argument ranges:
+ * <PRE>
+ *     o  -360 <= longitude <= +360
+ *     o   -90 <= latitude  <=  +90.
+ * </PRE>
+ */
+class MvGeoBox
+{
+ public:
+	//! Constructor with area fully defined
+	MvGeoBox( double north, double west, double south, double east )
+	      { set(north,west,south,east); }
+
+	//! Constructor that defines a belt between the given latitudes
+	MvGeoBox( double north, double south ){ set(north,0,south,360); }
+
+	//! Default constructor, area covers the whole globe
+	MvGeoBox(){ set(90,0,-90,360); }
+
+	//! Sets a new area
+	void set( double north, double west, double south, double east );
+
+	//! Tests if the given point is inside the area
+	/*! The longitude argument \c lon_x is normalised before testing,
+	 *  trying to fit it between the normalised East-West values.
+	 */
+	int  isInside( double lat_y, double lon_x ) const;
+
+ private:
+	double n, w, s, e;
+};
+
+// Backwards compatibility: MvGeoBox was previously called just GeoBox
+typedef MvGeoBox GeoBox;
+
+
+//===================================================================
+//
+// MvGridBase:
+// ----------
+//! Abstract base class for different grid representations
+/*! Classes have methods to traverse grid points consequtively.
+ *  For each valid grid point its value, location and non-normalised
+ *  weight can be requested.
+ */
+
+class MvGridBase
+{
+	friend class MvField;
+
+ public:
+	MvGridBase( field* myfield, field_state oldState, bool memoryToBeReleased );
+	virtual ~MvGridBase();
+
+	//! Returns the \c index:th value
+	double  operator[](int index);
+
+	//! Initialises the iterator
+	virtual void    init();
+
+	//! Returns the longitude value of the first grid point
+	virtual double  firstLonX() = 0;
+
+	//! Returns the latitude value of the first grid point
+	virtual double  firstLatY() = 0;
+
+	//! Advances the iterator to the next grid point
+	/*! Returns \c false if no more grid points left
+	 */
+	virtual bool    advance() = 0;
+
+	//! Returns the relative area weight of the grid point [iterator]
+	virtual double  weight() const;
+
+	//! Returns the nearest grid point value and location
+	virtual MvGridPoint nearestGridpoint( double lat_y, double lon_x );
+
+	//! Returns the value interpolated into the given point
+	virtual double      interpolatePoint( double lat_y, double lon_x );
+
+	//! Returns a matrix around the given point
+	virtual bool getMatrixNN( double lat_y, double lon_x, MvMatrix& mat);
+
+	//! Returns \c true if the underlying grid is geographical and implemented
+	/*! Returns \c false for spectral data and for unimplemented grids
+	 */
+	virtual bool hasLocationInfo() const { return true; }
+
+	//! Returns \c true when the object contains a valid field descriptor
+	bool  isValid() const { return field_ != 0; }
+
+	//! Returns \c true when the current grid is similar to \c otherGrib
+	/*! Returns \c false if grids contain different number of points
+	 *  or grid scanning modes are different
+	 */
+	bool  isEqual( const MvGridBase* otherGrib ) const;
+	//-- isSimilar() to be removed (011025/vk) --//
+//	bool   isSimilar( const MvGridBase* g ) const { return isEqual(g); }
+
+	//! Returns the grid type as a string
+	string gridType() const { return gridType_; }
+
+	//! Returns the value of the current grid point [iterator]
+	double value() const
+	         { return valueAt(currentIndex_); }
+//	         { return field_ ? (double)(field_->values[ currentIndex_ ]) : mars.grib_missing_value; }
+
+	//! Assigns \c xx to the value of the current grid point [iterator]
+	void   value( double xx ) { if ( field_ ) field_->values[ currentIndex_] = xx; }
+
+	//! Returns the value of the \c i:th grid point
+	double valueAt( int i ) const;
+//	double valueAt( int i ) const
+//	         { return field_ ? (double)(field_->values[ i ]) : mars.grib_missing_value; }
+
+	//! Assigns \c xx to the value of the \c i:th grid point
+	void   valueAt( int i, double xx ) { if ( field_ ) field_->values[ i ] = xx; }
+
+	//! Returns \c true when the grid point has a value
+	/*! Returns \c false when the grid point is missing its value
+	 */
+	bool   hasValue() const { return value() != mars.grib_missing_value; }
+
+	//! Returns the code used for representing missing values
+	double missingValue() const { return mars.grib_missing_value; }
+
+	//! Returns the latitude of the current grid point [iterator]
+	virtual double  lat_y() const { return currentLaty_; }
+
+	//! Returns the longitude of the current grid point [iterator]
+	virtual double  lon_x() const { return currentLonx_; }
+
+	//! Returns the number of data values in the GRIB message
+	/*! This is either the number of grid points (for geographical
+	 *  grids) or the number spectral coefficient (spherical harmonics)
+	 */
+	long        length() const { return field_ ? (long)(field_->value_count) : 0; }
+
+	//! Returns the value and the location of the current grid point [iterator]
+	MvGridPoint gridPoint() const { return MvGridPoint( value(), lat_y(), lon_x() ); }
+
+	virtual vector<double> averageCalc(bool ew,double N,double W,double S,double E,double gridInterval);
+
+	long   getLong( const char* name, bool throwOnError = false ) const;
+	double getDouble( const char* name, bool throwOnError = false ) const;
+	string getString( const char* name, bool throwOnError = false ) const;
+
+	long   getLongArray   ( const char* name, long **lvals, bool throwOnError = false ) const;
+	long   getDoubleArray ( const char* name, double **lvals, bool throwOnError = false ) const;
+
+
+	bool   setLong  ( const char* name, long val );
+	bool   setDouble( const char* name, double val );
+	bool   setString( const char* name, string &val );
+
+	long   vertCoordCoefPairCount();
+	bool   vertCoordCoefs( double& C1, double& C2, int level );
+
+	field* fieldPtr(){ return field_; }
+
+ protected:
+	bool  ScanModeCheck( double first, double last, double step ) const;
+
+ protected:
+	field*   field_;
+        double*  vertCoord_;
+        long     vertCoordPairCount_;
+	string   gridType_;
+	long  horisLines_;       //-- points_meridian
+	long  horisPoints_;      //-- points_parallel
+	int      horisPointCount_;
+	long     currentIndex_;
+	double   currentLaty_;
+	double   currentLonx_;
+	double   dx_;
+	field_state  oldState_;
+	bool         memoryToBeReleased_;
+};
+
+//===================================================================
+//
+// MvUnimplementedGrid:
+// -------------------
+//
+//! \brief MvGrid class for unimplemented grids
+//!
+//! This class is for unimplemented grids.
+//!
+//!  Used by MvGridFactory to return a valid ptr, always, i.e.
+//!  applications can safely use the ptr. (Method 'isValid()'
+//!  can be used to check if the grid behind the ptr has been
+//!  properly implemented.)
+//!
+
+class MvUnimplementedGrid : public MvGridBase
+{
+ public:
+	MvUnimplementedGrid( field* myfield, field_state oldState );
+	~MvUnimplementedGrid(){}
+
+	virtual void    init();
+	virtual bool    advance();
+	virtual double  firstLonX(){ return cMvlatLonMissingValue;}
+	virtual double  firstLatY(){ return cMvlatLonMissingValue;}
+	virtual bool    hasLocationInfo() const { return false; }
+	virtual double  weight() const { return 1;}
+	virtual MvGridPoint nearestGridpoint( double, double )
+	  { return cMissingPoint; }
+	virtual double      interpolatePoint( double, double )
+	  { return DBL_MAX; }
+	virtual vector<double> averageCalc(bool ew,double N,double W,double S,double E,double grid);
+};
+
+//===================================================================
+//
+// MvLatLonGrid:
+// ------------
+//! \brief MvGrid class for fields in latitude/longitude grid
+//!
+//! This class is for fields in normal latitude/longitude grid
+//!
+
+class MvLatLonGrid : public MvGridBase
+{
+ public:
+	MvLatLonGrid( field*      myfield
+                    , field_state oldState
+		    , bool        memoryToBeReleased
+		    , bool        isRotated = false );
+	~MvLatLonGrid(){}
+
+	virtual double  firstLonX();
+	virtual double  firstLatY();
+	virtual double  lastLonX();
+	virtual double  lastLatY();
+	virtual bool    advance();
+	virtual MvGridPoint nearestGridpoint( double lat_y, double lon_x );
+	virtual double      interpolatePoint( double lat_y, double lon_x );
+
+ protected:
+	//gribsec2_ll* sec2_;
+
+ private:
+	double       dy_;
+	double       firstLonX_;
+	double       firstLatY_;
+	double       lastLonX_;
+	double       lastLatY_;
+};
+
+//===================================================================
+//
+// MvLatLonRotatedGrid:
+// -------------------
+//! \brief MvGrid class for fields in rotated latitude/longitude grid
+//!
+//! This class is for fields in rotated latitude/longitude grid
+//!
+
+class MvLatLonRotatedGrid : public MvLatLonGrid
+{
+ public:
+	MvLatLonRotatedGrid( field* myfield, field_state oldState, bool memoryToBeReleased );
+	~MvLatLonRotatedGrid(){}
+
+	virtual double  lat_y() const
+	 { return unRotate( MvLatLonGrid::lat_y(), MvLatLonGrid::lon_x() ).latitude(); }
+	virtual double  lon_x() const
+	 { return unRotate( MvLatLonGrid::lat_y(), MvLatLonGrid::lon_x() ).longitude(); }
+
+	virtual MvGridPoint nearestGridpoint( double lat_y, double lon_x );
+	virtual double      interpolatePoint( double lat_y, double lon_x );
+
+ protected:
+	MvLocation   unRotate() const { return unRotate( currentLaty_, currentLonx_ ); }
+	MvLocation   unRotate( double laty, double lonx) const;
+	MvLocation   rotate( double laty, double lonx) const;
+
+ private:
+	double       southPoleLaty_;
+	double       southPoleLonx_;
+	// double       southPoleRotation_;
+};
+
+//===================================================================
+//
+// MvLambertGrid:
+// -------------
+//! \brief MvGrid class for fields in Lambert grid
+//!
+//! This class is for fields in Lambert grid. Member functions nearestGridpoint()
+//! and interpolatePoint() have not been implemented for this class and
+//! thus the methods in the base class are used (these methods do not try
+//! to calculate which grid point is the right one, but instead go through
+//! all points in order to find the closest one).
+//!
+
+class MvLambertGrid : public MvGridBase
+{
+ public:
+	MvLambertGrid( field*      myfield
+                     , field_state oldState
+		     , bool        memoryToBeReleased );
+	~MvLambertGrid(){}
+
+	virtual double  firstLonX();
+	virtual double  firstLatY();
+	virtual bool    advance();
+//	virtual MvGridPoint nearestGridpoint( double lat_y, double lon_x );
+//	virtual double      interpolatePoint( double lat_y, double lon_x );
+	virtual double  weight() const;
+
+ protected:
+	bool  computeLatLon( int ip, int jp );
+
+ protected:
+//	fortint*     sec2_;
+
+ private:
+	//double       dy_;
+	double       gridLat1_;
+	double       gridLon1_;
+	double       gridVertLon_;
+	double       gridTanLat_;
+	double       sinLatTan_;
+	double       sinLatTanInvPer2_;
+	double       cosLatTan_;
+	double       hemiSphere_;
+	double       poleI_;
+	double       poleJ_;
+	double       earthRadius_;
+	double       earthRadiusPerDx_;
+	double       theThing_;
+	int          currentI_;
+	int          currentJ_;
+};
+
+
+
+//===================================================================
+//
+// MvIrregularGrid:
+// ------------------
+//! \brief MvGrid parent class for fields in Gaussian and reduced_latlong grid 
+//!
+//! An abstract parent class for fields in Gaussian and reduced_latlong grid.
+//!
+
+class MvIrregularGrid : public MvGridBase
+{
+ public:
+	MvIrregularGrid( field* myfield, field_state oldState, bool memoryToBeReleased );
+	~MvIrregularGrid();
+
+	virtual void    init();
+	virtual double  firstLonX();
+	virtual double  firstLatY();
+	virtual MvGridPoint nearestGridpoint( double lat_y, double lon_x );
+	virtual double      interpolatePoint( double lat_y, double lon_x );
+	virtual int     pointsInRow( int row ) = 0;
+	bool            global_;
+	virtual double  extrapolatePoint( double lat_y, double lon_x ) = 0;
+	double          lastLonX();
+
+ protected:
+	void         checkAreaLimits();
+	int          findLatIndex( double latitude );
+
+ protected:
+//	gribsec2_gg* sec2_;
+	long         numGlobalParallels_;
+	double*      latitudes_;
+	int          firstLatIndex_;
+	int          lastLatIndex_;
+	int          currentLatIndex_;
+	bool         isSouthToNorthScanning_;
+	double       firstLonX_;
+	double       lastLonX_;
+};
+
+
+
+//===================================================================
+//
+// MvReducedLatLongGrid:
+// ---------------------
+//! \brief MvGrid class for fields in reduced lat/long grid
+//!
+//! The number of points on each parallel is taken from
+//! the GRIB message.
+//!
+
+class MvReducedLatLongGrid : public MvIrregularGrid
+{
+ public:
+	MvReducedLatLongGrid( field* myfield, field_state oldState, bool memoryToBeReleased );
+	~MvReducedLatLongGrid();
+
+	virtual bool    advance();
+	virtual int     pointsInRow( int row );
+	virtual double  extrapolatePoint( double, double )
+		{ return DBL_MAX; }
+
+ protected:
+	long*           pointsInRow_;
+};
+
+
+
+//===================================================================
+//
+// GaussianLatitudes:
+// ------------------
+//! \brief Retrieves, caches and returns the results of grib_get_gaussian_latitudes()
+
+
+class GaussianLatitudes
+{
+ public:
+ 	GaussianLatitudes() {};
+	~GaussianLatitudes() {};
+	int latitudes(long trunc, double *v, unsigned int numLatitudes);
+
+ private:
+	map<long, vector<double> > cachedLatitudes_;
+ 
+};
+
+
+
+//===================================================================
+//
+// MvGaussianGridBase:
+// ------------------
+//! \brief MvGrid parent class for fields in Gaussian grid
+//!
+//! An abstract parent class for fields in Gaussian grid.
+//!
+
+class MvGaussianGridBase : public MvIrregularGrid
+{
+ public:
+	MvGaussianGridBase( field* myfield, field_state oldState, bool memoryToBeReleased );
+	~MvGaussianGridBase() { };
+
+	virtual double extrapolatePoint( double lat_y, double lon_x );
+	static GaussianLatitudes gLatitudes_;
+};
+
+//===================================================================
+//
+// MvGaussianGrid:
+// --------------
+//! \brief MvGrid class for fields in Gaussian grid
+//!
+//! This class is for fields in non-reduced Gaussian grid.
+//!
+
+class MvGaussianGrid : public MvGaussianGridBase
+{
+ public:
+    MvGaussianGrid( field* myfield, field_state oldState, bool memoryToBeReleased );
+    ~MvGaussianGrid(){}
+
+	virtual bool    advance();
+	virtual int     pointsInRow( int row );
+};
+
+//===================================================================
+//
+// MvReducedGaussianGrid:
+// ---------------------
+//! \brief MvGrid class for fields in reduced Gaussian grid
+//!
+//! The number of points on each parallel is taken from
+//! the GRIB message.
+//!
+
+class MvReducedGaussianGrid : public MvGaussianGridBase
+{
+ public:
+	MvReducedGaussianGrid( field* myfield, field_state oldState, bool memoryToBeReleased );
+	~MvReducedGaussianGrid(){ delete [] pointsInRow_; }
+
+	virtual bool    advance();
+	virtual int     pointsInRow( int row );
+
+ protected:
+	long*           pointsInRow_;
+};
+
+//===================================================================
+//
+// MvSatelliteImage:
+// -------------------
+//! \brief MvGrid class for Satellite images
+//!
+//! Note that some member functions have not been implemented.
+//!
+
+class MvSatelliteImage : public MvGridBase
+{
+ public:
+	MvSatelliteImage( field* myfield
+			  , field_state oldState
+			  , bool memoryToBeReleased
+	                );
+
+	~MvSatelliteImage();
+
+	//! Dummy function. Returns always missing_value.
+	virtual double  firstLonX(){ return cMvlatLonMissingValue;}
+
+	//! Dummy function. Returns always missing_value.
+	virtual double  firstLatY(){ return cMvlatLonMissingValue;}
+
+	virtual bool    advance(); //{ return false;}
+
+	//! Dummy function. Returns always 1.
+	virtual double  weight() const { return 1; }
+
+	virtual MvGridPoint nearestGridpoint( double, double );
+	virtual double      interpolatePoint( double, double );
+	virtual bool getMatrixNN( double lat_y, double lon_x, MvMatrix& mat);
+
+	//! Returns always false (location info not available).
+	virtual bool hasLocationInfo() const { return false; }
+
+	double GetValue( int lin, int col );
+
+ protected:
+//	gribsec2_sv*       sec2_;
+	unsigned char*     Sbuf_;
+};
+
+
+#endif
+// MvGrid_DEFINED
diff --git a/src/libMetview/MvLanguage.cc b/src/libMetview/MvLanguage.cc
new file mode 100644
index 0000000..cf6d2ab
--- /dev/null
+++ b/src/libMetview/MvLanguage.cc
@@ -0,0 +1,60 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include "Metview.h"
+
+//===================================================================
+// MvLanguage
+
+MvLanguage::MvLanguage(const char *lang,const char *rule,long flags)
+{
+	Lang = lang?read_language_file(lang):NULL;
+	Rule = rule?read_check_file(rule):NULL;
+	Flags = flags;
+}
+
+MvLanguage::~MvLanguage()
+{
+	free_all_requests(Lang);
+	free_rule(Rule);
+}
+
+MvRequest MvLanguage::trimAll(const MvRequest& r)
+{
+	return MvRequest(trim_all_requests(Lang, r), false);
+}
+
+MvRequest MvLanguage::expandAll(const MvRequest& r)
+{
+	reset();
+	expand_flags(Flags);
+	return MvRequest(expand_all_requests(Lang, Rule, r), false);
+}
+
+MvRequest MvLanguage::trimOne(const MvRequest& r)
+{
+		
+	MvRequest one = r.justOneRequest();
+	return MvRequest(trim_all_requests(Lang, one), false);
+}
+
+MvRequest MvLanguage::expandOne(const MvRequest& r)
+{
+	reset();
+	expand_flags(Flags);
+	MvRequest one = r.justOneRequest();
+	return MvRequest(expand_all_requests(Lang, Rule, one), false);
+}
+
+void MvLanguage::reset(void)
+{
+	reset_language(Lang);
+}
+
diff --git a/src/libMetview/MvLanguage.h b/src/libMetview/MvLanguage.h
new file mode 100644
index 0000000..59e5d54
--- /dev/null
+++ b/src/libMetview/MvLanguage.h
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvLanguage_DEFINED
+#define MvLanguage_DEFINED
+
+//! Class to handle Metview language syntax files
+/*! This is a C++ wrapper around libMars C functions in \c src/libMars/expand.c.\n \n
+ *  NOTE: class has no explicit copy constructors or operator=,
+ *  so copies share the same pointers!
+ */
+class MvLanguage {
+	long     Flags;
+	request *Lang;
+	rule    *Rule;
+
+	// Note : no destructors, copy construtors or operator=,
+	// so copies share the same pointers
+
+public:
+	//! Constructor
+	/*! Argument \c langFile is the file name of the language syntax file,
+	 *  \c rulesFile is the name of the rules file (use \c 0 if no rules file)
+	 *  and \c expandFlags is a combination of bits defining how requests
+	 *  should be expanded (see file \c src/libMars/mars.h for
+	 *  defined mnemonics and their values).
+	 */
+	MvLanguage(const char *langFile, const char *rulesFile, long expandFlags = EXPAND_2ND_NAME);
+
+	//! Destructor
+	~MvLanguage();
+
+	//
+
+	//! Removes non-matching parameters
+	/*! Removes parameters that are not defined in the language file
+	 *  from all requests in \c req
+	 */
+	MvRequest trimAll(const MvRequest& req);
+
+	//! Expands all parameters in all requests in \c req
+	MvRequest expandAll(const MvRequest& req);
+
+	//! Removes non-matching parameters
+	/*! Removes parameters that are not defined in the language file
+	 *  from the current request in \c req
+	 */
+	MvRequest trimOne(const MvRequest& req);
+
+	//! Expands all parameters in the current request in \c req
+	MvRequest expandOne(const MvRequest& req);
+
+	//
+	//! Set request expansion flags
+	/*! For values and mnemonics, see \c EXPAND_* defines in file \c src/libMars/mars.h
+	 */
+	void      setFlags(long f) { Flags = f; }
+
+	//! Resets the language file
+	void      reset(void);
+};
+#endif
diff --git a/src/libMetview/MvLocation.cc b/src/libMetview/MvLocation.cc
new file mode 100644
index 0000000..7dab469
--- /dev/null
+++ b/src/libMetview/MvLocation.cc
@@ -0,0 +1,263 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvLocation.cc,     vk 940901...
+//                rev vk 011025
+
+// classes:  MvLocation, MvArea, MvXSectionLine
+
+
+#include <math.h>
+//#include "Metview.h"
+#include "MvLocation.h"
+
+//_____________________________________________________________________ set
+void
+MvLocation :: set( double aLat, double aLong )
+{
+/*--- to check or not to check: XSection computes values outside the real world!!!
+   if( aLat != MISSING_LOC_VALUE && ( aLat > 90. || aLat < -90. ) )
+   {
+     cerr << " >>> MvLocation::MvLocation: strange latitude value " << aLat << endl;
+     fLatitude = MISSING_LOC_VALUE;
+   }
+   else
+---*/
+   fLatitude = aLat;
+
+/*---
+   if( aLong != MISSING_LOC_VALUE && ( aLong > 360. || aLong < -360. ) )
+   {
+     cerr << " >>> MvLocation::MvLocation: strange longitude value " << aLong << endl;
+     fLongitude = MISSING_LOC_VALUE;
+   }
+   else
+---*/
+   fLongitude = aLong;
+}
+
+//______________________________________________________________ distanceInRadians
+double
+MvLocation :: distanceInRadians( const MvLocation& anOtherLocation ) const
+{
+   const double cDEG2RAD = M_PI / 180.0;
+
+   double lat1 = latitude() * cDEG2RAD;
+   double lat2 = anOtherLocation.latitude() * cDEG2RAD;
+   double lon1 = longitude() * cDEG2RAD;
+   double lon2 = anOtherLocation.longitude() * cDEG2RAD;
+
+   //-- from: http://williams.best.vwh.net/avform.htm (020815/vk) --
+   double d = acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2));
+
+   return d;
+}
+
+//_____________________________________________________________ distanceInDegrees
+double
+MvLocation :: distanceInDegrees( const MvLocation& anOtherLocation ) const
+{
+   return distanceInRadians( anOtherLocation ) * 180.0 / M_PI;
+}
+
+//_____________________________________________________________ distanceInMeters
+double
+MvLocation :: distanceInMeters( const MvLocation& anOtherLocation ) const
+{
+  const double cR2NM = 180.0*60.0/M_PI;  //-- radians -> nautical miles
+  const double cNM2M = 1852;             //-- nautical miles -> metres
+
+  double nm = distanceInRadians( anOtherLocation ) * cR2NM;
+  return nm * cNM2M;;
+}
+
+//_____________________________________________________________ operator=
+MvLocation&
+MvLocation :: operator= ( const MvLocation& aLoc )
+{
+   set( aLoc.latitude(), aLoc.longitude() );
+   return *this;
+}
+//_____________________________________________________________ operator<<
+
+ostream& operator<< ( ostream& aStream, const MvLocation& aLocation )
+{
+   aStream << "(" << aLocation.latitude() << "," << aLocation.longitude() << ")";
+/*--- How to get a constant field width + constant nr of decimal digits!?
+   aStream << "(";
+   aStream.width( 6 ); aStream.fill( ' ' );
+   aStream << aLocation.latitude() << ",";
+   aStream.width( 7 ); aStream.fill( ' ' );
+   aStream << aLocation.longitude() << ")";
+---*/
+   return aStream;
+}
+
+//____________________________________________________________________________
+//============================================================================ MvArea
+//____________________________________________________________________________
+
+MvArea :: MvArea( void )
+{
+   MvLocation myLocation;
+   set( myLocation, myLocation );
+}
+//____________________________________________________________________
+
+void
+MvArea :: set( const MvLocation& aLocation1, const MvLocation& aLocation2 )
+{
+   double y1 = aLocation1.latitude();
+   double x1 = aLocation1.longitude();
+   double y2 = aLocation2.latitude();
+   double x2 = aLocation2.longitude();
+   if( y1 > y2 )
+   {
+      double yy = y1; y1 = y2; y2 = yy;
+   }
+   if( x1 > x2 )
+   {
+      double xx = x1; x1 = x2; x2 = xx;
+   }
+   fLowerLeft.set( y1, x1 );
+   fUpperRight.set( y2, x2 );
+}
+//____________________________________________________________________
+
+bool
+MvArea :: inside( const MvLocation& aPoint ) const
+{
+   if( aPoint.latitude() >= fLowerLeft.latitude() &&
+       aPoint.latitude() <= fUpperRight.latitude() &&
+       aPoint.longitude() >= fLowerLeft.longitude() &&
+       aPoint.longitude() <= fUpperRight.longitude()
+      )
+     return true;
+   else
+     return false;
+}
+//____________________________________________________________________
+
+MvArea&
+MvArea :: operator= ( const MvArea& anArea )
+{
+   set( anArea.lowerLeft(), anArea.upperRight() );
+   return *this;
+}
+//____________________________________________________________________
+
+ostream& operator<< ( ostream& aStream, const MvArea& anArea )
+{
+   aStream << anArea.lowerLeft() << "-" << anArea.upperRight();
+   return aStream;
+}
+
+//______________________________________________________________________
+//====================================================================== MvXSectionLine
+//______________________________________________________________________
+
+//_____________________________________________________________ WithinDelta
+bool
+MvXSectionLine :: withinDelta( const MvLocation& aLocation ) const
+{
+   //-- check that max delta has been set
+   if( fMaxDeltaInMeters < 0 )
+      return false;
+
+   //-- check distance from the line going through end points
+   if( deltaInMeters( aLocation ) > fMaxDeltaInMeters )
+      return false;
+
+   //--- check that the distance is from the line between end points
+   return insideXLine( aLocation );
+}
+//_____________________________________________________________ InsideXLine
+bool
+MvXSectionLine :: insideXLine( const MvLocation& aLocation ) const
+{
+   MvLocation myLocation = nearestPointOnXLine( aLocation );
+   MvArea myArea( fLocation1, fLocation2 );
+   return myArea.inside( myLocation );
+}
+//_____________________________________________________________ NearestPointOnXLine
+// Q&D approximation for distance of a point from an XSection
+// line, in degrees true at equator...
+//--------
+// WARNING: calculates distance from a line going through end
+//          points of XSectionLine, NOT ONLY between points!
+//-------------------------------------------------------------
+MvLocation
+MvXSectionLine :: nearestPointOnXLine( const MvLocation& aLocation ) const
+{
+   MvLocation myNearestPointOnXLine;
+
+   double dy = fLocation1.latitude() - fLocation2.latitude();
+   double dx = fLocation1.longitude() - fLocation2.longitude();
+
+   if( dx == 0 )            //-- vertical line --
+   {
+      myNearestPointOnXLine.set( aLocation.latitude(), fLocation1.longitude() );
+   }
+   else if( dy == 0 )       //-- horizontal line --
+      {
+         myNearestPointOnXLine.set( fLocation1.latitude(), aLocation.longitude() );
+      }
+      else                  //-- just a line --
+      {
+         // calculate coefficients for the Xsection line: y=a1*x+b1
+         double a1 = dy / dx;
+         double b1 = fLocation1.latitude() - a1 * fLocation1.longitude();
+
+         // define perpendicular line thru aLocation: y=a2*x+b2
+         double a2 = - 1. / a1;
+         double b2 = aLocation.latitude() - a2 * aLocation.longitude();
+
+         double x = ( b2 - b1 ) / ( a1 - a2 );
+         double y = a1 * x + b1;
+         myNearestPointOnXLine.set( y, x );
+      }
+
+   //-- WARNING: does not check that nearest point is inside XSectionLine !!!!
+   return  myNearestPointOnXLine;
+}
+//_____________________________________________________________ DeltaInDegrees
+double
+MvXSectionLine :: deltaInDegrees( const MvLocation& aLocation ) const
+{
+   return aLocation.distanceInDegrees( nearestPointOnXLine( aLocation ) );
+}
+//_____________________________________________________________ DeltaInMeters
+// Q&D approximation for delta, uses DeltaInDegrees
+//-------------------------------------------------------------
+double
+MvXSectionLine :: deltaInMeters( const MvLocation& aLocation ) const
+{
+   //-- Q&D formula, out of my old used brains, unchecked!!!! (vk 940901) --
+   double degreeIntoMeters = 6370.*1000. * 2. * M_PI / 360.;
+   return deltaInDegrees( aLocation ) * degreeIntoMeters;
+}
+//_____________________________________________________________ operator=
+MvXSectionLine&
+MvXSectionLine :: operator= ( const MvXSectionLine& anXLine )
+{
+   setLine( anXLine.startPoint(), anXLine.endPoint() );
+   setMaxDelta( anXLine.maxDelta() );
+   return *this;
+}
+//_____________________________________________________________ operator<<
+// output format: "(lat1,long1)-(lat2,long2)/delta"
+//-------------------------------------------------
+
+ostream& operator<< ( ostream& aStream, const MvXSectionLine& anXLine )
+{
+   aStream << anXLine.startPoint() << "-" << anXLine.endPoint()
+           << "/" << anXLine.fMaxDeltaInMeters; // << endl;
+   return aStream;
+}
+
diff --git a/src/libMetview/MvLocation.h b/src/libMetview/MvLocation.h
new file mode 100644
index 0000000..ffec53a
--- /dev/null
+++ b/src/libMetview/MvLocation.h
@@ -0,0 +1,187 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvLocation.h,     vk 940901...
+//               rev vk 950303
+
+#ifndef MvLocation_DEFINED_
+#define MvLocation_DEFINED_
+
+#include "inc_iostream.h"
+
+const double MISSING_LOC_VALUE = -99999.;
+
+
+//_________________________________________________________________________ MvLocation
+//! Class for geographical locations
+/*! MvLocation is used to store latitude-longitude location values.
+ *  Class also provides methods to calculate the distance to another
+ *  geographical location
+ */
+class MvLocation
+{
+//! Output operator for MvLocation object
+/*! The output is enclosed in parenthesis and latitude and longitude values
+ *  are separated by a comma, for instance:
+ * <PRE>
+ *      MvLocation loc1(51.46,-1.33);
+ *      MvLocation loc2(60.45,25.0);
+ *      std::cout << "Locations are: " << loc1 << " and " << loc2 << std::endl;
+ * </PRE>
+ *  would output the following line:
+ * <PRE>
+ *      Locations are: (51.46,-1.33) and (60.45,25)
+ * </PRE>
+ */
+ friend ostream& operator<< ( ostream& aStream, const MvLocation& aLocation );
+
+ public:
+	//! Constructor, location is assigned with missing values
+	MvLocation() { fLatitude  = MISSING_LOC_VALUE;
+	               fLongitude = MISSING_LOC_VALUE; }
+
+	//! Constructor for latitude-longitude location
+	MvLocation( double aLat, double aLong ) { set( aLat, aLong); }
+
+   //! Sets new latitude-longitude location
+   void  set( double aLat, double aLong );
+
+   //! Checks that the stored location is a valid geographical point
+   /*! Latitude value must be in interval [-90,90] and longitude
+    *  value in interval [-360,360], in degrees.
+    */
+   bool  ok(){ return (fLatitude  <=  90 && fLatitude >=  -90 &&
+                       fLongitude <= 360 && fLongitude >= -360); }
+
+  //! Returns the latitude value
+  double  latitude() const  { return fLatitude; }
+
+  //! Alias to method latitude()
+  double  y() const         { return fLatitude; }
+
+  //! Returns the longitude value
+  double  longitude() const { return fLongitude; }
+
+  //! Alias to method longitude()
+  double  x() const         { return fLongitude; }
+
+  //! Returns the distance (in radians) to the given point
+  double  distanceInRadians( const MvLocation& anOtherLocation ) const;
+
+  //! Returns the distance (in degrees) to the given point
+  double  distanceInDegrees( const MvLocation& anOtherLocation ) const;
+
+  //! Returns the distance (in metres) to the given point
+  double  distanceInMeters( const MvLocation& anOtherLocation ) const;
+
+  //! Assignment operator
+  MvLocation& operator= ( const MvLocation& aLoc );
+
+ private:
+  double fLatitude;
+  double fLongitude;
+};
+
+//_________________________________________________________________________ MvArea
+//! Class for geographical areas (squares on cylindrical projection)
+/*! This is another incarnation of MvGeoBox class, used mainly by
+ *  MvObsSetIterator. For other usage MvGeoBox is recommended over MvArea.
+ */
+class MvArea
+{
+ friend ostream& operator<< ( ostream& aStream, const MvArea& aArea );
+
+ public:
+         MvArea();
+         MvArea( const MvLocation& aLoc1, const MvLocation& aLoc2 )
+	                                                   { set( aLoc1, aLoc2 ); }
+
+       void  set( const MvLocation& aLoc1, const MvLocation& aLoc2 );
+       bool  inside( const MvLocation& aPoint ) const;
+ MvLocation  lowerLeft( void ) const { return fLowerLeft; }
+ MvLocation  upperRight( void ) const { return fUpperRight; }
+
+  MvArea& operator= ( const MvArea& aLoc );
+
+ private:
+  MvLocation fLowerLeft;
+  MvLocation fUpperRight;
+};
+
+//_____________________________________________________________________ MvXSectionLine
+//! Class for cross section lines (straight lines on cylindrical projection)
+/*! Class can be used to check if any given point is withing the allowed
+ *  distance (max delta) from the given line, i.e. close enough to be
+ *  considered to be within the line.
+ */
+class MvXSectionLine
+{
+ friend ostream& operator<< ( ostream& aStream, const MvXSectionLine& aXSectionLine );
+
+ public:
+	//! Empty constructor creates a missing line
+	MvXSectionLine( void )
+	              { fLocation1.set( MISSING_LOC_VALUE, MISSING_LOC_VALUE );
+	                fLocation2.set( MISSING_LOC_VALUE, MISSING_LOC_VALUE );
+	                fMaxDeltaInMeters = -1;
+	              }
+
+	//! Constructor, only points defined, no max delta given
+	/*! Use method setMaxDelta() to set the maximum allowed distance from the line
+	*/
+	MvXSectionLine( const MvLocation& aLoc1, const MvLocation& aLoc2 )
+	              { fLocation1 = aLoc1; fLocation2 = aLoc2; fMaxDeltaInMeters = -1; }
+
+	//! Constructor, two points and max distance from the line
+	MvXSectionLine( const MvLocation& aLoc1, const MvLocation& aLoc2, double aDelta )
+	              { fLocation1 = aLoc1; fLocation2 = aLoc2; fMaxDeltaInMeters = aDelta; }
+
+	//! Set a new line between points aLoc1 and aLoc2
+	void  setLine( const MvLocation& aLoc1, const MvLocation& aLoc2 )
+	             { fLocation1 = aLoc1; fLocation2 = aLoc2; }
+
+	//! Return the current start point of the line
+	MvLocation  startPoint( void ) const { return fLocation1; }
+
+	//! Return the current end point of the line
+	MvLocation  endPoint( void ) const   { return fLocation2; }
+
+	//! Set the maximum allowed distance from the line
+	void  setMaxDelta( double aDelta ) { fMaxDeltaInMeters = aDelta; }
+
+	//! Return the current maximum allowed distance from the line
+	double  maxDelta( void ) const { return fMaxDeltaInMeters; }
+
+	//! Returns true if the given point is within the given proximity of the line
+	bool  withinDelta( const MvLocation& aLocation ) const;
+
+	//! Returns the distance of the given point from the cross section line (in degrees)
+	double  deltaInDegrees( const MvLocation& aLocation ) const;
+
+	//! Returns the distance of the given point from the cross section line (in meters)
+	double  deltaInMeters( const MvLocation& aLocation ) const;
+
+	//! Assignment operator
+	MvXSectionLine& operator= ( const MvXSectionLine& anXLine );
+
+ private:
+	//! Returns the nearest point on the line through end points
+	MvLocation  nearestPointOnXLine( const MvLocation& aLocation ) const;
+
+	//! Checks that the closest point on the line is between end points
+	bool  insideXLine( const MvLocation& aLocation ) const;
+
+ private:
+  MvLocation  fLocation1;
+  MvLocation  fLocation2;
+      double  fMaxDeltaInMeters;
+};
+
+#endif
+// MvLocation_DEFINED_
diff --git a/src/libMetview/MvMatrix.cc b/src/libMetview/MvMatrix.cc
new file mode 100644
index 0000000..ee468d1
--- /dev/null
+++ b/src/libMetview/MvMatrix.cc
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <float.h>
+#include "MvMatrix.h"
+
+MvMatrix::MvMatrix(int nlin, int ncol) :
+      nlin_ (nlin),
+      ncol_ (ncol)
+//      vec_  (nlin*ncol) //Unfortunately, SGI compiler gives an error.
+	                  //Solution: the use of the resize command.
+{
+	vec_.resize (nlin*ncol);
+}
+
+MvMatrix::MvMatrix ( const MvMatrix& m ) :
+      nlin_(m.nlin_),
+      ncol_(m.ncol_),
+      vec_ (m.vec_)
+{
+
+}
+
+void MvMatrix::operator=(const MvMatrix& m)
+{
+      if ( &m == this ) return;
+
+      nlin_ = m.nlin_;
+      ncol_ = m.ncol_;
+      vec_  = m.vec_;
+}
+
+bool MvMatrix::Mput (int lin, int col, double val)
+{
+      if (lin < 0 || lin >= nlin_ || col < 0 || col >= ncol_)
+	    return false;
+
+      vec_[lin*ncol_ + col] = val;
+
+      return true;
+}
+
+double MvMatrix::Mget (int lin, int col)
+{
+      if (lin < 0 || lin >= nlin_ || col < 0 || col >= ncol_)
+	    return DBL_MAX;
+
+      return vec_[lin*ncol_ + col];
+}
diff --git a/src/libMetview/MvMatrix.h b/src/libMetview/MvMatrix.h
new file mode 100644
index 0000000..2c0adc2
--- /dev/null
+++ b/src/libMetview/MvMatrix.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//MvMatrix class provides tools to manipulate a matrix of elements.
+//The type of the elements are double.
+//The template facility could be used to define a general type for
+//the elements. However, compilation problems was found in SGI
+// platforms (probably in Alpha too). IBM and Linux work fine.
+
+#ifndef _H_MvMATRIX_
+#define _H_MvMATRIX_
+
+#include <inc_stl.h>
+
+//! Class to handle a matrix of elements
+/*! MvMatrix class provides tools to manipulate a matrix of elements.
+ *  The type of the elements are double.
+ *  The template facility could be used to define a general type for
+ *  the elements. However, compilation problems was found in SGI
+ *  platforms (probably in Alpha too). IBM and Linux work fine.
+ */
+class MvMatrix {
+
+        int nlin_;       // number of lines
+	int ncol_;       // number of columns
+	vector<double> vec_; // matrix
+
+	MvMatrix () {}
+
+public:
+	//! Constructor for \c nlin times \c ncol matrix
+	MvMatrix (int nlin, int ncol);
+
+	//! Copy constructor
+	MvMatrix (const MvMatrix& m);
+
+	//! Destructor
+	~MvMatrix () {}
+
+	//! Assignment operator
+	void operator=(const MvMatrix& m);
+
+	//! Returns the number of lines in the matrix
+	int Nlin() const { return nlin_; };
+
+	//! Returns the number of columns in the matrix
+	int Ncol() const { return ncol_; };
+
+	//! Assign value \c val into matrix element [ \c lin , \c col ]
+	/*! Returns \c false if [ \c lin , \c col ] is outside the matrix
+	 */
+	bool Mput (int lin, int col, double val);
+
+	//! Get the value from matrix cell [ \c lin , \c col ]
+	/*! Returns \c DBL_MAX if [ \c lin , \c col ] is outside the matrix
+	 */
+	double Mget (int lin, int col);
+};
+
+#endif
diff --git a/src/libMetview/MvObs.cc b/src/libMetview/MvObs.cc
new file mode 100644
index 0000000..e4a3f05
--- /dev/null
+++ b/src/libMetview/MvObs.cc
@@ -0,0 +1,3297 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvObs.cc,     vk 940818...
+//           rev vk 980501
+
+//--------------------------------------------------------------------
+//  A class to hide the complexities of BUFR routines written in
+//  FORTRAN.  'MvObs' tries to wrap these routines into a nicer C++
+//  interface and hide the required data structures.
+//  Headers for the FORTRAN functions are defined in the file 'MvBufr.h'
+//--------------------------------------------------------------------
+//    FORTRAN routines and required data structures are described in:
+//
+//    "Decoding Data Represented in FM 94 BUFR"
+//         by J.K.Gibson and M.Dragosavac
+//
+//             published as PAPER 4 in
+//
+//    "BINARY
+//     UNIVERSAL FORM FOR
+//     DATA REPRESENTATION
+//     ----------------------------------
+//     FM 94 BUFR
+//     Collected papers and specification"
+//
+//            ECMWF February 1988.
+//
+//  and in:
+//
+//     "BUFR User Guide and Reference Manual"
+//         by Milan Dragosavac
+//     European Centre for Medium-Range Weather Forecasts
+//         preprint  12 October 1994
+//--------------------------------------------------------------------
+
+#include "inc_iostream.h"
+#include <sstream>  //-- requires new templated standard io headers!
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <assert.h>
+//F #include "Metview.h"
+#include "MvObs.h"
+#include "MvObsSet.h"
+
+#include <map>
+
+#ifdef METVIEW
+#  include "MvException.h"
+#else
+#  include <exception>
+#endif
+
+// Static int used to duplicate stdout and get it back.
+static int new_fd = -1;
+
+const int MAX_BUBOX_KELEM_LIMIT  = MAX_KELEM;
+
+static string MESSED_UP("[messed messages!]");
+
+static string BBOXNAME("prtbbox.txt"); //for BUPRTBOX output.
+static string redirect_dir(""); // For tmp files from print.
+
+//--------------------------------------------------------
+// Fortran routines expect previous values to be remained
+// (at least in some of the arrays) if new msg has same
+// descriptors as previous msg !!!
+// Thus static arrays, common to all bufr-objects...
+// Added lazy evaluation 980501/vk...
+//--------------------------------------------------------
+static char* In_CNAMES = 0;  //static char In_CNAMES[ MAX_KELEM ][ 64 ]; //- is not updated if same descriptors
+static char* In_CUNITS = 0;  //static char In_CUNITS[ MAX_KELEM ][ 24 ]; //- is not updated if same descriptors
+static char* In_CVALS  = 0;  //static char In_CVALS [ MAX_KVALS ][ 80 ]; //+ rest of the arrays always updated
+static char* Out_CVALS = 0;  //static char Out_CVALS [ MAX_KVALS ][ 80 ];
+
+static fortfloat* In_VALUES = 0;  //static fortfloat  In_VALUES[ MAX_KVALS ];
+static fortfloat* Out_VALUES = 0; //static fortfloat Out_VALUES[ MAX_KVALS ];
+
+static fortint  In_KELEM;
+static fortint  In_KVALS;
+static fortint  Out_KELEM = -1;
+	                                // for BUSEL
+static fortint  In_KTDEXL;
+static fortint* In_KTDEXP = 0;  //static fortint  In_KTDEXP[ MAX_KELEM ];
+static fortint  In_KTDLEN;
+static fortint* In_KTDLST = 0;  //static fortint  In_KTDLST[ MAX_KELEM ];
+static fortint  Out_KTDEXL;
+static fortint* Out_KTDEXP = 0; //static fortint Out_KTDEXP[ MAX_KELEM ];
+static fortint  Out_KTDLEN;
+static fortint* Out_KTDLST = 0; //static fortint Out_KTDLST[ MAX_KELEM ];
+
+static int arraySizeIndex = 0; // incremented each time we try to allocate a new size of arrays
+static int kVals;
+
+long MvBufr::_bufrIn_ref = 0;
+long MvBufrOut::_bufrOut_ref = 0; //not yet implemented...
+
+
+//-- Linux/g++ does not like hardcoded big? arrays (works ok in debugger,
+//-- but crashes inside Metview...) => create arrays dynamically, once!
+//-- These are for BUFR-BOX routines (accessing Feedback info)
+
+static fortint    myKSUB, myKBOX, myKAPP, myKLEN, myKERR;
+static fortint*   myKBOXR = 0;
+static fortfloat* myVALS  = 0;
+static char*      myCBOXN = 0;
+static char*      myCBOXU = 0;
+
+
+const long cPressureCoordinate = 7004L;  // pressure vertical coord. descriptor value
+
+//--------------------------------------------------------
+//  Descriptor mnemonics for class 'MvBufrParam'
+//--------------------------------------------------------
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+typedef struct
+{
+   const char *name;
+   long        descriptor;
+} descriptorStruct;
+
+static descriptorStruct knownParams[] =
+{
+   {"z", 10003}, {"p", 10004},
+   {"ddd", 11001}, {"ff", 11002}, {"u", 11003}, {"v", 11004}, {"w", 11006},
+   {"T", 12001}, {"Td",12003}, {"T(2m)",12004}, {"Td(2m)",12006},
+   {"END",0}
+};
+#endif
+
+//--------------------------------------------------------
+//  Function definitions for the FORTRAN & C BUFR routines
+//--------------------------------------------------------
+
+extern "C" {
+
+ void
+ BUS012( fortint *KBUFL, fortint *KBUFF, fortint *KSUP
+       , fortint *KSEC0, fortint *KSEC1, fortint *KSEC2, fortint *KERR );
+
+ void
+ BUPRS0( fortint *KSEC0 );
+ void
+ BUPRS1( fortint *KSEC1 );
+ void
+ BUPRS2( fortint *KSUP, fortint *KEY);
+
+ void
+ BUFREX( fortint *KBUFL, fortint *KBUFF, fortint *KSUP
+       , fortint *KSEC0, fortint *KSEC1, fortint *KSEC2, fortint *KSEC3, fortint *KSEC4
+       , fortint *KELEM, char *CNAMES,     char *CUNITS
+       , fortint *KVALS, fortfloat *VALUES,  char *CVALS, fortint *KERR );
+
+ void
+ BUFREN( fortint *KSEC0, fortint *KSEC1, fortint *KSEC2, fortint *KSEC3, fortint *KSEC4
+       , fortint *KTDLEN,fortint *KTDLST,fortint *KDLEN, fortint *KDATA
+       , fortint *KELEM, fortint *KVALS, fortfloat *VALUES, char *CVALS
+       , fortint *KBUFL, fortint *KBUFF, fortint *KERR );
+
+ void
+ BUSEL( fortint *KTDLEN, fortint *KTDLST, fortint *KTDEXL, fortint *KTDEXP, fortint *KERR );
+
+ void
+ BUSEL2( fortint *KSUBSET,fortint *KELEM,fortint *KTDLEN,fortint *KTDLST
+       , fortint *KTDEXL, fortint *KTDEXP, char *CUNITSCNAMES, char *CUNITSCUNITS
+       , fortint *KERR);
+
+ void
+ BUUKEY(fortint *KSEC1, fortint *KSEC2, fortint *KEY, fortint *KSUP,fortint *KERR);
+ void
+ BUPRS3( fortint *KSEC3, fortint *KTDLEN, fortint *KTDLST
+       , fortint *KTDEXL, fortint *KTDEXP, fortint *KELEM, char *CNAMES );
+
+ void
+ BUBOX( fortint *KSUB,   fortint *KSUP,      fortint *KELEM
+      , fortint *KWTR,   char *CNAMES, char *CUNITS
+      , fortint *KVALS,  fortfloat *VALUES,  fortint *KBOX
+      , fortint *KAPP,   fortint *KLEN,      fortint *KBOXR
+      , fortfloat *VALS, char* CBOXN,        char* CBOXU
+      , fortint *KERR );
+
+  void
+  BUPRTBOX( fortint *KBOX,   fortint *KAPP,   fortint *KLEN
+          , fortint *KBOXR,  fortfloat *VALS, char* CBOXN
+          , char* CBOXU );
+
+ // Helper functions
+ boolean redirect_6(const char *);  //-- Trick to redirect Fortran unit 6.
+ boolean reconnect_6();
+ boolean file_to_stream(const char *,ostream&,int skip);
+ void delete_print_file(const char *);
+ void eraseWhiteSpaceFromStringEnd(string &str);
+ int CIND(int i) { return i-1;}
+}
+
+static string intToString(int);
+static string floatToString(float);
+static void keyToStringMap(map<string,string> &,string,fortint *,int);
+static void keyToStringMap(map<string,string> &,string,float);
+
+//______________________________________________________________________
+
+Section1Base::Section1Base( const unsigned char* octs )
+{
+   int slen = 65536*octs[0] + 256*octs[1] + octs[2];
+   octets_ = new unsigned char[slen];
+   memcpy( octets_, octs, slen );
+}
+
+Section1Base::Section1Base( const Section1Base* aSec1 )
+{
+   octets_ = new unsigned char[ aSec1->len() ];
+   memcpy( octets_, aSec1->start(), aSec1->len() );
+}
+
+bool
+Section1Base::isDifferent( const Section1Base* aSec1 ) const
+{
+   if( len() != aSec1->len() )
+      return true;
+
+   for( int i=0; i<len(); ++i )
+      if( octets_[i] != aSec1->octets_[i] )
+         return true;
+
+   return false;
+}
+
+bool
+Section1_preEd4::hasSection2()
+{
+   return octets_[7] > 127;   //-- octet 8
+}
+bool
+Section1_Ed4::hasSection2()
+{
+   return octets_[9] > 127;   //-- octet 10
+}
+
+TDynamicTime
+Section1_preEd4::date()
+{
+   //-- octet 13=year, 14=month, etc.
+   return TDynamicTime( octets_[12], octets_[13], octets_[14], octets_[15], octets_[16] );
+}
+TDynamicTime
+Section1_Ed4::date()
+{
+   //-- octet 13=year, 14=month, etc.
+   return TDynamicTime( 256*octets_[15]+octets_[16], octets_[17], octets_[18]
+                  , octets_[19], octets_[20], octets_[21] );
+}
+
+int
+Section1_preEd4::msgType()
+{
+   return octets_[8];         //-- octet 9 in ed.3
+}
+int
+Section1_Ed4::msgType()
+{
+   return octets_[10];         //-- octet 11 in ed.4
+}
+
+int
+Section1_preEd4::msgSubtypeWMO()
+{
+   return cOctetMissingIndicator; //-- not available in ed.3
+}
+int
+Section1_Ed4::msgSubtypeWMO()
+{
+   return octets_[11];         //-- octet 12 in ed.4
+}
+
+int
+Section1_preEd4::msgSubtypeLocal()
+{
+   return octets_[9];         //-- octet 10 in ed.3
+}
+int
+Section1_Ed4::msgSubtypeLocal()
+{
+   return octets_[12];         //-- octet 13 in ed.4
+}
+
+int
+Section1_preEd4::msgSubtype()
+{
+   return msgSubtypeLocal();  //-- only local available in ed.3
+}
+int
+Section1_Ed4::msgSubtype()
+{
+   //-- WMO subtype is the preferred one
+   return msgSubtypeWMO() != cOctetMissingIndicator ? msgSubtypeWMO() : msgSubtypeLocal();
+}
+
+int
+Section1_preEd4::origCentre()
+{
+  return octets_[5]; //-- octet 6
+}
+int
+Section1_Ed4::origCentre()
+{
+   return 256*octets_[4] + octets_[5]; //-- octets 5 and 6
+}
+
+int
+Section1_preEd4::origSubCentre()
+{
+  return octets_[4]; //-- octet 5
+}
+int
+Section1_Ed4::origSubCentre()
+{
+   return 256*octets_[6] + octets_[7]; //-- octets 7 and 8
+}
+
+int
+Section1_preEd4::masterTable()
+{
+   return octets_[3];         //-- octet 4
+}
+int
+Section1_Ed4::masterTable()
+{
+   return octets_[3]; //-- octet 4
+}
+
+int
+Section1_preEd4::masterTableVersion()
+{
+   return octets_[10];         //-- octet 11
+}
+int
+Section1_Ed4::masterTableVersion()
+{
+   return octets_[13]; //-- octet 14
+}
+
+int
+Section1_preEd4::localTableVersion()
+{
+   return octets_[11];         //-- octet 12
+}
+int
+Section1_Ed4::localTableVersion()
+{
+   return octets_[14]; //-- octet 15
+}
+
+
+
+//====================================================================== MvBufrBase
+//______________________________________________________________________
+
+MvBufrBase :: MvBufrBase( const long len ) : Sec1(NULL),fSec2(NULL),fTotalSec2(NULL),fSec3(NULL),fSec4(NULL)
+{
+  _refCount = 0;
+
+  // Make sure the data is correctly aligned.
+  longptr = new long[(len/sizeof(long)) + 1];
+  fMessage = (char *)longptr;
+  //fMessage = new char[ len  + 8 ];    // +8 for an extra "safety word"
+  fMessageLength = len;
+
+  fKSUP  = NULL;
+  fKSEC0 = NULL;
+  fKSEC1 = NULL;
+  fKSEC2 = NULL;
+  fKSEC3 = NULL;
+  fKSEC4 = NULL;
+
+      //-- lazy evaluation: create static arrays when first needed --
+  createDataArrays ();
+    }
+//___________________________________________________________
+
+MvBufrBase :: ~MvBufrBase( void )
+{
+//  delete [] fMessage;
+  delete [] longptr;
+
+  if( fSec2 )
+  {
+    delete fSec2;
+    delete [] fTotalSec2;
+  }
+  delete fSec3;
+  delete fSec4;
+
+  fSec2 = 0;
+  fSec3 = 0;
+  fSec4 = 0;
+  fTotalSec2 = 0;
+
+  if( fKSUP ) delete [] fKSUP;
+  if( fKSEC0 ) delete [] fKSEC0;
+  if( fKSEC1 ) delete [] fKSEC1;
+  if( fKSEC2 ) delete [] fKSEC2;
+  if( fKSEC3 ) delete [] fKSEC3;
+  if( fKSEC4 ) delete [] fKSEC4;
+
+  fKSUP = fKSEC0 = fKSEC1 = fKSEC2 = fKSEC3 = fKSEC4 = 0;
+}
+//___________________________________________________________
+void
+MvBufrBase :: attach( void )
+{
+   _refCount++;
+}
+void
+MvBufrBase :: detach( void )
+{
+   if( --_refCount == 0 )
+     delete this;
+}
+//_________________________________________________________ createFortranArrays
+void
+MvBufrBase :: createFortranArrays( void )
+{
+  fKSUP  = new fortint[  9 ];
+  fKSEC0 = new fortint[  3 ];
+  fKSEC1 = new fortint[ 40 ];
+  fKSEC2 = new fortint[ 4096 ]; //[ 128 ]; //[ 64 ];
+  fKSEC3 = new fortint[  4 ];
+  fKSEC4 = new fortint[  2 ];
+}
+//_________________________________________________________ createDataArrays
+void
+MvBufrBase :: createDataArrays( void )
+{
+    kVals    = aMAX_KVALS[arraySizeIndex];
+    In_KVALS = kVals;
+
+    try
+    {
+        if( In_VALUES == 0 )
+            In_VALUES = new fortfloat[ kVals ];
+
+        if( In_CVALS == 0 )
+            In_CVALS = new char[ kVals * 80 ];
+
+        if( In_CNAMES == 0 )
+            In_CNAMES = new char[ MAX_KELEM * 64 ];
+
+        if( In_CUNITS == 0 )
+            In_CUNITS = new char [ MAX_KELEM * 24 ];
+
+        if( In_KTDEXP == 0 )
+            In_KTDEXP = new fortint[ MAX_KELEM ];
+
+        if( In_KTDLST == 0 )
+            In_KTDLST = new fortint[ MAX_KELEM ];
+    }
+
+    catch(...)
+    {
+        deleteDataArrays ();
+
+#ifdef METVIEW
+        marslog( LOG_EROR, "MvBufrBase::MvBufrBase: out-of-memory!" );
+        throw MvException( "MvBufrBase::MvBufrBase: out-of-memory!" );
+#else
+        cerr << ">>>> MvBufrBase::MvBufrBase: out-of-memory => throw an exception <<<<" << endl;
+        throw std::bad_alloc();
+#endif
+    }
+}
+//_________________________________________________________ createDataArrays
+void
+MvBufrBase :: deleteDataArrays( void )
+{
+    if( In_VALUES != 0 )
+    {
+        delete [] In_VALUES; In_VALUES = 0;
+    }
+
+    if( In_CVALS != 0 )
+    {
+        delete [] In_CVALS;  In_CVALS  = 0;
+    }
+
+    if( In_CNAMES != 0 )
+    {
+        delete [] In_CNAMES; In_CNAMES = 0;
+    }
+
+    if( In_CUNITS != 0 )
+    {
+        delete [] In_CUNITS; In_CUNITS = 0;
+    }
+
+    if( In_KTDEXP != 0 )
+    {
+        delete [] In_KTDEXP; In_KTDEXP = 0;
+    }
+
+    if( In_KTDLST != 0 )
+    {
+        delete [] In_KTDLST; In_KTDLST = 0;
+    }
+}
+//___________________________________________________________
+unsigned int
+MvBufrBase :: unsignedInt( const unsigned char* firstOctet
+                         , int octetCount )
+{
+  unsigned int value = *firstOctet;
+  const unsigned char* anOctet = ++firstOctet;
+  for( int i=octetCount-1; i; --i )
+  {
+    value = 256*value + *anOctet++;
+  }
+  return value;
+}
+
+//______________________________________________________________________
+//====================================================================== MvBufr
+//______________________________________________________________________
+
+//______________________________________________________________________
+
+MvBufr :: MvBufr( char *msg, long len, long aMessageNumber )
+    : MvBufrBase( len )   //( msg, len )
+{
+  _lastKnownSubsetValue = 1; //-- Q&D
+
+  memcpy( fMessage, msg, (int)len );
+
+  const unsigned char* msgStart = (const unsigned char*)fMessage;
+
+  fSec0 = (TSection0 *)fMessage;
+  int offSet = fSec0->editionNr < 2 ? 4 : 8;
+                        // Section 0 was shorter in BUFR editions 0 and 1 !!!!
+                        //                                  rev vk 950802
+  if( fSec0->editionNr > 3 )
+    Sec1 = new Section1_Ed4( msgStart + offSet );
+  else
+    Sec1 = new Section1_preEd4( msgStart + offSet );
+  offSet += Sec1->len();
+
+  if( Sec1->hasSection2() )         // bit 0 <=> Optional Section 2 present?
+  {
+    fSec2 = new TSection2;
+    memcpy( (char *)fSec2, msgStart + offSet, sizeof(TSection2)  );
+
+    int sec2Len = unsignedInt( &(fSec2->len), 3 );
+    fTotalSec2 = new unsigned char[ sec2Len ];
+    memcpy( (char *)fTotalSec2, msgStart + offSet, sec2Len );
+
+    offSet += sec2Len;
+  }
+  else
+  {
+    fSec2 = NULL;
+    fTotalSec2 = NULL;
+  }
+
+  fSec3 = new TSection3;
+  memcpy( (char *)fSec3, msgStart + offSet, sizeof(TSection3)  );
+  offSet += unsignedInt( &(fSec3->len), 3 );
+
+  fSec4 = new TSection4;
+  memcpy( (char *)fSec4, msgStart + offSet, sizeof(TSection4)  );
+  offSet += unsignedInt( &(fSec4->len), 3 );
+
+  computeIn_KELEM ();
+
+  fMessageNumber = aMessageNumber;
+  _currentDescr = 0;
+  _currentDescrInd = -1;
+  _inState = kBufrIn_Coded;
+  _bufrIn_ref++;
+  _bufrBoxFilledSubset = 0;
+}
+//______________________________________________________________________
+
+MvBufr :: ~MvBufr( void ) { }
+
+//____________________________________________________________________ Decode
+void
+MvBufr :: Decode( void )
+{
+   if( _inState == kBufrIn_Error )
+      return;
+
+   if( _inState < kBufrIn_DataDecoded )
+   {
+      createFortranArrays();
+      fortint myKBUFL = fMessageLength / sizeof(fortint) + 1;  // +1 = Q&D
+        bool keepGoing = true;
+
+        // we will try to decode the BUFR a number of times, starting with
+        // relatively small data arrays, then building up to larger ones
+        // (so that we don't waste too much memory)
+
+        while (keepGoing)
+        {
+            keepGoing = false;
+
+      BUFREX(&myKBUFL
+	    , (fortint *)fMessage  // buffer for the BUFR message
+	    , fKSUP          // array for suplementary info
+	    , fKSEC0         // FORTRANized section 0
+	    , fKSEC1         // FORTRANized section 1
+	    , fKSEC2         // FORTRANized section 2 (site dependent)
+	    , fKSEC3         // FORTRANized section 3 (data descriptors)
+	    , fKSEC4         // FORTRANized section 4 (data values)
+	    ,&In_KELEM
+	    , In_CNAMES
+	    , In_CUNITS
+	    ,&In_KVALS
+	    , In_VALUES
+	    , In_CVALS
+	    ,&fKERR );
+
+
+            // if KELEM is not big enough, then we will
+            // try again with a bigger value
+
+            if( fKERR == 25 || fKERR == 14)
+            {
+                cout << "MvBufr :: Decode - kVals of " << kVals << " and In_KELEM of " << In_KELEM
+                     << " is not large enough." << endl;
+
+                if (++arraySizeIndex < NUM_MAX_KVALS)
+                {
+                    cout << "Trying kVals of " << aMAX_KVALS[arraySizeIndex] <<
+                         " (" << (aMAX_KVALS[arraySizeIndex] * 80) / (1024*1024) << "MB)" << endl;
+
+                    deleteDataArrays ();
+                    createDataArrays ();
+                    computeIn_KELEM ();
+
+                    keepGoing = true;
+                }
+                else
+                    arraySizeIndex = NUM_MAX_KVALS - 1; // should not be used, but just in case,
+                                                        // make sure the index is not out of bounds...
+            }
+        }
+
+
+      if( fKERR )
+      {
+	 cerr << "In_KELEM " << In_KELEM << " kvals " << In_KVALS << endl;
+	 cerr << " >>> MvBufr::Decode, bufrmsg " << fMessageNumber
+	      << ": fKERR = " << fKERR << endl;
+
+
+#ifdef METVIEW
+	 marslog(LOG_EROR, "BUFR decoding (BUFREX) failed, status = %d", fKERR );
+	 stringstream sst;
+	 sst << "Unable to decode BUFR message \nBUFR decoding (BUFREX) failed, status =" << fKERR;
+	 throw MvException(sst.str().c_str());
+
+#endif
+	 _inState = kBufrIn_Error;
+	 return;
+      }
+
+      _inState = kBufrIn_DataDecoded;
+   }
+}
+
+//____________________________________________________________________ Decode
+void
+MvBufr :: Decode_012( void )
+{
+   if( _inState == kBufrIn_Error )
+      return;
+
+   if( _inState < kBufrIn_Sections012Expanded)
+   {
+      createFortranArrays();
+      fortint myKBUFL = fMessageLength / sizeof(fortint) + 1;  // +1 = Q&D
+
+      BUS012(&myKBUFL
+	    , (fortint *)fMessage  // buffer for the BUFR message
+	    , fKSUP          // array for suplementary info
+	    , fKSEC0         // FORTRANized section 0
+	    , fKSEC1         // FORTRANized section 1
+	    , fKSEC2         // FORTRANized section 2 (site dependent)
+	    ,&fKERR );
+
+
+
+      if( fKERR )
+      {
+
+	 cerr << " >>> MvBufr::Decode_012, bufrmsg " << fMessageNumber
+	      << ": fKERR = " << fKERR << endl;
+
+#ifdef METVIEW
+	 marslog( LOG_EROR, "BUFR decoding (BUFREX) failed, status = %d", fKERR );
+	 stringstream sst;
+	 sst << "Unable to decode BUFR message \nBUFR decoding (BUFREX) failed, status =" << fKERR;
+	 throw MvException(sst.str().c_str());
+#endif
+	 _inState = kBufrIn_Error;
+	 return;
+      }
+
+      _inState = kBufrIn_Sections012Expanded;
+   }
+}
+
+//___________________________________________________________________ ExpandDescriptors
+void
+MvBufr :: ExpandDescriptors( int subsetNumber )
+{
+  static int mySubsetSavedValue = 0;
+
+   _lastKnownSubsetValue = subsetNumber;
+
+   if( _inState == kBufrIn_Error )
+      return;
+
+//   In_KTDLEN = -1;
+//   In_KTDEXL = -1;
+   fKERR     =  0;
+
+   if( _inState < kBufrIn_DataDecoded )
+      Decode();
+
+   if( ( fKSEC3[3-1] > 1  &&                           //-- if several subsets
+        _lastKnownSubsetValue != mySubsetSavedValue )  //-- AND subset number changed
+                      ||                               //-- OR
+        _inState == kBufrIn_DataDecoded  )             //-- descriptors not yet expanded
+   {
+//cout << "-----> MvBufr::ExpandDescriptors(" << _lastKnownSubsetValue << ") => BUSEL2..." << endl;
+//      CALL BUSEL2(KSUBSET,KELEM,KTDLEN,KTDLST,KTDEXL,KTDEXP,CNAMES,CUNITS,KERR)
+         BUSEL2( &_lastKnownSubsetValue  //-- Q&D variable...
+               , &In_KELEM
+               , &In_KTDLEN      // nr of original data descriptors in Section 3
+               ,  In_KTDLST      // original descriptors
+               , &In_KTDEXL      // nr of expanded data descriptors
+               ,  In_KTDEXP      // expanded descriptors
+               ,  In_CNAMES
+               ,  In_CUNITS
+               , &fKERR
+               );
+
+         mySubsetSavedValue = _lastKnownSubsetValue;
+   }
+   else
+   {
+      if( _inState == kBufrIn_DataDecoded )
+      {
+//cout << "-----> MvBufr::ExpandDescriptors(" << _lastKnownSubsetValue << ") => BUSEL..." << endl;
+         BUSEL( &In_KTDLEN      // nr of original data descriptors in Section 3
+	      ,  In_KTDLST      // original descriptors
+	      , &In_KTDEXL      // nr of expanded data descriptors
+	      ,  In_KTDEXP      // expanded descriptors
+	      , &fKERR
+              );
+      }
+   }
+
+   if( fKERR )
+   {
+      cerr << " >>> MvBufr::ExpandDescriptors: fKERR = " << fKERR << endl;
+
+#ifdef METVIEW
+      marslog( LOG_EROR, "BUFR expansion (BUSEL) failed, status = %d", fKERR );
+#endif
+
+      _inState = kBufrIn_Error;
+   }
+   else
+      _inState = kBufrIn_DataAndDescriptorsDecoded;
+}
+//__________________________________________________________ descriptorToFortranIndex
+int
+MvBufr :: descriptorToFortranIndex( const long aDescr, const int firstIndex )
+{
+   if( _inState == kBufrIn_Error )
+      return -1;
+
+   if( _inState != kBufrIn_DataAndDescriptorsDecoded )
+      ExpandDescriptors( _lastKnownSubsetValue ); //-- Q&D
+
+   if( _inState == kBufrIn_DataAndDescriptorsDecoded )
+   {
+      for( int i=firstIndex; i < In_KTDEXL; i++ )
+      {
+	 if( In_KTDEXP[ i ] == aDescr )
+         {
+	   return i;
+         }
+      }
+   }
+   return -1;
+}
+//__________________________________________________________ computeIn_KELEM
+void
+MvBufr :: computeIn_KELEM( void )
+{
+    if ( subsetCount() > 1 )
+        In_KELEM = kVals / subsetCount();
+    else
+        In_KELEM = MAX_KELEM;
+
+    if( In_KELEM > MAX_BUBOX_KELEM_LIMIT )
+        In_KELEM = MAX_BUBOX_KELEM_LIMIT;
+}
+//__________________________________________________________ DataValue
+//
+// Returns the requested parameter value (or missing value)
+// and updates _currentDescrInd.
+//
+
+fortfloat
+MvBufr :: DataValue( const int aDescrArrayInd, const long aSubsetNumber )
+{
+   _lastKnownSubsetValue = aSubsetNumber;
+
+   if( _inState < kBufrIn_DataDecoded )
+      Decode();
+
+   if( ( aSubsetNumber > subsetCount() ) || ( aDescrArrayInd < 0 ) )
+   {
+      _currentDescr = 0;
+      _currentDescrInd = -1;
+      return kFortranBufrMissingValue;
+   }
+
+   _currentDescrInd = aDescrArrayInd;
+   _currentDescr = In_KTDEXP[ _currentDescrInd ];
+
+   return PeekDataValue( _currentDescrInd, aSubsetNumber );
+}
+//__________________________________________________________ PeekDataValue
+//
+// Returns the requested parameter value (or missing value)
+// without updating _currentDescrInd.
+//
+
+fortfloat
+MvBufr :: PeekDataValue( const int aDescrArrayInd, const long aSubsetNumber )
+{
+   if( ( aSubsetNumber > subsetCount() ) || ( aDescrArrayInd < 0 ) )
+     return kFortranBufrMissingValue;
+   else
+     return In_VALUES[ aDescrArrayInd + ( aSubsetNumber - 1 ) * In_KELEM ];
+}
+//__________________________________________________________ Value
+boolean
+MvBufr :: Value( const long aDescriptor
+	       , const long aSubsetNumber
+	       , fortfloat &aDataValue
+	       , int   firstInd )
+{
+  aDataValue = DataValue( descriptorToFortranIndex( aDescriptor, firstInd )
+			, aSubsetNumber );
+  return aDataValue != kFortranBufrMissingValue ? true : false;
+}
+//__________________________________________________________ intValue
+// returns 'kFortranBufrMissingIntValue' if not found!
+//----------------------------------------------------
+long
+MvBufr :: intValue( const long aDescriptor, const int subsetNr )
+{
+   fortfloat myValue;
+   Value( aDescriptor, subsetNr, myValue );
+
+   if( myValue != kFortranBufrMissingValue )
+     return (long)myValue;
+   else
+     return kFortranBufrMissingIntValue;
+}
+//____________________________________________________________________ feedbackValue
+double
+MvBufr::feedbackValue( int col, int subset )
+{
+   if( _currentDescrInd < 0 )
+      return kBufrMissingValue;
+   else
+      //-- first 6 rows is reserved info, obs report starts on row 7
+      return feedbackValue( _currentDescrInd + 6, col, subset );
+}
+
+double
+MvBufr::feedbackValue( int row, int col, int subset )
+{
+   int err = fillBufrBox( subset );
+
+   assert( row > 0 && row <= myKBOX );
+   assert( col > 0 && col <= myKAPP );
+
+   if( err == 0 )
+      return myVALS[ myKLEN*(col-1) + row - 1 ];
+   else
+      return kBufrMissingValue;
+}
+
+string
+MvBufr::feedbackItemName( int row, int subset )
+{
+   int err = fillBufrBox( subset );
+
+   assert( row > 0 && row <= myKBOX );
+
+   if( err == 0 )
+   {
+      char c[64];
+      strncpy(c,myCBOXN+(row-1)*64,63);
+      c[63]='\0';
+      string s(c);
+      eraseWhiteSpaceFromStringEnd(s);
+      return s;
+   }
+   else
+      return std::string();
+}
+
+string
+MvBufr::feedbackItemUnit( int row, int subset )
+{
+   int err = fillBufrBox( subset );
+
+   assert( row > 0 && row <= myKBOX );;
+
+   if( err == 0 )
+   {
+      char c[24];
+      strncpy(c,myCBOXU+(row-1)*24,23);
+      c[23]='\0';
+      string s(c);
+      eraseWhiteSpaceFromStringEnd(s);
+      return s;
+   }
+   else
+      return std::string();
+}
+
+//____________________________________________________________________ obsTime
+TDynamicTime
+MvBufr :: obsTime( const int subsetNr )
+{
+   fortint myYear  = intValue( 4001L, subsetNr );
+   fortint myMonth = intValue( 4002L, subsetNr );
+   fortint myDay   = intValue( 4003L, subsetNr );
+   fortint myHour  = intValue( 4004L, subsetNr );
+
+   short myMin, mySec;
+   fortfloat myValue;
+
+   if( Value( 4005L, subsetNr, myValue ) )
+      myMin = (short)myValue;
+   else
+      myMin = 0;
+
+   if( Value( 4006L, subsetNr, myValue ) )
+      mySec = (short)myValue;
+   else
+      mySec = 0;
+
+   //-- quirky NCEP PrepBUFR obs may not contain date/time infromation
+   if( myYear  == kBufrMissingIntValue &&   //-- date OK?
+       myMonth == kBufrMissingIntValue &&
+       myDay   == kBufrMissingIntValue  )
+   {                                        //-- if date missing from obs
+      return msgTime();                     //-- then take it from section 1
+   }
+   else                                     //-- OK, take from obs
+   {
+      return TDynamicTime( (short)myYear, (short)myMonth, (short)myDay
+                         , (short)myHour, myMin, mySec );
+   }
+}
+//____________________________________________________________________ msgTime
+TDynamicTime
+MvBufr :: msgTime( void )
+{
+#if 0
+   short myYear  = fSec1->yearYY ;
+   short myMonth = fSec1->month ;
+   short myDay   = fSec1->day ;
+   short myHour  = fSec1->hour ;
+   short myMin   = fSec1->minute ;
+
+   return TDynamicTime( myYear, myMonth, myDay, myHour, myMin, 0 );
+#endif
+
+   return Sec1->date();
+}
+//____________________________________________________________________ stringValue
+string
+MvBufr :: stringValue( const long aDescriptor, const int aSubsetNr )
+{
+   _currentDescrInd = descriptorToFortranIndex( aDescriptor );
+   return stringValueByIndex( _currentDescrInd, aSubsetNr );
+}
+//____________________________________________________________________ stringValue
+string
+MvBufr :: stringValue( const int aSubsetNr )
+{
+   return stringValueByIndex( _currentDescrInd, aSubsetNr );
+}
+//__________________________________________________________ stringValueByIndex
+string
+MvBufr :: stringValueByIndex( const int anIndex, const int aSubsetNr )
+{
+   if( ( anIndex < 0 ) || ( anIndex >= In_KTDEXL ) )
+     {
+       return string( "[string index error!]" );
+     }
+
+   //-- get coded float value --
+   fortfloat myValue = DataValue( anIndex, aSubsetNr );
+
+   //-- here we should be passing subset nr, not index!!! (020307/vk)
+   //-- thus always pass 1:
+
+   if( elementValueType( 1 ) == kEVT_missing )
+     {
+	   return string( "[Missing]" );
+     }
+   else if( elementValueType( 1 ) == kEVT_string )
+     {
+       //-- get pointer and length to In_CVALS array, In_CVALS starts from 0.. --
+       int myIndex = (int)myValue / 1000 - 1;
+       int myLength = (int)myValue % 1000;
+
+       //-- add C-terminator (sacrifice last character if necessary) --
+       int terminatorPos = myLength;
+       if( terminatorPos > 79 )
+	 terminatorPos = 79;
+       //In_CVALS[ myIndex ][ terminatorPos ] = '\0';
+       In_CVALS[ myIndex*80 + terminatorPos ] = '\0';
+
+       return string(In_CVALS + myIndex*80);
+     }
+   else if( elementValueType( 1 ) == kEVT_numeric )
+     {
+       ostringstream oss;
+       oss << myValue;
+
+       return oss.str();
+     }
+
+   return string( "[Internal error]" ); //-- we should never get here!
+}
+//____________________________________________________________________ unit
+string
+MvBufr :: unit( const long aDescriptor )
+{
+   return unitByIndex( descriptorToFortranIndex( aDescriptor ) );
+}
+//____________________________________________________________________ unit
+string
+MvBufr :: unit( void )
+{
+   return unitByIndex( _currentDescrInd );
+}
+//____________________________________________________________________ unitByIndex
+string
+MvBufr :: unitByIndex( const int anIndex )
+{
+   char strbuf[ 25 ];
+
+   if( ( anIndex >= 0 ) && ( anIndex < In_KTDEXL ) )
+   {
+      strbuf[ 24 ] = '\0';               //-- make a copy
+      int pos;
+      for( pos=23; pos>=0; --pos )
+         strbuf[ pos ] = In_CUNITS[ anIndex*24 + pos ];
+         //strbuf[ pos ] = In_CUNITS[ anIndex ][ pos ];
+
+      for( pos=23; pos > 0; pos-- )      //-- remove trailing blanks
+         if( strbuf[ pos ] == ' ' )
+            strbuf[ pos ] = '\0';
+         else
+            break;
+
+      return string( strbuf );
+   }
+   return string( "[Unit not found!]" );
+}
+//____________________________________________________________________ name
+string
+MvBufr :: name( const long aDescriptor )
+{
+   return nameByIndex( descriptorToFortranIndex( aDescriptor ) );
+}
+//____________________________________________________________________ name
+string
+MvBufr :: name( void )
+{
+   return nameByIndex( _currentDescrInd );
+}
+//____________________________________________________________________ nameByIndex
+string
+MvBufr :: nameByIndex( const int anIndex )
+{
+   char strbuf[ 65 ];
+
+   if( ( anIndex >= 0 ) && ( anIndex < In_KTDEXL ) )
+   {
+      strbuf[ 64 ] = '\0';               //-- make copy
+      int pos;
+      for( pos=63; pos>=0; --pos )
+         strbuf[ pos ] = In_CNAMES[ anIndex*64 + pos ];
+        // strbuf[ pos ] = In_CNAMES[ anIndex ][ pos ];
+
+      for( pos=63; pos > 0; pos-- )      //-- remove trailing blanks
+         if( strbuf[ pos ] == ' ' )
+            strbuf[ pos ] = '\0';
+         else
+            break;
+
+      boolean retainCapital = true;      //-- change to lower case
+      for( pos = 0; pos < (int)(strlen( strbuf )); pos++ )
+      {
+         if( isupper( strbuf[ pos ] ) )
+         {
+            if( retainCapital )
+               retainCapital = false;
+            else
+               strbuf[ pos ] = tolower( strbuf[ pos ] );
+          }
+          else
+             retainCapital = true;
+      }
+      return string( strbuf );
+   }
+   else
+      return string( "[Name index error!]" );
+}
+//____________________________________________________________________ elementValueType
+EElementValueType
+MvBufr :: elementValueType( const int aSubsetNr )
+{
+  return elementValueTypeByIndex( _currentDescrInd, aSubsetNr );
+}
+//____________________________________________________________ elementValueType
+EElementValueType
+MvBufr :: elementValueType( const long aDescriptor, const int aSubsetNr )
+{
+  return elementValueTypeByIndex( descriptorToFortranIndex( aDescriptor ), aSubsetNr );
+}
+//_____________________________________________________ elementValueTypeByIndex
+EElementValueType
+MvBufr :: elementValueTypeByIndex( const int anIndex, const int aSubsetNr )
+{
+  fortfloat myValue = DataValue( anIndex, aSubsetNr );
+
+  if( myValue == kFortranBufrMissingValue )
+  {
+    return kEVT_missing;
+  }
+  else
+  {
+    bool isString = unitByIndex( anIndex ) == "CCITTIA5"   //-- ECMWF notation
+                 || unitByIndex( anIndex ) == "CCITT IA5"; //-- WMO & NCEP PrepBUFR notation
+    return isString ? kEVT_string : kEVT_numeric;
+  }
+}
+//______________________________________________________________________
+//
+// Reset descriptor iterator by pointing to the first descriptor.
+// Make sure msg has been expanded!
+//
+
+boolean
+MvBufr :: SetFirstDescriptor( void )
+{
+   if( _inState == kBufrIn_Error )
+      return false;
+
+   if( _inState != kBufrIn_DataAndDescriptorsDecoded )
+      ExpandDescriptors( _lastKnownSubsetValue ); //-- Q&D
+
+   if( _inState == kBufrIn_DataAndDescriptorsDecoded )
+   {
+      _currentDescrInd = 0;
+      _currentDescr = In_KTDEXP[ _currentDescrInd ];
+      return true;
+   }
+   return false;
+}
+//______________________________________________________________________
+//
+// Advance descriptor iterator.
+// Check that it still points ok.
+//
+
+boolean
+MvBufr :: SetNextDescriptor( void )
+{
+  if( _currentDescrInd < 0 )
+     return false;           // SetFirstDescriptor had not been called !
+
+  _currentDescrInd++;
+  if( _currentDescrInd == In_KTDEXL ) // or: fKSUP[ 5 - 1 ]
+  {
+     _currentDescrInd = -1;               //-- end-of-msg reached
+     _currentDescr = 0;                   //-- probably end-of-iteration => issue no msg
+     return false;
+  }
+  else if( _currentDescrInd > In_KTDEXL )
+  {
+     _currentDescrInd = -1;               //-- past end-of-msg
+     _currentDescr = 0;                   //-- must be an error => issue error msg
+
+    cerr << "MvBufr::SetNextDescriptor: _currentDescrInd=" << _currentDescrInd
+         << ", limiting In_KTDEXL=" << In_KTDEXL << endl;
+
+     return false;
+  }
+
+  _currentDescr = In_KTDEXP[ _currentDescrInd ];
+  return true;
+}
+//______________________________________________________________________
+//
+// calls Emoslib routines BUBOX and BUPRTBOX to produce "boxed" output
+//
+int
+MvBufr::fillBufrBox( int aSubsetNr )
+{
+#if 0
+  //-- Linux/g++ does not like hardcoded big? arrays (works ok in debugger,
+  //-- but crashes inside Metview...) => create arrays dynamically, once!
+
+  static fortint    myKSUB, myKBOX, myKAPP, myKLEN, myKERR;
+  static fortint*   myKBOXR = 0;
+  static fortfloat* myVALS  = 0;
+  static char*      myCBOXN = 0;
+  static char*      myCBOXU = 0;
+#endif
+
+  if( _bufrBoxFilledSubset == aSubsetNr )
+     return 0;                               //-- OK, already filled
+
+  if( ! myKBOXR )
+    {
+      try
+	{
+	  myKBOXR = new fortint[ kVals ];
+	  cout << " fillBufrBox: array myKBOXR created" << endl;
+
+	  myVALS  = new fortfloat[ kVals ];
+	  cout << " fillBufrBox: array myVALS  created" << endl;
+
+	  myCBOXN = new char[ kVals * 64 ];
+	  cout << " fillBufrBox: array myCBOXN created" << endl;
+
+	  myCBOXU = new char[ kVals * 24 ];
+	  cout << " fillBufrBox: array myCBOXU created" << endl;
+	}
+      catch(...)
+	{
+	  cout << " >>> fillBufrBox: problems in creating fort arrays <<<" << endl;
+	  delete myKBOXR;  myKBOXR = 0;
+	  delete myVALS;   myVALS  = 0;
+	  delete myCBOXN;  myCBOXN = 0;
+	  delete myCBOXU;  myCBOXU = 0;
+#ifdef METVIEW
+	  marslog( LOG_EROR, "MvBufr::fillBufrBox: out-of-memory?" );
+#endif
+	  return -13;
+	}
+    }
+
+
+  //-- Initialize array given to bubox. bubox will not initialize
+  //-- all values, and this will cause runtime error from buprtbox.
+  for (int i = 0; i < kVals; i++ )
+    myVALS[i] = kFortranBufrMissingValue;
+
+  if( _inState == kBufrIn_Error )
+    {
+      cout << " fillBufrBox: BUFR msg error state, return false" << endl;
+      return -1313;
+    }
+
+  if( _inState < kBufrIn_DataDecoded )
+    {
+      Decode();
+    }
+
+  if( _inState != kBufrIn_DataAndDescriptorsDecoded )
+    {
+      ExpandDescriptors( aSubsetNr );
+    }
+
+  myKSUB = (fortint)aSubsetNr;
+  myKBOX = 0;
+  myKAPP = 0;
+  myKLEN = 0;
+  myKERR = 0;
+
+  BUBOX( &myKSUB     //-- INPUT arguments
+       ,  fKSUP
+       , &In_KELEM
+       ,  In_KTDEXP
+       ,  In_CNAMES
+       ,  In_CUNITS
+       , &In_KVALS
+       ,  In_VALUES
+                      //-- OUTPUT arguments
+       , &myKBOX      //-- number of (valid) elements in 1st column
+       , &myKAPP      //-- number of columns (apps) in the box
+       , &myKLEN      //-- number of rows in the box
+       ,  myKBOXR     //-- Table B descriptors
+       ,  myVALS      //-- boxed values
+       ,  myCBOXN     //-- boxed element names
+       ,  myCBOXU     //-- boxed units
+       , &myKERR );
+
+  if( myKERR == 0 )
+      _bufrBoxFilledSubset = myKSUB;
+
+  return myKERR;
+}
+//______________________________________________________________________
+//
+bool
+MvBufr::writeBufrBox( int aSubsetNr )
+{
+  cout << " writeBufrBox: entering" << endl;
+
+  myKERR = fillBufrBox( aSubsetNr );
+
+  //-- forces Fortran unit 6 into a file
+  if( ! redirect_6(BBOXNAME.c_str()) )
+    {
+      cout << ">>> UNABLE TO REDIRECT stdout <<<" << endl;
+      return false;
+    }
+
+  if( myKERR == 0 )
+  {
+     BUPRTBOX(&myKBOX
+             ,&myKAPP
+             ,&myKLEN
+             , myKBOXR
+             , myVALS
+             , myCBOXN
+             , myCBOXU );
+  }
+
+  //-- closes "unit'ified" unit 6
+  if( ! reconnect_6() )
+    {
+      cerr << ">>> UNABLE TO RECONNECT TO stdout <<<" << endl;
+      cout << ">>> UNABLE TO RECONNECT TO stdout <<<" << endl;
+    }
+
+  return myKERR == 0;
+}
+
+bool
+MvBufr::getBufrBoxSize( int& rows, int& cols, int aSubsetNr )
+{
+  bool status = false;
+
+  myKERR = fillBufrBox( aSubsetNr );
+
+  if( myKERR == 0 )
+  {
+     rows = myKBOX;
+     cols = myKAPP;
+     status = true;
+  }
+  return status;
+}
+
+//------------- Printing functions -----------------
+bool
+MvBufr :: printSection( ostream& aStream,int which)
+{
+  boolean return_val = true;
+  if( _inState == kBufrIn_Error )
+    {
+      aStream << "!!!!!!!!!!! Bad BUFR message " << endl;
+      return false;
+    }
+
+  if ( _inState < kBufrIn_Sections012Expanded )
+    Decode();
+
+  if ( which == 3 && _inState < kBufrIn_DataAndDescriptorsDecoded )
+    ExpandDescriptors( _lastKnownSubsetValue ); //-- Q&D
+
+
+  char sec_name[30];
+  sprintf(sec_name,"prtsec%d.txt",which);
+
+  redirect_6(sec_name);
+  if ( which == 0 )
+    BUPRS0(fKSEC0);
+  else if ( which == 1 )
+    BUPRS1(fKSEC1);
+  else if ( which == 2 )
+    {
+      fortint *fKEY = new fortint[60];
+      BUUKEY(fKSEC1,fKSEC2,fKEY,fKSUP,&fKERR);
+      if ( fKERR )
+	cout << "\nProblems getting key. Maybe non-existent? " << endl;
+      else
+	BUPRS2(fKSUP,fKEY);
+
+      delete [] fKEY;
+    }
+  else
+    BUPRS3(fKSEC3,&In_KTDLEN,In_KTDLST,&In_KTDEXL,In_KTDEXP,&In_KELEM,In_CNAMES);
+
+  reconnect_6();
+  return_val = file_to_stream(sec_name,aStream,1);
+  delete_print_file(sec_name);
+  return return_val;
+}
+
+//------------- Printing functions -----------------
+bool
+MvBufr::getDataFromSection2(map<string,string> &data)
+{
+    bool retval=false;
+
+    if( _inState == kBufrIn_Error )
+    {
+      cout << "!!!!!!!!!!! Bad BUFR message " << endl;
+      return false;
+    }
+
+    if ( _inState < kBufrIn_Sections012Expanded )
+         Decode_012();
+
+      fortint *fKEY = new fortint[60];
+      BUUKEY(fKSEC1,fKSEC2,fKEY,fKSUP,&fKERR);
+      if ( fKERR )
+      {
+		cout << "\nProblems getting key. Maybe non-existent? " << endl;
+		retval=false;
+      }
+      else
+      {
+		parseSection2(fKEY,data);
+		retval=true;
+      }
+
+      delete [] fKEY;
+
+      return retval;
+}
+
+void MvBufr::parseSection2(fortint *fKEY,map<string,string> &data)
+{
+	//fKSUP - global variable
+
+	if(fKSUP[CIND(2)] < 1)
+	{
+		return;
+	}
+
+	int type=0;
+	if(fKEY[CIND(2)] == 2)
+		type = 2;
+	else if(fKEY[CIND(2)] == 3)
+		type = 2;
+	else if(fKEY[CIND(2)] == 12)
+		type = 2;
+	else if(fKEY[CIND(2)] == 8)
+		type = 2;
+
+	if(type == 0 && fKSUP [CIND(6)] > 1)
+		type = 2;
+
+	if(type == 2)
+	{
+		keyToStringMap(data,"RDB DATA TYPE",fKEY,2);
+		keyToStringMap(data,"RDB DATA SUBTYPE",fKEY,3);
+		keyToStringMap(data,"YEAR",fKEY,4);
+		keyToStringMap(data,"MONTH",fKEY,5);
+		keyToStringMap(data,"DAY",fKEY,6);
+		keyToStringMap(data,"HOUR",fKEY,7);
+		keyToStringMap(data,"MINUTE",fKEY,8);
+		keyToStringMap(data,"SECOND",fKEY,9);
+
+		float RLAT1=(fKEY[CIND(11)]-9000000)/100000.;
+         	float RLON1=(fKEY[CIND(10)]-18000000)/100000.;
+		keyToStringMap(data,"LATITUDE 1",RLAT1);
+		keyToStringMap(data,"LONGITUDE 1",RLON1);
+
+		float RLAT2=(fKEY[CIND(13)]-9000000)/100000.;
+         	float RLON2=(fKEY[CIND(12)]-18000000)/100000.;
+		keyToStringMap(data,"LATITUDE 2",RLAT2);
+		keyToStringMap(data,"LONGITUDE 2",RLON2);
+
+		keyToStringMap(data,"NUMBER OF OBSERVATIONS",fKEY,14);
+
+		//char ident[9];
+		//memcpy(ident,&fKEY[CIND(15)],8);
+		//data["IDENTIFIER"]=string(ident);
+
+		keyToStringMap(data,"IDENTIFIER",fKEY,15);
+		keyToStringMap(data,"TOTAL BUFR MESSAGE LENGTH",fKEY,25);
+		keyToStringMap(data,"DAY (RDB INSERTION)",fKEY,26);
+		keyToStringMap(data,"HOUR (RDB INSERTION)",fKEY,27);
+		keyToStringMap(data,"MINUTE (RDB INSERTION)",fKEY,28);
+		keyToStringMap(data,"SECOND (RDB INSERTION)",fKEY,29);
+		keyToStringMap(data,"DAY (MDB ARRIVAL)",fKEY,30);
+		keyToStringMap(data,"HOUR (MDB ARRIVAL)",fKEY,31);
+		keyToStringMap(data,"MINUTE (MDB ARRIVAL",fKEY,32);
+		keyToStringMap(data,"SECOND (MDB ARRIVAL)",fKEY,33);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,34);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,35);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,37);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,38);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,40);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,41);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,43);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,44);
+		keyToStringMap(data,"QUALITY CONTROL % CONF",fKEY,46);
+	}
+	else
+	{
+		keyToStringMap(data,"RDB DATA TYPE",fKEY,2);
+		keyToStringMap(data,"RDB DATA SUBTYPE",fKEY,3);
+		keyToStringMap(data,"YEAR",fKEY,4);
+		keyToStringMap(data,"MONTH",fKEY,5);
+		keyToStringMap(data,"DAY",fKEY,6);
+		keyToStringMap(data,"HOUR",fKEY,7);
+		keyToStringMap(data,"MINUTE",fKEY,8);
+		keyToStringMap(data,"SECOND",fKEY,9);
+
+		float RLAT1=(fKEY[CIND(11)]-9000000)/100000.;
+         	float RLON1=(fKEY[CIND(10)]-18000000)/100000.;
+		keyToStringMap(data,"LATITUDE 1",RLAT1);
+		keyToStringMap(data,"LONGITUDE 1",RLON1);
+
+		//char ident[9];
+		//memcpy(ident,&fKEY[CIND(15)],8);
+		//data["IDENTIFIER"]=string(ident);
+
+		char ident[10];
+		for(int i=16; i <=24; i++ )
+		{
+			ident[i-16]=fKEY[CIND(i)];
+		}
+		ident[9]='\0';
+		data["IDENTIFIER"]=string(ident);
+
+		keyToStringMap(data,"TOTAL BUFR MESSAGE LENGTH",fKEY,25);
+		keyToStringMap(data,"DAY (RDB INSERTION)",fKEY,26);
+		keyToStringMap(data,"HOUR (RDB INSERTION)",fKEY,27);
+		keyToStringMap(data,"MINUTE (RDB INSERTION)",fKEY,28);
+		keyToStringMap(data,"SECOND (RDB INSERTION)",fKEY,29);
+		keyToStringMap(data,"DAY (MDB ARRIVAL)",fKEY,30);
+		keyToStringMap(data,"HOUR (MDB ARRIVAL)",fKEY,31);
+		keyToStringMap(data,"MINUTE (MDB ARRIVAL",fKEY,32);
+		keyToStringMap(data,"SECOND (MDB ARRIVAL)",fKEY,33);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,34);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,35);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,37);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,38);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,40);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,41);
+		keyToStringMap(data,"CORRECTION NUMBER",fKEY,43);
+		keyToStringMap(data,"PART OF MESSAGE",fKEY,44);
+		keyToStringMap(data,"QUALITY CONTROL % CONF",fKEY,46);
+	}
+}
+
+
+
+
+
+
+//------------- Printing functions -----------------
+bool
+MvBufr :: printSection_012( ostream& aStream,int which)
+{
+  if(which <0 || which > 2)
+	return false;
+
+  boolean return_val = true;
+  if( _inState == kBufrIn_Error )
+    {
+      aStream << "!!!!!!!!!!! Bad BUFR message " << endl;
+      return false;
+    }
+
+  if ( _inState < kBufrIn_Sections012Expanded )
+    Decode_012();
+
+  char sec_name[30];
+  sprintf(sec_name,"prtsec%d.txt",which);
+
+  redirect_6(sec_name);
+  if ( which == 0 )
+    BUPRS0(fKSEC0);
+  else if ( which == 1 )
+    BUPRS1(fKSEC1);
+  else if ( which == 2 )
+    {
+      fortint *fKEY = new fortint[60];
+      BUUKEY(fKSEC1,fKSEC2,fKEY,fKSUP,&fKERR);
+      if ( fKERR )
+	cout << "\nProblems getting key. Maybe non-existent? " << endl;
+      else
+	BUPRS2(fKSUP,fKEY);
+
+      delete [] fKEY;
+    }
+
+  reconnect_6();
+  return_val = file_to_stream(sec_name,aStream,1);
+  delete_print_file(sec_name);
+  return return_val;
+}
+
+
+//______________________________________________________________________
+//====================================================================== MvBufrOut
+//______________________________________________________________________
+
+MvBufrOut::MvBufrOut( const long len, MvObsSet* aSet )  //( char *msg, long len, MvObsSet* aSet )
+    : MvBufrBase( len ), _currentSec1( 0 )
+{
+  _outSet = aSet;
+  _maxNrSubsets = 1;
+  Out_KELEM = -1;        // MAX_KELEM / _maxNrSubsets;
+
+  createFortranArrays();
+
+  _outState = kBufrOut_noBuffers;
+  resetBuffers();
+}
+//____________________________________________________________
+
+MvBufrOut :: ~MvBufrOut( void )
+{
+  if(   _outState == kBufrOut_dataInBuffers )
+  {
+    encode();
+  }
+  _outSet->close();
+  delete _currentSec1;
+}
+
+//____________________________________________________________________ createBuffers
+void
+MvBufrOut::createBuffers() // XXX still need more dynamic memory allocation
+{
+  Out_KTDEXL = -1;
+  Out_KELEM = -1;
+  _KDLEN = 0;
+  _nextValue = 0;
+  _nextCharParamPos = 0;
+
+  if( _outState == kBufrOut_noBuffers )
+    {
+      char cbuf[ 120 ];
+
+      try
+	{
+	  cout << "MvBufrOut::createBuffers, checking for memory..." << endl;
+
+	  sprintf( cbuf, "requesting %d new fortints", MAX_KELEM );
+	  cout << cbuf << endl;
+	  Out_KTDLST = new fortint[ MAX_KELEM ];
+
+	  sprintf( cbuf, "requesting %d new fortints", MAX_KELEM );
+	  cout << cbuf << endl;
+	  Out_KTDEXP = new fortint[ MAX_KELEM ];
+
+	  sprintf( cbuf, "requesting %d new fortfloats", MAX_KVALS );
+	  cout << cbuf << endl;
+	  Out_VALUES = new fortfloat[ MAX_KVALS ];
+
+	  sprintf( cbuf, "requesting %d new chars", 80*MAX_KVALS );
+	  cout << cbuf << endl;
+	  Out_CVALS = new char[ MAX_KVALS * 80 ];
+	}
+      catch(...)
+	{
+	  delete [] Out_VALUES; //-- (I)
+	  delete [] Out_CVALS;  //-- (II)
+	  delete [] Out_KTDEXP; //-- (III)
+
+	  Out_VALUES = 0;
+	  Out_CVALS  = 0;
+	  Out_KTDEXP = 0;
+	  Out_KTDLST = 0;
+
+	  _outState = kBufrOut_error;
+
+	  cout << ">>>\n>>> MvBufrOut::createBuffers failed in " << cbuf << "\n>>>" << endl;
+	  cout << "MvBufrOut::createBuffers: throw MvException..." << endl;
+#ifdef METVIEW
+	  marslog( LOG_EROR, "MvBufrOut::createBuffers failed in %s", cbuf );
+	  throw MvException( "MvBufrOut::createBuffers: out-of-memory!" );
+#else
+          throw std::bad_alloc();
+#endif
+	}
+    }
+
+  cout << "MvBufrOut::createBuffers memory ok" << endl;
+
+  _outState = kBufrOut_emptyBuffers;
+}
+//____________________________________________________________________ resetBuffers
+void
+MvBufrOut :: resetBuffers( void )
+{
+  Out_KTDEXL = -1;
+  Out_KELEM = -1;
+  _KDLEN = 0;
+  _nextValue = 0;
+  _nextCharParamPos = 0;
+
+  if( _outState > kBufrOut_emptyBuffers )
+    {
+      _outState = kBufrOut_emptyBuffers;
+    }
+}
+//____________________________________________________________________ write
+void
+MvBufrOut :: write( MvObs& anObs )
+{
+    //-- if no packing into subsets, copy message as is...
+    _outSet->write( anObs._bufrIn->fMessage, (int)anObs._bufrIn->fMessageLength );
+}
+
+//____________________________________________________________________ add
+void
+MvBufrOut :: add( MvObs& anObs )
+{
+  if( _maxNrSubsets == 1 && anObs._bufrIn->subsetCount() == 1 )
+    //-- if no packing into subsets, copy message as is...
+    write( anObs );
+  else
+    addIntoBuffers( anObs );
+}
+
+//____________________________________________________________________ addIntoBuffers
+void
+MvBufrOut::addIntoBuffers( MvObs& anObs )
+{
+  if( _outState <= kBufrOut_noBuffers )
+    {
+      createBuffers();
+    }
+
+  checkDescriptors( anObs );
+
+  if( MAX_KVALS < _nextValue + Out_KTDEXL )
+  {
+    encode();
+    formatBuffers( anObs );
+  }
+
+  //-- in case (non-compressed) multisubset msg, do expanded descriptors here
+  Out_KTDEXL = In_KTDEXL;             // expected nr of data values / expanded descriptors
+  for(int  i=0; i<In_KTDEXL; i++ )    // expanded descriptors
+    Out_KTDEXP[ i ] = In_KTDEXP[ i ]; // no offset
+
+  Out_KELEM = In_KTDEXL;  // In_KELEM;// expected nr of expanded elements (????)
+
+  int elemIndex = _nextValue;
+  for( int i = 0; i < Out_KTDEXL; i++, elemIndex++ )
+  {
+    Out_VALUES[ elemIndex ] = In_VALUES[ anObs.subsetOffset() + i ];
+
+    //-- character data..?
+    if( fKSUP[ 7-1 ] > 0  &&                                 //-- msg contains char data
+        ( strncmp( In_CUNITS + i*24, "CCITTIA5", 8 ) == 0 || //-- ECMWF notation
+          strncmp( In_CUNITS + i*24, "CCITT IA5", 9 ) == 0   //-- WMO & NCEP PrepBUFR notation
+        )
+       )
+    {
+      //-- copy character string value to next available slot --
+      int charInd = (int)Out_VALUES[ elemIndex ] / 1000 - 1;
+      int charLen = (int)Out_VALUES[ elemIndex ] % 1000;
+      strncpy( (Out_CVALS + _nextCharParamPos*80)
+	     , (In_CVALS + charInd*80)
+	     , charLen );
+
+      //-- set "pointer" to this slot --
+      Out_VALUES[ elemIndex ] = 1000*( _nextCharParamPos + 1 ) + charLen;
+      _nextCharParamPos++;
+    }
+    else  //-- if delayed replication factor...
+    {
+      if( isDelayedDescriptor( Out_KTDEXP[ i ] ) )
+      {
+//cerr << "isDelayedDescriptor( " << Out_KTDEXP[ i ] << "), _KDLEN=" << _KDLEN << endl;
+	if( _KDLEN < MAX_KDLEN )
+	{
+	  fortint delayedRepeat = (fortint)Out_VALUES[ elemIndex ];
+	  if( delayedRepeat < 0 )
+	  {
+	    cerr << ">>> MvBufrOut::add: data error - negative delayed repetition " << delayedRepeat
+	         << " (from element " << elemIndex << ")" << endl;
+#ifdef METVIEW
+	    marslog( LOG_EROR, "MvBufrOut::add: data error - negative delayed repetition!" );
+#endif
+	  }
+	  _KDATA[ _KDLEN ] = delayedRepeat;
+	  _KDLEN++;
+	}
+	else
+	  {
+	    cerr << ">>> MvBufrOut::add: array _KDATA overflow! _KDLEN=" << _KDLEN
+	         << ", MAX_KDLEN=" << MAX_KDLEN << endl;
+#ifdef METVIEW
+	    marslog( LOG_EROR, "MvBufrOut::add: array _KDATA overflow!" );
+#endif
+	  }
+      }
+    }
+  }
+  _nextValue += (int)Out_KELEM;
+
+  fKSEC3[ 2 ] += 1;  //-- Nr of Subsets
+  _outState = kBufrOut_dataInBuffers;
+
+  if( shouldBeWritten() )
+    encode();
+}
+//____________________________________________________________________ formatBuffers
+void
+MvBufrOut :: formatBuffers( const MvObs& anObs )
+{
+  delete _currentSec1;
+#if 0
+  _currentSec1 = new TSection1;
+  *_currentSec1 = *(anObs._bufrIn->Sec1);
+#endif
+  if( anObs._bufrIn->fSec0->editionNr > 3 )
+    _currentSec1 = new Section1_Ed4( anObs._bufrIn->Sec1 );
+  else
+    _currentSec1 = new Section1_preEd4( anObs._bufrIn->Sec1 );
+
+  int i;
+
+  fKSEC0[ 0 ] = 0;
+  for( i=1; i<3; i++)
+    fKSEC0[ i ] = anObs._bufrIn->fKSEC0[ i ];
+
+  // fKSEC1[ 0 ] = 0; // ??????????
+  for( i=0; i<40; i++)
+    fKSEC1[ i ] = anObs._bufrIn->fKSEC1[ i ];
+
+#if 0
+  int wmoi = BUFR_ORIGINATING_CENTER;
+  if( getenv( "WMO_SITE_NR" ) )
+    wmoi = atoi( getenv( "WMO_SITE_NR" ) );  //-- change WMO Centre Number if given
+
+  if( wmoi < 0 || wmoi > 255 )
+    wmoi = BUFR_ORIGINATING_CENTER;          //-- fall back to hard coded default
+
+  fKSEC1[ 2 ] = wmoi;                        //-- WMO Originating Centre
+#endif
+
+  fKSEC1[ 3 ] += 1;                          // increment Update Sequence Number!!
+  if( fKSEC1[ 4 ] > 127 )
+    fKSEC1[ 4 ] -= 128;                      // remove section 2 (which one to copy?)
+
+  fKSEC3[ 0 ] = 0;
+  for( i=1; i<4; i++)
+    fKSEC3[ i ] = anObs._bufrIn->fKSEC3[ i ];
+  fKSEC3[ 2 ] = 0;                           // reset nr of Subsets
+
+  fKSEC4[ 0 ] = 0;
+  for( i=1; i<2; i++)
+    fKSEC4[ i ] = anObs._bufrIn->fKSEC4[ i ];
+
+  Out_KTDLEN = In_KTDLEN;             // nr of original data descriptors in Sec 3
+  for( i=0; i<In_KTDLEN; i++ )        // packed descriptors
+    Out_KTDLST[ i ] = In_KTDLST[ i ];
+
+  //-- do this also later because with non-compressed multisubset msgs these vary
+  Out_KTDEXL = In_KTDEXL;             // expected nr of data values / expanded descriptors
+  for( i=0; i<In_KTDEXL; i++ )        // expanded descriptors
+    Out_KTDEXP[ i ] = In_KTDEXP[ i ]; // no offset
+
+  Out_KELEM = In_KTDEXL;  // In_KELEM;// expected nr of expanded elements (????)
+
+  _outState = kBufrOut_formatedBuffers;
+}
+//____________________________________________________________________ encode
+void
+MvBufrOut :: encode( void )
+{
+  if( _outState == kBufrOut_dataInBuffers )
+  {
+    fortint myKERR = 0;
+    fortint myKBUFL = 0;
+
+    BUFREN( fKSEC0, fKSEC1, fKSEC2, fKSEC3, fKSEC4
+	  , &Out_KTDLEN   // &fKTDEXL
+	  , Out_KTDLST    // fKTDEXP   // &fKTDLEN, fKTDLST
+	  , &_KDLEN
+	  , _KDATA
+	  , &Out_KELEM
+	  , &Out_KTDEXL   // was: fKVALS
+	  , Out_VALUES
+	  , Out_CVALS
+	  , &myKBUFL
+	  , (fortint *)fMessage
+	  , &myKERR );
+
+    if( myKERR == 0 )
+      _outSet->write( fMessage, (int)(myKBUFL*sizeof(fortint)) );
+    else
+      {
+	cerr << ">>> MvBufrOut::encode, KERR=" << myKERR << endl;
+#ifdef METVIEW
+	marslog( LOG_EROR, "BUFR encoding (BUFREN) failed, status = %d", myKERR );
+#endif
+      }
+
+    resetBuffers();
+  }
+}
+//_______________________________________________________________ checkDescriptors
+// checks descriptors and also header consistency i.e.
+// to make sure that the new obs fits into the current
+// multisubset message
+//---------------------------------------------------------------
+void
+MvBufrOut :: checkDescriptors( const MvObs& anObs )
+{
+//--  if( anObs._bufrIn->_inState != kBufrIn_DataAndDescriptorsDecoded )
+  //-- expand always, in case non-compressed multisubset msg where exaoanded descriptors vary
+  anObs._bufrIn->ExpandDescriptors( anObs.subsetNumber() );
+
+  if( _outState == kBufrOut_emptyBuffers )
+    formatBuffers( anObs );
+  else
+    if( differentDescriptors() || differentHeader( anObs ) )
+    {
+       encode();
+       formatBuffers( anObs );
+    }
+}
+
+//_______________________________________________________________ differentDescriptors
+// returns 1 if descriptors of the BUFR message in 'anObs' differs
+// from current descriptors.
+// returns 0 if they are equal
+//---------------------------------------------------------------
+int
+MvBufrOut :: differentDescriptors( void ) const
+{
+  if( _outState < kBufrOut_formatedBuffers )
+    return 1;
+
+  if( In_KTDLEN != Out_KTDLEN )
+    return 1;
+
+  for( int i = 0; i < In_KTDLEN; i++ )
+    if( In_KTDLST[ i ] != Out_KTDLST[ i ] )
+      return 1;
+
+  return 0;
+}
+//_______________________________________________________________ differentHeader
+// returns 1 if section 1 header of the BUFR message in 'anObs'
+// differs from current header 1.
+// returns 0 if they are equal
+//---------------------------------------------------------------
+int
+MvBufrOut :: differentHeader( const MvObs& anObs ) const
+{
+#if 0
+  int seclen = 17;  // = unsignedInt( &(_currentSec1->len), 3 );  //syntax error???
+
+  unsigned char* v1 = &(_currentSec1->len);	    //-- start of current section 1
+  unsigned char* v2 = &(anObs._bufrIn->fSec1->len); //-- start of sec 1 in other header
+
+  for( int i=seclen; i>0; --i )
+  {
+     if( *v1 != *v2 )
+        return 1;
+
+     ++v1;  ++v2;
+  }
+
+  return 0;
+#endif
+
+  return _currentSec1->isDifferent( anObs._bufrIn->Sec1 );
+}
+//______________________________________________________________ shouldBeWritten
+int
+MvBufrOut :: shouldBeWritten( void )
+{
+  if( _outState != kBufrOut_dataInBuffers )
+    return 0;
+
+  return fKSEC3[ 2 ] >= _maxNrSubsets;  // Nr of Subsets
+}
+//______________________________________________________________ setSubsetCount
+void
+MvBufrOut :: setSubsetCount( int maxNrSubsets )
+{
+  if( _outState == kBufrOut_dataInBuffers )
+    encode();
+  _maxNrSubsets = maxNrSubsets;
+}
+//______________________________________________________________ isDelayedDescriptor
+boolean
+MvBufrOut :: isDelayedDescriptor( const long aDescr ) const
+{
+//  if( aDescr == 31001 || aDescr == 31002 || aDescr == 31011 || aDescr == 31012 )
+  if( aDescr >= 31000 && aDescr <= 31012 )
+    return true;
+  else
+    return false;
+}
+//______________________________________________________________________
+//====================================================================== MvObs
+//______________________________________________________________________
+
+MvObs :: MvObs( MvBufr *b, int i )
+{
+   _subsetNr = i;
+   _copy( b );
+}
+
+MvObs :: MvObs( const MvObs&  b )
+{
+   _copy( b );
+}
+//___________________________________________________________________
+MvObs :: ~MvObs()
+{
+   _clean();
+}
+//___________________________________________________________________ _copy
+void
+MvObs :: _copy( MvBufr *b )
+{
+   _bufrIn = b;
+   _bufr_id = 0;
+   if( _bufrIn )
+   {
+     _bufrIn->attach();
+     _bufr_id = _bufrIn->currentBufrRef();
+   }
+   _currentLevelCoordinate = cPressureCoordinate;
+   _currentLevelIndex = -1;
+   _confidence = new MvBufrConfidence( _bufrIn, _subsetNr );
+}
+//___________________________________________________________________ _copy
+void
+MvObs :: _copy( const MvObs& b )
+{
+  _subsetNr = b._subsetNr;
+  _copy( b._bufrIn );
+
+}
+//___________________________________________________________________ _clean
+void
+MvObs :: _clean()
+{
+   if( _bufrIn )
+     _bufrIn->detach();
+   _bufrIn = NULL;
+   _bufr_id = 0;
+   delete _confidence;
+   _confidence = 0;
+}
+//___________________________________________________________________ operator=
+
+MvObs&
+MvObs :: operator= ( const MvObs& b )
+{
+   _clean();
+   _copy( b );
+   return *this;
+}
+//___________________________________________________________________ operator void*
+
+MvObs :: operator void* ()
+{
+   return _bufrIn;
+}
+//___________________________________________________________________ operator!
+bool
+MvObs :: operator! ()
+{
+   return !_bufrIn;
+}
+//___________________________________________________________________ msg_ok
+//
+bool
+MvObs :: msg_ok() const
+{
+  if( _bufr_id != _bufrIn->currentBufrRef() )
+  {
+    //-- restriction due to static bufr arrays --
+    cerr << ">>> [MvObs::msg_ok] Static bufr arrays rewritten, not valid any more!" << endl;
+    return false;
+  }
+  return ( _bufrIn && ( _bufrIn->_inState != kBufrIn_Error ) ) ? true : false;
+}
+//___________________________________________________________________ Advance
+bool
+MvObs :: Advance()
+{
+   if( _bufrIn->subsetCount() > 1000 ||
+       _bufrIn->subsetCount() < 1 ) // DEBUG TEST ONLY
+   {
+      cerr << " >>> MvObs::Advance, unbelievable nr of fsubsets ("
+	   << _bufrIn->subsetCount() << ") in msg "
+       << _bufrIn->fMessageNumber << endl;
+   }
+   _subsetNr++;
+   _bufrIn->setSubset( _subsetNr );
+   return  _subsetNr <= _bufrIn->subsetCount();
+}
+
+//_________________________________________________________________ messageType
+int
+MvObs :: messageType()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->msgType();
+}
+//_________________________________________________ messageSubtypeInternational
+int
+MvObs :: messageSubtypeInternational()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->msgSubtypeWMO();
+}
+//_________________________________________________________ messageSubtypeLocal
+int
+MvObs :: messageSubtypeLocal()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->msgSubtypeLocal();
+}
+//______________________________________________________________ messageSubtype
+int
+MvObs :: messageSubtype()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->msgSubtype();
+}
+//___________________________________________________________ originatingCentre
+int
+MvObs::originatingCentre()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->origCentre();
+}
+int
+MvObs::originatingSubCentre()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->origSubCentre();
+}
+//___________________________________________________________ editionNumber
+int
+MvObs::editionNumber()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->fSec0->editionNr;
+}
+//___________________________________________________________ masterTable
+int
+MvObs::masterTable()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->masterTable();
+}
+//___________________________________________________________ masterTableVersion
+int
+MvObs::masterTableVersion()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->masterTableVersion();
+}
+//___________________________________________________________ localTableVersion
+int
+MvObs::localTableVersion()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->Sec1->localTableVersion();
+}
+//_________________________________________________  messageTotalLen()
+int
+MvObs :: messageTotalLen()
+{
+   if( ! msg_ok() )
+      return -1;
+
+   return _bufrIn->totalLen();
+}
+//____________________________________________________________________ operator[]
+double
+MvObs::operator[] ( int index )  //-- index starts from 1: 1,2,...,n
+{
+  return (double)(_bufrIn->DataValue( index-1, _subsetNr ));
+}
+//____________________________________________________________________ value
+// returns 'kBufrMissingValue' if not found!
+//-------------------------------------------------
+float
+MvObs :: value( long aDescriptor )
+{
+   if( ! msg_ok() )
+      return kBufrMissingValue;
+
+   fortfloat myValue;
+   _bufrIn->Value( aDescriptor, _subsetNr, myValue );
+   return myValue == kFortranBufrMissingValue ? kBufrMissingValue : myValue;
+}
+//___________________________________________________________________ nextValue
+// returns 'kBufrMissingValue' if not found!
+//-------------------------------------------------
+float
+MvObs :: nextValue()
+{
+   if( ! msg_ok() )
+      return kBufrMissingValue;
+
+   fortfloat myValue;
+   _bufrIn->Value( _bufrIn->_currentDescr, _subsetNr, myValue, _bufrIn->_currentDescrInd + 1 );
+   return myValue == kFortranBufrMissingValue ? kBufrMissingValue : myValue;
+}
+//___________________________________________________________ valueByOccurrence
+// returns 'kBufrMissingValue' if not found!
+//-------------------------------------------------
+float
+MvObs :: valueByOccurrence( int anOccurrenceIndex, long aDescriptor )
+{
+  fortfloat myValue = value( aDescriptor );
+  for( int myInd = 1; myInd < anOccurrenceIndex; myInd++ )
+    myValue = nextValue();
+  return myValue == kFortranBufrMissingValue ? kBufrMissingValue : myValue;
+}
+//______________________________________________________________ hasConfidences
+bool
+MvObs :: hasConfidences()
+{
+  return  _confidence->hasConfidences();
+}
+//__________________________________________________________________ confidence
+int
+MvObs :: confidence()
+{
+  return _bufrIn->_currentDescrInd > -1 ?
+         _confidence->confidenceByIndex( _bufrIn->_currentDescrInd ) : -1;
+}
+//____________________________________________________________________ intValue
+// returns 'kFortranBufrMissingIntValue' if not found!
+//----------------------------------------------------
+long
+MvObs :: intValue( long aDescriptor )
+{
+  return msg_ok() ? _bufrIn->intValue( aDescriptor, _subsetNr ) : kFortranBufrMissingIntValue;
+}
+//____________________________________________________________________ elementValueType
+EElementValueType
+MvObs :: elementValueType()
+{
+  return _bufrIn->elementValueType( _subsetNr );
+}
+//____________________________________________________________________ elementValueType
+EElementValueType
+MvObs :: elementValueType( long aDescriptor )
+{
+  return _bufrIn->elementValueType( aDescriptor, _subsetNr );
+}
+//____________________________________________________________________ stringValue
+string
+MvObs :: stringValue()
+{
+  if( ! msg_ok() )
+    return MESSED_UP;
+  else
+    return _bufrIn->stringValue( _subsetNr );
+}
+//_________________________________________________________________ stringValue
+string
+MvObs :: stringValue( long aDescriptor )
+{
+  if( ! msg_ok() )
+    return MESSED_UP;
+  else
+    return _bufrIn->stringValue( aDescriptor, _subsetNr );
+}
+//______________________________________________________ numberOfPressureLevels
+int
+MvObs :: numberOfPressureLevels()
+{
+  return numberOfLevels( cPressureCoordinate );
+}
+//______________________________________________________ numberOfLevels
+int
+MvObs :: numberOfLevels( long levelDescriptor )
+{
+  int myCount = 0;
+
+  if( firstLevel( levelDescriptor ) != kBufrMissingValue )
+  {
+    myCount++;
+    while( nextLevel() != kBufrMissingValue )
+      myCount++;
+  }
+
+  _currentLevelIndex = -1;
+  return myCount;
+}
+//__________________________________________________________ firstPressureLevel
+float
+MvObs :: firstPressureLevel()
+{
+  _currentLevelCoordinate = cPressureCoordinate;
+  return pressureLevel( 0 );
+}
+//__________________________________________________________ firstLevel
+float
+MvObs :: firstLevel( long levelDescriptor )
+{
+  _currentLevelCoordinate = levelDescriptor;
+  return level( levelDescriptor, 0 );
+}
+//___________________________________________________________ nextPressureLevel
+float
+MvObs :: nextPressureLevel()
+{
+  return pressureLevel( _currentLevelIndex + 1 );
+}
+//___________________________________________________________ nextLevel
+float
+MvObs :: nextLevel()
+{
+  return level( _currentLevelCoordinate, _currentLevelIndex + 1 );
+}
+//______________________________________________________________ pressureLevel
+float
+MvObs :: pressureLevel( int firstIndexValue )
+{
+  float  myLevelValue = level( cPressureCoordinate, firstIndexValue );
+
+  return myLevelValue == kBufrMissingValue ? kBufrMissingValue : myLevelValue / 100.;
+}
+//______________________________________________________________ level
+float
+MvObs :: level( long levelDescriptor, int firstIndexValue )
+{
+  if( ! msg_ok() )
+     return kBufrMissingValue;
+
+  fortfloat myLevelValue = kFortranBufrMissingValue;
+
+  if( _bufrIn->Value( levelDescriptor, _subsetNr, myLevelValue, firstIndexValue ) )
+    _currentLevelIndex = _bufrIn->_currentDescrInd;
+  else
+    _currentLevelIndex = -1;
+
+  return myLevelValue == kFortranBufrMissingValue ? kBufrMissingValue : myLevelValue;
+}
+
+//______________________________________________________________ specifierIndex
+int
+MvObs :: specifierIndex( long   aSpecifierDescriptor
+		       , double aSpecifierValue
+		       , int    firstIndexValue )
+{
+   if( ! msg_ok() )
+      return -1;
+
+   if( _bufrIn->_inState != kBufrIn_DataAndDescriptorsDecoded )
+      _bufrIn->ExpandDescriptors( _subsetNr );
+
+   if( _bufrIn->_inState == kBufrIn_DataAndDescriptorsDecoded )
+   {
+      //-- search for a specifier data with specified value --
+      for( int index=firstIndexValue; index < In_KTDEXL; index++ )
+	 if( In_KTDEXP[ index ] == aSpecifierDescriptor
+	     && _bufrIn->DataValue( index, _subsetNr ) == aSpecifierValue )
+	 {
+	    _lastSpecifierIndex = index;
+	    return index;
+	 }
+   }
+   return -1;
+}
+//____________________________________________________________ valueBySpecifier
+// A generic function to retrieve repeating data
+// specified by some other data
+// (e.g.  temperature at a certain pressure level)
+//--------------------------------------------------------------------
+double
+MvObs :: valueBySpecifier( long   aSpecifierDescriptor
+			 , double aSpecifierValue
+			 , long   aDescriptor
+			 , int    firstIndexValue )
+{
+   int index = specifierIndex( aSpecifierDescriptor, aSpecifierValue, firstIndexValue );
+   if( index > 0 )
+   {
+     //-- if the coordinate value itself is requested
+     if( aSpecifierDescriptor == aDescriptor )
+     {
+         fortfloat myVal = _bufrIn->DataValue( index, _subsetNr );
+         return myVal == kFortranBufrMissingValue ? kBufrMissingValue : myVal;
+     }
+     //-- search real data before next specifier data --
+     for( int ind=index+1; ind < In_KTDEXL; ind++ )
+     {
+       if( In_KTDEXP[ ind ] == aDescriptor )
+       {
+         fortfloat myVal = _bufrIn->DataValue( ind, _subsetNr );
+         return myVal == kFortranBufrMissingValue ? kBufrMissingValue : myVal;
+       }
+
+       //-- not found if specifier data again --
+       if( In_KTDEXP[ ind ] == aSpecifierDescriptor )
+         break;
+     }
+   }
+   return kBufrMissingValue;   //-- Not Found or Troubled Msg --
+}
+//________________________________________________________ valueByPressureLevel
+float
+MvObs :: valueByPressureLevel( float aLevelValue        // in 'hPa'
+			     , long  aDescriptor )
+{
+   return valueBySpecifier( cPressureCoordinate, aLevelValue*100., aDescriptor );
+}
+//________________________________________________________ valueByLevel
+float
+MvObs :: valueByLevel( long  aLevelDescriptor
+                     , float aLevelValue
+		     , long  aDescriptor )
+{
+   return valueBySpecifier( aLevelDescriptor, aLevelValue, aDescriptor );
+}
+//________________________________________________________ valueByLevel
+float
+MvObs :: valueByLevelRange( long  aLevelDescriptor
+                     , float level1
+	             , float level2    
+		     , long  aDescriptor )
+{
+    
+  float levelVal=firstLevel(aLevelDescriptor);
+  
+  while(levelVal != kBufrMissingValue)
+  {  
+	if(levelVal >= level1 && levelVal <= level2)
+	{
+		for( int ind = _currentLevelIndex + 1; ind < In_KTDEXL; ind++ )
+  		{
+    			if( In_KTDEXP[ ind ] == aDescriptor )
+   			{
+      				fortfloat myValue = _bufrIn->DataValue( ind, _subsetNr );
+				if(myValue != kFortranBufrMissingValue)
+					return myValue;
+				
+      				//return myValue == kFortranBufrMissingValue ? kBufrMissingValue : myValue;
+    			}
+    			
+    			else if(In_KTDEXP[ ind ] ==aLevelDescriptor)
+				break; 	
+		}
+	}
+	
+	levelVal=nextLevel();
+  }	
+	
+  return kBufrMissingValue;
+}  
+ 
+//________________________________________________________________ valueByLayer
+float
+MvObs :: valueByLayer( float firstLevel
+		     , float secondLevel
+		     , long aDescriptor )
+{
+  int firstLevelIndex = specifierIndex( cPressureCoordinate, firstLevel*100., 0 );
+  int secondLevelIndex = -1;
+
+  while( firstLevelIndex > 0 )          //-- loop candidates --
+  {
+    //-- try to find the second level next to the current first one --
+
+    if( In_KTDEXP[ firstLevelIndex - 1 ] == cPressureCoordinate &&
+        _bufrIn->DataValue( firstLevelIndex - 1, _subsetNr ) == secondLevel*100. )
+    {
+      secondLevelIndex = firstLevelIndex - 1;
+      break;
+    }
+    else
+      if( In_KTDEXP[ firstLevelIndex + 1 ] == cPressureCoordinate &&
+          _bufrIn->DataValue( firstLevelIndex + 1, _subsetNr ) == secondLevel*100. )
+      {
+        secondLevelIndex = firstLevelIndex + 1;
+        break;
+      }
+
+    //-- no match, let's find the next candidate --
+
+    firstLevelIndex = specifierIndex( cPressureCoordinate
+				    , firstLevel*100.
+				    , firstLevelIndex + 1 );
+  }
+
+  if( firstLevelIndex < 0 )
+    return kBufrMissingValue;  //-- levels were not found!!!
+
+  //-- search real data before next specifier data --
+
+  int maxim = firstLevelIndex > secondLevelIndex ? firstLevelIndex : secondLevelIndex;
+  for( int ind = maxim + 1; ind < In_KTDEXL; ind++ )
+  {
+    if( In_KTDEXP[ ind ] == aDescriptor )
+    {
+      fortfloat myValue = _bufrIn->DataValue( ind, _subsetNr );
+      return myValue == kFortranBufrMissingValue ? kBufrMissingValue : myValue;
+    }
+
+
+    //-- not found if specifier data again --
+
+    if( In_KTDEXP[ ind ] == cPressureCoordinate )
+      break;
+  }
+  return kBufrMissingValue;   //-- Not Found or Troubled Msg --
+}
+
+
+//______________________________________________________________ printAllValues
+boolean
+MvObs :: printAllValues()
+{
+   ostream* myStream = &cout;
+   return writeAllValues( *myStream );
+}
+//_______________________________________________________________ writeAllValues
+boolean
+MvObs :: writeAllValues( ostream& aStream )
+{
+  if( ! msg_ok() )
+    return false;
+
+  if( _bufrIn->_inState != kBufrIn_DataAndDescriptorsDecoded )
+    _bufrIn->ExpandDescriptors( _subsetNr );
+
+  if( _bufrIn->_inState == kBufrIn_DataAndDescriptorsDecoded )
+    {
+      long  myEndingIndex = _confidence->hasConfidences() ?
+	_confidence->lastDataIndex()+1 : In_KTDEXL;
+      writeValues(aStream,0, myEndingIndex);
+      return true;
+   }
+   return false;
+}
+
+boolean
+MvObs::writeValues(ostream& aStream, int firstIndex, int lastIndex)
+{
+   if( ! msg_ok() )
+      return false;
+
+   if( _bufrIn->_inState != kBufrIn_DataAndDescriptorsDecoded )
+      _bufrIn->ExpandDescriptors( _subsetNr );
+
+   if( _bufrIn->_inState == kBufrIn_DataAndDescriptorsDecoded )
+   {
+      fortfloat myValue;
+      if ( firstIndex < 0 )
+	firstIndex = 0;
+      if (lastIndex > In_KTDEXL )
+	lastIndex = In_KTDEXL;
+
+      for( int i = firstIndex; i < lastIndex; i++ )
+      {
+	 aStream.width( 3 ); aStream.fill( ' ' );      // index
+	 aStream << i+1 << ".  ";
+
+	 myValue = _bufrIn->DataValue( i, _subsetNr ); // get parameter value
+	                                               // = set current parameter!
+	 switch( elementValueType() )                    // print parameter value
+	 {
+	   case kEVT_unknown:
+	      aStream << " ?????";
+	      break;
+
+	   case kEVT_missing:
+	      aStream << "   ~~~";
+	      break;
+
+	   case kEVT_numeric:
+	      aStream.width( 6 ); aStream.fill( ' ' );
+	      aStream << myValue;
+	      break;
+
+	   case kEVT_string:
+	      aStream.width( 6 ); aStream.fill( ' ' );
+	      aStream << stringValue( In_KTDEXP[ i ] );
+	      break;
+	 }
+
+	 aStream << " " << name( In_KTDEXP[ i ] );           // parameter name
+	 aStream << " [" << unit( In_KTDEXP[ i ] ) << "] ("; // parameter unit
+	 aStream.width( 5 ); aStream.fill( '0' );            // parameter descriptor
+	 aStream << In_KTDEXP[ i ] << ")";
+	 aStream << endl;
+      }
+      return true;
+   }
+   return false;
+}
+
+//_______________________________________________________________ writeAllValues
+boolean
+MvObs :: writeAllValues( const char* aPathName )
+{
+  ofstream myStream( aPathName, ios::out );
+  if( ! myStream )
+  {
+    cerr << " >>> MvObs::writeAllValues(char*): error in creating file " << aPathName << endl;
+#ifdef METVIEW
+    marslog( LOG_EROR, "MvObs::writeAllValues: error in creating file %s", aPathName );
+#endif
+    return false;
+  }
+
+  return writeAllValues( myStream );
+}
+//_______________________________________________________________ writeBufrBox
+boolean
+MvObs :: writeBufrBox( ostream& aStream )
+{
+   boolean return_value = true;
+
+   boolean b_ret = _bufrIn->writeBufrBox( _subsetNr );
+   if( ! b_ret )
+   {
+      aStream << "\n   >>> Problems encountered!!! <<<\n" << endl;
+      return_value = false;
+   }
+   else
+     {
+       return_value = file_to_stream(BBOXNAME.c_str(),aStream,0);
+       delete_print_file(BBOXNAME.c_str());
+     }
+   return return_value;
+}
+//______________________________________________________________ WmoIdentNumber
+long
+MvObs :: WmoIdentNumber()
+{
+  return msg_ok() ? WmoBlockNumber()*1000 + WmoStationNumber() : kBufrMissingIntValue;
+}
+//______________________________________________________________ WmoBlockNumber
+int
+MvObs :: WmoBlockNumber()
+{
+   fortfloat myValue;
+
+   if( msg_ok() && _bufrIn->Value( 1001L, _subsetNr, myValue ) )
+      return (long)myValue;
+   else
+      return 0;
+}
+//____________________________________________________________ WmoStationNumber
+int
+MvObs :: WmoStationNumber()
+{
+   fortfloat myValue;
+
+   if( msg_ok() && _bufrIn->Value( 1002L, _subsetNr, myValue ) )
+      return (long)myValue;
+   else
+      return 0;
+}
+//____________________________________________________________ findSomeIdent
+string
+MvObs::findSomeIdent()
+{
+  if( ! msg_ok() )
+    return string( "???" );
+
+                            //-- 5-digit WMO identifier available?
+  if( WmoIdentNumber() > 0 )
+    {
+      ostringstream oss;
+      oss << setw(5) << setfill('0') << WmoIdentNumber();
+      return oss.str();
+    }
+                            //-- No WMO id found, thus look for other candidates,
+                            //-- this is a list of known identifier candidates.
+  const long idList[] =
+    {
+      1011L,    //-- Ship or mobile land station identifier
+      1005L,    //-- Buoy/platform identifier
+      1006L,    //-- Aircraft flight number
+      1007L,    //-- Satellite identifier
+      1008L,    //-- Aircraft registration number
+      1010L,    //-- Stationary buoy platform identifier
+      1025L,    //-- Storm identifier
+      1026L,    //-- WMO storm name
+      1027L     //-- WMO long storm name
+    };
+
+  int idVals = sizeof(idList)/sizeof(idList[0]);
+
+  for( int i=0; i<idVals; ++i )
+    {
+      long descr = idList[i];
+      fortfloat myValue = value( descr );
+
+      if( myValue != kBufrMissingValue )
+	{
+	  return stringValue( descr );
+	}
+    }
+
+  return string( "id???" );
+}
+//____________________________________________________________________ location
+MvLocation
+MvObs :: location()
+{
+   MvLocation myLocation( value( 5001L ), value( 6001L ) ); //-- "high accuracy"
+
+   if( myLocation.latitude() == kBufrMissingValue ||
+       myLocation.longitude() == kBufrMissingValue )
+   {
+      myLocation.set( value( 5002L ), value( 6002L ) );     //-- "coarse accuracy"
+   }                                                        //-- hopefully not missing
+
+   //-- this one is for those quirky NCEP PrepBUFR msgs
+   if( myLocation.latitude() != kBufrMissingValue &&
+       myLocation.longitude() == kBufrMissingValue )
+   {
+      //-- lat OK, try NCEP PrepBUFR local descriptor 0'06'240 for lon
+      myLocation.set( myLocation.latitude(), value( 6240L ) );
+   }
+
+   return myLocation;
+}
+//____________________________________________________________________ unit
+string
+MvObs :: unit( long aDescriptor )
+{
+  return msg_ok() ? _bufrIn->unit( aDescriptor ) : MESSED_UP;
+}
+//____________________________________________________________________ unit
+string
+MvObs :: unit()
+{
+  return msg_ok() ? _bufrIn->unit() : MESSED_UP;
+}
+//____________________________________________________________________ name
+string
+MvObs :: name( long aDescriptor )
+{
+  return msg_ok() ? _bufrIn->name( aDescriptor ) : MESSED_UP;
+}
+//____________________________________________________________________ name
+string
+MvObs :: name()
+{
+  return msg_ok() ? _bufrIn->name() : MESSED_UP;
+}
+//________________________________________________________________ subsetOffset
+int
+MvObs :: subsetOffset() const
+{
+  return ( _subsetNr - 1 ) * In_KELEM;
+}
+//________________________________________________________________ writeConfidenceValues
+bool
+MvObs::writeConfidenceValues(ostream& aStream)
+{
+  if( ! msg_ok() || ! _confidence->hasConfidences() )
+    return false;
+
+  if( _bufrIn->_inState != kBufrIn_DataAndDescriptorsDecoded )
+    _bufrIn->ExpandDescriptors( _subsetNr );
+
+  if( _bufrIn->_inState == kBufrIn_DataAndDescriptorsDecoded )
+    {
+      long  myStartingIndex = _confidence->lastDataIndex()+1;
+      long  myEndingIndex =  In_KTDEXL;
+      writeValues(aStream,myStartingIndex, myEndingIndex);
+      return true;
+   }
+   return false;
+}
+
+#ifdef METVIEW
+//---
+//-- Extracts a 4 or 8 bit OPERA radar image
+//-- from a BUFR message into 'unsigned char' array
+//--
+//-- ( NOTE: U N F I N I S H E D ! ! ! )
+//____________________________________________________________________ OperaRadarImage
+unsigned char*
+MvObs::OperaRadarImage(  )
+{
+   const float cRadarMissingVal = 255;       //-- BUFR radar pixel with no data
+   const float cMyMissingValue = 0;          //-- output radar pixel with no data
+
+   //---
+   //-- Some checks to ensure that we can handle this data
+   //-
+
+   int msgType = messageType();
+   if( msgType != 6 )                        //-- 6 = Radar data
+   {
+      throw MvException( "MvObs::OperaRadarImage: not radar data!" );
+   }
+
+   float val = value( 30021 );               //-- 030021: Number of pixels per row
+   if( val == kBufrMissingValue )
+   {
+      throw MvException( "MvObs::OperaRadarImage: unable to get number-of-rows!" );
+   }
+   int n_rows = val;
+
+   val = value( 30022 );                     //-- 030022: Number of pixels per column
+   if( val == kBufrMissingValue )
+   {
+      throw MvException( "MvObs::OperaRadarImage: unable to get number-of-columns!" );
+   }
+   int n_cols = val;
+
+   //---
+   //-- So far so good, now let's try to locate the first data row
+   //-
+
+   int firstRowStartIndex = _bufrIn->descriptorToFortranIndex( 5031 );
+   if( firstRowStartIndex < 0 )
+   {
+      throw MvException( "MvObs::OperaRadarImage: unable to get Row Number element!" );
+   }
+                                                     //-- "FortranIndex": 0,1,2,...
+   int rowRepeatCount = (*this)[firstRowStartIndex]; //-- operator[i], i=1,2,3,...
+   long currentDescr = currentDescriptor();
+   if( currentDescr != 31002 )
+   {
+      throw MvException( "MvObs::OperaRadarImage: internal error - not 031002" );
+   }
+
+   //---
+   //-- Still OK, now create the pixel array and start decoding the BUFR msg
+   //-
+
+   unsigned char* radimg = new unsigned char[n_rows*n_cols];
+   cout << "radimg size: " << n_rows << "*" << n_cols << " = " << n_rows*n_cols << endl;
+
+   int startPos = firstRowStartIndex - 1;    //-- start of radimg pixels
+   int pixelPos = 0;
+
+   float imax = 0;
+   for( int msgPos = startPos; msgPos < In_KTDEXL; ++msgPos )
+   {
+      float currVal = (*this)[msgPos];       //-- get the value
+      long  currDescr = currentDescriptor(); //-- and it's descriptor
+
+      if( currDescr == 31012 || currDescr == 31011 ) //-- delayed descr & data repetition factor?
+      {
+         int repeatCount = currVal;
+         float repeatVal = (*this)[++msgPos]; //-- get next value (advances to next descriptor)
+
+         //-- Double check that the descriptor that follows is a pixel data descriptor
+         //-- NOTE: Descriptor 30004 (16 bit pixel value) is ignored by this code!
+         //--       We only check for 4 bit (30001) and 8 bit (30002) pixel descriptors
+         long nextCurrDescr = currentDescriptor();
+         if( nextCurrDescr != 30001 && nextCurrDescr != 30002 )
+         {
+            delete [] radimg;                //-- free memory before throwing
+            if( nextCurrDescr == 30004 )     //-- cannot process 16 bit pixels
+            {
+               throw MvException( "MvObs::OperaRadarImage: cannot process 16 bit radar images" );
+            }
+
+            cerr << "MvObs::OperaRadarImage: expected 30001 or 30002, found "
+                 << nextCurrDescr << endl;
+            throw MvException( "MvObs::OperaRadarImage: internal or data error => debug needed" );
+         }
+
+         //---
+         //-- OK, we are processing a repeated pixel value (run-length coding)
+         //-
+         if( repeatVal == cRadarMissingVal )
+            repeatVal = cMyMissingValue;
+         else if( repeatVal > imax )
+            imax = repeatVal;
+
+         for( int i=0; i < repeatCount; ++i )
+         {
+            radimg[pixelPos++] = (unsigned char)repeatVal; //-- repeated data value
+         }
+      }
+      else if( currDescr == 30002 || currDescr == 30001 )
+      {
+         //---
+         //-- this is not a repeated value, just a single value
+         //-
+         if( currVal == cRadarMissingVal )
+            currVal = cMyMissingValue;
+         else if( currVal > imax )
+            imax = currVal;
+
+         radimg[pixelPos++] = (unsigned char)currVal;      //-- individual data value
+      }
+   }
+   cout << "Last pixel pos: " << pixelPos << endl;
+   cout << "Max pixel value: " << imax << endl;
+
+   return radimg;
+}
+//---
+//-- Extracts OPERA radar image metadata that is required
+//-- for instance for geolocating the image
+//--
+//-- ( NOTE: U N F I N I S H E D ! ! ! )
+//____________________________________________________________________ OperaRadarMetadata
+bool
+MvObs::OperaRadarMetadata( /* <aki> arguments? */ )
+{
+   return false;
+}
+#endif
+
+//=============================================================================
+//                                                                 vk April -95
+// Quick&Dirty hack to access Feed Back Quality Control Confidence info:
+//  * works only for QC operator 222000
+//  * uses Data Present Descriptors (031031) and Confidence Descriptors (033007)
+//  * presumes following structure:
+//     - 222000 descriptor exists (and is followed by:)
+//     - 031031 descriptors are all in one group (only first one is used!)
+//     - 033007 descriptors are all in one group (only first one is used!)
+//     - Extended Delayed Descr Replication Factors (031002) are not checked!
+//  * Data Present group is used to define index into Confidence group
+//____________________________________________________________ MvBufrConfidence
+
+MvBufrConfidence :: MvBufrConfidence( MvBufr* aBufr, int aSubsetNr )
+{
+  _bufr = aBufr;
+  if( _bufr )
+    _bufr->attach();
+  _subsetNr = aSubsetNr;
+  _state = kBCS_unknown;
+  _startOfDataPresent = -2;
+  _startOfConfidences = -2;
+}
+//___________________________________________________________ ~MvBufrConfidence
+
+MvBufrConfidence :: ~MvBufrConfidence()
+{
+  if( _bufr )
+    _bufr->detach();
+}
+//______________________________________________________________ hasConfidences
+bool
+MvBufrConfidence :: hasConfidences()
+{
+  if( ! _bufr )
+    return false;
+
+  if( _state == kBCS_unknown )
+    _state = _bufr->descriptorToFortranIndex( 222000L ) > 0 ? kBCS_exists : kBCS_missing;
+
+  return _state == kBCS_exists ? true : false;
+}
+//_______________________________________________________________ confidence
+int
+MvBufrConfidence :: confidence( long aDescr )
+{
+  int myDataIndex = _bufr->descriptorToFortranIndex( aDescr );
+  return myDataIndex > -1 ? confidenceByIndex( myDataIndex ) : -1;
+}
+//___________________________________________________________ confidenceByIndex
+int
+MvBufrConfidence :: confidenceByIndex( int aDataInd )
+{
+  int myConfidenceInd = -1;
+
+  if( hasConfidences() )
+  {
+     //--    case a:        case b:
+     //--        . . .          . . .
+     //--       0xxyyy         0xxyyy    <- 0xxyyy: element descriptors
+     //--       0xxyyy         222000
+     //--       222000         03100x
+     //--       031031         031031    <- startOfDataPresent()
+     //--       031031         031031
+     //--        . . .          . . .
+     //--
+     if( aDataInd < ( startOfDataPresent() - 1 ) &&  //-- skip 222000
+         _bufr->CurrentDescriptor() != 222000L )     //-- if previous was 03100*
+     {
+        if( _bufr->DataValue( aDataInd, _subsetNr ) != kFortranBufrMissingValue )
+           myConfidenceInd = startOfConfidences() + delta( aDataInd );
+     }
+  }
+
+  return myConfidenceInd > -1 ?
+            (int)(_bufr->PeekDataValue( myConfidenceInd, _subsetNr )) : -1;
+}
+//_______________________________________________________________ lastDataIndex
+int
+MvBufrConfidence :: lastDataIndex()
+{
+  return hasConfidences() ? _bufr->descriptorToFortranIndex( 222000L ) - 1 : -1;
+}
+//__________________________________________________________ startOfDataPresent
+// Q&D hack !!!
+
+int
+MvBufrConfidence :: startOfDataPresent()
+{
+  if( _startOfDataPresent == -2 )
+  {
+    if( hasConfidences() )
+    {
+      _startOfDataPresent = _bufr->descriptorToFortranIndex( 31031L );
+      if( _startOfDataPresent < 1 )
+      {
+	cerr << "[MvBufrConfidence::startOfDataPresent] Q&D hack does not work!!" << endl;
+	_state = kBCS_missing;
+      }
+    }
+  }
+
+  return hasConfidences() ? _startOfDataPresent : -1;
+}
+//_______________________________________________________________ startOfConfidences
+// Q&D hack !!!
+
+int
+MvBufrConfidence :: startOfConfidences()
+{
+  if( _startOfConfidences == -2 )
+  {
+    if( hasConfidences() )
+    {
+      _startOfConfidences = _bufr->descriptorToFortranIndex( 33007L );
+      if( _startOfConfidences < 1 )
+      {
+	cerr << "[MvBufrConfidence::startOfConfidences] Q&D hack does not work!!" << endl;
+	_state = kBCS_missing;
+      }
+    }
+  }
+
+  return hasConfidences() ? _startOfConfidences : -1;
+}
+//_______________________________________________________________ delta
+int
+MvBufrConfidence :: delta( int anInd )
+{
+  if( hasConfidences() )
+  {
+    int myDelta = 0;
+
+    for( int i = 0; i < anInd; i++ )
+      if( _bufr->PeekDataValue( startOfDataPresent()+i, _subsetNr ) == 0 )
+	myDelta++;
+
+    return myDelta;
+  }
+  else
+    return -1;
+}
+
+//________________________________________________________________________
+//======================================================================== MvBufrParam
+//________________________________________________________________________
+
+MvBufrParam :: MvBufrParam( const char *aParamName )
+{
+   descriptorStruct *par = knownParams;
+   while( par->descriptor != 0 )
+   {
+      if( strcmp( aParamName, par->name ) == 0 )
+      {
+         fDescriptor = par->descriptor;
+	 return;
+      }
+      ++par;
+   }
+   cerr << " >>> MvBufrParam::MvBufrParam: param not defined: " << aParamName << endl;
+   fDescriptor = 0;
+}
+//_____________________________________________________________ PrintAllKnownParameters
+
+void
+MvBufrParam :: PrintAllKnownParameters() const
+{
+   descriptorStruct *par = knownParams;
+   cout << " The Known Parameters of class MvBufrParam and the corresponding Descriptors:\n";
+   while( par->descriptor != 0 )
+   {
+      cout << "\n";
+      cout.width( 16 );
+      cout.fill( ' ' );
+      cout << par->name << " = ";
+      cout.width( 6 );
+      cout.fill( '0' );
+      cout << par->descriptor;
+      ++par;
+   }
+   cout << endl;
+}
+
+//-------------------- Helper functions to redirect stdout ----------------
+// This function will duplicate the file descriptor for stdout, and keep
+// it for later. Then stdout is connected to the file given as arg.
+// The first time the function is run, it tries to find a temporary dir.
+// to use ( class could be used outside metview ).
+
+boolean redirect_6(const char *fname)
+{
+  cout << " redirect_6: redirect stdout into file " << fname << endl;
+  char *tmp_dir;
+  // Set the output dir. if it's not set.
+  if ( redirect_dir == string("") )
+    {
+      tmp_dir = getenv("METVIEW_TMPDIR");
+      if ( !tmp_dir )
+	{
+	  tmp_dir = getenv("TMPDIR");
+	  if ( !tmp_dir )
+	    redirect_dir = "/usr/tmp";
+	  else
+	    redirect_dir = tmp_dir;
+	}
+      else
+	redirect_dir = tmp_dir;
+    }
+
+  // Flush stdout before redirecting, to get rid of any pending output.
+  fflush(stdout);
+
+  new_fd = dup(STDOUT_FILENO);
+
+  cout << "new_fd: " << new_fd << endl;
+
+  close(STDOUT_FILENO);
+
+  string tmp_name;
+  tmp_name = redirect_dir + "/" + fname;
+  // As 1 is just closed, it will be the fd used.
+  // Will fail if stdin is explicitly closed and no fopens are done
+  if ( ! (fopen(tmp_name.c_str(),"w")) )
+    {
+	    cerr << "Problems opening file " << (const char*)tmp_name.c_str() << " for writing" << endl;
+      return false;
+    }
+
+  else
+    return true;
+}
+
+//
+// Will reconnect stdout by using a file descriptor saved from earlier.
+//
+boolean reconnect_6()
+{
+  // Make sure we get everything before closing.
+  fflush(NULL);
+  close(STDOUT_FILENO);
+
+  int ret = dup2( new_fd, STDOUT_FILENO );
+  close(new_fd);
+  if( ret < 0 )
+    {
+      cerr << " reconnect_6: reconnecting into stdout FAILED!" << endl;
+      cout << " reconnect_6: reconnecting into stdout FAILED!" << endl;
+      return false;
+    }
+  cout << " reconnect_6: reconnected into stdout!" << endl;
+  return ret > 0 ;
+}
+
+//
+// Read a file and write the contents to given stream
+//
+boolean file_to_stream(const char *fname,ostream &aStream,int skip)
+{
+  const int MAX_LINE_LEN = 512;
+  char      supposedToBeANewLine;
+  string    myTmpFileName;
+
+  myTmpFileName = redirect_dir + "/" + fname;
+
+  ifstream myTmpFile( myTmpFileName.c_str() );
+
+  if ( ! myTmpFile )
+    {
+	    aStream << "Can not read file " << (const char*)myTmpFileName.c_str() << endl;
+      return false;
+    }
+
+  char     myLine[ MAX_LINE_LEN ];
+
+  myTmpFile.get( myLine, MAX_LINE_LEN, '\n' );
+  myTmpFile.get( supposedToBeANewLine );
+  int i = 0;
+  while( myTmpFile && !myTmpFile.eof() )
+    {
+      if ( i++ >= skip )
+	aStream << myLine << endl;
+
+      myTmpFile.get( myLine, MAX_LINE_LEN, '\n' );
+      myTmpFile.get( supposedToBeANewLine );
+    }
+
+  myTmpFile.close();
+
+  return true;
+}
+
+void delete_print_file(const char *name)
+{
+  string fname = redirect_dir + "/" + name;
+  unlink(fname.c_str());
+}
+
+void eraseWhiteSpaceFromStringEnd(string &str)
+{
+   static string whitespaces (" \t\f\v\n\r");
+   size_t found=str.find_last_not_of(whitespaces);
+   if (found!=string::npos)
+       str.erase(found+1);
+   else
+       str.clear();
+}
+
+string intToString(int i)
+{
+	stringstream out;
+	out << i;
+	return out.str();
+}
+
+string floatToString(float f)
+{
+	stringstream out;
+	out << f;
+	return out.str();
+}
+
+void keyToStringMap(map<string,string> &data,string keyName,fortint *keyArray,int fortIndex)
+{
+	data[keyName]=intToString(keyArray[fortIndex-1]);
+}
+
+void keyToStringMap(map<string,string> &data,string keyName,float keyValue)
+{
+	data[keyName]=floatToString(keyValue);
+}
diff --git a/src/libMetview/MvObs.h b/src/libMetview/MvObs.h
new file mode 100644
index 0000000..4551648
--- /dev/null
+++ b/src/libMetview/MvObs.h
@@ -0,0 +1,25 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvObs.h,   vk july94
+//        rev vk 010724
+
+#ifndef MvObs_DEFINED_
+#define MvObs_DEFINED_
+
+#include "MvBufr.h"
+#include "MvBufrObs.h"
+#include "MvObsSet.h"
+
+#ifdef METVIEW_PREPBUFR
+# include "MvPrepBufrPrep.h"
+#endif
+
+#endif
+// MvObs_DEFINED_
diff --git a/src/libMetview/MvObsSet.cc b/src/libMetview/MvObsSet.cc
new file mode 100644
index 0000000..74f3f09
--- /dev/null
+++ b/src/libMetview/MvObsSet.cc
@@ -0,0 +1,1011 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvObsSet.cc,   vk July94
+//            rev vk 980306
+
+//--------------------------------------------------------------------
+//  MvObsSet hides the data structures and parameter driven subroutines
+//  needed to access BUFR files by wrapping them to a nicer C++ cover.
+//--------------------------------------------------------------------
+//  Routines and required data structures are described in
+//  ECMWF Meteorological Bulletin:
+//
+//  "Accessing GRIB and BUFR data."
+//       by J.D.Chambers
+//
+//  May 1994 Original version.
+//--------------------------------------------------------------------
+
+#include "inc_iostream.h"
+#include "MvObsSet.h"
+
+#ifdef METVIEW_PREPBUFR
+# include "MvPrepBufrPrep.h"
+#endif
+
+#ifndef METVIEW
+#include "grib_api.h"
+long _readbufr(FILE *f, char *b, long *l)  // from mars/tools.c
+{
+	size_t len = *l;
+	long e =  wmo_read_any_from_file(f,(unsigned char*)b,&len);
+	*l = len;
+	return e;
+}
+#endif
+
+int MAX_MESSAGE_LENGTH = 32000;
+
+const int    cMSG_TYPE_BUFR_TABLES = 11;
+
+static string WRITE("w");  // i/o mode
+
+//____________________________________________________________________
+//==================================================================== MvObsSet
+//____________________________________________________________________
+
+MvObsSet :: MvObsSet( const char *aName )
+ : _minTime( 2247, 6, 20 )
+ , _maxTime( 1799, 12, 31 )
+{
+   _IO_mode = "r";
+   _init( aName );
+}
+//____________________________________________________________________
+
+MvObsSet :: MvObsSet( const char *aName, const char *aMode )
+ : _minTime( 2247, 6, 20 )
+ , _maxTime( 1799, 12, 31 )
+{
+   _IO_mode = aMode;
+   _init( aName );
+}
+//____________________________________________________________________
+#ifdef METVIEW
+MvObsSet :: MvObsSet( MvRequest &aRequest, const char *aMode )
+ : _minTime( 2247, 6, 20 )
+ , _maxTime( 1799, 12, 31 )
+{
+   _IO_mode = aMode;
+   const char *aName = 0;
+   aRequest.getValue( aName, "PATH" );
+   _init( aName );
+}
+#endif
+//____________________________________________________________________
+
+MvObsSet :: ~MvObsSet()
+{
+   close();
+   delete [] _message;    // added 950201/vk
+   if( _bufrOut )
+     delete _bufrOut;
+#ifdef METVIEW_PREPBUFR
+   if( prepBufr_  )
+     delete prepBufr_;
+#endif
+
+}
+//____________________________________________________________________
+void
+MvObsSet :: _init( const  char *aName )
+{
+   _bufrFile = 0;
+   _msgCount = -1;
+   _obsCount = -1;
+   _msgNumber = -1;
+   _msgLen = 0;
+   _minMaxDone = false;
+  // _message = new char[ MAX_MESSAGE_LENGTH ];
+   _IO_buffer_OK = false;
+#ifdef METVIEW_PREPBUFR
+   isPrepBufrFile_ = false;
+   prepBufr_ = 0;
+#endif
+
+   Open( aName );
+
+   if( _IO_mode == WRITE )  //should be two classes!!!!!!! (but this a working one...)
+   {
+     _message = 0;
+     _bufrOut = new MvBufrOut( MAX_MESSAGE_LENGTH, this );  //( _message, MAX_MESSAGE_LENGTH, this );
+   }
+   else
+   {
+     _message = new char[ MAX_MESSAGE_LENGTH ];
+     _bufrOut = 0;
+
+#ifdef METVIEW_PREPBUFR
+#ifdef METVIEW
+     cout << "MvObsSet::_init - PrepBUFR support available, testing if PrepBUFR file..." << endl;
+#endif
+     firstObs_ = next();                    //-- check if PrepBUFR file (contains BUFR tables)
+     isPrepBufrFile_ = ( firstObs_.messageType() == cMSG_TYPE_BUFR_TABLES );
+     rewind();
+
+//aki:
+//  1) test if PrepBUFR tables have already been extracted: MV_PREPBUFR_TABLES_EXTRACTED
+//  2) extract only if not yet extracted
+     if( isPrepBufrFile_ && ! getenv("MV_PREPBUFR_TABLES_EXTRACTED") )
+     {
+        prepBufrFile();
+        putenv("MV_PREPBUFR_TABLES_EXTRACTED=YES");
+     }
+#else
+     cout << "MvObsSet::_init - PrepBUFR support NOT available!!!!" << endl;
+#endif
+   }
+   cout << "in MvObsSet::_init(" << aName << ")" << endl;
+}
+//____________________________________________________________________ setSubsetMax
+void
+MvObsSet :: setSubsetMax( int subsetMax )
+{
+  //_bufrOut->_maxNrSubsets = subsetMax; //replaced vk 941219
+  _bufrOut->setSubsetCount( subsetMax );
+}
+//____________________________________________________________________ Open
+boolean
+MvObsSet :: Open( const char* aFileName )
+{
+   _msgCount = -1;
+   _msgNumber = 0;
+
+   _bufrFile = fopen( aFileName, _IO_mode.c_str() );
+
+   if( _bufrFile )
+      return true;
+   else
+   {
+      cerr << " >>> MvObsSet::Open: file \'" << aFileName << "\', not opened!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "Unable to open file %s", aFileName );
+#endif
+      return false;
+   }
+}
+//____________________________________________________________________ close
+boolean
+MvObsSet :: close()
+{
+   long myReturnValue = -1;
+   if( _bufrFile )
+   {
+     if( _IO_mode == WRITE && _bufrOut->_outState == kBufrOut_dataInBuffers )
+     {
+       _bufrOut->encode();
+     }
+
+     myReturnValue = fclose( _bufrFile);
+     _bufrFile = 0;
+   }
+   _IO_buffer_OK = false;
+   return myReturnValue ? false : true;
+}
+//____________________________________________________________________ rewind
+void
+MvObsSet :: rewind()
+{
+   _msgNumber = 0;
+   if( _bufrFile )
+     ::rewind( _bufrFile );  // execute C command 'rewind'!
+   else
+     cerr << " >>> MvObsSet::rewind: File Unit not valid!" << endl;
+}
+
+//____________________________________________________________________ next
+// Reads next BUFR message and returns an MvObs constructed with it.
+// An MvObs without a message is returned at EOF.
+//------------------------------------------------
+MvObs
+MvObsSet::next()
+{
+   const int EOF_STATUS = -1;
+
+   if( ! _bufrFile )
+     return MvObs( NULL );  // nothing if file not ok
+
+   if( _IO_mode == WRITE )
+     return MvObs( NULL );  // no next when writing !
+
+   _msgLen = MAX_MESSAGE_LENGTH;
+
+   _msgNumber++;
+
+   long lastPos = ftell(_bufrFile);
+   long myError = _readbufr( _bufrFile, _message, &_msgLen );
+
+   if ( myError == -3 )  // Bufr too small
+     {
+
+       // Go back to previous and allocate memory
+       fseek(_bufrFile,lastPos,SEEK_SET);
+       delete [] _message;
+       MAX_MESSAGE_LENGTH = _msgLen + 8;
+       _message = new char[ MAX_MESSAGE_LENGTH ];
+       _msgLen = MAX_MESSAGE_LENGTH;
+
+       if ( ! _message )
+	 {
+	   cerr << "MvObsSet::next: Cannot allocate memory for next BUFR message" << endl;
+#ifdef METVIEW
+	   marslog( LOG_EROR, "Cannot allocate memory for next BUFR message" );
+#endif
+	   _msgLen = MAX_MESSAGE_LENGTH  = 0;
+	   _IO_buffer_OK = false;
+	   return MvObs( NULL );
+	 }
+       else
+	 {
+	   cout << "MvObsSet::next: Allocated more memory for BUFR msg" << endl;
+	   myError = _readbufr( _bufrFile, _message, &_msgLen );
+	 }
+     }
+
+   if( myError )
+     {
+       if( myError != EOF_STATUS )
+	 {
+	   cerr << "MvObsSet::next: Failed reading next BUFR msg, returned status=" << myError << endl;
+#ifdef METVIEW
+	   marslog( LOG_EROR, "Failed reading next BUFR msg, status = %ld", myError );
+#endif
+	 }
+       _IO_buffer_OK = false;
+       return MvObs( NULL );
+     }
+
+#ifdef METVIEW_PREPBUFR
+   //--
+   //-- NCEP PrepBUFR files may contain msgs with ZERO subsets!!!
+   //-- 'bufrex' cannot handle such illegal msgs, if so we must skip it
+   //--
+   MvBufr tmpBufr( _message, _msgLen, _msgNumber  ); //-- make BUFR octets into an object
+   if( tmpBufr.subsetCount() == 0 )
+     {
+       ostringstream os;
+       os << "Original BUFR msg " << _msgNumber
+          << " has ZERO subsets - ignoring (not counting) this illegal msg!"
+          << ends;
+
+       cout << os.str() << endl;
+
+#ifdef METVIEW
+       //-- why this marslog crashes ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+//       marslog( LOG_WARN, "%s", os.str().c_str() );
+       //-- why this marslog crashes ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
+#endif
+
+       //-- get next msg and cross your fingers it fits into current _message array
+       _msgLen = MAX_MESSAGE_LENGTH;
+       myError = _readbufr( _bufrFile, _message, &_msgLen );
+
+       //_msgNumber++;
+     }
+#endif
+
+     _IO_buffer_OK = true;
+     return MvObs( new MvBufr( _message, _msgLen, _msgNumber ) );
+}
+
+//____________________________________________________________________ add
+void
+MvObsSet::add( MvObs& anObs )
+{
+   if( _IO_mode != WRITE )
+     return;  // no add when reading !
+
+   _bufrOut->add( anObs );
+   _msgCount++; //??
+}
+//____________________________________________________________________ write
+void
+MvObsSet::write( const char* aMsg, int aMsgLen )
+{
+  if( _IO_mode != WRITE )
+    return;  // no write when reading !
+
+  fwrite( aMsg, sizeof( char ), aMsgLen, _bufrFile );
+  _msgNumber++;
+}
+
+//____________________________________________________________________ messageCount
+// Returns the number of BUFR messages found in the file.
+// WARNING: a packed BUFR message may contain several observations
+//          i.e. the nr of BUFR msgs found <= nr of observation msgs
+//          i.e. messageCount() <= obsCount()
+//------------------------------------------------------------------
+int
+MvObsSet :: messageCount()
+{
+   if( _msgCount < 1 )
+   {
+      if( _bufrFile )
+      {
+         long myOriginalFilePos = ftell( _bufrFile );
+	 rewind();
+
+         _msgCount = 0;
+         while( next() )
+	    _msgCount++;
+
+	 fseek( _bufrFile, myOriginalFilePos, SEEK_SET );
+      }
+   }
+   return _msgCount;
+}
+//____________________________________________________________________ obsCount
+int
+MvObsSet :: obsCount()
+{
+   if( _obsCount < 1 )
+   {
+      if( _bufrFile )
+      {
+         long myOriginalFilePos = ftell( _bufrFile );
+	 rewind();
+
+         _obsCount = 0;
+	 MvObs oneBufrMsg;
+         while( ( oneBufrMsg = next() ) )
+	    _obsCount += oneBufrMsg._bufrIn->subsetCount();
+
+	 fseek( _bufrFile, myOriginalFilePos, SEEK_SET );
+      }
+   }
+   return _obsCount;
+}
+//_________________________________________________________ searchMinMaxTime
+void
+MvObsSet :: searchMinMaxTime()
+{
+   if( ! _minMaxDone )
+   {
+      if( _bufrFile )
+      {
+         long myOriginalFilePos = ftell( _bufrFile );   rewind();
+
+         TDynamicTime msgTime;
+         MvObs myObs;
+         while( ( myObs = next() ) )
+         {
+            msgTime = myObs.msgTime();
+            if( msgTime > _maxTime )
+                _maxTime = msgTime;
+            if( msgTime < _minTime )
+                _minTime = msgTime;
+         }
+
+         fseek( _bufrFile, myOriginalFilePos, SEEK_SET );
+
+      }
+      _minMaxDone = true;
+   }
+}
+#ifdef METVIEW_PREPBUFR
+//____________________________________________________________________ prepBufrFile
+bool
+MvObsSet::prepBufrFile()
+{
+   if( isPrepBufrFile_ )
+   {
+#ifdef METVIEW
+      cout << "in MvObsSet::prepBufrFile()" << endl;
+      marslog( LOG_INFO, "BUFR file contains BUFR tables, processing..." );
+#endif
+                                            //-- create new PrepBUFR table files etc...
+      prepBufr_ = new MvPrepBufrPrep( *this );
+      bool ok = prepBufr_->prepareAll();
+      if( !ok )
+      {
+#ifdef METVIEW
+         marslog( LOG_EROR, "Unable to process PrepBUFR file" );
+#endif
+         cerr << "Errors: unable to process the PrepBUFR file" << endl;
+         return false;
+      }
+   }
+   return isPrepBufrFile_;
+}
+#endif
+
+//____________________________________________________________________ minDate
+#ifdef METVIEW
+MvDate
+MvObsSet :: minDate()
+{
+   searchMinMaxTime();
+   double timfloat = 10000.0L*(double)_minTime.GetYear()
+                     + 100.0L*(double)_minTime.GetMonth()
+                     +        (double)_minTime.GetDay()
+                     +        (double)_minTime.GetHour()/24.0L
+                     +        ((double)_minTime.GetMin()+0.5L)/60.0L/24.0L; //rounded
+   return MvDate( timfloat );
+}
+//____________________________________________________________________ maxDate
+MvDate
+MvObsSet :: maxDate()
+{
+   searchMinMaxTime();
+   double timfloat = 10000.0L*(double)_maxTime.GetYear()
+                     + 100.0L*(double)_maxTime.GetMonth()
+                     +        (double)_maxTime.GetDay()
+                     +        (double)_maxTime.GetHour()/24.0L
+                     +        ((double)_maxTime.GetMin()+0.5L)/60.0L/24.0L; //rounded
+   return MvDate( timfloat );
+}
+#endif
+
+/*-------
+//____________________________________________________________________ operator +=
+// use 'add' member function instead!
+void
+MvObsSet :: operator += ( MvObs anObs )
+{
+   if( _IO_mode == "r" )
+     return;  // no writing for read files !
+
+   cout << "MvObsSet::operator+= not yet implemented..." << endl;
+}
+-------*/
+//___________________________________________________________________
+//=================================================================== MvObsSetIterator
+//___________________________________________________________________
+
+MvObsSetIterator :: MvObsSetIterator( MvObsSet& s)
+{
+   ObsSet = &s;
+
+   _NoFiltersSet = true;
+   _TimeFilterState = kTFS_notSet;
+   _WmoBlockCount = 0;
+   _WmoStationCount = 0;
+   _MsgTypeCount = 0;
+   _MsgSubtypeCount = 0;
+   _SelectState = SF_notSet;
+   _SelectValueCount = 0;
+   useObsTime_ = false;
+}
+//___________________________________________________________________
+
+MvObsSetIterator :: ~MvObsSetIterator()
+{
+}
+//___________________________________________________________________ operator()
+
+
+MvObs MvObsSetIterator :: operator() ( ENextReturn returnType )
+{
+  if( ! current || ( returnType == NR_returnMsg ) || ! current.Advance() )
+    next();
+
+  while( current && ! AcceptedObs( current ) )
+  {
+    if( ! current || ( returnType == NR_returnMsg ) || ! current.Advance() )
+      next();
+  }
+  return current;
+}
+//____________________________________________________________________ next
+
+void
+MvObsSetIterator :: next()
+{
+  static int change_me_with_debugger = 0;
+
+  current = ObsSet->next();
+
+#ifdef METVIEW
+  if( mars.debug && ( ( ObsSet->messageNumber() == 1 ) || change_me_with_debugger ) )
+    current.printAllValues();
+#endif
+}
+//____________________________________________________________________ setTime
+
+void
+MvObsSetIterator :: setTime( const TDynamicTime& anObsTime )
+{
+   setTimeRange( anObsTime, anObsTime );
+}
+//____________________________________________________________________
+
+void
+MvObsSetIterator :: setTimeRange( const TDynamicTime& anObsTime, short deltaInMinutes )
+{
+   fBeginTime = fEndTime = anObsTime;
+   fBeginTime.ChangeByMinutes( -deltaInMinutes );
+   fEndTime.ChangeByMinutes( deltaInMinutes );
+   _TimeFilterState = kTFS_bothSet;
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setTimeRange( const TDynamicTime& aBeginTime, const TDynamicTime& anEndTime )
+{
+   fBeginTime = aBeginTime;
+   fEndTime = anEndTime;
+   _TimeFilterState = kTFS_bothSet;
+   _NoFiltersSet = false;
+}
+//_____________________________________________________________ setTimeRangeWithoutDate
+// add 941229/vk
+//
+// parameters: in format HHMM, i.e. 1200 == 12.00, 15 == 0.15, i.e. 100*hour+min!!!
+//             values are normalized into range [0000..2400)
+//_________________________________________
+void
+MvObsSetIterator :: setTimeRangeWithoutDate( int aBegin, int anEnd )
+{
+   TDynamicTime aTime;  // date part is not used, so let's use today..
+   int myBegin = aBegin;
+   int myEnd   = anEnd;
+
+   while( myBegin < 0 ) myBegin += 2400;
+   aTime.SetTime( myBegin / 100, myBegin % 100, 0 );
+   fBeginTime = aTime;
+
+   while( myEnd >= 2400 ) myEnd -= 2400;
+   aTime.SetTime( myEnd / 100, myEnd % 100, 0 );
+   fEndTime = aTime;
+
+   _TimeFilterState = kTFS_clockSet;
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setWmoBlock( int aWmoBlockNumber )
+{
+   if( _WmoBlockCount >= MAX_FILTER_LIST_ARRAY_SIZE )
+   {
+      cerr << ">>> MvObsIterator::setWmoBlock: array overflow!!!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "MvObsIterator::setWmoBlock: array overflow!" );
+#endif
+      return;
+   }
+   _WmoBlockNumber[ _WmoBlockCount++ ] = aWmoBlockNumber;
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setWmoStation( long aWmoStation )
+{
+   if( _WmoStationCount >= MAX_FILTER_LIST_ARRAY_SIZE )
+   {
+      cerr << ">>> MvObsIterator::setWmoStation: array overflow!!!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "MvObsIterator::setWmoStation: array overflow!" );
+#endif
+      return;
+   }
+   _WmoStation[ _WmoStationCount++ ] = aWmoStation;
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: select( long aDescriptor
+			  , float aValue )
+{
+   if( _SelectValueCount >= MAX_FILTER_LIST_ARRAY_SIZE )
+   {
+      cerr << ">>> MvObsIterator::select: array overflow!!!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "MvObsIterator::select: array overflow!" );
+#endif
+      return;
+   }
+   if( _SelectValueCount > 0 && aDescriptor != _SelectDescriptor )
+   {
+      cerr << ">>> MvObsIterator::select: changing the descriptor while building the list!!!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "MvObsIterator::select: changing the descriptor while building the list!" );
+#endif
+   }
+  _SelectDescriptor = aDescriptor;
+  _SelectValue[ _SelectValueCount++ ] = aValue;
+  _SelectState = SF_listSet;
+  _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: selectRange( long aDescriptor
+			       , float firstValue
+			       , float secondValue )
+{
+  _SelectDescriptor = aDescriptor;
+  _SelectValue[ 0 ] = firstValue < secondValue ? firstValue : secondValue;
+  _SelectValue[ 1 ] = secondValue > firstValue ? secondValue : firstValue;
+  _SelectValueCount = 2;
+  _SelectState = SF_rangeSet;
+  _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: excludeRange( long aDescriptor
+			        , float firstValue
+			        , float secondValue )
+{
+  _SelectDescriptor = aDescriptor;
+  _SelectValue[ 0 ] = firstValue < secondValue ? firstValue : secondValue;
+  _SelectValue[ 1 ] = secondValue > firstValue ? secondValue : firstValue;
+  _SelectValueCount = 2;
+  _SelectState = SF_excludeRangeSet;
+  _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setXSectionLine( const MvLocation& aStartPoint
+			      , const MvLocation& anEndPoint
+			      , float aDeltaInMeters )
+{
+   fXSectionLine.setLine( aStartPoint, anEndPoint );
+   fXSectionLine.setMaxDelta( aDeltaInMeters );
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setArea( const MvLocation& aCorner1, const MvLocation& aCorner2 )
+{
+   fArea.set( aCorner1, aCorner2 );
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setMessageType( int aMsgType )
+{
+   if( _MsgTypeCount >= MAX_FILTER_LIST_ARRAY_SIZE )
+   {
+      cerr << ">>> MvObsIterator::setMessageType: array overflow!!!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "MvObsIterator::setMessageType: array overflow!" );
+#endif
+      return;
+   }
+   _MsgType[ _MsgTypeCount++ ] = aMsgType;
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+void
+MvObsSetIterator :: setMessageSubtype( int aMsgSubtype )
+{
+   if( _MsgSubtypeCount >= MAX_FILTER_LIST_ARRAY_SIZE )
+   {
+      cerr << ">>> MvObsIterator::setMessageSubtype: array overflow!!!" << endl;
+#ifdef METVIEW
+      marslog( LOG_EROR, "MvObsIterator::setMessageSubtype: array overflow!" );
+#endif
+      return;
+   }
+   _MsgSubtype[ _MsgSubtypeCount++ ] = aMsgSubtype;
+   _NoFiltersSet = false;
+}
+//____________________________________________________________________
+float
+MvObsSetIterator :: distanceFromXSectionLine( const MvLocation& aPoint )
+{
+   if( fXSectionLine.startPoint().latitude() == MISSING_LOC_VALUE )
+   {
+      return MISSING_LOC_VALUE;
+   }
+   return fXSectionLine.deltaInMeters( aPoint );
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: TimeOk( MvObs *anObs ) const
+{
+   switch( _TimeFilterState )
+   {
+   case kTFS_notSet:
+     break;   //return true;
+
+   case kTFS_clockSet:
+     {
+       long obsTime;
+       if( useObsTime_ )
+	 obsTime = anObs->obsTime().ClockInSeconds();  //-- need to decode => slow
+       else
+	 obsTime = anObs->msgTime().ClockInSeconds();  //-- use metadata => fast
+
+       long time1 = fBeginTime.ClockInSeconds();
+       long time2 = fEndTime.ClockInSeconds();
+
+       if( time1 <= time2 )        // e.g.  12-18
+       {
+         if( obsTime < time1 || obsTime > time2 )
+	   return false;
+       }
+       else    // time1 > time2       e.g.  21-03
+       {
+          if( obsTime < time1 && obsTime > time2 )
+	    return false;
+       }
+     }
+     break;
+
+   case kTFS_bothSet:
+     {
+       TDynamicTime myTime;
+       if( useObsTime_ )
+	 myTime = anObs->obsTime();  //-- time from obs => decode first => slow
+       else
+	 myTime = anObs->msgTime();  //-- time from sec1 => no decode => fast
+
+       if( myTime < fBeginTime || myTime > fEndTime )
+          return false;
+     }
+     break;
+   }
+
+   return true;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: WmoBlockOk( MvObs *anObs ) const
+{
+  if( _WmoBlockCount < 1 )
+    return true;
+
+  for( int i = 0; i < _WmoBlockCount; i++ )
+    if( anObs->WmoBlockNumber() == _WmoBlockNumber[ i ] )
+      return true;
+
+  return false;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: WmoStationOk( MvObs *anObs ) const
+{
+   if( _WmoStationCount < 1 )
+      return true;
+
+  for( int i = 0; i < _WmoStationCount; i++ )
+    if( anObs->WmoIdentNumber() == _WmoStation[ i ] )
+      return true;
+
+  return false;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: WithinXSectionLine( MvObs *anObs ) const
+{
+   if( fXSectionLine.maxDelta() < 0 )    // not set ?
+      return true;
+
+   if( fXSectionLine.withinDelta( anObs->location() ) )
+     return true;
+   else
+     return false;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: InsideArea( MvObs *anObs ) const
+{
+   if( fArea.lowerLeft().latitude() == MISSING_LOC_VALUE )
+     return true;
+   else
+     return fArea.inside( anObs->location() );
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: msgTypeOk( MvObs *anObs ) const
+{
+   if( _MsgTypeCount < 1 )
+      return true;
+
+  for( int i = 0; i < _MsgTypeCount; i++ )
+    if( anObs->messageType() == _MsgType[ i ] )
+      return true;
+
+  return false;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: msgSubtypeOk( MvObs *anObs ) const
+{
+   if( _MsgSubtypeCount < 1 )
+      return true;
+
+  for( int i = 0; i < _MsgSubtypeCount; i++ )
+    if( anObs->messageSubtype() == _MsgSubtype[ i ] )
+      return true;
+
+  return false;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: selectOk( MvObs *anObs ) const
+{
+  if( _SelectState == SF_notSet )
+    return true;
+
+  float myValue = anObs->value( _SelectDescriptor );
+  if( myValue == kBufrMissingValue )
+    return false;
+
+  switch( _SelectState )
+  {
+    case SF_notSet:
+
+        break;
+
+    case SF_listSet:
+
+        {
+          for( int i = 0; i < _SelectValueCount; i++ )
+            if( myValue == _SelectValue[ i ] )
+              return true;
+        }
+        return false;
+
+    case SF_rangeSet:
+
+        if( myValue < _SelectValue[ 0 ] || myValue > _SelectValue[ 1 ] )
+          return false;
+        break;
+
+    case SF_excludeRangeSet:
+
+        if( myValue >= _SelectValue[ 0 ] && myValue <= _SelectValue[ 1 ] )
+          return false;
+        break;
+
+  }
+  return true;
+}
+//____________________________________________________________________
+boolean
+MvObsSetIterator :: AcceptedObs( MvObs& anObs ) const
+{
+   if( _NoFiltersSet )
+      return true;
+
+   if( ! msgTypeOk( &anObs ) )         // from Section 1: no decoding required
+      return false;
+   if( ! msgSubtypeOk( &anObs ) )      // from Section 1: no decoding required
+      return false;
+
+   if( ! TimeOk( &anObs ) )            // from Section 1: no decoding required
+      return false;
+
+   if( ! WmoBlockOk( &anObs ) )        // others require decoding of the msg
+      return false;
+   if( ! WmoStationOk( &anObs ) )
+      return false;
+
+   if( ! selectOk( &anObs ) )
+      return false;
+
+   if( ! WithinXSectionLine( &anObs ) )
+      return false;
+
+   if( ! InsideArea( &anObs ) )
+      return false;
+
+   return true;
+}
+//_____________________________________________________________ operator<<
+
+ostream& operator<< ( ostream& aStream, const MvObsSetIterator& aFilter )
+{
+ int i;
+
+  aStream << "Observation Filter values set:\n";
+  if( aFilter._NoFiltersSet )
+  {
+    aStream << "   No filter values set!";
+    aStream << endl;
+  }
+  else
+  {
+    if( aFilter._TimeFilterState != kTFS_notSet )
+    {
+      aStream << "   Timerange: ";
+      switch( aFilter._TimeFilterState )
+      {
+      case kTFS_notSet:
+        aStream << "[not set!]";
+        break;
+
+      case kTFS_clockSet:
+        aStream << aFilter.fBeginTime.GetHour() << ".";
+        aStream.width(2); aStream.fill('0');
+        aStream << aFilter.fBeginTime.GetMin();
+        if( aFilter.fBeginTime != aFilter.fEndTime )
+        {
+          aStream << " - " << aFilter.fEndTime.GetHour() << ".";
+          aStream.width(2); aStream.fill('0');
+          aStream << aFilter.fEndTime.GetMin();
+        }
+        break;
+
+      case kTFS_bothSet:
+        aStream << aFilter.fBeginTime;
+        if( aFilter.fBeginTime != aFilter.fEndTime )
+          aStream << " - " << aFilter.fEndTime;
+        break;
+      }
+      aStream << endl;
+    }
+
+    if( aFilter._MsgTypeCount > 0 )
+    {
+      aStream << "   Message types: ";
+      for( i=0; i < aFilter._MsgTypeCount; i++ )
+        aStream << " " << aFilter._MsgType[ i ];
+      aStream << endl;
+    }
+
+    if( aFilter._MsgSubtypeCount > 0 )
+    {
+      aStream << "   Message subtypes: ";
+      for( i=0; i < aFilter._MsgSubtypeCount; i++ )
+        aStream << " " << aFilter._MsgSubtype[ i ];
+      aStream << endl;
+    }
+
+    if( aFilter._WmoBlockCount > 0 )
+    {
+      aStream << "   WMO Blocks:";
+      for( i=0; i < aFilter._WmoBlockCount; i++ )
+        aStream << " " << aFilter._WmoBlockNumber[ i ];
+      aStream << endl;
+    }
+
+    if( aFilter._WmoStationCount > 0 )
+    {
+      aStream << "   WMO Stations:";
+      for( i=0; i < aFilter._WmoStationCount; i++ )
+        aStream << " " << aFilter._WmoStation[ i ];
+      aStream << endl;
+    }
+
+    if( aFilter._SelectState != SF_notSet )
+    {
+      aStream << "   Select ";
+      switch( aFilter._SelectState )
+      {
+       case SF_notSet:
+         aStream << "by values/range: [not set!]";
+         break;
+
+       case SF_listSet:
+         aStream << "by values: ";
+         break;
+
+       case SF_rangeSet:
+         aStream << "by range: ";
+         break;
+
+       case SF_excludeRangeSet:
+         aStream << "by excluding range: ";
+         break;
+      }
+
+      for( i=0; i < aFilter._SelectValueCount; i++ )
+        aStream << aFilter._SelectValue[ i ] << " ";
+      aStream << "(descr. " << aFilter._SelectDescriptor << ")";
+      aStream << endl;
+    }
+
+    if( aFilter.fXSectionLine.startPoint().latitude() != MISSING_LOC_VALUE )
+    {
+      aStream << "   Cross Section Line: " << aFilter.fXSectionLine;
+      aStream << endl;
+    }
+
+    if( aFilter.fArea.lowerLeft().latitude() != MISSING_LOC_VALUE )
+    {
+      aStream << "   Area: " << aFilter.fArea;
+      aStream << endl;
+    }
+   // aStream << endl;  // calling method should add the final 'endl'!
+  }
+  return aStream;
+}
diff --git a/src/libMetview/MvObsSet.h b/src/libMetview/MvObsSet.h
new file mode 100644
index 0000000..fd67393
--- /dev/null
+++ b/src/libMetview/MvObsSet.h
@@ -0,0 +1,337 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvObsSet.h
+
+
+#ifndef MvObsSet_DEFINED
+#define MvObsSet_DEFINED
+
+//-- <aki> temporarily for testing only; should be done via 'configure'
+#define METVIEW_PREPBUFR
+
+#include "MvBufrObs.h"
+
+class MvPrepBufrPrep;
+
+//--------------------------------------------------------------- MvObsSet
+//! A class to access a file containing observation reports
+/*! This class is used to handle a file containing several
+ *  observation reports stored as BUFR messages.
+ */
+class MvObsSet
+{
+ friend class MvObsSetIterator;
+ friend class MvBufrOut;
+
+	// prevent copy
+
+	MvObsSet( const MvObsSet& );
+	void operator= ( const MvObsSet& );
+	void _init( const char* aFile );
+
+ public:
+
+//! Constructor with the input BUFR file name as an argument
+   MvObsSet( const char* fileName );
+
+//! Constructor with a BUFR file name and access mode as arguments
+/*! This constructor can be used for writing to a file, use
+ *  access mode "w" or "a".
+ */
+   MvObsSet( const char* fileName, const char* accessMode );
+
+#ifdef METVIEW
+//! Constructor with a BUFR request and access mode as arguments
+    MvObsSet( MvRequest&, const char* aMode = "r" );
+
+//! Returns the minimum (earliest) date found in MvObsSet
+    MvDate  minDate();
+
+//! Returns the maximum (latest) date found in MvObsSet
+    MvDate  maxDate();
+#endif
+
+//! Destructor
+   ~MvObsSet();
+
+//! Set max subset count for a new file
+      void  setSubsetMax( int subsetMax );
+
+//! Add one observation report to output file
+      void  add( MvObs& anObs );
+
+//! Rewind the input file
+      void  rewind();
+
+//! Returns the number of BUFR messages in the input file
+/*! This number is smaller than returned by method obsCount()
+ *  if the input file contains multisubset BUFR messages.
+ */
+       int  messageCount(); // nr of BUFR-messages in a file
+
+//! Returns the number of observation reports in the input file
+/*! This number is bigger than returned by method messageCount()
+ *  if the input file contains multisubset BUFR messages.
+ */
+       int  obsCount();     // nr of observation messages in a BUFR-file
+
+//! Returns the (running) number of the current BUFR message
+       int  messageNumber(){ return (int)_msgNumber; }
+
+//! Closes the input/output file
+   boolean  close();
+
+//! Prepares 'PrepBUFR' tables if the input file contains BUFR tables
+      bool  prepBufrFile();
+
+            //-- hack for ObsFilter (vk 970729) --
+      void  write( MvObs& anObs ){ if(_bufrOut) _bufrOut->write( anObs ); }
+
+     MvObs& firstObs(){ return firstObs_; }
+
+ protected:
+     MvObs  next();
+   boolean  Open( const char* fileName );  //, char* aMode = "r" );
+      void  write( const char* aMsg, int aMsgLen );
+      void  searchMinMaxTime();
+ //Logical  currentInputBufferOK() {return _IO_buffer_OK;}
+
+ protected:
+     string  _IO_mode;
+       FILE* _bufrFile;
+       long  _msgNumber;
+       long  _msgCount;
+       long  _obsCount;
+   TDynamicTime  _minTime;
+   TDynamicTime  _maxTime;
+    boolean  _minMaxDone;
+       long  _msgLen;
+       char* _message;
+       bool  _IO_buffer_OK;
+
+  MvPrepBufrPrep* prepBufr_;
+       bool  isPrepBufrFile_;
+      MvObs  firstObs_;
+
+  MvBufrOut* _bufrOut;
+};
+
+//------------------------------------------------------------------------------
+
+const int MAX_FILTER_LIST_ARRAY_SIZE = 100;
+
+//! \enum ENextReturn Mnemonic names to define subset access
+/*! Used in MvObsSetIterator::operator() to tell which
+ *  observation report to return. \n \n
+ *  Use NR_returnMsg to skip the remaining observation reports
+ *  in a multisubset BUFR message that does not contain<aki>
+ *  These mnemonics have an effect only on multisubset
+ *  BUFR messages. For single subset BUFR messages both
+ *  mnemonics function the same.
+ */
+enum ENextReturn
+{
+   NR_returnObs  /**< - return the next available subset (from this or the next BUFR msg */
+  ,NR_returnMsg  /**< - return the first subset from the next BUFR message */
+};
+
+//! \enum ESelectFilterState Used internally by MvObsSetIterator
+enum ESelectFilterState
+{
+   SF_notSet
+  ,SF_listSet
+  ,SF_rangeSet
+  ,SF_excludeRangeSet
+};
+
+//! \enum ETimeFilterState Used internally by MvObsSetIterator
+enum ETimeFilterState
+{
+   kTFS_notSet
+  ,kTFS_clockSet
+  ,kTFS_bothSet
+};
+
+//------------------------------------------------------------ MvObsSetIterator
+//! A class to filter a set of observation reports
+/*! This class is used to filter a file containing several
+ *  observation reports stored in BUFR messages. Several
+ *  different filtering criteria are available. When several
+ *  filtering criteria are set the resulting filter will use
+ *  logical AND to combine different criteria.
+ */
+class MvObsSetIterator
+{
+//! Writes the current filtering options of 'anIter' into stream 'aStream'
+ friend ostream& operator<< ( ostream& aStream, const MvObsSetIterator& anIter );
+
+	MvObs     current;
+	MvObsSet* ObsSet;
+
+ public:
+//! Constructor with a MvObset as an argument
+	MvObsSetIterator( MvObsSet& );
+//! Destructor
+	~MvObsSetIterator();
+
+//! Operator that returns the next available valid observation report
+/*! Subset structure is hidden from the calling application.
+ */
+	MvObs operator() () { return operator()( NR_returnObs ); }
+
+//! Operator that returns the next valid observation report
+/*! Using mnemonic argument 'NR_returnMsg' accesses only first
+ *  subsets in multisubset BUFR messages. See enum ENextReturn.
+ */
+	MvObs operator() ( ENextReturn returnType );
+
+//! Returns the sequence number of the current BUFR message
+     int   msgNumber() { return (ObsSet ? (int)ObsSet->_msgNumber : -1); }
+
+//! Returns the subset number of the current observation report in the BUFR message
+     int   subsetNumber() { return current.subsetNumber(); }
+
+//! Defines where the date/time for filtering should be taken from
+/*! Date and time information is always available as metadata in
+ *  BUFR section 1, and normally also in the data (observation report)
+ *  itself. In single subset messages these times should be the same,
+ *  but for some multisubset messages observation reports may come from
+ *  different times. \n \n
+ *  The default is to use date/time from the metadata in section 1 (faster),
+ *  but by calling this method it is possible to change to use date/time
+ *  from the data.
+ */
+     void  useObsTime( bool b = true ){ useObsTime_ = b; }
+
+//! Set the filtering criteria for a single date/time
+     void  setTime( const TDynamicTime& anObsTime );
+
+//! Set the filtering criteria for a date/time range
+/*! Observation reports that have their data/time within the range
+ *  'anObsTime'-'deltaInMinutes' and 'anObsTime'+'deltaInMinutes'
+ *  will be selected.
+ */
+     void  setTimeRange( const TDynamicTime& anObsTime, short deltaInMinutes );
+
+//! Set the filtering criteria for a date/time range
+     void  setTimeRange( const TDynamicTime& aBeginTime, const TDynamicTime& anEndTime );
+
+//! Set the filtering criteria for time range only (date ignored)
+/*! Observation reports that have their time stamp between 'aBeginTime'
+ *  and 'anEndTime' will be selected. \n \n
+ *  Time format is HHMM, i.e. 100*hours+minutes. Thus the value 1500
+ *  signifies 3PM, and the value 15 signifies 15 mins past midnight.
+ */
+     void  setTimeRangeWithoutDate( int aBegin, int anEnd );
+
+//! Set the filtering criteria for accepted WMO block numbers
+/*! This method can be called several times in order to set
+ *  more than one accepted WMO block, i.e. WMO blocks are
+ *  combined with logical OR operator.
+ */
+     void  setWmoBlock( int aWmoBlock );
+
+//! Set the filtering criteria for accepted WMO station numbers
+/*! This method can be called several times in order to set
+ *  more than one accepted WMO station, i.e. WMO stations are
+ *  combined with logical OR operator.
+ */
+     void  setWmoStation( long aWmoStation );
+
+//! Set the filtering criteria for an accepted area
+/*! Observation report locations must be within the given area.
+ */
+     void  setArea( const MvLocation& aCorner1, const MvLocation& aCorner2 );
+
+//! Set filtering criteria for a proximity of a cross section line
+     void  setXSectionLine( const MvLocation& aStartPoint
+			  , const MvLocation& anEndPoint
+			  , float aDeltaInMeters );
+
+//! Set the filtering criteria for accepted BUFR message types
+/*! This method can be called several times in order to set
+ *  more than one accepted BUFR message type, i.e. message types are
+ *  combined with logical OR operator.
+ */
+     void  setMessageType( int aMsgType );
+
+//! Set the filtering criteria for accepted BUFR message local subtypes
+/*! This method can be called several times in order to set
+ *  more than one accepted BUFR message local subtype, i.e. message subtypes
+ *  are combined with logical OR operator.
+ */
+     void  setMessageSubtype( int aMsgSubtype );
+
+//! Set the filtering criteria for data 'aDescriptor' having value 'aValue'
+/*! Observation reports where the data corresponding to descriptor 'aDescriptor'
+ *  has value 'aValue' will be selected.\n \n
+ *  This method can be called several times in order to set more than one
+ *  accepted value for the same 'aDescriptor', i.e. values are
+ *  combined with logical OR operator.
+
+ */
+     void  select( long aDescriptor
+		 , float aValue );
+
+
+//! Set the filtering criteria for the given data having its value within a range
+/*! Observation reports where the data corresponding to descriptor 'aDescriptor'
+ *  has its value in the range 'firstValue'...'secondValue' will be selected.
+ */
+     void  selectRange( long aDescriptor
+		      , float firstValue
+		      , float secondValue );
+
+//! Set the filtering criteria for the given data having its value outside a range
+/*! Observation reports where the data corresponding to descriptor 'aDescriptor'
+ *  has its value outside the range 'firstValue'...'secondValue' will be selected.
+ */
+     void  excludeRange( long aDescriptor
+		       , float firstValue
+		       , float secondValue );
+
+ protected:
+
+     void  next();
+  boolean  AcceptedObs( MvObs& anObs ) const;
+  boolean  TimeOk( MvObs* anObs ) const;
+  boolean  WmoBlockOk( MvObs* anObs ) const;
+  boolean  WmoStationOk( MvObs* anObs ) const;
+  boolean  WithinXSectionLine( MvObs* anObs ) const;
+  boolean  msgTypeOk( MvObs* anObs ) const;
+  boolean  msgSubtypeOk( MvObs* anObs ) const;
+  boolean  InsideArea( MvObs* anObs ) const;
+  boolean  selectOk( MvObs* anObs ) const;
+    float  distanceFromXSectionLine( const MvLocation& aPoint ); //-- used anywhere?
+
+ protected:
+         boolean  _NoFiltersSet;
+	    bool  useObsTime_;
+        TDynamicTime  fBeginTime, fEndTime;
+      // boolean  fTimeFilterSet;
+ETimeFilterState  _TimeFilterState;
+	     int  _WmoBlockCount;
+             int  _WmoBlockNumber[ MAX_FILTER_LIST_ARRAY_SIZE ];
+	     int  _WmoStationCount;
+            long  _WmoStation[ MAX_FILTER_LIST_ARRAY_SIZE ];
+  MvXSectionLine  fXSectionLine;
+          MvArea  fArea;
+	     int  _MsgTypeCount;
+	     int  _MsgType[ MAX_FILTER_LIST_ARRAY_SIZE ];
+	     int  _MsgSubtypeCount;
+	     int  _MsgSubtype[ MAX_FILTER_LIST_ARRAY_SIZE ];
+ ESelectFilterState _SelectState;
+	    long  _SelectDescriptor;
+	   float  _SelectValue[ MAX_FILTER_LIST_ARRAY_SIZE ];
+	     int  _SelectValueCount;
+};
+
+#endif
+// MvObsSet_DEFINED
diff --git a/src/libMetview/MvObsUtil.cc b/src/libMetview/MvObsUtil.cc
new file mode 100644
index 0000000..92e1f08
--- /dev/null
+++ b/src/libMetview/MvObsUtil.cc
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include "MvObsUtil.h"
+#include "MvObsSet.h"
+
+
+//-----
+//-- this lonely wolf is here because both GKS and libFTimeUtil (used by
+//-- MvObs) define type Int => NAME CLASH!
+//-----
+
+MvDate  minObsTime( const Cached& filename )
+{
+	MvObsSet  myObsSet( filename );
+
+	return    myObsSet.minDate();
+}
+
+
+MvDate  maxObsTime( const Cached& filename )
+{
+	MvObsSet  myObsSet( filename );
+
+	return    myObsSet.maxDate();
+}
diff --git a/src/libMetview/MvObsUtil.h b/src/libMetview/MvObsUtil.h
new file mode 100644
index 0000000..53fb817
--- /dev/null
+++ b/src/libMetview/MvObsUtil.h
@@ -0,0 +1,20 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef _MVOBSUTIL_H_
+#define _MVOBSUTIL_H_
+
+#include "MvDate.h"
+#include "Cached.h"
+
+MvDate  minObsTime( const Cached& filename );
+MvDate  maxObsTime( const Cached& filename );
+
+#endif
+
diff --git a/src/libMetview/MvPrepBufrPrep.cc b/src/libMetview/MvPrepBufrPrep.cc
new file mode 100644
index 0000000..36e6af5
--- /dev/null
+++ b/src/libMetview/MvPrepBufrPrep.cc
@@ -0,0 +1,553 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvPrepBufrPrep.cc
+
+#include <stdlib.h>
+#include <string.h>
+#include <list>
+#include <set>
+#include <unistd.h>  // for AIX to know symlink()
+#include <sys/stat.h>
+#include "MvPrepBufrPrep.h"
+#include "MvObsSet.h"
+
+const string cNoBufrTablesDir("NO_TABLE_DIR");
+const string cCommonNamePart("_prepbufr.txt");
+const string cAUX_TABLE_B("prepbufr_table_B.txt");
+const string cAUX_TABLE_D("prepbufr_table_D.txt");
+
+
+bool compare_tab_B_elems( const TableB_entry* first, const TableB_entry* second )
+{ return first->descr().compare( second->descr() ) < 0; }
+
+bool compare_tab_D_elems( const TableD_entry* first, const TableD_entry* second )
+{ return first->descr().compare( second->descr() ) < 0; }
+
+
+//______________________________________________________________________
+//
+//   MvPrepBufrPrep
+//______________________________________________________________________
+
+MvPrepBufrPrep::~MvPrepBufrPrep()
+{
+  //revertBufrTablesDir(); //-- this would change nothing as BUFR_TABLES
+                           //-- will not be read anymore
+
+  //string remove = "rm -r " + prepBufrTableDir_ + "/*";
+  //cout << "rm command is: " << remove << endl;
+//  int s = system( remove.c_str() );
+}
+
+//______________________________________________________________________
+
+bool
+MvPrepBufrPrep::prepareAll()
+{
+  bool ok = createPrepBufrTableDir();       //-- new unique subdir to play with table links
+  if( ! ok )
+     return false;
+
+  MvObs firstObs = obsSet_.firstObs();      //-- create links to our tables that are
+  ok = createTablesDecodeLinks( firstObs ); //-- needed to decode prepBUFR tables
+  if( ! ok )
+     return false;
+
+  ok = setNewBufrTablesDir();               //-- (re)assign BUFR_TABLES env.var
+  if( ! ok )
+     return false;
+
+  ok = extractPrepBufrTables();             //-- extract PrepBUFR tables using fixed table names
+  if( ! ok )
+     return false;
+
+  ok = createDataDecodeLinks();             //-- 'bufrdc' file names link to fixed name PrepBUFR tables
+  if( ! ok )
+     return false;
+
+  return true;
+}
+
+//______________________________________________________________________
+
+bool
+MvPrepBufrPrep::createPrepBufrTableDir()
+{
+                                            //-- store current value (if any)
+  const char* oldDir = getenv("BUFR_TABLES");
+  origBufrTableDir_ = oldDir ? oldDir : cNoBufrTablesDir;
+  cout << "MvPrepBufrPrep::prepareTempDir: origBufrTableDir_=" << origBufrTableDir_ << endl;
+
+  //char dirTemplate[1024];                   //-- build template for unique subdir name
+  //strcpy( dirTemplate, getenv("METVIEW_TMPDIR") );
+  //strcat( dirTemplate, "/PrepBufrTablesXXXXXX" );
+
+  // to create a unique temporary directory name without using mkdtemp (which does not
+  // work on AIX), we create a temporary file, append '_dir' and create a directory
+  // with that name. This should be safe in almost 100% of cases...
+
+  char *p;
+  p = tempnam(NULL,"PrepBUFR");
+  string tmpfilename(p);
+  free(p);
+  tmpfilename += "_dir";
+  int ok = mkdir(tmpfilename.c_str(), S_IRWXU);
+
+  if (ok != 0)
+  {
+#ifdef METVIEW
+     marslog( LOG_EROR, "MvPrepBufrPrep::createPrepBufrTableDir: Unable to create directory %s", tmpfilename.c_str() );
+#endif
+     cerr << "MvPrepBufrPrep::createPrepBufrTableDir: Unable to create directory "
+          << tmpfilename
+          << endl;
+     return false;
+  }
+
+  prepBufrTableDir_ = tmpfilename;//mkdtemp(dirTemplate); //-- create a unique subdir for PrepBufr tables
+  cout << "MvPrepBufrPrep::prepareTempDir: prepBufrTableDir_=" << prepBufrTableDir_ << endl;
+
+  return true;
+}
+
+//______________________________________________________________________
+//  Build links (using file names required by 'bufrdc') to custom table
+//  files stored in 'etc', needed to extract PrepBUFR Tables from ObsSet.
+//  This is because PrepBUFR table msgs may require non-existing tables.
+
+bool MvPrepBufrPrep::createTablesDecodeLinks( MvObs& firstObs )
+{
+  ostringstream commonPart;                 //-- build part of filename common to both files
+  int centre    = firstObs.originatingCentre();
+  int subCentre = firstObs.originatingSubCentre();
+  int masterTableVer = firstObs.masterTableVersion();
+  int localTableVer  = firstObs.localTableVersion();
+
+  commonPart << "00"                        //-- discipline: 0 = meteorology
+             << setw(6) << setfill('0') << subCentre
+             << setw(5) << setfill('0') << centre
+             << setw(3) << setfill('0') << masterTableVer
+             << setw(3) << setfill('0') << localTableVer
+             << ".TXT"
+             << ends;
+
+  string table_B_name = prepBufrTableDir_ + "/B" + commonPart.str();
+  string table_D_name = prepBufrTableDir_ + "/D" + commonPart.str();
+
+                                            //-- links to the real table files in dir 'etc'
+  string mvShareDir( getenv("METVIEW_DIR_SHARE") );
+  string etc_auxTable_B = mvShareDir + "/etc/AuxPrepBufrTable_B.txt";
+  string etc_auxTable_D = mvShareDir + "/etc/AuxPrepBufrTable_D.txt";
+
+  string auxTable_B = prepBufrTableDir_ + "/" + cAUX_TABLE_B;
+  string auxTable_D = prepBufrTableDir_ + "/" + cAUX_TABLE_D;
+
+  //--  1) copy table file from etc/share and make writable (we need to append PrepBUFR entries)
+  string copyTableB = "cp " + etc_auxTable_B + " " + auxTable_B + "; chmod u+w " + auxTable_B + ";";
+  cout << copyTableB << endl;
+  int ok = system( copyTableB.c_str() );
+
+  //--  2) create 'bufrex' named link to this file
+  ok = symlink( auxTable_B.c_str(), table_B_name.c_str() );
+  if( ok != 0 )
+  {
+#ifdef METVIEW
+     marslog( LOG_EROR, "Unable to copy auxiliary BUFR Table B" );
+#endif
+     cerr << "Unable to copy auxiliary BUFR Table B" << endl;
+     return false;
+  }
+
+  //--  1) copy table file from etc/share and make writable (we need to append PrepBUFR entries)
+  string copyTableD = "cp " + etc_auxTable_D + " " + auxTable_D + "; chmod u+w " + auxTable_D + ";";
+  cout << copyTableD << endl;
+  ok = system( copyTableD.c_str() );
+
+  //--  2) create 'bufrex' named link to this file
+  ok = symlink( auxTable_D.c_str(), table_D_name.c_str() );
+  if( ok != 0 )
+  {
+#ifdef METVIEW
+     marslog( LOG_EROR, "Unable to create a link into auxiliary BUFR Table D" );
+#endif
+     cerr << "Unable to create a link into auxiliary BUFR Table D" << endl;
+     return false;
+  }
+
+  return true;
+}
+//______________________________________________________________________
+//  Assigns BUFR_TABLES to point to the temporary directory which by now
+//  should contain links to auxiliary BUFR tables needed to decode the
+//  prepBUFR tables, and where the prepBUFR tables will be extracted to.
+
+bool MvPrepBufrPrep::setNewBufrTablesDir()
+{
+  const int overWrite = 1;
+  string newEnvVar = prepBufrTableDir_ + "/";
+
+  int ok = setenv( "BUFR_TABLES", newEnvVar.c_str(), overWrite );
+  if( ok != 0 )
+  {
+#ifdef METVIEW
+     marslog( LOG_EROR, "Unable change to BUFR_TABLES env.variable" );
+#endif
+     cerr << "Unable change to BUFR_TABLES env.variable" << endl;
+     return false;
+  }
+
+  cout << "MvPrepBufrPrep::setNewBufrTablesDir: BUFR_TABLES new values is "
+       << newEnvVar << endl;
+
+  return true;
+}
+//______________________________________________________________________
+//  Build file names for temporary PrepBUFR tables and
+//  extract Table B and Table D from the current ObsSet.
+
+bool MvPrepBufrPrep::extractPrepBufrTables()
+{
+  prepBufrTable_B_ = prepBufrTableDir_ + "/" + cAUX_TABLE_B; //-- build table B filename
+  prepBufrTable_D_ = prepBufrTableDir_ + "/" + cAUX_TABLE_D; //-- build table D filename
+
+  MvTableExtract extract( obsSet_ );
+  return extract.extract( prepBufrTable_B_, prepBufrTable_D_ );
+}
+//______________________________________________________________________
+//  Create links (using 'bufrdc' table file names) to temporary PrepBUFR
+//  table files. Make sure that there are links corresponding to all
+//  'bufrdc' table file names that are needed to decode any BUFR data
+//  message in the current ObsSet.
+//  Note that PrepBUFR ObsSet may contain msgs with different table or
+//  local table version, i.e. we may need several different link names.
+
+bool MvPrepBufrPrep::createDataDecodeLinks()
+{
+  set<string> tables;                       //-- keep track of existing table links
+  set<string>::iterator it;
+
+  obsSet_.rewind();
+  MvObsSetIterator iter( obsSet_ );
+  MvObs obs;
+
+  while( obs = iter() )                     //-- search all msgs for the required 'bufrdc' table names
+  {
+     if( obs.messageType() == 11 )          //-- skip if msg contains BUFR tables
+        continue;
+                                            //-- get values used in building table names
+     int centre    = obs.originatingCentre();
+     int subCentre = obs.originatingSubCentre();
+     int masterTableVer = obs.masterTableVersion();
+     int localTableVer  = obs.localTableVersion();
+
+     ostringstream commonPart;              //-- build part of the filename common to both files
+
+     if( localTableVer == 0 )               //-- bufrdc: if no local tables then uses 00 tables
+        commonPart << "00"                  //-- discipline: 0 = meteorology
+	     << setw(6) << setfill('0') << 0  // subCentre
+	     << setw(5) << setfill('0') << 0  // centre
+	     << setw(3) << setfill('0') << masterTableVer
+	     << setw(3) << setfill('0') << 0  // localTableVer
+	     << ".TXT"
+	     << ends;
+     else                                   //-- bufrdc: need site specific tables
+        commonPart << "00"                  //-- discipline: 0 = meteorology
+	     << setw(6) << setfill('0') << subCentre
+	     << setw(5) << setfill('0') << centre
+	     << setw(3) << setfill('0') << masterTableVer
+	     << setw(3) << setfill('0') << localTableVer
+	     << ".TXT"
+	     << ends;
+                                            //-- build 'bufrdc' style Table B name
+     string table_B_name = prepBufrTableDir_ + "/B" + commonPart.str();
+
+     it = tables.find(table_B_name);        //-- link already created?
+     if( it == tables.end() )               //-- if not, then create it now
+     {
+        int ok = symlink( prepBufrTable_B_.c_str(), table_B_name.c_str() );
+        if( ok != 0 )
+        {
+#ifdef METVIEW
+           marslog( LOG_EROR, "Unable to create a link into PrepBUFR Table B, returned %d", ok );
+#endif
+           cerr << "Unable to create a link into PrepBUFR Table B" << endl;
+           return false;
+        }
+                                            //-- build 'bufrdc' style Table D name
+        string table_D_name = prepBufrTableDir_ + "/D" + commonPart.str();
+        ok = symlink( prepBufrTable_D_.c_str(), table_D_name.c_str() );
+        if( ok != 0 )
+        {
+#ifdef METVIEW
+           marslog( LOG_EROR, "Unable to create a link into PrepBUFR Table D, returned %d", ok );
+#endif
+           cerr << "Unable to create a link into PrepBUFR Table D" << endl;
+           return false;
+        }
+
+  cout << " created table link " << table_B_name << endl;
+
+        tables.insert(table_B_name);        //-- signal that link now exists
+     }
+  }
+  obsSet_.rewind();
+  return true;
+}
+
+//______________________________________________________________________
+//  BUFR_TABLES was previously set to point to the temporary table dir.
+//  Now revert it to point back to the original table dir (or unset if
+//  not set previously).
+void
+MvPrepBufrPrep::revertBufrTablesDir()
+{
+  const int overWrite = 1;
+  if( origBufrTableDir_ == cNoBufrTablesDir )
+     unsetenv( "BUFR_TABLES" );
+  else
+     setenv( "BUFR_TABLES", origBufrTableDir_.c_str(), overWrite );
+}
+
+//______________________________________________________________________
+//
+//   TableB_entry
+//______________________________________________________________________
+
+//______________________________________________________________________
+//  Decode one PrepBUFR Table B descriptor and its definition.
+//
+//  'bufrdc' read cmd is:
+//
+//                    1  2  8  9   73 74  98 99 102 103 115 116 ->119
+//      READ(YENTRY,'(1X,I6,1x,64x,1x,24x,1x,I3,1x,I12,1x,I3)')
+//     1                                         NTABBTR(J),NTABBS (J),
+//     1                                         NTABBRV(J),NTABBDW(J)
+
+
+bool
+TableB_entry::getEntry( MvObs& obs )
+{
+  obs.setNextDescriptor();                  //-- build descriptor F+XX+YYY
+  descriptor_ = obs.stringValue().substr(0,1);
+  obs.setNextDescriptor();
+  descriptor_ += obs.stringValue().substr(0,2);
+  obs.setNextDescriptor();
+  descriptor_ += obs.stringValue().substr(0,3);
+
+  obs.setNextDescriptor();                  //-- data name: line 1 + line 2
+  name_ = obs.stringValue().substr(0,32);
+  obs.setNextDescriptor();
+  name_ += obs.stringValue().substr(0,32);
+
+  obs.setNextDescriptor();                  //-- unit name
+  unit_ = obs.stringValue().substr(0,24);
+
+  obs.setNextDescriptor();                  //-- scale: sign + abs value
+  scale_ = obs.stringValue().substr(0,1);
+  obs.setNextDescriptor();
+  scale_ += obs.stringValue().substr(0,3);
+
+  obs.setNextDescriptor();                  //-- reference value: sign + abs value
+  refval_ = obs.stringValue().substr(0,1);
+  obs.setNextDescriptor();
+  refval_ += obs.stringValue().substr(0,10);
+
+  obs.setNextDescriptor();                  //-- bit field width
+  width_ = obs.stringValue().substr(0,3);
+
+  //-- aki: check  OK...                    //-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  return true;
+}
+//______________________________________________________________________
+
+void
+TableB_entry::writeEntry( ofstream& fout )
+{
+  fout << " " << descriptor_
+       << " " << name_
+       << " " << unit_
+       << " " << scale_
+       << " " << refval_
+       << " " << width_
+       << endl;
+}
+//______________________________________________________________________
+//
+//   TableD_entry
+//______________________________________________________________________
+
+//______________________________________________________________________
+//  Decode one PrepBUFR Table D descriptor and its definition
+
+bool
+TableD_entry::getEntry( MvObs& obs )
+{
+  obs.setNextDescriptor();                  //-- build descriptor F+XX+YYY
+  descriptor_ = obs.stringValue().substr(0,1);
+  obs.setNextDescriptor();
+  descriptor_ += obs.stringValue().substr(0,2);
+  obs.setNextDescriptor();
+  descriptor_ += obs.stringValue().substr(0,3);
+
+  obs.setNextDescriptor();                  //-- maybe text...
+  long descr = obs.MvObs::currentDescriptor();
+  if( (descr/1000) == 205 )                 //-- 2'05'yyy: signify character?
+     obs.setNextDescriptor();               //-- is extra text => skip
+
+  cnt_ = obs.currentValue();                //-- nr of descriptors in the sequence
+
+  if( cnt_ > 0 )
+  {
+    for(int d=0; d<cnt_; ++d)
+    {
+       obs.setNextDescriptor();
+       descrlist_.push_back( obs.stringValue().substr(0,6) );
+    }
+  }
+  else
+    descrlist_.push_back( "777777" );
+
+  //-- aki: check  OK...                    //-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  return true;
+}
+//______________________________________________________________________
+
+void
+TableD_entry::writeEntry( ofstream& fout )
+{
+  fout << " " << descriptor_
+       << setw(3) << cnt_
+       << " " << descrlist_[0]
+       << endl;
+
+  if( cnt_ > 0 )
+  {
+    for(int d=1; d<cnt_; ++d)
+       fout << "           " << descrlist_[d] << endl;
+  }
+
+  descrlist_.clear();
+}
+//______________________________________________________________________
+//
+//   MvTableExtract
+//______________________________________________________________________
+
+bool
+MvTableExtract::initTableFiles( string& prepBufrTable_B, string& prepBufrTable_D )
+{
+  //-- use previously copied aux table file and open it in append mode
+  table_B_.open( prepBufrTable_B.c_str(), ios::app ); //-- append to aux table B
+  if( ! table_B_ )
+  {
+#ifdef METVIEW
+     marslog( LOG_EROR, "Unable to open file %s", prepBufrTable_B.c_str() );
+#endif
+     cerr << "Unable to open file " << prepBufrTable_B << endl;
+     return false;
+  }
+
+  //-- use previously copied aux table file and open it in append mode
+  table_D_.open( prepBufrTable_D.c_str(), ios::app ); //-- append to aux table D
+  if( ! table_D_ )
+  {
+#ifdef METVIEW
+     marslog( LOG_EROR, "Unable to open file %s", prepBufrTable_D.c_str() );
+#endif
+     cerr << "Unable to open file " << prepBufrTable_D << endl;
+     return false;
+  }
+
+  return true;
+}
+//______________________________________________________________________
+//  Extract PrepBUFR Table B and Table D entries into memory, sort the
+//  entries ('bufrdc' requirement), and then finally write the sorted
+//  entries to PrepBUFR table files B and D.
+
+bool
+MvTableExtract::extract( string& prepBufrTable_B, string& prepBufrTable_D )
+{
+                                            //-- open/create table B and D files
+  if( ! initTableFiles( prepBufrTable_B, prepBufrTable_D ) )
+  {
+     return false;
+  }
+
+  list<TableB_entry*> tab_B_list;           //-- for collecting PrepBUFR table B entries
+  list<TableD_entry*> tab_D_list;           //-- for collecting PrepBUFR table D entries
+
+  MvObsSetIterator iter(obsSet_);           //-- ObsSet iterator to select only table msgs
+  iter.setMessageType(11);                  //-- 11: "BUFR tables, complete replacement or update"
+  int msgNum = 0;
+
+  tableMsg_ = iter();                       //-- get first BUFR table msg
+
+  while( tableMsg_ )                        //-- iterate though table msgs
+  {
+    ++msgNum;                               //-- table msg number (for error msgs)
+
+    //-- Each table msg contains three delayed replications (0'31'001):
+    //-- 1st is for Table A (we skip), 2nd for Table B, 3rd for Table D
+
+                                            //-- extract possible table B stuff
+    int count_B = (int)tableMsg_.valueByOccurrence( 2, 31001 );
+    for(int b=0; b<count_B; ++b)
+    {
+      TableB_entry* entry_B = new TableB_entry;
+      if( entry_B->getEntry(tableMsg_) )
+         tab_B_list.push_back(entry_B);
+#ifdef METVIEW
+      else
+         marslog( LOG_EROR, "Error in extracting PrepBUFR Table B entry %d in msg %d", b+1, msgNum );
+#endif
+    }
+                                            //-- extract possible table D stuff
+    int count_D = (int)tableMsg_.valueByOccurrence( 3, 31001 );
+    for(int d=0; d<count_D; ++d)
+    {
+      TableD_entry* entry_D = new TableD_entry;
+      if( entry_D->getEntry(tableMsg_) )
+         tab_D_list.push_back(entry_D);
+#ifdef METVIEW
+      else
+         marslog( LOG_EROR, "Error in extracting PrepBUFR Table D entry %d in msg %d", d+1, msgNum );
+#endif
+    }
+
+    tableMsg_ = iter();                     //-- get next BUFR tables msg
+  }
+
+  tab_B_list.sort( compare_tab_B_elems );   //-- sort prepBUFR Table B entries
+
+  list<TableB_entry*>::iterator bit;        //-- write prepBUFR Table B entries
+  for( bit = tab_B_list.begin(); bit != tab_B_list.end(); bit++ )
+    (*bit)->writeEntry( table_B_ );
+
+  tab_D_list.sort( compare_tab_D_elems );   //-- sort prepBUFR Table D entries
+
+  list<TableD_entry*>::iterator dit;        //-- write prepBUFR Table D entries
+  for( dit = tab_D_list.begin(); dit != tab_D_list.end(); dit++ )
+    (*dit)->writeEntry( table_D_ );
+
+  return true; //-- <aki> add failure checks...
+}
+//______________________________________________________________________
+
+#if 0
+int main()
+{
+  MvObsSet       obsSet( "/var/tmp/vesa/Data/bufr/2011-01-17-CPTEC/gdas1.t00z.prepbufr.nr" );
+  MvTableExtract extract( obsSet );
+  extract.extract();
+}
+#endif
diff --git a/src/libMetview/MvPrepBufrPrep.h b/src/libMetview/MvPrepBufrPrep.h
new file mode 100644
index 0000000..f91585e
--- /dev/null
+++ b/src/libMetview/MvPrepBufrPrep.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// MvPrepBufrPrep.h
+
+#ifndef MvPrepBufrPrep_DEFINED
+#define MvPrepBufrPrep_DEFINED
+
+#include <iostream>
+#include <iomanip>
+#include <vector>
+#include "MvBufrObs.h"
+
+using namespace std;
+
+class MvObsSet;
+
+//_____________________________________________________
+
+class MvPrepBufrPrep // : public MvService
+{
+ private:
+    MvPrepBufrPrep();
+    MvPrepBufrPrep( const MvPrepBufrPrep& anOther );
+    void operator= ( const MvPrepBufrPrep& anOther );
+
+ public:
+    MvPrepBufrPrep( MvObsSet& os ) : obsSet_(os) {}
+    ~MvPrepBufrPrep();
+
+    bool  prepareAll();
+
+ protected:
+    bool  createPrepBufrTableDir();
+    bool  createTablesDecodeLinks( MvObs& firstObs );
+    bool  setNewBufrTablesDir();
+    bool  extractPrepBufrTables();
+    bool  createDataDecodeLinks();
+    void  revertBufrTablesDir();
+
+ private:
+    MvObsSet& obsSet_;                       //-- use a reference to MvObsSet
+    string    origBufrTableDir_;
+    string    prepBufrTableDir_;
+    string    prepBufrTable_B_;
+    string    prepBufrTable_D_;
+};
+
+//_____________________________________________________
+
+class MvTableExtract // : public MvService
+{
+ private:
+    MvTableExtract();
+    MvTableExtract( const MvTableExtract& anOther );
+    void operator= ( const MvTableExtract& anOther );
+
+ public:
+    MvTableExtract( MvObsSet& os ) : obsSet_(os) {}
+    ~MvTableExtract(){}
+
+    bool  extract( string& prepBufrTable_B, string& prepBufrTable_D );
+    bool  initTableFiles( string& prepBufrTable_B, string& prepBufrTable_D );
+
+ private:
+    MvObsSet& obsSet_;                       //-- use a reference to MvObsSet
+    MvObs     tableMsg_;
+    ofstream  table_B_;
+    ofstream  table_D_;
+};
+//_____________________________________________________
+
+class TableB_entry
+{
+ public:
+    TableB_entry(){}
+    ~TableB_entry(){}
+
+    bool getEntry( MvObs& obs );
+    void writeEntry( ofstream& fout );
+    string descr() const { return descriptor_; }
+
+ private:
+    string descriptor_;
+    string name_;
+    string unit_;
+    string scale_;
+    string refval_;
+    string width_;
+};
+//_____________________________________________________
+
+class TableD_entry
+{
+ public:
+    TableD_entry(){}
+    ~TableD_entry(){}
+
+    bool getEntry( MvObs& obs );
+    void writeEntry( ofstream& fout );
+    string descr() const { return descriptor_; }
+
+ private:
+    string descriptor_;
+    int    cnt_;
+    vector<string> descrlist_;
+};
+//_____________________________________________________
+
+#endif
+// MvPrepBufrPrep_DEFINED
diff --git a/src/libMetview/MvProtocol.cc b/src/libMetview/MvProtocol.cc
new file mode 100644
index 0000000..82c732f
--- /dev/null
+++ b/src/libMetview/MvProtocol.cc
@@ -0,0 +1,197 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdarg.h>
+#include <Metview.h>
+
+MvProtocol::MvProtocol(const char *name): Id(NULL)
+{
+	add_service_callback(MvApplication::getService(),name,_serve,(void*)this);
+}
+
+MvProtocol::~MvProtocol()
+{
+}
+
+void MvProtocol::addCallbackKeyword(const char *name)
+{
+	add_service_callback(MvApplication::getService(),name,_serve,(void*)this);
+}
+
+void MvProtocol::_serve(svcid *id,request *r,void *obj)
+{
+	MvProtocol *s = (MvProtocol*)obj;
+	s->_call_serve(id, r);
+}
+
+void MvProtocol::_call_serve(svcid *id,request *r)
+{
+	Id = id;
+
+	MvRequest in(r);
+
+	Error = 0;
+	callback(in);
+}
+
+const char *MvProtocol::iconName()
+{
+	return get_value(Id->r->next,"_NAME",0);
+}
+
+const char *MvProtocol::iconClass()
+{
+	return get_value(Id->r->next,"_CLASS",0);
+}
+
+void MvProtocol::setError(err e)
+{
+	Error = e;
+	set_svc_err(Id,e);
+}
+
+int MvProtocol::getError()
+{
+	return get_svc_err(Id);
+}
+
+const char *MvProtocol::getMessage(int n)
+{
+	return get_svc_msg(Id, n);
+}
+
+void MvProtocol::setError(err e,const char *fmt,...)
+{
+	char buffer[1024];
+
+	Error = e;
+
+	va_list list;
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+
+	set_svc_err(Id,e);
+	set_svc_msg(Id,"%s",buffer);
+}
+
+void MvProtocol::_clear_id()
+{
+	Id = NULL;
+}
+
+void MvProtocol::sendReplyFromInteractive(const MvRequest& answer)
+{
+	send_reply(Id, answer);
+}
+
+void MvProtocol::sendReply(const MvRequest& answer)
+{
+	send_reply(Id, answer);
+	_clear_id();
+}
+
+void MvProtocol::reDispatch(MvRequest& r)
+{
+	re_dispatch(Id, r);
+	_clear_id();
+}
+
+void MvProtocol::sendProgress(const MvRequest& r)
+{
+	send_progress(Id,NULL,r);
+}
+
+void MvProtocol::sendProgress(const char *fmt,...)
+{
+    char buffer[1024];
+	va_list list;
+	va_start(list,fmt);
+	vsprintf(buffer,fmt,list);
+	va_end(list);
+	send_progress(Id,buffer,NULL);
+}
+
+const char *MvProtocol::getSource()
+{
+	return get_value(Id->r,"SOURCE",0);
+}
+
+const char *MvProtocol::getTarget()
+{
+	return get_value(Id->r,"TARGET",0);
+}
+
+const char *MvProtocol::getAction()
+{
+	return get_value(Id->r->next,"_ACTION",0);
+}
+
+MvRequest MvProtocol::getMode()
+{
+	return MvRequest(get_subrequest(Id->r->next,"_MODE",0),false);
+}
+
+void *MvProtocol::getReference()
+{
+	return (void*) get_svc_ref(Id);
+}
+
+
+MvReply::MvReply(const char* name)
+{
+	add_reply_callback(MvApplication::getService(), name,
+		_serve, (void*) this);
+}
+
+void MvReply::addCallbackKeyword(const char *name)
+{
+	add_reply_callback(MvApplication::getService(),name,_serve,(void*)this);
+}
+
+MvProgress::MvProgress(const char* name)
+{
+	add_progress_callback(MvApplication::getService(), name,
+		_serve, (void*) this);
+}
+
+void MvProgress::addCallbackKeyword(const char *name)
+{
+	add_progress_callback(MvApplication::getService(),name,_serve,(void*)this);
+}
+
+MvMessage::MvMessage(const char* name)
+{
+	add_message_callback(MvApplication::getService(), name,
+		_serve, (void*) this);
+}
+
+MvTransaction::MvTransaction(MvTransaction *from)
+{
+	Id    = from->Id;
+	Error = from->Error;
+}
+
+void MvTransaction::_call_serve(svcid *id,request *r)
+{
+	Id    = id;
+	Error = 0;
+
+	MvTransaction *t = cloneSelf();
+	MvRequest in(r);
+
+	t->callback(in);
+}
+
+void MvTransaction::_clear_id()
+{
+	Id = NULL;
+	delete this;
+}
+
diff --git a/src/libMetview/MvProtocol.h b/src/libMetview/MvProtocol.h
new file mode 100644
index 0000000..b55c1b4
--- /dev/null
+++ b/src/libMetview/MvProtocol.h
@@ -0,0 +1,197 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef MvProtocol_DEFINED
+#define MvProtocol_DEFINED
+
+// Base class, should not be used
+
+//! Base class for registering a callback function
+/*! Base class, should not be used!\n \n
+ *  MvProtocol is a base class and it is responsible for registering
+ *  a callback function associated with a Metview command. Its static
+ *  method \c _serve is called when the module receives a command,
+ *  and this method calls the virtual method \c _call_serve, which
+ *  may be redefined by a derived class.
+ */
+class MvProtocol {
+
+protected:
+	svcid *Id;
+	err    Error;
+
+//! Static "service" function.
+/*! This is the "service" function registered by the constructor,
+ *  to be called when the module receives the command. It calls
+ *  the virtual method \c _call_serve, which may be implemented in
+ *  a derived class. Argument \c id is the service structure and \c obj
+ *  points to the MvProtocol object that registered this function.
+ */
+static void   _serve(svcid* id, request* r, void* obj);
+
+
+	//! The default virtual method called by \c _serve.
+	/*! Transforms the incoming request structure \c rq into a MvRequest
+	 *  and calls the virtual method \c callback which should be
+	 *  implemented in a derived class.
+	 */
+	virtual void   _call_serve(svcid* id, request* rq);
+
+	virtual void   _clear_id();
+	virtual ~MvProtocol();
+
+
+public:
+	//-- Information --
+
+	//! Returns the value of parameter \c _NAME
+	/*! In other words, returns the name of the object that is
+	 *  currently referenced in the incoming command.
+	 */
+	const char *iconName();
+
+	//! Returns the value of parameter \c _CLASS
+	/*! In other words, returns the class of the object that is
+	 *  currently referenced in the incoming command.
+	 */
+	const char *iconClass();
+
+	//! Returns the value of parameter \c SOURCE from incoming command.
+	const char *getSource();
+
+	//! Returns the value of parameter \c TARGET from incoming command.
+	const char *getTarget();
+
+	//! Returns the value of parameter \c _ACTION from incoming command.
+	const char *getAction();
+
+	//! Returns a copy of the subrequest in parameter \c _MODE from incoming command.
+	MvRequest getMode();
+
+	//! Returns the value of parameter \c USER_REF from incoming command.
+	void     *getReference();
+
+
+	//! Creates an empty object.
+	MvProtocol() { Id = NULL; }
+
+	//! Constructor for command \c name
+	/*! This constructor registers protected static method \c _serve
+	 *  to be called when the module receives command \c name.
+	 */
+	MvProtocol(const char* name);
+
+	virtual void addCallbackKeyword(const char*);
+
+	//! Empty virtual method
+	/*! This method should be implemented in a derived class.
+	 */
+	virtual void callback(MvRequest& )	{};
+
+	//-- Communication --
+
+	//! Creates an error message
+	/*! Sets the error number \c e and formats an error message into
+	 *  the internal service structure. Arguments \c fmt and \c ... are
+	 *  formats like in C language printf function.
+	 */
+	void setError(err e, const char* fmt, ...);
+
+	//! Sets the error number \c e into the internal service structure
+	void setError(err e);
+
+	//! Returns the error code
+	int getError();
+
+	//! Returns the error message
+	const char* getMessage(int err);
+
+	//! Sends back the reply request answer
+	/*! Error code and error messages will be sent back as well.
+	 */
+        void sendReply(const MvRequest& answer);
+
+        //! Sends back the reply request answer from interactive apps
+	/*! Error code and error messages will be sent back as well.
+	 */
+      	void sendReplyFromInteractive(const MvRequest& answer);
+    
+	//! Broadcasts a progress message
+	/*! Arguments \c fmt and \c ... are formats like in C language printf function.
+	 */
+	void sendProgress(const char* fmt, ...);
+
+	//! Broadcasts a progress message coded as a MvRequest
+	void sendProgress(const MvRequest& req);
+
+	void reDispatch(MvRequest& req);
+};
+
+// Used for asynchronious calls (use MvService for synchronious calls)
+// Goes with the template below..
+
+//! Used for asynchronious calls (use MvService for synchronious calls)
+/*! When a module does not have the behaviour of a typical Metview module,
+ *  a more general class MvTransaction may be used instead of MvService.
+ *  MvTransaction is an abstract class and a new class must be defined
+ *  for each command the module must execute.\n \n
+ *  A C++ template TMvTransaction is provided for defining a MvTransaction derived class.
+ */
+class MvTransaction : public MvProtocol {
+
+	/*! This method deletes the current instance, the one
+	 *  that is created by method \c _call_serve.
+	 */
+	virtual void   _clear_id();
+
+	/*! This method creates a new instance of MvTransaction and
+	 *  calls this new instance's method callback.
+	 */
+	virtual void   _call_serve(svcid*,request*);
+
+	//! This pure virtual method is implemented in MvTransaction template
+	virtual MvTransaction   *cloneSelf() = 0;
+protected:
+	//! This constructor calls MvProtocol empty constructor.
+	MvTransaction()                 : MvProtocol() {}
+
+	//! This constructor calls the equivalent MvProtocol constructor.
+	MvTransaction(const char *name)       : MvProtocol(name) {}
+
+	//! This constructor makes a copy of MvTransaction \c from
+	MvTransaction(MvTransaction* x);
+};
+
+//
+
+//=======================================================================
+
+//! Used by MetviewUI. Base class for MvServiceReply
+class MvReply : public MvProtocol {
+public:
+	MvReply(const char* = NULL);
+	void addCallbackKeyword(const char*);
+};
+
+//! [used by MetviewUI]
+class MvProgress : public MvProtocol {
+public:
+	MvProgress(const char* = NULL);
+	void addCallbackKeyword(const char*);
+};
+
+//! [used by MvPreferenceMessage and MetviewUI]
+class MvMessage : public MvProtocol {
+public:
+	MvMessage(const char* = NULL);
+};
+
+
+#endif
diff --git a/src/libMetview/MvRequest.cc b/src/libMetview/MvRequest.cc
new file mode 100644
index 0000000..7e2754b
--- /dev/null
+++ b/src/libMetview/MvRequest.cc
@@ -0,0 +1,1123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <MvPath.hpp>
+
+MvRequest::MvRequest(const char *verb)
+{
+	_overwrite = 1;
+	CurrentRequest = FirstRequest = empty_request(verb);
+}
+
+MvRequest::MvRequest(request* r,boolean clone)
+{
+	_overwrite = 1;
+	CurrentRequest = FirstRequest = clone?clone_all_requests(r):r;
+}
+
+MvRequest::MvRequest(const MvRequest &r)
+
+{
+	_overwrite = 1;
+	CurrentRequest = FirstRequest = clone_all_requests(r.FirstRequest);
+
+	// Make sure currents match
+	request *s = r.FirstRequest;
+	while(s && s != r.CurrentRequest)
+	{
+		s = s->next;
+		CurrentRequest = CurrentRequest->next;
+	}
+}
+
+MvRequest::~MvRequest()
+{
+	free_all_requests(FirstRequest);
+}
+
+void MvRequest::clean()
+{
+	free_all_requests(FirstRequest);
+	FirstRequest = CurrentRequest = 0;
+	CurrentValue = 0;
+}
+
+MvRequest& MvRequest::operator=(const MvRequest& r)
+{
+	free_all_requests(FirstRequest);
+	CurrentRequest = FirstRequest = clone_all_requests(r.FirstRequest);
+
+	// Make sure currents match
+	request *s = r.FirstRequest;
+	while(s && s != r.CurrentRequest)
+	{
+		s = s->next;
+		CurrentRequest = CurrentRequest->next;
+	}
+	return *this;
+}
+
+//MvRequest& MvRequest::operator=(const request *r)
+//{
+//	free_all_requests(FirstRequest);
+//	CurrentRequest = FirstRequest = clone_all_requests(r);
+//	return *this;
+//}
+
+MvRequest MvRequest::operator+(const MvRequest& r) const
+{
+	if(CurrentRequest == NULL) return r;
+
+	request *a = clone_all_requests(CurrentRequest);
+	request *b = clone_all_requests(r.CurrentRequest);
+
+	request *q = NULL, *p = a;
+
+	while(p)
+	{
+		q = p;
+		p = p->next;
+	}
+
+	q->next = b;
+	return MvRequest(a,false);
+}
+
+void MvRequest::operator+=(const MvRequest& r)
+{
+	request *a = NULL;
+	request *b = NULL;
+	
+	if (CurrentRequest)
+	{
+		a = CurrentRequest;
+	}
+
+	if (r.CurrentRequest)
+	{
+		b = clone_all_requests(r.CurrentRequest);
+	}
+
+	request *q = NULL, *p = a;
+
+	if (a)
+	{
+		while(p)  // find the end of request a
+		{
+			q = p;
+			p = p->next;
+		}
+
+		q->next = b;
+
+	}
+	else
+	{
+		CurrentRequest = FirstRequest = b;
+	}
+}
+
+
+void MvRequest::copyFromCurrent(const MvRequest &r)
+{
+    _overwrite = 1;
+    CurrentRequest = FirstRequest = clone_all_requests(r.CurrentRequest);
+}
+
+void MvRequest::copyFromCurrentTo(const MvRequest &r, const char *verb)
+{
+    _overwrite = 1;
+    CurrentRequest = FirstRequest = copyFromCurrentTo_Recursive(r.CurrentRequest, verb);
+}
+
+request *MvRequest::copyFromCurrentTo_Recursive(const request *r, const char *verb)
+{
+    if (r)
+    {
+        request *q = clone_one_request(r);
+        if (strcmp(request_verb(r), verb))  // if not the verb we're looking for
+        {
+            q->next = copyFromCurrentTo_Recursive(r->next, verb);
+        }
+        return q;
+    }
+    return 0;
+}
+
+
+
+void MvRequest::setVerb(const char* v)
+{
+	if(FirstRequest)
+	{
+		strfree(CurrentRequest->name);
+		CurrentRequest->name = strcache(v);
+	}
+	else FirstRequest = CurrentRequest = empty_request(v);
+}
+
+int MvRequest::countValues(const char* p) const
+{
+	return count_values(CurrentRequest, p);
+
+}
+
+void MvRequest::print() const
+{
+  if( mvDebugPrint() )  //-- to control prints that go to log files
+    {
+	print_all_requests(CurrentRequest);
+	fflush(stdout);  //-- may be mixed with C++ io
+    }
+}
+
+const char *MvRequest::getVerb() const
+{
+	return CurrentRequest?CurrentRequest->name:NULL;
+}
+
+void MvRequest::unsetParam(const char* pname)
+{
+	unset_value(CurrentRequest, pname);
+}
+
+void MvRequest::read(const char* file)
+{
+	free_all_requests(FirstRequest);
+	CurrentRequest = FirstRequest = read_request_file(file);
+}
+
+void MvRequest::save(const char* file) const
+{
+	FILE* fp = fopen(file, "w");
+	if (fp)
+	{
+		save(fp);
+		fclose(fp);
+	}
+}
+
+void MvRequest::save(FILE* file) const
+{
+	save_all_requests(file, FirstRequest);
+}
+
+
+void MvAccess::operator=(const MvAccess& a)
+{
+	if(this == &a)
+		marslog(LOG_WARN,"MvAccess::operator= cannot work on the same"
+			" object (%s/%d)",LastGet,LastIndex);
+
+	set_value(
+		Request->CurrentRequest,LastGet,"%s",
+		get_value(a.Request->CurrentRequest,a.LastGet,a.LastIndex)
+	);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+MvAccess::operator const char*() const
+{
+	return get_value(Request->CurrentRequest, LastGet, LastIndex);
+}
+
+MvConstAccess::operator const char*() const
+{
+	return get_value(Request->CurrentRequest, LastGet, LastIndex);
+}
+
+MvAccess::operator double() const
+{
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+	return p?atof(p):0;
+}
+
+MvConstAccess::operator double() const
+{
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+	return p?atof(p):0;
+}
+
+MvAccess::operator int() const
+{
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+	return p?atoi(p):0;
+}
+
+MvConstAccess::operator int() const
+{
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+	return p?atoi(p):0;
+}
+
+MvAccess::operator MvDate() const
+{
+	long save = expand_flags(0); // So it is working OK
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+	expand_flags(save);
+	return MvDate(p);
+}
+
+MvConstAccess::operator MvDate() const
+{
+	long save = expand_flags(0); // So it is working OK
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+	expand_flags(save);
+	return MvDate(p);
+}
+
+MvAccess::operator long() const
+{
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+
+	/* backward compatiblity */
+	long julian,second;
+	boolean dum;
+	if(p && parsedate(p,&julian,&second,&dum))
+		return julian_to_date(julian,false);
+
+	return p?atol(p):0;
+}
+MvConstAccess::operator long() const
+{
+	const char *p = get_value(Request->CurrentRequest, LastGet, LastIndex);
+
+	/* backward compatiblity */
+	long julian,second;
+	boolean dum;
+	if(p && parsedate(p,&julian,&second,&dum))
+		return julian_to_date(julian,false);
+
+	return p?atol(p):0;
+}
+
+
+MvAccess::operator request*() const
+{
+	return get_subrequest(Request->CurrentRequest, LastGet, LastIndex);
+}
+
+void MvAccess::operator= (const char* val)
+{
+	if (LastGet) set_value(Request->CurrentRequest, LastGet, "%s", val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+void MvAccess::operator= (double val)
+{
+	if (LastGet) set_value(Request->CurrentRequest, LastGet, "%.12g", val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+void MvAccess::operator= (int val)
+{
+	if (LastGet) set_value(Request->CurrentRequest, LastGet, "%d", val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+void MvAccess::operator= (const request* val)
+{
+	if (LastGet) set_subrequest(Request->CurrentRequest, LastGet, val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+void MvAccess::operator= (long val)
+{
+	if (LastGet) set_value(Request->CurrentRequest, LastGet, "%ld", val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+void MvAccess::operator= (const MvDate& val)
+{
+	char buf[80];
+	val.Format("yyyy-mm-dd HH:MM:SS",buf);
+	if (LastGet) set_value(Request->CurrentRequest,
+		LastGet, "%s", buf);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+void MvAccess::operator+= (const request* val)
+{
+	add_subrequest(Request->CurrentRequest, LastGet,val);
+}
+
+void MvAccess::operator+= (const MvDate& val)
+{
+	char buf[80];
+	val.Format("yyyy-mm-dd HH:MM:SS",buf);
+	if (LastGet) add_value(Request->CurrentRequest,
+		LastGet, "%s", buf);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+void MvAccess::operator+= (const char* val)
+{
+	if (LastGet) add_value(Request->CurrentRequest, LastGet, "%s", val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+void MvAccess::operator+= (const MvAccess& a)
+{
+	if(this == &a)
+		marslog(LOG_WARN,"MvAccess::operator+= cannot work on the same"
+			" object (%s/%d)",LastGet,LastIndex);
+
+	add_value(
+		Request->CurrentRequest,LastGet,"%s",
+		get_value(a.Request->CurrentRequest,a.LastGet,a.LastIndex)
+	);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+void MvRequest::getValue(int& v, const char* p, int i) const
+{
+	const char *t = get_value(CurrentRequest, p, i);
+	v = (t) ? atoi(get_value(CurrentRequest, p, i)) : 0;
+}
+
+void MvRequest::getValue(double& v, const char* p, int i) const
+{
+	const char *t = get_value(CurrentRequest, p, i);
+	v = (t) ? atof(get_value(CurrentRequest, p, i)) : 0;
+}
+
+void MvRequest::getValue(const char*& v, const char* p, int i) const
+{
+	v = get_value(CurrentRequest, p, i);
+}
+
+void MvRequest::getValue(Cached& v, const char* p, int i) const
+{
+	v = get_value(CurrentRequest, p, i);
+}
+
+void MvRequest::getValue(void*& v, const char* p, int i) const
+{
+	sscanf(get_value(CurrentRequest, p, i), "%p", &v);
+}
+
+void MvRequest::getValue(MvRequest& v, const char* name,int i) const
+{
+	v = get_subrequest(CurrentRequest, name, i );
+}
+
+MvRequest  MvRequest::getSubrequest(const char* name,int i) const
+{
+	return MvRequest(get_subrequest(CurrentRequest, name, i),false);
+}
+
+
+int MvRequest::iterInit( const char* param )
+{
+  parameter *p = find_parameter( CurrentRequest, param );
+  if( p == 0 )
+    {
+      CurrentCount = 0;
+      CurrentValue = 0;
+    }
+  else
+    {
+      CurrentCount = count_values( CurrentRequest, param );
+      CurrentValue = p->values;
+    }
+
+  return CurrentCount;    //-- 'iterInit' returns parameter count
+}
+
+bool MvRequest::iterGetNextValue(const char*& val)
+{
+  bool myStat = false;
+  if( CurrentValue && CurrentValue->name )
+    {
+      val    = CurrentValue->name;
+      myStat = true;
+    }
+  else
+      val = 0;
+
+  if( CurrentValue )
+    CurrentValue = CurrentValue->next;
+
+  return myStat;
+}
+
+bool MvRequest::iterGetNextValue(double& val)
+{
+  bool myStat = false;
+  if( CurrentValue && CurrentValue->name )
+    {
+      val    = atof(CurrentValue->name);
+      myStat = true;
+    }
+  else
+      val = 0;
+
+  if( CurrentValue )
+    CurrentValue = CurrentValue->next;
+
+  return myStat;
+}
+
+void MvRequest::setValue(const char* p, double v)
+{
+	set_value(CurrentRequest, p, "%.12g", v);
+}
+
+void MvRequest::setValue(const char* p, const void* v)
+{
+	set_value(CurrentRequest, p, "%p", v);
+}
+
+void MvRequest::setValue(const char* p, int v)
+{
+	set_value(CurrentRequest, p, "%d", v);
+}
+
+void MvRequest::setValue(const char* p, const char* v)
+{
+	set_value(CurrentRequest, p, "%s", v);
+}
+
+void MvRequest::setValue(const char* p, long v)
+{
+	set_value(CurrentRequest, p, "%ld", v);
+}
+
+void MvRequest::setValue(const char* p,const request *r)
+{
+	set_subrequest(CurrentRequest, p, r);
+}
+
+void MvRequest::setValue(const char* p, const MvRequest& v)
+{
+	set_subrequest(CurrentRequest, p, v);
+}
+
+void MvRequest::addValue(const char* p, double v)
+{
+	add_value(CurrentRequest, p, "%.12g", v);
+}
+
+void MvRequest::addValue(const char* p, const void* v)
+{
+	add_value(CurrentRequest, p, "%p", v);
+}
+
+void MvRequest::addValue(const char* p, int v)
+{
+	add_value(CurrentRequest, p, "%d", v);
+}
+
+void MvRequest::addValue(const char* p, const char* v)
+{
+	if( v )
+	  add_value(CurrentRequest, p, "%s", v);
+}
+
+void MvRequest::addValue(const char* p, long v)
+{
+	add_value(CurrentRequest, p, "%ld", v);
+}
+
+void MvRequest::addValue(const char* p, const MvRequest& v)
+{
+	MvRequest sub;
+	getValue(sub,p,0);
+	setValue(p,sub+v);
+}
+
+void MvRequest::setFirstToCurrent()
+{
+	FirstRequest = CurrentRequest;
+}
+
+MvRequest& MvRequest::rewind()
+{
+	CurrentRequest = FirstRequest;
+	return *this;
+}
+
+MvRequest& MvRequest::advance()
+{
+	if(CurrentRequest) CurrentRequest = CurrentRequest->next;
+	return *this;
+}
+
+void MvRequest::advanceToEnd ()
+{
+     while(CurrentRequest)
+          advance();
+}
+
+MvRequest& MvRequest::advanceTo ( string& verb )
+{
+     while(CurrentRequest)
+     {
+          if ( getVerb() == verb )
+               break;
+
+          advance();
+     }
+     return *this;
+}
+
+MvRequest& MvRequest::advanceAfter ( string& verb )
+{
+     while(CurrentRequest)
+     {
+          if ( getVerb() == verb )
+          {
+               advance();
+               break;
+          }
+
+          advance();
+     }
+     return *this;
+}
+
+MvRequest MvRequest::justOneRequest() const
+{
+	return MvRequest(clone_one_request(CurrentRequest),false);
+}
+
+#if 0
+//-- following commented-out functions are now (May 2008) obsolete
+//
+// Set value to list of requests, if request name matches
+//
+
+void set_value_to_requests(int overwrite, request* first_reqst, const char* reqname, const char* parname, const char* parformat, ...)
+{
+	char parvalue[1024];
+	va_list ap;
+	va_start(ap,parformat);
+	vsprintf(parvalue, parformat, ap);
+
+	request* reqst;
+	for (reqst = first_reqst; reqst; reqst = reqst->next)
+	{
+		if (!strcmp(reqst->name, reqname))
+		{
+			if (overwrite || !get_value(reqst, parname, 0))
+				set_value(reqst, parname, parvalue);
+		}
+	}
+}
+
+void add_value_to_requests(request* first_reqst, const char* reqname, const char* parname, const char* parformat, ...)
+{
+	char parvalue[1024];
+	va_list ap;
+	va_start(ap,parformat);
+	vsprintf(parvalue, parformat, ap);
+
+	request* reqst;
+	for (reqst = first_reqst; reqst; reqst = reqst->next)
+	{
+		if (!strcmp(reqst->name, reqname))
+			add_value(reqst, parname, parvalue);
+	}
+}
+
+void MvRequest :: setValueToAll(const char* reqname, const char* parname, const char* value)
+{
+	set_value_to_requests(_overwrite, FirstRequest, reqname, parname, value);
+}
+
+
+void MvRequest :: setValueToAll(const char* reqname, const char* parname, int ivalue)
+{
+	char value[20];
+	sprintf(value, "%d", ivalue);
+	set_value_to_requests(_overwrite, FirstRequest, reqname, parname, value);
+}
+
+void MvRequest :: setValueToAll(const char* reqname, const char* parname, double fvalue)
+{
+	char value[20];
+	sprintf(value, "%.12g", fvalue);
+	set_value_to_requests(_overwrite, FirstRequest, reqname, parname, value);
+}
+
+void MvRequest :: addValueToAll(const char* reqname, const char* parname, const char* value)
+{
+	add_value_to_requests(FirstRequest, reqname, parname, value);
+}
+
+void MvRequest :: addValueToAll(const char* reqname, const char* parname, int ivalue)
+{
+	char value[20];
+	sprintf(value, "%d", ivalue);
+	add_value_to_requests(FirstRequest, reqname, parname, value);
+}
+
+void MvRequest :: addValueToAll(const char* reqname, const char* parname, double fvalue)
+{
+	char value[20];
+	sprintf(value, "%.12g", fvalue);
+	add_value_to_requests(FirstRequest, reqname, parname, value);
+}
+#endif
+
+int MvRequest::countParameters() const
+{
+	if(!CurrentRequest) return 0;
+	int n = 0;
+	parameter *p = CurrentRequest->params;
+	while(p)
+	{
+		n++;
+		p = p->next;
+	}
+	return n;
+}
+
+const char *MvRequest::getParameter(int i) const
+{
+	if(!CurrentRequest) return NULL;
+
+	int n = 0;
+	parameter *p = CurrentRequest->params;
+	while(p)
+	{
+		if(n++ == i) return p->name;
+		p = p->next;
+	}
+	return NULL;
+}
+
+bool MvRequest::iterInitParam( )
+{
+	CurrentParam = CurrentRequest->params;
+
+	return (CurrentParam ? true : false);
+}
+
+bool MvRequest::iterGetNextParamInterface(MvRequest& req)
+{
+	if( !CurrentParam )  //end of request
+		return false;
+
+	// clone the Interface request
+	request *r = CurrentParam->interface;
+	if ( r )
+	{
+		req = clone_all_requests(CurrentParam->interface);
+	}
+	else  	// if there is no Interface, creates a default one
+	{
+		req.clean();
+		req.setVerb("Interface");
+		req("interface") = "any";
+	}
+
+	CurrentParam = CurrentParam->next;
+	return true;
+}
+
+#if 0
+//-- following commented-out function is now (May 2008) obsolete
+const char* MvRequest :: enquire(const char* name, const char* classe, const char* keyw)
+{
+	const char* classe_value;
+	const char* cmd = NULL;
+	request* reqst = FirstRequest;
+
+	while (reqst)
+	{
+		if (!strcmp(name, reqst->name))
+		{
+			classe_value = get_value(reqst,"class",0);
+			if (classe_value && !strcmp(classe_value, classe))
+				cmd = get_value(reqst,keyw,0);
+		}
+		reqst = reqst->next;
+	}
+
+	return cmd;
+}
+#endif
+
+const char* MvRequest :: enquire(const char* name, const char* keyw, int posit)
+{
+	const char* value = NULL;
+	request* reqst = FirstRequest;
+
+	while (reqst && !value)
+	{
+		if (!strcmp(name, reqst->name))
+			value = get_value(reqst,keyw,posit);
+		reqst = reqst->next;
+	}
+	return value;
+}
+
+// Apply the application override parameters to the current request
+
+void MvRequest :: appOverrides(MvRequest& r)
+{
+	int i = -1;
+	const char *parname, *parvalue;
+
+	while( (parname = r("_APPLICATION_OVERRIDES",++i)) ) //-- xtra pranthesis to avoid warning
+	{
+		// reset parameter "parname"
+		unset_value(CurrentRequest, parname);
+
+		// copy parameter values from "r";
+		int j = -1;
+		while( (parvalue = r(parname,++j)) ) //-- xtra pranthesis to avoid warning
+			add_value(CurrentRequest, parname, parvalue);
+
+		// copy overrides
+		add_value(CurrentRequest, "_APPLICATION_OVERRIDES", parname);
+	}
+}
+
+void MvRequest :: merge(const MvRequest& r)
+{
+	update(r);                               //-- calls a member function (below)
+}
+
+void MvRequest :: mars_merge(const MvRequest& r)
+{
+	reqcpy(CurrentRequest,r.CurrentRequest); //-- calls a Mars function
+}
+
+void  MvRequest::update(const MvRequest& r)
+{
+	request *a = CurrentRequest;
+	const request *b = r.CurrentRequest;
+
+	if(!a || !b)
+		return;
+
+	parameter *p = b->params;
+	while(p)
+	{
+		// Parameter not found in the target request
+		if( find_parameter(a,p->name) == NULL )
+		{
+			p = p->next;
+			continue;
+		}
+
+		boolean b = false;
+		value *v = p->values;
+		while(v)
+		{
+			update_value(a,p->name,v->name,b);
+			b = true;
+			v = v->next;
+		}
+
+		if(p->subrequest)
+			set_subrequest(a,p->name,p->subrequest);
+
+		/* For marsgen */
+		{
+			parameter* q = find_parameter(a, p->name);
+			if(q) {
+				free_all_values(q->default_values);
+				q->default_values = clone_all_values(p->default_values);
+			}
+		}
+
+		p = p->next;
+	}
+}
+
+void MvRequest :: update_value(request *r,const char *parname,const char *valname,boolean append)
+{
+	parameter *p;
+	value     *v;
+
+	if(!r) return;
+
+
+	if( (p = find_parameter(r,parname)) == NULL )
+		return;
+
+	if(append)
+	{
+		value *a = p->values,*b= NULL,*c=NULL;
+		while(a)
+		{
+			b = a;
+			c = b;
+			a = a->next;
+		}
+		v = new_value(strcache(valname));
+		if(b) b->next = v;
+		else p->values = v;
+
+		p->count = 0;
+	}
+	else
+	{
+		if(p->values)
+		{
+			free_all_values(p->values->next);
+			p->values->next = NULL;
+			p->count = 0;
+			if(EQ(p->values->name,valname))
+				return;
+			else
+			{
+				strfree(p->values->name);
+				p->values->name = strcache(valname);
+			}
+		}
+		else
+		{
+			v = new_value(strcache(valname));
+			p->values = v;
+			p->count = 0;
+		}
+	}
+}
+
+MvRequest MvRequest::ExpandRequest ( const char* defName, const char* rulesName, long expandFlag )
+{
+	// Create the full path
+	string sdef   = MakeSystemEtcPath(defName);
+	string srules = MakeSystemEtcPath(rulesName);
+
+	MvLanguage langMetview ( sdef.c_str(),srules.c_str(),expandFlag );
+
+	return langMetview.expandOne ( CurrentRequest );
+}
+
+
+bool MvRequest::getPath(const char* par,string &resPath,bool canBeEmpty,string &errTxt)
+{		
+	const char *inPath=(*this)(par);
+	
+  	if(inPath && strlen(inPath) > 0)
+	{
+	  	resPath=string(inPath);
+	  		
+	  	if(resPath.at(0) == ' ')
+		{
+			errTxt="Leading whitespace in parameter: " + string(par) + "!";
+			return false;
+		}
+		
+		else if(resPath.at(0) != '/')
+		{
+			const char* callerIcon=(*this)("_NAME");
+			if(callerIcon)
+			{
+	  			string callerDir(callerIcon);	  	
+		        	char *mvudir=getenv("METVIEW_USER_DIRECTORY");
+		        	if(mvudir)  
+				{
+	  				callerDir=string(mvudir) + "/" + callerDir;
+				}	
+				string::size_type pos=callerDir.find_last_of("/");
+	 			if(pos != string::npos)
+				{
+		 			callerDir=callerDir.substr(0,pos);
+				}
+					
+				resPath=callerDir + "/" + resPath;
+			}	
+		}					
+	}
+	
+	if(!inPath || (resPath.empty() && canBeEmpty == false))
+	{
+		errTxt="No value is defined for parameter: " + string(par) + "!";
+		return false;
+	}
+	
+	return true;
+}
+	
+
+bool MvRequest::getPath(const char* iconPar,const char* textPar,string &resPath,bool canBeEmpty,string &errTxt)
+{			
+  	MvRequest dataR=(*this)(iconPar);
+	const char *dataPath=dataR("PATH");
+	
+	//First try to get the path from the icon object
+	if(dataPath)
+	{
+	  	resPath=string(dataPath);
+	}
+	//If there is no icon we use the text parameter to get the path
+	else
+	{
+	  	if(getPath(textPar,resPath,true,errTxt) != 0)
+		{ 
+			return false;
+		}
+	}
+	
+	if(!canBeEmpty && resPath.empty())
+	{
+	  	errTxt="No value found for paramaters: " + string(iconPar) + " " +  string(textPar); 
+		return 1;
+	}	
+	
+	return true;
+}	
+  
+  
+bool MvRequest::getValueId(const char* par,string& value,const std::map<string,string>& idMap,bool canBeEmpty,string &errTxt)
+{	
+	value.clear();
+	
+	const char *cval=(*this)(par);
+	
+	if(cval)
+  	{
+		value=string(cval);		
+		
+		if(idMap.empty() == false)
+		{
+		  	std::map<string,string>::const_iterator it=idMap.find(value); 
+		  	if(it != idMap.end())
+				value=it->second;
+			else
+			  	value.clear();
+		}			
+	}	
+	else
+	{
+	  	errTxt="Parameter not found: " + string(par);
+		return false;	
+	}
+	
+	if(!canBeEmpty && value.empty())
+	{
+		errTxt="No value found for paramater: " + string(par);
+		return false;
+	}
+	
+	return true;	
+}
+
+
+bool MvRequest::getValue(const char* par,string& value,bool canBeEmpty,string &errTxt)
+{
+	value.clear();
+	
+	const char *cval=(*this)(par);
+	
+	if(cval)
+  	{
+		value=string(cval);		
+	}
+	else
+	{  	
+	  	errTxt="Parameter not found: " + string(par);
+		return false;
+	}
+	
+	if(!canBeEmpty && value.empty())
+	{
+		errTxt="No value found for parameter: " + string(par);
+		return false;
+	}
+	
+	return true;	
+}
+
+bool MvRequest::getValue(const char* par,std::vector<string>& value,bool canBeEmpty,string &errTxt)
+{
+	value.clear();
+	
+	int cnt = countValues(par);
+	
+	if(cnt==0)
+	{
+	  	return false;
+	}
+	else if(cnt == 1)
+	{
+	  	const char *cval=(*this)(par);
+		if(cval)
+  		{		
+			value.push_back(string(cval)); 
+		}
+	}
+	else
+	{  
+		string val;
+		for( int i=0; i<cnt; i++)
+	     	{
+	      		const char *cval = (*this)(par,i );
+			if(cval)
+			{					
+				value.push_back(string(cval));
+			}						
+		}
+	}
+	
+	return true;
+}
+
+//===================================================================
+// MvAccess
+
+void MvAccess::operator+= (double val)
+{
+	if (LastGet) add_value(Request->CurrentRequest, LastGet, "%.12g", val);
+	LastGet = NULL;
+	LastIndex = 0;
+}
+
+MvAccess::operator Cached() const
+{
+	const char *p = *this;
+	return Cached(p);
+}
+
+MvAccess::operator MvRequest() const
+{
+	return MvRequest(get_subrequest(Request->CurrentRequest, LastGet, LastIndex),false);
+}
+MvConstAccess::operator Cached() const
+{
+	const char *p = *this;
+	return Cached(p);
+}
+
+MvConstAccess::operator MvRequest() const
+{
+	return MvRequest(get_subrequest(Request->CurrentRequest, LastGet, LastIndex),false);
+}
+
+
+MvValue::MvValue(double d)
+{
+	CurrentRequest = FirstRequest = empty_request("NUMBER");
+	set_value(CurrentRequest,"VALUE","%.12g",d);
+}
+
+MvValue::MvValue(const char *s)
+{
+	CurrentRequest = FirstRequest = empty_request("STRING");
+	set_value(CurrentRequest,"VALUE","%s",s);
+}
+
+MvGrib::MvGrib(const char *s)
+{
+	CurrentRequest = FirstRequest = empty_request("GRIB");
+	set_value(CurrentRequest,"PATH","%s",s);
+}
diff --git a/src/libMetview/MvRequest.h b/src/libMetview/MvRequest.h
new file mode 100644
index 0000000..11acab2
--- /dev/null
+++ b/src/libMetview/MvRequest.h
@@ -0,0 +1,626 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef MvRequest_DEFINED
+#define MvRequest_DEFINED
+
+class MvRequest;
+
+#include <mars.h>
+#include <Cached.h>
+#include <MvDate.h>
+#include <map>
+#include <vector>
+
+//!Class to help to access and convert values from/to a request
+/*! Metview provides classes MvRequest, MvAccess and MvConstAccess
+ *  that deal with the request structure.
+ *
+ *  MvAccess is transparent to the application programmer.
+ *  It is an implicit class that helps the extraction of
+ *  parameter values from a request and their assignment to C++
+ *  basic types (char, int, double).
+ *  It also helps the assignment of values to a parameter.\n
+ *  Examples:
+ * <PRE>
+ *    int getStep( MvRequest& r )
+ *    {
+ *       int step = r("STEP"); //-- MvAccess is used here implicitly
+ *       return step;
+ *    }
+ *
+ *    void putStep( MvRequest& r, int s )
+ *    {
+ *       r("STEP") = s; //-- MvAccess is used here implicitly
+ *    }
+ * </PRE>
+ *  Use a debugger to step into the commented lines, to see how
+ *  MvAccess object is created and used in getting/setting the
+ *  parameter value.
+ */
+
+class MvAccess {
+
+	friend class MvRequest;
+	friend class MvConstAccess;
+
+	MvRequest  *Request;
+	const char *LastGet;
+	int         LastIndex;
+
+public:
+	//! Constructor (used by non-const MvRequest objects)
+	MvAccess(MvRequest *r,const char *get,int idx) :
+		Request(r),LastGet(get),LastIndex(idx) {};
+
+	MvAccess(const MvAccess&);
+	void operator= (const MvAccess&);
+
+	void operator= (const char* val);
+	operator const char*() const;
+
+	void operator= (double val);
+	operator double() const;
+
+	void operator= (int val);
+	operator int() const;
+
+	void operator= (long val);
+	operator long() const;
+
+	void operator+=(const char* val);
+	void operator+=(double val);
+	void operator+=(const MvDate& val);
+
+	operator request*() const;
+	void operator=(const request*);
+	void operator+=(const request*);
+
+	void operator+=(const MvAccess&);
+
+	operator Cached() const;
+
+	operator MvRequest() const;
+
+	void operator=(const MvDate&);
+	operator MvDate() const;
+};
+
+//! Class to help to extract values from a request
+/*! Metview provides classes MvRequest, MvAccess and MvConstAccess
+ *  that deal with the request structure.
+ *
+ *  MvConstAccess - like MvAccess - is an implicit class that
+ *  helps the extraction of parameter values from a request and
+ *  their assignment to C++ basic types (char, int, double).
+ *  This class is used (implicitly) when the related MvRequest
+ *  object is const.\n \n
+ *  Example:
+ * <PRE>
+ *    int getStep( const MvRequest& r )
+ *    {
+ *       int step = r("STEP"); //-- MvConstAccess is used here implicitly
+ *       return step;
+ *    }
+ * </PRE>
+ *  Use a debugger to step into the commented line, to see how
+ *  MvConstAccess object is created and used in getting the
+ *  parameter value and casting it into int.
+ */
+
+class MvConstAccess {
+
+	friend class MvRequest;
+
+	const MvRequest *Request;
+	const char      *LastGet;
+	int              LastIndex;
+
+public:
+
+	//! Constructor (used by const MvRequest objects)
+	MvConstAccess(const MvRequest *r,const char *get,int idx) :
+		Request(r),LastGet(get),LastIndex(idx) {};
+
+	MvConstAccess(const MvConstAccess&);
+	MvConstAccess(const MvAccess&);
+
+	operator const char*() const;
+	operator double() const;
+	operator int() const;
+	operator long() const;
+	operator const request*() const;
+
+	operator Cached() const;
+	operator MvRequest() const;
+
+	operator MvDate() const;
+};
+
+
+//! \brief Class to handle the request structure
+//!
+//! MvRequest is a C++ wrapper around libMars structure 'request'
+//! and libMars C functions dealing with this structure.
+//! (Structure 'request' is defined in file src/libMars/rpcmars.h
+//! and most libMars request functions in files src/libMars/request.c
+//! and src/libMars/expand.c)
+//!
+//! Metview provides classes MvRequest, MvAccess and MvConstAccess
+//! that deal with the request structure. MvRequest is the explicit
+//! class used by Metview application programmers, whereas MvAccess
+//! and MvConstAccess are used implicitly "behind the scene".
+//!
+//! It is important to remember that a request may have subrequests
+//! as a parameter and requests may be concatenated in a single linked list.
+
+class MvRequest
+{
+	friend class MvAccess;
+	friend class MvConstAccess;
+
+private:
+	void _validate();
+	int  _overwrite;
+
+protected:
+
+	request *FirstRequest;
+	request *CurrentRequest;
+	value *  CurrentValue;
+	int      CurrentCount;
+	parameter *CurrentParam;
+
+	// This function is similar to put_value (libMars), but it only
+	// updates values that are common to both input and output requests
+	void update_value(request *r,const char *param,const char *valname,boolean append);
+    request *copyFromCurrentTo_Recursive(const request *r, const char *verb);
+
+public:
+
+	// Contructors
+
+	//! Constructor to create an empty request
+	/*! The command (request) name is taken from argument 'verb'.
+	 */
+	MvRequest(const char *verb);
+
+	//! Creates a MvRequest from libMars request structure 'req'
+	/*! If argument 'clone' is true, a copy of 'req' is done,
+	 *  otherwise a pointer to 'req' itself is stored in MvRequest.
+	 */
+	MvRequest(request *req = NULL, boolean clone = true);
+
+	//! Copy constructor
+	MvRequest(const MvRequest&);
+
+	virtual ~MvRequest();
+
+	// Assignement
+
+	//! Assignment operator
+	MvRequest& operator = (const MvRequest& r);
+	//MvRequest& operator = (const request*);
+
+    void copyFromCurrent( const MvRequest& );
+    void copyFromCurrentTo( const MvRequest&, const char *verb);
+
+	//! Concatenation operator
+	/*! The operator+ concatenates two MvRequest and returns the resulting
+	 *  MvRequest.\n \n
+	 *  Example:
+	 * <PRE>
+	 *    MvRequest r1("FIRST"), r2("SECOND"), r3;
+	 *    r3 = r1 + r2;   //-- r3 contains FIRST concatenated to SECOND
+	 * </PRE>
+	 */
+	MvRequest operator+(const MvRequest& r) const;
+
+	//! Concatenates an MvRequest to an existing MvRequest, e.g. a += b;
+	void operator+=(const MvRequest& r);
+
+	//! Returns a pointer to the internal libMars request structure
+	operator request*() const { return CurrentRequest; }
+
+	//! Returns 1 (true) when MvRequest object contains no requests
+	int operator ! ()   const { return CurrentRequest == NULL; }
+
+	//! Access the 'n'th value in list parameter 'p'
+	/*! Returns a MvAccess object, which normally is not visible
+	 *  in user code (like in the example below).\n \n
+	 *  NOTE 1: Method uses C style indexing (n=0,1,...).\n
+	 *  NOTE 2: To access long lists of values, it is better to use
+	 *  methods 'iterInit' and 'iterGetNextValue'.\n \n
+	 *  Example:
+	 * <PRE>
+	 *    MvRequest r1("RETRIEVE"); //-- RETRIEVE
+	 *    r1("LEVELIST") = 500;     //-- RETRIEVE,LEVELIST=500
+	 *    r1("LEVELIST",1) = 750;   //-- RETRIEVE,LEVELIST=500/750
+	 *    //...
+	 *    const char* lev = r1("LEVELIST",1);//-- lev points to "750"
+	 * </PRE>
+	 *  Note that the example above could have been written also like this:
+	 * <PRE>
+	 *    MvRequest r1("RETRIEVE");     //-- RETRIEVE
+	 *    r1.setValue("LEVELIST",500);  //-- RETRIEVE,LEVELIST=500
+	 *    r1.addValue("LEVELIST",750);  //-- RETRIEVE,LEVELIST=500/750
+	 *    //...
+	 *    const char* lev;
+	 *    r1.getValue(lev,"LEVELIST",1);//-- lev points to "750"
+	 * </PRE>
+	 */
+	MvAccess operator()(const char* p,int n)  { return MvAccess(this,p,n); }
+
+	//! Read the (first) value of parameter 'p'
+	MvAccess operator()(const char* p)        { return MvAccess(this,p,0); }
+
+	//! Read the 'n'th value from list parameter 'p'
+	/*! Returns a MvConstAccess object, which normally is not visible.\n \n
+	 *  NOTE 1: Method uses C style indexing (n=0,1,...).\n
+	 *  NOTE 2: To access long lists of values, it is better to use
+	 *  methods 'iterInit' and 'iterGetNextValue'.
+	 */
+	MvConstAccess operator() (const char* p,int n) const
+		{ return MvConstAccess(this,p,n); }
+
+	//! Read the (first) value of parameter 'p'
+	MvConstAccess operator() (const char* p) const
+		{ return MvConstAccess(this,p,0); }
+
+	// -----
+
+	//! Reads the 'n'th value from parameter 'p' into int variable 'v'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	void getValue(int& v, const char* p, int n=0)        const;
+
+	//! Reads the 'n'th value from parameter 'p' into double variable 'v'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	void getValue(double& v, const char* p, int n=0)     const;
+
+	//! Reads the 'n'th value from parameter 'p' into const char* variable 'v'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	void getValue(const char*& v, const char* p, int n=0)const;
+
+	//! Reads the 'n'th value from parameter 'p' into Cached variable 'v'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	void getValue(Cached& v, const char* p, int n=0)     const;
+
+	//! Reads the 'n'th value from parameter 'p' into void* variable 'v'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	void getValue(void*& v, const char* p, int n=0)      const;
+
+	//! Reads the 'n'th value from parameter 'p' into MvRequest variable 'v'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	void getValue(MvRequest& v, const char* p,int n=0)   const;
+
+
+	//! Extracts the 'n'th subrequest from parameter 'p'
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	MvRequest  getSubrequest(const char* p, int n=0)    const;
+
+	//! Return the name of the command/request
+	const char *getVerb()                     const;
+
+	//! Initialise the list iterator for a list valued parameter
+	/*! Using method 'operator()(const char* p,int n)' to access
+	 *  list valued parameters where the list contains thousands
+	 *  of values, gets very slow. The required time with this
+	 *  method grows exponentially, relative to the lenght of
+	 *  the list.
+	 *
+	 *  Methods 'iterInit' and 'iterGetNextValue' are provided
+	 *  to speed up accessing such long list valued parameters.
+	 *  The required time with this iterator method grows
+	 *  linearly, relative to the length of the list.
+	 *
+	 *  Use method 'iterInit' to tell the list iterator which parameter
+	 *  contains the list to be iterated, and to get the length of
+	 *  the list. Then use 'iterGetNextValue' to read each value,
+	 *  one by one.
+	 *
+	 *  Example on how to read curve X and Y values from MvRequest
+	 *  'req' into double arrays x[] and y[]:
+	 * <PRE>
+	 *    int cnt = req.iterInit( "X_VALUES" );
+	 *    for( int i=0; i<cnt; ++i )
+	 *       req.iterGetNextValue( x[i] );
+	 *
+	 *    req.iterInit( "Y_VALUES" ); //-- assume same number of values
+	 *    for( int i=0; i<cnt; ++i )
+	 *       req.iterGetNextValue( y[i] );
+	 * </PRE>
+	 *  The following code will do the same, but here the required
+	 *  computing resources grow exponentially:
+	 * <PRE>
+	 *    int cnt = req.countValues( "X_VALUES" ); //-- assume ok also for Y
+	 *    for( int i=0; i<cnt; ++i )
+	 *    {
+	 *       x[i] = req( "X_VALUES", i );
+	 *       y[i] = req( "Y_VALUES", i );
+	 *    }
+	 * </PRE>
+	 */
+	int  iterInit( const char* param );  //-- returns 'param' count
+
+	//! Get current value as 'char*' and advance the list iterator
+	/*! If no more values are available in the list, returns
+	 *  'false' and sets argument 'val' to 0 (NULL pointer);
+	 *  otherwise returns 'true' and returns the current list
+	 *  item in argument 'val', and then advances the list iterator.
+	 */
+	bool iterGetNextValue( const char*& val );
+
+	//! Get current value as 'double' and advance the list iterator
+	/*! If no more values are available in the list, returns
+	 *  'false' and sets argument 'val' to 0;
+	 *  otherwise returns 'true' and returns the current list
+	 *  item in argument 'val', and then advances the list iterator.
+	 */
+	bool iterGetNextValue( double& val );
+
+	// -----
+	//! Advance to the next subrequest
+	/*! When a MvRequest object contains more than one request in a single
+	 *  linked list, this method allows the sequential access to all of them.
+	 *  Each time this method is called, it advances the current request
+	 *  to the next one in the list and returns it. A NULL is returned when
+	 *  the current request points to the end of the list.\n \n
+	 *  Example:
+	 * <PRE>
+	 *    MvRequest r1("FIRST"), r2("SECOND"), r3, r4;
+	 *    r3 = r1 + r2;      // r3 contains FIRST concatenated to SECOND
+	 *    r4 = r3.advance(); // r4 contain only SECOND request.
+	 * </PRE>
+	 */
+	MvRequest& advance();
+
+     // Advance to the next verb request
+     MvRequest& advanceTo ( string& );
+
+     // Advance to after the next verb request
+     MvRequest& advanceAfter ( string& );
+
+     // Advance to the end of all requests
+     void advanceToEnd ();
+
+	//! Sets the FirstRequest pointer to point to the CurrentRequest
+	/*! This method was written for the specific purpose of updating
+     *  the request in a PmContext without copying the whole thing.
+     *  It has the potential for a memory leak, but that should be
+     *  outweighed by the increase in speed and decreased memory accumulation
+     *  during large plot commands.
+	 */
+	void setFirstToCurrent();
+
+	//! Rewind the whole request
+	/*! This method rewinds the linked list and returns
+	 *  the first request in the list.
+	 */
+	MvRequest& rewind();
+
+	//! Extracts the current (sub)request from a (multi) request list structure
+	/*! Use this method if you need to modify and/or forward just one
+	 *  subrequest that is embedded in a MvRequest containing many subrequests.
+	 */
+	MvRequest  justOneRequest() const; // Get just one request
+
+	// -----
+	//! Sets double value 'v' to parameter 'p'
+	void setValue(const char* p, double v);
+
+	//! Sets int value 'v' to parameter 'p'
+	void setValue(const char* p, int v);
+
+	//! Sets const char* value 'v' to parameter 'p'
+	void setValue(const char* p, const char* v);
+
+	//! Sets request* value 'v' to parameter 'p'
+	void setValue(const char* p, const request* v);
+
+	//! Sets MvRequest* value 'v' to parameter 'p', as a subrequest
+	void setValue(const char* p, const MvRequest& v);
+
+	//! Sets long value 'v' to parameter 'p'
+	void setValue(const char* p, long v);
+
+	//! Sets void* value 'v' to parameter 'p'
+	void setValue(const char* p, const void* v);
+
+
+	//! Sets/changes the command verb to 'cmd'
+	void setVerb(const char* cmd);
+
+
+	//! Unsets (removes) parameter 'pname'
+	void unsetParam(const char* pname);
+
+	// -----
+
+	//! Returns the number of parameters
+	int    countParameters() const;
+
+	//! Returns the name of the 'n'th parameter
+	/*! NOTE: Method uses C style indexing (n=0,1,...) */
+	const char  *getParameter(int n) const;
+
+	//! Initialize Parameter structure
+	/*! If structure Parameter is empty, returns 'false';
+	 *  otherwise, returns 'true'.
+	*/
+	bool iterInitParam( );
+
+	//! Get 'Interface' request from the current 'parameter'
+	//! and advance the list iterator
+	/*! If no more parameter is available in the current request,
+	 *  returns 'false' and sets output request to empty;
+	 *  otherwise, returns 'true' and returns the Interface request
+	 *  related to the current parameter.
+	 */
+	bool iterGetNextParamInterface( MvRequest& );
+
+	//! Merges input request with current MvRequest using 'update' function
+	/*! This function does a "partial merge". Only common parameters are updated,
+	 *  i.e. those parameters in 'req' that do not exist in the current object are skipped.
+	 */
+	void   merge(const MvRequest& req);
+
+	//! Merges input request with current MvRequest using a function from Mars
+	/*! This function does a "full merge" using Mars function 'reqcpy()'.
+	 *  If requests contain parameters with same names, it looks like the
+	 *  the values from 'req' overwrite original values (needs to be checked).
+	 */
+	void   mars_merge(const MvRequest& req);
+
+	//! Update current MvRequest.
+	/*! This routine is similar to 'mars_merge' function
+	 *  but only common parameters are updated
+	 */
+	void update(const MvRequest&);
+
+	// -----
+
+	//! Adds double value 'v' to list parameter 'p'
+	void addValue(const char* p, double v);
+
+	//! Adds int value 'v' to list parameter 'p'
+	void addValue(const char* p, int v);
+
+	//! Adds const char* value 'v' to list parameter 'p'
+	void addValue(const char* p, const char* v);
+
+	//! Adds long value 'v' to list parameter 'p'
+	void addValue(const char* p, long v);
+
+	//! Adds request* value 'v' to list parameter 'p'
+	void addValue(const char* p, const request* v);
+
+	//! Adds MvRequest* value 'v' to list parameter 'p'
+	void addValue(const char* p, const MvRequest& v);
+
+	//! Adds void* value 'v' to list parameter 'p'
+	void addValue(const char* p, const void* v);
+
+	//! Returns the number of values in parameter 'pname'
+	/*! Mostly used for list valued parameters
+	 */
+	int	countValues(const char* pname) const;
+
+	//! Prints the request to standard output
+	/*! Hidden parameters are not printed (unless -DEBUG flag
+	 *  is used, or mars.debug is set to non-zero)
+	 */
+	void print() const;
+
+	//! Reads a request from file named 'file'
+	void read(const char* file);
+
+	//! Saves a request into file named 'file'
+	void save(const char* file) const;
+
+	//! Saves a request into an open writable C FILE*
+	void save(FILE* file) const;
+
+	// -----
+	// add of those method should not be there B.R.
+
+	//! Handles parameters marked with "_APPLICATION_OVERRIDES" in 'req'
+	/*! All parameters marked with "_APPLICATION_OVERRIDES" parameter
+	 *  in 'req' are either replaced (if a new value is given in 'req')
+	 *  or unset (if no new value given in 'req').
+	 */
+	void appOverrides(MvRequest& req);
+
+#if 0
+//-- following commented-out functions are now (May 2008) obsolete
+	// Functions that apply to every request
+
+	//! Obsolete method?
+	/*! Was used only by VisMod in VisMod/MagJob.cc (before Magics 6 and PlotMod)
+	 */
+	void noOverwrite() { _overwrite = 0; }
+
+	//! Obsolete methods?
+	/*! All three 'setValueToAll' methods were used only by VisMod
+	 *  in VisMod/MagJob.cc (before Magics 6 and PlotMod)
+	 */
+	void setValueToAll(const char*, const char*, double);
+	void setValueToAll(const char*, const char*, int);
+	void setValueToAll(const char*, const char*, const char*);
+
+	//! Obsolete methods?
+	/*! All three 'addValueToAll' methods were used only by VisMod
+	 *  in VisMod/MagJob.cc (before Magics 6 and PlotMod)
+	 */
+	void addValueToAll(const char*, const char*, double);
+	void addValueToAll(const char*, const char*, int);
+	void addValueToAll(const char*, const char*, const char*);
+
+	//! Not used, or is it?
+	const char* enquire(const char* request_name,
+		const char* classtype,
+		const char* keyword) ;
+	//	enquire value
+	//	Note: strip command and allocate string
+#endif
+
+	//! Used by PlotMod/uPlot
+	const char* enquire(const char* request_name,
+		const char* keyword, int posit = 0) ;
+	//	enquire value
+	//	Note: does not allocate string
+
+	// Clean request
+	//! Removes everything, making the request empty
+	void clean();
+
+	// Expand request
+	MvRequest ExpandRequest ( const char*, const char*, long );
+	
+	
+	//Find out path (it can be relative path as well) stored in parameter par.
+	bool getPath(const char* par,string& resPath,bool canBeEmpty,string &errTxt);
+	bool getPath(const char* iconPar,const char* textPar,string &resPath,bool canBeEmpty,string &errTxt);
+	bool getValueId(const char* par,string& value,const std::map<string,string>& idMap,bool canBeEmpty,string &errTxt);
+	bool getValue(const char* par,string& value,bool canBeEmpty,string &errTxt);
+	bool getValue(const char* par,std::vector<string>& value,bool canBeEmpty,string &errTxt);
+	
+};
+
+//! Convenience class (not used currently)
+/*! MvValue is a convenience class to easily create NUMBER
+ *  and STRING requests. Although this class is not used
+ *  currently (May 2008), it could be used in the future.
+ */
+class MvValue : public MvRequest {
+public:
+	//! Constructor for NUMBER request
+	/*! Creates a NUMBER request with a VALUE parameter.
+	 *  Argument 'v' is assigned as the value for VALUE.
+	 */
+	MvValue(double v);
+
+	//! Constructor for STRING request
+	/*! Creates a STRING request with a VALUE parameter.
+	 *  Argument 's' is assigned as the value for VALUE.
+	 */
+	MvValue(const char* s);
+};
+
+//! Convenience class (not used currently)
+/*! MvGrid is a convenience class to easily create
+ *  GRIB requests. Although this class is not used
+ *  currently (May 2008), it could be used in the future.
+ */
+class MvGrib : public MvRequest {
+public:
+	//! Constructor, with GRIB file path name as an argument
+	MvGrib(const char* path);
+};
+#endif
diff --git a/src/libMetview/MvScanFileType.cc b/src/libMetview/MvScanFileType.cc
new file mode 100644
index 0000000..fe879b5
--- /dev/null
+++ b/src/libMetview/MvScanFileType.cc
@@ -0,0 +1,575 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <string>
+#include "inc_iostream.h"
+#include "inc_stl.h"
+#include "mars.h"
+
+#include "MvScanFileType.h"
+
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+
+#include "netcdfcpp.h"
+
+
+enum eFileType              //-- types checked by local func 'SearchMarsParserBreakers'
+{
+   eMissingFile
+  ,eBinaryFile
+  ,eNumericTextFile
+  ,eOtherTextFile
+};
+
+static const char* MvNetcdfType(const char* file,bool checkStatus=false);
+
+//_______________________________________________________________________
+//
+// This function is used to check for files that contain only numeric
+// values and thus cannot be Metview requests, but which can break
+// MARS parser if allowed to be parsed (late 2006 MARS parser was
+// modified to allow IDENT to contain '+' and spaces => too long IDENT!).
+//
+// Accept characters that are used in files containing only numbers:
+// digits, plus, minus, decimal point, exponent char e/E and spaces
+//
+
+static bool isValidForNumbersOnly( int c )
+{
+   if( isdigit(c) )
+      return true;
+
+   if( isspace(c) )
+      return true;
+
+   if(  c == '.' || c == '-' || c == '+' )
+      return true;
+
+   if( c == 'e' || c == 'E' )
+      return true;
+
+   return false;
+}
+
+
+//_______________________________________________________________________
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct File {            //-- wrapper function always closes the file
+
+  FILE *f_;
+
+public:
+  File(const char *name, const char *mode) { f_ = fopen(name,mode); };
+  ~File()                     { if(f_) fclose(f_);   };
+};
+#endif
+
+
+//_______________________________________________________________________
+//
+// This function is used to find files that may break MARS parser,
+// e.g. binary files and numeric-values-only text files (like the
+// one produced by Cross Section).
+
+static eFileType SearchMarsParserBreakers( const char* fileName )
+{
+   File f(fileName, "r");             //-- will be closed automatically
+
+   if(!f.f_)
+     return eMissingFile;             //-- missing file
+
+   bool isBinary      = false;
+   bool isNumbersOnly = true;
+   const int CHECKLEN = 4000;         //-- may be a huge PostScript file
+                                      //-- => check beginning only is ok
+   char buf;
+   int  chr;
+
+   int readCount = fread(&buf, 1, 1, f.f_);
+   chr = (int) buf;
+
+   for( int ci=0; ci<CHECKLEN; ++ci ) //-- look for "binary" chars
+     {
+       if( feof(f.f_) )
+         break;
+
+       if( ! isprint(chr) && ! isspace(chr) )
+         {
+           isBinary = true;           //-- binary file, stop here
+           break;
+         }
+
+       if( isNumbersOnly )
+           isNumbersOnly = isNumbersOnly && isValidForNumbersOnly(chr);
+
+       readCount = fread(&buf, 1, 1, f.f_);
+       chr = (int) buf;
+     }
+
+   if( isBinary )
+      return eBinaryFile;             //-- binary files break MARS parser
+
+   if( isNumbersOnly )
+      return eNumericTextFile;        //-- 'numbers only' may break MARS parser
+
+   return eOtherTextFile;             //-- other files should be parsable
+}
+
+
+// scan_file_extension
+// - checks whether the extension on the given file matches the given
+//   extension, and returns the corresponding Metview class name
+//   if it does
+
+inline static bool scan_file_extension (const char *file, int length, const char *ext)
+{
+  int ext_length = strlen (ext);
+
+  return (length >= ext_length && !strcasecmp (&file[length-ext_length], ext));
+}
+
+// Checks if a directory is an ODB database
+
+static bool scanDirForOdb(const char *dir)
+{
+    DIR *dp;
+    struct dirent *dirp;
+    if((dp  = opendir(dir)) == NULL) 
+    {
+        cout << "scanDirForOdb() --> Error(" << errno << ") opening " << dir << endl;
+        return false;
+    }
+
+    bool retval=false;	
+    string::size_type pos;
+    while ((dirp = readdir(dp)) != NULL) 
+    {
+	string name(dirp->d_name);
+
+	//cout << "dir: " << name;
+	if((pos=name.find(".sch")) != string::npos &&
+            name.size() >= 5  && pos > 0 && pos+4 == name.size())
+	{
+		retval=true;
+		break;
+	} 	
+    }
+    closedir(dp);
+    return retval;
+}
+
+
+//_______________________________________________________________________
+
+//
+// NOTE: a close cousin of scan_file(...) is in ./src/libMars/guess.c !!!
+//
+
+static const char *scan_file(const char *file)
+{
+
+  const int cMAXSHIFT = 8; //-- search tolerance for word "GRIB" or "BUFR"
+  const int cMINREAD  = 4; //-- need to be able to read at least this much
+  int length = (file != NULL) ? strlen (file) : 0;
+
+  eFileType fileType = SearchMarsParserBreakers( file ); //-- binary? only numeric values?
+
+  File f(file,"r");
+  if(!f.f_)
+    return "BAD";                 //-- missing or non-readable file
+
+
+
+  // check the file extension first - remember to put the longest
+  // ones at the start.
+  if (scan_file_extension (file, length, ".tar.gz"))  return "TAR_GZ";
+  if (scan_file_extension (file, length, ".tar.bz"))  return "TAR_BZ2";
+  if (scan_file_extension (file, length, ".tar.bz2")) return "TAR_BZ2";
+  if (scan_file_extension (file, length, ".tar"))     return "TAR";
+  if (scan_file_extension (file, length, ".magml"))   return "MAGML";
+  if (scan_file_extension (file, length, ".html"))    return "HTML";
+  if (scan_file_extension (file, length, ".zip"))     return "ZIP";
+  if (scan_file_extension (file, length, ".gif"))     return "GIF";
+  if (scan_file_extension (file, length, ".tiff"))    return "TIFF";
+  if (scan_file_extension (file, length, ".tif"))     return "TIFF";
+  if (scan_file_extension (file, length, ".svg"))     return "SVG";
+  if (scan_file_extension (file, length, ".kml"))     return "KML";
+  if (scan_file_extension (file, length, ".kmz"))     return "KML";
+  if (scan_file_extension (file, length, ".mv"))      return "MACRO";
+  if (scan_file_extension (file, length, ".csv"))     return "TABLE";
+  if (scan_file_extension (file, length, ".tsv"))     return "TABLE";
+  //if (scan_file_extension (file, length, ".odb"))     return "ODB_DB";
+
+  // check the file extension for known types
+  /*
+  char *ext = strrchr (filename, '.');
+  
+  if (ext != NULL)
+  {
+    ext++;  // proceed to the first character after the dot
+
+    if (!strcasecmp (ext, "tar")) return "TAR";
+    if (!strcasecmp (ext, "zip")) return "ZIP";
+    if (!strcasecmp (ext, "gif")) return "GIF";
+    
+
+    // either treat .gz as a gzip file or else see if it is a .tar.gz file
+    if (!strcasecmp (ext, "gz"))
+    {
+      char *prev_ext;
+
+      *(ext-1) = '\0';  // 
+
+      prev_ext = strrchr (filename, '.');
+      
+      if (prev_ext != NULL && prev_ext >= file)
+      {
+        prev_ext++;
+        if (!strcasecmp (prev_ext, "tar")) return "TAR_GZ";
+        else                               return "GZ";
+      }
+      else
+      {
+        return "GZ";
+      }
+    }
+  }
+*/
+
+
+  union {
+    char  c;
+    short s;
+    long  l;
+    char  ch[ cMAXSHIFT + 4 ];
+  } buf;
+  memset(&buf,0,sizeof(buf));
+
+  int readCount = fread((char*)&buf,1,sizeof(buf),f.f_);
+
+  if( readCount < cMINREAD )      //-- if not enough bytes for safe tests
+    {
+      return fileType == eBinaryFile ? "BINARY" : "NOTE";
+    }
+
+
+  if( fileType == eBinaryFile )           //-- first check for binary types
+  {
+      for( int s=0; s <= cMAXSHIFT; ++s ) //-- for GRIB & BUFR allow some leading rubbish
+      {
+        if(strncmp(buf.ch+s,"GRIB",4) == 0)
+          return "GRIB";
+
+        if(strncmp(buf.ch+s,"BUFR",4) == 0)
+          return "BUFR";
+
+        if(strncmp(buf.ch+s,"ODA",3) == 0)
+           return "ODB_DB";
+      }
+
+      if(strncmp(buf.ch,"TIDE",4) == 0)
+        return "GRIB";
+
+      if(strncmp(buf.ch,"BUDG",4) == 0)
+        return "GRIB";
+
+      if(strncmp(buf.ch,"CDF",3) == 0)
+	return MvNetcdfType(file);  
+		
+      if(strncmp(buf.ch,"V5D",3) == 0)
+        return "VIS5D_FILE";
+
+      if(strncmp(buf.ch+1,"PNG",3) == 0)
+        return "PNG";
+
+      if(strncmp(buf.ch+6,"JFIF",4) == 0)
+        return "JPEG";                //--  JPEG - JFIF
+
+      if(strncmp(buf.ch+6,"Exif",4) == 0)
+        return "JPEG";                //--  JPEG - EXIF/DCF
+
+      if(strncmp(buf.ch,"%PDF",4) == 0)   // PDF can be binary
+        return "PDF";
+  }
+
+  //We have to call it after FLEXTRA (see belows) since 
+  //FLEXTRA v5 generates ASCII files with some rubbish in them and
+  //we identify them as BINARY files!!
+  
+  //if( fileType == eBinaryFile )   //-- rest of the known types are all text files
+  //    return "BINARY";            //-- thus this one is of unknown binary type
+
+  if( fileType == eNumericTextFile )
+      return "NOTE";   //"NUMERIC"; //-- need to avoid MARS parser!
+
+                                  //-- check for text types that cannot be requests
+                                  //-- fileType must be eOtherTextFile
+  if(strncmp(buf.ch,"%!",2) == 0)
+    return "PSFILE";
+
+  if(strncmp(buf.ch,"%PDF",4) == 0) // PDF can be text
+    return "PDF";
+
+  if(strncmp(buf.ch,"#!",2) == 0)
+    return "SHELL";
+
+  if(strncmp(buf.ch,"#GEO",4) == 0)
+    return "GEOPOINTS";
+
+  if(strncmp(buf.ch,"#LLM",4) == 0)
+    return "LLMATRIX";
+
+  if(strncmp(buf.ch,"#LLV",4) == 0)
+    return "LLVALUE";
+
+  if(strncmp(buf.ch,"#MACRO",6) == 0   || strncmp(buf.ch,"# Macro",7) == 0)
+    return "MACRO";
+  if(strncmp(buf.ch,"#Metview",8) == 0 || strncmp(buf.ch,"# Metview",9) == 0)
+    return "MACRO";
+
+  if(strncmp(buf.ch,"<magics",7) == 0)
+    return "MAGML";
+
+  if(strncmp(buf.ch,"#obstat scatter",15) == 0)
+    return "OBSTAT_SCATTER";
+ 
+  if(strncmp(buf.ch,"#obstat",7) == 0)
+    return "OBSTAT_CURVE";
+  
+  
+  
+#if 0
+                                  //-- check if a Metview request
+
+                                       //-- WARNING (2004-05-10):
+  request *r = read_request_file(file);//-- a file NOT ending in CR can crash parser!!!
+  if(r != 0)
+    {
+      string name = r->name?r->name:"";
+      free_all_requests(r);
+
+      map<string,const IconClass*>::iterator j = classes.find(name);
+      if(j != classes.end())
+        {
+    return (*j).second->name().c_str();  //-- it is Metview request
+        }
+    }
+#endif
+
+  rewind(f.f_);
+
+  //-- Check for custom ASCII files 
+  // We need at least 311 characters for flextra!
+  char asciiBuf[400];
+  fread((char*)&asciiBuf,1,311,f.f_);
+  //Flextra output files
+  if(strstr(asciiBuf,"FLEXTRA MODEL OUTPUT") != 0)
+  {
+	return "FLEXTRA_FILE";
+  }
+  //IFS namelist file
+  else if(strstr(asciiBuf,"&NAM") != 0 || 
+          strstr(asciiBuf,"&NAE") != 0 ||
+          strstr(asciiBuf,"&NEM") != 0)
+  {
+    	return "NAMELIST";
+  }	
+  rewind(f.f_);
+
+   //-- Check for IFS fortran namelists
+  
+  
+  
+  
+  //We have to do this check at this point, after
+  //FLEXTRA was checked! 
+  if( fileType == eBinaryFile )   
+      return "BINARY";            
+
+  //-- Look for a Vis5D control script
+
+  unsigned char c = ' ';          //-- look for a Vis5D control script
+  const int cMAXLINESTOCHECK = 25;
+  char line[512];
+  int i = 0;
+  int lines_checked = 0;
+  line[0] = 0;
+  while(!feof(f.f_) && lines_checked < cMAXLINESTOCHECK)
+    {
+      fread((char*)&c,1,1,f.f_);
+
+      if(i == sizeof(line) || c == '\n')
+        {
+    i = 0;
+          lines_checked++;
+    if(strncmp("vis5d_",line,6) == 0)
+      return "VIS5D_SCRIPT";
+        }
+      else
+        line[i++] = c;
+    }
+
+
+  fclose( f.f_ );                 //-- destructor will not close (end-of-file => !f.f_)
+  f.f_ = 0;                       //-- but after fclose destructor would try and...
+
+  return "NOTE";                  //-- unknown text file; make it NOTE
+}
+
+//_______________________________________________________________________
+
+//static string guess_file(const char* file) //-- old name in MetviewUI
+
+string ScanFileType(const char* file)
+{
+
+  struct stat buf;
+
+  if(stat(file,&buf) <0)
+    return "BAD";
+
+  switch(buf.st_mode & S_IFMT)
+  {
+    case S_IFDIR:
+      return (scanDirForOdb(file)==true)?"ODB_DB":"FOLDER";
+    case S_IFREG:
+      return scan_file(file);
+
+    default:
+      return "SPECIAL";
+  }
+
+}
+
+//_______________________________________________________________________
+
+//----
+//--- Check if a file is a binary file or a missing file i.e.
+//--  does the file have any chance to contain a Metview request!
+//-
+
+bool
+IsBinaryOrMissingFile( const char* fileName )
+{
+   eFileType t = SearchMarsParserBreakers( fileName );
+   return t == eBinaryFile || t == eMissingFile;
+}
+
+//_______________________________________________________________________
+
+int
+MvGribVersion( const char* fileName )
+{
+  File f( fileName, "r" );
+  if( ! f.f_ )
+    return -13;                 //-- missing or non-readable file
+
+  char buf[ 10 ];
+
+  fread( buf, 1, 9, f.f_ );
+
+  int gribVersion = buf[7];     //-- octet 8
+
+  return gribVersion;
+}
+
+//----------------------------------------------------------------------------
+//
+// Here we suppose that the file type was identified as ODB previously. Now
+// we want to find out the type only!!
+//
+//----------------------------------------------------------------------------
+
+string MvOdbType(const char* file,bool scanBeforeCheck)
+{
+	string t;
+
+	if(scanBeforeCheck)
+	{
+		t=ScanFileType(file);
+		if(t != "ODB_DB")
+		{	
+			return t;
+		}
+	}
+	
+	//At this point type has to be ODB_DB
+	//We check if it is a file or directory
+
+	struct stat buf;
+
+ 	if(stat(file,&buf) <0)
+    		return "BAD";
+
+     	if(buf.st_size ==0 )
+		return "NOTE";
+	
+	switch(buf.st_mode & S_IFMT)
+  	{
+    	case S_IFDIR:
+		return "ODB_OLD";
+  		break;
+  	case S_IFREG:
+		return "ODB_NEW";
+		break;
+    	default:
+      		return "SPECIAL";
+  	}
+  	
+  	return "BAD";
+}
+
+const char* MvNetcdfType(const char* file,bool checkStatus)
+{
+	if(checkStatus)
+	{  	
+		struct stat buf;
+ 		if(stat(file,&buf) <0)
+    			return "BAD";		
+		else if(buf.st_size ==0 )
+			return "NOTE";
+	}
+	
+	NcFile nc(file);	
+	if(!nc.is_valid())
+	{  
+		return "BINARY";
+	}	
+	  
+	//Check for SCM input data
+	int n=nc.num_atts();
+	for(int i=0; i < n; i++)
+	{  	
+		NcAtt* att=nc.get_att(i);
+		if(att != NULL && att->name() != NULL && 
+		   strcmp(att->name(),"dataID") == 0 && att->num_vals() > 0)
+		{  
+			char* v=att->as_string(0);
+			if(v)
+			{
+		  		string vStr(v);
+				if(vStr.find("scm_") == 0 || vStr.find("SCM_INPUT") == 0)
+				{
+					return "SCM_INPUT_DATA";
+				}
+				else if(vStr.find("SCM_OUTPUT") == 0)
+				{
+					return "SCM_OUTPUT_DATA";
+				}
+			}
+		}
+		if(att != NULL)
+			delete att;
+	}
+	
+	return "NETCDF";
+}
diff --git a/src/libMetview/MvScanFileType.h b/src/libMetview/MvScanFileType.h
new file mode 100644
index 0000000..eb935e7
--- /dev/null
+++ b/src/libMetview/MvScanFileType.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//--  MvScanFileType.h  --  Jun05
+//
+// Code moved from MetviewUI in order to reuse it in Macro!
+//
+
+#ifndef MvScanFileType_H
+#define MvScanFileType_H
+
+#include <string>
+using std::string;
+
+#include "MvRequest.h"
+
+//! \file MvScanFileType.h
+//! \brief Utilities to scan for the type of a file
+
+//! \fn ScanFileType
+//! \brief A function to examine file type
+//!
+//! This function is used to find out what is the type
+//! of the file given as a parameter.
+string ScanFileType( const char* fileName );
+
+//-- check if file is missing a binary file --
+bool IsBinaryOrMissingFile( const char* fileName );
+
+int       MvGribVersion( const char* fileName );
+MvRequest MvConvertToGrib1( const MvRequest& gribRequest );
+string 	  MvOdbType(const char* fileName, bool scanBeforeCheck=false);
+
+#endif
diff --git a/src/libMetview/MvSerie.cc b/src/libMetview/MvSerie.cc
new file mode 100644
index 0000000..6381f81
--- /dev/null
+++ b/src/libMetview/MvSerie.cc
@@ -0,0 +1,240 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <stdarg.h>
+#include <math.h>
+
+
+
+MvSerie::MvSerie() : Header("MAGICS_PARAMETERS"), 
+					 Data("CURVE"), HAxis("PAXIS"), 
+					 VAxis("PAXIS"), Magics("PGRAPH")
+{
+	init();
+}
+
+MvSerie::MvSerie(char* t) : Header("MAGICS_PARAMETERS"), 
+						 Data(t), HAxis("PAXIS"), 
+						 VAxis("PAXIS"), Magics("PGRAPH")
+{
+	init();
+}
+
+void MvSerie::init()
+{
+	Xmin = Ymin = 1e300;
+	Xmax = Ymax = -1e300;
+	NbPoints = 0;
+
+	HAxis("AXIS_ORIENTATION") = "HORIZONTAL";
+	HAxis("AXIS_TICK_INTERVAL") = 1.;
+	HAxis("AXIS_GRID") = "ON";
+	HAxis("AXIS_GRID_COLOUR") = "BLACK";
+
+	VAxis("AXIS_ORIENTATION") = "VERTICAL";
+
+	Data("NB_POINTS") = NbPoints;
+
+	Magics("GRAPH_TYPE") = "CURVE";
+
+}
+MvRequest MvSerie::getRequest()
+{
+	return Header + VAxis + HAxis + Data + Magics;
+}
+
+void MvSerie::setYMinMax(double y)
+{
+	if ( y > Ymax ) {
+		Ymax = y;
+		VAxis("AXIS_MAX_VALUE") = Ymax;
+	}
+	if ( y < Ymin ) {
+		Ymin = y;
+		VAxis("AXIS_MIN_VALUE") = Ymin;
+	}
+}
+void MvSerie::setXMinMax(double x)
+{
+	if ( x > Xmax ) {
+		Xmax = x;
+		HAxis("AXIS_MAX_VALUE") = Xmax;
+	}
+	if ( x < Xmin ) {
+		Xmin = x;
+		HAxis("AXIS_MIN_VALUE") = Xmin;
+	}
+}
+void MvSerie::setYAutoScale(int nticks)
+{
+	double 	interval = (Ymax - Ymin)/double(nticks);
+	int 	exponent = (int)log10(interval);
+
+	if (log10(interval) < 0.) exponent-=1;
+
+        if (interval/pow(10.,(double)exponent) < 1.5)
+                interval = pow(10.,(double)exponent);
+        else if (interval/pow(10.,(double)exponent) < 3.5)
+                interval = 2.*pow(10.,(double)exponent);
+        else if (interval/pow(10.,(double)exponent) < 7.5)
+                interval = 5.*pow(10.,(double)exponent);
+        else
+                interval = 10.*pow(10.,(double)exponent);
+
+	double scale = 1.0;
+	if (exponent < -1 || exponent > 2)
+	{
+		scale = pow (10.,(double)exponent);
+                MvRequest rtemp(Data);
+                Data.unsetParam("Y");
+                double val;
+                for (int i = 0 ; i < NbPoints ; i++)
+                {
+                        rtemp.getValue(val,"Y",i);
+                        if (i)
+                        Data("Y")+= val/scale;
+                        else
+                        Data("Y")= val/scale;
+                }
+                char text[132];
+                sprintf (text,"x%g", scale);
+                VAxis("AXIS_TIP_TITLE") = "ON";
+                VAxis("AXIS_TIP_TITLE_QUALITY") = "LOW";
+                VAxis("AXIS_TIP_TITLE_TEXT") = text;
+                VAxis("AXIS_MAX_VALUE") = Ymax/scale;
+                VAxis("AXIS_MIN_VALUE") = Ymin/scale;
+                interval /= scale;
+	}
+
+	VAxis("AXIS_TICK_INTERVAL")=interval;
+	VAxis("AXIS_GRID_LINE_STYLE") ="DOT";
+}
+
+void MvSerie::setXAutoScale(int nticks)
+{
+        double  interval = (Xmax - Xmin)/double(nticks);
+        int     exponent = (int)log10(interval);
+
+        if (log10(interval) < 0.) exponent-=1;
+
+	if (interval/pow(10.,(double)exponent) < 1.5)
+		interval = pow(10.,(double)exponent);
+	else if (interval/pow(10.,(double)exponent) < 3.5)
+		interval = 2.*pow(10.,(double)exponent);
+	else if (interval/pow(10.,(double)exponent) < 7.5)
+		interval = 5.*pow(10.,(double)exponent);
+	else
+		interval = 10.*pow(10.,(double)exponent);
+
+        double scale = 1.0;
+        if (exponent < -1 || exponent > 2)
+	{
+		scale = pow (10.,(double)exponent+1.);
+		MvRequest rtemp(Data);
+		Data.unsetParam("X");
+		double val;
+		for (int i = 0 ; i < NbPoints ; i++)		
+		{
+			rtemp.getValue(val,"X",i);
+			if (i)
+			Data("X")+= val/scale;
+			else
+			Data("X")= val/scale;
+		}
+		char text[132];
+		sprintf (text,"x%g", scale);
+		HAxis("AXIS_TIP_TITLE") = "ON";
+		HAxis("AXIS_TIP_TITLE_QUALITY") = "LOW";
+		HAxis("AXIS_TIP_TITLE_TEXT") = text;
+		HAxis("AXIS_MAX_VALUE") = Xmax/scale;
+		HAxis("AXIS_MIN_VALUE") = Xmin/scale;
+		interval /= scale;
+	}
+		
+        HAxis("AXIS_TICK_INTERVAL")=interval;
+	HAxis("AXIS_GRID_LINE_STYLE") ="DOT";
+
+}
+
+void MvSerie::setYPressure()
+{
+        int yint = (int) (ABS(Ymax-Ymin)/10.);
+        if (yint <= 15)         yint = 10;
+        else if (yint <= 30)    yint = 20;
+        else if (yint <= 60)    yint = 50;
+        else                    yint = 100;
+
+	VAxis("AXIS_GRID") = "ON";
+	VAxis("AXIS_GRID_COLOUR") = "BLACK";
+	VAxis("AXIS_MIN_VALUE") = Ymax;
+	VAxis("AXIS_MAX_VALUE") = Ymin;
+	VAxis("AXIS_TITLE_QUALITY") = "LOW";
+	VAxis("AXIS_TITLE_HEIGHT") = .8;
+	VAxis("AXIS_TICK_INTERVAL") = yint;
+	VAxis("AXIS_TICK_LABEL_HEIGHT") = .4;
+	VAxis("AXIS_GRID_LINE_STYLE") ="DOT";
+	VAxis("AXIS_TICK_LABEL_QUALITY") = "LOW";
+        VAxis("AXIS_TIP_TITLE_QUALITY") = "LOW";
+	VAxis("AXIS_TIP_TITLE") = "ON";
+        VAxis("AXIS_TICK_LABEL_TYPE") = "NUMBER";
+        VAxis("AXIS_TITLE_TEXT") = "Pressure";
+        VAxis("AXIS_TIP_TITLE_TEXT") = "hPa";
+
+}
+
+void MvSerie::setYModel()
+{
+	int yint = (int) (ABS(Ymax-Ymin)/10.);
+        if (yint <= 2)          yint = 1;
+        else                    yint = 5;
+        VAxis("AXIS_GRID") = "ON";
+        VAxis("AXIS_GRID_COLOUR") = "BLACK";
+	VAxis("AXIS_MIN_VALUE") = Ymax;
+	VAxis("AXIS_MAX_VALUE") = Ymin;
+        VAxis("AXIS_TITLE_QUALITY") = "LOW";
+        VAxis("AXIS_TITLE_HEIGHT") = .8;
+	VAxis("AXIS_TICK_INTERVAL") = yint;
+        VAxis("AXIS_TICK_LABEL_QUALITY") = "LOW";
+	VAxis("AXIS_TICK_LABEL_HEIGHT") = .4;
+	VAxis("AXIS_GRID_LINE_STYLE") ="DOT";
+        VAxis("AXIS_TIP_TITLE_QUALITY") = "LOW";
+        VAxis("AXIS_TICK_LABEL_TYPE") = "NUMBER";
+        VAxis("AXIS_TITLE_TEXT") = "Model Level";
+        VAxis("AXIS_TIP_TITLE_TEXT") = "";
+
+}
+
+void MvSerie::addPoint(double x, double y)
+{
+	addX(x);
+	addY(y);
+
+	setXMinMax(x);
+	setYMinMax(y);
+
+	NbPoints ++;
+	Data("NB_POINTS") = NbPoints;
+}
+MvSerie::~MvSerie()
+{
+}
+
+
+void MvSerie::setTitle(char *fmt, ...)
+{
+	char buffer[1024];
+    va_list list;
+
+    va_start(list,fmt);
+    vsprintf(buffer,fmt,list);
+    va_end(list);
+
+	Data("TITLE") = buffer;
+}
diff --git a/src/libMetview/MvSerie.h b/src/libMetview/MvSerie.h
new file mode 100644
index 0000000..5ac3867
--- /dev/null
+++ b/src/libMetview/MvSerie.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef MvSerie_DEFINED
+#define MvSerie_DEFINED
+
+//! (obsolete class)
+/*! This class dates back to 1994 when it was used in modules
+ *  \c src/Average/Average.cc and \c src/Profile/Profile.cc.
+ *  Both these modules are now obsolete and currently
+ *  MvSerie is not used anywhere in Metview.
+ */
+class MvSerie
+{
+protected:
+	MvRequest 	Header;
+	MvRequest 	Data;
+	MvRequest 	HAxis;
+	MvRequest 	VAxis;
+	MvRequest 	Magics;
+
+	double	    Xmin;
+	double	    Xmax;
+	double	    Ymin;
+	double	    Ymax;
+
+	int		    NbPoints;
+
+	virtual void	 init();
+	virtual void     addX(double v)  { Data("X") += v; }
+	virtual void     addY(double v)  { Data("Y") += v; }
+
+public:
+	virtual void     setXMinMax(double);
+	virtual void     setYMinMax(double);
+
+	virtual void	setYAutoScale(int nticks = 10);
+	virtual void    setXAutoScale(int nticks = 10);
+	virtual void	setYPressure();
+	virtual void	setYModel();
+	MvSerie(char*);
+
+	MvSerie();
+	virtual ~MvSerie();
+	void addPoint(double x, double y);
+	void setTitle(char*, ...);
+	void modifyMagics(MvRequest m) 	{ Magics = m; }
+	virtual MvRequest getRequest();
+};
+
+#endif
diff --git a/src/libMetview/MvService.cc b/src/libMetview/MvService.cc
new file mode 100644
index 0000000..ed77ce9
--- /dev/null
+++ b/src/libMetview/MvService.cc
@@ -0,0 +1,367 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include "inc_iostream.h"
+#include <stdarg.h>
+#include "Metview.h"
+#include "MvException.h"
+
+svcid *_id  = NULL;
+
+static void test_build_request(MvRequest& mode, MvRequest& out);
+
+//! Internal class [used by MvService::addModeService()]
+class MvModeService : public MvService {
+	MvService *MainService;
+	char     *Param;
+//
+	virtual	void _call_serve(svcid *,request *);
+	virtual void serve(MvRequest&,MvRequest&);
+public:
+	//! Constructor
+	MvModeService(char *name,char *param,MvService *main);
+};
+
+
+MvService::MvService(const char* name)
+	:MvProtocol(name),
+	 HasModes(false),
+	 saveToPool_(true)
+{
+	// Limit to one request at a time (we fork to handle more)
+	MvApplication::setMaximum(1);
+	mvSetMarslogLevel(); //-- if "quiet log"
+}
+
+MvModeService::MvModeService(char *name,char *param,MvService *main)
+	: MvService(name)
+{
+	MainService = main;
+	Param       = strcache(param);
+}
+
+void MvModeService::serve(MvRequest& in,MvRequest& out)
+{
+	// Get original request
+
+	MvRequest clean("CLEAN");
+	MvRequest mode = getMode();
+
+	if (mars.debug) mode.print();
+	// add the new parameter to the previous one.
+
+	MvRequest orig;
+	mode.getValue(orig, Param);
+	orig = orig + in;
+	mode.setValue(Param,orig);
+
+	if (mars.debug) mode.print();
+
+	// Call the original service
+
+	MainService->modeServe(mode,out,Id);
+
+
+	if (out) {
+		out = clean + out;
+		test_build_request(mode, out);
+		out("_MODE") = mode;
+	}
+
+
+}
+static void override(MvRequest& r, MvRequest& t)
+{
+	int   i = 0;
+	const char *val;
+
+	t.unsetParam("_APPLICATION_OVERRIDES");
+	while ( val = r("_APPLICATION_OVERRIDES"), i) {
+		t(val) = r(val);
+		t("_APPLICATION_OVERRIDES") += val;
+		i++;
+	}
+
+}
+static request* getVisdefs(MvRequest& in, MvRequest& ref)
+{
+	request *visdefs = NULL;
+	while (ref) {
+		Cached ref_verb(ref.getVerb());
+		Cached in_verb(in.getVerb());
+		if (in_verb == ref_verb) {
+			Cached id1 = (const char*) in("_ID");
+			Cached id2 = (const char*) ref("_ID");
+			if (id1 == id2) {
+				visdefs = ref("_VISDEFS");
+				break;
+			}
+		}
+		ref.advance();
+	}
+	ref.rewind();
+	return visdefs;
+}
+
+static void test_build_request(MvRequest& mode, MvRequest& out)
+{
+	MvRequest new_out;
+	MvRequest visdefs;
+	MvRequest visdef;
+
+	while (out) {
+		if (visdefs) {
+			Cached visdef_verb(visdefs.getVerb());
+			Cached out_verb(out.getVerb());
+
+			if (visdef_verb == out_verb) {
+				visdef = visdefs.justOneRequest();
+				override(out, visdef);
+				new_out = new_out + visdef;
+				visdefs.advance();
+			}
+			else new_out = new_out + visdefs;
+		}
+		else {
+			visdefs = getVisdefs(out, mode);
+			new_out = new_out + out.justOneRequest();
+		}
+		out.advance();
+	}
+
+	out = new_out;
+
+}
+
+static void link_objects(request *r)
+{
+	pool_link_objects(MvApplication::getService(),r);
+}
+
+static void _out(int lvl,const char *msg)
+{
+	if(_id) {
+		if(lvl == LOG_EROR || lvl == LOG_EXIT )
+			set_svc_msg(_id,"%s",msg);
+		else
+			send_progress(_id,msg,NULL);
+	}
+}
+
+void MvService::addModeService(char *name,char *param)
+{
+	HasModes = true;
+	new MvModeService(name,param,this);
+}
+
+void MvModeService::_call_serve(svcid *id,request *r)
+{
+	int   forked = fork_service(id);
+	if(forked > 0) return;
+
+	if(forked == -1 && mars.nofork == false)
+	{
+		send_later(id);
+		return;
+	}
+
+
+	Id = _id = id;
+	mars.outproc = _out;
+
+	MvRequest in(r);
+	MvRequest out;
+
+	Error = 0;
+
+	serve(in,out);
+
+	if (mars.debug) out.print();
+	send_reply(id,out);
+
+	if(forked != -1)
+	{
+		destroy_service(id->s);
+		marsexit(0);
+	}
+
+	_id          = NULL;
+	mars.outproc = NULL;
+}
+
+MvRequest MvService::buildMode(MvRequest& in)
+{
+	return in;
+}
+
+void MvService::_call_serve(svcid *id,request *r)
+{
+
+	int   forked = fork_service(id);
+	if(forked > 0) return;
+
+	if(forked == -1 && mars.nofork == false)
+	{
+		send_later(id);
+		return;
+	}
+
+	Id = _id = id;
+	mars.outproc = _out;
+
+	request *u;
+
+	const char *name = iconName();
+
+	if ( saveToPool_ )
+	  {
+	    if( (u = pool_fetch(MvApplication::getService(),name,r->name)) )
+	      {
+		send_reply(id,u);
+		free_all_requests(u);
+		if(forked != -1)
+		  {
+		    destroy_service(id->s);
+		    marsexit(0);
+		  }
+		mars.outproc = NULL;
+		return;
+	      }
+	  }
+
+	MvRequest in(r);
+	MvRequest out;
+
+	Error = 0;
+
+	// if the request contains a directive to change the current working
+	// directory, then do so
+	const char* cwd = in("_CWD");
+	if (cwd)
+	{
+		int cdret = chdir(cwd);
+		if (cdret)  // may not be important in most cases
+			cout << "WARNING: Could not cd to " << cwd << endl;
+		in.unsetParam("_CWD");  // for efficiency
+	}
+
+	try
+	  {
+	    serve(in,out);
+	  }
+	catch( MvException& e )
+	  {
+	    Error = 1;
+	    cout << "Oops, caught MvException: " << e.what() << endl;
+	    marslog(LOG_EROR,"%s",e.what());
+	    sendProgress( e.what() );
+	  }
+	catch(...)
+	  {
+	    Error = 1;
+	    cout << "Something failed: caught unspecified C++ exception..." << endl;
+	    sendProgress( "serve function failed (a C++ exception cought)" );
+	  }
+
+	if( Error != 0 )
+	  setError( Error );
+
+	if(Id == 0) // it was redispatched
+	{
+		_id          = NULL;
+		mars.outproc = NULL;
+		return;
+	}
+
+
+	if(HasModes && out) {
+		MvRequest clean("CLEAN");
+		out = clean + out;
+		out.setValue("_MODE",buildMode(in));
+	}
+
+	if(Error == 0 && saveToPool_ )
+		pool_store(MvApplication::getService(),name,r->name,out);
+
+	// Look for related objects
+	if ( saveToPool_ )
+	  link_objects(r);
+
+
+	if (mars.debug) out.print();
+
+	_id          = NULL;
+	mars.outproc = NULL;
+
+	send_reply(id,out);
+
+	if(forked != -1)
+	{
+		destroy_service(id->s);
+		marsexit(0);
+	}
+}
+
+
+err MvService::callService(char *name,MvRequest& in,MvRequest& out)
+{
+	err e;
+	MvRequest reply(wait_service(Id->s,name,in,&e),false);
+	out = reply;
+	return e;
+}
+
+
+void MvService::linkTo(char *name)
+{
+	pool_link(Id->s,iconName(),name);
+}
+
+void MvService::modeServe(MvRequest& in,MvRequest& out, svcid *id)
+{
+	svcid *_id =  Id;
+	Id = id;
+
+	try
+	  {
+	    serve(in,out);
+	  }
+	catch( MvException& e )
+	  {
+	    cout << "Oops, caught MvException: " << e.what() << endl;
+	    marslog(LOG_EROR,"%s",e.what());
+	    sendProgress( e.what() );
+	  }
+	catch(...)
+	  {
+	    cout << "Something failed: caught unspecified C++ exception..." << endl;
+	    sendProgress( "serve function failed (a C++ exception cought)" );
+	  }
+	Id = _id;
+}
+
+MvServiceFactory* MvServiceFactory::head_ = 0;
+
+MvServiceFactory::MvServiceFactory():
+	next_(head_)
+{
+	head_ = this;
+}
+
+void MvServiceFactory::installServices()
+{
+	MvServiceFactory* x = head_;
+	while(x)
+	{
+		x->installService();
+		x = x->next_;
+	}
+}
+
diff --git a/src/libMetview/MvService.h b/src/libMetview/MvService.h
new file mode 100644
index 0000000..31b3f73
--- /dev/null
+++ b/src/libMetview/MvService.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvService_DEFINED
+#define MvService_DEFINED
+
+//! Abstract intermediate class, derived from MvProtocol
+/*! Thus MvService inherits MvProtocol responsibilities.
+ *  MvService is an abstract class because
+ *  its method \c serve is a pure virtual method.
+ *  A new class must be derived from MvService for each command
+ *  the module must execute. The derived class must provide the method
+ *  \c serve, which is responsible for the execution of the command.
+ */
+
+class MvService :public MvProtocol {
+
+	boolean HasModes,saveToPool_;
+
+protected:
+
+	void hasModes() { HasModes = true; }
+
+	//! A higher level transparent callback function
+	/*! This method is automatically called by the callback function
+	 *  when a command arrives. It forks the process and checks in the pool
+	 *  if the command has already been executed.
+	 *  If not, it calls method \c serve.
+	 */
+	virtual void _call_serve(svcid *id,request *r);
+
+	//! Synchronous call to another service
+	/*! This method sends request \c in to service pointed by \c name
+	 *  and synchronously waits for the answer in request \c out
+	 */
+	err  callService(char* name, MvRequest& in, MvRequest& out);
+
+	//! Links this icon to another
+	/*! This method tells pool service to create a dependency between
+	 *  the object currently being executed and the object identified
+	 *  by variable \c name.
+	 */
+	void linkTo(char*);
+
+	virtual MvRequest buildMode(MvRequest&);
+
+public:
+	//! Constuctor
+	/*! The constructor registers a static method \c MvProtocol::_serve
+	 *  to be called when the module receives the command pointed by name
+	 */
+	MvService(const char* name);
+
+	//! Pure virtual method
+	/*! This is the virtual method that must be implemented in the derived class
+	 *  to process the incoming command. The incoming command is in \c in
+	 *  and the result command must be stored in \c out
+	 */
+	virtual void serve(MvRequest& in, MvRequest& out) = 0;
+
+	// Create "mode" services
+
+	void addModeService(char *name,char *param);
+	void modeServe(MvRequest&,MvRequest&,svcid*);
+
+	void saveToPool(boolean xx) { saveToPool_ = xx; }
+
+};
+
+//! Abstract base class for TMvServiceFactory
+/*! Template class TMvServiceFactory is to be used for
+ *  implementing concrete factories
+ */
+class MvServiceFactory {
+	static MvServiceFactory* head_;
+	MvServiceFactory*        next_;
+public:
+	//! Constructor
+	MvServiceFactory();
+
+	//! Pure virtual method needs to be implemented in the derived class
+	virtual void installService() = 0;
+
+	//! Calls installService() for each factory in the list
+	static void installServices();
+};
+
+//! Template class inherited from MvServiceFactory
+template<class T>
+class TMvServiceFactory : public MvServiceFactory {
+public:
+	//! Installs a new service of type \c T
+	virtual void installService() { new T(); }
+};
+
+#endif
+
+
diff --git a/src/libMetview/MvServiceTask.cc b/src/libMetview/MvServiceTask.cc
new file mode 100644
index 0000000..6c05eee
--- /dev/null
+++ b/src/libMetview/MvServiceTask.cc
@@ -0,0 +1,51 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <MvServiceTask.h>
+
+MvServiceReply *MvServiceTask::ReplyHandler = NULL;
+
+MvServiceTask::MvServiceTask(MvClient *c,const Cached& s,const MvRequest& r, const char* taskName)
+	: MvTask(c, (taskName?taskName:(const char*)s) ),
+	Service(s),
+	Request(r)
+{
+
+	// If first time, register a reply handler
+	if(!ReplyHandler)
+		ReplyHandler = new MvServiceReply();
+}
+
+void MvServiceTask::run(void)
+{
+	MvApplication::callService(Service,Request,this);
+}
+
+void MvServiceTask::gotReply(const MvRequest &r,err e)
+{
+	Reply = r;
+	setError(e);
+
+	int i = 0;
+	const char *p;
+
+	// Print messages
+	while( (p = ReplyHandler->getMessage(i++)) )
+		progress(p);
+
+	// Notify client
+	done();
+}
+
+void MvServiceReply::callback(MvRequest& in)
+{
+	MvServiceTask *task = (MvServiceTask*)getReference();
+	if(task) task->gotReply(in,getError());
+}
diff --git a/src/libMetview/MvServiceTask.h b/src/libMetview/MvServiceTask.h
new file mode 100644
index 0000000..ddf3d0d
--- /dev/null
+++ b/src/libMetview/MvServiceTask.h
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvServiceTask_DEFINED
+#define MvServiceTask_DEFINED
+#include <MvApplication.h>
+#include <MvProtocol.h>
+#include <MvTask.h>
+#include <MvRequest.h>
+
+//! Utility class used by MvServiceTask
+class MvServiceReply : public MvReply {
+	friend class MvServiceTask;
+	virtual void callback(MvRequest&);
+	// Make getMessage visible for MvServiceTask
+	const char *getMessage(int n) { return MvReply::getMessage(n); }
+};
+
+//! Class to send requests to other Metview modules
+/*! Currently used by PlotMod (and uPlot).
+ *  For a simple example, see file \c src/libMetview/Demo.cc
+ */
+class MvServiceTask : public MvTask {
+	friend class MvServiceReply;
+
+	Cached    Service;
+	MvRequest Request;
+	MvRequest Reply;
+
+	static MvServiceReply *ReplyHandler;
+
+	void gotReply(const MvRequest&,err);
+
+public:
+	//! Constructor
+	/*! Here \c req is the request that will be sent to
+	 *  the module that provides service \c service.
+	 */
+	MvServiceTask(MvClient* client
+	             ,const Cached& service
+	             ,const MvRequest& req
+	             ,const char* taskName = 0
+	             );
+
+	//! Sends the given request to the given service
+	/*! Service and the request are set in the constructor
+	 */
+	virtual void run(void);
+
+	//! Returns the reply request from the other Metview module
+	MvRequest& getReply() { return Reply; }
+};
+
+#endif
+
diff --git a/src/libMetview/MvShellTask.cc b/src/libMetview/MvShellTask.cc
new file mode 100644
index 0000000..61cdb58
--- /dev/null
+++ b/src/libMetview/MvShellTask.cc
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <MvShellTask.h>
+
+
+MvShellTask::MvShellTask(MvClient *c, const char* s, const char* taskName)
+	: MvTask(c, taskName),
+	Command(s)
+{
+
+}
+
+
+boolean MvShellTask::_inputCB(FILE *f,void *data)
+{
+	MvShellTask *task = (MvShellTask*)data;
+	char line[1024];
+	if(fgets(line,sizeof(line),f))
+	{
+		task->input(line);
+		return true;
+	}
+	else
+	{
+		task->setError(pclose(f));
+		task->done();
+		return false;
+	}
+}
+
+void MvShellTask::run(void)
+{
+	char buf[1024];
+	sprintf(buf,"%s 2>&1 < /dev/null", (const char*)Command);
+
+	// Should use MvApp...
+
+	FILE *f = popen(buf,"r");
+	if(!f)
+	{
+		marslog(LOG_EROR,"Command failed: %s",buf);
+		setError(-1);
+		done();
+	}
+	add_input_callback(MvApplication::getService(),f,_inputCB,this);
+}
+
+void MvShellTask::input(char *line)
+{
+	progress(line);
+}
diff --git a/src/libMetview/MvShellTask.h b/src/libMetview/MvShellTask.h
new file mode 100644
index 0000000..1dc80e0
--- /dev/null
+++ b/src/libMetview/MvShellTask.h
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvShellTask_DEFINED
+#define MvShellTask_DEFINED
+#include <MvApplication.h>
+#include <MvTask.h>
+
+//! Class to execute shell commands and scripts
+class MvShellTask : public MvTask {
+
+static boolean _inputCB(FILE*,void*);
+
+	Cached    Command;
+
+	virtual void input(char*); // Called for each lines
+
+public:
+	//! Constructor
+	MvShellTask(MvClient*, const char* command, const char* taskName=0);
+
+	//! Method to run a shell task
+	virtual void run(void);
+};
+
+#endif
+
diff --git a/src/libMetview/MvTable.cc b/src/libMetview/MvTable.cc
new file mode 100644
index 0000000..12b7b5b
--- /dev/null
+++ b/src/libMetview/MvTable.cc
@@ -0,0 +1,300 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+ 
+#include "MvTable.h"
+
+
+
+// ---------------------------------------------------------------------------
+// MvTable::MvTable
+// constructors
+// ---------------------------------------------------------------------------
+
+MvTable::MvTable () :
+    numColumns_(0),
+    doubleMissingValue_(-9999.0),
+    stringMissingValue_("")
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// MvTable::setReaderParameters
+// returns s pointer to the column with the given name (or NULL if not there)
+// ---------------------------------------------------------------------------
+
+bool MvTable::setReaderParameters(request *r)
+{
+
+    // get the parameters, one by one
+    // if we get the request from mtable.cc, then we are guaranteed that the
+    // parameter names will be upper case
+
+
+    const char *value = get_value (r, "PATH", 0);
+    if (value)
+        reader_.setPath(value);
+
+
+    value = get_value (r, "TABLE_DELIMITER", 0);
+    if (value)
+        reader_.setDelimiter(value[0]);
+
+
+    value = get_value (r, "TABLE_COMBINE_DELIMITERS", 0);
+    if (value)
+    {
+        if (strlen(value) == 2 && toupper(value[0]) == 'O' && toupper(value[1]) == 'N')
+            reader_.setConsecutiveDelimitersAsOne(true);
+        else
+            reader_.setConsecutiveDelimitersAsOne(false);
+    }
+
+    value = get_value (r, "TABLE_HEADER_ROW", 0);
+    if (value)
+        reader_.setHeaderRow(atoi(value));
+
+
+    value = get_value (r, "TABLE_DATA_ROW_OFFSET", 0);
+    if (value)
+        reader_.setDataRowOffset(atoi(value));
+
+
+
+    // has the user specified a set of rows which contain meta-data?
+    
+    int num_user_meta_data_rows = count_values(r, "TABLE_META_DATA_ROWS");
+    
+    if (num_user_meta_data_rows > 0)
+    {
+        vector<int> mrows;
+
+        for (int i = 0; i < num_user_meta_data_rows; i++)
+        {
+            int index = atoi(get_value (r, "TABLE_META_DATA_ROWS", i));
+            mrows.push_back(index);  // user gives 1-base indexes, but we use 0-based internally
+        }
+        reader_.setUserMetaDataRows(mrows);
+    }
+
+
+
+    // has the user specified a particular subset of columns?
+
+    int num_col_indexes = count_values(r, "TABLE_COLUMNS");
+    int num_col_types   = count_values(r, "TABLE_COLUMN_TYPES");
+    
+    if (num_col_indexes > 0)
+    {
+        if (num_col_types > 0 && num_col_types != num_col_indexes)
+        {
+            marslog(LOG_EROR, "Table column indexes (%d) and types (%d) must have same number of elements if both are specified.", num_col_indexes, num_col_types);
+            return false;
+        }
+
+        userColumnIndexes.clear();
+
+        for (int i = 0; i < num_col_indexes; i++)
+        {
+            int index = atoi(get_value (r, "TABLE_COLUMNS", i));
+            userColumnIndexes.push_back(index-1);  // user gives 1-base indexes, but we use 0-based internally
+        }
+
+
+    }
+
+
+    // has the user specified a particular set of column types?
+
+    if (num_col_types > 0)
+    {
+        userColumnTypes.clear();
+
+        for (int i = 0; i < num_col_types; i++)
+        {
+            TableReader::eTableReaderFieldType type = !strcmp(get_value (r, "TABLE_COLUMN_TYPES", i), "STRING") ? 
+                                                      TableReader::TABFIELD_STRING :
+                                                      TableReader::TABFIELD_NUMBER;
+            userColumnTypes.push_back(type);
+        }
+    }
+
+
+    return true;
+}
+
+
+/* // not needed?
+// takes a path as its argument
+MvTable::MvTable (const char *name)
+{
+    MvTable::MvTable();
+
+    string path(name);      // give the path to the file reader object
+    reader_.setPath(path);
+}
+*/
+
+
+
+// ---------------------------------------------------------------------------
+// MvTable::column
+// returnss pointer to the column with the given name (or NULL if not there)
+// ---------------------------------------------------------------------------
+MvTableColumn *MvTable::column(string &name)
+{
+    // find which column has the name we're looking for
+    
+    for (vector<MvTableColumn>::size_type i = 0 ; i < columns_.size(); i++)
+    {
+        if (columns_[i].name() == name)
+            return &columns_[i];   // found it - return a pointer to it
+    }
+
+
+    // if we got to here, then we did not find the column
+
+    return NULL;
+} 
+
+
+// ---------------------------------------------------------------------------
+// MvTable::read
+// reads the current table using the current settings
+// ---------------------------------------------------------------------------
+
+bool MvTable::read ()
+{
+    string errorMsg;
+    bool ret;
+    vector<int> allColumnIndexes;
+    vector<int> *columnIndexes;
+    vector<TableReader::eTableReaderFieldType> allTypes;
+
+
+    // get the meta-data so we know what fields are there
+
+    //reader_.setHeaderRow(false);
+    //reader_.setDelimiter(' ');
+    //reader_.setSkipRows(5);
+    //reader_.setConsecutiveDelimitersAsOne(true);
+
+    //reader_.setHeaderRow(true);
+    //reader_.setDelimiter(',');
+    ret = reader_.getMetaData(errorMsg);
+
+    if (!ret)
+    {
+        marslog(LOG_EROR, "%s", errorMsg.c_str());
+        return false;
+    }
+
+
+    // what are the column types and names?
+
+    vector<TableReader::eTableReaderFieldType>& types    = reader_.fieldTypes();
+    vector<string >&                            colNames = reader_.fieldNames();
+
+
+
+    // if the user has not specified a subset of columns, then we just generate
+    // a vector containing all the column indexes that are in the file
+
+    if (userColumnIndexes.size() == 0)
+    {
+        allColumnIndexes.clear();
+        
+        for (size_t i = 0; i < types.size(); i++)
+            allColumnIndexes.push_back(i);
+
+        columnIndexes = &allColumnIndexes;  // this is the one we will use
+    }
+    else
+    {
+        columnIndexes = &userColumnIndexes;  // otherwise, use what the user specified
+    }
+
+
+
+    // if the user specified the types of certain columns, then generate a vector
+    // containing types for all columns, but with the user's types over-riding
+    // the automatic ones
+
+    allTypes = types;  // create a copy of the automatic type vector
+
+    for (size_t i = 0; i < userColumnTypes.size(); i++)
+    {
+        // which index does this correspond to?
+
+        int index = (userColumnIndexes.size() != 0) ? userColumnIndexes[i] : i;
+
+        allTypes[index] = userColumnTypes[i];
+    }
+
+
+
+
+    numColumns_ = columnIndexes->size();
+    columns_.resize(numColumns_);
+
+
+
+
+    // for each column, tell the table reader where to put the data
+
+    for (int colnum = 0; colnum < numColumns_; colnum++)
+    {
+        int index = (*columnIndexes)[colnum];
+        MvTableColumn &col = columns_[colnum];
+
+
+        if (index < 0 || index >= types.size())
+        {
+            marslog(LOG_EROR, "Column index %d is outside the range of columns (%d) in the file.", index+1, types.size()+1);
+            return false;
+        }
+
+
+        if (allTypes[index] == TableReader::TABFIELD_NUMBER)
+        {
+            reader_.setFieldContainer(index, col.name(), col.dVals(), doubleMissingValue());
+            col.setType(MvTableColumn::COL_NUMBER);
+        }
+        else
+        {
+            reader_.setFieldContainer(index, col.name(), col.sVals(), stringMissingValue());
+            col.setType(MvTableColumn::COL_STRING);
+        }
+        
+        if (!colNames[colnum].empty())
+            col.setName(colNames[colnum]);
+
+    }
+
+
+    // store the user meta-data
+    
+    userMetaData_ = reader_.userMetaData();
+
+
+
+    // read the data from the file
+    ret = reader_.read(errorMsg);
+
+
+    if (!ret)
+    {
+        marslog(LOG_EROR, "%s", errorMsg.c_str());
+        return false;
+    }
+
+
+    return ret;
+}
diff --git a/src/libMetview/MvTable.h b/src/libMetview/MvTable.h
new file mode 100644
index 0000000..41a5b37
--- /dev/null
+++ b/src/libMetview/MvTable.h
@@ -0,0 +1,99 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvTable_INC
+#define MvTable_INC
+
+
+#include <vector>
+#include <string>
+
+#include <TableReader.h>
+#include <mars.h>
+
+
+// ---------------------------
+// --- class MvTableColumn ---
+// ---------------------------
+
+class MvTableColumn
+{
+public:
+	enum eTableColumnType {COL_NUMBER, COL_STRING};
+
+	MvTableColumn() : type_(COL_NUMBER), count_(0) {};  // constructor
+
+	string& name()           {return name_;}
+	eTableColumnType type()  {return type_;}
+    int count()              {return (type()==COL_NUMBER) ? dvals_.size() : svals_.size();}
+
+	
+	void setName(string s)           {name_ = s;}
+	void setType(eTableColumnType t) {type_ = t;}
+
+    vector<double>& dVals()          {return dvals_;};
+    vector<string>& sVals()          {return svals_;};
+
+
+private:
+	//void clear();
+
+	string name_;           // each column has an optional name
+	eTableColumnType type_; // what data type is each element in the column
+	int count_;             // how many elements in the column
+
+	vector<double> dvals_;  // only populated if type is number
+	vector<string> svals_;  // only populated if type is string
+};
+
+
+
+
+// ---------------------
+// --- class MvTable ---
+// ---------------------
+
+class MvTable
+{
+public:
+
+	MvTable();                                                        // constructor
+	//MvTable(const char *name);                                        // constructor with path
+
+    void setPath(string &path)            {reader_.setPath(path);}
+    void setDoubleMissingValue(double d)  {doubleMissingValue_ = d;}
+    void setStringMissingValue(string s)  {stringMissingValue_ = s;}
+    bool setReaderParameters(request *r);                             // set the reader params from a request
+    bool read();                                                      // read the table into memory
+
+    int  numColumns()                     {return numColumns_;}
+    MvTableColumn *column(int n)          {return &columns_[n];}      // return pointer to indexed column
+    MvTableColumn *column(string &name);                              // return pointer to named column
+    double doubleMissingValue()           {return doubleMissingValue_;}
+    string stringMissingValue()           {return stringMissingValue_;}
+    map<string, string> userMetaData()    {return userMetaData_;}
+
+
+
+private:
+    int                   numColumns_;          // the number of columns
+    vector<MvTableColumn> columns_;             // the columns themselves
+    TableReader           reader_;              // the object to perform the table-reading
+    double                doubleMissingValue_;  // missing values in the input file will be translated into this
+    string                stringMissingValue_;  // missing values in the input file will be translated into this
+
+    vector<int>           userColumnIndexes;    // did the user select certain column indexes to parse?
+    vector<TableReader::eTableReaderFieldType>  userColumnTypes;    // did the user select certain column types?
+    map<string, string>   userMetaData_;        // optional user meta-data, e.g. PARAM1=VALUE1
+
+};
+
+
+
+#endif
diff --git a/src/libMetview/MvTask.cc b/src/libMetview/MvTask.cc
new file mode 100644
index 0000000..30c51e0
--- /dev/null
+++ b/src/libMetview/MvTask.cc
@@ -0,0 +1,75 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Metview.h>
+#include <MvTask.h>
+
+MvClient::MvClient()
+	: Tasks(0)
+{
+
+}
+
+MvClient::~MvClient()
+{
+	// Remove self form our tasks
+	MvTask *p = Tasks;
+	while(p)
+	{
+		MvTask *q = p->Next;
+		p->Client = 0;
+		p->abort();
+		p = q;
+	}
+}
+
+void MvClient::notify(MvTask *task)
+{
+	MvTask *p = Tasks;
+	MvTask *q = NULL;
+
+	// Remove from list
+
+	while(p)
+	{
+		if(p == task)
+		{
+			if(q) q->Next = p->Next;
+			else Tasks = p->Next;
+			break;
+		}
+		q = p;
+		p = p->Next;
+	}
+
+	// Call pure virtual
+	endOfTask(task);
+}
+
+// Create a Task, add it to the clients list.
+MvTask::MvTask(MvClient *c, const char* taskName)
+	: Client(c),Next(c->Tasks),TaskName(taskName?taskName:"(?)")
+{
+	c->Tasks = this;
+}
+
+void MvTask::done()
+{
+	if(Client) Client->notify(this);
+	delete this;
+}
+
+void MvTask::progress(const char *msg)
+{
+	if(Client) Client->progress(msg);
+}
+
+MvTask::~MvTask()
+{
+}
diff --git a/src/libMetview/MvTask.h b/src/libMetview/MvTask.h
new file mode 100644
index 0000000..8363b6d
--- /dev/null
+++ b/src/libMetview/MvTask.h
@@ -0,0 +1,103 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvTask_DEFINED
+#define MvTask_DEFINED
+
+class MvTask;
+
+//! Implements communication with other Metview modules
+/*! Most of the methods are private. These are to be used
+ *  via friend class MvTask.\n \n
+ *  Currently used by PlotMod (and uPlot).
+ *  For a simple example, see file \c src/libMetview/Demo.cc
+ */
+class MvClient {
+	friend class MvTask;
+
+	MvTask *Tasks;
+
+	void notify(MvTask *from);
+
+	// No copy
+	MvClient(const MvClient&);
+	int operator=(const MvClient&);
+
+	//! Callback received when a task has finished
+	/*! This is a pure virtual method that needs to be
+	 *  implemented in the derived class
+	 */
+	virtual void endOfTask(MvTask *from) = 0;
+
+	//! Message from task
+	virtual void progress(const char*) {};
+
+public:
+	//! Constructor
+	MvClient();
+
+	//! Destructor
+	virtual ~MvClient();
+
+};
+
+typedef void (MvClient::*endOfTaskProc)(MvTask*);
+
+
+//! Abstract base class for MvServiceTask and MvShellTask
+/*! These classes, together with MvClient, implement communication
+ *  and sending tasks to other Metview modules.\n \n
+ *  Currently used by PlotMod (and uPlot).
+ *  For a simple example, see file \c src/libMetview/Demo.cc
+ */
+class MvTask {
+
+	friend class MvClient;
+	MvClient *Client;
+	MvTask *Next;
+	err     Error;
+	Cached  TaskName;
+
+	// No copy
+	MvTask(const MvTask&);
+	int operator=(const MvTask&);
+
+	// Cannot be delete, call the done() method
+
+	virtual void abort(void) {};
+
+
+protected:
+	void done(void);  // Call when job is done
+	void progress(const char*); // Pass info to client
+	void setError(err e) { Error = e; }
+	virtual ~MvTask();
+
+public:
+	//! Constructor, creates a Task and adds it to the clients list
+	MvTask(MvClient* client, const char* taskName = 0);
+
+	//! Implements the execution of a task
+	/*! This is a pure virtual method that needs to be
+	 *  implemented in the derived class
+	 */
+	virtual void run(void) = 0;
+
+	//! Returns the error/success code
+	/*! Type \c err is defined in \c mars.h
+	 */
+	err getError() 		{ return Error; }
+
+	//! Returns the task name, or "(?)" if name not given
+	const char* taskName()  { return TaskName; }
+};
+
+
+#endif
+
diff --git a/src/libMetview/MvTemplates.h b/src/libMetview/MvTemplates.h
new file mode 100644
index 0000000..c424aae
--- /dev/null
+++ b/src/libMetview/MvTemplates.h
@@ -0,0 +1,162 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvTemplates_DEFINED
+#define MvTemplates_DEFINED
+#include <Metview.h>
+
+// Templates have to be included only when needed for efficiency.
+//
+
+//==========================================================================
+//
+// Template to create an asynchronous service
+// to use do:
+/*
+
+// Define a Trait
+
+struct ServiceTrait {
+	static const char* name() { return "SOME_NAME"); }
+}
+
+void TMvTransaction<ServiceTrait>::callback(MvRequest& r) // Implement the callcack
+{
+	.....
+}
+
+foo()
+{
+	new TMvTransaction<ServiceTrait>("SOME_NAME"); // Create an instance
+}
+
+*/
+
+//! (not used; obsolete?)
+template<class T> class TMvTransaction : public MvTransaction {
+	TMvTransaction(MvTransaction* t)   : MvTransaction(t)  {};
+	MvTransaction *cloneSelf()         { return new TMvTransaction<T>(this); }
+public:
+	TMvTransaction() : MvTransaction(T::name())        { }
+
+	void callback(MvRequest&);
+};
+
+//==========================================================================
+// An other way is the following
+
+//! (used by Vis5D interface module)
+template<class T> class TMvServe : public MvTransaction {
+	T& object_;
+	void callback(MvRequest& in) { 
+		object_.serve(*this,in);
+
+		// Specially important for Macro&MetviewUI
+		// Macro ("execute" & "not_screen") calls uPlotBatch 
+		// which needs to inform back that it has finished and 
+		// the icon can become green
+		MvRequest out("RESULT");
+		sendReply(out);
+	}
+	MvTransaction *cloneSelf()   { return new TMvServe(this); }
+	TMvServe(TMvServe<T>* other): MvTransaction(other),object_(other->object_) {}
+public:
+	TMvServe(T& object, const char* name) : MvTransaction(name),
+		object_(object) {}
+};
+
+template<class T>
+void registerTMvServe(T& object,const char* name)
+{
+	new TMvServe<T>(object,name);
+}
+
+//==========================================================================
+//
+// Template to create an asynchronous functions
+//
+// use as above:
+/*
+
+struct FunctionTrait {
+	static const char*   name() { return "SOME_NAME"); }
+	static const argdef* args() { .... }
+	static const char*   info() { .. }
+}
+
+void TMvFunction<FunctionTrait>::callback(MvRequest& r) // Implement the callcack
+{
+	.....
+}
+
+bar()
+{
+	new TMvFunction<FunctionTrait>();
+}
+
+*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+// it seems that this template is not used anywhere (2008-04-10/vk)
+
+template<class T> class TMvFunction : public MvFunction {
+protected:
+	char		*Info;
+    TMvFunction(MvTransaction* t)   : MvFunction(t)  {};
+    MvTransaction *cloneSelf() { return new TMvFunction<T>(this); }
+	char *getInfo() { return Info; }
+public:
+    TMvFunction() : MvFunction(T::name(), T::args())
+        { Info = T::info(); }
+    void callback(MvRequest&);
+};
+#endif
+
+//===========================================================================
+//
+//
+#if 0
+
+template<class T> class TMvList : public MvList {
+public:
+	TMvList (int protect = 0) : MvList(protect) {};
+	TMvList (ListType lt, ListSortBy lsb, ListSortType lst,
+		ListCase lc, int protect = 0, T *e = 0L) :
+			MvList(lt,lsb,lst,lc,protect,e) {};
+
+// Inquire Functions
+
+	T* first()             { return (T*)MvList::first();    }
+	T* last()              { return (T*)MvList::last();     }
+	T* next()              { return (T*)MvList::next();     }
+	T* previous()          { return (T*)MvList::previous(); }
+	T* current()           { return (T*)MvList::current();  }
+	T* get(int posit)      { return (T*)MvList::get(posit); }
+	int positionOf(T* e)   { return MvList::positionOf(e);  }
+
+	T* findByCode(int n)          { return (T*)MvList::findByCode(n);      }
+	T* findByName(char *n)        { return (T*)MvList::findByName(n);      }
+	T* findNearestCode(int n)     { return (T*)MvList::findNearestCode(n); }
+	T* findNearestName(char *n)   { return (T*)MvList::findNearestName(n); }
+
+	void insert(int n, T* e)      { MvList::insert(n,e);                }
+	void insertFirst(T* e)        { MvList::insertFirst(e);             }
+	void insertLast(T* e)         { MvList::insertLast(e);              }
+	void append (T* e)            { MvList::append(e);                  }
+	void insertBeforeCurr(T* e)   { MvList::insertBeforeCurr(e);        }
+	void insertAfterCurr(T* e)    { MvList::insertAfterCurr(e);         }
+	void replaceCurr(T* e)        { MvList::replaceCurr(e);             }
+	T* insertByType(T* e)         { return (T*)MvList::insertByType(e); }
+	int remove(T* e)              { return MvList::remove(e);           }
+};
+
+#endif
+
+#endif
diff --git a/src/libMetview/MvTimeSerie.cc b/src/libMetview/MvTimeSerie.cc
new file mode 100644
index 0000000..21e23cc
--- /dev/null
+++ b/src/libMetview/MvTimeSerie.cc
@@ -0,0 +1,209 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <Metview.h>
+#include <MvTimeSerie.h>
+#include <stdarg.h>
+
+MvRequest MvTimeSerie::empty;
+
+MvTimeSerie::MvTimeSerie(MvRequest& vaxis,MvRequest& graph)
+	: Header("MAGICS_PARAMETERS"),
+	 HAxis("PAXIS"),
+	 VAxis(vaxis),
+	 PGraph(graph),
+	 user_axis(0)
+{
+	init();
+}
+
+
+void MvTimeSerie::init()
+{
+	Xmin = MvDate(22020202.0);      //-- far-away in the future
+	Xmax = MvDate(18880808.0);      //-- far-away in the past
+        Ymin = 1e300;
+        Ymax = -1e300;
+	NbPoints = 0;
+	reqOutFilterLevel = eTsReqsAll;
+
+	Header("SUBPAGE_Y_POSITION") = 1.7;
+	Header("SUBPAGE_ASPECT_RATIO") = 3;
+
+    HAxis("AXIS_TYPE") = "DATE";
+    HAxis("AXIS_DATE_TYPE") = "DAYS";
+    HAxis("AXIS_ORIENTATION") = "HORIZONTAL";
+    HAxis("AXIS_GRID") = "ON";
+    HAxis("AXIS_GRID_COLOUR") = "BLACK";
+
+}
+
+MvRequest MvTimeSerie::getRequest()
+{
+	double diff = (Ymax - Ymin) * 0.1;
+	int    maxi, mini;
+	int    step, scale;
+	static int  nice[] = { 1, 2, 3 };
+
+	Ymax = Ymax + (diff * 0.05);
+	Ymin = Ymin - (diff * 0.05);
+	scale = 1;
+
+	for (int i = 0; i < 5; i++) {
+		for (int j = 0; j < 3; j++) {
+			maxi = (int)(Ymax + 0.999);
+			mini = (int)(Ymin - 0.999);
+			step = nice[j] * scale;
+			while ( (mini % step) != 0 ) mini --;
+			while ( (maxi % step) != 0 ) maxi ++;
+			if ( (((maxi - mini) / step) + 1) < 5 ) {
+				i = 5;
+				break;
+			}
+		}
+		scale = scale * 10;
+	}
+	Ymax = maxi;
+	Ymin = mini;
+
+	if(!VAxis)
+	{
+		VAxis = "PAXIS";
+		VAxis("AXIS_MIN_VALUE") = Ymin;
+		VAxis("AXIS_MAX_VALUE") = Ymax;
+		VAxis("AXIS_TICK_INTERVAL") = (Ymin - Ymax) / 5 ;
+	}
+
+	VAxis("AXIS_ORIENTATION") = "VERTICAL";
+
+	if( reqOutFilterLevel == eTsReqsAll )
+	  return Header + VAxis + HAxis + Data;
+	else
+	  return HAxis + Data;
+}
+
+void MvTimeSerie::createNewGroup(const Cached& id, const char* legend)
+{
+	MvRequest curve("CURVE");
+	MvRequest magics("PGRAPH");
+
+	NbPoints     = 0;
+
+	curve("_ID") = id;
+
+	if(PGraph)
+		magics = PGraph;
+	else {
+		magics("GRAPH_TYPE") = "CURVE";
+		magics("GRAPH_CURVE_METHOD") = "ROUNDED";
+	}
+
+	if (legend && !(const char*)magics("LEGEND_USER_TEXT")) {
+			magics("LEGEND") = "ON";
+			magics("LEGEND_USER_TEXT") = legend;
+	}
+
+	if( reqOutFilterLevel == eTsReqsCurveOnly )
+	  Data = Data + curve;
+	else
+	  Data = Data + curve + magics;
+}
+
+void MvTimeSerie::addIconInfo(const Cached& ref, const Cached& param, MvRequest& r)
+{
+	while (Data) {
+		Cached id = (const char*) Data("_ID");
+		if ( id == ref )  {
+			Data("_NAMES")   += (const char*) r("_NAME");
+			Data("_CLASSES") += (const char*) r("_CLASS");
+			Data("_PARAMS") += param;
+			break;
+		}
+		Data.advance();
+	}
+	Data.rewind();
+}
+
+void MvTimeSerie::addPoint(const Cached& ref, double x, double y)
+{
+   MvDate d = BaseDate + (double)x/24.0;
+
+   while (Data) {
+        Cached id = (const char*) Data("_ID");
+        if ( id == ref )  {
+            Data("X") += d.magicsDate().c_str();
+            Data("Y") += y;
+            break;
+        }
+        Data.advance();
+    }
+    Data.rewind();
+
+   if ( y > Ymax ) {
+	Ymax = y;
+   }
+   if ( y < Ymin ) {
+	Ymin = y;
+   }
+
+   if ( d > Xmax ) {
+	Xmax = d;
+	HAxis("AXIS_DATE_MAX_VALUE") = Xmax;
+   }
+   if ( d < Xmin ) {
+	Xmin = d;
+	HAxis("AXIS_DATE_MIN_VALUE") = Xmin;
+   }
+   if( Xmin.time_interval_days( Xmax ) > 180 ) {  //-- ~ 6 months
+      HAxis("AXIS_DATE_TYPE") = "MONTHS";
+   }
+
+   NbPoints ++;
+}
+
+MvTimeSerie::~MvTimeSerie()
+{
+}
+
+void MvTimeSerie::setDate(int date, int o)
+{
+	MvDate d( (double)date + (double)o/24.0 );
+        setDate( d );
+}
+
+void MvTimeSerie::setDate(const MvDate& d)
+{
+	BaseDate = d;
+	string magDate = d.magicsDate();
+	HAxis("AXIS_DATE_MIN_VALUE") = magDate.c_str();
+	Offset = BaseDate.Hour();
+}
+
+void MvTimeSerie::setTitle(const Cached& ref, const char* fmt, ...)
+{
+
+    char buffer[1024];
+    va_list list;
+
+    va_start(list,fmt);
+    vsprintf(buffer,fmt,list);
+    va_end(list);
+
+	while (Data) {
+		Cached id = (const char*) Data("_ID");
+		if ( id == ref )  {
+			Data("TITLE")  += buffer;
+			break;
+		}
+		Data.advance();
+	}
+	Data.rewind();
+}
+
diff --git a/src/libMetview/MvTimeSerie.h b/src/libMetview/MvTimeSerie.h
new file mode 100644
index 0000000..f00a09e
--- /dev/null
+++ b/src/libMetview/MvTimeSerie.h
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef MVTIMESERIE_H
+#define MVTIMESERIE_H
+
+#include "MvList.hpp"
+#include "MvDate.h"
+
+//! \enum eTsReqFilter Timeseries request filtering levels
+enum eTsReqFilter        //-- timeseries request filter
+{
+   eTsReqsAll            /**< -  header + VAxis + HAxis + Curve + PGraph */
+  ,eTsReqsCurveAndGraph  /**< -  HAxis + Curve + PGraph */
+  ,eTsReqsCurveOnly      /**< -  HAxis + Curve */
+};
+
+//! Class to create a time series as a request
+/*! Currently used by \c src/Metgram/TimeSerie.cc and \c src/Metgram/Scores.cc
+ */
+class MvTimeSerie : public MvElement
+{
+static MvRequest empty;
+
+protected:
+	MvRequest   Header;
+	MvRequest   HAxis;
+	MvRequest   VAxis;
+	MvRequest   PGraph;
+	MvRequest   Data;
+
+	MvDate	    BaseDate;
+	MvDate	    Xmin;
+	MvDate	    Xmax;
+	double	    Ymin;
+	double	    Ymax;
+	int	    Offset;
+
+	eTsReqFilter reqOutFilterLevel; //-- for Timeserie app
+
+	int	    NbPoints;
+	int         user_axis;
+
+	void	    init();
+
+
+public:
+	MvTimeSerie(MvRequest& vaxis = MvTimeSerie::empty,
+	            MvRequest& graph = MvTimeSerie::empty);
+	~MvTimeSerie();
+
+	void createNewGroup(const Cached& refId, const char* legend = NULL);
+	void addIconInfo(const Cached& refId, const Cached& param, MvRequest& req);
+	void addPoint(const Cached& refId, double x, double y);
+	void setDate(int date, int hour);
+	void setDate(const MvDate& date);
+	void setTitle(const Cached& refId, const char* fmt, ...);
+	void setReqFilter( eTsReqFilter lvl ) { reqOutFilterLevel = lvl; }
+	virtual MvRequest getRequest();
+};
+
+     //-- MVTIMESERIE_H
+#endif
diff --git a/src/libMetview/MvVisTool.cc b/src/libMetview/MvVisTool.cc
new file mode 100644
index 0000000..218ae1c
--- /dev/null
+++ b/src/libMetview/MvVisTool.cc
@@ -0,0 +1,174 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvVisTool.h>
+
+static Cached VISTOOL = "VISTOOL";
+static Cached CHANGE  = "CHANGE_WINDOW";
+static Cached CLOSE   = "CLOSE_WINDOW";
+static Cached INFO    = "WINDOW_INFO";
+
+/*===
+REGISTER,
+	WINDOW=...
+	SERVICE=...
+===*/
+
+/*===
+REGISTER,
+	ID=...
+===*/
+
+/*
+VISTOOL,
+	WINDOW=....
+*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+class RegisterReply : public MvReply {
+	void callback(MvRequest&);
+public:
+	RegisterReply() : MvReply("REGISTER") {};
+};
+#endif
+
+
+static RegisterReply *reply = NULL;
+
+MvVisTool::MvVisTool() : MvProtocol(VISTOOL)
+{
+	VistoolTarget = (Cached) NULL;
+
+	if(reply == NULL) reply = new RegisterReply;
+
+	addCallbackKeyword(CHANGE);
+	addCallbackKeyword(INFO);
+	addCallbackKeyword(CLOSE);
+}
+
+MvVisTool::~MvVisTool()
+{
+	disconnect();
+}
+
+void RegisterReply::callback(MvRequest& r)
+{
+	printf("RegisterReply::callback got reply\n");
+	r.print();
+
+	MvVisTool *tool = (MvVisTool*)getReference();
+	if(tool) tool->SetID(r("VISTOOL_ID"));
+}
+
+void MvVisTool::disconnect()
+{
+	if(!VistoolId) return;
+
+	MvRequest r = "EXIT";
+	r("VISTOOL_ID") = VistoolId;
+
+	printf("MvVisTool::disconnect sending\n");
+	r.print();
+
+	if ( ! VistoolTarget )
+		VistoolTarget = (Cached)"VisMod";
+
+	MvApplication::callService ( VistoolTarget, r, NULL );
+	VistoolId = (Cached) NULL;
+	VistoolTarget = (Cached) NULL;
+}
+
+void MvVisTool::startUp(MvRequest&)
+{
+}
+
+void MvVisTool::connect()
+{
+	MvRequest r   = "REGISTER";
+	r("SERVICE")  =  progname();
+	r("WINDOW")   =  Window;
+
+// Copy interest
+	int i = 0;
+	const char *p;
+	while( (p = Setup("interest",i++)) )
+		r("interest") += p;
+
+	printf("MvVisTool::connect sending\n");
+	r.print();
+
+	if ( ! VistoolTarget )
+		VistoolTarget = (Cached)"VisMod";
+
+	MvApplication::callService ( VistoolTarget, r, this );
+}
+
+void MvVisTool::SetID(const char *name)
+{
+	VistoolId = name;
+	windowChanged();
+}
+
+void MvVisTool::callback(MvRequest& r)
+{
+	const char *v = r.getVerb();
+
+	printf("MvVisTool::callback got request\n");
+
+	r.print();
+
+	if(v == INFO )
+		info(r);
+	else if(v == CLOSE)    {
+		disconnect();
+		windowClosed();
+	}
+	else if(v == CHANGE)
+	{
+		Window = r("WINDOW");
+		windowChanged();
+	}
+	else if(v == VISTOOL )
+	{
+		Window = r("WINDOW");
+		Setup  = r("SETUP");
+		disconnect();     // Exit from previous window
+
+		// For compatibility with VisMod
+	       	VistoolTarget = r ( "SOURCE" );
+		connect();        // Register to new window
+		startUp(r);
+	}
+
+	MvRequest nil;
+	sendReply(nil);
+}
+
+void MvVisTool::info(MvRequest& r)
+{
+	printf("MvVisTool::info\n");
+	r.print();
+}
+
+void MvVisTool::windowClosed()
+{
+	printf("MvVisTool::windowClosed\n");
+}
+
+void MvVisTool::windowIconified()
+{
+	printf("MvVisTool::windowIconified\n");
+}
+
+void MvVisTool::windowChanged()
+{
+	printf("MvVisTool::windowChanged\n");
+}
+
diff --git a/src/libMetview/MvVisTool.h b/src/libMetview/MvVisTool.h
new file mode 100644
index 0000000..d0d566e
--- /dev/null
+++ b/src/libMetview/MvVisTool.h
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvVisTool_DEFINED
+#define MvVisTool_DEFINED
+#include <Metview.h>
+
+//! \brief (semi-obsolete class)
+//!
+//! Used only by GribTooll
+
+class MvVisTool : public MvProtocol {
+
+	Cached    VistoolId;
+	Cached    VistoolTarget;
+	MvRequest Setup;
+
+	virtual void callback(MvRequest&);
+
+	void connect(void);
+	void disconnect(void);
+
+protected:
+
+	MvRequest Window;
+
+	/* To override ... */
+
+	virtual void info(MvRequest&);
+	virtual void startUp(MvRequest&);
+	virtual void windowClosed();
+	virtual void windowChanged();
+	virtual void windowIconified();
+
+public:
+
+	MvVisTool();
+	~MvVisTool();
+
+	void SetID(const char*);
+};
+
+#endif
diff --git a/src/libMetview/Path.cc b/src/libMetview/Path.cc
new file mode 100644
index 0000000..eaee4c5
--- /dev/null
+++ b/src/libMetview/Path.cc
@@ -0,0 +1,253 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <sys/types.h>
+#include <dirent.h>
+
+#include "inc_iostream.h"
+#include "inc_stl.h"
+#include "Path.h"
+//#include "Log.h"
+
+
+Path::Path(const string& s):
+	path_(s)
+{
+}
+
+Path::~Path()
+{
+}
+
+void Path::rename(const Path& other) const
+{
+	::movefile(path_.c_str(),other.path_.c_str());
+}
+
+void Path::copy(const Path& other) const
+{
+	::copyfile(path_.c_str(),other.path_.c_str());
+}
+
+void Path::remove() const
+{
+	::deletefile(path_.c_str());
+}
+
+
+bool Path::exists() const
+{
+  if( ::access(path_.c_str(),F_OK) != 0 )
+    {
+      return false;                          //-- file does not exist
+    }
+
+  //-- file exists, but if it is an empty dot file, we have a problem...
+
+  const char* basnam = mbasename( path_.c_str() );
+  if( *basnam == '.' )
+    {                                        //-- if an empty dot file?
+      struct stat info;
+
+      if( ::stat( path_.c_str(), &info ) == 0 && info.st_size == 0 )
+	{
+	  string newnam = path_ + string( ".empty" );
+
+	  ::rename( path_.c_str(), newnam.c_str() );
+
+	  cout << ">>>\n"
+	       << ">>> Empty dot file: " << path_.c_str() << " renamed <<<\n"
+	       << ">>>" << endl;
+
+//	  Log::error("startup") << "Empty dot file "
+//	                        << path_.c_str()
+//				<< ", trying to fix it..."
+//				<< endl;
+	  return false;                      //-- now it is missing...
+	}
+
+    }
+
+  return true;                               //-- file  exits
+
+}
+
+
+void Path::mkdir() const
+{
+	::mkdirp(path_.c_str(),0777);
+}
+
+string Path::name() const
+{
+	return mbasename(path_.c_str());
+}
+
+Path Path::directory() const
+{
+	return string(dirname(path_.c_str()));
+}
+
+Path Path::dot() const
+{
+	return directory().add(string(".")+name());
+}
+
+MvRequest Path::loadRequest() const
+{
+	return MvRequest(read_request_file(path_.c_str()),false);
+}
+
+void Path::saveRequest(const MvRequest& r) const
+{
+	FILE *f = fopen(path_.c_str(),"w");
+	if(f == 0)
+	{
+	//Log::error(0) << "Cannot open " << path.c_str() << Log::syserr << endl;
+		return;
+	}
+
+	save_all_requests(f,r);
+	fclose(f);
+}
+
+void Path::symlink(const Path& other) const
+{
+	// Warning: reverse order
+	::symlink(other.path_.c_str(),path_.c_str());
+	cout << " symlink " ;
+	cout << other << endl;
+	cout << path_ << endl;
+}
+
+set<string> Path::files() const
+{
+	static char* myTmpDirLink = 0;               //-- link name in metview/Metview/
+	if( !myTmpDirLink )
+	  myTmpDirLink = getenv( "MV_TMPDIR_LINK" ); //-- "MvTemporaryCache_$$"
+
+	set<string> result;
+	DIR* dir = opendir(path_.c_str());
+	if(!dir)
+	  return result;
+
+	dirent* d;
+
+	while( (d = readdir(dir)) )
+	  {
+	    if(d->d_name[0] == '.')
+	      continue;
+
+	    //-----
+	    //---- In user's $HOME/metview/Metview folder there may be other valid TEMPORARY
+	    //---  folder links, created by other Metview sessions by this same user.
+	    //--   Inserting such a file (link) into 'result' would later break the link
+	    //-    by relinking it into the cache directory of _this_ session, thus skip it!
+	    //
+	    if( strncmp( d->d_name, myTmpDirLink, 17 ) == 0  //- start as "MvTemporaryCache_"
+		&& strcmp( d->d_name, myTmpDirLink ) != 0 )  //- but is not for this session!
+	      {
+		//cout << ">>> NOT ours! Skipping folder " << d->d_name << endl;
+		continue;  //-- temporary folder link of another Metview session
+	      }
+
+	    result.insert(d->d_name);
+	  }
+	closedir(dir);
+	return result;
+}
+
+string Path::loadText() const
+{
+	ifstream in(path_.c_str());
+
+	static string s; // Keep it here so it keeps its size
+	//s.clear();
+	s = "";
+
+	char c;
+	while(in.get(c))
+	{
+		//s.push_back(c);
+		s+=c;
+	}
+
+
+	return s;
+}
+
+void Path::saveText(const string& s) const
+{
+	ofstream out(path_.c_str());
+	out << s;
+}
+
+Path Path::add(const string& name) const
+{
+	return Path(path_ + "/" + name);
+}
+
+const string& Path::str() const
+{
+	return path_;
+}
+
+string Path::relativePath(const Path& other) const
+{
+	return ::relpath(path_.c_str(),other.path_.c_str());
+}
+
+void Path::touch() const
+{
+
+	struct stat info;
+	if(::stat(path_.c_str(),&info) == 0 && S_ISDIR(info.st_mode))
+	{
+		Path dummy = add("...");
+		dummy.touch();
+		dummy.remove();
+		return;
+	}
+
+	cout << "Touch " << *this << endl;
+	FILE *f = fopen(path_.c_str(),"a+");
+	if(f) fclose(f);
+}
+
+void Path::print(ostream& s) const
+{
+	s << path_;
+}
+
+time_t Path::lastModified() const
+{
+	struct stat info;
+	if(::stat(path_.c_str(),&info) == 0)
+		return info.st_mtime;
+	else
+		return 0;
+}
+
+
+off_t Path::sizeInBytes() const
+{
+	struct stat info;
+	if(::stat(path_.c_str(),&info) == 0)
+		return info.st_size;
+	else
+		return 0;
+}
+
+void Path::makeWritableByUser() const
+{
+	struct stat info;
+	if(::stat(path_.c_str(),&info) == 0)
+		if (!(info.st_mode & S_IWUSR))
+			chmod(path_.c_str(), info.st_mode | S_IWUSR);
+}
diff --git a/src/libMetview/Path.h b/src/libMetview/Path.h
new file mode 100644
index 0000000..842c81a
--- /dev/null
+++ b/src/libMetview/Path.h
@@ -0,0 +1,146 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Path.h
+// Baudouin Raoult - ECMWF Aug 99
+
+#ifndef Path_H
+#define Path_H
+
+#include <sys/types.h>
+#include <time.h>
+
+#include <string>
+using std::string;
+
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#include "Metview.h"
+
+class MvRequest;
+
+class Path {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Path(const string&);
+
+// -- Destructor
+
+	~Path(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	const string& str() const;
+
+	string relativePath(const Path&) const;
+	Path add(const string&) const;
+
+	Path   directory() const;
+	string name() const;
+	Path   dot() const;
+
+	void rename(const Path&) const;
+	void copy(const Path&) const;
+	void touch() const;
+	void remove() const;
+	void mkdir() const;
+	void symlink(const Path&) const;
+
+	set<string> files() const;
+
+	bool exists() const;
+
+	string loadText() const;
+	void   saveText(const string&) const;
+
+	MvRequest loadRequest() const;
+	void saveRequest(const MvRequest&) const;
+
+	time_t lastModified() const;
+	off_t sizeInBytes() const;
+
+	void makeWritableByUser() const;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+// -- Members
+	// None
+
+// -- Methods
+
+	string path_;
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	friend ostream& operator<<(ostream& s,const Path& p)
+		{ p.print(s); return s; }
+
+};
+
+inline void destroy(Path**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Path);
+//#endif
+
+#endif
diff --git a/src/libMvMotif/Array.c b/src/libMvMotif/Array.c
new file mode 100644
index 0000000..b54c818
--- /dev/null
+++ b/src/libMvMotif/Array.c
@@ -0,0 +1,410 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <math.h>
+#define USE_MANAGER
+
+#ifndef M_PI
+#define M_PI    3.14159265358979323846
+#endif
+
+#define  RADIANS(x)  (M_PI * (x) / 180.0)
+#define  ROUND(X)  (((X) >= 0) ? (int)((X)+0.5) : (int)((X)-0.5))
+
+
+#include      <X11/Intrinsic.h>
+#include      <X11/IntrinsicP.h>
+#include      <X11/StringDefs.h>
+#include      <X11/CoreP.h>
+#include    <X11/CompositeP.h>
+#include      <X11/ConstrainP.h>
+#include        <Xm/XmP.h>
+#include        <Xm/DrawingAP.h>
+#include      "Array.h"
+#include      "ArrayP.h"
+
+#ifndef MAX
+#define   MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define   MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+static void             Initialize();
+static void             Resize();
+static void             Destroy();
+static Boolean          SetValues();
+static XtGeometryResult GeometryManager();
+static void             ChangeManaged();
+static void             new_layout();
+static void 			get_row_col();
+
+#define DEBUG(a) printf("%s\n",a);
+
+static XtResource resources[] = {
+	{XtNrows,XtCRowCol,XtRInt,sizeof(int),
+	XtOffset(ArrayWidget,array.rows), XtRImmediate,(XtPointer)0 },
+	{XtNcolumns,XtCRowCol, XtRInt,sizeof(int),
+	XtOffset(ArrayWidget,array.cols), XtRImmediate,(XtPointer)0 },
+	{XtNround,XtCRound, XtRInt,sizeof(int),
+	XtOffset(ArrayWidget,array.round), XtRImmediate,(XtPointer)0 },
+};
+
+
+
+ArrayClassRec arrayClassRec = {
+	{
+	/* core_class fields  */
+#ifdef USE_MANAGER
+	(WidgetClass) &xmDrawingAreaClassRec,/* superclass         */
+#else
+	(WidgetClass) &constraintClassRec,/* superclass         */
+#endif
+	"Array",                           /* class_name         */
+	sizeof(ArrayRec),                /* widget_size        */
+	NULL,                             /* class_init         */
+	NULL,                             /* class_part_init    */
+	FALSE,                            /* class_inited       */
+	Initialize,                       /* initialize         */
+	NULL,                             /* initialize_hook    */
+	XtInheritRealize,                 /* realize            */
+	NULL,                             /* actions            */
+	0,                                /* num_actions        */
+	resources,                        /* resources          */
+	XtNumber(resources),              /* num_resources      */
+	NULLQUARK,                        /* xrm_class          */
+	TRUE,                             /* compress_motion    */
+	TRUE,                             /* compress_exposure  */
+	TRUE,                             /* compress_enterleave*/
+	TRUE,                             /* visible_interest   */
+	Destroy,                          /* destroy            */
+	Resize,                           /* resize             */
+	(XtExposeProc)_XmRedisplayGadgets,/* expose             */
+	SetValues,                        /* set_values         */
+	NULL,                             /* set_values_hook    */
+	XtInheritSetValuesAlmost,         /* set_values_almost  */
+	NULL,                             /* get_values_hook    */
+	NULL,                             /* accept_focus       */
+	XtVersion,                        /* version            */
+	NULL,                             /* callback_private   */
+	XtInheritTranslations,            /* tm_table           */
+	NULL,                             /* query_geometry     */
+	XtInheritDisplayAccelerator,      /* display_accelerator*/
+	NULL,                             /* extension          */
+	},
+	{
+	/* composite_class fields */
+	GeometryManager,                 /* geometry_manager    */
+	ChangeManaged,                   /* change_managed      */
+	XtInheritInsertChild,            /* insert_child        */
+	XtInheritDeleteChild,            /* delete_child        */
+	NULL ,                           /* extension           */
+	},
+	{ 
+	/* constraint_class fields */
+	NULL,                             /* subresources        */
+	0,                                /* subresource_count   */
+	0,                                /* constraint_size     */
+	NULL,                             /* initialize          */
+	NULL,                             /* destroy             */
+	NULL,                             /* set_values          */
+	NULL,                             /* extension           */
+	},
+	{
+	XtInheritTranslations,   /* default translations */
+	NULL,                    /* syn_resources          */
+	0,               /* num_syn_resources      */
+	NULL,                        /* syn_cont_resources     */
+	0,                           /* num_syn_cont_resources */
+	XmInheritParentProcess,  /* parent_process */
+	NULL,                        /* extension              */
+
+	},
+	{
+	NULL,
+	},
+	{
+	/* Array class fields */
+	0,                               /* ignore              */
+	},
+};
+
+
+WidgetClass arrayWidgetClass = (WidgetClass) &arrayClassRec;
+
+static void Initialize(request, new)
+ArrayWidget request, new;
+{
+	/*
+   * Make sure the widget's width and height are 
+   * greater than zero.
+   */
+	if (request->core.width <= 0)
+		new->core.width = 5;
+	if (request->core.height <= 0)
+		new->core.height = 5;
+
+}
+
+static void Destroy(w)
+ArrayWidget w;
+{
+}
+
+static void Resize(w)
+ArrayWidget w;
+{
+	new_layout(w,TRUE,FALSE);
+}
+
+
+static Boolean SetValues(current, request, new)
+ArrayWidget current, request, new;
+{
+	if((current->array.cols != new->array.cols ) && new->array.cols)
+		new->array.rows = 0;
+	if((current->array.rows != new->array.rows ) && new->array.rows)
+		new->array.cols = 0;
+
+	new_layout(new,TRUE,TRUE);
+	return (False);
+}
+
+static XtGeometryResult GeometryManager(w, request, reply)
+Widget               w;
+XtWidgetGeometry    *request;
+XtWidgetGeometry    *reply;
+{
+	new_layout(XtParent(w),FALSE,FALSE);
+	return (XtGeometryYes);
+}
+
+static void get_row_col(tw,row,col)
+ArrayWidget tw;
+int *row;
+int *col;
+{
+	int i,n=0;
+	int nx,ny;
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget w = tw->composite.children[i];
+		if(XtIsManaged(w)) n++;
+	}
+
+	*row = *col = 0;
+
+	if(!n) return;
+
+	if(tw->array.rows == 0 && tw->array.cols == 0)
+	{
+		ny = (int)(sqrt((double)n)+0.5);
+		nx = n / ny;
+		if(nx*ny < n) nx++;
+	}
+
+	if(tw->array.rows)
+	{
+		ny = MIN(tw->array.rows,n);
+		nx = n / ny;
+		if(nx*ny < n) nx++;
+	}
+
+	if(tw->array.cols)
+	{
+		nx = MIN(tw->array.cols,n);
+		ny = n / nx;
+		if(nx*ny < n) ny++;
+	}
+
+	*col = nx;
+	*row = ny;
+
+
+}
+
+static void ChangeManaged(tw)
+ArrayWidget tw;
+{
+	new_layout(tw,FALSE,TRUE);
+	new_layout(tw,TRUE,TRUE);
+}
+
+
+static void new_layout(tw,move_children,geometry)
+ArrayWidget   tw;
+Boolean move_children;
+Boolean geometry;
+{
+	Dimension width,height;
+	Dimension ww,wh,oww,owh;
+	int i;
+	int cnt = 20;
+
+	if(tw->array.round)
+	{
+		int m = 0, n = 0;
+		int xmarg = 0;
+		int ymarg = 0;
+		int radius;
+		Boolean more = True;
+
+		for(i=0;i<tw->composite.num_children;i++)
+		{
+			Widget w = tw->composite.children[i];
+			if(XtIsManaged(w)) {
+				m++;
+				xmarg = MAX(xmarg,w->core.width);
+				ymarg = MAX(ymarg,w->core.height);
+			}
+		}
+
+		xmarg++;
+		ymarg++;
+		xmarg /= 2;
+		ymarg /= 2;
+
+		width  =  5;
+		height =  5;
+
+		radius = MIN(tw->core.width,tw->core.height) / 2 - MAX(xmarg,ymarg) - 1;
+
+		while(more && (cnt-- >0))
+		{
+			int ox,oy;
+			more = False;	
+
+			for(i=0;i<tw->composite.num_children;i++)
+			{
+				Widget w = tw->composite.children[i];
+				if(XtIsManaged(w))
+				{
+					int x,y;
+
+					wh = w->core.height;
+					ww = w->core.width;
+
+					x = xmarg + radius + ROUND(radius*sin(RADIANS(360.0/m*n)))  -ww/2;
+					y = ymarg + radius + ROUND(radius*cos(RADIANS(180+360.0/m*n)))  -wh/2;
+
+					_XmConfigureObject((RectObj)w,x,y,ww,wh,0);
+
+					if(n)
+					{
+						if ( ! ( (x + ww < ox || y + wh < oy) || (x > ox + oww || y > oy + owh) ))
+							more = True;
+
+							/* printf("%d %d %d %d %d %d %d %d %d %d\n",x,y,ox,oy,ww,wh,oww,owh,more,cnt); */
+					}
+					ox = x;oy = y; oww = ww; owh = wh;
+
+					n++;
+
+					width  = MAX(width,x+ww);
+					height = MAX(height,x+wh);
+				}
+			}
+
+			radius +=  MAX(xmarg,ymarg);
+			/* more = 0; */
+		}
+	}
+	else
+	{
+
+		Dimension w = tw->core.width;
+		Dimension h = tw->core.height;
+		int       m=0,nx,ny;
+		Position  wx,wy,dx,dy;
+
+		wx = 0;
+		wy = 0;
+		m = 0;
+
+		get_row_col(tw,&ny,&nx);
+
+		if(ny == 0 || nx == 0) return;
+
+
+		ww = w / (Dimension) nx;
+		wh = h / (Dimension) ny;
+
+		if(wh<5) wh = 5;
+		if(ww<5) ww = 5;
+		dx = ww;
+		dy = wh;
+
+		if(!move_children)
+			for(i=0;i<tw->composite.num_children;i++)
+			{
+
+				Widget w = tw->composite.children[i];
+				if(XtIsManaged(w))
+				{
+					dx = MAX(dx,(Position)w->core.width);
+					dy = MAX(dy,(Position)w->core.height);
+				}
+			}
+
+		if(move_children)
+			for(i=0;i<tw->composite.num_children;i++)
+			{
+
+				Widget w = tw->composite.children[i];
+				if(XtIsManaged(w))
+				{
+					m ++;
+					_XmConfigureObject((RectObj)w,wx,wy,ww,wh,0);
+
+					wx += dx;
+					if(m % nx == 0) {
+						wx = 0;
+						wy += dy;
+					}
+				}
+			}
+		width  = dx*nx;
+		height = dy*ny;
+	}
+
+
+	if(geometry)
+	if(tw->core.width != width || tw->core.height != height)
+	{
+		Dimension           maxWidth = width, maxHeight = height;
+		XtGeometryResult    result;
+		Dimension           replyWidth = 0, replyHeight = 0;
+
+		result = XtMakeResizeRequest(
+		    (Widget)tw,
+		    maxWidth,
+		    maxHeight, 
+		    &replyWidth, &replyHeight);
+
+		if (result == XtGeometryAlmost)
+			XtMakeResizeRequest (
+			    (Widget)tw, 
+			    replyWidth, 
+			    replyHeight,NULL, NULL);
+	}
+
+
+}
+
+
+Widget CreateArray(par,nam,al,ac)
+Widget par;
+char  *nam;
+Arg   *al;
+int   ac;
+{
+	return   XtCreateWidget(nam,arrayWidgetClass,par,al,ac);
+}
diff --git a/src/libMvMotif/Array.h b/src/libMvMotif/Array.h
new file mode 100644
index 0000000..88d7538
--- /dev/null
+++ b/src/libMvMotif/Array.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ARRAY_H
+#define ARRAY_H
+
+#define XtNround   "round"
+#define XtCRound   "Round"
+#define XtNrows    "rows"
+#define XtNcolumns "columns"
+#define XtCRowCol  "RowCol"
+
+extern WidgetClass  arrayWidgetClass;
+
+typedef struct _ArrayClassRec *ArrayWidgetClass;
+typedef struct _ArrayRec      *ArrayWidget;
+
+#ifdef _NO_PROTO
+
+extern Widget CreateArray();
+
+#else
+ 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+Widget    CreateArray(Widget,String,Arg*,int);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+ 
+#endif /* _NO_PROTO */
+
+
+#endif /* ARRAY_H */
diff --git a/src/libMvMotif/ArrayP.h b/src/libMvMotif/ArrayP.h
new file mode 100644
index 0000000..54a7930
--- /dev/null
+++ b/src/libMvMotif/ArrayP.h
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ARRAYP_H
+#define ARRAYP_H
+
+#include <Xm/XmP.h>
+#include <Xm/DrawingAP.h>
+
+typedef struct _ArrayClassPart {
+    int         ignore;
+} ArrayClassPart;
+
+typedef struct _ArrayClassRec {
+    CoreClassPart       core_class;
+    CompositeClassPart  composite_class;
+    ConstraintClassPart constraint_class;
+    XmManagerClassPart  manager_class;
+    XmDrawingAreaClassPart  drawing_area_class;
+    ArrayClassPart     array_class;
+} ArrayClassRec;
+
+extern ArrayClassRec arrayClassRec;
+
+typedef struct {
+	int round;
+	int rows;
+	int cols;
+} ArrayPart;
+
+
+typedef struct _ArrayRec {
+    CorePart        core;
+    CompositePart   composite;
+    ConstraintPart  constraint;
+    XmManagerPart    manager;
+    XmDrawingAreaPart   drawing_area;
+    ArrayPart      array;
+}  ArrayRec;
+
+
+#define XtArrayNumChildren(w) (((ArrayWidget)w) -> composite.num_children)
+#define XtArrayChild(w,i)     (((ArrayWidget)w) -> composite.children[i])
+
+#endif /* ARRAYP_H */
+
+
+
diff --git a/src/libMvMotif/Carousel.c b/src/libMvMotif/Carousel.c
new file mode 100644
index 0000000..0ac974e
--- /dev/null
+++ b/src/libMvMotif/Carousel.c
@@ -0,0 +1,444 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <math.h>
+
+#include  <X11/Intrinsic.h>
+#include  <X11/IntrinsicP.h>
+#include  <X11/StringDefs.h>
+#include  <X11/CoreP.h>
+#include  <X11/CompositeP.h>
+#include  <X11/ConstrainP.h>
+#include  <Xm/XmP.h>
+#include  <Xm/DrawingAP.h>
+#include  <Xm/ArrowBP.h>
+#include  <Xm/SeparatorP.h>
+#include  "Carousel.h"
+#include  "CarouselP.h"
+
+#ifndef MAX
+#define   MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define   MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+static void             Initialize();
+static void             Resize();
+static void             Destroy();
+static Boolean          SetValues();
+static XtGeometryResult GeometryManager();
+static void             ChangeManaged();
+static void             new_layout();
+static void 			left();
+static void 			right();
+static void 			scroll();
+static int 				get_nb_children();
+static int 				get_column_width();
+static void 			show_arrows();
+
+static void             InsertChild();
+static void             DeleteChild();
+static int				widget_is_set();
+static void				widget_reset();
+static void				force_radio_behaviour();
+static void             toggle_action();
+
+#define DEBUG(a) printf("%s\n",a);
+
+static XtResource resources[] = {
+	{XtNspeed,XtCSpeed, XmRInt,sizeof(int),
+	XtOffset(CarouselWidget,carousel.speed), XtRImmediate,(XtPointer) 5 },
+
+	{XmNcolumns,XmCColumns, XmRInt,sizeof(int),
+	XtOffset(CarouselWidget,carousel.columns), XtRImmediate,(XtPointer) 2 },
+
+	{XmNrows,XmCRows, XmRInt,sizeof(int),
+	XtOffset(CarouselWidget,carousel.rows), XtRImmediate,(XtPointer) 2 },
+
+	{XmNmargin,XmCMargin, XmRInt,sizeof(int),
+	XtOffset(CarouselWidget,carousel.margin), XtRImmediate,(XtPointer) 2 },
+
+    /* Behavior of special children */
+
+	{XmNradioBehavior, XmCRadioBehavior, XtRBoolean, sizeof(Boolean),
+	XtOffset(CarouselWidget, carousel.radio_behaviour), XtRImmediate, (XtPointer) True }
+};
+
+#ifndef USE_MANAGER
+#define USE_MANAGER
+#endif
+
+
+CarouselClassRec carouselClassRec = {
+	{
+	/* core_class fields  */
+	(WidgetClass) &xmDrawingAreaClassRec,/* superclass         */
+#if 0
+	(WidgetClass) &constraintClassRec,/* superclass         */
+#endif
+	"Carousel",                           /* class_name         */
+	sizeof(CarouselRec),                /* widget_size        */
+	NULL,                             /* class_init         */
+	NULL,                             /* class_part_init    */
+	FALSE,                            /* class_inited       */
+	Initialize,                       /* initialize         */
+	NULL,                             /* initialize_hook    */
+	XtInheritRealize,                 /* realize            */
+	NULL,                             /* actions            */
+	0,                                /* num_actions        */
+	resources,                        /* resources          */
+	XtNumber(resources),              /* num_resources      */
+	NULLQUARK,                        /* xrm_class          */
+	TRUE,                             /* compress_motion    */
+	TRUE,                             /* compress_exposure  */
+	TRUE,                             /* compress_enterleave*/
+	TRUE,                             /* visible_interest   */
+	Destroy,                          /* destroy            */
+	Resize,                           /* resize             */
+	(XtExposeProc)_XmRedisplayGadgets,/* expose             */
+
+	SetValues,                        /* set_values         */
+	NULL,                             /* set_values_hook    */
+	XtInheritSetValuesAlmost,         /* set_values_almost  */
+	NULL,                             /* get_values_hook    */
+	NULL,                             /* accept_focus       */
+	XtVersion,                        /* version            */
+	NULL,                             /* callback_private   */
+	XtInheritTranslations,            /* tm_table           */
+	NULL,                             /* query_geometry     */
+	XtInheritDisplayAccelerator,      /* display_accelerator*/
+	NULL,                             /* extension          */
+	},
+	{
+	/* composite_class fields */
+	GeometryManager,                 /* geometry_manager    */
+	ChangeManaged,                   /* change_managed      */
+	InsertChild,                     /* insert_child        */
+	DeleteChild,                     /* delete_child        */
+	NULL ,                           /* extension           */
+	},
+	{ 
+	/* constraint_class fields */
+	NULL,                             /* subresources        */
+	0,                                /* subresource_count   */
+	0,                                /* constraint_size     */
+	NULL,                             /* initialize          */
+	NULL,                             /* destroy             */
+	NULL,                             /* set_values          */
+	NULL,                             /* extension           */
+	},
+	{
+	XtInheritTranslations,   /* default translations */
+	NULL,                    /* syn_resources          */
+	0,               /* num_syn_resources      */
+	NULL,                        /* syn_cont_resources     */
+	0,                           /* num_syn_cont_resources */
+	XmInheritParentProcess,  /* parent_process */
+	NULL,                        /* extension              */
+
+	},
+	{
+	NULL,
+	},
+	{
+	/* Carousel class fields */
+	0,                               /* ignore              */
+	}
+};
+
+
+
+
+
+WidgetClass carouselWidgetClass = (WidgetClass) &carouselClassRec;
+
+static void Initialize(request, new)
+CarouselWidget request, new;
+{
+	Arg   al[10];
+	int   ac;
+	/*
+   * Make sure the widget's width and height are 
+   * greater than zero.
+   */
+	if (request->core.width <= 0)
+		new->core.width = 5;
+	if (request->core.height <= 0)
+		new->core.height = 5;
+
+	ac = 0;
+	XtSetArg(al[ac], XmNarrowDirection, (XtArgVal) 2); ac++;
+	XtSetArg(al[ac], XmNshadowThickness, (XtArgVal) 0); ac++;
+	XtSetArg(al[ac], XmNhighlightThickness, (XtArgVal) 0); ac++;
+	new->carousel.left       = XtCreateManagedWidget("left_arrow", 
+			xmArrowButtonWidgetClass, (Widget) new, al, ac);
+	XtAddCallback(new->carousel.left, XmNactivateCallback, left, 
+			      (XtPointer) new);
+	ac = 0;
+	XtSetArg(al[ac], XmNarrowDirection, (XtArgVal) 3); ac++;
+	XtSetArg(al[ac], XmNshadowThickness, (XtArgVal) 0); ac++;
+	XtSetArg(al[ac], XmNhighlightThickness, (XtArgVal) 0); ac++;
+	new->carousel.right      = XtCreateManagedWidget("right_arrow", 
+			xmArrowButtonWidgetClass, (Widget) new, al, ac);
+	XtAddCallback(new->carousel.right, XmNactivateCallback, right, 
+				  (XtPointer) new);
+	ac = 0;
+	new->carousel.line      = XtCreateManagedWidget("right_arrow", 
+			xmSeparatorWidgetClass, (Widget) new, al, ac);
+
+	new->carousel.offset = 0;
+}
+
+static void Destroy(w)
+CarouselWidget w;
+{
+}
+
+static void Resize(w)
+CarouselWidget w;
+{
+	new_layout(w, True);
+}
+
+static void left(Widget w, CarouselWidget o, XmArrowButtonCallbackStruct*cb)
+{
+	scroll(o, 1);
+
+}
+static void right(Widget w, CarouselWidget o, XmArrowButtonCallbackStruct*cb)
+{
+	scroll(o, -1);
+
+}
+static void place(CarouselWidget w)
+{
+	int i, j;
+	Dimension width  = 4;
+	Dimension height = 4;
+	Position  x, y;
+
+	for (i = 0; i < w->composite.num_children;  i++) { 
+		Widget c = w->composite.children[i];
+		if (XtIsManaged(c) && c != w->carousel.line 
+			&& c != w->carousel.right && c != w->carousel.left) {
+			width  = MAX(width, c->core.width);
+			height = MAX(height, c->core.height);
+		}
+	}
+	x = w->carousel.offset;
+	y = 0;
+
+	j = 0;
+
+	for (i = 0; i < w->composite.num_children;  i++) { 
+		Widget c = w->composite.children[i];
+		if (XtIsManaged(c) && c != w->carousel.line 
+			&& c != w->carousel.right && c != w->carousel.left) {
+			_XmConfigureObject((RectObj)c, x, y, width, height, 0);
+			y += height;
+			j++;
+			if ((j%w->carousel.rows) == 0) {
+				x += width;
+				y = 0;
+			}
+		}
+	}
+	w->carousel.child_width  = width;
+	w->carousel.child_height = height;
+}
+
+static void scroll(CarouselWidget w, int direction)
+{
+	int width = w->carousel.child_width;
+	int i;
+	w->carousel.offset += direction * (width%w->carousel.speed);
+
+	for (i = 0; i < w->carousel.speed;  i++) { 
+		w->carousel.offset += direction * width/w->carousel.speed;
+		place(w);
+		XmUpdateDisplay((Widget)w);
+	} 
+	show_arrows(w);
+
+}
+
+static Boolean SetValues(current, request, new)
+CarouselWidget current, request, new;
+{
+	if (new->carousel.radio_behaviour && !current->carousel.radio_behaviour)
+		force_radio_behaviour(new, False, NULL);
+
+	/* should do something */
+	return (False);
+}
+
+
+static XtGeometryResult GeometryManager(w, request, reply)
+Widget               w;
+XtWidgetGeometry    *request;
+XtWidgetGeometry    *reply;
+{
+/*
+	new_layout(XtParent(w));
+*/
+	return (XtGeometryYes);
+}
+
+static void ChangeManaged(tw)
+CarouselWidget tw;
+{
+	new_layout(tw, False);
+	force_radio_behaviour(tw, False, NULL);
+}
+
+
+static void new_layout(tw, resize)
+CarouselWidget   tw;
+Boolean          resize;
+{
+	Dimension width;
+	Dimension height, height_rc;
+	Position  left_x, right_x;
+	
+	Widget    left = tw->carousel.left;
+	Widget    right = tw->carousel.right;
+	Widget    line = tw->carousel.line;
+
+	place(tw);
+/* Size */ 
+	height_rc = tw->carousel.child_height*tw->carousel.rows;
+	height = height_rc + left->core.height;
+	width  = tw->carousel.child_width * tw->carousel.columns;
+
+	if(tw->core.width != width || tw->core.height != height)
+	{
+		Dimension           maxWidth = width, maxHeight = height;
+		XtGeometryResult    result;
+		Dimension           replyWidth = 0, replyHeight = 0;
+
+		result = XtMakeResizeRequest(
+		    (Widget)tw,
+		    maxWidth,
+		    maxHeight, 
+		    &replyWidth, &replyHeight);
+
+		if (result == XtGeometryAlmost)
+			XtMakeResizeRequest (
+			    (Widget)tw, 
+			    replyWidth, 
+			    replyHeight,NULL, NULL);
+	}
+	XtMoveWidget(left, 0, height_rc);
+	XtMoveWidget(right,width-right->core.width,height_rc);
+	XtConfigureWidget(line,0, height_rc + left->core.height/2, 
+				 width, line->core.height, 0);
+
+	show_arrows(tw);
+
+}
+
+Widget CreateCarousel(par,nam,al,ac)
+Widget par;
+char  *nam;
+Arg   *al;
+int   ac;
+{
+	return   XtCreateWidget(nam,carouselWidgetClass,par,al,ac);
+}
+
+static void	show_arrows(CarouselWidget w)
+{
+	int child = w->composite.num_children - 3;
+	int col   = (child + w->carousel.rows - 1)/w->carousel.rows;
+	int width  = (col - w->carousel.columns) * w->carousel.child_width;
+
+	if (w->carousel.offset >= 0) XtUnmanageChild(w->carousel.left);
+	else XtManageChild(w->carousel.left);
+
+	if (w->carousel.offset <= -width ) XtUnmanageChild(w->carousel.right);
+	else XtManageChild(w->carousel.right);
+
+
+}
+
+static void force_radio_behaviour(CarouselWidget parent, int keep_wset, Widget wset)
+{
+	Widget child;
+	int i, set, set_found = 0;
+
+	if (!parent->carousel.radio_behaviour) return;
+
+	for (i = 0; i < parent->composite.num_children;  i++) { 
+		child = parent->composite.children[i];
+		set = widget_is_set(child);
+		if (set) {
+			if ((keep_wset && wset != child) || set_found) widget_reset(child);
+			else set_found = 1;
+		}
+	}
+}		
+
+static int widget_is_set(Widget w)
+{
+	if (!XmIsToggleButton(w) && !XmIsToggleButtonGadget(w))
+		return 0;
+
+	return (int) XmToggleButtonGetState(w);
+}
+
+static void widget_reset(Widget w)
+{
+	if (!XmIsToggleButton(w) && !XmIsToggleButtonGadget(w))
+		return;
+
+	XmToggleButtonSetState(w, False, True);
+}
+
+static void InsertChild(Widget w)
+{
+	Widget parent = XtParent(w);
+
+	/* Call the composite method */
+
+	(* ( (CompositeWidgetClass) (carouselWidgetClass->core_class.superclass) )->composite_class.insert_child) (w);
+
+	if (XmIsToggleButton(w)) {
+		XtAddCallback(w,
+			XmNvalueChangedCallback,
+			toggle_action, 
+			(XtPointer) NULL);
+	}
+}
+
+static void DeleteChild(Widget w)
+{
+	if (XmIsToggleButton(w)) {
+		XtRemoveCallback(w,
+			XmNvalueChangedCallback,
+			toggle_action, 
+			(XtPointer) NULL);
+	}
+
+	/* call the composite method */
+
+	(* ( (CompositeWidgetClass) (carouselWidgetClass->core_class.superclass) )->composite_class.delete_child) (w);
+
+}
+
+static void toggle_action(Widget w, caddr_t udate, XmToggleButtonCallbackStruct* cdata)
+{
+	CarouselWidget parent = (CarouselWidget)XtParent(w);
+	if (parent->carousel.radio_behaviour)
+	{
+		if (cdata->set)
+			force_radio_behaviour(parent, True, w);
+	}
+}
diff --git a/src/libMvMotif/Carousel.h b/src/libMvMotif/Carousel.h
new file mode 100644
index 0000000..5e126e5
--- /dev/null
+++ b/src/libMvMotif/Carousel.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef CAROUSEL_H
+#define CAROUSEL_H
+
+#define XtNspeed   "speed"
+#define XtCSpeed   "Speed"
+
+extern WidgetClass  carouselWidgetClass;
+
+typedef struct _CarouselClassRec *CarouselWidgetClass;
+typedef struct _CarouselRec      *CarouselWidget;
+#ifdef _NO_PROTO
+ 
+extern Widget CreateCarousel();
+ 
+#else
+ 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+ 
+Widget    CreateCarousel(Widget,String,Arg*,int);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+ 
+#endif /* _NO_PROTO */
+ 
+
+
+#endif /* CAROUSEL_H */
diff --git a/src/libMvMotif/CarouselP.h b/src/libMvMotif/CarouselP.h
new file mode 100644
index 0000000..115c81c
--- /dev/null
+++ b/src/libMvMotif/CarouselP.h
@@ -0,0 +1,60 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef CAROUSELP_H
+#define CAROUSELP_H
+
+#include <Xm/XmP.h>
+#include <Xm/DrawingAP.h>
+
+typedef struct _CarouselClassPart {
+    int         ignore;
+} CarouselClassPart;
+
+typedef struct _CarouselClassRec {
+    CoreClassPart       core_class;
+    CompositeClassPart  composite_class;
+    ConstraintClassPart constraint_class;
+    XmManagerClassPart  manager_class;
+    XmDrawingAreaClassPart  drawing_area_class;
+    CarouselClassPart     carousel_class;
+} CarouselClassRec;
+
+extern CarouselClassRec carouselClassRec;
+
+typedef struct {
+	Widget  left;
+	Widget  right;
+	Widget  line;
+	int		columns;
+	int		rows;
+	int     speed;
+	int     offset;
+	int     child_width;
+	int     child_height;
+	int     margin;
+	Boolean radio_behaviour;
+} CarouselPart;
+
+
+typedef struct _CarouselRec {
+    CorePart            core;
+    CompositePart       composite;
+    ConstraintPart      constraint;
+    XmManagerPart       manager;
+    XmDrawingAreaPart   drawing_area;
+    CarouselPart            carousel;
+}  CarouselRec;
+
+
+
+#endif /* CAROUSELP_H */
+
+
+
diff --git a/src/libMvMotif/ChartP.h b/src/libMvMotif/ChartP.h
new file mode 100644
index 0000000..b620d31
--- /dev/null
+++ b/src/libMvMotif/ChartP.h
@@ -0,0 +1,118 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef CHARTP_H
+#define CHARTP_H
+
+#include <Xm/XmP.h>
+#if (XmVersion >= 1002)
+#include <Xm/PrimitiveP.h>
+#endif
+
+#include <gpixmap.h>
+
+/*
+** Auxiliary struct
+*/
+
+typedef struct _ChartPointerList
+{
+
+	Widget widget;
+	struct _ChartPointerList *next;
+} ChartPointerList;
+
+/*
+** Class Part
+*/
+
+/*
+** Class Part
+*/
+
+typedef struct _ChartClassPart 
+{
+	struct _ChartPointerList *active_ws;
+} ChartClassPart;
+
+typedef struct _ChartClassRec
+{
+	CoreClassPart		core_class;
+	XmPrimitiveClassPart	primitive_class;
+	ChartClassPart		chart_class;
+} ChartClassRec;
+
+extern ChartClassRec chartClassRec;
+
+/*
+** Instance Part
+*/
+
+typedef struct _ChartPart
+{
+	int            worldx,		/* GKS world coord	*/
+	               worldy;
+
+	int            user_input;	/* input type		*/
+	int            input;		/* input type		*/
+
+	int            npoints;		/* number of input pts	*/
+
+	XPoint         point[2];	/* list of points	*/
+	XPoint         limit[2];	/* surrounding rectangle*/
+
+	XtCallbackList exposecallback;
+	XtCallbackList movecallback;
+	XtCallbackList resizecallback;
+	XtCallbackList dblcallback;
+	XtCallbackList inputcallback;
+	XtCallbackList sendcallback;
+	XtCallbackList answercallback;
+
+	Boolean        backing_store;
+	Dimension      backst_width, backst_height;
+	Boolean        keep_aratio;
+
+	/* Private resources */
+	
+	int            empty;           /* TEMPO */
+	
+	GksPixmap*     gpixmap;         /* Gks Pixmap works	*/
+
+	GC             gc_xor;          /* graphics context	*/
+	GC             gc_copy;	        /* graphics context     */
+
+	int            zoomed;          /* indicate if the window
+	                                   was zoomed or not    */
+	int            modif_input;     /* flag to indicated if
+	                                   input is currently
+	                                   being modified       */
+	float          x0,y0,x1,y1;     /* zoom viewport	*/
+	int            input_visible;   /* indicate if the echo
+	                                   is visible or not	*/
+	int            resized;         /* indicate for the
+	                                   next expose method
+	                                   if the window has
+	                                   been resized		*/
+	int            init;            /* indicate the
+	                                   expose method to
+	                                   initialize works	*/
+
+	int            key;             /* indicate if any modifier
+	                                   key was used         */
+} ChartPart;
+
+typedef struct _ChartRec
+{
+	CorePart	core;
+	XmPrimitivePart	primitive;
+	ChartPart	chart;
+} ChartRec;
+
+#endif
diff --git a/src/libMvMotif/Colors.c b/src/libMvMotif/Colors.c
new file mode 100644
index 0000000..2c3fcfd
--- /dev/null
+++ b/src/libMvMotif/Colors.c
@@ -0,0 +1,322 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <X11/IntrinsicP.h>
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <X11/CoreP.h>
+#include <X11/cursorfont.h>
+#include "Colors.h"
+#include "ColorsP.h"
+
+
+#ifndef ABS
+#define ABS(a)           ((a)>=0?(a):-(a))
+#endif
+#ifndef MIN
+#define MIN(a,b)         ((a)>(b)?(b):(a))
+#endif
+
+static void    create_gcs();
+static void    calc_new_size();
+
+/*
+  Widget class methods
+*/
+
+static void    Initialize();
+static void    Redisplay();
+static void    Resize();
+static void    Destroy();
+static void    Activate();
+static Boolean SetValues();
+
+static char defaultTranslations[] = "\
+<BtnDown>:activate()\n\
+~s ~m ~a <Key>Return:PrimitiveParentActivate()\n\
+<Key>osfActivate:PrimitiveParentActivate()\n\
+<Key>osfCancel:PrimitiveParentCancel()\n\
+<Key>osfSelect:activate()\n\
+<Key>osfHelp:Help()\n\
+~s ~m ~a <Key>space:activate()\n\
+<Key>osfHelp:Help()";
+
+
+static XtActionsRec actionsList[] = {
+	{ "activate", (XtActionProc)Activate, },
+};
+
+
+static XtResource resources[] = {
+	{XmNactivateCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (ColorsWidget, colors.activate),XtRCallback,(XtPointer)NULL},
+	{ XmNfontList, XmCFontList, XmRFontList, sizeof (XmFontList),
+	XtOffset (ColorsWidget, colors.fontlist), XmRString, "fixed"},
+	{ XmNlabelString, XmCString, XmRString, sizeof (String),
+	XtOffset (ColorsWidget, colors.no_colours), XmRString, "None"},
+};
+
+/*---------------------------------------------------------------*/
+/* Static initialisation of the class record                     */
+/*---------------------------------------------------------------*/
+
+ColorsClassRec  colorsClassRec = {
+	{
+	(WidgetClass) &xmPrimitiveClassRec,  /* superclass            */
+	"Colors",                            /* class_name            */
+	sizeof(ColorsRec),                   /* widget_size           */
+	NULL,                                /* class_initialize      */
+	NULL,                                /* class_part_initialize */
+	FALSE,                               /* class_inited          */
+	Initialize,                          /* initialize            */
+	NULL,                                /* initialize_hook       */
+	XtInheritRealize,                    /* realize               */
+	actionsList,                         /* actions               */
+	XtNumber(actionsList),               /* num_actions           */
+	resources,                           /* resources             */
+	XtNumber(resources),                 /* num_resources         */
+	NULLQUARK,                           /* xrm_class             */
+	TRUE,                                /* compress_motion       */
+	TRUE,                                /* compress_exposure     */
+	TRUE,                                /* compress_enterleave   */
+	TRUE,                                /* visible_interest      */
+	Destroy,                             /* destroy               */
+	Resize,                              /* resize                */
+	Redisplay,                           /* expose                */
+	SetValues,                           /* set_values            */
+	NULL,                                /* set_values_hook       */
+	XtInheritSetValuesAlmost,            /* set_values_almost     */
+	NULL,                                /* get_values_hook       */
+	NULL,                                /* accept_focus          */
+	XtVersion,                           /* version               */
+	NULL,                                /* callback private      */
+	defaultTranslations,                 /* tm_table              */
+	NULL,                                /* query_geometry        */
+	NULL,                                /* display_accelerator   */
+	NULL,                                /* extension             */
+	},
+	{
+	(XtWidgetProc)_XtInherit,             /* border_highlight      */
+	(XtWidgetProc)_XtInherit,             /* border_unhighligh     */
+	XtInheritTranslations,                /* translations          */
+	(XtActionProc)_XtInherit,             /* arm_and_activate      */
+	NULL,                                 /* syn_resources         */
+	0,                                    /* num_syn_resources     */
+	NULL,                                 /* extension             */
+	},
+	{
+	0,                                    /* ignore                */
+	},
+};
+
+WidgetClass colorsWidgetClass = (WidgetClass) &colorsClassRec;
+
+/*---------------------------------------------------------------*/
+/* Create the two GCs needed                                     */
+/*---------------------------------------------------------------*/
+
+static void create_gcs(ColorsWidget w)
+{
+	int     i;
+	XGCValues values;
+	XtGCMask  valueMask;
+
+	valueMask         =  GCFunction | GCForeground;
+	values.function   = GXcopy;
+
+	for(i=0;i<w->colors.count;i++)
+	{
+		values.foreground = w->colors.pixels[i];
+		w->colors.gc[i] = XtGetGC((Widget)w,valueMask,&values);
+	}
+
+}
+
+static void free_gcs(ColorsWidget w)
+{
+	int i;
+	for(i=0;i<w->colors.count;i++)
+		XtReleaseGC((Widget)w,w->colors.gc[i]);
+}
+
+/*--------------------------------------------------------------*/
+/* Initialize: Create the GCs                                   */
+/*--------------------------------------------------------------*/
+
+static void Initialize (ColorsWidget request, ColorsWidget new)
+{
+    Display *dpy   = XtDisplay(new);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	XFontStruct     *fs = (XFontStruct *) NULL;
+	XGCValues values;
+	XtGCMask  valueMask = 0;
+
+	/* Check the size of the widget */
+
+	if (request->core.width == 0)
+		new->core.width = 5;
+
+	if (request->core.height == 0)
+		new->core.height = 5;
+
+	_XmFontListGetDefaultFont(new->colors.fontlist,&fs);
+	if(fs != NULL)
+	{
+		valueMask    |= GCFont;
+		values.font  = fs->fid;
+	}
+
+	new->colors.max   = 10;
+	new->colors.count = 0;
+	new->colors.pixels = NULL;
+	new->colors.gc     = NULL;
+	new->colors.fontGC = XCreateGC(dpy,root,valueMask,&values);
+	create_gcs(new);
+
+}
+
+
+/*--------------------------------------------------------------*/
+/* Destroy the widget: release all memory alocated              */
+/*--------------------------------------------------------------*/
+
+static void Destroy (ColorsWidget w)
+{
+	free_gcs(w);
+	XtFree((XtPointer)w->colors.pixels);
+	XtFree((XtPointer)w->colors.gc);
+	XFreeGC(XtDisplay(w),w->colors.fontGC);
+}
+
+
+static void Resize (ColorsWidget w)
+{
+}
+
+static void draw(ColorsWidget w)
+{
+	int i;
+	int frame  = w->primitive.highlight_thickness 
+		+ w->primitive.shadow_thickness;
+	int height = w->core.height - 2*frame;
+	int width  = w->core.width  - 2*frame ;
+	int x      = frame;
+	int y      = frame;
+
+
+	if(w->colors.count)
+	{
+		width /= w->colors.count;
+
+		for(i=0;i<w->colors.count;i++)
+		{
+			XFillRectangle(XtDisplay (w), XtWindow(w),
+			    w->colors.gc[i],x,y,width,height);
+		x += width;
+		}
+	}
+	else {
+		XmString s = XmStringCreateSimple(w->colors.no_colours);
+		XRectangle r;
+
+		r.x      = x;
+		r.y      = y;
+		r.width  = width;
+		r.height = height;
+
+		XClearArea(XtDisplay(w),XtWindow(w), x,y,width,height,False);
+		y += (height - XmStringHeight(w->colors.fontlist,s))/2;
+
+		XmStringDraw (XtDisplay(w), XtWindow(w),
+			w->colors.fontlist, s,
+			w->colors.fontGC,
+			x,y,width,
+			XmALIGNMENT_CENTER,XmSTRING_DIRECTION_L_TO_R,&r);
+		XmStringFree(s);
+	}
+}
+
+static void Redisplay(ColorsWidget w, XEvent *event, Region region)
+{
+	draw(w);
+
+	_XmDrawShadows(XtDisplay(w), XtWindow(w),
+	    w->primitive.bottom_shadow_GC,
+	    w->primitive.top_shadow_GC,
+	    (int) w->primitive.highlight_thickness,
+	    (int) w->primitive.highlight_thickness,
+	    (int) (w->core.width - 
+		(2*w->primitive.highlight_thickness)),
+	    (int) (w->core.height - 
+		(2*w->primitive.highlight_thickness)),
+	    (int) w->primitive.shadow_thickness,
+	    XmSHADOW_OUT);
+}
+
+/*------------------------------------------------------------------*/
+/* SetValues : redraw only for font or color changes                */
+/*------------------------------------------------------------------*/
+
+static Boolean SetValues (ColorsWidget current, ColorsWidget request, 
+ColorsWidget new)
+{
+	Boolean    redraw = FALSE;
+	redraw = True;
+	return (redraw);
+}
+
+
+static void Activate(Widget widget,XEvent *event,char **args,int nargs)
+{
+	XmAnyCallbackStruct cb;
+	cb.reason = XmCR_ACTIVATE;
+	cb.event  = event;
+	XtCallCallbacks (widget,XmNactivateCallback,(XtPointer)&cb);
+}
+
+/*-----------------------------------------------------------------------*/
+/* Create a new ColorsWidget                                              */
+/*-----------------------------------------------------------------------*/
+
+Widget CreateColorsWidget(Widget parent,char *name,Arg *al,int ac)
+{
+	return XtCreateWidget(name,colorsWidgetClass,parent,al,ac);
+}
+
+void ColorsSetPixels(Widget w,int c,Pixel *pix)
+{
+	ColorsWidget cw = (ColorsWidget)w;
+	int i;
+
+	if(c == cw->colors.count)
+	{
+		for(i=0;i<c;i++)
+			if(cw->colors.pixels[i] != pix[i])
+				break;
+	
+		if(i == c) return;
+	}
+
+	free_gcs(cw);
+	XtFree((XtPointer)cw->colors.pixels);
+	XtFree((XtPointer)cw->colors.gc);
+	cw->colors.pixels = (Pixel*)XtCalloc(c,sizeof(Pixel));
+	cw->colors.gc     = (GC*)XtCalloc(c,sizeof(GC));
+	cw->colors.count = c;
+	for(i=0;i<c;i++)
+		cw->colors.pixels[i] = pix[i];
+
+	create_gcs(cw);
+	if(XtIsRealized(w) && XtIsManaged(w))
+		draw(w);
+}
diff --git a/src/libMvMotif/Colors.h b/src/libMvMotif/Colors.h
new file mode 100644
index 0000000..d1c919d
--- /dev/null
+++ b/src/libMvMotif/Colors.h
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef  COLORS_H
+#define  COLORS_H
+
+extern WidgetClass colorsWidgetClass;
+typedef struct _ColorsClassRec * ColorsWidgetClass;
+typedef struct _ColorsRec      * ColorsWidget;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+extern Widget CreateColorsWidget(Widget,char*,Arg*,int);
+extern void ColorsSetPixels(Widget,int,Pixel*);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+#endif
diff --git a/src/libMvMotif/ColorsP.h b/src/libMvMotif/ColorsP.h
new file mode 100644
index 0000000..40e6e19
--- /dev/null
+++ b/src/libMvMotif/ColorsP.h
@@ -0,0 +1,47 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef COLORSP_H
+#define COLORSP_H
+
+#include <Xm/XmP.h>
+#include <Xm/PrimitiveP.h>
+
+/* Colors class : no new fileds */
+
+typedef struct _ColorsClassPart{
+    int ignore;
+} ColorsClassPart;
+
+typedef struct _ColorsClassRec{
+    CoreClassPart    core_class;
+    XmPrimitiveClassPart  primitive_class;
+    ColorsClassPart  colors_class;
+} ColorsClassRec;
+
+extern ColorsClassRec colorsClassRec;
+
+typedef struct _ColorsPart {
+	int             count;
+	int             max;
+	Pixel           *pixels;
+	GC              *gc;
+	XtCallbackList  activate;
+	XmFontList      fontlist;
+	char           *no_colours;
+	GC              fontGC;
+} ColorsPart;
+
+typedef struct _ColorsRec {
+    CorePart          core;
+    XmPrimitivePart  primitive;
+    ColorsPart        colors;
+} ColorsRec;
+
+#endif
diff --git a/src/libMvMotif/DecChartP.h b/src/libMvMotif/DecChartP.h
new file mode 100644
index 0000000..12b99f6
--- /dev/null
+++ b/src/libMvMotif/DecChartP.h
@@ -0,0 +1,77 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef DECCHARTP_H
+#define DECCHARTP_H
+
+#include <Xm/ToggleB.h>
+
+/*
+** Class Part
+*/
+
+typedef struct _DecChartClassPart 
+{
+	int	ignore;
+} DecChartClassPart;
+
+typedef struct _DecChartClassRec
+{
+	CoreClassPart		core_class;
+	CompositeClassPart	composite_class;
+	DecChartClassPart	dec_class;
+} DecChartClassRec;
+
+extern DecChartClassRec decChartClassRec;
+
+/*
+** Instance part
+*/
+
+typedef struct _DecChartPart
+{
+	/* Compatibility with Motif */
+
+	caddr_t		user_data;
+
+	/* children attributes */
+
+	String	title; 
+	Widget	text;
+
+	Boolean	manage_watch;
+	Widget	watch;
+	String  watch_pixmap_name;
+	Pixmap  watch_pixmap;
+
+	int	legend_position;
+	Boolean manage_legend;
+	unsigned char legend_orientation;
+
+	/* Callbacks */
+
+	XtCallbackList	expose_callback;
+	XtCallbackList	help_callback;
+	XtCallbackList	value_changed_callback;
+
+	/* Internal resources */
+
+	GC      gc;
+
+} DecChartPart;
+
+typedef struct _DecChartRec
+{
+	CorePart	core;
+	CompositePart	composite;
+	DecChartPart	decChart;
+
+} DecChartRec;
+
+#endif
diff --git a/src/libMvMotif/Drag.c b/src/libMvMotif/Drag.c
new file mode 100644
index 0000000..f3b8616
--- /dev/null
+++ b/src/libMvMotif/Drag.c
@@ -0,0 +1,4941 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+B.Raoult
+Fri Apr 10 10:05:19 BST 1992
+*/
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/cursorfont.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/shape.h>
+
+#include <X11/Intrinsic.h>
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+#include <X11/CoreP.h>
+#include <X11/CompositeP.h>
+#include <X11/ConstrainP.h>
+#include <Xm/Xm.h>
+#include <Xm/XmP.h>
+#include <Xm/DrawingAP.h>
+#include <Xm/ExtObjectP.h>
+#include <Xm/ScrolledWP.h>
+#include <Xm/TextF.h>
+#include <Xm/TransltnsP.h>
+#include <X11/xpm.h>
+#include "Drag.h"
+#include "DragP.h"
+
+static Icon check_icon(DragWidget,Icon);
+static void             Initialize();
+static void             Initialize_class();
+static void             Destroy();
+static void             Redraw();
+static Boolean          SetValues();
+static void             Realize();
+static void             Resize();
+static XtGeometryResult QueryProc();
+
+static void 			ShowLast();
+static void 			KeySelect();
+static void             SelectAll();
+static void             SelectNone();
+
+static void             StartSelect();
+static void             DoSelect();
+static void             EndSelect();
+
+
+static void             CleanUp();
+static void             ToggleSize();
+static void             Sort();
+static int              SortByXY();
+
+static void add_folder(DragWidget,Widget);
+static void	remove_folder(DragWidget,Widget);
+static Boolean same_tree(Widget,Widget);
+static void end_edit(DragWidget widget);
+
+static Icon             find_icon();
+static void draw_icons(DragWidget,Region);
+static void place_icon(DragWidget,Icon,Boolean);
+static void hide_icon(DragWidget,Icon);
+static void check_size(DragWidget);
+static void show_icon(DragWidget,Icon);
+static void show_hide(DragWidget,Icon,Boolean);
+static void raise_icon(DragWidget,Icon);
+static void plot_icon(DragWidget,Display*,Window,GC,Icon,int,int);
+static void             toggle_icon();
+static void remove_icon(DragWidget,Icon,Boolean);
+static void inval_icon(DragWidget,Icon);
+static void blink_icon(DragWidget,Icon);
+static void select_icon(DragWidget,Icon,XEvent*,Boolean);
+static void             sort_icons();
+static void             unselect_all_icons();
+static void answer(DragWidget,Window,int,Icon,int,int,int,Window,int,int);
+static void             message_event_handler();
+static void             clip_event_handler();
+static void             map_event_handler_1();
+static void             map_event_handler_2();
+static void notify_drop(Widget,XtPointer,XtPointer);
+static void             destroy_callback();
+static void	new_icon_xy(Icon,int,int);
+static void register_widget(Widget,String);
+static void set_drop_property(Widget,XtCallbackProc,XtPointer,Widget);
+static void move_icon(DragWidget,Icon,int,int,int,int);
+static void make_pixmaps(Widget widget,Icon icon,int n);
+
+static Pixmap FindPixmap(const char*,unsigned int*,unsigned int*);
+static void InstallPixmap(Pixmap,const char*,unsigned int,unsigned int,unsigned int,XImage*);
+static void FreePixmap(Widget,Pixmap);
+
+static void UnionRect(XRectangle*,XRectangle*,XRectangle*);
+static Boolean InterRect(XRectangle*,XRectangle*);
+
+/* Atoms */
+
+#define ICON_CAN_DRAG_DROP      "ICON_CAN_DRAG_DROP"
+#define ICON_DROP_WIN_ID        "ICON_DROP_WIN_ID"
+#define ICON_DROP_MISC          "ICON_DROP_MISC"
+#define ICON_DROP_WIN_NAME      "ICON_DROP_WIN_NAME"
+#define ICON_DROP_ICON_CLASS    "ICON_DROP_ICON_CLASS"
+#define ICON_DROP_ICON_NAME     "ICON_DROP_ICON_NAME"
+#define ICON_DROP_BUF_LEN       "ICON_DROP_BUF_LEN"
+#define ICON_DROP_BUF           "ICON_DROP_BUF"
+#define ICON_DROP_END           "ICON_DROP_END"
+#define ICON_DROP_ACK           "ICON_DROP_ACK"
+#define ICON_DROP_INFO          "ICON_DROP_INFO"
+#define ICON_DROP_BUF_LEN_EXT   "ICON_DROP_BUF_LEN_EXT"
+#define ICON_DROP_BUF_EXT       "ICON_DROP_BUF_EXT"
+
+
+static  Atom WinIDAtom      = NULL;
+static  Atom MiscAtom       = NULL;
+static  Atom WinNameAtom    = NULL;
+static  Atom IconClassAtom  = NULL;
+static  Atom IconNameAtom   = NULL;
+static  Atom BufLenAtom     = NULL;
+static  Atom BufAtom        = NULL;
+static  Atom EndAtom        = NULL;
+static  Atom AckAtom        = NULL;
+static  Atom InfoAtom       = NULL;
+static  Atom CanDropAtom    = NULL;
+static  Atom BufLenExtAtom     = NULL;
+static  Atom BufExtAtom        = NULL;
+
+static XtResource resources[] = {
+	{ XmNsmallIcons, XmCsmallIcons, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.small_icons), XmRImmediate,(caddr_t)False},
+	{ XmNshapeMode, XmCshapeMode, XmRInt, sizeof (int),
+	XtOffset (DragWidget, drag.shape_mode), XmRImmediate,(caddr_t)FULL_SHAPE},
+	{ XmNmarginWidth, XmCMargin, XmRInt, sizeof (int),
+	XtOffset (DragWidget, drag.marginx), XmRImmediate, (caddr_t) 10},
+	{ XmNmarginHeight, XmCMargin, XmRInt, sizeof (int),
+	XtOffset (DragWidget, drag.marginy), XmRImmediate, (caddr_t) 10},
+	{ XmNgrid, XmCgrid, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.grid), XmRImmediate, (caddr_t) True},
+	{ XmNallowResize, XmCResize, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.can_resize), XmRImmediate, (caddr_t) True},
+	{ XmNautoMove, XmCAuto, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.auto_move), XmRImmediate, (caddr_t) True},
+	{ XmNautoFolderMove, XmCAuto, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.auto_folder_move), XmRImmediate, (caddr_t) False},
+	{ XmNautoPlace, XmCAuto, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.auto_place), XmRImmediate, (caddr_t) True},
+	{ XmNautoSort, XmCAuto, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.auto_sort), XmRImmediate, (caddr_t) False},
+	{ XmNautoClean, XmCAuto, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.auto_clean), XmRImmediate, (caddr_t) False},
+	{ XmNacceptKeys, XmCAcceptKeys, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.accept_keys), XmRImmediate, (caddr_t) True},
+	{ XmNkeyThreshold, XmCThreshold, XmRInt, sizeof (int),
+	XtOffset (DragWidget, drag.key_threshold), XmRImmediate, (caddr_t) 300},
+	{ XmNsortProc, XmCSortProc, XmRsortProc, sizeof (XtPointer),
+	XtOffset (DragWidget, drag.sort), XmRImmediate, (XtPointer)DragSortByName},
+	{XmNsendmsgCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.build_message),XtRCallback,NULL},
+	{XmNflyOverCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.fly_over),XtRCallback,NULL},
+	{XmNrenamableCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.renamable),XtRCallback,NULL},
+	{XmNrenameCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.rename),XtRCallback,NULL},
+	{XmNdropCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.drop_message),XtRCallback,NULL},
+	{XmNotherDropCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.other_drop),XtRCallback,NULL},
+	{XmNanswerCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.answer),XtRCallback,NULL},
+	{XmNmoveCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.moveicon),XtRCallback,NULL},
+	{XmNkillIconCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.killicon),XtRCallback,NULL},
+	{XmNselectCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.select),XtRCallback,NULL},
+	{XmNdblClickCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.dblclick),XtRCallback,NULL},
+	{XmNfolderMoveCallback,XtCCallback,XtRCallback,sizeof(void *),
+	XtOffset (DragWidget, drag.folder_move),XtRCallback,NULL},
+	{ XmNfontList, XmCFontList, XmRFontList, sizeof (XmFontList),
+	XtOffset (DragWidget, drag.fontlist), XmRString, "fixed"},
+	{ XmNparentFolder, XmCParentFolder, XmRWidget, sizeof (Widget),
+	XtOffset (DragWidget, drag.parent_folder), XmRImmediate, NULL},
+	{ XmNselectIcons, XmCSelectIcons, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.can_select), XmRImmediate, (caddr_t) True},
+	{ XmNsingleLine, XmCSingleLine, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.single_line), XmRImmediate, (caddr_t) False},
+
+	{ XmNeditNames, XmCEditNames, XmRBoolean, sizeof (Boolean),
+	XtOffset (DragWidget, drag.edit_names), XmRImmediate, (caddr_t) False},
+
+	{ XmNeditTimeout, XmCEditTimeout, XmRInt, sizeof (int),
+	XtOffset (DragWidget, drag.edit_timeout), XmRImmediate, (caddr_t) 1000},
+
+	{XmNgetFullNameCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (DragWidget, drag.getFullName),XtRCallback,NULL},
+};
+
+
+static char defaultTranslations[] =
+"<Btn1Down>:start_selection()\n\
+<Btn1Motion>:do_selection()\n\
+<Btn1Up>:end_selection()\n\
+<Btn2Down>:start_selection()\n\
+<Btn2Motion>:do_selection()\n\
+<Btn2Up>:end_selection()\n\
+<Key>osfHelp:DrawingAreaInput() ManagerGadgetHelp()\n\
+Ctrl<Key>a:select_all()\n\
+Ctrl<Key>n:select_none()\n\
+Ctrl<Key>l:clean_up()\n\
+Ctrl<Key>s:sort()\n\
+Ctrl<Key>w:toggle_size()\n\
+Ctrl<Key>z:show_last()\n\
+None<KeyPress>:key_select()";
+
+
+static XtActionsRec actionsList[] = {
+	{ "start_selection",    (XtActionProc)StartSelect},
+	{ "do_selection",       (XtActionProc)DoSelect},
+	{ "end_selection",      (XtActionProc)EndSelect},
+	{ "select_all",         (XtActionProc)SelectAll},
+	{ "select_none",        (XtActionProc)SelectNone},
+	{ "clean_up",           (XtActionProc)CleanUp},
+	{ "toggle_size",        (XtActionProc)ToggleSize},
+	{ "key_select",         (XtActionProc)KeySelect},
+	{ "sort", 	            (XtActionProc)Sort},
+	{ "show_last", 	        (XtActionProc)ShowLast},
+};
+
+static XtResource icon_resources [] = {
+	{ XmNiconLargeBitmap, XmCIconLargeBitmap, XmRString, sizeof (String),
+	XtOffset (Icon, pix_name[0]), XmRImmediate, "default"},
+	{ XmNiconLargeMask, XmCIconLargeMask, XmRString, sizeof (String),
+	XtOffset (Icon, mask_name[0]), XmRImmediate,NULL},
+	{ XmNiconLargeOpenedBitmap,
+	XmCIconLargeOpenedBitmap, XmRString, sizeof (String),
+	XtOffset (Icon, open_name[0]), XmRImmediate,NULL},
+	{ XmNiconSmallBitmap, XmCIconSmallBitmap, XmRString, sizeof (String),
+	XtOffset (Icon, pix_name[1]), XmRImmediate, NULL},
+	{ XmNiconSmallMask, XmCIconSmallMask, XmRString, sizeof (String),
+	XtOffset (Icon, mask_name[1]), XmRImmediate,NULL},
+	{ XmNiconSmallOpenedBitmap,
+	XmCIconSmallOpenedBitmap, XmRString, sizeof (String),
+	XtOffset (Icon, open_name[1]), XmRImmediate,NULL},
+	{ XmNisFolder,
+	XmCIsFolder, XmRBoolean, sizeof (Boolean),
+	XtOffset (Icon, isfolder), XmRImmediate,(XtPointer)False},
+	{ XmNiconForeground, XmCForeground, XmRPixel, sizeof (Pixel),
+	XtOffset (Icon, foreground), XmRString, "black"},
+	{ XmNiconBackground, XmCBackground, XmRPixel, sizeof (Pixel),
+	XtOffset (Icon, background), XmRString, "white"},
+	{ XmNiconHiliteForeground, XmCIconHiliteForeground, XmRPixel, sizeof (Pixel),
+	XtOffset (Icon, hiliteforeground), XmRString, "white"},
+	{ XmNiconHiliteBackground, XmCIconHiliteBackground, XmRPixel, sizeof (Pixel),
+	XtOffset (Icon, hilitebackground), XmRString, "black"},
+
+
+};
+
+
+DragClassRec dragClassRec = {
+	{
+	/* core_class fields  */
+	(WidgetClass) &xmDrawingAreaClassRec,/* superclass         */
+	"Drag",                             /* class_name         */
+	sizeof(DragRec),                  /* widget_size        */
+	Initialize_class,                 /* class_init         */
+	NULL,                             /* class_part_init    */
+	FALSE,                            /* class_inited       */
+	Initialize,                       /* initialize         */
+	NULL,                             /* initialize_hook    */
+	Realize,                          /* realize            */
+	actionsList,                      /* actions            */
+	XtNumber(actionsList),            /* num_actions        */
+	resources,                        /* resources          */
+	XtNumber(resources),              /* num_resources      */
+	NULLQUARK,                        /* xrm_class          */
+	TRUE,                             /* compress_motion    */
+	XtExposeCompressMaximal,          /* compress_exposure  */
+	TRUE,                             /* compress_enterleave*/
+	TRUE,                             /* visible_interest   */
+	Destroy,                          /* destroy            */
+	Resize,                           /* resize             */
+	Redraw,                           /* expose             */
+	SetValues,                        /* set_values         */
+	NULL,                             /* set_values_hook    */
+	XtInheritSetValuesAlmost,         /* set_values_almost  */
+	NULL,                             /* get_values_hook    */
+	NULL,                             /* accept_focus       */
+	XtVersion,                        /* version            */
+	NULL,                             /* callback_private   */
+	defaultTranslations,              /* tm_table           */
+	QueryProc,                        /* query_geometry     */
+	XtInheritDisplayAccelerator,      /* display_accelerator*/
+	NULL,                             /* extension          */
+	},
+	{
+	/* composite_class fields */
+	NULL,                            /* geometry_manager    */
+	NULL,                            /* change_managed      */
+	XtInheritInsertChild,            /* insert_child        */
+	XtInheritDeleteChild,            /* delete_child        */
+	NULL,                            /* extension           */
+	},
+	{
+	/* constraint_class fields */
+	NULL,                             /* subresources        */
+	0,                                /* subresource_count   */
+	0,                                /* constraint_size     */
+	NULL,                             /* initialize          */
+	NULL,                             /* destroy             */
+	NULL,                             /* set_values          */
+	NULL,                             /* extension           */
+	},
+	{
+	_XmDrawingA_traversalTranslations,          /* default translations */
+	NULL,                           /* syn_resources          */
+	0,                           /* num_syn_resources      */
+	NULL,                        /* syn_cont_resources     */
+	0,                           /* num_syn_cont_resources */
+	XmInheritParentProcess,      /* parent_process */
+	NULL,                        /* extension              */
+
+	},
+	{
+	NULL,
+	},
+	{
+	/* Drag class fields */
+	NULL,                               /* ignore              */
+	},
+};
+
+WidgetClass dragWidgetClass = (WidgetClass) &dragClassRec;
+
+static XRectangle empty = {
+	0,0,0,0,};
+
+static Cursor open_cursor;
+static Cursor close_cursor;
+static Cursor drop_cursor;
+
+#define open_hand_width 16
+#define open_hand_height 16
+#define open_hand_x_hot 8
+#define open_hand_y_hot 8
+
+static char open_hand_curs[] = {
+	0x80, 0x01, 0x70, 0x1a, 0x48, 0x26, 0x4a, 0x26, 0x4d, 0x12, 0x49, 0x12,
+	0x09, 0x68, 0x01, 0x98, 0x02, 0x88, 0x02, 0x40, 0x02, 0x20, 0x04, 0x20,
+	0x04, 0x10, 0x08, 0x08, 0x08, 0x04, 0x08, 0x04, };
+
+static char open_hand_mask[] = {
+	0x80, 0x01, 0xf0, 0x1b, 0xf8, 0x3f, 0xfa, 0x3f, 0xff, 0x1f, 0xff, 0x1f,
+	0xff, 0x6f, 0xff, 0xff, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0xfc, 0x3f,
+	0xfc, 0x1f, 0xf8, 0x0f, 0xf8, 0x07, 0xf8, 0x07, };
+
+
+static char close_hand_curs[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x06, 0x26, 0x09,
+	0x05, 0x08, 0x01, 0x04, 0x01, 0x0c, 0x01, 0x10, 0x01, 0x10, 0x02, 0x10,
+	0x02, 0x08, 0x04, 0x04, 0x04, 0x02, 0x04, 0x02, };
+
+static char close_hand_mask[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x06, 0xfe, 0x0f,
+	0xff, 0x0f, 0xff, 0x07, 0xff, 0x0f, 0xff, 0x1f, 0xff, 0x1f, 0xfe, 0x1f,
+	0xfe, 0x0f, 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x03, };
+
+/*==========================================================================*/
+/*==========================================================================*/
+/*==========================================================================*/
+
+typedef struct PixmapCache {
+	struct PixmapCache *next;
+	String              name;
+	unsigned int        width;
+	unsigned int        height;
+	unsigned int        depth;
+	Pixmap              pixmap;
+	XImage*             image;
+	int                 count;
+} PixmapCache;
+
+static PixmapCache *cache = NULL;
+static int icon_batch = 0; /* drop id */
+
+static void InstallPixmap(Pixmap pixmap,const char* name,unsigned int width,
+	unsigned int height,
+	unsigned int depth,XImage* image)
+{
+	PixmapCache *p = XtNew(PixmapCache);
+
+	p->pixmap      = pixmap;
+	p->name        = XtNewString(name);
+	p->width       = width;
+	p->height      = height;
+	p->depth       = depth;
+	p->image       = image;
+	p->count       = 1;
+
+	p->next        = cache;
+	cache          = p;
+
+}
+
+static Pixmap FindPixmap(const char* name,unsigned int *width,unsigned int *height)
+{
+	PixmapCache *p = cache;
+	/* printf("FindPixmap : %s\n",name); */
+	while(p)
+	{
+		if(strcmp(name,p->name) == 0)
+		{
+			*width  = p->width;
+			*height = p->height;
+
+			p->count++;
+			return p->pixmap;
+		}
+		p = p->next;
+	}
+	return 0;
+}
+
+static XImage* PixmapImage(Widget w,Pixmap pixmap,
+	unsigned int *width,unsigned int *height,unsigned int *depth)
+{
+	Display *dpy   = XtDisplay(w);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	int x,y;
+	unsigned int dummy;
+
+	PixmapCache *p = cache;
+	/* printf("FindPixmap : %s\n",name); */
+	while(p)
+	{
+		if(p->pixmap  == pixmap)
+		{
+			if(p->depth == 0) p->depth = DefaultDepth(dpy,screen);
+			if(p->width == 0 || p->height == 0)
+			{
+				XGetGeometry(dpy,pixmap,&root,&x,&y,&p->width,
+					&p->height,&dummy,&p->depth);
+			}
+
+			*width  = p->width;
+			*height = p->height;
+			*depth  = p->depth;
+
+			/* printf("size in cache %s %d %d %d\n",p->name, */
+				/* p->width,p->height,p->depth); */
+			if(p->image == 0)
+			{
+				/* printf("image not in cache\n"); */
+				p->image =  XGetImage(dpy,pixmap,0,0,*width,*height,
+					AllPlanes,ZPixmap);
+			}
+			/* printf("image in cache\n"); */
+			return XSubImage(p->image,0,0,p->width,p->height);
+		}
+		p = p->next;
+	}
+
+	/* printf("pixmap not in cache\n"); */
+	XGetGeometry(dpy,pixmap,&root,&x,&y,width,height,&dummy,depth);
+	return XGetImage(dpy,pixmap,0,0,*width,*height,AllPlanes,ZPixmap);
+}
+
+static Pixmap GetBitMap(Widget widget,const char* name,
+	unsigned int *width,unsigned int *height)
+{
+	int dummy;
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  bitmap;
+
+	if(name == NULL) return NULL;
+
+	if(bitmap = FindPixmap(name,width,height))
+		return bitmap;
+
+	if(XReadBitmapFile(dpy,root,name,width,height,
+	    &bitmap,&dummy,&dummy)!=BitmapSuccess)
+		return NULL;
+
+	InstallPixmap(bitmap,name,*width,*height,1,0);
+
+	return bitmap;
+
+}
+
+static void FreePixmap(Widget widget,Pixmap pixmap)
+{
+	PixmapCache *p = cache;
+	PixmapCache *q = NULL;
+
+	while(p)
+	{
+		if(p->pixmap == pixmap)
+		{
+			p->count--;
+			if(p->count == 0)
+			{
+				if(q)
+					q->next = p->next;
+				else
+					cache = p->next;
+
+				XFreePixmap(XtDisplay(widget),p->pixmap);
+				XtFree(p->name);
+				XtFree((XtPointer)p);
+				return;
+			}
+		}
+		q = p;
+		p = p->next;
+	}
+
+}
+/*==========================================================================*/
+/*==========================================================================*/
+/*==========================================================================*/
+
+#define defpix_width 32
+#define defpix_height 32
+static char defpix_bits[] = {
+	0x00, 0xf0, 0x0f, 0x00, 0x00, 0x0e, 0x70, 0x00, 0x00, 0x01, 0x80, 0x00,
+	0xc0, 0x00, 0x00, 0x03, 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08,
+	0x08, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10, 0x04, 0x80, 0x0f, 0x20,
+	0x02, 0xe0, 0x38, 0x40, 0x02, 0xe0, 0x30, 0x40, 0x02, 0x00, 0x30, 0x40,
+	0x01, 0x00, 0x30, 0x80, 0x01, 0x00, 0x18, 0x80, 0x01, 0x00, 0x1c, 0x80,
+	0x01, 0x00, 0x0e, 0x80, 0x01, 0x80, 0x03, 0x80, 0x01, 0x80, 0x00, 0x80,
+	0x01, 0x80, 0x00, 0x80, 0x01, 0xc0, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40,
+	0x02, 0x00, 0x00, 0x40, 0x02, 0xe0, 0x00, 0x40, 0x04, 0xe0, 0x00, 0x20,
+	0x08, 0xe0, 0x00, 0x10, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08,
+	0x20, 0x00, 0x00, 0x04, 0xc0, 0x00, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00,
+	0x00, 0x0e, 0x70, 0x00, 0x00, 0xf0, 0x0f, 0x00, };
+
+static Pixmap GetPixMap(Widget widget,const char* name,Pixel fore,Pixel back)
+{
+	Display *dpy = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  pixmap;
+	unsigned int dummy;
+	XpmAttributes atrib;
+	static  Boolean first = True;
+	XImage *image = 0;
+
+	if(first)
+	{
+		InstallPixmap(
+		    XCreatePixmapFromBitmapData(dpy,root,
+		    defpix_bits,defpix_width,defpix_height,fore,back,
+		    DefaultDepth(dpy,screen)),
+		    "default",defpix_width,defpix_height,DefaultDepth(dpy,screen),0);
+		first = False;
+	}
+
+	if(name == NULL) return NULL;
+
+	if(pixmap = FindPixmap(name,&dummy,&dummy))
+		return pixmap;
+
+	/* pixmap = XmGetPixmap(XtScreen(widget),name,fore,back); */
+
+	atrib.valuemask   = XpmExactColors | XpmCloseness;
+	atrib.exactColors = 0;
+	atrib.closeness   = 65535;
+		/* shape = NULL; */
+
+
+	if(XpmReadFileToImage(dpy,(char*)name,&image,NULL/*&shape*/,&atrib) != PixmapSuccess)
+		image = NULL;
+
+	atrib.valuemask   = XpmExactColors | XpmCloseness;
+	atrib.exactColors = 0;
+	atrib.closeness   = 65535;
+
+	if(XpmReadFileToPixmap(dpy,root,(char*)name,&pixmap,NULL/*&shape*/,&atrib)
+	    != PixmapSuccess) return NULL;
+
+	InstallPixmap(pixmap,name,atrib.width,atrib.height,DefaultDepth(dpy,screen),image);
+
+	return pixmap;
+
+}
+
+/*==========================================================================*/
+/*==========================================================================*/
+/*==========================================================================*/
+
+static void CvtStringToSortProc(args,num_args,from,to)
+XrmValuePtr args;
+Cardinal    *num_args;
+XrmValuePtr from,to;
+{
+	static XtPointer proc;
+	char   *p = (char*)from->addr;
+
+	if(!from->addr) return;
+
+	proc = NULL;
+
+	if(strcmp(p,"byname") == 0 )  proc = (XtPointer)DragSortByName;
+	if(strcmp(p,"byclass") == 0 ) proc = (XtPointer)DragSortByClass;
+
+	to->addr = (XtPointer)&proc;
+	to->size = sizeof(XtPointer);
+
+
+}
+
+/*-----------------------------------------------------------------*/
+/* Recieve a drop message                                          */
+/*-----------------------------------------------------------------*/
+
+static int icon_to_int(DragWidget drag,Icon p)
+{
+	return p?p->id:0;
+}
+
+static Icon int_to_icon(DragWidget drag,int n)
+{
+	if(drag && XtIsDrag((Widget)drag))
+	{
+		Icon p = drag->drag.icons;
+		while(p)
+		{
+			if(p->id == n) return p;
+			p = p->next;
+		}
+	}
+	return NULL;
+}
+
+static void clip_event_handler(Widget widget,XtPointer cd,
+	XEvent *event,Boolean *continue_dispatch)
+{
+	/* Try to pass it to the assosciated drag */
+	XEvent ev = *event;
+	ev.xany.window = XtWindow((Widget)cd);
+	/* printf("Clip event !!!!\n"); */
+	XtDispatchEvent(&ev);
+
+	/* XSendEvent(XtDisplay(widget),XtWindow((Widget)cd), */
+	    /* True,NoEventMask,event); */
+	*continue_dispatch = False;
+}
+
+static void message_event_handler(widget,cd,event,continue_dispatch)
+Widget widget;
+XtPointer cd;
+XEvent    *event;
+Boolean   *continue_dispatch;
+{
+
+	static DragCallbackStruct cb;
+	static char wind_name[24];
+	static char icon_name[24];
+	static char icon_clas[24];
+	static char buffer[1024];
+	static int  icon_id;
+
+	static char *p;
+	XClientMessageEvent cevent;
+	DragWidget drag = (DragWidget)widget;
+	Boolean is_drag = XtIsDrag(widget);
+
+	/* On 64-bit platforms, there appears to be a problem when using the data.l[]
+	   part of the XClientMessageEvent structure. This is most likely because it is
+	   defined as an array of longs, but it is intended as an array of 32-bit integers
+	   (event.format=32). When dealing with this array, some of the data is lost, probably
+	   because the internal 'X' code assumes 32-bit values. Therefore, we explicitly
+	   use an 'int' pointer to access this data structure so that we can use 32-bit
+	   values in it which is what it thinks it's getting. If 'int' is ever defined
+	   to be greater than 32, then this code will have to be revised.
+	   Perhaps the only message for which this might be a problem is the WinIDAtom message
+	   - can this number always be stored in an int? The other thing to note is that
+	   where event.format was previously being set to 32, we now set it to 8. When
+	   set to 32, some bytes were not being received for some reason. This is resolved
+	   when set to 8 - it should not make a difference, so the idea is that if you tell
+	   it that the message is a set of bytes, then it should make sure that it transfers
+	   all of them rather than trying to interpret 32-bit ints as longs. */
+
+	int *iarray = (int *)&event->xclient.data.l[0];
+
+	if(event->type != ClientMessage)
+		return;
+
+	/*printf("message_event_handler(%s, %d)\n",XtName(widget),
+	     event->xclient.message_type);*/
+
+	if(event->xclient.message_type == WinIDAtom)
+	{
+		memset(&cb,0,sizeof(cb));
+		cb.reason            = DRAG_DROP;
+		cb.remote_window     = iarray[0];
+		cb.x                 = iarray[1];
+		cb.y                 = iarray[2];
+		cb.remote_widget     = XtWindowToWidget(XtDisplay(widget),
+		    cb.remote_window);
+		icon_id              = iarray[3];
+		cb.icon              = int_to_icon((DragWidget)cb.remote_widget,icon_id);
+		cb.same_folder_tree  = is_drag?same_tree(widget,cb.remote_widget):False;
+	}
+
+	if(event->xclient.message_type == WinNameAtom)
+		strcpy(wind_name,event->xclient.data.b);
+
+	if(event->xclient.message_type == IconClassAtom)
+		strcpy(icon_clas,event->xclient.data.b);
+
+	if(event->xclient.message_type == IconNameAtom)
+		strcpy(icon_name,event->xclient.data.b);
+
+	if(event->xclient.message_type == BufLenAtom)
+	{
+		cb.msg_length = iarray[0];
+		cb.icon_no    = iarray[1];
+		cb.icon_count = iarray[2];
+		cb.icon_batch = iarray[3];
+		p = buffer;
+	}
+
+	if(event->xclient.message_type == MiscAtom)
+	{
+		cb.copy = iarray[0];
+	}
+
+	if(event->xclient.message_type == BufAtom )
+	{
+		memcpy(p,event->xclient.data.b,20);
+		p += 20;
+	}
+
+	if(event->xclient.message_type == EndAtom )
+	{
+		int *oarray = (int *)&cevent.data.l[0];
+		cb.same_window = (cb.remote_window == XtWindow(widget));
+		cb.remote_name = wind_name;
+		cb.icon_class  = icon_clas;
+		cb.icon_name   = icon_name;
+		cb.accept_it   = /*True*/False;
+		cb.message     = buffer;
+		cb.event       = event;
+
+		if(is_drag)
+			XtCallCallbacks(widget,XmNdropCallback,(XtPointer)&cb);
+		else
+			notify_drop(widget,cd,(XtPointer)&cb);
+
+		/*
+        if(widget->drag.drop_message == NULL)
+            AddIcon(widget,cb.icon_class,cb.icon_name,NULL,cb.x,cb.y);
+
+        */
+
+
+		/* Send reply */
+
+		cevent.display      = XtDisplay(widget);
+		cevent.window       = cb.remote_window;
+		cevent.type         = ClientMessage;
+		cevent.format       = 8; /*32*/
+		oarray[0]           = cb.accept_it;
+		oarray[1]           = icon_id;
+		oarray[2]           = XtWindow(widget);
+		oarray[3]           = (cb.icon_no << 16) + cb.icon_count;
+		oarray[4]           = cb.icon_batch;
+
+		cevent.message_type = AckAtom;
+
+		XSendEvent(XtDisplay(widget),cb.remote_window,
+		    True,NoEventMask,(XEvent*)&cevent);
+		XFlush(XtDisplay(widget));
+
+	}
+
+	if(!is_drag) return;
+
+	if(event->xclient.message_type == AckAtom)
+	{
+		Icon icon = int_to_icon(drag,iarray[1]);
+		if(!icon) return;
+
+		answer(drag,(Window)iarray[2],
+		    iarray[0]?DROP_OK:DROP_REFUSED,
+		    icon,
+		    iarray[3] >> 16,
+		    iarray[3] % (1<<16),
+		    iarray[4],NULL,
+			0,0
+		    );
+
+		if(iarray[0])
+		{
+			/* if(drag->drag.moving) */
+			if(icon->delete)
+				remove_icon(drag,icon,True);
+			else
+			{
+				show_icon(drag,icon);
+				plot_icon(drag,XtDisplay(widget),XtWindow(widget),
+				    drag->drag.gc,icon,0,0);
+			}
+		}
+		else
+		{
+			icon->delete = False;
+			show_icon(drag,icon);
+			plot_icon(drag,XtDisplay(widget),XtWindow(widget),
+			    drag->drag.gc,icon,0,0);
+		}
+
+	}
+
+
+}
+
+static void blink_draw(DragWidget drag,int onoff)
+{
+	Window  win  = XtWindow(drag);
+	Display *dpy = XtDisplay(drag);
+	int n  = drag->drag.small_icons;
+	Icon icon  = drag->drag.blink_icon;
+	GC  gc = drag->drag.gc;
+
+	if(icon->pix[n] == NULL) make_pixmaps((Widget)drag,icon,n);
+
+	XSetClipMask(dpy,gc,icon->mask[n]);
+	XSetForeground(dpy,gc, icon->foreground);
+	XSetBackground(dpy,gc, icon->background);
+
+	XSetClipOrigin (dpy,gc,
+	    icon->r_icon[n].x,
+	    icon->r_icon[n].y);
+
+	if(onoff)
+		XFillRectangles(dpy,win,gc,&icon->r_icon[n],1);
+	else
+		XCopyArea(dpy,
+		    icon->opened?icon->open_pix[n]:icon->pix[n],
+		    win,
+		    gc,0,0,
+		    icon->r_icon[n].width,
+		    icon->r_icon[n].height,
+		    icon->r_icon[n].x,
+		    icon->r_icon[n].y);
+
+	XSetClipMask(dpy,gc,None);
+
+}
+
+static void blink_timeout(DragWidget drag,XtIntervalId id)
+{
+	int speed = 50; /* 10 mils */
+
+	if(drag->drag.blink_icon && XtIsRealized((Widget)drag))
+	{
+
+		blink_draw(drag,drag->drag.blink_state%2);
+
+		if(++drag->drag.blink_state <= 6)
+			drag->drag.blink_timeout = XtAppAddTimeOut(
+			    XtWidgetToApplicationContext((Widget)drag),
+			    speed, /* half a sec */
+			(XtTimerCallbackProc)blink_timeout,
+			    (XtPointer)drag);
+		else blink_icon(drag,NULL);
+	}
+}
+
+static void blink_icon(DragWidget drag,Icon icon)
+{
+	if(drag->drag.blink_icon && (drag->drag.blink_state%2 != 0))
+	{
+		/* Erase left over */
+		blink_draw(drag,0);
+	}
+	drag->drag.blink_icon  = icon;
+	drag->drag.blink_state = 0;
+	if(icon) blink_timeout(drag,NULL);
+	end_edit(drag);
+}
+
+/*
+static void set_icon_under(drag,icon)
+DragWidget drag;
+Icon	   icon;
+{
+	if(drag->drag.under)
+	{
+		plot_icon(drag,XtDisplay(drag),XtWindow(drag),drag->drag.gc,
+			drag->drag.under,0,0);
+	}
+	drag->drag.under = icon?(icon->isfolder?icon:NULL):NULL;
+	if(drag->drag.under)
+	{
+		plot_icon(drag,XtDisplay(drag),XtWindow(drag),drag->drag.gc,
+			drag->drag.under,0,0);
+	}
+}
+*/
+
+static void Initialize(request, new)
+DragWidget request, new;
+{
+	XmString dummy;
+
+	if (request->core.width <= 50)
+		new->core.width = 50;
+	if (request->core.height <= 50)
+		new->core.height = 50;
+
+	XtAddEventHandler((Widget)new,NoEventMask,True,message_event_handler,NULL);
+
+
+	new->drag.tag           = XtNewString(XmSTRING_DEFAULT_CHARSET);
+	dummy = XmStringCreate("hg",new->drag.tag);
+	new->drag.string_height=XmStringHeight(new->drag.fontlist,dummy);
+	XmStringFree(dummy);
+
+	new->drag.target = NULL;
+	new->drag.icons = new->drag.last = NULL;
+
+	new->drag.selecting = FALSE;
+	new->drag.justclick = FALSE;
+	new->drag.gridx = new->drag.gridy = 0;
+	new->drag.child_count = new->drag.child_max = 0;
+	new->drag.child_folders = NULL;
+	new->drag.last_click    = 0;
+
+	new->drag.blink_icon    = NULL;
+	new->drag.last_added    = NULL;
+	new->drag.edit_icon    = NULL;
+	new->drag.blink_timeout = NULL;
+	new->drag.blink_state   = 0;
+	new->drag.clip          = 0;
+	new->drag.edit_text     = 0;
+
+	add_folder((DragWidget)new->drag.parent_folder,(Widget)new);
+
+}
+
+/*----------------------------------------------------------*/
+/*----------------------------------------------------------*/
+
+static void Destroy(widget)
+DragWidget widget;
+{
+	int i;
+
+	widget->drag.blink_icon    = NULL;
+	if(widget->drag.blink_timeout)
+		XtRemoveTimeOut(widget->drag.blink_timeout);
+
+	XtRemoveEventHandler((Widget)widget,NoEventMask,True,
+	    message_event_handler,NULL);
+
+	if(widget->drag.gc)
+		XFreeGC(XtDisplay(widget),widget->drag.gc);
+
+	if(widget->drag.selgc)
+		XtReleaseGC((Widget)widget,widget->drag.selgc);
+
+
+	while(widget->drag.icons)
+		remove_icon(widget,widget->drag.icons,False);
+
+	remove_folder((DragWidget)widget->drag.parent_folder,(Widget)widget);
+
+	for(i=0;i<widget->drag.child_count;i++)
+		XtVaSetValues( widget->drag.child_folders[i],
+		XmNparentFolder, (void*)0, (void*)0 );
+
+	if(widget->drag.child_folders)
+		XtFree((XtPointer)widget->drag.child_folders);
+
+	XtFree(widget->drag.tag);
+
+	if(widget->drag.clip)
+		XtRemoveEventHandler(widget->drag.clip,
+			KeyPressMask|KeyReleaseMask|
+			ButtonPressMask|ButtonReleaseMask,
+			True,clip_event_handler,(XtPointer)widget);
+}
+
+static void remove_folder(DragWidget drag,Widget widget)
+{
+	int i;
+	if(drag == NULL || widget == NULL) return;
+
+	for(i=0;i<drag->drag.child_count;i++)
+	{
+		if(drag->drag.child_folders[i] == widget)
+		{
+			int j;
+			drag->drag.child_count--;
+
+			for(j=i;j<drag->drag.child_count;j++)
+				drag->drag.child_folders[j] =
+				    drag->drag.child_folders[j+1];
+
+			return;
+		}
+	}
+	XtAppWarningMsg(XtWidgetToApplicationContext(widget),
+	    "invalidWidget","invalidWidget","DragError",
+	    "remove_folder : Not in the list",
+	    (String *)NULL, (Cardinal *)NULL);
+}
+
+static void add_folder(DragWidget drag,Widget widget)
+{
+	int i;
+	if(drag == NULL || widget == NULL) return;
+	for(i=0;i<drag->drag.child_count;i++)
+		if(drag->drag.child_folders[i] == widget)
+		{
+			XtAppWarningMsg(XtWidgetToApplicationContext(widget),
+			    "invalidWidget","invalidWidget","DragError",
+			    "add_folder : Already in the list",
+			    (String *)NULL, (Cardinal *)NULL);
+			return;
+		}
+
+	if(drag->drag.child_count == drag->drag.child_max)
+	{
+		drag->drag.child_max += 10;
+		if(drag->drag.child_folders)
+			drag->drag.child_folders =
+			    (WidgetList)XtRealloc((XtPointer)drag->drag.child_folders,
+			    sizeof(Widget)*drag->drag.child_max);
+		else
+			drag->drag.child_folders = (WidgetList)
+			    XtMalloc(sizeof(Widget)*drag->drag.child_max);
+	}
+	drag->drag.child_folders[drag->drag.child_count++] = widget;
+
+}
+
+
+#define HAS_CHANGED(a)    (new->a != current->a)
+
+static Boolean SetValues(current, request, new)
+DragWidget current, request, new;
+{
+	int       redraw = FALSE;
+
+	blink_icon(new,NULL);
+
+	if(HAS_CHANGED(drag.small_icons))
+	{
+		new->drag.gridx = new->drag.gridy = 0;
+
+		if(new->drag.grid)
+		{
+
+			if(new->drag.auto_clean)
+				DragCleanUpIcons((Widget)new);
+			else
+			{
+				Icon p = new->drag.icons;
+				while(p)
+				{
+					place_icon(new,p,False);
+					p = p->next;
+				}
+			}
+		}
+
+		check_size(new);
+		redraw = True;
+	}
+
+	if(HAS_CHANGED(drag.can_resize))
+		check_size(new);
+
+	if(HAS_CHANGED(drag.parent_folder))
+	{
+		remove_folder((DragWidget)current->drag.parent_folder,
+		    (Widget)current);
+		add_folder((DragWidget)new->drag.parent_folder,
+		    (Widget)new);
+	}
+
+	return (redraw);
+}
+
+
+static void Initialize_class (widget_class)
+WidgetClass widget_class;
+{
+	XtAddConverter(XmRString,XmRsortProc,CvtStringToSortProc,NULL,0);
+}
+
+static XtGeometryResult QueryProc(DragWidget widget,
+	XtWidgetGeometry *request,
+	XtWidgetGeometry *ret)
+{
+	Icon p;
+	int n = widget->drag.small_icons;
+	XRectangle r;
+
+	if(!XtIsRealized((Widget)widget)) return XtGeometryNo;
+	if(!widget->drag.can_resize) return XtGeometryNo;
+
+	p = widget->drag.icons;
+
+	r.x      = r.y     = 0;
+	r.height = r.width = 1;
+
+	while(p)
+	{
+		UnionRect(&r,&p->r_all[n],&r);
+		p = p->next;
+	}
+
+	r.width  += 1;
+	r.height += 1;
+
+	if(request->request_mode == 0)
+	{
+		ret->width  = r.width;
+		ret->height = r.height;
+		ret->request_mode = (CWWidth | CWHeight);
+	}
+
+	return (XtGeometryAlmost);
+}
+
+static void check_size(widget)
+DragWidget widget;
+{
+	Dimension repw,reph;
+	Icon p;
+	int n = widget->drag.small_icons;
+	XRectangle r;
+
+	if(!XtIsRealized((Widget)widget)) return;
+	if(!widget->drag.can_resize) return;
+
+	p = widget->drag.icons;
+
+	r.x      = r.y     = 0;
+	r.height = r.width = 1;
+
+	while(p)
+	{
+		UnionRect(&r,&p->r_all[n],&r);
+		p = p->next;
+	}
+
+	if(widget->drag.edit_text && XtIsManaged(widget->drag.edit_text))
+	{
+		XRectangle* a = (XRectangle*)&widget->drag.edit_text->core.x;
+		UnionRect(&r,a,&r);
+	}
+
+#if 0
+	if(widget->drag.clip)
+	{
+		XmScrolledWindowWidget sw = (XmScrolledWindowWidget)
+			XtParent(widget->drag.clip);
+		XRectangle c;
+
+		c.x = c.y = 0;
+#if 0
+		c.width = sw->swindow.AreaWidth - sw->swindow.WidthPad;
+		c.height = sw->swindow.AreaHeight - sw->swindow.HeightPad;
+
+
+		c.width  -= 5;
+		c.height -= 5;
+#else
+		c.width  = widget->drag.clip->core.width;
+		c.height = widget->drag.clip->core.height;
+#endif
+
+		UnionRect(&r,&c,&r);
+
+	}
+#endif
+
+	r.width  += 1;
+	r.height += 1;
+
+	if((widget->core.width != r.width) || (widget->core.height != r.height))
+	{
+		if(XtMakeResizeRequest((Widget)widget,r.width,r.height,&repw,&reph)
+		    == XtGeometryAlmost)
+			XtMakeResizeRequest((Widget)widget,repw,reph,NULL,NULL);
+	}
+
+}
+
+static void Resize(widget)
+DragWidget widget;
+{
+	blink_icon(widget,NULL);
+	if(widget->drag.auto_clean)
+		DragCleanUpIcons((Widget)widget);
+}
+
+static void create_atoms(Display *dpy)
+{
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  source = XCreateBitmapFromData(dpy,root,open_hand_curs,
+	    open_hand_width,open_hand_height);
+	Pixmap  mask   = XCreateBitmapFromData(dpy,root,open_hand_mask,
+	    open_hand_width,open_hand_height);
+	XColor  white  = {
+		0, 65535, 65535, 65535 		};
+	XColor  black  = {
+		0, 0,0,0 		};
+
+	if(CanDropAtom == NULL)
+	{
+		WinIDAtom     = XInternAtom(dpy,ICON_DROP_WIN_ID,False);
+		MiscAtom      = XInternAtom(dpy,ICON_DROP_MISC,False);
+		WinNameAtom   = XInternAtom(dpy,ICON_DROP_WIN_NAME,False);
+		IconClassAtom = XInternAtom(dpy,ICON_DROP_ICON_CLASS,False);
+		IconNameAtom  = XInternAtom(dpy,ICON_DROP_ICON_NAME,False);
+		BufLenAtom    = XInternAtom(dpy,ICON_DROP_BUF_LEN,False);
+		BufAtom       = XInternAtom(dpy,ICON_DROP_BUF,False);
+		EndAtom       = XInternAtom(dpy,ICON_DROP_END,False);
+		AckAtom       = XInternAtom(dpy,ICON_DROP_ACK,False);
+		CanDropAtom   = XInternAtom(dpy,ICON_CAN_DRAG_DROP,FALSE);
+		InfoAtom      = XInternAtom(dpy,ICON_DROP_INFO,FALSE);
+		BufLenExtAtom    = XInternAtom(dpy,ICON_DROP_BUF_LEN_EXT,False);
+		BufExtAtom       = XInternAtom(dpy,ICON_DROP_BUF_EXT,False);
+
+
+		open_cursor        = XCreatePixmapCursor(dpy,
+		    source,
+		    mask,
+		    &black,
+		    &white,
+		    open_hand_x_hot,
+		    open_hand_y_hot);
+
+		source = XCreateBitmapFromData(dpy,root,close_hand_curs,
+		    open_hand_width,open_hand_height);
+		mask   = XCreateBitmapFromData(dpy,root,close_hand_mask,
+		    open_hand_width,open_hand_height);
+		close_cursor        = XCreatePixmapCursor(dpy,
+		    source,
+		    mask,
+		    &black,
+		    &white,
+		    open_hand_x_hot,
+		    open_hand_y_hot);
+
+		drop_cursor = XCreateFontCursor(dpy,XC_box_spiral);
+
+	}
+}
+
+
+static void register_widget(Widget widget,String name)
+{
+	/* Create atoms if they dont exist.
+        Must go to class initalize, but where is the display ? */
+
+	create_atoms(XtDisplay(widget));
+
+	/* Register window for drop */
+
+	XChangeProperty(
+	    XtDisplay(widget),
+	    XtWindow(widget),
+	    CanDropAtom,
+	    XA_WINDOW,
+	    8,
+	    PropModeReplace,
+	    (unsigned char *)name,
+	    strlen(name)+1);
+}
+
+static void clip_callback(Widget clip,DragWidget widget,DragCallbackStruct *cb)
+{
+	cb->x -= widget->core.x;
+	cb->y -= widget->core.y;
+	cb->same_window = (XtWindow(widget) == cb->remote_window);
+	cb->remote_widget = XtWindowToWidget(XtDisplay(widget),cb->remote_window);
+	cb->same_folder_tree = same_tree((Widget)widget,cb->remote_widget);
+	XtCallCallbacks((Widget)widget,XmNdropCallback,(XtPointer)cb);
+}
+
+static void Realize (widget, value_mask, attributes)
+DragWidget widget;
+XtValueMask *value_mask;
+XSetWindowAttributes *attributes;
+{
+	Window win;
+	Display *dpy = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	XGCValues values;
+	XtGCMask  valueMask;
+	Widget clip,scroll;
+	/* Call inherited realize */
+
+
+	((widget->core.widget_class->core_class.superclass)->core_class.realize)
+	    ( (Widget) widget, value_mask, attributes);
+
+	register_widget((Widget)widget,XtName((Widget)widget));
+
+	win = XtWindow(widget);
+
+	valueMask =  GCFunction | GCForeground | GCBackground | GCFont;
+
+	values.function   = GXcopy;
+	values.background = WhitePixel(dpy,screen);
+	values.foreground = BlackPixel(dpy,screen);
+	values.font       = XLoadFont(dpy,"fixed");
+
+	widget->drag.gc = XCreateGC(dpy,win,valueMask,&values);
+
+	/* valueMask |= GCFillStyle; */
+	/* values.fill_style = FillSolid; */
+
+	values.background = widget->core.background_pixel;
+	values.foreground = values.foreground ^ values.background;
+	values.background = values.foreground;
+	values.function   = GXxor;
+
+	widget->drag.selgc = XtGetGC((Widget)widget,valueMask,&values);
+	widget->drag.clip = NULL;
+
+	if(clip = XtParent(widget))
+		if(scroll = XtParent(clip))
+			if(XmIsScrolledWindow(scroll))
+			{
+				set_drop_property(clip,(XtCallbackProc)clip_callback,
+				    (XtPointer)widget,(Widget)widget);
+				widget->drag.clip = clip;
+				XtAddEventHandler(clip,
+					KeyPressMask|KeyReleaseMask|
+					ButtonPressMask|ButtonReleaseMask,
+					True,clip_event_handler,(XtPointer)widget);
+			}
+			else if(XmIsDrawingArea(clip))
+			{
+				set_drop_property(clip,(XtCallbackProc)clip_callback,
+				    (XtPointer)widget,(Widget)widget);
+			}
+
+	check_size(widget);
+}
+
+static void plot_icon(DragWidget widget,Display *dpy,Window win,GC gc,Icon icon,int dx,int dy)
+{
+	int n = widget->drag.small_icons;
+	if(icon->pix[n] == NULL) make_pixmaps((Widget)widget,icon,n);
+	/*int under = icon == widget->drag.under;*/
+
+	XSetForeground(dpy,gc, icon->foreground);
+	XSetBackground(dpy,gc, icon->background);
+
+	XSetClipMask(dpy,gc,icon->mask[n]);
+
+	XSetClipOrigin (dpy,gc,
+	    icon->r_icon[n].x+dx,
+	    icon->r_icon[n].y+dy);
+
+	if(icon->opened)
+		XCopyArea(dpy,
+		    icon->open_pix[n],
+		    win,
+		    gc,0,0,
+		    icon->r_icon[n].width,
+		    icon->r_icon[n].height,
+		    icon->r_icon[n].x+dx,
+		    icon->r_icon[n].y+dy);
+
+	else
+		XCopyArea(dpy,
+		    icon->pix[n],
+		    win,
+		    gc,0,0,
+		    icon->r_icon[n].width,
+		    icon->r_icon[n].height,
+		    icon->r_icon[n].x+dx,
+		    icon->r_icon[n].y+dy);
+
+	XSetClipMask(dpy,gc,None);
+
+
+	if(icon->selected)
+	{
+
+		XSetForeground(dpy,gc, icon->hilitebackground);
+		XSetBackground(dpy,gc, icon->hiliteforeground);
+		XFillRectangle(dpy,win,gc,
+		    icon->r_label[n].x+dx,
+		    icon->r_label[n].y+dy,
+		    icon->r_label[n].width,
+		    icon->r_label[n].height);
+
+		XSetForeground(dpy,gc, icon->hiliteforeground);
+		XSetBackground(dpy,gc, icon->hilitebackground);
+
+	}
+
+
+	XmStringDraw(dpy,win,
+	    widget->drag.fontlist,
+	    icon->label,
+	    gc,
+	    icon->r_label[n].x+dx,
+	    icon->r_label[n].y+dy,
+	    icon->r_label[n].width,
+	    XmALIGNMENT_CENTER, XmSTRING_DIRECTION_L_TO_R, NULL);
+}
+
+static void draw_icons(widget,region)
+DragWidget   widget;
+Region region;
+{
+	Display         *dpy = XtDisplay(widget);
+	Window          win  = XtWindow(widget);
+	GC              gc = widget->drag.gc;
+	int				n = widget->drag.small_icons;
+
+	if(widget->core.visible)
+	{
+		Icon icon = widget->drag.icons;
+		while(icon)
+		{
+			if(icon->visible)
+				if( !region ||
+				    XRectInRegion(region,
+				    icon->r_all[n].x,
+				    icon->r_all[n].y,
+				    icon->r_all[n].width,
+				    icon->r_all[n].height) != RectangleOut)
+					plot_icon(widget,dpy,win,gc,icon,0,0);
+			icon = icon->next;
+		}
+
+	}
+}
+
+static void Redraw(DragWidget widget,XEvent *event,Region region)
+{
+	XEvent          ev;
+	Display         *dpy = XtDisplay(widget);
+	Window          win  = XtWindow(widget);
+
+	while(XCheckWindowEvent(dpy,win,ExposureMask,&ev))
+		XtAddExposureToRegion(&ev,region);
+
+	if(widget->core.visible)
+	{
+		draw_icons(widget,region);
+		_XmRedisplayGadgets((Widget)widget, event,region);
+		/*
+
+		if(widget->drag.grid && widget->drag.gridx && widget->drag.gridy)
+		{
+			int i,j;
+			for(i=0;i<widget->core.width;i+=widget->drag.gridx)
+				XDrawLine(dpy,win,widget->drag.gc,i,0,i,widget->core.height);
+			for(i=0;i<widget->core.height;i+=widget->drag.gridy)
+				XDrawLine(dpy,win,widget->drag.gc,0,i,widget->core.width,i);
+		}
+		*/
+	}
+}
+
+/*========================================================================================*/
+
+static void edit_activate_callback(Widget text,XtPointer w,XtPointer cbdata)
+{
+	DragCallbackStruct cb;
+	DragWidget drag = (DragWidget)w;
+
+	char *p = XmTextFieldGetString(text);
+	Icon icon = drag->drag.edit_icon;
+
+	end_edit(drag);
+
+	memset(&cb,0,sizeof(cb));
+	cb.reason  = DRAG_RENAME;
+	cb.event   = 0;
+	cb.icon_class = icon->class;
+	cb.icon_name  = icon->name;
+	cb.icon_data  = icon->data;
+	cb.icon       = icon;
+	cb.new_name   = p;
+	XtCallCallbacks ((Widget)drag,XmNrenameCallback,(XtPointer)&cb);
+
+
+	XtFree(p);
+
+	XmProcessTraversal((Widget)drag,XmTRAVERSE_CURRENT);
+}
+
+static void start_edit(DragWidget widget,Icon icon)
+{
+	int n = widget->drag.small_icons;
+	Position x = icon->r_label[n].x;
+	Position y = icon->r_label[n].y;
+	Dimension width = icon->r_label[n].width;
+	DragCallbackStruct cb;
+
+	memset(&cb,0,sizeof(cb));
+	cb.reason  = DRAG_RENAMABLE;
+	cb.event   = 0;
+	cb.icon_class = icon->class;
+	cb.icon_name  = icon->name;
+	cb.icon_data  = icon->data;
+	cb.icon       = icon;
+	cb.rename_it  = True;
+
+	XtCallCallbacks ((Widget)widget,XmNrenamableCallback,(XtPointer)&cb);
+
+	if(!cb.rename_it)
+		return;
+
+	end_edit(widget);
+	widget->drag.edit_icon = icon;
+
+	if(widget->drag.edit_text == NULL)
+	{
+		widget->drag.edit_text = XmCreateTextField((Widget)widget,"edit_text",0,0);
+		XtAddCallback(widget->drag.edit_text,XmNactivateCallback,edit_activate_callback,(XtPointer)widget);
+
+		XtVaSetValues(widget->drag.edit_text,
+			XmNhighlightThickness,  (Dimension)1,
+			XmNshadowThickness,  (Dimension)0,
+			XmNfontList, widget->drag.fontlist,
+			(void*)0);
+	}
+
+	if(width < 100)
+	{
+		int diff = 100 - width;
+		width = 100;
+		x -= diff/2;
+		if(x < 0) x = 0;
+	}
+	if(x + width > widget->core.width)
+	{
+		x = widget->core.width - width;
+		if(x < 0) x = 0;
+	}
+
+	XtVaSetValues(widget->drag.edit_text,
+		XmNx,      x,
+		XmNy,      y,
+		XmNwidth,  width,
+		/*XmNheight, height,*/
+		(void*)0);
+
+	XmTextFieldSetString(widget->drag.edit_text,icon->name);
+	/*
+	XmTextFieldSetSelection(widget->drag.edit_text,0,
+		XmTextFieldGetLastPosition(widget->drag.edit_text),CurrentTime);
+		*/
+
+	XtManageChild(widget->drag.edit_text);
+	XmProcessTraversal(widget->drag.edit_text,XmTRAVERSE_CURRENT);
+
+	check_size(widget);
+
+}
+
+static void end_edit(DragWidget widget)
+{
+	if(widget->drag.edit_text)
+		XtUnmanageChild(widget->drag.edit_text);
+	widget->drag.edit_icon = 0;
+}
+
+/*========================================================================================*/
+
+/*=====================================*/
+/* Check if a window is register for drop */
+/*=====================================*/
+
+static Boolean check_valid_drop(Widget widget,Display* dpy,Window win,char **name)
+{
+	Atom type;
+	int format;
+	unsigned long nitems, left;
+	char *retdata = NULL;
+
+	if(!win) return False;
+
+	if(XGetWindowProperty(dpy,win, CanDropAtom, 0,4,False,XA_WINDOW,
+	    &type, &format, &nitems,&left, (unsigned char**) &retdata) == Success)
+		if(type == XA_WINDOW)
+		{
+			if(*name) XtFree(*name);
+			*name = XtNewString(retdata);
+			return True;
+		}
+
+	/*else
+	{
+			int atomnum=0;
+			Atom *atomlist=XListProperties(dpy,win,&atomnum);
+			int i;
+			printf("atom num: %d\n",atomnum);
+			for(i=0; i< atomnum; i++)
+			{
+				 char *s =XGetAtomName(dpy, atomlist[i]);
+				 printf(" %s \n",s);
+				 XGetWindowProperty(dpy,win,atomlist[i] , 0,4,False,AnyPropertyType,
+				    &type, &format, &nitems,&left,&retdata);
+
+				 printf("  type: %d format: %d byte: %d left: %d\n",type,format,nitems,left);
+				 if(strcmp(s,"_NET_WM_NAME") == 0)
+				 {
+					if(strstr("Syntax Highlight",retdata) != 0)
+					{
+						if(*name) XtFree(*name);
+						*name = XtNewString(retdata);
+						XFree(atomlist);
+						return True;
+
+					}
+					printf("  data: %s\n",retdata);
+				 }
+
+				XFree(s);
+	   		}
+
+			XFree(atomlist);
+	}*/
+
+	return False;
+}
+
+
+/* Get The window tree */
+/* We assume that no window will open/close while we drag */
+
+typedef struct Site {
+	Window       window;
+	int          x;
+	int          y;
+	unsigned int width;
+	unsigned int height;
+	Boolean     is_drag;
+	Widget      widget;
+} Site;
+
+static Site* sites     = 0;
+static int   num_sites = 0;
+static int   max_sites = 0;
+
+static void get_tree(Display *dpy,Window w)
+{
+	Window  root;
+	Window  parent;
+	Window* children;
+	unsigned int num = 0;
+	int i;
+
+	XQueryTree(dpy,w,&root,&parent,&children,&num);
+
+	for(i = 0; i < num; i++)
+	{
+		Window child = children[i];
+		Atom  type;
+		int format;
+		unsigned long nitems, left;
+		unsigned char *retdata;
+		if(XGetWindowProperty(dpy,child, CanDropAtom, 0,4,False,XA_WINDOW,
+		    &type, &format, &nitems,&left,&retdata) == Success)
+		{
+			if(type == XA_WINDOW)
+			{
+				Site* s;
+				unsigned int dummy;
+				Window dw;
+
+				if(num_sites == max_sites)
+				{
+					max_sites += 10;
+					sites = (Site*)XtRealloc((XtPointer)sites,max_sites*sizeof(Site));
+				}
+
+				s = &sites[num_sites++];
+				s->window = child;
+				XGetGeometry(dpy,child,&root,
+					&s->x,&s->y,&s->width,&s->height,&dummy,&dummy);
+
+				XTranslateCoordinates(dpy,child,root,
+					s->x,s->y,&s->x,&s->y,&dw);
+
+				s->widget    = XtWindowToWidget(dpy,child);
+				s->is_drag   = s->widget ? XtIsDrag(s->widget):0;
+			}
+		}
+
+		get_tree(dpy,child);
+
+	}
+	XtFree((XtPointer)children);
+}
+
+static void get_window_tree(Display *dpy)
+{
+#if 0
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	num_sites = 0;
+	printf("->get_tree\n");
+	get_tree(dpy,root);
+	printf("<-get_tree\n");
+#endif
+}
+
+
+/* Find which window is under the cursor */
+
+static Window find_window(Display *dpy,Window *other,
+Window win,int x,int y,int *wx,int *wy)
+{
+	Window child = 0,target = 0;
+	int nx = 0,ny = 0;
+	XWindowAttributes wattr;
+	Window root = *other;
+
+	*wx = *wy  =0;
+
+	do
+	{
+		XTranslateCoordinates(dpy,root,win,x,y,&nx,&ny,&child);
+		if(child)
+		{
+			*other = child;
+			XGetWindowAttributes (dpy, child, &wattr);
+			if(wattr.class == InputOutput) /* Fix for GKX */
+			{
+				Atom  type;
+				int format;
+				unsigned long nitems, left;
+				unsigned char *retdata;
+
+				/*int qtfound=0;
+				int atomnum=0;
+				Atom *atomlist=XListProperties(dpy,child,&atomnum);
+				int i;
+				printf("atom num: %d\n",atomnum);
+				for(i=0; i< atomnum; i++)
+				{
+				 char *s =XGetAtomName(dpy, atomlist[i]);
+				 printf(" %s \n",s);
+				 XGetWindowProperty(dpy,child,atomlist[i] , 0,4,False,AnyPropertyType,
+				    &type, &format, &nitems,&left,&retdata);
+
+				 printf("  type: %d format: %d byte: %d left: %d\n",type,format,nitems,left);
+				 if(strcmp(s,"_NET_WM_NAME") == 0)
+				 {
+					if(strstr("Syntax Highlight",retdata) != 0)
+					{
+						qtfound=1;
+					}
+					printf("  data: %s\n",retdata);
+				 }
+				 XFree(s);
+				}
+				XFree(atomlist);*/
+
+				if(XGetWindowProperty(dpy,child, CanDropAtom, 0,4,False,XA_WINDOW,
+				    &type, &format, &nitems,&left,&retdata) == Success)
+					if(type == XA_WINDOW)
+					{
+						target = child;
+						/* *wx = nx; */
+						/* *wy = ny; */
+						/* return here ??? */
+						/* return target; */
+					}
+				/*else if(qtfound==1)
+				{
+					target = child;
+				}*/
+
+			}
+		}
+		root = win;
+		win  = child;
+		x = nx;
+		y = ny;
+	} while(child);
+
+	*wx = nx;
+	*wy = ny;
+
+	return target;
+
+}
+
+
+static void send_drop_events(DragWidget widget,DragCallbackStruct *cb)
+{
+	XClientMessageEvent event;
+	Display *dpy = XtDisplay(widget);
+	Window   win = cb->remote_window;
+	char buf[21];
+	char *p;
+	char buf_ext[400];
+	int buf_ext_len;
+
+	/* On 64-bit platforms, there appears to be a problem when using the data.l[]
+	   part of the XClientMessageEvent structure. This is most likely because it is
+	   defined as an array of longs, but it is intended as an array of 32-bit integers
+	   (event.format=32). When dealing with this array, some of the data is lost, probably
+	   because the internal 'X' code assumes 32-bit values. Therefore, we explicitly
+	   use an 'int' pointer to access this data structure so that we can use 32-bit
+	   values in it which is what it thinks it's getting. If 'int' is ever defined
+	   to be greater than 32, then this code will have to be revised.
+	   Perhaps the only message for which this might be a problem is the WinIDAtom message
+	   - can this number always be stored in an int? The other thing to note is that
+	   where event.format was previously being set to 32, we now set it to 8. When
+	   set to 32, some bytes were not being received for some reason. This is resolved
+	   when set to 8 - it should not make a difference, so the idea is that if you tell
+	   it that the message is a set of bytes, then it should make sure that it transfers
+	   all of them rather than trying to interpret 32-bit ints as longs. */
+	
+	int *iarray = (int *)&event.data.l[0];
+
+	event.display = dpy;
+	event.window  = win;
+	event.type    = ClientMessage;
+
+	/* Sebd window id */
+
+	event.format       = 8; /*32*/
+	event.message_type = WinIDAtom;
+	iarray[0]    = XtWindow(widget);
+	iarray[1]    = cb->x>0?cb->x:0;
+	iarray[2]    = cb->y>0?cb->y:0;
+	iarray[3]    = cb->icon?icon_to_int(widget,cb->icon):0;
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	event.format       = 8; /*32*/
+	event.message_type = MiscAtom;
+	iarray[0]    = widget->drag.copy;
+	iarray[1]    = 0;
+	iarray[2]    = 0;
+	iarray[3]    = 0;
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	strncpy(buf,XtName((Widget)widget),20);
+	buf[19] = 0;
+	event.format = 8;
+	event.message_type = WinNameAtom;
+	strncpy(event.data.b,buf,20);
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	strncpy(buf,cb->icon?cb->icon->class:"",20);
+	buf[19] = 0;
+	event.format = 8;
+	event.message_type = IconClassAtom;
+	strcpy(event.data.b,buf);
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	strncpy(buf,cb->icon?cb->icon->name:"",20);
+	buf[19] = 0;
+	event.format = 8;
+	event.message_type = IconNameAtom;
+	strcpy(event.data.b,buf);
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	event.format       = 8; /*32*/
+	event.message_type = BufLenAtom;
+	iarray[0]    = cb->msg_length;
+	iarray[1]    = cb->icon_no;
+	iarray[2]    = cb->icon_count;
+	iarray[3]    = cb->icon_batch;
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	p = cb->message;
+	while(cb->msg_length > 0)
+	{
+		int n = cb->msg_length > 20 ? 20 : cb->msg_length;
+		int i;
+
+		for(i=0;i<n;i++)
+		{
+			event.format = 8;
+			event.message_type = BufAtom;
+			event.data.b[i] = *p++;
+		}
+
+		XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+		XFlush(dpy);
+
+		cb->msg_length -= n;
+
+	}
+
+	//Messages to QT
+	XtCallCallbacks (widget, XmNgetFullNameCallback,(XtPointer)cb);
+
+
+        strncpy(buf_ext,cb->icon_fullName,strlen(cb->icon_fullName));
+	buf_ext[strlen(cb->icon_fullName)]='\0';
+
+	buf_ext_len=strlen(buf_ext);
+
+	event.format       = 8; /*32*/
+	event.message_type = BufLenExtAtom;
+	iarray[0]    = buf_ext_len;
+	iarray[1]    = cb->icon_no;
+	iarray[2]    = cb->icon_count;
+	iarray[3]    = cb->icon_batch;
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+
+	p = &buf_ext[0];
+	while(buf_ext_len > 0)
+	{
+		int n = buf_ext_len > 20 ? 20 : buf_ext_len;
+		int i;
+
+		for(i=0;i<n;i++)
+		{
+			event.format = 8;
+			event.message_type = BufExtAtom;
+			event.data.b[i] = *p++;
+		}
+
+		XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+		XFlush(dpy);
+
+		buf_ext_len -= n;
+	}
+
+
+
+	event.format = 8; /*32*/;
+	event.message_type = EndAtom;
+	XSendEvent(dpy,win,True,NoEventMask,(XEvent*)&event);
+	XFlush(dpy);
+}
+
+static void send_drop_msg(widget,win,x,y,icon,no,count,batch)
+DragWidget widget;
+Window win;
+Icon icon;
+int no;
+int count;
+int batch;
+{
+	DragCallbackStruct cb;
+
+	memset(&cb,0,sizeof(cb));
+	cb.reason = DRAG_SEND;
+	cb.event         = &widget->drag.event;
+	cb.send_it       = True;
+	cb.delete_it     = False;
+	cb.same_window   = (win == XtWindow(widget));
+	cb.remote_window = win;
+	cb.remote_name   = widget->drag.target;
+
+	cb.x             = x;
+	cb.y             = y;
+	cb.icon_class    = icon->class;
+	cb.icon_name     = icon->name ;
+	cb.icon_data     = icon->data ;
+	cb.icon          = icon;
+	cb.copy          = widget->drag.copy;
+
+	cb.message       = NULL;
+	cb.msg_length    = 0;
+	cb.remote_widget = XtWindowToWidget(XtDisplay(widget),cb.remote_window);
+
+	/* Check for clip windows */
+
+	if(cb.remote_widget && XmIsDrawingArea(cb.remote_widget))
+	{
+		Widget w = XtParent(cb.remote_widget);
+		if(w && XmIsScrolledWindow(w))
+		{
+			int n;
+			WidgetList child;
+			XtVaGetValues(cb.remote_widget,XtNnumChildren,&n,
+				XtNchildren,&child,NULL);
+			w = cb.remote_widget;
+
+			if(n && child[0])
+			{
+				w = child[0];
+				if(XtIsDrag(w))
+				{
+					cb.remote_widget = w;
+					cb.remote_window = XtWindow(w);
+				}
+			}
+		}
+	}
+
+
+	cb.same_folder_tree = same_tree((Widget)widget,cb.remote_widget);
+
+	cb.icon_no        = no;
+	cb.icon_count     = count;
+	cb.icon_batch     = batch;
+
+
+	if(widget->drag.auto_folder_move && cb.same_folder_tree &&
+		XtIsDrag(cb.remote_widget))
+	{
+		Icon p = widget->drag.icons;
+		Icon q = NULL;
+		DragWidget target = (DragWidget)cb.remote_widget;
+
+		cb.reason    = DRAG_FOLDER_MOVE;
+		XtCallCallbacks ((Widget)widget,XmNfolderMoveCallback,(XtPointer)&cb);
+		icon->delete = False;
+
+		if(cb.send_it)
+		{
+			while(p)
+			{
+				if(p == icon)
+				{
+					if(q)
+						q->next = p->next;
+					else
+						widget->drag.icons = p->next;
+
+					if(!p->next)
+						widget->drag.last = q;
+
+					icon->next         = target->drag.icons;
+					target->drag.icons = icon;
+					icon->parent       = (Widget)target;
+					move_icon(target,icon,x,y,-1,-1);
+					show_icon(target,icon);
+
+				}
+
+				q = p;
+				p = p->next;
+
+			}
+			check_size(widget);
+		}
+		else show_icon(widget,icon);
+
+	}
+	else
+	{
+
+		XtCallCallbacks ((Widget)widget,XmNsendmsgCallback,(XtPointer)&cb);
+
+		if(cb.send_it)
+		{
+			icon->delete = cb.delete_it;
+			send_drop_events(widget,&cb);
+		}
+	}
+}
+
+static Icon find_icon(DragWidget widget,XEvent* event,Boolean* label)
+{
+	Icon icon = widget->drag.icons;
+	int n = widget->drag.small_icons;
+
+	while(icon)
+	{
+		if(icon->visible)
+		{
+			if(event->xbutton.x > icon->r_icon[n].x &&
+			    event->xbutton.y > icon->r_icon[n].y &&
+			    event->xbutton.x < (int) (icon->r_icon[n].x+icon->r_icon[n].width)
+			    &&
+			    event->xbutton.y < (int) (icon->r_icon[n].y+icon->r_icon[n].height))
+			{
+				*label = False;
+				return icon;
+			}
+
+			if(event->xbutton.x > icon->r_label[n].x &&
+			    event->xbutton.y > icon->r_label[n].y &&
+			    event->xbutton.x < (int) (icon->r_label[n].x+icon->r_label[n].width)
+			    &&
+			    event->xbutton.y < (int) (icon->r_label[n].y+icon->r_label[n].height))
+			{
+				*label = True;
+				return icon;
+			}
+		}
+
+		icon = icon->next;
+	}
+	return NULL;
+}
+
+static void show_hide(DragWidget widget,Icon icon,Boolean vis)
+{
+	if(icon && (icon->visible != vis))
+	{
+		icon->visible = vis;
+		inval_icon(widget,icon);
+	}
+}
+
+static void raise_icon(DragWidget widget,Icon icon)
+{
+	Icon p = widget->drag.icons;
+	Icon q = NULL;
+
+	if(icon == widget->drag.last) return;
+
+	while(p)
+	{
+		if(p == icon)
+		{
+			if(q)
+				q->next = icon->next;
+			else
+				widget->drag.icons = icon->next;
+
+			widget->drag.last->next = icon;
+			widget->drag.last = icon;
+			icon->next = NULL;
+			break;
+		}
+		q = p;
+		p = p->next;
+	}
+	inval_icon(widget,icon);
+}
+
+static void move_icon(widget,icon,newx,newy,real_x,real_y)
+DragWidget widget;
+Icon icon;
+int newx,newy;
+int real_x,real_y;
+{
+	DragCallbackStruct cb;
+	int n = widget->drag.small_icons;
+	int oldx = icon->r_all[n].x;
+	int oldy = icon->r_all[n].y;
+
+	new_icon_xy(icon,newx,newy);
+	place_icon(widget,icon,False);
+
+	newx = icon->r_all[n].x;
+	newy = icon->r_all[n].y;
+
+
+	memset(&cb,0,sizeof(cb));
+	cb.reason = DRAG_MOVE;
+	cb.move_it = True;
+
+	cb.event = 0;
+	if(real_x >= 0 && real_y >= 0)
+	{
+		cb.event = &widget->drag.event;
+		cb.event->xbutton.x = real_x;
+		cb.event->xbutton.y = real_y;
+		cb.copy  = widget->drag.copy;
+	}
+
+	cb.icon_class = icon->class;
+	cb.icon_name = icon->name;
+	cb.icon_data = icon->data;
+	cb.icon      = icon;
+
+
+	cb.x = newx;
+	cb.y = newy;
+	XtCallCallbacks ((Widget)widget,XmNmoveCallback,(XtPointer)&cb);
+
+	if(!cb.move_it)
+		new_icon_xy(icon,oldx,oldy);
+
+	if(newx != cb.x || newy != cb.y)
+		place_icon(widget,icon,False);
+
+	hide_icon(widget,icon);
+	/*  raise_icon(widget,icon);*/
+	show_icon(widget,icon);
+	check_size(widget);
+
+
+}
+
+static void hide_icon(DragWidget widget,Icon icon)
+{
+	show_hide(widget,icon,False);
+}
+
+static void show_icon(DragWidget widget,Icon icon)
+{
+	show_hide(widget,icon,True);
+}
+
+static void inval_icon(widget,icon)
+DragWidget widget;
+Icon icon;
+{
+	int n = widget->drag.small_icons;
+
+	if(XtIsRealized((Widget)widget))
+	{
+		XClearArea(XtDisplay(widget),XtWindow(widget),
+		    icon->r_icon[n].x,
+		    icon->r_icon[n].y,
+		    icon->r_icon[n].width,
+		    icon->r_icon[n].height,
+		    True);
+
+		XClearArea(XtDisplay(widget),XtWindow(widget),
+		    icon->r_label[n].x,
+		    icon->r_label[n].y,
+		    icon->r_label[n].width,
+		    icon->r_label[n].height,
+		    True);
+	}
+
+}
+
+static void remove_icon(DragWidget widget,Icon icon,Boolean resize)
+{
+	Icon p = widget->drag.icons;
+	Icon q = NULL;
+	DragCallbackStruct cb;
+	int i;
+
+	while(p)
+	{
+		if(p == icon)
+		{
+			if(q)
+				q->next = p->next;
+			else
+				widget->drag.icons = p->next;
+
+			if(!p->next)
+				widget->drag.last = q;
+
+			memset(&cb,0,sizeof(cb));
+			cb.reason = DRAG_KILL;
+			cb.event = &widget->drag.event;
+			cb.icon_class = icon->class;
+			cb.icon_name = icon->name;
+			cb.icon_data = icon->data;
+			cb.icon      = icon;
+			XtCallCallbacks((Widget)widget,XmNkillIconCallback,(XtPointer)&cb);
+
+			inval_icon(widget,icon);
+
+			/* if(p->r_all[n].width  == widget->drag.gridx) */
+			widget->drag.gridx = 0;
+
+			/* if(p->r_all[n].height == widget->drag.gridy) */
+			widget->drag.gridy = 0;
+
+			XtFree(p->name);
+			XtFree(p->class);
+			XmStringFree(p->label);
+
+			widget->drag.gridx = 0;
+			widget->drag.gridy = 0;
+
+			for(i=0;i<2;i++)
+			{
+				FreePixmap((Widget)widget,icon->pix[i]);
+				FreePixmap((Widget)widget,icon->open_pix[i]);
+				FreePixmap((Widget)widget,icon->mask[i]);
+
+				/* XtFree(icon->pix_name[i]); */
+				/* XtFree(icon->open_name[i]); */
+				/* XtFree(icon->mask_name[i]); */
+			}
+
+			XtFree((XtPointer)p);
+			if(resize)
+				if(widget->drag.auto_clean)
+					DragCleanUpIcons((Widget)widget);
+				else
+					check_size(widget);
+			break;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+static void answer(DragWidget widget,Window win,int code,Icon icon,
+int no,int count,int batch,Window other,int x,int y)
+{
+	DragCallbackStruct cb;
+
+	memset(&cb,0,sizeof(cb));
+	cb.reason = DRAG_ANSWER;
+	cb.event         = &widget->drag.event;
+	cb.code          = code;
+
+	cb.same_window   = (win == XtWindow(widget));
+	cb.remote_window = win;
+	cb.remote_name   = widget->drag.target;
+	cb.remote_widget = XtWindowToWidget(XtDisplay(widget),cb.remote_window);
+	cb.same_folder_tree = same_tree((Widget)widget,cb.remote_widget);
+
+	cb.icon_class    =  icon->class;
+	cb.icon_name     =  icon->name ;
+	cb.icon_data     =  icon->data ;
+	cb.icon          =  icon;
+	cb.icon_no       =  no;
+	cb.icon_count    =  count;
+	cb.icon_batch    =  batch;
+	cb.x             = x;
+	cb.y             = y;
+
+	if(code == DROP_ABORTED)
+	{
+		cb.reason        = DRAG_OTHER_DROP;
+		cb.remote_window = other;
+		XtCallCallbacks ((Widget)widget,XmNotherDropCallback,(XtPointer)&cb);
+	}
+	else
+		XtCallCallbacks ((Widget)widget,XmNanswerCallback,(XtPointer)&cb);
+}
+
+static void new_icon_xy(Icon icon,int x,int y)
+{
+	int i;
+
+	for(i=0;i<2;i++)
+	{
+		icon->r_icon[i].x  -= icon->r_all[i].x;
+		icon->r_label[i].x -= icon->r_all[i].x;
+		icon->r_icon[i].y  -= icon->r_all[i].y;
+		icon->r_label[i].y -= icon->r_all[i].y;
+
+		icon->r_all[i].x = x;
+		icon->r_all[i].y = y;
+
+		icon->r_icon[i].x  += icon->r_all[i].x;
+		icon->r_label[i].x += icon->r_all[i].x;
+		icon->r_icon[i].y  += icon->r_all[i].y;
+		icon->r_label[i].y += icon->r_all[i].y;
+	}
+}
+
+static void place_icon(DragWidget widget,Icon icon,Boolean resize)
+{
+	Boolean go_on = True;
+	int	    n = widget->drag.small_icons;
+	Dimension maxw;
+
+	if(widget->drag.grid)
+	{
+		/* Compute new grid if needed */
+
+		if(widget->drag.gridx == 0 || widget->drag.gridy == 0)
+		{
+			Icon p = widget->drag.icons;
+
+			widget->drag.gridx = widget->drag.gridy = 1;
+
+			while(p)
+			{
+				widget->drag.gridx = MAX(widget->drag.gridx,((int)p->r_all[n].width));
+				widget->drag.gridy = MAX(widget->drag.gridy,((int)p->r_all[n].height));
+				p = p->next;
+			}
+
+			widget->drag.gridx += widget->drag.marginx;
+			widget->drag.gridy += widget->drag.marginy;
+		}
+
+		maxw = widget->core.width;
+		if(widget->drag.clip)
+			if(widget->drag.clip->core.width > maxw)
+				maxw = widget->drag.clip->core.width;
+
+		while(go_on)
+		{
+			int newx = icon->r_all[n].x;
+			int newy = icon->r_all[n].y;
+			int ix,iy,gx,gy;
+
+			go_on = False;
+
+			if(n)
+			{
+				ix = 0;
+				iy = icon->r_all[n].height;
+				gx = widget->drag.marginx / 2 ;
+				gy = widget->drag.gridy;
+			}
+			else
+			{
+				ix = icon->r_all[n].width /2;
+				iy = icon->r_all[n].height;
+				gx = widget->drag.gridx/2;
+				gy = widget->drag.gridy;
+			}
+
+			newx += ix;
+			newy += iy;
+
+			newx = ((newx-gx)/widget->drag.gridx)*widget->drag.gridx + gx;
+			newy = ((newy-gy)/widget->drag.gridy)*widget->drag.gridy + gy;
+
+			newx -= ix;
+			newy -= iy;
+
+			new_icon_xy(icon,newx,newy);
+
+			if(widget->drag.auto_place)
+			{
+				Icon p = widget->drag.icons;
+
+				while(p && !go_on)
+				{
+					if(p != icon && InterRect(&p->r_all[n],&icon->r_all[n]))
+						go_on = True;
+					p = p->next;
+				}
+				if(go_on)
+				{
+					if((Dimension) (icon->r_all[n].x + icon->r_all[n].width
+					    + widget->drag.gridx) < maxw)
+					{
+						newx = icon->r_all[n].x + widget->drag.gridx;
+						newy = icon->r_all[n].y;
+					}
+					else
+					{
+						newx = 0;
+						newy = icon->r_all[n].y + widget->drag.gridy;
+					}
+					new_icon_xy(icon,newx,newy);
+				}
+			}
+
+		}
+	}
+
+	if(resize)
+		check_size(widget);
+}
+
+
+/*=================================*/
+
+static Window create_drag_window(Widget w,XEvent *event,Pixmap pix,int dx,int dy,
+int width,int height)
+{
+	/* Create drag window */
+
+
+	Display *dpy   = XtDisplay(w);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+
+	unsigned long mask;
+	XSetWindowAttributes att;
+	Window drag;
+
+	mask = CWCursor | CWOverrideRedirect | CWSaveUnder | CWBackPixmap;
+	att.override_redirect = TRUE;
+	att.save_under        = TRUE;
+	att.background_pixmap = pix;
+	att.cursor            = close_cursor;
+
+	drag = XCreateWindow(dpy,root,
+	    event->xbutton.x_root - dx,
+	    event->xbutton.y_root - dy,
+	    width,
+	    height,
+	    0,
+	    /*0*/ CopyFromParent,
+	    InputOutput,CopyFromParent,mask,&att);
+
+	XSelectInput(dpy,drag,ButtonPressMask|
+	    PointerMotionMask | LeaveWindowMask |
+	    ButtonMotionMask  | ButtonReleaseMask);
+
+	XDefineCursor(dpy,drag,close_cursor);
+	XDefineCursor(dpy,XtWindow(w),close_cursor);
+
+	return drag;
+}
+
+static void drag_over(Widget widget,Window drag,XEvent* ev)
+{
+	Icon p = ((DragWidget)widget)->drag.icons;
+	DragCallbackStruct cb;
+	int i;
+	int x = 0;
+	int y = 0;
+	Site * hit = 0;
+
+	for(i  = 0; i < num_sites; i++)
+	{
+		Site* s = &sites[i];
+		if(
+			s->x <= ev->xbutton.x_root &&
+			s->y <= ev->xbutton.y_root &&
+			s->x + s->width >= ev->xbutton.x_root &&
+			s->y + s->height >= ev->xbutton.y_root)
+				hit = s;
+	}
+
+	if(!hit) return;
+	if(!hit->is_drag) return;
+
+	x = ev->xbutton.x_root - hit->x;
+	y = ev->xbutton.y_root - hit->y;
+
+	 /* NOTE: Callback done on OTHER widget.... */
+
+	while(p)
+	{
+		if(p->selected)
+		{
+			memset(&cb,0,sizeof(cb));
+			cb.event      = ev;
+			cb.reason     = DRAG_FLY_OVER;
+			cb.icon_class = p->class;
+			cb.icon_name  = p->name;
+			cb.icon_data  = p->data;
+			cb.icon       = p;
+			cb.same_window   = (hit->widget == widget);
+			cb.remote_name   = XtName(widget);
+			cb.remote_window = XtWindow(widget);
+			cb.remote_widget = widget;
+			cb.x = x;
+			cb.y = y;
+			XtCallCallbacks (hit->widget,XmNflyOverCallback,(XtPointer)&cb);
+		}
+		p = p->next;
+	}
+
+}
+
+static Window drag_window(Widget widget,
+	Window drag,int dx,int dy, int *wx,
+	int *wy,Window *other)
+{
+	XEvent  ev;
+	Display *dpy       = XtDisplay(widget);
+	int     screen     = DefaultScreen(dpy);
+	Window  root       = RootWindow(dpy,screen);
+	Boolean save_under = DoesSaveUnders(XtScreen(widget));
+	Boolean done       = False;
+	Window  target     = 0;
+
+	get_window_tree(dpy);
+
+	*other = root;
+
+	XMapWindow(dpy,drag);
+	while(!done)
+	{
+		XNextEvent(dpy,&ev);
+		if(!save_under &&ev.type == Expose) XtDispatchEvent(&ev);
+
+		switch(ev.type)
+		{
+
+		case ButtonRelease:
+
+			XDestroyWindow(dpy,drag);
+
+			XSync(dpy,False);
+
+			*other = root;
+			target = find_window(dpy,other,root,
+			    ev.xbutton.x_root,
+			    ev.xbutton.y_root,wx,wy);
+
+			done = True;
+			break;
+
+		case LeaveNotify:
+		case MotionNotify:
+			while(XCheckWindowEvent(dpy,drag,PointerMotionMask,&ev))
+				;
+			while(XCheckWindowEvent(dpy,drag,ButtonMotionMask,&ev))
+				;
+			XMoveWindow(dpy,drag,
+			    ev.xmotion.x_root-dx,
+			    ev.xmotion.y_root-dy);
+
+			drag_over(widget,drag,&ev);
+
+			break;
+		}
+	}
+	return target;
+}
+
+static void drag_and_drop(DragWidget widget,XEvent *event)
+{
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap pix;
+	int wx,wy;
+	XRectangle  frame;
+	int         i,count = 0;
+	int      n = widget->drag.small_icons;
+
+
+
+	Window target = NULL;
+	Window drag;
+	Window other;
+	int width;
+	int height;
+
+	Position dx,dy;
+	Boolean label;
+	Icon icon = find_icon(widget,event,&label);
+	Icon p;
+
+
+	if(!icon ||  widget->drag.selecting || widget->drag.justclick)
+		return;
+
+	select_icon(widget,icon,event,
+	    (event->xbutton.state & ShiftMask) == 0);
+
+	if(!widget->drag.copy)
+	{
+		p = widget->drag.icons;
+		while(p)
+		{
+			if(p->selected)
+				hide_icon(widget,p);
+			p = p->next;
+		}
+	}
+	draw_icons(widget,NULL);
+
+
+	/* Get rectangle containing all selected icons */
+
+
+	frame = icon->r_all[n];
+	p = widget->drag.icons;
+	while(p)
+	{
+		if(p->selected)
+			UnionRect(&frame,&p->r_all[n],&frame);
+		p = p->next;
+	}
+
+	/* Get offset of cursor within pixmap */
+
+	dx = event->xbutton.x - frame.x;
+	dy = event->xbutton.y - frame.y;
+
+	width  = frame.width;
+	height = frame.height;
+
+	widget->drag.event = *event; /* save event */
+
+	pix = XCreatePixmap(dpy,root,width,height,DefaultDepth(dpy,screen));
+	XSetForeground(dpy,widget->drag.gc,widget->core.background_pixel);
+	XFillRectangle(dpy,pix,widget->drag.gc,0,0,width,height);
+
+	p = widget->drag.icons;
+	while(p)
+	{
+		if(p->selected)
+		{
+			plot_icon(widget,dpy,pix,widget->drag.gc,p,-frame.x,-frame.y);
+			count++;
+		}
+		p = p->next;
+	}
+
+
+	/* Create drag window */
+
+	drag = create_drag_window((Widget)widget, event, pix, dx,dy, width,height);
+
+
+	if(widget->drag.shape_mode != NO_SHAPE)
+	{
+
+
+		XShapeCombineRectangles(dpy,drag,ShapeBounding,
+		    0,0,&empty,1,ShapeSet,Unsorted);
+
+
+		p = widget->drag.icons;
+		while(p)
+		{
+			if(p->selected && p->mask[n])
+			{
+
+				if(widget->drag.shape_mode == RECT_SHAPE1)
+				{
+					XShapeCombineRectangles(dpy,drag,ShapeBounding,
+					    -frame.x,
+					    -frame.y,
+					    &p->r_all[n],1,ShapeUnion,Unsorted);
+				}
+				else
+				{
+					if(widget->drag.shape_mode == RECT_SHAPE2)
+						XShapeCombineRectangles(dpy,drag,ShapeBounding,
+						    -frame.x,
+						    -frame.y,
+						    &p->r_icon[n],1,ShapeUnion,Unsorted);
+					else
+
+						XShapeCombineMask(dpy,drag,ShapeBounding,
+						    p->r_icon[n].x - frame.x,
+						    p->r_icon[n].y - frame.y,
+						    p->mask[n],ShapeUnion);
+
+
+					XShapeCombineRectangles(dpy,drag,ShapeBounding,
+					    -frame.x,
+					    -frame.y,
+					    &p->r_label[n],1,ShapeUnion,Unsorted);
+				}
+
+
+
+			}
+			p = p->next;
+		}
+	}
+
+
+	target  = drag_window((Widget)widget,drag,dx,dy,&wx,&wy,&other);
+	XFreePixmap(dpy,pix);
+
+
+	if(target && widget->drag.clip && (target == XtWindow(widget->drag.clip)))
+	{
+		target = XtWindow(widget);
+		dx -= 0; /* todo */
+		dy -= 0; /* todo */
+	}
+
+	if(check_valid_drop((Widget)widget,dpy,target,&widget->drag.target))
+	{
+
+
+		icon_batch++;
+
+		if(wx < dx ) dx = wx;
+		if(wy < dy ) dy = wy;
+
+		p = widget->drag.icons;
+		i = 0;
+		while(p)
+		{
+			Icon q = p->next;
+			if(p->selected)
+			{
+
+				if(/*move && */ widget->drag.auto_move && target == XtWindow(widget))
+				{
+					widget->drag.event.xbutton.x = wx;
+					widget->drag.event.xbutton.y = wy;
+
+					move_icon(widget,p,
+					    wx  + (p->r_all[n].x - frame.x) -dx,
+					    wy  + (p->r_all[n].y - frame.y) -dy,
+						wx,
+						wy
+					    );
+				}
+				else
+					send_drop_msg(widget,target,
+					    wx  + (p->r_all[n].x - frame.x) -dx,
+					    wy  + (p->r_all[n].y - frame.y) -dy,
+					    p,
+					    ++i,
+					    count,
+					    icon_batch);
+			}
+			p = q;
+		}
+	}
+	else
+	{
+		i = 0;
+		p = widget->drag.icons;
+		while(p)
+		{
+			if(p->selected)
+			{
+				int x = wx + (p->r_all[n].x - frame.x) -dx;
+				int y = wy + (p->r_all[n].y - frame.y) -dy;
+				answer(widget,target,DROP_ABORTED,p,++i,count,
+				    icon_batch,other,x,y);
+			}
+			p = p->next;
+		}
+
+		p = widget->drag.icons;
+		while(p)
+		{
+			if(p->selected) show_icon(widget,p);
+			p = p->next;
+		}
+	}
+
+	XUndefineCursor(dpy,XtWindow(widget));
+	/* set_icon_under(widget,NULL); */
+	draw_icons(widget,NULL);
+
+}
+
+/*=================================*/
+
+static void unselect_icon_tree(DragWidget widget,XEvent  *event)
+{
+	Icon p = widget->drag.icons;
+	DragCallbackStruct cb;
+	int i;
+
+	while(p)
+	{
+		if(p->selected)
+		{
+			p->selected = False;
+			inval_icon(widget,p);
+
+			memset(&cb,0,sizeof(cb));
+			cb.event = event;
+			cb.reason = DRAG_SELECT;
+			cb.selected = False;
+			cb.icon_class = p->class;
+			cb.icon_name = p->name;
+			cb.icon_data = p->data;
+			cb.icon      = p;
+			XtCallCallbacks ((Widget)widget,XmNselectCallback,(XtPointer)&cb);
+		}
+		p = p->next;
+	}
+
+	for(i=0;i<widget->drag.child_count;i++)
+		unselect_icon_tree((DragWidget)widget->drag.child_folders[i],event);
+}
+
+static Boolean same_tree(Widget w1,Widget w2)
+{
+	if(w1 == NULL || w2 == NULL) return False;
+	if(!XtIsDrag((Widget)w1) || !XtIsDrag((Widget)w2)) return False;
+
+	while(((DragWidget)w1)->drag.parent_folder)
+		w1 = ((DragWidget)w1)->drag.parent_folder;
+	while(((DragWidget)w2)->drag.parent_folder)
+		w2 = ((DragWidget)w2)->drag.parent_folder;
+
+	return w1 == w2;
+}
+
+static void unselect_all_icons(widget,event)
+DragWidget widget;
+XEvent *event;
+{
+	while(widget->drag.parent_folder)
+		widget = (DragWidget)widget->drag.parent_folder;
+
+	unselect_icon_tree(widget,event);
+}
+
+static void select_icon(DragWidget widget,Icon icon,XEvent *event,Boolean unsel)
+{
+	DragCallbackStruct cb;
+
+
+	if(icon && icon->selected) return;
+
+	/* unselect fisrt */
+
+	if(unsel) unselect_all_icons(widget,event);
+
+	if(icon)
+	{
+		icon->selected = True;
+		inval_icon(widget,icon);
+
+		memset(&cb,0,sizeof(cb));
+		cb.event = event;
+		cb.reason = DRAG_SELECT;
+		cb.icon_class = icon->class;
+		cb.icon_name = icon->name;
+		cb.icon_data = icon->data;
+		cb.icon      = icon;
+		cb.selected = True;
+		XtCallCallbacks ((Widget)widget,XmNselectCallback,(XtPointer)&cb);
+	}
+}
+
+static void toggle_icon(widget,icon,event)
+DragWidget widget;
+Icon icon;
+XEvent *event;
+{
+	DragCallbackStruct cb;
+
+
+	if(!icon) return;
+
+	icon->selected = !icon->selected;
+
+	inval_icon(widget,icon);
+
+	memset(&cb,0,sizeof(cb));
+	cb.event = event;
+	cb.reason = DRAG_SELECT;
+	cb.icon_class = icon->class;
+	cb.icon_name = icon->name;
+	cb.icon_data = icon->data;
+	cb.icon      = icon;
+	cb.selected = icon->selected;
+	XtCallCallbacks ((Widget)widget,XmNselectCallback,(XtPointer)&cb);
+}
+
+/*=================================*/
+
+static int dist(char *a,char *b,int len)
+{
+	int i = 0;
+	while(len--)
+	{
+		char c = islower(*a) ? toupper(*a) : *a;
+		char d = islower(*b) ? toupper(*b) : *b;
+
+		if(c != d ) return len-i+1;
+
+		i++;
+		a++;
+		b++;
+	}
+	return -1;
+}
+
+void DragShowLast(w)
+Widget w;
+{
+	DragWidget widget = (DragWidget) w;
+	widget->drag.last_added = check_icon(widget,widget->drag.last_added);
+	if(widget->drag.last_added)
+		DragDisplayIcon((Widget)widget,
+		    widget->drag.last_added,
+		    DRAG_DISPLAY_VISUAL_FEEDBACK);
+}
+
+void DragBlinkIcon(Widget w,Icon n)
+{
+	DragWidget widget = (DragWidget) w;
+	n =  check_icon(widget,n);
+	if(n) DragDisplayIcon((Widget)widget,n,DRAG_DISPLAY_VISUAL_FEEDBACK);
+}
+
+static void ShowLast(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	widget->drag.last_added = check_icon(widget,widget->drag.last_added);
+	if(widget->drag.last_added)
+		DragDisplayIcon((Widget)widget,
+		    widget->drag.last_added,
+		    DRAG_DISPLAY_VISUAL_FEEDBACK);
+}
+
+static void KeySelect(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	static char buf[32];
+	static int  pos = 0;
+	int n;
+	static Time last = 0;
+
+	if(!widget->drag.accept_keys) return;
+
+	if(event->xkey.time - last > widget->drag.key_threshold)
+		pos = 0;
+
+	blink_icon(widget,NULL);
+	last = event->xkey.time;
+
+
+	/*-- if((n = XLookupString(&event->xkey,buf+pos,sizeof(buf)-1-pos,NULL,NULL))>0)  --*/
+	/*-- Q&D fix to prevent coredump when key is pressed continuously (vk 1999-01-28) --*/
+	if( pos < sizeof(buf) )
+	    n = XLookupString(&event->xkey,buf+pos,sizeof(buf)-1-pos,NULL,NULL);
+	else
+	    n = 0;
+
+	printf("key select %s %d\n",buf,buf[0]);
+
+	if( n > 0 )
+	{
+		Icon p   = widget->drag.icons;
+		Icon q   = NULL;
+		int  min = 90000;
+
+		pos     += n;
+		buf[pos] = 0;
+
+		while(p)
+		{
+			int d = dist(p->name,buf,pos);
+			if(d<min)
+			{
+				min = d;
+				q   = p;
+			}
+			p = p->next;
+		}
+
+		if(q)
+		{
+			raise_icon(widget,q);
+			select_icon(widget,q,event,True);
+			DragDisplayIcon((Widget)widget,q,DRAG_DISPLAY_NO_EFFECT);
+		}
+	}
+}
+
+void DragToggleSizeIcons(widget)
+Widget widget;
+{
+	ToggleSize((DragWidget)widget, NULL, 0, NULL);
+}
+
+Boolean DragAreSmallIconsUsed(widget)
+Widget widget;
+{
+	return ((DragWidget)widget)->drag.small_icons;
+}
+
+void DragUseSmallIcons(Widget widget, Boolean use)
+{
+	if(((DragWidget)widget)->drag.small_icons != use)
+	{
+		((DragWidget)widget)->drag.small_icons = !use;
+		DragToggleSizeIcons(widget);
+	}
+}
+
+
+static void ToggleSize(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	blink_icon(widget,NULL);
+	widget->drag.small_icons = !widget->drag.small_icons;
+
+	widget->drag.gridx = 0;
+
+	if(widget->drag.grid)
+	{
+		Icon p = widget->drag.icons;
+		while(p)
+		{
+			place_icon(widget,p,False);
+			p = p->next;
+		}
+		if(widget->drag.auto_clean)
+			DragCleanUpIcons((Widget)widget);
+	}
+	check_size(widget);
+	if(XtIsRealized((Widget)widget))
+		XClearArea(XtDisplay(widget),XtWindow(widget),0,0,0,0,True);
+}
+
+/*
+static void DragMove(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	drag_and_drop(widget,event,True);
+}
+*/
+
+int DragSortByName(widget,icon1,icon2)
+Widget widget;
+Icon icon1,icon2;
+{
+	int n = strcasecmp(icon1->name,icon2->name);
+	return n?n:strcasecmp(icon1->class,icon2->class);
+}
+
+int DragSortByClass(widget,icon1,icon2)
+Widget widget;
+Icon icon1,icon2;
+{
+	int n = strcasecmp(icon1->class,icon2->class);
+	return n?n:strcasecmp(icon1->name,icon2->name);
+}
+
+static int SortByXY(widget,icon1,icon2)
+DragWidget widget;
+Icon icon1,icon2;
+{
+	int n = icon1->r_all[widget->drag.small_icons].y
+	- icon2->r_all[widget->drag.small_icons].y;
+	return n?n:icon1->r_all[widget->drag.small_icons].x
+	    - icon2->r_all[widget->drag.small_icons].x;
+}
+
+
+static void all_moved(DragWidget widget,XEvent *event)
+{
+	DragCallbackStruct cb;
+	int n  = widget->drag.small_icons;
+	Icon p = widget->drag.icons;
+
+	memset(&cb,0,sizeof(cb));
+	cb.reason = DRAG_MOVE;
+	cb.event = event;
+
+	while(p)
+	{
+		cb.icon_class = p->class;
+		cb.icon_name = p->name;
+		cb.icon_data = p->data;
+		cb.icon      = p;
+		cb.x = p->r_all[n].x;
+		cb.y = p->r_all[n].y;
+		XtCallCallbacks ((Widget)widget,XmNmoveCallback,(XtPointer)&cb);
+		p = p->next;
+	}
+
+}
+
+static void sort_icons(widget,sort)
+DragWidget widget;
+int (*sort)();
+{
+	Icon p,q,r;
+	Boolean swap = True;
+	Boolean grid = widget->drag.grid;
+	Boolean place = widget->drag.auto_place;
+
+	/* silly bubble sort */
+	while(swap)
+	{
+		swap = False;
+		p = widget->drag.icons;
+		r = NULL;
+		while(p)
+		{
+			q = p->next;
+			if(q)
+			{
+				if((*sort)(widget,p,q)>0)
+				{
+					swap = True;
+					if(r)
+						r->next = q;
+					else
+						widget->drag.icons = q;
+
+					p->next = q->next;
+					q->next = p;
+
+					if(q == widget->drag.last)
+						widget->drag.last = p;
+
+					break;
+				}
+			}
+			r = p;
+			p = q;
+		}
+	}
+
+	p = widget->drag.icons;
+	while(p)
+	{
+		new_icon_xy(p,widget->core.width+20,widget->core.height+20);
+		p = p->next;
+	}
+
+	widget->drag.grid = True;
+	widget->drag.auto_place = True;
+
+	p = widget->drag.icons;
+	while(p)
+	{
+		new_icon_xy(p,0,0);
+		place_icon(widget,p,False);
+		p = p->next;
+	}
+	check_size(widget);
+
+	if(XtIsRealized((Widget)widget))
+		XClearArea(XtDisplay(widget),XtWindow(widget),0,0,0,0,True);
+
+	widget->drag.grid = grid;
+	widget->drag.auto_place = place;
+
+}
+
+static void Sort(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	int (*sort)() = widget->drag.sort;
+	blink_icon(widget,NULL);
+
+	if(event->xkey.state & ShiftMask) sort = DragSortByClass;
+
+	if(!sort) return;
+	sort_icons(widget,sort);
+	all_moved(widget,NULL);
+}
+
+
+static void CleanUp(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	int (*sort)() = SortByXY;
+	blink_icon(widget,NULL);
+
+	if(widget->drag.auto_sort && widget->drag.sort)
+		sort = widget->drag.sort;
+
+	sort_icons(widget,sort);
+	all_moved(widget,NULL);
+}
+
+static void StartSelect(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	Display *dpy = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Icon    icon;
+	Boolean label;
+
+	blink_icon(widget,NULL);
+
+	XmProcessTraversal((Widget)widget,XmTRAVERSE_CURRENT);
+
+	widget->drag.copy    = (event->xbutton.button == 2);
+
+	if((icon = find_icon(widget,event,&label))==NULL)
+	{
+		widget->drag.selecting = TRUE;
+		widget->drag.justclick = FALSE;
+
+		widget->drag.selextend =
+		    (event->xbutton.state & ShiftMask) != 0;
+		widget->drag.startx = widget->drag.lastx = event->xbutton.x;
+		widget->drag.starty = widget->drag.lasty = event->xbutton.y;
+
+		widget->drag.r_select.x = widget->drag.startx ;
+		widget->drag.r_select.y = widget->drag.starty;
+		widget->drag.r_select.width =  widget->drag.r_select.height = 0;
+		XSetForeground(dpy,widget->drag.gc,BlackPixel(dpy,screen));
+	}
+	else
+	{
+
+		widget->drag.selecting = False;
+		widget->drag.justclick = FALSE;
+
+		if( (event->xbutton.time - widget->drag.last_click) > XtGetMultiClickTime(dpy) )
+		{
+			raise_icon(widget,icon);
+			XDefineCursor(XtDisplay(widget),XtWindow(widget),open_cursor);
+			if((event->xbutton.state & ShiftMask) != 0)
+				toggle_icon(widget,icon,event);
+			else {
+				select_icon(widget,icon,event,True);
+				if(label && widget->drag.edit_names)
+					start_edit(widget,icon);
+			}
+		}
+		else
+		{
+			DragCallbackStruct cb;
+			memset(&cb,0,sizeof(cb));
+			cb.reason = DRAG_DBL_CLICK;
+			cb.icon_class = icon->class;
+			cb.icon_name = icon->name;
+			cb.icon_data = icon->data;
+			cb.icon      = icon;
+
+			cb.event     = event; /* br */
+
+			XtCallCallbacks ((Widget)widget,XmNdblClickCallback,(XtPointer)&cb);
+			widget->drag.justclick = TRUE;
+		}
+
+		widget->drag.last_click = event->xbutton.time;
+	}
+}
+
+static void DoSelect(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+
+	end_edit(widget);
+
+	if(widget->drag.selecting)
+	{
+		int newx = event->xbutton.x;
+		int newy = event->xbutton.y;
+
+		if(newx != widget->drag.lastx && newy != widget->drag.lasty)
+		{
+			XDrawRectangle(XtDisplay(widget),XtWindow(widget),
+			    widget->drag.selgc,
+			    widget->drag.r_select.x,
+			    widget->drag.r_select.y,
+			    widget->drag.r_select.width,
+			    widget->drag.r_select.height);
+
+
+			widget->drag.lastx = newx;
+			widget->drag.lasty = newy;
+
+			widget->drag.r_select.x = MIN(newx,widget->drag.startx);
+			widget->drag.r_select.y = MIN(newy,widget->drag.starty);
+
+			widget->drag.r_select.width  = MAX(newx,widget->drag.startx)
+			    - widget->drag.r_select.x;
+			widget->drag.r_select.height = MAX(newy,widget->drag.starty)
+			    - widget->drag.r_select.y;
+
+			XDrawRectangle(XtDisplay(widget),XtWindow(widget),
+			    widget->drag.selgc,
+			    widget->drag.r_select.x,
+			    widget->drag.r_select.y,
+			    widget->drag.r_select.width,
+			    widget->drag.r_select.height);
+		}
+	}
+	else
+		drag_and_drop(widget,event);
+}
+
+static Boolean InterRect(XRectangle *r1,XRectangle *r2)
+{
+	if ((short) (r1->x + r1->width) < r2->x || (short) (r1->y + r1->height) < r2->y)
+		return False;
+	if (r1->x > (short) (r2->x + r2->width) || r1->y > (short) (r2->y + r2->height))
+		return False;
+	return True;
+}
+
+static void UnionRect(XRectangle *r1,XRectangle *r2,XRectangle *r3)
+{
+	int dx,dy;
+
+	dx  = MAX(r1->x+r1->width,r2->x+r2->width);
+	dy  = MAX(r1->y+r1->height,r2->y+r2->height);
+	r3->x = MIN(r1->x,r2->x);
+	r3->y = MIN(r1->y,r2->y);
+
+	r3->width  = dx - r3->x;
+	r3->height = dy - r3->y;
+
+}
+
+static void EndSelect(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	int n = widget->drag.small_icons;
+
+	if(widget->drag.selecting)
+	{
+		Icon p = widget->drag.icons;
+
+		XDrawRectangle(XtDisplay(widget),XtWindow(widget),
+		    widget->drag.selgc,
+		    widget->drag.r_select.x,
+		    widget->drag.r_select.y,
+		    widget->drag.r_select.width,
+		    widget->drag.r_select.height);
+
+		if(!widget->drag.selextend)
+			unselect_all_icons(widget,event);
+
+		while(p)
+		{
+			if(InterRect(&widget->drag.r_select,&p->r_all[n]))
+				select_icon(widget,p,event,False);
+			p = p->next;
+		}
+
+	}
+	else {
+/*
+		Boolean label;
+		Icon icon;
+		if( (icon = find_icon(widget,event,&label)) != NULL)
+			if(label && event->xbutton.time - widget->drag.last_click > widget->drag.edit_timeout)
+				if(widget->drag.edit_names)
+					start_edit(widget,icon);
+*/
+	}
+
+	widget->drag.selecting = False;
+	XUndefineCursor(XtDisplay(widget),XtWindow(widget));
+}
+
+static void SelectAll(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	Icon p = widget->drag.icons;
+	blink_icon(widget,NULL);
+
+
+	while(p)
+	{
+		select_icon(widget,p,event,False);
+		p = p->next;
+	}
+
+}
+
+static void SelectNone(widget,event,args,nargs)
+DragWidget widget;
+XEvent     *event;
+char       **args;
+int        nargs;
+{
+	blink_icon(widget,NULL);
+	unselect_all_icons(widget,event);
+}
+
+static Icon check_icon(widget,icon)
+DragWidget widget;
+Icon icon;
+{
+	Icon p = widget->drag.icons;
+	while(p)
+	{
+		if(p == icon) return icon;
+		p = p->next;
+	}
+	return NULL;
+}
+
+/*=================================*/
+
+Widget CreateDragWidget(Widget parent,const char* name,ArgList al,int ac)
+{
+	return XtCreateWidget(name,dragWidgetClass,parent,al, ac);
+}
+
+
+static Pixmap half_image(widget,pixmap,name,newname)
+Widget widget;
+Pixmap     pixmap;
+String     name;
+String     *newname;
+{
+	char    buf[1024];
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	XImage   *image;
+	Pixel     p[4];
+	int  		x,y;
+	unsigned int width;
+	unsigned int height;
+	unsigned int depth;
+	int c[4],i,j;
+	Pixmap pix;
+	GC  gc;
+
+	if (name && newname) {
+		int len = strlen(name)-1;
+		while(len>0 && name[len] != '.' && name[len] != '/') len--;
+		if(len>0 && name[len] == '.')
+		{
+			strcpy(buf,name);
+			buf[len] = 0;
+			strcat(buf,".half");
+		}
+		else
+			sprintf(buf,"%s.half",name);
+		/* printf("half is %s\n",buf); */
+		*newname = XtNewString(buf);
+		if(pix = GetPixMap((Widget)widget,buf,1,0))
+			return pix;
+
+		/*-- 'mvmon' crashed when default.half was needed...  --*/
+		/*-- Q&D & blind fix: get & use 'default' (011113/vk) --*/
+		if( pixmap == NULL )
+		  pixmap = GetPixMap((Widget)widget,"default",1,0);
+	}
+
+#if 0
+	XGetGeometry(dpy,pixmap,&root,&x,&y,&width,&height,&dummy,&depth);
+	image  = XGetImage(dpy,pixmap,0,0,width,height,AllPlanes,ZPixmap);
+#endif
+	image = PixmapImage(widget,pixmap,&width,&height,&depth);
+	pixmap = XCreatePixmap(dpy,root,width/2,height/2,depth);
+
+
+	for(x = 0 ; x < width/2 ;x++)
+		for(y = 0 ; y < height/2; y++)
+		{
+			p[0] = XGetPixel(image,2*x  ,2*y );
+			p[1] = XGetPixel(image,2*x+1,2*y );
+			p[2] = XGetPixel(image,2*x  ,2*y+1);
+			p[3] = XGetPixel(image,2*x+1,2*y+1);
+
+			c[0] = c[1] = c[2] = c[3] = 0;
+
+			for(i=0;i<4;i++)
+				for(j=0;j<4;j++)
+					if(p[i] == p[j]) c[i]++;
+
+			j = 0;
+			for(i=0;i<4;i++)
+				if(c[i] > c[j]) j = i;
+
+			XPutPixel(image,x,y,p[j]);
+		}
+
+	gc = XCreateGC(dpy,pixmap,0,NULL);
+	XPutImage(dpy,pixmap,gc,image,0,0,0,0,width/2,height/2);
+	XFreeGC(dpy,gc);
+
+	if (name && newname) {
+		InstallPixmap(pixmap,buf,width,height,depth,image);
+	}
+	else XDestroyImage(image);
+
+	return pixmap;
+}
+
+Pixmap MakeHalfPixmap(Widget widget, Pixmap pixmap)
+{
+	return half_image(widget, pixmap, NULL, NULL);
+}
+
+Pixmap DragGetPixmap(Widget w,const char* name)
+{
+	Pixmap p = GetPixMap(w,(String)name,1,0);
+	return p ? p : XmUNSPECIFIED_PIXMAP;
+}
+
+static Pixmap open_image(Widget widget,Pixmap pixmap,String name,Pixel black)
+{
+	char    buf[1024];
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	XImage   *image;
+	Pixel     p;
+	int  		x,y;
+	unsigned int width;
+	unsigned int height;
+	unsigned int dummy;
+	unsigned int depth;
+	Pixmap pix;
+	GC  gc;
+
+	if (name) {
+		sprintf(buf,"{%s}",name);
+
+		if(pix = FindPixmap(buf,&dummy,&dummy))
+			return pix;
+	}
+
+
+#if 0
+	XGetGeometry(dpy,pixmap,&root,&x,&y,&width,&height,&dummy,&depth);
+	image  = XGetImage(dpy,pixmap,0,0,width,height,AllPlanes,ZPixmap);
+#endif
+	image = PixmapImage((Widget)widget,pixmap,&width,&height,&depth);
+	pixmap = XCreatePixmap(dpy,root,width,height,depth);
+
+	for(x = 0 ; x < width ;x++)
+		for(y = 0 ; y < height; y++)
+		{
+			if((x+y)%2)
+				p = black;
+			else
+				p = XGetPixel(image,x,y);
+			XPutPixel(image,x,y,p);
+		}
+
+	gc = XCreateGC(dpy,pixmap,0,NULL);
+	XPutImage(dpy,pixmap,gc,image,0,0,0,0,width,height);
+	XFreeGC(dpy,gc);
+
+	if (name) InstallPixmap(pixmap,buf,width,height,depth,image);
+	else
+	XDestroyImage(image);
+
+	return pixmap;
+}
+
+Pixmap MakeOpenPixmap(widget, pixmap)
+Widget widget;
+Pixmap pixmap;
+{
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Pixel   black  = BlackPixel(dpy,screen);
+	return open_image(widget, pixmap, NULL,black);
+}
+
+Pixmap MakeDisabledPixmap(widget, pixmap)
+Widget widget;
+Pixmap pixmap;
+{
+	return open_image(widget, pixmap, NULL,widget->core.background_pixel);
+}
+
+static Pixmap mask_image(widget,pixmap,name,white,w,h)
+Widget     widget;
+Pixmap     pixmap;
+Pixel      white;
+String     name;
+unsigned int *w;
+unsigned int *h;
+{
+	char    buf[1024];
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	XImage   *image;
+	Pixel     p;
+	int  		x,y;
+	unsigned int depth;
+	unsigned int width;
+	unsigned int width8;
+	unsigned int height;
+	Pixmap pix;
+	char *data;
+	static unsigned char bits[] = {
+		1,2,4,8,16,32,64,128,		};
+	Boolean *mask1,*mask2;
+	Boolean more = True;
+
+	if(name)
+	{
+		sprintf(buf,"[%s]",name);
+		if(pix = FindPixmap(buf,w,h)) return pix;
+	}
+
+#if 0
+	XGetGeometry(dpy,pixmap,&root,&x,&y,&width,&height,&dummy,&depth);
+	image  = XGetImage(dpy,pixmap,0,0,width,height,AllPlanes,ZPixmap);
+#endif
+	image = PixmapImage(widget,pixmap,&width,&height,&depth);
+
+	width8 = ((width+7)/8)*8;
+
+	data   = XtCalloc(1,width8 * height);
+	mask1  = XtCalloc(sizeof(Boolean),width8*height);
+	mask2  = XtCalloc(sizeof(Boolean),width8*height);
+
+	/* buf fix. I should look closer */
+	white = WhitePixel(dpy,screen);
+
+
+#define XY(x,y) ((x)+(y)*width8)
+
+	for(y = 0 ; y < height; y++)
+		for(x = 0 ; x < width ;x++)
+		{
+			p = XGetPixel(image,x,y);
+			mask1[XY(x,y)] = (p == white);
+		}
+
+	/* look if white of border */
+	for(y = 0 ; y < height ; y++)
+	{
+		x = 0;
+		mask2[XY(x,y)] = mask1[XY(x,y)];
+		x = width-1;
+		mask2[XY(x,y)] = mask1[XY(x,y)];
+	}
+
+	for(x = 0 ; x < width ; x++)
+	{
+		y = 0;
+		mask2[XY(x,y)] = mask1[XY(x,y)];
+		y = height-1;
+		mask2[XY(x,y)] = mask1[XY(x,y)];
+	}
+
+
+	/* now look if a inner pixel touches a white on */
+
+	while(more)
+	{
+		more = False;
+
+
+		for(y = 1 ; y < height-1; y++)
+			for(x = 1 ; x < width-1 ;x++)
+			{
+				if(mask1[XY(x,y)] && !mask2[XY(x,y)])
+				{
+					if(
+					    mask2[XY(x-1,y  )] ||
+					    mask2[XY(x  ,y-1)] ||
+					    mask2[XY(x  ,y+1)] ||
+					    mask2[XY(x+1,y  )] )
+
+					{
+						more = True;
+						mask2[XY(x,y)] = True;
+					}
+				}
+			}
+	}
+
+	for(y = 0 ; y < height; y++)
+		for(x = 0 ; x < width ;x++)
+		{
+			int bit = XY(x,y);
+			if(!mask2[bit])
+				data[bit/8] |= bits[bit%8];
+		}
+
+#undef XY
+
+	pixmap = XCreateBitmapFromData(dpy,root,data,width,height);
+	XtFree(data);
+	XtFree(mask1);
+	XtFree(mask2);
+	/* XWriteBitmapFile(dpy,"default",pixmap,width,height,0,0); */
+
+	if(name) InstallPixmap(pixmap,buf,width,height,1,0);
+
+	*w = width;
+	*h = height;
+
+	XDestroyImage(image);
+
+	return pixmap;
+}
+
+Pixmap MakeMaskBitmap(widget, pixmap, white)
+Widget widget;
+Pixmap pixmap;
+Pixel  white;
+{
+	unsigned int w, h;
+	return mask_image(widget, pixmap, NULL, white, &w, &h);
+}
+
+Pixmap CopyBackground(Widget widget,Pixmap pixmap)
+{
+	Arg al[64];
+	Pixel fg, bg;
+	Display *dpy = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  mask = MakeMaskBitmap(widget,pixmap,WhitePixel(dpy,screen));
+	Pixmap  pix;
+	GC      gc;
+
+	int  		x,y;
+	unsigned int dummy;
+	unsigned int depth;
+	unsigned int width;
+	unsigned int height;
+	int ac = 0;
+
+	XtSetArg(al[ac], XmNforeground, &fg );
+	ac++;
+	XtSetArg(al[ac], XmNbackground, &bg );
+	ac++;
+	XtGetValues(widget, al, ac );
+
+	XGetGeometry(dpy,pixmap,&root,&x,&y,&width,&height,&dummy,&depth);
+
+	pix = XCreatePixmap(dpy,root,width,height,depth);
+
+	/* Fill new pixmap with background color */
+
+	gc = XCreateGC(dpy,pix,0,NULL);
+	XSetForeground(dpy,gc, bg);
+	XFillRectangle(dpy,pix,gc,0,0,width,height);
+	XSetForeground(dpy,gc, BlackPixel(dpy,screen));
+
+	XSetClipMask(dpy,gc, mask);
+	/* XSetClipOrigin(dpy,gc,0,0); */
+
+	XCopyArea(dpy,pixmap,pix,gc,0,0,width,height,0,0);
+
+	/* XSetClipMask(dpy,gc,None); */
+	XFreeGC(dpy,gc);
+	XFreePixmap(dpy,mask);
+
+	return pix;
+
+}
+
+Pixmap OverlayPixmaps(Widget widget,Pixmap lower,Pixmap upper,int dx,int dy)
+{
+	Display *dpy = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  pix;
+	Pixmap  mask = MakeMaskBitmap(widget,upper,WhitePixel(dpy,screen));
+
+	int         x,y;
+	unsigned int dummy;
+	unsigned int depth;
+	unsigned int width1;
+	unsigned int height1;
+	unsigned int width2;
+	unsigned int height2;
+	GC gc;
+
+
+	XGetGeometry(dpy,lower,&root,&x,&y,&width1,&height1,&dummy,&depth);
+	XGetGeometry(dpy,upper,&root,&x,&y,&width2,&height2,&dummy,&depth);
+
+	pix = XCreatePixmap(dpy,root,width1,height1,depth);
+	gc = XCreateGC(dpy,pix,0,NULL);
+	XCopyArea(dpy,lower,pix,gc,0,0,width1,height1,0,0);
+
+	x = (dx != -1) ? dx : (width1 - width2)   / 2;
+	y = (dy != -1) ? dy : (height1 - height2) / 2;
+
+
+	XSetClipMask(dpy,gc, mask);
+	XSetClipOrigin(dpy,gc,x,y);
+
+	XCopyArea(dpy,upper,pix,gc,0,0,width2,height2,x,y);
+
+	XFreeGC(dpy,gc);
+	XFreePixmap(dpy,mask);
+	return pix;
+}
+
+Pixmap StackPixmaps(Widget widget,Pixmap pixmap,int count,int dx,int dy)
+{
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  pix;
+ 	Pixmap  mask;
+
+	int         x,y;
+	int i;
+	unsigned int dummy;
+	unsigned int depth;
+	unsigned int width,w;
+	unsigned int height,h;
+	GC gc;
+
+	int dx1 = dx>0?dx:-dx;
+	int dy1 = dy>0?dy:-dy;
+	int dd  = dx1>dy1?dx1:dy1;
+
+	if(pixmap == XmUNSPECIFIED_PIXMAP || pixmap == 0)
+		return XmUNSPECIFIED_PIXMAP;
+
+ 	mask = MakeMaskBitmap(widget,pixmap,WhitePixel(dpy,screen));
+	XGetGeometry(dpy,pixmap,&root,&x,&y,&width,&height,&dummy,&depth);
+
+	w = width  + dd*count;
+	h = height + dd*count;
+
+	pix = XCreatePixmap(dpy,root,w,h,depth);
+	gc  = XCreateGC(dpy,pix,0,NULL);
+	XSetForeground(dpy,gc, WhitePixel(dpy,screen));
+
+	XSetBackground(dpy,gc, BlackPixel(dpy,screen));
+	XFillRectangle(dpy,pix,gc,0,0,w,h);
+
+
+	x = dx>0 ? 0 : w - width;
+	y = dy>0 ? 0 : h - height;
+
+	XSetClipMask(dpy,gc, mask);
+	for(i=0;i<count;i++)
+	{
+		XSetClipOrigin(dpy,gc,x,y);
+		XCopyArea(dpy,pixmap,pix,gc,0,0,width,height,x,y);
+		x += dx;
+		y += dy;
+	}
+
+	XFreeGC(dpy,gc);
+	XFreePixmap(dpy,mask);
+	return pix;
+}
+
+static void compute_rects(DragWidget widget,Icon icon)
+{
+	int i;
+	unsigned int width = 32,height = 32;
+
+	for(i=0;i<2;i++)
+	{
+
+		icon->r_label[i].width=XmStringWidth(widget->drag.fontlist,icon->label);
+		icon->r_label[i].height=widget->drag.string_height;
+
+#if 0
+		/* main pixmap */
+
+		icon->pix[i] = GetPixMap(widget,
+		    icon->pix_name[i],
+		    icon->foreground,
+		    icon->background);
+
+		if(icon->pix[i] == NULL)
+			if(i)
+				icon->pix[i] = half_image(widget,icon->pix[0],
+				    icon->pix_name[0],&icon->pix_name[i]);
+			else
+				icon->pix[i] = GetPixMap(widget,"default",
+				    icon->foreground,icon->background);
+
+
+		/* Open state icon */
+
+		icon->open_pix[i] = GetPixMap(widget,
+		    icon->open_name[i],
+		    icon->foreground,icon->background);
+
+		if(icon->open_pix[i] == NULL)
+			icon->open_pix[i] = open_image(widget,icon->pix[i],
+			    icon->pix_name[i],black);
+
+		icon->mask[i] = GetBitMap(widget,icon->mask_name[i],&width,&height);
+		if(icon->mask[i] == NULL)
+			icon->mask[i] = mask_image(widget,icon->pix[i],
+			    icon->pix_name[i],icon->background,&width,&height);
+#endif
+
+		icon->r_icon[i].width = width;
+		icon->r_icon[i].height = height;
+
+		icon->r_label[i].x = icon->r_label[i].y = 0;
+		icon->r_icon[i].x = icon->r_icon[i].y = 0;
+
+		width /= 2;
+		height /= 2;
+	}
+
+
+	/* Layout for large icons */
+
+
+	if(icon->r_icon[0].width > icon->r_label[0].width)
+		icon->r_label[0].x = (short) (icon->r_icon[0].width-icon->r_label[0].width)/ 2;
+	else
+		icon->r_icon[0].x = (short) (icon->r_label[0].width-icon->r_icon[0].width)/ 2;
+
+	icon->r_label[0].y = icon->r_icon[0].height + 1;
+
+
+	/* Layout for small icons */
+
+	icon->r_label[1].x = icon->r_icon[1].width + 1;
+	if(icon->r_icon[1].height < icon->r_label[1].height)
+		icon->r_icon[1].y  = icon->r_label[1].height - icon->r_icon[1].height;
+	else
+		icon->r_label[1].y = icon->r_icon[1].height - icon->r_label[1].height;
+
+	UnionRect(&icon->r_icon[0],&icon->r_label[0],&icon->r_all[0]);
+	UnionRect(&icon->r_icon[1],&icon->r_label[1],&icon->r_all[1]);
+}
+
+static void make_pixmaps(Widget widget,Icon icon,int i)
+{
+	unsigned int width,height;
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Pixel    black = BlackPixel(dpy,screen);
+
+	if(icon->pix[i] != NULL)
+		return;
+
+
+	/* printf("Make pixmap %s %d\n",icon->name,i); */
+
+
+	/* main pixmap */
+
+	icon->pix[i] = GetPixMap(widget,
+	    icon->pix_name[i],
+	    icon->foreground,
+	    icon->background);
+
+	if(icon->pix[i] == NULL)
+		if(i)
+			icon->pix[i] = half_image(widget,icon->pix[0],
+			    icon->pix_name[0],&icon->pix_name[i]);
+		else
+			icon->pix[i] = GetPixMap(widget,"default",
+			    icon->foreground,icon->background);
+
+
+	/* Open state icon */
+
+	icon->open_pix[i] = GetPixMap(widget,
+	    icon->open_name[i],
+	    icon->foreground,icon->background);
+
+	if(icon->open_pix[i] == NULL)
+		icon->open_pix[i] = open_image(widget,icon->pix[i],
+		    icon->pix_name[i],black);
+
+	icon->mask[i] = GetBitMap(widget,icon->mask_name[i],&width,&height);
+		if(icon->mask[i] == NULL)
+			icon->mask[i] = mask_image(widget,icon->pix[i],
+			    icon->pix_name[i],icon->background,&width,&height);
+
+}
+
+
+void DragAddIconPixmap(Widget widget,Icon icon,const char* name,int dx,int dy)
+{
+	Pixmap pix;
+	char buf[1024];
+	unsigned int dummy;
+	int i;
+
+	if(icon->pix[0] == NULL) make_pixmaps(widget,icon,0);
+
+	sprintf(buf,"%s:%s(%d,%d)",icon->pix_name[0],name,dx,dy);
+
+	/* look in cache */
+	pix = FindPixmap(buf,&dummy,&dummy);
+
+	if(!pix)
+	{
+		pix = GetPixMap(widget,name, icon->foreground, icon->background);
+		if(!pix) return;
+
+		pix = OverlayPixmaps(widget,icon->pix[0],pix,dx,dy);
+		InstallPixmap(pix,buf,0,0,0,0); /* store in cache */
+	}
+
+	for(i=0;i<2;i++)
+	{
+		FreePixmap(widget,icon->pix[i]);
+		FreePixmap(widget,icon->open_pix[i]);
+		FreePixmap(widget,icon->mask[i]);
+	}
+
+	icon->pix_name[0] = XtNewString(buf);
+	icon->pix[0]      = pix;
+	icon->pix[1]      = half_image(widget,icon->pix[0], icon->pix_name[0],&icon->pix_name[1]);
+
+	for(i=0;i<2;i++)
+	{
+		icon->open_pix[i] = open_image(widget,icon->pix[i], icon->pix_name[i],0);
+		icon->mask[i]     = mask_image(widget,icon->pix[i],
+		    icon->pix_name[i],icon->background,&dummy,&dummy);
+	}
+
+}
+
+Icon DragAddIcon(Widget widget,const char *class,const char *name,
+	XtPointer data,int x,int y)
+{
+	Icon icon = (Icon)XtCalloc(1,sizeof(_IconRec));
+	static int ids = 0;
+	DragWidget drag = (DragWidget)widget;
+
+	blink_icon((DragWidget)widget,NULL);
+	drag->drag.last_added = icon;
+
+	XtGetSubresources(widget,(XtPointer)icon,
+		/*name*/ "" ,
+		class,
+	    icon_resources,XtNumber(icon_resources),NULL,0);
+
+	icon->parent = widget;
+	icon->selected = False;
+	icon->delete = False;
+	icon->opened = False;
+	icon->visible = True;
+	icon->data = data;
+	icon->class = XtNewString(class);
+	icon->name  = XtNewString(name);
+	icon->id    = ++ids;
+
+	icon->label = XmStringCreate((char*)name,((DragWidget)widget)->drag.tag);
+
+	compute_rects((DragWidget)widget,icon);
+	new_icon_xy(icon,x,y);
+
+	if(drag->drag.icons == NULL)
+		drag->drag.icons = icon;
+	else
+		drag->drag.last->next = icon;
+	drag->drag.last = icon;
+
+	/* Force new grid computation */
+
+	if((int)icon->r_all[drag->drag.small_icons].width > drag->drag.gridx)
+		drag->drag.gridx = 0;
+
+	if((int)icon->r_all[drag->drag.small_icons].height > drag->drag.gridy)
+		drag->drag.gridy = 0;
+
+	/* BR: auto place when grid is off */
+
+	if( (drag->drag.auto_place )  || ( x <=0 && y <=0))
+	{
+		Boolean save = drag->drag.grid;
+		Icon      p = drag->drag.icons;
+
+#if 0
+		Boolean   over = ( x <=0 && y <=0);
+		int	    n = drag->drag.small_icons;
+
+		/* check if icons overlap */
+		while(p)
+		{
+			if(p != icon && InterRect(&p->r_all[n],&icon->r_all[n]))
+				over = True;
+			p = p->next;
+		}
+
+		if(over)
+#endif
+			drag->drag.grid = True;
+
+		place_icon(drag,icon,True);
+
+		drag->drag.grid = save;
+
+	}
+	else place_icon(drag,icon,True);
+
+
+
+	inval_icon(drag,icon);
+
+	if(drag->drag.auto_clean)
+		DragCleanUpIcons(widget);
+
+
+	return icon;
+
+}
+
+
+Widget DragIconToWidget(icon)
+Icon icon;
+{
+	if(!icon) return NULL;
+	return icon->parent;
+}
+
+
+Icon DragFindIconByName(Widget widget,const char* class,const char* name)
+{
+	Icon p = ((DragWidget)widget)->drag.icons;
+	while(p)
+	{
+		if ((class == NULL || strcmp(class,p->class)==0) &&
+		    (name == NULL || strcmp(name,p->name) == 0))
+			return p;
+		p = p->next;
+	}
+	return NULL;
+}
+
+Icon DragFindIconByData(Widget widget,XtPointer data)
+{
+	Icon p = ((DragWidget)widget)->drag.icons;
+	while(p)
+	{
+		if(p->data == data)
+			return p;
+		p = p->next;
+	}
+	return NULL;
+}
+
+static Icon find_folders(DragWidget w,const char *class,const char *name)
+{
+	Icon p = w->drag.icons;
+	int  i;
+
+	while(p)
+	{
+		if ( (class == NULL || strcmp(class,p->class)==0) &&
+		    (name == NULL || strcmp(name,p->name) == 0))
+			return p;
+		p = p->next;
+	}
+
+	for(i=0;i<w->drag.child_count;i++)
+		if(p = find_folders((DragWidget)w->drag.child_folders[i],class,name))
+			return p;
+
+	return NULL;
+}
+
+Icon DragFindIconByNameFolders(Widget widget,const char *class,const char *name)
+{
+	DragWidget w = (DragWidget)widget;
+
+	while(w->drag.parent_folder)
+		w = (DragWidget)w->drag.parent_folder;
+
+	return find_folders(w,class,name);
+}
+
+void DragDeleteIcon(Widget widget,Icon icon)
+{
+	blink_icon((DragWidget)widget,NULL);
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon) remove_icon((DragWidget)widget,icon,True);
+}
+
+void DragShowIcon(Widget widget, Icon icon, Boolean vis)
+{
+	blink_icon((DragWidget)widget,NULL);
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon) show_hide((DragWidget)widget,icon,vis);
+}
+
+void DragSetIconColor(Widget widget, Icon icon, Pixel pix)
+{
+	icon = check_icon((DragWidget)widget,icon);
+
+	if(icon->hilitebackground == pix &&
+		icon->foreground == pix) return;
+
+	blink_icon((DragWidget)widget,NULL);
+	if(icon)
+	{
+		icon->hilitebackground = pix;
+		icon->foreground       = pix;
+		inval_icon((DragWidget)widget,icon);
+	}
+}
+
+
+void DragScanIcons(widget,cb,data)
+Widget widget;
+DragScanProc cb;
+XtPointer data;
+{
+	Icon p = ((DragWidget)widget)->drag.icons;
+	Icon pnext;
+	blink_icon((DragWidget)widget,NULL);
+	while(p)
+	{
+		pnext = p->next;
+		if(!(*cb)(widget,p,data))
+			return;
+		p = pnext;
+	}
+}
+
+static Boolean scan_folders(DragWidget w,DragScanProc cb,XtPointer data)
+{
+	Icon p = w->drag.icons;
+	Icon pnext;
+	int  i;
+
+	while(p)
+	{
+		pnext = p->next;
+		if(!(*cb)((Widget)w,p,data))
+			return False;
+		p = pnext;
+	}
+
+	for(i=0;i<w->drag.child_count;i++)
+		if(!scan_folders((DragWidget)w->drag.child_folders[i],cb,data))
+			return False;
+
+	return True;
+}
+
+void DragScanIconsFolders(Widget widget,DragScanProc cb,XtPointer data)
+{
+	DragWidget w = (DragWidget)widget;
+	blink_icon((DragWidget)widget,NULL);
+
+	while(w->drag.parent_folder)
+		w = (DragWidget)w->drag.parent_folder;
+
+	scan_folders(w,cb,data);
+}
+
+void DragDeleteAllIcons(widget)
+Widget widget;
+{
+	DragWidget w = (DragWidget)widget;
+	blink_icon((DragWidget)widget,NULL);
+	while(w->drag.icons)
+		remove_icon(w,w->drag.icons,w->drag.icons->next == NULL);
+}
+
+Pixmap DragGetIconPixmap(widget,icon)
+Widget widget;
+Icon icon;
+{
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon)
+	{
+		if(icon->pix[0] == NULL) make_pixmaps(widget,icon,0);
+		return icon->pix[0];
+	}
+	else
+		return XmUNSPECIFIED_PIXMAP;
+}
+
+void DragSortIcons(Widget widget, DragSortProc f)
+{
+	DragWidget drag = (DragWidget)widget;
+	int (*sort)() = (f) ? f : drag->drag.sort;
+	blink_icon((DragWidget)widget,NULL);
+
+	if(!sort) return;
+
+	sort_icons(drag,sort);
+	all_moved(drag,NULL);
+}
+
+
+void DragCleanUpIcons(widget)
+Widget widget;
+{
+	blink_icon((DragWidget)widget,NULL);
+	CleanUp((DragWidget)widget,NULL,NULL,0);
+}
+
+Boolean DragIsIconSelected(Widget widget, Icon icon)
+{
+	return icon->selected;
+}
+
+void DragDisplayIcon(Widget widget, Icon icon,int flags)
+{
+	DragWidget drag = (DragWidget)widget;
+	blink_icon((DragWidget)widget,NULL);
+	if(drag->drag.clip)
+	{
+
+		int n = drag->drag.small_icons;
+		Widget scroll = XtParent(drag->drag.clip);
+		Widget h_scroll,v_scroll;
+		Position    x_clip,y_clip;
+		Dimension   h_clip,w_clip;
+		Position    x_icon,y_icon;
+		Dimension   h_icon,w_icon;
+		Position x,y;
+		Position    dv=0,dh=0;
+		int min,max;
+		int v_val,v_size,v_inc,v_page;
+		int h_val,h_size,h_inc,h_page;
+
+
+		XtVaGetValues(scroll,
+		    XmNhorizontalScrollBar, &h_scroll ,
+		    XmNverticalScrollBar,   &v_scroll,NULL);
+
+		x_icon = icon->r_all[n].x;
+		y_icon = icon->r_all[n].y;
+		h_icon = icon->r_all[n].height;
+		w_icon = icon->r_all[n].width;
+
+		XtTranslateCoords(widget,x_icon,y_icon,&x_icon,&y_icon);
+		XtTranslateCoords(drag->drag.clip,0,0,&x_clip,&y_clip);
+
+		x = x_icon - x_clip;
+		y = y_icon - y_clip;
+
+		h_clip = drag->drag.clip->core.height;
+		w_clip = drag->drag.clip->core.width;
+
+		if( y < 0 || y + h_icon > h_clip)
+		{
+			dv = (y + h_icon / 2)  - h_clip / 2;
+
+			XtVaGetValues(v_scroll,XmNminimum,&min,XmNmaximum,&max,NULL);
+
+			XmScrollBarGetValues(v_scroll,&v_val,&v_size,&v_inc,&v_page);
+
+			max -= v_size;
+
+			if( dv + v_val > max )
+			   dv = max - v_val;
+			if( dv + v_val < min )
+			   dv = min - v_val;
+
+
+		}
+
+		if( x < 0 || x + w_icon > w_clip)
+		{
+			dh = (x + w_icon / 2)  - w_clip / 2;
+
+			XtVaGetValues(h_scroll,XmNminimum,&min,XmNmaximum,&max,NULL);
+
+			XmScrollBarGetValues(h_scroll,&h_val,&h_size,&h_inc,&h_page);
+
+			max -= h_size;
+
+			if( dh + h_val > max )
+			   dh = max - h_val;
+			if( dh + h_val < min )
+			   dh = min - h_val;
+
+		}
+
+
+		if(dv || dh)
+		{
+#if 0
+			XtVaGetValues((Widget)drag,XmNx,&x,XmNy,&y,NULL);
+			x -= dh;
+			y -= dv;
+			/*-- skip this move as it messes up with scroll bars (050421/vk) --*/
+			XtVaSetValues((Widget)drag,XmNx,x,XmNy,y,NULL);
+#endif
+
+			if(dv)
+				XmScrollBarSetValues(v_scroll, v_val+dv, 0, 0, 0, TRUE);
+			if(dh)
+				XmScrollBarSetValues(h_scroll, h_val+dh, 0, 0, 0, TRUE);
+
+		}
+	}
+
+	if((flags&DRAG_DISPLAY_ADD_TO_SELECTION) != 0)
+		DragSelectIcon((Widget)drag,icon,True,
+		    (flags&DRAG_DISPLAY_SELECT_UNIQUE) == 0);
+
+	if((flags&DRAG_DISPLAY_VISUAL_FEEDBACK) != 0)
+		blink_icon(drag,icon);
+}
+
+void DragSelectIcon(Widget widget, Icon icon, Boolean selected,Boolean expand)
+{
+	XAnyEvent event;
+	blink_icon((DragWidget)widget,NULL);
+
+	event.type        = 0;
+	event.serial      = 0;
+	event.send_event  = True;
+	event.display     = XtDisplay(widget);
+	event.window      = XtWindow(widget);
+
+	if(icon == DRAG_ALL_ICONS)
+	{
+		Icon p = ((DragWidget)widget)->drag.icons;
+		while(p)
+		{
+			if(p->selected != selected)
+				toggle_icon((DragWidget)widget,p,(XEvent*)&event);
+			p = p->next;
+		}
+	}
+	else
+	{
+		icon = check_icon((DragWidget)widget,icon);
+		if(icon)
+		{
+			if(selected && !expand)
+				select_icon((DragWidget)widget,icon,(XEvent*)&event,True);
+			else
+				if(icon->selected != selected)
+					toggle_icon((DragWidget)widget,icon,(XEvent*)&event);
+		}
+	}
+}
+
+XtPointer DragGetIconData(widget,icon)
+Widget widget;
+Icon icon;
+{
+	icon = check_icon((DragWidget)widget,icon);
+	return icon?icon->data:NULL;
+}
+
+void DragSetIconData(widget,icon,data)
+Widget widget;
+Icon icon;
+XtPointer data;
+{
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon) icon->data = data;
+}
+
+void DragOpenIcon(Widget widget, Icon icon, Boolean opened)
+{
+	blink_icon((DragWidget)widget,NULL);
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon)
+		if(icon->opened != opened)
+		{
+			icon->opened = opened;
+			inval_icon((DragWidget)widget,icon);
+		}
+}
+
+void DragSetFontTag(Widget widget,const char *tag)
+{
+	DragWidget drag = (DragWidget)widget;
+	if(strcmp(tag,drag->drag.tag) == 0) return;
+	XtFree(drag->drag.tag);
+	drag->drag.tag = XtNewString(tag);
+}
+
+void DragSetIconName(Widget widget,Icon icon,const char *newname)
+{
+	blink_icon((DragWidget)widget,NULL);
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon)
+	{
+		int n = ((DragWidget)widget)->drag.small_icons;
+		int x = icon->r_all[n].x;
+		int y = icon->r_all[n].y;
+		int w = icon->r_all[n].width;
+
+		printf("w = %d\n",w);
+
+		inval_icon((DragWidget)widget,icon);
+
+		XtFree(icon->name);
+		icon->name  = XtNewString(newname);
+
+		XmStringFree(icon->label);
+		icon->label = XmStringCreate((char*)newname,
+			((DragWidget)widget)->drag.tag);
+
+		compute_rects((DragWidget)widget,icon);
+
+
+		if(n == 0)
+		{
+			printf("x = %d w = %d w2 = %d\n",x,w,icon->r_all[n].width);
+			x = x - (icon->r_all[n].width - w)/2;
+			 printf("x2  = %d \n",x );
+		}
+		new_icon_xy(icon,x,y);
+
+		inval_icon((DragWidget)widget,icon);
+		/* place_icon((DragWidget)widget,icon,True); */
+		check_size((DragWidget)widget);
+
+	}
+}
+
+const char* DragGetIconName(Widget widget,Icon icon)
+{
+	icon = check_icon((DragWidget)widget,icon);
+	return (icon ? icon->name : NULL);
+}
+
+const char* DragGetIconClass(Widget widget,Icon icon)
+{
+	icon = check_icon((DragWidget)widget,icon);
+	return (icon ? icon->class : NULL);
+}
+
+Icon DragFindIconByPosition(Widget widget,Position x, Position y)
+{
+	XEvent ev;
+	Boolean label;
+
+	ev.xbutton.x = x;
+	ev.xbutton.y = y;
+
+	return find_icon((DragWidget)widget,&ev,&label);
+}
+
+void DragSetPositionIcon(Widget widget, Icon icon, Position x, Position y)
+{
+	icon = check_icon((DragWidget)widget,icon);
+	if(icon) move_icon((DragWidget)widget,icon,x,y,-1,-1);
+}
+
+void DragFindPositionIcon(Widget widget, Icon icon, Position* x, Position* y)
+{
+	DragWidget drag = (DragWidget)widget;
+	int n = drag->drag.small_icons;
+	Position x1, x2;
+	Position y1, y2;
+
+	x1 = (Position) (icon->r_label[n].x + icon->r_label[n].width)/2;
+	x2 = (Position) (icon->r_icon[n].x + icon->r_icon[n].width)/2;
+
+	*x = (x1<x2) ? x1 : x2;
+
+	y1 = (Position) (icon->r_label[n].y + icon->r_label[n].height)/2;
+	y2 = (Position) (icon->r_icon[n].y + icon->r_icon[n].height)/2;
+
+	*y = (y1<y2) ? y1 : y2;
+
+	*x = (Position) icon->r_all[n].x;
+	*y = (Position) icon->r_all[n].y;
+
+}
+
+/*-------------------------------------------------------------------
+
+ Add the drop facility to other widgets
+
+------------------------------------------------------------------*/
+
+typedef	struct {
+	Widget          widget;
+	XtCallbackProc  callback;
+	XtPointer		closure;
+} accept_drop;
+
+
+static void set_drop_property(Widget widget,XtCallbackProc callback,
+XtPointer closure,Widget subwidget)
+{
+	accept_drop *info;
+
+	if(!XtIsWidget(widget))
+	{
+		XtAppWarningMsg(XtWidgetToApplicationContext(widget),
+		    "invalidWidget","invalidWidget","DragError",
+		    "DragAcceptDropCallback : Not a widget",
+		    (String *)NULL, (Cardinal *)NULL);
+
+		return;
+	}
+
+	if(!subwidget) subwidget = widget;
+
+	info            = XtNew(accept_drop);
+	info->callback  = callback;
+	info->closure   = closure;
+	info->widget    = subwidget;
+
+	XtAddEventHandler((Widget)widget,
+	    NoEventMask,
+	    True,
+	    message_event_handler,
+	    (XtPointer)info);
+
+	XtAddCallback(widget,XtNdestroyCallback,destroy_callback,
+	    (XtPointer)info);
+
+	if(XtIsRealized(widget))
+		register_widget(widget,XtName(subwidget));
+	else
+		XtAddEventHandler(widget,
+		    VisibilityChangeMask,True,(XtEventHandler)map_event_handler_1,
+		    (XtPointer)info);
+
+}
+
+typedef struct relay {
+	Widget widget;
+} relay;
+
+void DragAcceptDropCallback(widget,callback,closure)
+Widget          widget;
+XtCallbackProc  callback;
+XtPointer       closure;
+{
+	Widget clip,scroll;
+	set_drop_property(widget,callback,closure,widget);
+	if(clip = XtParent(widget))
+		if(scroll = XtParent(clip))
+			if(XmIsScrolledWindow(scroll))
+				set_drop_property(clip,callback,closure,widget);
+}
+
+void DragSetInfo(Widget widget,const char *info)
+{
+	Widget clip,scroll;
+	create_atoms(XtDisplay(widget));
+
+	if(!XtIsRealized(widget))
+		XtAddEventHandler(widget,
+		    VisibilityChangeMask,True,(XtEventHandler)map_event_handler_2,
+		    (XtPointer)XtNewString(info));
+	else
+		XChangeProperty(
+		    XtDisplay(widget),
+		    XtWindow(widget),
+		    InfoAtom,
+		    XA_WINDOW,
+		    8,
+		    PropModeReplace,
+		    (unsigned char *)info,
+		    strlen(info)+1);
+
+	/* Copy to scrolled window .. */
+	if(clip = XtParent(widget))
+		if(scroll = XtParent(clip))
+			if(XmIsScrolledWindow(scroll))
+				DragSetInfo(clip,info);
+}
+
+const char *DragGetInfo(DragCallbackStruct *cb)
+{
+	Atom type;
+	int format;
+	unsigned long nitems, left;
+	static char *retdata = NULL;
+
+	if(retdata) {
+		XtFree(retdata);
+		retdata = NULL;
+	}
+
+	if(cb->remote_window == NULL)
+		return NULL;
+
+	if(XGetWindowProperty(
+	    cb->event->xany.display,
+	    cb->remote_window,
+	    InfoAtom,0,4,
+	    False,XA_WINDOW,
+	    &type, &format, &nitems,&left,
+	    (unsigned char**) &retdata) == Success)
+		if(type == XA_WINDOW)
+			return retdata;
+
+	return NULL;
+}
+
+static void map_event_handler_1(widget,info,event,continue_dispatch)
+Widget widget;
+accept_drop *info;
+XEvent    *event;
+Boolean   *continue_dispatch;
+{
+
+	if(XtIsRealized(widget))
+		register_widget(widget,XtName(info->widget));
+	else
+		XtAppWarningMsg(XtWidgetToApplicationContext(widget),
+		    "invalidWidget","invalidWidget","DragError",
+		    "DragAcceptDropCallback : Widget cannot be registered (not realized)",
+		    (String *)NULL, (Cardinal *)NULL);
+
+	XtRemoveEventHandler(widget,
+	    VisibilityChangeMask,True,(XtEventHandler)map_event_handler_1,
+	    (XtPointer)info);
+
+}
+
+static void map_event_handler_2(widget,info,event,continue_dispatch)
+Widget    widget;
+char      *info;
+XEvent    *event;
+Boolean   *continue_dispatch;
+{
+
+	if(XtIsRealized(widget))
+		DragSetInfo(widget,info);
+	else
+		XtAppWarningMsg(XtWidgetToApplicationContext(widget),
+		    "invalidWidget","invalidWidget","DragError",
+		    "DragAddInfo : Widget cannot be registered (not realized)",
+		    (String *)NULL, (Cardinal *)NULL);
+
+	XtRemoveEventHandler(widget,
+	    VisibilityChangeMask,True,(XtEventHandler)map_event_handler_2,
+	    (XtPointer)info);
+
+	XtFree((XtPointer)info);
+}
+
+/*----------------------------------------------------------------------
+
+ The other widget is destroyed
+
+----------------------------------------------------------------------*/
+
+static void destroy_callback(widget,info,cb)
+Widget widget;
+accept_drop *info;
+XtPointer cb;
+{
+	XtRemoveEventHandler((Widget)widget,NoEventMask,True,
+	    message_event_handler,(XtPointer)info);
+	XtFree((XtPointer)info);
+}
+
+/*----------------------------------------------------------------------
+
+ Notify other widgets
+
+----------------------------------------------------------------------*/
+
+static void notify_drop(Widget widget,XtPointer cd,XtPointer cb)
+{
+	accept_drop *info = (accept_drop*)cd;
+	(*info->callback)(info->widget,info->closure,cb);
+}
+
+void DragDropSend(Widget widget,DragCallbackStruct *cb)
+{
+	send_drop_events((DragWidget)widget,cb);
+}
+
+/*-------------------------------------------------------------------
+
+ Add the drag facility of any objects
+
+------------------------------------------------------------------*/
+
+DragCallbackStruct* DragDropObject(Widget widget,
+XEvent   *ev,
+Position  x,    Position  y,
+Dimension width,Dimension height,
+DragDrawProc draw,
+XtPointer data)
+{
+	static  DragCallbackStruct cb;
+	static  char     *name = NULL;
+
+	Display *dpy   = XtDisplay(widget);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+	Pixmap  pix,mask;
+	GC      gc;
+	int     dummy;
+	XRectangle rect;
+	Window drag,target,other;
+	int wx,wy;
+
+	create_atoms(dpy); /* the atoms should exist */
+
+	rect.x      = 0;
+	rect.y      = 0;
+	rect.width  = width;
+	rect.height = height;
+
+	pix = XCreatePixmap(dpy,root,width,height,DefaultDepth(dpy,screen));
+
+	gc = XCreateGC(dpy,pix,0,NULL);
+
+	XSetForeground(dpy,gc, WhitePixel(dpy,screen));
+	XSetBackground(dpy,gc, BlackPixel(dpy,screen));
+
+	XFillRectangle(dpy,pix,gc,0,0,width,height);
+
+	XSetForeground(dpy,gc, BlackPixel(dpy,screen));
+	XSetBackground(dpy,gc, WhitePixel(dpy,screen));
+
+
+	(*draw)(widget,&rect,pix,gc,data);
+
+	mask = mask_image(widget,pix,NULL,
+	    WhitePixel(dpy,screen),&dummy,&dummy);
+
+
+	drag = create_drag_window(widget,ev,pix,
+	    x,y,width,height);
+
+	XWriteBitmapFile(dpy,"bm",mask,
+	    width,height,0,0);
+
+	XShapeCombineMask(dpy,drag,ShapeBounding,0,0,mask,ShapeSet);
+
+	target  = drag_window(widget,drag,x,y,&wx,&wy,&other);
+
+	XFreePixmap(dpy,mask);
+	XFreePixmap(dpy,pix);
+	XFreeGC(dpy,gc);
+	XUndefineCursor(dpy,XtWindow(widget));
+
+	if(check_valid_drop(widget,dpy,target,&name))
+	{
+		memset(&cb,0,sizeof(cb));
+		cb.reason        = DRAG_SEND;
+		cb.event         = ev;
+		cb.same_window   = (target == XtWindow(widget));
+		cb.remote_window = target;
+		cb.remote_name   = name;
+		cb.remote_widget = XtWindowToWidget(dpy,target);
+		cb.x             = wx - x ;
+		cb.y             = wy - y ;
+		cb.icon_no       = 1;
+		cb.icon_count    = 1;
+		cb.icon_batch    = ++icon_batch;
+
+		return &cb;
+	}
+	return NULL;
+}
diff --git a/src/libMvMotif/Drag.h b/src/libMvMotif/Drag.h
new file mode 100644
index 0000000..edc70ba
--- /dev/null
+++ b/src/libMvMotif/Drag.h
@@ -0,0 +1,317 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef DRAG_H
+#define DRAG_H
+
+extern WidgetClass  dragWidgetClass;
+
+typedef struct _IconRec		 *Icon;
+typedef struct _DragClassRec *DragWidgetClass;
+typedef struct _DragRec      *DragWidget;
+
+
+#define XmNiconLargeBitmap     "iconLargeBitmap"
+#define XmNiconLargeOpenedBitmap     "iconLargeOpenedBitmap"
+#define XmNiconLargeMask       "iconLargeMask"
+#define XmNiconSmallBitmap     "iconSmallBitmap"
+#define XmNiconSmallOpenedBitmap     "iconSmallOpenedBitmap"
+#define XmNiconSmallMask       "iconSmallMask"
+
+#define XmNisFolder       	   "isFolder"
+#define XmCIsFolder       	   "IsFolder"
+
+#define XmCParentFolder       	   "ParentFolder"
+#define XmNparentFolder       	   "parentFolder"
+
+
+
+#define XmNiconForeground "iconForeground"
+#define XmNiconBackground "iconBackground"
+#define XmNiconHiliteForeground 	  "iconHiliteForeground"
+#define XmNiconHiliteBackground 	  "iconHiliteBackground"
+#define XmCIconHiliteForeground 	  "IconHiliteForeground"
+#define XmCIconHiliteBackground 	  "IconHiliteBackground"
+
+#define XmCIconSmallBitmap     "IconSmallBitmap"
+#define XmCIconSmallOpenedBitmap     "IconSmallOpenedBitmap"
+#define XmCIconSmallMask       "IconSmallMask"
+#define XmCIconLargeBitmap     "IconLargeBitmap"
+#define XmCIconLargeOpenedBitmap     "IconLargeOpenedBitmap"
+#define XmCIconLargeMask       "IconLargeMask"
+
+#define XmNgrid           "grid"
+#define XtNgrid           "grid"
+#define XmCgrid           "Grid"
+
+#define XmNautoFolderMove       "autoFolderMove"
+#define XtNautoFolderMove       "autoFolderMove"
+#define XmNautoMove       "autoMove"
+#define XtNautoMove       "autoMove"
+#define XmNautoPlace      "autoPlace"
+#define XtNautoPlace      "autoPlace"
+#define XmNautoSort       "autoSort"
+#define XmNautoClean      "autoClean"
+#define XtBautoClean      "autoClean"
+#define XmCAuto           "Auto"
+
+
+#define XmNeditNames      "editNames"
+#define XmCEditNames      "EditNames"
+
+#define XmNeditTimeout      "editTimeout"
+#define XmCEditTimeout      "EditTimeout"
+
+#define XmNselectIcons    "selectIcons"
+#define XmCSelectIcons    "SelectIcons"
+
+#define XmNsingleLine     "singleLine"
+#define XmCSingleLine     "SingleLine"
+
+#define XmNacceptKeys      "acceptKeys"
+#define XmCAcceptKeys      "AcceptKeys"
+
+#define XmNkeyThreshold    "keyThreshold"
+#define XmCThreshold       "Threshold"
+
+#define XmNsmallIcons      "smallIcons"
+#define XmCsmallIcons      "SmallIcons"
+
+#define XmNshapeMode       "shapeMode"
+#define XmCshapeMode       "ShapeMode"
+
+#define XmNsendmsgCallback      "sendmsgCallback"
+#define XmNdropCallback         "dropCallback"
+#define XmNanswerCallback       "answerCallback"
+#define XmNmoveCallback         "moveCallback"
+#define XmNkillIconCallback     "killIconCallback"
+#define XmNselectCallback       "selectCallback"
+#define XmNdblClickCallback     "dblClickCallback"
+#define XmNotherDropCallback    "otherDropCallback"
+#define XmNfolderMoveCallback   "folderMoveCallback"
+#define XmNfolderMoveCallback   "folderMoveCallback"
+
+#define XmNrenameCallback      "renameCallback"
+#define XmNrenamableCallback   "renamableCallback"
+
+#define XmNgetFullNameCallback   "getFullNameCallback"
+
+#define XmNflyOverCallback   "flyOverCallback"
+
+
+#define XmRsortProc			   "sortProc"
+#define XmNsortProc			   "sortProc"
+#define XmCSortProc			   "SortProc"
+
+
+/* For xdesigner */
+
+#define XtNdblClickCallback    XmNdblClickCallback
+#define XtNanswerCallback      XmNanswerCallback
+#define XtNsendmsgCallback     XmNsendmsgCallback
+#define XtNdropCallback        XmNdropCallback
+#define XtNselectCallback      XmNselectCallback
+#define XtNkillIconCallback    XmNkillIconCallback
+
+/* Reason codes */
+
+#define DRAG_SEND        1
+#define DRAG_DROP        2
+#define DRAG_ANSWER      3
+#define DRAG_MOVE        4
+#define DRAG_KILL        5
+#define DRAG_SELECT      6
+#define DRAG_DBL_CLICK   7
+#define DRAG_OTHER_DROP  8
+#define DRAG_FOLDER_MOVE 9
+#define DRAG_RENAME      10
+#define DRAG_RENAMABLE   11
+#define DRAG_FLY_OVER    12
+
+/* return codes */
+
+#define DROP_OK         0
+#define DROP_REFUSED    1
+#define DROP_ABORTED    2
+
+/* Shape modes */
+
+#define NO_SHAPE        0
+#define RECT_SHAPE1     1
+#define RECT_SHAPE2     2
+#define FULL_SHAPE      3
+
+/* Used in DragDisplayIcon */
+
+#define DRAG_DISPLAY_NO_EFFECT			0
+#define DRAG_DISPLAY_ADD_TO_SELECTION	1 /* The icon is selected as well */
+#define DRAG_DISPLAY_SELECT_UNIQUE		2 /* other icons are unselected first */
+#define DRAG_DISPLAY_VISUAL_FEEDBACK	4 /* Add some visual feedback */
+
+
+/* Used in DragSelectIcon */
+
+#define DRAG_ALL_ICONS 		(Icon)(-1)
+
+/* Callback stuff */
+
+typedef struct {
+
+    int         reason;         /* what call back */
+    XEvent      *event;         /* event that initiated the drag/drop */
+
+    /* Stuff valid for all callback */
+
+    const char*      icon_class;     /* icon class */
+    const char*      icon_name;      /* icon name */
+
+    char      icon_fullName[300];      /* icon full name */
+
+    XtPointer   icon_data;      /* icon data */
+
+	Icon		icon;			/* pointer on icon */
+
+    /* Stuff for drag and drop */
+
+    Boolean     same_window;    /* if drag drop to same window */
+
+    Window      remote_window;    /* ID of target/source window */
+    const char*      remote_name;      /* Name of target/source widget */
+	Widget      remote_widget;    /* remove widget                */
+	Boolean     same_folder_tree; /* The widgets are in the same folder tree */ 
+
+
+    XtPointer   message;        /* What to send / What was recieved */
+    long        msg_length;     /* length of buffer */
+
+    /* Drop only */
+    Boolean     accept_it;      /* true is the message is accepted */
+
+    /* Drag only */
+    Boolean     send_it;        /* true is the message is to be sent */
+    Boolean     delete_it;      /* true if icon must be removed */
+	int         icon_no;        /* multi drops: icon number     */
+	int         icon_count;     /* multi drops: icon count      */
+	int         icon_batch;     /* drop id                      */
+
+    /* Answer callback */
+    int         code;           /* return code */
+
+
+    /* Move & Drop */
+	Boolean     move_it;
+    int         x,y;            /* where it was dropped */
+    Boolean     copy;
+
+    /* Select only */
+    Boolean     selected;
+
+    /* In label */
+    Boolean     in_label;  /* Select in label*/
+
+    /* Rename */
+
+    const char* new_name;
+	Boolean rename_it;
+
+
+} DragCallbackStruct;
+
+
+
+
+/* Public routines */
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+typedef Boolean (*DragScanProc)(Widget,Icon,XtPointer);
+typedef int (*DragSortProc)(Widget,Icon,Icon);
+
+
+Widget 	CreateDragWidget(Widget parent, const char *name, ArgList al, int ac);
+Icon   	DragAddIcon(Widget widget, const char* classe, const char* name, 
+			XtPointer data, int x, int y);
+Widget 	DragIconToWidget(Icon icon);
+
+Icon 	DragFindIconByData(Widget widget, XtPointer data);
+Icon 	DragFindIconByName(Widget widget, const char* classe, const char* name);
+Icon 	DragFindIconByNameFolders(Widget widget, const char* classe, const char* name);
+
+void 	DragDisplayIcon(Widget widget, Icon icon, int flags);
+void 	DragDeleteIcon(Widget widget, Icon icon);
+void 	DragShowIcon(Widget widget, Icon icon, Boolean vis);
+void 	DragSetIconColor(Widget widget, Icon icon, Pixel pix);
+
+void 	DragScanIcons(Widget widget, DragScanProc cb, XtPointer data);
+void 	DragScanIconsFolders(Widget widget, DragScanProc cb, XtPointer data);
+
+void 	DragDeleteAllIcons(Widget widget);
+Pixmap 	DragGetIconPixmap(Widget widget, Icon icon);
+Boolean DragAreSmallIconsUsed(Widget widget);
+void    DragUseSmallIcons(Widget widget, Boolean);
+void    DragToggleSizeIcons(Widget);
+void 	DragSortIcons(Widget widget, DragSortProc sort);
+int 	DragSortByName(Widget widget, Icon, Icon);
+int 	DragSortByClass(Widget widget, Icon, Icon);
+void 	DragCleanUpIcons(Widget widget);
+Boolean DragIsIconSelected(Widget widget, Icon icon);
+void 	DragSelectIcon(Widget widget, Icon icon, Boolean selected,
+					Boolean expand);
+void 	DragShowLast(Widget widget);
+XtPointer DragGetIconData(Widget widget, Icon icon);
+void 	DragSetIconData(Widget widget, Icon icon, XtPointer data);
+void 	DragOpenIcon(Widget widget, Icon icon, Boolean opened);
+void 	DragSetIconName(Widget widget, Icon icon, const char *newname);
+const char*	DragGetIconName(Widget widget, Icon icon);
+const char*	DragGetIconClass(Widget widget, Icon icon);
+Icon 	DragFindIconByPosition(Widget widget, Position x, Position y);
+void 	DragSetPositionIcon(Widget widget, Icon icon,  Position x, Position y);
+void 	DragFindPositionIcon(Widget widget, Icon icon, 
+		Position *x, Position *y);
+void 	DragAcceptDropCallback(Widget widget, XtCallbackProc callback, 
+		XtPointer closure);
+void 	DragAddIconPixmap(Widget widget, Icon icon,const char* name, int dx,int dy);
+void    DragEditName(Widget widget, Icon icon);
+
+void    DragBlinkIcon(Widget widget, Icon icon);
+
+Pixmap DragGetPixmap(Widget widget,const char* name);
+Pixmap MakeHalfPixmap(Widget widget, Pixmap pixmap);
+Pixmap MakeOpenPixmap(Widget widget, Pixmap pixmap);
+Pixmap MakeDisabledPixmap(Widget widget,Pixmap pixmap);
+Pixmap MakeMaskBitmap(Widget widget, Pixmap pixmap, Pixel white);
+Pixmap OverlayPixmaps(Widget widget,Pixmap lower,Pixmap upper,int dx,int dy);
+Pixmap CopyBackground(Widget widget,Pixmap pixmap);
+
+
+
+void DragSetFontTag(Widget widget, const char *tag);/* tag or XmFONTLIST_DEFAULT_TAG */
+
+void DragSetInfo(Widget widget, const char *info);
+const char *DragGetInfo(DragCallbackStruct *cb);
+
+/* Dropping objects */
+
+typedef void (*DragDrawProc)(Widget,XRectangle*,Pixmap,GC,XtPointer);
+
+DragCallbackStruct *DragDropObject(Widget widget, XEvent *ev, 
+	Position x, Position y, Dimension width, Dimension height, 
+	DragDrawProc draw, XtPointer data);
+void DragDropSend(Widget widget,DragCallbackStruct*);
+
+#undef P_
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+ 
+#define XtIsDrag(w)	XtIsSubclass(w,dragWidgetClass)
+
+#endif /* DRAG_H */
diff --git a/src/libMvMotif/DragP.h b/src/libMvMotif/DragP.h
new file mode 100644
index 0000000..6f7d81a
--- /dev/null
+++ b/src/libMvMotif/DragP.h
@@ -0,0 +1,180 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef DRAGP_H
+#define DRAGP_H
+
+#include        <Xm/DrawingAP.h>
+
+typedef struct _IconRec {
+    struct _IconRec *next;
+
+	Widget      parent;
+
+    XmString    label;
+    String      class;
+    String      name;
+
+	/* Icons */
+
+    XRectangle  r_all[2];
+    XRectangle  r_icon[2];
+    XRectangle  r_label[2];
+
+    Pixmap      pix[2];
+    Pixmap      selpix[2];
+    Pixmap      mask[2];
+    Pixmap      open_pix[2];
+
+    String      mask_name[2];
+    String      pix_name[2];
+    String      open_name[2];
+
+
+    Pixel       foreground;
+    Pixel       background;
+    Pixel       hiliteforeground;
+    Pixel       hilitebackground;
+
+    Boolean     selected;
+    Boolean     visible;
+    Boolean     delete;
+    Boolean     opened;
+
+    Boolean     isfolder;
+	int         id;
+
+    XtPointer   data;
+
+} _IconRec;
+
+typedef struct _DragClassPart {
+    XtProc      print;
+} DragClassPart;
+
+typedef struct _DragClassRec {
+    CoreClassPart           core_class;
+    CompositeClassPart      composite_class;
+    ConstraintClassPart     constraint_class;
+    XmManagerClassPart      manager_class;
+    XmDrawingAreaClassPart  drawing_area_class;
+    DragClassPart           drag_class;
+} DragClassRec;
+
+extern DragClassRec dragClassRec;
+
+typedef struct {
+    Icon      icons;
+    Icon      last;
+
+    /* Boolean         moving; */
+
+    XtCallbackList  build_message;
+    XtCallbackList  drop_message;
+    XtCallbackList  answer;
+    XtCallbackList  moveicon;
+    XtCallbackList  killicon;
+    XtCallbackList  select;
+    XtCallbackList  dblclick;
+    XtCallbackList  other_drop;
+    XtCallbackList  folder_move;
+    XtCallbackList  rename;
+    XtCallbackList  renamable;
+    XtCallbackList  fly_over;
+    XtCallbackList  getFullName;
+
+    XmFontList      fontlist;
+	char            *tag; /* font tag */
+    int             string_height;
+
+    GC              gc;
+    GC              selgc;
+
+    XRectangle      r_select;
+    Boolean         selecting;
+    Boolean         selextend;
+    Boolean         justclick;
+    int             lastx;
+    int             lasty;
+    int             startx;
+    int             starty;
+
+	Boolean         copy;
+
+    XEvent          event;
+    String          target;
+
+	Time            last_click;
+
+	Boolean			accept_keys;
+	Time            key_threshold;
+	Boolean			can_resize;
+    Boolean         grid;
+    int             gridx;
+    int             gridy;
+
+    int             marginx;
+    int             marginy;
+
+    int             shape_mode;
+
+	int				(*sort)();
+
+    Boolean         edit_names;
+    Boolean         auto_move;
+    Boolean         auto_clean;
+    Boolean         auto_sort;
+    Boolean         auto_place;
+    Boolean         small_icons;
+	Boolean			multi_drops;
+	Boolean			can_select;
+	Boolean			single_line;
+	Boolean			auto_folder_move;
+
+	Widget			clip;
+
+	Widget			parent_folder;
+	int             child_count;
+	int             child_max;
+	WidgetList		child_folders;
+
+	Icon			last_added;
+	Icon			blink_icon;
+	Icon			edit_icon;
+	Boolean         blink_state;
+	XtIntervalId    blink_timeout;
+
+	int             edit_timeout;
+	Widget          edit_text;
+
+} DragPart;
+
+
+typedef struct _DragRec {
+    CorePart            core;
+    CompositePart       composite;
+    ConstraintPart      constraint;
+    XmManagerPart       manager;
+    XmDrawingAreaPart   drawing_area;
+    DragPart            drag;
+}  DragRec;
+
+
+
+#ifndef MIN
+#define MIN(a,b) ((a)>(b)?(b):(a))
+#endif
+#ifndef MAX
+#define MAX(a,b) ((a)<(b)?(b):(a))
+#endif
+
+#endif /* DRAGP_H */
+
+
+
diff --git a/src/libMvMotif/Hyper.h b/src/libMvMotif/Hyper.h
new file mode 100644
index 0000000..fa8f36a
--- /dev/null
+++ b/src/libMvMotif/Hyper.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*==================================================================*/
+/*                                                                  */
+/* HyperWidget                                                      */
+/*                                                                  */
+/* B.Raoult (mab at ecmwf.co.uk)                              Oct.91   */
+/*                                                                  */
+/* Hyper text like widget.                                          */
+/*                                                                  */
+/*==================================================================*/
+
+#ifndef  HYPER_H
+#define  HYPER_H
+
+/* 
+    If you define MOTIF, the widget will inherit proprieties 
+   from the XmPrimitive class : Help Callback, user data, ...
+*/
+
+#ifndef MOTIF
+#define MOTIF
+#endif
+
+/*
+   If your machine got regexp.h
+*/
+
+
+extern WidgetClass hyperWidgetClass;
+typedef struct _HyperClassRec * HyperWidgetClass;
+typedef struct _HyperRec      * HyperWidget;
+
+/*
+ * Define resource strings for the Hyper widget.
+ */
+
+#define XtNhighlightFont     "highlightFont"
+#define XtNnormalFont        "normalFont"
+#define XtNhighlightColor    "highlightColor"
+#define XtNselectColor       "selectColor"
+#define XtNnormalColor       "normalColor"
+#define XtNactivateCallback  "activateCallback"
+#define XtNzoomEffect        "zoomEffect"
+#define XtCZoom              "Zoom"
+#define XtNstartHighlight    "startHighlight"
+#define XtNendHighlight      "endHighlight"
+#define XtCTagChar           "TagChar"
+#define XtNzoomSpeed         "zoomSpeed"
+#define XtCZoomSpeed         "ZoomSpeed"
+#ifndef XtCMargin
+#define XtCMargin            "Margin"
+#endif
+#define XtNmargin            "margin"
+
+/*
+  Callback structure
+*/
+
+#define HYPER_REASON 1
+
+typedef struct {
+    int     reason;   /* always = HYPER_REASON                            */
+    XEvent *event;    /* event                                            */
+    char     *text;     /* pointer on highlighted text selected (read only) */
+    int  length;    /* length of selected text                          */
+}  hyperCallbackStruct;
+
+#ifdef _NO_PROTO
+
+extern Widget CreateHyper();
+extern void HyperLoadFile();
+extern void HyperSetText();
+extern void HyperSetTags();
+extern Boolean HyperFind();
+extern char    *HyperGetText();
+
+#else
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+    extern Widget CreateHyper(Widget parent,
+        char *name,
+        ArgList al,
+        int ac);
+
+    extern void HyperLoadFile(Widget widget,
+        char *fname);
+
+    extern void HyperSetText(Widget widget,
+        char *text);
+
+    extern void HyperSetTags (Widget widget,
+        unsigned char start_highlight,
+        unsigned char end_highlight);
+
+    Boolean HyperGrep(Widget  widget,
+        char    *word,
+        Boolean ignore_case,
+        Boolean from_start,
+        Boolean wrap);
+
+        char *HyperGetText(Widget widget,Boolean include_tags);
+
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _NO_PROTO */
+
+#define XtIsHyper(w)     XtIsSubclass(w,hyperWidgetClass)
+
+#endif /* HYPER_H */
diff --git a/src/libMvMotif/HyperP.h b/src/libMvMotif/HyperP.h
new file mode 100644
index 0000000..0e6e8f8
--- /dev/null
+++ b/src/libMvMotif/HyperP.h
@@ -0,0 +1,115 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*==================================================================*/
+/*                                                                  */
+/* HyperWidget                                                      */
+/*                                                                  */
+/* B.Raoult (mab at ecmwf.co.uk)                              Oct.91   */
+/*                                                                  */
+/* Hyper text like widget.                                          */
+/*                                                                  */
+/*==================================================================*/
+
+#ifndef HYPERP_H
+#define HYPERP_H
+
+#ifdef MOTIF
+#include <Xm/XmP.h>
+#if (XmVersion >= 1002)
+#include <Xm/PrimitiveP.h>
+#endif
+#endif
+
+/* Hyper class : no new fileds */
+
+typedef struct _HyperClassPart{
+    int ignore;
+} HyperClassPart;
+
+typedef struct _HyperClassRec{
+    CoreClassPart    core_class;
+#ifdef MOTIF
+    XmPrimitiveClassPart  primitive_class;
+#endif
+    HyperClassPart  hyper_class;
+} HyperClassRec;
+
+extern HyperClassRec hyperClassRec;
+
+/* Text segment */
+
+typedef struct text_segment {
+
+    struct text_segment *next; /* Next segment */
+    int          type;         /* NEWLINE, NORMAL or HIGHLIGHT */
+    char         *text;        /* pointer to text */
+    int          length;       /* length of text */
+    int          desc;         /* font descent */
+    GC           gc;           /* GC used to draw text */
+    Position     x,y;          /* Position of drawn text */
+    Dimension    width,height; /* Size of drawn text */
+	int			 offset;       /* KELD : offset from start of widget */
+
+} text_segment;
+
+typedef struct _HyperPart {
+
+    Cursor    hand;               /* Selecting cursor shape */
+
+    Pixel     normal_color;       /* Color of the normal text */
+    Pixel     highlight_color;    /* Color of the highlighted text */
+    Pixel     select_color;       /* Color of the selected text */
+
+    XFontStruct  *normal_font;    /* Font of the normal text */
+    XFontStruct  *highlight_font; /* Font of the highlighted text */
+
+    GC        normal_gc;          /* Gc for the normal text */
+    GC        highlight_gc;       /* Gc for the highlighted text */
+
+    GC        xor_gc;             /* Gc for zoom  */
+    GC        select_gc;          /* Gc for select */
+
+    Boolean  zoom;               /* zoom effect when selected */
+    int      speed;              /* zoom speed                */
+    char         start_of_highlight; /* start of highlighted text mark */
+    char         end_of_highlight;   /* end of highlighted text mark */
+
+    int      margin;             /* margins size */
+
+
+    text_segment         *grep_seg;  /* segment where found text is */
+
+    char                 *grep_txt;  /* pointer to found text */
+    int              grep_len;   /* length of found text */
+    int              grep_off;   /* offset of found text */
+
+    Position          grep_x;    /* rectangle of founf text*/
+    Position          grep_y;
+    Dimension        grep_width;
+    Dimension        grep_height;
+
+    text_segment        *first_seg;     /* the text segments         */
+    text_segment        *last_selected; /* last selected segment     */
+    text_segment        *last_cursor;   /* last under cursor segment */
+
+
+    XtCallbackList activate;         /* callback list             */
+
+} HyperPart;
+
+typedef struct _HyperRec {
+    CorePart          core;
+#ifdef MOTIF
+    XmPrimitivePart  primitive;
+#endif
+    HyperPart        hyper;
+} HyperRec;
+
+#endif /* HYPERP_H */
diff --git a/src/libMvMotif/IconWidget.h b/src/libMvMotif/IconWidget.h
new file mode 100644
index 0000000..bc3b659
--- /dev/null
+++ b/src/libMvMotif/IconWidget.h
@@ -0,0 +1,53 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*
+ * Copyright 1991 Addison-Wesley Publishing Company
+ *                (see the file "COPYRIGHTS" for details)
+ */
+
+#ifndef _IconWidget_h
+#define _IconWidget_h
+
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes 0
+#endif
+
+#include <Xm/Xm.h>
+
+#define XmNiconOffset     "iconOffset"
+#define XmCIconOffset     "IconOffset"
+
+extern WidgetClass iconWidgetClass;
+
+typedef struct _IconWidgetClassRec * IconWidgetClass;
+typedef struct _IconWidgetRec      * IconWidget;
+
+Widget CreateIconLabel (
+#if NeedFunctionPrototypes
+    Widget       /* parent   */,
+    char*        /* name     */,
+    ArgList      /* arglist  */,
+    Cardinal     /* argcount */,
+    char*        /* pixmap   */
+#endif
+);
+
+Widget CreateIconButton (
+#if NeedFunctionPrototypes
+    Widget       /* parent   */,
+    char*        /* name     */,
+    ArgList      /* arglist  */,
+    Cardinal     /* argcount */,
+    char*        /* pixmap   */
+#endif
+);
+
+#endif /* _IconWidget_h */
+/* DON'T ADD ANYTHING AFTER THIS #endif */
diff --git a/src/libMvMotif/LED.c b/src/libMvMotif/LED.c
new file mode 100644
index 0000000..5327d8b
--- /dev/null
+++ b/src/libMvMotif/LED.c
@@ -0,0 +1,330 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <X11/IntrinsicP.h>
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <X11/CoreP.h>
+#include <X11/cursorfont.h>
+#include "LED.h"
+#include "LEDP.h"
+#include <Xm/ManagerP.h>
+
+
+#ifndef ABS
+#define ABS(a)           ((a)>=0?(a):-(a))
+#endif
+#ifndef MIN
+#define MIN(a,b)         ((a)>(b)?(b):(a))
+#endif
+
+static void    create_gcs();
+static void    calc_new_size();
+
+static void draw(LEDWidget w);
+/*
+  Widget class methods
+*/
+
+static void    Initialize();
+static void    Redisplay();
+static void    Resize();
+static void    Destroy();
+static void    Activate();
+static Boolean SetValues();
+
+static void time_out(LEDWidget w,XtIntervalId id);
+
+static XtResource resources[] = {
+     {"color1", "Color1", XtRPixel, sizeof (Pixel),
+    XtOffset(LEDWidget, led.color1), XtRString,"yellow"},
+
+	     {"color2", "Color2", XtRPixel, sizeof (Pixel),
+    XtOffset(LEDWidget, led.color2), XtRString,"white"},
+
+	     {"color3", "Color3", XtRPixel, sizeof (Pixel),
+    XtOffset(LEDWidget, led.color3), XtRString,"#404040404040"},
+
+	{"blinkRate", "BlinkRate", XtRInt, sizeof (int),
+	XtOffset(LEDWidget, led.timeout), XtRImmediate,(XtPointer)500},
+
+};
+
+/*---------------------------------------------------------------*/
+/* Static initialisation of the class record                     */
+/*---------------------------------------------------------------*/
+
+LEDClassRec  ledClassRec = {
+	{
+	(WidgetClass) &xmPrimitiveClassRec,  /* superclass            */
+	"LED",                            /* class_name            */
+	sizeof(LEDRec),                   /* widget_size           */
+	NULL,                                /* class_initialize      */
+	NULL,                                /* class_part_initialize */
+	FALSE,                               /* class_inited          */
+	Initialize,                          /* initialize            */
+	NULL,                                /* initialize_hook       */
+	XtInheritRealize,                    /* realize               */
+	NULL,                                /* actions               */
+	0,                                   /* num_actions           */
+	resources,                           /* resources             */
+	XtNumber(resources),                 /* num_resources         */
+	NULLQUARK,                           /* xrm_class             */
+	TRUE,                                /* compress_motion       */
+	TRUE,                                /* compress_exposure     */
+	TRUE,                                /* compress_enterleave   */
+	TRUE,                                /* visible_interest      */
+	Destroy,                             /* destroy               */
+	Resize,                              /* resize                */
+	Redisplay,                           /* expose                */
+	SetValues,                           /* set_values            */
+	NULL,                                /* set_values_hook       */
+	XtInheritSetValuesAlmost,            /* set_values_almost     */
+	NULL,                                /* get_values_hook       */
+	NULL,                                /* accept_focus          */
+	XtVersion,                           /* version               */
+	NULL,                                /* callback private      */
+	XtInheritTranslations,                 /* tm_table              */
+	NULL,                                /* query_geometry        */
+	NULL,                                /* display_accelerator   */
+	NULL,                                /* extension             */
+	},
+	{
+	(XtWidgetProc)_XtInherit,             /* border_highlight      */
+	(XtWidgetProc)_XtInherit,             /* border_unhighligh     */
+	XtInheritTranslations,                /* translations          */
+	(XtActionProc)_XtInherit,             /* arm_and_activate      */
+	NULL,                                 /* syn_resources         */
+	0,                                    /* num_syn_resources     */
+	NULL,                                 /* extension             */
+	},
+	{
+	0,                                    /* ignore                */
+	},
+};
+
+WidgetClass ledWidgetClass = (WidgetClass) &ledClassRec;
+
+/*---------------------------------------------------------------*/
+/* Create the two GCs needed                                     */
+/*---------------------------------------------------------------*/
+
+static void create_gcs(LEDWidget w)
+{
+	XGCValues values;
+	XtGCMask  valueMask;
+
+	valueMask         =  GCFunction | GCForeground;
+	values.function   = GXcopy;
+
+	values.foreground = w->led.color1;
+	w->led.gc1 = XtGetGC((Widget)w,valueMask,&values);
+
+	values.foreground = w->led.color2;
+	w->led.gc2 = XtGetGC((Widget)w,valueMask,&values);
+
+	values.foreground = w->led.color3;
+	w->led.gc3 = XtGetGC((Widget)w,valueMask,&values);
+
+}
+
+static void free_gcs(LEDWidget w)
+{
+	XtReleaseGC((Widget)w,w->led.gc1);
+	XtReleaseGC((Widget)w,w->led.gc2);
+	XtReleaseGC((Widget)w,w->led.gc3);
+}
+
+/*--------------------------------------------------------------*/
+/* Initialize: Create the GCs                                   */
+/*--------------------------------------------------------------*/
+
+static void start(LEDWidget w)
+{
+	time_out(w,0);
+}
+
+static void stop(LEDWidget w)
+{
+	if(w->led.timeout_id)
+		XtRemoveTimeOut(w->led.timeout_id);
+	if(w->led.state)
+	{
+		w->led.state = False;
+		if(XtIsRealized(w)) draw(w);
+	}
+}
+
+static void Initialize (LEDWidget request, LEDWidget new)
+{
+	/* Check the size of the widget */
+
+	if (request->core.width == 0)
+		new->core.width = 24;
+
+	if (request->core.height == 0)
+		new->core.height = 6;
+
+	request->led.on         = False;
+	request->led.state      = False;
+	request->led.timeout_id = 0;
+
+	create_gcs(new);
+
+	start(new);
+
+}
+
+
+
+/*--------------------------------------------------------------*/
+/* Destroy the widget: release all memory alocated              */
+/*--------------------------------------------------------------*/
+
+static void Destroy (LEDWidget w)
+{
+	stop(w);
+	free_gcs(w);
+}
+
+
+static void Resize (LEDWidget w)
+{
+}
+
+static void draw(LEDWidget w)
+{
+
+	int n;
+
+	if(w->led.state)
+	{
+			 XFillRectangle(XtDisplay(w),XtWindow(w),
+			 	w->led.gc2,
+				1,1,
+				w->core.width-2,
+				w->core.height-2);
+	}
+	else
+	{
+			 XFillRectangle(XtDisplay(w),XtWindow(w),
+			 	XmParentBackgroundGC(w),
+				1,1,
+				w->core.width-2,
+				w->core.height-2);
+
+	}
+
+
+	XDrawLine(XtDisplay(w),XtWindow(w),
+		w->led.gc1,
+		2,
+		w->core.height-2,
+		w->core.width-2,
+		w->core.height-2);
+
+	n = w->core.width-2;
+	while(n >= 2)
+	{
+		XDrawLine(XtDisplay(w),XtWindow(w),
+			w->led.gc1,
+			n,
+			2,
+			n,
+			w->core.height-2);
+		n -= 2;
+	}
+
+
+	if(!w->led.state)
+	{
+			XDrawLine(XtDisplay(w),XtWindow(w),
+				w->led.gc3,
+				2,
+				w->core.height-2,
+				w->core.width-2,
+				w->core.height-2);
+
+			XDrawLine(XtDisplay(w),XtWindow(w),
+				w->led.gc3,
+				w->core.width-2,
+				2,
+				w->core.width-2,
+				w->core.height-2);
+
+
+	}
+
+	_XmDrawShadows(XtDisplay(w), XtWindow(w),
+	    XmParentTopShadowGC(w),
+	    XmParentBottomShadowGC(w),
+		0,
+		0,
+		w->core.width ,
+		w->core.height,
+		1,
+	    XmSHADOW_IN);
+}
+
+static void Redisplay(LEDWidget w, XEvent *event, Region region)
+{
+	draw(w);
+}
+
+static void time_out(LEDWidget w,XtIntervalId id)
+{
+	if(XtIsRealized(w))
+	{
+		w->led.state = !w->led.state;	
+		draw(w);
+	}
+	w->led.timeout_id = XtAppAddTimeOut(
+			XtWidgetToApplicationContext((Widget)w),
+			w->led.timeout, (XtTimerCallbackProc)time_out,
+			(XtPointer)w);
+}
+
+/*------------------------------------------------------------------*/
+/* SetValues : redraw only for font or color changes                */
+/*------------------------------------------------------------------*/
+
+static Boolean SetValues (LEDWidget current, LEDWidget request, 
+LEDWidget new)
+{
+	Boolean    redraw = FALSE;
+	redraw = True;
+	return (redraw);
+}
+
+
+/*-----------------------------------------------------------------------*/
+/* Create a new LEDWidget                                              */
+/*-----------------------------------------------------------------------*/
+
+Widget CreateLEDWidget(Widget parent,char *name,Arg *al,int ac)
+{
+	return XtCreateWidget(name,ledWidgetClass,parent,al,ac);
+}
+
+void LEDSwitch(Widget w,Boolean onOff)
+{
+	LEDWidget cw = (LEDWidget)w;
+	if(onOff)
+	{
+		cw->led.speed++;
+	}
+	else
+	{
+		cw->led.speed--;
+	}
+
+}
diff --git a/src/libMvMotif/LED.h b/src/libMvMotif/LED.h
new file mode 100644
index 0000000..2c4ab9e
--- /dev/null
+++ b/src/libMvMotif/LED.h
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef  LED_H
+#define  LED_H
+
+extern WidgetClass ledWidgetClass;
+typedef struct _LEDClassRec * LEDWidgetClass;
+typedef struct _LEDRec      * LEDWidget;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+extern Widget CreateLEDWidget(Widget,char*,Arg*,int);
+extern void LEDSwitch(Widget,Boolean);
+extern void LEDSpeed(Widget,int);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+#endif
diff --git a/src/libMvMotif/LEDP.h b/src/libMvMotif/LEDP.h
new file mode 100644
index 0000000..06f12de
--- /dev/null
+++ b/src/libMvMotif/LEDP.h
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LEDP_H
+#define LEDP_H
+
+#include <Xm/XmP.h>
+#include <Xm/PrimitiveP.h>
+
+/* LED class : no new fileds */
+
+typedef struct _LEDClassPart{
+    int ignore;
+} LEDClassPart;
+
+typedef struct _LEDClassRec{
+    CoreClassPart    core_class;
+    XmPrimitiveClassPart  primitive_class;
+    LEDClassPart  led_class;
+} LEDClassRec;
+
+extern LEDClassRec ledClassRec;
+
+typedef struct _LEDPart {
+	Pixel           color1;
+	Pixel           color2;
+	Pixel           color3;
+	GC              gc1;
+	GC              gc2;
+	GC              gc3;
+	Boolean         on;
+	Boolean         state;
+	XtIntervalId    timeout_id;
+	int             timeout;
+	int             speed;
+} LEDPart;
+
+typedef struct _LEDRec {
+    CorePart          core;
+    XmPrimitivePart  primitive;
+    LEDPart        led;
+} LEDRec;
+
+#endif
diff --git a/src/libMvMotif/Layout.c b/src/libMvMotif/Layout.c
new file mode 100644
index 0000000..9c065ab
--- /dev/null
+++ b/src/libMvMotif/Layout.c
@@ -0,0 +1,268 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <malloc.h>
+#include <X11/Intrinsic.h>
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+#include <X11/CoreP.h>
+#include <X11/CompositeP.h>
+#include <X11/ConstrainP.h>
+#include <Xm/XmP.h>
+#include <Xm/DrawingAP.h>
+#include "Layout.h"
+#include "LayoutP.h"
+
+#ifndef MAX
+#define   MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define   MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+static void             Initialize();
+static void             ConstraintInitialize();
+static Boolean          ConstraintSetValues();
+static void             Destroy();
+static void             Resize();
+static Boolean          SetValues();
+static XtGeometryResult GeometryManager();
+static void             ChangeManaged();
+static void             new_layout();
+static void             Redisplay();
+
+
+static CompositeClassExtensionRec compext = {
+	NULL,                               /* next_extension */
+	NULLQUARK,                          /* record type */
+	XtCompositeExtensionVersion,        /* version */
+	sizeof(CompositeClassExtensionRec), /* record size */
+	TRUE                                /* accepts_objects */
+};
+
+
+LayoutClassRec layoutClassRec = {
+	{
+	/* core_class fields  */
+	(WidgetClass) &xmManagerClassRec,/* superclass         */
+	"Layout",                           /* class_name         */
+	sizeof(LayoutRec),                /* widget_size        */
+	NULL,                             /* class_init         */
+	NULL,                             /* class_part_init    */
+	FALSE,                            /* class_inited       */
+	Initialize,                       /* initialize         */
+	NULL,                             /* initialize_hook    */
+	XtInheritRealize,                 /* realize            */
+	NULL,                            /* actions            */
+	0,                                /* num_actions        */
+	NULL,                             /* resources          */
+	0,                                /* num_resources      */
+	NULLQUARK,                        /* xrm_class          */
+	TRUE,                             /* compress_motion    */
+	XtExposeCompressMaximal,          /* compress_exposure  */
+	TRUE,                             /* compress_enterleave*/
+	TRUE,                             /* visible_interest   */
+	Destroy,                          /* destroy            */
+	Resize,                           /* resize             */
+	Redisplay,                        /* expose             */
+	SetValues,                        /* set_values         */
+	NULL,                             /* set_values_hook    */
+	XtInheritSetValuesAlmost,         /* set_values_almost  */
+	NULL,                             /* get_values_hook    */
+	NULL,                             /* accept_focus       */
+	XtVersion,                        /* version            */
+	NULL,                             /* callback_private   */
+	XtInheritTranslations,            /* tm_table           */
+	NULL,                             /* query_geometry     */
+	XtInheritDisplayAccelerator,      /* display_accelerator*/
+	NULL,                             /* extension          */
+	},
+	{
+	/* composite_class fields */
+	GeometryManager,                 /* geometry_manager    */
+	ChangeManaged,                   /* change_managed      */
+	XtInheritInsertChild,                     /* insert_child        */
+	XtInheritDeleteChild,                      /* delete_child        */
+	NULL/*&compext*/,                        /* extension           */
+	},
+	{ 
+	/* constraint_class fields */
+	NULL,          /* subresources        */
+	0,/* subresource_count   */
+	sizeof(LayoutConstraintsRec),       /* constraint_size     */
+	ConstraintInitialize,             /* initialize          */
+	NULL,                /* destroy             */
+	ConstraintSetValues,              /* set_values          */
+	NULL,                             /* extension           */
+	},
+	{
+	XtInheritTranslations,   /* default translations */
+	NULL,                    /* syn_resources          */
+	0,               /* num_syn_resources      */
+	NULL,                        /* syn_cont_resources     */
+	0,                           /* num_syn_cont_resources */
+	XmInheritParentProcess,  /* parent_process */
+	NULL,                        /* extension              */
+
+	},
+	{
+	/* Layout class fields */
+	0,                               /* ignore              */
+	}
+};
+
+
+
+WidgetClass layoutWidgetClass = (WidgetClass) &layoutClassRec;
+
+
+/*========================================================================*/
+
+
+static void Initialize(LayoutWidget request, LayoutWidget new)
+{
+	if (request->core.width <= 0)
+		new->core.width = 5;
+	if (request->core.height <= 0)
+		new->core.height = 5;
+}
+
+static void Destroy(LayoutWidget widget)
+{
+}
+
+void validate(Widget w)
+{
+	LayoutConstraints layout_c = LAYOUT_CONSTRAINT(w);
+
+	if(layout_c->layout.left < 0)   layout_c->layout.left = 0;
+	if(layout_c->layout.top  < 0)   layout_c->layout.top = 0;
+	if(layout_c->layout.bottom > 1) layout_c->layout.bottom = 1;
+	if(layout_c->layout.right  > 1) layout_c->layout.right = 1;
+
+	if(layout_c->layout.left > layout_c->layout.right)
+	{
+		double a = layout_c->layout.right;
+		layout_c->layout.right = layout_c->layout.left;
+		layout_c->layout.left = a;
+	}
+
+	if(layout_c->layout.top > layout_c->layout.bottom)
+	{
+		double a = layout_c->layout.bottom;
+		layout_c->layout.bottom = layout_c->layout.top;
+		layout_c->layout.top = a;
+	}
+}
+
+static void ConstraintInitialize(Widget request, Widget new)
+{
+	LayoutConstraints layout_c = LAYOUT_CONSTRAINT(new);
+
+	layout_c->layout.left = 0;
+	layout_c->layout.top = 0;
+	layout_c->layout.bottom = 1;
+	layout_c->layout.right = 1;
+
+}
+
+static Boolean SetValues(LayoutWidget current, LayoutWidget request, LayoutWidget new)
+{
+	return True;
+}
+
+static Boolean ConstraintSetValues(Widget current, Widget request, Widget new)
+{
+	LayoutWidget tw = (LayoutWidget)XtParent(current);
+
+	ConstraintInitialize(request,new);
+
+	if(XtIsRealized(tw))
+		new_layout(tw);
+
+	return (False);
+}
+
+static void ConstraintDestroy(Widget w)
+{
+}
+
+static XtGeometryResult GeometryManager(Widget w, XtWidgetGeometry* request, XtWidgetGeometry* reply)
+{
+	/* printf("LayoutWidget::GeometryManager %s\n",XtName(w)); */
+	/* No geometry requests allowed */
+	return XtGeometryNo;
+}
+
+static void ChangeManaged(LayoutWidget tw)
+{
+	/* printf("LayoutWidget::ChangeManaged %s\n",XtName(tw)); */
+	new_layout(tw);
+}
+
+static void Redisplay (LayoutWidget w, XEvent* event, Region region)
+{
+	_XmRedisplayGadgets((Widget)w,event,region);
+}
+
+
+#define RND(a) ((int)((a)+0.5))
+
+#define X(a) RND(W*(a))
+#define Y(a) RND(H*(a))
+
+static void place(LayoutWidget tw,Widget w)
+{
+	Dimension H = tw->core.height;
+	Dimension W  = tw->core.width;
+	LayoutConstraints layout_c = LAYOUT_CONSTRAINT(w);
+
+
+	double width  = layout_c->layout.right  - layout_c->layout.left; 
+	double height = layout_c->layout.bottom - layout_c->layout.top; 
+
+	_XmConfigureObject(w,X(layout_c->layout.left),
+						 Y(layout_c->layout.top),
+						 X(width),
+						 Y(height),
+						 0);
+}
+
+static void new_layout(LayoutWidget tw)
+{
+	int i;
+	for(i=0;i<tw->composite.num_children;i++)
+		place(tw,tw->composite.children[i]);
+}
+
+static void Resize(LayoutWidget tw)
+{
+	/* printf("LayoutWidget::Resize %s\n",XtName(tw)); */
+	new_layout(tw);
+}
+
+Widget CreateLayoutWidget(Widget par,const char* nam,Arg* al,int ac)
+{
+	return XtCreateWidget(nam,layoutWidgetClass,par,al, ac);
+}
+
+void LayoutSetPosition(Widget w,double top,double left,double bottom,double right)
+{
+	LayoutConstraints layout_c = LAYOUT_CONSTRAINT(w);
+
+	layout_c->layout.left = left;
+	layout_c->layout.top = top;
+	layout_c->layout.bottom = bottom;
+	layout_c->layout.right = right;
+
+	validate(w);
+	place((LayoutWidget)XtParent(w),w);
+}
diff --git a/src/libMvMotif/Layout.h b/src/libMvMotif/Layout.h
new file mode 100644
index 0000000..1aca882
--- /dev/null
+++ b/src/libMvMotif/Layout.h
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LAYOUT_H
+#define LAYOUT_H
+
+#include <X11/Intrinsic.h>
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+extern WidgetClass  layoutWidgetClass;
+
+typedef struct _LayoutClassRec *LayoutWidgetClass;
+typedef struct _LayoutRec      *LayoutWidget;
+
+
+extern Widget  CreateLayoutWidget(Widget,const char*,Arg*,int);
+extern void    LayoutSetPosition(Widget,double,double,double,double);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+#endif 
diff --git a/src/libMvMotif/LayoutP.h b/src/libMvMotif/LayoutP.h
new file mode 100644
index 0000000..58cf7cd
--- /dev/null
+++ b/src/libMvMotif/LayoutP.h
@@ -0,0 +1,75 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LAYOUTP_H
+#define LAYOUTP_H
+
+
+
+typedef struct _LayoutClassPart {
+    int         ignore;
+} LayoutClassPart;
+
+typedef struct _LayoutClassRec {
+    CoreClassPart           core_class;
+    CompositeClassPart      composite_class;
+    ConstraintClassPart     constraint_class;
+    XmManagerClassPart      manager_class;
+    LayoutClassPart         layout_class;
+} LayoutClassRec;
+
+extern LayoutClassRec layoutClassRec;
+
+typedef struct {
+
+	Pixel   foreground;
+	Boolean editable;
+	Boolean dont_insert;
+
+	XRectangle     selrect;
+	int            lastx;
+	int            lasty;
+	Boolean        move;
+
+	XmFontList fontlist;
+	Pixel     label_color;        /* Color of the normal text */
+	GC        label_gc;           /* Gc for the normal text   */
+
+} LayoutPart;
+
+typedef struct _LayoutRec {
+    CorePart            core;
+    CompositePart       composite;
+    ConstraintPart      constraint;
+    XmManagerPart       manager;
+    LayoutPart          layout;
+}  LayoutRec;
+
+typedef struct _LayoutConstraintsPart {
+	double top;
+	double left;
+	double bottom;
+	double right;
+} LayoutConstraintsPart;
+
+typedef struct _LayoutConstraintsRec {
+    LayoutConstraintsPart layout;
+} LayoutConstraintsRec, *LayoutConstraints;
+
+
+#define LAYOUT_CONSTRAINT(w) \
+                   ((LayoutConstraints)((w)->core.constraints))
+
+#define LayoutNumChildren(w) (((LayoutWidget)w) -> composite.num_children)
+#define LayoutChild(w,i)     (((LayoutWidget)w) -> composite.children[i])
+
+#endif 
+
+
+
diff --git a/src/libMvMotif/Line.c b/src/libMvMotif/Line.c
new file mode 100644
index 0000000..ec07e03
--- /dev/null
+++ b/src/libMvMotif/Line.c
@@ -0,0 +1,408 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <math.h>
+
+#include  <X11/Intrinsic.h>
+#include  <X11/IntrinsicP.h>
+#include  <X11/StringDefs.h>
+#include  <X11/CoreP.h>
+#include  <X11/CompositeP.h>
+#include  <X11/ConstrainP.h>
+#include  <Xm/XmP.h>
+#include  <Xm/DrawingAP.h>
+#include  "Line.h"
+#include  "LineP.h"
+
+#ifndef MAX
+#define   MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define   MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+static void             Initialize();
+static void             Resize();
+static void             Destroy();
+static Boolean          SetValues();
+static XtGeometryResult GeometryManager();
+static void             ChangeManaged();
+static void             new_layout();
+static void 			get_row_col();
+#ifdef NO_STRING_TABLE_CVT
+static void				Initialize_class();
+#endif
+
+#define DEBUG(a) printf("%s\n",a);
+
+static XtResource resources[] = {
+	{XtNsizes,XtCSizes, XmRStringTable,sizeof(String*),
+	XtOffset(LineWidget,line.sizes), XtRString,(XtPointer)"50,50,50" },
+};
+
+#ifndef USE_MANAGER
+#define USE_MANAGER
+#endif
+
+
+LineClassRec lineClassRec = {
+	{
+	/* core_class fields  */
+	(WidgetClass) &xmDrawingAreaClassRec,/* superclass         */
+#if 0
+	(WidgetClass) &constraintClassRec,/* superclass         */
+#endif
+	"Line",                           /* class_name         */
+	sizeof(LineRec),                /* widget_size        */
+#ifdef NO_STRING_TABLE_CVT
+	Initialize_class,                 /* class_init         */
+#else
+	NULL,                             /* class_init         */
+#endif
+	NULL,                             /* class_part_init    */
+	FALSE,                            /* class_inited       */
+	Initialize,                       /* initialize         */
+	NULL,                             /* initialize_hook    */
+	XtInheritRealize,                 /* realize            */
+	NULL,                             /* actions            */
+	0,                                /* num_actions        */
+	resources,                        /* resources          */
+	XtNumber(resources),              /* num_resources      */
+	NULLQUARK,                        /* xrm_class          */
+	TRUE,                             /* compress_motion    */
+	TRUE,                             /* compress_exposure  */
+	TRUE,                             /* compress_enterleave*/
+	TRUE,                             /* visible_interest   */
+	Destroy,                          /* destroy            */
+	Resize,                           /* resize             */
+	(XtExposeProc)_XmRedisplayGadgets,/* expose             */
+	SetValues,                        /* set_values         */
+	NULL,                             /* set_values_hook    */
+	XtInheritSetValuesAlmost,         /* set_values_almost  */
+	NULL,                             /* get_values_hook    */
+	NULL,                             /* accept_focus       */
+	XtVersion,                        /* version            */
+	NULL,                             /* callback_private   */
+	XtInheritTranslations,            /* tm_table           */
+	NULL,                             /* query_geometry     */
+	XtInheritDisplayAccelerator,      /* display_accelerator*/
+	NULL,                             /* extension          */
+	},
+	{
+	/* composite_class fields */
+	GeometryManager,                 /* geometry_manager    */
+	ChangeManaged,                   /* change_managed      */
+	XtInheritInsertChild,            /* insert_child        */
+	XtInheritDeleteChild,            /* delete_child        */
+	NULL ,                           /* extension           */
+	},
+	{ 
+	/* constraint_class fields */
+	NULL,                             /* subresources        */
+	0,                                /* subresource_count   */
+	0,                                /* constraint_size     */
+	NULL,                             /* initialize          */
+	NULL,                             /* destroy             */
+	NULL,                             /* set_values          */
+	NULL,                             /* extension           */
+	},
+	{
+	XtInheritTranslations,   /* default translations */
+	NULL,                    /* syn_resources          */
+	0,               /* num_syn_resources      */
+	NULL,                        /* syn_cont_resources     */
+	0,                           /* num_syn_cont_resources */
+	XmInheritParentProcess,  /* parent_process */
+	NULL,                        /* extension              */
+
+	},
+	{
+	NULL,
+	},
+	{
+	/* Line class fields */
+	0,                               /* ignore              */
+	}
+};
+
+
+
+
+
+WidgetClass lineWidgetClass = (WidgetClass) &lineClassRec;
+
+#ifdef NO_STRING_TABLE_CVT
+
+#define SKIP_BLANKS { while(*p && isspace(*p)) p++; }
+
+/* Some motif has no converter */
+
+static void CvtStringToStringTable(args,num_args,from,to)
+XrmValuePtr args;
+Cardinal    *num_args;
+XrmValuePtr from,to;
+{
+    char   *p = (char*)from->addr;
+	char   *q;
+	char buf[1024];
+	String  s[1024];
+	int i;
+	int n=0;
+	static String  *table = NULL;
+
+    if(!from->addr) return;
+
+
+    SKIP_BLANKS;
+	while(*p)
+	{
+		i = 0;
+		while(*p && *p != ',') buf[i++] = *p++;
+		buf[i] = 0;
+		if(i)
+		{
+			q = buf+i-1;
+			while(q != buf && isspace(*q)) *q-- = 0;
+		}
+		s[n++] = XtNewString(buf);
+
+		if(*p && *p ==',') p++;
+        SKIP_BLANKS;
+	}
+
+	table = (String*)XtCalloc(sizeof(String),n+1);
+	for(i=0;i<n;i++)
+		table[i] = s[i];
+
+
+    to->addr = (caddr_t)&table;
+    to->size = sizeof(caddr_t);
+
+}
+
+static void Initialize_class (widget_class)
+WidgetClass widget_class;
+{
+	XtAddConverter(XmRString,XmRStringTable,CvtStringToStringTable,NULL,0);
+}
+
+#endif
+
+
+
+
+
+
+static void Initialize(request, new)
+LineWidget request, new;
+{
+	/*
+   * Make sure the widget's width and height are 
+   * greater than zero.
+   */
+	if (request->core.width <= 0)
+		new->core.width = 5;
+	if (request->core.height <= 0)
+		new->core.height = 5;
+
+}
+
+static void Destroy(w)
+LineWidget w;
+{
+}
+
+static void Resize(w)
+LineWidget w;
+{
+	new_layout(w);
+}
+
+
+static Boolean SetValues(current, request, new)
+LineWidget current, request, new;
+{
+	/* should do something */
+	/* new_layout(new); */
+	return (False);
+}
+
+
+static XtGeometryResult GeometryManager(w, request, reply)
+Widget               w;
+XtWidgetGeometry    *request;
+XtWidgetGeometry    *reply;
+{
+	new_layout(XtParent(w));
+	return (XtGeometryYes);
+}
+
+static void ChangeManaged(tw)
+LineWidget tw;
+{
+	new_layout(tw);
+}
+
+
+static void new_layout(tw)
+LineWidget   tw;
+{
+
+	int i;
+	Dimension width  = 0;
+	Dimension height = tw->core.height;
+	Dimension ww;
+	Position  x = 0;
+
+	if(tw->line.sizes == NULL) return;
+
+	for(i=0;tw->line.sizes[i];i++)
+		width += atol(tw->line.sizes[i]);
+
+	height = 5;
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget w = tw->composite.children[i];
+		if(XtIsManaged(w))
+			height = MAX(height,w->core.height);
+	}
+
+	x = 0;
+	for(i=0;(i<tw->composite.num_children) && tw->line.sizes[i];i++)
+	{
+		Widget w = tw->composite.children[i];
+		ww = atol(tw->line.sizes[i]);
+
+		if(XtIsManaged(w))
+			_XmConfigureObject((RectObj)w,x,0,ww,height,0);
+		x += ww;
+
+	}
+
+	if(tw->core.width != width || tw->core.height != height)
+	{
+		Dimension           maxWidth = width, maxHeight = height;
+		XtGeometryResult    result;
+		Dimension           replyWidth = 0, replyHeight = 0;
+
+		result = XtMakeResizeRequest(
+		    (Widget)tw,
+		    maxWidth,
+		    maxHeight, 
+		    &replyWidth, &replyHeight);
+
+		if (result == XtGeometryAlmost)
+			XtMakeResizeRequest (
+			    (Widget)tw, 
+			    replyWidth, 
+			    replyHeight,NULL, NULL);
+	}
+
+
+}
+
+Widget CreateLine(par,nam,al,ac)
+Widget par;
+char  *nam;
+Arg   *al;
+int   ac;
+{
+	return   XtCreateWidget(nam,lineWidgetClass,par,al,ac);
+}
+
+static void adjust(Widget w,int* size,int *n,int* h)
+{
+
+	int i;
+	CompositeRec* c = (CompositeRec*)w;
+
+	if(!XtIsComposite(w)) return;
+
+	for(i = 0; i < c->composite.num_children; i++)
+	{
+		Widget w = c->composite.children[i];
+		if(XtIsSubclass(w,lineWidgetClass))
+		{
+			LineWidget tw = (LineWidget)w;
+			XtWidgetGeometry preferred;
+			int j;
+			if(tw->composite.num_children > *n)
+				*n = tw->composite.num_children;
+
+			for(j=0;j<tw->composite.num_children;j++)
+			{
+				Widget w = tw->composite.children[j];
+				XtQueryGeometry(w,NULL,&preferred);
+				if(preferred.width > size[j]) size[j] = preferred.width;
+				if(preferred.height > *h) *h = preferred.height;
+				if(tw->core.height  > *h) *h = tw->core.height;
+			}
+		}
+		else adjust(w,size,n,h);
+	}
+}
+
+static void resize(Widget w,int* size,int n,int h)
+{
+
+	int i;
+	CompositeRec* c = (CompositeRec*)w;
+
+	if(!XtIsComposite(w)) return;
+
+	for(i = 0; i < c->composite.num_children; i++)
+	{
+		Widget w = c->composite.children[i];
+		int j;
+		int s;
+		if(XtIsSubclass(w,lineWidgetClass))
+		{
+			LineWidget tw = (LineWidget)w;
+
+			if(tw->line.sizes)
+			{
+				for(j=0;tw->line.sizes[j];j++)
+					XtFree(tw->line.sizes[j]);
+			}
+			XtFree(tw->line.sizes);
+
+			tw->line.sizes = (String*)XtCalloc(sizeof(String),n+1);
+			s = 0;
+			for(j=0;j<n;j++)
+			{
+				char buf[90];
+				sprintf(buf,"%d",size[j]);
+				tw->line.sizes[j] = XtNewString(buf);
+				s += size[j];
+			}
+
+			XtVaSetValues(w,
+				XmNwidth, (Dimension)s,
+				XmNheight,(Dimension)h,0);
+
+		}
+		else resize(w,size,n,h);
+	}
+}
+
+void LineAdjust(Widget rowcol)
+{
+	int i = 0;
+	int size[100];
+	int n = 0;
+	int h = 5;
+
+	for(i = 0; i < 100; i++) size[i] = 0;
+
+	adjust(rowcol,size,&n,&h);
+	resize(rowcol,size,n,h);
+
+}
diff --git a/src/libMvMotif/Line.h b/src/libMvMotif/Line.h
new file mode 100644
index 0000000..eda2c22
--- /dev/null
+++ b/src/libMvMotif/Line.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LINE_H
+#define LINE_H
+
+#define XtNsizes   "sizes"
+#define XtCSizes   "Sizes"
+
+extern WidgetClass  lineWidgetClass;
+
+typedef struct _LineClassRec *LineWidgetClass;
+typedef struct _LineRec      *LineWidget;
+#ifdef _NO_PROTO
+ 
+extern Widget CreateLine();
+ 
+#else
+ 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+ 
+Widget    CreateLine(Widget,String,Arg*,int);
+void LineAdjust(Widget);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+ 
+#endif /* _NO_PROTO */
+ 
+
+
+#endif /* LINE_H */
diff --git a/src/libMvMotif/LineP.h b/src/libMvMotif/LineP.h
new file mode 100644
index 0000000..429a87e
--- /dev/null
+++ b/src/libMvMotif/LineP.h
@@ -0,0 +1,56 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LINEP_H
+#define LINEP_H
+
+#include <Xm/XmP.h>
+#include <Xm/DrawingAP.h>
+
+#ifdef __alpha
+#define NO_STRING_TABLE_CVT
+#endif
+
+typedef struct _LineClassPart {
+    int         ignore;
+} LineClassPart;
+
+typedef struct _LineClassRec {
+    CoreClassPart       core_class;
+    CompositeClassPart  composite_class;
+    ConstraintClassPart constraint_class;
+    XmManagerClassPart  manager_class;
+    XmDrawingAreaClassPart  drawing_area_class;
+    LineClassPart     line_class;
+} LineClassRec;
+
+extern LineClassRec lineClassRec;
+
+typedef struct {
+	String *sizes;
+} LinePart;
+
+
+typedef struct _LineRec {
+    CorePart            core;
+    CompositePart       composite;
+    ConstraintPart      constraint;
+    XmManagerPart       manager;
+    XmDrawingAreaPart   drawing_area;
+    LinePart            line;
+}  LineRec;
+
+
+#define XtLineNumChildren(w) (((LineWidget)w) -> composite.num_children)
+#define XtLineChild(w,i)     (((LineWidget)w) -> composite.children[i])
+
+#endif /* LINEP_H */
+
+
+
diff --git a/src/libMvMotif/MArray.cc b/src/libMvMotif/MArray.cc
new file mode 100644
index 0000000..86b0c12
--- /dev/null
+++ b/src/libMvMotif/MArray.cc
@@ -0,0 +1,25 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MArray.hpp>
+
+void MArray::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, NULL, argptr);
+        ident = mArray;
+        widget = CreateArray( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+
+}
diff --git a/src/libMvMotif/MArray.hpp b/src/libMvMotif/MArray.hpp
new file mode 100644
index 0000000..3a237cf
--- /dev/null
+++ b/src/libMvMotif/MArray.hpp
@@ -0,0 +1,13 @@
+#ifndef marray_DEFINED
+#define marray_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Array.h>
+
+class MArray :  public MWidget
+{
+public:
+		void    init(MWidget *parent, const char *name, ...);
+};
+
+#endif
diff --git a/src/libMvMotif/MCarousel.cc b/src/libMvMotif/MCarousel.cc
new file mode 100644
index 0000000..d201042
--- /dev/null
+++ b/src/libMvMotif/MCarousel.cc
@@ -0,0 +1,26 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MCarousel.hpp>
+
+void MCarousel::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, NULL, argptr);
+        ident = mCarousel;
+        widget = (Widget) CreateCarousel( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+ 
+
diff --git a/src/libMvMotif/MCarousel.hpp b/src/libMvMotif/MCarousel.hpp
new file mode 100644
index 0000000..9e77a84
--- /dev/null
+++ b/src/libMvMotif/MCarousel.hpp
@@ -0,0 +1,13 @@
+#ifndef mcarousel_DEFINED
+#define mcarousel_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Carousel.h>
+
+class MCarousel : public MDrawingArea
+{
+public:
+	void    init(MWidget *parent, const char *name, ...);
+};
+
+#endif
diff --git a/src/libMvMotif/MColors.cc b/src/libMvMotif/MColors.cc
new file mode 100644
index 0000000..148021f
--- /dev/null
+++ b/src/libMvMotif/MColors.cc
@@ -0,0 +1,24 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MColors.hpp>
+
+void MColorsWidget::init(MWidget *parent, const char *name, ...)
+{
+    va_list argptr;
+    Arg al[64];           /* Arg List */
+    register int ac = 0;      /* Arg Count */
+ 
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char *)NULL, argptr);
+//    ident = mColorsWidget;
+    widget = (Widget) CreateColorsWidget( parent->widget, (char*)name, al, ac);
+    attachObject();
+	MFreeArgs(al, ac);
+}
diff --git a/src/libMvMotif/MColors.hpp b/src/libMvMotif/MColors.hpp
new file mode 100644
index 0000000..02afcca
--- /dev/null
+++ b/src/libMvMotif/MColors.hpp
@@ -0,0 +1,14 @@
+#ifndef mColors_DEFINED
+#define mColors_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Colors.h>
+
+class MColorsWidget : public MDrawingArea
+{
+public:
+	void    init(MWidget *parent, const char *name, ...);
+	void setPixels(int n,Pixel *p) { ColorsSetPixels(widget,n,p); }
+};
+
+#endif
diff --git a/src/libMvMotif/MDrag.cc b/src/libMvMotif/MDrag.cc
new file mode 100644
index 0000000..31fbdba
--- /dev/null
+++ b/src/libMvMotif/MDrag.cc
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MDrag.hpp>
+
+void MDragWidget::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, NULL, argptr);
+        ident = mDragWidget;
+        widget = (Widget) CreateDragWidget( parent->widget, name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+ 
+
+Icon MDragWidget::addIcon(const char* cl, const char* n, int x, 
+			  int y, XtPointer d)
+{
+	Icon icon;
+
+	icon = DragAddIcon (widget, cl, n, d, x, y);
+	return icon;
+}
+
diff --git a/src/libMvMotif/MDrag.hpp b/src/libMvMotif/MDrag.hpp
new file mode 100644
index 0000000..f53b2b7
--- /dev/null
+++ b/src/libMvMotif/MDrag.hpp
@@ -0,0 +1,108 @@
+#ifndef mdrag_DEFINED
+#define mdrag_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Drag.h>
+
+class MDragWidget : public MDrawingArea
+{
+public:
+	void    init(MWidget *parent, const char *name, ...);
+
+	Icon 	addIcon(const char* cl, const char* name, int x, int y, 
+			XtPointer data = NULL);
+
+	Icon	findIconByName(const char* classe, const char* name, Boolean folder = False)
+		{ if (folder) return DragFindIconByNameFolders (widget, classe, name); 
+		  else return DragFindIconByName (widget, classe, name); }
+
+	void	deleteIcon(Icon id)
+		{ DragDeleteIcon(widget,id); }
+
+	void	deleteAllIcons()
+		{ DragDeleteAllIcons(widget); }
+
+	Pixmap	getIconPixmap(Icon id)
+		{ return DragGetIconPixmap (widget, id); }
+
+	const char*  getIconName(Icon id)
+		{ return DragGetIconName (widget, id); }
+
+	const char*  getIconClass(Icon id)
+		{ return DragGetIconClass (widget, id); }
+
+	void	cleanUpIcons()
+		{ DragCleanUpIcons(widget); }
+
+	void	setFontTag(const char *tag)
+		{ DragSetFontTag(widget,tag); }
+
+	void	sortIconsByName()
+		{ DragSortIcons(widget, DragSortByName); }
+	void	sortIconsByClass()
+		{ DragSortIcons(widget, DragSortByClass); }
+	void	sortIcons(DragSortProc proc = NULL)
+		{ DragSortIcons(widget, proc); }
+
+	void toggleSizeIcons() 
+		{ DragToggleSizeIcons(widget); }
+
+	Boolean areSmallIconsUsed()
+		{ return DragAreSmallIconsUsed(widget); }
+	void    useSmallIcons(Boolean use)
+		{ DragUseSmallIcons(widget, use); }
+
+	void    showIcon(Icon icon, Boolean vis)
+		{ DragShowIcon(widget, icon, vis); }
+
+	void    showLast() 
+		{ DragShowLast(widget); }
+
+	void	selectIcon(Icon id, Boolean sel,Boolean expand=True)
+		{ DragSelectIcon (widget, id, sel, expand); }
+
+	XtPointer getIconData(Icon id)
+		{ return DragGetIconData (widget, id); }
+
+	void	setIconData(Icon id, XtPointer idata)
+		{ DragSetIconData (widget, id, idata); }
+
+	void	setIconName(Icon id, const char* name)
+		{ DragSetIconName (widget, id, name); }
+
+	Icon    findIconByPosition(Position x, Position y)
+		{ return DragFindIconByPosition (widget, x, y); }
+
+	void    findPositionIcon(Icon icon, Position *x, Position *y)
+		{ DragFindPositionIcon(widget, icon, x, y); }
+
+	void    acceptDropCallback(XtCallbackProc cb, XtPointer datum)
+		{ DragAcceptDropCallback(widget, cb,  datum); }
+
+	void 	openIcon(Icon id, Boolean opened)
+		{ DragOpenIcon(widget, id, opened); }
+
+	void    scanIcons(DragScanProc cb, XtPointer datum, Boolean folder = False)
+		{ if (folder) DragScanIconsFolders(widget, cb, datum); 
+		  else DragScanIcons(widget, cb, datum); }
+
+	static MDragWidget  *iconToWidget(Icon icon)
+		{ return (MDragWidget *) returnObject(DragIconToWidget(icon)); }
+
+	Boolean isIconSelected(Icon icon)
+		{ return DragIsIconSelected(widget, icon); }
+
+	void setIconColor(Icon icon, Pixel pix)
+		{ DragSetIconColor(widget, icon, pix); }
+
+	void setParent(MDragWidget parent)
+		{ setValue(XmNparentFolder, (XtPointer)parent.widget); }
+
+	void displayIcon(Icon icon,int flags = DRAG_DISPLAY_NO_EFFECT)
+		{ DragDisplayIcon(widget, icon, flags); }
+
+	void addIconPixmap(Icon icon,const char* name,int dx = -1,int dy = -1)
+		{ DragAddIconPixmap(widget, icon,name,dx,dy); }
+};
+
+#endif
diff --git a/src/libMvMotif/MIcon.cc b/src/libMvMotif/MIcon.cc
new file mode 100644
index 0000000..1324694
--- /dev/null
+++ b/src/libMvMotif/MIcon.cc
@@ -0,0 +1,18 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MIcon.hpp>
+
+void MIconLabel::init(MWidget *parent, char *name, ...)
+{
+}
+ 
+void MIconButton::init(MWidget *parent, char *name, ...)
+{
+}
diff --git a/src/libMvMotif/MIcon.hpp b/src/libMvMotif/MIcon.hpp
new file mode 100644
index 0000000..856c93e
--- /dev/null
+++ b/src/libMvMotif/MIcon.hpp
@@ -0,0 +1,19 @@
+#ifndef micon_DEFINED
+#define micon_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <IconWidget.h>
+
+class MIconLabel : public MWidget
+{
+public:
+        void    init(MWidget *parent, char *name, ...);
+};
+	
+class MIconButton : public MWidget
+{
+public:
+        void    init(MWidget *parent, char *name, ...);
+};
+
+#endif
diff --git a/src/libMvMotif/MLine.cc b/src/libMvMotif/MLine.cc
new file mode 100644
index 0000000..2a3fdb2
--- /dev/null
+++ b/src/libMvMotif/MLine.cc
@@ -0,0 +1,25 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MLine.hpp>
+
+void MLine::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, NULL, argptr);
+        ident = mLine;
+        widget = CreateLine( parent->widget, (char*)name, al, ac);
+        attachObject();
+		MFreeArgs(al, ac);
+
+}
diff --git a/src/libMvMotif/MLine.hpp b/src/libMvMotif/MLine.hpp
new file mode 100644
index 0000000..5b282fe
--- /dev/null
+++ b/src/libMvMotif/MLine.hpp
@@ -0,0 +1,13 @@
+#ifndef mline_DEFINED
+#define mline_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Line.h>
+
+class MLine :  public MWidget
+{
+public:
+		void    init(MWidget *parent, const char *name, ...);
+};
+
+#endif
diff --git a/src/libMvMotif/MMatrix.cc b/src/libMvMotif/MMatrix.cc
new file mode 100644
index 0000000..3312736
--- /dev/null
+++ b/src/libMvMotif/MMatrix.cc
@@ -0,0 +1,97 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MMatrix.hpp>
+
+void MMatrix::init(MWidget* parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           // Arg List
+        register int ac = 0;  // Arg Count
+
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreateMatrix(parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mMatrix;
+}
+
+//
+//	Add callbacks to the scroll bar widget maintained by the Matrix widget
+//
+
+void MMatrix::addScrollProc (int posit, ...)
+{
+	va_list		argptr;
+	char*		cbname;
+	XtCallbackProc	cbproc;
+	XtPointer	cbdata;
+	Widget		scrollbar = XmMatrixScrollBar (widget, posit);
+
+	if (!scrollbar) return;
+
+	// initialize variable argument list
+
+	va_start(argptr, posit);
+	cbname = va_arg(argptr, char *);
+
+	// remaining callbacks
+
+	while (cbname)
+	{
+		// add callback
+
+		cbproc = va_arg(argptr, XtCallbackProc);
+		cbdata = va_arg(argptr, XtPointer);
+		XtAddCallback(scrollbar, cbname, cbproc, cbdata);
+
+		// get next callback name
+
+		cbname = va_arg(argptr, char *);
+	}
+
+	va_end(argptr);
+}
+
+//
+//	Set the parameter of the scroll bar widget maintained by the Matrix widget
+//
+
+void MMatrix::setScrollValues (int posit, int value, int scroll_size, int size, int increment, int page_increment)
+{
+	Widget scrollbar = XmMatrixScrollBar (widget, posit);
+	Arg al[3];
+//<*deleteme*>	int init_value;
+	int ac = 0;
+
+	if (!scrollbar) return;
+
+//<*deleteme*>	XtSetArg (al[ac], XmNinit_value , &init_value); ac++;
+//<*deleteme*>	XtGetValues (scrollbar, al, ac);
+//<*deleteme*>	ac = 0;
+	
+	// Set size of the scroll bar
+
+	XtSetArg (al[ac], XmNminimum, 0); ac++;
+	XtSetArg (al[ac], XmNmaximum, scroll_size); ac++;
+	XtSetArg (al[ac], XmNsliderSize, scroll_size); ac++;
+	XtSetValues (scrollbar, al, ac);
+	ac = 0;
+
+	if (value < 0) value = 0;
+	if (value > scroll_size - size) value =  scroll_size - size;
+
+	XmScrollBarSetValues (scrollbar,		// Widget
+			      value,			// current init_value
+			      size,			// slider size
+			      increment,		// increment
+			      page_increment,		// page increment
+			      FALSE);
+
+}
diff --git a/src/libMvMotif/MMatrix.hpp b/src/libMvMotif/MMatrix.hpp
new file mode 100644
index 0000000..a7830b6
--- /dev/null
+++ b/src/libMvMotif/MMatrix.hpp
@@ -0,0 +1,40 @@
+#ifndef MMatrix_H
+#define MMatrix_H
+
+#include <MMotifOnly.hpp>
+#include <Matrix.h>
+
+//
+// Object for the Matrix widget, a constraint widget which
+// places several chart in a matrix layout
+
+class MMatrix : public MWidget
+{
+public:
+	void init(MWidget* parent, const char *name, ...);
+ 
+	void addScrollProc (int posit, ...);
+	//	Add callbacks to the scroll bar
+	//	Input:
+	//		posit: position of the scroll bar, beginning
+	//		with 0
+	//		a list of:
+	//			callback type
+	//			callback function
+	//			client data
+	//		NULL to terminate the list
+
+	void setScrollValues (int posit, int value,
+			int scroll_size, int size,
+			int increment, int page_increment); 
+ 	//	Set attributes of the scroll bar
+	//	Input:
+	//		posit: position of the scroll bar
+	//		value: position of slider in scroll bar
+	//		scroll_size: size of the scroll bar
+	//		size: size of slider
+	//		increment
+	//		page increment
+};
+
+#endif
diff --git a/src/libMvMotif/MMotif.cc b/src/libMvMotif/MMotif.cc
new file mode 100644
index 0000000..f435d04
--- /dev/null
+++ b/src/libMvMotif/MMotif.cc
@@ -0,0 +1,2272 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MMotifOnly.hpp>
+#include <Xm/Protocols.h>
+#include <Xm/AtomMgr.h>
+#include <Xm/FileSB.h>
+extern "C"
+{
+#include <xec.h>
+#include <X11/xpm.h>
+Boolean _XmInstallPixmap (Pixmap pixmap, Screen *screen, char *image_name,
+						  Pixel foreground, Pixel background);
+
+}
+
+#define WIN_ENTER	0
+#define WIN_EXIT	1
+#define B1_DOWN		2
+#define B2_DOWN		3
+#define B3_DOWN		4
+#define B1_UP		5
+#define B2_UP		6
+#define B3_UP		7
+#define B1_DRAG		8
+#define B2_DRAG		9
+#define B3_DRAG		10
+#define M_MOVE		11
+#define ASCII		12
+
+extern "C"
+{
+//Prototypes forgotten in the Include Files.
+void exit(int);
+};
+
+
+bool isStringArgument( const char* argname )
+{
+  if( !strcmp(argname, XmNlabelString)    ||
+      !strcmp(argname, XmNtitleString)     ||
+      !strcmp(argname, XmNapplyLabelString) ||
+      !strcmp(argname, XmNcancelLabelString) ||
+      !strcmp(argname, XmNhelpLabelString   ) ||
+      !strcmp(argname, XmNlistLabelString)     ||
+      !strcmp(argname, XmNokLabelString)        ||
+      !strcmp(argname, XmNselectionLabelString)  ||
+      !strcmp(argname, XmNacceleratorText) )
+    {
+      return true;
+    }
+  else
+    {
+      return false;
+    }
+}
+
+void Mmanage_link (Widget, MWidget *cd, caddr_t)
+{
+    	Widget *childs;
+	int    num;
+
+	if (XtIsTopLevelShell(cd->widget))
+		XtMapWidget(cd->widget);
+    	else if (!XmIsForm(cd->widget) && 
+	    !XmIsMessageBox(cd->widget) )
+    	{
+		num = cd->returnChildren(&childs);
+		int i = 0;
+		while(!XtIsComposite(childs[i])) i++;
+    		XtManageChild ( childs[i]);
+	}	
+    	else XtManageChild ( cd->widget );
+}
+
+void Munmanage_link (Widget, MWidget *cd, caddr_t)
+{
+        Widget *childs;
+        int    num;
+
+	if (XtIsTopLevelShell(cd->widget))
+		XtUnmapWidget(cd->widget);
+        else if (!XmIsForm(cd->widget))
+        {
+                num = cd->returnChildren(&childs);
+                int i = 0;
+                while(!XtIsComposite(childs[i])) i++;
+                XtUnmanageChild ( childs[i]);
+        }
+        else XtUnmanageChild ( cd->widget );
+
+}
+
+void Mdisable_link(Widget, MWidget *cd, caddr_t)
+{
+    XtSetSensitive (cd->widget, FALSE);
+}
+
+void Menable_link (Widget, MWidget *cd, caddr_t)
+{
+    XtSetSensitive (cd->widget, TRUE);
+}
+
+
+
+int MInitArgs(Arg*al, const char* arg_name, va_list argptr)
+{
+    XtArgVal argvalue;
+    const char    *argname;
+    int ac = 0;      // Arg Count
+    XmString xmstrings;
+
+    argname = (arg_name ? arg_name : va_arg(argptr, char*));
+
+    while (argname != NULL )
+    {
+        argvalue = va_arg(argptr, XtArgVal);
+	if( isStringArgument( argname ) )
+	{
+		xmstrings = Mstoxs((char *)argvalue);
+       		XtSetArg(al[ac], (char*)argname, xmstrings); ac++;
+    	}
+	else 
+	{
+		XtSetArg(al[ac], (char*)argname, argvalue); 
+		ac++;
+	}
+    	argname = va_arg(argptr, char*);
+    }
+
+    return ac;
+}
+
+void MFreeArgs(Arg*al, int ac)
+{
+    XtArgVal argvalue;
+    char    *argname;
+
+   	for (int ind = 0; ind < ac; ind++)
+	{
+		argname = al[ind].name ;
+		argvalue = al[ind].value; 
+		if( isStringArgument( argname ) )
+		  {
+			XmStringFree((XmString) argvalue);
+		  }
+	}
+}
+
+char * Mxstos(XmString xs)
+
+{
+	char *s;
+
+	XmStringGetLtoR(xs,(XmStringCharSet)XmSTRING_DEFAULT_CHARSET,&s);
+	return s;
+}
+
+XmString Mstoxs(const char *s)
+
+{
+	return XmStringCreateLtoR((char*)s,(XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+}
+
+void MSetResource(Widget w, XtResource resource, char* resource_name, char* resource_value)
+{
+	Arg al[64];
+	register int ac = 0;
+	int j;
+	XmString slist[64];
+	int nslist = 0;
+
+	if (!strcmp("String", resource.resource_type))
+	{
+		XtSetArg(al[ac], resource_name, resource_value); ac++;
+	}
+	else if (!strcmp(XmRString, resource.resource_type))
+	{
+		slist[nslist] =  XmStringCreateLtoR(resource_value,
+			(XmStringCharSet)XmSTRING_DEFAULT_CHARSET);
+		XtSetArg(al[ac], resource_name, slist[nslist]); ac++;
+		nslist++;
+	}
+	else
+	{		
+		char buf[1024];
+		XrmValue from, converted_value;
+		from.size = strlen(resource_value) + 1;
+		from.addr = resource_value;
+		converted_value.size = resource.resource_size;
+		converted_value.addr = buf;
+		if (XtConvertAndStore(w,"String", &from, resource.resource_type, &converted_value))
+		{
+			if (!strcmp(resource.resource_class, "IntArray"))
+				XtSetArg(al[ac], resource_name, (int *) converted_value.addr);
+			
+			else if (resource.resource_size == sizeof(Boolean))
+				XtSetArg(al[ac], resource_name, *(Boolean *) converted_value.addr);
+			else if (resource.resource_size == sizeof(Dimension))
+				XtSetArg(al[ac], resource_name, *(Dimension *) converted_value.addr);
+			else
+				XtSetArg(al[ac], resource_name, *(XtArgVal *) converted_value.addr);
+			ac++;
+		}
+		else
+			printf("Conversion failed for %s\n",resource_value);
+	}
+	if (ac) XtSetValues(w, al, ac); ac = 0;
+
+	for (j = 0; j < nslist; j++)
+		XmStringFree(slist[j]);
+}
+
+void MSetResources(Widget w, char* wname, va_list argptr)
+{
+	XtResourceList resourcelist;
+	Cardinal nresources;
+	char* widget_name = wname;
+	char *resource_value, *resource_name;
+
+	XtGetResourceList(XtClass(w),&resourcelist, &nresources);
+	while (widget_name)
+	{
+		resource_name = va_arg(argptr, char*);
+		resource_value = va_arg(argptr, char*);
+		
+		if (!strcmp(widget_name,"*") || !strcmp(widget_name,XtName(w)))
+		{
+			for (int i = 0; i < nresources; i++)
+			{
+				if (!strcmp(resource_name,resourcelist[i].resource_name))
+				{
+/* printf("Name = %s, resource = %s, value = %s\n", widget_name,resource_name, resource_value);
+*/
+					MSetResource(w,resourcelist[i], resource_name, resource_value);
+					break;
+				}
+			}
+		}
+		widget_name = va_arg(argptr, char*);
+	}
+	XtFree((char*)resourcelist);
+}
+
+void MSetValuesToAllAux(Widget w, char* widget_name, va_list argptr)
+{
+	MSetResources(w, widget_name,argptr);
+
+	if (XtIsComposite(w))
+	{
+		WidgetList wlist;
+		int num;
+		Arg al[5];
+		int ac = 0;
+	
+		XtSetArg(al[ac],XmNnumChildren,(XtPointer)&num); ac++;
+		XtSetArg(al[ac],XmNchildren,(XtPointer)&wlist); ac++;
+		XtGetValues(w, al, ac);
+
+		for (int i = 0; i < num; i++)
+			MSetValuesToAllAux(wlist[i], widget_name, argptr);
+	}
+}
+
+void MAppContext::init(int& argc, char* argv[],int dontfail)
+
+{
+        XtToolkitInitialize ();
+
+        app_context = XtCreateApplicationContext ();
+
+#if (XmVersion >= 1002)
+        display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+                                 NULL, 0, &argc, argv);
+#else
+	Cardinal cargc = argc;
+        display = XtOpenDisplay (app_context, NULL, argv[0], "Metview",
+                                 NULL, 0, &cargc, argv);
+	argc = (int) cargc;
+#endif
+        if (!display )
+
+        {
+			if(!dontfail)
+			{
+				printf("%s: can't open display, exiting...\n", argv[0]);
+				exit (0);
+			}
+			else printf("Warning: can't open display\n");
+        }
+
+/*
+	XmRegisterConverters();
+        XtAddConverter( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0);
+*/
+
+}
+
+void MWidget::setValue(const char* argname, XtPointer argvalue)
+{
+    	Arg al[1];
+
+    	XtSetArg(al[0], (char*)argname, argvalue);
+
+    	XtSetValues(widget, al, 1);
+}
+
+void MWidget::setValuesToAll(const char* widget_name, ...)
+{
+	if (!widget) return;
+
+	va_list argptr;
+	va_start(argptr,widget_name);
+	MSetResources(widget,(char*)widget_name,argptr);
+
+	if (XtIsComposite(widget))
+	{
+		WidgetList wlist;
+		int num = returnChildren(&wlist);
+
+		for (int i = 0; i < num; i++)
+			MSetValuesToAllAux(wlist[i], (char*)widget_name, argptr);
+	}
+}
+
+void MWidget::putResources(const char* cl, const char* name,const char*  val)
+{
+    if (!val) return;
+    static XrmDatabase database = XtDatabase(XtDisplay(widget));
+ 
+    char res[1024];
+    sprintf(res, "Metview*%s.%s", cl, name);
+    XrmPutStringResource(&database, res, val);
+}
+
+void MWidget::setValues(const char *first, ...)
+{   
+	va_list argptr;
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+
+if (!first) return; // Just in case there is no atributes defined after...
+	va_start(argptr, first);
+
+	ac = MInitArgs(al, (char*)first, argptr);
+	XtSetValues(widget, al, ac);
+	MFreeArgs(al, ac);
+}
+
+void MWidget::getValue(const char * argname, XtPointer argvalue)
+{
+	Arg  al[1];
+
+	XtSetArg(al[0],(char*)argname,argvalue);
+	XtGetValues(widget, al, 1);
+}
+
+MWidget * MWidget::returnObject(Widget widget)
+{
+	MWidget *object;
+        Arg      al[1];
+        int      ac = 0;
+
+    XtSetArg(al[ac],XmNuserData,(XtPointer)&object); ac++;
+    XtGetValues(widget, al, ac);
+
+	return object;
+}
+
+MWidget *MWidget::returnParent()
+{
+	MWidget *mw = NULL;
+	Widget   w  = XtParent(widget);
+	
+	while (!mw && w && !XtIsApplicationShell(w) && !XtIsTopLevelShell(w)) { 
+	   	mw = returnObject(w);
+		w  = XtParent(w);
+	}
+
+	return mw;
+}
+
+int  MWidget::returnChildren(Widget **children)
+{
+   	int num;
+
+	getValue(XmNnumChildren, (XtPointer)&num); 
+	getValue(XmNchildren, (XtPointer)children);
+	
+	return num;
+}
+
+int  MWidget :: manageItsChildren()
+{
+	Widget *children;
+	int num;
+
+	if (!XtIsComposite(widget)) return 0;
+	num = returnChildren(&children);
+
+	XtManageChildren(children,num);
+
+	return 1;
+}
+
+int  MWidget::x()
+{
+   	int num;
+
+	getValue(XmNx, (XtPointer)&num); 
+	
+	return num;
+}
+
+int  MWidget::y()
+{
+   	int num;
+
+	getValue(XmNy, (XtPointer)&num); 
+	
+	return num;
+}
+
+int  MWidget::width() 
+{
+    Dimension w;
+
+    getValue(XmNwidth, (XtPointer)&w);
+    return (int)w;
+
+}
+
+int  MWidget::height() 
+{
+    Dimension h;
+
+    getValue(XmNheight, (XtPointer)&h);
+    return (int)h;
+}
+
+char * MWidget::getLabel()
+{
+        XmString xmstrings;
+	char 	 *s;
+
+        getValue(XmNlabelString, (XtPointer)&xmstrings);
+
+        s =  Mxstos(xmstrings);
+
+	XmStringFree(xmstrings);
+
+	return s;
+}
+
+MWidget *MWidget::returnChild(const char * name)
+{       
+/*
+	Widget *children;
+        int num = returnChildren(&children);
+	int ind;
+
+	if (num <= 0) return NULL;
+
+	for ( ind = 0; ind < num ; ind++)
+                if (!strcmp(name, XtName(children[ind])))
+                        break;
+*/
+ 
+	Widget c = XtNameToWidget(widget, name);
+ 
+        return (c) ? returnObject(c) : NULL;
+
+}
+void MWidget::addEventProc(EventMask event_mask, XtEventHandler proc,
+                         XtPointer data)
+{
+	XtAddEventHandler(widget, event_mask, False, proc, data);
+}
+
+void MWidget::removeEventProc(EventMask event_mask, XtEventHandler proc,
+                                XtPointer data)
+{
+    XtRemoveEventHandler(widget, event_mask, False, proc, data);
+
+}
+void MWidget::addProc(const char* cb_name, ...)
+{
+   va_list 	  argptr;
+   const char 	  *cbname;
+   XtCallbackProc cbproc;
+   XtPointer 	  cbdata;
+
+   // get first callback name
+
+   va_start(argptr, cb_name);
+   cbname = cb_name;
+
+   // remaining callbacks
+
+    while (cbname != NULL)
+    {
+        // add callback
+
+        cbproc = va_arg(argptr, XtCallbackProc);
+        cbdata = va_arg(argptr, XtPointer);
+	XtAddCallback(widget, cbname, cbproc, cbdata);
+
+      	// get next callback name
+
+	cbname = va_arg(argptr, char *);
+    }
+
+   va_end(argptr);
+	
+}
+void MWidget::removeProc(const char* cb_name, ...)
+{
+   va_list 	  argptr;
+   const char 	  *cbname;
+   XtCallbackProc cbproc;
+   XtPointer 	  cbdata;
+
+   // get first callback name
+
+   va_start(argptr, cb_name);
+   cbname = cb_name;
+
+   // remaining callbacks
+
+    while (cbname != NULL)
+    {
+        // add callback
+
+        cbproc = va_arg(argptr, XtCallbackProc);
+        cbdata = va_arg(argptr, XtPointer);
+	XtRemoveCallback(widget, cbname, cbproc, cbdata);
+
+      	// get next callback name
+
+	cbname = va_arg(argptr, char *);
+    }
+
+   va_end(argptr);
+	
+}
+
+void MWidget::setFont(const char *font, ...)
+ 
+{       
+	va_list argptr;
+        Arg al[64];           // Arg List
+        register int ac = 0;  // Arg Count
+        char *argname, *argvalue;
+	char from_s [256];    // For font list conversion 
+	XrmValue from_value, to_value; 
+
+ 
+        va_start(argptr, font);
+       
+        ac = 0;
+ 
+        while ((argname = va_arg(argptr, char *)) != NULL )
+        {
+                argvalue = va_arg(argptr, char*);
+		sprintf ( from_s, argvalue );
+		from_value.size = strlen(from_s)+1;
+		from_value.addr = from_s;
+		XtConvert(widget, XmRString, &from_value, XmRFontList, &to_value);
+		if (to_value.size)
+			XtSetArg(al[ac], argname, *(int *)to_value.addr); ac++;
+        }
+        XtSetValues ( widget,al, ac );
+}
+
+struct pcache {
+	pcache *next;
+	char   *name;
+	Pixmap pixmap;
+	Pixel  fg;
+	Pixel  bg;
+};
+
+static pcache *pix;
+
+Pixmap MWidget::getPixmapFromFile(const char *file)
+{   
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+    Pixel fg, bg;
+
+	if(file == NULL) return XmUNSPECIFIED_PIXMAP;
+       
+    XtSetArg(al[ac], XmNforeground, &fg ); ac++;
+    XtSetArg(al[ac], XmNbackground, &bg ); ac++;
+    XtGetValues(widget, al, ac );
+
+	// look if the pixmap is cached
+
+	pcache *p = pix;
+
+	while(p)
+	{
+		if(p->fg == fg && p->bg == bg && strcmp(file,p->name) == 0)
+			return p->pixmap;
+		p = p->next;
+	}
+
+
+ 
+	Pixmap pixmap;
+	pixmap = XmGetPixmap(XtScreen(widget),(char*)file,fg,bg);
+
+	if(pixmap == XmUNSPECIFIED_PIXMAP)
+	{
+		Display *dpy = XtDisplay(widget);
+		int     screen = DefaultScreen(dpy);
+		Window  root   = RootWindow(dpy,screen);
+		Pixmap shape;
+		XpmAttributes atrib;
+
+		atrib.valuemask = XpmExactColors | XpmCloseness;
+		atrib.exactColors = 0;
+		atrib.closeness = 65535;
+
+		if(XpmReadFileToPixmap(dpy,root,(char*)file,
+			&pixmap,&shape,&atrib) == PixmapSuccess)
+			_XmInstallPixmap(pixmap,XtScreen(widget),(char*)file, fg,bg);
+		else 
+			pixmap = XmUNSPECIFIED_PIXMAP;
+
+	}
+
+	// Add to cache
+
+	p         = XtNew(pcache);
+	p->pixmap = pixmap;
+	p->fg     = fg;
+	p->bg     = bg;
+	p->name   = XtNewString(file);
+	p->next   = pix;
+	pix       = p;
+
+
+	return pixmap;
+}
+void MWidget::overlayButtonPixmaps(const char*file)
+{
+	Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+
+	Pixmap upper, lower, pixmap;
+    upper = getPixmapFromFile(file);
+
+	if(upper==XmUNSPECIFIED_PIXMAP)
+		return;
+
+	getValue(XmNlabelPixmap, (XtPointer) &lower);
+
+	if(lower==XmUNSPECIFIED_PIXMAP)
+		return;
+
+	pixmap = OverlayPixmaps(widget, lower, upper, -1, -1); /* centered */
+
+	XtSetArg(al[ac],XmNlabelPixmap,pixmap); ac++;
+
+    if(pixmap != XmUNSPECIFIED_PIXMAP)
+    {
+        Pixmap disabled = MakeDisabledPixmap(widget,pixmap);
+        XtSetArg(al[ac],XmNlabelInsensitivePixmap,disabled); ac++;
+    }
+    XtSetValues ( widget,al, ac );
+}
+
+void  MWidget::setButtonPixmaps(Pixmap pixmap) 
+{
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+
+	// Set pixmap background to widget background
+	if(pixmap != XmUNSPECIFIED_PIXMAP)
+		pixmap = CopyBackground(widget,pixmap);
+
+	XtSetArg(al[ac],XmNlabelPixmap,pixmap); ac++;
+
+	if(pixmap != XmUNSPECIFIED_PIXMAP)
+	{
+		Pixmap disabled = MakeDisabledPixmap(widget,pixmap);
+		XtSetArg(al[ac],XmNlabelInsensitivePixmap,disabled); ac++;
+	}
+	XtSetValues ( widget,al, ac );
+}
+
+
+void MWidget::setButtonPixmaps(const char *file)
+{
+
+	Pixmap pixmap = getPixmapFromFile(file);
+
+	setButtonPixmaps(pixmap);
+
+}
+
+void MWidget::setPixmap(const char *pixmap, ...)
+{   
+	va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+    char *argname, *argvalue;
+ 
+    va_start(argptr, pixmap);
+       
+ 
+    while ((argname = va_arg(argptr, char *)) != NULL )
+	{
+		argvalue = va_arg(argptr, char*);
+		Pixmap pixmap = getPixmapFromFile(argvalue);
+		XtSetArg(al[ac],argname, pixmap);
+		ac++;
+	}
+    XtSetValues ( widget,al, ac );
+	va_end(argptr);
+}
+
+void MWidget::setHalfPixmap(const char *pixmap, ...)
+{   
+	va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+    char *argname, *argvalue;
+ 
+    va_start(argptr, pixmap);
+       
+ 
+    while ((argname = va_arg(argptr, char *)) != NULL )
+	{
+		argvalue = va_arg(argptr, char*);
+		Pixmap pixmap = getPixmapFromFile(argvalue);
+		pixmap = MakeHalfPixmap(widget, pixmap);	
+		XtSetArg(al[ac],argname, pixmap);
+		ac++;
+	}
+    XtSetValues ( widget,al, ac );
+	va_end(argptr);
+}
+
+
+void MWidget::setColor(const char *pixmap, ...)
+ 
+{   
+    va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+    char from_s [256];
+    XrmValue from_value, to_value;
+    char *argname, *argvalue;
+	
+ 
+    //if (DefaultDepthOfScreen(DefaultScreenOfDisplay(XtDisplay(widget))) != 1) return;
+
+    va_start(argptr, pixmap);
+       
+    ac = 0;
+
+ 
+    while ((argname = va_arg(argptr, char *)) != NULL )
+    {
+         argvalue = va_arg(argptr, char*);
+         sprintf ( from_s, argvalue );
+         from_value.size = strlen(from_s)+1;
+         from_value.addr = from_s;
+         XtConvert(widget, XmRString, &from_value, XmRPixel, &to_value);
+         if (!to_value.addr) {
+			sprintf ( from_s, "black" );
+         	from_value.size = strlen(from_s)+1;
+         	from_value.addr = from_s;
+			XtConvert(widget, XmRString, &from_value, XmRPixel, &to_value);
+		}
+		XtSetArg(al[ac], argname, *(int *)to_value.addr);
+		
+        ac++;
+    }
+    XtSetValues ( widget,al, ac );
+      
+}
+
+
+Boolean MWidget::isSensitive() 
+
+{
+	Boolean sensitive;
+
+	getValue(XmNsensitive, &sensitive);
+
+	return sensitive;
+}
+
+void MWidget::setCursor(unsigned int cursor)
+{
+	Widget parent;
+
+	parent = widget;
+	while ( !XtIsApplicationShell(parent)) parent = XtParent(parent);
+
+	XDefineCursor (XtDisplay(parent), XtWindow(parent),
+		       XCreateFontCursor (XtDisplay(parent), cursor) );
+
+	XDefineCursor (XtDisplay(widget), XtWindow(widget),
+		       XCreateFontCursor (XtDisplay(widget), cursor) );
+	XFlush(XtDisplay(widget));
+}
+
+void MWidget::resetCursor()
+{
+	Widget parent;
+
+	parent = widget;
+	while ( !XtIsApplicationShell(parent)) parent = XtParent(parent);
+	XUndefineCursor(XtDisplay(parent),XtWindow(parent));
+
+	XUndefineCursor(XtDisplay(widget),XtWindow(widget));
+}
+	
+void MShell::init(Display *display, const char *app_name, int app_argc, 
+		  char **app_argv, ...)
+{   va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+
+    va_start(argptr, app_argv);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+    XtSetArg(al[ac], XmNargc, app_argc); ac++;
+    XtSetArg(al[ac], XmNargv, app_argv); ac++;
+    widget = XtAppCreateShell ( app_name, "Metview",
+		 applicationShellWidgetClass, display, al, ac );
+	
+    attachObject();
+    ident = mShell;
+	MFreeArgs(al, ac);
+}
+
+void MShell::init(MWidget* parent, const char *name, ...)
+{   va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+    if (dialog)
+    	widget = XmCreateDialogShell( parent->widget, (char*)name, al, ac);
+    else
+    	widget = XtCreateWidget(name, topLevelShellWidgetClass, parent->widget, al, ac);
+    attachObject();
+    ident = mShell;
+	MFreeArgs(al, ac);
+}
+
+void MShell :: addWMProc(const char* atom_name, XtCallbackProc proc, XtPointer mydata)
+{
+	// Examples of atom names:
+	// "XM_DELETE_WINDOW"
+	// "XM_TAKE_FOCUS"
+
+	Atom protocol = XmInternAtom (XtDisplay(widget), (char*)atom_name, FALSE);
+
+	XmAddWMProtocolCallback(widget, protocol, proc, (caddr_t) mydata);
+}
+
+void MForm::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreateForm ( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+        ident = mForm;
+}
+ 
+void MPushButton::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreatePushButton( parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mPushButton;
+	MFreeArgs(al, ac);
+}
+
+void MPushButton::init(Boolean gadget, MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        if (gadget) 
+			widget = XmCreatePushButtonGadget( parent->widget, (char*)name, al, ac);
+		else
+			widget = XmCreatePushButton( parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mPushButton;
+        MFreeArgs(al, ac);
+}
+
+ 
+void MRowColumn::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreateRowColumn( parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mRowColumn;
+	MFreeArgs(al, ac);
+}
+
+
+void MRowColumn::clear()
+{
+
+    Widget *childs;
+    int num;
+
+    num = returnChildren(&childs);
+
+    for (int i = num-1; i >=0 ; i--) 
+// <**Sylvie(28/09/93)**> XtUnmanageChild(childs[i]);
+		XtDestroyWidget(childs[i]);
+
+}
+
+void MRowColumn::addChildrenProc(const char *cb_name, ...) 
+{
+    va_list argptr;
+    const char *cbname;
+    XtCallbackProc cbproc;
+    XtPointer cbdata;
+    Widget *childs;
+    int num;
+ 
+    num = returnChildren(&childs);
+  
+    // get first callback name
+
+    va_start(argptr, cb_name);
+    cbname = cb_name;
+ 
+    while (cbname != NULL)
+    {
+       // add callback to all children
+       cbproc = va_arg(argptr, XtCallbackProc);
+       cbdata = va_arg(argptr, XtPointer);
+       
+       for (int i = num-1; i >=0 ; i--) XtAddCallback(childs[i], 
+			cbname, cbproc, cbdata);
+
+
+       // get next callback
+       cbname = va_arg(argptr, char*);
+    }
+}
+
+void MRowColumn::addItem(short sort, const char *name, ...)
+
+{   va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+
+    va_start(argptr, name);
+    switch (sort)
+    {
+		case mPushButton: 
+		{
+			MPushButton *button = new MPushButton;
+			button->init(False, (MWidget *)this, name, XmNlabelString, name, NULL);
+			ac = MInitArgs(al, (const char*)NULL, argptr);
+        		XtSetValues(button->widget, al, ac);
+			MFreeArgs(al, ac);
+//<**Sylvie(27/09/93)**> button->manage();
+			break;
+		}
+		case mToggleButton:
+		{
+			MToggleButton *button = new MToggleButton;
+			button->init(True, (MWidget *)this, name, XmNlabelString, name, NULL );
+			ac = MInitArgs(al, (const char*)NULL, argptr);
+        		XtSetValues(button->widget, al, ac);
+//<**Sylvie(27/09/93)**>  button->manage();
+			MFreeArgs(al, ac);
+			break;
+		}
+     }
+
+}
+		
+			
+void MRowColumn::select(const char *name)
+{
+	MWidget  *child = returnChild(name);
+
+	if (child) ( (MToggleButton *) child)->select(True);
+}
+
+void MRowColumn::unselect(const char *name)
+{
+	MWidget  *child = returnChild(name);
+
+	if (child) XmToggleButtonSetState(child->widget, False, True);
+}
+	
+void MRowColumn::select()
+ 
+{
+        Widget  *children;
+        int num = returnChildren(&children);
+ 
+        for (int i = 0; i < num; i++)
+                select(XtName(children[i]));
+ 
+}
+void MRowColumn::unselect()
+ 
+{
+        Widget  *children;
+        int num = returnChildren(&children);
+ 
+        for (int i = 0; i < num; i++)
+                unselect(XtName(children[i]));
+}
+
+void MRowColumn::sensitive()
+ 
+{
+        Widget  *children;
+        int num = returnChildren(&children);
+ 
+        for (int i = 0; i < num; i++)
+                sensitive(XtName(children[i]));
+ 
+}
+void MRowColumn::insensitive()
+ 
+{
+        Widget  *children;
+        int num = returnChildren(&children);
+ 
+        for (int i = 0; i < num; i++)
+                insensitive(XtName(children[i]));
+}
+
+int MRowColumn::returnSelectedItems(MWidget **items)
+
+{
+	int 	nb;
+	int 	count = 0;
+	Widget  *children;
+	Arg 	 al[1];
+	int	 ac = 0;
+	Boolean  code;
+
+	nb = returnChildren(&children);
+
+	for (int i = 0; i < nb; i++)
+	{	
+		XtSetArg(al[ac],XmNset,&code); ac++;
+		XtGetValues(children[i], al, ac);
+		if (code) items[count++] = returnObject(children[i]);
+		ac = 0;
+	}
+	return count; 
+
+}
+
+int MRowColumn::returnSelectedItems(Widget *items)
+{
+	int 	nb;
+	int 	count = 0;
+	Widget  *children;
+	Arg 	 al[1];
+	int	 ac = 0;
+	Boolean  code;
+
+	nb = returnChildren(&children);
+
+	for (int i = 0; i < nb; i++)
+	{	
+		XtSetArg(al[ac],XmNset,&code); ac++;
+		XtGetValues(children[i], al, ac);
+		if (code) items[count++] = children[i];
+		ac = 0;
+	}
+	return count; 
+
+}
+
+int MRowColumn::returnSelectedItems(char **items)
+{
+	Widget  item[200];
+	int 	count = returnSelectedItems(item);
+
+	if (count > 200) 
+	{
+		printf("Warning returnSelectedItems : list truncated to 200\n");
+		count = 200;
+	}
+	for (int i = 0; i < count; i++) items[i] = XtName(item[i]);
+
+	return count; 
+}
+
+char * MRowColumn::returnSelectedItemLabel()
+{
+	Widget	 w[200];
+	Arg	 al[1];
+	int 	 ac = 0;
+	XmString xmstrings;
+	char     *string;
+	int      count = returnSelectedItems(w);
+
+	if (count)
+	{
+		XtSetArg(al[ac], XmNlabelString, (XtPointer) &xmstrings); ac++;
+		XtGetValues(w[0], al, ac);
+		string = Mxstos(xmstrings);
+		XmStringFree(xmstrings);
+
+		return string;
+	}
+	else
+		return NULL;
+}
+
+void MRowColumn::sensitive(const char *name)
+{
+	MWidget  *child = returnChild(name);
+	if (child) child->sensitive();
+}
+
+void MRowColumn::insensitive(const char *name)
+{
+	MWidget  *child = returnChild(name);
+	if (child) child->insensitive();
+}
+
+Boolean MRowColumn::isSensitive(const char *name)
+{
+	MWidget  *child = returnChild(name);
+	if (child) return child->isSensitive();
+	else return 0;
+}
+
+void MLabel::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+
+	va_start(argptr, name);
+	ac = MInitArgs(al, (const char*)NULL, argptr);
+	if (parent->isMOptionMenu()) 
+	{
+		widget = XmOptionLabelGadget ( parent->widget);
+		attachObject();
+		XtSetValues(widget, al, ac);
+	}
+	else
+	{
+        	widget = XmCreateLabel( parent->widget, (char*)name, al, ac);
+		attachObject();
+	}
+	ident = mLabel;
+	MFreeArgs(al, ac);
+}
+
+void MLabel::init(Boolean gadget, MWidget* parent, const char *name, ...)
+{
+	va_list argptr;
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+
+	va_start(argptr, name);
+	ac = MInitArgs(al, (const char*)NULL, argptr);
+    if (gadget) widget = XmCreateLabelGadget( parent->widget, (char*)name, al, ac);
+    else widget = XmCreateLabel( parent->widget, (char*)name, al, ac);
+	attachObject();
+	ident = mLabel;
+	MFreeArgs(al, ac);
+}
+
+void MScrolledList::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+	
+	va_start(argptr, name);
+	ac = MInitArgs(al, (const char*)NULL, argptr);
+	widget = XmCreateScrolledList( parent->widget, (char*)name, al, ac);
+	attachObject();
+	ident = mScrolledList;
+	MFreeArgs(al, ac);
+}
+
+void MScrollBar::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+
+	if(!strcmp(name, "hScrollBar"))
+		parent->getValue(XmNhorizontalScrollBar, (XtPointer)&widget);
+	else if (!strcmp(name, "VscrollBar"))
+		parent->getValue(XmNverticalScrollBar, (XtPointer)&widget);
+	else
+	{
+    	va_start(argptr, name);
+        widget = XmCreateScrollBar( parent->widget, (char*)name, al, ac);
+	}
+	attachObject();
+	ident = mScrollBar;
+}
+	
+void MScrollBar::scrollWH(MWidget *parent)
+{
+	parent->getValue(XmNhorizontalScrollBar, (XtPointer)&widget);
+	attachObject();
+	ident = mScrollBar;
+}
+
+void MScrollBar::scrollWV(MWidget *parent)
+{
+	parent->getValue(XmNverticalScrollBar, (XtPointer)&widget);
+	attachObject();
+	ident = mScrollBar;
+}
+
+void MScrolledWindow::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg al[64];           // Arg List
+    	register int ac = 0;  // Arg Count
+
+    	va_start(argptr, name);
+    	ac = MInitArgs(al, (const char*)NULL, argptr);
+    	widget = XmCreateScrolledWindow( parent->widget, (char*)name, al, ac);
+    	attachObject();
+	
+   	ident = mScrolledWindow;
+	MFreeArgs(al, ac);
+}
+
+void MScrolledWindow::manage(MWidget *h, MWidget *v, MWidget *w)
+{
+	XmScrolledWindowSetAreas(widget, h->widget, v->widget, w->widget );
+	XtManageChild ( widget);
+}
+
+void MScrolledWindow::manage(MWidget *w)
+{
+	Widget h,v;
+	XtVaGetValues(widget,
+		XmNverticalScrollBar,  &v,
+		XmNhorizontalScrollBar,&h,
+		NULL);
+	XmScrolledWindowSetAreas(widget, h, v, w->widget );
+	XtManageChild ( widget);
+}
+
+void MList::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg	 al[64];           // Arg List
+    	register int ac = 0;  // Arg Count
+
+    	va_start(argptr, name);
+    	ac = MInitArgs(al, (const char*)NULL, argptr);
+    	widget = XmCreateScrolledList( parent->widget, (char*)name, al, ac);
+    	attachObject();
+    	ident = mList;
+	MFreeArgs(al, ac);
+}
+
+void MList::setValues(const char* proc, ...)
+{   
+	va_list argptr;
+   	Arg al[64];          
+  	register int ac = 0;
+
+   	va_start(argptr, proc);
+
+   	ac = MInitArgs(al, (char*)proc, argptr);
+  	XtSetValues(XtParent(widget), al, ac);
+	MFreeArgs(al, ac);
+}
+void MList::addListMax(int n, const char *name)
+{
+	xec_AddListMax(widget, n, name);
+}
+
+void MList::addListMax(const char *name)
+{
+	int count;
+
+	getValue(XmNvisibleItemCount, (XtPointer) &count);
+
+	xec_AddListMax(widget, count, name);
+}
+
+void MList::addItem(int n, const char *name)
+
+{
+      	XmString item; /* For item */
+
+        item = Mstoxs(name);
+
+	XmListAddItem(widget, item, n+1);
+
+	XmStringFree(item);
+}
+
+void MList::addItem(int n, XmString item)
+{
+	XmListAddItem(widget, item, n+1);
+}
+
+void MList::addItemUnselected(int n, const char *name)
+{
+    XmString item = Mstoxs(name); /* For item */
+
+	XmListAddItemUnselected(widget, item, n+1);
+
+	XmStringFree(item);
+}
+
+void MList::addItemUnselected(int n, XmString item)
+{
+	XmListAddItemUnselected(widget, item, n+1);
+}
+
+void MList::addItems(int n, int count, XmStringTable items)
+{
+	XmListAddItems(widget, items, count, n+1);
+}
+
+void MList::clear()
+{
+	XmListDeleteAllItems(widget);
+}
+
+void MList::selectItem(const char * item, Boolean notify)
+{
+	XmString xs;
+
+	xs = Mstoxs(item);
+	XmListSelectItem(widget, xs, notify);
+	XmStringFree(xs);
+}
+
+void MList::selectItem(int item, Boolean notify)
+{
+	XmListSelectPos(widget, item+1, notify);
+}
+
+void MList::unselectItem(const char * item)
+{
+	XmString xs;
+
+	xs = Mstoxs(item);
+	XmListDeselectItem(widget, xs);
+	XmStringFree(xs);
+}
+
+void MList::unselectItem(int item)
+{
+	
+	XmListDeselectPos(widget, item+1);
+}
+
+void MList::unselectAllItems()
+{
+	XmListDeselectAllItems(widget);
+}
+
+int MList::returnSelectedItems(XmStringTable *items)
+{
+	int     count;
+	getValue(XmNselectedItemCount, (XtPointer)&count);
+	getValue(XmNselectedItems, (XtPointer)items);
+	return count;
+}
+
+
+int MList::returnSelectedItems(char **items)
+{
+	int 	count;
+	getValue(XmNselectedItemCount, (XtPointer)&count); 
+
+	XmString *sel;
+	getValue(XmNselectedItems, (XtPointer)&sel);
+
+	for (int i = 0; i < count; i++)
+		items[i] = Mxstos(sel[i]);
+	return count;
+}
+
+int MList::returnSelectedItems(int **items)
+{
+	int 	count;
+	if (!XmListGetSelectedPos(widget, items, &count))
+		return 0; 
+	for (int i = 0; i < count; i++) ((*items)[i])--; 
+	return count;
+}
+
+int MList::selected()
+{
+    int     count;
+
+    getValue(XmNselectedItemCount, (XtPointer)&count);
+    return count;
+}
+
+int MList::listed()
+{
+	int     count;
+	getValue(XmNitemCount, (XtPointer)&count);
+	return count;
+}
+
+int MList::returnItems(XmStringTable *items)
+{
+	int count;
+	getValue(XmNitems, (XtPointer) items);
+	getValue(XmNitemCount, (XtPointer) &count);
+	return count;
+}
+
+void MList::setSelectedItems(XmStringTable items, int item_cnt)
+{
+	setValues(XmNselectedItems, items, XmNselectedItemCount, item_cnt, 0);
+}
+
+
+void MToggleButton::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg al[64];           // Arg List
+   	 register int ac = 0;  // Arg Count
+
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+    widget = XmCreateToggleButton( parent->widget, (char*)name, al, ac);
+    attachObject();
+    ident = mToggleButton;
+	MFreeArgs(al, ac);
+}
+
+void MToggleButton::init(Boolean gadget, MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg al[64];           // Arg List
+   	 register int ac = 0;  // Arg Count
+
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+    if (gadget) 
+		widget = XmCreateToggleButtonGadget( parent->widget, (char*)name, al, ac);
+    else widget = XmCreateToggleButton( parent->widget, (char*)name, al, ac);
+    attachObject();
+    ident = mToggleButton;
+	MFreeArgs(al, ac);
+}
+
+Boolean  MToggleButton::isSelected()
+{
+	return XmToggleButtonGetState(widget);
+}
+
+void MToggleButton::select(Boolean notify)
+{
+	XmToggleButtonSetState(widget, True, notify);
+}
+void MToggleButton::unselect()
+{
+	XmToggleButtonSetState(widget, False, False);
+}
+
+void MTextField::init(MWidget* parent, const char *name, ...)
+{   va_list argptr;
+    Arg al[64];           // Arg List
+    register int ac = 0;  // Arg Count
+
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+    widget = XmCreateTextField( parent->widget, (char*)name, al, ac);
+    attachObject();
+    ident = mTextField;
+	MFreeArgs(al, ac);
+}
+
+void MTextField::setValue(float v)
+{
+    char str[30];
+
+    sprintf(str, "%f", v);
+    MWidget :: setValue(XmNvalue, str);
+}
+
+void MTextField::setValue(double v)
+{
+    char str[30];
+
+    sprintf(str, "%g", v);
+    MWidget :: setValue(XmNvalue, str);
+}
+
+void MTextField::setValue(int v)
+{
+    char str[30];
+
+    sprintf(str, "%d", v);
+    MWidget :: setValue(XmNvalue, str);
+}
+
+char * MTextField::returnValue()
+{
+	char *value;
+	getValue(XmNvalue, (XtPointer) &value);
+
+	return value;
+}
+void MMenuBar::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreateMenuBar( parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mSeparator;
+	MFreeArgs(al, ac);
+}
+void MSeparator::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreateSeparator( parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mSeparator;
+	MFreeArgs(al, ac);
+}
+void MOptionMenu::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        widget = XmCreateOptionMenu( parent->widget, (char*)name, al, ac);
+        attachObject();
+        ident = mOptionMenu;
+	MFreeArgs(al, ac);
+}
+
+void MOptionMenu::manage(MWidget *menu)
+{
+	setValues(XmNsubMenuId, menu->widget, NULL);
+	XtManageChild(widget);
+}
+
+void MOptionMenu::addItem(const char * name)
+{
+	Widget menu;
+	MWidget *Menu;
+	MPushButton *button = new MPushButton;
+
+	getValue(XmNsubMenuId, (XtPointer) &menu);
+	Menu = returnObject(menu);
+	
+	button->init(Menu, name, 
+		XmNlabelString, (XtArgVal) name,
+		NULL);
+//<**Sylvie(27/09/93)**> button->manage();
+	
+}
+
+void MOptionMenu::clear()
+{
+	Widget menu;
+	MWidget *Menu;
+    	Widget *childs;
+	int num;
+
+	getValue(XmNsubMenuId, (XtPointer) &menu);
+	Menu = returnObject(menu);
+
+	num = Menu->returnChildren(&childs);
+
+	for (int i = num-1; i >=0 ; i--) XtDestroyWidget(childs[i]);
+}
+
+void MOptionMenu::selectItem(const char * item)
+{
+	Widget menu;
+	MWidget *Menu;
+    	MWidget *child;
+
+	getValue(XmNsubMenuId, (XtPointer) &menu);
+	Menu = returnObject(menu);
+
+	child  = Menu->returnChild(item);
+	if (child)
+		setValues(XmNmenuHistory, child->widget, NULL);
+
+}
+
+void MOptionMenu::selectItem(int position)
+{
+	Widget menu;
+	MWidget *Menu;
+    	Widget *children;
+	int num;
+
+	getValue(XmNsubMenuId, (XtPointer) &menu);
+	Menu = returnObject(menu);
+
+	num = Menu->returnChildren(&children);
+
+	if (position < num)
+		setValues(XmNmenuHistory, children[position], NULL);
+}
+
+int MOptionMenu::returnSelectedItems(char **items)
+{
+	Widget widget;
+
+	getValue(XmNmenuHistory, (XtPointer) &widget);
+	items[0] = XtName(widget);
+	return 1;
+}
+
+char * MOptionMenu::returnSelectedItemLabel()
+{
+    	Widget w;
+    	Arg al[1];
+    	int ac = 0;
+    	XmString xmstrings;
+    	char*   s;
+
+    	getValue(XmNmenuHistory, (XtPointer) &w);
+    	XtSetArg(al[ac], XmNlabelString, (XtPointer) &xmstrings); ac++;
+    	XtGetValues(w, al, ac);
+
+    	s = Mxstos(xmstrings);
+    	XmStringFree(xmstrings);
+
+    	return s;
+}
+
+MWidget* MOptionMenu::returnSelectedItem()
+{
+    	Widget w;
+
+    	getValue(XmNmenuHistory, (XtPointer) &w);
+    	return returnObject(w);
+}
+
+void MCascadeButton::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg	 al[64];           // Arg List
+    	register int ac = 0;  // Arg Count
+
+    	va_start(argptr, name);
+    	ac = MInitArgs(al, (const char*)NULL, argptr);
+    	if (parent->isMOptionMenu()) 
+    	{
+        	widget = XmOptionButtonGadget ( parent->widget);
+        	XtSetValues(widget, al, ac);
+    	}
+    	else widget = XmCreateCascadeButton( parent->widget, (char*)name, al, ac);
+	
+    	attachObject();
+    	ident = mCascadeButton;
+	MFreeArgs(al, ac);
+}
+void MCascadeButton::init(Boolean gadget, MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg	 al[64];           // Arg List
+    	register int ac = 0;  // Arg Count
+
+    	va_start(argptr, name);
+    	ac = MInitArgs(al, (const char*)NULL, argptr);
+    	if (gadget)  widget = XmCreateCascadeButtonGadget( parent->widget, (char*)name, al, ac);
+    	else widget = XmCreateCascadeButton( parent->widget, (char*)name, al, ac);
+	
+    	attachObject();
+    	ident = mCascadeButton;
+	MFreeArgs(al, ac);
+}
+
+
+void MCascadeButton::manage(MWidget *child)
+{
+	MWidget*  parent = returnParent();
+
+	if (!parent->isMOptionMenu()) 
+		setValues(XmNsubMenuId, child->widget, NULL);
+	XtManageChild(widget);
+}
+
+void MPulldownMenu::init(MWidget* parent, const char *name, ...)
+{   
+	va_list argptr;
+    	Arg al[64];           // Arg List
+    	register int ac = 0;  // Arg Count
+    	Widget menu;
+
+    	menu = parent->widget;
+
+    	while (!XmIsRowColumn(menu) && !XmIsForm(menu)) menu = XtParent(menu);
+
+    	va_start(argptr, name);
+    	ac = MInitArgs(al, (const char*)NULL, argptr);
+    	ident = mPulldownMenu;
+    	widget = XmCreatePulldownMenu( menu, (char*)name, al, ac);
+    	attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MFrame::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mFrame;
+        widget = XmCreateFrame( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MDrawingArea::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mDrawingArea;
+        widget = XmCreateDrawingArea( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MDrawingArea::mouseXY(int *x, int *y)
+{
+	
+    Window  root, child;
+    int     root_x, root_y;
+    unsigned int keys;
+
+    XQueryPointer(XtDisplay(widget), XtWindow(widget), &root, &child,
+                  &root_x, &root_y, x, y, &keys);
+}
+
+int  MDrawingArea::treatEvent(XEvent *event, int *x, int *y)
+{
+
+    mouseXY(x, y);
+
+    switch (event->type)
+    {
+        case EnterNotify:
+            return WIN_ENTER;
+        case LeaveNotify:
+            return WIN_EXIT;
+        case ButtonPress:
+            if (event->xbutton.button == Button1)
+                return B1_DOWN;
+            if (event->xbutton.button == Button2)
+                return B2_DOWN;
+            if (event->xbutton.button == Button3)
+                return B3_DOWN;
+	    break;
+        case ButtonRelease:
+            if (event->xbutton.button == Button1)
+                return B1_UP;
+            if (event->xbutton.button == Button2)
+                return B2_UP;
+            if (event->xbutton.button == Button3)
+                return B3_UP;
+            break;
+        case MotionNotify:
+            if (event->xmotion.state & Button1Mask)
+                return B1_DRAG;
+            else if(event->xmotion.state & Button2Mask)
+			return B2_DRAG;
+            	else if(event->xmotion.state & Button3Mask)
+			return B3_DRAG;
+            else
+		return M_MOVE;
+	    //break;
+        case KeyPress:
+            return ASCII;
+    }
+	return 0;
+}
+
+char *MDrawingArea::keyPressed( XEvent *event) 
+{
+        static char buffer[1];
+        int count;
+        KeySym keysym;
+
+        count = XLookupString((XKeyEvent *) event, buffer, 1, &keysym, NULL);
+	return buffer;
+}
+
+
+void MDrawingArea::addTimer(void *canvas, XtTimerCallbackProc Timer, 
+							int interval)
+{
+	if (interval > 0)  speed = (unsigned long) interval;
+	if (speed) XtAppAddTimeOut(XtWidgetToApplicationContext(widget),
+				(unsigned long) speed,
+				Timer,
+				(XtPointer) canvas);
+}
+
+void MDrawingArea::removeTimer()
+{
+	speed = 0;
+}
+
+void  MDrawingArea::resize(int width, int height) 
+{
+	setValues(XmNwidth, width, XmNheight, height,
+		  NULL);
+}
+
+void MScale::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mScale;
+        widget = XmCreateScale( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+int MScale::returnValue()
+{
+	int value;
+
+	getValue(XmNvalue, (XtPointer) &value);
+
+	return value;
+}
+
+void MMessageBox::init(MWidget *parent, const char *name, ...)
+
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mMessageBox;
+        widget = XmCreateMessageBox( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MMessageBox::deleteCancel()
+{
+	Widget cancel;
+
+	getValue(XmNcancelButton, (XtPointer)&cancel);
+
+	XtDestroyWidget(cancel);
+
+}
+
+void MMessageBox::deleteOk()
+{
+	XmString xmstrings;
+
+	deleteCancel();
+
+	xmstrings = Mstoxs("Cancel");
+	setValues(XmNokLabelString, xmstrings, NULL);
+	XmStringFree(xmstrings);
+}
+
+void MMessageBox::manage(const char * message, XtArgVal cat = -1)
+{
+	
+	XmString xmstrings;
+
+	xmstrings = Mstoxs(message);
+	setValues(XmNmessageString, xmstrings, NULL);
+	if ( cat != -1 )  setValues(XmNdialogType, cat, NULL);
+	manage();
+	XmStringFree(xmstrings);
+	
+}
+
+MWidget *MMessageBox::getChild(int nchild)
+{
+    Widget wchild = XmMessageBoxGetChild(widget, (unsigned char) nchild);
+
+	switch (nchild) {
+		case XmDIALOG_CANCEL_BUTTON :
+		case XmDIALOG_HELP_BUTTON   :
+		case XmDIALOG_OK_BUTTON     :
+		{	MPushButton *button = new MPushButton;
+			button->widget 		= wchild;
+			button->ident       = mPushButton;
+			button->attachObject();
+			return (MWidget *) button; 
+		}
+		case XmDIALOG_MESSAGE_LABEL :
+		{	MLabel 		*label	= new MLabel;
+			label->widget		= wchild;
+			label->ident		= mLabel;
+			label->attachObject();
+			return (MWidget *) label;
+		}
+		case XmDIALOG_SEPARATOR		  :
+		{	MSeparator  *sep	= new MSeparator;
+			sep->widget			= widget;
+			sep->ident			= mSeparator;
+			sep->attachObject();
+			return (MWidget *) sep;
+		}
+	}
+	return 0;
+}	
+	
+void MSelectionBox::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mSelectionBox;
+        widget = XmCreateFileSelectionBox( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+MWidget *MSelectionBox::getChild(int nchild)
+{
+    Widget wchild = XmSelectionBoxGetChild(widget, (unsigned char) nchild);
+
+	switch (nchild) {
+		case XmDIALOG_APPLY_BUTTON  :
+		case XmDIALOG_CANCEL_BUTTON :
+		case XmDIALOG_HELP_BUTTON   :
+		case XmDIALOG_OK_BUTTON		:
+		{	MPushButton *button = new MPushButton;
+			button->widget 		= wchild;
+			button->ident       = mPushButton;
+			button->attachObject();
+			return (MWidget *) button; 
+		}
+		case XmDIALOG_LIST			:
+		{	MList       *list   = new MList;
+			list->widget		= wchild;
+			list->ident         = mList;
+			list->attachObject();
+			return (MWidget *) list;
+		}
+		case XmDIALOG_LIST_LABEL	  :
+		case XmDIALOG_SELECTION_LABEL :
+		{	MLabel 		*label	= new MLabel;
+			label->widget		= wchild;
+			label->ident		= mLabel;
+			label->attachObject();
+			return (MWidget *) label;
+		}
+		case XmDIALOG_SEPARATOR		  :
+		{	MSeparator  *sep	= new MSeparator;
+			sep->widget			= widget;
+			sep->ident			= mSeparator;
+			sep->attachObject();
+			return (MWidget *) sep;
+		}
+		case XmDIALOG_TEXT			  :
+		{	MText		*text	= new MText;
+			text->widget 		= wchild;
+			text->ident			= mText;
+			text->attachObject();
+			return (MWidget *) text;
+		}
+	}
+	return 0;
+}	
+	
+void MScrolledText::init(MWidget* parent, const char *name, ...)
+{
+	va_list argptr;
+	Arg al[64];           // Arg List
+	register int ac = 0;  // Arg Count
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+    widget = XmCreateScrolledText( parent->widget, (char*)name, al, ac);
+    ident = mText;
+    MFreeArgs(al, ac);
+}
+		
+void MText::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mText;
+ 		widget = XmCreateText( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MText::moveToEnd()
+{
+	XmTextPosition pos  = XmTextGetLastPosition(widget);
+	XmTextSetInsertionPosition(widget,pos);
+	XmTextSetSelection(widget,pos,pos,CurrentTime);
+	XmTextShowPosition(widget,pos);
+}
+
+char * MText::returnValue()
+{
+
+	return XmTextGetString(widget);
+}
+ 
+void MText::setValue(const char *s)
+{
+//<**Sylvie(27/09/93)**> xsetValues(XmNvalue, s, XmNcursorPosition, strlen(s), NULL);
+	XmTextSetString(widget, (char*)s);
+	
+}
+
+void MText::loadText(const char* tmp, Boolean b)
+{
+	xec_LoadText(widget, tmp, b);
+}
+
+void MText::saveText(const char* tmp)
+{
+	xec_SaveText(widget, tmp);
+}
+
+void MText::replaceSelection(const char *txt)
+{
+	xec_ReplaceTextSelection(widget,txt,0);
+}
+
+void MText::replaceSelection(char c)
+{
+	char x[2];
+	x[0] = c;
+	x[1] = 0;
+	replaceSelection(x);
+}
+
+extern "C" {
+void _XmTextDisableRedisplay(Widget,Boolean);
+void _XmTextEnableRedisplay(Widget);
+};
+
+
+void MText::selectLine(int line)
+{
+	char *p              = XmTextGetString(widget);
+	char *q              = p;
+	XmTextPosition start = 0;
+	XmTextPosition end   = XmTextGetLastPosition(widget);
+	int    n             = 0;
+
+	if(line<=0) line = 1;
+
+	while(*p)
+	{
+		if(*p == '\n') 
+		{ 
+			n++;
+			if(n == line)  
+			{
+				end = p - q;
+				break;
+			}
+			start = p - q + 1;
+		}
+		p++;
+	}
+
+	XmTextSetSelection(widget,start,end,CurrentTime);
+	XmTextShowPosition(widget,start);
+
+	XtFree((char*)q);
+}
+
+void MRadioBox::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        ident = mDragWidget;
+        widget = XmCreateRadioBox( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MRadioBox::addItem(char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        MToggleButton *button = new MToggleButton;
+        button->init((MWidget *)this, name, XmNlabelString, name, NULL );
+        ac = MInitArgs(al, (const char*)NULL, argptr);
+        XtSetValues(button->widget, al, ac);
+        button->manage();
+	MFreeArgs(al, ac);
+}
+ 
+//void MRadioBox::select(char *name)
+//{
+        //MWidget  *child = returnChild(name);
+ 
+        //if (child) ((MToggleButton *)child)->select(True);
+ 
+//}
+
+//void MRadioBox::unselect(char *name)
+//{
+        //MWidget  *child = returnChild(name);
+ 
+        //if (child) child->setValues(XmNset, FALSE, NULL);
+//}
+
+
+void MBulletinBoard::init(MWidget *parent, const char *name, ...)
+{
+   	va_list argptr;
+   	Arg al[64];           /* Arg List */
+   	register int ac = 0;      /* Arg Count */
+ 
+   	va_start(argptr, name);
+   	ac = MInitArgs(al, (const char*)NULL, argptr);
+   	ident = mBulletinBoard;
+   	widget = XmCreateBulletinBoard( parent->widget, (char*)name, al, ac);
+   	attachObject();
+	MFreeArgs(al, ac);
+}
+
+void MPopupMenu::init(MWidget* parent, const char *name, ...)
+{
+	va_list argptr;
+    Arg al[64];           /* Arg List */
+    register int ac = 0;      /* Arg Count */
+ 
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+	ident = mPulldownMenu;
+    widget = XmCreatePopupMenu( parent->widget, (char*)name, al, ac);
+    attachObject();
+    MFreeArgs(al, ac);
+
+}
+
+Boolean MPopupMenu::map(XEvent *event)
+{
+	if (event->xany.type != ButtonPress || 
+		event->xbutton.button != 3)
+			return False;
+
+	XmMenuPosition(widget, (XButtonPressedEvent *)event);
+	XtManageChild(widget);
+	return True;
+	
+}
+void MPopupMenu::manage()
+{
+}
+void MArrowButton::init(MWidget* parent, const char *name, ...)
+{
+	va_list argptr;
+    Arg al[64];           /* Arg List */
+    register int ac = 0;      /* Arg Count */
+ 
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+	ident = mArrowButton;
+    widget = XmCreateArrowButton( parent->widget, (char*)name, al, ac);
+    attachObject();
+    MFreeArgs(al, ac);
+
+}
+void MArrowButton::init(Boolean gadget, MWidget* parent, const char *name, ...)
+{
+	va_list argptr;
+    Arg al[64];           /* Arg List */
+    register int ac = 0;      /* Arg Count */
+ 
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+	ident = mArrowButton;
+    if (gadget) widget = XmCreateArrowButtonGadget( parent->widget, (char*)name, al, ac);
+    else widget = XmCreateArrowButton( parent->widget, (char*)name, al, ac);
+    attachObject();
+    MFreeArgs(al, ac);
+
+}
+void MPanedWindow::init(MWidget* parent, const char *name, ...)
+{
+	va_list argptr;
+    Arg al[64];           /* Arg List */
+    register int ac = 0;      /* Arg Count */
+ 
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char*)NULL, argptr);
+	ident = mPanedWindow;
+    widget = XmCreatePanedWindow( parent->widget, (char*)name, al, ac);
+    attachObject();
+    MFreeArgs(al, ac);
+}
diff --git a/src/libMvMotif/MMotif.hpp b/src/libMvMotif/MMotif.hpp
new file mode 100644
index 0000000..3474d5d
--- /dev/null
+++ b/src/libMvMotif/MMotif.hpp
@@ -0,0 +1,11 @@
+#include <MMotifOnly.hpp>
+#include <MArray.hpp>
+#include <MDrag.hpp>
+#include <MPaper.hpp>
+#include <MTab.hpp>
+#include <MIcon.hpp>
+#include <MLine.hpp>
+#include <MCarousel.hpp>
+#include <MFlow.hpp>
+#include <MColors.hpp>
+#include <MSymbols.hpp>
diff --git a/src/libMvMotif/MMotifOnly.hpp b/src/libMvMotif/MMotifOnly.hpp
new file mode 100644
index 0000000..b6564c3
--- /dev/null
+++ b/src/libMvMotif/MMotifOnly.hpp
@@ -0,0 +1,560 @@
+
+
+#ifndef motif_DEFINED
+#define motif_DEFINED
+
+#include <stdio.h>		/* Other systems need this */
+
+#include <X11/X.h>
+#include <string.h>
+
+#include <stdarg.h>
+
+#include <math.h>
+#include <X11/StringDefs.h>
+
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/DrawingA.h>
+#include <Xm/PushB.h>
+#include <Xm/PushBG.h>
+#include <Xm/Label.h>
+#include <Xm/LabelG.h>
+#include <Xm/List.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ScrollBar.h>
+#include <Xm/Separator.h>
+#include <Xm/TextF.h>
+#include <Xm/Scale.h>
+#include <Xm/ToggleB.h>
+#include <Xm/ToggleBG.h>
+#include <Xm/CascadeB.h>
+#include <Xm/CascadeBG.h>
+#include <Xm/MessageB.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/SelectioB.h>
+#include <Xm/Text.h>
+#include <Xm/ArrowB.h>
+#include <Xm/ArrowBG.h>
+#include <Xm/PanedW.h>
+#include <Drag.h>
+
+#include <X11/cursorfont.h>
+
+//Ghost Busters Against False Definitions!
+#ifdef clear
+#undef clear
+#endif
+
+#define mShell		0
+#define mForm		1
+#define mPushButton	2
+#define mRowColumn	3
+#define mLabel		4
+#define mMenuBar	6
+#define mCascadeButton	7
+#define mPulldownMenu	8
+#define mOptionMenu	9
+#define mFrame		10
+#define mDrawingArea	11
+#define mScrollBar	12
+#define mList		13
+#define mToggleButton	14
+#define mTextField	15
+#define mSeparator	16
+#define mScrolledList	17
+#define mMessageBox	18
+#define mScrolledWindow	19
+#define mScale		20
+#define mMagics		21
+#define mSelectionBox	22
+#define mText		23
+#define mRadioBox        28
+#define mBulletinBoard   33
+#define mPopupMenu       34
+#define mArrowButton       	 35
+#define mPanedWindow       	 36
+
+// New widgets ...
+
+#define mMatrix		24
+#define mChart		25
+#define mDecChart	26
+
+#define mDragWidget     27
+#define mHyper          29
+#define mIconLabel	30
+#define mIconButton	31
+#define mArray	32
+#define mLine	33
+#define mCarousel       	 37
+#define mPaper       	 38
+#define mTab       	 39
+
+// Internal functions....
+
+int MInitArgs(Arg*, const char*, va_list);
+// Initialize an array of type Arg... 
+//        (usefull before a XtSetValues, XtGetValues, XtCreate...
+
+void MFreeArgs(Arg*, int);
+// Free memory...
+
+char * Mxstos(XmString);
+// Convert a XmString to a const char * ...
+//	Allocate the memory.
+
+XmString Mstoxs(const char*);
+// Convert a XmString to a const char * ...
+//	Allocate the memory.
+
+class MAppContext
+{
+public:
+	Display         *display;
+	XtAppContext 	app_context;
+
+	void 		init(int&, char**,int = 0);
+	void 		appMainLoop()	
+				{ XtAppMainLoop(app_context); }
+	void		visMainLoop();
+	Display* 	getDisplay()	
+				{ return display; }	
+	int 		getScreen()	
+				{ return DefaultScreen(display); }	
+        short           getDepth()
+				{ return DefaultDepth(display,getScreen()); }
+};
+
+
+class MWidget 
+{
+	void    *data;
+
+public:
+	Widget  widget;
+	short	ident;
+
+	MWidget(Widget w = NULL,void *d = NULL) { data = d; widget = w; }
+	int	isRealized() { return (widget && XtIsRealized(widget)); }
+	int	isManaged() { return (widget && XtIsManaged(widget)); }
+	void    manage() 
+			{ XtManageChild(widget); }
+	void    unmanage() 
+			{ XtUnmanageChild(widget); }
+	int	manageItsChildren();
+	void    map() 
+			{ XtMapWidget(widget); }
+	void    unmap() 
+			{ XtUnmapWidget(widget); }
+	void    setValues(const char*, ...);
+	void    setValue(const char*,  XtPointer); 
+	void    getValue(const char*, XtPointer);
+
+	void    setValuesToAll(const char*, ...);
+	//	Set values of widget and all descendents
+	//	Input: List of:
+	//		widget name ("*" to match all)
+	//		resource name
+	//		resource list
+
+	void    addProc(const char*, ...);
+	void    removeProc(const char*, ...);
+	Pixmap 	getPixmapFromFile(const char*);
+	void    setButtonPixmaps(const char*);
+	void    setButtonPixmaps(Pixmap);
+	void 	overlayButtonPixmaps(const char*);
+	void 	setPixmap(const char *, ...);
+	void 	setHalfPixmap(const char *, ...);
+	void 	setColor(const char *, ...);
+	void 	putResources(const char *, const char*, const char*);
+	void 	setFont(const char *, ...);
+	Boolean isMOptionMenu() 
+			{ return ( (ident == mOptionMenu) ? TRUE : FALSE); }
+	Display *getDisplay()  
+			{ return XtDisplay(widget); }
+	Window 	getWindow()  
+			{ return XtWindow(widget); }
+	void	attachObject() 
+			{setValue(XmNuserData, (XtPointer) this); }
+	static   MWidget *returnObject(Widget widget);
+	MWidget *returnParent();
+	int	returnChildren(Widget **children);
+	MWidget *returnChild(const char * name);
+	void 	sensitive() 
+			{ XtSetSensitive(widget, True); }
+	void 	insensitive() 
+			{ XtSetSensitive(widget, False); }
+	Boolean isSensitive() ;
+	int	x() ;
+	int	y() ;
+	int	width();
+	int	height();
+	char  	*getLabel();
+	void	setCursor(unsigned int);
+	void	resetCursor();
+        void    attachData(void *d) 
+			{ data = d; }
+        void    *returnData()   
+			{ return data; }
+	const char *  name()  
+			{ return XtName(widget); }
+	void 	destroy()
+			{ XtDestroyWidget(widget); }
+	void 	addEventProc(EventMask event_mask, XtEventHandler proc,
+               		     XtPointer data);
+	void 	removeEventProc(EventMask event_mask, XtEventHandler proc,
+                                XtPointer data);
+
+	void 	GetApplicationResources(XtPointer, XtResourceList, Cardinal,
+									ArgList = NULL, Cardinal = 0);
+	void    GetSubresources(XtPointer, const char *, const char *, XtResourceList,
+						    Cardinal, ArgList = NULL, Cardinal = 0);
+	void    SetMappedWhenManaged(Boolean);
+
+	void    acceptDropCallback(XtCallbackProc cb, XtPointer datum)
+        { DragAcceptDropCallback(widget, cb,  datum); }
+
+	virtual ~MWidget(){}
+};
+
+void Mmanage_link (Widget w, MWidget *client_data, caddr_t call_data);
+
+void Munmanage_link (Widget w, MWidget *client_data, caddr_t call_data);
+
+void Mdisable_link(Widget w, MWidget *client_data, caddr_t call_data);
+
+void Menable_link (Widget w, MWidget *client_data, caddr_t call_data);
+
+class MShell : public MWidget
+{
+	int	dialog;
+public:
+	Widget 	**shells;
+	int	num_shells;
+
+	MShell() { dialog = 1; }
+	void 	init(Display*, const char*, int, char**, ...);
+	void    setTopLevel() { dialog = 0; }
+	void 	init(MWidget* parent, const char* name, ...);
+	void 	realizeWidget() 
+			{ XtRealizeWidget(widget); }
+	void 	manage()
+			{ realizeWidget();
+			  XMapRaised(XtDisplay(widget), XtWindow(widget)); } 
+	void	addWMProc(const char*, XtCallbackProc, XtPointer);
+};
+
+class MForm : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char* name, ...);
+};
+
+class MPushButton : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char* name, ...);
+	void 	init(Boolean, MWidget* parent, const char* name, ...);
+};
+
+class MRowColumn : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char * name, ...);
+	void 	clear();   
+			// Delete all the children of the RowColumn
+	void 	addItem(short buttontype, const char *name, ...);
+			// Add a Button n the RowColumn:
+			// buttontype: mPushButton or mToggleButton 
+	void 	addChildrenProc(const char *proc, ...);
+			// Add Callbacks to all the buttons of the RowColumn. 
+	void 	select(const char *name);
+			// Select the button with the given name.
+	void 	unselect(const char *name);
+			// Unselect the button with the given name.
+	void 	select();
+			// Select all the buttons.
+	void 	unselect();
+			// Unselect all the buttons.
+	int 	returnSelectedItems(Widget *);
+			// Return the selected buttons of the RowColumn.
+	int 	returnSelectedItems(MWidget **);
+			// Return the selected MWidgets of the RowColumn.
+	int 	returnSelectedItems(char **);
+			// Return the names od the selected buttons of the 
+			// RowColumn.
+	char* 	returnSelectedItemLabel();
+			// If the RowColum has a radio behavior return the
+			// name of teh selected button.
+	void 	sensitive(const char *name);
+			// The button with the given name becomes sensitive.
+	void 	insensitive(const char *name);
+			// The button with the given name becomes insensitive.
+	Boolean isSensitive(const char *name);
+			// Is the button with the given name sensitive.
+	void 	sensitive();
+			// All the buttons become sensitive.
+	void 	insensitive();
+			// all the button become insensitive.
+};
+
+class MLabel : public MWidget
+{
+public:
+	void init(MWidget* parent, const char *name, ...);
+	void 	init(Boolean, MWidget* parent, const char* name, ...);
+};
+
+class MScrolledList : public MWidget
+{
+public:
+	void init(MWidget* parent, const char *name, ...);
+};
+
+class MScrollBar : public MWidget
+{
+public:
+	void init(MWidget* parent, const char *name, ...);
+	void scrollWH(MWidget *parent);
+	void scrollWV(MWidget *parent);
+};
+
+class MScrolledWindow : public MWidget
+{
+public:
+	void init(MWidget* parent, const char *name, ...);
+	void manage(MWidget *horiz, MWidget *vert, MWidget *work);
+	void manage(MWidget *work);
+};
+
+class MList : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void 	setValues(const char *proc, ...);
+	void 	clear();
+			// Clear the List.
+	void 	addItem(int n, const char * name);
+			// Add an item at the position n. Check selection
+	void 	addItem(int n, XmString name);
+			// Add an item at the position n using XmString. Check selection
+	void 	addItemUnselected(int n, const char * name);
+			// Add an item at the position n even if selected.
+	void 	addItemUnselected(int n, XmString name);
+			// Add an item at the position n even if selected, using XmString.
+	void	addItems(int n, int count, XmStringTable items);
+			// Add a list of items at position n.
+	void 	selectItem(const char * item, Boolean notify = False);
+			// Select the item with given name.
+			// If notify, the application will be notified
+			// (Callback called...) 
+	void 	selectItem(int item, Boolean notify = False);
+			// Select the item with the given posotion.
+			// If notify, the application will be notified
+			// (Callback called...) 
+	void 	unselectItem(const char * item);
+			// Unselect the item with the given name.
+	void 	unselectItem(int item);
+			// Unselect the item with the given position.
+	void	unselectAllItems();
+			// Unselect all list items.
+	int     returnSelectedItems(XmStringTable *items);
+			// Return selected items as XMStrings
+	int 	returnSelectedItems(char **items);
+			// Return the name of the selected items.
+	int 	returnSelectedItems(int **items);
+			// Return the position of the selected items.
+    int 	selected();
+			// Return the number of selected items.
+	int		listed();
+			// Return number of listed items.
+	int		returnItems(XmStringTable *items);
+			// Return all items in the list and the count.
+	void	setSelectedItems(XmStringTable items, int item_cnt);
+			// Select a list of items from their const char * value.
+	void    addListMax(int, const char *);
+	void    addListMax(const char *);
+
+};
+
+class MToggleButton : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void 	init(Boolean, MWidget* parent, const char* name, ...);
+	Boolean isSelected();
+	void 	select(Boolean select = True);
+			// If select = True , the button will be selected.
+	void 	unselect();
+};
+
+class MTextField : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	char* 	returnValue();
+	void 	setValue(const char *text) 
+			{ MWidget::setValue(XmNvalue, (XtPointer)text);}
+   	void 	setValue(int v);
+   	void 	setValue(float v);
+   	void 	setValue(double v);
+	inline void setString(const char *s) 
+		{ XmTextFieldSetString(widget, (char*)s); }
+	inline char * getString()
+		{ return XmTextFieldGetString(widget); }
+
+};
+
+class MSeparator : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+};
+
+class MMenuBar : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+};
+ 
+class MOptionMenu : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void 	manage(MWidget *child);
+        void 	addItem(const char * name);
+        void 	clear();
+        void 	selectItem(const char * item);
+        void 	selectItem(int position);
+        int 	returnSelectedItems(char **items);
+	char* 	returnSelectedItemLabel();
+	MWidget* returnSelectedItem();
+
+};
+ 
+class MCascadeButton : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void 	init(Boolean,MWidget* parent, const char *name, ...);
+	void 	manage(MWidget *child);
+};
+ 
+class MPulldownMenu : public MRowColumn
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+};
+
+class MFrame : public MWidget
+{
+public:
+	void	init(MWidget* parent, const char *name, ...);
+};
+
+class MScale : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void 	init(Boolean, MWidget* parent, const char* name, ...);
+	int  	returnValue();
+	void 	setValue(int value) 
+			{ MWidget::setValue(XmNvalue, (XtPointer) value); }
+};
+
+class MDrawingArea : public MWidget
+{
+	unsigned long speed;
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	int  	treatEvent(XEvent *event, int *x, int *y);
+	void 	addTimer(void *canvas, XtTimerCallbackProc Timer, 
+		         int interval = -1);
+	void 	removeTimer();
+	void 	resize(int width, int height);
+	char 	*keyPressed(XEvent *event);	
+	void 	mouseXY(int *x, int *y) ;
+
+};
+
+class MMessageBox : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void 	deleteCancel();
+	void 	deleteOk();
+	void 	manage(const char * message, XtArgVal cat);
+	void 	manage() { XtManageChild(widget); }
+	MWidget	*getChild(int child);
+};
+
+class MText : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	char 	*returnValue();
+	void 	setValue(const char *text);
+	void    loadText(const char *, Boolean);
+	void 	saveText(const char *);
+	inline void setString(const char *s) 
+		{ XmTextSetString(widget, (char*)s); }
+	inline char * getString()
+		{ return XmTextGetString(widget); }
+	void replaceSelection(const char*);
+	void replaceSelection(char);
+	void replaceSelection(long);
+	void replaceSelection(double);
+	void setEditable(Boolean on) { XmTextSetEditable(widget,on); }
+	void selectLine(int);
+	void moveToEnd();
+};
+
+class MScrolledText : public MText {
+public:
+	void    init(MWidget* parent, const char *name, ...);
+};
+
+class MSelectionBox : public MWidget
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	MWidget	*getChild(int child);
+};
+class MRadioBox : public MRowColumn
+{
+public:
+        void    init(MWidget *parent, const char *name, ...);
+        void 	addItem(char *name, ...);
+};
+class MBulletinBoard :  public MWidget
+{
+public:
+        void    init(MWidget *parent, const char *name, ...);
+};
+
+class MPopupMenu : public MRowColumn
+{
+public:
+	void 	init(MWidget* parent, const char *name, ...);
+	void    manage();
+	Boolean map(XEvent*);
+};
+
+class MArrowButton : public MWidget
+{
+public :
+	void    init(MWidget *parent, const char *name, ...);
+	void 	init(Boolean, MWidget* parent, const char* name, ...);
+};
+
+class MPanedWindow : public MWidget
+{
+public :
+	void    init(MWidget *parent, const char *name, ...);
+};
+#endif
+
diff --git a/src/libMvMotif/MPaper.cc b/src/libMvMotif/MPaper.cc
new file mode 100755
index 0000000..972b8bb
--- /dev/null
+++ b/src/libMvMotif/MPaper.cc
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MPaper.hpp>
+
+void MPaperWidget::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, NULL, argptr);
+        ident = mPaper;
+        widget = (Widget) CreatePaperWidget( parent->widget, name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+ 
+void MPaperWidget::setPages(PaperRectangle* r)
+{
+	PaperSetPages(widget,r);
+}
+
+PaperRectangle* MPaperWidget::newPage(double top,
+	double left,double bottom,double right)
+{
+	return PaperNewPage(widget,top,left,bottom,right);
+}
+
+PaperRectangle* MPaperWidget::find(XEvent* ev)
+{
+	return PaperFind(widget,ev);
+}
+
+void MPaperWidget::update()
+{
+	PaperUpdate(widget);
+}
+
+PaperRectangle* MPaperWidget::getPages()
+{
+	return PaperGetPages(widget);
+}
+
+void MPaperWidget::insetSelection(double t,double l,double b,double r)
+{
+	PaperInsetSelection(widget,t,l,b,r);
+}
+
+void MPaperWidget::setSize(double h,double v)
+{
+	PaperSetSize(widget,h,v);
+}
+
+void MPaperWidget::getSize(double& h,double& v)
+{
+	PaperGetSize(widget,&h,&v);
+}
+
+void MPaperWidget::splitSelection(int h,int v,double mh,double mv)
+{
+	PaperSplitSelection(widget,h,v,mv,mv);
+}
+
+void MPaperWidget::joinSelection()
+{
+	PaperJoinSelection(widget);
+}
+
+void MPaperWidget::groupSelection()
+{
+	PaperGroupSelection(widget);
+}
+
+void MPaperWidget::ungroupSelection()
+{
+	PaperUngroupSelection(widget);
+}
+
+
+
+void MPaperWidget::alignTop()
+{
+	PaperAlignTop(widget);
+}
+
+void MPaperWidget::alignLeft()
+{
+	PaperAlignLeft(widget);
+}
+
+void MPaperWidget::alignRight()
+{
+	PaperAlignRight(widget);
+}
+
+void MPaperWidget::alignBottom()
+{
+	PaperAlignBottom(widget);
+}
+
+void MPaperWidget::distributeHorizontally()
+{
+	PaperDistributeHorizontally(widget);
+}
+
+void MPaperWidget::distributeVertically()
+{
+	PaperDistributeVertically(widget);
+}
diff --git a/src/libMvMotif/MPaper.hpp b/src/libMvMotif/MPaper.hpp
new file mode 100755
index 0000000..c9d520c
--- /dev/null
+++ b/src/libMvMotif/MPaper.hpp
@@ -0,0 +1,49 @@
+#ifndef mPaper_DEFINED
+#define mPaper_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Paper.h>
+
+class MPaperWidget : public MDrawingArea
+{
+public:
+	void    init(MWidget *parent, const char *name, ...);
+	void setPages(PaperRectangle*);
+	PaperRectangle* newPage(double,double,double,double);
+
+	void size(int,int);
+
+	void splitSelection(int,int,double=0.0,double=0.0);
+	void joinSelection();
+	void groupSelection();
+	void ungroupSelection();
+
+	Boolean canSplitSelection();
+	Boolean canJoinSelection();
+	Boolean canGroupSelection();
+	Boolean canUngroupSelection();
+
+	PaperRectangle* find(XEvent*);
+
+	PaperRectangle* getPages();
+
+	void update();
+
+
+	void insetSelection(double,double,double,double);
+			
+	void setSize(double,double);
+	void getSize(double&,double&);
+
+	void alignTop();
+	void alignLeft();
+	void alignRight();
+	void alignBottom();
+	void alignHorizontally();
+	void alignVertically();
+	void distributeHorizontally();
+	void distributeVertically();
+
+};
+
+#endif
diff --git a/src/libMvMotif/MSymbols.cc b/src/libMvMotif/MSymbols.cc
new file mode 100644
index 0000000..46526a9
--- /dev/null
+++ b/src/libMvMotif/MSymbols.cc
@@ -0,0 +1,24 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MSymbols.hpp>
+
+void MSymbolsWidget::init(MWidget *parent, const char *name, ...)
+{
+    va_list argptr;
+    Arg al[64];           /* Arg List */
+    register int ac = 0;      /* Arg Count */
+ 
+    va_start(argptr, name);
+    ac = MInitArgs(al, (const char *)NULL, argptr);
+//    ident = mSymbolsWidget;
+    widget = (Widget) CreateSymbolsWidget( parent->widget, (char*)name, al, ac);
+    attachObject();
+	MFreeArgs(al, ac);
+}
diff --git a/src/libMvMotif/MSymbols.hpp b/src/libMvMotif/MSymbols.hpp
new file mode 100644
index 0000000..24e08d7
--- /dev/null
+++ b/src/libMvMotif/MSymbols.hpp
@@ -0,0 +1,14 @@
+#ifndef mSymbols_DEFINED
+#define mSymbols_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Symbols.h>
+
+class MSymbolsWidget : public MDrawingArea
+{
+public:
+	void    init(MWidget *parent, const char *name, ...);
+	void setPixmaps(int n,Pixmap *p) { SymbolsSetPixmaps(widget,n,p); }
+};
+
+#endif
diff --git a/src/libMvMotif/MTab.cc b/src/libMvMotif/MTab.cc
new file mode 100755
index 0000000..52577a7
--- /dev/null
+++ b/src/libMvMotif/MTab.cc
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MTab.hpp>
+
+void MTabWidget::init(MWidget *parent, const char *name, ...)
+{
+        va_list argptr;
+        Arg al[64];           /* Arg List */
+        register int ac = 0;      /* Arg Count */
+ 
+        va_start(argptr, name);
+        ac = MInitArgs(al, NULL, argptr);
+        ident = mTab;
+        widget = (Widget) CreateTab( parent->widget, (char*)name, al, ac);
+        attachObject();
+	MFreeArgs(al, ac);
+}
+ 
+
+void MTabWidget::open()
+{
+	TabOpen(widget);
+}
+
+void MTabWidget::close()
+{
+	TabClose(widget);
+}
+
+Boolean MTabWidget::closed()
+{
+	return TabClosed(widget);
+}
+
+void MTabWidget::set(MWidget& w)
+{
+	TabSetCurrent(widget,w.widget,True);
+}
diff --git a/src/libMvMotif/MTab.hpp b/src/libMvMotif/MTab.hpp
new file mode 100755
index 0000000..b3c0986
--- /dev/null
+++ b/src/libMvMotif/MTab.hpp
@@ -0,0 +1,19 @@
+#ifndef mTab_DEFINED
+#define mTab_DEFINED
+
+#include <MMotifOnly.hpp>
+#include <Tab.h>
+
+class MTabWidget : public MDrawingArea
+{
+public:
+	void    init(MWidget *parent, const char *name, ...);
+	void open();
+	void close();
+
+	Boolean closed();
+
+	void set(MWidget&);
+};
+
+#endif
diff --git a/src/libMvMotif/Makefile.am b/src/libMvMotif/Makefile.am
new file mode 100644
index 0000000..00caf44
--- /dev/null
+++ b/src/libMvMotif/Makefile.am
@@ -0,0 +1,92 @@
+ 
+noinst_LIBRARIES = lib/libMvMotif.a
+
+SRC = 	MArray.cc \
+		MCarousel.cc \
+        MColors.cc \
+        MDrag.cc \
+        MIcon.cc \
+        MLine.cc \
+        MMatrix.cc \
+        MMotif.cc \
+        MPaper.cc \
+        MSymbols.cc \
+        MTab.cc \
+        MvXApplication.cc  \
+        xdxmdialog.cc \
+        xdxtclass.cc \
+        Array.c \
+        Colors.c \
+        Carousel.c \
+        Drag.c \
+        LED.c \
+        Palette.c \
+        Layout.c  \
+        Line.c 	 \
+        Paper.c \
+        progress.c 	\
+        drop.c 		\
+        Symbols.c \
+        Tab.c \
+        xec_Cursor.c 	\
+        xec_Label.c 	\
+        xec_List.c 	\
+        xec_Strings.c 	\
+        xec_Text.c 	\
+        xec_Widget.c \
+        Array.h \
+        ArrayP.h \
+        Carousel.h \
+        CarouselP.h \
+        ChartP.h \
+        Colors.h \
+        ColorsP.h \
+        DecChartP.h \
+        Drag.h \
+        DragP.h \
+        Hyper.h \
+        HyperP.h \
+        IconWidget.h \
+        LED.h \
+        LEDP.h \
+        Layout.h \
+        LayoutP.h \
+        Line.h \
+        LineP.h \
+        Matrix.h \
+        MatrixP.h \
+        MvXApplication.h \
+        Overview.h \
+        OverviewP.h \
+        Palette.h \
+        Paper.h \
+        PaperP.h \
+        Symbols.h \
+        SymbolsP.h \
+        Tab.h \
+        TabP.h \
+        drop.h \
+        progress.h \
+        xdclass.h \
+        xec.h \
+        MArray.hpp \
+        MCarousel.hpp \
+        MColors.hpp \
+        MDrag.hpp \
+        MIcon.hpp \
+        MLine.hpp \
+        MMatrix.hpp \
+        MMotif.hpp \
+        MMotifOnly.hpp \
+        MPaper.hpp \
+        MSymbols.hpp \
+        MTab.hpp
+
+
+lib_libMvMotif_a_SOURCES = $(SRC)
+
+
+BUILT_SOURCES = lib
+
+lib:
+	ln -s ../../lib lib
diff --git a/src/libMvMotif/Makefile.in b/src/libMvMotif/Makefile.in
new file mode 100644
index 0000000..900f7c2
--- /dev/null
+++ b/src/libMvMotif/Makefile.in
@@ -0,0 +1,752 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/libMvMotif
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libMvMotif_a_AR = $(AR) $(ARFLAGS)
+lib_libMvMotif_a_LIBADD =
+am__objects_1 = MArray.$(OBJEXT) MCarousel.$(OBJEXT) MColors.$(OBJEXT) \
+	MDrag.$(OBJEXT) MIcon.$(OBJEXT) MLine.$(OBJEXT) \
+	MMatrix.$(OBJEXT) MMotif.$(OBJEXT) MPaper.$(OBJEXT) \
+	MSymbols.$(OBJEXT) MTab.$(OBJEXT) MvXApplication.$(OBJEXT) \
+	xdxmdialog.$(OBJEXT) xdxtclass.$(OBJEXT) Array.$(OBJEXT) \
+	Colors.$(OBJEXT) Carousel.$(OBJEXT) Drag.$(OBJEXT) \
+	LED.$(OBJEXT) Palette.$(OBJEXT) Layout.$(OBJEXT) \
+	Line.$(OBJEXT) Paper.$(OBJEXT) progress.$(OBJEXT) \
+	drop.$(OBJEXT) Symbols.$(OBJEXT) Tab.$(OBJEXT) \
+	xec_Cursor.$(OBJEXT) xec_Label.$(OBJEXT) xec_List.$(OBJEXT) \
+	xec_Strings.$(OBJEXT) xec_Text.$(OBJEXT) xec_Widget.$(OBJEXT)
+am_lib_libMvMotif_a_OBJECTS = $(am__objects_1)
+lib_libMvMotif_a_OBJECTS = $(am_lib_libMvMotif_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libMvMotif_a_SOURCES)
+DIST_SOURCES = $(lib_libMvMotif_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = lib/libMvMotif.a
+SRC = MArray.cc \
+		MCarousel.cc \
+        MColors.cc \
+        MDrag.cc \
+        MIcon.cc \
+        MLine.cc \
+        MMatrix.cc \
+        MMotif.cc \
+        MPaper.cc \
+        MSymbols.cc \
+        MTab.cc \
+        MvXApplication.cc  \
+        xdxmdialog.cc \
+        xdxtclass.cc \
+        Array.c \
+        Colors.c \
+        Carousel.c \
+        Drag.c \
+        LED.c \
+        Palette.c \
+        Layout.c  \
+        Line.c 	 \
+        Paper.c \
+        progress.c 	\
+        drop.c 		\
+        Symbols.c \
+        Tab.c \
+        xec_Cursor.c 	\
+        xec_Label.c 	\
+        xec_List.c 	\
+        xec_Strings.c 	\
+        xec_Text.c 	\
+        xec_Widget.c \
+        Array.h \
+        ArrayP.h \
+        Carousel.h \
+        CarouselP.h \
+        ChartP.h \
+        Colors.h \
+        ColorsP.h \
+        DecChartP.h \
+        Drag.h \
+        DragP.h \
+        Hyper.h \
+        HyperP.h \
+        IconWidget.h \
+        LED.h \
+        LEDP.h \
+        Layout.h \
+        LayoutP.h \
+        Line.h \
+        LineP.h \
+        Matrix.h \
+        MatrixP.h \
+        MvXApplication.h \
+        Overview.h \
+        OverviewP.h \
+        Palette.h \
+        Paper.h \
+        PaperP.h \
+        Symbols.h \
+        SymbolsP.h \
+        Tab.h \
+        TabP.h \
+        drop.h \
+        progress.h \
+        xdclass.h \
+        xec.h \
+        MArray.hpp \
+        MCarousel.hpp \
+        MColors.hpp \
+        MDrag.hpp \
+        MIcon.hpp \
+        MLine.hpp \
+        MMatrix.hpp \
+        MMotif.hpp \
+        MMotifOnly.hpp \
+        MPaper.hpp \
+        MSymbols.hpp \
+        MTab.hpp
+
+lib_libMvMotif_a_SOURCES = $(SRC)
+BUILT_SOURCES = lib
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libMvMotif/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libMvMotif/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libMvMotif.a: $(lib_libMvMotif_a_OBJECTS) $(lib_libMvMotif_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libMvMotif.a
+	$(AM_V_AR)$(lib_libMvMotif_a_AR) lib/libMvMotif.a $(lib_libMvMotif_a_OBJECTS) $(lib_libMvMotif_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libMvMotif.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Carousel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Colors.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Drag.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/LED.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Layout.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Line.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MArray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MCarousel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MColors.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MDrag.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MIcon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MMatrix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MMotif.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MPaper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MSymbols.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MTab.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvXApplication.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Palette.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Paper.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Symbols.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Tab.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/drop.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/progress.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdxmdialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdxtclass.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xec_Cursor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xec_Label.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xec_List.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xec_Strings.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xec_Text.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xec_Widget.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+lib:
+	ln -s ../../lib lib
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libMvMotif/Matrix.h b/src/libMvMotif/Matrix.h
new file mode 100644
index 0000000..a2fa3ae
--- /dev/null
+++ b/src/libMvMotif/Matrix.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef	MATRIX_H
+#define MATRIX_H
+
+#include <Xm/ScrollBar.h>
+
+extern WidgetClass matrixWidgetClass;
+
+typedef struct _MatrixClass	*MatrixWidgetClass;
+typedef struct _MatrixRec	*MatrixWidget;
+
+/* New types */
+
+#define XmRIntArray		"IntArray"
+
+/* Shadow attributes */
+
+/*	The following resources have already been defined:
+	XmNshadowThickness, XmNtopShadowColor, XmNbottomShadowColor
+*/
+
+/* Callbacks */
+
+/*	The following resources have already been defined:
+	XmNexposeCallback
+*/
+
+/* Organization Attributes */
+
+/*	The following resources have already been defined:
+	XmNnumColumns, XmNspacing, XmNleftAttachment, XmNtopAttachment
+	XmNmargin 	*/
+
+#define XmNshadeAttachments		"shadeAttachments"
+#define XmCShadeAttachments		"ShadeAttachments"
+
+#ifndef XmNmargin
+#define XmNmargin			"margin"
+#endif
+#ifndef XmCMargin
+#define XmCMargin			"Margin"
+#endif
+
+/* Window sizes */
+
+#define	XmNmaxColumns			"maxColumns"
+#define XmCMaxColumns			"MaxColumns"
+
+#define XmNmaxRows			"maxRows"
+#define XmCMaxRows			"MaxRows"
+
+#define XmNcolumnRelSizes		"columnRelSizes"
+#define XmCColumnRelSizes		"ColumnRelSizes"
+
+#define XmNrowRelSizes			"rowRelSizes"
+#define XmCRowRelSizes			"RowRelSizes"
+
+/* Scroll Bar */
+
+#define		K_NO_SCROLL		0
+#define		K_SCROLL_SHARED		1
+#define		K_SCROLL_INDIVIDUAL	2
+
+#define XmNscrollBar			"scrollBar"
+#define XmCScrollBar			"ScrollBar"
+
+#define XmNscrollBarManage		"scrollBarManage"
+#define XmCScrollBarManage		"ScrollBarManage"
+
+/* Prototypes */
+
+#ifndef XmIsMatrix
+#define XmIsMatrix(w) XtIsSubclass(w, matrixWidgetClass)
+#endif
+
+/* Class record constants */
+
+/*------------------------------------------------------------------------*/
+#if defined (__STDC__) || defined (__cplusplus) || defined (c_plusplus)
+#define P_(s) s
+#else
+#define P_(s) ()
+#endif
+
+#if defined (__cplusplus) || defined (c_plusplus)
+extern "C"
+{
+#endif
+/*------------------------------------------------------------------------*/
+
+extern Widget XmCreateMatrix P_((Widget, char*, ArgList, int));
+extern Widget XmMatrixScrollBar P_((Widget, int));
+extern int XmMatrixGetSelectedItems P_((MatrixWidget, Widget**));
+extern int XmMatrixGetSerieItems P_((MatrixWidget,Widget, Widget**));
+
+/*------------------------------------------------------------------------*/
+#undef P_
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+/*------------------------------------------------------------------------*/
+
+#endif /* MATRIX_H */
diff --git a/src/libMvMotif/MatrixP.h b/src/libMvMotif/MatrixP.h
new file mode 100644
index 0000000..874e3b6
--- /dev/null
+++ b/src/libMvMotif/MatrixP.h
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MATRIXP_H
+#define MATRIXP_H
+
+/*
+** Class Part
+*/
+
+typedef struct _MatrixClassPart 
+{
+	int	ignore;
+} MatrixClassPart;
+
+typedef struct _MatrixClassRec
+{
+	CoreClassPart		core_class;
+	CompositeClassPart	composite_class;
+	ConstraintClassPart	constraint_class;
+	MatrixClassPart		group_class;
+} MatrixClassRec;
+
+extern MatrixClassRec matrixClassRec;
+
+/*
+** Instance part
+*/
+
+typedef struct _MatrixPart
+{
+	/* Shadow Attributes */
+
+	Dimension	shadow_thickness;
+	Pixel		top_shadow_color;
+	Pixel		bottom_shadow_color;
+
+	/* Compatibility with Motif */
+
+	caddr_t		user_data;
+
+	/* Callbacks */
+
+	XtCallbackList	exposecallback;
+	XtCallbackList	resizecallback;
+
+	/* Matrix Organization Atributes */
+
+	int		max_cols;
+	Boolean		shade_attach;
+	Dimension	margin;
+	Dimension	spacing;
+
+	int		create_scroll;
+	Boolean		manage_scroll;
+
+	int		*row_array, *col_array;
+
+	/* Derived Organization attributes */
+
+	Widget		serie_first, serie_last;
+	int		nrows_used, ncols_used;
+
+	/* Private resources */
+
+	GC		gc_top;		/* GC for shadow	*/
+	GC		gc_bot;		/* GC for shadow	*/
+	GC		gc_drag;	/* GC for drag &
+					   rubber banding	*/
+	Widget		scroll_bar;	/* Scroll bar widget	*/
+	char		companion;	/* flag when creating
+					   companion widget	*/
+	int		row_array_size, col_array_size;
+
+} MatrixPart;
+
+typedef struct _MatrixRec
+{
+	CorePart	core;
+	CompositePart	composite;
+	ConstraintPart	constraint;
+	MatrixPart	matrix;
+
+} MatrixRec;
+
+/*
+** Part attached to children
+*/
+
+typedef struct _MatrixConstraintsPart
+{
+	int       ix, iy;		/* position in matrix	*/
+
+	Widget    next, previous;	/* double linked list	*/
+
+	/* Used only by top of the list elements */
+
+	Widget    serie_next,		/* double linked list   */
+	          serie_previous;	/* for series		*/
+
+	Widget    scroll_bar;		/* scroll bar widget	*/
+
+	/* Origin and size */
+
+	Dimension px, py;
+	Dimension sizex, sizey;
+
+} MatrixConstraintsPart;
+
+
+typedef struct _MatrixConstraintsRec
+{
+	MatrixConstraintsPart matrix;
+
+} MatrixConstraintsRec, *MatrixConstraints;
+
+#define MATRIX_CONSTRAINT(w) ( (MatrixConstraints) ( (w)->core.constraints ) )
+#define CONSTR(w) (MATRIX_CONSTRAINT(w)->matrix) 
+
+#endif
diff --git a/src/libMvMotif/MvXApplication.cc b/src/libMvMotif/MvXApplication.cc
new file mode 100644
index 0000000..2b471f5
--- /dev/null
+++ b/src/libMvMotif/MvXApplication.cc
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <X11/Intrinsic.h>
+#include <Metview.h>
+#include <MvXApplication.h>
+
+
+MvXApplication::MvXApplication(XtAppContext app, int argc,char **argv,
+		const char *name, void* aparg, int nopts,option* opts): MvApplication(argc, argv, name, aparg, nopts, opts)
+{
+	Context = app;
+	ListenToService(app, getService());
+}
+
+void MvXApplication::run(void)
+{
+	XtAppMainLoop(Context);
+}
+
+struct CbStuff {
+	FILE     *file;
+	inputproc proc;
+	void*     data;
+
+	CbStuff(FILE *f,inputproc p,void* d) : file(f),proc(p),data(d) {}
+};
+
+static void inputCb(XtPointer p,int *,XtInputId *id)
+{
+	CbStuff *s = (CbStuff*)p;	
+	if(!s->proc(s->file,s->data))
+	{
+		delete s;
+		XtRemoveInput(*id);
+	}
+}
+
+void MvXApplication::addInputCallback(FILE*f,inputproc p,void *data)
+{
+     XtAppAddInput(Context,fileno(f),
+			(XtPointer)XtInputReadMask,
+			(XtInputCallbackProc)inputCb,
+			(XtPointer)new CbStuff(f,p,data));
+}
+
+XtAppContext MvXApplication::context()
+{
+	MvXApplication& xapp = (MvXApplication&)instance();
+	return xapp.Context;
+}
diff --git a/src/libMvMotif/MvXApplication.h b/src/libMvMotif/MvXApplication.h
new file mode 100644
index 0000000..dcd02f8
--- /dev/null
+++ b/src/libMvMotif/MvXApplication.h
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvXApplication_DEFINED
+#define MvXApplication_DEFINED
+
+#include <MvApplication.h>
+
+#ifdef XtSpecificationRelease
+
+class MvXApplication: public MvApplication {
+protected:
+	XtAppContext Context;
+	virtual void addInputCallback(FILE*,inputproc,void*);
+public:
+	MvXApplication(XtAppContext app, int argc,char **argv,
+		const char *name = NULL,void* aparg = NULL,int nopt = 0,option* = NULL);
+	virtual void run();
+	static XtAppContext context();
+};
+#endif
+
+#endif
diff --git a/src/libMvMotif/Overview.h b/src/libMvMotif/Overview.h
new file mode 100644
index 0000000..09c4ced
--- /dev/null
+++ b/src/libMvMotif/Overview.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef  OVERVIEW_H
+#define  OVERVIEW_H
+
+extern WidgetClass overviewWidgetClass;
+typedef struct _OverviewClassRec * OverviewWidgetClass;
+typedef struct _OverviewRec      * OverviewWidget;
+
+
+#define XtNcount    "count"
+#define XtCCount    "Count"
+#define XtNselected "selected"
+#define XtCSelected "Selected"
+#define XtNsize     "size"
+#define XtCSize     "Size"
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+extern Widget CreateOverviewWidget(Widget,char*,Arg*,int);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+#endif
diff --git a/src/libMvMotif/OverviewP.h b/src/libMvMotif/OverviewP.h
new file mode 100644
index 0000000..0e798fd
--- /dev/null
+++ b/src/libMvMotif/OverviewP.h
@@ -0,0 +1,47 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef OVERVIEWP_H
+#define OVERVIEWP_H
+
+#include <Xm/XmP.h>
+#include <Xm/PrimitiveP.h>
+
+/* Overview class : no new fileds */
+
+typedef struct _OverviewClassPart{
+    int ignore;
+} OverviewClassPart;
+
+typedef struct _OverviewClassRec{
+    CoreClassPart         core_class;
+    XmPrimitiveClassPart  primitive_class;
+    OverviewClassPart     overview_class;
+} OverviewClassRec;
+
+extern OverviewClassRec overviewClassRec;
+
+typedef struct _OverviewPart {
+	int             size;
+	int             count;
+	int             selected;
+	Pixel           pixel;
+	XtCallbackList  activate;
+	XmFontList      fontlist;
+	GC              fontGC;
+	GC              gc;
+} OverviewPart;
+
+typedef struct _OverviewRec {
+    CorePart          core;
+    XmPrimitivePart   primitive;
+    OverviewPart      overview;
+} OverviewRec;
+
+#endif
diff --git a/src/libMvMotif/Palette.c b/src/libMvMotif/Palette.c
new file mode 100644
index 0000000..c443584
--- /dev/null
+++ b/src/libMvMotif/Palette.c
@@ -0,0 +1,708 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <X11/Intrinsic.h>
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+#include <X11/CoreP.h>
+#include <X11/Shell.h>
+#include <X11/Xatom.h>
+#include "Palette.h"
+
+#define ABS(x) ((x)>0?(x):-(x))
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#define N(c) ((c)/65535.0)
+
+struct _Palette{
+
+	struct _Palette *next;
+	Display         *display;
+
+	Colormap        map;
+	int             map_entries;
+	unsigned long   tolerance;
+
+	Boolean         is_direct;
+	unsigned long   r_shift;
+	unsigned long   g_shift;
+	unsigned long   b_shift;
+	unsigned long   r_range;
+	unsigned long   g_range;
+	unsigned long   b_range;
+
+	unsigned  short mask;
+};
+
+typedef struct Color {
+
+	struct Color *left;
+	struct Color *right;
+	XColor   color;
+	int      count;
+	Boolean  system;
+
+} Color;
+
+static Palette  _list          = NULL;
+
+static Color* head = 0;
+
+static Color* new_color(Palette palette,XColor* col)
+{
+	Color * c = (Color*)XtCalloc(1,sizeof(Color));
+	c->color = *col;
+
+	if(XAllocColor(palette->display,palette->map,&c->color))
+		c->system = False;
+	else
+		printf("Cannot allocate %d %d %d\n",col->red,col->green,col->blue);
+
+	return c;
+}
+
+#define X(a) ((a)&palette->mask)
+
+static int coldiff(Palette palette,XColor* a,XColor* b)
+{
+	if( X(a->red) != X(b->red))     return X(a->red) - X(b->red);
+	if( X(a->green) != X(b->green)) return X(a->green) - X(b->green);
+	return  X(a->blue) - X(b->blue);
+}
+
+static Color* find_color(Palette palette,Color* from,XColor* col,Color* parent,int right)
+{
+	if(from) 
+	{
+		long diff = coldiff(palette,col,&from->color);
+		if(diff == 0)
+			return from;
+		else if(diff < 0)
+			return find_color(palette,from->left,col,from,0);
+		else
+			return find_color(palette,from->right,col,from,1);
+	}
+
+	from = new_color(palette,col);
+
+	if(parent == 0) 
+		head = from;
+	else
+		if(right)
+			parent->right = from;
+		else
+			parent->left = from;
+	return from;
+}
+
+static Color* look_up(Palette palette,XColor* col)
+{
+	return find_color(palette,head,col,0,0);
+}
+
+static Pixel find(Palette palette,unsigned short r,unsigned short g,unsigned short b)
+{
+	XColor x; Color* c;
+
+	x.red   = r;
+	x.green = g;
+	x.blue  = b;
+
+	c = look_up(palette,&x);
+	
+	return c->color.pixel;
+
+}
+
+#if 0
+static void free_color(Palette palette,int entry)
+{
+	int n = palette->colors[entry];
+
+	if(n < 0)
+		return;
+
+	_colors[n].count--;
+
+	if(_colors[n].count == 0)
+	{
+		_next_free = 0;
+		if(!_colors[n].system)
+			XFreeColors(palette->display,palette->map,
+			    &_colors[n].xcolor.pixel,1,0);
+	}
+
+	palette->colors[entry] = -1;
+
+}
+
+static void attach_color(Palette palette,int i)
+{
+	_colors[i].xcolor.flags = DoRed|DoGreen|DoBlue;
+
+	if(XAllocColor(palette->display,palette->map,&_colors[i].xcolor))
+		_colors[i].system = False;
+	else
+		printf("Cannot attach a system color !!!\n");
+}
+
+static void no_sys_colors(Palette palette)
+{
+	int i;
+	for(i = 0; i < _color_cnt ; i++)
+		if(_colors[i].system) _colors[i].system = _colors[i].count =  _next_free = 0;
+}
+
+#if 0
+#define DEBUG(a,i) printf("Palette: %s %04x-%04x-%04x tol=%d, max=%d %04x-%04x-%04x (%d,%d)\n",(a),  \
+	col->red,col->green,col->blue,tolerance,max,_colors[i].xcolor.red,_colors[i].xcolor.green,_colors[i].xcolor.blue,\
+		_colors[i].count,_colors[i].system);
+#else
+#define DEBUG(a,b)
+#endif
+
+static void new_color(Palette palette,int entry, XColor *col)
+{
+	unsigned long max_tolerance = 0x7fffffff;
+	unsigned long max = max_tolerance;
+	unsigned long tolerance = palette->tolerance;
+	int best = 0;
+	int a,b;
+	int i,j;
+	int try_x_colors = 1;
+
+	free_color(palette,entry);
+
+	/* 1 - Look if it is already there... */
+
+	for(i = 0; i < _color_cnt ; i++)
+		if(_colors[i].count)
+		{
+			unsigned long d = RGBDistance(col,&_colors[i].xcolor);
+			if(d == 0) {
+				if(_colors[i].system) attach_color(palette,i);
+				_colors[i].count++;
+				palette->colors[entry] = i;
+				no_sys_colors(palette);
+				DEBUG("Color was in palette",i);
+				return;
+			}
+		}
+
+	/* try allocate */
+
+	col->flags = DoRed|DoGreen|DoBlue;
+	col->pixel = 0;
+
+	if(XAllocColor(palette->display,palette->map,col))
+	{
+		int n = next_free();
+		_colors[n].count       = 1;
+		_colors[n].system      = False;
+		_colors[n].xcolor      = *col;
+		palette->colors[entry] = n;
+		DEBUG("Color allocated",n);
+		no_sys_colors(palette);
+		return;
+	}
+
+	while(tolerance<=max_tolerance)
+	{
+
+		/* try a close match */
+
+		for(i = 0; i < _color_cnt ; i++)
+			if(_colors[i].count)
+			{
+				unsigned long d = RGBDistance(col,&_colors[i].xcolor);
+				if(d < max) {
+					max = d;
+					best = i;
+				}
+			}
+
+		if(max <= tolerance)
+		{
+			if(_colors[best].system) attach_color(palette,best);
+			_colors[best].count++;
+			palette->colors[entry] = best;
+			DEBUG("Color matched ",best);
+			no_sys_colors(palette);
+			return;
+		}
+
+		/* Remap colors ... */
+
+		a=-1;
+		b=-1;
+		max = max_tolerance;
+
+		for(i = 0; i < _color_cnt-1 ; i++)
+			if(_colors[i].count)
+				for(j = i+1; j < _color_cnt ; j++)
+					if(_colors[j].count)
+						if( !_colors[a].system ||
+						    !_colors[b].system ||
+						    (_colors[a].system != _colors[b].system))
+						{
+							unsigned long d = RGBDistance(&_colors[i].xcolor,&_colors[j].xcolor);
+							if(d < max) {
+								max = d;
+								a = i;
+								b = j;
+							}
+						}
+
+		/* We can remap one ....*/
+
+		if(max <= tolerance)
+		{
+			Palette p = _list;
+
+			if(_colors[a].system)
+			{
+				int c = a;
+				a     = b;
+				b     = a;
+			}
+
+			DEBUG("Remap 1",a);
+			DEBUG("Remap 2",b);
+
+			if(_colors[b].system)
+				attach_color(palette,b);
+
+			XFreeColors(palette->display,
+			    palette->map,&_colors[a].xcolor.pixel,1,0);
+
+			_colors[a].count = 0;
+			_next_free = 0;
+
+			while(p)
+			{
+				for(j=0;j<p->count;j++)
+					if(p->colors[j] == a)
+					{
+						p->colors[j] = b;
+						_colors[b].count++;
+					}
+				p = p->next;
+			}
+
+			if(XAllocColor(palette->display,palette->map,col))
+			{
+				_colors[a].system  = False;
+				_colors[a].count   = 1;
+				_colors[a].xcolor  = *col;
+				palette->colors[entry] = a;
+				DEBUG("Color allocated after remap",a);
+				no_sys_colors(palette);
+				return;
+			}
+		}
+
+		if(try_x_colors)
+		{
+			/* Everything failed, look what was allocated by other processes */
+
+			int cnt      = 0;
+			time_t now   = time(0);
+			try_x_colors = 0;
+
+			/* Get the system colors */
+
+			if(now - sys_color_time > 10) /* 10 sec. */
+			{
+				if(system_colors) XtFree((XtPointer)system_colors);
+				system_colors = NULL;
+			}
+
+			if(!system_colors)
+			{
+				DEBUG("Get sys colors",0);
+				system_colors = (XColor*)XtMalloc(palette->map_entries*
+				    sizeof(XColor));
+
+				for(i=0;i<palette->map_entries;i++)
+					system_colors[i].pixel = i;
+
+				XQueryColors(palette->display,palette->map,system_colors,
+				    palette->map_entries);
+
+				sys_color_time = now;
+			}
+
+			for(i = 0;i< palette->map_entries;i++)
+			{
+				Boolean ours = False;
+				for(j = 0; j< _color_cnt; j++)
+				{
+					long d = RGBDistance(&system_colors[i],&_colors[j].xcolor);
+					if(d == 0)
+					{
+						ours = True;
+						break;
+					}
+				}
+
+				/* Its not our color, add it */
+
+				if(!ours)
+				{
+					/* Add system palette */
+					int n = next_free();
+					_colors[n].xcolor = system_colors[i];
+					_colors[n].count  = 1;
+					_colors[n].system = True;
+					cnt++;
+				}
+			}
+
+			/* Try if some system color matches... */
+			if(cnt)
+				for(i = 0; i < _color_cnt ; i++)
+					if(_colors[i].count && _colors[i].system)
+					{
+						unsigned long d = RGBDistance(col,&_colors[i].xcolor);
+						if(d == 0) {
+							attach_color(palette,i);
+							_colors[i].count++;
+							palette->colors[entry] = i;
+							no_sys_colors(palette);
+							DEBUG("Found match in sys colors",i);
+							return;
+						}
+					}
+		}
+		else tolerance *= 0x10; /* Augment the tolerence */
+
+	}
+
+	if(_colors[best].system) attach_color(palette,best);
+
+	DEBUG("Bad luck",best);
+
+	/* No luck ... */
+	_colors[best].count++;
+	palette->colors[entry] = best;
+	no_sys_colors(palette);
+}
+
+#endif
+
+void PaletteRGBToHSV(Palette palette,const RGBColor* rgb,HSVColor* hsv)
+{
+	double max = MAX(rgb->red,MAX(rgb->green,rgb->blue));
+	double min = MIN(rgb->red,MIN(rgb->green,rgb->blue));
+	double delta = max - min;
+
+	hsv->value = max;
+	if (max != 0.0)
+		hsv->saturation = delta / max;
+	else
+		hsv->saturation = 0.0;
+
+	if (hsv->saturation == 0) {
+		hsv->hue = 0;
+	}
+	else {
+
+		if (rgb->red == max)   hsv->hue = (rgb->green - rgb->blue) / delta;
+		if (rgb->green == max) hsv->hue = 2 + (rgb->blue - rgb->red) / delta;
+		if (rgb->blue == max)  hsv->hue = 4 + (rgb->red - rgb->green) / delta;
+
+		hsv->hue *= 60; 
+		while(hsv->hue < 0)   hsv->hue += 360;
+		while(hsv->hue > 360) hsv->hue -= 360;
+	}
+}
+
+void PaletteHSVToRGB(Palette palette,const HSVColor* hsv,RGBColor* rgb)
+{
+	int i;
+	double   f,p,q,t;
+
+	if (hsv->saturation == 0 && hsv->hue == 0) {
+		rgb->red = rgb->green = rgb->blue = hsv->value;
+	} else {
+		double hue = hsv->hue;
+
+		while(hue < 0)   hue += 360;
+		while(hue > 360) hue -= 360;
+
+		hue /= 60.0;
+
+		i = hue;
+		f = hue - i;
+		p = hsv->value * (1 - hsv->saturation);
+		q = hsv->value * (1 - (hsv->saturation * f));
+		t = hsv->value * (1 - (hsv->saturation * (1 - f)));
+		switch (i) {
+		case 0:
+			rgb->red = hsv->value;
+			rgb->green = t;
+			rgb->blue = p;
+			break;
+		case 1:
+			rgb->red = q;
+			rgb->green = hsv->value;
+			rgb->blue = p;
+			break;
+		case 2:
+			rgb->red = p;
+			rgb->green = hsv->value;
+			rgb->blue = t;
+			break;
+		case 3:
+			rgb->red = p;
+			rgb->green = q;
+			rgb->blue = hsv->value;
+			break;
+		case 4:
+			rgb->red = t;
+			rgb->green = p;
+			rgb->blue = hsv->value;
+			break;
+		case 5:
+			rgb->red = hsv->value;
+			rgb->green = p;
+			rgb->blue = q;
+			break;
+		}
+	}
+}
+
+static double value( double n1, double n2, double hue )
+{
+	while ( hue > 360.0 ) hue -= 360.0;
+	while ( hue < 0.0 )   hue += 360.0;
+
+	if ( hue < 60.0 )
+		return  ( n1 + ((n2 - n1)*hue/60.0));
+	else if ( hue < 180.0 )
+		return ( n2 );
+	else if ( hue < 240.0 )
+		return ( n1 + ((n2 - n1)*(240.0 - hue)/60.0));
+	else
+		return( n1 );
+}	
+
+void PaletteHSLToRGB(Palette palette,const HSLColor* hsl,RGBColor* rgb)
+{
+	double m2 = ( hsl->lightness < 0.5 ) ? 
+				(hsl->lightness * ( 1.0 + hsl->saturation)) : 
+				(hsl->lightness + hsl->saturation - 
+					(hsl->lightness * hsl->saturation));
+
+	double m1 = (2.0 * hsl->lightness) - m2;
+
+	if(hsl->saturation == 0)
+	{
+		if ( (hsl->hue + 1.0) < 1.0 )
+			rgb->red = rgb->green = rgb->blue = hsl->lightness;
+		else
+			rgb->red = rgb->green = rgb->blue = 0;
+	}
+	else
+	{
+		rgb->red   = value( m1, m2, hsl->hue + 120.0 );
+		rgb->green = value( m1, m2, hsl->hue );
+		rgb->blue  = value( m1, m2, hsl->hue - 120.0 );
+	}
+}	
+
+void PaletteRGBToHSL(Palette palette,const RGBColor* rgb,HSLColor* hsl)
+{
+	double max = MAX(rgb->red,MAX(rgb->green,rgb->blue));
+	double min = MIN(rgb->red,MIN(rgb->green,rgb->blue));
+	double delta = max - min;
+
+	hsl->lightness = (max+min)/2;
+	if(delta == 0)
+		hsl->saturation = hsl->hue = 0;
+	else {
+		if(hsl->lightness < 0.5)
+			hsl->saturation = delta/(max+min);
+		else
+			hsl->saturation = delta/(2-max-min);	
+
+		if(rgb->red == max)   hsl->hue = 0 + (rgb->green - rgb->blue)  /delta;
+		if(rgb->green == max) hsl->hue = 2 + (rgb->blue  - rgb->red)   /delta;
+		if(rgb->blue == max)  hsl->hue = 4 + (rgb->red   - rgb->green) /delta;
+
+		hsl->hue *= 60;
+		while(hsl->hue < 0)   hsl->hue += 360;
+		while(hsl->hue > 360) hsl->hue -= 360;
+	}
+}
+
+void DisposePalette(Palette palette)
+{
+	Palette p = _list;
+	Palette q = NULL;
+	int i;
+
+	while(p)
+	{
+		if(p == palette)
+		{
+			if(q) q->next = p->next;
+			else _list = p->next;
+			return;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+Palette NewPalette(Widget w)
+{
+	Palette  palette = XtNew(struct _Palette);
+	Display  *dpy    = XtDisplay(w);
+	Screen   *screen = XtScreen(w);
+	Visual   *visual = NULL;
+	Colormap   rcmap = DefaultColormapOfScreen(screen);
+	XColor  col;
+	int cells,i,j;
+	int good=0,bad=0;
+	Arg   al[1];
+
+	palette->next = _list;
+	_list = palette;
+
+	while(!XtIsShell(w)) w = XtParent(w);
+
+
+	XtSetArg(al[0],XtNvisual,&visual);
+
+	XtGetValues(w, al, 1);
+
+	if (visual == NULL) visual = DefaultVisualOfScreen(screen);
+
+
+	palette->display     = dpy;
+	palette->map         = rcmap;
+	palette->mask        = 0xc000;
+
+	palette->tolerance   = 0x300;
+	palette->map_entries = visual->map_entries;
+	palette->is_direct   = visual->class == TrueColor;
+
+	if(palette->is_direct)
+	{
+		int v;
+
+		palette->r_shift = 0;
+		palette->g_shift = 0;
+		palette->b_shift = 0;
+		palette->r_range = 1;
+		palette->g_range = 1;
+		palette->b_range = 1;
+
+		for (v = visual->red_mask; (v & 1) == 0; v >>= 1)
+			palette->r_shift++;
+
+		for (; (v & 1) == 1; v >>= 1)
+			palette->r_range <<= 1;
+
+		for (v = visual->green_mask; (v & 1) == 0; v >>= 1)
+			palette->g_shift++;
+
+		for (; (v & 1) == 1; v >>= 1)
+			palette->g_range <<= 1;
+
+		for (v = visual->blue_mask; (v & 1) == 0; v >>= 1)
+			palette->b_shift++;
+
+		for (; (v & 1) == 1; v >>= 1)
+			palette->b_range <<= 1;
+
+		palette->r_range--;
+		palette->g_range--;
+		palette->b_range--;
+
+	}
+
+	return palette;
+}
+
+long RGBDistance(const XColor *c1,const XColor *c2)
+{
+	long d;
+	long dr = (long)c1->red    - (long)c2->red  ;
+	long dg = (long)c1->green  - (long)c2->green;
+	long db = (long)c1->blue   - (long)c2->blue ;
+
+	dr = ABS(dr);
+	dg = ABS(dg);
+	db = ABS(db);
+
+	d = MAX(dr,dg);
+	return MAX(d,db);
+}
+
+/*=======================================================================*/
+
+Pixel PaletteNamedColor(Palette palette,const char *name)
+{
+	RGBColor r;
+	PaletteNameToRGB(palette,name,&r);
+	return PaletteRGBColor(palette,&r);
+}
+
+void PaletteNameToRGB(Palette palette,const char *name,RGBColor* c)
+{
+	XColor col;
+	col.red = col.green = col.blue = 0;
+	if(!XParseColor(palette->display,palette->map,name,&col))
+		printf("PaletteSetNamedColor: bad name... %s",name);
+
+	c->red   = col.red   / 65535.0;
+	c->green = col.green / 65535.0;
+	c->blue  = col.blue  / 65535.0;
+}
+
+Pixel PaletteHSVColor(Palette palette,const HSVColor* c)
+{
+	RGBColor r;
+	PaletteHSVToRGB(palette,c,&r);
+	return PaletteRGBColor(palette,&r);
+}
+
+Pixel PaletteHSLColor(Palette palette,const HSLColor* c)
+{
+	RGBColor r;
+	PaletteHSLToRGB(palette,c,&r);
+	return PaletteRGBColor(palette,&r);
+}
+
+Pixel PaletteRGBColor(Palette palette,const RGBColor* c)
+{
+	if(palette->is_direct)
+	{
+		unsigned int red   = c->red   * palette->r_range;
+		unsigned int green = c->green * palette->g_range;
+		unsigned int blue  = c->blue  * palette->b_range;
+
+		return (red   << palette->r_shift)| 
+			   (green << palette->g_shift)| 
+			   (blue  << palette->b_shift);
+	 }
+	 else 
+	 {
+
+		unsigned short  red   = c->red   * 65535.0;
+		unsigned short  green = c->green * 65535.0;
+		unsigned short  blue = c->blue  * 65535.0;
+
+		return find(palette,red,green,blue);
+	}
+}
+
diff --git a/src/libMvMotif/Palette.h b/src/libMvMotif/Palette.h
new file mode 100644
index 0000000..59f08b9
--- /dev/null
+++ b/src/libMvMotif/Palette.h
@@ -0,0 +1,89 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef H_Palette
+#define H_Palette
+#include <X11/Intrinsic.h>
+
+typedef struct _Palette *Palette;
+
+typedef struct RGBColor {
+	double red;
+	double green;
+	double blue;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+       RGBColor(double r = 0,double g = 0,double b = 0):
+       	red(r),green(g),blue(b) {}	
+#endif
+
+} RGBColor;
+
+typedef struct HSLColor {
+	double hue;
+	double saturation;
+	double lightness;
+#if defined(__cplusplus) || defined(c_plusplus)
+       HSLColor(double h = 0,double s = 0,double l = 0):
+       	hue(h),saturation(s),lightness(l) {}	
+#endif
+} HSLColor; 
+
+typedef struct HSVColor {
+	double hue;
+	double saturation;
+	double value;
+#if defined(__cplusplus) || defined(c_plusplus)
+       HSVColor(double h = 0,double s = 0,double v = 0):
+       	hue(h),saturation(s),value(v) {}	
+#endif
+} HSVColor; 
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+long RGBDistance(const XColor *c1, const XColor *c2);
+
+void    DisposePalette(Palette palette);
+Palette NewPalette(Widget w);
+
+Pixel PaletteNamedColor(Palette palette, const char *name);
+Pixel PaletteHSVColor(Palette palette, const HSVColor*);
+Pixel PaletteHSLColor(Palette palette, const HSLColor*);
+Pixel PaletteRGBColor(Palette palette, const RGBColor*);
+Pixel PaletteXColor(Palette palette, XColor *col);
+
+void PaletteRGBToHSL(Palette palette,const RGBColor*,HSLColor*);
+void PaletteHSLToRGB(Palette palette,const HSLColor*,RGBColor*); 
+void PaletteRGBToHSV(Palette palette,const RGBColor*,HSVColor*);
+void PaletteHSVToRGB(Palette palette,const HSVColor*,RGBColor*); 
+void PaletteNameToRGB(Palette palette,const char *name,RGBColor*);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif		    
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/libMvMotif/Paper.c b/src/libMvMotif/Paper.c
new file mode 100755
index 0000000..0186171
--- /dev/null
+++ b/src/libMvMotif/Paper.c
@@ -0,0 +1,2005 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+# include <stdio.h>
+
+# include <X11/Intrinsic.h>
+# include <X11/IntrinsicP.h>
+# include <X11/StringDefs.h>
+# include <X11/CoreP.h>
+# include <X11/CompositeP.h>
+# include <X11/ConstrainP.h>
+# include <Xm/XmP.h>
+# include <Xm/DrawingAP.h>
+#include <Xm/TransltnsP.h>
+
+# include      "Paper.h"
+# include      "PaperP.h"
+
+# ifndef MAX
+#   define   MAX(a,b) ((a) > (b) ? (a) : (b))
+# endif
+# ifndef MIN
+#   define   MIN(a,b) ((a) < (b) ? (a) : (b))
+# endif
+# define ABS(a) ( (a)>0?(a):-(a))
+
+# define MINIMUM 0.01 /* 1% */
+# define EQUAL(a,b)  ( ABS(a-b) < (MINIMUM/100.0))
+
+static void ClassInitialize();
+static void Initialize();
+static void	ConstraintInitialize();
+static		Boolean ConstraintSetValues();
+static void	Destroy();
+static void	Resize();
+static		Boolean SetValues();
+static		XtGeometryResult GeometryManager();
+static void	ChangeManaged();
+static void	InsertChild();
+static void	DeleteChild();
+static void	Redisplay();
+static void	StartDrag();
+static void	Drag();
+static void	Join();
+static void	Split();
+static void	Inset();
+static void	Group();
+static void	Ungroup();
+static void	EndDrag();
+static void	SelectAll();
+static void	SelectNone();
+static void	Insert();
+static void	Delete();
+
+
+static void	start_edit(PaperWidget widget);
+static void	end_edit(PaperWidget widget, Boolean cancel);
+static void	edit_handler(Widget w, XtPointer cd, XEvent *e, Boolean
+*continue_dispatch);
+static void	size_widgets(PaperWidget widget, Widget w);
+static void	place(PaperWidget tw, Widget w);
+static XtResource resources[] = {
+	{XmNeditable,XmCEditable,XtRBoolean,sizeof(Boolean), 
+	XtOffset(PaperWidget, paper.editable), 
+	XtRImmediate, (XtPointer)True },
+	{ "white", "White", XmRPixel, sizeof(Pixel), 
+	XtOffset(PaperWidget, paper.white), XmRString, "white"},
+	{ XmNforeground, XmCForeground, XmRPixel, sizeof(Pixel), 
+	XtOffset(PaperWidget, paper.foreground), XmRString, "black"},
+	{
+	"selected", "Selected", XmRPixel, sizeof(Pixel), 
+	XtOffset(PaperWidget, paper.selected), XmRString, "red"},
+	{
+	"dash", "Dash", XmRPixel, sizeof(Pixel), 
+	XtOffset(PaperWidget, paper.dash), XmRString, "blue"},
+	{XmNjoinCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.join_cb),XtRCallback,NULL},
+	{XmNsplitCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.split_cb),XtRCallback,NULL},
+	{XmNgroupCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.group_cb),XtRCallback,NULL},
+	{XmNungroupCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.ungroup_cb),XtRCallback,NULL},
+	{XmNdeleteCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.delete_cb),XtRCallback,NULL},
+	{XmNdrawCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.draw_cb),XtRCallback,NULL},
+	{XmNdblClickCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.dblclick_cb),XtRCallback,NULL},
+	{XmNchangeCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (PaperWidget, paper.change_cb),XtRCallback,NULL},
+	{ XmNfontList, XmCFontList, XmRFontList, sizeof (XmFontList),
+	XtOffset (PaperWidget, paper.graphics.font), XmRString, "fixed"},
+
+	{ "gridColor", "GridColor", XmRPixel, sizeof(Pixel), 
+	XtOffset(PaperWidget, paper.grid_color), XmRString, "LightGray"},
+
+};
+static char defaultTranslations[] = 
+"<Btn1Down>:start_drag()\n\
+<Btn1Motion>:drag()\n\
+<Btn1Up>:end_drag()\n\
+<Key>osfDelete:delete()\n\
+<Key>osfBackSpace:delete()\n\
+<Key>osfInsert:insert()\n\
+Ctrl<Key>i:inset()\n\
+Ctrl<Key>t:align_top()\n\
+Ctrl<Key>l:align_left()\n\
+Ctrl<Key>r:align_right()\n\
+Ctrl<Key>b:align_bottom()\n\
+Ctrl<Key>h:distribute_h()\n\
+Ctrl<Key>v:distribute_v()\n\
+Ctrl<Key>a:select_all()\n\
+Ctrl<Key>n:select_none()\n\
+Ctrl<Key>j:join()\n\
+Ctrl<Key>g:group()\n\
+Ctrl<Key>u:ungroup()\n\
+Ctrl<Key>2:split(2,2)\n\
+Ctrl<Key>3:split(3,3)\n\
+Ctrl<Key>4:split(4,4)\n\
+Ctrl<Key>5:split(5,5)\n\
+Ctrl<Key>6:split(6,6)\n\
+Ctrl<Key>7:split(7,7)\n\
+Ctrl<Key>8:split(8,8)\n\
+Ctrl<Key>9:split(9,9)\n\
+<EnterWindow>:ManagerEnter()\n\
+<LeaveWindow>:ManagerLeave()\n\
+<FocusOut>:ManagerFocusOut()\n\
+<FocusIn>:ManagerFocusIn()\n\
+<Key>osfHelp: ManagerGadgetHelp()";
+
+static XtActionsRec actionsList[] = {
+	{ "align_top", (XtActionProc) PaperAlignTop},
+	{ "align_bottom", (XtActionProc) PaperAlignBottom},
+	{ "align_left", (XtActionProc) PaperAlignLeft},
+	{ "align_right", (XtActionProc) PaperAlignRight},
+	{ "distribute_h", (XtActionProc) PaperDistributeHorizontally},
+	{ "distribute_v", (XtActionProc) PaperDistributeVertically},
+	{ "inset", (XtActionProc) Inset},
+	{ "start_drag", (XtActionProc) StartDrag},
+	{ "drag", (XtActionProc) Drag},
+	{ "end_drag", (XtActionProc) EndDrag},
+	{ "join", (XtActionProc) Join},
+	{ "group", (XtActionProc) Group},
+	{ "ungroup", (XtActionProc) Ungroup},
+	{ "split", (XtActionProc) Split},
+	{ "select_all", (XtActionProc) SelectAll},
+	{ "select_none", (XtActionProc) SelectNone}, 
+	{ "insert", (XtActionProc) Insert},
+	{ "delete", (XtActionProc) Delete}, 
+};
+
+static XmNavigability nav(Widget w)
+{
+	printf("here.... \n");
+	return XmTAB_NAVIGABLE;
+}
+
+
+static void HighlightBorder( Widget w )
+{   
+    PaperWidget pw = (PaperWidget) w ;
+
+    _XmDrawSimpleHighlight( XtDisplay( pw), XtWindow( pw), 
+		     pw->paper.gc, 0, 0, 
+		     XtWidth( pw), XtHeight( pw),
+		     2);
+}
+
+#if 0
+
+static void UnhighlightBorder( Widget w )
+{   
+    PaperWidget pw = (PaperWidget) w ;
+
+    if(XmIsManager (pw->core.parent))  {   
+        _XmDrawSimpleHighlight( XtDisplay( pw), XtWindow( pw), 
+			       ((XmManagerWidget)(pw->core.parent))
+			       ->manager.background_GC,
+			       0, 0, XtWidth( w), XtHeight( w),
+			       2) ;
+    } else 
+
+	_XmClearBorder( XtDisplay (pw), XtWindow (pw), 0, 0, XtWidth( w),
+		       XtHeight( w) , 2) ;
+}
+
+static void FocusChange( Widget wid, XmFocusChange change)
+{
+	switch(change)
+	{
+		case XmENTER:
+		case XmFOCUS_IN:
+			HighlightBorder(wid);
+			break;
+
+		case XmLEAVE:
+		case XmFOCUS_OUT:
+			UnhighlightBorder(wid);
+			break;
+	}
+}
+
+#endif
+
+static XmBaseClassExtRec BaseClassExtRec = {
+    NULL,
+    NULLQUARK,
+    XmBaseClassExtVersion,
+    sizeof(XmBaseClassExtRec),
+    NULL,               /* InitializePrehook    */
+    NULL,               /* SetValuesPrehook */
+    NULL,               /* InitializePosthook   */
+    NULL,               /* SetValuesPosthook    */
+    NULL,               /* secondaryObjectClass */
+    NULL,               /* secondaryCreate  */
+    NULL,                       /* getSecRes data   */
+    { 0 },              /* fastSubclass flags   */
+    NULL,               /* get_values_prehook   */
+    NULL,               /* get_values_posthook  */
+    NULL,                               /* classPartInitPrehook */
+    NULL,                               /* classPartInitPosthook*/
+    NULL,                               /* ext_resources        */
+    NULL,                               /* compiled_ext_resources*/
+    0,                                  /* num_ext_resources    */
+    FALSE,                              /* use_sub_resources    */
+    XmInheritWidgetNavigable,           /* widgetNavigable      */
+    XmInheritFocusChange,               /* focusChange          */
+};
+
+
+
+PaperClassRec paperClassRec = {
+	{
+	/* core_class fields  */
+	(WidgetClass) &xmDrawingAreaClassRec,/* superclass         */
+	"Paper",			/* class_name         */
+	sizeof(PaperRec),		/* widget_size        */
+	ClassInitialize,				/* class_init         */
+	NULL,				/* class_part_init    */
+	FALSE,				/* class_inited       */
+	Initialize,			/* initialize         */
+	NULL,				/* initialize_hook    */
+	XtInheritRealize,		/* realize            */
+	actionsList,			/* actions            */
+	XtNumber(actionsList),		/* num_actions        */
+	resources,			/* resources          */
+	XtNumber(resources),		/* num_resources      */
+	NULLQUARK,			/* xrm_class          */
+	TRUE,				/* compress_motion    */
+	XtExposeCompressMaximal,	/* compress_exposure  */
+	TRUE,				/* compress_enterleave*/
+	TRUE,				/* visible_interest   */
+	Destroy,			/* destroy            */
+	Resize,                         /* resize             */
+	Redisplay,			/* expose             */
+	SetValues,			/* set_values         */
+	NULL,				/* set_values_hook    */
+	XtInheritSetValuesAlmost,	/* set_values_almost  */
+	NULL,				/* get_values_hook    */
+	NULL,				/* accept_focus       */
+	XtVersion,			/* version            */
+	NULL,				/* callback_private   */
+	defaultTranslations,		/* tm_table           */
+	NULL,				/* query_geometry     */
+	XtInheritDisplayAccelerator,	/* display_accelerator*/
+	(XtPointer) &BaseClassExtRec,				/* extension          */
+	},
+	{
+	/* composite_class fields */
+	XtInheritGeometryManager,	/* geometry_manager    */
+	XtInheritChangeManaged,         /* change_managed      */
+	XtInheritInsertChild,		/* insert_child        */
+	XtInheritDeleteChild,		/* delete_child        */
+	NULL				/*&compext*/
+	,				/* extension           */
+	},
+	{
+	/* constraint_class fields */
+	NULL,				/* subresources        */
+	0,				/* subresource_count   */
+	0,				/* constraint_size     */
+	NULL,				/* initialize          */
+	NULL,				/* destroy             */
+	NULL,				/* set_values          */
+	NULL,				/* extension           */
+	},
+	{
+	_XmDrawingA_traversalTranslations,		/* default translations */
+	NULL,				/* syn_resources          */
+	0,				/* num_syn_resources      */
+	NULL,				/* syn_cont_resources     */
+	0,				/* num_syn_cont_resources */
+	XmInheritParentProcess,         /* parent_process */
+	NULL,				/* extension              */
+
+	},
+	/*  drawingArea class */
+	{
+	0,
+	},
+	{
+	/* Paper class fields */
+	0,				/* ignore              */
+	}
+};
+
+WidgetClass	paperWidgetClass = (WidgetClass)& paperClassRec;
+/*========================================================================*/
+static PaperRectangle* groupable(PaperWidget w, PaperRectangle *r);
+/*========================================================================*/
+
+static void ClassInitialize()
+{
+	BaseClassExtRec.record_type = XmQmotif ;
+}
+
+static void create_gc(PaperWidget w)
+{
+	XGCValues	values;
+	XtGCMask	valueMask;
+	static char dash[] = {
+		5, 1	};
+	valueMask = GCForeground | GCBackground|GCFont;
+	values.background = w->core.background_pixel;
+	values.foreground = w->paper.foreground;
+	values.font       = XLoadFont(XtDisplay(w),"fixed");
+
+	w->paper.gc          = XtGetGC((Widget) w, valueMask, &values);
+	w->paper.graphics.gc = XtGetGC((Widget) w, valueMask, &values);
+
+	values.foreground = w->paper.white;
+	w->paper.white_gc = XtGetGC((Widget) w, valueMask, &values);
+
+	values.foreground = w->paper.selected;
+	w->paper.selected_gc = XtGetGC((Widget) w, valueMask, &values);
+
+	valueMask = GCBackground | GCForeground | GCLineStyle;
+	values.line_style = LineOnOffDash;
+	values.line_style = LineDoubleDash;
+	values.foreground = w->paper.dash;
+	w->paper.dash_gc = XtGetGC((Widget) w, valueMask, &values);
+
+	values.foreground = w->paper.grid_color;
+	w->paper.grid_gc = XtGetGC((Widget) w, valueMask, &values);
+
+	valueMask = GCFunction | GCForeground | GCBackground;
+	values.background = w->core.background_pixel;
+	values.foreground = w->paper.foreground;
+	values.foreground = values.foreground ^ values.background;
+	values.background = 0;
+	values.function = GXxor;
+	w->paper.xor_gc = XtGetGC((Widget) w, valueMask, &values);
+}
+static void delete_gc(PaperWidget w)
+{
+	XtReleaseGC((Widget) w, w->paper.gc);
+	XtReleaseGC((Widget) w, w->paper.graphics.gc);
+	XtReleaseGC((Widget) w, w->paper.dash_gc);
+	XtReleaseGC((Widget) w, w->paper.selected_gc);
+	XtReleaseGC((Widget) w, w->paper.xor_gc);
+	XtReleaseGC((Widget) w, w->paper.white_gc);
+	XtReleaseGC((Widget) w, w->paper.grid_gc);
+}
+/* #define NORMALIZE(a) ( ((int)(a*100 + 0.5))/100.0 )  */
+# define NORMALIZE(a) (a)
+
+static void validate(PaperRectangle* r)
+{
+	if(r->top < 0)    r->top = 0;
+	if(r->bottom < 0) r->bottom = 0;
+	if(r->left < 0)   r->left = 0;
+	if(r->right < 0)  r->right = 0;
+
+	if(r->top > 1)    r->top = 1;
+	if(r->bottom > 1) r->bottom = 1;
+	if(r->left > 1)   r->left = 1;
+	if(r->right > 1)  r->right = 1;
+
+	if(r->top > r->bottom)
+	{
+		double x = r->bottom;
+		r->bottom = r->top;
+		r->top = x;
+	}
+
+	if(r->left > r->right)
+	{
+		double x = r->right;
+		r->right = r->left;
+		r->left = x;
+	}
+
+	if(r->top == r->bottom)
+	{
+		r->top = 0;
+		r->bottom = 1;
+	}
+
+	if(r->left == r->right)
+	{
+		r->left = 0;
+		r->right = 1;
+	}
+
+}
+
+static PaperRectangle *new_rectangle(
+double top, 
+double left, 
+double bottom, 
+double right
+)
+{
+	PaperRectangle *r = XtNew(PaperRectangle);
+
+	r->top = NORMALIZE(top);
+	r->left = NORMALIZE(left);
+	r->bottom = NORMALIZE(bottom);
+	r->right = NORMALIZE(right);
+	r->next = 0;
+	r->kids = 0;
+	r->data = 0;
+	r->selected = True;
+	r->resizing = False;
+	r->number   = 0;
+
+
+	validate(r);
+
+
+	return r;
+}
+
+static void r_dump(PaperRectangle *r, int depth)
+{
+	if(r)
+	{
+		int i;
+		for(i = 0; i < depth ; i++) printf("   ");
+		printf("[%g %g %g %g] ",r->top,r->left,r->bottom,r->right);
+		printf("%p %d %d\n",r->data,r->number,r->selected);
+		r_dump(r->kids,depth+1);
+		r_dump(r->next,depth);
+	}
+}
+
+static void call(PaperWidget w,const char* what,
+PaperRectangle *r1,PaperRectangle* r2,PaperRectangle *r3)
+{
+	PaperCallbackStruct cb = { 
+		0, 	};
+	cb.r1 = r1;
+	cb.r2 = r2;
+	cb.r3 = r3;
+	XtCallCallbacks((Widget)w,what,(XtPointer)&cb);
+}
+
+static PaperRectangle *delete_rectangle(PaperWidget w,PaperRectangle *r)
+{
+	PaperRectangle *s = r->next;
+
+	call(w,XmNdeleteCallback,r,0,0);
+
+	if (r->kids)
+		delete_rectangle(w,r->kids);
+
+	XtFree((XtPointer) r);
+	return s;
+}
+
+static void paper_size(PaperWidget w)
+{
+
+	XRectangle  z = *(XRectangle*)&w->core.x;
+	XRectangle y;
+	double a,b;
+
+	z.x += w->paper.hmargin;
+	z.y += w->paper.vmargin;
+
+	z.width -= 2*w->paper.hmargin;
+	z.height -= 2*w->paper.vmargin;
+
+	y.x = 0;
+	y.y = 0;
+
+	y.width  = (double) w->paper.hpage;
+	y.height = (double) w->paper.vpage;
+
+	a = z.width  / w->paper.hpage;
+	b = z.height / w->paper.vpage;
+
+	if(a>b) a = b;
+
+	y.width  = a*w->paper.hpage;
+	y.height = a*w->paper.vpage;
+
+	w->paper.grid_x = (int)(y.width*w->paper.page_grid_x + 0.5);
+	w->paper.grid_y = (int)(y.height*w->paper.page_grid_y + 0.5);
+
+	y.x = (z.width - y.width)/2;
+	y.y = (z.height - y.height)/2;
+
+	w->paper.page = y;
+
+	if(w->paper.offscreen)
+	{
+		Display *dpy   = XtDisplay(w);
+		int     screen = DefaultScreen(dpy);
+		Window  root   = RootWindow(dpy,screen);
+
+		w->paper.pixmap = XCreatePixmap(dpy,root,
+		    w->core.width,
+		    w->core.height,
+		    w->core.depth);
+	}
+}
+
+static void Initialize(PaperWidget request, PaperWidget new)
+{
+	if (request->core.width <= 0)
+		new->core.width = 5;
+
+	if (request->core.height <= 0)
+		new->core.height = 5;
+
+	new->paper.rects = new_rectangle(0, 0, 1, 1);
+	create_gc(new);
+	new->paper.hmargin = 2;
+	new->paper.vmargin = 2;
+	new->paper.what = 0;
+	new->paper.vpage = 21.0;
+	new->paper.hpage = 29.7;
+	new->paper.offscreen = True;
+	new->paper.pixmap  = 0;
+	new->paper.last_click = 0;
+	new->paper.handles = True;
+	new->paper.free_moves = True;
+	new->paper.grid = False;
+	new->paper.snap = False;
+	new->paper.page_grid_x = 0.125;
+	new->paper.page_grid_y = 0.125;
+	paper_size(new);
+}
+
+static void Destroy(PaperWidget widget)
+{
+	PaperRectangle *r = widget->paper.rects;
+
+	while (widget->paper.rects)
+		widget->paper.rects = delete_rectangle(widget,widget->paper.
+		    rects);
+
+	delete_gc(widget);
+
+	if(widget->paper.pixmap)
+		XFreePixmap(XtDisplay(widget), widget->paper.pixmap);
+}
+
+static Boolean SetValues(PaperWidget current, PaperWidget request, 
+PaperWidget new)
+{
+	if (current->paper.foreground != request->paper.foreground) {
+		delete_gc(current);
+		create_gc(new);
+	}
+	return True;
+}
+# define PERCENT(a,b,c) ((int)(((double)ref->a)*((double)r->b)+0.5)+ref->c)
+
+static XRectangle rectangle(PaperWidget w, XRectangle *ref, 
+PaperRectangle *r)
+{
+	XRectangle	x;
+
+	int top    = PERCENT(height, top,    y);
+	int bottom = PERCENT(height, bottom, y);
+	int left   = PERCENT(width,  left,   x);
+	int right  = PERCENT(width,  right,  x);
+
+	x.x      = left;
+	x.y      = top;
+	x.width  = right - left;
+	x.height = bottom - top;
+
+	return x;
+}
+static Boolean in_rect(XEvent *event, XRectangle *x)
+{
+	return (event->xbutton.x > x->x && 
+	    event->xbutton.y > x->y && 
+	    event->xbutton.x < x->x + x->width && 
+	    event->xbutton.y < x->y + x->height);
+}
+# define HANDLE 6
+# define WHAT_SELECT	  -1
+
+static int get_rects(PaperWidget w,
+	PaperRectangle *lr, XRectangle *x, XRectangle *r)
+{
+	int		i = 0;
+	int             offset;
+
+	if(!w->paper.handles)
+		return 0;
+
+	offset = w->paper.editable ? HANDLE : 0;
+	for (i = 0; i < 9; i++)
+		r[i].width = r[i].height = offset;
+
+# define WHAT_TOP_LEFT 0
+	r[0].x = x->x;
+	r[0].y = x->y;
+	/* if (lr->top == 0 || lr->left == 0) r[0].width = r[0].height = 0; */
+
+# define WHAT_TOP      1
+	r[1].x = x->x + x->width / 2 - offset / 2;
+	r[1].y = x->y;
+	/* if (lr->top == 0) r[1].width = r[1].height = 0; */
+
+# define WHAT_TOP_RIGHT 2
+	r[2].x = x->x + x->width - offset;
+	r[2].y = x->y;
+	/* if (lr->top == 0 || lr->right == 1) r[2].width = r[2].height = 0; */
+
+# define WHAT_LEFT 3
+	r[3].x = x->x;
+	r[3].y = x->y + x->height / 2 - offset / 2;
+	/* if (lr->left == 0) r[3].width = r[3].height = 0; */
+
+# define WHAT_CENTER	  4
+	r[4].x = x->x + x->width / 2 - offset / 2;
+	r[4].y = x->y + x->height / 2 - offset / 2;
+	/* if (lr->top == 0 || lr->left == 0 || lr->bottom == 1 || lr-> right == 1) r[4].width = r[4].height = 0; */
+
+# define WHAT_RIGHT 5
+	r[5].x = x->x + x->width - offset;
+	r[5].y = x->y + x->height / 2 - offset / 2;
+	/* if (lr->right == 1) r[5].width = r[5].height = 0; */
+
+# define WHAT_BOTTOM_LEFT 6
+	r[6].x = x->x;
+	r[6].y = x->y + x->height - offset;
+	/* if (lr->left == 0 || lr->bottom == 1) r[6].width = r[6].height = 0; */
+
+# define WHAT_BOTTOM	  7
+	r[7].x = x->x + x->width / 2 - offset / 2;
+	r[7].y = x->y + x->height - offset;
+	/* if (lr->bottom == 1) r[7].width = r[7].height = 0; */
+
+# define WHAT_BOTTOM_RIGHT 8
+	r[8].x = x->x + x->width - offset;
+	r[8].y = x->y + x->height - offset;
+	/* if (lr->bottom == 1 || lr->right == 1) r[8].width = r[8].height = 0; */
+
+	return 9;
+}
+static PaperRectangle *click(PaperWidget w, XEvent *event, int *what)
+{
+	PaperRectangle *r = w->paper.rects;
+	*what = WHAT_SELECT;
+
+	while (r) {
+		XRectangle	x = rectangle(w, &w->paper.page, r);
+		if (in_rect(event, &x)) {
+			XRectangle	y[10];
+			int		i;
+			int		n = get_rects(w,r, &x, y);
+
+			for (i = 0; i < n; i++)
+				if (in_rect(event, &y[i]))
+				{
+					*what = i;
+				}
+
+			return r;
+		}
+		r = r->next;
+	}
+	return 0;
+}
+
+static void get_drag_handle(PaperWidget w,XRectangle* result)
+{
+	XRectangle  x = rectangle(w, &w->paper.page, w->paper.drag);
+	XRectangle  y[10];
+	get_rects(w,w->paper.drag, &x, y);
+	*result = y[w->paper.what];
+}
+
+
+static void draw(PaperWidget w, Drawable d,XRectangle *ref, GC gc, 
+PaperRectangle *r)
+{
+	XRectangle	x = rectangle(w, ref, r);
+	PaperRectangle *k = r->kids;
+
+	PaperCallbackStruct cb = { 
+		0, 	};
+	cb.r1             = r;
+	cb.graphics       = &w->paper.graphics;
+	cb.graphics->r    = r;
+	cb.graphics->rect = &x;
+
+	XSetClipRectangles(XtDisplay(w),w->paper.graphics.gc,0,0,&x,1,Unsorted);
+	XtCallCallbacks((Widget)w,XmNdrawCallback,(XtPointer)&cb);
+	XSetClipMask(XtDisplay(w),w->paper.graphics.gc,None);
+
+	while (k) {
+		draw(w, d, &x, w->paper.dash_gc, k);
+		k = k->next;
+	}
+	XDrawRectangles(XtDisplay(w), d, gc, &x, 1);
+	if (r->selected && w->paper.editable) {
+		XRectangle	y[10];
+		int		n = get_rects(w,r, &x, y);
+
+		XFillRectangles(XtDisplay(w), d, gc, y, n);
+	}
+}
+
+static void redraw(PaperWidget w,Drawable d)
+{
+	PaperRectangle *r = w->paper.rects;
+	w->paper.graphics.drawable = d;
+
+	XFillRectangles(XtDisplay(w), d, w->paper.white_gc,&w->paper.page,1);
+
+	if(w->paper.grid)
+	{
+		int x = w->paper.page.x;
+		int y = w->paper.page.y;
+
+		x += w->paper.grid_x;
+		y += w->paper.grid_y;
+
+		while( x <=  w->paper.page.width + w->paper.page.x)
+		{
+			XDrawLine(XtDisplay(w), d, w->paper.grid_gc, 
+				x, w->paper.page.y, 
+				x, w->paper.page.height + w->paper.page.y);
+
+			x += w->paper.grid_x;
+		}
+		
+		while( y <= w->paper.page.height + w->paper.page.y)
+		{
+			XDrawLine(XtDisplay(w), d, w->paper.grid_gc, 
+				w->paper.page.x, y, 
+				w->paper.page.width+w->paper.page.x,y);
+			y += w->paper.grid_y;
+		}
+	}
+
+	while (r) {
+		if (!r->selected)
+			draw(w, d, &w->paper.page, w->paper.gc, r);
+		r = r->next;
+	}
+
+	r = w->paper.rects;
+	while (r) {
+		if (r->selected)
+			draw(w, d, &w->paper.page, w->paper.selected_gc, r);
+		r = r->next;
+	}
+}
+
+static void Redisplay(PaperWidget w, XEvent *event, Region region)
+{
+	XEvent		ev;
+	if(w->paper.pixmap)
+	{
+		XSetForeground(XtDisplay(w),w->paper.gc,w->core.background_pixel);
+		XFillRectangle(XtDisplay(w),w->paper.pixmap,w->paper.gc,
+		    0,0,w->core.width,w->core.height);
+		XSetForeground(XtDisplay(w),w->paper.gc,w->paper.foreground);
+		redraw(w,w->paper.pixmap);
+		XCopyArea(XtDisplay(w),w->paper.pixmap,XtWindow(w),
+		    w->paper.gc,0,0,w->core.width,w->core.height,0,0);
+	}
+	else 
+		redraw(w,XtWindow(w));
+}
+
+static PaperRectangle* sort(PaperRectangle* r)
+{
+	int n = 0;
+	PaperRectangle *first = r;
+	int more = 1;
+
+	if(!r) return 0;
+
+	while(more)
+	{
+		PaperRectangle* a = first;
+		PaperRectangle* b = first->next;
+		PaperRectangle* c = 0;
+		more = 0;
+
+
+		while(b)
+		{
+			if(b->top < a->top || (b->top == a->top && b->left < a->left))
+			{
+
+				a->next = b->next;
+				b->next = a;
+
+				if(c) c->next = b;
+				else first   = b;
+
+
+				more = 1;
+				break;
+			}
+
+			c = a;
+			a = b;
+			b = b->next;
+		}
+
+	}
+
+
+	r = first;
+	while(r)
+	{
+		r->kids = sort(r->kids);
+		r->number = ++n;
+		r = r->next;
+	}
+	return first;
+}
+
+static void update(PaperWidget w)
+{
+	w->paper.rects = sort(w->paper.rects);
+
+	if(XtIsRealized(w))
+		if(w->paper.pixmap)
+			Redisplay(w,0,0);
+		else 
+			XClearArea(XtDisplay(w),XtWindow(w),0,0,0,0,True);
+
+	call(w,XmNchangeCallback,0,0,0);
+}
+
+
+static void detach_rectangle(PaperWidget w, PaperRectangle *r)
+{
+	PaperRectangle *p = w->paper.rects;
+	PaperRectangle *q = 0;
+
+	while (p) {
+		if (p == r) {
+			if (q)
+				q->next = r->next;
+			else
+				w->paper.rects = r->next;
+
+			r->next = 0;
+			return;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+static void remove_rectangle(PaperWidget w, PaperRectangle *r)
+{
+	detach_rectangle(w, r);
+	delete_rectangle(w,r);
+}
+
+static void split_rectangle(PaperWidget w, PaperRectangle *r, int h, int v,double mh,double mv)
+{
+	int		i, j;
+	double		height = (r->bottom - r->top) / v;
+	double		width = (r->right - r->left) / h;
+	double		x = r->left;
+
+	for (i = 0; i < h; i++) {
+		double		y = r->top;
+
+		for (j = 0; j < v; j++)
+		{
+			PaperRectangle *t = new_rectangle(
+				(j == 0) ? y : (y+mv/2.0), 
+				(i == 0) ? x : (x+mv/2.0), 
+				(j == v - 1) ? r->bottom : (y + height - mv/2.0), 
+			    	(i == h - 1) ? r->right  : (x + width - mh /2.0)
+			    );
+			t->next = w->paper.rects;
+			w->paper.rects = t;
+			y += height;
+			call(w,XmNsplitCallback,r,t,0);
+		}
+		x += width;
+	}
+	remove_rectangle(w, r);
+}
+
+static void Resize(PaperWidget w)
+{
+	if(w->paper.pixmap)
+	{
+		XFreePixmap(XtDisplay(w), w->paper.pixmap);
+		w->paper.pixmap = 0;
+	}
+
+	paper_size(w);
+	update(w);
+	if (XtIsRealized(w))
+		XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True);
+}
+
+Widget CreatePaperWidget(Widget par, const char *nam, Arg *al, int ac)
+{
+	return XtCreateWidget(nam, paperWidgetClass, par, al, ac);
+}
+
+void PaperSplitSelection(Widget _w, int h, int v,double mh,double mv)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	PaperRectangle *r = w->paper.rects;
+
+	if (h == 0 || v == 0)
+		return;
+
+	while (r) {
+		PaperRectangle *s = r->next;
+
+		if (r->selected && !r->kids)
+			split_rectangle(w, r, h, v, mh, mv);
+
+		r = s;
+	}
+	update(w);
+
+}
+static Boolean join(PaperWidget w, PaperRectangle *r)
+{
+	PaperRectangle *s = w->paper.rects;
+	if (s = groupable(w,r) ) {
+		PaperRectangle *t = new_rectangle(
+		    MIN(s->top, r->top), 
+		    MIN(s->left, r-> left), 
+		    MAX(s->bottom, r-> bottom), 
+		    MAX(s->right, r-> right)
+		    );
+
+		call(w,XmNjoinCallback,r,s,t);
+
+		t->next = w->paper.rects;
+		w->paper.rects = t;
+		remove_rectangle(w, s);
+		remove_rectangle(w, r);
+		return True;
+	}
+	return False;
+}
+
+void PaperJoinSelection(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	Boolean         more = True;
+	while (more) {
+		PaperRectangle *r = w->paper.rects;
+
+		more = False;
+		while (r) {
+			if (r->selected && !r->kids)
+				if (join(w, r)) {
+					more = True;
+					break;
+				}
+			r = r->next;
+		}
+	}
+	update(w);
+}
+
+void PaperDeleteSelection(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	int more = 1;
+
+	while(more)
+	{
+		PaperRectangle *r = w->paper.rects;
+		more = 0;
+		while (r) {
+			if(r->selected)
+			{
+				remove_rectangle(w,r);
+				more = 1;
+				break;
+			}
+			r = r->next;
+		}
+	}
+	update(w);
+}
+
+
+static void select_all(PaperWidget w, Boolean on)
+{
+	PaperRectangle *r = w->paper.rects;
+	int		n = 0;
+
+	while (r) {
+		if (r->selected != on) {
+			r->selected = on;
+			n++;
+		}
+		r = r->next;
+	}
+	if (n) update(w);
+
+}
+
+static void SelectAll(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	select_all(w, True);
+}
+
+static void SelectNone(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	select_all(w, False);
+}
+
+static double resize_top(PaperWidget,PaperRectangle*,double,Boolean,Boolean);
+static double resize_bottom(PaperWidget,PaperRectangle*,double,Boolean,Boolean);
+static double resize_left(PaperWidget,PaperRectangle*,double,Boolean,Boolean);
+static double resize_right(PaperWidget,PaperRectangle*,double,Boolean,Boolean);
+
+typedef double (*ResizeProc)(PaperWidget,PaperRectangle*,double,Boolean,Boolean);
+
+typedef double (*GetProc)(PaperRectangle*);
+
+static double get_top(PaperRectangle* r)    { return r->top; }
+static double get_left(PaperRectangle* r)   { return r->left; }
+static double get_bottom(PaperRectangle* r) { return r->bottom; }
+static double get_right(PaperRectangle* r)  { return r->right; }
+
+typedef void (*SetProc)(PaperRectangle*,double);
+
+static void set_top(PaperRectangle* r,double a)    { r->top  = a; }
+static void set_left(PaperRectangle* r,double a)   { r->left = a; }
+static void set_bottom(PaperRectangle* r,double a) { r->bottom = a; }
+static void set_right(PaperRectangle* r,double a)  { r->right = a; }
+
+typedef int (*CompareProc)(double,double);
+static int smaller(double a,double b) { return a < b; }
+static int greater(double a,double b) { return a > b; }
+
+typedef double (*PageProc)(PaperWidget);
+static double page_width(PaperWidget w)  { return w->paper.hpage; }
+static double page_height(PaperWidget w) { return w->paper.vpage; }
+static double grid_width(PaperWidget w)  { return w->paper.page_grid_x; }
+static double grid_height(PaperWidget w) { return w->paper.page_grid_y; }
+
+typedef struct {
+	SetProc    set_this;
+	SetProc    set_opposite;
+	GetProc    this;
+	GetProc    opposite;
+	GetProc    other_low;
+	GetProc    other_high;
+	ResizeProc resize_opposite;
+	CompareProc compare;
+	double      minimum;
+	PageProc    page;
+	PageProc    grid;
+} Helper;
+
+static Helper topHelper = {
+	set_top,
+	set_bottom,
+	get_top,
+	get_bottom,
+	get_left,
+	get_right,
+	resize_bottom,
+	greater,
+	MINIMUM,
+	page_height,
+	grid_height,
+};
+
+static Helper bottomHelper = {
+	set_bottom,
+	set_top,
+	get_bottom,
+	get_top,
+	get_left,
+	get_right,
+	resize_top,
+	smaller,
+	-MINIMUM,
+	page_height,
+	grid_height,
+};
+
+static Helper leftHelper = {
+	set_left,
+	set_right,
+	get_left,
+	get_right,
+	get_top,
+	get_bottom,
+	resize_right,
+	greater,
+	MINIMUM,
+	page_width,
+	grid_width,
+};
+ 
+static Helper rightHelper = {
+	set_right,
+	set_left,
+	get_right,
+	get_left,
+	get_top,
+	get_bottom,
+	resize_left,
+	smaller,
+	-MINIMUM,
+	page_width,
+	grid_width,
+};
+
+static double resize_x(Helper* x,PaperWidget w,
+	PaperRectangle *r,double amount,Boolean doit,Boolean free)
+{
+	double		a;
+	int		m = 0;
+	PaperRectangle *s = w->paper.rects;
+
+	if (r->resizing)
+		return amount;
+
+	r->resizing = True;
+	if(!free)
+	while (s) {
+		if (MAX(x->other_low(s), x->other_low(r)) < 
+			MIN(x->other_high(s), x->other_high(r))) 
+		{
+			a = x->this(r) + amount;
+/*			if ( x->compare(a,x->this(s)) && !x->compare(a,x->opposite(s))) */
+			if(EQUAL(x->opposite(s),x->this(r)))
+			 {
+				a = x->resize_opposite(w, s, amount, doit,free);
+				if (ABS(a) < ABS(amount))
+					amount = a;
+			}
+		}
+		s = s->next;
+	}
+	a = NORMALIZE(x->this(r) + amount);
+	if (a < 0)
+		a = 0;
+
+	if (a > 1)
+		a = 1;
+
+
+	if (x->compare(a + x->minimum,x->opposite(r)))
+		a = x->opposite(r) - x->minimum;
+
+
+	amount = a - x->this(r);
+	if (doit)
+		x->set_this(r,a); 
+
+	r->resizing = False;
+	if (doit && amount)
+		w->paper.dirty = True;
+
+	return amount;
+}
+
+/*--------------------------------------------------------------------*/
+
+static double resize_top(PaperWidget w,PaperRectangle *r,
+	double amount,Boolean doit,Boolean free)
+{
+	return resize_x(&topHelper,w,r,amount,doit,free);
+}
+
+static double resize_bottom(PaperWidget w,PaperRectangle *r,
+	double amount,Boolean doit,Boolean free)
+{
+	return resize_x(&bottomHelper,w,r,amount,doit,free);
+}
+
+static double resize_left(PaperWidget w,PaperRectangle *r,
+	double amount,Boolean doit,Boolean free)
+{
+	return resize_x(&leftHelper,w,r,amount,doit,free);
+}
+
+static double resize_right(PaperWidget w,PaperRectangle *r,
+	double amount,Boolean doit,Boolean free)
+{
+	return resize_x(&rightHelper,w,r,amount,doit,free);
+}
+
+/*--------------------------------------------------------------------*/
+static void StartDrag(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	Boolean         shift = (event->xkey.state & ShiftMask);
+	PaperRectangle *r = click(w, event, &w->paper.what);
+
+	w->paper.drag = r;
+
+	XmProcessTraversal((Widget)w,XmTRAVERSE_CURRENT);
+
+	w->paper.startx = event->xbutton.x;
+	w->paper.starty = event->xbutton.y;
+	w->paper.lastx = event->xbutton.x;
+	w->paper.lastx = event->xbutton.y;
+
+	if (w->paper.what == WHAT_SELECT) {
+		if (!shift)
+			select_all(w, False);
+
+		if (r) {
+			r->selected = !r->selected;
+			update(w);
+		}
+	}
+	else {
+		w->paper.constraint = shift;
+		w->paper.which_constraint = -1;
+	}
+
+	w->paper.sel.x = 
+	    w->paper.sel.y = 
+	    w->paper.sel.width = 
+	    w->paper.sel.height = 0;
+
+	if( w->paper.last_click && ((event->xbutton.time - w->paper.last_click) < 
+	    XtGetMultiClickTime(XtDisplay(w))))
+	{
+		if(r) call(w,XmNdblClickCallback,r,0,0);
+		w->paper.what = WHAT_SELECT;
+		w->paper.last_click = 0;
+	}
+	else
+		w->paper.last_click = event->xbutton.time;
+}
+
+static void Drag(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	Boolean control = (event->xkey.state & ControlMask);
+
+	Boolean free    = w->paper.free_moves;
+
+	if(control) free = !free;
+
+	if (w->paper.what == WHAT_SELECT) {
+		int		newx = event->xbutton.x;
+		int		newy = event->xbutton.y;
+
+		if (newx != w->paper.lastx && newy != w->paper.lastx) {
+			XDrawRectangles(XtDisplay(w), XtWindow(w), 
+			    w->paper.xor_gc, 
+			    & w->paper.sel, 1);
+			w->paper.lastx = newx;
+			w->paper.lasty = newy;
+			w->paper.sel.x = MIN(newx, w->paper.startx);
+			w->paper.sel.y = MIN(newy, w->paper.starty);
+			w->paper.sel.width = MAX(newx, w->paper.
+			    startx)
+			    - w->paper.sel.x;
+			w->paper.sel.height = MAX(newy, w->paper.
+			    starty)
+			    - w->paper.sel.y;
+			XDrawRectangles(XtDisplay(w), XtWindow(w), 
+			    w->paper.xor_gc, 
+			    & w->paper.sel, 1);
+		}
+	}
+	else {
+
+		Boolean         b;
+		PaperRectangle *r = w->paper.rects;
+		double amount_x;
+		double amount_y;
+		amount_x = (double)(event->xbutton.x - w->paper.startx) / (double)w->paper.page.width;
+		amount_y = (double)(event->xbutton.y - w->paper.starty) / (double)w->paper.page.height;
+
+		if(w->paper.snap)
+		{
+			int x = event->xbutton.x;
+			int y = event->xbutton.y;
+			int x0,y0,x1,y1;
+			XRectangle hit;
+
+			get_drag_handle(w,&hit);
+
+			printf ("%d %d\n",x,y);
+			printf ("%d %d %d %d\n",hit.x,hit.y,hit.width,hit.height);
+
+			switch (w->paper.what) {
+
+				case WHAT_TOP_LEFT:
+					x = hit.x;
+					y = hit.y;
+					break;
+
+				case WHAT_TOP:
+					y = hit.y;
+					break;
+
+				case WHAT_TOP_RIGHT:
+					x = hit.x + hit.width;
+					y = hit.y;
+					break;
+
+				case WHAT_LEFT:
+					x = hit.x;
+					break;
+
+				case WHAT_CENTER:
+					x = hit.x + hit.width / 2;
+					y = hit.y + hit.height / 2;
+					break;
+
+				case WHAT_RIGHT:
+					x = hit.x + hit.width;
+					break;
+
+				case WHAT_BOTTOM_LEFT:
+					x = hit.x;
+					y = hit.y + hit.height;
+					break;
+
+				case WHAT_BOTTOM:
+					y = hit.y + hit.height;
+					break;
+
+				case WHAT_BOTTOM_RIGHT:
+					x = hit.x + hit.width;
+					y = hit.y + hit.height;
+					break;
+			}
+
+			w->paper.startx = x;
+			w->paper.starty = y;
+
+			x = event->xbutton.x;
+			y = event->xbutton.y;
+
+			x -= w->paper.page.x;
+			x -= w->paper.page.y;
+
+			x0 = ((int)(x / w->paper.grid_x)) * w->paper.grid_x;
+			x1 = x0 + w->paper.grid_x;
+
+			y0 = ((int)(y / w->paper.grid_y)) * w->paper.grid_y;
+			y1 = y0 + w->paper.grid_y;
+
+			x =  (x - x0) < (x1 - x) ? x0 : x1;
+			y =  (y - y0) < (y1 - y) ? y0 : y1;
+
+			x += w->paper.page.x;
+			y += w->paper.page.y;
+
+			amount_x = (double)(x - w->paper.startx) / (double)w->paper.page.width;
+			amount_y = (double)(y - w->paper.starty) / (double)w->paper.page.height;
+
+		}
+
+
+		if(w->paper.constraint)
+		{
+			if(w->paper.which_constraint == -1)
+			{
+				w->paper.which_constraint = ABS(amount_x) > ABS(amount_y);
+			}
+
+			if(w->paper.which_constraint)
+				amount_y = 0;
+			else
+				amount_x = 0;
+		}
+
+		if(!w->paper.editable)
+			return;
+
+		while (r) {
+			if (r->selected)
+				for (b = 0; b < 2; b++)
+					switch (w->paper.what) {
+
+					case WHAT_TOP_LEFT:
+						amount_y = resize_top(w, r, amount_y, b,free);
+						amount_x = resize_left(w, r, amount_x, b,free);
+						break;
+
+					case WHAT_TOP:
+						amount_y = resize_top(w, r, amount_y, b,free);
+						break;
+
+					case WHAT_TOP_RIGHT:
+						amount_y = resize_top(w, r, amount_y, b,free);
+						amount_x = resize_right(w, r, amount_x, b,free);
+						break;
+
+					case WHAT_LEFT:
+						amount_x = resize_left(w, r, amount_x, b,free);
+						break;
+
+					case WHAT_CENTER:
+						amount_y = resize_top(w, r, amount_y, b,free);
+						amount_x = resize_left(w, r, amount_x, b,free);
+						amount_y = resize_bottom(w, r, amount_y, b,free);
+						amount_x = resize_right(w, r, amount_x, b,free);
+						break;
+
+					case WHAT_RIGHT:
+						amount_x = resize_right(w, r, amount_x, b,free);
+						break;
+
+					case WHAT_BOTTOM_LEFT:
+						amount_y = resize_bottom(w, r, amount_y, b,free);
+						amount_x = resize_left(w, r, amount_x, b,free);
+						break;
+
+					case WHAT_BOTTOM:
+						amount_y = resize_bottom(w, r, amount_y, b,free);
+						break;
+
+					case WHAT_BOTTOM_RIGHT:
+						amount_y = resize_bottom(w, r, amount_y, b,free);
+						amount_x = resize_right(w, r, amount_x, b,free);
+						break;
+					}
+			r = r->next;
+		}
+		w->paper.startx = event->xbutton.x;
+		w->paper.starty = event->xbutton.y;
+		if (w->paper.dirty) {
+			update(w);
+			w->paper.dirty = False;
+		}
+	}
+}
+
+static Boolean InterRect(XRectangle *r1, XRectangle *r2)
+{
+	if ((r1->x + r1->width) < r2->x || (r1->y + r1->height) < r2->y)
+		return False;
+
+	if (r1->x > (r2->x + r2->width) || r1->y > (r2->y + r2->height))
+		return False;
+
+	return True;
+}
+
+static void EndDrag(PaperWidget w,XEvent *event,char **args, int nargs)
+{
+	if (w->paper.what == WHAT_SELECT) {
+		PaperRectangle *r = w->paper.rects;
+
+		XDrawRectangles(XtDisplay(w), XtWindow(w), 
+		    w->paper.xor_gc, 
+		    & w->paper.sel, 1);
+		while (r) {
+			XRectangle	x = rectangle(w, &w->paper.page, r);
+
+			if (InterRect(&w->paper.sel, &x)) {
+				r->selected = True;
+				w->paper.dirty = True;
+			}
+			r = r->next;
+		}
+	}
+	if (w->paper.dirty) {
+		update(w);
+		w->paper.dirty = False;
+	}
+}
+
+static PaperRectangle *chain(PaperRectangle *r, PaperRectangle *s)
+{
+	PaperRectangle *p = r;
+	PaperRectangle *q = 0;
+
+	if (!r)
+		return s;
+
+	if (!s)
+		return r;
+
+	while (p) {
+		q = p;
+		p = p->next;
+	}
+	q->next = s;
+	return r;
+}
+static PaperRectangle *ungroup(PaperWidget w, PaperRectangle *r)
+{
+	PaperRectangle *s = r->kids;
+	PaperRectangle *t;
+
+	detach_rectangle(w, r);
+	r->selected = False;
+	if (!s)
+		return r;
+
+
+	t = r;
+	while (s) {
+
+
+		s->top    = (t->bottom - t->top)  *s->top + t->top;
+		s->bottom = (t->bottom - t->top)  *s->bottom + t->top;
+		s->left   = (t->right  - t->left) *s->left + t->left;
+		s->right  = (t->right  - t->left) *s->right + t->left;
+
+		s->selected = False;
+
+		call(w,XmNungroupCallback,r,s,0);
+
+		s = s->next;
+	}
+	s = r->kids;
+	r->kids = 0;
+	delete_rectangle(w,r);
+	return s;
+}
+
+
+static PaperRectangle* groupable(PaperWidget w, PaperRectangle *r)
+{
+	PaperRectangle *s = w->paper.rects;
+	while (s) {
+		if (s != r && s->selected) {
+
+			double top    = MIN(s->top, r->top);
+			double left   = MIN(s->left, r-> left);
+			double bottom = MAX(s->bottom, r-> bottom);
+			double right  = MAX(s->right, r-> right);
+
+
+			PaperRectangle *t = w->paper.rects;
+			int ok = 1;
+
+			while (t && ok) {
+				if (t != r && t != s) {
+					double tt = MAX(t->top,    top);
+					double ll = MAX(t->left,   left);
+					double bb = MIN(t->bottom, bottom);
+					double rr = MIN(t->right,  right);
+
+					if(tt<bb && ll<rr)
+						ok = 0;
+				}
+				t = t->next;
+			}
+
+			if(ok) return s;
+
+		}
+		s = s->next;
+	}
+
+	return 0;
+}
+
+
+static Boolean group(PaperWidget w, PaperRectangle *r)
+{
+	PaperRectangle *s = w->paper.rects;
+	PaperRectangle *x;
+
+	if (s = groupable(w,r))
+	{
+		PaperRectangle *t = new_rectangle(
+		    MIN(s->top, r->top), 
+		    MIN(s->left, r-> left), 
+		    MAX(s->bottom, r-> bottom), 
+		    MAX(s->right, r-> right)
+		    );
+
+		t->next = w->paper.rects;
+		w->paper.rects = t;
+		s = ungroup(w, s);
+		r = ungroup(w, r);
+
+		for(x = s; x ; x = x->next)
+			call(w,XmNgroupCallback,x,t,0);
+
+		for(x = r; x ; x = x->next)
+			call(w,XmNgroupCallback,x,t,0);
+
+		t->kids = chain(r, s);
+		s = t->kids;
+		while (s) {
+
+			s->top = (s->top - t->top) / (t-> bottom - t->top);
+			s->bottom = 1 - (t->bottom - s-> bottom) / (t-> bottom - t->top);
+			s->left = (s->left - t->left) / ( t->right - t->left);
+			s->right = 1 - (t->right - s-> right) / (t-> right - t->left);
+
+
+			s->selected = False;
+			s = s->next;
+		}
+		return True;
+	}
+	return False;
+}
+
+void PaperGroupSelection(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	Boolean         more = True;
+
+	/* r_dump(w->paper.rects,0); */
+
+	while (more) {
+		PaperRectangle *r = w->paper.rects;
+
+		more = False;
+		while (r) {
+			if (r->selected)
+				if (group(w, r)) {
+					more = True;
+					break;
+				}
+			r = r->next;
+		}
+	}
+
+	/* r_dump(w->paper.rects,0); */
+
+	update(w);
+}
+
+void PaperUngroupSelection(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	Boolean         more = True;
+	while (more) {
+		PaperRectangle *r = w->paper.rects;
+
+		more = False;
+		while (r) {
+			if (r->selected && r->kids) {
+
+				PaperRectangle *s = ungroup(w, r);
+
+				more = True;
+				while (s) {
+					r = s->next;
+					s->next = w->paper.rects;
+					w->paper.rects = s;
+					s->selected = True;
+					s = r;
+				}
+				break;
+			}
+			r = r->next;
+		}
+	}
+	update(w);
+
+}
+
+static void unselect(PaperRectangle* r)
+{
+	while(r)
+	{
+		unselect(r->kids);
+		r->selected = False;
+		r = r->next;
+	}
+}
+
+PaperRectangle* PaperGetPages(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	return w->paper.rects;
+}
+
+void PaperSetPages(Widget _w,PaperRectangle* r)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	while(w->paper.rects)
+		remove_rectangle(w,w->paper.rects);
+
+	w->paper.rects = r ? r : new_rectangle(0, 0, 1, 1);
+	unselect(w->paper.rects);
+
+	while(r)
+	{
+		validate(r);
+		r = r->next;
+	}
+
+	update(w);
+}
+
+PaperRectangle* PaperFind(Widget _w,XEvent *ev)
+{
+	int what;
+	PaperWidget	w = (PaperWidget) _w;
+	return click(w,ev,&what);
+}
+
+void PaperLocation(Widget _w,int x,int y,double* px,double* py)
+{
+	int what;
+	PaperWidget	w = (PaperWidget) _w;
+
+	*px = x;
+	*py = y;
+
+	*px -=  w->paper.page.x;
+	*py -=  w->paper.page.y;
+
+	*px /= w->paper.page.width;
+	*py /= w->paper.page.height;
+}
+
+PaperRectangle* PaperNewPage(Widget _w,double top,double left,
+	double bottom,double right)
+{
+	return new_rectangle(top,left,bottom,right);
+}
+
+static void Join(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	PaperJoinSelection((Widget)w);
+}
+
+static void Inset(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	PaperInsetSelection((Widget)w,0.01,0.01,0.01,0.01);
+}
+
+static void Insert(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	PaperAddPage((Widget)w,0,0,0.25,0.25);
+}
+
+static void Delete(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	PaperDeleteSelection((Widget)w);
+}
+
+static void Split(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+
+	Boolean         shift = (event->xkey.state & ShiftMask);
+	double mh = shift?0.01:0.0;
+	double mv = shift?0.01:0.0;
+	PaperSplitSelection((Widget)w,atol(args[0]),atol(args[1]),mh,mv);
+}
+
+static void Group(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	PaperGroupSelection((Widget)w);
+}
+
+static void Ungroup(PaperWidget w,XEvent *event,char **args,int nargs)
+{
+	PaperUngroupSelection((Widget)w);
+}
+
+void PaperUpdate(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	update(w);
+}
+
+void PaperInsetSelection(Widget _w,double top,
+	double left,double bottom,double right)
+{
+	PaperWidget	w = (PaperWidget) _w;
+
+	PaperRectangle *r = w->paper.rects;
+
+	while (r)
+	{
+		if (r->selected)
+		{
+			r->top    += top;
+			r->left   += left;
+			r->bottom -= bottom;
+			r->right  -= right;
+		}
+		r = r->next;
+	}
+
+	update(w);
+}
+
+void PaperSetSize(Widget _w, double h, double v)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	w->paper.hpage = h;
+	w->paper.vpage = v;
+	paper_size(w);
+	update(w);
+}
+
+void PaperSetGrid(Widget _w, double x, double y)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	w->paper.page_grid_x = x;
+	w->paper.page_grid_y = y;
+	paper_size(w);
+	update(w);
+}
+
+void PaperShowGrid(Widget _w, Boolean on)
+{
+	PaperWidget w = (PaperWidget) _w;
+	w->paper.grid = on;
+	update(w);
+}
+
+void PaperSnapGrid(Widget _w, Boolean on)
+{
+	PaperWidget w = (PaperWidget) _w;
+	w->paper.snap = on;
+}
+
+static void align(Helper* x,PaperWidget w)
+{
+	PaperRectangle *r = w->paper.rects;
+	double a = -1;
+
+	while (r)
+	{
+		if (r->selected)
+			if(a == -1) a = x->this(r);
+			else  {
+				double w =  x->opposite(r) - x->this(r);
+				x->set_this(r,a);
+				x->set_opposite(r,a+w);
+			}
+		r = r->next;
+	}
+
+	update(w);
+}
+
+void PaperGetSize(Widget _w,double* h,double* v)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	*h = w->paper.hpage;
+	*v = w->paper.vpage;
+}
+
+void PaperGetGrid(Widget _w,double* x,double* y)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	*x = w->paper.page_grid_x;
+	*y = w->paper.page_grid_y;
+}
+
+void PaperAlignTop(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	align(&topHelper,w);
+}
+
+void PaperAlignLeft(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	align(&leftHelper,w);
+}
+
+void PaperAlignRight(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	align(&rightHelper,w);
+}
+
+void PaperAlignBottom(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	align(&bottomHelper,w);
+}
+	
+	
+static void distribute(Helper* x,PaperWidget w)
+{
+	PaperRectangle *r = w->paper.rects;
+	double min = 1;
+	double max = 0;
+	int n = 0;
+	int m = 0;
+	double size = 0;
+	double pos = -1;
+
+	while (r)
+	{
+		if (r->selected)
+		{
+			if(x->this(r)     < min) min = x->this(r);
+			if(x->opposite(r) > max) max = x->opposite(r); 
+			size += x->opposite(r) - x->this(r);
+			n++;
+		}
+		r = r->next;
+	}
+
+	if(n < 2)
+		return;
+
+	size  = max - min - size;
+	size /= (n-1);
+	pos   = min;
+
+	r = w->paper.rects;
+	while (r)
+	{
+		if (r->selected)
+		{
+			double w =  x->opposite(r) - x->this(r);
+			x->set_this(r,pos);			
+			x->set_opposite(r,pos+w);
+			pos += size + w;
+		}
+		r = r->next;
+	}
+
+	update(w);
+}
+
+void PaperDistributeHorizontally(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;	
+	distribute(&leftHelper,w);
+}
+
+void PaperDistributeVertically(Widget _w)
+{
+	PaperWidget	w = (PaperWidget) _w;
+	distribute(&topHelper,w);
+}
+
+void PaperSelectFirst(Widget _w)
+{
+	PaperWidget w = (PaperWidget) _w;
+	unselect(w->paper.rects);
+	if(w->paper.rects) {
+		w->paper.rects->selected = True;
+		update(w);
+	}
+}
+
+void PaperUnselect(Widget _w)
+{
+	PaperWidget w = (PaperWidget) _w;
+	unselect(w->paper.rects);
+}
+
+void PaperSelectAll(Widget _w, Boolean flag)
+{
+	PaperWidget w = (PaperWidget) _w;
+	select_all(w,flag);
+}
+
+void PaperSetFreeMoves(Widget _w, Boolean flag)
+{
+	PaperWidget w = (PaperWidget) _w;
+	w->paper.free_moves = flag;
+}
+
+Boolean PaperGetFreeMoves(Widget _w)
+{
+	PaperWidget w = (PaperWidget) _w;
+	return w->paper.free_moves;
+}
+
+PaperRectangle*  PaperAddPage(Widget _w,double top,double left,double bottom,double right)
+{
+	PaperWidget w = (PaperWidget) _w;
+	PaperRectangle *r = new_rectangle(top,left,bottom,right);
+	validate(r);
+	r->next = w->paper.rects;
+	w->paper.rects = r;
+	unselect(w->paper.rects);
+	r->selected = True;
+	update(w);
+	return r;
+}
+
diff --git a/src/libMvMotif/Paper.h b/src/libMvMotif/Paper.h
new file mode 100755
index 0000000..9d8d5b1
--- /dev/null
+++ b/src/libMvMotif/Paper.h
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef PAPER_H
+#define PAPER_H
+
+#include <Xm/Xm.h>
+#include <X11/Intrinsic.h>
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+typedef struct PaperRectangle {
+    struct    PaperRectangle *next;
+    struct    PaperRectangle *kids;
+    double    top;
+    double    left;
+    double    bottom;
+    double    right;
+    XtPointer data;
+    Boolean   selected;
+    Boolean   resizing;
+	int       number;
+} PaperRectangle;
+
+typedef struct {  	
+
+	XmFontList   font;
+	Drawable     drawable;
+	XRectangle*  rect;
+	GC           gc;
+	PaperRectangle *r;
+
+} PaperGraphics;
+
+typedef struct {
+
+	int         reason;         /* what call back */
+	XEvent      *event;         /* event that initiated the drag/drop */
+
+	PaperRectangle* r1;
+	PaperRectangle* r2;
+	PaperRectangle* r3;
+
+	PaperGraphics*	 graphics;
+
+} PaperCallbackStruct;
+
+#define XmNjoinCallback     "joinCallback"
+#define XmNsplitCallback    "splitCallback"
+#define XmNgroupCallback    "groupCallback"
+#define XmNungroupCallback  "ungroupCallback"
+#define XmNdeleteCallback   "deleteCallback"
+#define XmNdrawCallback     "drawCallback"
+#define XmNchangeCallback   "changeCallback"
+#ifndef  XmNdblClickCallback
+#define XmNdblClickCallback     "dblClickCallback"
+#endif
+
+
+
+extern WidgetClass  paperWidgetClass;
+
+typedef struct _PaperClassRec *PaperWidgetClass;
+typedef struct _PaperRec      *PaperWidget;
+
+extern Widget  CreatePaperWidget(Widget,const char*,Arg*,int);
+extern void PaperSetPages(Widget,PaperRectangle*);
+extern PaperRectangle*  PaperNewPage(Widget,double,double,double,double);
+
+extern void PaperDeleteSelection(Widget);
+extern PaperRectangle* PaperAddPage(Widget,double,double,double,double);
+
+extern void PaperSplitSelection(Widget,int,int,double,double);
+extern void PaperJoinSelection(Widget);
+extern void PaperGroupSelection(Widget);
+extern void PaperUngroupSelection(Widget);
+
+extern Boolean PaperCanSplitSelection(Widget);
+extern Boolean PaperCanJoinSelection(Widget);
+extern Boolean PaperCanGroupSelection(Widget);
+extern Boolean PaperCanUngroupSelection(Widget);
+
+extern Boolean PaperFreeMoves(Widget);
+extern void    PaperSetFreeMoves(Widget,Boolean);
+
+extern void    PaperSetGrid(Widget,double,double);
+extern void    PaperGetGrid(Widget,double*,double*);
+extern void    PaperShowGrid(Widget,Boolean);
+extern void    PaperSnapGrid(Widget,Boolean);
+extern Boolean  PaperShowGridState(Widget);
+extern Boolean  PaperSnapGridState(Widget);
+
+extern void PaperInsetSelection(Widget,double,double,double,double);
+
+extern void PaperSetSize(Widget,double,double);
+extern void PaperGetSize(Widget,double*,double*);
+
+extern PaperRectangle*  PaperFind(Widget,XEvent*);
+extern void PaperUpdate(Widget);
+
+extern PaperRectangle* PaperGetPages(Widget);
+
+extern void PaperAlignTop(Widget);
+extern void PaperAlignHorizontally(Widget);
+extern void PaperAlignLeft(Widget);
+extern void PaperAlignRight(Widget);
+extern void PaperAlignVertically(Widget);
+extern void PaperAlignBottom(Widget);
+
+extern void PaperDistributeHorizontally(Widget);
+extern void PaperDistributeVertically(Widget);
+
+extern void PaperSelectFirst(Widget);
+/*extern void PaperSelectPage (Widget,int);*/
+extern void PaperUnselect(Widget);
+extern void PaperSelectAll(Widget,Boolean);
+
+
+extern void PaperLocation(Widget,int,int,double*,double*);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+#endif 
diff --git a/src/libMvMotif/PaperP.h b/src/libMvMotif/PaperP.h
new file mode 100755
index 0000000..dab0f4e
--- /dev/null
+++ b/src/libMvMotif/PaperP.h
@@ -0,0 +1,98 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+# ifndef LAYOUTP_H
+#   define LAYOUTP_H
+#include "Paper.h"
+
+typedef struct _PaperClassPart {
+	int		ignore;
+} PaperClassPart;
+
+typedef struct _PaperClassRec {
+	CoreClassPart	core_class;
+	CompositeClassPart composite_class;
+	ConstraintClassPart constraint_class;
+	XmManagerClassPart manager_class;
+	XmDrawingAreaClassPart drawing_area_class;
+	PaperClassPart paper_class;
+} PaperClassRec;
+
+extern		PaperClassRec paperClassRec;
+
+
+typedef struct {
+
+	XtCallbackList join_cb;
+	XtCallbackList split_cb;
+	XtCallbackList group_cb;
+	XtCallbackList ungroup_cb;
+	XtCallbackList delete_cb;
+	XtCallbackList draw_cb;
+	XtCallbackList change_cb;
+	XtCallbackList dblclick_cb;
+
+	PaperRectangle *rects;
+
+	int		hmargin;
+	int		vmargin;
+	Pixel		dash;
+	Pixel		selected;
+	Pixel		foreground;
+	Pixel           white;
+	Pixel           grid_color;
+	GC		gc;
+	GC		selected_gc;
+	GC		white_gc;
+	GC		dash_gc;
+	GC		xor_gc;
+	GC		grid_gc;
+	int		what;
+	int		startx;
+	int		starty;
+	int		lastx;
+	int		lasty;
+	Pixmap          pixmap;
+	Boolean         offscreen;
+	Boolean         dirty;
+	Boolean         editable;
+	XRectangle	sel;
+	XRectangle      page;
+	double          hpage;
+	double          vpage;
+
+	PaperGraphics   graphics;
+	Time            last_click;
+	Boolean         constraint;
+	int             which_constraint;
+	Boolean         free_moves;
+	PaperRectangle  *drag;
+
+	Boolean  handles;
+
+	Boolean         grid;
+	Boolean         snap;
+	double          page_grid_x;
+	double          page_grid_y;
+	int             grid_x;
+	int             grid_y;
+
+} PaperPart;
+
+typedef struct _PaperRec {
+	CorePart	core;
+	CompositePart	composite;
+	ConstraintPart	constraint;
+	XmManagerPart	manager;
+	XmDrawingAreaPart   drawing_area;
+	PaperPart	paper;
+	} PaperRec;
+# endif 
+
+
diff --git a/src/libMvMotif/Symbols.c b/src/libMvMotif/Symbols.c
new file mode 100644
index 0000000..704ba23
--- /dev/null
+++ b/src/libMvMotif/Symbols.c
@@ -0,0 +1,343 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <X11/IntrinsicP.h>
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <X11/CoreP.h>
+#include <X11/cursorfont.h>
+#include "Symbols.h"
+#include "SymbolsP.h"
+
+
+
+#ifndef ABS
+#define ABS(a)           ((a)>=0?(a):-(a))
+#endif
+#ifndef MIN
+#define MIN(a,b)         ((a)>(b)?(b):(a))
+#endif
+
+static void    create_gcs();
+static void    calc_new_size();
+
+/*
+  Widget class methods
+*/
+
+static void    Initialize();
+static void    Redisplay();
+static void    Resize();
+static void    Destroy();
+static void    Activate();
+static Boolean SetValues();
+
+static char defaultTranslations[] = "\
+<BtnDown>:activate()\n\
+~s ~m ~a <Key>Return:PrimitiveParentActivate()\n\
+<Key>osfActivate:PrimitiveParentActivate()\n\
+<Key>osfCancel:PrimitiveParentCancel()\n\
+<Key>osfSelect:activate()\n\
+<Key>osfHelp:Help()\n\
+~s ~m ~a <Key>space:activate()\n\
+<Key>osfHelp:Help()";
+
+
+static XtActionsRec actionsList[] = {
+	{ "activate", (XtActionProc)Activate, },
+};
+
+
+static XtResource resources[] = {
+	{XmNactivateCallback,XtCCallback,XtRCallback,sizeof(caddr_t),
+	XtOffset (SymbolsWidget, symbols.activate),XtRCallback,(XtPointer)NULL},
+	{ XmNfontList, XmCFontList, XmRFontList, sizeof (XmFontList),
+	XtOffset (SymbolsWidget, symbols.fontlist), XmRString, "fixed"},
+	{ XmNlabelString, XmCString, XmRString, sizeof (String),
+	XtOffset (SymbolsWidget, symbols.no_colours), XmRString, "None"},
+};
+
+/*---------------------------------------------------------------*/
+/* Static initialisation of the class record                     */
+/*---------------------------------------------------------------*/
+
+SymbolsClassRec  symbolsClassRec = {
+	{
+	(WidgetClass) &xmPrimitiveClassRec,  /* superclass            */
+	"Symbols",                            /* class_name            */
+	sizeof(SymbolsRec),                   /* widget_size           */
+	NULL,                                /* class_initialize      */
+	NULL,                                /* class_part_initialize */
+	FALSE,                               /* class_inited          */
+	Initialize,                          /* initialize            */
+	NULL,                                /* initialize_hook       */
+	XtInheritRealize,                    /* realize               */
+	actionsList,                         /* actions               */
+	XtNumber(actionsList),               /* num_actions           */
+	resources,                           /* resources             */
+	XtNumber(resources),                 /* num_resources         */
+	NULLQUARK,                           /* xrm_class             */
+	TRUE,                                /* compress_motion       */
+	TRUE,                                /* compress_exposure     */
+	TRUE,                                /* compress_enterleave   */
+	TRUE,                                /* visible_interest      */
+	Destroy,                             /* destroy               */
+	Resize,                              /* resize                */
+	Redisplay,                           /* expose                */
+	SetValues,                           /* set_values            */
+	NULL,                                /* set_values_hook       */
+	XtInheritSetValuesAlmost,            /* set_values_almost     */
+	NULL,                                /* get_values_hook       */
+	NULL,                                /* accept_focus          */
+	XtVersion,                           /* version               */
+	NULL,                                /* callback private      */
+	defaultTranslations,                 /* tm_table              */
+	NULL,                                /* query_geometry        */
+	NULL,                                /* display_accelerator   */
+	NULL,                                /* extension             */
+	},
+	{
+	(XtWidgetProc)_XtInherit,             /* border_highlight      */
+	(XtWidgetProc)_XtInherit,             /* border_unhighligh     */
+	XtInheritTranslations,                /* translations          */
+	(XtActionProc)_XtInherit,             /* arm_and_activate      */
+	NULL,                                 /* syn_resources         */
+	0,                                    /* num_syn_resources     */
+	NULL,                                 /* extension             */
+	},
+	{
+	0,                                    /* ignore                */
+	},
+};
+
+WidgetClass symbolsWidgetClass = (WidgetClass) &symbolsClassRec;
+
+/*---------------------------------------------------------------*/
+/* Create the two GCs needed                                     */
+/*---------------------------------------------------------------*/
+
+
+/*--------------------------------------------------------------*/
+/* Initialize: Create the GCs                                   */
+/*--------------------------------------------------------------*/
+
+static void Initialize (SymbolsWidget request, SymbolsWidget new)
+{
+	XGCValues values;
+	XtGCMask  valueMask;
+
+	Display *dpy   = XtDisplay(new);
+	int     screen = DefaultScreen(dpy);
+	Window  root   = RootWindow(dpy,screen);
+
+	/* Check the size of the widget */
+
+	if (request->core.width == 0)
+		new->core.width = 5;
+
+	if (request->core.height == 0)
+		new->core.height = 5;
+	/* Create the GCs */
+
+	new->symbols.max     = 10;
+	new->symbols.count   = 0;
+	new->symbols.pixmaps = NULL;
+	new->symbols.widths  = NULL;
+	new->symbols.heights = NULL;
+	new->symbols.width   = NULL;
+	new->symbols.height  = NULL;
+	new->symbols.pixmaps = NULL;
+
+	valueMask = GCBackground;
+	values.background   = new->core.background_pixel;
+	new->symbols.fontGC = XtGetGC((Widget)new,valueMask,&values);
+
+}
+
+
+/*--------------------------------------------------------------*/
+/* Destroy the widget: release all memory alocated              */
+/*--------------------------------------------------------------*/
+
+static void Destroy (SymbolsWidget w)
+{
+	XtReleaseGC((Widget)w,w->symbols.fontGC);
+	XtFree((XtPointer)w->symbols.pixmaps);
+	XtFree((XtPointer)w->symbols.widths);
+	XtFree((XtPointer)w->symbols.heights);
+}
+
+
+static void Resize (SymbolsWidget w)
+{
+}
+
+static void draw(SymbolsWidget w)
+{
+	int i;
+	int frame  = w->primitive.highlight_thickness 
+	+ w->primitive.shadow_thickness;
+	int height = w->core.height - 2*frame;
+	int width  = w->core.width  - 2*frame ;
+	int x      = frame;
+	int y      = frame;
+
+
+	if(w->symbols.count)
+	{
+		width /= w->symbols.count;
+		x++;
+
+		if(w->symbols.width < width)
+			width = w->symbols.width;
+
+		if(w->symbols.height < height)
+			y += (height - w->symbols.height) / 2;
+
+		width++;
+
+		for(i=0;i<w->symbols.count;i++)
+		{
+			if(w->symbols.pixmaps[i])
+			{
+			
+				XCopyArea(XtDisplay (w), 
+					w->symbols.pixmaps[i],
+					XtWindow(w),
+					w->symbols.fontGC,
+					0,0,width,height,x,y);
+				x += width;
+			}
+
+		}
+	}
+	else {
+		XmString s = XmStringCreateSimple(w->symbols.no_colours);
+		XRectangle r;
+
+		r.x      = x;
+		r.y      = y;
+		r.width  = width;
+		r.height = height;
+
+		XClearArea(XtDisplay(w),XtWindow(w), x,y,width,height,False);
+		y += (height - XmStringHeight(w->symbols.fontlist,s))/2;
+
+		XmStringDraw (XtDisplay(w), XtWindow(w),
+		    w->symbols.fontlist, s,
+		    w->symbols.fontGC,
+		    x,y,width,
+		    XmALIGNMENT_CENTER,XmSTRING_DIRECTION_L_TO_R,&r);
+		XmStringFree(s);
+	}
+}
+
+static void Redisplay(SymbolsWidget w, XEvent *event, Region region)
+{
+	draw(w);
+
+	_XmDrawShadows(XtDisplay(w), XtWindow(w),
+	    w->primitive.bottom_shadow_GC,
+	    w->primitive.top_shadow_GC,
+	    (int) w->primitive.highlight_thickness,
+	    (int) w->primitive.highlight_thickness,
+	    (int) (w->core.width - 
+	    (2*w->primitive.highlight_thickness)),
+	    (int) (w->core.height - 
+	    (2*w->primitive.highlight_thickness)),
+	    (int) w->primitive.shadow_thickness,
+	    XmSHADOW_OUT);
+}
+
+/*------------------------------------------------------------------*/
+/* SetValues : redraw only for font or color changes                */
+/*------------------------------------------------------------------*/
+
+static Boolean SetValues (SymbolsWidget current, SymbolsWidget request, 
+SymbolsWidget new)
+{
+	Boolean    redraw = FALSE;
+	redraw = True;
+	return (redraw);
+}
+
+
+static void Activate(Widget widget,XEvent *event,char **args,int nargs)
+{
+	XmAnyCallbackStruct cb;
+	cb.reason = XmCR_ACTIVATE;
+	cb.event  = event;
+	XtCallCallbacks (widget,XmNactivateCallback,(XtPointer)&cb);
+}
+
+/*-----------------------------------------------------------------------*/
+/* Create a new SymbolsWidget                                              */
+/*-----------------------------------------------------------------------*/
+
+Widget CreateSymbolsWidget(Widget parent,char *name,Arg *al,int ac)
+{
+	return XtCreateWidget(name,symbolsWidgetClass,parent,al,ac);
+}
+
+void SymbolsSetPixmaps(Widget w,int c,Pixmap *pix)
+{
+	SymbolsWidget cw = (SymbolsWidget)w;
+	int i;
+
+	if(c == cw->symbols.count)
+	{
+		for(i=0;i<c;i++)
+			if(cw->symbols.pixmaps[i] != pix[i])
+				break;
+
+		if(i == c) return;
+	}
+
+	XtFree((XtPointer)cw->symbols.pixmaps);
+	XtFree((XtPointer)cw->symbols.widths);
+	XtFree((XtPointer)cw->symbols.heights);
+	cw->symbols.width = cw->symbols.height = 0;
+
+	cw->symbols.pixmaps = (Pixmap*)XtCalloc(c,sizeof(Pixmap));
+	cw->symbols.widths  = (unsigned int*)XtCalloc(c,sizeof(unsigned int));
+	cw->symbols.heights = (unsigned int*)XtCalloc(c,sizeof(unsigned int));
+
+	cw->symbols.count = c;
+	for(i=0;i<c;i++)
+		if(pix[i] != None && pix[i] != XmUNSPECIFIED_PIXMAP)
+		{
+
+			Display *dpy   = XtDisplay(w);
+			int     screen = DefaultScreen(dpy);
+			Window  root   = RootWindow(dpy,screen);
+			int         x,y;
+			unsigned int width;
+			unsigned int height;
+			unsigned int dummy;
+			unsigned int depth;
+
+			XGetGeometry(dpy,pix[i],&root,&x,&y,&width,&height,&dummy,&depth);
+			cw->symbols.widths[i] = width;
+			cw->symbols.heights[i] = height;
+
+			if(height > cw->symbols.height)
+				cw->symbols.height = height;
+
+			if(width > cw->symbols.width)
+				cw->symbols.width = width;
+			cw->symbols.pixmaps[i] = pix[i];
+
+		}
+
+	if(XtIsRealized(w) && XtIsManaged(w))
+		XClearArea(XtDisplay(w),XtWindow(w),0,0,0,0,True);
+}
diff --git a/src/libMvMotif/Symbols.h b/src/libMvMotif/Symbols.h
new file mode 100644
index 0000000..f851bdd
--- /dev/null
+++ b/src/libMvMotif/Symbols.h
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#ifndef  SYMBOLS_H
+#define  SYMBOLS_H
+
+extern WidgetClass symbolsWidgetClass;
+typedef struct _SymbolsClassRec * SymbolsWidgetClass;
+typedef struct _SymbolsRec      * SymbolsWidget;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+extern Widget CreateSymbolsWidget(Widget,char*,Arg*,int);
+extern void SymbolsSetPixmaps(Widget,int,Pixmap*);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+
+#endif
diff --git a/src/libMvMotif/SymbolsP.h b/src/libMvMotif/SymbolsP.h
new file mode 100644
index 0000000..5ddcd79
--- /dev/null
+++ b/src/libMvMotif/SymbolsP.h
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef SYMBOLSP_H
+#define SYMBOLSP_H
+
+#include <Xm/XmP.h>
+#include <Xm/PrimitiveP.h>
+
+/* Symbols class : no new fileds */
+
+typedef struct _SymbolsClassPart{
+    int ignore;
+} SymbolsClassPart;
+
+typedef struct _SymbolsClassRec{
+    CoreClassPart    core_class;
+    XmPrimitiveClassPart  primitive_class;
+    SymbolsClassPart  symbols_class;
+} SymbolsClassRec;
+
+extern SymbolsClassRec symbolsClassRec;
+
+typedef struct _SymbolsPart {
+	int             count;
+	int             max;
+	unsigned int     width;
+	unsigned int     height;
+	unsigned int    *widths;
+	unsigned int    *heights;
+	Pixmap          *pixmaps;
+	XtCallbackList  activate;
+	XmFontList      fontlist;
+	char           *no_colours;
+	GC              fontGC;
+} SymbolsPart;
+
+typedef struct _SymbolsRec {
+    CorePart          core;
+    XmPrimitivePart  primitive;
+    SymbolsPart        symbols;
+} SymbolsRec;
+
+#endif
diff --git a/src/libMvMotif/Tab.c b/src/libMvMotif/Tab.c
new file mode 100644
index 0000000..0d82dc0
--- /dev/null
+++ b/src/libMvMotif/Tab.c
@@ -0,0 +1,917 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <math.h>
+
+#ifndef M_PI
+#define M_PI    3.14159265358979323846
+#endif
+
+#define  RADIANS(x)  (M_PI * (x) / 180.0)
+#define  ROUND(X)  (((X) >= 0) ? (int)((X)+0.5) : (int)((X)-0.5))
+
+
+#include      <X11/Intrinsic.h>
+#include      <X11/IntrinsicP.h>
+#include      <X11/StringDefs.h>
+#include      <X11/CoreP.h>
+#include    <X11/CompositeP.h>
+#include      <X11/ConstrainP.h>
+#include        <Xm/XmP.h>
+#include        <Xm/DrawingAP.h>
+#include      "Tab.h"
+#include      "TabP.h"
+
+#ifndef MAX
+#define   MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define   MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+static void             Initialize();
+static void             Resize();
+static void             Destroy();
+static void             ReDisplay();
+static void             Click();
+static void             Drag();
+static void             Release();
+static Boolean          SetValues();
+static XtGeometryResult GeometryManager();
+static void             ChangeManaged();
+static void             new_layout(TabWidget,Boolean);
+static void             ConstraintInitialize();
+static void             ConstraintDestroy();
+static Boolean          ConstraintSetValues();
+
+
+#define DEBUG(a) printf("%s\n",a);
+
+static XtResource resources[] = {
+	{XmNvalueChangedCallback,XmCValueChangedCallback,XtRCallback,sizeof(XtPointer),
+	XtOffset(TabWidget,tab.cb), XtRCallback, NULL },
+	{XmNopenCallback,XmCValueChangedCallback,XtRCallback,sizeof(XtPointer),
+	XtOffset(TabWidget,tab.open_cb), XtRCallback, NULL },
+
+	{XmNcloseCallback,XmCValueChangedCallback,XtRCallback,sizeof(XtPointer),
+	XtOffset(TabWidget,tab.close_cb), XtRCallback, NULL },
+
+	{XmNfontList,XmCFontList,XmRFontList,sizeof(XmRFontList),
+	XtOffset(TabWidget,tab.font),XmRString,(XtPointer)"fixed" },
+
+	{ "Back", "back", XmRPixel,sizeof(Pixel),
+	XtOffset(TabWidget,tab.back),XmRString,"#bcbcbcbcbcbc"},
+
+	{ "Blue", "blue", XmRPixel,sizeof(Pixel),
+	XtOffset(TabWidget,tab.blue),XmRString,"blue"},
+
+	{ "drawer", "Drawer", XmRBoolean,sizeof(Boolean),
+	XtOffset(TabWidget,tab.drawer),XmRString,"false"},
+};
+
+
+static XtActionsRec actions[] = {
+	{"Click",Click},
+	{"Drag",Drag},
+	{"Release",Release}
+};
+
+
+static char translations[] =
+"<Btn1Down>:  Click()\n\
+<Btn1Motion>: Drag()\n\
+<Btn1Up>:     Release()";
+
+#define USE_MANAGER
+
+TabClassRec tabClassRec = {
+	{
+	/* core_class fields  */
+	(WidgetClass) &xmDrawingAreaClassRec,/* superclass         */
+	"Tab",                           /* class_name         */
+	sizeof(TabRec),                /* widget_size        */
+	NULL,                             /* class_init         */
+	NULL,                             /* class_part_init    */
+	FALSE,                            /* class_inited       */
+	Initialize,                       /* initialize         */
+	NULL,                             /* initialize_hook    */
+	XtInheritRealize,                 /* realize            */
+	actions,                             /* actions            */
+	XtNumber(actions),                                /* num_actions        */
+	resources,                        /* resources          */
+	XtNumber(resources),              /* num_resources      */
+	NULLQUARK,                        /* xrm_class          */
+	TRUE,                             /* compress_motion    */
+	XtExposeCompressMaximal,          /* compress_exposure  */
+	TRUE,                             /* compress_enterleave*/
+	TRUE,                             /* visible_interest   */
+	Destroy,                          /* destroy            */
+	Resize,                           /* resize             */
+	ReDisplay,                        /* expose             */
+	SetValues,                        /* set_values         */
+	NULL,                             /* set_values_hook    */
+	XtInheritSetValuesAlmost,         /* set_values_almost  */
+	NULL,                             /* get_values_hook    */
+	NULL,                             /* accept_focus       */
+	XtVersion,                        /* version            */
+	NULL,                             /* callback_private   */
+	translations,            /* tm_table           */
+	NULL,                             /* query_geometry     */
+	XtInheritDisplayAccelerator,      /* display_accelerator*/
+	NULL,                             /* extension          */
+	},
+	{
+	/* composite_class fields */
+	GeometryManager,                 /* geometry_manager    */
+	ChangeManaged,                   /* change_managed      */
+	XtInheritInsertChild,            /* insert_child        */
+	XtInheritDeleteChild,            /* delete_child        */
+	NULL ,                           /* extension           */
+	},
+	{ 
+	/* constraint_class fields */
+	NULL,                             /* subresources        */
+	0,                                /* subresource_count   */
+	sizeof(TabConstraintsRec),        /* constraint_size     */
+	ConstraintInitialize,             /* initialize          */
+	ConstraintDestroy,                /* destroy             */
+	ConstraintSetValues,              /* set_values          */
+	NULL,                             /* extension           */
+	},
+	{
+	XtInheritTranslations,   /* default translations */
+	NULL,                    /* syn_resources          */
+	0,               /* num_syn_resources      */
+	NULL,                        /* syn_cont_resources     */
+	0,                           /* num_syn_cont_resources */
+	XmInheritParentProcess,  /* parent_process */
+	NULL,                        /* extension              */
+
+	},
+	{
+	NULL,
+	},
+	{
+	/* Tab class fields */
+	0,                               /* ignore              */
+	},
+};
+
+static void make_visible(TabWidget tw,Widget w);
+
+WidgetClass tabWidgetClass = (WidgetClass) &tabClassRec;
+
+static void Initialize(TabWidget request, TabWidget new)
+{
+
+	XGCValues       values;
+    XtGCMask        valueMask = 0;
+
+	XFontStruct     *fs = (XFontStruct *) NULL;
+
+
+	/*
+   * Make sure the widget's width and height are 
+   * greater than zero.
+   */
+	if (request->core.width <= 0)
+		new->core.width = 5;
+	if (request->core.height <= 0)
+		new->core.height = 5;
+
+	_XmFontListGetDefaultFont(new->tab.font,&fs);
+	if(fs != NULL)
+	{
+		valueMask    |= GCFont;
+		values.font  = fs->fid;
+	}
+
+	
+
+
+	new->tab.gc     = XtGetGC((Widget)new,valueMask,&values);
+	new->tab.current = 0;
+
+	new->tab.hmargin = 8;
+	new->tab.vmargin = 3;
+
+	new->tab.top    = 2;
+	new->tab.bottom = 2;
+	new->tab.delta  = new->tab.hmargin;
+	new->tab.drag   = False;
+
+}
+
+static char* name_of(Widget w)
+{
+	if(XmIsScrolledWindow(w))
+	{
+		static char name[90];
+		strcpy(name,XtName(w));
+		name[strlen(name)-2] = 0;
+		return name;
+	}
+	else
+		return XtName(w);	
+		
+}
+
+static void ConstraintInitialize(Widget request, Widget new)
+{
+	TAB_CONSTRAINT(new)->tab.name = XmStringCreateSimple(name_of(new));
+}
+
+static void ConstraintDestroy(Widget w)
+{
+	XmStringFree(TAB_CONSTRAINT(w)->tab.name);
+}
+
+static Boolean ConstraintSetValues(Widget current, Widget request, Widget new)
+{
+	return False;
+}
+
+static void Destroy(TabWidget tw)
+{
+
+
+	XtReleaseGC((Widget)tw,tw->tab.gc);
+}
+
+static void Resize(TabWidget w)
+{
+	XmDrawingAreaCallbackStruct cb;
+	new_layout(w,False);
+	cb.reason = XmCR_RESIZE;
+	cb.event = NULL;
+	cb.window = XtWindow (w);
+	XtCallCallbackList((Widget)w,w->drawing_area.resize_callback, &cb);
+	make_visible(w,w->tab.current);
+	if(XtIsRealized((Widget)w))
+		XClearArea(XtDisplay(w),XtWindow(w),0,0,0,0,True);
+
+	/* w->tab.wait = False; */
+}
+
+static Boolean SetValues(TabWidget current, TabWidget request, TabWidget new)
+{
+	new_layout(new,False);
+	return (False);
+}
+
+static XtGeometryResult GeometryManager(Widget w, 
+	XtWidgetGeometry *request, 
+	XtWidgetGeometry *reply)
+{
+	new_layout((TabWidget)XtParent(w),True);
+	return XtGeometryYes;
+}
+
+static void ChangeManaged(TabWidget tw)
+{
+	if(XtIsRealized((Widget)tw))
+	  XClearArea(XtDisplay(tw),XtWindow(tw),0,0,0,0,True);
+	new_layout(tw,True);
+}
+
+
+static void new_layout(TabWidget tw,Boolean geometry)
+{
+	int t;
+	int i;
+	Widget current = tw->tab.current;
+
+	Dimension mw = 0;
+	Dimension mh = 0;
+	Dimension ww = 0;
+
+	Dimension width  = tw->core.width;
+	Dimension height = tw->core.height;
+
+	tw->tab.title = 0;
+	tw->tab.current = 0;
+
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget c = tw->composite.children[i];
+		if(XtIsManaged(c))
+		{
+			XmString s = TAB_CONSTRAINT(c)->tab.name;
+			int   h = XmStringHeight(tw->tab.font, s) + 2 * tw->tab.vmargin;
+			int   w = XmStringWidth(tw->tab.font, s)  + 2 * tw->tab.hmargin;
+
+			ww += w;
+
+			mh  = MAX(mh,c->core.height);
+			mw  = MAX(mh,c->core.width);
+
+			tw->tab.title = MAX(tw->tab.title,h);
+
+			if(c == current)
+				tw->tab.current = c;
+
+		}
+	}
+
+	if(tw->tab.drawer && !geometry )
+		height = tw->tab.title;
+	else
+		height = tw->tab.title + tw->tab.top + tw->tab.bottom + mh;
+
+	width  = 2 * tw->tab.hmargin + MAX(ww,mw);
+
+    if(geometry)
+    if(tw->core.width < width || tw->core.height < height)
+    {
+        Dimension           maxWidth = width, maxHeight = height;
+        XtGeometryResult    result;
+        Dimension           replyWidth = 0, replyHeight = 0;
+
+        result = XtMakeResizeRequest(
+            (Widget)tw,
+            maxWidth,
+            maxHeight,
+            &replyWidth, &replyHeight);
+
+        if (result == XtGeometryAlmost)
+            XtMakeResizeRequest (
+                (Widget)tw,
+                replyWidth,
+                replyHeight,NULL, NULL);
+    }
+
+
+	width  = tw->core.width;
+	t      = (tw->tab.title + tw->tab.top + tw->tab.bottom);
+	height = tw->core.height - t;
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget c = tw->composite.children[i];
+		_XmConfigureObject((Widget)c,0,t,width,height,0);
+	}
+
+}
+
+static void draw(TabWidget tw, Widget c,int* x,int* y,int k)
+{
+	XmString s = XmStringCopy(TAB_CONSTRAINT(c)->tab.name);
+	XPoint points[10];
+	int count = 4;
+	int minx = 0;
+	int maxx = 0;
+	int xx = 0;
+	int i;
+
+	int sw    = XmStringWidth(tw->tab.font, s);
+	int step  = sw + 2 * tw->tab.hmargin;
+	int delta = 0;
+
+	points[0].x = *x - tw->tab.hmargin / 2;
+	points[0].y = tw->tab.title + tw->tab.top ;
+
+	points[1].x = tw->tab.hmargin ;
+	points[1].y = -tw->tab.title;
+
+	points[2].x = sw + tw->tab.hmargin;
+	points[2].y = 0;
+
+	points[3].x = tw->tab.hmargin ;
+	points[3].y = tw->tab.title;
+
+	if(points[0].x + points[1].x + points[2].x + points[3].x > tw->core.width  )
+	{
+		int ww = 5;
+		int xx = points[0].x + points[1].x;
+
+		points[2].x = tw->core.width - xx - ww;
+		points[2].y = 0;
+
+		points[3].x = -ww;
+		points[3].y = tw->tab.title / 3;
+
+		points[4].x = ww;
+		points[4].y = tw->tab.title / 3;
+
+		points[5].x = -ww;
+		points[5].y = tw->tab.title - 2 * (tw->tab.title / 3);
+
+		count = 6;
+
+		if(k < tw->tab.last)
+			tw->tab.last = k;
+
+		if(points[2].x < points[1].x)
+		{
+			(*x) += step;
+			return;             /* outside window...? */
+		}
+
+	}
+
+
+	if(points[0].x < 0)
+	{
+		int ww = 5;
+
+		points[0].x = 0;
+		points[0].y = tw->tab.title + tw->tab.top ;
+
+		points[1].x = ww;
+		points[1].y = -tw->tab.title / 3;
+
+		points[2].x = -ww;
+		points[2].y = -tw->tab.title / 3;
+
+		points[3].x = ww;
+		points[3].y = -tw->tab.title + 2 * (tw->tab.title / 3);
+
+		points[4].x = *x - tw->tab.hmargin / 2 + 2*tw->tab.hmargin + sw - ww ;
+		points[4].y = 0;
+
+		points[5].x = tw->tab.hmargin ;
+		points[5].y = tw->tab.title;
+
+		count = 6;
+
+		if(k > tw->tab.first)
+			tw->tab.first = k;
+
+		if(points[4].x < 0 )
+		{
+			(*x) += step;
+			return;             /* outside window...? */
+		}
+	}
+
+	minx = points[0].x;
+	maxx = points[0].x;
+	xx   = points[0].x;
+
+	for(i = 1; i < count; i++)
+	{
+		xx += points[i].x;
+		if(xx < minx) minx = xx;
+		if(xx > maxx) maxx = xx;
+	}
+	
+	XSetForeground(XtDisplay(tw),
+		tw->tab.gc,
+		(c == tw->tab.current) ? 
+			tw->core.background_pixel:
+			tw->tab.back);
+		
+	XFillPolygon(
+		XtDisplay(tw),
+		XtWindow(tw),
+		tw->tab.gc,
+		points,
+		count,
+		Convex,
+		CoordModePrevious
+	);
+
+	XSetForeground(XtDisplay(tw),
+		tw->tab.gc,
+		tw->manager.foreground);
+
+	XDrawLines(
+		XtDisplay(tw),
+		XtWindow(tw),
+		/* tw->tab.gc, */
+		tw->manager.bottom_shadow_GC,
+		points,
+		count,
+		CoordModePrevious
+	);
+
+	XSetForeground(XtDisplay(tw),
+		tw->tab.gc,
+		(c == tw->tab.current) ? 
+			tw->tab.blue:
+			tw->manager.foreground);
+
+	{
+	    int   sl    = 0;
+	    char* c_str = 0;
+	    char  tmp_cstr[250];
+
+	    if( XmStringGetLtoR( s, XmFONTLIST_DEFAULT_TAG, &c_str ) )
+	      {
+		sl = strlen( c_str );        /* true string length */
+		strcpy( tmp_cstr, c_str );
+		XtFree( c_str );
+	      }
+
+	    while( --sl >= 0 && sw > (maxx - minx - 2 * tw->tab.hmargin) )
+	      {
+		XmString t;                  /* tab name too long, thus...   */
+		tmp_cstr[ sl ] = '\0';       /* ...truncate original name and */
+		strcat( tmp_cstr, "..." );   /* append '...' to truncated name */
+
+		t = XmStringCreate( tmp_cstr, XmFONTLIST_DEFAULT_TAG );
+
+		XmStringFree(s);             /* replace s with freshly... */
+		s = t;                       /* ...truncated compound string */
+		sw = XmStringWidth(tw->tab.font, s);
+#if 0
+		printf( " %s/%d >? %d\n", tmp_cstr, sw, (maxx - minx - 2 * tw->tab.hmargin) );
+#endif
+	      }
+
+	    XmStringDraw(XtDisplay(tw),
+		XtWindow(tw),
+		tw->tab.font,
+		s,
+		tw->tab.gc,
+		minx ,
+		tw->tab.vmargin + tw->tab.top + tw->tab.vmargin/3,
+		maxx - minx,
+		XmALIGNMENT_CENTER,
+		XmSTRING_DIRECTION_L_TO_R,
+		NULL);
+	}
+
+	XSetForeground(XtDisplay(tw),
+		tw->tab.gc,
+		tw->manager.foreground);
+
+	XmStringFree(s);
+
+	(*x) += step;
+}
+
+static void ReDisplay(Widget w, XEvent *event, Region region)
+{
+	TabWidget tw = (TabWidget)w;
+
+	int x = tw->tab.delta;
+	int y = 0;
+	int i;
+	int cx = 0,cy= 0, ci = 0;
+
+	tw->tab.first = -1;
+	tw->tab.last  = tw->composite.num_children + 1;
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget c = tw->composite.children[i];
+		if(XtIsManaged(c))
+		{
+
+			if(!tw->tab.current) tw->tab.current = c;
+
+			if(c == tw->tab.current)
+			  { cx = x; cy = y; ci = i; }
+			draw(tw,c,&x,&y,i);
+		}
+	}
+
+	if(tw->tab.current)
+	{
+		GC gc = tw->tab.gc;
+		int t = tw->tab.title + tw->tab.top;
+
+		x = cx;
+		y = cy;
+
+		draw(tw,tw->tab.current,&x,&y,ci);
+
+		/*========================*/
+
+		XSetForeground(XtDisplay(tw),gc,
+			tw->core.background_pixel);
+
+		XDrawLine(XtDisplay(tw),
+			XtWindow(tw),
+			gc, 0, t, tw->core.width, t);
+
+		XSetForeground(XtDisplay(tw),
+			tw->tab.gc,
+			tw->manager.foreground);
+
+		/*========================*/
+
+		gc = tw->manager.bottom_shadow_GC;
+
+		XDrawLine(XtDisplay(tw),
+			XtWindow(tw),
+			gc,
+			0,
+			t,
+			cx - tw->tab.hmargin/2,
+			t);
+
+		XDrawLine(XtDisplay(tw),
+			XtWindow(tw),
+			gc,
+			x + tw->tab.hmargin/2,
+			t,
+			tw->core.width,
+			t);
+	}
+
+	if(tw->tab.current && XtIsRealized(tw->tab.current))
+		XRaiseWindow(XtDisplay(tw->tab.current),XtWindow(tw->tab.current));
+
+	tw->tab.wait = False;
+}
+
+
+Widget CreateTab(Widget par,char* nam,Arg* al,int ac)
+{
+	return XtCreateWidget(nam,tabWidgetClass,par,al,ac);
+}
+
+Widget TabGetCurrent(Widget w)
+{
+	TabWidget tw = (TabWidget)w;
+	return tw->tab.current;
+}
+
+static int opened_size(TabWidget tw)
+{
+	XtWidgetGeometry preferred;
+	int size;
+
+	XtQueryGeometry(tw->tab.current,NULL,&preferred);
+
+	if((preferred.request_mode & CWHeight) != 0)
+		size = preferred.height;
+	else
+		size = tw->tab.current->core.height;
+
+	if(size < 40) size = 40;
+
+	return size + tw->tab.title + tw->tab.vmargin;
+}
+
+static void open_close_tab(TabWidget tw)
+{
+	if(tw->core.height == tw->tab.title)
+		XtVaSetValues((Widget)tw,XmNheight,opened_size(tw),NULL);
+	else
+		XtVaSetValues((Widget)tw,XmNheight,tw->tab.title,NULL);
+}
+
+static void open_full(TabWidget tw)
+{
+	int size = opened_size(tw);
+	if(tw->core.height < size)
+		XtVaSetValues((Widget)tw,XmNheight,size,NULL);
+}
+
+static void set_tab(Widget w,Widget c,Boolean tell,XEvent* ev)
+{
+	TabWidget tw = (TabWidget)w;
+	TabCallbackStruct cb;
+	Widget p;
+
+	while(c && XtParent(c) != w)
+		c = XtParent(c);
+
+	if(!c) return;
+
+	if(tw->tab.current == c)
+	{
+		if(tw->tab.drawer && !tw->tab.drag) 
+			if(ev)
+				open_close_tab(tw);
+			else
+				open_full(tw);
+		return;
+	}
+
+
+
+	cb.reason = XmCR_VALUE_CHANGED;
+	cb.widget = c;
+	cb.event  = ev;
+
+	if(tell) 
+		XtCallCallbacks(w, XmNvalueChangedCallback, &cb);
+
+	tw->tab.current = cb.widget;
+
+	if(tw->tab.drawer) 
+		open_full(tw);
+
+
+	p = w;
+	while(p && XtIsManaged(p)) p = XtParent(p);
+	
+	if(p == 0)  /* All parent are managed */
+		make_visible(tw,tw->tab.current);
+
+	if(XtIsRealized(w))
+		XClearArea(XtDisplay(w),XtWindow(w),0,0,0,0,True);
+}
+
+void TabSetCurrent(Widget w,Widget c,Boolean tell)
+{
+	Widget p = XtParent(w);
+	if(XtIsTab(p)) TabSetCurrent(p,w,tell);
+	set_tab(w,c,tell,NULL);
+}
+
+void TabOpen(Widget w)
+{
+	open_full((TabWidget)w);
+}
+
+void TabClose(Widget w)
+{
+	TabWidget tw = (TabWidget)w;
+	new_layout(tw,True);
+	XtVaSetValues(w,XmNheight,tw->tab.title,NULL);
+}
+
+Boolean TabClosed(Widget w)
+{
+	TabWidget tw = (TabWidget)w;
+	return tw->tab.title == tw->core.height;
+}
+
+static void Click(Widget w, XEvent *event, String *params,Cardinal *nparams)
+{
+	TabWidget tw = (TabWidget)w;
+	int x = tw->tab.delta;
+	int y = 0;
+	int i;
+
+	tw->tab.drag   = False;
+	tw->tab.last_x = event->xbutton.x;
+	tw->tab.last_y = event->xbutton.y;
+	tw->tab.wait   = False;
+
+#if 0
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget c = tw->composite.children[i];
+		if(XtIsManaged(c))
+		{
+			XmString s = TAB_CONSTRAINT(c)->tab.name;
+
+			int   h = XmStringHeight(tw->tab.font, s) + 2 * tw->tab.vmargin;
+			int   w = XmStringWidth(tw->tab.font, s)  + 2 * tw->tab.hmargin;
+
+
+			if(event->xbutton.y >= tw->tab.top && 
+			   event->xbutton.y <= h + tw->tab.top)
+				if(event->xbutton.x >= x && event->xbutton.x <= x + w)
+				{
+
+					if(i <= tw->tab.first || i>= tw->tab.last)
+						make_visible(tw,c);
+					else
+						set_tab((Widget)tw,c,True,event);
+					break;
+				}
+			x += w;
+		}
+	}
+
+#endif
+
+}
+
+static void Drag(Widget w, XEvent *event, String *params,Cardinal *nparams)
+{
+	TabWidget tw = (TabWidget)w;
+	int h = tw->core.height;
+
+	if(!tw->tab.drawer) return;
+	if(tw->tab.wait) return;
+
+	tw->tab.drag = True;
+	tw->tab.wait = True;
+
+	h += tw->tab.last_y - event->xbutton.y;
+
+	if(h < tw->tab.title ) h = tw->tab.title;
+
+
+	XtVaSetValues((Widget)tw,XmNheight,h,NULL);
+}
+
+static void Release(Widget w, XEvent *event, String *params,Cardinal *nparams)
+{
+#if 1
+	TabWidget tw = (TabWidget)w;
+
+	int x = tw->tab.delta;
+	int y = 0;
+	int i;
+
+	/* if(tw->tab.drag) return; */
+	/* if(!tw->tab.drawer) return; */
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget c = tw->composite.children[i];
+		if(XtIsManaged(c))
+		{
+			XmString s = TAB_CONSTRAINT(c)->tab.name;
+
+			int   h = XmStringHeight(tw->tab.font, s) + 2 * tw->tab.vmargin;
+			int   w = XmStringWidth(tw->tab.font, s)  + 2 * tw->tab.hmargin;
+
+
+			if(event->xbutton.y >= tw->tab.top && 
+			   event->xbutton.y <= h + tw->tab.top)
+				if(event->xbutton.x >= x && event->xbutton.x <= x + w)
+				{
+
+					if(i <= tw->tab.first || i>= tw->tab.last)
+						make_visible(tw,c);
+					else
+						set_tab((Widget)tw,c,True,event);
+					break;
+				}
+			x += w;
+		}
+	}
+#endif
+
+	tw->tab.drag = False;
+}
+
+
+static void make_visible(TabWidget tw, Widget wid)
+{
+	int x = 0;
+	int i;
+	int m = 0;
+	int j = 0;
+
+	int from,to;
+
+	int* pos = (int*)XtCalloc(sizeof(int),tw->composite.num_children+1);
+
+	if (tw->composite.num_children == 0)
+	      return;
+
+	for(i=0;i<tw->composite.num_children;i++)
+	{
+		Widget c = tw->composite.children[i];
+		if(XtIsManaged(c))
+		{
+			XmString s = TAB_CONSTRAINT(c)->tab.name;
+
+			int   h = XmStringHeight(tw->tab.font, s) + 2 * tw->tab.vmargin;
+			int   w = XmStringWidth(tw->tab.font, s)  + 2 * tw->tab.hmargin; 
+
+			if(c == wid)
+				j = m;
+			pos[m++] = x;
+			x += w;
+		}
+	}
+
+	pos[m] = x;
+
+	if(j == 0 || j == m-1)
+	{
+		from = pos[j]   - tw->tab.hmargin;
+		to   = pos[j+1] + tw->tab.hmargin;;
+	}
+	else {
+		from = (pos[j]+pos[j-1])/2;
+		to   = (pos[j+2]+pos[j+1])/2;
+	}
+
+	if(from + tw->tab.delta < 0)
+	{
+		tw->tab.delta = -from;	
+		if(XtIsRealized((Widget)tw))
+			XClearArea(XtDisplay(tw),XtWindow(tw),0,0,0,0,True);
+	}
+
+	if(to + tw->tab.delta > tw->core.width )
+	{
+		tw->tab.delta = -(to-tw->core.width);
+		if(XtIsRealized((Widget)tw))
+			XClearArea(XtDisplay(tw),XtWindow(tw),0,0,0,0,True);
+	}
+
+
+	XtFree((XtPointer)pos);
+}
+
+void TabSetName(Widget tw,Widget w,const char* name)
+{
+	XmStringFree(TAB_CONSTRAINT(w)->tab.name);
+	TAB_CONSTRAINT(w)->tab.name = XmStringCreateSimple((char*)name);
+
+	if(XtIsRealized(tw))	XClearArea(XtDisplay(tw),XtWindow(tw),0,0,0,0,True);
+	new_layout((TabWidget)tw,True);
+}
diff --git a/src/libMvMotif/Tab.h b/src/libMvMotif/Tab.h
new file mode 100644
index 0000000..69f4885
--- /dev/null
+++ b/src/libMvMotif/Tab.h
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TAB_H
+#define TAB_H
+
+#define XtNround   "round"
+#define XtCRound   "Round"
+#define XtNrows    "rows"
+#define XtNcolumns "columns"
+#define XtCRowCol  "RowCol"
+
+#define XmNopenCallback  "openCallback"
+#define XmNcloseCallback "closeCallback"
+
+#define XmNdrawer "drawer"
+
+extern WidgetClass  tabWidgetClass;
+
+typedef struct _TabClassRec *TabWidgetClass;
+typedef struct _TabRec      *TabWidget;
+
+#ifdef _NO_PROTO
+
+extern Widget CreateTab();
+
+#else
+ 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+Widget    CreateTab(Widget,String,Arg*,int);
+Widget    TabGetCurrent(Widget);
+void      TabSetCurrent(Widget,Widget,Boolean);
+void      TabSetName(Widget,Widget,const char*);
+
+void TabOpen(Widget);
+void TabClose(Widget);
+
+Boolean TabClosed(Widget);
+
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+ 
+#endif /* _NO_PROTO */
+
+typedef struct {
+    int      reason;
+    XEvent  *event;
+    Widget   widget;
+}TabCallbackStruct;
+
+#define XtIsTab(w)	XtIsSubclass(w,tabWidgetClass)
+
+
+#endif /* TAB_H */
diff --git a/src/libMvMotif/TabP.h b/src/libMvMotif/TabP.h
new file mode 100644
index 0000000..45a9f8d
--- /dev/null
+++ b/src/libMvMotif/TabP.h
@@ -0,0 +1,93 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef TABP_H
+#define TABP_H
+
+#include <Xm/XmP.h>
+#include <Xm/DrawingAP.h>
+
+typedef struct _TabClassPart {
+    int         ignore;
+} TabClassPart;
+
+typedef struct _TabClassRec {
+    CoreClassPart       core_class;
+    CompositeClassPart  composite_class;
+    ConstraintClassPart constraint_class;
+    XmManagerClassPart  manager_class;
+    XmDrawingAreaClassPart  drawing_area_class;
+    TabClassPart     tab_class;
+} TabClassRec;
+
+extern TabClassRec tabClassRec;
+
+typedef struct {
+	XtCallbackList cb;
+	XtCallbackList open_cb;
+	XtCallbackList close_cb;
+	XmFontList     font;
+	Widget         current;
+	GC             gc;
+	Pixel          back;
+	Pixel          blue;
+
+	Dimension      hmargin;
+	Dimension      vmargin;
+
+	Dimension      title;
+	Dimension      top;
+	Dimension      bottom;
+
+	int            delta;
+	int            first;
+	int            last;
+
+	Boolean        drawer;
+	Time            last_click;
+
+	Boolean         drag;
+	Boolean         wait;
+	int             last_x;
+	int             last_y;
+
+} TabPart;
+
+typedef struct _TabConstraintsPart {
+	XmString name;
+} TabConstraintsPart;
+
+
+typedef struct _TabRec {
+    CorePart        core;
+    CompositePart   composite;
+    ConstraintPart  constraint;
+    XmManagerPart    manager;
+    XmDrawingAreaPart   drawing_area;
+    TabPart      tab;
+}  TabRec;
+
+typedef struct _TabConstraintsRec {
+    /* XmManagerConstraintPart     manager;
+    XmDrawingAreaConstraintPart drawing_area; */
+    TabConstraintsPart          tab;
+} TabConstraintsRec, *TabConstraints;
+
+
+#define TAB_CONSTRAINT(w) \
+                   ((TabConstraints)((w)->core.constraints))
+
+
+#define XtTabNumChildren(w) (((TabWidget)w) -> composite.num_children)
+#define XtTabChild(w,i)     (((TabWidget)w) -> composite.children[i])
+
+#endif /* TABP_H */
+
+
+
diff --git a/src/libMvMotif/drop.c b/src/libMvMotif/drop.c
new file mode 100755
index 0000000..95bad28
--- /dev/null
+++ b/src/libMvMotif/drop.c
@@ -0,0 +1,521 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <X11/Xatom.h>
+#include "mars.h"
+#include "Drag.h"
+#include "drop.h"
+
+typedef struct drop{
+	struct drop *next;
+	svc         *s;
+	DropProc    recvproc;
+	DropProc    sendproc;
+	void        *senddata;
+	void        *recvdata;
+	Widget	    widget;
+}drop;
+
+static dropid *ids   = NULL;
+static drop   *drops = NULL;
+
+static request* look_up(const char* name,const char *value)
+{
+	request *r = mars.setup;
+	static char* service = NULL;
+	if(!service) service = strcache("service");
+
+	while(r)
+	{
+		if(r->name == service)
+		{
+			const char* p = get_value(r,name,0);
+			if(p && strncmp(p,value,strlen(p)) == 0)
+				return r;
+		}
+		r = r->next;
+	}
+
+	return 0;
+}
+
+
+static const char* find_other_service(DragCallbackStruct* cb)
+{
+	XClassHint hint;
+	XTextProperty text;
+	Window parent,root,*children;
+	Display *dpy = XtDisplay(DragIconToWidget(cb->icon));
+	unsigned int count;
+	Window win = cb->remote_window;
+	request *r;
+
+	while(win != 0)
+	{
+		if(XGetClassHint(dpy,win,&hint))
+		{
+			if(hint.res_name)
+			{
+				r = look_up("x_resource_name",(const char*)hint.res_name);
+				XFree(hint.res_name);
+				if(r) return get_value(r,"name",0);
+			}
+			if(hint.res_class)
+			{
+				r = look_up("x_resource_class",(const char*)hint.res_class);
+				XFree(hint.res_class);
+				if(r) return get_value(r,"name",0);
+			}
+		}
+
+		/* Must free text.value ????? */
+		XGetTextProperty(dpy,win,&text,XA_WM_CLIENT_MACHINE);
+		if(text.value)
+		{
+			r = look_up("x_client_machine",(const char*)text.value);
+			/* XFree(text.value); */
+			if(r) return get_value(r,"name",0);
+		}
+
+		XGetTextProperty(dpy,win,&text,XA_WM_COMMAND);
+		if(text.value)
+		{
+			r = look_up("x_command",(const char*)text.value);
+			/* XFree(text.value); */
+			if(r) return get_value(r,"name",0);
+		}
+
+		XGetTextProperty(dpy,win,&text,XA_WM_ICON_NAME);
+		if(text.value)
+		{
+			r = look_up("x_icon_name",(const char*)text.value);
+			/* XFree(text.value); */
+			if(r) return get_value(r,"name",0);
+		}
+
+		XGetTextProperty(dpy,win,&text,XA_WM_NAME);
+		if(text.value)
+		{
+			r = look_up("x_name",(const char*)text.value);
+			/* XFree(text.value); */
+			if(r) return get_value(r,"name",0);
+		}
+
+		if(XQueryTree(dpy,win,&root,&parent,&children,&count))
+		{
+			win = parent;
+			XFree(children);
+		}
+		else break;
+	}
+
+	return 0;
+}
+
+static request* find_other_mode(dropid* id,DragCallbackStruct* cb)
+{
+	return NULL;
+}
+
+static  int find_other_action(dropid* id,DragCallbackStruct* cb)
+{
+	request *r = mars.setup;
+	static char* drop_action = NULL;
+	if(!drop_action) drop_action = strcache("drop_action");
+
+	while(r)
+	{
+		if(r->name == drop_action)
+		{
+			const char* p = get_value(r,"name",0);
+			if(p && EQ(p,id->service))
+			{
+				const char* p = get_value(r,"class",0);
+				if(!p || EQ(p,cb->icon_class))
+					return atol(get_value(r,"action",0));
+			}
+		}
+		r = r->next;
+	}
+
+	return DROP_ACTION_RESOLVE;
+}
+
+static drop *get_info(Widget w)
+{
+	drop *p = drops;
+	while(p)
+	{
+		if(p->widget == w) return p;
+		p = p->next;
+	}
+	return NULL;
+}
+
+static dropid *get_dropid(Widget w,drop *info,DragCallbackStruct *cb,
+	boolean sender)
+{
+	const char *s;
+	dropid *p = ids;
+
+	while(p)
+	{
+		if(p->batch == cb->icon_batch && p->sender == sender)
+			return p;
+		p = p->next;
+	}
+
+	p = NEW_CLEAR(dropid);
+
+	p->s       = info->s;	
+	p->next    = ids;
+	p->count   = cb->icon_count;
+	p->cb      = (DragCallbackStruct*)XtCalloc(cb->icon_count,sizeof(DragCallbackStruct));
+	p->batch   = cb->icon_batch;
+	p->data    = (void*)info;
+	p->sender  = sender;
+
+	s  = DragGetInfo(cb);
+	if(s) 
+	{
+		char service[80];
+		char dummy[80];
+		sscanf(s,"%s %s %s",service,dummy,dummy);
+		p->service = strcache(service);
+	}
+	else {
+		p->service = strcache(find_other_service(cb));
+	}
+
+	/*p->widget  = w;*/
+
+	ids = p;
+	return p;
+}
+
+static void add_cb(dropid *id,DragCallbackStruct *cb)
+{
+	memcpy(&id->cb[cb->icon_no-1],(void*)cb,sizeof(DragCallbackStruct));
+	id->cb[cb->icon_no-1].icon_name   = strcache(cb->icon_name);
+	id->cb[cb->icon_no-1].icon_class  = strcache(cb->icon_class);
+	id->cb[cb->icon_no-1].remote_name = strcache(cb->remote_name);
+}
+
+static void free_dropid(dropid *s)
+{
+	dropid *p = ids;
+	dropid *q = NULL;
+
+	while(p)
+	{
+		if(p == s)
+		{
+			int i;
+
+			if(q) q->next = p->next;
+			else ids = p->next;
+
+			for(i=0;i<p->count;i++)
+			{
+				strfree((char*)p->cb[i].icon_class);
+				strfree((char*)p->cb[i].icon_name);
+				strfree((char*)p->cb[i].remote_name);
+			}
+			XtFree((char*)p->cb);
+			strfree(p->service);
+			free_all_requests(p->header);
+			free_all_requests(p->mode);
+			free_all_requests(p->context);
+
+			FREE(p);
+			break;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+static void destroy_callback(Widget w,XtPointer cd,XtPointer cb)
+{
+	drop *p = drops;
+	drop *q = NULL;
+
+	while(p)
+	{
+		if(p == (drop*)cd)
+		{
+			if(q) q->next = p->next;
+			else drops = p->next;
+			FREE(cd);
+			return;
+		}
+		q = p;
+		p = p->next;
+	}
+}
+
+/* Receiver side */
+
+static void drop_callback(Widget w,XtPointer cd,DragCallbackStruct *cb)
+{
+	drop *info = (drop*)cd;
+	dropid *id;
+
+
+	/* Ignore internal drops ... */
+	if(cb->remote_widget && (strcmp(info->s->name,"VisMod") != 0)) return;
+
+/*
+	if(cb->message == NULL || strcmp(id,(char*)cb->message) != 0)
+	{
+		marslog(LOG_WARN,"Iter-Metview drops not supported (%s)",cb->message);
+		cb->accept_it = False;
+		return;
+	}
+*/
+
+	id = get_dropid(w,info,cb,false);
+
+	add_cb(id,cb);
+
+	if(cb->icon_no == cb->icon_count)
+	{
+		/* We receive a proc */
+		if(info->recvproc) {
+			/* char *p = DragGetInfo(cb); */
+
+			request *r = empty_request("DROP_REQUEST");
+			info->recvproc(w,id,info->recvdata);
+
+			set_value(r,     "BATCH",   "%d", id->batch);
+			set_value(r,     "ACTION",  "%d", id->action);
+			set_subrequest(r,"MODE",    id->mode);
+			set_subrequest(r,"HEADER",  id->header);
+
+			print_all_requests(r);
+			send_drop_info(info->s,id->service,r,0);
+			free_all_requests(r);
+		}
+		free_dropid(id);
+	}
+	cb->accept_it = True;
+}
+
+/* Sender side ... */
+
+
+static void send_callback(Widget w,XtPointer cd,DragCallbackStruct *cb)
+{
+	drop *info         = (drop*)cd;
+	dropid *id;
+
+	/* Ignore internal drops ... */
+	if(cb->remote_widget && (strcmp(info->s->name,"VisMod") != 0)) return;
+
+	cb->send_it    = True;
+
+	id = get_dropid(w,info,cb,true);
+	add_cb(id,cb);
+}
+
+
+/* Sender side ... */
+
+static void answer_callback(Widget w,XtPointer cd,DragCallbackStruct *cb)
+{
+	drop *info = (drop*)cd;
+	dropid *id;
+	/* char *service      = DragGetInfo(cb);  */
+
+	if(cb->remote_widget && (strcmp(info->s->name,"VisMod") != 0)) return;
+
+	id = get_dropid(w,info,cb,true);
+	id->state = (cb->remote_widget != 0);
+
+	switch(cb->code)
+	{
+	case DROP_OK:
+		break;
+
+	case DROP_REFUSED:
+		marslog(LOG_WARN,"Cannot drop this icon here, drop refused");
+		break;
+
+	case DROP_ABORTED:
+		/* This message should go if other windows accepted */
+		marslog(LOG_WARN,"Cannot drop this icon here, invalid target");
+		break;
+	}
+}
+
+static void other_callback(Widget w,XtPointer cd,DragCallbackStruct *cb)
+{
+	request *r = empty_request("DROP");
+	drop *info         = (drop*)cd;
+
+	dropid *id ; 
+	
+	set_value(r,"X","%d",cb->x);
+	set_value(r,"Y","%d",cb->y);
+	set_value(r,"WINDOW","%d",cb->remote_window);
+	set_value(r,"ICON_CLASS","%s",cb->icon_class);
+	set_value(r,"ICON_NAME","%s",cb->icon_name);
+
+	/* make an id for sender and receiver */
+	/* id  = get_dropid(w,info,cb,false); */
+	/* add_cb(id,cb); */
+
+	id  = get_dropid(w,info,cb,true);
+	add_cb(id,cb);
+
+	if(id->service == NULL)
+	{
+		marslog(LOG_WARN,"Cannot drop this icon here, invalid target");
+		free_dropid(id);
+	}
+	else if(cb->icon_no == cb->icon_count)
+	{
+		request *d = empty_request("DROP_REQUEST");
+
+		set_value(d,     "BATCH",   "%d", id->batch);
+		set_value(d,     "ACTION",  "%d", find_other_action(id,cb));
+		set_subrequest(d,"MODE",    find_other_mode(id,cb));
+		set_subrequest(d,"HEADER",  r);
+
+		print_all_requests(d);
+		send_drop_info(info->s,info->s->name,d,0);
+		free_all_requests(d);
+	}
+
+	free_all_requests(r);
+		
+
+}
+
+static void drop_request(svcid *id,request *r,void *data)
+{
+	int n;
+	dropid *p = ids;
+	print_all_requests(r);
+	n = atoi(get_value(r,"BATCH",0));
+	while(p)
+	{
+		if(p->batch == n && p->sender)
+		{
+			drop *info = (drop*)p->data;	
+			p->mode   = get_subrequest(r,"MODE",0);
+			p->header = get_subrequest(r,"HEADER",0);
+			p->context = get_subrequest(r,"_CONTEXT",0);
+			p->action = atoi(get_value(r,"ACTION",0));
+			info->sendproc(info->widget,p,info->senddata);
+			free_dropid(p);
+			break;
+		}
+		p = p->next;
+	}
+
+}
+
+static void install_drop_svc(svc *s)
+{
+	static installed = 0;
+	if(installed) return;
+	installed = 1;
+	add_drop_callback(s,NULL,drop_request,NULL);
+}
+
+DragCallbackStruct *DropObjectFromSource(Widget widget,XEvent  *ev,
+	Position  x,    Position  y,
+	Dimension width,Dimension height,
+	DragDrawProc draw,
+	XtPointer data)
+{
+	DragCallbackStruct *cb = DragDropObject(widget,ev,x,y,width,height,
+		draw,data);
+	if(cb) {
+		dropid *id;
+		DragDropSend(widget,cb);
+		id = get_dropid(widget,get_info(widget),cb,true);
+		id->sender = true;
+		add_cb(id,cb);
+	}
+	return cb;
+}
+
+
+void RegisterDropSource(svc *s,Widget w,DropProc proc,void *data)
+{
+	char buf[1024];
+
+	drop *info = get_info(w);
+	
+		
+	if(info == NULL)
+	{
+		info = NEW_CLEAR(drop);
+		info->next     = drops;
+		drops          = info;
+		info->s        = s;
+		info->widget   = w;
+	}
+	info->sendproc = proc;
+	info->senddata = data;
+
+	install_drop_svc(s);
+
+	sprintf(buf,"%s %s %s",s->name,getenv("EVENT_HOST"),getenv("EVENT_PORT"));
+	DragSetInfo(w,buf);
+
+	if(XtIsDrag(w))
+	{
+		XtAddCallback(w,XmNsendmsgCallback,
+			(XtCallbackProc)send_callback,(XtPointer)info);
+		XtAddCallback(w,XmNanswerCallback,
+			(XtCallbackProc)answer_callback,(XtPointer)info);
+		XtAddCallback(w,XmNotherDropCallback,
+			(XtCallbackProc)other_callback,(XtPointer)info);
+	}
+	XtAddCallback(w,XmNdestroyCallback,
+		(XtCallbackProc)destroy_callback,(XtPointer)info);
+}
+
+void RegisterDropTarget(svc *s,Widget w,DropProc proc,void *data)
+{
+	char buf[1024];
+	drop *info = get_info(w);
+	
+		
+	if(info == NULL)
+	{
+		info = NEW_CLEAR(drop);
+		info->next     = drops;
+		drops          = info;
+		info->s        = s;
+		info->widget   = w;
+	}
+
+	info->recvproc = proc;
+	info->recvdata = data;	
+
+	install_drop_svc(s);
+
+	if(XtIsDrag(w))
+		XtAddCallback(w,XmNdropCallback,
+		    (XtCallbackProc)drop_callback,(XtPointer)info);
+	else
+		DragAcceptDropCallback(w,
+		    (XtCallbackProc)drop_callback,(XtPointer)info);
+
+	XtAddCallback(w,XmNdestroyCallback,
+	    (XtCallbackProc)destroy_callback,(XtPointer)info);
+
+	sprintf(buf,"%s %s %s",s->name,getenv("EVENT_HOST"),getenv("EVENT_PORT"));
+	DragSetInfo(w,buf);
+}
diff --git a/src/libMvMotif/drop.h b/src/libMvMotif/drop.h
new file mode 100644
index 0000000..038a2de
--- /dev/null
+++ b/src/libMvMotif/drop.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef DROP_H
+#define DROP_H
+#include <Xm/Xm.h>
+#include "mars.h"
+#include "Drag.h"
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+#define DROP_ACTION_NOOP              0
+#define DROP_ACTION_NAME_AND_CLASS    1
+#define DROP_ACTION_DEFINITION   	  2
+#define DROP_ACTION_RESOLVE           3
+#define DROP_ACTION_ERROR            -1
+
+typedef struct dropid {
+
+	/* private */
+
+	struct dropid *next;
+
+	void   *data;
+	int    state;
+	int    batch;
+
+	/* public */
+
+	svc     *s;             /* communication handle */
+	char    *service;       /* remote service */
+	int     count;          /* -> Icon count */
+	boolean sender;
+
+	DragCallbackStruct *cb; /* All the callbacks */
+
+	/* Target must fill, source can read ... */
+
+	int      action;        /* <-> Action requested from source */
+	request *header;        /* <-> Drop header       ( Will be freed) */
+	request *mode;          /* <-> Drop traget state ( Will be freed) */
+	request *context;       /* <-> Drop target info  ( Will be freed) */
+
+} dropid;
+
+typedef void (*DropProc)(Widget,dropid*,void*);
+
+void RegisterDropSource(svc*,Widget,DropProc,void*);
+void RegisterDropTarget(svc*,Widget,DropProc,void*);
+DragCallbackStruct *DropObjectFromSource(Widget,XEvent*,Position,Position,
+	Dimension,Dimension, DragDrawProc,XtPointer);
+
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif
diff --git a/src/libMvMotif/progress.c b/src/libMvMotif/progress.c
new file mode 100644
index 0000000..868b63b
--- /dev/null
+++ b/src/libMvMotif/progress.c
@@ -0,0 +1,198 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+
+#include <Xm/Xm.h>
+#include <Xm/DialogS.h>
+#include <Xm/Scale.h>
+#include <Xm/Label.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Frame.h>
+
+#include <mars.h>
+#include <progress.h>
+
+static Widget progress_top = (Widget) NULL;
+static Widget progress_row = (Widget) NULL;
+static Widget progress_box = (Widget) NULL;
+static Widget progress_pix = (Widget) NULL;
+static Widget progress_scale = (Widget) NULL;
+static Widget progress_text = (Widget) NULL;
+
+static Boolean visible;
+static long   start;
+
+typedef struct  {
+	float  max;
+	float  value;
+	char   *title;
+} info;
+
+static info infos[10];
+
+
+static int  depth   = 0;
+static int  current = 0;
+
+
+void progress_init(Widget parent)
+{
+	Arg al[64];      
+	int ac = 0;
+
+	if(progress_top) return;
+
+	while(!XtIsShell(parent)) parent = XtParent(parent);
+
+
+	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
+	progress_top = XmCreateDialogShell ( parent, "Metview progress", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
+	progress_row = XmCreateRowColumn ( progress_top, "progress_row", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNshadowType, (time(0)%2 == 0)?XmSHADOW_OUT:XmSHADOW_IN); ac++;
+	progress_box = XmCreateFrame ( progress_row, "progress_box", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
+	progress_pix = XmCreateLabel ( progress_box, "progress_pix", al, ac );
+	ac = 0;
+	XtSetValues ( progress_pix,al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 400); ac++;
+	XtSetArg(al[ac], XmNshowValue, TRUE); ac++;
+	XtSetArg(al[ac], XmNminimum, 0); ac++;
+	XtSetArg(al[ac], XmNmaximum, 100); ac++;
+	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
+	XtSetArg(al[ac], XmNprocessingDirection, XmMAX_ON_RIGHT); ac++;
+	progress_scale = XmCreateScale ( progress_row, "progress_scale", al, ac );
+	ac = 0;
+	XtSetArg(al[ac], XmNwidth, 400); ac++;
+	XtSetArg(al[ac], XmNrecomputeSize, FALSE); ac++;
+	progress_text = XmCreateLabel ( progress_row, "progress_text", al, ac );
+	ac = 0;
+	XtManageChild(progress_pix);
+
+	ac = 0;
+	XtManageChild(progress_scale);
+	XtManageChild(progress_text);
+	ac = 0;
+	visible = False;
+}
+
+void progress_pixmap(Pixmap pixmap)
+{
+	if(pixmap ==0 || pixmap == XmUNSPECIFIED_PIXMAP)
+		XtUnmanageChild(progress_box);
+	else
+	{
+		Arg al[64];      
+		int ac = 0;
+		XtSetArg(al[ac],XmNlabelPixmap,pixmap);ac++;
+		XtSetValues(progress_pix,al,ac);
+		XtManageChild(progress_box);
+	}
+}
+
+static void set_title(char *p)
+{
+	Arg al[64];      
+	int ac = 0;
+
+	XmString s = XmStringCreateSimple(p);
+
+	ac = 0;
+	XtSetArg(al[ac],XmNlabelString,s);ac++;
+	XtSetValues(progress_text,al,ac);
+	XmStringFree(s);
+}
+
+void progress_start(const char *title,int m)
+{
+	if(m<=0) m = 1;
+
+	if(title == NULL)
+	{
+		if(depth == 0) title = "Working..";
+		else title = infos[depth-1].title;
+	}
+
+	if(depth == 0) {
+		start = time(0);
+		current = 0;
+	}
+	
+	infos[depth].max   = m;
+	infos[depth].value = 0;
+	infos[depth].title = strcache(title);
+
+	set_title(infos[depth].title);
+
+	depth++;
+
+	progress_value(0);
+}
+
+
+void progress_value(int v)
+{
+	float x = 0.0;
+	float y = 1.0;
+	int   i;
+
+	if(v > infos[depth-1].max) v = infos[depth-1].max;
+	infos[depth-1].value = v;
+
+	for(i=0;i<depth;i++)
+	{
+		x += infos[i].value / infos[i].max * y;
+		y = 1.0 / infos[i].max;
+	}
+
+	v = (int)(100.0 * x);
+	if(v>100) v = 100;
+
+	/* if(v>current)  */
+		current = v;
+
+	if(visible)
+	{
+		XmScaleSetValue(progress_scale,current);		
+		XmUpdateDisplay(progress_scale);
+	}
+	else
+	{
+		long now = time(0);
+		if(now - start >  5 && current < 50) /* 50 % made in 5 sec. */
+		{
+			visible = TRUE;
+			XtRealizeWidget(progress_top);
+			XmScaleSetValue(progress_scale,current);
+			XtManageChild(progress_row);
+			XmUpdateDisplay(progress_scale);
+		}
+	}
+}
+
+void progress_stop(void)
+{
+	--depth;
+
+	strfree(infos[depth].title);
+
+	if(depth == 0)
+	{
+		XtUnmanageChild(progress_row);
+		visible = False;
+		XmUpdateDisplay(progress_scale);
+	}
+}
diff --git a/src/libMvMotif/progress.h b/src/libMvMotif/progress.h
new file mode 100644
index 0000000..7706d35
--- /dev/null
+++ b/src/libMvMotif/progress.h
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/* progress.c */
+
+void progress_init(Widget parent);
+void progress_pixmap(Pixmap pixmap);
+void progress_start(const char *newtitle,int max);
+void progress_value(int value);
+void progress_stop();
+int  progress_ok();
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
diff --git a/src/libMvMotif/xdclass.h b/src/libMvMotif/xdclass.h
new file mode 100644
index 0000000..2c0f016
--- /dev/null
+++ b/src/libMvMotif/xdclass.h
@@ -0,0 +1,218 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef XDCLASS_H
+#define XDCLASS_H
+#ifdef __cplusplus
+
+#include <Xm/Xm.h>
+#include <stdlib.h>
+
+class xd_base_c
+{
+    public:
+	xd_base_c() {_xd_rootwidget=NULL;}
+	Widget xd_rootwidget() const {return _xd_rootwidget;}
+    protected:
+	Widget _xd_rootwidget;
+    private:
+	void operator=(xd_base_c&); // No assignment
+	// Certain C++ compilers (eg gcc 2.5) require there to be an
+	// implementation of the copy constructor. If your application
+	// fails to link try using the second version of the constructor
+	//xd_base_c(xd_base_c&) ;           // No default copy
+	xd_base_c(xd_base_c&) { abort();}   // No default copy
+};
+
+class xd_XtWidget_c: public xd_base_c
+{
+    public:
+	xd_XtWidget_c();
+	void SetValue(String name, XtArgVal value);
+	void SetValues(ArgList args, Cardinal num_args);
+	void VaSetValues(String name,...);
+	void GetValue(String name, void *value);
+	void GetValues(ArgList args, Cardinal num_args);
+	void VaGetValues(String name,...);
+	void Map();
+	void Unmap();
+	virtual void xd_enable();
+	virtual void xd_disable();
+	virtual void xd_destroy();
+};
+
+class xd_TopLevelShell_c: public xd_XtWidget_c
+{
+};
+
+class xd_ApplicationShell_c: public xd_TopLevelShell_c
+{
+    public:
+	void xd_exit(int status=0);
+	void Realize();
+};
+
+class xd_ChildWidget_c: public xd_XtWidget_c
+{
+    public:
+	virtual void xd_show()=0;
+	virtual void xd_hide()=0;
+	void Manage();
+	void Unmanage();
+};
+
+class xd_XmDialog_c: public xd_ChildWidget_c
+{
+    public:
+	xd_XmDialog_c();
+	virtual void xd_show();
+	virtual void xd_hide();
+	void Raise();
+    protected:
+	Widget xd_getchildwidget();
+	Widget xd_childwidget;
+};
+
+class xd_NonShellWidget_c: public xd_ChildWidget_c
+{
+    public:
+	virtual void xd_show();
+	virtual void xd_hide();
+};
+
+class xd_XmLabel_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmCascadeButton_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmDrawnButton_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmPushButton_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmToggleButton_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmArrowButton_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmList_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmScrollBar_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmSeparator_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmText_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmTextField_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmBulletinBoard_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmRowColumn_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmRadioBox_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmDrawingArea_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmPanedWindow_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmFrame_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmScale_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmScrolledWindow_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmScrolledText_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmScrolledList_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmMainWindow: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmSelectionBox_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmFileSelectionBox_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmCommand_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmMessageBox_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmMainWindow_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmForm_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmMenuBar_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmPulldownMenu_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmPopupMenu_c: public xd_NonShellWidget_c
+{
+};
+
+class xd_XmOptionMenu_c: public xd_NonShellWidget_c
+{
+};
+
+#endif /*__cplusplus*/
+#endif /*XDCLASS_H*/
diff --git a/src/libMvMotif/xdxmdialog.cc b/src/libMvMotif/xdxmdialog.cc
new file mode 100644
index 0000000..b9467c3
--- /dev/null
+++ b/src/libMvMotif/xdxmdialog.cc
@@ -0,0 +1,60 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/DialogS.h>
+
+#include <xdclass.h>
+
+xd_XmDialog_c::xd_XmDialog_c()
+{
+    xd_childwidget=0;
+    return;
+}
+
+Widget xd_XmDialog_c::xd_getchildwidget()
+{
+    if (!xd_childwidget)
+    {
+	Cardinal numchildren;
+	GetValue(XmNnumChildren, &numchildren);
+	if (numchildren!=0)
+	{
+	    WidgetList children;
+	    GetValue(XmNchildren, &children);
+	    xd_childwidget=*children;
+	}
+    }
+    return xd_childwidget;
+}
+
+void xd_XmDialog_c::xd_show()
+{
+    if (!_xd_rootwidget) // Nothing to show
+	return;
+    if (!xd_getchildwidget()) // Nothing to show
+	return;
+    XtManageChild(xd_childwidget);
+    return;
+}
+
+void xd_XmDialog_c::xd_hide()
+{
+    if (!_xd_rootwidget) // Nothing to hide
+	return;
+    if (!xd_getchildwidget()) // Nothing to hide
+	return;
+    XtUnmanageChild(xd_childwidget);
+    return;
+}
+
+void xd_XmDialog_c::Raise()
+{
+    (void) XRaiseWindow(XtDisplay(_xd_rootwidget), XtWindow(_xd_rootwidget));
+    return;
+}
diff --git a/src/libMvMotif/xdxtclass.cc b/src/libMvMotif/xdxtclass.cc
new file mode 100644
index 0000000..f0b74cf
--- /dev/null
+++ b/src/libMvMotif/xdxtclass.cc
@@ -0,0 +1,217 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include <xdclass.h>
+
+xd_XtWidget_c::xd_XtWidget_c()
+{
+    _xd_rootwidget=0;
+    return;
+}
+
+void xd_XtWidget_c::SetValue(String name, XtArgVal value)
+{
+    Arg al[1];
+    Cardinal ac=0;
+    XtSetArg(al[ac], name, value); ac++;
+    XtSetValues(_xd_rootwidget, al, ac);
+    return;
+}
+
+void xd_XtWidget_c::SetValues(ArgList args, Cardinal num_args)
+{
+    XtSetValues(_xd_rootwidget, args, num_args);
+    return;
+}
+
+void xd_XtWidget_c::VaSetValues(String name,...)
+{
+    String attr;
+    int count=1;
+    va_list ap;
+
+    /* Ignore empty argument list */
+    if (name==NULL)
+	return;
+
+    /* First count the (non-empty) argument list */
+    va_start(ap, name);
+
+    va_arg(ap, XtArgVal); // Pop first value
+    for (attr = va_arg(ap, String); attr != NULL;
+			attr = va_arg(ap, String))
+    {
+	va_arg(ap, XtArgVal); // Pop value
+	++count;
+    }
+    va_end(ap);
+
+    /* Now transfer values into an ArgList and throw at XtSetValues*/
+
+    ArgList al=new Arg[count];
+    XtArgVal value;
+    Cardinal ac=0;
+
+    va_start(ap, name);
+    value=va_arg(ap, XtArgVal);
+    XtSetArg(al[ac], name, value); ac++;
+    for (attr = va_arg(ap, String); attr != NULL;
+			attr = va_arg(ap, String))
+    {
+	value=va_arg(ap, XtArgVal);
+	if (value)
+	{
+	    XtSetArg(al[ac], attr, value); ac++;
+	}
+    }
+    va_end(ap);
+    XtSetValues(_xd_rootwidget, al, ac);
+
+    /* Tidy up - commented out version is for aged compilers */
+    //delete [count]al;
+    delete []al;
+    return;
+}
+
+void xd_XtWidget_c::GetValue(String name, void* value)
+{
+    Arg al[1];
+    Cardinal ac=0;
+    XtSetArg(al[ac], name, value); ac++;
+    XtGetValues(_xd_rootwidget, al, ac);
+    return;
+}
+
+void xd_XtWidget_c::GetValues(ArgList args, Cardinal num_args)
+{
+    XtGetValues(_xd_rootwidget, args, num_args);
+    return;
+}
+
+void xd_XtWidget_c::VaGetValues(String name,...)
+{
+    String attr;
+    int count=1;
+    va_list ap;
+
+    /* Ignore empty argument list */
+    if (name==NULL)
+	return;
+
+    /* First count the (non-empty) argument list */
+    va_start(ap, name);
+
+    va_arg(ap, XtArgVal); // Pop first value
+    for (attr = va_arg(ap, String); attr != NULL;
+			attr = va_arg(ap, String))
+    {
+	va_arg(ap, XtArgVal); // Pop value
+	++count;
+    }
+    va_end(ap);
+
+    /* Now transfer values into an ArgList and throw at XtGetValues*/
+
+    ArgList al=new Arg[count];
+    XtArgVal value;
+    Cardinal ac=0;
+
+    va_start(ap, name);
+    value=va_arg(ap, XtArgVal);
+    XtSetArg(al[ac], name, value); ac++;
+    for (attr = va_arg(ap, String); attr != NULL;
+			attr = va_arg(ap, String))
+    {
+	value=va_arg(ap, XtArgVal);
+	if (value)
+	{
+	    XtSetArg(al[ac], attr, value); ac++;
+	}
+    }
+    va_end(ap);
+    XtGetValues(_xd_rootwidget, al, ac);
+
+    /* Tidy up - commented out version is for aged compilers */
+    //delete [count]al;
+    delete []al;
+    return;
+}
+
+void xd_XtWidget_c::Map()
+{
+    XtMapWidget(_xd_rootwidget);
+    return;
+}
+
+void xd_XtWidget_c::Unmap()
+{
+    XtUnmapWidget(_xd_rootwidget);
+    return;
+}
+
+void xd_XtWidget_c::xd_enable()
+{
+    XtSetSensitive(_xd_rootwidget, TRUE);
+    return;
+}
+
+void xd_XtWidget_c::xd_disable()
+{
+    XtSetSensitive(_xd_rootwidget, FALSE);
+    return;
+}
+
+void xd_XtWidget_c::xd_destroy()
+{
+    if (_xd_rootwidget){
+	XtDestroyWidget(_xd_rootwidget);
+	_xd_rootwidget=0;
+    }
+    return;
+}
+
+void xd_ApplicationShell_c::xd_exit(int status)
+{
+    exit(status);
+    return;
+}
+
+void xd_ApplicationShell_c::Realize()
+{
+    XtRealizeWidget(_xd_rootwidget);
+    return;
+}
+
+void xd_ChildWidget_c::Manage()
+{
+    XtManageChild(_xd_rootwidget);
+    return;
+}
+
+void xd_ChildWidget_c::Unmanage()
+{
+    XtUnmanageChild(_xd_rootwidget);
+    return;
+}
+
+void xd_NonShellWidget_c::xd_show()
+{
+    Map();
+    return;
+}
+
+void xd_NonShellWidget_c::xd_hide()
+{
+    Unmap();
+    return;
+}
diff --git a/src/libMvMotif/xec.h b/src/libMvMotif/xec.h
new file mode 100644
index 0000000..51a5332
--- /dev/null
+++ b/src/libMvMotif/xec.h
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <stdio.h>
+#define ARG_DEF(n)			Arg al[n];int ac=0
+#define SetArg(arg,val)     XtSetArg(al[ac],arg,val);ac++;
+#define SetValues(w)     	XtSetValues(w,al,ac);ac=0;
+#define GetValues(w)     	XtGetValues(w,al,ac);ac=0;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+/* xec_Cursor.c */
+void xec_SetWatchCursor(Widget w);
+void xec_ResetCursor(Widget w);
+
+/* xec_Label.c */
+void xec_SetLabel(Widget w, const char *title);
+void xec_VaSetLabel(Widget w, const char *fmt, ...);
+
+/* xec_List.c */
+void xec_ClearList(Widget w);
+void xec_RemoveListItem(Widget w, const char *p);
+void xec_AddListMax(Widget w, int max, const char *p);
+void xec_VaAddListMax(Widget w, int max, char *fmt, ...);
+void xec_AddListItem(Widget w, const char *p);
+void xec_VaAddListItem(Widget w, const char *fmt, ...);
+void xec_SetListItems(Widget w, XmString *list, int count);
+int xec_DumpList(FILE *f, const char *fmt, Widget w);
+Boolean xec_ListSearch(Widget w, char *word, Boolean nocase, Boolean fromstart, Boolean wrap);
+void xec_AddFontListItem(Widget list, const char *buffer, Boolean bold);
+
+/* xec_Regexp.c */
+void xec_compile(const char *w);
+int xec_step(const char *p);
+
+/* xec_Strings.c */
+XmString xec_NewString(const char *s);
+void xec_BuildXmStringList(XmString **list, const char *p, int *count);
+void xec_FreeXmStringList(XmString *list, int count);
+char *xec_GetString(XmString string);
+
+/* xec_Text.c */
+int regexp_find(char *word, char *buffer, Boolean nocase, int *from, int *to);
+Boolean xec_TextSearch(Widget w, char *word, Boolean nocase, Boolean fromstart, Boolean wrap);
+char *xec_GetText(Widget w, char *buf);
+int xec_LoadText(Widget Text, const char *fname, Boolean include);
+int xec_SaveText(Widget w, const char *fname);
+int xec_DumpText(FILE *fp, Widget w);
+void xec_PrintText(Widget w, const char *cmd);
+void xec_ReplaceTextSelection(Widget w, const char *p, Boolean sel);
+
+/* xec_Widget.c */
+void *xec_GetUserData(Widget w);
+void xec_SetUserData(Widget w, void *p);
+void xec_SetColor(Widget w, Pixel p, const char *which);
+void xec_ShowWidget(Widget w);
+void xec_Invert(Widget w);
+void xec_ManageAll(Widget w);
+void xec_UnmanageAll(Widget w);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
diff --git a/src/libMvMotif/xec_Cursor.c b/src/libMvMotif/xec_Cursor.c
new file mode 100644
index 0000000..a81a421
--- /dev/null
+++ b/src/libMvMotif/xec_Cursor.c
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <X11/X.h>
+#include <X11/cursorfont.h>
+#include <Xm/Xm.h>
+
+/*----------------------------------------------------
+
+	Set the cursor to a watch shape. 
+	Usualy pass the Top Shell as argument.
+
+----------------------------------------------------*/
+
+void xec_SetWatchCursor(w)
+Widget w;
+{
+	static Cursor watch = NULL;
+
+	if(!watch)
+		watch = XCreateFontCursor(XtDisplay(w),XC_watch);
+
+	XDefineCursor(XtDisplay(w),XtWindow(w),watch);
+	XmUpdateDisplay(w);
+}
+
+/*----------------------------------------------------
+
+	Reset the cursor to its default shape. 
+	Usualy pass the Top Shell as argument.
+
+----------------------------------------------------*/
+
+void xec_ResetCursor(w)
+Widget w;
+{
+	XUndefineCursor(XtDisplay(w),XtWindow(w));
+	XmUpdateDisplay(w);
+}
+
diff --git a/src/libMvMotif/xec_Label.c b/src/libMvMotif/xec_Label.c
new file mode 100644
index 0000000..d5ccaff
--- /dev/null
+++ b/src/libMvMotif/xec_Label.c
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <Xm/Xm.h>
+#include "xec.h"
+
+/*-----------------------------------------------
+
+	Change the title of a Label or Button
+
+-------------------------------------------------*/
+
+void xec_SetLabel(Widget w,const char *title)
+{
+	ARG_DEF(1);
+	XmString	item = xec_NewString(title);
+
+	SetArg(XmNlabelString,item);
+	SetValues(w);
+	XmStringFree(item);
+}
+
+void xec_VaSetLabel(Widget w,const char *fmt,...)
+{
+	va_list   args;
+	char      str[1000];  /* DANGER: Fixed buffer size */
+	va_start(args,fmt);
+	vsprintf(str, fmt, args);
+	xec_SetLabel(w,str);
+	va_end(args);
+}
diff --git a/src/libMvMotif/xec_List.c b/src/libMvMotif/xec_List.c
new file mode 100644
index 0000000..c77ee73
--- /dev/null
+++ b/src/libMvMotif/xec_List.c
@@ -0,0 +1,227 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Xm/ListP.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdarg.h>
+#include "xec.h"
+
+/*---------------------------------------------------
+
+	Remove all lines of a List.
+
+----------------------------------------------------*/
+
+void xec_ClearList(Widget w)
+{
+	ARG_DEF(4);
+
+	SetArg(XmNselectedItemCount, 0 );
+	SetArg(XmNselectedItems, NULL );
+	SetArg(XmNitemCount, 0 );
+	SetArg(XmNitems, NULL );
+	SetValues(w);
+
+}
+
+/*-----------------------------------------------------
+
+	Remove one line to a list
+
+------------------------------------------------------*/
+
+void xec_RemoveListItem(Widget w,const char *p)
+{
+	XmString item= XmStringCreateSimple((char*)p);
+	XmListDeleteItem(w,item);
+	XmStringFree(item);
+}
+
+/*----------------------------------------------------
+
+	Add to a list with max number of items
+
+-----------------------------------------------------*/
+
+void xec_AddListMax(Widget w,int max,const char *p)
+{
+	int n;
+	ARG_DEF(1);
+
+	SetArg(XmNitemCount,&n);
+	GetValues(w);
+	if(n>=max) XmListDeletePos(w,1);
+	xec_AddListItem(w,p);
+
+	SetArg(XmNitemCount,&n);
+	GetValues(w);
+	XmListSetBottomPos(w,n);
+}
+
+void xec_VaAddListMax(Widget  w,int max,char *fmt,...)
+{
+	va_list   args;
+	char      str[1000];  /* DANGER: Fixed buffer size */
+				 
+	va_start(args,fmt);
+	vsprintf(str, fmt, args);
+    xec_AddListMax(w,max,str);
+	va_end(args);
+}
+							   
+
+/*-----------------------------------------------------
+
+	Add one line to a list
+
+------------------------------------------------------*/
+
+void xec_AddListItem(Widget w,const char *p)
+{
+	XmString item= XmStringCreateSimple((char*)p);
+	XmListAddItemUnselected(w,item,0);
+	XmStringFree(item);
+}
+
+void xec_VaAddListItem(Widget w,const char *fmt,...)
+{
+	va_list   args;
+	char      str[1000];  /* DANGER: Fixed buffer size */
+				 
+	va_start(args,fmt);
+	vsprintf(str, fmt, args);
+    xec_AddListItem(w,str);
+										
+	va_end(args);
+}
+
+/*-----------------------------------------------------
+
+	Replace all items in a list
+
+------------------------------------------------------*/
+void xec_SetListItems(Widget w,XmString *list,int count)
+{
+	ARG_DEF(2);
+
+	SetArg(XmNitems, list );
+	SetArg(XmNitemCount, count );
+	SetValues(w);
+
+}
+
+/*---------------------------------------------------*/
+int xec_DumpList(FILE* f,const char* fmt,Widget w)
+{
+	ARG_DEF(2);
+	int 	count;
+	XmString *list;
+	int i;
+	int ret = 0;
+
+	SetArg(XmNitems,&list);
+	SetArg(XmNitemCount,&count);
+	GetValues(w);
+
+	for(i=0;i<count;i++)
+	{
+		char *p = (char*)xec_GetString(list[i]);
+		fprintf(f,fmt,p);
+		if(errno) ret = errno;
+		XtFree((XtPointer)p);
+	}
+	return errno = ret;
+}
+/*-----------------------------------------------------*/
+
+/*--------------------------------------------------
+
+	Search the regexp 'word' in the list 'w'.
+	Return TRUE in the text was found.
+	if 'nocase' is TRUE the search is not case sensitive.
+	if 'fromstart' is TRUE the search start from the
+	fisrt char, else from the current position.
+	if 'wrap' is TRUE the search is done all the text.
+
+						---------------------------------------------------*/
+/* Removed by Iain Russell, 2008-12-22
+   because not needed by any code which is used in Metview
+
+Boolean xec_ListSearch(Widget w,char *word,
+	Boolean nocase,Boolean fromstart,Boolean wrap)
+{
+	ARG_DEF(5);
+	int first = 0;
+	int count,sel_count,vis_count;
+	XmString	*items,*sel_items;
+	char        *p;
+	int			from,to,i;
+
+	SetArg(XmNitemCount,&count);
+	SetArg(XmNselectedItemCount,&sel_count);
+	SetArg(XmNitems,&items);
+	SetArg(XmNselectedItems,&sel_items);
+	SetArg(XmNvisibleItemCount,&vis_count);
+	GetValues(w);
+
+
+	if(!fromstart)
+	    if(sel_count)
+	      {
+ 
+#if XmVERSION==1
+		 first = ((XmListWidget)w)->list.selectedIndices[0];
+#else
+                 first = ((XmListWidget)w)->list.selectedPositions[0];
+#endif
+	      }
+
+
+	while(TRUE)
+	{
+		for(i=first;i<count;i++)
+		{
+			p = xec_GetString(items[i]);
+			if(regexp_find(word,p,nocase,&from,&to))
+			{
+				int n = i+1;
+
+				XmListDeselectAllItems(w);
+				XmListSelectPos(w,n,False);
+				if(n<((XmListWidget)w)->list.top_position || 
+				    n > ((XmListWidget)w)->list.top_position + vis_count)
+					XmListSetPos(w,n);
+				XtFree((XtPointer)p);
+				return TRUE;
+
+
+			}
+			XtFree((XtPointer)p);
+		}
+		if(!wrap) break;
+		first = 0;
+		wrap = FALSE;
+	}
+	return FALSE;
+
+}
+*/
+static char *fonts[] = {
+	"normal","bold", };
+
+void xec_AddFontListItem(Widget list,const char *buffer,Boolean bold)
+{
+	XmString s = XmStringCreateLtoR((char*)buffer,fonts[bold]);
+	XmListAddItem(list,s,0);
+	XmStringFree(s);
+
+}
+
diff --git a/src/libMvMotif/xec_Strings.c b/src/libMvMotif/xec_Strings.c
new file mode 100644
index 0000000..84cbace
--- /dev/null
+++ b/src/libMvMotif/xec_Strings.c
@@ -0,0 +1,128 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <string.h>
+
+/*-----------------------------------------------------
+
+	Create a new XmString from a char*
+
+	This function can deal with embedded 'newline' and
+	is equivalent to the obsolete XmStringCreateLtoR,
+	except it does not use non AES compliant charset
+	XmSTRING_DEFAULT_CHARSET
+
+------------------------------------------------------*/
+
+
+XmString xec_NewString(const char* s)
+{
+	XmString xms1;
+	XmString xms2;
+	XmString line;
+	XmString separator;
+	char     *p;
+	char     *t = XtNewString(s);	/* Make a copy for strtok not to */
+                                 	/* damage the original string    */
+
+	separator = XmStringSeparatorCreate();
+	p         = strtok(t,"\n");
+	xms1      = XmStringCreateSimple(p);
+
+	while (p = strtok(NULL,"\n"))
+	{
+		line = XmStringCreateSimple(p);
+		xms2 = XmStringConcat(xms1,separator);
+		XmStringFree(xms1);
+		xms1 = XmStringConcat(xms2,line);
+		XmStringFree(xms2);
+		XmStringFree(line);
+	}
+
+	XmStringFree(separator);
+	XtFree(t);
+	return xms1;
+}
+
+
+/*-----------------------------------------------------
+
+	Build an XmString list from char*
+
+------------------------------------------------------*/
+
+void xec_BuildXmStringList(XmString** list, const char* p, int *count)
+{
+	XmString	*l = *list;
+
+	if(!l) {
+		*count = 0;
+		l = (XmString*)malloc(0);
+	}
+
+	(*count)++;
+	l = (XmString*)XtRealloc((char*) l,sizeof(XmString)*(*count));
+	l[(*count-1)] = xec_NewString(p);
+
+	*list = l;
+}
+
+/*-----------------------------------------------------
+
+	Free an XmString list 
+
+------------------------------------------------------*/
+
+void xec_FreeXmStringList(XmString* list, int count)
+{
+	int i;
+
+	if(list)
+	{
+		for(i=0;i<count;i++) XmStringFree(list[i]);
+		XtFree((XtPointer)list);
+	}
+}
+
+char *xec_GetString(XmString string)
+{
+	XmStringContext  context;
+	char             *text;
+	XmStringCharSet   charset;
+	XmStringDirection dir;
+	Boolean           separator;
+	char             *buf = NULL;
+	int               done = FALSE;
+
+	XmStringInitContext (&context, string);
+	while (!done)
+		if(XmStringGetNextSegment (context, &text, &charset, &dir, &separator))
+		{
+			if(separator) /* Stop when next segment is a separator */
+				done = TRUE;
+
+			if(buf)
+			{
+				buf = XtRealloc(buf, strlen(buf) + strlen(text) + 2);
+				strcat(buf, text);
+			}
+			else
+				buf = XtNewString(text);
+
+			XtFree((XtPointer)charset);
+			XtFree((XtPointer)text);
+		}
+		else
+			done = TRUE;
+
+	XmStringFreeContext (context);
+	return buf;
+
+}
diff --git a/src/libMvMotif/xec_Text.c b/src/libMvMotif/xec_Text.c
new file mode 100644
index 0000000..21b3ecb
--- /dev/null
+++ b/src/libMvMotif/xec_Text.c
@@ -0,0 +1,296 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <errno.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <Xm/Xm.h>
+#include <Xm/Text.h>
+#include <Xm/CutPaste.h>
+#include "xec.h"
+
+
+/* convert to lower case */
+
+/* Removed by Iain Russell, 2008-12-22
+   because not needed by any code which is used in Metview
+static lowcase(char *p)
+{
+	while(*p)
+	{
+		if(*p>='A' && *p<='Z') *p += 32;
+		p++;
+	}
+}
+
+
+int  regexp_find(char *word,char *buffer,Boolean nocase,int *from,int *to)
+{
+	extern char *xec_loc1,*xec_loc2;
+
+	if(nocase) {
+		lowcase(word);
+		lowcase(buffer);
+	};
+	xec_compile(word);
+	if(xec_step(buffer))
+	{
+		*from = xec_loc1-buffer;
+		*to   = xec_loc2-buffer;
+		return TRUE;
+	}
+	return FALSE;
+}
+*/
+
+/*--------------------------------------------------
+---------------------------------------------------*/
+
+
+/*--------------------------------------------------
+
+	Search the regexp 'word' in the text 'w'.
+	Return TRUE in the text was found.
+	if 'nocase' is TRUE the search is not case sensitive.
+	if 'fromstart' is TRUE the search start from the
+	fisrt char, else from the current position.
+	if 'wrap' is TRUE the search is done all the text.
+
+---------------------------------------------------*/
+/* Removed by Iain Russell, 2008-12-22
+   because not needed by any code which is used in Metview
+
+Boolean xec_TextSearch(Widget w,char *word,Boolean nocase,Boolean fromstart,Boolean wrap)
+{
+	char 			*p=XmTextGetString(w);
+	Boolean			success,more;
+	XmTextPosition 	from,to,offset,dummy;
+
+
+	if(fromstart)
+	{
+		offset=0;
+		wrap = FALSE;
+	}
+	else
+	{
+		XmTextGetSelectionPosition(w,&dummy,&offset);
+		if(dummy == offset) offset = XmTextGetInsertionPosition(w);
+
+	}
+
+	do
+	{
+
+		if(success =  regexp_find(word,p+offset,nocase,&from,&to))
+		{
+			XmTextShowPosition(w,to+offset);
+			XmTextSetSelection(w,from+offset,to+offset,CurrentTime);
+		}
+
+		more = wrap && !success;
+
+		if(wrap)
+		{
+			wrap = FALSE;
+			offset = 0;
+		}
+
+	}while(more);
+
+	XtFree((XtPointer)p);
+
+	return success;
+
+}
+*/
+
+
+/*-------------------------------------------------
+
+	Copy the content of a Text in a buffer.
+
+--------------------------------------------------*/
+
+char *xec_GetText(Widget w,char *buf)
+{
+	char *q = (char*)XmTextGetString(w);
+
+	strcpy(buf,q);
+	XtFree((XtPointer)q);
+
+	return buf;
+}
+
+
+/*-------------------------------------------------
+
+	Load a file into a text widget.
+	if include is TRUE the text if included.
+
+--------------------------------------------------*/
+
+int xec_LoadText(Widget Text,const char *fname,Boolean include)
+{
+	FILE    *fp = NULL;
+	char    *p;
+	long    length;
+	int 	ret = 0;
+
+	errno = 0;
+
+	if (!fname) return -1;
+
+	if (fp = fopen(fname,"r"))
+	{
+		fseek(fp,0L,2);
+		if (errno)
+		{
+			ret = errno;
+			fclose(fp);
+			return errno = ret;
+		}
+
+		length=ftell(fp);
+		if (errno)
+		{
+			ret = errno;
+			fclose(fp);
+			return errno = ret;
+		}
+
+		fseek(fp,0L,0);
+		if (errno)
+		{
+			ret = errno;
+			fclose(fp);
+			return errno = ret;
+		}
+
+		p = (char*)XtMalloc(length+1);
+		p[length] = 0;
+
+		fread(p,length,1,fp);
+		if (errno)
+		{
+			ret = errno;
+			fclose(fp);
+			return errno = ret;
+		}
+
+		_XmTextDisableRedisplay(Text,TRUE);
+		if (include)
+			xec_ReplaceTextSelection(Text,p,FALSE);
+		else
+		{
+			XmTextSetInsertionPosition(Text,0);
+			XmTextSetSelection(Text,0,0,CurrentTime);
+			XmTextSetString(Text,p);
+		}
+		_XmTextEnableRedisplay(Text);
+
+		free(p);
+		fclose(fp);
+	} 
+	else 
+	{
+		ret = errno;
+		if (!include) XmTextSetString(Text,"");
+	}
+	return errno = ret;
+
+}
+
+/*-------------------------------------------------
+
+	Save a text into a file
+
+--------------------------------------------------*/
+
+/* Open file, save text and close file */
+
+int xec_SaveText(Widget w,const char *fname)
+{
+	FILE    *fp = NULL;
+	char    *p = XmTextGetString(w);
+	long    length = strlen(p);
+	int 	ret;
+
+	errno = 0;
+
+	if (!fname) return -1;
+
+	if (fp = fopen(fname,"w"))
+		if (fwrite(p,strlen(p),1,fp)) fclose(fp);
+
+	ret = errno;
+	free(p);
+	return errno = ret;
+}
+
+
+/* File is already opened: just save text */
+
+int xec_DumpText(FILE *fp,Widget w)
+{
+	char    *p = XmTextGetString(w);
+	long    length = strlen(p);
+
+	errno = 0;
+	fwrite(p,strlen(p),1,fp);
+	XtFree((XtPointer)p);
+	return errno;
+}
+
+
+/*-------------------------------------------------
+
+	Print a text
+
+--------------------------------------------------*/
+
+void xec_PrintText(Widget w,const char *cmd)
+{
+	char    *tmp = tmpnam(NULL);
+	char	buf[1024];
+
+	xec_SaveText(w,tmp);
+	if(cmd)
+		sprintf(buf,"%s %s",cmd,tmp);
+	else
+		sprintf(buf,"lpr %s",tmp);
+
+	system(buf);
+	unlink(tmp);
+
+
+}
+
+/*-------------------------------------------------
+
+	Replace the selection by a char*
+	If sel the inserted text is selected
+
+--------------------------------------------------*/
+
+void xec_ReplaceTextSelection(Widget w,const char *p,Boolean sel)
+{
+	XmTextPosition	from,to;
+
+	XmTextGetSelectionPosition(w,&from,&to);
+	if(from == to) from = to = XmTextGetInsertionPosition(w);
+	XmTextReplace(w,from,to,p);
+	if(sel)
+		XmTextSetSelection(w,from,from+strlen(p),CurrentTime);
+	else
+		XmTextSetSelection(w,from+strlen(p),from+strlen(p),CurrentTime);
+	XmTextSetInsertionPosition(w,from+strlen(p));
+}
+
diff --git a/src/libMvMotif/xec_Widget.c b/src/libMvMotif/xec_Widget.c
new file mode 100644
index 0000000..e334e06
--- /dev/null
+++ b/src/libMvMotif/xec_Widget.c
@@ -0,0 +1,216 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Xm/Xm.h>
+#include <Xm/ScrolledW.h>
+#include <X11/IntrinsicP.h>
+#include "xec.h"
+
+void *xec_GetUserData(Widget w)
+{
+	char	*p;
+	ARG_DEF(1);
+
+	SetArg(XmNuserData,&p);
+	GetValues(w);
+
+	return (void*)p;
+}
+
+/*-------------------------------------------------
+
+	Attach a pointer to a widget
+
+-------------------------------------------------*/
+
+void xec_SetUserData(Widget w, void* p)
+{
+	ARG_DEF(1);
+
+	SetArg(XmNuserData,p);
+	SetValues(w);
+
+}
+
+/*-------------------------------------------------
+
+	Sets a color
+
+--------------------------------------------------*/
+
+
+void xec_SetColor(Widget w, Pixel p, const char* which)
+{
+	ARG_DEF(1);
+
+	SetArg(which,p);
+	SetValues(w);
+
+}
+
+/*-------------------------------------------------
+
+	Scroll a window to make a widget visible
+
+--------------------------------------------------*/
+
+
+void xec_ShowWidget(Widget w)
+{
+	ARG_DEF(5);
+
+	Widget v_scroll,h_scroll;
+
+
+	Position 	x_parent,y_parent;
+	Position 	x_widget,y_widget;
+	Dimension 	h_widget,w_widget;
+	Position 	x_clip,y_clip;
+	Dimension 	h_clip,w_clip;
+	Position 	dv=0,dh=0;
+	int min,max;
+	int	v_val,v_size,v_inc,v_page;
+	int	h_val,h_size,h_inc,h_page;
+	Widget clip;
+	Widget parent;
+	Widget scroll_window;
+
+	Position x,y;
+
+
+	if(!XtIsManaged(w)) return;
+
+	if(!(parent          = XtParent(w)))      return;
+	if(!(clip   		 = XtParent(parent))) return;
+	if(!(scroll_window   = XtParent(clip)))   return;
+
+	if(!XmIsScrolledWindow(scroll_window)) return;
+
+	SetArg(XmNhorizontalScrollBar, &h_scroll );
+	SetArg(XmNverticalScrollBar, &v_scroll );
+	GetValues(scroll_window);
+
+
+	SetArg(XmNx,&x_parent);
+	SetArg(XmNy,&y_parent);
+	GetValues(parent);
+
+
+	SetArg(XmNheight,&h_widget);
+	SetArg(XmNwidth,&w_widget);
+	GetValues(w);
+
+
+	SetArg(XmNclipWindow,&clip);
+	GetValues(scroll_window);
+
+	SetArg(XmNheight,&h_clip);
+	SetArg(XmNwidth,&w_clip);
+	GetValues(clip);
+
+
+	XtTranslateCoords(w,0,0,	&x_widget,&y_widget);
+	XtTranslateCoords(clip,0,0,&x_clip,&y_clip);
+
+
+	x = x_widget - x_clip;
+	y = y_widget - y_clip;
+
+
+	if( y < 0 || (Dimension) (y + h_widget) > h_clip)
+	{
+		dv = (y + h_widget / 2)  - h_clip / 2;
+
+		SetArg(XmNminimum,&min);
+		SetArg(XmNmaximum,&max);
+		GetValues(v_scroll);
+
+		XmScrollBarGetValues(v_scroll,&v_val,&v_size,&v_inc,&v_page);
+
+		max -= v_size;
+
+		if( dv + v_val > max ) dv = max - v_val;
+		if( dv + v_val < min ) dv = min - v_val;
+
+
+	}
+
+	if( x < 0 || (Dimension) (x + w_widget) > w_clip)
+	{
+		dh = (x + w_widget / 2)  - w_clip / 2;
+
+		SetArg(XmNminimum,&min);
+		SetArg(XmNmaximum,&max);
+		GetValues(h_scroll);
+
+		XmScrollBarGetValues(h_scroll,&h_val,&h_size,&h_inc,&h_page);
+
+		max -= h_size;
+
+		if( dh + h_val > max ) dh = max - h_val;
+		if( dh + h_val < min ) dh = min - h_val;
+
+	}
+
+
+	if(dv || dh)
+	{
+		Position x = x_parent-dh;
+		Position y = y_parent-dv;
+
+		SetArg(XmNx,x);
+		SetArg(XmNy,y);
+		SetValues(parent);
+
+		/*
+		XtMoveWidget(parent,x_parent-dh,y_parent-dv);
+		*/
+
+		if(dv) XmScrollBarSetValues(v_scroll,v_val+dv,v_size,v_inc,v_page,TRUE);
+		if(dh) XmScrollBarSetValues(h_scroll,h_val+dh,h_size,h_inc,h_page,TRUE);
+
+
+		/* force redraw */
+		/*
+
+		XtUnmanageChild(parent);
+		XtManageChild(parent);
+		*/
+	}
+
+
+}
+
+void xec_Invert(Widget w)
+{
+	ARG_DEF(2);
+	Pixel fg,bg;
+
+	SetArg(XmNbackground,&bg);
+	SetArg(XmNforeground,&fg);
+	GetValues(w);
+
+	SetArg(XmNbackground,fg);
+	SetArg(XmNforeground,bg);
+	SetValues(w);
+}
+
+void xec_ManageAll(Widget w)
+{
+	CompositeWidget c = (CompositeWidget)w;
+	XtManageChildren(c->composite.children,
+	    c->composite.num_children);
+}
+void xec_UnmanageAll(Widget w)
+{
+	CompositeWidget c = (CompositeWidget)w;
+	XtUnmanageChildren(c->composite.children,
+	    c->composite.num_children);
+}
+
diff --git a/src/libMvNetCDF/Makefile.am b/src/libMvNetCDF/Makefile.am
new file mode 100644
index 0000000..f0132c7
--- /dev/null
+++ b/src/libMvNetCDF/Makefile.am
@@ -0,0 +1,12 @@
+ 
+ 
+noinst_LIBRARIES = lib/libMvNetCDF.a
+
+lib_libMvNetCDF_a_SOURCES = MvNetCDF.cc MvNetCDF.h
+
+
+
+BUILT_SOURCES = lib
+
+lib:
+	ln -s ../../lib lib
diff --git a/src/libMvNetCDF/Makefile.in b/src/libMvNetCDF/Makefile.in
new file mode 100644
index 0000000..eec53c9
--- /dev/null
+++ b/src/libMvNetCDF/Makefile.in
@@ -0,0 +1,604 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/libMvNetCDF
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libMvNetCDF_a_AR = $(AR) $(ARFLAGS)
+lib_libMvNetCDF_a_LIBADD =
+am_lib_libMvNetCDF_a_OBJECTS = MvNetCDF.$(OBJEXT)
+lib_libMvNetCDF_a_OBJECTS = $(am_lib_libMvNetCDF_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libMvNetCDF_a_SOURCES)
+DIST_SOURCES = $(lib_libMvNetCDF_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = lib/libMvNetCDF.a
+lib_libMvNetCDF_a_SOURCES = MvNetCDF.cc MvNetCDF.h
+BUILT_SOURCES = lib
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libMvNetCDF/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libMvNetCDF/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libMvNetCDF.a: $(lib_libMvNetCDF_a_OBJECTS) $(lib_libMvNetCDF_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libMvNetCDF.a
+	$(AM_V_AR)$(lib_libMvNetCDF_a_AR) lib/libMvNetCDF.a $(lib_libMvNetCDF_a_OBJECTS) $(lib_libMvNetCDF_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libMvNetCDF.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MvNetCDF.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+lib:
+	ln -s ../../lib lib
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libMvNetCDF/MvNetCDF.cc b/src/libMvNetCDF/MvNetCDF.cc
new file mode 100644
index 0000000..031099d
--- /dev/null
+++ b/src/libMvNetCDF/MvNetCDF.cc
@@ -0,0 +1,814 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvNetCDF.h"
+
+// Static member, contains the currently open NetCDF files.
+CountMap MvNetCDF::countMap_;
+
+////////////////////// MvNcAtt ///////////////////////
+MvNcAtt::MvNcAtt(NcAtt *ncAtt) : ncAtt_(ncAtt)
+{
+  if ( ncAtt_ ) values_ = new MvNcValues(ncAtt_->values());
+  else values_ = NULL;
+}
+
+MvNcAtt::MvNcAtt(const MvNcAtt& aa)
+{
+  ncAtt_ = aa.ncAtt_; 
+  values_ = aa.values_;
+}
+
+// Return a string with the values separated by '/'.
+NcBool MvNcAtt::getValues(string & str )
+{
+  if ( ! isValid() ) return false;
+  double tmpval;
+  str = "";
+  if (type() == ncChar ) 
+    str = as_string(0);
+  else 
+    {
+      for ( int j = 0; j < getNumberOfValues();j++ )
+	{
+	  if ( j > 0 ) str += "/";
+	  tmpval = as_double(j);
+	  printValue(str,tmpval);
+	}
+    }
+  return true;
+}
+
+
+
+// the purpose of this function is to over-ride the base function when dealing with
+// floating-point numbers because the in-built netCDF as_string function chops off
+// any significant figures after about 10^6.
+
+char* MvNcAtt::as_string(long n)
+{
+    switch (type())
+    {
+        case NC_FLOAT:
+        {
+            char *outstring = new char[64]; 
+            sprintf(outstring, "%f", values()->as_float(n));
+            return outstring;
+        }
+        case NC_DOUBLE:
+        {
+            char *outstring = new char[64]; 
+            sprintf(outstring, "%f", values()->as_double(n));
+            return outstring;
+        }
+    
+        default:
+        {
+            return MvNcBase::as_string(n);
+        }
+    }
+}
+
+
+// Format attribute values in a sensible way
+void MvNcAtt::printValue(string &str, double value)
+{
+  unsigned char uc;
+  short ss;
+  int ii;
+  char buf[50];
+  float ff;
+  double dd;
+
+  switch ( type() ) 
+    {
+    case NC_BYTE:
+      uc = (unsigned char) value & 0377;
+      if (isprint(uc))
+	sprintf (buf,"'%c'", uc);
+      else
+	sprintf(buf,"'\\%o'", uc);
+      break;
+    case NC_SHORT:
+      ss = (short)value;
+      sprintf(buf,"%ds", ss);
+      break;
+    case NC_INT:
+      ii = (int) value;
+      sprintf (buf,"%d", ii);
+      break;
+    case NC_FLOAT:
+      ff = value;
+      sprintf(buf,"%#.7gf", ff);
+      tztrim(buf);	// trim trailing 0's after '.'
+      break;
+    case NC_DOUBLE:
+      dd = value;
+      sprintf(buf,"%#.15g", dd);
+      tztrim(buf);
+      break;
+    default:
+      cerr << "Invalid type !!" << endl;
+    }
+
+  str += buf;
+}
+
+/*
+ * Remove trailing zeros (after decimal point) but not trailing decimal
+ * point from ss, a string representation of a floating-point number that
+ * might include an exponent part.
+ */
+void MvNcAtt::tztrim(char *ss)
+{
+  char *cp, *ep;
+    
+  cp = ss;
+  if (*cp == '-')
+    cp++;
+  while(isdigit((int)*cp) || *cp == '.')
+    cp++;
+  if (*--cp == '.')
+    return;
+  ep = cp+1;
+  while (*cp == '0')
+    cp--;
+  cp++;
+  if (cp == ep)
+    return;
+  while (*ep)
+    *cp++ = *ep++;
+  *cp = '\0';
+  return;
+}
+
+MvNcAtt::~MvNcAtt() 
+{
+  //cout << "In attribute destructor  " << name() << endl;
+ delete ncAtt_; delete values_; 
+}
+
+
+////////////////////////////// MvNcVar //////////////////////////////
+MvNcVar::MvNcVar(NcVar *ncvar,int is_global): 
+  edges_(NULL),ncVar_(ncvar),values_(NULL), isGlobal_(is_global)
+{ 
+  fillAttributes(); 
+}
+
+MvNcVar::MvNcVar(const MvNcVar & aa) 
+{
+  ncVar_ = aa.ncVar_;
+  attributes_ = aa.attributes_;
+  values_ = aa.values_;
+  isGlobal_ = aa.isGlobal_;
+}
+
+MvNcVar::~MvNcVar()
+{
+  //cout << "In var destructor " << ncVar_->name() << endl;
+  vector<MvNcAtt*>::iterator ii;
+  for (ii = attributes_.begin(); ii != attributes_.end(); ii++)
+    delete (*ii);
+
+  if ( values_ ) delete values_;
+  if ( edges_ ) delete [] edges_;
+}
+
+void MvNcVar::fillAttributes()
+{
+  if ( !isValid() ) return;
+  
+  for (int i = 0; i < getNumberOfAttributes(); i++)
+    {
+      MvNcAtt *tmpatt = new MvNcAtt(ncVar_->get_att(i) );
+      attributes_.push_back(tmpatt);
+    }
+}
+
+MvNcAtt* MvNcVar::getAttribute(const string& name)
+{
+  if ( !isValid() ) return NULL;
+
+  for (unsigned int i = 0;i < attributes_.size();i++ )
+    if ( ! strcmp(name.c_str(),attributes_[i]->name()) )
+      return attributes_[i];
+
+  return NULL;
+}
+
+MvNcAtt* MvNcVar::getAttribute(unsigned int index)
+{
+  if ( !isValid() ) return NULL;
+
+  if ( index <= (attributes_.size() - 1) )
+    return attributes_[index];
+  else
+    return NULL;
+}
+
+bool MvNcVar::getAttributeValues(MvNcAtt* att, vector<string>& vec)
+{
+  // Wipe out the vector
+  vec.erase(vec.begin(),vec.end());
+  for ( int i = 0; i < att->getNumberOfValues(); i++ )
+    {
+      vec.push_back(att->as_string(i));
+    }
+
+  return att->getNumberOfValues() > 0;
+}
+
+bool MvNcVar::getAttributeValues(MvNcAtt* att, vector<double>& vec)
+{
+  // Wipe out the vector
+  vec.erase(vec.begin(),vec.end());
+  for ( int i = 0; i < att->getNumberOfValues(); i++ )
+    {
+      vec.push_back(att->as_double(i));
+    }
+
+  return att->getNumberOfValues() > 0;
+}
+bool MvNcVar::getAttributeValues(MvNcAtt* att, vector<long>& vec)
+{
+  // Wipe out the vector
+  vec.erase(vec.begin(),vec.end());
+  for ( int i = 0; i < att->getNumberOfValues(); i++ )
+    {
+      vec.push_back(att->as_long(i));
+    }
+
+  return att->getNumberOfValues() > 0;
+}
+
+NcBool MvNcVar::addAttribute(MvNcAtt *att)
+{ 
+  if ( !isValid() ) return false;
+
+  if ( attributeExists(att->name() ) )
+    {
+      cout << "Attribute already exists, not adding " << endl;
+      return 1;
+    }
+  
+  NcBool ret_code = false;
+  NcType type = att->type();
+
+  if ( type == ncByte || type == ncChar ) 
+    {
+      const char *vals = (const char *) att->values()->base();
+      ret_code =  addAttribute(att->name(),att->values()->getNumberOfValues(),
+			       vals);
+    }
+  else if ( type == ncShort ) 
+    {
+      const short *vals = (const short *) att->values()->base();
+      ret_code =  addAttribute(att->name(),att->values()->getNumberOfValues(),
+			       vals);
+    }
+  else if ( type == ncLong ) 
+    {
+      const nclong *vals = (const nclong *) att->values()->base();
+      ret_code =  addAttribute(att->name(),att->values()->getNumberOfValues(),
+			       vals);
+    }
+  else if ( type == ncFloat ) 
+    {
+      const float *vals = (const float *) att->values()->base();
+      ret_code =  addAttribute(att->name(),att->values()->getNumberOfValues(),
+			  vals);
+    }
+  else if ( type == ncDouble ) 
+    {
+      const double *vals = (const double *) att->values()->base();
+      ret_code =  addAttribute(att->name(),att->values()->getNumberOfValues(),
+			  vals);
+    }
+
+  return ret_code;
+}
+
+NcBool MvNcVar::put(MvNcVar *var)
+{
+  if ( !isValid() || !var->isValid() ) return false;
+
+  NcBool ret_code = false;
+  NcType type = var->type();
+  const long *edges = var->edges();
+  void *base = var->values()->base();
+
+  if ( type == ncByte || type == ncChar ) 
+    ret_code = put((const char *)base, edges);
+  else if ( type == ncShort ) 
+    ret_code = put((const short *)base, edges);
+  else if ( type == ncLong ) 
+    ret_code = put((const nclong *)base, edges);
+  else if ( type == ncFloat ) 
+    ret_code = put((const float *)base, edges);
+  else if ( type == ncDouble ) 
+    ret_code = put((const double *)base, edges);
+
+  return ret_code;
+}
+
+
+// Now in header file
+#if 0
+template <class T> 
+NcBool MvNcVar::get(vector<T>& vals, const long *counts)
+{
+  if ( !isValid() ) return false;
+
+  NcBool ret_val;
+  int i;
+  int num_values = 1;
+  
+  vals.erase(vals.begin(),vals.end());
+
+  if ( getNumberOfDimensions() >  0 )
+    {
+      for (i=0;i < getNumberOfDimensions();i++)
+	num_values *= counts[i];
+      
+      T *ptr = new T[num_values];
+      
+      ret_val = ncVar_->get(ptr,counts);
+      if ( ret_val )
+	for (i=0;i < num_values;i++)
+	  vals.push_back(ptr[i]);
+      
+      delete [] ptr;
+    }
+  else 
+    {  // Scalar
+      T *scalarval = (T*)values()->base();
+      if ( scalarval )
+	vals.push_back(scalarval[0]);
+    }
+  return ret_val;
+}
+#endif
+
+// Specialize template for Cached. It's convenient to use a vector of
+// Cached when retrieving string variables, but it most be treated
+// differently than the primitive types.
+template <> 
+NcBool MvNcVar::get(vector<Cached>& vals, const long *counts, long nvals)
+{
+	if ( !isValid() ) return false;
+
+	NcBool ret_val;
+	int i;
+	int num_values = 1;
+
+	vals.erase(vals.begin(),vals.end());
+
+	// This is the length of the variable strings.
+	if ( getNumberOfDimensions() > 0 )
+	{
+		long last_dim = counts[getNumberOfDimensions() - 1];
+		for (i=0; i < getNumberOfDimensions(); i++)
+			num_values *= counts[i];
+
+		// Allocate char array to hold all the values.
+		char *ptr = new char[num_values];
+
+		// Allocate space to hold one string. NetCDF does not
+		// nullterminate strings, so the 0 should be added.
+		char *one_str = new char[last_dim + 1];
+
+		ret_val = ncVar_->get(ptr,counts);
+
+		if ( ret_val )
+		{
+			int num_values1;
+			int nelems = (num_values/last_dim);
+			vals.resize(nelems);
+			if ( nvals > 0 && nvals < nelems )
+				num_values1 = nvals * last_dim;
+			else
+				num_values1 = num_values;
+
+			i = 0;
+			int j = 0;
+			while (i < num_values1)
+			{
+				strncpy(one_str,&ptr[i],last_dim);
+				one_str[last_dim] = 0;
+				vals[j] = one_str;
+				i += last_dim;
+				++j;
+			}
+		}
+
+		// Delete temporaries
+		delete [] ptr;
+		delete [] one_str;
+	}
+	else
+	{
+		char *scalarval = (char*)values()->base();
+		if ( scalarval)
+		{
+			char xxx[2];
+			sprintf(xxx,"%1c",scalarval[0]); xxx[1] = '\0';
+			if ( scalarval )
+				vals.push_back(Cached(xxx));
+		}
+	}
+
+	return ret_val;
+}
+
+// Now in header file
+#if 0 
+template <class T> 
+NcBool MvNcVar::get(vector<T>& vals, long c0, long c1,
+		    long c2, long c3, long c4 ) 
+{
+  long counts[5];
+  counts[0] = c0; counts[1] = c1;counts[2] = c2;
+  counts[3] = c3; counts[4] = c4;
+  
+  return get(vals,counts);
+}
+#endif
+
+NcBool MvNcVar::attributeExists(const string& name)
+{
+  if ( !isValid() ) return false;
+
+  for (unsigned int i = 0; i < attributes_.size();i++)
+    {
+      if ( !strcmp(name.c_str(),attributes_[i]->name()) )
+	return TRUE;
+    }
+  return FALSE;
+}
+
+void MvNcVar::getStringType(string& strtype)
+{
+  if ( type() == ncByte )
+    strtype = "ncbyte ( unsigned char)";
+  else if ( type() == ncChar )
+    strtype = "char";
+  else if ( type() == ncShort )
+    strtype = "short";
+  else if ( type() == ncLong )
+    strtype = "nclong ( int )";
+  else if ( type() == ncFloat  )
+    strtype = "float";
+  else if ( type() == ncDouble )
+    strtype = "double";
+}
+////////////////////// End MvNcVar ///////////////////
+
+
+////////////////////////////////////  MVNetCDF //////////////////
+
+// Empty constructor
+MvNetCDF::MvNetCDF() : ncFile_(NULL) {}
+
+// Construct from a path and opening mode ( mode 'r' by default.
+MvNetCDF::MvNetCDF(const string& path,const char mode) : ncFile_(NULL)
+{
+  init(path,mode);
+}
+
+// Construct from request.
+MvNetCDF::MvNetCDF(const MvRequest &r, const char mode ) : ncFile_(NULL)
+{
+  // Get the PATH from request.
+  const char *path = get_value(r,"PATH",0);
+
+  init(path,mode);
+}
+
+// Function to initialize MvNetCDF.
+void MvNetCDF::init(const string& path,const char mode)
+{
+  NcFile::FileMode fmode =NcFile::ReadOnly;
+  if ( mode ==  'w' ) fmode = NcFile::Replace;
+  else if ( mode == 'u' ) fmode = NcFile::Write;
+  ncFile_ = new MvNcFile(path,fmode);
+
+  if ( !isValid() ) 
+    return;
+  path_ = path;
+  countMap_[path_]++;
+
+  fillVariables();
+}
+
+// Destructor, just deletes it's NcFile pointer if it's the last instance
+// that has this file open.
+MvNetCDF::~MvNetCDF()
+{
+  if ( !isValid() ) return;
+
+  if ( --countMap_[path_] == 0 )
+    {
+      vector<MvNcVar *>::iterator ii;
+      
+      for ( ii = variables_.begin(); ii != variables_.end();ii++)
+	delete (*ii);
+      
+      delete globalVar_;
+
+      delete ncFile_;
+
+    }
+  else 
+    cout << " Count " << countMap_[path_] << " not deleting" << endl;
+}
+
+MvNcVar* MvNetCDF::addVariable(const string &name,NcType type, int size,
+			       const NcDim **dim)
+{
+  if ( variableExists(name) )
+    {
+      cout << "Variable already exists, returning existing: " << name.c_str() <<  endl;
+      return getVariable(name);
+    }
+
+  MvNcVar *tmpvar = new MvNcVar(ncFile_->add_var(name.c_str(),type,size,dim));
+  variables_.push_back(tmpvar);
+  return tmpvar;
+}
+
+// Convenience function, add a variable by given name,type and dimension(s).
+MvNcVar* MvNetCDF::addVariable(const string &name,NcType type, long dimsize0,
+			       long dimsize1,long dimsize2,
+			       long dimsize3,long dimsize4)
+{  
+  if ( !isValid() ) return NULL;
+
+  if ( variableExists(name) )
+    {
+      cout << "Variable already exists, returning existing: " << name.c_str() << endl;
+      return getVariable(name);
+    }
+
+  
+  NcDim *dim[5];
+  int number = 0;
+  char dim_name[100];
+
+  if ( dimsize0 > 0 )
+    {
+      sprintf(dim_name,"%s_%d",name.c_str() ,number+1);
+      dim[number++] =  addDimension(dim_name,dimsize0);
+    }
+  if ( dimsize1 > 0 )
+    {
+      sprintf(dim_name,"%s_%d",name.c_str(),number+1);
+      dim[number++] =  addDimension(dim_name,dimsize1);
+    }
+  if ( dimsize2 > 0 )
+    {
+      sprintf(dim_name,"%s_%d",name.c_str(),number+1);
+      dim[number++] =  addDimension(dim_name,dimsize2);
+    }
+ if ( dimsize3 > 0 )
+    {
+      sprintf(dim_name,"%s_%d",name.c_str(),number+1);
+      dim[number++] =  addDimension(dim_name,dimsize3);
+    }
+  if ( dimsize4 > 0 )
+    {
+      sprintf(dim_name,"%s_%d",name.c_str(),number+1);
+      dim[number++] =  addDimension(dim_name,dimsize4);
+    }
+
+  return addVariable(name,type,number,(const NcDim**)dim);
+}
+
+// Convenience function, add a variable by given name,type, dimension(s)
+// and dimension(s)'s names
+MvNcVar* MvNetCDF::addVariable(const string &name,NcType type,
+			       vector<long>& dimsize, vector<string>& vname)
+{  
+  if ( !isValid() ) return NULL;
+
+  if ( variableExists(name) )
+    {
+      cout << "Variable already exists, returning existing: " << name.c_str() << endl;
+      return getVariable(name);
+    }
+
+  NcDim *dim[5];
+  int num;
+
+  // Add dimensions
+  for (num = 0; num < dimsize.size(); num++)
+      dim[num] =  addDimension(vname[num].c_str(),dimsize[num]);
+
+  return addVariable(name,type,num,(const NcDim**)dim);
+}
+
+// Get variable by name.
+MvNcVar *MvNetCDF::getVariable(const string& name)
+{
+  if ( !isValid() ) return NULL;
+
+  for (unsigned int i = 0; i < variables_.size();i++)
+    if ( ! strcmp(name.c_str(),variables_[i]->name()) )
+      return variables_[i];
+  
+  return NULL;
+}
+
+// Convenience function. Get a variable's type by giving the name.
+NcType MvNetCDF::getTypeForVariable(const string& name)
+{
+  if ( !isValid() ) return (NcType)0;;
+
+  MvNcVar *var = getVariable(name);
+  if ( !var ) return (NcType)0;
+
+  return var->type();
+}
+void MvNetCDF::getStringTypeForVariable(const string& name, string &strtype)
+{
+  if ( !isValid() ) return;
+
+  MvNcVar *var = getVariable(name);
+  if ( var )
+    var->getStringType(strtype);
+}
+
+// Read the values in the NetCDF file and fill in a request
+// Global attributes are given filled in "NETCDF" request, dimensions
+// are given in a "DIMENSIONS" subrequest and variables are given
+// in a "VARIABLES" subrequest. Separate variables also are given
+// in subrequests of "VARIABLES", with separate fields for the variable's
+// dimensions and attributes.
+MvRequest MvNetCDF::getRequest()
+{
+  if ( !isValid() ) 
+    return MvRequest(NULL,false);
+
+  MvRequest r("NETCDF");
+
+  // Get the variables.
+
+  r.setValue("PATH",path_.c_str());
+
+
+  // Subrequest, contains info about dimensions.
+  MvRequest dim("DIMENSIONS");
+  reqGetDimensions(dim);
+
+  // Subrequest, contains info about variables.
+  MvRequest var("VARIABLES");
+  reqGetVariables(var);
+
+  // Global attributes are added straight to the request, not in
+  // subrequest.
+  reqGetAttributes(r);
+
+  // Add the subrequests.
+  r.setValue("DIMENSIONS",dim);
+  r.setValue("VARIABLES",var);
+
+  // Construct a new and return it.
+  return MvRequest(r);
+}
+// Get all dimensions from file and fill into given request.
+void MvNetCDF::reqGetDimensions(MvRequest &r)
+{
+  if ( !isValid() ) return;
+  NcDim *tmpdim;
+  for (int i = 0; i < ncFile_->num_dims();i++)
+    {
+      tmpdim = ncFile_->get_dim(i);
+      r.setValue(tmpdim->name(),tmpdim->size());
+    }   
+}
+
+// Fill in all the variables for a NetCDF file.
+void MvNetCDF::fillVariables()
+{ 
+  if ( !isValid() ) return;
+  
+  int i;
+  for (i = 0; i < ncFile_->num_vars(); i++)
+    {
+      NcVar* nctmp = ncFile_->get_var(i);
+      MvNcVar *tmpvar = new MvNcVar(nctmp);
+      variables_.push_back(tmpvar);
+    }
+
+  globalVar_ = new MvNcVar(ncFile_->globalVariable(),1);
+}
+
+
+// Get the variables and fill in given request.
+void MvNetCDF::reqGetVariables(MvRequest &r)
+{
+  if ( !isValid() ) return;
+
+  int num_dim,num_attr;
+  int j,k;
+  MvNcVar *tmpvar;
+  MvNcAtt *tmpatt;
+  NcDim *tmpdim;
+
+  for (unsigned int i = 0; i < variables_.size(); i++)
+    {
+      tmpvar = variables_[i];
+      num_dim = tmpvar->getNumberOfDimensions();
+      num_attr = tmpvar->getNumberOfAttributes();
+
+      // For each variable, add subrequest with dimensions and 
+      // attributes.
+      MvRequest var_req(tmpvar->name());
+
+      for (j = 0; j < num_dim; j++ )
+	{
+	  tmpdim = tmpvar->getDimension(j);
+	  var_req.addValue("DIMENSIONS",tmpdim->size());
+	}
+
+      // Add any attributes to subrequest.
+      if ( num_attr > 0 )
+	{
+	  for ( j = 0; j < num_attr; j++ )
+	    {
+	      tmpatt = tmpvar->getAttribute(j); 
+	      
+	      if (tmpatt->type() == ncChar ) 
+		var_req.addValue(tmpatt->name(),tmpatt->as_string(0));
+	      else
+		for ( k = 0; k < tmpatt->getNumberOfValues();k++ )
+		  var_req.addValue(tmpatt->name(),tmpatt->as_string(k));
+	    }
+	}
+      // Add subrequest for variable to given request.
+      r.setValue(tmpvar->name(),var_req);
+    }
+}
+
+// Fill global attributes into request
+void MvNetCDF::reqGetAttributes(MvRequest &r)
+{
+  if ( !isValid() ) return;
+  
+  int i,j;
+  const char *req_name;
+  for ( i = 0; i < getNumberOfAttributes(); i++ )
+    {
+      MvNcAtt* tmpatt = getAttribute(i); 
+
+      req_name = (const char *)tmpatt->name();
+
+      if (tmpatt->type() == ncChar ) 
+	r.addValue(req_name,tmpatt->as_string(0));
+      else 
+	for ( j = 0; j < tmpatt->getNumberOfValues();j++ )
+	  r.addValue(req_name,tmpatt->as_string(j));
+    }
+}
+
+NcBool MvNetCDF::variableExists(const string& name)
+{
+  if ( !isValid() ) return false;
+
+  for (unsigned int i = 0; i < variables_.size();i++)
+    {
+      if ( ! strcmp(name.c_str(),variables_[i]->name() ) )
+	return 1;
+    }
+  return 0;
+}
+
+NcDim* MvNetCDF::addDimension(const string &name,long size )
+{
+  // Dimension already exists?
+  if ( dimensionExists(name) )
+	return getDimension(name);
+
+  return ncFile_->add_dim(name.c_str(),size);
+}
+
+NcBool MvNetCDF::dimensionExists(const string& name)
+{
+  if ( !isValid() ) return false;
+
+  for (int i = 0; i < getNumberOfDimensions(); i++)
+  {
+      if ( ! strcmp(name.c_str(),getDimension(i)->name()) )
+	return 1;
+  }
+
+  return 0;
+}
+
+////////////////////////////// End MvNetCDF functions. //////////////
diff --git a/src/libMvNetCDF/MvNetCDF.h b/src/libMvNetCDF/MvNetCDF.h
new file mode 100644
index 0000000..974fb36
--- /dev/null
+++ b/src/libMvNetCDF/MvNetCDF.h
@@ -0,0 +1,479 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/* -*- C++ -*-
+   Metview class interface to NetCDF.
+*/
+
+#ifndef MV_NETCDF_H
+#define MV_NETCDF_H
+
+#include <stdio.h>
+#include <ctype.h>
+
+#include <string.h>
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+#ifdef AIX
+/* There is a name clash with xlc own include files */
+#undef name2
+#undef implement
+#undef declare
+#endif
+
+#include "netcdf.hh"
+#include "Metview.h"
+
+enum { D_ISNUMBER = 1, D_ISSTRING = 2, D_ISANY = 3 };
+enum { CDF_FILL = NcFile::Fill,CDF_NOFILL = NcFile::NoFill};
+
+typedef map <string, int > CountMap;
+
+// Wrapper for NcFile.
+// Only done to get global "variable" for the global attributes.
+// This is a protected member of NcFile.
+class MvNcFile : public NcFile
+{
+public:
+  MvNcFile(const string &path,FileMode xx = ReadOnly) : 
+    NcFile(path.c_str(),xx) {}
+  virtual ~MvNcFile() {}
+  NcVar *globalVariable() { return globalv; }
+};
+
+
+//Wrapper for NcValues
+class MvNcValues
+{
+public:
+  void *base() { return ncValues_->base(); }
+  int getNumberOfValues() { return ncValues_->num(); }
+  char as_char( long n ) const   { return  ncValues_->as_char(n); }
+  short as_short( long n ) const { return  ncValues_->as_short(n); }
+  long as_long( long n ) const    { return  ncValues_->as_long(n); }
+  float as_float( long n ) const  { return  ncValues_->as_float(n); }
+  double as_double( long n ) const{ return  ncValues_->as_double(n); }
+  char* as_string( long n ) const { return  ncValues_->as_string(n); }
+
+private:
+  friend class MvNcVar;
+  friend class MvNcAtt;
+  MvNcValues(NcValues *values) : ncValues_(values) {}
+  ~MvNcValues() { delete ncValues_; }
+  NcValues *ncValues_;
+};
+
+
+// Abstract class for common attribute/variable operations.
+class MvNcBase
+{
+public:
+  // General
+  const char *name() { return delegate()->name(); }
+  NcType type() { return delegate()->type(); }
+  virtual NcBool isValid() { return delegate()->is_valid(); }
+
+  int getNumberOfValues() { return values()->getNumberOfValues(); }
+  char as_char( long n )    { return  values()->as_char(n); }
+  short as_short( long n )  { return  values()->as_short(n); }
+  long as_long( long n )    { return  values()->as_long(n); }
+  float as_float( long n )  { return  values()->as_float(n); }
+  double as_double( long n ){ return  values()->as_double(n); }
+  char* as_string( long n ) { return  values()->as_string(n); } 
+
+  virtual MvNcValues *values() = 0;
+  virtual NcTypedComponent *delegate() = 0;
+};
+
+
+// Wrapper for NcAtt
+class MvNcAtt : public MvNcBase
+{
+public:
+
+  virtual ~MvNcAtt();
+  NcTypedComponent *delegate() { return ncAtt_; }
+
+  // Values
+  MvNcValues *values() { return values_; }
+  NcBool getValues(string&);
+  char* as_string(long n);
+
+private:
+
+  friend class MvNcVar;
+  MvNcAtt(NcAtt *ncAtt);
+  MvNcAtt(const MvNcAtt& aa);
+  
+  void tztrim(char*);
+  void printValue(string &,double);
+
+  NcAtt *ncAtt_;
+  MvNcValues *values_;
+};
+
+
+// Wrapper for NcVar
+class MvNcVar : public MvNcBase
+{
+public:
+
+  virtual ~MvNcVar();
+
+  NcTypedComponent *delegate() {return ncVar_; }
+  
+  NcBool isValid() {
+    if (isGlobal_ ) return true;
+    else return delegate()->is_valid(); 
+  }
+
+  void getStringType(string &);
+
+  // Attributes
+  int getNumberOfAttributes() { return ncVar_->num_atts(); }
+  MvNcAtt* getAttribute(const string &);
+  MvNcAtt* getAttribute(unsigned int index);
+
+  template <class T> 
+  bool getAttributeValues(const string& name, vector<T>& vec)
+  {
+    if ( !isValid() ) return false;
+    for (unsigned int i = 0;i < attributes_.size();i++ )
+      if ( ! strcmp(name.c_str(),attributes_[i]->name()) )
+	return getAttributeValues(attributes_[i],vec);
+
+    return false;
+  }
+  
+  template <class T> 
+  bool getAttributeValues(unsigned int index, vector<T>& vec)
+  {
+    if ( !isValid() ) return false;
+    
+    if ( index <= (attributes_.size() - 1) )
+      return getAttributeValues(attributes_[index],vec);
+    
+    return false;
+  }
+
+  // Two following functions inlined because of gcc template instantiation
+  // problems. Should really be in cc file.
+  template <class T>  NcBool addAttribute(const string& name ,T value)
+    { 
+      if ( !isValid() ) return false;
+      
+      if ( attributeExists(name) )
+	{
+	  cout << "Attribute already exists, not adding " << endl;
+	  return 1;
+	}
+      
+      NcBool ret_code = ncVar_->add_att(name.c_str(),value);
+      
+      if ( ret_code == TRUE )
+	attributes_.push_back( new MvNcAtt(ncVar_->get_att(attributes_.size() ) ) );
+      
+      return ret_code;
+    }
+
+  template <class T>  NcBool addAttribute(const string& name, int nr, T *values)
+    {
+      if ( !isValid() ) return false;
+      
+      if ( attributeExists(name) )
+	{
+	  cout << "Attribute already exists, not adding " << endl;
+	  return 1;
+	}
+      
+      NcBool ret_code = ncVar_->add_att(name.c_str(),nr,values);
+      
+      if ( ret_code == TRUE )
+	attributes_.push_back( new MvNcAtt(ncVar_->get_att(attributes_.size() ) ) );
+      
+      return ret_code;
+    }
+
+  NcBool addAttribute(MvNcAtt *att);
+  NcBool attributeExists(const string& name);
+
+  // Dimensions
+  int   getNumberOfDimensions() { return ncVar_->num_dims(); }
+  NcDim *getDimension(int index){ return ncVar_->get_dim(index); }
+  long *edges() 
+{ if (!edges_ ) edges_ =  ncVar_->edges(); return edges_; }
+
+// Values
+template <class T>  NcBool get( vector<T>& vals, const long* counts, long nvals1=0L )
+{
+	if ( !isValid() ) return false;
+
+	NcBool ret_val;
+	long num_values = 1;
+	long nvals = nvals1;
+	int ndim = getNumberOfDimensions();
+	int i;
+
+	vals.erase(vals.begin(),vals.end());
+	if ( ndim >  0 )
+	{
+		for (i = 0; i < ndim; i++)
+			num_values *= counts[i];
+
+		if ( nvals > 0 && nvals < num_values )
+		{
+			long* len = new long[ndim];
+			for( i = 0; i < ndim ; i++ )
+				len[i] = 1;
+
+			long np = 1;
+			for( i = ndim-1; i >= 0 ; i-- )
+			{
+				if ( counts[i] >= nvals )
+				{
+					len[i] = nvals;
+					np *= nvals;
+					break;
+				}
+				else
+				{
+					len[i] = counts[i];
+					nvals  = (nvals / counts[i]) + 1;
+					np *= len[i];
+				}
+			}
+
+			vals.resize(np);
+			ret_val = ncVar_->get(&vals.front(),len);
+		}
+		else
+		{
+			vals.resize(num_values);
+			ret_val = ncVar_->get(&vals.front(),counts);
+		}
+	}
+	else 
+	{  // Scalar
+		T *scalarval = (T*)values()->base();
+		if ( scalarval )
+			vals.push_back(scalarval[0]);
+	}
+
+	return ret_val;
+}
+
+  template <class T>  NcBool get( vector<T>& vals, long c0=0, long c1=0,
+				  long c2=0, long c3=0, long c4=0 )
+    {
+      long counts[5];
+      counts[0] = c0; counts[1] = c1;counts[2] = c2;
+      counts[3] = c3; counts[4] = c4;
+      
+      return get(vals,counts);
+    }
+
+  MvNcValues* values() { checkValues(); return values_; }
+
+  // Records
+  NcBool setCurrent(long c0=-1, long c1=-1, long c2=-1,
+		 long c3=-1, long c4=-1) 
+    { return ncVar_->set_cur(c0,c1,c2,c3,c4); }
+
+  NcBool setCurrent(long* cur) { return ncVar_->set_cur(cur); }
+  
+  template <class T> NcBool put(const T *vals,const long *counts) 
+    { return ncVar_->put(vals,counts); }
+  
+  template <class T>
+  NcBool put (const T *vals,long c0=0,long c1=0,long c2=0,long c3=0,long c4=0)
+    { return ncVar_->put(vals,c0,c1,c2,c3,c4); }
+
+  template <class T> 
+  NcBool put(const vector<T>& vecvals,long c0=0,long c1=0,long c2=0,long c3=0,long c4=0)
+  {
+    T* vals = new T[vecvals.size()];
+    for ( int i = 0; i < vecvals.size(); i++ )
+      vals[i] = vecvals[i];
+    
+    bool retVal = ncVar_->put(vals,c0,c1,c2,c3,c4);
+    delete [] vals;
+    return retVal;
+  }
+
+  NcBool put(MvNcVar *var);
+  
+private:
+  friend class MvNetCDF;
+  MvNcVar(NcVar *ncvar, int is_global = 0 );
+  MvNcVar(const MvNcVar& vv);
+
+  bool getAttributeValues(MvNcAtt*, vector<string> &);
+  bool getAttributeValues(MvNcAtt*, vector<double>&);
+  bool getAttributeValues(MvNcAtt*, vector<long>&);
+
+  void checkValues() 
+    { if (!values_ ) values_ = new MvNcValues(ncVar_->values()); }
+
+  void fillAttributes();
+
+  template <class T> NcBool put_rec(const T *vals,long i= -1) 
+    {
+      if ( i >= 0 ) return ncVar_->put_rec(vals,i); 
+      else return ncVar_->put_rec(vals);
+    }
+  
+  long *edges_;
+  NcVar *ncVar_;
+  vector<MvNcAtt *> attributes_;
+  MvNcValues *values_;
+  int isGlobal_;
+};
+
+
+class MvNetCDF
+{
+public:
+
+  MvNetCDF();                              // Empty constructor
+  MvNetCDF(const string &, const char mode = 'r');   // From file name
+  MvNetCDF(const MvRequest&, const char mode = 'r'); //From request
+  virtual ~MvNetCDF();
+  
+  bool isValid() { return ncFile_->is_valid(); }  // Check if file is OK.
+
+  // Create MvRequest.
+  MvRequest getRequest();
+  // Write file from MvRequest
+
+  // Variables
+  int    getNumberOfVariables() { return ncFile_->num_vars(); }
+  MvNcVar* getVariable(const string &);
+  MvNcVar* getVariable(int index) { if (index == -1) return globalVar_; else return variables_[index]; }
+  MvNcVar *addVariable(const string & name,NcType type, int size, const NcDim **dim);
+  MvNcVar *getGlobalVariable() { return globalVar_; }
+
+  // Will create a dimension of same name, with value dim, and
+  // use this when adding the variable. Used for normal one-dim variables where
+  // dimsize2 = 0, or for strings, where dimsize2 is length of string.
+  MvNcVar *addVariable(const string &name,NcType type,long dimsize0,
+		       long dimsize1 = 0,long dimsize2 = 0, long dimsize3 = 0,
+		       long dimsize4 = 0);
+  
+  MvNcVar *addVariable(const string &name,NcType type,
+		       vector<long>& dimsize, vector<string>& vname);
+
+  template <class T> 
+  MvNcVar *addVariableWithData(const string& name,NcType type, vector<T> &vec)
+    {
+      MvNcVar *currVar = addVariable(name,type,vec.size() );
+      if ( ! currVar ) 
+	return 0;
+
+      // Add the data
+      T* array = new T[vec.size()];
+      for ( int i = 0; i < vec.size(); i++ )
+	array[i] = vec[i];
+
+      currVar->put(array,currVar->edges() );
+      delete [] array;
+
+      return currVar;
+    }
+      
+  template <class T>
+  NcBool getDataForVariable(vector<T> &vec,const string &name, long *given_edges = 0)
+    {
+      if ( !isValid() ) return false;
+      
+      long *edges;
+      MvNcVar *var = getVariable(name);
+      if ( !var ) return false;
+      
+      if ( !given_edges ) edges = var->edges();
+      else edges = given_edges;
+      
+      return var->get(vec,edges);
+    }
+
+  NcType getTypeForVariable(const string & name);
+  void   getStringTypeForVariable(const string &name, string &);
+
+  // Dimensions
+  int   getNumberOfDimensions() { return ncFile_->num_dims(); }
+  NcDim *getDimension(const string &name) { return ncFile_->get_dim(name.c_str() ); }
+  NcDim *getDimension(int index)        { return ncFile_->get_dim(index); }
+  NcDim *addDimension(const string&,long);
+  NcBool  dimensionExists(const string&);
+  
+  // Attributes.
+  int getNumberOfAttributes() { return ncFile_->num_atts(); } 
+  MvNcAtt* getAttribute(int i) { return globalVar_->getAttribute(i); }
+  MvNcAtt* getAttribute(const string &name) 
+    { return globalVar_->getAttribute(name.c_str() ); }
+
+  template <class T> 
+  bool getAttributeValues(const string& name, vector<T>& vec)
+  {
+    return globalVar_->getAttributeValues(name,vec);
+  }
+  
+  template <class T> 
+  bool getAttributeValues(unsigned int index, vector<T>& vec)
+  {
+    return globalVar_->getAttributeValues(index,vec);
+  }
+
+  template <class T>
+  NcBool addAttribute(const string& name, T val) 
+    { return globalVar_->addAttribute(name.c_str() ,val); }
+
+  template <class T>
+  NcBool addAttribute(const string& name, int n, const T *val) 
+    { return globalVar_->addAttribute(name.c_str() ,n,val); }
+
+  NcBool addAttribute(MvNcAtt *att) { return globalVar_->addAttribute(att); }
+  NcBool attributeExists(const string& name) { return globalVar_->attributeExists(name); }
+
+  // File operations.
+  const string& path() { return path_; }
+  NcBool sync() { return ncFile_->sync(); }
+  NcBool close() { return ncFile_->close(); }
+  int getFillMode() { return ncFile_->get_fill(); }
+  NcBool setFillMode(int mode = CDF_FILL) 
+    { return ncFile_->set_fill((NcFile::FillMode)mode); }
+  void init(const string& path,const char mode = 'r');
+
+private:
+  void fillVariables();
+  NcBool variableExists(const string& name);
+
+  // Used to fill in the request and check it against predefined values.
+  void reqGetDimensions(MvRequest &);
+  void reqGetVariables(MvRequest&);
+  void reqGetAttributes(MvRequest &);
+  
+
+
+  MvNcFile *ncFile_;
+  string path_;
+  
+  // To find out if more than one MvNetCDF accesses the same NetCDF file.
+  // ncFile_ only deleted if mapCount_[path_] == 0.
+  static CountMap countMap_;  
+  
+  vector<MvNcVar *> variables_;
+  MvNcVar *globalVar_;
+};
+
+// Define specialization.
+template<>
+NcBool MvNcVar::get(vector<Cached>& vals, const long *counts, long nvals);
+
+#endif
diff --git a/src/libMvQtGui/GLWidget.h b/src/libMvQtGui/GLWidget.h
new file mode 100644
index 0000000..164e21a
--- /dev/null
+++ b/src/libMvQtGui/GLWidget.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GLWidget_H
+#define GLWidget_H
+
+#include <QGLWidget>
+
+using namespace std;
+
+class GLWidget : public QGLWidget
+{
+	Q_OBJECT
+
+ public:
+	GLWidget(const QGLFormat&, QWidget *parent = 0);
+	~GLWidget();
+        void initializeGL();
+	void resizeGL(int, int);
+	void paintGL();
+	void setCursor(const string&);
+
+ protected:
+	void mousePressEvent   (QMouseEvent*) ;
+	void mouseMoveEvent    (QMouseEvent*) ;
+	void mouseReleaseEvent (QMouseEvent*) ;
+	void keyPressEvent(QKeyEvent*);
+	void keyReleaseEvent(QKeyEvent*);
+	//void paintEvent(QPaintEvent *);
+};
+
+#endif
diff --git a/src/libMvQtGui/Makefile.am b/src/libMvQtGui/Makefile.am
new file mode 100755
index 0000000..4aae4e4
--- /dev/null
+++ b/src/libMvQtGui/Makefile.am
@@ -0,0 +1,152 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+noinst_LIBRARIES = lib/libMvQtGui.a
+lib_libMvQtGui_a_SOURCES = MvQAbout.cc \
+		MvQAbstractMessageExaminer.cc \
+		MvQAbstractSearchLine.cc \
+		MvQX11Application.cc \
+		MvQApplication.cc \
+		MvQCheckBoxCombo.cc \
+		MvQConfigDialog.cc \
+		MvQDragDrop.cc \
+	   	MvQFileBrowserBase.cc \
+		MvQFileInfoLabel.cc \
+		MvQGui.cc \
+		MvQGuiItem.cc \
+		MvQHighlighter.cc \
+		MvQKeyMimeData.cc \
+		MvQKeyModel.cc \
+		MvQKeyDialog.cc \
+		MvQKeyFilterModel.cc \
+		MvQKeyProfileModel.cc \
+		MvQKeyProfileTree.cc \
+		MvQLogBrowser.cc \
+		MvQMacroSelector.cc \
+		MvQMainWindow.cc \
+		MvQPlainTextEditSearchLine.cc \
+		MvQProfileWidget.cc \
+		MvQProfileView.cc \
+		MvQRangeWidget.cc \
+		MvQScmDataWidget.cc \
+		MvQScmModel.cc \
+        MvQSearchLinePanel.cc \
+        MvQService.cc \
+		MvQStackedEditor.cc \
+		MvQTabManager.cc \
+		MvQTextDialog.cc \
+		MvQTextEditSearchLine.cc \
+		MvQTreeView.cc \
+		MvQTreeViewSearchLine.cc \
+		MvQMemoryWidget.cc \
+		GLWidget.h \
+		MvQAbout.h \
+        MvQAbstractMessageExaminer.h \
+	MvQAbstractSearchLine.h \
+		MvQApplication.h \
+        MvQCheckBoxCombo.h \
+        MvQConfigDialog.h \
+	MvQDragDrop.h \
+        MvQFileBrowserBase.h \
+        MvQFileInfoLabel.h \
+		MvQGui.h \
+        MvQGuiItem.h \
+	MvQHighlighter.h \
+	MvQKeyMimeData.h \
+		MvQKeyModel.h \
+        MvQKeyDialog.h \
+        MvQKeyFilterModel.h \
+        MvQKeyProfileModel.h \
+		MvQKeyProfileTree.h \
+        MvQLogBrowser.h \
+        MvQMacroSelector.h \
+        MvQMainWindow.h \
+        MvQMemoryWidget.h \
+        MvQMenuItem.h \
+        MvQPlainTextEditSearchLine.h \
+	    MvQProfileView.h \
+	    MvQProfileWidget.h \
+	    MvQRangeWidget.h \
+	    MvQScmDataWidget.h \
+	    MvQScmModel.h \
+        MvQSearchLinePanel.h \
+	MvQService.h \
+        MvQStackedEditor.h \
+        MvQTabManager.h \
+	MvQTextDialog.h \
+        MvQTextEditSearchLine.h \
+	MvQTreeView.h \
+	MvQTreeViewSearchLine.h \
+        MvQX11Application.h
+
+
+nodist_lib_libMvQtGui_a_SOURCES = MvQAbstractMessageExaminer.moc.cpp \
+				  MvQAbstractSearchLine.moc.cpp \
+				  MvQX11Application.moc.cpp MvQApplication.moc.cpp MvQCheckBoxCombo.moc.cpp \
+				  MvQConfigDialog.moc.cpp MvQFileBrowserBase.moc.cpp \
+				  MvQGuiItem.moc.cpp MvQGui.moc.cpp \
+ 				  MvQKeyDialog.moc.cpp MvQKeyMimeData.moc.cpp \
+				  MvQKeyModel.moc.cpp MvQKeyFilterModel.moc.cpp MvQKeyProfileModel.moc.cpp \
+				  MvQKeyProfileTree.moc.cpp \
+				  MvQMacroSelector.moc.cpp \
+				  MvQProfileView.moc.cpp \
+				  MvQProfileWidget.moc.cpp \
+				  MvQRangeWidget.moc.cpp \
+                                  MvQPlainTextEditSearchLine.moc.cpp \
+				  MvQScmDataWidget.moc.cpp \
+				  MvQScmModel.moc.cpp \
+				  MvQSearchLinePanel.moc.cpp \
+				  MvQService.moc.cpp \
+                                  MvQStackedEditor.moc.cpp \
+				  MvQTabManager.moc.cpp MvQTextEditSearchLine.moc.cpp \
+				  MvQTreeView.moc.cpp \
+				  MvQTreeViewSearchLine.moc.cpp  \
+ 				  MvQMemoryWidget.moc.cpp \
+				  examiner.qrc.cpp find.qrc.cpp keyDialog.qrc.cpp window.qrc.cpp
+                                
+lib_libMvQtGui_a_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS) -I${MAGPLUS_HOME}/include/magics -I../libMvQtUtil -I../uPlot
+lib_libMvQtGui_a_CPPFLAGS = $(QT_CPPFLAGS) $(MAGPLUS_CPPFLAGS) $(AM_CPPFLAGS)
+BUILT_SOURCES = lib \
+		MvQAbstractMessageExaminer.moc.cpp \
+		MvQAbstractSearchLine.moc.cpp \
+		MvQX11Application.moc.cpp MvQApplication.moc.cpp MvQCheckBoxCombo.moc.cpp  \
+		MvQFileBrowserBase.moc.cpp \
+		MvQGuiItem.moc.cpp MvQGui.moc.cpp \
+		MvQKeyMimeData.moc.cpp \
+		MvQKeyModel.moc.cpp \
+		MvQKeyDialog.moc.cpp \
+		MvQKeyFilterModel.moc.cpp\
+		MvQKeyProfileModel.moc.cpp \
+		MvQKeyProfileTree.moc.cpp \
+		MvQMacroSelector.moc.cpp \
+		MvQProfileView.moc.cpp \
+		MvQProfileWidget.moc.cpp \
+		MvQRangeWidget.moc.cpp \
+        MvQScmDataWidget.moc.cpp \
+	    MvQScmModel.moc.cpp \
+	    MvQService.moc.cpp \
+                MvQTabManager.moc.cpp MvQTreeView.moc.cpp \
+		MvQTextEditSearchLine.moc.cpp \
+		MvQMemoryWidget.moc.cpp \
+		examiner.qrc.cpp find.qrc.cpp keyDialog.qrc.cpp window.qrc.cpp
+
+
+if METVIEW_ODB
+lib_libMvQtGui_a_SOURCES += MvQOdbModel.cc MvQOdbDataWidget.cc MvQOdbModel.h MvQOdbDataWidget.h
+nodist_lib_libMvQtGui_a_SOURCES += MvQOdbDataWidget.moc.cpp
+lib_libMvQtGui_a_CPPFLAGS += $(ODB_CPPFLAGS)
+BUILT_SOURCES += MvQOdbDataWidget.moc.cpp
+endif
+
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+lib:
+	ln -s ../../lib lib
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp	
+
+EXTRA_DIST = examiner.qrc find.qrc keyDialog.qrc window.qrc
diff --git a/src/libMvQtGui/Makefile.in b/src/libMvQtGui/Makefile.in
new file mode 100644
index 0000000..833e2cc
--- /dev/null
+++ b/src/libMvQtGui/Makefile.in
@@ -0,0 +1,2167 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+ at METVIEW_ODB_TRUE@am__append_1 = MvQOdbModel.cc MvQOdbDataWidget.cc MvQOdbModel.h MvQOdbDataWidget.h
+ at METVIEW_ODB_TRUE@am__append_2 = MvQOdbDataWidget.moc.cpp
+ at METVIEW_ODB_TRUE@am__append_3 = $(ODB_CPPFLAGS)
+ at METVIEW_ODB_TRUE@am__append_4 = MvQOdbDataWidget.moc.cpp
+subdir = src/libMvQtGui
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libMvQtGui_a_AR = $(AR) $(ARFLAGS)
+lib_libMvQtGui_a_LIBADD =
+am__lib_libMvQtGui_a_SOURCES_DIST = MvQAbout.cc \
+	MvQAbstractMessageExaminer.cc MvQAbstractSearchLine.cc \
+	MvQX11Application.cc MvQApplication.cc MvQCheckBoxCombo.cc \
+	MvQConfigDialog.cc MvQDragDrop.cc MvQFileBrowserBase.cc \
+	MvQFileInfoLabel.cc MvQGui.cc MvQGuiItem.cc MvQHighlighter.cc \
+	MvQKeyMimeData.cc MvQKeyModel.cc MvQKeyDialog.cc \
+	MvQKeyFilterModel.cc MvQKeyProfileModel.cc \
+	MvQKeyProfileTree.cc MvQLogBrowser.cc MvQMacroSelector.cc \
+	MvQMainWindow.cc MvQPlainTextEditSearchLine.cc \
+	MvQProfileWidget.cc MvQProfileView.cc MvQRangeWidget.cc \
+	MvQScmDataWidget.cc MvQScmModel.cc MvQSearchLinePanel.cc \
+	MvQService.cc MvQStackedEditor.cc MvQTabManager.cc \
+	MvQTextDialog.cc MvQTextEditSearchLine.cc MvQTreeView.cc \
+	MvQTreeViewSearchLine.cc MvQMemoryWidget.cc GLWidget.h \
+	MvQAbout.h MvQAbstractMessageExaminer.h \
+	MvQAbstractSearchLine.h MvQApplication.h MvQCheckBoxCombo.h \
+	MvQConfigDialog.h MvQDragDrop.h MvQFileBrowserBase.h \
+	MvQFileInfoLabel.h MvQGui.h MvQGuiItem.h MvQHighlighter.h \
+	MvQKeyMimeData.h MvQKeyModel.h MvQKeyDialog.h \
+	MvQKeyFilterModel.h MvQKeyProfileModel.h MvQKeyProfileTree.h \
+	MvQLogBrowser.h MvQMacroSelector.h MvQMainWindow.h \
+	MvQMemoryWidget.h MvQMenuItem.h MvQPlainTextEditSearchLine.h \
+	MvQProfileView.h MvQProfileWidget.h MvQRangeWidget.h \
+	MvQScmDataWidget.h MvQScmModel.h MvQSearchLinePanel.h \
+	MvQService.h MvQStackedEditor.h MvQTabManager.h \
+	MvQTextDialog.h MvQTextEditSearchLine.h MvQTreeView.h \
+	MvQTreeViewSearchLine.h MvQX11Application.h MvQOdbModel.cc \
+	MvQOdbDataWidget.cc MvQOdbModel.h MvQOdbDataWidget.h
+ at METVIEW_ODB_TRUE@am__objects_1 =  \
+ at METVIEW_ODB_TRUE@	lib_libMvQtGui_a-MvQOdbModel.$(OBJEXT) \
+ at METVIEW_ODB_TRUE@	lib_libMvQtGui_a-MvQOdbDataWidget.$(OBJEXT)
+am_lib_libMvQtGui_a_OBJECTS = lib_libMvQtGui_a-MvQAbout.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQAbstractMessageExaminer.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQAbstractSearchLine.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQX11Application.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQApplication.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQCheckBoxCombo.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQConfigDialog.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQDragDrop.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQFileBrowserBase.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQFileInfoLabel.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQGui.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQGuiItem.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQHighlighter.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyMimeData.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyModel.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyDialog.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyFilterModel.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyProfileModel.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyProfileTree.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQLogBrowser.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQMacroSelector.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQMainWindow.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQPlainTextEditSearchLine.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQProfileWidget.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQProfileView.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQRangeWidget.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQScmDataWidget.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQScmModel.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQSearchLinePanel.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQService.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQStackedEditor.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTabManager.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTextDialog.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTextEditSearchLine.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTreeView.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTreeViewSearchLine.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQMemoryWidget.$(OBJEXT) $(am__objects_1)
+ at METVIEW_ODB_TRUE@am__objects_2 = lib_libMvQtGui_a-MvQOdbDataWidget.moc.$(OBJEXT)
+nodist_lib_libMvQtGui_a_OBJECTS =  \
+	lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQAbstractSearchLine.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQX11Application.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQApplication.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQCheckBoxCombo.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQConfigDialog.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQFileBrowserBase.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQGuiItem.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQGui.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyDialog.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyMimeData.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyModel.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyFilterModel.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyProfileModel.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQKeyProfileTree.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQMacroSelector.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQProfileView.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQProfileWidget.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQRangeWidget.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQScmDataWidget.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQScmModel.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQSearchLinePanel.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQService.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQStackedEditor.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTabManager.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTextEditSearchLine.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTreeView.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-MvQMemoryWidget.moc.$(OBJEXT) \
+	lib_libMvQtGui_a-examiner.qrc.$(OBJEXT) \
+	lib_libMvQtGui_a-find.qrc.$(OBJEXT) \
+	lib_libMvQtGui_a-keyDialog.qrc.$(OBJEXT) \
+	lib_libMvQtGui_a-window.qrc.$(OBJEXT) $(am__objects_2)
+lib_libMvQtGui_a_OBJECTS = $(am_lib_libMvQtGui_a_OBJECTS) \
+	$(nodist_lib_libMvQtGui_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libMvQtGui_a_SOURCES) \
+	$(nodist_lib_libMvQtGui_a_SOURCES)
+DIST_SOURCES = $(am__lib_libMvQtGui_a_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+noinst_LIBRARIES = lib/libMvQtGui.a
+lib_libMvQtGui_a_SOURCES = MvQAbout.cc MvQAbstractMessageExaminer.cc \
+	MvQAbstractSearchLine.cc MvQX11Application.cc \
+	MvQApplication.cc MvQCheckBoxCombo.cc MvQConfigDialog.cc \
+	MvQDragDrop.cc MvQFileBrowserBase.cc MvQFileInfoLabel.cc \
+	MvQGui.cc MvQGuiItem.cc MvQHighlighter.cc MvQKeyMimeData.cc \
+	MvQKeyModel.cc MvQKeyDialog.cc MvQKeyFilterModel.cc \
+	MvQKeyProfileModel.cc MvQKeyProfileTree.cc MvQLogBrowser.cc \
+	MvQMacroSelector.cc MvQMainWindow.cc \
+	MvQPlainTextEditSearchLine.cc MvQProfileWidget.cc \
+	MvQProfileView.cc MvQRangeWidget.cc MvQScmDataWidget.cc \
+	MvQScmModel.cc MvQSearchLinePanel.cc MvQService.cc \
+	MvQStackedEditor.cc MvQTabManager.cc MvQTextDialog.cc \
+	MvQTextEditSearchLine.cc MvQTreeView.cc \
+	MvQTreeViewSearchLine.cc MvQMemoryWidget.cc GLWidget.h \
+	MvQAbout.h MvQAbstractMessageExaminer.h \
+	MvQAbstractSearchLine.h MvQApplication.h MvQCheckBoxCombo.h \
+	MvQConfigDialog.h MvQDragDrop.h MvQFileBrowserBase.h \
+	MvQFileInfoLabel.h MvQGui.h MvQGuiItem.h MvQHighlighter.h \
+	MvQKeyMimeData.h MvQKeyModel.h MvQKeyDialog.h \
+	MvQKeyFilterModel.h MvQKeyProfileModel.h MvQKeyProfileTree.h \
+	MvQLogBrowser.h MvQMacroSelector.h MvQMainWindow.h \
+	MvQMemoryWidget.h MvQMenuItem.h MvQPlainTextEditSearchLine.h \
+	MvQProfileView.h MvQProfileWidget.h MvQRangeWidget.h \
+	MvQScmDataWidget.h MvQScmModel.h MvQSearchLinePanel.h \
+	MvQService.h MvQStackedEditor.h MvQTabManager.h \
+	MvQTextDialog.h MvQTextEditSearchLine.h MvQTreeView.h \
+	MvQTreeViewSearchLine.h MvQX11Application.h $(am__append_1)
+nodist_lib_libMvQtGui_a_SOURCES = MvQAbstractMessageExaminer.moc.cpp \
+	MvQAbstractSearchLine.moc.cpp MvQX11Application.moc.cpp \
+	MvQApplication.moc.cpp MvQCheckBoxCombo.moc.cpp \
+	MvQConfigDialog.moc.cpp MvQFileBrowserBase.moc.cpp \
+	MvQGuiItem.moc.cpp MvQGui.moc.cpp MvQKeyDialog.moc.cpp \
+	MvQKeyMimeData.moc.cpp MvQKeyModel.moc.cpp \
+	MvQKeyFilterModel.moc.cpp MvQKeyProfileModel.moc.cpp \
+	MvQKeyProfileTree.moc.cpp MvQMacroSelector.moc.cpp \
+	MvQProfileView.moc.cpp MvQProfileWidget.moc.cpp \
+	MvQRangeWidget.moc.cpp MvQPlainTextEditSearchLine.moc.cpp \
+	MvQScmDataWidget.moc.cpp MvQScmModel.moc.cpp \
+	MvQSearchLinePanel.moc.cpp MvQService.moc.cpp \
+	MvQStackedEditor.moc.cpp MvQTabManager.moc.cpp \
+	MvQTextEditSearchLine.moc.cpp MvQTreeView.moc.cpp \
+	MvQTreeViewSearchLine.moc.cpp MvQMemoryWidget.moc.cpp \
+	examiner.qrc.cpp find.qrc.cpp keyDialog.qrc.cpp window.qrc.cpp \
+	$(am__append_2)
+lib_libMvQtGui_a_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS) -I${MAGPLUS_HOME}/include/magics -I../libMvQtUtil -I../uPlot
+lib_libMvQtGui_a_CPPFLAGS = $(QT_CPPFLAGS) $(MAGPLUS_CPPFLAGS) \
+	$(AM_CPPFLAGS) $(am__append_3)
+BUILT_SOURCES = lib MvQAbstractMessageExaminer.moc.cpp \
+	MvQAbstractSearchLine.moc.cpp MvQX11Application.moc.cpp \
+	MvQApplication.moc.cpp MvQCheckBoxCombo.moc.cpp \
+	MvQFileBrowserBase.moc.cpp MvQGuiItem.moc.cpp MvQGui.moc.cpp \
+	MvQKeyMimeData.moc.cpp MvQKeyModel.moc.cpp \
+	MvQKeyDialog.moc.cpp MvQKeyFilterModel.moc.cpp \
+	MvQKeyProfileModel.moc.cpp MvQKeyProfileTree.moc.cpp \
+	MvQMacroSelector.moc.cpp MvQProfileView.moc.cpp \
+	MvQProfileWidget.moc.cpp MvQRangeWidget.moc.cpp \
+	MvQScmDataWidget.moc.cpp MvQScmModel.moc.cpp \
+	MvQService.moc.cpp MvQTabManager.moc.cpp MvQTreeView.moc.cpp \
+	MvQTextEditSearchLine.moc.cpp MvQMemoryWidget.moc.cpp \
+	examiner.qrc.cpp find.qrc.cpp keyDialog.qrc.cpp window.qrc.cpp \
+	$(am__append_4)
+EXTRA_DIST = examiner.qrc find.qrc keyDialog.qrc window.qrc
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libMvQtGui/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libMvQtGui/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libMvQtGui.a: $(lib_libMvQtGui_a_OBJECTS) $(lib_libMvQtGui_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libMvQtGui.a
+	$(AM_V_AR)$(lib_libMvQtGui_a_AR) lib/libMvQtGui.a $(lib_libMvQtGui_a_OBJECTS) $(lib_libMvQtGui_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libMvQtGui.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQGui.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-find.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtGui_a-window.qrc.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+lib_libMvQtGui_a-MvQAbout.o: MvQAbout.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbout.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Tpo -c -o lib_libMvQtGui_a-MvQAbout.o `test -f 'MvQAbout.cc' || echo '$(srcdir)/'`MvQAbout.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbout.cc' object='lib_libMvQtGui_a-MvQAbout.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbout.o `test -f 'MvQAbout.cc' || echo '$(srcdir)/'`MvQAbout.cc
+
+lib_libMvQtGui_a-MvQAbout.obj: MvQAbout.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbout.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Tpo -c -o lib_libMvQtGui_a-MvQAbout.obj `if test -f 'MvQAbout.cc'; then $(CYGPATH_W) 'MvQAbout.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAbout.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbout.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbout.cc' object='lib_libMvQtGui_a-MvQAbout.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbout.obj `if test -f 'MvQAbout.cc'; then $(CYGPATH_W) 'MvQAbout.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAbout.cc'; fi`
+
+lib_libMvQtGui_a-MvQAbstractMessageExaminer.o: MvQAbstractMessageExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractMessageExaminer.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Tpo -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.o `test -f 'MvQAbstractMessageExaminer.cc' || echo '$(srcdir)/'`MvQAbstractMessageExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractMessageExaminer.cc' object='lib_libMvQtGui_a-MvQAbstractMessageExaminer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.o `test -f 'MvQAbstractMessageExaminer.cc' || echo '$(srcdir)/'`MvQAbstractMessageExaminer.cc
+
+lib_libMvQtGui_a-MvQAbstractMessageExaminer.obj: MvQAbstractMessageExaminer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractMessageExaminer.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Tpo -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.obj `if test -f 'MvQAbstractMessageExaminer.cc'; then $(CYGPATH_W) 'MvQAbstractMessageExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractMessageExaminer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractMessageExaminer.cc' object='lib_libMvQtGui_a-MvQAbstractMessageExaminer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.obj `if test -f 'MvQAbstractMessageExaminer.cc'; then $(CYGPATH_W) 'MvQAbstractMessageExaminer.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractMessageExaminer.cc'; fi`
+
+lib_libMvQtGui_a-MvQAbstractSearchLine.o: MvQAbstractSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractSearchLine.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.o `test -f 'MvQAbstractSearchLine.cc' || echo '$(srcdir)/'`MvQAbstractSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractSearchLine.cc' object='lib_libMvQtGui_a-MvQAbstractSearchLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.o `test -f 'MvQAbstractSearchLine.cc' || echo '$(srcdir)/'`MvQAbstractSearchLine.cc
+
+lib_libMvQtGui_a-MvQAbstractSearchLine.obj: MvQAbstractSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractSearchLine.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.obj `if test -f 'MvQAbstractSearchLine.cc'; then $(CYGPATH_W) 'MvQAbstractSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractSearchLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractSearchLine.cc' object='lib_libMvQtGui_a-MvQAbstractSearchLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.obj `if test -f 'MvQAbstractSearchLine.cc'; then $(CYGPATH_W) 'MvQAbstractSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractSearchLine.cc'; fi`
+
+lib_libMvQtGui_a-MvQX11Application.o: MvQX11Application.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQX11Application.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Tpo -c -o lib_libMvQtGui_a-MvQX11Application.o `test -f 'MvQX11Application.cc' || echo '$(srcdir)/'`MvQX11Application.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQX11Application.cc' object='lib_libMvQtGui_a-MvQX11Application.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQX11Application.o `test -f 'MvQX11Application.cc' || echo '$(srcdir)/'`MvQX11Application.cc
+
+lib_libMvQtGui_a-MvQX11Application.obj: MvQX11Application.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQX11Application.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Tpo -c -o lib_libMvQtGui_a-MvQX11Application.obj `if test -f 'MvQX11Application.cc'; then $(CYGPATH_W) 'MvQX11Application.cc'; else $(CYGPATH_W) '$(srcdir)/MvQX11Application.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQX11Application.cc' object='lib_libMvQtGui_a-MvQX11Application.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQX11Application.obj `if test -f 'MvQX11Application.cc'; then $(CYGPATH_W) 'MvQX11Application.cc'; else $(CYGPATH_W) '$(srcdir)/MvQX11Application.cc'; fi`
+
+lib_libMvQtGui_a-MvQApplication.o: MvQApplication.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQApplication.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Tpo -c -o lib_libMvQtGui_a-MvQApplication.o `test -f 'MvQApplication.cc' || echo '$(srcdir)/'`MvQApplication.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQApplication.cc' object='lib_libMvQtGui_a-MvQApplication.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQApplication.o `test -f 'MvQApplication.cc' || echo '$(srcdir)/'`MvQApplication.cc
+
+lib_libMvQtGui_a-MvQApplication.obj: MvQApplication.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQApplication.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Tpo -c -o lib_libMvQtGui_a-MvQApplication.obj `if test -f 'MvQApplication.cc'; then $(CYGPATH_W) 'MvQApplication.cc'; else $(CYGPATH_W) '$(srcdir)/MvQApplication.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQApplication.cc' object='lib_libMvQtGui_a-MvQApplication.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQApplication.obj `if test -f 'MvQApplication.cc'; then $(CYGPATH_W) 'MvQApplication.cc'; else $(CYGPATH_W) '$(srcdir)/MvQApplication.cc'; fi`
+
+lib_libMvQtGui_a-MvQCheckBoxCombo.o: MvQCheckBoxCombo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQCheckBoxCombo.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Tpo -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.o `test -f 'MvQCheckBoxCombo.cc' || echo '$(srcdir)/'`MvQCheckBoxCombo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCheckBoxCombo.cc' object='lib_libMvQtGui_a-MvQCheckBoxCombo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.o `test -f 'MvQCheckBoxCombo.cc' || echo '$(srcdir)/'`MvQCheckBoxCombo.cc
+
+lib_libMvQtGui_a-MvQCheckBoxCombo.obj: MvQCheckBoxCombo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQCheckBoxCombo.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Tpo -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.obj `if test -f 'MvQCheckBoxCombo.cc'; then $(CYGPATH_W) 'MvQCheckBoxCombo.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCheckBoxCombo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCheckBoxCombo.cc' object='lib_libMvQtGui_a-MvQCheckBoxCombo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.obj `if test -f 'MvQCheckBoxCombo.cc'; then $(CYGPATH_W) 'MvQCheckBoxCombo.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCheckBoxCombo.cc'; fi`
+
+lib_libMvQtGui_a-MvQConfigDialog.o: MvQConfigDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQConfigDialog.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Tpo -c -o lib_libMvQtGui_a-MvQConfigDialog.o `test -f 'MvQConfigDialog.cc' || echo '$(srcdir)/'`MvQConfigDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQConfigDialog.cc' object='lib_libMvQtGui_a-MvQConfigDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQConfigDialog.o `test -f 'MvQConfigDialog.cc' || echo '$(srcdir)/'`MvQConfigDialog.cc
+
+lib_libMvQtGui_a-MvQConfigDialog.obj: MvQConfigDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQConfigDialog.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Tpo -c -o lib_libMvQtGui_a-MvQConfigDialog.obj `if test -f 'MvQConfigDialog.cc'; then $(CYGPATH_W) 'MvQConfigDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQConfigDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQConfigDialog.cc' object='lib_libMvQtGui_a-MvQConfigDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQConfigDialog.obj `if test -f 'MvQConfigDialog.cc'; then $(CYGPATH_W) 'MvQConfigDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQConfigDialog.cc'; fi`
+
+lib_libMvQtGui_a-MvQDragDrop.o: MvQDragDrop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQDragDrop.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Tpo -c -o lib_libMvQtGui_a-MvQDragDrop.o `test -f 'MvQDragDrop.cc' || echo '$(srcdir)/'`MvQDragDrop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDragDrop.cc' object='lib_libMvQtGui_a-MvQDragDrop.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQDragDrop.o `test -f 'MvQDragDrop.cc' || echo '$(srcdir)/'`MvQDragDrop.cc
+
+lib_libMvQtGui_a-MvQDragDrop.obj: MvQDragDrop.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQDragDrop.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Tpo -c -o lib_libMvQtGui_a-MvQDragDrop.obj `if test -f 'MvQDragDrop.cc'; then $(CYGPATH_W) 'MvQDragDrop.cc'; else $(CYGPATH_W) '$(srcdir)/MvQDragDrop.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQDragDrop.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDragDrop.cc' object='lib_libMvQtGui_a-MvQDragDrop.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQDragDrop.obj `if test -f 'MvQDragDrop.cc'; then $(CYGPATH_W) 'MvQDragDrop.cc'; else $(CYGPATH_W) '$(srcdir)/MvQDragDrop.cc'; fi`
+
+lib_libMvQtGui_a-MvQFileBrowserBase.o: MvQFileBrowserBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQFileBrowserBase.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Tpo -c -o lib_libMvQtGui_a-MvQFileBrowserBase.o `test -f 'MvQFileBrowserBase.cc' || echo '$(srcdir)/'`MvQFileBrowserBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQFileBrowserBase.cc' object='lib_libMvQtGui_a-MvQFileBrowserBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQFileBrowserBase.o `test -f 'MvQFileBrowserBase.cc' || echo '$(srcdir)/'`MvQFileBrowserBase.cc
+
+lib_libMvQtGui_a-MvQFileBrowserBase.obj: MvQFileBrowserBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQFileBrowserBase.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Tpo -c -o lib_libMvQtGui_a-MvQFileBrowserBase.obj `if test -f 'MvQFileBrowserBase.cc'; then $(CYGPATH_W) 'MvQFileBrowserBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvQFileBrowserBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQFileBrowserBase.cc' object='lib_libMvQtGui_a-MvQFileBrowserBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQFileBrowserBase.obj `if test -f 'MvQFileBrowserBase.cc'; then $(CYGPATH_W) 'MvQFileBrowserBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvQFileBrowserBase.cc'; fi`
+
+lib_libMvQtGui_a-MvQFileInfoLabel.o: MvQFileInfoLabel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQFileInfoLabel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Tpo -c -o lib_libMvQtGui_a-MvQFileInfoLabel.o `test -f 'MvQFileInfoLabel.cc' || echo '$(srcdir)/'`MvQFileInfoLabel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQFileInfoLabel.cc' object='lib_libMvQtGui_a-MvQFileInfoLabel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQFileInfoLabel.o `test -f 'MvQFileInfoLabel.cc' || echo '$(srcdir)/'`MvQFileInfoLabel.cc
+
+lib_libMvQtGui_a-MvQFileInfoLabel.obj: MvQFileInfoLabel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQFileInfoLabel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Tpo -c -o lib_libMvQtGui_a-MvQFileInfoLabel.obj `if test -f 'MvQFileInfoLabel.cc'; then $(CYGPATH_W) 'MvQFileInfoLabel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQFileInfoLabel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQFileInfoLabel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQFileInfoLabel.cc' object='lib_libMvQtGui_a-MvQFileInfoLabel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQFileInfoLabel.obj `if test -f 'MvQFileInfoLabel.cc'; then $(CYGPATH_W) 'MvQFileInfoLabel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQFileInfoLabel.cc'; fi`
+
+lib_libMvQtGui_a-MvQGui.o: MvQGui.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGui.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGui.Tpo -c -o lib_libMvQtGui_a-MvQGui.o `test -f 'MvQGui.cc' || echo '$(srcdir)/'`MvQGui.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGui.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGui.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGui.cc' object='lib_libMvQtGui_a-MvQGui.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGui.o `test -f 'MvQGui.cc' || echo '$(srcdir)/'`MvQGui.cc
+
+lib_libMvQtGui_a-MvQGui.obj: MvQGui.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGui.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGui.Tpo -c -o lib_libMvQtGui_a-MvQGui.obj `if test -f 'MvQGui.cc'; then $(CYGPATH_W) 'MvQGui.cc'; else $(CYGPATH_W) '$(srcdir)/MvQGui.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGui.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGui.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGui.cc' object='lib_libMvQtGui_a-MvQGui.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGui.obj `if test -f 'MvQGui.cc'; then $(CYGPATH_W) 'MvQGui.cc'; else $(CYGPATH_W) '$(srcdir)/MvQGui.cc'; fi`
+
+lib_libMvQtGui_a-MvQGuiItem.o: MvQGuiItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGuiItem.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Tpo -c -o lib_libMvQtGui_a-MvQGuiItem.o `test -f 'MvQGuiItem.cc' || echo '$(srcdir)/'`MvQGuiItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGuiItem.cc' object='lib_libMvQtGui_a-MvQGuiItem.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGuiItem.o `test -f 'MvQGuiItem.cc' || echo '$(srcdir)/'`MvQGuiItem.cc
+
+lib_libMvQtGui_a-MvQGuiItem.obj: MvQGuiItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGuiItem.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Tpo -c -o lib_libMvQtGui_a-MvQGuiItem.obj `if test -f 'MvQGuiItem.cc'; then $(CYGPATH_W) 'MvQGuiItem.cc'; else $(CYGPATH_W) '$(srcdir)/MvQGuiItem.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGuiItem.cc' object='lib_libMvQtGui_a-MvQGuiItem.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGuiItem.obj `if test -f 'MvQGuiItem.cc'; then $(CYGPATH_W) 'MvQGuiItem.cc'; else $(CYGPATH_W) '$(srcdir)/MvQGuiItem.cc'; fi`
+
+lib_libMvQtGui_a-MvQHighlighter.o: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQHighlighter.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Tpo -c -o lib_libMvQtGui_a-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='lib_libMvQtGui_a-MvQHighlighter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQHighlighter.o `test -f 'MvQHighlighter.cc' || echo '$(srcdir)/'`MvQHighlighter.cc
+
+lib_libMvQtGui_a-MvQHighlighter.obj: MvQHighlighter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQHighlighter.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Tpo -c -o lib_libMvQtGui_a-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQHighlighter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQHighlighter.cc' object='lib_libMvQtGui_a-MvQHighlighter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQHighlighter.obj `if test -f 'MvQHighlighter.cc'; then $(CYGPATH_W) 'MvQHighlighter.cc'; else $(CYGPATH_W) '$(srcdir)/MvQHighlighter.cc'; fi`
+
+lib_libMvQtGui_a-MvQKeyMimeData.o: MvQKeyMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyMimeData.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Tpo -c -o lib_libMvQtGui_a-MvQKeyMimeData.o `test -f 'MvQKeyMimeData.cc' || echo '$(srcdir)/'`MvQKeyMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyMimeData.cc' object='lib_libMvQtGui_a-MvQKeyMimeData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyMimeData.o `test -f 'MvQKeyMimeData.cc' || echo '$(srcdir)/'`MvQKeyMimeData.cc
+
+lib_libMvQtGui_a-MvQKeyMimeData.obj: MvQKeyMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyMimeData.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Tpo -c -o lib_libMvQtGui_a-MvQKeyMimeData.obj `if test -f 'MvQKeyMimeData.cc'; then $(CYGPATH_W) 'MvQKeyMimeData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyMimeData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyMimeData.cc' object='lib_libMvQtGui_a-MvQKeyMimeData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyMimeData.obj `if test -f 'MvQKeyMimeData.cc'; then $(CYGPATH_W) 'MvQKeyMimeData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyMimeData.cc'; fi`
+
+lib_libMvQtGui_a-MvQKeyModel.o: MvQKeyModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyModel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Tpo -c -o lib_libMvQtGui_a-MvQKeyModel.o `test -f 'MvQKeyModel.cc' || echo '$(srcdir)/'`MvQKeyModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyModel.cc' object='lib_libMvQtGui_a-MvQKeyModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyModel.o `test -f 'MvQKeyModel.cc' || echo '$(srcdir)/'`MvQKeyModel.cc
+
+lib_libMvQtGui_a-MvQKeyModel.obj: MvQKeyModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyModel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Tpo -c -o lib_libMvQtGui_a-MvQKeyModel.obj `if test -f 'MvQKeyModel.cc'; then $(CYGPATH_W) 'MvQKeyModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyModel.cc' object='lib_libMvQtGui_a-MvQKeyModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyModel.obj `if test -f 'MvQKeyModel.cc'; then $(CYGPATH_W) 'MvQKeyModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyModel.cc'; fi`
+
+lib_libMvQtGui_a-MvQKeyDialog.o: MvQKeyDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyDialog.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Tpo -c -o lib_libMvQtGui_a-MvQKeyDialog.o `test -f 'MvQKeyDialog.cc' || echo '$(srcdir)/'`MvQKeyDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyDialog.cc' object='lib_libMvQtGui_a-MvQKeyDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyDialog.o `test -f 'MvQKeyDialog.cc' || echo '$(srcdir)/'`MvQKeyDialog.cc
+
+lib_libMvQtGui_a-MvQKeyDialog.obj: MvQKeyDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyDialog.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Tpo -c -o lib_libMvQtGui_a-MvQKeyDialog.obj `if test -f 'MvQKeyDialog.cc'; then $(CYGPATH_W) 'MvQKeyDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyDialog.cc' object='lib_libMvQtGui_a-MvQKeyDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyDialog.obj `if test -f 'MvQKeyDialog.cc'; then $(CYGPATH_W) 'MvQKeyDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyDialog.cc'; fi`
+
+lib_libMvQtGui_a-MvQKeyFilterModel.o: MvQKeyFilterModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyFilterModel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Tpo -c -o lib_libMvQtGui_a-MvQKeyFilterModel.o `test -f 'MvQKeyFilterModel.cc' || echo '$(srcdir)/'`MvQKeyFilterModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyFilterModel.cc' object='lib_libMvQtGui_a-MvQKeyFilterModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyFilterModel.o `test -f 'MvQKeyFilterModel.cc' || echo '$(srcdir)/'`MvQKeyFilterModel.cc
+
+lib_libMvQtGui_a-MvQKeyFilterModel.obj: MvQKeyFilterModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyFilterModel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Tpo -c -o lib_libMvQtGui_a-MvQKeyFilterModel.obj `if test -f 'MvQKeyFilterModel.cc'; then $(CYGPATH_W) 'MvQKeyFilterModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyFilterModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyFilterModel.cc' object='lib_libMvQtGui_a-MvQKeyFilterModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyFilterModel.obj `if test -f 'MvQKeyFilterModel.cc'; then $(CYGPATH_W) 'MvQKeyFilterModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyFilterModel.cc'; fi`
+
+lib_libMvQtGui_a-MvQKeyProfileModel.o: MvQKeyProfileModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileModel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileModel.o `test -f 'MvQKeyProfileModel.cc' || echo '$(srcdir)/'`MvQKeyProfileModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileModel.cc' object='lib_libMvQtGui_a-MvQKeyProfileModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileModel.o `test -f 'MvQKeyProfileModel.cc' || echo '$(srcdir)/'`MvQKeyProfileModel.cc
+
+lib_libMvQtGui_a-MvQKeyProfileModel.obj: MvQKeyProfileModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileModel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileModel.obj `if test -f 'MvQKeyProfileModel.cc'; then $(CYGPATH_W) 'MvQKeyProfileModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileModel.cc' object='lib_libMvQtGui_a-MvQKeyProfileModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileModel.obj `if test -f 'MvQKeyProfileModel.cc'; then $(CYGPATH_W) 'MvQKeyProfileModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileModel.cc'; fi`
+
+lib_libMvQtGui_a-MvQKeyProfileTree.o: MvQKeyProfileTree.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileTree.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileTree.o `test -f 'MvQKeyProfileTree.cc' || echo '$(srcdir)/'`MvQKeyProfileTree.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileTree.cc' object='lib_libMvQtGui_a-MvQKeyProfileTree.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileTree.o `test -f 'MvQKeyProfileTree.cc' || echo '$(srcdir)/'`MvQKeyProfileTree.cc
+
+lib_libMvQtGui_a-MvQKeyProfileTree.obj: MvQKeyProfileTree.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileTree.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileTree.obj `if test -f 'MvQKeyProfileTree.cc'; then $(CYGPATH_W) 'MvQKeyProfileTree.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileTree.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileTree.cc' object='lib_libMvQtGui_a-MvQKeyProfileTree.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileTree.obj `if test -f 'MvQKeyProfileTree.cc'; then $(CYGPATH_W) 'MvQKeyProfileTree.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileTree.cc'; fi`
+
+lib_libMvQtGui_a-MvQLogBrowser.o: MvQLogBrowser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQLogBrowser.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Tpo -c -o lib_libMvQtGui_a-MvQLogBrowser.o `test -f 'MvQLogBrowser.cc' || echo '$(srcdir)/'`MvQLogBrowser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLogBrowser.cc' object='lib_libMvQtGui_a-MvQLogBrowser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQLogBrowser.o `test -f 'MvQLogBrowser.cc' || echo '$(srcdir)/'`MvQLogBrowser.cc
+
+lib_libMvQtGui_a-MvQLogBrowser.obj: MvQLogBrowser.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQLogBrowser.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Tpo -c -o lib_libMvQtGui_a-MvQLogBrowser.obj `if test -f 'MvQLogBrowser.cc'; then $(CYGPATH_W) 'MvQLogBrowser.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLogBrowser.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQLogBrowser.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLogBrowser.cc' object='lib_libMvQtGui_a-MvQLogBrowser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQLogBrowser.obj `if test -f 'MvQLogBrowser.cc'; then $(CYGPATH_W) 'MvQLogBrowser.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLogBrowser.cc'; fi`
+
+lib_libMvQtGui_a-MvQMacroSelector.o: MvQMacroSelector.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMacroSelector.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Tpo -c -o lib_libMvQtGui_a-MvQMacroSelector.o `test -f 'MvQMacroSelector.cc' || echo '$(srcdir)/'`MvQMacroSelector.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMacroSelector.cc' object='lib_libMvQtGui_a-MvQMacroSelector.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMacroSelector.o `test -f 'MvQMacroSelector.cc' || echo '$(srcdir)/'`MvQMacroSelector.cc
+
+lib_libMvQtGui_a-MvQMacroSelector.obj: MvQMacroSelector.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMacroSelector.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Tpo -c -o lib_libMvQtGui_a-MvQMacroSelector.obj `if test -f 'MvQMacroSelector.cc'; then $(CYGPATH_W) 'MvQMacroSelector.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMacroSelector.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMacroSelector.cc' object='lib_libMvQtGui_a-MvQMacroSelector.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMacroSelector.obj `if test -f 'MvQMacroSelector.cc'; then $(CYGPATH_W) 'MvQMacroSelector.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMacroSelector.cc'; fi`
+
+lib_libMvQtGui_a-MvQMainWindow.o: MvQMainWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMainWindow.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Tpo -c -o lib_libMvQtGui_a-MvQMainWindow.o `test -f 'MvQMainWindow.cc' || echo '$(srcdir)/'`MvQMainWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMainWindow.cc' object='lib_libMvQtGui_a-MvQMainWindow.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMainWindow.o `test -f 'MvQMainWindow.cc' || echo '$(srcdir)/'`MvQMainWindow.cc
+
+lib_libMvQtGui_a-MvQMainWindow.obj: MvQMainWindow.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMainWindow.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Tpo -c -o lib_libMvQtGui_a-MvQMainWindow.obj `if test -f 'MvQMainWindow.cc'; then $(CYGPATH_W) 'MvQMainWindow.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMainWindow.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMainWindow.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMainWindow.cc' object='lib_libMvQtGui_a-MvQMainWindow.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMainWindow.obj `if test -f 'MvQMainWindow.cc'; then $(CYGPATH_W) 'MvQMainWindow.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMainWindow.cc'; fi`
+
+lib_libMvQtGui_a-MvQPlainTextEditSearchLine.o: MvQPlainTextEditSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQPlainTextEditSearchLine.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.o `test -f 'MvQPlainTextEditSearchLine.cc' || echo '$(srcdir)/'`MvQPlainTextEditSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlainTextEditSearchLine.cc' object='lib_libMvQtGui_a-MvQPlainTextEditSearchLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.o `test -f 'MvQPlainTextEditSearchLine.cc' || echo '$(srcdir)/'`MvQPlainTextEditSearchLine.cc
+
+lib_libMvQtGui_a-MvQPlainTextEditSearchLine.obj: MvQPlainTextEditSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQPlainTextEditSearchLine.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.obj `if test -f 'MvQPlainTextEditSearchLine.cc'; then $(CYGPATH_W) 'MvQPlainTextEditSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlainTextEditSearchLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlainTextEditSearchLine.cc' object='lib_libMvQtGui_a-MvQPlainTextEditSearchLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.obj `if test -f 'MvQPlainTextEditSearchLine.cc'; then $(CYGPATH_W) 'MvQPlainTextEditSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlainTextEditSearchLine.cc'; fi`
+
+lib_libMvQtGui_a-MvQProfileWidget.o: MvQProfileWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileWidget.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Tpo -c -o lib_libMvQtGui_a-MvQProfileWidget.o `test -f 'MvQProfileWidget.cc' || echo '$(srcdir)/'`MvQProfileWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileWidget.cc' object='lib_libMvQtGui_a-MvQProfileWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileWidget.o `test -f 'MvQProfileWidget.cc' || echo '$(srcdir)/'`MvQProfileWidget.cc
+
+lib_libMvQtGui_a-MvQProfileWidget.obj: MvQProfileWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileWidget.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Tpo -c -o lib_libMvQtGui_a-MvQProfileWidget.obj `if test -f 'MvQProfileWidget.cc'; then $(CYGPATH_W) 'MvQProfileWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProfileWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileWidget.cc' object='lib_libMvQtGui_a-MvQProfileWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileWidget.obj `if test -f 'MvQProfileWidget.cc'; then $(CYGPATH_W) 'MvQProfileWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProfileWidget.cc'; fi`
+
+lib_libMvQtGui_a-MvQProfileView.o: MvQProfileView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileView.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Tpo -c -o lib_libMvQtGui_a-MvQProfileView.o `test -f 'MvQProfileView.cc' || echo '$(srcdir)/'`MvQProfileView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileView.cc' object='lib_libMvQtGui_a-MvQProfileView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileView.o `test -f 'MvQProfileView.cc' || echo '$(srcdir)/'`MvQProfileView.cc
+
+lib_libMvQtGui_a-MvQProfileView.obj: MvQProfileView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileView.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Tpo -c -o lib_libMvQtGui_a-MvQProfileView.obj `if test -f 'MvQProfileView.cc'; then $(CYGPATH_W) 'MvQProfileView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProfileView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileView.cc' object='lib_libMvQtGui_a-MvQProfileView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileView.obj `if test -f 'MvQProfileView.cc'; then $(CYGPATH_W) 'MvQProfileView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProfileView.cc'; fi`
+
+lib_libMvQtGui_a-MvQRangeWidget.o: MvQRangeWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQRangeWidget.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Tpo -c -o lib_libMvQtGui_a-MvQRangeWidget.o `test -f 'MvQRangeWidget.cc' || echo '$(srcdir)/'`MvQRangeWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQRangeWidget.cc' object='lib_libMvQtGui_a-MvQRangeWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQRangeWidget.o `test -f 'MvQRangeWidget.cc' || echo '$(srcdir)/'`MvQRangeWidget.cc
+
+lib_libMvQtGui_a-MvQRangeWidget.obj: MvQRangeWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQRangeWidget.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Tpo -c -o lib_libMvQtGui_a-MvQRangeWidget.obj `if test -f 'MvQRangeWidget.cc'; then $(CYGPATH_W) 'MvQRangeWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQRangeWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQRangeWidget.cc' object='lib_libMvQtGui_a-MvQRangeWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQRangeWidget.obj `if test -f 'MvQRangeWidget.cc'; then $(CYGPATH_W) 'MvQRangeWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQRangeWidget.cc'; fi`
+
+lib_libMvQtGui_a-MvQScmDataWidget.o: MvQScmDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmDataWidget.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Tpo -c -o lib_libMvQtGui_a-MvQScmDataWidget.o `test -f 'MvQScmDataWidget.cc' || echo '$(srcdir)/'`MvQScmDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmDataWidget.cc' object='lib_libMvQtGui_a-MvQScmDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmDataWidget.o `test -f 'MvQScmDataWidget.cc' || echo '$(srcdir)/'`MvQScmDataWidget.cc
+
+lib_libMvQtGui_a-MvQScmDataWidget.obj: MvQScmDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmDataWidget.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Tpo -c -o lib_libMvQtGui_a-MvQScmDataWidget.obj `if test -f 'MvQScmDataWidget.cc'; then $(CYGPATH_W) 'MvQScmDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQScmDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmDataWidget.cc' object='lib_libMvQtGui_a-MvQScmDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmDataWidget.obj `if test -f 'MvQScmDataWidget.cc'; then $(CYGPATH_W) 'MvQScmDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQScmDataWidget.cc'; fi`
+
+lib_libMvQtGui_a-MvQScmModel.o: MvQScmModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmModel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Tpo -c -o lib_libMvQtGui_a-MvQScmModel.o `test -f 'MvQScmModel.cc' || echo '$(srcdir)/'`MvQScmModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmModel.cc' object='lib_libMvQtGui_a-MvQScmModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmModel.o `test -f 'MvQScmModel.cc' || echo '$(srcdir)/'`MvQScmModel.cc
+
+lib_libMvQtGui_a-MvQScmModel.obj: MvQScmModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmModel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Tpo -c -o lib_libMvQtGui_a-MvQScmModel.obj `if test -f 'MvQScmModel.cc'; then $(CYGPATH_W) 'MvQScmModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQScmModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmModel.cc' object='lib_libMvQtGui_a-MvQScmModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmModel.obj `if test -f 'MvQScmModel.cc'; then $(CYGPATH_W) 'MvQScmModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQScmModel.cc'; fi`
+
+lib_libMvQtGui_a-MvQSearchLinePanel.o: MvQSearchLinePanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQSearchLinePanel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Tpo -c -o lib_libMvQtGui_a-MvQSearchLinePanel.o `test -f 'MvQSearchLinePanel.cc' || echo '$(srcdir)/'`MvQSearchLinePanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQSearchLinePanel.cc' object='lib_libMvQtGui_a-MvQSearchLinePanel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQSearchLinePanel.o `test -f 'MvQSearchLinePanel.cc' || echo '$(srcdir)/'`MvQSearchLinePanel.cc
+
+lib_libMvQtGui_a-MvQSearchLinePanel.obj: MvQSearchLinePanel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQSearchLinePanel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Tpo -c -o lib_libMvQtGui_a-MvQSearchLinePanel.obj `if test -f 'MvQSearchLinePanel.cc'; then $(CYGPATH_W) 'MvQSearchLinePanel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQSearchLinePanel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQSearchLinePanel.cc' object='lib_libMvQtGui_a-MvQSearchLinePanel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQSearchLinePanel.obj `if test -f 'MvQSearchLinePanel.cc'; then $(CYGPATH_W) 'MvQSearchLinePanel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQSearchLinePanel.cc'; fi`
+
+lib_libMvQtGui_a-MvQService.o: MvQService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQService.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQService.Tpo -c -o lib_libMvQtGui_a-MvQService.o `test -f 'MvQService.cc' || echo '$(srcdir)/'`MvQService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQService.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQService.cc' object='lib_libMvQtGui_a-MvQService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQService.o `test -f 'MvQService.cc' || echo '$(srcdir)/'`MvQService.cc
+
+lib_libMvQtGui_a-MvQService.obj: MvQService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQService.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQService.Tpo -c -o lib_libMvQtGui_a-MvQService.obj `if test -f 'MvQService.cc'; then $(CYGPATH_W) 'MvQService.cc'; else $(CYGPATH_W) '$(srcdir)/MvQService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQService.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQService.cc' object='lib_libMvQtGui_a-MvQService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQService.obj `if test -f 'MvQService.cc'; then $(CYGPATH_W) 'MvQService.cc'; else $(CYGPATH_W) '$(srcdir)/MvQService.cc'; fi`
+
+lib_libMvQtGui_a-MvQStackedEditor.o: MvQStackedEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQStackedEditor.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Tpo -c -o lib_libMvQtGui_a-MvQStackedEditor.o `test -f 'MvQStackedEditor.cc' || echo '$(srcdir)/'`MvQStackedEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStackedEditor.cc' object='lib_libMvQtGui_a-MvQStackedEditor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQStackedEditor.o `test -f 'MvQStackedEditor.cc' || echo '$(srcdir)/'`MvQStackedEditor.cc
+
+lib_libMvQtGui_a-MvQStackedEditor.obj: MvQStackedEditor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQStackedEditor.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Tpo -c -o lib_libMvQtGui_a-MvQStackedEditor.obj `if test -f 'MvQStackedEditor.cc'; then $(CYGPATH_W) 'MvQStackedEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStackedEditor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStackedEditor.cc' object='lib_libMvQtGui_a-MvQStackedEditor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQStackedEditor.obj `if test -f 'MvQStackedEditor.cc'; then $(CYGPATH_W) 'MvQStackedEditor.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStackedEditor.cc'; fi`
+
+lib_libMvQtGui_a-MvQTabManager.o: MvQTabManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTabManager.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Tpo -c -o lib_libMvQtGui_a-MvQTabManager.o `test -f 'MvQTabManager.cc' || echo '$(srcdir)/'`MvQTabManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTabManager.cc' object='lib_libMvQtGui_a-MvQTabManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTabManager.o `test -f 'MvQTabManager.cc' || echo '$(srcdir)/'`MvQTabManager.cc
+
+lib_libMvQtGui_a-MvQTabManager.obj: MvQTabManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTabManager.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Tpo -c -o lib_libMvQtGui_a-MvQTabManager.obj `if test -f 'MvQTabManager.cc'; then $(CYGPATH_W) 'MvQTabManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTabManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTabManager.cc' object='lib_libMvQtGui_a-MvQTabManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTabManager.obj `if test -f 'MvQTabManager.cc'; then $(CYGPATH_W) 'MvQTabManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTabManager.cc'; fi`
+
+lib_libMvQtGui_a-MvQTextDialog.o: MvQTextDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTextDialog.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Tpo -c -o lib_libMvQtGui_a-MvQTextDialog.o `test -f 'MvQTextDialog.cc' || echo '$(srcdir)/'`MvQTextDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTextDialog.cc' object='lib_libMvQtGui_a-MvQTextDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTextDialog.o `test -f 'MvQTextDialog.cc' || echo '$(srcdir)/'`MvQTextDialog.cc
+
+lib_libMvQtGui_a-MvQTextDialog.obj: MvQTextDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTextDialog.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Tpo -c -o lib_libMvQtGui_a-MvQTextDialog.obj `if test -f 'MvQTextDialog.cc'; then $(CYGPATH_W) 'MvQTextDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTextDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTextDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTextDialog.cc' object='lib_libMvQtGui_a-MvQTextDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTextDialog.obj `if test -f 'MvQTextDialog.cc'; then $(CYGPATH_W) 'MvQTextDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTextDialog.cc'; fi`
+
+lib_libMvQtGui_a-MvQTextEditSearchLine.o: MvQTextEditSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTextEditSearchLine.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.o `test -f 'MvQTextEditSearchLine.cc' || echo '$(srcdir)/'`MvQTextEditSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTextEditSearchLine.cc' object='lib_libMvQtGui_a-MvQTextEditSearchLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.o `test -f 'MvQTextEditSearchLine.cc' || echo '$(srcdir)/'`MvQTextEditSearchLine.cc
+
+lib_libMvQtGui_a-MvQTextEditSearchLine.obj: MvQTextEditSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTextEditSearchLine.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.obj `if test -f 'MvQTextEditSearchLine.cc'; then $(CYGPATH_W) 'MvQTextEditSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTextEditSearchLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTextEditSearchLine.cc' object='lib_libMvQtGui_a-MvQTextEditSearchLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.obj `if test -f 'MvQTextEditSearchLine.cc'; then $(CYGPATH_W) 'MvQTextEditSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTextEditSearchLine.cc'; fi`
+
+lib_libMvQtGui_a-MvQTreeView.o: MvQTreeView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeView.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Tpo -c -o lib_libMvQtGui_a-MvQTreeView.o `test -f 'MvQTreeView.cc' || echo '$(srcdir)/'`MvQTreeView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeView.cc' object='lib_libMvQtGui_a-MvQTreeView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeView.o `test -f 'MvQTreeView.cc' || echo '$(srcdir)/'`MvQTreeView.cc
+
+lib_libMvQtGui_a-MvQTreeView.obj: MvQTreeView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeView.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Tpo -c -o lib_libMvQtGui_a-MvQTreeView.obj `if test -f 'MvQTreeView.cc'; then $(CYGPATH_W) 'MvQTreeView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTreeView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeView.cc' object='lib_libMvQtGui_a-MvQTreeView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeView.obj `if test -f 'MvQTreeView.cc'; then $(CYGPATH_W) 'MvQTreeView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTreeView.cc'; fi`
+
+lib_libMvQtGui_a-MvQTreeViewSearchLine.o: MvQTreeViewSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeViewSearchLine.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.o `test -f 'MvQTreeViewSearchLine.cc' || echo '$(srcdir)/'`MvQTreeViewSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeViewSearchLine.cc' object='lib_libMvQtGui_a-MvQTreeViewSearchLine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.o `test -f 'MvQTreeViewSearchLine.cc' || echo '$(srcdir)/'`MvQTreeViewSearchLine.cc
+
+lib_libMvQtGui_a-MvQTreeViewSearchLine.obj: MvQTreeViewSearchLine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeViewSearchLine.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Tpo -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.obj `if test -f 'MvQTreeViewSearchLine.cc'; then $(CYGPATH_W) 'MvQTreeViewSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTreeViewSearchLine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeViewSearchLine.cc' object='lib_libMvQtGui_a-MvQTreeViewSearchLine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.obj `if test -f 'MvQTreeViewSearchLine.cc'; then $(CYGPATH_W) 'MvQTreeViewSearchLine.cc'; else $(CYGPATH_W) '$(srcdir)/MvQTreeViewSearchLine.cc'; fi`
+
+lib_libMvQtGui_a-MvQMemoryWidget.o: MvQMemoryWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMemoryWidget.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Tpo -c -o lib_libMvQtGui_a-MvQMemoryWidget.o `test -f 'MvQMemoryWidget.cc' || echo '$(srcdir)/'`MvQMemoryWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMemoryWidget.cc' object='lib_libMvQtGui_a-MvQMemoryWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMemoryWidget.o `test -f 'MvQMemoryWidget.cc' || echo '$(srcdir)/'`MvQMemoryWidget.cc
+
+lib_libMvQtGui_a-MvQMemoryWidget.obj: MvQMemoryWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMemoryWidget.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Tpo -c -o lib_libMvQtGui_a-MvQMemoryWidget.obj `if test -f 'MvQMemoryWidget.cc'; then $(CYGPATH_W) 'MvQMemoryWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMemoryWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMemoryWidget.cc' object='lib_libMvQtGui_a-MvQMemoryWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMemoryWidget.obj `if test -f 'MvQMemoryWidget.cc'; then $(CYGPATH_W) 'MvQMemoryWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMemoryWidget.cc'; fi`
+
+lib_libMvQtGui_a-MvQOdbModel.o: MvQOdbModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQOdbModel.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Tpo -c -o lib_libMvQtGui_a-MvQOdbModel.o `test -f 'MvQOdbModel.cc' || echo '$(srcdir)/'`MvQOdbModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbModel.cc' object='lib_libMvQtGui_a-MvQOdbModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQOdbModel.o `test -f 'MvQOdbModel.cc' || echo '$(srcdir)/'`MvQOdbModel.cc
+
+lib_libMvQtGui_a-MvQOdbModel.obj: MvQOdbModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQOdbModel.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Tpo -c -o lib_libMvQtGui_a-MvQOdbModel.obj `if test -f 'MvQOdbModel.cc'; then $(CYGPATH_W) 'MvQOdbModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQOdbModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbModel.cc' object='lib_libMvQtGui_a-MvQOdbModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQOdbModel.obj `if test -f 'MvQOdbModel.cc'; then $(CYGPATH_W) 'MvQOdbModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbModel.cc'; fi`
+
+lib_libMvQtGui_a-MvQOdbDataWidget.o: MvQOdbDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQOdbDataWidget.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Tpo -c -o lib_libMvQtGui_a-MvQOdbDataWidget.o `test -f 'MvQOdbDataWidget.cc' || echo '$(srcdir)/'`MvQOdbDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbDataWidget.cc' object='lib_libMvQtGui_a-MvQOdbDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQOdbDataWidget.o `test -f 'MvQOdbDataWidget.cc' || echo '$(srcdir)/'`MvQOdbDataWidget.cc
+
+lib_libMvQtGui_a-MvQOdbDataWidget.obj: MvQOdbDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQOdbDataWidget.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Tpo -c -o lib_libMvQtGui_a-MvQOdbDataWidget.obj `if test -f 'MvQOdbDataWidget.cc'; then $(CYGPATH_W) 'MvQOdbDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbDataWidget.cc' object='lib_libMvQtGui_a-MvQOdbDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQOdbDataWidget.obj `if test -f 'MvQOdbDataWidget.cc'; then $(CYGPATH_W) 'MvQOdbDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbDataWidget.cc'; fi`
+
+lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.o: MvQAbstractMessageExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Tpo -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.o `test -f 'MvQAbstractMessageExaminer.moc.cpp' || echo '$(srcdir)/'`MvQAbstractMessageExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractMessageExaminer.moc.cpp' object='lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.o `test -f 'MvQAbstractMessageExaminer.moc.cpp' || echo '$(srcdir)/'`MvQAbstractMessageExaminer.moc.cpp
+
+lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.obj: MvQAbstractMessageExaminer.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Tpo -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.obj `if test -f 'MvQAbstractMessageExaminer.moc.cpp'; then $(CYGPATH_W) 'MvQAbstractMessageExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAbst [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractMessageExaminer.moc.cpp' object='lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractMessageExaminer.moc.obj `if test -f 'MvQAbstractMessageExaminer.moc.cpp'; then $(CYGPATH_W) 'MvQAbstractMessageExaminer.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractMessageExaminer.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQAbstractSearchLine.moc.o: MvQAbstractSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractSearchLine.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.moc.o `test -f 'MvQAbstractSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQAbstractSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQAbstractSearchLine.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.moc.o `test -f 'MvQAbstractSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQAbstractSearchLine.moc.cpp
+
+lib_libMvQtGui_a-MvQAbstractSearchLine.moc.obj: MvQAbstractSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQAbstractSearchLine.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.moc.obj `if test -f 'MvQAbstractSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQAbstractSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractSearchLine.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQAbstractSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAbstractSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQAbstractSearchLine.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQAbstractSearchLine.moc.obj `if test -f 'MvQAbstractSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQAbstractSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAbstractSearchLine.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQX11Application.moc.o: MvQX11Application.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQX11Application.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Tpo -c -o lib_libMvQtGui_a-MvQX11Application.moc.o `test -f 'MvQX11Application.moc.cpp' || echo '$(srcdir)/'`MvQX11Application.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQX11Application.moc.cpp' object='lib_libMvQtGui_a-MvQX11Application.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQX11Application.moc.o `test -f 'MvQX11Application.moc.cpp' || echo '$(srcdir)/'`MvQX11Application.moc.cpp
+
+lib_libMvQtGui_a-MvQX11Application.moc.obj: MvQX11Application.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQX11Application.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Tpo -c -o lib_libMvQtGui_a-MvQX11Application.moc.obj `if test -f 'MvQX11Application.moc.cpp'; then $(CYGPATH_W) 'MvQX11Application.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQX11Application.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQX11Application.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQX11Application.moc.cpp' object='lib_libMvQtGui_a-MvQX11Application.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQX11Application.moc.obj `if test -f 'MvQX11Application.moc.cpp'; then $(CYGPATH_W) 'MvQX11Application.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQX11Application.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQApplication.moc.o: MvQApplication.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQApplication.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Tpo -c -o lib_libMvQtGui_a-MvQApplication.moc.o `test -f 'MvQApplication.moc.cpp' || echo '$(srcdir)/'`MvQApplication.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQApplication.moc.cpp' object='lib_libMvQtGui_a-MvQApplication.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQApplication.moc.o `test -f 'MvQApplication.moc.cpp' || echo '$(srcdir)/'`MvQApplication.moc.cpp
+
+lib_libMvQtGui_a-MvQApplication.moc.obj: MvQApplication.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQApplication.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Tpo -c -o lib_libMvQtGui_a-MvQApplication.moc.obj `if test -f 'MvQApplication.moc.cpp'; then $(CYGPATH_W) 'MvQApplication.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQApplication.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQApplication.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQApplication.moc.cpp' object='lib_libMvQtGui_a-MvQApplication.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQApplication.moc.obj `if test -f 'MvQApplication.moc.cpp'; then $(CYGPATH_W) 'MvQApplication.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQApplication.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQCheckBoxCombo.moc.o: MvQCheckBoxCombo.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQCheckBoxCombo.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Tpo -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.moc.o `test -f 'MvQCheckBoxCombo.moc.cpp' || echo '$(srcdir)/'`MvQCheckBoxCombo.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCheckBoxCombo.moc.cpp' object='lib_libMvQtGui_a-MvQCheckBoxCombo.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.moc.o `test -f 'MvQCheckBoxCombo.moc.cpp' || echo '$(srcdir)/'`MvQCheckBoxCombo.moc.cpp
+
+lib_libMvQtGui_a-MvQCheckBoxCombo.moc.obj: MvQCheckBoxCombo.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQCheckBoxCombo.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Tpo -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.moc.obj `if test -f 'MvQCheckBoxCombo.moc.cpp'; then $(CYGPATH_W) 'MvQCheckBoxCombo.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCheckBoxCombo.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQCheckBoxCombo.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCheckBoxCombo.moc.cpp' object='lib_libMvQtGui_a-MvQCheckBoxCombo.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQCheckBoxCombo.moc.obj `if test -f 'MvQCheckBoxCombo.moc.cpp'; then $(CYGPATH_W) 'MvQCheckBoxCombo.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCheckBoxCombo.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQConfigDialog.moc.o: MvQConfigDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQConfigDialog.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Tpo -c -o lib_libMvQtGui_a-MvQConfigDialog.moc.o `test -f 'MvQConfigDialog.moc.cpp' || echo '$(srcdir)/'`MvQConfigDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQConfigDialog.moc.cpp' object='lib_libMvQtGui_a-MvQConfigDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQConfigDialog.moc.o `test -f 'MvQConfigDialog.moc.cpp' || echo '$(srcdir)/'`MvQConfigDialog.moc.cpp
+
+lib_libMvQtGui_a-MvQConfigDialog.moc.obj: MvQConfigDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQConfigDialog.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Tpo -c -o lib_libMvQtGui_a-MvQConfigDialog.moc.obj `if test -f 'MvQConfigDialog.moc.cpp'; then $(CYGPATH_W) 'MvQConfigDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQConfigDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQConfigDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQConfigDialog.moc.cpp' object='lib_libMvQtGui_a-MvQConfigDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQConfigDialog.moc.obj `if test -f 'MvQConfigDialog.moc.cpp'; then $(CYGPATH_W) 'MvQConfigDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQConfigDialog.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQFileBrowserBase.moc.o: MvQFileBrowserBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQFileBrowserBase.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Tpo -c -o lib_libMvQtGui_a-MvQFileBrowserBase.moc.o `test -f 'MvQFileBrowserBase.moc.cpp' || echo '$(srcdir)/'`MvQFileBrowserBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQFileBrowserBase.moc.cpp' object='lib_libMvQtGui_a-MvQFileBrowserBase.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQFileBrowserBase.moc.o `test -f 'MvQFileBrowserBase.moc.cpp' || echo '$(srcdir)/'`MvQFileBrowserBase.moc.cpp
+
+lib_libMvQtGui_a-MvQFileBrowserBase.moc.obj: MvQFileBrowserBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQFileBrowserBase.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Tpo -c -o lib_libMvQtGui_a-MvQFileBrowserBase.moc.obj `if test -f 'MvQFileBrowserBase.moc.cpp'; then $(CYGPATH_W) 'MvQFileBrowserBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQFileBrowserBase.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQFileBrowserBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQFileBrowserBase.moc.cpp' object='lib_libMvQtGui_a-MvQFileBrowserBase.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQFileBrowserBase.moc.obj `if test -f 'MvQFileBrowserBase.moc.cpp'; then $(CYGPATH_W) 'MvQFileBrowserBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQFileBrowserBase.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQGuiItem.moc.o: MvQGuiItem.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGuiItem.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Tpo -c -o lib_libMvQtGui_a-MvQGuiItem.moc.o `test -f 'MvQGuiItem.moc.cpp' || echo '$(srcdir)/'`MvQGuiItem.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGuiItem.moc.cpp' object='lib_libMvQtGui_a-MvQGuiItem.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGuiItem.moc.o `test -f 'MvQGuiItem.moc.cpp' || echo '$(srcdir)/'`MvQGuiItem.moc.cpp
+
+lib_libMvQtGui_a-MvQGuiItem.moc.obj: MvQGuiItem.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGuiItem.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Tpo -c -o lib_libMvQtGui_a-MvQGuiItem.moc.obj `if test -f 'MvQGuiItem.moc.cpp'; then $(CYGPATH_W) 'MvQGuiItem.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQGuiItem.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGuiItem.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGuiItem.moc.cpp' object='lib_libMvQtGui_a-MvQGuiItem.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGuiItem.moc.obj `if test -f 'MvQGuiItem.moc.cpp'; then $(CYGPATH_W) 'MvQGuiItem.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQGuiItem.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQGui.moc.o: MvQGui.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGui.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Tpo -c -o lib_libMvQtGui_a-MvQGui.moc.o `test -f 'MvQGui.moc.cpp' || echo '$(srcdir)/'`MvQGui.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGui.moc.cpp' object='lib_libMvQtGui_a-MvQGui.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGui.moc.o `test -f 'MvQGui.moc.cpp' || echo '$(srcdir)/'`MvQGui.moc.cpp
+
+lib_libMvQtGui_a-MvQGui.moc.obj: MvQGui.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQGui.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Tpo -c -o lib_libMvQtGui_a-MvQGui.moc.obj `if test -f 'MvQGui.moc.cpp'; then $(CYGPATH_W) 'MvQGui.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQGui.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQGui.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQGui.moc.cpp' object='lib_libMvQtGui_a-MvQGui.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQGui.moc.obj `if test -f 'MvQGui.moc.cpp'; then $(CYGPATH_W) 'MvQGui.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQGui.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQKeyDialog.moc.o: MvQKeyDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyDialog.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyDialog.moc.o `test -f 'MvQKeyDialog.moc.cpp' || echo '$(srcdir)/'`MvQKeyDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyDialog.moc.cpp' object='lib_libMvQtGui_a-MvQKeyDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyDialog.moc.o `test -f 'MvQKeyDialog.moc.cpp' || echo '$(srcdir)/'`MvQKeyDialog.moc.cpp
+
+lib_libMvQtGui_a-MvQKeyDialog.moc.obj: MvQKeyDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyDialog.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyDialog.moc.obj `if test -f 'MvQKeyDialog.moc.cpp'; then $(CYGPATH_W) 'MvQKeyDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyDialog.moc.cpp' object='lib_libMvQtGui_a-MvQKeyDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyDialog.moc.obj `if test -f 'MvQKeyDialog.moc.cpp'; then $(CYGPATH_W) 'MvQKeyDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyDialog.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQKeyMimeData.moc.o: MvQKeyMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyMimeData.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyMimeData.moc.o `test -f 'MvQKeyMimeData.moc.cpp' || echo '$(srcdir)/'`MvQKeyMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyMimeData.moc.cpp' object='lib_libMvQtGui_a-MvQKeyMimeData.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyMimeData.moc.o `test -f 'MvQKeyMimeData.moc.cpp' || echo '$(srcdir)/'`MvQKeyMimeData.moc.cpp
+
+lib_libMvQtGui_a-MvQKeyMimeData.moc.obj: MvQKeyMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyMimeData.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyMimeData.moc.obj `if test -f 'MvQKeyMimeData.moc.cpp'; then $(CYGPATH_W) 'MvQKeyMimeData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyMimeData.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyMimeData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyMimeData.moc.cpp' object='lib_libMvQtGui_a-MvQKeyMimeData.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyMimeData.moc.obj `if test -f 'MvQKeyMimeData.moc.cpp'; then $(CYGPATH_W) 'MvQKeyMimeData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyMimeData.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQKeyModel.moc.o: MvQKeyModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyModel.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyModel.moc.o `test -f 'MvQKeyModel.moc.cpp' || echo '$(srcdir)/'`MvQKeyModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyModel.moc.cpp' object='lib_libMvQtGui_a-MvQKeyModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyModel.moc.o `test -f 'MvQKeyModel.moc.cpp' || echo '$(srcdir)/'`MvQKeyModel.moc.cpp
+
+lib_libMvQtGui_a-MvQKeyModel.moc.obj: MvQKeyModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyModel.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyModel.moc.obj `if test -f 'MvQKeyModel.moc.cpp'; then $(CYGPATH_W) 'MvQKeyModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyModel.moc.cpp' object='lib_libMvQtGui_a-MvQKeyModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyModel.moc.obj `if test -f 'MvQKeyModel.moc.cpp'; then $(CYGPATH_W) 'MvQKeyModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyModel.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQKeyFilterModel.moc.o: MvQKeyFilterModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyFilterModel.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyFilterModel.moc.o `test -f 'MvQKeyFilterModel.moc.cpp' || echo '$(srcdir)/'`MvQKeyFilterModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyFilterModel.moc.cpp' object='lib_libMvQtGui_a-MvQKeyFilterModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyFilterModel.moc.o `test -f 'MvQKeyFilterModel.moc.cpp' || echo '$(srcdir)/'`MvQKeyFilterModel.moc.cpp
+
+lib_libMvQtGui_a-MvQKeyFilterModel.moc.obj: MvQKeyFilterModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyFilterModel.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyFilterModel.moc.obj `if test -f 'MvQKeyFilterModel.moc.cpp'; then $(CYGPATH_W) 'MvQKeyFilterModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyFilterModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyFilterModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyFilterModel.moc.cpp' object='lib_libMvQtGui_a-MvQKeyFilterModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyFilterModel.moc.obj `if test -f 'MvQKeyFilterModel.moc.cpp'; then $(CYGPATH_W) 'MvQKeyFilterModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyFilterModel.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQKeyProfileModel.moc.o: MvQKeyProfileModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileModel.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileModel.moc.o `test -f 'MvQKeyProfileModel.moc.cpp' || echo '$(srcdir)/'`MvQKeyProfileModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileModel.moc.cpp' object='lib_libMvQtGui_a-MvQKeyProfileModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileModel.moc.o `test -f 'MvQKeyProfileModel.moc.cpp' || echo '$(srcdir)/'`MvQKeyProfileModel.moc.cpp
+
+lib_libMvQtGui_a-MvQKeyProfileModel.moc.obj: MvQKeyProfileModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileModel.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileModel.moc.obj `if test -f 'MvQKeyProfileModel.moc.cpp'; then $(CYGPATH_W) 'MvQKeyProfileModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileModel.moc.cpp' object='lib_libMvQtGui_a-MvQKeyProfileModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileModel.moc.obj `if test -f 'MvQKeyProfileModel.moc.cpp'; then $(CYGPATH_W) 'MvQKeyProfileModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileModel.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQKeyProfileTree.moc.o: MvQKeyProfileTree.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileTree.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileTree.moc.o `test -f 'MvQKeyProfileTree.moc.cpp' || echo '$(srcdir)/'`MvQKeyProfileTree.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileTree.moc.cpp' object='lib_libMvQtGui_a-MvQKeyProfileTree.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileTree.moc.o `test -f 'MvQKeyProfileTree.moc.cpp' || echo '$(srcdir)/'`MvQKeyProfileTree.moc.cpp
+
+lib_libMvQtGui_a-MvQKeyProfileTree.moc.obj: MvQKeyProfileTree.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQKeyProfileTree.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Tpo -c -o lib_libMvQtGui_a-MvQKeyProfileTree.moc.obj `if test -f 'MvQKeyProfileTree.moc.cpp'; then $(CYGPATH_W) 'MvQKeyProfileTree.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileTree.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQKeyProfileTree.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyProfileTree.moc.cpp' object='lib_libMvQtGui_a-MvQKeyProfileTree.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQKeyProfileTree.moc.obj `if test -f 'MvQKeyProfileTree.moc.cpp'; then $(CYGPATH_W) 'MvQKeyProfileTree.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQKeyProfileTree.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQMacroSelector.moc.o: MvQMacroSelector.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMacroSelector.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Tpo -c -o lib_libMvQtGui_a-MvQMacroSelector.moc.o `test -f 'MvQMacroSelector.moc.cpp' || echo '$(srcdir)/'`MvQMacroSelector.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMacroSelector.moc.cpp' object='lib_libMvQtGui_a-MvQMacroSelector.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMacroSelector.moc.o `test -f 'MvQMacroSelector.moc.cpp' || echo '$(srcdir)/'`MvQMacroSelector.moc.cpp
+
+lib_libMvQtGui_a-MvQMacroSelector.moc.obj: MvQMacroSelector.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMacroSelector.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Tpo -c -o lib_libMvQtGui_a-MvQMacroSelector.moc.obj `if test -f 'MvQMacroSelector.moc.cpp'; then $(CYGPATH_W) 'MvQMacroSelector.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMacroSelector.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMacroSelector.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMacroSelector.moc.cpp' object='lib_libMvQtGui_a-MvQMacroSelector.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMacroSelector.moc.obj `if test -f 'MvQMacroSelector.moc.cpp'; then $(CYGPATH_W) 'MvQMacroSelector.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMacroSelector.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQProfileView.moc.o: MvQProfileView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileView.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Tpo -c -o lib_libMvQtGui_a-MvQProfileView.moc.o `test -f 'MvQProfileView.moc.cpp' || echo '$(srcdir)/'`MvQProfileView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileView.moc.cpp' object='lib_libMvQtGui_a-MvQProfileView.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileView.moc.o `test -f 'MvQProfileView.moc.cpp' || echo '$(srcdir)/'`MvQProfileView.moc.cpp
+
+lib_libMvQtGui_a-MvQProfileView.moc.obj: MvQProfileView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileView.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Tpo -c -o lib_libMvQtGui_a-MvQProfileView.moc.obj `if test -f 'MvQProfileView.moc.cpp'; then $(CYGPATH_W) 'MvQProfileView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQProfileView.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileView.moc.cpp' object='lib_libMvQtGui_a-MvQProfileView.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileView.moc.obj `if test -f 'MvQProfileView.moc.cpp'; then $(CYGPATH_W) 'MvQProfileView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQProfileView.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQProfileWidget.moc.o: MvQProfileWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileWidget.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQProfileWidget.moc.o `test -f 'MvQProfileWidget.moc.cpp' || echo '$(srcdir)/'`MvQProfileWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileWidget.moc.cpp' object='lib_libMvQtGui_a-MvQProfileWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileWidget.moc.o `test -f 'MvQProfileWidget.moc.cpp' || echo '$(srcdir)/'`MvQProfileWidget.moc.cpp
+
+lib_libMvQtGui_a-MvQProfileWidget.moc.obj: MvQProfileWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQProfileWidget.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQProfileWidget.moc.obj `if test -f 'MvQProfileWidget.moc.cpp'; then $(CYGPATH_W) 'MvQProfileWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQProfileWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQProfileWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProfileWidget.moc.cpp' object='lib_libMvQtGui_a-MvQProfileWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQProfileWidget.moc.obj `if test -f 'MvQProfileWidget.moc.cpp'; then $(CYGPATH_W) 'MvQProfileWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQProfileWidget.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQRangeWidget.moc.o: MvQRangeWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQRangeWidget.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQRangeWidget.moc.o `test -f 'MvQRangeWidget.moc.cpp' || echo '$(srcdir)/'`MvQRangeWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQRangeWidget.moc.cpp' object='lib_libMvQtGui_a-MvQRangeWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQRangeWidget.moc.o `test -f 'MvQRangeWidget.moc.cpp' || echo '$(srcdir)/'`MvQRangeWidget.moc.cpp
+
+lib_libMvQtGui_a-MvQRangeWidget.moc.obj: MvQRangeWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQRangeWidget.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQRangeWidget.moc.obj `if test -f 'MvQRangeWidget.moc.cpp'; then $(CYGPATH_W) 'MvQRangeWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQRangeWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQRangeWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQRangeWidget.moc.cpp' object='lib_libMvQtGui_a-MvQRangeWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQRangeWidget.moc.obj `if test -f 'MvQRangeWidget.moc.cpp'; then $(CYGPATH_W) 'MvQRangeWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQRangeWidget.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.o: MvQPlainTextEditSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.o `test -f 'MvQPlainTextEditSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQPlainTextEditSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlainTextEditSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.o `test -f 'MvQPlainTextEditSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQPlainTextEditSearchLine.moc.cpp
+
+lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.obj: MvQPlainTextEditSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.obj `if test -f 'MvQPlainTextEditSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQPlainTextEditSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlai [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlainTextEditSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQPlainTextEditSearchLine.moc.obj `if test -f 'MvQPlainTextEditSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQPlainTextEditSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlainTextEditSearchLine.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQScmDataWidget.moc.o: MvQScmDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmDataWidget.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQScmDataWidget.moc.o `test -f 'MvQScmDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQScmDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmDataWidget.moc.cpp' object='lib_libMvQtGui_a-MvQScmDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmDataWidget.moc.o `test -f 'MvQScmDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQScmDataWidget.moc.cpp
+
+lib_libMvQtGui_a-MvQScmDataWidget.moc.obj: MvQScmDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQScmDataWidget.moc.obj `if test -f 'MvQScmDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQScmDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQScmDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmDataWidget.moc.cpp' object='lib_libMvQtGui_a-MvQScmDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmDataWidget.moc.obj `if test -f 'MvQScmDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQScmDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQScmDataWidget.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQScmModel.moc.o: MvQScmModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmModel.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQScmModel.moc.o `test -f 'MvQScmModel.moc.cpp' || echo '$(srcdir)/'`MvQScmModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmModel.moc.cpp' object='lib_libMvQtGui_a-MvQScmModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmModel.moc.o `test -f 'MvQScmModel.moc.cpp' || echo '$(srcdir)/'`MvQScmModel.moc.cpp
+
+lib_libMvQtGui_a-MvQScmModel.moc.obj: MvQScmModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQScmModel.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Tpo -c -o lib_libMvQtGui_a-MvQScmModel.moc.obj `if test -f 'MvQScmModel.moc.cpp'; then $(CYGPATH_W) 'MvQScmModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQScmModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQScmModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQScmModel.moc.cpp' object='lib_libMvQtGui_a-MvQScmModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQScmModel.moc.obj `if test -f 'MvQScmModel.moc.cpp'; then $(CYGPATH_W) 'MvQScmModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQScmModel.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQSearchLinePanel.moc.o: MvQSearchLinePanel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQSearchLinePanel.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Tpo -c -o lib_libMvQtGui_a-MvQSearchLinePanel.moc.o `test -f 'MvQSearchLinePanel.moc.cpp' || echo '$(srcdir)/'`MvQSearchLinePanel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQSearchLinePanel.moc.cpp' object='lib_libMvQtGui_a-MvQSearchLinePanel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQSearchLinePanel.moc.o `test -f 'MvQSearchLinePanel.moc.cpp' || echo '$(srcdir)/'`MvQSearchLinePanel.moc.cpp
+
+lib_libMvQtGui_a-MvQSearchLinePanel.moc.obj: MvQSearchLinePanel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQSearchLinePanel.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Tpo -c -o lib_libMvQtGui_a-MvQSearchLinePanel.moc.obj `if test -f 'MvQSearchLinePanel.moc.cpp'; then $(CYGPATH_W) 'MvQSearchLinePanel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQSearchLinePanel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQSearchLinePanel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQSearchLinePanel.moc.cpp' object='lib_libMvQtGui_a-MvQSearchLinePanel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQSearchLinePanel.moc.obj `if test -f 'MvQSearchLinePanel.moc.cpp'; then $(CYGPATH_W) 'MvQSearchLinePanel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQSearchLinePanel.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQService.moc.o: MvQService.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQService.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Tpo -c -o lib_libMvQtGui_a-MvQService.moc.o `test -f 'MvQService.moc.cpp' || echo '$(srcdir)/'`MvQService.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQService.moc.cpp' object='lib_libMvQtGui_a-MvQService.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQService.moc.o `test -f 'MvQService.moc.cpp' || echo '$(srcdir)/'`MvQService.moc.cpp
+
+lib_libMvQtGui_a-MvQService.moc.obj: MvQService.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQService.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Tpo -c -o lib_libMvQtGui_a-MvQService.moc.obj `if test -f 'MvQService.moc.cpp'; then $(CYGPATH_W) 'MvQService.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQService.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQService.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQService.moc.cpp' object='lib_libMvQtGui_a-MvQService.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQService.moc.obj `if test -f 'MvQService.moc.cpp'; then $(CYGPATH_W) 'MvQService.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQService.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQStackedEditor.moc.o: MvQStackedEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQStackedEditor.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Tpo -c -o lib_libMvQtGui_a-MvQStackedEditor.moc.o `test -f 'MvQStackedEditor.moc.cpp' || echo '$(srcdir)/'`MvQStackedEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStackedEditor.moc.cpp' object='lib_libMvQtGui_a-MvQStackedEditor.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQStackedEditor.moc.o `test -f 'MvQStackedEditor.moc.cpp' || echo '$(srcdir)/'`MvQStackedEditor.moc.cpp
+
+lib_libMvQtGui_a-MvQStackedEditor.moc.obj: MvQStackedEditor.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQStackedEditor.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Tpo -c -o lib_libMvQtGui_a-MvQStackedEditor.moc.obj `if test -f 'MvQStackedEditor.moc.cpp'; then $(CYGPATH_W) 'MvQStackedEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStackedEditor.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQStackedEditor.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStackedEditor.moc.cpp' object='lib_libMvQtGui_a-MvQStackedEditor.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQStackedEditor.moc.obj `if test -f 'MvQStackedEditor.moc.cpp'; then $(CYGPATH_W) 'MvQStackedEditor.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStackedEditor.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQTabManager.moc.o: MvQTabManager.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTabManager.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Tpo -c -o lib_libMvQtGui_a-MvQTabManager.moc.o `test -f 'MvQTabManager.moc.cpp' || echo '$(srcdir)/'`MvQTabManager.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTabManager.moc.cpp' object='lib_libMvQtGui_a-MvQTabManager.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTabManager.moc.o `test -f 'MvQTabManager.moc.cpp' || echo '$(srcdir)/'`MvQTabManager.moc.cpp
+
+lib_libMvQtGui_a-MvQTabManager.moc.obj: MvQTabManager.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTabManager.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Tpo -c -o lib_libMvQtGui_a-MvQTabManager.moc.obj `if test -f 'MvQTabManager.moc.cpp'; then $(CYGPATH_W) 'MvQTabManager.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTabManager.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTabManager.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTabManager.moc.cpp' object='lib_libMvQtGui_a-MvQTabManager.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTabManager.moc.obj `if test -f 'MvQTabManager.moc.cpp'; then $(CYGPATH_W) 'MvQTabManager.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTabManager.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQTextEditSearchLine.moc.o: MvQTextEditSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTextEditSearchLine.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.moc.o `test -f 'MvQTextEditSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQTextEditSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTextEditSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQTextEditSearchLine.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.moc.o `test -f 'MvQTextEditSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQTextEditSearchLine.moc.cpp
+
+lib_libMvQtGui_a-MvQTextEditSearchLine.moc.obj: MvQTextEditSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTextEditSearchLine.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.moc.obj `if test -f 'MvQTextEditSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQTextEditSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTextEditSearchLine.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTextEditSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTextEditSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQTextEditSearchLine.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTextEditSearchLine.moc.obj `if test -f 'MvQTextEditSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQTextEditSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTextEditSearchLine.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQTreeView.moc.o: MvQTreeView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeView.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Tpo -c -o lib_libMvQtGui_a-MvQTreeView.moc.o `test -f 'MvQTreeView.moc.cpp' || echo '$(srcdir)/'`MvQTreeView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeView.moc.cpp' object='lib_libMvQtGui_a-MvQTreeView.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeView.moc.o `test -f 'MvQTreeView.moc.cpp' || echo '$(srcdir)/'`MvQTreeView.moc.cpp
+
+lib_libMvQtGui_a-MvQTreeView.moc.obj: MvQTreeView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeView.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Tpo -c -o lib_libMvQtGui_a-MvQTreeView.moc.obj `if test -f 'MvQTreeView.moc.cpp'; then $(CYGPATH_W) 'MvQTreeView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTreeView.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeView.moc.cpp' object='lib_libMvQtGui_a-MvQTreeView.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeView.moc.obj `if test -f 'MvQTreeView.moc.cpp'; then $(CYGPATH_W) 'MvQTreeView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTreeView.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.o: MvQTreeViewSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.o `test -f 'MvQTreeViewSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQTreeViewSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeViewSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.o `test -f 'MvQTreeViewSearchLine.moc.cpp' || echo '$(srcdir)/'`MvQTreeViewSearchLine.moc.cpp
+
+lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.obj: MvQTreeViewSearchLine.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Tpo -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.obj `if test -f 'MvQTreeViewSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQTreeViewSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTreeViewSearchLine.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQTreeViewSearchLine.moc.cpp' object='lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQTreeViewSearchLine.moc.obj `if test -f 'MvQTreeViewSearchLine.moc.cpp'; then $(CYGPATH_W) 'MvQTreeViewSearchLine.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQTreeViewSearchLine.moc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQMemoryWidget.moc.o: MvQMemoryWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMemoryWidget.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQMemoryWidget.moc.o `test -f 'MvQMemoryWidget.moc.cpp' || echo '$(srcdir)/'`MvQMemoryWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMemoryWidget.moc.cpp' object='lib_libMvQtGui_a-MvQMemoryWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMemoryWidget.moc.o `test -f 'MvQMemoryWidget.moc.cpp' || echo '$(srcdir)/'`MvQMemoryWidget.moc.cpp
+
+lib_libMvQtGui_a-MvQMemoryWidget.moc.obj: MvQMemoryWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQMemoryWidget.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQMemoryWidget.moc.obj `if test -f 'MvQMemoryWidget.moc.cpp'; then $(CYGPATH_W) 'MvQMemoryWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMemoryWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQMemoryWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMemoryWidget.moc.cpp' object='lib_libMvQtGui_a-MvQMemoryWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQMemoryWidget.moc.obj `if test -f 'MvQMemoryWidget.moc.cpp'; then $(CYGPATH_W) 'MvQMemoryWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMemoryWidget.moc.cpp'; fi`
+
+lib_libMvQtGui_a-examiner.qrc.o: examiner.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-examiner.qrc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Tpo -c -o lib_libMvQtGui_a-examiner.qrc.o `test -f 'examiner.qrc.cpp' || echo '$(srcdir)/'`examiner.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='examiner.qrc.cpp' object='lib_libMvQtGui_a-examiner.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-examiner.qrc.o `test -f 'examiner.qrc.cpp' || echo '$(srcdir)/'`examiner.qrc.cpp
+
+lib_libMvQtGui_a-examiner.qrc.obj: examiner.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-examiner.qrc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Tpo -c -o lib_libMvQtGui_a-examiner.qrc.obj `if test -f 'examiner.qrc.cpp'; then $(CYGPATH_W) 'examiner.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/examiner.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-examiner.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='examiner.qrc.cpp' object='lib_libMvQtGui_a-examiner.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-examiner.qrc.obj `if test -f 'examiner.qrc.cpp'; then $(CYGPATH_W) 'examiner.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/examiner.qrc.cpp'; fi`
+
+lib_libMvQtGui_a-find.qrc.o: find.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-find.qrc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-find.qrc.Tpo -c -o lib_libMvQtGui_a-find.qrc.o `test -f 'find.qrc.cpp' || echo '$(srcdir)/'`find.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-find.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-find.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='find.qrc.cpp' object='lib_libMvQtGui_a-find.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-find.qrc.o `test -f 'find.qrc.cpp' || echo '$(srcdir)/'`find.qrc.cpp
+
+lib_libMvQtGui_a-find.qrc.obj: find.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-find.qrc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-find.qrc.Tpo -c -o lib_libMvQtGui_a-find.qrc.obj `if test -f 'find.qrc.cpp'; then $(CYGPATH_W) 'find.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/find.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-find.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-find.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='find.qrc.cpp' object='lib_libMvQtGui_a-find.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-find.qrc.obj `if test -f 'find.qrc.cpp'; then $(CYGPATH_W) 'find.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/find.qrc.cpp'; fi`
+
+lib_libMvQtGui_a-keyDialog.qrc.o: keyDialog.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-keyDialog.qrc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Tpo -c -o lib_libMvQtGui_a-keyDialog.qrc.o `test -f 'keyDialog.qrc.cpp' || echo '$(srcdir)/'`keyDialog.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='keyDialog.qrc.cpp' object='lib_libMvQtGui_a-keyDialog.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-keyDialog.qrc.o `test -f 'keyDialog.qrc.cpp' || echo '$(srcdir)/'`keyDialog.qrc.cpp
+
+lib_libMvQtGui_a-keyDialog.qrc.obj: keyDialog.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-keyDialog.qrc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Tpo -c -o lib_libMvQtGui_a-keyDialog.qrc.obj `if test -f 'keyDialog.qrc.cpp'; then $(CYGPATH_W) 'keyDialog.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/keyDialog.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-keyDialog.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='keyDialog.qrc.cpp' object='lib_libMvQtGui_a-keyDialog.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-keyDialog.qrc.obj `if test -f 'keyDialog.qrc.cpp'; then $(CYGPATH_W) 'keyDialog.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/keyDialog.qrc.cpp'; fi`
+
+lib_libMvQtGui_a-window.qrc.o: window.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-window.qrc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-window.qrc.Tpo -c -o lib_libMvQtGui_a-window.qrc.o `test -f 'window.qrc.cpp' || echo '$(srcdir)/'`window.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-window.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-window.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='window.qrc.cpp' object='lib_libMvQtGui_a-window.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-window.qrc.o `test -f 'window.qrc.cpp' || echo '$(srcdir)/'`window.qrc.cpp
+
+lib_libMvQtGui_a-window.qrc.obj: window.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-window.qrc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-window.qrc.Tpo -c -o lib_libMvQtGui_a-window.qrc.obj `if test -f 'window.qrc.cpp'; then $(CYGPATH_W) 'window.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/window.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-window.qrc.Tpo $(DEPDIR)/lib_libMvQtGui_a-window.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='window.qrc.cpp' object='lib_libMvQtGui_a-window.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-window.qrc.obj `if test -f 'window.qrc.cpp'; then $(CYGPATH_W) 'window.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/window.qrc.cpp'; fi`
+
+lib_libMvQtGui_a-MvQOdbDataWidget.moc.o: MvQOdbDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQOdbDataWidget.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQOdbDataWidget.moc.o `test -f 'MvQOdbDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQOdbDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbDataWidget.moc.cpp' object='lib_libMvQtGui_a-MvQOdbDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQOdbDataWidget.moc.o `test -f 'MvQOdbDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQOdbDataWidget.moc.cpp
+
+lib_libMvQtGui_a-MvQOdbDataWidget.moc.obj: MvQOdbDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtGui_a-MvQOdbDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Tpo -c -o lib_libMvQtGui_a-MvQOdbDataWidget.moc.obj `if test -f 'MvQOdbDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQOdbDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOdbDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Tpo $(DEPDIR)/lib_libMvQtGui_a-MvQOdbDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbDataWidget.moc.cpp' object='lib_libMvQtGui_a-MvQOdbDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtGui_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtGui_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtGui_a-MvQOdbDataWidget.moc.obj `if test -f 'MvQOdbDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQOdbDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQOdbDataWidget.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+lib:
+	ln -s ../../lib lib
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp	
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libMvQtGui/MvQAbout.cc b/src/libMvQtGui/MvQAbout.cc
new file mode 100644
index 0000000..e01d746
--- /dev/null
+++ b/src/libMvQtGui/MvQAbout.cc
@@ -0,0 +1,174 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQAbout.h"
+
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QTabWidget>
+#include <QTextStream>
+#include <QVBoxLayout>
+#include <QFile>
+
+#include "MvVersionInfo.h"
+#include "MvPath.hpp"
+
+MvQAbout::MvQAbout(QString title, QString description, Versions version,
+	           QMap<Version,QString> text) : QDialog(0)
+{
+	setWindowTitle(tr("About ") + title);
+	
+	QString versionTxt;
+	QTextStream str(&versionTxt) ;
+
+	QString mvVersionTxt;
+	QTextStream mvStr(&mvVersionTxt) ;
+	
+	if(version.testFlag(GribApiVersion))
+	{
+		str  << "<p><b>GRIB_API version:</b> ";
+
+		if(text.contains(GribApiVersion))
+		{
+			str << text[GribApiVersion];
+		}
+		else
+		{
+			MvGribApiVersionInfo mvInfo;
+			/*long gribapiVersionNumber =  grib.gribapiVersionNumber();
+    			long gribapiMajorVersion  = gribapiVersionNumber / 10000;
+    			long gribapiMinorVersion  = (gribapiVersionNumber - (gribapiMajorVersion * 10000)) / 100;
+    			long gribapiRevisVersion  = gribapiVersionNumber % 100;*/
+		
+			str  << mvInfo.majorVersion() << "." << mvInfo.minorVersion() <<
+                            "." << mvInfo.revision() << " (" << mvInfo.version() << ")";
+		}
+	}
+
+	if(version.testFlag(MetviewVersion))
+	{
+		str << "<p><b>Metview version:</b> ";
+
+	 	if(text.contains(MetviewVersion))
+		{
+			str  << text[MetviewVersion];
+			mvStr << text[MetviewVersion];
+			
+		}
+		else
+		{
+			MvVersionInfo mvInfo;  // the constructor populates the class with information
+			
+			str << mvInfo.majorVersion() << "." << mvInfo.minorVersion() <<
+                                              "." << mvInfo.revision() << " (" << mvInfo.version() << ", " <<
+                                              (sizeof (int *) * 8) << "-bit)";   // could be any pointer, just to get the size
+                                              
+                                              
+                        mvStr  << mvInfo.majorVersion() << "." << mvInfo.minorVersion() <<
+                                              "." << mvInfo.revision() << " (" << mvInfo.version() << ", " <<
+                                              (sizeof (int *) * 8) << "-bit)";  
+					      
+
+			const char *dev  = getenv("METVIEW_VERSION");  // only add dir if using dev version
+			if (dev && (!strcmp(dev, "dev")))
+				str << "<p><b>Metview dir:</b> " << QString(mvInfo.installDir().c_str());
+		} 
+	
+	}
+
+	if(version.testFlag(MagicsVersion))
+	{
+		if(text.contains(MagicsVersion))
+		{
+			str << "<p><b>Magics version:</b> " << text[MagicsVersion];
+		}
+	}
+	
+	if(version.testFlag(NetcdfVersion))
+	{
+		str  << "<p><b>NetCDF version:</b> ";
+		if(text.contains(NetcdfVersion))
+		{
+			str << text[NetcdfVersion];
+		}
+		else
+		{
+			MvNetcdfVersionInfo mvInfo; // the constructor populates the class
+			str  << mvInfo.majorVersion() << "." << mvInfo.minorVersion() <<
+                            "." << mvInfo.revision() << " (" << mvInfo.version() << ")";
+		}
+	}
+	
+	QVBoxLayout *vb=new QVBoxLayout(this);
+	setLayout(vb);
+	
+	//Logo + text
+	
+	QLabel *logo=new QLabel(this);	
+	logo->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
+	logo->setAutoFillBackground(true);
+	QPalette pal=logo->palette();	
+	pal.setBrush(QPalette::Window,Qt::white);
+	logo->setPalette(pal);	
+		
+	QString logoTxt;
+	logoTxt="<table><tr>";
+	logoTxt+="<td><img src=\":/window/metview_logo\"></td>";
+	logoTxt+="<td align=\"left\">";
+	logoTxt+="<h3>  " + title + "</h3>";
+	if(!description.isEmpty())
+	{
+		logoTxt+="<p>" + description + "</p>";
+	}	
+	if(!mvVersionTxt.isEmpty())
+	{
+		logoTxt+="<p>  Metview version: " + mvVersionTxt + "</p>";	
+	}
+	logoTxt+="</td></tr></table>";
+	logo->setText(logoTxt);
+	
+	vb->addWidget(logo);
+
+	//tab
+	QTabWidget *tw=new QTabWidget(this);
+	
+	//Version
+	QLabel *versionLabel=new QLabel(this);
+	versionLabel->setIndent(10);
+	versionLabel->setText(versionTxt);
+	tw->addTab(versionLabel,tr("Version"));
+	
+	//Licence
+	QLabel *licenceLabel=new QLabel(this);
+	//licenceLabel->setAlignment(Qt::AlignJustify); 
+	licenceLabel->setWordWrap(false);
+	licenceLabel->setIndent(10);
+
+	QString licenceTxt;
+	string licenceTextPath = MakeSystemEtcPath("licence_for_about_box.txt");
+	QFile file(licenceTextPath.c_str());
+	if (file.open(QIODevice::ReadOnly))
+	{
+		QTextStream ts(&file);
+		licenceTxt = ts.readAll();
+	}
+	
+	licenceLabel->setText(licenceTxt);
+	tw->addTab(licenceLabel,tr("Licence"));
+	
+	vb->addWidget(tw);
+	
+	// Buttonbox
+	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok,Qt::Horizontal,this);
+	vb->addWidget(buttonBox);
+
+     	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+
+	
+}
diff --git a/src/libMvQtGui/MvQAbout.h b/src/libMvQtGui/MvQAbout.h
new file mode 100644
index 0000000..35004a6
--- /dev/null
+++ b/src/libMvQtGui/MvQAbout.h
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQAbout_H
+#define MvQAbout_H
+
+#include <QDialog>
+#include <QMap>
+#include <QString>
+
+class MvQAbout : public QDialog
+{
+public:
+	enum Version {NoVersion = 0x0, MetviewVersion = 0x1, GribApiVersion = 0x2, EmosVersion = 0x3, MagicsVersion = 0x4, NetcdfVersion = 0x5};
+	Q_DECLARE_FLAGS(Versions,Version);
+
+	typedef QMap<Version,QString> VersionTextMap; 
+	MvQAbout(QString, QString,Versions,VersionTextMap text=VersionTextMap());
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(MvQAbout::Versions);
+
+#endif
diff --git a/src/libMvQtGui/MvQAbstractMessageExaminer.cc b/src/libMvQtGui/MvQAbstractMessageExaminer.cc
new file mode 100644
index 0000000..9acd9be
--- /dev/null
+++ b/src/libMvQtGui/MvQAbstractMessageExaminer.cc
@@ -0,0 +1,915 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QAction>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QFile>
+#include <QFileInfo>
+#include <QInputDialog>
+#include <QLineEdit>
+#include <QMessageBox>
+#include <QProgressDialog>
+#include <QPushButton>
+#include <QSettings>
+#include <QSortFilterProxyModel>
+#include <QSplitter>
+#include <QStackedLayout>
+#include <QStackedWidget>
+#include <QString>
+#include <QStringList>
+#include <QTextBrowser>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "MvQAbstractMessageExaminer.h"
+
+#include "MvFileInfo.h"
+#include "MvKeyProfile.h"
+#include "MvVersionInfo.h"
+#include "LogHandler.h"
+
+#include "MvQKeyDialog.h"
+#include "MvQFileInfoLabel.h"
+#include "MvQKeyManager.h"
+#include "MvQKeyProfileModel.h"
+#include "MvQKeyProfileTree.h"
+#include "MvQLogBrowser.h"
+#include "MvQMainWindow.h"
+#include "MvQTreeViewSearchLine.h"
+#include "MvQTreeView.h"
+
+MvQAbstractMessageExaminer::MvQAbstractMessageExaminer(QString appName,QWidget *parent) : MvQMainWindow(parent), appName_(appName)
+{
+	//File info label        
+	fileInfoLabel_=new MvQFileInfoLabel();
+
+	messageModel_=0;
+	dumpPanel_=0;
+	tmpProfile_=0;
+	
+	//Set up message group box
+	setupMessageBox();
+	
+	//Set up dump group box
+	//setupDumpBox();
+
+	//Set up find panel 
+	setupFindBox();
+
+	//Set up log area 
+	setupLogBox();
+
+	//----------------------
+	// Init
+	//----------------------
+
+	currentMessageNo_=-1;
+
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	setupEditMenu();
+	setupViewMenu();
+	setupSettingsMenu();
+	setupProfilesMenu();
+	setupHelpMenu();
+
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	//Message list selection	
+	connect(messageTree_,SIGNAL(clicked(QModelIndex)),
+		this,SLOT(slotSelectMessage(QModelIndex)));
+
+	connect(messageTree_,SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotSelectMessage(QModelIndex)));
+
+	connect(messageTree_,SIGNAL(profileChanged(bool)),
+		this,SLOT(slotProfileChanged(bool)));
+
+	connect(messageModel_,SIGNAL(keyInserted()),
+		this,SLOT(slotReloadProfile()));
+	
+}
+ 
+MvQAbstractMessageExaminer::~MvQAbstractMessageExaminer()
+{	
+	if(messageModel_) delete messageModel_;
+	if(tmpProfile_) delete tmpProfile_;
+	keyManager_->saveProfiles();
+}
+
+void MvQAbstractMessageExaminer::close()
+{
+	saveProfileBeforeAction(false);
+}
+
+void MvQAbstractMessageExaminer::setupMessageBox()
+{
+	//--------------------------------
+	// Message tree (key profile)
+	//--------------------------------
+
+	messagePanel_=new QWidget;
+	messageLayout_ = new QVBoxLayout;
+	messageLayout_->setContentsMargins(0,0,0,0);
+	messagePanel_->setLayout(messageLayout_);
+	//messageSplitter_->addWidget(messageWidget);	
+
+	//Label
+	//label=new QLabel(tr("Messages"));
+	//label->setFrameShape(QFrame::StyledPanel);
+	//label->setProperty("mvStyle","panel");
+	//messageLayout_->addWidget(label);
+
+	//Message tree
+	messageModel_= new MvQKeyProfileModel;
+	messageSortModel_= new MvQKeyProfileSortFilterModel;
+        messageSortModel_->setSourceModel(messageModel_);
+	messageSortModel_->setDynamicSortFilter(true);
+	messageSortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	messageSortModel_->setFilterFixedString("1");
+	messageSortModel_->setFilterKeyColumn(0);
+
+	messageTree_=new MvQKeyProfileTree(messageModel_,messageSortModel_);
+	messageTree_->setUniformRowHeights(true);
+
+	messageLayout_->addWidget(messageTree_);	
+}
+
+void MvQAbstractMessageExaminer::setupFindBox()
+{	
+	messageFind_= new MvQTreeViewSearchLine(messageTree_,1,"");
+	//connect(messageModel_,SIGNAL(modelReset()),
+	//	messageFind_,SLOT(slotUpdateColumns()));
+
+	findPanel_=new MvQDualSearchLinePanel;
+	findPanel_->addSearchLineToLeft(messageFind_,messageTree_);
+	findPanel_->hide();
+
+}
+
+void MvQAbstractMessageExaminer::setupLogBox()
+{	
+	QVBoxLayout *logLayout = new QVBoxLayout;
+        logLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	logLayout->setContentsMargins(0,0,0,0);
+	logLayout->setSpacing(1);
+
+	logPanel_=new QWidget;
+	logPanel_->setMinimumHeight(110);
+	logPanel_->setLayout(logLayout);
+	
+	QHBoxLayout *hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	logLayout->addLayout(hb);
+
+	//Label
+	QLabel *label = new QLabel(tr("Log"));
+	label->setFrameShape(QFrame::StyledPanel);
+	label->setProperty("mvStyle","panel");
+
+	//QLabel *label1 = new QLabel();
+	//label1->setPixmap(QPixmap(QString::fromUtf8(":/examiner/log.png")).scaled(16,16));
+
+	//hb->addWidget(label1);
+	hb->addWidget(label,1);
+
+	//Clear button
+	QPushButton *clearPb = new QPushButton(tr("Clear log"));
+	hb->addWidget(clearPb);
+
+	//Log browser
+	logBrowser_= new MvQLogBrowser(logLayout);
+
+	connect(clearPb,SIGNAL(clicked(bool)),
+		this,SLOT(slotClearLog(bool)));
+
+	connect(this,SIGNAL(logOutputChanged()),
+		this,SLOT(slotUpdateLogOutput()));
+}
+	
+/*void MvQAbstractMessageExaminer::setupDumpBox()
+{
+	dumpPanel_=new QWidget;
+	QVBoxLayout *dumpLayout = new QVBoxLayout;
+	dumpLayout->setContentsMargins(0,0,0,0);
+	dumpPanel_->setLayout(dumpLayout);	
+
+	//Title
+	QLabel *titleLabel=new QLabel(tr("Meta data of the selected message"));
+	titleLabel->setFrameShape(QFrame::StyledPanel);
+	dumpLayout->addWidget(titleLabel);
+}*/
+
+
+void MvQAbstractMessageExaminer::setupViewMenu()
+{
+	//
+	actionFileInfo_ = new QAction(this);
+        actionFileInfo_->setObjectName(QString::fromUtf8("actionFileInfo"));
+	actionFileInfo_->setText(tr("&File info"));
+	actionFileInfo_->setCheckable(true);
+	actionFileInfo_->setChecked(true);
+	actionFileInfo_->setToolTip(tr("View file info"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/fileInfo.svg")), QIcon::Normal, QIcon::Off);
+ 	actionFileInfo_->setIcon(icon);	
+
+	//Define routines
+	connect(actionFileInfo_,SIGNAL(toggled(bool)),
+		fileInfoLabel_,SLOT(setVisible(bool)));
+
+	//
+	actionLog_ = new QAction(this);
+        actionLog_->setObjectName(QString::fromUtf8("actionLog"));
+	actionLog_->setText(tr("&Log"));
+	actionLog_->setCheckable(true);
+	actionLog_->setChecked(true);
+	actionLog_->setToolTip(tr("View log"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/examiner/log.svg")), QIcon::Normal, QIcon::Off);
+ 	actionLog_->setIcon(icon1);	
+
+	//Define routines
+	connect(actionLog_,SIGNAL(toggled(bool)),
+		logPanel_,SLOT(setVisible(bool)));
+
+	//Log is hidden by default!!!
+	actionLog_->setChecked(false);
+	
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFileInfo_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLog_));
+}
+
+void MvQAbstractMessageExaminer::setupEditMenu()
+{
+	actionFind_=MvQMainWindow::createAction(MvQMainWindow::FindAction,this);
+	connect(actionFind_,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(setHidden(bool)));
+				
+	QAction *actionFindNext=MvQMainWindow::createAction(MvQMainWindow::FindNextAction,this);
+	connect(actionFindNext,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindNext(bool)));	
+		
+	QAction *actionFindPrev=MvQMainWindow::createAction(MvQMainWindow::FindPreviousAction,this);
+	connect(actionFindPrev,SIGNAL(triggered(bool)),
+		findPanel_,SLOT(slotFindPrev(bool)));
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::EditMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFind_,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindNext,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFindPrev,MvQMenuItem::MenuTarget));
+}
+
+void MvQAbstractMessageExaminer::setupSettingsMenu()
+{
+}
+
+void MvQAbstractMessageExaminer::setupProfilesMenu()
+{
+	//
+	QAction* actionNew = new QAction(this);
+        actionNew->setObjectName(QString::fromUtf8("actionProfileNew"));
+	actionNew->setText(tr("&New profile"));
+	actionNew->setToolTip(tr("Create new key profile"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/keyDialog/profile_add.svg")), QIcon::Normal, QIcon::Off);
+ 	actionNew->setIcon(icon);
+	
+	actionSave_ = new QAction(this);
+        actionSave_->setObjectName(QString::fromUtf8("actionProfileSave"));
+	actionSave_->setText(tr("&Save profile"));
+	actionSave_->setToolTip(tr("Save key profile"));
+	QIcon icon1;
+	icon1.addPixmap(QPixmap(QString::fromUtf8(":/keyDialog/profile_save.svg")), QIcon::Normal, QIcon::Off);
+ 	actionSave_->setIcon(icon1);
+	actionSave_->setEnabled(false);
+
+	QAction* actionSaveAs = new QAction(this);
+        actionSaveAs->setObjectName(QString::fromUtf8("actionProfileSaveAs"));
+	actionSaveAs->setText(tr("&Duplicate profile ..."));
+	actionSaveAs->setToolTip(tr("Duplicate key profile"));
+	QIcon icon2;
+	icon2.addPixmap(QPixmap(QString::fromUtf8(":/keyDialog/profile_duplicate.svg")), QIcon::Normal, QIcon::Off);
+ 	actionSaveAs->setIcon(icon2);
+
+	QAction* actionProfileManager = new QAction(this);
+        actionProfileManager->setObjectName(QString::fromUtf8("actionKeyProfileManager"));
+	actionProfileManager->setText(tr("&Manage profiles"));
+	actionProfileManager->setToolTip(tr("Manage key profiles"));
+	QIcon icon3;
+	icon3.addPixmap(QPixmap(QString::fromUtf8(":/keyDialog/profile_manage.svg")), QIcon::Normal, QIcon::Off);
+ 	actionProfileManager->setIcon(icon3);
+	actionProfileManager->setToolTip(tr("Key profile manager"));
+
+	/*QAction* actionExport = new QAction(this);
+        actionExport->setObjectName(QString::fromUtf8("actionProfileExport"));
+	actionExport->setText(tr("&Export"));
+	actionExport->setToolTip(tr("Export key profiles"));
+
+	QAction* actionImport = new QAction(this);
+        actionImport->setObjectName(QString::fromUtf8("actionProfileImport"));
+	actionImport->setText(tr("&Import"));
+	actionImport->setToolTip(tr("Import key profiles"));*/
+
+ 	
+	//Key profile management
+
+	connect(actionNew, SIGNAL(triggered()), 
+		this, SLOT(slotCreateNewProfile()));
+
+	connect(actionSave_, SIGNAL(triggered()), 
+		this, SLOT(slotSaveCurrentProfile()));
+
+	connect(actionSaveAs, SIGNAL(triggered()), 
+		this, SLOT(slotSaveAsCurrentProfile()));
+
+	connect(actionProfileManager, SIGNAL(triggered()), 
+		this, SLOT(slotManageKeyProfiles()));
+
+	
+	//Combo box
+	//We will add items + signal/slots later in "init"!
+	QHBoxLayout *hb=new  QHBoxLayout;
+
+	//Combo box for key profile selection
+	QLabel *keyLabel = new QLabel(tr("Key profile:"));
+	keyCombo_ = new QComboBox;
+	keyLabel->setBuddy(keyCombo_);
+
+	hb->addWidget(keyLabel);
+	hb->addWidget(keyCombo_);
+	QWidget* wh=new QWidget;
+	wh->setLayout(hb);
+
+	//MvQMenuItem::MenuTarget
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ProfilesMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionNew));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionSave_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionSaveAs));	
+	//menuItems_["profiles"].push_back(new MvQMenuItem(actionExport,MvQMenuItem::MenuTarget));
+	//menuItems_["profiles"].push_back(new MvQMenuItem(actionImport,MvQMenuItem::MenuTarget));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionProfileManager));
+	//menuItems_["profiles"].push_back(new MvQMenuItem(actionKeyManager,MvQMenuItem::MenuTarget));	
+	menuItems_[menuType].push_back(new MvQMenuItem(wh));
+}
+
+void MvQAbstractMessageExaminer::setupHelpMenu()
+{		
+    	// About
+    	QAction *actionAbout = new QAction(this);
+    	actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
+    	QIcon icon;
+    	icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+    	actionAbout->setIcon(icon);
+    	actionAbout->setText(tr("&About ") +  appName_);
+
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+
+
+void MvQAbstractMessageExaminer::init(MvMessageMetaData *data,MvQKeyManager *manager)
+{	
+	data_=data;
+	keyManager_=manager;
+
+	data_->registerObserver(this);
+
+	QFileInfo info(QString::fromStdString(data_->fileName()));
+	fileSize_=info.size();
+
+	//----------------------------------
+	// Initilaize the key profile list
+	//---------------------------------
+
+	//Init key combo
+   	int currentIndex=0;
+	for (unsigned int i=0; i < keyManager_->data().size();i++) 
+	{
+		QString str(keyManager_->data().at(i)->name().c_str());
+		keyCombo_->addItem(str);
+		if(savedKeyProfileName_==str)
+		{
+			currentIndex=i;
+		}
+		if(keyManager_->data().at(i)->systemProfile())
+		{
+			keyCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+		
+	}
+
+	keyCombo_->setCurrentIndex(-1);
+	
+	connect(keyCombo_, SIGNAL(currentIndexChanged(int)),  
+		this,SLOT(slotLoadKeyProfile(int)));
+
+
+	keyCombo_->setCurrentIndex(currentIndex);
+
+	//Set tree focus
+	messageTree_->setFocus(Qt::OtherFocusReason);
+
+	
+	messageTree_->setPredefinedKeysOnly(keyManager_->predefinedKeysOnly());
+
+
+	//Init dump panel
+	initDumps();
+
+	//Fileinfo label
+	updateFileInfoLabel();
+
+	//Get all keys
+	//Init dump panel
+	initAllKeys();
+}
+
+void MvQAbstractMessageExaminer::setCurrentKeyProfileName(QString name)
+{
+	if(keyManager_)
+	{
+		for(unsigned int i=0; i < keyManager_->data().size(); i++)
+		{
+			QString str(keyManager_->data().at(i)->name().c_str());
+			if(str == name)
+			{
+				keyCombo_->setCurrentIndex(i);
+				break;
+			}
+		}
+	}
+}
+
+void MvQAbstractMessageExaminer::slotLoadKeyProfile(int index)
+{
+	//qDebug() << "loadKeyProfile " << index  << " " << keyManager_->data().size();
+
+	saveProfileBeforeAction(false);
+
+	if(index != -1) 
+	{
+		loadKeyProfile(keyManager_->data().at(index));
+		slotUpdateLogOutput();
+		//emit keyProfileLoaded(keyManager_->data().at(index));	
+	}
+}
+
+void MvQAbstractMessageExaminer::loadKeyProfile(MvKeyProfile *prof)
+{	
+	emit statusMessage(tr("Load new keyprofile ..."));
+
+	messageModel_->keyProfileIsAboutToChange();
+
+	//Create a tmp profile with contents of the current profile
+	if(tmpProfile_)
+	{
+		delete tmpProfile_;
+	}
+	tmpProfile_= new MvKeyProfile(*prof);
+
+	//Update grib metadata with the new key profile
+	loadKeyProfileCore(tmpProfile_);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	messageModel_->setKeyProfile(tmpProfile_);
+
+	for(int i=0;i < messageModel_->columnCount()-1; i++)
+	{ 
+		messageTree_->resizeColumnToContents(i);
+	}
+
+	messageTree_->setCurrentIndex(messageSortModel_->index(0,0));
+
+
+	if(prof->systemProfile())
+	{
+		messageTree_->setEditable(false);
+	}
+	else
+	{
+		messageTree_->setEditable(true);
+	}
+
+	slotSelectMessage(messageTree_->currentIndex());
+	
+}
+
+void MvQAbstractMessageExaminer::loadKeyProfileCore(MvKeyProfile *prof)
+{
+	int num;
+
+	if(data_->useMessageSizeForProgressIndicator())
+	{
+		num=fileSize_;
+	}
+	else
+	{
+		num=data_->messageNum();
+		if(num == 0)
+		{
+			num=data_->getEstimatedMessageNum();
+		}
+	}
+
+	if(num>0)
+	{	
+		int minDuration=1000.;
+		if(fileSize_> 5000000)
+		{
+			minDuration=0;
+		}
+
+	
+		QProgressDialog progress("Scan " + messageType_ + " messages ...", QString(), 0, num);
+		progress.setWindowModality(Qt::WindowModal);
+		progress.setMinimumDuration(minDuration);
+
+		connect(this,SIGNAL(messageScanProgess(int)),
+			&progress,SLOT(setValue(int)));
+	
+		progress.setValue(0);
+
+		//Update grib metadata with the new key profile
+		data_->loadKeyProfile(prof);
+
+		//progress.setValue(num);
+	}
+	else
+	{
+		data_->loadKeyProfile(prof);
+	}
+
+	emit logOutputChanged();
+}
+
+void MvQAbstractMessageExaminer::slotSelectMessage(int msgCnt)
+{
+	QModelIndex srcIndex=messageModel_->index(msgCnt,0);
+	messageTree_->setCurrentIndex(messageSortModel_->mapFromSource(srcIndex));
+	slotSelectMessage(messageTree_->currentIndex()); 
+}
+
+void MvQAbstractMessageExaminer::slotSelectMessage(QModelIndex index)
+{	
+	int cnt=messageSortModel_->mapToSource(index).row(); 
+
+	string fdump;
+
+	if(currentMessageNo_ == cnt)
+	{
+		return;
+	}
+
+	currentMessageNo_=cnt;
+
+	//Override cursor
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+
+	//Load dumps
+	loadDumps();
+
+
+	//Save the expand state of the current wmoDumpTree
+	/*QModelIndexList indexLst=wmoDumpModel_->match(wmoDumpModel_->index(0,0),
+			    Qt::DisplayRole,"*",-1,
+		            Qt::MatchWildcard | Qt::MatchRecursive);
+	
+	QModelIndexList expandLst;
+	foreach(QModelIndex index,indexLst)
+	{
+		if(wmoDumpTree_->isExpanded(index))
+			expandLst << index;
+	}	
+
+	mvDumpLoaded_=false;
+	wmoDumpLoaded_=false;
+	stdDumpLoaded_=false;
+
+	//Generate and read grib dumps
+	switch(dumpCombo_->currentIndex())
+	{
+	case 0:
+		loadMvDump();
+		break;
+	case 1:
+		loadStdDump();
+		break;
+	case 2:
+		loadWmoDump();
+		break;
+	default:
+		break;
+	}
+
+	//Try to restore the expand state of the wmoDumpTree
+	foreach(QModelIndex index,expandLst)
+	{
+		if(wmoDumpModel_->hasChildren(index))
+		{
+			wmoDumpTree_->setExpanded(index,true);
+		}
+	}*/	
+
+	//Log
+	slotUpdateLogOutput();
+
+	//emit messageSelected(currentMessageNo_);
+
+	//Preview plot
+	//createPlot();
+
+	//Log
+	//updateLogOutput();
+
+	//Restore cursor
+	QApplication::restoreOverrideCursor();
+}
+
+void MvQAbstractMessageExaminer::slotReloadProfile()
+{
+	emit statusMessage(tr("Reload key profile ..."));
+
+	//This slot is "called" from MvQKeyProfile model if new key is inserted.
+	//It is called between beginResetModel() and endResetModel() calls!!
+
+	//Get the current profile from the model.
+	//If everything is fine this must be the tmpProfile_
+	MvKeyProfile* prof = messageModel_->keyProfile();
+
+	//Clear the data
+	if(prof != 0)
+		prof->clearKeyData();	
+
+	//Update grib metadata with the new key profile
+	loadKeyProfileCore(prof);
+
+	for(int i=0;i < messageModel_->columnCount()-1; i++)
+	{ 
+		messageTree_->resizeColumnToContents(i);
+	}
+
+	messageTree_->setCurrentIndex(messageSortModel_->index(0,0));
+	slotSelectMessage(messageTree_->currentIndex());
+
+	actionSave_->setEnabled(true);
+	//keyManager_->saveProfiles();
+}
+
+void MvQAbstractMessageExaminer::slotProfileChanged(bool reload)
+{
+	actionSave_->setEnabled(true);
+	if(reload)
+	{
+		slotReloadProfile();
+	}
+
+	//keyManager_->saveProfiles();
+}
+
+void MvQAbstractMessageExaminer::slotCreateNewProfile()
+{
+	bool ok;
+     	QString text = QInputDialog::getText(0, tr("New profile"),
+                                          tr("New profile name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        {
+	 	keyManager_->addProfile(text.toStdString());		
+		keyCombo_->addItem(text);
+		keyCombo_->setCurrentIndex(keyCombo_->count()-1);
+		actionSave_->setEnabled(false);
+	}
+}
+
+void MvQAbstractMessageExaminer::slotSaveCurrentProfile()
+{
+	if(!tmpProfile_)
+		return;
+
+	keyManager_->changeProfile(tmpProfile_->name(),tmpProfile_);
+	actionSave_->setEnabled(false);
+}
+
+void MvQAbstractMessageExaminer::slotSaveAsCurrentProfile()
+{
+	if(!tmpProfile_)
+		return;
+
+	bool ok;
+     	QString text = QInputDialog::getText(0, tr("Duplicate profile"),
+                                          tr("New profile name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        { 	
+		keyManager_->addProfile(text.toStdString(),tmpProfile_);
+		keyCombo_->addItem(text);
+		keyCombo_->setCurrentIndex(keyCombo_->count()-1);
+		actionSave_->setEnabled(false);
+	}
+
+
+//keyManager_->changeProfile(tmpProfile_->name(),tmpProfile_);
+	//actionSave_->setEnabled(false);
+}
+
+
+void MvQAbstractMessageExaminer::messageScanStepChanged(int step)
+{
+	emit messageScanProgess(step);
+}
+
+//-----------------------------------------------------
+// Key manager
+//-----------------------------------------------------
+
+void MvQAbstractMessageExaminer::slotManageKeyProfiles()
+{	
+	saveProfileBeforeAction(false);
+	
+	MvQKeyManager::KeyType type;
+	if(messageType_== "GRIB")
+	{
+		type=MvQKeyManager::GribType;
+	}
+	else if(messageType_== "BUFR")
+	{
+		type=MvQKeyManager::BufrType;
+	}
+	else
+	{
+		return;
+	}
+
+	//Create a tmp copy of the whole manager (no data
+	//values, just key descriptions)
+	MvQKeyManager *tmpManager=keyManager_->clone();
+
+	MvQKeyDialog profDialog("Metview - " + messageType_ + tr(" Key Profile Manager"),type,tmpManager,keyCombo_->currentIndex(),allKeys_);
+
+	if(profDialog.exec()  == QDialog::Accepted)
+	{
+		//Save the current profile name
+		string currentProfName=keyCombo_->currentText().toStdString(); 
+		
+		messageModel_->keyProfileIsAboutToChange();
+		messageModel_->setKeyProfile(0);
+
+		keyManager_->update(tmpManager);
+		keyManager_->saveProfiles();
+
+		disconnect(keyCombo_, SIGNAL(currentIndexChanged(int)),0,0);
+
+		//Clear the profile list
+		keyCombo_->clear();
+
+		//resetMessageHeader();
+
+		int i=0;
+		int index=-1;
+		for (vector<MvKeyProfile*>::const_iterator it=keyManager_->data().begin(); it != keyManager_->data().end(); it++) 
+		{
+			keyCombo_->addItem(QString((*it)->name().c_str() ));
+			if((*it)->name()== currentProfName)
+			{
+				index=i;
+			}
+			if(keyManager_->data().at(i)->systemProfile())
+			{
+				keyCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+			}
+
+			i++;
+		}
+
+		keyCombo_->setCurrentIndex(-1);
+
+		connect(keyCombo_, SIGNAL(currentIndexChanged(int)),  
+			this,SLOT(slotLoadKeyProfile(int)));
+
+		if(index != -1)
+		{
+			keyCombo_->setCurrentIndex(index);
+		}
+		else
+		{
+			keyCombo_->setCurrentIndex(0);
+		}
+	}
+
+	delete tmpManager;
+}
+
+
+bool MvQAbstractMessageExaminer::saveProfileBeforeAction(bool offerCancel)
+{
+	if(actionSave_->isEnabled() == false)
+		return true;
+	
+	QString str=tr("The current key profile as been modified.<br>Do you want to save your changes or discard them?");
+
+ 	QMessageBox msgBox;
+	msgBox.setWindowTitle(tr("Save changes to current profile"));
+	msgBox.setText(str);
+	msgBox.setIcon(QMessageBox::Warning);
+
+	if(offerCancel)
+	{
+ 		msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+	}
+	else
+	{
+		msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard);
+	}
+
+	msgBox.setDefaultButton(QMessageBox::Save);
+	int ret=msgBox.exec();
+
+	switch (ret) 
+	{
+   	case QMessageBox::Save:
+		slotSaveCurrentProfile();				
+		break;
+   	case QMessageBox::Cancel:
+		return false;	
+       		break;
+   	default:
+      	 	break;
+	}
+
+	actionSave_->setEnabled(false);
+
+	return true;
+}
+
+
+void MvQAbstractMessageExaminer::slotUpdateLogOutput()
+{
+	QString buf;
+
+	for(vector<LogItem*>::const_iterator it = LogHandler::instance()->item().begin(); 
+	     it != LogHandler::instance()->item().end(); it++)
+	{
+		LogItem *log=*it;
+
+
+		if(log->errorStatus()) 
+		{
+			buf="<b>Status: </b><font color=red>FAILED</font>";
+			emit statusMessage(buf);
+			break;
+		}
+		else
+		{
+			buf="<b>Status: </b><font color=green>OK</font>";
+			emit statusMessage(buf);
+		}
+	}
+
+	logBrowser_->update();
+}
+
+
+void MvQAbstractMessageExaminer::slotClearLog(bool)
+{
+	LogHandler::instance()->clear();
+	logBrowser_->clear();
+}
+
+
+QString MvQAbstractMessageExaminer::currentKeyProfileName() 
+{
+	return keyCombo_->currentText();
+}
diff --git a/src/libMvQtGui/MvQAbstractMessageExaminer.h b/src/libMvQtGui/MvQAbstractMessageExaminer.h
new file mode 100644
index 0000000..6062f7d
--- /dev/null
+++ b/src/libMvQtGui/MvQAbstractMessageExaminer.h
@@ -0,0 +1,143 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQAbstractMessageExaminer_H
+#define MvQAbstractMessageExaminer_H
+
+#include <QModelIndex>
+#include <QSettings>
+
+#include "MvQMenuItem.h"
+#include "MvQSearchLinePanel.h"
+
+#include "MvMessageMetaData.h"
+
+#include "MvQMainWindow.h"
+
+class QAction;
+class QComboBox;
+class QLabel;
+class QSortFilterProxyModel;
+class QSplitter;
+class QStackedLayout;
+class QVBoxLayout;
+
+class MvKeyProfile;
+
+class MvQFileInfoLabel;
+class MvQKeyManager;
+class MvQKeyProfileModel;
+class MvQKeyProfileSortFilterModel;
+class MvQKeyProfileTree;
+class MvQLogBrowser;
+class MvQTreeViewSearchLine;
+class MvQTreeView;
+
+class MvQAbstractMessageExaminer : public MvQMainWindow, public MvMessageMetaDataObserver
+{
+    Q_OBJECT
+
+public:
+    	MvQAbstractMessageExaminer(QString,QWidget *parent = 0);
+    	~MvQAbstractMessageExaminer();
+    	void init(MvMessageMetaData*,MvQKeyManager *);
+
+	MvQFileInfoLabel* fileInfoLabel() {return fileInfoLabel_;}
+	QSplitter* messageSplitter() {return messageSplitter_;}
+	QWidget* messagePanel() {return messagePanel_;}
+	QWidget* dumpPanel() {return dumpPanel_;}
+	QWidget* findPanel() {return findPanel_;}
+	QWidget* logPanel() {return logPanel_;}
+	const MvQMainWindow::MenuItemMap& menuItems () {return menuItems_;}
+	QString currentKeyProfileName();
+	void setCurrentKeyProfileName(QString);
+	void close();
+
+public slots:
+	void slotSelectMessage(QModelIndex);
+	void slotSelectMessage(int);
+	void slotManageKeyProfiles();
+	void slotLoadKeyProfile(int);
+	void slotReloadProfile();
+	void slotProfileChanged(bool);
+	void slotCreateNewProfile();
+	void slotSaveCurrentProfile();
+	void slotSaveAsCurrentProfile();
+	virtual void slotShowAboutBox()=0;
+	void slotClearLog(bool);
+	void slotUpdateLogOutput();
+	
+signals:
+	void logOutputChanged();
+	void messageScanProgess(int);
+	void statusMessage(QString);
+
+protected:
+	virtual void setupEditMenu();
+	virtual void setupViewMenu();
+	virtual void setupSettingsMenu();
+	virtual void setupProfilesMenu();
+	virtual void setupHelpMenu();
+	void setupMessageBox();
+	virtual void setupDumpBox()=0;
+ 	void setupFindBox();
+ 	void setupLogBox();
+
+	virtual void loadKeyProfile(MvKeyProfile *);
+	void loadKeyProfileCore(MvKeyProfile *);
+
+	virtual void initDumps()=0;
+	virtual void loadDumps()=0;
+	virtual void initAllKeys()=0;
+	bool saveProfileBeforeAction(bool);
+	void messageScanStepChanged(int);
+	virtual void updateFileInfoLabel()=0;
+
+	QString messageType_;
+	QString appName_;
+
+	MvMessageMetaData *data_;
+ 	int currentMessageNo_;
+
+	MvQMainWindow::MenuItemMap menuItems_;
+
+	MvQFileInfoLabel*  fileInfoLabel_;
+
+	QVBoxLayout *messageLayout_;
+	QWidget*     dumpPanel_;
+
+	QComboBox*   keyCombo_;
+
+	QWidget*     messagePanel_;
+	QSplitter*     messageSplitter_; 	
+	MvQKeyProfileTree*   messageTree_;
+	MvQKeyProfileModel* messageModel_;
+	MvQKeyProfileSortFilterModel* messageSortModel_;
+
+	MvQKeyManager *keyManager_;
+	MvKeyProfile* tmpProfile_;
+	QAction* actionSave_;
+
+	QString savedKeyProfileName_;
+	QAction* actionFileInfo_;
+	QAction* actionLog_;
+
+	QWidget*     logPanel_;
+	MvQLogBrowser* logBrowser_;
+
+	QList<MvKeyProfile*> allKeys_;
+
+	qint64 fileSize_;
+	
+	QAction *actionFind_;
+	MvQDualSearchLinePanel* findPanel_;
+	MvQTreeViewSearchLine* messageFind_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQAbstractSearchLine.cc b/src/libMvQtGui/MvQAbstractSearchLine.cc
new file mode 100644
index 0000000..8a9c988
--- /dev/null
+++ b/src/libMvQtGui/MvQAbstractSearchLine.cc
@@ -0,0 +1,97 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+
+#include "MvQAbstractSearchLine.h"
+
+MvQAbstractSearchLine::MvQAbstractSearchLine(QString searchLabelText,QWidget* parent) : QWidget(parent)
+{
+	layout_= new QHBoxLayout;
+	layout_->setContentsMargins(0,0,0,0);
+  	setLayout(layout_);
+	
+  	label_ = new QLabel(tr("&Find"));
+	
+	searchLine_= new QLineEdit;
+	searchLine_->setMinimumWidth(200);
+
+	label_->setBuddy(searchLine_);
+	
+	nextPb_ = new QPushButton(tr("&Next"));
+	nextPb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/find/next.svg"))));
+
+	prevPb_= new QPushButton(tr("&Previous"));
+	prevPb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/find/prev.svg"))));	
+
+	layout_->addWidget(label_);	
+	layout_->addWidget(searchLine_);
+	layout_->addWidget(nextPb_);
+	layout_->addWidget(prevPb_);
+	layout_->addStretch(1);
+
+	connect(searchLine_, SIGNAL( textChanged(QString)), 
+		this, SLOT(slotFind(QString)));
+
+	connect(searchLine_, SIGNAL( returnPressed()), 
+		this, SLOT(slotFindNext()));
+
+	connect(nextPb_, SIGNAL(clicked()), 
+		this, SLOT(slotFindNext()));
+
+	connect(prevPb_, SIGNAL(clicked()), 
+		this, SLOT(slotFindPrev()));
+
+
+	oriColour_=QColor(searchLine_->palette().color(QPalette::Base));
+	redColour_=QColor(255,102,102);
+	greenColour_=QColor(186,249,206);
+	
+	status_=true;
+}
+
+MvQAbstractSearchLine::~MvQAbstractSearchLine()
+{
+	clear();
+}
+
+void MvQAbstractSearchLine::clear()
+{
+	searchLine_->clear();	
+}
+	
+void MvQAbstractSearchLine::updateButtons(bool found)
+{
+	status_=found;
+
+	if(searchLine_->text().isEmpty())
+	{
+	  	QPalette p=searchLine_->palette();
+		p.setColor(QPalette::Base,oriColour_);
+		searchLine_->setPalette(p);
+	}	
+	else
+	{
+		if(!found)	
+		{
+			QPalette p=searchLine_->palette();
+			p.setColor(QPalette::Base,redColour_);
+			searchLine_->setPalette(p);
+		}
+		else 
+		{
+			QPalette p=searchLine_->palette();
+			p.setColor(QPalette::Base,greenColour_);
+			searchLine_->setPalette(p);
+		}
+	}	
+}
diff --git a/src/libMvQtGui/MvQAbstractSearchLine.h b/src/libMvQtGui/MvQAbstractSearchLine.h
new file mode 100644
index 0000000..66eeb1b
--- /dev/null
+++ b/src/libMvQtGui/MvQAbstractSearchLine.h
@@ -0,0 +1,55 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQAbstractSearchLine_H
+#define MvQAbstractSearchLine_H
+
+#include <QColor>
+#include <QWidget>
+
+class QColor;
+class QHBoxLayout;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+
+using namespace std;
+
+class MvQAbstractSearchLine : public QWidget
+{
+   Q_OBJECT
+
+public:
+	MvQAbstractSearchLine(QString,QWidget *parent=0);
+	~MvQAbstractSearchLine(); 
+	virtual void clear();
+
+public slots:	
+	virtual void slotFind(QString)=0;
+	virtual void slotFindNext()=0;
+	virtual void slotFindPrev()=0;
+
+protected:
+	void updateButtons(bool);
+
+	QLabel* label_;
+	QHBoxLayout* layout_;
+	QLineEdit*   searchLine_;
+	QPushButton* nextPb_;
+	QPushButton* prevPb_;
+
+	bool status_;
+
+	QColor   oriColour_;	
+	QColor   redColour_;
+	QColor   greenColour_;
+};
+
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQApplication.cc b/src/libMvQtGui/MvQApplication.cc
new file mode 100644
index 0000000..759e110
--- /dev/null
+++ b/src/libMvQtGui/MvQApplication.cc
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+
+#include <MvTemplates.h>
+
+#include "MvQApplication.h"
+#include "PmContext.h"
+
+MvQApplication::MvQApplication(int& ac, char** av, const char* name) : 
+	MvQX11Application(ac,av,name),
+	MvApplication(ac,av,name)
+{
+	// Create socket notifier
+	// The dataReceived function will be called everytime
+	// there is data available in the socket
+	int sockfd = getService()->soc;
+	sn_ = new QSocketNotifier( sockfd, QSocketNotifier::Read);
+	QObject::connect( sn_, SIGNAL(activated(int)),
+					this, SLOT(slotDataReceived(int)) );
+}
+
+MvQApplication::~MvQApplication()
+{
+}
+
+void MvQApplication::slotDataReceived(int)
+{
+	//Disable the notifier
+	//Process data from the socket
+	//Re-enable the notifier if you are interested in more data
+//	const QMetaObject *tt = metaObject ();
+//	sn_->setEnabled(false);
+
+	process_service(getService());
+
+//	sn_->setEnabled(true);
+}
+
+void MvQApplication::processDropRequest(MvRequest* req)
+{
+	send_drop_info(getService(),"MetviewUI",*req,0);
+}
diff --git a/src/libMvQtGui/MvQApplication.h b/src/libMvQtGui/MvQApplication.h
new file mode 100644
index 0000000..0e156b1
--- /dev/null
+++ b/src/libMvQtGui/MvQApplication.h
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQApplication_H
+#define MvQApplication_H
+
+#include <QtGui/QApplication>
+#include <QWidget>
+
+#include <MvRequest.h>
+#include <MvProtocol.h>
+#include <qsocketnotifier.h>
+
+#include "MvQDragDrop.h"
+#include "MvQX11Application.h"
+
+using namespace std;
+
+class MvQApplication : public MvQX11Application, public MvApplication
+{
+   Q_OBJECT
+
+public:
+	// Constructor
+	MvQApplication(int& ac, char** av, const char* name=NULL);
+
+	// Destructor
+	virtual ~MvQApplication();
+
+public slots:
+	void slotDataReceived(int);
+	void processDropRequest(MvRequest*);
+
+private:
+	// No copy allowed
+	MvQApplication(const MvQApplication&);
+	MvQApplication& operator=(const MvQApplication&){return *this;}
+
+	QSocketNotifier *sn_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQCheckBoxCombo.cc b/src/libMvQtGui/MvQCheckBoxCombo.cc
new file mode 100644
index 0000000..167eb6c
--- /dev/null
+++ b/src/libMvQtGui/MvQCheckBoxCombo.cc
@@ -0,0 +1,213 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAbstractItemView>
+#include <QApplication>
+#include <QBrush>
+#include <QCheckBox>
+#include <QColor>
+#include <QDebug>
+#include <QPainter>
+#include <QStringList>
+#include <QStylePainter>
+
+#include "MvQCheckBoxCombo.h"
+
+
+MvQCheckBoxComboDelegate::MvQCheckBoxComboDelegate(QWidget *parent) : QStyledItemDelegate(parent)
+{
+}
+
+void MvQCheckBoxComboDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+                          const QModelIndex &index) const
+{
+	if(option.state & QStyle::State_Selected)
+            	painter->fillRect(option.rect, option.palette.highlight());
+
+	//Get item status
+       	bool status = index.data(Qt::UserRole).toBool();
+
+	//Get item label
+        QString text = index.data(Qt::DisplayRole).toString();
+
+	//Fill style options with item data
+        const QStyle *style = QApplication::style();
+
+        QStyleOptionButton opt;
+
+	opt.state |= status ? QStyle::State_On : QStyle::State_Off;
+	opt.state |= QStyle::State_Enabled;
+	opt.text = text;
+	opt.rect = option.rect;
+	
+	//Draw item data as CheckBox
+	style->drawControl(QStyle::CE_CheckBox,&opt,painter);
+}
+
+QWidget* MvQCheckBoxComboDelegate::createEditor(QWidget *parent,
+             const QStyleOptionViewItem&,
+             const QModelIndex& ) const
+{
+	//Create check box as our editor
+	QCheckBox *editor = new QCheckBox(parent);
+	
+	editor->setFocusPolicy(Qt::StrongFocus);
+
+	connect(editor,SIGNAL(stateChanged(int)),
+		this, SLOT(slotCheckBoxStateChanged(int)));	
+	return editor;
+}
+
+void MvQCheckBoxComboDelegate::slotCheckBoxStateChanged(int checked)
+{
+	bool b=checked;
+//	qDebug() << b;
+
+	commmitAndCloseEditor();
+}
+
+void MvQCheckBoxComboDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
+{
+	QCheckBox *myEditor = static_cast<QCheckBox*>(editor);
+
+	myEditor->setText(index.data(Qt::DisplayRole).toString());	
+	myEditor->setChecked(index.data(Qt::UserRole).toBool());
+}
+
+
+void MvQCheckBoxComboDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const
+{
+//	qDebug() << "setModelData";
+	//get the value from the editor (CheckBox)
+	
+	QCheckBox *myEditor = static_cast<QCheckBox*>(editor);
+	
+	bool value = myEditor->isChecked();
+	
+	//set model data
+	
+	QMap<int,QVariant> data;
+	
+	data.insert(Qt::DisplayRole,myEditor->text());	
+	data.insert(Qt::UserRole,value);
+	
+	model->setItemData(index,data);
+
+//	qDebug() << "dataChanged";
+	emit dataChanged();
+
+}
+
+void MvQCheckBoxComboDelegate::updateEditorGeometry(QWidget *editor,
+             const QStyleOptionViewItem &option, const QModelIndex& ) const
+{
+	editor->setGeometry(option.rect);
+}
+
+void MvQCheckBoxComboDelegate::commmitAndCloseEditor()
+{
+	QCheckBox *editor = static_cast<QCheckBox*>(sender());
+//	qDebug() << "commitdata";
+	emit commitData(editor);
+	
+	//emit closeEditor(slider);
+}
+
+
+
+MvQCheckBoxCombo::MvQCheckBoxCombo(QWidget *widget ) :QComboBox(widget)
+{
+      	// set delegate items view
+      	MvQCheckBoxComboDelegate *delegate = new MvQCheckBoxComboDelegate(this);
+
+	view()->setItemDelegate(delegate);
+
+      	// Enable editing on items view
+      	view()->setEditTriggers(QAbstractItemView::CurrentChanged);
+ 
+      	// set "CheckBoxList::eventFilter" as event filter for items view
+      	view()->viewport()->installEventFilter(this);
+
+	view()->setAlternatingRowColors(true);
+
+	connect(delegate,SIGNAL(dataChanged()),
+		this,SLOT(repaint()));
+
+	connect(delegate,SIGNAL(dataChanged()),
+		this,SIGNAL(selectionChanged()));
+}
+
+MvQCheckBoxCombo::~MvQCheckBoxCombo()
+{
+}
+
+bool MvQCheckBoxCombo::eventFilter(QObject *object, QEvent *event)
+{
+      // don't close items view after we release the mouse button
+      // by simple eating MouseButtonRelease in viewport of items view
+
+      if(event->type() == QEvent::MouseButtonRelease && object==view()->viewport())
+      {
+            return true;
+      }
+      return QComboBox::eventFilter(object,event);
+}
+
+void MvQCheckBoxCombo::paintEvent(QPaintEvent *)
+{
+ //   	qDebug() << "repaint";
+
+	QStylePainter painter(this);
+
+    	painter.setPen(palette().color(QPalette::Text));
+
+    	// draw the combobox frame, focusrect and selected etc.
+
+    	QStyleOptionComboBox opt;
+
+   	initStyleOption(&opt);
+
+	QString str;
+	for(int i=0; i < count(); i++)
+	{
+		QModelIndex index=model()->index(i,0);
+		if(model()->data(index,Qt::UserRole).toBool() == true)
+		{			
+			if(str.size() != 0)
+			{
+				str.append("/");
+			}
+
+			str.append(model()->data(index,Qt::DisplayRole).toString());
+		}
+	}	
+    	 // if no display text been set , use "..." as default
+     	if(str.size() > 0)
+ 		opt.currentText = str;
+	else
+
+            	opt.currentText = "...";
+
+    	painter.drawComplexControl(QStyle::CC_ComboBox, opt);
+
+    	// draw the icon and text
+    	painter.drawControl(QStyle::CE_ComboBoxLabel, opt);
+}
+
+QStringList MvQCheckBoxCombo::getSelectedValues()
+{
+	QStringList str;
+	for(int i=0; i < count(); i++)
+	{
+		QModelIndex index=model()->index(i,0);
+		if(model()->data(index,Qt::UserRole).toBool() == true)
+			str.append(model()->data(index,Qt::DisplayRole).toString());
+	}	
+	return str;
+}
diff --git a/src/libMvQtGui/MvQCheckBoxCombo.h b/src/libMvQtGui/MvQCheckBoxCombo.h
new file mode 100644
index 0000000..e5f6314
--- /dev/null
+++ b/src/libMvQtGui/MvQCheckBoxCombo.h
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQCheckBoxCombo_H
+#define MvQCheckBoxCombo_H
+
+#include <QAbstractItemModel>
+#include <QList>
+#include <QStringList>
+#include <QComboBox>
+#include <QStyleOptionViewItem>
+#include <QStyledItemDelegate>
+
+class MvQCheckBoxComboDelegate : public QStyledItemDelegate
+{
+	Q_OBJECT
+
+public:
+
+	MvQCheckBoxComboDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	void setEditorData(QWidget *editor,const QModelIndex& index) const;
+	void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
+
+	void setModelData(QWidget *editor,QAbstractItemModel *model,const QModelIndex& index) const;
+
+signals:
+	void dataChanged() const;
+
+public slots:
+	void slotCheckBoxStateChanged(int);
+
+private slots:
+	void commmitAndCloseEditor();
+};
+
+
+class MvQCheckBoxCombo: public QComboBox
+{
+      Q_OBJECT;
+
+public:
+      MvQCheckBoxCombo(QWidget *widget = 0);
+      virtual ~MvQCheckBoxCombo();
+
+      bool eventFilter(QObject *object, QEvent *event);
+      virtual void paintEvent(QPaintEvent *);
+
+      //Get selected values
+      QStringList getSelectedValues();
+
+signals:
+	void selectionChanged() const;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQConfigDialog.cc b/src/libMvQtGui/MvQConfigDialog.cc
new file mode 100644
index 0000000..5c3393e
--- /dev/null
+++ b/src/libMvQtGui/MvQConfigDialog.cc
@@ -0,0 +1,88 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQConfigDialog.h"
+
+#include <QDialogButtonBox>
+#include <QHBoxLayout>
+#include <QListWidget>
+#include <QPushButton>
+#include <QStackedWidget>
+#include <QVBoxLayout>
+
+MvQConfigDialog::MvQConfigDialog(QString title,QWidget *parent) : QDialog(parent)
+{
+     	list_ = new QListWidget(this);
+     	list_->setFlow(QListView::LeftToRight); 
+	list_->setViewMode(QListView::IconMode);
+     	list_->setIconSize(QSize(32, 32));
+     	//list_->setGridSize(QSize(48, 48));
+	list_->setMovement(QListView::Static);
+    	list_->setMaximumHeight(70);
+     	list_->setSpacing(5);
+
+    	page_ = new QStackedWidget;
+	/*foreach(MvQPageDefinition* p,pageLst)
+	{
+     		addPage(p->widget,p->icon,p->title);
+	}
+
+     	list_->setCurrentRow(0);*/
+
+
+	// Buttonbox
+	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+                                      | QDialogButtonBox::Cancel);
+ 
+	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+     	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+	//QPushButton *closePb = new QPushButton(tr("Close"));
+     	//connect(closePb, SIGNAL(clicked()), this, SLOT(close()));
+
+     	//QHBoxLayout *horizontalLayout = new QHBoxLayout;
+     	//horizontalLayout->addWidget(list_);
+     	//horizontalLayout->addWidget(page_, 1);
+
+     	/*QHBoxLayout *buttonsLayout = new QHBoxLayout;
+    	buttonsLayout->addStretch(1);
+     	buttonsLayout->addWidget(closePb);*/
+
+     	QVBoxLayout *mainLayout = new QVBoxLayout;
+ 	mainLayout->addWidget(list_);
+    	mainLayout->addWidget(page_,1);
+     	//mainLayout->addStretch(1);
+     	//mainLayout->addSpacing(12);
+     	mainLayout->addWidget(buttonBox);
+     	setLayout(mainLayout);
+
+     	setWindowTitle(title);
+
+	connect(list_,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
+                this, SLOT(slotChangePage(QListWidgetItem*,QListWidgetItem*)));
+}
+
+void MvQConfigDialog::addPage(QWidget *w,QIcon icon,QString txt)
+{
+	QListWidgetItem *item = new QListWidgetItem(list_);
+     	item->setIcon(icon);
+     	item->setText(txt);
+     	item->setTextAlignment(Qt::AlignHCenter);
+     	item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+
+	page_->addWidget(w);
+}
+
+void MvQConfigDialog::slotChangePage(QListWidgetItem *current, QListWidgetItem *previous)
+{
+     if (!current)
+         current = previous;
+
+     page_->setCurrentIndex(list_->row(current));
+ }
diff --git a/src/libMvQtGui/MvQConfigDialog.h b/src/libMvQtGui/MvQConfigDialog.h
new file mode 100644
index 0000000..ee0cc9f
--- /dev/null
+++ b/src/libMvQtGui/MvQConfigDialog.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQConfigDialog_H
+#define MvQConfigDialog_H
+
+#include <QDialog>
+#include <QIcon>
+
+class QListWidget;
+class QListWidgetItem;
+class QStackedWidget;
+
+
+class MvQConfigDialog : public QDialog
+{
+     Q_OBJECT
+
+ public:
+     MvQConfigDialog(QString,QWidget *parent=0);
+
+ public slots:
+     void slotChangePage(QListWidgetItem *current, QListWidgetItem *previous);
+
+ protected:
+     void addPage(QWidget*,QIcon,QString);
+
+     QListWidget*    list_;
+     QStackedWidget* page_;
+ };
+
+ #endif
diff --git a/src/libMvQtGui/MvQDragDrop.cc b/src/libMvQtGui/MvQDragDrop.cc
new file mode 100644
index 0000000..81384c3
--- /dev/null
+++ b/src/libMvQtGui/MvQDragDrop.cc
@@ -0,0 +1,41 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//#include <QtGui>
+//#include <QX11Info>
+//#include <X11/X.h>
+//#include <X11/Xlib.h>
+//#include <X11/Xatom.h>
+
+#include "MvQDragDrop.h"
+
+void MvQIconDropItem::appendToFullName(string s)
+{
+	fullName_=fullName_.append(s);
+}	
+
+void MvQIconDropItem::finalizeFullName()
+{
+	fullName_.erase(fullNameLen_,fullName_.size()-fullNameLen_);
+}
+
+void MvQIconDropItem::clear()
+{
+	name_.clear();
+	class_.clear();
+	fullName_.clear();
+	fullNameLen_ = 0;
+	x_= y_       = 0;
+	winId_       = 0;
+	count_       = 0;
+//	totalNum_    = 0;
+	batchNum_    = 0;
+	format_      = 0;
+	iconId_      = 0;
+}
diff --git a/src/libMvQtGui/MvQDragDrop.h b/src/libMvQtGui/MvQDragDrop.h
new file mode 100644
index 0000000..b1347db
--- /dev/null
+++ b/src/libMvQtGui/MvQDragDrop.h
@@ -0,0 +1,75 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQDragDrop_H
+#define MvQDragDrop_H
+
+#include <iostream>
+//#include <QtGui/QApplication>
+//#include <QWidget>
+
+//#include <QStandardItemModel>
+//#include <QPixmap>
+//#include <QPalette>
+
+//#include "Highlighter.h"
+
+using namespace std;
+
+class MvQIconDropItem
+{
+public:
+
+	MvQIconDropItem() { };
+	~MvQIconDropItem() { };
+	
+	void name(string s) {name_=s;};
+	void className(string s) {class_=s;};
+	void appendToFullName(string);
+	void fullNameLen(int i) {fullNameLen_=i;};
+	void finalizeFullName();
+	void x(int i) {x_=i;};
+	void y(int i) {y_=i;};
+	void winId(int i) {winId_=i;};
+	void count(int i) {count_=i;};
+	void format(int i) {format_=i;};
+	void iconId(int i) {iconId_=i;};
+	void batchNumber(int i) {batchNum_=i;};
+//	void totalNumber(int i) {totalNum_=i;};
+
+	string name() {return name_;};
+	string className() {return class_;};
+	string fullName() {return fullName_;};
+	int x() {return x_;};
+	int y() {return y_;};
+	int winId() {return winId_;};
+	int count() {return count_;};
+	int format() {return format_;};
+	int iconId() {return iconId_;};
+	int batchNumber() {return batchNum_;};
+//	int totalNumber() {return totalNum_;};
+
+	void clear();
+
+protected:
+	string name_;
+	string class_;
+	string fullName_;
+	int fullNameLen_;
+	int x_;
+	int y_;
+	int winId_;
+	int count_;
+//	int totalNum_;
+	int batchNum_;
+	int format_;
+	int iconId_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQFileBrowserBase.cc b/src/libMvQtGui/MvQFileBrowserBase.cc
new file mode 100644
index 0000000..8685d21
--- /dev/null
+++ b/src/libMvQtGui/MvQFileBrowserBase.cc
@@ -0,0 +1,583 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQFileBrowserBase.h"
+
+#include <QAction>
+#include <QApplication>
+#include <QComboBox>
+#include <QDebug>
+#include <QDirModel>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QListView>
+#include <QMenu>
+#include <QPushButton>
+#include <QSortFilterProxyModel>
+#include <QSplitter>
+#include <QStandardItemModel>
+#include <QStringList>
+#include <QTextBrowser>
+#include <QTextStream>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvRequest.h"
+
+MvQFileBrowserBase::MvQFileBrowserBase()
+{	
+	 int order = 0;
+         bool more = true;
+ 
+         while(more)
+         {
+                more = false;
+                request  *r = mars.setup;
+                while (r) 
+		{
+                        MvRequest mvr(r);
+			mvr.print();
+			  //if(ConfigLoader::process(r,order))
+                         //        more = true;
+                        r = r->next;
+		}
+                order++;
+         }
+
+	rootDir_=QString("/");
+
+	char *mvhome=getenv("METVIEW_USER_DIRECTORY");
+ 	if(mvhome != 0)  
+	{	
+		rootDir_=QString(mvhome);	
+	}
+
+	dirHistoryPos_=0;
+	dirHistory_.append(rootDir_);
+
+	//Iconprovider
+	MvQFileIconProvider *iconProvider = new MvQFileIconProvider;
+
+	//-----------------------------
+	// Actions
+	//-----------------------------
+
+	locationCombo_= new QComboBox;
+	locationCombo_->addItem(rootDir_);
+
+	//Back
+	actionBack_ = new QAction(this);
+	actionBack_->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowLeft)); 
+        actionBack_->setToolTip(tr("Back"));
+	actionBack_->setText(tr("Back"));
+        actionBack_->setShortcut(tr("Alt+Left"));
+	navigateActions_["back"]=actionBack_;
+
+	connect(actionBack_,SIGNAL(triggered()),
+		this,SLOT(slotChDirBack()));
+
+	//Forward
+	actionForward_ = new QAction(this);
+	actionForward_->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowRight)); 
+	actionForward_->setToolTip(tr("Forward"));
+	actionForward_->setText(tr("Forward"));
+        actionForward_->setShortcut(tr("Alt+Right"));
+	navigateActions_["forward"]=actionForward_;
+
+	connect(actionForward_,SIGNAL(triggered()),
+		this,SLOT(slotChDirForward()));
+
+	//Parent
+	actionParent_= new QAction(this);
+	actionParent_->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowUp)); 
+        actionParent_->setToolTip(tr("Parent"));
+	actionParent_->setText(tr("Parent"));
+        actionParent_->setShortcut(tr("Alt+Up"));
+	navigateActions_["parent"]=actionParent_;
+
+	connect(actionParent_,SIGNAL(triggered()),
+		this,SLOT(slotChDirParent()));
+	
+	//-------------------
+	// Dir tree 
+	//-------------------
+
+	QModelIndex rootIndex;
+
+	//Dir model
+	dirModel_ = new MvQFileSystemModel;
+	dirModel_->setIconProvider(iconProvider);
+	rootIndex=dirModel_->setRootPath(rootDir_);
+	//dirModel_->setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
+	//rootIndex=dirModel_->setRootPath(rootDir_);
+
+	dirFilterModel_= new MvQDirFilterModel;  
+	dirFilterModel_->setSourceModel(dirModel_);
+	dirFilterModel_->setDynamicSortFilter(true);
+	//dirSortModel_->setFilterRole(Qt::UserRole);
+	//dirFilterModel_->setFilterRegExp(QRegExp("[1]"));
+	//dirSortModel_->setFilterFixedString("1");
+	//dirSortModel_->setFilterKeyColumn(0);
+		
+	//Dir tree
+	dirTree_ = new QTreeView;
+	dirTree_->setHeaderHidden(true);
+        dirTree_->setModel(dirFilterModel_);
+	dirTree_->setRootIndex(dirFilterModel_->mapFromSource(rootIndex));
+
+	//-------------------
+	// Item list 
+	//-------------------
+
+	//Macro  model
+	//itemModel_ = new MvQFileSystemModel;
+	//itemModel_->setIconProvider(iconProvider);
+	//itemModel_->setFilter(QDir::AllDirs | QDir::NoDotAndDotDot | QDir::Files);
+	//itemModel_->setNameFilters(QStringList("*.mv"));
+	//itemModel_->setRootPath(rootDir_);
+	//rootIndex=itemModel_->setRootPath(rootDir_);
+
+	itemFilterModel_= new MvQCurrentDirFilterModel;  
+	itemFilterModel_->setSourceModel(dirModel_);
+	itemFilterModel_->setDynamicSortFilter(true);
+
+	//Macro tree
+	itemList_= new QListView;
+        itemList_->setModel(itemFilterModel_);
+	itemList_->setRootIndex(itemFilterModel_->mapFromSource(rootIndex));
+	//itemList_->setRootIndex(itemModel_->index(rootDir_));
+	itemList_->setContextMenuPolicy(Qt::CustomContextMenu);
+	itemList_->setViewMode(QListView::IconMode);
+	itemList_->setGridSize(QSize(90,60));
+	itemList_->setFlow(QListView::LeftToRight);
+	itemList_->setResizeMode(QListView::Adjust);
+
+	//Selection form the dir tree
+	connect(dirTree_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotSelectDir(const QModelIndex)));
+
+	//Context menu in the macro tree
+    	connect(itemList_, SIGNAL(customContextMenuRequested(const QPoint &)),
+                this, SLOT(slotContextMenu(const QPoint &)));
+	
+	//Selection form the macro tree
+	connect(itemList_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotSelectItem(const QModelIndex)));
+
+	//Setup
+	updateNavigationActionState();
+}
+
+MvQFileBrowserBase::~MvQFileBrowserBase()
+{
+	delete locationCombo_;
+	delete dirModel_;
+	delete itemModel_;
+	delete dirTree_;
+	delete itemList_;
+}
+
+QString MvQFileBrowserBase::currentDir()
+{
+	return dirModel_->filePath(dirTree_->currentIndex());
+}
+
+void MvQFileBrowserBase::setCurrentDir(QString path,bool savePath)
+{
+	/*QModelIndex rootIndex=dirModel_->setRootPath(path);
+	dirTree_->setRootIndex(dirFilterModel_->mapFromSource(rootIndex));
+
+	rootIndex=itemModel_->setRootPath(path);
+	itemList_->setRootIndex(itemFilterModel_->mapFromSource(rootIndex));
+
+	//dirTree_->setCurrentIndex(dirModel_->index(path));	
+	//itemList_->setRootIndex(itemModel_->index(path));	
+	
+	if(savePath == true)
+		addPathToDirHistory(path);	*/
+
+	//slotSelectDir(dirTree_->currentIndex());
+}
+
+void MvQFileBrowserBase::addPathToDirHistory(QString path)
+{
+	dirHistory_.append(path);
+	dirHistoryPos_=dirHistory_.count()-1;
+	updateNavigationActionState();
+}
+
+void MvQFileBrowserBase::updateNavigationActionState()
+{
+	if(dirHistoryPos_ == 0)
+	{
+		actionBack_->setEnabled(false);
+	}
+	else
+	{
+		actionBack_->setEnabled(true);
+	}
+	
+	if(dirHistoryPos_ < dirHistory_.count()-1)
+	{
+		actionForward_->setEnabled(true);
+	}
+	else
+	{
+		actionForward_->setEnabled(false);
+	}
+
+	if(dirHistory_[dirHistoryPos_] == "/")
+	{
+		actionParent_->setEnabled(false);
+	}
+	else{
+		actionParent_->setEnabled(true);
+	}
+}
+
+//------------------------------------------
+// A dir is selected form the dir tree
+//------------------------------------------
+
+void MvQFileBrowserBase::slotSelectDir(const QModelIndex& index)
+{	
+	QModelIndex realIndex=dirFilterModel_->mapToSource(index);
+	dirTree_->setCurrentIndex(index);
+	
+
+	QString filePath=dirModel_->filePath(realIndex);
+
+	qDebug() << "filePath:" << filePath;
+	//dirModel_->setRootPath(filePath);
+
+	//QModelIndex rootIndex=itemModel_->setRootPath(filePath);
+	itemList_->setRootIndex(itemFilterModel_->mapFromSource(realIndex));
+
+	//itemList_->setRootIndex(itemFilterModel_->mapToSource(itemModel_->index(filePath)));
+	//itemModel_->setRootPath(filePath);
+	addPathToDirHistory(filePath);		
+
+	qDebug() << "Last dirs:";
+	 for (int i = 0; i < dirHistory_.size(); ++i)
+         qDebug() << dirHistory_.at(i);
+}
+
+//------------------------------------------
+// An item is selected from the list
+//------------------------------------------
+
+void MvQFileBrowserBase::slotSelectItem(const QModelIndex& index)
+{
+	QModelIndex realIndex=itemFilterModel_->mapToSource(index);
+	if(dirModel_->isDir(realIndex))
+	{		
+		slotSelectDir(dirFilterModel_->mapFromSource(realIndex));
+		//setCurrentDir(itemModel_->filePath(realIndex));
+		return; 
+	}
+	else
+	{
+		//emit itemSelected(itemModel_->filePath(index));
+	}
+}
+
+void MvQFileBrowserBase::executeItem(const QModelIndex& index)
+{
+	if(!itemModel_->isDir(index))
+	{		
+		emit itemExecuted(itemModel_->filePath(index));
+	}
+}
+
+
+void MvQFileBrowserBase::slotChDirBack()
+{	
+	if(dirHistoryPos_>0)
+	{
+		dirHistoryPos_--;
+		setCurrentDir(dirHistory_[dirHistoryPos_],false);
+		updateNavigationActionState();
+	}	
+}
+
+void MvQFileBrowserBase::slotChDirForward()
+{
+	if(dirHistoryPos_ < dirHistory_.count()-1)
+	{
+		dirHistoryPos_++;
+		setCurrentDir(dirHistory_[dirHistoryPos_],false);
+		updateNavigationActionState();
+	}
+}
+
+void MvQFileBrowserBase::slotChDirParent()
+{
+	QModelIndex parent = dirModel_->parent(dirTree_->currentIndex());		
+	setCurrentDir(dirModel_->filePath(parent));
+}
+
+
+void MvQFileBrowserBase::slotContextMenu(const QPoint &position)
+{
+    	if(!itemList_->indexAt(position).isValid()) return;
+
+       	QList<QAction*> actions;
+
+ 	//Open
+	QAction *actionLoad = new QAction(this);
+        actionLoad->setObjectName(QString::fromUtf8("actionLoad"));
+       	//QIcon icon;
+        //icon.addPixmap(QPixmap(QString::fromUtf8(":/new/prefix1/image/print.svg")), QIcon::Normal, QIcon::Off);
+        //actionOpen->setIcon(icon); 
+	actionLoad->setText(tr("Load"));
+        actionLoad->setShortcut(tr("Ctrl+L"));
+	actions.append(actionLoad);
+
+	QAction *actionEdit = new QAction(this);
+        actionEdit->setObjectName(QString::fromUtf8("actionEdit"));
+       	//QIcon icon;
+        //icon.addPixmap(QPixmap(QString::fromUtf8(":/new/prefix1/image/print.svg")), QIcon::Normal, QIcon::Off);
+        //actionOpen->setIcon(icon); 
+	actionEdit->setText(tr("Edit"));
+        actionEdit->setShortcut(tr("Ctrl+E"));
+	actions.append(actionEdit);
+
+	QAction *actionDuplicate = new QAction(this);
+        actionDuplicate->setObjectName(QString::fromUtf8("actionDuplicate"));
+	actionDuplicate->setText(tr("Duplicate"));
+        actionDuplicate->setShortcut(tr("Ctrl+C"));
+	actions.append(actionDuplicate);
+
+	QAction *actionDelete = new QAction(this);
+        actionDelete->setObjectName(QString::fromUtf8("actionDelete"));
+	actionDelete->setText(tr("Delete"));
+        actionDelete->setShortcut(tr("Ctrl+D"));
+	actions.append(actionDelete);
+	
+    	if(actions.count() > 0)
+	{
+        	QAction *action=QMenu::exec(actions, itemList_->mapToGlobal(position));
+
+		QModelIndex index=itemList_->indexAt(position);
+
+		if(action == actionLoad)
+		{
+			executeItem(index);
+		}
+
+	}
+}
+
+
+MvQFileIconProvider::MvQFileIconProvider()
+{
+	char *mvhome=getenv("METVIEW_DIR_SHARE");
+
+ 	if (mvhome == 0)  
+	{
+		return;	
+	}
+	
+	path_= QString(mvhome);
+	path_.append("/icons/");
+}
+
+QIcon MvQFileIconProvider::icon(const QFileInfo& info) const
+{
+	QString suffix = info.suffix();
+	/*if(suffix == "grb") 
+	{	
+		QPixmap p("/var/tmp/cgr/PERFORCE/metview_4/share/metview/icons/GRIB.png");
+		p.scaled(QSize(16,16));
+		return QIcon(p);	
+	}*/
+	if(info.isFile() == true && suffix == "mc") 
+	{	
+		QString str(path_);
+		str.append("MACRO.xpm");
+		QPixmap p(str);
+		p.scaled(QSize(16,16));
+		return QIcon(p);	
+	}
+	else 
+		return QFileIconProvider::icon(info);
+}	
+
+
+
+
+
+
+MvQFileSystemModel::MvQFileSystemModel()
+{
+}
+
+MvQFileSystemModel::~MvQFileSystemModel()
+{
+}
+int MvQFileSystemModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 1;
+}
+QVariant MvQFileSystemModel::data( const QModelIndex& index, int role ) const
+{
+	if(role != Qt::ToolTipRole)
+	{
+		return QFileSystemModel::data(index,role);
+	}
+	else
+	{
+		QFileInfo info=fileInfo(index);	
+		/*if(info.suffix() == "grb")	
+			return QString("GRIB file");*/
+		if(info.isFile() == true && info.suffix() == "mc")	
+		{
+			return getMacroHeader(info);
+			//return QString("Macro");
+		}
+		else
+			return QVariant();
+	}	
+}
+
+QString MvQFileSystemModel::getMacroHeader(QFileInfo& info)
+{
+	//qDebug() << info.absoluteFilePath();
+
+	QFile file(info.absoluteFilePath()); 
+	if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+        	return QString();
+
+	bool newItem=false;
+
+	QString res;
+
+	QStringList keys;
+	keys << "Function" << "Syntax" << "Category" << "Parameters";
+
+	//MvQMacroHeader header(keys);
+
+	QString key("Description");
+
+	/*QMap<QString,QString> macroHeader_;
+	foreach(item in  keys)
+	{
+		
+	*/
+
+	QTextStream in(&file); 
+	while (!in.atEnd()) 
+	{
+		QString line = in.readLine().simplified();
+         	if(line.startsWith("#") == true)
+		{
+			QString expr("(^#\\s*");
+			expr.append(key);
+			expr.append("\\s*: )(\\S.*)");
+
+			QRegExp rx(expr);
+
+			if(rx.indexIn(line) > -1)
+			{
+				newItem = true;
+				res.append(rx.cap(2));
+			}
+			else if(newItem) 
+			{
+				if(line.contains(QRegExp("(^# \\S.*\\s*: )")))
+				{
+					newItem = false;
+					return res;
+				}
+				else
+				{		
+					res.append("\n");
+					QRegExp rx("(^#\\s*)(\\S.*)");
+					if(rx.indexIn(line) > -1)
+					{
+						res.append(rx.cap(2));
+					}
+					else
+					{
+						res.append("\n");
+					}
+				}
+			}
+		}
+     	}
+
+	file.close();
+
+	return res;
+}
+
+MvQDirFilterModel::MvQDirFilterModel(QObject *parent) :  QSortFilterProxyModel(parent)
+{
+}
+
+void MvQDirFilterModel::setSourceModel(QAbstractItemModel* sourceModel)
+{
+	dirModel_=static_cast<MvQFileSystemModel*>(sourceModel);
+	QSortFilterProxyModel::setSourceModel(sourceModel);
+}
+
+bool MvQDirFilterModel::filterAcceptsRow(int sourceRow,
+         const QModelIndex &sourceParent) const
+{
+	QModelIndex index=dirModel_->index(sourceRow,0,sourceParent);
+	if(dirModel_->isDir(index))
+	{
+		if(!dirModel_->fileName(index).endsWith("#"))
+			return true;
+	}
+	
+	return false;
+}
+
+
+MvQCurrentDirFilterModel::MvQCurrentDirFilterModel(QObject *parent) :  QSortFilterProxyModel(parent)
+{
+}
+
+void MvQCurrentDirFilterModel::setSourceModel(QAbstractItemModel* sourceModel)
+{
+	dirModel_=static_cast<MvQFileSystemModel*>(sourceModel);
+	QSortFilterProxyModel::setSourceModel(sourceModel);
+}
+
+bool MvQCurrentDirFilterModel::filterAcceptsRow(int sourceRow,
+         const QModelIndex &sourceParent) const
+{
+	QModelIndex index=dirModel_->index(sourceRow,0,sourceParent);
+
+	qDebug() << "filter:" << dirModel_->fileName(index);
+
+	QString fileName=dirModel_->fileName(index);
+
+	if(dirModel_->isDir(index) == true)
+	{
+	  	if(fileName.endsWith("#") == false)
+			return true;
+		else
+			return false;
+	}
+
+	if(fileName.startsWith(".") == false && 
+	fileName.startsWith("..") == false)
+	{
+		return true;	
+	}
+	
+	return false;
+}
+
+
+
+
diff --git a/src/libMvQtGui/MvQFileBrowserBase.h b/src/libMvQtGui/MvQFileBrowserBase.h
new file mode 100644
index 0000000..972ef41
--- /dev/null
+++ b/src/libMvQtGui/MvQFileBrowserBase.h
@@ -0,0 +1,131 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQFileBrowserBase_H
+#define MvQFileBrowserBase_H
+ 
+#include <QFileSystemModel>
+#include <QFileIconProvider>
+#include <QFileInfo>
+#include <QModelIndex>
+#include <QList>
+#include <QMap>
+#include <QObject>
+#include <QSortFilterProxyModel>
+#include <QString>
+
+class QAction;
+class QComboBox;
+class QLabel;
+class QListView;
+class QSplitter;
+class QTextBrowser;
+class QTreeView;
+
+using namespace std;
+
+class MvQFileIconProvider : public QFileIconProvider
+{
+public:
+	MvQFileIconProvider();
+	QIcon icon(const QFileInfo&) const;
+private:
+	QString path_;
+};
+
+class MvQFileSystemModel : public QFileSystemModel
+{
+public:
+	MvQFileSystemModel();
+	~MvQFileSystemModel();	
+	int columnCount( const QModelIndex&) const;
+	QVariant data( const QModelIndex&, int) const;
+
+	static QString getMacroHeader(QFileInfo&);
+};
+
+class MvQDirFilterModel : public QSortFilterProxyModel
+{
+public:
+	MvQDirFilterModel(QObject *parent=0);
+	void setSourceModel(QAbstractItemModel*);
+	bool filterAcceptsRow(int,const QModelIndex &) const;
+
+protected:
+	MvQFileSystemModel *dirModel_;
+};
+
+class MvQCurrentDirFilterModel : public QSortFilterProxyModel
+{
+public:
+	MvQCurrentDirFilterModel(QObject *parent=0);
+	void setSourceModel(QAbstractItemModel*);
+	bool filterAcceptsRow(int,const QModelIndex &) const;
+
+protected:
+	MvQFileSystemModel *dirModel_;
+};
+
+class MvQFileBrowserBase : public QObject
+{
+    Q_OBJECT
+
+public:
+	MvQFileBrowserBase();
+	~MvQFileBrowserBase();
+
+	QTreeView*      dirTree() {return dirTree_;}
+	QListView*      itemList() {return itemList_;}
+	QString 	currentDir();
+	void            setCurrentDir(QString s,bool savePath=true);
+	const QMap<QString,QAction*>&  navigateActions() {return navigateActions_;}
+	QAction*        actionBack() {return actionBack_;}
+	QAction*        actionForward() {return actionForward_;}
+	QAction*        actionParent() {return actionParent_;}
+	QComboBox*      locationCombo() {return locationCombo_;}
+
+
+public slots:
+	void slotSelectDir(const QModelIndex&);
+	void slotSelectItem(const QModelIndex&);
+	void slotContextMenu(const QPoint&);
+	void slotChDirBack();
+	void slotChDirForward();
+	void slotChDirParent();
+
+signals:
+	void itemSelected(QString);
+	void itemExecuted(QString);
+
+private:
+	void addPathToDirHistory(QString);
+	void updateNavigationActionState();
+	void executeItem(const QModelIndex&);
+
+	MvQFileSystemModel*   dirModel_;
+	MvQDirFilterModel* dirFilterModel_;
+	QTreeView*     dirTree_;
+	MvQFileSystemModel*   itemModel_;
+	MvQCurrentDirFilterModel* itemFilterModel_;
+	QListView*     itemList_;
+	QComboBox*     locationCombo_;
+
+	QAction*       actionBack_;
+	QAction*       actionForward_;
+	QAction*       actionParent_;
+
+	QString        rootDir_;
+	QList<QString> dirHistory_;
+	int 	       dirHistoryPos_;
+	
+	QMap<QString,QAction*> navigateActions_;
+	
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQFileInfoLabel.cc b/src/libMvQtGui/MvQFileInfoLabel.cc
new file mode 100644
index 0000000..06f2c2e
--- /dev/null
+++ b/src/libMvQtGui/MvQFileInfoLabel.cc
@@ -0,0 +1,172 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQFileInfoLabel.h"
+#include "MvFileInfo.h"
+
+MvQFileInfoLabel::MvQFileInfoLabel(QWidget* parent) : QLabel(parent)
+{
+	setObjectName(QString::fromUtf8("fileInfoLabel"));
+
+        //Set size policy
+	QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+        sizePolicy.setHorizontalStretch(0);
+        sizePolicy.setVerticalStretch(0);
+        sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
+        setSizePolicy(sizePolicy);
+        //setMinimumSize(QSize(0, 60));
+        //setMaximumSize(QSize(16777215, 45));
+	
+	setMargin(8);
+	setAlignment(Qt::AlignLeft| Qt::AlignVCenter);
+
+	//Other settings
+        setAutoFillBackground(true);
+	//setFrameShape(QFrame::Box);
+        //setFrameShape(QFrame::StyledPanel);
+        setTextInteractionFlags(Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse);
+
+}
+
+
+QString MvQFileInfoLabel::buildTextLabel(QString fileName)
+{
+	QString s;
+	MvFileInfo info(fileName.toStdString());
+
+	s="<b><font color=#000000>File: </font></b>";
+	s+="<font color=000010>" + QString(info.name().c_str()) + "</font>";	
+	s+="<br>";
+	
+	if(info.permissions().find("l") != string::npos)
+	{
+		s+="<b><font color=#000000>Symlink target: </font></b>";	
+		s+="<font color=000010>" +QString(info.linkTo().c_str()) + "</font>";
+		s+="<br>";
+		
+		//Make the label bigger
+		//setMinimumSize(QSize(0, 70));
+	}
+
+	s+="<b><font color=#000000>Permissions: </font></b>";
+	s+="<font color=000010>" + QString(info.permissions().c_str()) + "</font>";
+	s+="<b><font color=#000000> Owner: </font></b>";
+	s+="<font color=000010>" + QString(info.owner().c_str()) + "</font>";
+	s+="<b><font color=#000000> Group:</font> </b>";
+	s+="<font color=000010>" + QString(info.group().c_str()) + "</font>";	
+	//s+="<b> Size: </b> <font color=#ff0000>";
+	s+="<b><font color=#000000> Size: </font></b>";
+	s+="<font color=000010>" + QString(info.size().c_str()) + "</font>";
+	s+="<font color=#000000><b> Modified:</font> </b>";
+	s+="<font color=000010>" + QString(info.modified().c_str()) + "</font>";
+	
+	return s;
+}
+
+void MvQFileInfoLabel::setTextLabel(QString fileName)
+{
+	QString s=buildTextLabel(fileName);
+	setText(s);
+}		
+
+void MvQFileInfoLabel::setGribTextLabel(QString fileName,int messageNum,bool filtered,int filteredMessageNum,bool hasMultiMessage)
+{
+	QString s=buildTextLabel(fileName);
+	s+="<br>";
+
+	if(filtered)
+	{
+		s+="<b><font color=#000000>Number of filtered messages: </font></b>";
+		s+="<font color=000010>" + QString::number(filteredMessageNum);
+		s+=" (out of " + QString::number(messageNum) + ")</font>";
+	}	
+	else
+	{
+		s+="<b><font color=#000000>Total number of messages: </font></b>";		
+		s+="<font color=000010>" + QString::number(messageNum) + "</font>";
+		if(hasMultiMessage)
+		{
+			s+="<font color=#f4a119> (it is a multi-message file!) </font>";	
+		}
+		
+	}	
+	setText(s);
+}	
+
+void MvQFileInfoLabel::setBufrTextLabel(QString fileName,int messageNum)
+{
+	QString s=buildTextLabel(fileName);
+	s+="<br>";
+	s+="<b><font color=#000000>Total number of messages: </font></b>";		
+	s+="<font color=000010>" + QString::number(messageNum) + "</font>";
+	
+	setText(s);
+}	
+
+void MvQFileInfoLabel::setObstatScatterTextLabel(QString fileName,int itemNum)
+{
+	QString s=buildTextLabel(fileName);
+	s+="<br>";
+	s+="<b><font color=#000000>Total number of items: </font></b>";
+	s+="<font color=000010>" + QString::number(itemNum) + "</font>";
+
+	setText(s);
+}
+
+void MvQFileInfoLabel::setOdbTextLabel(QString fileName,QString)
+{
+	QString s=buildTextLabel(fileName);
+	//s+="<br>";
+	//s+="<b>Version: </b>";
+	//s+=version;
+
+	setText(s);
+}
+
+void MvQFileInfoLabel::setGeopTextLabel(QString fileName, QString format, long itemNum)
+{
+	QString s=buildTextLabel(fileName);
+	s+="<br>";
+
+	s+="<b><font color=#000000>Format: </font></b>";
+	s+="<font color=000010>" + format + "</font>";
+	s+="<br>";
+
+	s+="<b><font color=#000000>Total number of points: </font></b>";
+	s+="<font color=000010>" + QString::number(itemNum) + "</font>";
+
+	setText(s);
+}
+
+void MvQFileInfoLabel::setFlextraTextLabel(QString fileName, QString iconName, int itemNum)
+{
+	QString s;
+	s="<b><font color=#000000>Icon: </font></b>";
+	s+="<font color=000010>" + iconName + "</font>";
+	s+="<br>";
+  	s+=buildTextLabel(fileName);
+	s+="<br>";
+	s+="<b><font color=#000000>Total number of groups: </font></b>";
+	s+="<font color=000010>" + QString::number(itemNum) + "</font>";
+
+	setText(s);
+}
+
+void MvQFileInfoLabel::setScmTextLabel(QString fileName,int stepNum, int levNum)
+{
+	QString s=buildTextLabel(fileName);
+	s+="<br>";
+	s+="<b><font color=#000000>Number of steps: </font></b>";		
+	s+="<font color=000010>" + QString::number(stepNum) + "</font>";
+	s+="<br>";
+	s+="<b><font color=#000000>Number of model levels: </font></b>";		
+	s+="<font color=000010>" + QString::number(levNum) + "</font>";
+	
+	setText(s);
+}	
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQFileInfoLabel.h b/src/libMvQtGui/MvQFileInfoLabel.h
new file mode 100644
index 0000000..17871bf
--- /dev/null
+++ b/src/libMvQtGui/MvQFileInfoLabel.h
@@ -0,0 +1,32 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQFileInfoLabel_H
+#define MvQFileInfoLabel_H
+
+#include <QLabel>
+
+class MvQFileInfoLabel : public QLabel
+{
+public:
+	MvQFileInfoLabel(QWidget *parent=0);
+	void setTextLabel(QString);
+	void setGribTextLabel(QString,int,bool,int,bool);
+	void setBufrTextLabel(QString,int);
+	void setObstatScatterTextLabel(QString,int);
+	void setOdbTextLabel(QString,QString);
+	void setGeopTextLabel(QString,QString,long);
+	void setFlextraTextLabel(QString,QString,int);
+	void setScmTextLabel(QString,int,int);
+
+protected:
+	QString buildTextLabel(QString);
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQGui.cc b/src/libMvQtGui/MvQGui.cc
new file mode 100644
index 0000000..dd0ed44
--- /dev/null
+++ b/src/libMvQtGui/MvQGui.cc
@@ -0,0 +1,281 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QFile>
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QStringList>
+#include <QTextStream>
+
+#include "MvQGui.h"
+#include "MvQGuiItem.h"
+#include "MvKeyProfile.h" 
+
+#include "MvApplication.h"
+#include "MvRequest.h"
+#include "MvProtocol.h"
+
+#ifdef METVIEW_ODB
+#include "MvQOdbMetaData.h"
+#endif
+
+MvQGui::MvQGui(QBoxLayout* layout) : parentLayout_(layout)
+{
+	layout_ = new  QGridLayout;
+	layout_->setSizeConstraint(QLayout::SetMinAndMaxSize);
+
+	//okPb_ = new QPushButton("Ok");
+
+	//connect(okPb_,SIGNAL(clicked()),
+	//	this,SIGNAL(editFinished()));	
+}
+
+MvQGui::~MvQGui()
+{
+	clear();
+	delete layout_;
+	//delete okPb_;
+}
+
+void MvQGui::clear()
+{
+	//Remove layout from parent layout	
+	parentLayout_->removeItem(layout_);
+
+     	for(int i=0 ; i < layout_->rowCount(); i++)
+	{
+		for(int j=0; j< layout_->columnCount(); j++)
+		{
+			QLayoutItem *item= layout_->itemAtPosition(i,j);
+             		layout_->removeItem(item);
+		}
+         }
+        
+	//Delete all the items (it will remove all the items 
+	//from the layout)
+	while(!item_.isEmpty())
+     	{
+		MvQGuiItem *item=item_.takeFirst();
+		qDebug() << "name:" << item->name();
+		delete item;
+	}
+	item_.clear();
+
+	//Remove pb from the parent layout	
+	parentLayout_->removeWidget(okPb_);	
+}
+
+/*void MvQGui::buildFromMacro(QString macroPath)
+{
+
+	//Clear the gui, we have to rebuild it
+	clear();
+
+	QFile file(macroPath); 
+	if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+        	return;
+
+	QTextStream in(&file); 
+	while (!in.atEnd()) 
+	{
+		QString line = in.readLine().simplified();
+         	if(line.startsWith("#qt") == true)
+		{
+			QStringList list = line.split(QRegExp("\\s+"));
+
+			QString keyName=list[1];
+			QString name=list[2];
+			QString type=list[4];
+			QString source("grib");
+
+			//Create hbox layout
+			QHBoxLayout *hb=new  QHBoxLayout;
+			layout_->addLayout(hb);
+
+			//Create gui item
+			MvQGuiItem *item=MvQGuiItemFactory::makeItem(name,type,hb);			
+
+			item->setKeyName(list[1]);
+			item->setName(list[2]);
+		        item->setId(list[3]);
+			item->setType(list[4]);
+			item->setSource("grib");
+
+			item_.push_back(item);
+		}
+	}
+
+	okPb_=new QPushButton("Ok");
+	layout_->addWidget(okPb_);
+
+	connect(okPb_,SIGNAL(clicked()),
+		this,SIGNAL(editFinished()));
+
+}*/
+
+
+void MvQGui::buildFromMacro(QString macroPath)
+{	
+	//Clear the gui, we have to rebuild it
+	clear();
+
+	//Build metview request to read gui definition
+	//form the macro
+	MvRequest r("MACROPARAM");
+	
+	MvRequest rr("MACRO");
+	rr("PATH") = macroPath.toStdString().c_str();
+
+	r("MACRO")=rr;
+	r("_NAME")    = macroPath.toStdString().c_str();
+	r("_CLASS")   = "MACROPARAM";
+	r("_ACTION")  = "edit";
+	r("_SERVICE") = "macro";
+	//r.print();
+
+	int error;
+	MvRequest result = MvApplication::waitService("macro",r,error);
+	//result.print();
+
+	//layout_=new QGridLayout;
+	layout_->setColumnMinimumWidth(2,40);
+	layout_->setColumnMinimumWidth(3,150);
+	parentLayout_->addLayout(layout_);
+
+	//Build gui
+	r=result.rewind();
+	while(r)
+	{
+		qDebug() << "Gui item";
+		r.print();
+
+		//QHBoxLayout *hb=new  QHBoxLayout;
+		//layout_->addLayout(hb);
+		MvQGuiItem *item = MvQGuiItemFactory::makeItem(&r,layout_);
+		if(item)
+		{
+			item_.push_back(item);
+		}
+
+		r.advance();
+	}	
+
+	//parentLayout_->addWidget(okPb_);
+}
+
+void MvQGui::buildFromDefinition(MvRequest& reqDef)
+{
+	layout_->setColumnMinimumWidth(2,40);
+	layout_->setColumnMinimumWidth(3,150);
+	parentLayout_->addLayout(layout_);
+
+	//Build GUI
+	while(reqDef)
+	{
+		qDebug() << "Gui item";
+		reqDef.print();
+
+		//QHBoxLayout *hb=new  QHBoxLayout;
+		//layout_->addLayout(hb);
+		MvQGuiItem *item = MvQGuiItemFactory::makeItem(&reqDef,layout_);
+		if(item)
+		{
+			item_.push_back(item);
+		}
+
+		reqDef.advance();
+	}	
+
+	//parentLayout_->addWidget(okPb_);	
+}
+
+void MvQGui::buildFromKeyProfile(MvKeyProfile *prof)
+{
+	//Clear the gui, we have to rebuild it
+	clear();
+	
+	layout_->setColumnMinimumWidth(2,40);
+	layout_->setColumnMinimumWidth(3,150);
+	parentLayout_->addLayout(layout_);
+
+	for(unsigned int i=0; i < prof->size(); i++)
+	{	
+		//QString keyName=prof->at(i)->name().c_str();
+		//QString name=prof->at(i)->shortName().c_str();
+		
+		MvRequest r("menu");
+	
+		r("name")    =  prof->at(i)->shortName().c_str() ;
+		//r("default")   = "";
+		r("source")  = prof->at(i)->name().c_str();
+		
+		//QHBoxLayout *hb=new  QHBoxLayout;
+		//layout_->addLayout(hb);
+		MvQGuiItem *item = MvQGuiItemFactory::makeItem(&r,layout_);
+		if(item)
+		{
+			item_.push_back(item);
+		}
+
+		r.advance();
+	}	
+
+	//parentLayout_->addWidget(okPb_);
+
+	update(prof);
+}
+
+void MvQGui::update(MvKeyProfile *prof)
+{
+	//Populate the gui with dynamic information 
+	for(unsigned int i=0; i < item_.count(); i++)
+	{
+		MvQGuiItem *item=item_[i];
+	
+		qDebug() << "source: " << item->source();
+
+		if(!item->source().isEmpty())
+		{
+			MvKey* key=prof->key(item->source().toStdString());
+			if(key)
+			{
+				for(map<string,int>::iterator it=key->counter().begin(); 
+                            	    it != key->counter().end(); it++)
+				{
+					item->addValue(it->first.c_str());
+				}
+
+			}
+		}
+	}
+}
+
+#ifdef METVIEW_ODB
+
+void MvQGui::updateFromOdbMetaData(QList<MvQOdbColumn*>& col)
+{
+	//Populate the gui with dynamic information 
+	for(unsigned int i=0; i < item_.count(); i++)
+	{
+		MvQGuiItem *item=item_[i];
+	
+		qDebug() << "source: " << item->source();
+
+		if(!item->source().isEmpty())
+		{
+			foreach(MvQOdbColumn* c,col)
+			{
+				item->addValue(c->name());
+			}
+		}
+	}
+}
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQGui.h b/src/libMvQtGui/MvQGui.h
new file mode 100644
index 0000000..66376f2
--- /dev/null
+++ b/src/libMvQtGui/MvQGui.h
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQGui_H
+#define MvQGui_H
+
+#include <QList>
+#include <QObject>
+#include <QString>
+
+class QBoxLayout;
+class QGridLayout;
+class QPushButton;
+
+class MvQGuiItem;
+class MvKeyProfile;
+class MvRequest;
+
+#ifdef METVIEW_ODB
+class MvQOdbColumn;
+#endif
+
+class MvQGui : public QObject
+{
+	Q_OBJECT
+
+public:
+	MvQGui(QBoxLayout*);
+	~MvQGui();
+
+	void buildFromMacro(QString);
+	void buildFromDefinition(MvRequest&);
+	void buildFromKeyProfile(MvKeyProfile*);
+	void update(MvKeyProfile *);
+#ifdef METVIEW_ODB
+	void updateFromOdbMetaData(QList<MvQOdbColumn*>&);
+#endif
+	void clear();
+	MvQGuiItem* item(int i) {return (i >= 0 && i < item_.count())?item_[i]:0;} 
+	int itemNum() {return item_.count();}
+
+	void interface(QString);
+
+signals:
+	void editFinished();
+
+private:
+	QBoxLayout*	parentLayout_;
+	QGridLayout*    layout_;
+
+	QList<MvQGuiItem*>	item_;
+	QPushButton*	okPb_;	
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQGuiItem.cc b/src/libMvQtGui/MvQGuiItem.cc
new file mode 100644
index 0000000..083ebb2
--- /dev/null
+++ b/src/libMvQtGui/MvQGuiItem.cc
@@ -0,0 +1,647 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQGuiItem.h"
+
+#include <QApplication>
+#include <QCheckBox>
+#include <QColorDialog>
+#include <QComboBox>
+#include <QDebug>
+#include <QDoubleValidator>
+#include <QGridLayout>
+#include <QHBoxLayout>
+#include <QIntValidator>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QListWidget>
+#include <QRadioButton>
+#include <QSlider>
+#include <QTextEdit>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+
+#include "MvRequest.h"
+
+MvQGuiItem::MvQGuiItem(MvRequest* r,QGridLayout *parentLayout) : row_(0)
+{
+	//Toggle to indicate default/non-default settings
+	defaultTb_ = new QToolButton;
+	defaultTb_->setObjectName(QString::fromUtf8("guiItemDefaultTb"));
+	defaultTb_->setCheckable(true);
+	defaultTb_->setChecked(true);
+	defaultTb_->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
+	defaultTb_->setMaximumSize(QSize(10,10));
+
+	//name label
+	const char *name;	
+	r->getValue(name,"name",0);
+	name_=QString(name);	
+	nameLabel_=new QLabel(name_);
+
+	row_=parentLayout->rowCount();
+	parentLayout->addWidget(defaultTb_,row_,MvQGuiItem::DefaultColumn);
+	parentLayout->addWidget(nameLabel_,row_,MvQGuiItem::NameColumn);
+}
+
+MvQGuiItem::~MvQGuiItem()
+{
+	delete defaultTb_;
+	delete nameLabel_;
+}
+
+MvQComboBoxGuiItem::MvQComboBoxGuiItem(MvRequest* r, QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{
+	//Combo
+	combo_ = new QComboBox;
+	//nameLabel_->setBuddy(combo_);
+	
+	//Add to layout
+	parentLayout->addWidget(combo_,row_,MvQGuiItem::WidgetColumn);
+
+	//Populate combo
+
+	//Check if a source specified
+	const char *source;	
+	r->getValue(source,"source",0);
+	if(source)
+	{
+		source_=QString(source);
+		if(source_ == "*")
+			source_.clear();
+	}
+	
+	//If there is no source use "values" to populate the combo
+	if(source_.isEmpty() == true) 
+	{
+		QStringList str;
+		int cnt = r->iterInit("values");
+		for(int i=0; i<cnt; ++i)
+		{
+			const char *cpt;
+			r->iterGetNextValue(cpt);
+			str << QString(cpt);
+		}				
+		combo_->addItems(str);	
+
+		//Set to default value
+		const char* dval;
+		r->getValue(dval,"default",0);
+		int dindex=str.indexOf(QString(dval));
+		if(dindex != -1)
+		{
+			combo_->setCurrentIndex(dindex);
+		}
+	}
+}
+
+MvQComboBoxGuiItem::~MvQComboBoxGuiItem()
+{
+	delete combo_;
+}
+
+QString MvQComboBoxGuiItem::currentValue()
+{
+	return combo_->currentText();
+} 
+
+void  MvQComboBoxGuiItem::addValue(QString value)
+{
+	combo_->addItem(value);
+}
+
+MvQCheckBoxGuiItem::MvQCheckBoxGuiItem(MvRequest* r,QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{
+	//CheckBox
+	checkBox_ = new QCheckBox;
+	//nameLabel_->setBuddy(checkBox_);
+	
+	//Add to layout
+	parentLayout->addWidget(checkBox_,row_,MvQGuiItem::WidgetColumn);
+
+	//Assign values to true and false
+	const char* 	trueVal;
+	r->getValue(trueVal,"true",0);
+	values_[QString(trueVal)]=Qt::Checked;
+
+	const char* 	falseVal;
+	r->getValue(falseVal,"false",0);
+	values_[QString(falseVal)]=Qt::Unchecked;
+
+	const char* dval;
+	r->getValue(dval,"default",0);
+	default_=QString(dval);
+	if(values_.contains(default_))
+	{
+		checkBox_->setCheckState(values_[default_]);
+	}
+}
+
+MvQCheckBoxGuiItem::~MvQCheckBoxGuiItem()
+{
+	delete checkBox_;
+}
+
+QString MvQCheckBoxGuiItem::currentValue()
+{
+	QMapIterator<QString,Qt::CheckState> i(values_);
+	while (i.hasNext()) 
+	{
+     		i.next();
+     		if(i.value() == checkBox_->checkState()) 
+		{
+			return i.key();
+		}
+	}
+	return default_;
+
+} 
+
+
+MvQOnOffGuiItem::MvQOnOffGuiItem(MvRequest* r,QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{
+	//Layout to hold the radio buttons
+	layout_= new QHBoxLayout;
+	parentLayout->addLayout(layout_,row_,MvQGuiItem::WidgetColumn);
+	//QWidget *w=new QWidget;
+	//w->setLayout(hb);
+
+	//Assign values to true and false
+	const char* onVal;
+	r->getValue(onVal,"true",0);
+	QString strOnVal(onVal);
+
+	if(strOnVal.isEmpty())
+		strOnVal="on";
+
+	const char* offVal;
+	r->getValue(offVal,"false",0);
+	QString strOffVal(offVal);
+
+	if(strOffVal.isEmpty())
+		strOffVal="off";
+
+	//Radio buttons
+	radio_[strOnVal] = new QRadioButton(strOnVal); //,w);
+	radio_[strOffVal]= new QRadioButton(strOffVal); //,w);
+	layout_->addWidget(radio_[strOnVal]);
+	layout_->addWidget(radio_[strOffVal],1);
+
+	const char* dval;
+	r->getValue(dval,"default",0);
+	default_=QString(dval);
+	if(default_ == strOnVal || default_ == strOffVal)
+	{
+		radio_[default_]->setChecked(true);
+	}
+}
+
+MvQOnOffGuiItem::~MvQOnOffGuiItem()
+{
+	delete layout_;
+	QMapIterator<QString,QRadioButton*> i(radio_);
+	while (i.hasNext()) 
+	{
+		i.next();
+		delete i.value();
+	}
+
+}
+
+QString MvQOnOffGuiItem::currentValue()
+{
+	QMapIterator<QString,QRadioButton*> i(radio_);
+	while (i.hasNext()) 
+	{
+     		i.next();
+     		if(i.value()->isChecked()) 
+		{
+			return i.key();
+		}
+	}
+	return default_;
+
+} 
+
+
+MvQListGuiItem::MvQListGuiItem(MvRequest* r,QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{	
+	//LinEdit		
+	lineEdit_ = new QLineEdit;
+	//nameLabel_->setBuddy(lineEdit_);
+	
+	parentLayout->addWidget(lineEdit_,row_,MvQGuiItem::WidgetColumn);
+
+	//Get values
+	int cnt = r->iterInit("values");
+	for(int i=0; i<cnt; ++i)
+	{
+		const char *cpt;
+		r->iterGetNextValue(cpt);
+		values_ << QString(cpt);
+	}				
+	
+
+	QToolButton *tb= new QToolButton;
+	tb->setIcon(QApplication::style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton));
+	tb->setCheckable(true);
+	tb->setChecked(false);
+	parentLayout->addWidget(tb,row_,MvQGuiItem::ExpandColumn);
+
+	//listLayout_=new QHBoxLayout;
+	//parentLayout->addWidget(list_,row+1,2);
+	
+	list_ = new QListWidget;
+	list_->setVisible(false);
+
+	//Populate the list with
+
+	//Check if a source specified
+	const char *source;	
+	r->getValue(source,"source",0);
+	if(source)
+	{
+		source_=QString(source);
+		if(source_ == "*")
+			source_.clear();
+	}
+	
+	//If there is no source use "values" to populate the list and 
+	// set lineEdit to "default"
+	if(source_.isEmpty() == true) 
+	{		
+		//Set LineEdit to default value
+		const char* dval;
+		r->getValue(dval,"default",0);
+		default_=QString(dval);
+		int dindex=values_.indexOf(QString(dval));
+		if(dindex != -1)
+		{
+			lineEdit_->setText(default_);
+		}
+
+		foreach(QString str,values_)
+		{
+			QListWidgetItem* item=new QListWidgetItem(str,list_);
+			item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+			item->setCheckState(Qt::Unchecked);
+		}
+		if(dindex != -1)
+		{
+			list_->item(dindex)->setCheckState(Qt::Checked);
+		}
+	}
+
+	//list_->addItems(values_);
+	parentLayout->addWidget(list_,row_+1,MvQGuiItem::WidgetColumn);
+	//listLayout_->addWidget(list_);
+
+	/*QRegExp* rq = new QRegExp();
+	QRegExpValidator* validator = new QRegExpValidator(lineEdit_);
+	
+	lineEdit_->setValidator(validator);*/
+
+
+	connect(tb,SIGNAL(toggled(bool)),
+		this,SLOT(slotSetVisibleList(bool)));
+
+	connect(list_,SIGNAL(itemChanged(QListWidgetItem*)),
+		this, SLOT(slotListItemChanged(QListWidgetItem*)));
+}
+
+MvQListGuiItem::~MvQListGuiItem()
+{
+	delete lineEdit_;
+	delete list_;
+}
+
+void MvQListGuiItem::slotSetVisibleList(bool visible)
+{
+	list_->setVisible(visible);	
+}
+
+void MvQListGuiItem::slotListItemChanged(QListWidgetItem* item)
+{
+	QString text=lineEdit_->text();
+	if(item->checkState() == Qt::Checked)
+	{
+		if(text.size()>0)
+		{
+			text+="/";
+		}
+		text+=item->data(Qt::DisplayRole).toString();
+	}
+	else
+	{
+		QString itemText=item->data(Qt::DisplayRole).toString();
+		QStringList textList=text.split("/");
+		int itemIndex=textList.indexOf(itemText);
+		
+		QString newText;
+		for(int i=0;i < textList.count(); i++)
+		{
+			if(i != 0 && i != itemIndex)
+			{
+				newText+="/";
+			}
+			if(i != itemIndex)
+			{	
+				newText+=textList[i];
+			}
+		}
+		text=newText;
+	}
+
+	lineEdit_->setText(text);
+
+}	
+
+void  MvQListGuiItem::addValue(QString value)
+{
+	QListWidgetItem* item=new QListWidgetItem(value,list_);
+	item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+	item->setCheckState(Qt::Unchecked);
+}
+
+QString MvQListGuiItem::currentValue()
+{
+	QString text=lineEdit_->text();
+	return text;
+} 
+
+
+MvQColourGuiItem::MvQColourGuiItem(MvRequest* r,QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{	
+	//Color combo		
+	combo_ =new QComboBox;
+	
+	//nameLabel_->setBuddy(combo_);
+	
+	//Add to layout
+	parentLayout->addWidget(combo_,row_,MvQGuiItem::WidgetColumn);
+}
+
+MvQColourGuiItem::~MvQColourGuiItem()
+{
+	delete combo_;
+}
+
+void MvQColourGuiItem::slotLoadColourDialog(bool b)
+{
+	QColor col=QColorDialog::getColor();
+}
+
+QString MvQColourGuiItem::currentValue()
+{
+	return QString("red");
+}
+
+MvQSliderGuiItem::MvQSliderGuiItem(MvRequest* r,QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{
+	const char *min;	
+	r->getValue(min,"min",0);	
+	int minVal=QString(min).toInt();
+	
+	const char *max;	
+	r->getValue(max,"max",0);	
+	int maxVal=QString(max).toInt();
+
+	const char *step;	
+	r->getValue(step,"step",0);	
+	int stepVal=QString(step).toInt();
+
+	const char *def;	
+	r->getValue(def,"default",0);	
+	int defVal=QString(def).toInt();
+
+	const char *direction;	
+	r->getValue(direction,"direction",0);	
+	QString directionVal(direction);
+
+	//Slider		
+	slider_ =new QSlider(Qt::Horizontal);
+	slider_->setMinimum(minVal);
+	slider_->setMaximum(maxVal);
+	slider_->setSingleStep(stepVal);
+	slider_->setPageStep(stepVal);
+	slider_->setTickInterval(stepVal);
+	slider_->setTickPosition(QSlider::TicksBelow);
+	slider_->setSliderPosition(defVal);
+
+	//nameLabel_->setBuddy(slider_);
+
+	//valueLabel
+	valueLabel_=new QLabel;
+	slotSetValueLabel(defVal);
+
+	layout_=new QHBoxLayout;	
+	layout_->addWidget(slider_);
+	layout_->addWidget(valueLabel_);
+
+	parentLayout->addLayout(layout_,row_,MvQGuiItem::WidgetColumn);
+
+	connect(slider_, SIGNAL(valueChanged(int)), this, SLOT(slotSetValueLabel(int)) );
+}
+
+MvQSliderGuiItem::~MvQSliderGuiItem()
+{
+	delete layout_;
+	delete slider_;
+	delete valueLabel_;
+}
+	
+void MvQSliderGuiItem::slotSetValueLabel(int value)
+{
+	valueLabel_->setText(QString::number(value));
+}
+
+QString MvQSliderGuiItem::currentValue()
+{
+	return valueLabel_->text();
+}
+
+MvQLineEditGuiItem::MvQLineEditGuiItem(MvRequest* r,QGridLayout *parentLayout,
+		    MvQLineEditGuiItem::InputType type) : MvQGuiItem(r,parentLayout)
+{
+	type_=type;
+
+	//LinEdit		
+	lineEdit_ = new QLineEdit;
+	//nameLabel_->setBuddy(lineEdit_);
+	
+	//Add to layout
+	parentLayout->addWidget(lineEdit_,row_,MvQGuiItem::WidgetColumn);
+
+	//Validator
+	switch(type_)
+	{
+	case Integer:
+	{
+		int minVal, maxVal;
+
+		//Min
+		const char *min;	
+		r->getValue(min,"min",0);
+		if(min)
+		{
+			minVal=QString(min).toInt();
+		}
+		//Max
+		const char *max;	
+		r->getValue(max,"max",0);
+		if(max)
+		{
+			maxVal=QString(max).toInt();
+		}
+		QIntValidator* validator = new QIntValidator(lineEdit_);
+		if(min != 0 && max !=0)
+		{
+			validator->setRange(minVal,maxVal);
+		}
+		lineEdit_->setValidator(validator);
+
+		break;
+	}
+	case Float:
+	{
+		float minVal, maxVal;
+
+		//Min
+		const char *min;	
+		r->getValue(min,"min",0);
+		if(min)
+		{
+			minVal=QString(min).toDouble();
+		}
+		//Max
+		const char *max;	
+		r->getValue(max,"max",0);
+		if(max)
+		{
+			maxVal=QString(max).toDouble();
+		}
+		QDoubleValidator* validator = new QDoubleValidator(lineEdit_);
+		if(min != 0 && max !=0)
+		{
+			validator->setRange(minVal,maxVal,5);
+		}
+		lineEdit_->setValidator(validator);
+
+		break;
+	}	
+
+
+	default:
+		break;
+	}
+
+	const char *def;	
+	r->getValue(def,"default",0);
+	if(def)
+		lineEdit_->setText(QString(def));
+	
+}
+
+MvQLineEditGuiItem::~MvQLineEditGuiItem()
+{
+	delete lineEdit_;
+}
+
+QString MvQLineEditGuiItem::currentValue()
+{
+	return lineEdit_->text();
+}
+
+//======================================
+// TextEdit
+//======================================
+
+MvQTextEditGuiItem::MvQTextEditGuiItem(MvRequest* r,QGridLayout *parentLayout) : MvQGuiItem(r,parentLayout)
+{	
+	//LinEdit		
+	textEdit_ = new QTextEdit;
+	//nameLabel_->setBuddy(lineEdit_);
+
+	const char *def;	
+	r->getValue(def,"default",0);
+	if(def)
+		textEdit_->setPlainText(QString(def));
+	
+	//Add to layout
+
+	parentLayout->addWidget(textEdit_,row_,MvQGuiItem::WidgetColumn);
+}
+
+MvQTextEditGuiItem::~MvQTextEditGuiItem()
+{
+	delete textEdit_;
+}
+
+QString MvQTextEditGuiItem::currentValue()
+{
+	return textEdit_->toPlainText();
+}
+
+
+
+
+MvQGuiItem* MvQGuiItemFactory::makeItem(MvRequest* r,QGridLayout* layout)
+{
+	QString type(r->getVerb());
+
+	qDebug() << "Gui type: " << type;
+
+	if(type == "option_menu")
+  	{
+		return new MvQComboBoxGuiItem(r,layout);
+	}
+	else if(type == "checkbox")
+  	{
+		return new MvQCheckBoxGuiItem(r,layout);
+	}
+	else if(type == "on_off")
+  	{
+		return new MvQOnOffGuiItem(r,layout);
+	}
+	else if(type == "menu")
+  	{
+		return new MvQListGuiItem(r,layout);
+	}
+	else if(type == "colour")
+  	{
+		return new MvQColourGuiItem(r,layout);
+	}
+  	else if(type == "any")
+  	{
+		return new MvQLineEditGuiItem(r,layout,MvQLineEditGuiItem::Text);
+	}
+ 	else if(type == "ui_integer")
+  	{
+		return new MvQLineEditGuiItem(r,layout,MvQLineEditGuiItem::Integer);
+	}
+	else if(type == "ui_float")
+  	{
+		return new MvQLineEditGuiItem(r,layout,MvQLineEditGuiItem::Float);
+	}
+	else if(type == "slider")
+  	{
+		return new MvQSliderGuiItem(r,layout);
+	}
+	else if(type == "scrolled_text")
+  	{
+		return new MvQTextEditGuiItem(r,layout);
+	}
+	/*else if(type == "line")
+    	{
+		return new MvQLineEditItem;
+	}*/
+	return 0;
+}
diff --git a/src/libMvQtGui/MvQGuiItem.h b/src/libMvQtGui/MvQGuiItem.h
new file mode 100644
index 0000000..671e2dc
--- /dev/null
+++ b/src/libMvQtGui/MvQGuiItem.h
@@ -0,0 +1,213 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQGuiItem_H
+#define MvQGuiItem_H
+
+#include <QMap>
+#include <QObject>
+#include <QStringList>
+
+class QCheckBox;
+class QComboBox;
+class QHBoxLayout;
+class QGridLayout;
+class QLabel;
+class QGridLayout;
+class QLineEdit;
+class QListWidget;
+class QListWidgetItem;
+class QRadioButton;
+class QSlider;
+class QTextEdit;
+class QToolButton;
+class QVBoxLayout;
+
+class MvRequest;
+
+class MvQGuiItem
+{
+public:
+	virtual ~MvQGuiItem();
+	QString name() {return name_;}
+	//QString keyName() {return keyName_;}
+	//QString id() {return id_;}
+	//QString type() {return type_;}
+	QString source() {return source_;}
+		
+	//void setName(QString s) {name_=s;}
+	//void setKeyName(QString s) {keyName_=s;}
+	//void setId(QString s) {id_=s;}
+	//void setType(QString s) {type_=s;}
+	//void setSource(QString s) {source_=s;}
+
+	virtual QString currentValue()=0;
+	virtual void addValue(QString)=0;
+
+protected:
+	MvQGuiItem(MvRequest*,QGridLayout*);
+	
+	QToolButton* defaultTb_;
+	QLabel* nameLabel_;
+
+	QString name_;
+	QString source_;
+	
+	int row_;
+	
+	enum ColumnPos {DefaultColumn=0,NameColumn=1,ExpandColumn=2,WidgetColumn=3};
+};
+
+
+class MvQComboBoxGuiItem : public MvQGuiItem
+{
+public:
+	MvQComboBoxGuiItem(MvRequest*,QGridLayout*);
+	~MvQComboBoxGuiItem();
+	QString currentValue();
+	void addValue(QString);
+
+private:
+	QComboBox* combo_; 
+};
+
+class MvQCheckBoxGuiItem : public MvQGuiItem
+{
+public:
+	MvQCheckBoxGuiItem(MvRequest*,QGridLayout*);
+	~MvQCheckBoxGuiItem();
+	QString currentValue();
+	void addValue(QString) {};
+
+private:
+	QCheckBox* checkBox_; 
+	QMap<QString,Qt::CheckState> values_;
+	QString default_;
+};
+
+
+class MvQOnOffGuiItem : public MvQGuiItem
+{
+public:
+	MvQOnOffGuiItem(MvRequest*,QGridLayout*);
+	~MvQOnOffGuiItem();
+	QString currentValue();
+	void addValue(QString) {};
+
+private:
+	QMap<QString,QRadioButton*> radio_; 
+	QString default_;
+	QHBoxLayout *layout_;
+};
+
+
+class MvQListGuiItem : public QObject, public MvQGuiItem
+{
+	Q_OBJECT
+public:
+	MvQListGuiItem(MvRequest*,QGridLayout*);
+	~MvQListGuiItem();
+	QString currentValue();
+	void addValue(QString);
+
+public slots:
+	void slotSetVisibleList(bool);
+	void slotListItemChanged(QListWidgetItem*);
+
+private:
+	QLineEdit* lineEdit_; 
+	QStringList values_;
+	QString default_;
+	QListWidget* list_; 
+};
+
+class MvQColourGuiItem :  public QObject, public MvQGuiItem
+{
+	Q_OBJECT
+
+public:
+	MvQColourGuiItem(MvRequest*,QGridLayout*);
+	~MvQColourGuiItem();
+	QString currentValue();
+	void addValue(QString) {};
+
+public slots:
+	void slotLoadColourDialog(bool);
+	
+private:
+	QComboBox*   combo_; 
+	QStringList values_;
+	QString default_; 
+};
+
+
+class MvQLineEditGuiItem : public MvQGuiItem
+{
+public:
+	enum InputType {Text,Integer,Float,Point,Line,Area,List};
+
+	MvQLineEditGuiItem(MvRequest*,QGridLayout*,MvQLineEditGuiItem::InputType);
+	~MvQLineEditGuiItem();
+	QString currentValue();
+	void addValue(QString) {};
+
+private:
+	QLabel*	   label_;
+	QLineEdit* lineEdit_; 
+	QStringList values_;
+	QString default_; 
+	InputType type_;
+};
+
+class MvQTextEditGuiItem : public MvQGuiItem
+{
+public:
+	MvQTextEditGuiItem(MvRequest*,QGridLayout*);
+	~MvQTextEditGuiItem();
+	QString currentValue();
+	void addValue(QString) {};
+
+private:
+	QLabel*	   label_;
+	QTextEdit* textEdit_; 
+	QStringList values_;
+	QString default_; 
+};
+
+class MvQSliderGuiItem : public QObject, public MvQGuiItem
+{
+	Q_OBJECT
+
+public:
+	MvQSliderGuiItem(MvRequest*,QGridLayout*);
+	~MvQSliderGuiItem();
+	QString currentValue();
+	void addValue(QString) {};
+
+public slots:
+	void slotSetValueLabel(int);
+
+private:
+	QLabel*	   label_;
+	QSlider*   slider_;
+	QLabel*    valueLabel_; 
+	QStringList values_;
+	QString default_; 
+	QHBoxLayout* layout_;
+};
+
+class MvQGuiItemFactory
+{
+public:	
+	MvQGuiItemFactory() {};
+	//static MvQGuiItem*  makeItem(QString,QString,QGridLayout*);
+	static MvQGuiItem*  makeItem(MvRequest*,QGridLayout*);
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQHighlighter.cc b/src/libMvQtGui/MvQHighlighter.cc
new file mode 100644
index 0000000..2081288
--- /dev/null
+++ b/src/libMvQtGui/MvQHighlighter.cc
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QRegExp>
+#include <QStringList>
+
+#include "MvQHighlighter.h"
+
+using namespace std;
+
+MvQHighlighter::MvQHighlighter(QTextDocument *parent)
+     : QSyntaxHighlighter(parent)
+ {
+ }
+
+ void MvQHighlighter::highlightBlock(const QString &text)
+ {
+     foreach (HighlightingRule rule, highlightingRules) 
+	{
+         QRegExp expression(rule.pattern);
+         int index = text.indexOf(expression);
+         while (index >= 0) 
+	{
+             int length = expression.matchedLength();
+             setFormat(index, length, rule.format);
+             index = text.indexOf(expression, index + length);
+         }
+     }
+     setCurrentBlockState(0);
+
+    /* int startIndex = 0;
+     if (previousBlockState() != 1)
+         startIndex = text.indexOf(commentStartExpression);
+
+     while (startIndex >= 0) 
+	{
+         int endIndex = text.indexOf(commentEndExpression, startIndex);
+         int commentLength;
+         if (endIndex == -1) 
+	{
+             setCurrentBlockState(1);
+             commentLength = text.length() - startIndex;
+         } 
+	else 
+	{
+             commentLength = endIndex - startIndex
+                             + commentEndExpression.matchedLength();
+         }
+         setFormat(startIndex, commentLength, multiLineCommentFormat);
+         startIndex = text.indexOf(commentStartExpression,
+                                                 startIndex + commentLength);
+     }*/
+ }
+
+ MvQOdbSqlHighlighter::MvQOdbSqlHighlighter(QTextDocument *parent,QStringList columns, QStringList functions)
+     : MvQHighlighter(parent)
+ {
+	HighlightingRule rule;
+
+  	//Keywords
+     	QTextCharFormat keywordFormat;
+
+	keywordFormat.setForeground(Qt::darkBlue);
+     	keywordFormat.setFontWeight(QFont::Bold);
+ 
+    	QStringList keywordPatterns;
+      	keywordPatterns << "select" << "from" << "where" << "orderby" << "uniqueby" << "distinct";
+
+	foreach (QString pattern, keywordPatterns)
+	{
+         	rule.pattern = QRegExp(pattern,Qt::CaseInsensitive);
+    		//QString s=pattern + "(?==)";
+		//rule.pattern = QRegExp(s,Qt::CaseInsensitive);    		
+		rule.format = keywordFormat;
+         	highlightingRules.append(rule);
+	}
+
+	//Columns
+     	setColumns(columns);
+ }
+
+void MvQOdbSqlHighlighter::setColumns(QStringList columns)
+{
+	if(columns.count() == 0)
+		return;
+
+	//Here we should remove the previous settings!!!!!!
+
+	HighlightingRule rule;
+
+	rule.id="column";
+
+  	QTextCharFormat columnFormat;
+
+	columnFormat.setForeground(Qt::red);
+     	columnFormat.setFontWeight(QFont::Bold);
+
+	foreach (QString pattern, columns)
+	{
+         	rule.pattern = QRegExp(pattern,Qt::CaseInsensitive);
+    		//QString s=pattern + "(?==)";
+		//rule.pattern = QRegExp(s,Qt::CaseInsensitive);    		
+		rule.format = columnFormat;
+         	highlightingRules.append(rule);
+	}
+
+}
diff --git a/src/libMvQtGui/MvQHighlighter.h b/src/libMvQtGui/MvQHighlighter.h
new file mode 100644
index 0000000..c807817
--- /dev/null
+++ b/src/libMvQtGui/MvQHighlighter.h
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQHighlighter_H
+#define MvQHighlighter_H
+
+#include <QSyntaxHighlighter>
+#include <QTextCharFormat>
+
+class QTextDocument;
+
+class MvQHighlighter : public QSyntaxHighlighter
+ {
+ public:
+     MvQHighlighter(QTextDocument *parent);
+
+ protected:
+     virtual void highlightBlock(const QString &text);
+
+     struct HighlightingRule
+     {
+         QRegExp pattern;
+         QTextCharFormat format;
+	 QString id;
+     };
+
+     QVector<HighlightingRule> highlightingRules;
+ };
+
+
+class MvQOdbSqlHighlighter : public MvQHighlighter 
+{
+public:
+     MvQOdbSqlHighlighter(QTextDocument *parent,QStringList,QStringList);
+    ~MvQOdbSqlHighlighter(){}
+    void setColumns(QStringList);
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQKeyDialog.cc b/src/libMvQtGui/MvQKeyDialog.cc
new file mode 100644
index 0000000..81b66a9
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyDialog.cc
@@ -0,0 +1,1064 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QComboBox>
+#include <QDebug>
+#include <QDialogButtonBox>
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QInputDialog>
+#include <QLabel>
+#include <QLineEdit>
+#include <QListWidget>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QSettings>
+#include <QStackedWidget>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout> 
+
+#include "MvQKeyDialog.h"
+#include "MvQKeyModel.h"
+#include "MvQKeyManager.h"
+#include "MvQTreeView.h"
+
+#include "MvKeyProfile.h"
+
+//===================================
+//
+// MvQKeyProfileDialog
+//
+//===================================
+
+
+MvQKeyProfileDialog::MvQKeyProfileDialog(QString title,MvQKeyManager *manager,int currentRow,QWidget *parent) : QWidget(parent), manager_(manager)
+{
+	QLabel *label;
+	
+	QVBoxLayout *layout=new QVBoxLayout;
+	setLayout(layout);
+
+	QHBoxLayout *hb = new QHBoxLayout;
+	layout->addLayout(hb);
+
+	profList_ = new QListWidget;
+	//profList_->setProperty("mvStyle",0);
+	//profList_->setAlternatingRowColors(true);
+	hb->addWidget(profList_);
+	
+	QVBoxLayout *vb = new QVBoxLayout;
+	hb->addLayout(vb);
+
+	QPushButton *addPb=new QPushButton(tr("&New"));
+	addPb->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_add.svg"))));
+	addPb->setToolTip(tr("Add new profile"));
+ 
+	QPushButton *saveAsPb=new QPushButton(tr("Du&plicate"));
+	saveAsPb->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_duplicate.svg"))));
+	saveAsPb->setToolTip(tr("Duplicate profile"));
+
+	renamePb_=new QPushButton(tr("&Rename ..."));
+	renamePb_->setToolTip(tr("Rename profile"));
+
+	deletePb_=new QPushButton(tr("&Delete"));
+	deletePb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_delete.svg"))));
+	deletePb_->setToolTip(tr("Delete profile"));
+
+	vb->addWidget(addPb);
+	vb->addWidget(saveAsPb);
+	vb->addWidget(renamePb_);
+	vb->addWidget(deletePb_);
+	vb->addStretch(1);
+
+	connect(profList_,SIGNAL(currentRowChanged (int)),
+		this,SLOT(slotSelectProfile(int)));
+
+	connect(addPb,SIGNAL(clicked()),
+		this,SLOT(slotAddProfile()));
+
+	connect(saveAsPb,SIGNAL(clicked()),
+		this,SLOT(slotDuplicateProfile()));
+
+	connect(deletePb_,SIGNAL(clicked()),
+		this,SLOT(slotDeleteProfile()));
+
+	connect(renamePb_,SIGNAL(clicked()),
+		this,SLOT(slotRenameProfile()));
+
+
+	init(currentRow);
+}
+
+void MvQKeyProfileDialog::init(int row)
+{
+   	for (vector<MvKeyProfile*>::const_iterator it=manager_->data().begin(); it != manager_->data().end(); it++) 
+	{
+		MvKeyProfile *prof = *it;
+		QListWidgetItem *item=new QListWidgetItem(QString(prof->name().c_str()));
+
+		if((*it)->systemProfile())
+		{
+			item->setIcon(QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+
+		profList_->addItem(item);		
+	}
+
+	if(profList_->count() >0)
+		profList_->setCurrentRow(row);
+}
+
+void MvQKeyProfileDialog::slotUpdate()
+{
+	disconnect(profList_, SIGNAL(currentRowChanged(int)),this,0);
+	int row=profList_->currentRow();
+	profList_->clear();
+	init(row);
+	connect(profList_,SIGNAL(currentRowChanged (int)),
+		this,SLOT(slotSelectProfile(int)));
+	emit dataChanged();	 
+}
+
+void MvQKeyProfileDialog::slotSelectProfile(int row)
+{
+	if(row < 0 || row >= manager_->data().size())
+		return;
+
+	if(manager_->data().at(row)->systemProfile())
+	{
+		deletePb_->setEnabled(false);
+		renamePb_->setEnabled(false);
+	}
+	else
+	{
+		deletePb_->setEnabled(true);
+		renamePb_->setEnabled(true);	
+	}
+
+	emit currentProfileChanged(row);
+}
+
+void MvQKeyProfileDialog::slotAddProfile()
+{
+	bool ok;
+     	QString text = QInputDialog::getText(this, tr("Add profile"),
+                                          tr("New profile name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        {
+	 	manager_->addProfile(text.toStdString());
+		profList_->addItem(text);
+		emit dataChanged();
+		profList_->setCurrentRow(profList_->count()-1);
+	}
+}
+
+void MvQKeyProfileDialog::slotDeleteProfile()
+{
+	int index=profList_->currentRow();
+	if(index < 0 || index >= manager_->data().size())
+		return;
+
+	if(manager_->data().at(index)->systemProfile())
+		return;
+
+	QMessageBox msgBox;
+	msgBox.setWindowTitle(tr("Delete profile"));
+
+	QString str=tr("Are you sure that you want to delete profile: <b>");
+	str+=QString::fromStdString(manager_->data().at(index)->name()) ;
+	str+="</b>?";
+
+ 	msgBox.setText(str);
+ 	msgBox.setIcon(QMessageBox::Warning);
+	msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
+	msgBox.setDefaultButton(QMessageBox::Cancel);
+	int ret=msgBox.exec();
+
+	switch (ret) 
+	{
+   	case QMessageBox::Yes:
+       	{	//keyModel_->profileIsAboutToChange();
+		//keyModel_->setKeyProfile(0);
+
+		manager_->deleteProfile(index);
+
+		QListWidgetItem   *item=profList_->takeItem(index);
+		delete item;
+
+		emit dataChanged();
+
+		if(index < profList_->count())
+			profList_->setCurrentRow(index);
+		else
+			profList_->setCurrentRow(profList_->count()-1);
+		//slotSelectProfile(0);
+	}
+      	break;
+   	case QMessageBox::Cancel:
+       	// Cancel was clicked
+       	break;
+   	default:
+       	// should never be reached
+      	 break;
+	}
+}
+
+void MvQKeyProfileDialog::slotDuplicateProfile()
+{
+	int index=profList_->currentRow();
+	if(index < 0 || index >= manager_->data().size() || manager_->data().size() == 0)
+		return;
+
+	bool ok;
+     	QString text = QInputDialog::getText(this, tr("Duplicate profile"),
+                                          tr("New profile name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        { 	
+		MvKeyProfile* newProf=manager_->addProfile(text.toStdString(),manager_->data().at(index));
+		newProf->setSystemProfile(false);
+
+		profList_->addItem(text);
+		emit dataChanged();
+		profList_->setCurrentRow(profList_->count()-1);		
+	}
+}
+
+void MvQKeyProfileDialog::slotRenameProfile()
+{
+	int index=profList_->currentRow();
+	if(index < 0 || index >= manager_->data().size() || manager_->data().size() == 0)
+		return;
+
+	if(manager_->data().at(index)->systemProfile())
+		return;
+
+	bool ok;
+     	QString text = QInputDialog::getText(this, tr("Rename profile"),
+                                          tr("Profile name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        {
+		MvKeyProfile *prof=manager_->data().at(index);
+		prof->setName(text.toStdString());
+		profList_->item(index)->setData(Qt::DisplayRole,text);
+		emit dataChanged();	 	
+	}
+}
+
+
+//=================================================
+//
+// MvQKeyListPag
+//
+//=================================================
+
+MvQKeyListPage::MvQKeyListPage(QString title,MvQKeyManager *manager,QList<MvKeyProfile *> allKeys,
+	QWidget *parent) : QWidget(parent), manager_(manager), allKey_(allKeys)
+{
+	//setWindowTitle(title);
+
+	QVBoxLayout *layout=new QVBoxLayout;
+	setLayout(layout);
+
+	//Profiles
+
+	QHBoxLayout *profHb=new QHBoxLayout;
+	layout->addLayout(profHb);
+
+	QLabel *label = new QLabel(tr("Profile:"));
+	profCombo_ = new QComboBox;
+	label->setBuddy(profCombo_);
+	profHb->addWidget(label);
+	profHb->addWidget(profCombo_);
+	profHb->addStretch(1);
+
+	QHBoxLayout *mainHb=new QHBoxLayout;
+	layout->addLayout(mainHb);	
+
+	//-----------------------------
+	// Keys in a given profile
+	//-----------------------------
+
+	QGroupBox *keyBox= new QGroupBox(tr("Keys of profile"));
+	mainHb->addWidget(keyBox);
+
+	QVBoxLayout *vbKey = new QVBoxLayout;
+	keyBox->setLayout(vbKey);
+
+	QHBoxLayout *hbPb=new  QHBoxLayout;
+	vbKey->addLayout(hbPb);
+
+	addKeyTb_=new QToolButton(this);
+	addKeyTb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/add.svg"))));
+	addKeyTb_->setToolTip(tr("Add new key"));
+	if(manager_->predefinedKeysOnly())
+	{
+	  	addKeyTb_->setEnabled(false);
+	}	
+
+	deleteKeyTb_=new QToolButton(this);
+	deleteKeyTb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/remove.svg"))));
+	deleteKeyTb_->setToolTip(tr("Delete key"));
+
+	moveUpKeyTb_=new QToolButton(this);
+	moveUpKeyTb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/arrow_up.svg"))));
+	moveUpKeyTb_->setToolTip(tr("Move up key"));
+
+	moveDownKeyTb_=new QToolButton(this);
+	moveDownKeyTb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/arrow_down.svg"))));
+	moveDownKeyTb_->setToolTip(tr("Move down key"));
+
+	editKeyTb_=new QToolButton(this);
+	editKeyTb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/configure.svg"))));
+	editKeyTb_->setToolTip(tr("Edit key"));
+	
+	hbPb->addWidget(editKeyTb_);
+	hbPb->addWidget(addKeyTb_);
+	hbPb->addWidget(deleteKeyTb_);
+	hbPb->addWidget(moveUpKeyTb_);
+	hbPb->addWidget(moveDownKeyTb_);
+	hbPb->addStretch(1);
+	
+	keyTree_ = new QTreeView;
+	keyTree_->setRootIsDecorated(false);
+	keyTree_->setObjectName("keyTree");
+	//keyTree_->setProperty("mvStyle",0);
+	//keyTree_->setAlternatingRowColors(true);
+        keyTree_->setAllColumnsShowFocus(true);
+	keyTree_->setDragEnabled(true);
+ 	keyTree_->setAcceptDrops(true);
+	keyTree_->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+	vbKey->addWidget(keyTree_);
+
+	keyModel_=new MvQKeyModel;
+	keyTree_->setModel(keyModel_);
+
+	//-----------------------------
+	// Helper containing all the keys
+	//-----------------------------
+
+	QVBoxLayout *vbToProf = new QVBoxLayout;
+	mainHb->addLayout(vbToProf);
+
+	addKeyToProfTb_=new QToolButton(this);	
+	addKeyToProfTb_->setToolTip(tr("Add key to key profile"));
+	//addKeyToProfTb->setIcon(QIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowLeft)));
+	addKeyToProfTb_->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/arrow_left.svg"))));
+	vbToProf->addWidget(addKeyToProfTb_);
+	
+	QGroupBox *allKeyBox= new QGroupBox(tr("All available keys"));
+	mainHb->addWidget(allKeyBox);
+
+	QVBoxLayout *vbAllKey = new QVBoxLayout;
+	allKeyBox->setLayout(vbAllKey);
+
+	QHBoxLayout *comboLayout=new  QHBoxLayout;
+	QLabel *comboLabel = new QLabel(tr("Key categories:"));
+	allKeyCombo_ = new QComboBox;
+	comboLabel->setBuddy(allKeyCombo_);
+
+	comboLayout->addWidget(comboLabel);
+	comboLayout->addWidget(allKeyCombo_);
+	//comboLayout->addStretch(1);
+	vbAllKey->addLayout(comboLayout);
+
+	allKeyTree_ = new QTreeView;
+	allKeyTree_->setRootIsDecorated(false);
+	allKeyTree_->setObjectName("allKeyTree");
+	//allKeyTree_->setProperty("mvStyle",0);
+	//allKeyTree_->setAlternatingRowColors(true);
+        allKeyTree_->setAllColumnsShowFocus(true);
+	allKeyTree_->setDragDropMode(QAbstractItemView::DragOnly);
+	allKeyTree_->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+	vbAllKey->addWidget(allKeyTree_);
+
+	allKeyModel_=new MvQKeyModel(MvQKeyModel::AllKeysMode);
+	allKeyTree_->setModel(allKeyModel_);
+
+	//-----------------------------
+	// Signals and slots
+	//-----------------------------
+	
+	connect(keyTree_,SIGNAL(doubleClicked(const QModelIndex&)),
+		this,SLOT(slotEditTree(const QModelIndex&)));
+
+	connect(addKeyTb_,SIGNAL(clicked()),
+		this,SLOT(slotAddKey()));
+
+	connect(deleteKeyTb_,SIGNAL(clicked()),
+		this,SLOT(slotDeleteKey()));
+
+	connect(moveUpKeyTb_,SIGNAL(clicked()),
+		this,SLOT(slotMoveUpKey()));
+
+	connect(moveDownKeyTb_,SIGNAL(clicked()),
+		this,SLOT(slotMoveDownKey()));
+
+	connect(editKeyTb_,SIGNAL(clicked()),
+		this,SLOT(slotEditKey()));
+
+	connect(addKeyToProfTb_,SIGNAL(clicked()),
+		this,SLOT(slotAddKeyToProf()));
+
+	init();	
+	setAllKeyList(allKey_);
+}
+
+void MvQKeyListPage::init()
+{
+   	int i=0;
+	for (vector<MvKeyProfile*>::const_iterator it=manager_->data().begin(); it != manager_->data().end(); it++) 
+	{
+		MvKeyProfile *prof = *it;
+		profCombo_->addItem(QString(prof->name().c_str() ));
+		if(prof->systemProfile())
+		{
+			profCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+		i++;		
+	}
+
+
+	profCombo_->setCurrentIndex(-1);
+
+	connect(profCombo_,SIGNAL(currentIndexChanged(int)),
+		this,SLOT(slotSelectProfile(int)));
+
+	if(profCombo_->count() >0)
+		profCombo_->setCurrentIndex(0);
+}
+
+void MvQKeyListPage::slotProfilesChanged()
+{	
+	QString currentProfName=profCombo_->currentText();
+
+	disconnect(profCombo_, SIGNAL(currentIndexChanged(int)),0,0);
+
+	//Clear the profile list
+	profCombo_->clear();
+
+	int i=0;
+	int index=-1;
+	for (vector<MvKeyProfile*>::const_iterator it=manager_->data().begin(); it != manager_->data().end(); it++) 
+	{
+		profCombo_->addItem(QString((*it)->name().c_str() ));
+		if((*it)->name() == currentProfName.toStdString())
+		{
+			index=i;
+		}
+		if((*it)->systemProfile())
+		{
+			profCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+		i++;
+	}
+
+	profCombo_->setCurrentIndex(-1);
+
+	connect(profCombo_, SIGNAL(currentIndexChanged(int)),  
+		this,SLOT(slotSelectProfile(int)));
+
+	if(index != -1)
+	{
+		profCombo_->setCurrentIndex(index);
+	}
+	else
+	{
+		profCombo_->setCurrentIndex(0);
+	}
+
+}
+
+void MvQKeyListPage::slotChangeCurrentProfile(int row)
+{
+	profCombo_->setCurrentIndex(row);
+}
+
+void MvQKeyListPage::slotSelectProfile(int row)
+{
+	if(row < 0 || row >= manager_->data().size())
+		return;
+
+	MvKeyProfile* prof=manager_->data().at(row);
+
+	keyModel_->profileIsAboutToChange();
+	keyModel_->setKeyProfile(prof);
+	resizeKeyTreeColumns();
+
+	if(prof->systemProfile())
+	{
+	  	keyTree_->setEnabled(false);
+		//keyTree_->setDragEnabled(false);
+ 		//keyTree_->setAcceptDrops(false);
+		addKeyTb_->setEnabled(false);
+		deleteKeyTb_->setEnabled(false);
+		moveUpKeyTb_->setEnabled(false);
+		moveDownKeyTb_->setEnabled(false);
+		editKeyTb_->setEnabled(false);
+		addKeyToProfTb_->setEnabled(false);
+	}
+	else
+	{
+		keyTree_->setEnabled(true);
+		//keyTree_->setDragEnabled(true);
+ 		//keyTree_->setAcceptDrops(true);
+		if(!manager_->predefinedKeysOnly())
+		{
+		  	addKeyTb_->setEnabled(true);
+		}
+		deleteKeyTb_->setEnabled(true);
+		moveUpKeyTb_->setEnabled(true);
+		moveDownKeyTb_->setEnabled(true);
+		editKeyTb_->setEnabled(true);
+		addKeyToProfTb_->setEnabled(true);
+	}
+
+}
+
+void MvQKeyListPage::slotAddKey()
+{
+	/*MvKeyProfile *prof=keyModel_->profile();
+	QModelIndex index=keyTree_->currentIndex();
+
+	if(prof==0) //|| !index.isValid())
+		return;
+
+	bool ok;
+     	QString text = QInputDialog::getText(this, tr("Add key"),
+                                          tr("New key name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+	{
+		MvKey* key=new MvKey(text.toStdString(),text.toStdString());
+
+         	keyModel_->profileIsAboutToChange();
+		prof->addKey(key);
+		keyModel_->setKeyProfile(prof);
+		resizeKeyTreeColumns();
+	}*/
+
+	MvKeyProfile *prof=keyModel_->profile();
+	QModelIndex index=keyTree_->currentIndex();
+
+	if(prof==0) //|| !index.isValid())
+		return;
+	
+	MvKey *key = new MvKey;	
+	MvQKeyEditDialog keyDialog(key);
+
+	if(keyDialog.exec()  == QDialog::Accepted && !key->name().empty())
+	{  
+		keyModel_->profileIsAboutToChange();
+		prof->addKey(key);
+		keyModel_->setKeyProfile(prof);
+		resizeKeyTreeColumns();		
+	}
+	else
+	{
+	  	delete key;
+	}
+}
+
+void MvQKeyListPage::slotDeleteKey()
+{
+	MvKeyProfile *prof=keyModel_->profile();
+	QModelIndex index=keyTree_->currentIndex();
+
+	if(prof==0 || !index.isValid() )
+		return;
+
+	QString str=tr("Are you sure that you want to delete key: <b>");
+	str+=QString::fromStdString(prof->at(index.row())->name()) ;
+	str+="</b>?";
+
+ 	QMessageBox msgBox;
+	msgBox.setWindowTitle(tr("Delete key"));
+	msgBox.setText(str);
+	msgBox.setIcon(QMessageBox::Warning);
+ 	msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
+	msgBox.setDefaultButton(QMessageBox::Cancel);
+	int ret=msgBox.exec();
+
+	switch (ret) 
+	{
+   	case QMessageBox::Yes:
+       	{	keyModel_->profileIsAboutToChange();
+		prof->deleteKey(index.row());
+		keyModel_->setKeyProfile(prof);
+		resizeKeyTreeColumns();
+	}
+      	break;
+   	case QMessageBox::Cancel:
+       	// Cancel was clicked
+       	break;
+   	default:
+       	// should never be reached
+      	 break;
+	}
+}
+
+void MvQKeyListPage::slotMoveUpKey()
+{
+	MvKeyProfile *prof=keyModel_->profile();
+	QModelIndex index=keyTree_->currentIndex();
+
+	if(prof==0 || !index.isValid())
+		return;
+
+	if(index.row() > 0)
+	{
+		keyModel_->profileIsAboutToChange();
+		prof->reposition(index.row(),index.row()-1);
+		keyModel_->setKeyProfile(prof);
+		resizeKeyTreeColumns();
+		keyTree_->setCurrentIndex(keyModel_->index(index.row()-1,0));
+	}
+}
+
+void MvQKeyListPage::slotMoveDownKey()
+{
+	MvKeyProfile *prof=keyModel_->profile();
+	QModelIndex index=keyTree_->currentIndex();
+
+	if(prof==0 || !index.isValid())
+		return;
+
+	if(index.row() < prof->size()-1)
+	{
+		keyModel_->profileIsAboutToChange();
+		prof->reposition(index.row(),index.row()+1);
+		keyModel_->setKeyProfile(prof);
+		resizeKeyTreeColumns();
+		keyTree_->setCurrentIndex(keyModel_->index(index.row()+1,0));
+	}
+}
+
+void MvQKeyListPage::slotEditKey()
+{
+	MvKeyProfile *prof=keyModel_->profile();
+	QModelIndex index=keyTree_->currentIndex();
+
+	if(prof==0 || !index.isValid())
+		return;
+
+	if(index.row() <= prof->size()-1)
+	{
+		MvQKeyEditDialog edit(prof->at(index.row()));
+		if(edit.exec()  == QDialog::Accepted)
+		{
+			//Not too efficient
+			keyModel_->profileIsAboutToChange();
+			keyModel_->setKeyProfile(prof);
+			resizeKeyTreeColumns();
+		}
+	}
+}
+
+void MvQKeyListPage::slotEditTree(const QModelIndex& index)
+{
+	slotEditKey();
+}
+
+void MvQKeyListPage::slotAddKeyToProf()
+{
+	MvKeyProfile *allProf=allKeyModel_->profile();
+	QModelIndex index=allKeyTree_->currentIndex();
+
+	if(allProf==0 || !index.isValid() )
+		return;
+
+	MvKeyProfile *prof=keyModel_->profile();
+	if(prof)
+	{
+		MvKey* key=allProf->at(index.row())->clone();
+
+       		keyModel_->profileIsAboutToChange();
+		prof->addKey(key);
+		keyModel_->setKeyProfile(prof);
+		resizeKeyTreeColumns();
+	}
+}	
+
+void MvQKeyListPage::resizeKeyTreeColumns()
+{
+	for(int i=0;i < keyModel_->columnCount()-1; i++)
+	{ 
+		keyTree_->resizeColumnToContents(i);
+	}
+}
+
+void MvQKeyListPage::setAllKeyList(QList<MvKeyProfile*> allKeys)
+{
+	allKeyTree_->setModel(allKeyModel_);
+
+	allKey_=allKeys;
+
+	foreach(MvKeyProfile* prof,allKey_)
+	{
+		allKeyCombo_->addItem(QString::fromStdString(prof->name()));
+	}
+
+	allKeyCombo_->setCurrentIndex(-1);
+
+	connect(allKeyCombo_,SIGNAL(currentIndexChanged(int)),
+		this,SLOT(slotSelectAllKeyGroup(int)));
+
+	allKeyCombo_->setCurrentIndex(0);
+} 
+
+void MvQKeyListPage::slotSelectAllKeyGroup(int index)
+{
+	if(index >= 0 && index < allKey_.count() )
+	{
+		allKeyModel_->profileIsAboutToChange();
+		allKeyModel_->setKeyProfile(allKey_[index]);
+	}	
+}
+
+
+MvQKeyImportPage::MvQKeyImportPage(QString title,MvQKeyManager *manager,QWidget *parent) : QWidget(parent), manager_(manager)
+{
+	MvQKeyManager::KeyType type=MvQKeyManager::GribType;
+	
+	inManager_=new MvQKeyManager(type);
+	inManager_->loadProfiles();
+
+	QLabel *label;
+	
+	QVBoxLayout *layout=new QVBoxLayout;
+	setLayout(layout);
+
+	QHBoxLayout *hb = new QHBoxLayout;
+	layout->addLayout(hb);
+
+	label=new QLabel(tr("Profiles in GribExaminer:"));
+	hb->addWidget(label);
+
+	QHBoxLayout *hbMain = new QHBoxLayout;
+	layout->addLayout(hbMain);
+
+	profList_ = new QListWidget;
+	hbMain->addWidget(profList_);
+	
+	QVBoxLayout *vb = new QVBoxLayout;
+	hbMain->addLayout(vb);
+
+	QPushButton *importPb=new QPushButton(tr("&Import"));
+	importPb->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_import.svg"))));
+	importPb->setToolTip(tr("Import selected profiles"));
+ 
+	QPushButton *selectAllPb=new QPushButton(tr("&Select all"));
+	selectAllPb->setToolTip(tr("Select all profiles"));
+
+        QPushButton *unselectAllPb=new QPushButton(tr("&Unselect all"));
+	unselectAllPb->setToolTip(tr("Unselect all profiles"));
+
+	vb->addWidget(importPb);
+	vb->addWidget(selectAllPb);
+	vb->addWidget(unselectAllPb);
+	vb->addStretch(1);
+
+	connect(importPb,SIGNAL(clicked()),
+		this,SLOT(slotImport()));
+
+	connect(selectAllPb,SIGNAL(clicked()),
+		this,SLOT(slotSelectAll()));
+
+	connect(unselectAllPb,SIGNAL(clicked()),
+		this,SLOT(slotUnselectAll()));
+
+	init();
+}
+
+MvQKeyImportPage::~MvQKeyImportPage()
+{
+	delete inManager_;
+}
+
+void MvQKeyImportPage::init()
+{
+  	//QStringList items;
+   	for (vector<MvKeyProfile*>::const_iterator it=inManager_->data().begin(); it != inManager_->data().end(); it++) 
+	{
+		MvKeyProfile *prof = *it;
+		QListWidgetItem *item=new QListWidgetItem(profList_);
+		item->setText(QString(prof->name().c_str()));
+
+		if(prof->systemProfile())
+		{
+			item->setFlags(Qt::NoItemFlags);
+			item->setIcon(QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+		else
+		{
+			item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled |Qt::ItemIsUserCheckable);
+			item->setCheckState(Qt::Unchecked);
+		}		
+	}
+
+	if(profList_->count() >0)
+		profList_->setCurrentRow(0);
+}
+
+void MvQKeyImportPage::slotSelectAll()
+{
+	for(int i=0; i < profList_->count(); i++)
+	{
+		if(profList_->item(i)->flags() & Qt::ItemIsUserCheckable)
+			profList_->item(i)->setCheckState(Qt::Checked);
+	}
+}
+
+void MvQKeyImportPage::slotUnselectAll()
+{
+	for(int i=0; i < profList_->count(); i++)
+	{
+		if(profList_->item(i)->flags() & Qt::ItemIsUserCheckable)
+			profList_->item(i)->setCheckState(Qt::Unchecked);
+	}
+}
+
+void MvQKeyImportPage::slotImport()
+{
+	bool done=false;
+	for(int i=0; i < profList_->count(); i++)
+	{
+		if(profList_->item(i)->flags() & Qt::ItemIsUserCheckable &&
+		   profList_->item(i)->checkState() == Qt::Checked)
+		{
+			MvKeyProfile *prof=inManager_->data().at(i);
+			string name= prof->name();
+	
+			QString qsName(name.c_str());			
+			qsName=manager_->findUniqueProfileName(qsName);
+			
+			manager_->addProfile(qsName.toStdString(),prof,inManager_->keyType());
+			done = true;
+		}					
+	}
+
+	if(done)
+		emit dataChanged();
+}
+
+MvQKeyEditDialog::MvQKeyEditDialog(MvKey *key,QWidget *parent) : QDialog(parent), key_(key)
+{
+	QLabel *label;
+	
+	setWindowTitle(tr("Edit key"));
+
+	QVBoxLayout *layout=new QVBoxLayout;
+	setLayout(layout);
+
+	QGridLayout *grid = new QGridLayout;
+	layout->addLayout(grid);
+
+	int row=0;
+	
+	grid->addWidget(new QLabel(tr("Name:")),row,0);
+	nameLe_ = new QLineEdit(key->name().c_str());
+	if(!key->editable())
+	{
+		nameLe_->setReadOnly(true);
+		nameLe_->setToolTip(tr("Read only item!"));
+	}
+	grid->addWidget(nameLe_,row,1);
+	row++;
+
+	grid->addWidget(new QLabel(tr("Header:")),row,0);
+	shortLe_ = new QLineEdit(key->shortName().c_str());
+	grid->addWidget(shortLe_,row,1);
+	row++;
+	
+	grid->addWidget(new QLabel(tr("Description:")),row,0);
+	descLe_ = new QLineEdit(key->description().c_str());
+	if(!key->editable())
+	{
+		descLe_->setReadOnly(true);
+		descLe_->setToolTip(tr("Read only item!"));
+	}
+	grid->addWidget(descLe_,row,1);
+	row++;
+
+	//colourCb_=0;
+
+	for(map<string,string>::const_iterator it=key->metaData().begin(); it != key->metaData().end(); it++)
+	{
+		QWidget *w;
+
+		grid->addWidget(new QLabel(QString::fromStdString(it->first) + ":"),row,0);
+		/*if(it->first == "colour" && !colourCb_)
+		{
+			colourCb_ = new QComboBox;
+			colourCb_->setStandardColors();
+			colourCb_->setColorDialogEnabled(true);
+			colourCb_->setCurrentColor(QColor(QString::fromStdString(it->second)));
+			w=colourCb_;
+		}
+		else
+		{*/	
+			metaLe_[it->first] = new QLineEdit(QString::fromStdString(it->second));
+			if(!key->editable())
+			{
+				metaLe_[it->first]->setReadOnly(true);
+				metaLe_[it->first]->setToolTip(tr("Read only item!"));
+			}
+			w=metaLe_[it->first];		
+		//}
+
+		grid->addWidget(w,row,1);
+		row++;	 
+	}
+
+	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+                                      | QDialogButtonBox::Cancel);
+ 
+	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+     	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+	
+	layout->addWidget(buttonBox);
+}
+
+MvQKeyEditDialog::~MvQKeyEditDialog()
+{
+
+}
+
+void MvQKeyEditDialog::accept()
+{
+	key_->setName(nameLe_->text().toStdString());
+	key_->setShortName(shortLe_->text().toStdString());
+	key_->setDescription(descLe_->text().toStdString());
+	QMapIterator<string, QLineEdit*> it(metaLe_);
+	while (it.hasNext()) 
+	{
+     		it.next();
+     		key_->setMetaData(it.key(),it.value()->text().toStdString());
+	}	
+
+	/*if(colourCb_)
+	{
+		key_->setMetaData("colour",colourCb_->currentColor().name().toStdString());
+	}*/	
+
+	QDialog::accept();	
+}
+
+void MvQKeyEditDialog::reject()
+{
+	QDialog::reject();
+}
+
+
+//======================================
+//
+// MvQKeyDialog
+//
+//=======================================
+
+MvQKeyDialog::MvQKeyDialog(QString title,MvQKeyManager::KeyType type,
+	MvQKeyManager *manager,int  currentRow,QList<MvKeyProfile *> allKeys,
+	QWidget *parent) :  
+	MvQConfigDialog(title,parent), manager_(manager)
+{			
+	MvQKeyProfileDialog *profPage=new MvQKeyProfileDialog("Profiles",manager_,currentRow,this);
+	QIcon iconProf(QPixmap(QString::fromUtf8(":/keyDialog/profile.svg")));
+	addPage(profPage,iconProf,"Profiles");
+
+	MvQKeyListPage *keyPage=new MvQKeyListPage("Keys",manager_,allKeys,this);
+	QIcon iconKey(QPixmap(QString::fromUtf8(":/keyDialog/key.svg")));
+	addPage(keyPage,iconKey,"Keys");
+
+	connect(profPage,SIGNAL(currentProfileChanged(int)),
+		keyPage,SLOT(slotChangeCurrentProfile(int)));
+
+	connect(profPage,SIGNAL(dataChanged()),
+		keyPage,SLOT(slotProfilesChanged()));
+
+	keyPage->slotChangeCurrentProfile(currentRow);
+		
+	if(type == MvQKeyManager::FrameType)
+	{	
+		MvQKeyImportPage *importPage=new MvQKeyImportPage("Import from GribExaminer",manager_,this);
+		QIcon iconImport(QPixmap(QString::fromUtf8(":/keyDialog/profile_import.svg")));
+		addPage(importPage,iconImport,"Import");
+		
+		connect(importPage,SIGNAL(dataChanged()),
+			profPage,SLOT(slotUpdate()));
+	}
+
+	readSettings();
+}
+
+
+MvQKeyDialog::~MvQKeyDialog()
+{
+	//if(manager_)
+	//	delete manager_;
+	writeSettings();
+}
+
+void MvQKeyDialog::accept()
+{
+	//manager_->saveProfiles();
+
+	//hide();
+
+	//emit dataChanged(manager_);
+
+	//delete manager_;
+
+	QDialog::accept();	
+}
+
+void MvQKeyDialog::reject()
+{
+	//if(manager_)
+	//	delete manager_;
+
+	QDialog::reject();
+}
+
+void MvQKeyDialog::writeSettings()
+{
+	QSettings settings("ECMWF","MV4-MvQKeyDialog");
+	
+	settings.beginGroup("dialog");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("currentRow",list_->currentRow());
+	//settings.setValue("state",saveState());
+	settings.endGroup();
+}
+
+void MvQKeyDialog::readSettings()
+{
+	QSettings settings("ECMWF","MV4-MvQKeyDialog");
+	
+	settings.beginGroup("dialog");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	//restoreState(settings.value("state").toByteArray());
+
+	int ival;
+	if(settings.value("currentRow").isNull())
+	{
+	  	ival=1;
+	}	
+	else
+	{  
+		ival=settings.value("currentRow").toInt();
+	}
+	
+	list_->setCurrentRow(ival);
+
+	settings.endGroup();
+}
diff --git a/src/libMvQtGui/MvQKeyDialog.h b/src/libMvQtGui/MvQKeyDialog.h
new file mode 100644
index 0000000..8ffa8ed
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyDialog.h
@@ -0,0 +1,178 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyDialog_H
+#define MvQKeyDialog_H
+
+#include <QDialog>
+
+#include "MvQConfigDialog.h"
+#include "MvQKeyManager.h"
+
+class QComboBox;
+class QGridLayout;
+class QLabel;
+class QLineEdit;
+class QListWidget;
+class QModelIndex;
+class QPushButton;
+class QToolButton;
+class QTreeView;
+
+class MvQKeyModel;
+class MvQTreeView;
+
+class MvKey;
+class MvKeyProfile;
+
+class MvQKeyProfileDialog : public QWidget
+{
+Q_OBJECT
+
+public:
+	MvQKeyProfileDialog(QString title,MvQKeyManager*,int,QWidget *parent=0);
+	virtual ~MvQKeyProfileDialog() {};
+
+public slots:
+	void slotUpdate();
+	void slotSelectProfile(int);
+	void slotAddProfile();
+	void slotRenameProfile();
+	void slotDeleteProfile();
+	void slotDuplicateProfile();	
+
+signals:
+	void dataChanged();
+	void currentProfileChanged(int);
+
+protected:
+	void init(int);	
+
+	QListWidget*	profList_;
+	MvQKeyManager*	manager_;
+	QPushButton*    deletePb_;
+	QPushButton*    renamePb_;
+};
+
+class MvQKeyListPage : public QWidget
+{
+Q_OBJECT
+
+public:
+	MvQKeyListPage(QString title,MvQKeyManager *,QList<MvKeyProfile *>,QWidget *parent=0);
+	virtual ~MvQKeyListPage() {};
+	void init();
+	void setAllKeyList(QList<MvKeyProfile*>);
+
+public slots:
+	void slotProfilesChanged();
+	void slotChangeCurrentProfile(int);
+	void slotSelectProfile(int);
+	void slotAddKey();
+	void slotDeleteKey();
+	void slotMoveUpKey();
+	void slotMoveDownKey();
+	void slotEditKey();
+	void slotEditTree(const QModelIndex&);
+	void slotAddKeyToProf();
+	void slotSelectAllKeyGroup(int);
+
+protected:
+	void resizeKeyTreeColumns();
+	
+	QTreeView   *keyTree_;	
+	MvQKeyModel *keyModel_;	
+
+	MvQKeyManager  *manager_;
+
+	QWidget *allKeyWidget_;
+	QList<MvKeyProfile *> allKey_;
+	MvQKeyModel *allKeyModel_;
+	QTreeView *allKeyTree_;
+	QComboBox *allKeyCombo_; 
+
+	QComboBox *profCombo_; 
+
+	QToolButton*	addKeyTb_;
+	QToolButton*	deleteKeyTb_;
+	QToolButton*	moveUpKeyTb_;
+	QToolButton*	moveDownKeyTb_;
+	QToolButton*	addKeyToProfTb_;
+	QToolButton*	editKeyTb_;
+};
+
+class MvQKeyEditDialog : public QDialog
+{
+Q_OBJECT
+
+public:
+	MvQKeyEditDialog(MvKey *,QWidget *parent=0);
+	~MvQKeyEditDialog();
+	
+public slots:
+	void accept();
+	void reject();
+
+protected:
+	MvKey *key_;	
+	QLineEdit*	nameLe_;
+	QLineEdit*	shortLe_;
+	QLineEdit*	descLe_;
+	QMap<string,QLineEdit*> metaLe_;
+	//QComboBox*  colourCb_;
+};
+
+
+class MvQKeyImportPage : public QWidget
+{
+Q_OBJECT
+
+public:
+	MvQKeyImportPage(QString title,MvQKeyManager*,QWidget *parent=0);
+	virtual ~MvQKeyImportPage();
+
+public slots:
+	void slotSelectAll();
+	void slotUnselectAll();
+	void slotImport();
+
+signals:
+	void dataChanged();
+
+protected:
+	void init();	
+
+	QListWidget*	profList_;
+	MvQKeyManager*	manager_;
+	MvQKeyManager*	inManager_;
+};
+
+
+class MvQKeyDialog : public MvQConfigDialog
+{
+Q_OBJECT
+
+public:
+	MvQKeyDialog(QString title,MvQKeyManager::KeyType,
+                     MvQKeyManager *,int,QList<MvKeyProfile *>,QWidget *parent=0);
+	virtual ~MvQKeyDialog();
+
+public slots:
+	void accept();
+	void reject();
+
+protected:
+	void writeSettings();
+	void readSettings();
+
+	MvQKeyManager  *manager_;
+};
+
+
+#endif
diff --git a/src/libMvQtGui/MvQKeyFilterModel.cc b/src/libMvQtGui/MvQKeyFilterModel.cc
new file mode 100644
index 0000000..77b7c94
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyFilterModel.cc
@@ -0,0 +1,380 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QDebug>
+#include <QBrush>
+
+#include "MvQCheckBoxCombo.h"
+#include "MvQKeyFilterModel.h"
+#include "MvKeyProfile.h"
+
+
+MvQKeyFilterDelegate::MvQKeyFilterDelegate(QWidget *parent) : QStyledItemDelegate(parent)
+{
+
+}
+
+void MvQKeyFilterDelegate::paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const
+{
+	QStyledItemDelegate::paint(painter,option,index);
+}
+
+
+QWidget* MvQKeyFilterDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const
+{
+	if(index.column() == 2)
+	{	
+		MvQCheckBoxCombo *combo = new MvQCheckBoxCombo(parent);
+
+		//connect(combo,SIGNAL(toggled(bool)),this,SLOT(setFilter(bool)));
+		//connect(bAdvd_,SIGNAL(toggled(bool)), wt, SLOT(setVisible(bool)));
+		//connect(bAdvd_,SIGNAL(clicked(bool)), this, SLOT(slotAdvancedButton(bool)));
+
+		connect(combo,SIGNAL(editingFinished()),
+			this, SLOT(commmitAndCloseEditor()));
+
+		return combo;
+	}
+	else
+	{
+		return QStyledItemDelegate::createEditor(parent,option,index);
+	}
+}
+
+void MvQKeyFilterDelegate::setEditorData(QWidget *editor,const QModelIndex& index) const
+{
+	if(index.column() == 2)
+	{
+		MvQCheckBoxCombo *combo = static_cast<MvQCheckBoxCombo*>(editor);
+		
+		//Get current value from model		
+		QStringList values=index.data(Qt::UserRole).toStringList();		
+		QStringList filters=index.data(Qt::DisplayRole).toString().split("/",QString::SkipEmptyParts);
+
+		qDebug() << "filters: " << filters;
+		qDebug() << "values: " << values;
+
+		if(filters.contains(tr("Any")))
+		{
+			foreach(QString item,values)
+			{
+				combo->addItem(item,true);				
+			}
+		}
+		else
+		{
+			foreach(QString item,values)
+			{
+				if(filters.contains(item))
+				{
+					combo->addItem(item,true);
+				}
+				else
+				{
+					combo->addItem(item,false);
+				}	
+			}
+		}
+	}
+	else
+	{
+		QStyledItemDelegate::setEditorData(editor,index);
+	}
+}
+
+void MvQKeyFilterDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem &option, const QModelIndex &index )
+{
+    	editor->setGeometry( option.rect);
+}
+
+
+void MvQKeyFilterDelegate::commmitAndCloseEditor()
+{
+	MvQCheckBoxCombo *combo = static_cast<MvQCheckBoxCombo*>(sender());
+	emit commitData(combo);
+	emit closeEditor(combo);
+}
+
+void MvQKeyFilterDelegate::setModelData(QWidget *editor,QAbstractItemModel *model,
+		           const QModelIndex& index) const
+{
+	if(index.column() == 2)
+	{
+		MvQCheckBoxCombo *combo = static_cast<MvQCheckBoxCombo*>(editor);
+
+		//Get filters
+		QStringList filters = combo->getSelectedValues();
+		if ( filters.size() == combo->count() )
+		{
+			QString value("Any");
+			model->setData(index,value,Qt::DisplayRole);
+		
+		}
+		else
+		{
+			QString value;
+			for(unsigned int i = 0; i < filters.size(); i++)
+			{
+				value+=filters[i];
+				if(i != filters.size()-1)
+				{
+					value+="/";				
+				}
+			}
+			model->setData(index,value,Qt::DisplayRole);		
+		}
+
+
+
+
+	}
+	else
+	{
+		QStyledItemDelegate::setModelData(editor,model,index);
+	}
+}
+	
+
+
+
+MvQKeyFilterModel::MvQKeyFilterModel()
+{
+	profile_=0;
+}
+
+bool MvQKeyFilterModel::isDataSet() const
+{
+	return (profile_ == 0) ? false : true;		
+}
+
+void MvQKeyFilterModel::setKeyProfile(MvKeyProfile *prof)
+{
+	profile_=prof;
+
+	setupKeyFilter();
+
+	//Reset the model (views will be notified)
+	reset();
+}
+
+void MvQKeyFilterModel::setupKeyFilter()
+{
+	filter_.clear();
+
+	for(unsigned int i=0; i < profile_->size(); i++)
+	{
+		MvKey* key=profile_->at(i);
+		QString keyName(key->name().c_str());
+
+		for(map<string,int>::iterator it=key->counter().begin(); 
+                    it != key->counter().end(); it++)
+		{
+			filter_[keyName].push_back(QString(it->first.c_str()));
+		}	
+	}
+}
+
+
+
+int MvQKeyFilterModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	if(!isDataSet())
+		return 0;
+	
+	return 3;
+}
+
+int MvQKeyFilterModel::rowCount( const QModelIndex& parent) const
+{
+    	if(!isDataSet())
+		return 0;
+
+	//Non-root
+	if (!parent.isValid() )
+	{
+		return  profile_->size();
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+Qt::ItemFlags MvQKeyFilterModel::flags ( const QModelIndex & index) const
+{
+	if(index.column() != 2)
+		return Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable;
+	else 
+		return Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable |
+		   Qt::ItemIsEditable;
+}
+
+QVariant MvQKeyFilterModel::data( const QModelIndex& index, int role ) const
+{
+    	if ( !index.isValid())
+	{
+		return QVariant();
+	}
+	else if(role == Qt::UserRole && index.column() ==2)
+        {	
+		MvKey* key=profile_->at(index.row());
+		QString keyName(key->name().c_str());
+
+		QStringList str;
+		for(map<string,int>::iterator it=key->counter().begin(); 
+                    it != key->counter().end(); it++)
+		{
+			str.push_back(QString(it->first.c_str()));
+		}	
+		return str;
+	}	
+	else if(role != Qt::DisplayRole )
+        {	
+		return QVariant();
+	}
+   
+	return label(index.row(),index.column());
+}
+
+bool MvQKeyFilterModel::setData( const QModelIndex & index, const QVariant & value, int role) 
+{
+	if( !index.isValid())
+	{
+		return false;	
+	}
+	
+	if(role == Qt::DisplayRole && index.column() == 2)
+	{
+		QStringList str=value.toStringList();
+		QString keyName(profile_->at(index.row())->name().c_str());
+			
+		filter_[keyName]=str;
+
+		emit  dataChanged(index,index);
+		emit  filterUpdate(filter_);
+
+		return true;
+	}
+
+	return false;
+}
+
+
+QVariant MvQKeyFilterModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+    	if ( !isDataSet() || orient != Qt::Horizontal || 
+	    (role != Qt::DisplayRole && role != Qt::ToolTipRole) ||
+	     section < 0 || section >= profile_->size())
+	{
+        	return QAbstractItemModel::headerData( section, orient, role );
+	}
+
+ 	if(section < 0 || section >= profile_->size())
+	{
+		return QVariant();
+	}
+
+	if(role == Qt::DisplayRole )
+	{
+		switch(section)
+		{
+		case 0:
+			return QString("Key name\n (Examiner)")	;
+			break;
+		case 1:
+			return QString("Key name\n (GRIB API)");
+			break;
+		case 2:
+			return QString("Filter values");
+			break;
+		default:
+			return QVariant();
+			break;
+		}
+	}
+
+	return QVariant();
+}
+
+QString MvQKeyFilterModel::label(const int row, const int column ) const
+{
+	if(!isDataSet() || row < 0 || row >= profile_->valueNum(0) || column < 0 || column >= profile_->size())
+	{
+		return QString();
+	}
+	
+	switch(column)
+	{
+	case 0:
+		return QString(profile_->at(row)->shortName().c_str());
+		break;
+	case 1:
+		return QString(profile_->at(row)->name().c_str());
+		break;
+	case 2:
+		{QString keyName(profile_->at(row)->name().c_str());
+		QStringList items=filter_[keyName];
+
+		if(items.size() == profile_->at(row)->counter().size())
+		{
+			return QString(tr("Any"));
+		}
+		else
+		{
+			QString s;
+			for(unsigned int i = 0; i < items.size(); i++)
+			{
+				s+=items[i];
+				if(i != items.size()-1)
+				{
+					s+="/";				
+				}
+			}
+			return s;
+		}
+		}
+		break;
+	default:
+		return QString();
+		break;
+		}
+	
+	return QString();
+}
+
+
+QModelIndex MvQKeyFilterModel::index( int row, int column, const QModelIndex & parent ) const
+{
+   	if(!isDataSet()) 
+	{
+		return QModelIndex();
+	}
+
+	return createIndex(row,column,0);
+}
+
+
+QModelIndex MvQKeyFilterModel::parent( const QModelIndex & index ) const
+{
+    return QModelIndex();
+
+	/*QObject* obj = mapModelIndex2QObject(index);
+    QObject* parent = obj->parent();
+    if ( parent == 0 )
+        return QModelIndex();
+
+    QObject* grandParent = parent->parent();
+    int row = children( grandParent ).indexOf( parent );
+    return createIndex( row, 0, grandParent );*/
+}
diff --git a/src/libMvQtGui/MvQKeyFilterModel.h b/src/libMvQtGui/MvQKeyFilterModel.h
new file mode 100644
index 0000000..17d8967
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyFilterModel.h
@@ -0,0 +1,83 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyFilterModel_H
+#define MvQKeyFilterModel_H
+
+#include <QAbstractItemModel>
+#include <QStyledItemDelegate>
+#include <QStyleOptionViewItem>
+
+#include "MvQKeyProfileModel.h"
+
+class GribMetaData;
+class MvKeyProfile;
+
+
+class MvQKeyFilterDelegate : public QStyledItemDelegate
+{
+	Q_OBJECT
+
+public:
+
+	MvQKeyFilterDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	void setEditorData(QWidget *editor,const QModelIndex& index) const;
+	void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem &option, const QModelIndex &index );
+
+	void setModelData(QWidget *editor,QAbstractItemModel *model,const QModelIndex& index) const;
+
+private slots:
+	void commmitAndCloseEditor();
+
+};
+
+class MvQKeyFilterModel : public QAbstractItemModel
+{
+	Q_OBJECT
+
+public:
+   	MvQKeyFilterModel();
+ 
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+	Qt::ItemFlags flags ( const QModelIndex & index) const;
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	bool setData( const QModelIndex & index, const QVariant & value, int role);
+   	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+
+	MvKeyProfile* keyProfile() {return profile_;}
+	void setKeyProfile(MvKeyProfile*);
+
+	MvQKeyFilter keyFilter() {return filter_;}
+	void setKeyFilter(MvQKeyFilter);
+
+signals:
+	void filterUpdate(MvQKeyFilter&);
+
+protected:
+    	QString label( const int,const int) const;
+	void setupKeyFilter();
+	void loadKeyFilter();
+
+private:
+ 	bool isDataSet() const;
+	MvKeyProfile*  profile_;
+	MvQKeyFilter   filter_;
+};
+
+#endif 
+
diff --git a/src/libMvQtGui/MvQKeyMimeData.cc b/src/libMvQtGui/MvQKeyMimeData.cc
new file mode 100644
index 0000000..ebe666c
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyMimeData.cc
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQKeyMimeData.h"
+
+bool MvQKeyMimeData::hasFormat ( const QString & mimeType ) const
+{	
+	if(mimeType == "metview/mvkey")	
+		return true;
+	else
+		return QMimeData::hasFormat(mimeType);
+}
+
+QStringList MvQKeyMimeData::formats () const
+{
+	return QStringList("metview/mvkey");  //QMimeData::formats();
+}
+
+QVariant MvQKeyMimeData::retrieveData(const QString & mimeType,QVariant::Type type ) const
+{
+	return QVariant();
+}
diff --git a/src/libMvQtGui/MvQKeyMimeData.h b/src/libMvQtGui/MvQKeyMimeData.h
new file mode 100644
index 0000000..54e4c97
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyMimeData.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyMimeData_H
+#define MvQKeyMimeData_H
+
+#include <QMimeData>
+#include <QStringList>
+
+class MvKey;
+class QAbstractItemModel;
+
+class MvQKeyMimeData : public QMimeData
+{
+	Q_OBJECT
+
+public:
+	MvQKeyMimeData(const QAbstractItemModel* model) : model_(model) {};
+
+	bool hasFormat ( const QString & mimeType ) const;
+	QStringList	formats () const;
+
+	void addKey(MvKey* key,int row){ keys_[row]=key;}
+	const QMap<int,MvKey*>& keys() const {return keys_;}	
+	const QAbstractItemModel* model() const {return model_;}
+
+protected:
+	QVariant retrieveData ( const QString & mimeType, QVariant::Type type ) const;
+
+	const QAbstractItemModel* model_;
+	QMap<int,MvKey*> keys_;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQKeyModel.cc b/src/libMvQtGui/MvQKeyModel.cc
new file mode 100644
index 0000000..679d69f
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyModel.cc
@@ -0,0 +1,363 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QMimeData>
+
+#include "MvQKeyModel.h"
+
+#include "MvQKeyMimeData.h"
+#include "MvKeyProfile.h"
+
+
+MvQKeyModel::MvQKeyModel(DisplayMode mode) : mode_(mode)
+{
+	profile_=0;
+	editable_=false;
+}
+
+void MvQKeyModel::profileIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQKeyModel::setKeyProfile(MvKeyProfile  *profile)
+{
+	profile_=profile;
+	
+	endResetModel();
+}
+
+int MvQKeyModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+	switch(mode_)
+	{
+	case ProfileContentsMode:
+   		return 3;
+	case AllKeysMode:
+		return 2;
+	default:
+		return 0;
+	}
+}
+
+int MvQKeyModel::rowCount( const QModelIndex& index) const
+{
+    	if (!index.isValid() && profile_ !=0 )
+	{
+		return  profile_->size();
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+Qt::ItemFlags MvQKeyModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	if(mode_ == ProfileContentsMode)
+	{
+		if(index.column() == 0 || !editable_)
+		{	defaultFlags=Qt::ItemIsEnabled |
+		   	Qt::ItemIsSelectable;
+		}
+		else 
+		{
+			defaultFlags=Qt::ItemIsEnabled |
+		  	Qt::ItemIsSelectable |
+		   	Qt::ItemIsEditable;
+		}
+
+
+     		if (index.isValid())
+       			return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
+     		else
+        		return Qt::ItemIsDropEnabled | defaultFlags;
+
+	}
+	else if(mode_ == AllKeysMode)
+	{		
+		defaultFlags=Qt::ItemIsEnabled |
+		   	     Qt::ItemIsSelectable;		
+     		
+       		return Qt::ItemIsDragEnabled | defaultFlags;
+	}
+}
+
+QVariant MvQKeyModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid())
+        {			
+		return QVariant();
+	}
+
+	if(role == Qt::DisplayRole || role == Qt::ToolTipRole)
+	{
+ 		MvKey  *key=profile_->at(index.row());
+  		return label(key,index.row(),index.column() );
+	}
+
+	return  QVariant();
+}
+
+bool MvQKeyModel::setData( const QModelIndex & index, const QVariant & value, int role) 
+{
+	if(!editable_)
+		return false;
+
+	if( !index.isValid() || role != Qt::EditRole)
+		return false;	
+
+	if(mode_ != ProfileContentsMode)
+		return false;
+
+	if(index.column() == 1)
+	{	
+		MvKey  *key=profile_->at(index.row());
+		QString s=value.toString();
+		if(s.isEmpty() == false)
+		{
+			key->setName(s.toStdString());
+			emit  dataChanged(index,index);
+			return true;
+		}
+	}
+	else if(index.column() == 2)
+	{	
+		MvKey  *key=profile_->at(index.row());
+		QString s=value.toString();
+		if(s.isEmpty() == false)
+		{
+			key->setShortName(s.toStdString());
+			emit  dataChanged(index,index);
+			return true;
+		}
+	}	
+
+	return false;
+
+}
+QVariant MvQKeyModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+    	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+        	return QAbstractItemModel::headerData( section, orient, role );
+	
+	if(mode_ == ProfileContentsMode)
+	{
+    		switch ( section ) 
+		{
+    		case 0: return tr("Index");
+    		case 1: return tr("Key name");
+    		case 2: return tr("Header name");
+    		default: return QVariant();
+    		}
+	}
+	else if(mode_ == AllKeysMode)
+	{
+    		switch ( section ) 
+		{
+    		case 0: return tr("Key name");
+    		case 1: return tr("Description");
+    		default: return QVariant();
+    		}
+	}
+
+    	return QVariant();
+}
+
+QString MvQKeyModel::label(MvKey* key,const int row, const int column ) const
+{
+	if(mode_ == ProfileContentsMode)
+	{
+		switch ( column ) 
+		{
+    		case 0: return QString::number(row+1);
+		case 1: return QString::fromStdString(key->name());	
+    		case 2: return QString::fromStdString(key->shortName());
+		default: return QString();
+		}
+	}
+	else if(mode_ == AllKeysMode)
+	{
+		switch ( column ) 
+		{
+		case 0: return QString::fromStdString(key->name());	
+    		case 1: 
+		{
+			QString desc=QString::fromStdString(key->description());
+			QString sec=QString::fromStdString(key->metaData("section"));
+			QString s=desc;	
+			if(!sec.isEmpty())
+			{
+				QString centre=QString::fromStdString(key->metaData("centre"));
+				s+=" (Section: " + sec;
+				if(!centre.isEmpty())
+				{
+					s+=" Centre: " + centre;  
+				}
+				s+=")";
+			}
+			return s;
+		}
+		default: return QString();
+		}
+	}
+	
+	return QString();   	
+}
+
+QModelIndex MvQKeyModel::index( int row, int column, const QModelIndex & parent ) const
+{
+   return createIndex(row,column,0);
+}
+
+
+QModelIndex MvQKeyModel::parent( const QModelIndex & index ) const
+{
+    return QModelIndex();
+}
+
+
+void MvQKeyModel::moveUp(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return;
+
+	beginResetModel();
+	moveRow(index.row(),index.row()-1);
+	endResetModel();	
+}	
+
+void MvQKeyModel::moveDown(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return;
+
+	beginResetModel();
+	moveRow(index.row(),index.row()+1);
+	endResetModel();
+	
+}	
+
+void MvQKeyModel::moveRow(int sourceRow,int targetRow)
+{
+	if(sourceRow < 0 ||  sourceRow >= profile_->size() ||
+	   targetRow < 0 ||  targetRow >= profile_->size() ||
+           sourceRow == targetRow )
+	{
+		return;
+	}
+
+	profile_->reposition(sourceRow,targetRow);
+}
+
+
+Qt::DropActions MvQKeyModel::supportedDropActions() const
+{
+	/*if(!editable_)
+		return Qt::IgnoreAction;
+	else
+		return Qt::CopyAction;*/
+
+	return Qt::CopyAction;
+}
+
+QStringList MvQKeyModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvkey";
+    	return types;
+ }
+
+QMimeData* MvQKeyModel::mimeData(const QModelIndexList &indexes) const
+ {
+     	MvQKeyMimeData *mimeData = new MvQKeyMimeData(this);
+     	
+	QList<int> procRows;
+
+    	foreach (QModelIndex index, indexes) 
+	{
+	       	if (index.isValid() && 
+		    procRows.indexOf(index.row()) == -1) 
+		{
+			MvKey *key=profile_->at(index.row());
+			mimeData->addKey(key,index.row());
+			procRows << index.row();
+         	}
+     	}
+
+     	return mimeData;
+}
+
+bool MvQKeyModel::dropMimeData(const QMimeData *data,
+     Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+	//if(!editable_)
+	//	return false;
+
+	if(!profile_)
+		return false;
+
+	if (action == Qt::IgnoreAction)
+        	return true;
+
+     	if (!data->hasFormat("metview/mvkey"))
+        	return false;
+
+	const MvQKeyMimeData *keyData=qobject_cast<const MvQKeyMimeData*>(data);
+
+	if(!keyData || keyData->keys().isEmpty())
+		return false;
+
+	//Dnd from self --> move rows
+	if(keyData->model() == this)
+	{
+		qDebug() << "self";
+		int targetRow=row;
+     		if (row != -1)
+        		targetRow = row; 
+		else if (parent.isValid())
+        		targetRow = parent.row();
+		else
+         		targetRow = rowCount(QModelIndex())-1;
+			
+		beginResetModel();
+	
+		QMapIterator<int,MvKey*> it(keyData->keys());
+		while(it.hasNext()) 
+		{
+     			it.next();
+			int sourceRow=it.key();
+			moveRow(sourceRow,targetRow);	
+			break;
+		}
+
+		endResetModel();
+
+	}
+	//Dnd from another model --> insert new row
+	else	
+	{
+		qDebug() << "other";
+		beginResetModel();
+		QMapIterator<int,MvKey*> it(keyData->keys());
+		while(it.hasNext()) 
+		{
+     			it.next();
+			MvKey *key=it.value()->clone();	
+			profile_->addKey(key);
+		}
+		endResetModel();		
+	}
+
+     	return true;
+}
+
diff --git a/src/libMvQtGui/MvQKeyModel.h b/src/libMvQtGui/MvQKeyModel.h
new file mode 100644
index 0000000..f1cbb03
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyModel.h
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyModel_H
+#define MvQKeyModel_H
+
+#include <QAbstractItemModel>
+#include <QMimeData>
+#include <QStringList>
+
+class MvKeyProfile;
+class MvKey;
+
+class MvQKeyModel : public QAbstractItemModel
+{
+	Q_OBJECT
+
+public:
+	enum DisplayMode {ProfileContentsMode,AllKeysMode};
+
+   	MvQKeyModel(DisplayMode mode=ProfileContentsMode);
+
+   	virtual int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	virtual int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	virtual QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+   	virtual bool setData( const QModelIndex &, const QVariant &, int role = Qt::EditRole ); 
+	virtual QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+
+	void profileIsAboutToChange();
+	MvKeyProfile* profile() {return profile_;}
+	void setKeyProfile(MvKeyProfile*);
+	void moveUp(const QModelIndex& index);
+	void moveDown(const QModelIndex& index);
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+	void setEditable(bool b) {editable_=b;}
+	bool editable() {return editable_;}
+
+
+signals:
+
+protected:
+	virtual QString label(MvKey*,const int,const int) const;
+	void moveRow(int,int);
+
+	MvKeyProfile  *profile_;
+	DisplayMode mode_;
+	bool editable_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQKeyProfileModel.cc b/src/libMvQtGui/MvQKeyProfileModel.cc
new file mode 100644
index 0000000..43d6604
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyProfileModel.cc
@@ -0,0 +1,366 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QIcon>
+
+#include "MvQKeyProfileModel.h"
+
+#include "MvQKeyMimeData.h"
+#include "MvKeyProfile.h"
+
+bool MvQKeyProfileSortFilterModel::lessThan ( const QModelIndex &left, const QModelIndex &right) const
+{
+ 	QString leftData = sourceModel()->data(left).toString();
+     	QString rightData = sourceModel()->data(right).toString();
+
+	//Sort as int
+	if(QString::number(leftData.toInt()) == leftData)
+	{
+		return leftData.toInt() < rightData.toInt();
+	}
+	else if(QString::number(leftData.toFloat()) == leftData)
+	{
+		return leftData.toFloat() < rightData.toFloat();
+	}
+	else
+	{
+		return QString::localeAwareCompare(leftData, rightData) < 0;	
+	}
+}
+
+MvQKeyProfileModel::MvQKeyProfileModel()
+{
+	profile_=0;
+}
+
+bool MvQKeyProfileModel::isDataSet() const
+{
+	return (profile_ == 0) ? false : true;		
+}
+
+void MvQKeyProfileModel::keyProfileIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQKeyProfileModel::setKeyProfile(MvKeyProfile *prof)
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
+	//beginResetModel();
+#endif
+	profile_=prof;
+
+	messageFilterStatus_.clear();
+	if(profile_)
+	{
+		for(unsigned int i=0; i < profile_->valueNum(0); i++)
+		{
+			messageFilterStatus_.push_back(true);
+		}
+	}
+	
+	//loadKeyFilter();
+	//Reset the model (views will be notified)
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
+	endResetModel(); 
+#endif
+}
+
+void MvQKeyProfileModel::setKeyFilter(MvQKeyFilter filter)
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
+	beginResetModel();
+#endif
+	filter_=filter;
+
+	loadKeyFilter();
+
+	//Reset the model (views will be notified)
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
+	endResetModel(); 
+#endif
+}
+
+
+
+int MvQKeyProfileModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	if(!isDataSet())
+		return 0;
+	
+	return profile_->size();
+}
+
+int MvQKeyProfileModel::rowCount( const QModelIndex& index) const
+{
+    	if(!isDataSet())
+		return 0;
+
+	if (!index.isValid() )
+	{
+		return  profile_->valueNum(0);
+	}
+	else
+	{
+		return 0;
+	}
+}
+
+QVariant MvQKeyProfileModel::data( const QModelIndex& index, int role ) const
+{
+    	if ( !index.isValid())
+	{
+		return QVariant();
+	}
+	else if(role == Qt::UserRole )
+	{
+		if(messageFilterStatus_[index.row()] == true)
+			return QString("1");
+		else
+			return QString("0");	
+	
+	}
+	else if(role == Qt::TextAlignmentRole)
+	{
+		if(profile_->at(index.column())->name() == "MV_Value")
+			return Qt::AlignRight;
+
+		else
+			return QVariant();
+	}
+	else if(role != Qt::DisplayRole )
+        {	
+		return QVariant();
+	}
+   
+
+
+	return label(index.row(),index.column());
+}
+
+
+QVariant MvQKeyProfileModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+    	if ( !isDataSet() || orient != Qt::Horizontal || 
+	    (role != Qt::DisplayRole && role != Qt::ToolTipRole && role != Qt::DecorationRole) ||
+	     section < 0 || section >= profile_->size())
+	{
+        	return QAbstractItemModel::headerData( section, orient, role );
+	}
+
+ 	if(section < 0 || section >= profile_->size())
+	{
+		return QVariant();
+	}
+
+	if(role == Qt::DisplayRole )
+	{
+		if(profile_->at(section)->name() == "MV_Value")
+		{
+			
+		}
+		
+		return QString(profile_->at(section)->shortName().c_str());
+	}
+	else if(role == Qt::ToolTipRole)
+	{
+		QString desc(profile_->at(section)->description().c_str());
+			
+		if(profile_->at(section)->name() == "MV_Value")
+		{
+			string xv=profile_->at(section)->metaData("x_coord");
+			string yv=profile_->at(section)->metaData("y_coord");
+			
+			QString s("key: ");
+			s+=QString(profile_->at(section)->name().c_str()) + "\n";
+			s+=desc + "\n";
+			s+="x: " + QString::fromStdString(xv) + "\n" +
+			   "y: "  + QString::fromStdString(yv);
+			
+			return s;
+		}
+
+		if(profile_->at(section)->name().find("MV_") != string::npos)
+		{	
+			//QString str="MV key: "  + QString(profile_->at(section)->name().c_str()) +  "\n";
+			//str += desc;
+			return desc;
+		}
+
+		//GRIB
+		if(desc.isEmpty())
+		{
+			QString str("GRIB API key: \n");
+			str.append(profile_->at(section)->name().c_str());
+			return str;
+		}
+		
+		//BUFR
+		QString sec(profile_->at(section)->metaData("section").c_str());
+		if(!sec.isEmpty())
+		{
+			QString centre(profile_->at(section)->metaData("centre").c_str());
+			QString s=desc +  "\n(Section: " + sec;
+			if(!centre.isEmpty())
+			{
+				s+=" Centre: " + centre;  
+			}
+			s+=")";
+			return s;
+		}
+		else
+		{
+			return desc;
+		}
+	}
+	else if(role == Qt::DecorationRole)
+	{
+		QString str(profile_->at(section)->name().c_str());
+		if(filter_.contains(str))
+		{
+			return QIcon(QString::fromUtf8(":/examiner/keyFilter"));
+		}
+		else 
+			return QVariant();
+	}
+
+	return QVariant();
+}
+
+QString MvQKeyProfileModel::label(const int row, const int column ) const
+{
+	if(!isDataSet() || row < 0 || row >= profile_->valueNum(0) || column < 0 || column >= profile_->size())
+	{
+		return QString();
+	}
+	
+	//qDebug() << "label" << row << column ;
+
+	//qDebug() << "   " << QString::fromStdString(profile_->at(column)->value().at(row));
+
+	//string id=profile_->at(column)->name();
+	//return QString(grib_->message().at(row)->getKeyData(id).c_str());
+
+
+	return QString(profile_->at(column)->value().at(row).c_str());
+}
+
+QModelIndex MvQKeyProfileModel::index( int row, int column, const QModelIndex & parent ) const
+{
+   	if(!isDataSet()) 
+	{
+		return QModelIndex();
+	}
+
+	return createIndex(row,column,0);
+}
+
+
+QModelIndex MvQKeyProfileModel::parent( const QModelIndex & index ) const
+{
+    return QModelIndex();
+}
+
+void MvQKeyProfileModel::loadKeyFilter()
+{
+	int num=profile_->valueNum(0);
+
+	messageFilterStatus_.clear();
+
+	for(unsigned int i=0; i <num; i++)
+	{
+		messageFilterStatus_.push_back(true);
+
+		QMapIterator<QString, QStringList> it(filter_);
+ 		while (it.hasNext()) 
+		{
+     			it.next();
+			MvKey *key=profile_->key(it.key().toStdString());
+			if(key)
+			{
+				if(it.value().contains(QString(key->value().at(i).c_str())) == false)
+				{
+					messageFilterStatus_[i]=false;
+					break;
+				}
+			}
+		}
+	}
+ }
+
+Qt::ItemFlags MvQKeyProfileModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable;
+
+	return Qt::ItemIsDropEnabled | defaultFlags;
+}
+
+Qt::DropActions MvQKeyProfileModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQKeyProfileModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvkey";
+    	return types;
+ }
+
+QMimeData* MvQKeyProfileModel::mimeData(const QModelIndexList &indexes) const
+{
+	return QAbstractItemModel::mimeData(indexes);
+}
+
+bool MvQKeyProfileModel::dropMimeData(const QMimeData *data,
+     Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+	if(!profile_)
+		return false;
+
+	if (action == Qt::IgnoreAction)
+        	return true;
+
+     	if (!data->hasFormat("metview/mvkey"))
+        	return false;
+
+	const MvQKeyMimeData *keyData=qobject_cast<const MvQKeyMimeData*>(data);
+
+	if(!keyData || keyData->keys().isEmpty())
+		return false;
+
+	//Dnd from a key model --> insert new column
+	if(keyData->model() != this)
+	{
+		//qDebug() << "other";	
+		beginResetModel();
+		QMapIterator<int,MvKey*> it(keyData->keys());
+		while(it.hasNext()) 
+		{
+     			it.next();
+			MvKey *key=it.value()->clone();	
+			profile_->addKey(key);
+			if(parent.isValid() && parent.column() >= 0 && parent.column() < profile_->size()-1)
+			{
+			  	profile_->reposition(profile_->size()-1,parent.column()+1);				
+			}	
+		}
+
+		emit keyInserted();
+
+		endResetModel();		
+	}
+
+     	return true;
+}
+
diff --git a/src/libMvQtGui/MvQKeyProfileModel.h b/src/libMvQtGui/MvQKeyProfileModel.h
new file mode 100644
index 0000000..a75369b
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyProfileModel.h
@@ -0,0 +1,82 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyProfileModel_H
+#define MvQKeyProfileModel_H
+
+#include <QAbstractItemModel>
+#include <QList>
+#include <QPair>
+#include <QSortFilterProxyModel>
+#include <QStringList>
+
+class GribMetaData;
+class MvKeyProfile;
+
+//typedef QPair<QString,QStringList>  MvQKeyFilterItem;
+//typedef QList<MvQKeyFilterItem> MvQKeyFilter;
+
+typedef QMap<QString,QStringList> MvQKeyFilter;
+
+class MvQKeyProfileSortFilterModel : public QSortFilterProxyModel
+{
+public:
+	MvQKeyProfileSortFilterModel(QObject *parent=0) : QSortFilterProxyModel(parent) {};
+
+protected:
+	bool lessThan ( const QModelIndex &, const QModelIndex &) const;
+};
+
+class MvQKeyProfileModel : public QAbstractItemModel
+{
+	Q_OBJECT
+
+public:
+   	MvQKeyProfileModel();
+ 
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	virtual QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+   	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+
+	void keyProfileIsAboutToChange();
+
+	MvKeyProfile* keyProfile() {return profile_;}
+	void setKeyProfile(MvKeyProfile*);
+
+	MvQKeyFilter keyFilter() {return filter_;}
+	void setKeyFilter(MvQKeyFilter);
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+signals:
+	void keyInserted();
+
+protected:
+    	QString label( const int,const int) const;
+	void loadKeyFilter();
+
+ 	bool isDataSet() const;
+	MvKeyProfile*  profile_;
+	MvQKeyFilter   filter_;
+	QList<bool>    messageFilterStatus_;
+};
+
+#endif 
+
diff --git a/src/libMvQtGui/MvQKeyProfileTree.cc b/src/libMvQtGui/MvQKeyProfileTree.cc
new file mode 100644
index 0000000..5807aa4
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyProfileTree.cc
@@ -0,0 +1,328 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QDebug>
+#include <QHeaderView>
+#include <QInputDialog>
+#include <QMenu>
+#include <QMessageBox>
+
+#include "MvQKeyDialog.h"
+#include "MvQKeyProfileTree.h"
+ 
+#include "MvKeyProfile.h"
+
+#include "MvQKeyProfileModel.h"
+
+MvQKeyProfileTree::MvQKeyProfileTree(MvQKeyProfileModel *messageModel,
+				     MvQKeyProfileSortFilterModel *filterModel)
+{
+	messageModel_=messageModel;
+	messageSortModel_=filterModel;
+	
+	//Message model
+	/*messageModel_= new MvQKeyProfileModel;
+	messageSortModel_= new MvQKeyProfileSortFilterModel;
+        messageSortModel_->setSourceModel(messageModel_);
+	messageSortModel_->setDynamicSortFilter(true);
+	messageSortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	messageSortModel_->setFilterFixedString("1");
+	messageSortModel_->setFilterKeyColumn(0);*/
+
+	predefinedKeysOnly_=false;
+	
+	//Tree
+	editable_=true;
+	setObjectName("messageTree");
+	setProperty("mvStyle",0);
+	setSortingEnabled(true); 
+	sortByColumn (0,Qt::AscendingOrder); 
+	setAlternatingRowColors(true);
+        setAllColumnsShowFocus(true);
+	setModel(messageSortModel_);	
+	//messageTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	setActvatedByKeyNavigation(true);
+	setAcceptDrops(true);
+	setDragDropMode(QAbstractItemView::DropOnly);
+	setRootIsDecorated(false);
+
+	//Set header ContextMenuPolicy
+	header()->setContextMenuPolicy(Qt::CustomContextMenu);
+
+	connect(header(),SIGNAL(customContextMenuRequested(const QPoint &)),
+                this, SLOT(slotMessageTreeContextMenu(const QPoint &)));
+
+	connect(header(),SIGNAL(sectionMoved(int,int,int)),
+                this, SLOT(slotMessageTreeColumnMoved(int,int,int)));
+}
+
+void MvQKeyProfileTree::setEditable(bool b)
+{
+	editable_=b;
+
+	if(editable_)
+	{	
+		setAcceptDrops(true);
+		setDragDropMode(QAbstractItemView::DropOnly);
+		header()->setMovable(true);
+	}	
+	else
+	{
+		setAcceptDrops(false);
+		setDragDropMode(QAbstractItemView::NoDragDrop);
+		header()->setMovable(false);	
+	}
+}
+
+void MvQKeyProfileTree::slotMessageTreeContextMenu(const QPoint &position)
+{
+	if(!editable_)
+		return;
+
+	int section=header()->logicalIndexAt(position); 
+	
+	if(section< 0 || section >= header()->count())
+		return;
+
+       	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(prof==0 || section >= static_cast<int>(prof->size()))
+		return;
+
+	bool keyEditable=prof->at(section)->editable();
+		
+	QList<QAction*> actions;
+
+	//Inser new key
+	QAction *actionInsert = new QAction(this);
+        actionInsert->setObjectName(QString::fromUtf8("actionInsert"));
+	actionInsert->setText(tr("Insert key"));
+        //actionDelete->setShortcut(tr("Ctrl+D"));
+	actions.append(actionInsert);
+	
+	//Check if users can define keys
+	if(predefinedKeysOnly_)
+	{	
+		actionInsert->setEnabled(false);
+	}
+	
+	//Edit
+	
+#ifdef METVIEW_EXPERIMENTAL
+	QAction *actionEdit;
+	if(keyEditable)
+	{
+	  	actionEdit = new QAction(this);
+       		actionEdit->setObjectName(QString::fromUtf8("actionEdit"));
+		actionEdit->setText(tr("Edit key"));
+        	//actionRename->setShortcut(tr("Ctrl+L"));	
+		actions.append(actionEdit);
+	}	
+#endif
+
+	QAction *actionDelete = new QAction(this);
+        actionDelete->setObjectName(QString::fromUtf8("actionDelete"));
+	actionDelete->setText(tr("Delete key"));
+        //actionDelete->setShortcut(tr("Ctrl+D"));
+	actions.append(actionDelete);
+
+	//Rename
+	QAction *actionRename = new QAction(this);
+        actionRename->setObjectName(QString::fromUtf8("actionRename"));
+	actionRename->setText(tr("Rename header"));
+        //actionRename->setShortcut(tr("Ctrl+L"));
+	actions.append(actionRename);
+	
+    	if(actions.count() > 0)
+	{
+        	QAction *action=QMenu::exec(actions, header()->mapToGlobal(position));
+
+		if(action == actionInsert)
+		{			
+         		insertMessageTreeColumn(section);				
+		}
+		else if(action == actionRename)
+		{			
+         		renameMessageTreeHeader(section);				
+		}
+		else if(action == actionDelete)
+		{
+			deleteMessageTreeColumn(section);
+		}
+#ifdef METVIEW_EXPERIMENTAL
+		else if(keyEditable && 
+		        action == actionEdit)
+		{			
+         		editMessageTreeHeader(section);				
+		}
+#endif
+	}
+	
+	foreach(QAction *action,actions)
+	{
+		delete action;
+	}
+}
+
+
+void MvQKeyProfileTree::insertMessageTreeColumn(int column)
+{
+	MvKey *key = new MvKey;	
+	MvQKeyEditDialog keyDialog(key);
+
+	if(keyDialog.exec()  == QDialog::Accepted)
+	{  
+		//Get the current profile from the model.
+		messageModel_->keyProfileIsAboutToChange();
+		MvKeyProfile* prof = messageModel_->keyProfile();
+		
+		if(column >=0 && column < static_cast<int>(prof->size()))
+		{		
+			prof->addKey(key);
+			prof->reposition(prof->size()-1,column+1);		
+			messageModel_->setKeyProfile(prof);
+			emit profileChanged(true);
+
+		}
+	}	
+}
+
+void MvQKeyProfileTree::editMessageTreeHeader(int column)
+{
+	if(!editable_)
+		return;
+
+	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(prof==0 || column < 0 || column >= static_cast<int>(prof->size()))
+		return;
+	
+	string name=prof->at(column)->name();
+
+	MvQKeyEditDialog edit(prof->at(column));
+	if(edit.exec()  == QDialog::Accepted)
+	{
+		//If the key name was not changed
+		if(name == prof->at(column)->name())
+		{
+			messageModel_->keyProfileIsAboutToChange();
+			//prof->at(column)->setShortName(text.toStdString());
+			messageModel_->setKeyProfile(prof);
+
+			emit profileChanged();
+		}
+		else
+		{
+			emit profileChanged(true);
+		}
+	}
+
+}	
+
+void MvQKeyProfileTree::renameMessageTreeHeader(int column)
+{
+	if(!editable_)
+		return;
+
+	MvKeyProfile* prof = messageModel_->keyProfile();
+		if(column < 0 || column >= static_cast<int>(prof->size()))
+			return;
+		
+	bool ok;
+     	QString text = QInputDialog::getText(0, 
+				tr("Rename header"),
+                        	tr("New name:"), QLineEdit::Normal,
+                                prof->at(column)->shortName().c_str(), &ok);
+				
+	if (ok && !text.isEmpty())
+        { 			
+		messageModel_->keyProfileIsAboutToChange();
+		prof->at(column)->setShortName(text.toStdString());
+		messageModel_->setKeyProfile(prof);
+		emit profileChanged();
+	}
+}	
+
+void MvQKeyProfileTree::deleteMessageTreeColumn(int column)
+{	
+	if(!editable_)
+		return;
+
+	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(column < 0 || column >= static_cast<int>(prof->size()))
+		return;
+
+	QMessageBox msgBox;
+
+	QString str=tr("Are you sure that you want to delete key <b>");
+	str+=QString::fromStdString(prof->at(column)->name()) ;
+	str+="</b>?";
+
+ 	msgBox.setText(str);
+ 	msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
+	msgBox.setDefaultButton(QMessageBox::Cancel);
+	msgBox.setWindowTitle(tr("Delete key"));
+	
+	int ret=msgBox.exec();
+
+	switch (ret) 
+	{
+   	case QMessageBox::Yes:
+       	{	
+		messageModel_->keyProfileIsAboutToChange();
+		prof->deleteKey(column);
+		messageModel_->setKeyProfile(prof);
+		emit profileChanged();
+	}
+      	break;
+   	case QMessageBox::Cancel:
+       	// Cancel was clicked
+       	break;
+   	default:
+       	// should never be reached
+      	 break;
+	}
+}	
+
+void  MvQKeyProfileTree::slotMessageTreeColumnMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex)
+{
+	if(logicalIndex != oldVisualIndex)
+	{
+		qDebug() << "MvQGribExaminerBase::slotMessageTreeColumnMoved> problem with column indices!"; 
+	}
+
+	MvKeyProfile* prof = messageModel_->keyProfile();
+	if(oldVisualIndex >=0 && oldVisualIndex < static_cast<int>(prof->size()) &&
+	   newVisualIndex >=0 && newVisualIndex < static_cast<int>(prof->size()) &&
+	   oldVisualIndex != newVisualIndex)
+	{
+		//for(int i=0; i < messageTree_->header()->count(); i++)
+		//	qDebug() << "header: (" << i << ") " << messageTree_->header()->logicalIndex(i);
+
+		prof->reposition(oldVisualIndex,newVisualIndex);
+
+		//We need it because 
+		//	- QHeaderView::reset() does not initialize the 
+		//         the logicalindeces
+		//      - But if the column count is changes the 
+		//         logicalIndeces are reinitialized
+		messageModel_->keyProfileIsAboutToChange();
+		messageModel_->setKeyProfile(0); 
+
+		messageModel_->keyProfileIsAboutToChange();
+		messageModel_->setKeyProfile(prof);
+
+		for(int i=0;i < messageModel_->columnCount()-1; i++)
+		{ 
+			resizeColumnToContents(i);
+		}
+
+		emit profileChanged();
+	}
+}
diff --git a/src/libMvQtGui/MvQKeyProfileTree.h b/src/libMvQtGui/MvQKeyProfileTree.h
new file mode 100644
index 0000000..c0640df
--- /dev/null
+++ b/src/libMvQtGui/MvQKeyProfileTree.h
@@ -0,0 +1,54 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyProfileTree_H
+#define MvQKeyProfileTree_H
+
+class MvKeyProfile;
+
+class MvQKeyManager;
+class MvQKeyProfileModel;
+class MvQKeyProfileSortFilterModel;
+
+#include "MvQTreeView.h"
+
+class MvQKeyProfileTree : public MvQTreeView
+{
+    Q_OBJECT
+
+public:
+    	MvQKeyProfileTree(MvQKeyProfileModel*,MvQKeyProfileSortFilterModel*);
+    	~MvQKeyProfileTree() {};
+	void setEditable(bool);
+	bool editable() {return editable_;}  
+	void setPredefinedKeysOnly(bool b) {predefinedKeysOnly_=b;}
+
+
+public slots:
+	void slotMessageTreeContextMenu(const QPoint &);
+	void slotMessageTreeColumnMoved(int,int,int);
+
+signals:
+	void profileChanged(bool reaload=false);
+
+protected:
+	void insertMessageTreeColumn(int);
+	void renameMessageTreeHeader(int);
+	void deleteMessageTreeColumn(int);
+	void editMessageTreeHeader(int);
+	MvQKeyProfileModel* messageModel_;
+	MvQKeyProfileSortFilterModel* messageSortModel_;
+
+	bool editable_;
+	bool predefinedKeysOnly_;
+
+	//MvQKeyManager *keyManager_;	
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQLogBrowser.cc b/src/libMvQtGui/MvQLogBrowser.cc
new file mode 100644
index 0000000..dffd586
--- /dev/null
+++ b/src/libMvQtGui/MvQLogBrowser.cc
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QLayout>
+#include <QTextBrowser>
+
+#include "LogHandler.h"
+#include "MvQLogBrowser.h"
+
+
+MvQLogBrowser::MvQLogBrowser(QLayout* layout)
+{
+	browser_=new QTextBrowser;
+	layout->addWidget(browser_);
+
+	oriBgColour_=new QColor(browser_->palette().color(QPalette::Base));
+	errorBgColour_= new QColor(255,79,102);
+
+}
+
+MvQLogBrowser::~MvQLogBrowser()
+{
+
+}
+
+void MvQLogBrowser::clear() 
+{
+	browser_->clear();
+}
+
+void MvQLogBrowser::update()
+{
+	for(vector<LogItem*>::const_iterator it = LogHandler::instance()->item().begin(); 
+	     it != LogHandler::instance()->item().end(); it++)
+	{
+		LogItem *log=*it;
+
+		/*if(log->errorStatus()) 
+		{
+			setBgColour(errorBgColour_);
+		}
+		else
+		{
+			setBgColour(oriBgColour_);
+		}*/
+
+		string buf;
+
+		buf="<br><b>Task: </b>" + log->description() + "<br>";
+		browser_->moveCursor(QTextCursor::End);
+		browser_->insertHtml(QString(buf.c_str()));
+
+		if(log->command().size() > 0)
+		{
+	           	buf="<b>Command: </b>" + log->command() + "<br>";
+			browser_->moveCursor(QTextCursor::End);
+			browser_->insertHtml(QString(buf.c_str()));
+		}
+		if(log->method().size() > 0)
+		{
+	           	buf="<b>Method: </b>" + log->method() + "<br>";
+			browser_->moveCursor(QTextCursor::End);
+			browser_->insertHtml(QString(buf.c_str()));
+		}
+		if(log->request().size() > 0)
+		{
+	           	buf="<b>Request: </b>" + log->request() + "<br>";
+			browser_->moveCursor(QTextCursor::End);
+			browser_->insertHtml(QString(buf.c_str()));
+		}
+		if(log->status().size() >0)
+		{			 
+			buf="<b>Status: </b>" + log->status() + "<br>";
+			browser_->moveCursor(QTextCursor::End);
+			browser_->insertHtml(QString(buf.c_str()));
+		}
+		else
+		{
+			if(log->errorStatus()) 
+			{
+				//buf="<b>Status: </b><font color=black style=\"BACKGROUND-COLOR: #FF6666\">Error/warning</font><br><b>Message: </b><br>";
+				buf="<b>Status: </b><font color=red>Error/warning</font><br><b>Message: </b><br>";
+				browser_->moveCursor(QTextCursor::End);
+				browser_->insertHtml(QString(buf.c_str()));
+
+				buf=log->log();
+				browser_->moveCursor(QTextCursor::End);
+				browser_->insertPlainText(QString(buf.c_str()) + "\n");
+			}
+			else
+			{
+				buf="<b>Status: </b><font color=green>OK</font><br>";
+				browser_->moveCursor(QTextCursor::End);
+				browser_->insertHtml(QString(buf.c_str()));
+			}
+		}
+
+		//buf="<br>";
+		browser_->moveCursor(QTextCursor::End);
+		//logBrowser_->insertHtml(QString(buf.c_str()));
+	}
+
+	LogHandler::instance()->clear();
+}
+
+void MvQLogBrowser::setBgColour(QColor *col)
+{
+	QPalette palette = browser_->palette();
+	if(palette.color(QPalette::Base) != *col)
+	{
+		palette.setColor(QPalette::Base,*col);
+		browser_->setPalette(palette);
+	}
+}
diff --git a/src/libMvQtGui/MvQLogBrowser.h b/src/libMvQtGui/MvQLogBrowser.h
new file mode 100644
index 0000000..f4ef511
--- /dev/null
+++ b/src/libMvQtGui/MvQLogBrowser.h
@@ -0,0 +1,33 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLogBrowser_H
+#define MvQLogBrowser_H
+
+class QColor;
+class QLayout;
+class QTextBrowser;
+
+class MvQLogBrowser 
+{
+public:
+	MvQLogBrowser(QLayout*);
+	~MvQLogBrowser();
+	void update();
+	void clear();
+
+private:
+	void setBgColour(QColor *);
+
+	QTextBrowser*  browser_;
+	QColor* oriBgColour_;
+	QColor* errorBgColour_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQMacroSelector.cc b/src/libMvQtGui/MvQMacroSelector.cc
new file mode 100644
index 0000000..29a1c0f
--- /dev/null
+++ b/src/libMvQtGui/MvQMacroSelector.cc
@@ -0,0 +1,193 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQMacroSelector.h"
+
+#include <QAction>
+#include <QApplication>
+#include <QComboBox>
+#include <QDebug>
+#include <QDirModel>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QListView>
+#include <QMenu>
+#include <QPushButton>
+#include <QSplitter>
+#include <QStandardItemModel>
+#include <QStringList>
+#include <QTextBrowser>
+#include <QTextStream>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvQFileBrowserBase.h"
+
+MvQMacroSelector::MvQMacroSelector(QWidget *parent,QString rootDir)
+{
+	//lastDirPos_=0;
+	//lastDirList_.append(rootDir);
+
+	rootDir_=rootDir;
+
+	base_= new MvQFileBrowserBase;
+
+	//-----------------------------
+	// Layout 
+	//-----------------------------
+	
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+	
+
+	//-----------------------------
+	// Top part 
+	//-----------------------------
+
+	QHBoxLayout *tbLayout = new QHBoxLayout;
+	mainLayout->addLayout(tbLayout);
+		
+	QIcon icon;
+
+	QLabel *locationLabel = new QLabel("Location:");
+	tbLayout->addWidget(locationLabel);
+		
+
+	tbLayout->addWidget(base_->locationCombo());
+
+	//Back
+	QToolButton *tbBack = new QToolButton;
+	tbBack->setDefaultAction(base_->actionBack());
+	tbLayout->addWidget(tbBack);
+	
+	//Forward
+	QToolButton *tbForward = new QToolButton;
+	tbForward->setDefaultAction(base_->actionForward());
+	tbLayout->addWidget(tbForward);
+
+	//Forward
+	QToolButton *tbParent = new QToolButton;
+	tbParent->setDefaultAction(base_->actionParent());
+	tbLayout->addWidget(tbParent);
+
+
+	/*connect(tbBack,SIGNAL(clicked()),
+	this,SLOT(slotChDirBack()));
+
+	//Forward
+	QToolButton *tbForward = new QToolButton;
+	tbForward->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowRight)); 
+	tbForward->setToolTip(tr("Forward"));
+	tbForward->setText(tr("Forward"));
+        tbForward->setShortcut(tr("Alt+Right"));
+
+	tbLayout->addWidget(tbForward);
+	
+	connect(tbBack,SIGNAL(clicked()),
+	this,SLOT(slotChDirForward()));
+
+	//Parent
+	QToolButton *tbParent = new QToolButton;
+	tbParent->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowUp)); 
+        tbParent->setToolTip(tr("Parent"));
+	tbParent->setText(tr("Parent"));
+        tbParent->setShortcut(tr("Alt+Up"));
+
+	tbLayout->addWidget(tbParent);
+	
+	connect(tbParent,SIGNAL(clicked()),
+	this,SLOT(slotChDirParent()));*/
+
+	//------------------------------
+	// Central part
+	//------------------------------
+
+	/*mainSplitter_ = new QSplitter;
+	mainSplitter_->setOrientation(Qt::Vertical);	
+	mainLayout->addWidget(mainSplitter_);*/
+	
+	// Dir tree (on the right)
+		
+	dirSplitter_ = new QSplitter;
+	mainLayout->addWidget(dirSplitter_);
+
+	//Add it to the layout
+	dirSplitter_->addWidget(base_->dirTree());
+	dirSplitter_->addWidget(base_->itemList());
+
+	//
+	/*QWidget *infoWidget = new QWidget;
+	QHBoxLayout *infoLayout = new QHBoxLayout;
+	infoWidget->setLayout(infoLayout);*/
+
+	//Macro description 
+	//macroInfo_ = new QTextBrowser;
+	//infoLayout->addWidget(macroInfo_);
+
+	//QPushButton *loadPb = new QPushButton("Load");
+	//infoLayout->addWidget(loadPb);
+
+	//connect(loadPb,SIGNAL(clicked()),
+	//	this,SLOT(slotLoadMacro()));
+
+	//mainSplitter_->addWidget(infoWidget);	
+
+	parent->setLayout(mainLayout);
+
+	connect(base_,SIGNAL(itemExecuted(QString)),
+		this,SLOT(slotLoadMacro(QString)));
+}
+
+MvQMacroSelector::~MvQMacroSelector()
+{
+	//delete macroInfo_;
+}
+
+QString MvQMacroSelector::currentDir()
+{
+	return base_->currentDir();	
+}
+
+void MvQMacroSelector::setCurrentDir(QString path)
+{
+	base_->setCurrentDir(path);	
+}
+
+
+void MvQMacroSelector::slotLoadMacro(QString file)
+{
+	currentMacro_=file;
+
+	//QFileInfo info(file);
+	//QString txt=MvQDirModel::getMacroHeader(info);
+
+	emit macroLoaded(currentMacro_);
+
+	//emit macroSelected(info);
+
+	/*
+	QString str("<b>Path: </b>");
+	str+=info.absolutePath();
+	str+="<br>";
+	str+="<b>Name: </b> ";
+	str+=info.fileName();	
+	str+="<br>";
+	str+="<b>Description: </b>";
+	str+=txt;
+
+	macroInfo_->setHtml(str);*/
+	
+	//emit macroSelected(info);
+}
+
+/*void MvQMacroSelector::slotLoadMacro()
+{
+	emit macroLoaded(currentMacro_);
+
+}*/
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQMacroSelector.h b/src/libMvQtGui/MvQMacroSelector.h
new file mode 100644
index 0000000..0fc1cc1
--- /dev/null
+++ b/src/libMvQtGui/MvQMacroSelector.h
@@ -0,0 +1,86 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMacroSelector_H
+#define MvQMacroSelector_H
+ 
+#include <QDirModel>
+#include <QFileIconProvider>
+#include <QFileInfo>
+#include <QModelIndex>
+#include <QList>
+#include <QString>
+
+class MvQFileBrowserBase;
+
+class QComboBox;
+class QLabel;
+class QListView;
+class QSplitter;
+class QTextBrowser;
+class QTreeView;
+
+using namespace std;
+
+class MvQMacroSelector : public QObject
+{
+    Q_OBJECT
+
+public:
+	MvQMacroSelector(QWidget*,QString);
+	~MvQMacroSelector();
+
+	//QTreeView*      macroDirTree() {return macroDirTree_;}
+	//QListView*      macroTree() {return macroTree_;}
+	//QTextBrowser*   macroInfo() {return macroInfo_;}
+	
+	QString 	currentDir();
+	void            setCurrentDir(QString);
+
+	//QSplitter*      mainSplitter() {return mainSplitter_;}
+
+	//QSplitter* 	mainSplitter() {return mainSplitter_;}
+	QSplitter*      dirSplitter() {return dirSplitter_;} 
+
+
+public slots:
+	//void slotSelectMacroDir(const QModelIndex&);
+	//void slotMacroContextMenu(const QPoint&);
+	//void slotSelectMacro(const QModelIndex&);
+	//void slotChDirBack();
+	//void slotChDirForward();
+	//void slotChDirParent();
+	//void slotSelectMacro(QString);
+	void slotLoadMacro(QString);
+
+signals:
+	void macroLoaded(QString);
+
+private:
+	
+	QString        rootDir_;
+	QString        currentMacro_;
+	/*MvQDirModel*   macroDirModel_;
+	QTreeView*     macroDirTree_;
+	MvQDirModel*   macroModel_;
+	QListView*     macroTree_;*/
+
+	//QTextBrowser*  macroInfo_;
+
+	//QComboBox*     locationCombo_;
+
+	//QSplitter*     mainSplitter_;
+	QSplitter*     dirSplitter_; 
+	
+	
+	MvQFileBrowserBase*	base_;
+	
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQMainWindow.cc b/src/libMvQtGui/MvQMainWindow.cc
new file mode 100644
index 0000000..e2c135d
--- /dev/null
+++ b/src/libMvQtGui/MvQMainWindow.cc
@@ -0,0 +1,438 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QDebug>
+#include <QDesktopWidget>
+#include <QHBoxLayout>
+#include <QIcon>
+#include <QLabel>
+#include <QMenu>
+#include <QMenuBar>
+#include <QToolBar>
+
+#include "MvQMainWindow.h"
+
+MvQMainWindow::MvQMainWindow(QWidget *parent) : QMainWindow(parent)
+{
+	QApplication::setWindowIcon(
+		QIcon(QPixmap(QString::fromUtf8(":/window/metview_logo"))));
+		
+	menuName_[FileMenu]="&File";
+	menuName_[ViewMenu]="&View";
+	menuName_[NavigateMenu]="&Go";
+	menuName_[BookmarksMenu]="&Bookmarks";
+	menuName_[HistoryMenu]="&History";
+	menuName_[SettingsMenu]="&Settings";
+	menuName_[ToolsMenu]="&Tools";
+	menuName_[AnimationMenu]="&Animation";
+	menuName_[ZoomMenu]="&Zoom";
+	menuName_[ProfilesMenu]="&Profiles";
+	menuName_[SelectionMenu]="&Selection";
+	menuName_[HelpMenu]="&Help";
+	menuName_[EditMenu]="&Edit";
+	menuName_[StepMenu]="&Steps";
+	
+	menuOrder_ << FileMenu << EditMenu << ViewMenu << NavigateMenu << BookmarksMenu << HistoryMenu <<
+	           ProfilesMenu << AnimationMenu << StepMenu << 
+	           ZoomMenu << SelectionMenu << ToolsMenu << SettingsMenu << HelpMenu;
+	
+}
+
+void MvQMainWindow::setupMenus(MenuItemMap items,MenuOption option)
+{
+	QMap<MenuType,QToolBar*> toolBars;	
+	QMap<MenuType,QMenu*> menus;
+
+	foreach(MenuType type,menuOrder_)
+	{	  	
+		QMenu *menu=0;
+		QToolBar* toolBar=0;
+
+	  	QString menuName=menuName_[type];
+		QString menuObjName=menuName;
+		menuObjName.remove("&");
+		menuObjName+=" Menu";
+			
+		QString toolBarName=menuName_[type];
+		toolBarName.remove("&");
+		toolBarName+=tr(" ToolBar");
+		QString toolBarObjName=toolBarName;
+						
+		if(items.contains(type))
+		{
+			if(option != ToolBarOnlyOption)
+			{
+				menu=createMenu(menuName,menuObjName,items[type]);	
+			}
+			toolBar = createToolBar(toolBarName,toolBarObjName,items[type]);
+		}		
+		else if(type == FileMenu || type == HelpMenu)
+		{
+			if(option != ToolBarOnlyOption)
+			{
+			  	menu=createMenu(menuName,menuObjName);
+
+			}
+		}	
+				
+		populate(menu,toolBar,items[type]);
+		if(menu) menus[type]=menu;		
+		if(toolBar) toolBars[type]=toolBar;
+
+		//Add further actions
+		
+		if(type == FileMenu && menu && 
+		   isActionPresent(items[type],"actionQuit") == false)
+		{	
+			//Quit
+			QAction* actionQuit = new QAction(this);
+        		actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
+			actionQuit->setText(tr("&Quit"));
+			actionQuit->setShortcut(tr("Ctrl+Q"));
+			QIcon icon(QPixmap(QString::fromUtf8(":/window/exit.svg")));
+    			actionQuit->setIcon(icon);
+
+			menu->addSeparator();
+			menu->addAction(actionQuit);
+
+			//Exit slot
+			connect(actionQuit,SIGNAL(triggered()),
+				this,SLOT(close()));
+		}
+		else if(type == HelpMenu && menu)
+		{
+			//About Qt
+			QAction* actionQt = new QAction(this);
+        		actionQt->setObjectName(QString::fromUtf8("About Qt"));
+			actionQt->setText(tr("About &Qt"));
+
+			menu->addAction(actionQt);
+
+			connect(actionQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));			
+		}
+	}	
+
+	//toolBarViewActions
+  
+  	if(menus.contains(ViewMenu))
+	{	
+		QMenu* vm=menus[ViewMenu];
+		if(toolBars.count() > 0)
+		{
+			vm->addSeparator();
+			
+			QMenu *subMenu=new QMenu(tr("ToolBars"),this);
+			vm->addMenu(subMenu);
+		  				
+			foreach(QToolBar *tb,toolBars)
+			{				
+				subMenu->addAction(tb->toggleViewAction());
+			}
+		}	
+	}	
+}	
+
+
+QMenu *MvQMainWindow::createMenu(QString name,QString objectName,QList<MvQMenuItem*> items)
+{
+	if(isMenuNeeded(items) == false)
+		return 0;
+	
+	return createMenu(name,objectName);
+}
+
+QMenu *MvQMainWindow::createMenu(QString name,QString objectName)
+{
+	QMenu *menu = new QMenu(name,this);
+	menu->setObjectName(objectName); 
+	menuBar()->addMenu(menu); 
+	return menu;
+}
+
+QToolBar *MvQMainWindow::createToolBar(QString name,QString objectName,QList<MvQMenuItem*> items,
+					Qt::ToolBarAreas allowedAreas)
+{
+	if(isToolBarNeeded(items) == false)
+		return 0;
+	
+	return createToolBar(name,objectName,allowedAreas);
+}
+
+QToolBar *MvQMainWindow::createToolBar(QString name,QString objectName,Qt::ToolBarAreas allowedAreas)
+{
+	QToolBar *toolBar = new QToolBar(name,this);
+        toolBar->setObjectName(objectName); 
+	toolBar->setAllowedAreas(allowedAreas);
+
+	if(toolBar->allowedAreas()  == Qt::AllToolBarAreas)
+	{
+		 addToolBar(Qt::TopToolBarArea,toolBar); 
+	}
+	else if(toolBar->allowedAreas() & Qt::TopToolBarArea )
+	{
+		  addToolBar(Qt::TopToolBarArea,toolBar);  
+	}
+	else if(toolBar->allowedAreas() & Qt::BottomToolBarArea)	
+	{
+		addToolBar(Qt::BottomToolBarArea,toolBar);
+	}
+	else if (toolBar->allowedAreas() & Qt::LeftToolBarArea)
+	{
+		addToolBar(Qt::LeftToolBarArea,toolBar);
+	}
+	else if (toolBar->allowedAreas() & Qt::RightToolBarArea)
+	{
+		addToolBar(Qt::RightToolBarArea,toolBar);
+	}
+
+	toolBar->setIconSize(QSize(22,22));
+	
+	return toolBar;
+}
+
+void MvQMainWindow::populate(QMenu *menu, QToolBar * toolBar, QList<MvQMenuItem*> items)
+{
+	if(!menu && !toolBar)
+		return;
+
+	foreach(MvQMenuItem* item,items)
+	{
+		const char *type_char=item->object()->metaObject()->className(); 
+		QString type(type_char);
+		if(type == "QAction")
+		{
+			if(item->targets().testFlag(MvQMenuItem::MenuTarget))
+			{
+				QAction* action=static_cast<QAction*>(item->object());
+				if(menu) menu->addAction(action);
+			}
+			if(item->targets().testFlag(MvQMenuItem::ToolBarTarget))
+			{
+				QAction* action=static_cast<QAction*>(item->object());
+				if(toolBar) toolBar->addAction(action);
+			}
+
+		}
+		else if(type == "QWidget" || type == "QPushButton" ||  type == "QToolButton" ||
+			type == "MvQZoomStackWidget" || type == "QComboBox" ||
+			type == "QLabel" || type == "QLineEdit" || type == "MvQSceneComboBox")
+		{
+			if(item->targets().testFlag(MvQMenuItem::ToolBarTarget))
+			{
+				QWidget* w=static_cast<QWidget*>(item->object());
+				if(toolBar) toolBar->addWidget(w);
+			}
+		}
+	}
+}
+bool MvQMainWindow::isToolBarItemPresent(QList<MvQMenuItem*> items)
+{
+	foreach(MvQMenuItem* item,items)
+	{
+		if(item->targets().testFlag(MvQMenuItem::ToolBarTarget))
+		{
+			return true;
+		}
+	}
+	return false;	
+}
+
+QAction* MvQMainWindow::findAction(QList<QAction*> actions,QString name)
+{
+	foreach(QAction* item,actions) 
+	{
+		if(item->objectName() == name)
+		{
+			return item;
+		}
+	}
+	return 0;
+
+}
+
+bool MvQMainWindow::isActionPresent(QList<MvQMenuItem*> items,QString name) 
+{
+	foreach(MvQMenuItem* item,items)
+	{
+		const char *type_char=item->object()->metaObject()->className(); 
+		QString type(type_char);
+		if(type == "QAction")
+		{			
+			QAction* action=static_cast<QAction*>(item->object());
+			if(action->objectName() == name)
+			{
+				return true;
+			}
+		}
+	}
+	
+	return false;
+}	
+
+bool MvQMainWindow::isMenuNeeded(QList<MvQMenuItem*> items)
+{
+	foreach(MvQMenuItem* item,items)
+	{	
+		if(item->targets().testFlag(MvQMenuItem::MenuTarget))
+		{
+			return true;
+		}
+	}
+	return false;
+}
+
+QMenu* MvQMainWindow::findMenu(MvQMainWindow::MenuType menuType)
+{
+  	QString name=menuName_[menuType];
+	name.remove("&");
+	name+=tr(" Menu");
+		
+	foreach(QMenu* m,findChildren<QMenu *>())
+	{
+		if(m->objectName() == name)
+		{
+			return m;  
+		}	
+	}
+	
+	return 0;
+  
+}  
+
+bool MvQMainWindow::isToolBarNeeded(QList<MvQMenuItem*> items)
+{
+	foreach(MvQMenuItem* item,items)
+	{	
+		if(item->targets().testFlag(MvQMenuItem::ToolBarTarget))
+		{
+			return true;
+		}
+	}
+	return false;
+}
+
+QToolBar* MvQMainWindow::findToolBar(MvQMainWindow::MenuType menuType)
+{
+  	QString name=menuName_[menuType];
+	name.remove("&");
+	name+=tr(" ToolBar");
+		
+	foreach(QToolBar* tb,findChildren<QToolBar *>())
+	{
+		if(tb->objectName() == name)
+		{
+			return tb;  
+		}	
+	}
+	
+	return 0;
+  
+}  
+
+QRect MvQMainWindow::screenGeometry()
+{
+	QDesktopWidget *dw=QApplication::desktop(); 
+	return dw->screenGeometry(dw->screenNumber());
+}
+
+void MvQMainWindow::setInitialSize(int w, int h)
+{
+	QRect scg=screenGeometry();
+
+	int wr=(scg.width()  > w) ? w : scg.width()-50;
+	int hr=(scg.height() > h) ? h : scg.height()-50;
+
+	resize(QSize(wr,hr));
+}
+
+QAction* MvQMainWindow::createAction(ActionType type,QObject *parent)
+{	
+	QAction *action=new QAction(parent);
+	QIcon icon;
+		
+	switch(type)
+	{
+	case AboutAction:
+  		action->setObjectName(QString::fromUtf8("actionAbout")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+		break;
+	case CloseAction:
+  		action->setObjectName(QString::fromUtf8("actionClose")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/window/close.svg")), QIcon::Normal, QIcon::Off);
+		action->setText("&Close");
+		action->setShortcut(tr("Ctrl+W"));
+		break;
+	case LogAction:
+  		action->setObjectName(QString::fromUtf8("actionLog")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/examiner/log.svg")), QIcon::Normal, QIcon::Off);
+		action->setCheckable(true);
+		action->setChecked(false);
+		action->setText("&Log");
+		action->setToolTip(tr("View log"));
+		break;
+	case ConfigureAction:
+  		action->setObjectName(QString::fromUtf8("actionConfigure")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/window/configure.svg")), QIcon::Normal, QIcon::Off);
+		action->setText("&Configure");
+		action->setToolTip(tr("Configure"));
+		break;
+	case FindAction:
+  		action->setObjectName(QString::fromUtf8("actionFind")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/find/search.svg")), QIcon::Normal, QIcon::Off);
+		action->setText("&Find");
+		action->setToolTip(tr("Find"));
+		action->setShortcut(tr("Ctrl+F"));
+		break;
+	case FindNextAction:
+  		action->setObjectName(QString::fromUtf8("actionFindNext")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/find/next.svg")), QIcon::Normal, QIcon::Off);
+		action->setText("Find &Next");
+		action->setToolTip(tr("Find next"));
+		action->setShortcut(tr("F3"));
+		break;	
+	case FindPreviousAction:
+  		action->setObjectName(QString::fromUtf8("actionFindPrevious")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/find/prev.svg")), QIcon::Normal, QIcon::Off);
+		action->setText("Find &Previous");
+		action->setToolTip(tr("Find previous"));
+		action->setShortcut(tr("Shift+F3"));
+		break;
+	case QuitAction:
+  		action->setObjectName(QString::fromUtf8("actionQuit")); 
+    		icon.addPixmap(QPixmap(QString::fromUtf8(":/window/exit.svg")), QIcon::Normal, QIcon::Off);
+		action->setText("&Quit");
+		action->setShortcut(tr("Ctrl+Q"));
+		break;	
+		
+	default:
+		break;
+	}
+	
+    	action->setIcon(icon);
+	
+	return action;
+}  
+
+QAction* MvQMainWindow::createAction(QString text,QString shortcut,QString data,QObject *parent)
+{
+ 	QAction *ac=new QAction(parent);
+	ac->setText(text);
+	ac->setShortcut(shortcut);
+	ac->setData(data);
+	return ac;
+}	
+
+QAction* MvQMainWindow::createSeparator(QObject *parent)
+{
+	QAction *ac=new QAction(parent);
+     	ac->setSeparator(true);
+	return ac;
+}	
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQMainWindow.h b/src/libMvQtGui/MvQMainWindow.h
new file mode 100644
index 0000000..305a6ac
--- /dev/null
+++ b/src/libMvQtGui/MvQMainWindow.h
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMainWindow_H
+#define MvQMainWindow_H
+
+#include <QMainWindow>
+#include "MvQMenuItem.h"
+
+class QAction;
+class QLabel;
+class QMenu;
+class QObject;
+class QToolBar;
+
+using namespace std;
+
+class MvQMainWindow : public QMainWindow
+{
+public:
+	enum ActionType {AboutAction,CloseAction,LogAction,ConfigureAction,
+	                FindAction,FindNextAction,FindPreviousAction,QuitAction};
+  	enum MenuType {AnimationMenu,BookmarksMenu,FileMenu,EditMenu,HelpMenu,HistoryMenu,NavigateMenu,
+  	               ProfilesMenu,SelectionMenu,SettingsMenu,StepMenu,ToolsMenu,ViewMenu,ZoomMenu};
+	enum MenuOption {NoOption,ToolBarOnlyOption}; 
+		
+	typedef QMap<MenuType, QList<MvQMenuItem*> > MenuItemMap;
+	
+	MvQMainWindow(QWidget *parent = 0);
+	QRect screenGeometry();
+	void setInitialSize(int, int);
+	static QAction* createAction(ActionType,QObject*);
+	static QAction* createAction(QString,QString,QString,QObject* parent=0);
+	static QAction* createSeparator(QObject* parent=0);
+
+protected:
+	void setupMenus(MenuItemMap, MenuOption option = NoOption);	
+	QMenu*    createMenu(QString,QString,QList<MvQMenuItem*>);
+	QMenu*    createMenu(QString,QString);
+	QToolBar* createToolBar(QString,QString,QList<MvQMenuItem*>,Qt::ToolBarAreas = Qt::AllToolBarAreas);
+	QToolBar* createToolBar(QString,QString,Qt::ToolBarAreas = Qt::AllToolBarAreas);
+	bool isToolBarItemPresent(QList<MvQMenuItem*>);
+	void populate(QMenu*,QToolBar*,QList<MvQMenuItem*>);
+	QAction* findAction(QList<QAction*>,QString);
+	bool isActionPresent(QList<MvQMenuItem*>,QString); 
+	bool isMenuNeeded(QList<MvQMenuItem*>);
+	QMenu*  findMenu(MvQMainWindow::MenuType);
+	bool isToolBarNeeded(QList<MvQMenuItem*>);
+	QToolBar*  findToolBar(MvQMainWindow::MenuType);
+		
+	QMap<MenuType,QString> menuName_;
+	QList<MenuType> menuOrder_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQMemoryWidget.cc b/src/libMvQtGui/MvQMemoryWidget.cc
new file mode 100644
index 0000000..3cc4386
--- /dev/null
+++ b/src/libMvQtGui/MvQMemoryWidget.cc
@@ -0,0 +1,139 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQMemoryWidget.h"
+
+#include <QDebug>
+#include <QTextStream>
+
+#include <stdlib.h>
+#include <unistd.h>
+//#include <sys/time.h>
+//#include <sys/resource.h>
+
+MvQMemoryWidget::MvQMemoryWidget(QWidget *parent) : QLabel(parent)
+{
+	//memInfoFile_= new QFile("/proc/meminfo");
+	pid_=getpid();
+}
+
+void MvQMemoryWidget::slotRefresh()
+{
+	//struct rusage usage;
+
+	//getrusage(RUSAGE_SELF,&usage); 
+
+	//maxrss_=usage.ru_maxrss;
+
+	QFile memInfoFile("/proc/meminfo");
+
+	if(memInfoFile.open(QIODevice::ReadOnly | QIODevice::Text) == false)
+	{
+		return;
+	}
+
+	int findItems=0;
+
+	QTextStream in(&memInfoFile);
+	QString line = in.readLine();
+	while (!line.isNull() && findItems < 2) 
+	{
+		if(parseMemInfoLine("MemTotal",line,memTotal_,memTotalUnit_))
+		{
+			findItems++;
+		}
+		else if(parseMemInfoLine("MemFree",line,memFree_,memFreeUnit_))
+		{
+			findItems++;
+		}
+		line = in.readLine();
+	}
+
+	memInfoFile.close();
+
+
+	QFile procFile("/proc/" + QString::number(pid_) + "/statm");
+
+	if(procFile.open(QIODevice::ReadOnly | QIODevice::Text) == false)
+	{
+		return;
+	}
+
+	QTextStream inProc(&procFile);
+	QStringList lst = inProc.readLine().split(" ",QString::SkipEmptyParts);
+	maxrss_=lst[1].toLong();
+
+	procFile.close();
+
+
+	QString txt=QString::number(maxrss_) + " " + QString::number(memTotal_) + " " +
+		QString::number(memFree_);	
+
+
+	setText(txt);
+}
+
+bool MvQMemoryWidget::parseMemInfoLine(QString key,QString line,long &value,QString &unit)
+{
+	QStringList lst=line.split(":");
+
+	qDebug() << line << lst;
+
+	if(lst.count() == 2 && lst[0].compare(key) == 0)
+	{
+		QStringList nLst=lst[1].simplified().split(" ");
+		qDebug() << nLst;
+
+		if(nLst.count()==2)
+		{
+			value=nLst[0].toLong();
+			unit=nLst[1];
+			return true;
+		}
+	}
+	return false;
+}
+
+long MvQMemoryWidget::memTotal()
+{
+ 	return memTotal_;
+}
+
+long MvQMemoryWidget::memFree()
+{
+ 	return memFree_;
+}
+
+long MvQMemoryWidget::maxrss()
+{
+ 	return maxrss_;
+}
+
+
+#if 0
+struct rusage {
+    struct timeval ru_utime; /* user time used */
+    struct timeval ru_stime; /* system time used */
+    long   ru_maxrss;        /* maximum resident set size */
+    long   ru_ixrss;         /* integral shared memory size */
+    long   ru_idrss;         /* integral unshared data size */
+    long   ru_isrss;         /* integral unshared stack size */
+    long   ru_minflt;        /* page reclaims */
+    long   ru_majflt;        /* page faults */
+    long   ru_nswap;         /* swaps */
+    long   ru_inblock;       /* block input operations */
+    long   ru_oublock;       /* block output operations */
+    long   ru_msgsnd;        /* messages sent */
+    long   ru_msgrcv;        /* messages received */
+    long   ru_nsignals;      /* signals received */
+    long   ru_nvcsw;         /* voluntary context switches */
+    long   ru_nivcsw;        /* involuntary context switches */
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQMemoryWidget.h b/src/libMvQtGui/MvQMemoryWidget.h
new file mode 100644
index 0000000..eb5e77a
--- /dev/null
+++ b/src/libMvQtGui/MvQMemoryWidget.h
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMemoryWidget_H
+#define MvQMemoryWidget_H
+
+#include <QFile>
+#include <QLabel>
+
+using namespace std;
+
+class MvQMemoryWidget : public QLabel
+{
+	Q_OBJECT
+
+public:
+	MvQMemoryWidget(QWidget *parent=0);
+
+	long memTotal();
+	long memFree();
+	long maxrss();
+
+public slots:
+	void slotRefresh();
+
+protected:
+ 	bool parseMemInfoLine(QString,QString,long &,QString &);
+
+	int pid_;
+	QFile memInfoFile_;
+    	long memTotal_;	
+    	long memFree_;
+     	QString memTotalUnit_;	
+     	QString memFreeUnit_;
+     	long maxrss_;
+};
+
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQMenuItem.h b/src/libMvQtGui/MvQMenuItem.h
new file mode 100644
index 0000000..4ccc6f3
--- /dev/null
+++ b/src/libMvQtGui/MvQMenuItem.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMenuItem_H
+#define MvQMenuItem_H
+
+#include <QMap>
+#include <QList>
+#include <QString>
+
+class QObject;
+
+class MvQMenuItem
+{
+public:
+	enum Target {NoTarget = 0x0, MenuTarget = 0x1, ToolBarTarget = 0x2};
+	Q_DECLARE_FLAGS(Targets,Target);
+
+	MvQMenuItem(QObject* o,Targets t = Targets(MenuTarget|ToolBarTarget) ) : object_(o), targets_(t) {};
+	QObject* object() {return object_;}
+	Targets targets() {return targets_;}	
+
+private:
+	QObject* object_;
+	Targets  targets_;
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(MvQMenuItem::Targets);
+
+
+#endif
diff --git a/src/libMvQtGui/MvQOdbDataWidget.cc b/src/libMvQtGui/MvQOdbDataWidget.cc
new file mode 100644
index 0000000..568a1be
--- /dev/null
+++ b/src/libMvQtGui/MvQOdbDataWidget.cc
@@ -0,0 +1,570 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QDebug>
+#include <QFontMetrics>
+#include <QHeaderView>
+#include <QHBoxLayout> 
+#include <QLabel>
+#include <QLineEdit>
+#include <QMenu>
+#include <QSortFilterProxyModel>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include <stdlib.h>
+
+#include "MvOdb.h"
+
+
+#include "MvQOdbDataWidget.h"
+#include "MvQOdbModel.h"
+
+
+MvQOdbDataWidget::MvQOdbDataWidget(QWidget *parent) : QWidget(parent)
+{
+	data_=0;
+
+	maxChunkSizeInMb_=60;
+	chunkSize_=0;
+	chunkNum_=0;
+	currentChunk_=-1;
+	dataInitialised_=false;
+
+	QVBoxLayout *dataLayout = new QVBoxLayout;
+	dataLayout->setContentsMargins(0,0,0,0);
+	setLayout(dataLayout);
+
+	//Data tree
+	dataModel_= new MvQOdbDataModel();
+
+	dataSortModel_= new QSortFilterProxyModel;
+        dataSortModel_->setSourceModel(dataModel_);
+	dataSortModel_->setDynamicSortFilter(true);
+		
+	dataTree_=new QTreeView;
+	dataTree_->setObjectName("dataTree");
+	dataTree_->setProperty("mvStyle",0);
+	dataTree_->setAlternatingRowColors(true);
+        dataTree_->setAllColumnsShowFocus(true);
+	dataTree_->setModel(dataSortModel_);	
+	dataTree_->setUniformRowHeights(true);
+	dataTree_->setRootIsDecorated(false);  
+	dataTree_->setSortingEnabled(false); //!
+	
+	//Set header ContextMenuPolicy
+	dataTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	
+	connect(dataTree_->header(),SIGNAL(customContextMenuRequested(const QPoint &)),
+                this, SLOT(slotHeaderContextMenu(const QPoint &)));
+		
+	connect(dataTree_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotRowSelected(const QModelIndex&)));
+	
+	
+	dataLayout->addWidget(dataTree_);
+
+	//Control at the bottom
+	QHBoxLayout *hb=new QHBoxLayout; 
+	dataLayout->addLayout(hb);
+
+	hb->addSpacing(5);
+
+	rowNumLabel_=new QLabel;
+	hb->addWidget(rowNumLabel_);
+
+	hb->addStretch(1);
+
+	chunkSizeLabel_ = new QLabel;
+	hb->addWidget(chunkSizeLabel_);
+	hb->addSpacing(12);
+
+	dataBlockLabel_=new QLabel(tr("<b>Data block:</b>"));
+	hb->addWidget(dataBlockLabel_);
+
+	chunkPrevTb_ = new QToolButton(this);
+	chunkPrevTb_->setToolTip(tr("Previous data block"));
+	chunkPrevTb_->setIcon(QPixmap(QString::fromUtf8(":/examiner/triangle_left.svg")));
+	chunkPrevTb_->setAutoRaise(true);
+	hb->addWidget(chunkPrevTb_);
+
+	chunkEdit_ = new QLineEdit(this);
+	chunkEdit_->setToolTip(tr("Current data block"));
+	QSizePolicy sp=chunkEdit_->sizePolicy();
+	sp.setHorizontalPolicy(QSizePolicy::Fixed);
+	chunkEdit_->setSizePolicy(sp);
+	QSize size=chunkEdit_->fontMetrics().size(Qt::TextSingleLine,"333");
+	chunkEdit_->setFixedWidth(size.width()+10);
+	chunkEditValidator_=new QIntValidator(this);
+
+	connect(chunkEdit_,SIGNAL(editingFinished()),
+		this, SLOT(slotChunkEdited()));  
+
+	chunkNumLabel_=new QLabel(this);
+
+	hb->addWidget(chunkEdit_);
+	hb->addWidget(chunkNumLabel_);
+		
+	chunkNextTb_ = new QToolButton(this);
+	chunkNextTb_->setToolTip(tr("Next data block"));
+	chunkNextTb_->setIcon(QPixmap(QString::fromUtf8(":/examiner/triangle_right.svg")));
+	chunkNextTb_->setAutoRaise(true);
+	hb->addWidget(chunkNextTb_);
+
+	hb->addSpacing(5);
+
+	connect(chunkPrevTb_,SIGNAL(clicked()),
+		this,SLOT(slotToPrevChunk()));
+
+	connect(chunkNextTb_,SIGNAL(clicked()),
+		this,SLOT(slotToNextChunk()));
+
+	chunkPrevTb_->setEnabled(false);
+	chunkNextTb_->setEnabled(false);	
+
+}
+
+MvQOdbDataWidget::~MvQOdbDataWidget()
+{
+	if(data_)
+		delete data_;
+}
+
+//Should be called only once 
+bool MvQOdbDataWidget::init(QString path)
+{
+	vector<int> v;
+	return init(path,v);
+}	
+
+bool MvQOdbDataWidget::init(QString path,const vector<int>& filter)
+{
+	if(dataInitialised_)
+	{
+		if(data_->path() == path.toStdString())	  
+		{
+			dataModel_->setFilter(filter);
+			setTotalNumDisplay();
+			return true;
+		}
+		else
+		{
+			delete data_;
+			data_=0;
+		}	
+	}
+			
+	dataInitialised_=true;
+
+	//Create a data object!!
+	data_= MvOdbFactory::make(path.toStdString());
+	if(data_ && data_->version() != MvAbstractOdb::VersionNew)
+	{
+		delete data_;
+		data_=0;
+		return false;
+	}
+
+	if(!data_)
+	{
+		//metaTab_->setTabEnabled(4,false);
+		return false;
+	}		
+	else
+	{				
+		dataModel_->setFilter(filter);
+		loadData();
+		return true;
+	}	
+
+	return true;
+}
+
+void MvQOdbDataWidget::loadData()
+{
+	if(!data_)
+		return;  
+				
+	loadStarted();
+	//statusMessageLabel_->setText(tr("Counting number of rows in ODB data ..."));
+	
+	int rowNum=data_->rowNum(); 
+	int colNum=data_->columnNum();
+	
+	int totSizeInMb=-1;
+	if( maxChunkSizeInMb_ >0)
+	{
+		totSizeInMb=data_->totalSizeInMb();
+	}
+	
+	//statusMessageLabel_->clear();	
+
+	qDebug() << "Data" << rowNum << colNum << maxChunkSizeInMb_;
+
+	chunkSize_=0;
+	chunkNum_=0;
+
+	if(totSizeInMb >  maxChunkSizeInMb_ && maxChunkSizeInMb_ >0)
+	{	  
+	        int r=static_cast<float>(rowNum)*(static_cast<float>(maxChunkSizeInMb_)/static_cast<float>(totSizeInMb));
+		int chunk;
+		
+		if(r < 1000)
+			chunk=500;
+		else if(r < 5000)
+			chunk=1000;
+		else if(r <10000)
+			chunk=5000;
+		else if(r < 25000)
+			chunk=10000;
+		else if(r < 50000)
+			chunk=25000;
+		else if(r < 100000)
+			chunk=50000;
+		else if(r < 300000)
+			chunk=100000;
+		else
+		  	chunk=200000;
+	
+		chunkSize_=chunk;
+		chunkNum_=rowNum/chunkSize_ + ((rowNum % chunkSize_ == 0)?0:1);
+
+		//Disable sorting in tree
+		dataTree_->setSortingEnabled(false);
+				
+		dataModel_->dataIsAboutToChange();		
+		initCurrentChunk(); //set currentChunk_ to 0
+		data_->setChunkSize(chunkSize_);
+		data_->setCurrentChunk(currentChunk_);
+		dataModel_->setData(data_);
+		
+		chunkEditValidator_->setRange(1,chunkNum_);
+		chunkEdit_->setValidator(chunkEditValidator_);			
+		chunkNumLabel_->setText("/ "+QString::number(chunkNum_));			
+		chunkSizeLabel_->setText(tr("<b>Data block size:</b> ") + QString::number(chunkSize_) + tr(" rows"));
+
+		chunkSizeLabel_->show();
+		dataBlockLabel_->show();
+		chunkEdit_->show();
+		chunkNextTb_->show();
+		chunkPrevTb_->show();
+		chunkNumLabel_->show();		
+	}	
+	else
+	{				
+		chunkSizeLabel_->hide();
+		dataBlockLabel_->hide();
+		chunkEdit_->hide();
+		chunkNextTb_->hide();
+		chunkPrevTb_->hide();
+		chunkNumLabel_->hide();
+			
+		dataModel_->dataIsAboutToChange();
+		data_->setChunkSize(0);
+		dataModel_->setData(data_);
+			
+		dataTree_->setSortingEnabled(true);
+		dataTree_->sortByColumn (0,Qt::AscendingOrder); 			
+	}	
+	
+	
+	for(int i=0;i < dataModel_->columnCount()-1; i++)
+	{ 
+		dataTree_->resizeColumnToContents(i);
+	}
+
+	setTotalNumDisplay();
+	
+	loadFinished();
+}
+
+
+void MvQOdbDataWidget::slotToPrevChunk()
+{
+	setCurrentChunk(currentChunk_-1);
+}
+
+void MvQOdbDataWidget::slotToNextChunk()
+{
+	setCurrentChunk(currentChunk_+1);
+}
+
+void MvQOdbDataWidget::slotChunkEdited()
+{
+	setCurrentChunk(chunkEdit_->text().toInt()-1);
+}
+
+void MvQOdbDataWidget::setCurrentChunk(int chunk)
+{
+	if(chunkSize_== 0)
+		return;
+
+	int oriVal=currentChunk_;
+	if(chunk<0)
+		currentChunk_=0;
+	else if (chunk >= chunkNum_)
+		currentChunk_=chunkNum_-1;
+	else
+		currentChunk_=chunk;
+
+	if(currentChunk_<=0)
+	{
+		chunkPrevTb_->setEnabled(false);
+		chunkNextTb_->setEnabled(true);
+	}
+	else if(currentChunk_ >= chunkNum_-1)
+	{
+		chunkPrevTb_->setEnabled(true);
+		chunkNextTb_->setEnabled(false);
+	}
+	else
+	{
+		chunkPrevTb_->setEnabled(true);
+		chunkNextTb_->setEnabled(true);
+	}
+
+	if(oriVal != currentChunk_)
+	{
+		loadStarted();
+		//statusMessageLabel_->setText(tr("Reading ODB data ..."));
+		
+		dataModel_->dataIsAboutToChange();
+		data_->setCurrentChunk(currentChunk_);
+		dataModel_->setData(data_);
+
+		if(chunkEdit_->text().toInt() != currentChunk_+1)
+		{
+			chunkEdit_->setText(QString::number(currentChunk_+1));
+		}
+
+		loadFinished();
+		//statusMessageLabel_->setText(tr("Reading ODB data ..."));
+		//statusMessageLabel_->clear();		
+	}
+
+
+}	
+
+void MvQOdbDataWidget::initCurrentChunk()
+{
+	currentChunk_=0;
+  
+	chunkPrevTb_->setEnabled(false);
+	chunkNextTb_->setEnabled(true);
+			
+	if(chunkEdit_->text().toInt() != currentChunk_+1)
+	{
+		chunkEdit_->setText(QString::number(currentChunk_+1));
+	}
+}	
+
+
+void MvQOdbDataWidget::setMaxChunkSizeInMb(int maxNum)
+{ 
+  	if(maxNum < 0 || maxNum > 2000)
+		return;  
+	  
+	maxChunkSizeInMb_=maxNum;
+	
+	if(dataInitialised_)
+	{
+	  	loadData();
+	}	
+}	
+
+void MvQOdbDataWidget::loadStarted()
+{
+	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+}
+
+void MvQOdbDataWidget::loadFinished()
+{
+	QApplication::restoreOverrideCursor();
+}
+
+void MvQOdbDataWidget::setFilter(const vector<int>& filter)
+{
+	dataModel_->setFilter(filter);
+}
+
+void MvQOdbDataWidget::highlightRow(int row)
+{
+  	QModelIndex index=dataSortModel_->mapFromSource(dataModel_->index(row,0));
+	dataTree_->setCurrentIndex(index);
+	//dataTree_->scrollTo()
+}
+
+void MvQOdbDataWidget::slotRowSelected(const QModelIndex& index)
+{
+	QModelIndex dataIndex=dataSortModel_->mapToSource(index); 
+	emit dataRowSelected(dataIndex.row());
+}  
+
+
+void MvQOdbDataWidget::setTotalNumDisplay()
+{
+	int displayedRowNum=data_->rowNum();
+	if(dataModel_->filtered())
+	{
+		displayedRowNum=dataModel_->rowCount();
+	}
+	
+	rowNumLabel_->setText(tr("<b>Total number of rows:</b> ") + QString::number(displayedRowNum));
+}
+	
+void MvQOdbDataWidget::slotHeaderContextMenu(const QPoint &position)
+{
+	int section=dataTree_->header()->logicalIndexAt(position); 
+	
+	if(section< 0 || section >= dataTree_->header()->count())
+		return;
+
+	QMenu menu;
+	QMenu subMenu(tr("Show other columns"));
+	
+	
+	int numOfShown=0;
+	for(int i=0; i < dataModel_->columnCount(); i++)
+	{
+		 if(!dataTree_->isColumnHidden(i))
+		 {  		   
+			numOfShown++;
+		 }
+	}
+	
+	QAction *actionHide=0;
+	
+	//Thic column can be hidden only if there are other visible columns as well
+	if(!dataTree_->isColumnHidden(section) && numOfShown > 1)
+	{
+		actionHide = new QAction(this);
+		actionHide->setText(tr("Hide ") + "\'" + dataModel_->headerData(section,Qt::Horizontal,Qt::DisplayRole).toString() + "\'");
+		menu.addAction(actionHide);	
+
+		menu.addSeparator();
+	}
+	
+	//Show columns
+	QMap<QAction*,int> actionShow;
+	for(int i=0; i < dataModel_->columnCount(); i++)
+	{
+		 if(dataTree_->isColumnHidden(i))
+		 {  		   
+		 	//SubMenu if there are too amny items
+	  	 	if(actionShow.count() == 6)
+		 	{
+		 		menu.addMenu(&subMenu);
+		 	}
+		 	
+		 	QAction *ac = new QAction(this);
+			QString acText=dataModel_->headerData(i,Qt::Horizontal,Qt::DisplayRole).toString();		
+			if(actionShow.count() >= 6)
+		 	{
+		   		ac->setText(acText);
+		   		subMenu.addAction(ac);
+			}
+			else
+			{
+			  	ac->setText(tr("Show ") + "\'" + acText + "\'");
+				menu.addAction(ac);
+			}			
+			actionShow[ac]=i;
+		 }		 
+	}	 
+	
+	menu.addSeparator();
+	
+	QAction *actionShowAll = new QAction(this);
+	actionShowAll->setText(tr("Show all columns"));    
+	menu.addAction(actionShowAll);
+	
+	QAction *actionHideAll = new QAction(this);
+	actionHideAll->setText(tr("Hide all other columns"));
+	menu.addAction(actionHideAll);
+		
+	QAction *action=menu.exec(dataTree_->header()->mapToGlobal(position));
+	  
+	bool actionSelected=false;
+	
+	if(action == actionHide)
+	{			
+         	dataTree_->hideColumn(section);	
+		actionSelected=true;			
+	}
+	else if(action == actionShowAll)
+	{			
+         	for(int i=0; i < dataModel_->columnCount(); i++)
+		{
+			dataTree_->showColumn(i);
+		}
+		actionSelected=true;
+	}
+	else if(action == actionHideAll)
+	{			
+         	for(int i=0; i < dataModel_->columnCount(); i++)
+		{
+			if(!dataTree_->isColumnHidden(i) && i != section)
+				dataTree_->hideColumn(i);
+		}
+		actionSelected=true;	
+	}	
+	else if(action)
+	{			
+         	QMap<QAction*,int>::iterator it=actionShow.find(action);
+		if(it != actionShow.end())
+		{         		
+         		dataTree_->showColumn(it.value());
+		}
+		actionSelected=true;	
+	}
+	
+	if(actionSelected)
+	{  
+		for(int i=0; i < dataModel_->columnCount()-1; i++)
+		{
+			dataTree_->resizeColumnToContents(i);
+		}
+	}	
+	
+	subMenu.clear();
+	menu.clear();
+}
+
+QStringList MvQOdbDataWidget::visibleColumns()
+{	
+  	QStringList lst;
+  	for(int i=0; i < dataModel_->columnCount(); i++)
+	{
+		 if(!dataTree_->isColumnHidden(i))
+		 {  		   
+		 	lst << dataModel_->headerData(i,Qt::Horizontal,Qt::DisplayRole).toString();
+		 }	
+	}
+	
+	return lst;
+}
+
+void MvQOdbDataWidget::setVisibleColumns(QStringList lst)
+{	
+  	for(int i=0; i < dataModel_->columnCount(); i++)
+	{
+		if(lst.indexOf(dataModel_->headerData(i,Qt::Horizontal,Qt::DisplayRole).toString()) != -1)
+		{
+			dataTree_->showColumn(i);
+		}	
+		else
+		{
+			dataTree_->hideColumn(i);
+		}	
+	}
+}	
+	
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQOdbDataWidget.h b/src/libMvQtGui/MvQOdbDataWidget.h
new file mode 100644
index 0000000..31e15ef
--- /dev/null
+++ b/src/libMvQtGui/MvQOdbDataWidget.h
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOdbDataWidget_H
+#define MvQOdbDataWidget_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+class QIntValidator;
+class QLabel;
+class QLineEdit;
+class QTreeView;
+class QSortFilterProxyModel;
+class QToolButton;
+
+class MvQOdbDataModel;
+
+class MvAbstractOdb;
+
+using namespace std;
+
+class MvQOdbDataWidget : public QWidget
+{
+    Q_OBJECT
+
+public:
+    	MvQOdbDataWidget(QWidget *parent = 0);
+	~MvQOdbDataWidget();
+    	bool init(QString);
+	bool init(QString,const vector<int>&);
+	bool initialised() {return dataInitialised_;}
+	void setMaxChunkSizeInMb(int);
+	int maxChunkSizeInMb() {return maxChunkSizeInMb_;}
+	QTreeView* dataTree() {return dataTree_;}
+	void setFilter(const vector<int>&);
+	void highlightRow(int);
+	QStringList visibleColumns();
+	void setVisibleColumns(QStringList);
+
+public slots:
+	void slotToPrevChunk();
+	void slotToNextChunk();
+	void slotChunkEdited();
+	void slotHeaderContextMenu(const QPoint&);
+	void slotRowSelected(const QModelIndex&);
+
+signals: 
+	void dataRowSelected(int);	
+  
+protected:	
+  	void loadData();
+	void setCurrentChunk(int);
+	void initCurrentChunk();
+	void loadStarted();
+	void loadFinished();
+	void setTotalNumDisplay();
+	
+	QTreeView*  		dataTree_;
+	MvQOdbDataModel* 	dataModel_;
+	QSortFilterProxyModel*  dataSortModel_;	
+	MvAbstractOdb*		data_;
+
+	bool useChunks_;
+	int maxChunkSizeInMb_; //max size in Mb of one chunk
+	int chunkSize_;       //current number of row in a chunk
+	int chunkNum_;        //nuber of chunks
+	int currentChunk_;
+	QLabel*	rowNumLabel_;
+	QLabel* chunkSizeLabel_;
+	QLabel* dataBlockLabel_;
+	QToolButton* chunkPrevTb_;
+	QToolButton* chunkNextTb_; 
+	QLineEdit* chunkEdit_;
+	QLabel* chunkNumLabel_;
+	QIntValidator* chunkEditValidator_;
+
+	bool dataInitialised_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQOdbModel.cc b/src/libMvQtGui/MvQOdbModel.cc
new file mode 100644
index 0000000..d088046
--- /dev/null
+++ b/src/libMvQtGui/MvQOdbModel.cc
@@ -0,0 +1,624 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQOdbModel.h"
+
+#include "MvOdb.h"
+
+MvQOdbVarModel::MvQOdbVarModel()
+{
+}
+
+void MvQOdbVarModel::setData(QList<MvQOdbVar*> &data) 
+{	
+	data_=data;
+	
+	qDebug() << "model size:" << data_.count();
+	
+	//Reset the model (views will be notified)
+	reset();
+}
+
+
+int MvQOdbVarModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 2;
+}
+
+int MvQOdbVarModel::rowCount( const QModelIndex& parent) const
+{
+	//Non-root
+	if(parent.isValid() )
+	{
+		return 0;
+	}
+	//Root
+	else
+	{
+		return data_.count();
+	}
+}
+
+
+QVariant MvQOdbVarModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || role != Qt::DisplayRole)
+        {			
+		return QVariant();
+	}
+	
+	MvQOdbVar *var=data_[index.row()];
+	return label(var,index.column());
+}
+
+
+QVariant MvQOdbVarModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return "Name";
+  	case 1: return "Value";
+   	}
+
+    	return QVariant();
+}
+
+
+QString MvQOdbVarModel::label(MvQOdbVar *var,const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return var->name();
+	}
+    	case 1: 
+	{
+		return var->value();
+	}
+
+	default:
+        	return QString();
+    	}
+}
+
+QModelIndex MvQOdbVarModel::index( int row, int column, const QModelIndex &) const
+{
+	if(data_.count() ==0 || row < 0 || column < 0)
+	{
+		return QModelIndex();
+	}
+
+	return createIndex(row, column, 0); 
+}
+
+
+QModelIndex MvQOdbVarModel::parent( const QModelIndex &) const
+{			
+	return QModelIndex();
+}
+
+//=========================================
+//
+// MvQOdbColumnModel
+//
+//=========================================
+
+MvQOdbColumnModel::MvQOdbColumnModel(bool showTableColumn) : 
+			showTableColumn_(showTableColumn)
+{
+	typeMap_[MvQOdbColumn::None]="none";
+	typeMap_[MvQOdbColumn::Int]="int";
+	typeMap_[MvQOdbColumn::Float]="float";
+	typeMap_[MvQOdbColumn::String]="string";
+	typeMap_[MvQOdbColumn::Bitfield]="bitfield";
+}
+
+void MvQOdbColumnModel::setData(const QList<MvQOdbColumn*> &data, MvQOdbMetaData::OdbVersion  version) 
+{	
+  	beginResetModel();
+  	data_=data;
+	odbVersion_=version;
+	endResetModel();
+}
+
+
+int MvQOdbColumnModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+  	if(odbVersion_ == MvQOdbMetaData::Version1)
+	{	  
+    		if(showTableColumn_)
+			return 3;
+		else 
+			return 2;
+	}
+	else if(odbVersion_ == MvQOdbMetaData::Version2)
+	{
+		if(showTableColumn_)
+			return 7;
+		else 
+			return 6;	  
+	} 
+	else 
+		return 0;
+}
+
+int MvQOdbColumnModel::rowCount( const QModelIndex& parent) const
+{
+	//Non-root
+	if(parent.isValid() )
+	{
+		int id=parent.internalId();
+		if(idToLevel(id) == 0)
+		{
+			qDebug() << "bitfield:" << data_.at(id)->bitfieldNum();
+			return data_.at(id)->bitfieldNum();			
+		}
+		else
+		{
+			return 0;
+		}
+	}
+	//Root
+	else
+	{
+		qDebug() << "model size:" << data_.count();
+		return data_.count();
+	}
+}
+
+
+QVariant MvQOdbColumnModel::data( const QModelIndex& index, int role ) const
+{
+	if(!index.isValid() || role != Qt::DisplayRole)
+        {			
+		return QVariant();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		MvQOdbColumn *col=data_.at(id);
+		return label(col,index.column());
+	}
+	else if(idToLevel(id) == 1)
+	{
+		int parentRow=idToParentRow(id);
+		MvQOdbColumn *col=data_.at(parentRow);
+		MvQOdbBitfieldMember* bit=col->bitfield().at(index.row());
+		return label(bit,index.column());
+	}
+	
+	return  QVariant();
+}
+
+
+QVariant MvQOdbColumnModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if (orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+ 	if(odbVersion_ == MvQOdbMetaData::Version1)
+	{	  
+		switch ( section ) 
+		{
+   		case 0: 
+			return tr("Name");
+  		case 1: 
+			return tr("Type");
+		case 2: 
+			return (showTableColumn_)?tr("Table"):QVariant();
+		default:
+			return QVariant();
+   		}
+	}
+ 	else if(odbVersion_ == MvQOdbMetaData::Version2)
+	{	  
+		switch ( section ) 
+		{
+   		case 0: 
+			return tr("Name");
+  		case 1: 
+			return tr("Type");	
+		case 2: 
+			return tr("Constant");
+		case 3: 
+			return tr("Min");
+		case 4: 
+			return tr("Max");
+		case 5: 
+			return tr("Missing value");
+		case 6: 
+			return (showTableColumn_)?tr("Table"):QVariant();
+		default:
+			return QVariant();
+   		}
+	}
+	
+	return QVariant();		
+}	
+
+
+ QVariant MvQOdbColumnModel::label(MvQOdbColumn *col,const int column ) const
+{
+	if(odbVersion_ == MvQOdbMetaData::Version1)
+	{	  
+		switch ( column ) 
+		{
+    		case 0: 
+		{
+			return col->name();
+		}
+    		case 1: 
+		{
+			return col->type();
+		}		
+		case 2: 
+		{
+			return (showTableColumn_)?col->table():QString();
+		}
+		default:
+        		return QString();
+    		}
+	}	
+    	   	
+        else if(odbVersion_ == MvQOdbMetaData::Version2)
+	{	  
+		switch ( column ) 
+		{
+    		case 0: 
+		{
+			return col->name();
+		}
+    		case 1: 
+		{
+			return col->type();
+		}
+		case 2: 
+		{
+			return (col->isConstant())?QString("y"):QString("n");
+		}
+		case 3: 
+		{
+			if(col->type() =="float")
+				return QString::number(col->min());
+			else if(col->type() =="int")
+			  	return QString::number(static_cast<int>(col->min()));
+			else
+			  	return QString("N/A");
+		}	
+		case 4: 
+		{
+			if(col->type() =="float")
+				return QString::number(col->max());
+			else if(col->type() =="int")
+			  	return QString::number(static_cast<int>(col->max()));
+			else
+			  	return QString("N/A");
+		}
+		case 5: 
+		{
+			return ((col->type() =="float" || col->type() == "int") && col->hasMissingValue())?QString::number(col->missingValue()):QString("N/A");
+		}
+		case 6: 
+		{
+			return (showTableColumn_)?col->table():QString();
+		}
+
+		default:
+        		return QString();
+		}	
+    	}
+    	
+    	return QString();	   	    	
+}
+
+QString MvQOdbColumnModel::label(MvQOdbBitfieldMember* bitfield, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return bitfield->name();
+	}
+    	case 1: 
+	{
+		QString s1;
+		s1.sprintf("%02d",bitfield->pos());	
+			
+		QString str ="Pos: ";
+		str+=s1;
+		str+="  Width: ";
+		str+=QString::number(bitfield->size());
+		str+=" bit";
+
+		qDebug() << "bit:" << str;
+
+		return str;
+	}
+	default:
+        	return QString();
+    	}
+}
+
+QModelIndex MvQOdbColumnModel::index( int row, int column, const QModelIndex & parent ) const
+{
+	if(data_.count() ==0 || row < 0 || column < 0 || parent.column() > 3)
+	{
+		return QModelIndex();
+	}
+	
+	//Parent is non-root -> level-1 items: id is the parent row (number+1)*10000
+	if(parent.isValid() )
+	{
+		int id=(parent.row()+1)*10000;
+		return createIndex(row, column, id); 
+	}
+	//Parent is root -> level-0 items: id is the row number
+	else
+	{
+		return createIndex(row, column, row); 
+	}
+}
+
+
+QModelIndex MvQOdbColumnModel::parent( const QModelIndex & index ) const
+{	
+	if(!index.isValid() )
+	{
+		return QModelIndex();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		return QModelIndex();
+	}
+	else 
+	{
+		int parentRow=idToParentRow(id);
+		return createIndex(parentRow,0,parentRow);
+	}
+
+	return QModelIndex();
+}
+
+int MvQOdbColumnModel::idToLevel(int id) const
+{
+	if(id >=0 && id < 10000)
+		return 0;
+	else
+		return 1;
+}
+
+int MvQOdbColumnModel::idToParentRow(int id) const
+{
+	if(idToLevel(id) == 0)
+		return -1;
+	else
+		return id/10000-1;
+}
+
+
+
+//=========================================
+//
+// MvQOdbDataModel
+//
+//=========================================
+
+MvQOdbDataModel::MvQOdbDataModel()			
+{
+	data_=0;
+}
+
+void MvQOdbDataModel::dataIsAboutToChange()
+{
+	beginResetModel(); 
+}
+
+void MvQOdbDataModel::setData(MvAbstractOdb* data) 
+{		
+	data_=data;
+	data_->loadAllColumns();
+
+	//sorting
+	columnOrder_.clear();
+	QMap<QString,int> cOrd;
+	for(unsigned int i=0; i < data_->columns().size(); i++)
+	{
+		QString str=QString::fromStdString(data_->columns().at(i)->name());		  
+	  	cOrd[str]=i;
+	}
+	
+	QMapIterator<QString,int> it(cOrd);
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+     		columnOrder_ <<   it.value();
+	}	
+
+
+	//qDebug() << "model size:" << data_.count();	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+int MvQOdbDataModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+	if (data_ != 0)
+		return data_->columnNum() + 1;
+	else
+		return 0;
+}
+
+int MvQOdbDataModel::rowCount( const QModelIndex& parent) const
+{
+	//Non-root
+	if(parent.isValid() )
+	{
+		return 0;
+	}
+	//Root
+
+	if (data_ != 0)
+	{
+		if(data_->chunkSize() == 0)
+		{
+			if(filtered())
+			{
+				return filter_.size(); 
+			}
+			else
+			{  
+				return data_->rowNum();
+			}	
+		}
+		else
+		{
+			return data_->nbRowsInChunk();
+		}
+	}		
+	else
+		return 0;	
+}
+
+QVariant MvQOdbDataModel::data( const QModelIndex& index, int role ) const
+{	
+  	if(role != Qt::DisplayRole)
+	{
+	  	return QVariant();
+	}
+	
+	if( !index.isValid() || index.column() < 0 || index.column() >= data_->columnNum()+1)
+	{
+	  	return QVariant();
+	}
+	
+	if(index.column() == 0)
+	{
+		if(data_->chunkSize() == 0)
+			return index.row()+1;
+		else
+			return data_->chunkSize()*data_->currentChunk()+index.row()+1;
+	}	
+
+	int dataColumn=index.column()-1;
+	if(dataColumn >=0 && dataColumn < columnOrder_.count())
+	{
+	  	dataColumn=columnOrder_[dataColumn];
+	}	
+
+
+	const MvOdbColumn *col=data_->loadColumn(dataColumn);		
+	if(!col || col->isLoaded() == false)
+		return QVariant();
+
+		
+	int dataRow=index.row();
+	if(filtered())
+	{
+	  	dataRow=filter_[dataRow];
+	}
+	
+	if(col->type() == MvOdbColumn::Int)
+	{
+		return col->intData().at(dataRow);
+	}
+	else if(col->type() == MvOdbColumn::Bitfield)
+	{
+	 	return static_cast<unsigned int>(col->floatData().at(dataRow)); 
+	}  
+	else if(col->type() == MvOdbColumn::Float)
+	{
+		return  col->floatData().at(dataRow);
+	}	
+	else if(col->type() == MvOdbColumn::String)
+	{
+		return  QString::fromStdString(col->stringData().at(dataRow));
+	}
+	else if(col->type() != MvOdbColumn::None)
+	{
+		return  QString::number(col->floatData().at(dataRow));
+	}
+	else
+	{
+		return QVariant();
+	}	  
+}
+
+QVariant MvQOdbDataModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || (role != Qt::DisplayRole && role != Qt::ToolTipRole) )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+ 	if(section < 0 || (data_ && section >= static_cast<int>(data_->columns().size())+1))
+		return QVariant();
+
+	if(section ==0)
+		return QString(tr("Row"));
+
+	
+	int dataColumn=section-1;
+	if(dataColumn >=0 && dataColumn < columnOrder_.count())
+	{
+	  	dataColumn=columnOrder_[dataColumn];
+	}	
+	
+	QString str=QString::fromStdString(data_->columns().at(dataColumn)->name());
+	
+	if(role == Qt::DisplayRole)
+		return str.split("@").first();
+	else if(role == Qt::ToolTipRole)
+	  	return str;
+	
+	return QString();
+}
+
+QModelIndex MvQOdbDataModel::index( int row, int column, const QModelIndex & /*parent*/ ) const
+{
+	if(data_ ==0 || data_->rowNum() <= 0 || column < 0)
+	{
+		return QModelIndex();
+	}
+	
+	return createIndex(row, column, 0); 
+}
+
+
+QModelIndex MvQOdbDataModel::parent( const QModelIndex & /*index */) const
+{			
+	return QModelIndex();
+}
+
+void MvQOdbDataModel::setFilter(const vector<int>& filter)
+{
+  	if(filter.size() == 0 && filter_.size() ==0)
+		return;
+	
+	if(!data_)
+		filter_=filter;  
+	
+	else if(data_->chunkSize() == 0 && data_->rowNum() >= static_cast<int>(filter.size()))
+	{								
+		beginResetModel(); 
+  		filter_=filter;
+		endResetModel();
+	}	  
+}	
+
+bool MvQOdbDataModel::filtered() const
+{
+  	return (data_ && data_->chunkSize() == 0 && filter_.size() > 0);
+}	
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQOdbModel.h b/src/libMvQtGui/MvQOdbModel.h
new file mode 100644
index 0000000..dd165ff
--- /dev/null
+++ b/src/libMvQtGui/MvQOdbModel.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOdbModel_H
+#define MvQOdbModel_H
+
+#include <QAbstractItemModel>
+#include <QMap>
+
+#include "MvQOdbMetaData.h" 
+
+class MvAbstractOdb;
+
+class MvQOdbVarModel : public QAbstractItemModel
+{
+
+public:
+   	MvQOdbVarModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void setData(QList<MvQOdbVar*>&);
+
+protected:
+	QString label(MvQOdbVar*,const int) const;
+
+private:
+	QList<MvQOdbVar*> data_;
+	
+};
+
+class MvQOdbColumnModel : public QAbstractItemModel
+{
+
+public:
+   	MvQOdbColumnModel(bool);
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void setData(const QList<MvQOdbColumn*>&,MvQOdbMetaData::OdbVersion);               
+
+protected:
+	QVariant label(MvQOdbColumn*,const int) const;
+	QString label(MvQOdbBitfieldMember*,const int) const;
+	int idToLevel(int) const;
+	int idToParentRow(int) const;
+
+private:
+	QMap<MvQOdbColumn::OdbColumnType,QString> typeMap_;
+	QList<MvQOdbColumn*> data_;
+	MvQOdbMetaData::OdbVersion odbVersion_;
+	bool showTableColumn_;
+	
+};
+
+
+class MvQOdbDataModel : public QAbstractItemModel
+{
+
+public:
+   	MvQOdbDataModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setData(MvAbstractOdb*);
+	void setFilter(const vector<int>&);
+	bool filtered() const;
+	
+private:	
+	MvAbstractOdb* data_;
+	vector<int> filter_;
+	QList<int> columnOrder_;
+	
+};
+
+#endif 
diff --git a/src/libMvQtGui/MvQPlainTextEditSearchLine.cc b/src/libMvQtGui/MvQPlainTextEditSearchLine.cc
new file mode 100644
index 0000000..c8ea31f
--- /dev/null
+++ b/src/libMvQtGui/MvQPlainTextEditSearchLine.cc
@@ -0,0 +1,105 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+
+#include "MvQPlainTextEditSearchLine.h"
+
+
+MvQPlainTextEditSearchLine::MvQPlainTextEditSearchLine(QPlainTextEdit *editor,QString searchLabelText) :
+	MvQAbstractSearchLine(searchLabelText), editor_(editor)
+{
+
+}
+
+MvQPlainTextEditSearchLine::~MvQPlainTextEditSearchLine()
+{
+
+}
+
+void MvQPlainTextEditSearchLine::slotFind(QString txt)
+{
+	QTextCursor cursor(editor_->textCursor());	
+	cursor.movePosition(QTextCursor::StartOfWord);
+	editor_->setTextCursor(cursor);
+	
+	if(editor_->find(txt)==false)
+	{
+      		cursor=editor_->textCursor();
+		cursor.movePosition(QTextCursor::Start);
+		editor_->setTextCursor(cursor);
+		updateButtons(editor_->find(txt));
+	}
+	else
+	{
+		updateButtons(true);
+	}
+
+	//QTextDocument::FindFlags flags;
+
+    /*if(checkBox_backward->checkState() == Qt::Checked)
+    {
+        flags = QTextDocument::FindBackward;
+    }
+    if(checkBox_case->checkState() == Qt::Checked) 
+    {
+        flags = flags | QTextDocument::FindCaseSensitively;
+    }
+    if(checkBox_word->checkState() == Qt::Checked)
+    {
+        flags = flags | QTextDocument::FindWholeWords;
+    }*/
+
+	/*if(editor_->find(txt))
+    	{
+        	//statusMessage("", 0);
+    	}
+    	else
+    	{
+        if (flags & QTextDocument::FindBackward)
+            statusMessage(tr("Reached top of file"),    5000);
+        else
+            statusMessage(tr("Reached bottom of file"), 5000);
+    }*/
+}
+
+void MvQPlainTextEditSearchLine::slotFindNext()
+{
+	if(status_==true)
+	{
+		if(editor_->find(searchLine_->text()) == false)
+		{
+      			QTextCursor cursor(editor_->textCursor());
+      			cursor.movePosition(QTextCursor::Start);
+			editor_->setTextCursor(cursor);
+			editor_->find(searchLine_->text());
+		}
+	}
+}
+
+void MvQPlainTextEditSearchLine::slotFindPrev()
+{
+	QTextDocument::FindFlags flags=QTextDocument::FindBackward;
+
+	if(status_==true)
+	{
+		if(editor_->find(searchLine_->text(),flags) == false)
+		{
+      			QTextCursor cursor(editor_->textCursor());
+      			cursor.movePosition(QTextCursor::End);
+			editor_->setTextCursor(cursor);
+			editor_->find(searchLine_->text(),flags);
+		}
+	}
+}
diff --git a/src/libMvQtGui/MvQPlainTextEditSearchLine.h b/src/libMvQtGui/MvQPlainTextEditSearchLine.h
new file mode 100644
index 0000000..a5c002b
--- /dev/null
+++ b/src/libMvQtGui/MvQPlainTextEditSearchLine.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef  MvQPlainTextEditSearchLine_H
+#define  MvQPlainTextEditSearchLine_H
+
+#include <QPlainTextEdit>
+
+#include "MvQAbstractSearchLine.h" 
+
+class  MvQPlainTextEditSearchLine : public MvQAbstractSearchLine
+{
+	Q_OBJECT
+
+public:
+	 MvQPlainTextEditSearchLine(QPlainTextEdit*,QString);
+	~ MvQPlainTextEditSearchLine(); 
+	
+public slots:
+	void slotFind(QString);
+	void slotFindNext();
+	void slotFindPrev();
+	void slotFindNext(bool) { slotFindNext();}
+	void slotFindPrev(bool) {slotFindPrev();}
+
+protected:
+	QPlainTextEdit* editor_;
+
+};
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQProfileView.cc b/src/libMvQtGui/MvQProfileView.cc
new file mode 100644
index 0000000..d0d4019
--- /dev/null
+++ b/src/libMvQtGui/MvQProfileView.cc
@@ -0,0 +1,1126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQProfileView.h"
+
+#include <QDebug>
+#include <QGraphicsRectItem>
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QMouseEvent>
+#include <QPainter>
+
+#include "MvProfileData.h"
+
+#include <math.h>
+
+//====================================
+//  MvQNodetem
+//====================================
+
+MvQNodeItem::MvQNodeItem(MvQProfileItem *prof,bool editable,float yPos) :
+  prof_(prof),
+  editable_(editable),
+  yPos_(yPos)
+{	
+  	setFlag(ItemSendsGeometryChanges);
+	setAcceptsHoverEvents(true);
+ 	setZValue(-1);
+	
+	if(editable_)   
+	{
+	  	idleBrush_=QBrush(QColor(Qt::red));
+		hoverBrush_=QBrush(QColor(255,205,205));
+		moveBrush_=hoverBrush_;
+		brush_=idleBrush_;
+		
+		idlePen_=QPen(Qt::NoPen);
+		hoverPen_=QPen(Qt::black);
+		movePen_=QPen(Qt::black);
+		pen_=idlePen_;		
+	}
+	else
+	{
+	  	idleBrush_=QBrush(QColor(Qt::blue));
+		hoverBrush_=QBrush(QColor(205,255,205));
+		moveBrush_=hoverBrush_;
+		brush_=idleBrush_;
+		
+		idlePen_=QPen(Qt::NoPen);
+		hoverPen_=QPen(Qt::black);
+		movePen_=QPen(Qt::black);
+		pen_=idlePen_;				
+	}
+	
+	idleSize_=6;
+	moveSize_=10;
+	hoverSize_=10;
+	size_=idleSize_;
+	 	
+}  
+
+MvQNodeItem::~MvQNodeItem()
+{
+}  
+
+void MvQNodeItem::addEdge(MvQEdgeItem *edge)
+{
+     	edges_ << edge;
+     	edge->adjust();
+}
+
+QRectF MvQNodeItem::boundingRect() const
+{
+	qreal adjust = 2;
+     	return QRectF(-size_/2. - adjust, -size_/2. - adjust,
+                   size_ + adjust, size_ + adjust);
+}
+
+void MvQNodeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/, QWidget *)
+{
+     painter->save();
+     
+     painter->setPen(pen_);
+     painter->setBrush(brush_);
+     painter->drawEllipse(-size_/2., -size_/2., size_, size_);
+     
+     painter->restore();
+}
+
+QVariant MvQNodeItem::itemChange(GraphicsItemChange change, const QVariant &value)
+ {
+     	switch(change) 
+     	{
+     	case ItemPositionHasChanged:
+       		foreach (MvQEdgeItem *edge, edges_)
+             		edge->adjust();  
+         	//prof_->nodeMoved(this);
+         	break;
+    	default:
+         	break;
+     	}
+
+     	return QGraphicsItem::itemChange(change, value);
+}
+
+void MvQNodeItem::mousePressEvent(QGraphicsSceneMouseEvent */*event*/)
+{
+     	if(editable_)
+	{  	
+	  	pen_=movePen_;
+		brush_=moveBrush_;
+		
+		prepareGeometryChange();
+		size_=moveSize_;
+	}
+	
+     	//QGraphicsItem::mousePressEvent(event);
+}
+
+void MvQNodeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent */*event*/)
+{	
+	if(editable_)
+	{  
+		prof_->nodeMoved(this);
+		pen_=idlePen_;
+		brush_=idleBrush_;
+		
+		prepareGeometryChange();
+		size_=idleSize_;
+	}	
+     	//QGraphicsItem::mouseReleaseEvent(event);
+}
+
+void MvQNodeItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+	if(editable_)
+	{  
+		//We keep the node on a fixed level!
+  		QPointF pp=mapToParent(event->pos());
+  		setPos(QPointF(pp.x(),yPos_));	
+  		pen_=movePen_;
+		brush_=moveBrush_;
+		update();
+	}	
+     	//QGraphicsItem::mouseMoveEvent(event);
+}
+
+void MvQNodeItem::hoverEnterEvent(QGraphicsSceneHoverEvent */*event*/)
+{
+	pen_=hoverPen_;
+	brush_=hoverBrush_;
+	
+	prepareGeometryChange();
+	size_=hoverSize_;	
+}
+
+void MvQNodeItem::hoverLeaveEvent(QGraphicsSceneHoverEvent */*event*/)
+{
+	pen_=idlePen_;
+	brush_=idleBrush_;
+	
+	prepareGeometryChange();
+	size_=idleSize_;
+}
+
+//====================================
+//  MvQEdgeItem
+//====================================
+
+MvQEdgeItem::MvQEdgeItem(MvQNodeItem* fromNode,MvQNodeItem* toNode) :
+  fromNode_(fromNode),
+  toNode_(toNode)
+{
+	if(fromNode->editable())   
+     	{	
+    		pen_=QPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
+	}
+	else
+	{
+	  	pen_=QPen(Qt::blue, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
+	}
+	
+        setAcceptedMouseButtons(0);
+	fromNode_->addEdge(this);
+        toNode_->addEdge(this);
+	adjust(); 
+}
+
+void MvQEdgeItem::adjust()
+{
+     if (!fromNode_ || ! toNode_)     
+         return;
+
+     QLineF line(mapFromItem(fromNode_, 0, 0), mapFromItem(toNode_, 0, 0));
+     
+     qreal length=line.length();
+
+     prepareGeometryChange();
+
+     fromPoint_ = toPoint_ = line.p1();
+     
+     if (length > qreal(6.)) 
+     {
+         fromPoint_ = line.p1();
+         toPoint_ = line.p2();
+     } 
+     else 
+     {
+         fromPoint_ = toPoint_ = line.p1();
+     }     
+}
+
+QRectF MvQEdgeItem::boundingRect() const
+{
+     if (!fromNode_ || ! toNode_)
+         return QRectF();
+     
+     qreal penWidth = 1;
+     qreal extra=penWidth;
+     
+     return QRectF(fromPoint_, QSizeF(toPoint_.x() - fromPoint_.x(),
+                                       toPoint_.y() - fromPoint_.y()))
+         .normalized()
+         .adjusted(-extra, -extra, extra, extra);
+}
+
+void MvQEdgeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *,QWidget*)
+{	
+	QLineF line(fromPoint_, toPoint_);
+    	if(qFuzzyCompare(line.length(), qreal(0.)))
+        	return;
+    
+     	painter->save();
+	painter->setPen(pen_);
+     	painter->drawLine(line);
+	painter->restore();
+}  
+
+
+//====================================
+//  MvQProfileItem
+//====================================
+
+MvQProfileItem::MvQProfileItem(MvQProfileView *view,MvProfileData *data,bool editable,int editRadius, 
+			        int firstIndex, int lastIndex, QSize size,
+			        bool setMinMax, float valMin, float valMax) :			      			      
+   view_(view),
+   data_(data), 
+   zeroLine_(false),
+   minXSize_(300),
+   minYSize_(500),
+   editable_(editable),
+   editRadius_(editRadius),
+   firstIndex_(firstIndex),
+   lastIndex_(lastIndex),
+   subPlot_(false),
+   presetMinMax_(setMinMax),
+   presetMin_(valMin),
+   presetMax_(valMax),
+   pen_(Qt::black),
+   gridPen_(QColor(200,200,200))
+{	  
+  	if(!data_)
+	{  
+	  	setEnabled(false);
+		return;
+	}
+  
+  	if(firstIndex_ < 0 || firstIndex_ >= data_->count())
+		firstIndex_=0;
+	
+	if(firstIndex_ >= lastIndex_ || lastIndex_ >= data_->count())
+  		lastIndex_=data_->count()-1;
+			
+  	initFrame(size);
+	adjustFrame();
+	
+	for(int i=0; i < data_->count(); i++)
+	{
+	  	float val=data_->value(i);
+		float yp=(i-firstIndex_)*yRatio_;
+		MvQNodeItem *node=new MvQNodeItem(this,editable,yp);
+		node->setParentItem(this);
+		node->setPos((val-frameXMin_)*xRatio_,yp);
+		if(editable)
+		{
+			node->setFlag(ItemIsMovable);
+		}
+	
+		nodes_ << node;
+	}
+	
+	for(int i=0; i < data_->count()-1; i++)
+	{
+	  	MvQEdgeItem *edge=new MvQEdgeItem(nodes_[i],nodes_[i+1]);
+		edge->setParentItem(this);
+		edges_ << edge;
+	} 
+	
+	
+	view->scene()->addItem(this);
+	
+	adjustData();
+	
+}
+
+MvQProfileItem::~MvQProfileItem()
+{
+	if(data_)
+	  	delete data_;
+}  
+
+void MvQProfileItem::setStep(int step) 
+{	  
+	step_=step;
+	
+	if(!isEnabled())
+	  	return;
+	
+	adjustFrame();
+	adjustData();
+	update();
+}
+
+void MvQProfileItem::adjustFrame()
+{
+	//Min max
+	float valMin, valMax;
+	
+	if(presetMinMax_)
+	{
+	  	valMin=presetMin_;
+		valMax=presetMax_;
+	}
+	else
+	{  
+		if(data_->isRangeSet())
+		{
+			valMin=data_->rangeMin();
+			valMax=data_->rangeMax();
+		}
+		else	
+			data_->valueRange(firstIndex_,lastIndex_,valMin,valMax);
+	}
+	
+	//Find a nice plot range
+	float valRange=valMax-valMin;
+	
+	if(valMin < 0 && valMax > 0)
+	{
+		zeroLine_=true;  	
+	}
+	
+	frameXMin_=0.;
+	frameXMax_=0.;
+	
+	QFont font;
+	QFontMetrics fm(font);
+	int twMax=fm.width(QString::number(valMax));
+	int twMin=fm.width(QString::number(valMin));
+	int textWidth=(twMin < twMax)?twMax:twMin;
+	
+	if(valRange > 0)
+	{
+	  	int digits=static_cast<int>(log10(valRange)); 
+		tickXStep_=pow(10.,digits);
+		if(valRange/tickXStep_ < 3)
+		{
+		  	tickXStep_=pow(10.,digits-1);
+		}	
+	}
+	else
+	{
+	  	tickXStep_=1;
+	}  	
+	
+	tickXLabelStep_=tickXStep_;
+	tickXLabelStepOffset_=0;
+	
+	frameXMin_=static_cast<int>((valMin-tickXStep_)/tickXStep_)*tickXStep_;
+	frameXMax_=static_cast<int>((valMax+tickXStep_)/tickXStep_)*tickXStep_;
+		  
+	xRatio_=frameRect_.width()/(frameXMax_-frameXMin_);
+	
+	//Adjustment
+	if(xRatio_*tickXStep_ < textWidth)
+	{
+	 	tickXLabelStep_*=2;
+		int labelFactor=static_cast<int>(round(frameXMin_/tickXStep_));
+		if(labelFactor % 2 != 0)		
+			tickXLabelStepOffset_=1;
+	}
+	
+	if(lastIndex_ != firstIndex_)
+		yRatio_=frameRect_.height()/static_cast<float>(lastIndex_-firstIndex_);
+	else
+	  	yRatio_=frameRect_.height();
+}	
+	
+	
+QRectF MvQProfileItem::boundingRect() const
+{
+	return bRect_;
+}
+
+void MvQProfileItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *,QWidget*)
+{	
+	painter->save();
+  
+  	painter->fillRect(bRect_,Qt::white);
+		
+	QFont font;
+	QFontMetrics fm(font);
+		
+	painter->setPen(pen_);
+	
+	//Title
+	if(!subPlot_)	
+	{
+	  	QRectF titleRect(frameRect_.width()/2.-150,frameRect_.top()-70,300,40);	
+		QString editableText=(editable_==true)?"Editable":"";
+		painter->drawText(titleRect,Qt::AlignCenter,
+			  "Parameter: " + QString::fromStdString(data_->name()) + 
+	                 " [" + QString::fromStdString(data_->units()) + "]\n" +
+	                 " Step: " + QString::fromStdString(data_->stepString()) + 
+	                  "\n" + editableText);
+	}
+	/*else
+	{
+	  	QRectF titleRect(frameRect_.width()/2.-150,frameRect_.top()-50,300,40);	
+		painter->drawText(titleRect,Qt::AlignCenter,
+			  "Parameter: " + QString::fromStdString(data_->name()) + 
+	                 " [" + QString::fromStdString(data_->units()) + "]");  
+	} */ 
+	
+	
+	//Render out of normal range 
+	if(data_->isRangeSet())
+	{
+		float valMin=data_->rangeMin();
+		float valMax=data_->rangeMax();
+	
+		if(frameXMin_ < valMin)
+		{			  
+			float xp=(valMin-frameXMin_)*xRatio_;			
+			painter->fillRect(0,frameRect_.top(),xp,frameRect_.bottom(),QBrush(QColor(255,0,0,50)));
+		}
+		if(frameXMax_ > valMax)
+		{
+		  	float xp=(valMax-frameXMin_)*xRatio_;
+			float xp1=(frameXMax_-frameXMin_)*xRatio_;
+			painter->fillRect(xp,frameRect_.top(),xp1-xp,frameRect_.bottom(),QBrush(QColor(255,0,0,50)));
+		}
+	}	
+	
+	//Dash pattern for the grid
+	//QVector<qreal> dashes;
+	//dashes << 1 << 8;
+	//gridPen.setDashPattern(dashes);
+	
+	//Lines
+	//X axis - top + bottom
+	for(float xv=frameXMin_; xv <= frameXMax_; xv+=tickXStep_)
+	{
+	  	float xp=(xv-frameXMin_)*xRatio_;
+	  	painter->drawLine(xp,frameRect_.top(),xp,frameRect_.top()-6.);
+		painter->drawLine(xp,frameRect_.bottom(),xp,frameRect_.bottom()+6.);
+		
+		//grid		
+		if(firstIndex_ != lastIndex_ && xv != frameXMin_ && xv != frameXMax_)
+		{  
+			painter->setPen(gridPen_);
+			painter->drawLine(xp,frameRect_.top(),xp,frameRect_.bottom());
+			painter->setPen(pen_);
+		}
+		
+		//text
+		//int xpText=xp-fm.width(QString::number(xv))/2;
+		//painter->drawText(QPointF(xpText,frameRect_.bottom()+10+fm.ascent()),QString::number(xv));
+		
+		//if(!subPlot_)
+		//	painter->drawText(QPointF(xpText,frameRect_.top()-10-fm.descent()),QString::number(xv));
+	}	
+	
+	//Text
+	//X axis - top + bottom
+	for(float xv=frameXMin_+tickXLabelStepOffset_*tickXStep_; xv <= frameXMax_; xv+=tickXLabelStep_)
+	{
+	  	float xp=(xv-frameXMin_)*xRatio_;
+	  
+		//text
+		int xpText=xp-fm.width(QString::number(xv))/2;
+		painter->drawText(QPointF(xpText,frameRect_.bottom()+10+fm.ascent()),QString::number(xv));
+		
+		if(!subPlot_)
+			painter->drawText(QPointF(xpText,frameRect_.top()-10-fm.descent()),QString::number(xv));
+	}	
+	
+	
+	float dy=frameRect_.height()/(1+lastIndex_-firstIndex_);
+	int stepY=10;
+	if(dy > 15) stepY=1;
+	else if(dy*2 > 15) stepY=2;
+	else if(dy*5 > 15) stepY=5;
+	else stepY=10;
+	
+	if(lastIndex_-firstIndex_+ 1 < 6)
+	 	stepY=1; 
+	
+	//Right axis
+	if(data_->auxLevelDefined())
+	{  
+		for(int i=lastIndex_; i >=firstIndex_; i-=stepY)
+		{
+			float xv=static_cast<float>(floor(data_->auxLevel(i)/100.));
+			
+	  		float xp=frameRect_.width();
+			float yp=frameRect_.top()+(i-firstIndex_)*yRatio_;
+			painter->drawLine(xp,yp,xp+6.,yp);
+		
+			//Label
+			int ypText=yp+fm.ascent()/2;
+			painter->drawText(QPointF(xp+10,ypText),QString::number(xv));	
+		}
+		
+		//Right axis title
+		painter->save();
+		painter->translate(frameRect_.width()+10+fm.width("1000")+10+fm.ascent(),frameRect_.center().y());
+		painter->rotate(-90);		
+		QString auxTitle=QString::fromStdString(data_->auxLevelName()) + " (" + QString::fromStdString(data_->auxLevelUnits()) + ")";
+			painter->drawText(-fm.width(auxTitle)/2,0,auxTitle);
+		
+		painter->restore();
+	}
+	
+	if(lastIndex_ != firstIndex_)
+	{
+		//Left axis
+		for(int i=lastIndex_; i >=firstIndex_; i-=stepY)
+		{
+			float xv=data_->level(i);
+	  		float xp=0;
+			float yp=frameRect_.top()+(i-firstIndex_)*yRatio_;
+			painter->drawLine(xp,yp,xp-6.,yp);
+		
+			//grid
+			painter->setPen(gridPen_);
+			painter->drawLine(xp,yp,xp+frameRect_.width(),yp);
+			painter->setPen(pen_);
+			
+			
+			int ypText=yp+fm.ascent()/2;
+			int xpText=xp-10-fm.width(QString::number(xv));
+			painter->drawText(QPointF(xpText,ypText),QString::number(xv));
+		}  
+	}
+	
+	//Left axis title
+	painter->save();
+	painter->translate(-10-fm.width("100")-10,frameRect_.center().y());
+	painter->rotate(-90);
+	QString levTitle;
+	if(!data_->levelUnits().empty())
+	{  
+		levTitle=QString::fromStdString(data_->levelName()) + " (" + QString::fromStdString(data_->levelUnits()) + ")";
+	}
+	else
+	{
+		levTitle=QString::fromStdString(data_->levelName());  
+	}  
+	painter->drawText(-fm.width(levTitle)/2,0,levTitle);
+	painter->restore();
+		
+	painter->setRenderHint(QPainter::Antialiasing,false);
+	
+	// Zero line
+	if(zeroLine_)
+	{
+		float xp=(0.-frameXMin_)*xRatio_;
+		painter->drawLine(xp,frameRect_.top(),xp,frameRect_.bottom());
+	}
+	
+	//Frame
+	
+	if(firstIndex_ != lastIndex_)
+		painter->drawRect(frameRect_);
+	else
+	  	painter->drawLine(0,frameRect_.top(),frameRect_.width(),frameRect_.top());
+	
+	
+	painter->restore();
+}
+	
+bool MvQProfileItem::updateValue(const MvProfileChange& ch)
+{	
+  	if(data_->acceptChange(ch))
+	{
+		int index=ch.level();
+	  	float val=data_->value(index);
+		nodes_.at(index)->setPos((val-frameXMin_)*xRatio_,frameRect_.top()+(index-firstIndex_)*yRatio_);  
+		return true;
+	}
+	return false;
+}
+
+void MvQProfileItem::reload()
+{
+	prepareGeometryChange();
+	adjustFrame();
+	adjustData();		
+	update();
+} 
+
+void MvQProfileItem::nodeMoved(MvQNodeItem *node)
+{
+	int index=nodes_.indexOf(node);
+	if(index != -1)
+	{
+	  	float val=data_->value(index);		
+		if(fabs((val-frameXMin_)*xRatio_-node->pos().x()) > 0.1)
+		{  	  
+	  		float f=frameXMin_+node->pos().x()/xRatio_;
+			//if(!data_->fitToRange(f))
+			//{
+			//	data_->setValue(index,f); 
+			//	nodes_.at(index)->setPos((f-frameXMin_)*xRatio_,(index-firstIndex_)*yRatio_); 
+			//}
+			//else
+			//{
+			  	data_->setValue(index,f);
+			//} 
+			
+			if(f < frameXMin_ || f > frameXMax_)
+			{
+			  	view_->adjustValueRange();
+			}	
+		}	
+	}
+}	
+
+void MvQProfileItem::initFrame(QSize size)
+{
+  	float w=size.width();
+	if(w < minXSize_) w=minXSize_;
+  
+        float h=size.height();
+	if(h < minYSize_) h=minYSize_;
+   	
+  	frameRect_=QRectF(0,0,w-150,h-120);
+	bRect_= frameRect_.adjusted(-60,-80,90,30);
+}	
+
+void MvQProfileItem::initFrame(QRectF r)
+{
+  	frameRect_=r;
+	if(subPlot_)	
+		bRect_= frameRect_.adjusted(-60,-30,90,30);
+	else
+	  	bRect_= frameRect_.adjusted(-60,-80,90,30);
+}	
+
+
+void MvQProfileItem::adjustData()
+{
+	if(data_)
+	{
+		for(int i=0; i < data_->count(); i++)
+		{
+	  		float val=data_->value(i);
+			float yp=frameRect_.top()+(i-firstIndex_)*yRatio_;
+			
+			if(i < firstIndex_)
+			{  
+			 	if(nodes_.at(i)->scene() != 0)
+				{
+			  		scene()->removeItem(nodes_.at(i));
+					nodes_.at(i)->setVisible(false);							
+					//qDebug() << "remove node" << i << nodes_.at(i)->scene();
+				}	
+				
+				if(i < edges_.count() && edges_.at(i)->scene())
+				{	
+				  	scene()->removeItem(edges_.at(i));
+					edges_.at(i)->setVisible(false);
+					//qDebug() << "  remove edge " << i << edges_.at(i)->scene(); 
+				}
+				
+				if(i > 0 && edges_.at(i-1)->scene())
+				{
+				  	scene()->removeItem(edges_.at(i-1)); 
+					edges_.at(i-1)->setVisible(false);
+					//qDebug() << "  remove edge " << i-1 << edges_.at(i-1)->scene(); 
+				}	
+				
+			}			
+			else if(i > lastIndex_)
+			{  
+			 	if(nodes_.at(i)->scene() != 0)
+				{
+			  		scene()->removeItem(nodes_.at(i));
+					nodes_.at(i)->setVisible(false);							
+					//qDebug() << "remove node" << i << nodes_.at(i)->scene();
+				}	
+				
+				if(i > 0 && edges_.at(i-1)->scene())
+				{
+				  	scene()->removeItem(edges_.at(i-1)); 
+					edges_.at(i-1)->setVisible(false);
+					//qDebug() << "  remove edge " << i-1 << edges_.at(i-1)->scene(); 
+				}	
+				
+				/*if(i < edges_.count() && edges_.at(i)->scene())
+				{	
+				  	scene()->removeItem(edges_.at(i));
+					edges_.at(i)->setVisible(false);
+					qDebug() << "  remove edge " << i << edges_.at(i)->scene(); 
+				}*/				
+			}			
+			else if(nodes_.at(i)->scene() == 0)
+			{				
+		  		//qDebug() << "add node" << i << nodes_.at(i)->scene();; 
+		  		
+		  		nodes_.at(i)->setParentItem(this);
+				nodes_.at(i)->setVisible(true);
+				
+				if(i < edges_.count() && !edges_.at(i)->scene() && nodes_.at(i+1)->scene() != 0)
+				{
+				  	edges_.at(i)->setParentItem(this);
+					edges_.at(i)->setVisible(true);
+					//qDebug() << "    add edge" << i << edges_.at(i)->scene();; 
+				}
+				
+				if(i > 1 && !edges_.at(i-1)->scene() && nodes_.at(i-1)->scene() != 0)
+				{
+				  	edges_.at(i-1)->setParentItem(this);
+					edges_.at(i-1)->setVisible(true);
+					//qDebug() << "    add edge" << i << edges_.at(i-1)->scene();; 
+				}
+				
+			}	
+		  			  	
+			nodes_.at(i)->setPos((val-frameXMin_)*xRatio_,yp);
+			nodes_.at(i)->setYPos(yp);	
+		}
+	}	
+}	
+		
+void MvQProfileItem::adjustSize(QSize size)
+{
+	prepareGeometryChange();
+	
+	initFrame(size);	
+	adjustFrame();
+	adjustData();
+}  
+
+void MvQProfileItem::adjustSize(QRectF r)
+{
+	prepareGeometryChange();
+	
+	initFrame(r);	
+	adjustFrame();
+	adjustData();
+}  
+
+
+void MvQProfileItem::setLevelRange(int firstIndex,int lastIndex)
+{
+	firstIndex_=firstIndex;
+	lastIndex_=lastIndex;
+  
+  	if(firstIndex_ < 0 || firstIndex_ >= data_->count())
+		firstIndex_=0;
+	
+	if(firstIndex_ >= lastIndex_ || lastIndex_ >= data_->count())
+  		lastIndex_=data_->count()-1;
+  
+	prepareGeometryChange();
+	adjustFrame();
+	adjustData();		
+	update();
+}  
+
+
+void MvQProfileItem::setLevelRange(int firstIndex,int lastIndex, float valMin, float valMax)
+{
+	if(presetMinMax_)
+	{
+	  	presetMin_=valMin;
+		presetMax_=valMax;
+	}	
+  
+  	setLevelRange(firstIndex,lastIndex);
+}  
+
+
+void MvQProfileItem::setValueRange(float valMin, float valMax)
+{
+	if(presetMinMax_)
+	{
+	  	presetMin_=valMin;
+		presetMax_=valMax;
+		
+		prepareGeometryChange();
+		adjustFrame();
+		adjustData();		
+		update();
+	}
+} 
+
+void MvQProfileItem::setEditRadius(int rad)
+{
+	editRadius_=rad;
+}  
+
+void MvQProfileItem::valueRange(int firstIndex,int lastIndex,float &valMin,float &valMax)
+{  	
+	if(data_->isRangeSet())
+	{
+		valMin=data_->rangeMin();
+		valMax=data_->rangeMax();
+	}
+	else	
+	{		  
+		data_->valueRange(firstIndex,lastIndex,valMin,valMax);
+	}
+}	
+	
+	
+void MvQProfileItem::valueRange(float &valMin,float &valMax)
+{  	
+	if(data_->isRangeSet())
+	{
+		valMin=data_->rangeMin();
+		valMax=data_->rangeMax();
+	}
+	else	
+	{		  
+		data_->valueRange(valMin,valMax);
+	}
+}
+
+bool MvQProfileItem::cursorData(QPointF scenePos,QString &txt)
+{
+	QPointF pos=mapFromScene(scenePos);
+	
+	float xv=frameXMin_+pos.x()/xRatio_;
+	float yv=(pos.y()-frameRect_.top())/yRatio_+firstIndex_+1.5;
+	
+	if(xv >= frameXMin_ && xv <= frameXMax_ &&
+	   yv >= firstIndex_ && yv <=lastIndex_+1.5)
+	{
+	  	txt=" <b>Level:</b> " + QString::number(static_cast<int>(yv)) +"  <b>Value:</b> " +  QString::number(xv);
+		
+	  	int lev=static_cast<int>(yv)-1;
+		if(lev >=0 && lev < data_->count())
+		{
+	  		float rv=data_->value(lev);
+			float rp=(rv-frameXMin_)*xRatio_;
+			if(fabs(rp-pos.x()) < 10)
+			{			 		 
+			  	if(editable_)  
+			  		txt+=" <b>Data value:</b> <font color=#ff0000>" + QString::number(rv) + "</font>";
+				else
+				  	txt+=" <b>Data value:</b> <font color=#0000ff>" + QString::number(rv) + "</font>";
+ 			}
+		}	
+		
+		return true;
+	}
+	
+	return false;
+}	
+
+//==============================================
+// MvQProfileView
+//==============================================
+
+MvQProfileView::MvQProfileView(QWidget *parent) : 
+    QGraphicsView(parent)
+{
+	setRenderHints(QPainter::Antialiasing);
+	setBackgroundBrush(QColor(125,124,123));
+	setAlignment(Qt::AlignCenter); 
+	
+	scene_=new QGraphicsScene(this);
+	setScene(scene_);
+}
+
+void MvQProfileView::setProfile(QList<MvProfileData*> profData, bool editable,int startIndex,int endIndex)
+{
+	QList<MvQProfileItem*> itemsToBeDeleted;
+  
+  	foreach(MvQProfileItem *item,prof_)
+	{
+	  	scene_->removeItem(item);
+		itemsToBeDeleted << item;
+	}	
+    	prof_.clear();
+    	//profWeight_.clear();
+    	
+  	QSize size=maximumViewportSize();	
+	size-=QSize(10,10);
+
+	///Min max
+	bool setMinMax=false;
+	float valMin=999999, valMax=-9999999;
+	if(profData.count() > 1)
+	{
+		setMinMax=true;
+		for(int i=0; i < profData.count(); i++)
+		{  
+			if(profData[i]->isRangeSet())
+			{
+				valMin=profData[i]->rangeMin();
+				valMax=profData[i]->rangeMax();
+				break;
+			}
+			else	
+			{
+		  		float vmin, vmax;
+		  		profData[i]->valueRange(0,profData[i]->count()-1,vmin,vmax);
+				if(vmin < valMin) valMin=vmin;
+				if(vmax > valMax) valMax=vmax;
+			}
+		}	
+	}	
+	
+	//Create plot items
+	if(profData.count() > 0)
+	{
+	  	prof_ << new MvQProfileItem(this,profData[0],editable,0,startIndex,endIndex,size,
+					    setMinMax,valMin,valMax); 
+					    
+		for(int i=1; i < profData.count(); i++)
+		{	
+			prof_ << new MvQProfileItem(this,profData[i],editable,0,0,profData[i]->count()-1,size,
+						    setMinMax,valMin,valMax);
+			prof_.back()->setSubPlot(true);
+		}
+	}
+
+	adjustSize();
+	
+	foreach(MvQProfileItem *item,itemsToBeDeleted)
+	{
+	  	delete item;
+	}	
+}	
+
+void MvQProfileView::update(const MvProfileChange& item)
+{
+  	foreach(MvQProfileItem *p, prof_)
+	{
+	  	if(p && p->updateValue(item))
+			  return;
+	}	
+}	
+
+void MvQProfileView::reload()
+{
+	foreach(MvQProfileItem *item, prof_)
+	{
+	  	if(item)
+	  		item->reload();
+	}	
+}
+
+void MvQProfileView::mouseMoveEvent(QMouseEvent *event)
+{		
+  	QGraphicsView::mouseMoveEvent(event);	
+	
+	QString txt=tr(" Cursor out of plot!");
+	
+	foreach(MvQProfileItem *p, prof_)
+		if(p->cursorData(mapToScene(event->pos()),txt))
+			break;
+		
+	emit cursorData(txt);
+}
+
+void MvQProfileView::resizeEvent(QResizeEvent *event)
+{
+	QGraphicsView::resizeEvent(event);
+	adjustSize();
+}
+
+void MvQProfileView::adjustSize()
+{
+	QSize size=maximumViewportSize();
+	size-=QSize(10,10);
+
+	//Needs to be improved
+	if(prof_.count() > 1)
+	{
+		int h=0;
+	  	for(int i=1; i < prof_.count(); i++)
+		{
+	  		if(prof_[i]->levelNum() == 1)
+			{
+				h+=60+0;
+			}
+			else if(prof_[i]->levelNum() < 6)
+			{
+			  	h+=60+60;
+			}
+			else
+				h+=60+100;
+		}	
+		  
+	  	QSize firstSize(size.width(),size.height()-h);
+		prof_[0]->adjustSize(firstSize);
+	
+		QRectF r=prof_[0]->frameRect();
+		for(int i=1; i < prof_.count(); i++)
+		{
+			if(prof_[i]->levelNum() == 1)
+			{
+			  	r=QRectF(0,r.bottom()+60,r.width(),0);
+			}
+			else if(prof_[i]->levelNum() < 6)
+			{
+				r=QRectF(0,r.bottom()+60,r.width(),60);
+			}
+			else if(prof_[i]->levelNum() < 6)
+			{
+				r=QRectF(0,r.bottom()+60,r.width(),100);
+			}
+			prof_[i]->adjustSize(r);	
+		}
+	}
+	else if(prof_.count() > 0 && prof_[0])
+	{
+	  	prof_[0]->adjustSize(size);
+	}	
+	
+	//Set the scenerect
+	if(prof_.count() > 0)
+	{
+		QRectF bb=prof_[0]->boundingRect();
+		for(int i=1; i < prof_.count(); i++)
+		{
+			bb=bb.united(prof_[i]->boundingRect());
+		}
+		scene_->setSceneRect(bb);
+	}			  	  
+}
+
+void MvQProfileView::adjustValueRange()
+{
+	if(prof_.count() > 0 && prof_[0])
+  	{ 
+		float valMin=999999, valMax=-9999999;
+		for(int i=0; i < prof_.count(); i++)
+		{
+			float vmin,vmax;
+			if(i==0)
+				  prof_[i]->valueRange(prof_[i]->firstIndex(),prof_[i]->lastIndex(),vmin,vmax);
+			else
+				  prof_[i]->valueRange(vmin,vmax);
+				  				 
+	  		if(vmin < valMin) valMin=vmin;
+			if(vmax > valMax) valMax=vmax;
+		}
+	
+		if(prof_.count() ==1)
+		{
+		  	prof_[0]->reload();
+		}
+		else
+		{  
+			for(int i=0; i < prof_.count(); i++)
+			{
+				  prof_[i]->setValueRange(valMin,valMax);
+			}	
+		}	
+	}		
+}
+
+void MvQProfileView::setLevelRange(int startIndex,int endIndex)
+{
+	if(prof_.count() > 0 && prof_[0])
+  	{ 
+		if(prof_.count() > 1)
+		{
+			 float valMin=999999, valMax=-9999999;
+			 for(int i=0; i < prof_.count(); i++)
+			 {
+			 	float vmin,vmax;
+				if(i==0)
+				  	prof_[i]->valueRange(startIndex, endIndex,vmin,vmax);
+				else
+				  	prof_[i]->valueRange(vmin,vmax);
+				  
+				 
+	  			if(vmin < valMin) valMin=vmin;
+				if(vmax > valMax) valMax=vmax;
+			 }
+			 
+			 prof_[0]->setLevelRange(startIndex,endIndex,valMin,valMax);
+			 for(int i=1; i < prof_.count(); i++)
+			 {
+			   	prof_[i]->setValueRange(valMin,valMax);
+			 }	
+		}
+		else
+		{  
+	  		prof_[0]->setLevelRange(startIndex,endIndex);
+		}	
+	}	
+}
+
+void MvQProfileView::setEditRadius(int rad)
+{
+  	foreach(MvQProfileItem *item, prof_)
+	{
+	  	if(item)
+	  		item->setEditRadius(rad);
+	}	
+}
diff --git a/src/libMvQtGui/MvQProfileView.h b/src/libMvQtGui/MvQProfileView.h
new file mode 100644
index 0000000..fb526e2
--- /dev/null
+++ b/src/libMvQtGui/MvQProfileView.h
@@ -0,0 +1,184 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQProfileView_H
+#define MvQProfileView_H
+
+#include <QGraphicsItem>
+#include <QGraphicsView>
+
+class QGraphicsScene;
+
+class MvQEdgeItem;
+class MvQProfileItem;
+class MvQProfileView;
+
+class MvProfileData;
+class MvProfileChange;
+
+class MvQNodeItem : public QGraphicsItem
+{
+public:
+	MvQNodeItem(MvQProfileItem*,bool,float);
+	~MvQNodeItem();
+	
+     	void addEdge(MvQEdgeItem*);
+     	QRectF boundingRect() const;
+     	void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+	void setYPos(float y) {yPos_=y;}
+	bool editable() const {return editable_;}
+
+protected:
+     	QVariant itemChange(GraphicsItemChange, const QVariant &);
+     	void mousePressEvent(QGraphicsSceneMouseEvent *);
+     	void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
+        void mouseMoveEvent(QGraphicsSceneMouseEvent *); 
+	void hoverEnterEvent(QGraphicsSceneHoverEvent *);
+	void hoverLeaveEvent(QGraphicsSceneHoverEvent *);
+	
+private:
+     	MvQProfileItem* prof_;
+	bool editable_;
+	float yPos_;
+     	QList<MvQEdgeItem *> edges_;
+	
+	QBrush brush_;
+	QBrush idleBrush_; 
+	QBrush hoverBrush_;
+	QBrush moveBrush_;
+	
+	QPen pen_;
+	QPen idlePen_; 
+	QPen hoverPen_;
+	QPen movePen_;	
+	
+	int size_;
+	int idleSize_;
+	int moveSize_;
+	int hoverSize_;
+};
+
+class MvQEdgeItem : public QGraphicsItem
+{
+public:
+	MvQEdgeItem(MvQNodeItem*,MvQNodeItem*);
+
+     	void adjust();
+     	QRectF boundingRect() const;
+     	void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+private:
+     	MvQNodeItem* fromNode_;
+	MvQNodeItem* toNode_;
+	QPointF fromPoint_;
+	QPointF toPoint_;
+	QPen pen_;
+};
+
+class MvQProfileItem : public QGraphicsItem
+{
+friend class MvQNodeItem;
+  
+public:
+	MvQProfileItem(MvQProfileView*,MvProfileData*,bool,int,int,int,QSize,bool,float,float);
+	~MvQProfileItem();
+	
+    	QRectF boundingRect() const;
+	void paint(QPainter *, const QStyleOptionGraphicsItem*,
+                QWidget *widget=0);
+		
+	bool updateValue(const MvProfileChange&);
+	void setStep(int); 
+	void adjustSize(QSize);
+	void adjustSize(QRectF);
+	void setLevelRange(int,int);
+	void setLevelRange(int,int,float,float);
+	void setValueRange(float,float);
+	void valueRange(int,int,float&,float&);
+	void valueRange(float&,float&);
+	void setEditRadius(int);
+	void reload();
+	QRectF frameRect() const {return frameRect_;}
+	void setSubPlot(bool b) {subPlot_=b;}
+	int levelNum() { return lastIndex_-firstIndex_+1;}
+	bool cursorData(QPointF,QString&);
+	int firstIndex() const {return firstIndex_;}
+	int lastIndex() const {return lastIndex_;}
+	
+protected:	
+	void initFrame(QSize);
+	void initFrame(QRectF);
+        void adjustFrame();
+	void adjustData();
+	void nodeMoved(MvQNodeItem*);
+  
+	MvQProfileView* view_;
+	MvProfileData* data_;
+
+	QRectF frameRect_;
+	QRectF bRect_;
+
+	float xRatio_;
+	float yRatio_;
+	float frameXMin_;
+	float frameXMax_;
+	float tickXStep_;
+	float tickXLabelStep_;
+	int tickXLabelStepOffset_;
+	int step_;
+	bool zeroLine_;
+	QList<MvQNodeItem*> nodes_;
+	QList<MvQEdgeItem*> edges_;
+	
+	int minXSize_;
+	int minYSize_;
+	bool editable_;
+	int editRadius_;
+	int firstIndex_;
+	int lastIndex_;
+	bool subPlot_;
+	bool presetMinMax_;
+	float presetMin_;
+	float presetMax_;
+	QPen pen_;
+	QPen gridPen_;
+       
+};
+
+class MvQProfileView : public QGraphicsView
+{
+friend class MvQProfileItem;
+
+Q_OBJECT
+
+public:
+	MvQProfileView(QWidget *parent=0);
+	
+	void setProfile(QList<MvProfileData*>,bool,int,int);
+	void update(const MvProfileChange&);
+	void reload();
+	void setLevelRange(int,int);
+	void setEditRadius(int);
+
+signals:
+    	void cursorData(QString);
+	
+protected:
+        void resizeEvent(QResizeEvent *);
+	void adjustSize();
+	void adjustValueRange();
+	void mouseMoveEvent(QMouseEvent*);
+       
+    	QGraphicsScene* scene_;
+	QList<MvQProfileItem*> prof_;
+	
+};
+
+
+#endif
diff --git a/src/libMvQtGui/MvQProfileWidget.cc b/src/libMvQtGui/MvQProfileWidget.cc
new file mode 100644
index 0000000..a3524b9
--- /dev/null
+++ b/src/libMvQtGui/MvQProfileWidget.cc
@@ -0,0 +1,136 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QHBoxLayout>  
+#include <QLabel>
+#include <QSpinBox>
+#include <QVBoxLayout>
+
+#include "MvQProfileWidget.h"
+#include "MvQProfileView.h"
+#include "MvQRangeWidget.h"
+
+#include "MvProfileData.h"
+
+MvQProfileWidget::MvQProfileWidget(QWidget *parent) : 
+         QWidget(parent),
+         startLevelIndex_(-1),
+         endLevelIndex_(-1),
+         editRadius_(0)     
+{
+	QHBoxLayout* mainHb=new QHBoxLayout(this);
+	mainHb->setContentsMargins(0,0,0,1);
+	mainHb->setSpacing(1);
+	
+	
+	QVBoxLayout *profLayout=new QVBoxLayout;
+	mainHb->addLayout(profLayout,1);
+		
+	profileLabel_=new QLabel;
+	profileLabel_->setAutoFillBackground(true);
+	profileLabel_->setObjectName(QString::fromUtf8("fileInfoLabel"));
+	profileLabel_->setMargin(2);
+	profLayout->addWidget(profileLabel_);	
+	
+	profileView_=new MvQProfileView(this);
+	profLayout->addWidget(profileView_);
+	
+	connect(profileView_,SIGNAL(cursorData(QString)),
+		profileLabel_,SLOT(setText(QString)));
+	
+	/*QHBoxLayout* levHb=new QHBoxLayout;
+	profLayout->addLayout(levHb);
+	
+	QLabel *label;	
+	label=new QLabel(tr("Edit radius:"));
+	levHb->addWidget(label);
+	editRadiusSpin_=new QSpinBox(this);
+        editRadiusSpin_->setSuffix(" level");
+	levHb->addWidget(editRadiusSpin_);
+	
+	//Edit radius spinbox
+	editRadiusSpin_->setRange(1,5);
+	editRadiusSpin_->setValue(3);	
+		
+	connect(editRadiusSpin_,SIGNAL(valueChanged(int)),
+		this, SLOT(slotEditRadius(int)));	
+	
+	//Range widget
+	levHb->addStretch(1);*/
+		
+	rangeWidget_=new MvQRangeWidget(this);
+	mainHb->addWidget(rangeWidget_);
+		
+	connect(rangeWidget_,SIGNAL(valueChanged(int,int)),
+		this, SLOT(slotLevelRange(int,int)));	
+}
+ 
+MvQProfileWidget::~MvQProfileWidget()
+{
+}
+
+void MvQProfileWidget::setProfile(QList<MvProfileData*> profData, bool editable)
+{	
+  	profileView_->setProfile(profData,editable,startLevelIndex_,endLevelIndex_);					
+	
+	vector<float> levels;
+	profData[0]->levels(levels);
+	rangeWidget_->reset(QVector<float>::fromStdVector(levels));
+}	
+
+void MvQProfileWidget::update(const MvProfileChange& item)
+{
+  	profileView_->update(item);
+}	
+
+void MvQProfileWidget::reload()
+{
+	 profileView_->reload();
+}
+
+void MvQProfileWidget::slotLevelRange(int startIndex,int endIndex)
+{
+ 	startLevelIndex_=startIndex;
+	endLevelIndex_=endIndex;
+	profileView_->setLevelRange(startIndex,endIndex);	
+}
+
+void MvQProfileWidget::slotEditRadius(int rad)
+{
+ 	editRadius_=rad; 
+	profileView_->setEditRadius(rad);	
+}
+
+void MvQProfileWidget::writeSettings(QSettings &settings)
+{
+	settings.beginGroup("profile");
+	settings.setValue("startLevelIndex",startLevelIndex_);
+	settings.setValue("endLevelIndex",endLevelIndex_);
+	settings.setValue("editRadius",editRadius_);
+	settings.endGroup();
+}
+
+void MvQProfileWidget::readSettings(QSettings &settings)
+{
+	settings.beginGroup("profile");
+
+	if(!settings.value("startLevelIndex").isNull() && !settings.value("endLevelIndex").isNull())
+	{
+	  	int sv=settings.value("startLevelIndex").toInt();
+	  	int ev=settings.value("endLevelIndex").toInt();
+		rangeWidget_->setRange(sv,ev);		
+		slotLevelRange(sv,ev);					
+	}	
+					  
+	if(!settings.value("editRadius").isNull())
+		slotEditRadius(settings.value("editRadius").toInt()); 
+	
+	settings.endGroup();
+}
diff --git a/src/libMvQtGui/MvQProfileWidget.h b/src/libMvQtGui/MvQProfileWidget.h
new file mode 100644
index 0000000..024eeff
--- /dev/null
+++ b/src/libMvQtGui/MvQProfileWidget.h
@@ -0,0 +1,56 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQProfileWidget_H
+#define MvQProfileWidget_H
+
+#include <QSettings>
+#include <QWidget>
+
+class QLabel;
+class QSpinBox;
+
+class MvProfileData;
+class MvProfileChange;
+
+class MvQProfileView;
+class MvQRangeWidget;
+
+using namespace std;
+
+class MvQProfileWidget : public QWidget
+{
+    Q_OBJECT
+
+public:
+    MvQProfileWidget(QWidget *parent = 0);
+	~MvQProfileWidget();
+	
+	void setProfile(QList<MvProfileData*>,bool);
+	void update(const MvProfileChange&);
+	void reload();
+	void readSettings(QSettings&);
+	void writeSettings(QSettings&);
+
+public slots:
+	void slotLevelRange(int,int);
+	void slotEditRadius(int);
+
+protected:
+  	QLabel* profileLabel_;
+	MvQProfileView *profileView_;
+	QSpinBox* editRadiusSpin_;
+	MvQRangeWidget *rangeWidget_;
+	
+	int startLevelIndex_;
+	int endLevelIndex_;
+	int editRadius_;
+ };
+
+#endif
diff --git a/src/libMvQtGui/MvQRangeWidget.cc b/src/libMvQtGui/MvQRangeWidget.cc
new file mode 100644
index 0000000..d0050d9
--- /dev/null
+++ b/src/libMvQtGui/MvQRangeWidget.cc
@@ -0,0 +1,444 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQRangeWidget.h"
+
+#include <QCursor>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QPushButton>
+#include <QSpinBox>
+#include <QVBoxLayout>
+
+MvQRangeWidget::MvQRangeWidget(QWidget *parent) : 
+   QWidget(parent),
+   rangeStartIndex_(-1),
+   rangeEndIndex_(-1),
+   ignoreSpinChange_(false)
+{	
+	QVBoxLayout *layout=new QVBoxLayout(this);
+	
+	QPushButton *allPb=new QPushButton(tr("Whole range"),this);
+	layout->addWidget(allPb);
+	
+	connect(allPb,SIGNAL(clicked(bool)),
+		this,SLOT(slotSelectWholeRange(bool)));
+	
+	
+	QHBoxLayout* minHb=new QHBoxLayout;
+	layout->addLayout(minHb);
+	
+	QLabel *label=new QLabel(tr("Top:"));
+	minHb->addWidget(label);
+	startSpin_=new QSpinBox(this);
+	minHb->addWidget(startSpin_);
+	
+	plot_=new MvQRangePlotWidget(this);
+	layout->addWidget(plot_,1);
+		
+	QHBoxLayout* maxHb=new QHBoxLayout;
+	layout->addLayout(maxHb);
+	
+	label=new QLabel(tr("Bottom:"));
+	maxHb->addWidget(label);
+	endSpin_=new QSpinBox(this);
+	maxHb->addWidget(endSpin_);
+		
+	connect(startSpin_,SIGNAL(valueChanged(int)),
+		this,SLOT(slotStartSpin(int)));
+		
+	connect(endSpin_,SIGNAL(valueChanged(int)),
+		this,SLOT(slotEndSpin(int)));
+}
+
+void MvQRangeWidget::setRange(int start, int end)
+{
+	rangeStartIndex_=start;
+	rangeEndIndex_=end; 
+	
+	if(values_.count() >0)
+	{
+		updateSpins();
+		plot_->update();
+	}
+	
+	emit valueChanged(rangeStartIndex_,rangeEndIndex_);		
+}  
+
+void MvQRangeWidget::reset(QVector<float> d)
+{
+  	if(values_.count() == d.count())
+	{
+	  	return; //!!!
+	}	
+
+  	values_=d;
+	if(rangeStartIndex_==-1)
+	{
+		rangeStartIndex_=0;
+		rangeEndIndex_=values_.count()-1;
+	}	
+	
+	ignoreSpinChange_=true;
+	startSpin_->setRange(1,values_.count());
+	endSpin_->setRange(1,values_.count());	
+	ignoreSpinChange_=false;
+	
+	updateSpins();
+	
+	plot_->update();
+	
+	emit valueChanged(rangeStartIndex_,rangeEndIndex_);	
+}
+
+float MvQRangeWidget::startValue()
+{
+  	return (values_.count() >0)?values_.at(0):0.;
+}	
+
+float MvQRangeWidget::endValue()
+{
+  	return (values_.count() >0)?values_.at(values_.count()-1):0.;
+}	
+
+float MvQRangeWidget::value(int i)
+{
+  	return (i >=0 && i < values_.count())?values_.at(i):0.;
+}	
+
+void MvQRangeWidget::adjustRange(int startV,int endV,float deltaPercent)
+{
+	if(values_.count() < 2)
+		return;
+			
+	int delta=deltaPercent*static_cast<float>(values_.count()-1);
+	if(startV+delta < 0 || endV+delta > values_.count()-1)
+		return;
+	else
+	{  	  
+		rangeStartIndex_=startV+delta;
+		rangeEndIndex_=endV+delta;
+		updateSpins();
+		emit valueChanged(rangeStartIndex_,rangeEndIndex_);
+	}	
+}  
+
+void MvQRangeWidget::adjustRangeStart(int startV,float deltaPercent)
+{
+	if(values_.count() < 2)
+		return;
+			
+	int delta=deltaPercent*static_cast<float>(values_.count()-1);
+	if(startV+delta < 0 || startV+delta > rangeEndIndex_-5)
+		return;
+	else
+	{  	  
+		rangeStartIndex_=startV+delta;
+		updateSpins();
+		emit valueChanged(rangeStartIndex_,rangeEndIndex_);
+	}	
+}  
+
+void MvQRangeWidget::adjustRangeEnd(int endV,float deltaPercent)
+{
+	if(values_.count() < 2)
+		return;
+			
+	int delta=deltaPercent*static_cast<float>(values_.count()-1);
+	if(endV+delta > values_.count()-1  || endV+delta < rangeStartIndex_+5)
+		return;
+	else
+	{  	  
+		rangeEndIndex_=endV+delta;		
+		updateSpins();
+		emit valueChanged(rangeStartIndex_,rangeEndIndex_);
+	}	
+}  
+
+float MvQRangeWidget::rangeStartPercent() const	
+{
+  	if(values_.count() > 2)
+	  	return static_cast<float>(rangeStartIndex_)/static_cast<float>(values_.count()-1);
+	else
+	  	return 0;
+}
+
+float MvQRangeWidget::rangeEndPercent() const
+{
+  	if(values_.count() > 2)
+	  	return static_cast<float>(rangeEndIndex_)/static_cast<float>(values_.count()-1);
+	else
+	  	return 0;
+}
+
+float MvQRangeWidget::indexPercent(int index) const
+{ 
+  	if(values_.count() > 2 && index >= 0 && index <= values_.count())
+	  	return static_cast<float>(index)/static_cast<float>(values_.count()-1);
+	else
+	  	return 0;
+}
+
+int MvQRangeWidget::valueCount()
+{
+  	return values_.count();
+}
+
+void MvQRangeWidget::updateSpins()
+{
+ 	ignoreSpinChange_=true;
+	startSpin_->setValue(rangeStartIndex_+1);
+	endSpin_->setValue(rangeEndIndex_+1);
+	ignoreSpinChange_=false;
+}  
+
+
+void MvQRangeWidget::slotStartSpin(int value)
+{
+	if(ignoreSpinChange_)
+	  	return;
+
+	rangeStartIndex_=value-1;
+	plot_->update();
+	emit valueChanged(rangeStartIndex_,rangeEndIndex_);	
+}	
+
+void MvQRangeWidget::slotEndSpin(int value)
+{
+	if(ignoreSpinChange_)
+	  	return;
+
+	rangeEndIndex_=value-1;
+	plot_->update();
+	emit valueChanged(rangeStartIndex_,rangeEndIndex_);	
+}
+
+void MvQRangeWidget::slotSelectWholeRange(bool)
+{ 
+  	setRange(0,values_.count()-1);
+}  
+
+//====================================
+//   
+// MvQRangePlotWidget
+//
+//====================================
+
+MvQRangePlotWidget::MvQRangePlotWidget(MvQRangeWidget* parent) : 
+  QWidget(parent), 
+  parent_(parent),
+  action_(NoAction),
+  hover_(NoHover),
+  offset_(15),
+  dragRadius_(10)
+{
+	setMouseTracking(true);
+}
+
+QRect MvQRangePlotWidget::rangeRect()
+{
+	float h=static_cast<float>(rect().height())-2*offset_;
+	float w=static_cast<float>(rect().width());
+	return QRect(5,offset_+parent_->rangeStartPercent()*h,w-10,(parent_->rangeEndPercent()-parent_->rangeStartPercent())*h);
+}
+
+QPolygon MvQRangePlotWidget::minDragShape()
+{
+	QRect r=rangeRect();
+	QPolygon p;
+	p << QPoint(r.x(),r.y()+dragRadius_) << 
+	     QPoint(r.topRight().x(),r.y()+dragRadius_) << 
+	     QPoint(r.topRight().x(),r.y()-dragRadius_/2) << 
+	     QPoint(r.center().x(),r.y()-1.5*dragRadius_) << 
+	     QPoint(r.x(),r.y()-dragRadius_/2); 
+		
+	return p;
+}
+
+QPolygon MvQRangePlotWidget::maxDragShape()
+{
+	QRect r=rangeRect();
+	QPolygon p;
+	p << QPoint(r.x(),r.bottomLeft().y()-dragRadius_) << 
+	     QPoint(r.bottomRight().x(),r.bottomLeft().y()-dragRadius_) << 
+	     QPoint(r.bottomRight().x(),r.bottomLeft().y()+dragRadius_/2) << 
+	     QPoint(r.center().x(),r.bottomLeft().y()+1.5*dragRadius_) << 
+	     QPoint(r.x(),r.bottomLeft().y()+dragRadius_/2); 
+	     
+	return p;     
+}
+
+void MvQRangePlotWidget::paintEvent(QPaintEvent* /*event*/)
+{
+	QPainter painter(this);
+	
+	//bg
+	painter.fillRect(rect(),Qt::white);
+  	
+	//axis	
+	QRect r=rect().adjusted(0,offset_,0,-offset_);
+		
+	int xp=r.center().x();
+	int tickWidth=12;
+	QFont font;
+	QFontMetrics fm(font);
+	
+	painter.setPen(Qt::black);
+	painter.drawLine(xp,r.y(),xp,r.bottomLeft().y());
+	
+	//Min tick + text
+	painter.drawLine(xp-tickWidth/2,r.y(),xp+tickWidth/2,r.y());
+	painter.drawText(QPointF(xp+tickWidth/2+6,r.y()+fm.ascent()/2),QString::number(parent_->startValue()));
+	
+	//Max tick + text
+	painter.drawLine(xp-tickWidth/2,r.bottomLeft().y(),xp+tickWidth/2,r.bottomLeft().y());
+	painter.drawText(QPointF(xp+tickWidth/2+6,r.bottomLeft().y()+fm.ascent()/2),QString::number(parent_->endValue()));
+	
+	//othert ticks + text 
+	for(int i=9; i > 5 &&  i < parent_->valueCount()-5; i+=10)
+	{
+		int yp=r.y()+static_cast<float>(parent_->indexPercent(i))*static_cast<float>(r.height());
+		painter.drawLine(xp-tickWidth/2,yp,xp+tickWidth/2,yp);		
+		painter.drawText(QPointF(xp+tickWidth/2+6,yp+fm.ascent()/2),QString::number(parent_->value(i)));
+	}
+	
+	//Small ticks
+	for(int i=4; i > 3 &&  i < parent_->valueCount()-4; i+=10)
+	{
+		int yp=r.y()+static_cast<float>(parent_->indexPercent(i))*static_cast<float>(r.height());
+		painter.drawLine(xp-tickWidth/4,yp,xp+tickWidth/4,yp);		
+	}
+	
+	//range
+	painter.fillRect(rangeRect(),QColor(255,230,191,160));
+	painter.setPen(QColor(255,230,191));
+	painter.drawRect(rangeRect());
+	
+	if(action_ == MinDragAction)
+	{  
+		//QRect minRect=minDragRect();
+		//painter.fillRect(minRect,QColor(220,220,220,80));
+		//painter.drawRect(minRect);
+	}
+	else if(action_ == MaxDragAction)
+	{
+	  	//QRect maxRect=maxDragRect();
+		//painter.fillRect(maxRect,QColor(220,220,220,80));
+		//painter.drawRect(maxRect);
+	} 
+	else if(hover_ == MinDragHover)
+	{
+	  	QPolygon minPoly=minDragShape();
+		painter.setBrush(QColor(240,240,240,80));
+		painter.drawPolygon(minPoly);
+		//painter.drawRect(minRect);
+	}
+	else if(hover_ == MaxDragHover)
+	{
+	  	QPolygon maxPoly=maxDragShape();
+		painter.setBrush(QColor(240,240,240,80));
+		painter.drawPolygon(maxPoly);
+		//painter.drawRect(maxRect);
+	}
+	
+}
+
+
+void MvQRangePlotWidget::mousePressEvent(QMouseEvent *event)
+{	  	
+	if(minDragShape().containsPoint(event->pos(),Qt::OddEvenFill))
+	{
+	  	dragPos_=event->pos();
+		action_=MinDragAction;
+		dragMin_=parent_->rangeStartIndex();
+		dragMax_=parent_->rangeEndIndex();
+		hover_=NoHover;
+		setCursor(QCursor(Qt::SizeVerCursor));
+	}
+	else if(maxDragShape().containsPoint(event->pos(),Qt::OddEvenFill))
+	{
+	  	dragPos_=event->pos();
+		action_=MaxDragAction;
+		dragMin_=parent_->rangeStartIndex();
+		dragMax_=parent_->rangeEndIndex();
+		hover_=NoHover;	
+		setCursor(QCursor(Qt::SizeVerCursor));
+	}	
+  	else if(rangeRect().contains(event->pos()))
+	{
+	  	dragPos_=event->pos();
+		action_=MoveAction;
+		dragMin_=parent_->rangeStartIndex();
+		dragMax_=parent_->rangeEndIndex();
+		hover_=NoHover;
+		setCursor(QCursor(Qt::SizeAllCursor));		
+	}	 
+}  
+  
+void MvQRangePlotWidget::mouseMoveEvent(QMouseEvent *event)
+{	
+  	if(action_== MinDragAction)
+	{
+		int delta=event->pos().y()-dragPos_.y();		
+		float h=static_cast<float>(rect().height())-2*offset_;
+		parent_->adjustRangeStart(dragMin_,delta/h);
+		update();
+	}	
+	else if(action_== MaxDragAction)
+	{
+		int delta=event->pos().y()-dragPos_.y();		
+		float h=static_cast<float>(rect().height())-2*offset_;
+		parent_->adjustRangeEnd(dragMax_,delta/h);
+		update();
+	}	
+	else if(action_== MoveAction)
+	{
+		int delta=event->pos().y()-dragPos_.y();		
+		float h=static_cast<float>(rect().height())-2*offset_;
+		parent_->adjustRange(dragMin_,dragMax_,delta/h);
+		update();
+	}
+	else if(minDragShape().containsPoint(event->pos(),Qt::OddEvenFill))
+	{
+	  	if(hover_ != MinDragHover)
+		{
+			hover_=MinDragHover;
+			update();
+		}	
+	}
+	else if(maxDragShape().containsPoint(event->pos(),Qt::OddEvenFill))
+	{
+	  	if(hover_ != MaxDragHover)
+		{
+		  	hover_=MaxDragHover;
+			update();
+		}	
+	}
+	else
+	{
+	  	if(hover_ != NoHover)
+		{
+		  	hover_=NoHover;
+			update();
+		}				
+	}	
+}  
+
+void MvQRangePlotWidget::mouseReleaseEvent(QMouseEvent* /*event*/)
+{	
+	if(action_ != NoAction)	
+	{
+	  	action_=NoAction;
+		unsetCursor();
+		update();
+	}	
+}  	
diff --git a/src/libMvQtGui/MvQRangeWidget.h b/src/libMvQtGui/MvQRangeWidget.h
new file mode 100644
index 0000000..6b56516
--- /dev/null
+++ b/src/libMvQtGui/MvQRangeWidget.h
@@ -0,0 +1,89 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQRangeWidget_H
+#define MvQRangeWidget_H
+
+#include <QWidget>
+
+class QSpinBox;
+class MvQRangeWidget;
+
+class MvQRangePlotWidget : public QWidget
+{
+public:
+    	MvQRangePlotWidget(MvQRangeWidget*);
+
+protected:   	
+	void paintEvent(QPaintEvent*);
+	void mousePressEvent(QMouseEvent*);
+	void mouseMoveEvent(QMouseEvent*);
+  	void mouseReleaseEvent(QMouseEvent*);
+	QRect rangeRect();
+	QPolygon minDragShape();
+	QPolygon maxDragShape();
+	
+	enum UserAction {NoAction,MinDragAction,MaxDragAction,MoveAction};
+	enum HoverMode {NoHover,MinDragHover,MaxDragHover,MoveHover};
+	
+	MvQRangeWidget* parent_;
+	QPoint dragPos_;
+	UserAction action_;
+	HoverMode hover_;
+	int offset_;
+	int dragRadius_;
+	int dragMin_;
+	int dragMax_;
+};
+
+class MvQRangeWidget : public QWidget
+{
+Q_OBJECT
+
+public:  
+	MvQRangeWidget(QWidget *parent=0);
+		
+	void setRange(int,int);
+	void reset(QVector<float>);
+	void adjustRange(int,int,float);
+	void adjustRangeStart(int,float);
+	void adjustRangeEnd(int,float);	
+	int  rangeStartIndex() const {return rangeStartIndex_;}
+	int  rangeEndIndex() const {return rangeEndIndex_;}
+	float rangeStartPercent() const;
+	float rangeEndPercent() const;
+	float indexPercent(int) const;
+	float startValue();	
+	float endValue();
+	float value(int);
+	int valueCount();
+
+public slots:
+        void slotStartSpin(int);
+    	void slotEndSpin(int);
+	void slotSelectWholeRange(bool);
+  
+signals:
+    	void valueChanged(int,int);
+
+protected:
+  	void checkValues();
+  	void updateSpins();
+  
+  	QVector<float> values_;
+	int rangeStartIndex_;
+	int rangeEndIndex_;
+	QSpinBox *startSpin_;
+	QSpinBox *endSpin_;
+	MvQRangePlotWidget* plot_;
+	bool ignoreSpinChange_;
+};	
+ 
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQScmDataWidget.cc b/src/libMvQtGui/MvQScmDataWidget.cc
new file mode 100644
index 0000000..427cd5e
--- /dev/null
+++ b/src/libMvQtGui/MvQScmDataWidget.cc
@@ -0,0 +1,513 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QApplication>
+#include <QDebug>
+#include <QHeaderView>
+#include <QHBoxLayout>  
+#include <QLabel>
+#include <QPushButton>
+#include <QSettings>
+#include <QToolButton>
+#include <QTableView>
+#include <QVBoxLayout>
+
+#include "MvScm.h"
+#include "MvQScmDataWidget.h"
+#include "MvQScmModel.h"
+
+MvQScmTab::MvQScmTab(QWidget* parent) :
+  QTabWidget(parent)
+{ 	
+	tabBar()->setProperty("mvStyle","folder");
+}
+
+MvQScmDataWidget::MvQScmDataWidget(QWidget *parent) : 
+         QWidget(parent),
+         data_(0),
+         usePl_(false)
+{	
+	//-----------------------
+	// The main layout 
+	//-----------------------
+  
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+        mainLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+	mainLayout->setContentsMargins(0,0,0,1);
+	mainLayout->setSpacing(1);
+	setLayout(mainLayout);
+	
+	//-------------------
+	// Central tab	
+	//-------------------
+		
+	paramTab_= new MvQScmTab(this); 	
+	
+	mainLayout->addWidget(paramTab_,1);
+		
+	setupParamBox();
+	
+	paramTab_->addTab(paramMlPanel_,tr("Model levels"));
+	paramTab_->addTab(paramSoilPanel_,tr("Soil level"));
+	paramTab_->addTab(paramSurfPanel_,tr("Surface"));
+	if(usePl_)
+	{
+	  	paramTab_->addTab(paramPlPanel_,tr("Pressure level"));
+	}
+	
+	//----------------------------
+	// Signals and slots
+	//----------------------------
+
+	connect(paramTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotTabIndexChanged(int)));
+}
+ 
+MvQScmDataWidget::~MvQScmDataWidget()
+{
+	writeSettings();
+}
+
+void MvQScmDataWidget::setupParamBox()
+{
+	QVBoxLayout *layout;
+	
+	//--------------------------------
+	// Model levels
+	//--------------------------------
+
+	paramMlPanel_=new QWidget;
+	layout= new QVBoxLayout;
+	layout->setContentsMargins(0,0,0,0);
+	paramMlPanel_->setLayout(layout);
+	
+	//Column tree
+	paramMlModel_= new MvQScmProfileModel;
+	
+	paramMlFilterModel_= new MvQScmProfileFilterModel(this);
+	paramMlFilterModel_->setSourceModel(paramMlModel_);
+	paramMlFilterModel_->setDynamicSortFilter(true);
+	
+	paramMlView_=new QTableView;
+	paramMlView_->setObjectName("paramMlView");
+	paramMlView_->setProperty("mvStyle",3);	
+	paramMlView_->setAlternatingRowColors(true);
+	paramMlView_->setModel(paramMlFilterModel_);	
+	
+	MvQScmTableViewDelegate *mlDelegate=new MvQScmTableViewDelegate(this);
+	paramMlView_->setItemDelegate(mlDelegate);
+	
+	layout->addWidget(paramMlView_);
+	
+	connect(paramMlModel_,SIGNAL(dataEdited(const MvScmProfileChange&)),
+		this,SIGNAL(dataEdited(const MvScmProfileChange&)));
+	
+	connect(paramMlView_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotParamMlSelected(const QModelIndex&)));	
+	
+	connect(paramMlView_,SIGNAL(pressed(const QModelIndex&)),
+		this,SLOT(slotParamMlSelected(const QModelIndex&)));
+		
+	QHeaderView *header=paramMlView_->horizontalHeader();
+	
+	connect(header,SIGNAL(sectionClicked(int)),
+		this,SLOT(slotParamMlSelected(int)));
+	
+	//--------------------------------
+	// Pressure levels
+	//--------------------------------
+
+	if(usePl_)
+	{
+		paramPlPanel_=new QWidget;
+		layout= new QVBoxLayout;
+		layout->setContentsMargins(0,0,0,0);
+		paramPlPanel_->setLayout(layout);
+	
+		//Column tree
+		paramPlModel_= new MvQScmProfileModel;
+	
+		paramPlView_=new QTableView;
+		paramPlView_->setObjectName("paramPlView");
+		paramPlView_->setProperty("mvStyle",3);	
+		paramPlView_->setAlternatingRowColors(true);
+   
+		paramPlView_->setModel(paramPlModel_);	
+	
+		MvQScmTableViewDelegate *plDelegate=new MvQScmTableViewDelegate(this);
+		paramPlView_->setItemDelegate(plDelegate);
+	
+		layout->addWidget(paramPlView_);
+	}
+	
+	//--------------------------------
+	// Soil levels
+	//--------------------------------
+
+	paramSoilPanel_=new QWidget;
+	layout= new QVBoxLayout;
+	layout->setContentsMargins(0,0,0,0);
+	paramSoilPanel_->setLayout(layout);
+	
+	//Column tree
+	paramSoilModel_= new MvQScmProfileModel;
+	
+	paramSoilView_=new QTableView;
+	paramSoilView_->setObjectName("paramSoilView");
+	paramSoilView_->setProperty("mvStyle",3);	
+	paramSoilView_->setAlternatingRowColors(true);
+   
+	paramSoilView_->setModel(paramSoilModel_);	
+	
+	MvQScmTableViewDelegate *soilDelegate=new MvQScmTableViewDelegate(this);
+	paramSoilView_->setItemDelegate(soilDelegate);
+	
+	layout->addWidget(paramSoilView_);
+	
+	connect(paramSoilModel_,SIGNAL(dataEdited(const MvScmProfileChange&)),
+		this,SIGNAL(dataEdited(const MvScmProfileChange&)));
+		
+	connect(paramSoilView_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotParamSoilSelected(const QModelIndex&)));	
+	
+	connect(paramSoilView_,SIGNAL(pressed(const QModelIndex&)),
+		this,SLOT(slotParamSoilSelected(const QModelIndex&)));		
+		
+	header=paramSoilView_->horizontalHeader();
+	
+	connect(header,SIGNAL(sectionClicked(int)),
+		this,SLOT(slotParamSoilSelected(int)));
+		
+	//--------------------------------
+	// Surface
+	//--------------------------------
+
+	paramSurfPanel_=new QWidget;
+	layout= new QVBoxLayout;
+	layout->setContentsMargins(0,0,0,0);
+	paramSurfPanel_->setLayout(layout);
+	
+	//Column tree
+	paramSurfModel_= new MvQScmSurfaceModel;
+	
+	paramSurfView_=new QTableView;
+	paramSurfView_->setObjectName("paramSoilView");
+	paramSurfView_->setProperty("mvStyle",3);	
+	paramSurfView_->setAlternatingRowColors(true);
+   
+	paramSurfView_->setModel(paramSurfModel_);	
+	
+	MvQScmTableViewDelegate *surfDelegate=new MvQScmTableViewDelegate(this);
+	paramSurfView_->setItemDelegate(surfDelegate);
+	
+	layout->addWidget(paramSurfView_);
+	
+	connect(paramSurfModel_,SIGNAL(dataEdited(const MvScmProfileChange&)),
+		this,SIGNAL(dataEdited(const MvScmProfileChange&)));
+	
+	connect(paramSurfView_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotParamSurfSelected(const QModelIndex&)));	
+	
+	connect(paramSurfView_,SIGNAL(pressed(const QModelIndex&)),
+		this,SLOT(slotParamSurfSelected(const QModelIndex&)));	
+				
+	header=paramSurfView_->verticalHeader();
+	
+	connect(header,SIGNAL(sectionClicked(int)),
+		this,SLOT(slotParamSurfSelected(int)));	
+}
+		
+void MvQScmDataWidget::init(MvScm *data,QList<MvScmVar*> editVars)
+{	
+  	if(data->stepNum() <= 0)
+	{
+	  	data_=0;
+		return;
+	}	
+	
+	data_=data;
+
+	//Get editable variables	     
+	std::vector<MvScmVar*> editVec=editVars.toVector().toStdVector();
+
+	int step=0;
+	
+	//Model levels
+	paramMlModel_->setData(data_->modelLevel(),step,data_->modelLevelDim().values(),data_->modelLevelDim().longName());
+	paramMlModel_->setEditableVars(editVec);
+	
+	//Pressure levels	
+	if(usePl_)
+	{
+	  	paramPlModel_->setData(data_->pressureLevel(),step,data_->pressureLevelDim().values(),data_->pressureLevelDim().longName());
+	}
+	
+	//Soil levels
+	paramSoilModel_->setData(data_->soilLevel(),step,data_->soilLevelDim().values(),data_->soilLevelDim().longName());	
+	paramSoilModel_->setEditableVars(editVec);
+	
+	//Surface
+	paramSurfModel_->setData(data_->surfaceLevel(),step);
+	paramSurfModel_->setEditableVars(editVec);
+
+	//Dymanic filter did not work somehow, so we need to update the filter model in this way
+	paramMlFilterModel_->setShowEditableOnly(paramMlFilterModel_->showEditableOnly());
+	
+	//Initial profile
+	slotParamMlSelected(data_->mlVarIndex(MvScm::TempML));
+
+	//Steps combo
+	
+	//Steps slider
+	/*stepSlider_->setRange(0,steps.size()-1);	
+	stepSlider_->setTickInterval(1);
+	stepSlider_->setTickPosition(QSlider::TicksBelow);
+	
+	connect(stepSlider_,SIGNAL(valueChanged(int)),
+		this,SLOT(slotStepSliderChanged(int)));*/
+			
+}
+
+void MvQScmDataWidget::slotStepChanged(int value)
+{
+	int step=value;
+	
+	QModelIndex prevMlIndex=paramMlFilterModel_->mapToSource(paramMlView_->currentIndex());
+	QModelIndex prevSoilIndex=paramSoilView_->currentIndex();
+	QModelIndex prevSurfIndex=paramSurfView_->currentIndex();
+	QModelIndex prevPlIndex;
+	if(usePl_)
+	{
+	  	prevPlIndex=paramPlView_->currentIndex();
+	}
+	
+	paramMlModel_->setStep(step);
+	if(usePl_)
+	{
+	  	paramPlModel_->setStep(step);
+	}
+	paramSoilModel_->setStep(step);
+	paramSurfModel_->setStep(step);
+	
+	//Update profile view
+	
+	
+	int actTab=paramTab_->currentIndex();	
+	
+	//ML
+	QModelIndex actMlIndex=paramMlModel_->index(prevMlIndex.row(),prevMlIndex.column());	
+	paramMlView_->setCurrentIndex(paramMlFilterModel_->mapFromSource(actMlIndex));			
+	if(actTab == 0 || actTab == 3)
+	{
+		slotParamMlSelected(actMlIndex);	
+	}
+	
+	//Soil
+	QModelIndex actSoilIndex=paramSoilModel_->index(prevSoilIndex.row(),prevSoilIndex.column());
+	if(actSoilIndex.isValid())
+	{	  	
+		paramSoilView_->setCurrentIndex(actSoilIndex);	
+		if(actTab == 1)
+		{
+	  		if(data_->soilLevel().at(actSoilIndex.column()) == data_->soilVar(MvScm::TempSoil))
+			{	  
+				slotParamSoilSelected(actSoilIndex);
+			}			
+			else
+			{
+		  		slotParamMlSelected(actMlIndex);
+			}
+		}	
+	}
+	else
+	{
+		 slotParamMlSelected(actMlIndex);
+	}	  
+		
+	//Surf
+	QModelIndex actSurfIndex=paramSurfModel_->index(prevSurfIndex.row(),prevSurfIndex.column());	
+	paramSurfView_->setCurrentIndex(actSurfIndex);		
+	if(actSurfIndex.isValid())
+	{
+	  	if(actTab == 2)
+		{
+			if(data_->surfaceLevel().at(actSurfIndex.column()) == data_->surfVar(MvScm::TempSurf))
+			{	  
+	  			slotParamSurfSelected(actSurfIndex);
+			}
+			else
+			{
+		  		slotParamMlSelected(actMlIndex);
+			}
+		}
+	}
+	else
+	{
+		 slotParamMlSelected(actMlIndex);
+	}
+		
+	//Pres
+	if(usePl_)
+	{  	
+	  	QModelIndex actPlIndex=paramPlModel_->index(prevPlIndex.row(),prevPlIndex.column());	
+		paramPlView_->setCurrentIndex(actPlIndex);
+	}
+}
+
+
+void MvQScmDataWidget::slotTabIndexChanged(int /*index*/)
+{
+}
+
+void MvQScmDataWidget::slotParamMlSelected(int index)
+{
+	if(index >=0 && index < static_cast<int>(data_->modelLevel().size()))
+	{
+		MvScmVar *var=data_->modelLevel().at(index);
+		int step=paramMlModel_->step(); 
+		
+		emit paramSelected(var,step);
+	}
+}	
+
+void MvQScmDataWidget::slotParamMlSelected(const QModelIndex& index)
+{
+	if(!index.isValid())
+	{
+	  	emit stepChanged(paramMlModel_->step());
+	}
+	else
+	{
+	  	slotParamMlSelected(index.column());
+	}	
+}	
+
+void MvQScmDataWidget::slotParamSoilSelected(int index)
+{
+	if(index >=0 && index < static_cast<int>(data_->soilLevel().size()))
+	{
+		MvScmVar *var=data_->soilLevel().at(index);
+		int step=paramSoilModel_->step(); 
+				
+		if(var == data_->soilVar(MvScm::TempSoil)) 
+		{		
+			emit paramSelected(data_->mlVar(MvScm::TempML),step);
+		}	
+	}
+}	
+
+void MvQScmDataWidget::slotParamSoilSelected(const QModelIndex& index)
+{
+	if(!index.isValid())
+	{
+	  	emit stepChanged(paramSoilModel_->step());
+	}
+	else
+	{
+	  	slotParamSoilSelected(index.column());
+	}	
+}	
+
+void MvQScmDataWidget::slotParamSurfSelected(int index)
+{
+	if(index >=0 && index < static_cast<int>(data_->surfaceLevel().size()))
+	{
+		MvScmVar *var=data_->surfaceLevel().at(index);
+		int step=paramSurfModel_->step(); 
+				
+		if(var == data_->surfVar(MvScm::TempSurf)) 
+		{		
+			emit paramSelected(data_->mlVar(MvScm::TempML),step);
+		}	
+	}
+}	
+
+void MvQScmDataWidget::slotParamSurfSelected(const QModelIndex& index)
+{
+	if(!index.isValid())
+	{
+	  	emit stepChanged(paramSurfModel_->step());
+	}
+	else
+	{
+	  	slotParamSurfSelected(index.column());
+	}	
+}
+
+void MvQScmDataWidget::showEditableParams(bool b)
+{
+  	paramMlFilterModel_->setShowEditableOnly(b);	   
+}  
+
+void MvQScmDataWidget::selectMlParam(MvScmVar* var)	
+{
+  	if(var)
+	{  
+  		QModelIndex index=paramMlFilterModel_->mapFromSource(paramMlModel_->indexForVar(var,paramMlModel_->step(),0));
+		paramMlView_->scrollTo(index,QAbstractItemView::PositionAtCenter);
+		paramTab_->setCurrentIndex(0);		
+	}	
+}  
+
+void MvQScmDataWidget::update(const MvScmProfileChange& item)
+{
+	if(!item.var())
+	  	return;
+	
+  	if(item.var()->levelType() == MvScmVar::ModelLevelType)
+	{  
+	  	QModelIndex index=paramMlFilterModel_->mapFromSource(paramMlModel_->indexForChange(item));
+		paramMlView_->update(index);
+		paramMlView_->scrollTo(index,QAbstractItemView::PositionAtCenter);
+		paramTab_->setCurrentIndex(0);
+		
+		if(item.dependantVar())
+		{
+		  	index=paramMlModel_->indexForVar(item.dependantVar(),item.step(),item.level());
+			paramMlView_->update(paramMlFilterModel_->mapFromSource(index));
+		}	
+	}  
+	else if(item.var()->levelType() == MvScmVar::SoilLevelType)
+	{  
+	  	QModelIndex index=paramSoilModel_->indexForChange(item);
+		paramSoilView_->update(index);
+		paramSoilView_->scrollTo(index,QAbstractItemView::EnsureVisible);
+		paramTab_->setCurrentIndex(1);
+	} 
+	else if(item.var()->levelType() == MvScmVar::SurfaceLevelType)
+	{  
+	  	QModelIndex index=paramSurfModel_->indexForChange(item);
+		paramSurfView_->update(index);
+		paramSurfView_->scrollTo(index,QAbstractItemView::EnsureVisible);
+		paramTab_->setCurrentIndex(2);
+	}   
+	
+	//updateStepStatus(item.step(),true);
+	
+}
+
+void MvQScmDataWidget::reload()
+{
+	paramMlModel_->reload();
+	if(usePl_)
+	{
+	  	paramPlModel_->reload();
+	}
+	paramSoilModel_->reload();
+	paramSurfModel_->reload();
+}  
+
+void MvQScmDataWidget::writeSettings()
+{
+}
+
+void MvQScmDataWidget::readSettings()
+{
+}
diff --git a/src/libMvQtGui/MvQScmDataWidget.h b/src/libMvQtGui/MvQScmDataWidget.h
new file mode 100644
index 0000000..3384421
--- /dev/null
+++ b/src/libMvQtGui/MvQScmDataWidget.h
@@ -0,0 +1,98 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQScmDataWidget_H
+#define MvQScmDataWidget_H
+
+#include <QTabWidget>
+#include <QWidget>
+#include <QModelIndex>
+
+class QAction;
+class QPushButton;
+class QTableView;
+class QStandardItemModel;
+class QVBoxLayout;
+
+class MvQScmProfileModel;
+class MvQScmProfileFilterModel;
+class MvQScmSurfaceModel;
+
+class MvScm;
+class MvScmVar;
+class MvScmProfileChange;
+
+using namespace std;
+
+
+class MvQScmTab : public QTabWidget
+{
+public:
+    MvQScmTab(QWidget *parent=0);
+};	
+
+class MvQScmDataWidget : public QWidget
+{
+    Q_OBJECT
+
+public:
+   	 MvQScmDataWidget(QWidget *parent = 0);
+	~MvQScmDataWidget();
+    	void init(MvScm*,QList<MvScmVar*>);
+    	void update(const MvScmProfileChange&);
+    	void reload();
+    	void showEditableParams(bool);
+    	void selectMlParam(MvScmVar*);
+
+public slots:
+	void slotStepChanged(int);
+	void slotParamMlSelected(int);
+	void slotParamMlSelected(const QModelIndex&);
+	void slotParamSurfSelected(int);
+	void slotParamSurfSelected(const QModelIndex&);
+	void slotParamSoilSelected(int);
+	void slotParamSoilSelected(const QModelIndex&);
+	void slotTabIndexChanged(int);
+	
+signals:
+        void dataEdited(const MvScmProfileChange&);
+	void paramSelected(MvScmVar*,int);
+	void stepChanged(int);
+	
+protected:
+	void setupParamBox();
+	void readSettings();
+	void writeSettings();
+
+ 	MvScm *data_;
+
+	QTabWidget *paramTab_;
+	
+	QWidget*     		paramMlPanel_;
+	QTableView*  		paramMlView_;
+	MvQScmProfileModel* 	paramMlModel_;
+	MvQScmProfileFilterModel* paramMlFilterModel_;
+	
+	QWidget*     		paramPlPanel_;
+	QTableView*  		paramPlView_;
+	MvQScmProfileModel* 	paramPlModel_;
+	
+	QWidget*     		paramSoilPanel_;
+	QTableView*  		paramSoilView_;
+	MvQScmProfileModel* 	paramSoilModel_;
+	
+	QWidget*     		paramSurfPanel_;
+	QTableView*  		paramSurfView_;
+	MvQScmSurfaceModel* 	paramSurfModel_;
+	
+	bool usePl_;
+ };
+
+
+#endif
diff --git a/src/libMvQtGui/MvQScmModel.cc b/src/libMvQtGui/MvQScmModel.cc
new file mode 100644
index 0000000..d715897
--- /dev/null
+++ b/src/libMvQtGui/MvQScmModel.cc
@@ -0,0 +1,477 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <algorithm>
+
+#include <QColor>
+#include <QDebug>
+#include <QPainter>
+#include <QPixmap>
+
+#include "MvQScmModel.h"
+
+#include "MvScm.h"
+
+
+MvQScmTableViewDelegate::MvQScmTableViewDelegate(QObject *parent) : QStyledItemDelegate(parent)
+{  
+}
+
+void MvQScmTableViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+               const QModelIndex &index) const
+{              
+	//Paint the cell bg
+	painter->fillRect(option.rect,index.data(Qt::BackgroundRole).value<QBrush>());
+        
+        //Paint the rest
+	QStyledItemDelegate::paint(painter, option, index);
+        
+        // To draw a border on selected cells
+       /* if(option.state & QStyle::State_Selected)
+        {
+            painter->save();
+            QPen pen(Qt::black, 2, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin);
+            int w = pen.width()/2;
+            painter->setPen(pen);
+            painter->drawRect(option.rect.adjusted(w,w,-w,-w));
+            painter->restore();
+        }*/
+}
+
+//=========================================
+//
+// MvQScmDataModel
+//
+//=========================================
+
+MvQScmDataModel::MvQScmDataModel()			
+{
+	step_=-1;
+		
+	rowColEdit1_=QColor("#FFE6BF");
+	rowColEdit2_=QColor("#FFF2DE");
+	rowCol1_=rowColEdit1_.darker(110);
+	rowCol2_=rowColEdit2_.darker(110);
+	editCol_=QColor(252,148,81);
+}
+
+void MvQScmDataModel::dataIsAboutToChange()
+{
+	beginResetModel(); 
+}
+
+void MvQScmDataModel::setStep(int step) 
+{			
+  	beginResetModel(); 
+	
+	if(step >= 0 && data_.size() > 0 && step < data_.at(0)->stepNum())
+		step_=step;
+	else
+	  	step_=-1;
+	
+	endResetModel();
+}
+
+	
+QModelIndex MvQScmDataModel::index( int row, int column, const QModelIndex & /*parent*/ ) const
+{
+	if(data_.size() == 0 || column < 0)
+	{
+		return QModelIndex();
+	}
+	
+	return createIndex(row, column, 0);
+}
+
+QModelIndex MvQScmDataModel::indexForChange(const MvScmProfileChange& item) const
+{
+  	return indexForVar(item.var(),item.step(),item.level());
+}	
+
+QModelIndex MvQScmDataModel::parent( const QModelIndex & /*index */) const
+{			
+	return QModelIndex();
+}
+
+void MvQScmDataModel::reload()
+{
+  	reset();
+}	
+
+
+
+//=========================================
+//
+// MvQScmSurfaceModel
+//
+//=========================================
+
+MvQScmSurfaceModel::MvQScmSurfaceModel()		
+{
+}
+
+int MvQScmSurfaceModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+	return 2;
+}
+
+int MvQScmSurfaceModel::rowCount( const QModelIndex& parent) const
+{
+	//Non-root
+	if(parent.isValid() )
+	{
+		return 0;
+	}
+	//Root
+	return static_cast<int>(data_.size());
+}
+
+QVariant MvQScmSurfaceModel::data(const QModelIndex& index, int role ) const
+{	
+  	if(role != Qt::DisplayRole && role != Qt::BackgroundRole && role !=  Qt::EditRole )
+	{
+	  	return QVariant();
+	}
+	
+	if(index.column() != 0 && index.column() != 1)
+	  	return QVariant();
+	
+	if( step_ == -1 ||  !index.isValid() || index.row() < 0 || index.row() >= static_cast<int>(data_.size()))
+	{
+	  	return QVariant();
+	}
+	
+	if(role == Qt::DisplayRole || role ==  Qt::EditRole)
+	{	  	
+		if(index.column() == 0)	  
+	  		return data_.at(index.row())->data(step_).at(0);
+		else
+		  	return QString::fromStdString(data_.at(index.row())->units());
+		
+	}
+	else if(role == Qt::BackgroundRole)
+	{
+	  	bool editable=(std::find(editableVars_.begin(),editableVars_.end(),data_.at(index.row())) != editableVars_.end())?true:false;
+		
+		if(editable)
+		{  		
+			if(data_.at(index.row())->changed(step_,0))
+			{
+		  		return editCol_;
+			}
+			else
+			{
+		  		return (index.row() % 2 == 0)?rowColEdit1_:rowColEdit2_;
+			}			
+		}
+		else
+		{
+		  	return (index.row() % 2 == 0)?rowCol1_:rowCol2_;
+		}		
+	}
+	  
+	return QVariant();
+		
+}
+
+bool MvQScmSurfaceModel::setData( const QModelIndex& index, const QVariant& value, int role)
+{	
+  	if( !index.isValid() || role != Qt::EditRole || index.column() !=0)
+		return false;	
+	
+	float f=value.toFloat();
+	data_.at(index.row())->fitToRange(f);
+	
+	MvScmProfileChange changeItem;
+	
+	data_.at(index.row())->setValue(step_,index.column(),f,changeItem);
+	emit  dataChanged(index,index);
+	emit  dataEdited(changeItem);
+	return true;
+}
+
+void MvQScmSurfaceModel::setData(const vector<MvScmVar*>& data, int step) 
+{			
+  	beginResetModel(); 
+	
+	data_=data;
+		
+	if(step >= 0 && data_.size() > 0 && step < data_.at(0)->stepNum())
+		step_=step;
+	else
+	  	step_=-1;
+	
+	endResetModel();
+}
+
+QVariant MvQScmSurfaceModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if(role != Qt::DisplayRole && role != Qt::ToolTipRole)
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+ 	if(orient == Qt::Vertical)	  
+	{  
+	  	if(section < 0 || section >= static_cast<int>(data_.size()))
+			return QVariant();
+	
+		QString str=QString::fromStdString(data_.at(section)->name());
+		//+
+		//          "  [" + QString::fromStdString(data_.at(section)->units()) + "]" ;
+	
+		if(role == Qt::DisplayRole)
+			return str;		
+		else if(role == Qt::ToolTipRole)
+	  		return QString::fromStdString(data_.at(section)->longName());
+	}
+	else if(orient == Qt::Horizontal)	  
+	{  
+		if(section ==0)
+		  	return tr("Value");
+		else if(section==1)
+		  	return tr("Units");
+	}
+	
+	return QString();
+}
+
+QModelIndex MvQScmSurfaceModel::indexForVar(MvScmVar *var, int step, int /*level*/) const
+{
+	if(step == step_)
+	{
+	  	for(unsigned int i=0; i < data_.size(); i++)
+		{
+			if(data_.at(i) == var)
+			{
+				return createIndex(i,0,0); 
+			}	
+		}	  			
+	}
+	
+	return QModelIndex();
+}
+
+
+Qt::ItemFlags MvQScmSurfaceModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled |
+		     Qt::ItemIsSelectable;
+	
+	if(index.column() ==0 && index.row() >= 0 && index.row() < static_cast<int>(data_.size()) &&
+	   std::find(editableVars_.begin(),editableVars_.end(),data_.at(index.row())) != editableVars_.end())
+	{  
+		return defaultFlags | Qt::ItemIsEditable;
+	}	
+		
+	return defaultFlags;
+}
+
+//=========================================
+//
+// MvQScmProfileModel
+//
+//=========================================
+
+MvQScmProfileModel::MvQScmProfileModel()			
+{
+}
+
+int MvQScmProfileModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+	return data_.size();
+}
+
+int MvQScmProfileModel::rowCount( const QModelIndex& parent) const
+{
+	//Non-root
+	if(parent.isValid() )
+	{
+		return 0;
+	}
+	//Root
+	if (data_.size() >0)
+	{
+		return static_cast<int>(data_.at(0)->levelNum());		
+	}		
+	else
+		return 0;	
+}
+
+QVariant MvQScmProfileModel::data( const QModelIndex& index, int role ) const
+{	
+  	if(role != Qt::DisplayRole && role != Qt::BackgroundRole && role !=  Qt::EditRole )
+	{
+	  	return QVariant();
+	}
+	
+	if( step_ == -1 ||  !index.isValid() || index.column() < 0 || index.column() >= static_cast<int>(data_.size()))
+	{
+	  	return QVariant();
+	}
+	
+	if(role == Qt::DisplayRole || role ==  Qt::EditRole)
+	{	  	
+		return data_.at(index.column())->data(step_).at(index.row());
+	}
+	else if(role == Qt::BackgroundRole)
+	{
+	  	bool editable=(std::find(editableVars_.begin(),editableVars_.end(),data_.at(index.column())) != editableVars_.end())?true:false;
+		
+		if(editable)
+		{  		
+			if(data_.at(index.column())->changed(step_,index.row()))
+			{
+		  		return editCol_;
+			}
+			else
+			{
+		  		return (index.row() % 2 == 0)?rowColEdit1_:rowColEdit2_;
+			}			
+		}
+		else
+		{
+		  	return (index.row() % 2 == 0)?rowCol1_:rowCol2_;
+		}		
+	}
+	  
+	return QVariant();
+		
+}
+
+bool MvQScmProfileModel::setData( const QModelIndex& index, const QVariant& value, int role)
+{	
+  	if( !index.isValid() || role != Qt::EditRole)
+		return false;	
+	
+	float f=value.toFloat();
+	data_.at(index.column())->fitToRange(f);
+	
+	MvScmProfileChange changeItem;
+	
+	data_.at(index.column())->setValue(step_,index.row(),f,changeItem);
+	emit  dataChanged(index,index);
+	emit  dataEdited(changeItem);
+	return true;
+}
+
+void MvQScmProfileModel::setData(const vector<MvScmVar*>& data, int step,const vector<float>& levels, const string& levelName) 
+{			
+  	beginResetModel(); 
+	
+	data_=data;
+	levels_=levels;
+	levelName_=QString::fromStdString(levelName);
+	
+	if(step >= 0 && data_.size() > 0 && step < data_.at(0)->stepNum())
+		step_=step;
+	else
+	  	step_=-1;
+	
+	endResetModel();
+}
+
+QVariant MvQScmProfileModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if(role != Qt::DisplayRole && role != Qt::ToolTipRole)
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+ 	if(orient == Qt::Horizontal)	  
+	{  
+	  	if(section < 0 || section >= static_cast<int>(data_.size()))
+			return QVariant();
+	
+		QString str=QString::fromStdString(data_.at(section)->name()) + "\n" +
+		          "[" + QString::fromStdString(data_.at(section)->units()) + "]" ;
+	
+		//bool editable=(std::find(editableVars_.begin(),editableVars_.end(),data_.at(section)) != editableVars_.end())?true:false;
+				
+		if(role == Qt::DisplayRole)
+			return str;		
+		else if(role == Qt::ToolTipRole)
+	  		return QString::fromStdString(data_.at(section)->longName());
+	  	//else if(role == Qt::BackgroundRole && editable)
+	  	//	return QColor(Qt::red);
+		//else if(role == Qt::DecorationRole && editable)
+	  	//	return QPixmap(QString::fromUtf8(":/scmEditor/edit.svg"));
+		
+	}
+	else if(orient == Qt::Vertical)	  
+	{  
+		if(section < 0 || section >= static_cast<int>(levels_.size()))
+		  	return QVariant();
+		
+		QString str=QString::number(levels_.at(section));
+		
+		if(role == Qt::DisplayRole)
+			return str;	
+		else if(role == Qt::ToolTipRole)
+		  	return levelName_ + " = " + str;		
+	}
+	
+	return QVariant();
+}
+
+QModelIndex MvQScmProfileModel::indexForVar( MvScmVar *var, int step, int level) const
+{
+	if(step == step_)
+	{
+	  	for(unsigned int i=0; i < data_.size(); i++)
+		{
+			if(data_.at(i) == var)
+			{
+				return createIndex(level,i, 0); 
+			}	
+		}	  			
+	}
+	
+	return QModelIndex();
+}
+
+Qt::ItemFlags MvQScmProfileModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	defaultFlags=Qt::ItemIsEnabled |
+		     Qt::ItemIsSelectable;
+	
+	if(index.column() >= 0 && index.column() < static_cast<int>(data_.size()) &&
+	   std::find(editableVars_.begin(),editableVars_.end(),data_.at(index.column())) != editableVars_.end())
+	{  
+		return defaultFlags | Qt::ItemIsEditable;
+	}	
+		
+	return defaultFlags;
+}
+
+
+MvQScmProfileFilterModel::MvQScmProfileFilterModel(QObject *parent) :  
+    QSortFilterProxyModel(parent),
+    showEditableOnly_(false)
+{
+}
+
+void MvQScmProfileFilterModel::setShowEditableOnly(bool b)
+{
+  	showEditableOnly_=b;
+	reset();
+}
+
+bool MvQScmProfileFilterModel::filterAcceptsColumn(int sourceColumn,
+         const QModelIndex &index) const
+{	
+  	if(showEditableOnly_)
+		return sourceModel()->flags(sourceModel()->index(0,sourceColumn)) & Qt::ItemIsEditable;
+	else
+	  	return true;
+}
+
+
+
+
diff --git a/src/libMvQtGui/MvQScmModel.h b/src/libMvQtGui/MvQScmModel.h
new file mode 100644
index 0000000..5857098
--- /dev/null
+++ b/src/libMvQtGui/MvQScmModel.h
@@ -0,0 +1,118 @@
+
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQScmModel_H
+#define MvQScmModel_H
+
+#include <QAbstractItemModel>
+#include <QColor>
+#include <QSortFilterProxyModel>
+#include <QStyledItemDelegate>
+#include <vector>
+
+using namespace std;
+
+class MvScm;
+class MvScmVar;
+class MvScmProfileChange;
+
+class MvQScmTableViewDelegate : public QStyledItemDelegate
+{
+public:
+	MvQScmTableViewDelegate(QObject *parent = 0);
+   	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+};    
+    
+class MvQScmDataModel : public QAbstractItemModel
+{
+Q_OBJECT
+
+public:
+   	QModelIndex index(int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	virtual QModelIndex indexForVar(MvScmVar *, int, int) const=0;
+	QModelIndex indexForChange(const MvScmProfileChange&) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setStep(int);
+	void reload();
+	int step() const {return step_;}
+	void  setEditableVars (const vector<MvScmVar*>& v) { editableVars_=v;}
+	
+signals:	
+	void dataEdited(const MvScmProfileChange&);	
+  
+protected:	
+	MvQScmDataModel();
+	
+	vector<MvScmVar*>  data_;
+	QList<int> columnOrder_;
+	int step_;
+	vector<MvScmVar*>  editableVars_;
+	
+	QColor rowColEdit1_;
+	QColor rowColEdit2_;
+	QColor rowCol1_;
+	QColor rowCol2_;
+	QColor editCol_;
+};
+
+
+class MvQScmSurfaceModel : public MvQScmDataModel 
+{
+public:
+   	MvQScmSurfaceModel();
+ 
+	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;	
+	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	bool setData(const QModelIndex& index, const QVariant& value,int role=Qt::EditRole);	
+	void setData(const vector<MvScmVar*>&,int);
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+	QModelIndex indexForVar(MvScmVar *, int, int) const;
+	Qt::ItemFlags flags (const QModelIndex &) const;
+};
+
+class MvQScmProfileModel : public MvQScmDataModel
+{
+public:
+   	MvQScmProfileModel(); 	 
+	
+	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;	
+	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	bool setData(const QModelIndex& index, const QVariant& value,int role=Qt::EditRole);
+	void setData(const vector<MvScmVar*>&,int,const vector<float>&,const string&);
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const; 	
+	QModelIndex indexForVar(MvScmVar *, int, int) const;
+	Qt::ItemFlags flags (const QModelIndex &) const;
+	
+protected:	
+	vector<float> levels_;
+	QString levelName_;
+	
+};
+
+
+class MvQScmProfileFilterModel : public  QSortFilterProxyModel
+{
+public:
+	MvQScmProfileFilterModel(QObject *parent=0);
+	bool filterAcceptsColumn(int,const QModelIndex &) const;
+	void setShowEditableOnly(bool);
+	bool showEditableOnly() const {return showEditableOnly_;}
+
+protected:
+ 
+    	bool showEditableOnly_;
+};
+
+#endif 
diff --git a/src/libMvQtGui/MvQSearchLinePanel.cc b/src/libMvQtGui/MvQSearchLinePanel.cc
new file mode 100644
index 0000000..e024731
--- /dev/null
+++ b/src/libMvQtGui/MvQSearchLinePanel.cc
@@ -0,0 +1,257 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QComboBox>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPainter>
+#include <QStackedLayout>
+#include <QToolButton>
+
+#include "MvQSearchLinePanel.h"
+
+#include "MvQAbstractSearchLine.h"
+
+	
+//============================================
+//
+//  MvQSearchLinePanel	
+//
+//=============================================	
+	
+MvQSearchLinePanel::MvQSearchLinePanel()
+{
+	QHBoxLayout *layout=new QHBoxLayout;
+	//layout->setContentsMargins(0,0,0,0);
+	setLayout(layout);
+
+	QToolButton *closeTb=new QToolButton(this);
+	QIcon icon(QPixmap(QString::fromUtf8(":/find/close.svg")));
+ 	closeTb->setIcon(icon);
+	closeTb->setAutoRaise(true);
+
+	connect(closeTb,SIGNAL(clicked(bool)),
+		this,SLOT(setVisible(bool)));
+		
+	itemLayout_=new QStackedLayout;
+	
+	layout->addWidget(closeTb);
+	layout->addLayout(itemLayout_);
+}
+
+void MvQSearchLinePanel::addSearchLine(MvQAbstractSearchLine* item,QWidget *itemId)
+{
+	if(item && itemId)
+	{
+	  	items_[itemId]=item;
+		itemLayout_->addWidget(item);
+		setCurrentSearchLineById(itemId);
+	}	
+}
+
+void MvQSearchLinePanel::slotFindNext(bool)
+{
+	if(isVisible() == false)
+		return;
+	
+  	QWidget *w=itemLayout_->currentWidget();
+	if(w)
+	{
+	  	MvQAbstractSearchLine* item=static_cast<MvQAbstractSearchLine*>(w);
+		if(item)
+		{
+		  	item->slotFindNext();
+		}		
+	}	
+}
+  
+void MvQSearchLinePanel::slotFindPrev(bool)
+{
+	if(isVisible() == false)
+		return;
+	
+  	QWidget *w=itemLayout_->currentWidget();
+	if(w)
+	{
+	  	MvQAbstractSearchLine* item=static_cast<MvQAbstractSearchLine*>(w);
+		if(item)
+		{
+		  	item->slotFindPrev();
+		}		
+	}	
+}
+
+void MvQSearchLinePanel::setCurrentSearchLineById(QWidget *itemId)
+{
+	if(!itemId)
+	{
+	 	setEnabled(false); 	
+		return;
+	}
+	else if(items_.find(itemId) != items_.end())
+	{
+	  	setEnabled(true);
+		itemLayout_->setCurrentWidget(items_[itemId]);
+
+	}	
+	else
+	{
+	  	setEnabled(false); 
+	}
+	  	
+}
+		
+//============================================
+//
+//  MvQDualSearchLinePanel	
+//
+//=============================================
+	
+MvQDualSearchLinePanel::MvQDualSearchLinePanel() : currentLeftItem_(0), currentRightItem_(0)
+{
+	QHBoxLayout *layout=new QHBoxLayout;
+	//layout->setContentsMargins(0,0,0,0);
+	setLayout(layout);
+
+	QToolButton *closeTb=new QToolButton(this);
+	QIcon icon(QPixmap(QString::fromUtf8(":/find/close.svg")));
+ 	closeTb->setIcon(icon);
+	closeTb->setAutoRaise(true);
+
+	connect(closeTb,SIGNAL(clicked(bool)),
+		this,SLOT(setVisible(bool)));
+		
+	itemLayout_=new QStackedLayout;
+
+	QLabel *label=new QLabel(tr("&Scope: "),this);
+	searchModeCb_=new QComboBox;
+	label->setBuddy(searchModeCb_);
+
+	QPixmap leftPix(13,13);
+	QPainter leftPainter(&leftPix);
+	leftPainter.fillRect(0,0,13,13,Qt::black);
+	leftPainter.fillRect(1,1,11,11,QColor(255,230,191));
+	
+	QPixmap rightPix(13,13);	
+	QPainter rightPainter(&rightPix);
+	rightPainter.fillRect(0,0,13,13,Qt::black);
+	rightPainter.fillRect(1,1,11,11,QColor(194,221,255));
+	
+
+	searchModeCb_->addItem(QIcon(leftPix),tr("Left Panel"));
+	searchModeCb_->addItem(QIcon(rightPix),tr("Right Panel"));
+	
+	searchModeCb_->setCurrentIndex(1);
+	
+	layout->addWidget(closeTb);
+	layout->addWidget(label);
+	layout->addWidget(searchModeCb_);
+	layout->addSpacing(10);
+	layout->addLayout(itemLayout_);
+	//layout->addSpacing(20);
+			
+	connect(searchModeCb_, SIGNAL(activated(int)),
+                this, SLOT(slotSearchModeChanged(int)));
+	
+}
+
+void MvQDualSearchLinePanel::addSearchLineToLeft(MvQAbstractSearchLine* item,QWidget *itemId)
+{
+	if(item && itemId)
+	{
+	  	leftItems_[itemId]=item;
+		itemLayout_->addWidget(item);
+		setCurrentSearchLineById(itemId);
+	}	
+}
+
+void MvQDualSearchLinePanel::addSearchLineToRight(MvQAbstractSearchLine* item,QWidget *itemId)
+{
+	if(item && itemId)
+	{
+	  	rightItems_[itemId]=item;
+		itemLayout_->addWidget(item);
+		setCurrentSearchLineById(itemId);
+	}	
+}
+
+void MvQDualSearchLinePanel::slotFindNext(bool)
+{
+	if(isVisible() == false)
+		return;
+	
+  	QWidget *w=itemLayout_->currentWidget();
+	if(w)
+	{
+	  	MvQAbstractSearchLine* item=static_cast<MvQAbstractSearchLine*>(w);
+		if(item)
+		{
+		  	item->slotFindNext();
+		}		
+	}	
+}
+  
+void MvQDualSearchLinePanel::slotFindPrev(bool)
+{
+	if(isVisible() == false)
+		return;
+	
+  	QWidget *w=itemLayout_->currentWidget();
+	if(w)
+	{
+	  	MvQAbstractSearchLine* item=static_cast<MvQAbstractSearchLine*>(w);
+		if(item)
+		{
+		  	item->slotFindPrev();
+		}		
+	}	
+}
+  
+void MvQDualSearchLinePanel::slotSearchModeChanged(int index)
+{
+	if(index==SearchLeftItems && currentLeftItem_)
+	{  
+	  	itemLayout_->setCurrentWidget(currentLeftItem_);
+	}
+	else if(index==SearchRightItems && currentRightItem_)
+	{  
+	  	itemLayout_->setCurrentWidget( currentRightItem_);
+	}
+}  
+
+
+void MvQDualSearchLinePanel::setCurrentSearchLineById(QWidget *itemId)
+{
+	if(!itemId)
+	{
+	 	setEnabled(false); 	
+		return;
+	}
+	else
+	{
+	  	setEnabled(true);
+	}	
+	  
+	if(leftItems_.find(itemId) != leftItems_.end())
+	{
+		currentLeftItem_=leftItems_[itemId];
+		if(searchModeCb_->currentIndex() == SearchLeftItems)
+		{
+			itemLayout_->setCurrentWidget(currentLeftItem_);	
+		}  
+	}
+	else if(rightItems_.find(itemId) != rightItems_.end())
+	{
+		currentRightItem_=rightItems_[itemId];
+		if(searchModeCb_->currentIndex() == SearchRightItems)
+		{
+			itemLayout_->setCurrentWidget(currentRightItem_);	
+		}   
+	}  
+}	
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQSearchLinePanel.h b/src/libMvQtGui/MvQSearchLinePanel.h
new file mode 100644
index 0000000..b96c9aa
--- /dev/null
+++ b/src/libMvQtGui/MvQSearchLinePanel.h
@@ -0,0 +1,65 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQSearchLinePanel_H
+#define MvQSearchLinePanel_H
+
+#include <QMap>
+#include <QWidget>
+
+class QComboBox;
+class QStackedLayout;
+
+class MvQAbstractSearchLine;
+
+class MvQSearchLinePanel : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MvQSearchLinePanel();
+	void addSearchLine(MvQAbstractSearchLine*,QWidget*);
+	void setCurrentSearchLineById(QWidget*);
+
+public slots:
+	void slotFindNext(bool);
+	void slotFindPrev(bool);
+  
+protected:
+	QStackedLayout* itemLayout_;
+	QMap<QWidget*,MvQAbstractSearchLine*> items_;	
+};
+
+
+class MvQDualSearchLinePanel : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MvQDualSearchLinePanel();
+	void addSearchLineToLeft(MvQAbstractSearchLine*,QWidget*);
+	void addSearchLineToRight(MvQAbstractSearchLine*,QWidget*);
+	void setCurrentSearchLineById(QWidget*);
+
+public slots:
+	void slotFindNext(bool);
+	void slotFindPrev(bool);
+	void slotSearchModeChanged(int);
+  
+protected:
+	enum SearchMode {SearchLeftItems=0, SearchRightItems=1};
+  	QStackedLayout* itemLayout_;
+	MvQAbstractSearchLine* currentLeftItem_;
+	MvQAbstractSearchLine* currentRightItem_;
+	QMap<QWidget*,MvQAbstractSearchLine*> leftItems_;
+	QMap<QWidget*,MvQAbstractSearchLine*> rightItems_;
+	QComboBox* searchModeCb_;	
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQService.cc b/src/libMvQtGui/MvQService.cc
new file mode 100644
index 0000000..878cd67
--- /dev/null
+++ b/src/libMvQtGui/MvQService.cc
@@ -0,0 +1,41 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QSocketNotifier>
+
+#include "MvQService.h"
+
+MvQService::MvQService(const char* name) : 
+	MvService(name)
+{
+}
+
+MvQService::~MvQService()
+{
+}
+
+
+void MvQService::setupSocketNotifier()
+{
+	// Create socket notifier
+	// The dataReceived function will be called everytime
+	// there is data available in the socket
+	QSocketNotifier *sn = new QSocketNotifier( Id->s->soc, QSocketNotifier::Read);
+	QObject::connect(sn, SIGNAL(activated(int)),
+					this, SLOT(slotDataReceived(int)));
+								
+}  
+
+void MvQService::slotDataReceived(int)
+{
+	//Process data from the socket
+	process_service(Id->s);
+}
+
diff --git a/src/libMvQtGui/MvQService.h b/src/libMvQtGui/MvQService.h
new file mode 100644
index 0000000..5e431b6
--- /dev/null
+++ b/src/libMvQtGui/MvQService.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQService_H
+#define MvQService_H
+
+#include <QObject>
+
+#include "MvRequest.h"
+#include "MvProtocol.h"
+#include "MvService.h"
+
+class MvQService : public QObject, public MvService
+{
+   Q_OBJECT
+
+public:
+	MvQService(const char* name=NULL);
+	virtual ~MvQService();
+
+public slots:
+	void slotDataReceived(int);
+
+protected:
+    	void setupSocketNotifier();
+  
+private:
+	// No copy allowed
+	MvQService(const MvQService&);
+	MvQService& operator=(const MvQService&){return *this;}
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQStackedEditor.cc b/src/libMvQtGui/MvQStackedEditor.cc
new file mode 100644
index 0000000..b27394c
--- /dev/null
+++ b/src/libMvQtGui/MvQStackedEditor.cc
@@ -0,0 +1,92 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQStackedEditor.h"
+
+#include <QDialogButtonBox>
+#include <QHBoxLayout>
+#include <QListWidget>
+#include <QPushButton>
+#include <QStackedWidget>
+#include <QVBoxLayout>
+
+MvQStackedEditor::MvQStackedEditor(QString title,QWidget *parent) : QDialog(parent)
+{
+     	list_ = new QListWidget(this);
+     	//list_->setFlow(QListView::LeftToRight); 
+	//list_->setViewMode(QListView::IconMode);
+     	//list_->setIconSize(QSize(32, 32));
+     	//list_->setGridSize(QSize(48, 48));
+	list_->setMovement(QListView::Static);
+    	list_->setMaximumWidth(150);
+     	//list_->setSpacing(5);
+
+    	page_ = new QStackedWidget;
+	/*foreach(MvQPageDefinition* p,pageLst)
+	{
+     		addPage(p->widget,p->icon,p->title);
+	}
+
+     	list_->setCurrentRow(0);*/
+
+
+	// Buttonbox
+	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+                                      | QDialogButtonBox::Cancel);
+ 
+	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+     	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+	//QPushButton *closePb = new QPushButton(tr("Close"));
+     	//connect(closePb, SIGNAL(clicked()), this, SLOT(close()));
+
+     	//QHBoxLayout *horizontalLayout = new QHBoxLayout;
+     	//horizontalLayout->addWidget(list_);
+     	//horizontalLayout->addWidget(page_, 1);
+
+     	/*QHBoxLayout *buttonsLayout = new QHBoxLayout;
+    	buttonsLayout->addStretch(1);
+     	buttonsLayout->addWidget(closePb);*/
+
+     	QVBoxLayout *mainLayout = new QVBoxLayout;
+ 	QHBoxLayout *hb=new QHBoxLayout;
+	
+	hb->addWidget(list_);
+    	hb->addWidget(page_,1);
+     	//mainLayout->addStretch(1);
+     	//mainLayout->addSpacing(12);
+ 	mainLayout->addLayout(hb);
+	
+	mainLayout->addWidget(buttonBox);
+     	setLayout(mainLayout);
+
+     	setWindowTitle(title);
+
+	connect(list_,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
+                this, SLOT(slotChangePage(QListWidgetItem*,QListWidgetItem*)));
+}
+
+void MvQStackedEditor::addPage(QWidget *w,QIcon icon,QString txt)
+{
+	QListWidgetItem *item = new QListWidgetItem(list_);
+     	//item->setIcon(icon);
+     	item->setText(txt);
+     	//item->setTextAlignment(Qt::AlignHCenter);
+     	item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+
+	page_->addWidget(w);
+}
+
+void MvQStackedEditor::slotChangePage(QListWidgetItem *current, QListWidgetItem *previous)
+{
+     if (!current)
+         current = previous;
+
+     page_->setCurrentIndex(list_->row(current));
+ }
diff --git a/src/libMvQtGui/MvQStackedEditor.h b/src/libMvQtGui/MvQStackedEditor.h
new file mode 100644
index 0000000..9fe0f27
--- /dev/null
+++ b/src/libMvQtGui/MvQStackedEditor.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQStackedEditor_H
+#define MvQStackedEditor_H
+
+#include <QDialog>
+#include <QIcon>
+
+class QListWidget;
+class QListWidgetItem;
+class QStackedWidget;
+
+class MvQStackedEditor : public QDialog
+{
+     Q_OBJECT
+
+ public:
+     MvQStackedEditor(QString,QWidget *parent=0);
+
+ public slots:
+     void slotChangePage(QListWidgetItem *current, QListWidgetItem *previous);
+
+     void addPage(QWidget*,QIcon,QString);
+     
+ protected:
+     QListWidget*    list_;
+     QStackedWidget* page_;
+ };
+
+ #endif
diff --git a/src/libMvQtGui/MvQTabManager.cc b/src/libMvQtGui/MvQTabManager.cc
new file mode 100644
index 0000000..8bbc3c5
--- /dev/null
+++ b/src/libMvQtGui/MvQTabManager.cc
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QTabWidget>
+#include <QWidget>
+
+#include "MvQTabManager.h"
+
+MvQTabManager::MvQTabManager(QTabWidget *w) : tab_(w) {}
+
+
+void MvQTabManager::addItem(QWidget *w,QString name,QAction *action)
+{
+	widget_.push_back(w);
+	name_.push_back(name);
+	action_.push_back(action);
+
+	if(action)
+	{
+		connect(action,SIGNAL(toggled(bool)),
+		this,SLOT(slotChangeViewStatus(bool)));
+	}
+
+	connect(tab_,SIGNAL(tabCloseRequested(int)),
+		this,SLOT(slotRemoveTab(int)));
+
+}
+
+void MvQTabManager::setAction(int index,QAction *action)
+{
+	action_[index]=action;
+
+	connect(action,SIGNAL(toggled(bool)),
+		this,SLOT(slotChangeViewStatus(bool)));
+
+}
+
+/*QAction* MvQTabManager::action(QWidget* w)
+{
+	int index=widget_.indexOf(w);
+	return action_[index];
+}*/
+
+void  MvQTabManager::slotChangeViewStatus(bool state)
+{
+	QObject *obj=sender();
+	QAction *action = static_cast<QAction*>(obj);
+	int index=action_.indexOf(action);
+
+	if(state)
+	{
+		tab_->addTab(widget_[index],tr(name_[index].toStdString().c_str()));
+	}
+	else
+	{
+		tab_->removeTab(tab_->indexOf(widget_[index]));
+	}
+}
+
+void  MvQTabManager::slotRemoveTab(int index)
+{
+	action_[index]->setChecked(false);
+}
diff --git a/src/libMvQtGui/MvQTabManager.h b/src/libMvQtGui/MvQTabManager.h
new file mode 100644
index 0000000..47662e3
--- /dev/null
+++ b/src/libMvQtGui/MvQTabManager.h
@@ -0,0 +1,41 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQTabManager_H
+#define MvQTabManager_H
+
+#include <QList>
+#include <QObject>
+#include <QString>
+
+class QAction;
+class QTabWidget;
+class QWidget;
+
+class MvQTabManager : public QObject
+{
+	Q_OBJECT
+
+public:
+	MvQTabManager(QTabWidget*);
+	void addItem(QWidget*,QString,QAction *action=0);
+	void setAction(int,QAction*);
+
+public slots:
+	void slotChangeViewStatus(bool);
+	void slotRemoveTab(int);
+
+protected:
+	QTabWidget* tab_;
+	QList<QWidget*> widget_;
+	QList<QAction*> action_;
+	QList<QString> name_;
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQTextDialog.cc b/src/libMvQtGui/MvQTextDialog.cc
new file mode 100644
index 0000000..91517d2
--- /dev/null
+++ b/src/libMvQtGui/MvQTextDialog.cc
@@ -0,0 +1,56 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQTextDialog.h"
+
+#include <QApplication>
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QStyle>
+#include <QTextEdit>
+#include <QVBoxLayout>
+
+MvQTextDialog::MvQTextDialog(QString title,QString labelText,QString customOkLabel,QWidget *parent) : QDialog(parent)
+{
+     	edit_= new QTextEdit(this);
+
+	QLabel *label=new QLabel(labelText);
+
+	QDialogButtonBox *buttonBox = new QDialogButtonBox;
+
+	if(!customOkLabel.isEmpty())
+	{
+		QPushButton *okPb = new QPushButton(customOkLabel);
+		okPb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton)); 
+		
+		buttonBox->addButton(okPb,QDialogButtonBox::AcceptRole);
+	}
+	else
+	{
+		buttonBox->addButton(QDialogButtonBox::Ok);
+	}
+	buttonBox->addButton(QDialogButtonBox::Cancel);
+				
+	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+     	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+     	QVBoxLayout *mainLayout = new QVBoxLayout;
+ 	mainLayout->addWidget(label);
+	mainLayout->addWidget(edit_);
+     	mainLayout->addWidget(buttonBox);
+     	setLayout(mainLayout);
+
+     	setWindowTitle(title);
+}
+
+QString MvQTextDialog::text() 
+{
+	return edit_->toPlainText();
+}
diff --git a/src/libMvQtGui/MvQTextDialog.h b/src/libMvQtGui/MvQTextDialog.h
new file mode 100644
index 0000000..1c91136
--- /dev/null
+++ b/src/libMvQtGui/MvQTextDialog.h
@@ -0,0 +1,28 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQTextDialog_H
+#define MvQTextDialog_H
+
+#include <QDialog>
+
+class QTextEdit;
+
+class MvQTextDialog : public QDialog
+{
+ public:
+     MvQTextDialog(QString,QString,QString,QWidget *parent=0);
+     QString text();	
+ 
+protected:
+     QTextEdit*      edit_;
+ 
+ };
+
+ #endif
diff --git a/src/libMvQtGui/MvQTextEditSearchLine.cc b/src/libMvQtGui/MvQTextEditSearchLine.cc
new file mode 100644
index 0000000..4cb8cd2
--- /dev/null
+++ b/src/libMvQtGui/MvQTextEditSearchLine.cc
@@ -0,0 +1,106 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QTextEdit>
+
+#include "MvQTextEditSearchLine.h"
+
+
+MvQTextEditSearchLine::MvQTextEditSearchLine(QTextEdit *editor,QString searchLabelText) :
+	MvQAbstractSearchLine(searchLabelText), editor_(editor)
+{
+
+}
+
+MvQTextEditSearchLine::~MvQTextEditSearchLine()
+{
+
+}
+
+void MvQTextEditSearchLine::slotFind(QString txt)
+{
+	QTextCursor cursor(editor_->textCursor());	
+	cursor.movePosition(QTextCursor::StartOfWord);
+	editor_->setTextCursor(cursor);
+	
+	if(editor_->find(txt)==false)
+	{
+      		cursor=editor_->textCursor();
+		cursor.movePosition(QTextCursor::Start);
+		editor_->setTextCursor(cursor);
+		updateButtons(editor_->find(txt));
+	}
+	else
+	{
+		updateButtons(true);
+	}
+
+	//QTextDocument::FindFlags flags;
+
+    /*if(checkBox_backward->checkState() == Qt::Checked)
+    {
+        flags = QTextDocument::FindBackward;
+    }
+    if(checkBox_case->checkState() == Qt::Checked) 
+    {
+        flags = flags | QTextDocument::FindCaseSensitively;
+    }
+    if(checkBox_word->checkState() == Qt::Checked)
+    {
+        flags = flags | QTextDocument::FindWholeWords;
+    }*/
+
+	/*if(editor_->find(txt))
+    	{
+        	//statusMessage("", 0);
+    	}
+    	else
+    	{
+        if (flags & QTextDocument::FindBackward)
+            statusMessage(tr("Reached top of file"),    5000);
+        else
+            statusMessage(tr("Reached bottom of file"), 5000);
+    }*/
+}
+
+void MvQTextEditSearchLine::slotFindNext()
+{
+	if(status_==true)
+	{
+		if(editor_->find(searchLine_->text()) == false)
+		{
+      			QTextCursor cursor(editor_->textCursor());
+      			cursor.movePosition(QTextCursor::Start);
+			editor_->setTextCursor(cursor);
+			editor_->find(searchLine_->text());
+		}
+	}
+}
+
+void MvQTextEditSearchLine::slotFindPrev()
+{
+	QTextDocument::FindFlags flags=QTextDocument::FindBackward;
+
+	if(status_==true)
+	{
+		if(editor_->find(searchLine_->text(),flags) == false)
+		{
+      			QTextCursor cursor(editor_->textCursor());
+      			cursor.movePosition(QTextCursor::End);
+			editor_->setTextCursor(cursor);
+			editor_->find(searchLine_->text(),flags);
+		}
+	}
+}
diff --git a/src/libMvQtGui/MvQTextEditSearchLine.h b/src/libMvQtGui/MvQTextEditSearchLine.h
new file mode 100644
index 0000000..7b550ae
--- /dev/null
+++ b/src/libMvQtGui/MvQTextEditSearchLine.h
@@ -0,0 +1,35 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQTextEditSearchLine_H
+#define MvQTextEditSearchLine_H
+
+class QTextEdit;
+
+#include "MvQAbstractSearchLine.h" 
+
+class MvQTextEditSearchLine : public MvQAbstractSearchLine
+{
+	Q_OBJECT
+
+public:
+	MvQTextEditSearchLine(QTextEdit*,QString);
+	~MvQTextEditSearchLine(); 
+	
+public slots:
+	void slotFind(QString);
+	void slotFindNext();
+	void slotFindPrev();
+
+protected:
+	QTextEdit* editor_;
+
+};
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQTreeView.cc b/src/libMvQtGui/MvQTreeView.cc
new file mode 100644
index 0000000..7a3ad75
--- /dev/null
+++ b/src/libMvQtGui/MvQTreeView.cc
@@ -0,0 +1,167 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include <QKeyEvent>
+
+#include "MvQTreeView.h"
+
+//#include <iostream>
+
+MvQTreeView::MvQTreeView(QWidget *parent) : QTreeView(parent) 
+{
+	activatedByKeyNavigation_=false;
+	columnToDrag_=0;
+}
+
+void MvQTreeView::keyReleaseEvent(QKeyEvent *event)
+{
+	if(activatedByKeyNavigation_)
+	{
+		if(event->isAutoRepeat() == false  &&
+           	  (event->key() == Qt::Key_Up || event->key() == Qt::Key_Down || 
+	    	  event->key() == Qt::Key_PageUp || event->key() == Qt::Key_PageDown ||
+	    	  event->key() == Qt::Key_Home || event->key() == Qt::Key_End))
+		{		
+			emit activated(currentIndex());
+		}
+	}
+	else
+	{
+		QTreeView::keyReleaseEvent(event);
+	}
+}
+
+void MvQTreeView::keyboardSearch(const QString & search)
+{
+
+}
+
+bool MvQTreeView::dragEnabled()
+{
+	return (dragDropMode() != DropOnly && dragDropMode() != NoDragDrop);
+}
+
+bool MvQTreeView::dropEnabled()
+{
+	return (dragDropMode() != DragOnly && dragDropMode() != NoDragDrop);
+}
+
+//===========================
+// Drag
+//===========================
+/*
+void MvQTreeView::mousePressEvent(QMouseEvent *event)
+{
+	if(dragEnabled() &&
+	   event->button() == Qt::LeftButton)
+	{
+		startPos_=event->pos();
+	}
+	
+	QTreeView::mousePressEvent(event);
+}
+
+void MvQTreeView::mouseMoveEvent(QMouseEvent *event)
+{
+	if(dragEnabled() &&
+	   event->buttons() & Qt::LeftButton)
+	{
+		int distance = (event->pos() - startPos_).manhattanLength();
+		if(distance >= QApplication::startDragDistance())
+		{
+			performDrag();
+		}
+	}
+	
+	QTreeView::mouseMoveEvent(event);
+}
+
+void MvQTreeView::performDrag()
+{
+	if(!dragEnabled())
+		return;
+
+	
+	QAbstractItemModel* model = (QAbstractItemModel*) this->model();	
+	QString txt;
+
+	if(columnToDrag_ != currentIndex().column())
+	{
+		QModelIndex index=model->index(currentIndex().row(),columnToDrag_,currentIndex().parent());
+		txt = model->data(index).toString();
+	}
+	else
+	{
+		txt = model->data(currentIndex()).toString();
+	}
+ 
+	if(!txt.isEmpty())
+	{
+		QMimeData *mimeData = new QMimeData;	
+		mimeData->setText(txt);
+		
+		QDrag *drag = new QDrag(this);
+		drag->setMimeData(mimeData);
+		if(drag->exec(Qt::CopyAction)  == Qt::CopyAction)
+		{
+		}
+	}
+}
+
+//===========================
+// Drop
+//===========================
+
+void MvQTreeView::dragEnterEvent(QDragEnterEvent *event)
+{
+	if(!dropEnabled())
+		return;
+
+	MvQTreeView *source = qobject_cast<MvQTreeView*>(event->source());
+	
+	if(source)
+	{
+		event->setDropAction(Qt::MoveAction);
+		event->accept();
+	}
+}
+
+void MvQTreeView::dragMoveEvent(QDragMoveEvent *event)
+{
+	if(!dropEnabled())
+		return;
+
+	MvQTreeView *source = qobject_cast<MvQTreeView*>(event->source());
+	
+	if(source)
+	{
+		event->setDropAction(Qt::MoveAction);
+		event->accept();
+	}
+}
+
+void MvQTreeView::dropEvent(QDropEvent *event)
+{
+	if(!dropEnabled())
+		return;
+
+	MvQTreeView *source = qobject_cast<MvQTreeView*>(event->source());
+	
+	if(source)
+	{
+		qDebug() << "Drop text: " << event->mimeData()->text();
+		event->setDropAction(Qt::MoveAction);
+		event->accept();
+	}
+
+	emit dropAccepted(event->mimeData()->text());
+}
+*/
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQTreeView.h b/src/libMvQtGui/MvQTreeView.h
new file mode 100644
index 0000000..ed86568
--- /dev/null
+++ b/src/libMvQtGui/MvQTreeView.h
@@ -0,0 +1,53 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQTreeView_H
+#define MvQTreeView_H
+
+#include <QPoint>
+#include <QTreeView>
+
+using namespace std;
+
+
+class MvQTreeView : public QTreeView
+{
+	Q_OBJECT
+
+public:
+	MvQTreeView(QWidget *parent=0);
+	//~MvQTreeView(); 
+	void keyboardSearch(const QString &);
+	void setActvatedByKeyNavigation(bool b) {activatedByKeyNavigation_=b;}
+	void setColumnToDrag(int i) {columnToDrag_=i;} 
+
+signals:
+	//void dropAccepted(QString);
+
+protected:
+	void keyReleaseEvent(QKeyEvent*);
+	/*void mousePressEvent(QMouseEvent*);
+	void mouseMoveEvent(QMouseEvent*);
+	void dragEntermouseMoveEvent(QMouseEvent*);
+	void dragEnterEvent(QDragEnterEvent *);
+	void dragMoveEvent(QDragMoveEvent *);
+	void dropEvent(QDropEvent *);	
+	void performDrag();*/
+
+	bool dragEnabled();
+	bool dropEnabled();
+
+	bool activatedByKeyNavigation_;
+	QPoint startPos_;
+
+	int columnToDrag_;
+
+};
+
+#endif
diff --git a/src/libMvQtGui/MvQTreeViewSearchLine.cc b/src/libMvQtGui/MvQTreeViewSearchLine.cc
new file mode 100644
index 0000000..53fbaa0
--- /dev/null
+++ b/src/libMvQtGui/MvQTreeViewSearchLine.cc
@@ -0,0 +1,248 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAbstractItemModel>
+#include <QComboBox>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QHeaderView>
+#include <QLabel>
+#include <QLineEdit>
+#include <QTreeView>
+
+#include "MvQTreeViewSearchLine.h"
+
+MvQTreeViewSearchLine::MvQTreeViewSearchLine(QTreeView *view,int searchColumn,QString searchLabelText) :
+	MvQAbstractSearchLine(searchLabelText), view_(view), searchColumn_(searchColumn)
+{
+	connect(view_->model(),SIGNAL(modelReset()),
+		this,SLOT(slotUpdateColumns()));
+	
+	connect(view_->header(),SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)),
+		this,SLOT(slotSortingHappened(int,Qt::SortOrder)));	
+		
+	connect(this,SIGNAL(indexSelected(const QModelIndex&)),
+		view_,SIGNAL(clicked(const QModelIndex&)));
+		
+	label_->setText(tr("&Find in column:"));
+	
+	currentResultItem_=0;	
+	
+	for(int i=0; i < view_->model()->columnCount(); i++)
+	{
+	  	columns_[view_->model()->headerData(i,Qt::Horizontal).toString()]=i;
+	}	
+
+	columnCb_=new QComboBox;
+	columnCb_->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+	
+	qDebug() << "layout count" << layout_->count();
+	
+	for(int index=0; index < layout_->count(); index++)
+	{
+	  	qDebug() << "layout count" << layout_->count();
+		
+		if(layout_->itemAt(index)->widget() == searchLine_)
+		{  
+			layout_->insertWidget(index,columnCb_);  //!!!!!!!!
+			break;
+		}
+	}	
+	
+	columnCb_->addItems(columns_.keys());
+
+	int i=0;
+	foreach(QString s,columns_.keys())
+	{
+		if(columns_[s]==searchColumn_)
+		{
+			columnCb_->setCurrentIndex(i);
+		}
+		
+		i++;	
+	}
+	
+	connect(columnCb_, SIGNAL(currentIndexChanged(const QString&)), 
+		this, SLOT(slotSearchColumnChanged(const QString&)));		
+}
+
+
+MvQTreeViewSearchLine::~MvQTreeViewSearchLine()
+{
+
+}
+
+void MvQTreeViewSearchLine::clear()
+{
+	currentResultItem_=0;
+	resultItems_.clear();
+	
+	MvQAbstractSearchLine::clear();
+}	
+  
+void MvQTreeViewSearchLine::slotFind(QString txt)
+{
+	if(txt.simplified().isEmpty())
+	{
+	 	currentResultItem_=0;
+		resultItems_.clear();
+		updateButtons(false);
+		return;
+	}	
+  
+  	QModelIndex current=view_->currentIndex();
+	if(!current.isValid())
+		current=view_->model()->index(0,0);
+		
+	current=view_->model()->index(current.row(),searchColumn_,current.parent());
+	
+  	resultItems_=view_->model()->match(current,
+			    Qt::DisplayRole,txt,-1,
+		            Qt::MatchStartsWith | Qt::MatchRecursive | Qt::MatchWrap);
+  
+	if(resultItems_.count() > 0)
+	{
+		selectIndex(resultItems_[0]);
+		currentResultItem_=0;
+		updateButtons(true);
+	}  
+	else
+	{  
+	  	currentResultItem_=0;
+		updateButtons(false);
+	}	
+	
+}
+
+void MvQTreeViewSearchLine::slotFindNext()
+{
+	if(status_==true && resultItems_.count() > 0)
+	{
+		currentResultItem_++;
+		if(currentResultItem_ >= resultItems_.count())	
+		{
+		  	currentResultItem_=0;
+		}
+		selectIndex(resultItems_[currentResultItem_]);
+	}
+}
+
+void MvQTreeViewSearchLine::slotFindPrev()
+{
+	if(status_==true && resultItems_.count() > 0)
+	{
+		currentResultItem_--;
+		if(currentResultItem_ <0)	
+		{
+		  	currentResultItem_=resultItems_.count()-1;
+		}
+		selectIndex(resultItems_[currentResultItem_]);
+	}
+}
+
+void MvQTreeViewSearchLine::slotSearchColumnChanged(const QString& text)
+{
+	if(columns_.find(text) != columns_.end())
+	{
+	  	if(columns_[text] != searchColumn_)
+		{
+		  	searchColumn_=columns_[text];
+			clear();
+		}	
+			
+	}
+}
+
+void MvQTreeViewSearchLine::slotUpdateColumns()	
+{		
+	//Check if columns have changed
+	if(columns_.size() == view_->model()->columnCount())
+	{  
+		bool equal=true;
+		for(int i=0; i < view_->model()->columnCount(); i++)
+		{
+  			QString s=view_->model()->headerData(i,Qt::Horizontal).toString();
+			if(columns_.find(s) == columns_.end() || 
+			   columns_[s] != i)
+			{
+			  	equal=false;
+				break;
+			}
+		}
+		if(equal)
+		{
+		  	slotFindNext();
+			return;
+		}			
+	}	
+			  
+  	//If the columns have changed reset everything
+
+	QString searchColumnName;
+	foreach(QString s,columns_.keys())
+	{
+		if(columns_[s] == searchColumn_)
+		{
+			searchColumnName=s;
+			break;
+		}
+	}
+	
+	columns_.clear();	
+	for(int i=0; i < view_->model()->columnCount(); i++)
+	{
+	  	QString s=view_->model()->headerData(i,Qt::Horizontal).toString();
+		
+		columns_[s]=i;
+		if(searchColumnName==s)
+		{
+			searchColumn_=i;
+		}	
+	}
+
+	if(searchColumn_ <0 || searchColumn_ >= view_->model()->columnCount())
+	{
+		searchColumn_=0;
+	}	
+		
+	columnCb_->disconnect(SIGNAL(currentIndexChanged(const QString&)));
+	columnCb_->clear();
+	
+	columnCb_->addItems(columns_.keys());
+
+	int i=0;
+	foreach(QString s,columns_.keys())
+	{
+		if(columns_[s]==searchColumn_)
+		{
+			columnCb_->setCurrentIndex(i);
+		}
+		
+		i++;	
+	}
+	
+	connect(columnCb_, SIGNAL(currentIndexChanged(const QString&)), 
+		this, SLOT(slotSearchColumnChanged(const QString&)));		
+
+
+	clear();
+}
+
+
+void MvQTreeViewSearchLine::slotSortingHappened(int,Qt::SortOrder)
+{
+	if(isVisible())
+		slotFind(searchLine_->text());	  
+}  
+
+void MvQTreeViewSearchLine::selectIndex(const QModelIndex& index)
+{
+	view_->setCurrentIndex(index);
+	emit indexSelected(index);
+}
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQTreeViewSearchLine.h b/src/libMvQtGui/MvQTreeViewSearchLine.h
new file mode 100644
index 0000000..b58f6d8
--- /dev/null
+++ b/src/libMvQtGui/MvQTreeViewSearchLine.h
@@ -0,0 +1,51 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQTreeViewSearchLine_H
+#define MvQTreeViewSearchLine_H
+
+#include "MvQAbstractSearchLine.h" 
+
+#include <QModelIndex>
+
+class QComboBox;
+class QTreeView;
+
+class MvQTreeViewSearchLine : public MvQAbstractSearchLine
+{
+	Q_OBJECT
+
+public:
+	MvQTreeViewSearchLine(QTreeView*,int,QString);
+	~MvQTreeViewSearchLine(); 
+	void clear();
+	
+public slots:
+	void slotFind(QString);
+	void slotFindNext();
+	void slotFindPrev();
+	void slotSearchColumnChanged(const QString&);
+	void slotUpdateColumns();
+	void slotSortingHappened(int,Qt::SortOrder);
+
+signals:
+	void indexSelected(const QModelIndex&);	
+  
+protected:	
+	void selectIndex(const QModelIndex&);
+  	
+  	QTreeView* view_;
+	int searchColumn_;
+	QMap<QString,int> columns_;
+	QComboBox* columnCb_;
+	QModelIndexList resultItems_;
+	int currentResultItem_;	
+};
+
+#endif
\ No newline at end of file
diff --git a/src/libMvQtGui/MvQX11Application.cc b/src/libMvQtGui/MvQX11Application.cc
new file mode 100644
index 0000000..95fd190
--- /dev/null
+++ b/src/libMvQtGui/MvQX11Application.cc
@@ -0,0 +1,130 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QtGui>
+#include <QX11Info>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+#include <MvTemplates.h>
+
+#include "MvQX11Application.h"
+
+MvQX11Application::MvQX11Application(int& ac, char** av, const char* name) : 
+	QApplication(ac,av)
+{
+}
+
+MvQX11Application::~MvQX11Application()
+{
+}
+
+bool MvQX11Application::x11EventFilter (XEvent *event)
+{
+	if(event->type != ClientMessage)
+		return QApplication::x11EventFilter(event);
+
+	XClientMessageEvent *e =(XClientMessageEvent*) event;
+
+	drop_.format(e->format);
+	char *s =XGetAtomName(QX11Info::display(), e->message_type );
+	
+	/* On 64-bit platforms, there appears to be a problem when using the data.l[]
+	   part of the XClientMessageEvent structure. This is most likely because it is
+	   defined as an array of longs, but it is intended as an array of 32-bit integers
+	   (e->format=32). When dealing with this array, some of the data is lost, probably
+	   because the internal 'X' code assumes 32-bit values. Therefore, we explicitly
+	   use an 'int' pointer to access this data structure so that we can use 32-bit
+	   values in it which is what it thinks it's getting. If 'int' is ever defined
+	   to be greater than 32, then this code will have to be revised. */
+	
+	int *iarray = (int *)&e->data.l[0];
+
+
+	if(strcmp(s,"ICON_DROP_WIN_ID") == 0)
+	{
+		drop_.clear();
+		drop_.winId(iarray[0]);
+		drop_.x(iarray[1]);
+		drop_.y(iarray[2]);
+		drop_.iconId(iarray[3]);
+	}
+
+	if(strcmp(s,"ICON_DROP_ICON_CLASS") == 0)
+	{
+		drop_.className(e->data.b);
+	}
+	if(strcmp(s,"ICON_DROP_ICON_NAME") == 0)
+	{
+		drop_.name(e->data.b);
+	}
+
+	if(strcmp(s,"ICON_DROP_WIN_NAME") == 0)
+	{
+		//drop_.window_name(e->data.b);
+	}
+		
+	if(strcmp(s,"ICON_DROP_BUF") == 0)
+	{
+		drop_.batchNumber(iarray[3]);
+	}
+	/*if(strcmp(s,"ICON_DROP_BUF_LEN") == 0)
+	{
+		cout << " buf len:" << e->data.l[0] << endl;
+	}*/
+
+	if(strcmp(s,"ICON_DROP_BUF_LEN_EXT") == 0)
+	{
+		drop_.fullNameLen(iarray[0]);
+	}
+
+	if(strcmp(s,"ICON_DROP_BUF_EXT") == 0)
+	{
+		// there seems to be a problem on 64-bit machines with the
+		// size of the XClientMessageEvent structure, causing some
+		// extra random bytes to be added to the string.
+		// Here we just ensure that we just copy 20 bytes (which is what it should be).
+		char name[25];
+		strncpy (name, e->data.b, 20);
+		name[20] = '\0';
+		drop_.appendToFullName(name);
+	}
+	else if(strcmp(s,"ICON_DROP_END") == 0)
+	{
+		  //acquire full name
+		drop_.finalizeFullName();
+
+		//send drop info to the appropriate function
+		emit sendDropInfo(&drop_);
+
+		//notify source that drop was successfully received
+		XClientMessageEvent cevent;
+		int *iarrayout = (int *)&cevent.data.l[0];
+		cevent.display = QX11Info::display(); //XtDisplay(widget);
+		cevent.window = drop_.winId(); //cb.remote_window
+		cevent.type = ClientMessage;
+		cevent.format = drop_.format();    // 32
+		iarrayout[0] = 1; //cb.accept_it
+		iarrayout[1] = drop_.iconId();
+		iarrayout[2] = e->window; //XtWindow(widget);
+		iarrayout[3] = 65537; //(cb.icon_no << 16) + cb.icon_count;
+		iarrayout[4] = drop_.batchNumber();	  //cb.icon_batch;
+		cevent.message_type = XInternAtom(QX11Info::display(),"ICON_DROP_ACK",False);
+
+		XSendEvent(QX11Info::display(),drop_.winId(),True,NoEventMask,(XEvent*)&cevent);
+		XFlush(QX11Info::display());
+		drop_.clear();
+	}
+
+	XFree(s);
+
+	return QApplication::x11EventFilter(event);
+}
+
diff --git a/src/libMvQtGui/MvQX11Application.h b/src/libMvQtGui/MvQX11Application.h
new file mode 100644
index 0000000..a873662
--- /dev/null
+++ b/src/libMvQtGui/MvQX11Application.h
@@ -0,0 +1,58 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQX11Application_H
+#define MvQX11Application_H
+
+#include <QtGui/QApplication>
+#include <QWidget>
+
+#include <MvRequest.h>
+#include <MvProtocol.h>
+#include <MvApplication.h>
+#include <qsocketnotifier.h>
+
+#include "MvQDragDrop.h"
+
+using namespace std;
+
+
+// ---------------------------------------------------------------------------
+// class MvQX11Application
+// This class is essentially just a QApplication class with the addition of
+// the ability to handle drag & drop events from the motif-based MetviewUI.
+// ---------------------------------------------------------------------------
+
+
+class MvQX11Application : public QApplication
+{
+   Q_OBJECT
+
+public:
+	// Constructor
+	MvQX11Application(int& ac, char** av, const char* name=NULL);
+
+	// Destructor
+	virtual ~MvQX11Application();
+
+	// Handle events
+	bool x11EventFilter (XEvent *);
+
+signals:
+	void sendDropInfo(MvQIconDropItem*);
+
+private:
+	// No copy allowed
+	MvQX11Application(const MvQX11Application&);
+	MvQX11Application& operator=(const MvQX11Application&){return *this;}
+
+	MvQIconDropItem drop_;
+};
+
+#endif
diff --git a/src/libMvQtGui/examiner.qrc b/src/libMvQtGui/examiner.qrc
new file mode 100644
index 0000000..cb11f69
--- /dev/null
+++ b/src/libMvQtGui/examiner.qrc
@@ -0,0 +1,9 @@
+<RCC>
+  <qresource prefix="examiner" > 
+    <file alias="fileInfo.svg">../images/fileInfo.svg</file>
+    <file alias="configure.svg">../images/configure.svg</file>
+    <file alias="log.svg">../images/log.svg</file>
+    <file alias="triangle_left.svg">../images/triangle_left.svg</file> 
+    <file alias="triangle_right.svg">../images/triangle_right.svg</file>
+  </qresource>
+</RCC>
diff --git a/src/libMvQtGui/find.qrc b/src/libMvQtGui/find.qrc
new file mode 100644
index 0000000..fde7e65
--- /dev/null
+++ b/src/libMvQtGui/find.qrc
@@ -0,0 +1,8 @@
+<RCC>
+  <qresource prefix="find" > 
+    <file alias="search.svg">../images/search.svg</file>
+    <file alias="next.svg">../images/arrow_down.svg</file>
+    <file alias="prev.svg">../images/arrow_up.svg</file>
+    <file alias="close.svg">../images/remove.svg</file>
+  </qresource>
+</RCC>
\ No newline at end of file
diff --git a/src/libMvQtGui/keyDialog.qrc b/src/libMvQtGui/keyDialog.qrc
new file mode 100644
index 0000000..8408e6d
--- /dev/null
+++ b/src/libMvQtGui/keyDialog.qrc
@@ -0,0 +1,18 @@
+<RCC>
+  <qresource prefix="keyDialog" >
+    <file alias="add.svg">../images/add.svg</file>
+    <file alias="arrow_down.svg">../images/arrow_down.svg</file>
+    <file alias="arrow_up.svg">../images/arrow_up.svg</file>
+    <file alias="arrow_left.svg">../images/arrow_left.svg</file>
+    <file alias="remove.svg">../images/remove.svg</file>
+    <file alias="key.svg">../images/key.svg</file>
+    <file alias="configure.svg">../images/configure.svg</file>
+    <file alias="profile.svg">../images/profile.svg</file>
+    <file alias="profile_add.svg">../images/profile_add.svg</file>
+    <file alias="profile_delete.svg">../images/profile_delete.svg</file>
+    <file alias="profile_import.svg">../images/profile_import.svg</file>
+    <file alias="profile_manage.svg">../images/profile_manage.svg</file>
+    <file alias="profile_save.svg">../images/profile_save.svg</file>
+    <file alias="profile_duplicate.svg">../images/profile_duplicate.svg</file>
+  </qresource>
+</RCC>
\ No newline at end of file
diff --git a/src/libMvQtGui/window.qrc b/src/libMvQtGui/window.qrc
new file mode 100644
index 0000000..ec0afea
--- /dev/null
+++ b/src/libMvQtGui/window.qrc
@@ -0,0 +1,7 @@
+<RCC>
+  <qresource prefix="window" > 
+    <file alias="metview_logo">../images/metview_logo.png</file>
+    <file alias="exit.svg">../images/exit.svg</file>
+    <file alias="configure.svg">../images/configure.svg</file>
+  </qresource>
+</RCC>
\ No newline at end of file
diff --git a/src/libMvQtUtil/Makefile.am b/src/libMvQtUtil/Makefile.am
new file mode 100644
index 0000000..69c41cf
--- /dev/null
+++ b/src/libMvQtUtil/Makefile.am
@@ -0,0 +1,35 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+
+noinst_LIBRARIES = lib/libMvQtUtil.a
+lib_libMvQtUtil_a_SOURCES = MvQKeyManager.cc \
+		MvQNetworkAccessManager.cc \
+		MvQNetworkProxyFactory.cc \
+		MvQObstatScatterData.cc \
+		MvQVisDefManager.cc \
+		MvQXmlQuery.cc \
+		MvQKeyManager.h MvQNetworkAccessManager.h MvQNetworkProxyFactory.h MvQObstatScatterData.h MvQVisDefManager.h MvQXmlQuery.h
+
+nodist_lib_libMvQtUtil_a_SOURCES = MvQNetworkAccessManager.moc.cpp
+
+lib_libMvQtUtil_a_CPPFLAGS =
+
+if METVIEW_ODB
+lib_libMvQtUtil_a_SOURCES += MvQOdbMetaData.cc MvQOdbMetaData.h
+lib_libMvQtUtil_a_CPPFLAGS += $(ODB_CPPFLAGS)
+endif
+
+lib_libMvQtUtil_a_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+lib_libMvQtUtil_a_CPPFLAGS += $(QT_CPPFLAGS) $(MAGPLUS_CPPFLAGS) $(AM_CPPFLAGS)
+BUILT_SOURCES = lib MvQNetworkAccessManager.moc.cpp
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+lib:
+	ln -s ../../lib lib
+
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp	
diff --git a/src/libMvQtUtil/Makefile.in b/src/libMvQtUtil/Makefile.in
new file mode 100644
index 0000000..38bb462
--- /dev/null
+++ b/src/libMvQtUtil/Makefile.in
@@ -0,0 +1,906 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+ at METVIEW_ODB_TRUE@am__append_1 = MvQOdbMetaData.cc MvQOdbMetaData.h
+ at METVIEW_ODB_TRUE@am__append_2 = $(ODB_CPPFLAGS)
+subdir = src/libMvQtUtil
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libMvQtUtil_a_AR = $(AR) $(ARFLAGS)
+lib_libMvQtUtil_a_LIBADD =
+am__lib_libMvQtUtil_a_SOURCES_DIST = MvQKeyManager.cc \
+	MvQNetworkAccessManager.cc MvQNetworkProxyFactory.cc \
+	MvQObstatScatterData.cc MvQVisDefManager.cc MvQXmlQuery.cc \
+	MvQKeyManager.h MvQNetworkAccessManager.h \
+	MvQNetworkProxyFactory.h MvQObstatScatterData.h \
+	MvQVisDefManager.h MvQXmlQuery.h MvQOdbMetaData.cc \
+	MvQOdbMetaData.h
+ at METVIEW_ODB_TRUE@am__objects_1 =  \
+ at METVIEW_ODB_TRUE@	lib_libMvQtUtil_a-MvQOdbMetaData.$(OBJEXT)
+am_lib_libMvQtUtil_a_OBJECTS =  \
+	lib_libMvQtUtil_a-MvQKeyManager.$(OBJEXT) \
+	lib_libMvQtUtil_a-MvQNetworkAccessManager.$(OBJEXT) \
+	lib_libMvQtUtil_a-MvQNetworkProxyFactory.$(OBJEXT) \
+	lib_libMvQtUtil_a-MvQObstatScatterData.$(OBJEXT) \
+	lib_libMvQtUtil_a-MvQVisDefManager.$(OBJEXT) \
+	lib_libMvQtUtil_a-MvQXmlQuery.$(OBJEXT) $(am__objects_1)
+nodist_lib_libMvQtUtil_a_OBJECTS =  \
+	lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.$(OBJEXT)
+lib_libMvQtUtil_a_OBJECTS = $(am_lib_libMvQtUtil_a_OBJECTS) \
+	$(nodist_lib_libMvQtUtil_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libMvQtUtil_a_SOURCES) \
+	$(nodist_lib_libMvQtUtil_a_SOURCES)
+DIST_SOURCES = $(am__lib_libMvQtUtil_a_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+noinst_LIBRARIES = lib/libMvQtUtil.a
+lib_libMvQtUtil_a_SOURCES = MvQKeyManager.cc \
+	MvQNetworkAccessManager.cc MvQNetworkProxyFactory.cc \
+	MvQObstatScatterData.cc MvQVisDefManager.cc MvQXmlQuery.cc \
+	MvQKeyManager.h MvQNetworkAccessManager.h \
+	MvQNetworkProxyFactory.h MvQObstatScatterData.h \
+	MvQVisDefManager.h MvQXmlQuery.h $(am__append_1)
+nodist_lib_libMvQtUtil_a_SOURCES = MvQNetworkAccessManager.moc.cpp
+lib_libMvQtUtil_a_CPPFLAGS = $(am__append_2) $(QT_CPPFLAGS) \
+	$(MAGPLUS_CPPFLAGS) $(AM_CPPFLAGS)
+lib_libMvQtUtil_a_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+BUILT_SOURCES = lib MvQNetworkAccessManager.moc.cpp
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libMvQtUtil/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libMvQtUtil/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libMvQtUtil.a: $(lib_libMvQtUtil_a_OBJECTS) $(lib_libMvQtUtil_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libMvQtUtil.a
+	$(AM_V_AR)$(lib_libMvQtUtil_a_AR) lib/libMvQtUtil.a $(lib_libMvQtUtil_a_OBJECTS) $(lib_libMvQtUtil_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libMvQtUtil.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+lib_libMvQtUtil_a-MvQKeyManager.o: MvQKeyManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQKeyManager.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Tpo -c -o lib_libMvQtUtil_a-MvQKeyManager.o `test -f 'MvQKeyManager.cc' || echo '$(srcdir)/'`MvQKeyManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyManager.cc' object='lib_libMvQtUtil_a-MvQKeyManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQKeyManager.o `test -f 'MvQKeyManager.cc' || echo '$(srcdir)/'`MvQKeyManager.cc
+
+lib_libMvQtUtil_a-MvQKeyManager.obj: MvQKeyManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQKeyManager.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Tpo -c -o lib_libMvQtUtil_a-MvQKeyManager.obj `if test -f 'MvQKeyManager.cc'; then $(CYGPATH_W) 'MvQKeyManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQKeyManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQKeyManager.cc' object='lib_libMvQtUtil_a-MvQKeyManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQKeyManager.obj `if test -f 'MvQKeyManager.cc'; then $(CYGPATH_W) 'MvQKeyManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQKeyManager.cc'; fi`
+
+lib_libMvQtUtil_a-MvQNetworkAccessManager.o: MvQNetworkAccessManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQNetworkAccessManager.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Tpo -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.o `test -f 'MvQNetworkAccessManager.cc' || echo '$(srcdir)/'`MvQNetworkAccessManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQNetworkAccessManager.cc' object='lib_libMvQtUtil_a-MvQNetworkAccessManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.o `test -f 'MvQNetworkAccessManager.cc' || echo '$(srcdir)/'`MvQNetworkAccessManager.cc
+
+lib_libMvQtUtil_a-MvQNetworkAccessManager.obj: MvQNetworkAccessManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQNetworkAccessManager.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Tpo -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.obj `if test -f 'MvQNetworkAccessManager.cc'; then $(CYGPATH_W) 'MvQNetworkAccessManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQNetworkAccessManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQNetworkAccessManager.cc' object='lib_libMvQtUtil_a-MvQNetworkAccessManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.obj `if test -f 'MvQNetworkAccessManager.cc'; then $(CYGPATH_W) 'MvQNetworkAccessManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQNetworkAccessManager.cc'; fi`
+
+lib_libMvQtUtil_a-MvQNetworkProxyFactory.o: MvQNetworkProxyFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQNetworkProxyFactory.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Tpo -c -o lib_libMvQtUtil_a-MvQNetworkProxyFactory.o `test -f 'MvQNetworkProxyFactory.cc' || echo '$(srcdir)/'`MvQNetworkProxyFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQNetworkProxyFactory.cc' object='lib_libMvQtUtil_a-MvQNetworkProxyFactory.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQNetworkProxyFactory.o `test -f 'MvQNetworkProxyFactory.cc' || echo '$(srcdir)/'`MvQNetworkProxyFactory.cc
+
+lib_libMvQtUtil_a-MvQNetworkProxyFactory.obj: MvQNetworkProxyFactory.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQNetworkProxyFactory.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Tpo -c -o lib_libMvQtUtil_a-MvQNetworkProxyFactory.obj `if test -f 'MvQNetworkProxyFactory.cc'; then $(CYGPATH_W) 'MvQNetworkProxyFactory.cc'; else $(CYGPATH_W) '$(srcdir)/MvQNetworkProxyFactory.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkProxyFactory.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQNetworkProxyFactory.cc' object='lib_libMvQtUtil_a-MvQNetworkProxyFactory.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQNetworkProxyFactory.obj `if test -f 'MvQNetworkProxyFactory.cc'; then $(CYGPATH_W) 'MvQNetworkProxyFactory.cc'; else $(CYGPATH_W) '$(srcdir)/MvQNetworkProxyFactory.cc'; fi`
+
+lib_libMvQtUtil_a-MvQObstatScatterData.o: MvQObstatScatterData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQObstatScatterData.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Tpo -c -o lib_libMvQtUtil_a-MvQObstatScatterData.o `test -f 'MvQObstatScatterData.cc' || echo '$(srcdir)/'`MvQObstatScatterData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterData.cc' object='lib_libMvQtUtil_a-MvQObstatScatterData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQObstatScatterData.o `test -f 'MvQObstatScatterData.cc' || echo '$(srcdir)/'`MvQObstatScatterData.cc
+
+lib_libMvQtUtil_a-MvQObstatScatterData.obj: MvQObstatScatterData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQObstatScatterData.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Tpo -c -o lib_libMvQtUtil_a-MvQObstatScatterData.obj `if test -f 'MvQObstatScatterData.cc'; then $(CYGPATH_W) 'MvQObstatScatterData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQObstatScatterData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQObstatScatterData.cc' object='lib_libMvQtUtil_a-MvQObstatScatterData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQObstatScatterData.obj `if test -f 'MvQObstatScatterData.cc'; then $(CYGPATH_W) 'MvQObstatScatterData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQObstatScatterData.cc'; fi`
+
+lib_libMvQtUtil_a-MvQVisDefManager.o: MvQVisDefManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQVisDefManager.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Tpo -c -o lib_libMvQtUtil_a-MvQVisDefManager.o `test -f 'MvQVisDefManager.cc' || echo '$(srcdir)/'`MvQVisDefManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQVisDefManager.cc' object='lib_libMvQtUtil_a-MvQVisDefManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQVisDefManager.o `test -f 'MvQVisDefManager.cc' || echo '$(srcdir)/'`MvQVisDefManager.cc
+
+lib_libMvQtUtil_a-MvQVisDefManager.obj: MvQVisDefManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQVisDefManager.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Tpo -c -o lib_libMvQtUtil_a-MvQVisDefManager.obj `if test -f 'MvQVisDefManager.cc'; then $(CYGPATH_W) 'MvQVisDefManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQVisDefManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQVisDefManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQVisDefManager.cc' object='lib_libMvQtUtil_a-MvQVisDefManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQVisDefManager.obj `if test -f 'MvQVisDefManager.cc'; then $(CYGPATH_W) 'MvQVisDefManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvQVisDefManager.cc'; fi`
+
+lib_libMvQtUtil_a-MvQXmlQuery.o: MvQXmlQuery.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQXmlQuery.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Tpo -c -o lib_libMvQtUtil_a-MvQXmlQuery.o `test -f 'MvQXmlQuery.cc' || echo '$(srcdir)/'`MvQXmlQuery.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQXmlQuery.cc' object='lib_libMvQtUtil_a-MvQXmlQuery.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQXmlQuery.o `test -f 'MvQXmlQuery.cc' || echo '$(srcdir)/'`MvQXmlQuery.cc
+
+lib_libMvQtUtil_a-MvQXmlQuery.obj: MvQXmlQuery.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQXmlQuery.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Tpo -c -o lib_libMvQtUtil_a-MvQXmlQuery.obj `if test -f 'MvQXmlQuery.cc'; then $(CYGPATH_W) 'MvQXmlQuery.cc'; else $(CYGPATH_W) '$(srcdir)/MvQXmlQuery.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQXmlQuery.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQXmlQuery.cc' object='lib_libMvQtUtil_a-MvQXmlQuery.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQXmlQuery.obj `if test -f 'MvQXmlQuery.cc'; then $(CYGPATH_W) 'MvQXmlQuery.cc'; else $(CYGPATH_W) '$(srcdir)/MvQXmlQuery.cc'; fi`
+
+lib_libMvQtUtil_a-MvQOdbMetaData.o: MvQOdbMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQOdbMetaData.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Tpo -c -o lib_libMvQtUtil_a-MvQOdbMetaData.o `test -f 'MvQOdbMetaData.cc' || echo '$(srcdir)/'`MvQOdbMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbMetaData.cc' object='lib_libMvQtUtil_a-MvQOdbMetaData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQOdbMetaData.o `test -f 'MvQOdbMetaData.cc' || echo '$(srcdir)/'`MvQOdbMetaData.cc
+
+lib_libMvQtUtil_a-MvQOdbMetaData.obj: MvQOdbMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQOdbMetaData.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Tpo -c -o lib_libMvQtUtil_a-MvQOdbMetaData.obj `if test -f 'MvQOdbMetaData.cc'; then $(CYGPATH_W) 'MvQOdbMetaData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbMetaData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQOdbMetaData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQOdbMetaData.cc' object='lib_libMvQtUtil_a-MvQOdbMetaData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQOdbMetaData.obj `if test -f 'MvQOdbMetaData.cc'; then $(CYGPATH_W) 'MvQOdbMetaData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQOdbMetaData.cc'; fi`
+
+lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.o: MvQNetworkAccessManager.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.o -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Tpo -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.o `test -f 'MvQNetworkAccessManager.moc.cpp' || echo '$(srcdir)/'`MvQNetworkAccessManager.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQNetworkAccessManager.moc.cpp' object='lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.o `test -f 'MvQNetworkAccessManager.moc.cpp' || echo '$(srcdir)/'`MvQNetworkAccessManager.moc.cpp
+
+lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.obj: MvQNetworkAccessManager.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -MT lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.obj -MD -MP -MF $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Tpo -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.obj `if test -f 'MvQNetworkAccessManager.moc.cpp'; then $(CYGPATH_W) 'MvQNetworkAccessManager.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQNetworkAccessM [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Tpo $(DEPDIR)/lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQNetworkAccessManager.moc.cpp' object='lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libMvQtUtil_a_CPPFLAGS) $(CPPFLAGS) $(lib_libMvQtUtil_a_CXXFLAGS) $(CXXFLAGS) -c -o lib_libMvQtUtil_a-MvQNetworkAccessManager.moc.obj `if test -f 'MvQNetworkAccessManager.moc.cpp'; then $(CYGPATH_W) 'MvQNetworkAccessManager.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQNetworkAccessManager.moc.cpp'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+lib:
+	ln -s ../../lib lib
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp	
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libMvQtUtil/MvQKeyManager.cc b/src/libMvQtUtil/MvQKeyManager.cc
new file mode 100644
index 0000000..969d499
--- /dev/null
+++ b/src/libMvQtUtil/MvQKeyManager.cc
@@ -0,0 +1,561 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QBuffer>
+#include <QFile>
+#include <QXmlQuery>
+#include <QXmlResultItems>
+
+#include "MvQKeyManager.h"
+#include "MvQXmlQuery.h"
+#include "MvKeyProfile.h"
+
+#include "mars.h"
+
+QMap<MvQKeyManager::KeyType,QString> MvQKeyManager::keyTypeName_;
+
+MvQKeyManager::MvQKeyManager(KeyType t,string fProfUser) : 
+	fProfUser_(fProfUser), keyType_(t), systemProfOnly_(false), predefinedKeysOnly_(false)
+{
+	if(keyType_ != GribType  && keyType_ != BufrType && 
+	   keyType_ != FrameType  && keyType_ != PlaceMarkType && 
+           keyType_ != LayerType && keyType_ != BookmarkType)
+	{
+		marslog(LOG_WARN,"MvQKeyManager::MvQKeyManager --> No keyType specified!"); 
+		return;
+	}
+	
+	if(keyType_ == LayerType)
+	{
+		systemProfOnly_=true;
+	}
+
+	if(keyType_ == BufrType)
+	{
+		predefinedKeysOnly_=true;
+	}
+	if(keyTypeName_.isEmpty() == true)
+	{
+		keyTypeName_[GribType]="GRIB";
+		keyTypeName_[BufrType]="BUFR";
+		keyTypeName_[FrameType]="Frame";
+		keyTypeName_[PlaceMarkType]="PlaceMark";
+		keyTypeName_[LayerType]="Layer";
+		keyTypeName_[BookmarkType]="Bookmark";
+	}
+
+	if(fProfUser_.empty())
+	{
+		QMap<KeyType,QString>  keyFileName;
+		QString s;
+		
+		QString mvLinkDir;
+		const char *mvLinkC=getenv("METVIEW_LINK_DIR");
+		if (mvLinkC == 0)  
+		{	
+			marslog(LOG_WARN,"MvQKeyManager::MvQKeyManager --> No METVIEW_LINK_DIR found!");
+		}
+		else
+		{
+			mvLinkDir=QString(mvLinkC);
+		}
+		
+		//System defaults
+		keyFileName[GribType]="GribKeyProfile_default.xml";
+		keyFileName[BufrType]="BufrKeyProfile_default.xml";
+		keyFileName[FrameType]="FrameKeyProfile_default.xml";
+		keyFileName[LayerType]="LayerKeyProfile_default.xml";
+		//keyFileName[PlaceMarkType]="PlaceMarkKeyProfile_default.xml";
+
+		if(keyFileName.contains(keyType_))
+		{  				
+			s=mvLinkDir;
+			s+="/" + keyFileName[keyType_];		
+			fProfDefault_=s.toStdString();
+		}
+
+		
+		if(!systemProfOnly_)
+		{
+			//All keys
+			keyFileName.clear();
+			keyFileName[GribType]="GribKeyProfile_all.xml";
+			keyFileName[BufrType]="BufrKeyProfile_all.xml";
+			keyFileName[FrameType]="FrameKeyProfile_all.xml";
+
+			if(keyFileName.contains(keyType_))
+			{				
+			  	s=mvLinkDir; 
+				s+="/" + keyFileName[keyType_];		
+				fProfAll_=s.toStdString();
+			}
+			
+			//User settings
+			keyFileName.clear();
+			keyFileName[GribType]="GribKeyProfile.xml";
+			keyFileName[BufrType]="BufrKeyProfile.xml";
+			keyFileName[FrameType]="FrameKeyProfile.xml";
+			keyFileName[PlaceMarkType]="PlaceMarkKeyProfile.xml";
+			keyFileName[BookmarkType]="Bookmarks.xml";			
+	
+			if(keyFileName.contains(keyType_))
+			{
+				QString mvUserDir;
+				const char *mvUserC=getenv("METVIEW_USER_DIRECTORY");
+				if (mvUserC == 0)  
+				{	
+					marslog(LOG_WARN,"MvQKeyManager::MvQKeyManager --> No METVIEW_USER_DIRECTORY found!");
+				}
+				else
+				{
+					mvUserDir=QString(mvUserC);
+				}	
+			
+				s=mvUserDir;  
+				s+="/System/Preferences/" + keyFileName[keyType_];		
+				fProfUser_=s.toStdString();
+			}	
+		}
+	}
+}	
+
+MvQKeyManager::MvQKeyManager(const MvQKeyManager &copy) 
+{
+	fProfUser_=copy.fProfUser_;
+	fProfDefault_=copy.fProfDefault_;
+	fProfAll_=copy.fProfAll_;
+	keyType_=copy.keyType_;
+	systemProfOnly_=copy.systemProfOnly_;
+	predefinedKeysOnly_=copy.predefinedKeysOnly_;
+	for(vector<MvKeyProfile*>::const_iterator it=copy.data().begin(); it != copy.data().end(); it++)
+	{
+		data_.push_back((*it)->clone());
+	}	
+}
+
+MvQKeyManager::~MvQKeyManager()
+{
+	clear();
+}
+
+MvQKeyManager* MvQKeyManager::clone()
+{
+	MvQKeyManager* cp=new MvQKeyManager(*this);
+	return cp;
+}
+
+void MvQKeyManager::clear()
+{
+	for(vector<MvKeyProfile*>::iterator it=data_.begin(); it != data_.end(); it++)
+	{
+		delete (*it);
+		(*it)=0;
+	}
+
+	data_.clear();
+}
+
+void MvQKeyManager::update(MvQKeyManager* m)
+{
+	clear();
+	for(vector<MvKeyProfile*>::const_iterator it=m->data().begin(); it != m->data().end(); it++)
+	{
+		data_.push_back((*it)->clone());
+	}	
+}
+
+MvKeyProfile* MvQKeyManager::addProfile(string name)
+{
+	MvKeyProfile *profile=new MvKeyProfile(name);
+	createDefaultProfile(profile);
+	data_.push_back(profile);
+	return profile;
+
+}
+
+void MvQKeyManager::addProfile(MvKeyProfile *profile)
+{
+	data_.push_back(profile);
+}
+
+MvKeyProfile* MvQKeyManager::addProfile(string name,MvKeyProfile* oriProf)
+{
+	MvKeyProfile *newProf=new MvKeyProfile(name);
+	data_.push_back(newProf);
+
+	for(unsigned int i=0; i < oriProf->size(); i++)
+	{
+		MvKey *key=oriProf->at(i);
+		MvKey *newKey=new MvKey(key->name(),key->shortName(),key->description());
+		newKey->setReadIntAsString(key->readIntAsString());
+		
+		for(map<string,string>::const_iterator it=key->metaData().begin(); it != key->metaData().end(); it++)
+		{		
+			newKey->setMetaData(it->first,it->second);
+		}
+		newProf->addKey(newKey);
+	}
+
+	return newProf;
+
+}
+
+
+MvKeyProfile* MvQKeyManager::addProfile(string name,MvKeyProfile* oriProf,KeyType /*oriKeyType*/)
+{
+  
+  	MvKeyProfile *newProf=new MvKeyProfile(name);
+	data_.push_back(newProf);
+
+	for(unsigned int i=0; i < oriProf->size(); i++)
+	{
+		MvKey *key=oriProf->at(i);
+		
+		string keyName=key->name();
+		string desc=key->description();
+		if(keyType_ == FrameType)
+		{
+		  	//Need a better solution!!!
+			if(keyName == "MV_Index")
+			{
+			  	keyName="MV_Frame";
+				desc="Frame index";
+			}
+		}		
+		
+		MvKey *newKey=new MvKey(keyName,key->shortName(),desc);
+		newKey->setReadIntAsString(key->readIntAsString());
+		
+		for(map<string,string>::const_iterator it=key->metaData().begin(); it != key->metaData().end(); it++)
+		{		
+			newKey->setMetaData(it->first,it->second);
+		}
+		newProf->addKey(newKey);
+	}
+
+	return newProf;
+
+}  
+
+void MvQKeyManager::changeProfile(string name,MvKeyProfile* prof)
+{
+	if(!prof || prof->systemProfile())
+		return;
+
+	for(vector<MvKeyProfile*>::iterator it=data_.begin(); it != data_.end(); it++)
+	{
+		if((*it)->name() == name)
+		{
+			delete *it;
+			*it = prof->clone();
+		}
+	}	
+}
+
+void MvQKeyManager::deleteProfile(int index)
+{
+	vector<MvKeyProfile*>::iterator it=data_.begin()+index;
+
+	if((*it)->systemProfile())
+		return;
+
+	delete (*it);
+	data_.erase(it);	
+}	
+
+MvKeyProfile* MvQKeyManager::findProfile(string name)
+{	
+	for(vector<MvKeyProfile*>::iterator it=data_.begin(); it != data_.end(); it++)
+	{
+		if((*it)->name() == name)
+		{
+			return *it;
+		}
+	}	
+
+	return 0;
+}
+
+
+void MvQKeyManager::loadProfiles()
+{
+	loadProfiles(fProfDefault_,data_);
+	for(vector<MvKeyProfile*>::iterator it=data_.begin(); it != data_.end(); it++)
+	{
+		(*it)->setSystemProfile(true);
+	}	
+
+	if(!systemProfOnly_ && loadProfiles(fProfUser_,data_) == false)
+	{
+		if(data_.size() == 0)
+		{
+			addProfile("Default");
+			//createDefaultProfile(prof);
+		}
+		saveProfiles();	
+	}
+}	
+		
+void MvQKeyManager::loadAllKeys(vector<MvKeyProfile*> &target)
+{
+	if(systemProfOnly_)
+		return; 
+	
+	loadProfiles(fProfAll_,target);
+}
+
+bool MvQKeyManager::loadProfiles(string fileName,vector<MvKeyProfile*> &target)
+{	
+  	if(fileName.empty())
+	  	return false;
+  
+  	QFile file(QString::fromStdString(fileName));
+
+	//For bufr we corrently do not load/save profiles!!!
+	if(file.open(QFile::ReadOnly | QFile::Text) == false)
+	{
+		marslog(LOG_WARN,"MvQKeyManager::loadProfiles --> Cannot find profile file: %s ",fileName.c_str());
+		return false;
+	}
+
+	QString xmlConf(file.readAll());
+	file.close();
+
+	//qDebug() << xmlConf;
+
+	QXmlResultItems result;
+
+	QByteArray ba=xmlConf.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.setQuery("doc($myDoc)//Profile");
+	query.evaluateTo(&result);
+	
+	//Profile nodes
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QXmlResultItems keyResult;
+			QString name;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name of profile node
+			query.setQuery("string(./@name)");
+			query.evaluateTo(&name);
+			name=name.simplified();
+
+			//Create new profile
+			MvKeyProfile *prof=new MvKeyProfile(name.toStdString());	
+			target.push_back(prof);
+
+			query.setQuery("./Key");
+			query.evaluateTo(&keyResult);
+
+			//Key nodes
+			QXmlItem keyItem(keyResult.next());
+     			while (!keyItem.isNull()) 
+			{
+        			if (keyItem.isNode()) 
+				{		
+					QString keyName, keyShortName, keyDesc, keyEditable="true";
+
+					QMap<QString,QString> att;
+					query.getAttributes(keyItem,att);
+					
+					if(att.contains("name"))
+						keyName=att["name"];
+
+					if(att.contains("shortName"))
+						keyShortName=att["shortName"];
+
+					if(att.contains("desc"))
+						keyDesc=att["desc"];
+
+					if(att.contains("editable"))
+						keyEditable=att["editable"];
+					
+					MvKey *key=new MvKey(keyName.toStdString(),
+							keyShortName.toStdString(),
+							keyDesc.toStdString());
+
+					if(keyEditable == "false" || keyEditable == "0" || 
+					   predefinedKeysOnly_)
+					{
+						key->setEditable(false);
+					}
+					
+					prof->push_back(key);
+				
+					//Parse data tags!
+					QXmlResultItems dataResult;
+					query.setFocus(keyItem);
+					query.setQuery("./Data");
+					query.evaluateTo(&dataResult);
+
+					QXmlItem dataItem(dataResult.next());
+     					while (!dataItem.isNull()) 
+					{
+        					if(dataItem.isNode()) 
+						{		
+							QMap<QString,QString> dataAtt;
+							query.getAttributes(dataItem,dataAtt);				
+
+							QMapIterator<QString,QString> it(dataAtt);
+							while(it.hasNext())
+							{
+								it.next();
+				
+								key->setMetaData(it.key().toStdString(),
+									it.value().toStdString());
+							}
+						}
+						dataItem = dataResult.next();
+					}
+				}
+
+				keyItem = keyResult.next();
+			}
+                 }
+
+		item = result.next();
+        }
+
+	buffer.close();
+
+	return true;
+}
+
+void MvQKeyManager::saveProfiles()	
+{
+	//Open file for writing
+	QFile out(fProfUser_.c_str());
+	if(out.open(QFile::WriteOnly | QFile::Text) == false)
+	{
+		marslog(LOG_WARN,"MvQKeyManager::saveProfiles --> Cannot create profile file: %s ",fProfUser_.c_str());
+		return;
+	}
+
+	QString s;
+
+	s="<MetviewKeyProfile type=\"" + keyTypeName_[keyType_] + "\">\n";
+	out.write(s.toUtf8());
+
+	for(vector<MvKeyProfile*>::iterator it=data_.begin(); it != data_.end(); it++)
+	{
+		MvKeyProfile *prof = *it;
+
+
+		//We do not save system profiles into the user profile file
+		if(prof->systemProfile())
+			continue;
+
+
+		s="\t<Profile name=\"" + QString(prof->name().c_str())  + "\">\n";
+		out.write(s.toUtf8());
+
+		for(vector<MvKey*>::iterator it1=prof->begin(); it1 != prof->end(); it1++)
+		{
+			MvKey *key= *it1;
+			s="\t\t<Key name=\"" + QString::fromStdString(key->name()) + "\"" + 
+			    " shortName=\"" + QString::fromStdString(key->shortName()) + "\"" +
+			    " desc=\"" + QString::fromStdString(key->description()) + "\"";
+			   
+			out.write(s.toUtf8());	
+
+			if(key->metaData().size() >0)
+			{
+				s=">\n";
+				out.write(s.toUtf8());
+				
+				for(map<string,string>::const_iterator it2=key->metaData().begin(); 
+						it2 != key->metaData().end(); it2++)
+				{	
+ 					s="\t\t\t<Data " +  QString::fromStdString(it2->first) + "=\"" 
+						+ QString::fromStdString(it2->second) + "\"/>\n";
+					out.write(s.toUtf8());	
+				}
+
+				s="\t\t</Key>\n";
+				out.write(s.toUtf8());	
+			}
+			else
+			{
+				s="/>\n";
+				out.write(s.toUtf8());
+			}
+			
+		}
+		s="\t</Profile>\n";
+		out.write(s.toUtf8());	
+	}
+
+	s="</MetviewKeyProfile>";	
+	out.write(s.toUtf8());
+
+	out.close();
+}
+
+void  MvQKeyManager::createDefaultProfile(MvKeyProfile *prof)
+{
+	if(keyType_ == BookmarkType)
+		return;
+  
+  	if(keyType_ == FrameType)
+	{
+		prof->addKey(new MvKey("MV_Frame","Frame","Frame index"));
+	}
+	else
+	{	
+ 		prof->addKey(new MvKey("MV_Index","Index","Message index"));
+	}	
+} 
+
+
+QString MvQKeyManager::findUniqueProfileName(QString profName)
+{
+	int cnt=0;
+	for(vector<MvKeyProfile*>::const_iterator it=data_.begin(); it != data_.end(); it++)
+	{
+		QString qsName((*it)->name().c_str());
+
+		if(qsName == profName)
+		{
+			if(cnt==0)
+				cnt=1;	
+		}
+		else if(qsName.startsWith(profName + " ("))
+		{
+			QStringList lst=qsName.split("(");
+			if(lst.count()==2)
+			{
+				lst=lst[1].split(")");
+				if(lst.count()==2)
+				{
+					int n=lst[0].toInt();
+					if(n >= cnt)
+						cnt=n+1;
+				}								
+			}
+		}
+	}
+
+	if(cnt > 0)
+		return profName + " (" + QString::number(cnt) + ")";
+	else
+		return profName;
+	
+}
diff --git a/src/libMvQtUtil/MvQKeyManager.h b/src/libMvQtUtil/MvQKeyManager.h
new file mode 100644
index 0000000..83f6217
--- /dev/null
+++ b/src/libMvQtUtil/MvQKeyManager.h
@@ -0,0 +1,78 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQKeyManager_H
+#define MvQKeyManager_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+
+#include <QMap>
+#include <QString>
+#include <QXmlQuery>
+
+using namespace std;
+
+class MvKeyProfile;
+
+
+class MvQKeyManager
+{
+public:
+	enum KeyType {FrameType,GribType,BufrType,PlaceMarkType,LayerType,BookmarkType};
+
+	MvQKeyManager(KeyType t,string fProfUser=string());
+	MvQKeyManager(const MvQKeyManager&);
+	~MvQKeyManager();
+
+	MvQKeyManager* clone();
+	MvKeyProfile* addProfile(string);
+	void addProfile(MvKeyProfile *);
+	MvKeyProfile* addProfile(string,MvKeyProfile*);
+	MvKeyProfile* addProfile(string,MvKeyProfile*,KeyType);
+	void changeProfile(string,MvKeyProfile*);
+	KeyType keyType() {return keyType_;}
+	string profilePath() {return fProfUser_;}
+
+	const vector<MvKeyProfile*>& data() const {return data_;}
+	MvKeyProfile* findProfile(string);
+	bool isEmpty() {return (data_.size() == 0)?true:false;} 
+	void update(MvQKeyManager*);
+	void deleteProfile(int);
+	void loadProfiles();
+	bool loadProfiles(string,vector<MvKeyProfile*> &);
+	void loadAllKeys(vector<MvKeyProfile*> &);
+	void saveProfiles();
+	void clear();
+	QString findUniqueProfileName(QString);
+	//void getAttributes(QXmlQuery &,QXmlItem &,QMap<QString,QString>&);
+	bool predefinedKeysOnly() {return predefinedKeysOnly_;}
+	
+private:
+	void createDefaultProfile(MvKeyProfile*);
+
+	string fProfDefault_;
+	string fProfAll_;
+	string fProfUser_;
+
+	vector<MvKeyProfile*> data_;
+	
+	KeyType keyType_;
+	static QMap<KeyType,QString> keyTypeName_;
+	bool   systemProfOnly_; 
+	bool   predefinedKeysOnly_;
+	
+
+};
+
+#endif 
+
+
diff --git a/src/libMvQtUtil/MvQNetworkAccessManager.cc b/src/libMvQtUtil/MvQNetworkAccessManager.cc
new file mode 100644
index 0000000..9a2b47f
--- /dev/null
+++ b/src/libMvQtUtil/MvQNetworkAccessManager.cc
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QNetworkProxy>
+#include <QNetworkReply>
+
+#include "MvQNetworkAccessManager.h"
+#include "MvQNetworkProxyFactory.h" 
+
+MvQNetworkAccessManager::MvQNetworkAccessManager(QObject *parent) : QNetworkAccessManager(parent)
+{
+	//network_ = new QNetworkAccessManager(this);
+
+	connect(this, SIGNAL(finished(QNetworkReply*)),
+         	this, SLOT(slotReplyFinished(QNetworkReply*)));
+
+	MvQNetworkProxyFactory *proxyFactory=new MvQNetworkProxyFactory;
+	setProxyFactory(proxyFactory);	
+
+	//Set proxy
+	/*	QNetworkProxy proxy;
+ 		proxy.setType(QNetworkProxy::HttpProxy);
+ 		proxy.setHostName("proxy.ecmwf.int");
+ 		proxy.setPort(3333);
+
+		setProxy(proxy);*/
+}	
+
+void MvQNetworkAccessManager::slotReplyFinished(QNetworkReply* reply)
+{
+	//Reply is finished!
+	//We'll ask for the reply about the Redirection attribute
+	QVariant possibleRedirectUrl =
+	         reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
+
+ 	QVariant v=reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute);
+	qDebug() << "Reason: " << v.toInt();
+
+	v=reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);	
+	qDebug() << "Status: " << v.toByteArray();
+
+	//We'll deduct if the redirection is valid in the redirectUrl function 
+	urlRedirectedTo_ = redirectUrl(possibleRedirectUrl.toUrl(),
+	                                     urlRedirectedTo_);
+ 
+	//If the URL is not empty, we're being redirected.
+	if(!urlRedirectedTo_.isEmpty()) 
+	{
+ 		qDebug() << "Redirection to: " << urlRedirectedTo_;
+		get(QNetworkRequest(urlRedirectedTo_));
+	}
+	else 
+	{
+		emit replyReadyToProcess(reply);
+		urlRedirectedTo_.clear();
+	}
+	
+	reply->deleteLater();
+}
+
+
+QUrl MvQNetworkAccessManager::redirectUrl(const QUrl& possibleRedirectUrl,
+                               const QUrl& oldRedirectUrl) const 
+{
+	QUrl redirectUrl;
+
+	// Check if the URL is empty and
+	// that we aren't being fooled into a infinite redirect loop.
+	if(!possibleRedirectUrl.isEmpty() &&
+	   possibleRedirectUrl != oldRedirectUrl) {
+		redirectUrl = possibleRedirectUrl;
+	}
+	return redirectUrl;
+}
diff --git a/src/libMvQtUtil/MvQNetworkAccessManager.h b/src/libMvQtUtil/MvQNetworkAccessManager.h
new file mode 100644
index 0000000..e0dd1a7
--- /dev/null
+++ b/src/libMvQtUtil/MvQNetworkAccessManager.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQNetworkAccessmanager_H
+#define MvQNetworkAccessmanager_H
+
+#include <QNetworkAccessManager>
+#include <QObject>
+#include <QUrl>
+
+class MvQNetworkAccessManager : public QNetworkAccessManager
+{
+	Q_OBJECT
+
+public:
+	MvQNetworkAccessManager(QObject *parent=0);  
+
+public slots:
+	void slotReplyFinished(QNetworkReply*);
+
+signals:
+	void replyReadyToProcess(QNetworkReply*);
+
+protected:
+	QUrl redirectUrl(const QUrl&,const QUrl&) const; 
+
+	QUrl urlRedirectedTo_;
+
+};
+
+#endif
diff --git a/src/libMvQtUtil/MvQNetworkProxyFactory.cc b/src/libMvQtUtil/MvQNetworkProxyFactory.cc
new file mode 100644
index 0000000..ff95c9a
--- /dev/null
+++ b/src/libMvQtUtil/MvQNetworkProxyFactory.cc
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQNetworkProxyFactory.h"
+
+#include "MvApplication.h"
+#include "MvRequest.h"
+
+MvQNetworkProxyFactory::MvQNetworkProxyFactory()
+{
+	useProxy_=false;
+	proxy_.setType(QNetworkProxy::HttpProxy);
+	updateSettings();
+}
+
+void MvQNetworkProxyFactory::updateSettings()
+{	
+	useProxy_=false;
+	noProxyLst_.clear(); 
+
+	MvRequest myPref = MvApplication::getExpandedPreferences();
+	//myPref=ObjectList::ExpandRequest(myPref,EXPAND_DEFAULTS);
+
+	const char* useProxy = myPref( "USE_NETWORK_PROXY" );
+	if((useProxy != NULL))
+		useProxy_=(strcmp(useProxy, "Yes") == 0 ||
+			   strcmp(useProxy, "yes") == 0)?true:false;
+
+	if(useProxy_)
+	{
+		const char* proxyUrl = myPref( "PROXY_URL" );
+		if(proxyUrl)
+			proxy_.setHostName(QString(proxyUrl));
+
+		const char* proxyPort = myPref( "PROXY_PORT" );
+		if(proxyPort)
+			proxy_.setPort(QString::fromAscii(proxyPort).toInt());
+
+		const char* noProxy = myPref( "NO_PROXY_FOR" );
+	
+		if(noProxy)
+		{
+			QStringList lst=QString::fromAscii(noProxy).split(",");
+			foreach(QString s,lst)
+			{	
+				noProxyLst_ << s.simplified();
+			}
+		}
+	}
+}
+
+
+QList<QNetworkProxy> MvQNetworkProxyFactory::queryProxy( const QNetworkProxyQuery &query)
+{
+	QList<QNetworkProxy> res;
+
+	updateSettings();
+
+	if(!useProxy_)
+		return res;
+
+	foreach(QString p,noProxyLst_)
+	{
+		if(query.peerHostName().endsWith(p))
+		{
+			return res; 
+		}
+	}
+
+	res << proxy_;
+
+	return res;
+}
diff --git a/src/libMvQtUtil/MvQNetworkProxyFactory.h b/src/libMvQtUtil/MvQNetworkProxyFactory.h
new file mode 100644
index 0000000..a1eb5fe
--- /dev/null
+++ b/src/libMvQtUtil/MvQNetworkProxyFactory.h
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQNetworkProxyFactory_H
+#define MvQNetworkProxyFactory_H
+
+#include <QNetworkProxyFactory>
+#include <QStringList>
+
+class MvQNetworkProxyFactory : public QNetworkProxyFactory
+{	
+
+public:
+	MvQNetworkProxyFactory();  
+	QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery());
+	void updateSettings();
+
+protected:
+	QNetworkProxy proxy_;
+	bool useProxy_;
+	QStringList noProxyLst_;
+};
+
+#endif
diff --git a/src/libMvQtUtil/MvQObstatScatterData.cc b/src/libMvQtUtil/MvQObstatScatterData.cc
new file mode 100644
index 0000000..071408f
--- /dev/null
+++ b/src/libMvQtUtil/MvQObstatScatterData.cc
@@ -0,0 +1,557 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "netcdfcpp.h"
+
+#include <math.h>
+
+#include <QDebug>
+#include <QFile>
+#include <QTextStream>
+
+#include "MvQObstatScatterData.h"
+
+#include "MvKeyProfile.h"
+
+MvQScatterItem::MvQScatterItem()
+{
+	nX_=0;
+	nY_=0;
+	data_=0;
+}
+
+MvQScatterItem::~MvQScatterItem()
+{
+	if(!data_)
+	{
+		delete data_;
+	}
+}
+
+void MvQScatterItem::computeMeanForRows(QVector<float> &meanX,QVector<float> &meanY)
+{
+	for(int j=0; j < nY_; j++)
+	{
+		float sumX=0;
+		float sumXWeigh=0.;
+		for(int i=0; i < nX_; i++)
+		{
+			sumX+=data_[j+i*nY_];
+			sumXWeigh+=(startX_+i*dX_)*data_[j+i*nY_];	
+		}
+
+		if(fabs(sumX) > 0.0001)
+		{
+			meanX << startY_+j*dY_;
+			meanY << sumXWeigh/sumX;
+		}
+	}	
+}
+
+void MvQScatterItem::computeMeanForColumns(QVector<float> &meanX,QVector<float> &meanY)
+{
+	for(int i=0; i < nX_; i++)
+	{
+		float sumY=0;
+		float sumYWeigh=0.;
+		for(int j=0; j < nY_; j++)
+		{
+			sumY+=data_[j+i*nY_];
+			sumYWeigh+=(startY_+j*dY_)*data_[j+i*nY_];	
+		}
+
+		if(fabs(sumY) > 0.0001)
+		{
+			meanX << startX_+i*dX_;
+			meanY << sumYWeigh/sumY;
+		}
+	}
+}
+
+void MvQScatterItem::writeDataMatrixToNc(QString outFile,bool swapAxes)
+{
+	vector<float> x,y,value;
+
+	/*for(int j=0; j < nY_; j++)
+	{
+		for(int i=0; i < nX_; i++)
+		{
+			value.push_back(data_[i+j*nX_]);	
+		}
+	}*/
+
+	if(swapAxes == false)
+	{
+		for(int j=0; j < nY_; j++)
+		{
+			for(int i=0; i < nX_; i++)
+			{
+				value.push_back(data_[j+i*nY_]);	
+			}
+		}
+
+		for(int i=0; i < nX_; i++)
+		{
+			x.push_back(startX_+(i+0.5)*dX_);
+		}
+
+		for(int j=0; j < nY_; j++)
+		{
+			y.push_back(startY_+(j+0.5)*dY_);
+		}
+	}
+	else
+	{
+		for(int i=0; i < nX_; i++)
+		{
+			for(int j=0; j < nY_; j++)
+			{
+				value.push_back(data_[j+i*nY_]);	
+			}
+		}
+
+		for(int i=0; i < nX_; i++)
+		{
+			y.push_back(startX_+(i+0.5)*dX_);
+		}
+
+		for(int j=0; j < nY_; j++)
+		{
+			x.push_back(startY_+(j+0.5)*dY_);
+		}
+	}	
+
+	writeDataMatrixToNc(outFile.toStdString(),x,y,value);
+}
+
+void MvQScatterItem::writeDataMatrixToNc(string outFile,vector<float> &x, vector<float> &y, vector<float> &value)
+{
+int num, nx, ny;
+
+	//Checking
+	if(x.size() * y.size() != value.size() )
+	{
+		return;
+	}
+
+
+        //-------------------------
+        // Netcdf output
+        //-------------------------
+
+	nx=x.size();
+	ny=y.size();
+        num=value.size();  
+	 
+
+        cout << "num: " << num << endl;
+
+        // Now we build the Netcdf file!
+        NcFile netcdf = NcFile(outFile.c_str(), NcFile::Replace);
+
+        //Adding global attributes
+        netcdf.add_att("Conventions","Metview");
+        netcdf.add_att("institution","ECMWF, Reading, U.K.");
+        netcdf.add_att("source","Metview 4");
+
+        //Define dimensions (each column has the same number of rows!)
+        NcDim* dim_nx = netcdf.add_dim("nx",nx);
+        NcDim* dim_ny = netcdf.add_dim("ny",ny);
+
+        //Define the netcdf vars
+        map<int,NcVar*> nc_vars;
+        nc_vars[0]=netcdf.add_var("x",ncFloat,dim_nx);
+        nc_vars[1]=netcdf.add_var("y",ncFloat,dim_ny);
+        nc_vars[2]=netcdf.add_var("val",ncFloat,dim_nx,dim_ny);
+
+        //Write data into the netcdf file
+        nc_vars[0]->put(&(x[0]),nx);
+        nc_vars[1]->put(&(y[0]),ny);
+        nc_vars[2]->put(&(value[0]),nx,ny);
+
+        netcdf.close();           
+}
+
+MvQScatterBlock::MvQScatterBlock()
+{
+
+
+}
+
+MvQScatterBlock::~MvQScatterBlock()
+{
+	foreach(MvQScatterItem *item,items_)
+	{
+		delete item;
+	}
+}
+
+MvQObstatScatterData::MvQObstatScatterData()
+{
+	itemNum_=0;
+	//filePath_="/var/tmp/cgr/metview/Local/OBSTAT/scat_0001_DCDA_synop_pressure.200809";
+}
+
+MvQObstatScatterData::~MvQObstatScatterData()
+{
+	clearData();
+}
+
+void MvQObstatScatterData::clearData()
+{
+	foreach(MvQScatterBlock* block, blocks_)
+	{
+		delete block;
+	}
+	blocks_.clear();
+	itemNum_=0;
+}
+
+MvQScatterItem* MvQObstatScatterData::item(int index)
+{
+	int cnt=0;
+	foreach(MvQScatterBlock *block, blocks_)
+	{
+		if(cnt + block->itemNum() > index)
+		{
+			int itemIndex=index-cnt;
+			return block->items().at(itemIndex);
+		}
+
+		cnt+=block->itemNum();
+	}
+
+	return 0;
+}
+
+MvQScatterBlock* MvQObstatScatterData::blockOfItem(int index)
+{
+	int cnt=0;
+	foreach(MvQScatterBlock *block, blocks_)
+	{
+		if(cnt + block->itemNum() > index)
+		{			
+			return block;
+		}
+
+		cnt+=block->itemNum();
+	}
+
+	return 0;
+}
+
+MvQScatterBlock* MvQObstatScatterData::block(int index)
+{
+	if(index >=0 && index < blocks_.count())
+		return blocks_[index];
+
+	return 0;
+}
+
+void MvQObstatScatterData::setFileName(QString fileName)
+{
+	fileName_=fileName;
+	clearData();
+	loadData();
+
+	//QString nc="/var/tmp/cgr/metview/Local/OBSTAT/scat.nc";
+	//blocks_[0]->items().at(0)->writeMatrixToNc(nc);
+}
+
+void MvQObstatScatterData::loadData()
+{	
+	QFile file(fileName_);
+
+	if(file.open(QFile::ReadOnly | QFile::Text) == false)
+	{
+		return;
+	}
+
+	QTextStream in(&file);
+
+	itemNum_=0;
+
+	while (!in.atEnd()) 
+	{
+        	QString line = in.readLine();
+
+		if(line.contains("#obstat scatter"))
+		{
+			line = in.readLine();
+		}
+
+		QStringList lst=line.split(" ",QString::SkipEmptyParts);
+		qDebug() << line;
+		qDebug() << lst;
+
+
+		if(!lst.contains("HEADER=") || lst.count() != 11)
+		{
+			return;
+		}
+
+		MvQScatterBlock *block= new MvQScatterBlock;
+		
+		//Start date
+		QString dstr=lst[1];
+		dstr+=lst[2];
+		block->setStartDate(QDateTime::fromString(dstr,"yyyyMMddHHmm"));
+		
+		//End date
+		dstr=lst[3];
+		dstr+=lst[4];
+		block->setEndDate(QDateTime::fromString(dstr,"yyyyMMddHHmm"));
+		
+		//
+		block->setSatId(lst[5].toInt());
+		block->setSensorId(lst[6].toInt());
+		int itemNum=lst[7].toInt();
+		int channelNum=lst[8].toInt();
+		int flagNum=lst[9].toInt();
+		int areaNum=lst[10].toInt();
+		//block->setItemNum(lst[7].toInt());
+		//block->setChannelNum(lst[8].toInt());
+		//block->setFlagNum(lst[9].toInt());
+		//block->setAreaNum(lst[10].toInt());
+
+
+		line = in.readLine();
+		if(!line.contains("title="))
+		{
+			return;
+		}
+
+		lst=line.split("title=",QString::SkipEmptyParts);
+		qDebug() << "title:" << lst << lst.last();
+		if(lst.count() > 0)
+		{	
+			block->setTitle(lst.last().simplified());
+		}
+		qDebug() << "title:" << block->title();
+
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);		
+		if(!lst.contains("press="))
+		{
+			return;
+		}
+
+		if(lst[1] == "yes")
+		{
+		
+		}
+		
+		//X params		
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		qDebug() << line;
+		qDebug() << lst;
+		
+		if(lst.count() != itemNum)
+		{
+			return;
+		}
+	
+		QStringList paramsX=lst;
+
+		//Y params	
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		if(lst.count() != itemNum)
+		{
+			return;
+		}
+	
+		QStringList paramsY=lst;
+	
+		//Flags	
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		if(lst.count() != flagNum)
+		{
+			return;
+		}
+
+		QStringList flags=lst;
+
+		//Areas
+		line = in.readLine();
+		lst=line.split(" ",QString::SkipEmptyParts);
+		if(lst.count() != areaNum)
+		{
+			return;
+		}
+
+		block->setAreaNames(lst);
+		
+		//read titles
+		QMap<int,QString> titles;
+	
+		for(int i=0; i < itemNum; i++)
+		{
+			line = in.readLine();
+			titles[paramsX[i].toInt()]=line.simplified();
+
+			line = in.readLine();
+			titles[paramsY[i].toInt()]=line.simplified();
+		}
+
+		block->setParams(titles);
+
+		int totalItemNum=itemNum*flagNum*areaNum*channelNum;
+		
+		for(int i=0; i < totalItemNum; i++)
+		{
+			//BEGIN SCATITEM
+			line = in.readLine();
+			lst=line.split(" ",QString::SkipEmptyParts);
+			if(lst[0] != "BEGIN" && lst[1] != "SCATITEM" && lst.count() != 13)
+			{
+				return;
+			}
+			
+			MvQScatterItem *item=new MvQScatterItem;
+
+			item->setArea(lst[2].toInt());
+			item->setLevel(lst[3].toInt());	
+			item->setFlag(lst[4].toInt());	
+			item->setParamX(lst[5].toInt());	
+			item->setParamY(lst[6].toInt());			
+			item->setStartX(lst[7].toFloat());			
+			item->setStartY(lst[8].toFloat());	
+			item->setDX(lst[9].toFloat());			
+			item->setDY(lst[10].toFloat());	
+			item->setNX(lst[11].toInt());			
+			item->setNY(lst[12].toInt());		
+
+			item->setTitleX(titles[item->paramX()]);
+			item->setTitleY(titles[item->paramY()]);
+			
+
+			//GLOBAL STATS
+			line = in.readLine();
+			lst=line.split(" ",QString::SkipEmptyParts);
+			if(lst[0] != "GLOBAL" && lst[1] != "STATS" && lst.count() != 13)
+			{
+				return;
+			}
+
+			item->setMaxX(lst[2].toFloat());
+			item->setMinX(lst[3].toFloat());	
+			item->setMaxY(lst[4].toFloat());
+			item->setMinY(lst[5].toFloat());
+			item->setSumX(lst[6].toFloat());
+			item->setSumY(lst[7].toFloat());
+			item->setSumXX(lst[8].toFloat());
+			item->setSumYY(lst[9].toFloat());
+			item->setSumXY(lst[10].toFloat());
+			item->setSumDiffSqr(lst[11].toFloat());
+			item->setSourceDataNum(lst[12].toInt());
+
+			int num=0;
+			int totalNum=item->nX()*item->nY(); 
+			float *data = new float[totalNum];
+
+			while(num != totalNum)
+			{
+				line = in.readLine();
+				lst=line.split(" ",QString::SkipEmptyParts);
+				foreach(QString s,lst)
+				{
+					data[num]=s.toFloat();
+					num++;
+				}
+			}
+
+			item->setData(data);
+	
+			block->addItem(item);	
+
+			line = in.readLine();
+			lst=line.split(" ",QString::SkipEmptyParts);
+			if(!line.contains("END SCATITEM"))
+			{
+				return;
+			}
+			itemNum_++;
+		}
+
+		blocks_ << block;  
+	}
+
+	file.close();
+
+}
+
+void MvQObstatScatterData::loadKeyProfile(MvKeyProfile *prof)
+{
+	//prof->addKey(new MvKey("Index","Index"));	
+	//prof->addKey(new MvKey("Satellite","Satellite"));
+	//prof->addKey(new MvKey("Sensor","Sensor"));
+	//prof->addKey(new MvKey("Area","Area"));
+	//prof->addKey(new MvKey("Level","Level"));
+	//prof->addKey(new MvKey("Flag","Flag"));
+	//prof->addKey(new MvKey("ParX","ParX"));
+	//prof->addKey(new MvKey("ParY","ParY"));
+	prof->addKey(new MvKey("Start date","Start date"));
+	prof->addKey(new MvKey("End date","End date"));
+	prof->addKey(new MvKey("Satellite","Satellite"));
+	prof->addKey(new MvKey("Sensor","Sensor"));
+	prof->addKey(new MvKey("Title","Title"));
+
+	int i=0;
+	foreach(MvQScatterBlock* block, blocks_)
+	{
+		//foreach(MvQScatterItem* item, block->items())
+		//{
+			//prof->key("Index")->addValue(QString::number(i).toStdString());
+		//	prof->key("Area")->addValue(QString::number(item->area()).toStdString());
+		//	prof->key("Level")->addValue(QString::number(item->level()).toStdString());
+		//	prof->key("Flag")->addValue(QString::number(item->flag()).toStdString());
+		//	prof->key("ParX")->addValue(QString::number(item->paramX()).toStdString());
+		//	prof->key("ParY")->addValue(QString::number(item->paramY()).toStdString());
+			prof->key("Start date")->addValue(block->startDate().toString("yyyy-MM-dd hh:mm ").toStdString());
+			prof->key("End date")->addValue(block->endDate().toString("yyyy-MM-dd hh:mm ").toStdString());
+			prof->key("Satellite")->addValue(QString::number(block->satId()).toStdString());
+			prof->key("Sensor")->addValue(QString::number(block->sensorId()).toStdString());
+			prof->key("Title")->addValue(block->title().toStdString());
+			i++;
+		//}
+	}	
+}
+
+void MvQScatterBlock::loadKeyProfile(MvKeyProfile *prof)
+{
+	//prof->addKey(new MvKey("Index","Index"));	
+	//prof->addKey(new MvKey("Satellite","Satellite"));
+	//prof->addKey(new MvKey("Sensor","Sensor"));
+	prof->addKey(new MvKey("Area","Area"));
+	prof->addKey(new MvKey("Level"," Channel/Level"));
+	prof->addKey(new MvKey("Flag","Flag"));
+	prof->addKey(new MvKey("ParamX","ParamX"));
+	prof->addKey(new MvKey("ParamY","ParamY"));
+	//prof->addKey(new MvKey("Start date","Start date"));
+	//prof->addKey(new MvKey("End date","End date"));
+
+	int i=0;
+	foreach(MvQScatterItem* item, items_)
+	{
+		//prof->key("Index")->addValue(QString::number(i).toStdString());
+		prof->key("Area")->addValue(areaNames_[item->area()-1].toStdString());
+		prof->key("Level")->addValue(QString::number(item->level()).toStdString());
+		prof->key("Flag")->addValue(QString::number(item->flag()).toStdString());
+		prof->key("ParamX")->addValue(params_[item->paramX()].toStdString());
+		prof->key("ParamY")->addValue(params_[item->paramY()].toStdString());
+			//prof->key("Start date")->addValue(block->startDate().toString("yyyyMMdd-hh:mm").toStdString());
+			//prof->key("End date")->addValue(block->endDate().toString("yyyyMMdd-hh:mm").toStdString());
+		//prof->key("Satellite")->addValue(QString::number(satId_).toStdString());
+		//prof->key("Sensor")->addValue(QString::number(sensorId_).toStdString());
+		i++;
+	}	
+}
diff --git a/src/libMvQtUtil/MvQObstatScatterData.h b/src/libMvQtUtil/MvQObstatScatterData.h
new file mode 100644
index 0000000..400498d
--- /dev/null
+++ b/src/libMvQtUtil/MvQObstatScatterData.h
@@ -0,0 +1,194 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQObstatScatterData_H
+#define MvQObstatScatterData_H
+
+#include <vector>
+
+#include <QDateTime>
+#include <QStringList>
+
+class MvKeyProfile;
+
+using namespace std;
+
+class MvQScatterItem
+{
+public:
+	MvQScatterItem();
+	~MvQScatterItem();
+
+	void setArea(int area) {area_=area;}
+	void setLevel(int level) {level_=level;}
+	void setFlag(int flag) {flag_=flag;}
+	void setParamX(int paramX) {paramX_=paramX;}
+	void setParamY(int paramY) {paramY_=paramY;}
+	void setStartX(float startX) {startX_=startX;}
+	void setStartY(float startY) {startY_=startY;}
+	void setDX(float dX) {dX_=dX;}
+	void setDY(float dY) {dY_=dY;}
+	void setNX(int nX) {nX_=nX;}
+	void setNY(int nY) {nY_=nY;}
+	void setData(float* data) {data_=data;}
+	void setTitleX(QString titleX) {titleX_=titleX;}
+	void setTitleY(QString titleY) {titleY_=titleY;}
+
+	void setMinX(float f) {minX_=f;}
+	void setMaxX(float f) {maxX_=f;}
+	void setMinY(float f) {minY_=f;}
+	void setMaxY(float f) {maxY_=f;}
+	void setSumX(float f) {sumX_=f;}
+	void setSumY(float f) {sumY_=f;}	
+	void setSumXX(float f) {sumXX_=f;}
+	void setSumYY(float f) {sumYY_=f;}
+	void setSumXY(float f) {sumXY_=f;}
+	void setSumDiffSqr(float f) {sumDiffSqr_=f;}
+	void setSourceDataNum(int n) {sourceDataNum_=n;}
+
+        int area() {return area_;}
+	int level() {return level_;}
+	int flag() {return flag_;}
+	int paramX() {return paramX_;}
+	int paramY() {return paramY_;}
+	float startX() {return startX_;}
+	float startY() {return startY_;}
+	float endX() {return startX_+dX_*(nX_+1);}
+	float endY() {return startY_+dY_*(nY_+1);}
+	float dX() {return dX_;}
+	float dY() {return dY_;}
+	int nX() {return nX_;}
+	int nY() {return nY_;}
+	float* data() {return data_;}	
+	QString titleX() {return titleX_;}
+	QString titleY() {return titleY_;}
+
+	float minX() {return minX_;}
+	float maxX() {return maxX_;}
+	float minY() {return minY_;}
+	float maxY() {return maxY_;}
+	float sumX() {return sumX_;}
+	float sumY() {return sumY_;}	
+	float sumXX() {return sumXX_;}
+	float sumYY() {return sumYY_;}
+	float sumXY() {return sumXY_;}
+	float sumDiffSqr() {return sumDiffSqr_;}
+	int sourceDataNum() {return sourceDataNum_;}
+
+	void writeDataMatrixToNc(QString,bool);
+ 	void computeMeanForRows(QVector<float> &,QVector<float> &);
+	void computeMeanForColumns(QVector<float> &,QVector<float> &);
+
+protected:
+	void writeDataMatrixToNc(string,vector<float>&,vector<float>&,vector<float>&);
+
+	float *data_;
+
+	int area_;
+	int level_;
+	int flag_;
+	int paramX_;
+	int paramY_;
+	float startX_;
+	float startY_;
+	float dX_;
+	float dY_;
+	int nX_;
+	int nY_;	
+
+	QString titleX_;
+	QString titleY_;
+	QString areaName_;
+
+	float maxX_;
+	float minX_;
+	float maxY_;
+	float minY_;
+	float sumX_;
+	float sumY_;
+	float sumXX_;
+	float sumYY_;
+	float sumXY_;
+	float sumDiffSqr_;
+	int sourceDataNum_;
+};
+
+
+class MvQScatterBlock
+{
+public:
+	MvQScatterBlock();
+	~MvQScatterBlock();
+	void addItem(MvQScatterItem *item) {items_ << item;}
+	
+	void setStartDate(QDateTime d) {startDate_=d;}
+	void setEndDate(QDateTime d) {endDate_=d;}
+	void setParams(QMap<int,QString>& params) {params_=params;}	
+	void setSatId(int id) {satId_=id;}
+	void setSensorId(int id) {sensorId_=id;}	
+	void setAreaNames(QStringList lst) {areaNames_=lst;}
+	void setTitle(QString t) {title_=t;}
+	QList<MvQScatterItem*> items() {return items_;}
+	int itemNum() {return items_.count();}
+
+
+	QDateTime startDate() {return startDate_;} 
+	QDateTime endDate() {return endDate_;}
+	int satId() {return satId_;}
+	int sensorId() {return sensorId_;}
+	QStringList areaNames() {return areaNames_;}
+	QString title() {return title_;}
+	void loadKeyProfile(MvKeyProfile*);
+
+protected:
+	QDateTime startDate_;
+	QDateTime endDate_;
+	int satId_;
+	int sensorId_;
+	//int itemNum_;
+	//int channelNum_;
+	//int flagNum_;
+	//int areaNum_;
+	QString title_;		
+	QStringList areaNames_;
+	QMap<int,QString> params_;
+
+
+	QList<MvQScatterItem*> items_;
+
+};
+
+
+class MvQObstatScatterData
+{
+public:
+	MvQObstatScatterData();
+	~MvQObstatScatterData();
+
+	void loadData();
+	void loadKeyProfile(MvKeyProfile*);
+	void setFileName(QString);
+	QString fileName() {return fileName_;}
+	int itemNum() {return itemNum_;}
+	MvQScatterItem* item(int);
+	MvQScatterBlock* blockOfItem(int);
+	MvQScatterBlock* block(int);
+
+
+	
+protected:
+	void clearData();
+
+	QString fileName_;
+	QList<MvQScatterBlock*>  blocks_;
+	int itemNum_;
+};
+
+
+#endif
diff --git a/src/libMvQtUtil/MvQOdbMetaData.cc b/src/libMvQtUtil/MvQOdbMetaData.cc
new file mode 100644
index 0000000..b960230
--- /dev/null
+++ b/src/libMvQtUtil/MvQOdbMetaData.cc
@@ -0,0 +1,563 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QDir>
+#include <QFile>
+#include <QStringList>
+#include <QTextStream>
+
+#include "MvQOdbMetaData.h"
+
+#ifdef METVIEW_ODB_NEW
+
+#include "odb_api.h"
+using namespace odb;
+
+extern "C" {
+#include "odbcapi.h"
+}
+
+static QMap<ColumnType,MvQOdbColumn::OdbColumnType> typeIdMap;
+static QMap<ColumnType,QString> typeIdNameMap;
+
+#endif
+
+void MvQOdbTable::findLinks()
+{
+	linksTo_.clear();
+	
+	foreach(MvQOdbColumn *col,columns_)
+	{
+		if(col->type().contains("@LINK"))
+		{
+			QStringList lst=col->name().split("@");
+			if(lst.count() > 1 && lst[0].isEmpty() == false)
+			{
+			  	linksTo_ << lst[0];
+			}	
+		}
+	}			
+}	
+
+
+MvQOdbMetaData::MvQOdbMetaData(string path,string odbVersion)
+{
+	path_=QString::fromStdString(path);
+
+	if(odbVersion == "ODB_NEW")
+	{
+#ifndef METVIEW_ODB_NEW
+		odbVersion_=InvalidVersion;
+		return;
+#else	
+		odbVersion_=Version2;
+#endif
+	}
+	else if(odbVersion == "ODB_OLD")
+	{
+		odbVersion_=Version1;
+	}
+	else
+	{
+		odbVersion_=InvalidVersion;
+	}
+
+#ifdef METVIEW_ODB_NEW
+	if(typeIdMap.isEmpty())
+	{
+		typeIdMap[odb::IGNORE]=MvQOdbColumn::None;
+		typeIdMap[odb::INTEGER]=MvQOdbColumn::Int;
+		typeIdMap[odb::REAL]=MvQOdbColumn::Float;
+		typeIdMap[odb::STRING]=MvQOdbColumn::String;
+		typeIdMap[odb::BITFIELD]=MvQOdbColumn::Bitfield;
+
+		typeIdNameMap[odb::IGNORE]="none";
+		typeIdNameMap[odb::INTEGER]="int";
+		typeIdNameMap[odb::REAL]="float";
+		typeIdNameMap[odb::STRING]="string";
+		typeIdNameMap[odb::BITFIELD]="bitfield";	
+	}
+#endif
+
+	if(odbVersion_==Version1)
+	{
+		loadSchemaFile();
+	}
+
+	else if(odbVersion_==Version2)
+	{
+#ifdef METVIEW_ODB_NEW	
+		loadOdbHeader();
+#endif
+	}
+}
+
+MvQOdbMetaData::~MvQOdbMetaData()
+{
+	foreach(MvQOdbTable* t,tables_.values())
+	{	
+		delete t;
+	}
+	
+	foreach(MvQOdbColumn* c, columns_)
+	{
+		delete c;
+	}
+
+	foreach(MvQOdbVar* v, vars_)
+	{
+		delete v;
+	}
+}
+
+QString MvQOdbMetaData::odbVersionString()
+{
+	if(odbVersion_ == Version1)
+	{
+		return "ODB 1";
+	}
+	else if(odbVersion_ == Version2)
+	{
+		return "ODB 2";
+	}
+	else
+	{
+		return "Invalid";	
+	}
+
+	return QString();
+}
+
+void MvQOdbMetaData::removeCommentFromLine(QString &line)
+{
+	int commentIndex=line.indexOf("//");
+	if(commentIndex != -1)
+	{
+		line.remove(commentIndex,line.size()-commentIndex+1);
+	}
+}
+
+
+void MvQOdbMetaData::loadSchemaFile()
+{
+	QDir dir(path_);  
+	QStringList filters;
+     	filters << "*.sch";  
+	QStringList schLst=dir.entryList(filters,QDir::Files | QDir::NoDotAndDotDot);
+
+	QMap<QString,QList<MvQOdbBitfieldMember*> > bitfields;
+
+	if(schLst.count() < 1)
+	{
+		return;
+	}
+
+	QFile file(path_ + "/" + schLst[0]);
+
+	if(file.open(QFile::ReadOnly | QFile::Text) == false)
+	{
+		return;
+	}
+
+	QTextStream in(&file);
+
+	while (!in.atEnd()) 
+	{
+        	QString line = in.readLine();
+
+		//Vars
+		if(line.startsWith("SET"))
+		{
+			QStringList lst=line.split(" ",QString::SkipEmptyParts);
+			if(lst.count() == 4 && lst[2] == "=")
+			{
+				QString name, val;
+				if(lst[1].startsWith("$"))
+				{
+					name=lst[1].remove(0,1);
+				}
+				if(lst[3].endsWith(";"))
+				{
+					val=lst[3].remove(lst[3].size()-1,1);
+				}
+				
+				if(name.isEmpty() == false && 
+				   val.isEmpty() == false)
+				{
+					vars_.push_back(new MvQOdbVar(name,val));
+				}
+			}	
+		}
+
+		//Bitfield
+		if(line.startsWith("CREATE TYPE"))
+		{
+			QString name, bitLen, bitPos;
+			int bitPosInt=0, bitLenInt=0;	
+			
+			removeCommentFromLine(line);
+			QString str=line;
+			while(!in.atEnd() && line.contains(");") == false)
+			{				
+				line=in.readLine();
+				removeCommentFromLine(line);
+				str += " " + line;
+				
+			}
+
+			QStringList lst=str.split(" ",QString::SkipEmptyParts);
+
+			if(lst.size() < 3)
+			{
+				break;
+			}
+	
+			QString bfName=lst[2];	
+			QList<MvQOdbBitfieldMember*> bf;
+
+			for(int i=5; i < lst.size(); i+=2)
+			{
+				name=lst[i];
+				if(i+1 < lst.size() && lst[i+1].endsWith(","))
+				{
+					bitLen=lst[i+1].remove(lst[i+1].size()-1,1);	
+					bitLen.remove("bit");
+					bitLenInt=bitLen.toInt();
+					bitPos=QString::number(bitPosInt);		
+					bf.push_back(new MvQOdbBitfieldMember(name,bitPosInt,bitLenInt));	
+					bitPosInt+=bitLenInt;					
+				}				
+			}
+			bitfields[bfName]=bf;
+
+		}
+
+		//Table
+		if(line.startsWith("CREATE TABLE"))
+		{
+			removeCommentFromLine(line);
+
+			QString name,type;
+			QString str=line;
+			while(!in.atEnd() && line.contains(");") == false)
+			{
+				line=in.readLine();
+				removeCommentFromLine(line);
+				str += " " + line;
+			}
+
+			QStringList lst=str.split(" ",QString::SkipEmptyParts);
+
+			if(lst.size() < 3)
+			{
+				break;
+			}
+
+			//qDebug() <<  lst;
+
+			QString tableName=lst[2];
+			MvQOdbTable *table = new MvQOdbTable(tableName);
+			for(int i=5; i < lst.size(); i+=2)
+			{
+				name=lst[i] + "@" +tableName;
+				//qDebug() << "table: " << name;
+				if(i+1 < lst.size() && lst[i+1].endsWith(","))
+				{
+					type=lst[i+1].remove(lst[i+1].size()-1,1);	
+					MvQOdbColumn *col=new MvQOdbColumn(name,type,tableName);
+					columns_.push_back(col);
+					table->addColumn(col);	
+				}				
+			}
+			
+			table->findLinks();
+
+			tables_[tableName]=table;
+
+			//qDebug() << "table:" << tableName << table->linksTo() ;
+		}
+	}
+
+	file.close();
+
+	foreach(MvQOdbColumn *col,columns_)
+	{
+		if(bitfields.contains(col->type()))
+		{
+			foreach(MvQOdbBitfieldMember *bf,bitfields[col->type()])
+			{
+				col->addBitfieldMember(new MvQOdbBitfieldMember(*bf));
+			}	
+			//qDebug() << "num:" << bitfields[col->type()].size() << col->bitfieldNum();
+		}	
+		//qDebug() << col->name();
+	}
+
+	//Delete tmp bitfields
+	QMapIterator<QString,QList<MvQOdbBitfieldMember*> > it(bitfields);
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+		foreach(MvQOdbBitfieldMember* b,it.value())
+			delete b;
+	}
+
+	getTableTree();
+}
+
+void MvQOdbMetaData::getTableTree()
+{
+        QMap<QString,MvQOdbTable*> tblMap;
+ 	
+	QMapIterator<QString, MvQOdbTable*> it(tables_);
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+		foreach(QString tblName,it.value()->linksTo())
+		{
+			if(tables_.contains(tblName))
+			{
+				tables_[tblName]->addToLinksFrom(tblName);
+			}
+		}	
+ 	}
+
+	//Find the root in the ODB table tree
+	//It has only "to" links!!	
+
+	int currentYPosMax=0;
+
+	it.toFront();
+	while (it.hasNext()) 
+	{
+     		it.next();
+		if(it.value()->linksFrom().isEmpty())
+		{
+			MvQOdbTable *rt=it.value();
+
+			rt->setTreePosX(0);
+			rt->setTreePosY(currentYPosMax);
+			//qDebug() << "root" << rt->name();
+			
+			int posy=currentYPosMax;
+			computeTreePos(rt,posy);
+
+			QMapIterator<QString, MvQOdbTable*> ityp(tables_);
+			while (ityp.hasNext())
+			{
+				ityp.next();
+				if(ityp.value()->treePosY() > currentYPosMax)
+				{
+					currentYPosMax=ityp.value()->treePosY(); 
+				}
+			}
+			currentYPosMax++;
+		}
+	}
+
+	/*int posy=0;
+	if(rootTables_.count() > 0)
+		computeTreePos(rootTables_[0],posy);*/
+
+	/*QMapIterator<QString, MvQOdbTable*> it(tables_);
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+		if(it.value()->treePosX() > xr)
+		{
+			xr=it.value()->treePosX();
+		}
+		
+		if(it.value()->treePosY() > yr)
+		{
+			yr=it.value()->treePosY();
+		}
+		
+ 	}*/
+
+ 	it.toFront();
+	while (it.hasNext()) 
+	{
+     		it.next();
+		//qDebug() << it.value()->name() << it.value()->treePosX() << it.value()->treePosY(); 
+ 	}
+
+	/*
+	xp=parent->treePosX()+1;
+	yp=parent->treePosY();
+	int i=0;
+	foreach(MvQOdbTable* t,parent->linksFrom())
+	{
+		t->setTreePosX(xp);
+		t->setTreePosY(yp);
+		yp++;
+	}
+
+
+
+	//For each table find the position (x,y) in the tree!	
+	int posX=1;
+	vector<int> posY(100,0);
+	QStack<QList<OdbTable*>::iterator> itActStack, itEndStack;		
+	list<OdbTable*>::iterator itAct=root_->linksTo().begin();
+	list<OdbTable*>::iterator itEnd=root_->linksTo().end();
+	
+	while(itAct != itEnd)
+	{						
+		(*itAct)->treePosX(posX);
+		(*itAct)->treePosY(posY[posX]); 		
+		
+		//cout << "table: " << (*itAct)->name_ <<   " x: " << (*itAct)->treePosX_  << " y: "  << (*itAct)->treePosY_ << endl;
+		
+		posY[posX]=posY[posX]++;
+		
+		if(!(*itAct)->linksTo().empty())
+		{
+			itActStack.push(itAct);
+			itEndStack.push(itEnd);
+			
+			//cout << " to stack: " << (*itAct)->name_ << endl;
+			
+			list<OdbTable*>::iterator itTmp=itAct;			
+			itAct=(*itTmp)->linksTo().begin();
+			itEnd=(*itTmp)->linksTo().end();			
+			posX++;
+			
+			posY[posX]=posY[posX-1]-1;			
+			
+			continue;
+		}
+				
+		itAct++;	
+		
+		while (itAct == itEnd && itActStack.empty() == false)
+		{
+			itAct=itActStack.top();						
+			itEnd=itEndStack.top();
+			
+			itActStack.pop();
+			itEndStack.pop();
+			
+			//cout << " rom stack: " << (*itAct)->name_ << endl;
+			
+			itAct++;
+			posX--;
+			
+			posY[posX]=posY[posX+1];
+																
+		}			
+	}	*/	
+
+}	
+
+
+void MvQOdbMetaData::computeTreePos(MvQOdbTable* parent,int &yp)
+{
+	//qDebug() << parent->name() << parent->treePosX() <<  parent->treePosY();
+
+	int xp=parent->treePosX()+1;
+	//int yp=parent->treePosY();
+        //qDebug() << "    " << xp << yp;
+	//qDebug() << "    " << parent->linksTo();
+
+	foreach(QString tblName,parent->linksTo())
+	{
+		MvQOdbTable* t=tables_[tblName];
+		t->setTreePosX(xp);
+		t->setTreePosY(yp);
+		computeTreePos(t,yp);
+		yp++;
+	}
+}	
+	
+void MvQOdbMetaData::getTreePosRange(int &xr, int &yr)
+{
+	xr=0;
+	yr=0;
+
+	QMapIterator<QString, MvQOdbTable*> it(tables_);
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+		if(it.value()->treePosX() > xr)
+		{
+			xr=it.value()->treePosX();
+		}
+		
+		if(it.value()->treePosY() > yr)
+		{
+			yr=it.value()->treePosY();
+		}
+		
+ 	}
+}
+
+#ifdef METVIEW_ODB_NEW
+
+void MvQOdbMetaData::loadOdbHeader()
+{	
+	odb_start();
+	odb::Reader oda(path_.toStdString());
+
+        int row=0;
+
+	odb::Reader::iterator it = oda.begin();
+
+	for(MetaData::iterator itc=it->columns().begin(); itc != it->columns().end(); ++itc)
+	{	
+		MvQOdbColumn* acol = new MvQOdbColumn;
+
+		string s=(*itc)->name();
+
+		QString colName(s.c_str());
+		QStringList lst=colName.split("@");
+	
+		if(lst.count() > 1)
+		{
+			acol->setTable(lst.back());	
+		}
+
+		acol->setName(QString(s.c_str()));
+		acol->setConstant((*itc)->isConstant());
+		acol->setMin((*itc)->min());
+		acol->setMax((*itc)->max());
+		
+		if((*itc)->hasMissing())
+		{  
+			acol->setHasMissingValue((*itc)->hasMissing());
+			acol->setMissingValue((*itc)->missingValue());
+		}
+		
+		if(typeIdMap.contains((*itc)->type()))
+		{
+			acol->setTypeId(typeIdMap[(*itc)->type()]);
+			acol->setType(typeIdNameMap[(*itc)->type()]);
+		}
+		
+		if(acol->typeId() == MvQOdbColumn::Bitfield) 
+		{
+			int pos=0;
+			for(unsigned int i=0; i < (*itc)->bitfieldDef().first.size() ; i++)
+			{				
+				string name=(*itc)->bitfieldDef().first.at(i);
+				int size=(*itc)->bitfieldDef().second.at(i);
+				acol->addBitfieldMember(new MvQOdbBitfieldMember(QString(name.c_str()),pos,size));
+				pos+=size;
+			}
+		}								
+
+		columns_.push_back(acol);
+	}
+
+	//qDebug() << "odb columns"  << columns_.size() << columns_.size() << columnNum();
+
+}
+
+#endif
diff --git a/src/libMvQtUtil/MvQOdbMetaData.h b/src/libMvQtUtil/MvQOdbMetaData.h
new file mode 100644
index 0000000..06794d6
--- /dev/null
+++ b/src/libMvQtUtil/MvQOdbMetaData.h
@@ -0,0 +1,186 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQOdbMetaData_H
+#define MvQOdbMetaData_H
+
+#include <QDebug>
+#include <QList>
+#include <QMap>
+#include <QStringList>
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+#include <assert.h>
+
+
+using namespace std;
+
+class MvQOdbVar
+{
+public:
+	MvQOdbVar(QString name,QString value) : name_(name), value_(value) {}; 
+						     
+	QString name() {return name_;}
+	QString value() {return value_;}
+
+private:						   
+	QString name_;
+	QString value_;
+};
+
+class MvQOdbBitfieldMember
+{
+public:
+	MvQOdbBitfieldMember(QString name,int pos, int size) : name_(name), 
+						       pos_(pos), 
+					               size_(size) {}
+
+	MvQOdbBitfieldMember(const MvQOdbBitfieldMember& m) : 
+			name_(m.name()), pos_(m.pos()), size_(m.size()) {}
+	QString name() const {return name_;}
+	int pos() const  {return pos_;}
+	int size() const {return size_;}
+
+private:						   
+	QString name_;
+	int pos_;
+	int size_;
+};
+
+
+class MvQOdbColumn
+{
+public:
+	enum OdbColumnType {None, Int, Float, String, Bitfield, OldType};
+
+	MvQOdbColumn() : typeId_(None) {};
+	MvQOdbColumn(QString name,QString type,QString table) : 
+    		name_(name), type_(type), table_(table), typeId_(None), constant_(false),
+    		hasMissingValue_(false), missingValue_(-999999.) {};
+
+	~MvQOdbColumn() {foreach(MvQOdbBitfieldMember* bf,bitfield_) {delete bf;};}
+
+	QString name() {return name_;}
+	QString type() {return type_;}
+	QString table() {return table_;}
+	OdbColumnType typeId() {return typeId_;}
+	QString unit() {return unit_;}
+	const  QList<MvQOdbBitfieldMember*>& bitfield() {return bitfield_;}
+	int bitfieldNum() {return bitfield_.size();}
+	bool isConstant() {return constant_;}
+	double min() {return min_;}
+	double max() {return max_;}
+	bool hasMissingValue() {return hasMissingValue_;}
+	double missingValue() {return missingValue_;}
+	
+	void   setName(QString s) {name_=s;}
+	void   setTable(QString s) {table_=s;}
+	void   setType(QString s) {type_=s;}
+	void   setTypeId(OdbColumnType s) {typeId_=s;}
+	void   setUnit(QString s) {unit_=s;}
+	void   addBitfieldMember(MvQOdbBitfieldMember* b) {bitfield_.push_back(b);};
+	void   setBitfield(QList<MvQOdbBitfieldMember*> b) {bitfield_=b;};
+	void   setConstant(bool b) {constant_=b;}
+	void   setMin(double min) {min_=min;}
+	void   setMax(double max) {max_=max;}
+	void   setHasMissingValue(bool b) {hasMissingValue_=b;}
+	void   setMissingValue(double v) {missingValue_=v;}
+	
+private:
+	QString name_;
+	QString type_;
+	QString table_;
+	OdbColumnType typeId_;
+	QString unit_;
+	QList<MvQOdbBitfieldMember*> bitfield_;
+	bool constant_;
+	double min_;
+	double max_;
+	bool hasMissingValue_;
+	double missingValue_;
+};
+
+
+class MvQOdbTable : public QList<MvQOdbColumn*>
+{ 
+public: 
+	MvQOdbTable(QString name) : name_(name), treePosX_(0), treePosY_(0) {};
+	
+	QString name() {return name_;};
+	void addColumn(MvQOdbColumn* col) {columns_.push_back(col);}
+	QList<MvQOdbColumn*>& columns() {return columns_;}
+	
+	QStringList& linksTo() {return linksTo_;};
+	QStringList& linksFrom() {return linksFrom_;};
+	void findLinks();
+	void addToLinksFrom(QString lnk) {linksFrom_.push_back(lnk);} 
+	int treePosX() {return treePosX_;};
+	void setTreePosX(int i) {treePosX_=i;};
+	int treePosY() {return treePosY_;};
+	void setTreePosY(int i) {treePosY_=i;};	
+
+private:
+	QString name_;	
+	QList<MvQOdbColumn*> columns_;
+	QStringList linksTo_;
+	QStringList linksFrom_;
+	int treePosX_;
+	int treePosY_;
+};		
+
+class MvQOdbMetaData
+{ 
+public:
+	enum OdbVersion {Version1, Version2, InvalidVersion}; 
+	//MvQOdbMetaData(QString);
+	MvQOdbMetaData(string,string);
+	//MvQOdbMetaData(QString,QString,QString);
+	~MvQOdbMetaData();
+	void init();	  	
+
+	OdbVersion odbVersion() {return odbVersion_;}
+	QString odbVersionString();
+	QString path() {return path_;}
+	QString query()    {return query_;}
+	int rowNum()   {return rowNum_;}
+	int columnNum() {qDebug() << "size" << columns_.size();return columns_.size();}
+
+	QMap<QString,MvQOdbTable*>& tables() {return tables_;}
+	QList<MvQOdbColumn*>& columns() {return columns_;}
+	QList<MvQOdbVar*>& vars() {return vars_;}
+
+	void getTreePosRange(int&, int&);
+
+protected:			
+	//void readMetaData();
+	void removeCommentFromLine(QString &);
+	void loadSchemaFile();
+	void getTableTree();
+	void computeTreePos(MvQOdbTable*,int &);
+
+#ifdef METVIEW_ODB_NEW
+	void loadOdbHeader();
+#endif
+	OdbVersion odbVersion_;
+
+	int rowNum_;
+	QString path_;
+	QString sourcePath_;
+	QString query_;
+
+	QList<MvQOdbTable*>  rootTables_;
+	QMap<QString,MvQOdbTable*> tables_;
+	QList<MvQOdbColumn*> columns_;
+	QList<MvQOdbVar*> vars_;
+};
+
+#endif
diff --git a/src/libMvQtUtil/MvQVisDefManager.cc b/src/libMvQtUtil/MvQVisDefManager.cc
new file mode 100644
index 0000000..a5914b0
--- /dev/null
+++ b/src/libMvQtUtil/MvQVisDefManager.cc
@@ -0,0 +1,532 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QBuffer>
+#include <QFile>
+#include <QXmlQuery>
+#include <QXmlResultItems>
+
+#include "MvKeyProfile.h"
+
+#include "MvQXmlQuery.h"
+#include "MvQVisDefManager.h"
+
+
+void MvQVisDef::addKey(QString key,QString value)
+{
+	keys_[key] << value;
+}
+//===============================================================
+//
+// MvQVisDefManagerBase
+//
+//===============================================================
+
+MvQVisDefManagerBase::MvQVisDefManagerBase(string fConf, DataType dataType) : fConf_(fConf), dataType_(dataType)
+{
+	loaded_=false;
+	dataTypeName_[GribType]="GRIB";
+}
+
+
+MvQVisDefManagerBase::~MvQVisDefManagerBase()
+{
+	clear();
+}
+
+void MvQVisDefManagerBase::clear()
+{
+	foreach(MvQVisDef *item, items_)
+	{
+		delete item;
+	}
+	items_.clear();
+}
+
+MvQVisDef* MvQVisDefManagerBase::addItem(QString name)
+{
+	MvQVisDef* item=new MvQVisDef(name);
+	items_.push_back(item);
+	return item;
+}
+
+void MvQVisDefManagerBase::deleteItem(int index)
+{
+	//vector<MvKeyProfile*>::iterator it=begin()+index;
+	//delete (*it);
+	//erase(it);	
+}	
+	
+void MvQVisDefManagerBase::collectKeys()
+{	
+	keys_.clear();
+	foreach(MvQVisDef *item, items_)
+	{
+		QMapIterator<QString, QStringList> it(item->keys());
+ 		while (it.hasNext()) 
+		{
+     			it.next(); 		
+			if(!keys_.contains(it.key()))
+			{
+				keys_ << it.key();
+			}
+	   	}
+	}
+
+	keys_.removeDuplicates();
+	qDebug() << "All keys:" << keys_;
+}
+
+//===============================================================
+//
+// MvQVisDefManager
+//
+//===============================================================
+
+MvQVisDefManager::MvQVisDefManager(string fConf, DataType dataType) :
+ MvQVisDefManagerBase(fConf,dataType) 
+{
+	classType_="MvQVisDefManager";
+}
+
+void MvQVisDefManager::loadItems()
+{
+	loaded_=true;
+
+	QFile file(fConf_.c_str());
+
+	if(file.open(QFile::ReadOnly | QFile::Text) == false)
+	{
+		//MvKeyProfile *prof=new MvKeyProfile("Metview default");
+		//push_back(prof);
+
+		//createDefaultProfile(prof);
+		//saveProfiles();	
+		return;
+	}
+
+	QString xmlConf(file.readAll());
+	qDebug() << xmlConf;
+
+	QXmlResultItems result;
+
+	QByteArray ba=xmlConf.toUtf8();
+	QBuffer buffer(&ba) ; // This is a QIODevice.
+    	buffer.open(QIODevice::ReadOnly);
+
+	MvQXmlQuery query;
+     	query.bindVariable("myDoc", &buffer);
+	query.bindVariable("dataType",QVariant(dataTypeName_[GribType]));
+	query.setQuery("doc($myDoc)//VisDef[@dataType=$dataType]/Item");
+	query.evaluateTo(&result);
+	
+	//Item nodes
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+         	if (item.isNode()) 
+		{		
+			QXmlResultItems keyResult, iconResult;
+			QString name;
+
+			//QXmlQuery query;
+			query.setFocus(item);
+
+			//Name of item node
+			query.setQuery("string(./@name)");
+			query.evaluateTo(&name);
+			name=name.simplified();
+
+			qDebug() << "Item:" << name;
+
+			//Create new item
+			MvQVisDef* visDef=new MvQVisDef(name);	
+			items_.push_back(visDef);
+
+			//Key nodes
+			query.setQuery("./Key");
+			query.evaluateTo(&keyResult);
+
+			//Key nodes
+			QXmlItem keyItem(keyResult.next());
+     			while (!keyItem.isNull()) 
+			{
+        			if (keyItem.isNode()) 
+				{		
+					QString keyName, keyValue;
+
+					QMap<QString,QString> att;
+					query.getAttributes(keyItem,att);
+					
+					if(att.contains("name"))
+						keyName=att["name"];
+
+					if(att.contains("value"))
+						keyValue=att["value"];
+
+					visDef->addKey(keyName,keyValue);	
+
+					qDebug() << "Key:" << keyName << keyValue;				
+				}
+
+				keyItem = keyResult.next();
+			}
+
+			//Key nodes
+			//QXmlQuery query;
+			query.setFocus(item);
+			query.setQuery("./Icon");
+			query.evaluateTo(&iconResult);
+
+			//Key nodes
+			QXmlItem iconItem(iconResult.next());
+     			while (!iconItem.isNull()) 
+			{
+        			if (iconItem.isNode()) 
+				{		
+					QString iconName;
+
+					QMap<QString,QString> att;
+					query.getAttributes(iconItem,att);
+					
+					if(att.contains("name"))
+						iconName=att["name"];
+
+					visDef->addVisDef(iconName);
+
+					qDebug() << "Icon:" << iconName;						
+				}
+
+				iconItem = iconResult.next();
+			}
+
+
+                 }
+
+		item = result.next();
+        }
+
+	file.close();
+
+	collectKeys();
+}
+
+void MvQVisDefManager::saveItems()	
+{
+	//Open file for writing
+	QFile out(fConf_.c_str());
+	out.open(QFile::WriteOnly | QFile::Text);
+
+	QString s;
+
+	s="<VisDef dataType=\"" + dataTypeName_[GribType] +"\">\n";
+	out.write(s.toUtf8());
+
+	foreach(MvQVisDef *item, items_)
+	{
+		s="<Item name=\"" + item->name()  + "\">\n";
+		out.write(s.toUtf8());
+
+		QMapIterator<QString, QStringList> it(item->keys());
+ 		while (it.hasNext()) 
+		{
+     			it.next();
+     		
+			s="\t<Key name=\"" + it.key() + "\"" + 
+			    "     value=\"" + it.value().join(",") + "\"/>\n";
+			   
+			out.write(s.toUtf8());	
+		}
+
+		foreach(QString icon, item->visDefs())
+		{
+			s="<Icon name=\"" + icon  + "\"/>\n";
+			out.write(s.toUtf8());
+		}
+
+		s="</Item>\n";
+		out.write(s.toUtf8());	
+	}
+
+	s="</VisDef>\n";
+	out.write(s.toUtf8());
+	//s="</Service>\n";
+	//out.write(s.toUtf8());
+
+	out.close();
+}
+
+
+QStringList MvQVisDefManager::visDefFile(MvKeyProfile* prof,int index)
+{
+	QMap<QString,QString> messageKeys;
+	for(vector<MvKey*>::iterator it=prof->begin(); it != prof->end(); it++)
+	{
+		QString name = QString::fromStdString((*it)->name());
+		QString val = QString::fromStdString((*it)->value().at(index));
+		messageKeys[name]=val;
+	}	
+	
+	qDebug() << messageKeys;
+
+	bool found;
+	foreach(MvQVisDef *item, items_)
+	{
+		QMapIterator<QString, QStringList> it(item->keys());
+ 
+		while (it.hasNext() == true) 
+		{
+     			it.next(); 
+			
+			qDebug() << "key:" << it.key() << it.value();
+
+			found = false;
+			if(messageKeys.contains(it.key()) == true && 
+                           it.value().contains(messageKeys[it.key()]) == true)
+			{
+				found = true;
+			}
+			else break;				
+
+			
+		}
+		if(found == true)
+		{
+			qDebug() << "icons:" << item->visDefs();
+			return item->visDefs();
+		}
+	}
+
+	return QStringList();
+}	
+
+
+
+//===============================================================
+//
+// MvQObstatVisDefManager
+//
+//===============================================================
+
+
+MvQObstatVisDefManager::MvQObstatVisDefManager(string fConf, DataType dataType) : MvQVisDefManagerBase(fConf,dataType) 
+{
+	classType_="MvQObstatVisDefManager";
+
+	MvRequest req("PCONT");
+	//req("PATH")      = grib_->fileName().c_str();
+	req("TEMPORARY") = 0;
+	//req("OFFSET")    = offset;
+	//req("LENGTH")    = size;
+	//req("_CLASS")    = GRIB;
+	//req("_NAME")     = (const char*)name.c_str();
+
+	req("CONTOUR") = "OFF";
+	//req("CONTOUR_MIN_LEVEL") = "10";
+	req("CONTOUR_LEVEL_SELECTION_TYPE") = "INTERVAL";
+	//req("CONTOUR_INTERVAL") = "10";
+	req("CONTOUR_SHADE") = "ON";
+	req("CONTOUR_SHADE_TECHNIQUE") = "GRID_SHADING";
+	req("CONTOUR_SHADE_MIN_LEVEL_COLOUR") = "BLUE";
+	req("CONTOUR_SHADE_MAX_LEVEL_COLOUR") = "RED";
+	req("CONTOUR_SHADE_COLOUR_DIRECTION") = "ANTICLOCKWISE";
+	req("CONTOUR_SHADE_METHOD") = "AREA_FILL";
+	req("CONTOUR_LABEL") = "OFF";
+	req("CONTOUR_HILO") = "OFF";
+
+	baseRequest_=req;
+}
+
+void  MvQObstatVisDefManager::loadItems()
+{
+	loaded_=true;
+
+	QFile file(fConf_.c_str());
+
+	if(file.open(QFile::ReadOnly | QFile::Text) == false)
+	{
+		return;
+	}
+
+	QTextStream in(&file);
+	while (!in.atEnd()) 
+	{
+        	QString line = in.readLine();
+         	if(line.contains("#") == false)
+		{
+			QStringList lst=line.split(" | ",QString::SkipEmptyParts);
+		
+			if(lst.count() ==0 || lst[0].count() < 8)
+				continue;
+
+			qDebug() << lst;
+
+			QString str=lst[0].simplified();
+			QString id=str.mid(0,3);
+			QString sensor=str.mid(3,3);
+			QString channel=str.mid(6);
+			
+			//Obs        fgdep       bcor       Obstdv       fgdStdv    BcorSTDV      Count     Unit
+			QStringList statId;
+			statId << "2" << "4" << "18" << "3" << "5" << "19" << "1";	
+	
+			int statCnt=0;
+			for(int i=1; i < lst.count() && i < statId.count(); i++)
+			{
+				QString keyName, keyValue;
+				
+				QStringList vDefLst=lst[i].split(" ",QString::SkipEmptyParts);
+				qDebug() << "stat:" << vDefLst;
+				if(vDefLst.count() == 3)
+				{
+					MvQVisDef *visDef= new MvQVisDef("obstat");
+					items_.push_back(visDef);
+
+					keyName="platform";
+					keyValue=QString::number(id.toInt());
+					visDef->addKey(keyName,keyValue);
+
+					keyName="instrument";
+					keyValue=QString::number(sensor.toInt());
+					visDef->addKey(keyName,keyValue);
+												
+					keyName="scaledValueOfFirstFixedSurface";
+					keyValue=channel;
+					visDef->addKey(keyName,keyValue);
+					
+					keyName="observationDiagnostic";
+					keyValue=statId[statCnt];
+					visDef->addKey(keyName,keyValue);
+
+					visDef->addVisDef(vDefLst[0]);
+					visDef->addVisDef(vDefLst[1]);
+				
+					qDebug() << visDef->keys();
+					qDebug() << visDef->visDefs();
+				}
+	
+				statCnt++;
+			}
+		}	
+	}
+
+	file.close();
+
+	collectKeys();
+}	 
+
+MvRequest MvQObstatVisDefManager::visDefRequest(MvKeyProfile *prof,int index)
+{
+	QMap<QString,QString> messageKeys;
+	for(vector<MvKey*>::iterator it=prof->begin(); it != prof->end(); it++)
+	{
+		QString name = QString::fromStdString((*it)->name());
+		QString val = QString::fromStdString((*it)->value().at(index));
+		messageKeys[name]=val;
+	}	
+	
+	qDebug() << messageKeys;
+
+	bool found;
+	foreach(MvQVisDef *item, items_)
+	{
+		QMapIterator<QString, QStringList> it(item->keys());
+ 
+		while (it.hasNext() == true) 
+		{
+     			it.next(); 
+			
+			qDebug() << "key:" << it.key() << it.value();
+
+			found = false;
+			if(messageKeys.contains(it.key()) == true && 
+                           it.value().contains(messageKeys[it.key()]) == true)
+			{
+				found = true;
+			}
+			else break;				
+
+			
+		}
+		if(found == true)
+		{
+			qDebug() << "visdef:" << item->visDefs();
+			QStringList vd=item->visDefs();
+			MvRequest r=baseRequest_;
+
+			if(vd[0] != "-99")
+			{
+				r("CONTOUR_MIN_LEVEL") = vd[0].toStdString().c_str();
+			}
+			r("CONTOUR_INTERVAL") = vd[1].toStdString().c_str();
+
+			return r;
+		}
+	}
+
+	return MvRequest();
+}	
+
+
+/*void  MvQVisDefManager::createDefaultProfile(MvKeyProfile *prof)
+{
+	if(keyType_ == GribType)
+	{
+		prof->addKey(new MvKey("count","Index"));	
+		prof->addKey(new MvKey("mars.date","Date"));
+		prof->addKey(new MvKey("mars.time","Time"));
+		prof->addKey(new MvKey("mars.step","Step"));
+		prof->addKey(new MvKey("mars.param","Param"));
+		prof->addKey(new MvKey("dataRepresentationType","Rep"));
+		prof->addKey(new MvKey("mars.levelist","Level"));
+		prof->addKey(new MvKey("mars.levtype","Levtype"));
+	}
+	else if(keyType_ == BufrType)
+	{
+		MvKey *key;
+
+		key=new MvKey("editionNumber","Edition","BUFR Edition Number");
+		key->setMetaData("section","1");
+		prof->addKey(key);	
+
+ 		key=new MvKey("masterTable","Master Table","Master table");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("masterTableVersion","Master Table Version Number","Master table version");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("localTableVersion","Local Table Version Number","Local table version");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("messageType","Message type","Message type");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("messageSubType","Message subtype","Message sub type");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("originatingCentre","Originating Centre","Originating centre");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("msgSubsetCount","msgSubsetCount","msgSubsetCount");
+		key->setMetaData("section","1");
+		prof->addKey(key);
+
+		key=new MvKey("date","Date","Date");
+		key->setMetaData("section","2");
+		prof->addKey(key);
+
+	}
+} */
diff --git a/src/libMvQtUtil/MvQVisDefManager.h b/src/libMvQtUtil/MvQVisDefManager.h
new file mode 100644
index 0000000..caba01d
--- /dev/null
+++ b/src/libMvQtUtil/MvQVisDefManager.h
@@ -0,0 +1,108 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQVisDefManager_H
+#define MvQVisDefManager_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+
+#include <QMap>
+#include <QString>
+#include <QStringList>
+
+using namespace std;
+
+class MvKeyProfile;
+//class MvRequest;
+#include "MvRequest.h"
+
+class MvQVisDef
+{
+public:
+	MvQVisDef(QString name) : name_(name) {};
+	QString name() {return name_;}
+
+	const QMap<QString,QStringList>& keys() const {return keys_;}
+	QStringList keyNames() {return keys_.keys();} 
+	QStringList keyValues(QString key) {return (keys_.contains(key))?keys_[key]:QStringList();}
+	const QStringList &visDefs() const {return visDefs_;}	
+
+	void addKey(QString,QString);
+	void addVisDef(QString visDef) {visDefs_.push_back(visDef);}
+
+public:
+	QString name_;
+	QMap<QString,QStringList> keys_;
+	QStringList  visDefs_;
+}; 
+
+class MvQVisDefManagerBase
+{
+public:
+	enum DataType {GribType};
+
+	virtual ~MvQVisDefManagerBase();
+	MvQVisDef* addItem(QString);
+	const QStringList& keys() {return keys_;}
+	QString classType() {return classType_;}
+
+	virtual QStringList visDefFile(MvKeyProfile*,int) {return QStringList();}
+	virtual MvRequest visDefRequest(MvKeyProfile*,int) {return MvRequest();}
+
+	bool isLoaded() {return loaded_;}
+	void clear();
+	void deleteItem(int);
+	virtual void loadItems()=0 ;
+	virtual void saveItems()=0 ;
+
+protected:
+	MvQVisDefManagerBase(string,DataType);	
+	void collectKeys();
+
+	//void createDefaultProfile(MvKeyProfile*);
+	string fConf_;
+	DataType dataType_;
+	QString classType_;
+	QMap<DataType,QString> dataTypeName_;
+	QList<MvQVisDef*> items_;
+	QStringList keys_;
+	bool loaded_;	
+};
+
+
+class MvQVisDefManager : public MvQVisDefManagerBase
+{
+public:
+	MvQVisDefManager(string,DataType);
+	~MvQVisDefManager() {};
+
+	QStringList visDefFile(MvKeyProfile*,int);
+	void loadItems();
+	void saveItems();	
+};
+
+class MvQObstatVisDefManager : public MvQVisDefManagerBase
+{
+public:
+	MvQObstatVisDefManager(string,DataType);
+	~MvQObstatVisDefManager() {};
+
+	MvRequest visDefRequest(MvKeyProfile*,int);
+	void loadItems();
+	void saveItems() {};	
+
+private:
+	MvRequest baseRequest_;
+};
+
+
+#endif
diff --git a/src/libMvQtUtil/MvQXmlQuery.cc b/src/libMvQtUtil/MvQXmlQuery.cc
new file mode 100644
index 0000000..8fed09c
--- /dev/null
+++ b/src/libMvQtUtil/MvQXmlQuery.cc
@@ -0,0 +1,77 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQXmlQuery.h"
+
+void MvQXmlQuery::getAtomicValues(QXmlResultItems &result,QStringList &lst)
+{
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+        	//qDebug() << item.isNode() <<  item.isAtomicValue() << item.toAtomicValue();
+
+		if (item.isAtomicValue()) 
+		{
+             		QVariant v = item.toAtomicValue();
+             		lst << v.toString().simplified();
+		}
+         	item = result.next();
+         }
+}
+
+void MvQXmlQuery::getAtomicValue(QXmlItem &node,QString &result)
+{
+	setFocus(node);
+	
+	setQuery("string()");
+	evaluateTo(&result);
+	result=result.simplified();
+}
+
+void MvQXmlQuery::getAttributes(QXmlItem &node,QMap<QString,QString> &att)
+{
+	QXmlResultItems result;
+
+	setFocus(node);
+
+	setQuery("./@*");
+	evaluateTo(&result);
+
+	QXmlItem item(result.next());
+     	while (!item.isNull()) 
+	{
+        	if (item.isNode()) 
+		{		
+			QString name,value;
+
+			setFocus(item);
+			
+			setQuery("name()");
+			evaluateTo(&name);
+			name=name.simplified();
+
+			//qDebug() << "name:" << name;
+
+			setQuery("string()");
+			evaluateTo(&value);
+			value=value.simplified();
+			
+			//qDebug() << "value:" << value;
+
+			if(name.isEmpty() == false)
+			{
+				att[name]=value;
+			}
+		}
+		item = result.next();
+        }	
+
+}
diff --git a/src/libMvQtUtil/MvQXmlQuery.h b/src/libMvQtUtil/MvQXmlQuery.h
new file mode 100644
index 0000000..6c7d04c
--- /dev/null
+++ b/src/libMvQtUtil/MvQXmlQuery.h
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQXmlQuery_H
+#define MvQXmlQuery_H
+
+#include <QMap>
+#include <QStringList>
+#include <QXmlQuery>
+#include <QXmlItem>
+#include <QXmlResultItems>
+
+class MvQXmlQuery : public QXmlQuery
+{
+public:
+	MvQXmlQuery() {};
+
+	void getAtomicValue(QXmlItem &,QString &);
+	void getAtomicValues(QXmlResultItems &,QStringList &);
+	void getAttributes(QXmlItem &,QMap<QString,QString> &);
+};
+
+#endif
diff --git a/src/libUtil/Assertions.hpp b/src/libUtil/Assertions.hpp
new file mode 100644
index 0000000..c776cd5
--- /dev/null
+++ b/src/libUtil/Assertions.hpp
@@ -0,0 +1,27 @@
+#ifndef Assertions_H
+#define Assertions_H
+#include <assert.h>
+
+// The require and ensure macros implement
+// the pre-conditions and post-conditions
+// for each module.
+//
+// The "invariant" macro verifies is an
+// invariant condition is true.
+//
+// The keywords "require", "invariant" and "ensure"
+// come from the Eiffel language. For more discussion
+// on these issues, please see:
+//
+// - Struostrup, "The C++ Programming Language", page 417.
+//
+// - Eilens, "Principles of Object-Oriented Programming"
+
+
+//extern "C" {void assert(int)}
+	
+
+#define require(statement)    assert(statement)
+#define ensure(statement)     assert(statement)
+
+#endif
diff --git a/src/libUtil/Box.cc b/src/libUtil/Box.cc
new file mode 100644
index 0000000..602e984
--- /dev/null
+++ b/src/libUtil/Box.cc
@@ -0,0 +1,364 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <gdefines.h>
+#include <Box.hpp>
+#include <Projection.hpp>
+
+#define TRUE 1
+#define FALSE 0
+
+Box :: Box(const Box& r) : _bll(r._bll), _bur(r._bur) {}
+
+Box :: Box (const Point& o, const Point& c)
+{
+	_bll = o;
+	_bur = c;
+}
+
+Box
+Box :: operator= (Box& b)
+{
+	_bll = b._bll;
+	_bur = b._bur;
+	return *this;
+}
+
+void
+Box :: print ()
+{
+	printf ("Box : Lower Left (%.1f,%.1f) UpperRight (%.1f,%.1f)\n", _bll.x(), _bll.y(), _bur.x(), _bur.y());
+}
+
+Box
+Box :: intersection (const Box& b) const
+{
+float	urx = b.upperRightX();
+float	ury = b.upperRightY();
+float	llx = b.lowerLeftX();
+float	lly = b.lowerLeftY();
+float	thisurx = this->upperRightX();
+float	thisury = this->upperRightY();
+float	thisllx = this->lowerLeftX();
+float	thislly = this->lowerLeftY();
+float	iurx, iury, illx, illy;
+float	aux;
+
+	if( urx < llx ){ aux = llx; llx = urx; urx = aux; }
+	if( ury < lly ){ aux = lly; lly = ury; ury = aux; }
+	if( thisurx < thisllx ){ aux = thisllx; thisllx = thisurx; thisurx = aux; }
+	if( thisury < thislly ){ aux = thislly; thislly = thisury; thisury = aux; }
+
+
+	illx = ( thisllx < llx ) ? llx : thisllx;
+	illy = ( thislly < lly ) ? lly : thislly;
+	iurx = ( thisurx < urx ) ? thisurx : urx;
+	iury = ( thisury < ury ) ? thisury : ury;
+
+	return Box(Point(illx,illy), Point(iurx,iury));
+}
+
+Box
+Box :: unionx(const Box& b) const
+{
+	return Box(_bll.pmin(b._bll), _bur.pmax(b._bur));
+}
+
+short
+Box :: contains(const Point& p) const
+{
+	return (_bll <= p && p <= _bur);
+}
+
+short
+Box :: contains(const Box& r) const
+{
+	return (contains(r._bll) && contains(r._bur));
+}
+
+short
+Box :: intersects(const Box& r) const
+{
+float	urx = r.upperRightX();
+float	ury = r.upperRightY();
+float	llx = r.lowerLeftX();
+float	lly = r.lowerLeftY();
+float	thisurx = this->upperRightX();
+float	thisury = this->upperRightY();
+float	thisllx = this->lowerLeftX();
+float	thislly = this->lowerLeftY();
+float	aux;
+
+	if( urx < llx ){ aux = llx; llx = urx; urx = aux; }
+	if( ury < lly ){ aux = lly; lly = ury; ury = aux; }
+	if( thisurx < thisllx ){ aux = thisllx; thisllx = thisurx; thisurx = aux; }
+	if( thisury < thislly ){ aux = thislly; thislly = thisury; thisury = aux; }
+
+	if( urx < thisllx || thisurx < llx ||
+	    ury < thislly || thisury < lly )
+		return FALSE;
+return TRUE;
+}
+
+void
+Box :: remap (SProjection* in, SProjection* out)
+{
+	float	aux,
+		step,
+		x1 = _bll.x(),
+		x2 = _bur.x(),
+		y1 = _bll.y(),
+		y2 = _bur.y(),
+		xmin = MAXFLOAT,
+		xmax = -MAXFLOAT,
+		ymin = MAXFLOAT,
+		ymax = -MAXFLOAT;
+
+	float  bigval = MAXFLOAT / 10.;
+
+	Point	p;
+	step = (x2 - x1)/NSTEPS;
+	for (aux = x1; aux < x2; aux += step)
+	{
+		/* lower edge */
+		p.x(aux);
+		p.y(y1);
+		p = in->PC2LL(p);
+		if ( p.x() < bigval )
+		{
+			p = out->LL2PC(p);
+			if ( p.x() < bigval ) 
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.x() < xmin)
+					xmin = p.x();
+				if (p.x() > xmax)
+					xmax = p.x();
+				if (p.y() < ymin)
+					ymin = p.y();
+				if (p.y() > ymax)
+					ymax = p.y();
+			}
+		}
+
+		/* upper edge */
+		p.x(aux);
+		p.y(y2);
+		p = in->PC2LL(p);
+		if ( p.x() < bigval )
+		{
+			p = out->LL2PC(p);
+			if ( p.x() < bigval ) 
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.x() < xmin)
+					xmin = p.x();
+				if (p.x() > xmax)
+					xmax = p.x();
+				if (p.y() < ymin)
+					ymin = p.y();
+				if (p.y() > ymax)
+					ymax = p.y();
+			}
+		}
+
+	}
+
+	step = (y2 -y1)/NSTEPS;
+	for (aux = y1; aux <y2; aux += step)
+	{
+		/* left edge */
+		p.x(x1);
+		p.y(aux);
+		p = in->PC2LL(p);
+		if ( p.x() < bigval )
+		{
+			p = out->LL2PC(p);
+			if ( p.x() < bigval ) 
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.x() < xmin)
+					xmin = p.x();
+				if (p.x() > xmax)
+					xmax = p.x();
+				if (p.y() < ymin)
+					ymin = p.y();
+				if (p.y() > ymax)
+					ymax = p.y();
+			}
+		}
+
+
+		/* right edge */
+		p.x(x2);
+		p.y(aux);
+		p = in->PC2LL(p);
+		if ( p.x() < bigval )
+		{
+			p = out->LL2PC(p);
+			if ( p.x() < bigval ) 
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.x() < xmin)
+					xmin = p.x();
+				if (p.x() > xmax)
+					xmax = p.x();
+				if (p.y() < ymin)
+					ymin = p.y();
+				if (p.y() > ymax)
+					ymax = p.y();
+			}
+		}
+
+	}
+
+	_bll.x(xmin);
+	_bll.y(ymin);
+	if (_bll.tooBig ()) _bll.init (-MAXFLOAT,-MAXFLOAT);
+	_bur.x(xmax);
+	_bur.y(ymax);
+	if (_bur.tooBig ()) _bur.init (MAXFLOAT,MAXFLOAT);
+
+	return;
+}
+
+void
+Box :: remap (SProjection* out)
+{
+	float	aux,
+		step,
+		x1 = _bll.x(),
+		x2 = _bur.x(),
+		y1 = _bll.y(),
+		y2 = _bur.y(),
+		xmin = MAXFLOAT,
+		xmax = -MAXFLOAT,
+		ymin = MAXFLOAT,
+		ymax = -MAXFLOAT;
+	Point	p;
+	step = (x2 - x1)/NSTEPS;
+	for (aux = x1; aux < x2; aux += step)
+	{
+		/* lower edge */
+		p.x(aux);
+		p.y(y1);
+		p = out->LL2PC(p);
+		if ( p.x() < (MAXFLOAT / 10.) ) 
+		{
+			/* search for minimum and maximum coordinates,*/
+			/* if a valid remapped point is calculated */
+			if (p.x() < xmin)
+				xmin = p.x();
+			if (p.x() > xmax)
+				xmax = p.x();
+			if (p.y() < ymin)
+				ymin = p.y();
+			if (p.y() > ymax)
+				ymax = p.y();
+		}
+
+
+		/* upper edge */
+		p.x(aux);
+		p.y(y2);
+		p = out->LL2PC(p);
+		if ( p.x() < (MAXFLOAT / 10.) ) 
+		{
+			/* search for minimum and maximum coordinates,*/
+			/* if a valid remapped point is calculated */
+			if (p.x() < xmin)
+				xmin = p.x();
+			if (p.x() > xmax)
+				xmax = p.x();
+			if (p.y() < ymin)
+				ymin = p.y();
+			if (p.y() > ymax)
+				ymax = p.y();
+		}
+
+	}
+
+	step = (y2 -y1)/NSTEPS;
+	for (aux = y1; aux <y2; aux += step)
+	{
+		/* left edge */
+		p.x(x1);
+		p.y(aux);
+		p = out->LL2PC(p);
+		if ( p.x() < (MAXFLOAT / 10.) ) 
+		{
+			/* search for minimum and maximum coordinates,*/
+			/* if a valid remapped point is calculated */
+			if (p.x() < xmin)
+				xmin = p.x();
+			if (p.x() > xmax)
+				xmax = p.x();
+			if (p.y() < ymin)
+				ymin = p.y();
+			if (p.y() > ymax)
+				ymax = p.y();
+		}
+
+
+		/* right edge */
+		p.x(x2);
+		p.y(aux);
+		p = out->LL2PC(p);
+		if ( p.x() < (MAXFLOAT / 10.) ) 
+		{
+			/* search for minimum and maximum coordinates,*/
+			/* if a valid remapped point is calculated */
+			if (p.x() < xmin)
+				xmin = p.x();
+			if (p.x() > xmax)
+				xmax = p.x();
+			if (p.y() < ymin)
+				ymin = p.y();
+			if (p.y() > ymax)
+				ymax = p.y();
+		}
+
+	}
+	_bll.x(xmin);
+	_bll.y(ymin);
+	_bur.x(xmax);
+	_bur.y(ymax);
+
+	return;
+}
+
+
+
+short Box :: load (FILE *fp)
+{
+	float 	x1 = 0,
+		x2 = 0,
+		y1 = 0,
+		y2 = 0;
+
+	if(fscanf(fp,"%f%f%f%f",&x1,&y1,&x2,&y2) == EOF)
+		return FALSE;
+	_bll.x(x1);
+	_bll.y(y1);
+	_bur.x(x2);
+	_bur.y(y2);
+
+	return TRUE;
+}
+
+short Box :: save (FILE  *fp)
+{ 
+	if (fprintf (fp,"%f %f %f %f ", _bll.x(), _bll.y(), _bur.x(), _bur.y()) == EOF)  return FALSE;
+	return TRUE;
+}
+
diff --git a/src/libUtil/Box.hpp b/src/libUtil/Box.hpp
new file mode 100644
index 0000000..9b3005f
--- /dev/null
+++ b/src/libUtil/Box.hpp
@@ -0,0 +1,163 @@
+//
+// .SUMMARY:
+// Defines the Box class.
+//
+// .DESCRIPTION
+// The Box class is used to store retangular entities like windows, viewports,
+// clipping and extend rectangles, among others.
+//
+// .SEE ALSO
+// Point
+//
+//
+
+#ifndef	Box_H
+#define Box_H
+
+#include <gdefines.h>
+
+#ifndef Point_H
+#include <Point.hpp>
+#endif
+
+class SProjection;
+
+class Box
+{
+	Point _bll, _bur;
+//		Lower-left and upper-right coordinates that defines the rectangle.
+
+public:
+
+	Box () {}
+//		Empty constructor.
+
+	Box (const Point& o, const Point& c);
+//		Normal constructor.
+//		Input :
+//			o : point (lower-left)
+//			c : point (upper-right)
+
+	~Box () {}
+//		Normal destructor.
+
+	Box (const Box&);
+//		Copy initializer.
+
+	short contains (const Point& p) const;
+//		Check if Box contains Point p.
+//		Input :
+//			p : point
+//		Return :
+//			TRUE  : box contains point p
+//			FALSE : box not contains point p
+
+	short contains (const Box& b) const;
+//		Check if Box contains Box b.
+//		Input :
+//			b : box
+//		Return :
+//			TRUE  : box contains b
+//			FALSE : box not contains b
+
+	short intersects (const Box& b) const;
+//		Check if Box intersects Box b.
+//		Input :
+//			b : box
+//		Return :
+//			TRUE  : box intersects b
+//			FALSE : box not intersects b
+
+	Box intersection (const Box& b) const;
+//		Perform the intersection between Box and Box b. Return the new box.
+
+	Box unionx (const Box& b) const;
+//		Perform the union between Box and Box b. Return the new box.
+
+	Point& lowerLeft () { return _bll; }
+//		Return the lower-left corner of the rectangle.
+
+	Point& upperRight () { return _bur; }
+//		Return the upper-right corner of the rectangle.
+
+	void lowerLeft (const Point& pp){ _bll = pp; }
+//		Initialize the lower-left corner of the rectangle.
+//		Input :
+//			pp : point
+
+	void upperRight (const Point& pp){ _bur = pp; }
+//		Initialize the upper-right corner of the rectangle.
+//		Input :
+//			pp : point
+
+	float upperRightX ()const { return _bur.x(); }
+//		Return the X coordinate from the upper-right corner of the rectangle.
+
+	float upperRightY ()const { return _bur.y(); }
+//		Return the Y coordinate from the upper-right corner of the rectangle.
+
+	float lowerLeftX ()const { return _bll.x(); }
+//		Return the X coordinate from the lower-left corner of the rectangle.
+
+	float lowerLeftY ()const { return _bll.y(); }
+//		Return the Y coordinate from the lower-left corner of the rectangle.
+
+	void upperRightX (float f) { _bur.x(f); }
+//		Set the X coordinate from the upper-right corner of the rectangle.
+//		Input :
+//			f : float variable
+
+	void upperRightY (float f) { _bur.y(f); }
+//		Set the Y coordinate from the upper-right corner of the rectangle.
+//		Input :
+//			f : float variable
+
+	void lowerLeftX (float f) { _bll.x(f); }
+//		Set the X coordinate from the lower-left corner of the rectangle.
+//		Input :
+//			f : float variable
+
+	void lowerLeftY (float f) { _bll.y(f); }
+//		Set the Y coordinate from the lower-left corner of the rectangle.
+//		Input :
+//			f : float variable
+
+
+	void print ();
+//		Print box coordinates on the console.
+
+	void init (Point& l, Point& r) { _bll = l; _bur = r; }
+//		Store the first (or a new) rectangle.
+//		Input:
+//			l : lower-left corner coordinate
+//			r : upper-right corner coordinate
+
+	float width () { return mv_abs(_bur.x() - _bll.x()); }
+//		Return the width of the rectangle.
+
+	float height () { return mv_abs(_bur.y() - _bll.y()); }
+//		Return the height of the rectangle.
+
+	Box operator= (Box& b);
+//		Assignment capability for class Box instances.
+
+	void remap (SProjection* in, SProjection* out);
+//		Remap box in projection "in" to box in projection "out".
+//		Input :
+//			in  : input projection
+//			out : output projection
+
+	void remap (SProjection* out);
+//		Remap box defined in latitude and longitude to
+//		projection "out". This method does not just remap the
+//		two points that define the box. It searches for
+//		the minimum and maximum projection coordinates
+//		values along the edges of the box.
+//		Input :
+//			out : desired projection
+
+	short load (FILE *fp);
+	short save (FILE *fp);
+};
+
+#endif
diff --git a/src/libUtil/Cached.cc b/src/libUtil/Cached.cc
new file mode 100644
index 0000000..a182606
--- /dev/null
+++ b/src/libUtil/Cached.cc
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <Cached.h>
+
+//__________________________________________________ subString
+
+Cached Cached::subString( int StartPos, int Length ) const
+{
+  char* temp = new char[ Length + 1 ];
+
+  if( Str )
+  {
+    //-- does not check that substring inside original string!
+    strncpy( temp, Str + StartPos - 1, Length );
+    temp[Length]='\0';
+  }
+  else
+  {
+    *temp = '\0';
+  }
+  Cached SubString( temp );
+  delete [] temp;
+
+  return SubString;
+}
+
+
+static Cached add(const char *a,const char *b)
+{
+	if(!a) return b;
+	if(!b) return a;
+
+	int n = strlen(a) + strlen(b) + 1;
+	char buf[1024];
+
+	if(n < sizeof(buf))
+	{
+		strcpy(buf,a);
+		strcat(buf,b);
+		return buf;
+	}
+	else
+	{
+		char *p = new char[n];
+		strcpy(p,a);
+		strcat(p,b);
+		Cached x = p;
+		delete [] p;
+		return x;
+	}
+}
+
+Cached operator+(const char *s,const Cached& c)
+{
+	return add(s,c);
+}
+
+Cached Cached::operator+(int n) const
+{
+	char buf[80];
+	sprintf(buf,"%d",n);
+	return add(*this,buf);
+}
+
+Cached Cached::toUpper ()
+{
+	const char *t = Str;
+	char* data    = new char[ strlen(Str) + 1 ];
+	int   i       = 0;
+
+	while(*t)
+	{
+		data[i] = toupper(*t);
+		t++;
+		i++;
+	}
+	data[i] = '\0';
+
+	Cached x = data;
+	delete[] data;
+	return x;
+}
diff --git a/src/libUtil/Cached.h b/src/libUtil/Cached.h
new file mode 100644
index 0000000..b6e5616
--- /dev/null
+++ b/src/libUtil/Cached.h
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Cached_DEFINED
+#define Cached_DEFINED
+
+#include <mars.h>
+#include <string.h>
+#include <ctype.h>
+
+//! Obsolete caching string class (pre std::string)
+/*! Although this class, based on libMars C functions \c strcache()
+ *  and \c strfree(), is heavily used in Metview code, it is now
+ *  considered obsolete and superceded by standard std::string class
+ *  and the use of Cached in the new code is not recommended.
+ *  This documentation is mainly for understanding the old code
+ *  that still uses Cached.
+ */
+class Cached
+{
+    char *Str;
+
+public:
+
+    //! Constructor with a C string as argument
+    Cached(const char* s = NULL){ Str = strcache(s); }
+
+    //! Copy constructor
+    Cached(const Cached& c)     { Str = strcache(c.Str); }
+
+    //! Destructor
+    ~Cached()                   { strfree(Str); }
+
+    //! Operator to cast Cached into a C string
+    operator const char*() const      { return Str; }
+
+    //! Assignment operator for a C string
+    Cached& operator =(char* s)
+        { strfree(Str); Str = strcache(s); return *this; }
+
+    //! Assignment operator for Cached
+    Cached& operator =(const Cached& c)
+        { strfree(Str); Str = strcache(c.Str); return *this; }
+
+    //! Operator to test the equality
+    int operator==(const Cached& c) const { return Str == c.Str; }
+
+    //! Method to extract a substring
+    /*! Copies a substring of length \c Length, starting from
+     *  position \c StartPos.
+     *  The first character is in position \c 1. \n \n
+     *  NOTE: \c Length is not checked against a possible overflow
+     *  and for \c Length overflowing the original string the
+     *  substring will contain bytes after the original string!
+     */
+    Cached subString( int StartPos, int Length ) const;
+
+    //! Method to convert text to upper case
+    Cached toUpper();
+
+	//! Concatenation operator for \c int
+	/*! The numeric value is first converted to a number string
+	 *  and the number string is concatenated to the original string.
+         */
+	Cached operator+(int)         const;
+
+	//! Concatenation operator for \c long
+	/*! The numeric value is first converted to a number string
+	 *  and the number string is concatenated to the original string.
+         */
+	Cached operator+(long)        const;
+
+	//! Concatenation operator for \c double
+	/*! The numeric value is first converted to a number string
+	 *  and the number string is concatenated to the original string.
+         */
+	Cached operator+(double)      const;
+
+	//! Comparision operator
+	int operator<(const Cached& other) const
+		{ return strcmp(Str,other.Str) < 0; }
+
+	//! Comparision operator
+	bool less(const Cached& other) const
+		{ return ( strcmp(Str,other.Str) < 0) ? true : false; }
+
+};
+
+//! Function to concatenate a \c long and \c Cached
+Cached operator +(long,const Cached&);
+
+//! Function to concatenate a \c double and \c Cached
+Cached operator +(double,const Cached&);
+
+//! Function to concatenate a C string (<PRE>const char*</PRE>) and \c Cached
+Cached operator +(const char*,const Cached&);
+
+#endif
diff --git a/src/libUtil/DataTools.hpp b/src/libUtil/DataTools.hpp
new file mode 100644
index 0000000..63fafd2
--- /dev/null
+++ b/src/libUtil/DataTools.hpp
@@ -0,0 +1,40 @@
+#ifndef DataToolsDEFINED
+#define DataToolsDEFINED
+#include <mars.h>
+
+#ifndef MAXFLOAT
+const float MAXFLOAT =	3.4E37;
+#endif
+
+#ifndef BIGFLOAT
+const float BIGFLOAT =	3.4E35;
+#endif
+
+#include <math.h>
+
+void		AppendRequest (request* head, request* tail);
+err		GetFieldFromRequest (request* filter, request* mars, field* g);
+err		GetFieldFromRequest (int par, int lev, request* mars, field* g);
+err		GetFieldFromRequest (int lev, request* mars, field* g);
+err		GetFieldFromRequest (request* mars, field* g);
+void		AskLNSP (request* mars);
+request*	FilterRequest (int par, int lev, request* mars);
+int		ModelLevels (field* grib);
+//float		ModelLevelPressure (field* lnsp, float sp, int lev);
+//void		Statistics (field* g, float* fmin, float* fmax, float* fmean);
+err 		UpdateFile (const char* fname, field* g);
+request*	GetRequestFromFile (const char* fname);
+void		ExpandRequest (request* r);
+void		GetCompactRequest (request* compact, request* extended);
+void		SortParam (request *r, const char* parname, int ascending);
+void		PutValue(request *r,const char *parname,const char *valname);
+void 		PutValueAtHead (request *r,const char *parname,const char *valname);
+//float		InterpolateAt (double x, double y, field* grib);
+//void		InterpolateAlong (float* val, int npoint, float x1, float y1, float x2, float y2, field* grib, int met=0);
+void		EvaluateLine (float loni, float lati, float lonf, float latf, int npt, double* lona, double* lata, int met=0);
+//float		AverageAt (float x1, float y1, float x2, float y2, field* grib);
+//void		AverageAlong (float* val, int npoint, float x1, float y1, float x2, float y2, field* grib, int equator);
+float		Distance (float x1, float y1, float x2, float y2);
+request*	LoopRequest (request *r, int index, int count, char *strings[]);
+const char*		Date2Date (const char*);
+#endif
diff --git a/src/libUtil/DataVis.hpp b/src/libUtil/DataVis.hpp
new file mode 100644
index 0000000..a2c6de9
--- /dev/null
+++ b/src/libUtil/DataVis.hpp
@@ -0,0 +1,6 @@
+#ifndef DataVisDEFINED
+#define DataVisDEFINED
+
+void		InitDataVis (int argc, char **argv, char* service, char* command);
+
+#endif
diff --git a/src/libUtil/Factory.hpp b/src/libUtil/Factory.hpp
new file mode 100644
index 0000000..c671e6d
--- /dev/null
+++ b/src/libUtil/Factory.hpp
@@ -0,0 +1,135 @@
+//
+// .NAME:	
+//  Factory
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Implements a template for the "factory" pattern.
+//
+//  The "factory" pattern is a technique for creating new
+//  instances of objects which defines an abstract interface,
+//  (represented by the "Make" module). The subclasses of
+//  factory decide which class to instantiate.
+//
+//  Each subclass of factory "registers" itself at compile time;
+//  therefore, the addition of a new factory requires no change
+//  the parent class.
+//
+// .CLIENTS:
+//
+//
+//
+// .RESPONSABILITIES:
+//
+//
+//
+//  
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//  	
+//
+// .REFERENCES:
+//  This technique is described in the article 
+//  "A New and Useful Template Technique: 'Traits'", 
+//  included in the book "C++ Gems"  
+//
+#ifndef Factory_H
+#define Factory_H
+
+#include "Cached.h"
+#include "inc_stl.h"
+
+// Class Device Factory - clones a new Device on Request
+
+// struct GETraits {
+//	typedef GraphicEngine Type;
+//	typedef MvRequest&    Parameter;
+//      static  Cached        FactoryName  ( Parameter );
+//      static  Type*         DefaultObject( Parameter );
+// }
+
+
+template <class Trait> 
+class Factory 
+{
+  typedef map<Cached,Factory<Trait>*,less<Cached> > Map;
+  
+  static Map *map_;
+  
+  Cached     name_;
+  
+  virtual typename Trait::Type * Build ( typename Trait::Parameter ) = 0;
+
+public:
+
+// -- Normal Constructor
+
+	Factory (const Cached& decoderName);
+	virtual ~Factory();
+
+// -- Virtual Constructor 
+        static typename Trait::Type* Make  ( typename Trait::Parameter );
+};
+
+// Initialisation of static variable
+
+template <class Trait>
+typename Factory<Trait>::Map* Factory<Trait>::map_ = 0;
+
+// Constructor
+
+template<class Trait>
+Factory<Trait>::Factory(const Cached& name):
+	name_(name)
+{
+        if ( map_ == 0 )
+	  map_ = new typename Factory<Trait>::Map();
+
+	// Put the object in the factory dictionary
+	(*map_)[name_] = this;
+}
+
+// Destructor
+
+template<class Trait>
+Factory<Trait>::~Factory ()
+{
+	// Remove the object from the factory dictionary
+	map_->erase ( name_ );
+
+}
+
+// Virtual Constructor
+
+template <class Trait> 
+typename Trait::Type*
+Factory <Trait>::Make ( typename Trait::Parameter param )
+{
+
+	// Retrieve the name of the factory
+	const char* name = Trait::FactoryName ( param );
+
+	// No name ? Clone a default object
+	if ( name == 0 ) return Trait::DefaultObject ( param );
+
+	// try to find the name on the factory dictionary
+	typename Map::iterator i = map_->find ( name );
+
+	// Not found ?  Clone a default object
+	if ( i == map_->end() )
+		return Trait::DefaultObject ( param );
+
+	// Create an object, based on the input parameters
+	return (*i).second->Build ( param );
+
+}
+
+#endif
diff --git a/src/libUtil/Grib.cc b/src/libUtil/Grib.cc
new file mode 100644
index 0000000..ef4a35c
--- /dev/null
+++ b/src/libUtil/Grib.cc
@@ -0,0 +1,1924 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Grib.hpp"
+#include <stdio.h>
+#include <math.h>
+#include <sys/types.h>
+#ifndef sun
+#include <sys/dir.h>
+#endif
+#include <unistd.h>
+#include <string.h>
+
+#ifndef Box_H
+#include "Box.hpp"
+#endif
+
+#ifndef Projection_H
+#include "Projection.hpp"
+#endif
+
+#include "min_max_macros.h"
+
+#define BUF_IMA			7680
+#define ORIGIN_CENTER 		46
+
+
+#ifdef ultrix
+	extern "C" { char* strdup(char*); }
+#endif
+
+long
+ExtractBitField ( short b1, short nb, unsigned char* b )
+{
+	short bit, nbyte, nbit;
+	long ivb, ivalue;
+
+	ivalue = 0;
+	for ( bit = 0; bit < nb; bit++ )
+	{
+		nbyte = ( b1 + bit ) / 8;
+		nbit  = 7 - ( b1 + bit ) % 8;
+		ivb   = b [ nbyte ];
+		ivb   = ivb >> nbit;
+		ivb   = ivb & 1;
+		ivalue = ivalue << 1;
+		ivalue = ivalue | ivb;
+
+	}
+
+	return ( ivalue );
+}
+
+
+void
+InsertBitField (long cv, short b1, short nb, unsigned char* b )
+{
+	short bit, nbyte, nbit;
+	long ivb, ivalue;
+
+	ivalue = cv;
+	for ( bit = nb; bit >= 0; bit-- )
+	{
+		nbyte = ( b1 + bit - 1) / 8;
+		nbit  = 7 - ( b1 + bit - 1) % 8;
+		ivb = ivalue & 1L;
+		ivalue >>= 1;
+		ivb <<= nbit;
+		b [ nbyte ] |= (unsigned char)ivb;
+	}
+
+}
+
+int
+getint (unsigned char* data, short size)
+{
+	int	i,sign,value;
+
+	if (size == 1) return (int)data[0];
+
+	sign = 1;
+	value = data[0];
+	if (value>127)
+	{
+		value -= 128;
+		sign = -1;
+	}
+
+	for (i = 1; i < size; i++)
+	{
+		value <<= 8;
+		value |= data[i];
+
+	}
+
+	return value*sign;
+}
+
+void
+putint (unsigned char* data, short size, int val)
+{
+	int i,value;
+
+	value = (int)fabs((double)val);
+	for (i = size-1; i > 0; i--)
+	{
+		data[i] = value & 0x000000ff;
+		value >>= 8;
+	}
+
+	if (val < 0) data[0] = value+128;
+	else	     data[0] = value;
+}
+
+
+GribFile :: GribFile (const char* d, const char* n)
+{
+	GFdir = strdup (d);
+	GFname = strdup (n);
+	GFfp = NULL;
+	GFnopens = 0;
+	GFpos = 0L;
+}
+
+GribFile :: ~GribFile ()
+{
+	delete GFdir;
+	delete GFname;
+}
+
+void
+GribFile :: Init (const char* d, const char* n)
+{
+	GFdir = strdup (d);
+	GFname = strdup (n);
+	GFfp = NULL;
+	GFnopens = 0;
+	GFpos = 0L;
+}
+
+short
+GribFile :: Open ()
+{
+	char* dn;
+
+	if (GFnopens == 0)
+	{
+		dn = new char [ strlen(GFdir)+strlen(GFname)+2];
+		sprintf (dn,"%s/%s",GFdir,GFname);
+		if ((GFfp = fopen (dn, "rb+")) == NULL) return FALSE;
+		GFpos = 0L;
+		delete dn;
+	}
+	GFnopens++;
+	return TRUE;
+}
+
+short
+GribFile :: IsGrib ()
+{
+	char	*g,*grib;
+	short	i;
+
+	grib = strdup("GRIB");
+	g = strdup("");
+
+	i=0;
+	while (i<4)
+	{
+
+		if (Read (g,1) == FALSE) return FALSE;
+
+		if (*g==grib[i]) i++;
+		else
+		{
+			i=0;
+			if (*g==grib[i]) i++;
+		}
+	}
+	delete grib;
+	delete g;
+
+	return TRUE;
+}
+
+short
+GribFile :: Create ()
+{
+	char* dn;
+	dn = new char [ strlen(GFdir)+strlen(GFname)+2];
+	sprintf (dn,"%s/%s",GFdir,GFname);
+	GFnopens = 1;
+	if ((GFfp = fopen (dn, "w+b")) == NULL) return FALSE;
+	GFpos = 0L;
+	delete dn;
+	return TRUE;
+}
+
+void
+GribFile :: Close ()
+{
+	GFnopens--;
+	if (GFnopens == 0)
+	{
+		fclose (GFfp);
+		GFfp = NULL;
+	}
+}
+
+short
+GribFile :: Read (char* buf, int num)
+{
+	if (fread(buf,1,num,GFfp) != num) return FALSE;
+	GFpos += (long)num;
+
+	return TRUE;
+}
+
+short
+GribFile :: Write (char* buf, int num)
+{
+	int k;
+	if ((k = fwrite(buf,1,num,GFfp)) != num)
+	{
+		printf("Write falhou : k = %d, num = %d\n", k, num);
+		return FALSE;
+	}
+	GFpos += (long)num;
+
+	return TRUE;
+}
+
+
+short
+GribFile :: Skip (long offset)
+{
+	if (fseek (GFfp, offset, SEEK_CUR) == -1) return FALSE;
+	GFpos += offset;
+	return TRUE;
+}
+
+short
+GribFile :: Seek (short ind)
+{
+	unsigned char	a;
+	short		i;
+	int		size;
+	SECTION0	sec0;
+	SECTION1	sec1;
+	SECTION2	sec2;
+	SECTION3	sec3;
+	SECTION4	sec4;
+
+	Open();
+	Rewind();
+	
+	for (i = 0; i < ind; i++)
+	{
+		if (IsGrib() == FALSE) return FALSE;
+		Skip(-4);
+		Read ((char*)&sec0,SEC0_FSIZE);
+		if (sec0.ed_number == 1) Skip(getint(sec0.length,sizeof(sec0.length))-SEC0_FSIZE);
+		else 	// old format
+		{
+			// Skip Section 1
+			Skip(-4);
+			Read ((char*)&sec1, SEC1_FSIZE);
+			size = getint(sec1.length,sizeof(sec1.length));
+			Skip(size-SEC1_FSIZE);
+
+			// Skip Section 2
+			a = sec1.flag;
+			a >>= 7;
+			if ( a==1 )
+			{
+				Read ((char*)&sec2, SEC2_FSIZE);
+				size = getint (sec2.length,sizeof(sec2.length));
+				Skip(size-SEC2_FSIZE);
+			}
+
+			// Skip Section 3
+			a = sec1.flag;
+			a >>= 6;
+			a &= 1;
+			if ( a==1 )
+			{
+				Read ((char*)&sec3, SEC3_FSIZE);
+				size = getint (sec3.length,sizeof(sec3.length));
+				Skip(size-SEC3_FSIZE);
+			}
+
+			// Skip Section 4
+			Read ((char*)&sec4, SEC4_FSIZE);
+			size = getint (sec4.length,sizeof(sec4.length));
+			Skip(size-SEC4_FSIZE);
+
+			// Skip Section 5
+			Skip(SEC5_FSIZE);
+		}
+	}
+
+	if (IsGrib() == FALSE) return FALSE;
+
+	Close ();
+	return TRUE;
+}
+
+void
+GribFile :: Rewind ()
+{
+	rewind (GFfp);
+	GFpos = 0L;
+}
+
+short
+GribFile  :: Eof (short& ind)
+{
+	unsigned char	a;
+        int		size;
+	SECTION0	sec0;
+	SECTION1	sec1;
+	SECTION2	sec2;
+	SECTION3	sec3;
+	SECTION4	sec4;
+
+	Open();
+	Rewind();
+        short i = 0;
+        while (IsGrib())
+        {   
+		Read ((char*)&sec0,SEC0_FSIZE);
+		if (sec0.ed_number == 1) 
+		Skip(getint(sec0.length,sizeof(sec0.length))-SEC0_FSIZE);
+		else 	// old format
+		{	
+			// Skip Section 1
+			Skip(-4);
+			Read ((char*)&sec1, SEC1_FSIZE);
+			size = getint(sec1.length,sizeof(sec1.length));
+			Skip(size-SEC1_FSIZE);
+
+			// Skip Section 2
+			a = sec1.flag;
+			a >>= 7;
+			if ( a==1 )
+			{
+				Read ((char*)&sec2, SEC2_FSIZE);
+				size = getint (sec2.length,sizeof(sec2.length));
+				Skip(size-SEC2_FSIZE);
+			}
+
+			// Skip Section 3
+			a = sec1.flag;
+			a >>= 6;
+			a &= 1;
+			if ( a==1 )
+			{
+				Read ((char*)&sec3, SEC3_FSIZE);
+				size = getint (sec3.length,sizeof(sec3.length));
+				Skip(size-SEC3_FSIZE);
+			}
+
+			// Skip Section 4
+			Read ((char*)&sec4, SEC4_FSIZE);
+			size = getint (sec4.length,sizeof(sec4.length));
+			Skip(size-SEC4_FSIZE);
+
+			// Skip Section 5
+			Skip(SEC5_FSIZE);
+
+		}
+		i++;
+      
+        }
+        ind = i; 
+	Close();
+	return TRUE;
+ }
+ 
+//////////////////////////////////////////////////////////////////////////
+
+GribData :: ~GribData ()
+{
+	delete GDsec2;
+	delete GDsec3;
+	if (GDtranslated)
+	{
+		delete GDlookup;
+		delete GDbuf;
+	}
+}
+
+
+GribData :: GribData ()
+{
+	GDfile   = NULL;
+	GDbuf    = NULL;
+	GDlookup = NULL;
+	GDtranslated = FALSE;
+	GDsec2   = NULL;
+	GDsec3   = NULL;
+}
+
+GribData ::  GribData ( GribFile *gf, GribData* gd)
+{
+	GDfile  = gf;
+	gf->Eof(GDindex);
+	GDpos_inicio_dados = gf->Pos() + getint(gd->GDsec0.length, sizeof(GDsec0.length)) - getint(gd->GDsec4.length, sizeof(GDsec4.length)) -
+SEC5_FSIZE;
+
+	GDlookup           = NULL;
+	GDtranslated       = FALSE;
+	GDbuf              = NULL;
+	GDnewnx            = gd->GDnewnx;
+	GDnx               = gd->GDnx;
+	GDny               = gd->GDny;
+	GDresx             = gd->GDresx;
+	GDresy             = gd->GDresy;
+	GDzscale           = gd->GDzscale;
+	GDfmin             = gd->GDfmin;
+	GDibsiz            = gd->GDibsiz;
+	GDiskip2           = gd->GDiskip2;
+
+	short size;
+
+// Initialize Section 0
+
+	memcpy(&GDsec0,&gd->GDsec0,SEC0_FSIZE);
+	GDsec0.ed_number = 1;
+
+// Initialize Section 1
+
+	size = getint(gd->GDsec1.length,sizeof(gd->GDsec1.length));
+	if (size > SEC1_FSIZE)
+	{
+		GDsec1.documentation_file = new unsigned char[size-SEC1_FSIZE];
+		memcpy (&GDsec1, (void*)&gd->GDsec1, SEC1_FSIZE);
+		memcpy (GDsec1.documentation_file, gd->GDsec1.documentation_file, (int)size-SEC1_FSIZE);
+	}
+	else memcpy (&GDsec1, &gd->GDsec1, (int)size);
+
+	// Initialize Section 2
+	if (gd->GDsec2 == NULL)
+		GDsec2 = NULL;
+	else
+	{	
+		GDsec2 = new SECTION2;
+		memcpy (GDsec2, gd->GDsec2, SEC2_FSIZE);
+		size =  getint(gd->GDsec2->length ,sizeof(gd->GDsec2->length)) - SEC2_FSIZE;
+		if (size == 0)
+			GDsec2->data=NULL;
+		else
+		{
+			GDsec2->data = new unsigned char[size];
+       			memcpy (GDsec2->data, gd->GDsec2->data, size);
+		}
+	}
+
+	// Initialize Section 3
+	if (gd->GDsec3 == NULL)
+		GDsec3 = NULL;
+	else
+	{	
+		GDsec3 = new SECTION3;
+		memcpy (GDsec3, gd->GDsec3, SEC3_FSIZE);
+		size = getint(GDsec3->length,sizeof(GDsec3->length));
+		GDsec3->bitmap = new unsigned char[size-SEC3_FSIZE];
+		memcpy (GDsec3->bitmap, gd->GDsec3->bitmap, (int)size-SEC3_FSIZE);
+	}
+
+	// Initialize Section 4
+   	 memcpy(&GDsec4, &gd->GDsec4, SEC4_FSIZE); 
+
+	// Initialize Section 5
+	 memcpy(&GDsec5, &gd->GDsec5, SEC5_FSIZE); 
+}
+
+void
+GribData :: Init (GribFile* gf, int i)
+{
+	unsigned char a;
+	int 	size;
+
+	GDfile = gf;
+	GDindex = i;
+
+// Read SECTION 0
+
+	GDfile->Skip(-4);
+	GDfile->Read ((char*)&GDsec0,SEC0_FSIZE);
+	if (GDsec0.ed_number == 0) GDfile->Skip(-4);
+
+// Read SECTION 1
+
+	GDfile->Read ((char*)&GDsec1, 3);
+	size = getint(GDsec1.length,sizeof(GDsec1.length));
+
+	GDfile->Skip(-3);
+	if (size > 40)
+	{
+		GDsec1.documentation_file = new unsigned char[size-40];
+		GDfile->Read ((char*)&GDsec1, 40);
+		GDfile->Read ((char*)GDsec1.documentation_file,size-40);
+	}
+	else GDfile->Read ((char*)&GDsec1, size);
+
+// Read SECTION 2
+
+	a = GDsec1.flag;
+	a >>= 7;
+	if ( a==1 )
+	{
+		GDsec2 = new SECTION2;
+
+		GDfile->Read ((char*)GDsec2, SEC2_FSIZE);
+		size = getint (GDsec2->length,sizeof(GDsec2->length));
+		switch(getint(&GDsec2->data_type,sizeof(GDsec2->data_type)))
+		{
+			case PROJSATELLITE	:
+			{
+				GDsec2->data = new unsigned char[size-SEC2_FSIZE];
+				GDfile->Read ((char*)GDsec2->data,size-SEC2_FSIZE);
+				GDnx = getint(&GDsec2->data[SAT_NX],SAT_NX_SIZE);
+				GDny = getint(&GDsec2->data[SAT_NY],SAT_NY_SIZE);
+				float nr = AltitudeSat ();
+				GDresx = atan(tan(2. * asin(1./nr)/ApparentDiaX()) * (nr-1.)) * EARTH_RADIUS;
+				GDresy = atan(tan(2. * asin(1./nr)/ApparentDiaY()) * (nr-1.)) * EARTH_RADIUS;
+				break;
+			}
+			case PROJCYLINDRICAL :
+			{
+				GDsec2->data = new unsigned char[size-SEC2_FSIZE];
+				GDfile->Read ((char*)GDsec2->data,size-SEC2_FSIZE);
+				GDnx = getint(&GDsec2->data[CYL_NI],CYL_NI_SIZE);
+				GDny = getint(&GDsec2->data[CYL_NJ],CYL_NJ_SIZE);
+				GDresx  = fabs((float)getint(&GDsec2->data[CYL_DI],CYL_DI_SIZE)*0.001*CDR*EARTH_RADIUS);
+				GDresy = fabs((float)getint(&GDsec2->data[CYL_DJ],CYL_DJ_SIZE)*0.001*CDR*EARTH_RADIUS);
+				break;
+			}
+			case PROJGAUSS:
+			{
+				GDsec2->data = new unsigned char[size-SEC2_FSIZE];
+				GDfile->Read ((char*)GDsec2->data,size-SEC2_FSIZE);
+				GDnx = getint(&GDsec2->data[GSS_NI],GSS_NI_SIZE);
+				GDny = getint(&GDsec2->data[GSS_NJ],GSS_NJ_SIZE);
+				GDresx  = fabs((float)getint(&GDsec2->data[GSS_DI],GSS_DI_SIZE)*0.001*CDR*EARTH_RADIUS);
+				GDresy = fabs(90./(float)getint(&GDsec2->data[GSS_N],GSS_N_SIZE)*CDR*EARTH_RADIUS);
+				break;
+			}
+			case GENERALPROJ:
+			{
+				GDsec2->data = new unsigned char[size-SEC2_FSIZE];
+				GDfile->Read ((char*)GDsec2->data,size-SEC2_FSIZE);
+				GDnx = getint(&GDsec2->data[GP_NI],GP_NI_SIZE);
+				GDny = getint(&GDsec2->data[GP_NJ],GP_NJ_SIZE);
+				GDresx  = fabs((float)getint(&GDsec2->data[GP_DI],GP_DI_SIZE)*0.001);
+				GDresy = fabs((float)getint(&GDsec2->data[GP_DJ],GP_DJ_SIZE)*0.001);
+				break;
+			}
+			case PROJPOLY:
+			{
+				GDsec2->data = new unsigned char[size-SEC2_FSIZE];
+				GDfile->Read ((char*)GDsec2->data,size-SEC2_FSIZE);
+				GDnx = getint(&GDsec2->data[POL_NX],POL_NX_SIZE);
+				GDny = getint(&GDsec2->data[POL_NY],POL_NY_SIZE);
+				GDresx = getint(&GDsec2->data[POL_RX],POL_RX_SIZE)*0.01;
+				GDresy = getint(&GDsec2->data[POL_RY],POL_RY_SIZE)*0.01;
+				break;
+			}
+			default :
+				GDsec2->data = new unsigned char[size-SEC2_FSIZE];
+				GDfile->Read ((char*)GDsec2->data,size-SEC2_FSIZE);
+				printf ("\nGribData::Init -> Projecao indefinida");
+				break;
+		}
+	}
+
+// Read SECTION3
+
+	a = GDsec1.flag;
+	a >>= 6;
+	a &= 1;
+	if ( a==1 )
+	{
+		GDsec3 = new SECTION3;
+		GDfile->Read ((char*)GDsec3, SEC3_FSIZE);
+		size = getint(GDsec3->length,sizeof(GDsec3->length));
+		GDsec3->bitmap = new unsigned char[size-SEC3_FSIZE];
+		GDfile->Read ((char*)GDsec3->bitmap, size-SEC3_FSIZE);
+	}
+
+// Read SECTION4
+
+	GDfile->Read ((char*)&GDsec4, SEC4_FSIZE);
+
+	long iscale, jscale;
+	jscale = ExtractBitField ( 0, 16, GDsec4.scale );
+	iscale = jscale;
+	if ( iscale >= 32768 ) iscale = ( 32768 - iscale );
+
+	long iexp, imant;
+	iexp = ExtractBitField ( 0, 8, GDsec4.reference );
+	imant = ExtractBitField ( 0, 24, &GDsec4.reference[1] );
+
+	if ( jscale == 65535  &&  iexp == 255  &&  imant == 16777215 )
+	{
+		GDfmin = 0.0;
+		GDzscale = 0.0;
+	}
+	else
+	{
+		GDzscale = pow ( (double)2.0, (double)iscale );
+		short isign = 1;
+		if ( iexp >= 128 )
+		{
+			iexp -= 128;
+			isign = -1;
+		}
+		GDfmin = isign * pow ( (double)2.0, (double)(-24.0) ) * imant * pow ( (double)16.0, (double)(iexp - 64.0) );
+	}
+	GDibsiz = (short) ExtractBitField ( 0, 8, &GDsec4.bits_number );
+
+	GDpos_inicio_dados = GDfile->Pos ();
+}
+
+void
+GribData :: Init (GribFile* gf, GribData* gd, short ind, SProjection* pout, SProjection*, Box& bout, float resx, float resy)
+{
+	unsigned char	a;
+
+	float	y1, y2, x1, x2, incx, incy;
+
+	long	size, grib_size, size_bits;
+	
+//Initialize parameters
+
+	y2  = bout.lowerLeftY();
+	x1 = bout.lowerLeftX();
+	y1  = bout.upperRightY();
+	x2 = bout.upperRightX();
+
+	GDny = (int)fabs((double)((y2-y1)/resy)) + 1;
+	GDnx = (int)fabs((double)((x2-x1)/resx)) + 1;
+	incy = (y2 - y1)/(float)(GDny-1);
+	incx = (x2 - x1)/(float)(GDnx-1);
+	GDresy = fabs(incy);
+	GDresx = fabs(incx);
+	GDindex = ind;
+	GDfile = gf;
+
+// Initialize Section 0
+
+	memcpy(GDsec0.coded,"GRIB",4);
+	grib_size = 8;
+	GDsec0.ed_number = 1;
+
+// Initialize Section 1
+
+	size = getint(gd->GDsec1.length,sizeof(gd->GDsec1.length));
+	grib_size += size;
+	if (size > SEC1_FSIZE)
+	{
+		GDsec1.documentation_file = new unsigned char[size-SEC1_FSIZE];
+		memcpy (&GDsec1, (void*)&gd->GDsec1, SEC1_FSIZE);
+		memcpy (GDsec1.documentation_file, gd->GDsec1.documentation_file, (int)size-SEC1_FSIZE);
+	}
+	else memcpy (&GDsec1, &gd->GDsec1, (int)size);
+
+// Initialize Section 2
+	
+	GDsec2 = new SECTION2;
+	switch (pout->GribCode())
+	{
+		case PROJCYLINDRICAL:
+		{
+		GDsec2->data = new unsigned char[SEC2_CYL_SIZE];
+	grib_size += SEC2_CYL_SIZE+SEC2_FSIZE;
+		putint (GDsec2->length, sizeof(GDsec2->length), SEC2_CYL_SIZE+SEC2_FSIZE);
+		putint (&GDsec2->unused_bits, sizeof(GDsec2->unused_bits), 0);
+		putint (&GDsec2->zero, sizeof(GDsec2->zero), 0);	
+		putint (&GDsec2->data_type, sizeof(GDsec2->data_type), PROJCYLINDRICAL);
+		putint (&GDsec2->data[CYL_NI], CYL_NI_SIZE, GDnx);
+		putint (&GDsec2->data[CYL_NJ], CYL_NJ_SIZE, GDny);
+		putint (&GDsec2->data[CYL_LA1], CYL_LA1_SIZE, (int)(y1/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[CYL_LO1], CYL_LO1_SIZE, (int)(x1/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[CYL_FLAG], CYL_FLAG_SIZE, 128);
+		putint (&GDsec2->data[CYL_LA2], CYL_LA2_SIZE, (int)(y2/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[CYL_LO2], CYL_LO2_SIZE, (int)(x2/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[CYL_DI], CYL_DI_SIZE, (int)(incx/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[CYL_DJ], CYL_DJ_SIZE, (int)(incy/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[CYL_SCAN], CYL_SCAN_SIZE, 0);
+		memset (&GDsec2->data[CYL_RESERVED], CYL_RESERVED_SIZE, 0);
+		break;
+		}
+		case PROJSATELLITE:
+		{
+		GDsec2->data = new unsigned char[SEC2_SAT_SIZE];
+	grib_size += SEC2_SAT_SIZE+SEC2_FSIZE;
+		putint (GDsec2->length, sizeof(GDsec2->length), SEC2_SAT_SIZE+SEC2_FSIZE);
+		putint (&GDsec2->unused_bits, sizeof(GDsec2->unused_bits), 0);
+		putint (&GDsec2->zero, sizeof(GDsec2->zero), 0);	
+		putint (&GDsec2->data_type, sizeof(GDsec2->data_type), PROJSATELLITE);
+		putint (&GDsec2->data[SAT_NX], SAT_NX_SIZE, GDnx);
+		putint (&GDsec2->data[SAT_NY], SAT_NY_SIZE, GDny);
+		putint (&GDsec2->data[SAT_LAP], SAT_LAP_SIZE, (int)(pout->SubSatelliteLat()*CRD*1000.));
+		putint (&GDsec2->data[SAT_LOP], SAT_LOP_SIZE, (int)(pout->SubSatelliteLng()*CRD*1000.));
+		putint (&GDsec2->data[SAT_FLAG], SAT_FLAG_SIZE, 128);
+		putint (&GDsec2->data[SAT_DX], SAT_DX_SIZE, (int)(2.*asin(pout->EarthRadius()/pout->Radius())/pout->SensorResolutionX()));
+		putint (&GDsec2->data[SAT_DY], SAT_DY_SIZE, (int)(2.*asin(pout->EarthRadius()/pout->Radius())/pout->SensorResolutionY()));
+		putint (&GDsec2->data[SAT_XP], SAT_XP_SIZE, (int)pout->SubSatelliteX());
+		putint (&GDsec2->data[SAT_YP], SAT_YP_SIZE, (int)pout->SubSatelliteY());
+		float yaw = pout->Yaw();
+		yaw = yaw > 0. ? yaw - PI : yaw + PI;
+		putint (&GDsec2->data[SAT_ORIENTATION_GRID], SAT_ORIENTATION_GRID_SIZE, (int)(yaw*CRD*1000.));
+		putint (&GDsec2->data[SAT_NR],SAT_NR_SIZE, (int)(pout->Radius()/pout->EarthRadius()*1000000.));
+		putint (&GDsec2->data[SAT_X0],SAT_X0_SIZE, (int)(x1/incx));
+		putint (&GDsec2->data[SAT_Y0],SAT_Y0_SIZE, (int)(y1/incy));
+		memset (&GDsec2->data[SAT_RESERVED], SAT_RESERVED_SIZE, 0);
+		break;
+		}
+		case PROJGAUSS:
+		{
+		GDsec2->data = new unsigned char[SEC2_GSS_SIZE];
+	grib_size += SEC2_GSS_SIZE+SEC2_FSIZE;
+		putint (GDsec2->length, sizeof(GDsec2->length), SEC2_GSS_SIZE+SEC2_FSIZE);
+		putint (&GDsec2->unused_bits, sizeof(GDsec2->unused_bits), 0);
+		putint (&GDsec2->zero, sizeof(GDsec2->zero), 0);	
+		putint (&GDsec2->data_type, sizeof(GDsec2->data_type), PROJGAUSS);
+		putint (&GDsec2->data[GSS_NI], GSS_NI_SIZE, GDnx);
+		putint (&GDsec2->data[GSS_NJ], GSS_NJ_SIZE, GDny);
+		putint (&GDsec2->data[GSS_LA1], GSS_LA1_SIZE, (int)(y1/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[GSS_LO1], GSS_LO1_SIZE, (int)(x1/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[GSS_FLAG], GSS_FLAG_SIZE, 128);
+		putint (&GDsec2->data[GSS_LA2], GSS_LA2_SIZE, (int)(y2/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[GSS_LO2], GSS_LO2_SIZE, (int)(x2/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[GSS_DI], GSS_DI_SIZE, (int)(incx/EARTH_RADIUS*CRD*1000.));
+		putint (&GDsec2->data[GSS_N], GSS_N_SIZE, (int)fabs(90./incy));
+		putint (&GDsec2->data[GSS_SCAN], GSS_SCAN_SIZE, 0);
+		memset (&GDsec2->data[GSS_RESERVED], GSS_RESERVED_SIZE, 0);
+		break;
+		}
+		case GENERALPROJ:
+		{
+		GDsec2->data = new unsigned char[SEC2_GP_SIZE];
+	grib_size += SEC2_GP_SIZE+SEC2_FSIZE;
+		putint (GDsec2->length, sizeof(GDsec2->length), SEC2_GP_SIZE+SEC2_FSIZE);
+		putint (&GDsec2->unused_bits, sizeof(GDsec2->unused_bits), 0);
+		putint (&GDsec2->zero, sizeof(GDsec2->zero), 0);	
+		putint (&GDsec2->data_type, sizeof(GDsec2->data_type), GENERALPROJ);
+		putint (&GDsec2->data[GP_NI], GP_NI_SIZE, GDnx);
+		putint (&GDsec2->data[GP_NJ], GP_NJ_SIZE, GDny);
+		putint (&GDsec2->data[GP_I1], GP_I1_SIZE, (int)(x1*100.));
+		putint (&GDsec2->data[GP_J1], GP_J1_SIZE, (int)(y1*100.));
+		putint (&GDsec2->data[GP_FLAG], GP_FLAG_SIZE, 128);
+		putint (&GDsec2->data[GP_I2], GP_I2_SIZE, (int)(x2*100.));
+		putint (&GDsec2->data[GP_J2], GP_J2_SIZE, (int)(y2*100.));
+		putint (&GDsec2->data[GP_DI], GP_DI_SIZE, (int)(incx*1000.));
+		putint (&GDsec2->data[GP_DJ], GP_DJ_SIZE, (int)(incy*1000.));
+		putint (&GDsec2->data[GP_SCAN], GP_SCAN_SIZE, 0);
+		putint (&GDsec2->data[GP_PROJ], GP_PROJ_SIZE, pout->GribInternalCode());
+		int hemis = (int)pout->Hemisphere();
+		putint (&GDsec2->data[GP_HEMIS], GP_HEMIS_SIZE, hemis == -1 ? 2 : hemis);
+		putint (&GDsec2->data[GP_LAT0], GP_LAT0_SIZE, (int)(pout->OriginLatitude()*CRD*1000.));
+		putint (&GDsec2->data[GP_LON0], GP_LON0_SIZE, (int)(pout->OriginLongitude()*CRD*1000.));
+		putint (&GDsec2->data[GP_LAT1], GP_LAT1_SIZE, (int)(pout->StandardLatitudeOne()*CRD*1000.));
+		putint (&GDsec2->data[GP_LAT2], GP_LAT2_SIZE, (int)(pout->StandardLatitudeTwo()*CRD*1000.));
+		putint (&GDsec2->data[GP_RD], GP_RD_SIZE,(int)(pout-> EarthRadius()));
+		putint (&GDsec2->data[GP_FLT], GP_FLT_SIZE, (int)(pout->EarthFlattening()));
+		putint (&GDsec2->data[GP_DX], GP_DX_SIZE, (int)(pout->EllipsoidTranslationX()));;
+		putint (&GDsec2->data[GP_DY], GP_DY_SIZE, (int)(pout->EllipsoidTranslationY()));;
+		putint (&GDsec2->data[GP_DZ], GP_DZ_SIZE, (int)(pout->EllipsoidTranslationZ()));
+		break;
+		}
+	}
+
+// Initialize Section 3
+
+	a = gd->GDsec1.flag;
+	a >>= 6;
+	a &= 1;
+	if ( a==1 )
+	{
+		GDsec3 = new SECTION3;
+		memcpy (&GDsec3, &gd->GDsec3, SEC3_FSIZE);
+		size = getint(GDsec3->length,sizeof(GDsec3->length));
+		grib_size += size;
+		GDsec3->bitmap = new unsigned char[size-SEC3_FSIZE];
+		memcpy (&GDsec3->bitmap, &gd->GDsec3->bitmap, (int)size-SEC3_FSIZE);
+	}
+
+// Initialize Section 4
+
+	size_bits = size = (long)GDnx * (long)GDny * (long)getint (&gd->GDsec4.bits_number, sizeof(gd->GDsec4.bits_number));
+	if (size % 8L) size = (int)(size/8L) + 1L;	// size in bytes
+	else	   size = size/8L;
+
+	size += SEC4_FSIZE;
+	if (size % 2L) size++;	// even size in bytes
+	
+	grib_size += size;
+
+	putint (GDsec4.length, sizeof(GDsec4.length), (int)size);
+	putint (&GDsec4.unused_bits, sizeof (GDsec4.unused_bits), (int)(size*8L-(size_bits+8*SEC4_FSIZE)));
+	memcpy (&GDsec4.scale, gd->GDsec4.scale, sizeof(GDsec4.scale));
+	memcpy (&GDsec4.reference, gd->GDsec4.reference, sizeof(GDsec4.reference));
+	memcpy (&GDsec4.bits_number, &gd->GDsec4.bits_number, sizeof(GDsec4.bits_number));
+
+	GDzscale = gd->GDzscale;
+	GDfmin   = gd->GDfmin;
+	GDibsiz  = gd->GDibsiz;
+	GDiskip2 = gd->GDiskip2;
+	putint (GDsec0.length, sizeof(GDsec0.length), (int)grib_size+SEC5_FSIZE);
+}
+
+void
+GribData :: Init (GribFile* gf, ImageDoc& id, short index)
+{
+
+	long	grib_size, size, size_bits;
+
+// Initialize grib data variables
+
+	GDfile = gf;
+	GDindex = index;
+	GDny = id.ny;
+	GDnx = id.nx;
+	GDresy = id.ry;
+	GDresx = id.rx;
+
+// Initialize Section 0
+
+	memcpy(GDsec0.coded,"GRIB",4);
+	grib_size = 8;
+	GDsec0.ed_number = 1;
+
+// Initialize Section 1
+
+	size = SEC1_FSIZE + SEC1_LND_SIZE;
+	putint(GDsec1.length, sizeof(GDsec1.length), (int)size);
+	grib_size += size;
+
+	putint(&GDsec1.version_number, sizeof(GDsec1.version_number), 0);
+	putint(&GDsec1.id_centre, sizeof(GDsec1.id_centre), ORIGIN_CENTER);
+	putint(&GDsec1.id_process, sizeof(GDsec1.id_process), 0);
+	putint(&GDsec1.grid_def, sizeof(GDsec1.grid_def), 255);
+	putint(&GDsec1.flag, sizeof(GDsec1.flag), 128);
+	putint(&GDsec1.parameter, sizeof(GDsec1.parameter), 127);
+	putint(&GDsec1.type_level, sizeof(GDsec1.type_level), id.satellite);
+	putint(GDsec1.channel, sizeof(GDsec1.channel), id.band);
+	putint(&GDsec1.year, sizeof(GDsec1.year), (id.year%100));
+	putint(&GDsec1.month, sizeof(GDsec1.month), id.month);
+	putint(&GDsec1.day, sizeof(GDsec1.day), id.day);
+	putint(&GDsec1.hour, sizeof(GDsec1.hour), id.hour);
+	putint(&GDsec1.minutes, sizeof(GDsec1.minutes), id.minutes);
+	putint(&GDsec1.time_range_unit, sizeof(GDsec1.time_range_unit), 0);
+	putint(&GDsec1.p1, sizeof(GDsec1.p1), 0);
+	putint(&GDsec1.p2, sizeof(GDsec1.p2), 0);
+	putint(&GDsec1.time_range_ind, sizeof(GDsec1.time_range_ind), 0);
+	putint(GDsec1.number_fields, sizeof(GDsec1.number_fields), 0);
+	putint(&GDsec1.missing_fields, sizeof(GDsec1.missing_fields), 0);
+	putint(&GDsec1.century, sizeof(GDsec1.century), ((int)(id.year/100.+1.)));
+
+	GDsec1.documentation_file = new unsigned char[size-SEC1_FSIZE];
+	putint(&GDsec1.documentation_file[SEC1_LND_PATH], SEC1_LND_PATH_SIZE, id.path);
+	putint(&GDsec1.documentation_file[SEC1_LND_ROW], SEC1_LND_ROW_SIZE, id.row);
+	putint(&GDsec1.documentation_file[SEC1_LND_PLEVEL], SEC1_LND_PLEVEL_SIZE, id.plevel);
+	putint(&GDsec1.documentation_file[SEC1_LND_RESERVED], SEC1_LND_RESERVED_SIZE, 0);
+
+// Initialize Section 2
+	
+	GDsec2 = new SECTION2;
+	GDsec2->data = new unsigned char[SEC2_POL_SIZE];
+	grib_size += SEC2_POL_SIZE+SEC2_FSIZE;
+	putint (GDsec2->length, sizeof(GDsec2->length), SEC2_POL_SIZE+SEC2_FSIZE);
+	putint (&GDsec2->unused_bits, sizeof(GDsec2->unused_bits), 0);
+	putint (&GDsec2->zero, sizeof(GDsec2->zero), 0);	
+	putint (&GDsec2->data_type, sizeof(GDsec2->data_type), PROJPOLY);
+	putint (&GDsec2->data[POL_NX], POL_NX_SIZE, id.nx);
+	putint (&GDsec2->data[POL_NY], POL_NY_SIZE, id.ny);
+	putint (&GDsec2->data[POL_LAP], POL_LAP_SIZE, (int)(id.lap*CRD*1000.));
+	putint (&GDsec2->data[POL_LOP], POL_LOP_SIZE, (int)(id.lop*CRD*1000.));
+	putint (&GDsec2->data[POL_FLAG], POL_FLAG_SIZE, 128);
+	putint (&GDsec2->data[POL_RX], POL_RX_SIZE, (int)(id.rx*100.));
+	putint (&GDsec2->data[POL_RY], POL_RY_SIZE, (int)(id.ry*100.));
+	putint (&GDsec2->data[POL_XP], POL_XP_SIZE, (int)id.xp);
+	putint (&GDsec2->data[POL_YP], POL_YP_SIZE, (int)id.yp);
+	putint (&GDsec2->data[POL_ORIENTATION_GRID], POL_ORIENTATION_GRID_SIZE, (int)(id.yaw*CRD*1000.));
+	putint (&GDsec2->data[POL_NR],POL_NR_SIZE, (int)(id.nr/EARTH_RADIUS*1000000.));
+	putint (&GDsec2->data[POL_X0],POL_X0_SIZE, (int)id.x0);
+	putint (&GDsec2->data[POL_Y0],POL_Y0_SIZE, (int)id.y0);
+	putint (&GDsec2->data[POL_DEGREE],POL_DEGREE_SIZE, 0);
+	putint (&GDsec2->data[POL_NCP],POL_NCP_SIZE, 0);
+	memset (&GDsec2->data[POL_RESERVED], POL_RESERVED_SIZE, 0);
+
+// Initialize Section 3 (empty)
+
+// Initialize Section 4
+
+	size_bits = size = (long)id.nx * (long)id.ny;
+	size += SEC4_FSIZE;
+	if (size % 2L) size++;	// even size in bytes
+	grib_size += size;
+	putint (GDsec4.length, sizeof(GDsec4.length), (int)size);
+	putint (&GDsec4.unused_bits, sizeof (GDsec4.unused_bits), (int)(size*8L-(size_bits*8L+8*SEC4_FSIZE)));
+	putint (GDsec4.scale, sizeof(GDsec4.scale), 0);
+	putint (GDsec4.reference, sizeof(GDsec4.reference), 0);
+	putint (&GDsec4.bits_number, sizeof(GDsec4.bits_number), 8);
+	GDzscale = GDfmin = 0.;
+	GDibsiz  = 8;
+	GDiskip2 = 0;
+	putint (GDsec0.length, sizeof(GDsec0.length), (int)grib_size+SEC5_FSIZE);
+
+	return;
+}
+
+void
+GribData :: Init (GribFile* gf, GridDoc& id, short index, SProjection* sp)
+{
+
+	long	grib_size, size, size_bits;
+	float	y1, y2, x1, x2, incx, incy;
+
+// Initialize grib data variables
+
+	GDfile = gf;
+	GDindex = index;
+	GDny = id.ny;
+	GDnx = id.nx;
+
+	x1 = id.xmin;
+	x2 = id.xmax;
+	y1  = id.ymax;		// max is at the upper edge
+	y2  = id.ymin;		// min is at the bottom edge
+
+	incy = (y2 - y1)/(float)(GDny-1);
+	incx = (x2 - x1)/(float)(GDnx-1);
+
+	GDresy = fabs(incy);
+	GDresx = fabs(incx);
+
+// Initialize Section 0
+
+	memcpy(GDsec0.coded,"GRIB",4);
+	grib_size = 8;
+	GDsec0.ed_number = 1;
+
+// Initialize Section 1
+
+	size = SEC1_FSIZE + SEC1_LND_SIZE;
+	putint(GDsec1.length, sizeof(GDsec1.length), (int)size);
+	grib_size += size;
+
+	putint(&GDsec1.version_number, sizeof(GDsec1.version_number), 0);
+	putint(&GDsec1.id_centre, sizeof(GDsec1.id_centre), ORIGIN_CENTER);
+	putint(&GDsec1.id_process, sizeof(GDsec1.id_process), 0);
+	putint(&GDsec1.grid_def, sizeof(GDsec1.grid_def), 255);
+	putint(&GDsec1.flag, sizeof(GDsec1.flag), 128);
+	putint(&GDsec1.parameter, sizeof(GDsec1.parameter), 127);
+//	putint(&GDsec1.type_level, sizeof(GDsec1.type_level), id.satellite);
+//	putint(GDsec1.channel, sizeof(GDsec1.channel), id.band);
+	putint(&GDsec1.year, sizeof(GDsec1.year), (id.year%100));
+	putint(&GDsec1.month, sizeof(GDsec1.month), id.month);
+	putint(&GDsec1.day, sizeof(GDsec1.day), id.day);
+	putint(&GDsec1.hour, sizeof(GDsec1.hour), id.hour);
+	putint(&GDsec1.minutes, sizeof(GDsec1.minutes), id.minutes);
+	putint(&GDsec1.time_range_unit, sizeof(GDsec1.time_range_unit), 0);
+	putint(&GDsec1.p1, sizeof(GDsec1.p1), 0);
+	putint(&GDsec1.p2, sizeof(GDsec1.p2), 0);
+	putint(&GDsec1.time_range_ind, sizeof(GDsec1.time_range_ind), 0);
+	putint(GDsec1.number_fields, sizeof(GDsec1.number_fields), 0);
+	putint(&GDsec1.missing_fields, sizeof(GDsec1.missing_fields), 0);
+	putint(&GDsec1.century, sizeof(GDsec1.century), ((int)(id.year/100.+1.)));
+
+	GDsec1.documentation_file = new unsigned char[size-SEC1_FSIZE];
+//	putint(&GDsec1.documentation_file[SEC1_LND_PATH], SEC1_LND_PATH_SIZE, id.path);
+	putint(&GDsec1.documentation_file[SEC1_LND_ROW], SEC1_LND_ROW_SIZE, id.row);
+	putint(&GDsec1.documentation_file[SEC1_LND_PLEVEL], SEC1_LND_PLEVEL_SIZE, id.plevel);
+	putint(&GDsec1.documentation_file[SEC1_LND_RESERVED], SEC1_LND_RESERVED_SIZE, 0);
+
+// Initialize Section 2
+	
+	GDsec2 = new SECTION2;
+	GDsec2->data = new unsigned char[SEC2_GP_SIZE];
+	grib_size += SEC2_GP_SIZE+SEC2_FSIZE;
+	putint (GDsec2->length, sizeof(GDsec2->length), SEC2_GP_SIZE+SEC2_FSIZE);
+	putint (&GDsec2->unused_bits, sizeof(GDsec2->unused_bits), 0);
+	putint (&GDsec2->zero, sizeof(GDsec2->zero), 0);	
+	putint (&GDsec2->data_type, sizeof(GDsec2->data_type), GENERALPROJ);
+	putint (&GDsec2->data[GP_NI], GP_NI_SIZE, GDnx);
+	putint (&GDsec2->data[GP_NJ], GP_NJ_SIZE, GDny);
+	putint (&GDsec2->data[GP_I1], GP_I1_SIZE, (int)(x1*100.));
+	putint (&GDsec2->data[GP_J1], GP_J1_SIZE, (int)(y1*100.));
+	putint (&GDsec2->data[GP_FLAG], GP_FLAG_SIZE, 128);
+	putint (&GDsec2->data[GP_I2], GP_I2_SIZE, (int)(x2*100.));
+	putint (&GDsec2->data[GP_J2], GP_J2_SIZE, (int)(y2*100.));
+	putint (&GDsec2->data[GP_DI], GP_DI_SIZE, (int)(incx*1000.));
+	putint (&GDsec2->data[GP_DJ], GP_DJ_SIZE, (int)(incy*1000.));
+	putint (&GDsec2->data[GP_SCAN], GP_SCAN_SIZE, 0);
+	putint (&GDsec2->data[GP_PROJ], GP_PROJ_SIZE, sp->GribInternalCode());
+	int hemis = (int)sp->Hemisphere();
+	putint (&GDsec2->data[GP_HEMIS], GP_HEMIS_SIZE, hemis == -1 ? 2 : hemis);
+	putint (&GDsec2->data[GP_LAT0], GP_LAT0_SIZE, (int)(sp->OriginLatitude()*CRD*1000.));
+	putint (&GDsec2->data[GP_LON0], GP_LON0_SIZE, (int)(sp->OriginLongitude()*CRD*1000.));
+	putint (&GDsec2->data[GP_LAT1], GP_LAT1_SIZE, (int)(sp->StandardLatitudeOne()*CRD*1000.));
+	putint (&GDsec2->data[GP_LAT2], GP_LAT2_SIZE, (int)(sp->StandardLatitudeTwo()*CRD*1000.));
+	putint (&GDsec2->data[GP_RD], GP_RD_SIZE,(int)(sp-> EarthRadius()));
+	putint (&GDsec2->data[GP_FLT], GP_FLT_SIZE, (int)(sp->EarthFlattening()));
+	putint (&GDsec2->data[GP_DX], GP_DX_SIZE, (int)(sp->EllipsoidTranslationX()));;
+	putint (&GDsec2->data[GP_DY], GP_DY_SIZE, (int)(sp->EllipsoidTranslationY()));;
+	putint (&GDsec2->data[GP_DZ], GP_DZ_SIZE, (int)(sp->EllipsoidTranslationZ()));
+
+// Initialize Section 3 (empty)
+
+// Initialize Section 4
+
+	size_bits = size = (long)id.nx * (long)id.ny;
+	size += SEC4_FSIZE;
+	if (size % 2L) size++;	// even size in bytes
+	grib_size += size;
+	putint (GDsec4.length, sizeof(GDsec4.length), (int)size);
+	putint (&GDsec4.unused_bits, sizeof (GDsec4.unused_bits), (int)(size*8L-(size_bits*8L+8*SEC4_FSIZE)));
+	putint (GDsec4.scale, sizeof(GDsec4.scale), 0);
+	putint (GDsec4.reference, sizeof(GDsec4.reference), 0);
+	putint (&GDsec4.bits_number, sizeof(GDsec4.bits_number), 8);
+	GDzscale = GDfmin = 0.;
+	GDibsiz  = 8;
+	GDiskip2 = 0;
+	putint (GDsec0.length, sizeof(GDsec0.length), (int)grib_size+SEC5_FSIZE);
+
+	return;
+}
+
+short
+GribData :: SkipData ()
+{
+	long offset;
+	offset = (long)(getint (GDsec4.length,sizeof(GDsec4.length)) - SEC4_FSIZE);
+	if (offset < 0) offset = 0;
+	return GDfile->Skip (offset);
+}
+
+short
+GribData :: Get (short linha, unsigned char* buf)
+{
+	long	point_arq;
+	long	nbytes = GDibsiz/8;
+
+	point_arq = GDpos_inicio_dados + (long)linha*(long)GDnx * nbytes;
+
+	if(!GDfile->Skip (point_arq - GDfile->Pos())) return FALSE;
+	return (GDfile->Read ((char*)buf, (int)(GDnx*nbytes)));
+}
+
+short
+GribData :: Get (short linha, float* buff)
+{
+	long	pointa, pointb1, pointb2;
+	unsigned char*	bufc;
+	int	nnx;
+
+	bufc = new unsigned char[GDnx*GDibsiz/8+2];
+
+// Point to byte, related to beginning of Grib Data, containing first bit of desired element
+
+	pointb1 = linha*GDnx*GDibsiz;
+	pointa = GDpos_inicio_dados + pointb1/8;
+
+// Evaluate number of bytes to be read
+
+	pointb2 = (linha+1)*GDnx*GDibsiz - 1;
+	nnx = (int) ((pointb2 / 8 + 1) - (pointb1 / 8));
+
+	if(!GDfile->Skip (pointa - GDfile->Pos())) return FALSE;
+	if(GDfile->Read ((char*)bufc, nnx) == FALSE) return FALSE;
+
+	short	nbyte, nbit;
+
+	GDiskip2 = 0;		//DEVE SER AVALIADO ALHURES
+
+// Point to first bit of data in buffer bufc
+
+	pointb1 = pointb1 % 8;
+
+	unsigned long	fff;
+	short	nelem;		// index for each element in buff
+
+	if (GDtranslated)
+	{
+		for (nelem = 0; nelem < GDnx ; nelem++)
+		{
+			nbyte = (short) (pointb1 / 8);
+			nbit  = (short) (pointb1 % 8);
+			fff =  (float)ExtractBitField (nbit, GDibsiz, &bufc[nbyte]);
+			GDbuf [nelem] = GDfmin + fff* GDzscale;
+			pointb1 += ( GDibsiz + GDiskip2 );
+
+		}
+		for (nelem = 0; nelem < GDnewnx ; nelem++)
+			if (GDlookup[nelem]==-1)
+				buff[nelem] = MAXFLOAT;
+			else
+				buff[nelem] = GDbuf[GDlookup[nelem]];
+	}
+	else
+	{
+		for (nelem = 0; nelem < GDnx ; nelem++)
+		{
+			nbyte = (short) (pointb1 / 8);
+			nbit  = (short) (pointb1 % 8);
+			fff =  ExtractBitField (nbit, GDibsiz, &bufc[nbyte]);
+			buff [nelem] = GDfmin + (double)fff* GDzscale;
+			pointb1 += ( GDibsiz + GDiskip2 );
+
+		}
+	}
+	return TRUE;
+}
+
+short
+GribData :: Get(short line, unsigned char* buf, short* window)
+{
+	long 	initialfp;	// file pointer to the first pixel to be read
+	long	nbytes = GDibsiz/8;
+
+// Compute file pointer to the first pixel to be read
+
+	initialfp = GDpos_inicio_dados + (window[2]+line) * (long)GDnx * nbytes + (long)window[0] * nbytes;
+	if(!GDfile->Skip (initialfp - GDfile->Pos())) return FALSE;
+
+// Read line data on gribdata
+	return (GDfile->Read ((char*)buf, (int)(window[1]*nbytes)));
+}
+
+short
+GribData :: Get (short* ret_env, short nedge, float fatx, float faty, unsigned char** bufi)
+{
+	unsigned char	buf[BUF_IMA];	// image buffer
+
+	short	i,j,xi,xf,yi,yf,lin,	// auxiliary variables
+		ii,jj,lin_f,nc,nl,yy,
+		ncj,			/* numero de colunas da jan. do retang. envolv. */
+		retae[4],		/* retangulo envolvente da imagem (real)	*/
+		janret[4],		/* retangulo envolvente da imagem (existente) 	*/
+		tam_bec,		// maximum column number of image
+		coli;			/* linha e coluna inicial da imagem amostrada	*/
+
+	float	xx;			// auxiliary variable
+
+	memcpy (retae,ret_env,sizeof(retae));
+	tam_bec = retae[1] + nedge + nedge;
+
+	/* adiciona ao retangulo envolvente nedge linhas e colunas anterior e posterior a imagem. Caso nao seja possivel, repete pontos existentes */
+	if (retae[0] > GDnx-1)		// retangulo contido apos a imagem 
+	{
+		janret[0] = janret[1] = 0;
+		xi = xf = 0;
+	}
+	else
+	{
+		if ((retae[0]-nedge) >= 0) 	 // ponto inicial contido na imagem
+		{
+			retae[0] -= nedge;
+			retae[1] += nedge;
+			janret[0] = retae[0];
+			xi = 0;
+		}
+		else		   	// ponto inicial antes/inicio da imagem
+		{
+			janret[0] = max(0,retae[0]);
+			xi = nedge;	// vai repetir 1. ponto
+		}
+
+		if ((retae[0]+retae[1]-1+nedge) <= (GDnx-1))	/* ponto final antes do final da imagem */
+		{
+			retae[1] += nedge;
+			if (xi == 0) janret[1] = retae[1];
+			else	     janret[1] = max(0,retae[0]+retae[1]-janret[0]);
+			xf = 0;
+		}
+		else
+		{
+			janret[1] = min(GDnx-janret[0],retae[0]+retae[1]-1);
+			xf = nedge;	// vai repetir ultimo ponto
+		}
+	}
+
+	if (retae[2] > (GDny-1))	// retangulo contido apos a imagem
+	{
+		janret[2] = janret[3] = 0;
+		yi = yf = 0;
+	}
+	else
+	{
+		if ((retae[2]-nedge) >= 0)	// linha inicial contido na imagem
+		{
+			retae[2] -= nedge;
+			retae[3] += nedge;
+			janret[2] = retae[2];
+			yi = 0;
+		}
+		else			// linha inicial antes da imagem
+		{
+			janret[2] = max(0,retae[2]);
+			yi = nedge;		// vai repetir 1. linha
+		}
+
+		if ((retae[2]+retae[3]-1+nedge) <= (GDny-1))  // linha final antes do final da imagem
+		{
+			retae[3] += nedge;
+			if (yi == 0) janret[3] = retae[3];
+			else	     janret[3] = max(0,retae[2]+retae[3]-janret[2]);
+			yf = 0;
+		}
+		else
+		{
+			janret[3] = min(GDny-janret[2],retae[2]+retae[3]-1);
+			yf = nedge;		// vai repetir ultima linha
+		}
+	}
+	 
+	/* calcula numero de linhas e colunas somado 0.5 para eliminar truncamento */
+	nc = (int)((float)retae[1]/fatx + 0.5);
+	ncj= (int)((float)janret[1]/fatx + 0.5);		
+	nl = (int)((float)retae[3]/faty + 0.5);
+
+	/* abre imagem */
+	if (GDfile->Open() == FALSE) return FALSE;
+
+	/* adquire imagem do retangulo envolvente */
+	lin=-1;
+
+	/* calcula pixel inicial da imagem, levando em consideracao a amostragem
+	   do inicio da imagem (nao considerando a parte em preto) */
+	jj = (short)((janret[0] - retae[0] + xi)/fatx);
+	if(((short)(janret[0] - retae[0] + xi)%(int)fatx) != 0) jj++;
+	coli = (short)(fatx - (jj%(int)fatx)-1);
+
+	lin_f = janret[2] + janret[3] - 1;
+
+	/* calcula linha inicial da imagem, levando em consideracao a amostragem
+	   do inicio da imagem */
+	ii = (int)((janret[2] - retae[2] + yi)/faty);
+	if(((int)(janret[2] - retae[2] + yi) % (int)faty) != 0) ii++;
+
+	/* verifica se eh fim da imagem */
+	if( ii < 0 )
+	{
+		/* preenche as linhas finais da imagem de saida com 0 */
+		for(i = 0; i < nl; i++)
+			for (j = 0; j < tam_bec; j++) bufi[i][j] = 0;
+	}
+	else
+	{	
+		/* inicializa as linhas (negativas) com 0) */
+		for(i = 0; i < ii; i++)
+			for (j = 0; j < tam_bec; j++) bufi[i][j] = 0;
+	
+		for (i = ii; i < nl; i++)
+		{
+			for (j = 0; j < tam_bec; j++) bufi[i][j] = 0;
+		   	if((retae[2]+i*faty) <= lin_f)
+			{
+				xx = coli;
+				lin++;
+				yy = (short)((float)lin * faty);
+				j = Get(yy,buf,janret);    /* nao testo erro propositalmente */
+				for (j = 0; j < ncj-coli; j++)					/* SSI01*/
+				{
+					bufi[i][jj+j] = buf[(int)xx];				/* SSI01 */
+					xx += fatx;						/* SSI01 */
+				}
+				for (j = 0; j < xi; j++)
+					bufi[i][jj-j-1] = bufi[i][jj];
+				for (j = 0; j < xf; j++)
+					bufi[i][xi+nc+j]   = bufi[i][xi+nc-1];				
+			}
+		}
+	}
+
+	/* verifica se carregou as linhas da borda da imagem */
+	for (j = 0; j < yi; j++)
+		for (i = 0; i < tam_bec; i++) bufi[j][i] = bufi[yi][i];
+
+	for (j = 0; j < yf; j++)
+		for (i = 0; i < tam_bec; i++) bufi[yi+nl+j][i] = bufi[yi+nl-1][i];
+	
+	/* fecha imagem */
+	GDfile->Close();
+	return TRUE;
+}
+
+short
+GribData :: Put (short linha, unsigned char* buf)
+{
+	long	point_arq;
+	long	nbytes = GDibsiz/8;
+
+	point_arq = GDpos_inicio_dados + (long)linha*(long)GDnx * nbytes;
+
+	if(!GDfile->Skip (point_arq - GDfile->Pos())) return FALSE;
+	if(GDfile->Write ((char*)buf, (int)(GDnx*nbytes)) == FALSE) return FALSE;
+	return TRUE;
+}
+
+short
+GribData :: Put (short linha, float* buff)
+{
+	long	pointa, pointb1, pointb2;
+	unsigned char*	bufc;
+	int	nnx;
+
+	bufc = new unsigned char[GDnx*GDibsiz/8+2];
+
+// Point to byte, related to beginning of Grib Data, containing first bit of desired element
+
+	pointb1 = ((long)linha)*GDnx*GDibsiz;
+	pointa = GDpos_inicio_dados + pointb1/8;
+
+// Evaluate number of bytes to be read
+
+	pointb2 = ((long)(linha+1))*GDnx*GDibsiz - 1;
+	nnx = (int)((pointb2 / 8 + 1) - (pointb1 / 8));
+
+	if(!GDfile->Skip (pointa - GDfile->Pos())) return FALSE;
+
+	short	nbyte, nbit;
+
+	GDiskip2 = 0;		//DEVE SER AVALIADO ALHURES
+
+// Point to first bit of data in buffer bufc
+
+	pointb1 = pointb1 % 8;
+
+	unsigned long	fff;		// coded value to be inserted
+	short	nelem;		// index for each element in buff
+
+	for (nelem = 0; nelem < GDnx ; nelem++)
+	{
+		nbyte = (short) (pointb1 / 8);
+		nbit  = (short) (pointb1 % 8);
+		fff = ((double)buff[nelem] - GDfmin) / GDzscale;
+		InsertBitField (fff, nbit, GDibsiz, &bufc[nbyte]);
+		pointb1 += ( GDibsiz + GDiskip2 );
+
+	}
+	if(GDfile->Write ((char*)bufc, nnx) == FALSE) return FALSE;
+
+	return TRUE;
+}
+
+short
+GribData :: Put(short line, unsigned char* buf, short* window)
+{
+	long 	initialfp;	// file pointer to the first pixel to be write
+	long	nbytes = GDibsiz/8;
+
+// Compute file pointer to the first pixel to be write
+
+	initialfp = GDpos_inicio_dados + (window[2]+line) * (long)GDnx * nbytes + (long)window[0] * nbytes;
+	if(!GDfile->Skip (initialfp - GDfile->Pos())) return FALSE;
+
+// Write line data on gribdata
+	if(GDfile->Write ((char*)buf, (int)(window[1]*nbytes)) == FALSE) return FALSE;
+	return TRUE;
+}
+
+short
+GribData :: Put(short lb, short cb, unsigned char** bufs, short nlin, short ncol)
+{
+	short	i,janela[4];
+
+	/* adquire janela de escrita */
+	janela[0] = cb;
+	janela[2] = lb;
+	if ((cb+ncol) <= GDnx) janela[1] = ncol;
+	else		       janela[1] = GDnx - cb;
+	if ((lb+nlin) <= GDny) janela[3] = nlin;
+	else		       janela[3] = GDny - lb;
+
+	/* escreve bloco na imagem */
+	for (i = 0; i < janela[3]; i++)
+	{
+		if (Put (i,bufs[i],janela) == FALSE) return FALSE;
+	}
+
+	return TRUE;
+}
+
+short
+GribData :: Put ()
+{
+
+	unsigned char 	a;
+	short 		status=TRUE;
+	int 		size;
+
+// Write SECTION 0
+	if (!GDfile->Write ((char*)&GDsec0,SEC0_FSIZE)) return FALSE;
+
+// Write SECTION 1
+
+	size = getint(GDsec1.length,sizeof(GDsec1.length));
+	if (size > SEC1_FSIZE)
+	{
+		if (!GDfile->Write ((char*)&GDsec1, SEC1_FSIZE)) return FALSE;
+		if (!GDfile->Write ((char*)GDsec1.documentation_file,size-SEC1_FSIZE)) return FALSE;
+	}
+	else if (!GDfile->Write ((char*)&GDsec1, size)) return FALSE;
+
+// Write SECTION 2
+
+	a = GDsec1.flag;
+	a >>= 7;
+	if ( a==1 )
+	{
+		if (!GDfile->Write ((char*)GDsec2, SEC2_FSIZE)) return FALSE;
+		size = getint (GDsec2->length,sizeof(GDsec2->length));
+		if (!GDfile->Write ((char*)GDsec2->data, size-SEC2_FSIZE)) return FALSE;
+	}
+
+
+// Write SECTION3
+
+	a = GDsec1.flag;
+	a >>= 6;
+	a &= 1;
+	if ( a==1 )
+	{
+		if (!GDfile->Write ((char*)GDsec3, SEC3_FSIZE)) return FALSE;
+		size = getint(GDsec3->length,sizeof(GDsec3->length));
+		if (!GDfile->Write ((char*)GDsec3->bitmap, size-SEC3_FSIZE)) return FALSE;
+	}
+
+// Write SECTION4
+
+	if (!GDfile->Write ((char*)&GDsec4, SEC4_FSIZE)) return FALSE;
+	size = getint(GDsec4.length,sizeof(GDsec4.length))-SEC4_FSIZE;
+
+	GDpos_inicio_dados = GDfile->Pos ();
+	unsigned char *buf;
+	buf = new unsigned char[1024];
+	memset(buf,0,1024);
+	for (;size > 1024; size-=1024)
+		if ((status=GDfile->Write ((char*)buf, 1024)) == FALSE) break;
+
+	if (status) status = GDfile->Write ((char*)buf, size);
+	delete buf;
+	if (!status) return FALSE;
+
+// Write SECTION 5
+
+	memcpy (GDsec5.end,"7777",4);
+	if (!GDfile->Write ((char*)&GDsec5, SEC5_FSIZE)) return FALSE;
+	GDfile->Flush();
+
+	return TRUE;
+}
+
+short
+GribData :: PutSection2 ()
+{
+
+	unsigned char 	a;
+	int 		size;
+
+	GDfile->Seek (GDindex);
+
+// Skip SECTION 0
+	if (GDsec0.ed_number == 1) GDfile->Skip(4);
+
+// Skip SECTION 1
+	size = getint(GDsec1.length,sizeof(GDsec1.length));
+	GDfile->Skip(size);
+
+
+// Write SECTION 2
+
+	a = GDsec1.flag;
+	a >>= 7;
+	if ( a==1 )
+	{
+		if (!GDfile->Write ((char*)GDsec2, SEC2_FSIZE)) return FALSE;
+		size = getint (GDsec2->length,sizeof(GDsec2->length));
+		if (!GDfile->Write ((char*)GDsec2->data, size-SEC2_FSIZE)) return FALSE;
+	}
+	return TRUE;
+}
+
+void
+GribData :: SetGribDataLength()
+{
+	int	size;
+	int	size_sec4;
+
+	size_sec4 = (int)GDnx * GDny * GDibsiz/8 + SEC4_FSIZE;
+	if( size_sec4 % 2 ){
+		Set_Section4_unused_bits( (short) 8 );
+		size_sec4++;
+	}
+	Set_Section4_length( size_sec4 );
+	size  = SEC0_FSIZE;
+	size += Get_Section1_length();
+	size += ( GDsec1.flag & 128 ) ? ( Get_Section2_length() ) : ( 0 );
+	size += ( GDsec1.flag &  64 ) ? ( Get_Section3_length() ) : ( 0 );
+	size += Get_Section4_length();
+	size += SEC5_FSIZE;
+	Set_Section0_length( size );
+}
+
+short
+GribData :: SetTranslation (Box& b, short& nx)
+{
+	Box	box;
+	Point	p1,p2;
+	float	x1, x2;
+	float	xx1,xx2;
+	float	incx;
+	int	i,j;
+	float	x;
+
+	if (GDtranslated) return TRUE;
+
+	if (ProjectionCode () == PROJCYLINDRICAL)
+	{
+		Rectangle (box);
+		p1 = box.lowerLeft ();
+		p2 = box.upperRight ();
+
+		// converts values from meters to radians
+		x1 = p1.x () / EARTH_RADIUS;
+		x2 = p2.x () / EARTH_RADIUS;
+
+		incx = GDresx / EARTH_RADIUS;
+
+		if (x1 > PI)	// left and right corner are above 180 degrees
+		{
+			xx1 = x1 - 2.*PI;
+			xx2 = x2 - 2.*PI;
+			GDtranslated = TRUE;
+		}
+		else if (x2 > PI)	// right corner is above 180 degrees
+		{
+			x = x1;
+			for (i=0; i<GDnx; i++)
+			{
+				x += incx;
+				if ( x > PI)
+				{
+					xx2 = (float)(i) * incx;
+					xx1 = x - 2.*PI;
+					GDtranslated = TRUE;
+					break;
+				}
+			}
+		}
+
+		if (GDtranslated)
+		{
+			// update box in meters
+			p1.x (xx1 * EARTH_RADIUS);
+			p2.x (xx2 * EARTH_RADIUS);
+
+			b.init (p1,p2);
+
+// Evaluate the number of lines that may have changed
+
+			GDnewnx = nx = (short)((xx2 - xx1) / incx + 0.5) + 1;
+
+// Evaluate the lookup table to arrange the elements on buffer
+
+			GDlookup = new short[nx];
+			GDbuf = new float[GDnx];
+
+			for (i=0; i<nx; i++)
+			{
+				x = xx1 + (float)i * incx;
+				if (x<0) x = 2.*PI + x;
+				j = (short)((x - x1) / incx);
+				if (j<0 || j>=GDnx)
+					GDlookup[i] = -1;
+				else
+					GDlookup[i] = j;
+			}
+
+			return TRUE;
+		}
+
+	}
+	return FALSE;
+}
+
+short
+GribData :: ProjectionCode ()
+{
+//<*deleteme*>	if (GDsec1.grid_def == 255)
+	if (1)
+	{
+		switch (GDsec2->data_type)
+		{
+			case PROJCYLINDRICAL    : return PROJCYLINDRICAL;
+			case PROJSATELLITE	    : return PROJSATELLITE;
+			case PROJPOLY	    :
+			{
+				int i = getint (&GDsec2->data[POL_NCP], POL_NCP_SIZE);
+				if (i<=0) return PROJNONE;
+				return PROJPOLY;
+			}
+			case GENERALPROJ    : return getint(&GDsec2->data[GP_PROJ], GP_PROJ_SIZE);
+			case PROJGAUSS	    : return PROJGAUSS;
+
+			default : return -1;
+				
+		}
+	}
+	else return -1;
+}
+
+void
+GribData :: Rectangle (Box& brect)
+{
+	Point	ll, ur;
+	double	ksin, k;
+
+	if (GDsec1.grid_def == 255)
+	{
+		switch (GDsec2->data_type)
+		{
+			case PROJCYLINDRICAL:
+			{
+			ll.x((float)getint (&GDsec2->data[CYL_LO1],CYL_LO1_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			ur.x((float)getint (&GDsec2->data[CYL_LO2],CYL_LO2_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			ll.y((float)getint (&GDsec2->data[CYL_LA2],CYL_LA2_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			ur.y((float)getint (&GDsec2->data[CYL_LA1],CYL_LA1_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			break;
+			}
+			case PROJSATELLITE:
+			{
+//<*teste*>			ll.x((float)OriginX()*GDresx);
+//<*teste*>			ur.x((float)(OriginX()+GDnx-1)*GDresx);
+//<*teste*>			ur.y(-(float)OriginY()*GDresy);
+//<*teste*>			ll.y(-(float)(OriginY()+GDny-1)*GDresy);
+
+			k = AltitudeSat() - 1.;
+			ksin = asin ((double)1./AltitudeSat());
+			ll.x((OriginX() * atan(tan(2.*ksin/ApparentDiaX()) * k) * EARTH_RADIUS));
+			ur.x((float)((OriginX() + NumCol() - 1) *
+				atan(tan(2*ksin/ApparentDiaX()) * k) * EARTH_RADIUS));
+			ll.y(-(float)((OriginY() + NumLin() - 1) *
+				atan(tan(2*ksin/ApparentDiaY())*k)*EARTH_RADIUS));
+			ur.y(-(float)(OriginY() * atan(tan(2*ksin/ApparentDiaY()) * k) * EARTH_RADIUS));
+			break;
+			}
+			case PROJGAUSS:
+			{
+			ll.x((float)getint (&GDsec2->data[GSS_LO1],GSS_LO1_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			ur.x((float)getint (&GDsec2->data[GSS_LO2],GSS_LO2_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			ll.y((float)getint (&GDsec2->data[GSS_LA2],GSS_LA2_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			ur.y((float)getint (&GDsec2->data[GSS_LA1],GSS_LA1_SIZE)*0.001*PI/180.*EARTH_RADIUS);
+			break;
+			}
+			case GENERALPROJ:
+			{
+			ll.x((float)getint (&GDsec2->data[GP_I1],GP_I1_SIZE)*0.01);
+			ur.x((float)getint (&GDsec2->data[GP_I2],GP_I2_SIZE)*0.01);
+			ll.y((float)getint (&GDsec2->data[GP_J2],GP_J2_SIZE)*0.01);
+			ur.y((float)getint (&GDsec2->data[GP_J1],GP_J1_SIZE)*0.01);
+			break;
+			}
+			case PROJPOLY:
+			{
+			ll.x((float)getint (&GDsec2->data[POL_X0],POL_X0_SIZE)*GDresx);
+			ur.x((float)(getint (&GDsec2->data[POL_X0],POL_X0_SIZE)+GDnx-1)*GDresx);
+			ll.y(-(float)(getint (&GDsec2->data[POL_Y0],POL_Y0_SIZE)+GDny-1)*GDresy);
+			ur.y(-(float)getint (&GDsec2->data[POL_Y0],POL_Y0_SIZE)*GDresy);
+			break;
+			}
+		}
+	}
+	else
+	{
+		// Coordinates for all the earth
+		ll.x(-180.*PI/180.*EARTH_RADIUS);
+		ur.x(+180.*PI/180.*EARTH_RADIUS);
+		ur.y(+90.*PI/180.*EARTH_RADIUS);
+		ll.y(-90.*PI/180.*EARTH_RADIUS);
+	}
+	brect.init(ll,ur);
+}
+
+short
+GribData :: SubPointCoordX()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (short)getint(&GDsec2->data[SAT_XP],SAT_XP_SIZE);
+		case PROJPOLY : return (short)getint(&GDsec2->data[POL_XP],POL_XP_SIZE);
+	}
+return 0;
+}
+
+short
+GribData :: SubPointCoordY()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (short)getint(&GDsec2->data[SAT_YP],SAT_YP_SIZE);
+		case PROJPOLY : return (short)getint(&GDsec2->data[POL_YP],POL_YP_SIZE);
+	}
+return 0;
+}
+
+short
+GribData :: OriginY()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (short)getint(&GDsec2->data[SAT_Y0],SAT_Y0_SIZE);
+		case PROJPOLY : return (short)getint(&GDsec2->data[POL_Y0],POL_Y0_SIZE);
+	}
+return 0;
+}
+
+short
+GribData :: OriginX()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (short)getint(&GDsec2->data[SAT_X0],SAT_X0_SIZE);
+		case PROJPOLY : return (short)getint(&GDsec2->data[POL_X0],POL_X0_SIZE);
+	}
+return 0;
+}
+
+double
+GribData :: AltitudeSat()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (float)getint(&GDsec2->data[SAT_NR],SAT_NR_SIZE)*0.000001;
+		case PROJPOLY : return (float)getint(&GDsec2->data[POL_NR],POL_NR_SIZE)*0.000001;
+	}
+return 0.;
+}
+
+double
+GribData :: SubPointLat()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (float)getint(&GDsec2->data[SAT_LAP],SAT_LAP_SIZE)*0.001*CDR;
+		case PROJPOLY : return (float)getint(&GDsec2->data[POL_LAP],POL_LAP_SIZE)*0.001*CDR;
+	}
+return 0.;
+}
+
+double
+GribData :: SubPointLng()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (float)getint(&GDsec2->data[SAT_LOP],SAT_LOP_SIZE)*0.001*CDR;
+		case PROJPOLY : return (float)getint(&GDsec2->data[POL_LOP],POL_LOP_SIZE)*0.001*CDR;
+	}
+return 0.;
+}
+
+double
+GribData :: Yaw()
+{
+	switch (GDsec2->data_type)
+	{
+		case PROJSATELLITE : return (float)getint(&GDsec2->data[SAT_ORIENTATION_GRID],SAT_ORIENTATION_GRID_SIZE)*0.001*CDR;
+		case PROJPOLY : return (float)getint(&GDsec2->data[POL_ORIENTATION_GRID],POL_ORIENTATION_GRID_SIZE)*0.001*CDR;
+	}
+return 0.;
+}
+
+short
+GribData :: Hemisphere()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+	{
+		int hemis = getint(&GDsec2->data[GP_HEMIS], GP_HEMIS_SIZE);
+		return (hemis == 2 ? -1 : hemis);
+	}
+	else	return 0;
+}
+
+double
+GribData :: OriginParallel()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_LAT0], GP_LAT0_SIZE)*CDR*0.001;
+	else	return 0.;
+}
+
+double
+GribData :: OriginMeridian()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_LON0], GP_LON0_SIZE)*CDR*0.001;
+	else	return 0.;
+}
+
+double
+GribData :: StandardParallelOne()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_LAT1], GP_LAT1_SIZE)*CDR*0.001;
+	else	return 0.;
+}
+
+double
+GribData :: StandardParallelTwo()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_LAT2], GP_LAT2_SIZE)*CDR*0.001;
+	else	return 0.;
+}
+
+double
+GribData :: Flattening()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_FLT], GP_FLT_SIZE)*0.00000001;
+	else	return FLATTENING;
+}
+
+double
+GribData :: EarthRadius()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_RD], GP_RD_SIZE);
+	else	return EARTH_RADIUS;
+}
+
+double
+GribData :: TranslationX()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_DX], GP_DX_SIZE);
+	else	return 0.;
+}
+
+double
+GribData :: TranslationY()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_DY], GP_DY_SIZE);
+	else	return 0.;
+}
+
+double
+GribData :: TranslationZ()
+{
+	if (GDsec2->data_type == GENERALPROJ)
+		return (double)getint(&GDsec2->data[GP_DZ], GP_DZ_SIZE);
+	else	return 0.;
+}
+
+void
+GribData ::	SetReference ( double vmin)
+{
+	double	x;
+	long	n, C, B;
+	int	sb = 0;
+
+	memset (GDsec4.reference, '\0', 4);
+
+	GDfmin = vmin;
+	
+	if (vmin < 0.)
+	{
+		sb = 1;
+		vmin = - vmin;
+	}
+
+	if (vmin == 0.)
+		putint(GDsec4.reference, sizeof(GDsec4.reference), 0);
+	else
+	{
+		n = (long) (log(vmin) * (1. / log((double)16.)) + 1. + 1.0E-8);
+
+		x = (double) (vmin / pow((double)16., (double)n));
+
+		B = (long) (x / pow(2., (-24)));
+
+		C = 64 + n;
+
+//	The reference value (r) is stored in 4 octets as a floating point number,
+//	the high order bit is a sign bit (sb), 0 indicating positive, 1 negative;
+//	the next seven bits are the characteristic (C) and the low order 24 bits
+//	the mantissa (B) : r = (-1) ** sb * 2 ** (-24) * B * 16 ** (C-64)
+
+		InsertBitField ((long)sb, 0, 1, GDsec4.reference);
+		InsertBitField (C, 1, 7, GDsec4.reference);
+		InsertBitField (B, 0, 24, &GDsec4.reference[1]);
+	}
+}
+
+void
+GribData :: SetScale ( double vmin, double vmax, int nbits)
+{
+	long	scale;
+	double	x;
+
+	x = log10((vmax - vmin) / (pow(2.,(double)(nbits+1.))-1.)) / log10(2.);
+
+	scale = (long) floor((log10(((double)vmax-(double)vmin) / (pow(2.,(double)nbits+1.) -1.)) / log10(2.)) +2);
+
+	GDzscale = pow ( (double)2.0, (double)scale );
+//	GDzscale = scale;
+
+//	The scale factor (s) is stored in 16 bits (sign bit and 15 bit integer :
+//		s = floor [ log2 ( (Am - r) / (2**(i+1) - 1) ] + 2
+
+	putint(GDsec4.scale, (short)sizeof(GDsec4.scale), (int)scale);
+}
diff --git a/src/libUtil/Grib.hpp b/src/libUtil/Grib.hpp
new file mode 100644
index 0000000..33a2f6c
--- /dev/null
+++ b/src/libUtil/Grib.hpp
@@ -0,0 +1,1089 @@
+#ifndef Grib_H 
+#define Grib_H
+
+#include <stdio.h>
+#include <memory.h>
+
+#ifndef stypes_H
+#include <stypes.hpp>
+#endif
+
+#ifndef imagedoc_H
+#include <imagedoc.hpp>
+#endif
+
+#ifndef griddoc_H
+#include <griddoc.hpp>
+#endif
+
+//
+// .SUMMARY
+// Grib file definition
+//
+// .DESCRIPTION
+// The GribFile class is a class for managing files in the GRIB format.
+//
+// .SEE ALSO
+//  GribData
+//
+
+#define BUF_IMA                 7680
+#define ORIGIN_CENTER           46
+#define GRIB_BLOCKSIZE          32      //V0.3
+#define MAXGRIBSIZE        8000000L     //V0.4
+
+long ExtractBitField ( short b1, short nb, unsigned char* b );
+void InsertBitField (long cv, short b1, short nb, unsigned char* b );
+void putint (unsigned char* data, short size, int val);
+int  getint (unsigned char*, short);
+
+class GribFile
+{
+	char	*GFdir;			// directory
+	char	*GFname;		// file name
+	FILE	*GFfp;			// file pointer
+	short	GFnopens;		// number of attempts to open file
+	long	GFpos;			// file current position 
+
+public :
+
+	GribFile () {};			// Empty constructor
+
+	GribFile (const char* dir, const char* name);
+//		Normal constructor
+//		Input :
+//			dir   : directory
+//			name  : file name
+
+	~GribFile ();			// Normal destructor
+
+	void Init (const char* dir, const char* name);
+//		Initialize class GribFile. Called when empty constructor is used.
+//		Input :
+//			dir   : directory
+//			name  : file name
+
+	short Open ();
+//		Open an existing grib file.
+//		The number of attempts to open file is incremented.
+//		Return :
+//			TRUE  : grib file opened
+//			FALSE : could not open file
+	
+	short IsGrib ();
+//		Search next grib data in the grib file.
+//		The file current position is located in the beginning of
+//		the grib data, after string "GRIB". 
+//		Return :
+//			TRUE  : grib data found
+//			FALSE : grib data not found
+
+	short Create ();
+//		Open an empty grib file for both writing and reading.
+//		Return :
+//			TRUE  : new grib file opened
+//			FALSE : could not open file
+
+	void Close ();
+//		Close grib file.
+//		The number of attempts to open file is decremented and when it goes
+//		to zero the file is really closed.
+
+	short Read (char* buf, int size);
+//		Read up size bytes from the grib file and stores them in buf.
+//		The file current position is increased by the number of bytes
+//		 actually read.
+//		Input  :
+//			size  : number of bytes to be read
+//		Output :
+//			buf   : store data read
+//		Return :
+//			TRUE  : size bytes were read
+//			FALSE : read error or the file end is encountered before
+//				reaching size bytes
+
+	short Write (char* buf, int size);
+//		Write size bytes from buf into the grib file.
+//		The file current position is increased by the size bytes
+//		Input :
+//			buf   : data to be written
+//			size  : number of bytes to be written
+//		Return :
+//			TRUE  : size bytes were written
+//			FALSE : write error
+
+	short Skip (long offset);
+//		Move the file current position to offset bytes from current position
+//		Return :
+//			TRUE  : skip operation successful
+//			FALSE : skip operation failed
+
+	void Flush () { fflush (GFfp);}
+//		Writes any unwritten data for an output  stream  or
+//		an  update stream in which the most recent operation was not
+//		input to be delivered to the host environment to  the  file;
+//		otherwise it is ignored.  The named stream remains open.
+
+	short Seek (short index);
+//		Move the file current position to a grib data of number index.
+//		The file current position will be positioned after string "GRIB".
+//		Input :
+//			index : grib data number
+//		Return :
+//			TRUE  : seek operation successful
+//			FALSE : seek operation failed
+
+	void Rewind ();
+//		Set the file current position to the beginning of grib file.
+
+	short Eof (short& ind);
+//		Set the file current position to the end of grib file and returns the
+//		existing files's number of grib data.
+//		Return :
+//			TRUE  : eof operation successful
+//			FALSE : eof operation failed
+
+
+	const char* Dir () { return GFdir;}
+//		Return grib file directory.
+
+	const char* Name () { return GFname;}
+//		Return grib file name.
+
+	FILE* Fp () {return GFfp;}
+//		Return file pointer associated with grib file.
+
+	long Pos () {return GFpos;}
+//		Return the file current position.
+
+};
+
+//
+// .SUMMARY
+// Grib data definition
+//
+// .DESCRIPTION
+// The GribData class is a class for managing data in the GRIB format. 
+//
+// .SEE ALSO
+//  GribFile
+//
+#define SEC0_FSIZE 8
+typedef	struct
+{
+	//---------------------------------------------------------
+	// Section 0 is the Indicator section, it has a
+	// fixed length of 8 octets :
+	// Octed No.		Contents	
+	// 1-4		Caracter coded according to the
+	//		International Telegraphic
+	//		Alphabet N0. 5 as GRIB	 	
+	// 5-7		Length of the entire GRIB 	
+	//		message	expressed in binary
+	//		form over the leftmost 3 octets
+	//		(i.e., 24 bits)
+	// 8		GRIB edition number
+	//---------------------------------------------------------
+
+	unsigned
+	char	coded[4],	// Coded CCITT-ITA No. 5
+		length[3],	// total length of GRIB message
+				// (including Section 0)
+		ed_number;	// GRIB edition number
+
+} SECTION0;	
+
+#define SEC1_FSIZE 40
+
+typedef struct
+{
+	//---------------------------------------------------------
+	// Section 1 is the Productor definition section,
+	// it identifies the centre originating the data
+	// and the model used in generating the data. The
+	// data itself is described: time, parameter, etc
+	// A flag field is also included to indicated the
+	// presence or absence of sections 2 and 3
+	// This section contain the length of the section
+	// in the first 3 octets.
+	// Octed No.		Contents
+	// 1-3		Length of section
+	// 4		Version number (No. 1 for international
+	//		exchange)
+	// 5		Identification of centre (see
+	//		F1F2 Code table 0)
+	// 6		Generating process identification
+	//		number
+	// 7		Grid definition	
+	// 8		Flag - 128 (10000000 - section
+	//			    2 included)
+	// 9		Indicator of parameter (see Code table
+	//		2) - 127(Image data)
+	// 10		Indicator of type of level (see
+	//		Code table 3)
+	// 11-12	Channels
+	// 13		Year of century
+	// 14		Month
+	// 15		Day
+	// 16		Hour
+	// 17		Minutes
+	// 18-24	zeros
+	// 25		Century of Reference time of data
+	// 26-40	Reserved - set to 0
+	// 41-nn	Documentation file	
+	// 	Meteosat:
+	//	Goes:
+	//	Lansat/Spot:
+	//		41-42	Path
+	//		43-44	Row
+	//		45	Processing level
+	//		46	Reserved
+	//---------------------------------------------------------
+
+	unsigned
+	char	length[3],		// Length of section
+		version_number,		// Version number
+		id_centre,		// Identification of centre
+		id_process,		// Generating process
+					// identification number
+		grid_def,		// Grid definition
+		flag,			// 128 (10000000 - section 2 included)
+		parameter,		// Indicator of parameter
+		type_level,		// Indicator of type of level
+		channel[2],		// Channels
+		year,			// Reference time of data
+		month,			// or
+		day,			// Date and time of start
+		hour,			// of averanging or
+		minutes,		// accumulating period
+		time_range_unit,
+		p1,p2,
+		time_range_ind,
+		number_fields[2],
+		missing_fields,
+		century,		// Century of reference time of data
+		reserved[15],		// set to 0
+		*documentation_file;	// pointer to documentation file
+
+} SECTION1;
+
+// *********************************************************************
+// Section 1 optional documentation_file stores satellite documentation
+// in a format which depends of the satellite.
+// Meteosat :
+// Goes:
+// Landsat and Spot:
+//			41-42	Path
+//			43-44	Row
+//			45	Processing level
+//			46	Reserved
+// *********************************************************************
+
+#define SEC1_LND_SIZE 6
+#define SEC1_LND_PATH 0
+#define SEC1_LND_PATH_SIZE 2
+#define SEC1_LND_ROW 2
+#define SEC1_LND_ROW_SIZE 2
+#define SEC1_LND_PLEVEL 4
+#define SEC1_LND_PLEVEL_SIZE 1
+#define SEC1_LND_RESERVED 5
+#define SEC1_LND_RESERVED_SIZE 1
+
+
+#define SEC2_FSIZE 6
+typedef struct
+{
+	//---------------------------------------------------------
+	// Section 2 is the Grid description section
+	// This section is optional, it may be omitted if
+	// the grid description is published in Volume B
+	// of Publication No. 9
+	// Octed No.		Contents
+	// 1-3		Length of section
+	// 4		Number of unused bits at end of section 2
+	// 5		Set to zero (reserved)
+	// 6		Data representation type
+	//		00  - cylindrical projection
+	//		90  - space view perspective
+	//		254 - polynomial projection
+	//		255 - general projection
+	// 7-n		data representation
+	//---------------------------------------------------------
+
+	unsigned
+	char	length[3], 
+		unused_bits,
+		zero,
+		data_type,
+		*data;
+} SECTION2;
+
+#define SEC3_FSIZE 6
+typedef struct
+{
+	//---------------------------------------------------------
+	// Section 3 is the Grid description section
+	// This section is optional, it may be omitted if
+	// the grid description is published in Volume B
+	// of Publication No. 9
+	// Octed No.		Contents
+	// 1-3		Length of section
+	// 4		Number of unused bits at end of section 3
+	// 5-6		Table reference
+	// 7-n		Bit map
+	//---------------------------------------------------------
+
+	unsigned
+	char	length[3],
+		unused_bits,
+		table_reference[2],
+		*bitmap;
+} SECTION3;
+
+
+#define SEC4_FSIZE 11
+typedef struct
+{
+	//---------------------------------------------------------
+	// Section 4 is the Binary data section
+	// Octed No.		Contents
+	// 1-3		Length of section
+	// 4		Number of unused bits at end of section 4
+	//		(last 4 bits)
+	// 5-6		Scale factor
+	// 7-10		Reference value
+	// 11		Number of bits containing each packed value
+	// 12		Variable, depending on the flag value in
+	//		octer 4 (matrix mxn - image)
+	//---------------------------------------------------------
+
+	unsigned
+	char	length[3],	// Length of section
+		unused_bits,	// Number of unused bits at end
+		scale[2],	// Scale factor	(zero)
+		reference[4],	// Reference value (zero)
+		bits_number;	// Number of bits packed value
+
+} SECTION4;
+
+
+#define SEC5_FSIZE 4
+typedef struct
+{
+	unsigned char end[4];
+} SECTION5;
+
+
+//----------------------------------------------------------------------
+// Section 2 is the Grid description section.
+// This section is optional, it may be omitted if the grid description
+// is published in Volume B of Publication No. 9.
+// This structure is the variable part of Section 2 for the space view
+// perspective (90).
+//----------------------------------------------------------------------
+
+#define SAT_NX			0	// Number of columns
+#define SAT_NY			2	// Number of lines
+#define SAT_LAP			4	// Latitude of sub-satellite point
+#define SAT_LOP			7	// Longitude of sub-satellite point
+#define SAT_FLAG		10	// Resolution flag (code table 7)
+					// 128 - direction increment given
+#define SAT_DX			11	// Apparent diameter of earth in grid lengths
+#define SAT_DY			14	// Apparent diameter of earth in grid lengths
+#define SAT_XP			17	// X-coordinate of sub-satellite point
+#define SAT_YP			19	// Y-coordinate of sub-satellite point
+#define SAT_SCAN		21	// Scanning mode (code table 8)
+#define SAT_ORIENTATION_GRID	22	// The orientation of the grid i.e.,the angle in
+					// millidegrees between the increasing y axis
+					// and the meridian of the sub-satellite point
+					// in the direction of increasing latitude
+#define SAT_NR			25	// The altitude of the camera from the earth's
+					// centre, measured in earth's (equatorial) radii
+#define SAT_X0			28	// Initial column
+#define SAT_Y0			30	// Initial line
+#define SAT_RESERVED		32	// Reserved - set to 0
+
+#define SEC2_SAT_SIZE		34
+#define SAT_NX_SIZE		2	// Octed 7-8
+#define SAT_NY_SIZE		2	// Octed 9-10
+#define SAT_LAP_SIZE		3	// Octed 11-13
+#define SAT_LOP_SIZE		3	// Octed 14-16
+#define SAT_FLAG_SIZE		1	// Octed 17
+#define SAT_DX_SIZE		3	// Octed 18-20
+#define SAT_DY_SIZE		3	// Octed 21-23
+#define SAT_XP_SIZE		2	// Octed 24-25
+#define SAT_YP_SIZE		2	// Octed 26-27
+#define SAT_SCAN_SIZE		1	// Octed 28
+#define SAT_ORIENTATION_GRID_SIZE 3	// Octed 29-31
+#define SAT_NR_SIZE		3	// Octed 32-34
+#define SAT_X0_SIZE		2	// Octed 35-36
+#define SAT_Y0_SIZE		2	// Octed 37-38
+#define SAT_RESERVED_SIZE	2	// Octed 39-40
+
+
+//----------------------------------------------------------------------
+// Section 2 is the Grid description section.
+// This section is optional, it may be omitted if the grid description
+// is published in Volume B of Publication No. 9.
+// This structure is the variable part of Section 2 for the cylindrical
+// grid (00) with resolution less than 100m.	
+//----------------------------------------------------------------------
+
+#define CYL_NI			0	// Number of columns
+#define CYL_NJ			2	// Number of lines
+#define CYL_LA1			4	// Latitude of origin in degrees*10**3
+#define CYL_LO1			7	// Longitude of origin in degrees*10**3
+#define CYL_FLAG		10	// Resolution flag (code table 7)
+					// 128 - direction increment given
+#define CYL_LA2			11	// Latitude of extreme point in degrees*10**3
+#define CYL_LO2			14	// Longitude of extreme point in degrees*10**3
+#define CYL_DI			17	// Direction increment degrees*10**3
+#define CYL_DJ			19	// Direction increment degrees*10**3
+#define CYL_SCAN		21	// Scanning mode (code table 8)
+#define CYL_RESERVED		22	// Reserved - set to 0
+
+#define SEC2_CYL_SIZE		26
+#define CYL_NI_SIZE		2	// Octed 7-8
+#define CYL_NJ_SIZE		2	// Octed 9-10
+#define CYL_LA1_SIZE		3	// Octed 11-13
+#define CYL_LO1_SIZE		3	// Octed 14-16
+#define CYL_FLAG_SIZE		1	// Octed 17
+#define CYL_LA2_SIZE		3	// Octed 18-20
+#define CYL_LO2_SIZE		3	// Octed 21-23
+#define CYL_DI_SIZE		2	// Octed 24-25
+#define CYL_DJ_SIZE		2	// Octed 26-27
+#define CYL_SCAN_SIZE		1	// Octed 28
+#define CYL_RESERVED_SIZE	4	// Octed 29-32
+
+//----------------------------------------------------------------------
+// Section 2 is the Grid description section.
+// This section is optional, it may be omitted if the grid description
+// is published in Volume B of Publication No. 9.
+// This structure is the variable part of Section 2 for the general
+// projection grid(255), proposed by INPE-DPI, for local part of table 6
+//----------------------------------------------------------------------
+
+#define GP_NI			0	// Number of columns
+#define GP_NJ			2	// Number of lines
+#define GP_I1			4	// Coordinate of origin on i direction in
+					// meters*10**2 of projection 
+#define GP_J1			8	// Coordinate of origin on j direction in
+					// meters*10**2 of projection
+#define GP_FLAG			12	// Resolution flag (code table 7)
+					// 128 - direction increment given
+#define GP_I2			13	// Coordinate of extreme point on i direction in
+					// meters*10**2 of projection
+#define GP_J2			17	// Coordinate of extreme point on i direction in
+					// meters*10**2 of projection
+#define GP_DI			21	// Direction increment in meters *10**3 of
+					// projection
+#define GP_DJ			25	// Direction increment in meters *10**3 of
+					// projection
+#define GP_SCAN			29	// Scanning mode (code table 8)
+#define GP_PROJ			30	// Projection type (code table 11, proposed by
+					// INPE-DPI)			
+#define GP_HEMIS		31	// Hemisphere 0-Do not care,1-north,2-south
+#define GP_LAT0			32	// Latitude of origin parallel in degrees*10**3
+#define GP_LON0			35	// Longitude of origin meridien in degrees*10**3
+#define GP_LAT1			38	// Latitude of of first standard parallel in
+					// degrees*10**3
+#define GP_LAT2			41	// Latitude of of second standard parallel in
+					// degrees*10**3
+#define GP_RD			44	// Semi-axis of earth ellipsoid in meters
+#define GP_FLT			47	// Flatness coeficient of earth ellipsoid
+					// multipied by 10**8
+#define GP_DX			50	// Translation on X direction of the reference
+					// ellipsoid in meters
+#define GP_DY			52	// Translation on Y direction of the reference
+					// ellipsoid in meters
+#define GP_DZ			54	// Translation on Z direction of the reference
+					// ellipsoid in meters
+
+#define SEC2_GP_SIZE		56
+#define GP_NI_SIZE		2	// Octet 7-8
+#define GP_NJ_SIZE		2	// Octet 9-10
+#define GP_I1_SIZE		4	// Octet 11-14
+#define GP_J1_SIZE		4	// Octet 15-18
+#define GP_FLAG_SIZE		1	// Octet 19
+#define GP_I2_SIZE		4	// Octet 20-23
+#define GP_J2_SIZE		4	// Octet 24-27
+#define GP_DI_SIZE		4	// Octet 28-31
+#define GP_DJ_SIZE		4	// Octet 32-35
+#define GP_SCAN_SIZE		1	// Octet 36
+#define GP_PROJ_SIZE		1	// Octet 37
+#define GP_HEMIS_SIZE		1	// Octet 38
+#define GP_LAT0_SIZE		3	// Octet 39-41	
+#define GP_LON0_SIZE		3	// Octet 42-44
+#define GP_LAT1_SIZE		3	// Octet 45-47			
+#define GP_LAT2_SIZE		3	// Octet 48-50
+#define GP_RD_SIZE		3	// Octet 51-53
+#define GP_FLT_SIZE		3	// Octet 54-56
+#define GP_DX_SIZE		2	// Octet 57-58	
+#define GP_DY_SIZE		2	// Octet 59-60
+#define GP_DZ_SIZE		2	// Octet 61-62
+
+
+//----------------------------------------------------------------------
+// Section 2 is the Grid description section.
+// This section is optional, it may be omitted if the grid description
+// is published in Volume B of Publication No. 9.
+// This structure is the variable part of Section 2 for the gaussian
+// latitude/longitude grid (04) with resolution less than 100m.	
+//----------------------------------------------------------------------
+
+#define GSS_NI			0	// Number of columns
+#define GSS_NJ			2	// Number of lines
+#define GSS_LA1			4	// Latitude of origin in degrees*10**3
+#define GSS_LO1			7	// Longitude of origin in degrees*10**3
+#define GSS_FLAG		10	// Resolution flag (code table 7)
+					// 128 - direction increment given
+#define GSS_LA2			11	// Latitude of extreme point in degrees*10**3
+#define GSS_LO2			14	// Longitude of extreme point in degrees*10**3
+#define GSS_DI			17	// Direction increment degrees*10**3
+#define GSS_N			19	// Number of latitude lines between a Pole and
+					// the Equator
+#define GSS_SCAN		21	// Scanning mode (code table 8)
+#define GSS_RESERVED		22	// Reserved - set to 0
+
+#define SEC2_GSS_SIZE		26
+#define GSS_NI_SIZE		2	// Octed 7-8
+#define GSS_NJ_SIZE		2	// Octed 9-10
+#define GSS_LA1_SIZE		3	// Octed 11-13
+#define GSS_LO1_SIZE		3	// Octed 14-16
+#define GSS_FLAG_SIZE		1	// Octed 17
+#define GSS_LA2_SIZE		3	// Octed 18-20
+#define GSS_LO2_SIZE		3	// Octed 21-23
+#define GSS_DI_SIZE		2	// Octed 24-25
+#define GSS_N_SIZE		2	// Octed 26-27
+#define GSS_SCAN_SIZE		1	// Octed 28
+#define GSS_RESERVED_SIZE	4	// Octed 29-32
+
+
+//----------------------------------------------------------------------
+// Section 2 is the Grid description section.
+// This section is optional, it may be omitted if the grid description
+// is published in Volume B of Publication No. 9.
+// This structure is the variable part of Section 2 for the polynomial
+// projection (254) proposed by INPE-DPI, for local part of table 6.
+//----------------------------------------------------------------------
+
+#define POL_NX			0	// Number of columns
+#define POL_NY			2	// Number of lines
+#define POL_LAP			4	// Latitude of sub-satellite point degrees*10**3
+#define POL_LOP			7	// Longitude of sub-satellite point degrees*10**3
+#define POL_FLAG		10	// Resolution flag (code table 7)
+					// 128 - direction increment given
+#define POL_RX			11	// Resolution in meters*10**2 in X direction
+#define POL_RY			14	// Resolution in meters*10**2 in Y direction
+#define POL_XP			17	// X-coordinate of sub-satellite point
+#define POL_YP			19	// Y-coordinate of sub-satellite point
+#define POL_SCAN		21	// Scanning mode (code table 8)
+#define POL_ORIENTATION_GRID	22	// The orientation of the grid i.e.,the angle in
+					// millidegrees between the increasing y axis
+					// and the meridian of the sub-satellite point
+					// in the direction of increasing latitude
+#define POL_NR			25	// The altitude of the camera from the earth's
+					// centre, measured in earth's (equatorial) radii
+#define POL_X0			28	// Initial column
+#define POL_Y0			30	// Initial line
+#define POL_DEGREE		32	// Polynomial degree
+#define POL_NCP			33	// Number of control points
+#define POL_CONTROLPOINTS	34	// Buffer to store up to 32 control points in
+					// the format:
+					// Adjust X coordinate in meters*10**2, 4 bytes
+					// Adjust Y coordinate in meters*10**2, 4 bytes
+					// Longitude in degrees*10**6, 4 bytes
+					// Latitude in degrees*10**6, 4 bytes
+#define POL_RESERVED		1058	// Reserved to zeros
+
+#define SEC2_POL_SIZE		1059
+#define POL_NX_SIZE		2	// Octet 7-8
+#define POL_NY_SIZE		2	// Octet 9-10
+#define POL_LAP_SIZE		3	// Octet 11-13
+#define POL_LOP_SIZE		3	// Octet 14-16
+#define POL_FLAG_SIZE		1	// Octet 17
+#define POL_RX_SIZE		3	// Octet 18-20
+#define POL_RY_SIZE		3	// Octet 21-23
+#define POL_XP_SIZE		2	// Octet 24-25
+#define POL_YP_SIZE		2	// Octet 26-27
+#define POL_SCAN_SIZE		1	// Octet 28
+#define POL_ORIENTATION_GRID_SIZE 3	// Octet 29-31
+#define POL_NR_SIZE		3	// Octet 32-34
+#define POL_X0_SIZE		2	// Octet 35-36
+#define POL_Y0_SIZE		2	// Octet 37-38
+#define	POL_DEGREE_SIZE		1	// Octet 39
+#define POL_NCP_SIZE		1	// Octet 40
+#define POL_CONTROLPOINTS_SIZE	1024	// Octet 41-1064
+#define POL_RESERVED_SIZE	1	// Octet 1065
+
+
+class GribData
+{
+
+	short*		GDlookup;		// lookup table
+	short		GDtranslated;		// flag
+	short		GDnewnx;		// new number of columns
+	float*		GDbuf;			// auxiliary buffer
+
+protected :
+
+	GribFile*	GDfile;			// grib file pointer
+	short		GDindex;		// grib data number in the grib file
+	long		GDpos_inicio_dados;	// initial position of  the grib data
+						// representation 
+	short		GDnx, GDny;		// size of grib data representation
+	float		GDresx,GDresy;		// resolution in meters
+	SECTION0	GDsec0;			// Section 0
+	SECTION1	GDsec1;			// Section 1
+	SECTION2*	GDsec2;			// Section 2
+	SECTION3*	GDsec3;			// Section 3        
+	SECTION4	GDsec4;			// Section 4
+	SECTION5	GDsec5;			// Section 5 
+	float		GDzscale,		// scale value
+			GDfmin;			// reference value
+	short		GDibsiz,		// number of bits
+			GDiskip2;		// number of skip bits
+
+public :
+
+	GribData ();
+//		Normal constructor
+
+	GribData( GribFile *pgf, GribData *pgd );
+//		Constructs a new GribData from another.
+
+	~GribData ();
+//		Normal destructor.
+
+	GribFile* GetGribFile () { return GDfile;}
+//		Get grib file pointer.
+
+	short Index () { return GDindex;}
+//		Get grib data number in the grib file.
+
+	short NumCol () {return GDnx;}
+//		Get number of columns of the grib data representation.
+
+	short NumLin () {return GDny;}
+//		Get number of rows of the grib data representation.
+
+	short NumBit () {return GDibsiz;}
+//		Get number of bits of packed value.
+
+	float ResolutionX () { return GDresx;}
+//		Get data horizontal resolution.
+
+	float ResolutionY () { return GDresy;}
+//		Get data vertical resolution.
+
+	void	SetReference ( double vmin);
+//		Set reference value
+
+	void	SetScale ( double vmin, double vmax, int nbits);
+//		Set scale value
+
+	void	PrintGrib ();	//V0.4
+//		Prints  the GribData contents
+
+	void Init (GribFile* gf, int index);
+//		Initialize GribData class from grib file.
+//		It is assumed that the current file position is located in the
+//		beginning of the specified grib data, after string "GRIB".
+//		Input :
+//			gf    : grib file pointer
+//			index : grib data number
+
+	void Init (GribFile* gf, GribData* gd, short in, SProjection* pout, SProjection* pin, Box& bout, float resx, float resy);
+//		Initialize GribData class from GribData class.
+//		Input :
+//			gf   : output grib file pointer
+//			gd   : input gribdata class
+//			in   : grib data index inside grib file
+//			pout : output projection class. The grib data will be
+//			       initialized in this projection.
+//			pin  : input projection class
+//			bout : output rectangle
+//			resx : output horizontal resolution
+//			resy : output vertical resolution
+
+	void Init (GribFile* gf, ImageDoc& id, short index);
+//		Initialize GribData class from ImageDoc structure.
+//		Input :
+//			gf    : output grib file pointer
+//			id    : ImageDoc structure
+//			index : grib data index inside grib file
+
+	void Init (GribFile* gf, GridDoc& id, short index ,SProjection* sp);
+//		Initialize GribData class from GridDoc structure.
+//		Input :
+//			gf    : output grib file pointer
+//			id    : GridDoc structure
+//			index : grib data index inside grib file
+//			sp    : projection class
+
+	short SkipData ();
+//		Skip grib data representation.
+//		Put the current file position after Section 4.
+//		Return :			
+//			TRUE  : skip operation successful
+//			FALSE : skip operation failed
+
+	short Open () { return GDfile->Open (); }
+//		Open existing grib file.
+//		The number of attempts to open file is incremented.
+//		Return :
+//			TRUE  : grib file opened
+//			FALSE : could not open file
+		
+	void Close () { GDfile->Close (); }
+//		Close grib file.
+//		The number of attempts to open file is decremented and
+//		when it goes to zero the file is really closed.
+
+	short Get (short line, unsigned char* buf);
+//		Read from grib data representation a especified line and store it in buf.
+//		Input :
+//			line : line number to be read
+//		Output :
+//			buf  : store data
+//		Return :
+//			TRUE  : line was read
+//			FALSE : line was not read
+
+	short Get (short line, float* buf);
+//		Read from grib data representation a especified line and store it in buf.
+//		The data are in the format float.
+//		Input :
+//			line : line number to be read
+//		Output :
+//			buf  : store data
+//		Return :
+//			TRUE  : line was read
+//			FALSE : line was not read
+
+	short Get (short line, unsigned char* buf, short* window);
+//		Read from grib data representation a especified virtual line and store
+//		it in buf.
+//		Input :
+//			line   : line to be read
+//			window : defines a rectangle region over the data
+//		Output :
+//			buf  : store data
+//		Return :
+//			TRUE  : line was read
+//			FALSE : line was not read
+
+	short Get (short* rect, short nedge, float fatx, float faty, unsigned char** buf);
+//		Read from grib data representation a especified bounding rectangle and
+//		store it in buf.
+//		Input :
+//			rect : defines a bounding rectangle over the data
+//			nege : number of lines/columns to be added in the rectangle edge
+//			       due to interpolator methods
+//			fatx : x sample factor
+//			faty : y sample factor      
+//		Output :
+//			buf  : store data
+//		Return :
+//			TRUE  : region was read
+//			FALSE : region was not read
+
+	short Put (short line, unsigned char* buf);
+//		Write data from buf into the grib data representation.
+//		The data are represented in unsigned char format.
+//		Input :
+//			line : line to be written
+//			buf  : data to be written
+//		Return :
+//			TRUE  : data were written
+//			FALSE : write error
+
+	short Put (short line, float* buf);
+//		Write data from buf into the grib data representation.
+//		The data are in represented in floating point format.
+//		Input :
+//			line : line to be written
+//			buf  : data to be written
+//		Return :
+//			TRUE  : data were written
+//			FALSE : write error
+
+	short Put (short line, unsigned char* buf, short* window);
+//		Write data from buf into the grib data representation, in a especified
+//		virtual line.
+//		Input :
+//			line   : line to be written
+//			buf    : data to be written
+//			window : defines a rectangle region over the data
+//		Return :
+//			TRUE  : data were written
+//			FALSE : write error
+
+	short Put (short line, short column, unsigned char** buf, short nline, short ncol);
+//		Write data from buf into the grib data representation.
+//		The data defines a rectangle region over the grib data representation.
+//		The coordinates are : (line,column),(line+nline-1,column+ncol-1).
+//		Input :
+//			line   : initial line
+//			column : initial column
+//			buf    : data to be written
+//			nline  : number of lines to be written
+//			ncol   : number of columns to be written
+//		Return :
+//			TRUE  : data were written
+//			FALSE : write error
+
+	short Put ();
+//		Write grib data at the end of grib file. The space for data is allocated.
+//		Return :
+//			TRUE  : grib data was written
+//			FALSE : write error
+
+	short SetTranslation (Box& b, short& n);
+//		Set parameters to perform a translation on data from (0,360) to
+//		(-180,180) when data is represented in Cylindrical Equidistant
+//		projection. Data will be positioned accordingly on buffer when reading
+//		data by method Get (short, float*). It returns the new bounding
+//		rectangle and the new number of columns.
+
+	short PutSection2 ();
+//		Update section 2
+//		Return	:
+//			  TRUE	: data were written
+//			  FALSE	: write error
+
+	short ProjectionCode ();
+//		Get the projection code of the grib data.
+//		Return :
+//			(short) : projection code
+
+	void Rectangle (Box& b);
+//		Get the bounding rectangle of the grib data representation.
+//		Output :
+//			b : defines the bounding rectangle in projection coordinates (meters)
+
+	short Parameter () { return (short)GDsec1.parameter;}
+//		Get indicator of parameter.
+
+	short Type () { return (short)GDsec1.type_level;}
+//		Get the indicator of type of level.
+
+	short Octet11 () { return (short)GDsec1.channel[0];}
+//		Get channel number.
+
+	short Band () { return (short)GDsec1.channel[1];}
+//		Get the band number.
+
+	short Height () { return (short)ExtractBitField (0,16,GDsec1.channel);}
+//		Get the height value.
+
+	short SubPointCoordX();
+//		Get X-coordinate of sub-satellite point.
+
+	short SubPointCoordY();
+//		Get Y-coordinate of sub-satellite point.
+
+	short OriginX();
+//		Get initial column.
+
+	short OriginY();
+//		Get inital line.
+
+	short ApparentDiaX() {return (short)getint(&GDsec2->data[SAT_DX],SAT_DX_SIZE);}
+//		Get apparent diameter of earth in grid.
+
+	short ApparentDiaY() {return (short)getint(&GDsec2->data[SAT_DY],SAT_DY_SIZE);}
+//		Get apparent diameter of earth in grid.
+
+	double AltitudeSat();
+//		Get the altitude of the camera from the earth's centre.
+
+	double SubPointLat();
+//		Get latitude of sub-satellite point in radians.
+
+	double SubPointLng();
+//		Get longitude of sub-satellite point in radians.
+
+	short ScaningMode() {return (short)getint(&GDsec2->data[SAT_SCAN],SAT_SCAN_SIZE);}
+//		Get scanning mode (code table 8).
+
+	double Yaw();
+//		Get the orientation of the grid in radians.
+
+	double OriginLat() { return (double)getint (&GDsec2->data[CYL_LA1], CYL_LA1_SIZE) * 0.001*CDR; }
+//		Get the latitude of origin in radians.
+
+	double OriginLng() { return (double)getint (&GDsec2->data[CYL_LO1], CYL_LO1_SIZE) * 0.001*CDR; }
+//		Get the longitude of origin in radians.
+
+	double EndLat() { return (double)getint (&GDsec2->data[CYL_LA2], CYL_LA2_SIZE) * 0.001*CDR; }
+//		Get the latitude of extreme point in radians.
+
+	double EndLng() { return (double)getint (&GDsec2->data[CYL_LO2], CYL_LO2_SIZE) * 0.001*CDR; }
+//		Get the longitude of extreme point in radians.
+
+	double IDirectionInc() { return (double)getint (&GDsec2->data[CYL_DI], CYL_DI_SIZE) * 0.001*CDR; }
+//		Get the i direction increment in radians.
+
+	double JDirectionInc() { return (double)getint(&GDsec2->data[CYL_DJ], CYL_DJ_SIZE)*0.001*CDR; }
+//		Get the j direction increment in radians.
+
+	short Hemisphere();
+//		Returns the hemisphere.
+
+	double OriginParallel();
+//		Get the origin parallel in radians.
+
+	double OriginMeridian();
+//		Get the origin meridian in radians.
+
+	double StandardParallelOne();
+//		Get the standard parallel one in radians.
+
+	double StandardParallelTwo();
+//		Get the standard parallel two in radians.
+
+	double EarthRadius();
+//		Get the earth equatorial radius.
+
+	double Flattening();
+//		Get the earth flattening.
+
+	double TranslationX();
+//		Get the ellipsoid translation along x axis.
+
+	double TranslationY();
+//		Get the ellipsoid translation along y axis.
+
+	double TranslationZ();
+//		Get the ellipsoid translation along z axis.
+
+	short OriginCenter() { return (short)GDsec1.id_centre;}
+//		Get the origin center.
+
+	short TableVersion() { return (short)GDsec1.version_number; }
+//		Get the version table number.
+
+	void SetGribDataLength();
+//		Recompute total length size of GribData. The result is stored in GDsec0.length.
+
+// Initialize SECTION0
+
+	void      Set_Section0_coded (){ memcpy (GDsec0.coded, "GRIB", sizeof (GDsec0.coded)); }
+
+	void      Set_Section0_length (int length){ putint ( GDsec0.length, sizeof(GDsec0.length),length);}
+
+	int       Get_Section0_length (){ return getint ( GDsec0.length, sizeof(GDsec0.length) );}
+
+	void      Set_Section0_ed_number (short ed_number){ putint ( &GDsec0.ed_number , sizeof(GDsec0.ed_number), (int)ed_number);}       
+    
+
+// Initialize SECTION1
+       
+	void      Set_Section1_length (int length){ putint ( GDsec1.length,  sizeof(GDsec1.length), length);}
+
+	int       Get_Section1_length (){ return getint ( GDsec1.length,  sizeof(GDsec1.length) );}
+      
+	void      Set_Section1_version_number (short version_number){ putint ( &GDsec1.version_number, sizeof(GDsec1.version_number), (int)version_number);}
+
+	void      Set_Section1_id_centre (short id_centre){  putint ( &GDsec1.id_centre, sizeof(GDsec1.id_centre), (int)id_centre);}      
+    // verificar valores
+
+	void      Set_Section1_id_process (short id_process){ putint ( &GDsec1.id_process, sizeof(GDsec1.id_process), (int)id_process);}
+
+	void      Set_Section1_grid_def (short grid_def){ putint ( &GDsec1.grid_def, sizeof(GDsec1.grid_def), (int)grid_def);}    
+     
+	void      Set_Section1_flag ( short flag){ putint ( &GDsec1.flag , sizeof(GDsec1.flag), (int)flag);}     
+      // podia ser simplificado
+
+	void      Set_Section1_parameter (short parameter){  putint ( &GDsec1.parameter, sizeof(GDsec1.parameter), (int)parameter );}    
+        
+	void      Set_Section1_type_level (short type_level){ putint ( &GDsec1.type_level, sizeof(GDsec1.type_level), (int)type_level );} 
+
+	void      Set_Section1_channel (short channel) { putint ( GDsec1.channel , sizeof(GDsec1.channel),(int)channel);}     
+
+	void      Set_Section1_year (short year){ putint ( &GDsec1.year , sizeof(GDsec1.year), (int)year);}     
+
+	void      Set_Section1_month (short month){ putint ( &GDsec1.month, sizeof(GDsec1.month), (int)month );}     
+            
+	void      Set_Section1_day  (short day){ putint ( &GDsec1.day , sizeof(GDsec1.day), (int)day);}     
+ 
+	void      Set_Section1_hour (short hour){ putint ( &GDsec1.hour, sizeof(GDsec1.hour), (int)hour);}
+
+	void	  Set_Section1_minutes (short minutes){ putint ( &GDsec1.minutes, sizeof(GDsec1.minutes), (int)minutes);}
+
+	void      Set_Section1_century  (short century){ putint ( &GDsec1.century, sizeof(GDsec1.century),(int)century );}      
+
+	void 	 Set_Section1_time_range_unit(short time_range_unit) { putint (&GDsec1.time_range_unit , sizeof(GDsec1.time_range_unit), (int)time_range_unit);}  
+         
+	void      Set_Section1_zeros ();
+
+	void      Set_Section1_reserved  (){ putint ( GDsec1.reserved,sizeof(GDsec1.reserved) ,0 );} 
+     
+// Initialize  SECTION2 : parameters related to a specific grid
+
+	void      Set_Section2_length (int length){ putint ( GDsec2->length, sizeof(GDsec2->length), length);}
+
+	int       Get_Section2_length (){ return getint ( GDsec2->length, sizeof(GDsec2->length) );}
+
+	 void     Set_Section2_unused_bits (short unused_bits){ putint ( &GDsec2->unused_bits, sizeof(GDsec2->unused_bits), (int)unused_bits );}     
+
+	void      Set_Section2_zero  (){ putint ( &GDsec2->zero, sizeof(GDsec2->zero), 0);} 
+
+	void      Set_Section2_data_type (short data_type ){ putint ( &GDsec2->data_type, sizeof(GDsec2->data_type ) , (int)data_type );}      
+	void      Set_Section2_CYL_NI (short ni){ putint ( &GDsec2->data[CYL_NI] , CYL_NI_SIZE, (int)ni);}
+ 
+	void      Set_Section2_CYL_NJ (short nj){ putint ( &GDsec2->data[CYL_NJ] , CYL_NJ_SIZE, (int)nj);}
+
+	void      Set_Section2_CYL_LA1 (float la1){ putint ( &GDsec2->data[CYL_LA1], CYL_LA1_SIZE, (int) (la1*1000*CRD) );} 
+
+	void      Set_Section2_CYL_L01 (float lo1){  putint ( &GDsec2->data[CYL_LO1], CYL_LO1_SIZE, (int)(lo1*1000*CRD));} 
+
+	void      Set_Section2_CYL_FLAG (short flag){ putint (&GDsec2->data[CYL_FLAG] , CYL_FLAG_SIZE, (int)flag);} 
+
+	void      Set_Section2_CYL_LA2 (float la2){ putint ( &GDsec2->data[CYL_LA2], CYL_LA2_SIZE, (int)(la2*1000*CRD));}          
+   
+	void      Set_Section2_CYL_LO2  (float lo2){ putint ( &GDsec2->data[CYL_LO2], CYL_LO2_SIZE,(int)( lo2*1000*CRD));} 
+   
+	void      Set_Section2_CYL_DI (float di){ putint ( &GDsec2->data[CYL_DI], CYL_DI_SIZE, (int)(di*1000*CRD));} 
+         
+	void      Set_Section2_CYL_DJ (float dj){ putint ( &GDsec2->data[CYL_DJ], CYL_DJ_SIZE, (int)(dj*1000*CRD));} 
+
+	void Set_Section2_CYL_SCAN (short scan){ putint ( &GDsec2->data[CYL_SCAN], CYL_SCAN_SIZE, (int)scan );}
+
+	void	  Set_Section2_CYL_RESERVED (short reserved){ putint ( &GDsec2->data[CYL_RESERVED] , CYL_RESERVED_SIZE, (int)reserved);}
+
+// Initialize SECTION3
+
+	void      Set_Section3_length (int length){ putint ( GDsec3->length , sizeof(GDsec3->length), length);} 
+
+	int       Get_Section3_length () { return getint ( GDsec3->length , sizeof(GDsec3->length) );} 
+
+// Initialize SECTION4
+
+	void      Set_Section4_length (int length){ putint ( GDsec4.length , sizeof(GDsec4.length), length);} 
+
+	int       Get_Section4_length () { return getint ( GDsec4.length , sizeof(GDsec4.length) );} 
+
+	void      Set_Section4_unused_bits (short unused_bits){ putint ( &GDsec4.unused_bits, sizeof(GDsec4.unused_bits), (int)unused_bits); } 
+
+	int       Get_Section4_unused_bits (){ return getint ( &GDsec4.unused_bits, sizeof(GDsec4.unused_bits) ); }
+
+	void	  Set_Section4_scale (short scale){ putint ( GDsec4.scale, sizeof(GDsec4.scale), (int)scale); }
+
+	int       Get_Section4_scale (){ return getint ( GDsec4.scale, sizeof(GDsec4.scale) ); } 
+
+	void      Set_Section4_reference  (short reference){  putint ( GDsec4.reference,sizeof(GDsec4.reference), (int)(reference));} 
+
+	int       Get_Section4_reference  (){  return getint ( GDsec4.reference,sizeof(GDsec4.reference) );} 
+
+	void      Set_Section4_bits_number (short bits_number){ putint ( &GDsec4.bits_number, sizeof(GDsec4.bits_number), (int)bits_number); GDibsiz = bits_number; }
+
+	int       Get_Section4_bits_number (){ return getint ( &GDsec4.bits_number, sizeof(GDsec4.bits_number) ); }
+
+// Initialize SECTION5
+
+	void     Set_Section5_message(){memcpy  ( GDsec5.end, "7777", sizeof(GDsec5.end));}
+
+};
+#endif
diff --git a/src/libUtil/GribMetaData.cc b/src/libUtil/GribMetaData.cc
new file mode 100644
index 0000000..7faedeb
--- /dev/null
+++ b/src/libUtil/GribMetaData.cc
@@ -0,0 +1,1393 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <algorithm>
+
+#include "grib_api.h"
+
+#include "GribMetaData.h"
+
+#include "MvKeyProfile.h"
+#include "MvMessageMetaData.h"
+
+#include "LogHandler.h"
+extern string ftmp;
+
+static string GRIB_DEFINITION_PATH_ENV;
+static string GRIB_DUMP_EXE;
+static string GRIB_COUNT_EXE;
+
+map<int,string> GribMvDump::keyMap_;
+
+static void shellCommand(string &, stringstream&, stringstream&);
+
+void shellCommand(string &command, stringstream& out,stringstream& err)
+{
+	FILE *in;
+	char cbuf[512];
+
+	string cmd;
+	if(!GRIB_DEFINITION_PATH_ENV.empty())
+	{
+		cmd+="export GRIB_DEFINITION_PATH=" + GRIB_DEFINITION_PATH_ENV + ";";
+	}
+	
+	cmd+=command + " 2>" + ftmp;
+		
+	if (!(in = popen(cmd.c_str() ,"r")) )
+	{
+		return;
+	}
+
+	while(fgets(cbuf, sizeof(cbuf), in) != NULL)
+	{
+		out << cbuf;		
+	}	
+	
+	pclose(in);
+
+
+	if (!(in = fopen(ftmp.c_str() ,"r")) )
+	{
+		return;
+	}
+
+	while(fgets(cbuf, sizeof(cbuf), in) != NULL)
+	{
+		err << cbuf;		
+	}	
+	
+	fclose(in);
+
+}
+
+
+
+
+GribSection::~GribSection()
+{
+	for(vector<GribItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		delete *it;
+	}
+}
+
+
+//===================================================
+//
+//  GribWmoDump
+//
+//===================================================
+
+GribWmoDump::~GribWmoDump()
+{
+	clear();
+}
+
+void  GribWmoDump::clear()
+{
+	for(vector<GribSection*>::iterator it=section_.begin(); it != section_.end(); it++)
+	{
+		delete *it;
+	}
+	section_.clear();
+
+	text_.clear();
+}
+
+void GribWmoDump::read(const string& fgrib, int count)
+{
+ 	//Get grib dump for the given field
+	//int count=1;
+
+	stringstream in,err, cnt_s;
+
+	cnt_s << count;
+	string buf=GRIB_DUMP_EXE + " -O -w count=" + cnt_s.str() + " " + "\"" +fgrib +"\"";
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating WMO-style dump for message: " << count;
+	log->description(sst.str());
+	log->command(buf);
+	
+	//Run dump command
+	shellCommand(buf,in,err);
+	
+	//Get stdout of command
+	text_=in.str();
+
+	//Get stderr of command
+	log->error(err.str());
+		
+	//Put stdout into a proper data structure	
+
+        string stmp, sp1, sp2;
+    	char c[1024];
+	
+	GribSection *asec=0;
+
+    	while(in.getline(c,1024))
+	{
+		//cout << c << endl ;
+
+		string::size_type pos, pos1;
+
+		string buf; // Have a buffer string
+    		stmp=c;
+		stringstream ss(stmp); // Insert the string into a stream
+
+		if( stmp.find("MESSAGE") != string::npos)
+		{
+		
+		}
+		else if((pos=stmp.find("SECTION_")) != string::npos || 
+			(pos=stmp.find("SECTION")) != string::npos)
+		{
+			vector<string> items;
+			GribSection *sec = new GribSection;
+			sec->name("Section " + stmp.substr(pos+8,1));	
+			asec=sec;
+			section_.push_back(sec);
+		}
+
+		else if(asec != 0)
+		{
+			vector<string> sv;
+    			int i=0;
+			
+			GribItem *item = new GribItem;
+			while (ss >> buf)
+			{
+				if(i==0)
+				{
+					item->pos(buf);
+				}
+				else if(i==1)
+				{
+					item->name(buf);
+				}
+				else if(i== 2 && buf == "=")
+				{					
+					pos=stmp.find("=");
+					pos1=stmp.rfind("{");
+					if(pos1 != string::npos)
+					{
+						item->value(stmp.substr(pos,pos1-pos+1));
+						
+						in.getline(c,256);
+						stmp=c;	
+						while(stmp.find("}") == string::npos)
+						{
+							if(stmp.find("}") == string::npos)
+							{
+								if(stmp.find("...") == string::npos)
+								{
+									stringstream ssdata(stmp);
+									while(ssdata >> buf)
+									{
+										item->addArrayData(buf);
+									}
+								}
+								else
+								{	
+									item->addArrayData(stmp);
+								}
+							}
+
+							if(! in.getline(c,256))
+							{
+								log->error("GribWmoDump::read() ---> Fatal formatting error in parsing WMO style dump!\n");
+								return;
+							}
+							stmp=c;
+						}
+						if(stmp.find("}") != string::npos)
+						{
+							item->addArrayData(stmp);
+						}
+						//stmp now contains the "}" character
+					}	
+
+					else //if(buf.find("[") == string::npos || buf.find("]") == string::npos )
+					{	
+						item->value(stmp.substr(pos+1));
+						//item->value(buf);	
+					}
+
+	
+					break;
+				}
+				i++;	
+			}
+			asec->addItem(item);
+		}
+		//GribFieldMetaData* field = new GribFieldMetaData;		
+	}
+}
+
+//===================================================
+//
+//  GribStdDump
+//
+//===================================================
+
+GribStdDump::~GribStdDump()
+{
+	clear();
+}
+
+void GribStdDump::clear()
+{
+	for(vector<GribItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		delete *it;
+	}
+	item_.clear();
+
+	text_.clear();
+}
+
+void GribStdDump::read(const string& fgrib, int count)
+{
+ 	//Get grib dump for the given field
+	
+	stringstream in, err, cnt_s;
+
+	cnt_s << count;
+	string buf=GRIB_DUMP_EXE + " -w count=" + cnt_s.str() + " " + "\"" + fgrib + "\"" ; //+ "  > " + tmpFile_;
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating default dump for message: " << count;
+	log->description(sst.str());
+	log->command(buf);
+
+	shellCommand(buf,in,err);
+
+	//Get stdout of command
+	text_=in.str();
+	
+	//Get stderr of command	
+	log->error(err.str());	
+	
+        string stmp, sp1, sp2, descText;   
+    	char c[512];
+
+	while(in.getline(c,512))
+	{
+		stmp=c;
+		if( stmp.find("GRIB {") != string::npos)
+		{
+			break;
+		}
+	}
+
+    	while(in.getline(c,512))
+	{
+		//cout << c << endl ;
+
+		string::size_type pos;
+
+		string buf; // Have a buffer string
+    		stmp=c;
+		stringstream ss(stmp); // Insert the string into a stream
+
+		if(stmp.find("#") != string::npos && stmp.find("#-READ ONLY-") == string::npos)
+		{
+			descText= stmp;	
+		}	
+		else
+		{		
+			//vector<string> sv;
+    			int i=0;
+			
+			GribItem *item = new GribItem;
+			item_.push_back(item);
+
+			while (ss >> buf)
+			{
+				if(buf.find("#-READ") != string::npos || 
+				   buf.find("ONLY-") != string::npos)
+				{
+					continue;
+				}
+
+				if(stmp.find("=") == string::npos)
+				{
+					return;
+				}
+
+				if(i==0)
+				{
+					item->name(buf);
+				}
+				else if(i==2 && buf != "{")
+				{
+					item->value(buf.substr(0,buf.size()-1));
+
+					if(descText.size() > 0)
+					{
+						item->description(descText);
+						descText.clear();
+					}
+
+				}
+
+				else if(i == 2)
+				{			
+					pos=stmp.rfind("{");
+					
+					//item->value(stmp.substr(pos,pos1-pos));
+						
+					in.getline(c,512);
+					stmp=c;	
+					while(stmp.find("}") == string::npos)
+					{
+						if(stmp.find("}") == string::npos)
+						{
+							if(stmp.find("...") == string::npos)
+							{
+								stringstream ssdata(stmp);
+								while(ssdata >> buf)
+								{
+									item->addArrayData(buf);
+								}
+							}
+							else
+							{	
+								item->addArrayData(stmp);
+							}
+						}
+
+						if(! in.getline(c,512))
+						{
+							log->error("GribStdDump::read() ---> Fatal formatting error in parsing default style dump!\n");
+							return;
+						}
+						stmp=c;
+					}
+					if(stmp.find("}") != string::npos)
+					{
+						item->addArrayData(stmp);
+					}
+						//stmp now contains the "}" character
+				}	
+
+			i++;	
+			}
+		}		
+	}
+}
+
+//===================================================
+//
+//  GribMvDump
+//
+//===================================================
+
+GribMvDump::GribMvDump()
+{
+	if(keyMap_.empty())
+	{
+	  	keyMap_[GRIB_TYPE_STRING]="string";
+		keyMap_[GRIB_TYPE_LONG]="long";
+		keyMap_[GRIB_TYPE_DOUBLE]="double";
+	}
+}	
+	
+GribMvDump::~GribMvDump()
+{
+	clear();
+}
+
+void GribMvDump::clear()
+{
+	for(vector<GribItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		delete *it;
+	}
+	item_.clear();
+}
+
+void GribMvDump::read(const string& fgrib, int count)
+{
+ 	//Get grib dump for the given field
+	
+	stringstream in, cnt_s;
+
+	vector<char*> name_space;
+	name_space.push_back(0);
+	name_space.push_back("geography");
+	name_space.push_back("ls");
+	name_space.push_back("mars");
+	name_space.push_back("parameter");
+	name_space.push_back("time");
+	name_space.push_back("vertical");
+
+	// list of blacklisted keys - these can be very expensive to compute; we can
+	// always put them back in if someone really really needs them...
+	// to be considered: minimum, maximum
+	vector<string> key_blacklist;
+	key_blacklist.push_back("distinctLatitudes");
+	key_blacklist.push_back("distinctLongitudes");
+	key_blacklist.push_back("distinctLatitudes");
+
+	//Other keys which define constant values and are not really useful for users
+	key_blacklist.push_back("7777");
+	key_blacklist.push_back("x");
+
+  	FILE* fp;
+  	grib_handle* gh=NULL;
+  	grib_keys_iterator* kiter=NULL;
+ 	//const int MAX_KEY_LEN=255;
+	const int MAX_VAL_LEN=1024;
+	unsigned long key_iterator_filter_flags=GRIB_KEYS_ITERATOR_ALL_KEYS;
+
+ 	int err=0;
+ 	int grib_count=0;	
+
+ 	int keyType;
+	//long longValue;
+	string svalue;
+ 	char value[MAX_VAL_LEN];
+  	size_t vlen=MAX_VAL_LEN;
+	string cbuff;
+	
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating namespace dump for message: " << count;
+	log->description(sst.str());
+	log->method("GRIB API C interface");
+
+	//open grib file for reading
+  	fp = fopen(fgrib.c_str(),"r");
+  	if(!fp) 
+	{
+		log->error("GribMetaData::getKeyList() ---> Cannot open grib file: \n        " + fgrib + "\n");
+    		return;
+  	}
+
+	//Get messages form the file
+  	while((gh = grib_handle_new_from_file(0,fp,&err)) != NULL)
+	 {
+		grib_count++;
+
+		if(!gh) 
+		{
+      			log->error("GribMvDump::read() ---> Unable to create grib handle\n");
+      			return;
+    		}
+
+		if(grib_count == count)
+		{
+   			//cout << "-- GRIB N. " << grib_count << "---/n";
+    			
+			for(unsigned int ns = 0 ; ns  < name_space.size(); ns++)
+			{
+   				//Get key iterator
+				kiter=grib_keys_iterator_new(gh,key_iterator_filter_flags,name_space[ns]);
+				if (!kiter)
+				{
+					stringstream err_s;
+					err_s << "GribMvDump::read() ---> Unable to create keys iterator for message no: " <<
+                                                 grib_count << "\n";
+					log->error(err_s.str());					
+					return;
+				}
+
+				//Loop for the keys in the current message until all the keys are found
+   				while(grib_keys_iterator_next(kiter))
+   				{
+					const char* name = grib_keys_iterator_get_name(kiter);
+
+					if(!name)
+					{
+						continue;
+					}	
+					  
+					string cbuff=name; 
+
+					// if this key is in our blacklist, then do not use it
+					vector<string>::const_iterator i = find(key_blacklist.begin(), key_blacklist.end(), name);
+
+					if (i != key_blacklist.end())
+						continue;
+
+
+					//Add namespace prefix to the key name (e.g. mars.param)
+					if(name_space[ns] != 0)
+					{
+						cbuff = string(name_space[ns]) + "." + cbuff;				
+					}
+					
+					//Get string value
+					vlen=MAX_VAL_LEN;
+					size_t  len;
+					
+					if(grib_get_native_type(gh,name,&keyType) == GRIB_SUCCESS &&				
+					   grib_get_size(gh,name,&len) == GRIB_SUCCESS && 
+					   (keyType == GRIB_TYPE_STRING || keyType == GRIB_TYPE_LONG ||
+					    keyType == GRIB_TYPE_DOUBLE ))
+					{					  
+						GribItem *item = new GribItem;
+						item_.push_back(item);
+						item->name(cbuff);
+					
+						if(keyType == GRIB_TYPE_STRING || len == 1)
+						{												  
+							if(grib_get_string(gh,name,value,&vlen) == GRIB_SUCCESS)
+      							{
+								//cout << "   " << cbuff << " =  " << value << endl;
+								//Create the grib item
+
+								item->value(value);
+							}
+						}
+						else if(strcmp(name,"paramId") == 0 && keyType == GRIB_TYPE_LONG)
+						{
+							if(grib_get_string(gh,name,value,&vlen) == GRIB_SUCCESS)
+							{
+								item->value(value);
+							}						
+						}  			
+						else
+						{
+							stringstream s;
+							s << len;
+							svalue="Array (" + s.str() + ")";
+							item->value(svalue);	
+						}
+						
+						map<int,string>::const_iterator  it=keyMap_.find(keyType);
+						if(it  != keyMap_.end())
+						{
+							item->type(it->second);
+						}	
+					}
+					
+				}	
+
+				grib_keys_iterator_delete(kiter);
+			}    
+
+			fclose(fp);
+			break;			
+		}
+
+		grib_handle_delete(gh);
+  	}
+}
+
+//===================================================
+//
+//  GribValueDump
+//
+//===================================================
+
+GribValueDump::GribValueDump()
+{
+	latitude_=0;
+	longitude_=0;
+	value_=0;
+	num_=0;	
+	decimalPlaces_=0;
+}
+
+GribValueDump::~GribValueDump()
+{
+	clear();
+}
+
+void GribValueDump::clear()
+{
+	if(latitude_)
+		delete [] latitude_;
+		
+	if(longitude_)
+		delete [] longitude_;
+		
+	if(value_)
+		delete [] value_;
+	
+	latitude_=0;
+	longitude_=0;
+	value_=0;
+	num_=0;	
+	gridType_.clear();
+				
+}
+
+void GribValueDump::readFailed(FILE* fp,grib_handle* gh)
+{
+	grib_handle_delete(gh);
+	fclose(fp);
+	clear();
+}	
+
+void GribValueDump::read(const string& fgrib, int count)
+{ 
+ 	//Get grib dump for the given field
+	
+	stringstream in, cnt_s;
+
+  	FILE* fp;
+  	grib_handle* gh=NULL;
+  	
+ 	int err=0;
+ 	int grib_count=0;	
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating value dump for message: " << count;
+	log->description(sst.str());
+	log->method("GRIB API C interface");
+
+	//Clear the currently allocated data
+	clear();
+
+	//open grib file for reading
+  	fp = fopen(fgrib.c_str(),"r");
+  	if(!fp) 
+	{
+		log->error("GribValueDump::read() ---> Cannot open grib file: \n        " + fgrib + "\n");
+    		return;
+  	}
+
+	//Get messages form the file
+  	while((gh = grib_handle_new_from_file(0,fp,&err)) != NULL && grib_count < count)
+	 {
+		grib_count++;
+
+		if(!gh) 
+		{
+      			log->error("GribValueDump::read() ---> Unable to create grib handle\n");
+      			return;
+    		}
+
+		if(grib_count == count)
+		{
+   			size_t latNum, lonNum, valNum;
+			string latName, lonName;
+			
+			//cout << "-- GRIB N. " << grib_count << "---/n";
+
+			const int MAX_VAL_LEN=1024;				
+			char cval[MAX_VAL_LEN];					
+			size_t vlen=MAX_VAL_LEN;
+			
+			//Grid type
+			if(grib_get_string(gh,"gridType",cval,&vlen) == GRIB_SUCCESS)
+			{
+				gridType_=string(cval);
+			}
+			else
+			{
+				log->error("GribValueDump::read() ---> No gridType data found\n");
+				readFailed(fp,gh);
+				return;	
+			}		
+			
+			if(gridType_ == "sh")
+			{
+				latName="";
+				lonName="";
+				log->error("GribValueDump::read() ---> gridType \"sh\" is not supported\n");
+				readFailed(fp,gh);
+				return;	
+			}
+			else
+			{
+				latName="latitudes";
+				lonName="longitudes";
+			}			
+
+
+			//Latitude
+			grib_get_size(gh,latName.c_str(),&latNum);
+			if(latNum >0)
+			{
+				latitude_ = new double[latNum]; 
+			}
+			else
+			{	
+				log->error("GribValueDump::read() ---> No latitude data found\n");
+				readFailed(fp,gh);
+				return;	
+			}	
+				
+			if(grib_get_double_array(gh,latName.c_str(),latitude_,&latNum) != 0)
+			{
+				log->error("GribValueDump::read() ---> Failed to read latitude data\n");
+				readFailed(fp,gh);
+				return;
+	 		}
+			
+			//Longitude
+			grib_get_size(gh,lonName.c_str(),&lonNum);
+			if(lonNum != latNum)
+			{
+				log->error("GribValueDump::read() ---> No longitude data found\n");
+				readFailed(fp,gh);
+				return;
+			}	
+			else
+			{
+				longitude_ = new double[lonNum]; 
+			}	
+			
+	
+			if(grib_get_double_array(gh,lonName.c_str(),longitude_,&lonNum) != 0)
+			{
+				log->error("GribValueDump::read() ---> Failed to read longitude data\n");
+				readFailed(fp,gh);
+				return;
+	 		}
+			//Value
+			grib_get_size(gh,"values",&valNum);
+			if(valNum != latNum)
+			{
+				log->error("GribValueDump::read() ---> No value data found\n");
+				readFailed(fp,gh);
+				return;
+			}	
+			else
+			{
+				value_ = new double[valNum]; 
+			}
+			
+			if(grib_get_double_array(gh,"values",value_,&valNum) != 0)
+			{
+				log->error("GribValueDump::read() ---> Failed to read value data\n");
+				readFailed(fp,gh);
+				return;
+	 		}
+			
+			double max=-999999999.;
+			double min=999999999.;
+			for(unsigned int i=0; i < valNum; i++)
+			{
+			  	if(value_[i] > max)
+				  	max=value_[i];
+				if(value_[i] < min)
+				  	min=value_[i];
+			}
+			
+			double maxAbs=(fabs(max) > fabs(min))?fabs(max):fabs(min);
+			decimalPlaces_=0;
+			for(int i=0; i >-10; i--)
+			{
+			  	if(maxAbs > pow(10,static_cast<double>(i)))
+				{
+				  	decimalPlaces_=-i;
+					break;
+				}
+			}	
+			
+					
+			
+			//Statistics
+			/*double dval;
+			if(grib_get_double(gh,"average",&dval) == GRIB_SUCCESS)
+				average_=dval;
+			if(grib_get_double(gh,"standardDeviation",&dval) == GRIB_SUCCESS)
+				stdev_=dval;				
+			if(grib_get_double(gh,"skewness",&dval) == GRIB_SUCCESS)
+				skewness_=dval;
+			if(grib_get_double(gh,"kurtosis",&dval) == GRIB_SUCCESS)
+				kurtosis_=dval;*/
+			num_=latNum;
+				
+		}
+		
+		grib_handle_delete(gh);
+  	}
+	
+	fclose(fp);
+}
+
+
+
+//=========================================
+//
+//  GribMetaData
+//
+//=========================================
+
+GribMetaData::GribMetaData()
+{		
+        string cmd;
+	
+	GRIB_DEFINITION_PATH_ENV="";
+	const char* grb_def_path=getenv("GRIB_DEFINITION_PATH");
+	if(grb_def_path)
+	{
+		GRIB_DEFINITION_PATH_ENV=string(grb_def_path);
+	}
+
+        //Define the grib dump program name
+	char *gdexe=getenv("METVIEW_GRIB_DUMP");
+
+ 	if (gdexe == 0)  
+	{	
+		GRIB_DUMP_EXE="grib_dump";
+		GRIB_COUNT_EXE="grib_count";
+	}
+	else
+	{
+		GRIB_DUMP_EXE=gdexe;
+		GRIB_COUNT_EXE="grib_count";
+	}
+
+	observer_=0;
+	hasMultiMessage_=false;
+	
+	grib_multi_support_on(0);
+}
+
+GribMetaData::~GribMetaData()
+{
+}
+
+void GribMetaData::setFilter(vector<file_offset> offset, vector<int> len)
+{
+	filterOffset_=offset;
+	filterLen_=len;
+	filterCnt_.clear();
+	for(unsigned int i=0; i < filterOffset_.size(); i++)
+	{
+		filterCnt_.push_back(-1);
+	}
+
+	if(offset.size() != 0 && 
+	   offset.size() == len.size())
+	{
+		filterEnabled_=true;
+	}
+}
+
+void GribMetaData::setFileName(string fname)
+{
+	fileName_=fname;
+	messageNum_=0;
+	totalMessageNum_=computeTotalMessageNum();
+
+}
+
+int GribMetaData::computeTotalMessageNum()
+{	
+  	FILE* fp;
+	fp = fopen(fileName_.c_str(),"r");
+  	if(!fp) 
+	{
+    		//log->error("GribMetaData::readMessages() ---> Cannot open grib file: \n        " + fileName_ + "\n");
+    		return 0;
+  	}
+  	
+  	int res=0;
+  	if(grib_count_in_file(0,fp,&res) != GRIB_SUCCESS)
+		res=0;
+	
+	fclose(fp);
+	return res;
+	  	
+	/*stringstream in, err;
+	
+	string buf=GRIB_COUNT_EXE + " " + "\"" + fileName_ + "\"" ; 
+	shellCommand(buf,in,err);
+
+	if(!err.str().empty())
+		return -1;
+
+	int res;
+	std::istringstream iss(in.str());
+  	iss >> res;
+	
+	return res;*/
+}
+
+int GribMetaData::getEstimatedMessageNum()
+{
+	if(filterEnabled_ == true)
+	{
+		return filterOffset_.size();
+	}
+
+	return totalMessageNum_;
+}
+
+
+void GribMetaData::loadKeyProfile(MvKeyProfile *prof)
+{
+	prof->clearKeyData();
+	readMessages(prof);
+}
+
+void GribMetaData::readMessages(MvKeyProfile *prof)
+{
+	/*vector<char*> name_space;
+	name_space.push_back(0);
+	name_space.push_back("geography");
+	name_space.push_back("ls");== GRIB_SUCCESS
+	name_space.push_back("mars");
+	name_space.push_back("parameter");
+	name_space.push_back("time");
+	name_space.push_back("vertical");*/
+
+  	FILE* fp;
+  	grib_handle* gh=NULL;
+ 	int err=0;
+ 	int grib_count=0;
+	long longValue;
+	string cbuff;
+
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	log->description("Generating grib key list for all the messages");
+	log->method("GRIB API C interface");
+
+	messageNum_=0;
+
+	//open grib file for reading
+  	fp = fopen(fileName_.c_str(),"r");
+  	if(!fp) 
+	{
+    		log->error("GribMetaData::readMessages() ---> Cannot open grib file: \n        " + fileName_ + "\n");
+    		return;
+  	}
+
+	if(filterEnabled_==true)
+	{			
+		if(firstScan_)
+		{
+			//long currentOffset=0;
+			int msgCnt=0;
+			while((gh = grib_handle_new_from_file(0,fp,&err)) != NULL)
+	 		{
+    				if(!gh) 
+				{
+      					stringstream sst;
+					sst <<  "GribMetaData::readMessages() --->  Unable to create grib handle for message count: " << grib_count+1;
+					log->error(sst.str());
+      					return;
+    				}
+				
+				msgCnt++;
+
+				if(grib_get_long(gh,"offset",&longValue) == GRIB_SUCCESS)
+				{
+					for(unsigned int i=0; i < filterOffset_.size(); i++)
+					{
+						file_offset offset_diff = longValue - filterOffset_[i];
+						if(ABS(offset_diff) < 120)
+						{
+							grib_count++;
+
+							filterCnt_[i] = msgCnt;
+			
+							readMessage(prof,gh);
+
+							observer_->messageScanStepChanged(grib_count);
+
+							break;
+						}
+					}
+				}
+				else
+				{
+					stringstream sst;
+					sst <<  "GribMetaData::readMessages() --->  Cannot get offset for message count: " << grib_count+1;
+					log->error(sst.str());
+      					grib_handle_delete(gh);
+					return;
+
+				}
+
+				//currentOffset+=longValue;
+				grib_handle_delete(gh);
+			}
+		}
+		else
+		{
+			for(unsigned int i=0; i < filterOffset_.size(); i++)
+			{
+				grib_count++;
+
+				fseek(fp,filterOffset_[i],SEEK_SET);
+	
+				int err;
+				gh = grib_handle_new_from_file(0,fp,&err);
+	
+				if(!gh) 
+				{
+					stringstream sst;
+					sst <<  "GribMetaData::readMessages() --->  Unable to create grib handle for offset: " << filterOffset_[i];
+					log->error(sst.str());
+					return;
+				}
+				
+				readMessage(prof,gh);
+	
+				observer_->messageScanStepChanged(grib_count);
+	
+				grib_handle_delete(gh);
+			}
+		}		
+	}
+	else
+	{
+		//Get messages form the file
+  		while((gh = grib_handle_new_from_file(0,fp,&err)) != NULL)
+	 	{
+    			if(!gh) 
+			{
+      				stringstream sst;
+				sst <<  "GribMetaData::readMessages() --->  Unable to create grib handle for message count: " << grib_count+1;
+				log->error(sst.str());
+      				return;
+    			}
+		
+			grib_count++;
+
+			readMessage(prof,gh);
+
+			observer_->messageScanStepChanged(grib_count);
+	
+			grib_handle_delete(gh);
+		}
+
+		if(firstScan_)
+		{
+			if(totalMessageNum_ != grib_count)
+			{
+			  	totalMessageNum_=grib_count;
+			  	hasMultiMessage_=true;	
+			}
+		}
+	}
+	
+	fclose(fp);
+	
+	messageNum_=grib_count;
+	firstScan_=false;
+
+
+	//------------------------------
+	// Format key "count"
+	//------------------------------
+
+	char c[20];
+	int n,c_format_id;
+	const char c_format[4][5]={"%02d","%03d","%04d","%05d"};
+
+	int num=messageNum_;
+	if(num < 100)
+	{
+		c_format_id=0;
+	}
+	else if(num < 1000)
+	{
+		c_format_id=1;		
+	}
+	else if(num < 10000)
+	{
+		c_format_id=2;	
+	}	
+	else
+	{
+		c_format_id=3;	
+	}
+
+	MvKey* key=prof->key("count");
+	if(key)
+	{
+		for(unsigned int i=0; i< key->value().size(); i++)
+		{
+			string s=key->value()[i];
+			if(s != "")
+			{ 
+				stringstream sst(s);
+				sst >> n;
+				sprintf(c,c_format[c_format_id],n);
+				s=c;
+				key->setValue(i,s);
+			}
+		}
+	
+	}
+
+	key=prof->key("MV_Index");
+	if(key)
+	{
+		for(unsigned int i=0; i< key->value().size(); i++)
+		{
+			sprintf(c,c_format[c_format_id],i+1);
+			string s(c);
+			key->setValue(i,s);
+		}
+	
+	}
+}
+
+void GribMetaData::getKeyList(int count,string nameSpace,MvKeyProfile *prof)
+{
+	list<string> keys;
+	getKeyList(count,nameSpace,keys);
+	for(list<string>::iterator it=keys.begin(); it != keys.end(); it++)
+	{
+		prof->addKey(new MvKey((*it),(*it)));
+	}
+}
+
+
+void GribMetaData::getKeyList(int count,string nameSpace,list<string> &keys)
+{
+	vector<char*> nameSpaceL;
+	
+	if(nameSpace=="Default")
+	{
+		nameSpaceL.push_back(0);
+	}
+	else
+	{
+		char* nsC = new char[nameSpace.size() + 1];
+		std::copy(nameSpace.begin(),nameSpace.end(),nsC);
+		nsC[nameSpace.size()] = '\0';
+		nameSpaceL.push_back(nsC);
+	}
+
+	// list of blacklisted keys - these can be very expensive to compute; we can
+	// always put them back in if someone really really needs them...
+	// to be considered: minimum, maximum
+	vector<string> key_blacklist;
+	key_blacklist.push_back("distinctLatitudes");
+	key_blacklist.push_back("distinctLongitudes");
+	key_blacklist.push_back("distinctLatitudes");
+
+	//Other keys which define constant values and are not really useful for users
+	key_blacklist.push_back("7777");
+	key_blacklist.push_back("x");
+
+
+  	FILE* fp;
+  	grib_handle* gh=NULL;
+  	grib_keys_iterator* kiter=NULL;
+ 	//const int MAX_KEY_LEN=255;
+	//const int MAX_VAL_LEN=1024;
+	unsigned long key_iterator_filter_flags=GRIB_KEYS_ITERATOR_ALL_KEYS;
+
+ 	int err=0;
+ 	int grib_count=0;
+	int keyType;
+
+ 	//char value[MAX_VAL_LEN];
+  	//size_t vlen=MAX_VAL_LEN;
+	string cbuff;
+	
+	LogItem *log=new LogItem;
+	LogHandler::instance()->add(log);
+
+	stringstream sst;
+	sst << "Generating grib key list for message: " << count;
+	log->description(sst.str());
+	log->method("GRIB API C interface");
+
+	//open grib file for reading
+  	fp = fopen(fileName_.c_str(),"r");
+  	if(!fp) 
+	{
+		log->error("GribMetaData::getKeyList() ---> Cannot open grib file: \n        " + fileName_ + "\n");
+    		return;
+  	}
+
+	//Get messages form the file
+  	while((gh = grib_handle_new_from_file(0,fp,&err)) != NULL)
+	 {
+		grib_count++;
+
+		if(!gh) 
+		{
+      			log->error("GribMetaData::getKeyList() ---> Unable to create grib handle\n");
+      			return;
+    		}
+
+		if(grib_count == count)
+		{
+   			//cout << "-- GRIB N. " << grib_count << "---/n";
+    			
+			for(unsigned int ns = 0 ; ns  < nameSpaceL.size(); ns++)
+			{
+   				//Get key iterator
+				kiter=grib_keys_iterator_new(gh,key_iterator_filter_flags,nameSpaceL[ns]);
+    				if (!kiter)
+				{
+      					stringstream err_s;
+					err_s << "GribMetaData::getKeyList() ---> Unable to create keys iterator for message no: " <<
+                                                 grib_count << "\n";
+					log->error(err_s.str());					
+      					return;
+    				}
+
+				//Loop for the keys in the current message until all the keys are found
+   				while(grib_keys_iterator_next(kiter))
+   				{
+					const char* name = grib_keys_iterator_get_name(kiter);
+				        if(!name)
+					{
+						continue;
+					}	
+					
+					string cbuff=name; 
+				
+					// if this key is in our blacklist, then do not use it
+					vector<string>::const_iterator i = find(key_blacklist.begin(), key_blacklist.end(), name);
+
+					if (i != key_blacklist.end())
+						continue;
+
+					//Add namespace prefix to the key name (e.g. mars.param)
+					if(nameSpaceL[ns] != 0)
+					{
+						cbuff = string(nameSpaceL[ns]) + "." + cbuff;				
+					}	
+						
+					if(grib_get_native_type(gh,cbuff.c_str(),&keyType) == GRIB_SUCCESS &&  
+					   (keyType == GRIB_TYPE_STRING || keyType == GRIB_TYPE_LONG ||
+		    		           keyType == GRIB_TYPE_DOUBLE))
+					 {						
+						keys.push_back(cbuff);	
+					 }	
+				}	
+
+				grib_keys_iterator_delete(kiter);
+    			}    
+
+			grib_handle_delete(gh);
+			break;			
+		}
+
+		grib_handle_delete(gh);
+  	}
+
+	keys.sort();
+
+	fclose(fp);
+
+	//To-do: this should be called before calling return in this method!!
+	for(vector<char*>::iterator it=nameSpaceL.begin(); it != nameSpaceL.end(); it++)
+	{
+		if((*it) != 0)
+			delete *it;
+	}
+ 
+
+}
+
+long GribMetaData::gribapiVersionNumber()
+{
+	return grib_get_api_version();
+}			
+
+void GribMetaData::readMessage(MvKeyProfile* prof,grib_handle *gh)
+{
+	const int MAX_VAL_LEN=1024;	
+	long longValue;
+	char value[MAX_VAL_LEN];
+	string svalue;
+	size_t vlen=MAX_VAL_LEN;
+
+	for(unsigned int i=0; i< prof->size() ; i++ )
+	{
+		size_t len;
+		int keyType;
+		const char* name=prof->at(i)->name().c_str();
+		bool foundValue=false;
+
+		if(grib_get_native_type(gh,name,&keyType) == GRIB_SUCCESS &&
+		   grib_get_size(gh,name,&len) == GRIB_SUCCESS &&
+		   (keyType == GRIB_TYPE_STRING || keyType == GRIB_TYPE_LONG ||
+		    keyType == GRIB_TYPE_DOUBLE))
+		{
+			if(keyType == GRIB_TYPE_STRING || len == 1)
+			{						
+				if(prof->at(i)->readIntAsString() == false && 
+				   keyType ==GRIB_TYPE_LONG)			
+				{					
+				   	if(grib_get_long(gh,name,&longValue) == GRIB_SUCCESS)
+					{
+						stringstream s;
+						s << longValue;
+						prof->at(i)->addValue(s.str().c_str());
+						foundValue=true;
+					}
+				}
+				else
+				{
+					vlen=MAX_VAL_LEN;
+					if(grib_get_string(gh,name,value,&vlen) == GRIB_SUCCESS)
+					{						
+						prof->at(i)->addValue(value);
+						foundValue=true;
+					}
+				}
+			}
+			else if((strcmp(name,"paramId") == 0 || strcmp(name,"parameter.paramId") == 0) &&
+			        keyType == GRIB_TYPE_LONG)
+			{
+				if(prof->at(i)->readIntAsString() == false)
+				{  				  
+					if(grib_get_long(gh,name,&longValue) == GRIB_SUCCESS)
+					{
+						stringstream s;
+						s << longValue;
+						prof->at(i)->addValue(s.str().c_str());
+						foundValue=true;
+					}						
+				}  
+				else
+				{
+					vlen=MAX_VAL_LEN;
+					if(grib_get_string(gh,name,value,&vlen) == GRIB_SUCCESS)
+					{						
+						prof->at(i)->addValue(value);
+						foundValue=true;
+					}
+				}					
+			}  			
+			else
+			{		
+				stringstream s;
+				s << len;
+				svalue="Array (" + s.str() + ")";	
+				prof->at(i)->addValue(svalue);
+				foundValue=true;
+			}
+		}
+
+
+		if(!foundValue)
+		{
+			prof->at(i)->addValue("N/A");	
+		}		
+	}
+}	
diff --git a/src/libUtil/GribMetaData.h b/src/libUtil/GribMetaData.h
new file mode 100644
index 0000000..8988d81
--- /dev/null
+++ b/src/libUtil/GribMetaData.h
@@ -0,0 +1,190 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GribMetaData_H
+#define GribMetaData_H
+
+#include <iostream>
+#include <list>
+#include <map>
+#include <vector>
+
+#include "MvMessageMetaData.h"
+
+//for file_offset
+#include "mars.h"
+
+class MvKeyProfile;
+
+using namespace std;
+
+class GribItem
+{
+public: 
+	void pos(string s) {pos_=s;};
+	string pos() {return pos_;};
+	void name(string s) {name_=s;};
+	string name() {return name_;};	
+	void type(string s) {type_=s;};
+	string type() {return type_;};	
+	void value(string s) {value_=s;};
+	string value() {return value_;};
+	void intValue(string s) {intValue_=s;};
+	string intValue() {return intValue_;};
+	void description(string s) {description_=s;};
+	string description() {return description_;};
+	void addAlias(string s) {alias_.push_back(s);};
+	const vector<string>& alias() {return alias_;};
+	void addArrayData(string s) {array_.push_back(s);};
+	const vector<string>& arrayData() {return array_;};	
+
+protected:
+	string pos_;
+	string name_;
+	string type_;
+	string value_;
+	string intValue_;
+	string description_;
+	vector<string> alias_;
+	vector<string> array_;
+	
+};
+
+class GribSection;
+typedef list<GribSection*>::const_iterator GribSectionIterator;
+
+class GribSection
+{
+public:
+	GribSection() {};
+	~GribSection();
+	void name(string s) {name_=s;};
+	string name() {return name_;};	
+	void lenght(int i) {lenght_=i;};
+	int lenght() {return lenght_;};
+	void offset(int i) {offset_=i;};
+	int offset() {return offset_;};
+	void addItem(GribItem* i) {item_.push_back(i);};
+	int itemNum() {return item_.size();}
+	const vector<GribItem*> & item() {return item_;};
+
+protected:
+	string name_;
+	int lenght_;
+	int offset_;
+	vector<GribItem*> item_;
+};
+
+
+class GribWmoDump
+{
+public:
+	GribWmoDump() {};
+	~GribWmoDump();
+	void clear();
+	void read(const string&, int);
+	int  sectionNum() const {return section_.size();} 
+	const string& text() const {return text_;} 
+	const vector<GribSection*>& section() {return section_;}
+
+protected:
+	vector<GribSection*> section_;
+	string     text_; 
+};
+
+class GribStdDump
+{
+public:
+	GribStdDump() {};
+	~GribStdDump();
+	void clear();
+	void read(const string&, int);
+	int  itemNum() const {return item_.size();} 
+	const string& text() const {return text_;} 
+	const vector<GribItem*>& item() {return item_;};
+
+protected:
+	vector<GribItem*> item_;
+	string     text_; 
+};
+
+class GribMvDump
+{
+public:
+	GribMvDump();
+	~GribMvDump();
+	void clear();
+	void read(const string&, int);
+	int  itemNum() const {return item_.size();} 
+	const vector<GribItem*>& item() {return item_;};
+
+protected:
+	vector<GribItem*> item_;
+	static map<int,string> keyMap_;
+};
+
+class GribValueDump
+{
+public:
+	GribValueDump();
+	~GribValueDump();
+	void clear();
+	void read(const string&, int);
+	double* latitude() {return latitude_;}
+	double* longitude() {return longitude_;}
+	double* value() {return value_;}
+	int num() {return num_;}
+	int decimalPlaces() {return decimalPlaces_;}
+	double average() {return average_;}
+	double stdev() {return stdev_;}
+	double skewness() {return skewness_;}
+	double kurtosis() {return kurtosis_;}
+
+protected:
+	void readFailed(FILE*,grib_handle*);
+	
+	double* latitude_;
+	double* longitude_;
+	double* value_;
+	int num_;
+	int decimalPlaces_;
+	string gridType_;
+	double average_;
+	double stdev_;
+	double skewness_;
+	double kurtosis_;
+	
+};
+
+
+class GribMetaData : public MvMessageMetaData
+{ 
+public: 
+	GribMetaData();
+	~GribMetaData();
+	void setFileName(string);
+	int getGribCount();
+	void getKeyList(int,string,MvKeyProfile *);
+	void getKeyList(int,string,list<string> &);
+	void loadKeyProfile(MvKeyProfile *);
+	int getEstimatedMessageNum();
+	long gribapiVersionNumber();
+	void setFilter(vector<file_offset>,vector<int>);
+	bool hasMultiMessage() {return hasMultiMessage_;}
+	
+private:			
+	void readMessages(MvKeyProfile *);	
+	void readMessage(MvKeyProfile*,grib_handle *);
+	void setDateStructure();
+	int computeTotalMessageNum();
+	bool hasMultiMessage_;
+
+};
+
+#endif
diff --git a/src/libUtil/Imagep.hpp b/src/libUtil/Imagep.hpp
new file mode 100644
index 0000000..f65ffb9
--- /dev/null
+++ b/src/libUtil/Imagep.hpp
@@ -0,0 +1,209 @@
+#ifndef Imagep_H
+#define Imagep_H
+
+#ifndef Grib_H
+#include <Grib.hpp>
+#endif
+
+#ifndef Box_H
+#include <Box.hpp>
+#endif
+
+
+#define NLINBUFFER		128		// no. lines in line_buffer
+#define NLINBLOCK		64		// no. lines per block
+#define NCOLBLOCK		64		// no. columns per block
+#define NPELBLOCK		4096		// no. pixels per block
+
+#define NBITLIN	6		// log (base 2) NLINBLOCK 
+#define NBITCOL	6		// log (base 2) NCOLBLOCK 
+#define MASCLIN	63		// NLINBLOCK - 1 
+#define MASCCOL	63		// NCOLBLOCK - 1 
+
+#define NOT_IN_MEMORY	(short)-1 
+#define NOT_IN_USE	(short)-1 
+
+
+class Imagep
+{
+protected :
+	GribFile*	Igf;	// pointer to Grib file
+	GribData*	Igd;	// pointer to Grib data
+	SProjection*	Iproj;	// pointer to projection
+	Box		Ibox;	// image bounding area
+	short		Inx,	// no. of columns
+			Iny;	// no. of lines
+	float		Irx,	// horizontal resolution
+			Iry;	// vertical resolution
+	short		Index;	// Grib data index inside Grib file
+	short		Inbits; // No. of bits/pixel
+	
+// Internal controls of the image
+
+	char		rw;		// access mode : 0 read only
+					//		 1 read/write
+	char		bl;		// data structure : 1 block
+					//                  0 line
+	short		Inbytes;	// No. bytes/pixel
+	unsigned long	pixel;		// pixel out of image
+	unsigned long   outsidevalue;	// Default value to pixels outside Imagep
+	unsigned long	naccess;	// no. of accesses to the image
+	unsigned char	*tbuf;		// buffer for transfer data
+
+
+	
+	short 	npieces_disk,		// no. of pieces in disk 
+		npieces_col,		// no. of pieces in the horizontal 
+		npieces_memory;		// no. of pieces in the memory 
+
+	unsigned long **piece_buffer;	// array of image blocks 
+	short 	*piece_disk;		// piece_disk[i] gives the position in
+					// data_buffer of the image block i
+					// if piece_disk[i] = NOT_IN_MEMORY, the image
+					// block i is not in piece_buffer 
+		   			// NOT_IN_MEMORY -> piece i is not in memory
+
+	short	*piece_memory;		// piece_memory[i] gives the index of the
+					// image block occupying the piece_buffer[i]
+					// piece_memory[i] = NOT_IN_USE- means that
+					// piece_buffer[i] is empty
+	
+	unsigned long *piece_buffer_access;// gives the last access to the block_buffer[i] 
+	
+
+	int   ReadBlock( int pb, int pd );	// reads a block from disk
+	int   WriteBlock( int pb, int pd );	// writes a block to disk
+	int   ReadLine( int pb, int pd );	// reads a line from disk
+	int   WriteLine( int pb, int pd );	// writes a line to disk
+	int   AllocateMemoryBlock();		// Allocates memory for blocks
+	int   AllocateMemoryLine();		// Allocates memory for lines
+	void  DeallocateMemory();		// Frees memory
+	void  FlushBlocks();			// Save block structure
+	void  FlushLines();			// Save Line structure
+	void  AllocateDisk();			// Allocates disk space
+	void  Clear();				// Resets image
+	void  SetLowerLefUpperRight();
+
+public:	
+
+	Imagep ();
+// Constructor
+
+	~Imagep ();
+// Destructor.
+
+	GribData* GetGribData(){ return Igd; }
+// Return GribData pointer
+	short NumCol () { return Inx; }
+// Get the horizontal image size.
+
+	short NumLin () { return Iny; }
+// Get the vertical image size.
+
+	short NumBit(){ return Inbits; }
+// Get the number of bits/pixel
+
+	short NumByte(){ return Inbytes; }
+// Get the number of bites/pixel
+
+	const char* Directory() { return (Igf) ? (Igf->Dir()) : (NULL); }
+// Get the name of directory
+
+	const char* Name(){ return (Igf) ? (Igf->Name()) : (NULL); }
+
+	int Open ();
+// Open GribFile related to this image
+
+	int Close ();
+// Close GribFile related to this image
+
+	Box BoundingBox () { return Ibox;}
+// Get image bounding area'
+
+	SProjection* Projection () { return Iproj; }
+// Get image projection.
+
+	float ResolutionX () { return Irx; }
+// Get the horizontal image resolution.
+
+	float ResolutionY () { return Iry; }
+// Get the vertical image resolution.
+
+	unsigned long& operator() ( int lin, int col );
+// Access to image pixels.
+
+	short Get (short i, unsigned char* b);
+// Get Line i from the image. It can be used only when the the image is set
+// to line access mode ( see SetLineMode() ).
+
+	short Put (short i, unsigned char* b);
+// Put line i in the image. It can be used only when the the image is set
+// to line access mode ( see SetLineMode() ).
+
+	int  SetBlockMode();
+// Set Virtual memory to the Block mode
+
+	int  SetLineMode();
+// Set Virtual memory to the Line mode
+
+	void  SetReadWrite();
+// Set permission access to read/write
+
+	void  SetReadOnly();
+// Set permission access to read only
+
+	void  Flush(){ if( bl == 1 )FlushBlocks(); else FlushLines(); }
+
+	void  SetOutsideValue( long out ) { pixel = out; outsidevalue = out; }
+// Set default value for pixels lying outside image
+
+	int Init( const char* dir, const char* nam, long index, int is_offset = 0);
+// Initializes an image, already created.
+//	Input:
+//		dir   : directory path
+//		nam   : file name
+// 		index : Index of GribData in the GribFile
+//		is_offset: Flag to indicate if previous value is field position or offset
+
+	short InitAndRemap (const char* dir, const char* nam, Imagep* imi, Box& b, SProjection* p, float resx=0., float resy=0.);
+//		Initializer based on a Imagep imi, already created, clipped by a Box b
+//		in Projection p, with resolution resx and resy. A new image file 'nam' will
+//		be created on directory 'dir'.
+//		Input :
+//			nam : file name where new
+//			nam : file name where new
+//			imi : pointer to Imagep that contains original data
+//			b   : image bounding rectangle
+//			p   : pointer to image projection
+//			resx: horizontal resolution
+//			resy: vertical resolution
+
+	Point Coord2Index (Point& p);
+
+	void InterpolateIn (Imagep* imi, Point& poll, Point& pour, Point& poul, Point& polr, Point& pill, Point& piur, Point& piul, Point& pilr);
+
+	short PointOnLine (Point& p, Point& q, Point& t);
+
+	short Remap (Imagep* imi); //, short type_interp);
+
+	unsigned long InterpolateAt (Point& p);
+
+	short ProjectionCode() { return Igd->ProjectionCode(); }
+
+//<*Elisa*> new usefull functions
+
+	short OriginX() { return Igd->OriginX(); }
+	short OriginY() { return Igd->OriginY(); }
+	double SubPointLat() { return Igd->SubPointLat(); }
+	double SubPointLng() { return Igd->SubPointLng(); }
+	short SubPointCoordX() { return Igd->SubPointCoordX(); }
+	short SubPointCoordY() { return Igd->SubPointCoordY(); }
+	double Yaw() { return Igd->Yaw(); }
+	double AltitudeSat() { return Igd->AltitudeSat(); }
+	short ScanningMode() { return Igd->ScaningMode(); }
+	double ApparentDiaX() { return Igd->ApparentDiaX(); }
+	double ApparentDiaY() { return Igd->ApparentDiaY(); }
+	short ScaningMode() { return Igd->ScaningMode(); }
+};
+
+#endif
diff --git a/src/libUtil/LogHandler.cc b/src/libUtil/LogHandler.cc
new file mode 100644
index 0000000..e9aa8db
--- /dev/null
+++ b/src/libUtil/LogHandler.cc
@@ -0,0 +1,44 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include "LogHandler.h"
+
+bool LogHandler::instanceFlag_ = false;
+LogHandler* LogHandler::instance_ = NULL;
+//list<LogItem*> LogHandler::item_;
+
+
+LogHandler* LogHandler::instance()
+{
+	if(! instanceFlag_)	
+	{
+		instance_= new LogHandler;
+		instanceFlag_=true;
+		return instance_;
+	}
+	else
+	{
+		return instance_;
+	}
+}
+
+void LogHandler::add(LogItem *t)
+{
+	item_.push_back(t);
+}
+
+void LogHandler::clear()
+{
+	for(vector<LogItem*>::iterator it=item_.begin(); it != item_.end(); it++)
+	{
+		delete *it;
+	}
+	item_.clear();
+}
\ No newline at end of file
diff --git a/src/libUtil/LogHandler.h b/src/libUtil/LogHandler.h
new file mode 100644
index 0000000..6957536
--- /dev/null
+++ b/src/libUtil/LogHandler.h
@@ -0,0 +1,78 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef LogHandler_H
+#define LogHandler_H
+
+#include <iostream>
+#include <sstream>
+#include <vector>
+
+
+using namespace std;
+
+class LogItem
+{
+public:
+	LogItem() : errorStatus_(false) {};
+	LogItem(string& desc) : description_(desc), errorStatus_(false) {};
+
+	void description(string s) {description_=s;}
+	void command(string s) {command_=s;}
+	void method(string s) {method_=s;}
+	void request(string s) {request_=s;}
+	void status(string s) {status_=s;}
+	//void log(string s) {log_=s;}
+	void log(string s) {log_.append(s);}
+	void error(string s) {if(s.size() > 0) {log(s); errorStatus_=true;};}
+	void errorStatus(bool b) {errorStatus_=b;}
+
+	const string& description() const {return description_;}
+	const string& command() const {return command_;}
+	const string& method() const {return method_;}
+	const string& request() {return request_;}
+	const string& status() {return status_;}
+	const string& log() {return log_;}
+	bool  errorStatus() {return errorStatus_;}
+
+	void  clear() {description_.clear(); command_.clear(); method_.clear(); log_.clear(); 
+		      request_.clear(); status_.clear(); errorStatus_=false;}
+
+private:
+	string   	description_;
+	string   	command_;
+	string 		method_;
+	string		log_;
+	string          request_;
+	string 		status_;
+	bool     	errorStatus_;
+};
+
+
+class LogHandler
+{
+public:
+	~LogHandler() {instanceFlag_ = false; clear();}
+	static LogHandler* instance();
+	void add(LogItem*);
+	void clear();
+	const vector<LogItem*>& item() {return item_;} 
+	LogItem* lastItem() {return (item_.size() > 0)?item_[item_.size()-1]:0;} 	
+
+protected:
+	LogHandler() {};
+
+private:
+	static bool instanceFlag_;
+	static LogHandler* instance_;
+
+	vector<LogItem*>  item_;	
+};
+	
+#endif
diff --git a/src/libUtil/MagicsColours.h b/src/libUtil/MagicsColours.h
new file mode 100644
index 0000000..987eb78
--- /dev/null
+++ b/src/libUtil/MagicsColours.h
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#define K_tbl_mag_size 56
+static Colour MagicsColourTable[] =
+{
+     {0.0000,0.0000,0.0000},
+     {1.0000,0.0000,0.0000},
+     {0.0000,1.0000,0.0000},
+     {0.0000,0.0000,1.0000},
+     {1.0000,1.0000,0.0000},
+     {0.0000,1.0000,1.0000},
+     {1.0000,0.0000,1.0000},
+     {0.0000,0.0000,0.0000},
+     {0.4225,0.6500,0.1950},
+     {0.8500,0.7178,0.4675},
+     {0.6000,0.0844,0.0300},
+     {0.4078,0.0643,0.0000},
+     {0.5000,0.0000,0.1727},
+     {0.2000,0.2000,0.2000},
+     {0.3200,0.0112,0.0000},
+     {0.9000,0.2895,0.2250},
+     {1.0000,0.8860,0.6700},
+     {0.0000,0.4500,0.2945},
+     {0.7500,0.5751,0.0750},
+     {0.7000,0.7000,0.7000},
+     {0.5800,0.4798,0.2900},
+     {0.0000,0.5500,0.1900},
+     {0.6170,0.4070,0.9400},
+     {0.6000,0.3927,0.0000},
+     {0.0000,0.0000,0.4000},
+     {0.6800,0.4501,0.0680},
+     {0.3012,0.3765,0.0000},
+     {0.9400,0.4739,0.3788},
+     {0.9000,0.3600,0.4116},
+     {0.8000,0.2400,0.4335},
+     {0.7000,0.2010,0.0000},
+     {0.4500,0.6400,1.0000},
+     {0.4000,0.3309,0.2000},
+     {0.8784,0.4226,0.0000},
+     {0.1111,0.7216,0.6503},
+     {0.4823,0.0700,0.7000},
+     {1.0000,0.0000,0.8536},
+     {1.0000,0.0000,0.5000},
+     {1.0000,0.0000,0.2730},
+     {1.0000,0.0381,0.0000},
+     {1.0000,0.1464,0.0000},
+     {1.0000,0.3087,0.0000},
+     {1.0000,0.5000,0.0000},
+     {1.0000,0.6913,0.0000},
+     {1.0000,0.8536,0.0000},
+     {1.0000,0.9619,0.0000},
+     {0.8536,1.0000,0.0000},
+     {0.5000,1.0000,0.0000},
+     {0.1464,1.0000,0.0000},
+     {0.0000,1.0000,0.5000},
+     {0.0000,1.0000,1.0000},
+     {0.0000,0.5000,1.0000},
+     {0.1464,0.0000,1.0000},
+     {0.5000,0.0000,1.0000},
+     {0.8536,0.0000,1.0000},
+     {1.0000,0.0000,1.0000}
+};
diff --git a/src/libUtil/Makefile.am b/src/libUtil/Makefile.am
new file mode 100644
index 0000000..4041657
--- /dev/null
+++ b/src/libUtil/Makefile.am
@@ -0,0 +1,56 @@
+ 
+noinst_LIBRARIES = lib/libUtil.a
+
+lib_libUtil_a_SOURCES = \
+		Box.cc 	\
+		Cached.cc \
+		Grib.cc \
+		GribMetaData.cc \
+		LogHandler.cc \
+		MtInputEvent.cc \
+		MvAlmostObsoleteRequest.cc  \
+		MvElement.cc \
+		MvException.cc \
+		MvFileInfo.cc \
+		MvFlextra.cc \
+		MvKeyProfile.cc \
+		MvKeyManager.cc \
+		MvList.cc \
+		MvMiscelaneous.cc \
+		MvPath.cc   \
+		MvProfileData.cc \
+                MvRequestUtil.cc \
+                MvScm.cc \
+		MvStopWatch.cc \
+		MvVersionInfo.cc \
+		Point.cc \
+		proj_braz.cc \
+		MvGribParC.c 	\
+		Request.cc \
+		TableReader.cc \
+                Tokenizer.cc \
+		UtilitiesC.c \
+		Cached.h GribMetaData.h LogHandler.h MagicsColours.h MtInputEvent.h MvException.h \
+		MvFileInfo.h MvFlextra.h MvGribParC.h MvKeyManager.h MvKeyProfile.h MvMessageMetaData.h MvMsg.h MvOda.h MvOdb.h \
+		MvSTL.h MvStopWatch.h MvVersionInfo.h Rectangle.h Request.h UtilitiesC.h auto_ptr.h \
+		bits.h gdefines.h inc_iostream.h inc_stl.h min_max_macros.h progress.h \
+		xec.h \
+		Assertions.hpp Box.hpp DataTools.hpp DataVis.hpp Factory.hpp Grib.hpp Imagep.hpp \
+		MvAlmostObsoleteRequest.hpp MvCommandHistory.h MvElement.hpp MvList.hpp \
+		MvMiscelaneous.h MvParTable.hpp MvPath.hpp \
+		MvProfileData.h \
+                MvRequest.hpp MvRequestUtil.hpp MvScm.h Point.hpp Projection.hpp Prototype.hpp Transfm.hpp \
+		Types.hpp griddoc.hpp imagedoc.hpp proj_braz.hpp stypes.hpp \
+		TableReader.h \
+                Tokenizer.h
+
+
+if METVIEW_ODB
+lib_libUtil_a_SOURCES += MvOdb.cc
+lib_libUtil_a_CPPFLAGS = $(ODB_CPPFLAGS)
+endif
+
+BUILT_SOURCES = lib
+
+lib:
+	ln -s ../../lib lib
diff --git a/src/libUtil/Makefile.in b/src/libUtil/Makefile.in
new file mode 100644
index 0000000..a36933d
--- /dev/null
+++ b/src/libUtil/Makefile.in
@@ -0,0 +1,1190 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ at METVIEW_ODB_TRUE@am__append_1 = MvOdb.cc
+subdir = src/libUtil
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo "  AR    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+lib_libUtil_a_AR = $(AR) $(ARFLAGS)
+lib_libUtil_a_LIBADD =
+am__lib_libUtil_a_SOURCES_DIST = Box.cc Cached.cc Grib.cc \
+	GribMetaData.cc LogHandler.cc MtInputEvent.cc \
+	MvAlmostObsoleteRequest.cc MvElement.cc MvException.cc \
+	MvFileInfo.cc MvFlextra.cc MvKeyProfile.cc MvKeyManager.cc \
+	MvList.cc MvMiscelaneous.cc MvPath.cc MvProfileData.cc \
+	MvRequestUtil.cc MvScm.cc MvStopWatch.cc MvVersionInfo.cc \
+	Point.cc proj_braz.cc MvGribParC.c Request.cc TableReader.cc \
+	Tokenizer.cc UtilitiesC.c Cached.h GribMetaData.h LogHandler.h \
+	MagicsColours.h MtInputEvent.h MvException.h MvFileInfo.h \
+	MvFlextra.h MvGribParC.h MvKeyManager.h MvKeyProfile.h \
+	MvMessageMetaData.h MvMsg.h MvOda.h MvOdb.h MvSTL.h \
+	MvStopWatch.h MvVersionInfo.h Rectangle.h Request.h \
+	UtilitiesC.h auto_ptr.h bits.h gdefines.h inc_iostream.h \
+	inc_stl.h min_max_macros.h progress.h xec.h Assertions.hpp \
+	Box.hpp DataTools.hpp DataVis.hpp Factory.hpp Grib.hpp \
+	Imagep.hpp MvAlmostObsoleteRequest.hpp MvCommandHistory.h \
+	MvElement.hpp MvList.hpp MvMiscelaneous.h MvParTable.hpp \
+	MvPath.hpp MvProfileData.h MvRequest.hpp MvRequestUtil.hpp \
+	MvScm.h Point.hpp Projection.hpp Prototype.hpp Transfm.hpp \
+	Types.hpp griddoc.hpp imagedoc.hpp proj_braz.hpp stypes.hpp \
+	TableReader.h Tokenizer.h MvOdb.cc
+ at METVIEW_ODB_TRUE@am__objects_1 = lib_libUtil_a-MvOdb.$(OBJEXT)
+am_lib_libUtil_a_OBJECTS = lib_libUtil_a-Box.$(OBJEXT) \
+	lib_libUtil_a-Cached.$(OBJEXT) lib_libUtil_a-Grib.$(OBJEXT) \
+	lib_libUtil_a-GribMetaData.$(OBJEXT) \
+	lib_libUtil_a-LogHandler.$(OBJEXT) \
+	lib_libUtil_a-MtInputEvent.$(OBJEXT) \
+	lib_libUtil_a-MvAlmostObsoleteRequest.$(OBJEXT) \
+	lib_libUtil_a-MvElement.$(OBJEXT) \
+	lib_libUtil_a-MvException.$(OBJEXT) \
+	lib_libUtil_a-MvFileInfo.$(OBJEXT) \
+	lib_libUtil_a-MvFlextra.$(OBJEXT) \
+	lib_libUtil_a-MvKeyProfile.$(OBJEXT) \
+	lib_libUtil_a-MvKeyManager.$(OBJEXT) \
+	lib_libUtil_a-MvList.$(OBJEXT) \
+	lib_libUtil_a-MvMiscelaneous.$(OBJEXT) \
+	lib_libUtil_a-MvPath.$(OBJEXT) \
+	lib_libUtil_a-MvProfileData.$(OBJEXT) \
+	lib_libUtil_a-MvRequestUtil.$(OBJEXT) \
+	lib_libUtil_a-MvScm.$(OBJEXT) \
+	lib_libUtil_a-MvStopWatch.$(OBJEXT) \
+	lib_libUtil_a-MvVersionInfo.$(OBJEXT) \
+	lib_libUtil_a-Point.$(OBJEXT) \
+	lib_libUtil_a-proj_braz.$(OBJEXT) \
+	lib_libUtil_a-MvGribParC.$(OBJEXT) \
+	lib_libUtil_a-Request.$(OBJEXT) \
+	lib_libUtil_a-TableReader.$(OBJEXT) \
+	lib_libUtil_a-Tokenizer.$(OBJEXT) \
+	lib_libUtil_a-UtilitiesC.$(OBJEXT) $(am__objects_1)
+lib_libUtil_a_OBJECTS = $(am_lib_libUtil_a_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(lib_libUtil_a_SOURCES)
+DIST_SOURCES = $(am__lib_libUtil_a_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = lib/libUtil.a
+lib_libUtil_a_SOURCES = Box.cc Cached.cc Grib.cc GribMetaData.cc \
+	LogHandler.cc MtInputEvent.cc MvAlmostObsoleteRequest.cc \
+	MvElement.cc MvException.cc MvFileInfo.cc MvFlextra.cc \
+	MvKeyProfile.cc MvKeyManager.cc MvList.cc MvMiscelaneous.cc \
+	MvPath.cc MvProfileData.cc MvRequestUtil.cc MvScm.cc \
+	MvStopWatch.cc MvVersionInfo.cc Point.cc proj_braz.cc \
+	MvGribParC.c Request.cc TableReader.cc Tokenizer.cc \
+	UtilitiesC.c Cached.h GribMetaData.h LogHandler.h \
+	MagicsColours.h MtInputEvent.h MvException.h MvFileInfo.h \
+	MvFlextra.h MvGribParC.h MvKeyManager.h MvKeyProfile.h \
+	MvMessageMetaData.h MvMsg.h MvOda.h MvOdb.h MvSTL.h \
+	MvStopWatch.h MvVersionInfo.h Rectangle.h Request.h \
+	UtilitiesC.h auto_ptr.h bits.h gdefines.h inc_iostream.h \
+	inc_stl.h min_max_macros.h progress.h xec.h Assertions.hpp \
+	Box.hpp DataTools.hpp DataVis.hpp Factory.hpp Grib.hpp \
+	Imagep.hpp MvAlmostObsoleteRequest.hpp MvCommandHistory.h \
+	MvElement.hpp MvList.hpp MvMiscelaneous.h MvParTable.hpp \
+	MvPath.hpp MvProfileData.h MvRequest.hpp MvRequestUtil.hpp \
+	MvScm.h Point.hpp Projection.hpp Prototype.hpp Transfm.hpp \
+	Types.hpp griddoc.hpp imagedoc.hpp proj_braz.hpp stypes.hpp \
+	TableReader.h Tokenizer.h $(am__append_1)
+ at METVIEW_ODB_TRUE@lib_libUtil_a_CPPFLAGS = $(ODB_CPPFLAGS)
+BUILT_SOURCES = lib
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libUtil/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/libUtil/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+	@$(MKDIR_P) lib
+	@: > lib/$(am__dirstamp)
+lib/libUtil.a: $(lib_libUtil_a_OBJECTS) $(lib_libUtil_a_DEPENDENCIES) lib/$(am__dirstamp)
+	$(AM_V_at)-rm -f lib/libUtil.a
+	$(AM_V_AR)$(lib_libUtil_a_AR) lib/libUtil.a $(lib_libUtil_a_OBJECTS) $(lib_libUtil_a_LIBADD)
+	$(AM_V_at)$(RANLIB) lib/libUtil.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-Box.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-Cached.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-Grib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-GribMetaData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-LogHandler.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MtInputEvent.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvElement.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvException.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvFileInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvFlextra.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvGribParC.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvKeyManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvKeyProfile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvList.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvOdb.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvPath.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvProfileData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvRequestUtil.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvScm.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvStopWatch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-MvVersionInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-Point.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-Request.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-TableReader.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-Tokenizer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-UtilitiesC.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lib_libUtil_a-proj_braz.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+lib_libUtil_a-MvGribParC.o: MvGribParC.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libUtil_a-MvGribParC.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvGribParC.Tpo -c -o lib_libUtil_a-MvGribParC.o `test -f 'MvGribParC.c' || echo '$(srcdir)/'`MvGribParC.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvGribParC.Tpo $(DEPDIR)/lib_libUtil_a-MvGribParC.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='MvGribParC.c' object='lib_libUtil_a-MvGribParC.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libUtil_a-MvGribParC.o `test -f 'MvGribParC.c' || echo '$(srcdir)/'`MvGribParC.c
+
+lib_libUtil_a-MvGribParC.obj: MvGribParC.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libUtil_a-MvGribParC.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvGribParC.Tpo -c -o lib_libUtil_a-MvGribParC.obj `if test -f 'MvGribParC.c'; then $(CYGPATH_W) 'MvGribParC.c'; else $(CYGPATH_W) '$(srcdir)/MvGribParC.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvGribParC.Tpo $(DEPDIR)/lib_libUtil_a-MvGribParC.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='MvGribParC.c' object='lib_libUtil_a-MvGribParC.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libUtil_a-MvGribParC.obj `if test -f 'MvGribParC.c'; then $(CYGPATH_W) 'MvGribParC.c'; else $(CYGPATH_W) '$(srcdir)/MvGribParC.c'; fi`
+
+lib_libUtil_a-UtilitiesC.o: UtilitiesC.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libUtil_a-UtilitiesC.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-UtilitiesC.Tpo -c -o lib_libUtil_a-UtilitiesC.o `test -f 'UtilitiesC.c' || echo '$(srcdir)/'`UtilitiesC.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-UtilitiesC.Tpo $(DEPDIR)/lib_libUtil_a-UtilitiesC.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='UtilitiesC.c' object='lib_libUtil_a-UtilitiesC.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libUtil_a-UtilitiesC.o `test -f 'UtilitiesC.c' || echo '$(srcdir)/'`UtilitiesC.c
+
+lib_libUtil_a-UtilitiesC.obj: UtilitiesC.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_libUtil_a-UtilitiesC.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-UtilitiesC.Tpo -c -o lib_libUtil_a-UtilitiesC.obj `if test -f 'UtilitiesC.c'; then $(CYGPATH_W) 'UtilitiesC.c'; else $(CYGPATH_W) '$(srcdir)/UtilitiesC.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-UtilitiesC.Tpo $(DEPDIR)/lib_libUtil_a-UtilitiesC.Po
+ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='UtilitiesC.c' object='lib_libUtil_a-UtilitiesC.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_libUtil_a-UtilitiesC.obj `if test -f 'UtilitiesC.c'; then $(CYGPATH_W) 'UtilitiesC.c'; else $(CYGPATH_W) '$(srcdir)/UtilitiesC.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+lib_libUtil_a-Box.o: Box.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Box.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Box.Tpo -c -o lib_libUtil_a-Box.o `test -f 'Box.cc' || echo '$(srcdir)/'`Box.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Box.Tpo $(DEPDIR)/lib_libUtil_a-Box.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Box.cc' object='lib_libUtil_a-Box.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Box.o `test -f 'Box.cc' || echo '$(srcdir)/'`Box.cc
+
+lib_libUtil_a-Box.obj: Box.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Box.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Box.Tpo -c -o lib_libUtil_a-Box.obj `if test -f 'Box.cc'; then $(CYGPATH_W) 'Box.cc'; else $(CYGPATH_W) '$(srcdir)/Box.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Box.Tpo $(DEPDIR)/lib_libUtil_a-Box.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Box.cc' object='lib_libUtil_a-Box.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Box.obj `if test -f 'Box.cc'; then $(CYGPATH_W) 'Box.cc'; else $(CYGPATH_W) '$(srcdir)/Box.cc'; fi`
+
+lib_libUtil_a-Cached.o: Cached.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Cached.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Cached.Tpo -c -o lib_libUtil_a-Cached.o `test -f 'Cached.cc' || echo '$(srcdir)/'`Cached.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Cached.Tpo $(DEPDIR)/lib_libUtil_a-Cached.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Cached.cc' object='lib_libUtil_a-Cached.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Cached.o `test -f 'Cached.cc' || echo '$(srcdir)/'`Cached.cc
+
+lib_libUtil_a-Cached.obj: Cached.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Cached.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Cached.Tpo -c -o lib_libUtil_a-Cached.obj `if test -f 'Cached.cc'; then $(CYGPATH_W) 'Cached.cc'; else $(CYGPATH_W) '$(srcdir)/Cached.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Cached.Tpo $(DEPDIR)/lib_libUtil_a-Cached.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Cached.cc' object='lib_libUtil_a-Cached.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Cached.obj `if test -f 'Cached.cc'; then $(CYGPATH_W) 'Cached.cc'; else $(CYGPATH_W) '$(srcdir)/Cached.cc'; fi`
+
+lib_libUtil_a-Grib.o: Grib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Grib.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Grib.Tpo -c -o lib_libUtil_a-Grib.o `test -f 'Grib.cc' || echo '$(srcdir)/'`Grib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Grib.Tpo $(DEPDIR)/lib_libUtil_a-Grib.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Grib.cc' object='lib_libUtil_a-Grib.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Grib.o `test -f 'Grib.cc' || echo '$(srcdir)/'`Grib.cc
+
+lib_libUtil_a-Grib.obj: Grib.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Grib.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Grib.Tpo -c -o lib_libUtil_a-Grib.obj `if test -f 'Grib.cc'; then $(CYGPATH_W) 'Grib.cc'; else $(CYGPATH_W) '$(srcdir)/Grib.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Grib.Tpo $(DEPDIR)/lib_libUtil_a-Grib.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Grib.cc' object='lib_libUtil_a-Grib.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Grib.obj `if test -f 'Grib.cc'; then $(CYGPATH_W) 'Grib.cc'; else $(CYGPATH_W) '$(srcdir)/Grib.cc'; fi`
+
+lib_libUtil_a-GribMetaData.o: GribMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-GribMetaData.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-GribMetaData.Tpo -c -o lib_libUtil_a-GribMetaData.o `test -f 'GribMetaData.cc' || echo '$(srcdir)/'`GribMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-GribMetaData.Tpo $(DEPDIR)/lib_libUtil_a-GribMetaData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribMetaData.cc' object='lib_libUtil_a-GribMetaData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-GribMetaData.o `test -f 'GribMetaData.cc' || echo '$(srcdir)/'`GribMetaData.cc
+
+lib_libUtil_a-GribMetaData.obj: GribMetaData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-GribMetaData.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-GribMetaData.Tpo -c -o lib_libUtil_a-GribMetaData.obj `if test -f 'GribMetaData.cc'; then $(CYGPATH_W) 'GribMetaData.cc'; else $(CYGPATH_W) '$(srcdir)/GribMetaData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-GribMetaData.Tpo $(DEPDIR)/lib_libUtil_a-GribMetaData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribMetaData.cc' object='lib_libUtil_a-GribMetaData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-GribMetaData.obj `if test -f 'GribMetaData.cc'; then $(CYGPATH_W) 'GribMetaData.cc'; else $(CYGPATH_W) '$(srcdir)/GribMetaData.cc'; fi`
+
+lib_libUtil_a-LogHandler.o: LogHandler.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-LogHandler.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-LogHandler.Tpo -c -o lib_libUtil_a-LogHandler.o `test -f 'LogHandler.cc' || echo '$(srcdir)/'`LogHandler.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-LogHandler.Tpo $(DEPDIR)/lib_libUtil_a-LogHandler.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LogHandler.cc' object='lib_libUtil_a-LogHandler.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-LogHandler.o `test -f 'LogHandler.cc' || echo '$(srcdir)/'`LogHandler.cc
+
+lib_libUtil_a-LogHandler.obj: LogHandler.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-LogHandler.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-LogHandler.Tpo -c -o lib_libUtil_a-LogHandler.obj `if test -f 'LogHandler.cc'; then $(CYGPATH_W) 'LogHandler.cc'; else $(CYGPATH_W) '$(srcdir)/LogHandler.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-LogHandler.Tpo $(DEPDIR)/lib_libUtil_a-LogHandler.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='LogHandler.cc' object='lib_libUtil_a-LogHandler.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-LogHandler.obj `if test -f 'LogHandler.cc'; then $(CYGPATH_W) 'LogHandler.cc'; else $(CYGPATH_W) '$(srcdir)/LogHandler.cc'; fi`
+
+lib_libUtil_a-MtInputEvent.o: MtInputEvent.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MtInputEvent.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MtInputEvent.Tpo -c -o lib_libUtil_a-MtInputEvent.o `test -f 'MtInputEvent.cc' || echo '$(srcdir)/'`MtInputEvent.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MtInputEvent.Tpo $(DEPDIR)/lib_libUtil_a-MtInputEvent.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MtInputEvent.cc' object='lib_libUtil_a-MtInputEvent.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MtInputEvent.o `test -f 'MtInputEvent.cc' || echo '$(srcdir)/'`MtInputEvent.cc
+
+lib_libUtil_a-MtInputEvent.obj: MtInputEvent.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MtInputEvent.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MtInputEvent.Tpo -c -o lib_libUtil_a-MtInputEvent.obj `if test -f 'MtInputEvent.cc'; then $(CYGPATH_W) 'MtInputEvent.cc'; else $(CYGPATH_W) '$(srcdir)/MtInputEvent.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MtInputEvent.Tpo $(DEPDIR)/lib_libUtil_a-MtInputEvent.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MtInputEvent.cc' object='lib_libUtil_a-MtInputEvent.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MtInputEvent.obj `if test -f 'MtInputEvent.cc'; then $(CYGPATH_W) 'MtInputEvent.cc'; else $(CYGPATH_W) '$(srcdir)/MtInputEvent.cc'; fi`
+
+lib_libUtil_a-MvAlmostObsoleteRequest.o: MvAlmostObsoleteRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvAlmostObsoleteRequest.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Tpo -c -o lib_libUtil_a-MvAlmostObsoleteRequest.o `test -f 'MvAlmostObsoleteRequest.cc' || echo '$(srcdir)/'`MvAlmostObsoleteRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Tpo $(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvAlmostObsoleteRequest.cc' object='lib_libUtil_a-MvAlmostObsoleteRequest.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvAlmostObsoleteRequest.o `test -f 'MvAlmostObsoleteRequest.cc' || echo '$(srcdir)/'`MvAlmostObsoleteRequest.cc
+
+lib_libUtil_a-MvAlmostObsoleteRequest.obj: MvAlmostObsoleteRequest.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvAlmostObsoleteRequest.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Tpo -c -o lib_libUtil_a-MvAlmostObsoleteRequest.obj `if test -f 'MvAlmostObsoleteRequest.cc'; then $(CYGPATH_W) 'MvAlmostObsoleteRequest.cc'; else $(CYGPATH_W) '$(srcdir)/MvAlmostObsoleteRequest.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Tpo $(DEPDIR)/lib_libUtil_a-MvAlmostObsoleteRequest.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvAlmostObsoleteRequest.cc' object='lib_libUtil_a-MvAlmostObsoleteRequest.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvAlmostObsoleteRequest.obj `if test -f 'MvAlmostObsoleteRequest.cc'; then $(CYGPATH_W) 'MvAlmostObsoleteRequest.cc'; else $(CYGPATH_W) '$(srcdir)/MvAlmostObsoleteRequest.cc'; fi`
+
+lib_libUtil_a-MvElement.o: MvElement.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvElement.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvElement.Tpo -c -o lib_libUtil_a-MvElement.o `test -f 'MvElement.cc' || echo '$(srcdir)/'`MvElement.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvElement.Tpo $(DEPDIR)/lib_libUtil_a-MvElement.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvElement.cc' object='lib_libUtil_a-MvElement.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvElement.o `test -f 'MvElement.cc' || echo '$(srcdir)/'`MvElement.cc
+
+lib_libUtil_a-MvElement.obj: MvElement.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvElement.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvElement.Tpo -c -o lib_libUtil_a-MvElement.obj `if test -f 'MvElement.cc'; then $(CYGPATH_W) 'MvElement.cc'; else $(CYGPATH_W) '$(srcdir)/MvElement.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvElement.Tpo $(DEPDIR)/lib_libUtil_a-MvElement.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvElement.cc' object='lib_libUtil_a-MvElement.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvElement.obj `if test -f 'MvElement.cc'; then $(CYGPATH_W) 'MvElement.cc'; else $(CYGPATH_W) '$(srcdir)/MvElement.cc'; fi`
+
+lib_libUtil_a-MvException.o: MvException.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvException.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvException.Tpo -c -o lib_libUtil_a-MvException.o `test -f 'MvException.cc' || echo '$(srcdir)/'`MvException.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvException.Tpo $(DEPDIR)/lib_libUtil_a-MvException.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvException.cc' object='lib_libUtil_a-MvException.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvException.o `test -f 'MvException.cc' || echo '$(srcdir)/'`MvException.cc
+
+lib_libUtil_a-MvException.obj: MvException.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvException.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvException.Tpo -c -o lib_libUtil_a-MvException.obj `if test -f 'MvException.cc'; then $(CYGPATH_W) 'MvException.cc'; else $(CYGPATH_W) '$(srcdir)/MvException.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvException.Tpo $(DEPDIR)/lib_libUtil_a-MvException.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvException.cc' object='lib_libUtil_a-MvException.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvException.obj `if test -f 'MvException.cc'; then $(CYGPATH_W) 'MvException.cc'; else $(CYGPATH_W) '$(srcdir)/MvException.cc'; fi`
+
+lib_libUtil_a-MvFileInfo.o: MvFileInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvFileInfo.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvFileInfo.Tpo -c -o lib_libUtil_a-MvFileInfo.o `test -f 'MvFileInfo.cc' || echo '$(srcdir)/'`MvFileInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvFileInfo.Tpo $(DEPDIR)/lib_libUtil_a-MvFileInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvFileInfo.cc' object='lib_libUtil_a-MvFileInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvFileInfo.o `test -f 'MvFileInfo.cc' || echo '$(srcdir)/'`MvFileInfo.cc
+
+lib_libUtil_a-MvFileInfo.obj: MvFileInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvFileInfo.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvFileInfo.Tpo -c -o lib_libUtil_a-MvFileInfo.obj `if test -f 'MvFileInfo.cc'; then $(CYGPATH_W) 'MvFileInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MvFileInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvFileInfo.Tpo $(DEPDIR)/lib_libUtil_a-MvFileInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvFileInfo.cc' object='lib_libUtil_a-MvFileInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvFileInfo.obj `if test -f 'MvFileInfo.cc'; then $(CYGPATH_W) 'MvFileInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MvFileInfo.cc'; fi`
+
+lib_libUtil_a-MvFlextra.o: MvFlextra.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvFlextra.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvFlextra.Tpo -c -o lib_libUtil_a-MvFlextra.o `test -f 'MvFlextra.cc' || echo '$(srcdir)/'`MvFlextra.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvFlextra.Tpo $(DEPDIR)/lib_libUtil_a-MvFlextra.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvFlextra.cc' object='lib_libUtil_a-MvFlextra.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvFlextra.o `test -f 'MvFlextra.cc' || echo '$(srcdir)/'`MvFlextra.cc
+
+lib_libUtil_a-MvFlextra.obj: MvFlextra.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvFlextra.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvFlextra.Tpo -c -o lib_libUtil_a-MvFlextra.obj `if test -f 'MvFlextra.cc'; then $(CYGPATH_W) 'MvFlextra.cc'; else $(CYGPATH_W) '$(srcdir)/MvFlextra.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvFlextra.Tpo $(DEPDIR)/lib_libUtil_a-MvFlextra.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvFlextra.cc' object='lib_libUtil_a-MvFlextra.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvFlextra.obj `if test -f 'MvFlextra.cc'; then $(CYGPATH_W) 'MvFlextra.cc'; else $(CYGPATH_W) '$(srcdir)/MvFlextra.cc'; fi`
+
+lib_libUtil_a-MvKeyProfile.o: MvKeyProfile.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvKeyProfile.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvKeyProfile.Tpo -c -o lib_libUtil_a-MvKeyProfile.o `test -f 'MvKeyProfile.cc' || echo '$(srcdir)/'`MvKeyProfile.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvKeyProfile.Tpo $(DEPDIR)/lib_libUtil_a-MvKeyProfile.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvKeyProfile.cc' object='lib_libUtil_a-MvKeyProfile.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvKeyProfile.o `test -f 'MvKeyProfile.cc' || echo '$(srcdir)/'`MvKeyProfile.cc
+
+lib_libUtil_a-MvKeyProfile.obj: MvKeyProfile.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvKeyProfile.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvKeyProfile.Tpo -c -o lib_libUtil_a-MvKeyProfile.obj `if test -f 'MvKeyProfile.cc'; then $(CYGPATH_W) 'MvKeyProfile.cc'; else $(CYGPATH_W) '$(srcdir)/MvKeyProfile.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvKeyProfile.Tpo $(DEPDIR)/lib_libUtil_a-MvKeyProfile.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvKeyProfile.cc' object='lib_libUtil_a-MvKeyProfile.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvKeyProfile.obj `if test -f 'MvKeyProfile.cc'; then $(CYGPATH_W) 'MvKeyProfile.cc'; else $(CYGPATH_W) '$(srcdir)/MvKeyProfile.cc'; fi`
+
+lib_libUtil_a-MvKeyManager.o: MvKeyManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvKeyManager.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvKeyManager.Tpo -c -o lib_libUtil_a-MvKeyManager.o `test -f 'MvKeyManager.cc' || echo '$(srcdir)/'`MvKeyManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvKeyManager.Tpo $(DEPDIR)/lib_libUtil_a-MvKeyManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvKeyManager.cc' object='lib_libUtil_a-MvKeyManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvKeyManager.o `test -f 'MvKeyManager.cc' || echo '$(srcdir)/'`MvKeyManager.cc
+
+lib_libUtil_a-MvKeyManager.obj: MvKeyManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvKeyManager.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvKeyManager.Tpo -c -o lib_libUtil_a-MvKeyManager.obj `if test -f 'MvKeyManager.cc'; then $(CYGPATH_W) 'MvKeyManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvKeyManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvKeyManager.Tpo $(DEPDIR)/lib_libUtil_a-MvKeyManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvKeyManager.cc' object='lib_libUtil_a-MvKeyManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvKeyManager.obj `if test -f 'MvKeyManager.cc'; then $(CYGPATH_W) 'MvKeyManager.cc'; else $(CYGPATH_W) '$(srcdir)/MvKeyManager.cc'; fi`
+
+lib_libUtil_a-MvList.o: MvList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvList.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvList.Tpo -c -o lib_libUtil_a-MvList.o `test -f 'MvList.cc' || echo '$(srcdir)/'`MvList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvList.Tpo $(DEPDIR)/lib_libUtil_a-MvList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvList.cc' object='lib_libUtil_a-MvList.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvList.o `test -f 'MvList.cc' || echo '$(srcdir)/'`MvList.cc
+
+lib_libUtil_a-MvList.obj: MvList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvList.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvList.Tpo -c -o lib_libUtil_a-MvList.obj `if test -f 'MvList.cc'; then $(CYGPATH_W) 'MvList.cc'; else $(CYGPATH_W) '$(srcdir)/MvList.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvList.Tpo $(DEPDIR)/lib_libUtil_a-MvList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvList.cc' object='lib_libUtil_a-MvList.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvList.obj `if test -f 'MvList.cc'; then $(CYGPATH_W) 'MvList.cc'; else $(CYGPATH_W) '$(srcdir)/MvList.cc'; fi`
+
+lib_libUtil_a-MvMiscelaneous.o: MvMiscelaneous.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvMiscelaneous.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Tpo -c -o lib_libUtil_a-MvMiscelaneous.o `test -f 'MvMiscelaneous.cc' || echo '$(srcdir)/'`MvMiscelaneous.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Tpo $(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMiscelaneous.cc' object='lib_libUtil_a-MvMiscelaneous.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvMiscelaneous.o `test -f 'MvMiscelaneous.cc' || echo '$(srcdir)/'`MvMiscelaneous.cc
+
+lib_libUtil_a-MvMiscelaneous.obj: MvMiscelaneous.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvMiscelaneous.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Tpo -c -o lib_libUtil_a-MvMiscelaneous.obj `if test -f 'MvMiscelaneous.cc'; then $(CYGPATH_W) 'MvMiscelaneous.cc'; else $(CYGPATH_W) '$(srcdir)/MvMiscelaneous.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Tpo $(DEPDIR)/lib_libUtil_a-MvMiscelaneous.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMiscelaneous.cc' object='lib_libUtil_a-MvMiscelaneous.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvMiscelaneous.obj `if test -f 'MvMiscelaneous.cc'; then $(CYGPATH_W) 'MvMiscelaneous.cc'; else $(CYGPATH_W) '$(srcdir)/MvMiscelaneous.cc'; fi`
+
+lib_libUtil_a-MvPath.o: MvPath.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvPath.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvPath.Tpo -c -o lib_libUtil_a-MvPath.o `test -f 'MvPath.cc' || echo '$(srcdir)/'`MvPath.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvPath.Tpo $(DEPDIR)/lib_libUtil_a-MvPath.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvPath.cc' object='lib_libUtil_a-MvPath.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvPath.o `test -f 'MvPath.cc' || echo '$(srcdir)/'`MvPath.cc
+
+lib_libUtil_a-MvPath.obj: MvPath.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvPath.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvPath.Tpo -c -o lib_libUtil_a-MvPath.obj `if test -f 'MvPath.cc'; then $(CYGPATH_W) 'MvPath.cc'; else $(CYGPATH_W) '$(srcdir)/MvPath.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvPath.Tpo $(DEPDIR)/lib_libUtil_a-MvPath.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvPath.cc' object='lib_libUtil_a-MvPath.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvPath.obj `if test -f 'MvPath.cc'; then $(CYGPATH_W) 'MvPath.cc'; else $(CYGPATH_W) '$(srcdir)/MvPath.cc'; fi`
+
+lib_libUtil_a-MvProfileData.o: MvProfileData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvProfileData.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvProfileData.Tpo -c -o lib_libUtil_a-MvProfileData.o `test -f 'MvProfileData.cc' || echo '$(srcdir)/'`MvProfileData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvProfileData.Tpo $(DEPDIR)/lib_libUtil_a-MvProfileData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvProfileData.cc' object='lib_libUtil_a-MvProfileData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvProfileData.o `test -f 'MvProfileData.cc' || echo '$(srcdir)/'`MvProfileData.cc
+
+lib_libUtil_a-MvProfileData.obj: MvProfileData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvProfileData.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvProfileData.Tpo -c -o lib_libUtil_a-MvProfileData.obj `if test -f 'MvProfileData.cc'; then $(CYGPATH_W) 'MvProfileData.cc'; else $(CYGPATH_W) '$(srcdir)/MvProfileData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvProfileData.Tpo $(DEPDIR)/lib_libUtil_a-MvProfileData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvProfileData.cc' object='lib_libUtil_a-MvProfileData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvProfileData.obj `if test -f 'MvProfileData.cc'; then $(CYGPATH_W) 'MvProfileData.cc'; else $(CYGPATH_W) '$(srcdir)/MvProfileData.cc'; fi`
+
+lib_libUtil_a-MvRequestUtil.o: MvRequestUtil.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvRequestUtil.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvRequestUtil.Tpo -c -o lib_libUtil_a-MvRequestUtil.o `test -f 'MvRequestUtil.cc' || echo '$(srcdir)/'`MvRequestUtil.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvRequestUtil.Tpo $(DEPDIR)/lib_libUtil_a-MvRequestUtil.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvRequestUtil.cc' object='lib_libUtil_a-MvRequestUtil.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvRequestUtil.o `test -f 'MvRequestUtil.cc' || echo '$(srcdir)/'`MvRequestUtil.cc
+
+lib_libUtil_a-MvRequestUtil.obj: MvRequestUtil.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvRequestUtil.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvRequestUtil.Tpo -c -o lib_libUtil_a-MvRequestUtil.obj `if test -f 'MvRequestUtil.cc'; then $(CYGPATH_W) 'MvRequestUtil.cc'; else $(CYGPATH_W) '$(srcdir)/MvRequestUtil.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvRequestUtil.Tpo $(DEPDIR)/lib_libUtil_a-MvRequestUtil.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvRequestUtil.cc' object='lib_libUtil_a-MvRequestUtil.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvRequestUtil.obj `if test -f 'MvRequestUtil.cc'; then $(CYGPATH_W) 'MvRequestUtil.cc'; else $(CYGPATH_W) '$(srcdir)/MvRequestUtil.cc'; fi`
+
+lib_libUtil_a-MvScm.o: MvScm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvScm.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvScm.Tpo -c -o lib_libUtil_a-MvScm.o `test -f 'MvScm.cc' || echo '$(srcdir)/'`MvScm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvScm.Tpo $(DEPDIR)/lib_libUtil_a-MvScm.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvScm.cc' object='lib_libUtil_a-MvScm.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvScm.o `test -f 'MvScm.cc' || echo '$(srcdir)/'`MvScm.cc
+
+lib_libUtil_a-MvScm.obj: MvScm.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvScm.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvScm.Tpo -c -o lib_libUtil_a-MvScm.obj `if test -f 'MvScm.cc'; then $(CYGPATH_W) 'MvScm.cc'; else $(CYGPATH_W) '$(srcdir)/MvScm.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvScm.Tpo $(DEPDIR)/lib_libUtil_a-MvScm.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvScm.cc' object='lib_libUtil_a-MvScm.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvScm.obj `if test -f 'MvScm.cc'; then $(CYGPATH_W) 'MvScm.cc'; else $(CYGPATH_W) '$(srcdir)/MvScm.cc'; fi`
+
+lib_libUtil_a-MvStopWatch.o: MvStopWatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvStopWatch.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvStopWatch.Tpo -c -o lib_libUtil_a-MvStopWatch.o `test -f 'MvStopWatch.cc' || echo '$(srcdir)/'`MvStopWatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvStopWatch.Tpo $(DEPDIR)/lib_libUtil_a-MvStopWatch.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvStopWatch.cc' object='lib_libUtil_a-MvStopWatch.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvStopWatch.o `test -f 'MvStopWatch.cc' || echo '$(srcdir)/'`MvStopWatch.cc
+
+lib_libUtil_a-MvStopWatch.obj: MvStopWatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvStopWatch.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvStopWatch.Tpo -c -o lib_libUtil_a-MvStopWatch.obj `if test -f 'MvStopWatch.cc'; then $(CYGPATH_W) 'MvStopWatch.cc'; else $(CYGPATH_W) '$(srcdir)/MvStopWatch.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvStopWatch.Tpo $(DEPDIR)/lib_libUtil_a-MvStopWatch.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvStopWatch.cc' object='lib_libUtil_a-MvStopWatch.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvStopWatch.obj `if test -f 'MvStopWatch.cc'; then $(CYGPATH_W) 'MvStopWatch.cc'; else $(CYGPATH_W) '$(srcdir)/MvStopWatch.cc'; fi`
+
+lib_libUtil_a-MvVersionInfo.o: MvVersionInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvVersionInfo.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvVersionInfo.Tpo -c -o lib_libUtil_a-MvVersionInfo.o `test -f 'MvVersionInfo.cc' || echo '$(srcdir)/'`MvVersionInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvVersionInfo.Tpo $(DEPDIR)/lib_libUtil_a-MvVersionInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvVersionInfo.cc' object='lib_libUtil_a-MvVersionInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvVersionInfo.o `test -f 'MvVersionInfo.cc' || echo '$(srcdir)/'`MvVersionInfo.cc
+
+lib_libUtil_a-MvVersionInfo.obj: MvVersionInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvVersionInfo.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvVersionInfo.Tpo -c -o lib_libUtil_a-MvVersionInfo.obj `if test -f 'MvVersionInfo.cc'; then $(CYGPATH_W) 'MvVersionInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MvVersionInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvVersionInfo.Tpo $(DEPDIR)/lib_libUtil_a-MvVersionInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvVersionInfo.cc' object='lib_libUtil_a-MvVersionInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvVersionInfo.obj `if test -f 'MvVersionInfo.cc'; then $(CYGPATH_W) 'MvVersionInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MvVersionInfo.cc'; fi`
+
+lib_libUtil_a-Point.o: Point.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Point.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Point.Tpo -c -o lib_libUtil_a-Point.o `test -f 'Point.cc' || echo '$(srcdir)/'`Point.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Point.Tpo $(DEPDIR)/lib_libUtil_a-Point.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Point.cc' object='lib_libUtil_a-Point.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Point.o `test -f 'Point.cc' || echo '$(srcdir)/'`Point.cc
+
+lib_libUtil_a-Point.obj: Point.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Point.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Point.Tpo -c -o lib_libUtil_a-Point.obj `if test -f 'Point.cc'; then $(CYGPATH_W) 'Point.cc'; else $(CYGPATH_W) '$(srcdir)/Point.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Point.Tpo $(DEPDIR)/lib_libUtil_a-Point.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Point.cc' object='lib_libUtil_a-Point.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Point.obj `if test -f 'Point.cc'; then $(CYGPATH_W) 'Point.cc'; else $(CYGPATH_W) '$(srcdir)/Point.cc'; fi`
+
+lib_libUtil_a-proj_braz.o: proj_braz.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-proj_braz.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-proj_braz.Tpo -c -o lib_libUtil_a-proj_braz.o `test -f 'proj_braz.cc' || echo '$(srcdir)/'`proj_braz.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-proj_braz.Tpo $(DEPDIR)/lib_libUtil_a-proj_braz.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='proj_braz.cc' object='lib_libUtil_a-proj_braz.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-proj_braz.o `test -f 'proj_braz.cc' || echo '$(srcdir)/'`proj_braz.cc
+
+lib_libUtil_a-proj_braz.obj: proj_braz.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-proj_braz.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-proj_braz.Tpo -c -o lib_libUtil_a-proj_braz.obj `if test -f 'proj_braz.cc'; then $(CYGPATH_W) 'proj_braz.cc'; else $(CYGPATH_W) '$(srcdir)/proj_braz.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-proj_braz.Tpo $(DEPDIR)/lib_libUtil_a-proj_braz.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='proj_braz.cc' object='lib_libUtil_a-proj_braz.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-proj_braz.obj `if test -f 'proj_braz.cc'; then $(CYGPATH_W) 'proj_braz.cc'; else $(CYGPATH_W) '$(srcdir)/proj_braz.cc'; fi`
+
+lib_libUtil_a-Request.o: Request.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Request.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Request.Tpo -c -o lib_libUtil_a-Request.o `test -f 'Request.cc' || echo '$(srcdir)/'`Request.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Request.Tpo $(DEPDIR)/lib_libUtil_a-Request.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Request.cc' object='lib_libUtil_a-Request.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Request.o `test -f 'Request.cc' || echo '$(srcdir)/'`Request.cc
+
+lib_libUtil_a-Request.obj: Request.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Request.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Request.Tpo -c -o lib_libUtil_a-Request.obj `if test -f 'Request.cc'; then $(CYGPATH_W) 'Request.cc'; else $(CYGPATH_W) '$(srcdir)/Request.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Request.Tpo $(DEPDIR)/lib_libUtil_a-Request.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Request.cc' object='lib_libUtil_a-Request.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Request.obj `if test -f 'Request.cc'; then $(CYGPATH_W) 'Request.cc'; else $(CYGPATH_W) '$(srcdir)/Request.cc'; fi`
+
+lib_libUtil_a-TableReader.o: TableReader.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-TableReader.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-TableReader.Tpo -c -o lib_libUtil_a-TableReader.o `test -f 'TableReader.cc' || echo '$(srcdir)/'`TableReader.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-TableReader.Tpo $(DEPDIR)/lib_libUtil_a-TableReader.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TableReader.cc' object='lib_libUtil_a-TableReader.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-TableReader.o `test -f 'TableReader.cc' || echo '$(srcdir)/'`TableReader.cc
+
+lib_libUtil_a-TableReader.obj: TableReader.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-TableReader.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-TableReader.Tpo -c -o lib_libUtil_a-TableReader.obj `if test -f 'TableReader.cc'; then $(CYGPATH_W) 'TableReader.cc'; else $(CYGPATH_W) '$(srcdir)/TableReader.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-TableReader.Tpo $(DEPDIR)/lib_libUtil_a-TableReader.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='TableReader.cc' object='lib_libUtil_a-TableReader.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-TableReader.obj `if test -f 'TableReader.cc'; then $(CYGPATH_W) 'TableReader.cc'; else $(CYGPATH_W) '$(srcdir)/TableReader.cc'; fi`
+
+lib_libUtil_a-Tokenizer.o: Tokenizer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Tokenizer.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Tokenizer.Tpo -c -o lib_libUtil_a-Tokenizer.o `test -f 'Tokenizer.cc' || echo '$(srcdir)/'`Tokenizer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Tokenizer.Tpo $(DEPDIR)/lib_libUtil_a-Tokenizer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Tokenizer.cc' object='lib_libUtil_a-Tokenizer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Tokenizer.o `test -f 'Tokenizer.cc' || echo '$(srcdir)/'`Tokenizer.cc
+
+lib_libUtil_a-Tokenizer.obj: Tokenizer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-Tokenizer.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-Tokenizer.Tpo -c -o lib_libUtil_a-Tokenizer.obj `if test -f 'Tokenizer.cc'; then $(CYGPATH_W) 'Tokenizer.cc'; else $(CYGPATH_W) '$(srcdir)/Tokenizer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-Tokenizer.Tpo $(DEPDIR)/lib_libUtil_a-Tokenizer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Tokenizer.cc' object='lib_libUtil_a-Tokenizer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-Tokenizer.obj `if test -f 'Tokenizer.cc'; then $(CYGPATH_W) 'Tokenizer.cc'; else $(CYGPATH_W) '$(srcdir)/Tokenizer.cc'; fi`
+
+lib_libUtil_a-MvOdb.o: MvOdb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvOdb.o -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvOdb.Tpo -c -o lib_libUtil_a-MvOdb.o `test -f 'MvOdb.cc' || echo '$(srcdir)/'`MvOdb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvOdb.Tpo $(DEPDIR)/lib_libUtil_a-MvOdb.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvOdb.cc' object='lib_libUtil_a-MvOdb.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvOdb.o `test -f 'MvOdb.cc' || echo '$(srcdir)/'`MvOdb.cc
+
+lib_libUtil_a-MvOdb.obj: MvOdb.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lib_libUtil_a-MvOdb.obj -MD -MP -MF $(DEPDIR)/lib_libUtil_a-MvOdb.Tpo -c -o lib_libUtil_a-MvOdb.obj `if test -f 'MvOdb.cc'; then $(CYGPATH_W) 'MvOdb.cc'; else $(CYGPATH_W) '$(srcdir)/MvOdb.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/lib_libUtil_a-MvOdb.Tpo $(DEPDIR)/lib_libUtil_a-MvOdb.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvOdb.cc' object='lib_libUtil_a-MvOdb.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libUtil_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lib_libUtil_a-MvOdb.obj `if test -f 'MvOdb.cc'; then $(CYGPATH_W) 'MvOdb.cc'; else $(CYGPATH_W) '$(srcdir)/MvOdb.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+lib:
+	ln -s ../../lib lib
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/libUtil/MtInputEvent.cc b/src/libUtil/MtInputEvent.cc
new file mode 100644
index 0000000..273b85e
--- /dev/null
+++ b/src/libUtil/MtInputEvent.cc
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MtInputEvent.h>
+
+MtInputEvent::MtInputEvent() :
+	type_(Mt::NoEvent)
+{
+	//empty
+}
+
+
+MtMouseEvent::MtMouseEvent() :
+	button_(Mt::NoButton),
+	x_ (0),
+	y_(0)
+{
+	//empty
+}
+
+MtKeyEvent::MtKeyEvent() :
+	key_(Mt::Key_Unknown)
+{
+	//empty
+}
\ No newline at end of file
diff --git a/src/libUtil/MtInputEvent.h b/src/libUtil/MtInputEvent.h
new file mode 100644
index 0000000..179a625
--- /dev/null
+++ b/src/libUtil/MtInputEvent.h
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MtInputEvent_H
+#define MtInputEvent_H
+
+#include <iostream>
+
+using namespace std;
+
+namespace Mt
+{
+enum InputEvent {NoEvent,MousePressEvent,MouseMoveEvent,MouseReleaseEvent, 
+                       KeyPressEvent, KeyReleaseEvent};
+enum MouseButton {NoButton=0, LeftButton=1, RightButton=2, MidButton=4};
+enum Key {Key_Unknown,Key_Left,Key_Up,Key_Right,Key_Down};
+
+};
+
+class MtInputEvent
+{
+public:	
+	MtInputEvent();
+	//MtInputEvent(MtInputEvent&);
+	
+	void setType(Mt::InputEvent t) {type_=t;}
+	Mt::InputEvent type() const {return type_;}
+
+protected:
+	Mt::InputEvent type_;
+};
+
+
+class MtMouseEvent : public MtInputEvent
+{
+public:	
+	MtMouseEvent();
+	//MtMouseEvent(MtMouseEvent&);
+
+	int x() {return x_;};
+	int y() {return y_;};
+	int button() {return button_;};
+	
+	void setX(int i) {x_=i;};
+	void setY(int i) {y_=i;};
+	void setButton(Mt::MouseButton i) {button_= button_ | i;};
+
+private: 
+	int button_;
+	int x_;
+	int y_;
+};
+
+
+class MtKeyEvent : public MtInputEvent
+{
+public:	
+	MtKeyEvent();
+	//MtKeyEvent(MtKeyEvent&);
+
+	Mt::Key key() const {return key_;}
+	void setKey(Mt::Key k) {key_=k;}
+
+	string text () const {return text_;}
+	void setText(string s) {text_=s;}
+
+private: 
+	Mt::Key key_;
+	string text_;
+};
+
+
+
+
+#endif
diff --git a/src/libUtil/MvAlmostObsoleteRequest.cc b/src/libUtil/MvAlmostObsoleteRequest.cc
new file mode 100644
index 0000000..cf53a4d
--- /dev/null
+++ b/src/libUtil/MvAlmostObsoleteRequest.cc
@@ -0,0 +1,217 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvAlmostObsoleteRequest.hpp"
+#include "DataTools.hpp"
+
+static MvList Requests;
+
+void DataGenNewStatus	(svcid *id, request *r, void* data);
+void DataGenServe	(svcid *id, request *r, void* data);
+void DataGenReply	(svcid* id, request *r, void* data);
+
+
+//======================================================================
+//==== (file ./src/Util/MvRequest appended here to prevent messing up
+//==== with class MvRequest in ./src/Metview!)
+//==== Then later 010508 original part of the file was moved to
+//==== src/AppMod (because of IBM compilation problems) and
+//==== this remaining was renamed as MvAlmostObsoleteRequest.cc.
+
+
+MvDataGen :: MvDataGen (svcid *i,request* r, const char* typ)
+{
+	datatype = strdup (typ);
+	req = clone_all_requests(r);
+	setElemCode ((long)req); //-- 'hpcd' C++ fails with 'int' cast
+	id = i;
+	tasks = 0;
+
+// Generate the temporary file name where result will be written
+
+	datafile = tempnam (NULL,request_verb(req));
+	unlink (datafile);
+	set_value (req,"PATH","%s", datafile);
+
+	const char* tmp;
+	if (tmp = get_value (req, "_NAME", 0))
+		setElemName (tmp);
+	else
+		setElemName (datafile);
+
+}
+
+MvDataGen :: MvDataGen (svcid *i, MvDataGen* mdg)
+{
+	datatype = strdup (mdg->datatype);
+	datafile = strdup (mdg->datafile);
+
+	req = NULL;
+	setElemCode (mdg->getElemCode ());
+	id = i;
+	tasks = 0;
+
+	setElemName (mdg->getElemName ());
+}
+
+int MvDataGen :: Ready ()
+{
+	if (datafile)
+	{
+		if (access (datafile, F_OK))
+		{
+			marslog(LOG_INFO,"File %s has not been created yet !",datafile);
+			return 0;
+		}
+		else
+			return 1;
+	}
+
+	return 0;
+}
+
+void MvDataGen :: DeleteFile ()
+{
+	if (datafile)
+	{
+		unlink (datafile);
+		marslog(LOG_INFO,"~MvDataVis deleting %s",datafile);
+	}
+}
+
+MvDataGen :: ~MvDataGen ()
+{
+
+	if (req) free_all_requests (req);
+	delete datatype;
+	delete datafile;
+}
+
+void
+MvDataGen :: SendStatus (const char* st)
+{
+	request* status = empty_request ("STATUS");
+	const char* tmp;
+
+	set_value (status, "STATUS", "%s", st);
+	if (tmp = get_value (req, "_NAME", 0))
+		set_value (status, "NAME", "%s", tmp);
+
+	if (tmp = get_value (req, "_ICON_CLASS", 0))
+		set_value (status, "ICON_CLASS", "%s", tmp);
+
+	send_message (id->s, status);
+	free_all_requests (status);
+}
+
+void
+MvDataGen :: SendReply (err status)
+{
+	set_svc_err (id,status);	
+	request*	reply = NULL;
+
+	if (status == 0)
+	{
+// Build the reply request.
+
+		reply = empty_request (datatype);
+		set_value(reply, "PATH", "%s", datafile);
+		set_value(reply, "TEMPORARY", "1");
+		pool_store (id->s, getElemName (), "DATA", reply);
+
+		char name1[132];
+		sprintf (name1, "%sINP",getElemName ());
+		pool_link(id->s, name1, getElemName ());
+
+		print_all_requests(reply);
+
+	}
+
+	send_reply(id, reply);
+	free_all_requests(reply);
+}
+
+MvDataVis :: MvDataVis (svcid *i,request* r)
+{
+	req = clone_all_requests(r);
+	setElemCode ((long)req); //-- 'hpcd' C++ fails with 'int' cast
+	id = i;
+	tasks = 0;
+
+// Generate the temporary file name where result will be written
+
+	char* 	tmpfile = tempnam (NULL,request_verb(req));
+	set_value (req, "PATH", "%s",tmpfile);
+	unlink (tmpfile);
+
+	const char* tmp;
+	if (tmp = get_value (req, "_LOT_NAME", 0))
+		setElemName (tmp);
+	else
+		setElemName (tmpfile);
+
+	if (tmp = get_value (req, "_LOT_COUNT", 0))
+		tasks = atoi (tmp);
+
+// Build the reply request.
+
+	reply = empty_request ("");
+
+	if (tmp = get_value(req, "_DROP_ID", 0))
+ 		set_value(reply, "_DROP_ID", "%s",tmp);
+
+	delete tmpfile;
+}
+
+MvDataVis :: ~MvDataVis ()
+{
+	const char* tmpfile = get_value (req, "PATH", 0);
+
+	if (tmpfile)
+	{
+		unlink (tmpfile);
+		marslog(LOG_INFO,"~MvDataVis deleting %s",tmpfile);
+	}
+
+	free_all_requests (req);
+	free_all_requests (reply);
+}
+
+void
+MvDataVis :: SendStatus (const char* st)
+{
+	request* status = empty_request ("STATUS");
+	const char* tmp;
+
+	set_value (status, "STATUS", "%s", st);
+	if (tmp = get_value (req, "_NAME", 0))
+		set_value (status, "NAME", "%s", tmp);
+
+	if (tmp = get_value (req, "_ICON_CLASS", 0))
+		set_value (status, "ICON_CLASS", "%s", tmp);
+
+	send_message (id->s, status);
+	free_all_requests (status);
+}
+
+void
+MvDataVis :: SendReply (err status)
+{
+	set_svc_err(id,status);	
+
+	if (status == 0)
+	{
+
+// Send data visualisation request to corresponding service
+
+	}
+
+	send_reply(id, reply->next);
+
+}
diff --git a/src/libUtil/MvAlmostObsoleteRequest.hpp b/src/libUtil/MvAlmostObsoleteRequest.hpp
new file mode 100644
index 0000000..8acc707
--- /dev/null
+++ b/src/libUtil/MvAlmostObsoleteRequest.hpp
@@ -0,0 +1,53 @@
+#ifndef MvAlmostObsoleteReqDEFINED
+#define MvAlmostObsoleteReqDEFINED
+
+
+//========================================================================
+//== following stuff used to in a file 'MvRequest.hpp'.  It was appended
+//== into file DataGen.hpp because ./src/Metview/include contains a file
+//== with same name and MvRequest class!  Then 010508 original part of
+//== the file was moved to src/AppMod (because of IBM compilation problems)
+//== and this remaining was renamed as MvAlmostObsoleteRequest.hpp.
+
+#include "mars.h"
+#include "MvList.hpp"
+
+class MvDataGen : public MvElement
+{
+public :
+	request*	req;
+	svcid*		id;
+	int		tasks;
+	char*		datatype;
+	char*		datafile;
+	MvDataGen () {}
+	MvDataGen (svcid *, request*, const char*);
+	MvDataGen (svcid *, MvDataGen*);
+	~MvDataGen ();
+	void SendStatus (const char*);
+	void SendReply (err);
+	void DeleteFile ();
+	const char* DataFile ();
+	int Ready ();
+	void IncTasks ( ) {tasks++; printf ("Tasks = %d\n",tasks);}
+	int  DecTasks ( ) {tasks--; printf ("Tasks = %d\n",tasks);return tasks;}
+};
+
+class MvDataVis : public MvElement
+{
+public :
+	request*	req;
+	request*	reply;
+	svcid*		id;
+	int		tasks;
+
+	MvDataVis () {}
+	MvDataVis (svcid *, request*);
+	~MvDataVis ();
+	void SendStatus (const char*);
+	void SendReply (err);
+	void Tasks (int c) {tasks = c; }
+	void IncTasks ( ) {tasks++; printf ("Tasks = %d\n",tasks);}
+	int  DecTasks ( ) {tasks--; printf ("Tasks = %d\n",tasks);return tasks;}
+};
+#endif
diff --git a/src/libUtil/MvCommandHistory.h b/src/libUtil/MvCommandHistory.h
new file mode 100644
index 0000000..3249762
--- /dev/null
+++ b/src/libUtil/MvCommandHistory.h
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvCommandHistory_H
+#define MvCommandHistory_H
+
+#include <vector>
+
+using namespace std;
+
+template <class T>
+class MvCommandHistory
+{
+public:
+	MvCommandHistory() : pos_(0) {}
+	
+	void clear();	
+        bool canRedo(); 
+	bool canUndo(); 
+	const T& undo(); 
+	const T& redo(); 
+        void add(const T&); 
+  	  
+protected:  		
+	bool isPosCorrect();
+	void removeAfterCurrent();   	
+	bool isCurrentCorrect() {return isPosCorrect();}
+	 
+	T defaultItem_;
+  	vector<T> items_;
+	int 	 pos_;
+};
+
+template <class T>
+void MvCommandHistory<T>::clear() 
+{
+	items_.clear(); 
+	pos_=0;
+}
+
+template <class T>
+bool MvCommandHistory<T>::isPosCorrect() 
+{
+	return (pos_ >=0 && pos_ < static_cast<int>(items_.size()));
+}
+
+template <class T>
+bool MvCommandHistory<T>::canRedo() 
+{ 
+	return ( pos_ >=0 && pos_ <= static_cast<int>(items_.size())-1);
+}
+
+template <class T>	
+bool MvCommandHistory<T>::canUndo() 
+{ 
+  	return (pos_ > 0 && pos_ <= static_cast<int>(items_.size()));
+}
+
+template <class T>
+const T& MvCommandHistory<T>::redo() 
+{ 
+	if(canRedo())
+	{
+	  	int actPos=pos_;
+		pos_++;
+		return items_[actPos];		
+	}
+	else
+	{
+	  	return defaultItem_;
+	}
+}
+
+template <class T>
+const T& MvCommandHistory<T>::undo() 
+{ 
+	if(canUndo())
+	{
+	  	int actPos=pos_;
+		pos_--;
+		return items_[actPos-1];		
+	}
+	else
+	{
+	  	return defaultItem_;
+	}
+}
+
+/*template <class T>
+const T& MvCommandHistory<T>::current() 
+{ 	
+  	return (isPosCorrect())?items_[pos_]:defaultItem_;
+}*/
+
+template <class T>       
+void MvCommandHistory<T>::add(const T& item)
+{
+	removeAfterCurrent();
+	items_.push_back(item); 
+	pos_=static_cast<int>(items_.size());
+}
+
+template <class T>
+void MvCommandHistory<T>::removeAfterCurrent() 
+{
+	if(isPosCorrect())
+	{	
+		while(static_cast<int>(items_.size()) > pos_)
+		{  
+		  	items_.pop_back();
+		}		
+	}	
+}
+
+#endif
\ No newline at end of file
diff --git a/src/libUtil/MvElement.cc b/src/libUtil/MvElement.cc
new file mode 100644
index 0000000..425fb30
--- /dev/null
+++ b/src/libUtil/MvElement.cc
@@ -0,0 +1,46 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvElement.hpp>
+#include <mars.h>
+
+MvElement :: MvElement (MvElement& dl)
+{
+	setElemName (dl._elem_name);
+	_elem_code = dl._elem_code;
+	_count = 0;
+}
+
+// Operator =
+
+MvElement MvElement :: operator= (MvElement &dl)
+{
+	setElemName (dl._elem_name);
+	_elem_code = dl._elem_code;
+	return *this;
+}
+
+// Set link name
+
+void MvElement :: setElemName (const char *name)
+{
+	_elem_name = name;
+}
+
+// Set both link name and code
+
+void MvElement :: setElemBoth (const char *name, int code)
+{
+	setElemName (name);
+	_elem_code = code;
+}
+
+MvElement::~MvElement()
+{
+}
diff --git a/src/libUtil/MvElement.hpp b/src/libUtil/MvElement.hpp
new file mode 100644
index 0000000..db795fe
--- /dev/null
+++ b/src/libUtil/MvElement.hpp
@@ -0,0 +1,51 @@
+#ifndef MvElement_H
+#define MvElement_H
+
+#include <stdio.h>
+#include <string.h>
+#include <Cached.h>
+
+class MvList;
+
+class MvElement
+{
+	Cached	_elem_name;
+	int		_elem_code;
+	int		_count;
+public:
+
+	MvElement () : _elem_name() { _elem_code = -1; _count = 0; }
+	MvElement (MvElement& dl);
+
+	virtual ~MvElement ();
+	//	Destructor is virtual to enable the real component to
+	//	be deleted when MvList or MvLink is deleted
+
+	virtual void callback(const char*, void* = NULL) {}; 
+	//	Define virtual callback.
+
+	void increment() { _count++; }
+	void decrement() { _count--; }
+
+//	Inquiries
+
+	inline const char* getElemName ()	{ return _elem_name; }
+	inline int getElemCode ()	{ return _elem_code; }
+	int count() { return _count; }
+
+//	Set
+
+	MvElement operator= (MvElement &dl);
+	void setElemName (const char *);
+	inline void setElemCode (int code)	{ _elem_code = code; }
+	void setElemBoth (const char *name, int code);
+
+//<*teste*>
+	void print() { if (_elem_name) printf("%s : ",(const char*)_elem_name); printf("%d\n", _elem_code); }
+
+//	Friends
+
+	friend class MvList;
+};
+
+#endif
diff --git a/src/libUtil/MvException.cc b/src/libUtil/MvException.cc
new file mode 100644
index 0000000..7792773
--- /dev/null
+++ b/src/libUtil/MvException.cc
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvException.h"
+
+#ifdef FORTRAN_NO_UNDERSCORE
+# define mvabort_ mvabort
+#endif
+
+extern "C" {
+  //-- Magics calls this one if serious error --//
+  void mvabort_(const char* msg);
+}
+
+//******************i*******
+void mvabort_(const char* msg)
+{
+    throw MvException(msg);
+}
+//**************************
+
diff --git a/src/libUtil/MvException.h b/src/libUtil/MvException.h
new file mode 100644
index 0000000..a218b7e
--- /dev/null
+++ b/src/libUtil/MvException.h
@@ -0,0 +1,28 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MVEXCEPTION_H_
+#define MVEXCEPTION_H_
+
+#include <string>
+using std::string;
+
+class MvException
+{
+ public:
+	MvException( const char* why ):what_( why ){}
+	const char* what(){ return what_.c_str(); }
+
+ protected:
+	string what_;
+};
+
+#endif
+// MVEXCEPTION_H_
+
diff --git a/src/libUtil/MvFileInfo.cc b/src/libUtil/MvFileInfo.cc
new file mode 100644
index 0000000..619258c
--- /dev/null
+++ b/src/libUtil/MvFileInfo.cc
@@ -0,0 +1,113 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <sstream>
+#include <vector>
+#include <stdio.h>
+
+#include "MvFileInfo.h"
+
+MvFileInfo::MvFileInfo(string name)
+{
+	name_=name;
+
+	string buf="ls -lhd \"" + name_ + "\"";
+
+	FILE *in;
+	char cbuf[512];
+
+	if (!(in = popen(buf.c_str(),"r")) )
+	{
+		return;
+	}
+
+	if(fgets(cbuf, sizeof(cbuf), in) == NULL)
+	{
+		pclose(in);
+		return;
+	}	
+	
+	pclose(in);
+
+	stringstream ss(cbuf); 
+    	vector<string> tokens; 
+
+   	while (ss >> buf)
+        {			
+		tokens.push_back(buf);	
+	}
+	
+	if(tokens.size() < 7)	
+	{
+		return;
+	}  
+
+	permissions_=tokens[0];
+	owner_=tokens[2];
+	group_=tokens[3];
+	//size_=tokens[4];
+	size_=sizeInBytes(name_);
+	if(size_ != "???")
+	{
+	  	size_.append("B");
+	}
+	
+	modified_=tokens[5] + " " +tokens[6] ;
+
+	if(permissions_.find("l") != string::npos)
+	{
+		size_="???";
+	  	string sbuf(cbuf);
+		string::size_type pos;
+		if((pos=sbuf.find("->")) != string::npos)
+		{
+			linkTo_=sbuf.substr(pos+3);
+			if((pos=linkTo_.find('\n')) != string::npos)
+			{
+			  	linkTo_.erase(pos,1);	
+			}
+			
+			size_=sizeInBytes(linkTo_);
+			if(size_ != "???")
+			{
+	  			size_.append("B");
+			}
+		}
+	}
+}
+
+string MvFileInfo::sizeInBytes(string path)
+{
+	string buf="du -sh \"" + path + "\"";
+
+	FILE *in;
+	char cbuf[512];
+
+	if (!(in = popen(buf.c_str(),"r")) )
+	{
+		return string("???");
+	}
+
+	if(fgets(cbuf, sizeof(cbuf), in) == NULL)
+	{
+		pclose(in);
+		return string("???");
+	}	
+	
+	pclose(in);
+
+	stringstream ss(cbuf); 
+   
+   	while(ss >> buf)
+        {			
+		return buf;	
+	}
+	
+	return string("???");
+}	
\ No newline at end of file
diff --git a/src/libUtil/MvFileInfo.h b/src/libUtil/MvFileInfo.h
new file mode 100644
index 0000000..2d7b048
--- /dev/null
+++ b/src/libUtil/MvFileInfo.h
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvFileInfo_H
+#define MvFileInfo_H
+
+#include <iostream>
+
+using namespace std;
+
+class MvFileInfo
+{
+public:
+	MvFileInfo(string);
+
+	const string& name() const {return name_;};
+	const string& permissions() const {return permissions_;};
+	const string& owner() const {return owner_;};
+	const string& group() const {return group_;};
+	const string& size() const {return size_;};
+	const string& modified() const {return modified_;};
+	const string& linkTo() const {return linkTo_;};
+	
+private:	
+	string sizeInBytes(string);
+
+	string name_;
+	string permissions_;
+	string owner_;
+	string group_;
+	string size_;
+	string modified_;
+	string linkTo_;
+};
+
+#endif
diff --git a/src/libUtil/MvFlextra.cc b/src/libUtil/MvFlextra.cc
new file mode 100644
index 0000000..34dc5e6
--- /dev/null
+++ b/src/libUtil/MvFlextra.cc
@@ -0,0 +1,750 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvFlextra.h"
+
+#include "MvDate.h"
+
+#include <iostream>
+#include <fstream>
+
+map<string,int> MvFlextraItem::pointKeyIndex_;
+map<string,MvFlextraItem::DataType> MvFlextraItem::pointKeyType_;
+
+//=========================================================
+//
+//  MvFlextraItem
+//
+//=========================================================
+
+MvFlextraItem::MvFlextraItem(int id) : id_(id)
+{
+  	if(pointKeyIndex_.empty())
+	{
+  		pointKeyIndex_["date"]=0;
+		pointKeyIndex_["elapsedTime"]=1;
+  		pointKeyIndex_["lon"]=2;
+		pointKeyIndex_["lat"]=3; 
+		pointKeyIndex_["eta"]=4;
+		pointKeyIndex_["pres"]=5;
+		pointKeyIndex_["z"]=6;
+		pointKeyIndex_["zAboveGround"]=7;
+		pointKeyIndex_["pv"]=8;
+		pointKeyIndex_["theta"]=9;
+		
+		pointKeyType_["date"]=DateType;
+		pointKeyType_["elapsedTime"]=IntType;
+  		pointKeyType_["lon"]=FloatType;
+		pointKeyType_["lat"]=FloatType; 
+		pointKeyType_["eta"]=FloatType;
+		pointKeyType_["pres"]=FloatType;
+		pointKeyType_["z"]=FloatType;
+		pointKeyType_["zAboveGround"]=FloatType;
+		pointKeyType_["pv"]=FloatType;
+		pointKeyType_["theta"]=FloatType;
+		
+	}
+}	
+
+string MvFlextraItem::metaData(const string& key) const
+{
+  	map<string,string>::const_iterator it=metaData_.find(key);
+	if(it != metaData_.end())
+	 	return it->second;
+	else
+	  	return string();
+}	
+
+void MvFlextraItem::pointData(const string& key,vector<string>& data,MvFlextraItem::DataType& type) const
+{
+  	map<string,int>::const_iterator it=pointKeyIndex_.find(key);
+  	if(it != pointKeyIndex_.end())
+	{
+	  	int id=it->second;
+		for(unsigned int i=0; i < points_.size(); i++)
+		{
+			if(id >= 0 && id < static_cast<int>(points_.at(i).size()))  
+			{
+			  	data.push_back(points_.at(i).at(id));
+			}
+			else
+			{
+			  	data.push_back(string());
+			}			
+		}
+	}
+	
+	map<string,DataType>::const_iterator itT=pointKeyType_.find(key);
+	if(itT != pointKeyType_.end())
+		type=itT->second;
+	
+}	
+
+//=========================================================
+//
+//  MvFlextra
+//
+//=========================================================
+
+MvFlextraBlock::MvFlextraBlock()
+{
+	direction_="Forward";
+	constantStep_=true; 
+	uncertaintyTr_=false;
+}  
+
+MvFlextraBlock::~MvFlextraBlock()
+{
+	for(unsigned int i=1; i < items_.size(); i++)
+	{
+		delete items_[i];
+	}	
+}
+
+
+void MvFlextraBlock::decode(string fileName)
+{
+	ifstream in(fileName.c_str());
+	string line;
+	decode(in,line);	
+	in.close();
+}	
+
+void MvFlextraBlock::decode(ifstream &in,string &line)
+{
+	bool headerPassed=false;
+	bool firstRowPassed=false;
+	bool directionDetected=false;
+	
+	map<string,string> trTypeName;
+	trTypeName["3-DIMENSIONAL"]="3D";
+	
+	map<string,string> info;
+	MvDate baseDate;
+	string metaDataText;
+	string keySuffix;
+	vector<string> metaData; 	
+	map<string,vector<string> > trInfo;
+	map<string,string> constInfo; 
+	MvFlextraItem* item=0;
+	
+	int cnt=0;
+
+	//Read meta-data first
+	
+	metaData_["Metview::type"]="FLEXTRA";
+	
+	
+	while(getline(in,line))
+	{
+		if(line.find("Number of header lines") != string::npos)
+		{
+		  	break;
+		}	
+		
+		else if(line.find("*") != string::npos && headerPassed == false)
+		{
+			string value, valueFrom, valueTo;
+			if(parseHeaderLine(line,"TYPE OF TRAJECTORIES:",value))
+			{	
+			  	if(trTypeName.find(value) != trTypeName.end())
+				{
+				  	metaData_["type"]=trTypeName[value];
+				}
+				else
+				{
+				  	metaData_["type"]=value;
+				}	
+			
+			}
+			else if(parseHeaderLine(line,"INTEGRATION SCHEME:",value))
+				metaData_["integration"]=value;
+			else if(parseHeaderLine(line,"INTERPOLATION METHOD:",value))
+				metaData_["interpolation"]=value;		
+	  		else if(parseHeaderLine(line,"SPATIAL CFL CRITERION:",value))
+				metaData_["cflSpace"]=value;
+			else if(parseHeaderLine(line,"TEMPORAL CFL CRITERION:",value))
+				metaData_["cflTime"]=value;		
+			else if(parseHeaderLine(line,"START POINT COMMENT:",value))
+			{
+			  	metaData_["startComment"]=value;
+				metaData_["name"]=value;
+				comment_=value;
+			}	
+			else if(parseHeaderLine(line,"MODEL RUN COMMENT:",value))
+				metaData_["runComment"]=value;		
+			else if(parseHeaderLine(line,"NORMAL INTERVAL BETWEEN WIND FIELDS:",value))
+				metaData_["normalInterval"]=value;
+			else if(parseHeaderLine(line,"MAXIMUM INTERVAL BETWEEN WIND FIELDS:",value))
+				metaData_["maxInterval"]=value;		
+			else if(parseHeaderLine(line,"LONGITUDE RANGE:",valueFrom,valueTo))
+			{
+		  		metaData_["west"]=valueFrom;
+				metaData_["east"]=valueTo;
+				if(parseHeaderLine(line,"GRID DISTANCE:",value))
+				{
+			  		metaData_["dx"]=value;
+				}
+			}		
+			else if(parseHeaderLine(line,"LATITUDE RANGE:",valueFrom,valueTo))
+			{
+		  		metaData_["south"]=valueFrom;
+				metaData_["north"]=valueTo;
+				if(parseHeaderLine(line,"GRID DISTANCE:",value))
+				{
+			  		metaData_["dy"]=value;
+				}
+			}
+	  	
+		}	
+	  	else if(line.find("DATE:") != string::npos)
+		{											
+			cnt++;
+			
+			item=new MvFlextraItem(cnt);
+			items_.push_back(item);
+			
+			stringstream sst_cnt;
+			sst_cnt << cnt;								
+			
+			//Parse "Date:" line
+			stringstream sst(line);
+			string s, sDate, sTime, sIndex;
+			sst >> s >> sDate >> s >> sTime  >>s >> s >> sIndex;
+		
+			s=sDate;
+			sDate=s.substr(0,4) + "-" + s.substr(4,2) + "-" + s.substr(6,2);
+						
+			s=sTime;					
+			if(s.size() < 6)
+			{
+			  	s=string(6-s.size(),'0').append(s);
+			}
+			sTime=s.substr(0,2) + ":" + s.substr(3,2) + ":" + s.substr(4,2);
+			
+			s=sDate + " " + sTime;
+			baseDate=MvDate(s.c_str());
+			
+			item->addMetaData("startDate",sDate);
+			item->addMetaData("startTime",sTime);
+			item->addMetaData("id",sst_cnt.str());
+			item->addMetaData("stopIndex",sIndex);
+
+			//Initialise the rest of the meta-data
+		  	item->addMetaData("startLat","-");
+			item->addMetaData("startLon","-");									
+			item->addMetaData("startEta","-");
+			item->addMetaData("startPres","-");
+			item->addMetaData("startZ","-");
+			item->addMetaData("startZAboveGround","-");
+			item->addMetaData("startPv","-");
+			item->addMetaData("startTheta","-");
+								
+			//Get header line
+			getline(in,line);
+					
+			headerPassed=true;
+			firstRowPassed=false;
+		}	
+		else if(headerPassed)
+		{		  							
+			if(!firstRowPassed)
+			{
+				istringstream issMeta(line);
+				string s, lon, lat, eta, pres, z, z_oro, pv, theta;
+				issMeta >>  s>> lon >> lat >> eta >> pres >> z >> z_oro >> pv >> theta;
+				item->addMetaData("startLat",lat);
+				item->addMetaData("startLon",lon);									
+				item->addMetaData("startEta",eta);
+				item->addMetaData("startPres",pres);
+				item->addMetaData("startZ",z);
+				item->addMetaData("startZAboveGround",z_oro);
+				item->addMetaData("startPv",pv);
+				item->addMetaData("startTheta",theta);
+				
+				firstRowPassed=true;
+			}
+			
+			if(!directionDetected)
+			{
+			  	istringstream iss(line);
+ 				string s;
+				iss >> s; 
+				
+				if(s != "0")
+				{
+					if(s.find("-") != string::npos)
+					{
+					  	direction_="Backward";
+					}
+					metaData_["direction"]=direction_;
+					directionDetected=true;
+				}
+			}
+			
+			vector<string> pointData;
+			
+			istringstream iss(line);
+ 			double d;
+			iss >> d; 
+			
+			MvDate md=baseDate;
+			md+=d/86400.;
+			
+			char buf[100];
+	 		md.Format("yyyy-mm-dd HH:MM:SS", buf);
+
+			pointData.push_back(string(buf));
+			
+	 		stringstream sst(line);
+			string s;
+			while(sst >> s)
+			{
+		  	   	pointData.push_back(s);				
+			} 
+			
+			item->addPoint(pointData);
+		}				
+	}	
+
+
+	stringstream ssNum;
+	ssNum << items_.size();
+	metaData_["trNum"]=ssNum.str();
+
+	//Find meta-data that is the same for all the trajectories
+	//Check lat-lon
+	if(isMetaDataConst("startLat") && isMetaDataConst("startLon"))
+	{
+		metaData_["startLat"]=items_.at(0)->metaData("startLat");
+		metaData_["startLon"]=items_.at(0)->metaData("startLon");
+	}	
+			
+	if(isMetaDataConst("startDate") && isMetaDataConst("startTime"))
+	{
+		metaData_["startDate"]=items_.at(0)->metaData("startDate");
+		metaData_["startTime"]=items_.at(0)->metaData("startTime");
+	}	
+		
+	string keys[6]={"startEta","startPres","startZ","startZAboveGround","startPv","startTheta"};			
+	for(unsigned int i=0; i< 6; i++)
+	{
+	  	string s=keys[i];
+		if(isMetaDataConst(s))
+		{
+			metaData_[s]=items_.at(0)->metaData(s);
+		}
+	}	
+	
+	//Check the timestep type (constant ot non-constant)
+	checkStepType();
+	
+	
+	//in.close();
+}
+
+
+void MvFlextraBlock::writeAll(const string& outFile, int& metaDataCnt)
+{
+	ofstream out;				
+	out.open(outFile.c_str());
+	
+	metaDataCnt=0;
+	writeMetaData(out,metaDataCnt);
+		
+	//Write out trajectory data
+	for(vector<MvFlextraItem*>::const_iterator it=items_.begin(); it != items_.end(); it++)
+	{		
+	  	const MvFlextraItem *item=*it;
+		
+		for(vector<vector<string> >::const_iterator itP=item->points().begin(); itP != item->points().end(); itP++)
+		{					
+		  	out << item->id();
+			for(vector<string>::const_iterator itS=(*itP).begin(); itS != (*itP).end(); itS++)
+			{
+			  	out << "," << *itS;
+			}	
+			out << endl;
+				
+		}   
+	}
+
+	out.close();
+}
+
+void MvFlextraBlock::writeHighlightPoints(const string& outFile, int& metaDataCnt,string periodHour)
+{
+	ofstream out;				
+	out.open(outFile.c_str());
+	
+	metaDataCnt=0;
+	writeMetaData(out,metaDataCnt);
+		
+	//Write out trajectory data
+	for(vector<MvFlextraItem*>::const_iterator it=items_.begin(); it != items_.end(); it++)
+	{		
+	  	const MvFlextraItem *item=*it;
+		
+		for(vector<vector<string> >::const_iterator itP=item->points().begin(); itP != item->points().end(); itP++)
+		{					
+			const vector<string>& data=(*itP);
+							
+			if(data.size() > 0)
+			{
+				MvDate md(data.at(0).c_str());
+				if(md.Minute() == 0 && md.Second() == 0)
+				{				 	
+				  	int h=md.Hour();
+				
+					bool found=false;
+				  	if(periodHour == "6h")					
+					  	found=(h % 6 == 0);
+					else if(periodHour == "12h")					
+					  	found=(h % 12 == 0);
+					else if(periodHour == "24h")					
+					  	found=(h == 0);
+					else if(periodHour == "48h" && data.size() > 1)
+					{					  						  	
+						istringstream iss(data[1]);
+ 						int isec;
+						iss >> isec; 
+						found=(h == 0 && (isec/86400) % 2 == 0);
+					}	
+					
+					if(found)
+					{					  	
+						out << item->id() << "," << data[0] << "," << data[2] << "," <<  data[3] << endl;
+					}	
+				}
+			}					
+		}   
+	}
+
+	out.close();
+}
+
+
+void MvFlextraBlock::writeLabels(const string& outFile, int& metaDataCnt,string periodHour,vector<string>& labels)
+{
+	ofstream out;				
+	out.open(outFile.c_str());
+	
+	metaDataCnt=0;
+	writeMetaData(out,metaDataCnt);
+		
+	//Write out trajectory data
+	for(vector<MvFlextraItem*>::const_iterator it=items_.begin(); it != items_.end(); it++)
+	{		
+		const MvFlextraItem *item=*it;
+		
+		for(vector<vector<string> >::const_iterator itP=item->points().begin(); itP != item->points().end(); itP++)
+		{			
+			const vector<string>& data=(*itP);
+						
+			if(data.size() > 0)
+			{
+				MvDate md(data.at(0).c_str());
+				if(md.Minute() == 0 && md.Second() == 0)
+				{				 	
+					int h=md.Hour();
+				
+					bool found=false;
+					if(periodHour == "6h")					
+					  	found=(h % 6 == 0);
+					else if(periodHour == "12h")					
+					 	found=(h % 12 == 0);
+					else if(periodHour == "24h")					
+					  	found=(h == 0);
+					else if(periodHour == "48h" && data.size() > 1)
+					{					  						  	
+						istringstream iss(data[1]);
+ 						int isec;
+						iss >> isec; 
+						found=(h == 0 && (isec/86400) % 2 == 0);
+					}	
+					
+					if(found)
+					{					  						
+				  		char buf1[100];
+						md.Format("dd:HH", buf1);
+						out << "1" << "," << data[0] << "," << data[2] << "," <<  data[3] << endl;
+						labels.push_back(buf1);
+					}	
+				}					
+			}
+		}	
+	}
+
+	out.close();
+}
+
+void MvFlextraBlock::writeMetaData(ofstream& out,int& metaDataCnt)
+{
+	metaDataCnt=0;
+	
+	//Write out global meta-data	
+	for(map<string,string>::const_iterator it=metaData_.begin(); it != metaData_.end(); it++)
+	{
+		out << it->first + "=" + it->second << " ";
+		
+	}
+	out << "direction=" << direction_ << endl;
+	metaDataCnt++;
+
+	//Write out trajectory meta-data	
+	string keys[12]={"id","startDate","startTime","startLat","startLon","startEta",
+	                "startPres","startZ","startZAboveGround","startPv","startTheta","stopIndex"};		
+	
+	for(int i=0; i < 12; i++)
+	{
+		string s;
+		for(vector<MvFlextraItem*>::iterator it=items_.begin(); it != items_.end(); it++)
+		{
+			string val=(*it)->metaData(keys[i]);
+		  	if(s.empty())
+			{
+			  	s.append(val);
+			}
+			else
+			{
+			  	s.append("/" + val);
+			}
+		}
+		
+		if(!s.empty())
+		{  
+			out << keys[i] + "_TR=" + s  << endl;
+			metaDataCnt++;
+		}				
+	}
+}	
+	
+
+bool MvFlextraBlock::parseHeaderLine(const string& line,const string& key,string& value)
+{
+	bool found=false;
+	string::size_type pos;
+	if((pos=line.find(key)) != string::npos) 
+	{
+		stringstream sst(string(line,pos+key.size()));
+		string s;
+		while(sst >> s)
+		{
+			if(s.find("*") == string::npos)
+			{
+				  if(value.empty())
+				  {
+				    	value=s;
+				  }
+				  else
+				  {
+				    	value.append(s);
+				  }	
+				  found=true;
+			}
+		}
+	}
+	
+	return found;
+}
+
+bool MvFlextraBlock::parseHeaderLine(const string& line,const string& key,string& fromValue,string& toValue)
+{
+	bool found=false;
+	string::size_type pos;
+	if((pos=line.find(key)) != string::npos) 
+	{
+		stringstream sst(string(line,pos+key.size()));
+		string s;		
+		sst >> fromValue;
+		sst >> s;
+		sst >> toValue; 
+		found=true;
+	}
+	
+	return found;	
+}
+
+bool MvFlextraBlock::isMetaDataConst(const string& key)
+{
+  	if(items_.size() == 0)
+  		return false;
+	
+  	string val=items_.at(0)->metaData(key);
+	if(val.empty())
+	  	return false;
+	
+	for(unsigned int i=1; i < items_.size(); i++)
+	{
+		if(items_.at(i)->metaData(key) != val)
+		{
+		  	return false;
+		}
+	}
+	
+	return true;
+}	  	
+	  
+void MvFlextraBlock::checkStepType()
+{
+	for(vector<MvFlextraItem*>::const_iterator it=items_.begin(); it != items_.end(); it++)
+	{
+		const vector<vector<string> >& pts=(*it)->points();
+		
+		if(pts.size()< 3)
+		 	continue; 
+	
+		istringstream iss0(pts.at(0).at(1));
+		double first;
+		iss0 >> first;
+		
+		istringstream iss1(pts.at(1).at(1));
+		double prev;
+		iss1 >> prev;
+				
+		double diff=prev-first;	
+		bool sameDiff=true;
+		for(unsigned int i=2; i <(*it)->points().size() && i < 6; i++)
+		{
+		  	istringstream iss((*it)->points().at(i).at(1));
+ 			double d;
+			iss >> d; 
+				
+			if(d-prev != diff)
+			{  
+				sameDiff=false;  
+				break;
+			}
+			else
+			  	prev=d;			
+		}
+		
+		if(sameDiff)
+			constantStep_=true;
+		else
+		  	constantStep_=false;
+		
+		return;
+	}	
+		
+	constantStep_=true;
+}
+
+
+//=========================================================
+//
+//  MvFlextra
+//
+//=========================================================
+
+MvFlextra::MvFlextra(const string& fileName) : fileName_(fileName)
+{
+	decode();
+}  
+
+MvFlextra::~MvFlextra()
+{
+	for(unsigned int i=1; i < blocks_.size(); i++)
+	{
+		delete blocks_[i];
+	}	
+}
+
+
+void MvFlextra::decode()
+{
+	ifstream in(fileName_.c_str());
+
+	string line;
+
+	while(line.find("Number of header lines") != string::npos || getline(in,line))
+	{
+		MvFlextraBlock *data=new MvFlextraBlock;
+		blocks_.push_back(data);			
+		data->decode(in,line);			
+	}	
+		  
+	in.close();
+	
+	
+	//Guess if a trajectory block contains uncertainty trajecories or not!
+	//It is working only if the FLEXTRA file containing several blocks was
+	//generated by metview.
+	vector<pair<string,bool> > ref;	
+	for(unsigned int i=0; i < blocks_.size(); i++)
+	{
+		string comment=blocks_[i]->comment();	
+		bool cstep=blocks_[i]->constantStep();
+		
+		pair<string,bool> p=make_pair<string,bool>(comment,cstep);
+		
+		bool newRef=true;
+		for(unsigned int j=0; j < ref.size(); j++)
+		{
+		  	if(ref[j] == p)
+			{
+				blocks_[i]->setUncertantyTr(true);
+				newRef=false;
+				break;
+			}
+		}	
+	
+		if(newRef)
+		  	ref.push_back(p);
+	}	
+	
+}	
+
+void MvFlextra::write(FILE *f)
+{
+	ifstream in(fileName_.c_str());
+	string line;
+		
+	while(getline(in,line))
+	{  
+	    fputs(line.c_str(),f);
+	    fputs("\n",f);
+	}    	  
+	in.close();	  		  
+}  
+
+
+void MvFlextra::write(const string& outFile,int block)
+{
+	if(block < 0 || block >=static_cast<int>(blocks_.size()) )
+	  	return;
+
+	ofstream out;				
+	out.open(outFile.c_str());
+	
+	ifstream in(fileName_.c_str());
+	string line;
+	
+	int cnt=-1;
+	while(getline(in,line))
+	{
+	  	if(line.find("Number of header lines") != string::npos)
+		{
+		  	cnt++;
+		}
+				
+		if(cnt > block)
+			break;  
+		  
+		if(cnt == block)
+		{
+		  	out << line << endl; 
+		}		
+	}
+
+	out.close();
+		
+}
+
+ 
diff --git a/src/libUtil/MvFlextra.h b/src/libUtil/MvFlextra.h
new file mode 100644
index 0000000..4bbd703
--- /dev/null
+++ b/src/libUtil/MvFlextra.h
@@ -0,0 +1,111 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvFlextra_inc
+#define MVFlextra_inc
+
+#include <fstream>
+#include <map>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+class MvFlextraBlock;
+
+class MvFlextraItem
+{
+friend class MvFlextraBlock;
+  
+public:
+    	enum DataType {NoType,DateType,IntType,FloatType};
+	
+  	MvFlextraItem(int);
+  	string metaData(const string&) const;
+	const map<string,string>& metaData() const {return metaData_;}
+	void pointData(const string&,vector<string>&,DataType&) const;
+	void addMetaData(const string& key, const string& value) {metaData_[key]=value;}
+	void addPoint(const vector<string>& pt) {points_.push_back(pt);}
+	const vector<vector<string> >& points() const {return points_;}
+	int id() const {return id_;}
+
+protected:
+	static map<string,int> pointKeyIndex_;
+	static map<string,DataType> pointKeyType_;
+	int id_;
+  	map<string,string> metaData_;
+	vector<vector<string> > points_;
+};
+
+
+class MvFlextra;
+
+class MvFlextraBlock
+{
+
+friend class MvFlextra;   
+  
+public:
+	MvFlextraBlock();    
+  	~MvFlextraBlock();
+	
+	const string& comment() const {return comment_;}
+	void writeAll(const string&,int&);
+	void writeHighlightPoints(const string&, int&,string);
+  	void writeLabels(const string&,int&,string,vector<string>&);
+	int itemNum() const {return static_cast<int>(items_.size());}
+	const map<string,string>& metaData() const {return metaData_;}
+	const vector<MvFlextraItem*>& items() const {return items_;}
+	bool constantStep() const {return constantStep_;}
+	void setUncertantyTr(bool b) {uncertaintyTr_=b;}
+	bool uncertaintyTr() const {return uncertaintyTr_;}
+	
+protected:
+    	void decode(string);
+    	void decode(ifstream &in,string &line);
+	void writeMetaData(ofstream&,int&);
+    	bool parseHeaderLine(const string& line,const string& key,string& value);
+    	bool parseHeaderLine(const string& line,const string& key,string& fromValue,string& toValue);
+    	bool isMetaDataConst(const string& key);
+	void checkStepType();
+    	
+    	//string fileName_;
+	string comment_;
+	string direction_;
+	map<string,string> metaData_;
+	vector<MvFlextraItem*> items_;  
+	bool constantStep_;
+	bool uncertaintyTr_;
+};  
+
+class MvFlextra
+{
+public:
+	MvFlextra(const string&);    
+  	~MvFlextra();
+	
+	const string& fileName() const {return fileName_;}
+	int blockNum() const {return static_cast<int>(blocks_.size());}
+	const vector<MvFlextraBlock*>&  blocks() const {return blocks_;}
+	void write(FILE *f);
+	void write(const string&, int);
+	
+	
+protected:
+    	void decode();
+       	
+    	string fileName_;
+	vector<MvFlextraBlock*> blocks_;  
+};  
+
+
+
+
+
+#endif
diff --git a/src/libUtil/MvGribParC.c b/src/libUtil/MvGribParC.c
new file mode 100644
index 0000000..7523878
--- /dev/null
+++ b/src/libUtil/MvGribParC.c
@@ -0,0 +1,279 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <string.h>
+#include <ctype.h>
+#include "mars.h"
+
+#include <MvGribParC.h>
+
+#if defined(_STDC_) || defined(c_plusplus) || defined(__cplusplus)
+#define P_(s) s
+#else
+#define P_(s) ()
+#endif
+
+static MvGribTStruct*      MvGribTOpen P_((int));
+static void                MvGribTClose P_((MvGribTStruct*));
+
+static MvGribTEntryStruct* MvGribTParameter P_((MvGribTStruct*,int));
+static int                 MvGribTIndex P_((MvGribTStruct*,char*));
+static int                 compare P_((char*,char*));
+
+#undef P_
+
+MvGribParStruct* MvGribParOpen()
+{
+	MvGribParStruct* list;
+
+	list = (MvGribParStruct*) malloc(sizeof(MvGribParStruct));
+	list->nelems = 0;
+#if 0
+	if (list->partable[list->nelems] = MvGribTOpen(0)) list->nelems++;
+	if (list->partable[list->nelems] = MvGribTOpen(1)) list->nelems++;
+	if (list->partable[list->nelems] = MvGribTOpen(2)) list->nelems++;
+#endif
+
+	if (list->partable[list->nelems] = MvGribTOpen(1)) list->nelems++;
+
+#if 0
+	if (list->partable[list->nelems] = MvGribTOpen(140)) list->nelems++;
+	if (list->partable[list->nelems] = MvGribTOpen(254)) list->nelems++;
+
+	if (!list->nelems)
+	{	free (list);
+		return NULL;
+	}
+#endif
+
+	return list;
+}
+
+void MvGribParClose(list)
+MvGribParStruct* list;
+{
+	int i;
+
+	if (!list) return;
+
+	for (i = 0; i < list->nelems; i++)
+		MvGribTClose(list->partable[i]);
+	free(list);
+}
+
+MvGribTEntryStruct* MvGribParEntry(list, version, npar)
+MvGribParStruct* list;
+int version, npar;
+{
+	int i;
+
+	/*-- is this table version already in memory? --*/
+	for (i = 0; i < list->nelems; i++)
+	{
+		if (list->partable[i]->version == version)
+			return MvGribTParameter(list->partable[i],npar);
+	}
+
+	/*-- do we have space for one more version? --*/
+	if( list->nelems >= MAX_TABLE2_VERSIONS )
+	  {
+	    marslog( LOG_EROR, "No more space for GRIB Table 2 version %d", version );
+	    return NULL;
+	  }
+
+	/*-- read this version into memory -*/
+	list->partable[list->nelems] = MvGribTOpen( version );
+	if( list->partable[list->nelems] == NULL )
+	  {
+	    marslog( LOG_EROR, "Problems reading GRIB Table 2 version %d", version );
+	    return NULL;
+	  }
+
+	list->nelems++;
+	return MvGribTParameter( list->partable[ list->nelems - 1 ], npar );
+}
+
+int MvGribParIndex(MvGribParStruct* list, int version, const char *parname)
+{
+	int i;
+
+	for (i = 0; i < list->nelems; i++)
+	{
+		if (list->partable[i]->version == version)
+			return MvGribTIndex(list->partable[i],parname);
+	}
+	return -1; /* no match (this missing return added by vk/970725) */
+}
+
+static MvGribTStruct* MvGribTOpen(version)
+int version;
+{
+	int		i, ival;
+	FILE*		fp;
+	MvGribTStruct*	table;
+	char*		fname;
+	char		line[201], *dir;
+
+	if (version < 0 || version > 255) return NULL;
+
+	dir = getenv("METVIEW_DIR");
+	if (!dir)
+	  return NULL;
+
+	fname = (char*)malloc(strlen(dir) + 19);
+	if (!fname)
+	  return NULL;
+	sprintf (fname, "%s/sys/metv_%d.par", dir, version);
+
+	fp = fopen(fname,"r");
+	if (!fp)
+	  {
+	    marslog( LOG_EROR, "No file %s", fname );
+	    free(fname);
+	    return NULL;
+	  }
+	printf("\n--- Reading Table 2 version file into memory: %s ---\n", fname );
+	free(fname);
+
+	table = (MvGribTStruct*) malloc(sizeof(MvGribTStruct));
+
+	do
+	  {
+	    fgets (line, 200, fp);
+	  } while (line[0] == '*');
+
+	table->version = version;
+	sscanf(line, "%d %d", &table->start, &table->end);
+
+	if (table->start < 0 || table->end < 0 ||
+	    table->start > 255 || table->end > 255 ||
+	    table->start > table->end)
+	{
+	  free(table);
+	  return NULL;
+	}
+
+	i = 0;
+	table->entry = (MvGribTEntryStruct*)
+		malloc((table->end - table->start+1) *
+		sizeof(MvGribTEntryStruct));
+
+	while (fgets(line, 200, fp))
+	{
+#if 0
+		sscanf(line, "%d %s %s",
+		&ival, table->entry[i].shortName, table->entry[i].longName);
+#endif
+		sscanf( line, "%d %s", &ival, table->entry[i].shortName );
+		table->entry[i].longName[ 0 ] = NULL; /* not used */
+		table->entry[i].fieldType = line[35];
+		i++;
+	}
+
+	fclose(fp);
+
+	return table;
+}
+
+static void MvGribTClose (table)
+MvGribTStruct* table;
+{
+	if (!table) return;
+	free (table->entry);
+	free (table);
+}
+
+static MvGribTEntryStruct* MvGribTParameter (table,npar)
+MvGribTStruct* table;
+int npar;
+{
+	if (npar < table->start || npar > table->end) return NULL;
+	return &table->entry[npar - table->start];
+}
+
+/* MvGribTIndex returns the code, given the parameter name */
+
+#ifndef MAX
+# define MAX(a,b)    (a)>(b)?(a):(b)
+#endif
+
+static int MvGribTIndex(table,name)
+MvGribTStruct* table;
+char* name;
+{
+	int i, j, k, n, n1, n2;
+	int exact_match = 0;
+	int max = -1;
+
+	j = k = -1;
+	for (i = table->start; i <= table->end; i++)
+	{
+		n1 = compare(name, table->entry[i - table->start].shortName);
+		if(n1==strlen(name)) {
+			exact_match = 1;
+			n=n1;
+		}
+		else {
+			n2 = compare(name, table->entry[i - table->start].longName);
+			if(n2==strlen(name)) {
+				exact_match = 1;
+				n=n2;
+			}
+			else n = MAX(n1,n2);
+		}
+		/* Test for size of match */
+		if(n) {
+			if(exact_match) {
+				j = i;
+				break;
+			}
+			else if(n == max) k = i;
+			else if(n>max) {
+				max = n;
+				j = i;
+				k = -1;
+			}
+		}
+	}
+
+	if(j==-1) return -1;	/* no match */
+	else if(j==k) return -2; /* Ambiguous match */
+	else return j;
+}
+
+
+/*===============================================================*/
+/* compare returns the offset of the first different character   */
+/* of two strings. The comparaison is not case sensitive         */
+/*===============================================================*/
+
+#define UP(a)       (islower(a)?toupper(a):a)
+
+static int compare(p,q)
+char *p;
+char *q;
+{
+	int  n=0;
+
+	while(*q && *p )
+	{
+		if (UP(*q) != UP(*p)) return n;
+		q++;
+		p++;
+		n++;
+	}
+
+	if (!*q && *p )return n-1;
+	if (!*p && *q )return n-1;
+	return n;
+}
+
diff --git a/src/libUtil/MvGribParC.h b/src/libUtil/MvGribParC.h
new file mode 100644
index 0000000..176b413
--- /dev/null
+++ b/src/libUtil/MvGribParC.h
@@ -0,0 +1,74 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvGribTableC_H
+#define MvGribTableC_H
+
+/*--------------------------------------------------------*/
+/*-- MAX_TABLE2_VERSIONS defines the maximum number of  --*/
+/*-- different versions of GRIB Table 2 that can be     --*/
+/*-- used at any time. Increase the number if required. --*/
+/*--------------------------------------------------------*/
+
+#define MAX_TABLE2_VERSIONS 10
+
+
+
+typedef struct
+{
+	char	shortName[ 7 ];
+	char	longName[ 1 ]; /* not used */
+	char	fieldType;
+	
+} MvGribTEntryStruct;
+
+typedef struct
+{
+	int	version;
+	int	start;
+	int	end;
+	MvGribTEntryStruct*	entry;
+} MvGribTStruct;
+
+typedef struct
+{
+	int		nelems;
+	MvGribTStruct*	partable[ MAX_TABLE2_VERSIONS ];
+} MvGribParStruct;
+
+/*
+** Prototypes
+*/
+
+#if defined(__STDC__) || defined(__cplusplus) || defined (c_plusplus)
+#define P_(s) s
+#else
+#define P_(s) ()
+#endif
+
+#if defined(__cplusplus) || defined (c_plusplus)
+extern "C"
+{
+#endif
+
+/*
+** PUBLIC FUNCTIONS
+*/
+
+MvGribParStruct*    MvGribParOpen P_((void));
+void                MvGribParClose P_((MvGribParStruct*));
+MvGribTEntryStruct* MvGribParEntry P_((MvGribParStruct*,int,int));
+int                 MvGribParIndex P_((MvGribParStruct*,int,const char*));
+
+#if defined(__cplusplus) || defined (c_plusplus)
+}
+#endif
+
+#undef P_
+#endif
diff --git a/src/libUtil/MvKeyManager.cc b/src/libUtil/MvKeyManager.cc
new file mode 100644
index 0000000..131af99
--- /dev/null
+++ b/src/libUtil/MvKeyManager.cc
@@ -0,0 +1,137 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+
+#include "MvKeyManager.h"
+#include "MvKeyProfile.h"
+
+	/*key_.push_back(MvKey("count","Count",true));
+	key_.push_back(MvKey("mars.date","Date",true));
+	key_.push_back(MvKey("mars.time","Time",true));
+	key_.push_back(MvKey("mars.step","Step",true));
+	key_.push_back(MvKey("mars.param","Param",true));
+	key_.push_back(MvKey("dataRepresentationType","Rep",true));
+	key_.push_back(MvKey("mars.levelist","Level",true));
+	key_.push_back(MvKey("mars.levtype","Levtype",true));
+	key_.push_back(MvKey("mars.class","Class",false));
+	key_.push_back(MvKey("mars.type","Type",false));
+	key_.push_back(MvKey("mars.stream","Stream",false));
+	key_.push_back(MvKey("editionNumber","Edition",false));*/
+
+
+MvKeyManager::~MvKeyManager()
+{
+	clear();
+}
+
+void MvKeyManager::clear()
+{
+	for(vector<MvKeyProfile*>::iterator it=begin(); it != end(); it++)
+	{
+		delete (*it);
+	}
+
+	vector<MvKeyProfile*>::clear();
+}
+
+MvKeyProfile* MvKeyManager::addProfile(string name)
+{
+	MvKeyProfile *profile=new MvKeyProfile(name);
+	push_back(profile);
+	return profile;
+
+}
+
+void MvKeyManager::deleteProfile(int index)
+{
+	vector<MvKeyProfile*>::iterator it=begin()+index;
+	delete (*it);
+	erase(it);	
+}	
+	
+void MvKeyManager::loadProfiles()	
+{
+	ifstream in(fprof_.c_str(), ifstream::in);
+
+	if(!in)
+	{
+		MvKeyProfile *prof=new MvKeyProfile("Metview default");
+		push_back(prof);
+
+		prof->addKey(new MvKey("count","Index"));	
+		prof->addKey(new MvKey("mars.date","Date"));
+		prof->addKey(new MvKey("mars.time","Time"));
+		prof->addKey(new MvKey("mars.step","Step"));
+		prof->addKey(new MvKey("mars.param","Param"));
+		prof->addKey(new MvKey("dataRepresentationType","Rep"));
+		prof->addKey(new MvKey("mars.levelist","Level"));
+		prof->addKey(new MvKey("mars.levtype","Levtype"));
+
+		saveProfiles();
+	}
+	else
+	{
+		//Create a deafult profile
+		char c[256];
+		string name, sname;
+		
+		MvKeyProfile *prof;
+		while(in.getline(c,256))
+		{
+			//cout << c << endl;
+		
+			string s=c;
+
+			if(s.find("#PROFILE") != string::npos)
+			{
+				in.getline(c,256);	
+		
+				prof=new MvKeyProfile(c);
+				push_back(prof);
+			}
+			else
+			{
+				name=c;
+				in.getline(c,256);
+				sname=c;	
+			
+				prof->addKey(new MvKey(name,sname));
+			}
+		}
+	}
+
+}	
+
+void MvKeyManager::saveProfiles()	
+{
+	ofstream out(fprof_.c_str(), ofstream::out);
+
+	for(vector<MvKeyProfile*>::iterator it=begin(); it != end(); it++)
+	{
+		MvKeyProfile *prof = *it;
+
+		out << "#PROFILE" << endl;
+		out << prof->name() << endl;
+		//out  << prof->size() << endl;
+		for(vector<MvKey*>::iterator it1=prof->begin(); it1 != prof->end(); it1++)
+		{
+			MvKey *key= *it1;
+			out << key->name() << endl;
+			out << key->shortName() << endl;	
+		}	
+	}
+
+	out.close();
+}
+
+
diff --git a/src/libUtil/MvKeyManager.h b/src/libUtil/MvKeyManager.h
new file mode 100644
index 0000000..e802a07
--- /dev/null
+++ b/src/libUtil/MvKeyManager.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvKeyManager_H
+#define MvKeyManager_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+
+using namespace std;
+
+class MvKeyProfile;
+
+class MvKeyManager : public vector<MvKeyProfile*>
+{
+public:
+	MvKeyManager(string fprof) : fprof_(fprof) {};
+	~MvKeyManager();
+	MvKeyProfile* addProfile(string);
+	void deleteProfile(int);
+	void loadProfiles();
+	void saveProfiles();
+	void clear();		
+
+private:
+	string fprof_;
+
+};
+
+#endif 
diff --git a/src/libUtil/MvKeyProfile.cc b/src/libUtil/MvKeyProfile.cc
new file mode 100644
index 0000000..9d0e387
--- /dev/null
+++ b/src/libUtil/MvKeyProfile.cc
@@ -0,0 +1,227 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+
+#include "MvKeyProfile.h"
+
+//-----------------------------------
+// MvKey
+//-----------------------------------
+
+MvKey::MvKey() : name_(""), shortName_(""), description_(""), 
+		readIntAsString_(true), editable_(true)
+{
+	
+}
+
+MvKey::MvKey(const MvKey& copy)
+{
+	name_=copy.name();
+	shortName_=copy.shortName();
+	description_=copy.description();
+	metaData_=copy.metaData();
+	readIntAsString_=copy.readIntAsString();
+	editable_=copy.editable();
+}
+
+MvKey* MvKey::clone()
+{
+	MvKey* cp=new MvKey(*this);
+	return cp;
+}	
+
+void MvKey::addValue(string value)
+{
+	value_.push_back(value);
+	addToCounter(value);
+}
+
+void MvKey::addToCounter(string s)
+{
+	if(counter_.find(s) != counter_.end())
+	{
+		counter_[s]=counter_[s]+1;
+	}
+	else
+	{
+		counter_[s]=1;
+	}
+}
+
+void MvKey::setValue(int index,string value)
+{
+	if(index >= 0 && index < value_.size())
+	{
+		value_[index]=value;
+	}
+}
+
+string MvKey::firstValue()
+{
+	if(value_.size() > 0)
+	{
+		return value_[0];
+	}
+	else
+	{
+		return "N/A";
+	}	
+}
+
+void MvKey::clearData()
+{
+	value_.clear();
+	counter_.clear();
+}
+
+string MvKey::metaData(const string &key)
+{
+	if(metaData_.count(key) != 0)
+	{
+		return metaData_[key];
+	}
+	return string();
+}
+
+void MvKey::setMetaData(const string &key,const string &value)
+{
+	metaData_[key]=value;
+}
+
+	
+
+//-----------------------------------
+// MvKeyProfile
+//-----------------------------------
+
+MvKeyProfile::MvKeyProfile(const MvKeyProfile& copy)
+{
+	name_=copy.name_;
+	systemProfile_=copy.systemProfile_;
+	for(vector<MvKey*>::const_iterator it=copy.begin(); it != copy.end(); it++)
+	{
+		MvKey *key=(*it)->clone();
+		push_back(key);
+	}
+}
+
+MvKeyProfile::~MvKeyProfile()
+{
+	clear();
+}
+
+MvKeyProfile* MvKeyProfile::clone()
+{
+	MvKeyProfile* cp=new MvKeyProfile(*this);
+	return cp;
+}
+
+void MvKeyProfile::clear()
+{
+	for(vector<MvKey*>::iterator it=begin(); it != end(); it++)
+	{
+		delete (*it);
+	}
+}
+
+void MvKeyProfile::addKey(MvKey* key)
+{
+	push_back(key);
+}
+
+MvKey* MvKeyProfile::addKey()
+{
+	MvKey *key=new MvKey;
+	push_back(key);
+	return key;
+}
+
+void MvKeyProfile::deleteKey(int index)
+{
+	vector<MvKey*>::iterator it=begin()+index;
+	delete (*it);
+	erase(it);	
+}
+
+void MvKeyProfile::swap(int i, int j)
+{
+	std::swap(at(i),at(j));
+}
+
+void MvKeyProfile::reposition(int indexFrom,int indexTo)
+{
+	if(indexFrom == indexTo)
+		return;
+
+	if(indexFrom > indexTo)
+	{
+		for(int i=indexFrom; i > indexTo; i--)
+		{
+			std::swap(at(i),at(i-1));
+		}
+	}
+	else
+	{
+		for(int i=indexFrom; i < indexTo; i++)
+		{
+			std::swap(at(i),at(i+1));
+		}
+
+	}
+}
+
+void MvKeyProfile::reposition(vector<int>& pos)
+{
+	if(size() != pos.size())
+		return;
+	
+	//Create a copy
+	vector<MvKey*> profCopy;
+	for(int i=0; i < size(); i++)
+		profCopy.push_back(at(i));
+
+	for(int i=0; i < size(); i++)
+		(*this)[i]=profCopy[pos[i]];
+
+
+}
+
+
+MvKey* MvKeyProfile::key(string keyName) 
+{
+	for(vector<MvKey*>::iterator it=begin(); it != end(); it++)
+	{
+		if((*it)->name() == keyName)
+		{
+			return *it;
+		}
+	}
+	return 0;
+}
+
+int MvKeyProfile::valueNum(int index)
+{
+	if(index >=0 && index < size())
+	{
+		return at(index)->value().size();
+	}
+	return 0;
+}
+
+void MvKeyProfile::clearKeyData()
+{
+	for(vector<MvKey*>::iterator it=begin(); it != end(); it++)
+	{
+		(*it)->clearData();
+	}
+}		
diff --git a/src/libUtil/MvKeyProfile.h b/src/libUtil/MvKeyProfile.h
new file mode 100644
index 0000000..3f7d913
--- /dev/null
+++ b/src/libUtil/MvKeyProfile.h
@@ -0,0 +1,98 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvKeyProfile_H
+#define MvKeyProfile_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+
+using namespace std;
+
+class MvKey
+{
+public:
+	MvKey();
+	MvKey(string n, string sn, string d=string("")) : name_(n), shortName_(sn),
+	                                 description_(d), readIntAsString_(true), editable_(true) {};	
+	MvKey(const MvKey&);
+	
+	MvKey* clone();	
+
+	const string& shortName() const {return shortName_;}
+	const string& name() const {return name_;}	
+	const map<string,string>& metaData() const {return metaData_;}
+	string metaData (const string&);
+	const string& description() const {return description_;}
+
+	void setShortName(string s) {shortName_=s;}
+	void setName(string s) {name_=s;}
+	void setMetaData(const string&,const string&);
+	const map<string,string>& metaData() {return metaData_;}
+	void setDescription(const string &d) {description_=d;}
+
+	void addValue(string);
+	const vector<string>& value() {return value_;}
+	void  setValue(int,string);
+	string firstValue();
+	void clearData();
+
+	map<string,int>& counter() {return counter_;}
+
+	bool readIntAsString() const {return readIntAsString_;}
+	void setReadIntAsString(bool b) {readIntAsString_=b;}
+	bool editable() const {return editable_;}
+	void setEditable(bool b) {editable_=b;}
+
+protected:
+	void addToCounter(string);
+
+	string name_;
+	string shortName_;
+	string description_;
+	map<string,string> metaData_;
+	vector<string> value_;
+	map<string,int> counter_;
+	bool readIntAsString_;
+	bool editable_; //if false only shortname is editable
+};
+
+class MvKeyProfile : public vector<MvKey*>
+{
+public:
+	MvKeyProfile(string n) : name_(n), systemProfile_(false) {};
+	MvKeyProfile(const MvKeyProfile&);
+	~MvKeyProfile();	
+
+	MvKeyProfile* clone();
+	void clear();
+	MvKey* addKey();
+	void addKey(MvKey*);
+	void deleteKey(int);
+	void swap(int,int);
+	void reposition(int,int);
+	void reposition(vector<int>&);
+	MvKey* key(string);
+	string name() {return name_;};
+	void setName(string n) {name_=n;};
+	int valueNum(int);
+	void clearKeyData();
+	void setSystemProfile(bool b) {systemProfile_=b;}
+	bool systemProfile() {return systemProfile_;}
+	
+
+private:
+	string name_;
+	bool systemProfile_;
+	
+};
+
+#endif 
diff --git a/src/libUtil/MvList.cc b/src/libUtil/MvList.cc
new file mode 100644
index 0000000..db4fda1
--- /dev/null
+++ b/src/libUtil/MvList.cc
@@ -0,0 +1,635 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+#include <string.h>
+#include <MvList.hpp>
+#include <ctype.h>
+
+//
+//  CONSTRUCTORS
+//
+
+MvList :: MvList (int protect)
+{
+	setListTypes (SequentialList, NoSortBy, NoSortType, NoCase);
+	_first = _last = 0L; 
+	_n = 0; 
+	_protect = protect; 
+	_curpos = -1;
+}
+
+MvList :: MvList (ListType lst, ListSortBy sb, ListSortType st, ListCase lc, int protect, MvElement *delem)
+{
+	setListTypes(lst, sb, st, lc);
+	if (delem) 
+		insertLastPrivate(delem);
+	else {
+		_first = _last = 0L;
+		_n = 0;
+	}
+	first();
+	_protect = protect;
+}
+
+//
+// AUXILIARY FUNCTIONS
+//
+
+void MvList :: setListTypes(ListType lst, ListSortBy sb, ListSortType st, ListCase c)
+{
+	_list_type = lst;
+	_list_case = c;
+	_current = NULL;
+
+	if (_list_type == SortedList)
+	{
+		switch (sb)
+		{
+		case SortListByName :
+			_sort_by = sb;
+			break;
+		
+		case SortListByCode :
+			_sort_by = sb;
+			break;
+		
+		default : break;
+		}
+		_sort_type = st;
+	}
+	else
+	{
+		_sort_by   = NoSortBy;
+		_sort_type = NoSortType;
+	}	
+}
+
+
+void MvList::removeAll()
+{
+	MvLink *curr, *outro;
+
+	curr = _first;
+	for (int i=0; i<_n; i++)
+	{
+		outro = curr->_next;
+		MvElement *elem = curr->_self;
+
+		delete curr;
+		curr = outro;
+
+		if ((!_protect) && elem->count() == 0)
+			delete elem;
+	}
+
+	_n = 0;
+	_first = _last = 0L;
+}
+
+void MvList::print(const char* titulo)
+{
+	int i;
+	MvLink* curr;
+
+	if (titulo) printf("%s\n",titulo);
+	for (curr = _first, i = 0; curr; curr = curr->_next, i++)
+	{
+		printf("    %d) ", i);
+		curr->_self->print();
+	}
+	if (i != _n) printf("MvList::print - Error in the list\n");
+}
+
+
+//
+// EDIT LIST
+//
+
+void MvList::insertLast (MvElement* v)
+{
+	if( v == NULL )
+		return;
+
+	if (_list_type == SortedList) 
+	{
+		cout << "Error in MvList.insertLast: invalid function for sorted list";
+		return;
+	}
+
+	insertLastPrivate(v);
+}
+
+void MvList::insertLastPrivate (MvElement* v)
+{
+	MvLink* last_last;
+
+	if( v == NULL )
+		return;
+
+	_n++;
+	last_last = _last;
+
+	// create new element
+
+	_last = new MvLink(v, last_last, NULL);
+
+	if (_n == 1) _first = _last;
+	else last_last->_next = _last;
+}
+
+void MvList::insert(int posit,  MvElement* new_elem)
+{
+	if (_list_type == SortedList) 
+	{
+		cout << "Error in MvList.insert: invalid function for sorted list\n";
+		return;
+	}
+
+	insertPrivate(posit, new_elem);
+}
+
+void MvList::insertPrivate(int posit, MvElement* new_elem)
+{
+	if (posit < 0 || posit > _n)
+	{
+		cout << "Error in MvList.insert: invalid position "
+	    	 << posit << "\n";
+		return;
+	}
+
+	if( new_elem == NULL )
+		return;
+
+	// Insert last element
+
+	if (posit == _n)
+	{
+		insertLastPrivate(new_elem);
+		return;
+	}
+
+	// It is not the last element...
+
+	else
+	{
+		int i;
+		MvLink *post, *ant = _first;
+		MvLink *new_entry;
+
+		if (posit == 0)
+		{
+			post = _first;
+
+			new_entry = new MvLink(new_elem, NULL, post);
+
+			_first = new_entry;
+
+			post->_previous = new_entry;
+		}
+		else
+		{
+			for (i = 1; i < posit; i++)
+				ant = ant->_next;
+			post = ant->_next;
+
+			new_entry = new MvLink(new_elem, ant, post);
+
+			ant->_next = new_entry;
+
+			post->_previous = new_entry;
+		}
+	}
+	_n++;
+}
+
+MvElement* MvList :: insertByType (MvElement* newelem)
+{
+	MvElement* elem;
+	int same = 0;
+
+	if( newelem == NULL )
+		return NULL;
+
+	if (_list_type != SortedList) 
+	{
+		cout << "Error in MvList.insertByType: invalid function for sequential list ";
+		return newelem;
+	}
+
+	if (isEmpty())
+	{
+		insertFirstPrivate(newelem);
+		return newelem;
+	}
+
+	if (_list_type == SortedList)
+	{
+		if(_sort_by == SortListByCode)
+		{
+			elem = findNearestCode (newelem->_elem_code);
+			if(elem && elem->_elem_code == newelem->_elem_code) same = 1;
+		}
+		else if (_sort_by == SortListByName)
+		{
+			elem = findNearestName (newelem->_elem_name);
+			if(elem && !strcmp(newelem->_elem_name, elem->_elem_name)) 
+					same = 1;
+		}
+
+		// If singular sort, return nothing if we cannot insert
+		// Program can use curr which points to the right place
+
+		if (_sort_type == SortListSingular && same) return 0;
+	}
+
+	// Insert before the current item or last
+
+	if (_current)	insertPrivate(_curpos,newelem);
+	else		insertLastPrivate(newelem);
+
+	return newelem;
+
+}
+
+int MvList::remove(int posit)
+{
+	MvElement *elem = extract( posit);
+	if( !elem )
+		return 0;
+	if ((!_protect) && elem->count() == 0)
+		delete elem;
+
+	return 1;
+}
+
+MvElement* MvList::extract(int posit)
+{
+	int	i;
+	MvLink *tokill, *tmp;
+
+	if (posit == -1) return NULL;
+
+	if (_n == 0){
+		cout << "Error in MvList.out: empty list" << "\n";
+		return NULL;
+	}
+
+	if (posit < 0 || posit >= _n){
+		cout << "Error in MvList.out: invalid position "
+		     << posit << "\n";
+		return NULL;
+	}
+
+	if (posit == 0){
+		tokill = _first;
+		if (_n == 1)
+			_first = _last = NULL; // Last element deleted
+		else{
+			_first = _first->_next;
+			_first->_previous = NULL;
+		}
+
+		if (_n == 2) _last = _first;
+	}
+
+	else if (posit == _n-1){
+		tokill = _last;
+		_last = _last->_previous;
+		_last->_next = NULL;
+	}else{
+		tokill = _first;
+		for (i=0; i<posit; i++)
+			tokill = tokill->_next;
+		tmp = tokill->_previous;
+		tmp->_next = tokill->_next;
+		tmp = tokill->_next;
+		tmp->_previous = tokill->_previous;
+	}
+
+	_n--;
+
+	/* if removing _current reset */
+	if(tokill == _current) {
+		_current = _current->_next;
+		if(!_current) _curpos = -1;
+	}
+		
+	MvElement *elem = tokill->_self;
+	delete tokill;
+return elem;
+}
+void MvList :: sort()
+{
+	// execute sort algorithm
+
+	MvLink *current = _first, *next;
+	int i;
+	for ( i = 1; i <= _n; i++)
+	{
+		next = current->_next;
+		sort(i, current);
+		current = next; 
+	}
+
+	// update _curpos and _last
+
+	_curpos = (_first ? 0 : -1);
+	current = _last = _first;
+
+	if (!_last) return;
+	for (i = 1; i < _n; i++)
+		current = current->_next;
+	current->_next = NULL;
+	_last = current;
+	_first->_previous = NULL;
+}
+
+// Bubble sort. This function will finish
+// with a sorted list of size pos+2
+
+/* void MvList :: sort(int pos, MvLink* toinsert)
+{
+	if (pos <= 1) return;
+
+	MvLink *current = _first, *previous = NULL;
+	for (int i = 1; i < pos; i++)
+	{
+		if (compare(toinsert, current) < 0)
+		{
+			if (current == _first)
+			{
+				_first = toinsert;
+				toinsert->_next = current;
+			}
+			else
+			{
+				previous->_next = toinsert;
+				toinsert->_next = current;
+			}
+			break;
+			
+		}
+		toinsert->_previous = previous;
+		current->_previous = toinsert;
+		previous = current;
+		current = current->_next;
+	}
+}
+*/
+
+
+void MvList :: sort(int pos, MvLink* toinsert)
+{
+	if (pos <= 1) return;
+
+	MvLink *current = _first, *previous = NULL;
+	MvLink	*cnext = NULL,
+		*tprev = NULL;
+
+	if( toinsert == NULL )
+		return;
+
+	for (int i = 1; i < pos; i++)
+	{
+		if (compare(toinsert, current) < 0){
+			if( current == _first )
+				_first = toinsert;
+
+			cnext = current->_next;
+			tprev = toinsert->_previous;
+
+			toinsert->_previous = current->_previous;
+			current->_next = toinsert->_next;
+			toinsert->_next = ( cnext == toinsert ) ? ( current ) : ( cnext );
+			current->_previous = ( tprev == current ) ? ( toinsert ) : ( tprev );
+
+			if( cnext != NULL && cnext != toinsert )
+				cnext->_previous = toinsert;
+			if( tprev != NULL && tprev != current )
+				tprev->_next = current;
+			if( current->_next != NULL )
+				current->_next->_previous = current;
+			if( toinsert->_previous != NULL )
+				toinsert->_previous->_next = toinsert;
+			break;
+		}
+		previous = current;
+		current = current->_next;
+			
+	}
+}
+
+
+//
+// INQUIRIES
+//
+
+MvElement* MvList::get(int posit)
+{
+	MvElement* elem;
+	int i = 0;
+
+	if (_n == 0 || (posit < 0 || posit >= _n))
+		return NULL;
+
+	for(elem = first(), i=0; elem; elem = next(), i++) 
+		if(posit == i) return elem;
+
+	return 0;
+}
+
+MvElement* MvList::first ()
+{
+	_current = _first;
+	_curpos = 0;
+	return ( _current? _current->_self : NULL);
+}
+
+MvElement* MvList::next ()
+{
+	if (_current == NULL) return(NULL);
+
+	_current =  _current->_next;
+	_curpos++;
+	return (_current ? _current->_self : NULL);
+}
+
+MvElement* MvList::previous ()
+{
+	if (_current == NULL) return(NULL);
+
+	_current =  _current->_previous;
+	_curpos--;
+	return (_current ? _current->_self : NULL);
+}
+
+int MvList :: positionOf (MvElement* elem)
+{
+	MvElement* curr;
+	int i;
+
+	for (curr = first(), i = 0; curr; curr = next(), i++)
+		if (elem == curr) break;
+
+	return ((elem == curr) ? i : -1 );
+}
+
+MvElement* MvList :: findByCode (int code)
+{
+	MvElement* elem;
+
+	if(!_first) return 0;
+
+	for (elem = first(); elem; elem = next())
+	{
+		if(elem->_elem_code == code) return elem;
+		if (_sort_by == SortListByCode && elem->_elem_code > code) return 0;
+	}
+	return 0;
+}
+
+MvElement * MvList :: findByName (const char *name)
+{
+	if(!name) return 0;
+	if (!_first) return 0;
+
+	MvElement *elem=0;
+	char *n = new char[strlen(name)+1];
+	strcpy(n, name);
+	convertCase(n);
+	for (elem = first(); elem; elem = next())
+	{
+		if (!elem->_elem_name) continue;
+		int cmp = strcmp(n, elem->_elem_name);
+
+		if(!cmp)
+			break;
+		if (_sort_by == SortListByName && cmp<0) {
+			elem = 0;
+			break;
+		}
+	}
+	delete [] n;
+	return elem;
+}
+
+MvElement * MvList :: findNearestCode (int code)
+{
+	MvElement *elem;
+
+	if (!_first) return 0;
+	if (_sort_by != SortListByCode) return 0;
+
+	for (elem = first(); elem; elem = next())
+	{
+		if(elem->_elem_code > code) return elem;
+	}
+	return 0;
+}
+
+MvElement* MvList :: findNearestName (const char *name)
+{
+	if(!name) return 0;
+	if (!_first) return 0;
+	if (_sort_by != SortListByName) return 0;
+
+	MvElement* elem=0;
+	char *n = new char[strlen(name)+1];
+	strcpy(n, name);
+	convertCase(n);
+
+	for (elem = first(); elem; elem = next())
+	{
+		if (strcmp (n, elem->_elem_name) < 0) break;
+	}
+	delete [] n;
+	return elem;
+}
+
+int MvList :: compare(MvLink* link1, MvLink* link2)
+{
+	
+	if( link1 == NULL ){
+		if( link2 == NULL )
+			return 0;
+		else
+			return -1;
+	}
+	else{
+		if( link2 == NULL )
+			return 1;
+	}
+	if (_list_type != SortedList || _sort_by == SortListByCode)
+	{
+		int code1 = link1->_self->getElemCode();
+		int code2 = link2->_self->getElemCode();
+		return (code1 == code2 ? 0 : (code1 < code2 ? -1 : 1));
+	}
+	else
+		return strcmp(link1->_self->getElemName(), link2->_self->getElemName());
+	
+}
+
+// REPLACE, REMOVE FROM LIST
+
+// Replace current link
+void  MvList :: replaceCurr(MvElement *newelem)
+{
+	if (remove(_curpos))
+		insertPrivate(_curpos,newelem);
+}
+
+// Remove	- but don't free - current link
+// 			- return ptr to link for delete
+
+void  MvList :: removeCurr()
+{
+	remove(_curpos);
+}
+
+
+void MvList :: removeByCode (int code)
+{
+	MvElement* elem = findByCode(code);
+	if (elem) removeCurr();
+}
+
+void MvList :: removeByName (const char *name)
+{
+	MvElement* elem = findByName(name);
+	if (elem) removeCurr();
+}
+
+
+void MvList :: convertCase (char *data)
+{
+	int i;
+
+	if( data == NULL )
+		return;
+
+	switch (_list_case)
+	{
+		case NoCase : break;
+
+		case LowerCase :
+			for (i=0; i<strlen(data); i++) 
+				data[i] = tolower(data[i]);
+			break;
+
+		case UpperCase :
+			for (i=0; i<strlen(data); i++) 
+				data[i] = toupper(data[i]);
+			break;
+		
+		default : break;
+	}
+}
+
diff --git a/src/libUtil/MvList.hpp b/src/libUtil/MvList.hpp
new file mode 100644
index 0000000..90c3884
--- /dev/null
+++ b/src/libUtil/MvList.hpp
@@ -0,0 +1,225 @@
+#ifndef MvList_H
+#define MvList_H
+
+/****************************************************************************
+* 
+* Classes MvLink and MvList - sorted double linked list
+*
+****************************************************************************/
+
+typedef enum { NoCase, LowerCase, UpperCase } ListCase;
+typedef enum { SequentialList, SortedList} ListType;
+typedef enum { NoSortBy, SortListByCode, SortListByName } ListSortBy;
+typedef enum { NoSortType, SortListSingular, SortListMultiple } ListSortType;
+
+#include <MvElement.hpp>
+
+class MvList;
+
+//
+// Class MvLink
+//
+// This class is used exclusively by the MvList and implement one
+// entry of the linked list
+//
+
+class MvLink
+{
+protected:
+
+	friend	class	MvList;
+	MvElement*	_self;
+	MvLink*		_next;
+	MvLink*		_previous;
+
+public:
+	MvLink (MvElement* itself, MvLink* previous = NULL, MvLink* next = NULL)
+	{ _self = itself; _next = next; _previous = previous; _self->increment(); }
+
+	~MvLink () { _self->decrement(); }
+};
+
+//
+// Class MvList
+//
+// This class implements sorted double linked list
+//
+
+class MvList
+{
+protected :
+
+	MvLink*			_first;
+	MvLink*			_last;
+	int			_n;
+	MvLink*			_current;
+	int			_curpos;	// position of current element
+	int			_protect;
+
+	ListType		_list_type;
+	ListSortBy		_sort_by;
+	ListSortType		_sort_type;
+	ListCase		_list_case;
+
+// Private functions
+
+	void searchInit ();
+
+	void insertPrivate(int, MvElement*);
+	void insertFirstPrivate(MvElement* v) { insertPrivate(0,v); }
+	void insertLastPrivate(MvElement*);
+
+	void sort(int pos, MvLink*);
+	int compare(MvLink*, MvLink*);
+
+public:
+	MvList (int protect = 0);
+	//	Constructor
+	//	Input:
+	//		deleteElement: if TRUE, MvElement is deleted when MvLink
+
+	MvList (ListType, ListSortBy, ListSortType, ListCase, int protect = 0, MvElement * = 0L);
+	//	Constructor of empty list
+	//	Input:
+	//		type, link type, sort, sorttype and case
+	//		deleteElement: if TRUE, MvElement is deleted when MvLink
+	//		first element of the list
+
+	~MvList () { removeAll(); }
+	//	Delete list and components
+
+	void removeAll();
+	//	The list is emptied and all the contents deleted
+
+	void setListTypes(ListType, ListSortBy, ListSortType, ListCase);
+
+	void print(const char* = NULL);
+	//	Print contents of the list
+	//	Input:
+	//		header to be printed before the list
+
+// Inquire Functions
+
+	MvElement* first();
+	//	Return:
+	//		first element of list and initialize sequential
+	//		retrieval
+
+	MvElement* last() { return (_last ? _last->_self : NULL); } 
+	//	Return:
+	//		last element of list
+
+	MvElement* next();
+	//	Return next element of list
+
+	MvElement* previous();
+	//	Resturn previous element of list
+
+	MvElement* current() { return (_current ? _current->_self : NULL); }
+	//	Return current element of list
+
+	MvElement* get(int posit);
+	//	Input:
+	//		position of element, starting from 0
+
+	//	Return:
+	//		element in the desired position
+
+	int positionOf(MvElement*);
+	//	Input:
+	//		element
+	//	Return:
+	//		position of element starting from 0, if not found -1
+
+	int size() { return _n; }
+	//	Return:
+	//		List size
+
+	inline ListType getListType()		{ return _list_type; }
+	inline ListSortBy getSortBy()		{ return _sort_by; }
+	inline ListSortType getSortType()	{ return _sort_type; }
+	inline int getListCase() 		{ return _list_case; }
+	inline int isEmpty() 			{ return _n==0; }
+
+// Search
+
+	MvElement* findByCode (int);
+	MvElement* findByName (const char *);
+	MvElement* findNearestCode (int);
+	MvElement* findNearestName (const char *);
+
+// Edit List
+
+	void protectElement () { _protect = 1; }
+	//	Set protection flag. Does not delete MvElement
+	//	when the entry in the list is deleted
+
+	void unprotectElement () { _protect = 1; }
+	//	Reset protection flag. Will delete MvElement
+	//	when the entry in the list is deleted
+
+	void insert (int, MvElement*);
+	//	Put element in a certain position
+	//	Input:
+	//		position to insert element, starting from 0
+	//		pointer to element
+
+	void insertFirst (MvElement* elem) { insert(0, elem); }
+	//	Insert element at the beginning of the list
+	//	Input:
+	//		pointer to element
+
+	void insertLast (MvElement*);
+	//	Put element at the end of the List
+	//	Input:
+	//		element
+
+	void append (MvElement* elem) { insertLast(elem); }
+
+	void insertBeforeCurr(MvElement*);
+
+	void insertAfterCurr(MvElement*);
+
+	void replaceCurr(MvElement*);
+
+	MvElement* insertByType(MvElement*);
+	//	Include by Type
+	//	May fail if only singular occurrences allowed
+
+	MvElement* extract( int posit );
+	// Removes object from the list without destroying it
+
+	MvElement* extract(MvElement* elem){ return extract(positionOf(elem)); }
+	// Removes object from the list without destroying it
+
+	int remove(int posit);
+	//	Remove element from list. If the element does not
+	//	occurr in any other list and the list is not of type
+	//	'protected', the element is deleted too.
+	//	Input:
+	//		position to be deleted
+	//	Return:
+	//		1 if deleted
+
+	int remove(MvElement* elem) { return remove(positionOf(elem)); }
+	//	Remove element from list. If the element does not
+	//	occurr in any other list and the list is not of type
+	//	'protected', the element is deleted too.
+	//	Input:
+	//		pointer to element
+	//	Return:
+	//		1 if deleted
+
+	void removeCurr();
+	//	Remove current element
+
+	void removeByCode (int);
+	void removeByName (const char *);
+
+	void sort();
+// Utility
+
+	void convertCase (char *);
+};
+
+#endif
diff --git a/src/libUtil/MvMessageMetaData.h b/src/libUtil/MvMessageMetaData.h
new file mode 100644
index 0000000..ff9d3b2
--- /dev/null
+++ b/src/libUtil/MvMessageMetaData.h
@@ -0,0 +1,67 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvMessageMetaData_H
+#define MvMessageMetaData_H
+
+#include <string>
+#include <vector>
+
+//For file_offset
+#include "mars.h"
+
+using namespace std;
+
+class MvKeyProfile;
+class MvMessageMetaDataObserver; 
+
+class MvMessageMetaData 
+{
+public: 
+	MvMessageMetaData() : firstScan_(true), filterEnabled_(false) {};
+	virtual ~MvMessageMetaData() {};
+	const string& fileName() const {return fileName_;};
+	virtual void setFileName(string)=0;	  	
+	int  messageNum() {return messageNum_;}
+	int  totalMessageNum() {return totalMessageNum_;}	
+	virtual int getEstimatedMessageNum()=0;
+	virtual void loadKeyProfile(MvKeyProfile *)=0;
+	void registerObserver(MvMessageMetaDataObserver* obs) {observer_=obs;}
+	virtual bool useMessageSizeForProgressIndicator() {return false;}
+	bool isFilterEnabled(){ return filterEnabled_;}
+	virtual void setFilter(vector<file_offset>,vector<int>){};
+	int unfilteredMessageCnt(int cntStartFromZero)
+		 {return (filterEnabled_)?(filterCnt_[cntStartFromZero]):cntStartFromZero+1;}
+
+protected:			
+	string fileName_;
+	int messageNum_;
+	int totalMessageNum_;
+	bool firstScan_;
+	bool filterEnabled_;
+	vector<file_offset> filterOffset_;
+	vector<int> filterLen_;
+	vector<int> filterCnt_;
+
+	MvMessageMetaDataObserver *observer_;
+
+};
+
+
+class MvMessageMetaDataObserver 
+{
+
+public:
+	MvMessageMetaDataObserver() {};
+	virtual ~MvMessageMetaDataObserver() {};
+    
+	virtual void messageScanStepChanged(int) {}
+};
+
+#endif
diff --git a/src/libUtil/MvMiscelaneous.cc b/src/libUtil/MvMiscelaneous.cc
new file mode 100644
index 0000000..f69c0f5
--- /dev/null
+++ b/src/libUtil/MvMiscelaneous.cc
@@ -0,0 +1,190 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvMiscelaneous.h"
+#include "MvPath.hpp"
+
+#if defined(METVIEW_AIX_XLC)
+inline double exp10(const double r) { return exp(r*2.302585093);} // exp(r*ln(10))
+#endif
+
+namespace metview {
+
+// Call a shell command
+// Returns the result and an error message
+void shellCommand(string &command, stringstream& out,stringstream& err)
+{
+	FILE *in;
+	char cbuf[512];
+
+	// Create a temporary file
+	string ftmp = MakeTmpPath("temp");
+	string cmd = command + " 2>" + ftmp;
+
+	if (!(in = popen(cmd.c_str() ,"r")) )
+		return;
+
+	while(fgets(cbuf, sizeof(cbuf), in) != NULL)
+		out << cbuf;
+
+	pclose(in);
+
+	if (!(in = fopen(ftmp.c_str() ,"r")) )
+		return;
+
+	while(fgets(cbuf, sizeof(cbuf), in) != NULL)
+		err << cbuf;
+
+	fclose(in);
+
+	// Remove temporary file
+	string com = "rm -f " + ftmp;
+	system(com.c_str());
+}
+
+bool createWorkDir(string prefix,string& tmpPath,string& errTxt)
+{
+ 	string tmpRoot;
+	
+	char *mvtmp=getenv("METVIEW_TMPDIR");
+	if (mvtmp == 0)  
+	{	
+		errTxt="No env variable METVIEW_TMPDIR is not defined!";
+		return false;
+	}
+	else
+	{
+		tmpRoot=string(mvtmp);
+	}
+
+	time_t sec=time(NULL);
+  	srand (sec);
+  	int rNum = rand() % 1000 + 1;
+
+ 	std::stringstream out;
+  	out << tmpRoot << "/" + prefix + "_" << sec << "_" << rNum; 
+	tmpPath=out.str();
+	
+	if(mkdir(tmpPath.c_str(),0777) != 0)
+	{
+		errTxt="Could not genarate work directory: " + tmpPath;
+		return false;
+	}
+	
+	return true;
+}  
+
+/*! 
+  \brief computes the saturation  mixing ratio
+
+  This method computes the saturation mixing ratio.
+
+  \param t  temperature in K 
+  \param p  pressure in Pa
+  \return   saturation mixing ratio in kg/kg 
+*/
+
+double saturationMixingRatio(double t, double p)
+{
+	double e=saturationVapourPressure(t); 
+  	return 0.621981*e/(p-e); 
+}
+
+/*! 
+  \brief computes the saturation  mixing ratio
+
+  This method computes the relative himidity.
+
+  \param t  temperature in K 
+  \param p  pressure in Pa
+  \return   relative humidity (0-1) 
+*/
+
+double relativeHumidity(double t, double p,double q)
+{
+	double es=saturationVapourPressure(t);
+	double e=vapourPressure(p,q);
+	
+  	return e/es; 
+}
+
+/*! 
+  \brief computes the specific humidity
+
+  This method computes specific humidity from relative humidity
+
+  \param t  temperature in K 
+  \param p  pressure in Pa
+  \param r  relative humidity (0-1) 
+  \return   specific humidity in kg/kg 
+*/
+
+double specificHumidity(double t, double p,double r)
+{
+  	double ws=saturationMixingRatio(t,p);
+	double w=r*ws;
+	
+	return w/(1.+w);
+}
+
+/*! 
+  \brief computes the saturation vapour pressure over water from temperature
+ 
+  This method computes the saturation vapour pressure
+  over water and ice from temperature.
+
+  \param t temperature in K 
+  \return pressure in Pa   
+*/   
+
+double saturationVapourPressure(double t)
+{
+	double c1    = 611.21;
+	double c3l   = 17.502;
+	double c4l   = 32.19;
+	double c3i   = 22.587;
+	double c4i   = -0.7;
+	double t0      = 273.16;
+	double ti= 250.16;
+	
+	//Saturation vapour pressure over water
+	double es_water = c1*exp(c3l*(t-t0)/(t-c4l)); 
+	
+	//Saturation vapour pressure over ice
+	double es_ice  = c1*exp( c3i*(t-t0)/(t-c4i)); 
+
+	//fraction of liquid water	
+	double alpha;
+	if(t <= ti)
+	  	alpha=0.;
+	else if (t > ti && t <t0)
+	  	alpha=(t-ti)/(t0-ti);
+	else
+	  	alpha=1.;
+		
+	return alpha*es_water+(1.-alpha)*es_ice;
+}	
+
+/*! 
+  \brief computes the vapour pressure over from temperature and spec humidity
+ 
+  This method computes the vapour pressure
+  from temperature and specific humidity.
+
+  \param t temperature in K
+  \param q specific humidity in kg/kg
+  \return pressure in Pa   
+*/   
+double vapourPressure(double p,double q)
+{
+	double w=q/(1-q);
+	return p*w/(0.621981+w);
+}  
+  
+} //namespace metview
diff --git a/src/libUtil/MvMiscelaneous.h b/src/libUtil/MvMiscelaneous.h
new file mode 100644
index 0000000..14aaf6f
--- /dev/null
+++ b/src/libUtil/MvMiscelaneous.h
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MVMISCELANEOUS_H_
+#define MVMISCELANEOUS_H_
+
+#include <string>
+#include <sstream>
+#include <vector>
+
+using namespace std;
+namespace metview {
+
+void shellCommand(string&, stringstream&, stringstream&);
+bool createWorkDir(string prefix,string& tmpPath,string& errTxt);
+double saturationMixingRatio(double t, double p);
+double relativeHumidity(double t, double p,double q);
+double specificHumidity(double t, double p,double r);
+double saturationVapourPressure(double t);
+double vapourPressure(double p,double q);
+
+template<typename TYPE>
+inline string toString(const TYPE& in)
+{
+	ostringstream os;
+	os  <<  in;
+	return os.str();
+}
+
+} // namespace metview
+
+#endif
diff --git a/src/libUtil/MvMsg.h b/src/libUtil/MvMsg.h
new file mode 100644
index 0000000..cca1199
--- /dev/null
+++ b/src/libUtil/MvMsg.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvMsg_H
+#define MvMsg_H
+
+/* Messages */
+
+#define MSG_NOT_IMPL		"VisMod.001"
+
+/* System Messages */
+
+#define SYSTEM_GKS_WS		"VisMod.200"
+#define SYSTEM_UNEXPECTED	"VisMod.201"
+#define SYSTEM_PW_IO		"VisMod.202"
+#define SYSTEM_PW_NOT_FOUND     "VisMod.203"
+#define	SYSTEM_GERROR		"VisMod.204"
+#define SYSTEM_FILE_ERROR	"VisMod.205"
+#define SYSTEM_VISDEF_FILE_ERROR "VisMod.206"
+#define SYSTEM_FILE_NOT		"VisMod.207"
+#define SYSTEM_PW_INVALID       "VisMod.208"
+#define SYSTEM_MAGPROC_ERROR	"VisMod.209"
+
+/* User Error */
+
+#define DATA_UNIT_EMPTY		"VisMod.300"
+#define PW_JOIN_ERROR		"VisMod.301"
+
+/* MagProc Errors */
+
+#define MAGPROC_OK         -1
+#define MAGPROC_ERR_MAGICS  0
+#define MAGPROC_ERR_VISDEF  1
+#define MAGPROC_ERR_FILE    2
+#define MAGPROC_ERR_GKS     3
+#define MAGPROC_ERR_SLIDE   4
+#define MAGPROC_ERR_PHYSICAL 5
+
+#ifdef _MV_DECLARE
+/*
+*deleteme*char* MAGPROC_ERRLIST[] =
+*deleteme*{
+*deleteme*	"MagProc.MAG",		* 0 *
+*deleteme*	"MagProc.VISDEF",	* 1 *
+*deleteme*	"MagProc.FILE",		* 2 *
+*deleteme*	"MagProc.GKS",		* 3 *
+*deleteme*	"MagProc.SLIDE",	* 4 *
+*deleteme*	"MagProc.PHYSICAL"	* 5 *
+*deleteme*};
+*/
+
+const char* MAGPROC_ERRLIST[] =
+{
+	"Magics error",
+	"VisDef not found or invalid",
+	"Cannot open description file",
+	"GKS error",
+ 	"Slide error",
+	"Physical error"	
+};
+
+#else
+extern const char* MAGPROC_ERRLIST[];
+#endif
+
+#ifdef _MV_DECLARE
+#undef _MV_DECLARE
+#endif
+
+#endif
diff --git a/src/libUtil/MvOda.h b/src/libUtil/MvOda.h
new file mode 100644
index 0000000..e4eb4b1
--- /dev/null
+++ b/src/libUtil/MvOda.h
@@ -0,0 +1,114 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvOda_H
+#define MvOda_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+#include <assert.h>
+
+//#include <Metview.h>
+//#include "MvObs.h"
+
+using namespace std;
+
+
+class MvOdaBitfieldMember
+{
+public:
+	MvOdaBitfieldMember(string name,int pos, int size) : name_(name), 
+						       pos_(pos), 
+					               size_(size) {}
+	string name() {return name_;}
+	int pos() {return pos_;}
+	int size() {return size_;}
+
+private:						   
+	string name_;
+	int pos_;
+	int size_;
+};
+
+
+class MvOdaColumn
+{
+public:
+	enum OdaColumnType {None, Int, Float, String, Bitfield};
+
+	MvOdaColumn() : type_(None), num_(0), min_(1.0e+08), max_(-1.0e+08) {};
+	void addToStats(float);
+	void compStats();
+
+	string name() {return name_;}
+	OdaColumnType type() {return type_;}
+	string unit() {return unit_;}
+	const  vector<MvOdaBitfieldMember*>& bitfield() {return bitfield_;}
+	int bitfieldNum() {return bitfield_.size();}
+
+	float  min()  {return min_;}
+	float  max()  {return max_;}
+	float  avg()  {return avg_;}
+	float  std()  {return std_;}
+	
+	void   setName(string s) {name_=s;}
+	void   setType(OdaColumnType s) {type_=s;}
+	void   setUnit(string s) {unit_=s;}
+	void   addBitfieldMember(MvOdaBitfieldMember* b) {bitfield_.push_back(b);};
+	
+	
+private:
+	void clear();
+
+	string name_;
+	OdaColumnType type_;
+	string unit_;
+	vector<MvOdaBitfieldMember*> bitfield_;
+
+	int    num_;
+	float  min_;
+	float  max_;
+	float  avg_;
+	float  std_;	
+
+	vector<float> fval_;
+	vector<string> sval_;
+};
+
+class MvOda
+{ 
+public:
+	MvOda(string);
+	~MvOda();
+	void init();	  	
+
+	string fileName() {return fileName_;}
+	string query()    {return query_;}
+	int rowNum()   {return rowNum_;}
+	int columnNum() {return data_.size();}
+
+	void generateStats(int);
+	void retrieve(string,string);
+
+	const vector<MvOdaColumn*>& column() {return data_;}
+
+protected:			
+	void readData();
+	
+	int rowNum_;
+	string fileName_;
+	string query_;
+	vector<MvOdaColumn*> data_;
+
+
+};
+
+#endif
\ No newline at end of file
diff --git a/src/libUtil/MvOdb.cc b/src/libUtil/MvOdb.cc
new file mode 100644
index 0000000..d801a4e
--- /dev/null
+++ b/src/libUtil/MvOdb.cc
@@ -0,0 +1,1091 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <MvOdb.h>
+
+using namespace std;
+
+#ifdef METVIEW_ODB_NEW
+#include "odb_api.h"
+using namespace odb;
+
+extern "C" {
+#include "odbcapi.h"
+}
+#endif
+
+//This include must come after the oda includes, otherwise
+//compilation fails!!
+#include "MvScanFileType.h"
+
+const int intMissingValue = -2147480000;
+const int floatMissingValue = -2.14748e+09;
+
+#ifdef METVIEW_ODB_NEW
+static map<odb::ColumnType,MvOdbColumn::OdbColumnType> typeMap;
+#endif
+
+void MvOdbColumn::setName(string s)
+{
+  	name_=s;
+	
+	shortName_=name_;
+	std::size_t pos=name_.find("@");
+	if(pos != string::npos)
+	{
+		shortName_=name_.substr(0,pos);
+	}
+}
+
+void MvOdbColumn::addToStats(float val)
+{	
+	num_++;
+
+	if(val == floatMissingValue) return;
+
+	if(min_> val)
+	{
+		min_=val;
+	}
+	if(max_ < val)
+	{
+		max_=val;
+	}
+	avg_+=val;
+	std_+=val*val;
+}
+
+
+void MvOdbColumn::compStats()
+{
+	if(num_> 0)
+	{
+		avg_/=num_;
+		std_=sqrt(std_/num_-avg_*avg_);
+	}
+}
+
+void MvOdbColumn::setLoaded(bool flag)
+{
+	if(!flag)
+		unload();
+
+	loaded_=flag;
+}		
+
+void MvOdbColumn::unload()
+{
+	fval_.clear();
+	ival_.clear();
+	sval_.clear();
+	loaded_=false;
+}
+
+int MvOdbColumn::rowNum() const
+{
+	if(!loaded_)
+		return -1;
+	
+	if(fval_.size() >0)
+		return fval_.size();	
+	if(ival_.size() >0)
+		return ival_.size();	
+	if(sval_.size() >0)
+		return sval_.size();
+
+	return -1;
+}
+
+
+//=============================
+//
+// MvAbstratcOdb
+//
+//=============================
+
+MvAbstractOdb::MvAbstractOdb(string path,string sourcePath,string query,OdbVersion version) :
+	path_(path),sourcePath_(sourcePath), query_(query), version_(version), 
+	chunkSize_(0), currentChunk_(0), nbRowsInChunk_(0)
+{
+	//init();
+}
+
+MvAbstractOdb::MvAbstractOdb(string path,OdbVersion version) : path_(path) , version_(version) 
+{
+	//init();
+}
+
+MvAbstractOdb::~MvAbstractOdb()
+{
+	for(vector<MvOdbColumn*>::iterator it=column_.begin(); it != column_.end(); it++)
+	{
+		delete *it;
+	}
+}
+
+void MvAbstractOdb::detectOdbVersion()
+{
+	struct stat buf;
+
+	const char* fname=path_.c_str();
+
+ 	if(stat(fname,&buf) <0)
+    	{
+		version_=UnknownVersion;
+		return;
+	}
+
+	switch(buf.st_mode & S_IFMT)
+  	{
+    	case S_IFDIR:
+      		version_=VersionOld;
+		break;;
+
+    	case S_IFREG:
+		if(ScanFileType(fname) == "ODB_DB")
+			version_=VersionNew;
+		else
+			version_=UnknownVersion;
+
+		break;
+
+    	default:
+      		version_=UnknownVersion;
+  	}
+}
+
+//=============================
+//
+// MvOdb
+//
+//=============================
+
+#ifdef METVIEW_ODB_NEW
+
+MvOdb::MvOdb(string path,string sourcePath,string query) :
+	MvAbstractOdb(path,sourcePath,query,VersionNew)
+{
+	init();
+}
+
+MvOdb::MvOdb(string path) : 
+	MvAbstractOdb(path,VersionNew)
+{
+	init();
+}
+
+MvOdb::~MvOdb()
+{
+}
+
+void MvOdb::init()
+{
+	if(version_ != VersionNew)
+		return;
+
+	headerIsRead_=false;
+	rowNum_=-1;
+
+	if(typeMap.empty() == true)
+	{
+		typeMap[odb::IGNORE]=MvOdbColumn::None;
+		typeMap[odb::INTEGER]=MvOdbColumn::Int;
+		typeMap[odb::REAL]=MvOdbColumn::Float;
+		typeMap[odb::STRING]=MvOdbColumn::String;
+		typeMap[odb::BITFIELD]=MvOdbColumn::Bitfield;
+	}
+
+	odb_start();
+	
+}
+
+void MvOdb::readMetaData()
+{  
+	if(headerIsRead_)
+		return;
+
+	//string SELECT  = "select * from \"" + path_ + "\";";
+
+	//ODA oda("");
+	odb::Reader oda(path_);
+        //int row=0;
+
+	//odb::Reader::iterator end = oda.end();
+	odb::Reader::iterator beg = oda.begin();
+	//Columns
+
+	//ODA::iterator it = oda.begin();
+	//MetaData cols=oda.begin()->columns();
+
+	//rowNum_=0;
+
+	//size_t n = beg.columns().size();
+
+	for(odb::MetaData::iterator it=beg->columns().begin(); it != beg->columns().end(); ++it)
+	{	
+		MvOdbColumn* acol = new MvOdbColumn;
+
+		//if(rowNum_==0)
+		//	rowNum_=(*it)->noRows();
+
+		string s=(*it)->name();
+
+		//cout << s << endl;
+
+		acol->setName(s);
+		if(typeMap.find((*it)->type()) != typeMap.end())
+		{
+			acol->setType(typeMap[(*it)->type()]);
+		}
+		
+
+		if(acol->type() == MvOdbColumn::Bitfield) 
+		{
+			int pos=0;
+			for(unsigned int i=0; i < (*it)->bitfieldDef().first.size() ; i++)
+			{				
+				string name=(*it)->bitfieldDef().first.at(i);
+				int size=(*it)->bitfieldDef().second.at(i);
+				acol->addBitfieldMember(new MvOdbBitfieldMember(name,pos,size));
+				pos+=size;
+			}
+		}								
+
+		column_.push_back(acol);
+	}
+
+	//int colNum=column_.size();
+
+	/*rowNum_=0;
+	for (ODA::iterator it = oda.begin(); it != end; ++it)
+	{
+		rowNum_++;
+	}*/
+
+//        for (ODA::select_iterator it = oda.select(SELECT);
+//                it != oda.selectEnd() ; ++it, ++row)
+//        {
+
+	/*for (ODA::iterator it = oda.begin(); it != end; ++it)
+	{
+
+		for(int i=0; i < colNum; i++)
+		{
+			if(column_[i]->type() == MvOdaColumn::Float || column_[i]->type() == MvOdaColumn::Int)
+			{
+					
+				column_[i]->addToStats(it->data(i));
+			}
+		}
+        }
+
+	for(int col=0; col < column_.size(); col++)
+	{
+		column_[col]->compStats();
+		cout << column_[col]->name() << " " << column_[col]->type() << endl;
+		cout << " " << column_[col]->min() << " " <<  column_[col]->max() << " " <<
+                column_[col]->avg() << " " << column_[col]->std() << endl;
+	}*/
+
+	headerIsRead_=true;
+}
+
+void MvOdb::generateStats(int column)
+{
+	int col=column;
+
+	odb::Reader oda(path_);
+
+	odb::Reader::iterator end = oda.end();
+	for (odb::Reader::iterator it = oda.begin(); it != end; ++it)
+	{	
+		if(column_[col]->type() == MvOdbColumn::Float || column_[col]->type() == MvOdbColumn::Int)
+		{					
+			column_[col]->addToStats((*it)[col]);
+		}
+        }
+
+	column_[col]->compStats();
+}
+
+int MvOdb::totalSizeInMb()
+{
+  	float mb=1048576;
+  
+  	int rowNum=this->rowNum();
+  	
+  	size_t intSize=sizeof(int);
+  	size_t floatSize=sizeof(float);
+	
+	float totalSize=0.;
+	
+  	for(unsigned int i=0; i < column_.size() ; i++)
+	{
+		if(column_[i]->type() == MvOdbColumn::Int)
+		{
+			totalSize+=(rowNum*intSize)/mb;
+		}
+		else if(column_[i]->type() == MvOdbColumn::Float)
+		{
+			totalSize+=(rowNum*floatSize)/mb;
+		}
+		else if(column_[i]->type() == MvOdbColumn::String)
+		{
+			totalSize+=(rowNum*8)/mb;
+		}
+		else
+		{
+		  	totalSize+=(rowNum*floatSize)/mb;
+		}
+	}	
+
+	return static_cast<int>(totalSize);
+}
+	  
+int MvOdb::rowNum()
+{
+	if(rowNum_ != -1)
+		return rowNum_;
+	
+	readMetaData();
+	for(unsigned int i=0; i < column_.size() ; i++)
+	{
+		if(column_[i]->isLoaded())
+		{
+			return column_[i]->rowNum();
+		}
+	}
+	
+
+	odb::Reader oda(path_);
+
+	//Create iterator
+	odb::Reader::iterator it = oda.begin();
+
+	int i=0	;
+	for (; it != oda.end(); ++it) 
+	{			
+		i++;		
+	}
+
+	rowNum_=i;
+	
+	return rowNum_;
+}
+
+int MvOdb::columnNum() 
+{
+	readMetaData(); 
+	return column_.size();
+}
+
+const vector<MvOdbColumn*>& MvOdb::columns() 
+{
+	readMetaData(); 
+	return column_;
+}	
+
+int MvOdb::findColumn(string cname)
+{
+	readMetaData();
+	for(unsigned int i=0; i < column_.size() ; i++)
+	{
+		if(cname == column_[i]->name())
+		{	
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+bool MvOdb::hasColumn(const string& cname)
+{
+	readMetaData();
+	
+	//We try with the full column name
+	for(unsigned int i=0; i < column_.size() ; i++)
+	{
+		if(cname == column_[i]->name())
+		{	
+			return true;
+		}
+	}
+  
+  	//If there is no match we try without the @tablename suffix
+  	
+	string shortName=cname;
+	std::size_t pos=cname.find("@");
+	if(pos != string::npos)
+	{
+		shortName=cname.substr(0,pos);
+	}
+	
+	//We try with the full column name
+	for(unsigned int i=0; i < column_.size() ; i++)
+	{
+		if(shortName == column_[i]->shortName())
+		{	
+			return true;
+		}
+	}
+	
+	return false;	
+}	
+			
+
+const MvOdbColumn* MvOdb::loadColumn(int pos,bool reload)
+{
+	readMetaData();
+
+	if(pos < 0 || pos >= static_cast<int>(column_.size()))
+		return 0;
+		
+	if(reload)	
+	{
+	  	column_[pos]->unload();
+	}
+	else if(column_[pos]->isLoaded())
+	{
+	  	return column_[pos];
+	}
+	
+	string sval;
+
+    	odb::Reader oda(path_);
+
+	//Create iterator
+	odb::Reader::iterator it = oda.begin();
+
+	//Jump to the given chunk
+	if(chunkSize_ != 0)
+	{
+		int i=0;
+		for(; it != oda.end() && i < chunkSize_*currentChunk_; ++it, i++) 
+		{		
+		}
+
+		if(column_[pos]->type() == MvOdbColumn::String)
+		{
+			i=0;
+			for(; it != oda.end() && i < chunkSize_; ++it, i++) 
+			{			
+				column_[pos]->addStringData((*it).string(pos));		
+			}
+		}
+		else if(column_[pos]->type() == MvOdbColumn::Int)
+		{
+			i=0;
+			for(; it != oda.end() && i < chunkSize_; ++it, i++) 
+			{	
+				column_[pos]->addIntData(static_cast<int>((*it)[pos]));			 
+			}
+		}	
+		else
+		{
+			i=0;
+			for(; it != oda.end() && i < chunkSize_; ++it, i++) 
+			{			
+				column_[pos]->addFloatData((*it)[pos]);		
+			}
+		}
+	}
+	//No chunks are used for load
+	else
+	{
+		if(column_[pos]->type() == MvOdbColumn::String)
+		{
+			for(; it != oda.end(); ++it) 
+			{			
+				column_[pos]->addStringData((*it).string(pos));		
+			}
+		}
+		if(column_[pos]->type() == MvOdbColumn::Int)
+		{
+			for(; it != oda.end(); ++it) 
+			{			
+				column_[pos]->addIntData(static_cast<int>((*it)[pos]));		
+			}
+		}
+		else
+		{
+			for(; it != oda.end(); ++it) 
+			{			
+				column_[pos]->addFloatData((*it)[pos]);		
+			}
+		}
+	}
+
+	column_[pos]->setLoaded(true);
+
+	return column_[pos];
+}
+
+const MvOdbColumn* MvOdb::loadColumn(string cname,bool reload)
+{
+	int colPos=findColumn(cname);
+	return loadColumn(colPos,reload);
+}
+
+void MvOdb::unloadColumn(int pos)
+{
+	readMetaData();
+
+	if(pos < 0 || pos >= static_cast<int>(column_.size()))
+		return;
+		
+	column_[pos]->unload();
+}
+
+void MvOdb::unloadColumn(string cname)
+{
+	int colPos=findColumn(cname);
+	unloadColumn(colPos);
+}
+
+void MvOdb::loadAllColumns()
+{
+	readMetaData();
+
+	unloadAllColumns();
+
+	string sval;
+
+    	odb::Reader oda(path_);
+
+	//Create iterator
+	odb::Reader::iterator it = oda.begin();
+
+	//Jump to the given chunk
+	if(chunkSize_ != 0)
+	{
+		int i=0;
+		for(; it != oda.end() && i < chunkSize_*currentChunk_; ++it, i++) 
+		{		
+		}
+
+		i=0;
+		for(; it != oda.end() && i < chunkSize_; ++it, i++) 
+		{			
+			for(int pos=0; pos < static_cast<int>(column_.size()); pos++)
+			{
+				if(column_[pos]->type() == MvOdbColumn::String)
+				{  
+					column_[pos]->addStringData((*it).string(pos));
+				}
+				else if(column_[pos]->type() == MvOdbColumn::Int)
+				{
+				  	column_[pos]->addIntData(static_cast<int>((*it)[pos]));			 
+				}
+				else
+				{
+				  	column_[pos]->addFloatData((*it)[pos]);			
+				}
+			}	
+		}
+	}
+	//No chunks are used for load
+	else
+	{
+		for(; it != oda.end(); ++it) 
+		{	
+			for(int pos=0; pos < static_cast<int>(column_.size()); pos++)
+			{
+				if(column_[pos]->type() == MvOdbColumn::String)
+				{
+					column_[pos]->addStringData((*it).string(pos));		
+				}
+				else if(column_[pos]->type() == MvOdbColumn::Int)
+				{
+					column_[pos]->addIntData(static_cast<int>((*it)[pos]));				
+				}  
+				else
+				{				
+					column_[pos]->addFloatData((*it)[pos]);		
+				}
+			}
+		}
+	}
+
+	for(int pos=0; pos < static_cast<int>(column_.size()); pos++)
+		column_[pos]->setLoaded(true);
+
+}
+
+void MvOdb::unloadAllColumns()
+{
+	readMetaData();
+
+	for(int pos=0; pos < static_cast<int>(column_.size()); pos++)
+		column_[pos]->unload();
+}
+
+
+const MvOdbColumn* MvOdb::column(int pos)
+{
+	readMetaData();
+
+	if(pos < 0 || pos >= static_cast<int>(column_.size()))
+		return 0;
+
+	return column_[pos];	
+}
+
+const MvOdbColumn* MvOdb::column(string cname)
+{
+	int colPos=findColumn(cname);
+	return column(colPos);
+}
+
+void MvOdb::setCurrentChunk(int chunk)
+{
+	if(chunkSize_ <=0 || chunk < 0)
+		return;
+
+	if(currentChunk_ != chunk)
+	{
+		currentChunk_=chunk;
+		for(unsigned int i=0; i < column_.size() ; i++)
+		{
+			unloadColumn(i);
+		}
+	} 
+	
+	int num=rowNum();
+	if ((chunk+1)*chunkSize_ < num)
+	{
+		nbRowsInChunk_=chunkSize_;
+	}
+	else if(chunk*chunkSize_ < num)
+	{
+		nbRowsInChunk_=num-chunk*chunkSize_;
+	}	
+}
+
+void MvOdb::setChunkSize(int chunkSize)
+{
+	if(chunkSize <0)
+		return;
+
+	if(chunkSize_ != chunkSize)
+	{
+		chunkSize_=chunkSize;
+		for(unsigned int i=0; i < column_.size() ; i++)
+		{
+			unloadColumn(i);
+		}
+	} 
+}
+
+void MvOdb::retrieveToFile(string query, string inFile,string outFile)
+{
+	odb_start();
+
+	string SELECT;
+
+	//Find "where" statement in query
+	std::string wd = query;
+	std::transform(wd.begin(), wd.end(), wd.begin(), ::tolower);
+
+	string::size_type wherePos=wd.find("where");
+	if(wherePos != string::npos)
+	{
+		SELECT=query.substr(0,wherePos) +  " " +
+		 " from \"" + inFile + "\"" +
+		 query.substr(wherePos) + ";"; 	 
+	}
+	else
+	{
+		SELECT  = query + " from \"" + inFile + "\";";
+	}
+
+	//cout << "Select: " << SELECT << endl;
+
+	//ODAWriter writer(outFile);
+	//ODAWriter::iterator outit = writer.begin();
+	odb::Writer<> writer(outFile);
+   	odb::Writer<>::iterator outit = writer.begin();
+
+	odb::Select oda(SELECT);
+	odb::Select::iterator it = oda.begin();
+	odb::Select::iterator end = oda.end();
+	outit->pass1(it, end);
+	//it = oda.select(SELECT);
+	//outit->pass2(*it);
+}
+
+bool MvOdb::toGeopoints(string outFile,string geoType)
+{
+	map<string,unsigned int> colNumForGeoType;
+	colNumForGeoType["GEO_STANDARD"]=6;
+	colNumForGeoType["GEO_XYV"]=3;
+	colNumForGeoType["GEO_XY_VECTOR"]=7;
+	colNumForGeoType["GEO_XY_POLAR"]=7;
+
+	//Check geopoints format
+	if(colNumForGeoType.find(geoType) == colNumForGeoType.end())
+	{
+		return false;
+	}
+
+	//Initialize oda
+	odb_start();
+    	odb::Reader oda(path_);
+
+	//Create iterator
+	odb::Reader::iterator it = oda.begin();
+
+	//Columns
+	vector<string> colName;
+	for(odb::MetaData::iterator itc=it->columns().begin(); itc != it->columns().end(); ++itc)
+	{	
+		string s=(*itc)->name();
+		colName.push_back(s);
+	}
+	
+	if(colName.size() < colNumForGeoType[geoType])
+	{	
+		marslog(LOG_EROR,"Less columns (%d) in the retrieval than expected (%d) for output format %s",
+			 colName.size(),colNumForGeoType[geoType],geoType.c_str());
+		return false;
+	}
+
+	//Write data into a geopoints file	
+	
+	//=======================
+	// GEO_STANDARD
+	//=======================
+
+	if(geoType == "GEO_STANDARD")
+	{				
+		FILE *fp=fopen(outFile.c_str(),"w+");
+		if(fp ==0)
+		{
+			return false;
+		}
+		
+		fprintf(fp,"#GEO\n");		
+		fprintf(fp,"lat      long       level          date      time        value\n");
+
+		fprintf(fp,"#DB_INFO\n");
+		fprintf(fp,"DB_SYSTEM: ODB\n");
+
+		fprintf(fp,"DB_COLUMN: %s;%s;%s;%s;%s;%s\n",
+		   colName[0].c_str(),
+		   colName[1].c_str(),
+		   colName[2].c_str(),
+		   colName[3].c_str(),
+	 	   colName[4].c_str(),
+		   colName[5].c_str());
+
+		/*fprintf(fp,"DB_COLUMN_ALIAS: %s;%s;%s;%s;%s;%s\n",
+			odb["lat"].colNickname().c_str(),
+			odb["lon"].colNickname().c_str(),
+			levAlias.c_str(),
+			dateAlias.c_str(),
+			timeAlias.c_str(),
+			odb["value"].colNickname().c_str());*/
+
+		fprintf(fp,"DB_PATH: %s \n",sourcePath_.c_str());
+		fprintf(fp,"DB_QUERY_BEGIN \n%s \nDB_QUERY_END\n",query_.c_str());
+
+		fprintf(fp,"#DATA\n");
+
+		unsigned int row=0;
+		for (; it != oda.end(); ++it, row++) 
+		{			
+			fprintf(fp,"%.3f  %.3f  %.3f ",
+			     (*it)[0],(*it)[1],(*it)[2]);
+	
+			fprintf(fp,"%8d ",static_cast<int>((*it)[3]));												
+
+			char s[7];
+			sprintf(s,"%06d ",static_cast<int>((*it)[4]));			
+			fprintf(fp,"%.4s ", s);
+			    			    
+			fprintf(fp,"%.8f\n",(*it)[5]);
+		}
+	
+		fclose(fp);
+	}
+
+ 	//=======================
+	// GEO_XYV
+	//=======================
+ 
+ 	else if(geoType == "GEO_XYV")
+  	{
+		FILE *fp=fopen(outFile.c_str(),"w+");
+		if(fp ==0)
+		{
+			return false;
+		}
+		
+		fprintf(fp,"#GEO\n");
+		fprintf(fp,"#FORMAT XYV\n");	
+		fprintf(fp,"x/long       y/lat       value\n");
+
+		fprintf(fp,"#DB_INFO\n");
+		fprintf(fp,"DB_SYSTEM: ODB\n");
+
+		fprintf(fp,"DB_COLUMN: %s;%s;%s\n",
+		   colName[1].c_str(),
+		   colName[0].c_str(),
+		   colName[2].c_str());	
+
+		fprintf(fp,"DB_PATH: %s \n",sourcePath_.c_str());
+		fprintf(fp,"DB_QUERY_BEGIN \n%s \nDB_QUERY_END\n",query_.c_str());
+
+		fprintf(fp,"#DATA\n");
+
+		unsigned int row=0;
+		for (; it != oda.end(); ++it, row++) 
+		{			
+			fprintf(fp,"%.3f  %.3f  %.8f\n",
+			     (*it)[1],(*it)[0],(*it)[2]);
+		}
+	
+		fclose(fp);
+	}	
+
+	//=======================
+	// GEO_STANDARD
+	//=======================
+
+	if(geoType == "GEO_XY_VECTOR" || geoType == "GEO_POLAR_VECTOR")
+	{				
+		FILE *fp=fopen(outFile.c_str(),"w+");
+		if(fp ==0)
+		{
+			return false;
+		}		
+			
+		if(geoType == "GEO_XY_VECTOR")		
+		{		
+			fprintf(fp,"#GEO\n");		
+			fprintf(fp,"#FORMAT XY_VECTOR\n");
+			fprintf(fp," lat        lon height      date        time        u       v\n");
+		}
+		else if( geoType == "GEO_POLAR_VECTOR")		
+		{			
+			fprintf(fp,"#GEO\n");		
+			fprintf(fp,"#FORMAT POLAR_VECTOR\n");
+			fprintf(fp," lat        lon height      date        time        speed       dir\n");			
+		}	
+
+		fprintf(fp,"#DB_INFO\n");
+		fprintf(fp,"DB_SYSTEM: ODB\n");
+
+		fprintf(fp,"DB_COLUMN: %s;%s;%s;%s;%s;%s;%s\n",
+		   colName[0].c_str(),
+		   colName[1].c_str(),
+		   colName[2].c_str(),
+		   colName[3].c_str(),
+	 	   colName[4].c_str(),
+		   colName[5].c_str(),
+		   colName[6].c_str());
+
+		fprintf(fp,"DB_PATH: %s \n",sourcePath_.c_str());
+		fprintf(fp,"DB_QUERY_BEGIN \n%s \nDB_QUERY_END\n",query_.c_str());
+
+		fprintf(fp,"#DATA\n");
+
+		unsigned int row=0;
+		for (; it != oda.end(); ++it, row++) 
+		{			
+			fprintf(fp,"%.3f  %.3f  %.3f ",
+			     (*it)[0],(*it)[1],(*it)[2]);
+			
+			fprintf(fp,"%8d ",static_cast<int>((*it)[3]));													
+
+			char s[7];
+			sprintf(s,"%06d ",static_cast<int>((*it)[4]));			
+			fprintf(fp,"%.4s ", s);
+
+			fprintf(fp,"%.3f %.3f\n",(*it)[5],(*it)[6]);
+		}
+	
+		fclose(fp);
+	}  
+
+
+	return true;
+}
+
+#endif
+
+//=============================
+//
+// MvOldOdb
+//
+//=============================
+
+#ifdef METVIEW_ODB_OLD
+
+MvOldOdb::MvOldOdb(string path,string sourcePath,string query) :
+	MvAbstractOdb(path,sourcePath,query,VersionOld)
+{
+	init();
+}
+
+MvOldOdb::MvOldOdb(string path) : 
+	MvAbstractOdb(path,VersionOld)
+{
+	init();
+}
+
+MvOldOdb::~MvOldOdb()
+{
+
+}
+
+void MvOldOdb::init()
+{
+	if(version_ != VersionOld)
+		return;
+
+	headerIsRead_=false;
+	rowNum_=-1;
+		
+}
+
+void MvOldOdb::readMetaData()
+{  	
+}
+
+void MvOldOdb::generateStats(int /*column*/)
+{
+}
+
+int MvOldOdb::rowNum()
+{
+	return rowNum_;
+}
+
+int MvOldOdb::columnNum() 
+{
+	readMetaData(); 
+	return column_.size();
+}
+
+const vector<MvOdbColumn*>& MvOldOdb::columns() 
+{
+	readMetaData(); 
+	return column_;
+}	
+
+int MvOldOdb::findColumn(string cname)
+{
+	readMetaData();
+
+	int colPos=-1;
+	for(int i=0; i < static_cast<int>(column_.size()) ; i++)
+	{
+		if(cname == column_[i]->name())
+		{	
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+const MvOdbColumn* MvOldOdb::loadColumn(int /*pos*/,bool /*reload*/)
+{
+	readMetaData();
+	return 0;
+}
+
+const MvOdbColumn* MvOldOdb::loadColumn(string cname,bool reload)
+{
+	int colPos=findColumn(cname);
+	return loadColumn(colPos,reload);
+}
+
+void MvOldOdb::unloadColumn(int pos)
+{
+	readMetaData();
+
+	if(pos < 0 || pos >= static_cast<int>(column_.size()))
+		return;
+		
+	column_[pos]->unload();
+}
+
+void MvOldOdb::unloadColumn(string cname)
+{
+	int colPos=findColumn(cname);
+	unloadColumn(colPos);
+}
+
+const MvOdbColumn* MvOldOdb::column(int pos)
+{
+	readMetaData();
+
+	if(pos < 0 || pos >= static_cast<int>(column_.size()))
+		return 0;
+
+	return column_[pos];	
+}
+
+const MvOdbColumn* MvOldOdb::column(string cname)
+{
+	int colPos=findColumn(cname);
+	return column(colPos);
+}
+
+/*void MvOldOdb::retrieveToFile(string query, string inFile,string outFile)
+{
+}*/
+
+bool MvOldOdb::toGeopoints(string /*outFile*/,string /*geoType*/)
+{
+	return false;
+}
+
+
+#endif
+
+//=============================
+//
+// MvOdbFactory
+//
+//=============================
+
+MvAbstractOdb* MvOdbFactory::make(string path,string sourcePath,string query)
+{
+	//We suppose it is an ODB
+	string type=MvOdbType(path.c_str(),false);
+
+	if(type == "ODB_NEW")
+  	{
+#ifdef METVIEW_ODB_NEW
+		return new MvOdb(path,sourcePath,query);
+#else
+		return 0;
+#endif	
+	}
+	else if(type == "ODB_OLD")
+	{		
+#ifdef METVIEW_ODB_OLD
+		return new MvOldOdb(path);
+#else
+		return 0;
+#endif
+	}
+	else
+	{
+		return 0;
+	}
+}
+
diff --git a/src/libUtil/MvOdb.h b/src/libUtil/MvOdb.h
new file mode 100644
index 0000000..6826953
--- /dev/null
+++ b/src/libUtil/MvOdb.h
@@ -0,0 +1,295 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvOdb_H
+#define MvOdb_H
+
+#include <iostream>
+#include <map>
+#include <vector>
+#include <list>
+#include <assert.h>
+
+//#include <Metview.h>
+//#include "MvObs.h"
+
+using namespace std;
+
+
+class MvOdbBitfieldMember
+{
+public:
+	MvOdbBitfieldMember(string name,int pos, int size) : name_(name), 
+						       pos_(pos), 
+					               size_(size) {}
+	string name() {return name_;}
+	int pos() {return pos_;}
+	int size() {return size_;}
+
+private:						   
+	string name_;
+	int pos_;
+	int size_;
+};
+
+
+class MvOdbColumn
+{
+public:
+	enum OdbColumnType {None, Int, Float, String, Bitfield};
+
+	MvOdbColumn() : type_(None), num_(0), min_(1.0e+08), max_(-1.0e+08), loaded_(false) {};
+	void addToStats(float);
+	void compStats();
+
+	string name() const {return name_;}
+	string shortName() const {return shortName_;}
+	OdbColumnType type() const {return type_;}
+	string unit() {return unit_;}
+	const  vector<MvOdbBitfieldMember*>& bitfield() {return bitfield_;}
+	int bitfieldNum() {return bitfield_.size();}
+
+	float  min()  {return min_;}
+	float  max()  {return max_;}
+	float  avg()  {return avg_;}
+	float  std()  {return std_;}
+	
+	void   setName(string);
+	void   setType(OdbColumnType s) {type_=s;}
+	void   setUnit(string s) {unit_=s;}
+	void   addBitfieldMember(MvOdbBitfieldMember* b) {bitfield_.push_back(b);};
+	
+	void unload();
+	bool isLoaded() const {return loaded_;}
+	void setLoaded(bool);
+	void addStringData(string s) {sval_.push_back(s);}
+	void addFloatData(float f) {fval_.push_back(f);}
+	void addIntData(int i) {ival_.push_back(i);}
+	const vector<float>& floatData() const {return fval_;}
+	const vector<int>& intData() const {return ival_;}
+	const vector<string>& stringData() const {return sval_;}
+	int rowNum() const;	
+
+
+private:
+	string name_;
+	string shortName_;
+	OdbColumnType type_;			
+	string unit_;
+	vector<MvOdbBitfieldMember*> bitfield_;
+
+	int    num_;
+	float  min_;
+	float  max_;
+	float  avg_;
+	float  std_;
+	
+	bool loaded_;
+	vector<float> fval_;
+	vector<int>    ival_;
+	vector<string> sval_;
+};
+
+
+class MvAbstractOdb
+{ 
+public:
+	enum OdbVersion {UnknownVersion,VersionOld,VersionNew};
+
+	MvAbstractOdb(string,OdbVersion);
+	MvAbstractOdb(string,string,string,OdbVersion);
+	virtual ~MvAbstractOdb();
+
+	virtual void init()=0;	  	
+
+	string path() {return path_;}
+	string query()    {return query_;}
+	OdbVersion version() {return version_;}
+	int chunkSize() {return chunkSize_;}
+	int currentChunk() {return currentChunk_;}
+	int nbRowsInChunk() {return nbRowsInChunk_;}
+
+	virtual void setChunkSize(int i) {chunkSize_=i;}
+	virtual void setCurrentChunk(int i) {currentChunk_=i;}
+
+	virtual int totalSizeInMb()=0;
+	virtual int rowNum()=0;
+	virtual int columnNum()=0;
+	virtual const MvOdbColumn* column(string)=0;
+	virtual const MvOdbColumn* column(int)=0;
+	virtual const vector<MvOdbColumn*>& columns()=0	;
+	virtual const MvOdbColumn* loadColumn(string,bool reload=false)=0;
+	virtual const MvOdbColumn* loadColumn(int,bool reload=false)=0;
+	virtual void  unloadColumn(string)=0;
+	virtual void  unloadColumn(int)=0;
+	virtual void  loadAllColumns()=0;
+	virtual void  unloadAllColumns()=0;
+
+	virtual void generateStats(int)=0;
+	virtual bool toGeopoints(string,string)=0;
+	virtual bool hasColumn(const string&)=0;
+
+protected:			
+	virtual void readMetaData()=0;
+	virtual int findColumn(string)=0;
+	void detectOdbVersion();
+	
+	string path_;
+	string sourcePath_;
+	string query_;
+	vector<MvOdbColumn*> column_;
+	int rowNum_;
+	bool headerIsRead_;
+	
+	OdbVersion version_;
+
+	int chunkSize_;
+	int currentChunk_;
+	int nbRowsInChunk_;
+};
+
+#ifdef METVIEW_ODB_NEW
+class MvOdb : public MvAbstractOdb
+{ 
+public:
+	MvOdb(string);
+	MvOdb(string,string,string);
+	~MvOdb();
+
+	void init();	  	
+
+	void  setChunkSize(int);	
+	void  setCurrentChunk(int);
+
+	int     totalSizeInMb();
+	int 	rowNum();
+	int 	columnNum();
+	const MvOdbColumn* 	column(string);
+	const MvOdbColumn* 	column(int);
+	const vector<MvOdbColumn*>& columns();
+	const MvOdbColumn* 	loadColumn(string,bool reload=false);
+	const MvOdbColumn* 	loadColumn(int,bool reload=false);
+	void  unloadColumn(string);
+	void  unloadColumn(int);
+	void  loadAllColumns();
+	void  unloadAllColumns();
+	
+	void generateStats(int);
+	bool toGeopoints(string,string);	
+	static void retrieveToFile(string,string,string);
+	
+	bool hasColumn(const string&);
+
+protected:			
+	void readMetaData();
+	int  findColumn(string);
+};
+#endif
+
+#ifdef METVIEW_ODB_OLD
+class MvOldOdb : public MvAbstractOdb
+{ 
+public:
+	MvOldOdb(string);
+	MvOldOdb(string,string,string);
+	~MvOldOdb();
+
+	void 	init();	  	
+
+	int     totalSizeInMb() {return 0;}
+	int 	rowNum();
+	int 	columnNum();
+	const MvOdbColumn* 	column(string);
+	const MvOdbColumn* 	column(int);
+	const vector<MvOdbColumn*>& columns();
+	const MvOdbColumn* 	loadColumn(string,bool reload=false);
+	const MvOdbColumn* 	loadColumn(int,bool reload=false);
+	void  unloadColumn(string);
+	void  unloadColumn(int);
+	void  loadAllColumns() {};
+	void  unloadAllColumns() {};
+
+	void 	generateStats(int);
+	bool 	toGeopoints(string,string);
+	
+	bool hasColumn(const string&) {return false;}	
+
+protected:			
+	void readMetaData();
+	int  findColumn(string);
+};
+#endif
+
+class MvOdbFactory
+{
+public:	
+	MvOdbFactory() {};
+	static MvAbstractOdb*  make(string path,string sourcePath=string(),string query=string());
+};
+
+
+
+
+
+
+
+
+/*
+class MvOdb
+{ 
+public:
+	enum OdbVersion {UnknownVersion,Version1,Version2};
+
+	MvOdb(string);
+	MvOdb(string,string,string);
+	~MvOdb();
+	void init();	  	
+
+	string path() {return path_;}
+	string query()    {return query_;}
+	int rowNum();
+	int columnNum() {readMetaData(); return column_.size();}
+
+	void generateStats(int);
+	void toGeopoints(string,string);
+
+	const vector<MvOdbColumn*>& columns() {readMetaData(); return column_;}
+	
+	const MvOdbColumn* loadColumn(string);
+	const MvOdbColumn* loadColumn(int);
+	const MvOdbColumn* column(string);
+	const MvOdbColumn* column(int);
+	void  unloadColumn(string);
+	void  unloadColumn(int);	
+
+	OdbVersion version() {return version_;}
+
+	static void retrieveToFile(string,string,string);
+
+protected:			
+	void readMetaData();
+	int findColumn(string);
+	void detectOdbVersion();
+	
+	int rowNum_;
+	string path_;
+	string sourcePath_;
+	string query_;
+	vector<MvOdbColumn*> column_;
+	bool headerIsRead_;
+
+	OdbVersion version_;
+
+
+};
+*/
+
+
+
+#endif
diff --git a/src/libUtil/MvParTable.hpp b/src/libUtil/MvParTable.hpp
new file mode 100644
index 0000000..b64fab4
--- /dev/null
+++ b/src/libUtil/MvParTable.hpp
@@ -0,0 +1,19 @@
+//  MvParTable
+//
+// .AUTHOR:
+//  Lubia Vinhas
+//
+// .SUMMARY:
+//  Utilities used in PlotMod (wind plot) for
+//  accessing the parameter tables in METVIEW_DIR/sys
+//
+//
+#ifndef MvParTable_H
+#define MvParTable_H
+#include <stdio.h>
+#include <Cached.h>
+#include <MvPath.h>
+
+Cached CompanionWindField    ( int parTableNumer, int parNumber );
+
+#endif
diff --git a/src/libUtil/MvPath.cc b/src/libUtil/MvPath.cc
new file mode 100644
index 0000000..98e05c2
--- /dev/null
+++ b/src/libUtil/MvPath.cc
@@ -0,0 +1,229 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <iostream>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "MvPath.hpp"
+#include "UtilitiesC.h"
+
+static Cached user_dir = getenv("METVIEW_USER_DIRECTORY");
+static Cached tmp_dir  = getenv("METVIEW_TMPDIR");
+static Cached metv_dir = getenv("METVIEW_DIR_SHARE");
+
+
+Cached
+MakeUserPath(const Cached& name)
+{
+// FII0710 I think this code is not correct. It should try
+// to build an absolute path taking into consideration the
+// relative part of the path "../"  Alternatively, leave
+// the relative part of the path as it is.
+#if 0
+  // Strip off any relative part of the name "../.. etc"
+  // to try to build a correct absolute path.
+  bool found = false;
+  const char *cptr = name;
+  int i;
+
+  if ( strlen(name) > 3 )
+    {
+      for ( i = strlen(name)-1; i >=2; i-- )
+	{
+	  if ( name[i] == '/' && name[i-1] == '.' && name[i-2] == '.' )
+	    {
+	      found = true;
+	      break;
+	    }
+	}
+    }
+
+  if ( found )
+    cptr += i;
+
+  Cached fname = user_dir + (Cached)"/" + Cached(cptr);
+#endif
+
+  Cached fname = user_dir + (Cached)"/" + name;
+
+  return fname;
+}
+
+string
+MakeUserDefPath(const char* name)
+{
+	string fname = (const char*)user_dir;
+	fname += "/System/Defaults/";
+	fname += name;
+
+	return fname;
+}
+
+string
+MakeUserPrefPath(const char* name)
+{
+	string fname = (const char*)user_dir;
+	fname += "/System/Preferences/";
+	fname += name;
+
+	return fname;
+}
+
+string
+MakeSystemEtcPath(const string& name)
+{
+	string fname = (const char*)metv_dir + string("/etc/") + name;
+
+	return fname;
+}
+
+string
+MakeTmpPath(const char* name)
+{
+	string tmp = (const char*)tmp_dir;
+	tmp += '/';
+	tmp += name;
+
+	return tmp;
+}
+
+Cached
+MakeFilePath (const char* reqName )
+{
+	Cached path = user_dir + Cached("/") + Cached ( dirname ( reqName ));
+
+return path;
+}
+
+const char*
+MakeIconName ( const char* path, const char* iconPrefix )
+{
+	// The new icon name is the next on the list
+	return UtProgressiveName2 ( path, iconPrefix );
+}
+
+Cached
+MakePrinterFileName ( const Cached& path, const Cached& fileName )
+{
+	Cached newName;
+
+	if ( fileName == (Cached) "" )
+		newName = path + "PlotFile";
+	else
+	        newName = fileName;
+
+return newName;
+}
+
+Cached
+MakeTmpName ( const Cached& iconPrefix )
+{
+	char* p = UtRandomName (tmp_dir, iconPrefix );
+	Cached newName = Cached ( p );
+	free( p );
+return newName;
+}
+
+// Create description file in METVIEW_USER_DIRECTORY
+// (so that GenApp knows that kind of file it is)
+const char*
+MakeIconDescriptionName(const char* fileName )
+{
+	// Create the definition file name
+	string defFileName = dirname( fileName);
+	defFileName += "/.";
+	defFileName += mbasename ( fileName );
+
+	return defFileName.c_str();
+}
+
+Cached
+MakeIconPath ( const char* iconName )
+{
+
+	Cached iconPath = metv_dir + Cached("/icons/") + Cached ( iconName ) +
+		          Cached (".icon");
+return iconPath;
+}
+
+// -- FUNCTION : FileCanBeOpened
+//
+// -- PURPOSE:   Tests if a file can be opened
+//
+// -- INPUT  :   filename and mode
+//
+// -- OUTPUT :   true/false
+
+bool
+FileCanBeOpened(const char* filename, const char* mode)
+{
+	FILE *fp;
+
+	// Can we open it in the desired mode ?
+	if ((fp = fopen(filename,mode)) != 0)
+	{
+		fclose (fp);
+		return true;
+	}
+
+return false;
+}
+
+// -- FUNCTION : FileHasValidSize
+//
+// -- PURPOSE:   Tests if a file has size > 0
+//
+// -- INPUT  :   filename
+//
+// -- OUTPUT :   true/false
+
+bool
+FileHasValidSize(const char* filename )
+{
+
+	struct stat buf;
+
+	// Can we reach the file ?
+	if ( stat ( filename, &buf ) != 0 )
+		return false;
+
+	// Does it have non-zero size ?
+	if ( buf.st_size == 0 )
+		return false;
+
+return true;
+}
+
+string
+MakeProcessName (const char* name)
+{
+	// Build a process name according to the process id
+	char buf[64];
+	sprintf(buf,"%ld",(long)getpid());
+
+	string fname(name);
+	fname.append(buf);
+
+	return fname;
+}
+
+string
+FullPathName( const char* filename )
+{
+	string fullPath( filename );
+	if( *filename != '/' )
+	{
+	   const char* pwd = getenv( "PWD" );
+	   //std::cout << "PWD = " << pwd << std::endl;
+	   fullPath = string( pwd ) + string( "/" ) + fullPath;
+	   //std::cout << "full path = " << fullPath << std::endl;
+	}
+	return fullPath;
+}
diff --git a/src/libUtil/MvPath.hpp b/src/libUtil/MvPath.hpp
new file mode 100644
index 0000000..2fe52b8
--- /dev/null
+++ b/src/libUtil/MvPath.hpp
@@ -0,0 +1,36 @@
+//  MvPath
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Utilities used in PlotMod for
+//  accessing the system and user default paths
+//
+//
+#ifndef MvPath_H
+#define MvPath_H
+#include <stdio.h>
+#include <Cached.h>
+#include <string>
+using std::string;
+
+Cached MakeUserPath    ( const Cached& name );
+string MakeUserDefPath ( const char* name );
+string MakeUserPrefPath( const char* name );
+string MakeSystemEtcPath  ( const string& name );
+string MakeTmpPath     ( const char* name );
+Cached MakeFilePath    ( const char* reqName);
+const char* MakeIconName ( const char* path, const char* iconPrefix );
+Cached MakePrinterFileName ( const Cached& path, const Cached& fileName );
+Cached MakeTmpName  ( const Cached& iconPrefix );
+const char* MakeIconDescriptionName(const char* fileName );
+Cached MakeIconPath(const char* iconName );
+string MakeProcessName ( const char* name );
+bool FileCanBeOpened(const char* filename, const char* mode );
+bool FileHasValidSize(const char* filename );
+
+//! Prepends the current path to filename unless it is absolute path
+string FullPathName( const char* filename );
+
+#endif
diff --git a/src/libUtil/MvProfileData.cc b/src/libUtil/MvProfileData.cc
new file mode 100644
index 0000000..b8b4dc0
--- /dev/null
+++ b/src/libUtil/MvProfileData.cc
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvProfileData.h"
+
+
+MvProfileData::MvProfileData() :
+  levelDirection_(TopDown),
+  auxLevelDefined_(false),
+  rangeSet_(false)
+{ 
+}  
+
+void MvProfileData::valueRange(int startIndex, int endIndex, float &minv, float &maxv)
+{
+	minv=9999999999;
+	maxv=-9999999999;
+	
+	if(startIndex < 0 || startIndex > endIndex || endIndex >= count())
+		return;  
+	
+	for(int i=startIndex; i <= endIndex; i++)
+	{	  		  	
+		float val=value(i);
+		if(val >= maxv)
+		  	maxv=val;
+		if(val < minv)
+		  	minv=val;
+	}
+}
+
+void MvProfileData::valueRange(float &minv, float &maxv)
+{
+	valueRange(0,count()-1,minv,maxv);
+}
+
+
+bool MvProfileData::acceptChange(const MvProfileChange& ch) const
+{
+	return ch.checkData(*this);
+}
+
+bool  MvProfileData::fitToRange(float& val)
+{
+	if(rangeSet_)
+	{
+		if(val < rangeMin_)
+		{
+		  	val=rangeMin_;
+			return false;
+		}	
+		else if(val > rangeMax_)
+		{
+		  	val=rangeMax_;
+			return false;
+		}
+	}
+	
+	return true;
+}	
\ No newline at end of file
diff --git a/src/libUtil/MvProfileData.h b/src/libUtil/MvProfileData.h
new file mode 100644
index 0000000..2202457
--- /dev/null
+++ b/src/libUtil/MvProfileData.h
@@ -0,0 +1,97 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvProfileData_H
+#define MvProfileData_H
+
+#include <string>
+#include <vector>
+
+using namespace std;
+
+class MvProfileData;
+class MvScmProfileData;
+
+class MvProfileChange
+{
+public:
+	MvProfileChange() {}	
+	MvProfileChange(int lev, float val, float prevVal) :
+	    level_(lev), value_(val), prevValue_(prevVal) {}
+	
+	MvProfileChange(const MvProfileChange& c) : level_(c.level()),  value_(c.value()), prevValue_(c.prevValue()) {}
+	
+	virtual bool checkData(const MvProfileData&) const {return false;}
+	virtual bool checkData(const MvScmProfileData&) const {return false;}
+	
+	int    level() const {return level_;}
+	float  value() const {return value_;}
+	float  prevValue() const {return prevValue_;}
+
+protected:
+	int level_;
+	float value_;
+	float prevValue_;
+};
+
+class MvProfileData
+{
+public:
+	enum LevelDirection {TopDown,BootmUp};
+	
+	MvProfileData();
+	
+	virtual float value(int)=0;
+	virtual float level(int)=0;
+	virtual float auxLevel(int)=0;
+	virtual void levels(vector<float>&)=0;
+	
+	string name() const {return name_;}
+	string units() const {return units_;}
+	string levelName() const {return levelName_;}
+	string levelUnits() const {return levelUnits_;}
+	string auxLevelName() const {return auxLevelName_;}
+	string auxLevelUnits() const {return auxLevelUnits_;}
+	string stepString() const {return stepString_;}
+	
+	bool auxLevelDefined() const {return auxLevelDefined_;}
+	void valueRange(int,int,float &,float &);
+	void valueRange(float &,float &);
+	
+	virtual bool acceptChange(const MvProfileChange&) const;		
+	virtual int count() const=0;
+	virtual void setValue(int, float)=0;
+	
+	void setRange(float min,float max) { rangeMin_=min; rangeMax_=max; rangeSet_=true;}
+	bool isRangeSet() const {return rangeSet_;}
+	float rangeMin() const {return rangeMin_;}
+	float rangeMax() const {return rangeMax_;}
+	bool  fitToRange(float&);
+	
+protected:	
+	string name_;
+	string units_;
+	string stepString_;
+	bool editable_;
+	
+	LevelDirection levelDirection_;
+	string levelName_;
+	string levelUnits_;
+	bool auxLevelDefined_;
+	string auxLevelName_;
+	string auxLevelUnits_; 
+	
+	bool rangeSet_;
+	float rangeMin_;
+	float rangeMax_;
+};  
+
+#endif	
+	
+	
\ No newline at end of file
diff --git a/src/libUtil/MvRequest.hpp b/src/libUtil/MvRequest.hpp
new file mode 100644
index 0000000..adfc6ab
--- /dev/null
+++ b/src/libUtil/MvRequest.hpp
@@ -0,0 +1,47 @@
+#ifndef MvRequestDEFINED
+#define MvRequestDEFINED
+extern "C"
+{
+#include <mars.h>
+}
+#include <MvList.hpp>
+
+class MvDataGen : public MvElement
+{
+public :
+	request*	req;
+	svcid*		id;
+	int		tasks;
+	char*		datatype;
+	char*		datafile;
+	MvDataGen () {}
+	MvDataGen (svcid *, request*, const char*);
+	MvDataGen (svcid *, MvDataGen*);
+	~MvDataGen ();
+	void SendStatus (const char*);
+	void SendReply (err);
+	void DeleteFile ();
+	const char* DataFile ();
+	int Ready ();
+	void IncTasks ( ) {tasks++; printf ("Tasks = %d\n",tasks);}
+	int  DecTasks ( ) {tasks--; printf ("Tasks = %d\n",tasks);return tasks;}
+};
+
+class MvDataVis : public MvElement
+{
+public :
+	request*	req;
+	request*	reply;
+	svcid*		id;
+	int		tasks;
+
+	MvDataVis () {}
+	MvDataVis (svcid *, request*);
+	~MvDataVis ();
+	void SendStatus (const char*);
+	void SendReply (err);
+	void Tasks (int c) {tasks = c; }
+	void IncTasks ( ) {tasks++; printf ("Tasks = %d\n",tasks);}
+	int  DecTasks ( ) {tasks--; printf ("Tasks = %d\n",tasks);return tasks;}
+};
+#endif
diff --git a/src/libUtil/MvRequestUtil.cc b/src/libUtil/MvRequestUtil.cc
new file mode 100644
index 0000000..dd0d1c0
--- /dev/null
+++ b/src/libUtil/MvRequestUtil.cc
@@ -0,0 +1,363 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "inc_iostream.h"
+
+#include <MvRequest.h>
+#include <MvRequestUtil.hpp>
+
+//
+// FUNCTION: CopyAndRemoveParameters
+//
+// PURPOSE : To copy a request into another removing all
+//           parameters that start with a certain "prefix"
+//
+// INPUT   : - A request
+//           - Prefix to be used for removing parameters
+//
+// OUTPUT  : - A request which does not contain the desired params
+//
+
+
+void
+CopyAndRemoveParameters ( const MvRequest& inRequest,
+			  MvRequest& outRequest,
+			  const char* prefix )
+{
+	int length = strlen ( prefix );
+
+	int count = inRequest.countParameters();
+
+	for(int i = 0; i < count ; i++)
+	{
+		const char* param = inRequest.getParameter(i);
+		if(strncmp(param, prefix, length ) != 0)
+		{
+			int n = inRequest.countValues(param);
+			outRequest.unsetParam(param);
+			for(int j = 0; j < n ; j++)
+			{
+				const char *value= 0;
+				inRequest.getValue(value,param,j);
+				outRequest.addValue(param,value);
+			}
+		}
+	}
+
+}
+
+//
+// FUNCTION: CopySomeParameters
+//
+// PURPOSE : To copy the Parameters which start with a certain prefix
+//           from one request to another
+//
+// INPUT   : - A request
+//           - Prefix to be used for copy parameters
+//           - Option to overwrite existing output parameters
+//
+// OUTPUT  : - A request which contain the desired params
+//
+void
+CopySomeParameters ( const MvRequest&  inRequest,
+		     MvRequest&  outRequest,
+		     const char* prefix,
+		     bool        overwrite )
+{
+	int length = strlen ( prefix );
+
+	int count = inRequest.countParameters();
+
+	for(int i = 0; i < count ; i++)
+	{
+		const char* param = inRequest.getParameter(i);
+		if(strncmp(param, prefix, length ) == 0)
+		{
+			if ( !overwrite && IsParameterSet ( outRequest, param ) ) continue;
+			int n = inRequest.countValues(param);
+			for(int j = 0; j < n ; j++)
+			{
+				const char *value= 0;
+				inRequest.getValue(value,param,j);
+				if ( j == 0 ) outRequest.setValue(param,value);
+				else          outRequest.addValue(param,value);
+			}
+		}
+	}
+
+}
+
+//
+// FUNCTION: CopySomeParameters
+//
+// PURPOSE : To copy the Parameters which start with a certain prefix
+//           from one request to another changing prefix by a new prefix
+//
+// INPUT   : - A request
+//           - Prefix to be used for copy parameters
+//           - New prefix to be used instead of prefix
+//
+// OUTPUT  : - A request which contain the desired params
+//
+void
+CopySomeParameters ( const MvRequest& inRequest,
+		     MvRequest& outRequest,
+		     const char* prefix,
+		     const char* newPrefix )
+{
+	int length = strlen ( prefix );
+
+	int count = inRequest.countParameters();
+	for ( int i = 0; i < count ; i++ )
+	{
+		const char* param = inRequest.getParameter(i);
+		if(strncmp(param, prefix, length ) == 0)
+		{
+			int n = inRequest.countValues(param);
+			Cached auxPar ( (const char *)(param + length) );
+			Cached newparam = Cached (newPrefix) + auxPar;
+			for ( int j = 0; j < n ; j++ )
+			{
+				const char *value= 0;
+				inRequest.getValue(value,param,j);
+				outRequest.addValue(newparam,value);
+			}
+		}
+	}
+
+}
+
+//
+// FUNCTION: CopySomeParameters
+//
+// PURPOSE : To copy the Parameters which finish with a certain suffix
+//           from one request to another
+//
+// INPUT   : - A request
+//           - Sufix to be used for copy parameters
+//
+// OUTPUT  : - A request which contain the desired params
+//
+void
+CopySomeParameters ( const MvRequest&  inRequest,
+               MvRequest&  outRequest,
+               const string& sufix )
+{
+     unsigned int length = sufix.size();
+     int count  = inRequest.countParameters();
+     for(int i = 0; i < count ; i++)
+     {
+          string param = (const char*)inRequest.getParameter(i);
+          if ( param.size() < length ) // no need to compare
+               continue;
+
+          if( param.compare(param.size()-length,length,sufix ) == 0)
+          {
+               const char* cparam = param.c_str();
+               int n = inRequest.countValues(cparam);
+               for(int j = 0; j < n ; j++)
+               {
+                    const char *value= 0;
+                    inRequest.getValue(value,cparam,j);
+                    if ( j == 0 ) outRequest.setValue(cparam,value);
+                    else          outRequest.addValue(cparam,value);
+               }
+          }
+     }
+
+}
+
+//
+// FUNCTION: RemoveParameters
+//
+// PURPOSE : Remove all parameters that start with a certain "prefix"
+//
+// INPUT   : - A request
+//           - Prefix to be used for removing parameters
+//
+// OUTPUT  : - A request which does not contain the desired params
+//
+void
+RemoveParameters ( MvRequest& req, const char* prefix )
+{
+	MvRequest aux = req;
+	int length = strlen ( prefix );
+	int count = req.countParameters();
+	for(int i = 0; i < count ; i++)
+	{
+		const char* param = aux.getParameter(i);
+		if(strncmp(param, prefix, length ) == 0)
+			req.unsetParam(param);
+	}
+}
+
+//
+// FUNCTION: AreEqualRequests
+//
+// PURPOSE : Compare two requests.
+//
+// INPUT   : - Two requests
+//
+// OUTPUT  : - true: If the input requests have the same number of parameters and
+//                   the parameters names and values are equal.
+//           - false: otherwise
+//
+// OBS     : Comparison only between parameter values, if there are subrequests
+//           the result is unpredictable
+bool
+AreEqualRequests ( MvRequest& req1, MvRequest& req2 )
+{
+	int count = req1.countParameters();
+	int i     = -1;
+	if ( count == req2.countParameters() )
+	{
+		for ( i = 0; i < count ; i++)
+		{
+			const char* param = req1.getParameter(i);
+			int n = req1.countValues(param);
+			int j;
+			for ( j = 0; j < n ; j++)
+			{
+				const char *value2 = 0;
+				req2.getValue(value2,param,j);
+				if( ! value2 )
+					return false;  //-- 'param' missing from req2!
+
+				const char *value1 = 0;
+				req1.getValue(value1,param,j);
+				if ( strcmp ( value1, value2 ) )
+					break;
+			}
+			if ( j != n )
+				break;
+		}
+	}
+	if ( i != count )
+		return false;
+	else
+		return true;
+}
+
+bool
+IsParameterSet ( MvRequest& request, const Cached& paramSought )
+{
+	int count = request.countParameters();
+
+	for( int i = 0; i < count ; i++ )
+	{
+		Cached paramFound = request.getParameter(i);
+
+		if ( paramFound == paramSought )
+			return true;
+	}
+return false;
+}
+
+bool
+SetIfValue( MvRequest& targetReq, const char* targetParam, const char*  val )
+{
+	if( val )
+	{
+		targetReq( targetParam ) = val;
+		return true;
+	}
+
+	return false;
+}
+
+void
+MergeTextParameters ( MvRequest&  inRequest,
+		      MvRequest&  outRequest,
+		      bool        overwrite )
+{
+	int i;
+
+	// Move output TEXT_LINE_* forward according to
+	// input TEXT_LINE_COUNT
+	int inCount  = inRequest ("TEXT_LINE_COUNT");
+	int outCount = outRequest("TEXT_LINE_COUNT");
+	if ( inCount )
+	{
+		// Define constants
+		char   saux[13];       //TEXT_LINE_*
+		int    MAXCOUNT = 10;
+		int    size;
+
+		strcpy (saux ,"TEXT_LINE_");
+		size = strlen(saux);
+
+		// Check maximum number of merged lines
+		int maxline = ((inCount + outCount) > MAXCOUNT) ? MAXCOUNT : (inCount + outCount);
+
+		// Move texts
+		for(i = maxline; i > inCount ; i--)
+		{
+			sprintf(saux+size, "%d", i-inCount);
+			const char* text = outRequest(saux);
+			sprintf(saux+size, "%d", i);
+			if ( text )
+				outRequest(saux) = text;
+			else
+				outRequest.unsetParam ( saux );
+		}
+
+		// Clear initial TEXT_LINE_* from the output request
+		for(i = 1; i <= inCount ; i++)
+		{
+			sprintf(saux+size, "%d", i);
+			outRequest.unsetParam ( saux );
+		}
+
+		// Update output TEXT_LINE_COUNT
+		outRequest("TEXT_LINE_COUNT") = maxline;
+	}
+
+	// Copy remaining parameters
+	CopySomeParameters (inRequest, outRequest, "TEXT_", overwrite);
+}
+
+#if 0
+//-- moved to MvCheckFileType.cc
+
+//----
+//--- Check if a file is a binary file or a missing file i.e.
+//--  does the file have any chance to contain a Metview request!
+//-
+
+bool
+IsBinaryOrMissingFile( const char* fileName )
+{
+	ifstream f( fileName );
+	if( !f )
+	  return true;                     //-- missing file
+
+	bool isBinary = false;
+	const int CHECKLEN = 4000;         //-- may be a huge PostScript file
+	                                   //-- => check beginning only is ok
+	int chr = f.get();
+	for( int ci=0; ci<CHECKLEN; ++ci ) //-- look for "binary" chars
+	  {
+	    if( f.eof() )
+	      break;
+
+	    if( ! isprint(chr) && ! isspace(chr) )
+	      {
+		isBinary = true;           //-- binary file
+		break;
+	      }
+
+	    chr = f.get();
+	  }
+
+	f.close();
+
+	return isBinary;
+}
+
+#endif
diff --git a/src/libUtil/MvRequestUtil.hpp b/src/libUtil/MvRequestUtil.hpp
new file mode 100644
index 0000000..fb30c5c
--- /dev/null
+++ b/src/libUtil/MvRequestUtil.hpp
@@ -0,0 +1,68 @@
+// ==================================================
+//
+// MvRequestUtil - Utilities for Dealing with Requests
+//
+//
+//
+// ===================================================
+#ifndef MvRequestUtil_H
+#define MvRequestUtil_H
+
+#include <MvRequest.h>
+
+//
+// -- Copy a request, removing parameters with a
+//    certain prefix
+void CopyAndRemoveParameters ( const MvRequest& inRequest,
+			       MvRequest& outRequest, 
+			       const char* prefix );
+//
+// -- Copy a request the parameters with a
+//    certain prefix from one request to another
+void CopySomeParameters ( const MvRequest& inRequest,
+			  MvRequest& outRequest, 
+			  const char* prefix,
+			  bool        overwrite=true );
+
+//
+// -- Copy the Parameters which start with a certain prefix
+//    from one request to another changing prefix by a new prefix
+void CopySomeParameters ( const MvRequest& inRequest,
+			  MvRequest& outRequest, 
+			  const char* prefix , 
+			  const char* newPrefix );
+
+//
+// -- Copy the Parameters which finish with a certain sufix
+//    from one request to another
+void CopySomeParameters ( const MvRequest& inRequest,
+                 MvRequest& outRequest, 
+                 const string& sufix );
+
+// -- Merge two TEXT parameters
+void MergeTextParameters ( MvRequest&  inRequest,
+			   MvRequest&  outRequest, 
+			   bool        overwrite );
+
+// --- Compare two requests
+bool AreEqualRequests ( MvRequest& req1, MvRequest& req2 );
+
+// --- Find if a parameter has been set
+
+bool IsParameterSet ( MvRequest& request, const Cached& paramSought );
+
+// -- Copy a value to a parameter
+bool SetIfValue( MvRequest& req, const char* param, const char* val );
+
+// -- Remove parameters with a certain prefix
+void RemoveParameters ( MvRequest& req, const char* prefix );
+
+#if 0
+//-- moved to MvCheckFileType.h
+
+//-- check if file is missing a binary file --
+bool IsBinaryOrMissingFile( const char* fileName );
+#endif
+
+#endif
+ 
diff --git a/src/libUtil/MvSTL.h b/src/libUtil/MvSTL.h
new file mode 100644
index 0000000..363fef4
--- /dev/null
+++ b/src/libUtil/MvSTL.h
@@ -0,0 +1,20 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MVSTL_H_
+#define MVSTL_H_
+
+// Obs: MvSTL.h is a temporary include file.
+//      It will be removed soon. (really)
+
+#include <inc_stl.h>
+#include <inc_string.h>
+
+#endif
+//MVSTL_H_
diff --git a/src/libUtil/MvScm.cc b/src/libUtil/MvScm.cc
new file mode 100644
index 0000000..6b9c5f3
--- /dev/null
+++ b/src/libUtil/MvScm.cc
@@ -0,0 +1,1293 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvScm.h"
+
+#include "MvMiscelaneous.h"
+
+#include <set>
+#include <sstream>
+#include <string.h>
+
+//A nicer solution is needed!
+bool MvScm::needConsistency_=false;
+
+//=========================================================
+//
+//  MvScmConsistency
+//
+//=========================================================
+
+void MvScmConsistency::exec(int ts,int level)
+{
+  	double d1=source1_->consistencyValue(ts,level);
+	double d2=source2_->consistencyValue(ts,level);
+	double d3=source3_->consistencyValue(ts,level);
+	
+	float val=static_cast<float>((*proc_)(d1,d2,d3));
+	
+	target_->setConsistentValue(ts,level,val);
+}	
+
+//=========================================================
+//
+//  MvScmProfileChange
+//
+//=========================================================
+
+bool MvScmProfileChange::checkData(const MvScmProfileData& data) const
+{
+	 return (var_ == data.var() && step_ == data.step());
+}	
+
+//=========================================================
+//
+//  MvScmProfileData
+//
+//=========================================================
+
+MvScmProfileData::MvScmProfileData(MvScm *scm,MvScmVar *var, int step) :
+ var_(var),
+ auxLevel_(0),
+ step_(step),
+ observer_(0)
+{
+  	if(!var_)
+	  	return;
+    
+	name_=var_->longName();	
+	units_=var_->units();
+
+	stringstream sst;
+   	sst << scm->steps().at(step_)/3600;  	 
+  	stepString_=sst.str();
+	stepString_+=" h";
+	
+  	if(var_->levelType() == MvScmVar::ModelLevelType)
+	{	
+		levelName_="Model level";
+		levelUnits_="eta";
+		levelDirection_=TopDown;
+		
+	  	auxLevel_=scm->mlVar(MvScm::PresML);
+		if(auxLevel_)
+		{
+		  	auxLevelDefined_=true;
+			auxLevelName_="Pressure";
+			auxLevelUnits_="hPa";
+		}	
+	} 
+	else if(var_->levelType() == MvScmVar::SoilLevelType)
+	{	
+		levelName_="Soil";
+		levelDirection_=TopDown;
+	} 
+	else if(var_->levelType() == MvScmVar::SurfaceLevelType)
+	{	
+		levelName_="Surface";
+		levelDirection_=TopDown;
+	} 
+		
+	if(var->isRangeSet())
+		setRange(var->rangeMin(),var->rangeMax());  
+}  
+
+
+float MvScmProfileData::value(int index)
+{
+	return var_->data(step_).at(index);
+}
+
+float MvScmProfileData::level(int index)
+{
+	if(var_->levelType() == MvScmVar::ModelLevelType)
+	{	
+		return index+1;
+	}
+	else if(var_->levelType() == MvScmVar::SoilLevelType)
+	{	
+		return index+1;
+	}
+	
+	
+	return -1;
+}	
+		
+float MvScmProfileData::auxLevel(int index)
+{
+  	if(auxLevelDefined_ && auxLevel_)
+	{
+		  return auxLevel_->data(step_).at(index);
+	}
+	return -1;
+}	
+
+void MvScmProfileData::levels(vector<float>& lev)
+{
+  	if(var_->levelType() == MvScmVar::ModelLevelType)
+	{
+	  	for(unsigned int i=0; i < count(); i++)
+		{
+		  	lev.push_back(i+1);
+		}
+	}
+	else if(var_->levelType() == MvScmVar::SoilLevelType)
+	{
+	  	for(unsigned int i=0; i < count(); i++)
+		{
+		  	lev.push_back(i+1);
+		}
+	}
+	else if(var_->levelType() == MvScmVar::SurfaceLevelType)
+	{
+	  		lev.push_back(1);
+	}
+	
+}	
+
+int MvScmProfileData::count() const
+{
+  	return static_cast<int>(var_->data(step_).size());
+}
+
+void MvScmProfileData::setValue(int index, float val)
+{
+	MvScmProfileChange ch;
+	var_->setValue(step_,index,val,ch); 
+	
+	if(observer_)
+	  	observer_->profileEdited(ch);
+}
+
+bool MvScmProfileData::acceptChange(const MvProfileChange& ch) const
+{
+	return ch.checkData(*this);
+}
+
+//=========================================================
+//
+//  MvScmDim
+//
+//=========================================================
+
+void MvScmDim::init(NcFile& nc,string name)
+{  
+	name_=name;
+  
+  	NcDim *dim=nc.get_dim(name_.c_str());
+	if(dim)
+	{
+	  	size_=dim->size();
+	}
+	
+	
+	int varNum=nc.num_vars();
+	for(int i=0; i < varNum; i++)
+	{
+		NcVar *var=nc.get_var(i);
+		if(var && strcmp(var->name(),name_.c_str()) == 0)
+		{
+		  	setVar(var);
+			return;
+		}	
+	}
+}	
+	
+void MvScmDim::setVar(NcVar *var)
+{	
+  	values_.clear();
+  	
+  	if(!var)
+	  	return;
+	
+	if(var->num_dims() != 1)
+	  	return;
+  
+	if(strcmp(var->get_dim(0)->name(),name_.c_str()) == 0)
+	{  		
+		int num=size_; 
+  		long counts[1];	
+		float* vals = new float[num];
+	
+		counts[0]=num;
+  		var->get(vals,counts);  
+		values_=vector<float>(vals,vals+num);	
+		delete [] vals;
+	}
+	else
+	{
+	 	for(int i=0; i < size_; i++)
+			values_.push_back(i+1);
+	}	
+	
+	setAttributes(var);
+	
+}
+
+void MvScmDim::setAttributes(NcVar *var)
+{
+	int n=var->num_atts();  
+  	for(int i=0; i < n; i++)
+	{
+	  	NcAtt* att=var->get_att(i);
+		if(att)
+		{
+		  	if(strcmp(att->name(),"long_name") == 0 && att->num_vals() > 0)
+			{
+				char *ch=att->as_string(0);
+				if(ch)
+			  		longName_=string(ch);
+			}
+			else if(strcmp(att->name(),"units") == 0 && att->num_vals() > 0)
+			{
+				char *ch=att->as_string(0);
+				if(ch)
+			  		units_=string(ch);
+			}
+		
+			delete att;
+		}
+	}	
+}
+
+//=========================================================
+//
+//  MvScmVar
+//
+//=========================================================
+
+MvScmVar::MvScmVar(LevelType levelType, NcVar *var,const MvScmDim& timeDim) :
+  levelType_(levelType),
+  changed_(false),
+  presentInFile_(true),
+  rangeSet_(false),
+  consistency_(0),
+  useOffset_(false),
+  offsetUnits_("")
+{
+	setName(var);
+  	setAttributes(var);
+  
+  	int tNum=timeDim.size();
+  	long counts[1];
+	float* vals = new float[1];
+	
+	for(int i=0; i < tNum; i++)
+	{
+		counts[0]=1;		
+  		var->set_cur(i);
+  		var->get(vals,counts); 
+		data_.push_back(vector<float>(vals,vals+1));
+		
+		dataOri_.push_back(vector<float>());
+	}
+	
+	delete [] vals;
+}
+
+MvScmVar::MvScmVar(LevelType levelType, NcVar *var,const MvScmDim& timeDim, const MvScmDim &levDim) :
+  levelType_(levelType), 
+  changed_(false),
+  presentInFile_(true),
+  rangeSet_(false),
+  consistency_(0),
+  useOffset_(false),
+  offsetUnits_("")
+{
+	setName(var);
+  	setAttributes(var);
+  
+  	int tNum=timeDim.size();
+	int levNum=levDim.size();
+  	long counts[2];
+	float* vals = new float[levNum];
+	
+	for(int i=0; i < tNum; i++)
+	{
+		counts[0]=1;
+		counts[1]=levNum;		
+  		var->set_cur(i,0);
+  		var->get(vals,counts);
+		data_.push_back(vector<float>(vals,vals+levNum));
+		dataOri_.push_back(vector<float>());
+	}
+	
+	delete [] vals;
+}
+
+/*
+MvScmVar::MvScmVar(const string& name, const string& longName, const string& units,MvScmVar *var,float offset) :
+   name_(name),
+   longName_(longName),
+   units_(units),
+   presentInFile_(false),
+   rangeSet_(false),
+   consistency_(0),
+   offset_(offset)
+{
+	levelType_=var->levelType();
+	
+	for(int i=0; i < var->stepNum(); i++)
+	{
+	  	var->data(i);
+		data_.push_back(vector<float>(var->data(i).size(),0.));
+		dataOri_.push_back(vector<float>());
+	}
+}  */
+
+MvScmVar::~MvScmVar()
+{
+	if(consistency_)
+	  	delete consistency_;
+}
+
+string MvScmVar::units() const 
+{
+  	if(useOffset_)
+	  	return offsetUnits_;
+	else	   
+  		return units_;
+}	
+
+void MvScmVar::setName(NcVar *var)
+{
+	const char *ch=var->name();
+	if(ch)
+	  	name_=string(ch);
+}	
+  
+void MvScmVar::setAttributes(NcVar *var)
+{
+	int n=var->num_atts();  
+  	for(int i=0; i < n; i++)
+	{
+	  	NcAtt* att=var->get_att(i);
+		if(att)
+		{
+		  	if(strcmp(att->name(),"long_name") == 0 && att->num_vals() > 0)
+			{
+				char *ch=att->as_string(0);
+				if(ch)
+			  		longName_=string(ch);
+			}
+			else if(strcmp(att->name(),"units") == 0 && att->num_vals() > 0)
+			{
+				char *ch=att->as_string(0);
+				if(ch)
+			  		units_=string(ch);
+			}
+		
+			delete att;
+		}
+	}	
+}
+
+float MvScmVar::value(int ts,int lev)
+{
+	if(ts >=0 && ts < static_cast<int>(data_.size()))
+	{ 
+	  	if(lev >=0 && lev < static_cast<int>(data_.at(ts).size()))
+		{
+			return  data_.at(ts)[lev];
+		}	
+	}
+	
+	return -9999.;
+}
+
+float MvScmVar::consistencyValue(int ts,int lev)
+{
+	if(ts >=0 && ts < static_cast<int>(data_.size()))
+	{ 
+	  	if(lev >=0 && lev < static_cast<int>(data_.at(ts).size()))
+		{
+			if(!useOffset_)
+			  	return  data_.at(ts)[lev];
+			else
+			  	return  data_.at(ts)[lev]-offset_;
+		}	
+	}
+	
+	return -9999.;
+}	
+
+bool MvScmVar::setConsistentValue(int ts,int lev,float val)
+{
+  	if(!useOffset_)
+	  	return setValue(ts,lev,val,false);
+	else
+	  	return setValue(ts,lev,val+offset_,false);
+}
+
+bool MvScmVar::setValue(int ts,int lev,float val,bool checkCons)
+{
+	if(ts >=0 && ts < static_cast<int>(data_.size()))
+	{
+	  	if(lev >=0 && lev < static_cast<int>(data_.at(ts).size()))
+		{
+			if(dataOri_.at(ts).size() == 0)
+			{	  
+		 		dataOri_.at(ts)=data_.at(ts); 
+				changed_=true;
+			}
+				
+			data_.at(ts)[lev]=val;
+			
+			if(checkCons)			  
+				checkConsistency(ts,lev);
+			
+			return true;
+		}
+	}
+	
+	return false;
+}
+ 
+bool MvScmVar::setValue(int ts,int lev,float val,MvScmProfileChange& ch,bool checkCons)
+{
+	if(ts >=0 && ts < static_cast<int>(data_.size()))
+	{
+	  	if(lev >=0 && lev < static_cast<int>(data_.at(ts).size()))
+		{
+			if(dataOri_.at(ts).size() == 0)
+			{	  
+		 		dataOri_.at(ts)=data_.at(ts); 
+				changed_=true;
+			}
+		
+			float prevVal=data_.at(ts)[lev];		
+			data_.at(ts)[lev]=val;
+			
+			ch=MvScmProfileChange(this,ts,lev,val,prevVal);
+			
+			if(MvScm::needConsistency() && checkCons)			  
+			{			  	
+			  	checkConsistency(ts,lev);
+				if(consistency_)
+				  	ch.setDependantVar(consistency_->target());
+			}
+			
+			return true;
+		}
+	}
+	
+	return false;  
+ 
+}
+
+ 
+bool MvScmVar::changed(int ts)
+{
+	if(!changed_)
+	  	return false;
+  
+	if(ts >=0 && ts < static_cast<int>(data_.size()))
+	{
+		return static_cast<int>(data_.at(ts).size()) > 0;
+	}
+	
+	return false;
+}	
+		
+	
+bool MvScmVar::changed(int ts,int lev)
+{
+	if(!changed_)
+	  	return false;
+  
+  	if(ts >=0 && ts < static_cast<int>(data_.size()))
+	{
+	  	if(lev >=0 && lev <= static_cast<int>(data_.at(ts).size()))
+		{  
+  			if(dataOri_.at(ts).size() == 0)
+			{
+			  	return false;
+			}
+			
+			return (data_.at(ts)[lev] != dataOri_.at(ts)[lev]);
+		}
+	}
+	
+	return false;
+}	
+		
+		
+bool MvScmVar::saveChanges(NcFile &nc)
+{
+  	if(!changed_)
+	  	return true;
+  	
+	if(presentInFile_)
+	{		
+		NcVar *outVar=0;
+	
+		for(int i=0; i < nc.num_vars(); i++)
+		{
+			NcVar *v=nc.get_var(i);
+			if(v && strcmp(nc.get_var(i)->name(),name_.c_str()) ==0)
+			{
+				outVar=v;
+				break;
+			}	
+		}
+		if(!outVar)
+		{
+			return false;
+		}	
+		
+		for(unsigned int ts=0; ts < data_.size(); ts++)
+		{
+	  		if(dataOri_.at(ts).size() != 0)
+			{		  	
+		 		if(levelType_==ModelLevelType || levelType_==SoilLevelType ||
+				   levelType_==PressureLevelType)
+				{  
+	  				long counts[2];		
+					counts[0]=1;
+					counts[1]=data_.at(ts).size();
+					
+					if(useOffset_)
+					{
+					 	float *vals=new float[data_.at(ts).size()];
+					  	for(unsigned int i=0; i< data_.at(ts).size();i++)
+						{
+						  	vals[i]=data_.at(ts).at(i)-offset_;
+						}
+						outVar->set_cur(ts,0);				
+						outVar->put(vals,counts);
+					
+						delete [] vals;
+					}
+					else
+					{
+					  	float *vals = &(data_.at(ts)[0]);								
+						outVar->set_cur(ts,0);				
+						outVar->put(vals,counts);
+					}	
+				}
+				
+				else if(levelType_==SurfaceLevelType)
+				{  
+					long counts[1];		
+					counts[0]=1;
+					
+					if(useOffset_)
+					{					 	
+					  	float *vals=new float[1];					  	
+						vals[0]=data_.at(ts).at(0)-offset_;
+						outVar->set_cur(ts);				
+						outVar->put(vals,counts);
+					
+						delete [] vals;
+					}
+					else
+					{
+					  	float *vals = &(data_.at(ts)[0]);								
+						outVar->set_cur(ts);				
+						outVar->put(vals,counts);
+					}	
+				}
+							
+			}	
+		}
+	}
+	
+	for(unsigned int ts=0; ts < data_.size(); ts++)
+	{
+		dataOri_.at(ts).clear();
+	}
+
+	changed_=false;
+	
+	return true;
+}			  
+		  
+void MvScmVar::reset()
+{
+ 	for(unsigned int ts=0; ts < data_.size(); ts++)
+	{
+		if(dataOri_.at(ts).size() > 0)
+		{
+		  	for(unsigned int lev=0; lev < data_.at(ts).size(); lev++)
+			{
+			  	data_.at(ts).at(lev)=dataOri_.at(ts).at(lev);
+			}	
+		dataOri_.at(ts).clear();
+		}
+	}
+	
+	changed_=false;
+} 
+
+bool MvScmVar::fitToRange(float& val)
+{
+	if(rangeSet_)
+	{
+		if(val < rangeMin_)
+		{
+		  	val=rangeMin_;
+			return false;
+		}	
+		else if(val > rangeMax_)
+		{
+		  	val=rangeMax_;
+			return false;
+		}
+	}
+	
+	return true;
+}
+			
+void MvScmVar::compute(MvScmVar *v1,MvScmVar *v2,MvScmVar *v3,CompProc3 proc)
+{
+  	for(unsigned int ts=0; ts < data_.size(); ts++)
+	{
+	  	const vector<float>& d1=v1->data(ts);
+		const vector<float>& d2=v2->data(ts);
+	  	const vector<float>& d3=v3->data(ts);
+	  
+	  	for(unsigned int lev=0; lev < data_.at(ts).size(); lev++)
+		{		  	
+		  	float val=(*proc)(d1.at(lev),d2.at(lev),d3.at(lev));
+		  	fitToRange(val);
+			data_.at(ts)[lev]=val;
+		}
+	}		  
+}
+
+void MvScmVar::checkConsistency(int ts,int level)
+{	
+  	if(!consistency_ || ! MvScm::needConsistency())
+	  	return;
+	
+	consistency_->exec(ts,level);
+}	
+
+
+void MvScmVar::setConsistency(MvScmConsistency *c)
+{
+	if(consistency_)
+	{
+	  	delete consistency_;
+		consistency_=0;
+	}
+	consistency_=c;
+}
+
+void MvScmVar::setOffset(float offset,string units)
+{
+	if(useOffset_)
+	  	return;
+	
+	offset_=offset;
+	offsetUnits_=units;
+	useOffset_=true;
+		
+	for(unsigned int ts=0; ts < data_.size(); ts++)
+	{
+	  	for(unsigned int lev=0; lev < data_.at(ts).size(); lev++)
+		{		  	
+			data_.at(ts)[lev]+=offset_;
+		}
+	}		  
+}	
+  
+bool MvScmVar::overwrite(int fromTs)
+{
+	if(fromTs >=0 && fromTs < static_cast<int>(data_.size()))
+	{	  	
+	  	for(int ts=0; ts < static_cast<int>(data_.size()); ts++)
+		{
+		  	if(ts != fromTs)
+			{
+				if(dataOri_.at(ts).size() == 0)
+				{	  
+		 			dataOri_.at(ts)=data_.at(ts); 
+					changed_=true;
+				}
+			  			  
+			  	for(int lev=0; lev < static_cast<int>(data_.at(ts).size()); lev++)
+				{
+					
+					//float prevVal=data_.at(ts)[lev];		
+					data_.at(ts)[lev]=data_.at(fromTs)[lev];			
+					//ch=MvScmProfileChange(this,ts,lev,val,prevVal);			
+				}
+			}
+		}
+		
+		return true;
+	}
+	
+	return false;  
+ 
+}
+
+
+
+//=========================================================
+//
+//  MvScm
+//
+//=========================================================
+
+MvScm::MvScm(const string& fileName) : 
+	fileName_(fileName)
+{
+	mlVarName_["pressure_f"]=PresML;
+	mlVarName_["height_f"]=HeightML;
+	mlVarName_["t"]=TempML;
+	mlVarName_["u"]=WindUML;
+	mlVarName_["v"]=WindVML;
+	mlVarName_["q"]=SpHumML;
+	mlVarName_["relative_humidity"]=RelHumML;
+	mlVarName_["ql"]=CloudLiqML;
+	mlVarName_["qi"]=CloudIceML;
+	
+	soilVarName_["t_soil"]=TempSoil;
+	soilVarName_["q_soil"]=HumSoil;
+	
+	surfVarName_["t_skin"]=TempSurf;
+	surfVarName_["t_sea_ice"]=TempSeaIceSurf;
+	surfVarName_["open_sst"]=TempSeaSurf;
+	
+	decode();
+}  
+
+MvScm::~MvScm()
+{
+	for(int i=0; i < static_cast<int>(ml_.size()); i++)
+  		delete ml_.at(i);
+	
+	for(int i=0; i < static_cast<int>(pl_.size()); i++)
+  		delete pl_.at(i);
+	
+	for(int i=0; i < static_cast<int>(surf_.size()); i++)
+  		delete surf_.at(i);
+	
+	for(int i=0; i < static_cast<int>(soil_.size()); i++)
+  		delete soil_.at(i);	
+}
+
+
+void MvScm::decode()
+{
+	NcFile nc(fileName_.c_str());
+	
+	//Init dimensions
+	timeDim_.init(nc,"time");
+	modelLevDim_.init(nc,"nlev");
+	pressureLevDim_.init(nc,"nlevp1");
+	soilLevDim_.init(nc,"nlevs");
+		
+	//Get variables
+	int varNum=nc.num_vars();
+	for(int i=0; i < varNum; i++)
+	{
+		NcVar *var=nc.get_var(i);
+		decodeVar(var);
+	}
+	
+	initRelHum();	
+}	
+
+void MvScm::decodeVar(NcVar* var)
+{
+  	if(!var)
+	  	return;
+		
+	//Dimension vars
+	if(strcmp(var->name(),modelLevDim_.name().c_str()) == 0 || 
+	   strcmp(var->name(),pressureLevDim_.name().c_str()) == 0 ||
+	   strcmp(var->name(),soilLevDim_.name().c_str()) == 0 ||
+	   strcmp(var->name(),timeDim_.name().c_str()) == 0)
+	{
+	  	return;
+	}	
+		
+	std::set<string> dims;
+	for(int i=0; i < var->num_dims(); i++)
+	{  	
+		NcDim* dim=var->get_dim(i);
+		const char* ch=dim->name();
+		if(ch)
+		  	dims.insert(string(ch));
+	}
+	
+	
+	if(dims.find(timeDim_.name()) == dims.end())
+	{
+	  	return;
+	}	
+		
+	if(dims.size() == 1)
+	{	 
+		surf_.push_back(new MvScmVar(MvScmVar::SurfaceLevelType,var,timeDim_)); 
+		map<string,SurfVariable>::iterator it=surfVarName_.find(surf_.back()->name());
+		if(it != surfVarName_.end())
+		{
+			surfVarIndex_[it->second]=surf_.size()-1;
+		}				
+	}
+	else if(dims.size() == 2  )
+	{
+		if(dims.find(modelLevDim_.name()) != dims.end() )	
+		{
+		  	ml_.push_back(new MvScmVar(MvScmVar::ModelLevelType,var,timeDim_,modelLevDim_));
+			
+			map<string,ModelLevelVariable>::iterator it=mlVarName_.find(ml_.back()->name());
+			if(it != mlVarName_.end())
+			{
+				mlVarIndex_[it->second]=ml_.size()-1;
+			
+				//Insert Relhum after T
+				if(it->second== RelHumML)
+				{ 
+					MvScmVar* r=ml_.back();
+					r->setRange(0.,1.);
+					
+					map<ModelLevelVariable,int>::iterator tempIt=mlVarIndex_.find(TempML);
+					if(tempIt != mlVarIndex_.end())
+					{
+					  	int pos=tempIt->second+1;
+						ml_.insert(ml_.begin()+pos,r);
+						ml_.pop_back();
+						mlVarIndex_[RelHumML]=pos;
+						for(tempIt=mlVarIndex_.begin(); tempIt != mlVarIndex_.end(); tempIt++)
+						{
+						  	if(tempIt->first != RelHumML && tempIt->second >= pos)
+							  	mlVarIndex_[tempIt->first]=1+tempIt->second;
+						}
+					}
+				}	
+			
+			}			
+		}
+		else if(dims.find(pressureLevDim_.name()) != dims.end() )	
+		{
+			pl_.push_back(new MvScmVar(MvScmVar::PressureLevelType,var,timeDim_,pressureLevDim_)); 
+		}
+		else if(dims.find(soilLevDim_.name()) != dims.end() )	
+		{
+			soil_.push_back(new MvScmVar(MvScmVar::SoilLevelType,var,timeDim_,soilLevDim_)); 
+			map<string,SoilVariable>::iterator it=soilVarName_.find(soil_.back()->name());
+			if(it != soilVarName_.end())
+			{
+				soilVarIndex_[it->second]=soil_.size()-1;
+			}					  	
+		}
+	}	
+}
+
+void MvScm::save()
+{
+	//Open progvar
+	NcFile nc(fileName_.c_str(),NcFile::Write);
+		
+	for(unsigned int i=0; i < ml_.size(); i++)
+	{	  
+		ml_.at(i)->saveChanges(nc);
+	} 
+	for(unsigned int i=0; i < surf_.size(); i++)
+	{	  
+		surf_.at(i)->saveChanges(nc);
+	} 
+	for(unsigned int i=0; i < soil_.size(); i++)
+	{	  
+		soil_.at(i)->saveChanges(nc);
+	} 
+	for(unsigned int i=0; i < pl_.size(); i++)
+	{	  
+		pl_.at(i)->saveChanges(nc);
+	} 
+	
+}  
+
+void MvScm::reset()
+{
+ 	for(unsigned int i=0; i < ml_.size(); i++)
+	{
+	 	ml_.at(i)->reset(); 	  
+	}  
+	for(unsigned int i=0; i < surf_.size(); i++)
+	{	  
+		surf_.at(i)->reset();
+	} 
+	for(unsigned int i=0; i < soil_.size(); i++)
+	{	  
+		soil_.at(i)->reset();
+	} 
+	for(unsigned int i=0; i < pl_.size(); i++)
+	{	  
+		pl_.at(i)->reset();
+	} 	
+}  
+
+bool MvScm::overwrite(int fromTs)
+{
+  	for(unsigned int i=0; i < ml_.size(); i++)
+	{
+	 	ml_.at(i)->overwrite(fromTs); 	  
+	}  
+	for(unsigned int i=0; i < surf_.size(); i++)
+	{	  
+		surf_.at(i)->overwrite(fromTs);
+	} 
+	for(unsigned int i=0; i < soil_.size(); i++)
+	{	  
+		soil_.at(i)->overwrite(fromTs);
+	}
+	for(unsigned int i=0; i < pl_.size(); i++)
+	{	  
+		pl_.at(i)->overwrite(fromTs);
+	} 
+	
+	return true;
+}
+
+int MvScm::mlVarIndex(ModelLevelVariable var)
+{
+  	map<ModelLevelVariable,int>::iterator it=mlVarIndex_.find(var);
+	if(it != mlVarIndex_.end())
+	{
+		return it->second;
+	}
+	return -1;
+}  
+
+MvScmVar* MvScm::mlVar(ModelLevelVariable var)
+{
+  	int index=mlVarIndex(var);
+	
+	if(index != -1)
+	{  	
+		return ml_.at(index);
+	}	
+	
+	
+	return 0;
+}  
+
+int MvScm::soilVarIndex(SoilVariable var)
+{
+  	map<SoilVariable,int>::iterator it=soilVarIndex_.find(var);
+	if(it != soilVarIndex_.end())
+	{
+		return it->second;
+	}
+	return -1;
+}  
+
+MvScmVar* MvScm::soilVar(SoilVariable var)
+{
+  	int index=soilVarIndex(var);
+	
+	if(index != -1)
+	{  	
+		return soil_.at(index);
+	}		
+	return 0;
+}  
+
+int MvScm::surfVarIndex(SurfVariable var)
+{
+  	map<SurfVariable,int>::iterator it=surfVarIndex_.find(var);
+	if(it != surfVarIndex_.end())
+	{
+		return it->second;
+	}
+	return -1;
+}  
+
+MvScmVar* MvScm::surfVar(SurfVariable var)
+{
+  	int index=surfVarIndex(var);
+	
+	if(index != -1)
+	{  	
+		return surf_.at(index);
+	}		
+	return 0;
+}  
+void MvScm::initRelHum()
+{	
+	MvScmVar* t=mlVar(TempML);
+	MvScmVar* p=mlVar(PresML);
+	MvScmVar* q=mlVar(SpHumML);
+	MvScmVar* r=mlVar(RelHumML);	
+	MvScmVar* tSurf=surfVar(TempSurf);
+	MvScmVar* tSeaIce=surfVar(TempSeaIceSurf);
+	MvScmVar* tSea=surfVar(TempSeaSurf);
+	MvScmVar* tSoil=soilVar(TempSoil);
+	
+	if(t && t->units() == "K")
+	  	t->setOffset(-273.16,"C");
+	if(tSurf && tSurf->units() == "K")
+	  	tSurf->setOffset(-273.16,"C");
+	if(tSoil && tSoil->units() == "K")
+	  	tSoil->setOffset(-273.16,"C");	
+	if(tSea && tSea->units() == "K")
+	  	tSea->setOffset(-273.16,"C");
+	//if(tSeaIce && tSeaIce->units() == "K")
+	//  	tSeaIce->setOffset(-273.16,"C");
+		
+	if(!t || !p || !q || !r)
+	  	return;
+	
+	//r->compute(t,p,q,&metview::relativeHumidity);
+	
+	//Consistency
+	t->setConsistency(new MvScmConsistency(r,&metview::relativeHumidity,t,p,q));
+	r->setConsistency(new MvScmConsistency(q,&metview::specificHumidity,t,p,r));
+}	
+
+
+void MvScm::needConsistency(bool b)
+{
+  	needConsistency_=b;
+	
+	
+  
+}  
+
+//==========================================================
+// Static methods
+//==========================================================
+
+int MvScm::modelLevelNum(const string& fileName)
+{
+  	//Open file
+	NcFile nc(fileName.c_str());
+		
+	int num=-1;
+  	NcDim *dim=nc.get_dim("nlev");
+	if(dim)
+	{
+	  	num=dim->size();
+	}
+	
+	nc.close();
+	
+	return num;
+}	
+	
+
+//We add diag and diag2 contents to progvar
+bool MvScm::mergeOutFiles(const string& progvarFileName,const string& diagvarFileName,const string& diagvar2FileName)
+{
+	//Open progvar
+	NcFile nc(progvarFileName.c_str(),NcFile::Write);
+		
+	//Get dims from progvar
+	vector<NcDim*> dims;
+	for(int i=0; i < nc.num_dims(); i++)
+	{  	
+		NcDim* dim=nc.get_dim(i);
+		if(dim)
+		{
+		  	dims.push_back(dim); 
+			cout << dim->name() << " " << dim->size() << endl;
+		}	
+		else
+		{
+		  	cout << "bad dim" << endl;
+		}	
+	}
+	
+	//---------------------
+	// Diag
+	//---------------------
+	
+	NcFile ncDiag(diagvarFileName.c_str(),NcFile::ReadOnly);
+		
+	//Dimensions
+	if(!addDimensionsToFile(ncDiag,nc,dims))
+	{
+	  	return false;
+	}	
+		
+	//Variables
+	int varNum=ncDiag.num_vars();
+	for(int i=0; i < varNum; i++)
+	{
+		NcVar *var=ncDiag.get_var(i);
+		addVarToFile(var,nc,dims);
+	}
+	ncDiag.close();
+		
+	//---------------------
+	// Diag2
+	//---------------------
+
+	NcFile ncDiag2(diagvar2FileName.c_str(),NcFile::ReadOnly);	
+
+	//Dimensions
+	if(!addDimensionsToFile(ncDiag2,nc,dims))
+	{
+	  	return false;
+	}	
+
+
+	//Variables
+	varNum=ncDiag2.num_vars();
+	for(int i=0; i < varNum; i++)
+	{
+		NcVar *var=ncDiag2.get_var(i);
+		addVarToFile(var,nc,dims);
+	}
+	ncDiag2.close();
+	
+	
+	//Add global attributes
+	nc.add_att("dataID","SCM_OUTPUT");
+	
+	nc.close();
+	
+	return true;
+}  
+
+
+bool MvScm::addDimensionsToFile(NcFile& inNc,NcFile& outNc,std::vector<NcDim*>& dims)
+{
+	for(int i=0; i < inNc.num_dims();i++)
+	{
+		NcDim* dim=inNc.get_dim(i);
+		bool found=false;
+		for(unsigned int j=0; j < dims.size();j++)
+		{		  	
+	  		cout << dims[j]->name() << " " << dims[j]->size() << endl;
+			
+			if(strcmp(dim->name(),dims.at(j)->name()) == 0)
+			{
+		   		if(dim->size() !=  dims.at(j)->size())
+		        	{
+		  	   		return false;
+				}
+				else
+				{
+				  	found=true;
+				}
+			}	
+		}	
+		if(!found)
+		{
+			dims.push_back(outNc.add_dim(dim->name(),dim->size()));
+		}
+	}
+	
+	return true;
+}	
+
+void MvScm::addVarToFile(NcVar *inVar,NcFile& outNc,const std::vector<NcDim*>& outDims)
+{
+	cout << inVar->name() << endl;
+  
+  	//Check var name
+	for(int i=0; i < outNc.num_vars(); i++)
+	{  
+		NcVar *v=outNc.get_var(i);
+		if(v && strcmp(v->name(),inVar->name()) ==0)
+		{
+		  	cout << v->name() << endl;
+			return;
+		}
+	}
+	
+	//Check dims
+	vector<NcDim*> dims;
+	for(int i=0; i < inVar->num_dims(); i++)
+	{  	
+		NcDim* dim=inVar->get_dim(i);
+		if(dim)
+		{
+			cout << dim->name() << " " << dim->size() << endl;
+			for(unsigned int j=0; j < outDims.size(); j++)
+			{
+			  	if(strcmp(dim->name(),outDims.at(j)->name()) == 0 &&
+				   dim->size() ==  outDims.at(j)->size())
+				{
+					dims.push_back(outDims.at(j));
+					break;
+				}
+			}
+			
+		}
+		else if(!dim || static_cast<int>(dims.size()) != i+1)
+		{
+		  	return;
+		}	
+	}	
+	
+	//Create var
+	NcVar *outVar=0;
+	if(inVar->num_dims() == 0)
+	{
+	  	outVar=outNc.add_var(inVar->name(),inVar->type());
+	}
+	else if(inVar->num_dims() == 1)
+	{
+	  	outVar=outNc.add_var(inVar->name(),inVar->type(),dims[0]);
+	}
+	else if(inVar->num_dims() == 2)
+	{
+	  	outVar=outNc.add_var(inVar->name(),inVar->type(),dims[0],dims[1]);
+	}
+	else
+	{
+	  	return;
+	}
+	
+	//Add attributes
+	for(int i=0; i < inVar->num_atts(); i++)
+	{  
+		NcAtt *att=inVar->get_att(i);
+		if(att)
+		{
+		  	if(att->type() == ncChar)
+			{
+				char* v=new char[att->num_vals()];
+				for(int j=0; j < att->num_vals(); j++) 			  	
+				{
+					v[j]=att->as_char(j);
+				}
+				outVar->add_att(att->name(),att->num_vals(),v);
+				delete [] v;
+				
+			}
+			delete att;
+		}	
+	}
+	
+	//Add values_
+	if(inVar->num_dims() == 0)
+	{
+	  	long counts[1];		
+		counts[0]=1;
+		float vals;				
+  		inVar->get(&vals,0,0,0,0,0); 		
+		outVar->put(&vals,0,0,0,0,0);
+	}
+	if(inVar->num_dims() == 1)
+	{
+  		long counts[1];		
+		counts[0]=dims[0]->size();
+		float* vals = new float[counts[0]];				
+  		inVar->get(vals,counts); 		
+		outVar->put(vals,counts);	 	
+	}
+	if(inVar->num_dims() == 2)
+	{
+  		long counts[2];		
+		counts[0]=dims[0]->size();
+		counts[1]=dims[1]->size();
+		float* vals = new float[counts[0]*counts[1]];				
+  		inVar->get(vals,counts); 		
+		outVar->put(vals,counts);	 	
+	}
+}	
diff --git a/src/libUtil/MvScm.h b/src/libUtil/MvScm.h
new file mode 100644
index 0000000..dcbec8b
--- /dev/null
+++ b/src/libUtil/MvScm.h
@@ -0,0 +1,265 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvScm_inc
+#define MVScm_inc
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "netcdfcpp.h"
+
+#include "MvProfileData.h"
+#include "MvMiscelaneous.h"
+
+using namespace std;
+
+class MvScm;
+class MvScmVar;
+class MvScmProfileData;
+
+class MvScmConsistency
+{
+public:
+	typedef double (*CompProc3)(double,double,double);
+	
+	MvScmConsistency(MvScmVar* target,CompProc3 proc,MvScmVar* var1,MvScmVar* var2,MvScmVar* var3) : 
+	  target_(target), 
+	  proc_(proc),
+	  source1_(var1),source2_(var2),source3_(var3) {}
+	MvScmVar*  target() const {return target_;}
+	  
+	void exec(int,int);  
+
+protected:
+	MvScmVar*  target_;
+	CompProc3  proc_;
+	MvScmVar* source1_;
+	MvScmVar* source2_;
+	MvScmVar* source3_;
+};
+
+class MvScmProfileChange : public MvProfileChange
+{
+public:
+	MvScmProfileChange() : var_(0), step_(-1), dependantVar_(0) {}
+	MvScmProfileChange(MvScmVar* var,int step,int level,float val,float prevVal) : 
+	           MvProfileChange(level,val,prevVal),
+	           var_(var), step_(step) {};
+	
+	MvScmProfileChange(const MvScmProfileChange& c) : MvProfileChange(c), var_(c.var()), step_(c.step()) {} 
+			   
+	bool checkData(const MvScmProfileData&) const;
+	
+	MvScmVar* var() const {return var_;}
+	int    step() const {return step_;}
+	MvScmVar* dependantVar() const {return dependantVar_;}
+	void setDependantVar(MvScmVar* v) {dependantVar_=v;}
+	
+protected:
+	MvScmVar* var_;
+	int step_;
+	MvScmVar* dependantVar_;
+	
+};
+
+class MvScmProfileObserver
+{
+public:
+      MvScmProfileObserver() {};
+      virtual void profileEdited(const MvScmProfileChange&)=0;
+};
+  
+
+class MvScmProfileData : public MvProfileData 
+{
+
+public:
+    	MvScmProfileData(MvScm*,MvScmVar*,int); 
+    	
+	float value(int);
+	float level(int);
+	float auxLevel(int);
+	void  levels(vector<float>&);	
+	int   count() const;
+	void setValue(int, float);
+	MvScmVar* var() const {return var_;}
+	void setObserver(MvScmProfileObserver* obs) {observer_=obs;}
+	int step() const {return step_;}
+	bool acceptChange(const MvProfileChange&) const;
+		
+protected:  
+	MvScmVar* var_;
+	MvScmVar* auxLevel_;
+	int step_;
+	MvScmProfileObserver *observer_; 
+};
+
+class MvScmDim
+{
+public:
+	MvScmDim() : size_(0) {}
+	void init(NcFile& ,string);
+	string name() const {return name_;}
+	string longName() const {return longName_;}
+	string units() const {return units_;}
+	int size() const {return size_;}
+	void setSize(int n) {size_=n;}
+	const vector<float>& values() const {return values_;}
+
+protected:
+	void setVar(NcVar*);
+	void setAttributes(NcVar*);
+	 
+	string name_;
+	string longName_;
+	string units_;
+	int size_;
+	vector<float> values_;
+};	
+
+
+
+class MvScmVar
+{
+public:
+    	enum LevelType {NoType,ModelLevelType,PressureLevelType,SurfaceLevelType,SoilLevelType};
+	
+	typedef double (*CompProc3)(double,double,double);
+	
+  	MvScmVar(LevelType,NcVar*,const MvScmDim&);
+	MvScmVar(LevelType,NcVar*,const MvScmDim&,const MvScmDim&);
+	//vScmVar(const string&, const string&, const string&,MvScmVar*);
+	~MvScmVar();
+	
+	LevelType levelType() {return levelType_;}
+  	string name() const {return name_;}
+	string longName() const {return longName_;}
+	string units() const;
+	float value(int,int);
+	float consistencyValue(int,int);
+	const vector<float>&  data(int ts) const {if(ts >=0 && ts < static_cast<int>(data_.size())) return data_.at(ts);}
+	const vector<float>&  dataOri(int ts) const {if(ts >=0 && ts < static_cast<int>(dataOri_.size())) return dataOri_.at(ts);}
+	int stepNum() {return static_cast<int>(data_.size());}
+	int levelNum() {return (data_.size() >0)?static_cast<int>(data_.at(0).size()):0;}
+	bool setValue(int,int,float,MvScmProfileChange&,bool checkCons=true);
+	bool setConsistentValue(int,int,float);
+	bool setValue(int,int,float,bool checkCons=true);
+	bool changed(int);
+	bool changed(int,int);
+	bool saveChanges(NcFile &);
+	void reset();
+	void setRange(float min,float max) { rangeMin_=min; rangeMax_=max; rangeSet_=true;}
+	bool isRangeSet() const {return rangeSet_;}
+	float rangeMin() const {return rangeMin_;}
+	float rangeMax() const {return rangeMax_;}
+	bool fitToRange(float&);
+	void compute(MvScmVar*,MvScmVar*,MvScmVar*,CompProc3);
+	void setConsistency(MvScmConsistency*);
+	void setOffset(float,string);
+	bool overwrite(int);
+	
+protected:
+  	void setName(NcVar*);
+ 	void setAttributes(NcVar*);
+	void checkConsistency(int,int);
+	
+	LevelType levelType_;
+	string name_;
+	string longName_;
+	string units_;
+	vector<vector<float> > data_;
+	bool changed_;
+	vector<vector<float> > dataOri_;
+	bool presentInFile_;
+	bool rangeSet_;
+	float rangeMin_;
+	float rangeMax_;
+	MvScmConsistency* consistency_;
+	bool useOffset_;
+	float offset_;
+	string offsetUnits_;
+};
+
+class MvScm
+{
+
+friend class MvScmVar;
+
+public:
+	MvScm(const string&);    
+  	~MvScm();
+	
+	enum ModelLevelVariable {PresML,HeightML,TempML,WindUML,WindVML,SpHumML,RelHumML,CloudLiqML,CloudIceML};
+	enum SoilVariable {TempSoil,HumSoil};
+	enum SurfVariable {TempSurf,TempSeaIceSurf,TempSeaSurf};
+	
+	const string& fileName() const {return fileName_;}
+	
+	const MvScmDim& timeDim() const {return timeDim_;}
+	const MvScmDim& modelLevelDim() const {return modelLevDim_;}
+	const MvScmDim& pressureLevelDim() const {return pressureLevDim_;}
+	const MvScmDim& soilLevelDim() const {return soilLevDim_;}
+	
+	const vector<MvScmVar*>& modelLevel() {return ml_;}
+	const vector<MvScmVar*>& pressureLevel() {return pl_;}
+	const vector<MvScmVar*>& soilLevel() {return soil_;}
+	const vector<MvScmVar*>& surfaceLevel() {return surf_;}
+	const vector<float>& steps() const {return timeDim_.values();}	
+	int stepNum() const {return timeDim_.size();}	
+	int modelLevelNum() const {return modelLevDim_.size();}
+	void save();
+	void reset();
+	
+	static int modelLevelNum(const string&);
+	static bool mergeOutFiles(const string&,const string&,const string&);
+	
+	int mlVarIndex(ModelLevelVariable);
+	MvScmVar* mlVar(ModelLevelVariable);
+	int soilVarIndex(SoilVariable);
+	MvScmVar* soilVar(SoilVariable);
+	int surfVarIndex(SurfVariable);
+	MvScmVar* surfVar(SurfVariable);
+	void initRelHum();
+	bool overwrite(int);
+	static void needConsistency(bool);
+	static bool needConsistency() {return needConsistency_;}
+	
+protected:
+    	void decode();
+       	void decodeVar(NcVar*);
+	void notifyObservers(MvScmVar*,int,int,float,float);
+       	static bool addDimensionsToFile(NcFile&,NcFile&,std::vector<NcDim*>&);
+       	static void addVarToFile(NcVar *,NcFile&,const std::vector<NcDim*>&);
+            	
+    	string fileName_;
+	
+	MvScmDim	timeDim_;
+	MvScmDim	modelLevDim_;
+	MvScmDim	pressureLevDim_;
+	MvScmDim	soilLevDim_;
+	
+	vector<MvScmVar*> ml_;
+	vector<MvScmVar*> pl_;
+	vector<MvScmVar*> surf_; 
+	vector<MvScmVar*> soil_; 
+	
+	map<string,ModelLevelVariable> mlVarName_;
+	map<ModelLevelVariable,int> mlVarIndex_;
+	
+	map<string,SoilVariable> soilVarName_;
+	map<SoilVariable,int> soilVarIndex_;
+	
+	map<string,SurfVariable> surfVarName_;
+	map<SurfVariable,int> surfVarIndex_;
+	static bool needConsistency_;
+};  
+
+#endif
diff --git a/src/libUtil/MvStopWatch.cc b/src/libUtil/MvStopWatch.cc
new file mode 100644
index 0000000..7f7997f
--- /dev/null
+++ b/src/libUtil/MvStopWatch.cc
@@ -0,0 +1,142 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 031125 --------------- (vk Jun92) ---------------- MvStopWatch.cc
+//
+
+#include <sys/time.h>
+#include <unistd.h>
+
+#include "inc_iostream.h"
+#include "MvStopWatch.h"
+
+//_________________________________________________________ Constructors
+
+MvStopWatch::MvStopWatch()
+ : explanationString_( "stopwatch" )
+{
+   startTimer();
+}
+//_________________________________________________________
+
+MvStopWatch::MvStopWatch( const char* anExplanationString )
+ : explanationString_( anExplanationString )
+{
+   startTimer();
+}
+//_________________________________________________________ Destructor
+
+MvStopWatch::~MvStopWatch()
+{
+   printHead( "stop - final total" );
+   printTimes( startingTimeStamp_, startingClockStamp_ );
+
+   printHead( "stop-watchRemoved!" );
+   printDateTime();
+}
+//_________________________________________________________ reset
+
+void
+MvStopWatch::reset()
+{
+   reset("\0");
+}
+//_________________________________________________________
+
+void
+MvStopWatch::reset( const char* anExplanationString )
+{
+   printHead( "reset - total time until now" );
+   printTimes( startingTimeStamp_, startingClockStamp_ );
+
+   printHead( "reset - start new stopwatch!" );
+   cout << anExplanationString << " - ";
+   printDateTime();
+
+   explanationString_ = anExplanationString;
+
+   startingTimeStamp_  = previousTimeStamp_  = currentTimeStamp_;
+   startingClockStamp_ = previousClockStamp_ = currentClockStamp_;
+}
+//_________________________________________________________ lapTime
+
+void
+MvStopWatch::lapTime()
+{
+   lapTime("\0");
+}
+//_________________________________________________________
+
+void
+MvStopWatch::lapTime( const char* anExplanationString )
+{
+   printHead( "laptime" );
+   cout << anExplanationString << ": ";
+   printTimes( previousTimeStamp_, previousClockStamp_ );
+
+   previousTimeStamp_  = currentTimeStamp_;
+   previousClockStamp_ = currentClockStamp_;
+}
+//_________________________________________________________ startTimer
+
+void
+MvStopWatch::startTimer()
+{
+   printHead( "start stopwatch" );
+   printDateTime();
+
+   gettimeofday( &startingClockStamp_, 0 );
+   previousClockStamp_ = currentClockStamp_ = startingClockStamp_;
+
+   times( &currentTimeStamp_ );
+   startingTimeStamp_  = previousTimeStamp_ = currentTimeStamp_;
+}
+
+//_________________________________________________________ printHead
+
+void
+MvStopWatch::printHead( const char* string )
+{
+   cout << "["
+        << explanationString_.c_str()
+	<< "\\"
+        << string
+	<< "] ";
+}
+//_________________________________________________________ printTimes
+
+void
+MvStopWatch::printTimes( struct tms& beginTimeStamp, struct timeval& beginClockStamp )
+{
+   static double sClockTicks = sysconf(_SC_CLK_TCK);
+
+   times( &currentTimeStamp_ );
+   gettimeofday( &currentClockStamp_, 0 );
+
+   double userTicks = (double)( currentTimeStamp_.tms_utime - beginTimeStamp.tms_utime );
+   double sysTicks  = (double)( currentTimeStamp_.tms_stime - beginTimeStamp.tms_stime );
+
+   cout << userTicks / sClockTicks
+        << "u/"
+        << sysTicks / sClockTicks
+        << "s CPU ["
+	<< ( currentClockStamp_.tv_sec - beginClockStamp.tv_sec )
+	<< " sec wall clock]"
+	<< endl;
+   times( &currentTimeStamp_ );
+}
+//_________________________________________________________ printDateTime
+
+void
+MvStopWatch::printDateTime()
+{
+   time_t t;
+   time( &t );
+   cout << ctime( &t );      //-- ctime ends with a '\n'!!!
+}
diff --git a/src/libUtil/MvStopWatch.h b/src/libUtil/MvStopWatch.h
new file mode 100644
index 0000000..468b5b2
--- /dev/null
+++ b/src/libUtil/MvStopWatch.h
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// rev vk 031125 ---------------- (vk Jun92) ---------------- MvStopWatch.h
+//
+
+#ifndef MVSTOPWATCH_H
+#define MVSTOPWATCH_H
+
+#include <time.h>
+#include <sys/times.h>
+#include "inc_iostream.h"
+#include <string.h>
+using std::string;
+
+class MvStopWatch
+{
+ public:
+    MvStopWatch();
+    MvStopWatch( const char* anExplanationString );
+    ~MvStopWatch();
+
+    void  lapTime();
+    void  lapTime( const char* anExplanationString );
+    void  reset();
+    void  reset( const char* anExplanationString );
+
+ protected:
+    void startTimer();
+    void printHead( const char* string );
+    void printTimes( struct tms& beginTimeStamp, struct timeval& beginClockStamp );
+    void printDateTime();
+
+ private:
+    struct tms     startingTimeStamp_;
+    struct tms     previousTimeStamp_;
+    struct tms     currentTimeStamp_;
+
+    struct timeval startingClockStamp_;
+    struct timeval previousClockStamp_;
+    struct timeval currentClockStamp_;
+
+    string   explanationString_;
+};
+
+#endif //MVSTOPWATCH_H
diff --git a/src/libUtil/MvVersionInfo.cc b/src/libUtil/MvVersionInfo.cc
new file mode 100644
index 0000000..b22ce23
--- /dev/null
+++ b/src/libUtil/MvVersionInfo.cc
@@ -0,0 +1,103 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+
+#include "MvVersionInfo.h"
+
+#include "grib_api.h"
+#include "netcdf.h"
+
+MvVersionInfo::MvVersionInfo()
+{
+	FILE *fp;
+	const char *user = getenv("METVIEW_DIR_SHARE");
+	const char *dir  = getenv("METVIEW_DIR");
+	char version_path[256];
+	char mv_name[64];
+	char mv_label[64];
+	char mv_period[64];
+	char mv_release_date[64];
+
+    install_dir_ = dir;
+
+	sprintf (version_path, "%s/app-defaults/MvVersionDetails", user);
+
+	fp = fopen(version_path, "rt");
+
+	if (fp)
+	{
+		/* e.g.
+		    1 Metview 4 0 0 -alpha-7 2010 1990-2010 01-February-2010
+
+		Note that the file version is just there in case we want to change the fomat
+		of the file in the future. */
+		fscanf (fp, "%d %s %d %d %d %s %d %s %s", &file_version_, mv_name, &major_,
+					&minor_, &revision_,
+					mv_label, &year_, mv_period,
+					mv_release_date);
+
+		version_ = (major_ * 10000) + (minor_ * 100) + revision_;
+
+		name_             = mv_name;
+		label_            = mv_label;
+		copyright_period_ = mv_period;
+		release_date_     = mv_release_date;
+
+		fclose (fp);
+		info_found_ = true;
+	}
+	
+	else
+	{
+        error_message_ = "Cannot open Metview version file ";
+        error_message_ += version_path;
+        info_found_ = false;
+	}
+}
+
+
+MvGribApiVersionInfo::MvGribApiVersionInfo()
+{	
+	version_ =  grib_get_api_version();
+    	major_  = version_ / 10000;
+    	minor_  = (version_ - (major_ * 10000)) / 100;
+    	revision_ = version_ % 100;
+
+	info_found_ = true;	
+}
+
+MvNetcdfVersionInfo::MvNetcdfVersionInfo()
+{
+	// get version info
+	string str = nc_inq_libvers();
+
+	// get substring "x.x.x"
+	size_t pos1 = str.find('"');
+	size_t pos2 = str.find('"',++pos1);
+	string sver = str.substr(pos1,pos2-pos1);
+
+	// decode the version number
+	pos1 = sver.find('.');
+	string ss = sver.substr(0,pos1);
+	major_ = atoi(ss.c_str());
+
+	pos2 = sver.find('.',++pos1);
+	ss = sver.substr(pos1,pos2-pos1);
+	minor_ = atoi(ss.c_str());
+
+	ss = sver.substr(++pos2);
+	revision_ = atoi(ss.c_str());
+
+	version_ = major_ * 10000 + minor_ * 100 + revision_;
+
+	info_found_ = true;	
+}
diff --git a/src/libUtil/MvVersionInfo.h b/src/libUtil/MvVersionInfo.h
new file mode 100644
index 0000000..b19b439
--- /dev/null
+++ b/src/libUtil/MvVersionInfo.h
@@ -0,0 +1,82 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvVersionInfo_H
+#define MvVersionInfo_H
+
+using namespace std;
+
+
+/*
+    class MvVersionInfo
+    purpose: to provide information about Metview's version numbers, date, etc.
+    Note: the constructor loads the relevant information.
+*/
+class MvAbstractVersionInfo
+{
+public:
+    virtual ~MvAbstractVersionInfo(){};
+
+    bool infoFound()             {return info_found_;};
+    int  fileVersion()           {return file_version_;};
+    int  majorVersion()          {return major_;};
+    int  minorVersion()          {return minor_;};
+    int  revision()              {return revision_;};
+    int  version()               {return version_;};
+    int  year()                  {return year_;};
+    const string &name()         {return name_;};
+    const string &label()        {return label_;};
+    const string &period()       {return copyright_period_;};
+    const string &releaseDate()  {return release_date_;};
+    const string &errorMessage() {return error_message_;};
+    const string &installDir()   {return install_dir_;};
+
+protected:
+    MvAbstractVersionInfo(){};
+
+    bool info_found_;
+    int  file_version_;
+    int  major_;
+    int  minor_;
+    int  revision_;
+    int  version_;
+    int  year_;
+    string name_;
+    string label_;
+    string copyright_period_;
+    string release_date_;
+    string error_message_;
+    string install_dir_;
+};
+
+class MvVersionInfo : public MvAbstractVersionInfo
+{
+public:
+    	MvVersionInfo();
+    	~MvVersionInfo(){};
+
+protected:
+    void init();	
+};
+
+class MvGribApiVersionInfo : public MvAbstractVersionInfo
+{
+public:
+	MvGribApiVersionInfo();
+    	~MvGribApiVersionInfo(){};
+};
+
+class MvNetcdfVersionInfo : public MvAbstractVersionInfo
+{
+public:
+	MvNetcdfVersionInfo();
+    	~MvNetcdfVersionInfo(){};
+};
+
+#endif
diff --git a/src/libUtil/Point.cc b/src/libUtil/Point.cc
new file mode 100644
index 0000000..b0dd88a
--- /dev/null
+++ b/src/libUtil/Point.cc
@@ -0,0 +1,51 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Point.hpp"
+#include "min_max_macros.h"
+
+short Point :: get (FILE* fp)
+{
+	if (fread ((char*)&_x, sizeof(float), 1, fp) != 1) return 0;
+	if (fread ((char*)&_y, sizeof(float), 1, fp) != 1) return 0;
+	return 1;
+}
+
+
+short Point :: put (FILE* fp)
+{
+	if (fwrite ((char*)&_x, sizeof(float), 1, fp) != 1) return 0;
+	if (fwrite ((char*)&_y, sizeof(float), 1, fp) != 1) return 0;
+	return 1;
+}
+
+
+Point Point :: operator= (Point* p)
+{
+	_x = p->_x;
+	_y = p->_y;
+	return *this;
+}
+
+Point Point :: operator= (const Point& p)
+{
+	_x = p._x;
+	_y = p._y;
+	return *this;
+}
+
+Point Point :: pmax(const Point& p) const
+{
+	return Point(max(_x,p._x),max(_y,p._y));
+}
+
+Point Point :: pmin(const Point& p) const
+{
+	return Point(min(_x,p._x),min(_y,p._y));
+}
diff --git a/src/libUtil/Point.hpp b/src/libUtil/Point.hpp
new file mode 100644
index 0000000..ec84409
--- /dev/null
+++ b/src/libUtil/Point.hpp
@@ -0,0 +1,150 @@
+//
+// .SUMMARY:
+// Defines the Point class.
+//
+// .DESCRIPTION
+// This class defines a point in a two dimensional space.
+//
+
+#ifndef Point_H
+#define Point_H
+
+#include <stdio.h>
+#include <math.h>
+#include <gdefines.h>
+
+class Point
+{
+
+	float	_x,_y;		// point location
+
+public :
+
+	Point (float v=0.0, float u=0.0) { _x = v; _y = u;}
+//		Normal constructor.
+
+	Point (const Point& p) { _x = p._x; _y = p._y;}
+//		Copy initializer.
+		
+	~Point () { }
+//		Empty destructor.
+
+	void init (float v, float u) { _x = v; _y = u;}
+//		Initialize Point class.
+//		Input :
+//			u,v : point coordinates
+
+	short get (FILE* fp);
+//		Read a point from file pointed by fp.
+//		Input :
+//			fp    : file pointer
+//		Return :
+//			TRUE  : success
+//			FALSE : failure
+
+	short put (FILE* fp);
+//		Write a point into file pointed by fp.
+//		Input :
+//			fp    : file pointer
+//		Return :
+//			TRUE  : success
+//			FALSE : failure
+
+	float x () const { return _x;}
+//		Return X coordinate.
+
+	float y () const { return _y;}
+//		Return Y coordinate.
+
+	float X () const { return _x; }
+//
+	float Y () const { return _y; }
+
+	void x (float v) { _x = v; }
+//		Set X coordinate.
+//		Input :
+//			v : float value
+
+	void y (float u) { _y = u; }
+//		Set Y coordinate.
+//		Input :
+//			u : float value
+
+	void addX (float v) { _x += v; }
+//		Add a value to the X coordinate.
+//		Input :
+//			v : float value
+
+	void addY (float u) { _y += u; }
+//		Add a value to the Y coordinate.
+//		Input :
+//			u : float value
+
+	Point operator= (Point* p);
+//		Assignment capability for class Point instances.
+//		Input :
+//			p : point pointer
+
+	Point operator= (const Point& p);
+//		Assignment capability for class Point instances.
+//		Input :
+//			p : point
+
+	void operator+=(const Point& p)
+		{ _x += p._x; _y += p._y; }
+//		Add a value to the point class.
+//		Input :
+//			p : point class (value to be added)
+
+	Point operator+(Point& p)
+		{ return Point(_x+p._x, _y+p._y); }
+
+	Point operator-(Point& p)
+		{ return Point(_x-p._x, _y-p._y); }
+
+	Point pmax (const Point& p) const;
+//		Return a new point that represents the maximum value (X and Y
+//		coordinates) between two points.
+//		Input :
+//			p : point
+
+	Point pmin (const Point& p) const;
+//		Return a new point that represents the minimum value (X and Y
+//		coordinates) between two points.
+//		Input :
+//			p : point
+
+	short operator<= (const Point& p) const	{ return (_y<=p._y && _x<=p._x); }
+//		Verify if the current point is <= to p.
+//		Input :
+//			p : point
+//		Return :
+//			TRUE  : current point is <= to p
+//			FALSE : current point is not <= p
+
+	short operator< (const Point& p) const	{ return (_y<p._y && _x<p._x); }
+//		Verify if the current point is < to p.
+//		Input :
+//			p : point
+//		Return :
+//			TRUE  : current point is < to p
+//			FALSE : current point is not < p
+
+	Point radian() { return Point(_x*M_PI/180., _y*M_PI/180.); }
+//		Convert to coordinates from degrees to radians
+
+	Point degree() { return Point((_x/M_PI)*180., (_y/M_PI)*180.); }
+//		Convert to coordinates from radians to degrees
+
+	void print(char* txt = NULL)
+		{ printf("%s: %f %f\n",(txt ? txt : "Point"),_x,_y); }
+
+	short tooBig ()
+		{ return (_x>BIGFLOAT || _x<-BIGFLOAT || _y>BIGFLOAT || _y<-BIGFLOAT); }
+//		Verify if current point value is MAXFLOAT.
+
+	int isValidGeo()
+	{ return ( (_x >= -180.) && (_x <= 360.) && (_y >= -90.) && (_y <= 90.)); }
+};
+
+#endif
diff --git a/src/libUtil/Projection.hpp b/src/libUtil/Projection.hpp
new file mode 100644
index 0000000..a31cc56
--- /dev/null
+++ b/src/libUtil/Projection.hpp
@@ -0,0 +1,1282 @@
+#ifndef Projection_H
+#define Projection_H
+
+#include <string.h>
+
+#ifndef Point_H
+#include <Point.hpp>
+#endif
+
+class GribData;
+class Imagep;
+
+const short PDATUM = 0x1 ;
+const short PHEMISPHERE = 0x2 ;
+const short PLATITUDE = 0x4 ;
+const short PLONGITUDE = 0x8 ;
+const short PFIRSTLAT = 0x10 ;
+const short PSECDLAT = 0x20 ;
+
+double	Decode(char* string, short flag, short& dg, short& mn, double& sc);
+//		Decodes a string that contains geodetic coordinates.
+//		Input	:
+//			string	: character string
+//			flag	: 0 - latitude  1 - longitude
+//		Output	:
+//			dg 	: degree
+//			mn	: minute
+//			sc	: second
+//		Return	:
+//			dd	: decimal degree
+//			-1	: failure
+
+void	Encode(double, short, char*);
+//		Create a string with geodetic coordinate.
+//		Input	:
+//			rad	: Latitude or longitude  in radians
+//			flag	: 0 - latitude  1 - longitude
+//		Return	:
+//			string	: String with geodetic coordinate
+
+//
+// .SUMMARY
+//  Defines the Datum class
+//
+// .DESCRIPTION
+//  Datum class specifies datum parameters which will be used
+//  in further projection definitions.  
+//  
+// .SEE ALSO
+//
+
+class Datum
+{
+public :
+	short		Dproj;	// projection code
+	char*		Dname;	// planimetric datum name
+
+	float		Ddx,	// ellipsoid translation along x axis
+			Ddy,	// ellipsoid translation along y axis
+			Ddz;	// ellipsoid translation along z axis
+ 
+	double		Drd,	// earth equatorial radius
+			Dflt;	// earth flattening
+	
+	Datum () { }
+//		Empty constructor.
+
+	Datum (short code, char* name,double rd,double flt,float dx,float dy,float dz);
+//		Constructs class Datum.
+//		Input	:
+//			code :  planimetric datum code
+//			name :  planimetric datum name
+//			rd   :	Earth equatorial radius
+//			flt  : 	Earth flattening
+//			dx   :	Ellipsoid translation along x axis
+//			dy   :	Ellipsoid translation along y axis
+//			dz   :	Ellipsoid translation along z axis
+
+	~Datum ();
+//		Normal destructor.
+
+	short Load (FILE* fp);
+//		Read its contents from file pointed by fp.
+//		Input :
+//			fp : file pointer.
+//		Return :
+//			TRUE  : success
+//			FALSE : failure
+
+	short Save (FILE* fp);
+//		Write its contents into file pointed by fp.
+//		Input :
+//			fp : file pointer.
+//		Return :
+//			TRUE  : success
+//			FALSE : failure
+
+	char* Name() { return Dname; } 
+// 		Return the datum name.
+
+	short Code () { return Dproj;}
+//		Return projection code.
+
+};
+
+class SProjection
+{
+protected :
+
+	char*		Pname;		// projection name
+	char*		Pdname;		// datum name
+	int		Pid;		// projection id on database
+	short		Pcode,		// projection code
+			Pgbcode,	// grib projection code
+			Pgbcode1,	// grib internal general projection code
+			Pbits,		// mask of necessary parameters
+			Pdatum;		// planimetric datum
+
+	float		Pdx,		// ellipsoid translation along x axis
+			Pdy,		// ellipsoid translation along y axis
+			Pdz;		// ellipsoid translation along z axis
+ 
+	double		Prd,		// earth equatorial radius in meters.
+			Pflt;		// earth flattening
+
+	double		Poffx,		// x offset
+			Poffy;		// y offset
+
+	SProjection* 	Pout;		// projection output
+
+	void		ChangeLL(double &x, double &y); // change the planimetic datum
+
+public :
+
+	SProjection ();
+//		Normal constructor.
+			
+	virtual ~SProjection ();
+//		Normal destructor.
+
+	void	Init (short code, char* name,Datum dt);
+//		Initialize class SProjection.
+//		Input	:
+//			code  : Projection code
+//			name  : Projection name
+//			dt    : datum
+
+	void	Init (short code, char* name, short bits);
+//		Initialize class SProjection.
+//		Input	:
+//			code  : Projection code
+//			name  : Projection name
+//			bits  : mask of necessary parameters
+
+	void	Init (Datum* dt);
+//		Initialize Datum parameters.
+//		Input	:
+//			dt    : datum
+
+	virtual short Init (GribData* gd) = 0;
+//		Initialize class SProjection from GribData.
+//		Input	:
+//			gd    : GribData class pointer
+
+	char*	DatumName () { return Pdname; }
+//		Return datum name
+
+	void	DatumName (char* n);
+//		Set datum name.
+//		Input	:
+//			n    : datum name
+
+
+	SProjection& operator= (SProjection& p);
+//		Assignment operator.
+//		Input :
+//			p : SProjection
+
+	friend 	short	operator== (SProjection&, SProjection&);
+
+	double	Offx () { return Poffx;}
+//		Return the coordinate offset in x direction
+
+	void	Offx (double o) { Poffx = o; }
+//		Set the coordinate offset in x direction
+//		Input :
+//			o : x offset
+
+	double	Offy () { return Poffy;}
+//		Return the coordinate offset in y direction
+
+	void	Offy (double o) { Poffy = o; }
+//		Set the coordinate offset in y direction
+//		Input :
+//			o : y offset
+
+	void	SetId (int id) {Pid = id;}
+//		Set projection id.
+//		Input	:
+//			id : Projection identification number.
+
+	int	Id () { return Pid;}
+//		Return the projection identification number.
+
+	virtual short	Load (FILE* f);
+//		Load parameters from file pointed by f.
+//		Input :
+//			f : file pointer
+
+	virtual short	Save (FILE* f);
+//		Save parameters into file pointed by f.
+//		Input :
+//			f : file pointer
+
+	char*	Name() { return Pname; } 
+// 		Returns the projection name.
+
+	short	PDatum() {return Pdatum;} 
+// 		Returns the planimetric datum.
+
+	void 	SetDestinationProjection(SProjection* p) {Pout = p;}
+//		Returns a pointer to projection class.
+
+	short Code() { return Pcode; }
+//		Returns the projection code.
+
+	void  Code (short c) { Pcode = c; }
+//		Set projection code.
+//		Input :
+//			c : projection code
+
+	short GribCode() { return Pgbcode; }
+//		Returns the projection grib code.
+
+	short GribInternalCode() { return Pgbcode1; }
+//		Returns the general projection grib code.
+
+	void GribCode(short c) { Pgbcode = c; }
+//		Sets the projection grib code.
+
+	void GribInternalCode(short c) { Pgbcode1 =c; }
+//		Sets the general projection grib code.
+
+	short Parameters (short p) { return p&Pbits;}
+//		Check if parameter p is necessary to define projection.
+//		Input	:
+//			p : Parameter code.
+//		Return	:
+//			TRUE : parameter is necessary.
+//			FALSE : parameter is not necessary.
+
+	float EllipsoidTranslationX () { return Pdx; }
+//		Returns the ellipsoid translation along x axis.
+
+	void  EllipsoidTranslationX (float e) { Pdx = e; }
+//		Set the ellipsoid translation along x axis.
+//		Input :
+//			e : ellipsoid translation
+
+	float EllipsoidTranslationY () { return Pdy; }
+//		Returns the ellipsoid translation along y axis.
+
+	void  EllipsoidTranslationY (float e) { Pdy = e; }
+//		Set the ellipsoid translation along y axis.
+//		Input :
+//			e : ellipsoid translation
+
+	float EllipsoidTranslationZ () { return Pdz; }
+//		Returns the ellipsoid translation along z axis.
+
+	void  EllipsoidTranslationZ (float e) { Pdz = e; }
+//		Set the ellipsoid translation along z axis.
+//		Input :
+//			e : ellipsoid translation
+
+	double EarthRadius () { return Prd; }
+//		Returns the earth equatorial radius.
+
+	void   EarthRadius (double e) { Prd = e; }
+//		Set the earth equatorial radius.
+//		Input :
+//			e : earth radius
+
+	double EarthFlattening () { return Pflt; }
+//		Returns the earth flattening.
+
+	void   EarthFlattening (double e) { Pflt = e; }
+//		Set the earth flattening.
+//		Input :
+//			e : earth flattening
+
+	virtual	Point	LL2PC (Point& p) = 0;
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual	Point	PC2LL (Point& p) = 0;
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//		ptll : Corresponding geodetic coordinates
+
+	virtual double	SensorResolutionX () = 0;
+//		Returns the sensor angle resolution X.
+
+	virtual void    SensorResolutionX (double s) = 0;
+//		Set the sensor angle resolution X.
+//		Input :
+//			s : angle resolution
+
+	virtual double	SensorResolutionY () = 0;
+//		Returns the sensor angle resolution Y.
+
+	virtual void    SensorResolutionY (double s) = 0;
+//		Set the sensor angle resolution Y.
+//		Input :
+//			s : angle resolution
+
+	virtual double SubSatelliteX () = 0;
+//		Returns the sub-satellite X coordinate.
+
+	virtual void   SubSatelliteX (double s) = 0;
+//		Set the sub-satellite X coordinate.
+//		Input :
+//			s : sub-satellite X coordinate
+
+	virtual double SubSatelliteY () = 0;
+//		Returns the sub-satellite Y coordinate.
+
+	virtual void   SubSatelliteY (double s) = 0;
+//		Set the sub-satellite Y coordinate.
+//		Input :
+//			s : sub-satellite Y coordinate
+
+	virtual double OriginX () = 0;
+//		Returns inital image x coordinate.
+
+	virtual double OriginY () = 0;
+//		Returns inital image y coordinate.
+
+	virtual double SubSatelliteLng () = 0;
+//		Returns the sub-satellite longitude in radians.
+
+	virtual void   SubSatelliteLng (double s) = 0;
+//		Set the sub-satellite longitude in radians.
+//		Input :
+//			s : longitude in radians
+
+	virtual double SubSatelliteLat () = 0;
+//		Returns the sub-satellite latitude in radians.
+
+	virtual void   SubSatelliteLat (double s) = 0;
+//		Set the sub-satellite latitude in radians.
+//		Input :
+//			s : latitude in radians
+
+	virtual double Radius () = 0;
+//		Returns the satellite radius in meters.
+
+	virtual void   Radius (double s) = 0;
+//		Set the satellite radius in meters.
+//		Input :
+//			s : radius
+
+	virtual double Yaw () = 0;
+//		Returns the orientation angle in radians.
+
+	virtual void   Yaw (double s) = 0;
+//		Set the orientation angle in radians.
+//		Input :
+//			s : orientation angle
+
+	virtual short Hemisphere () = 0;
+//		Returns hemisphere.
+
+	virtual void  Hemisphere (short h) = 0;
+//		Set hemisphere.
+//		Input :
+//			h : hemisphere
+
+	virtual double OriginLatitude () = 0;
+//		Returns the origin parallel.
+
+	virtual void   OriginLatitude (double o) = 0;
+//		Set the origin parallel.
+//		Input :
+//			o : origin parallel
+
+	virtual double OriginLongitude () = 0;
+//		Returns the origin meridian.
+
+	virtual void   OriginLongitude (double o) = 0;
+//		Set the origin meridian.
+//		Input :
+//			o : origin meridian
+
+	virtual double StandardLatitudeOne () = 0;
+//		Returns the standard parallel one.
+
+	virtual void   StandardLatitudeOne (double s) = 0;
+//		Set the standard parallel one.
+//		Input :
+//			s : parallel
+
+	virtual double StandardLatitudeTwo () = 0;
+//		Returns the standard parallel two.
+
+	virtual void   StandardLatitudeTwo (double s) = 0;
+//		Set the standard parallel two.
+//		Input :
+//			s : parallel
+
+	virtual double	ScanningMode () { return 0.; }
+//		Returns the Scanning Mode.
+
+	virtual void    ScanningMode (double) { }
+//		Set the Scanning Mode.
+//		Input :
+//			y : scanning mode
+};
+
+//
+// .SUMMARY
+//  Defines the general projection class.
+//
+// .DESCRIPTION
+//  GerenalProjection is a general class related to the following
+//  projections:utm,mercator,gauss,lambert-million,
+//  lambert,polyconic,cilindric equidistance,polar stereo,bipolar,albers,
+//  miller.
+//  
+// .SEE ALSO
+//  Point,SProjection
+
+class GeneralProjection : public SProjection
+{
+protected :
+
+	short		GPhemis;	// hemisphere : polar stereo
+
+				    	// all these parameters must be in
+					// radians
+	double		GPlat0,		// origin parallel     
+			GPlon0,		// origin meridian
+			GPstlat1,	// standard parallel
+			GPstlat2;	// standard parallel	
+		
+public :
+
+	GeneralProjection () { Pout = this;}
+//		Normal constructor.
+//		Input	:
+//			p	: projection code
+//			n	: projection name
+//			gbc	: grib projection code
+//			gbc1	: grib internal general projection code
+
+	~GeneralProjection () { }
+//		Normal destructor.
+
+	void	Init (Datum* pd, short hemis, double lat0, double lon0, double stlat1, double stlat2);
+//		Initialize class GeneralProjection.
+//		Input :	
+//			pd	: Datum pointer	
+//			hemis 	: Hemisphere
+//			lat0	: origin parallel
+//			lon0	: origin meridian
+//			stlat1	: standart parallel
+//			stlat2	: standart parallel
+
+	virtual short Init (GribData* gd);
+//		Initialize class GeneralProjection from GribData.
+//		Input	:
+//			gd    : GribData class pointer
+
+	void	Init (double r) {Prd = r;}
+// 		Return the earth equatorial radius (Prd) initialized.
+
+	virtual short	Load (FILE* f);
+//		Load parameters from file pointed by f.
+//		Input :
+//			f : file pointer
+
+	virtual short	Save (FILE* f);
+//		Save parameters into file pointed by f.
+//		Input :
+//			f : file pointer
+
+	friend 	short	operator== (GeneralProjection&, GeneralProjection&);
+
+	virtual short Hemisphere () { return GPhemis; }
+//		Returns hemisphere.
+
+	virtual void  Hemisphere (short h) { GPhemis = h; }
+//		Set hemisphere.
+//		Input :
+//			h : hemisphere
+
+	virtual double OriginLatitude () { return GPlat0; }
+//		Returns the origin parallel.
+
+	virtual void   OriginLatitude (double o)  { GPlat0 = o; }
+//		Set the origin parallel.
+//		Input :
+//			o : origin parallel
+
+	virtual double OriginLongitude () { return GPlon0; }
+//		Returns the origin meridian.
+
+	virtual void   OriginLongitude (double o)  { GPlon0 = o; }
+//		Set the origin meridian.
+//		Input :
+//			o : origin meridian
+
+	virtual double StandardLatitudeOne () { return GPstlat1; }
+//		Returns the standard parallel one.
+
+	virtual void   StandardLatitudeOne (double s) { GPstlat1 = s; }
+//		Set the standard parallel one.
+//		Input :
+//			s : parallel
+
+	virtual double StandardLatitudeTwo () { return GPstlat2; }
+//		Returns the standard parallel two.
+
+	virtual void   StandardLatitudeTwo (double s) { GPstlat2 = s; }
+//		Set the standard parallel two.
+//		Input :
+//			s : parallel
+
+	virtual	Point	LL2PC (Point&) = 0;
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual	Point	PC2LL (Point&) = 0;
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+
+	virtual double	SensorResolutionX () { return 0.; }
+//		Returns the sensor angle resolution X.
+
+	virtual void	SensorResolutionX (double ) { }
+//		Set the sensor angle resolution X.
+//		Input :
+//			s : sensor angle
+
+	virtual double	SensorResolutionY () {return 0.;}
+//		Returns the sensor angle resolution Y.
+
+	virtual void	SensorResolutionY (double ) { }
+//		Set the sensor angle resolution Y.
+//		Input :
+//			s : sensor angle
+
+	virtual double SubSatelliteX () {return 0.;}
+//		Returns the sub-satellite X coordinate.
+
+	virtual void   SubSatelliteX (double ) { }
+//		Set the sub-satellite X coordinate.
+//		Input :
+//			s : X coordinate
+
+	virtual double SubSatelliteY () {return 0.;}
+//		Returns the sub-satellite Y coordinate.
+
+	virtual void   SubSatelliteY (double ) { }
+//		Set the sub-satellite Y coordinate.
+//		Input :
+//			s : Y coordinate
+
+	virtual double OriginX () {return 0.;}
+//		Returns inital image x coordinate.
+
+	virtual double OriginY () {return 0.;}
+//		Returns inital image y coordinate.
+
+	virtual double SubSatelliteLng () {return 0.;}
+//		Returns the sub-satellite longitude in radians.
+
+	virtual void   SubSatelliteLng (double ) { }
+//		Set the sub-satellite longitude in radians.
+//		Input :
+//			s : longitude
+
+	virtual double SubSatelliteLat () {return 0.;}
+//		Returns the sub-satellite latitude in radians.
+
+	virtual void   SubSatelliteLat (double ) { }
+//		Set the sub-satellite latitude in radians.
+//		Input :
+//			s : latitude
+
+	virtual double Radius () {return 0.;}
+//		Returns the satellite radius in meters.
+
+	virtual void   Radius (double ) { }
+//		Set the satellite radius in meters.
+//		Input :
+//			r : satellite radius
+
+	virtual double Yaw () {return 0.;}
+//		Returns the orientation angle in radians.
+
+	virtual void   Yaw (double ) { }
+//		Set the orientation angle in radians.
+//		Input :
+//			y : orientation angle
+
+};
+
+
+//
+// .SUMMARY
+//  Defines the Utm class.
+//
+// .DESCRIPTION
+//  Utm is a projection class with planimetric datum
+//  Sad69 and Corrego Alegre  (Hayford Ellipsoid).
+//
+// .SEE ALSO
+//  Point, GeneralProjection
+//
+
+class Utm : public GeneralProjection
+{
+public :
+	Utm () {}
+//		Normal constructor.
+
+	~Utm () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the VisNoProjection class.
+//
+// .DESCRIPTION
+//  NoProjection does not qualify the data projection, but it provides
+//  the virtual methods to keep compatibility with GeneralProjection.
+//  Coordinate transformation just return the input value.
+//
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class VisNoProjection : public GeneralProjection
+{
+public :
+	VisNoProjection () {}
+//		Normal constructor.
+
+	~VisNoProjection () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point& p) { return p;}
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			p : Geodetic coordinates
+//		Return	: 
+//			Point : Same input coordinates.
+
+	virtual Point PC2LL(Point& p) { return p;}
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			p : Projection coordinates
+//		Return 	:
+//			Point : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the GeneralLambert class.
+//
+// .DESCRIPTION
+//  GeneralLambert class is a general class related to the following
+//  projections : lambert million and lambert.
+// 
+// .SEE ALSO
+//  Point ,GeneralProjection
+
+class GeneralLambert : public GeneralProjection
+{
+public :
+	GeneralLambert () {}
+//		Normal constructor.
+
+//	~GeneralLambert () {}
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+//
+// .SUMMARY
+//  Defines the VisMercator class.
+//
+// .DESCRIPTION
+//  Mercator is a projection class which uses the Hayford Ellipsoid.
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class VisMercator : public GeneralProjection
+{
+
+public :
+	VisMercator ();
+//		Normal constructor.
+
+	~VisMercator () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//		ptll : Corresponding geodetic coordinates
+};
+
+//
+// .SUMMARY
+//  Defines the Gauss class.
+//
+// .DESCRIPTION
+//  Gauss is a projection class with planimetric datum
+//  Corrego Alegre (Hayford Ellipsoid).
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class Gauss : public GeneralProjection
+{
+
+public :
+	Gauss ();
+//		Normal constructor.
+
+	~Gauss () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+//
+};
+
+
+//
+// .SUMMARY
+//  Defines the LambertMillion class.
+//
+// .DESCRIPTION
+//  LambertMillion is a projection class with calculated projection parameters
+//  (Hayford Ellipsoid).
+//  
+// .SEE ALSO
+//  Point,GeneralLambert
+//
+
+class LambertMillion : public GeneralLambert
+{
+
+public :
+	LambertMillion () {}
+//		Normal constructor.
+
+	~LambertMillion () { }
+//		Normal destructor.
+
+};
+
+
+//
+// .SUMMARY
+//  Defines the Lambert class.
+//
+// .DESCRIPTION
+//  Lambert is a projection class with projection parameters given by
+//  the user (Hayford Ellipsoid).
+//  
+// .SEE ALSO
+//  Point,GeneralLambert
+//
+
+class Lambert : public GeneralLambert
+{
+
+public :
+	Lambert () {}
+//		Normal constructor.
+
+	~Lambert () { }
+//		Normal destructor.
+
+};
+
+
+//
+// .SUMMARY
+//  Defines the Polyconic class.
+//
+// .DESCRIPTION
+//  Polyconic is a projection class which uses the Hayford Ellipsoid.
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class Polyconic : public GeneralProjection
+{
+
+public :
+	Polyconic () {}
+//		Normal constructor.
+
+	~Polyconic () { }
+//		Normal constructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+//
+};
+
+//
+// .SUMMARY
+//  Defines the CylindEquid class.
+//
+// .DESCRIPTION
+//  CylindEquid is a projection class which uses the spherical model
+//  with earth radius given by the user.
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class CylindEquid : public GeneralProjection
+{
+
+public :
+	CylindEquid ();
+//		Normal constructor.
+
+	~CylindEquid () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll: Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the PolarStereo class.
+//
+// .DESCRIPTION
+//  PolarStereo is a projection class which uses the Hayford Ellipsoid.
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class PolarStereo : public GeneralProjection
+{
+
+public :
+	PolarStereo (char = 'N', float = 0.0);
+//		Normal constructor.
+//		Input:
+//			hemisphere: 'N' or 'S'
+//			vertical longitude
+
+	~PolarStereo () { }
+//		Normal destructor.
+	
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the Bipolar class.
+//
+// .DESCRIPTION
+//  Bipolar is a projection class which uses the spherical model
+//  with earth radius given by the user.
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class Bipolar : public GeneralProjection
+{
+
+public :
+	Bipolar () {}
+//		Normal constructor.
+
+	~Bipolar () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the Albers class.
+//
+// .DESCRIPTION
+//  Albers is a projection class with projection parameters given by
+//  the user (Hayford Ellipsoid).
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class Albers : public GeneralProjection
+{
+
+public :
+	Albers () {}
+//		Normal constructor.
+
+	~Albers () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the Miller class.
+//
+// .DESCRIPTION
+//  Miller is a projection class which uses the spherical model
+//  with earth radius given by the user.
+//  
+// .SEE ALSO
+//  Point,GeneralProjection
+//
+
+class Miller : public GeneralProjection	
+{
+
+public :
+	Miller () {}
+//		Normal constructor.
+
+	~Miller () { }
+//		Normal destructor.
+
+	virtual Point LL2PC(Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual Point PC2LL(Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//		ptll : Corresponding geodetic coordinates
+};
+
+
+//
+// .SUMMARY
+//  Defines the VisSatellite projection class.
+//
+// .DESCRIPTION
+//  SatelliteProjection is a class derived from SProjection that will be
+//  used to meteorological images (low resolution images).
+//  
+// .SEE ALSO
+//  Point,SProjection
+//
+
+class VisSatellite : public SProjection
+{
+	double		SPri,	// Sensor angle resolution (y axis, radians)
+			SPrj,	// Sensor angle resolution (x axis, radians)
+			SPis,	// Y-coordinate of sub-satellite point 
+			SPjs,	// X-coordinate of sub-satellite point
+			SPla0,	// Latitude of sub-satellite point  (radians)
+			SPlo0,	// Longitude of sub-satellite point (radians)
+			SPrs,	// Radii of satellite (meters)
+			SPscn,	// Scaning mode: 0-WE/NS, 1-SN/EW
+			SPyaw;	// The orientation of the grid i.e. the angle
+				// in radians between the increasing y axis
+				// and the meridian of the sub-satellite point 
+				// in the direction of increasing latitude.
+
+public :
+
+	VisSatellite ();
+//		Normal constructor.
+
+	~VisSatellite () { }
+//		Normal destructor.
+
+	short   Init (VisSatellite* vs);
+
+	virtual short Init (GribData* gd);
+//		Initialize class VisSatellite from GribData.
+//		Input :
+//			gd : GribData pointer
+
+	virtual void Init (float res);
+//		Initialize class VisSatellite. Used only for Meteosat images.
+//		Input :
+//			res : image resolution
+
+	virtual short	Load (FILE* f);
+//		Load parameters from file pointed by f.
+//		Input :
+//			f : file pointer
+
+	virtual short	Save (FILE* f);
+//		Save parameters into file pointed by f.
+//		Input :
+//			f : file pointer
+
+	friend 	short	operator== (VisSatellite&, VisSatellite&);
+
+	virtual double	SensorResolutionX () { return SPrj; }
+//		Returns the sensor angle resolution X.
+
+	virtual void	SensorResolutionX (double s) { SPrj = s; }
+//		Set the sensor angle resolution X.
+//		Input :
+//			s : sensor angle
+
+	virtual double	SensorResolutionY () { return SPri; }
+//		Returns the sensor angle resolution Y.
+
+	virtual void	SensorResolutionY (double s) { SPri = s; }
+//		Set the sensor angle resolution Y.
+//		Input :
+//			s : sensor angle
+
+	virtual double	SubSatelliteX () { return SPjs; }
+//		Returns the sub-satellite X coordinate.
+
+	virtual void   SubSatelliteX (double s) { SPjs = s; }
+//		Set the sub-satellite X coordinate.
+//		Input :
+//			s : X coordinate
+
+	virtual double	SubSatelliteY () { return SPis; }
+//		Returns the sub-satellite Y coordinate.
+
+	virtual void   SubSatelliteY (double s) { SPis = s; }
+//		Set the sub-satellite Y coordinate.
+//		Input :
+//			s : Y coordinate
+
+	virtual double	SubSatelliteLng () { return SPlo0; }
+//		Returns the sub-satellite longitude in radians.
+
+	virtual void   SubSatelliteLng (double s) { SPlo0 = s; }
+//		Set the sub-satellite longitude in radians.
+//		Input :
+//			s : longitude
+
+	virtual double	SubSatelliteLat () { return SPla0; }
+//		Returns the sub-satellite latitude in radians.
+
+	virtual void   SubSatelliteLat (double s) { SPla0 = s; }
+//		Set the sub-satellite latitude in radians.
+//		Input :
+//			s : latitude
+
+	virtual double	Radius () { return SPrs; }
+//		Returns the satellite radius in meters.
+
+	virtual void   Radius (double r) { SPrs = r; }
+//		Set the satellite radius in meters.
+//		Input :
+//			r : satellite radius
+
+	virtual double	Yaw () { return SPyaw; }
+//		Returns the orientation angle in radians.
+
+	virtual void    Yaw (double y) { SPyaw = y; }
+//		Set the orientation angle in radians.
+//		Input :
+//			y : orientation angle
+
+	virtual double	ScanningMode () { return SPscn; }
+//		Returns the Scanning Mode.
+
+	virtual void    ScanningMode (double scn ) { SPscn = scn; }
+//		Set the Scanning Mode.
+//		Input :
+//			y : scanning mode
+	virtual double OriginX () { return 0.; }
+//		Returns inital image x coordinate.
+
+	virtual double OriginY () { return 0.; }
+//		Returns inital image y coordinate.
+
+	virtual short Hemisphere () { return 0; }
+//		Returns hemisphere.
+
+	virtual void  Hemisphere (short ) { }
+//		Set hemisphere.
+//		Input :
+//			h : hemisphere
+
+	virtual double OriginLatitude () { return 0L; }
+//		Returns the origin parallel.
+
+	virtual void   OriginLatitude (double ) { } 
+//		Set the origin parallel.
+//		Input :
+//			o : origin parallel
+
+	virtual double OriginLongitude () { return 0L; }
+//		Returns the origin meridian.
+
+	virtual void   OriginLongitude (double )  { }
+//		Set the origin meridian.
+//		Input :
+//			o : origin meridian
+
+	virtual double StandardLatitudeOne () { return 0L; }
+//		Returns the standard parallel one.
+
+	virtual void   StandardLatitudeOne (double )  { }
+//		Set the standard parallel one.
+//		Input :
+//			s : parallel
+
+	virtual double StandardLatitudeTwo () { return 0L; }
+//		Returns the standard parallel two.
+
+	virtual void   StandardLatitudeTwo (double )  { }
+//		Set the standard parallel two.
+//		Input :
+//			s : parallel
+
+	virtual	Point	LL2PC (Point&);
+//		Geodetic to projection coordinates transformation.
+//		Input 	: 
+//			ptll : Geodetic coordinates
+//		Return	: 
+//			ptpc : Corresponding projection coordinates
+
+	virtual	Point	PC2LL (Point&);
+//		Projection to geodetic coordinates transformation.
+//		Input	: 
+//			ptpc : Projection coordinates
+//		Return 	:
+//			ptll : Corresponding geodetic coordinates
+};
+
+	SProjection* NewInstance (short gcod);
+//		Get an Instance to a especific projection.
+//		Input	:
+//			scod	: MMETVIEW projection code (defined in stypes.hpp)
+
+
+#endif
diff --git a/src/libUtil/Prototype.hpp b/src/libUtil/Prototype.hpp
new file mode 100644
index 0000000..ce86f2b
--- /dev/null
+++ b/src/libUtil/Prototype.hpp
@@ -0,0 +1,142 @@
+//
+// .NAME:	
+//  Prototype
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Implements a template for the "prototype" pattern.
+//
+//  The "prototype" pattern is an extension of the "singleton"
+//  pattern, for a hierarchy of classes which is instantiated
+//  at runtime.
+//
+//  Each subclass of factory "registers" itself at compile time;
+//  therefore, the addition of a new factory requires no change
+//  the parent class.
+//
+// .CLIENTS:
+//
+//
+//
+// .RESPONSABILITIES:
+//
+//
+//
+//  
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//  	
+//
+// .REFERENCES:
+//  This technique is described in the article 
+//  "A New and Useful Template Technique: 'Traits'", 
+//  included in the book "C++ Gems"  
+//
+#ifndef Prototype_H
+#define Prototype_H
+
+#include "Cached.h"
+#include "inc_stl.h"
+
+// Class Device Prototype - clones a new Device on Request
+
+// struct BuilderTraits {
+//	typedef Builder       Type;
+//      static  Type&         DefaultObject();
+// }
+
+
+template <class Trait> 
+class Prototype 
+{
+
+	typedef map<Cached, typename Trait::Type*, less<Cached> > Map;
+
+	static Map *map_;
+
+        Cached     name_;
+
+public:
+
+        // -- Normal Constructor
+        Prototype (const Cached& prototypeName, typename Trait::Type* proto);
+	// -- Destructor
+	virtual ~Prototype();
+
+        // -- Virtual Constructor 
+        static typename Trait::Type& Find    ( const char* );
+        static typename Trait::Type* Lookup  ( const char* );
+
+	const Cached& Name() const { return name_; }
+};
+
+// Initialisation of static variable
+
+template <class Trait>
+typename Prototype<Trait>::Map* Prototype<Trait>::map_ = 0;
+
+// Constructor
+
+template<class Trait>
+Prototype<Trait>::Prototype(const Cached& name, typename Trait::Type* proto):
+	name_(name)
+{
+           if ( map_ == 0 )
+	  map_ = new typename Prototype<Trait>::Map();
+ 
+	(*map_)[name_] = proto;
+}
+
+// Destructor
+template<class Trait>
+Prototype<Trait>::~Prototype ()
+{
+	map_->erase ( name_ );
+}
+
+// Virtual Constructor
+
+template <class Trait> 
+typename Trait::Type&
+Prototype <Trait>::Find ( const char* subclassName )
+{
+
+	if ( subclassName == 0 ) return Trait::DefaultObject();
+
+	typename Map::iterator i = map_->find ( subclassName );
+
+	if ( i == map_->end() )
+		return Trait::DefaultObject();
+
+	typename Trait::Type* proto = (*i).second;
+
+	return *proto;
+}
+
+template <class Trait> 
+typename Trait::Type*
+Prototype <Trait>::Lookup ( const char* subclassName )
+{
+
+	if ( subclassName == 0 ) return Trait::DefaultObject();
+
+	typename Map::iterator i = map_->find ( subclassName );
+
+	if ( i == map_->end() )
+		return Trait::DefaultObject();
+
+	typename Trait::Type* proto = (*i).second;
+
+	return proto;
+}
+
+
+#endif
diff --git a/src/libUtil/Rectangle.h b/src/libUtil/Rectangle.h
new file mode 100644
index 0000000..e521ade
--- /dev/null
+++ b/src/libUtil/Rectangle.h
@@ -0,0 +1,24 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef RECTANGLE_H
+#define RECTANGLE_H
+
+
+
+typedef struct
+{
+        double  top,       /* y upperleft */
+		left,      /* x upperleft */
+                bottom,    /* y lower right */
+                right;     /* x lower right  */
+
+} Rectangle;
+
+#endif
diff --git a/src/libUtil/Request.cc b/src/libUtil/Request.cc
new file mode 100644
index 0000000..76552db
--- /dev/null
+++ b/src/libUtil/Request.cc
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef Request_H
+#include "Request.h"
+#endif
+
+#include "Path.h"
+
+Request::Request():
+	MvRequest((request*)0)
+{
+}
+
+Request::Request(const char* verb):
+	MvRequest(verb)
+{
+}
+Request::Request(const string& verb):
+	MvRequest(verb.c_str())
+{
+}
+
+Request::Request(const MvRequest& other):
+	MvRequest(other)
+{
+}
+
+Request::Request(const Path& path):
+	MvRequest(path.loadRequest())
+{
+}
+
+Request::~Request()
+{
+}
+
+void Request::save(const Path& path) const
+{
+	path.saveRequest(*this);
+}
+
+vector<string> Request::get(const char* name) const
+{
+	int i = 0;
+	const char* p;
+
+	vector<string> result;
+	result.reserve(count_values(CurrentRequest,name));
+
+	while(p = get_value(CurrentRequest,name,i++))
+		result.push_back(p);
+
+	return result;
+}
+
+
+void Request::set(const char* name,const vector<string>& v)
+{
+	unset_value(CurrentRequest,name);
+	for(vector<string>::const_iterator j = v.begin(); j != v.end(); ++j)
+		add_value(CurrentRequest,name,"%s",(*j).c_str());
+}
+
+vector<string> Request::get(const string& name) const
+{
+	return get(name.c_str());
+}
+
+void Request::set(const string& name,const vector<string>& v)
+{
+	set(name.c_str(),v);
+}
diff --git a/src/libUtil/Request.h b/src/libUtil/Request.h
new file mode 100644
index 0000000..3ad178a
--- /dev/null
+++ b/src/libUtil/Request.h
@@ -0,0 +1,129 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Request.h
+// Baudouin Raoult - ECMWF Jul 99
+
+#ifndef Request_H
+#define Request_H
+
+#include <string>
+using std::string;
+
+#include "inc_stl.h"
+
+#ifndef Metview_H
+#include "Metview.h"
+#endif
+
+class Path;
+
+class Request : public MvRequest {
+public:
+
+// -- Exceptions
+	// None
+
+// -- Contructors
+
+	Request();
+	Request(const char*);
+	Request(const string&);
+
+	Request(const Path&);
+	Request(const MvRequest&);
+
+// -- Destructor
+
+	~Request(); // Change to virtual if base class
+
+// -- Convertors
+	// None
+
+// -- Operators
+	// None
+
+// -- Methods
+
+	void load(const Path&);
+	void save(const Path&) const;
+
+	vector<string> get(const string&) const;
+	vector<string> get(const char*) const;
+
+	void set(const string&,const vector<string>&);
+	void set(const char*,const vector<string>&);
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+	// Uncomment for persistent, remove otherwise
+	// static os_typespec* get_os_typespec();
+
+protected:
+
+// -- Members
+	// None
+
+// -- Methods
+	
+	// void print(ostream&) const; // Change to virtual if base class	
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+private:
+
+// No copy allowed
+
+//	Request(const Request&);
+//	Request& operator=(const Request&);
+
+// -- Members
+	// None
+
+// -- Methods
+	// None
+
+// -- Overridden methods
+	// None
+
+// -- Class members
+	// None
+
+// -- Class methods
+	// None
+
+// -- Friends
+
+	//friend ostream& operator<<(ostream& s,const Request& p)
+	//	{ p.print(s); return s; }
+
+};
+
+inline void destroy(Request**) {}
+
+// If persistent, uncomment, otherwise remove
+//#ifdef _ODI_OSSG_
+//OS_MARK_SCHEMA_TYPE(Request);
+//#endif
+
+#endif
diff --git a/src/libUtil/TableReader.cc b/src/libUtil/TableReader.cc
new file mode 100644
index 0000000..a3c5fd7
--- /dev/null
+++ b/src/libUtil/TableReader.cc
@@ -0,0 +1,702 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*******************************  LICENSE  *******************************
+
+
+ Copyright 2011 European Centre for Medium-Range Weather Forecasts (ECMWF)
+ 
+ Licensed under the Apache License, Version 2.0 (the "License"); 
+ you may not use this file except in compliance with the License. 
+ You may obtain a copy of the License at 
+ 
+ 	http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software 
+ distributed under the License is distributed on an "AS IS" BASIS, 
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ See the License for the specific language governing permissions and 
+ limitations under the License.
+
+
+ *******************************  LICENSE  *******************************/
+
+
+#include "TableReader.h"
+
+
+
+void TableReader::resizeDecoders(unsigned int numNeeded)
+{
+    // do we need to resize our list of decoders?
+
+    if ( numNeeded > decoderSets_.size())
+    {
+        decoderSets_.resize (numNeeded);
+        names_.resize       (numNeeded, NULL);
+        types_.resize       (numNeeded, TABFIELD_NUMBER);
+        namesAll_.resize    (numNeeded, "");
+    }
+}
+
+
+void TableReader::setFieldContainer(int index, string &name, vector<double>& container, double outputMissingIndicator)
+{
+    if (index == -1)  // is the user wanting to find a field with the given name?
+    {
+        int foundIndex = indexOfField(name);  // try to find it
+        
+        if (foundIndex == -1)  // not found?
+        {
+            setError ("Cannot find field with name " + name + " -  will not be stored.");
+            return;
+        }
+
+        else
+        {
+            index = foundIndex;  // we found it - so use this index
+        }
+    }
+
+
+
+    // do we need to resize our list of decoders to accommodate this one?
+
+    resizeDecoders (index+1);  // e.g. if index==2, then we need 3 decoders (0-indexed)
+
+
+    // add the decoder to the appropriate place in our list
+
+    TableDoubleVectorElementDecoder *decoder = new TableDoubleVectorElementDecoder (container, outputMissingIndicator);
+    TableElementDecoder *genericDecoder  = dynamic_cast<TableElementDecoder*> (decoder);
+    decoderSets_[index].push_back(genericDecoder); //.push_back(genericDecoder);
+    names_[index] = &name;
+}
+
+
+void TableReader::setFieldContainer (int index, string &name, vector<string>& container, string outputMissingIndicator)
+{
+	 if (index == -1)  // is the user wanting to find a field with the given name?
+	    {
+	        int foundIndex = indexOfField(name);  // try to find it
+
+	        if (foundIndex == -1)  // not found?
+	        {
+	            setError ("Cannot find field with name " + name + " -  will not be stored.");
+	            return;
+	        }
+
+	        else
+	        {
+	            index = foundIndex;  // we found it - so use this index
+	        }
+	    }
+
+    // do we need to resize our list of decoders to accommodate this one?
+
+    resizeDecoders (index+1);  // e.g. if index==2, then we need 3 decoders (0-indexed)
+
+
+    // add the decoder to the appropriate place in our list
+
+    TableStringVectorElementDecoder *decoder = new TableStringVectorElementDecoder (container, outputMissingIndicator);
+    TableElementDecoder *genericDecoder  = dynamic_cast<TableElementDecoder*> (decoder);
+    decoderSets_[index].push_back(genericDecoder); //.push_back(genericDecoder);
+    names_[index] = &name;
+}
+
+
+
+
+
+// ---------------------------------------------------------------------------
+// TableReader::splitLine
+// takes a text line and finds all the delimited strings within it.
+//  NOTE: this function is destructive to the input string!
+// ---------------------------------------------------------------------------
+
+void TableReader::splitLine (char *line, vector<char *>& tokens)
+{
+    char *current = line;
+    char *token   = current;
+
+    while (*current != '\0')
+    {
+        if (*current == delimiter_)   // reached the end of a token?
+        {
+            *current = '\0';          // yes - terminate the token string
+            tokens.push_back(token);  // store a pointer to it
+            token = current + 1;      // start the next token
+        }
+        
+        current++;  // advance to the next character
+    }
+    
+    tokens.push_back(token);  // store a pointer to the last token
+}
+
+
+// ---------------------------------------------------------------------------
+// TableReader::splitLineConsecutiveDelimiters
+// Takes a text line and finds all the delimited strings within it.
+// Version which allows consecutive delimiters to be considered as one.
+//  NOTE: this function is destructive to the input string!
+// ---------------------------------------------------------------------------
+
+void TableReader::splitLineConsecutiveDelimiters (char *line, vector<char *>& tokens)
+{
+    char *current = line;
+    char *token   = current;
+
+    if (*current == '\0')  // return nothing if it is a blank line
+        return;
+
+
+    while (*current != '\0')
+    {
+        if (*current == delimiter_)   // reached the end of a token?
+        {
+            *current = '\0';          // yes - terminate the token string
+
+            current++;                // quick look at the next character
+            while (*current != '\0' && *current == delimiter_)  // skip all consecutive delimiters
+                current++;
+            current--;                // step back one character
+
+            if (token[0] != '\0')     // when treating consecutive delimiters as one, we do not have missing values
+                tokens.push_back(token);  // store a pointer to it
+            token = current + 1;      // start the next token
+        }
+        
+        current++;  // advance to the next character
+    }
+    
+    if (token[0] != '\0')           // safeguard against stray delimiters at the end of the line
+        tokens.push_back(token);  // store a pointer to the last token
+}
+
+
+
+
+
+void TableReader::ensureHaveMetaData()
+{
+    if (!gotMetaData_)  // caller should have retrieved the meta-data already
+    {
+        string msg;
+
+        if (!getMetaData(msg))
+        {
+            setError(msg);
+        }
+    }
+}
+
+vector<TableReader::eTableReaderFieldType>& TableReader::fieldTypes()
+{
+    ensureHaveMetaData();
+
+    return types_;
+}
+
+
+vector<string>& TableReader::fieldNames()
+{
+    ensureHaveMetaData();
+
+    return namesAll_;
+}
+
+
+map<string, string>& TableReader::userMetaData()
+{
+    ensureHaveMetaData();
+
+    return userMetaData_;
+}
+
+
+int TableReader::numRecords()
+{
+    ensureHaveMetaData();
+
+    return numRecords_;
+}
+
+
+
+int TableReader::indexOfField   (string &name)
+{
+    ensureHaveMetaData();
+
+
+    // find which field has the name we're looking for
+    
+    for (vector<string *>::size_type i = 0 ; i < names_.size(); i++)
+    {
+        if (namesAll_[i] == name)
+            return i;   // found it - return its index
+    }
+
+
+    // if we got this far, then we did not find it
+    
+    return -1;
+}
+
+
+
+
+
+
+// ---------------------------------------------------------------------------
+// TableReader::guessFieldType
+// takes an element and tries to decide which data type it is, e.g. number
+// ---------------------------------------------------------------------------
+
+TableReader::eTableReaderFieldType TableReader::guessFieldType(char *str)
+{
+    if (str)
+    {
+        char *pch = str;
+
+        while(*pch)
+        {
+            int ch = *pch;  // any character not part of a proper number format means this is a string
+
+            if (!isdigit(ch) && (ch != 'e') && (ch != 'E') && (ch != '.') && (ch != '+') && (ch != '-'))
+                return TableReader::TABFIELD_STRING;
+            
+            pch++;
+        }
+    }
+    
+    return TableReader::TABFIELD_NUMBER;
+}
+
+
+
+
+
+int TableReader::nextLineTokens(char *line, size_t sizeOfLine, vector<char *>& tokens)
+{
+    // skip blank lines
+
+/*    bool gotLine = true;
+    line[0] = '\0';
+
+    while (line[0] == '\0' && gotLine)
+    {
+        gotLine = f_.getline(line, sizeOfLine);
+        numBadLines_++;
+    }
+*/
+
+    // read the next line into our buffer
+
+//    if (gotLine)
+    if (f_.getline(line, sizeOfLine))
+    {
+        // parse the line into tokens
+
+        streamsize numread = f_.gcount ();
+
+        if ((numread >= 2) && (line[numread-1] == '\0') &&  (line[numread-2] == '\r'))    // remove extraneous newline characters from Windows
+            line[numread-2] = '\0';
+
+        if (consecutiveDelimitersAsOne_)
+            splitLineConsecutiveDelimiters (line, tokens);
+        else
+            splitLine (line, tokens);
+
+        return true;
+    }
+
+    else
+    {
+        return 0;
+    }
+}
+
+
+
+// ---------------------------------------------------------------------------
+// TableReader::readUserMetaData
+// reads all the lines of user meta-data and stores them in userMetaData_.
+// Meta-data must be of the form
+// PARAM1=VALUE1 PARAM2=VALUE2
+// ---------------------------------------------------------------------------
+
+bool TableReader::readUserMetaData (char *line, size_t sizeOfLine, string &errorMessage)
+{
+    int currentRow      = 1;
+    char oldDelimiter   = delimiter_;                  // store because we will over-ride it
+    bool oldConsecutive = consecutiveDelimitersAsOne_; // store because we will over-ride it
+
+    // we parse each line in two steps:
+    //   1) split into a vector of PARAMx=VALUEX strings
+    //   2) split each of these into 2 strings and add them to the meta-data map
+
+    setConsecutiveDelimitersAsOne(true); // allows the user more flexibility
+
+    for (vector<int>::size_type r = 0 ; r < userMetaDataRows_.size(); r++)  // for each line of meta-data...
+    {
+        skipLines (userMetaDataRows_[r] - currentRow, line, sizeOfLine);  // get to the right line
+        setDelimiter(' ');
+
+
+        vector<char *> tokens;
+
+        if (nextLineTokens(line, sizeOfLine, tokens) > 0)
+        {
+            // now have one token per PARAM=VALUE - split each one into a pair
+
+            setDelimiter('=');
+
+            for (vector<string *>::size_type j = 0 ; j < tokens.size(); j++)
+            {
+                vector<char *> tokens2;
+
+                splitLineConsecutiveDelimiters (tokens[j], tokens2);
+
+                if (tokens2.size() != 2)  // should only be 2 tokens: PARAM and VALUE
+                {
+                    char msg [2000];
+                    sprintf (msg, "Error parsing parameter %d: '%s'", j+1, tokens[j]);
+                    errorMessage = msg;
+                    return false;
+                }
+                else
+                {
+                    userMetaData_[tokens2[0]] = tokens2[1];
+                }
+            }
+        }
+
+
+        currentRow = userMetaDataRows_[r] + 1;  // store which line we're at
+    }
+
+
+
+    setDelimiter(oldDelimiter);                     // restore
+    setConsecutiveDelimitersAsOne(oldConsecutive);  // restore
+    
+    return true;
+}
+
+
+// ---------------------------------------------------------------------------
+// TableReader::skipLines
+// reads and ignore the specified number of rows. Requires a buffer to read
+// into.
+// ---------------------------------------------------------------------------
+
+void TableReader::skipLines (int linesToSkip, char *line, size_t sizeOfLine)
+{
+    for (int i = 0; i < linesToSkip; i++)
+    {
+        f_.getline(line, sizeOfLine);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// TableReader::getMetaData
+// reads the first few lines of the file and determines the number and type
+// of columns. Also, optionally, reads any lines of user meta-data from the
+// file.
+// ---------------------------------------------------------------------------
+
+bool TableReader::getMetaData(string &errorMessage)
+{
+
+    if (gotMetaData_)  // we should only need to get the meta-data once
+        return true;
+
+
+    // check for previous errors which we should report
+    
+    if (errorCode_)
+    {
+        errorMessage = errorMsg_;
+        clearError();
+        return false;
+    }
+
+
+
+    const int MAX_CHARS_IN_LINE = 1024*10;
+    char line[MAX_CHARS_IN_LINE];
+
+
+    // basic sanity checks
+
+    if (path().empty())
+    {
+        errorMessage = "TableReader: Path is empty - will not read.";
+        return false;
+    }
+
+
+    // try to open the file for reading
+
+    f_.open(path().c_str());
+
+    if (f_.fail())
+    {
+        errorMessage = "TableReader: Could not open table file: " + path();
+        return false;
+    }
+
+
+    // count the number of lines
+
+    int numLines = 0;
+
+    while (f_.getline(line, sizeof(line)))    //-- first count the lines
+        numLines++;
+
+    numRecords_ = numLines - headerRow() - dataRowOffset() + 1;  // how many actual records are there?
+
+
+
+    // rewind the file pointer before we start again
+
+    f_.clear();
+    f_.seekg(0, ios::beg);
+
+
+    // read the user meta-data if it exists
+
+    if (!userMetaDataRows_.empty())
+    {
+        if (!readUserMetaData (line, sizeof(line), errorMessage))
+        {
+            return false;
+        }
+
+
+
+        // rewind the file pointer before we start again
+
+        f_.clear();
+        f_.seekg(0, ios::beg);
+    }
+
+
+
+
+    // get to either the header row (if there is one) or the start of the data
+
+    if (headerRow() > 0)                              // there is a header row
+        skipLines (headerRow()-1, line, sizeof(line));
+    else if (dataRowOffset() > 1)                     // no header - get to start of data
+        skipLines (dataRowOffset()-1, line, sizeof(line));
+
+
+    dataStart_ = f_.tellg();  // make a note of where the data starts (may be changed if we have a header line)
+
+
+    int numLinesToCheck = 1 + (headerRow()>0 ? 1 : 0); // how many lines to read?
+    
+    if (numLinesToCheck > numLines)
+        numLinesToCheck = numLines;
+
+
+    for (int i = 0; i < numLinesToCheck; i++)
+    {
+        // read the line into a buffer and split it into tokens
+        
+        vector<char *> tokens;
+
+        if (nextLineTokens(line, sizeof(line), tokens) > 0)
+        {
+            if (i == 0 )
+            {
+                resizeDecoders (tokens.size());  // ensure our array of decoders is big enough to handle all the fields
+            }
+
+            if ((i == 0) && headerRow()>0)   // parse a header row?
+            {
+                for (vector<string *>::size_type j = 0 ; j < tokens.size(); j++)
+                {
+                    namesAll_[j] = tokens[j];
+                }
+
+                skipLines (dataRowOffset()-1, line, sizeof(line));  // go to start of data
+                dataStart_ = f_.tellg();  // make a note of where the data starts
+            }
+
+            else  // this is a data row
+            {
+                if (types_.size() != tokens.size())
+                {
+                    errorMessage = "Not the same number of elements in the first 2 lines of table. Check file format parameters.";
+                    f_.close();  // close the input file
+                    return false;
+                }
+
+
+                // determine which data type each token is
+
+                for (vector<eTableReaderFieldType>::size_type j = 0 ; j < tokens.size(); j++)
+                {
+                    types_[j] = guessFieldType(tokens[j]);
+                }
+            }
+        }
+    }
+
+
+
+    gotMetaData_ = true;
+    
+    return true;
+}
+
+
+
+
+bool TableReader::read(string &errorMessage)
+{
+    const int MAX_CHARS_IN_LINE = 1024*10;
+    char line[MAX_CHARS_IN_LINE];
+
+
+    // check for previous errors which we should report
+    
+    if (errorCode_)
+    {
+        errorMessage = errorMsg_;
+        clearError();
+        return false;
+    }
+
+
+
+    // basic sanity checks
+
+    if (path().empty())
+    {
+        errorMessage = "TableReader: Path is empty - will not read.";
+        return false;
+    }
+
+    if (decoderSets_.size() == 0)
+    {
+        errorMessage = "TableReader: No decoders installed - will not read.";
+        return false;
+    }
+
+
+    if (!getMetaData(errorMessage))  // ensure we have the meta-data. This will also open the file (f_)
+        return false;
+
+
+
+
+    // set the header names?
+
+    for (vector<string *>::size_type j = 0 ; j < namesAll_.size(); j++)
+    {
+        if (names_[j] != NULL)
+        {
+            *(names_[j]) = namesAll_[j];
+        }
+    }
+
+
+
+
+    // initialise our containers to hold the correct number of elements
+
+//    for (i = 0 ; i < decoders_.size(); i++)
+    for (vector<TableElementDecoders>::iterator decoderSet = decoderSets_.begin(); decoderSet != decoderSets_.end(); ++decoderSet)
+    {
+        for (TableElementDecoders::iterator decoder = (*decoderSet).begin(); decoder != (*decoderSet).end(); ++decoder)
+        {
+            if (*decoder != NULL)
+            {
+                (*decoder)->initialise(numRecords_);
+            }
+        }
+    }
+
+
+
+    // rewind the file pointer before we start again
+
+    f_.clear();
+    f_.seekg(dataStart_, ios::beg);  // set to start of the data (determined by getMetaData())
+
+
+
+    vector<char *> tokens;
+
+    for (int i = 0; i < numRecords_; i++)
+    {
+        // read the line into a buffer and split it into tokens
+
+        tokens.clear();
+
+        if (nextLineTokens(line, sizeof(line), tokens) > 0)
+        {
+            if (tokens.size() != decoderSets_.size())  // only do something if we have the right number of tokens
+            {
+                if (tokens.size() == 0) // blank line?
+                {
+                    char *empty = "";
+
+                    // if we are only reading one column, then it could be a missing value
+                    if (decoderSets_.size() == 1)
+                    {
+                        tokens.push_back(empty);
+                    }
+
+                    // otherwise ignore it  (is this too generous of us??)
+                    else
+                    {
+                        continue;
+                    }
+                }
+                else  // otherwise, the disparity in numbers indicates a problem
+                {
+                    char msg[128];
+                    sprintf (msg, "TableReader: record %d has %u elements, but the first record has %u. Failed to read.", i+1, (unsigned int)tokens.size(), (unsigned int)decoderSets_.size());
+                    errorMessage = msg;
+                    f_.close();  // close the input file
+                    return false;
+                }
+            }
+
+
+            // decode the data with their various decoders - one set of decoders for each field
+
+            vector<char *>::iterator s = tokens.begin();
+
+            for (vector<TableElementDecoders>::iterator decoderSet = decoderSets_.begin(); decoderSet != decoderSets_.end(); ++decoderSet)
+            {
+                for (TableElementDecoders::iterator decoder = (*decoderSet).begin(); decoder != (*decoderSet).end(); ++decoder)
+                {
+                    if (*decoder != NULL)
+                    {
+                        //string str(*s);
+                        (*decoder)->addValue(*s);
+                    }
+                }
+                s++;
+            }
+        }
+    }
+
+    f_.close();  // close the input file
+
+    return true;
+}
diff --git a/src/libUtil/TableReader.h b/src/libUtil/TableReader.h
new file mode 100644
index 0000000..3717f21
--- /dev/null
+++ b/src/libUtil/TableReader.h
@@ -0,0 +1,210 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+/*******************************  LICENSE  *******************************
+
+
+ Copyright 2011 European Centre for Medium-Range Weather Forecasts (ECMWF)
+ 
+ Licensed under the Apache License, Version 2.0 (the "License"); 
+ you may not use this file except in compliance with the License. 
+ You may obtain a copy of the License at 
+ 
+ 	http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software 
+ distributed under the License is distributed on an "AS IS" BASIS, 
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ See the License for the specific language governing permissions and 
+ limitations under the License.
+
+
+ *******************************  LICENSE  *******************************/
+
+#ifndef TableReader_H
+#define TableReader_H
+
+#include <vector>
+#include <fstream>
+#include <cstdlib>
+#include <string>
+#include <map>
+
+using namespace std;
+
+
+/*! -----------------------------------------------------------------
+    \class TableFormatAttributes
+    Base lass to handle the different ways of specifying how a table
+    file is formatted.
+   ----------------------------------------------------------------- */
+
+class TableFormatAttributes
+{
+public:
+
+    TableFormatAttributes () : delimiter_(','), headerRow_(1), consecutiveDelimitersAsOne_(false), dataRowOffset_(0) {}
+
+    void setPath          (string &path)     { path_          = path;      }
+    void setPath          (const char *path) { path_          = string(path); }
+    void setDelimiter     (char delimiter)   { delimiter_     = delimiter; }
+    void setHeaderRow     (int  headerRow)   { headerRow_     = headerRow; }
+    void setDataRowOffset (int  offset)      { dataRowOffset_ = offset; }
+    void setConsecutiveDelimitersAsOne (bool consecutive) { consecutiveDelimitersAsOne_ = consecutive; }
+    void setUserMetaDataRows (vector<int> &rows){ userMetaDataRows_ = rows; }
+
+    string path ()                     { return path_;      }
+    int    headerRow()                 { return headerRow_; }
+    int    dataRowOffset()             { return dataRowOffset_; }
+    vector<int> userMetaDataRows()     { return userMetaDataRows_; }
+
+
+protected       :
+    string path_;
+    char delimiter_;
+    int  headerRow_;
+    bool consecutiveDelimitersAsOne_;
+    int  dataRowOffset_;
+    vector<int> userMetaDataRows_;
+};
+
+
+
+
+/*! -----------------------------------------------------------------
+    \class TableElementDecoder
+    Base class to handle the decoding of a single element in a table
+    (e.g. CSV). Derived classes should handle the decoding of
+    particular data types (e.g. double, string).
+   ----------------------------------------------------------------- */
+
+class TableElementDecoder
+{
+public:
+    TableElementDecoder() : currentIndex_(0) {};
+    virtual ~TableElementDecoder(){}
+
+    virtual void initialise    (int numValues) = 0;
+    virtual void addValue      (char  *value)  = 0;
+    //virtual void decodeElement (char *element) = 0;
+
+protected:
+    int currentIndex_;
+};
+
+
+/*! -----------------------------------------------------------------
+    \class TableDoubleVectorElementDecoder
+    Derived class to handle the decoding of numeric data from a 
+    table file. The data will be put into a vector of doubles.
+   ----------------------------------------------------------------- */
+
+class TableDoubleVectorElementDecoder : public TableElementDecoder
+{
+public:
+    TableDoubleVectorElementDecoder(vector<double>& target, double outMiss) : target_(target), outputMissingIndicator_(outMiss)  {};
+
+    void initialise (int numValues) { target_.reserve(numValues); }
+    void addValue   (char *value)   { target_.push_back((value[0] != '\0') ? atof(value) : outputMissingIndicator_); }
+
+private:
+    vector<double>& target_;
+    double outputMissingIndicator_;
+};
+
+
+
+/*! -----------------------------------------------------------------
+    \class TableStringVectorElementDecoder
+    Derived class to handle the decoding of string data from a 
+    table file. The data will be put into a vector of strings.
+   ----------------------------------------------------------------- */
+
+class TableStringVectorElementDecoder : public TableElementDecoder
+{
+public:
+    TableStringVectorElementDecoder(vector<string>& target, string outMiss) : target_(target), outputMissingIndicator_(outMiss) {};
+
+    void initialise (int numValues) { target_.reserve(numValues); }
+    void addValue   (char *value)   { target_.push_back((value[0] != '\0') ? value : outputMissingIndicator_); }
+
+private:
+    vector<string>& target_;
+    string outputMissingIndicator_;
+};
+
+
+typedef vector<TableElementDecoder *> TableElementDecoders;  // for shorthand
+
+
+
+/*! -----------------------------------------------------------------
+    \class TableReader
+    Handles the reading of a table file, such as CSV.
+    To use it, set its path and any other formatting attributes
+    as available in the TableFormatAttributes class, and then
+    for each field (column) you wish to store, supply a container
+    such as a vector of numbers. Only those fields for which you
+    supply a container will be read. Fields can be specified by
+    index (0-based) or by name.
+
+   ----------------------------------------------------------------- */
+
+class TableReader : public TableFormatAttributes
+{
+public:
+
+    enum eTableReaderFieldType {TABFIELD_NUMBER, TABFIELD_STRING};
+
+    TableReader ()              {gotMetaData_ = false; errorCode_ = 0;}
+    TableReader (string &path)  {setPath(path);}
+
+    void setFieldContainer (int index, string &name, vector<double>& container, double outputMissingIndicator);
+    void setFieldContainer (int index, string &name, vector<string>& container, string outputMissingIndicator);
+
+    // setFieldContainer (string &name, vector<double>);
+    // setFieldContainer (string &name, vector<string>);
+
+    bool getMetaData(string &errorMessage);
+    bool read (string &errorMessage);  // read and parse the file; the supplied cointainers will be filled
+
+    vector<eTableReaderFieldType>& fieldTypes();
+    vector<string>&                fieldNames();
+    map<string, string>&           userMetaData();
+    int                            numRecords();
+
+private:
+
+    void resizeDecoders (unsigned int numNeeded);
+    int  nextLineTokens (char *line, size_t sizeOfLine, vector<char *>& tokens);  // reads the next line and splits into tokens
+    void splitLine      (char *line, vector<char *>& tokens);                     // splits a line into tokens based on the current settings
+    void splitLineConsecutiveDelimiters (char *line, vector<char *>& tokens);     // splits a line into tokens based on the current settings
+    bool readUserMetaData(char *line, size_t sizeOfLine, string &errorMessage);   // reads user meta-data into a map
+    int  indexOfField   (string &name);                                           // returns the index of the field with a given name (or -1)
+    void setError       (string msg)  {errorCode_ = 1; errorMsg_ = msg;};         // set an error message to be used later
+    void clearError     ()            {errorCode_ = 0;};                          // clear error message and code to be used later
+    void ensureHaveMetaData();                                                    // loads the meta-data if not already there
+    void skipLines      (int linesToSkip, char *line, size_t sizeOfLine);         // skips a user-defined number of rows
+    TableReader::eTableReaderFieldType guessFieldType(char *str);                 // tries to determine whether the field is, for example, string or number
+
+    vector<TableElementDecoders>  decoderSets_; // each column can have multiple decoders attached to it
+    vector<string *>              names_;
+    vector<string>                namesAll_;
+    vector<eTableReaderFieldType> types_;
+    bool                          gotMetaData_;
+    ifstream                      f_;
+    streampos                     dataStart_;
+    int                           numRecords_;
+    map<string, string>           userMetaData_;
+    int                           errorCode_;  // some functions will set these to be used later
+    string                        errorMsg_;   // some functions will set these to be used later
+
+};
+
+#endif
diff --git a/src/libUtil/Tokenizer.cc b/src/libUtil/Tokenizer.cc
new file mode 100644
index 0000000..b9153c8
--- /dev/null
+++ b/src/libUtil/Tokenizer.cc
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef   Tokenizer_H
+#include "Tokenizer.h"
+#endif
+
+Tokenizer::Tokenizer(const string& separators)
+{
+	for(int i=0; i<separators.length(); i++)
+		separator_.insert(separators[i]);
+}
+
+Tokenizer::~Tokenizer()
+{
+}
+
+
+void Tokenizer::operator()(const string& raw, vector<string>& v)
+{
+	int    index  = 0;
+	int    length = raw.length();
+	string token  = "";
+
+	while(index < length)
+	{
+		char c = raw[index];
+		if(separator_.find(c) != separator_.end())
+		{
+			if(token.length()>0)
+				v.push_back(token);
+			token ="";
+		}
+		else
+			token += c;
+
+		index++;
+	}
+
+	if(token.length()>0)
+		v.push_back(token);
+}
diff --git a/src/libUtil/Tokenizer.h b/src/libUtil/Tokenizer.h
new file mode 100644
index 0000000..39c512c
--- /dev/null
+++ b/src/libUtil/Tokenizer.h
@@ -0,0 +1,62 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Tokenizer.h
+// Manuel Fuentes - ECMWF Jan 97
+
+#ifndef Tokenizer_H
+#define Tokenizer_H
+
+#include <string>
+using std::string;
+
+#include "inc_iostream.h"
+#include "inc_stl.h"
+
+// 
+
+class Tokenizer {
+public:
+
+// -- Contructors
+
+    Tokenizer(const string&);
+
+// -- Destructor
+
+	~Tokenizer(); // Change to virtual if base class
+
+// -- Methods
+	
+	void operator()(const string&, vector<string>&);
+	void operator()(istream&,vector<string>&);
+
+private:
+
+// No copy allowed
+
+	Tokenizer(const Tokenizer&);
+	Tokenizer& operator=(const Tokenizer&);
+
+// -- Members
+
+	set<char> separator_;     // To make searching faster
+
+// -- Methods
+
+	void print(ostream&) const;
+
+	friend ostream& operator<<(ostream& s,const Tokenizer& p)
+		{ p.print(s); return s; }
+
+};
+
+inline void destroy(Tokenizer**) {}
+
+#endif
diff --git a/src/libUtil/Transfm.hpp b/src/libUtil/Transfm.hpp
new file mode 100644
index 0000000..b0b6553
--- /dev/null
+++ b/src/libUtil/Transfm.hpp
@@ -0,0 +1,66 @@
+#ifndef Transfm_H
+#define Transfm_H
+
+#include <X11/Xlib.h>
+#include <Point.hpp>
+class Box;
+
+class Transfm
+{
+	float _H11, _H12, _H21, _H22, _H31, _H32; // accumulative transform. param.
+	float _G11, _G12, _G21, _G22, _G31, _G32; // inverse transform matrix
+
+public:
+
+	Transfm() { 	_H11 = _H22 = 1.; _H12 = _H21 = _H31 = _H32 = 0.;
+			_G11 = _G22 = 1.; _G12 = _G21 = _G31 = _G32 = 0.;}
+//		Normal constructor. Both matrix are made equal identity.
+
+	void print(char*);
+
+	Transfm operator= (float);
+
+	Transfm operator= (const Transfm&);
+
+	void rotation (float a);
+//		Accumulate the rotation transformation.
+//		Input :
+//			a : rotation angle (radians), counterclockwise positive
+
+	void scale (float tx, float ty);
+//		Accumulate the scale transformation.
+//		Input :
+//			tx : translation in x
+//			ty : translation in y
+
+	void setTransf (Box& sys1, Box& sys2);
+//		Set transformation from sys1 to sys2
+//		Input :
+//			sys1 : input coordinate system
+//			sys2 : output coordinate system
+
+	friend Transfm operator+ (const Transfm&, const Point&);
+//		Translate 
+
+	friend Transfm operator- (const Transfm&, const Point&);
+//		Translate 
+
+//<*teste*> esta parte nao esta' funcionando
+//	Transfm operator+= (Point& p) { return ((*this) = ((*this)+p)); }
+
+
+//	Transfm operator-= (Point& p) { return ((*this) = ((*this)-p)); }
+//<*end teste*> 
+
+	Transfm reflectInX ();
+//		Accumulate a reflection (in y) around x axis.
+
+	friend	Point operator* (const Point&, const Transfm&);
+
+	friend	Point operator* (const XPoint&, const Transfm&);
+
+	friend Transfm operator* (const Transfm&, const Transfm&);
+
+};
+
+#endif
diff --git a/src/libUtil/Types.hpp b/src/libUtil/Types.hpp
new file mode 100644
index 0000000..0e5b181
--- /dev/null
+++ b/src/libUtil/Types.hpp
@@ -0,0 +1,67 @@
+#ifndef Types_H_
+#define Types_H_
+
+// Definitions for Macro Device
+
+enum MacroType { PRINT_JOB,	   // Print he output of the screen
+		 PRINT_MACRO,	   // 
+		 PRINT_PREVIEW,    //  Preview the output 
+		 SCREEN_MACRO, 	   //  Reproduce the output of the screen
+		 ZOOM_AREA };	   //  Zoom into a single page
+
+
+
+enum MacroConversion { NO_LAST_COMMA,    // omits the comma on the last line
+		       PUT_LAST_COMMA, // puts a comma on all lines
+		       PUT_END };       // generate closing paranthesis.
+
+// Definitions for MenuTypes
+
+enum  MenuType { BUTTON,               // supported
+		 LABEL,                //    "
+	 	 SEPARATOR,            //    "
+		 PULLDOWN,             //    "
+		 PIXMAPPULLDOWN,       //    "
+		 END,                  //    "
+		 TOGGLE,               //    "
+		 RADIOPULLDOWN,        //    "
+		 CONFIRMFIRSTACTION,   // the following are
+		 BAR,                  //  not supported yet
+		 OPTION, 
+		 POPUP, 
+		 CASCADE,
+		 OBJECT };
+
+// Definitions for CursorTypes
+enum  CursorType { POINTERCURSOR,
+		   ZOOMCURSOR,
+		   MAGNIFYCURSOR,
+		   SCROLLCURSOR,
+		   POINTCURSOR,
+                   TOOLPLUSPOINTCURSOR,
+                   TOOLPLUSAREACURSOR };
+
+// Definitions for InputTypes
+enum  InputType { NOINPUT,
+		  POINTINPUT,
+		  LINEINPUT,
+		  AREAINPUT,
+		  MAPINPUT };
+
+// Definitions for FORTRAN Interface
+
+#ifdef __alpha
+typedef int  Int;    /* fortran integer */
+#else
+typedef long Int;    /* fortran integer */
+#endif
+
+#ifdef R64
+typedef double Real;
+#else
+typedef float Real; /* fortran single precision float */
+#endif
+
+
+
+#endif
diff --git a/src/libUtil/UtilitiesC.c b/src/libUtil/UtilitiesC.c
new file mode 100644
index 0000000..5f0b236
--- /dev/null
+++ b/src/libUtil/UtilitiesC.c
@@ -0,0 +1,306 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <mars.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <UtilitiesC.h>
+#include <assert.h>
+#include <ctype.h>
+
+#define ENSIZE 32    /* extra characteres to be added to the filename lenght */
+
+char* UtRandomName(const char* path,const char* name)
+{
+	static int count = 0;
+	char* fname = (char*)malloc(strlen(path) + strlen(name) + ENSIZE);
+	sprintf(fname, "%s/%d%s%d", path, getpid(), name, ++count);
+	return fname;
+}
+
+char* UtProgressiveName(const char* path,const char* name)
+{
+	int count = 0;
+	struct stat info;
+	char* fname;
+	while (1)
+	{
+		fname = (char*)malloc(strlen(path) + strlen(name) + ENSIZE);
+		sprintf(fname, "%s/%s %d", path, name, ++count);
+		if (stat(fname, &info) != 0) break;
+		free( fname );
+	}
+	return fname;
+}
+
+/* Alternative implementation that does not put spaces between the name and counter and does not repeat the name (for magics) */
+char* UtProgressiveName2(const char* path,const char* name)
+{
+	static int count = 0;
+	struct stat info;
+	char* fname;
+	while (1)
+	{
+		fname = (char*)malloc(strlen(path) + strlen(name) + ENSIZE);
+		sprintf(fname, "%s/%s%d", path, name, ++count);
+		if (stat(fname, &info) != 0) break;
+		free( fname );
+	}
+	return fname;
+}
+
+char* UtPath2Name(const char *path)
+{
+	int i;
+	int len = strlen(path), ini = -1, fin = -1;
+
+	for (i = len-1; i >= 0; i--)
+	{
+		if (path[i] == '/' && ini == -1)
+			ini = i+1;
+		if (path[i] == '.' && ini == -1)
+			fin = i-1;
+	}
+	if (ini == -1) ini = 0;
+	if (fin == -1) fin = len-1;
+	if (ini <= fin)
+	{
+		char* name = (char*)malloc(fin-ini+2);
+		strncpy(name,path+ini,fin-ini+1);
+		name[fin-ini+1] = '\0';
+		return name;
+	}
+	else	return NULL;
+}
+
+
+/* Touch file */
+
+int UtTouch(const char* dir, const char* fname)
+{
+	FILE* fp;
+	char* full_name = (char*)malloc(strlen(dir) + strlen(fname) + 2);
+	sprintf(full_name, "%s/%s", dir, fname);
+
+	fp = fopen(full_name, "w");
+	if (fp) fclose(fp);
+	free(full_name);
+return 1;
+}
+
+int UtIsValidVisDef (const char* pathname)
+{
+	struct stat descr;
+	if (stat(pathname, &descr) != 0) return 0;
+	if (S_ISDIR(descr.st_mode)) return 0;
+	return 1;
+}
+void UtWriteCmd(FILE* fp, const char* cmd)
+{
+	fprintf(fp, "\n%s", cmd);
+}
+
+void UtWritePar(FILE* fp, const char* par, const char* value)
+{
+    if(value)
+        if(*value == '/')
+            fprintf(fp, ",\n\t%s = '%s'", par, value);
+        else
+            fprintf(fp, ",\n\t%s = %s", par, value);
+        else
+            fprintf(fp, ",\n\t%s = Default", par);
+
+}
+
+void UtWriteLiteralPar(FILE* fp, const char* par, const char* value)
+{
+	fprintf(fp, ",\n\t%s = '%s'", par, value);
+}
+
+void UtWriteIntPar(FILE* fp, const char* par, int value)
+{
+	fprintf(fp, ",\n\t%s = %d", par, value);
+}
+
+void UtWriteFloatPar(FILE* fp, const char* par, float value)
+{
+	fprintf(fp, ",\n\t%s = %f", par, value);
+}
+
+
+/**************************************************
+* FUNCTION putenv: putenv_ from FORTRAN
+*****************************************************
+*
+* Purpose:      Set environment variable
+*			safely (not destroing) string
+*
+*
+* Function returns:  N0n-zero if failing;
+*                    Zero if set;
+*/
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define cputenv_ cputenv
+#endif
+
+#define PROC
+PROC fortint cputenv_(char* env,fortint length)
+{
+    fortint i;
+    char *p;
+
+    p = (char *) malloc(length+1);
+    strncpy(p,env,length);
+    p[length] = '\0';
+
+    i = putenv(p);
+    return i;
+}
+/************************************************
+FUNCTION : Write Icon Description File
+*************************************************
+*
+*  Purpose: Write a description file so that MetviewUI
+*           can later recognize this file
+*
+*/
+
+
+void
+UtWriteIconDescriptionFile(const char* fileName, const char* iconClass )
+{
+	request* reqst;
+	FILE* fp;
+
+	assert ( fileName != 0  );
+	assert ( iconClass != 0 );
+
+
+	fp = fopen(fileName,"w");
+
+	if (fp)
+	{
+		reqst = empty_request("USER_INTERFACE");
+		set_value(reqst, "ICON_NAME", mbasename ( fileName ));
+		set_value(reqst, "ICON_CLASS", iconClass);
+
+		save_all_requests(fp, reqst);
+		fclose(fp);
+		free_all_requests(reqst);
+	}
+
+}
+/* replace the %? in the command */
+
+void
+UtWritePrinterCmd ( char* cmd,
+		     const char* user_cmd,
+		     const char* printer,
+		     const char* ncopies,
+		     const char* fname)
+{
+char	filename[2000];
+	int i = -1, j = -1;
+	while (user_cmd[++i])
+	{
+		if (user_cmd[i] == '%')
+		{
+			switch (user_cmd[i+1])
+			{
+				case 'p':
+				strcat(cmd, printer);
+				break;
+
+				case 'n':
+				strcat(cmd, ncopies);
+				break;
+
+				case 'f':
+				if(user_cmd[i-1] != '"' && user_cmd[i-1] != '\'')
+				{
+					sprintf(filename,"\"%s\"",fname);
+				}
+				else
+					sprintf(filename,"%s",fname);
+				strcat(cmd, filename);
+				break;
+
+				default:
+				cmd[++j] = '%';
+				cmd[++j] = user_cmd[i+1];
+				cmd[++j] = '\0';
+			}
+			i++;
+			j = strlen(cmd) -1;
+		}
+		else
+		{
+			cmd[++j] = user_cmd[i];
+			cmd[j+1] = '\0';
+		}
+	}
+	printf("UtWritePrinterCmd ... cmd = %s\n", cmd);
+}
+
+void
+UtWritePreviewCmd ( char* previewCmd, const char* previewerName, const char* outFileName )
+{
+	int j = 0;
+
+	/* copy the previewer name in lower case characters */
+
+	while ( previewerName [j] != '\0' )
+	{
+		previewCmd [j] = toupper ( previewerName [j] );
+		j++;
+	}
+
+	previewCmd [ j ] = ' ';
+
+	/* Append the output file Name */
+	strcat ( previewCmd, outFileName );
+
+
+	printf( "UtWritePreviewCmd ... cmd = %s\n", previewCmd );
+
+}
+
+/* Fernando Ii 05/00
+   Truncates a float number to have
+   only 2 decimal digits.
+*/
+double t2d ( double value )
+{
+      int bb = value*100.;
+      return (double)bb / 100.;
+}
+
+
+/* vk/020802 */
+
+int localWmoSiteNumber( void )
+{
+  int n = 98;            /* default 98 = ECMWF */
+
+  const char* en = getenv( "WMO_SITE_NR" );
+  if( en )
+    {
+      if( *en == '0' )
+	++en;            /* skip leading zero */
+      n = atoi( en );
+    }
+
+  return n;
+}
+
+
diff --git a/src/libUtil/UtilitiesC.h b/src/libUtil/UtilitiesC.h
new file mode 100644
index 0000000..f862756
--- /dev/null
+++ b/src/libUtil/UtilitiesC.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <stdio.h>
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/* UtilitiesC.c */
+char *UtRandomName(const char *path, const char *name);
+char *UtProgressiveName(const char *path, const char *name);
+char *UtProgressiveName2(const char *path, const char *name);
+char *UtPath2Name(const char *path);
+int UtTouch(const char *dir, const char *fname);
+int UtIsValidVisDef(const char *pathname);
+void UtWriteCmd(FILE *fp, const char *cmd);
+void UtWritePar(FILE *fp, const char *par, const char *value);
+void UtWriteLiteralPar(FILE *fp, const char *par, const char *value);
+void UtWriteIntPar(FILE *fp, const char *par, int value);
+void UtWriteFloatPar(FILE *fp, const char *par, float value);
+void UtWriteIconDescriptionFile(const char* fileName, const char* iconClass );
+void UtWritePrinterCmd ( char* cmd, const char* user_cmd, const char* printer, 
+			 const char* ncopies, const char* fname);
+void UtWritePreviewCmd ( char* previewCmd, const char* previewerName, 
+			 const char* outFileName );
+
+double t2d (double value);
+int    localWmoSiteNumber(void);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
diff --git a/src/libUtil/auto_ptr.h b/src/libUtil/auto_ptr.h
new file mode 100644
index 0000000..7466585
--- /dev/null
+++ b/src/libUtil/auto_ptr.h
@@ -0,0 +1,52 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef AUTO_PTR_H
+#define AUTO_PTR_H
+
+
+template<class T>
+class auto_ptr {
+	T* ptr_;
+public:
+      
+// --   Normal Constructor
+
+	auto_ptr(T* ptr = 0) : ptr_(ptr) {}
+
+// --   Destructor
+	~auto_ptr()   { delete ptr_; }
+
+// --   Copy Constructor
+
+	auto_ptr(auto_ptr<T>& other) 
+		{
+		ptr_ = other.ptr_;
+		other.ptr_ = 0;
+		}
+
+	auto_ptr<T>& operator=(auto_ptr<T>& other) 
+		{
+			if(this != &other)
+			{
+				delete ptr_;
+				ptr_ = other.ptr_;
+				other.ptr_ = 0;
+			}
+			return *this;
+		}
+
+	T* get() const        { return ptr_; }
+
+        T* release()          { T* old = ptr_; ptr_ = 0; return old; }
+	T* operator->() const { return ptr_; }
+	T& operator*()  const { return *ptr_; }
+	
+};
+#endif
diff --git a/src/libUtil/bits.h b/src/libUtil/bits.h
new file mode 100644
index 0000000..b3e62cd
--- /dev/null
+++ b/src/libUtil/bits.h
@@ -0,0 +1,31 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "default.16.icon"
+#include "default.16.mask"
+#include "default.16.open"
+#include "default.32.icon"
+#include "default.32.mask"
+#include "default.32.open"
+
+#define LARGEBITS	"big\nicon"
+#define LARGEOPEN	"big\nopen"
+#define LARGEMASK	"big\nmask"
+#define SMALLBITS	"small\nicon"
+#define SMALLOPEN	"small\nopen"
+#define SMALLMASK	"small\nmask"
+
+static int defpix_width[2]  = {pix_32_width,pix_16_width};
+static int defpix_height[2] = {pix_32_height,pix_16_height};
+
+
+static unsigned char *defpix_bits[2] = {pix_32_bits,pix_16_bits};
+static unsigned char *defmsk_bits[2] = {msk_32_bits,msk_16_bits};
+static unsigned char *defopn_bits[2] = {opn_32_bits,opn_16_bits};
+
diff --git a/src/libUtil/gdefines.h b/src/libUtil/gdefines.h
new file mode 100644
index 0000000..7334479
--- /dev/null
+++ b/src/libUtil/gdefines.h
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef gdefines_H
+#define gdefines_H
+
+#ifdef macosx
+#include <limits.h>
+#else
+#include <values.h>
+#endif
+
+#ifndef mv_abs
+#define mv_abs(x) 	( ((x) >= 0) ? (x) : -(x) )
+#endif
+
+#ifndef BIGFLOAT
+const float BIGFLOAT = 3.4E35;
+#endif
+
+#define K_PATH_SIZE 200
+
+#ifndef PI
+const float	PI  =	3.14159265358979323846;
+#endif
+
+#ifndef CDR
+const float	CDR =	0.017453293;	// Conversion factor: degrees to radians
+#endif
+
+#ifndef CRD
+const float	CRD =	57.295779513;	// Conversion factor: radians to degrees
+#endif
+
+#ifndef EARTH_RADIUS
+const float	EARTH_RADIUS = 6378160.;
+#endif
+
+#ifndef FLATTENING
+const float	FLATTENING   = 0.0033528;
+#endif
+
+#define	NSTEPS 16.
+
+/* define icon classes */
+
+#define ICON_FIELD	"RETRIEVE"
+#define ICON_IMAGE	"RETRIEVE"
+#define ICON_OBS	"RETRIEVE"
+#define ICON_DRAW	"Draw"
+#define ICON_OTHER_DATA "Otherdata"
+#define	ICON_MAP	"Map"
+#define ICON_AXIS	"Axis"
+#define ICON_KILL	"Kill"
+#define ICON_VISDEF "Visdef"
+#define ICON_WARNING	"WarningIcon"
+
+#define ICON_DATA(x)	\
+	(!strcmp(x,ICON_FIELD) || !strcmp(x,ICON_IMAGE) || \
+	 !strcmp(x,ICON_OBS)   || !strcmp(x,ICON_DRAW)  || \
+	 !strcmp(x,ICON_OTHER_DATA))
+
+#define ICON_CHART(x) (!strcmp(x,ICON_MAP) || !strcmp(x,ICON_AXIS))
+
+/* define data types
+   Note: As a temporary solution the data type is been used
+   to define the icon class 
+*/
+
+#define DATA_FIELD	"Field"
+#define DATA_IMAGE	"Image"
+#define DATA_OBS	"Obs"
+#define DATA_PHYSICAL   "Physical"
+
+/* Visualisation Data State */
+
+typedef enum { K_NO_SEG, K_REQUESTED, K_CREATED, K_SEG_DISPLAYED,
+               K_PIX_DISPLAYED} SegState;
+
+/* define window names */
+
+#define WINDOW_KILL "kill"
+
+#endif
diff --git a/src/libUtil/griddoc.hpp b/src/libUtil/griddoc.hpp
new file mode 100644
index 0000000..932d726
--- /dev/null
+++ b/src/libUtil/griddoc.hpp
@@ -0,0 +1,35 @@
+#ifndef griddoc_H
+#define griddoc_H
+
+typedef struct
+{
+	char	id[13];		// grid identifier
+
+	short	year,		// grid year >1900 xxxx   
+		month,		// grid mouth 1-12 xxxx
+		day,		// grid day 1-31 xxxx
+		hour,		// grid hour 0-23 xxxx
+		minutes,	// grid minutes 0-59 xxxx
+		seconds,	// grid seconds 0-59 xxxx
+		nx,		// number of columns
+		ny,		// number of lines
+		row,		// grid number xxxx
+		plevel,		// processing level
+		vc,		// current volume
+		ac;		// currente file
+
+	float	rx,		// horizontal resolution in meters
+		ry,		// vertical resolution in meters
+		xmin,		// bounding box minimum x coordinate
+		xmax,		// bounding box maximum x coordinate
+		ymin,		// bounding box minimum y coordinate
+		ymax,		// bounding box maximum y coordinate
+		zmin,		// minimum z coordinate
+		zmax;		// maximum z coordinate
+} GridDoc;
+
+
+void fill_griddoc (GridDoc& grd, short wid, short hg, float xmin, float xmax, float ymin, float ymax, float zmin, float zmax);
+
+#endif
+
diff --git a/src/libUtil/imagedoc.hpp b/src/libUtil/imagedoc.hpp
new file mode 100644
index 0000000..67b452e
--- /dev/null
+++ b/src/libUtil/imagedoc.hpp
@@ -0,0 +1,52 @@
+#ifndef imagedoc_H
+#define imagedoc_H
+
+typedef struct
+{
+	char	id[13];		// image identifier
+
+	short	satellite,	// satellite identifier xxxx
+		band,		// spectral band
+		year,		// image year >1900 xxxx   
+		month,		// image mouth 1-12 xxxx
+		day,		// image day 1-31 xxxx
+		hour,		// image hour 0-23 xxxx
+		minutes,	// image minutes 0-59 xxxx
+		seconds,	// image seconds 0-59 xxxx
+		nx,		// number of columns
+		ny,		// number of lines
+		xp,		// column of sub-satellite point
+		yp,		// line of sub-satellite point
+		x0,		// image origin column
+		y0,		// image origin line
+		path,		// orbit number xxxx
+		row,		// image number xxxx
+		plevel,		// processing level
+		vc,		// current volume
+		ac;		// currente file
+
+	float	lap,		// latitude of sub-satellite point
+		lop,		// longitude of sub-satellite point
+		yaw,		// orientation angle ... definir grau ou rad??????
+		nr,		// altitude or radius of satellite in meters ????????
+		rx,		// horizontal resolution in meters
+		ry;		// vertical resolution in meters
+} ImageDoc;
+
+typedef struct  
+{
+	char	quadrant[2];
+
+	short 	pvol,		// first tape			
+		uvol,		// last tape
+		band, 		// banda
+		numarq,		// file number
+		sta;		// 0 no load
+				// 1 load
+				// 2 already load
+} Descritption;
+
+void	fill_imagedoc (ImageDoc& im, short wid, short hg, float rx, float ry);
+
+#endif
+
diff --git a/src/libUtil/inc_iostream.h b/src/libUtil/inc_iostream.h
new file mode 100644
index 0000000..449fd26
--- /dev/null
+++ b/src/libUtil/inc_iostream.h
@@ -0,0 +1,77 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// inc_iostream.h                                 040727/vk, revised 110812/ir
+
+// include and set up iostream facilities
+
+
+#ifndef _INC_IOSTREAM_H_
+#define _INC_IOSTREAM_H_
+
+# include <iostream>
+# include <fstream>
+# include <sstream>
+# include <strstream>
+# include <iomanip>
+
+ using std::istream;
+ using std::ostream;
+ using std::ifstream;
+ using std::ofstream;
+ using std::istrstream;
+ using std::ostrstream;
+ using std::istringstream;
+ using std::ostringstream;
+ using std::cin;
+ using std::cout;
+ using std::cerr;
+ using std::endl;
+ using std::ends;
+ using std::flush;
+ using std::ios;
+ using std::streambuf;
+ using std::setfill;
+ using std::setw;
+
+// using std:: ;
+
+ typedef ios::openmode tOpenMode;
+
+
+
+// we need to repeat this from mars.h because fstream
+// includes cstdio which redefines these functions and kills the
+// support for >2GB files (on some filesystems). We can detect this by
+// checking whether fopen() has been undefined.
+
+#if !defined(fopen)
+  #ifdef LARGE_FILES_SUPPORT
+    #ifdef linux
+      #define fopen(a,b)   (FILE*)fopen64(a,b)
+    #else
+      #define fopen(a,b)   fopen64(a,b)
+    #endif
+    #define fseek(a,b,c) fseeko64(a,b,c)
+    #define ftell(a)     ftello64(a)
+    #define fsetpos(a,b) fsetpos64(a,b,c)
+    #define fgetpos(a,b) fgetpos64(a,b)
+    #define lseek(a,b,c) lseek64(a,b,c)
+    #define lstat(a,b)   lstat64(a,b)
+    #define fstat(a,b)   fstat64(a,b)
+    #define stat         stat64
+  #endif
+#endif
+
+// end of repeat from mars.h
+
+
+
+#endif
+// _INC_IOSTREAM_H_
diff --git a/src/libUtil/inc_stl.h b/src/libUtil/inc_stl.h
new file mode 100644
index 0000000..8a64083
--- /dev/null
+++ b/src/libUtil/inc_stl.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef INC_STL_H_
+#define INC_STL_H_
+
+//-- this branch is for standard STL implementations
+
+#include <set>
+#include <map>
+
+#ifdef HASHMAP
+#include <hash_map>
+#endif
+
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <vector>
+#include <stack>
+#include <memory>
+#include <string>
+
+#ifndef NOUSING
+//-- for HPUX aCC
+
+using std::auto_ptr;
+using std::less;
+using std::list;
+using std::map;
+
+#ifdef HASHMAP
+using std::hash_map;
+#endif
+
+using std::multimap;
+using std::pair;
+using std::set;
+using std::stack;
+using std::vector;
+
+using std::back_inserter;
+using std::copy;
+using std::fill;
+using std::find;
+using std::for_each;
+using std::greater;
+using std::inserter;
+using std::max_element;
+using std::min_element;
+using std::set_intersection;
+using std::sort;
+using std::swap;
+
+#endif
+// ! NOUSING
+
+
+#endif
+//INC_STL_H_
diff --git a/src/libUtil/min_max_macros.h b/src/libUtil/min_max_macros.h
new file mode 100644
index 0000000..71f908e
--- /dev/null
+++ b/src/libUtil/min_max_macros.h
@@ -0,0 +1,36 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef min_max_macros_H
+#define min_max_macros_H
+
+/*
+ *                               2000-07-28/vk
+ *
+ * These macros used to be part of 'gdefines.h'
+ * which was included into several other header
+ * files, which were included in other header files...
+ *
+ * On Alpha these macros clash with file
+ * /usr/include/cxx/limits.
+ *
+ * These macros were isolated into this file.
+ * Include this file directly only into those
+ * .c or .cc files where macros are needed!
+ */
+
+#ifndef max
+# define max(a,b) ( (a) > (b) ? (a) : (b))
+#endif
+
+#ifndef min
+# define min(a,b) ( (a) > (b) ? (b) : (a))
+#endif
+
+#endif
diff --git a/src/libUtil/progress.h b/src/libUtil/progress.h
new file mode 100644
index 0000000..7706d35
--- /dev/null
+++ b/src/libUtil/progress.h
@@ -0,0 +1,27 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/* progress.c */
+
+void progress_init(Widget parent);
+void progress_pixmap(Pixmap pixmap);
+void progress_start(const char *newtitle,int max);
+void progress_value(int value);
+void progress_stop();
+int  progress_ok();
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
diff --git a/src/libUtil/proj_braz.cc b/src/libUtil/proj_braz.cc
new file mode 100644
index 0000000..8fb2c6e
--- /dev/null
+++ b/src/libUtil/proj_braz.cc
@@ -0,0 +1,1856 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// This is a "copy" of the file ~magics/c/proj_braz.c .
+// The reason for this duplicity is to avoid to call
+// Magics routines within libUtil.
+// For the new Magics version, both files should be 
+// replaced by a single C++ version.
+
+#include <string.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include "proj_braz.hpp"
+
+static Datum			*D;
+static SProjection		*Sp1,*Sp2;
+static GeneralProjection	*Gp1,*Gp2;
+static CylindEquid		*Ce1,*Ce2;
+static PolarStereo		*Ps1,*Ps2;
+static Satellite		*Sat1,*Sat2;
+static SImage			*Imi,*Imo;
+static BBox				*B1,*B2;
+static CPoint				*P1,*P2,*P3,*P4;
+
+static char		*txd,*tx1,*tx2,*tx3,*tx4,tmp1[M_NAME_MAX],tmp2[M_NAME_MAX];
+
+Real pWidth(BBox *b)
+{
+	Real a;
+	a = ABS( (b->Bur).X - (b->Bll).X);
+
+	return  a;
+
+}
+
+
+Real pHeight(BBox *b)
+{
+	Real a;
+
+	a = (b->Bur).Y - (b->Bll).Y;
+	a = (a>=0) ? a : -a;
+	return  a;
+
+}
+
+short pContains(BBox *b, CPoint *p)
+{
+
+	if (  (b->Bll).X <= p->X && (b->Bll).Y <= p->Y &&
+	    p->X <= (b->Bur).X && p->Y <= (b->Bur).Y ) return TRUE;
+
+	return FALSE;
+}
+
+short pIntersects(BBox *b1, BBox *b2)
+{
+	CPoint p1,p2;
+
+	p1 = pMaxPoint(&b1->Bll,&b2->Bll);
+	p2 = pMinPoint(&b1->Bur,&b2->Bur);
+	if ( p1.X < p2.X && p1.Y < p2.Y ) return TRUE;
+	return FALSE;
+
+}
+
+void pInitBBox(BBox *b, Real BllX, Real BllY, Real BurX, Real BurY)
+{
+	(b->Bll).X = BllX;
+	(b->Bll).Y = BllY;
+	(b->Bur).X = BurX;
+	(b->Bur).Y = BurY;
+}
+
+void pBBoxRemapInOut (SProjection *In, SProjection *Out, BBox *B)
+{
+	Real	aux,
+	step,
+	x1 = B->Bll.X,
+	x2 = B->Bur.X,
+	y1 = B->Bll.Y,
+	y2 = B->Bur.Y,
+	xmin = MAXFLOAT,
+	xmax = -MAXFLOAT,
+	ymin = MAXFLOAT,
+	ymax = -MAXFLOAT;
+	CPoint	p;
+	step = (x2 - x1)/NSTEPS;
+	for (aux = x1; aux < x2; aux += step)
+	{
+		/* lower edge */
+		p.X = aux;
+		p.Y = y1;
+		p = pPC2LL(In,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+			p = pLL2PC(Out,p);
+			if ( p.X < (MAXFLOAT / 10.) )
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+			}
+		}
+
+		/* upper edge */
+		p.X = aux;
+		p.Y = y2;
+		p = pPC2LL(In,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+			p = pLL2PC(Out,p);
+			if ( p.X < (MAXFLOAT / 10.) )
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+			}
+		}
+
+	}
+
+	step = (y2 -y1)/NSTEPS;
+	for (aux = y1; aux <y2; aux += step)
+	{
+		/* left edge */
+		p.X = x1;
+		p.Y = aux;
+		p = pPC2LL(In,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+			p = pLL2PC(Out,p);
+			if ( p.X < (MAXFLOAT / 10.) )
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+			}
+		}
+
+
+		/* right edge */
+		p.X = x2;
+		p.Y = aux;
+		p = pPC2LL(In,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+			p = pLL2PC(Out,p); 
+			if ( p.X < (MAXFLOAT / 10.) )
+			{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+			}
+		}
+
+	}
+
+	B->Bll.X = xmin;
+	B->Bll.Y = ymin;
+	if (pTooBig(&B->Bll))
+	{
+		B->Bll.X = -MAXFLOAT;
+		B->Bll.Y = -MAXFLOAT;
+	}
+	B->Bur.X = xmax;
+	B->Bur.Y = ymax;
+	if (pTooBig(&B->Bll))
+	{
+		B->Bur.X = MAXFLOAT;
+		B->Bur.Y = MAXFLOAT;
+	}
+
+	return;
+}
+
+void pBBoxRemap (SProjection *Out, BBox *B)
+{
+	Real	aux,
+	step,
+	x1 = B->Bll.X,
+	x2 = B->Bur.X,
+	y1 = B->Bll.Y,
+	y2 = B->Bur.Y,
+	xmin = MAXFLOAT,
+	xmax = -MAXFLOAT,
+	ymin = MAXFLOAT,
+	ymax = -MAXFLOAT;
+	CPoint	p;
+	step = (x2 - x1)/NSTEPS;
+	for (aux = x1; aux < x2; aux += step)
+	{
+		/* lower edge */
+		p.X = aux;
+		p.Y = y1;
+		p = pLL2PC(Out,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+		}
+
+		/* upper edge */
+		p.X = aux;
+		p.Y = y2;
+		p = pLL2PC(Out,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+		}
+
+	}
+
+	step = (y2 -y1)/NSTEPS;
+	for (aux = y1; aux <y2; aux += step)
+	{
+		/* left edge */
+		p.X = x1;
+		p.Y = aux;
+		p = pLL2PC(Out,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+				/* search for minimum and maximum coordinates,*/
+				/* if a valid remapped point is calculated */
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+		}
+
+
+		/* right edge */
+		p.X = x2;
+		p.Y = aux;
+		p = pLL2PC(Out,p);
+		if ( p.X < (MAXFLOAT / 10.) )
+		{
+				if (p.X < xmin)
+					xmin = p.X;
+				if (p.X > xmax)
+					xmax = p.X;
+				if (p.Y < ymin)
+					ymin = p.Y;
+				if (p.Y > ymax)
+					ymax = p.Y;
+		}
+
+	}
+
+	B->Bll.X = xmin;
+	B->Bll.Y = ymin;
+	B->Bur.X = xmax;
+	B->Bur.Y = ymax;
+
+	return;
+}
+
+void pimii1_(Real BllX, Real BllY, Real BurX, Real BurY, int lin, int col, Real Irx, Real Iry, int pixel, int outside, unsigned char *tbuf)
+{
+
+	unsigned long		pix,outsidevalue;
+//	short				lin,col;
+
+	pix = (unsigned long)pixel;
+	outsidevalue = (unsigned long)outside;
+
+//	lin = (short) *Inx;
+//	col = (short) *Iny;
+
+	pInitBBox(B1,BllX,BllY,BurX,BurY);
+
+	pInitImage(Imi,B1,(short)lin,(short)col,Irx,Iry,pix,outsidevalue,tbuf,Sp1);
+
+	return;
+}
+
+void pimii2_(Real BllX, Real BllY, Real BurX, Real BurY, int lin, int col, Real Irx, Real Iry, int pixel, int outside, unsigned char *tbuf)
+{
+
+	unsigned long pix,outsidevalue;
+//	short				lin,col;
+	int	      i;
+	unsigned char *buf;
+
+	pix = (unsigned long)pixel;
+	outsidevalue = (unsigned long)outside;
+
+//	lin = (short) *Inx;
+//	col = (short) *Iny;
+
+	pInitBBox(B2,BllX,BllY,BurX,BurY);
+
+	buf = tbuf;
+	for (i=0; i<lin*col; i++)
+		*buf++ = (unsigned char) outsidevalue;
+
+	pInitImage(Imo,B2,(short)lin,(short)col,Irx,Iry,pix,outsidevalue,tbuf,Sp2);
+
+	return;
+}
+
+void pll2ic(Real &x, Real &y)
+{
+      // Convert lat/lon to projection coordinates
+      pInitPoint(P1,x,y);
+      *P1 = pLL2PC(Sp1,*P1);
+
+      // Compute image coordinates. This routine always returns
+      // valid coordinates. If the computed coordinates are outside
+      // the image area, the returned values are the min/max coordinates.
+      *P1 = pCoord2Index (Imi,P1);
+      x = P1->X;
+      y = P1->Y;
+
+      return;
+}
+
+void pl2p1_(Real *x, Real *y)
+{
+	pInitPoint(P1,*x,*y);
+
+	*P1 = pLL2PC(Sp2,*P1);
+
+	*x = P1->X;
+	*y = P1->Y;
+
+	return;
+}
+
+void pl2p2_(Real *x, Real *y)
+{
+	pInitPoint(P2,*x,*y);
+
+	*P2 = pLL2PC(Sp2,*P2);
+
+	*x = P2->X;
+	*y = P2->Y;
+
+	return;
+}
+
+void pp2l1_(Real *x, Real *y)
+{
+	pInitPoint(P1,*x,*y);
+
+	*P1 = pPC2LL(Sp2,*P1);
+
+	*x = P1->X;
+	*y = P1->Y;
+
+	return;
+}
+
+void pp2l2_(Real *x, Real *y)
+{
+	pInitPoint(P2,*x,*y);
+
+	*P2 = pPC2LL(Sp2,*P2);
+
+	*x = P2->X;
+	*y = P2->Y;
+
+	return;
+}
+
+void premap_()
+{
+	pRemapI(Imi,Imo);
+
+	return;
+}
+
+void pdeal_()
+{
+	free(tx1);
+	free(tx2);
+	free(tx3);
+	free(tx4);
+	free(D);
+	free(Imi);
+	free(Imo);
+	free(Sp1);
+	free(Sp2);
+	free(Sat1);
+	free(Sat2);
+	free(Gp1);
+	free(Gp2);
+	free(P1);
+	free(P2);
+	free(P3);
+	free(P4);
+	free(B1);
+	free(B2);
+
+	return;
+}
+
+void pimin1_()
+{
+	/* Define and Initialize Datum and Projection */
+
+	D =   (Datum *)malloc(sizeof(Datum));
+	Imi = (SImage *)malloc(sizeof(SImage));
+	Imo = (SImage *)malloc(sizeof(SImage));
+
+	Sp1 = (SProjection *)malloc(sizeof(SProjection));
+	Sp2 = (SProjection *)malloc(sizeof(SProjection));
+
+	Sat1 = (Satellite *)malloc(sizeof(Satellite));
+	Sat2 = (Satellite *)malloc(sizeof(Satellite));
+
+	Gp1  = (GeneralProjection *)malloc(sizeof(GeneralProjection));
+	Gp2  = (GeneralProjection *)malloc(sizeof(GeneralProjection));
+
+	P1 = (CPoint *)malloc(sizeof(CPoint));
+	P2 = (CPoint *)malloc(sizeof(CPoint));
+	P3 = (CPoint *)malloc(sizeof(CPoint));
+	P4 = (CPoint *)malloc(sizeof(CPoint));
+
+	B1 = (BBox *)malloc(sizeof(BBox));
+	B2 = (BBox *)malloc(sizeof(BBox));
+
+	return ;
+}
+
+void pimind_(int i1, char *tx, Real Pdx, Real Pdy, Real Pdz, double Prd, double Pflt)
+{
+	int		i;
+	short		Pcode;
+
+	/* Define and Initialize Datum and Projection */
+
+	Pcode = (short)i1;
+
+/*
+	i = str_length;
+	while( *(tx+i-1) == ' ' && i>0 ) i--;
+
+	txd = (char *) malloc(sizeof(char)*i+1);
+
+	strncpy(txd,tx,i);
+	*(txd+i) = '\0';
+*/
+
+	pInitDatum(D,Pcode,tx,Pdx,Pdy,Pdz,Prd,Pflt);
+
+	return ;
+}
+
+void pimp1_(char *txo, char *txs, int Pid, int Pcode, int Pdatum, int i3, Real Pdx, Real Pdy, Real Pdz, double Prd, double Pflt, double Poffx, double Poffy)
+{
+//	int			i;
+//	short		Pcode,Pdatum;
+
+	/* Define and Initialize Datum and Projection */
+
+//	Pcode = (short)i1;
+//	Pdatum = (short)i2;
+
+/*
+	i = str_length1;
+	while( *(txo+i-1) == ' ' && i>0 ) i--;
+
+	tx1 = (char *) malloc(sizeof(char)*i+1);
+
+	strncpy(tx1,txo,i);
+	*(tx1+i) = '\0';
+
+	i = str_length2;
+	while( *(txs+i-1) == ' ' && i>0 ) i--;
+
+	tx2 = (char *) malloc(sizeof(char)*i+1);
+
+	strncpy(tx2,txs,i);
+	*(tx2+i) = '\0';
+*/
+
+	pInitProj(Sp1,txs,txo,Pid,(short)Pcode,(short)Pdatum,Pdx,Pdy,Pdz,Prd,Pflt,Poffx,Poffy);
+
+	return ;
+}
+
+void pimp2_(char *txo, char *txs, int Pid, int Pcode, int Pdatum, int i3, Real Pdx, Real Pdy, Real Pdz, double Prd, double Pflt, double Poffx, double Poffy)
+{
+//	int		i;
+//	short		Pcode,Pdatum;
+
+	/* Define and Initialize Datum and Projection */
+
+//	Pcode = (short)i1;
+//	Pdatum = (short)i2;
+
+/*
+	i = str_length1;
+	while( *(txo+i-1) == ' ' && i>0 ) i--;
+
+	tx3 = (char *) malloc(sizeof(char)*i+1);
+
+	strncpy(tx3,txo,i);
+	*(tx3+i) = '\0';
+
+	i = str_length2;
+	while( *(txs+i-1) == ' ' && i>0 ) i--;
+
+	tx4 = (char *) malloc(sizeof(char)*i+1);
+
+	strncpy(tx4,txs,i);
+	*(tx4+i) = '\0';
+*/
+	pInitProj(Sp2,txs,txo,Pid,(short)Pcode,(short)Pdatum,Pdx,Pdy,Pdz,Prd,Pflt,Poffx,Poffy);
+
+	return ;
+}
+
+void pimg1_(int GPhemis, double GPlat0, double GPlon0, double GPstlat1, double GPstlat2)
+{
+//	short GPhemis;
+	
+//	GPhemis = (short)i1;
+
+	pInitGen(Gp1,(short)GPhemis,GPlat0,GPlon0,GPstlat1,GPstlat2);
+
+	Sp1->Proj.Gp = Gp1;
+
+	return;
+}
+
+void pimg2_(int GPhemis, double *GPlat0, double *GPlon0, double *GPstlat1, double *GPstlat2)
+{
+//	short GPhemis;
+	
+//	GPhemis = (short)i1;
+
+	pInitGen(Gp2,(short)GPhemis,*GPlat0,*GPlon0,*GPstlat1,*GPstlat2);
+
+	Sp2->Proj.Gp = Gp2;
+
+	return;
+
+}
+
+void pims1_(double SPri, double SPrj, double SPis, double SPjs, double SPla0, double SPlo0, double SPrs, double SPscn, double SPyaw)
+{
+	pInitSat(Sat1,SPri,SPrj,SPis,SPjs,SPla0,SPlo0,SPrs,SPscn,SPyaw);
+	Sp1->Proj.Sat = Sat1;
+
+	return;
+}
+
+void pims2_(double SPri, double SPrj, double SPis, double SPjs, double SPla0, double SPlo0, double SPrs, double SPscn, double SPyaw)
+{
+	pInitSat(Sat2,SPri,SPrj,SPis,SPjs,SPla0,SPlo0,SPrs,SPscn,SPyaw);
+	Sp2->Proj.Sat = Sat2;
+
+	return;
+}
+
+
+//F--------------
+#if 0
+#define SIZE 128
+
+void pmvimg_(int* nx, int* ny, unsigned char* buff)
+{
+#define table_size 128
+	int table[table_size], ntable, itab;
+	int shift;
+
+	char mvflag[10], printer[10];
+	long i, total;
+	int k;
+
+	MAGEnqc("METVIEW", mvflag);
+	MAGEnqc("METVIEW_PRINTER", printer);
+	if (strncmp(mvflag,"ON",2)) return;
+	if (!strncmp(printer,"ON",2)) return;
+
+	MAGEnq1i("METVIEW_IMAGE_TABLE_INDEX", table, table_size, &ntable);
+
+	k = SIZE/ntable;
+	total = ((long) *nx) * ((long) *ny);
+	if (k == 1) shift = 0;
+	if (k == 2) shift = 1;
+	if (k == 4) shift = 2;
+	if (k == 8) shift = 3;
+	if (k == 16) shift = 4;
+
+	for (i = 0; i < total; i++)
+	{
+		/* original values are between 128 and 255.
+		   first mask the 8th bit (subtract 128) and
+		   then shift (divide by 2 or 4 or 8...)
+		*/
+		if (buff[i] >= 128)
+		{
+			itab = table[( (((int)buff[i]) & 0x007F) >> shift)];
+			buff[i] = (unsigned char) itab;
+		}
+	}
+}
+
+#endif
+
+short pTooBig(CPoint *p)
+{
+/* old version: p->* > BIGFLOAT and p->X < -BIGFLOAT, works for SGI 
+   but not for Linux */
+
+	return ( p->X >= BIGFLOAT || p->Y >= BIGFLOAT || p->X <= -BIGFLOAT
+	||   p->Y <= -BIGFLOAT );
+}
+
+short pPointOnLine(SImage *Im, CPoint *p, CPoint *q, CPoint *w)
+{
+	int px,py,qx,qy,wx,wy;
+
+	if (!pContains(Im->IBBox,p)) return FALSE;
+	if (!pContains(Im->IBBox,q)) return FALSE;
+
+	px = (int) (p->X / Im->Irx); 
+	py = (int) (p->Y / Im->Iry);
+	qx = (int) (q->X / Im->Irx); 
+	qy = (int) (q->Y / Im->Iry);
+	wx = (int) (w->X / Im->Irx); 
+	wy = (int) (w->Y / Im->Iry);
+
+	if ( ABS((qy-py)*(wx-px) - (wy-py)*(qx-px)) >=
+	    MAX(ABS(qx-px),ABS(qy-py))) return FALSE;
+
+	return TRUE;
+
+}
+
+CPoint pMaxPoint(CPoint *p1, CPoint *p2)
+{
+	CPoint p;
+
+	p.X = MAX( p1->X,p2->X ); 
+	p.Y = MAX( p1->Y,p2->Y );
+	return p;
+}
+
+CPoint pMinPoint(CPoint *p1, CPoint *p2)
+{
+	CPoint p;
+
+	p.X = MIN( p1->X,p2->X ); 
+	p.Y = MIN( p1->Y,p2->Y);
+	return p;
+}
+
+void pInitPoint(CPoint *p,Real x,Real y)
+{
+	p->X = x;
+	p->Y = y;
+}
+
+void pInitDatum(Datum *D, short Pcode, char *tx2, Real Ddx, Real Ddy, Real Ddz,double Drd, double Dflt)
+{
+	D->Dproj = Pcode;
+	D->Dname = tx2;
+	D->Ddx   = Ddx;
+	D->Ddy   = Ddy;
+	D->Ddz   = Ddz;
+	D->Drd   = Drd;
+	D->Dflt  = Dflt;
+}
+
+void pInitProj(SProjection *Sp, char *tx1, char *tx2, int Pid, short Pcode, short Pdatum, Real Pdx, Real Pdy, Real Pdz, double Prd, double Pflt, double Poffx, double Poffy)
+{
+	Sp->Pname   = tx2;
+	Sp->Pdname  = tx1;
+	Sp->Pdatum  = Pdatum;
+	Sp->Pcode   = Pcode;
+	Sp->Pgbcode = 0;
+	Sp->Pgbcode1 = 0;
+	Sp->Pid     = Pid;
+	Sp->Pdx     = Pdx;
+	Sp->Pdy     = Pdy;
+	Sp->Pdz     = Pdz;
+	Sp->Prd     = Prd;
+	Sp->Pflt    = Pflt;
+	Sp->Poffx   = Poffx;
+	Sp->Poffy   = Poffy;
+	Sp->Pout    = Sp;
+}
+
+short pProjEq(SProjection *In, SProjection *Out)
+{
+	if (In->Pcode 	!= Out->Pcode) return FALSE;
+	if (In->Pdatum  != Out->Pdatum) return FALSE;
+	if (In->Pdx     != Out->Pdx) return FALSE;
+	if (In->Pdy     != Out->Pdy) return FALSE;
+	if (In->Pdz     != Out->Pdz) return FALSE;
+	if (In->Prd     != Out->Prd) return FALSE;
+	if (In->Pflt    != Out->Pflt) return FALSE;
+	if (In->Poffx   != Out->Poffx) return FALSE;
+	if (In->Poffy   != Out->Poffy) return FALSE;
+
+	switch (In->Pcode)
+	{
+		case PROJCYLINDRICAL :
+		case PROJMERCATOR  :
+		case PROJPOLAR  :
+		default:
+		
+			if ( In->Proj.Gp->GPhemis  != Out->Proj.Gp->GPhemis) return FALSE;
+			if ( In->Proj.Gp->GPlat0   != Out->Proj.Gp->GPlat0) return FALSE;
+			if ( In->Proj.Gp->GPstlat1 != Out->Proj.Gp->GPstlat1) return FALSE;
+			if ( In->Proj.Gp->GPstlat2 != Out->Proj.Gp->GPstlat2) return FALSE;
+			break;
+
+
+		case PROJSATELLITE  :
+
+			if (In->Proj.Sat->SPri   != Out->Proj.Sat->SPri) return FALSE;
+			if (In->Proj.Sat->SPrj   != Out->Proj.Sat->SPrj) return FALSE;
+			if (In->Proj.Sat->SPis   != Out->Proj.Sat->SPis) return FALSE;
+			if (In->Proj.Sat->SPjs   != Out->Proj.Sat->SPjs) return FALSE;
+			if (In->Proj.Sat->SPla0  != Out->Proj.Sat->SPla0) return FALSE;
+			if (In->Proj.Sat->SPlo0  != Out->Proj.Sat->SPlo0) return FALSE;
+			if (In->Proj.Sat->SPrs   != Out->Proj.Sat->SPrs) return FALSE;
+			if (In->Proj.Sat->SPscn  != Out->Proj.Sat->SPscn) return FALSE;
+			if (In->Proj.Sat->SPyaw  != Out->Proj.Sat->SPyaw) return FALSE;
+			break;
+	}
+
+	return TRUE;
+}
+
+void pInitGen(GeneralProjection *Gp, short GPhemis, double GPlat0, double GPlon0, double GPstlat1, double GPstlat2)
+{
+	Gp->GPhemis  = GPhemis;
+	Gp->GPlat0   = GPlat0;
+	Gp->GPlon0   = GPlon0;
+	Gp->GPstlat1 = GPstlat1;
+	Gp->GPstlat2 = GPstlat2;
+}
+
+void pInitSat(Satellite *Sat, double SPri, double SPrj, double SPis, double SPjs, double SPla0, double SPlo0, double SPrs, double SPscn, double SPyaw)
+{
+	Sat->SPri   = SPri;
+	Sat->SPrj   = SPrj;
+	Sat->SPis   = SPis;
+	Sat->SPjs   = SPjs;
+	Sat->SPla0  = SPla0;
+	Sat->SPlo0  = SPlo0;
+	Sat->SPrs   = SPrs;
+	Sat->SPscn  = SPscn;
+	Sat->SPyaw  = SPyaw;
+
+}
+
+CPoint pLL2PC(SProjection *Sp, CPoint ptll)
+{
+	CPoint		p;
+
+	switch (Sp->Pcode)
+	{
+		case PROJCYLINDRICAL :
+			p = pCylLL2PC(Sp,ptll);
+			break;
+
+		case PROJSATELLITE  :
+			p = pSatLL2PC(Sp,ptll);
+			break;
+
+		case PROJMERCATOR  :
+			p = pMerLL2PC(Sp,ptll);
+			break;
+
+		case PROJPOLAR  :
+			p = pPolLL2PC(Sp,ptll);
+			break;
+
+		default:
+			p.X = 0.;
+			p.Y = 0.;
+			break;
+
+	}
+
+	return p;
+}
+
+CPoint pPC2LL(SProjection *Sp, CPoint ptll)
+{
+	CPoint		p;
+
+			switch(Sp->Pcode)
+			{
+
+				case PROJCYLINDRICAL :
+
+					p = pCylPC2LL(Sp,ptll);
+					break;
+
+				case PROJSATELLITE  :
+
+					p = pSatPC2LL(Sp,ptll);
+					break;
+
+				case PROJMERCATOR  :
+
+					p = pMerPC2LL(Sp,ptll);
+					break;
+
+				case PROJPOLAR  :
+
+					p = pPolPC2LL(Sp,ptll);
+					break;
+
+				default:
+
+					printf(" Undefined projection!\n");
+					p.X = 0.;
+					p.Y = 0.;
+					break;
+			}
+
+			return p;
+}
+
+/********************************************************************
+		Planimetric datum transformation 
+********************************************************************/
+void ChangeLL(SProjection *Sp, double *lon1, double *lat1)		
+{
+	double	equad1,		/* Squared eccentricity - datum 1 */
+		equad2,		/* Squared eccentricity - datum 2 */
+		n1,		/* Great normal of ellipsoid - datum 1 */
+		n2,		/* Great normal od ellipsoid - datum 2 */
+		x1,		/* Geocentric cartesian coordinates - datum 1  */
+		y1,
+		z1,
+		x2,		/* Geocentric cartesian coordinates - datum 2 */
+		y2,
+		z2,
+		d,lat2,	/* Ancillary variable */
+		lon2;
+	Real	Pdx,Pdy,Pdz,tmp;
+	double	Prd,Pflt;
+
+	Pdx = Sp->Pdx;
+	Pdy = Sp->Pdy;
+	Pdz = Sp->Pdz;
+	Prd = Sp->Prd;
+	Pflt = Sp->Pflt;
+
+	/* Geocentric cartesian coordinates calculation - datum 1 */
+	equad1 = 2.*Pflt - pow(Pflt,(double)2);
+	n1 = Prd/sqrt((double)1-equad1*pow(sin(*lat1),(double)2));
+	x1 = n1*cos(*lat1)*cos(*lon1);
+	y1 = n1*cos(*lat1)*sin(*lon1);
+	z1 = (n1*(1-equad1))*sin(*lat1);
+
+	/* Geocentric cartesian coordinates calculation - datum 2 */
+	if (Pdx == MAXFLOAT || Sp->Pout->Pdx == MAXFLOAT)
+	{
+		x2 = x1; 
+		y2 = y1;
+		z2 = z1;
+	}
+	else
+	{	
+		x2 = x1 + (Pdx - Sp->Pout->Pdx);
+		y2 = y1 + (Pdy - Sp->Pout->Pdy);
+		z2 = z1 + (Pdz - Sp->Pout->Pdz);
+	}
+
+	/* Geodetic coordinates calculation - datum 2 */
+	equad2 = 2.*Sp->Pout->Pflt - pow(Sp->Pout->Pflt,(double)2);
+	lat2 = *lat1;
+	do
+	{
+		n2 = Sp->Pout->Prd/sqrt((double)1-equad2*pow(sin(lat2),(double)2));
+		lat2 = atan((z2 + n2*equad2*sin(lat2))/sqrt(x2*x2 + y2*y2));
+		d = Sp->Pout->Prd/sqrt((double)1-equad2*pow(sin(lat2),(double)2)) - n2;
+	}
+	while (fabs(d) > 0.0000001);
+	lon2 = atan(y2/x2);
+	*lat1 = lat2;
+	*lon1 = lon2;
+}
+
+/***********************************************************************
+		GEODETIC COORDINATES TO SATELLITE PROJECTION
+***********************************************************************/
+CPoint pSatLL2PC(SProjection *Sp, CPoint ptll)
+{
+	double equad, n, x, y, z, sn, dp, dl,xlo,yla,lin,col,resx,resy;
+	double x1, x2, a, b, c,  Rd2, Rm, Rm2, Rs2, v;
+	double SPri,SPrj,SPis,SPjs,SPla0,SPlo0,SPrs,SPscn,SPyaw;
+	double Pflt,Prd;
+
+	CPoint ppc;
+/* Check if ptll contains MAXFLOAT */
+
+	if (pTooBig(&ptll))
+	{
+		ppc.X = MAXFLOAT;
+		ppc.Y = MAXFLOAT;
+		return ppc;
+	}
+
+	SPri = Sp->Proj.Sat->SPri;
+	SPrj = Sp->Proj.Sat->SPrj;
+	SPis = Sp->Proj.Sat->SPis;
+	SPjs = Sp->Proj.Sat->SPjs;
+	SPla0 = Sp->Proj.Sat->SPla0;
+	SPlo0 = Sp->Proj.Sat->SPlo0;
+	SPrs = Sp->Proj.Sat->SPrs;
+	SPscn = Sp->Proj.Sat->SPscn;
+	SPyaw = Sp->Proj.Sat->SPyaw;
+
+
+	Pflt = Sp->Pflt;
+	Prd = Sp->Prd;
+	xlo = (double)ptll.X;
+	yla = (double)ptll.Y;
+
+	/* Cartesian geocentric coordinates */
+	xlo = xlo - SPlo0;
+	yla = yla - SPla0;
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	n = Prd/sqrt((double)1-equad*pow(sin(yla),(double)2));
+	x = n*cos(yla)*cos(xlo);
+	y = n*cos(yla)*sin(xlo);
+	z = (n*(1-equad))*sin(yla);
+ 
+	/* Field of view angles */
+	dp = atan(y / (SPrs - x));
+	dl = atan(z * cos(dp) /(SPrs - x));
+
+	/* Visibility test */
+	if ( x < 0.0 )
+	{
+		ppc.X = MAXFLOAT;
+		ppc.Y = MAXFLOAT;
+		return ppc;
+	}
+	else
+	{
+		Rd2 = Prd * Prd ;
+		Rm  = Prd * (1. - Pflt);
+		Rm2 = Rm * Rm ;
+		Rs2 = SPrs * SPrs;
+
+		v = (tan(dp)*tan(dp)*cos(dp)*cos(dp)*Rm2)+(tan(dl)*tan(dl)*Rd2);
+		a = cos(dp)*cos(dp)*Rm2 + v;      
+		b = -2.*SPrs*v;
+		c = Rs2*v-Rd2*Rm2*cos(dp)*cos(dp);
+
+		/* Equation Resolution a*x**2+b*x+c=0 */
+		v = (b*b) - (4.*a*c);
+		if (v < 0.0) v=0.0;
+   		x1 = (-b + sqrt(v)) / (2.*a);
+		x2 = (-b - sqrt(v)) / (2.*a);
+		if (x1 < x2)  x1 = x2;
+
+		if ( fabs(x-x1) > 1.0 )
+		{
+			ppc.X = MAXFLOAT;
+			ppc.Y = MAXFLOAT;
+			return ppc;
+		}
+	}
+	/* Line and column of image*/
+	if (SPscn == 0.) sn = 1.0;  else sn = -1.0;
+	col = (sn * dp / SPrj + SPjs );
+	lin = (-sn * dl / SPri + SPis);
+
+	/* Axis rotation correction due to yaw angle */
+	col = col*cos(SPyaw) - lin*sin(SPyaw);
+	lin = lin*cos(SPyaw) + col*sin(SPyaw);
+	resx = tan(SPrj) * (SPrs - Prd);
+	resy = tan(SPri) * (SPrs - Prd);
+
+	ppc.X = (Real)(col*resx);
+	ppc.Y = -(Real)(lin*resy);
+	return ppc;
+}
+
+/*********************************************************************
+		SATELLITE PROJECTION TO GEODETIC COORDINATES
+**********************************************************************/
+CPoint pSatPC2LL(SProjection *Sp, CPoint ptpc)
+{
+	double	dl, dp, x, y, z, x1, x2, equad, n, d, sn,
+		a, b, c,  Rd2, Rm,Rm2, Rs2,v,ptpcx,ptpcy,
+		yla,xlo,resx,resy;
+	double SPri,SPrj,SPis,SPjs,SPla0,SPlo0,SPrs,SPscn,SPyaw;
+	double Pflt,Prd;
+
+	CPoint ppc;
+
+
+	SPri = Sp->Proj.Sat->SPri;
+	SPrj = Sp->Proj.Sat->SPrj;
+	SPis = Sp->Proj.Sat->SPis;
+	SPjs = Sp->Proj.Sat->SPjs;
+	SPla0 = Sp->Proj.Sat->SPla0;
+	SPlo0 = Sp->Proj.Sat->SPlo0;
+	SPrs = Sp->Proj.Sat->SPrs;
+	SPscn = Sp->Proj.Sat->SPscn;
+	SPyaw = Sp->Proj.Sat->SPyaw;
+
+	Pflt = Sp->Pflt;
+	Prd = Sp->Prd;
+
+	resx = tan(SPrj) * (SPrs - Prd);
+	resy = tan(SPri) * (SPrs - Prd);
+	ptpcx = (double)ptpc.X/resx;
+	ptpcy = -(double)ptpc.Y/resy;
+
+	/* Axis rotation correction due yaw angle */
+	ptpcx = ptpcx*cos(SPyaw) + ptpcy*sin(SPyaw);
+	ptpcy = ptpcy*cos(SPyaw) - ptpcx*sin(SPyaw);
+
+	/* Field of view angles */
+	if (SPscn == 0.) sn =  1.0;
+	else 		 sn = -1.0;
+	dl = - sn * ((ptpcy - SPis) * SPri);
+	dp =   sn * ((ptpcx - SPjs) * SPrj);
+
+	/* Cartesian coordinates */
+	Rd2 = Prd * Prd ;
+	Rm  = Prd * (1. - Pflt);
+	Rm2 = Rm * Rm ;
+	Rs2 = SPrs * SPrs;
+
+	v = (tan(dp)*tan(dp)*cos(dp)*cos(dp)*Rm2)+(tan(dl)*tan(dl)*Rd2);
+	a = cos(dp)*cos(dp)*Rm2 + v;      
+	b = -2.*SPrs*v;
+	c = Rs2*v-Rd2*Rm2*cos(dp)*cos(dp);
+
+	/* Equation Resolution a*x**2+b*x+c=0  */
+	v = (b*b) - (4.*a*c);
+	if (v < 0)
+	{
+		ppc.X = MAXFLOAT;
+		ppc.Y = MAXFLOAT;
+		return ppc;
+	}
+
+   	x1 = (-b + sqrt(v)) / (2.*a);
+	x2 = (-b - sqrt(v)) / (2.*a);
+
+	if ( x1 >= x2)  x = x1;
+	else		  x = x2;
+
+	z = (SPrs - x) * tan(dl) / cos(dp);
+	y = (SPrs - x) * tan(dp);
+
+	/* Geodetic coordinates */
+	equad 	= 2. * Pflt - Pflt * Pflt;
+	if ( dl > Prd/SPrs)
+		yla = PI/2.;
+	else if( dl < - Prd/SPrs )
+		yla = - PI/2.;
+	else
+		yla = asin(SPrs * dl / Prd);
+	
+	do
+	{
+		n= Prd/sqrt((double)1-equad*pow(sin(yla),(double)2));
+		yla = atan((z + n*equad*sin(yla))/sqrt(x*x + y*y));
+		d = Prd/sqrt((double)1-equad*pow(sin(yla),(double)2)) - n;
+	}
+	while (fabs(d) > 0.001);
+
+	xlo = atan(y/x) + SPlo0;
+	yla = yla + SPla0;
+
+	ppc.X = (Real)xlo;
+	ppc.Y = (Real)yla;
+	return ppc;
+}
+
+/********************************************************************
+	GEODETIC TO EQUIDISTANT CYLINDRICAL COORDINATES
+********************************************************************/
+CPoint pCylLL2PC (SProjection *Sp, CPoint ptll)
+{
+	double	GPstlat1,GPlon0,Prd;
+	double	ptllx,ptlly;
+	CPoint ppc;
+
+	ptllx = (double)ptll.X;
+	ptlly = (double)ptll.Y;
+
+	Prd = Sp->Prd;
+	GPlon0 = Sp->Proj.Gp->GPlon0;
+	GPstlat1 = Sp->Proj.Gp->GPstlat1;
+
+
+	ptllx = Prd*(ptllx - GPlon0)*cos(GPstlat1);
+	ptlly = Prd*ptlly;
+
+	ppc.X = (Real)ptllx;
+	ppc.Y = (Real)ptlly;
+
+	return ppc;
+}
+
+/********************************************************************
+	EQUIDISTANT CYLINDRICAL TO GEODETIC COORDINATES
+********************************************************************/
+CPoint pCylPC2LL(SProjection *Sp, CPoint ptpc)
+{
+	double	ptpcx,ptpcy;
+	double	GPstlat1,GPlon0,Prd;
+
+	CPoint ppc;
+
+	ptpcx = (double)ptpc.X;
+	ptpcy = (double)ptpc.Y;
+
+	Prd = Sp->Prd;
+	GPlon0 = Sp->Proj.Gp->GPlon0;
+	GPstlat1 = Sp->Proj.Gp->GPstlat1;
+
+	ptpcy = ptpcy/Prd;
+	ptpcx = GPlon0 + ptpcx/(Prd*cos(GPstlat1));
+
+	if(Sp->Pid != Sp->Pout->Pid) ChangeLL(Sp,&ptpcx,&ptpcy);
+
+	ppc.X = (Real)ptpcx;
+	ppc.Y = (Real)ptpcy;
+
+	return ppc;
+}
+
+/********************************************************************
+	GEODETIC TO POLAR STEREOGRAPHIC COORDINATES
+********************************************************************/
+CPoint pPolLL2PC (SProjection *Sp, CPoint ptll)
+{
+	double	k0,			/* Scale factor */
+		e,			/* Eccentricity */
+		lon0,			/* auxilliary origin longitude */
+		t,ro,aux1,aux2,aux3,ptllx,ptlly;
+	short	GPhemis;
+	double	Pflt,Prd;
+	double	GPlat0,GPlon0,GPstlat1,GPstlat2;
+	CPoint ppc;
+	
+	ptllx = (double)ptll.X;
+	ptlly = (double)ptll.Y;
+
+	GPhemis = Sp->Proj.Gp->GPhemis;
+	GPlat0 = Sp->Proj.Gp->GPlat0;
+	GPlon0 = Sp->Proj.Gp->GPlon0;
+	GPstlat1 = Sp->Proj.Gp->GPstlat1;
+	GPstlat2 = Sp->Proj.Gp->GPstlat2;
+
+	Pflt = Sp->Pflt;
+	Prd = Sp->Prd;
+
+/*	k0 = 0.994;	 Standard parallel 80.1 degrees  */
+	k0 = 0.933;	/* Standard parallel 60 degrees */
+	e = sqrt((double)2*Pflt - pow(Pflt,(double)2));
+
+	ptlly *= GPhemis;
+	ptllx *= GPhemis;
+	lon0 = (GPhemis == 1) ? GPlon0 : -GPlon0;
+
+	aux1 = (1. - e*sin(ptlly))/(1. + e*sin(ptlly));
+	t = tan((PI/4.) - (ptlly/2.))/pow(aux1,(e/(double)2));
+	aux2 = pow(((double)1 + e),((double)1 + e));
+	aux3 = pow(((double)1 - e),((double)1 - e));
+	ro = 2.*Prd*k0*t/sqrt(aux2*aux3);
+
+	aux1   = ro*sin(ptllx - lon0);
+	ptlly = -ro*cos(ptllx - lon0);
+	aux1 *= GPhemis;
+	ptlly *= GPhemis;
+	
+	if (GPhemis == -1)
+	{
+		aux1 *= GPhemis;
+		ptlly *= GPhemis;
+	}
+	ppc.X = (Real)aux1;
+	ppc.Y = (Real)ptlly;
+
+	return ppc;
+}
+
+/*******************************************************************
+	POLAR STEREOGRAPHIC TO GEODETIC COORDINATES
+********************************************************************/
+CPoint pPolPC2LL (SProjection *Sp, CPoint ptpc)
+{
+	double	k0,			/* Scale factor */
+		equad,			/* Squared eccentricity */
+		e,		        /* Eccentricity */
+		lon0,			/* auxilliary origin longitude */
+		ro,t,xx,aux1,aux2,aux3,aux4,aux5,ptpcx,ptpcy,px,py;
+	short	GPhemis;
+	double	GPlat0,GPlon0,GPstlat1,GPstlat2;
+	double	Pflt,Prd;
+	CPoint ppc;
+
+	px = (double)ptpc.X;
+	py = (double)ptpc.Y;
+
+	GPhemis = Sp->Proj.Gp->GPhemis;
+	GPlat0 = Sp->Proj.Gp->GPlat0;
+	GPlon0 = Sp->Proj.Gp->GPlon0;
+	GPstlat1 = Sp->Proj.Gp->GPstlat1;
+	GPstlat2 = Sp->Proj.Gp->GPstlat2;
+
+	Pflt = Sp->Pflt;
+	Prd = Sp->Prd;
+/*	k0 = 0.994;	 Standard parallel 80.1 degrees  */
+	k0 = 0.933;	/* Standard parallel 60 degrees */
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	e = sqrt(equad);
+
+	if (GPhemis == -1)
+	{
+		px *= GPhemis;
+		py *= GPhemis;
+	}
+
+	lon0 = (GPhemis == 1) ? GPlon0 : -GPlon0;
+
+	ro = sqrt(px*px + py*py);
+	aux1 = pow(((double)1 + e),((double)1 + e));
+	aux2 = pow(((double)1 - e),((double)1 - e));
+	t = (ro*sqrt(aux1*aux2))/(2.*Prd*k0);
+	xx = PI/2. - 2.*atan(t);
+	aux3 = equad/2. + 5.*equad*equad/24. + equad*equad*equad/12.;
+	aux4 = 7.*equad*equad/48. + 29.*equad*equad*equad/240.;
+	aux5 = 7.*equad*equad*equad/120.;
+
+	ptpcy = xx + aux3*sin((double)2*xx) + aux4*sin((double)4*xx) + aux5*sin((double)6*xx);
+
+	if (py != 0.)
+		ptpcx = lon0 + atan(px/(-py));
+
+
+	if (GPhemis == 1)
+	{
+		if (px > 0. && py > 0.)
+			ptpcx = ptpcx + PI;
+		else if (px < 0. && py > 0.)
+			ptpcx = ptpcx - PI;
+		else if (px > 0. && py == 0.)
+			ptpcx = lon0 + PI / 2.;
+		else if (px < 0. && py == 0.)
+			ptpcx = lon0 - PI / 2.;
+		else if (px == 0. && py == 0.)
+			ptpcx = lon0;
+	}
+	else
+	{
+		ptpcy *= GPhemis;
+		ptpcx *= GPhemis;
+
+		if (px > 0. && py < 0.)
+			ptpcx = ptpcx + PI;
+		else if (px < 0. && py < 0.)
+			ptpcx = ptpcx - PI;
+		else if (px > 0. && py == 0.)
+			ptpcx = lon0 + PI / 2.;
+		else if (px < 0. && py == 0.)
+			ptpcx = lon0 - PI / 2.;
+		else if (px == 0. && py == 0.)
+			ptpcx = lon0;
+	}
+
+	if (ptpcx < (-PI)) ptpcx += 2.*PI;
+	else if (ptpcx > PI)    ptpcx -= 2.*PI;
+
+	if(Sp->Pid != Sp->Pout->Pid) ChangeLL(Sp,&ptpcx,&ptpcy);
+
+	ppc.X = (Real)ptpcx;
+	ppc.Y = (Real)ptpcy;
+
+	return ppc;
+}
+
+/********************************************************************
+		GEODETIC TO MERCATOR COORDINATES
+********************************************************************/
+CPoint pMerLL2PC (SProjection *Sp, CPoint ptll)
+{
+	double	equad,			/*Squared eccentricity  */
+		aux1,			/* Ancillary variables */
+		aux2,aux3,aux4,aux5,aux6,ptllx,ptlly;
+	short	GPhemis;
+	double	Pflt,Prd;
+	double	GPlat0,GPlon0,GPstlat1,GPstlat2;
+	CPoint	ppc;
+
+	ptllx = (double)ptll.X;
+	ptlly = (double)ptll.Y;
+
+	GPhemis = Sp->Proj.Gp->GPhemis;
+	GPlat0 = Sp->Proj.Gp->GPlat0;
+	GPlon0 = Sp->Proj.Gp->GPlon0;
+	GPstlat1 = Sp->Proj.Gp->GPstlat1;
+	GPstlat2 = Sp->Proj.Gp->GPstlat2;
+
+	Pflt = Sp->Pflt;
+	Prd = Sp->Prd;
+
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	aux1 = (1. + tan(ptlly/(double)2))/(1. - tan(ptlly/(double)2));
+	aux2 = (equad+equad*equad/4.+equad*equad*equad/8.)*sin(ptlly);
+	aux3 = (equad*equad/12.+equad*equad*equad/16.)*sin((double)3*ptlly);
+	aux4 = (equad*equad*equad/80.)*sin((double)5*ptlly);
+	aux5 = cos(GPstlat1);
+	aux6 = 1./sqrt((double)1-equad*pow(sin(GPstlat1),(double)2));
+
+	ptllx = Prd*(ptllx - GPlon0)*aux5*aux6;
+	ptlly = Prd*(log(aux1) - aux2 + aux3 - aux4)*aux5*aux6;
+
+	ppc.X = (Real)ptllx;
+	ppc.Y = (Real)ptlly;
+
+	return ppc;
+
+}
+
+/********************************************************************
+		MERCATOR TO GEODETIC COORDINATES
+********************************************************************/
+CPoint pMerPC2LL (SProjection *Sp, CPoint ptpc)
+{
+	double	equad,			/*Squared eccentricity  */
+		t,			/* Ancillary variables */
+		xx,aux1,aux2,aux3,aux4,aux5,ptpcx,ptpcy;
+	short	GPhemis;
+	double	GPlat0,GPlon0,GPstlat1,GPstlat2;
+	double	Pflt,Prd;
+	CPoint	ppc;
+
+	ptpcx = (double)ptpc.X;
+	ptpcy = (double)ptpc.Y;
+
+	GPhemis = Sp->Proj.Gp->GPhemis;
+	GPlat0 = Sp->Proj.Gp->GPlat0;
+	GPlon0 = Sp->Proj.Gp->GPlon0;
+	GPstlat1 = Sp->Proj.Gp->GPstlat1;
+	GPstlat2 = Sp->Proj.Gp->GPstlat2;
+
+	Pflt = Sp->Pflt;
+	Prd = Sp->Prd;
+
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+
+	aux1 = cos(GPstlat1);
+	aux2 = 1./sqrt((double)1-equad*pow(sin(GPstlat1),(double)2));
+	ptpcx = ptpcx/(aux1*aux2);
+	ptpcy = ptpcy/(aux1*aux2);
+	t = exp(-ptpcy/Prd);
+	xx = PI/2. - 2.*atan(t);
+	aux3 = (equad/2.+5.*equad*equad/24.+equad*equad*equad/12.)*sin(4.*atan(t));
+	aux4 = -(7.*equad*equad/48.+29.*equad*equad*equad/240.)*sin(8.*atan(t));
+	aux5 = (7.*equad*equad*equad/120.)*sin(12.*atan(t));
+
+	ptpcy = xx + aux3 + aux4 + aux5;
+	ptpcx = ptpcx/Prd + GPlon0;
+	
+	if(Sp->Pid != Sp->Pout->Pid) ChangeLL(Sp,&ptpcx,&ptpcy);
+
+	ppc.X = (Real)ptpcx;
+	ppc.Y = (Real)ptpcy;
+
+	return ppc;
+}
+
+void pInitImage(SImage* Im,BBox* IBBox,short Iny,short Inx,
+	Real Irx, Real Iry, unsigned long  pixel,
+	unsigned long outsidevalue,unsigned char* tbuf,
+	SProjection* IProj)
+{
+	Im->IProj   = IProj;
+	Im->IBBox    = IBBox;
+	Im->Inx     = Inx;
+	Im->Iny     = Iny;
+	Im->Irx     = Irx;
+	Im->Iry     = Iry;
+	Im->pixel   = pixel;
+	Im->outsidevalue = outsidevalue;
+	Im->tbuf    = tbuf;
+}
+
+void pInterpolateIn (SImage *Imi, SImage *Imo, CPoint poll, CPoint pour, CPoint poul, CPoint polr, CPoint pill, CPoint piur, CPoint piul, CPoint pilr)
+{
+
+	short	x1, y1, x2, y2, i, j;
+	CPoint	paux;
+	Real	x,y;
+	Real	xl,	/* x at the beginning of the line */
+	yl,	/* y at the beginning of the line */
+	xr,	/* x at the end of the line */
+	yr,	/* y at the end of the line */
+	dx,	/* inner loop x increment  */
+	dy,	/* inner loop y increment */
+	dxl,	/* x increment at the beginning of line */
+	dyl,	/* y increment at the beginning of line */
+	dxr,	/* x increment at the end of line */
+	dyr;	/* y increment at the end of line */
+
+	SProjection* p = Imi->IProj;
+
+	CPoint	pou,pob,pol,por,pom;
+
+	CPoint	piu, pib, pil, pir, pim;
+
+	CPoint 	pxill, pxiul, pxilr, pxiur;
+
+	/*Check if input image contains desired area. If not, let's try another area. */
+
+	BBox da;
+
+	unsigned char	c;
+
+	pInitBBox(&da,poll.X,poll.Y,pour.X,pour.Y);
+	pBBoxRemapInOut(Imo->IProj,p,&da);
+
+	paux = pCoord2Index (Imo,&poul);
+	x1 = (short)(paux.X+.5);
+	y1 = (short)(paux.Y+.5);
+
+	paux = pCoord2Index (Imo,&polr);
+	x2 = (short)(paux.X+.5);
+	y2 = (short)(paux.Y+.5);
+
+	if (!pIntersects (&da,Imi->IBBox))
+	{
+		/*printf (" Out Image x1=%4d y1=%4d x2=%4d y2=%4d",x1,y1,x2,y2);*/
+		return;
+	}
+
+
+	/* If desired area on output image is too small,
+let's perform the interpolation point by point. */
+
+	pInitBBox(&da,poll.X,poll.Y,pour.X,pour.Y);
+	if (pWidth (&da) < 3.*Imo->Irx || pHeight (&da) < 3.*Imo->Iry)
+	{
+		y = poul.Y;
+		for (i=y1;i<=y2;i++,y-=Imo->Iry)
+		{
+			x = poul.X;
+			for (j=x1;j<=x2;j++,x+=Imo->Irx)
+			{
+				pInitPoint (&paux,x,y);
+				paux = pPC2LL(Imo->IProj,paux);
+				if (pTooBig (&paux)) continue;
+
+				paux = pLL2PC (p,paux);
+				if (pTooBig (&paux)) continue;
+
+				paux = pCoord2Index (Imi,&paux);
+				c = pInterAt(Imi,&paux);
+				pPut(Imo,i,j,c);
+			}
+		}
+		return;
+	}
+
+	/* Check if linear interpolation may be performed on input image 
+Evaluate point at middle of the edges and check if these points belong 
+to the edges in input image domain.If they belong,a linear
+interpolation may be performed, else subdivide output image in four
+quadrants and try interpolating again */
+
+	pInitPoint(&pou,(pour.X-poul.X)/2+poul.X,poul.Y);
+	pInitPoint(&pob,(polr.X-poll.X)/2.+poll.X, poll.Y);
+	pInitPoint(&pol,poll.X,(poul.Y-poll.Y)/2.+poll.Y);
+	pInitPoint(&por,polr.X, (pour.Y-polr.Y)/2.+polr.Y);
+	pInitPoint(&pom,(por.X-pol.X)/2.+pol.X, (pou.Y-pob.Y)/2.+pob.Y);
+
+	if (pProjEq(p,(Imo->IProj)))
+	{
+		piu.X = pou.X; 
+		piu.Y = pou.Y;
+		pib.X = pob.X; 
+		pib.Y = pob.Y;
+		pil.X = pol.X; 
+		pil.Y = pol.Y;
+		pir.X = por.X; 
+		pir.Y = por.Y;
+		pim.X = pom.X; 
+		pim.Y = pom.Y;
+	}
+	else
+	{
+		piu = pPC2LL (Imo->IProj,pou);
+		if (!pTooBig(&piu)) piu = pLL2PC(p,piu);
+		pib = pPC2LL (Imo->IProj,pob);
+		if (!pTooBig(&pib)) pib = pLL2PC(p,pib);
+		pil = pPC2LL (Imo->IProj,pol);
+		if (!pTooBig(&pil)) pil = pLL2PC(p,pil);
+		pir = pPC2LL (Imo->IProj,por);
+		if (!pTooBig(&pir)) pir = pLL2PC(p,pir);
+		pim = pPC2LL (Imo->IProj,pom);
+		if (!pTooBig(&pim)) pim = pLL2PC(p,pim);
+	}
+
+
+	/* Check special case for Satellite projection, when an area outside the globe 
+	is being remapped, therefore none of these points will have valid values and
+	we will give up. */
+
+	if (pTooBig(&piu) &&
+	    pTooBig(&pib) &&
+	    pTooBig(&pil) &&
+	    pTooBig(&pir) &&
+	    pTooBig(&piul) &&
+	    pTooBig(&piur) &&
+	    pTooBig(&pilr) &&
+	    pTooBig(&pill) &&
+	    pTooBig(&pim))
+	{
+		/*printf (" Out Globe x1=%4d y1=%4d x2=%4d y2=%4d",x1,y1,x2,y2);*/
+		return;
+	}
+
+	/* Check if middle points belong to the edges */
+	if (!pPointOnLine (Imi,&piul,&piur,&piu) ||
+	    !pPointOnLine (Imi,&pilr,&piur,&pir) ||
+	    !pPointOnLine (Imi,&pill,&pilr,&pib) ||
+	    !pPointOnLine (Imi,&pill,&piul,&pil))
+	{
+		XXX++;
+		if (pTooBig (&piu)) pInitPoint (&piu,MAXFLOAT,MAXFLOAT);
+		if (pTooBig (&pil)) pInitPoint (&pil,-MAXFLOAT,-MAXFLOAT);
+		if (pTooBig (&pim)) pInitPoint (&pim,MAXFLOAT,-MAXFLOAT);
+		pInterpolateIn (Imi, Imo, pol, pou, poul, pom, pil, piu, piul, pim);
+
+	/*		printf ("Quadrant 2 - Level %d",XXX); */
+		if (pTooBig (&piu)) pInitPoint (&piu,-MAXFLOAT,MAXFLOAT);
+		if (pTooBig (&pim)) pInitPoint (&pim,-MAXFLOAT,-MAXFLOAT);
+		if (pTooBig (&pir)) pInitPoint (&pir,MAXFLOAT,-MAXFLOAT);
+		pInterpolateIn (Imi, Imo, pom, pour, pou, por, pim, piur, piu, pir);
+
+	/*		printf ("Quadrant 3 - Level %d",XXX); */
+		if (pTooBig (&pil)) pInitPoint (&pil,-MAXFLOAT,MAXFLOAT);
+		if (pTooBig (&pim)) pInitPoint (&pim,MAXFLOAT,MAXFLOAT);
+		if (pTooBig (&pib)) pInitPoint (&pib,MAXFLOAT,-MAXFLOAT);
+		pInterpolateIn (Imi, Imo, poll, pom, pol, pob, pill, pim, pil, pib);
+
+	/*		printf ("Quadrant 4 - Level %d",XXX); */
+		if (pTooBig (&pim)) pInitPoint (&pim,-MAXFLOAT,MAXFLOAT);
+		if (pTooBig (&pir)) pInitPoint (&pir,MAXFLOAT,MAXFLOAT);
+		if (pTooBig (&pib)) pInitPoint (&pib,-MAXFLOAT,-MAXFLOAT);
+		pInterpolateIn (Imi, Imo, pob, por, pom, polr, pib, pir, pim, pilr);
+
+		XXX--;
+		return;
+	}
+
+	/* Start linear interpolation on input image. */
+	pxill = pCoord2Index (Imi,&pill);
+	pxiul = pCoord2Index (Imi,&piul);
+	pxilr = pCoord2Index (Imi,&pilr);
+	pxiur = pCoord2Index (Imi,&piur);
+
+	/* Evaluate the increments in x and y on both sides of input image */
+	dxl = (pxill.X-pxiul.X)/(Real)(y2-y1);
+	dyl = (pxill.Y-pxiul.Y)/(Real)(y2-y1);
+
+	dxr = (pxilr.X-pxiur.X)/(Real)(y2-y1);
+	dyr = (pxilr.Y-pxiur.Y)/(Real)(y2-y1);
+
+	/* Set initial values for x and y at beginning of line on input image */
+	xl = pxiul.X+.5;
+	yl = pxiul.Y+.5;
+
+	/* Set initial values for x and y at end of line on input image */
+	xr = pxiur.X;
+	yr = pxiur.Y;
+
+	/* Evaluate increments for the first line */
+	dx = (xr-xl)/(Real)(x2-x1);
+	dy = (yr-yl)/(Real)(x2-x1);
+
+	x = xl + .5;		/* round to nearest pixel */
+	y = yl + .5;		/* round to nearest pixel */
+
+	for (i=y1;i<=y2;i++)
+	{
+		for (j=x1;j<=x2;j++)
+		{
+			pInitPoint (&paux,x,y);
+			c = pInterAt(Imi,&paux);
+			pPut(Imo,i,j,c);
+			/* Imo->tbuf[Imo->Iny*i+j] = c; */
+			/* (*this)(i,j) = imi->InterpolateAt (paux);  bilinear */
+			/* (*this)(i,j) = (int)(y+.5);		 debugging */
+			/* (*this)(i,j) = (*imi)((int)y,(int)x);	 nearest */
+			x += dx;
+			y += dy;
+		}
+
+		xl += dxl;
+		x = xl + .5;		/* round to nearest pixel */
+		xr += dxr;
+		yl += dyl;
+		y = yl + .5;		/* round to nearest pixel */
+		yr += dyr;
+		dx = (xr-xl)/(Real)(x2-x1);
+		dy = (yr-yl)/(Real)(x2-x1);
+	}
+}
+
+unsigned char  pInterAt(SImage *Imi, CPoint *p)
+{
+	Real	x, y, dx, dy, dx1, dy1, p1, p2;
+	short	u, v;
+
+	x = p->X;
+	y = p->Y;
+
+	if (x < 0. || x >= (Real)(Imi->Inx-1) || y < 0. || y >= (Real)(Imi->Iny-1))
+{
+		return (unsigned char) Imi->outsidevalue;
+}
+
+	u = (short)x;	/* truncate to upper left position in a 2x2 grid */
+	v = (short)y;
+
+	dx = x - u;	/* distance from input position to upper left position */
+	dy = y - v;
+
+	dx1 = 1. - dx;	/* distance from input position to bottom right position */
+	dy1 = 1. - dy;
+
+	/* interpolate first col */
+	p1 = (Real) pGet(Imi,v,u)*dy1 + (Real) pGet(Imi,v+1,u)*dy;
+
+	/* interpolate second col */
+	p2 = (Real) pGet(Imi,v,u+1)*dy1 + (Real) pGet(Imi,v+1,u+1)*dy;
+
+	/* interpolate on row */
+	u = (short)(p1 * dx1 + p2 * dx + 0.5);
+	v = (u >> 1) & 0x00FF | 0x0080;
+	return (unsigned char) v;
+}
+
+void pPut(SImage* Im,short lin, short col, unsigned char c)
+{
+	unsigned char *p;
+
+	if (lin < Im->Iny && col< Im->Inx && lin >= 0 || col >= 0)
+	{
+		p = Im->tbuf;
+		p[(int) (lin*Im->Inx + col)] = c;
+	}
+	else
+	{
+		printf("Index problem:%d %d\n",lin,col);
+	}
+}
+
+unsigned char pGet(SImage* Im, short lin, short col)
+{
+	unsigned char *p;
+
+	if (lin >= Im->Iny || col>= Im->Inx || lin < 0 || col < 0)
+		return (unsigned char) Im->pixel;
+
+	p = Im->tbuf;
+
+	return p[(int) (lin*Im->Inx + col)];
+}
+
+CPoint pCoord2Index (SImage *Im, CPoint *p)
+{
+	Real	x, y;
+	CPoint 	q;
+	short	ss;
+
+	x = (p->X - Im->IBBox->Bll.X ) / Im->Irx;
+	y = (Im->IBBox->Bur.Y - p->Y ) / Im->Iry;
+	ss = Im->Inx;
+	if ( x > ss ) 
+		x = ss;
+	else if ( x < 0. )        x = 0.;
+	ss = Im->Iny;
+	if ( y > ss ) 
+		y = ss;
+	else if ( y < 0. )        y = 0.;
+
+	q.X = x;
+	q.Y = y;
+	return q;
+}
+
+void pRemapI (SImage *Imi, SImage *Imo)
+{
+	SProjection* p = Imi->IProj;
+
+	/* Evaluate coordinates of output image four corners */
+
+	CPoint	poll, pour, pill, piur, piul, pilr, poul, polr;
+
+	pInitPoint(&poll, Imo->IBBox->Bll.X, Imo->IBBox->Bll.Y);
+	pInitPoint(&pour, Imo->IBBox->Bur.X, Imo->IBBox->Bur.Y);
+	pInitPoint(&poul, poll.X,pour.Y);
+	pInitPoint(&polr,pour.X,poll.Y);
+
+	/* Evaluate corresponding coordinates of input image corners */
+
+	if (pProjEq(Imo->IProj,p))
+	{
+		piul.X = poul.X; 
+		piul.Y = poul.Y;
+		piur.X = pour.X; 
+		piur.Y = pour.Y;
+		pill.X = poll.X; 
+		pill.Y = poll.Y;
+		pilr.X = polr.X; 
+		pilr.X = polr.Y;
+	}
+	else
+	{
+		piul = pPC2LL (Imo->IProj,poul);
+		if (pTooBig(&piul)) pInitPoint(&piul,-MAXFLOAT,MAXFLOAT);
+		else
+		{
+			piul = pLL2PC(p,piul);
+			if (pTooBig(&piul)) pInitPoint(&piul,-MAXFLOAT,MAXFLOAT);
+		}
+		piur = pPC2LL (Imo->IProj,pour);
+		if (pTooBig(&piur)) pInitPoint(&piur,MAXFLOAT,MAXFLOAT);
+		else
+		{
+			piur = pLL2PC(p,piur);
+			if (pTooBig(&piur)) pInitPoint(&piur,MAXFLOAT,MAXFLOAT);
+		}
+		pill = pPC2LL (Imo->IProj,poll);
+		if (pTooBig(&pill)) pInitPoint(&pill,-MAXFLOAT,-MAXFLOAT);
+		else
+		{
+			pill = pLL2PC(p,pill);
+			if (pTooBig(&pill)) pInitPoint(&pill,-MAXFLOAT,-MAXFLOAT);
+		}
+		pilr = pPC2LL (Imo->IProj,polr);
+		if (pTooBig(&pilr)) pInitPoint(&pilr,MAXFLOAT,-MAXFLOAT);
+		else
+		{
+			pilr = pLL2PC(p,pilr);
+			if (pTooBig(&pilr)) pInitPoint(&pilr,MAXFLOAT,-MAXFLOAT);
+		}
+
+	}
+	/* Start generating grid */
+/*
+	printf("Start InterpolateIn:%f,%f,%f,%f\n",poll.X,poll.Y,pour.X,pour.Y);
+*/
+	XXX = 0;
+	pInterpolateIn (Imi, Imo, poll, pour, poul, polr, pill, piur, piul, pilr);
+}
+
+void pInitRemap(SImage *Imo, BBox *IBBox, SProjection *Sp, Real rx, Real ry, unsigned char **tmpbuf, SImage *Imi)
+{
+	unsigned char	*bufp,*bufc;
+	Real 			y1, y2, x1, x2, incx, incy, resx, resy;
+	short			nx,ny;
+	int				i;
+
+	Imo->IProj 	= Sp;
+	Imo->IBBox	= IBBox;
+	if( (int) rx == 0 ) resx = Imi->Irx;
+	else	resx = rx;
+	if( (int) ry == 0 ) resy = Imi->Iry;
+	else	resy = ry;
+	x1 = IBBox->Bll.X;
+	y1 = IBBox->Bll.Y;
+	x2 = IBBox->Bur.X;
+	y2 = IBBox->Bur.Y;
+	nx = (short) (ABS((x2-x1)/resx) + 1.);
+	ny = (short) (ABS((y2-y1)/resy) + 1.);
+	Imo->Inx = nx;
+	Imo->Iny = ny;
+	incx = (x2-x1)/(Real)(nx-1);
+	incy = (y2-y1)/(Real)(ny-1);
+	Imo->Irx = ABS (incx);
+	Imo->Iry = ABS (incy);
+	Imo->pixel   = Imi->pixel;
+	Imo->outsidevalue = Imi->outsidevalue;
+
+	bufp = (unsigned char *)malloc( (int)(sizeof(unsigned char)*nx*ny));
+	bufc = bufp;
+	for (i=0; i< (int)nx*ny;i++)
+		*bufc++ = (unsigned char) 0;
+	*tmpbuf = bufp;
+	Imo->tbuf = bufp;
+
+	pRemapI(Imi,Imo);
+}
diff --git a/src/libUtil/proj_braz.hpp b/src/libUtil/proj_braz.hpp
new file mode 100644
index 0000000..5f78d0d
--- /dev/null
+++ b/src/libUtil/proj_braz.hpp
@@ -0,0 +1,334 @@
+// This is a "copy" of the file ~magics/c/proj_braz.h .
+// The reason for this duplicity is to avoid to call
+// Magics routines within libUtil.
+// For the new Magics version, both files should be 
+// replaced by a single C++ version.
+
+#ifndef proj_braz_DEFINED
+#define proj_braz_DEFINED
+
+#ifdef REAL_IS_DOUBLE
+typedef double Real;
+#else
+typedef float Real;
+#endif
+
+typedef struct CPoint
+{
+	Real	X,Y;		/*  point location */
+} CPoint;
+
+
+typedef struct
+{
+        CPoint Bll, Bur;
+
+} BBox;
+
+#ifdef FORTRAN_NO_UNDERSCORE
+#define pimii1_ pimii1
+#define pimii2_ pimii2
+#define pimin1_ pimin1
+#define pimind_ pimind
+#define pimp1_ pimp1
+#define pimp2_ pimp2
+#define pimg1_ pimg1
+#define pimg2_ pimg2
+#define pims1_ pims1
+#define pims2_ pims2
+#define pl2p1_ pl2p1
+#define pl2p2_ pl2p2
+#define pp2l1_ pp2l1
+#define pp2l2_ pp2l2
+#define pmvimg_ pmvimg
+#define premap_ premap
+#define pdeal_ pdeal
+#define penqi_ penqi
+#define penqc_ penqc
+#define penq1i_ penq1i
+#endif
+
+
+#ifndef TRUE
+#define	TRUE		1
+#endif
+
+#ifndef FALSE
+#define FALSE		0
+#endif
+
+#ifndef NULL
+#define NULL		0
+#endif
+
+#ifndef ABS
+#define ABS(x) 	( ((x) >= 0) ? (x) : -(x) )
+#endif
+
+#ifndef MIN
+#define MIN(x, y) 	( ((x) < (y)) ? (x) : (y) )
+#endif
+
+#ifndef MAX
+#define MAX(x, y) 	( ((x) > (y)) ? (x) : (y) )
+#endif
+
+#ifndef MAXFLOAT
+#define MAXFLOAT 3.4E+35
+#endif
+
+#ifndef BIGFLOAT
+#define BIGFLOAT 3.4E+35
+#endif
+
+/*  Plotting modes for DigitalModel */
+
+#define M_NAME_MAX	100
+#define CONTOUR		1
+#define SHADING		2
+#define GRID_VALUES	4
+#define WIND_ARROWS	8
+#define WIND_FLAGS	16
+#define WIND_STREAM	32
+#define WIND_ISOTACHS 	64
+
+#define	PI  3.14159265358979323846
+#define	CDR 0.017453293	/*  Conversion factor: degrees to radians */
+#define	CRD 57.295779513	/*  Conversion factor: radians to degrees */
+#define	EARTH_RADIUS  6378160.
+#define	FLATTENING  0.0033528
+#define NSTEPS  16.
+#define PROJNONE  0
+#define PROJUTM  2
+#define PROJMERCATOR  3
+#define PROJGAUSS  4
+#define PROJLAMBERTMILLION  5
+#define PROJLAMBERT  6
+#define PROJPOLYCONIC  7
+#define PROJCYLINDRICAL  0
+#define PROJPOLAR  9
+#define PROJBIPOLAR  10
+#define PROJALBERS  11
+#define PROJMILLER  12
+#define PROJSATELLITE  90
+#define PROJPOLY  254
+#define GENERALPROJ  255
+
+
+
+#define PDATUM  0x1 
+#define PHEMISPHERE  0x2 
+#define PLATITUDE  0x4 
+#define PLONGITUDE  0x8 
+#define PFIRSTLAT  0x10 
+#define PSECDLAT  0x20 
+
+//F
+#if 0
+#define MAGEnqi(par,iv) penqi_(par,iv,strlen(par))
+#define MAGEnqc(par,cv) \
+        {       int i;                                          \
+                memset(cv, '\0', sizeof(cv));                   \
+                penqc_(par,cv,strlen(par),(sizeof(cv)-1));      \
+                for (i = sizeof(cv)-1; i > 0; i--)              \
+                        if (cv[i] == ' ') cv[i] = '\0';         \
+        }
+
+#define MAGEnq1i(paramtr, iarray, size, out_size) \
+	{							\
+		int vsize = size;				\
+		penq1i_(paramtr, iarray, &vsize, out_size, strlen(paramtr));\
+	}
+#endif
+
+typedef struct
+{
+	short		Dproj;	/* projection code */
+	char*		Dname;	/* planimetric datum name */
+
+	Real		Ddx,	/* ellipsoid translation along x axis */
+	Ddy,	/* ellipsoid translation along y axis */
+	Ddz;	/* ellipsoid translation along z axis */
+
+	double		Drd,	/* earth equatorial radius */
+	Dflt;	/* earth flattening */
+
+} Datum ;
+
+typedef struct
+{
+	short		GPhemis;	/* hemisphere : polar stereo*/
+	/* all these parameters must be in*/
+	/* radians*/
+	double		GPlat0,		/* origin parallel    */ 
+			GPlon0,		/* origin meridian*/
+	GPstlat1,	/* standard parallel*/
+	GPstlat2;	/* standard parallel	*/
+} GeneralProjection ;
+
+typedef GeneralProjection PolarStereo;
+typedef GeneralProjection CylindEquid;
+typedef GeneralProjection NoProjection;
+typedef GeneralProjection Mercartor;
+
+typedef struct
+{
+	double		SPri,	/* Sensor angle resolution (y axis, radians)*/
+	SPrj,	/* Sensor angle resolution (x axis, radians)*/
+	SPis,	/* Y-coordinate of sub-satellite point */
+	SPjs,	/* X-coordinate of sub-satellite point*/
+	SPla0,	/* Latitude of sub-satellite point  (radians)*/
+	SPlo0,	/* Longitude of sub-satellite point (radians)*/
+	SPrs,	/* Radii of satellite (meters)*/
+	SPscn,	/* Scaning mode: 0-WE/NS, 1-SN/EW*/
+	SPyaw;	/* The orientation of the grid i.e. the angle*/
+	/* in radians between the increasing y axis*/
+	/* and the meridian of the sub-satellite point */
+	/* in the direction of increasing latitude.*/
+} Satellite;
+
+typedef struct SProjection
+{
+
+	char*		Pname;		/* projection name */
+	char*		Pdname;		/* datum name */
+	int		Pid;		/* projection id on database */
+	short		Pcode,		/* projection code */
+	Pgbcode,	/* grib projection code */
+	Pgbcode1,	/* grib internal general projection code */
+	Pbits,		/* mask of necessary parameters */
+	Pdatum;		/* planimetric datum */
+
+	Real		Pdx,		/* ellipsoid translation along x axis */
+	Pdy,		/* ellipsoid translation along y axis */
+	Pdz;		/* ellipsoid translation along z axis*/
+
+	double		Prd,		/* earth equatorial radius in meters. */
+	Pflt;		/* earth flattening*/
+
+	double		Poffx,		/* x offset*/
+	Poffy;		/* y offset*/
+
+	struct SProjection 	*Pout;		/* projection output*/
+
+	union {
+		GeneralProjection*	Gp;		/* General Projectioon*/
+		Satellite*			Sat;	/* Satellite Projectioon */
+		PolarStereo*		Ps;
+		Mercartor*			Mc;
+		NoProjection*		Np;
+		CylindEquid*		Ce;
+	} Proj;
+		
+} SProjection;
+
+
+ typedef struct
+{
+	char	id[13];		/* image identifier */
+
+	short	satellite,	/* satellite identifier xxxx */
+	band,		/* spectral band */
+	year,	
+	month,
+	day,
+	hour,
+	minutes,
+	seconds,
+	nx,		/* number of columns */
+	ny,		/* number of lines */
+	xp,		/* column of sub-satellite point */
+	yp,		/* line of sub-satellite point */
+	x0,		/* image origin column */
+	y0,		/* image origin line */
+		path,		/*  orbit number xxxx */
+	row,		/*  image number xxxx */
+	plevel,		/* processing level */
+	vc,
+	ac;
+
+	Real	lap,		/*  latitude of sub-satellite point */
+	lop,		/*  longitude of sub-satellite point */
+	yaw,		/* orientation angle ... definir grau ou rad */
+	nr,		/*  altitude or radius of satellite in meters */
+	rx,		/* / horizontal resolution in meters */
+	ry;		/*  vertical resolution in meters */
+} ImageDoc;
+ static int XXX = 0;
+typedef struct
+{
+        SProjection*    IProj;  /* pointer to projection */
+        BBox*            IBBox;   /* image bounding area*/
+        short           Inx,    /* no. of columns*/
+        Iny;    /* no. of lines*/
+        Real            Irx,    /* horizontal resolution*/
+        Iry;    /* vertical resolution*/
+
+        /* Internal controls of the image*/
+
+        unsigned long   pixel;          /* pixel out of image*/
+        unsigned long   outsidevalue;   /* Default value to pixels outside Image
+*/
+        unsigned char   *tbuf;          /* buffer for transfer data*/
+
+} SImage;
+
+
+// Functions definitions
+Real pWidth(BBox*);
+Real pHeight(BBox*);
+short pContains(BBox*, CPoint*);
+short pIntersects(BBox*, BBox*);
+void pInitBBox(BBox*, Real, Real, Real, Real);
+void pBBoxRemapInOut (SProjection*, SProjection*, BBox*);
+void pBBoxRemap (SProjection*, BBox*);
+void pimii1_(Real, Real, Real, Real, int, int, Real, Real, int, int, unsigned char*);
+void pimii2_(Real, Real, Real, Real, int, int, Real, Real, int, int, unsigned char*);
+void pll2ic(Real&, Real&);
+void pl2p1_(Real*, Real*);
+void pl2p2_(Real*, Real*);
+void pp2l1_(Real*, Real*);
+void pp2l2_(Real*, Real*);
+void premap_();
+void pdeal_();
+void pimin1_();
+void pimind_(int, char*, Real, Real, Real, double, double);
+void pimp1_(char*, char*, int, int, int, int, Real, Real, Real, double, double, double, double);
+void pimp2_(char*, char*, int, int, int, int, Real, Real, Real, double, double, double, double);
+void pimg1_(int, double, double, double, double);
+void pimg2_(int, double, double, double, double);
+void pims1_(double, double, double, double, double, double, double, double, double);
+void pims2_(double, double, double, double, double, double, double, double, double);
+
+short pTooBig(CPoint*);
+short pPointOnLine(SImage*, CPoint*, CPoint*, CPoint*);
+CPoint pMaxPoint(CPoint*, CPoint*);
+CPoint pMinPoint(CPoint*, CPoint*);
+void pInitPoint(CPoint*, Real, Real);
+void pInitDatum(Datum*, short, char*, Real, Real, Real,double, double);
+void pInitProj(SProjection*, char*, char*, int, short, short, Real, Real, Real, double, double, double, double);
+short pProjEq(SProjection*, SProjection*);
+void pInitGen(GeneralProjection*, short, double, double, double, double);
+void pInitSat(Satellite*, double, double, double, double, double, double, double, double, double);
+CPoint pLL2PC(SProjection*, CPoint);
+CPoint pPC2LL(SProjection*, CPoint);
+void ChangeLL(SProjection*, double*, double*);	
+CPoint pSatLL2PC(SProjection*, CPoint);
+CPoint pSatPC2LL(SProjection*, CPoint);
+CPoint pCylLL2PC(SProjection*, CPoint);
+CPoint pCylPC2LL(SProjection*, CPoint);
+CPoint pPolLL2PC(SProjection*, CPoint);
+CPoint pPolPC2LL(SProjection*, CPoint);
+CPoint pMerLL2PC(SProjection*, CPoint);
+CPoint pMerPC2LL(SProjection*, CPoint);
+void pInitImage(SImage*, BBox*, short, short, Real, Real, unsigned long, unsigned long, unsigned char*, SProjection*);
+void pInterpolateIn (SImage*, SImage*, CPoint, CPoint, CPoint, CPoint, CPoint, CPoint, CPoint, CPoint);
+unsigned char pInterAt(SImage*, CPoint*);
+void pPut(SImage*, short, short, unsigned char);
+unsigned char pGet(SImage*, short, short);
+CPoint pCoord2Index (SImage*, CPoint*);
+void pRemapI (SImage*, SImage*);
+void pInitRemap(SImage*, BBox*, SProjection*, Real, Real, unsigned char**, SImage*);
+
+#endif
+// proj_braz_DEFINED
diff --git a/src/libUtil/stypes.hpp b/src/libUtil/stypes.hpp
new file mode 100644
index 0000000..626adc9
--- /dev/null
+++ b/src/libUtil/stypes.hpp
@@ -0,0 +1,48 @@
+#ifndef stypes_H
+#define stypes_H
+
+#include <gdefines.h>
+
+#define EXTCF( rtn, args ) extern "C" { rtn args; }
+
+#ifndef TRUE
+#define	TRUE		1
+#endif
+
+#ifndef FALSE
+#define FALSE		0
+#endif
+
+#ifndef NULL
+#define NULL		0
+#endif
+
+#ifndef MAXFLOAT
+const float MAXFLOAT =	3.4E37;
+#endif
+
+const short PROJNONE = 0;
+const short PROJUTM = 2;
+const short PROJMERCATOR = 3;
+const short PROJGAUSS = 4;
+const short PROJLAMBERTMILLION = 5;
+const short PROJLAMBERT = 6;
+const short PROJPOLYCONIC = 7;
+const short PROJCYLINDRICAL = 0;
+const short PROJPOLAR = 9;
+const short PROJBIPOLAR = 10;
+const short PROJALBERS = 11;
+const short PROJMILLER = 12;
+const short PROJSATELLITE = 90;
+const short PROJPOLY = 254;
+const short GENERALPROJ = 255;
+
+// Classes
+
+class SProjection;
+class Box;
+class Point;
+class GribData;
+class GribFile;
+
+#endif
diff --git a/src/libUtil/xec.h b/src/libUtil/xec.h
new file mode 100644
index 0000000..51a5332
--- /dev/null
+++ b/src/libUtil/xec.h
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+
+#include <stdio.h>
+#define ARG_DEF(n)			Arg al[n];int ac=0
+#define SetArg(arg,val)     XtSetArg(al[ac],arg,val);ac++;
+#define SetValues(w)     	XtSetValues(w,al,ac);ac=0;
+#define GetValues(w)     	XtGetValues(w,al,ac);ac=0;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+/* xec_Cursor.c */
+void xec_SetWatchCursor(Widget w);
+void xec_ResetCursor(Widget w);
+
+/* xec_Label.c */
+void xec_SetLabel(Widget w, const char *title);
+void xec_VaSetLabel(Widget w, const char *fmt, ...);
+
+/* xec_List.c */
+void xec_ClearList(Widget w);
+void xec_RemoveListItem(Widget w, const char *p);
+void xec_AddListMax(Widget w, int max, const char *p);
+void xec_VaAddListMax(Widget w, int max, char *fmt, ...);
+void xec_AddListItem(Widget w, const char *p);
+void xec_VaAddListItem(Widget w, const char *fmt, ...);
+void xec_SetListItems(Widget w, XmString *list, int count);
+int xec_DumpList(FILE *f, const char *fmt, Widget w);
+Boolean xec_ListSearch(Widget w, char *word, Boolean nocase, Boolean fromstart, Boolean wrap);
+void xec_AddFontListItem(Widget list, const char *buffer, Boolean bold);
+
+/* xec_Regexp.c */
+void xec_compile(const char *w);
+int xec_step(const char *p);
+
+/* xec_Strings.c */
+XmString xec_NewString(const char *s);
+void xec_BuildXmStringList(XmString **list, const char *p, int *count);
+void xec_FreeXmStringList(XmString *list, int count);
+char *xec_GetString(XmString string);
+
+/* xec_Text.c */
+int regexp_find(char *word, char *buffer, Boolean nocase, int *from, int *to);
+Boolean xec_TextSearch(Widget w, char *word, Boolean nocase, Boolean fromstart, Boolean wrap);
+char *xec_GetText(Widget w, char *buf);
+int xec_LoadText(Widget Text, const char *fname, Boolean include);
+int xec_SaveText(Widget w, const char *fname);
+int xec_DumpText(FILE *fp, Widget w);
+void xec_PrintText(Widget w, const char *cmd);
+void xec_ReplaceTextSelection(Widget w, const char *p, Boolean sel);
+
+/* xec_Widget.c */
+void *xec_GetUserData(Widget w);
+void xec_SetUserData(Widget w, void *p);
+void xec_SetColor(Widget w, Pixel p, const char *which);
+void xec_ShowWidget(Widget w);
+void xec_Invert(Widget w);
+void xec_ManageAll(Widget w);
+void xec_UnmanageAll(Widget w);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
diff --git a/src/metview_config.h b/src/metview_config.h
new file mode 100644
index 0000000..11c80a7
--- /dev/null
+++ b/src/metview_config.h
@@ -0,0 +1,207 @@
+/* src/metview_config.h.  Generated from metview_config.h.in by configure.  */
+/* src/metview_config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `expat' library (-lexpat). */
+#define HAVE_LIBEXPAT 1
+
+/* Define to 1 if you have the `gdbm' library (-lgdbm). */
+#define HAVE_LIBGDBM 1
+
+/* Define to 1 if you have the `proj' library (-lproj). */
+#define HAVE_LIBPROJ 1
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#define HAVE_LIBPTHREAD 1
+
+/* Define to 1 if you have the `X11' library (-lX11). */
+#define HAVE_LIBX11 1
+
+/* Define to 1 if you have the `Xext' library (-lXext). */
+#define HAVE_LIBXEXT 1
+
+/* Define to 1 if you have the `Xm' library (-lXm). */
+#define HAVE_LIBXM 1
+
+/* Define to 1 if you have the `Xmu' library (-lXmu). */
+#define HAVE_LIBXMU 1
+
+/* Define to 1 if you have the `Xpm' library (-lXpm). */
+#define HAVE_LIBXPM 1
+
+/* Define to 1 if you have the `Xt' library (-lXt). */
+#define HAVE_LIBXT 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <Xm/Xm.h> header file. */
+#define HAVE_XM_XM_H 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Turn on 32 bit addressing */
+/* #undef METVIEW_32BIT */
+
+/* Turn on any additional debugging support */
+#define METVIEW_DEBUG 1
+
+/* Turn off the Emoslib support */
+#define METVIEW_EMOS 1
+
+/* Turn on experimental components used only in developments. */
+/* #undef METVIEW_EXPERIMENTAL */
+
+/* Extra data modules used outside ECMWF. */
+/* #undef METVIEW_EXTERNAL */
+
+/* Turn on the graphical user interface */
+#define METVIEW_GUI 1
+
+/* Turn on the INPE support */
+#define METVIEW_INPE 1
+
+/* Install path. */
+#define METVIEW_INSTALL_PATH "/tmp/cgi/mv4_maintenance_install"
+
+/* Turn on Magics++ related modules. */
+#define METVIEW_MAGICS 1
+
+/* Turn on MARS related modules. */
+#define METVIEW_MARS 1
+
+/* Turn on the MARS catalog support. */
+#define METVIEW_MARS_CATALOG 1
+
+/* Turn on the MARS ODB support */
+#define METVIEW_MARS_ODB 1
+
+/* Name of this package. */
+#define METVIEW_NAME "Metview"
+
+/* Turn on the OBSTAT support */
+#define METVIEW_OBSTAT 1
+
+/* Turn on the ODB support */
+#define METVIEW_ODB 1
+
+/* Turn on the ODB-2 support */
+#define METVIEW_ODB_NEW 1
+
+/* Turn on the ODB-1 support */
+#define METVIEW_ODB_OLD 1
+
+/* Turn on the ODB plotting */
+#define METVIEW_ODB_PLOT 1
+
+/* Turn on the OPERA radar support */
+#define METVIEW_OPERA 1
+
+/* Turn on any additional profiling information */
+/* #undef METVIEW_PROF */
+
+/* Turn on Qt related modules. */
+#define METVIEW_QT 1
+
+/* Turn on QDebug output in Qt related modules. */
+/* #undef METVIEW_QTDEBUG */
+
+/* Release date of this version. */
+#define METVIEW_RELEASE_DATE "04-July-2013"
+
+/* Turn on the SCM auxillary files */
+/* #undef METVIEW_SCM_AUX */
+
+/* Name of installation site. */
+#define METVIEW_SITE "ecmwf"
+
+/* Version of Metview. */
+#define METVIEW_VERSION "4.3.11"
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+#define YYTEXT_POINTER 1
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
diff --git a/src/metview_config.h.in b/src/metview_config.h.in
new file mode 100644
index 0000000..602e76a
--- /dev/null
+++ b/src/metview_config.h.in
@@ -0,0 +1,206 @@
+/* src/metview_config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `expat' library (-lexpat). */
+#undef HAVE_LIBEXPAT
+
+/* Define to 1 if you have the `gdbm' library (-lgdbm). */
+#undef HAVE_LIBGDBM
+
+/* Define to 1 if you have the `proj' library (-lproj). */
+#undef HAVE_LIBPROJ
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#undef HAVE_LIBPTHREAD
+
+/* Define to 1 if you have the `X11' library (-lX11). */
+#undef HAVE_LIBX11
+
+/* Define to 1 if you have the `Xext' library (-lXext). */
+#undef HAVE_LIBXEXT
+
+/* Define to 1 if you have the `Xm' library (-lXm). */
+#undef HAVE_LIBXM
+
+/* Define to 1 if you have the `Xmu' library (-lXmu). */
+#undef HAVE_LIBXMU
+
+/* Define to 1 if you have the `Xpm' library (-lXpm). */
+#undef HAVE_LIBXPM
+
+/* Define to 1 if you have the `Xt' library (-lXt). */
+#undef HAVE_LIBXT
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <Xm/Xm.h> header file. */
+#undef HAVE_XM_XM_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Turn on 32 bit addressing */
+#undef METVIEW_32BIT
+
+/* Turn on any additional debugging support */
+#undef METVIEW_DEBUG
+
+/* Turn off the Emoslib support */
+#undef METVIEW_EMOS
+
+/* Turn on experimental components used only in developments. */
+#undef METVIEW_EXPERIMENTAL
+
+/* Extra data modules used outside ECMWF. */
+#undef METVIEW_EXTERNAL
+
+/* Turn on the graphical user interface */
+#undef METVIEW_GUI
+
+/* Turn on the INPE support */
+#undef METVIEW_INPE
+
+/* Install path. */
+#undef METVIEW_INSTALL_PATH
+
+/* Turn on Magics++ related modules. */
+#undef METVIEW_MAGICS
+
+/* Turn on MARS related modules. */
+#undef METVIEW_MARS
+
+/* Turn on the MARS catalog support. */
+#undef METVIEW_MARS_CATALOG
+
+/* Turn on the MARS ODB support */
+#undef METVIEW_MARS_ODB
+
+/* Name of this package. */
+#undef METVIEW_NAME
+
+/* Turn on the OBSTAT support */
+#undef METVIEW_OBSTAT
+
+/* Turn on the ODB support */
+#undef METVIEW_ODB
+
+/* Turn on the ODB-2 support */
+#undef METVIEW_ODB_NEW
+
+/* Turn on the ODB-1 support */
+#undef METVIEW_ODB_OLD
+
+/* Turn on the ODB plotting */
+#undef METVIEW_ODB_PLOT
+
+/* Turn on the OPERA radar support */
+#undef METVIEW_OPERA
+
+/* Turn on any additional profiling information */
+#undef METVIEW_PROF
+
+/* Turn on Qt related modules. */
+#undef METVIEW_QT
+
+/* Turn on QDebug output in Qt related modules. */
+#undef METVIEW_QTDEBUG
+
+/* Release date of this version. */
+#undef METVIEW_RELEASE_DATE
+
+/* Turn on the SCM auxillary files */
+#undef METVIEW_SCM_AUX
+
+/* Name of installation site. */
+#undef METVIEW_SITE
+
+/* Version of Metview. */
+#undef METVIEW_VERSION
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+#undef YYTEXT_POINTER
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
diff --git a/src/uPlot/AverageView.cc b/src/uPlot/AverageView.cc
new file mode 100644
index 0000000..15060b1
--- /dev/null
+++ b/src/uPlot/AverageView.cc
@@ -0,0 +1,163 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Methods for class AverageView
+//
+// This is the exemplar object for the AverageView class
+// 
+//
+#include "AverageView.h"
+
+#include <MvRequestUtil.hpp>
+
+#include "ObjectList.h"
+#include "Root.h"
+
+//--------------------------------------------------------
+class AverageViewFactory : public PlotModViewFactory 
+{
+
+    // --  Virtual Constructor - Builds a new AverageView
+    virtual PlotModView* Build ( Page& page,
+                                 const MvRequest& contextRequest,
+                                 const MvRequest& setupRequest )
+    {
+        // Expand request
+        MvRequest expReq = ObjectList::ExpandRequest(contextRequest,EXPAND_DEFAULTS);
+        return new AverageView ( page, expReq, setupRequest );
+    }
+
+public:
+
+    AverageViewFactory() : PlotModViewFactory ( "AverageView" ) {}
+};
+
+static AverageViewFactory averageViewFactoryInstance;
+
+//------------------------------------------------------------
+
+AverageView::AverageView ( Page& owner,
+                           const MvRequest& viewRequest,
+                           const MvRequest& setupRequest ): 
+             CommonXSectView ( owner, viewRequest, setupRequest )
+{
+    ApplicationName("PM_AVERAGE");
+    SetVariables(viewRequest,true);
+}
+
+AverageView::AverageView (const AverageView &old) :
+             CommonXSectView(old),
+             axisType_(old.axisType_)
+{
+}
+
+string AverageView::Name()
+{
+    int id = Owner().Id();
+    string name =  (const char*)ObjectInfo::ObjectName ( viewRequest_, "AverageView", id );
+
+    return name ;
+}
+
+void 
+AverageView::DescribeYourself ( ObjectInfo& description )
+{
+    set<Cached> skipSet;
+
+    // convert my request to macro
+    description.ConvertRequestToMacro ( viewRequest_, PUT_END,
+                                        MacroName().c_str(),"maverageview", skipSet);
+
+    description.PutNewLine (" " );
+}
+
+// In request is either a new viewrequest, or a data info request.
+void AverageView::SetVariables(const MvRequest &in, bool resetMembers)
+{
+    // Called with a viewRequest
+    if ( resetMembers )
+    {
+        latMin_ = in("AREA",0);
+        latMax_ = in("AREA",2);
+        lonMin_ = in("AREA",1);
+        lonMax_ = in("AREA",3);
+
+        if ( strcmp(in("DIRECTION"),"NS")  &&
+             strcmp(in("DIRECTION"),"NORTH SOUTH") )
+            axisType_ = "LATITUDE";
+        else
+            axisType_ = "LONGITUDE";
+    }
+    else // Called with a netCDF request.
+    {
+        viewRequest_.unsetParam("AREA");
+        viewRequest_.addValue("AREA",(double)in("AREA",0));
+        viewRequest_.addValue("AREA",(double)in("AREA",1));
+        viewRequest_.addValue("AREA",(double)in("AREA",2));
+        viewRequest_.addValue("AREA",(double)in("AREA",3));
+
+        if  ( (const char*)in("MODE") && strcmp(in("MODE"),"AVERAGE_EW" ) == 0)
+        {
+            viewRequest_("DIRECTION") = "NS";
+            axisType_ = "LONGITUDE";
+        }
+        else
+        {
+            viewRequest_("DIRECTION") = "EW";
+            axisType_ = "LATITUDE";
+        }
+    }
+}
+
+void AverageView::UpdateView ()
+{
+    // It has already been updated
+    if ( string(viewRequest_.getVerb()) == CARTESIANVIEW )
+        return;
+
+    // Translate geographical coordinates
+    MvRequest cartView("CARTESIANVIEW");
+    cartView("X_AUTOMATIC") = "off";
+    cartView("X_AXIS_TYPE") = axisType_.c_str();
+    if ( axisType_ == "LATITUDE" )
+    {
+        cartView("X_MIN") = latMin_;
+        cartView("X_MAX") = latMax_;
+    }
+    else
+    {
+        cartView("X_MIN") = lonMin_;
+        cartView("X_MAX") = lonMax_;
+    }
+
+    // Translate Y coordinates
+    cartView("Y_AUTOMATIC") = "off";
+    const char* log = viewRequest_("PRESSURE_LEVEL_AXIS");
+    if ( log && strcmp(log,"LOG") == 0)
+        cartView("Y_AXIS_TYPE") = "logarithmic";
+    else
+        cartView("Y_AXIS_TYPE") = "regular";
+
+    cartView("Y_MIN")       = yMin_;
+    cartView("Y_MAX")       = yMax_;
+
+    // Copy axis definition
+    cartView.setValue("HORIZONTAL_AXIS",viewRequest_.getSubrequest("HORIZONTAL_AXIS"));
+    cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("VERTICAL_AXIS"));
+
+    // Copy PAGE and SUBPAGE definition
+    CopySomeParameters( viewRequest_,cartView,"PAGE" );
+    CopySomeParameters( viewRequest_,cartView,"SUBPAGE" );
+
+    // Update request
+    viewRequest_ = cartView;;
+
+    // Indicate that the plotting tree needs to be rebuilt
+    Root::Instance().Refresh(false);
+}
diff --git a/src/uPlot/AverageView.h b/src/uPlot/AverageView.h
new file mode 100644
index 0000000..0323572
--- /dev/null
+++ b/src/uPlot/AverageView.h
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  AverageView
+//
+// .AUTHOR:
+//  Geir Austad
+//      Modified by Fernando Ii 03-2012
+//
+// .SUMMARY:
+//  Describes the AverageView class, which handles the
+//  matching issues related to the Average View
+//
+//
+// .CLIENTS:
+//  DropAction
+//
+// .RESPONSIBILITY:
+//
+////  - When receiving a drop or a request in a page associated
+//    to a service view, call the service to process the request
+//
+//  - When the application is finished, pass the request sent
+//    by the application to the presentable, which then should 
+//    perform the data matching
+//
+//  
+// .COLLABORATORS:
+//  MvRequest - extracts information from the request
+//  MvTask - communication with METVIEW modules
+//
+// .DESCENDENT:
+//
+// .RELATED:
+//  Presentable, SuperPage, Page, DataObject
+//
+// .ASCENDENT:
+// CommonXSectView
+//
+
+#ifndef AverageView_H
+#define AverageView_H
+
+#include "CommonXSectView.h"
+
+class AverageView: public CommonXSectView {
+
+public:
+
+    // -- Constructors
+    AverageView( Page&, const MvRequest&, const MvRequest& );
+    AverageView(const AverageView&);
+    virtual PlotModView *Clone() const { return new AverageView(*this); }
+
+    // -- Destructor
+    ~AverageView() {} 
+
+    // -- Methods
+    // -- Overriden from CommonXSectView class
+    virtual string Name();
+
+    // Draw the background (axis )
+    virtual void DrawBackground ( ) {}
+
+    // Describe the contents of the view
+    virtual void DescribeYourself ( ObjectInfo& );
+
+    // Initialize some variable members
+    virtual void SetVariables(const MvRequest&, bool);
+
+    // Update view
+    virtual void UpdateView ();
+
+private:
+
+    string axisType_;
+
+    // No assignment
+    AverageView& operator=(const AverageView&);
+};
+
+#endif
diff --git a/src/uPlot/BufrDecoder.cc b/src/uPlot/BufrDecoder.cc
new file mode 100644
index 0000000..c3af8c7
--- /dev/null
+++ b/src/uPlot/BufrDecoder.cc
@@ -0,0 +1,483 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "BufrDecoder.h"
+#include "MatchingInfo.h"
+#include "PlotMod.h"
+
+// =====================================================
+// class BufrDecoderFactory - builds  decoders
+//
+class BufrDecoderFactory : public DecoderFactory
+{
+  // Virtual Constructor - Builds a new BufrDecoder
+  virtual Decoder* Build ( const MvRequest& inRequest )
+    { return new BufrDecoder ( inRequest ); }
+
+public:
+  BufrDecoderFactory() : DecoderFactory("BufrDecoder") {}
+};
+
+static BufrDecoderFactory bufrDecoderFactoryInstance;
+
+
+//---------------------------------------------------------------
+// Helper class to find out whether to rewrite the grouped files,
+// or use existing ones. A static map keeps the information 
+// about original files, and of which grouped files have been created
+// for these files.
+struct BufrInfo
+{
+  time_t mtime_;
+  int    groupInterval_;
+  GroupInfoMap groupInfo_;
+};
+typedef multimap<string,BufrInfo, less<string> > BufrInfoMap;
+typedef BufrInfoMap::iterator BufrInfoIterator;
+
+// Static map of existing grouped files.
+static BufrInfoMap bufrInfoMap;
+//--------------------------------------------------------
+
+
+//=======================================================
+//
+// Methods for the BufrDecoder class
+//
+BufrDecoder::BufrDecoder( const MvRequest& dataUnitRequest ) :
+  Decoder(dataUnitRequest)
+{ 
+  struct stat bufrstat;
+
+  const char *name = 0;
+  dataUnitRequest.getValue( name, "PATH" );
+
+  if ( stat(name,&bufrstat ) == 0 )
+  {
+      MvObsSet obsSet(name);
+      MvObsSetIterator   obsIterator(obsSet);
+      path_ = name;
+
+      // Group the obs. into files
+      groupInfo(obsIterator);
+  }
+  else
+  {
+      cerr << "File : " << name << "  not OK." << endl;
+      perror("BufrDecoder problem ");
+      cleanMap();
+  }
+}
+
+BufrDecoder::~BufrDecoder()
+{
+  // Empty
+}
+
+// BufrDecoder::ReadNextData
+// Return true while there are more data. Uses the groupInfo_
+// and offset_ members to determine when there's no more data.
+bool BufrDecoder::ReadNextData ()
+{
+
+  if ( offset_++ < groupInfo_.size() )
+    return true;
+  else
+    return false;
+}
+
+// BufrDecoder::CreateMatchingInfo
+// Create a MATCHING_INFO request and construct a
+// MatchingInfo from it.
+// Currently only match on time.
+MatchingInfo BufrDecoder::CreateMatchingInfo ()
+{
+  MvRequest bufrRequest("MATCHING_INFO");
+
+  bufrRequest("PATH") = (*groupIterator_).second->path().c_str();
+
+  // Format the output to match the one for GRIB.
+  string datestr  = (*groupIterator_).first;
+  string yyyymmdd = datestr.substr(0,8);
+  string hhmm     = datestr.substr(8,4);
+
+  bufrRequest("DATE") = yyyymmdd.c_str();
+  bufrRequest("TIME") = hhmm.c_str();
+
+  bufrRequest( "DATA_TYPE" ) = "BUFR";
+
+  bufrRequest.print();
+  groupIterator_++;
+
+  return MatchingInfo( bufrRequest );
+}
+
+// BufrDecoder::groupInfo
+// Is called the first time ReadNextData is called. 
+// Groups the obs. into files, which will be given
+// to the view in MatchingInfo's later. 
+void BufrDecoder::groupInfo(MvObsSetIterator &iter)
+{
+  string groupTime,groupFileName;
+  MvObs obs;
+  TDynamicTime obsTime;
+  GroupInfoIterator ii;
+
+  bool writeData = true;
+  time_t mtime;
+
+  // Only for timing during development,
+  time_t clock;
+  time(&clock);
+  cout << " Before grouping " << ctime(&clock) << endl;
+
+  // Find status and last modification of file.
+  struct stat bufrstat;
+  if ( stat(path_.c_str(),&bufrstat) < 0  )
+    {
+      cerr << "File not OK : " << path_.c_str()  << endl;
+      perror("BufrDecoder problem ");
+      cleanMap();
+      return;
+    }
+  else
+      mtime = bufrstat.st_mtime;
+
+
+  // Try to find entries in static map.
+  BufrInfoIterator bufrii;
+  if ( ( bufrii = bufrInfoMap.find(path_) ) != bufrInfoMap.end() )
+    {
+      // Find the correct entry
+      while( bufrii != bufrInfoMap.end() )
+	{
+	  BufrInfoIterator currentBufr = bufrii;
+	  ++bufrii;  //-- advance before possible erasing
+
+	  // No more entries for this file.
+	  if ( (*currentBufr).first != path_ )
+	    break;
+
+	  // Check modification time
+	  if ( (*currentBufr).second.mtime_ < mtime )
+	    {
+	      cout << "Existing map entry too old, erasing" << endl;
+	      bufrInfoMap.erase(currentBufr);
+	      break;
+	    }
+
+	  // Check that we have the same grouping interval.
+	  else if ( (*currentBufr).second.groupInterval_ == ObsGroupControl::groupPeriod() )
+	    {
+	      writeData = false;
+	      groupInfo_ = (*currentBufr).second.groupInfo_;
+	      groupIterator_ = groupInfo_.begin();
+	      cout << "Using existing files, new files not created" << endl;
+	      break;
+	    }
+	}
+    }
+
+  // Return here if we use data files produced previously.
+  if ( ! writeData )
+    return;
+
+  // Files not found, need to process the file.
+  while ( obs = iter(NR_returnMsg) )
+    {
+      // Find the correct time to use for grouping
+      // Check if this time exists, if so write the
+      // obs to the file for the right time, else
+      // create a new entry and write the obs.
+      
+      if( ObsGroupControl::useObsTime() )
+	obsTime = obs.obsTime();       //-- slow: needs to decode the msg
+      else
+	obsTime = obs.msgTime();       //-- fast: use metadata, no decoding
+
+      findTime(obsTime,groupTime);
+      
+      if ( (ii = groupInfo_.find(groupTime)) != groupInfo_.end() )
+	(*ii).second->write(obs);
+
+      else 
+	{
+	  generateGroupFileName(groupFileName,groupTime);
+
+	  // Insert a pair into map.
+	  pair<const string,GroupInfo*> pp(groupTime, new GroupInfo(groupFileName,writeData ) );
+	  pair<GroupInfoIterator,bool> retpair = groupInfo_.insert(pp);
+	  if ( retpair.second == false )
+	    cerr << "Can not insert grouping info for " << groupTime.c_str() << endl;
+	  else
+	    {
+	      GroupInfoIterator newii = retpair.first;
+	      (*newii).second->write(obs);
+              ObsGroupControl::printGroupingLimits(groupTime);
+	    }
+	}
+    }
+
+  // All obs. are written. Now go through the map and close all files. 
+  for (groupIterator_ = groupInfo_.begin();
+       groupIterator_ != groupInfo_.end(); groupIterator_++)
+    (*groupIterator_).second->close();
+
+  // Add file info to static map.
+  BufrInfo bufrinfo;
+  bufrinfo.mtime_         = mtime;
+  bufrinfo.groupInterval_ = ObsGroupControl::groupPeriod();
+  bufrinfo.groupInfo_     = groupInfo_;
+  bufrInfoMap.insert(pair<const string,BufrInfo>(path_,bufrinfo));
+
+  // Rewind the iterator.
+  groupIterator_ = groupInfo_.begin();
+
+  // Print out all info in static map for debugging purposes.
+  cout << "================= STATIC MAP ======================" << endl;
+  for ( bufrii = bufrInfoMap.begin();  bufrii != bufrInfoMap.end(); bufrii++)
+    {
+      cout << "ORIGINAL FILE : " << (*bufrii).first << endl;
+      for (ii = (*bufrii).second.groupInfo_.begin(); 
+	   ii != (*bufrii).second.groupInfo_.end(); ii++)
+	cout << "\t" << (*ii).second->path().c_str() << endl;
+    }
+
+  // Clean up any files where the source file does not exist any more.
+  cleanMap();
+
+  // For testing.
+  time(&clock);
+  cout << " After grouping " << ctime(&clock) << endl;
+}
+
+// BufrDecoder::findTime
+// Uses the TDynamicTime returned from the obs. to get the
+// correct grouping time.
+void BufrDecoder::findTime(TDynamicTime &tt,string &gtime)
+{
+  gtime = ObsGroupControl::groupTimeString( tt );
+}
+
+// Generate a file name in TMPDIR. Build the name from the name of
+// original BUFR file, grouptime and groupinginterval;
+void BufrDecoder::generateGroupFileName(string &fname,const string &grouptime)
+{
+  string tmpdir(getenv("METVIEW_TMPDIR"));
+
+  int myGroupingPeriod = ObsGroupControl::groupPeriod();
+
+  // Does not handle trailing "/" properly.
+  string base_name = path_.substr(path_.find_last_of("/") + 1);
+
+  fname = tmpdir + '/' + base_name + '_' + grouptime + '_';
+  char ctime[5];
+  sprintf( ctime, "%d", myGroupingPeriod );
+  fname += ctime;
+}
+
+// Clean all entries in static map where the original file does not exist
+// any more. This will also delete any grouped files created from the 
+// original one.
+void BufrDecoder::cleanMap()
+{
+  string curr_path;
+  BufrInfo curr_info;
+  GroupInfoIterator ii;
+  struct stat bufrstat;
+
+  BufrInfoIterator bufrii = bufrInfoMap.begin();
+  while( bufrii != bufrInfoMap.end() )
+    {
+      BufrInfoIterator currentBufr = bufrii;
+      ++bufrii;	  //-- advance before possible erase!
+
+      curr_path = (*currentBufr).first;
+      curr_info = (*currentBufr).second;
+
+      if ( stat(curr_path.c_str(),&bufrstat)  < 0 )
+	{
+	  for ( ii = curr_info.groupInfo_.begin();
+		ii != curr_info.groupInfo_.end(); ii++)
+	    (*ii).second->deleteFile();
+
+	  cout << "Erasing entry for " << curr_path.c_str() << endl;
+	  bufrInfoMap.erase(currentBufr);
+	}
+    }
+}
+
+//__________________________________________________________________
+
+//-- default obs grouping parameters, valid for ECMWF --//
+int  ObsGroupControl::groupPeriodHours_       = 6;
+int  ObsGroupControl::groupPeriodStartMinute_ = 1;
+bool ObsGroupControl::useObsTime_             = false;
+bool ObsGroupControl::firstTime_              = true;
+
+void
+ObsGroupControl::groupingValues()
+{
+  if( firstTime_ )
+    {
+      firstTime_ = false;
+
+      std::ostringstream sbuf;
+      sbuf << "Obs grouping period is "
+	   << groupPeriodHours_
+	   << " hours, start minute is "
+	   << groupPeriodStartMinute_
+	   << ", values from "
+	   << ( useObsTime_ ? "observation" : "metadata (section 1)" )
+	   << ends;
+      PlotMod::Instance().MetviewError( sbuf.str(), "Info" );
+    }
+}
+
+int
+ObsGroupControl::groupPeriod()
+{
+  //  groupingValues();
+  return groupPeriodHours_;
+}
+
+int
+ObsGroupControl::groupPeriodStartMinute()
+{
+  //  groupingValues();
+  return groupPeriodStartMinute_;
+}
+
+// Please consult printGroupingLimits::groupTimeString() - if the code
+// changes in there, then this function may also have to be updated.
+string
+ObsGroupControl::groupTimeString( const TDynamicTime& tim )
+{
+  groupingValues();
+
+  short yy,mm,dd;
+  short hh,min,sec;
+
+  TDynamicTime tt( tim );
+
+  //-- ECMWF uses grouping XX01...YY00, UKMO uses XX00...(YY-1)59
+  //-- If grouping does not start XX00 then use a trick to subtract extra minute(s) --//
+  if( ObsGroupControl::groupPeriodStartMinute() )
+    {
+      tt.ChangeByMinutes( -ObsGroupControl::groupPeriodStartMinute() );
+    }
+
+  tt.GetDate(yy,mm,dd);
+  tt.GetTime(hh,min,sec);
+
+  //-- calculate the correct group time hour --//
+  int myGroupSize = ObsGroupControl::groupPeriod();
+  hh = ( (hh  + myGroupSize/2 ) / myGroupSize ) * myGroupSize;
+  if ( hh >= 24 ) 
+    {
+      hh -= 24;
+      tt.ChangeByDays(1);
+      tt.SetTime(hh,min,sec);
+      tt.GetDate(yy,mm,dd);
+    }
+
+  //-- build the group time string --//
+  static char buf[20];
+  sprintf(buf,"%04d%02d%02d%02d00",yy,mm,dd,hh);
+
+  return buf;
+}
+
+// Prints a user message to indicate the range of times that
+// will be included within the given time group.
+// Please consult ObsGroupControl::groupTimeString() - if the code
+// changes in there, then this function may also have to be updated.
+void
+ObsGroupControl::printGroupingLimits( const string &groupTimeString )
+{
+    short yyyy,mm,dd, hh;
+    char  message[512];
+    int   groupHours       = ObsGroupControl::groupPeriod();
+    int   groupStartMinute = ObsGroupControl::groupPeriodStartMinute();
+    int   minutesAtStart   = ((groupHours / 2) * 60);
+    int   minutesAtEnd     = minutesAtStart;
+
+    // the variable 'minutes' stores the number of minutes between the
+    // 'official' group period hour (e.g. 06:00, i.e. midpoint of the period
+    //  03:00 to 09:00) and the period's limits (in this case 180) if we exclude
+    // groupStartMinute for the moment (normally we use 03:01, not 03:00).
+    // However, for odd-numbered group hours, our mid-point hour is not
+    // evenly between its 'limit' hours, e.g. 02:00 to 05:00 has a group
+    // hour of 3. So we must adjust for this in our calculations.
+
+    if (groupHours%2 == 1)
+    {
+        minutesAtEnd += 60;
+    }
+
+    // parse the grouping time string into its components
+    sscanf (groupTimeString.c_str(), "%4hd%2hd%2hd%2hd00", &yyyy,&mm,&dd,&hh);
+
+    // turn that into a proper 'time' structure
+    TDynamicTime groupTime(yyyy,mm,dd,hh);
+
+    // find the start of this time period
+    TDynamicTime startGroupTime (groupTime);
+    startGroupTime.ChangeByMinutes (-minutesAtStart + groupStartMinute);
+
+    // find the end of this time period
+    TDynamicTime endGroupTime (groupTime);
+    endGroupTime.ChangeByMinutes (minutesAtEnd + groupStartMinute - 1);
+
+    // create a message to tell the user of these period limits
+    sprintf (message, "New obs grouping period: %04d%02d%02d-%02d:%02d to %04d%02d%02d-%02d:%02d",
+                       startGroupTime.GetYear(),
+                       startGroupTime.GetMonth(),
+                       startGroupTime.GetDay(),
+                       startGroupTime.GetHour(),
+                       startGroupTime.GetMin(),
+                       endGroupTime.GetYear(),
+                       endGroupTime.GetMonth(),
+                       endGroupTime.GetDay(),
+                       endGroupTime.GetHour(),
+                       endGroupTime.GetMin());
+
+    PlotMod::Instance().MetviewError( message, "Info" );
+}
+
+void
+ObsGroupControl::setGroupingPeriod( int hours )
+{
+  if( groupPeriodHours_ != hours )
+    {
+      groupPeriodHours_ = hours;
+
+      std::ostringstream sbuf;
+      sbuf << "Obs grouping period changed to "
+	   << groupPeriodHours_
+	   << " hours"
+	   << ends;
+      PlotMod::Instance().MetviewError( sbuf.str(), "Info" );
+    }
+}
+
+void
+ObsGroupControl::setGroupingPeriodStart( int minutes )
+{
+  if( groupPeriodStartMinute_ != minutes )
+    {
+      groupPeriodStartMinute_ = minutes;
+
+      std::ostringstream sbuf;
+      sbuf << "Obs grouping period start minute changed to "
+	   << groupPeriodStartMinute_
+	   << ends;
+      PlotMod::Instance().MetviewError( sbuf.str(), "Info" );
+    }
+}
diff --git a/src/uPlot/BufrDecoder.h b/src/uPlot/BufrDecoder.h
new file mode 100644
index 0000000..ab905d4
--- /dev/null
+++ b/src/uPlot/BufrDecoder.h
@@ -0,0 +1,137 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  BufrDecoder
+//
+// .AUTHOR:
+//  Geir Austad
+//
+// .SUMMARY:
+//  A concrete  class for decoding BUFR files
+//  (uses Vesa's C++ classes to wrap the emoslib
+//  routines).
+//
+// .CLIENTS:
+//
+//
+// .RESPONSIBILITIES:
+//  For each file, loop thru the messages and
+//  return the messages matching the given criteria.
+//
+// .COLLABORATORS:
+//  ECMWF's BUFR classes.
+//
+// .BASE CLASS:
+//  Decoder
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107).
+//
+//
+#ifndef BufrDecoder_H
+#define BufrDecoder_H 
+
+#include <mars.h>
+#include <MvObs.h>
+#include "Decoder.h"
+
+// Until something more clever, set grouping period to 6 hours.
+const int GROUPINGPERIOD = 6;
+
+// Helper class used for grouping the observations into separate
+// files. The files are then matched to subpages.
+class GroupInfo
+{
+public:
+	GroupInfo() : out_(0),path_("") {}
+
+	GroupInfo(const string & path,bool writeData) : out_(0), path_(path)
+	{ if ( writeData ) out_ = new MvObsSet(path_.c_str(),"w"); }
+
+	~GroupInfo() { this->close(); }
+
+	void write(MvObs &obs) { if ( out_ ) out_->write(obs); }
+
+	void close() { if ( out_ ) { out_->close(); delete out_; out_ = 0; } }
+
+	void deleteFile() { this->close(); unlink(path_.c_str()); }
+	const string & path() { return path_; }
+
+private:
+	MvObsSet *out_;
+	string path_;
+};
+
+typedef map<string, GroupInfo*, less<string> > GroupInfoMap;
+typedef GroupInfoMap::iterator GroupInfoIterator;
+
+class BufrDecoder: public Decoder {
+public:
+
+	// Contructors
+	BufrDecoder ( const MvRequest& inRequest );
+
+	// Destructor
+	virtual ~BufrDecoder();
+
+	// Overridden methods from Decoder class
+	virtual bool ReadNextData ();
+
+	virtual MatchingInfo CreateMatchingInfo ();
+
+private:
+	void groupInfo(MvObsSetIterator &);
+	void findTime(TDynamicTime&,string&);
+	void generateGroupFileName(string &, const string &);
+	void cleanMap();
+
+	// No copy allowed
+	BufrDecoder(const BufrDecoder&);
+	BufrDecoder& operator=(const BufrDecoder&){return *this;}
+
+	// Members
+	GroupInfoMap groupInfo_;
+	GroupInfoIterator groupIterator_;
+	string path_;
+};
+
+//____________________________________________________
+
+class ObsGroupControl
+{
+public:
+	ObsGroupControl(){}
+
+	static string groupTimeString( const TDynamicTime& tim );
+	static void printGroupingLimits( const string &groupTimeString );
+	static int groupPeriod();
+	static int groupPeriodStartMinute();
+	static bool useObsTime()
+		{ return useObsTime_; }
+
+	static void   groupingValues();
+	static void   setGroupingPeriod( int hours );
+	static void   setGroupingPeriodStart( int minutes );
+	static void   setUseObsTime( bool useObsTime )
+		{ useObsTime_ = useObsTime; }
+
+private:
+	static int    groupPeriodHours_;
+	static int    groupPeriodStartMinute_;
+	static bool   useObsTime_;
+	static bool   firstTime_;
+};
+#endif
diff --git a/src/uPlot/Canvas.cc b/src/uPlot/Canvas.cc
new file mode 100644
index 0000000..82d6ea8
--- /dev/null
+++ b/src/uPlot/Canvas.cc
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Canvas
+// Gilberto Camara - ECMWF Apr 97
+//
+//
+//
+//  Methods for the Canvas class
+//
+//
+
+#include "Canvas.h"
+#include "PlotModConst.h"
+
+Canvas::Canvas ( Device& device,
+		 const Rectangle& rect,
+		 const PaperSize& size,
+		 int   presentableId):
+	myDevice_         ( device                ),
+	rect_             ( rect                  ),
+	size_             ( size                  ),
+	drawingAreaCoord_ ( Location (0.,0.,1.,1.)),
+	presentableId_    ( presentableId         )
+{
+	aspectRatio_ = size.GetWidth() / size.GetHeight();
+}
+
+Canvas::~Canvas()
+{
+	// Empty
+}
+
+#if 0
+void
+Canvas::SetDrawingArea ( const Location& drawingAreaCoord ) 
+{
+	// Initialize effective drawing area Coordinates
+
+	drawingAreaCoord_ = drawingAreaCoord;
+}
+
+bool
+Canvas::HasDrawingAreaBeenSet ()
+{
+	if (drawingAreaCoord_.Top()    == 0. &&
+	    drawingAreaCoord_.Left()   == 0. &&
+	    drawingAreaCoord_.Bottom() == 1. &&
+	    drawingAreaCoord_.Right()  == 1.    )
+		return false;
+	else
+		return true;
+}
+
+// Copy all data from Input Stream to Output Stream - ASCII data
+bool Canvas::MoveToFile ( const char* inFileName, 
+			  const char* outFileName, bool appendMode )
+{
+  //int openMode;      //-- GNU g++ 3.2 does not accept 'int' (021014/vk)
+  tOpenMode openMode;  //-- tOpenMode defined in libUtil/inc_iostream.h
+
+  // Write to a new file or append to a old one
+  if ( appendMode )
+	  openMode = ios::app;   // Append to the existing output file
+  else
+	  openMode = ios::out;   // Create a new file
+
+  // Open input and output files
+  ofstream outStream ( outFileName, openMode );
+  if (  !outStream )
+  {
+	  cout << "Could not open output file: " << outFileName << endl;
+	  return false;
+  }
+
+  ifstream inStream  ( inFileName );
+  if ( !inStream )
+  {
+	  cout << "Could not open input file: " << inFileName << endl;
+	  return false;
+  }
+
+  // Append data
+  outStream << inStream.rdbuf();
+  if ( !outStream )
+  {
+	  cout << "Error updating output file" << outFileName << endl;
+	  return false;
+  }
+
+  inStream.close();
+  unlink ( inFileName );
+
+  return true;
+}
+#endif
+
+MvRequest Canvas::PrinterRequest ()
+{
+	MvRequest deviceRequest = myDevice_.DeviceRequest();
+
+	return deviceRequest;
+}
+
+#if 0 //Change this code to PlotMod:IsWindow
+//U If derived Canvas classes (e.g. XCanvas, PSCanvas,...) are
+// no longer needed, this code should be used instead.
+Cached Canvas::CanvasType ()
+{
+	MvRequest deviceRequest = myDevice_.DeviceRequest();
+deviceRequest.print();
+
+	MvRequest outDev = deviceRequest("OUTPUT_DEVICES");
+outDev.print();
+
+	while ( outDev )
+	{
+		MvRequest req =  outDev.justOneRequest();
+		req.print();
+		if ( req.getVerb() == Cached("QtDriver" ) )
+			return SCREEN;
+
+		outDev.advance();
+	}
+
+	return Cached(" ");
+}
+#endif
diff --git a/src/uPlot/Canvas.h b/src/uPlot/Canvas.h
new file mode 100644
index 0000000..735f3f4
--- /dev/null
+++ b/src/uPlot/Canvas.h
@@ -0,0 +1,218 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Canvas
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  A  base class for access to drawing areas
+//
+// .CLIENTS:
+//  Presentable, SuperPage, Page, Subpage, DataObject
+//
+//
+// .RESPONSABILITIES:
+//  Provides an interface, which, in combination
+//  with multiple inheritance of its derived classes, is able
+//  to support both X-Window and Postscript drawing areas
+//
+//
+// .COLLABORATORS:
+//  Graphics Engine, Device
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//  XCanvas, PSCanvas
+//
+// .REFERENCES:
+//
+//
+#ifndef Canvas_H
+#define Canvas_H
+
+#include <Rectangle.h>
+
+#include "PaperSize.h"
+#include "Location.h"
+#include "Device.h"
+
+class SubPage;
+
+enum { RMALL,RMMATCH,RMNONE};
+
+class Canvas {
+
+public:
+	// Contructors
+	Canvas ( Device& device, const Rectangle& rect, const PaperSize& size, int presentableId );
+
+	// Destructor
+	virtual ~Canvas(); // base class
+
+	// Drawing Methods
+#if 0
+	// Start a new drawing
+	virtual void StartDrawing () {}
+
+	// End the drawing (and perform appropriate actions)
+        virtual void EndDrawing() {}
+
+	// Draw a given line/area
+	virtual void Draw (Location&) {}
+
+	// Set the effective drawing area
+	virtual void SetDrawingArea ( const Location& drawingAreaCoord  );
+
+	// Check if drawing area has been updated
+	virtual bool HasDrawingAreaBeenSet ();
+
+	virtual void StartPicture() {}
+	virtual void EndPicture() {}
+	virtual void EndAllPicture() {}
+
+	virtual void Clear() {}
+
+	// Dealing with zoom
+	virtual void UndoSelection() {}
+	virtual void RedoSelection() {}
+	virtual void ResetSelection() {}
+	
+	// Dealing with visualization window
+	virtual void SetWaitState( bool ) {}
+	virtual void DisplayCoords( bool ) {}
+	virtual void OnLeave () {}
+	virtual void ExposeProc() {}
+	virtual void SetWorldCoordinates ( Location& ) {}
+
+//	virtual void LatLonCursor ( Location&, Location& ) {}
+
+	// Dealing with segments
+	virtual void SelectSegment ( int, const string & ) {}
+        virtual void SelectShared  ( const string & ) {}
+#endif
+
+	virtual bool HasSegment ( int, const string & )
+		{ return false; }
+#if 0
+        virtual bool HasShared (const string &)
+		{ return false; }
+
+	virtual void ClearSegment ( int, const string & ) {}
+        virtual void ClearShared  ( const string & ) {}
+        virtual void UpdateShared ( ) {}
+
+	virtual void RemoveAllSegments ( int, bool = 0 ) {}
+ 	virtual void RemoveAll  () {}
+#endif
+
+        virtual bool RemoveForAll(int,const string&)
+		{ return false; }
+  
+	// Dealing with drawing requests
+//	virtual void InitTitleDraw ( int, Presentable* ) {}
+//	virtual void EndDraw ( Presentable* ) {}
+
+//	double AspectRatio()
+//		{ return aspectRatio_; }
+
+	double GetWidth()
+		{ return size_.GetWidth(); }
+	
+	double GetHeight()
+		{ return size_.GetHeight(); }
+
+	virtual void PresentableId ( int presentableId )
+		{ presentableId_ = presentableId; }
+
+	int PresentableId()
+		{ return presentableId_; }
+
+	virtual void RemovePresentableId ( int, int = RMMATCH ) {}
+
+//        virtual void MovePresentable(SubPage*,int ) {} 
+
+	virtual void ShowPresentableId ( int ) {}
+	virtual int ShowPresentableId ()
+		{ return -1; }
+
+	const Device& GetDevice() const
+		{ return myDevice_; }   // pointer to the device
+
+#if 0
+	virtual Point Origin ()
+		{ return Point ( 0, 0 ); }
+
+	virtual PaperSize FullPaper ()
+		{ return PaperSize ( 0, 0 ); }
+
+	virtual Cached OutFileName ()
+		{ return Cached ( "" ); }
+
+	virtual Cached OutTmpFileName ()
+		{ return Cached ( "" ); }
+
+	virtual Cached CanvasType ();
+
+#endif
+
+	virtual MvRequest PrinterRequest ();
+
+#if 0
+        virtual string PresentableString(int ) { return string(""); }
+
+        virtual string SharedString( ) { return string(""); }
+
+	virtual void SetRubberBand(int,int,int,int,bool) { };
+
+        // Move MagicsEngine file to different name
+        virtual void CreateTmpFile(MvRequest &) {}
+
+        // Put together all generated files if needed  
+        virtual void CreateFile(int) {}
+
+        // Utility for file handling
+        bool MoveToFile ( const char* inFileName, const char* outFileName,
+			  bool appendMode );
+
+	virtual Widget MainWidget() const { };
+#endif
+
+protected:
+
+	// Members
+        Device&   myDevice_;   // pointer to the device
+
+//D	auto_ptr <DeviceDriver>  canvasDeviceDriver_; //  Pointer to the deviceDriver
+
+	double aspectRatio_;         // aspectRatio must be preserved
+
+	Rectangle rect_;             // size of the canvas
+
+	PaperSize size_;
+
+	Location drawingAreaCoord_;  // coordinates on paper of
+	                             // effective drawing area
+
+	int presentableId_;          // id of the presentable associated to the canvas
+
+private:
+
+	// No copy allowed
+	Canvas(const Canvas&);
+	Canvas& operator=(const Canvas&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/CartesianView.cc b/src/uPlot/CartesianView.cc
new file mode 100644
index 0000000..658133a
--- /dev/null
+++ b/src/uPlot/CartesianView.cc
@@ -0,0 +1,662 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Assertions.hpp>
+
+#include "CartesianView.h"
+#include "DataObject.h"
+#include "Decoder.h"
+#include "ObjectList.h"
+#include "Page.h"
+#include "PmContext.h"
+#include "Root.h"
+#include "SubPage.h"
+
+#include "MvRequestUtil.hpp"
+
+// Class CartesianViewFactory - builds service views
+class CartesianViewFactory : public PlotModViewFactory
+{
+	// Virtual Constructor - Builds a new CartesianView
+	virtual PlotModView* Build ( Page&            page, 
+				     const MvRequest& contextRequest,
+				     const MvRequest& setupRequest )
+  	{
+		return new CartesianView ( page, contextRequest, setupRequest,
+			   "BACKGROUND_HORIZONTAL_AXIS","BACKGROUND_VERTICAL_AXIS","CartesianView");
+	}
+
+   public:
+	CartesianViewFactory() : PlotModViewFactory ( "CartesianView" ) {}
+};
+
+static CartesianViewFactory CartesianViewFactoryInstance;
+
+CartesianView::CartesianView ( Page&  owner,
+                               const MvRequest& viewRequest,
+                               const MvRequest& setupRequest,
+                               const string &hAxisName,
+                               const string &vAxisName,
+                               const string &viewName) :
+                               PlotModView ( owner, viewRequest, setupRequest ),
+                               hAxisName_(hAxisName),vAxisName_(vAxisName),
+                               viewName_(viewName)
+{
+    // If this constructor was called due to a data plotting request then
+     // both axes min/max values should be defined by the data.
+     // Once the data request is decoded later, the axes min/max values should
+     // be updated. This is important for the zoom procedure because the first
+     // values in the zoom stack should contain the correct values, not the
+     // default ones, as initialized below.
+     const char* origin = viewRequest("_ORIGIN");
+     if ( origin && strcmp(origin,"DataBuilder") == 0 )
+     {
+          viewRequest_("X_AUTOMATIC") = "ON";
+          viewRequest_("Y_AUTOMATIC") = "ON";
+     }
+
+     // Create AREA parameter to be used by the Projection (SetProjection)
+     MvRequest viewRequest1 = viewRequest_;
+     viewRequest1("AREA")  = viewRequest1( "Y_MIN" );
+     viewRequest1("AREA") += viewRequest1( "X_MIN" );
+     viewRequest1("AREA") += viewRequest1( "Y_MAX" );
+     viewRequest1("AREA") += viewRequest1( "X_MAX" );
+
+     // Set projection
+     viewRequest1("MAP_PROJECTION") = "CARTESIANVIEW";
+     owner.SetProjection ( viewRequest1 );
+}
+
+CartesianView::CartesianView( const CartesianView &old ) :
+			PlotModView(old),
+			hAxisName_(old.hAxisName_),
+			vAxisName_(old.vAxisName_),
+			viewName_(old.viewName_)
+//			axisInfoMap_(old.axisInfoMap_)
+{
+}
+
+CartesianView::~CartesianView()
+{
+  // Empty
+}
+
+string
+CartesianView::Name()
+{
+	int id =  Owner().Id();
+	return (const char*) ObjectInfo::ObjectName ( viewRequest_, "CartesianView", id );
+}
+
+void
+CartesianView::Drop ( PmContext& context )
+{
+     MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+     // Process the drop
+     MvRequest dropRequest(context.InRequest());
+	MvIcon dataUnit;
+	while ( dropRequest )
+	{
+		// VisDefs are processed in one single goal. This
+		// is because the processing of a single or a group
+		// of visdefs is different. It is assumed that 
+		// visdefs always come after a dataunit (if it exists).
+          MvRequest vdRequestList;
+          if ( this->RetrieveVisdefList (dropRequest,vdRequestList) )
+          {
+               Owner().InsertVisDef (vdRequestList, dataUnit);
+
+               if ( !dropRequest ) // no more drops
+                    break;
+          }
+
+		MvRequest request(dropRequest.justOneRequest());
+		Cached verb       =  request.getVerb();
+		if ( verb == Cached ( "DRAWING_PRIORITY" ) )
+		{
+			Owner().SetDrawPriority ( request );
+
+			// Redraw this page
+			Owner().RedrawIfWindow();
+		}
+		else if ( ObjectList::IsDataUnit ( verb ) == true )
+		{
+			dataUnit = dataBase.InsertDataUnit ( request, Owner().Id() );
+			ParentDataUnitId ( dataUnit.Id() ); // save to be used when returning from service
+			DecodeDataUnit ( dataUnit );
+
+               // Update the View, if it is a default one
+               this->UpdateAxisTypeView( request );
+		}
+
+          // Handle visdefs
+		else if ( ObjectList::IsVisDefText ( verb ) )
+			Owner().InsertPText ( request );
+		else if ( ObjectList::IsVisDefLegend ( verb ) )
+			Owner().InsertLegend ( request );
+          else if ( ObjectList::IsVisDefAxis ( verb ) )
+               this->ReplaceAxis ( request );
+
+          // Replace the view (if applicable)
+		else if ( ObjectList::IsView ( verb ) == true )
+			this->UpdateView ( request );
+
+		else if ( (const char*)verb == PLOTSUPERPAGE )
+		{
+			context.AdvanceTo(PLOTSUPERPAGE);
+			return;
+		}
+          else if ( (const char*)verb == NEWPAGE )
+          {
+               context.AdvanceTo(NEWPAGE);
+               return;
+          }
+
+		dropRequest.advance();
+	}
+
+	// Consume all of the input request (the service will use it)
+	context.AdvanceToEnd();
+}
+
+// Update the viewRequest
+void
+CartesianView::UpdateView ( MvRequest& viewRequest )
+{
+     // Update request
+     viewRequest_ = viewRequest;
+
+     // Indicate that the plotting tree needs to be rebuilt
+     Root::Instance().Refresh(false);
+}
+
+// Update the View, if it is a default one.
+// If the Data request sets X/Y axis type to "DATE" then the default
+// View request needs to be updated accordingly. This is because Magics
+// receives the Data request after the View request and it needs to
+// know at the View level if one or both axes are of type "DATE".
+void
+CartesianView::UpdateAxisTypeView ( MvRequest& reqData )
+{
+     // Return if it is not a default view
+     if ( !(const char*)viewRequest_("_DEFAULT") )
+          return;
+
+     // Update X axis type. Assumes that there is only one parameter
+     // with sufix equals to "_X_TYPE"
+     MvRequest reqAux("XY_TYPE");
+     string sufix = "_X_TYPE";
+     CopySomeParameters( reqData,reqAux,sufix);
+     const char* param = (const char*)reqAux.getParameter(0);
+     if ( param && strcmp(reqAux(param),"DATE") == 0 )
+          viewRequest_("X_AXIS_TYPE") = "DATE";
+
+     // Update Y axis type. Assumes that there is only one parameter
+     // with sufix equals to "_Y_TYPE"
+     reqAux.clean();
+     reqAux.setVerb("XY_TYPE");
+     sufix = "_Y_TYPE";
+     CopySomeParameters( reqData,reqAux,sufix);
+     param = (const char*)reqAux.getParameter(0);
+     if ( param && strcmp(reqAux(param),"DATE") == 0 )
+          viewRequest_("Y_AXIS_TYPE") = "DATE";
+}
+
+void
+CartesianView::ReplaceAxis ( MvRequest& axisRequest )
+{
+     // Get axis orientation
+     const char* cori = axisRequest("AXIS_ORIENTATION");
+     if ( !cori )
+          cori = "HORIZONTAL";   //default
+
+     // Unset previous axis definition from the view, if exists
+     string sorient = cori + (string)"_AXIS";
+     MvRequest newView(viewRequest_);
+     newView.unsetParam(sorient.c_str());
+
+     // Add new axis definition and update the view
+     newView(sorient.c_str()) = axisRequest;
+     this->UpdateView(newView);
+}
+
+// -- METHOD: DecodeDataUnit
+//
+// -- PURPOSE:
+//    . Extract the data and the metadata from a request
+//    . Provides the proper axis and graph definition according
+//      to the metada
+//
+void CartesianView::DecodeDataUnit ( MvIcon& givenUnit )
+{
+	MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+	Owner().InitMatching();
+
+	// Build a new data decoder, which will provide information
+	// about the data
+	auto_ptr<Decoder> decoder ( DecoderFactory::Make ( givenUnit.Request() ) );
+	ensure (decoder.get() != 0);
+
+	int subpageId = 0;
+	double minX,maxX,minY,maxY;
+
+	while ( decoder->ReadNextData() )
+	{
+		MvRequest dataRequest(decoder->Request());
+//D		if ( ! decoder->FillDataRequest(dataRequest) )
+//D			continue;
+
+		decoder->GetMinMax(minX,maxX,minY,maxY);
+
+		// Insert the dataunit in the data base
+		MvIcon dataUnit = dataBase.InsertDataUnit ( dataRequest );
+
+		dataUnit.ParentId ( this->ParentDataUnitId () );
+
+		// Pass the data and metadata info to the page
+ 		MatchingInfo dataInfo = decoder->CreateMatchingInfo();
+
+		Owner().InsertDataUnit ( dataUnit.Id(), 0, 0, dataInfo, subpageId );
+
+		// Add min/max/subpage info for dataunit. Later used for axis drawings
+//		AxisInfo ai(subpageId,minX,maxX,minY,maxY);
+//		axisInfoMap_[dataUnit.Id()] = ai;
+	}
+
+	// If new data has been added, remove default axis ( foreground )
+//D	if ( Owner().HasData()  && subpageId > 0 )
+//D	{
+//D		Owner().EraseBackDraw();
+//D		Presentable *subpage = Owner().FindBranch(subpageId);
+//D		Owner().DrawBackground(subpage->GetCanvas(),true);
+//D	}
+}
+
+void
+CartesianView::DescribeYourself ( ObjectInfo& description )
+{
+	// Convert my request to macro
+	set<Cached> skipSet;
+	description.ConvertRequestToMacro ( viewRequest_, PUT_END, MacroName().c_str(),viewName_.c_str(), skipSet );
+}
+
+void CartesianView::DescribeAxis ( ObjectInfo& description,
+				   MvRequest& axisRequest,
+				   const Cached& axisName )
+{
+	description.ConvertRequestToMacro ( axisRequest, PUT_END,axisName,"maxis" );
+}
+
+void CartesianView::InsertDataRequest ( MvRequest& dropRequest )
+{
+	MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+	// Process the request
+	while ( dropRequest )
+	{
+		MvRequest dataUnitRequest(dropRequest.justOneRequest());
+		string verb = dataUnitRequest.getVerb();
+
+		if ( verb == NETCDF )
+		{
+			MvIcon tmpIcon(dataUnitRequest);
+			DecodeDataUnit (  tmpIcon );
+
+			MvIcon parentDataUnit;
+			dataBase.RetrieveDataUnit(this->ParentDataUnitId (), parentDataUnit);
+			parentDataUnit.SvcRequest ( dataUnitRequest );
+		}
+
+		dropRequest.advance();
+	}
+}
+
+#if 0
+void CartesianView::HandleAxisData ( MvIcon &dataUnit, double minx,double maxx,
+				     double miny, double maxy)
+{
+	MvRequest dataRequest(dataUnit.Request());
+	MvIconDataBase& dataBase = Owner().IconDataBase();
+
+	MvRequest xAxis(viewRequest_.getSubrequest( hAxisName_.c_str() ));
+	MvRequest yAxis(viewRequest_.getSubrequest( vAxisName_.c_str() ));
+
+	if ( FlipMinMax() )
+	{
+		double temp = miny;
+		miny = maxy;
+		maxy = temp;
+	}
+
+	if ( !xAxis) xAxis.setVerb("PAXIS");
+	if ( !yAxis)
+	{
+		yAxis.setVerb("PAXIS");
+		yAxis("AXIS_ORIENTATION") = "VERTICAL";
+	}
+
+	if ( ! (const char *)xAxis("AXIS_MIN_VALUE")  )
+		xAxis("AXIS_MIN_VALUE") = minx;
+
+	if ( ! ( const char *)xAxis("AXIS_MAX_VALUE") )
+		xAxis("AXIS_MAX_VALUE") = maxx;
+
+	if ( ! ( const char *)yAxis("AXIS_MIN_VALUE") )
+		yAxis("AXIS_MIN_VALUE") = miny;
+
+	if ( ! ( const char *)yAxis("AXIS_MAX_VALUE") )
+		yAxis("AXIS_MAX_VALUE") = maxy;
+
+	dataRequest = dataRequest + xAxis + yAxis;
+	dataBase.UpdateDataUnit(dataUnit.Id(), dataRequest );
+}
+#endif
+
+void
+CartesianView::Draw ( SubPage* subPage )
+{
+	MvIconDataBase&   dataBase = Owner().IconDataBase();
+	DrawingPriority& tmpDrawingPriority = Owner().GetDrawPriority (); // Get from Page
+
+	// Get the data units for this subpage.
+	list<DataObject*> doList;
+	subPage->GetDataObjects(doList);
+	list<DataObject*>::iterator ii;
+	DataObject *dataObject = 0;
+	DrawPriorMap drawPriorMap;
+	DrawPriorMap::iterator j;
+
+	//  MvIconList  duList;
+	multimap<int,MvIcon> duMap;
+	MvIcon dataUnit;
+
+	map<int,MvRequest> reqMap;
+//	AxisInfoMap::iterator axisii;
+//	double MinX,MaxX,MinY,MaxY;
+//	bool first = true;
+	for ( ii = doList.begin(); ii != doList.end(); ii++ )
+	{
+		dataObject = (*ii);
+		if ( ! dataBase.RetrieveDataUnit (dataObject->DataUnitId(), dataUnit) )
+			continue;
+
+		// duList.push_back(dataUnit); 
+		reqMap[dataUnit.Id()] = dataUnit.Request();
+
+//		axisii = axisInfoMap_.find(dataUnit.Id() );
+//		if ( axisii == axisInfoMap_.end() )
+//			continue;
+
+//		CheckMinMax(MinX,MaxX,MinY,MaxY,(*axisii).second,first);
+
+		// Retrieve visdef associated to this dataunit
+		MvIconList vdList;
+		dataObject->RetrieveMyVisDefList(dataUnit,vdList);
+
+		// Unfortunately the data unit ( if it's a curve) will need
+		// to know which visdef it has in order for magics translator
+		// to set the correct values ( BAR...VALUES, CURVE..VALUES etc).
+		// So we need to add a GRAPH_TYPE field to dataunit request 
+		// for the benefit of the translator.
+		string type = "PGRAPH_GRAPH_TYPE_";
+		type += CheckDataRequest(dataUnit,vdList);
+		int drawPrior = tmpDrawingPriority.GetPriority ( type );
+		duMap.insert(pair<const int,MvIcon>(drawPrior,dataUnit));
+
+		DrawPriorMap tmpMap = dataObject->DrawPriority(vdList);
+		for ( j = tmpMap.begin(); j != tmpMap.end(); ++j )
+			drawPriorMap.insert ( *j );
+	}
+ 
+	// Have all the data units, the min/max values for the subpage, and
+	// have saved all therequests for the dataunits. All the dataunits/vd's
+	// was added by DrawPriorMap code above. 
+
+	//However, we need to cheat with the axis. Get axislist for subpage,
+	//set  min/max if not hardcoded, and put the axis on the end of the 
+	//dataunit's request. If we're interactively, all requests must have
+	// the axis tagged on, otherwise Magics tries to make it's own, but
+	// for print, only one data unit should have axis.
+	MvIconList axisList;
+//	MvRequest fullAxisRequest;
+	MvRequest compare("PAXIS");
+	bool defaultVd = GetVisDef(*subPage,compare,axisList);
+
+	if ( defaultVd )
+		axisList.erase(axisList.begin(), axisList.end() );
+
+//	FindAxis(fullAxisRequest,axisList,MinX,MaxX,MinY,MaxY);
+
+#if 0 //F0410
+	first = true;
+	for (  multimap<int,MvIcon>::iterator jj = duMap.begin(); jj != duMap.end(); jj++ )
+	{
+		bool addAxis = ( first || subPage->IsAWindow() );
+		MergeAxisInfo((*jj).second, fullAxisRequest,addAxis);
+		first = false;
+	}
+#endif
+	// Do the drawing
+	CommonDraw(subPage, drawPriorMap);
+
+#if 0 //FAMI 20100922 Is this needed in Metview 4?
+	CommonDraw(subPage, drawPriorMap, reqMap);
+	// Reset the data requests
+	map<int,MvRequest>::iterator kk;
+	for ( kk = reqMap.begin(); kk != reqMap.end(); kk++ )
+	{
+		if ( ! dataBase.RetrieveDataUnit ((*kk).first, dataUnit) )
+			continue;
+
+		dataUnit.SaveRequest((*kk).second);
+	}
+#endif
+}
+
+#if 0
+void CartesianView::CheckAxisRequest ( MvRequest &axis,double minX,double maxX,
+				       double minY, double maxY, bool &foundX,
+				       bool &foundY )
+{
+	double minVal, maxVal;
+	bool isVertical =  ( axis( "AXIS_ORIENTATION" ) == Cached ("VERTICAL" ) );
+
+	if ( isVertical)
+		foundY = true;
+	else 
+		foundX = true;
+
+	// Just return if axis max value is set or max/min values not set
+	if ( (minX == maxX && minY == maxY) || (const char *)axis("AXIS_MAX_VALUE") )
+		return;
+
+	if ( isVertical )
+	{
+		if ( FlipMinMax() )
+		{
+			double temp = minY;
+			minVal = maxY;
+			maxVal = temp;
+		}
+		else
+		{
+			maxVal = maxY;
+			minVal = minY;
+		}
+	}
+	else
+	{
+		maxVal = maxX;
+		minVal = minX;
+	}
+
+	axis("AXIS_MIN_VALUE") = minVal;
+	axis("AXIS_MAX_VALUE") = maxVal;
+}
+
+void CartesianView::CheckMinMax ( double &minX,double &maxX,
+				  double& minY, double &maxY,
+				  AxisInfo& currAI, bool& first )
+{
+	if ( first )
+	{
+		minX = currAI.xMin_;
+		maxX = currAI.xMax_;
+		minY  = currAI.yMin_;
+		maxY = currAI.yMax_;
+		first = false;
+	}
+	else 
+	{
+		if ( currAI.xMin_ < minX ) minX = currAI.xMin_;
+		if ( currAI.xMax_ > maxX ) maxX = currAI.xMax_;
+		if ( currAI.yMin_ < minY ) minY = currAI.yMin_;
+		if ( currAI.yMax_ > maxY ) maxY = currAI.yMax_;
+	}
+}
+
+void CartesianView::FindAxis ( MvRequest &fullAxisRequest, MvIconList &axisList,
+			       double minX,double maxX,double minY, double maxY)
+{
+	bool foundX = false, foundY = false;
+	MvListCursor axisCursor;
+
+	if ( axisList.size()  > 0  )
+	{
+		for (axisCursor = axisList.begin(); axisCursor != axisList.end(); axisCursor++ )
+		{
+			MvRequest oneAxis = (*axisCursor).Request();
+			CheckAxisRequest(oneAxis,minX,maxX,minY,maxY,foundX,foundY);
+			fullAxisRequest = fullAxisRequest + oneAxis;
+		}
+	}
+
+	if ( ! foundX )
+	{
+		MvRequest xAxis = viewRequest_.getSubrequest( hAxisName_.c_str() );
+		CheckAxisRequest(xAxis,minX,maxX,minY,maxY,foundX,foundY);
+
+		fullAxisRequest = fullAxisRequest + xAxis;
+	}
+
+	if ( ! foundY )
+	{
+		MvRequest yAxis = viewRequest_.getSubrequest( vAxisName_.c_str() );
+		CheckAxisRequest(yAxis,minX,maxX,minY,maxY,foundX, foundY);
+
+		fullAxisRequest =  fullAxisRequest + yAxis;
+	}
+}
+
+// Erase any data units that have been deleted
+void CartesianView::UpdateAxisInfo()
+{
+	AxisInfoMap::iterator ii = axisInfoMap_.begin(), currentii;
+	MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+	MvIcon currentDataUnit;
+	while (  ii != axisInfoMap_.end() )
+	{
+		currentii = ii;
+		++ii;
+
+		if (  !dataBase.RetrieveDataUnit ((*currentii).first, currentDataUnit) )
+			axisInfoMap_.erase(currentii);
+	}
+}
+#endif
+
+// This will not work correctly if there are more than one pgraph of different
+// types attached to a curve. The data unit can only have one pgraph field, which
+// is set according to the first pgraph found. To plot the same data unit with 
+// different pgraph types, drop it again and attach different pgraphs to the
+// different data units.
+const char * CartesianView::CheckDataRequest(MvIcon &dataUnit,MvIconList &vdList)
+{
+	MvListCursor ii = vdList.begin();
+	const char* graphType = 0;
+	for ( ; ii != vdList.end(); ii++ )
+	{
+		MvIcon visdef = *ii;
+
+		if ( visdef.Request().getVerb() != Cached("PGRAPH") )
+			continue;
+
+		graphType = visdef.Request()("GRAPH_TYPE");
+		MvRequest dataRequest = dataUnit.Request();
+		if ( graphType )
+			dataRequest( "GRAPH_TYPE" ) = graphType;
+		else
+			dataRequest.unsetParam("GRAPH_TYPE");
+
+		dataUnit.SaveRequest(dataRequest);
+		break;
+	}
+
+	return graphType ? graphType : "CURVE";
+}
+
+#if 0
+void
+CartesianView::MergeAxisInfo(MvIcon &currentdu,MvRequest &axis, bool addAxis)
+{
+	MvRequest currentReq = currentdu.Request(); 
+	while ( axis )
+	{
+		MvRequest oneAxis = axis.justOneRequest();
+		bool isVertical = ( axis( "AXIS_ORIENTATION" ) == Cached ("VERTICAL" ) );
+		const char *axisType = oneAxis("AXIS_TYPE");
+		if ( axisType )
+		{
+			if ( isVertical )
+				currentReq("_YAXIS_TYPE") = axisType;
+			else
+				currentReq("_XAXIS_TYPE") = axisType;
+		}
+
+		axis.advance();
+	}
+
+	axis.rewind();
+
+	if ( addAxis )
+		currentReq = currentReq + axis;
+
+	currentdu.SaveRequest(currentReq);
+}
+
+void
+CartesianView::ReplaceArea ( const Location& coordinates, int izoom)
+{
+     // Handle the original request. If the view was created due to a data visualisation
+     // request then send back the original request. The computation of the x/y min/max
+     // values is provided by Magics. Otherwise, input parameter 'coordinates' should 
+     // contain the original x/y min/max values, defined initially in the View request.
+     if ( izoom == 0 )
+     {
+          const char* origin = viewRequest_("_ORIGIN");
+          if ( origin && strcmp(origin,"DataBuilder") == 0 )
+          {
+               viewRequest_("X_AUTOMATIC") = "ON";
+               viewRequest_("Y_AUTOMATIC") = "ON";
+               return;
+          }
+     }
+
+     viewRequest_ ( "Y_MIN" ) = coordinates.Bottom();
+     viewRequest_ ( "Y_MAX" ) = coordinates.Top();
+     viewRequest_ ( "X_MIN" ) = coordinates.Left();
+     viewRequest_ ( "X_MAX" ) = coordinates.Right();
+
+     viewRequest_ ( "X_AUTOMATIC" ) = "OFF";
+     viewRequest_ ( "Y_AUTOMATIC" ) = "OFF";
+}
+#endif
diff --git a/src/uPlot/CartesianView.h b/src/uPlot/CartesianView.h
new file mode 100644
index 0000000..a55b0f6
--- /dev/null
+++ b/src/uPlot/CartesianView.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  CartesianView
+//
+// .AUTHOR:
+//  Fernando Ii, Sylvie Thepaut
+//
+// .SUMMARY:
+//  Describes the CartesianView class
+//
+// .CLIENTS:
+//  Page
+//
+// .RESPONSIBILITY:
+//
+// .COLLABORATORS:
+//
+// .ASCENDENT:
+//  PlotModView, PlotModTable
+//
+// .DESCENDENT:
+//
+//
+#ifndef CartesianView_H
+#define CartesianView_H
+
+#include "MvIconDataBase.h"
+#include "PlotModView.h"
+
+class CartesianView;
+
+class CartesianView: public PlotModView
+{
+   public:
+
+	// Constructor
+	CartesianView( Page&, const MvRequest&, const MvRequest&,
+			const string &haxisName = "HORIZONTAL_AXIS",
+			const string &vaxisName = "VERTICAL_AXIS",
+			const string &viewName  = "cartesianview");
+
+	CartesianView(const CartesianView&);
+	virtual PlotModView *Clone() const { return new CartesianView(*this); }
+
+	// Destructor
+	~CartesianView();
+
+	// Methods overriden from PlotModView class
+	virtual string Name();
+
+	// Update view
+	virtual void UpdateView ( MvRequest& viewRequest);
+
+	// Replace the current axis ( axis are the background of this view )
+	void ReplaceAxis ( MvRequest& axisRequest );
+
+	// Replace the current graph
+//	void ReplacePgraph ( MvRequest& pgraphRequest );
+
+	// Replace area
+	//void ReplaceArea ( const Location&, int=-1 );
+
+	// Decode the data Unit
+	virtual void DecodeDataUnit ( MvIcon& dataUnit );
+
+	// Draw the background (axis )
+	virtual void DrawBackground ( ) { };
+//	virtual bool EmptyShared() { return false; }
+
+	// Draw the background (axis )
+	virtual void DrawForeground ( ) { };
+
+	virtual void Draw (SubPage *);
+
+	// Describe the contents of the view
+	virtual void DescribeYourself ( ObjectInfo& description );
+
+	void Drop ( PmContext& context );
+
+	void DescribeAxis ( ObjectInfo& description, MvRequest& axisRequest, const Cached& axisName );
+
+	void InsertDataRequest ( MvRequest& dropRequest );
+
+	virtual bool BackgroundFromData() const { return true; }  
+
+	// Remove all visdefs when Page::EraseDraw is called. Segments
+	// names does not correspond to visdefs in hierarchy
+	virtual bool EraseAll() { return true; }
+
+   protected:
+
+     // Update X/Y axes type in the view
+     void  UpdateAxisTypeView ( MvRequest& reqData );
+
+	string hAxisName_, vAxisName_, viewName_;
+//	AxisInfoMap axisInfoMap_;
+
+//	void UpdateAxisForAll(MvRequest &givenRequest, SubPage *subpage );
+
+//	void HandleAxisData(MvIcon &dataUnit,double,double,double,double);
+
+//	void CheckAxisRequest(MvRequest&,double,double,double,double,bool&,bool&);
+
+//	virtual bool FlipMinMax() { return false; }
+//	virtual void CheckMinMax(double&,double&,double&,double&,AxisInfo&,bool&);
+//	virtual void FindAxis(MvRequest&, MvIconList&,double,double,double,double);
+//	virtual void UpdateAxisInfo();
+	const char * CheckDataRequest(MvIcon &dataUnit,MvIconList &vdList);
+//	void MergeAxisInfo(MvIcon &, MvRequest&, bool);
+
+   private:
+	// No assignment
+	CartesianView& operator=(const CartesianView&);
+
+};
+#endif
diff --git a/src/uPlot/CommonXSectView.cc b/src/uPlot/CommonXSectView.cc
new file mode 100644
index 0000000..f32a697
--- /dev/null
+++ b/src/uPlot/CommonXSectView.cc
@@ -0,0 +1,853 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Methods for class CommonXSectView
+
+#include <Assertions.hpp>
+
+#include "CommonXSectView.h"
+#include "DataObject.h"
+#include "Decoder.h"
+#include "ObjectList.h"
+#include "PlotModTask.h"
+#include "PmContext.h"
+#include "SubPage.h"
+
+#include "MvRequestUtil.hpp"
+
+CommonXSectView::CommonXSectView ( Page& owner,
+                                   const MvRequest& viewRequest, 
+                                   const MvRequest& setupRequest ) :
+                    PlotModView    ( owner, viewRequest, setupRequest ),
+                    PlotModService ( setupRequest("service"), this ),
+                    appViewReq_    ( viewRequest )
+{
+    yMin_ = viewRequest_("BOTTOM_PRESSURE");
+    yMax_ = viewRequest_("TOP_PRESSURE");
+}
+
+CommonXSectView::CommonXSectView(const CommonXSectView &old) :
+                 PlotModView(old), 
+                 PlotModService  ( old ),
+                 latMin_(old.latMin_),latMax_(old.latMax_),
+                 lonMin_(old.lonMin_),lonMax_(old.lonMax_),
+                 applicationName_(old.applicationName_),
+                 yMin_(old.yMin_), yMax_(old.yMax_),
+                 appViewReq_(old.appViewReq_)
+{
+    //empty
+}
+
+CommonXSectView::~CommonXSectView()
+{
+  // Empty
+}
+
+bool CommonXSectView::CallService(const MvRequest &req, PmContext & context)
+{
+    if ( req.getVerb() != GRIB )
+        return false;
+
+    MvRequest appRequest = appViewReq_;
+    appRequest("DATA")     = req;
+    appRequest("_CONTEXT") = appViewReq_;
+    appRequest.setVerb ( ApplicationName().c_str() );
+
+    ( new PlotModTask (this, context, serviceName_.c_str(), appRequest ) )->run(); 
+
+    return true;
+}
+
+void CommonXSectView::Drop ( PmContext& context )
+{
+    MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+    // Process the drop
+    MvRequest dropRequest = context.InRequest();
+    MvIcon dataUnit;
+    while ( dropRequest )
+    {
+        // VisDefs are processed in one single goal. This is because 
+        // the processing of a single or a group of visdefs is different.
+        // It is assumed that visdefs always come after a dataunit 
+        // (if it exists)
+        MvRequest vdRequestList;
+        if ( this->RetrieveVisdefList (dropRequest,vdRequestList) )
+        {
+            Owner().InsertVisDef (vdRequestList, dataUnit);
+
+            if ( !dropRequest ) // no more drops
+                break;
+        }
+
+        MvRequest request = dropRequest.justOneRequest();
+        string verb       =  request.getVerb();
+        if ( verb == "DRAWING_PRIORITY" )
+        {
+            Owner().SetDrawPriority ( request );
+
+            // Redraw this page
+            if ( strcmp(request ("_APPL"),"macro") )
+                Owner().RedrawIfWindow();
+        }
+        else if ( ObjectList::IsDataUnit ( verb.c_str() ) == true )
+        {
+            dataUnit = dataBase.InsertDataUnit ( request,Owner().Id() );
+
+            // Save to be used when returning from service
+            this->ParentDataUnitId ( dataUnit.Id() );
+
+            // Call the service to process the request.
+            // After CallService is finished, function PlotModService::endOfTask
+            // should be called and this function should perform the drawing.
+            Owner().HasDrawTask(false);
+            if ( ! CallService(request, context) )
+                InsertDataRequest(request);
+#if 0
+            // Reset view values, may be temporarily set because of axis changes
+            if ( yMin_ != 0 || yMax_ != 0 )
+            {
+                viewRequest_("BOTTOM_PRESSURE") = yMin_;
+                viewRequest_("TOP_PRESSURE") = yMax_;
+            }
+
+            Owner().EraseBackDraw();
+            Owner().NeedsRedrawing(true);
+            Owner().RedrawIfWindow();
+ #endif
+      }
+      else if ( ObjectList::IsVisDefText ( verb.c_str() ) )
+          Owner().InsertPText ( request );
+      else if ( ObjectList::IsVisDefLegend ( verb.c_str() ) )
+          Owner().InsertLegend ( request );
+
+      else if ( ObjectList::IsView ( verb.c_str() ) == true )
+          this->UpdateView ( request );
+
+      else if ( verb == PLOTSUPERPAGE )
+      {
+          context.AdvanceTo(PLOTSUPERPAGE);
+          return;
+      }
+      else if ( verb == NEWPAGE )
+      {
+          context.AdvanceTo(NEWPAGE);
+          return;
+      }
+
+      dropRequest.advance();
+    }
+
+    context.AdvanceToEnd();
+}
+
+#if 0
+bool
+CommonXSectView::RetrieveVisdefList (MvRequest& dropRequest, MvRequest& vdRequestList)
+{
+	bool vdFound = false;        // VisDef flag
+
+	vdRequestList.rewind();
+	if (vdRequestList)
+		vdRequestList = empty_request(NULL); // Clean visdef list
+
+	while ( dropRequest )
+	{
+		MvRequest  request =  dropRequest.justOneRequest();
+		Cached verb        =  request.getVerb();
+
+		// Retrieve visdefs
+		if ( ObjectList::IsVisDef ( verb ) )
+		{
+			vdRequestList = vdRequestList + request;
+
+			// Some visdefs has additional tasks
+			if ( ObjectList::IsAxis ( verb ) ) 
+				// Replace the axis associated to the view.
+				ReplaceAxis ( request );
+			else if ( ObjectList::IsPgraph ( verb ) )
+				ReplacePgraph ( request );
+
+			vdFound = true;
+			dropRequest.advance();
+		}
+		else break;
+	}
+
+	return vdFound;
+}
+#endif
+
+void
+CommonXSectView::InsertDataRequest ( MvRequest& dropRequest )
+{
+    MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+    // Process the request
+    // The CommonXSectView descendants are only associated with netCDF request
+    while ( dropRequest )
+    {
+        string verb = dropRequest.getVerb();
+        if ( verb.find(NETCDF) !=string::npos )
+        {
+            MvRequest dataUnitRequest = dropRequest.justOneRequest();
+            MvIcon tmpIcon(dataUnitRequest);
+            DecodeDataUnit (  tmpIcon );
+
+            MvIcon parentDataUnit;
+            dataBase.RetrieveDataUnit(ParentDataUnitId (), parentDataUnit);
+            parentDataUnit.SvcRequest ( dataUnitRequest );
+        }
+
+        dropRequest.advance();
+    }
+}
+
+// -- METHOD: DecodeDataUnit
+//
+// -- PURPOSE: 
+//    . Extract the data and the metadata from a NetCDF request
+//    . Provides the proper axis and graph definition according 
+//      to the metada. 
+//
+void CommonXSectView::DecodeDataUnit ( MvIcon& givenUnit )
+{
+    MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+    Owner().InitMatching();
+
+    // Build a new data decoder, which will provide information
+    // about the data
+    auto_ptr<Decoder> decoder ( DecoderFactory::Make ( givenUnit.Request() ) );
+    ensure (decoder.get() != 0);
+
+    int subpageId = 0;
+    double minX,maxX,minY,maxY;
+
+    while ( decoder->ReadNextData() )
+    {
+        MvRequest dataRequest = decoder->Request();
+
+        decoder->GetMinMax(minX,maxX,minY,maxY);
+
+        // Insert the dataunit in the data base
+        MvIcon dataUnit = dataBase.InsertDataUnit ( dataRequest );
+
+        dataUnit.ParentId ( this->ParentDataUnitId () );
+
+        // Pass the data and metadata info to the page
+        MatchingInfo dataInfo = decoder->CreateMatchingInfo();
+
+        Owner().InsertDataUnit ( dataUnit.Id(), 0, 0, dataInfo, subpageId );
+    }
+}
+
+#if 0
+void 
+CommonXSectView::DescribeAxis ( ObjectInfo& description, 
+				MvRequest& axisRequest,
+				const Cached& axisName )
+{
+
+  Cached macroName = ObjectInfo::SpaceToUnderscore ( axisName );
+
+  description.ConvertRequestToMacro ( axisRequest, PUT_END,
+				      macroName,"paxis");
+
+}
+
+void CommonXSectView::CheckAxis(double minValue, double maxValue,
+				int axisType, MvRequest &axis,string title)
+{
+  int axisSpan = 0;
+
+  axis.unsetParam("AXIS_TICK_POSITIONING");
+
+  axisSpan = abs( (int)(maxValue - minValue) );
+
+  if ( axisSpan > 0  )
+    {
+      axis("AXIS_TICK") = "ON";
+      axis("AXIS_TICK_LABEL") = "ON";
+      axis( "AXIS_MIN_VALUE" ) = minValue;
+      axis( "AXIS_MAX_VALUE" ) = maxValue;
+    }
+  else
+    {
+      axis("AXIS_TICK_LABEL") = "OFF";
+      axis("AXIS_TICK") = "OFF";
+    }
+  
+
+  // Set any type dependent values
+  if ( axisType == AXIS_LAT || axisType == AXIS_LON )
+    {
+      if ( ! ( (const char *)axis("AXIS_LINE") == Cached("OFF") ) )
+	axis("AXIS_LINE") = "ON";
+
+      if ( axisType == AXIS_LAT )
+	{
+	  if( minValue > 90.0 || minValue < -90.0 ||
+	      maxValue > 90.0 || maxValue < -90.0 )
+	    {
+	      //-- xsect line via a pole, use plain numeric labels --
+	      axis.unsetParam( "AXIS_TICK_LABEL_TYPE" );
+	    }
+	  else
+	    {
+	      //-- not via pole, use latitude labels
+	      axis("AXIS_TICK_LABEL_TYPE") = "LATITUDE";
+	    }
+	  if ( ! ( (const char *)axis("AXIS_TIP_TITLE_TEXT") ) )
+	    axis("AXIS_TIP_TITLE_TEXT")  = "LAT";
+	}  
+      else
+	{
+	  axis("AXIS_TICK_LABEL_TYPE") = "LONGITUDE";
+	  if ( ! ( (const char *)axis("AXIS_TIP_TITLE_TEXT") ) )
+	    axis("AXIS_TIP_TITLE_TEXT")  = "LON";
+	}
+      if ( axisSpan )
+	{
+	  axis("AXIS_TICK") = "ON";
+	  axis("AXIS_TICK_LABEL") = "ON";
+
+	}
+      else
+	{
+	  // Generate a title for the point.
+	  char buf[10];
+	  sprintf(buf,"%01.1f",minValue);
+	  if ( axisType == AXIS_LAT )
+	    strcat(buf, (minValue > 0) ? "N" : "S");
+	  else
+	    strcat(buf, (minValue > 0) ? "E" : "W");
+	  
+	  axis("AXIS_TITLE_TEXT") = buf;
+	}
+    }
+  else if ( axisType == AXIS_LOG )
+    axis("AXIS_TICK_POSITIONING") = "LOGARITHMIC";
+  
+  // Set title if given and not set in current request.
+  if ( title.length() > 0 )
+    if ( ! ( (const char *)axis("AXIS_TITLE_TEXT") ) )
+      axis("AXIS_TITLE_TEXT") = title.c_str(); 
+
+}
+
+void CommonXSectView::AddValues ( MvRequest& dataRequest, vector<double>& dataVector, 
+				  const char* variableName )
+{
+  vector<double>::iterator itd = dataVector.begin();
+
+  while ( itd != dataVector.end() )
+    {
+      double value = *itd;
+      dataRequest.addValue ( variableName, value );
+      ++itd;
+    }
+
+
+}
+bool CommonXSectView::NetCDFtoMatrix(MvIcon & du,MvRequest& yAxis)
+{
+  int i;
+  MvRequest Matrix = du.Request();
+
+  MvRequest dcRequest =  Matrix.getSubrequest("_DC_REQUEST" );
+  auto_ptr<Decoder> decoder ( DecoderFactory::Make ( dcRequest ) );
+
+  int offset = Matrix("_OFFSET");
+  const char *fullName = Matrix("_FILE_NAME");
+
+  string currvar;
+  MvRequest infoRequest;
+  while ( decoder->ReadNextData() )
+    {
+      if ( decoder->CurrentOffset() == offset )
+	break;
+    }
+  
+  if ( offset != decoder->CurrentOffset() )
+    return false;
+
+  infoRequest = decoder->Request(); 
+
+  FILE *fp = fopen(fullName,"w");
+  if ( !fp ) 
+    return false;
+  
+  string mvVerb = (const char *)infoRequest("MV_VERB");
+  bool modlev = ( (const char *)infoRequest("LEVTYPE") && !strcmp(infoRequest("LEVTYPE"),"ML") );
+
+  // We know that this is a netcdf decoder. Cast it and get the
+  // MvNetCDF member enabling access to the variables.
+  NetCDFDecoder *cdfDecoder = (NetCDFDecoder*)decoder.get();
+  MvNetCDF &cdf = cdfDecoder->getCDF();
+
+  //Get the values.
+  MvNcVar *var_x = cdf.getVariable(offset );
+
+  // Empty out the matrix to get rid of old values.
+  Matrix = empty_request(NULL);
+  Matrix.setVerb("MATRIX");
+  
+  // Check if we need to massage data. Only done if :
+  // - NetCDF contains original data, with corresponding y levels AND
+  // - Axis min or max is set, and are different from data min/max.
+  //            OR
+  // NetCDF contains original data and axis type is set to logarithmic
+  bool changeData = false, maxSet = false, minSet = false;
+  double yMin, yMax;
+  bool logAxis = (  (const char*)yAxis("AXIS_TYPE") && 
+		    strcmp(yAxis("AXIS_TYPE"),"LOGARITHMIC") == 0);
+  bool dataLog = (  (const char*)infoRequest("AXIS_TICK_POSITIONING") && 
+		    strcmp(infoRequest("AXIS_TICK_POSITIONING"),"LOGARITHMIC") == 0);
+
+  if ( ( const char *)yAxis("AXIS_MIN_VALUE")) 
+    { 
+      yMin =yAxis("AXIS_MIN_VALUE");
+      minSet = true;
+    }
+  if (  ( const char *)yAxis("AXIS_MAX_VALUE") ) 
+    { 
+      yMax =yAxis("AXIS_MAX_VALUE");
+      maxSet = true;
+    }
+
+  long *edges = var_x->edges();
+  long nrPoints = edges[var_x->getNumberOfDimensions() -1 ]; // Last dimensions is nr of points
+  // Get the  y values.
+  vector<double> yVector;
+  double dataMax = yMax, dataMin = yMin;
+  if ( var_x->getAttributeValues("_Y_VALUES",yVector) )
+    {
+      dataMax = yVector[0] ;
+      dataMin = yVector[yVector.size() - 1 ];
+    }
+  // For contours, interpolate if axis max or min is set and different from data, and NetCDF file contains raw data
+  // For wind, always interpolate if NetCDF file contains raw data.
+  if ( (mvVerb != "PWIND" && ( ( minSet && dataMin != yMin) || (maxSet && dataMax != yMax ) || 
+			       ( logAxis && logAxis != dataLog ) )
+	&& yVector.size() == edges[0] ) || ( mvVerb == "PWIND" && yVector.size() == edges[1] ) )
+    {
+      changeData = true;
+      if ( ! minSet ) { yMin = dataMin; yAxis("AXIS_MIN_VALUE") = dataMin; }
+      if ( !maxSet ) { yMax = dataMax;yAxis("AXIS_MAX_VALUE") = dataMax; }
+      if ( logAxis ) yAxis("AXIS_TYPE") = "LOGARITHMIC";
+    }
+  else  // Don't change values if derived data. This means the plot will be wrong. Only warn if data is still on PL.
+    
+    {
+      if (  ( ( minSet  && yMin != dataMin ) || ( maxSet && yMax != dataMax ) || ( logAxis && dataLog != logAxis ) )
+	    && ! modlev )
+	PlotMod::MetviewError("Axis values ignored!\n\tCan't recreate data, so given axis will produce incorrect plot\n");
+      
+      yAxis("AXIS_MIN_VALUE") = dataMin;
+      yAxis("AXIS_MAX_VALUE") = dataMax;
+      if ( dataLog ) 
+	yAxis("AXIS_TYPE") = "LOGARITHMIC";
+      else
+	yAxis.unsetParam("AXIS_TYPE");
+    }
+  // Write data.
+  vector<double> xvector;
+  var_x->get(xvector,edges);
+  long offset2;
+
+  int nrLevels = 85;
+
+  if (  changeData )
+    {
+      if ( modlev ) nrLevels = int(yMin - yMax);
+      if ( mvVerb == "PWIND" )
+	{
+	  GenerateData(fp,0,yMin,yMax,xvector,yVector,nrPoints,logAxis,modlev);
+	  offset2 = ftell(fp);
+	  GenerateData(fp,xvector.size()/2,yMin,yMax,xvector,yVector, nrPoints,logAxis,modlev);
+	}
+      else
+	GenerateData(fp,0,yMin,yMax,xvector,yVector, nrPoints,logAxis,modlev);
+    }
+  else
+    {
+      if ( mvVerb == "PWIND" )
+	{
+	  nrLevels = edges[1];
+	  for (i = 0; i < xvector.size()/2;i++)
+	    fprintf(fp,"%e ",xvector[i]);
+	  
+	  offset2 = ftell(fp);
+	  for (i = xvector.size()/2; i < xvector.size();i++)
+	    fprintf(fp,"%e ",xvector[i]);
+	}
+      else
+	{
+	  nrLevels = edges[0];
+	  for (i = 0; i < xvector.size();i++)
+	    fprintf(fp,"%e ",xvector[i]);
+	}
+    }
+
+
+  fclose(fp);
+
+  // Now fill in the values that's used by PWIND or PCONT
+  if ( mvVerb == "PCONT" )
+    {
+      Matrix("INPUT_FIELD") = "FILE";
+      Matrix("_INPUT_FIELD_FILE") = fullName;
+      Matrix("_INPUT_FIELD_FORMAT") = "ASCII";
+      Matrix("_INPUT_FIELD_SIZE_1") = edges[1];
+      Matrix("_INPUT_FIELD_SIZE_2") = nrLevels;
+
+      // Set defaults
+      if ( ! (const char *)Matrix("INPUT_FIELD_ORGANIZATION")  )
+	Matrix("INPUT_FIELD_ORGANIZATION") = "FITTED";
+
+      // These lines should maybe not be in, but are needed for the
+      // plot to look OK.
+      //if ( ! (const char *) Matrix("CONTOUR_HILO") )
+      //Matrix("CONTOUR_HILO") = "OFF";
+      if ( ! (const char *) Matrix("CONTOUR_LEVEL_COUNT") )
+      	Matrix("CONTOUR_LEVEL_COUNT") = 20;
+    }
+  else if ( mvVerb == "PWIND") 
+    {
+      if ( ! (const char *) Matrix("INPUT_FIELD_ORGANIZATION") )
+	Matrix("INPUT_FIELD_ORGANIZATION") = "FITTED";
+
+      Matrix("INPUT_WIND_U_COMPONENT") = "FILE";
+      Matrix("_INPUT_WIND_U_COMPONENT_FILE") = fullName;
+      Matrix("_INPUT_WIND_U_COMPONENT_FORMAT") = "ASCII";
+
+      Matrix("INPUT_WIND_V_COMPONENT") = "FILE";
+      Matrix("_INPUT_WIND_V_COMPONENT_FILE") = fullName;
+      Matrix("_INPUT_WIND_V_COMPONENT_FORMAT") = "ASCII";
+
+      Matrix("_INPUT_WIND_U_COMPONENT_SIZE_1") = edges[2];
+      Matrix("_INPUT_WIND_U_COMPONENT_SIZE_2") = nrLevels;
+
+      Matrix("_INPUT_WIND_V_COMPONENT_SIZE_1") = edges[2];
+      Matrix("_INPUT_WIND_V_COMPONENT_SIZE_2") = nrLevels;
+
+      Matrix("_INPUT_WIND_U_COMPONENT_OFFSET") = 0;
+      Matrix("_INPUT_WIND_V_COMPONENT_OFFSET") = offset2;
+    }
+
+  // Put the decoder related fields back
+  Matrix("_OFFSET") = offset;
+  Matrix("_DC_REQUEST" ) = dcRequest;
+  Matrix("_FILE_NAME") = fullName;
+
+  du.SaveRequest(Matrix);
+  return true;
+}
+#endif
+
+#if 0
+void CommonXSectView::CreateLNSP(MvIcon &dataUnit, MvRequest& dcRequest)
+{
+  MvIconDataBase&   dataBase = Owner().IconDataBase();
+  MvRequest duRequest = dataUnit.Request();
+  
+
+  // Add a PAXIS for the lnsp curve.
+  MvRequest xaxis("PAXIS");
+  xaxis("AXIS_LINE")  = "OFF";
+  xaxis("AXIS_TITLE") = "OFF";
+  xaxis("AXIS_ORIENTATION") = "HORIZONTAL";
+  xaxis("AXIS_TIP_TITLE") = "OFF";
+  xaxis("AXIS_TICK")  = "OFF";
+  xaxis("AXIS_TICK_LABEL") = "OFF";
+  xaxis("AXIS_MIN_VALUE") = 0;
+  xaxis("AXIS_MAX_VALUE") = duRequest.countValues("DATA_X_VALUES") - 1;
+
+  duRequest = duRequest + xaxis;
+
+  // Also needs to set up the vertical axis again.
+  MvRequest yaxis("PAXIS");
+  
+  // Switch off everything, the visual axis characteristics is done by
+  // background. This is only for making sure the type and values are
+  // correct. Having grib or values on etc would conflict with any
+  // later drop by user.
+  yaxis("AXIS_LINE")  = "OFF";
+  yaxis("AXIS_TITLE") = "OFF";
+  yaxis("AXIS_TIP_TITLE") = "OFF";
+  yaxis("AXIS_TICK")  = "OFF";
+  yaxis("AXIS_TICK_LABEL") = "OFF";
+  yaxis("AXIS_GRID") = "OFF";
+
+  // Set min/max to view values first, then override with data values if set.
+  double minVal = viewRequest_("BOTTOM_PRESSURE");
+  double maxVal =  viewRequest_("TOP_PRESSURE");
+  
+  if ( dcRequest.countValues("BOTTOM_PRESSURE") )
+    minVal = dcRequest("BOTTOM_PRESSURE");
+  if ( dcRequest.countValues("TOP_PRESSURE") )
+    maxVal = dcRequest("TOP_PRESSURE");
+
+  yaxis("AXIS_MAX_VALUE") = maxVal;
+  yaxis("AXIS_MIN_VALUE") = minVal;
+  yaxis("AXIS_ORIENTATION") = "VERTICAL";
+
+  bool isLog = (  (const char*)dcRequest("AXIS_TICK_POSITIONING") && 
+		  strcmp(dcRequest("AXIS_TICK_POSITIONING"),"LOGARITHMIC") == 0);
+  if ( isLog)
+    yaxis("AXIS_TYPE") = "LOGARITHMIC";
+
+  duRequest = duRequest + yaxis;
+  dataBase.UpdateDataUnit(dataUnit.Id(), duRequest );
+
+  // Hardcoded values for lnsp, don't allow customization at the moment.
+  MvRequest pgraph("PGRAPH");
+  pgraph("GRAPH_TYPE") = "AREA";
+  pgraph("GRAPH_SHADE") = "ON";
+  pgraph("GRAPH_CURVE_METHOD") = "STRAIGHT";
+  pgraph("GRAPH_SHADE_STYLE") = "AREA_FILL";
+  pgraph("GRAPH_SHADE_COLOUR") = "CYAN";
+  
+  MvIcon pgraphIcon(pgraph);
+  dataBase.InsertVisDef(pgraphIcon);
+  dataBase.DataUnitVisDefRelation ( dataUnit.Id(), pgraphIcon.Id());
+
+
+}
+#endif
+
+void CommonXSectView::Draw ( SubPage* subPage )
+{
+    MvIconDataBase& dataBase = Owner().IconDataBase();
+
+    // Get the data units for this subpage
+    list<DataObject*> doList;
+    subPage->GetDataObjects(doList);
+    list<DataObject*>::iterator ii;
+    DataObject *dataObject = 0;
+    DrawPriorMap drawPriorMap;
+    DrawPriorMap::iterator j;
+
+    // Loop over data objects
+    MvIcon dataUnit;
+    for ( ii = doList.begin(); ii != doList.end(); ii++ )
+    {
+        dataObject = (*ii);
+        if ( ! dataBase.RetrieveDataUnit (dataObject->DataUnitId(), dataUnit) )
+            continue;
+
+        // Retrieve visdef associated to this dataunit
+        MvIconList vdList;
+        dataObject->RetrieveMyVisDefList(dataUnit,vdList);
+
+        DrawPriorMap tmpMap = dataObject->DrawPriority(vdList);
+        for ( j = tmpMap.begin(); j != tmpMap.end(); ++j )
+            drawPriorMap.insert ( *j );
+    }
+
+    // Do the drawing
+    CommonDraw(subPage, drawPriorMap);
+}
+
+#if 0
+void CommonXSectView::GenerateData(FILE *fp,int startIndex,double yMin,
+				   double yMax,vector<double> &xvector,
+				   vector<double> &yvector, int nrPoints, bool logax, bool modlev)
+{
+
+  int nrLevels = 85; // Hardcoded, same as in xsection application.
+
+  int scale = 100;
+
+  if ( modlev )
+    {
+      nrLevels = int(yMin - yMax);
+      scale = 1;
+    }
+  int i;
+
+  double PresBot = yMin * scale;
+  double PresTop = yMax * scale;
+
+  double lpa;
+  double zdp = ( PresBot - PresTop)/ ( nrLevels - 1 );
+  double deltalog, pk;
+  int firstindex, nextindex;
+ 
+  if ( logax ) 
+    deltalog = (log10(PresBot) - log10(PresTop))/(nrLevels - 1);
+
+  for ( int k = 0; k < nrLevels; k++ )
+    {
+      if ( logax )
+	pk = exp((log10(PresTop) + (double)k*deltalog)*log(10.)); 
+      else
+	pk = modlev == 0 ? PresTop + k * zdp : PresTop + k;
+
+      if ( FindPressure(yvector,pk,firstindex,nextindex,scale) )
+	{ 
+	  if ( modlev )
+	    lpa = ( pk - (yvector[firstindex] * scale)) /
+	      ((yvector[nextindex]*scale) - (yvector[firstindex]*scale));
+	  else
+	    if ( logax )
+	      lpa = ( pk - (yvector[firstindex]*scale)) /
+		((yvector[nextindex]*scale) - (yvector[firstindex]*scale));
+	    else
+	      lpa = log( pk/(yvector[firstindex]*scale)) /
+		log((yvector[nextindex]*scale)/ (yvector[firstindex]*scale));
+	  
+	  double xfirst, xnext;
+	  for (i = 0; i < nrPoints; i++ )
+	    {
+	      xfirst = xvector[startIndex + (firstindex * nrPoints) + i ];
+	      xnext =  xvector[startIndex + (nextindex * nrPoints) + i ];
+	      
+	      if ( xfirst < BIGDOUBLE && xnext < BIGDOUBLE )
+		fprintf(fp,"%e ",( xfirst + ( xnext - xfirst) *lpa ));
+	      else
+		fprintf(fp,"%e ", DONTCARE);
+	    }
+	  
+	}
+      else
+	for (i=0;i<nrPoints;i++)
+	  fprintf(fp,"%e ", DONTCARE);
+    }
+}
+bool CommonXSectView::CheckLatLon(const string& name,double minVal, double maxVal,
+				  MvRequest& axisRequest, const char *param)
+
+{
+  bool retVal = false;
+  const char *tickType = axisRequest("AXIS_TICK_LABEL_TYPE");
+  if ( axisRequest( "AXIS_ORIENTATION" ) != Cached ("VERTICAL" ) &&
+      ( tickType && name == tickType ) )
+    {
+      if ( axisRequest.countValues("AXIS_MIN_VALUE") && axisRequest.countValues("AXIS_MAX_VALUE") )
+	{
+	  double minY = axisRequest("AXIS_MIN_VALUE");
+	  double maxY = axisRequest("AXIS_MAX_VALUE");
+	  if ( minY != minVal || maxY != maxVal )
+	    {
+	      minVal = minY;
+	      maxVal = maxY;
+	      double lat1 = viewRequest_(param,0);
+	      double lat2 = viewRequest_(param,2);
+	      double lon1 = viewRequest_(param,1);
+	      double lon2 = viewRequest_(param,3);
+	      viewRequest_.unsetParam(param);
+
+	      if ( name == "LONGITUDE" )
+		{
+		  lon1 = minVal; lon2 = maxVal;
+		}
+	      else
+		{
+		  lat1 = minVal; lat2 = maxVal;
+		}
+
+	      viewRequest_.addValue(param,lat1);
+	      viewRequest_.addValue(param,lon1);
+	      viewRequest_.addValue(param,lat2);
+	      viewRequest_.addValue(param,lon2);
+	    }
+	  retVal = true;
+	}
+    }
+  return retVal;
+}
+
+bool CommonXSectView::FindPressure(vector<double> &yvector,double pk,int &firstindex,int &nextindex,int scale)
+{
+  int i  = 0;
+
+  pk /= scale;
+
+  while ( i < yvector.size() - 1 )
+    {
+      if ( (yvector[i] <= pk && pk <= yvector[i+1]) ||  ( yvector[i+1] <= pk && pk <= yvector[i] ) )
+	{
+	  firstindex = i; nextindex = i+1;
+	  return true;
+	}
+      i++;
+    }
+  return false;
+}
+void
+CommonXSectView::ReplaceAxis ( MvRequest& axisRequest )
+{
+  MvRequest oldAxis;
+  bool changeData = false;
+
+  if ( axisRequest( "AXIS_ORIENTATION" ) == Cached ("VERTICAL" ) )
+    {
+      // Check min/max values
+      if ( axisRequest.countValues("AXIS_MIN_VALUE") && axisRequest.countValues("AXIS_MAX_VALUE") )
+	{
+	  double minY = axisRequest("AXIS_MIN_VALUE");
+	  double maxY = axisRequest("AXIS_MAX_VALUE");
+	  
+	  if ( minY != (double)viewRequest_("BOTTOM_PRESSURE") || 
+	       maxY != (double)viewRequest_("TOP_PRESSURE") )
+	    {
+	      viewRequest_("BOTTOM_PRESSURE") = minY;
+	      viewRequest_("TOP_PRESSURE") = maxY;
+	      changeData = true;
+	    }
+	}
+      // Check if axis type is the same ( log or not).
+      bool axisLog = (  (const char*)axisRequest("AXIS_TYPE") && 
+			strcmp(axisRequest("AXIS_TYPE"),"LOGARITHMIC") == 0);
+      bool viewLog = (  (const char*)viewRequest_("PRESSURE_LEVEL_AXIS") && 
+			strcmp(viewRequest_("PRESSURE_LEVEL_AXIS"),"LOG") == 0);
+      if ( axisLog != viewLog )
+	{
+	  if ( axisLog )
+	    viewRequest_("PRESSURE_LEVEL_AXIS") = "LOG";
+	  else
+	   viewRequest_.unsetParam("PRESSURE_LEVEL_AXIS"); 
+	  
+	  changeData = true;
+	}
+    } // end vertical axis
+  else if ( CheckHorizontal(axisRequest) )
+    changeData = true;
+
+  // Recreate data if needed.
+  if ( changeData )
+    RecreateData();
+  else
+    {
+      Owner().NeedsRedrawing(true);
+      Owner().EraseBackDraw();
+    }
+
+  Owner().RedrawIfWindow();
+
+}
+
+bool CommonXSectView::Reset(const MvRequest &req)
+{
+  if ( strcmp(req.getVerb(),"PAXIS") == 0 )
+    {
+      if ( req("AXIS_ORIENTATION") == Cached ("VERTICAL" ) && 
+	   req.countValues("AXIS_MIN_VALUE") && req.countValues("AXIS_MAX_VALUE") )
+	{
+	  viewRequest_("BOTTOM_PRESSURE") = yMin_;
+	  viewRequest_("TOP_PRESSURE") = yMax_;
+	  return true;
+	}
+    }
+  
+  return false;
+}
+#endif
diff --git a/src/uPlot/CommonXSectView.h b/src/uPlot/CommonXSectView.h
new file mode 100644
index 0000000..908f00b
--- /dev/null
+++ b/src/uPlot/CommonXSectView.h
@@ -0,0 +1,160 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:	
+//  CommonXSectView
+//
+// .AUTHOR:
+//  Geir Austad. Modified by Fernando Ii 03-2012
+//
+// .SUMMARY:
+//  Convenience class, for implementing methods common
+//  to XSectView and AverageView.
+//
+// .CLIENTS:
+//  DropAction
+//
+// .RESPONSIBILITY:
+//
+// .ASCENDENT:
+//  PlotModView, PlotModService
+//
+// .DESCENDENT:
+//  XSectView, AverageView
+//
+//
+#ifndef CommonXSetvView_H
+#define CommonXSectView_H
+
+#include "Page.h"
+#include "PlotModService.h"
+#include "PlotModView.h"
+
+class CommonXSectView: public PlotModView, public PlotModService {
+
+public:
+
+    // -- Constructor
+    CommonXSectView( Page&, const MvRequest&, const MvRequest& );
+    CommonXSectView(const CommonXSectView &);
+
+    // -- Destructor
+    ~CommonXSectView();
+
+    // --  Methods overriden from PlotModView class
+    virtual string Name()
+            { return  "CommonXSectView" + Owner().Id(); }
+
+    virtual bool CallService(const MvRequest &,  PmContext &);
+
+    // Insert a new data request into the page hierarchy
+    virtual void InsertDataRequest ( MvRequest& dropRequest );
+
+    //bool Reset(const MvRequest &);
+
+    // --  Methods that the subclasses must provide
+
+    // Update the current view
+    virtual void UpdateView ( MvRequest& ) {}
+
+    // Replace the current view
+    virtual void UpdateView () = 0;
+
+    // Replace axis
+    //virtual void ReplaceAxis ( MvRequest&);
+
+    // Replace the current graph;
+    //virtual void ReplacePgraph ( MvRequest& ) {}
+
+    // Decode the data Unit
+    virtual void DecodeDataUnit ( MvIcon& dataUnit );
+
+    // Process a drop
+    virtual void Drop ( PmContext& context );
+
+    // Retrieves a list of visdefs
+    //virtual bool RetrieveVisdefList (MvRequest& dropReq, MvRequest& vdReqList);
+
+    // Draw the background (axis )
+    virtual void DrawBackground ( ) = 0;
+
+    // Draw the foreground.
+    virtual void DrawForeground ( ) { }
+
+    // Describe the contents of the view
+    virtual void DescribeYourself ( ObjectInfo& description ) = 0;
+
+    // Set data unit id
+    void ParentDataUnitId ( int parentDataUnitId ) {
+               viewRequest_("_PARENT_DATAUNIT_ID") = parentDataUnitId;
+               appViewReq_("_PARENT_DATAUNIT_ID") = parentDataUnitId;
+               parentDataUnitId_ = parentDataUnitId; 
+              }
+
+    int  ParentDataUnitId () { return parentDataUnitId_; }
+
+protected:
+
+    void ApplicationName( const string& appname )
+         { applicationName_ = appname; }
+
+    string& ApplicationName() { return applicationName_; }
+
+    virtual void Draw(SubPage *);
+
+#if 0
+    // Provide Axis information
+    void DescribeAxis ( ObjectInfo& description,
+                        MvRequest& axisRequest,
+                        const Cached& axisName );
+
+    // Check and set axis values.
+    void CheckAxis(double minValue,double maxValue,
+                   int axisType,MvRequest&,
+                   string title = "");
+
+    bool CheckLatLon(const string&,double,double,MvRequest&, const char *);  
+
+    void CreateLNSP(MvIcon&, MvRequest&);
+
+    virtual void SetVariables(const MvRequest&, bool) {}
+
+    // Check horizontal value
+    virtual bool CheckHorizontal(MvRequest &) = 0;
+
+    // Add values to a request
+    void AddValues ( MvRequest& dataRequest, vector<double>& dataVector, const char* variableName ); 
+
+    // Functions for generating matrix data.
+
+    // convert a netcdf file into a matrix file for use by magics.
+    bool NetCDFtoMatrix(MvIcon&,MvRequest&);
+
+    void GenerateData(FILE *fp,int startIndex,double yMin,
+                      double yMax,vector<double> &xvector,
+                      vector<double> &yvector, int nrPoints, 
+                      bool logax = false, bool modlev = false);
+
+    bool FindPressure(vector<double> &yvector,double pk,
+                      int &firstindex,int &nextindex, int);
+#endif
+
+    double latMin_,latMax_, lonMin_,lonMax_;
+    string applicationName_;
+    double yMin_, yMax_;
+    MvRequest appViewReq_;  //original application view request
+
+private:
+
+  // No assignment
+    CommonXSectView& operator=(const CommonXSectView&);
+};
+
+#endif
diff --git a/src/uPlot/Counted.h b/src/uPlot/Counted.h
new file mode 100644
index 0000000..dab6d2b
--- /dev/null
+++ b/src/uPlot/Counted.h
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Counted
+// Gilberto Camara - ECMWF Sep 97
+//
+// .NAME:	
+//  Counted
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//
+//
+//
+// .CLIENTS:
+//
+//
+//
+// .RESPONSABILITIES:
+//
+//
+//
+//
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef Counted_H
+#define Counted_H
+
+
+class Counted {
+
+public:
+
+	// Contructors
+	Counted(): refCount_ ( 0 ) {}
+
+	// Methods
+	void Attach ()
+		{ refCount_++; }
+
+	void Detach ()
+		{ if ( --refCount_ == 0 )
+			delete this; }
+
+protected:
+
+	// Destructor
+	virtual ~Counted() { }
+
+private:
+
+	// No copy allowed
+	Counted(const Counted&);
+	Counted& operator=(const Counted&){return *this;}
+
+	// Members
+	int refCount_;
+};
+
+#endif
diff --git a/src/uPlot/CreateAction.cc b/src/uPlot/CreateAction.cc
new file mode 100644
index 0000000..d149d2c
--- /dev/null
+++ b/src/uPlot/CreateAction.cc
@@ -0,0 +1,44 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+//   Methods for the Create Action class
+//
+#include "CreateAction.h"
+
+#include <Assertions.hpp>
+#include "ObjectList.h"
+#include "PlotModBuilder.h"
+
+//
+// This is the exemplar object for the Create Action class
+// which is loaded in the prototype map
+//
+static CreateAction createActionInstance("Create");
+
+PlotModAction& 
+CreateAction::Instance()
+{
+   return createActionInstance;
+}
+
+void
+CreateAction::Execute ( PmContext& context )
+{
+   // Build the Tree branch associated with the Request
+   // First, find which builder will process the request
+   const char* requestName = context.InRequest().getVerb();
+   const char* builderName = ObjectList::Find ("request",  requestName, "builder");
+
+   PlotModBuilder& builder = PlotModBuilder::Find ( builderName );
+
+   // Execute the builder (return the tree node which has been created)
+   Presentable* superpage = builder.Execute ( context );
+   ensure (superpage != 0 );
+}
diff --git a/src/uPlot/CreateAction.h b/src/uPlot/CreateAction.h
new file mode 100644
index 0000000..9d9f37e
--- /dev/null
+++ b/src/uPlot/CreateAction.h
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  CreateAction
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the CreateAction class, a derived class
+//  for the various types of requests in PlotMod which require
+//  creation of a new branch in the Tree.
+//
+//
+// .CLIENTS:
+//  PlotModAction class, called by PlotMod main module (PlotMod.cc)
+//
+// .RESPONSABILITY:
+//  This class will provide all support for the visualisation
+//  actions whithin PlotMod 
+//
+//   A visualisation action consists of:
+//  - Building a Tree
+//  - Matching DataUnits and VisDefs within a tree node
+//  - Drawing the tree node
+//
+//  For each step, the request list is processed sequentially.
+//
+// .COLLABORATORS:
+//  Builder, Matcher, Presentable
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+
+#ifndef CreateAction_H
+#define CreateAction_H
+
+#include "PmContext.h"
+#include "PlotModAction.h"
+
+class CreateAction: public PlotModAction
+{
+
+public:
+
+	// Constructors
+	CreateAction (const Cached name): PlotModAction(name) {}
+
+	// Destructor
+	~CreateAction() {}
+
+	// Methods
+	static PlotModAction& Instance();
+
+	// Overriden from PlotModAction
+        virtual void Execute ( PmContext& context );
+};
+
+#endif
diff --git a/src/uPlot/CreateTypeAction.cc b/src/uPlot/CreateTypeAction.cc
new file mode 100644
index 0000000..ed62b5d
--- /dev/null
+++ b/src/uPlot/CreateTypeAction.cc
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "CreateTypeAction.h"
+
+// This is the exemplar object for the Type Action class
+static CreateTypeAction createTypeActionInstance("CreateType");
+
+PlotModAction& 
+CreateTypeAction::Instance()
+{
+	return createTypeActionInstance;
+}
+
+// METHOD : Execute
+//
+// PURPOSE: // Build a new request based on the TYPE parameter.
+		  // Skip the current request and add the new one.
+
+void
+CreateTypeAction::Execute ( PmContext& context )
+{
+	// Create a request based on the TYPE parameter
+	MvRequest req = context.InRequest();
+
+	const char* type = req("TYPE");
+	if ( !type )
+	{
+		cout << "ERROR MESSAGE: Missing parameter TYPE" << endl;
+		return;
+	}
+	
+	MvRequest typeReq = req.justOneRequest();
+	typeReq.setVerb(type);
+	typeReq.unsetParam("TYPE");
+	typeReq("_CLASS") = type;
+	typeReq("_VERB")  = type;
+	req.advance();
+
+	// It will skip all the previous requests and only save the
+	// remaining ones.
+	while (req)
+	{
+		typeReq = typeReq + req.justOneRequest();
+		req.advance();
+	}
+
+	context.Advance();		// Skip this request
+	context.Update(typeReq);	// Update context
+typeReq.print();
+}
diff --git a/src/uPlot/CreateTypeAction.h b/src/uPlot/CreateTypeAction.h
new file mode 100644
index 0000000..6b44d24
--- /dev/null
+++ b/src/uPlot/CreateTypeAction.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  CreateTypeAction
+//
+// .AUTHOR:
+//  Fernando Ii
+//
+// .SUMMARY:
+//  Describes the CreateTypeAction class, a derived class
+//  for the various types of requests in PlotMod which skip
+//  the processing of a request.
+//
+// .CLIENTS:
+//  PlotModAction class, called by PlotMod main module (PlotMod.cc)
+//
+// .RESPONSIBILITY:
+//  Will update the request according to the TYPE parameter
+//
+// .COLLABORATORS:
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+// .REFERENCES:
+//
+
+#ifndef CreateTypeAction_H
+#define CreateTypeAction_H
+#include "PlotModAction.h"
+
+class CreateTypeAction: public PlotModAction
+{
+public:
+
+	// Constructors
+	CreateTypeAction(const Cached& name): PlotModAction(name) {  }
+
+	// Destructor
+	~CreateTypeAction() {}
+
+	// Methods
+	static PlotModAction& Instance();
+
+	// Overriden from Base Class (PlotModAction)
+	virtual void Execute ( PmContext& context );
+};
+
+#endif
diff --git a/src/uPlot/DataBuilder.cc b/src/uPlot/DataBuilder.cc
new file mode 100644
index 0000000..85e8681
--- /dev/null
+++ b/src/uPlot/DataBuilder.cc
@@ -0,0 +1,102 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Assertions.hpp>
+#include <MvRequest.h>
+
+#include "DataBuilder.h"
+#include "ObjectList.h"
+#include "PmContext.h"
+#include "Decoder.h"
+#include "SuperPage.h"
+#include "Root.h"
+#include "Task.h"
+
+// This is the singleton instance of the prototype 
+static DataBuilder dataBuilderInstance("DataBuilder");
+
+Presentable*
+DataBuilder::Execute (PmContext& context)
+{
+  MvRequest dataReq = context.InRequest();
+
+  // Creation of a new PlotPage and associated pages
+  Presentable* superpage = 0;
+  MvRequest defaultSuperPage = ObjectList::CreateDefaultRequest ( "PLOT_SUPERPAGE" );
+
+  // Make sure the macro is generated in current dir, even when defaults are used.
+  const char *val;
+  if ( ( val =  dataReq("_NAME")) )
+  {
+      string newName = dirname(val);
+      newName  += "/<Display Window>";
+      defaultSuperPage("_NAME") = newName.c_str();
+  }
+
+  // Create default page and add view to this request
+  MvRequest pageRequest = ObjectList::CreateDefaultRequest ( "PLOT_PAGE" );
+
+  // First try to get view from the context
+  const char* viewName = GetView(context);
+
+#if 0 //uPlot
+// This code is doing nothing for GRIB data.
+// I am not sure if this code should work for other data formats.
+// For the moment, it has been removed.
+
+  // Then try to get from contents of file
+  if ( ! (const char *)viewName )
+  {
+      auto_ptr<Decoder> decoder ( DecoderFactory::Make ( context.InRequest() ) );
+      viewName = decoder->GetView();
+  }
+#endif
+
+	// Create view request
+	if ( viewName )
+	{
+		// Check if there is a view request
+		MvRequest viewRequest = dataReq("_VIEW_REQUEST");
+		if ( !viewRequest )
+		{
+			// Build a default
+			viewRequest = ObjectList::CreateDefaultRequest( viewName,EXPAND_NO_DEFAULT );
+			viewRequest("_ORIGIN") = "DataBuilder";
+			viewRequest("_DEFAULT") = 1;
+		}
+		pageRequest("VIEW") = viewRequest;
+	}
+
+  defaultSuperPage("PAGES") = pageRequest;
+
+  superpage = new SuperPage ( defaultSuperPage );
+  ensure ( superpage != 0 );
+
+  // Put the new branch in the tree
+  Root::Instance().Insert ( superpage );
+
+  // Add the page Ids in the reply
+  // Create a Reply
+  MvRequest reply;
+  superpage->CreateReply ( reply );
+  context.AddToReply ( reply );
+
+  // Drop the data and add draw task if needed
+#if 0
+if ( !superpage->HasDrawTask () )
+  {
+      AddTask( *superpage, &Presentable::DrawProlog );
+      AddTask( *superpage, &Presentable::Draw );
+      superpage->HasDrawTask ( true );
+  }
+#endif
+  superpage->Drop(context);
+
+  return superpage;
+}
diff --git a/src/uPlot/DataBuilder.h b/src/uPlot/DataBuilder.h
new file mode 100644
index 0000000..bfe6bc0
--- /dev/null
+++ b/src/uPlot/DataBuilder.h
@@ -0,0 +1,60 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  DataBuilder
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the DataBuilder class, an concrete class for
+//  building the PlotMod page hierarchy from a "GRIB" or "BUFR" request
+//
+// .DESCRIPTION:
+//  This class is based on the "Builder" pattern (see
+//  "Design Patterns" book, page 97).
+//
+//
+//
+// .DESCENDENT:
+//
+// .RELATED:
+//  Presentable, SuperPage, Page, DataObject
+//
+// .ASCENDENT:
+//  PlotModBuilder
+//
+#ifndef DataBuilder_H
+#define DataBuilder_H
+
+#include "PlotModBuilder.h"
+
+class DataBuilder: public PlotModBuilder {
+
+public:
+
+	// Constructors
+	DataBuilder(Cached name): PlotModBuilder(name) {}
+
+	// Destructor
+        ~DataBuilder() {}
+
+	// Methods
+	// Overriden from PlotModBuilder class
+	virtual Presentable* Execute (PmContext& );
+
+private:
+
+	// No copy allowed
+	DataBuilder(const DataBuilder&);
+	DataBuilder& operator=(const DataBuilder&);
+};
+#endif
diff --git a/src/uPlot/DataObject.cc b/src/uPlot/DataObject.cc
new file mode 100644
index 0000000..6f5433b
--- /dev/null
+++ b/src/uPlot/DataObject.cc
@@ -0,0 +1,756 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvRequestUtil.hpp>
+#include <Assertions.hpp>
+
+#include "DataObject.h"
+#include "DrawingPriority.h"
+#include "GraphicsEngine.h"
+#include "MvLayer.h"
+#include "ObjectList.h"
+
+DataObject::DataObject ( int dataUnitId, long offset, long offset2,
+                         const MvRequest& dataInfo ):
+	Presentable   ( dataInfo ),
+	myDataUnitId_ ( dataUnitId ),
+	dimFlag_      ( 0 )
+{
+     // Set the verb, default is GRIB
+     const char* dt = dataInfo("DATA_TYPE");
+     if ( dt )
+          myRequest_.setVerb( dt );
+     else
+          myRequest_.setVerb( "GRIB" );
+
+     // Add dimension and position information
+     // If the second index is not equal to the first one,
+     // this data is a 2D field.
+     // FAMI 032012: at the moment, dimension info is only related
+     // to GRIB data. Review this code if this condition changes.
+     if ( strcmp(dt,"GRIB") != 0 )
+         return;
+ 
+     int ndim = 1;
+     myRequest_( "GRIB_POSITION" ) = offset;
+     if ( offset != offset2 )
+     {
+          ndim = 2;
+          myRequest_( "GRIB_POSITION" ) += offset2;
+          if ( (const char*)dataInfo("WIND_MODE") )
+              myRequest_("GRIB_WIND_MODE" ) = (const char*)dataInfo("WIND_MODE");
+     }
+
+     myRequest_( "GRIB_DIMENSION" )  = ndim;
+     dimFlag_ = dimFlag_ | ndim;
+}
+
+DataObject::DataObject ( MvRequest& reqst ):
+  Presentable ( reqst ),
+  dimFlag_    ( 0 )
+{
+     //empty
+}
+
+DataObject::DataObject ( const DataObject &old ):
+  Presentable   (old ),
+  myDataUnitId_ (old.myDataUnitId_),
+  dimFlag_      ( 0 ),
+  legends_      (old.legends_),
+  titleText_    (old.titleText_),
+  titleRequest_ (old.titleRequest_)
+{
+  //segmentNameMap_ not copied.
+}
+
+bool
+DataObject::AppendDataUnit ( int dataunitId, long offset, long offset2, const MvRequest& req )
+{
+     // Do not append if this is a new data
+     if ( !this->Match(dataunitId,req) )
+          return false;
+
+     // Update position and dimension parameters
+     int ndim = 1;
+     myRequest_( "GRIB_POSITION" ) += offset;
+     if ( offset != offset2 ) //two dimensional data
+     {
+          ndim = 2;
+          myRequest_( "GRIB_POSITION" ) += offset2;
+     }
+
+     myRequest_( "GRIB_DIMENSION" ) += ndim;
+     dimFlag_ = dimFlag_ | ndim;
+
+     return true;
+}
+
+// Check if the current data and new data match
+// True -> they match, False-> they do not match
+bool
+DataObject::Match ( int dataunitId, const MvRequest& req )
+{
+	// New data and current data are not from the same file -> return false
+	if ( myDataUnitId_ != dataunitId ) 
+		return false;
+
+	// The request verbs are not the same -> return false
+	if ( strcmp (myRequest_.getVerb(), req("DATA_TYPE") ))
+		return false;
+
+	return true;
+}
+
+DrawPriorMap
+DataObject::DrawPriority( MvIconList& visdefList)
+{
+	DrawPriorMap drawPriorMap;
+
+	// Each data unit has a unique identifier - which is
+	// the key to retrieve it 
+	require (myDataUnitId_ > 0);
+
+	// Get DrawingPriority from Page
+	DrawingPriority& tmpDrawingPriority = this->GetDrawPriority();
+
+	// Create Priority string based on only the first visdef. 
+	// It assumes that all the other visdefs will have the same "priority"
+	MvListCursor vdCursor;
+	vdCursor = visdefList.begin();
+	MvIcon& visDef = *( vdCursor );
+	MvRequest visRequest = visDef.Request();
+			
+	int visDefId = visDef.Id ();
+	Cached drawPrior = tmpDrawingPriority.DrawSegmentName ( myDataUnitId_,
+						     visRequest,
+						     visDefId  );
+	string dataString ( (const char*) drawPrior );
+	pair <int, int> tmpPair ( this->Id(), visDefId );
+	drawPriorMap [ dataString ] = tmpPair;
+
+	return drawPriorMap;
+}
+
+DrawPriorMap
+DataObject::DrawPriority( )
+{
+	// Each data unit has a unique identifier - which is
+	// the key to retrieve it 
+	require (myDataUnitId_ > 0);
+
+	// Retrieve the Icon Data Base
+	MvIconDataBase& dataBase = IconDataBase();
+
+	// Retrieve the DataUnit
+	// (the object only stores its dataunit Id and index)
+	MvIcon  dataUnit;
+	if ( dataBase.RetrieveDataUnit (myDataUnitId_, dataUnit) == false)
+	{
+//		cout << "DataObject::Draw() -> No Data Unit" << endl;
+		return DrawPriorMap();
+	}
+
+	// Retrieve the VisDefs associated to the DataUnit
+	MvIconList visdefList;
+	RetrieveMyVisDefList ( dataUnit, visdefList );
+
+	return DrawPriority(visdefList);
+}
+
+#if 0
+// Don't attempt to get visdefs, they're given as input
+void DataObject::DrawVisDef(MvIcon& visDef, string& /* segmentName */)
+{
+  // Retrieve the Graphics Engine
+  GraphicsEngine& ge = this->GetGraphicsEngine();
+
+  MvIconDataBase&   dataBase = IconDataBase();
+
+  MvIcon  dataUnit;
+  if ( dataBase.RetrieveDataUnit (myDataUnitId_, dataUnit) == false)
+    {
+      cout << "DataObject::Draw() -> No Data Unit" << endl;
+      return;
+    }
+
+//D  segmentNameMap_[visDef.Id()] = segmentName;
+
+  // Call the graphics Engine
+  ge.Draw ( dataUnit, myRequest_, visDef, this->GetCanvas() );
+}
+#endif
+
+void DataObject::DrawDataVisDef()
+{
+	// Retrieve the Graphics Engine and the data base info
+	GraphicsEngine& ge = GetGraphicsEngine();
+	MvIconDataBase& dataBase = IconDataBase();
+
+	// Retrieve the DataUnit
+	MvIcon  dataUnit;
+	if ( dataBase.RetrieveDataUnit (myDataUnitId_, dataUnit) == false)
+	{
+		cout << "ERROR: DataObject::Draw(DataVisDef) -> No Data Unit" << endl;
+		return;
+	}
+
+	// Retrieve all VisDefs associated to the DataUnit
+	MvIconList visdefList;
+	RetrieveMyVisDefList ( dataUnit, visdefList );
+
+     // Update DataBase if this is the first plot (i.e. not a result of a dropping
+     // icon) with the NDimensional flag. This could not be done earlier, during
+     // the Drop procedure, because this information is only available after
+     // having decoded the whole DataObject and the task of inserting the DataObject
+     // to the DataBase was done earlier.
+     bool first = false;
+     MvRequest dataRequest = dataUnit.Request();
+     if ( !(const char*)dataRequest("_NDIM_FLAG" ) )
+     {
+          dataRequest("_NDIM_FLAG" ) = dimFlag_;
+          dataBase.UpdateDataUnit(dataUnit.Id(),dataRequest);
+          first = true;
+     }
+
+     // Call the Graphics Engine to store the Layer info.
+     DrawLayerInfo( dataUnit.Id() );
+
+     // Call the Graphics Engine to store the Data and Visdef info.
+     ge.DrawDataVisDef ( dataUnit,myRequest_,visdefList,dimFlag_ );
+
+     // Update DataBase if this is the first plot.
+     // In the first plot, before calling ge.Draw, the list of visdefs contains 
+     // all valid visdefs. After calling ge.Draw, it contains only the visdefs
+     // used in the plotting. If this is not the first plot, the Drop scheme (executed
+     // earllier) should update (add/replace/delete) the list of visdefs accordingly.
+     if ( first )
+     {
+          // Insert new VD
+          MvListCursor iCursor;
+          for ( iCursor = visdefList.begin(); iCursor != visdefList.end(); ++iCursor)
+          {
+               MvRequest req = (*( iCursor )).Request();
+               dataBase.InsertVisDef ( req, myDataUnitId_, dataUnit);
+          }
+     }
+}
+
+#if 0
+// Ask Magics to give the title
+void DataObject::RetrieveTitleFromMagics ( MvIcon& visDef )
+{
+	// Retrieve the Graphics Engine and Data Base
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+	MvIconDataBase&   dataBase = IconDataBase();
+
+	// Retrive data unit
+	MvIcon  dataUnit;
+	if ( dataBase.RetrieveDataUnit (myDataUnitId_, dataUnit) == false)
+	{
+		cout << "DataObject::Draw() -> No Data Unit" << endl;
+		return;
+	}
+
+        // Add internal parameter to indicate Magics to
+        // build only the title, not the picture
+        MvRequest du = dataUnit.Request();
+	du ( "$METVIEW_TITLE_ONLY") = "ON";
+	MvIcon duIcon (du);
+        ge.DrawDataUnit ( duIcon, myDataIndex_, myRequest_, visDef, this->GetCanvas() );
+}
+
+// EraseDraw - 
+// Erase data object drawing on canvas
+// If visDefId is zero, all drawing of this DataObject should be
+//	removed
+void 
+DataObject::EraseDraw( int visDefId )
+{
+  require (myDataUnitId_ > 0);
+  
+  // Retrieve the canvas
+  Canvas& canvas = this->GetCanvas();
+  
+  // Erase all pairs
+  SegmentNameMap::iterator ii;
+  for ( ii = segmentNameMap_.begin(); ii != segmentNameMap_.end(); ++ii )
+    {
+
+      int visId = (*ii).first; 
+      if ( visDefId && (visDefId != visId ) ) continue;
+      
+      string dataString = (*ii).second;
+      
+//D      if ( canvas.RemoveForAll(myParent_->Id(),dataString) ) 
+	{
+	  this->RemoveLegend ( dataString );
+	  myParent_->NeedsRedrawing ( true );
+	}
+    }
+}
+
+void 
+DataObject::EraseDefaultDraw ()
+{
+	EraseDraw();
+}
+#endif
+
+bool
+DataObject::RetrieveMyVisDefList ( MvIcon& dataUnit, MvIconList& visdefList )
+{
+	bool usingDefault = false;
+
+	// Retrieve the Icon Data Base
+	MvIconDataBase& dataBase = IconDataBase();
+
+	// Retrieve the VisDefs associated to the DataUnit
+	if ( dataBase.RetrieveVisDefList ( dataUnit, visdefList ) )
+	{
+		// Check if there is any valid visdef
+		if ( ObjectList::CheckValidVisDefList ( myRequest_.getVerb(), visdefList ) )
+			return usingDefault;  //found a valid visdef
+	}
+
+        // Check if there is a parent DataUnit
+	int parentDataUnitId = dataUnit.ParentId();
+	if ( parentDataUnitId )
+	{
+		// There is a parent, look for its Visdefs
+		MvIcon parentDataUnit;
+		dataBase.RetrieveDataUnit ( parentDataUnitId, parentDataUnit );
+		dataBase.RetrieveVisDefList ( parentDataUnit, visdefList );
+
+		// Check that the parent has a valid visdef for this dataunit
+		if ( ObjectList::CheckValidVisDefList ( myRequest_.getVerb(),visdefList ) )
+			return usingDefault;  //found a valid visdef
+	}
+
+	// If failed, there is no visdef associated to the data unit
+	// Retrieve the default visdef (it could be either
+	// in the Page, SuperPage or in the Root).
+ 	usingDefault = this->DefaultVisDefList ( myRequest_.getVerb(), visdefList );
+
+	// If it is a default visdef, update some parameters
+	if ( usingDefault )
+		this->UpdateVisDef (dataUnit.Request(),visdefList);
+
+	return usingDefault;
+}
+
+#if 0
+void
+DataObject::SetTitle ( const MvRequest& treq )
+{
+	MvRequest rqst = treq;
+
+	// Should have only one package, use the latest
+	int nPacks  = rqst ( "$METVIEW_TITLE_PACKAGE_COUNT" );
+	Cached titlePackageName = "$METVIEW_TITLE_PACKAGE_";
+	titlePackageName = titlePackageName + nPacks;
+
+	int nValues = rqst.countValues ( titlePackageName );
+	if ( nValues )
+	{
+		titleText_.resize ( nValues );
+
+		for ( int i = 0; i < nValues; i++ )
+			titleText_ [i] = rqst ( titlePackageName, i );
+
+		// Save Text information related to Grib ('GRIB_TEXT_...')
+		MvRequest auxReq = rqst.getSubrequest("$METVIEW_TITLE_PACKAGE_1_REQUEST");
+                titleRequest_ = empty_request(NULL); 
+                CopySomeParameters (auxReq,titleRequest_,"GRIB_TEXT");
+	}
+	else if ( IsParameterSet ( rqst, "TEXT_LINE_1" ) )
+	{
+		if ( IsParameterSet ( rqst, "TEXT_LINE_COUNT" ) )
+			CopySomeParameters ( rqst, myRequest_, "TEXT_LINE_" );
+		else
+		{
+			myRequest_ ( "TEXT_LINE_1" ) = (const char*)rqst ( "TEXT_LINE_1" );
+			myRequest_.unsetParam ( "TEXT_LINE_COUNT" );
+		}
+	}
+}
+#endif
+
+void
+DataObject::GetTitle ( MvRequest& rqst, int* order )
+{
+	int i;
+
+	// Set TEXT_ORIGIN, internal parameter between PlotMod and Magics
+	this->SetTextOrigin (rqst);
+
+        char name[50];
+        sprintf(name,"TEXT_LINE_%d",*order);
+
+	int nValues = titleText_.size ();
+	if ( nValues ) // There is an automatic title package
+	{
+		rqst ( "$METVIEW_TITLE_PACKAGE_COUNT" ) = *order;  
+
+		Cached titlePackageName = "$METVIEW_TITLE_PACKAGE_";
+		titlePackageName = titlePackageName + *order;
+
+		rqst ( titlePackageName ) = titleText_[0];
+		for ( i = 1; i < nValues; i++ )
+			rqst ( titlePackageName ) += titleText_[i];
+
+		// Add title information related to the Grib ('GRIB_TEXT_...')
+                CopySomeParameters (titleRequest_,rqst,"GRIB_TEXT");
+
+		( *order )++;
+	}
+	else //Title defined by the user
+	{
+                // Merge 2 TEXT requests
+                const char* origin =  rqst("TEXT_ORIGIN");
+		if (origin == Cached("AUTOMATIC"))
+		{
+			// Clear user TEXT_LINE_*
+			char saux[13];
+			strcpy(saux,"TEXT_LINE_");
+			int size = strlen(saux);
+			int j    = myRequest_("TEXT_LINE_COUNT");
+			rqst.unsetParam ("TEXT_LINE_COUNT");
+			for (i = 1; i <= j; i ++)
+			{
+				sprintf(saux+size,"%d",i);
+				rqst.unsetParam ( saux );
+			}
+
+			// Copy TEXT parameters
+			CopySomeParameters (myRequest_, rqst, "TEXT_", (bool)false);
+		}
+		else if (origin == Cached("BOTH") || origin == Cached("MERGE") )
+			 MergeTextParameters (myRequest_, rqst, false);
+		
+///F		( *order ) = rqst("TEXT_LINE_COUNT");
+
+		// Now we have already set the Text request.
+		// For the Magics point of view, if the title came from
+		// an  Application which produces its own title (p.e.,
+		// XSection), it is necessary to reset TEXT_ORIGIN
+		// to USER.
+		if ( !this->MagicsTitle () )
+			rqst("TEXT_ORIGIN") = Cached("USER");
+	}
+}
+
+void
+DataObject::SetTextOrigin ( MvRequest& request )
+{
+	// If TEXT_ORIGIN has already been set, return.
+	if ( IsParameterSet (request, "TEXT_ORIGIN" ) )
+	{
+	    string val = (const char*)request("TEXT_ORIGIN");
+	    if( val != "NOTSET" )
+		return;
+	}
+
+	// Check if TEXT_AUTOMATIC, TEXT_USER and TEXT_MERGE has 
+	// been set (these are PlotMod parameters and 
+	// must not be sent to Magics)
+	MvRequest reqAux = request;
+	bool expand = false;
+	if ( IsParameterSet (reqAux, "TEXT_AUTOMATIC" ) )
+		request.unsetParam ( "TEXT_AUTOMATIC" );
+	else
+		expand = true;
+
+	if ( IsParameterSet (reqAux, "TEXT_USER" ) )
+		request.unsetParam ( "TEXT_USER" );
+	else
+		expand = true;
+
+	if ( IsParameterSet (reqAux, "TEXT_MERGE" ) )
+		request.unsetParam ( "TEXT_MERGE" );
+	else
+		expand = true;
+
+	// Expand request in order to retrieve the default values
+	if ( expand )
+		reqAux = ObjectList::ExpandRequest(reqAux,EXPAND_DEFAULTS);
+
+	// Set TEXT_ORIGIN
+	Cached yes("YES");
+	bool autoText  = (reqAux ( "TEXT_AUTOMATIC" ) == yes ) ? true : false;
+	bool userText  = (reqAux ( "TEXT_USER" )      == yes ) ? true : false;
+	bool mergeText = (reqAux ( "TEXT_MERGE" )     == yes ) ? true : false;
+
+	if ( mergeText )
+		request ("TEXT_ORIGIN") = Cached("MERGE");
+	else if ( autoText && userText )
+		request ("TEXT_ORIGIN") = Cached("BOTH");
+	else if ( !autoText && userText )
+		request ("TEXT_ORIGIN") = Cached("USER");
+	else if ( autoText && !userText )
+		request ("TEXT_ORIGIN") = Cached("AUTOMATIC");
+	else
+		request ("TEXT_ORIGIN") = Cached("NONE");
+
+	// Set TEXT_LINE_COUNT. For MAGICS point of view the default
+	// value is 1. However, for PLOTMOD this value must be set.
+	int ncount = request ("TEXT_LINE_COUNT");
+	if ( userText && ncount == 0 )
+		  request ("TEXT_LINE_COUNT") = 1;
+}
+
+#if 0
+void
+DataObject::SetLegend ( const MvRequest& rqst )
+{
+	// Should have only one package
+	int nPackages = rqst ( "$METVIEW_LEGEND_PACKAGE_COUNT" );
+	if ( nPackages == 1 )
+	{
+		Cached titlePackageName = Cached ( "$METVIEW_LEGEND_PACKAGE_" ) +
+						   nPackages;
+		int nValues = rqst.countValues ( titlePackageName );
+		vector<int> values ( nValues );
+		for ( int i = 0; i < nValues; i++ )
+			 values [i] = rqst ( titlePackageName, i );
+
+		Cached fileStoreName = Cached ( "METVIEW_LEGEND_STORE_FILE_" ) +
+				       nPackages;
+		Cached fileName = rqst ( fileStoreName );
+		string name = (const char *) fileName;
+		string typeName = (const char* ) rqst ("TYPE");
+		legends_ [ typeName ] = LegendPackage ( name, values );
+	}
+}
+#endif
+
+bool
+DataObject::GetLegend ( MvRequest& rqst, int* order )
+{
+	// Present Magics Limit
+	if ( *order > MAX_LEGENDS_PACKAGE )
+		return false;
+
+	if ( legends_.size () )
+	{
+		for ( LegendsMap::iterator j = legends_.begin ();
+		      j != legends_.end (); ++j )
+		{
+			Cached titlePackageName = Cached ( "$METVIEW_LEGEND_PACKAGE_" ) +
+						  *order;
+			rqst ( "$METVIEW_LEGEND_PACKAGE_COUNT" ) = *order;
+
+			LegendPackage legendPackage = (*j).second;
+
+			rqst ( titlePackageName ) = (legendPackage.second)[0];
+			for ( unsigned int i = 1; i < (legendPackage.second).size (); i++ )
+				rqst ( titlePackageName ) += (legendPackage.second)[i];
+
+			Cached fileName = Cached ( "METVIEW_LEGEND_STORE_FILE_" ) + *order;
+			rqst ( fileName ) = ( legendPackage.first ).c_str();
+
+			( *order ) ++;
+       			if ( *order > MAX_LEGENDS_PACKAGE )
+				return true;
+		}
+		return true;
+	}
+
+	return false;
+}
+
+#if 0
+bool
+DataObject::RemoveLegend ( string name )
+{
+	// Only one legend per data allowed
+	legends_.clear ();
+	
+	LegendsMap::iterator i = legends_.find ( name );
+	if ( i != legends_.end() )
+	{
+		legends_.erase ( i );
+		return true;
+	}
+	return false;
+}
+ 
+MvRequest
+DataObject::DataRequest ()
+{
+	MvRequest dataRequest;
+
+	MvIconDataBase& dataBase = this->IconDataBase ();
+	MvIcon dataUnitIcon;
+	dataBase.RetrieveDataUnit ( myDataUnitId_, dataUnitIcon );
+	const MvRequest dataunitRequest = dataUnitIcon.Request ();
+
+	if ( Cached ( myRequest_.getVerb () ) == GRIB )
+	{
+		dataRequest = dataunitRequest;		
+		dataRequest ( "OFFSET" ) = myDataIndex_;
+		dataRequest ( "LENGTH" ) = 0;
+	}
+	else if ( Cached ( myRequest_.getVerb () ) == IMAGE )
+	{
+		dataRequest.setVerb ( "IMAGE" );
+		dataRequest ( "PATH" ) = (const char*)dataunitRequest ( "PATH" ); 
+		dataRequest ( "OFFSET" ) = myDataIndex_;
+		dataRequest ( "LENGTH" ) = 0;
+		const char* name = dataunitRequest("_NAME");
+		if ( name )
+		     dataRequest ( "_NAME" ) = name; 
+	}
+	else if ( Cached ( myRequest_.getVerb () ) == VECTOR_FIELD )
+	{
+		dataRequest.setVerb ( "VECTOR_FIELD" );
+		MvRequest gribRequest = dataunitRequest;
+		gribRequest ( "OFFSET" ) = myDataIndex_;
+		gribRequest ( "LENGTH" ) = 0;
+		dataRequest ( "U_COMPONENT" ) = gribRequest;
+
+		gribRequest = dataunitRequest;
+		gribRequest ( "OFFSET" ) = myDataIndex2_;
+		gribRequest ( "LENGTH" ) = 0;
+		dataRequest ( "V_COMPONENT" ) = gribRequest;
+	}
+	else
+	{
+		dataRequest = dataunitRequest;		
+	}
+	return dataRequest;
+}			
+
+// Overridden from Presentable. Although DataObject is a Presentable,
+// it must be trated differently. It's got no children, and VisDefs
+// are attached through it's dataunit id, not the presentable id.
+void DataObject::DuplicateChildren(const Presentable& old)
+{
+  MvIconDataBase& dataBase = IconDataBase();
+  MvIconDataBase& oldDB = old.IconDataBase(); 
+  MvIcon visDef;
+  
+  // VisDefs
+  oldDB.DataUnitVisDefRelationRewind();
+
+  while ( oldDB.NextVisDefByDataUnitId(DataUnitId(),visDef) )
+    dataBase.DataUnitVisDefRelation(DataUnitId(),visDef.Id() );
+}
+#endif
+
+bool
+DataObject:: MagicsTitle ()
+{
+	const char* dataType = myRequest_("DATA_TYPE");
+	if ( dataType && (strcmp (dataType, "GRIB")         == 0 || 
+		          strcmp (dataType, "GEOPOINTS")    == 0 ||
+		          strcmp (dataType, "IMAGE")        == 0 ||
+		          strcmp (dataType, "BUFR")         == 0 ))
+		return true;
+	else
+		return false;
+}
+
+
+void DataObject::DataUnit(MvIcon  &dataUnit)
+{
+	// Retrieve the data base info
+	MvIconDataBase& dataBase = IconDataBase();
+
+	// Retrieve the DataUnit
+	if (dataBase.RetrieveDataUnit (myDataUnitId_, dataUnit) == false)
+	{
+		cout << "ERROR: DataObject::Draw(DataVisDef) -> No Data Unit" << endl;
+		//return;
+	}
+}
+
+// Update some visdef parameters only for the following cases:
+// a) Scatter/GeoScatter applications and parameter "VALUES" is defined
+//    and visdef is MSYMB
+// b) Vector_Scatter/Geo_Vector_Scatter applications and parameter "VALUES"
+//    is defined and visdef is MWIND
+void
+DataObject::UpdateVisDef ( MvRequest dataUnit,MvIconList& iconList )
+{
+	// Get application name without the prefix
+	string verb   = dataUnit.getVerb();
+	size_t ipos   = verb.find("_");
+	string sapp   = verb.substr(ipos+1);
+	string prefix = verb.substr(0,ipos);
+
+	// Update visdef parameters only for the following applications
+	if ( sapp == "XY_POINTS" || sapp == "GEO_POINTS" )
+	{
+		// Update only if parameter *_VALUES or *_VARIABLE_NAME is given
+		string param1 = prefix + "_VALUES";
+		string param2 = prefix + "_VARIABLE_NAME";
+		string param2Sval;
+		if ( (const char*)dataUnit(param2.c_str()) )
+			param2Sval = (const char*)dataUnit(param2.c_str());
+
+		if ( (const char*)dataUnit(param1.c_str()) || param2Sval.size() )
+		{
+			// Update only MSYMB visdefs
+			MvListCursor vdc;
+			for ( vdc = iconList.begin(); vdc != iconList.end(); ++vdc)
+			{
+				MvIcon& visDef = *( vdc );
+				MvRequest vdRequest = visDef.Request();
+				if ( strcmp(vdRequest.getVerb(),"MSYMB") == 0 )
+				{
+					vdRequest("SYMBOL_TABLE_MODE") = "ADVANCED";
+					visDef.SaveRequest(vdRequest);
+				}
+			}
+		}
+	}
+	else if ( sapp == "XY_VECTORS" || sapp == "GEO_VECTORS" )
+	{
+		// Update only if parameter *_VALUES or *_VARIABLE_NAME is given
+		string param1 = prefix + "_VALUES";
+		string param2 = prefix + "_VARIABLE_NAME";
+		string param2Sval;
+		if ( (const char*)dataUnit(param2.c_str()) )
+			param2Sval = (const char*)dataUnit(param2.c_str());
+
+		if ( (const char*)dataUnit(param1.c_str()) || param2Sval.size() )
+		{
+			// Update only MWIND visdefs
+			MvListCursor vdc;
+			for ( vdc = iconList.begin(); vdc != iconList.end(); ++vdc)
+			{
+				MvIcon& visDef = *( vdc );
+				MvRequest vdRequest = visDef.Request();
+				if ( strcmp(vdRequest.getVerb(),"MWIND") == 0 )
+				{
+					vdRequest("WIND_ADVANCED_METHOD") = "ON";
+					visDef.SaveRequest(vdRequest);
+				}
+			}
+		}
+	}
+	else if ( sapp == "HOR_BAR" || sapp == "VER_BAR" )
+	{
+		// Update MGRAPH visdefs
+		MvListCursor vdc;
+		for ( vdc = iconList.begin(); vdc != iconList.end(); ++vdc)
+		{
+			MvIcon& visDef = *( vdc );
+			MvRequest vdRequest = visDef.Request();
+			if ( strcmp(vdRequest.getVerb(),"MGRAPH") == 0 )
+			{
+				vdRequest("GRAPH_TYPE") = "BAR";
+				visDef.SaveRequest(vdRequest);
+			}
+		}
+	}
+
+	// Update database
+	// It seems that this update is not need (keep an eye...)
+}
diff --git a/src/uPlot/DataObject.h b/src/uPlot/DataObject.h
new file mode 100644
index 0000000..7d3812c
--- /dev/null
+++ b/src/uPlot/DataObject.h
@@ -0,0 +1,145 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  DataObject
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Provides support for the data object class, the lowest
+//  level of the PlotMod tree hierarchy
+//
+//
+// .CLIENTS:
+//
+//
+//
+// .RESPONSABILITIES:
+//
+//
+//
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+
+
+#ifndef DataObject_H
+#define DataObject_H
+
+#include <inc_stl.h>
+
+#include "Presentable.h"
+
+class DataObject : public Presentable{
+public:
+
+     // Contructors
+     DataObject ( int duId, long off1, long off2, const MvRequest& dataInfo );
+     DataObject ( MvRequest& );
+     DataObject ( const DataObject& );
+
+     virtual Presentable* Clone() const { return new DataObject(*this); }
+
+	// Destructor
+	~DataObject() {} // Change to virtual if base class
+
+        // Overridden from Presentable
+//        virtual void DuplicateChildren(const Presentable&);
+
+	// Class members
+     int DataUnitId () { return myDataUnitId_; }
+
+	// Return building request, IconDataBase request if GRIB,
+	// IMAGE or VECTOR_FIELD, updated with grib index.
+//        MvRequest DataRequest ();
+
+     DrawPriorMap DrawPriority();
+     DrawPriorMap DrawPriority( MvIconList& );
+
+	bool AppendDataUnit ( int dataunitId, long offset, long offset2, const MvRequest& req );
+     bool Match ( int dataunitId, const MvRequest& req );
+
+     virtual void DrawDataVisDef();
+
+	void DataUnit(MvIcon  &dataUnit);
+
+#if 0
+	virtual void RetrieveTitleFromMagics( MvIcon& );
+
+	// Methods
+	// Overrriden from Presentable Class
+	virtual bool IsVisible()
+		{ return true;}
+
+	virtual void Insert(Presentable*) {}
+
+	virtual void Remove(Presentable*) {}
+
+	void EraseDraw ( int visDefId = 0 );
+
+	virtual void EraseDefaultDraw ();
+
+	void SetTitle  ( const MvRequest& reqst );
+#endif
+
+	void GetTitle  ( MvRequest& reqst, int* order );
+//   	void SetLegend ( const MvRequest& reqst );
+	bool GetLegend ( MvRequest& reqst, int* order );
+//	bool RemoveLegend ( string );
+
+	bool RetrieveMyVisDefList ( MvIcon& dataUnit, MvIconList& visdefList );
+
+	// Update some visdef parameters according to the dataunit type
+	void UpdateVisDef ( MvRequest, MvIconList& );
+
+	void SetTextOrigin ( MvRequest& );
+
+	// True if Magics can produces a title for this data object
+	bool MagicsTitle ();
+
+private:
+
+	// No copy allowed
+	DataObject& operator=(const DataObject&);
+
+	// Members
+	int myDataUnitId_;
+     int dimFlag_;       // 0 - no information
+                         // 1 = one dimensional fields
+                         // 2 = two dimensional fields
+                         // 3 = one and two dimensional fields
+//	vector <long> myDataIndex_;
+//	vector <long> myDataIndex2_;
+	// this second index holds the index of a possible second component
+        // in case of vector data
+
+	typedef pair < string, vector<int> > LegendPackage;
+	typedef map  < string, LegendPackage > LegendsMap;
+	LegendsMap legends_;
+
+//        typedef map<int,string> SegmentNameMap;
+//        SegmentNameMap segmentNameMap_;
+
+	vector <int> titleText_;
+
+	MvRequest titleRequest_; // Text information related to 'GRIB_TEXT_...'
+	                         // parameters, which are defined in PCONT
+};
+
+#endif
diff --git a/src/uPlot/Decoder.cc b/src/uPlot/Decoder.cc
new file mode 100644
index 0000000..7e359c3
--- /dev/null
+++ b/src/uPlot/Decoder.cc
@@ -0,0 +1,86 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+//  Methods for the Decoder class
+//  Methods for the Decoder Factory class
+//
+//
+
+#include "Decoder.h"
+#include "GribDecoder.h"
+#include "ObjectList.h"
+
+//==================================================================
+// Decoder Factory class
+//
+Cached
+DecoderFactoryTraits::FactoryName ( const MvRequest& request )
+{
+	request.print();
+	Cached factoryName = ObjectList::Find( "request", request.getVerb(), "decoder" );
+
+	return factoryName;
+}
+
+Decoder* 
+DecoderFactoryTraits::DefaultObject ( const MvRequest& request )
+{
+       return new GribDecoder ( request );
+}
+
+//
+//===================================================================
+//
+// Decoder class
+//
+
+Decoder::Decoder( const MvRequest& ):
+	metadataRequest_ ("EMPTY"), offset_(0), nextData_ ( false )
+{
+}
+
+Decoder::~Decoder()
+{
+}
+
+// Utilities for derived classes
+void Decoder::AddData( MvRequest& out, vector<double> &dataVector, const char *outName )
+{
+  for ( unsigned int i = 0; i < dataVector.size(); i++ )
+	out.addValue(outName,dataVector[i]);
+}
+
+void Decoder::AddData( MvRequest& out, vector<string> &dataVector, const char *outName )
+{
+  for ( unsigned int i = 0; i < dataVector.size(); i++ )
+	out.addValue(outName,dataVector[i].c_str());
+}
+
+void Decoder::CheckMinMax(vector<double> &values, double &oldMax, double &oldMin)
+{
+  double currMax = *(max_element(values.begin(),values.end()));
+  double  currMin = *(min_element(values.begin(),values.end())); 
+
+  if ( currMax > oldMax ) oldMax = currMax;
+  if ( currMin < oldMin ) oldMin = currMin;
+}
+
+void Decoder::SetTitle(MvRequest& matchingRequest)
+{
+  const char *title;
+  if ( ! ( title = metadataRequest_("MV_TITLE") ) )
+	title = metadataRequest_("TITLE");
+
+  if ( title )
+  {
+	matchingRequest("TEXT_LINE_1") = title;
+	matchingRequest("TEXT_LINE_COUNT") = 1;
+  }
+}
diff --git a/src/uPlot/Decoder.h b/src/uPlot/Decoder.h
new file mode 100644
index 0000000..b380a90
--- /dev/null
+++ b/src/uPlot/Decoder.h
@@ -0,0 +1,146 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Decoder
+// Gilberto Camara - ECMWF Jul 97
+//
+// .NAME:	
+//  Decoder
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  An abstract data class for decoding different types
+//  of meteorological data processed by PlotMod
+//  (which uses EMOSlib and Mars' interface to Emoslib)
+//
+// .CLIENTS:
+//  PlotModMatcher, Graphics Engine
+//
+//
+// .RESPONSABILITIES:
+//  For each data time, provide information on parameter,
+//  date, time and level
+//
+//  
+// .COLLABORATORS:
+//  Date, Time, Emos, PathName
+//
+//
+// .BASE CLASS:
+//  Decoder
+//
+// .DERIVED CLASSES:
+//  GribDecoder, BufrDecoder, MatrixDecoder, GeoPointsDecoder,
+//  NetCDFDecoder
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107).
+//
+//  For additional references please see Coplien's chapter 8
+//  ("Programming with Exemplars")
+//
+//
+//  The templated factory is based on the idea of "traits"
+//  described in the article "A New and Useful Template Technique: "Traits"
+//  by Nathan Myers, included in the "C++ Gems" book
+//  (see also Stroustrup, 3rd. edition, page 580ff).
+//
+#ifndef Decoder_H
+#define Decoder_H
+
+#include <MvRequest.h>
+#include <Factory.hpp>
+
+class Decoder;
+class MatchingInfo;
+
+// Class Decoder Factory - clones a new Decoder
+
+struct DecoderFactoryTraits {
+  typedef Decoder             Type;
+  typedef const MvRequest&    Parameter;
+  static  Cached              FactoryName   ( Parameter );
+  static  Type*               DefaultObject ( Parameter );
+};
+
+
+class DecoderFactory : public Factory<DecoderFactoryTraits> 
+{
+public:
+  DecoderFactory(const Cached& name) :
+    Factory<DecoderFactoryTraits>(name) {}	
+};
+
+//typedef vector<Cached> VariableNamesList;
+//typedef vector<float>  DataVector;
+
+class Decoder {
+public:
+
+  // Contructors
+  Decoder (  const MvRequest& );
+
+  // Destructor
+  virtual ~Decoder();
+
+  virtual MatchingInfo CreateMatchingInfo () = 0;
+
+  // Methods with are overriden by derived classes. Default 
+  // implementations provided for convenience of derived classes,
+  // as some of the functions are irrelevant to most derived classes.
+
+  // Goes to the next data (returns false if no more data)
+  virtual bool ReadNextData () { return false; }
+
+  virtual bool GetData ( vector<double>&, const char* ) { return false; }
+  virtual bool GetRequest(MvRequest&, const char *) { return false; }
+  // for netcf decoder;
+  virtual Cached GetView() { return Cached(""); }
+
+  // Overridden by decoders that need to ( curvedecoder, netcdfdecoder).
+  virtual bool UpdateDataRequest(MvRequest &) { return false; }
+
+  // Derived decoders are responsible for setting values correctly
+  virtual void GetMinMax(double &minX, double &maxX, double &minY, double &maxY)
+    {  minX = minX_;maxX = maxX_;minY = minY_;maxY = maxY_; }
+
+  // Returns the offset (data size)
+  virtual long CurrentOffset ()
+    { return offset_; }
+
+  MvRequest Request () const
+    { return metadataRequest_; }
+
+protected:
+
+  // Utilities for derived classes
+  void AddData( MvRequest& out, vector<double> &dataVector, const char *outName );
+  void AddData( MvRequest& out, vector<string> &dataVector, const char *outName );
+
+  void CheckMinMax(vector<double> &values, double &oldMax, double &oldMin);
+
+  void SetTitle(MvRequest&);
+
+  // Members
+  MvRequest metadataRequest_; // request which contains metadata info
+  long      offset_;
+  bool      nextData_;
+  double    minX_,maxX_,minY_,maxY_;
+
+private:
+
+  // No copy allowed
+  Decoder(const Decoder&);
+  Decoder& operator=(const Decoder&){return *this;}
+};
+#endif
diff --git a/src/uPlot/Device.cc b/src/uPlot/Device.cc
new file mode 100644
index 0000000..dd055b5
--- /dev/null
+++ b/src/uPlot/Device.cc
@@ -0,0 +1,99 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Device.h"
+#include "Presentable.h"
+#include "MvRequestUtil.hpp"
+#include "XDevice.h"
+#include "PlotMod.h"
+
+Cached
+DeviceFactoryTraits::FactoryName ( const MvRequest& request )
+{
+	Cached name;
+	MvRequest req1 = request("OUTPUT_DEVICES");
+	if ( req1 )
+                name = req1.getVerb();
+	else
+		name = "ERROR";
+
+	return name;
+}
+
+Device* 
+DeviceFactoryTraits::DefaultObject ( const MvRequest& request )
+{
+       return new XDevice ( request );
+}
+
+Device::Device ( const MvRequest& deviceRequest ):
+	deviceRequest_  ( deviceRequest  ),
+	outFileName_    ( "PlotFile1"    ),
+	outTmpFileName_ ( "PlotTmpFile1" )
+{
+}
+
+// Destructor
+Device::~Device()
+{
+// empty
+} 
+
+// Implement the Visitor pattern
+void
+Device::Initialise ( Presentable& p )
+{
+	p.Visit ( *this );
+}
+
+// -- METHOD :  CreateRequest
+//
+// -- PURPOSE:  Create a device driver request, based on a superpage request
+// -- INPUT  :  Superpage request
+//
+// -- OUTPUT :  Device driverRequest
+MvRequest
+Device::CreateRequest ( const MvRequest& )
+{
+	return PlotMod::Instance().OutputFormat();
+#if 0 //U032010
+	// If the device driver request is missing, plot on the screen
+	if ( !IsParameterSet ( (MvRequest&)inRequest, "_DRIVER" ) )
+		return PlotMod::Instance().MakeDefaultOutputFormat();
+
+	// Plot not on the screen
+	MvRequest deviceRequest;
+	deviceRequest = inRequest.getSubrequest ("_DRIVER");
+	double  width = inRequest ( "CUSTOM_WIDTH" );
+	double  height= inRequest ( "CUSTOM_HEIGHT" );
+       	deviceRequest ( "CUSTOM_WIDTH" ) = width;
+	deviceRequest ( "CUSTOM_HEIGHT") = height;
+
+	// Does the deviceRequest already contain a path ?
+	const char*  path = deviceRequest ( "PATH" );
+	if ( path == 0 )
+	{
+		Cached mvpath = ObjectInfo::ObjectPath ( inRequest );
+		deviceRequest ("PATH") = (const char* ) mvpath;
+	}
+
+	return deviceRequest;
+#endif
+}
+
+#if 0
+Cached
+Device::DeviceType ()
+{
+  if ( ( const char *) deviceRequest_ ( "DESTINATION" ) )
+	  return deviceRequest_ ( "DESTINATION" );
+  else
+	  return deviceRequest_ ( "FORMAT" );
+}
+#endif
diff --git a/src/uPlot/Device.h b/src/uPlot/Device.h
new file mode 100644
index 0000000..c775357
--- /dev/null
+++ b/src/uPlot/Device.h
@@ -0,0 +1,142 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Device
+// Gilberto Camara - ECMWF Sep 97
+//
+// .NAME:	
+//  Device
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the Device class, which is the 
+//  object which describes the media in which
+//  PlotMod will produce its outout
+//
+//  Each superpage is associated with ONE device, which is
+//  instatiated and initialised by the SuperPage constructor
+//
+// .CLIENTS:
+//  SuperPage
+//
+//
+// .RESPONSABILITIES:
+//  A device may correspond either to a XWindow Interface
+//  (which is the default) or to a paper sheet 
+//
+//  After the superpage creates a device, it calls the "initialise"
+//  method, which will visit the superpage and its children and will
+//  create the appropriate drawing areas ("canvas"). 
+//
+//
+// .COLLABORATORS:
+//  MvRequest, Canvas, GraphicsEngine
+//
+//
+// .BASE CLASS:
+//  (none)
+//
+// .DERIVED CLASSES:
+//  XDevice, PSDevice
+//
+// .REFERENCES:
+//   This template factory class which creates devices
+//   is based on the "Factory" pattern (see
+//  "Design Patterns" book, page 107).
+//
+//  The templated factory is based on the idea of "traits"
+//  described in the article "A New and Useful Template Technique: "Traits"
+//  by Nathan Myers, included in the "C++ Gems" book
+//  (see also Stroustrup, 3rd. edition, page 580ff).
+//
+//  The interaction between a Device and its associated Presentable is
+//  based on the "Visitor" pattern ("Design Patterns", page 331)
+//
+#ifndef Device_H
+#define Device_H
+
+#include <Factory.hpp>
+#include <MvRequest.h>
+#include "Visitor.h"
+
+class Device;
+class Presentable;
+
+// Class Device Factory - clones a new Device on Request
+struct DeviceFactoryTraits {
+	typedef Device              Type;
+	typedef const MvRequest&    Parameter;
+	static  Cached              FactoryName   ( Parameter );
+	static  Type*               DefaultObject ( Parameter );
+};
+
+class DeviceFactory : public Factory<DeviceFactoryTraits> 
+{
+public:
+	DeviceFactory(const Cached& name) :
+		Factory<DeviceFactoryTraits>(name) {}
+};
+
+
+class Device : public Visitor {
+
+public:
+
+	// Contructors
+	Device ( const MvRequest& deviceRequest );
+
+	// Destructor
+	virtual ~Device();
+
+	// Visitor methods
+	virtual void Initialise ( Presentable& p );
+
+	// Class members
+	const MvRequest& DeviceRequest() const
+		{ return deviceRequest_; }
+
+#if 0
+	Cached DeviceType ();
+
+  //	operator FILE*() const 
+  //		{ return filePtr_; }
+
+	Cached FileName() const
+		{ return outFileName_; }
+
+	Cached TmpFileName() const
+		{ return outTmpFileName_; }
+
+	virtual Cached PrinterName() const
+		{ return Cached (""); }
+
+#endif
+
+	// Static method
+	static MvRequest CreateRequest( const MvRequest& );
+
+protected:
+
+	// Members
+	MvRequest deviceRequest_;
+
+	Cached outFileName_;    // name of the output file
+
+	Cached outTmpFileName_; // name of the temporary output file
+
+private:
+
+	// No copy allowed
+	Device(const Device&);
+	Device& operator=(const Device&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/DeviceData.h b/src/uPlot/DeviceData.h
new file mode 100644
index 0000000..66e9802
--- /dev/null
+++ b/src/uPlot/DeviceData.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  DeviceData
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  A completely "opaque" class which acts as a handler
+//  for storing device information.
+//
+//  This class is  needed because PlotMod works VERY
+//  differently when in interactive mode (using an XDevice)
+//  and when in batch mode (using a PSDevice). Therefore,
+//  this class allows each presentable to store the information 
+//  about its "device" (the media in which it is shown) in
+//  a completely abstract way.
+//
+//  Each presentable HAS_A "Device Data" object, and this object 
+//  is the only way it can have access to its associated device
+//
+// .CLIENTS:
+//  Presentable
+//
+//
+// .RESPONSABILITIES:
+//  Provide an encapsulation of the device information,
+//  when used in connection with another class which may be either
+//  a user interface class (such as PresentableWidget) or a plotting
+//  class (such as PresentablePaper)
+//
+//
+// .COLLABORATORS:
+//  PresentableWidget, PresentablePaper (?)
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//   (If in doubt, try to answer the question: 
+//    "Of what use is a class that doesn't do anything ?")
+//
+//
+#ifndef DeviceData_H
+#define DeviceData_H
+
+class DeviceData {
+public:
+
+	// Contructors
+	DeviceData() {}
+
+	// Destructor
+	virtual ~DeviceData() {}
+
+private:
+
+	// No copy allowed
+	DeviceData(const DeviceData&);
+	DeviceData& operator=(const DeviceData&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/DrawingPriority.cc b/src/uPlot/DrawingPriority.cc
new file mode 100644
index 0000000..57bbd76
--- /dev/null
+++ b/src/uPlot/DrawingPriority.cc
@@ -0,0 +1,345 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// ------------------------------------------------------------------
+// CONTOUR - PCONT
+// CONTOUR_SHADE ON/OFF
+// OFF
+
+// CONTOUR_SHADE_TECHNIQUE POLYGON_SHADING/CELL_SHADING/MARKER
+// POLYGON_SHADING
+
+// CONTOUR_SHADE_METHOD DOT/HATCH/AREA_FILL
+// DOT
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// WIND - PWIND
+
+// WIND_FIELD_TYPE ARROWS/FLAGS/STREAMLINES
+// ARROWS
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// OBS - POBS
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// Coastlines - PCOAST
+
+// MAP_COASTLINE ON/OFF
+// ON
+
+// MAP_COASTLINE_LAND_SHADE ON/OFF
+// OFF
+
+// MAP_COASTLINE_SEA_SHADE ON/OFF
+// OFF
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// TEXT - PTEXT
+
+// TEXT_MODE TITLE/POSITIONAL
+// TITLE
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// GRAPH - PGRAPH
+
+// GRAPH_TYPE CURVE/BAR/AREA
+// CURVE
+
+// GRAPH_SHADE ON/OFF
+// ON
+
+// GRAPH_SHADE_STYLE  DOT/HATCH/AREA_FILL
+// DOT
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// SYMBOL - PSYMB
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// AXIS - PAXIS
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PCONT
+// - 700 CONTOUR_SHADE OFF
+//    CONTOUR_SHADE ON
+// - 200 CONTOUR_SHADE_TECHNIQUE CELL_SHADING
+// - 700 CONTOUR_SHADE_TECHNIQUE MARKER
+//    CONTOUR_SHADE_TECHNIQUE POLYGON_SHADING
+// - 700 CONTOUR_SHADE_METHOD DOT
+// - 700 CONTOUR_SHADE_METHOD HATCH
+// - 300 CONTOUR_SHADE_METHOD AREA_FILL
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PWIND
+// - 800 WIND_FIELD_TYPE ARROWS
+// - 800 WIND_FIELD_TYPE FLAGS
+// - 800 WIND_FIELD_TYPE STREAMLINES
+// ------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------
+// POBS
+// - 900
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PCOAST
+// - FIRST/LAST
+// - 000 FIRST
+// - 999 LAST
+// - 999 MAP_COASTLINE OFF
+//    MAP_COASTLINE ON
+// - 000 MAP_COASTLINE_LAND_SHADE / MAP_COASTLINE_SEA_SHADE ON
+// - 999 MAP_COASTLINE_LAND_SHADE / MAP_COASTLINE_SEA_SHADE OFF
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PTEXT
+// - 900 TEXT_MODE TITLE
+// - 900 TEXT_MODE POSITIONAL
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PGRAPH
+// - 800 GRAPH_TYPE CURVE
+// - 700 GRAPH_TYPE BAR
+// - 700 GRAPH_TYPE AREA
+// - 700 GRAPH_SHADE OFF
+//    GRAPH_SHADE ON
+// - 700 GRAPH_SHADE_STYLE DOT
+// - 700 GRAPH_SHADE_STYLE HATCH
+// - 300 GRAPH_SHADE_STYLE AREA_FILL
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PSYMB
+// - 900
+// ------------------------------------------------------------------
+
+// ------------------------------------------------------------------
+// PAXIS
+// - 100
+// ------------------------------------------------------------------
+
+#include "MvRequest.h"
+#include "DrawingPriority.h"
+#include "ObjectList.h"
+#include "ObjectInfo.h"
+
+DrawingPriority::DrawingPriority ()
+{
+	MvRequest drawPriorRequest;
+
+	drawPriorRequest = ObjectList::UserDefaultRequest ( "DRAWING_PRIORITY" );
+
+	MvRequest expRequest = ObjectList::ExpandRequest ( drawPriorRequest, EXPAND_DEFAULTS  );
+
+	int count = expRequest.countParameters();
+	int i;
+	int priorValue;
+	string keyString;
+	for ( i = 0; i < count ; i++ )
+	{
+		keyString = expRequest.getParameter ( i );
+		Cached tmpcached = expRequest ( keyString.c_str() );
+		if ( isalpha(tmpcached[0]) )
+		{
+			if ( tmpcached == Cached ( "FIRST" ) )
+				priorValue = 0;
+			else
+				priorValue = 999;
+		}
+		else
+			priorValue = atoi(tmpcached);
+
+		mySet_.insert ( keyString );
+		myMap_ [ keyString ] = priorValue;
+	}
+}
+
+DrawingPriority::~DrawingPriority ()
+{
+}
+
+void
+DrawingPriority::SetPriority ( MvRequest& request )
+{
+	MvRequest expRequest = ObjectList::ExpandRequest ( request, EXPAND_DEFAULTS );
+
+	int count = expRequest.countParameters();
+	int i, priorValue;
+	string keyString;
+	for ( i = 0; i < count ; i++ )
+	{
+		keyString = expRequest.getParameter ( i );
+		Cached tmpcached = expRequest ( keyString.c_str() );
+		if ( isalpha(tmpcached[0]) )
+		{
+			if ( tmpcached == Cached ( "FIRST" ) )
+				priorValue = 0;
+			else
+				priorValue = 999;
+		}
+		else
+			priorValue = atoi (tmpcached);
+
+		if ( IsValidKey ( keyString ) )
+			myMap_ [ keyString ] = priorValue;
+		else
+			cout << "DRAWING_PRIORITY: Invalid Key: " << keyString << endl;
+	}
+}
+
+int
+DrawingPriority::Priority ( MvRequest& request )
+{
+	MvRequest expRequest = ObjectList::ExpandRequest ( request, EXPAND_DEFAULTS );
+
+	string keyString ( expRequest.getVerb() ? expRequest.getVerb() : "" );
+	if ( ! IsValidKey ( keyString ) )
+	{
+		int count = expRequest.countParameters();
+		int i;
+		for ( i = 0; i < count ; i++ )
+		{
+			string param = expRequest.getParameter ( i );
+			if ( param.size () != 0 )
+			{
+				if ( param.find ( "_" ) == 0 )
+					continue;
+			}
+			string pairString ( keyString + string ("_") + param );
+
+			if ( expRequest.countValues ( param.c_str() ) )
+			{
+				// Use only the first value
+				const char *value = 0;
+				expRequest.getValue ( value, param.c_str(), 0 );
+				pairString += string ("_") + string ( value );
+			}
+
+			if ( IsValidKey ( pairString ) )
+			{
+				keyString = pairString;
+				break;
+			}
+		}
+	}
+	return GetPriority ( keyString );
+}
+
+int
+DrawingPriority::IsValidKey ( string keyString )
+{
+	set <string>::iterator setIter = mySet_.find ( keyString );
+	if ( setIter == mySet_.end() )
+		return false;
+
+	return true;
+}
+
+int
+DrawingPriority::GetPriority ( string keyString )
+{
+	map <string, int>::iterator mapIter = myMap_.find ( keyString );
+	if ( mapIter == myMap_.end () ) // arbitrary value
+	{
+		cout << keyString << " keyString NOT found on MAP!!!" << endl;
+  
+		return 100;
+	}
+
+	return (*mapIter).second;
+}
+
+// Describe for saving into a macro
+string
+DrawingPriority::DescribeYourself ( ObjectInfo& description, string pageName )
+{
+	MvRequest drawPriorRequest ( "DRAWING_PRIORITY" );
+
+	// Using system defaults instead of user defaults
+	MvRequest defDrawPriorRequest;
+	defDrawPriorRequest = ObjectList::CreateDefaultRequest ( "DRAWING_PRIORITY" );
+
+	MvRequest defRequest = ObjectList::ExpandRequest ( defDrawPriorRequest,
+							   EXPAND_DEFAULTS  );
+
+	int count = defRequest.countParameters();
+
+	int i;
+	int defPriorValue;
+	string keyString;
+	for ( i = 0; i < count ; i++ )
+	  {
+	    keyString = defRequest.getParameter ( i );
+	    Cached tmpcached = defRequest ( keyString.c_str() );
+	    if ( isalpha(tmpcached[0]) )
+	      {
+		if ( ( tmpcached == Cached ( "FIRST" ) ) &&
+		     ( myMap_ [ keyString ] == 999 ) )
+				// If Default first and set is last
+		  drawPriorRequest ( keyString.c_str() ) = "LAST";
+	      }
+	    else
+	      {
+		defPriorValue = defRequest ( keyString.c_str() );
+		if ( myMap_ [ keyString ] != defPriorValue )
+				// If different from default
+		  drawPriorRequest ( keyString.c_str() ) = myMap_ [ keyString ];	
+	      }
+	  }
+
+	if ( drawPriorRequest.countParameters() > 0 )
+	{
+	    // convert my request to macro
+	    set<Cached> skipSet;
+
+	    pageName +=  + "_priority";
+	    description.ConvertRequestToMacro ( drawPriorRequest, PUT_END, pageName.c_str(), "drawing_priority",skipSet);
+
+	    return pageName;
+	}
+	else
+	    return "";
+}
+
+Cached
+DrawingPriority::DrawSegmentName ( int dataUnitId, MvRequest& request, int visDefId )
+{
+	static char buf[100];
+
+	ostrstream ss( buf, sizeof( buf ) );
+	ss << this->Priority ( request )
+	   << "DATA"
+	   << setfill( '0' ) << setw( 5 ) << dataUnitId
+	   << "VISDEF" ;
+
+        if ( visDefId )
+	   ss << setfill( '0' ) << setw( 5 ) << visDefId;
+
+	ss << ends;
+
+	return Cached(buf);
+}
diff --git a/src/uPlot/DrawingPriority.h b/src/uPlot/DrawingPriority.h
new file mode 100644
index 0000000..70df0a7
--- /dev/null
+++ b/src/uPlot/DrawingPriority.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .SUMMARY:
+//  Define DrawingPriority class
+//
+// .DESCRIPTION
+//
+// .SEE ALSO
+//
+//
+
+#ifndef DrawingPriority_H
+#define DrawingPriority_H
+
+#include <set>
+#include <map>
+
+class ObjectInfo;
+
+class DrawingPriority {
+public:
+
+	// Constructors
+	DrawingPriority ();
+
+	// Destructor
+	~DrawingPriority ();
+
+	// Methods
+	int Priority ( MvRequest& );
+	void SetPriority ( MvRequest& );
+	int GetPriority ( string );
+
+	string DescribeYourself ( ObjectInfo&, string );
+
+	Cached DrawSegmentName ( int, MvRequest&, int );
+
+private:
+	// No copy allowed
+	//DrawingPriority ( const DrawingPriority& );
+	DrawingPriority& operator=(const DrawingPriority&)
+		{ return *this; }
+
+	int IsValidKey ( string );
+
+	// Members
+	std::set <string> mySet_;
+	std::map <string, int> myMap_;
+};
+
+#endif
diff --git a/src/uPlot/DropAction.cc b/src/uPlot/DropAction.cc
new file mode 100644
index 0000000..891fdb8
--- /dev/null
+++ b/src/uPlot/DropAction.cc
@@ -0,0 +1,135 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// Drop Action class
+//
+
+#include "DropAction.h"
+#include "Presentable.h"
+#include "Root.h"
+#include "ObjectList.h"
+
+void
+DropAction::Execute (PmContext& context)
+{
+   // Check whether an application was dropped.
+   // If so, the drop will contain a _MODE request.
+   // Call a routine to go through the context and add info from _MODE request
+   // at first data unit. This is done for macro generation to work correctly
+   // and should not affect other uses.
+   if ( context.InRequest().getSubrequest("_MODE") )
+      PrepareForMacro(context);
+
+   // Find the location on the Tree
+   // Find the DROP_ID associated to the DROP request
+   MvRequest dropRequest = context.InRequest();
+   int  treeNodeId = dropRequest("DROP_ID");
+   if ( treeNodeId == 0 )
+   {
+      context.Advance(); // Skip DROP request
+      cout << "DropAction::Execute " << endl;
+      cout << " ** Error - DropId 0" << endl;
+      return;
+   }
+
+   // Special case when an object was dropped in a
+   // DataUnit at Contents window
+///F	int dataUnitId = dropRequest("_CONTENTS_DATAUNIT_ID");
+///F	int presentableId = dropRequest("PRESENTABLE_ID");
+///F	if ( presentableId == 0 ) 
+///F	  presentableId = treeNodeId;
+   int contentsWindow = dropRequest("_CONTENTS");
+   int calledFromMacro = dropRequest("_CALLED_FROM_MACRO");
+   context.Advance(); // Skip DROP request
+
+   // Find the tree node associated to the DropId
+   Presentable* treeNode = Root::Instance().FindBranch (treeNodeId);
+   if (treeNode == 0)
+   {
+      cout << "DropAction::Execute " << endl;
+      cout << " ** Error - Cannot associate page with DropId" << endl;
+      return;
+   }
+
+///F	treeNode->ContentsDataUnit(dataUnitId);  // set Contents flag
+///F	treeNode->DroppedHere ( presentableId );
+   // Needs redrawing by default. This may be overrulled by the Drop function
+   treeNode->NeedsRedrawing(true);
+   treeNode->DroppedHere ( treeNodeId );
+   treeNode->DropShouldStay ( contentsWindow | calledFromMacro ); // Drop from Contents or macro
+
+   // The Drop method should call context.Advance()
+   treeNode->Drop(context);
+   treeNode->DroppedHere ( 0 );  // Assuming presentableId_ > 0
+   treeNode->HasDrawTask(true);
+
+///F	treeNode->ContentsDataUnit(0);  // reset Contents flag
+   // Advance to end after we've done the drop
+   context.AdvanceToEnd();
+}
+
+/// This function should only kick in if an application is dropped
+void DropAction::PrepareForMacro(PmContext &context)
+{
+   MvRequest newRequest = context.InRequest();
+   MvRequest inMode = newRequest.getSubrequest("_MODE");
+   const char* inClass = (const char*)inMode("_CLASS");
+   const char* inVerb = (const char*)inMode("_VERB");
+   const char* inName = (const char*)inMode("_NAME");
+
+   const char* firstDataUnit = "";
+   while ( newRequest )
+   {
+      // We normally have a CLEAN request which will
+      // have values for _CLASS,_NAME and _VERB, so
+      // fill these in if we didn't get them from mode.
+      if ( strcmp(newRequest.getVerb(),"CLEAN") == 0 &&
+           strcmp(firstDataUnit,"") == 0 )
+      {
+         if ( ! inClass )
+            inClass = (const char*)newRequest("_CLASS");
+
+         if ( ! inVerb )
+            inVerb = (const char*)newRequest("_VERB");
+
+         if ( ! inName )
+            inName = (const char*)newRequest("_NAME");
+      }
+
+      if ( ObjectList::IsDataUnit(newRequest.getVerb() ) &&
+           strcmp(firstDataUnit,"") == 0 )
+      {
+         if ( ! ( ( const char *) newRequest("_CLASS") ) )
+            newRequest("_CLASS") = inClass;
+
+         if ( ! ( ( const char *) newRequest("_VERB") ) )
+            newRequest("_VERB") = inVerb;
+
+         if ( ! ( ( const char *) newRequest("_NAME") ) )
+            newRequest("_NAME") = inName;
+
+         newRequest("_MODE") = inMode;
+         newRequest("_USE_MODE") = 1;
+         firstDataUnit = newRequest.getVerb();
+      }
+      else
+         newRequest("_SKIP_MACRO") = 1;
+
+      newRequest.advance();
+   }
+
+   newRequest.rewind();
+   context.Update(newRequest);
+}
+
+//
+// This is the exemplar object for the Drop Action class
+//
+static DropAction dropActionInstance("Drop");
diff --git a/src/uPlot/DropAction.h b/src/uPlot/DropAction.h
new file mode 100644
index 0000000..c394ca1
--- /dev/null
+++ b/src/uPlot/DropAction.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  DropAction
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the DropAction class, a derived class
+//  for the various types of requests in PlotMod which require
+//  creation of a new branch in the Tree.
+//
+//
+// .CLIENTS:
+//  PlotModAction class, called by PlotMod main module (PlotMod.cc)
+//
+// .RESPONSABILITY:
+//  This class will provide all support for the visualisation
+//  actions whithin PlotMod 
+//
+//   A visualisation action consists of:
+//  - Building a Tree
+//  - Matching DataUnits and VisDefs within a tree node
+//  - Drawing the tree node
+//
+//  For each step, the request list is processed sequentially.
+//
+// .COLLABORATORS:
+//  Builder, Matcher, Drawer
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+//
+#ifndef DropAction_H
+#define DropAction_H
+
+#include "PlotModAction.h"
+
+class DropAction: public PlotModAction
+{
+
+public:
+
+  // Constructors
+  DropAction(const Cached name): PlotModAction(name) {}
+
+  // Destructor
+  ~DropAction() {}
+
+  // Methods
+  // Overriden from PlotModActio
+  virtual void Execute ( PmContext& context );
+
+private:
+
+  // Local to class
+  // Process the page
+  bool ProcessPage ( PmContext& context );
+
+  // Massage context if old application was dropped.
+  void PrepareForMacro( PmContext &context);
+
+};
+
+#endif
diff --git a/src/uPlot/ExportDialog.cc b/src/uPlot/ExportDialog.cc
new file mode 100644
index 0000000..4e9839d
--- /dev/null
+++ b/src/uPlot/ExportDialog.cc
@@ -0,0 +1,392 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QScrollArea>
+#include <QVBoxLayout>
+#include <QTabWidget>
+#include <QLabel>
+#include <QSettings>
+#include <QDialogButtonBox>
+#include <QGroupBox>
+#include <QMessageBox>
+
+#include "ExportDialog.h"
+#include "MvQGui.h"
+#include "uPlot.h"
+#include "ObjectList.h"
+#include "MvRequestUtil.hpp"
+
+ExportDialog::ExportDialog(int currentFrame, int totalFrames, QWidget *parent) :
+			   QFileDialog(parent,"Export"),
+			   current_  (currentFrame),
+			   total_    (totalFrames),
+			   comboBox_ (0),
+			   leFs3_    (0),
+			   cbFs1_    (0),
+			   cbFs2_    (0),
+			   cbFs3_    (0)
+{
+	// Set widget mode behaviour to "Save As"
+	this->setAcceptMode(QFileDialog::AcceptSave);
+
+	// Restore previous gui settings
+	QSettings settings("ECMWF","uPlotExportDialog");
+	settings.beginGroup("main");
+        selectFile(settings.value("fileName").toString());
+	QStringList fout = settings.value("formats").toStringList();
+	settings.endGroup();
+
+	// Set filter options to select which files to be shown
+	this->setFilter(tr("All Files (*.*);;Images (*.png *.ps *.eps *.jpg *.kml *.gif *.svg *.pdf)"));
+
+	// Get the main layout
+	QGridLayout *mainLayout = static_cast<QGridLayout*>(layout());
+	int row = mainLayout->rowCount();
+	int col = mainLayout->columnCount();
+
+	// Build label for the Output format
+	QLabel *label = new QLabel(this);
+	label->setText(tr("Output formats:"));
+	mainLayout->addWidget(label,row,0);
+
+	// Retrieve list of output formats from the resources file
+	// Build 'check box combo' with the list of output formats
+	comboBox_ = new MvQCheckBoxCombo(this);
+	MvRequest reqof;
+	ObjectList::FindAll("output_format",reqof);
+	while ( reqof )
+	{
+		// Check if output format has been previously selected
+		QString str = (const char*)reqof("class");
+		bool flag = fout.contains(str);
+
+		// Add output format to the user interface
+		comboBox_->addItem((const char*)reqof("class"),flag);
+
+		reqof.advance();
+	}
+
+	mainLayout->addWidget(comboBox_,row,1,1,1);
+
+	// Build Frame Selection widget
+	buildFrameSelection( row-2, col-1, mainLayout );
+
+	// Build the advanced Options button
+	row++;
+	bAdvd_ = new QPushButton("Options >>");
+	bAdvd_->setCheckable(true);
+	mainLayout->addWidget(bAdvd_,row,col-1);
+
+bAdvd_->setVisible(false);  //Remove later
+
+#if 0	// Build tab for output formats
+	row++;
+	QTabWidget *tab = new QTabWidget();
+	mainLayout->addWidget(tab,row,0,10,col-1);
+	tab->hide();
+
+ //Removed temporarily until bAdvd_->setVisible(false) is turned to true
+	// Build output formats user interface
+	reqof.rewind();
+	while ( reqof )
+	{
+		// Get driver object resources
+		MvRequest reqDef = ObjectList::Find("object",(const char*)reqof("output"));
+		if ( strcmp(reqDef.getVerb(), "EMPTY") == 0 )
+		{
+			reqof.advance();
+			continue;
+		}
+
+		// Get definition file request
+		const char* defName = reqDef("definition_file");
+		MvRequest defReq = read_language_file(defName);
+
+		// Read output format request
+		// Try to first search the icon file in the Metview/Preferences directory.
+		// If not found, try the Metview/Defaults directory, If not found, build
+		// a default request
+		MvRequest reqOut = ObjectList::UserPreferencesRequest ( (const char*)reqof("output") );
+
+		reqOut = ObjectList::ExpandRequest ( reqOut, EXPAND_DEFAULTS );
+
+		// Merge the Interface request with the current user request
+		MvRequest interReq;
+		MvRequest uiReq;
+		int n = 0;
+		defReq.iterInitParam();
+		while(defReq.iterGetNextParamInterface(interReq))
+		{
+			MvRequest req((const char*)interReq("interface"));
+			const char* caux = reqOut.getParameter(n);
+			req("name") = caux;
+			req("values") = reqOut(caux);
+			CopyAndRemoveParameters ( interReq, req, "interface" );
+			uiReq = uiReq + req;
+			n++;
+		}
+
+		// Create output format request to be used 
+//		tab->addTab(scroll1,(const char*)req("class"));
+
+	QWidget *w1 = new QWidget;
+	QScrollArea *scroll = new QScrollArea;
+//	QVBoxLayout *layout1 = new QVBoxLayout(w1);
+	QVBoxLayout *layout1 = new QVBoxLayout;
+	layout1->setSizeConstraint(QLayout::SetMinAndMaxSize);
+	w1->setLayout(layout1);
+	scroll->setWidget(w1);
+
+	MvQGui *tGui = new MvQGui(layout1);
+	tGui->buildFromDefinition(uiReq);
+
+	tab->addTab(scroll,(const char*)reqof("class"));
+
+//	connect(macroGui_,SIGNAL(editFinished()),
+//		this,SLOT(slotRunMacro()));
+
+//	filterSplitter->addWidget(scroll);
+
+		reqof.advance();
+	}
+
+	// Build tab buttons
+	QWidget *wt = new QWidget;
+	QVBoxLayout *vt = new QVBoxLayout(wt);
+	vt->addWidget(new QPushButton("Save as default"));
+	vt->addWidget(new QPushButton("Load default"));
+	vt->addWidget(new QPushButton("Save as..."));
+	wt->hide();
+	mainLayout->addWidget(wt,row,col-1,1,1);
+
+	// Define functions
+	connect(bAdvd_,SIGNAL(toggled(bool)), tab, SLOT(setVisible(bool)));
+	connect(bAdvd_,SIGNAL(toggled(bool)), wt, SLOT(setVisible(bool)));
+	connect(bAdvd_,SIGNAL(clicked(bool)), this, SLOT(slotAdvancedButton(bool)));
+
+//	layout()->setSizeConstraint(QLayout::SetFixedSize);
+#endif
+
+	// Move Save and Cancel buttons to the bottom.
+	// Save and Cancel buttons are defined together in a QDialogButtonBox.
+	// Therefore, only plays with one of the buttons.
+	row++;
+	QLayoutItem* liCancel = mainLayout->itemAtPosition (row-4, col-1 );
+	mainLayout->removeItem(liCancel);
+	QDialogButtonBox* bb = static_cast<QDialogButtonBox*>(liCancel->widget());
+	bb->setOrientation(Qt::Horizontal);
+	mainLayout->addItem(liCancel,row,2);
+}
+
+// Destructor
+ExportDialog::~ExportDialog()
+{
+	// Save current gui settings
+	QSettings settings("ECMWF","uPlotExportDialog");
+	settings.beginGroup("main");
+        settings.setValue("fileName",selectedFiles());
+	QStringList formats = comboBox_->getSelectedValues();
+	if ( formats.size() )
+		settings.setValue("formats",formats);
+	else
+		settings.setValue("formats","PS");
+	settings.endGroup();
+
+	delete comboBox_;
+	delete bAdvd_;
+	delete leFs3_;
+	delete cbFs1_;
+	delete cbFs2_;
+	delete cbFs3_;
+}
+
+// Callback from the SAVE button
+void ExportDialog::accept()
+{	
+	// Get filename from the user interface
+	QStringList s = selectedFiles();
+	string filename = s.at(0).toStdString();
+
+	// Get output formats
+	QStringList formats = comboBox_->getSelectedValues();
+	if ( formats.size() == 0 )
+	{
+		cout << "Send an pop up error message: No output formats selected" << endl;
+	}
+
+	// Create output requests
+	MvRequest reqOut;
+	getOutputFormatsReq ( filename, formats, reqOut );
+
+	// Get frames selection
+	if ( !getFrameSelection( reqOut ) )
+		return;
+
+	// Send export info to be processed
+	emit sendExpDialogInfo(&reqOut);
+
+	// Close the window
+	int res=0;
+	done(res);
+//	hide();
+}
+
+void ExportDialog::reject()
+{
+	hide();
+}
+
+void ExportDialog::setVisible(bool b)
+{
+	QDialog::setVisible(b);
+}
+
+void ExportDialog::getOutputFormatsReq ( string fname, QStringList& fout, MvRequest& reqOut )
+{
+	// Get all valid output formats
+	MvRequest reqof;
+	ObjectList::FindAll("output_format",reqof);
+
+	// Build selected output formats
+	for ( int i = 0; i < fout.size(); i++ )
+	{
+		// Get output format
+		string sclasse = fout.at(i).toStdString();
+		MvRequest oneReq = ObjectList::Find("output_format",sclasse.c_str());
+
+		// Create request
+		MvRequest req((const char*)oneReq("output"));
+		req("OUTPUT_NAME") = fname.c_str();
+		reqOut = reqOut + req;
+	}
+
+	return;
+}
+
+void ExportDialog::slotAdvancedButton(bool toggle)
+{
+	(toggle) ? bAdvd_->setText ("Options <<") : bAdvd_->setText ("Options >>");
+}
+
+void ExportDialog::slotRangeFrameSelection(bool checked)
+{
+	// Enable/Disable line edit
+	leFs3_->setEnabled(checked);
+}
+
+void ExportDialog::buildFrameSelection( int row, int col, QGridLayout* mainLayout )
+{
+	// Group Box with radio buttons and one line edit
+	QGroupBox* gbFs = new QGroupBox( tr("Frame Selection") );
+	cbFs1_ = new QRadioButton( tr("&Current") );
+	cbFs2_ = new QRadioButton( tr("&All") );
+	cbFs3_ = new QRadioButton( tr("&Range") );
+	cbFs1_->setChecked(true);
+
+	// Line edit with a validator
+	leFs3_ = new QLineEdit( );
+	leFs3_->setToolTip(tr("Specify one or more frame ranges, e.g. 1-3,6,7"));
+	leFs3_->setEnabled(false);
+	QRegExp rx("^\\d{1,}(-\\d{1,})?(,\\d{1,}|,\\d{1,}-\\d{1,})*");
+	QValidator *validator = new QRegExpValidator(rx, this);
+	leFs3_->setValidator(validator);
+
+	// Set layout
+	QGridLayout* glFs = new QGridLayout( gbFs );
+	glFs->addWidget( cbFs1_, 0, 0 );
+	glFs->addWidget( cbFs2_, 1, 0 );
+	glFs->addWidget( cbFs3_, 2, 0 );
+	glFs->addWidget( leFs3_, 2, 1 );
+
+	// Conexions
+	connect(cbFs3_,SIGNAL(toggled(bool)), this, SLOT(slotRangeFrameSelection(bool)));
+
+	// Attach widget to the parent
+	mainLayout->addWidget(gbFs,row,col,3,1);
+
+	return;
+}
+
+bool ExportDialog::getFrameSelection( MvRequest& req )
+{
+	// Three options: CURRENT, ALL, RANGE
+	// ALL: nothing need to be done
+	if ( cbFs2_->isChecked() )
+		return true;
+
+	// CURRENT: get the current frame numbeer
+	int i;
+	QList<int> list;
+	if ( cbFs1_->isChecked() )
+	{
+		list.append(current_+1);  // start from 1, not from 0
+	}
+	else	// RANGE
+	{
+		// Get the list of range entries (split by comma)
+		QStringList list1 = leFs3_->text().split(",", QString::SkipEmptyParts);
+
+		// Analyse all entries
+		for ( i = 0; i < list1.size(); i++)
+		{
+			// Check if it is a single value or a range of values
+			QStringList list2 = list1.at(i).split("-", QString::SkipEmptyParts);
+			if ( list2.size() == 1 ) // single value
+				list.append(list2.at(0).toInt());
+			else
+			{
+				int i1 = list2.at(0).toInt();
+				int i2 = list2.at(1).toInt();
+				if ( i1 > i2 )  // invert sequence
+				{
+					int iaux = i1;
+					i1 = i2;
+					i2 = iaux;
+				}
+				for ( int j = i1; j <= i2; j++ )
+					list.append(j);
+			}
+		}
+
+		// Check if the range of values is valid
+		qSort(list.begin(), list.end());
+		if ( list.at(list.size()-1) > total_ )
+		{
+			ostrstream info;
+			info << "Enter values from 1 to " << total_ << ends;
+			errorMessage("Invalid range!",(const char*)info.str());
+			return false;
+		}
+	}
+
+	// Save list of frames selection for all drivers
+	while ( req )
+	{
+		for ( i = 0; i < list.size(); i++)
+			req.addValue("OUTPUT_FRAME_LIST",list.at(i));
+
+		req.advance();
+	}
+
+	req.rewind();
+
+	return true;
+}
+
+void ExportDialog::errorMessage (const char* msg, const char* info)
+{
+	QMessageBox msgBox;
+	msgBox.setIcon(QMessageBox::Critical);
+	msgBox.setWindowTitle(tr("Export Error"));
+	msgBox.setText(QString::fromUtf8(msg));
+	if ( info )
+		msgBox.setInformativeText(QString::fromUtf8(info));
+
+	msgBox.exec();
+}
diff --git a/src/uPlot/ExportDialog.h b/src/uPlot/ExportDialog.h
new file mode 100644
index 0000000..8471919
--- /dev/null
+++ b/src/uPlot/ExportDialog.h
@@ -0,0 +1,63 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef ExportDialog_H
+#define ExportDialog_H
+
+#include <QFileDialog>
+#include <QPushButton>
+#include <QGridLayout>
+#include <QRadioButton>
+#include <QLineEdit>
+
+#include "MvQCheckBoxCombo.h"
+#include "MvRequest.h"
+
+using namespace std;
+
+
+class ExportDialog : public QFileDialog
+{
+    Q_OBJECT
+
+public:
+    	ExportDialog(int, int, QWidget *parent = 0);
+	~ExportDialog();
+
+signals:	
+	void sendExpDialogInfo(MvRequest*);
+
+public slots:	
+	void accept();
+	void reject();
+	void slotAdvancedButton(bool);
+	void slotRangeFrameSelection(bool);
+
+protected:
+ 	void setVisible(bool);
+
+private:
+	void getOutputFormatsReq ( string, QStringList&, MvRequest& );
+	bool getFrameSelection ( MvRequest& );
+	void buildFrameSelection( int, int, QGridLayout* );
+	void errorMessage ( const char*, const char* = 0 );
+
+	int current_;			// Current frame
+	int total_;			// Total number of frames
+	MvQCheckBoxCombo* comboBox_;	// List of output formats
+	QPushButton* bAdvd_;		// Options button
+	QLineEdit* leFs3_;		// Frame selection: line edit
+	QRadioButton* cbFs1_;		// Frame selection: Current radio button
+	QRadioButton* cbFs2_;		// Frame selection: All radio button
+	QRadioButton* cbFs3_;		// Frame selection: Range radio button
+
+//	MvQGui* ofGui_;			// Output formats user interface
+};
+
+#endif
diff --git a/src/uPlot/GenAppService.cc b/src/uPlot/GenAppService.cc
new file mode 100644
index 0000000..0ebc6f8
--- /dev/null
+++ b/src/uPlot/GenAppService.cc
@@ -0,0 +1,93 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//#include <inc_iostream.h>
+//#include "Assertions.hpp"
+#include "GenAppService.hpp"
+//#include "ObjectList.hpp"
+#include "ObjectList.h"
+
+// Methods for the GenApp Action class
+//
+
+GenAppService&
+GenAppService::Instance()
+{
+	static GenAppService genAppServiceInstance_;
+	return genAppServiceInstance_;
+}
+
+GenAppService::GenAppService ()
+{
+	// Empty
+}
+
+GenAppService::~GenAppService()
+{
+	// Empty
+}
+
+// --- CallGenApp
+//
+// --- PURPOSE: Calls GenApp asking for an editing definition
+//
+// --- INPUT:   (a) Callback procedure to be called when the requested
+//                  is received back from GenApp
+//              (b) Request to be sent to GenApp for editing
+//
+// --- NOTE:    More than one editing action can takes place at a time.
+//              A Map facilities will take care the relationship between
+//              each editing request and the related callback
+
+bool
+GenAppService::CallGenApp ( MvCallbackBase* callback,
+			    MvRequest& defRequest ) 
+{
+	//require ( callback != 0);
+        if(!callback) return false;
+	
+	
+	// Call a Request which is sent directly to MetviewUI
+	MvRequest editRequest ("EDIT");
+
+	// Expand the definition request
+	MvRequest expandedRequest = ObjectList::ExpandRequest ( defRequest, 0 );
+
+	editRequest.setValue ("DEFINITION", expandedRequest );
+
+	// Create a new task
+	MvServiceTask* task = new MvServiceTask (this, "MetviewUI",  editRequest);
+
+	// Put the task in the map
+	callbackMap_[ task ] = callback;
+
+	// Call GenApp to process the request
+	task->run ();
+
+return true;
+}
+
+
+void
+GenAppService::endOfTask ( MvTask* task )
+{
+	// Retrieve the reply request
+	MvServiceTask* serviceTask = (MvServiceTask* ) task;
+
+	MvRequest replyRequest = serviceTask->getReply();
+
+        // Find the associated callback on the map
+        CallbackMap::iterator it = callbackMap_.find (serviceTask);
+        if ( it == callbackMap_.end() ) return;
+
+	// Execute the callback procedure
+	(*it).second->ExecuteCallback ( replyRequest );
+
+	callbackMap_.erase ( it ); // clean up
+}
diff --git a/src/uPlot/GenAppService.hpp b/src/uPlot/GenAppService.hpp
new file mode 100644
index 0000000..1861b42
--- /dev/null
+++ b/src/uPlot/GenAppService.hpp
@@ -0,0 +1,126 @@
+//
+// .NAME:	
+//  GenAppService
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//     ECMWF, December 1997
+//
+// .SUMMARY:
+//  Describes the GenAppService class, which handles
+//  the communication with GenApp for the purposes of 
+//  user interface definitions.
+//
+//  PlotMod delegates all interface definition (such
+//  as Printer Setup and Preferences) to GenApp, which
+//  already has the facilities for creating menus.
+//
+//  This is a "singleton" class.
+//
+// .CLIENTS:
+//  SuperPage, as called by the main menu (SuperPageWidget)
+//
+// .RESPONSABILITY:
+//  This class will provide support for the communication
+//  with GenApp for the purposes of user interface definitions
+//
+//  Each new object of this class will, on its constructor:
+//  - create a GenApp "EDIT, DEFINITION" request
+//    which will allow GenApp to edit this definition
+//  - store a copy of a callback procedure to be called
+//  - call GenApp (using the MvServiceTask facilities)
+//
+//  When the "endofTask" function is returned by "event",
+//  the object will perform the callback action
+//
+//
+// .COLLABORATORS:
+//  MvServiceTask, GenApp
+//
+// .ASCENDENT:
+//  MvClient
+//
+// .DESCENDENT:
+//  
+//
+// .REFERENCES:
+//  This class is based on the general facilities for
+//  process communication used in METVIEW, especially the
+//  MvClient and MvServiceTask facilities. Please refer
+//  to these classes (or have a chat with Baudoin) for
+//  more information.
+//
+//  This class implements a "singleton" as suggested 
+//  by Myers, "More Effective C+", page 130.
+//  
+
+#ifndef GenAppService_H
+#define GenAppService_H
+
+#include "MvServiceTask.h"
+#include "MvTask.h"
+//#include <MvSTL.h>
+#include "MvCallback.hpp"
+
+#include <map>
+
+using namespace std;
+
+// allows more than one request to GenApp simultaneously
+typedef map < MvServiceTask*, MvCallbackBase* > CallbackMap;
+
+class GenAppService: public MvClient {
+
+public:
+
+	static GenAppService& Instance();
+	// access to class singleton
+
+// -- Destructor
+
+	~GenAppService();
+
+// -- Methods
+
+	virtual void endOfTask ( MvTask* );
+	// perform actions after receiving response from GenApp  
+
+	bool  CallGenApp( MvCallbackBase *, MvRequest& );
+	// call GenApp to perform editing actions
+
+private:
+
+// -- Constructors
+
+	GenAppService();  // no external access point
+
+	CallbackMap callbackMap_;
+	// contains for each task the related callback
+};
+
+
+// -- CallGenAppService
+//
+//    external function called by the PlotMod classes
+//    to ask GenApp to edit a request
+//
+//    INPUT : An object,
+//            a callback procedure
+//            an input request
+//
+//    NOTE:   The request verb MUST exist on the object list
+
+template<class T> 
+bool
+CallGenAppService( T& object, 
+		   void(T::* proc)(MvRequest& ),
+		   MvRequest& request )
+{
+
+	bool result = GenAppService::Instance().CallGenApp 
+		( new MvCallback<T>( object, proc ),  request );
+
+return result;
+}
+
+#endif
diff --git a/src/uPlot/GeoTool.cc b/src/uPlot/GeoTool.cc
new file mode 100644
index 0000000..c2bb729
--- /dev/null
+++ b/src/uPlot/GeoTool.cc
@@ -0,0 +1,758 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "GeoTool.h"
+#include "ObjectList.h"
+#include "Preferences.h"
+
+#include <QAction>
+#include <QApplication>
+#include <QChar>
+#include <QDebug>
+#include <QLabel>
+#include <QPushButton>
+#include <QAction>
+#include <QStringBuilder>
+#include <QStyle>
+#include <QToolBar>
+#include <QVBoxLayout>
+
+#include "MgQPlotScene.h"
+#include "MgQSceneItem.h"
+
+#include "MvQApplication.h"
+#include "MvQPlotView.h"
+#include "MvQZoomStackWidget.h"
+
+GeoTool::GeoTool( MvRequest& req, QWidget* parent ) : uPlotBase(parent)
+{
+	// Initialize variables
+	QString coord = InitializeParams(req);
+	setAttribute(Qt::WA_DeleteOnClose);
+	setWindowTitle("Metview - Geography Tool");
+
+	//Initial size
+	setInitialSize(600,400);
+	
+	//uPlot area. Define the whole lot as central widget
+	QWidget *w = new QWidget;
+	setCentralWidget(w);
+        QVBoxLayout* vlay = new QVBoxLayout( w );
+	vlay->addWidget(plotView_);
+
+	//Setup the bottom layout (coordinates + buttons)
+        QHBoxLayout* hlay = new QHBoxLayout();
+	vlay->addLayout(hlay);
+	QLabel* coordLabel = new QLabel(tr("S/W/N/E:"));
+	coordEdit_ = new QLineEdit();
+	coordEdit_->setMinimumSize(170,0);
+	coordEdit_->setText(tr(coord.toStdString().c_str()));
+	QPushButton* okPb = new QPushButton(tr("&OK"));
+	okPb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton));
+	QPushButton* cancelPb = new QPushButton(tr("&Cancel"));
+	cancelPb->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogCancelButton));
+	hlay->addWidget(coordLabel);
+	hlay->addWidget(coordEdit_);
+        hlay->addStretch( 1 );
+	hlay->addWidget(okPb);
+	hlay->addWidget(cancelPb);
+		
+	//Setup the actions
+	setupZoomActions();
+	setupViewActions();
+	setupInputSelectionActions();
+		
+	//Setup menus and toolbars
+	setupMenus(menuItems_,MvQMainWindow::ToolBarOnlyOption);
+
+	isFirstMap_=true;
+
+	// Signal/Slot definitions
+	connect(okPb,SIGNAL(clicked()),this,SLOT(slotOk()));
+	connect(cancelPb,SIGNAL(clicked()),this,SLOT(close()));
+	connect(coordEdit_,SIGNAL(returnPressed()),this,SLOT(slotCoordChanged()));
+		
+	connect(this,SIGNAL(plotWindowUpdated()),
+		this,SLOT(slotPlotWindowUpdated()));
+
+	connect(this,SIGNAL(areaChanged(double,double,double,double)),
+		plotView_,SLOT(slotChangeArea(double,double,double,double)));
+
+	connect(this,SIGNAL(lineChanged(double,double,double,double)),
+		plotView_,SLOT(slotChangeLine(double,double,double,double)));
+
+	connect(this,SIGNAL(pointChanged(double,double)),
+		plotView_,SLOT(slotChangePoint(double,double)));	
+				
+	//Read qt geometry settings
+	readSettings();
+		
+	//Enable antialias
+	slotEnableAntialias(true);
+	
+	//Hide view toolbar
+	QToolBar*  tb=findToolBar(MvQMainWindow::ViewMenu);
+	if(tb) tb->hide();
+	
+	//Size is set to Fit to window
+	int sizeIndex=predefSizeValues_.indexOf(uPlotBase::FitToWindow);
+	if(sizeIndex != -1)
+		sizeCombo_->setCurrentIndex(sizeIndex);
+	else
+	  	sizeCombo_->setCurrentIndex(0);	
+}
+
+GeoTool::~GeoTool()
+{
+	writeSettings();
+}
+	
+void GeoTool::setupInputSelectionActions()
+{
+	//Selection action
+	QAction *actionSelection = new QAction(this);
+        actionSelection->setObjectName(QString::fromUtf8("actionSelection"));
+        actionSelection->setCheckable(true);
+
+        QIcon icon;
+	if(inputType_ == "AREA")
+        {
+		icon.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/select_rect.svg")), QIcon::Normal, QIcon::Off);
+	}
+	else if(inputType_ == "LINE")
+        {
+		icon.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/select_line.svg")), QIcon::Normal, QIcon::Off);
+	}
+	else if(inputType_ == "POINT")
+        {
+		icon.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/select_point.svg")), QIcon::Normal, QIcon::Off);
+        }
+	actionSelection->setIcon(icon); 
+
+	QString selectionName;
+	if(inputType_ == "AREA")
+	{
+		selectionName=tr("&Area Selection");
+	}
+	else if(inputType_ == "LINE")
+	{
+		selectionName=tr("&Line Selection");
+	}
+	else if(inputType_ == "POINT")
+	{
+		selectionName=tr("&Point Selection");
+	}
+	actionSelection->setText(selectionName);
+
+	//Clear selection action
+	QAction *actionClear, *actionAll ,*actionChDir;
+	if(inputType_ == "AREA")
+	{
+		actionClear = new QAction(this);
+        	actionClear->setObjectName(QString::fromUtf8("actionClear"));
+        	actionClear->setCheckable(false);
+		actionClear->setText(tr("&Clear selection"));
+		QIcon icon1;
+		icon1.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/remove.svg")), QIcon::Normal,QIcon::Off);
+		actionClear->setIcon(icon1);
+
+		actionAll = new QAction(this);
+        	actionAll->setObjectName(QString::fromUtf8("actionAll"));
+        	actionAll->setCheckable(false);
+		actionAll->setText(tr("&Select whole area"));
+		QIcon icon2;
+		icon2.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/select_all.svg")), QIcon::Normal,QIcon::Off);
+		actionAll->setIcon(icon2);
+
+	}
+	else if(inputType_ == "LINE")
+	{
+		actionClear = new QAction(this);
+        	actionClear->setObjectName(QString::fromUtf8("actionClear"));
+        	actionClear->setCheckable(false);
+		actionClear->setText(tr("&Clear selection"));
+		QIcon icon1;
+		icon1.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/remove.svg")), QIcon::Normal,QIcon::Off);
+		actionClear->setIcon(icon1);
+
+		actionChDir = new QAction(this);
+        	actionChDir->setObjectName(QString::fromUtf8("actionChDir"));
+        	actionChDir->setCheckable(false);
+		actionChDir->setText(tr("&Change line direction"));
+		QIcon icon2;
+		icon2.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/swap_direction.svg")), QIcon::Normal,QIcon::Off);
+		actionChDir->setIcon(icon2);
+	}
+	else if(inputType_ == "POINT")
+	{
+		actionClear = new QAction(this);
+        	actionClear->setObjectName(QString::fromUtf8("actionClear"));
+        	actionClear->setCheckable(false);
+		actionClear->setText(tr("&Clear selection"));
+		QIcon icon1;
+		icon1.addPixmap(QPixmap(QString::fromUtf8(":/geoSelect/remove.svg")), QIcon::Normal,QIcon::Off);
+		actionClear->setIcon(icon1);
+	}
+
+	
+	// Connections
+
+	if(inputType_ == "AREA")
+	{
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			plotView_, SLOT(slotSetEnableAreaSelection(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			coordEdit_, SLOT(setEnabled(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			actionClear, SLOT(setEnabled(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			actionAll, SLOT(setEnabled(bool)));
+
+		connect(plotView_,SIGNAL(areaIsDefined(double,double,double,double)),
+			this,SLOT(slotAreaSelection(double,double,double,double)));
+
+		connect(plotView_,SIGNAL(areaIsUndefined()),
+			this,SLOT(slotAreaIsUndefined()));
+
+		connect(plotView_,SIGNAL(inputSIsEnabledProgramatically(bool)),
+			actionSelection, SLOT(setChecked(bool)));
+
+		connect(actionClear,SIGNAL(triggered()),
+			plotView_,SLOT(slotClearArea())); 
+
+		connect(actionAll,SIGNAL(triggered()),
+			plotView_,SLOT(slotSelectAllArea())); 
+		
+	}
+	else if(inputType_ == "LINE")
+	{
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			plotView_, SLOT(slotSetEnableLineSelection(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			coordEdit_, SLOT(setEnabled(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			actionClear, SLOT(setEnabled(bool)));
+
+		connect(plotView_,SIGNAL(lineIsDefined(double,double,double,double)),
+			this,SLOT(slotLineSelection(double,double,double,double)));
+
+		connect(plotView_,SIGNAL(lineIsUndefined()),
+			this,SLOT(slotLineIsUndefined()));
+
+		connect(plotView_,SIGNAL(inputSIsEnabledProgramatically(bool)),
+			actionSelection, SLOT(setChecked(bool)));
+
+		connect(actionClear,SIGNAL(triggered()),
+			plotView_,SLOT(slotClearLine())); 
+
+		connect(actionChDir,SIGNAL(triggered()),
+			plotView_,SLOT(slotChangeLineDirection())); 
+	}
+	else if(inputType_ == "POINT")
+	{
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			plotView_, SLOT(slotSetEnablePointSelection(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			coordEdit_, SLOT(setEnabled(bool)));
+
+		connect(actionSelection, SIGNAL(toggled(bool)),
+			actionClear, SLOT(setEnabled(bool)));
+
+		connect(plotView_,SIGNAL(pointIsDefined(double,double)),
+			this,SLOT(slotPointSelection(double,double)));
+
+		connect(plotView_,SIGNAL(pointIsUndefined()),
+			this,SLOT(slotPointIsUndefined()));
+
+		connect(plotView_,SIGNAL(inputSIsEnabledProgramatically(bool)),
+			actionSelection, SLOT(setChecked(bool)));
+
+		connect(actionClear,SIGNAL(triggered()),
+			plotView_,SLOT(slotClearPoint())); 
+	}
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::SelectionMenu;
+
+	menuItems_[menuType].push_back(new MvQMenuItem(actionSelection));
+	if(inputType_ == "AREA")
+	{
+		menuItems_[menuType].push_back(new MvQMenuItem(actionAll));
+		menuItems_[menuType].push_back(new MvQMenuItem(actionClear));
+	}
+	else if(inputType_ == "LINE")
+	{
+		menuItems_[menuType].push_back(new MvQMenuItem(actionChDir));
+		menuItems_[menuType].push_back(new MvQMenuItem(actionClear));
+	}
+	else if(inputType_ == "POINT")
+	{
+		menuItems_[menuType].push_back(new MvQMenuItem(actionClear));
+	}
+
+
+	// Enable icon and call callback function to draw the initial user selection
+	actionSelection->setChecked(true);
+
+}
+
+QString GeoTool::InitializeParams( MvRequest& req )
+{
+	// Create a default superpage request
+	spRequest_ = ObjectList::CreateDefaultRequest ( "PLOT_SUPERPAGE" );
+	spRequest_("_NAME") = "Geographical Tool Window";
+
+	// Get input type
+	// Problem: request MapView comes with MAP and Average with AREA
+	// Use input type tag AREA always
+	inputType_ = (const char*)req( "INPUT_TYPE" );
+	if ( inputType_ == "MAP" )
+		inputType_ = "AREA";
+
+	// Update size
+	spRequest_("CUSTOM_WIDTH")  = req("CUSTOM_WIDTH");
+	spRequest_("CUSTOM_HEIGHT") = req("CUSTOM_HEIGHT");
+	spRequest_("LAYOUT_SIZE")   = "CUSTOM";
+	req.advance();  // skip EDIT_MAP request
+
+	// Create a coastline request from user's preferences
+	MvRequest coastRequest = Preferences::CoastRequest();
+
+	// Create a default mapview request
+	// Customize dimensions and add coastlines 
+	MvRequest viewRequest = ObjectList::CreateDefaultRequest ( DEFAULTVIEW.c_str() );
+	viewRequest("SUBPAGE_X_POSITION") = 7;
+	viewRequest("SUBPAGE_Y_POSITION") = 7;
+	viewRequest("SUBPAGE_X_LENGTH")   = 86;
+	viewRequest("SUBPAGE_Y_LENGTH")   = 86,
+	viewRequest ( "COASTLINES" ) = coastRequest;
+
+	// Initialize parameters
+	QString coord;
+	geoRequest_.setVerb("INPUT");
+	if ( inputType_ == "POINT")
+	{
+		if ( (const char*)req("POINT") )
+			type_ = "POINT";
+		else if ( (const char*)req("POSITION") )
+			type_ = "POSITION";
+		else
+		{
+			cout << " ERROR: INVALID PARAMETER VALUE. VALID VALUES: POINT, POSITION" << endl;
+			return QString("ERROR");
+		}
+
+		geoRequest_(type_.c_str())  = req(type_.c_str(),0);
+		geoRequest_(type_.c_str()) += req(type_.c_str(),1);
+		coord = (const char*)req(type_.c_str(),0) % QChar('/') % (const char*)req(type_.c_str(),1);
+		
+	}
+	else if ( inputType_ == "LINE")
+	{
+		geoRequest_("LINE")  = req("LINE",0);
+		geoRequest_("LINE") += req("LINE",1);
+		geoRequest_("LINE") += req("LINE",2);
+		geoRequest_("LINE") += req("LINE",3);
+		coord = requestToCoord(req,"LINE");
+	}
+	else if ( inputType_ == "AREA")
+	{		
+		if(static_cast<const char*>(req("AREA")))
+	  		areaParam_="AREA";
+		else if(static_cast<const char*>(req("FLEXTRA_AREA")))
+		  	areaParam_="FLEXTRA_AREA";
+		else if(static_cast<const char*>(req("area")))
+		  	areaParam_="area";
+		
+	  	geoRequest_(areaParam_.c_str())  = req(areaParam_.c_str(),0);
+		geoRequest_(areaParam_.c_str()) += req(areaParam_.c_str(),1);
+		geoRequest_(areaParam_.c_str()) += req(areaParam_.c_str(),2);
+		geoRequest_(areaParam_.c_str()) += req(areaParam_.c_str(),3);
+		coord = requestToCoord(req,areaParam_.c_str());
+
+		if ( (const char*)req("MAP_PROJECTION") )
+		{
+			geoRequest_("MAP_PROJECTION")  = req("MAP_PROJECTION");
+			viewRequest("MAP_PROJECTION")  = req("MAP_PROJECTION");
+		}
+		if ( (const char*)req("MAP_VERTICAL_LONGITUDE") )
+		{
+			geoRequest_("MAP_VERTICAL_LONGITUDE")  = req("MAP_VERTICAL_LONGITUDE");
+			viewRequest("MAP_VERTICAL_LONGITUDE")  = req("MAP_VERTICAL_LONGITUDE");
+		}
+		if ( (const char*)req("MAP_HEMISPHERE") )
+		{
+			geoRequest_("MAP_HEMISPHERE")  = (const char*)req("MAP_HEMISPHERE");
+			viewRequest("MAP_HEMISPHERE")  = (const char*)req("MAP_HEMISPHERE");
+		}
+	}
+
+	// Finalize superpage request
+	// Create default page and add view to this request
+	MvRequest pageRequest = ObjectList::CreateDefaultRequest ( "PLOT_PAGE" );
+	pageRequest("VIEW") = viewRequest;
+	spRequest_("PAGES") = pageRequest;
+
+	return coord;
+}
+
+void GeoTool::UpdateCoordinates( QString& coord )
+{
+	QStringList clist = coord.split("/");
+	if ( inputType_ == (const char*)( "POINT" ) )
+	{
+		if ( clist.size() != 2 )
+		{
+			cout << "ERROR" << endl;
+			return;
+		}
+	        geoRequest_(type_.c_str())  = clist.at(0).toDouble();
+	        geoRequest_(type_.c_str()) += clist.at(1).toDouble();
+	}
+	else if ( inputType_ ==  (const char*)( "LINE" ) )
+	{
+		if ( clist.size() != 4 )
+		{
+			cout << "ERROR" << endl;
+			return;
+		}
+		coordToRequest(coord,geoRequest_,"LINE");
+	}
+       	else
+       	{
+		if ( clist.size() != 4 )
+		{
+			cout << "ERROR" << endl;
+			return;
+		}
+		coordToRequest(coord,geoRequest_,areaParam_.c_str());
+	}
+	return;
+}
+
+
+void GeoTool::newRequestForDriversBegin()
+{
+	plotScene_->saveStateBeforeNewRequest();
+	
+	if(activeScene_)
+	{
+	 	prevActiveSceneId_=activeScene_->layout().id();
+		if(prevActiveSceneId_.empty())
+		{
+		  	MgQLayoutItem *projItem=activeScene_->firstProjectorItem();
+			prevActiveSceneId_=projItem->layout().id();
+		}	
+	}
+	else
+	{
+	  	prevActiveSceneId_.clear();
+	} 
+	
+	activeScene_=0;
+}
+
+
+void GeoTool::newRequestForDriversEnd()
+{	
+	//Select the active scene
+	if(!activeScene_)
+	{	  
+	  	if(!prevActiveSceneId_.empty())
+		{
+			foreach(MgQSceneItem *item,plotScene_->sceneItems())
+			{
+			  	MgQLayoutItem *projItem=item->firstProjectorItem();
+				if(item->layout().id() == prevActiveSceneId_)
+				{
+				  	activeScene_=item;
+					break;
+				}
+				else if(item->layout().id().empty() && projItem &&
+				        prevActiveSceneId_==projItem->layout().id())
+				{
+					activeScene_=item;
+					break;  
+				}	
+			}
+		}
+		
+		
+		if(!activeScene_ && plotScene_->sceneItems().count() >0)
+		{
+		  	activeScene_=plotScene_->sceneItems().back();	
+		}
+	}		
+
+	//Resize without rendering!!
+	changeSize(sizeCombo_->itemData(sizeCombo_->currentIndex(),Qt::UserRole).toInt(),false);	
+	
+	//Load steps/layers and generate layer thumbnails - No rendering at this point!
+	//It tries to set the current step for all the scenes!
+	//The current step should be correctly set at least for the active scene.
+	plotScene_->updateAfterNewRequest();
+	
+	//Zoom stack
+	zoomStackWidget_->reset(activeScene_,false);	
+	updateZoomActionState();	
+	
+	//Magnifier, cursordata etc
+	plotView_->resetEnd();
+	
+	//NOW RENDER IT! We render the whole scene into the pixmap cache at this point!
+	plotScene_->sceneItemChanged();
+	
+	//Emit a signal that the plot windows has been updated
+	emit plotWindowUpdated();
+}
+
+
+void GeoTool::slotOk()
+{
+	// Update coordinates
+	QString coord = coordEdit_->text();
+
+	if(coord != tr("Undefined"))
+	{
+		UpdateCoordinates(coord);
+		// Send request back to the caller
+		MvApplication::sendMessage(geoRequest_);
+	}
+	// Close interface
+	close();
+}
+
+void GeoTool::slotCoordChanged( )
+{
+	// Geographical coordinates changed manually.
+	// Update graphical area.
+	coord_ = coordEdit_->text();
+
+	QStringList clist = coord_.split("/");
+	if ( inputType_ == "AREA" )
+	{
+		double blLat = clist.at(0).toDouble();
+		double blLon  = clist.at(1).toDouble();
+		double trLat = clist.at(2).toDouble();
+		double trLon  = clist.at(3).toDouble();
+		//plotView_->DrawRectangle(north,west,south,east);
+
+		emit areaChanged(blLat,blLon,trLat,trLon);
+	}
+	else if(inputType_ == "LINE" )
+	{
+		double lat1 = clist.at(0).toDouble();
+		double lon1  = clist.at(1).toDouble();
+		double lat2 = clist.at(2).toDouble();
+		double lon2  = clist.at(3).toDouble();
+		//plotView_->DrawRectangle(north,west,south,east);
+
+		emit lineChanged(lat1,lon1,lat2,lon2);				
+	}
+	else if(inputType_ == "POINT" )
+	{
+		double lat = clist.at(0).toDouble();
+		double lon  = clist.at(1).toDouble();
+		
+		//plotView_->DrawRectangle(north,west,south,east);
+
+		emit pointChanged(lat,lon);				
+	}
+	
+}
+
+void GeoTool::slotAreaSelection(double blLat,double blLon, double trLat, double trLon)
+{
+	// A new area was selected graphically. Update text coordinates.
+
+	qDebug() << "New area";
+
+	char buf[48];
+	sprintf(buf,"%.2f/%.2f/%.2f/%.2f",blLat,blLon,trLat,trLon);
+	coordEdit_->setText(tr(buf));
+	coord_ = buf;
+}
+
+void GeoTool::slotAreaIsUndefined()
+{
+	bool editStatus=coordEdit_->isEnabled();
+	if(editStatus == false)
+	{
+		coordEdit_->setEnabled(true);
+	}
+	coordEdit_->setText(tr("Undefined"));
+	if(editStatus == false)
+	{
+		coordEdit_->setEnabled(false);
+	}
+
+	coord_.clear();
+}
+
+void GeoTool::slotLineSelection(double lat1, double lon1, double lat2, double lon2)
+{
+	// A new area was selected graphically. Update text coordinates.
+
+	qDebug() << "New line";
+
+	char buf[48];
+	sprintf(buf,"%.2f/%.2f/%.2f/%.2f",lat1,lon1,lat2,lon2);
+	coordEdit_->setText(tr(buf));
+	coord_ = buf;
+}
+
+void GeoTool::slotLineIsUndefined()
+{
+	bool editStatus=coordEdit_->isEnabled();
+	if(editStatus == false)
+	{
+		coordEdit_->setEnabled(true);
+	}
+	coordEdit_->setText(tr("Undefined"));
+	if(editStatus == false)
+	{
+		coordEdit_->setEnabled(false);
+	}
+
+	coord_.clear();
+}
+
+void GeoTool::slotPointSelection(double lat, double lon)
+{
+	// A new area was selected graphically. Update text coordinates.
+
+	qDebug() << "New point";
+
+	char buf[48];
+	sprintf(buf,"%.2f/%.2f",lat,lon);
+	coordEdit_->setText(tr(buf));
+	coord_ = buf;
+}
+
+void GeoTool::slotPointIsUndefined()
+{
+	bool editStatus=coordEdit_->isEnabled();
+	if(editStatus == false)
+	{
+		coordEdit_->setEnabled(true);
+	}
+	coordEdit_->setText(tr("Undefined"));
+	if(editStatus == false)
+	{
+		coordEdit_->setEnabled(false);
+	}
+
+	coord_.clear();
+}
+
+
+void GeoTool::slotPlotWindowUpdated()
+{
+	if ( inputType_ == "AREA" )
+	{
+		if(isFirstMap_==true)
+		{
+			//plotView_->slotSelectAllArea();
+			slotCoordChanged();
+			isFirstMap_=false;
+		}
+		//slotCoordChanged();
+	}
+	else if ( inputType_ == "LINE" )
+	{
+		if(isFirstMap_==true)
+		{
+			slotCoordChanged(); 
+			isFirstMap_=false;
+		}
+		//slotCoordChanged();
+	}
+	else if ( inputType_ == "POINT" )
+	{
+		if(isFirstMap_==true)
+		{
+			slotCoordChanged(); 
+			isFirstMap_=false;
+		}
+		//slotCoordChanged();
+	}
+
+}
+
+//void GeoTool::slotClearSelection()
+//{
+//	slotAreaIsUndefined();
+//	plotView_->slotClearArea();
+//}
+
+QString GeoTool::requestToCoord( MvRequest& req, const char* param )
+{
+	if(!param)	
+  		return QString();
+	
+  	QString coord = (const char*)req(param,0) % QChar('/') % 
+			(const char*)req(param,1) % QChar('/') %
+			(const char*)req(param,2) % QChar('/') %
+			(const char*)req(param,3);
+
+	return coord;
+}
+
+void GeoTool::coordToRequest( QString& coord, MvRequest& req, const char* param)
+{
+	QStringList clist = coord.split("/");
+
+	req(param)  = clist.at(0).toDouble();
+	req(param) += clist.at(1).toDouble();
+	req(param) += clist.at(2).toDouble();
+	req(param) += clist.at(3).toDouble();
+
+	return;
+}
+
+bool GeoTool::setDropTarget(QPoint globalPos)
+{	
+	QPointF scenePos = plotView_->mapToScene(plotView_->mapFromGlobal(globalPos));
+	
+	if(activeScene_ && activeScene_->sceneBoundingRect().contains(scenePos))
+	{	
+		return true;
+	}
+	
+	return false;
+}
+
+
+void GeoTool::writeSettings()
+{	  
+  	QSettings settings("ECMWF","MV4-GeoTool");
+	settings.beginGroup("main");		
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("state",saveState());		
+	settings.endGroup();
+}	
+	
+void GeoTool::readSettings()
+{
+	QSettings settings("ECMWF","MV4-GeoTool");	
+	settings.beginGroup("main");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	restoreState(settings.value("state").toByteArray());			
+	settings.endGroup();		
+}
+
+
+
+
+
diff --git a/src/uPlot/GeoTool.h b/src/uPlot/GeoTool.h
new file mode 100644
index 0000000..ba26140
--- /dev/null
+++ b/src/uPlot/GeoTool.h
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef GEOGRAPHYTOOL_H
+#define GEOGRAPHYTOOL_H
+
+#include <QLineEdit>
+
+#include "uPlotBase.h"
+#include "MvRequest.h"
+
+class GeoTool :public uPlotBase
+{
+	Q_OBJECT
+
+public:
+	GeoTool( MvRequest&, QWidget* parent = 0 );
+	~GeoTool();
+
+	MvRequest SuperPageRequest( ) { return spRequest_; }
+	
+	void newRequestForDriversBegin();
+	void newRequestForDriversEnd();
+
+public slots:
+	void slotOk();
+	void slotCoordChanged();
+	void slotAreaSelection(double,double,double,double);
+	void slotAreaIsUndefined();
+	void slotLineSelection(double,double,double,double);
+	void slotLineIsUndefined();
+	void slotPointSelection(double,double);
+	void slotPointIsUndefined();
+	void slotPlotWindowUpdated();
+	void slotSetActiveScene(MgQSceneItem*) {};
+
+signals:
+	void areaChanged(double,double,double,double);
+	void lineChanged(double,double,double,double);
+	void pointChanged(double,double);
+
+private:
+	
+	void setupInputSelectionActions();
+	
+	// Initialize parameters
+	QString InitializeParams( MvRequest& );
+
+	bool setDropTarget(QPoint);
+	int currentStep() {return 0;}
+	int stepNum() {return 0;}
+		
+	// Get input coordinates
+	void UpdateCoordinates(QString& );
+
+	// Translate coordinates to/from request
+	QString requestToCoord( MvRequest&, const char*);
+	void coordToRequest( QString&, MvRequest&, const char*);
+
+	void readSettings();
+	void writeSettings();
+		
+	QLineEdit* coordEdit_;   // geographical coordinates area
+	QString coord_;		 // coordinates
+	MvRequest  geoRequest_;  // request to be sent out to the caller
+	MvRequest  spRequest_;   // superpage request
+	string inputType_;	 // AREA, LINE, POINT
+	string type_;		 // POINT, POSITION
+	bool isFirstMap_;
+	
+	string areaParam_;
+};
+
+#endif
diff --git a/src/uPlot/GeoToolManager.cc b/src/uPlot/GeoToolManager.cc
new file mode 100644
index 0000000..4f5f799
--- /dev/null
+++ b/src/uPlot/GeoToolManager.cc
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "GeoToolManager.h"
+#include <MvApplication.h>
+#include "MvServiceTask.h"
+
+int main(int argc,char **argv)
+{
+	// Set option -debug to true
+	// This is needed in order to force the Save Request command
+	// to save the hidden parameters too (underscore parameters).
+	option opts[] = {"debug","MARS_DEBUG","-debug","1",t_boolean,
+			 sizeof(boolean),OFFSET(globals,debug)};
+
+	MvApplication theApp(argc,argv,NULL,&mars,1,opts);
+
+	GeoToolManager gt("EDIT_MAP");
+
+	// The applications don't try to read or write from pool, this
+	// should not be done with the new PlotMod.
+//	gt.saveToPool(false);
+
+	theApp.run();
+}
+
+//-------------------------------------------------------------
+
+GeoToolManager::GeoToolManager(const char* kw): MvService(kw)
+{
+//     saveToPool(false);
+}
+
+void GeoToolManager::serve(MvRequest& in,MvRequest& out)
+{
+cout << "GeoToolManager::serve in" << endl;
+in.print();
+
+	// Call function to process the request
+        GeoToolService::Instance().CallGeoTool ( in,out );
+
+	return;
+}
+
+//--------------------------------------------------------
+
+// Methods for the GeoToolService class
+//
+
+// --- METHOD:  Instance
+//
+// --- PURPOSE: Provide access to the singleton
+//              GeoToolService class 
+
+GeoToolService&
+GeoToolService::Instance()
+{
+	static GeoToolService GeoToolServiceInstance_;
+	return GeoToolServiceInstance_;
+}
+
+GeoToolService::GeoToolService ()
+{
+	// Empty
+}
+
+GeoToolService::~GeoToolService()
+{
+	// Empty
+}
+
+// --- METHOD:  CallGeoTool
+//
+// --- PURPOSE: Calls GeoTool
+//
+// --- INPUT:   (a) Request containing an action for GeoTool to process
+void
+GeoToolService::CallGeoTool ( MvRequest& in, MvRequest& out)
+{
+	// Use system command to start the appropriate GeoTool service.
+	// The service will fork, register itself and read the initial request 
+	// to be processed. This request is stored in a temporary file whose 
+	// filename is passed to the service in the command line argument.
+
+	// Save request to be processed by the appropriate service
+	const char* ftemp = marstmp();
+	in.save(ftemp);
+
+	// Tell the caller that the request was done
+	// The problem here is that the icon will be green even if GeoTool
+	// can not process the request.
+	// WE NEED TO FIND A BETTER SOLUTION!!!!!!!
+	out.setVerb("REPLY");
+	out("TARGET") = "MetviewUI";   //????????????
+
+	// Start the approriate service
+	char cmd[1024];
+	sprintf(cmd,"$metview_command $METVIEW_BIN/GeoTool %s $METVIEW_QT_APPLICATION_FLAGS &",ftemp);
+	system(cmd);
+}
+
+void
+GeoToolService::endOfTask ( MvTask* task )
+{
+cout << " END OF CALLGeoTool " << endl;
+	// If error, send a message and return 
+	if ( task->getError() != 0 )
+	{
+		//int i = 0;
+		//const char* msg = 0;
+		//while ( msg = task->getMessage (i++ ) )
+		
+//		PlotMod::MetviewError ( "uPlot crashed" );
+		cout << "GeoTool crashed" << endl;
+	}
+
+	// Retrieve the reply request
+	MvServiceTask* serviceTask = ( MvServiceTask* ) task;
+
+	MvRequest replyRequest = serviceTask->getReply();
+replyRequest.print();
+
+	// Execute the callback procedure
+	// Call GeoTool
+//	MvApplication::callService ( "GeoTool", replyRequest, 0 );
+}
diff --git a/src/uPlot/GeoToolManager.h b/src/uPlot/GeoToolManager.h
new file mode 100644
index 0000000..191d07d
--- /dev/null
+++ b/src/uPlot/GeoToolManager.h
@@ -0,0 +1,112 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:	
+//  GeoToolService and GeoToolManager
+//
+// .AUTHOR:
+//  Fernando Ii
+//  (adapted from MagicsService class)
+//     ECMWF, April 2010
+//
+// .SUMMARY:
+//  Describes the GeoToolService  and GeoToolManger classes, 
+//  which handles the communication with GeoTool (including uPlot base
+//  classes) for the purposes of execution of geography tool tasks. 
+//  This is a "singleton" class 
+//
+// .CLIENTS:
+//  SuperPage, as called by the main menu (SuperPageWidget)
+//
+// .RESPONSABILITY:
+//  This class will provide support for the communication
+//  with uPlot for the purposes of user interface definitions
+//
+//  The unique object of the GeoToolService class will, on the "Call GeoTool"
+//  method :
+//  - stores a copy of a callback procedure to be called
+//    when GeoTool returns its actions
+//  - calls GeoTool (using the MvServiceTask facilities)
+//
+//  When the "endofTask" function is returned by "event",
+//  the object will perform the callback action stored
+//  in the "Call GeoTool" method
+//
+// .COLLABORATORS:
+//  MvServiceTask, GeoTool
+//
+// .ASCENDENT:
+//  MvClient
+//
+// .DESCENDENT:
+//  
+//
+// .REFERENCES:
+//  This class is based on the general facilities for
+//  process communication used in METVIEW, especially the
+//  MvClient and MvServiceTask facilities. Please refer
+//  to these classes (or have a chat with Baudoin) for
+//  more information.
+//
+//  This class implements a "singleton" as suggested 
+//  by Myers, "More Effective C+", page 130.
+//
+
+#ifndef GeoToolMANAGER_H
+#define GeoToolMANAGER_H
+
+//#include "Metview.h"
+
+#include <mars.h>
+#include <MvRequest.h>
+#include <MvProtocol.h>
+#include <MvService.h>
+#include <MvTask.h>
+
+class GeoToolManager : public MvService {
+
+public:
+
+	// Constructor
+	GeoToolManager(const char* kw);
+
+	// Destructor
+	~GeoToolManager() {}
+
+	void serve(MvRequest&,MvRequest&);
+};
+
+
+class GeoToolService: public MvClient {
+
+public:
+
+	// Access to singleton object
+	static GeoToolService& Instance();
+
+	// Destructor
+	~GeoToolService();
+
+	// Methods
+
+	// Perform actions after receiving response from the GeographyTool tools
+	virtual void endOfTask ( MvTask* );
+
+	// Call data tiik
+	void  CallGeoTool( MvRequest& in, MvRequest& out );
+
+private:
+
+	// Constructors
+	GeoToolService();  // no external access point
+
+};
+
+#endif
diff --git a/src/uPlot/GeopointsDecoder.cc b/src/uPlot/GeopointsDecoder.cc
new file mode 100644
index 0000000..bf2519f
--- /dev/null
+++ b/src/uPlot/GeopointsDecoder.cc
@@ -0,0 +1,121 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvGeoPoints.h>
+
+#include "GeopointsDecoder.h"
+#include "MatchingInfo.h"
+#include "PlotMod.h"
+
+
+// =====================================================
+// class GeopointsDecoderFactory - builds  decoders
+//
+
+class GeopointsDecoderFactory : public DecoderFactory 
+{
+  // Virtual Constructor - Builds a new GeopointsDecoder
+  virtual Decoder* Build ( const MvRequest& inRequest )
+    { return new GeopointsDecoder ( inRequest ); }
+
+public:
+  GeopointsDecoderFactory() : DecoderFactory("GeopointsDecoder") {}
+};
+
+static GeopointsDecoderFactory geopointsDecoderFactoryInstance;
+
+//=======================================================
+//
+// Methods for the GeopointsDecoder class
+//
+
+GeopointsDecoder::GeopointsDecoder( const MvRequest& dataUnitRequest ):
+  Decoder(dataUnitRequest)
+{
+  nextData_ = true;
+  metadataRequest_ = dataUnitRequest;
+}
+
+GeopointsDecoder::~GeopointsDecoder()
+{
+  // Empty
+}
+
+// Read Next Data
+//
+// -- Returns true first time it's called, then false.
+bool
+GeopointsDecoder::ReadNextData ()
+{
+  if ( nextData_ )
+    {
+      nextData_ = false;
+      return true;
+    }
+  else
+    return false;
+}
+
+// Create MatchingInfo
+//
+// -- Use the first geopoint line to get date & time values.
+//    If date is suspicious, ignore it (hopefully this gives
+//    better backward compatibility!)
+//
+MatchingInfo
+GeopointsDecoder::CreateMatchingInfo ()
+{
+  MvRequest matchingRequest ("MATCHING_INFO");
+
+  matchingRequest( "DATA_TYPE" ) = "GEOPOINTS";
+  SetTitle(matchingRequest);
+
+  //-- get date and time from the first geopoint
+  MvGeoPoints gpts( (const char*)metadataRequest_("PATH"), 1 );
+  MvGeoP1     gp1 = gpts[0];
+  long myDate = gp1.date();
+
+  if( myDate > 19010101 )              //-- a very simple date value check
+    {
+      matchingRequest( "DATE" ) = myDate;
+
+      long myTime = gp1.time();
+      if( myTime < 24 && myTime != 0 ) //-- simple check for format HH
+	{
+	  PlotMod::Instance().MetviewError(
+		    "Suspicuous geopoints time; HHMM needed for overlay matching!",
+		    "WARN");
+	}
+
+      //-- overlay matching checks strings, add leading zeros to make format 'HHMM'
+      ostringstream os;
+      os << setfill('0') << setw(4) << myTime;
+      matchingRequest( "TIME" ) = os.str().c_str();
+    }
+  else if( myDate != 0 )               //-- date 0 is probably format XYV
+    {
+      //-- not adding DATE/TIME will prevent overlay matching --//
+      PlotMod::Instance().MetviewError("Invalid geopoints date; no overlay matching!","WARN");
+    }
+
+  return MatchingInfo( matchingRequest );
+}
+
+// Add a proper datarequest with a geopoints record
+bool GeopointsDecoder::UpdateDataRequest(MvRequest &geo)
+{
+  geo = metadataRequest_;
+  MvRequest  record("RECORD");
+
+  record("PATH") = metadataRequest_("PATH");
+
+  geo.setValue("RECORD",record);
+
+  return true;
+}
diff --git a/src/uPlot/GeopointsDecoder.h b/src/uPlot/GeopointsDecoder.h
new file mode 100644
index 0000000..3d912c7
--- /dev/null
+++ b/src/uPlot/GeopointsDecoder.h
@@ -0,0 +1,72 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  GeopointsDecoder
+//
+// .AUTHOR:
+//  Geir Austad
+//
+// .SUMMARY:
+//  A concrete  class for decoding geopoints files
+//
+// .CLIENTS:
+//  PlotModMatcher, Graphics Engine
+//
+// .RESPONSABILITIES:
+//  Return true first time ReadNextData is called. No matching is done.
+//
+// .COLLABORATORS:
+//
+// .BASE CLASS:
+//  Decoder
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107).
+//
+//
+#ifndef GeopointsDecoder_H
+#define GeopointsDecoder_H 
+
+#include "Decoder.h"
+//#include <MvDate.h>
+//#include <MvFilter.h>
+//#include <MvFieldSet.h>
+
+class GeopointsDecoder: public Decoder {
+public:
+
+  // Contructors
+  GeopointsDecoder ( const MvRequest& inRequest );
+
+  // Destructor
+  virtual ~GeopointsDecoder();
+
+  // Overridden methods from Decoder class
+  // Returns true first time it's called
+  virtual bool ReadNextData ();
+
+  virtual MatchingInfo CreateMatchingInfo ();
+
+  virtual bool UpdateDataRequest(MvRequest&);
+
+private:
+
+  // No copy allowed
+  GeopointsDecoder(const GeopointsDecoder&);
+  GeopointsDecoder& operator=(const GeopointsDecoder&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/GraphicsEngine.cc b/src/uPlot/GraphicsEngine.cc
new file mode 100644
index 0000000..b540ae2
--- /dev/null
+++ b/src/uPlot/GraphicsEngine.cc
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Graphics Engine
+// Gilberto Camara - ECMWF Apr 97
+//
+//
+#include "MagicsGraphicsEngine.h"
+#include "GraphicsEngine.h"
+#include "ObjectList.h"
+#include "Presentable.h"
+
+Cached
+GEFactoryTraits::FactoryName  ( Presentable& owner )
+{
+	return ObjectList::FindGraphicsEngine ( owner.Request() );
+}
+
+GraphicsEngine*
+GEFactoryTraits::DefaultObject ( Presentable& owner )
+{
+	return new MagicsGraphicsEngine ( owner );
+	// return 0; // no factory was found 
+	// change to return the default factory
+	// new DefaultGraphicsEngine;
+}
+
+GraphicsEngine::GraphicsEngine ( Presentable& owner ):
+	owner_ ( owner )
+{
+
+}
diff --git a/src/uPlot/GraphicsEngine.h b/src/uPlot/GraphicsEngine.h
new file mode 100644
index 0000000..c3b8f6b
--- /dev/null
+++ b/src/uPlot/GraphicsEngine.h
@@ -0,0 +1,166 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Graphics Engine
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the Graphics Engine class, a class for
+//  handling the different drawing packages supported by PlotMod
+//
+//  Each page is associated to one graphics engine, so one 
+//  object of this class is instantiated per page.
+//
+//  There wil be one canvas associated with each type of graphics engine
+//
+// .CLIENTS:
+//  Presentable::Draw (called by CreateAction::Execute and DropAction::Execute)
+//
+// .RESPONSABILITIES:
+//
+//  The Draw method will invoke the appropriate graphics engine
+//  for drawing a presentable.
+//
+//  Each specific engine will obtain its parameters from
+//  its client (the parameters are contained in a request or are
+//  part of the calling Presentable).
+//
+//  There are four types of specialised graphics engines in PlotMod:
+//
+//  - DefaultGraphicsEngine, which dumps the contents of a SuperPage
+//    into a file
+//
+//  - MagicsGraphicsEngine, which uses the MAGICS library
+//
+//  - DraftGraphicsEngine, which produces plot of lower quality
+//    than MAGICS, but is faster 
+//
+//  - Vis5DGraphicsEngine, which uses the Vis5D system
+//
+//  These graphics engines will be concrete classes derived from the
+//  GraphicsEngine base class, and create by a factory.
+//
+// .COLLABORATORS:
+//  Device, Canvas
+//
+// .DESCENDENT:
+//  DefaultGraphicsEngine, MagicsGraphicsEngine, DraftGraphicsEngine,
+//  Vis5DGraphicsEngine
+//
+// .REFERENCES:
+//  This class is based on the "Factory" pattern (see
+//  "Design Patterns" book, page 107).
+//
+//  The templated factory is based on the idea of "traits"
+//  described in the article "A New and Useful Template Technique: "Traits"
+//  by Nathan Myers, included in the "C++ Gems" book
+//  (see also Stroustrup, 3rd. edition, page 580ff).
+// 
+#ifndef GraphicsEngine_H
+#define GraphicsEngine_H
+
+#include <Factory.hpp>
+#include "MvIconDataBase.h"
+#include "Canvas.h"
+
+class Canvas;
+class GraphicsEngine;
+class Presentable;
+class Cached;
+
+struct GEFactoryTraits {
+	typedef GraphicsEngine Type;
+	typedef Presentable&   Parameter;
+	static  Cached         FactoryName  ( Parameter );
+	static  Type*          DefaultObject( Parameter );
+};
+
+class GraphicsEngineFactory : public Factory<GEFactoryTraits>
+{
+public:
+	GraphicsEngineFactory(const Cached& name) :
+		Factory<GEFactoryTraits>(name) {}
+};
+
+class GraphicsEngine 
+{
+public:
+
+	// Contructors
+	GraphicsEngine( Presentable& owner );
+
+	// Destructor
+	virtual ~GraphicsEngine() {}
+
+#if 0
+	// Constructor for Different Types of Canvas
+	virtual PSCanvas * MakePSCanvas ( Device&, 
+					  const Point&,
+					  const Rectangle&,
+					  const PaperSize&,
+					  const PaperSize&,
+					  int ) const = 0;
+
+	virtual XCanvas  * MakeXCanvas ( Device&, 
+					 PresentableWidget* parent,
+					 const Rectangle&,
+					 const PaperSize&,
+					 int )  const = 0;
+#endif
+
+	virtual Canvas* MakeCanvas ( Device&, 
+					 const Rectangle&,
+					 const PaperSize&,
+					 int )  const = 0;
+
+	// Methods
+	virtual void StartPicture ( const char* ) = 0;
+	virtual void EndPicture   () = 0;
+
+	virtual void DrawProlog     ( ) = 0;
+	virtual void DrawPageHeader ( Canvas& ) = 0;
+	virtual void DrawTrailer    ( MvRequest& ) = 0;
+
+	// Draws a dataUnit+visDef onto a canvas
+	// REQUIRE: 1. dataUnit must provide a valid request, which contains
+	//             information about data location
+	//          2. dataUnitIndex indicates the location of the field/obs
+	//             whithin the dataUnit (where applicable)
+	//          3. Device must have been pre-configured
+	virtual void DrawDataVisDef ( MvIcon&, MvRequest&, MvIconList&, int = 0 ) = 0;
+
+	// Draws a dataUnit onto a canvas
+	// REQUIRE: 1. dataUnit must provide a valid request, which contains
+	//             information about data location
+	//          2. dataUnitIndex indicates the location of the field/obs
+	//             whithin the dataUnit (where applicable)
+	//          3. Device must have been pre-configured
+	virtual void DrawDataUnit ( MvIcon&, MvRequest&, MvIcon& ) = 0;
+
+	virtual void DrawNewPage ( MvRequest& ) = 0;
+//D	virtual void DrawFrame   ( Canvas&, MvRequest& ) = 0;
+//	virtual void DrawExternalFrame ( Canvas&, MvRequest& ) = 0;
+	virtual void DrawText ( MvRequest& ) = 0;
+	virtual void DrawLegend ( MvRequest& ) = 0;
+	virtual void Draw ( const MvRequest& ) = 0;
+//	virtual void DrawCoastlines      ( Canvas&, MvRequest& ) = 0;
+
+	virtual void DrawCoastlinesBack  ( MvRequest& ) = 0;
+	virtual void DrawCoastlinesFront ( MvRequest& ) = 0;
+	virtual void DrawAxis 		 ( MvRequest& ) = 0;
+
+protected:
+	Presentable& owner_;      // keep track of my owner
+};
+
+#endif
diff --git a/src/uPlot/GribDecoder.cc b/src/uPlot/GribDecoder.cc
new file mode 100644
index 0000000..7ebb822
--- /dev/null
+++ b/src/uPlot/GribDecoder.cc
@@ -0,0 +1,127 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvRequestUtil.hpp>
+#include <fdyntime.h>
+
+#include "GribDecoder.h"
+#include "MatchingInfo.h"
+#include "ObjectList.h"
+
+// =====================================================
+// class GribDecoderFactory - builds  decoders
+//
+
+class GribDecoderFactory : public DecoderFactory
+{
+        // Virtual Constructor - Builds a new GribDecoder
+	virtual Decoder* Build ( const MvRequest& inRequest ) 
+		{ return new GribDecoder ( inRequest ); }
+
+public:
+	GribDecoderFactory() : DecoderFactory("GribDecoder") {}
+};
+
+static GribDecoderFactory gribDecoderFactoryInstance;
+
+//=======================================================
+//
+// Methods for the GribDecoder class
+//
+GribDecoder::GribDecoder( const MvRequest& dataUnitRequest ):
+	Decoder(dataUnitRequest),
+	fieldSet_(dataUnitRequest),
+	fieldSetIterator_(fieldSet_)
+{
+	// Empty
+}
+
+GribDecoder::~GribDecoder()
+{
+	// Empty
+}
+
+// Read Next Data
+//
+// -- Goes to the next data and returns the offset (data size)
+// -- Grib decoder only reads one field
+bool
+GribDecoder::ReadNextData ()
+{
+	currentField_ = fieldSetIterator_(); // Read next data
+	if  ( !currentField_ )
+		return false;
+
+	// Expand the field
+	// MvFieldExpander expand(currentField);
+	metadataRequest_ = currentField_.getRequest();
+
+	// Get Offset
+	offset_ = currentField_.getOffset();
+	
+	return true;
+}
+
+// Create MatchingInfo
+// Retrieve the matching request
+MatchingInfo
+GribDecoder::CreateMatchingInfo ()
+{
+	const char* ident = metadataRequest_("IDENT");
+	MvRequest matchingRequest ("MATCHING_INFO");
+
+	matchingRequest ( "PARAM" ) = metadataRequest_("PARAM");
+	SetIfValue ( matchingRequest, "LEVEL", metadataRequest_("LEVELIST") );
+
+	if (ident != NULL)
+		matchingRequest ("IDENT") = ident; 
+
+	// For hindcast, data, we use HDATE, not DATE, so check this first
+	long date = (long)metadataRequest_("HDATE");
+	if (date == 0) date = (long)metadataRequest_("DATE");
+
+	TDynamicTime matchTime(date, (long)metadataRequest_("TIME"));
+
+	// Take the step into account when generating the matching time
+	matchTime.ChangeByHours( MvField::stepRangeDecoder(metadataRequest_("STEP")) );
+	char buf[50];
+	sprintf(buf,"%d%02d%02d",matchTime.GetYear(),matchTime.GetMonth(), matchTime.GetDay() );
+	matchingRequest("DATE") = buf;
+	sprintf(buf,"%02d%02d",matchTime.GetHour(),matchTime.GetMin() );
+	matchingRequest("TIME") = buf;
+
+	// we will later need to decide whether to apply automatic scaling or not
+	//ir matchingRequest("DERIVED") = metadataRequest_("DERIVED");
+
+	// Is it an image field?
+	if ( ObjectList::IsImage( ident ) ) 
+		matchingRequest( "DATA_TYPE" ) = "IMAGE";
+	else
+	{
+		// Get parameter name
+		char acc0[64];
+		size_t nsize;
+		field* ff = currentField_.libmars_field();
+		grib_get_string( ff->handle, "shortName", acc0, &nsize );
+		matchingRequest ( "PARAM" ) = acc0;
+		matchingRequest( "DATA_TYPE" ) = "GRIB";
+
+		// Has this parameter a companion?
+        string pair,mode;
+		ObjectList::GetCompanion( string(acc0), pair, mode );
+		if ( pair != "no_pair" )
+        {
+			matchingRequest ( "MY_COMPANION" ) = pair.c_str();
+            if ( !mode.empty() )
+               matchingRequest ( "WIND_MODE" ) = mode.c_str();
+        }
+	}
+
+	return MatchingInfo( matchingRequest );
+}
diff --git a/src/uPlot/GribDecoder.h b/src/uPlot/GribDecoder.h
new file mode 100644
index 0000000..f150b65
--- /dev/null
+++ b/src/uPlot/GribDecoder.h
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  GribDecoder
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  A concrete  class for decoding GRIB files
+//  (which uses EMOSlib and Mars' interface to Emoslib)
+//
+// .CLIENTS:
+//  PlotModMatcher, Graphics Engine
+//
+// .RESPONSABILITIES:
+//  For each data time, decode the GRIB header
+//  and provide information on parameter,
+//  date, time and level
+//
+// .COLLABORATORS:
+//  Date, Time, Emos, PathName
+//
+// .BASE CLASS:
+//  Decoder
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107).
+//
+//
+#ifndef GribDecoder_H
+#define GribDecoder_H 
+
+#include <MvFieldSet.h>
+#include "Decoder.h"
+
+class GribDecoder: public Decoder {
+public:
+
+	// Contructors
+	GribDecoder ( const MvRequest& inRequest );
+
+	// Destructor
+	virtual ~GribDecoder();
+
+	// Overridden methods from Decoder class
+	// Goes to the next data and returns false if
+	// there are no more fields
+	virtual bool ReadNextData ();
+
+	virtual MatchingInfo CreateMatchingInfo ();
+
+private:
+
+	// WARNING, fieldSetIterator_ should be declared AFTER
+	// fieldSet_ as the former is intialised with the later
+	MvFieldSet             fieldSet_;
+	MvFieldSetIterator     fieldSetIterator_;
+	MvField                currentField_;
+	
+	// No copy allowed
+	GribDecoder(const GribDecoder&);
+	GribDecoder& operator=(const GribDecoder&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/Location.cc b/src/uPlot/Location.cc
new file mode 100644
index 0000000..2f592c5
--- /dev/null
+++ b/src/uPlot/Location.cc
@@ -0,0 +1,284 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvRequest.h>
+#include "Location.h"
+
+Location::Location ( const MvRequest&   pageRequest )
+{
+	// Find out the size of the page
+	double top    = pageRequest ( "TOP" );
+	double bottom = pageRequest ( "BOTTOM" );
+	double left   = pageRequest ( "LEFT" );
+	double right  = pageRequest ( "RIGHT" );
+
+ 	rect_.top    = top    / 100.;
+	rect_.left   = left   / 100.;
+
+	rect_.bottom = bottom / 100.;
+	rect_.right  = right  / 100.;
+
+//	CheckNormalised();
+//	ensure ( ( right - left ) <= 100. );
+}
+
+Location::Location ( double top, double left, double bottom, double right )
+{
+	rect_.top    = top;
+	rect_.left   = left;
+
+	rect_.bottom = bottom;
+	rect_.right  = right;
+}
+
+Location::Location ( const Location& rhs )
+{
+	rect_.top    = rhs.rect_.top;
+	rect_.left   = rhs.rect_.left;
+
+	rect_.bottom = rhs.rect_.bottom;
+	rect_.right  = rhs.rect_.right;
+}
+
+Location::Location ( char* rect )
+{
+	// The expected format is: n1/n2...
+	double coord[4];
+	char   str1[30];
+	int    i,j;
+        char   *p1 = &rect[0];
+
+	coord[0] = coord[1] = coord[2] = coord[3] = 0;
+	j = 0;
+	while (*p1 && j < 4)
+	{
+		i = 0;
+		while (*p1 && *p1 != '/' && i < 29)
+		{
+			str1[i++] = *p1;
+			p1++;
+		}
+
+		str1[i] = 0;
+		coord[j++] = atof(str1);
+		if (*p1) p1++;
+	}
+
+	rect_.top    = coord[2];
+	rect_.left   = coord[1];
+
+	rect_.bottom = coord[0];
+	rect_.right  = coord[3];
+}
+
+Location::~Location ()
+{
+	// Empty
+}
+
+Location&
+Location::operator=( const Location& rhs )
+{
+	if ( this == &rhs ) 
+		return *this;
+
+	rect_.top    = rhs.rect_.top;
+	rect_.left   = rhs.rect_.left;
+
+	rect_.bottom = rhs.rect_.bottom;
+	rect_.right  = rhs.rect_.right;
+
+	return *this;
+}
+
+Location
+operator+ ( const Location& lhs, const Location& rhs )
+{
+	return Location ( lhs.rect_.top    + rhs.rect_.top,
+			  lhs.rect_.left   + rhs.rect_.left,
+			  lhs.rect_.bottom + rhs.rect_.bottom,
+			  lhs.rect_.right  + rhs.rect_.right );
+}
+
+Location
+operator- ( const Location& lhs, const Location& rhs )
+{
+	return Location ( lhs.rect_.top    - rhs.rect_.top,
+			  lhs.rect_.left   - rhs.rect_.left,
+			  lhs.rect_.bottom - rhs.rect_.bottom,
+			  lhs.rect_.right  - rhs.rect_.right );
+}
+
+Location
+operator* ( const double scaleFactor, const Location& rhs )
+{
+	return Location ( scaleFactor * rhs.rect_.top,
+			  scaleFactor * rhs.rect_.left,
+			  scaleFactor * rhs.rect_.bottom,
+			  scaleFactor * rhs.rect_.right );
+}
+
+bool
+operator== ( const Location& lhs, const Location& rhs )
+{
+	if ( lhs.rect_.top    !=  rhs.rect_.top   )
+		return false;
+
+	if ( lhs.rect_.left   !=  rhs.rect_.left  ) 
+		return false;
+
+	if ( lhs.rect_.bottom != rhs.rect_.bottom )
+		return false;
+
+	if ( lhs.rect_.right  != rhs.rect_.right  )
+		return false;
+
+	return true;
+}
+
+#if 0
+void
+Location::Offset ( const double offsetX, const double offsetY )
+{
+	rect_.top    -= offsetY;
+	rect_.bottom -= offsetY;
+	rect_.left   -= offsetX;
+	rect_.right  -= offsetX;
+}
+
+void
+Location::AdjustToAspectRatio ( double desiredAspectRatio )
+{
+	double origHeight      = fabs ( rect_.top - rect_.bottom );
+	double origWidth       = fabs ( rect_.right - rect_.left );
+	double origAspectRatio = origWidth / origHeight;
+
+	// Set coordinates according to the aspect ratio desired
+
+	if ( desiredAspectRatio >= origAspectRatio )
+	{
+		double newHeight = ( origHeight * origAspectRatio ) / desiredAspectRatio;
+
+		rect_.bottom += ( origHeight - newHeight ) / 2. ;
+		rect_.top     = rect_.bottom + newHeight;
+	}
+	else
+	{	
+
+		double newWidth = ( origWidth * desiredAspectRatio ) / origAspectRatio;
+
+		rect_.left    += ( origWidth - newWidth ) / 2. ;
+		rect_.right    = rect_.left + newWidth;
+	}
+}
+
+void
+Location::Normalize ( double referenceTop, 
+		      double referenceLeft,
+		      double referenceBottom,
+		      double referenceRight )
+{
+	double gainV = fabs ( referenceTop - referenceBottom );
+	double gainH = fabs ( referenceRight - referenceLeft );
+
+	rect_.bottom = ( rect_.bottom * gainV ) + referenceBottom;
+
+	rect_.top    = ( rect_.top    * gainV ) + referenceBottom;
+
+	rect_.left   = ( rect_.left   * gainH ) + referenceLeft;
+
+	rect_.right  = ( rect_.right  * gainH ) + referenceLeft;
+}
+
+static // should be : inline but compiler is broken
+void
+normalise  (double& x)
+{
+	if ( x < 0 ) x = 0.;
+	if ( x > 1 ) x = 1. ;
+}
+
+static // should be : inline but compiler is broken
+void
+compare ( double& x , double& y )
+{
+	if ( x > y ) 
+		swap (x, y );
+}
+
+void
+Location::CheckNormalized()
+{
+	normalise ( rect_.top );
+	normalise ( rect_.left );
+	normalise ( rect_.bottom );
+	normalise ( rect_.right );
+
+	compare ( rect_.top,  rect_.bottom );
+	compare ( rect_.left, rect_.right  );
+}
+
+//
+//
+//   Scale and Translate
+//
+//   PURPOSE: Perform a scaling and translation transformation
+//
+//   GIVEN:
+//            this (the object) = a window in the original coodinate system 
+//            origArea          - the external origin area (box)
+//            destArea          - the destination coordinate system (box)
+//
+//   CALCULATES:
+//            destCoord         - the window in the destination coordinate system
+
+
+Location
+Location::ScaleAndTranslate( const Location& origArea,
+			     const Location& destArea )
+{
+	double scaleH = ( destArea.Right() - destArea.Left() ) /
+		        ( origArea.Right() - origArea.Left() ) ;
+	
+	double scaleV = ( destArea.Top()   - destArea.Bottom() ) /
+		        ( origArea.Top()   - origArea.Bottom() ) ;
+
+	
+	double right  = scaleH * ( this->Right()  - origArea.Right() ) +
+		        destArea.Right();
+
+	double left   = scaleH * ( this->Left()   - origArea.Right() ) +
+		        destArea.Right();
+
+	double bottom = scaleV * ( this->Bottom() - origArea.Bottom()) +
+		        destArea.Bottom();
+
+	double top    = scaleV * ( this->Top()    - origArea.Bottom()) +
+		        destArea.Bottom();
+
+	return Location ( top, left, bottom, right );
+}
+
+void
+Location::UpdateRectangle ( double top, double left, double bottom, double right )
+{
+	rect_.top    = top / 100.;
+	rect_.left   = left / 100.;
+		      
+	rect_.bottom = bottom / 100.;
+	rect_.right  = right / 100.;
+}
+#endif
+
+void
+Location::Print () const
+{
+	cout << "Location(t,l,b,r) = " << endl;
+	cout << rect_.top << " " << rect_.left << " " << rect_.bottom << " " << rect_.right << endl;
+}
diff --git a/src/uPlot/Location.h b/src/uPlot/Location.h
new file mode 100644
index 0000000..ce9541a
--- /dev/null
+++ b/src/uPlot/Location.h
@@ -0,0 +1,144 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  Location
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class for handling the location of a presentable.
+//  It contains two types of informatin
+//
+//  1. A bounding box which indicates the relative position of
+//     the presentable in normalized coordinates (0...1),
+//     ordered from the to the bottom of the page.
+//
+//  2. The width and height of the presentable, in world coordinates
+//      ( centimeters ).
+//
+// .CLIENTS:
+//  Presentable
+//
+//
+// .RESPONSABILITIES:
+//  1. Decode the presentable's request, and extract information about
+//     the bounding box, and the requested width and height
+//
+//
+// .COLLABORATORS:
+//  MvRequest, Rectangle
+//
+//
+// .BASE CLASS:
+//  (none)
+//
+// .DERIVED CLASSES:
+//  (none)
+//
+// .REFERENCES:
+//
+//
+#ifndef Location_H
+#define Location_H
+
+#include "Rectangle.h"
+
+class MvRequest;
+
+class Location {
+public:
+
+	// Contructors
+	// Default constructor
+	Location ( double top = 0., double left = 0., double bottom = 1., double right = 1. );
+
+	// Constructor for the PLOTPAGE request
+	Location ( const MvRequest& pageRequest );
+
+	// Constructor from a Box
+	Location ( const Rectangle& rect );
+
+	// Construction from a string
+	Location ( char* rect );
+
+	// Copy Constructor
+	Location ( const Location& location );
+
+	// Operator =
+	Location& operator=( const Location& rhs );
+
+        // Destructor
+	virtual ~Location();
+
+	// Access to members
+	operator Rectangle& ()
+		{ return rect_; }
+
+	double Left() const
+		{ return rect_.left; }
+
+	double Top()  const
+		{ return rect_.top; }
+
+	double Bottom() const
+		{ return rect_.bottom; }
+
+	double Right()  const
+		{ return rect_.right; }
+
+	// Methods
+	// Translation transformation
+	friend Location operator+ ( const Location& lhs, const Location& rhs );
+	
+	// Translation transformation
+	friend Location operator- ( const Location& lhs, const Location& rhs );
+
+	// Scaling transformation
+	friend Location operator* ( const double scaleFactor, const Location& rhs );
+
+	// Comparison operator
+	friend bool     operator== ( const Location& lhs, const Location& rhs );
+
+#if 0
+	// Offset
+	void Offset ( const double offsetX, const double offsetY );
+
+	// Aspect Ratio Transformation
+	void AdjustToAspectRatio ( double aspectRatio );
+
+	// Normalization Trasnf
+	void Normalize ( double, double, double, double );
+
+	// Scaling and Translation Transformation
+	Location ScaleAndTranslate ( const Location& origArea,
+				     const Location& destArea );
+
+	// Update rectangle
+	void UpdateRectangle ( double top, double left, double bottom, double right );
+#endif
+
+	// Print rectangle
+	void Print () const;
+
+protected:
+
+       // Checking values
+//	void CheckNormalized ();  // ensure box is between [0..1]
+
+       // Members
+	
+	// The rectangle is always expressed as a normalized box 
+	// [0,..,1] which is oriented from top to bottom and from
+	// left to right
+	Rectangle    rect_;
+};
+
+#endif
diff --git a/src/uPlot/MacroConverter.cc b/src/uPlot/MacroConverter.cc
new file mode 100644
index 0000000..1954daf
--- /dev/null
+++ b/src/uPlot/MacroConverter.cc
@@ -0,0 +1,309 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//  Methods for the MacroConverter classes
+//
+//
+#include "inc_iostream.h"
+#include <MvRequestUtil.hpp>
+#include <MvPath.hpp>
+#include "MacroConverter.h"
+#include "ObjectInfo.h"
+#include "ObjectList.h"
+
+// All the instances
+DefaultMacroConverter defaultConverterInstance("Default");
+ReadMacroConverter readConverterInstance("READ");
+
+// Family converter
+FamilyMacroConverter familyConverterInstance("FAMILY");
+CurveFamilyMacroConverter curvefamilyConverterInstance("CURVES_FAMILY");
+FamilyMacroConverter divrotfamilyConverterInstance("DIVROT_FAMILY");
+FamilyMacroConverter vectorsfamilyConverterInstance("VECTORS_FAMILY");
+FamilyMacroConverter spectrafamilyConverterInstance("SPECTRA_FAMILY");
+FamilyMacroConverter pottfamilyConverterInstance("POTT_FAMILY");
+FamilyMacroConverter velstrfamilyConverterInstance("VELSTR_FAMILY");
+FamilyMacroConverter tephigramfamilyConverterInstance("TEPHIGRAM_FAMILY");
+FamilyMacroConverter tephidatafamilyConverterInstance("TEPHIDATA_FAMILY");
+FamilyMacroConverter odbManagerFamilyConverterInstance("ODBVISUALISER_FAMILY");
+FamilyMacroConverter netcdfManagerFamilyConverterInstance("NETCDFPLUS_FAMILY");
+
+FormulaFamilyMacroConverter simpleformulafamilyConverterInstance("SIMPLE_FORMULA_FAMILY");
+
+ComputeMacroConverter computeConverterInstance("COMPUTE");
+
+// Data converter
+DataMacroConverter gribConverterInstance("GRIB");
+DataMacroConverter bufrConverterInstance("BUFR");
+DataMacroConverter cdfConverterInstance("NETCDF");
+DataMacroConverter geoConverterInstance("GEOPOINTS");
+DataMacroConverter odbConverterInstance("ODB_DB");
+
+MacroConverter&
+ConverterTraits::DefaultObject()
+{
+  return defaultConverterInstance;
+}
+
+/////////////// DefaultMacroConverter ///////////////
+Cached DefaultMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
+{
+  // Convert the request and return the object name.
+  Cached duName = ObjectInfo::GenerateName(req);
+
+  Cached macroName = ObjectList::MacroName(req.getVerb());
+
+  oi->ConvertRequestToMacro ( req, PUT_END,duName,macroName );
+  return duName;
+}
+
+Cached ReadMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
+{
+ 	Cached duName = ObjectInfo::GenerateName(req);
+	oi->ConvertRequestToMacro ( req, PUT_END,duName,"read" );
+
+	return duName;
+}
+
+Cached FamilyMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
+{
+	Cached returnName;
+	MvRequest tmpReq = req;
+
+	const char *name = tmpReq("_NAME");
+	Cached duName = ObjectInfo::GenerateName(req);
+
+	// First request contains just the family part, so skip it
+	tmpReq.advance();
+
+	if ( name && ! (const char *)tmpReq("_NAME") )
+		tmpReq("_NAME") = name;
+
+	// Get the macroname to call and convert it to lowercase.
+	Cached familyType = ObjectList::MacroName(tmpReq.getVerb() );
+
+	returnName = ObjectInfo::SpaceToUnderscore ( duName );
+
+	oi->ConvertRequestToMacro ( tmpReq, PUT_END, returnName,familyType);
+
+	return returnName;
+}
+
+Cached FormulaFamilyMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
+{
+	MvRequest tmpReq = req;
+	const char *name = req("_NAME");
+	Cached duName = ObjectInfo::GenerateName(req);
+	Cached returnName = ObjectInfo::SpaceToUnderscore ( duName );
+
+	// First request contains just the family part, so skip it
+	tmpReq.advance();
+	tmpReq = ObjectList::ExpandRequest(tmpReq,EXPAND_DEFAULTS);
+
+	if ( name && ! (const char *)tmpReq("_NAME") )
+		tmpReq("_NAME") = name;
+
+	MvRequest defReq = ObjectList::CreateDefaultRequest(tmpReq.getVerb());
+
+	const char *f, *p1,*p2,*oper;
+	bool twoParams = false;
+	string formula = " = ";
+	string cp1, cp2;
+	if ( IsParameterSet(tmpReq,"PARAMETER_2") )
+	{
+		p1 = tmpReq("PARAMETER_1");
+		p2 = tmpReq("PARAMETER_2");
+		if ( ObjectInfo::IsAName(p2 ) )
+			cp2 = ObjectInfo::SpaceToUnderscore(mbasename(p2));
+		else
+			cp2 = p2;
+
+		twoParams = true;
+	}
+	else
+	{
+		p1 = tmpReq("PARAMETER");
+		if ( !p1 )
+			p1 = tmpReq("PARAMETER_1");
+
+		if ( !p1 )
+			return "ERROR CONVERTING FAMILY FORMULA";
+	}
+
+	if ( ObjectInfo::IsAName(p1 ) )
+		cp1 = ObjectInfo::SpaceToUnderscore(mbasename(p1));
+	else
+		cp1 = p1;
+
+	if ( IsParameterSet(defReq,"FUNCTION") )
+	{
+		if ( IsParameterSet(tmpReq,"FUNCTION") )
+			f = tmpReq("FUNCTION");
+		else
+			f = defReq("FUNCTION");
+
+		if ( twoParams )
+			formula = formula + f + "( " + cp1 + ", " + cp2 + ")";
+		else
+			formula = formula + f + "( " + cp1  + ")";
+	}
+	else
+	{
+		if ( IsParameterSet(tmpReq,"OPERATOR") ) 
+			oper = tmpReq("OPERATOR");
+		else
+			oper = defReq("OPERATOR");
+
+		formula = formula + cp1 + " " + oper + " " + cp2;
+	}
+
+	Cached familyType = ObjectList::MacroName(tmpReq.getVerb() );
+	set<Cached> skipSet;
+	bool onlySub = true; // Tell ConvertRequestToMacro to only expand subrequests, not the current one
+
+	oi->ConvertRequestToMacro ( tmpReq, PUT_END, returnName,familyType,skipSet,onlySub);
+
+	oi->PutNewLine(returnName + formula.c_str() + Cached("\n"));
+
+	return returnName;
+}
+
+
+Cached CurveFamilyMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
+{
+  Cached returnName;
+
+  Cached duName = ObjectInfo::GenerateName(req);
+  Cached path = ObjectInfo::ObjectPath(req);
+
+  // First request contains just the family part, so skip it
+  req.advance();
+
+  // Get the macroname to call and convert it to lowercase.
+  const char *curveType = req.getVerb();
+
+  returnName = ObjectInfo::SpaceToUnderscore ( duName );
+
+  if ( ! strcmp(curveType,"GRAPH") )
+    {
+      // Get the names for the curves and try to exand them.
+      vector<Cached> curveNames;
+      const char *name;
+      Cached oneName;
+      for ( int i = 0; i < req.countValues("CURVES"); i++ )
+	{
+	  req.getValue(name,"CURVES",i);
+	  Cached fileName = path + Cached("/") + Cached(name);
+	  if ( FileCanBeOpened(fileName, "r" ) )
+	    {
+	      MvRequest iconRequest;
+	      iconRequest.read(fileName);
+	      oneName = oi->Convert(iconRequest);
+	      if ( returnName )
+		curveNames.push_back(oneName);
+	    }
+	}
+
+      set<Cached> skipSet;
+      skipSet.insert("CURVES");
+      oi->ConvertRequestToMacro ( req, PUT_LAST_COMMA, returnName,curveType, skipSet);
+      if ( curveNames.size() > 0 ) 
+	{
+	  Cached nameList = "[";
+	  for (unsigned int j  = 0; j < curveNames.size();j++ )
+	    {
+	      if ( j > 0 )
+		nameList = nameList + Cached(", ");
+	      nameList = nameList + curveNames[j];
+	    }
+	  nameList = nameList + Cached(" ] ");
+	  oi->FormatLine("CURVES", nameList,"" );
+	  
+	}
+      oi->PutNewLine(Cached("\t) ") );
+    }
+  else
+    oi->ConvertRequestToMacro ( req, PUT_END, returnName,curveType);
+
+  return returnName;
+}
+
+// Let mvimport do the work here. It means the formatting will be slightly
+// different.
+Cached ComputeMacroConverter::Convert(MvRequest & req,ObjectInfo *oi )
+{
+  string tmpName = marstmp();
+
+  char buf[1024];
+  sprintf(buf,"$METVIEW_BIN/mvimport \"%s\" %s",
+	  (const char *)req("_NAME"),
+	  tmpName.c_str());
+  system(buf);
+
+  Cached duName = ObjectInfo::GenerateName(req);
+
+  ifstream in(tmpName.c_str());
+
+  if ( ! in )  // Fall back on the incomplete way
+    {
+	const char *formula = req("FORMULA");
+	oi->PutNewLine("# Remember to import any icons used in formula.");
+	oi->PutNewLine("#Just click in macro after this line, and drop the icons.");
+	oi->PutNewLine ( duName + Cached("  = ")  + Cached(formula)  );
+    }
+  else
+    {
+      while ( in.getline(buf,1023) )
+	{
+	  // Strip of #Importing ... lines
+	  if ( strncmp("# Importing :",buf, 13))
+	    oi->PutNewLine(buf);
+	}
+      in.close();
+
+      // Convert duName to lowercase, as mvimport uses lowercase.
+      char *dulower = new char[ strlen(duName) + 1];
+      strcpy(dulower,duName);
+
+      for (unsigned int i=0;i<strlen(dulower); i++ )
+	dulower[i] = tolower(dulower[i]);
+
+      duName = dulower;
+      delete [] dulower;
+    }
+  unlink(tmpName.c_str());
+
+  return duName;
+}
+
+
+Cached DataMacroConverter::Convert(MvRequest &req,ObjectInfo *oi)
+{
+	// Obtain the object name
+	Cached duName = ObjectInfo::GenerateName(req);
+
+	// Obtain the fully qualified path to the object
+//	Cached fileName = req("PATH");
+	const char* mvPath = req( "_NAME" );
+	if ( mvPath )
+	{
+		// Get the full path and check if it can be opened
+		Cached filename = MakeUserPath(mvPath);
+		if ( !FileCanBeOpened(filename,"r") )
+			filename = Cached("Please provide here an input filename");
+
+		oi->PutNewLine ( Cached ( "# Importing ") + duName         );
+		oi->PutNewLine ( duName + Cached("  = read  ( \"")  + filename  + Cached("\")") );
+		oi->PutNewLine ( " " );
+	}
+	else
+		duName = "";
+
+  	return duName;
+}
diff --git a/src/uPlot/MacroConverter.h b/src/uPlot/MacroConverter.h
new file mode 100644
index 0000000..eedb73e
--- /dev/null
+++ b/src/uPlot/MacroConverter.h
@@ -0,0 +1,123 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Macro Converter
+// Classes for converting different types of requests to
+// macros
+//
+// Geir Austad
+//
+#ifndef MacroConverter_H
+#define MacroConverter_H 
+
+#include "Prototype.hpp"
+#include "MvRequest.h"
+class MacroConverter;
+class ObjectInfo;
+
+struct ConverterTraits {
+  typedef MacroConverter Type;
+  static  Type& DefaultObject();
+};
+
+class MacroConverter: public Prototype <ConverterTraits>
+{
+
+public:
+
+	// Contructors
+	MacroConverter (const Cached& converterName):
+		Prototype<ConverterTraits> ( converterName, this ) {}
+
+	// Destructors
+	virtual ~MacroConverter(){}
+
+	// Methods
+	virtual Cached Convert (  MvRequest &,ObjectInfo *oi ) = 0;
+
+private:
+
+	// No copy allowed
+  	MacroConverter(const MacroConverter&);
+  	MacroConverter& operator=(const MacroConverter&){ return *this;}
+};
+
+class DefaultMacroConverter : public MacroConverter
+{
+public:
+
+	DefaultMacroConverter(const Cached &name):
+		MacroConverter(name) {}
+
+	~DefaultMacroConverter() {}
+
+	virtual Cached Convert(  MvRequest&, ObjectInfo *);
+};
+
+class ReadMacroConverter : public MacroConverter
+{
+public:
+
+	ReadMacroConverter(const Cached &name) : MacroConverter(name) {}
+	~ReadMacroConverter() {}
+
+	virtual Cached Convert(  MvRequest&,ObjectInfo *oi);
+};
+
+class FamilyMacroConverter : public MacroConverter
+{
+public:
+
+	FamilyMacroConverter(const Cached &name) : MacroConverter(name) {}
+	~FamilyMacroConverter() {}
+
+	virtual Cached Convert(MvRequest&, ObjectInfo *oi);
+};
+
+class CurveFamilyMacroConverter : public MacroConverter
+{
+public:
+
+	CurveFamilyMacroConverter(const Cached &name) : MacroConverter(name) {}
+	~CurveFamilyMacroConverter() {}
+
+	virtual Cached Convert(MvRequest&, ObjectInfo *oi);
+};
+
+class FormulaFamilyMacroConverter : public MacroConverter
+{
+public:
+
+	FormulaFamilyMacroConverter(const Cached &name) : MacroConverter(name) {}
+	~FormulaFamilyMacroConverter() {}
+
+	virtual Cached Convert(MvRequest&, ObjectInfo *oi);
+};
+
+class ComputeMacroConverter : public MacroConverter
+{
+public:
+
+	ComputeMacroConverter(const Cached &name):
+		MacroConverter(name)  {}
+	~ComputeMacroConverter() {}
+
+	virtual Cached Convert(  MvRequest&,ObjectInfo *oi);
+};
+
+class DataMacroConverter : public MacroConverter
+{
+public:
+
+	DataMacroConverter(const Cached &name) : MacroConverter(name) {}
+	~DataMacroConverter() {}
+
+	virtual Cached Convert(  MvRequest&,ObjectInfo *oi);
+};
+#endif
diff --git a/src/uPlot/MacroVisitor.cc b/src/uPlot/MacroVisitor.cc
new file mode 100644
index 0000000..a6bb271
--- /dev/null
+++ b/src/uPlot/MacroVisitor.cc
@@ -0,0 +1,180 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//#include <inc_iostream.h>
+#include <pwd.h>
+//#include <time.h>
+
+#include "Assertions.hpp"
+#include "MacroVisitor.h"
+#include "MvPath.hpp"
+#include "UtilitiesC.h"
+#include "SuperPage.h"
+#include "Page.h"
+#include "ObjectInfo.h"
+
+// --  Static method
+// --  Establishes the new macro file Name
+string
+MacroVisitor::CreateFileName ( const MvRequest& superpageRequest )
+{
+	// Create an appropriate fileName
+	string pathName  = (const char*)ObjectInfo::ObjectPath ( superpageRequest );
+	return string(MakeIconName ( pathName.c_str(), "MacroFramework" ));
+}
+
+// -- Constructor
+//
+//    Creates a new Macro file
+MacroVisitor::MacroVisitor( string& fileName ):
+	outFileName_ ( fileName   )
+//	type_        ( type       ),
+//	pageId_      ( pageId     )
+{
+	// Create the temporary file
+	tmpFileName_ = MakeTmpName ( "MacroTmp" );
+
+	// Open the output file (the destructor will close it)
+	if ( FileCanBeOpened     ( tmpFileName_.c_str(), "w" ) == true )
+		filePtr_ = fopen ( tmpFileName_.c_str(), "w" );
+
+	ensure  ( filePtr_ != 0 );
+
+        // Set the Prolog information in the output file
+	WriteProlog ();
+}
+
+//  -- Destructor
+// 
+//     Closes the file and performs additional processing
+//     (creating an icon or printing)
+
+MacroVisitor::~MacroVisitor()
+{
+	require ( filePtr_ != 0 );
+	
+	// Write the trailer information on the file
+	this->WriteTrailer ();
+		
+	fclose ( filePtr_ );  // close the output file
+
+	// Do additional actions, depending on the destination
+	// If icon, create description for Metview UI
+	string iconFile = MakeIconDescriptionName( outFileName_.c_str() );
+	UtWriteIconDescriptionFile ( iconFile.c_str(), "MACRO" );
+
+	// Move temporary file to the output file
+	char buf[1024];
+	sprintf( buf,"mv '%s' '%s'",tmpFileName_.c_str(),outFileName_.c_str() );
+	system(buf);
+}
+
+// -- METHOD: WriteProlog
+//
+// -- PURPOSE: write the header of the macro program
+//
+void
+MacroVisitor::WriteProlog()
+{
+  struct passwd *who = getpwuid(getuid());
+  time_t when = time(NULL);
+  const char* version = getenv( "METVIEW_VERSION" );
+
+  fprintf ( filePtr_, "# Metview Macro - created from Display Window contents\n" );
+  fprintf ( filePtr_, "# By:   %s\n", version );
+  fprintf ( filePtr_, "# Date: %s", ctime(&when) );
+  fprintf ( filePtr_, "# For:  %s (%s)\n",who->pw_name, who->pw_gecos );
+  fprintf ( filePtr_, "# \n" );
+  fprintf ( filePtr_, "# Disclaimer:\n" );
+  fprintf ( filePtr_, "#   This macro is to be used primarily as a framework. \n" );
+  fprintf ( filePtr_, "#   Some macros generated in this manner may not work  \n" );
+  fprintf ( filePtr_, "#   as expected and in such cases you may need to \n" );
+  fprintf ( filePtr_, "#   fine-tune the macro manually! \n" );
+}
+
+// -- METHOD: WriteTrailer
+//
+// -- PURPOSE: write the final part of the macro program
+//
+void
+MacroVisitor::WriteTrailer()
+{
+	// Set the device Information
+	deviceInfo_.WriteDescription     ( filePtr_ );
+
+	// Set build layout function
+	fprintf(filePtr_,"# Call function to build layout (defined at end of macro)\n");
+	fprintf(filePtr_,"display_window = build_layout()\n");
+
+	fprintf(filePtr_,"\n# Drops to SuperPage.\n");
+	superpageDrops_.WriteDescription ( filePtr_ );
+
+	fprintf(filePtr_,"\n# Drops to Page.\n");
+	pageDrops_.WriteDescription      ( filePtr_ );
+
+	// If there are no drops associated to the pages,
+	// we still need to plot something
+	if ( pageDrops_.HasAction() == false && 
+	     superpageDrops_.HasAction() == false )
+		fprintf ( filePtr_, "plot ( display_window ) \n");
+
+	fprintf ( filePtr_, "\n# End of main program\n" );
+
+	// Output the page Drops and Contents
+	fprintf(filePtr_,"\n# Function to build the layout.\n");
+	fprintf(filePtr_,"function build_layout()\n\n");
+
+	// Add some indentation since this is now in a function
+	pageInfo_.LinePrefix("    ");
+	superpageInfo_.LinePrefix("    ");
+
+	pageInfo_.WriteDescription( filePtr_ );
+
+	superpageInfo_.WriteDescription( filePtr_ );
+	fprintf(filePtr_,"\nend build_layout\n");
+
+}
+
+// -- METHOD: Visit ( SuperPage& )
+//
+// -- PURPOSE: Visit a superpage and retrieve its creation request,
+//			   name, and all dataunits and visdefs associated to it
+//             
+
+void 
+MacroVisitor::Visit ( SuperPage& superpage )
+{
+	macroName_ = superpage.MacroName();
+
+	superpage.DescribeDevice ( deviceInfo_ );
+
+	superpage.DescribeYourself ( superpageInfo_ );
+
+	superpage.DescribeDrops ( superpageDrops_,vdMap_ );
+}
+
+// -- METHOD: Visit ( Page& )
+//
+// -- PURPOSE: Visit a page and retrieve its creation request,
+//	name, and all dataunits and visdefs associated to it
+//
+void 
+MacroVisitor::Visit ( Page& page)
+{
+	// Print the contents of the page 
+	page.DescribeYourself ( pageInfo_  );
+
+	// PrintData Units and VisDefs
+	page.DescribeDrops    ( pageDrops_, vdMap_ );
+}
+void 
+MacroVisitor::Visit ( SubPage& )
+{
+	// Empty
+}
diff --git a/src/uPlot/MacroVisitor.h b/src/uPlot/MacroVisitor.h
new file mode 100644
index 0000000..746de4c
--- /dev/null
+++ b/src/uPlot/MacroVisitor.h
@@ -0,0 +1,102 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:	
+//  MacroVisitor
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class for generating macro programs
+//  from a display window.
+//
+// .CLIENTS:
+//  SuperPage, Page
+//
+//
+// .RESPONSABILITIES:
+//  - For the caller (superpage or page), save its name and
+//    requests which was used to create it.
+//  - For the caller and all its children, save the drop
+//    actions associated with data units and visual definitions
+//  
+// .COLLABORATORS:
+//  MvIconDataBase (stores the relations between presentables,
+//  data units and visdefs)
+//
+// .BASE CLASS:
+//  Device
+//
+// .DERIVED CLASSES:
+//  (none)
+//
+// .REFERENCES:
+//   The implementation of this class is based on the "visitor"
+//   pattern (See "Design Patterns" book, page 331).
+// 
+//
+#ifndef MacroVisitor_H
+#define MacroVisitor_H
+
+#include <stdio.h>
+#include "ObjectInfo.h"
+#include "Types.hpp"
+#include "Visitor.h"
+
+typedef map<int, string> MacroVisDefMap;
+
+class MacroVisitor: public Visitor {
+
+public:
+	// -- Constructor
+	MacroVisitor ( string& fileName );
+
+	// -- Destructor
+	~MacroVisitor();
+
+	// -- Creates a new fileName
+	static string CreateFileName ( const MvRequest& superpageRequest );
+
+	// --  Visitor methods
+	virtual void Visit ( SuperPage& );
+	virtual void Visit ( Page& );
+	virtual void Visit ( SubPage& );
+//	virtual void Visit ( MagnifyPage& ) {}
+//	virtual void Visit ( EditMapPage& ) {}
+
+private:
+	void WriteProlog();
+	void WriteTrailer();
+
+	// No copy allowed
+	MacroVisitor(const MacroVisitor&);
+	MacroVisitor& operator=(const MacroVisitor&){return *this;}
+
+//	MacroType        type_;
+	string           macroName_;
+
+	FILE * filePtr_;    // pointer to the temporary file 
+
+	string tmpFileName_; // name of the temporary file
+	string outFileName_; // name of the output file
+
+//	int              pageId_;
+
+	ObjectInfo       deviceInfo_;
+	ObjectInfo       superpageInfo_;
+	ObjectInfo       superpageDrops_;
+    	ObjectInfo       pageInfo_;
+	ObjectInfo       pageDrops_;
+
+        MacroVisDefMap vdMap_;
+};
+
+#endif
diff --git a/src/uPlot/MagPlusBatchService.cc b/src/uPlot/MagPlusBatchService.cc
new file mode 100644
index 0000000..f5b88ae
--- /dev/null
+++ b/src/uPlot/MagPlusBatchService.cc
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MagPlusBatchService.h"
+
+void
+MagPlusBatchService::CallMagPlus ( MvRequest& in )
+{
+	// Call MagPlus to process the request
+	MvRequest answer;
+
+    MvMagRequest request(in);
+
+	magplus_->execute(request);
+	//thread_.render(in,magplus_);
+
+	// the Magics log messages are not broadcast until the next log event - therefore, the
+	// last log message will not be broadcast. We fix that by flushing the message streams
+	// - we only need to do one of them, and all will be flushed behind the scenes.
+	MagLog::info().flush();
+
+	MvApplication::setKeepAlive(false);
+//		MvApplication::destroyService();
+}
diff --git a/src/uPlot/MagPlusBatchService.h b/src/uPlot/MagPlusBatchService.h
new file mode 100644
index 0000000..c4eaa94
--- /dev/null
+++ b/src/uPlot/MagPlusBatchService.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME: MagPlusBatchService
+//
+// .AUTHOR:
+//  Fernando Augusto Mitsuo Ii
+//     ECMWF, June 2010
+//
+// .SUMMARY:
+//  Describes the batch mode of the MagPlusService class, which handles
+//  the communication with Magics++.
+//
+// .CLIENTS:
+//
+// .RESPONSABILITY:
+//
+// .COLLABORATORS:
+//  MvServiceTask
+//
+// .ASCENDENT:
+//  MvClient, MagPlusService
+//
+// .DESCENDENT:
+//
+//
+// .REFERENCES:
+//  This class is based on the general facilities for
+//  process communication used in METVIEW, especially the
+//  MvClient and MvServiceTask facilities. Please refer
+//  to these classes (or have a chat with Baudoin) for
+//  more information.
+//
+//  This class implements a "singleton" as suggested 
+//  by Myers, "More Effective C+", page 130.
+//
+
+#ifndef MagPlusBatchService_H
+#define MagPlusBatchService_H
+
+#include "MagPlusService.h"
+
+class MagPlusBatchService: public MagPlusService {
+
+public:
+	MagPlusBatchService() {}
+ 	~MagPlusBatchService() {}
+
+	void CallMagPlus( MvRequest& );
+};
+
+#endif
diff --git a/src/uPlot/MagPlusInteractiveService.cc b/src/uPlot/MagPlusInteractiveService.cc
new file mode 100644
index 0000000..9f59aa1
--- /dev/null
+++ b/src/uPlot/MagPlusInteractiveService.cc
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MagPlusInteractiveService.h"
+#include "uPlotBase.h"
+#include "MgQPlotScene.h"
+#include "MvQPlotView.h"
+
+#include <QGraphicsView>
+
+static bool isQtDriverInitialized = false;
+
+void
+MagPlusInteractiveService::CallMagPlus ( MvRequest& in )
+{
+	if(!plotApplication_)
+	  	return;
+  
+  	// Call MagPlus to process the request
+	MvRequest answer;
+
+	if(isQtDriverInitialized == false)
+	{
+		magplus_->setQtScene(plotApplication_->plotScene());
+		isQtDriverInitialized = true;
+	}
+
+	plotApplication_->newRequestForDriversBegin();
+
+	//magplus_->serve(in,answer);
+	MvMagRequest magin(in);
+		
+	magplus_->execute(magin);
+
+	plotApplication_->newRequestForDriversEnd();
+	plotApplication_->plotView()->show();
+	
+	// the Magics log messages are not broadcast until the next log event - therefore, the
+	// last log message will not be broadcast. We fix that by flushing the message streams
+	// - we only need to do one of them, and all will be flushed behind the scenes.
+	MagLog::info().flush();
+}
\ No newline at end of file
diff --git a/src/uPlot/MagPlusInteractiveService.h b/src/uPlot/MagPlusInteractiveService.h
new file mode 100644
index 0000000..8497b5c
--- /dev/null
+++ b/src/uPlot/MagPlusInteractiveService.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME: MagPlusInteractiveService
+//
+// .AUTHOR:
+//  Fernando Augusto Mitsuo Ii
+//     ECMWF, June 2010
+//
+// .SUMMARY:
+//  Describes the interactive mode of the MagPlusService class, which handles
+//  the communication with Magics++.
+//
+// .CLIENTS:
+//
+// .RESPONSABILITY:
+//
+// .COLLABORATORS:
+//  MvServiceTask
+//
+// .ASCENDENT:
+//  MvClient, MagPlusService
+//
+// .DESCENDENT:
+//
+//
+// .REFERENCES:
+//  This class is based on the general facilities for
+//  process communication used in METVIEW, especially the
+//  MvClient and MvServiceTask facilities. Please refer
+//  to these classes (or have a chat with Baudoin) for
+//  more information.
+//
+//  This class implements a "singleton" as suggested 
+//  by Myers, "More Effective C+", page 130.
+//
+
+#ifndef MagPlusInteractiveService_H
+#define MagPlusInteractiveService_H
+
+#include "MagPlusService.h"
+
+class uPlotBase;
+
+class MagPlusInteractiveService: public MagPlusService
+{
+
+public:
+	MagPlusInteractiveService() : plotApplication_(0) {};
+	~MagPlusInteractiveService() { };
+
+	void CallMagPlus( MvRequest& );
+	void setPlotApplication(uPlotBase * pa) {plotApplication_=pa;}
+
+private:	
+	uPlotBase *plotApplication_;
+};
+
+#endif
diff --git a/src/uPlot/MagPlusService.cc b/src/uPlot/MagPlusService.cc
new file mode 100644
index 0000000..b66ff39
--- /dev/null
+++ b/src/uPlot/MagPlusService.cc
@@ -0,0 +1,85 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MagPlusService.h"
+
+// Methods for the MagPlus Service class
+//
+// --- METHOD:  Instance
+//
+// Methods to provide access to the singleton
+//              MagPlus Service class 
+
+MagPlusService *MagPlusService::magPlusServiceInstance_ = 0;
+
+void
+MagPlusService::Instance ( MagPlusService* service )
+{
+	magPlusServiceInstance_ = service;
+}
+
+MagPlusService&
+MagPlusService::Instance ()
+{
+	assert (magPlusServiceInstance_ != 0 );
+	return *magPlusServiceInstance_;
+}
+
+MagPlusService::MagPlusService () : magplus_(new magics::MagPlus())
+{
+//	magplus_->registerObserver(this);
+}
+
+void
+MagPlusService::SetRequest ( const MvRequest& req )
+{
+     // Build request to be sent to ToolsPlus application
+     MvRequest magReq = "MAGPLUS";
+     magReq = magReq + req;
+
+     cout << "CALLLLLLL MAGPLUS CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC" << endl;
+     this->CallMagPlus ( magReq );
+}
+
+#if 0
+void
+MagPlusService::CallMagPlusRedraw ( MvRequest& in )
+{
+	// Call MagPlus to process the request
+	MvRequest answer;
+	magplus_->redraw(in,answer);
+}
+#endif
+
+void
+MagPlusService::endOfTask ( MvTask* task )
+{
+	// Empty reply from Eps Tool goes directly to RegisterToolAction
+//	cout << " endOfTask" << endl;
+//	MvServiceTask* serviceTask = ( MvServiceTask* ) task;
+
+//	MvRequest replyRequest = serviceTask->getReply();
+//	replyRequest.print();
+
+cout << "MAGPLUSSERVICE::endOfTask" << endl;
+}
+
+#if 0
+void
+MagPlusService::RegisterObserver(MagicsObserver* observer)
+{
+	magplus_->registerObserver(observer);
+}
+
+void
+MagPlusService::UnRegisterObserver(MagicsObserver* observer)
+{
+	magplus_->unregisterObserver(observer);
+}
+#endif
diff --git a/src/uPlot/MagPlusService.h b/src/uPlot/MagPlusService.h
new file mode 100644
index 0000000..5cf2542
--- /dev/null
+++ b/src/uPlot/MagPlusService.h
@@ -0,0 +1,167 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME: MagPlusService
+//
+// .AUTHOR:
+//  Fernando Augusto Mitsuo Ii
+//     ECMWF, December 2005
+//
+// .SUMMARY:
+//  Describes the MagPlusService class, which handles
+//  the communication with Magics++.
+//
+// .CLIENTS:
+//
+// .RESPONSABILITY:
+//
+// .COLLABORATORS:
+//  MvServiceTask
+//
+// .ASCENDENT:
+//  MvClient
+//
+// .DESCENDENT:
+//  MagPlusInteractiveService, MagPlusBatchService
+//
+// .REFERENCES:
+//  This class is based on the general facilities for
+//  process communication used in METVIEW, especially the
+//  MvClient and MvServiceTask facilities. Please refer
+//  to these classes (or have a chat with Baudoin) for
+//  more information.
+//
+//  This class implements a "singleton" as suggested 
+//  by Myers, "More Effective C+", page 130.
+//
+
+#ifndef MagPlusService_H
+#define MagPlusService_H
+
+#include "Metview.h"
+#include "MvTask.h"
+#include "MagPlus.h"
+#include "MagicsEvent.h"
+
+class MtInputEvent;
+class MvMagParam: public MagParam{
+public:
+	MvMagParam(MvRequest& request, const string& name, int index = 0): request_(request), name_(name), index_(index) {}
+	~MvMagParam() {}
+  
+	operator double() const { return (double)request_(name_.c_str(), index_); }
+	operator  string() const { const char* val = request_(name_.c_str(), index_); return (val) ? string(val) : string(""); }
+	operator int() const { return (int)request_(name_.c_str(), index_); }
+	MagParam& operator=(int i) { request_(name_.c_str(), index_) = i; return *this;}
+	MagParam& operator=(string s) { request_(name_.c_str(), index_) = s.c_str(); return *this;}
+	MagParam& operator=(double d) { request_(name_.c_str(), index_) = d; return *this; }
+	void index(int index) { index_ = index; }
+
+
+protected:
+	MvRequest& request_;
+    string name_;
+    int index_;
+};
+
+class MvMagRequest : public MagRequest
+{
+public:
+    MvMagRequest(MvRequest request): request_(request) {}
+    ~MvMagRequest() {}
+
+    MagParam& operator()(const string& name) const {     
+        map<string, MvMagParam>::iterator param = parameters_.find(name);
+        if ( param == parameters_.end() ) {
+            parameters_.insert(make_pair(name, MvMagParam(request_, name)));
+            param = parameters_.find(name);
+        }	    
+        return  param->second;
+	}
+    void advance () {
+        request_.advance();
+    }
+    string getVerb() const { return request_.getVerb(); }
+	
+	MagParam& operator()(const string& name, int i) const {
+        map<string, MvMagParam>::iterator param = parameters_.find(name);
+        if ( param == parameters_.end() ) {
+            parameters_.insert(make_pair(name, MvMagParam(request_, name, i)));
+            param = parameters_.find(name);
+        }
+		param->second.index(i);
+        return param->second;
+	}
+    int countValues(const string& name) const 
+    {     return request_.countValues(name.c_str()); }
+
+	MagRequest& getSubRequest(const string& name) 
+    {
+        return *(new MvMagRequest(request_.getSubrequest(name.c_str()))); 
+    }
+    operator bool () const { return request_; }
+ 
+	int countParameters() { return request_.countParameters(); }
+	int countValues(const string& name) { return request_.countValues(name.c_str()); }
+	string getParameter(int i) { return request_.getParameter(i); }
+	void print() { return request_.print(); }
+	MagRequest& justOneRequest() { MvRequest sub = request_.justOneRequest();
+        return *(new MvMagRequest(sub)); }
+protected:
+    mutable MvRequest request_;
+    mutable map<string, MvMagParam> parameters_;
+};
+//public magics::MagicsObserver {
+class MagPlusService: public MvClient {
+
+public:
+
+	// Access to singleton object
+	static MagPlusService *magPlusServiceInstance_;
+	static MagPlusService& Instance();
+	static void Instance(MagPlusService*);
+
+	// Destructor
+	~MagPlusService() {}
+
+	// Methods
+	// Perform actions after receiving response from Magics
+	virtual void endOfTask ( MvTask* );
+//	virtual void endOfTask ( MvTask* ){}
+
+	// Call MagPlus application to redraw the map on a specified device(s)
+//	void CallMagPlusRedraw( MvRequest& request );
+//	void CallMagPlusRedraw( MvRequest& request ){}
+
+	// Call MagPlus application to draw the map on screen
+	virtual void CallMagPlus( MvRequest& ) = 0;
+//	void CallMagPlus( MvRequest& request ){}
+
+	// Set request to be sent to Magics++
+	void SetRequest ( const MvRequest& );
+//	void SetRequest ( const MvRequest& ){}
+
+	// Register to magics observer
+//	void RegisterObserver(MagicsObserver* observer);
+//	void RegisterObserver(MagicsObserver* observer){}
+
+	// UnRegister to magics observer
+//	void UnRegisterObserver(MagicsObserver* observer);
+//	void UnRegisterObserver(MagicsObserver* observer){}
+
+protected:
+
+	// Constructors
+	MagPlusService ();  // no external access point
+
+	magics::MagPlus* magplus_;
+};
+
+#endif
diff --git a/src/uPlot/MagicsGraphicsEngine.cc b/src/uPlot/MagicsGraphicsEngine.cc
new file mode 100644
index 0000000..9bad289
--- /dev/null
+++ b/src/uPlot/MagicsGraphicsEngine.cc
@@ -0,0 +1,679 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+#include <MvRequest.h>
+#include <Assertions.hpp>
+
+#include "MagicsGraphicsEngine.h"
+#include "Canvas.h"
+#include "PlotModConst.h"
+#include "Root.h"
+#include "SuperPage.h"
+#include "DrawingPriority.h"
+#include "MagicsTranslator.h"
+#include "ObjectList.h"
+#include "PlotMod.h"
+
+// ==================================================================
+//
+// class MagicsGEFactory
+class MagicsGEFactory : public GraphicsEngineFactory
+{
+	virtual GraphicsEngine* Build ( Presentable& owner ) 
+		{ return new MagicsGraphicsEngine( owner ); }
+
+public:
+	MagicsGEFactory() : GraphicsEngineFactory("Magics") {}
+};
+
+// Instance of MagicsGE which is loaded in the "factory"
+static MagicsGEFactory magicsGEFactoryInstance;
+
+// ==================================================================
+//
+// class MagicsGraphicsEngine
+MagicsGraphicsEngine::MagicsGraphicsEngine( Presentable& owner ):
+	GraphicsEngine ( owner )
+{
+
+}
+
+MagicsGraphicsEngine::~MagicsGraphicsEngine()
+{
+
+}
+
+#if 0
+PSCanvas * 
+MagicsGraphicsEngine::MakePSCanvas ( Device&    device, 
+				     const Point&     point,
+				     const Rectangle& rect,
+				     const PaperSize& canvasSize,
+				     const PaperSize& fullPaperSize,
+			             int   subpageId                ) const
+{
+	PSCanvas * psCanvas = new PSCanvas ( device, point, rect, 
+					     canvasSize, fullPaperSize,
+					     subpageId );
+
+return psCanvas;
+}
+
+XCanvas * 
+MagicsGraphicsEngine::MakeXCanvas  (  Device&      device,  
+				     PresentableWidget* parent,
+				     const Rectangle&   rect,
+				     const PaperSize&   size,
+				           int          subpageId ) const 
+{
+	XCanvas * xc =  new MagicsCanvas ( device, parent, rect, size, subpageId );
+	ensure ( xc != 0 );
+
+	return xc;
+}
+#endif
+
+//U BEGIN
+Canvas*
+MagicsGraphicsEngine::MakeCanvas  (  Device& device,
+				     const Rectangle&  rect,
+				     const PaperSize&  size,
+				     int  subpageId ) const
+{
+	Canvas * xc =  new Canvas ( device, rect, size, subpageId );
+	ensure ( xc != 0 );
+
+	return xc;
+}
+//U END
+
+//
+//  Draw
+//
+//  INPUT - magicsRequest: the METVIEW Request which has been "translated"
+//                         into a MAGICS request (see the MagicsTranslator class)
+//
+//  PURPOSE - Add request
+void
+MagicsGraphicsEngine::Draw ( const MvRequest& magicsRequest )
+{
+	// Add a magicsRequest to the service Request 
+	//serviceRequest_ = serviceRequest_ + magicsRequest;
+	serviceRequest_ += magicsRequest;
+}
+
+void
+MagicsGraphicsEngine::DrawDataVisDef (
+                                  MvIcon&     dataUnit,
+                                  MvRequest&  dataInfoRequest,
+                                  MvIconList& visdefList,
+                                  int         nDimFlag
+                                 )
+{
+	// Draw the dataunit
+	MvListCursor vdCursor;
+	vdCursor = visdefList.begin();
+	MvIcon& visdef = *( vdCursor );
+	this->DrawDataUnit ( dataUnit, dataInfoRequest, visdef );
+
+     // Check Visdefs. They can be:
+     // a) single or multi-visdefs to be applied to the whole fieldset
+     // b) multi-visdefs, each one(s) to be applied to specific fields in the fieldset,
+     // e.g. MCONT to 1D fields, MWIND to 2d fields.
+     MvRequest vdRequest;
+     vector<string> vstr;
+     ObjectList::VisDefNDimFlags(nDimFlag,vstr);
+
+     // Define Visdefs
+     // No info about data dimension. Assumes that all fields have the same
+     // dimension; therefore, associate all visdefs to the fieldset.
+     if ( vstr.size() ==  0 )
+     {
+          // Translate METVIEW calls into MAGICS calls
+          TranslateRequest(visdefList,vdRequest);
+     }
+     // Fieldset contains fields with same dimension
+     else if ( vstr.size() == 1)
+     {
+          MvIconList laux = visdefList;
+          if ( ObjectList::CheckValidVisDefList (dataUnit.Request().getVerb(),laux,vstr[0].c_str() ) )
+          {
+               // Translate METVIEW calls into MAGICS calls
+               TranslateRequest(laux,vdRequest);
+
+               // Update visdef list if only a select visdefs were used
+               if ( visdefList.size() != laux.size() )
+                    visdefList = laux;
+          }
+      }
+      // Multi-dimensional fields, e.g. fieldset contains 1-D and 2-D fields
+     else if ( vstr.size() > 1 )
+     {
+          vdRequest.setVerb("MULTI");
+
+          // Get visdefs related to each dimension
+          MvIconList vdList;
+          const char* verb = dataUnit.Request().getVerb();
+          bool vdDefault = false;
+          for (unsigned int i = 0; i < vstr.size(); i++)
+          {
+               MvIconList laux = visdefList;
+               const char* caux = vstr[i].c_str();
+
+               // No valid visdef found in the list. Create a default visdef.
+               if ( !ObjectList::CheckValidVisDefList (verb,laux,caux) )
+               {
+                    // Get the first default nD-visdef
+                    string lvd = (const char*)ObjectList::Find ("dataunit",verb,caux );
+                    size_t pos = lvd.find('/');
+                    if ( pos != string::npos )
+                         lvd = lvd.substr(0,pos);
+
+                    // Build the visdef request
+                    MvRequest vdRequest( lvd.c_str() );
+                    string name = "<";
+                    name += (const char*)ObjectList::Find("object",lvd.c_str(),"default_name");
+                    name += ">";
+                    vdRequest( "_NAME" )  = name.c_str();
+                    vdRequest( "_CLASS" ) = lvd.c_str();
+                    vdRequest("_DEFAULT") = true;
+
+                    // Insert the visdef into the list
+                    MvIcon newVd ( vdRequest );
+                    laux.clear();
+                    laux.push_back( newVd );
+                    vdDefault = true;
+               }
+
+               // Translate METVIEW calls into MAGICS calls
+               MvRequest vdAux;
+               TranslateRequest(laux,vdAux);
+               vdRequest(caux) = vdAux;
+
+               // Add used visdefs to the  list
+               vdList.splice(vdList.end(),laux);
+          }
+
+          // Update visdef list if only a select visdefs were used or 
+          // a new default visdef was added
+          if ( (visdefList.size() != vdList.size()) || vdDefault )
+               visdefList = vdList;
+     }
+
+	// Draw the visdefs
+	MvRequest req("VISDEFS");
+	req("ACTIONS") = vdRequest;
+	this->Draw ( req );
+}
+
+void
+MagicsGraphicsEngine::DrawDataUnit ( MvIcon&    dataUnit, 
+				     MvRequest& dataInfoRequest,
+				     MvIcon&    visDef )
+{
+	// Translate METVIEW calls into MAGICS calls
+	// Find a metview to magics translator and execute it
+	MvRequest vdRequest = visDef.Request();
+	MagicsTranslator& mt = MagicsTranslator::Find ( dataUnit.Request().getVerb() );
+
+	MvRequest magicsDataRequest = mt.Execute (  dataUnit.Request(), dataInfoRequest, vdRequest );
+
+	// Draw the data unit (with the appropriate MAGICS request )
+	this->Draw ( magicsDataRequest );
+}
+
+void
+MagicsGraphicsEngine::DrawNewPage( MvRequest& viewRequest )
+{
+	// Call the magics translator to translate METVIEW calls 
+	// into MAGICS calls
+	MagicsTranslator& mt = MagicsTranslator::Find ( "PAGE" );
+	MvRequest pageRequest = mt.Execute ( viewRequest );
+
+	// Set Background colour
+	if ( strcmp (drawType_.c_str(), "BACKGROUND") == 0 ||
+	     strcmp (drawType_.c_str(), "DATA") == 0 )
+	{
+		const char* colour = viewRequest( "SUBPAGE_BACKGROUND_COLOUR" );
+		if ( colour != 0 )
+			pageRequest ( "SUBPAGE_BACKGROUND_COLOUR" ) = colour;
+	}
+
+	// Add extra information to the View, if the View is available.
+	// Otherwise, add it to the Page
+	pageRequest.advance();
+	if (!pageRequest)
+		pageRequest.rewind();
+
+	// Add page Id
+	pageRequest("METVIEW_ID") = owner_.Id();
+
+	// Add Zoom information
+	int zoomNumberOfLevels, zoomCurrentLevel;
+	owner_.ZoomInfo(zoomNumberOfLevels,zoomCurrentLevel);
+	pageRequest("ZOOM_NUMBER_OF_LEVELS") = zoomNumberOfLevels;
+	pageRequest("ZOOM_CURRENT_LEVEL")    = zoomCurrentLevel;
+
+	// Draw the new page
+	pageRequest.rewind();
+	this->Draw ( pageRequest );
+}
+
+#if 0
+#if 0 //D
+void
+MagicsGraphicsEngine::DrawFrame( Canvas& canvas, MvRequest& viewRequest )
+{
+	// Call the magics translator to translate METVIEW calls 
+	// into MAGICS calls
+	MagicsTranslator& mt = MagicsTranslator::Find ( "FRAME" );
+	MvRequest frameRequest = mt.Execute ( viewRequest );
+
+	// Draw the frame
+	this->Draw ( canvas, frameRequest );
+}
+#endif
+
+void
+MagicsGraphicsEngine::DrawExternalFrame( Canvas& canvas, MvRequest& frameRequest )
+{
+	// Call the magics translator to translate METVIEW calls 
+	// into MAGICS calls
+	MagicsTranslator& mt = MagicsTranslator::Find ( "FRAME" );
+	MvRequest magicsRequest = mt.Execute ( frameRequest );
+
+	magicsRequest ("SUBPAGE_FRAME") = "OFF";
+
+	// Draw the frame
+	this->Draw ( canvas, magicsRequest );
+}
+#endif
+
+void
+MagicsGraphicsEngine::DrawText( MvRequest& textRequest )
+{
+	const char* verb = textRequest.getVerb();
+	MagicsTranslator& mtrans = MagicsTranslator::Find ( verb );
+	MvRequest magicsTextRequest = mtrans.Execute ( textRequest );
+
+	this->Draw ( magicsTextRequest );
+}
+
+void
+MagicsGraphicsEngine::DrawLegend( MvRequest& legRequest )
+{
+	MagicsTranslator& mtrans = MagicsTranslator::Find ( "MLEGEND" );
+	MvRequest magicsLegendRequest = mtrans.Execute ( legRequest );
+
+	this->Draw ( magicsLegendRequest );
+}
+
+//
+//  DrawCoastlinesBack
+//
+//  INPUT  - canvas: the canvas associated to the graphics engine
+//           viewRequest: the mapview Request
+//           shaded: indicates if land-sea shading is to be performed
+//
+//  PURPOSE - Translate a METVIEW request into a MAGICS request
+//            Call the "Draw" method to draw the coastlines
+//
+void
+MagicsGraphicsEngine::DrawCoastlinesBack( MvRequest& viewRequest )
+{
+	int drawPrior;
+	bool draw = false;
+	Cached ON   = "ON";
+
+	// Get DrawingPriority from Page
+	DrawingPriority& tmpDrawingPriority = owner_.GetDrawPriority ();
+
+	// Retrieve the coastlines Request
+	// Call the magics translator to translate METVIEW calls
+	// into MAGICS calls
+	// Expand request
+	MagicsTranslator& mt = MagicsTranslator::Find ( "COASTLINES" );
+	MvRequest coastRequest = mt.Execute ( viewRequest );
+	MvRequest expRequest = ObjectList::ExpandRequest ( coastRequest, EXPAND_DEFAULTS  );
+
+	// Account for land-sea shading and for the drawing order
+	// Check if Coastline Land Shade is to be drawn on the background
+	Cached landShade = expRequest ( "MAP_COASTLINE_LAND_SHADE" );
+	if ( landShade == ON )
+	{
+		drawPrior = tmpDrawingPriority.GetPriority ( "COASTLINE_LAND_SHADE" );
+		if ( drawPrior == 999 )
+			expRequest ("MAP_COASTLINE_LAND_SHADE") = "OFF";
+		else
+			draw = true;
+	}
+
+	// Check if Coastline Sea Shade is to be drawn on the background
+	Cached seaShade = expRequest ( "MAP_COASTLINE_SEA_SHADE" );
+	if ( seaShade == ON )
+	{
+		drawPrior = tmpDrawingPriority.GetPriority ( "COASTLINE_SEA_SHADE" );
+		if ( drawPrior == 999 )
+			expRequest ("MAP_COASTLINE_SEA_SHADE") = "OFF";
+		else
+			draw = true;
+	}
+
+	// Check if Coastline is to be drawn on the background
+	Cached mapCoastline = expRequest ( "MAP_COASTLINE" );
+	if ( mapCoastline == ON )
+	{
+		drawPrior = tmpDrawingPriority.GetPriority ( "COASTLINE" );
+		if ( drawPrior == 999 && draw == false )
+			expRequest ("MAP_COASTLINE") = "OFF";
+		else
+			draw = true;
+	}
+
+	// Draw Coastline on the background
+	if ( draw )
+	{
+		// Unset other drawings
+		expRequest ("MAP_GRID") = "OFF";
+		expRequest ("MAP_LABEL") = "OFF";
+		this->Draw ( expRequest );
+	}
+}
+
+// If both Coastlines and Sea/Land Shade have been selected to be drawn,
+// the PCOAST request has to be send twice, otherwise the Coastlines will
+// not be drawed (Magics restriction).
+// The PCOAST request must be called at least once to draw the Grid and Label
+// (if both options are OFF, it will be a dummy call to Magics)
+void
+MagicsGraphicsEngine::DrawCoastlinesFront( MvRequest& viewRequest )
+{
+	int drawPrior;
+	MvRequest finalRequest;
+
+	bool draw   = false;
+	Cached ON   = "ON";
+	Cached LAST = "LAST";
+	DrawingPriority& tmpDrawingPriority = owner_.GetDrawPriority (); // Get from Page
+
+    // Retrieve the coastlines Request. Call the magics translator
+    // to translate METVIEW calls into MAGICS calls. Expand request
+    MagicsTranslator& mt = MagicsTranslator::Find ( "COASTLINES" );
+    MvRequest coastRequest = mt.Execute ( viewRequest );
+    MvRequest expRequest = ObjectList::ExpandRequest ( coastRequest, EXPAND_DEFAULTS  );
+
+	// Account for land-sea shading and for the drawing order
+	// Check if Coastline Land Shade is to be drawn on the foreground
+	Cached landShade = expRequest ( "MAP_COASTLINE_LAND_SHADE" );
+	if ( landShade == ON )
+	{
+		drawPrior = tmpDrawingPriority.GetPriority ( "COASTLINE_LAND_SHADE" );
+		if ( drawPrior == 999 )
+			draw = true;
+		else
+			expRequest ("MAP_COASTLINE_LAND_SHADE") = "OFF";
+	}
+
+	// Check if Coastline Sea Shade is to be drawn on the foreground
+	Cached seaShade = expRequest ( "MAP_COASTLINE_SEA_SHADE" );
+	if ( seaShade == ON )
+	{
+		drawPrior = tmpDrawingPriority.GetPriority ( "COASTLINE_SEA_SHADE" );
+		if ( drawPrior == 999 )
+			draw = true;
+		else
+			expRequest ("MAP_COASTLINE_SEA_SHADE") = "OFF";
+	}
+
+	// Check if Coastline is to be drawn on the foreground
+	Cached mapCoastline = expRequest ( "MAP_COASTLINE" );
+	if ( mapCoastline == ON )
+	{
+		drawPrior = tmpDrawingPriority.GetPriority ( "COASTLINE" );
+
+		// If MAP_COASTLINE was already ploted in the background but
+		// SEA/LAND SHADE was selected, MAGICS needs that MAP_COASTLINE
+		// be set to ON.
+		// If both MAP_COASTLINE and SEA/LAND SHADE are to be drawn,
+		// Magics needs a double PCOAST
+		if ( drawPrior != 999 && draw == false )
+			expRequest ("MAP_COASTLINE") = "OFF";
+		else if ( drawPrior == 999 && draw == true )
+		{
+			// Unset other drawings and set land/sea shade request
+			finalRequest               = expRequest;
+			finalRequest ("MAP_GRID")  = "OFF";
+			finalRequest ("MAP_LABEL") = "OFF";
+
+			// Unset Sea/Land Shade
+			expRequest ("MAP_COASTLINE_LAND_SHADE") = "OFF";
+			expRequest ("MAP_COASTLINE_SEA_SHADE")  = "OFF";
+		}
+	}
+
+	// Draw Coastline and/or other options (Grid,Label,...) on the foreground
+	finalRequest += expRequest;
+	this->Draw ( finalRequest );
+}
+
+#if 0
+void
+MagicsGraphicsEngine::DrawCoastlines( Canvas& canvas, MvRequest& viewRequest )
+{
+	// Retrieve the coastlines Request 
+	// Call the magics translator to translate METVIEW calls 
+	// into MAGICS calls
+	MagicsTranslator& mt = MagicsTranslator::Find ( "COASTLINES" );
+	MvRequest coastRequest = mt.Execute ( viewRequest );
+
+	// MAGICS does not know about drawing order
+	coastRequest.unsetParam ( "MAP_COASTLINE_DRAWING_ORDER" );
+
+	// Draw the coastlines
+	this->Draw ( canvas, coastRequest );
+}
+#endif
+
+void
+MagicsGraphicsEngine::StartPicture ( const char *drawType )
+{
+#if 0
+	MvRequest newRequest ( "MAGICS_ENGINE" );
+
+	int id = canvas.PresentableId();
+	newRequest ("SUBPAGE_ID" ) = id;
+
+	if ( PlotMod::Instance().IsWindow() )
+	{
+		Presentable *subpage = Root::Instance().FindBranch ( id );
+		if ( subpage )
+		  newRequest("PICTURE_ID") = subpage->PictureId(drawType,true);
+       	}
+	else
+		newRequest ("SUPERPAGE_INDEX") = iconId; // Index defined by SubPage
+
+	// Add information
+	SuperPage *sp = (SuperPage*)(owner_.FindSuperPage ( ));
+	PaperSize psize = sp->GetMySize();
+	double width  = psize.GetWidth();
+	double height = psize.GetHeight();
+	if ( strcmp(drawType,"DATA") == 0 )
+		newRequest ( "PRINT_INDEX" ) = sp->IncrementPrintIndex();
+	newRequest ( "TYPE" )                = drawType;
+	newRequest ( "ICON_ID" )             = iconId;
+	newRequest ( "SUPER_PAGE_X_LENGTH" ) = width;
+	newRequest ( "SUPER_PAGE_Y_LENGTH" ) = height;
+//	newRequest ( "REFRESH" )             = sp->Request()("_REFRESH");
+     serviceRequest_ = newRequest;
+#endif
+
+	drawType_ = drawType;
+	serviceRequest_.clean();
+}
+
+void
+MagicsGraphicsEngine::EndPicture ()
+{
+//     const char* type = serviceRequest_ ("TYPE");
+     if (drawType_ == "DATA")
+     {
+#if 0
+          // Build SUPERPAGE request for each plot, taking
+          // information from the original MAGICS_ENGINE request.
+          // Update page position at PAGE request.
+          // Copy the remaining requests.
+          while ( serviceRequest_ )
+          {
+               MvRequest req1 =  serviceRequest_.justOneRequest();
+               if ( strcmp((const char*)req1.getVerb(),"MAGICS_ENGINE") == 0 )
+               {
+                    // set verb to SUPERPAGE and send the request to the Superpage
+                    req1.setVerb("SUPERPAGE");
+                    Presentable* sp = owner_.FindSuperPage();
+                    SuperPage *sp1 = (SuperPage*)(owner_.FindSuperPage ( ));
+                    superpageRequest_ = superpageRequest_ + req1;
+               }
+               else
+                    fullRequest_ = fullRequest_ + req1;
+
+               serviceRequest_.advance();
+          }
+#endif
+          fullRequest_ += serviceRequest_;
+     }
+}
+
+void
+MagicsGraphicsEngine::DrawProlog ( )
+{
+	// Initialize requests
+	fullRequest_.clean();
+}
+
+void
+MagicsGraphicsEngine::DrawPageHeader ( Canvas& canvas )
+{
+	MvRequest newRequest ( "MAGICS_ENGINE" );
+	newRequest ("SUBPAGE_ID") = canvas.PresentableId ();
+	newRequest ("SUPERPAGE_INDEX") = owner_.Parent()->PaperPageIndex();
+	newRequest ("TYPE") = "PAGEHEADER";
+
+	MvRequest printerRequest = canvas.PrinterRequest ();
+	newRequest ("PRINTER") = printerRequest;	
+	serviceRequest_ = newRequest;
+
+	this->EndPicture ();
+}
+
+#if 0
+void
+MagicsGraphicsEngine::DrawTrailer ( Canvas& canvas ) //CHECK IF THIS IS STILL NEEDED
+{
+cout << "MagicsGraphicsEngine::EndPictureCCCCCCCCCCCCCCCCCCCCC" << endl;
+fullRequest_.print();
+
+        // Call MAGICS to process the request
+        MagPlusService::Instance().SetRequest ( fullRequest_ );
+
+#if 0 //D
+	MvRequest newRequest ( "MAGICS_ENGINE" );
+
+	newRequest ("SUBPAGE_ID")      = canvas.PresentableId ();
+	newRequest ("SUPERPAGE_INDEX") = owner_.MyParent()->PaperPageIndex();
+	newRequest ("TYPE")            = "TRAILER";
+
+	MvRequest printerRequest = canvas.PrinterRequest ();
+	newRequest ("PRINTER") = printerRequest;	
+	serviceRequest_ = newRequest;
+
+	this->EndPicture ();
+#endif
+}
+#endif
+
+void
+MagicsGraphicsEngine::DrawTrailer ( MvRequest& fullReq )
+{
+        fullReq += fullRequest_;
+}
+
+void
+MagicsGraphicsEngine::DrawAxis( MvRequest& viewRequest )
+{
+	// Retrieve the axis Request
+	// Call the magics translator to translate METVIEW calls
+	// into MAGICS call
+	MagicsTranslator& mt = MagicsTranslator::Find ( "PAXIS" );
+	MvRequest axisRequest = mt.Execute ( viewRequest );
+
+	// Draw the axis
+	this->Draw ( axisRequest );
+}
+
+double
+MagicsGraphicsEngine::ComputeAspectRatio( Canvas& canvas, MvRequest& req )
+{
+	double spwidth, spheight;
+
+	// Retrieve canvas size
+	double ar     =1.;
+	double cwidth  = canvas.GetWidth();
+	double cheight = canvas.GetHeight();
+	if (cwidth == 0. || cheight == 0.) return ar;
+
+	// Retrieve superpage size. If SuperPage does not exist,
+	// it is because request came from Assist buttom in the
+	// Edit Window
+	Presentable* pr = Root::Instance().FindBranch(canvas.PresentableId());
+	if ( pr )
+	{
+		Presentable* sp = pr->FindSuperPage();
+                spwidth  = sp->Request()("CUSTOM_WIDTH");
+		spheight = sp->Request()("CUSTOM_HEIGHT");
+	}
+	else
+	{
+		spwidth  = req("_WIDTH");
+		spheight = req("_HEIGHT");
+	}
+	if (spwidth == 0. || spheight == 0.) return ar;
+
+	// Compute aspect ratio
+	ar = (cwidth > cheight) ? (cheight/spheight) : (cwidth/spwidth);
+
+	return sqrt(ar);
+}
+
+void
+MagicsGraphicsEngine::TranslateRequest( MvIconList& iList, MvRequest& req )
+{
+     // Prepare the request to be drawn
+     // Translate METVIEW calls into MAGICS calls
+     // For each icon, find a metview to magics translator and execute it
+     MvListCursor iCursor;
+     for ( iCursor = iList.begin(); iCursor != iList.end(); ++iCursor)
+     {
+          MvRequest idef = (*( iCursor )).Request();
+          MagicsTranslator& mt2 = MagicsTranslator::Find ( idef.getVerb() );
+          req = req + mt2.Execute ( idef );
+     }
+}
+
+#if 0
+string
+MagicsGraphicsEngine::GetSuperpageIndex( int index )
+{
+	ostringstream ost;
+
+	ost << "SuperpageIndex" << setfill('0') << setw(3) << index;
+
+	return ost.str();
+}
+#endif
diff --git a/src/uPlot/MagicsGraphicsEngine.h b/src/uPlot/MagicsGraphicsEngine.h
new file mode 100644
index 0000000..6f5013e
--- /dev/null
+++ b/src/uPlot/MagicsGraphicsEngine.h
@@ -0,0 +1,142 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MagicsGraphics Engine
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the MagicsGraphics Engine class, a class for
+//  handling the different drawing packages supported by PlotMod
+//
+// .DESCRIPTION:
+//  This class is based on the "Strategy" pattern (see
+//  "Design Patterns" book, page 97).
+//
+//  The idea is to define an abstract base class for all possible instances
+//  of graphics engines.
+//
+//  Details of internal structure of the objects being created are
+//  hidden from client applications.
+//
+// .CLIENTS:
+//  Presentable::Draw (called by CreateAction::Execute and DropAction::Execute)
+//
+// .RESPONSABILITIES:
+//  Clla
+//
+//
+// .COLLABORATORS:
+//  Device, MvRequest
+//
+//
+// .BASE CLASS:
+//  GraphicsEngine
+//
+// .DERIVED CLASSES:
+//  (none)
+//
+
+#ifndef MagicsGraphicsEngine_H
+#define MagicsGraphicsEngine_H
+
+#include <string>
+#include <MvRequest.h>
+
+#include "GraphicsEngine.h"
+
+using namespace std;
+
+class MagicsGraphicsEngine: public GraphicsEngine {
+public:
+
+	// Constructors
+	MagicsGraphicsEngine ( Presentable& owner );
+
+	// Destructor
+        ~MagicsGraphicsEngine();
+
+	// Methods
+#if 0
+	virtual PSCanvas * MakePSCanvas ( Device&,
+					  const Point&,
+					  const Rectangle&,
+					  const PaperSize&,
+					  const PaperSize&,
+					  int ) const ;
+
+	virtual XCanvas  * MakeXCanvas ( Device&, 
+					 PresentableWidget* parent,
+					 const Rectangle&,
+					 const PaperSize&,
+					 int )  const ;
+#endif
+
+	virtual Canvas  * MakeCanvas ( Device&, 
+					 const Rectangle&,
+					 const PaperSize&,
+					 int )  const ;
+
+     // Draws a dataUnit+visDef onto a device
+     // REQUIRE: 1. dataUnit must provide a valid request, which contains
+     //             information about data location
+     //          2. dataInfoRequest indicates the location of the field/obs
+     //             whithin the dataUnit (where applicable)
+     //          3. List of Visdefs (1D and 2D)
+     //          4. data unit n-dim flag: 0-not defined, 1-1D, 2-2D, 3-1D&2D
+     virtual void DrawDataVisDef (MvIcon&, MvRequest&, MvIconList&, int = 0);
+
+	// Draws a dataUnit onto a device 
+	// REQUIRE: 1. dataUnit must provide a valid request, which contains
+	//             information about data location
+	//          2. dataUnitIndex indicates the location of the field/obs
+	//             whithin the dataUnit (where applicable)
+	//          3. Device must have been pre-configured
+	virtual void DrawDataUnit (MvIcon&, MvRequest&, MvIcon& );
+
+	virtual void DrawNewPage ( MvRequest& );
+//D	virtual void DrawFrame   ( Canvas&, MvRequest& );
+//	virtual void DrawExternalFrame ( Canvas&, MvRequest& );
+	virtual void DrawText ( MvRequest& );
+	virtual void DrawLegend ( MvRequest& );
+
+	virtual void Draw ( const MvRequest& );
+
+//	virtual void DrawCoastlines      ( Canvas&, MvRequest& );
+
+	virtual void DrawCoastlinesBack ( MvRequest& );
+	virtual void DrawCoastlinesFront ( MvRequest& );
+
+	virtual void DrawAxis ( MvRequest& );
+
+	virtual void DrawProlog ( );
+	virtual void DrawPageHeader ( Canvas& );
+//	virtual void DrawTrailer    ( Canvas& );  //CHECK IF THIS IS STILL NEEDED
+	virtual void DrawTrailer ( MvRequest& );
+
+	virtual void StartPicture ( const char* );
+	virtual void EndPicture ();
+
+     // Translate METVIEW calls into MAGICS calls
+     virtual void TranslateRequest( MvIconList&, MvRequest& );
+
+private:
+
+	MvRequest serviceRequest_;   //temporary request
+	MvRequest fullRequest_;      //full request
+	string drawType_;
+
+	double ComputeAspectRatio( Canvas& canvas, MvRequest& );
+//	string GetSuperpageIndex ( int index );
+};
+
+#endif
diff --git a/src/uPlot/MagicsTranslator.cc b/src/uPlot/MagicsTranslator.cc
new file mode 100644
index 0000000..33d4fe3
--- /dev/null
+++ b/src/uPlot/MagicsTranslator.cc
@@ -0,0 +1,976 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvRequestUtil.hpp>
+#include "Assertions.hpp"
+
+#include "MagicsTranslator.h"
+#include "ObjectList.h"
+#include "PlotModConst.h"
+
+// =========================================================
+//
+// Singleton objects for each class
+AxisTranslator         axisTranslatorInstance    ( "PAXIS" );
+BufrTranslator         bufrTranslatorInstance	 ( "BUFR" );
+CoastTranslator        coastTranslatorInstance	 ( "COASTLINES" );
+ContTranslator         contTranslatorInstance    ( "PCONT" );
+GeopointsTranslator    geopTranslatorInstance    ( "GEOPOINTS" );
+GraphTranslator        graphTranslatorInstance   ( "PGRAPH" );
+GribTranslator         gribTranslatorInstance    ( "GRIB" );
+GribVectorsTranslator  iivectorsTranslatorInstance ( "GRIB_VECTORS" );
+NetCDFTranslator       ncGeoPTranslatorInstance  ( "NETCDF_GEO_POINTS"  );
+NetCDFTranslator       ncGeoVTranslatorInstance  ( "NETCDF_GEO_VECTORS" );
+NetCDFTranslator       ncGeoMTranslatorInstance  ( "NETCDF_GEO_MATRIX"  );
+NetCDFTranslator       ncMatTranslatorInstance   ( "NETCDF_XY_MATRIX"   );
+NetCDFTranslator       ncXYPTranslatorInstance   ( "NETCDF_XY_POINTS"   );
+ObsTranslator          obsTranslatorInstance     ( "POBS" );
+PageTranslator         pageTranslatorInstance    ( "PAGE" );
+SymbolTranslator       symbolTranslatorInstance  ( "PSYMB" );
+TextTranslator         textTranslatorInstance	 ( "PTEXT" );
+VoidTranslator         input1TranslatorInstance  ( "INPUT_HISTOGRAM" );
+VoidTranslator         input2TranslatorInstance  ( "INPUT_XY_POINTS" );
+VoidTranslator         input3TranslatorInstance  ( "INPUT_GEO_POINTS" );
+VoidTranslator         input4TranslatorInstance  ( "INPUT_XY_VECTORS" );
+VoidTranslator         input5TranslatorInstance  ( "INPUT_GEO_VECTORS" );
+VoidTranslator         input6TranslatorInstance  ( "INPUT_XY_BINNING" );
+VoidTranslator         input7TranslatorInstance  ( "INPUT_GEO_BINNING" );
+VoidTranslator         input8TranslatorInstance  ( "INPUT_XY_BOXES" );
+VoidTranslator         input9TranslatorInstance  ( "INPUT_GEO_BOXES" );
+VoidTranslator         input10TranslatorInstance ( "INPUT_HOR_BAR" );
+VoidTranslator         input11TranslatorInstance ( "INPUT_VER_BAR" );
+VoidTranslator         mcontTranslatorInstance   ( "MCONT" );
+VoidTranslator         mgraphTranslatorInstance  ( "MGRAPH" );
+VoidTranslator         mlegendTranslatorInstance ( "MLEGEND" );
+VoidTranslator         mtextTranslatorInstance   ( "MTEXT" );
+VoidTranslator         msymbolTranslatorInstance ( "MSYMB" );
+VoidTranslator         mwindTranslatorInstance   ( "MWIND" );
+VoidTranslator         odbGeoPTranslatorInstance ( "ODB_GEO_POINTS" );
+VoidTranslator         odbGeoVTranslatorInstance ( "ODB_GEO_VECTORS" );
+VoidTranslator         odbXyPTranslatorInstance  ( "ODB_XY_POINTS" );
+VoidTranslator         odbXyVTranslatorInstance  ( "ODB_XY_VECTORS" );
+VoidTranslator         odbXyMTranslatorInstance  ( "ODB_XY_BINNING" );
+VoidTranslator         pimportTranslatorInstance ( "PIMPORT" );
+VoidTranslator         prasterTranslatorInstance ( "PRASTER" );
+VoidTranslator         prloopTranslatorInstance  ( "PRASTERLOOP" );
+VoidTranslator         pvoidTranslatorInstance   ( "PVOID" );
+VoidTranslator         table1TranslatorInstance  ( "TABLE_HISTOGRAM" );
+VoidTranslator         table2TranslatorInstance  ( "TABLE_XY_POINTS" );
+VoidTranslator         table3TranslatorInstance  ( "TABLE_GEO_POINTS" );
+VoidTranslator         table4TranslatorInstance  ( "TABLE_XY_VECTORS" );
+VoidTranslator         table5TranslatorInstance  ( "TABLE_GEO_VECTORS" );
+VoidTranslator         table6TranslatorInstance  ( "TABLE_XY_BINNING" );
+VoidTranslator         table7TranslatorInstance  ( "TABLE_GEO_BINNING" );
+VoidTranslator         table8TranslatorInstance  ( "TABLE_XY_BOXES" );
+VoidTranslator         table9TranslatorInstance  ( "TABLE_GEO_BOXES" );
+VoidTranslator         table10TranslatorInstance ( "TABLE_HOR_BAR" );
+VoidTranslator         table11TranslatorInstance ( "TABLE_VER_BAR" );
+WindTranslator         windTranslatorInstance    ( "PWIND" );
+
+#if 0
+ImageTranslator   imageTranslatorInstance ( "IMAGE"  );
+FrameTranslator   frameTranslatorInstance ( "FRAME"  );
+CurveTranslator   curvTranslatorInstance  ( "CURVE"  );
+PolarTranslator   polarrTranslatorInstance( "POLAR_FIELD" );
+MatrixTranslator  matrixTranslatorInstance( "MATRIX" );
+
+PImageTranslator  pimageTranslatorInstance( "PMIMAGE" );
+DummyDataTranslator dummyDataTranslatorInstance("DUMMYDATA");
+NoteTranslator      noteTranslatorInstance("NOTE");
+StringTranslator   stringTranslatorInstance("STRING");
+
+ImportTranslator  psFileTranslatorInstance("PSFILE");
+ImportTranslator  pngTranslatorInstance("PNG");
+ImportTranslator  jpegTranslatorInstance("JPEG");
+#endif
+
+//====== Helper function for generating subpage size ==
+static void generateSubpageSize(const MvRequest&, MvRequest&, double,double,bool expanded = false);
+
+//========================================================
+//
+// Default Object ( required by the "prototype" template )
+MagicsTranslator&
+MagicsTranslatorTraits::DefaultObject()
+{
+	return GribTranslator::Instance();
+}
+
+//==================================================
+//
+//  Methods for the MagicsTranslator class
+//
+MagicsTranslator::~MagicsTranslator()
+{
+	// Empty
+}
+
+//=================================================
+// GRIB Translator
+
+MagicsTranslator& 
+GribTranslator::Instance()
+{
+	return gribTranslatorInstance;
+}
+
+MvRequest
+GribTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			  const MvRequest& dataInfoRequest,
+			  MvRequest& visdefRequest )
+{
+	MvRequest magicsRequest( "PGRIB" );
+	MvRequest metviewRequest = dataUnitRequest;
+
+	// Set the common parameters of all kind of grib data
+
+	// Set the input file name and Magics internal parameters
+	const char* dataPath = metviewRequest("PATH");
+	magicsRequest ( "GRIB_INPUT_TYPE"        ) = "FILE";
+	magicsRequest ( "GRIB_INPUT_FILE_NAME"   ) = dataPath;
+	magicsRequest ( "GRIB_FILE_ADDRESS_MODE" ) = "BYTE_OFFSET";
+	magicsRequest ( "GRIB_SPECIFICATION"     ) = "OFF";
+	CopySomeParameters( metviewRequest,magicsRequest,"$METVIEW_" );
+
+	// Set GRIB_* parameters selected by the user.
+	// As two fields can be drawn within a 'Newpage' Magics
+	// command, the request must be expanded in order to set/reset
+	// all the parameters. This will avoid the use of parameters
+	// that were set for the previous plot but not set for this one.
+	MvRequest expandRequest = ObjectList::ExpandRequest (visdefRequest,EXPAND_DEFAULTS);
+	CopySomeParameters( expandRequest,magicsRequest,"GRIB_" );
+	CopySomeParameters( expandRequest,magicsRequest,"INPUT_FIELD_SUPPRESS" );
+
+	// Set the specific parameters for each kind of data
+	// If it is a single field:
+	//	GRIB_DIMENSION = 1, GRIB_POSITION = pos
+	//	(or) GRIB_DIMENSION = 2, GRIB_POSITION_1 = pos1, GRIB_POSITION_2 = pos2
+	// If it is all fields:
+	//	GRIB_DIMENSION = 1
+	//	(or)GRIB_ DIMENSION = 2 
+	// If it is subset of fields:
+	//	GRIB_DIMENSION = 1, GRIB_POSITION = list
+	//	(or) GRIB_DIMENSION = 2, GRIB_POSITION_1 = list1, GRIB_POSITION_2 = list2
+
+	// Metview's "GRIB_SCALING_OF_RETRIEVED_FIELDS" is equivalent to Magics' "GRIB_AUTOMATIC_SCALING"
+	// Metview's "GRIB_SCALING_OF_DERIVED_FIELDS"   is equivalent to Magics' "GRIB_AUTOMATIC_DERIVED_SCALING"
+
+	const char *scalingOfRetrievedFields = (const char*) expandRequest("GRIB_SCALING_OF_RETRIEVED_FIELDS");
+	if (scalingOfRetrievedFields)
+		magicsRequest("GRIB_AUTOMATIC_SCALING") = scalingOfRetrievedFields;
+
+	const char *scalingOfDerivedFields = (const char*) expandRequest("GRIB_SCALING_OF_DERIVED_FIELDS");
+	if (scalingOfDerivedFields)
+		magicsRequest("GRIB_AUTOMATIC_DERIVED_SCALING") = scalingOfDerivedFields;
+
+     //ir const char *derived = dataInfoRequest("DERIVED");
+     //ir //if (derived
+     //ir magicsRequest ( "GRIB_AUTOMATIC_SCALING") = "OFF" ;
+
+     // Copy GRIB_* parameters
+     CopySomeParameters(dataInfoRequest,magicsRequest,"GRIB_");
+
+     // This is an image field data
+     if ( strcmp( (const char*)dataInfoRequest.getVerb(),"IMAGE") == 0)
+     {
+          magicsRequest ( "GRIB_AUTOMATIC_SCALING" ) = "OFF" ;
+          magicsRequest ( "SUBPAGE_MAP_PROJECTION" ) = "INPUT_IMAGE";
+     }
+
+	//magicsRequest ( "GRIB_AUTOMATIC_SCALING") = "OFF";
+
+	// Copy hidden parameters
+	magicsRequest ("_NAME" ) = (const char*)dataUnitRequest ("_NAME");
+	magicsRequest ("_CLASS") = (const char*)dataUnitRequest ("_CLASS");
+	magicsRequest ("_ID"   ) = (const char*)dataUnitRequest ("_ID");
+
+	return magicsRequest;
+} 
+
+#if 0
+//=============================================================
+//
+// Image Translator
+//
+MvRequest
+ImageTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			   long dataUnitIndex,
+			   const MvRequest& dataInfoRequest,
+			   MvRequest& )
+{
+
+	MvRequest magicsRequest;
+	const char *dataIdent = dataInfoRequest ("IDENT");
+
+	require ( dataIdent != NULL );	// this is  an IMAGE
+
+	magicsRequest.setVerb("PGRIB");
+
+	// Set the input file name and field position
+	const char* dataPath = dataUnitRequest("PATH");
+	
+	magicsRequest ( "GRIB_INPUT_TYPE"        ) = "FILE";
+	magicsRequest ( "GRIB_INPUT_FILE_NAME"   ) = dataPath;
+	magicsRequest ( "GRIB_POSITION"    ) = (int) dataUnitIndex;
+	magicsRequest ( "GRIB_FILE_ADDRESS_MODE" ) = "BYTE_OFFSET";
+	magicsRequest ( "GRIB_SPECIFICATION"     ) = "OFF";
+	magicsRequest ( "GRIB_SCALING"           ) = "OFF" ;
+
+	magicsRequest ( "SUBPAGE_MAP_PROJECTION" ) = "INPUT_IMAGE";
+
+//magicsRequest ( "MAP_COASTLINE_LAND_SHADE_COLOUR" ) = "BEIGE";
+//magicsRequest ( "MAP_COASTLINE_SEA_SHADE_COLOUR" ) = "MAGENTA";
+
+return magicsRequest;
+} 
+#endif
+
+//==============================================================
+//
+// Bufr Translator
+//
+MvRequest
+BufrTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			  const MvRequest& dataInfoRequest,
+			  MvRequest& )
+{
+	MvRequest magicsRequest;	
+	const char* dataPath;
+
+	// The real path is normally in the dataInfoRequest,
+	// where the name of the generated file for this
+	// interval is. If no grouping/matching is done,
+	// use the original datarequest.
+	dataPath = dataInfoRequest("PATH");
+	if ( !dataPath )
+		dataPath = dataUnitRequest("PATH");
+
+	magicsRequest.setVerb("BUFR");
+	magicsRequest("OBS_INPUT_TYPE"      ) = "FILE";
+	magicsRequest("OBS_INPUT_FORMAT"    ) = "BUFR";
+	magicsRequest("OBS_INPUT_FILE_NAME" ) = dataPath;
+	magicsRequest("OBS_INPUT_FILE_UNIT" ) = 23;
+	magicsRequest("TEXT_LINE_1")=  "Observations";
+	magicsRequest("TEXT_LINE_COUNT")=  1;
+
+  return magicsRequest;
+}
+
+//===================================================
+// Obs Translator, for setting how the obs. should be plotted.
+//
+MvRequest
+ObsTranslator::Execute ( const MvRequest& mapviewRequest )
+{
+  return mapviewRequest;
+}
+
+//=================================================================
+//
+// Coast Translator
+//
+MvRequest
+CoastTranslator::Execute ( const MvRequest& mapviewRequest )
+{
+	// Retrieve the coastlines Request
+	MvRequest magicsRequest = mapviewRequest.getSubrequest ("COASTLINES");
+
+	magicsRequest.setVerb("MCOAST");
+	
+	return magicsRequest;
+}
+
+//=================================================================
+//
+// --- METHOD : Contour Translator::Execute
+//
+// --- PURPOSE: Translate a metview Contour request into
+//              a MAGICS contour request
+// 
+MvRequest
+ContTranslator::Execute ( const MvRequest& visdefRequest )
+{
+	// Retrieve the visdef request
+	MvRequest metviewRequest = visdefRequest;
+
+	// Check LEGEND_ENTRY subrequest 
+	MvRequest magicsRequest ("PCONT");
+	MvRequest tmpRequest ("PCONT");
+	MvRequest legRequest = metviewRequest.getSubrequest("LEGEND_ENTRY");
+	if ( legRequest )
+	{
+		// Strip out the "GRIB_" and the "INPUT_FIELD_SUPPRESS" parts
+		MvRequest tmp1Request ("PCONT");
+		CopyAndRemoveParameters ( metviewRequest, tmpRequest, "INPUT_FIELD_SUPPRESS" );
+		CopyAndRemoveParameters ( tmpRequest, tmp1Request, "GRIB_" );
+		// Translate the LEGEND_ENTRY subrequest
+		CopyAndRemoveParameters(tmp1Request,magicsRequest,"LEGEND_ENTRY");
+		CopySomeParameters(legRequest,magicsRequest,"LEGEND");
+	}
+	else
+	{
+		// Strip out the "GRIB_" the "INPUT_FIELD_SUPPRESS" parts
+		CopyAndRemoveParameters ( metviewRequest, tmpRequest, "INPUT_FIELD_SUPPRESS" );
+		CopyAndRemoveParameters ( tmpRequest, magicsRequest, "GRIB_" );
+	}
+
+	return magicsRequest;
+}
+
+#if 0
+//=================================================================
+//
+// Frame Translator
+//
+MvRequest
+FrameTranslator::Execute ( const MvRequest& metviewRequest )
+{
+	MvRequest magicsRequest ( "FRAME" );
+	magicsRequest ("SUPER_PAGE_FRAME") = "OFF";
+
+	MvRequest mvRequest = metviewRequest; // Get rid of the const
+
+	CopySomeParameters ( mvRequest, magicsRequest,
+			     "SUBPAGE_FRAME");	
+	CopySomeParameters ( mvRequest, magicsRequest,
+			     "PAGE_FRAME");	
+return magicsRequest;
+}
+#endif
+
+MvRequest
+PageTranslator::Execute ( const MvRequest& viewRequest )
+{
+	// Set layout
+    MvRequest metviewRequest = viewRequest;
+	MvRequest magicsRequest("PAGE");
+	double width  = metviewRequest ( "_WIDTH"  );
+	double height = metviewRequest ( "_HEIGHT" );
+	magicsRequest ( "PAGE_X_LENGTH" ) = width; 
+	magicsRequest ( "PAGE_Y_LENGTH" ) = height; 
+
+	magicsRequest ( "PAGE_X_POSITION" ) =  (double)metviewRequest("_X_ORIGIN");
+	magicsRequest ( "PAGE_Y_POSITION" ) =  (double)metviewRequest("_Y_ORIGIN");
+
+	// Set/Remove page ID line. By default, Metview does not use this parameter
+	magicsRequest ( "PAGE_ID_LINE") = "OFF";
+	CopySomeParameters(metviewRequest, magicsRequest, "PAGE_FRAME");
+	CopySomeParameters(metviewRequest, magicsRequest, "SUBPAGE_FRAME");
+	CopySomeParameters(metviewRequest, magicsRequest, "SUBPAGE_METADATA");
+	if ( (const char*)metviewRequest( "SUBPAGE_VERTICAL_AXIS_WIDTH" ) )
+		magicsRequest( "SUBPAGE_VERTICAL_AXIS_WIDTH" ) = (double)metviewRequest( "SUBPAGE_VERTICAL_AXIS_WIDTH" );
+	if ( (const char*)metviewRequest( "SUBPAGE_HORIZONTAL_AXIS_HEIGHT" ) )
+		magicsRequest( "SUBPAGE_HORIZONTAL_AXIS_HEIGHT" ) = (double)metviewRequest( "SUBPAGE_HORIZONTAL_AXIS_HEIGHT" );
+
+    // Set zoom definition
+    if ( (const char*)metviewRequest( "_ZOOM_DEFINITION" ) )
+    {
+        magicsRequest( "SUBPAGE_MAP_JSON_DEFINITION" ) = (const char*)metviewRequest( "_ZOOM_DEFINITION" );
+        metviewRequest.unsetParam("_ZOOM_DEFINITION");
+    }
+
+	// Set subpage sizes
+	generateSubpageSize(metviewRequest,magicsRequest,width,height);
+
+	// Include the MAP information
+	// Test if the projection exists - if not, expand the request to
+	// search for the default projection -- if not, set projection to 
+	// NONE
+	const char* projection = metviewRequest( "MAP_PROJECTION" );
+	MvRequest tmpReq;
+	if ( !projection )
+	{
+		tmpReq = ObjectList::ExpandRequest(metviewRequest,EXPAND_DEFAULTS);
+		projection = tmpReq( "MAP_PROJECTION" );
+	}
+
+	// Temporary solution to draw cartesian view
+	if (projection != 0 && strcmp(projection,"cartesian") == 0)
+	{
+		// Add a new request related to the VIEW
+		magicsRequest("SUBPAGE_MAP_PROJECTION") = "NEXT";
+		metviewRequest.unsetParam("MAP_PROJECTION");
+		RemoveParameters(metviewRequest,"PAGE");
+		RemoveParameters(metviewRequest,"SUBPAGE");
+		magicsRequest = magicsRequest + metviewRequest;
+	}
+	else if ( projection )
+	{
+          // Translate AREA parameter
+          const char* area = metviewRequest( "AREA" );
+          if ( area != 0 )
+          {
+               magicsRequest( "SUBPAGE_LOWER_LEFT_LATITUDE" ) = (double)metviewRequest ( "AREA", 0 );
+               magicsRequest( "SUBPAGE_LOWER_LEFT_LONGITUDE") = (double)metviewRequest ( "AREA", 1 );
+               magicsRequest( "SUBPAGE_UPPER_RIGHT_LATITUDE") = (double)metviewRequest ( "AREA", 2 );
+               magicsRequest( "SUBPAGE_UPPER_RIGHT_LONGITUDE")= (double)metviewRequest ( "AREA", 3 );
+          }
+
+          // Translate MAP to SUBPAGE_MAP parameters
+          CopySomeParameters ( metviewRequest,magicsRequest,"MAP_","SUBPAGE_MAP_" );
+	}
+#if 0 //SatelliteView is not available at the moment
+	else if ( metviewRequest.getVerb() == Cached ( "SATELLITEVIEW" ) )
+	{
+		magicsRequest ( "SUBPAGE_MAP_PROJECTION" ) = "SATELLITE";
+
+//		MvRequest tmpRequest = metviewRequest;
+
+		if ( metviewRequest ( "IMAGE_SUBAREA_SELECTION" ) == ON )
+		{
+			magicsRequest ( "IMAGE_SUBAREA_SELECTION" ) = ON;
+			CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_CENTRE" );
+			CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_CORNER" );
+		}
+
+		CopySomeParameters( metviewRequest, magicsRequest, "INPUT_IMAGE" );
+		CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_INITIAL" );
+		CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_SUB_SAT" );
+		CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_X_EARTH_DIAMETER" );
+		CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_Y_EARTH_DIAMETER" );
+		CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_GRID_ORIENTATION" );
+		CopySomeParameters( metviewRequest, magicsRequest, "SUBPAGE_MAP_CAMERA_ALTITUDE" );
+	}
+#endif
+	else
+	{
+		// In case of a non MapView this parameter should be set
+		magicsRequest ( "SUBPAGE_MAP_PROJECTION" ) = "NONE";
+	}
+
+	// Add overlay information
+//	if ( (const char*)metviewRequest("MAP_OVERLAY_CONTROL") )
+//		magicsRequest("SUBPAGE_OVERLAY_CONTROL") = (const char*)metviewRequest("MAP_OVERLAY_CONTROL");
+
+	return magicsRequest;
+}
+
+//=================================================================
+//
+// Text Translator
+//
+MvRequest
+TextTranslator::Execute ( const MvRequest& textsRequest )
+{
+	MvRequest magicsRequest = textsRequest ;
+	ensure ( magicsRequest.getVerb() == Cached ( "PTEXT" ) );
+	
+	return magicsRequest;
+}
+
+MvRequest
+AxisTranslator::Execute ( const MvRequest& metviewRequest )
+{
+	MvRequest tmpRequest = metviewRequest;
+	tmpRequest.rewind();
+
+	MvRequest magicsRequest;
+
+	while ( tmpRequest )
+	{
+		if ( tmpRequest.getVerb() == Cached ( "PAXIS") )
+			magicsRequest = magicsRequest + tmpRequest.justOneRequest();
+		tmpRequest.advance();
+	}
+
+	return magicsRequest;
+}
+
+#if 0
+//=================================================================
+//
+// Curve Translator
+// 
+MvRequest
+CurveTranslator::Execute ( const MvRequest& metviewRequest )
+{
+	MvRequest magicsRequest = metviewRequest;
+
+	ensure ( magicsRequest.getVerb() == Cached ( "CURVE" ) ); 
+
+return magicsRequest;
+}
+
+MvRequest
+CurveTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			   long, const MvRequest&, MvRequest&)
+{
+	MvRequest magicsRequest ("CURVE" );
+	MvRequest duRequest = dataUnitRequest; // to be allowed to advance.
+
+	const char* graphType = duRequest( "GRAPH_TYPE" );
+	const char *xAxisType = duRequest("_XAXIS_TYPE");
+	bool xIsDate;
+	if ( xAxisType )
+	       	xIsDate = ( strcmp(xAxisType,"DATE") == 0 );
+	else
+		xIsDate = false;
+
+	const char *yAxisType = duRequest("_YAXIS_TYPE");
+	bool yIsDate;
+	if ( yAxisType )
+	       	yIsDate = ( strcmp(yAxisType,"DATE") == 0 );
+	else
+		yIsDate = false;
+
+        Cached dataVectorYName, dataVectorXName;
+	Cached dataVectorY2Name,dataVectorX2Name;
+
+	if ( graphType && graphType == Cached( "BAR" ) )
+	{
+	  if ( yIsDate )
+	    {
+	      
+	      dataVectorYName = Cached( "GRAPH_BAR_DATE_Y_UPPER_VALUES" );
+	      dataVectorY2Name = Cached( "GRAPH_BAR_DATE_Y_LOWER_VALUES" );
+	    }
+	  else
+	    {
+	      dataVectorYName = Cached( "GRAPH_BAR_Y_UPPER_VALUES" );
+	      dataVectorY2Name = Cached( "GRAPH_BAR_Y_LOWER_VALUES" );
+	    }
+	  if ( xIsDate )
+	    dataVectorXName = Cached( "GRAPH_BAR_DATE_X_VALUES" );
+	  else
+	    dataVectorXName = Cached( "GRAPH_BAR_X_VALUES" );
+	}
+	else if ( graphType && graphType == Cached( "AREA" ) )
+	  {
+	    if ( xIsDate )
+	      {
+		dataVectorX2Name = Cached( "GRAPH_CURVE2_DATE_X_VALUES" );
+		dataVectorXName = Cached( "GRAPH_CURVE_DATE_X_VALUES" );
+	      }
+	    else
+	      {
+		dataVectorX2Name = Cached( "GRAPH_CURVE2_X_VALUES" );
+		dataVectorXName = Cached( "GRAPH_CURVE_X_VALUES" );
+	      }
+	    if ( yIsDate )
+	      {
+
+		dataVectorY2Name = Cached( "GRAPH_CURVE2_DATE_Y_VALUES" );
+		dataVectorYName = Cached( "GRAPH_CURVE_DATE_Y_VALUES" );
+	      }
+	    else
+	      {
+		dataVectorY2Name = Cached( "GRAPH_CURVE2_Y_VALUES" );
+		dataVectorYName = Cached( "GRAPH_CURVE_Y_VALUES" );
+	      }
+	  }
+
+	else
+	  {
+	    if ( yIsDate )
+	      dataVectorYName = Cached( "GRAPH_CURVE_DATE_Y_VALUES" );
+	    else
+	      dataVectorYName = Cached( "GRAPH_CURVE_Y_VALUES" );
+	    if ( xIsDate )
+	      dataVectorXName = Cached( "GRAPH_CURVE_DATE_X_VALUES" );
+	    else
+	      dataVectorXName = Cached( "GRAPH_CURVE_X_VALUES" );
+	  }
+	
+	const char *oneValue;
+	for ( int i=0; i<duRequest.countValues( "DATA_X_VALUES" ); i++ )
+	{
+		oneValue = duRequest ("DATA_X_VALUES", i ) ;
+		magicsRequest.addValue( dataVectorXName, oneValue );
+		oneValue = duRequest ("DATA_Y_VALUES", i );
+		magicsRequest.addValue( dataVectorYName, oneValue );
+	}
+	
+	if ( dataVectorX2Name )
+	  {
+	    for ( int i=0; i<duRequest.countValues( "DATA_X2_VALUES" ); i++ )
+	      {
+		oneValue = duRequest ("DATA_X2_VALUES", i );
+		magicsRequest.addValue( dataVectorX2Name, oneValue );
+	      }
+	  }
+	if ( dataVectorY2Name )
+	  {
+	    for ( int i=0; i<duRequest.countValues( "DATA_Y2_VALUES" ); i++ )
+	      {
+		oneValue = duRequest ("DATA_Y2_VALUES", i );
+		magicsRequest.addValue( dataVectorY2Name, oneValue );
+	      }
+	  }
+	CopySomeParameters( duRequest, magicsRequest, "TEXT" );
+
+	// Check if the curve carries some axis or ptephig along, if so copy them.
+	duRequest.advance();
+	while ( duRequest )
+	  {
+	    MvRequest  request =  duRequest.justOneRequest();
+	    Cached verb        =  request.getVerb();
+	    if ( verb == PAXIS || !strcmp(verb,"PTEPHIG") )
+		 magicsRequest = request + magicsRequest;
+
+	    duRequest.advance();
+	  }
+
+return magicsRequest;
+}
+#endif
+
+//===================================================
+// Graph Translator
+//
+MvRequest 
+GraphTranslator::Execute ( const MvRequest& metviewRequest )
+{
+    MvRequest tmpRequest = metviewRequest;
+    ensure ( tmpRequest.getVerb() == Cached ( "PGRAPH" ) );
+
+    MvRequest magicsRequest( "PGRAPH" );
+    CopyAndRemoveParameters(tmpRequest,magicsRequest,"LEGEND_ENTRY");
+
+    MvRequest legRequest = tmpRequest.getSubrequest("LEGEND_ENTRY");
+    if ( legRequest ) 
+        CopySomeParameters(legRequest,magicsRequest,"LEGEND");
+
+    return magicsRequest;
+}
+
+//=================================================================
+//
+// Grib_Vectors Translator
+//
+MvRequest
+GribVectorsTranslator::Execute ( const MvRequest& dataUnitRequest1,
+                                 const MvRequest&, MvRequest& )
+{
+   // Copy input request (this is because functions iterInit and iterGetNextValue
+   // do not accept a const variable)
+   MvRequest dataUnitRequest = dataUnitRequest1;
+
+   // Get GRIB info subrequest
+   MvRequest gribReq = dataUnitRequest("GRIB");
+
+   // Create Magics request from the input requests
+   MvRequest magicsRequest("PGRIB");
+   magicsRequest ("GRIB_INPUT_TYPE") = "FILE";
+   magicsRequest ("GRIB_INPUT_FILE_NAME") = (const char*)gribReq("PATH");
+   magicsRequest ("GRIB_FILE_ADDRESS_MODE") = "BYTE_OFFSET";
+   magicsRequest ("GRIB_WIND_MODE") = (const char*)dataUnitRequest("GRIB_WIND_MODE");
+
+   // Get grib dimension list
+   int cnt = dataUnitRequest.iterInit( "GRIB_DIMENSION" );
+   const char* str;
+   int i;
+   for( i = 0; i < cnt; ++i )
+   {
+      dataUnitRequest.iterGetNextValue( str );
+      magicsRequest.addValue ("GRIB_DIMENSION",str);
+   }
+
+   // Get grib positions list
+   cnt = gribReq.iterInit("OFFSET");
+   for ( i = 0; i < cnt; ++i )
+   {
+       gribReq.iterGetNextValue( str );
+       magicsRequest.addValue("GRIB_POSITION",str);
+   }
+
+   return magicsRequest;
+}
+
+#if 0
+//=================================================================
+//
+// Polar_field Translator
+// 
+
+
+MvRequest
+PolarTranslator::Execute ( const MvRequest& metviewRequest )
+{
+	MvRequest magicsRequest = metviewRequest;
+	magicsRequest.setVerb( "PGRIB" );
+
+return magicsRequest;
+}
+
+MvRequest
+PolarTranslator::Execute ( const MvRequest& dataUnitRequest , 
+			   long, const MvRequest&, MvRequest& )
+{
+  MvRequest int_request = dataUnitRequest("INTENSITY");
+  MvRequest dir_request = dataUnitRequest("DIRECTION");
+
+  MvRequest magicsRequest( "PGRIB" );
+  magicsRequest( "GRIB_INPUT_TYPE"        ) = "FILE";
+  magicsRequest( "GRIB_INPUT_FILE_NAME"   ) = int_request("PATH");
+  magicsRequest( "GRIB_INPUT_FILE_NAME_2" ) = dir_request("PATH");
+  magicsRequest( "GRIB_INPUT_FILE_NUMBER" ) = "TWO";
+  magicsRequest( "GRIB_FILE_ADDRESS_MODE" ) = "BYTE_OFFSET";
+  magicsRequest( "GRIB_DIMENSION"   ) = 2;
+  magicsRequest( "GRIB_POSITION_1"   ) = (long)int_request("OFFSET");
+  magicsRequest( "GRIB_POSITION_2"   ) = (long)dir_request("OFFSET");
+  magicsRequest( "GRIB_SPECIFICATION"     ) = "OFF";
+  magicsRequest( "GRIB_SCALING"           ) = "OFF";
+  magicsRequest("GRIB_WIND_MODE"          ) = "SD";
+
+return magicsRequest;
+}
+#endif
+
+//===================================================
+// Wind Translator
+//
+MvRequest 
+WindTranslator::Execute ( const MvRequest& metviewRequest )
+{
+ 	MvRequest magicsRequest = metviewRequest;
+
+	ensure ( magicsRequest.getVerb() == Cached ( "PWIND" ) ); 
+
+	return magicsRequest;
+}
+
+#if 0
+// 
+// PImage Translator
+//
+MvRequest
+PImageTranslator::Execute ( const MvRequest& metviewRequest )
+{
+	MvRequest magicsRequest = metviewRequest;
+
+	ensure ( magicsRequest.getVerb() == Cached ( "PMIMAGE" ) );
+	magicsRequest.setVerb( "PIMAGE" );
+
+
+	/* The parameter IMAGE_COLOUR_TABLE_TYPE was introduced
+		solely for the Metview user interface, and is not
+		a valid MAGICS parameter. Therefore, we remove it here
+		before passing the request on to MAGICS. */
+
+	magicsRequest.unsetParam ( "IMAGE_COLOUR_TABLE_TYPE" );
+
+return magicsRequest;
+}
+#endif
+
+MvRequest
+SymbolTranslator::Execute ( const MvRequest& visdefRequest )
+{
+	ensure ( visdefRequest.getVerb() == Cached ( "PSYMB" ) );
+
+	MvRequest metviewRequest = visdefRequest;
+	
+        // Copy request
+ 	MvRequest magicsRequest( "PSYMB" );
+	CopyAndRemoveParameters(metviewRequest,magicsRequest,"LEGEND_ENTRY");
+
+	// Check LEGEND_ENTRY subrequest
+	MvRequest legRequest = metviewRequest.getSubrequest("LEGEND_ENTRY");
+	if ( legRequest ) CopySomeParameters(legRequest,magicsRequest,"LEGEND");
+
+        return magicsRequest;
+}
+
+MvRequest
+GeopointsTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			       const MvRequest&, MvRequest& psymb)
+{
+	MvRequest geo("GEOPOINTS");
+
+	MvRequest record = dataUnitRequest.getSubrequest("RECORD");
+
+	const char *symbType =  psymb("SYMBOL_TYPE");
+	const char *tableMode = psymb("SYMBOL_TABLE_MODE");
+	string type = "NUMBER";
+
+	// If SYMBOL_TYPE is set, use the value. If SYMBOL_TABLE_MODE is also
+	// set, type needs to be number, whatever SYMBOL_TYPE is set to.
+	if (  symbType )
+		type = symbType;
+	if ( tableMode && strcmp(tableMode,"ON") == 0 )
+		type = "NUMBER";
+
+	record("SYMBOL_TYPE") = type.c_str();
+
+	geo.setValue("RECORD",record);
+
+	// Copy hidden parameters
+	geo("_NAME" ) = (const char*)dataUnitRequest ("_NAME");
+	geo("_CLASS") = (const char*)dataUnitRequest ("_CLASS");
+	geo("_ID"   ) = (const char*)dataUnitRequest ("_ID");
+
+	return geo;
+}
+
+#if 0
+MvRequest
+MatrixTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			    long, const MvRequest&, MvRequest& )
+{
+  return dataUnitRequest;
+}
+#endif
+
+MvRequest
+NetCDFTranslator::Execute ( const MvRequest& dataUnitRequest,
+			    const MvRequest&, MvRequest& )
+{
+   return dataUnitRequest;
+}
+
+MvRequest
+VoidTranslator::Execute ( const MvRequest& request,
+			  const MvRequest&, MvRequest& )
+{
+   return request;
+}
+MvRequest
+VoidTranslator::Execute ( const MvRequest& request)
+{
+   return request;
+}
+
+#if 0
+MvRequest
+DummyDataTranslator::Execute ( const MvRequest& dataUnitRequest, 
+			       long, const MvRequest&, MvRequest& )
+{
+  MvRequest magicsRequest;
+  MvRequest duRequest = dataUnitRequest; // Original request is const
+
+  // Skip first request, only a dummy
+  duRequest.advance();
+
+  // Copy any subsequent requests.
+  while ( duRequest )
+    {
+      MvRequest oneRequest =  duRequest.justOneRequest();
+      if ( ! magicsRequest )
+	magicsRequest = oneRequest;
+      else
+	magicsRequest = magicsRequest + oneRequest;
+
+      duRequest.advance(); 
+    }
+
+  if ( ! magicsRequest )
+    return MvRequest("EMPTY");
+  else
+    return magicsRequest;
+      
+}
+
+MvRequest NoteTranslator::Execute(const MvRequest& dataUnitRequest, 
+				  long,
+				  const MvRequest&,
+			          MvRequest& )
+{
+
+
+  MvRequest out("PTEXT");
+
+  const char *path = dataUnitRequest("PATH");
+
+  int counter = 1;
+  char buf[300],magicsName[30];
+  if ( path )
+    {
+      ifstream in(path, ios::in);
+      if ( ! in )
+	return MvRequest("EMPTY");
+
+      while ( in.getline(buf,299) && counter <= 10 )
+	{
+	  sprintf(magicsName,"TEXT_LINE_%d",counter);
+	  out(magicsName) = buf;
+	  counter++;
+	}
+      out("TEXT_LINE_COUNT") = counter -1;
+      out("TEXT_BOX_X_POSITION") = (double)dataUnitRequest("_DROP_X");
+      out("TEXT_BOX_Y_POSITION") = (double)dataUnitRequest("_DROP_Y");
+      out("TEXT_JUSTIFICATION") = "LEFT";
+      out("TEXT_ORIGIN") = "USER";
+      out("TEXT_MODE")  = "POSITIONAL";
+      in.close();
+
+      MvRequest ptext = dataUnitRequest.getSubrequest("_PTEXT");
+      
+      CopyAndRemoveParameters(ptext,out,"TEXT_LINE");
+
+      return out;
+    }  
+  return MvRequest("EMPTY");
+}
+
+
+MvRequest StringTranslator::Execute(const MvRequest& dataUnitRequest, 
+				    long,const MvRequest&,MvRequest& )
+{
+  // Read value field, split into lines and add to TEXT_LINE_1 ... for one or 
+  // more annotations requests.
+  MvRequest out("PTEXT");
+  
+  const char *value = dataUnitRequest("VALUE");
+  if ( ! value )
+    return MvRequest("EMPTY");
+
+  // For now just add it, with embedded newlines.
+  out("TEXT_LINE_1") = value;
+  out("TEXT_BOX_X_POSITION") = (double)dataUnitRequest("_DROP_X");
+  out("TEXT_BOX_Y_POSITION") = (double)dataUnitRequest("_DROP_Y");
+  out("TEXT_JUSTIFICATION") = "LEFT";
+  out("TEXT_ORIGIN") = "USER";
+  out("TEXT_MODE")  = "POSITIONAL";
+  return out;
+}
+
+MvRequest ImportTranslator::Execute(const MvRequest& dataUnitRequest, 
+				    long,const MvRequest&,MvRequest& vdRequest )
+{
+  MvRequest out("PIMPORT");
+
+  if ( vdRequest.getVerb() == Cached("PIMPORT"))
+    out = vdRequest;
+
+  out("IMPORT_FILE_PATH") = (const char *)dataUnitRequest("PATH");
+
+  const char *ftype = (const char*)dataUnitRequest("_CLASS");
+  if ( ftype )
+    {
+      if ( strcmp(ftype,"PSFILE") == 0 )
+	out("IMPORT_FILE_TYPE") = "PS";
+      else
+	out("IMPORT_FILE_TYPE") = ftype;
+    }
+	
+	
+  return out;
+}
+#endif
+
+///////////////// Utility function, not normal translator
+void generateSubpageSize(const MvRequest& metviewRequest, MvRequest &magicsRequest, double width, double height, bool expanded )
+{
+	// Copy input request
+	MvRequest tmpRequest = metviewRequest.justOneRequest();
+
+	// Check if the request needs to be expanded
+	if ( !expanded )
+		tmpRequest = ObjectList::ExpandRequest ( tmpRequest,EXPAND_DEFAULTS );
+
+	magicsRequest ( "SUBPAGE_X_LENGTH" ) = width * ( (double)tmpRequest("SUBPAGE_X_LENGTH")/100 );
+
+	magicsRequest ( "SUBPAGE_Y_LENGTH" ) = height * ( (double)tmpRequest("SUBPAGE_Y_LENGTH")/ 100 );
+
+	magicsRequest ( "SUBPAGE_X_POSITION" ) = width * ( (double)tmpRequest("SUBPAGE_X_POSITION") /100 );
+
+	magicsRequest ( "SUBPAGE_Y_POSITION" ) = height * ( (double)tmpRequest("SUBPAGE_Y_POSITION") / 100 );
+
+	return;
+}
diff --git a/src/uPlot/MagicsTranslator.h b/src/uPlot/MagicsTranslator.h
new file mode 100644
index 0000000..33306ac
--- /dev/null
+++ b/src/uPlot/MagicsTranslator.h
@@ -0,0 +1,532 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MagicsTranslator
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  A general class for translatiopn of METVIEW requests
+//  into MAGICS requests
+//
+// .CLIENTS:
+//  MagicsAction, MapView
+//
+//
+// .RESPONSABILITIES:
+//  - Read the incoming METVIEW requests 
+//  - Find the appropriate MAGIS equivalents
+//  - Provide new magics request
+//
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//  Prototype
+//
+// .DERIVED CLASSES:
+//  GribTranslator, ImageTranslator, BufrTranslator
+//
+// .REFERENCES:
+//
+//
+#ifndef MagicsTranslator_H
+#define MagicsTranslator_H
+
+#include <Prototype.hpp>
+#include <MvRequest.h>
+
+class MagicsTranslator;
+
+struct MagicsTranslatorTraits {
+        typedef MagicsTranslator         Type;
+        static  Type&                DefaultObject();
+};
+
+class MagicsTranslator : public Prototype <MagicsTranslatorTraits> 
+{
+public:
+
+	// Contructors
+	MagicsTranslator(const Cached& actionName ) :
+                Prototype<MagicsTranslatorTraits> ( actionName, this ){}
+
+	// Destructor
+	virtual ~MagicsTranslator();
+
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& ) = 0;
+	virtual MvRequest Execute ( const MvRequest& ) = 0;
+};
+
+class GribTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	GribTranslator(const Cached& actionName ) :
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~GribTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& );
+
+	virtual MvRequest Execute ( const MvRequest& )
+ 		{ return MvRequest("EMPTY"); }
+
+	static MagicsTranslator& Instance(); // for the default object
+};
+
+#if 0
+class ImageTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	ImageTranslator(const Cached& actionName ) :
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~ImageTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest&, long, const MvRequest&, MvRequest& );
+
+	virtual MvRequest Execute ( const MvRequest& )
+ 		{ return MvRequest("EMPTY"); }
+};
+#endif
+
+class BufrTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	BufrTranslator(const Cached& actionName ):
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~BufrTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& );
+
+	virtual MvRequest Execute ( const MvRequest& )
+ 		{ return MvRequest("EMPTY"); }
+};
+
+class ObsTranslator : public MagicsTranslator
+{
+public:
+
+  // Contructors
+  ObsTranslator(const Cached& actionName ):
+    MagicsTranslator ( actionName ){}
+
+  // Destructor
+  ~ObsTranslator() {}
+
+  virtual MvRequest Execute ( const MvRequest& );
+
+  virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+    { return MvRequest("EMPTY"); }
+};
+
+class CoastTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	CoastTranslator(const Cached& actionName ): 
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~CoastTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+class ContTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	ContTranslator(const Cached& actionName ): 
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~ContTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+#if 0
+class FrameTranslator : public MagicsTranslator 
+{
+public:
+
+// -- Contructors
+
+	FrameTranslator(const Cached& actionName ): 
+                MagicsTranslator ( actionName ){}
+
+// -- Destructor
+
+	~FrameTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, long, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+
+
+};
+#endif
+
+class TextTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	TextTranslator(const Cached& actionName ):
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~TextTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+class AxisTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	AxisTranslator(const Cached& actionName ):
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~AxisTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+#if 0
+class CurveTranslator : public MagicsTranslator 
+{
+public:
+
+// -- Contructors
+
+	CurveTranslator(const Cached& actionName ): 
+                MagicsTranslator ( actionName ){}
+
+// -- Destructor
+
+	~CurveTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, long, const MvRequest&, MvRequest& );
+};
+#endif
+
+class GraphTranslator : public MagicsTranslator 
+{
+public:
+
+    // -- Contructors
+    GraphTranslator(const Cached& actionName ): 
+                   MagicsTranslator ( actionName ){}
+
+    // -- Destructor
+    ~GraphTranslator() {}
+
+    virtual MvRequest Execute ( const MvRequest& );
+    virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+        { return MvRequest("EMPTY"); }
+
+};
+
+class PageTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	PageTranslator(const Cached& actionName ):
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~PageTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+class GribVectorsTranslator : public MagicsTranslator
+{
+public:
+
+   // -- Contructors
+   GribVectorsTranslator (const Cached& actionName ):
+                         MagicsTranslator ( actionName ) {}
+
+   // -- Destructor
+   ~GribVectorsTranslator() {}
+
+   virtual MvRequest Execute ( const MvRequest& ) { return MvRequest("EMPTY"); }
+   virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& );
+};
+
+#if 0
+
+class PolarTranslator : public MagicsTranslator 
+{
+public:
+
+// -- Contructors
+
+	PolarTranslator(const Cached& actionName ): 
+                MagicsTranslator ( actionName ){}
+
+// -- Destructor
+
+	~PolarTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, long, const MvRequest&, MvRequest& );
+};
+#endif
+
+class WindTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	WindTranslator(const Cached& actionName ): 
+                MagicsTranslator ( actionName ){}
+
+	// Destructor
+	~WindTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+#if 0
+class MatrixTranslator : public MagicsTranslator 
+{
+public:
+
+	// -- Contructors
+  
+	MatrixTranslator(const Cached& actionName ): 
+		MagicsTranslator ( actionName ){}
+  
+	// -- Destructor
+  
+	~MatrixTranslator() {}
+  
+	virtual MvRequest Execute ( const MvRequest& )
+		{ return MvRequest("EMPTY"); }
+	virtual MvRequest Execute ( const MvRequest&, long, const MvRequest&, MvRequest& );
+};
+#endif
+
+class NetCDFTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	NetCDFTranslator(const Cached& actionName ): 
+		MagicsTranslator ( actionName ){}
+  
+	// Destructor
+	~NetCDFTranslator() {}
+  
+	virtual MvRequest Execute ( const MvRequest& )
+		{ return MvRequest("EMPTY"); }
+
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& );
+};
+
+class VoidTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	VoidTranslator(const Cached& actionName ):
+		MagicsTranslator ( actionName ) {}
+  
+	// Destructor
+	~VoidTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& );
+};
+
+class VisDefTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	VisDefTranslator(const Cached& actionName ):
+		MagicsTranslator ( actionName ) {}
+  
+	// Destructor
+	~VisDefTranslator() {}
+
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+
+
+#if 0
+class PImageTranslator : public MagicsTranslator 
+{
+public:
+
+	// -- Contructors
+  
+	PImageTranslator(const Cached& actionName ): 
+		MagicsTranslator ( actionName ){}
+  
+	// -- Destructor
+  
+	~PImageTranslator() {}
+  
+	virtual MvRequest Execute ( const MvRequest& );
+	virtual MvRequest Execute ( const MvRequest&, long, const MvRequest&, MvRequest& )
+		{ return MvRequest("EMPTY"); }
+};
+#endif
+
+class GeopointsTranslator : public MagicsTranslator 
+{
+public:
+
+	// Contructors
+	GeopointsTranslator(const Cached& actionName ):
+		MagicsTranslator ( actionName ){}
+  
+	// Destructor
+	~GeopointsTranslator() {}
+  
+        virtual MvRequest Execute ( const MvRequest& )
+            { return MvRequest("EMPTY");; }
+
+	virtual MvRequest Execute ( const MvRequest& req, const MvRequest&, MvRequest& );
+};
+
+class SymbolTranslator : public MagicsTranslator
+{
+public:
+
+	// Contructors
+	SymbolTranslator(const Cached& actionName ):
+		MagicsTranslator ( actionName ){}
+  
+	// Destructor
+	~SymbolTranslator() {}
+  
+        virtual MvRequest Execute ( const MvRequest&  req );
+
+	virtual MvRequest Execute ( const MvRequest&, const MvRequest&, MvRequest& )
+	  { return MvRequest("EMPTY"); };
+};
+
+#if 0
+class DummyDataTranslator : public MagicsTranslator 
+{
+public:
+
+  // -- Contructors
+  
+  DummyDataTranslator(const Cached& actionName ): 
+    MagicsTranslator ( actionName ){}
+  
+  // -- Destructor
+  
+  ~DummyDataTranslator() {}
+  
+  virtual MvRequest Execute ( const MvRequest& ) { return MvRequest("EMPTY"); }
+  virtual MvRequest Execute ( const MvRequest& req, long, const MvRequest&, MvRequest& );
+};
+
+class NoteTranslator : public MagicsTranslator 
+{
+public:
+
+  // -- Contructors
+  
+  NoteTranslator(const Cached& actionName ): 
+    MagicsTranslator ( actionName ){}
+  
+  // -- Destructor
+  
+  ~NoteTranslator() {}
+  
+  virtual MvRequest Execute ( const MvRequest& ) { return MvRequest("EMPTY"); }
+  virtual MvRequest Execute ( const MvRequest& req, long, const MvRequest&, MvRequest& );
+};
+
+class StringTranslator : public MagicsTranslator 
+{
+public:
+
+  // -- Contructors
+  
+  StringTranslator(const Cached& actionName ): 
+    MagicsTranslator ( actionName ){}
+  
+  // -- Destructor
+  
+  ~StringTranslator() {}
+  
+  virtual MvRequest Execute ( const MvRequest& ) { return MvRequest("EMPTY"); }
+  virtual MvRequest Execute ( const MvRequest& req, long, const MvRequest&, MvRequest& );
+};
+
+
+class ImportTranslator : public MagicsTranslator 
+{
+public:
+
+  // -- Contructors
+  
+  ImportTranslator(const Cached& actionName ): 
+    MagicsTranslator ( actionName ){}
+  
+  // -- Destructor
+  
+  ~ImportTranslator() {}
+  
+  virtual MvRequest Execute ( const MvRequest& ) { return MvRequest("EMPTY"); }
+  virtual MvRequest Execute ( const MvRequest& req, long, const MvRequest&, MvRequest& );
+};
+
+// Auxiliary Function
+
+void CopyAndRemoveParameters ( MvRequest& inRequest, 
+			       MvRequest& outRequest, 
+			       const char* prefix );
+
+#endif
+#endif
diff --git a/src/uPlot/Makefile.am b/src/uPlot/Makefile.am
new file mode 100755
index 0000000..17eb315
--- /dev/null
+++ b/src/uPlot/Makefile.am
@@ -0,0 +1,229 @@
+include $(top_srcdir)/aux_build/autotroll.mk
+
+#--------LIST OF EXECUTABLES----------------------------------------------------
+
+bin_PROGRAMS = bin/uPlotBatch bin/uPlotManager
+
+if METVIEW_QT
+bin_PROGRAMS += bin/uPlot \
+		bin/GeoTool bin/GeoToolManager
+endif
+
+
+#-------- uPLOT COMMON SOURCES--------------------------------------------------
+
+uPlot_COMMON_SOURCES = AverageView.cc BufrDecoder.cc \
+	   Canvas.cc CartesianView.cc CommonXSectView.cc \
+           CreateAction.cc CreateTypeAction.cc \
+	   DataBuilder.cc DataObject.cc Decoder.cc Device.cc \
+	   DrawingPriority.cc DropAction.cc \
+	   GeopointsDecoder.cc GraphicsEngine.cc GribDecoder.cc Location.cc \
+	   MvLayer.cc MacroConverter.cc MacroVisitor.cc \
+	   MagicsGraphicsEngine.cc MagicsTranslator.cc \
+	   MagPlusService.cc MapView.cc MatchingCriteria.cc MatchingInfo.cc \
+	   MvIcon.cc MvIconDataBase.cc \
+           NewpageAction.cc \
+	   ObjectInfo.cc ObjectList.cc OutputFormatAction.cc \
+	   Page.cc PlotAction.cc PlotMod.cc PlotModAction.cc PlotModBuilder.cc \
+	   PlotModService.cc PlotModTask.cc PlotModView.cc PlotPageBuilder.cc \
+	   PmContext.cc PmIndividualProjection.cc PmGeneralProjection.cc PmProjection.cc \
+	   Preferences.cc Presentable.cc \
+	   Root.cc \
+	   SatelliteProjection.cc SimpleDecoder.cc SkipAction.cc SubPage.cc SuperPage.cc \
+	   Task.cc VertProfView.cc XDevice.cc XSectView.cc ZoomStacks.cc \
+	   AverageView.h BufrDecoder.h \
+	   Canvas.h CartesianView.h CommonXSectView.h \
+           Counted.h CreateAction.h CreateTypeAction.h \
+	   DataBuilder.h DataObject.h Decoder.h Device.h \
+	   DeviceData.h DrawingPriority.h DropAction.h \
+	   GeopointsDecoder.h GraphicsEngine.h GribDecoder.h Location.h \
+           MvLayer.h MacroConverter.h MacroVisitor.h \
+	   MagPlusService.h MagicsGraphicsEngine.h MagicsTranslator.h MapView.h \
+	   MatchingCriteria.h MatchingInfo.h MvIcon.h MvIconDataBase.h \
+	   ObjectInfo.h ObjectList.h OutputFormatAction.h \
+           NewpageAction.h Page.h PaperSize.h PlotAction.h \
+	   PlotMod.h PlotModAction.h PlotModBuilder.h PlotModConst.h PlotModService.h \
+	   PlotModTask.h PlotModView.h PlotPageBuilder.h \
+	   PmContext.h PmGeneralProjection.h PmIndividualProjection.h PmProjection.h \
+	   Preferences.h Presentable.h Root.h \
+	   SatelliteProjection.h SimpleDecoder.h SkipAction.h SubPage.h SuperPage.h \
+	   Task.h VertProfView.h Visitor.h XDevice.h XSectView.h ZoomStacks.h \
+	   GenAppService.cc GenAppService.hpp MvCallback.hpp
+
+uPlot_COMMON_QT_SOURCES = MvQCursorData.cc \
+	   MvQCursorDataWidget.cc \
+	   MvQContentsModel.cc \
+           MvQContentsWidget.cc \
+	   MvQDataWidget.cc \
+	   MvQLayerContentsIcon.cc \
+           MvQLayerDataWidget.cc \
+	   MvQLayerMetaDataWidget.cc \
+	   MvQLayerModel.cc \
+	   MvQLayerWidget.cc \
+	   MvQMagnifier.cc \
+	   MvQPlaceMark.cc \
+	   MvQPlaceMarkDialog.cc \
+	   MvQPlaceMarkMimeData.cc \
+	   MvQPlaceMarkWidget.cc \
+	   MvQPlaceMarkModel.cc \
+	   MvQPlotView.cc  \
+	   MvQPointSelection.cc  \
+	   MvQProgressItem.cc \
+	   MvQStepModel.cc \
+	   MvQStepWidget.cc \
+	   MvQZoom.cc \
+	   MvQAreaSelection.cc \
+	   MvQLineSelection.cc \
+	   MvQZoomStackWidget.cc \
+	   MvQAreaSelection.h MvQLineSelection.h \
+	   MvQCursorData.h MvQCursorDataWidget.h \
+	   MvQContentsModel.h  MvQContentsWidget.h MvQLayerContentsIcon.h MvQLayerDataWidget.h \
+	   MvQLayerWidget.h MvQDataWidget.h MvQLayerMetaDataWidget.h  MvQLayerModel.h MvQMagnifier.h \
+	   MvQPlaceMark.h MvQPlaceMarkDialog.h MvQPlaceMarkModel.h MvQPlaceMarkWidget.h \
+	   MvQPlaceMarkMimeData.h \
+	   MvQPlotItem.h MvQPlotView.h MvQPointSelection.h MvQProgressItem.h \
+	   MvQPushButton.h \
+	   MvQStepModel.h \
+	   MvQStepWidget.h MvQZoom.h MvQZoomStackWidget.h
+
+
+uPlot_COMMON_QT_SOURCES_nodist = MvQContentsWidget.moc.cpp MvQCursorData.moc.cpp  MvQCursorDataWidget.moc.cpp \
+				 MvQDataWidget.moc.cpp \
+                                 MvQLayerModel.moc.cpp MvQLayerWidget.moc.cpp \
+                                 MvQLayerDataWidget.moc.cpp MvQLayerMetaDataWidget.moc.cpp \
+				 MvQMagnifier.moc.cpp \
+                                 MvQPlaceMark.moc.cpp MvQPlaceMarkDialog.moc.cpp MvQPlaceMarkWidget.moc.cpp \
+                                 MvQPlaceMarkMimeData.moc.cpp MvQPlaceMarkModel.moc.cpp \
+				 MvQStepModel.moc.cpp \
+ 				 MvQStepWidget.moc.cpp \
+                                 MvQPlotView.moc.cpp MvQPointSelection.moc.cpp \
+				 MvQZoom.moc.cpp MvQAreaSelection.moc.cpp MvQLineSelection.moc.cpp \
+				 MvQZoomStackWidget.moc.cpp
+
+
+uPlot_COMMON_UI_SOURCES = ExportDialog.cc  \
+	   MagPlusInteractiveService.cc PlotModInteractive.cc \
+	   uPlotBase.cc  \
+	   ExportDialog.h MagPlusInteractiveService.h PlotModInteractive.h \
+	   uPlotBase.h \
+	   uPlot.qrc
+
+uPlot_COMMON_UI_SOURCES_nodist = ExportDialog.moc.cpp uPlotBase.moc.cpp uPlot.qrc.cpp
+
+
+#-------- uPLOT ------------------------------------------------------------------
+
+bin_uPlot_SOURCES  = MvMain.cc \
+	   ${uPlot_COMMON_SOURCES} \
+	   ${uPlot_COMMON_QT_SOURCES} \
+	   ${uPlot_COMMON_UI_SOURCES} \
+ 	   uPlot.cc uPlotApp.cc \
+	   uPlot.h uPlotApp.h
+
+nodist_bin_uPlot_SOURCES = ${uPlot_COMMON_QT_SOURCES_nodist} ${uPlot_COMMON_UI_SOURCES_nodist} \
+                           uPlot.moc.cpp
+
+
+bin_uPlot_CPPFLAGS =  -I../libMvQtGui -I../libMvQtUtil $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+bin_uPlot_LDFLAGS  =  $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_uPlot_LDADD    = $(LDADD)  $(MAGPLUS_LIB) -lMvQtGui -lMvQtUtil $(STANDARD_METVIEW_LIBS)  $(ODB_LIBS) $(FLIBS) $(QT_LIBS)
+bin_uPlot_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+
+bin_uPlotManager_SOURCES  = uPlotManager.cc uPlotService.cc uPlotManager.hpp uPlotService.hpp
+bin_uPlotManager_CPPFLAGS = $(AM_CPPFLAGS)
+bin_uPlotManager_LDFLAGS  =  -L../../lib $(LDFLAGS) $(ODB_LDFLAGS)
+bin_uPlotManager_LDADD    = $(LDADD) $(STANDARD_METVIEW_LIBS) $(FLIBS) $(ODB_LIBS)
+bin_uPlotManager_DEPENDENCIES = ../../lib/libUtil.a
+
+#-------- uPLOT Batch-----------------------------------------------------------------
+
+bin_uPlotBatch_SOURCES  = MvMainuPlotBatch.cc \
+	   ${uPlot_COMMON_SOURCES} \
+	   MagPlusBatchService.cc PlotModBatch.cc uPlotBatchApp.cc \
+	   MagPlusBatchService.h PlotModBatch.h uPlotBatchApp.h
+
+
+# we add the QT flags tothe compilation directives here because although this module should have
+# no dependencies on Qt, it still uses Magics++, and if that has been built with Qt support, then
+# we will need the flags in order to have a correct compilation. If Magics++ has been built without
+# Qt, then these flags should be empty, so no harm done.
+
+bin_uPlotBatch_CPPFLAGS =  $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS) -DNOMETVIEW_QT
+bin_uPlotBatch_LDFLAGS  = $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_uPlotBatch_LDADD    = $(LDADD)  $(MAGPLUS_LIB) $(STANDARD_METVIEW_LIBS) $(ODB_LIBS) $(FLIBS) $(QT_LIBS)
+bin_uPlotBatch_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+
+
+#-------- GeoTool ---------------------------------------------------------------
+
+bin_GeoTool_SOURCES  = MvMainGeoTool.cc \
+	   ${uPlot_COMMON_SOURCES} \
+	   ${uPlot_COMMON_QT_SOURCES} \
+	   ${uPlot_COMMON_UI_SOURCES} \
+	   GeoTool.cc GeoTool.h \
+	   uPlotApp.cc uPlotApp.h \
+	   geoSelect.qrc
+
+nodist_bin_GeoTool_SOURCES = ${uPlot_COMMON_QT_SOURCES_nodist} ${uPlot_COMMON_UI_SOURCES_nodist} \
+                             GeoTool.moc.cpp geoSelect.qrc.cpp
+
+
+bin_GeoTool_CPPFLAGS = -I../libMvQtGui -I../libMvQtUtil  $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+bin_GeoTool_LDFLAGS  = $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(QT_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_GeoTool_LDADD    = $(LDADD)  $(MAGPLUS_LIB) -lMvQtGui -lMvQtUtil $(STANDARD_METVIEW_LIBS) $(ODB_LIBS) $(FLIBS) $(QT_LIBS)
+bin_GeoTool_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+
+bin_GeoToolManager_SOURCES  = GeoToolManager.cc GeoToolManager.h
+bin_GeoToolManager_CPPFLAGS = $(AM_CPPFLAGS)
+bin_GeoToolManager_LDFLAGS  =  -L../../lib $(LDFLAGS)
+bin_GeoToolManager_LDADD    = $(LDADD) $(STANDARD_METVIEW_LIBS) $(FLIBS) -lUtil
+
+
+#-------- Built sources------------------------------------------------------------
+
+BUILT_SOURCES = bin
+
+if METVIEW_QT
+BUILT_SOURCES += uPlot.moc.cpp uPlot.qrc.cpp \
+		ExportDialog.moc.cpp \
+                MvQLayerModel.moc.cpp MvQLayerWidget.moc.cpp  \
+		MvQLayerMetaDataWidget.moc.cpp \
+		MvQPlaceMark.moc.cpp MvQPlaceMarkModel.moc.cpp MvQPlaceMarkWidget.moc.cpp \
+		MvQPlotView.moc.cpp MvQStepModel.moc.cpp MvQZoomStackWidget.moc.cpp \
+		uPlotBase.moc.cpp  \
+		GeoTool.moc.cpp MvQZoom.moc.cpp MvQAreaSelection.moc.cpp MvQLineSelection.moc.cpp
+endif
+
+
+#-------- share ------------------------------------------------------------
+
+sharedir       = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA     = $(local_sharedir)/ObjectSpec.OutputFormats
+
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+
+EXTRA_DIST = uPlot.qrc ObjectSpec.OutputFormats \
+	     geoSelect.qrc layerInfo.css
+
+
+CLEANFILES = $(share_DATA) 
+
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp
diff --git a/src/uPlot/Makefile.in b/src/uPlot/Makefile.in
new file mode 100644
index 0000000..484ab7b
--- /dev/null
+++ b/src/uPlot/Makefile.in
@@ -0,0 +1,6452 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Makerules.
+# This file is part of AutoTroll.
+# Copyright (C) 2006, 2007, 2009, 2010  Benoit Sigoure.
+#
+# AutoTroll is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll.  You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll.  Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/aux_build/autotroll.mk
+bin_PROGRAMS = bin/uPlotBatch$(EXEEXT) bin/uPlotManager$(EXEEXT) \
+	$(am__EXEEXT_1)
+ at METVIEW_QT_TRUE@am__append_1 = bin/uPlot \
+ at METVIEW_QT_TRUE@		bin/GeoTool bin/GeoToolManager
+
+ at METVIEW_QT_TRUE@am__append_2 = uPlot.moc.cpp uPlot.qrc.cpp \
+ at METVIEW_QT_TRUE@		ExportDialog.moc.cpp \
+ at METVIEW_QT_TRUE@                MvQLayerModel.moc.cpp MvQLayerWidget.moc.cpp  \
+ at METVIEW_QT_TRUE@		MvQLayerMetaDataWidget.moc.cpp \
+ at METVIEW_QT_TRUE@		MvQPlaceMark.moc.cpp MvQPlaceMarkModel.moc.cpp MvQPlaceMarkWidget.moc.cpp \
+ at METVIEW_QT_TRUE@		MvQPlotView.moc.cpp MvQStepModel.moc.cpp MvQZoomStackWidget.moc.cpp \
+ at METVIEW_QT_TRUE@		uPlotBase.moc.cpp  \
+ at METVIEW_QT_TRUE@		GeoTool.moc.cpp MvQZoom.moc.cpp MvQAreaSelection.moc.cpp MvQLineSelection.moc.cpp
+
+subdir = src/uPlot
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+ at METVIEW_QT_TRUE@am__EXEEXT_1 = bin/uPlot$(EXEEXT) \
+ at METVIEW_QT_TRUE@	bin/GeoTool$(EXEEXT) \
+ at METVIEW_QT_TRUE@	bin/GeoToolManager$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = bin_GeoTool-AverageView.$(OBJEXT) \
+	bin_GeoTool-BufrDecoder.$(OBJEXT) bin_GeoTool-Canvas.$(OBJEXT) \
+	bin_GeoTool-CartesianView.$(OBJEXT) \
+	bin_GeoTool-CommonXSectView.$(OBJEXT) \
+	bin_GeoTool-CreateAction.$(OBJEXT) \
+	bin_GeoTool-CreateTypeAction.$(OBJEXT) \
+	bin_GeoTool-DataBuilder.$(OBJEXT) \
+	bin_GeoTool-DataObject.$(OBJEXT) bin_GeoTool-Decoder.$(OBJEXT) \
+	bin_GeoTool-Device.$(OBJEXT) \
+	bin_GeoTool-DrawingPriority.$(OBJEXT) \
+	bin_GeoTool-DropAction.$(OBJEXT) \
+	bin_GeoTool-GeopointsDecoder.$(OBJEXT) \
+	bin_GeoTool-GraphicsEngine.$(OBJEXT) \
+	bin_GeoTool-GribDecoder.$(OBJEXT) \
+	bin_GeoTool-Location.$(OBJEXT) bin_GeoTool-MvLayer.$(OBJEXT) \
+	bin_GeoTool-MacroConverter.$(OBJEXT) \
+	bin_GeoTool-MacroVisitor.$(OBJEXT) \
+	bin_GeoTool-MagicsGraphicsEngine.$(OBJEXT) \
+	bin_GeoTool-MagicsTranslator.$(OBJEXT) \
+	bin_GeoTool-MagPlusService.$(OBJEXT) \
+	bin_GeoTool-MapView.$(OBJEXT) \
+	bin_GeoTool-MatchingCriteria.$(OBJEXT) \
+	bin_GeoTool-MatchingInfo.$(OBJEXT) \
+	bin_GeoTool-MvIcon.$(OBJEXT) \
+	bin_GeoTool-MvIconDataBase.$(OBJEXT) \
+	bin_GeoTool-NewpageAction.$(OBJEXT) \
+	bin_GeoTool-ObjectInfo.$(OBJEXT) \
+	bin_GeoTool-ObjectList.$(OBJEXT) \
+	bin_GeoTool-OutputFormatAction.$(OBJEXT) \
+	bin_GeoTool-Page.$(OBJEXT) bin_GeoTool-PlotAction.$(OBJEXT) \
+	bin_GeoTool-PlotMod.$(OBJEXT) \
+	bin_GeoTool-PlotModAction.$(OBJEXT) \
+	bin_GeoTool-PlotModBuilder.$(OBJEXT) \
+	bin_GeoTool-PlotModService.$(OBJEXT) \
+	bin_GeoTool-PlotModTask.$(OBJEXT) \
+	bin_GeoTool-PlotModView.$(OBJEXT) \
+	bin_GeoTool-PlotPageBuilder.$(OBJEXT) \
+	bin_GeoTool-PmContext.$(OBJEXT) \
+	bin_GeoTool-PmIndividualProjection.$(OBJEXT) \
+	bin_GeoTool-PmGeneralProjection.$(OBJEXT) \
+	bin_GeoTool-PmProjection.$(OBJEXT) \
+	bin_GeoTool-Preferences.$(OBJEXT) \
+	bin_GeoTool-Presentable.$(OBJEXT) bin_GeoTool-Root.$(OBJEXT) \
+	bin_GeoTool-SatelliteProjection.$(OBJEXT) \
+	bin_GeoTool-SimpleDecoder.$(OBJEXT) \
+	bin_GeoTool-SkipAction.$(OBJEXT) bin_GeoTool-SubPage.$(OBJEXT) \
+	bin_GeoTool-SuperPage.$(OBJEXT) bin_GeoTool-Task.$(OBJEXT) \
+	bin_GeoTool-VertProfView.$(OBJEXT) \
+	bin_GeoTool-XDevice.$(OBJEXT) bin_GeoTool-XSectView.$(OBJEXT) \
+	bin_GeoTool-ZoomStacks.$(OBJEXT) \
+	bin_GeoTool-GenAppService.$(OBJEXT)
+am__objects_2 = bin_GeoTool-MvQCursorData.$(OBJEXT) \
+	bin_GeoTool-MvQCursorDataWidget.$(OBJEXT) \
+	bin_GeoTool-MvQContentsModel.$(OBJEXT) \
+	bin_GeoTool-MvQContentsWidget.$(OBJEXT) \
+	bin_GeoTool-MvQDataWidget.$(OBJEXT) \
+	bin_GeoTool-MvQLayerContentsIcon.$(OBJEXT) \
+	bin_GeoTool-MvQLayerDataWidget.$(OBJEXT) \
+	bin_GeoTool-MvQLayerMetaDataWidget.$(OBJEXT) \
+	bin_GeoTool-MvQLayerModel.$(OBJEXT) \
+	bin_GeoTool-MvQLayerWidget.$(OBJEXT) \
+	bin_GeoTool-MvQMagnifier.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMark.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkDialog.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkMimeData.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkWidget.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkModel.$(OBJEXT) \
+	bin_GeoTool-MvQPlotView.$(OBJEXT) \
+	bin_GeoTool-MvQPointSelection.$(OBJEXT) \
+	bin_GeoTool-MvQProgressItem.$(OBJEXT) \
+	bin_GeoTool-MvQStepModel.$(OBJEXT) \
+	bin_GeoTool-MvQStepWidget.$(OBJEXT) \
+	bin_GeoTool-MvQZoom.$(OBJEXT) \
+	bin_GeoTool-MvQAreaSelection.$(OBJEXT) \
+	bin_GeoTool-MvQLineSelection.$(OBJEXT) \
+	bin_GeoTool-MvQZoomStackWidget.$(OBJEXT)
+am__objects_3 = bin_GeoTool-ExportDialog.$(OBJEXT) \
+	bin_GeoTool-MagPlusInteractiveService.$(OBJEXT) \
+	bin_GeoTool-PlotModInteractive.$(OBJEXT) \
+	bin_GeoTool-uPlotBase.$(OBJEXT)
+am_bin_GeoTool_OBJECTS = bin_GeoTool-MvMainGeoTool.$(OBJEXT) \
+	$(am__objects_1) $(am__objects_2) $(am__objects_3) \
+	bin_GeoTool-GeoTool.$(OBJEXT) bin_GeoTool-uPlotApp.$(OBJEXT)
+am__objects_4 = bin_GeoTool-MvQContentsWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQCursorData.moc.$(OBJEXT) \
+	bin_GeoTool-MvQCursorDataWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQDataWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQLayerModel.moc.$(OBJEXT) \
+	bin_GeoTool-MvQLayerWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQLayerDataWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQLayerMetaDataWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQMagnifier.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMark.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkDialog.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkMimeData.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPlaceMarkModel.moc.$(OBJEXT) \
+	bin_GeoTool-MvQStepModel.moc.$(OBJEXT) \
+	bin_GeoTool-MvQStepWidget.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPlotView.moc.$(OBJEXT) \
+	bin_GeoTool-MvQPointSelection.moc.$(OBJEXT) \
+	bin_GeoTool-MvQZoom.moc.$(OBJEXT) \
+	bin_GeoTool-MvQAreaSelection.moc.$(OBJEXT) \
+	bin_GeoTool-MvQLineSelection.moc.$(OBJEXT) \
+	bin_GeoTool-MvQZoomStackWidget.moc.$(OBJEXT)
+am__objects_5 = bin_GeoTool-ExportDialog.moc.$(OBJEXT) \
+	bin_GeoTool-uPlotBase.moc.$(OBJEXT) \
+	bin_GeoTool-uPlot.qrc.$(OBJEXT)
+nodist_bin_GeoTool_OBJECTS = $(am__objects_4) $(am__objects_5) \
+	bin_GeoTool-GeoTool.moc.$(OBJEXT) \
+	bin_GeoTool-geoSelect.qrc.$(OBJEXT)
+bin_GeoTool_OBJECTS = $(am_bin_GeoTool_OBJECTS) \
+	$(nodist_bin_GeoTool_OBJECTS)
+am__DEPENDENCIES_1 =
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+bin_GeoTool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_GeoTool_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+am_bin_GeoToolManager_OBJECTS =  \
+	bin_GeoToolManager-GeoToolManager.$(OBJEXT)
+bin_GeoToolManager_OBJECTS = $(am_bin_GeoToolManager_OBJECTS)
+bin_GeoToolManager_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+bin_GeoToolManager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_GeoToolManager_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__objects_6 = bin_uPlot-AverageView.$(OBJEXT) \
+	bin_uPlot-BufrDecoder.$(OBJEXT) bin_uPlot-Canvas.$(OBJEXT) \
+	bin_uPlot-CartesianView.$(OBJEXT) \
+	bin_uPlot-CommonXSectView.$(OBJEXT) \
+	bin_uPlot-CreateAction.$(OBJEXT) \
+	bin_uPlot-CreateTypeAction.$(OBJEXT) \
+	bin_uPlot-DataBuilder.$(OBJEXT) bin_uPlot-DataObject.$(OBJEXT) \
+	bin_uPlot-Decoder.$(OBJEXT) bin_uPlot-Device.$(OBJEXT) \
+	bin_uPlot-DrawingPriority.$(OBJEXT) \
+	bin_uPlot-DropAction.$(OBJEXT) \
+	bin_uPlot-GeopointsDecoder.$(OBJEXT) \
+	bin_uPlot-GraphicsEngine.$(OBJEXT) \
+	bin_uPlot-GribDecoder.$(OBJEXT) bin_uPlot-Location.$(OBJEXT) \
+	bin_uPlot-MvLayer.$(OBJEXT) bin_uPlot-MacroConverter.$(OBJEXT) \
+	bin_uPlot-MacroVisitor.$(OBJEXT) \
+	bin_uPlot-MagicsGraphicsEngine.$(OBJEXT) \
+	bin_uPlot-MagicsTranslator.$(OBJEXT) \
+	bin_uPlot-MagPlusService.$(OBJEXT) bin_uPlot-MapView.$(OBJEXT) \
+	bin_uPlot-MatchingCriteria.$(OBJEXT) \
+	bin_uPlot-MatchingInfo.$(OBJEXT) bin_uPlot-MvIcon.$(OBJEXT) \
+	bin_uPlot-MvIconDataBase.$(OBJEXT) \
+	bin_uPlot-NewpageAction.$(OBJEXT) \
+	bin_uPlot-ObjectInfo.$(OBJEXT) bin_uPlot-ObjectList.$(OBJEXT) \
+	bin_uPlot-OutputFormatAction.$(OBJEXT) \
+	bin_uPlot-Page.$(OBJEXT) bin_uPlot-PlotAction.$(OBJEXT) \
+	bin_uPlot-PlotMod.$(OBJEXT) bin_uPlot-PlotModAction.$(OBJEXT) \
+	bin_uPlot-PlotModBuilder.$(OBJEXT) \
+	bin_uPlot-PlotModService.$(OBJEXT) \
+	bin_uPlot-PlotModTask.$(OBJEXT) \
+	bin_uPlot-PlotModView.$(OBJEXT) \
+	bin_uPlot-PlotPageBuilder.$(OBJEXT) \
+	bin_uPlot-PmContext.$(OBJEXT) \
+	bin_uPlot-PmIndividualProjection.$(OBJEXT) \
+	bin_uPlot-PmGeneralProjection.$(OBJEXT) \
+	bin_uPlot-PmProjection.$(OBJEXT) \
+	bin_uPlot-Preferences.$(OBJEXT) \
+	bin_uPlot-Presentable.$(OBJEXT) bin_uPlot-Root.$(OBJEXT) \
+	bin_uPlot-SatelliteProjection.$(OBJEXT) \
+	bin_uPlot-SimpleDecoder.$(OBJEXT) \
+	bin_uPlot-SkipAction.$(OBJEXT) bin_uPlot-SubPage.$(OBJEXT) \
+	bin_uPlot-SuperPage.$(OBJEXT) bin_uPlot-Task.$(OBJEXT) \
+	bin_uPlot-VertProfView.$(OBJEXT) bin_uPlot-XDevice.$(OBJEXT) \
+	bin_uPlot-XSectView.$(OBJEXT) bin_uPlot-ZoomStacks.$(OBJEXT) \
+	bin_uPlot-GenAppService.$(OBJEXT)
+am__objects_7 = bin_uPlot-MvQCursorData.$(OBJEXT) \
+	bin_uPlot-MvQCursorDataWidget.$(OBJEXT) \
+	bin_uPlot-MvQContentsModel.$(OBJEXT) \
+	bin_uPlot-MvQContentsWidget.$(OBJEXT) \
+	bin_uPlot-MvQDataWidget.$(OBJEXT) \
+	bin_uPlot-MvQLayerContentsIcon.$(OBJEXT) \
+	bin_uPlot-MvQLayerDataWidget.$(OBJEXT) \
+	bin_uPlot-MvQLayerMetaDataWidget.$(OBJEXT) \
+	bin_uPlot-MvQLayerModel.$(OBJEXT) \
+	bin_uPlot-MvQLayerWidget.$(OBJEXT) \
+	bin_uPlot-MvQMagnifier.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMark.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkDialog.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkMimeData.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkWidget.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkModel.$(OBJEXT) \
+	bin_uPlot-MvQPlotView.$(OBJEXT) \
+	bin_uPlot-MvQPointSelection.$(OBJEXT) \
+	bin_uPlot-MvQProgressItem.$(OBJEXT) \
+	bin_uPlot-MvQStepModel.$(OBJEXT) \
+	bin_uPlot-MvQStepWidget.$(OBJEXT) bin_uPlot-MvQZoom.$(OBJEXT) \
+	bin_uPlot-MvQAreaSelection.$(OBJEXT) \
+	bin_uPlot-MvQLineSelection.$(OBJEXT) \
+	bin_uPlot-MvQZoomStackWidget.$(OBJEXT)
+am__objects_8 = bin_uPlot-ExportDialog.$(OBJEXT) \
+	bin_uPlot-MagPlusInteractiveService.$(OBJEXT) \
+	bin_uPlot-PlotModInteractive.$(OBJEXT) \
+	bin_uPlot-uPlotBase.$(OBJEXT)
+am_bin_uPlot_OBJECTS = bin_uPlot-MvMain.$(OBJEXT) $(am__objects_6) \
+	$(am__objects_7) $(am__objects_8) bin_uPlot-uPlot.$(OBJEXT) \
+	bin_uPlot-uPlotApp.$(OBJEXT)
+am__objects_9 = bin_uPlot-MvQContentsWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQCursorData.moc.$(OBJEXT) \
+	bin_uPlot-MvQCursorDataWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQDataWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQLayerModel.moc.$(OBJEXT) \
+	bin_uPlot-MvQLayerWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQLayerDataWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQLayerMetaDataWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQMagnifier.moc.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMark.moc.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkDialog.moc.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkMimeData.moc.$(OBJEXT) \
+	bin_uPlot-MvQPlaceMarkModel.moc.$(OBJEXT) \
+	bin_uPlot-MvQStepModel.moc.$(OBJEXT) \
+	bin_uPlot-MvQStepWidget.moc.$(OBJEXT) \
+	bin_uPlot-MvQPlotView.moc.$(OBJEXT) \
+	bin_uPlot-MvQPointSelection.moc.$(OBJEXT) \
+	bin_uPlot-MvQZoom.moc.$(OBJEXT) \
+	bin_uPlot-MvQAreaSelection.moc.$(OBJEXT) \
+	bin_uPlot-MvQLineSelection.moc.$(OBJEXT) \
+	bin_uPlot-MvQZoomStackWidget.moc.$(OBJEXT)
+am__objects_10 = bin_uPlot-ExportDialog.moc.$(OBJEXT) \
+	bin_uPlot-uPlotBase.moc.$(OBJEXT) \
+	bin_uPlot-uPlot.qrc.$(OBJEXT)
+nodist_bin_uPlot_OBJECTS = $(am__objects_9) $(am__objects_10) \
+	bin_uPlot-uPlot.moc.$(OBJEXT)
+bin_uPlot_OBJECTS = $(am_bin_uPlot_OBJECTS) \
+	$(nodist_bin_uPlot_OBJECTS)
+bin_uPlot_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(bin_uPlot_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_11 = bin_uPlotBatch-AverageView.$(OBJEXT) \
+	bin_uPlotBatch-BufrDecoder.$(OBJEXT) \
+	bin_uPlotBatch-Canvas.$(OBJEXT) \
+	bin_uPlotBatch-CartesianView.$(OBJEXT) \
+	bin_uPlotBatch-CommonXSectView.$(OBJEXT) \
+	bin_uPlotBatch-CreateAction.$(OBJEXT) \
+	bin_uPlotBatch-CreateTypeAction.$(OBJEXT) \
+	bin_uPlotBatch-DataBuilder.$(OBJEXT) \
+	bin_uPlotBatch-DataObject.$(OBJEXT) \
+	bin_uPlotBatch-Decoder.$(OBJEXT) \
+	bin_uPlotBatch-Device.$(OBJEXT) \
+	bin_uPlotBatch-DrawingPriority.$(OBJEXT) \
+	bin_uPlotBatch-DropAction.$(OBJEXT) \
+	bin_uPlotBatch-GeopointsDecoder.$(OBJEXT) \
+	bin_uPlotBatch-GraphicsEngine.$(OBJEXT) \
+	bin_uPlotBatch-GribDecoder.$(OBJEXT) \
+	bin_uPlotBatch-Location.$(OBJEXT) \
+	bin_uPlotBatch-MvLayer.$(OBJEXT) \
+	bin_uPlotBatch-MacroConverter.$(OBJEXT) \
+	bin_uPlotBatch-MacroVisitor.$(OBJEXT) \
+	bin_uPlotBatch-MagicsGraphicsEngine.$(OBJEXT) \
+	bin_uPlotBatch-MagicsTranslator.$(OBJEXT) \
+	bin_uPlotBatch-MagPlusService.$(OBJEXT) \
+	bin_uPlotBatch-MapView.$(OBJEXT) \
+	bin_uPlotBatch-MatchingCriteria.$(OBJEXT) \
+	bin_uPlotBatch-MatchingInfo.$(OBJEXT) \
+	bin_uPlotBatch-MvIcon.$(OBJEXT) \
+	bin_uPlotBatch-MvIconDataBase.$(OBJEXT) \
+	bin_uPlotBatch-NewpageAction.$(OBJEXT) \
+	bin_uPlotBatch-ObjectInfo.$(OBJEXT) \
+	bin_uPlotBatch-ObjectList.$(OBJEXT) \
+	bin_uPlotBatch-OutputFormatAction.$(OBJEXT) \
+	bin_uPlotBatch-Page.$(OBJEXT) \
+	bin_uPlotBatch-PlotAction.$(OBJEXT) \
+	bin_uPlotBatch-PlotMod.$(OBJEXT) \
+	bin_uPlotBatch-PlotModAction.$(OBJEXT) \
+	bin_uPlotBatch-PlotModBuilder.$(OBJEXT) \
+	bin_uPlotBatch-PlotModService.$(OBJEXT) \
+	bin_uPlotBatch-PlotModTask.$(OBJEXT) \
+	bin_uPlotBatch-PlotModView.$(OBJEXT) \
+	bin_uPlotBatch-PlotPageBuilder.$(OBJEXT) \
+	bin_uPlotBatch-PmContext.$(OBJEXT) \
+	bin_uPlotBatch-PmIndividualProjection.$(OBJEXT) \
+	bin_uPlotBatch-PmGeneralProjection.$(OBJEXT) \
+	bin_uPlotBatch-PmProjection.$(OBJEXT) \
+	bin_uPlotBatch-Preferences.$(OBJEXT) \
+	bin_uPlotBatch-Presentable.$(OBJEXT) \
+	bin_uPlotBatch-Root.$(OBJEXT) \
+	bin_uPlotBatch-SatelliteProjection.$(OBJEXT) \
+	bin_uPlotBatch-SimpleDecoder.$(OBJEXT) \
+	bin_uPlotBatch-SkipAction.$(OBJEXT) \
+	bin_uPlotBatch-SubPage.$(OBJEXT) \
+	bin_uPlotBatch-SuperPage.$(OBJEXT) \
+	bin_uPlotBatch-Task.$(OBJEXT) \
+	bin_uPlotBatch-VertProfView.$(OBJEXT) \
+	bin_uPlotBatch-XDevice.$(OBJEXT) \
+	bin_uPlotBatch-XSectView.$(OBJEXT) \
+	bin_uPlotBatch-ZoomStacks.$(OBJEXT) \
+	bin_uPlotBatch-GenAppService.$(OBJEXT)
+am_bin_uPlotBatch_OBJECTS = bin_uPlotBatch-MvMainuPlotBatch.$(OBJEXT) \
+	$(am__objects_11) bin_uPlotBatch-MagPlusBatchService.$(OBJEXT) \
+	bin_uPlotBatch-PlotModBatch.$(OBJEXT) \
+	bin_uPlotBatch-uPlotBatchApp.$(OBJEXT)
+bin_uPlotBatch_OBJECTS = $(am_bin_uPlotBatch_OBJECTS)
+bin_uPlotBatch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_uPlotBatch_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_bin_uPlotManager_OBJECTS = bin_uPlotManager-uPlotManager.$(OBJEXT) \
+	bin_uPlotManager-uPlotService.$(OBJEXT)
+bin_uPlotManager_OBJECTS = $(am_bin_uPlotManager_OBJECTS)
+bin_uPlotManager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(bin_uPlotManager_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(bin_GeoTool_SOURCES) $(nodist_bin_GeoTool_SOURCES) \
+	$(bin_GeoToolManager_SOURCES) $(bin_uPlot_SOURCES) \
+	$(nodist_bin_uPlot_SOURCES) $(bin_uPlotBatch_SOURCES) \
+	$(bin_uPlotManager_SOURCES)
+DIST_SOURCES = $(bin_GeoTool_SOURCES) $(bin_GeoToolManager_SOURCES) \
+	$(bin_uPlot_SOURCES) $(bin_uPlotBatch_SOURCES) \
+	$(bin_uPlotManager_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(share_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# See autotroll.m4 :)
+SUFFIXES = .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp \
+			.ui .ui.h .ui.hh .ui.hpp \
+			.qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C
+
+DISTCLEANFILES = $(BUILT_SOURCES)
+
+#-------- uPLOT COMMON SOURCES--------------------------------------------------
+uPlot_COMMON_SOURCES = AverageView.cc BufrDecoder.cc \
+	   Canvas.cc CartesianView.cc CommonXSectView.cc \
+           CreateAction.cc CreateTypeAction.cc \
+	   DataBuilder.cc DataObject.cc Decoder.cc Device.cc \
+	   DrawingPriority.cc DropAction.cc \
+	   GeopointsDecoder.cc GraphicsEngine.cc GribDecoder.cc Location.cc \
+	   MvLayer.cc MacroConverter.cc MacroVisitor.cc \
+	   MagicsGraphicsEngine.cc MagicsTranslator.cc \
+	   MagPlusService.cc MapView.cc MatchingCriteria.cc MatchingInfo.cc \
+	   MvIcon.cc MvIconDataBase.cc \
+           NewpageAction.cc \
+	   ObjectInfo.cc ObjectList.cc OutputFormatAction.cc \
+	   Page.cc PlotAction.cc PlotMod.cc PlotModAction.cc PlotModBuilder.cc \
+	   PlotModService.cc PlotModTask.cc PlotModView.cc PlotPageBuilder.cc \
+	   PmContext.cc PmIndividualProjection.cc PmGeneralProjection.cc PmProjection.cc \
+	   Preferences.cc Presentable.cc \
+	   Root.cc \
+	   SatelliteProjection.cc SimpleDecoder.cc SkipAction.cc SubPage.cc SuperPage.cc \
+	   Task.cc VertProfView.cc XDevice.cc XSectView.cc ZoomStacks.cc \
+	   AverageView.h BufrDecoder.h \
+	   Canvas.h CartesianView.h CommonXSectView.h \
+           Counted.h CreateAction.h CreateTypeAction.h \
+	   DataBuilder.h DataObject.h Decoder.h Device.h \
+	   DeviceData.h DrawingPriority.h DropAction.h \
+	   GeopointsDecoder.h GraphicsEngine.h GribDecoder.h Location.h \
+           MvLayer.h MacroConverter.h MacroVisitor.h \
+	   MagPlusService.h MagicsGraphicsEngine.h MagicsTranslator.h MapView.h \
+	   MatchingCriteria.h MatchingInfo.h MvIcon.h MvIconDataBase.h \
+	   ObjectInfo.h ObjectList.h OutputFormatAction.h \
+           NewpageAction.h Page.h PaperSize.h PlotAction.h \
+	   PlotMod.h PlotModAction.h PlotModBuilder.h PlotModConst.h PlotModService.h \
+	   PlotModTask.h PlotModView.h PlotPageBuilder.h \
+	   PmContext.h PmGeneralProjection.h PmIndividualProjection.h PmProjection.h \
+	   Preferences.h Presentable.h Root.h \
+	   SatelliteProjection.h SimpleDecoder.h SkipAction.h SubPage.h SuperPage.h \
+	   Task.h VertProfView.h Visitor.h XDevice.h XSectView.h ZoomStacks.h \
+	   GenAppService.cc GenAppService.hpp MvCallback.hpp
+
+uPlot_COMMON_QT_SOURCES = MvQCursorData.cc \
+	   MvQCursorDataWidget.cc \
+	   MvQContentsModel.cc \
+           MvQContentsWidget.cc \
+	   MvQDataWidget.cc \
+	   MvQLayerContentsIcon.cc \
+           MvQLayerDataWidget.cc \
+	   MvQLayerMetaDataWidget.cc \
+	   MvQLayerModel.cc \
+	   MvQLayerWidget.cc \
+	   MvQMagnifier.cc \
+	   MvQPlaceMark.cc \
+	   MvQPlaceMarkDialog.cc \
+	   MvQPlaceMarkMimeData.cc \
+	   MvQPlaceMarkWidget.cc \
+	   MvQPlaceMarkModel.cc \
+	   MvQPlotView.cc  \
+	   MvQPointSelection.cc  \
+	   MvQProgressItem.cc \
+	   MvQStepModel.cc \
+	   MvQStepWidget.cc \
+	   MvQZoom.cc \
+	   MvQAreaSelection.cc \
+	   MvQLineSelection.cc \
+	   MvQZoomStackWidget.cc \
+	   MvQAreaSelection.h MvQLineSelection.h \
+	   MvQCursorData.h MvQCursorDataWidget.h \
+	   MvQContentsModel.h  MvQContentsWidget.h MvQLayerContentsIcon.h MvQLayerDataWidget.h \
+	   MvQLayerWidget.h MvQDataWidget.h MvQLayerMetaDataWidget.h  MvQLayerModel.h MvQMagnifier.h \
+	   MvQPlaceMark.h MvQPlaceMarkDialog.h MvQPlaceMarkModel.h MvQPlaceMarkWidget.h \
+	   MvQPlaceMarkMimeData.h \
+	   MvQPlotItem.h MvQPlotView.h MvQPointSelection.h MvQProgressItem.h \
+	   MvQPushButton.h \
+	   MvQStepModel.h \
+	   MvQStepWidget.h MvQZoom.h MvQZoomStackWidget.h
+
+uPlot_COMMON_QT_SOURCES_nodist = MvQContentsWidget.moc.cpp MvQCursorData.moc.cpp  MvQCursorDataWidget.moc.cpp \
+				 MvQDataWidget.moc.cpp \
+                                 MvQLayerModel.moc.cpp MvQLayerWidget.moc.cpp \
+                                 MvQLayerDataWidget.moc.cpp MvQLayerMetaDataWidget.moc.cpp \
+				 MvQMagnifier.moc.cpp \
+                                 MvQPlaceMark.moc.cpp MvQPlaceMarkDialog.moc.cpp MvQPlaceMarkWidget.moc.cpp \
+                                 MvQPlaceMarkMimeData.moc.cpp MvQPlaceMarkModel.moc.cpp \
+				 MvQStepModel.moc.cpp \
+ 				 MvQStepWidget.moc.cpp \
+                                 MvQPlotView.moc.cpp MvQPointSelection.moc.cpp \
+				 MvQZoom.moc.cpp MvQAreaSelection.moc.cpp MvQLineSelection.moc.cpp \
+				 MvQZoomStackWidget.moc.cpp
+
+uPlot_COMMON_UI_SOURCES = ExportDialog.cc  \
+	   MagPlusInteractiveService.cc PlotModInteractive.cc \
+	   uPlotBase.cc  \
+	   ExportDialog.h MagPlusInteractiveService.h PlotModInteractive.h \
+	   uPlotBase.h \
+	   uPlot.qrc
+
+uPlot_COMMON_UI_SOURCES_nodist = ExportDialog.moc.cpp uPlotBase.moc.cpp uPlot.qrc.cpp
+
+#-------- uPLOT ------------------------------------------------------------------
+bin_uPlot_SOURCES = MvMain.cc \
+	   ${uPlot_COMMON_SOURCES} \
+	   ${uPlot_COMMON_QT_SOURCES} \
+	   ${uPlot_COMMON_UI_SOURCES} \
+ 	   uPlot.cc uPlotApp.cc \
+	   uPlot.h uPlotApp.h
+
+nodist_bin_uPlot_SOURCES = ${uPlot_COMMON_QT_SOURCES_nodist} ${uPlot_COMMON_UI_SOURCES_nodist} \
+                           uPlot.moc.cpp
+
+bin_uPlot_CPPFLAGS = -I../libMvQtGui -I../libMvQtUtil $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+bin_uPlot_LDFLAGS = $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_uPlot_LDADD = $(LDADD)  $(MAGPLUS_LIB) -lMvQtGui -lMvQtUtil $(STANDARD_METVIEW_LIBS)  $(ODB_LIBS) $(FLIBS) $(QT_LIBS)
+bin_uPlot_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+AM_LDFLAGS = $(QT_LDFLAGS)
+# AM_LDFLAGS is placed before $(LDFLAGS) when linking
+bin_uPlotManager_SOURCES = uPlotManager.cc uPlotService.cc uPlotManager.hpp uPlotService.hpp
+bin_uPlotManager_CPPFLAGS = $(AM_CPPFLAGS)
+bin_uPlotManager_LDFLAGS = -L../../lib $(LDFLAGS) $(ODB_LDFLAGS)
+bin_uPlotManager_LDADD = $(LDADD) $(STANDARD_METVIEW_LIBS) $(FLIBS) $(ODB_LIBS)
+bin_uPlotManager_DEPENDENCIES = ../../lib/libUtil.a
+
+#-------- uPLOT Batch-----------------------------------------------------------------
+bin_uPlotBatch_SOURCES = MvMainuPlotBatch.cc \
+	   ${uPlot_COMMON_SOURCES} \
+	   MagPlusBatchService.cc PlotModBatch.cc uPlotBatchApp.cc \
+	   MagPlusBatchService.h PlotModBatch.h uPlotBatchApp.h
+
+
+# we add the QT flags tothe compilation directives here because although this module should have
+# no dependencies on Qt, it still uses Magics++, and if that has been built with Qt support, then
+# we will need the flags in order to have a correct compilation. If Magics++ has been built without
+# Qt, then these flags should be empty, so no harm done.
+bin_uPlotBatch_CPPFLAGS = $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS) -DNOMETVIEW_QT
+bin_uPlotBatch_LDFLAGS = $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_uPlotBatch_LDADD = $(LDADD)  $(MAGPLUS_LIB) $(STANDARD_METVIEW_LIBS) $(ODB_LIBS) $(FLIBS) $(QT_LIBS)
+bin_uPlotBatch_DEPENDENCIES = ../../lib/libUtil.a ../../lib/libMetview.a
+
+#-------- GeoTool ---------------------------------------------------------------
+bin_GeoTool_SOURCES = MvMainGeoTool.cc \
+	   ${uPlot_COMMON_SOURCES} \
+	   ${uPlot_COMMON_QT_SOURCES} \
+	   ${uPlot_COMMON_UI_SOURCES} \
+	   GeoTool.cc GeoTool.h \
+	   uPlotApp.cc uPlotApp.h \
+	   geoSelect.qrc
+
+nodist_bin_GeoTool_SOURCES = ${uPlot_COMMON_QT_SOURCES_nodist} ${uPlot_COMMON_UI_SOURCES_nodist} \
+                             GeoTool.moc.cpp geoSelect.qrc.cpp
+
+bin_GeoTool_CPPFLAGS = -I../libMvQtGui -I../libMvQtUtil  $(MAGPLUS_CPPFLAGS) $(QT_CPPFLAGS) $(AM_CPPFLAGS)
+bin_GeoTool_LDFLAGS = $(QT_LDFLAGS) -L../../lib $(MAGPLUS_LDFLAGS) $(QT_LDFLAGS) $(LDFLAGS) $(ODB_LDFLAGS)
+bin_GeoTool_LDADD = $(LDADD)  $(MAGPLUS_LIB) -lMvQtGui -lMvQtUtil $(STANDARD_METVIEW_LIBS) $(ODB_LIBS) $(FLIBS) $(QT_LIBS)
+bin_GeoTool_DEPENDENCIES = ../../lib/libMvQtGui.a ../../lib/libMvQtUtil.a ../../lib/libUtil.a ../../lib/libMetview.a
+bin_GeoToolManager_SOURCES = GeoToolManager.cc GeoToolManager.h
+bin_GeoToolManager_CPPFLAGS = $(AM_CPPFLAGS)
+bin_GeoToolManager_LDFLAGS = -L../../lib $(LDFLAGS)
+bin_GeoToolManager_LDADD = $(LDADD) $(STANDARD_METVIEW_LIBS) $(FLIBS) -lUtil
+
+#-------- Built sources------------------------------------------------------------
+BUILT_SOURCES = bin $(am__append_2)
+
+#-------- share ------------------------------------------------------------
+sharedir = $(datadir)/metview/etc
+local_sharedir = ../../share/metview/etc
+share_DATA = $(local_sharedir)/ObjectSpec.OutputFormats
+EXTRA_DIST = uPlot.qrc ObjectSpec.OutputFormats \
+	     geoSelect.qrc layerInfo.css
+
+CLEANFILES = $(share_DATA) 
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .moc.cpp .moc.cc .moc.cxx .moc.C .h .hh .hpp .ui .ui.h .ui.hh .ui.hpp .qrc .qrc.cpp .qrc.cc .qrc.cxx .qrc.C .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/aux_build/autotroll.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/uPlot/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/uPlot/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+bin/$(am__dirstamp):
+	@$(MKDIR_P) bin
+	@: > bin/$(am__dirstamp)
+bin/GeoTool$(EXEEXT): $(bin_GeoTool_OBJECTS) $(bin_GeoTool_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/GeoTool$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_GeoTool_LINK) $(bin_GeoTool_OBJECTS) $(bin_GeoTool_LDADD) $(LIBS)
+bin/GeoToolManager$(EXEEXT): $(bin_GeoToolManager_OBJECTS) $(bin_GeoToolManager_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/GeoToolManager$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_GeoToolManager_LINK) $(bin_GeoToolManager_OBJECTS) $(bin_GeoToolManager_LDADD) $(LIBS)
+bin/uPlot$(EXEEXT): $(bin_uPlot_OBJECTS) $(bin_uPlot_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/uPlot$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_uPlot_LINK) $(bin_uPlot_OBJECTS) $(bin_uPlot_LDADD) $(LIBS)
+bin/uPlotBatch$(EXEEXT): $(bin_uPlotBatch_OBJECTS) $(bin_uPlotBatch_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/uPlotBatch$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_uPlotBatch_LINK) $(bin_uPlotBatch_OBJECTS) $(bin_uPlotBatch_LDADD) $(LIBS)
+bin/uPlotManager$(EXEEXT): $(bin_uPlotManager_OBJECTS) $(bin_uPlotManager_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/uPlotManager$(EXEEXT)
+	$(AM_V_CXXLD)$(bin_uPlotManager_LINK) $(bin_uPlotManager_OBJECTS) $(bin_uPlotManager_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-AverageView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-BufrDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Canvas.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-CartesianView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-CommonXSectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-CreateAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-CreateTypeAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-DataBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-DataObject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Decoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Device.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-DrawingPriority.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-DropAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-ExportDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-ExportDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-GenAppService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-GeoTool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-GeoTool.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-GeopointsDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-GraphicsEngine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-GribDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Location.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MacroConverter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MacroVisitor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MagPlusService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MagicsTranslator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MapView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MatchingCriteria.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MatchingInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvIcon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvIconDataBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvLayer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvMainGeoTool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQAreaSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQContentsModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQContentsWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQCursorData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLineSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQMagnifier.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMark.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlotView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPointSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQProgressItem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQStepModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQStepWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQZoom.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQZoom.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-NewpageAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-ObjectInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-ObjectList.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-OutputFormatAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Page.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotMod.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotModAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotModBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotModInteractive.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotModService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotModTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotModView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PlotPageBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PmContext.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PmGeneralProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PmIndividualProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-PmProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Preferences.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Presentable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Root.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-SatelliteProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-SimpleDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-SkipAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-SubPage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-SuperPage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-Task.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-VertProfView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-XDevice.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-XSectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-ZoomStacks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-geoSelect.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-uPlot.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-uPlotApp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-uPlotBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoTool-uPlotBase.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_GeoToolManager-GeoToolManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-AverageView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-BufrDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Canvas.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-CartesianView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-CommonXSectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-CreateAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-CreateTypeAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-DataBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-DataObject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Decoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Device.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-DrawingPriority.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-DropAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-ExportDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-ExportDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-GenAppService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-GeopointsDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-GraphicsEngine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-GribDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Location.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MacroConverter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MacroVisitor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MagPlusService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MagicsTranslator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MapView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MatchingCriteria.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MatchingInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvIcon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvIconDataBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvLayer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvMain.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQAreaSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQContentsModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQContentsWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQCursorData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQCursorData.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLineSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQMagnifier.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMark.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlotView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPlotView.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPointSelection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQProgressItem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQStepModel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQStepModel.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQStepWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQZoom.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQZoom.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-NewpageAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-ObjectInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-ObjectList.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-OutputFormatAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Page.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotMod.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotModAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotModBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotModInteractive.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotModService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotModTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotModView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PlotPageBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PmContext.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PmGeneralProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PmIndividualProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-PmProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Preferences.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Presentable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Root.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-SatelliteProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-SimpleDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-SkipAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-SubPage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-SuperPage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-Task.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-VertProfView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-XDevice.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-XSectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-ZoomStacks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-uPlot.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-uPlot.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-uPlot.qrc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-uPlotApp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-uPlotBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlot-uPlotBase.moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-AverageView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-BufrDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Canvas.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-CartesianView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-CommonXSectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-CreateAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-DataBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-DataObject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Decoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Device.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-DrawingPriority.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-DropAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-GenAppService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-GribDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Location.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MacroConverter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MacroVisitor.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MagPlusService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MapView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MatchingInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MvIcon.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MvLayer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-NewpageAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-ObjectInfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-ObjectList.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Page.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotMod.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotModAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotModBatch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotModService.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotModTask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotModView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PmContext.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-PmProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Preferences.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Presentable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Root.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-SkipAction.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-SubPage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-SuperPage.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-Task.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-VertProfView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-XDevice.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-XSectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-ZoomStacks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotManager-uPlotManager.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bin_uPlotManager-uPlotService.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+bin_GeoTool-MvMainGeoTool.o: MvMainGeoTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvMainGeoTool.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvMainGeoTool.Tpo -c -o bin_GeoTool-MvMainGeoTool.o `test -f 'MvMainGeoTool.cc' || echo '$(srcdir)/'`MvMainGeoTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvMainGeoTool.Tpo $(DEPDIR)/bin_GeoTool-MvMainGeoTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMainGeoTool.cc' object='bin_GeoTool-MvMainGeoTool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvMainGeoTool.o `test -f 'MvMainGeoTool.cc' || echo '$(srcdir)/'`MvMainGeoTool.cc
+
+bin_GeoTool-MvMainGeoTool.obj: MvMainGeoTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvMainGeoTool.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvMainGeoTool.Tpo -c -o bin_GeoTool-MvMainGeoTool.obj `if test -f 'MvMainGeoTool.cc'; then $(CYGPATH_W) 'MvMainGeoTool.cc'; else $(CYGPATH_W) '$(srcdir)/MvMainGeoTool.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvMainGeoTool.Tpo $(DEPDIR)/bin_GeoTool-MvMainGeoTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMainGeoTool.cc' object='bin_GeoTool-MvMainGeoTool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvMainGeoTool.obj `if test -f 'MvMainGeoTool.cc'; then $(CYGPATH_W) 'MvMainGeoTool.cc'; else $(CYGPATH_W) '$(srcdir)/MvMainGeoTool.cc'; fi`
+
+bin_GeoTool-AverageView.o: AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-AverageView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-AverageView.Tpo -c -o bin_GeoTool-AverageView.o `test -f 'AverageView.cc' || echo '$(srcdir)/'`AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-AverageView.Tpo $(DEPDIR)/bin_GeoTool-AverageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='AverageView.cc' object='bin_GeoTool-AverageView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-AverageView.o `test -f 'AverageView.cc' || echo '$(srcdir)/'`AverageView.cc
+
+bin_GeoTool-AverageView.obj: AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-AverageView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-AverageView.Tpo -c -o bin_GeoTool-AverageView.obj `if test -f 'AverageView.cc'; then $(CYGPATH_W) 'AverageView.cc'; else $(CYGPATH_W) '$(srcdir)/AverageView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-AverageView.Tpo $(DEPDIR)/bin_GeoTool-AverageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='AverageView.cc' object='bin_GeoTool-AverageView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-AverageView.obj `if test -f 'AverageView.cc'; then $(CYGPATH_W) 'AverageView.cc'; else $(CYGPATH_W) '$(srcdir)/AverageView.cc'; fi`
+
+bin_GeoTool-BufrDecoder.o: BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-BufrDecoder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-BufrDecoder.Tpo -c -o bin_GeoTool-BufrDecoder.o `test -f 'BufrDecoder.cc' || echo '$(srcdir)/'`BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-BufrDecoder.Tpo $(DEPDIR)/bin_GeoTool-BufrDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrDecoder.cc' object='bin_GeoTool-BufrDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-BufrDecoder.o `test -f 'BufrDecoder.cc' || echo '$(srcdir)/'`BufrDecoder.cc
+
+bin_GeoTool-BufrDecoder.obj: BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-BufrDecoder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-BufrDecoder.Tpo -c -o bin_GeoTool-BufrDecoder.obj `if test -f 'BufrDecoder.cc'; then $(CYGPATH_W) 'BufrDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/BufrDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-BufrDecoder.Tpo $(DEPDIR)/bin_GeoTool-BufrDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrDecoder.cc' object='bin_GeoTool-BufrDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-BufrDecoder.obj `if test -f 'BufrDecoder.cc'; then $(CYGPATH_W) 'BufrDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/BufrDecoder.cc'; fi`
+
+bin_GeoTool-Canvas.o: Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Canvas.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Canvas.Tpo -c -o bin_GeoTool-Canvas.o `test -f 'Canvas.cc' || echo '$(srcdir)/'`Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Canvas.Tpo $(DEPDIR)/bin_GeoTool-Canvas.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Canvas.cc' object='bin_GeoTool-Canvas.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Canvas.o `test -f 'Canvas.cc' || echo '$(srcdir)/'`Canvas.cc
+
+bin_GeoTool-Canvas.obj: Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Canvas.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Canvas.Tpo -c -o bin_GeoTool-Canvas.obj `if test -f 'Canvas.cc'; then $(CYGPATH_W) 'Canvas.cc'; else $(CYGPATH_W) '$(srcdir)/Canvas.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Canvas.Tpo $(DEPDIR)/bin_GeoTool-Canvas.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Canvas.cc' object='bin_GeoTool-Canvas.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Canvas.obj `if test -f 'Canvas.cc'; then $(CYGPATH_W) 'Canvas.cc'; else $(CYGPATH_W) '$(srcdir)/Canvas.cc'; fi`
+
+bin_GeoTool-CartesianView.o: CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CartesianView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-CartesianView.Tpo -c -o bin_GeoTool-CartesianView.o `test -f 'CartesianView.cc' || echo '$(srcdir)/'`CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CartesianView.Tpo $(DEPDIR)/bin_GeoTool-CartesianView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CartesianView.cc' object='bin_GeoTool-CartesianView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CartesianView.o `test -f 'CartesianView.cc' || echo '$(srcdir)/'`CartesianView.cc
+
+bin_GeoTool-CartesianView.obj: CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CartesianView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-CartesianView.Tpo -c -o bin_GeoTool-CartesianView.obj `if test -f 'CartesianView.cc'; then $(CYGPATH_W) 'CartesianView.cc'; else $(CYGPATH_W) '$(srcdir)/CartesianView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CartesianView.Tpo $(DEPDIR)/bin_GeoTool-CartesianView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CartesianView.cc' object='bin_GeoTool-CartesianView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CartesianView.obj `if test -f 'CartesianView.cc'; then $(CYGPATH_W) 'CartesianView.cc'; else $(CYGPATH_W) '$(srcdir)/CartesianView.cc'; fi`
+
+bin_GeoTool-CommonXSectView.o: CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CommonXSectView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-CommonXSectView.Tpo -c -o bin_GeoTool-CommonXSectView.o `test -f 'CommonXSectView.cc' || echo '$(srcdir)/'`CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CommonXSectView.Tpo $(DEPDIR)/bin_GeoTool-CommonXSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CommonXSectView.cc' object='bin_GeoTool-CommonXSectView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CommonXSectView.o `test -f 'CommonXSectView.cc' || echo '$(srcdir)/'`CommonXSectView.cc
+
+bin_GeoTool-CommonXSectView.obj: CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CommonXSectView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-CommonXSectView.Tpo -c -o bin_GeoTool-CommonXSectView.obj `if test -f 'CommonXSectView.cc'; then $(CYGPATH_W) 'CommonXSectView.cc'; else $(CYGPATH_W) '$(srcdir)/CommonXSectView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CommonXSectView.Tpo $(DEPDIR)/bin_GeoTool-CommonXSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CommonXSectView.cc' object='bin_GeoTool-CommonXSectView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CommonXSectView.obj `if test -f 'CommonXSectView.cc'; then $(CYGPATH_W) 'CommonXSectView.cc'; else $(CYGPATH_W) '$(srcdir)/CommonXSectView.cc'; fi`
+
+bin_GeoTool-CreateAction.o: CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CreateAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-CreateAction.Tpo -c -o bin_GeoTool-CreateAction.o `test -f 'CreateAction.cc' || echo '$(srcdir)/'`CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CreateAction.Tpo $(DEPDIR)/bin_GeoTool-CreateAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateAction.cc' object='bin_GeoTool-CreateAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CreateAction.o `test -f 'CreateAction.cc' || echo '$(srcdir)/'`CreateAction.cc
+
+bin_GeoTool-CreateAction.obj: CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CreateAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-CreateAction.Tpo -c -o bin_GeoTool-CreateAction.obj `if test -f 'CreateAction.cc'; then $(CYGPATH_W) 'CreateAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CreateAction.Tpo $(DEPDIR)/bin_GeoTool-CreateAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateAction.cc' object='bin_GeoTool-CreateAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CreateAction.obj `if test -f 'CreateAction.cc'; then $(CYGPATH_W) 'CreateAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateAction.cc'; fi`
+
+bin_GeoTool-CreateTypeAction.o: CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CreateTypeAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-CreateTypeAction.Tpo -c -o bin_GeoTool-CreateTypeAction.o `test -f 'CreateTypeAction.cc' || echo '$(srcdir)/'`CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CreateTypeAction.Tpo $(DEPDIR)/bin_GeoTool-CreateTypeAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateTypeAction.cc' object='bin_GeoTool-CreateTypeAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CreateTypeAction.o `test -f 'CreateTypeAction.cc' || echo '$(srcdir)/'`CreateTypeAction.cc
+
+bin_GeoTool-CreateTypeAction.obj: CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-CreateTypeAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-CreateTypeAction.Tpo -c -o bin_GeoTool-CreateTypeAction.obj `if test -f 'CreateTypeAction.cc'; then $(CYGPATH_W) 'CreateTypeAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateTypeAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-CreateTypeAction.Tpo $(DEPDIR)/bin_GeoTool-CreateTypeAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateTypeAction.cc' object='bin_GeoTool-CreateTypeAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-CreateTypeAction.obj `if test -f 'CreateTypeAction.cc'; then $(CYGPATH_W) 'CreateTypeAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateTypeAction.cc'; fi`
+
+bin_GeoTool-DataBuilder.o: DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DataBuilder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-DataBuilder.Tpo -c -o bin_GeoTool-DataBuilder.o `test -f 'DataBuilder.cc' || echo '$(srcdir)/'`DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DataBuilder.Tpo $(DEPDIR)/bin_GeoTool-DataBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataBuilder.cc' object='bin_GeoTool-DataBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DataBuilder.o `test -f 'DataBuilder.cc' || echo '$(srcdir)/'`DataBuilder.cc
+
+bin_GeoTool-DataBuilder.obj: DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DataBuilder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-DataBuilder.Tpo -c -o bin_GeoTool-DataBuilder.obj `if test -f 'DataBuilder.cc'; then $(CYGPATH_W) 'DataBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/DataBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DataBuilder.Tpo $(DEPDIR)/bin_GeoTool-DataBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataBuilder.cc' object='bin_GeoTool-DataBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DataBuilder.obj `if test -f 'DataBuilder.cc'; then $(CYGPATH_W) 'DataBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/DataBuilder.cc'; fi`
+
+bin_GeoTool-DataObject.o: DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DataObject.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-DataObject.Tpo -c -o bin_GeoTool-DataObject.o `test -f 'DataObject.cc' || echo '$(srcdir)/'`DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DataObject.Tpo $(DEPDIR)/bin_GeoTool-DataObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataObject.cc' object='bin_GeoTool-DataObject.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DataObject.o `test -f 'DataObject.cc' || echo '$(srcdir)/'`DataObject.cc
+
+bin_GeoTool-DataObject.obj: DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DataObject.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-DataObject.Tpo -c -o bin_GeoTool-DataObject.obj `if test -f 'DataObject.cc'; then $(CYGPATH_W) 'DataObject.cc'; else $(CYGPATH_W) '$(srcdir)/DataObject.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DataObject.Tpo $(DEPDIR)/bin_GeoTool-DataObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataObject.cc' object='bin_GeoTool-DataObject.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DataObject.obj `if test -f 'DataObject.cc'; then $(CYGPATH_W) 'DataObject.cc'; else $(CYGPATH_W) '$(srcdir)/DataObject.cc'; fi`
+
+bin_GeoTool-Decoder.o: Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Decoder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Decoder.Tpo -c -o bin_GeoTool-Decoder.o `test -f 'Decoder.cc' || echo '$(srcdir)/'`Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Decoder.Tpo $(DEPDIR)/bin_GeoTool-Decoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Decoder.cc' object='bin_GeoTool-Decoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Decoder.o `test -f 'Decoder.cc' || echo '$(srcdir)/'`Decoder.cc
+
+bin_GeoTool-Decoder.obj: Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Decoder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Decoder.Tpo -c -o bin_GeoTool-Decoder.obj `if test -f 'Decoder.cc'; then $(CYGPATH_W) 'Decoder.cc'; else $(CYGPATH_W) '$(srcdir)/Decoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Decoder.Tpo $(DEPDIR)/bin_GeoTool-Decoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Decoder.cc' object='bin_GeoTool-Decoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Decoder.obj `if test -f 'Decoder.cc'; then $(CYGPATH_W) 'Decoder.cc'; else $(CYGPATH_W) '$(srcdir)/Decoder.cc'; fi`
+
+bin_GeoTool-Device.o: Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Device.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Device.Tpo -c -o bin_GeoTool-Device.o `test -f 'Device.cc' || echo '$(srcdir)/'`Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Device.Tpo $(DEPDIR)/bin_GeoTool-Device.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Device.cc' object='bin_GeoTool-Device.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Device.o `test -f 'Device.cc' || echo '$(srcdir)/'`Device.cc
+
+bin_GeoTool-Device.obj: Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Device.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Device.Tpo -c -o bin_GeoTool-Device.obj `if test -f 'Device.cc'; then $(CYGPATH_W) 'Device.cc'; else $(CYGPATH_W) '$(srcdir)/Device.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Device.Tpo $(DEPDIR)/bin_GeoTool-Device.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Device.cc' object='bin_GeoTool-Device.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Device.obj `if test -f 'Device.cc'; then $(CYGPATH_W) 'Device.cc'; else $(CYGPATH_W) '$(srcdir)/Device.cc'; fi`
+
+bin_GeoTool-DrawingPriority.o: DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DrawingPriority.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-DrawingPriority.Tpo -c -o bin_GeoTool-DrawingPriority.o `test -f 'DrawingPriority.cc' || echo '$(srcdir)/'`DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DrawingPriority.Tpo $(DEPDIR)/bin_GeoTool-DrawingPriority.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DrawingPriority.cc' object='bin_GeoTool-DrawingPriority.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DrawingPriority.o `test -f 'DrawingPriority.cc' || echo '$(srcdir)/'`DrawingPriority.cc
+
+bin_GeoTool-DrawingPriority.obj: DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DrawingPriority.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-DrawingPriority.Tpo -c -o bin_GeoTool-DrawingPriority.obj `if test -f 'DrawingPriority.cc'; then $(CYGPATH_W) 'DrawingPriority.cc'; else $(CYGPATH_W) '$(srcdir)/DrawingPriority.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DrawingPriority.Tpo $(DEPDIR)/bin_GeoTool-DrawingPriority.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DrawingPriority.cc' object='bin_GeoTool-DrawingPriority.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DrawingPriority.obj `if test -f 'DrawingPriority.cc'; then $(CYGPATH_W) 'DrawingPriority.cc'; else $(CYGPATH_W) '$(srcdir)/DrawingPriority.cc'; fi`
+
+bin_GeoTool-DropAction.o: DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DropAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-DropAction.Tpo -c -o bin_GeoTool-DropAction.o `test -f 'DropAction.cc' || echo '$(srcdir)/'`DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DropAction.Tpo $(DEPDIR)/bin_GeoTool-DropAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropAction.cc' object='bin_GeoTool-DropAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DropAction.o `test -f 'DropAction.cc' || echo '$(srcdir)/'`DropAction.cc
+
+bin_GeoTool-DropAction.obj: DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-DropAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-DropAction.Tpo -c -o bin_GeoTool-DropAction.obj `if test -f 'DropAction.cc'; then $(CYGPATH_W) 'DropAction.cc'; else $(CYGPATH_W) '$(srcdir)/DropAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-DropAction.Tpo $(DEPDIR)/bin_GeoTool-DropAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropAction.cc' object='bin_GeoTool-DropAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-DropAction.obj `if test -f 'DropAction.cc'; then $(CYGPATH_W) 'DropAction.cc'; else $(CYGPATH_W) '$(srcdir)/DropAction.cc'; fi`
+
+bin_GeoTool-GeopointsDecoder.o: GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GeopointsDecoder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-GeopointsDecoder.Tpo -c -o bin_GeoTool-GeopointsDecoder.o `test -f 'GeopointsDecoder.cc' || echo '$(srcdir)/'`GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GeopointsDecoder.Tpo $(DEPDIR)/bin_GeoTool-GeopointsDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopointsDecoder.cc' object='bin_GeoTool-GeopointsDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GeopointsDecoder.o `test -f 'GeopointsDecoder.cc' || echo '$(srcdir)/'`GeopointsDecoder.cc
+
+bin_GeoTool-GeopointsDecoder.obj: GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GeopointsDecoder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-GeopointsDecoder.Tpo -c -o bin_GeoTool-GeopointsDecoder.obj `if test -f 'GeopointsDecoder.cc'; then $(CYGPATH_W) 'GeopointsDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GeopointsDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GeopointsDecoder.Tpo $(DEPDIR)/bin_GeoTool-GeopointsDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopointsDecoder.cc' object='bin_GeoTool-GeopointsDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GeopointsDecoder.obj `if test -f 'GeopointsDecoder.cc'; then $(CYGPATH_W) 'GeopointsDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GeopointsDecoder.cc'; fi`
+
+bin_GeoTool-GraphicsEngine.o: GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GraphicsEngine.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-GraphicsEngine.Tpo -c -o bin_GeoTool-GraphicsEngine.o `test -f 'GraphicsEngine.cc' || echo '$(srcdir)/'`GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GraphicsEngine.Tpo $(DEPDIR)/bin_GeoTool-GraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GraphicsEngine.cc' object='bin_GeoTool-GraphicsEngine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GraphicsEngine.o `test -f 'GraphicsEngine.cc' || echo '$(srcdir)/'`GraphicsEngine.cc
+
+bin_GeoTool-GraphicsEngine.obj: GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GraphicsEngine.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-GraphicsEngine.Tpo -c -o bin_GeoTool-GraphicsEngine.obj `if test -f 'GraphicsEngine.cc'; then $(CYGPATH_W) 'GraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/GraphicsEngine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GraphicsEngine.Tpo $(DEPDIR)/bin_GeoTool-GraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GraphicsEngine.cc' object='bin_GeoTool-GraphicsEngine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GraphicsEngine.obj `if test -f 'GraphicsEngine.cc'; then $(CYGPATH_W) 'GraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/GraphicsEngine.cc'; fi`
+
+bin_GeoTool-GribDecoder.o: GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GribDecoder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-GribDecoder.Tpo -c -o bin_GeoTool-GribDecoder.o `test -f 'GribDecoder.cc' || echo '$(srcdir)/'`GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GribDecoder.Tpo $(DEPDIR)/bin_GeoTool-GribDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribDecoder.cc' object='bin_GeoTool-GribDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GribDecoder.o `test -f 'GribDecoder.cc' || echo '$(srcdir)/'`GribDecoder.cc
+
+bin_GeoTool-GribDecoder.obj: GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GribDecoder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-GribDecoder.Tpo -c -o bin_GeoTool-GribDecoder.obj `if test -f 'GribDecoder.cc'; then $(CYGPATH_W) 'GribDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GribDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GribDecoder.Tpo $(DEPDIR)/bin_GeoTool-GribDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribDecoder.cc' object='bin_GeoTool-GribDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GribDecoder.obj `if test -f 'GribDecoder.cc'; then $(CYGPATH_W) 'GribDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GribDecoder.cc'; fi`
+
+bin_GeoTool-Location.o: Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Location.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Location.Tpo -c -o bin_GeoTool-Location.o `test -f 'Location.cc' || echo '$(srcdir)/'`Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Location.Tpo $(DEPDIR)/bin_GeoTool-Location.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Location.cc' object='bin_GeoTool-Location.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Location.o `test -f 'Location.cc' || echo '$(srcdir)/'`Location.cc
+
+bin_GeoTool-Location.obj: Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Location.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Location.Tpo -c -o bin_GeoTool-Location.obj `if test -f 'Location.cc'; then $(CYGPATH_W) 'Location.cc'; else $(CYGPATH_W) '$(srcdir)/Location.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Location.Tpo $(DEPDIR)/bin_GeoTool-Location.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Location.cc' object='bin_GeoTool-Location.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Location.obj `if test -f 'Location.cc'; then $(CYGPATH_W) 'Location.cc'; else $(CYGPATH_W) '$(srcdir)/Location.cc'; fi`
+
+bin_GeoTool-MvLayer.o: MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvLayer.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvLayer.Tpo -c -o bin_GeoTool-MvLayer.o `test -f 'MvLayer.cc' || echo '$(srcdir)/'`MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvLayer.Tpo $(DEPDIR)/bin_GeoTool-MvLayer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvLayer.cc' object='bin_GeoTool-MvLayer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvLayer.o `test -f 'MvLayer.cc' || echo '$(srcdir)/'`MvLayer.cc
+
+bin_GeoTool-MvLayer.obj: MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvLayer.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvLayer.Tpo -c -o bin_GeoTool-MvLayer.obj `if test -f 'MvLayer.cc'; then $(CYGPATH_W) 'MvLayer.cc'; else $(CYGPATH_W) '$(srcdir)/MvLayer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvLayer.Tpo $(DEPDIR)/bin_GeoTool-MvLayer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvLayer.cc' object='bin_GeoTool-MvLayer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvLayer.obj `if test -f 'MvLayer.cc'; then $(CYGPATH_W) 'MvLayer.cc'; else $(CYGPATH_W) '$(srcdir)/MvLayer.cc'; fi`
+
+bin_GeoTool-MacroConverter.o: MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MacroConverter.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MacroConverter.Tpo -c -o bin_GeoTool-MacroConverter.o `test -f 'MacroConverter.cc' || echo '$(srcdir)/'`MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MacroConverter.Tpo $(DEPDIR)/bin_GeoTool-MacroConverter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroConverter.cc' object='bin_GeoTool-MacroConverter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MacroConverter.o `test -f 'MacroConverter.cc' || echo '$(srcdir)/'`MacroConverter.cc
+
+bin_GeoTool-MacroConverter.obj: MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MacroConverter.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MacroConverter.Tpo -c -o bin_GeoTool-MacroConverter.obj `if test -f 'MacroConverter.cc'; then $(CYGPATH_W) 'MacroConverter.cc'; else $(CYGPATH_W) '$(srcdir)/MacroConverter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MacroConverter.Tpo $(DEPDIR)/bin_GeoTool-MacroConverter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroConverter.cc' object='bin_GeoTool-MacroConverter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MacroConverter.obj `if test -f 'MacroConverter.cc'; then $(CYGPATH_W) 'MacroConverter.cc'; else $(CYGPATH_W) '$(srcdir)/MacroConverter.cc'; fi`
+
+bin_GeoTool-MacroVisitor.o: MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MacroVisitor.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MacroVisitor.Tpo -c -o bin_GeoTool-MacroVisitor.o `test -f 'MacroVisitor.cc' || echo '$(srcdir)/'`MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MacroVisitor.Tpo $(DEPDIR)/bin_GeoTool-MacroVisitor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroVisitor.cc' object='bin_GeoTool-MacroVisitor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MacroVisitor.o `test -f 'MacroVisitor.cc' || echo '$(srcdir)/'`MacroVisitor.cc
+
+bin_GeoTool-MacroVisitor.obj: MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MacroVisitor.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MacroVisitor.Tpo -c -o bin_GeoTool-MacroVisitor.obj `if test -f 'MacroVisitor.cc'; then $(CYGPATH_W) 'MacroVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroVisitor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MacroVisitor.Tpo $(DEPDIR)/bin_GeoTool-MacroVisitor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroVisitor.cc' object='bin_GeoTool-MacroVisitor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MacroVisitor.obj `if test -f 'MacroVisitor.cc'; then $(CYGPATH_W) 'MacroVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroVisitor.cc'; fi`
+
+bin_GeoTool-MagicsGraphicsEngine.o: MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagicsGraphicsEngine.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Tpo -c -o bin_GeoTool-MagicsGraphicsEngine.o `test -f 'MagicsGraphicsEngine.cc' || echo '$(srcdir)/'`MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Tpo $(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsGraphicsEngine.cc' object='bin_GeoTool-MagicsGraphicsEngine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagicsGraphicsEngine.o `test -f 'MagicsGraphicsEngine.cc' || echo '$(srcdir)/'`MagicsGraphicsEngine.cc
+
+bin_GeoTool-MagicsGraphicsEngine.obj: MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagicsGraphicsEngine.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Tpo -c -o bin_GeoTool-MagicsGraphicsEngine.obj `if test -f 'MagicsGraphicsEngine.cc'; then $(CYGPATH_W) 'MagicsGraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsGraphicsEngine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Tpo $(DEPDIR)/bin_GeoTool-MagicsGraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsGraphicsEngine.cc' object='bin_GeoTool-MagicsGraphicsEngine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagicsGraphicsEngine.obj `if test -f 'MagicsGraphicsEngine.cc'; then $(CYGPATH_W) 'MagicsGraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsGraphicsEngine.cc'; fi`
+
+bin_GeoTool-MagicsTranslator.o: MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagicsTranslator.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagicsTranslator.Tpo -c -o bin_GeoTool-MagicsTranslator.o `test -f 'MagicsTranslator.cc' || echo '$(srcdir)/'`MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagicsTranslator.Tpo $(DEPDIR)/bin_GeoTool-MagicsTranslator.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsTranslator.cc' object='bin_GeoTool-MagicsTranslator.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagicsTranslator.o `test -f 'MagicsTranslator.cc' || echo '$(srcdir)/'`MagicsTranslator.cc
+
+bin_GeoTool-MagicsTranslator.obj: MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagicsTranslator.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagicsTranslator.Tpo -c -o bin_GeoTool-MagicsTranslator.obj `if test -f 'MagicsTranslator.cc'; then $(CYGPATH_W) 'MagicsTranslator.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsTranslator.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagicsTranslator.Tpo $(DEPDIR)/bin_GeoTool-MagicsTranslator.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsTranslator.cc' object='bin_GeoTool-MagicsTranslator.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagicsTranslator.obj `if test -f 'MagicsTranslator.cc'; then $(CYGPATH_W) 'MagicsTranslator.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsTranslator.cc'; fi`
+
+bin_GeoTool-MagPlusService.o: MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagPlusService.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagPlusService.Tpo -c -o bin_GeoTool-MagPlusService.o `test -f 'MagPlusService.cc' || echo '$(srcdir)/'`MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagPlusService.Tpo $(DEPDIR)/bin_GeoTool-MagPlusService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusService.cc' object='bin_GeoTool-MagPlusService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagPlusService.o `test -f 'MagPlusService.cc' || echo '$(srcdir)/'`MagPlusService.cc
+
+bin_GeoTool-MagPlusService.obj: MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagPlusService.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagPlusService.Tpo -c -o bin_GeoTool-MagPlusService.obj `if test -f 'MagPlusService.cc'; then $(CYGPATH_W) 'MagPlusService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagPlusService.Tpo $(DEPDIR)/bin_GeoTool-MagPlusService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusService.cc' object='bin_GeoTool-MagPlusService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagPlusService.obj `if test -f 'MagPlusService.cc'; then $(CYGPATH_W) 'MagPlusService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusService.cc'; fi`
+
+bin_GeoTool-MapView.o: MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MapView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MapView.Tpo -c -o bin_GeoTool-MapView.o `test -f 'MapView.cc' || echo '$(srcdir)/'`MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MapView.Tpo $(DEPDIR)/bin_GeoTool-MapView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MapView.cc' object='bin_GeoTool-MapView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MapView.o `test -f 'MapView.cc' || echo '$(srcdir)/'`MapView.cc
+
+bin_GeoTool-MapView.obj: MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MapView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MapView.Tpo -c -o bin_GeoTool-MapView.obj `if test -f 'MapView.cc'; then $(CYGPATH_W) 'MapView.cc'; else $(CYGPATH_W) '$(srcdir)/MapView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MapView.Tpo $(DEPDIR)/bin_GeoTool-MapView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MapView.cc' object='bin_GeoTool-MapView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MapView.obj `if test -f 'MapView.cc'; then $(CYGPATH_W) 'MapView.cc'; else $(CYGPATH_W) '$(srcdir)/MapView.cc'; fi`
+
+bin_GeoTool-MatchingCriteria.o: MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MatchingCriteria.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MatchingCriteria.Tpo -c -o bin_GeoTool-MatchingCriteria.o `test -f 'MatchingCriteria.cc' || echo '$(srcdir)/'`MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MatchingCriteria.Tpo $(DEPDIR)/bin_GeoTool-MatchingCriteria.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingCriteria.cc' object='bin_GeoTool-MatchingCriteria.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MatchingCriteria.o `test -f 'MatchingCriteria.cc' || echo '$(srcdir)/'`MatchingCriteria.cc
+
+bin_GeoTool-MatchingCriteria.obj: MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MatchingCriteria.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MatchingCriteria.Tpo -c -o bin_GeoTool-MatchingCriteria.obj `if test -f 'MatchingCriteria.cc'; then $(CYGPATH_W) 'MatchingCriteria.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingCriteria.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MatchingCriteria.Tpo $(DEPDIR)/bin_GeoTool-MatchingCriteria.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingCriteria.cc' object='bin_GeoTool-MatchingCriteria.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MatchingCriteria.obj `if test -f 'MatchingCriteria.cc'; then $(CYGPATH_W) 'MatchingCriteria.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingCriteria.cc'; fi`
+
+bin_GeoTool-MatchingInfo.o: MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MatchingInfo.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MatchingInfo.Tpo -c -o bin_GeoTool-MatchingInfo.o `test -f 'MatchingInfo.cc' || echo '$(srcdir)/'`MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MatchingInfo.Tpo $(DEPDIR)/bin_GeoTool-MatchingInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingInfo.cc' object='bin_GeoTool-MatchingInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MatchingInfo.o `test -f 'MatchingInfo.cc' || echo '$(srcdir)/'`MatchingInfo.cc
+
+bin_GeoTool-MatchingInfo.obj: MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MatchingInfo.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MatchingInfo.Tpo -c -o bin_GeoTool-MatchingInfo.obj `if test -f 'MatchingInfo.cc'; then $(CYGPATH_W) 'MatchingInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MatchingInfo.Tpo $(DEPDIR)/bin_GeoTool-MatchingInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingInfo.cc' object='bin_GeoTool-MatchingInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MatchingInfo.obj `if test -f 'MatchingInfo.cc'; then $(CYGPATH_W) 'MatchingInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingInfo.cc'; fi`
+
+bin_GeoTool-MvIcon.o: MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvIcon.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvIcon.Tpo -c -o bin_GeoTool-MvIcon.o `test -f 'MvIcon.cc' || echo '$(srcdir)/'`MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvIcon.Tpo $(DEPDIR)/bin_GeoTool-MvIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIcon.cc' object='bin_GeoTool-MvIcon.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvIcon.o `test -f 'MvIcon.cc' || echo '$(srcdir)/'`MvIcon.cc
+
+bin_GeoTool-MvIcon.obj: MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvIcon.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvIcon.Tpo -c -o bin_GeoTool-MvIcon.obj `if test -f 'MvIcon.cc'; then $(CYGPATH_W) 'MvIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvIcon.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvIcon.Tpo $(DEPDIR)/bin_GeoTool-MvIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIcon.cc' object='bin_GeoTool-MvIcon.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvIcon.obj `if test -f 'MvIcon.cc'; then $(CYGPATH_W) 'MvIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvIcon.cc'; fi`
+
+bin_GeoTool-MvIconDataBase.o: MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvIconDataBase.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvIconDataBase.Tpo -c -o bin_GeoTool-MvIconDataBase.o `test -f 'MvIconDataBase.cc' || echo '$(srcdir)/'`MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvIconDataBase.Tpo $(DEPDIR)/bin_GeoTool-MvIconDataBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIconDataBase.cc' object='bin_GeoTool-MvIconDataBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvIconDataBase.o `test -f 'MvIconDataBase.cc' || echo '$(srcdir)/'`MvIconDataBase.cc
+
+bin_GeoTool-MvIconDataBase.obj: MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvIconDataBase.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvIconDataBase.Tpo -c -o bin_GeoTool-MvIconDataBase.obj `if test -f 'MvIconDataBase.cc'; then $(CYGPATH_W) 'MvIconDataBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvIconDataBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvIconDataBase.Tpo $(DEPDIR)/bin_GeoTool-MvIconDataBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIconDataBase.cc' object='bin_GeoTool-MvIconDataBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvIconDataBase.obj `if test -f 'MvIconDataBase.cc'; then $(CYGPATH_W) 'MvIconDataBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvIconDataBase.cc'; fi`
+
+bin_GeoTool-NewpageAction.o: NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-NewpageAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-NewpageAction.Tpo -c -o bin_GeoTool-NewpageAction.o `test -f 'NewpageAction.cc' || echo '$(srcdir)/'`NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-NewpageAction.Tpo $(DEPDIR)/bin_GeoTool-NewpageAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NewpageAction.cc' object='bin_GeoTool-NewpageAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-NewpageAction.o `test -f 'NewpageAction.cc' || echo '$(srcdir)/'`NewpageAction.cc
+
+bin_GeoTool-NewpageAction.obj: NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-NewpageAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-NewpageAction.Tpo -c -o bin_GeoTool-NewpageAction.obj `if test -f 'NewpageAction.cc'; then $(CYGPATH_W) 'NewpageAction.cc'; else $(CYGPATH_W) '$(srcdir)/NewpageAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-NewpageAction.Tpo $(DEPDIR)/bin_GeoTool-NewpageAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NewpageAction.cc' object='bin_GeoTool-NewpageAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-NewpageAction.obj `if test -f 'NewpageAction.cc'; then $(CYGPATH_W) 'NewpageAction.cc'; else $(CYGPATH_W) '$(srcdir)/NewpageAction.cc'; fi`
+
+bin_GeoTool-ObjectInfo.o: ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ObjectInfo.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-ObjectInfo.Tpo -c -o bin_GeoTool-ObjectInfo.o `test -f 'ObjectInfo.cc' || echo '$(srcdir)/'`ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ObjectInfo.Tpo $(DEPDIR)/bin_GeoTool-ObjectInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectInfo.cc' object='bin_GeoTool-ObjectInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ObjectInfo.o `test -f 'ObjectInfo.cc' || echo '$(srcdir)/'`ObjectInfo.cc
+
+bin_GeoTool-ObjectInfo.obj: ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ObjectInfo.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-ObjectInfo.Tpo -c -o bin_GeoTool-ObjectInfo.obj `if test -f 'ObjectInfo.cc'; then $(CYGPATH_W) 'ObjectInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ObjectInfo.Tpo $(DEPDIR)/bin_GeoTool-ObjectInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectInfo.cc' object='bin_GeoTool-ObjectInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ObjectInfo.obj `if test -f 'ObjectInfo.cc'; then $(CYGPATH_W) 'ObjectInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectInfo.cc'; fi`
+
+bin_GeoTool-ObjectList.o: ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ObjectList.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-ObjectList.Tpo -c -o bin_GeoTool-ObjectList.o `test -f 'ObjectList.cc' || echo '$(srcdir)/'`ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ObjectList.Tpo $(DEPDIR)/bin_GeoTool-ObjectList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectList.cc' object='bin_GeoTool-ObjectList.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ObjectList.o `test -f 'ObjectList.cc' || echo '$(srcdir)/'`ObjectList.cc
+
+bin_GeoTool-ObjectList.obj: ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ObjectList.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-ObjectList.Tpo -c -o bin_GeoTool-ObjectList.obj `if test -f 'ObjectList.cc'; then $(CYGPATH_W) 'ObjectList.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectList.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ObjectList.Tpo $(DEPDIR)/bin_GeoTool-ObjectList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectList.cc' object='bin_GeoTool-ObjectList.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ObjectList.obj `if test -f 'ObjectList.cc'; then $(CYGPATH_W) 'ObjectList.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectList.cc'; fi`
+
+bin_GeoTool-OutputFormatAction.o: OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-OutputFormatAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-OutputFormatAction.Tpo -c -o bin_GeoTool-OutputFormatAction.o `test -f 'OutputFormatAction.cc' || echo '$(srcdir)/'`OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-OutputFormatAction.Tpo $(DEPDIR)/bin_GeoTool-OutputFormatAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputFormatAction.cc' object='bin_GeoTool-OutputFormatAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-OutputFormatAction.o `test -f 'OutputFormatAction.cc' || echo '$(srcdir)/'`OutputFormatAction.cc
+
+bin_GeoTool-OutputFormatAction.obj: OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-OutputFormatAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-OutputFormatAction.Tpo -c -o bin_GeoTool-OutputFormatAction.obj `if test -f 'OutputFormatAction.cc'; then $(CYGPATH_W) 'OutputFormatAction.cc'; else $(CYGPATH_W) '$(srcdir)/OutputFormatAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-OutputFormatAction.Tpo $(DEPDIR)/bin_GeoTool-OutputFormatAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputFormatAction.cc' object='bin_GeoTool-OutputFormatAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-OutputFormatAction.obj `if test -f 'OutputFormatAction.cc'; then $(CYGPATH_W) 'OutputFormatAction.cc'; else $(CYGPATH_W) '$(srcdir)/OutputFormatAction.cc'; fi`
+
+bin_GeoTool-Page.o: Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Page.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Page.Tpo -c -o bin_GeoTool-Page.o `test -f 'Page.cc' || echo '$(srcdir)/'`Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Page.Tpo $(DEPDIR)/bin_GeoTool-Page.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Page.cc' object='bin_GeoTool-Page.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Page.o `test -f 'Page.cc' || echo '$(srcdir)/'`Page.cc
+
+bin_GeoTool-Page.obj: Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Page.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Page.Tpo -c -o bin_GeoTool-Page.obj `if test -f 'Page.cc'; then $(CYGPATH_W) 'Page.cc'; else $(CYGPATH_W) '$(srcdir)/Page.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Page.Tpo $(DEPDIR)/bin_GeoTool-Page.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Page.cc' object='bin_GeoTool-Page.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Page.obj `if test -f 'Page.cc'; then $(CYGPATH_W) 'Page.cc'; else $(CYGPATH_W) '$(srcdir)/Page.cc'; fi`
+
+bin_GeoTool-PlotAction.o: PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotAction.Tpo -c -o bin_GeoTool-PlotAction.o `test -f 'PlotAction.cc' || echo '$(srcdir)/'`PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotAction.Tpo $(DEPDIR)/bin_GeoTool-PlotAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotAction.cc' object='bin_GeoTool-PlotAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotAction.o `test -f 'PlotAction.cc' || echo '$(srcdir)/'`PlotAction.cc
+
+bin_GeoTool-PlotAction.obj: PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotAction.Tpo -c -o bin_GeoTool-PlotAction.obj `if test -f 'PlotAction.cc'; then $(CYGPATH_W) 'PlotAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotAction.Tpo $(DEPDIR)/bin_GeoTool-PlotAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotAction.cc' object='bin_GeoTool-PlotAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotAction.obj `if test -f 'PlotAction.cc'; then $(CYGPATH_W) 'PlotAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotAction.cc'; fi`
+
+bin_GeoTool-PlotMod.o: PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotMod.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotMod.Tpo -c -o bin_GeoTool-PlotMod.o `test -f 'PlotMod.cc' || echo '$(srcdir)/'`PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotMod.Tpo $(DEPDIR)/bin_GeoTool-PlotMod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotMod.cc' object='bin_GeoTool-PlotMod.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotMod.o `test -f 'PlotMod.cc' || echo '$(srcdir)/'`PlotMod.cc
+
+bin_GeoTool-PlotMod.obj: PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotMod.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotMod.Tpo -c -o bin_GeoTool-PlotMod.obj `if test -f 'PlotMod.cc'; then $(CYGPATH_W) 'PlotMod.cc'; else $(CYGPATH_W) '$(srcdir)/PlotMod.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotMod.Tpo $(DEPDIR)/bin_GeoTool-PlotMod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotMod.cc' object='bin_GeoTool-PlotMod.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotMod.obj `if test -f 'PlotMod.cc'; then $(CYGPATH_W) 'PlotMod.cc'; else $(CYGPATH_W) '$(srcdir)/PlotMod.cc'; fi`
+
+bin_GeoTool-PlotModAction.o: PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModAction.Tpo -c -o bin_GeoTool-PlotModAction.o `test -f 'PlotModAction.cc' || echo '$(srcdir)/'`PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModAction.Tpo $(DEPDIR)/bin_GeoTool-PlotModAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModAction.cc' object='bin_GeoTool-PlotModAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModAction.o `test -f 'PlotModAction.cc' || echo '$(srcdir)/'`PlotModAction.cc
+
+bin_GeoTool-PlotModAction.obj: PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModAction.Tpo -c -o bin_GeoTool-PlotModAction.obj `if test -f 'PlotModAction.cc'; then $(CYGPATH_W) 'PlotModAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModAction.Tpo $(DEPDIR)/bin_GeoTool-PlotModAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModAction.cc' object='bin_GeoTool-PlotModAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModAction.obj `if test -f 'PlotModAction.cc'; then $(CYGPATH_W) 'PlotModAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModAction.cc'; fi`
+
+bin_GeoTool-PlotModBuilder.o: PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModBuilder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModBuilder.Tpo -c -o bin_GeoTool-PlotModBuilder.o `test -f 'PlotModBuilder.cc' || echo '$(srcdir)/'`PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModBuilder.Tpo $(DEPDIR)/bin_GeoTool-PlotModBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBuilder.cc' object='bin_GeoTool-PlotModBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModBuilder.o `test -f 'PlotModBuilder.cc' || echo '$(srcdir)/'`PlotModBuilder.cc
+
+bin_GeoTool-PlotModBuilder.obj: PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModBuilder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModBuilder.Tpo -c -o bin_GeoTool-PlotModBuilder.obj `if test -f 'PlotModBuilder.cc'; then $(CYGPATH_W) 'PlotModBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModBuilder.Tpo $(DEPDIR)/bin_GeoTool-PlotModBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBuilder.cc' object='bin_GeoTool-PlotModBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModBuilder.obj `if test -f 'PlotModBuilder.cc'; then $(CYGPATH_W) 'PlotModBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBuilder.cc'; fi`
+
+bin_GeoTool-PlotModService.o: PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModService.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModService.Tpo -c -o bin_GeoTool-PlotModService.o `test -f 'PlotModService.cc' || echo '$(srcdir)/'`PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModService.Tpo $(DEPDIR)/bin_GeoTool-PlotModService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModService.cc' object='bin_GeoTool-PlotModService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModService.o `test -f 'PlotModService.cc' || echo '$(srcdir)/'`PlotModService.cc
+
+bin_GeoTool-PlotModService.obj: PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModService.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModService.Tpo -c -o bin_GeoTool-PlotModService.obj `if test -f 'PlotModService.cc'; then $(CYGPATH_W) 'PlotModService.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModService.Tpo $(DEPDIR)/bin_GeoTool-PlotModService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModService.cc' object='bin_GeoTool-PlotModService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModService.obj `if test -f 'PlotModService.cc'; then $(CYGPATH_W) 'PlotModService.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModService.cc'; fi`
+
+bin_GeoTool-PlotModTask.o: PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModTask.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModTask.Tpo -c -o bin_GeoTool-PlotModTask.o `test -f 'PlotModTask.cc' || echo '$(srcdir)/'`PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModTask.Tpo $(DEPDIR)/bin_GeoTool-PlotModTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModTask.cc' object='bin_GeoTool-PlotModTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModTask.o `test -f 'PlotModTask.cc' || echo '$(srcdir)/'`PlotModTask.cc
+
+bin_GeoTool-PlotModTask.obj: PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModTask.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModTask.Tpo -c -o bin_GeoTool-PlotModTask.obj `if test -f 'PlotModTask.cc'; then $(CYGPATH_W) 'PlotModTask.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModTask.Tpo $(DEPDIR)/bin_GeoTool-PlotModTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModTask.cc' object='bin_GeoTool-PlotModTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModTask.obj `if test -f 'PlotModTask.cc'; then $(CYGPATH_W) 'PlotModTask.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModTask.cc'; fi`
+
+bin_GeoTool-PlotModView.o: PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModView.Tpo -c -o bin_GeoTool-PlotModView.o `test -f 'PlotModView.cc' || echo '$(srcdir)/'`PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModView.Tpo $(DEPDIR)/bin_GeoTool-PlotModView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModView.cc' object='bin_GeoTool-PlotModView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModView.o `test -f 'PlotModView.cc' || echo '$(srcdir)/'`PlotModView.cc
+
+bin_GeoTool-PlotModView.obj: PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModView.Tpo -c -o bin_GeoTool-PlotModView.obj `if test -f 'PlotModView.cc'; then $(CYGPATH_W) 'PlotModView.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModView.Tpo $(DEPDIR)/bin_GeoTool-PlotModView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModView.cc' object='bin_GeoTool-PlotModView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModView.obj `if test -f 'PlotModView.cc'; then $(CYGPATH_W) 'PlotModView.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModView.cc'; fi`
+
+bin_GeoTool-PlotPageBuilder.o: PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotPageBuilder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotPageBuilder.Tpo -c -o bin_GeoTool-PlotPageBuilder.o `test -f 'PlotPageBuilder.cc' || echo '$(srcdir)/'`PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotPageBuilder.Tpo $(DEPDIR)/bin_GeoTool-PlotPageBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotPageBuilder.cc' object='bin_GeoTool-PlotPageBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotPageBuilder.o `test -f 'PlotPageBuilder.cc' || echo '$(srcdir)/'`PlotPageBuilder.cc
+
+bin_GeoTool-PlotPageBuilder.obj: PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotPageBuilder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotPageBuilder.Tpo -c -o bin_GeoTool-PlotPageBuilder.obj `if test -f 'PlotPageBuilder.cc'; then $(CYGPATH_W) 'PlotPageBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotPageBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotPageBuilder.Tpo $(DEPDIR)/bin_GeoTool-PlotPageBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotPageBuilder.cc' object='bin_GeoTool-PlotPageBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotPageBuilder.obj `if test -f 'PlotPageBuilder.cc'; then $(CYGPATH_W) 'PlotPageBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotPageBuilder.cc'; fi`
+
+bin_GeoTool-PmContext.o: PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmContext.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmContext.Tpo -c -o bin_GeoTool-PmContext.o `test -f 'PmContext.cc' || echo '$(srcdir)/'`PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmContext.Tpo $(DEPDIR)/bin_GeoTool-PmContext.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmContext.cc' object='bin_GeoTool-PmContext.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmContext.o `test -f 'PmContext.cc' || echo '$(srcdir)/'`PmContext.cc
+
+bin_GeoTool-PmContext.obj: PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmContext.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmContext.Tpo -c -o bin_GeoTool-PmContext.obj `if test -f 'PmContext.cc'; then $(CYGPATH_W) 'PmContext.cc'; else $(CYGPATH_W) '$(srcdir)/PmContext.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmContext.Tpo $(DEPDIR)/bin_GeoTool-PmContext.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmContext.cc' object='bin_GeoTool-PmContext.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmContext.obj `if test -f 'PmContext.cc'; then $(CYGPATH_W) 'PmContext.cc'; else $(CYGPATH_W) '$(srcdir)/PmContext.cc'; fi`
+
+bin_GeoTool-PmIndividualProjection.o: PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmIndividualProjection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmIndividualProjection.Tpo -c -o bin_GeoTool-PmIndividualProjection.o `test -f 'PmIndividualProjection.cc' || echo '$(srcdir)/'`PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmIndividualProjection.Tpo $(DEPDIR)/bin_GeoTool-PmIndividualProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmIndividualProjection.cc' object='bin_GeoTool-PmIndividualProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmIndividualProjection.o `test -f 'PmIndividualProjection.cc' || echo '$(srcdir)/'`PmIndividualProjection.cc
+
+bin_GeoTool-PmIndividualProjection.obj: PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmIndividualProjection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmIndividualProjection.Tpo -c -o bin_GeoTool-PmIndividualProjection.obj `if test -f 'PmIndividualProjection.cc'; then $(CYGPATH_W) 'PmIndividualProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmIndividualProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmIndividualProjection.Tpo $(DEPDIR)/bin_GeoTool-PmIndividualProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmIndividualProjection.cc' object='bin_GeoTool-PmIndividualProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmIndividualProjection.obj `if test -f 'PmIndividualProjection.cc'; then $(CYGPATH_W) 'PmIndividualProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmIndividualProjection.cc'; fi`
+
+bin_GeoTool-PmGeneralProjection.o: PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmGeneralProjection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmGeneralProjection.Tpo -c -o bin_GeoTool-PmGeneralProjection.o `test -f 'PmGeneralProjection.cc' || echo '$(srcdir)/'`PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmGeneralProjection.Tpo $(DEPDIR)/bin_GeoTool-PmGeneralProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmGeneralProjection.cc' object='bin_GeoTool-PmGeneralProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmGeneralProjection.o `test -f 'PmGeneralProjection.cc' || echo '$(srcdir)/'`PmGeneralProjection.cc
+
+bin_GeoTool-PmGeneralProjection.obj: PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmGeneralProjection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmGeneralProjection.Tpo -c -o bin_GeoTool-PmGeneralProjection.obj `if test -f 'PmGeneralProjection.cc'; then $(CYGPATH_W) 'PmGeneralProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmGeneralProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmGeneralProjection.Tpo $(DEPDIR)/bin_GeoTool-PmGeneralProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmGeneralProjection.cc' object='bin_GeoTool-PmGeneralProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmGeneralProjection.obj `if test -f 'PmGeneralProjection.cc'; then $(CYGPATH_W) 'PmGeneralProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmGeneralProjection.cc'; fi`
+
+bin_GeoTool-PmProjection.o: PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmProjection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmProjection.Tpo -c -o bin_GeoTool-PmProjection.o `test -f 'PmProjection.cc' || echo '$(srcdir)/'`PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmProjection.Tpo $(DEPDIR)/bin_GeoTool-PmProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmProjection.cc' object='bin_GeoTool-PmProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmProjection.o `test -f 'PmProjection.cc' || echo '$(srcdir)/'`PmProjection.cc
+
+bin_GeoTool-PmProjection.obj: PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PmProjection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PmProjection.Tpo -c -o bin_GeoTool-PmProjection.obj `if test -f 'PmProjection.cc'; then $(CYGPATH_W) 'PmProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PmProjection.Tpo $(DEPDIR)/bin_GeoTool-PmProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmProjection.cc' object='bin_GeoTool-PmProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PmProjection.obj `if test -f 'PmProjection.cc'; then $(CYGPATH_W) 'PmProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmProjection.cc'; fi`
+
+bin_GeoTool-Preferences.o: Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Preferences.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Preferences.Tpo -c -o bin_GeoTool-Preferences.o `test -f 'Preferences.cc' || echo '$(srcdir)/'`Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Preferences.Tpo $(DEPDIR)/bin_GeoTool-Preferences.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Preferences.cc' object='bin_GeoTool-Preferences.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Preferences.o `test -f 'Preferences.cc' || echo '$(srcdir)/'`Preferences.cc
+
+bin_GeoTool-Preferences.obj: Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Preferences.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Preferences.Tpo -c -o bin_GeoTool-Preferences.obj `if test -f 'Preferences.cc'; then $(CYGPATH_W) 'Preferences.cc'; else $(CYGPATH_W) '$(srcdir)/Preferences.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Preferences.Tpo $(DEPDIR)/bin_GeoTool-Preferences.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Preferences.cc' object='bin_GeoTool-Preferences.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Preferences.obj `if test -f 'Preferences.cc'; then $(CYGPATH_W) 'Preferences.cc'; else $(CYGPATH_W) '$(srcdir)/Preferences.cc'; fi`
+
+bin_GeoTool-Presentable.o: Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Presentable.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Presentable.Tpo -c -o bin_GeoTool-Presentable.o `test -f 'Presentable.cc' || echo '$(srcdir)/'`Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Presentable.Tpo $(DEPDIR)/bin_GeoTool-Presentable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Presentable.cc' object='bin_GeoTool-Presentable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Presentable.o `test -f 'Presentable.cc' || echo '$(srcdir)/'`Presentable.cc
+
+bin_GeoTool-Presentable.obj: Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Presentable.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Presentable.Tpo -c -o bin_GeoTool-Presentable.obj `if test -f 'Presentable.cc'; then $(CYGPATH_W) 'Presentable.cc'; else $(CYGPATH_W) '$(srcdir)/Presentable.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Presentable.Tpo $(DEPDIR)/bin_GeoTool-Presentable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Presentable.cc' object='bin_GeoTool-Presentable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Presentable.obj `if test -f 'Presentable.cc'; then $(CYGPATH_W) 'Presentable.cc'; else $(CYGPATH_W) '$(srcdir)/Presentable.cc'; fi`
+
+bin_GeoTool-Root.o: Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Root.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Root.Tpo -c -o bin_GeoTool-Root.o `test -f 'Root.cc' || echo '$(srcdir)/'`Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Root.Tpo $(DEPDIR)/bin_GeoTool-Root.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Root.cc' object='bin_GeoTool-Root.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Root.o `test -f 'Root.cc' || echo '$(srcdir)/'`Root.cc
+
+bin_GeoTool-Root.obj: Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Root.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Root.Tpo -c -o bin_GeoTool-Root.obj `if test -f 'Root.cc'; then $(CYGPATH_W) 'Root.cc'; else $(CYGPATH_W) '$(srcdir)/Root.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Root.Tpo $(DEPDIR)/bin_GeoTool-Root.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Root.cc' object='bin_GeoTool-Root.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Root.obj `if test -f 'Root.cc'; then $(CYGPATH_W) 'Root.cc'; else $(CYGPATH_W) '$(srcdir)/Root.cc'; fi`
+
+bin_GeoTool-SatelliteProjection.o: SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SatelliteProjection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-SatelliteProjection.Tpo -c -o bin_GeoTool-SatelliteProjection.o `test -f 'SatelliteProjection.cc' || echo '$(srcdir)/'`SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SatelliteProjection.Tpo $(DEPDIR)/bin_GeoTool-SatelliteProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SatelliteProjection.cc' object='bin_GeoTool-SatelliteProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SatelliteProjection.o `test -f 'SatelliteProjection.cc' || echo '$(srcdir)/'`SatelliteProjection.cc
+
+bin_GeoTool-SatelliteProjection.obj: SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SatelliteProjection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-SatelliteProjection.Tpo -c -o bin_GeoTool-SatelliteProjection.obj `if test -f 'SatelliteProjection.cc'; then $(CYGPATH_W) 'SatelliteProjection.cc'; else $(CYGPATH_W) '$(srcdir)/SatelliteProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SatelliteProjection.Tpo $(DEPDIR)/bin_GeoTool-SatelliteProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SatelliteProjection.cc' object='bin_GeoTool-SatelliteProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SatelliteProjection.obj `if test -f 'SatelliteProjection.cc'; then $(CYGPATH_W) 'SatelliteProjection.cc'; else $(CYGPATH_W) '$(srcdir)/SatelliteProjection.cc'; fi`
+
+bin_GeoTool-SimpleDecoder.o: SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SimpleDecoder.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-SimpleDecoder.Tpo -c -o bin_GeoTool-SimpleDecoder.o `test -f 'SimpleDecoder.cc' || echo '$(srcdir)/'`SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SimpleDecoder.Tpo $(DEPDIR)/bin_GeoTool-SimpleDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleDecoder.cc' object='bin_GeoTool-SimpleDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SimpleDecoder.o `test -f 'SimpleDecoder.cc' || echo '$(srcdir)/'`SimpleDecoder.cc
+
+bin_GeoTool-SimpleDecoder.obj: SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SimpleDecoder.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-SimpleDecoder.Tpo -c -o bin_GeoTool-SimpleDecoder.obj `if test -f 'SimpleDecoder.cc'; then $(CYGPATH_W) 'SimpleDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SimpleDecoder.Tpo $(DEPDIR)/bin_GeoTool-SimpleDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleDecoder.cc' object='bin_GeoTool-SimpleDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SimpleDecoder.obj `if test -f 'SimpleDecoder.cc'; then $(CYGPATH_W) 'SimpleDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleDecoder.cc'; fi`
+
+bin_GeoTool-SkipAction.o: SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SkipAction.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-SkipAction.Tpo -c -o bin_GeoTool-SkipAction.o `test -f 'SkipAction.cc' || echo '$(srcdir)/'`SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SkipAction.Tpo $(DEPDIR)/bin_GeoTool-SkipAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SkipAction.cc' object='bin_GeoTool-SkipAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SkipAction.o `test -f 'SkipAction.cc' || echo '$(srcdir)/'`SkipAction.cc
+
+bin_GeoTool-SkipAction.obj: SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SkipAction.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-SkipAction.Tpo -c -o bin_GeoTool-SkipAction.obj `if test -f 'SkipAction.cc'; then $(CYGPATH_W) 'SkipAction.cc'; else $(CYGPATH_W) '$(srcdir)/SkipAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SkipAction.Tpo $(DEPDIR)/bin_GeoTool-SkipAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SkipAction.cc' object='bin_GeoTool-SkipAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SkipAction.obj `if test -f 'SkipAction.cc'; then $(CYGPATH_W) 'SkipAction.cc'; else $(CYGPATH_W) '$(srcdir)/SkipAction.cc'; fi`
+
+bin_GeoTool-SubPage.o: SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SubPage.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-SubPage.Tpo -c -o bin_GeoTool-SubPage.o `test -f 'SubPage.cc' || echo '$(srcdir)/'`SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SubPage.Tpo $(DEPDIR)/bin_GeoTool-SubPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SubPage.cc' object='bin_GeoTool-SubPage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SubPage.o `test -f 'SubPage.cc' || echo '$(srcdir)/'`SubPage.cc
+
+bin_GeoTool-SubPage.obj: SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SubPage.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-SubPage.Tpo -c -o bin_GeoTool-SubPage.obj `if test -f 'SubPage.cc'; then $(CYGPATH_W) 'SubPage.cc'; else $(CYGPATH_W) '$(srcdir)/SubPage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SubPage.Tpo $(DEPDIR)/bin_GeoTool-SubPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SubPage.cc' object='bin_GeoTool-SubPage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SubPage.obj `if test -f 'SubPage.cc'; then $(CYGPATH_W) 'SubPage.cc'; else $(CYGPATH_W) '$(srcdir)/SubPage.cc'; fi`
+
+bin_GeoTool-SuperPage.o: SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SuperPage.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-SuperPage.Tpo -c -o bin_GeoTool-SuperPage.o `test -f 'SuperPage.cc' || echo '$(srcdir)/'`SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SuperPage.Tpo $(DEPDIR)/bin_GeoTool-SuperPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SuperPage.cc' object='bin_GeoTool-SuperPage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SuperPage.o `test -f 'SuperPage.cc' || echo '$(srcdir)/'`SuperPage.cc
+
+bin_GeoTool-SuperPage.obj: SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-SuperPage.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-SuperPage.Tpo -c -o bin_GeoTool-SuperPage.obj `if test -f 'SuperPage.cc'; then $(CYGPATH_W) 'SuperPage.cc'; else $(CYGPATH_W) '$(srcdir)/SuperPage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-SuperPage.Tpo $(DEPDIR)/bin_GeoTool-SuperPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SuperPage.cc' object='bin_GeoTool-SuperPage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-SuperPage.obj `if test -f 'SuperPage.cc'; then $(CYGPATH_W) 'SuperPage.cc'; else $(CYGPATH_W) '$(srcdir)/SuperPage.cc'; fi`
+
+bin_GeoTool-Task.o: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Task.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-Task.Tpo -c -o bin_GeoTool-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Task.Tpo $(DEPDIR)/bin_GeoTool-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_GeoTool-Task.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+
+bin_GeoTool-Task.obj: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-Task.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-Task.Tpo -c -o bin_GeoTool-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-Task.Tpo $(DEPDIR)/bin_GeoTool-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_GeoTool-Task.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+
+bin_GeoTool-VertProfView.o: VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-VertProfView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-VertProfView.Tpo -c -o bin_GeoTool-VertProfView.o `test -f 'VertProfView.cc' || echo '$(srcdir)/'`VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-VertProfView.Tpo $(DEPDIR)/bin_GeoTool-VertProfView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VertProfView.cc' object='bin_GeoTool-VertProfView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-VertProfView.o `test -f 'VertProfView.cc' || echo '$(srcdir)/'`VertProfView.cc
+
+bin_GeoTool-VertProfView.obj: VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-VertProfView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-VertProfView.Tpo -c -o bin_GeoTool-VertProfView.obj `if test -f 'VertProfView.cc'; then $(CYGPATH_W) 'VertProfView.cc'; else $(CYGPATH_W) '$(srcdir)/VertProfView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-VertProfView.Tpo $(DEPDIR)/bin_GeoTool-VertProfView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VertProfView.cc' object='bin_GeoTool-VertProfView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-VertProfView.obj `if test -f 'VertProfView.cc'; then $(CYGPATH_W) 'VertProfView.cc'; else $(CYGPATH_W) '$(srcdir)/VertProfView.cc'; fi`
+
+bin_GeoTool-XDevice.o: XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-XDevice.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-XDevice.Tpo -c -o bin_GeoTool-XDevice.o `test -f 'XDevice.cc' || echo '$(srcdir)/'`XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-XDevice.Tpo $(DEPDIR)/bin_GeoTool-XDevice.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDevice.cc' object='bin_GeoTool-XDevice.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-XDevice.o `test -f 'XDevice.cc' || echo '$(srcdir)/'`XDevice.cc
+
+bin_GeoTool-XDevice.obj: XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-XDevice.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-XDevice.Tpo -c -o bin_GeoTool-XDevice.obj `if test -f 'XDevice.cc'; then $(CYGPATH_W) 'XDevice.cc'; else $(CYGPATH_W) '$(srcdir)/XDevice.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-XDevice.Tpo $(DEPDIR)/bin_GeoTool-XDevice.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDevice.cc' object='bin_GeoTool-XDevice.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-XDevice.obj `if test -f 'XDevice.cc'; then $(CYGPATH_W) 'XDevice.cc'; else $(CYGPATH_W) '$(srcdir)/XDevice.cc'; fi`
+
+bin_GeoTool-XSectView.o: XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-XSectView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-XSectView.Tpo -c -o bin_GeoTool-XSectView.o `test -f 'XSectView.cc' || echo '$(srcdir)/'`XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-XSectView.Tpo $(DEPDIR)/bin_GeoTool-XSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XSectView.cc' object='bin_GeoTool-XSectView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-XSectView.o `test -f 'XSectView.cc' || echo '$(srcdir)/'`XSectView.cc
+
+bin_GeoTool-XSectView.obj: XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-XSectView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-XSectView.Tpo -c -o bin_GeoTool-XSectView.obj `if test -f 'XSectView.cc'; then $(CYGPATH_W) 'XSectView.cc'; else $(CYGPATH_W) '$(srcdir)/XSectView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-XSectView.Tpo $(DEPDIR)/bin_GeoTool-XSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XSectView.cc' object='bin_GeoTool-XSectView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-XSectView.obj `if test -f 'XSectView.cc'; then $(CYGPATH_W) 'XSectView.cc'; else $(CYGPATH_W) '$(srcdir)/XSectView.cc'; fi`
+
+bin_GeoTool-ZoomStacks.o: ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ZoomStacks.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-ZoomStacks.Tpo -c -o bin_GeoTool-ZoomStacks.o `test -f 'ZoomStacks.cc' || echo '$(srcdir)/'`ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ZoomStacks.Tpo $(DEPDIR)/bin_GeoTool-ZoomStacks.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ZoomStacks.cc' object='bin_GeoTool-ZoomStacks.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ZoomStacks.o `test -f 'ZoomStacks.cc' || echo '$(srcdir)/'`ZoomStacks.cc
+
+bin_GeoTool-ZoomStacks.obj: ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ZoomStacks.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-ZoomStacks.Tpo -c -o bin_GeoTool-ZoomStacks.obj `if test -f 'ZoomStacks.cc'; then $(CYGPATH_W) 'ZoomStacks.cc'; else $(CYGPATH_W) '$(srcdir)/ZoomStacks.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ZoomStacks.Tpo $(DEPDIR)/bin_GeoTool-ZoomStacks.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ZoomStacks.cc' object='bin_GeoTool-ZoomStacks.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ZoomStacks.obj `if test -f 'ZoomStacks.cc'; then $(CYGPATH_W) 'ZoomStacks.cc'; else $(CYGPATH_W) '$(srcdir)/ZoomStacks.cc'; fi`
+
+bin_GeoTool-GenAppService.o: GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GenAppService.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-GenAppService.Tpo -c -o bin_GeoTool-GenAppService.o `test -f 'GenAppService.cc' || echo '$(srcdir)/'`GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GenAppService.Tpo $(DEPDIR)/bin_GeoTool-GenAppService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GenAppService.cc' object='bin_GeoTool-GenAppService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GenAppService.o `test -f 'GenAppService.cc' || echo '$(srcdir)/'`GenAppService.cc
+
+bin_GeoTool-GenAppService.obj: GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GenAppService.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-GenAppService.Tpo -c -o bin_GeoTool-GenAppService.obj `if test -f 'GenAppService.cc'; then $(CYGPATH_W) 'GenAppService.cc'; else $(CYGPATH_W) '$(srcdir)/GenAppService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GenAppService.Tpo $(DEPDIR)/bin_GeoTool-GenAppService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GenAppService.cc' object='bin_GeoTool-GenAppService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GenAppService.obj `if test -f 'GenAppService.cc'; then $(CYGPATH_W) 'GenAppService.cc'; else $(CYGPATH_W) '$(srcdir)/GenAppService.cc'; fi`
+
+bin_GeoTool-MvQCursorData.o: MvQCursorData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorData.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorData.Tpo -c -o bin_GeoTool-MvQCursorData.o `test -f 'MvQCursorData.cc' || echo '$(srcdir)/'`MvQCursorData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorData.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.cc' object='bin_GeoTool-MvQCursorData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorData.o `test -f 'MvQCursorData.cc' || echo '$(srcdir)/'`MvQCursorData.cc
+
+bin_GeoTool-MvQCursorData.obj: MvQCursorData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorData.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorData.Tpo -c -o bin_GeoTool-MvQCursorData.obj `if test -f 'MvQCursorData.cc'; then $(CYGPATH_W) 'MvQCursorData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorData.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.cc' object='bin_GeoTool-MvQCursorData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorData.obj `if test -f 'MvQCursorData.cc'; then $(CYGPATH_W) 'MvQCursorData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.cc'; fi`
+
+bin_GeoTool-MvQCursorDataWidget.o: MvQCursorDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorDataWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Tpo -c -o bin_GeoTool-MvQCursorDataWidget.o `test -f 'MvQCursorDataWidget.cc' || echo '$(srcdir)/'`MvQCursorDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.cc' object='bin_GeoTool-MvQCursorDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorDataWidget.o `test -f 'MvQCursorDataWidget.cc' || echo '$(srcdir)/'`MvQCursorDataWidget.cc
+
+bin_GeoTool-MvQCursorDataWidget.obj: MvQCursorDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Tpo -c -o bin_GeoTool-MvQCursorDataWidget.obj `if test -f 'MvQCursorDataWidget.cc'; then $(CYGPATH_W) 'MvQCursorDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.cc' object='bin_GeoTool-MvQCursorDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorDataWidget.obj `if test -f 'MvQCursorDataWidget.cc'; then $(CYGPATH_W) 'MvQCursorDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.cc'; fi`
+
+bin_GeoTool-MvQContentsModel.o: MvQContentsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQContentsModel.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQContentsModel.Tpo -c -o bin_GeoTool-MvQContentsModel.o `test -f 'MvQContentsModel.cc' || echo '$(srcdir)/'`MvQContentsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQContentsModel.Tpo $(DEPDIR)/bin_GeoTool-MvQContentsModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsModel.cc' object='bin_GeoTool-MvQContentsModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQContentsModel.o `test -f 'MvQContentsModel.cc' || echo '$(srcdir)/'`MvQContentsModel.cc
+
+bin_GeoTool-MvQContentsModel.obj: MvQContentsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQContentsModel.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQContentsModel.Tpo -c -o bin_GeoTool-MvQContentsModel.obj `if test -f 'MvQContentsModel.cc'; then $(CYGPATH_W) 'MvQContentsModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQContentsModel.Tpo $(DEPDIR)/bin_GeoTool-MvQContentsModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsModel.cc' object='bin_GeoTool-MvQContentsModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQContentsModel.obj `if test -f 'MvQContentsModel.cc'; then $(CYGPATH_W) 'MvQContentsModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsModel.cc'; fi`
+
+bin_GeoTool-MvQContentsWidget.o: MvQContentsWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQContentsWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQContentsWidget.Tpo -c -o bin_GeoTool-MvQContentsWidget.o `test -f 'MvQContentsWidget.cc' || echo '$(srcdir)/'`MvQContentsWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQContentsWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQContentsWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.cc' object='bin_GeoTool-MvQContentsWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQContentsWidget.o `test -f 'MvQContentsWidget.cc' || echo '$(srcdir)/'`MvQContentsWidget.cc
+
+bin_GeoTool-MvQContentsWidget.obj: MvQContentsWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQContentsWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQContentsWidget.Tpo -c -o bin_GeoTool-MvQContentsWidget.obj `if test -f 'MvQContentsWidget.cc'; then $(CYGPATH_W) 'MvQContentsWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQContentsWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQContentsWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.cc' object='bin_GeoTool-MvQContentsWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQContentsWidget.obj `if test -f 'MvQContentsWidget.cc'; then $(CYGPATH_W) 'MvQContentsWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.cc'; fi`
+
+bin_GeoTool-MvQDataWidget.o: MvQDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQDataWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQDataWidget.Tpo -c -o bin_GeoTool-MvQDataWidget.o `test -f 'MvQDataWidget.cc' || echo '$(srcdir)/'`MvQDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.cc' object='bin_GeoTool-MvQDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQDataWidget.o `test -f 'MvQDataWidget.cc' || echo '$(srcdir)/'`MvQDataWidget.cc
+
+bin_GeoTool-MvQDataWidget.obj: MvQDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQDataWidget.Tpo -c -o bin_GeoTool-MvQDataWidget.obj `if test -f 'MvQDataWidget.cc'; then $(CYGPATH_W) 'MvQDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.cc' object='bin_GeoTool-MvQDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQDataWidget.obj `if test -f 'MvQDataWidget.cc'; then $(CYGPATH_W) 'MvQDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.cc'; fi`
+
+bin_GeoTool-MvQLayerContentsIcon.o: MvQLayerContentsIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerContentsIcon.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Tpo -c -o bin_GeoTool-MvQLayerContentsIcon.o `test -f 'MvQLayerContentsIcon.cc' || echo '$(srcdir)/'`MvQLayerContentsIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerContentsIcon.cc' object='bin_GeoTool-MvQLayerContentsIcon.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerContentsIcon.o `test -f 'MvQLayerContentsIcon.cc' || echo '$(srcdir)/'`MvQLayerContentsIcon.cc
+
+bin_GeoTool-MvQLayerContentsIcon.obj: MvQLayerContentsIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerContentsIcon.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Tpo -c -o bin_GeoTool-MvQLayerContentsIcon.obj `if test -f 'MvQLayerContentsIcon.cc'; then $(CYGPATH_W) 'MvQLayerContentsIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerContentsIcon.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerContentsIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerContentsIcon.cc' object='bin_GeoTool-MvQLayerContentsIcon.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerContentsIcon.obj `if test -f 'MvQLayerContentsIcon.cc'; then $(CYGPATH_W) 'MvQLayerContentsIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerContentsIcon.cc'; fi`
+
+bin_GeoTool-MvQLayerDataWidget.o: MvQLayerDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerDataWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Tpo -c -o bin_GeoTool-MvQLayerDataWidget.o `test -f 'MvQLayerDataWidget.cc' || echo '$(srcdir)/'`MvQLayerDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.cc' object='bin_GeoTool-MvQLayerDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerDataWidget.o `test -f 'MvQLayerDataWidget.cc' || echo '$(srcdir)/'`MvQLayerDataWidget.cc
+
+bin_GeoTool-MvQLayerDataWidget.obj: MvQLayerDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Tpo -c -o bin_GeoTool-MvQLayerDataWidget.obj `if test -f 'MvQLayerDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.cc' object='bin_GeoTool-MvQLayerDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerDataWidget.obj `if test -f 'MvQLayerDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.cc'; fi`
+
+bin_GeoTool-MvQLayerMetaDataWidget.o: MvQLayerMetaDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerMetaDataWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Tpo -c -o bin_GeoTool-MvQLayerMetaDataWidget.o `test -f 'MvQLayerMetaDataWidget.cc' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.cc' object='bin_GeoTool-MvQLayerMetaDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerMetaDataWidget.o `test -f 'MvQLayerMetaDataWidget.cc' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.cc
+
+bin_GeoTool-MvQLayerMetaDataWidget.obj: MvQLayerMetaDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerMetaDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Tpo -c -o bin_GeoTool-MvQLayerMetaDataWidget.obj `if test -f 'MvQLayerMetaDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.cc' object='bin_GeoTool-MvQLayerMetaDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerMetaDataWidget.obj `if test -f 'MvQLayerMetaDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.cc'; fi`
+
+bin_GeoTool-MvQLayerModel.o: MvQLayerModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerModel.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerModel.Tpo -c -o bin_GeoTool-MvQLayerModel.o `test -f 'MvQLayerModel.cc' || echo '$(srcdir)/'`MvQLayerModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerModel.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.cc' object='bin_GeoTool-MvQLayerModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerModel.o `test -f 'MvQLayerModel.cc' || echo '$(srcdir)/'`MvQLayerModel.cc
+
+bin_GeoTool-MvQLayerModel.obj: MvQLayerModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerModel.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerModel.Tpo -c -o bin_GeoTool-MvQLayerModel.obj `if test -f 'MvQLayerModel.cc'; then $(CYGPATH_W) 'MvQLayerModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerModel.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.cc' object='bin_GeoTool-MvQLayerModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerModel.obj `if test -f 'MvQLayerModel.cc'; then $(CYGPATH_W) 'MvQLayerModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.cc'; fi`
+
+bin_GeoTool-MvQLayerWidget.o: MvQLayerWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerWidget.Tpo -c -o bin_GeoTool-MvQLayerWidget.o `test -f 'MvQLayerWidget.cc' || echo '$(srcdir)/'`MvQLayerWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.cc' object='bin_GeoTool-MvQLayerWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerWidget.o `test -f 'MvQLayerWidget.cc' || echo '$(srcdir)/'`MvQLayerWidget.cc
+
+bin_GeoTool-MvQLayerWidget.obj: MvQLayerWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerWidget.Tpo -c -o bin_GeoTool-MvQLayerWidget.obj `if test -f 'MvQLayerWidget.cc'; then $(CYGPATH_W) 'MvQLayerWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.cc' object='bin_GeoTool-MvQLayerWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerWidget.obj `if test -f 'MvQLayerWidget.cc'; then $(CYGPATH_W) 'MvQLayerWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.cc'; fi`
+
+bin_GeoTool-MvQMagnifier.o: MvQMagnifier.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQMagnifier.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQMagnifier.Tpo -c -o bin_GeoTool-MvQMagnifier.o `test -f 'MvQMagnifier.cc' || echo '$(srcdir)/'`MvQMagnifier.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQMagnifier.Tpo $(DEPDIR)/bin_GeoTool-MvQMagnifier.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.cc' object='bin_GeoTool-MvQMagnifier.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQMagnifier.o `test -f 'MvQMagnifier.cc' || echo '$(srcdir)/'`MvQMagnifier.cc
+
+bin_GeoTool-MvQMagnifier.obj: MvQMagnifier.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQMagnifier.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQMagnifier.Tpo -c -o bin_GeoTool-MvQMagnifier.obj `if test -f 'MvQMagnifier.cc'; then $(CYGPATH_W) 'MvQMagnifier.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQMagnifier.Tpo $(DEPDIR)/bin_GeoTool-MvQMagnifier.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.cc' object='bin_GeoTool-MvQMagnifier.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQMagnifier.obj `if test -f 'MvQMagnifier.cc'; then $(CYGPATH_W) 'MvQMagnifier.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.cc'; fi`
+
+bin_GeoTool-MvQPlaceMark.o: MvQPlaceMark.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMark.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMark.Tpo -c -o bin_GeoTool-MvQPlaceMark.o `test -f 'MvQPlaceMark.cc' || echo '$(srcdir)/'`MvQPlaceMark.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMark.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMark.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.cc' object='bin_GeoTool-MvQPlaceMark.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMark.o `test -f 'MvQPlaceMark.cc' || echo '$(srcdir)/'`MvQPlaceMark.cc
+
+bin_GeoTool-MvQPlaceMark.obj: MvQPlaceMark.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMark.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMark.Tpo -c -o bin_GeoTool-MvQPlaceMark.obj `if test -f 'MvQPlaceMark.cc'; then $(CYGPATH_W) 'MvQPlaceMark.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMark.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMark.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.cc' object='bin_GeoTool-MvQPlaceMark.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMark.obj `if test -f 'MvQPlaceMark.cc'; then $(CYGPATH_W) 'MvQPlaceMark.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.cc'; fi`
+
+bin_GeoTool-MvQPlaceMarkDialog.o: MvQPlaceMarkDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkDialog.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Tpo -c -o bin_GeoTool-MvQPlaceMarkDialog.o `test -f 'MvQPlaceMarkDialog.cc' || echo '$(srcdir)/'`MvQPlaceMarkDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.cc' object='bin_GeoTool-MvQPlaceMarkDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkDialog.o `test -f 'MvQPlaceMarkDialog.cc' || echo '$(srcdir)/'`MvQPlaceMarkDialog.cc
+
+bin_GeoTool-MvQPlaceMarkDialog.obj: MvQPlaceMarkDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkDialog.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Tpo -c -o bin_GeoTool-MvQPlaceMarkDialog.obj `if test -f 'MvQPlaceMarkDialog.cc'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.cc' object='bin_GeoTool-MvQPlaceMarkDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkDialog.obj `if test -f 'MvQPlaceMarkDialog.cc'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.cc'; fi`
+
+bin_GeoTool-MvQPlaceMarkMimeData.o: MvQPlaceMarkMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkMimeData.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Tpo -c -o bin_GeoTool-MvQPlaceMarkMimeData.o `test -f 'MvQPlaceMarkMimeData.cc' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.cc' object='bin_GeoTool-MvQPlaceMarkMimeData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkMimeData.o `test -f 'MvQPlaceMarkMimeData.cc' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.cc
+
+bin_GeoTool-MvQPlaceMarkMimeData.obj: MvQPlaceMarkMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkMimeData.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Tpo -c -o bin_GeoTool-MvQPlaceMarkMimeData.obj `if test -f 'MvQPlaceMarkMimeData.cc'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.cc' object='bin_GeoTool-MvQPlaceMarkMimeData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkMimeData.obj `if test -f 'MvQPlaceMarkMimeData.cc'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.cc'; fi`
+
+bin_GeoTool-MvQPlaceMarkWidget.o: MvQPlaceMarkWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Tpo -c -o bin_GeoTool-MvQPlaceMarkWidget.o `test -f 'MvQPlaceMarkWidget.cc' || echo '$(srcdir)/'`MvQPlaceMarkWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.cc' object='bin_GeoTool-MvQPlaceMarkWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkWidget.o `test -f 'MvQPlaceMarkWidget.cc' || echo '$(srcdir)/'`MvQPlaceMarkWidget.cc
+
+bin_GeoTool-MvQPlaceMarkWidget.obj: MvQPlaceMarkWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Tpo -c -o bin_GeoTool-MvQPlaceMarkWidget.obj `if test -f 'MvQPlaceMarkWidget.cc'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.cc' object='bin_GeoTool-MvQPlaceMarkWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkWidget.obj `if test -f 'MvQPlaceMarkWidget.cc'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.cc'; fi`
+
+bin_GeoTool-MvQPlaceMarkModel.o: MvQPlaceMarkModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkModel.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Tpo -c -o bin_GeoTool-MvQPlaceMarkModel.o `test -f 'MvQPlaceMarkModel.cc' || echo '$(srcdir)/'`MvQPlaceMarkModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.cc' object='bin_GeoTool-MvQPlaceMarkModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkModel.o `test -f 'MvQPlaceMarkModel.cc' || echo '$(srcdir)/'`MvQPlaceMarkModel.cc
+
+bin_GeoTool-MvQPlaceMarkModel.obj: MvQPlaceMarkModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkModel.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Tpo -c -o bin_GeoTool-MvQPlaceMarkModel.obj `if test -f 'MvQPlaceMarkModel.cc'; then $(CYGPATH_W) 'MvQPlaceMarkModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.cc' object='bin_GeoTool-MvQPlaceMarkModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkModel.obj `if test -f 'MvQPlaceMarkModel.cc'; then $(CYGPATH_W) 'MvQPlaceMarkModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.cc'; fi`
+
+bin_GeoTool-MvQPlotView.o: MvQPlotView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlotView.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlotView.Tpo -c -o bin_GeoTool-MvQPlotView.o `test -f 'MvQPlotView.cc' || echo '$(srcdir)/'`MvQPlotView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlotView.Tpo $(DEPDIR)/bin_GeoTool-MvQPlotView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.cc' object='bin_GeoTool-MvQPlotView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlotView.o `test -f 'MvQPlotView.cc' || echo '$(srcdir)/'`MvQPlotView.cc
+
+bin_GeoTool-MvQPlotView.obj: MvQPlotView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlotView.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlotView.Tpo -c -o bin_GeoTool-MvQPlotView.obj `if test -f 'MvQPlotView.cc'; then $(CYGPATH_W) 'MvQPlotView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlotView.Tpo $(DEPDIR)/bin_GeoTool-MvQPlotView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.cc' object='bin_GeoTool-MvQPlotView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlotView.obj `if test -f 'MvQPlotView.cc'; then $(CYGPATH_W) 'MvQPlotView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.cc'; fi`
+
+bin_GeoTool-MvQPointSelection.o: MvQPointSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPointSelection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPointSelection.Tpo -c -o bin_GeoTool-MvQPointSelection.o `test -f 'MvQPointSelection.cc' || echo '$(srcdir)/'`MvQPointSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPointSelection.Tpo $(DEPDIR)/bin_GeoTool-MvQPointSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.cc' object='bin_GeoTool-MvQPointSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPointSelection.o `test -f 'MvQPointSelection.cc' || echo '$(srcdir)/'`MvQPointSelection.cc
+
+bin_GeoTool-MvQPointSelection.obj: MvQPointSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPointSelection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPointSelection.Tpo -c -o bin_GeoTool-MvQPointSelection.obj `if test -f 'MvQPointSelection.cc'; then $(CYGPATH_W) 'MvQPointSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPointSelection.Tpo $(DEPDIR)/bin_GeoTool-MvQPointSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.cc' object='bin_GeoTool-MvQPointSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPointSelection.obj `if test -f 'MvQPointSelection.cc'; then $(CYGPATH_W) 'MvQPointSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.cc'; fi`
+
+bin_GeoTool-MvQProgressItem.o: MvQProgressItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQProgressItem.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQProgressItem.Tpo -c -o bin_GeoTool-MvQProgressItem.o `test -f 'MvQProgressItem.cc' || echo '$(srcdir)/'`MvQProgressItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQProgressItem.Tpo $(DEPDIR)/bin_GeoTool-MvQProgressItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProgressItem.cc' object='bin_GeoTool-MvQProgressItem.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQProgressItem.o `test -f 'MvQProgressItem.cc' || echo '$(srcdir)/'`MvQProgressItem.cc
+
+bin_GeoTool-MvQProgressItem.obj: MvQProgressItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQProgressItem.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQProgressItem.Tpo -c -o bin_GeoTool-MvQProgressItem.obj `if test -f 'MvQProgressItem.cc'; then $(CYGPATH_W) 'MvQProgressItem.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProgressItem.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQProgressItem.Tpo $(DEPDIR)/bin_GeoTool-MvQProgressItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProgressItem.cc' object='bin_GeoTool-MvQProgressItem.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQProgressItem.obj `if test -f 'MvQProgressItem.cc'; then $(CYGPATH_W) 'MvQProgressItem.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProgressItem.cc'; fi`
+
+bin_GeoTool-MvQStepModel.o: MvQStepModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepModel.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepModel.Tpo -c -o bin_GeoTool-MvQStepModel.o `test -f 'MvQStepModel.cc' || echo '$(srcdir)/'`MvQStepModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepModel.Tpo $(DEPDIR)/bin_GeoTool-MvQStepModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.cc' object='bin_GeoTool-MvQStepModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepModel.o `test -f 'MvQStepModel.cc' || echo '$(srcdir)/'`MvQStepModel.cc
+
+bin_GeoTool-MvQStepModel.obj: MvQStepModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepModel.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepModel.Tpo -c -o bin_GeoTool-MvQStepModel.obj `if test -f 'MvQStepModel.cc'; then $(CYGPATH_W) 'MvQStepModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepModel.Tpo $(DEPDIR)/bin_GeoTool-MvQStepModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.cc' object='bin_GeoTool-MvQStepModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepModel.obj `if test -f 'MvQStepModel.cc'; then $(CYGPATH_W) 'MvQStepModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.cc'; fi`
+
+bin_GeoTool-MvQStepWidget.o: MvQStepWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepWidget.Tpo -c -o bin_GeoTool-MvQStepWidget.o `test -f 'MvQStepWidget.cc' || echo '$(srcdir)/'`MvQStepWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQStepWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.cc' object='bin_GeoTool-MvQStepWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepWidget.o `test -f 'MvQStepWidget.cc' || echo '$(srcdir)/'`MvQStepWidget.cc
+
+bin_GeoTool-MvQStepWidget.obj: MvQStepWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepWidget.Tpo -c -o bin_GeoTool-MvQStepWidget.obj `if test -f 'MvQStepWidget.cc'; then $(CYGPATH_W) 'MvQStepWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQStepWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.cc' object='bin_GeoTool-MvQStepWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepWidget.obj `if test -f 'MvQStepWidget.cc'; then $(CYGPATH_W) 'MvQStepWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.cc'; fi`
+
+bin_GeoTool-MvQZoom.o: MvQZoom.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoom.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoom.Tpo -c -o bin_GeoTool-MvQZoom.o `test -f 'MvQZoom.cc' || echo '$(srcdir)/'`MvQZoom.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoom.Tpo $(DEPDIR)/bin_GeoTool-MvQZoom.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.cc' object='bin_GeoTool-MvQZoom.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoom.o `test -f 'MvQZoom.cc' || echo '$(srcdir)/'`MvQZoom.cc
+
+bin_GeoTool-MvQZoom.obj: MvQZoom.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoom.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoom.Tpo -c -o bin_GeoTool-MvQZoom.obj `if test -f 'MvQZoom.cc'; then $(CYGPATH_W) 'MvQZoom.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoom.Tpo $(DEPDIR)/bin_GeoTool-MvQZoom.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.cc' object='bin_GeoTool-MvQZoom.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoom.obj `if test -f 'MvQZoom.cc'; then $(CYGPATH_W) 'MvQZoom.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.cc'; fi`
+
+bin_GeoTool-MvQAreaSelection.o: MvQAreaSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQAreaSelection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQAreaSelection.Tpo -c -o bin_GeoTool-MvQAreaSelection.o `test -f 'MvQAreaSelection.cc' || echo '$(srcdir)/'`MvQAreaSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQAreaSelection.Tpo $(DEPDIR)/bin_GeoTool-MvQAreaSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.cc' object='bin_GeoTool-MvQAreaSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQAreaSelection.o `test -f 'MvQAreaSelection.cc' || echo '$(srcdir)/'`MvQAreaSelection.cc
+
+bin_GeoTool-MvQAreaSelection.obj: MvQAreaSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQAreaSelection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQAreaSelection.Tpo -c -o bin_GeoTool-MvQAreaSelection.obj `if test -f 'MvQAreaSelection.cc'; then $(CYGPATH_W) 'MvQAreaSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQAreaSelection.Tpo $(DEPDIR)/bin_GeoTool-MvQAreaSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.cc' object='bin_GeoTool-MvQAreaSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQAreaSelection.obj `if test -f 'MvQAreaSelection.cc'; then $(CYGPATH_W) 'MvQAreaSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.cc'; fi`
+
+bin_GeoTool-MvQLineSelection.o: MvQLineSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLineSelection.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLineSelection.Tpo -c -o bin_GeoTool-MvQLineSelection.o `test -f 'MvQLineSelection.cc' || echo '$(srcdir)/'`MvQLineSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLineSelection.Tpo $(DEPDIR)/bin_GeoTool-MvQLineSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.cc' object='bin_GeoTool-MvQLineSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLineSelection.o `test -f 'MvQLineSelection.cc' || echo '$(srcdir)/'`MvQLineSelection.cc
+
+bin_GeoTool-MvQLineSelection.obj: MvQLineSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLineSelection.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLineSelection.Tpo -c -o bin_GeoTool-MvQLineSelection.obj `if test -f 'MvQLineSelection.cc'; then $(CYGPATH_W) 'MvQLineSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLineSelection.Tpo $(DEPDIR)/bin_GeoTool-MvQLineSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.cc' object='bin_GeoTool-MvQLineSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLineSelection.obj `if test -f 'MvQLineSelection.cc'; then $(CYGPATH_W) 'MvQLineSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.cc'; fi`
+
+bin_GeoTool-MvQZoomStackWidget.o: MvQZoomStackWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoomStackWidget.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Tpo -c -o bin_GeoTool-MvQZoomStackWidget.o `test -f 'MvQZoomStackWidget.cc' || echo '$(srcdir)/'`MvQZoomStackWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.cc' object='bin_GeoTool-MvQZoomStackWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoomStackWidget.o `test -f 'MvQZoomStackWidget.cc' || echo '$(srcdir)/'`MvQZoomStackWidget.cc
+
+bin_GeoTool-MvQZoomStackWidget.obj: MvQZoomStackWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoomStackWidget.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Tpo -c -o bin_GeoTool-MvQZoomStackWidget.obj `if test -f 'MvQZoomStackWidget.cc'; then $(CYGPATH_W) 'MvQZoomStackWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Tpo $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.cc' object='bin_GeoTool-MvQZoomStackWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoomStackWidget.obj `if test -f 'MvQZoomStackWidget.cc'; then $(CYGPATH_W) 'MvQZoomStackWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.cc'; fi`
+
+bin_GeoTool-ExportDialog.o: ExportDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ExportDialog.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-ExportDialog.Tpo -c -o bin_GeoTool-ExportDialog.o `test -f 'ExportDialog.cc' || echo '$(srcdir)/'`ExportDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ExportDialog.Tpo $(DEPDIR)/bin_GeoTool-ExportDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.cc' object='bin_GeoTool-ExportDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ExportDialog.o `test -f 'ExportDialog.cc' || echo '$(srcdir)/'`ExportDialog.cc
+
+bin_GeoTool-ExportDialog.obj: ExportDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ExportDialog.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-ExportDialog.Tpo -c -o bin_GeoTool-ExportDialog.obj `if test -f 'ExportDialog.cc'; then $(CYGPATH_W) 'ExportDialog.cc'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ExportDialog.Tpo $(DEPDIR)/bin_GeoTool-ExportDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.cc' object='bin_GeoTool-ExportDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ExportDialog.obj `if test -f 'ExportDialog.cc'; then $(CYGPATH_W) 'ExportDialog.cc'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.cc'; fi`
+
+bin_GeoTool-MagPlusInteractiveService.o: MagPlusInteractiveService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagPlusInteractiveService.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Tpo -c -o bin_GeoTool-MagPlusInteractiveService.o `test -f 'MagPlusInteractiveService.cc' || echo '$(srcdir)/'`MagPlusInteractiveService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Tpo $(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusInteractiveService.cc' object='bin_GeoTool-MagPlusInteractiveService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagPlusInteractiveService.o `test -f 'MagPlusInteractiveService.cc' || echo '$(srcdir)/'`MagPlusInteractiveService.cc
+
+bin_GeoTool-MagPlusInteractiveService.obj: MagPlusInteractiveService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MagPlusInteractiveService.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Tpo -c -o bin_GeoTool-MagPlusInteractiveService.obj `if test -f 'MagPlusInteractiveService.cc'; then $(CYGPATH_W) 'MagPlusInteractiveService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusInteractiveService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Tpo $(DEPDIR)/bin_GeoTool-MagPlusInteractiveService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusInteractiveService.cc' object='bin_GeoTool-MagPlusInteractiveService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MagPlusInteractiveService.obj `if test -f 'MagPlusInteractiveService.cc'; then $(CYGPATH_W) 'MagPlusInteractiveService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusInteractiveService.cc'; fi`
+
+bin_GeoTool-PlotModInteractive.o: PlotModInteractive.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModInteractive.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModInteractive.Tpo -c -o bin_GeoTool-PlotModInteractive.o `test -f 'PlotModInteractive.cc' || echo '$(srcdir)/'`PlotModInteractive.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModInteractive.Tpo $(DEPDIR)/bin_GeoTool-PlotModInteractive.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModInteractive.cc' object='bin_GeoTool-PlotModInteractive.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModInteractive.o `test -f 'PlotModInteractive.cc' || echo '$(srcdir)/'`PlotModInteractive.cc
+
+bin_GeoTool-PlotModInteractive.obj: PlotModInteractive.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-PlotModInteractive.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-PlotModInteractive.Tpo -c -o bin_GeoTool-PlotModInteractive.obj `if test -f 'PlotModInteractive.cc'; then $(CYGPATH_W) 'PlotModInteractive.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModInteractive.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-PlotModInteractive.Tpo $(DEPDIR)/bin_GeoTool-PlotModInteractive.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModInteractive.cc' object='bin_GeoTool-PlotModInteractive.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-PlotModInteractive.obj `if test -f 'PlotModInteractive.cc'; then $(CYGPATH_W) 'PlotModInteractive.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModInteractive.cc'; fi`
+
+bin_GeoTool-uPlotBase.o: uPlotBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlotBase.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlotBase.Tpo -c -o bin_GeoTool-uPlotBase.o `test -f 'uPlotBase.cc' || echo '$(srcdir)/'`uPlotBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlotBase.Tpo $(DEPDIR)/bin_GeoTool-uPlotBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.cc' object='bin_GeoTool-uPlotBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlotBase.o `test -f 'uPlotBase.cc' || echo '$(srcdir)/'`uPlotBase.cc
+
+bin_GeoTool-uPlotBase.obj: uPlotBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlotBase.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlotBase.Tpo -c -o bin_GeoTool-uPlotBase.obj `if test -f 'uPlotBase.cc'; then $(CYGPATH_W) 'uPlotBase.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlotBase.Tpo $(DEPDIR)/bin_GeoTool-uPlotBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.cc' object='bin_GeoTool-uPlotBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlotBase.obj `if test -f 'uPlotBase.cc'; then $(CYGPATH_W) 'uPlotBase.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.cc'; fi`
+
+bin_GeoTool-GeoTool.o: GeoTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GeoTool.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-GeoTool.Tpo -c -o bin_GeoTool-GeoTool.o `test -f 'GeoTool.cc' || echo '$(srcdir)/'`GeoTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GeoTool.Tpo $(DEPDIR)/bin_GeoTool-GeoTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoTool.cc' object='bin_GeoTool-GeoTool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GeoTool.o `test -f 'GeoTool.cc' || echo '$(srcdir)/'`GeoTool.cc
+
+bin_GeoTool-GeoTool.obj: GeoTool.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GeoTool.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-GeoTool.Tpo -c -o bin_GeoTool-GeoTool.obj `if test -f 'GeoTool.cc'; then $(CYGPATH_W) 'GeoTool.cc'; else $(CYGPATH_W) '$(srcdir)/GeoTool.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GeoTool.Tpo $(DEPDIR)/bin_GeoTool-GeoTool.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoTool.cc' object='bin_GeoTool-GeoTool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GeoTool.obj `if test -f 'GeoTool.cc'; then $(CYGPATH_W) 'GeoTool.cc'; else $(CYGPATH_W) '$(srcdir)/GeoTool.cc'; fi`
+
+bin_GeoTool-uPlotApp.o: uPlotApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlotApp.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlotApp.Tpo -c -o bin_GeoTool-uPlotApp.o `test -f 'uPlotApp.cc' || echo '$(srcdir)/'`uPlotApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlotApp.Tpo $(DEPDIR)/bin_GeoTool-uPlotApp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotApp.cc' object='bin_GeoTool-uPlotApp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlotApp.o `test -f 'uPlotApp.cc' || echo '$(srcdir)/'`uPlotApp.cc
+
+bin_GeoTool-uPlotApp.obj: uPlotApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlotApp.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlotApp.Tpo -c -o bin_GeoTool-uPlotApp.obj `if test -f 'uPlotApp.cc'; then $(CYGPATH_W) 'uPlotApp.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotApp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlotApp.Tpo $(DEPDIR)/bin_GeoTool-uPlotApp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotApp.cc' object='bin_GeoTool-uPlotApp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlotApp.obj `if test -f 'uPlotApp.cc'; then $(CYGPATH_W) 'uPlotApp.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotApp.cc'; fi`
+
+bin_GeoTool-MvQContentsWidget.moc.o: MvQContentsWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQContentsWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Tpo -c -o bin_GeoTool-MvQContentsWidget.moc.o `test -f 'MvQContentsWidget.moc.cpp' || echo '$(srcdir)/'`MvQContentsWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.moc.cpp' object='bin_GeoTool-MvQContentsWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQContentsWidget.moc.o `test -f 'MvQContentsWidget.moc.cpp' || echo '$(srcdir)/'`MvQContentsWidget.moc.cpp
+
+bin_GeoTool-MvQContentsWidget.moc.obj: MvQContentsWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQContentsWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Tpo -c -o bin_GeoTool-MvQContentsWidget.moc.obj `if test -f 'MvQContentsWidget.moc.cpp'; then $(CYGPATH_W) 'MvQContentsWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQContentsWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.moc.cpp' object='bin_GeoTool-MvQContentsWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQContentsWidget.moc.obj `if test -f 'MvQContentsWidget.moc.cpp'; then $(CYGPATH_W) 'MvQContentsWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQCursorData.moc.o: MvQCursorData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorData.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Tpo -c -o bin_GeoTool-MvQCursorData.moc.o `test -f 'MvQCursorData.moc.cpp' || echo '$(srcdir)/'`MvQCursorData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.moc.cpp' object='bin_GeoTool-MvQCursorData.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorData.moc.o `test -f 'MvQCursorData.moc.cpp' || echo '$(srcdir)/'`MvQCursorData.moc.cpp
+
+bin_GeoTool-MvQCursorData.moc.obj: MvQCursorData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorData.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Tpo -c -o bin_GeoTool-MvQCursorData.moc.obj `if test -f 'MvQCursorData.moc.cpp'; then $(CYGPATH_W) 'MvQCursorData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.moc.cpp' object='bin_GeoTool-MvQCursorData.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorData.moc.obj `if test -f 'MvQCursorData.moc.cpp'; then $(CYGPATH_W) 'MvQCursorData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.moc.cpp'; fi`
+
+bin_GeoTool-MvQCursorDataWidget.moc.o: MvQCursorDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Tpo -c -o bin_GeoTool-MvQCursorDataWidget.moc.o `test -f 'MvQCursorDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQCursorDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.moc.cpp' object='bin_GeoTool-MvQCursorDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorDataWidget.moc.o `test -f 'MvQCursorDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQCursorDataWidget.moc.cpp
+
+bin_GeoTool-MvQCursorDataWidget.moc.obj: MvQCursorDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQCursorDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Tpo -c -o bin_GeoTool-MvQCursorDataWidget.moc.obj `if test -f 'MvQCursorDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQCursorDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQCursorDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.moc.cpp' object='bin_GeoTool-MvQCursorDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQCursorDataWidget.moc.obj `if test -f 'MvQCursorDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQCursorDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQDataWidget.moc.o: MvQDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Tpo -c -o bin_GeoTool-MvQDataWidget.moc.o `test -f 'MvQDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.moc.cpp' object='bin_GeoTool-MvQDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQDataWidget.moc.o `test -f 'MvQDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQDataWidget.moc.cpp
+
+bin_GeoTool-MvQDataWidget.moc.obj: MvQDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Tpo -c -o bin_GeoTool-MvQDataWidget.moc.obj `if test -f 'MvQDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.moc.cpp' object='bin_GeoTool-MvQDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQDataWidget.moc.obj `if test -f 'MvQDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQLayerModel.moc.o: MvQLayerModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerModel.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Tpo -c -o bin_GeoTool-MvQLayerModel.moc.o `test -f 'MvQLayerModel.moc.cpp' || echo '$(srcdir)/'`MvQLayerModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.moc.cpp' object='bin_GeoTool-MvQLayerModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerModel.moc.o `test -f 'MvQLayerModel.moc.cpp' || echo '$(srcdir)/'`MvQLayerModel.moc.cpp
+
+bin_GeoTool-MvQLayerModel.moc.obj: MvQLayerModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerModel.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Tpo -c -o bin_GeoTool-MvQLayerModel.moc.obj `if test -f 'MvQLayerModel.moc.cpp'; then $(CYGPATH_W) 'MvQLayerModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.moc.cpp' object='bin_GeoTool-MvQLayerModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerModel.moc.obj `if test -f 'MvQLayerModel.moc.cpp'; then $(CYGPATH_W) 'MvQLayerModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.moc.cpp'; fi`
+
+bin_GeoTool-MvQLayerWidget.moc.o: MvQLayerWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Tpo -c -o bin_GeoTool-MvQLayerWidget.moc.o `test -f 'MvQLayerWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.moc.cpp' object='bin_GeoTool-MvQLayerWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerWidget.moc.o `test -f 'MvQLayerWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerWidget.moc.cpp
+
+bin_GeoTool-MvQLayerWidget.moc.obj: MvQLayerWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Tpo -c -o bin_GeoTool-MvQLayerWidget.moc.obj `if test -f 'MvQLayerWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.moc.cpp' object='bin_GeoTool-MvQLayerWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerWidget.moc.obj `if test -f 'MvQLayerWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQLayerDataWidget.moc.o: MvQLayerDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Tpo -c -o bin_GeoTool-MvQLayerDataWidget.moc.o `test -f 'MvQLayerDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.moc.cpp' object='bin_GeoTool-MvQLayerDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerDataWidget.moc.o `test -f 'MvQLayerDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerDataWidget.moc.cpp
+
+bin_GeoTool-MvQLayerDataWidget.moc.obj: MvQLayerDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Tpo -c -o bin_GeoTool-MvQLayerDataWidget.moc.obj `if test -f 'MvQLayerDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.moc.cpp' object='bin_GeoTool-MvQLayerDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerDataWidget.moc.obj `if test -f 'MvQLayerDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQLayerMetaDataWidget.moc.o: MvQLayerMetaDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerMetaDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Tpo -c -o bin_GeoTool-MvQLayerMetaDataWidget.moc.o `test -f 'MvQLayerMetaDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.moc.cpp' object='bin_GeoTool-MvQLayerMetaDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerMetaDataWidget.moc.o `test -f 'MvQLayerMetaDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.moc.cpp
+
+bin_GeoTool-MvQLayerMetaDataWidget.moc.obj: MvQLayerMetaDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLayerMetaDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Tpo -c -o bin_GeoTool-MvQLayerMetaDataWidget.moc.obj `if test -f 'MvQLayerMetaDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLayerMetaDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.moc.cpp' object='bin_GeoTool-MvQLayerMetaDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLayerMetaDataWidget.moc.obj `if test -f 'MvQLayerMetaDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQMagnifier.moc.o: MvQMagnifier.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQMagnifier.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Tpo -c -o bin_GeoTool-MvQMagnifier.moc.o `test -f 'MvQMagnifier.moc.cpp' || echo '$(srcdir)/'`MvQMagnifier.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.moc.cpp' object='bin_GeoTool-MvQMagnifier.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQMagnifier.moc.o `test -f 'MvQMagnifier.moc.cpp' || echo '$(srcdir)/'`MvQMagnifier.moc.cpp
+
+bin_GeoTool-MvQMagnifier.moc.obj: MvQMagnifier.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQMagnifier.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Tpo -c -o bin_GeoTool-MvQMagnifier.moc.obj `if test -f 'MvQMagnifier.moc.cpp'; then $(CYGPATH_W) 'MvQMagnifier.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQMagnifier.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.moc.cpp' object='bin_GeoTool-MvQMagnifier.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQMagnifier.moc.obj `if test -f 'MvQMagnifier.moc.cpp'; then $(CYGPATH_W) 'MvQMagnifier.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.moc.cpp'; fi`
+
+bin_GeoTool-MvQPlaceMark.moc.o: MvQPlaceMark.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMark.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Tpo -c -o bin_GeoTool-MvQPlaceMark.moc.o `test -f 'MvQPlaceMark.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMark.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.moc.cpp' object='bin_GeoTool-MvQPlaceMark.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMark.moc.o `test -f 'MvQPlaceMark.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMark.moc.cpp
+
+bin_GeoTool-MvQPlaceMark.moc.obj: MvQPlaceMark.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMark.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Tpo -c -o bin_GeoTool-MvQPlaceMark.moc.obj `if test -f 'MvQPlaceMark.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMark.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMark.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.moc.cpp' object='bin_GeoTool-MvQPlaceMark.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMark.moc.obj `if test -f 'MvQPlaceMark.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMark.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.moc.cpp'; fi`
+
+bin_GeoTool-MvQPlaceMarkDialog.moc.o: MvQPlaceMarkDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkDialog.moc.o `test -f 'MvQPlaceMarkDialog.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.moc.cpp' object='bin_GeoTool-MvQPlaceMarkDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkDialog.moc.o `test -f 'MvQPlaceMarkDialog.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkDialog.moc.cpp
+
+bin_GeoTool-MvQPlaceMarkDialog.moc.obj: MvQPlaceMarkDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkDialog.moc.obj `if test -f 'MvQPlaceMarkDialog.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.moc.cpp' object='bin_GeoTool-MvQPlaceMarkDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkDialog.moc.obj `if test -f 'MvQPlaceMarkDialog.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.moc.cpp'; fi`
+
+bin_GeoTool-MvQPlaceMarkWidget.moc.o: MvQPlaceMarkWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkWidget.moc.o `test -f 'MvQPlaceMarkWidget.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.moc.cpp' object='bin_GeoTool-MvQPlaceMarkWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkWidget.moc.o `test -f 'MvQPlaceMarkWidget.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkWidget.moc.cpp
+
+bin_GeoTool-MvQPlaceMarkWidget.moc.obj: MvQPlaceMarkWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkWidget.moc.obj `if test -f 'MvQPlaceMarkWidget.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.moc.cpp' object='bin_GeoTool-MvQPlaceMarkWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkWidget.moc.obj `if test -f 'MvQPlaceMarkWidget.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQPlaceMarkMimeData.moc.o: MvQPlaceMarkMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkMimeData.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkMimeData.moc.o `test -f 'MvQPlaceMarkMimeData.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.moc.cpp' object='bin_GeoTool-MvQPlaceMarkMimeData.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkMimeData.moc.o `test -f 'MvQPlaceMarkMimeData.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.moc.cpp
+
+bin_GeoTool-MvQPlaceMarkMimeData.moc.obj: MvQPlaceMarkMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkMimeData.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkMimeData.moc.obj `if test -f 'MvQPlaceMarkMimeData.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkMimeData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.moc.cpp' object='bin_GeoTool-MvQPlaceMarkMimeData.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkMimeData.moc.obj `if test -f 'MvQPlaceMarkMimeData.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.moc.cpp'; fi`
+
+bin_GeoTool-MvQPlaceMarkModel.moc.o: MvQPlaceMarkModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkModel.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkModel.moc.o `test -f 'MvQPlaceMarkModel.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.moc.cpp' object='bin_GeoTool-MvQPlaceMarkModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkModel.moc.o `test -f 'MvQPlaceMarkModel.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkModel.moc.cpp
+
+bin_GeoTool-MvQPlaceMarkModel.moc.obj: MvQPlaceMarkModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlaceMarkModel.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Tpo -c -o bin_GeoTool-MvQPlaceMarkModel.moc.obj `if test -f 'MvQPlaceMarkModel.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlaceMarkModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.moc.cpp' object='bin_GeoTool-MvQPlaceMarkModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlaceMarkModel.moc.obj `if test -f 'MvQPlaceMarkModel.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.moc.cpp'; fi`
+
+bin_GeoTool-MvQStepModel.moc.o: MvQStepModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepModel.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Tpo -c -o bin_GeoTool-MvQStepModel.moc.o `test -f 'MvQStepModel.moc.cpp' || echo '$(srcdir)/'`MvQStepModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.moc.cpp' object='bin_GeoTool-MvQStepModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepModel.moc.o `test -f 'MvQStepModel.moc.cpp' || echo '$(srcdir)/'`MvQStepModel.moc.cpp
+
+bin_GeoTool-MvQStepModel.moc.obj: MvQStepModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepModel.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Tpo -c -o bin_GeoTool-MvQStepModel.moc.obj `if test -f 'MvQStepModel.moc.cpp'; then $(CYGPATH_W) 'MvQStepModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQStepModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.moc.cpp' object='bin_GeoTool-MvQStepModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepModel.moc.obj `if test -f 'MvQStepModel.moc.cpp'; then $(CYGPATH_W) 'MvQStepModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.moc.cpp'; fi`
+
+bin_GeoTool-MvQStepWidget.moc.o: MvQStepWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Tpo -c -o bin_GeoTool-MvQStepWidget.moc.o `test -f 'MvQStepWidget.moc.cpp' || echo '$(srcdir)/'`MvQStepWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.moc.cpp' object='bin_GeoTool-MvQStepWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepWidget.moc.o `test -f 'MvQStepWidget.moc.cpp' || echo '$(srcdir)/'`MvQStepWidget.moc.cpp
+
+bin_GeoTool-MvQStepWidget.moc.obj: MvQStepWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQStepWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Tpo -c -o bin_GeoTool-MvQStepWidget.moc.obj `if test -f 'MvQStepWidget.moc.cpp'; then $(CYGPATH_W) 'MvQStepWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQStepWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.moc.cpp' object='bin_GeoTool-MvQStepWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQStepWidget.moc.obj `if test -f 'MvQStepWidget.moc.cpp'; then $(CYGPATH_W) 'MvQStepWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.moc.cpp'; fi`
+
+bin_GeoTool-MvQPlotView.moc.o: MvQPlotView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlotView.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Tpo -c -o bin_GeoTool-MvQPlotView.moc.o `test -f 'MvQPlotView.moc.cpp' || echo '$(srcdir)/'`MvQPlotView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.moc.cpp' object='bin_GeoTool-MvQPlotView.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlotView.moc.o `test -f 'MvQPlotView.moc.cpp' || echo '$(srcdir)/'`MvQPlotView.moc.cpp
+
+bin_GeoTool-MvQPlotView.moc.obj: MvQPlotView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPlotView.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Tpo -c -o bin_GeoTool-MvQPlotView.moc.obj `if test -f 'MvQPlotView.moc.cpp'; then $(CYGPATH_W) 'MvQPlotView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPlotView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.moc.cpp' object='bin_GeoTool-MvQPlotView.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPlotView.moc.obj `if test -f 'MvQPlotView.moc.cpp'; then $(CYGPATH_W) 'MvQPlotView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.moc.cpp'; fi`
+
+bin_GeoTool-MvQPointSelection.moc.o: MvQPointSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPointSelection.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Tpo -c -o bin_GeoTool-MvQPointSelection.moc.o `test -f 'MvQPointSelection.moc.cpp' || echo '$(srcdir)/'`MvQPointSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.moc.cpp' object='bin_GeoTool-MvQPointSelection.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPointSelection.moc.o `test -f 'MvQPointSelection.moc.cpp' || echo '$(srcdir)/'`MvQPointSelection.moc.cpp
+
+bin_GeoTool-MvQPointSelection.moc.obj: MvQPointSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQPointSelection.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Tpo -c -o bin_GeoTool-MvQPointSelection.moc.obj `if test -f 'MvQPointSelection.moc.cpp'; then $(CYGPATH_W) 'MvQPointSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQPointSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.moc.cpp' object='bin_GeoTool-MvQPointSelection.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQPointSelection.moc.obj `if test -f 'MvQPointSelection.moc.cpp'; then $(CYGPATH_W) 'MvQPointSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.moc.cpp'; fi`
+
+bin_GeoTool-MvQZoom.moc.o: MvQZoom.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoom.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoom.moc.Tpo -c -o bin_GeoTool-MvQZoom.moc.o `test -f 'MvQZoom.moc.cpp' || echo '$(srcdir)/'`MvQZoom.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoom.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQZoom.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.moc.cpp' object='bin_GeoTool-MvQZoom.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoom.moc.o `test -f 'MvQZoom.moc.cpp' || echo '$(srcdir)/'`MvQZoom.moc.cpp
+
+bin_GeoTool-MvQZoom.moc.obj: MvQZoom.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoom.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoom.moc.Tpo -c -o bin_GeoTool-MvQZoom.moc.obj `if test -f 'MvQZoom.moc.cpp'; then $(CYGPATH_W) 'MvQZoom.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoom.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQZoom.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.moc.cpp' object='bin_GeoTool-MvQZoom.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoom.moc.obj `if test -f 'MvQZoom.moc.cpp'; then $(CYGPATH_W) 'MvQZoom.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.moc.cpp'; fi`
+
+bin_GeoTool-MvQAreaSelection.moc.o: MvQAreaSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQAreaSelection.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Tpo -c -o bin_GeoTool-MvQAreaSelection.moc.o `test -f 'MvQAreaSelection.moc.cpp' || echo '$(srcdir)/'`MvQAreaSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.moc.cpp' object='bin_GeoTool-MvQAreaSelection.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQAreaSelection.moc.o `test -f 'MvQAreaSelection.moc.cpp' || echo '$(srcdir)/'`MvQAreaSelection.moc.cpp
+
+bin_GeoTool-MvQAreaSelection.moc.obj: MvQAreaSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQAreaSelection.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Tpo -c -o bin_GeoTool-MvQAreaSelection.moc.obj `if test -f 'MvQAreaSelection.moc.cpp'; then $(CYGPATH_W) 'MvQAreaSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQAreaSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.moc.cpp' object='bin_GeoTool-MvQAreaSelection.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQAreaSelection.moc.obj `if test -f 'MvQAreaSelection.moc.cpp'; then $(CYGPATH_W) 'MvQAreaSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.moc.cpp'; fi`
+
+bin_GeoTool-MvQLineSelection.moc.o: MvQLineSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLineSelection.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Tpo -c -o bin_GeoTool-MvQLineSelection.moc.o `test -f 'MvQLineSelection.moc.cpp' || echo '$(srcdir)/'`MvQLineSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.moc.cpp' object='bin_GeoTool-MvQLineSelection.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLineSelection.moc.o `test -f 'MvQLineSelection.moc.cpp' || echo '$(srcdir)/'`MvQLineSelection.moc.cpp
+
+bin_GeoTool-MvQLineSelection.moc.obj: MvQLineSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQLineSelection.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Tpo -c -o bin_GeoTool-MvQLineSelection.moc.obj `if test -f 'MvQLineSelection.moc.cpp'; then $(CYGPATH_W) 'MvQLineSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQLineSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.moc.cpp' object='bin_GeoTool-MvQLineSelection.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQLineSelection.moc.obj `if test -f 'MvQLineSelection.moc.cpp'; then $(CYGPATH_W) 'MvQLineSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.moc.cpp'; fi`
+
+bin_GeoTool-MvQZoomStackWidget.moc.o: MvQZoomStackWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoomStackWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Tpo -c -o bin_GeoTool-MvQZoomStackWidget.moc.o `test -f 'MvQZoomStackWidget.moc.cpp' || echo '$(srcdir)/'`MvQZoomStackWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.moc.cpp' object='bin_GeoTool-MvQZoomStackWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoomStackWidget.moc.o `test -f 'MvQZoomStackWidget.moc.cpp' || echo '$(srcdir)/'`MvQZoomStackWidget.moc.cpp
+
+bin_GeoTool-MvQZoomStackWidget.moc.obj: MvQZoomStackWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-MvQZoomStackWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Tpo -c -o bin_GeoTool-MvQZoomStackWidget.moc.obj `if test -f 'MvQZoomStackWidget.moc.cpp'; then $(CYGPATH_W) 'MvQZoomStackWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Tpo $(DEPDIR)/bin_GeoTool-MvQZoomStackWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.moc.cpp' object='bin_GeoTool-MvQZoomStackWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-MvQZoomStackWidget.moc.obj `if test -f 'MvQZoomStackWidget.moc.cpp'; then $(CYGPATH_W) 'MvQZoomStackWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.moc.cpp'; fi`
+
+bin_GeoTool-ExportDialog.moc.o: ExportDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ExportDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-ExportDialog.moc.Tpo -c -o bin_GeoTool-ExportDialog.moc.o `test -f 'ExportDialog.moc.cpp' || echo '$(srcdir)/'`ExportDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ExportDialog.moc.Tpo $(DEPDIR)/bin_GeoTool-ExportDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.moc.cpp' object='bin_GeoTool-ExportDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ExportDialog.moc.o `test -f 'ExportDialog.moc.cpp' || echo '$(srcdir)/'`ExportDialog.moc.cpp
+
+bin_GeoTool-ExportDialog.moc.obj: ExportDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-ExportDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-ExportDialog.moc.Tpo -c -o bin_GeoTool-ExportDialog.moc.obj `if test -f 'ExportDialog.moc.cpp'; then $(CYGPATH_W) 'ExportDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-ExportDialog.moc.Tpo $(DEPDIR)/bin_GeoTool-ExportDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.moc.cpp' object='bin_GeoTool-ExportDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-ExportDialog.moc.obj `if test -f 'ExportDialog.moc.cpp'; then $(CYGPATH_W) 'ExportDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.moc.cpp'; fi`
+
+bin_GeoTool-uPlotBase.moc.o: uPlotBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlotBase.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlotBase.moc.Tpo -c -o bin_GeoTool-uPlotBase.moc.o `test -f 'uPlotBase.moc.cpp' || echo '$(srcdir)/'`uPlotBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlotBase.moc.Tpo $(DEPDIR)/bin_GeoTool-uPlotBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.moc.cpp' object='bin_GeoTool-uPlotBase.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlotBase.moc.o `test -f 'uPlotBase.moc.cpp' || echo '$(srcdir)/'`uPlotBase.moc.cpp
+
+bin_GeoTool-uPlotBase.moc.obj: uPlotBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlotBase.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlotBase.moc.Tpo -c -o bin_GeoTool-uPlotBase.moc.obj `if test -f 'uPlotBase.moc.cpp'; then $(CYGPATH_W) 'uPlotBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlotBase.moc.Tpo $(DEPDIR)/bin_GeoTool-uPlotBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.moc.cpp' object='bin_GeoTool-uPlotBase.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlotBase.moc.obj `if test -f 'uPlotBase.moc.cpp'; then $(CYGPATH_W) 'uPlotBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.moc.cpp'; fi`
+
+bin_GeoTool-uPlot.qrc.o: uPlot.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlot.qrc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlot.qrc.Tpo -c -o bin_GeoTool-uPlot.qrc.o `test -f 'uPlot.qrc.cpp' || echo '$(srcdir)/'`uPlot.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlot.qrc.Tpo $(DEPDIR)/bin_GeoTool-uPlot.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.qrc.cpp' object='bin_GeoTool-uPlot.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlot.qrc.o `test -f 'uPlot.qrc.cpp' || echo '$(srcdir)/'`uPlot.qrc.cpp
+
+bin_GeoTool-uPlot.qrc.obj: uPlot.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-uPlot.qrc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-uPlot.qrc.Tpo -c -o bin_GeoTool-uPlot.qrc.obj `if test -f 'uPlot.qrc.cpp'; then $(CYGPATH_W) 'uPlot.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlot.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-uPlot.qrc.Tpo $(DEPDIR)/bin_GeoTool-uPlot.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.qrc.cpp' object='bin_GeoTool-uPlot.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-uPlot.qrc.obj `if test -f 'uPlot.qrc.cpp'; then $(CYGPATH_W) 'uPlot.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlot.qrc.cpp'; fi`
+
+bin_GeoTool-GeoTool.moc.o: GeoTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GeoTool.moc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-GeoTool.moc.Tpo -c -o bin_GeoTool-GeoTool.moc.o `test -f 'GeoTool.moc.cpp' || echo '$(srcdir)/'`GeoTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GeoTool.moc.Tpo $(DEPDIR)/bin_GeoTool-GeoTool.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoTool.moc.cpp' object='bin_GeoTool-GeoTool.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GeoTool.moc.o `test -f 'GeoTool.moc.cpp' || echo '$(srcdir)/'`GeoTool.moc.cpp
+
+bin_GeoTool-GeoTool.moc.obj: GeoTool.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-GeoTool.moc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-GeoTool.moc.Tpo -c -o bin_GeoTool-GeoTool.moc.obj `if test -f 'GeoTool.moc.cpp'; then $(CYGPATH_W) 'GeoTool.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GeoTool.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-GeoTool.moc.Tpo $(DEPDIR)/bin_GeoTool-GeoTool.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoTool.moc.cpp' object='bin_GeoTool-GeoTool.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-GeoTool.moc.obj `if test -f 'GeoTool.moc.cpp'; then $(CYGPATH_W) 'GeoTool.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/GeoTool.moc.cpp'; fi`
+
+bin_GeoTool-geoSelect.qrc.o: geoSelect.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-geoSelect.qrc.o -MD -MP -MF $(DEPDIR)/bin_GeoTool-geoSelect.qrc.Tpo -c -o bin_GeoTool-geoSelect.qrc.o `test -f 'geoSelect.qrc.cpp' || echo '$(srcdir)/'`geoSelect.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-geoSelect.qrc.Tpo $(DEPDIR)/bin_GeoTool-geoSelect.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='geoSelect.qrc.cpp' object='bin_GeoTool-geoSelect.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-geoSelect.qrc.o `test -f 'geoSelect.qrc.cpp' || echo '$(srcdir)/'`geoSelect.qrc.cpp
+
+bin_GeoTool-geoSelect.qrc.obj: geoSelect.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoTool-geoSelect.qrc.obj -MD -MP -MF $(DEPDIR)/bin_GeoTool-geoSelect.qrc.Tpo -c -o bin_GeoTool-geoSelect.qrc.obj `if test -f 'geoSelect.qrc.cpp'; then $(CYGPATH_W) 'geoSelect.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/geoSelect.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoTool-geoSelect.qrc.Tpo $(DEPDIR)/bin_GeoTool-geoSelect.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='geoSelect.qrc.cpp' object='bin_GeoTool-geoSelect.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoTool_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoTool-geoSelect.qrc.obj `if test -f 'geoSelect.qrc.cpp'; then $(CYGPATH_W) 'geoSelect.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/geoSelect.qrc.cpp'; fi`
+
+bin_GeoToolManager-GeoToolManager.o: GeoToolManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToolManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoToolManager-GeoToolManager.o -MD -MP -MF $(DEPDIR)/bin_GeoToolManager-GeoToolManager.Tpo -c -o bin_GeoToolManager-GeoToolManager.o `test -f 'GeoToolManager.cc' || echo '$(srcdir)/'`GeoToolManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoToolManager-GeoToolManager.Tpo $(DEPDIR)/bin_GeoToolManager-GeoToolManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoToolManager.cc' object='bin_GeoToolManager-GeoToolManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToolManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoToolManager-GeoToolManager.o `test -f 'GeoToolManager.cc' || echo '$(srcdir)/'`GeoToolManager.cc
+
+bin_GeoToolManager-GeoToolManager.obj: GeoToolManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToolManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_GeoToolManager-GeoToolManager.obj -MD -MP -MF $(DEPDIR)/bin_GeoToolManager-GeoToolManager.Tpo -c -o bin_GeoToolManager-GeoToolManager.obj `if test -f 'GeoToolManager.cc'; then $(CYGPATH_W) 'GeoToolManager.cc'; else $(CYGPATH_W) '$(srcdir)/GeoToolManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_GeoToolManager-GeoToolManager.Tpo $(DEPDIR)/bin_GeoToolManager-GeoToolManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoToolManager.cc' object='bin_GeoToolManager-GeoToolManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_GeoToolManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_GeoToolManager-GeoToolManager.obj `if test -f 'GeoToolManager.cc'; then $(CYGPATH_W) 'GeoToolManager.cc'; else $(CYGPATH_W) '$(srcdir)/GeoToolManager.cc'; fi`
+
+bin_uPlot-MvMain.o: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvMain.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvMain.Tpo -c -o bin_uPlot-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvMain.Tpo $(DEPDIR)/bin_uPlot-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_uPlot-MvMain.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvMain.o `test -f 'MvMain.cc' || echo '$(srcdir)/'`MvMain.cc
+
+bin_uPlot-MvMain.obj: MvMain.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvMain.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvMain.Tpo -c -o bin_uPlot-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvMain.Tpo $(DEPDIR)/bin_uPlot-MvMain.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMain.cc' object='bin_uPlot-MvMain.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvMain.obj `if test -f 'MvMain.cc'; then $(CYGPATH_W) 'MvMain.cc'; else $(CYGPATH_W) '$(srcdir)/MvMain.cc'; fi`
+
+bin_uPlot-AverageView.o: AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-AverageView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-AverageView.Tpo -c -o bin_uPlot-AverageView.o `test -f 'AverageView.cc' || echo '$(srcdir)/'`AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-AverageView.Tpo $(DEPDIR)/bin_uPlot-AverageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='AverageView.cc' object='bin_uPlot-AverageView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-AverageView.o `test -f 'AverageView.cc' || echo '$(srcdir)/'`AverageView.cc
+
+bin_uPlot-AverageView.obj: AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-AverageView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-AverageView.Tpo -c -o bin_uPlot-AverageView.obj `if test -f 'AverageView.cc'; then $(CYGPATH_W) 'AverageView.cc'; else $(CYGPATH_W) '$(srcdir)/AverageView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-AverageView.Tpo $(DEPDIR)/bin_uPlot-AverageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='AverageView.cc' object='bin_uPlot-AverageView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-AverageView.obj `if test -f 'AverageView.cc'; then $(CYGPATH_W) 'AverageView.cc'; else $(CYGPATH_W) '$(srcdir)/AverageView.cc'; fi`
+
+bin_uPlot-BufrDecoder.o: BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-BufrDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-BufrDecoder.Tpo -c -o bin_uPlot-BufrDecoder.o `test -f 'BufrDecoder.cc' || echo '$(srcdir)/'`BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-BufrDecoder.Tpo $(DEPDIR)/bin_uPlot-BufrDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrDecoder.cc' object='bin_uPlot-BufrDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-BufrDecoder.o `test -f 'BufrDecoder.cc' || echo '$(srcdir)/'`BufrDecoder.cc
+
+bin_uPlot-BufrDecoder.obj: BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-BufrDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-BufrDecoder.Tpo -c -o bin_uPlot-BufrDecoder.obj `if test -f 'BufrDecoder.cc'; then $(CYGPATH_W) 'BufrDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/BufrDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-BufrDecoder.Tpo $(DEPDIR)/bin_uPlot-BufrDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrDecoder.cc' object='bin_uPlot-BufrDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-BufrDecoder.obj `if test -f 'BufrDecoder.cc'; then $(CYGPATH_W) 'BufrDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/BufrDecoder.cc'; fi`
+
+bin_uPlot-Canvas.o: Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Canvas.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Canvas.Tpo -c -o bin_uPlot-Canvas.o `test -f 'Canvas.cc' || echo '$(srcdir)/'`Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Canvas.Tpo $(DEPDIR)/bin_uPlot-Canvas.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Canvas.cc' object='bin_uPlot-Canvas.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Canvas.o `test -f 'Canvas.cc' || echo '$(srcdir)/'`Canvas.cc
+
+bin_uPlot-Canvas.obj: Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Canvas.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Canvas.Tpo -c -o bin_uPlot-Canvas.obj `if test -f 'Canvas.cc'; then $(CYGPATH_W) 'Canvas.cc'; else $(CYGPATH_W) '$(srcdir)/Canvas.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Canvas.Tpo $(DEPDIR)/bin_uPlot-Canvas.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Canvas.cc' object='bin_uPlot-Canvas.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Canvas.obj `if test -f 'Canvas.cc'; then $(CYGPATH_W) 'Canvas.cc'; else $(CYGPATH_W) '$(srcdir)/Canvas.cc'; fi`
+
+bin_uPlot-CartesianView.o: CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CartesianView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-CartesianView.Tpo -c -o bin_uPlot-CartesianView.o `test -f 'CartesianView.cc' || echo '$(srcdir)/'`CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CartesianView.Tpo $(DEPDIR)/bin_uPlot-CartesianView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CartesianView.cc' object='bin_uPlot-CartesianView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CartesianView.o `test -f 'CartesianView.cc' || echo '$(srcdir)/'`CartesianView.cc
+
+bin_uPlot-CartesianView.obj: CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CartesianView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-CartesianView.Tpo -c -o bin_uPlot-CartesianView.obj `if test -f 'CartesianView.cc'; then $(CYGPATH_W) 'CartesianView.cc'; else $(CYGPATH_W) '$(srcdir)/CartesianView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CartesianView.Tpo $(DEPDIR)/bin_uPlot-CartesianView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CartesianView.cc' object='bin_uPlot-CartesianView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CartesianView.obj `if test -f 'CartesianView.cc'; then $(CYGPATH_W) 'CartesianView.cc'; else $(CYGPATH_W) '$(srcdir)/CartesianView.cc'; fi`
+
+bin_uPlot-CommonXSectView.o: CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CommonXSectView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-CommonXSectView.Tpo -c -o bin_uPlot-CommonXSectView.o `test -f 'CommonXSectView.cc' || echo '$(srcdir)/'`CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CommonXSectView.Tpo $(DEPDIR)/bin_uPlot-CommonXSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CommonXSectView.cc' object='bin_uPlot-CommonXSectView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CommonXSectView.o `test -f 'CommonXSectView.cc' || echo '$(srcdir)/'`CommonXSectView.cc
+
+bin_uPlot-CommonXSectView.obj: CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CommonXSectView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-CommonXSectView.Tpo -c -o bin_uPlot-CommonXSectView.obj `if test -f 'CommonXSectView.cc'; then $(CYGPATH_W) 'CommonXSectView.cc'; else $(CYGPATH_W) '$(srcdir)/CommonXSectView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CommonXSectView.Tpo $(DEPDIR)/bin_uPlot-CommonXSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CommonXSectView.cc' object='bin_uPlot-CommonXSectView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CommonXSectView.obj `if test -f 'CommonXSectView.cc'; then $(CYGPATH_W) 'CommonXSectView.cc'; else $(CYGPATH_W) '$(srcdir)/CommonXSectView.cc'; fi`
+
+bin_uPlot-CreateAction.o: CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CreateAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-CreateAction.Tpo -c -o bin_uPlot-CreateAction.o `test -f 'CreateAction.cc' || echo '$(srcdir)/'`CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CreateAction.Tpo $(DEPDIR)/bin_uPlot-CreateAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateAction.cc' object='bin_uPlot-CreateAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CreateAction.o `test -f 'CreateAction.cc' || echo '$(srcdir)/'`CreateAction.cc
+
+bin_uPlot-CreateAction.obj: CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CreateAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-CreateAction.Tpo -c -o bin_uPlot-CreateAction.obj `if test -f 'CreateAction.cc'; then $(CYGPATH_W) 'CreateAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CreateAction.Tpo $(DEPDIR)/bin_uPlot-CreateAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateAction.cc' object='bin_uPlot-CreateAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CreateAction.obj `if test -f 'CreateAction.cc'; then $(CYGPATH_W) 'CreateAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateAction.cc'; fi`
+
+bin_uPlot-CreateTypeAction.o: CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CreateTypeAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-CreateTypeAction.Tpo -c -o bin_uPlot-CreateTypeAction.o `test -f 'CreateTypeAction.cc' || echo '$(srcdir)/'`CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CreateTypeAction.Tpo $(DEPDIR)/bin_uPlot-CreateTypeAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateTypeAction.cc' object='bin_uPlot-CreateTypeAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CreateTypeAction.o `test -f 'CreateTypeAction.cc' || echo '$(srcdir)/'`CreateTypeAction.cc
+
+bin_uPlot-CreateTypeAction.obj: CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-CreateTypeAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-CreateTypeAction.Tpo -c -o bin_uPlot-CreateTypeAction.obj `if test -f 'CreateTypeAction.cc'; then $(CYGPATH_W) 'CreateTypeAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateTypeAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-CreateTypeAction.Tpo $(DEPDIR)/bin_uPlot-CreateTypeAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateTypeAction.cc' object='bin_uPlot-CreateTypeAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-CreateTypeAction.obj `if test -f 'CreateTypeAction.cc'; then $(CYGPATH_W) 'CreateTypeAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateTypeAction.cc'; fi`
+
+bin_uPlot-DataBuilder.o: DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DataBuilder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-DataBuilder.Tpo -c -o bin_uPlot-DataBuilder.o `test -f 'DataBuilder.cc' || echo '$(srcdir)/'`DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DataBuilder.Tpo $(DEPDIR)/bin_uPlot-DataBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataBuilder.cc' object='bin_uPlot-DataBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DataBuilder.o `test -f 'DataBuilder.cc' || echo '$(srcdir)/'`DataBuilder.cc
+
+bin_uPlot-DataBuilder.obj: DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DataBuilder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-DataBuilder.Tpo -c -o bin_uPlot-DataBuilder.obj `if test -f 'DataBuilder.cc'; then $(CYGPATH_W) 'DataBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/DataBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DataBuilder.Tpo $(DEPDIR)/bin_uPlot-DataBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataBuilder.cc' object='bin_uPlot-DataBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DataBuilder.obj `if test -f 'DataBuilder.cc'; then $(CYGPATH_W) 'DataBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/DataBuilder.cc'; fi`
+
+bin_uPlot-DataObject.o: DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DataObject.o -MD -MP -MF $(DEPDIR)/bin_uPlot-DataObject.Tpo -c -o bin_uPlot-DataObject.o `test -f 'DataObject.cc' || echo '$(srcdir)/'`DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DataObject.Tpo $(DEPDIR)/bin_uPlot-DataObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataObject.cc' object='bin_uPlot-DataObject.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DataObject.o `test -f 'DataObject.cc' || echo '$(srcdir)/'`DataObject.cc
+
+bin_uPlot-DataObject.obj: DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DataObject.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-DataObject.Tpo -c -o bin_uPlot-DataObject.obj `if test -f 'DataObject.cc'; then $(CYGPATH_W) 'DataObject.cc'; else $(CYGPATH_W) '$(srcdir)/DataObject.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DataObject.Tpo $(DEPDIR)/bin_uPlot-DataObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataObject.cc' object='bin_uPlot-DataObject.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DataObject.obj `if test -f 'DataObject.cc'; then $(CYGPATH_W) 'DataObject.cc'; else $(CYGPATH_W) '$(srcdir)/DataObject.cc'; fi`
+
+bin_uPlot-Decoder.o: Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Decoder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Decoder.Tpo -c -o bin_uPlot-Decoder.o `test -f 'Decoder.cc' || echo '$(srcdir)/'`Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Decoder.Tpo $(DEPDIR)/bin_uPlot-Decoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Decoder.cc' object='bin_uPlot-Decoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Decoder.o `test -f 'Decoder.cc' || echo '$(srcdir)/'`Decoder.cc
+
+bin_uPlot-Decoder.obj: Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Decoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Decoder.Tpo -c -o bin_uPlot-Decoder.obj `if test -f 'Decoder.cc'; then $(CYGPATH_W) 'Decoder.cc'; else $(CYGPATH_W) '$(srcdir)/Decoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Decoder.Tpo $(DEPDIR)/bin_uPlot-Decoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Decoder.cc' object='bin_uPlot-Decoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Decoder.obj `if test -f 'Decoder.cc'; then $(CYGPATH_W) 'Decoder.cc'; else $(CYGPATH_W) '$(srcdir)/Decoder.cc'; fi`
+
+bin_uPlot-Device.o: Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Device.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Device.Tpo -c -o bin_uPlot-Device.o `test -f 'Device.cc' || echo '$(srcdir)/'`Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Device.Tpo $(DEPDIR)/bin_uPlot-Device.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Device.cc' object='bin_uPlot-Device.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Device.o `test -f 'Device.cc' || echo '$(srcdir)/'`Device.cc
+
+bin_uPlot-Device.obj: Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Device.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Device.Tpo -c -o bin_uPlot-Device.obj `if test -f 'Device.cc'; then $(CYGPATH_W) 'Device.cc'; else $(CYGPATH_W) '$(srcdir)/Device.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Device.Tpo $(DEPDIR)/bin_uPlot-Device.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Device.cc' object='bin_uPlot-Device.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Device.obj `if test -f 'Device.cc'; then $(CYGPATH_W) 'Device.cc'; else $(CYGPATH_W) '$(srcdir)/Device.cc'; fi`
+
+bin_uPlot-DrawingPriority.o: DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DrawingPriority.o -MD -MP -MF $(DEPDIR)/bin_uPlot-DrawingPriority.Tpo -c -o bin_uPlot-DrawingPriority.o `test -f 'DrawingPriority.cc' || echo '$(srcdir)/'`DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DrawingPriority.Tpo $(DEPDIR)/bin_uPlot-DrawingPriority.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DrawingPriority.cc' object='bin_uPlot-DrawingPriority.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DrawingPriority.o `test -f 'DrawingPriority.cc' || echo '$(srcdir)/'`DrawingPriority.cc
+
+bin_uPlot-DrawingPriority.obj: DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DrawingPriority.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-DrawingPriority.Tpo -c -o bin_uPlot-DrawingPriority.obj `if test -f 'DrawingPriority.cc'; then $(CYGPATH_W) 'DrawingPriority.cc'; else $(CYGPATH_W) '$(srcdir)/DrawingPriority.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DrawingPriority.Tpo $(DEPDIR)/bin_uPlot-DrawingPriority.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DrawingPriority.cc' object='bin_uPlot-DrawingPriority.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DrawingPriority.obj `if test -f 'DrawingPriority.cc'; then $(CYGPATH_W) 'DrawingPriority.cc'; else $(CYGPATH_W) '$(srcdir)/DrawingPriority.cc'; fi`
+
+bin_uPlot-DropAction.o: DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DropAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-DropAction.Tpo -c -o bin_uPlot-DropAction.o `test -f 'DropAction.cc' || echo '$(srcdir)/'`DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DropAction.Tpo $(DEPDIR)/bin_uPlot-DropAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropAction.cc' object='bin_uPlot-DropAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DropAction.o `test -f 'DropAction.cc' || echo '$(srcdir)/'`DropAction.cc
+
+bin_uPlot-DropAction.obj: DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-DropAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-DropAction.Tpo -c -o bin_uPlot-DropAction.obj `if test -f 'DropAction.cc'; then $(CYGPATH_W) 'DropAction.cc'; else $(CYGPATH_W) '$(srcdir)/DropAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-DropAction.Tpo $(DEPDIR)/bin_uPlot-DropAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropAction.cc' object='bin_uPlot-DropAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-DropAction.obj `if test -f 'DropAction.cc'; then $(CYGPATH_W) 'DropAction.cc'; else $(CYGPATH_W) '$(srcdir)/DropAction.cc'; fi`
+
+bin_uPlot-GeopointsDecoder.o: GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GeopointsDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-GeopointsDecoder.Tpo -c -o bin_uPlot-GeopointsDecoder.o `test -f 'GeopointsDecoder.cc' || echo '$(srcdir)/'`GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GeopointsDecoder.Tpo $(DEPDIR)/bin_uPlot-GeopointsDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopointsDecoder.cc' object='bin_uPlot-GeopointsDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GeopointsDecoder.o `test -f 'GeopointsDecoder.cc' || echo '$(srcdir)/'`GeopointsDecoder.cc
+
+bin_uPlot-GeopointsDecoder.obj: GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GeopointsDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-GeopointsDecoder.Tpo -c -o bin_uPlot-GeopointsDecoder.obj `if test -f 'GeopointsDecoder.cc'; then $(CYGPATH_W) 'GeopointsDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GeopointsDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GeopointsDecoder.Tpo $(DEPDIR)/bin_uPlot-GeopointsDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopointsDecoder.cc' object='bin_uPlot-GeopointsDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GeopointsDecoder.obj `if test -f 'GeopointsDecoder.cc'; then $(CYGPATH_W) 'GeopointsDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GeopointsDecoder.cc'; fi`
+
+bin_uPlot-GraphicsEngine.o: GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GraphicsEngine.o -MD -MP -MF $(DEPDIR)/bin_uPlot-GraphicsEngine.Tpo -c -o bin_uPlot-GraphicsEngine.o `test -f 'GraphicsEngine.cc' || echo '$(srcdir)/'`GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GraphicsEngine.Tpo $(DEPDIR)/bin_uPlot-GraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GraphicsEngine.cc' object='bin_uPlot-GraphicsEngine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GraphicsEngine.o `test -f 'GraphicsEngine.cc' || echo '$(srcdir)/'`GraphicsEngine.cc
+
+bin_uPlot-GraphicsEngine.obj: GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GraphicsEngine.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-GraphicsEngine.Tpo -c -o bin_uPlot-GraphicsEngine.obj `if test -f 'GraphicsEngine.cc'; then $(CYGPATH_W) 'GraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/GraphicsEngine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GraphicsEngine.Tpo $(DEPDIR)/bin_uPlot-GraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GraphicsEngine.cc' object='bin_uPlot-GraphicsEngine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GraphicsEngine.obj `if test -f 'GraphicsEngine.cc'; then $(CYGPATH_W) 'GraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/GraphicsEngine.cc'; fi`
+
+bin_uPlot-GribDecoder.o: GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GribDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-GribDecoder.Tpo -c -o bin_uPlot-GribDecoder.o `test -f 'GribDecoder.cc' || echo '$(srcdir)/'`GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GribDecoder.Tpo $(DEPDIR)/bin_uPlot-GribDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribDecoder.cc' object='bin_uPlot-GribDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GribDecoder.o `test -f 'GribDecoder.cc' || echo '$(srcdir)/'`GribDecoder.cc
+
+bin_uPlot-GribDecoder.obj: GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GribDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-GribDecoder.Tpo -c -o bin_uPlot-GribDecoder.obj `if test -f 'GribDecoder.cc'; then $(CYGPATH_W) 'GribDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GribDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GribDecoder.Tpo $(DEPDIR)/bin_uPlot-GribDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribDecoder.cc' object='bin_uPlot-GribDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GribDecoder.obj `if test -f 'GribDecoder.cc'; then $(CYGPATH_W) 'GribDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GribDecoder.cc'; fi`
+
+bin_uPlot-Location.o: Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Location.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Location.Tpo -c -o bin_uPlot-Location.o `test -f 'Location.cc' || echo '$(srcdir)/'`Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Location.Tpo $(DEPDIR)/bin_uPlot-Location.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Location.cc' object='bin_uPlot-Location.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Location.o `test -f 'Location.cc' || echo '$(srcdir)/'`Location.cc
+
+bin_uPlot-Location.obj: Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Location.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Location.Tpo -c -o bin_uPlot-Location.obj `if test -f 'Location.cc'; then $(CYGPATH_W) 'Location.cc'; else $(CYGPATH_W) '$(srcdir)/Location.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Location.Tpo $(DEPDIR)/bin_uPlot-Location.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Location.cc' object='bin_uPlot-Location.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Location.obj `if test -f 'Location.cc'; then $(CYGPATH_W) 'Location.cc'; else $(CYGPATH_W) '$(srcdir)/Location.cc'; fi`
+
+bin_uPlot-MvLayer.o: MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvLayer.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvLayer.Tpo -c -o bin_uPlot-MvLayer.o `test -f 'MvLayer.cc' || echo '$(srcdir)/'`MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvLayer.Tpo $(DEPDIR)/bin_uPlot-MvLayer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvLayer.cc' object='bin_uPlot-MvLayer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvLayer.o `test -f 'MvLayer.cc' || echo '$(srcdir)/'`MvLayer.cc
+
+bin_uPlot-MvLayer.obj: MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvLayer.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvLayer.Tpo -c -o bin_uPlot-MvLayer.obj `if test -f 'MvLayer.cc'; then $(CYGPATH_W) 'MvLayer.cc'; else $(CYGPATH_W) '$(srcdir)/MvLayer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvLayer.Tpo $(DEPDIR)/bin_uPlot-MvLayer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvLayer.cc' object='bin_uPlot-MvLayer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvLayer.obj `if test -f 'MvLayer.cc'; then $(CYGPATH_W) 'MvLayer.cc'; else $(CYGPATH_W) '$(srcdir)/MvLayer.cc'; fi`
+
+bin_uPlot-MacroConverter.o: MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MacroConverter.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MacroConverter.Tpo -c -o bin_uPlot-MacroConverter.o `test -f 'MacroConverter.cc' || echo '$(srcdir)/'`MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MacroConverter.Tpo $(DEPDIR)/bin_uPlot-MacroConverter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroConverter.cc' object='bin_uPlot-MacroConverter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MacroConverter.o `test -f 'MacroConverter.cc' || echo '$(srcdir)/'`MacroConverter.cc
+
+bin_uPlot-MacroConverter.obj: MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MacroConverter.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MacroConverter.Tpo -c -o bin_uPlot-MacroConverter.obj `if test -f 'MacroConverter.cc'; then $(CYGPATH_W) 'MacroConverter.cc'; else $(CYGPATH_W) '$(srcdir)/MacroConverter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MacroConverter.Tpo $(DEPDIR)/bin_uPlot-MacroConverter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroConverter.cc' object='bin_uPlot-MacroConverter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MacroConverter.obj `if test -f 'MacroConverter.cc'; then $(CYGPATH_W) 'MacroConverter.cc'; else $(CYGPATH_W) '$(srcdir)/MacroConverter.cc'; fi`
+
+bin_uPlot-MacroVisitor.o: MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MacroVisitor.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MacroVisitor.Tpo -c -o bin_uPlot-MacroVisitor.o `test -f 'MacroVisitor.cc' || echo '$(srcdir)/'`MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MacroVisitor.Tpo $(DEPDIR)/bin_uPlot-MacroVisitor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroVisitor.cc' object='bin_uPlot-MacroVisitor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MacroVisitor.o `test -f 'MacroVisitor.cc' || echo '$(srcdir)/'`MacroVisitor.cc
+
+bin_uPlot-MacroVisitor.obj: MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MacroVisitor.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MacroVisitor.Tpo -c -o bin_uPlot-MacroVisitor.obj `if test -f 'MacroVisitor.cc'; then $(CYGPATH_W) 'MacroVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroVisitor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MacroVisitor.Tpo $(DEPDIR)/bin_uPlot-MacroVisitor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroVisitor.cc' object='bin_uPlot-MacroVisitor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MacroVisitor.obj `if test -f 'MacroVisitor.cc'; then $(CYGPATH_W) 'MacroVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroVisitor.cc'; fi`
+
+bin_uPlot-MagicsGraphicsEngine.o: MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagicsGraphicsEngine.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Tpo -c -o bin_uPlot-MagicsGraphicsEngine.o `test -f 'MagicsGraphicsEngine.cc' || echo '$(srcdir)/'`MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Tpo $(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsGraphicsEngine.cc' object='bin_uPlot-MagicsGraphicsEngine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagicsGraphicsEngine.o `test -f 'MagicsGraphicsEngine.cc' || echo '$(srcdir)/'`MagicsGraphicsEngine.cc
+
+bin_uPlot-MagicsGraphicsEngine.obj: MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagicsGraphicsEngine.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Tpo -c -o bin_uPlot-MagicsGraphicsEngine.obj `if test -f 'MagicsGraphicsEngine.cc'; then $(CYGPATH_W) 'MagicsGraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsGraphicsEngine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Tpo $(DEPDIR)/bin_uPlot-MagicsGraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsGraphicsEngine.cc' object='bin_uPlot-MagicsGraphicsEngine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagicsGraphicsEngine.obj `if test -f 'MagicsGraphicsEngine.cc'; then $(CYGPATH_W) 'MagicsGraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsGraphicsEngine.cc'; fi`
+
+bin_uPlot-MagicsTranslator.o: MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagicsTranslator.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MagicsTranslator.Tpo -c -o bin_uPlot-MagicsTranslator.o `test -f 'MagicsTranslator.cc' || echo '$(srcdir)/'`MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagicsTranslator.Tpo $(DEPDIR)/bin_uPlot-MagicsTranslator.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsTranslator.cc' object='bin_uPlot-MagicsTranslator.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagicsTranslator.o `test -f 'MagicsTranslator.cc' || echo '$(srcdir)/'`MagicsTranslator.cc
+
+bin_uPlot-MagicsTranslator.obj: MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagicsTranslator.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MagicsTranslator.Tpo -c -o bin_uPlot-MagicsTranslator.obj `if test -f 'MagicsTranslator.cc'; then $(CYGPATH_W) 'MagicsTranslator.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsTranslator.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagicsTranslator.Tpo $(DEPDIR)/bin_uPlot-MagicsTranslator.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsTranslator.cc' object='bin_uPlot-MagicsTranslator.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagicsTranslator.obj `if test -f 'MagicsTranslator.cc'; then $(CYGPATH_W) 'MagicsTranslator.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsTranslator.cc'; fi`
+
+bin_uPlot-MagPlusService.o: MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagPlusService.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MagPlusService.Tpo -c -o bin_uPlot-MagPlusService.o `test -f 'MagPlusService.cc' || echo '$(srcdir)/'`MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagPlusService.Tpo $(DEPDIR)/bin_uPlot-MagPlusService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusService.cc' object='bin_uPlot-MagPlusService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagPlusService.o `test -f 'MagPlusService.cc' || echo '$(srcdir)/'`MagPlusService.cc
+
+bin_uPlot-MagPlusService.obj: MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagPlusService.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MagPlusService.Tpo -c -o bin_uPlot-MagPlusService.obj `if test -f 'MagPlusService.cc'; then $(CYGPATH_W) 'MagPlusService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagPlusService.Tpo $(DEPDIR)/bin_uPlot-MagPlusService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusService.cc' object='bin_uPlot-MagPlusService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagPlusService.obj `if test -f 'MagPlusService.cc'; then $(CYGPATH_W) 'MagPlusService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusService.cc'; fi`
+
+bin_uPlot-MapView.o: MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MapView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MapView.Tpo -c -o bin_uPlot-MapView.o `test -f 'MapView.cc' || echo '$(srcdir)/'`MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MapView.Tpo $(DEPDIR)/bin_uPlot-MapView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MapView.cc' object='bin_uPlot-MapView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MapView.o `test -f 'MapView.cc' || echo '$(srcdir)/'`MapView.cc
+
+bin_uPlot-MapView.obj: MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MapView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MapView.Tpo -c -o bin_uPlot-MapView.obj `if test -f 'MapView.cc'; then $(CYGPATH_W) 'MapView.cc'; else $(CYGPATH_W) '$(srcdir)/MapView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MapView.Tpo $(DEPDIR)/bin_uPlot-MapView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MapView.cc' object='bin_uPlot-MapView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MapView.obj `if test -f 'MapView.cc'; then $(CYGPATH_W) 'MapView.cc'; else $(CYGPATH_W) '$(srcdir)/MapView.cc'; fi`
+
+bin_uPlot-MatchingCriteria.o: MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MatchingCriteria.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MatchingCriteria.Tpo -c -o bin_uPlot-MatchingCriteria.o `test -f 'MatchingCriteria.cc' || echo '$(srcdir)/'`MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MatchingCriteria.Tpo $(DEPDIR)/bin_uPlot-MatchingCriteria.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingCriteria.cc' object='bin_uPlot-MatchingCriteria.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MatchingCriteria.o `test -f 'MatchingCriteria.cc' || echo '$(srcdir)/'`MatchingCriteria.cc
+
+bin_uPlot-MatchingCriteria.obj: MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MatchingCriteria.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MatchingCriteria.Tpo -c -o bin_uPlot-MatchingCriteria.obj `if test -f 'MatchingCriteria.cc'; then $(CYGPATH_W) 'MatchingCriteria.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingCriteria.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MatchingCriteria.Tpo $(DEPDIR)/bin_uPlot-MatchingCriteria.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingCriteria.cc' object='bin_uPlot-MatchingCriteria.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MatchingCriteria.obj `if test -f 'MatchingCriteria.cc'; then $(CYGPATH_W) 'MatchingCriteria.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingCriteria.cc'; fi`
+
+bin_uPlot-MatchingInfo.o: MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MatchingInfo.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MatchingInfo.Tpo -c -o bin_uPlot-MatchingInfo.o `test -f 'MatchingInfo.cc' || echo '$(srcdir)/'`MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MatchingInfo.Tpo $(DEPDIR)/bin_uPlot-MatchingInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingInfo.cc' object='bin_uPlot-MatchingInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MatchingInfo.o `test -f 'MatchingInfo.cc' || echo '$(srcdir)/'`MatchingInfo.cc
+
+bin_uPlot-MatchingInfo.obj: MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MatchingInfo.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MatchingInfo.Tpo -c -o bin_uPlot-MatchingInfo.obj `if test -f 'MatchingInfo.cc'; then $(CYGPATH_W) 'MatchingInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MatchingInfo.Tpo $(DEPDIR)/bin_uPlot-MatchingInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingInfo.cc' object='bin_uPlot-MatchingInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MatchingInfo.obj `if test -f 'MatchingInfo.cc'; then $(CYGPATH_W) 'MatchingInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingInfo.cc'; fi`
+
+bin_uPlot-MvIcon.o: MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvIcon.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvIcon.Tpo -c -o bin_uPlot-MvIcon.o `test -f 'MvIcon.cc' || echo '$(srcdir)/'`MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvIcon.Tpo $(DEPDIR)/bin_uPlot-MvIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIcon.cc' object='bin_uPlot-MvIcon.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvIcon.o `test -f 'MvIcon.cc' || echo '$(srcdir)/'`MvIcon.cc
+
+bin_uPlot-MvIcon.obj: MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvIcon.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvIcon.Tpo -c -o bin_uPlot-MvIcon.obj `if test -f 'MvIcon.cc'; then $(CYGPATH_W) 'MvIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvIcon.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvIcon.Tpo $(DEPDIR)/bin_uPlot-MvIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIcon.cc' object='bin_uPlot-MvIcon.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvIcon.obj `if test -f 'MvIcon.cc'; then $(CYGPATH_W) 'MvIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvIcon.cc'; fi`
+
+bin_uPlot-MvIconDataBase.o: MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvIconDataBase.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvIconDataBase.Tpo -c -o bin_uPlot-MvIconDataBase.o `test -f 'MvIconDataBase.cc' || echo '$(srcdir)/'`MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvIconDataBase.Tpo $(DEPDIR)/bin_uPlot-MvIconDataBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIconDataBase.cc' object='bin_uPlot-MvIconDataBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvIconDataBase.o `test -f 'MvIconDataBase.cc' || echo '$(srcdir)/'`MvIconDataBase.cc
+
+bin_uPlot-MvIconDataBase.obj: MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvIconDataBase.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvIconDataBase.Tpo -c -o bin_uPlot-MvIconDataBase.obj `if test -f 'MvIconDataBase.cc'; then $(CYGPATH_W) 'MvIconDataBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvIconDataBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvIconDataBase.Tpo $(DEPDIR)/bin_uPlot-MvIconDataBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIconDataBase.cc' object='bin_uPlot-MvIconDataBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvIconDataBase.obj `if test -f 'MvIconDataBase.cc'; then $(CYGPATH_W) 'MvIconDataBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvIconDataBase.cc'; fi`
+
+bin_uPlot-NewpageAction.o: NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-NewpageAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-NewpageAction.Tpo -c -o bin_uPlot-NewpageAction.o `test -f 'NewpageAction.cc' || echo '$(srcdir)/'`NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-NewpageAction.Tpo $(DEPDIR)/bin_uPlot-NewpageAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NewpageAction.cc' object='bin_uPlot-NewpageAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-NewpageAction.o `test -f 'NewpageAction.cc' || echo '$(srcdir)/'`NewpageAction.cc
+
+bin_uPlot-NewpageAction.obj: NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-NewpageAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-NewpageAction.Tpo -c -o bin_uPlot-NewpageAction.obj `if test -f 'NewpageAction.cc'; then $(CYGPATH_W) 'NewpageAction.cc'; else $(CYGPATH_W) '$(srcdir)/NewpageAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-NewpageAction.Tpo $(DEPDIR)/bin_uPlot-NewpageAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NewpageAction.cc' object='bin_uPlot-NewpageAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-NewpageAction.obj `if test -f 'NewpageAction.cc'; then $(CYGPATH_W) 'NewpageAction.cc'; else $(CYGPATH_W) '$(srcdir)/NewpageAction.cc'; fi`
+
+bin_uPlot-ObjectInfo.o: ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ObjectInfo.o -MD -MP -MF $(DEPDIR)/bin_uPlot-ObjectInfo.Tpo -c -o bin_uPlot-ObjectInfo.o `test -f 'ObjectInfo.cc' || echo '$(srcdir)/'`ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ObjectInfo.Tpo $(DEPDIR)/bin_uPlot-ObjectInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectInfo.cc' object='bin_uPlot-ObjectInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ObjectInfo.o `test -f 'ObjectInfo.cc' || echo '$(srcdir)/'`ObjectInfo.cc
+
+bin_uPlot-ObjectInfo.obj: ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ObjectInfo.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-ObjectInfo.Tpo -c -o bin_uPlot-ObjectInfo.obj `if test -f 'ObjectInfo.cc'; then $(CYGPATH_W) 'ObjectInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ObjectInfo.Tpo $(DEPDIR)/bin_uPlot-ObjectInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectInfo.cc' object='bin_uPlot-ObjectInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ObjectInfo.obj `if test -f 'ObjectInfo.cc'; then $(CYGPATH_W) 'ObjectInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectInfo.cc'; fi`
+
+bin_uPlot-ObjectList.o: ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ObjectList.o -MD -MP -MF $(DEPDIR)/bin_uPlot-ObjectList.Tpo -c -o bin_uPlot-ObjectList.o `test -f 'ObjectList.cc' || echo '$(srcdir)/'`ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ObjectList.Tpo $(DEPDIR)/bin_uPlot-ObjectList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectList.cc' object='bin_uPlot-ObjectList.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ObjectList.o `test -f 'ObjectList.cc' || echo '$(srcdir)/'`ObjectList.cc
+
+bin_uPlot-ObjectList.obj: ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ObjectList.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-ObjectList.Tpo -c -o bin_uPlot-ObjectList.obj `if test -f 'ObjectList.cc'; then $(CYGPATH_W) 'ObjectList.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectList.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ObjectList.Tpo $(DEPDIR)/bin_uPlot-ObjectList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectList.cc' object='bin_uPlot-ObjectList.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ObjectList.obj `if test -f 'ObjectList.cc'; then $(CYGPATH_W) 'ObjectList.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectList.cc'; fi`
+
+bin_uPlot-OutputFormatAction.o: OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-OutputFormatAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-OutputFormatAction.Tpo -c -o bin_uPlot-OutputFormatAction.o `test -f 'OutputFormatAction.cc' || echo '$(srcdir)/'`OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-OutputFormatAction.Tpo $(DEPDIR)/bin_uPlot-OutputFormatAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputFormatAction.cc' object='bin_uPlot-OutputFormatAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-OutputFormatAction.o `test -f 'OutputFormatAction.cc' || echo '$(srcdir)/'`OutputFormatAction.cc
+
+bin_uPlot-OutputFormatAction.obj: OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-OutputFormatAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-OutputFormatAction.Tpo -c -o bin_uPlot-OutputFormatAction.obj `if test -f 'OutputFormatAction.cc'; then $(CYGPATH_W) 'OutputFormatAction.cc'; else $(CYGPATH_W) '$(srcdir)/OutputFormatAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-OutputFormatAction.Tpo $(DEPDIR)/bin_uPlot-OutputFormatAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputFormatAction.cc' object='bin_uPlot-OutputFormatAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-OutputFormatAction.obj `if test -f 'OutputFormatAction.cc'; then $(CYGPATH_W) 'OutputFormatAction.cc'; else $(CYGPATH_W) '$(srcdir)/OutputFormatAction.cc'; fi`
+
+bin_uPlot-Page.o: Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Page.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Page.Tpo -c -o bin_uPlot-Page.o `test -f 'Page.cc' || echo '$(srcdir)/'`Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Page.Tpo $(DEPDIR)/bin_uPlot-Page.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Page.cc' object='bin_uPlot-Page.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Page.o `test -f 'Page.cc' || echo '$(srcdir)/'`Page.cc
+
+bin_uPlot-Page.obj: Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Page.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Page.Tpo -c -o bin_uPlot-Page.obj `if test -f 'Page.cc'; then $(CYGPATH_W) 'Page.cc'; else $(CYGPATH_W) '$(srcdir)/Page.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Page.Tpo $(DEPDIR)/bin_uPlot-Page.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Page.cc' object='bin_uPlot-Page.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Page.obj `if test -f 'Page.cc'; then $(CYGPATH_W) 'Page.cc'; else $(CYGPATH_W) '$(srcdir)/Page.cc'; fi`
+
+bin_uPlot-PlotAction.o: PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotAction.Tpo -c -o bin_uPlot-PlotAction.o `test -f 'PlotAction.cc' || echo '$(srcdir)/'`PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotAction.Tpo $(DEPDIR)/bin_uPlot-PlotAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotAction.cc' object='bin_uPlot-PlotAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotAction.o `test -f 'PlotAction.cc' || echo '$(srcdir)/'`PlotAction.cc
+
+bin_uPlot-PlotAction.obj: PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotAction.Tpo -c -o bin_uPlot-PlotAction.obj `if test -f 'PlotAction.cc'; then $(CYGPATH_W) 'PlotAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotAction.Tpo $(DEPDIR)/bin_uPlot-PlotAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotAction.cc' object='bin_uPlot-PlotAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotAction.obj `if test -f 'PlotAction.cc'; then $(CYGPATH_W) 'PlotAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotAction.cc'; fi`
+
+bin_uPlot-PlotMod.o: PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotMod.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotMod.Tpo -c -o bin_uPlot-PlotMod.o `test -f 'PlotMod.cc' || echo '$(srcdir)/'`PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotMod.Tpo $(DEPDIR)/bin_uPlot-PlotMod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotMod.cc' object='bin_uPlot-PlotMod.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotMod.o `test -f 'PlotMod.cc' || echo '$(srcdir)/'`PlotMod.cc
+
+bin_uPlot-PlotMod.obj: PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotMod.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotMod.Tpo -c -o bin_uPlot-PlotMod.obj `if test -f 'PlotMod.cc'; then $(CYGPATH_W) 'PlotMod.cc'; else $(CYGPATH_W) '$(srcdir)/PlotMod.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotMod.Tpo $(DEPDIR)/bin_uPlot-PlotMod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotMod.cc' object='bin_uPlot-PlotMod.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotMod.obj `if test -f 'PlotMod.cc'; then $(CYGPATH_W) 'PlotMod.cc'; else $(CYGPATH_W) '$(srcdir)/PlotMod.cc'; fi`
+
+bin_uPlot-PlotModAction.o: PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModAction.Tpo -c -o bin_uPlot-PlotModAction.o `test -f 'PlotModAction.cc' || echo '$(srcdir)/'`PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModAction.Tpo $(DEPDIR)/bin_uPlot-PlotModAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModAction.cc' object='bin_uPlot-PlotModAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModAction.o `test -f 'PlotModAction.cc' || echo '$(srcdir)/'`PlotModAction.cc
+
+bin_uPlot-PlotModAction.obj: PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModAction.Tpo -c -o bin_uPlot-PlotModAction.obj `if test -f 'PlotModAction.cc'; then $(CYGPATH_W) 'PlotModAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModAction.Tpo $(DEPDIR)/bin_uPlot-PlotModAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModAction.cc' object='bin_uPlot-PlotModAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModAction.obj `if test -f 'PlotModAction.cc'; then $(CYGPATH_W) 'PlotModAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModAction.cc'; fi`
+
+bin_uPlot-PlotModBuilder.o: PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModBuilder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModBuilder.Tpo -c -o bin_uPlot-PlotModBuilder.o `test -f 'PlotModBuilder.cc' || echo '$(srcdir)/'`PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModBuilder.Tpo $(DEPDIR)/bin_uPlot-PlotModBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBuilder.cc' object='bin_uPlot-PlotModBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModBuilder.o `test -f 'PlotModBuilder.cc' || echo '$(srcdir)/'`PlotModBuilder.cc
+
+bin_uPlot-PlotModBuilder.obj: PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModBuilder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModBuilder.Tpo -c -o bin_uPlot-PlotModBuilder.obj `if test -f 'PlotModBuilder.cc'; then $(CYGPATH_W) 'PlotModBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModBuilder.Tpo $(DEPDIR)/bin_uPlot-PlotModBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBuilder.cc' object='bin_uPlot-PlotModBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModBuilder.obj `if test -f 'PlotModBuilder.cc'; then $(CYGPATH_W) 'PlotModBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBuilder.cc'; fi`
+
+bin_uPlot-PlotModService.o: PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModService.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModService.Tpo -c -o bin_uPlot-PlotModService.o `test -f 'PlotModService.cc' || echo '$(srcdir)/'`PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModService.Tpo $(DEPDIR)/bin_uPlot-PlotModService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModService.cc' object='bin_uPlot-PlotModService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModService.o `test -f 'PlotModService.cc' || echo '$(srcdir)/'`PlotModService.cc
+
+bin_uPlot-PlotModService.obj: PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModService.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModService.Tpo -c -o bin_uPlot-PlotModService.obj `if test -f 'PlotModService.cc'; then $(CYGPATH_W) 'PlotModService.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModService.Tpo $(DEPDIR)/bin_uPlot-PlotModService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModService.cc' object='bin_uPlot-PlotModService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModService.obj `if test -f 'PlotModService.cc'; then $(CYGPATH_W) 'PlotModService.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModService.cc'; fi`
+
+bin_uPlot-PlotModTask.o: PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModTask.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModTask.Tpo -c -o bin_uPlot-PlotModTask.o `test -f 'PlotModTask.cc' || echo '$(srcdir)/'`PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModTask.Tpo $(DEPDIR)/bin_uPlot-PlotModTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModTask.cc' object='bin_uPlot-PlotModTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModTask.o `test -f 'PlotModTask.cc' || echo '$(srcdir)/'`PlotModTask.cc
+
+bin_uPlot-PlotModTask.obj: PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModTask.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModTask.Tpo -c -o bin_uPlot-PlotModTask.obj `if test -f 'PlotModTask.cc'; then $(CYGPATH_W) 'PlotModTask.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModTask.Tpo $(DEPDIR)/bin_uPlot-PlotModTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModTask.cc' object='bin_uPlot-PlotModTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModTask.obj `if test -f 'PlotModTask.cc'; then $(CYGPATH_W) 'PlotModTask.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModTask.cc'; fi`
+
+bin_uPlot-PlotModView.o: PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModView.Tpo -c -o bin_uPlot-PlotModView.o `test -f 'PlotModView.cc' || echo '$(srcdir)/'`PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModView.Tpo $(DEPDIR)/bin_uPlot-PlotModView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModView.cc' object='bin_uPlot-PlotModView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModView.o `test -f 'PlotModView.cc' || echo '$(srcdir)/'`PlotModView.cc
+
+bin_uPlot-PlotModView.obj: PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModView.Tpo -c -o bin_uPlot-PlotModView.obj `if test -f 'PlotModView.cc'; then $(CYGPATH_W) 'PlotModView.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModView.Tpo $(DEPDIR)/bin_uPlot-PlotModView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModView.cc' object='bin_uPlot-PlotModView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModView.obj `if test -f 'PlotModView.cc'; then $(CYGPATH_W) 'PlotModView.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModView.cc'; fi`
+
+bin_uPlot-PlotPageBuilder.o: PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotPageBuilder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotPageBuilder.Tpo -c -o bin_uPlot-PlotPageBuilder.o `test -f 'PlotPageBuilder.cc' || echo '$(srcdir)/'`PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotPageBuilder.Tpo $(DEPDIR)/bin_uPlot-PlotPageBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotPageBuilder.cc' object='bin_uPlot-PlotPageBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotPageBuilder.o `test -f 'PlotPageBuilder.cc' || echo '$(srcdir)/'`PlotPageBuilder.cc
+
+bin_uPlot-PlotPageBuilder.obj: PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotPageBuilder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotPageBuilder.Tpo -c -o bin_uPlot-PlotPageBuilder.obj `if test -f 'PlotPageBuilder.cc'; then $(CYGPATH_W) 'PlotPageBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotPageBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotPageBuilder.Tpo $(DEPDIR)/bin_uPlot-PlotPageBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotPageBuilder.cc' object='bin_uPlot-PlotPageBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotPageBuilder.obj `if test -f 'PlotPageBuilder.cc'; then $(CYGPATH_W) 'PlotPageBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotPageBuilder.cc'; fi`
+
+bin_uPlot-PmContext.o: PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmContext.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PmContext.Tpo -c -o bin_uPlot-PmContext.o `test -f 'PmContext.cc' || echo '$(srcdir)/'`PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmContext.Tpo $(DEPDIR)/bin_uPlot-PmContext.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmContext.cc' object='bin_uPlot-PmContext.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmContext.o `test -f 'PmContext.cc' || echo '$(srcdir)/'`PmContext.cc
+
+bin_uPlot-PmContext.obj: PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmContext.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PmContext.Tpo -c -o bin_uPlot-PmContext.obj `if test -f 'PmContext.cc'; then $(CYGPATH_W) 'PmContext.cc'; else $(CYGPATH_W) '$(srcdir)/PmContext.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmContext.Tpo $(DEPDIR)/bin_uPlot-PmContext.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmContext.cc' object='bin_uPlot-PmContext.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmContext.obj `if test -f 'PmContext.cc'; then $(CYGPATH_W) 'PmContext.cc'; else $(CYGPATH_W) '$(srcdir)/PmContext.cc'; fi`
+
+bin_uPlot-PmIndividualProjection.o: PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmIndividualProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PmIndividualProjection.Tpo -c -o bin_uPlot-PmIndividualProjection.o `test -f 'PmIndividualProjection.cc' || echo '$(srcdir)/'`PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmIndividualProjection.Tpo $(DEPDIR)/bin_uPlot-PmIndividualProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmIndividualProjection.cc' object='bin_uPlot-PmIndividualProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmIndividualProjection.o `test -f 'PmIndividualProjection.cc' || echo '$(srcdir)/'`PmIndividualProjection.cc
+
+bin_uPlot-PmIndividualProjection.obj: PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmIndividualProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PmIndividualProjection.Tpo -c -o bin_uPlot-PmIndividualProjection.obj `if test -f 'PmIndividualProjection.cc'; then $(CYGPATH_W) 'PmIndividualProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmIndividualProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmIndividualProjection.Tpo $(DEPDIR)/bin_uPlot-PmIndividualProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmIndividualProjection.cc' object='bin_uPlot-PmIndividualProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmIndividualProjection.obj `if test -f 'PmIndividualProjection.cc'; then $(CYGPATH_W) 'PmIndividualProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmIndividualProjection.cc'; fi`
+
+bin_uPlot-PmGeneralProjection.o: PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmGeneralProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PmGeneralProjection.Tpo -c -o bin_uPlot-PmGeneralProjection.o `test -f 'PmGeneralProjection.cc' || echo '$(srcdir)/'`PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmGeneralProjection.Tpo $(DEPDIR)/bin_uPlot-PmGeneralProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmGeneralProjection.cc' object='bin_uPlot-PmGeneralProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmGeneralProjection.o `test -f 'PmGeneralProjection.cc' || echo '$(srcdir)/'`PmGeneralProjection.cc
+
+bin_uPlot-PmGeneralProjection.obj: PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmGeneralProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PmGeneralProjection.Tpo -c -o bin_uPlot-PmGeneralProjection.obj `if test -f 'PmGeneralProjection.cc'; then $(CYGPATH_W) 'PmGeneralProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmGeneralProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmGeneralProjection.Tpo $(DEPDIR)/bin_uPlot-PmGeneralProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmGeneralProjection.cc' object='bin_uPlot-PmGeneralProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmGeneralProjection.obj `if test -f 'PmGeneralProjection.cc'; then $(CYGPATH_W) 'PmGeneralProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmGeneralProjection.cc'; fi`
+
+bin_uPlot-PmProjection.o: PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PmProjection.Tpo -c -o bin_uPlot-PmProjection.o `test -f 'PmProjection.cc' || echo '$(srcdir)/'`PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmProjection.Tpo $(DEPDIR)/bin_uPlot-PmProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmProjection.cc' object='bin_uPlot-PmProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmProjection.o `test -f 'PmProjection.cc' || echo '$(srcdir)/'`PmProjection.cc
+
+bin_uPlot-PmProjection.obj: PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PmProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PmProjection.Tpo -c -o bin_uPlot-PmProjection.obj `if test -f 'PmProjection.cc'; then $(CYGPATH_W) 'PmProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PmProjection.Tpo $(DEPDIR)/bin_uPlot-PmProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmProjection.cc' object='bin_uPlot-PmProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PmProjection.obj `if test -f 'PmProjection.cc'; then $(CYGPATH_W) 'PmProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmProjection.cc'; fi`
+
+bin_uPlot-Preferences.o: Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Preferences.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Preferences.Tpo -c -o bin_uPlot-Preferences.o `test -f 'Preferences.cc' || echo '$(srcdir)/'`Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Preferences.Tpo $(DEPDIR)/bin_uPlot-Preferences.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Preferences.cc' object='bin_uPlot-Preferences.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Preferences.o `test -f 'Preferences.cc' || echo '$(srcdir)/'`Preferences.cc
+
+bin_uPlot-Preferences.obj: Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Preferences.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Preferences.Tpo -c -o bin_uPlot-Preferences.obj `if test -f 'Preferences.cc'; then $(CYGPATH_W) 'Preferences.cc'; else $(CYGPATH_W) '$(srcdir)/Preferences.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Preferences.Tpo $(DEPDIR)/bin_uPlot-Preferences.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Preferences.cc' object='bin_uPlot-Preferences.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Preferences.obj `if test -f 'Preferences.cc'; then $(CYGPATH_W) 'Preferences.cc'; else $(CYGPATH_W) '$(srcdir)/Preferences.cc'; fi`
+
+bin_uPlot-Presentable.o: Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Presentable.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Presentable.Tpo -c -o bin_uPlot-Presentable.o `test -f 'Presentable.cc' || echo '$(srcdir)/'`Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Presentable.Tpo $(DEPDIR)/bin_uPlot-Presentable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Presentable.cc' object='bin_uPlot-Presentable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Presentable.o `test -f 'Presentable.cc' || echo '$(srcdir)/'`Presentable.cc
+
+bin_uPlot-Presentable.obj: Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Presentable.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Presentable.Tpo -c -o bin_uPlot-Presentable.obj `if test -f 'Presentable.cc'; then $(CYGPATH_W) 'Presentable.cc'; else $(CYGPATH_W) '$(srcdir)/Presentable.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Presentable.Tpo $(DEPDIR)/bin_uPlot-Presentable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Presentable.cc' object='bin_uPlot-Presentable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Presentable.obj `if test -f 'Presentable.cc'; then $(CYGPATH_W) 'Presentable.cc'; else $(CYGPATH_W) '$(srcdir)/Presentable.cc'; fi`
+
+bin_uPlot-Root.o: Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Root.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Root.Tpo -c -o bin_uPlot-Root.o `test -f 'Root.cc' || echo '$(srcdir)/'`Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Root.Tpo $(DEPDIR)/bin_uPlot-Root.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Root.cc' object='bin_uPlot-Root.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Root.o `test -f 'Root.cc' || echo '$(srcdir)/'`Root.cc
+
+bin_uPlot-Root.obj: Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Root.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Root.Tpo -c -o bin_uPlot-Root.obj `if test -f 'Root.cc'; then $(CYGPATH_W) 'Root.cc'; else $(CYGPATH_W) '$(srcdir)/Root.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Root.Tpo $(DEPDIR)/bin_uPlot-Root.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Root.cc' object='bin_uPlot-Root.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Root.obj `if test -f 'Root.cc'; then $(CYGPATH_W) 'Root.cc'; else $(CYGPATH_W) '$(srcdir)/Root.cc'; fi`
+
+bin_uPlot-SatelliteProjection.o: SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SatelliteProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-SatelliteProjection.Tpo -c -o bin_uPlot-SatelliteProjection.o `test -f 'SatelliteProjection.cc' || echo '$(srcdir)/'`SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SatelliteProjection.Tpo $(DEPDIR)/bin_uPlot-SatelliteProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SatelliteProjection.cc' object='bin_uPlot-SatelliteProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SatelliteProjection.o `test -f 'SatelliteProjection.cc' || echo '$(srcdir)/'`SatelliteProjection.cc
+
+bin_uPlot-SatelliteProjection.obj: SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SatelliteProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-SatelliteProjection.Tpo -c -o bin_uPlot-SatelliteProjection.obj `if test -f 'SatelliteProjection.cc'; then $(CYGPATH_W) 'SatelliteProjection.cc'; else $(CYGPATH_W) '$(srcdir)/SatelliteProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SatelliteProjection.Tpo $(DEPDIR)/bin_uPlot-SatelliteProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SatelliteProjection.cc' object='bin_uPlot-SatelliteProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SatelliteProjection.obj `if test -f 'SatelliteProjection.cc'; then $(CYGPATH_W) 'SatelliteProjection.cc'; else $(CYGPATH_W) '$(srcdir)/SatelliteProjection.cc'; fi`
+
+bin_uPlot-SimpleDecoder.o: SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SimpleDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlot-SimpleDecoder.Tpo -c -o bin_uPlot-SimpleDecoder.o `test -f 'SimpleDecoder.cc' || echo '$(srcdir)/'`SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SimpleDecoder.Tpo $(DEPDIR)/bin_uPlot-SimpleDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleDecoder.cc' object='bin_uPlot-SimpleDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SimpleDecoder.o `test -f 'SimpleDecoder.cc' || echo '$(srcdir)/'`SimpleDecoder.cc
+
+bin_uPlot-SimpleDecoder.obj: SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SimpleDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-SimpleDecoder.Tpo -c -o bin_uPlot-SimpleDecoder.obj `if test -f 'SimpleDecoder.cc'; then $(CYGPATH_W) 'SimpleDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SimpleDecoder.Tpo $(DEPDIR)/bin_uPlot-SimpleDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleDecoder.cc' object='bin_uPlot-SimpleDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SimpleDecoder.obj `if test -f 'SimpleDecoder.cc'; then $(CYGPATH_W) 'SimpleDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleDecoder.cc'; fi`
+
+bin_uPlot-SkipAction.o: SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SkipAction.o -MD -MP -MF $(DEPDIR)/bin_uPlot-SkipAction.Tpo -c -o bin_uPlot-SkipAction.o `test -f 'SkipAction.cc' || echo '$(srcdir)/'`SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SkipAction.Tpo $(DEPDIR)/bin_uPlot-SkipAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SkipAction.cc' object='bin_uPlot-SkipAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SkipAction.o `test -f 'SkipAction.cc' || echo '$(srcdir)/'`SkipAction.cc
+
+bin_uPlot-SkipAction.obj: SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SkipAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-SkipAction.Tpo -c -o bin_uPlot-SkipAction.obj `if test -f 'SkipAction.cc'; then $(CYGPATH_W) 'SkipAction.cc'; else $(CYGPATH_W) '$(srcdir)/SkipAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SkipAction.Tpo $(DEPDIR)/bin_uPlot-SkipAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SkipAction.cc' object='bin_uPlot-SkipAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SkipAction.obj `if test -f 'SkipAction.cc'; then $(CYGPATH_W) 'SkipAction.cc'; else $(CYGPATH_W) '$(srcdir)/SkipAction.cc'; fi`
+
+bin_uPlot-SubPage.o: SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SubPage.o -MD -MP -MF $(DEPDIR)/bin_uPlot-SubPage.Tpo -c -o bin_uPlot-SubPage.o `test -f 'SubPage.cc' || echo '$(srcdir)/'`SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SubPage.Tpo $(DEPDIR)/bin_uPlot-SubPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SubPage.cc' object='bin_uPlot-SubPage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SubPage.o `test -f 'SubPage.cc' || echo '$(srcdir)/'`SubPage.cc
+
+bin_uPlot-SubPage.obj: SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SubPage.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-SubPage.Tpo -c -o bin_uPlot-SubPage.obj `if test -f 'SubPage.cc'; then $(CYGPATH_W) 'SubPage.cc'; else $(CYGPATH_W) '$(srcdir)/SubPage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SubPage.Tpo $(DEPDIR)/bin_uPlot-SubPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SubPage.cc' object='bin_uPlot-SubPage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SubPage.obj `if test -f 'SubPage.cc'; then $(CYGPATH_W) 'SubPage.cc'; else $(CYGPATH_W) '$(srcdir)/SubPage.cc'; fi`
+
+bin_uPlot-SuperPage.o: SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SuperPage.o -MD -MP -MF $(DEPDIR)/bin_uPlot-SuperPage.Tpo -c -o bin_uPlot-SuperPage.o `test -f 'SuperPage.cc' || echo '$(srcdir)/'`SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SuperPage.Tpo $(DEPDIR)/bin_uPlot-SuperPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SuperPage.cc' object='bin_uPlot-SuperPage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SuperPage.o `test -f 'SuperPage.cc' || echo '$(srcdir)/'`SuperPage.cc
+
+bin_uPlot-SuperPage.obj: SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-SuperPage.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-SuperPage.Tpo -c -o bin_uPlot-SuperPage.obj `if test -f 'SuperPage.cc'; then $(CYGPATH_W) 'SuperPage.cc'; else $(CYGPATH_W) '$(srcdir)/SuperPage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-SuperPage.Tpo $(DEPDIR)/bin_uPlot-SuperPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SuperPage.cc' object='bin_uPlot-SuperPage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-SuperPage.obj `if test -f 'SuperPage.cc'; then $(CYGPATH_W) 'SuperPage.cc'; else $(CYGPATH_W) '$(srcdir)/SuperPage.cc'; fi`
+
+bin_uPlot-Task.o: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Task.o -MD -MP -MF $(DEPDIR)/bin_uPlot-Task.Tpo -c -o bin_uPlot-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Task.Tpo $(DEPDIR)/bin_uPlot-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_uPlot-Task.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+
+bin_uPlot-Task.obj: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-Task.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-Task.Tpo -c -o bin_uPlot-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-Task.Tpo $(DEPDIR)/bin_uPlot-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_uPlot-Task.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+
+bin_uPlot-VertProfView.o: VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-VertProfView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-VertProfView.Tpo -c -o bin_uPlot-VertProfView.o `test -f 'VertProfView.cc' || echo '$(srcdir)/'`VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-VertProfView.Tpo $(DEPDIR)/bin_uPlot-VertProfView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VertProfView.cc' object='bin_uPlot-VertProfView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-VertProfView.o `test -f 'VertProfView.cc' || echo '$(srcdir)/'`VertProfView.cc
+
+bin_uPlot-VertProfView.obj: VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-VertProfView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-VertProfView.Tpo -c -o bin_uPlot-VertProfView.obj `if test -f 'VertProfView.cc'; then $(CYGPATH_W) 'VertProfView.cc'; else $(CYGPATH_W) '$(srcdir)/VertProfView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-VertProfView.Tpo $(DEPDIR)/bin_uPlot-VertProfView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VertProfView.cc' object='bin_uPlot-VertProfView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-VertProfView.obj `if test -f 'VertProfView.cc'; then $(CYGPATH_W) 'VertProfView.cc'; else $(CYGPATH_W) '$(srcdir)/VertProfView.cc'; fi`
+
+bin_uPlot-XDevice.o: XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-XDevice.o -MD -MP -MF $(DEPDIR)/bin_uPlot-XDevice.Tpo -c -o bin_uPlot-XDevice.o `test -f 'XDevice.cc' || echo '$(srcdir)/'`XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-XDevice.Tpo $(DEPDIR)/bin_uPlot-XDevice.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDevice.cc' object='bin_uPlot-XDevice.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-XDevice.o `test -f 'XDevice.cc' || echo '$(srcdir)/'`XDevice.cc
+
+bin_uPlot-XDevice.obj: XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-XDevice.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-XDevice.Tpo -c -o bin_uPlot-XDevice.obj `if test -f 'XDevice.cc'; then $(CYGPATH_W) 'XDevice.cc'; else $(CYGPATH_W) '$(srcdir)/XDevice.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-XDevice.Tpo $(DEPDIR)/bin_uPlot-XDevice.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDevice.cc' object='bin_uPlot-XDevice.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-XDevice.obj `if test -f 'XDevice.cc'; then $(CYGPATH_W) 'XDevice.cc'; else $(CYGPATH_W) '$(srcdir)/XDevice.cc'; fi`
+
+bin_uPlot-XSectView.o: XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-XSectView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-XSectView.Tpo -c -o bin_uPlot-XSectView.o `test -f 'XSectView.cc' || echo '$(srcdir)/'`XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-XSectView.Tpo $(DEPDIR)/bin_uPlot-XSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XSectView.cc' object='bin_uPlot-XSectView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-XSectView.o `test -f 'XSectView.cc' || echo '$(srcdir)/'`XSectView.cc
+
+bin_uPlot-XSectView.obj: XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-XSectView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-XSectView.Tpo -c -o bin_uPlot-XSectView.obj `if test -f 'XSectView.cc'; then $(CYGPATH_W) 'XSectView.cc'; else $(CYGPATH_W) '$(srcdir)/XSectView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-XSectView.Tpo $(DEPDIR)/bin_uPlot-XSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XSectView.cc' object='bin_uPlot-XSectView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-XSectView.obj `if test -f 'XSectView.cc'; then $(CYGPATH_W) 'XSectView.cc'; else $(CYGPATH_W) '$(srcdir)/XSectView.cc'; fi`
+
+bin_uPlot-ZoomStacks.o: ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ZoomStacks.o -MD -MP -MF $(DEPDIR)/bin_uPlot-ZoomStacks.Tpo -c -o bin_uPlot-ZoomStacks.o `test -f 'ZoomStacks.cc' || echo '$(srcdir)/'`ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ZoomStacks.Tpo $(DEPDIR)/bin_uPlot-ZoomStacks.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ZoomStacks.cc' object='bin_uPlot-ZoomStacks.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ZoomStacks.o `test -f 'ZoomStacks.cc' || echo '$(srcdir)/'`ZoomStacks.cc
+
+bin_uPlot-ZoomStacks.obj: ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ZoomStacks.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-ZoomStacks.Tpo -c -o bin_uPlot-ZoomStacks.obj `if test -f 'ZoomStacks.cc'; then $(CYGPATH_W) 'ZoomStacks.cc'; else $(CYGPATH_W) '$(srcdir)/ZoomStacks.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ZoomStacks.Tpo $(DEPDIR)/bin_uPlot-ZoomStacks.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ZoomStacks.cc' object='bin_uPlot-ZoomStacks.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ZoomStacks.obj `if test -f 'ZoomStacks.cc'; then $(CYGPATH_W) 'ZoomStacks.cc'; else $(CYGPATH_W) '$(srcdir)/ZoomStacks.cc'; fi`
+
+bin_uPlot-GenAppService.o: GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GenAppService.o -MD -MP -MF $(DEPDIR)/bin_uPlot-GenAppService.Tpo -c -o bin_uPlot-GenAppService.o `test -f 'GenAppService.cc' || echo '$(srcdir)/'`GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GenAppService.Tpo $(DEPDIR)/bin_uPlot-GenAppService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GenAppService.cc' object='bin_uPlot-GenAppService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GenAppService.o `test -f 'GenAppService.cc' || echo '$(srcdir)/'`GenAppService.cc
+
+bin_uPlot-GenAppService.obj: GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-GenAppService.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-GenAppService.Tpo -c -o bin_uPlot-GenAppService.obj `if test -f 'GenAppService.cc'; then $(CYGPATH_W) 'GenAppService.cc'; else $(CYGPATH_W) '$(srcdir)/GenAppService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-GenAppService.Tpo $(DEPDIR)/bin_uPlot-GenAppService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GenAppService.cc' object='bin_uPlot-GenAppService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-GenAppService.obj `if test -f 'GenAppService.cc'; then $(CYGPATH_W) 'GenAppService.cc'; else $(CYGPATH_W) '$(srcdir)/GenAppService.cc'; fi`
+
+bin_uPlot-MvQCursorData.o: MvQCursorData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorData.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorData.Tpo -c -o bin_uPlot-MvQCursorData.o `test -f 'MvQCursorData.cc' || echo '$(srcdir)/'`MvQCursorData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorData.Tpo $(DEPDIR)/bin_uPlot-MvQCursorData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.cc' object='bin_uPlot-MvQCursorData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorData.o `test -f 'MvQCursorData.cc' || echo '$(srcdir)/'`MvQCursorData.cc
+
+bin_uPlot-MvQCursorData.obj: MvQCursorData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorData.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorData.Tpo -c -o bin_uPlot-MvQCursorData.obj `if test -f 'MvQCursorData.cc'; then $(CYGPATH_W) 'MvQCursorData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorData.Tpo $(DEPDIR)/bin_uPlot-MvQCursorData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.cc' object='bin_uPlot-MvQCursorData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorData.obj `if test -f 'MvQCursorData.cc'; then $(CYGPATH_W) 'MvQCursorData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.cc'; fi`
+
+bin_uPlot-MvQCursorDataWidget.o: MvQCursorDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorDataWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Tpo -c -o bin_uPlot-MvQCursorDataWidget.o `test -f 'MvQCursorDataWidget.cc' || echo '$(srcdir)/'`MvQCursorDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.cc' object='bin_uPlot-MvQCursorDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorDataWidget.o `test -f 'MvQCursorDataWidget.cc' || echo '$(srcdir)/'`MvQCursorDataWidget.cc
+
+bin_uPlot-MvQCursorDataWidget.obj: MvQCursorDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Tpo -c -o bin_uPlot-MvQCursorDataWidget.obj `if test -f 'MvQCursorDataWidget.cc'; then $(CYGPATH_W) 'MvQCursorDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.cc' object='bin_uPlot-MvQCursorDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorDataWidget.obj `if test -f 'MvQCursorDataWidget.cc'; then $(CYGPATH_W) 'MvQCursorDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.cc'; fi`
+
+bin_uPlot-MvQContentsModel.o: MvQContentsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQContentsModel.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQContentsModel.Tpo -c -o bin_uPlot-MvQContentsModel.o `test -f 'MvQContentsModel.cc' || echo '$(srcdir)/'`MvQContentsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQContentsModel.Tpo $(DEPDIR)/bin_uPlot-MvQContentsModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsModel.cc' object='bin_uPlot-MvQContentsModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQContentsModel.o `test -f 'MvQContentsModel.cc' || echo '$(srcdir)/'`MvQContentsModel.cc
+
+bin_uPlot-MvQContentsModel.obj: MvQContentsModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQContentsModel.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQContentsModel.Tpo -c -o bin_uPlot-MvQContentsModel.obj `if test -f 'MvQContentsModel.cc'; then $(CYGPATH_W) 'MvQContentsModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQContentsModel.Tpo $(DEPDIR)/bin_uPlot-MvQContentsModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsModel.cc' object='bin_uPlot-MvQContentsModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQContentsModel.obj `if test -f 'MvQContentsModel.cc'; then $(CYGPATH_W) 'MvQContentsModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsModel.cc'; fi`
+
+bin_uPlot-MvQContentsWidget.o: MvQContentsWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQContentsWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQContentsWidget.Tpo -c -o bin_uPlot-MvQContentsWidget.o `test -f 'MvQContentsWidget.cc' || echo '$(srcdir)/'`MvQContentsWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQContentsWidget.Tpo $(DEPDIR)/bin_uPlot-MvQContentsWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.cc' object='bin_uPlot-MvQContentsWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQContentsWidget.o `test -f 'MvQContentsWidget.cc' || echo '$(srcdir)/'`MvQContentsWidget.cc
+
+bin_uPlot-MvQContentsWidget.obj: MvQContentsWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQContentsWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQContentsWidget.Tpo -c -o bin_uPlot-MvQContentsWidget.obj `if test -f 'MvQContentsWidget.cc'; then $(CYGPATH_W) 'MvQContentsWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQContentsWidget.Tpo $(DEPDIR)/bin_uPlot-MvQContentsWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.cc' object='bin_uPlot-MvQContentsWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQContentsWidget.obj `if test -f 'MvQContentsWidget.cc'; then $(CYGPATH_W) 'MvQContentsWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.cc'; fi`
+
+bin_uPlot-MvQDataWidget.o: MvQDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQDataWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQDataWidget.Tpo -c -o bin_uPlot-MvQDataWidget.o `test -f 'MvQDataWidget.cc' || echo '$(srcdir)/'`MvQDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.cc' object='bin_uPlot-MvQDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQDataWidget.o `test -f 'MvQDataWidget.cc' || echo '$(srcdir)/'`MvQDataWidget.cc
+
+bin_uPlot-MvQDataWidget.obj: MvQDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQDataWidget.Tpo -c -o bin_uPlot-MvQDataWidget.obj `if test -f 'MvQDataWidget.cc'; then $(CYGPATH_W) 'MvQDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.cc' object='bin_uPlot-MvQDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQDataWidget.obj `if test -f 'MvQDataWidget.cc'; then $(CYGPATH_W) 'MvQDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.cc'; fi`
+
+bin_uPlot-MvQLayerContentsIcon.o: MvQLayerContentsIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerContentsIcon.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Tpo -c -o bin_uPlot-MvQLayerContentsIcon.o `test -f 'MvQLayerContentsIcon.cc' || echo '$(srcdir)/'`MvQLayerContentsIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Tpo $(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerContentsIcon.cc' object='bin_uPlot-MvQLayerContentsIcon.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerContentsIcon.o `test -f 'MvQLayerContentsIcon.cc' || echo '$(srcdir)/'`MvQLayerContentsIcon.cc
+
+bin_uPlot-MvQLayerContentsIcon.obj: MvQLayerContentsIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerContentsIcon.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Tpo -c -o bin_uPlot-MvQLayerContentsIcon.obj `if test -f 'MvQLayerContentsIcon.cc'; then $(CYGPATH_W) 'MvQLayerContentsIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerContentsIcon.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Tpo $(DEPDIR)/bin_uPlot-MvQLayerContentsIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerContentsIcon.cc' object='bin_uPlot-MvQLayerContentsIcon.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerContentsIcon.obj `if test -f 'MvQLayerContentsIcon.cc'; then $(CYGPATH_W) 'MvQLayerContentsIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerContentsIcon.cc'; fi`
+
+bin_uPlot-MvQLayerDataWidget.o: MvQLayerDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerDataWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Tpo -c -o bin_uPlot-MvQLayerDataWidget.o `test -f 'MvQLayerDataWidget.cc' || echo '$(srcdir)/'`MvQLayerDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.cc' object='bin_uPlot-MvQLayerDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerDataWidget.o `test -f 'MvQLayerDataWidget.cc' || echo '$(srcdir)/'`MvQLayerDataWidget.cc
+
+bin_uPlot-MvQLayerDataWidget.obj: MvQLayerDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Tpo -c -o bin_uPlot-MvQLayerDataWidget.obj `if test -f 'MvQLayerDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.cc' object='bin_uPlot-MvQLayerDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerDataWidget.obj `if test -f 'MvQLayerDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.cc'; fi`
+
+bin_uPlot-MvQLayerMetaDataWidget.o: MvQLayerMetaDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerMetaDataWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Tpo -c -o bin_uPlot-MvQLayerMetaDataWidget.o `test -f 'MvQLayerMetaDataWidget.cc' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.cc' object='bin_uPlot-MvQLayerMetaDataWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerMetaDataWidget.o `test -f 'MvQLayerMetaDataWidget.cc' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.cc
+
+bin_uPlot-MvQLayerMetaDataWidget.obj: MvQLayerMetaDataWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerMetaDataWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Tpo -c -o bin_uPlot-MvQLayerMetaDataWidget.obj `if test -f 'MvQLayerMetaDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Tpo $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.cc' object='bin_uPlot-MvQLayerMetaDataWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerMetaDataWidget.obj `if test -f 'MvQLayerMetaDataWidget.cc'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.cc'; fi`
+
+bin_uPlot-MvQLayerModel.o: MvQLayerModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerModel.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerModel.Tpo -c -o bin_uPlot-MvQLayerModel.o `test -f 'MvQLayerModel.cc' || echo '$(srcdir)/'`MvQLayerModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerModel.Tpo $(DEPDIR)/bin_uPlot-MvQLayerModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.cc' object='bin_uPlot-MvQLayerModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerModel.o `test -f 'MvQLayerModel.cc' || echo '$(srcdir)/'`MvQLayerModel.cc
+
+bin_uPlot-MvQLayerModel.obj: MvQLayerModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerModel.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerModel.Tpo -c -o bin_uPlot-MvQLayerModel.obj `if test -f 'MvQLayerModel.cc'; then $(CYGPATH_W) 'MvQLayerModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerModel.Tpo $(DEPDIR)/bin_uPlot-MvQLayerModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.cc' object='bin_uPlot-MvQLayerModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerModel.obj `if test -f 'MvQLayerModel.cc'; then $(CYGPATH_W) 'MvQLayerModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.cc'; fi`
+
+bin_uPlot-MvQLayerWidget.o: MvQLayerWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerWidget.Tpo -c -o bin_uPlot-MvQLayerWidget.o `test -f 'MvQLayerWidget.cc' || echo '$(srcdir)/'`MvQLayerWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerWidget.Tpo $(DEPDIR)/bin_uPlot-MvQLayerWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.cc' object='bin_uPlot-MvQLayerWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerWidget.o `test -f 'MvQLayerWidget.cc' || echo '$(srcdir)/'`MvQLayerWidget.cc
+
+bin_uPlot-MvQLayerWidget.obj: MvQLayerWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerWidget.Tpo -c -o bin_uPlot-MvQLayerWidget.obj `if test -f 'MvQLayerWidget.cc'; then $(CYGPATH_W) 'MvQLayerWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerWidget.Tpo $(DEPDIR)/bin_uPlot-MvQLayerWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.cc' object='bin_uPlot-MvQLayerWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerWidget.obj `if test -f 'MvQLayerWidget.cc'; then $(CYGPATH_W) 'MvQLayerWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.cc'; fi`
+
+bin_uPlot-MvQMagnifier.o: MvQMagnifier.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQMagnifier.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQMagnifier.Tpo -c -o bin_uPlot-MvQMagnifier.o `test -f 'MvQMagnifier.cc' || echo '$(srcdir)/'`MvQMagnifier.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQMagnifier.Tpo $(DEPDIR)/bin_uPlot-MvQMagnifier.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.cc' object='bin_uPlot-MvQMagnifier.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQMagnifier.o `test -f 'MvQMagnifier.cc' || echo '$(srcdir)/'`MvQMagnifier.cc
+
+bin_uPlot-MvQMagnifier.obj: MvQMagnifier.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQMagnifier.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQMagnifier.Tpo -c -o bin_uPlot-MvQMagnifier.obj `if test -f 'MvQMagnifier.cc'; then $(CYGPATH_W) 'MvQMagnifier.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQMagnifier.Tpo $(DEPDIR)/bin_uPlot-MvQMagnifier.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.cc' object='bin_uPlot-MvQMagnifier.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQMagnifier.obj `if test -f 'MvQMagnifier.cc'; then $(CYGPATH_W) 'MvQMagnifier.cc'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.cc'; fi`
+
+bin_uPlot-MvQPlaceMark.o: MvQPlaceMark.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMark.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMark.Tpo -c -o bin_uPlot-MvQPlaceMark.o `test -f 'MvQPlaceMark.cc' || echo '$(srcdir)/'`MvQPlaceMark.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMark.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMark.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.cc' object='bin_uPlot-MvQPlaceMark.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMark.o `test -f 'MvQPlaceMark.cc' || echo '$(srcdir)/'`MvQPlaceMark.cc
+
+bin_uPlot-MvQPlaceMark.obj: MvQPlaceMark.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMark.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMark.Tpo -c -o bin_uPlot-MvQPlaceMark.obj `if test -f 'MvQPlaceMark.cc'; then $(CYGPATH_W) 'MvQPlaceMark.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMark.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMark.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.cc' object='bin_uPlot-MvQPlaceMark.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMark.obj `if test -f 'MvQPlaceMark.cc'; then $(CYGPATH_W) 'MvQPlaceMark.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.cc'; fi`
+
+bin_uPlot-MvQPlaceMarkDialog.o: MvQPlaceMarkDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkDialog.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Tpo -c -o bin_uPlot-MvQPlaceMarkDialog.o `test -f 'MvQPlaceMarkDialog.cc' || echo '$(srcdir)/'`MvQPlaceMarkDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.cc' object='bin_uPlot-MvQPlaceMarkDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkDialog.o `test -f 'MvQPlaceMarkDialog.cc' || echo '$(srcdir)/'`MvQPlaceMarkDialog.cc
+
+bin_uPlot-MvQPlaceMarkDialog.obj: MvQPlaceMarkDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkDialog.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Tpo -c -o bin_uPlot-MvQPlaceMarkDialog.obj `if test -f 'MvQPlaceMarkDialog.cc'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.cc' object='bin_uPlot-MvQPlaceMarkDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkDialog.obj `if test -f 'MvQPlaceMarkDialog.cc'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.cc'; fi`
+
+bin_uPlot-MvQPlaceMarkMimeData.o: MvQPlaceMarkMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkMimeData.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Tpo -c -o bin_uPlot-MvQPlaceMarkMimeData.o `test -f 'MvQPlaceMarkMimeData.cc' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.cc' object='bin_uPlot-MvQPlaceMarkMimeData.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkMimeData.o `test -f 'MvQPlaceMarkMimeData.cc' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.cc
+
+bin_uPlot-MvQPlaceMarkMimeData.obj: MvQPlaceMarkMimeData.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkMimeData.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Tpo -c -o bin_uPlot-MvQPlaceMarkMimeData.obj `if test -f 'MvQPlaceMarkMimeData.cc'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.cc' object='bin_uPlot-MvQPlaceMarkMimeData.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkMimeData.obj `if test -f 'MvQPlaceMarkMimeData.cc'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.cc'; fi`
+
+bin_uPlot-MvQPlaceMarkWidget.o: MvQPlaceMarkWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Tpo -c -o bin_uPlot-MvQPlaceMarkWidget.o `test -f 'MvQPlaceMarkWidget.cc' || echo '$(srcdir)/'`MvQPlaceMarkWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.cc' object='bin_uPlot-MvQPlaceMarkWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkWidget.o `test -f 'MvQPlaceMarkWidget.cc' || echo '$(srcdir)/'`MvQPlaceMarkWidget.cc
+
+bin_uPlot-MvQPlaceMarkWidget.obj: MvQPlaceMarkWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Tpo -c -o bin_uPlot-MvQPlaceMarkWidget.obj `if test -f 'MvQPlaceMarkWidget.cc'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.cc' object='bin_uPlot-MvQPlaceMarkWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkWidget.obj `if test -f 'MvQPlaceMarkWidget.cc'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.cc'; fi`
+
+bin_uPlot-MvQPlaceMarkModel.o: MvQPlaceMarkModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkModel.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Tpo -c -o bin_uPlot-MvQPlaceMarkModel.o `test -f 'MvQPlaceMarkModel.cc' || echo '$(srcdir)/'`MvQPlaceMarkModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.cc' object='bin_uPlot-MvQPlaceMarkModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkModel.o `test -f 'MvQPlaceMarkModel.cc' || echo '$(srcdir)/'`MvQPlaceMarkModel.cc
+
+bin_uPlot-MvQPlaceMarkModel.obj: MvQPlaceMarkModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkModel.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Tpo -c -o bin_uPlot-MvQPlaceMarkModel.obj `if test -f 'MvQPlaceMarkModel.cc'; then $(CYGPATH_W) 'MvQPlaceMarkModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.cc' object='bin_uPlot-MvQPlaceMarkModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkModel.obj `if test -f 'MvQPlaceMarkModel.cc'; then $(CYGPATH_W) 'MvQPlaceMarkModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.cc'; fi`
+
+bin_uPlot-MvQPlotView.o: MvQPlotView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlotView.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlotView.Tpo -c -o bin_uPlot-MvQPlotView.o `test -f 'MvQPlotView.cc' || echo '$(srcdir)/'`MvQPlotView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlotView.Tpo $(DEPDIR)/bin_uPlot-MvQPlotView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.cc' object='bin_uPlot-MvQPlotView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlotView.o `test -f 'MvQPlotView.cc' || echo '$(srcdir)/'`MvQPlotView.cc
+
+bin_uPlot-MvQPlotView.obj: MvQPlotView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlotView.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlotView.Tpo -c -o bin_uPlot-MvQPlotView.obj `if test -f 'MvQPlotView.cc'; then $(CYGPATH_W) 'MvQPlotView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlotView.Tpo $(DEPDIR)/bin_uPlot-MvQPlotView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.cc' object='bin_uPlot-MvQPlotView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlotView.obj `if test -f 'MvQPlotView.cc'; then $(CYGPATH_W) 'MvQPlotView.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.cc'; fi`
+
+bin_uPlot-MvQPointSelection.o: MvQPointSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPointSelection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPointSelection.Tpo -c -o bin_uPlot-MvQPointSelection.o `test -f 'MvQPointSelection.cc' || echo '$(srcdir)/'`MvQPointSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPointSelection.Tpo $(DEPDIR)/bin_uPlot-MvQPointSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.cc' object='bin_uPlot-MvQPointSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPointSelection.o `test -f 'MvQPointSelection.cc' || echo '$(srcdir)/'`MvQPointSelection.cc
+
+bin_uPlot-MvQPointSelection.obj: MvQPointSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPointSelection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPointSelection.Tpo -c -o bin_uPlot-MvQPointSelection.obj `if test -f 'MvQPointSelection.cc'; then $(CYGPATH_W) 'MvQPointSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPointSelection.Tpo $(DEPDIR)/bin_uPlot-MvQPointSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.cc' object='bin_uPlot-MvQPointSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPointSelection.obj `if test -f 'MvQPointSelection.cc'; then $(CYGPATH_W) 'MvQPointSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.cc'; fi`
+
+bin_uPlot-MvQProgressItem.o: MvQProgressItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQProgressItem.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQProgressItem.Tpo -c -o bin_uPlot-MvQProgressItem.o `test -f 'MvQProgressItem.cc' || echo '$(srcdir)/'`MvQProgressItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQProgressItem.Tpo $(DEPDIR)/bin_uPlot-MvQProgressItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProgressItem.cc' object='bin_uPlot-MvQProgressItem.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQProgressItem.o `test -f 'MvQProgressItem.cc' || echo '$(srcdir)/'`MvQProgressItem.cc
+
+bin_uPlot-MvQProgressItem.obj: MvQProgressItem.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQProgressItem.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQProgressItem.Tpo -c -o bin_uPlot-MvQProgressItem.obj `if test -f 'MvQProgressItem.cc'; then $(CYGPATH_W) 'MvQProgressItem.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProgressItem.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQProgressItem.Tpo $(DEPDIR)/bin_uPlot-MvQProgressItem.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQProgressItem.cc' object='bin_uPlot-MvQProgressItem.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQProgressItem.obj `if test -f 'MvQProgressItem.cc'; then $(CYGPATH_W) 'MvQProgressItem.cc'; else $(CYGPATH_W) '$(srcdir)/MvQProgressItem.cc'; fi`
+
+bin_uPlot-MvQStepModel.o: MvQStepModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepModel.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepModel.Tpo -c -o bin_uPlot-MvQStepModel.o `test -f 'MvQStepModel.cc' || echo '$(srcdir)/'`MvQStepModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepModel.Tpo $(DEPDIR)/bin_uPlot-MvQStepModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.cc' object='bin_uPlot-MvQStepModel.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepModel.o `test -f 'MvQStepModel.cc' || echo '$(srcdir)/'`MvQStepModel.cc
+
+bin_uPlot-MvQStepModel.obj: MvQStepModel.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepModel.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepModel.Tpo -c -o bin_uPlot-MvQStepModel.obj `if test -f 'MvQStepModel.cc'; then $(CYGPATH_W) 'MvQStepModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepModel.Tpo $(DEPDIR)/bin_uPlot-MvQStepModel.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.cc' object='bin_uPlot-MvQStepModel.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepModel.obj `if test -f 'MvQStepModel.cc'; then $(CYGPATH_W) 'MvQStepModel.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.cc'; fi`
+
+bin_uPlot-MvQStepWidget.o: MvQStepWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepWidget.Tpo -c -o bin_uPlot-MvQStepWidget.o `test -f 'MvQStepWidget.cc' || echo '$(srcdir)/'`MvQStepWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepWidget.Tpo $(DEPDIR)/bin_uPlot-MvQStepWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.cc' object='bin_uPlot-MvQStepWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepWidget.o `test -f 'MvQStepWidget.cc' || echo '$(srcdir)/'`MvQStepWidget.cc
+
+bin_uPlot-MvQStepWidget.obj: MvQStepWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepWidget.Tpo -c -o bin_uPlot-MvQStepWidget.obj `if test -f 'MvQStepWidget.cc'; then $(CYGPATH_W) 'MvQStepWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepWidget.Tpo $(DEPDIR)/bin_uPlot-MvQStepWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.cc' object='bin_uPlot-MvQStepWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepWidget.obj `if test -f 'MvQStepWidget.cc'; then $(CYGPATH_W) 'MvQStepWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.cc'; fi`
+
+bin_uPlot-MvQZoom.o: MvQZoom.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoom.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoom.Tpo -c -o bin_uPlot-MvQZoom.o `test -f 'MvQZoom.cc' || echo '$(srcdir)/'`MvQZoom.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoom.Tpo $(DEPDIR)/bin_uPlot-MvQZoom.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.cc' object='bin_uPlot-MvQZoom.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoom.o `test -f 'MvQZoom.cc' || echo '$(srcdir)/'`MvQZoom.cc
+
+bin_uPlot-MvQZoom.obj: MvQZoom.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoom.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoom.Tpo -c -o bin_uPlot-MvQZoom.obj `if test -f 'MvQZoom.cc'; then $(CYGPATH_W) 'MvQZoom.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoom.Tpo $(DEPDIR)/bin_uPlot-MvQZoom.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.cc' object='bin_uPlot-MvQZoom.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoom.obj `if test -f 'MvQZoom.cc'; then $(CYGPATH_W) 'MvQZoom.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.cc'; fi`
+
+bin_uPlot-MvQAreaSelection.o: MvQAreaSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQAreaSelection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQAreaSelection.Tpo -c -o bin_uPlot-MvQAreaSelection.o `test -f 'MvQAreaSelection.cc' || echo '$(srcdir)/'`MvQAreaSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQAreaSelection.Tpo $(DEPDIR)/bin_uPlot-MvQAreaSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.cc' object='bin_uPlot-MvQAreaSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQAreaSelection.o `test -f 'MvQAreaSelection.cc' || echo '$(srcdir)/'`MvQAreaSelection.cc
+
+bin_uPlot-MvQAreaSelection.obj: MvQAreaSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQAreaSelection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQAreaSelection.Tpo -c -o bin_uPlot-MvQAreaSelection.obj `if test -f 'MvQAreaSelection.cc'; then $(CYGPATH_W) 'MvQAreaSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQAreaSelection.Tpo $(DEPDIR)/bin_uPlot-MvQAreaSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.cc' object='bin_uPlot-MvQAreaSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQAreaSelection.obj `if test -f 'MvQAreaSelection.cc'; then $(CYGPATH_W) 'MvQAreaSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.cc'; fi`
+
+bin_uPlot-MvQLineSelection.o: MvQLineSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLineSelection.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLineSelection.Tpo -c -o bin_uPlot-MvQLineSelection.o `test -f 'MvQLineSelection.cc' || echo '$(srcdir)/'`MvQLineSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLineSelection.Tpo $(DEPDIR)/bin_uPlot-MvQLineSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.cc' object='bin_uPlot-MvQLineSelection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLineSelection.o `test -f 'MvQLineSelection.cc' || echo '$(srcdir)/'`MvQLineSelection.cc
+
+bin_uPlot-MvQLineSelection.obj: MvQLineSelection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLineSelection.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLineSelection.Tpo -c -o bin_uPlot-MvQLineSelection.obj `if test -f 'MvQLineSelection.cc'; then $(CYGPATH_W) 'MvQLineSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLineSelection.Tpo $(DEPDIR)/bin_uPlot-MvQLineSelection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.cc' object='bin_uPlot-MvQLineSelection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLineSelection.obj `if test -f 'MvQLineSelection.cc'; then $(CYGPATH_W) 'MvQLineSelection.cc'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.cc'; fi`
+
+bin_uPlot-MvQZoomStackWidget.o: MvQZoomStackWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoomStackWidget.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Tpo -c -o bin_uPlot-MvQZoomStackWidget.o `test -f 'MvQZoomStackWidget.cc' || echo '$(srcdir)/'`MvQZoomStackWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Tpo $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.cc' object='bin_uPlot-MvQZoomStackWidget.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoomStackWidget.o `test -f 'MvQZoomStackWidget.cc' || echo '$(srcdir)/'`MvQZoomStackWidget.cc
+
+bin_uPlot-MvQZoomStackWidget.obj: MvQZoomStackWidget.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoomStackWidget.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Tpo -c -o bin_uPlot-MvQZoomStackWidget.obj `if test -f 'MvQZoomStackWidget.cc'; then $(CYGPATH_W) 'MvQZoomStackWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Tpo $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.cc' object='bin_uPlot-MvQZoomStackWidget.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoomStackWidget.obj `if test -f 'MvQZoomStackWidget.cc'; then $(CYGPATH_W) 'MvQZoomStackWidget.cc'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.cc'; fi`
+
+bin_uPlot-ExportDialog.o: ExportDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ExportDialog.o -MD -MP -MF $(DEPDIR)/bin_uPlot-ExportDialog.Tpo -c -o bin_uPlot-ExportDialog.o `test -f 'ExportDialog.cc' || echo '$(srcdir)/'`ExportDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ExportDialog.Tpo $(DEPDIR)/bin_uPlot-ExportDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.cc' object='bin_uPlot-ExportDialog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ExportDialog.o `test -f 'ExportDialog.cc' || echo '$(srcdir)/'`ExportDialog.cc
+
+bin_uPlot-ExportDialog.obj: ExportDialog.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ExportDialog.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-ExportDialog.Tpo -c -o bin_uPlot-ExportDialog.obj `if test -f 'ExportDialog.cc'; then $(CYGPATH_W) 'ExportDialog.cc'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ExportDialog.Tpo $(DEPDIR)/bin_uPlot-ExportDialog.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.cc' object='bin_uPlot-ExportDialog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ExportDialog.obj `if test -f 'ExportDialog.cc'; then $(CYGPATH_W) 'ExportDialog.cc'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.cc'; fi`
+
+bin_uPlot-MagPlusInteractiveService.o: MagPlusInteractiveService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagPlusInteractiveService.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Tpo -c -o bin_uPlot-MagPlusInteractiveService.o `test -f 'MagPlusInteractiveService.cc' || echo '$(srcdir)/'`MagPlusInteractiveService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Tpo $(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusInteractiveService.cc' object='bin_uPlot-MagPlusInteractiveService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagPlusInteractiveService.o `test -f 'MagPlusInteractiveService.cc' || echo '$(srcdir)/'`MagPlusInteractiveService.cc
+
+bin_uPlot-MagPlusInteractiveService.obj: MagPlusInteractiveService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MagPlusInteractiveService.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Tpo -c -o bin_uPlot-MagPlusInteractiveService.obj `if test -f 'MagPlusInteractiveService.cc'; then $(CYGPATH_W) 'MagPlusInteractiveService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusInteractiveService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Tpo $(DEPDIR)/bin_uPlot-MagPlusInteractiveService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusInteractiveService.cc' object='bin_uPlot-MagPlusInteractiveService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MagPlusInteractiveService.obj `if test -f 'MagPlusInteractiveService.cc'; then $(CYGPATH_W) 'MagPlusInteractiveService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusInteractiveService.cc'; fi`
+
+bin_uPlot-PlotModInteractive.o: PlotModInteractive.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModInteractive.o -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModInteractive.Tpo -c -o bin_uPlot-PlotModInteractive.o `test -f 'PlotModInteractive.cc' || echo '$(srcdir)/'`PlotModInteractive.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModInteractive.Tpo $(DEPDIR)/bin_uPlot-PlotModInteractive.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModInteractive.cc' object='bin_uPlot-PlotModInteractive.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModInteractive.o `test -f 'PlotModInteractive.cc' || echo '$(srcdir)/'`PlotModInteractive.cc
+
+bin_uPlot-PlotModInteractive.obj: PlotModInteractive.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-PlotModInteractive.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-PlotModInteractive.Tpo -c -o bin_uPlot-PlotModInteractive.obj `if test -f 'PlotModInteractive.cc'; then $(CYGPATH_W) 'PlotModInteractive.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModInteractive.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-PlotModInteractive.Tpo $(DEPDIR)/bin_uPlot-PlotModInteractive.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModInteractive.cc' object='bin_uPlot-PlotModInteractive.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-PlotModInteractive.obj `if test -f 'PlotModInteractive.cc'; then $(CYGPATH_W) 'PlotModInteractive.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModInteractive.cc'; fi`
+
+bin_uPlot-uPlotBase.o: uPlotBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlotBase.o -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlotBase.Tpo -c -o bin_uPlot-uPlotBase.o `test -f 'uPlotBase.cc' || echo '$(srcdir)/'`uPlotBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlotBase.Tpo $(DEPDIR)/bin_uPlot-uPlotBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.cc' object='bin_uPlot-uPlotBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlotBase.o `test -f 'uPlotBase.cc' || echo '$(srcdir)/'`uPlotBase.cc
+
+bin_uPlot-uPlotBase.obj: uPlotBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlotBase.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlotBase.Tpo -c -o bin_uPlot-uPlotBase.obj `if test -f 'uPlotBase.cc'; then $(CYGPATH_W) 'uPlotBase.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlotBase.Tpo $(DEPDIR)/bin_uPlot-uPlotBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.cc' object='bin_uPlot-uPlotBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlotBase.obj `if test -f 'uPlotBase.cc'; then $(CYGPATH_W) 'uPlotBase.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.cc'; fi`
+
+bin_uPlot-uPlot.o: uPlot.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlot.o -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlot.Tpo -c -o bin_uPlot-uPlot.o `test -f 'uPlot.cc' || echo '$(srcdir)/'`uPlot.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlot.Tpo $(DEPDIR)/bin_uPlot-uPlot.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.cc' object='bin_uPlot-uPlot.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlot.o `test -f 'uPlot.cc' || echo '$(srcdir)/'`uPlot.cc
+
+bin_uPlot-uPlot.obj: uPlot.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlot.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlot.Tpo -c -o bin_uPlot-uPlot.obj `if test -f 'uPlot.cc'; then $(CYGPATH_W) 'uPlot.cc'; else $(CYGPATH_W) '$(srcdir)/uPlot.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlot.Tpo $(DEPDIR)/bin_uPlot-uPlot.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.cc' object='bin_uPlot-uPlot.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlot.obj `if test -f 'uPlot.cc'; then $(CYGPATH_W) 'uPlot.cc'; else $(CYGPATH_W) '$(srcdir)/uPlot.cc'; fi`
+
+bin_uPlot-uPlotApp.o: uPlotApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlotApp.o -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlotApp.Tpo -c -o bin_uPlot-uPlotApp.o `test -f 'uPlotApp.cc' || echo '$(srcdir)/'`uPlotApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlotApp.Tpo $(DEPDIR)/bin_uPlot-uPlotApp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotApp.cc' object='bin_uPlot-uPlotApp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlotApp.o `test -f 'uPlotApp.cc' || echo '$(srcdir)/'`uPlotApp.cc
+
+bin_uPlot-uPlotApp.obj: uPlotApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlotApp.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlotApp.Tpo -c -o bin_uPlot-uPlotApp.obj `if test -f 'uPlotApp.cc'; then $(CYGPATH_W) 'uPlotApp.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotApp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlotApp.Tpo $(DEPDIR)/bin_uPlot-uPlotApp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotApp.cc' object='bin_uPlot-uPlotApp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlotApp.obj `if test -f 'uPlotApp.cc'; then $(CYGPATH_W) 'uPlotApp.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotApp.cc'; fi`
+
+bin_uPlot-MvQContentsWidget.moc.o: MvQContentsWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQContentsWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Tpo -c -o bin_uPlot-MvQContentsWidget.moc.o `test -f 'MvQContentsWidget.moc.cpp' || echo '$(srcdir)/'`MvQContentsWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.moc.cpp' object='bin_uPlot-MvQContentsWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQContentsWidget.moc.o `test -f 'MvQContentsWidget.moc.cpp' || echo '$(srcdir)/'`MvQContentsWidget.moc.cpp
+
+bin_uPlot-MvQContentsWidget.moc.obj: MvQContentsWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQContentsWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Tpo -c -o bin_uPlot-MvQContentsWidget.moc.obj `if test -f 'MvQContentsWidget.moc.cpp'; then $(CYGPATH_W) 'MvQContentsWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQContentsWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQContentsWidget.moc.cpp' object='bin_uPlot-MvQContentsWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQContentsWidget.moc.obj `if test -f 'MvQContentsWidget.moc.cpp'; then $(CYGPATH_W) 'MvQContentsWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQContentsWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQCursorData.moc.o: MvQCursorData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorData.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorData.moc.Tpo -c -o bin_uPlot-MvQCursorData.moc.o `test -f 'MvQCursorData.moc.cpp' || echo '$(srcdir)/'`MvQCursorData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorData.moc.Tpo $(DEPDIR)/bin_uPlot-MvQCursorData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.moc.cpp' object='bin_uPlot-MvQCursorData.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorData.moc.o `test -f 'MvQCursorData.moc.cpp' || echo '$(srcdir)/'`MvQCursorData.moc.cpp
+
+bin_uPlot-MvQCursorData.moc.obj: MvQCursorData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorData.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorData.moc.Tpo -c -o bin_uPlot-MvQCursorData.moc.obj `if test -f 'MvQCursorData.moc.cpp'; then $(CYGPATH_W) 'MvQCursorData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorData.moc.Tpo $(DEPDIR)/bin_uPlot-MvQCursorData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorData.moc.cpp' object='bin_uPlot-MvQCursorData.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorData.moc.obj `if test -f 'MvQCursorData.moc.cpp'; then $(CYGPATH_W) 'MvQCursorData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorData.moc.cpp'; fi`
+
+bin_uPlot-MvQCursorDataWidget.moc.o: MvQCursorDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Tpo -c -o bin_uPlot-MvQCursorDataWidget.moc.o `test -f 'MvQCursorDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQCursorDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.moc.cpp' object='bin_uPlot-MvQCursorDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorDataWidget.moc.o `test -f 'MvQCursorDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQCursorDataWidget.moc.cpp
+
+bin_uPlot-MvQCursorDataWidget.moc.obj: MvQCursorDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQCursorDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Tpo -c -o bin_uPlot-MvQCursorDataWidget.moc.obj `if test -f 'MvQCursorDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQCursorDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQCursorDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQCursorDataWidget.moc.cpp' object='bin_uPlot-MvQCursorDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQCursorDataWidget.moc.obj `if test -f 'MvQCursorDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQCursorDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQCursorDataWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQDataWidget.moc.o: MvQDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Tpo -c -o bin_uPlot-MvQDataWidget.moc.o `test -f 'MvQDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.moc.cpp' object='bin_uPlot-MvQDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQDataWidget.moc.o `test -f 'MvQDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQDataWidget.moc.cpp
+
+bin_uPlot-MvQDataWidget.moc.obj: MvQDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Tpo -c -o bin_uPlot-MvQDataWidget.moc.obj `if test -f 'MvQDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQDataWidget.moc.cpp' object='bin_uPlot-MvQDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQDataWidget.moc.obj `if test -f 'MvQDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQDataWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQLayerModel.moc.o: MvQLayerModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerModel.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Tpo -c -o bin_uPlot-MvQLayerModel.moc.o `test -f 'MvQLayerModel.moc.cpp' || echo '$(srcdir)/'`MvQLayerModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.moc.cpp' object='bin_uPlot-MvQLayerModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerModel.moc.o `test -f 'MvQLayerModel.moc.cpp' || echo '$(srcdir)/'`MvQLayerModel.moc.cpp
+
+bin_uPlot-MvQLayerModel.moc.obj: MvQLayerModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerModel.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Tpo -c -o bin_uPlot-MvQLayerModel.moc.obj `if test -f 'MvQLayerModel.moc.cpp'; then $(CYGPATH_W) 'MvQLayerModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerModel.moc.cpp' object='bin_uPlot-MvQLayerModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerModel.moc.obj `if test -f 'MvQLayerModel.moc.cpp'; then $(CYGPATH_W) 'MvQLayerModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerModel.moc.cpp'; fi`
+
+bin_uPlot-MvQLayerWidget.moc.o: MvQLayerWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Tpo -c -o bin_uPlot-MvQLayerWidget.moc.o `test -f 'MvQLayerWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.moc.cpp' object='bin_uPlot-MvQLayerWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerWidget.moc.o `test -f 'MvQLayerWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerWidget.moc.cpp
+
+bin_uPlot-MvQLayerWidget.moc.obj: MvQLayerWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Tpo -c -o bin_uPlot-MvQLayerWidget.moc.obj `if test -f 'MvQLayerWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerWidget.moc.cpp' object='bin_uPlot-MvQLayerWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerWidget.moc.obj `if test -f 'MvQLayerWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQLayerDataWidget.moc.o: MvQLayerDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Tpo -c -o bin_uPlot-MvQLayerDataWidget.moc.o `test -f 'MvQLayerDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.moc.cpp' object='bin_uPlot-MvQLayerDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerDataWidget.moc.o `test -f 'MvQLayerDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerDataWidget.moc.cpp
+
+bin_uPlot-MvQLayerDataWidget.moc.obj: MvQLayerDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Tpo -c -o bin_uPlot-MvQLayerDataWidget.moc.obj `if test -f 'MvQLayerDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerDataWidget.moc.cpp' object='bin_uPlot-MvQLayerDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerDataWidget.moc.obj `if test -f 'MvQLayerDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerDataWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQLayerMetaDataWidget.moc.o: MvQLayerMetaDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerMetaDataWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Tpo -c -o bin_uPlot-MvQLayerMetaDataWidget.moc.o `test -f 'MvQLayerMetaDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.moc.cpp' object='bin_uPlot-MvQLayerMetaDataWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerMetaDataWidget.moc.o `test -f 'MvQLayerMetaDataWidget.moc.cpp' || echo '$(srcdir)/'`MvQLayerMetaDataWidget.moc.cpp
+
+bin_uPlot-MvQLayerMetaDataWidget.moc.obj: MvQLayerMetaDataWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLayerMetaDataWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Tpo -c -o bin_uPlot-MvQLayerMetaDataWidget.moc.obj `if test -f 'MvQLayerMetaDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLayerMetaDataWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLayerMetaDataWidget.moc.cpp' object='bin_uPlot-MvQLayerMetaDataWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLayerMetaDataWidget.moc.obj `if test -f 'MvQLayerMetaDataWidget.moc.cpp'; then $(CYGPATH_W) 'MvQLayerMetaDataWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLayerMetaDataWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQMagnifier.moc.o: MvQMagnifier.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQMagnifier.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Tpo -c -o bin_uPlot-MvQMagnifier.moc.o `test -f 'MvQMagnifier.moc.cpp' || echo '$(srcdir)/'`MvQMagnifier.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Tpo $(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.moc.cpp' object='bin_uPlot-MvQMagnifier.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQMagnifier.moc.o `test -f 'MvQMagnifier.moc.cpp' || echo '$(srcdir)/'`MvQMagnifier.moc.cpp
+
+bin_uPlot-MvQMagnifier.moc.obj: MvQMagnifier.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQMagnifier.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Tpo -c -o bin_uPlot-MvQMagnifier.moc.obj `if test -f 'MvQMagnifier.moc.cpp'; then $(CYGPATH_W) 'MvQMagnifier.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Tpo $(DEPDIR)/bin_uPlot-MvQMagnifier.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQMagnifier.moc.cpp' object='bin_uPlot-MvQMagnifier.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQMagnifier.moc.obj `if test -f 'MvQMagnifier.moc.cpp'; then $(CYGPATH_W) 'MvQMagnifier.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQMagnifier.moc.cpp'; fi`
+
+bin_uPlot-MvQPlaceMark.moc.o: MvQPlaceMark.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMark.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Tpo -c -o bin_uPlot-MvQPlaceMark.moc.o `test -f 'MvQPlaceMark.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMark.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.moc.cpp' object='bin_uPlot-MvQPlaceMark.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMark.moc.o `test -f 'MvQPlaceMark.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMark.moc.cpp
+
+bin_uPlot-MvQPlaceMark.moc.obj: MvQPlaceMark.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMark.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Tpo -c -o bin_uPlot-MvQPlaceMark.moc.obj `if test -f 'MvQPlaceMark.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMark.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMark.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMark.moc.cpp' object='bin_uPlot-MvQPlaceMark.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMark.moc.obj `if test -f 'MvQPlaceMark.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMark.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMark.moc.cpp'; fi`
+
+bin_uPlot-MvQPlaceMarkDialog.moc.o: MvQPlaceMarkDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkDialog.moc.o `test -f 'MvQPlaceMarkDialog.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.moc.cpp' object='bin_uPlot-MvQPlaceMarkDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkDialog.moc.o `test -f 'MvQPlaceMarkDialog.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkDialog.moc.cpp
+
+bin_uPlot-MvQPlaceMarkDialog.moc.obj: MvQPlaceMarkDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkDialog.moc.obj `if test -f 'MvQPlaceMarkDialog.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkDialog.moc.cpp' object='bin_uPlot-MvQPlaceMarkDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkDialog.moc.obj `if test -f 'MvQPlaceMarkDialog.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkDialog.moc.cpp'; fi`
+
+bin_uPlot-MvQPlaceMarkWidget.moc.o: MvQPlaceMarkWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkWidget.moc.o `test -f 'MvQPlaceMarkWidget.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.moc.cpp' object='bin_uPlot-MvQPlaceMarkWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkWidget.moc.o `test -f 'MvQPlaceMarkWidget.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkWidget.moc.cpp
+
+bin_uPlot-MvQPlaceMarkWidget.moc.obj: MvQPlaceMarkWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkWidget.moc.obj `if test -f 'MvQPlaceMarkWidget.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkWidget.moc.cpp' object='bin_uPlot-MvQPlaceMarkWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkWidget.moc.obj `if test -f 'MvQPlaceMarkWidget.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQPlaceMarkMimeData.moc.o: MvQPlaceMarkMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkMimeData.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkMimeData.moc.o `test -f 'MvQPlaceMarkMimeData.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.moc.cpp' object='bin_uPlot-MvQPlaceMarkMimeData.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkMimeData.moc.o `test -f 'MvQPlaceMarkMimeData.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkMimeData.moc.cpp
+
+bin_uPlot-MvQPlaceMarkMimeData.moc.obj: MvQPlaceMarkMimeData.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkMimeData.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkMimeData.moc.obj `if test -f 'MvQPlaceMarkMimeData.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkMimeData.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkMimeData.moc.cpp' object='bin_uPlot-MvQPlaceMarkMimeData.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkMimeData.moc.obj `if test -f 'MvQPlaceMarkMimeData.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkMimeData.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkMimeData.moc.cpp'; fi`
+
+bin_uPlot-MvQPlaceMarkModel.moc.o: MvQPlaceMarkModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkModel.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkModel.moc.o `test -f 'MvQPlaceMarkModel.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.moc.cpp' object='bin_uPlot-MvQPlaceMarkModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkModel.moc.o `test -f 'MvQPlaceMarkModel.moc.cpp' || echo '$(srcdir)/'`MvQPlaceMarkModel.moc.cpp
+
+bin_uPlot-MvQPlaceMarkModel.moc.obj: MvQPlaceMarkModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlaceMarkModel.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Tpo -c -o bin_uPlot-MvQPlaceMarkModel.moc.obj `if test -f 'MvQPlaceMarkModel.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlaceMarkModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlaceMarkModel.moc.cpp' object='bin_uPlot-MvQPlaceMarkModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlaceMarkModel.moc.obj `if test -f 'MvQPlaceMarkModel.moc.cpp'; then $(CYGPATH_W) 'MvQPlaceMarkModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlaceMarkModel.moc.cpp'; fi`
+
+bin_uPlot-MvQStepModel.moc.o: MvQStepModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepModel.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepModel.moc.Tpo -c -o bin_uPlot-MvQStepModel.moc.o `test -f 'MvQStepModel.moc.cpp' || echo '$(srcdir)/'`MvQStepModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepModel.moc.Tpo $(DEPDIR)/bin_uPlot-MvQStepModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.moc.cpp' object='bin_uPlot-MvQStepModel.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepModel.moc.o `test -f 'MvQStepModel.moc.cpp' || echo '$(srcdir)/'`MvQStepModel.moc.cpp
+
+bin_uPlot-MvQStepModel.moc.obj: MvQStepModel.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepModel.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepModel.moc.Tpo -c -o bin_uPlot-MvQStepModel.moc.obj `if test -f 'MvQStepModel.moc.cpp'; then $(CYGPATH_W) 'MvQStepModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepModel.moc.Tpo $(DEPDIR)/bin_uPlot-MvQStepModel.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepModel.moc.cpp' object='bin_uPlot-MvQStepModel.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepModel.moc.obj `if test -f 'MvQStepModel.moc.cpp'; then $(CYGPATH_W) 'MvQStepModel.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepModel.moc.cpp'; fi`
+
+bin_uPlot-MvQStepWidget.moc.o: MvQStepWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Tpo -c -o bin_uPlot-MvQStepWidget.moc.o `test -f 'MvQStepWidget.moc.cpp' || echo '$(srcdir)/'`MvQStepWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.moc.cpp' object='bin_uPlot-MvQStepWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepWidget.moc.o `test -f 'MvQStepWidget.moc.cpp' || echo '$(srcdir)/'`MvQStepWidget.moc.cpp
+
+bin_uPlot-MvQStepWidget.moc.obj: MvQStepWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQStepWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Tpo -c -o bin_uPlot-MvQStepWidget.moc.obj `if test -f 'MvQStepWidget.moc.cpp'; then $(CYGPATH_W) 'MvQStepWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQStepWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQStepWidget.moc.cpp' object='bin_uPlot-MvQStepWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQStepWidget.moc.obj `if test -f 'MvQStepWidget.moc.cpp'; then $(CYGPATH_W) 'MvQStepWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQStepWidget.moc.cpp'; fi`
+
+bin_uPlot-MvQPlotView.moc.o: MvQPlotView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlotView.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlotView.moc.Tpo -c -o bin_uPlot-MvQPlotView.moc.o `test -f 'MvQPlotView.moc.cpp' || echo '$(srcdir)/'`MvQPlotView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlotView.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlotView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.moc.cpp' object='bin_uPlot-MvQPlotView.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlotView.moc.o `test -f 'MvQPlotView.moc.cpp' || echo '$(srcdir)/'`MvQPlotView.moc.cpp
+
+bin_uPlot-MvQPlotView.moc.obj: MvQPlotView.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPlotView.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPlotView.moc.Tpo -c -o bin_uPlot-MvQPlotView.moc.obj `if test -f 'MvQPlotView.moc.cpp'; then $(CYGPATH_W) 'MvQPlotView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPlotView.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPlotView.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPlotView.moc.cpp' object='bin_uPlot-MvQPlotView.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPlotView.moc.obj `if test -f 'MvQPlotView.moc.cpp'; then $(CYGPATH_W) 'MvQPlotView.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPlotView.moc.cpp'; fi`
+
+bin_uPlot-MvQPointSelection.moc.o: MvQPointSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPointSelection.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Tpo -c -o bin_uPlot-MvQPointSelection.moc.o `test -f 'MvQPointSelection.moc.cpp' || echo '$(srcdir)/'`MvQPointSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.moc.cpp' object='bin_uPlot-MvQPointSelection.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPointSelection.moc.o `test -f 'MvQPointSelection.moc.cpp' || echo '$(srcdir)/'`MvQPointSelection.moc.cpp
+
+bin_uPlot-MvQPointSelection.moc.obj: MvQPointSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQPointSelection.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Tpo -c -o bin_uPlot-MvQPointSelection.moc.obj `if test -f 'MvQPointSelection.moc.cpp'; then $(CYGPATH_W) 'MvQPointSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Tpo $(DEPDIR)/bin_uPlot-MvQPointSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQPointSelection.moc.cpp' object='bin_uPlot-MvQPointSelection.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQPointSelection.moc.obj `if test -f 'MvQPointSelection.moc.cpp'; then $(CYGPATH_W) 'MvQPointSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQPointSelection.moc.cpp'; fi`
+
+bin_uPlot-MvQZoom.moc.o: MvQZoom.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoom.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoom.moc.Tpo -c -o bin_uPlot-MvQZoom.moc.o `test -f 'MvQZoom.moc.cpp' || echo '$(srcdir)/'`MvQZoom.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoom.moc.Tpo $(DEPDIR)/bin_uPlot-MvQZoom.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.moc.cpp' object='bin_uPlot-MvQZoom.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoom.moc.o `test -f 'MvQZoom.moc.cpp' || echo '$(srcdir)/'`MvQZoom.moc.cpp
+
+bin_uPlot-MvQZoom.moc.obj: MvQZoom.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoom.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoom.moc.Tpo -c -o bin_uPlot-MvQZoom.moc.obj `if test -f 'MvQZoom.moc.cpp'; then $(CYGPATH_W) 'MvQZoom.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoom.moc.Tpo $(DEPDIR)/bin_uPlot-MvQZoom.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoom.moc.cpp' object='bin_uPlot-MvQZoom.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoom.moc.obj `if test -f 'MvQZoom.moc.cpp'; then $(CYGPATH_W) 'MvQZoom.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoom.moc.cpp'; fi`
+
+bin_uPlot-MvQAreaSelection.moc.o: MvQAreaSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQAreaSelection.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Tpo -c -o bin_uPlot-MvQAreaSelection.moc.o `test -f 'MvQAreaSelection.moc.cpp' || echo '$(srcdir)/'`MvQAreaSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Tpo $(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.moc.cpp' object='bin_uPlot-MvQAreaSelection.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQAreaSelection.moc.o `test -f 'MvQAreaSelection.moc.cpp' || echo '$(srcdir)/'`MvQAreaSelection.moc.cpp
+
+bin_uPlot-MvQAreaSelection.moc.obj: MvQAreaSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQAreaSelection.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Tpo -c -o bin_uPlot-MvQAreaSelection.moc.obj `if test -f 'MvQAreaSelection.moc.cpp'; then $(CYGPATH_W) 'MvQAreaSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Tpo $(DEPDIR)/bin_uPlot-MvQAreaSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQAreaSelection.moc.cpp' object='bin_uPlot-MvQAreaSelection.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQAreaSelection.moc.obj `if test -f 'MvQAreaSelection.moc.cpp'; then $(CYGPATH_W) 'MvQAreaSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQAreaSelection.moc.cpp'; fi`
+
+bin_uPlot-MvQLineSelection.moc.o: MvQLineSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLineSelection.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Tpo -c -o bin_uPlot-MvQLineSelection.moc.o `test -f 'MvQLineSelection.moc.cpp' || echo '$(srcdir)/'`MvQLineSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.moc.cpp' object='bin_uPlot-MvQLineSelection.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLineSelection.moc.o `test -f 'MvQLineSelection.moc.cpp' || echo '$(srcdir)/'`MvQLineSelection.moc.cpp
+
+bin_uPlot-MvQLineSelection.moc.obj: MvQLineSelection.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQLineSelection.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Tpo -c -o bin_uPlot-MvQLineSelection.moc.obj `if test -f 'MvQLineSelection.moc.cpp'; then $(CYGPATH_W) 'MvQLineSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Tpo $(DEPDIR)/bin_uPlot-MvQLineSelection.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQLineSelection.moc.cpp' object='bin_uPlot-MvQLineSelection.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQLineSelection.moc.obj `if test -f 'MvQLineSelection.moc.cpp'; then $(CYGPATH_W) 'MvQLineSelection.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQLineSelection.moc.cpp'; fi`
+
+bin_uPlot-MvQZoomStackWidget.moc.o: MvQZoomStackWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoomStackWidget.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Tpo -c -o bin_uPlot-MvQZoomStackWidget.moc.o `test -f 'MvQZoomStackWidget.moc.cpp' || echo '$(srcdir)/'`MvQZoomStackWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.moc.cpp' object='bin_uPlot-MvQZoomStackWidget.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoomStackWidget.moc.o `test -f 'MvQZoomStackWidget.moc.cpp' || echo '$(srcdir)/'`MvQZoomStackWidget.moc.cpp
+
+bin_uPlot-MvQZoomStackWidget.moc.obj: MvQZoomStackWidget.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-MvQZoomStackWidget.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Tpo -c -o bin_uPlot-MvQZoomStackWidget.moc.obj `if test -f 'MvQZoomStackWidget.moc.cpp'; then $(CYGPATH_W) 'MvQZoomStackWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Tpo $(DEPDIR)/bin_uPlot-MvQZoomStackWidget.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvQZoomStackWidget.moc.cpp' object='bin_uPlot-MvQZoomStackWidget.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-MvQZoomStackWidget.moc.obj `if test -f 'MvQZoomStackWidget.moc.cpp'; then $(CYGPATH_W) 'MvQZoomStackWidget.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/MvQZoomStackWidget.moc.cpp'; fi`
+
+bin_uPlot-ExportDialog.moc.o: ExportDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ExportDialog.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-ExportDialog.moc.Tpo -c -o bin_uPlot-ExportDialog.moc.o `test -f 'ExportDialog.moc.cpp' || echo '$(srcdir)/'`ExportDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ExportDialog.moc.Tpo $(DEPDIR)/bin_uPlot-ExportDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.moc.cpp' object='bin_uPlot-ExportDialog.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ExportDialog.moc.o `test -f 'ExportDialog.moc.cpp' || echo '$(srcdir)/'`ExportDialog.moc.cpp
+
+bin_uPlot-ExportDialog.moc.obj: ExportDialog.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-ExportDialog.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-ExportDialog.moc.Tpo -c -o bin_uPlot-ExportDialog.moc.obj `if test -f 'ExportDialog.moc.cpp'; then $(CYGPATH_W) 'ExportDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-ExportDialog.moc.Tpo $(DEPDIR)/bin_uPlot-ExportDialog.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ExportDialog.moc.cpp' object='bin_uPlot-ExportDialog.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-ExportDialog.moc.obj `if test -f 'ExportDialog.moc.cpp'; then $(CYGPATH_W) 'ExportDialog.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/ExportDialog.moc.cpp'; fi`
+
+bin_uPlot-uPlotBase.moc.o: uPlotBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlotBase.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlotBase.moc.Tpo -c -o bin_uPlot-uPlotBase.moc.o `test -f 'uPlotBase.moc.cpp' || echo '$(srcdir)/'`uPlotBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlotBase.moc.Tpo $(DEPDIR)/bin_uPlot-uPlotBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.moc.cpp' object='bin_uPlot-uPlotBase.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlotBase.moc.o `test -f 'uPlotBase.moc.cpp' || echo '$(srcdir)/'`uPlotBase.moc.cpp
+
+bin_uPlot-uPlotBase.moc.obj: uPlotBase.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlotBase.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlotBase.moc.Tpo -c -o bin_uPlot-uPlotBase.moc.obj `if test -f 'uPlotBase.moc.cpp'; then $(CYGPATH_W) 'uPlotBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlotBase.moc.Tpo $(DEPDIR)/bin_uPlot-uPlotBase.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBase.moc.cpp' object='bin_uPlot-uPlotBase.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlotBase.moc.obj `if test -f 'uPlotBase.moc.cpp'; then $(CYGPATH_W) 'uPlotBase.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlotBase.moc.cpp'; fi`
+
+bin_uPlot-uPlot.qrc.o: uPlot.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlot.qrc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlot.qrc.Tpo -c -o bin_uPlot-uPlot.qrc.o `test -f 'uPlot.qrc.cpp' || echo '$(srcdir)/'`uPlot.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlot.qrc.Tpo $(DEPDIR)/bin_uPlot-uPlot.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.qrc.cpp' object='bin_uPlot-uPlot.qrc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlot.qrc.o `test -f 'uPlot.qrc.cpp' || echo '$(srcdir)/'`uPlot.qrc.cpp
+
+bin_uPlot-uPlot.qrc.obj: uPlot.qrc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlot.qrc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlot.qrc.Tpo -c -o bin_uPlot-uPlot.qrc.obj `if test -f 'uPlot.qrc.cpp'; then $(CYGPATH_W) 'uPlot.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlot.qrc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlot.qrc.Tpo $(DEPDIR)/bin_uPlot-uPlot.qrc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.qrc.cpp' object='bin_uPlot-uPlot.qrc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlot.qrc.obj `if test -f 'uPlot.qrc.cpp'; then $(CYGPATH_W) 'uPlot.qrc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlot.qrc.cpp'; fi`
+
+bin_uPlot-uPlot.moc.o: uPlot.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlot.moc.o -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlot.moc.Tpo -c -o bin_uPlot-uPlot.moc.o `test -f 'uPlot.moc.cpp' || echo '$(srcdir)/'`uPlot.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlot.moc.Tpo $(DEPDIR)/bin_uPlot-uPlot.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.moc.cpp' object='bin_uPlot-uPlot.moc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlot.moc.o `test -f 'uPlot.moc.cpp' || echo '$(srcdir)/'`uPlot.moc.cpp
+
+bin_uPlot-uPlot.moc.obj: uPlot.moc.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlot-uPlot.moc.obj -MD -MP -MF $(DEPDIR)/bin_uPlot-uPlot.moc.Tpo -c -o bin_uPlot-uPlot.moc.obj `if test -f 'uPlot.moc.cpp'; then $(CYGPATH_W) 'uPlot.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlot.moc.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlot-uPlot.moc.Tpo $(DEPDIR)/bin_uPlot-uPlot.moc.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlot.moc.cpp' object='bin_uPlot-uPlot.moc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlot_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlot-uPlot.moc.obj `if test -f 'uPlot.moc.cpp'; then $(CYGPATH_W) 'uPlot.moc.cpp'; else $(CYGPATH_W) '$(srcdir)/uPlot.moc.cpp'; fi`
+
+bin_uPlotBatch-MvMainuPlotBatch.o: MvMainuPlotBatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvMainuPlotBatch.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Tpo -c -o bin_uPlotBatch-MvMainuPlotBatch.o `test -f 'MvMainuPlotBatch.cc' || echo '$(srcdir)/'`MvMainuPlotBatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Tpo $(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMainuPlotBatch.cc' object='bin_uPlotBatch-MvMainuPlotBatch.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvMainuPlotBatch.o `test -f 'MvMainuPlotBatch.cc' || echo '$(srcdir)/'`MvMainuPlotBatch.cc
+
+bin_uPlotBatch-MvMainuPlotBatch.obj: MvMainuPlotBatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvMainuPlotBatch.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Tpo -c -o bin_uPlotBatch-MvMainuPlotBatch.obj `if test -f 'MvMainuPlotBatch.cc'; then $(CYGPATH_W) 'MvMainuPlotBatch.cc'; else $(CYGPATH_W) '$(srcdir)/MvMainuPlotBatch.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Tpo $(DEPDIR)/bin_uPlotBatch-MvMainuPlotBatch.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvMainuPlotBatch.cc' object='bin_uPlotBatch-MvMainuPlotBatch.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvMainuPlotBatch.obj `if test -f 'MvMainuPlotBatch.cc'; then $(CYGPATH_W) 'MvMainuPlotBatch.cc'; else $(CYGPATH_W) '$(srcdir)/MvMainuPlotBatch.cc'; fi`
+
+bin_uPlotBatch-AverageView.o: AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-AverageView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-AverageView.Tpo -c -o bin_uPlotBatch-AverageView.o `test -f 'AverageView.cc' || echo '$(srcdir)/'`AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-AverageView.Tpo $(DEPDIR)/bin_uPlotBatch-AverageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='AverageView.cc' object='bin_uPlotBatch-AverageView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-AverageView.o `test -f 'AverageView.cc' || echo '$(srcdir)/'`AverageView.cc
+
+bin_uPlotBatch-AverageView.obj: AverageView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-AverageView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-AverageView.Tpo -c -o bin_uPlotBatch-AverageView.obj `if test -f 'AverageView.cc'; then $(CYGPATH_W) 'AverageView.cc'; else $(CYGPATH_W) '$(srcdir)/AverageView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-AverageView.Tpo $(DEPDIR)/bin_uPlotBatch-AverageView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='AverageView.cc' object='bin_uPlotBatch-AverageView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-AverageView.obj `if test -f 'AverageView.cc'; then $(CYGPATH_W) 'AverageView.cc'; else $(CYGPATH_W) '$(srcdir)/AverageView.cc'; fi`
+
+bin_uPlotBatch-BufrDecoder.o: BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-BufrDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-BufrDecoder.Tpo -c -o bin_uPlotBatch-BufrDecoder.o `test -f 'BufrDecoder.cc' || echo '$(srcdir)/'`BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-BufrDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-BufrDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrDecoder.cc' object='bin_uPlotBatch-BufrDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-BufrDecoder.o `test -f 'BufrDecoder.cc' || echo '$(srcdir)/'`BufrDecoder.cc
+
+bin_uPlotBatch-BufrDecoder.obj: BufrDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-BufrDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-BufrDecoder.Tpo -c -o bin_uPlotBatch-BufrDecoder.obj `if test -f 'BufrDecoder.cc'; then $(CYGPATH_W) 'BufrDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/BufrDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-BufrDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-BufrDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='BufrDecoder.cc' object='bin_uPlotBatch-BufrDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-BufrDecoder.obj `if test -f 'BufrDecoder.cc'; then $(CYGPATH_W) 'BufrDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/BufrDecoder.cc'; fi`
+
+bin_uPlotBatch-Canvas.o: Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Canvas.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Canvas.Tpo -c -o bin_uPlotBatch-Canvas.o `test -f 'Canvas.cc' || echo '$(srcdir)/'`Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Canvas.Tpo $(DEPDIR)/bin_uPlotBatch-Canvas.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Canvas.cc' object='bin_uPlotBatch-Canvas.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Canvas.o `test -f 'Canvas.cc' || echo '$(srcdir)/'`Canvas.cc
+
+bin_uPlotBatch-Canvas.obj: Canvas.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Canvas.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Canvas.Tpo -c -o bin_uPlotBatch-Canvas.obj `if test -f 'Canvas.cc'; then $(CYGPATH_W) 'Canvas.cc'; else $(CYGPATH_W) '$(srcdir)/Canvas.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Canvas.Tpo $(DEPDIR)/bin_uPlotBatch-Canvas.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Canvas.cc' object='bin_uPlotBatch-Canvas.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Canvas.obj `if test -f 'Canvas.cc'; then $(CYGPATH_W) 'Canvas.cc'; else $(CYGPATH_W) '$(srcdir)/Canvas.cc'; fi`
+
+bin_uPlotBatch-CartesianView.o: CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CartesianView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CartesianView.Tpo -c -o bin_uPlotBatch-CartesianView.o `test -f 'CartesianView.cc' || echo '$(srcdir)/'`CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CartesianView.Tpo $(DEPDIR)/bin_uPlotBatch-CartesianView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CartesianView.cc' object='bin_uPlotBatch-CartesianView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CartesianView.o `test -f 'CartesianView.cc' || echo '$(srcdir)/'`CartesianView.cc
+
+bin_uPlotBatch-CartesianView.obj: CartesianView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CartesianView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CartesianView.Tpo -c -o bin_uPlotBatch-CartesianView.obj `if test -f 'CartesianView.cc'; then $(CYGPATH_W) 'CartesianView.cc'; else $(CYGPATH_W) '$(srcdir)/CartesianView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CartesianView.Tpo $(DEPDIR)/bin_uPlotBatch-CartesianView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CartesianView.cc' object='bin_uPlotBatch-CartesianView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CartesianView.obj `if test -f 'CartesianView.cc'; then $(CYGPATH_W) 'CartesianView.cc'; else $(CYGPATH_W) '$(srcdir)/CartesianView.cc'; fi`
+
+bin_uPlotBatch-CommonXSectView.o: CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CommonXSectView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CommonXSectView.Tpo -c -o bin_uPlotBatch-CommonXSectView.o `test -f 'CommonXSectView.cc' || echo '$(srcdir)/'`CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CommonXSectView.Tpo $(DEPDIR)/bin_uPlotBatch-CommonXSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CommonXSectView.cc' object='bin_uPlotBatch-CommonXSectView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CommonXSectView.o `test -f 'CommonXSectView.cc' || echo '$(srcdir)/'`CommonXSectView.cc
+
+bin_uPlotBatch-CommonXSectView.obj: CommonXSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CommonXSectView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CommonXSectView.Tpo -c -o bin_uPlotBatch-CommonXSectView.obj `if test -f 'CommonXSectView.cc'; then $(CYGPATH_W) 'CommonXSectView.cc'; else $(CYGPATH_W) '$(srcdir)/CommonXSectView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CommonXSectView.Tpo $(DEPDIR)/bin_uPlotBatch-CommonXSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CommonXSectView.cc' object='bin_uPlotBatch-CommonXSectView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CommonXSectView.obj `if test -f 'CommonXSectView.cc'; then $(CYGPATH_W) 'CommonXSectView.cc'; else $(CYGPATH_W) '$(srcdir)/CommonXSectView.cc'; fi`
+
+bin_uPlotBatch-CreateAction.o: CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CreateAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CreateAction.Tpo -c -o bin_uPlotBatch-CreateAction.o `test -f 'CreateAction.cc' || echo '$(srcdir)/'`CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CreateAction.Tpo $(DEPDIR)/bin_uPlotBatch-CreateAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateAction.cc' object='bin_uPlotBatch-CreateAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CreateAction.o `test -f 'CreateAction.cc' || echo '$(srcdir)/'`CreateAction.cc
+
+bin_uPlotBatch-CreateAction.obj: CreateAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CreateAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CreateAction.Tpo -c -o bin_uPlotBatch-CreateAction.obj `if test -f 'CreateAction.cc'; then $(CYGPATH_W) 'CreateAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CreateAction.Tpo $(DEPDIR)/bin_uPlotBatch-CreateAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateAction.cc' object='bin_uPlotBatch-CreateAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CreateAction.obj `if test -f 'CreateAction.cc'; then $(CYGPATH_W) 'CreateAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateAction.cc'; fi`
+
+bin_uPlotBatch-CreateTypeAction.o: CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CreateTypeAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Tpo -c -o bin_uPlotBatch-CreateTypeAction.o `test -f 'CreateTypeAction.cc' || echo '$(srcdir)/'`CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Tpo $(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateTypeAction.cc' object='bin_uPlotBatch-CreateTypeAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CreateTypeAction.o `test -f 'CreateTypeAction.cc' || echo '$(srcdir)/'`CreateTypeAction.cc
+
+bin_uPlotBatch-CreateTypeAction.obj: CreateTypeAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-CreateTypeAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Tpo -c -o bin_uPlotBatch-CreateTypeAction.obj `if test -f 'CreateTypeAction.cc'; then $(CYGPATH_W) 'CreateTypeAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateTypeAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Tpo $(DEPDIR)/bin_uPlotBatch-CreateTypeAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='CreateTypeAction.cc' object='bin_uPlotBatch-CreateTypeAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-CreateTypeAction.obj `if test -f 'CreateTypeAction.cc'; then $(CYGPATH_W) 'CreateTypeAction.cc'; else $(CYGPATH_W) '$(srcdir)/CreateTypeAction.cc'; fi`
+
+bin_uPlotBatch-DataBuilder.o: DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DataBuilder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DataBuilder.Tpo -c -o bin_uPlotBatch-DataBuilder.o `test -f 'DataBuilder.cc' || echo '$(srcdir)/'`DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DataBuilder.Tpo $(DEPDIR)/bin_uPlotBatch-DataBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataBuilder.cc' object='bin_uPlotBatch-DataBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DataBuilder.o `test -f 'DataBuilder.cc' || echo '$(srcdir)/'`DataBuilder.cc
+
+bin_uPlotBatch-DataBuilder.obj: DataBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DataBuilder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DataBuilder.Tpo -c -o bin_uPlotBatch-DataBuilder.obj `if test -f 'DataBuilder.cc'; then $(CYGPATH_W) 'DataBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/DataBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DataBuilder.Tpo $(DEPDIR)/bin_uPlotBatch-DataBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataBuilder.cc' object='bin_uPlotBatch-DataBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DataBuilder.obj `if test -f 'DataBuilder.cc'; then $(CYGPATH_W) 'DataBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/DataBuilder.cc'; fi`
+
+bin_uPlotBatch-DataObject.o: DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DataObject.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DataObject.Tpo -c -o bin_uPlotBatch-DataObject.o `test -f 'DataObject.cc' || echo '$(srcdir)/'`DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DataObject.Tpo $(DEPDIR)/bin_uPlotBatch-DataObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataObject.cc' object='bin_uPlotBatch-DataObject.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DataObject.o `test -f 'DataObject.cc' || echo '$(srcdir)/'`DataObject.cc
+
+bin_uPlotBatch-DataObject.obj: DataObject.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DataObject.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DataObject.Tpo -c -o bin_uPlotBatch-DataObject.obj `if test -f 'DataObject.cc'; then $(CYGPATH_W) 'DataObject.cc'; else $(CYGPATH_W) '$(srcdir)/DataObject.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DataObject.Tpo $(DEPDIR)/bin_uPlotBatch-DataObject.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DataObject.cc' object='bin_uPlotBatch-DataObject.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DataObject.obj `if test -f 'DataObject.cc'; then $(CYGPATH_W) 'DataObject.cc'; else $(CYGPATH_W) '$(srcdir)/DataObject.cc'; fi`
+
+bin_uPlotBatch-Decoder.o: Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Decoder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Decoder.Tpo -c -o bin_uPlotBatch-Decoder.o `test -f 'Decoder.cc' || echo '$(srcdir)/'`Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Decoder.Tpo $(DEPDIR)/bin_uPlotBatch-Decoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Decoder.cc' object='bin_uPlotBatch-Decoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Decoder.o `test -f 'Decoder.cc' || echo '$(srcdir)/'`Decoder.cc
+
+bin_uPlotBatch-Decoder.obj: Decoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Decoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Decoder.Tpo -c -o bin_uPlotBatch-Decoder.obj `if test -f 'Decoder.cc'; then $(CYGPATH_W) 'Decoder.cc'; else $(CYGPATH_W) '$(srcdir)/Decoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Decoder.Tpo $(DEPDIR)/bin_uPlotBatch-Decoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Decoder.cc' object='bin_uPlotBatch-Decoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Decoder.obj `if test -f 'Decoder.cc'; then $(CYGPATH_W) 'Decoder.cc'; else $(CYGPATH_W) '$(srcdir)/Decoder.cc'; fi`
+
+bin_uPlotBatch-Device.o: Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Device.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Device.Tpo -c -o bin_uPlotBatch-Device.o `test -f 'Device.cc' || echo '$(srcdir)/'`Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Device.Tpo $(DEPDIR)/bin_uPlotBatch-Device.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Device.cc' object='bin_uPlotBatch-Device.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Device.o `test -f 'Device.cc' || echo '$(srcdir)/'`Device.cc
+
+bin_uPlotBatch-Device.obj: Device.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Device.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Device.Tpo -c -o bin_uPlotBatch-Device.obj `if test -f 'Device.cc'; then $(CYGPATH_W) 'Device.cc'; else $(CYGPATH_W) '$(srcdir)/Device.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Device.Tpo $(DEPDIR)/bin_uPlotBatch-Device.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Device.cc' object='bin_uPlotBatch-Device.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Device.obj `if test -f 'Device.cc'; then $(CYGPATH_W) 'Device.cc'; else $(CYGPATH_W) '$(srcdir)/Device.cc'; fi`
+
+bin_uPlotBatch-DrawingPriority.o: DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DrawingPriority.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DrawingPriority.Tpo -c -o bin_uPlotBatch-DrawingPriority.o `test -f 'DrawingPriority.cc' || echo '$(srcdir)/'`DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DrawingPriority.Tpo $(DEPDIR)/bin_uPlotBatch-DrawingPriority.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DrawingPriority.cc' object='bin_uPlotBatch-DrawingPriority.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DrawingPriority.o `test -f 'DrawingPriority.cc' || echo '$(srcdir)/'`DrawingPriority.cc
+
+bin_uPlotBatch-DrawingPriority.obj: DrawingPriority.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DrawingPriority.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DrawingPriority.Tpo -c -o bin_uPlotBatch-DrawingPriority.obj `if test -f 'DrawingPriority.cc'; then $(CYGPATH_W) 'DrawingPriority.cc'; else $(CYGPATH_W) '$(srcdir)/DrawingPriority.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DrawingPriority.Tpo $(DEPDIR)/bin_uPlotBatch-DrawingPriority.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DrawingPriority.cc' object='bin_uPlotBatch-DrawingPriority.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DrawingPriority.obj `if test -f 'DrawingPriority.cc'; then $(CYGPATH_W) 'DrawingPriority.cc'; else $(CYGPATH_W) '$(srcdir)/DrawingPriority.cc'; fi`
+
+bin_uPlotBatch-DropAction.o: DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DropAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DropAction.Tpo -c -o bin_uPlotBatch-DropAction.o `test -f 'DropAction.cc' || echo '$(srcdir)/'`DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DropAction.Tpo $(DEPDIR)/bin_uPlotBatch-DropAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropAction.cc' object='bin_uPlotBatch-DropAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DropAction.o `test -f 'DropAction.cc' || echo '$(srcdir)/'`DropAction.cc
+
+bin_uPlotBatch-DropAction.obj: DropAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-DropAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-DropAction.Tpo -c -o bin_uPlotBatch-DropAction.obj `if test -f 'DropAction.cc'; then $(CYGPATH_W) 'DropAction.cc'; else $(CYGPATH_W) '$(srcdir)/DropAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-DropAction.Tpo $(DEPDIR)/bin_uPlotBatch-DropAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DropAction.cc' object='bin_uPlotBatch-DropAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-DropAction.obj `if test -f 'DropAction.cc'; then $(CYGPATH_W) 'DropAction.cc'; else $(CYGPATH_W) '$(srcdir)/DropAction.cc'; fi`
+
+bin_uPlotBatch-GeopointsDecoder.o: GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GeopointsDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Tpo -c -o bin_uPlotBatch-GeopointsDecoder.o `test -f 'GeopointsDecoder.cc' || echo '$(srcdir)/'`GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopointsDecoder.cc' object='bin_uPlotBatch-GeopointsDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GeopointsDecoder.o `test -f 'GeopointsDecoder.cc' || echo '$(srcdir)/'`GeopointsDecoder.cc
+
+bin_uPlotBatch-GeopointsDecoder.obj: GeopointsDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GeopointsDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Tpo -c -o bin_uPlotBatch-GeopointsDecoder.obj `if test -f 'GeopointsDecoder.cc'; then $(CYGPATH_W) 'GeopointsDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GeopointsDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-GeopointsDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeopointsDecoder.cc' object='bin_uPlotBatch-GeopointsDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GeopointsDecoder.obj `if test -f 'GeopointsDecoder.cc'; then $(CYGPATH_W) 'GeopointsDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GeopointsDecoder.cc'; fi`
+
+bin_uPlotBatch-GraphicsEngine.o: GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GraphicsEngine.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Tpo -c -o bin_uPlotBatch-GraphicsEngine.o `test -f 'GraphicsEngine.cc' || echo '$(srcdir)/'`GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Tpo $(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GraphicsEngine.cc' object='bin_uPlotBatch-GraphicsEngine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GraphicsEngine.o `test -f 'GraphicsEngine.cc' || echo '$(srcdir)/'`GraphicsEngine.cc
+
+bin_uPlotBatch-GraphicsEngine.obj: GraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GraphicsEngine.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Tpo -c -o bin_uPlotBatch-GraphicsEngine.obj `if test -f 'GraphicsEngine.cc'; then $(CYGPATH_W) 'GraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/GraphicsEngine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Tpo $(DEPDIR)/bin_uPlotBatch-GraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GraphicsEngine.cc' object='bin_uPlotBatch-GraphicsEngine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GraphicsEngine.obj `if test -f 'GraphicsEngine.cc'; then $(CYGPATH_W) 'GraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/GraphicsEngine.cc'; fi`
+
+bin_uPlotBatch-GribDecoder.o: GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GribDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GribDecoder.Tpo -c -o bin_uPlotBatch-GribDecoder.o `test -f 'GribDecoder.cc' || echo '$(srcdir)/'`GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GribDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-GribDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribDecoder.cc' object='bin_uPlotBatch-GribDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GribDecoder.o `test -f 'GribDecoder.cc' || echo '$(srcdir)/'`GribDecoder.cc
+
+bin_uPlotBatch-GribDecoder.obj: GribDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GribDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GribDecoder.Tpo -c -o bin_uPlotBatch-GribDecoder.obj `if test -f 'GribDecoder.cc'; then $(CYGPATH_W) 'GribDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GribDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GribDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-GribDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GribDecoder.cc' object='bin_uPlotBatch-GribDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GribDecoder.obj `if test -f 'GribDecoder.cc'; then $(CYGPATH_W) 'GribDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/GribDecoder.cc'; fi`
+
+bin_uPlotBatch-Location.o: Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Location.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Location.Tpo -c -o bin_uPlotBatch-Location.o `test -f 'Location.cc' || echo '$(srcdir)/'`Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Location.Tpo $(DEPDIR)/bin_uPlotBatch-Location.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Location.cc' object='bin_uPlotBatch-Location.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Location.o `test -f 'Location.cc' || echo '$(srcdir)/'`Location.cc
+
+bin_uPlotBatch-Location.obj: Location.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Location.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Location.Tpo -c -o bin_uPlotBatch-Location.obj `if test -f 'Location.cc'; then $(CYGPATH_W) 'Location.cc'; else $(CYGPATH_W) '$(srcdir)/Location.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Location.Tpo $(DEPDIR)/bin_uPlotBatch-Location.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Location.cc' object='bin_uPlotBatch-Location.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Location.obj `if test -f 'Location.cc'; then $(CYGPATH_W) 'Location.cc'; else $(CYGPATH_W) '$(srcdir)/Location.cc'; fi`
+
+bin_uPlotBatch-MvLayer.o: MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvLayer.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvLayer.Tpo -c -o bin_uPlotBatch-MvLayer.o `test -f 'MvLayer.cc' || echo '$(srcdir)/'`MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvLayer.Tpo $(DEPDIR)/bin_uPlotBatch-MvLayer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvLayer.cc' object='bin_uPlotBatch-MvLayer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvLayer.o `test -f 'MvLayer.cc' || echo '$(srcdir)/'`MvLayer.cc
+
+bin_uPlotBatch-MvLayer.obj: MvLayer.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvLayer.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvLayer.Tpo -c -o bin_uPlotBatch-MvLayer.obj `if test -f 'MvLayer.cc'; then $(CYGPATH_W) 'MvLayer.cc'; else $(CYGPATH_W) '$(srcdir)/MvLayer.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvLayer.Tpo $(DEPDIR)/bin_uPlotBatch-MvLayer.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvLayer.cc' object='bin_uPlotBatch-MvLayer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvLayer.obj `if test -f 'MvLayer.cc'; then $(CYGPATH_W) 'MvLayer.cc'; else $(CYGPATH_W) '$(srcdir)/MvLayer.cc'; fi`
+
+bin_uPlotBatch-MacroConverter.o: MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MacroConverter.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MacroConverter.Tpo -c -o bin_uPlotBatch-MacroConverter.o `test -f 'MacroConverter.cc' || echo '$(srcdir)/'`MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MacroConverter.Tpo $(DEPDIR)/bin_uPlotBatch-MacroConverter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroConverter.cc' object='bin_uPlotBatch-MacroConverter.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MacroConverter.o `test -f 'MacroConverter.cc' || echo '$(srcdir)/'`MacroConverter.cc
+
+bin_uPlotBatch-MacroConverter.obj: MacroConverter.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MacroConverter.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MacroConverter.Tpo -c -o bin_uPlotBatch-MacroConverter.obj `if test -f 'MacroConverter.cc'; then $(CYGPATH_W) 'MacroConverter.cc'; else $(CYGPATH_W) '$(srcdir)/MacroConverter.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MacroConverter.Tpo $(DEPDIR)/bin_uPlotBatch-MacroConverter.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroConverter.cc' object='bin_uPlotBatch-MacroConverter.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MacroConverter.obj `if test -f 'MacroConverter.cc'; then $(CYGPATH_W) 'MacroConverter.cc'; else $(CYGPATH_W) '$(srcdir)/MacroConverter.cc'; fi`
+
+bin_uPlotBatch-MacroVisitor.o: MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MacroVisitor.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MacroVisitor.Tpo -c -o bin_uPlotBatch-MacroVisitor.o `test -f 'MacroVisitor.cc' || echo '$(srcdir)/'`MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MacroVisitor.Tpo $(DEPDIR)/bin_uPlotBatch-MacroVisitor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroVisitor.cc' object='bin_uPlotBatch-MacroVisitor.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MacroVisitor.o `test -f 'MacroVisitor.cc' || echo '$(srcdir)/'`MacroVisitor.cc
+
+bin_uPlotBatch-MacroVisitor.obj: MacroVisitor.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MacroVisitor.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MacroVisitor.Tpo -c -o bin_uPlotBatch-MacroVisitor.obj `if test -f 'MacroVisitor.cc'; then $(CYGPATH_W) 'MacroVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroVisitor.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MacroVisitor.Tpo $(DEPDIR)/bin_uPlotBatch-MacroVisitor.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MacroVisitor.cc' object='bin_uPlotBatch-MacroVisitor.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MacroVisitor.obj `if test -f 'MacroVisitor.cc'; then $(CYGPATH_W) 'MacroVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/MacroVisitor.cc'; fi`
+
+bin_uPlotBatch-MagicsGraphicsEngine.o: MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagicsGraphicsEngine.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Tpo -c -o bin_uPlotBatch-MagicsGraphicsEngine.o `test -f 'MagicsGraphicsEngine.cc' || echo '$(srcdir)/'`MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Tpo $(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsGraphicsEngine.cc' object='bin_uPlotBatch-MagicsGraphicsEngine.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagicsGraphicsEngine.o `test -f 'MagicsGraphicsEngine.cc' || echo '$(srcdir)/'`MagicsGraphicsEngine.cc
+
+bin_uPlotBatch-MagicsGraphicsEngine.obj: MagicsGraphicsEngine.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagicsGraphicsEngine.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Tpo -c -o bin_uPlotBatch-MagicsGraphicsEngine.obj `if test -f 'MagicsGraphicsEngine.cc'; then $(CYGPATH_W) 'MagicsGraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsGraphicsEngine.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Tpo $(DEPDIR)/bin_uPlotBatch-MagicsGraphicsEngine.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsGraphicsEngine.cc' object='bin_uPlotBatch-MagicsGraphicsEngine.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagicsGraphicsEngine.obj `if test -f 'MagicsGraphicsEngine.cc'; then $(CYGPATH_W) 'MagicsGraphicsEngine.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsGraphicsEngine.cc'; fi`
+
+bin_uPlotBatch-MagicsTranslator.o: MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagicsTranslator.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Tpo -c -o bin_uPlotBatch-MagicsTranslator.o `test -f 'MagicsTranslator.cc' || echo '$(srcdir)/'`MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Tpo $(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsTranslator.cc' object='bin_uPlotBatch-MagicsTranslator.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagicsTranslator.o `test -f 'MagicsTranslator.cc' || echo '$(srcdir)/'`MagicsTranslator.cc
+
+bin_uPlotBatch-MagicsTranslator.obj: MagicsTranslator.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagicsTranslator.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Tpo -c -o bin_uPlotBatch-MagicsTranslator.obj `if test -f 'MagicsTranslator.cc'; then $(CYGPATH_W) 'MagicsTranslator.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsTranslator.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Tpo $(DEPDIR)/bin_uPlotBatch-MagicsTranslator.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagicsTranslator.cc' object='bin_uPlotBatch-MagicsTranslator.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagicsTranslator.obj `if test -f 'MagicsTranslator.cc'; then $(CYGPATH_W) 'MagicsTranslator.cc'; else $(CYGPATH_W) '$(srcdir)/MagicsTranslator.cc'; fi`
+
+bin_uPlotBatch-MagPlusService.o: MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagPlusService.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagPlusService.Tpo -c -o bin_uPlotBatch-MagPlusService.o `test -f 'MagPlusService.cc' || echo '$(srcdir)/'`MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagPlusService.Tpo $(DEPDIR)/bin_uPlotBatch-MagPlusService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusService.cc' object='bin_uPlotBatch-MagPlusService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagPlusService.o `test -f 'MagPlusService.cc' || echo '$(srcdir)/'`MagPlusService.cc
+
+bin_uPlotBatch-MagPlusService.obj: MagPlusService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagPlusService.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagPlusService.Tpo -c -o bin_uPlotBatch-MagPlusService.obj `if test -f 'MagPlusService.cc'; then $(CYGPATH_W) 'MagPlusService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagPlusService.Tpo $(DEPDIR)/bin_uPlotBatch-MagPlusService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusService.cc' object='bin_uPlotBatch-MagPlusService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagPlusService.obj `if test -f 'MagPlusService.cc'; then $(CYGPATH_W) 'MagPlusService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusService.cc'; fi`
+
+bin_uPlotBatch-MapView.o: MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MapView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MapView.Tpo -c -o bin_uPlotBatch-MapView.o `test -f 'MapView.cc' || echo '$(srcdir)/'`MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MapView.Tpo $(DEPDIR)/bin_uPlotBatch-MapView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MapView.cc' object='bin_uPlotBatch-MapView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MapView.o `test -f 'MapView.cc' || echo '$(srcdir)/'`MapView.cc
+
+bin_uPlotBatch-MapView.obj: MapView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MapView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MapView.Tpo -c -o bin_uPlotBatch-MapView.obj `if test -f 'MapView.cc'; then $(CYGPATH_W) 'MapView.cc'; else $(CYGPATH_W) '$(srcdir)/MapView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MapView.Tpo $(DEPDIR)/bin_uPlotBatch-MapView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MapView.cc' object='bin_uPlotBatch-MapView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MapView.obj `if test -f 'MapView.cc'; then $(CYGPATH_W) 'MapView.cc'; else $(CYGPATH_W) '$(srcdir)/MapView.cc'; fi`
+
+bin_uPlotBatch-MatchingCriteria.o: MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MatchingCriteria.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Tpo -c -o bin_uPlotBatch-MatchingCriteria.o `test -f 'MatchingCriteria.cc' || echo '$(srcdir)/'`MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Tpo $(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingCriteria.cc' object='bin_uPlotBatch-MatchingCriteria.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MatchingCriteria.o `test -f 'MatchingCriteria.cc' || echo '$(srcdir)/'`MatchingCriteria.cc
+
+bin_uPlotBatch-MatchingCriteria.obj: MatchingCriteria.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MatchingCriteria.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Tpo -c -o bin_uPlotBatch-MatchingCriteria.obj `if test -f 'MatchingCriteria.cc'; then $(CYGPATH_W) 'MatchingCriteria.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingCriteria.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Tpo $(DEPDIR)/bin_uPlotBatch-MatchingCriteria.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingCriteria.cc' object='bin_uPlotBatch-MatchingCriteria.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MatchingCriteria.obj `if test -f 'MatchingCriteria.cc'; then $(CYGPATH_W) 'MatchingCriteria.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingCriteria.cc'; fi`
+
+bin_uPlotBatch-MatchingInfo.o: MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MatchingInfo.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MatchingInfo.Tpo -c -o bin_uPlotBatch-MatchingInfo.o `test -f 'MatchingInfo.cc' || echo '$(srcdir)/'`MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MatchingInfo.Tpo $(DEPDIR)/bin_uPlotBatch-MatchingInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingInfo.cc' object='bin_uPlotBatch-MatchingInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MatchingInfo.o `test -f 'MatchingInfo.cc' || echo '$(srcdir)/'`MatchingInfo.cc
+
+bin_uPlotBatch-MatchingInfo.obj: MatchingInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MatchingInfo.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MatchingInfo.Tpo -c -o bin_uPlotBatch-MatchingInfo.obj `if test -f 'MatchingInfo.cc'; then $(CYGPATH_W) 'MatchingInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MatchingInfo.Tpo $(DEPDIR)/bin_uPlotBatch-MatchingInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MatchingInfo.cc' object='bin_uPlotBatch-MatchingInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MatchingInfo.obj `if test -f 'MatchingInfo.cc'; then $(CYGPATH_W) 'MatchingInfo.cc'; else $(CYGPATH_W) '$(srcdir)/MatchingInfo.cc'; fi`
+
+bin_uPlotBatch-MvIcon.o: MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvIcon.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvIcon.Tpo -c -o bin_uPlotBatch-MvIcon.o `test -f 'MvIcon.cc' || echo '$(srcdir)/'`MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvIcon.Tpo $(DEPDIR)/bin_uPlotBatch-MvIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIcon.cc' object='bin_uPlotBatch-MvIcon.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvIcon.o `test -f 'MvIcon.cc' || echo '$(srcdir)/'`MvIcon.cc
+
+bin_uPlotBatch-MvIcon.obj: MvIcon.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvIcon.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvIcon.Tpo -c -o bin_uPlotBatch-MvIcon.obj `if test -f 'MvIcon.cc'; then $(CYGPATH_W) 'MvIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvIcon.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvIcon.Tpo $(DEPDIR)/bin_uPlotBatch-MvIcon.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIcon.cc' object='bin_uPlotBatch-MvIcon.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvIcon.obj `if test -f 'MvIcon.cc'; then $(CYGPATH_W) 'MvIcon.cc'; else $(CYGPATH_W) '$(srcdir)/MvIcon.cc'; fi`
+
+bin_uPlotBatch-MvIconDataBase.o: MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvIconDataBase.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Tpo -c -o bin_uPlotBatch-MvIconDataBase.o `test -f 'MvIconDataBase.cc' || echo '$(srcdir)/'`MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Tpo $(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIconDataBase.cc' object='bin_uPlotBatch-MvIconDataBase.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvIconDataBase.o `test -f 'MvIconDataBase.cc' || echo '$(srcdir)/'`MvIconDataBase.cc
+
+bin_uPlotBatch-MvIconDataBase.obj: MvIconDataBase.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MvIconDataBase.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Tpo -c -o bin_uPlotBatch-MvIconDataBase.obj `if test -f 'MvIconDataBase.cc'; then $(CYGPATH_W) 'MvIconDataBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvIconDataBase.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Tpo $(DEPDIR)/bin_uPlotBatch-MvIconDataBase.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MvIconDataBase.cc' object='bin_uPlotBatch-MvIconDataBase.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MvIconDataBase.obj `if test -f 'MvIconDataBase.cc'; then $(CYGPATH_W) 'MvIconDataBase.cc'; else $(CYGPATH_W) '$(srcdir)/MvIconDataBase.cc'; fi`
+
+bin_uPlotBatch-NewpageAction.o: NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-NewpageAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-NewpageAction.Tpo -c -o bin_uPlotBatch-NewpageAction.o `test -f 'NewpageAction.cc' || echo '$(srcdir)/'`NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-NewpageAction.Tpo $(DEPDIR)/bin_uPlotBatch-NewpageAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NewpageAction.cc' object='bin_uPlotBatch-NewpageAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-NewpageAction.o `test -f 'NewpageAction.cc' || echo '$(srcdir)/'`NewpageAction.cc
+
+bin_uPlotBatch-NewpageAction.obj: NewpageAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-NewpageAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-NewpageAction.Tpo -c -o bin_uPlotBatch-NewpageAction.obj `if test -f 'NewpageAction.cc'; then $(CYGPATH_W) 'NewpageAction.cc'; else $(CYGPATH_W) '$(srcdir)/NewpageAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-NewpageAction.Tpo $(DEPDIR)/bin_uPlotBatch-NewpageAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='NewpageAction.cc' object='bin_uPlotBatch-NewpageAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-NewpageAction.obj `if test -f 'NewpageAction.cc'; then $(CYGPATH_W) 'NewpageAction.cc'; else $(CYGPATH_W) '$(srcdir)/NewpageAction.cc'; fi`
+
+bin_uPlotBatch-ObjectInfo.o: ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-ObjectInfo.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-ObjectInfo.Tpo -c -o bin_uPlotBatch-ObjectInfo.o `test -f 'ObjectInfo.cc' || echo '$(srcdir)/'`ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-ObjectInfo.Tpo $(DEPDIR)/bin_uPlotBatch-ObjectInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectInfo.cc' object='bin_uPlotBatch-ObjectInfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-ObjectInfo.o `test -f 'ObjectInfo.cc' || echo '$(srcdir)/'`ObjectInfo.cc
+
+bin_uPlotBatch-ObjectInfo.obj: ObjectInfo.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-ObjectInfo.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-ObjectInfo.Tpo -c -o bin_uPlotBatch-ObjectInfo.obj `if test -f 'ObjectInfo.cc'; then $(CYGPATH_W) 'ObjectInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectInfo.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-ObjectInfo.Tpo $(DEPDIR)/bin_uPlotBatch-ObjectInfo.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectInfo.cc' object='bin_uPlotBatch-ObjectInfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-ObjectInfo.obj `if test -f 'ObjectInfo.cc'; then $(CYGPATH_W) 'ObjectInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectInfo.cc'; fi`
+
+bin_uPlotBatch-ObjectList.o: ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-ObjectList.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-ObjectList.Tpo -c -o bin_uPlotBatch-ObjectList.o `test -f 'ObjectList.cc' || echo '$(srcdir)/'`ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-ObjectList.Tpo $(DEPDIR)/bin_uPlotBatch-ObjectList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectList.cc' object='bin_uPlotBatch-ObjectList.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-ObjectList.o `test -f 'ObjectList.cc' || echo '$(srcdir)/'`ObjectList.cc
+
+bin_uPlotBatch-ObjectList.obj: ObjectList.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-ObjectList.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-ObjectList.Tpo -c -o bin_uPlotBatch-ObjectList.obj `if test -f 'ObjectList.cc'; then $(CYGPATH_W) 'ObjectList.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectList.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-ObjectList.Tpo $(DEPDIR)/bin_uPlotBatch-ObjectList.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ObjectList.cc' object='bin_uPlotBatch-ObjectList.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-ObjectList.obj `if test -f 'ObjectList.cc'; then $(CYGPATH_W) 'ObjectList.cc'; else $(CYGPATH_W) '$(srcdir)/ObjectList.cc'; fi`
+
+bin_uPlotBatch-OutputFormatAction.o: OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-OutputFormatAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Tpo -c -o bin_uPlotBatch-OutputFormatAction.o `test -f 'OutputFormatAction.cc' || echo '$(srcdir)/'`OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Tpo $(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputFormatAction.cc' object='bin_uPlotBatch-OutputFormatAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-OutputFormatAction.o `test -f 'OutputFormatAction.cc' || echo '$(srcdir)/'`OutputFormatAction.cc
+
+bin_uPlotBatch-OutputFormatAction.obj: OutputFormatAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-OutputFormatAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Tpo -c -o bin_uPlotBatch-OutputFormatAction.obj `if test -f 'OutputFormatAction.cc'; then $(CYGPATH_W) 'OutputFormatAction.cc'; else $(CYGPATH_W) '$(srcdir)/OutputFormatAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Tpo $(DEPDIR)/bin_uPlotBatch-OutputFormatAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='OutputFormatAction.cc' object='bin_uPlotBatch-OutputFormatAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-OutputFormatAction.obj `if test -f 'OutputFormatAction.cc'; then $(CYGPATH_W) 'OutputFormatAction.cc'; else $(CYGPATH_W) '$(srcdir)/OutputFormatAction.cc'; fi`
+
+bin_uPlotBatch-Page.o: Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Page.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Page.Tpo -c -o bin_uPlotBatch-Page.o `test -f 'Page.cc' || echo '$(srcdir)/'`Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Page.Tpo $(DEPDIR)/bin_uPlotBatch-Page.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Page.cc' object='bin_uPlotBatch-Page.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Page.o `test -f 'Page.cc' || echo '$(srcdir)/'`Page.cc
+
+bin_uPlotBatch-Page.obj: Page.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Page.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Page.Tpo -c -o bin_uPlotBatch-Page.obj `if test -f 'Page.cc'; then $(CYGPATH_W) 'Page.cc'; else $(CYGPATH_W) '$(srcdir)/Page.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Page.Tpo $(DEPDIR)/bin_uPlotBatch-Page.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Page.cc' object='bin_uPlotBatch-Page.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Page.obj `if test -f 'Page.cc'; then $(CYGPATH_W) 'Page.cc'; else $(CYGPATH_W) '$(srcdir)/Page.cc'; fi`
+
+bin_uPlotBatch-PlotAction.o: PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotAction.Tpo -c -o bin_uPlotBatch-PlotAction.o `test -f 'PlotAction.cc' || echo '$(srcdir)/'`PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotAction.Tpo $(DEPDIR)/bin_uPlotBatch-PlotAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotAction.cc' object='bin_uPlotBatch-PlotAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotAction.o `test -f 'PlotAction.cc' || echo '$(srcdir)/'`PlotAction.cc
+
+bin_uPlotBatch-PlotAction.obj: PlotAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotAction.Tpo -c -o bin_uPlotBatch-PlotAction.obj `if test -f 'PlotAction.cc'; then $(CYGPATH_W) 'PlotAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotAction.Tpo $(DEPDIR)/bin_uPlotBatch-PlotAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotAction.cc' object='bin_uPlotBatch-PlotAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotAction.obj `if test -f 'PlotAction.cc'; then $(CYGPATH_W) 'PlotAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotAction.cc'; fi`
+
+bin_uPlotBatch-PlotMod.o: PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotMod.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotMod.Tpo -c -o bin_uPlotBatch-PlotMod.o `test -f 'PlotMod.cc' || echo '$(srcdir)/'`PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotMod.Tpo $(DEPDIR)/bin_uPlotBatch-PlotMod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotMod.cc' object='bin_uPlotBatch-PlotMod.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotMod.o `test -f 'PlotMod.cc' || echo '$(srcdir)/'`PlotMod.cc
+
+bin_uPlotBatch-PlotMod.obj: PlotMod.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotMod.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotMod.Tpo -c -o bin_uPlotBatch-PlotMod.obj `if test -f 'PlotMod.cc'; then $(CYGPATH_W) 'PlotMod.cc'; else $(CYGPATH_W) '$(srcdir)/PlotMod.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotMod.Tpo $(DEPDIR)/bin_uPlotBatch-PlotMod.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotMod.cc' object='bin_uPlotBatch-PlotMod.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotMod.obj `if test -f 'PlotMod.cc'; then $(CYGPATH_W) 'PlotMod.cc'; else $(CYGPATH_W) '$(srcdir)/PlotMod.cc'; fi`
+
+bin_uPlotBatch-PlotModAction.o: PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModAction.Tpo -c -o bin_uPlotBatch-PlotModAction.o `test -f 'PlotModAction.cc' || echo '$(srcdir)/'`PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModAction.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModAction.cc' object='bin_uPlotBatch-PlotModAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModAction.o `test -f 'PlotModAction.cc' || echo '$(srcdir)/'`PlotModAction.cc
+
+bin_uPlotBatch-PlotModAction.obj: PlotModAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModAction.Tpo -c -o bin_uPlotBatch-PlotModAction.obj `if test -f 'PlotModAction.cc'; then $(CYGPATH_W) 'PlotModAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModAction.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModAction.cc' object='bin_uPlotBatch-PlotModAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModAction.obj `if test -f 'PlotModAction.cc'; then $(CYGPATH_W) 'PlotModAction.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModAction.cc'; fi`
+
+bin_uPlotBatch-PlotModBuilder.o: PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModBuilder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Tpo -c -o bin_uPlotBatch-PlotModBuilder.o `test -f 'PlotModBuilder.cc' || echo '$(srcdir)/'`PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBuilder.cc' object='bin_uPlotBatch-PlotModBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModBuilder.o `test -f 'PlotModBuilder.cc' || echo '$(srcdir)/'`PlotModBuilder.cc
+
+bin_uPlotBatch-PlotModBuilder.obj: PlotModBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModBuilder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Tpo -c -o bin_uPlotBatch-PlotModBuilder.obj `if test -f 'PlotModBuilder.cc'; then $(CYGPATH_W) 'PlotModBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBuilder.cc' object='bin_uPlotBatch-PlotModBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModBuilder.obj `if test -f 'PlotModBuilder.cc'; then $(CYGPATH_W) 'PlotModBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBuilder.cc'; fi`
+
+bin_uPlotBatch-PlotModService.o: PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModService.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModService.Tpo -c -o bin_uPlotBatch-PlotModService.o `test -f 'PlotModService.cc' || echo '$(srcdir)/'`PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModService.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModService.cc' object='bin_uPlotBatch-PlotModService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModService.o `test -f 'PlotModService.cc' || echo '$(srcdir)/'`PlotModService.cc
+
+bin_uPlotBatch-PlotModService.obj: PlotModService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModService.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModService.Tpo -c -o bin_uPlotBatch-PlotModService.obj `if test -f 'PlotModService.cc'; then $(CYGPATH_W) 'PlotModService.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModService.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModService.cc' object='bin_uPlotBatch-PlotModService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModService.obj `if test -f 'PlotModService.cc'; then $(CYGPATH_W) 'PlotModService.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModService.cc'; fi`
+
+bin_uPlotBatch-PlotModTask.o: PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModTask.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModTask.Tpo -c -o bin_uPlotBatch-PlotModTask.o `test -f 'PlotModTask.cc' || echo '$(srcdir)/'`PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModTask.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModTask.cc' object='bin_uPlotBatch-PlotModTask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModTask.o `test -f 'PlotModTask.cc' || echo '$(srcdir)/'`PlotModTask.cc
+
+bin_uPlotBatch-PlotModTask.obj: PlotModTask.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModTask.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModTask.Tpo -c -o bin_uPlotBatch-PlotModTask.obj `if test -f 'PlotModTask.cc'; then $(CYGPATH_W) 'PlotModTask.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModTask.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModTask.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModTask.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModTask.cc' object='bin_uPlotBatch-PlotModTask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModTask.obj `if test -f 'PlotModTask.cc'; then $(CYGPATH_W) 'PlotModTask.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModTask.cc'; fi`
+
+bin_uPlotBatch-PlotModView.o: PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModView.Tpo -c -o bin_uPlotBatch-PlotModView.o `test -f 'PlotModView.cc' || echo '$(srcdir)/'`PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModView.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModView.cc' object='bin_uPlotBatch-PlotModView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModView.o `test -f 'PlotModView.cc' || echo '$(srcdir)/'`PlotModView.cc
+
+bin_uPlotBatch-PlotModView.obj: PlotModView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModView.Tpo -c -o bin_uPlotBatch-PlotModView.obj `if test -f 'PlotModView.cc'; then $(CYGPATH_W) 'PlotModView.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModView.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModView.cc' object='bin_uPlotBatch-PlotModView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModView.obj `if test -f 'PlotModView.cc'; then $(CYGPATH_W) 'PlotModView.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModView.cc'; fi`
+
+bin_uPlotBatch-PlotPageBuilder.o: PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotPageBuilder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Tpo -c -o bin_uPlotBatch-PlotPageBuilder.o `test -f 'PlotPageBuilder.cc' || echo '$(srcdir)/'`PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Tpo $(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotPageBuilder.cc' object='bin_uPlotBatch-PlotPageBuilder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotPageBuilder.o `test -f 'PlotPageBuilder.cc' || echo '$(srcdir)/'`PlotPageBuilder.cc
+
+bin_uPlotBatch-PlotPageBuilder.obj: PlotPageBuilder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotPageBuilder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Tpo -c -o bin_uPlotBatch-PlotPageBuilder.obj `if test -f 'PlotPageBuilder.cc'; then $(CYGPATH_W) 'PlotPageBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotPageBuilder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Tpo $(DEPDIR)/bin_uPlotBatch-PlotPageBuilder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotPageBuilder.cc' object='bin_uPlotBatch-PlotPageBuilder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotPageBuilder.obj `if test -f 'PlotPageBuilder.cc'; then $(CYGPATH_W) 'PlotPageBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/PlotPageBuilder.cc'; fi`
+
+bin_uPlotBatch-PmContext.o: PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmContext.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmContext.Tpo -c -o bin_uPlotBatch-PmContext.o `test -f 'PmContext.cc' || echo '$(srcdir)/'`PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmContext.Tpo $(DEPDIR)/bin_uPlotBatch-PmContext.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmContext.cc' object='bin_uPlotBatch-PmContext.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmContext.o `test -f 'PmContext.cc' || echo '$(srcdir)/'`PmContext.cc
+
+bin_uPlotBatch-PmContext.obj: PmContext.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmContext.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmContext.Tpo -c -o bin_uPlotBatch-PmContext.obj `if test -f 'PmContext.cc'; then $(CYGPATH_W) 'PmContext.cc'; else $(CYGPATH_W) '$(srcdir)/PmContext.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmContext.Tpo $(DEPDIR)/bin_uPlotBatch-PmContext.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmContext.cc' object='bin_uPlotBatch-PmContext.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmContext.obj `if test -f 'PmContext.cc'; then $(CYGPATH_W) 'PmContext.cc'; else $(CYGPATH_W) '$(srcdir)/PmContext.cc'; fi`
+
+bin_uPlotBatch-PmIndividualProjection.o: PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmIndividualProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Tpo -c -o bin_uPlotBatch-PmIndividualProjection.o `test -f 'PmIndividualProjection.cc' || echo '$(srcdir)/'`PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Tpo $(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmIndividualProjection.cc' object='bin_uPlotBatch-PmIndividualProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmIndividualProjection.o `test -f 'PmIndividualProjection.cc' || echo '$(srcdir)/'`PmIndividualProjection.cc
+
+bin_uPlotBatch-PmIndividualProjection.obj: PmIndividualProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmIndividualProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Tpo -c -o bin_uPlotBatch-PmIndividualProjection.obj `if test -f 'PmIndividualProjection.cc'; then $(CYGPATH_W) 'PmIndividualProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmIndividualProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Tpo $(DEPDIR)/bin_uPlotBatch-PmIndividualProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmIndividualProjection.cc' object='bin_uPlotBatch-PmIndividualProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmIndividualProjection.obj `if test -f 'PmIndividualProjection.cc'; then $(CYGPATH_W) 'PmIndividualProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmIndividualProjection.cc'; fi`
+
+bin_uPlotBatch-PmGeneralProjection.o: PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmGeneralProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Tpo -c -o bin_uPlotBatch-PmGeneralProjection.o `test -f 'PmGeneralProjection.cc' || echo '$(srcdir)/'`PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Tpo $(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmGeneralProjection.cc' object='bin_uPlotBatch-PmGeneralProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmGeneralProjection.o `test -f 'PmGeneralProjection.cc' || echo '$(srcdir)/'`PmGeneralProjection.cc
+
+bin_uPlotBatch-PmGeneralProjection.obj: PmGeneralProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmGeneralProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Tpo -c -o bin_uPlotBatch-PmGeneralProjection.obj `if test -f 'PmGeneralProjection.cc'; then $(CYGPATH_W) 'PmGeneralProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmGeneralProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Tpo $(DEPDIR)/bin_uPlotBatch-PmGeneralProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmGeneralProjection.cc' object='bin_uPlotBatch-PmGeneralProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmGeneralProjection.obj `if test -f 'PmGeneralProjection.cc'; then $(CYGPATH_W) 'PmGeneralProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmGeneralProjection.cc'; fi`
+
+bin_uPlotBatch-PmProjection.o: PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmProjection.Tpo -c -o bin_uPlotBatch-PmProjection.o `test -f 'PmProjection.cc' || echo '$(srcdir)/'`PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmProjection.Tpo $(DEPDIR)/bin_uPlotBatch-PmProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmProjection.cc' object='bin_uPlotBatch-PmProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmProjection.o `test -f 'PmProjection.cc' || echo '$(srcdir)/'`PmProjection.cc
+
+bin_uPlotBatch-PmProjection.obj: PmProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PmProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PmProjection.Tpo -c -o bin_uPlotBatch-PmProjection.obj `if test -f 'PmProjection.cc'; then $(CYGPATH_W) 'PmProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PmProjection.Tpo $(DEPDIR)/bin_uPlotBatch-PmProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PmProjection.cc' object='bin_uPlotBatch-PmProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PmProjection.obj `if test -f 'PmProjection.cc'; then $(CYGPATH_W) 'PmProjection.cc'; else $(CYGPATH_W) '$(srcdir)/PmProjection.cc'; fi`
+
+bin_uPlotBatch-Preferences.o: Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Preferences.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Preferences.Tpo -c -o bin_uPlotBatch-Preferences.o `test -f 'Preferences.cc' || echo '$(srcdir)/'`Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Preferences.Tpo $(DEPDIR)/bin_uPlotBatch-Preferences.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Preferences.cc' object='bin_uPlotBatch-Preferences.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Preferences.o `test -f 'Preferences.cc' || echo '$(srcdir)/'`Preferences.cc
+
+bin_uPlotBatch-Preferences.obj: Preferences.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Preferences.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Preferences.Tpo -c -o bin_uPlotBatch-Preferences.obj `if test -f 'Preferences.cc'; then $(CYGPATH_W) 'Preferences.cc'; else $(CYGPATH_W) '$(srcdir)/Preferences.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Preferences.Tpo $(DEPDIR)/bin_uPlotBatch-Preferences.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Preferences.cc' object='bin_uPlotBatch-Preferences.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Preferences.obj `if test -f 'Preferences.cc'; then $(CYGPATH_W) 'Preferences.cc'; else $(CYGPATH_W) '$(srcdir)/Preferences.cc'; fi`
+
+bin_uPlotBatch-Presentable.o: Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Presentable.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Presentable.Tpo -c -o bin_uPlotBatch-Presentable.o `test -f 'Presentable.cc' || echo '$(srcdir)/'`Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Presentable.Tpo $(DEPDIR)/bin_uPlotBatch-Presentable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Presentable.cc' object='bin_uPlotBatch-Presentable.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Presentable.o `test -f 'Presentable.cc' || echo '$(srcdir)/'`Presentable.cc
+
+bin_uPlotBatch-Presentable.obj: Presentable.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Presentable.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Presentable.Tpo -c -o bin_uPlotBatch-Presentable.obj `if test -f 'Presentable.cc'; then $(CYGPATH_W) 'Presentable.cc'; else $(CYGPATH_W) '$(srcdir)/Presentable.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Presentable.Tpo $(DEPDIR)/bin_uPlotBatch-Presentable.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Presentable.cc' object='bin_uPlotBatch-Presentable.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Presentable.obj `if test -f 'Presentable.cc'; then $(CYGPATH_W) 'Presentable.cc'; else $(CYGPATH_W) '$(srcdir)/Presentable.cc'; fi`
+
+bin_uPlotBatch-Root.o: Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Root.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Root.Tpo -c -o bin_uPlotBatch-Root.o `test -f 'Root.cc' || echo '$(srcdir)/'`Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Root.Tpo $(DEPDIR)/bin_uPlotBatch-Root.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Root.cc' object='bin_uPlotBatch-Root.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Root.o `test -f 'Root.cc' || echo '$(srcdir)/'`Root.cc
+
+bin_uPlotBatch-Root.obj: Root.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Root.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Root.Tpo -c -o bin_uPlotBatch-Root.obj `if test -f 'Root.cc'; then $(CYGPATH_W) 'Root.cc'; else $(CYGPATH_W) '$(srcdir)/Root.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Root.Tpo $(DEPDIR)/bin_uPlotBatch-Root.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Root.cc' object='bin_uPlotBatch-Root.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Root.obj `if test -f 'Root.cc'; then $(CYGPATH_W) 'Root.cc'; else $(CYGPATH_W) '$(srcdir)/Root.cc'; fi`
+
+bin_uPlotBatch-SatelliteProjection.o: SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SatelliteProjection.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Tpo -c -o bin_uPlotBatch-SatelliteProjection.o `test -f 'SatelliteProjection.cc' || echo '$(srcdir)/'`SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Tpo $(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SatelliteProjection.cc' object='bin_uPlotBatch-SatelliteProjection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SatelliteProjection.o `test -f 'SatelliteProjection.cc' || echo '$(srcdir)/'`SatelliteProjection.cc
+
+bin_uPlotBatch-SatelliteProjection.obj: SatelliteProjection.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SatelliteProjection.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Tpo -c -o bin_uPlotBatch-SatelliteProjection.obj `if test -f 'SatelliteProjection.cc'; then $(CYGPATH_W) 'SatelliteProjection.cc'; else $(CYGPATH_W) '$(srcdir)/SatelliteProjection.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Tpo $(DEPDIR)/bin_uPlotBatch-SatelliteProjection.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SatelliteProjection.cc' object='bin_uPlotBatch-SatelliteProjection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SatelliteProjection.obj `if test -f 'SatelliteProjection.cc'; then $(CYGPATH_W) 'SatelliteProjection.cc'; else $(CYGPATH_W) '$(srcdir)/SatelliteProjection.cc'; fi`
+
+bin_uPlotBatch-SimpleDecoder.o: SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SimpleDecoder.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Tpo -c -o bin_uPlotBatch-SimpleDecoder.o `test -f 'SimpleDecoder.cc' || echo '$(srcdir)/'`SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleDecoder.cc' object='bin_uPlotBatch-SimpleDecoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SimpleDecoder.o `test -f 'SimpleDecoder.cc' || echo '$(srcdir)/'`SimpleDecoder.cc
+
+bin_uPlotBatch-SimpleDecoder.obj: SimpleDecoder.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SimpleDecoder.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Tpo -c -o bin_uPlotBatch-SimpleDecoder.obj `if test -f 'SimpleDecoder.cc'; then $(CYGPATH_W) 'SimpleDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleDecoder.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Tpo $(DEPDIR)/bin_uPlotBatch-SimpleDecoder.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SimpleDecoder.cc' object='bin_uPlotBatch-SimpleDecoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SimpleDecoder.obj `if test -f 'SimpleDecoder.cc'; then $(CYGPATH_W) 'SimpleDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/SimpleDecoder.cc'; fi`
+
+bin_uPlotBatch-SkipAction.o: SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SkipAction.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SkipAction.Tpo -c -o bin_uPlotBatch-SkipAction.o `test -f 'SkipAction.cc' || echo '$(srcdir)/'`SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SkipAction.Tpo $(DEPDIR)/bin_uPlotBatch-SkipAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SkipAction.cc' object='bin_uPlotBatch-SkipAction.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SkipAction.o `test -f 'SkipAction.cc' || echo '$(srcdir)/'`SkipAction.cc
+
+bin_uPlotBatch-SkipAction.obj: SkipAction.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SkipAction.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SkipAction.Tpo -c -o bin_uPlotBatch-SkipAction.obj `if test -f 'SkipAction.cc'; then $(CYGPATH_W) 'SkipAction.cc'; else $(CYGPATH_W) '$(srcdir)/SkipAction.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SkipAction.Tpo $(DEPDIR)/bin_uPlotBatch-SkipAction.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SkipAction.cc' object='bin_uPlotBatch-SkipAction.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SkipAction.obj `if test -f 'SkipAction.cc'; then $(CYGPATH_W) 'SkipAction.cc'; else $(CYGPATH_W) '$(srcdir)/SkipAction.cc'; fi`
+
+bin_uPlotBatch-SubPage.o: SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SubPage.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SubPage.Tpo -c -o bin_uPlotBatch-SubPage.o `test -f 'SubPage.cc' || echo '$(srcdir)/'`SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SubPage.Tpo $(DEPDIR)/bin_uPlotBatch-SubPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SubPage.cc' object='bin_uPlotBatch-SubPage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SubPage.o `test -f 'SubPage.cc' || echo '$(srcdir)/'`SubPage.cc
+
+bin_uPlotBatch-SubPage.obj: SubPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SubPage.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SubPage.Tpo -c -o bin_uPlotBatch-SubPage.obj `if test -f 'SubPage.cc'; then $(CYGPATH_W) 'SubPage.cc'; else $(CYGPATH_W) '$(srcdir)/SubPage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SubPage.Tpo $(DEPDIR)/bin_uPlotBatch-SubPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SubPage.cc' object='bin_uPlotBatch-SubPage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SubPage.obj `if test -f 'SubPage.cc'; then $(CYGPATH_W) 'SubPage.cc'; else $(CYGPATH_W) '$(srcdir)/SubPage.cc'; fi`
+
+bin_uPlotBatch-SuperPage.o: SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SuperPage.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SuperPage.Tpo -c -o bin_uPlotBatch-SuperPage.o `test -f 'SuperPage.cc' || echo '$(srcdir)/'`SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SuperPage.Tpo $(DEPDIR)/bin_uPlotBatch-SuperPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SuperPage.cc' object='bin_uPlotBatch-SuperPage.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SuperPage.o `test -f 'SuperPage.cc' || echo '$(srcdir)/'`SuperPage.cc
+
+bin_uPlotBatch-SuperPage.obj: SuperPage.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-SuperPage.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-SuperPage.Tpo -c -o bin_uPlotBatch-SuperPage.obj `if test -f 'SuperPage.cc'; then $(CYGPATH_W) 'SuperPage.cc'; else $(CYGPATH_W) '$(srcdir)/SuperPage.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-SuperPage.Tpo $(DEPDIR)/bin_uPlotBatch-SuperPage.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='SuperPage.cc' object='bin_uPlotBatch-SuperPage.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-SuperPage.obj `if test -f 'SuperPage.cc'; then $(CYGPATH_W) 'SuperPage.cc'; else $(CYGPATH_W) '$(srcdir)/SuperPage.cc'; fi`
+
+bin_uPlotBatch-Task.o: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Task.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Task.Tpo -c -o bin_uPlotBatch-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Task.Tpo $(DEPDIR)/bin_uPlotBatch-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_uPlotBatch-Task.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Task.o `test -f 'Task.cc' || echo '$(srcdir)/'`Task.cc
+
+bin_uPlotBatch-Task.obj: Task.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-Task.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-Task.Tpo -c -o bin_uPlotBatch-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-Task.Tpo $(DEPDIR)/bin_uPlotBatch-Task.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Task.cc' object='bin_uPlotBatch-Task.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-Task.obj `if test -f 'Task.cc'; then $(CYGPATH_W) 'Task.cc'; else $(CYGPATH_W) '$(srcdir)/Task.cc'; fi`
+
+bin_uPlotBatch-VertProfView.o: VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-VertProfView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-VertProfView.Tpo -c -o bin_uPlotBatch-VertProfView.o `test -f 'VertProfView.cc' || echo '$(srcdir)/'`VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-VertProfView.Tpo $(DEPDIR)/bin_uPlotBatch-VertProfView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VertProfView.cc' object='bin_uPlotBatch-VertProfView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-VertProfView.o `test -f 'VertProfView.cc' || echo '$(srcdir)/'`VertProfView.cc
+
+bin_uPlotBatch-VertProfView.obj: VertProfView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-VertProfView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-VertProfView.Tpo -c -o bin_uPlotBatch-VertProfView.obj `if test -f 'VertProfView.cc'; then $(CYGPATH_W) 'VertProfView.cc'; else $(CYGPATH_W) '$(srcdir)/VertProfView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-VertProfView.Tpo $(DEPDIR)/bin_uPlotBatch-VertProfView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='VertProfView.cc' object='bin_uPlotBatch-VertProfView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-VertProfView.obj `if test -f 'VertProfView.cc'; then $(CYGPATH_W) 'VertProfView.cc'; else $(CYGPATH_W) '$(srcdir)/VertProfView.cc'; fi`
+
+bin_uPlotBatch-XDevice.o: XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-XDevice.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-XDevice.Tpo -c -o bin_uPlotBatch-XDevice.o `test -f 'XDevice.cc' || echo '$(srcdir)/'`XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-XDevice.Tpo $(DEPDIR)/bin_uPlotBatch-XDevice.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDevice.cc' object='bin_uPlotBatch-XDevice.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-XDevice.o `test -f 'XDevice.cc' || echo '$(srcdir)/'`XDevice.cc
+
+bin_uPlotBatch-XDevice.obj: XDevice.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-XDevice.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-XDevice.Tpo -c -o bin_uPlotBatch-XDevice.obj `if test -f 'XDevice.cc'; then $(CYGPATH_W) 'XDevice.cc'; else $(CYGPATH_W) '$(srcdir)/XDevice.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-XDevice.Tpo $(DEPDIR)/bin_uPlotBatch-XDevice.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDevice.cc' object='bin_uPlotBatch-XDevice.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-XDevice.obj `if test -f 'XDevice.cc'; then $(CYGPATH_W) 'XDevice.cc'; else $(CYGPATH_W) '$(srcdir)/XDevice.cc'; fi`
+
+bin_uPlotBatch-XSectView.o: XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-XSectView.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-XSectView.Tpo -c -o bin_uPlotBatch-XSectView.o `test -f 'XSectView.cc' || echo '$(srcdir)/'`XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-XSectView.Tpo $(DEPDIR)/bin_uPlotBatch-XSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XSectView.cc' object='bin_uPlotBatch-XSectView.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-XSectView.o `test -f 'XSectView.cc' || echo '$(srcdir)/'`XSectView.cc
+
+bin_uPlotBatch-XSectView.obj: XSectView.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-XSectView.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-XSectView.Tpo -c -o bin_uPlotBatch-XSectView.obj `if test -f 'XSectView.cc'; then $(CYGPATH_W) 'XSectView.cc'; else $(CYGPATH_W) '$(srcdir)/XSectView.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-XSectView.Tpo $(DEPDIR)/bin_uPlotBatch-XSectView.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XSectView.cc' object='bin_uPlotBatch-XSectView.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-XSectView.obj `if test -f 'XSectView.cc'; then $(CYGPATH_W) 'XSectView.cc'; else $(CYGPATH_W) '$(srcdir)/XSectView.cc'; fi`
+
+bin_uPlotBatch-ZoomStacks.o: ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-ZoomStacks.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-ZoomStacks.Tpo -c -o bin_uPlotBatch-ZoomStacks.o `test -f 'ZoomStacks.cc' || echo '$(srcdir)/'`ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-ZoomStacks.Tpo $(DEPDIR)/bin_uPlotBatch-ZoomStacks.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ZoomStacks.cc' object='bin_uPlotBatch-ZoomStacks.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-ZoomStacks.o `test -f 'ZoomStacks.cc' || echo '$(srcdir)/'`ZoomStacks.cc
+
+bin_uPlotBatch-ZoomStacks.obj: ZoomStacks.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-ZoomStacks.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-ZoomStacks.Tpo -c -o bin_uPlotBatch-ZoomStacks.obj `if test -f 'ZoomStacks.cc'; then $(CYGPATH_W) 'ZoomStacks.cc'; else $(CYGPATH_W) '$(srcdir)/ZoomStacks.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-ZoomStacks.Tpo $(DEPDIR)/bin_uPlotBatch-ZoomStacks.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ZoomStacks.cc' object='bin_uPlotBatch-ZoomStacks.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-ZoomStacks.obj `if test -f 'ZoomStacks.cc'; then $(CYGPATH_W) 'ZoomStacks.cc'; else $(CYGPATH_W) '$(srcdir)/ZoomStacks.cc'; fi`
+
+bin_uPlotBatch-GenAppService.o: GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GenAppService.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GenAppService.Tpo -c -o bin_uPlotBatch-GenAppService.o `test -f 'GenAppService.cc' || echo '$(srcdir)/'`GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GenAppService.Tpo $(DEPDIR)/bin_uPlotBatch-GenAppService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GenAppService.cc' object='bin_uPlotBatch-GenAppService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GenAppService.o `test -f 'GenAppService.cc' || echo '$(srcdir)/'`GenAppService.cc
+
+bin_uPlotBatch-GenAppService.obj: GenAppService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-GenAppService.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-GenAppService.Tpo -c -o bin_uPlotBatch-GenAppService.obj `if test -f 'GenAppService.cc'; then $(CYGPATH_W) 'GenAppService.cc'; else $(CYGPATH_W) '$(srcdir)/GenAppService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-GenAppService.Tpo $(DEPDIR)/bin_uPlotBatch-GenAppService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GenAppService.cc' object='bin_uPlotBatch-GenAppService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-GenAppService.obj `if test -f 'GenAppService.cc'; then $(CYGPATH_W) 'GenAppService.cc'; else $(CYGPATH_W) '$(srcdir)/GenAppService.cc'; fi`
+
+bin_uPlotBatch-MagPlusBatchService.o: MagPlusBatchService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagPlusBatchService.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Tpo -c -o bin_uPlotBatch-MagPlusBatchService.o `test -f 'MagPlusBatchService.cc' || echo '$(srcdir)/'`MagPlusBatchService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Tpo $(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusBatchService.cc' object='bin_uPlotBatch-MagPlusBatchService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagPlusBatchService.o `test -f 'MagPlusBatchService.cc' || echo '$(srcdir)/'`MagPlusBatchService.cc
+
+bin_uPlotBatch-MagPlusBatchService.obj: MagPlusBatchService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-MagPlusBatchService.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Tpo -c -o bin_uPlotBatch-MagPlusBatchService.obj `if test -f 'MagPlusBatchService.cc'; then $(CYGPATH_W) 'MagPlusBatchService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusBatchService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Tpo $(DEPDIR)/bin_uPlotBatch-MagPlusBatchService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='MagPlusBatchService.cc' object='bin_uPlotBatch-MagPlusBatchService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-MagPlusBatchService.obj `if test -f 'MagPlusBatchService.cc'; then $(CYGPATH_W) 'MagPlusBatchService.cc'; else $(CYGPATH_W) '$(srcdir)/MagPlusBatchService.cc'; fi`
+
+bin_uPlotBatch-PlotModBatch.o: PlotModBatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModBatch.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModBatch.Tpo -c -o bin_uPlotBatch-PlotModBatch.o `test -f 'PlotModBatch.cc' || echo '$(srcdir)/'`PlotModBatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModBatch.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModBatch.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBatch.cc' object='bin_uPlotBatch-PlotModBatch.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModBatch.o `test -f 'PlotModBatch.cc' || echo '$(srcdir)/'`PlotModBatch.cc
+
+bin_uPlotBatch-PlotModBatch.obj: PlotModBatch.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-PlotModBatch.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-PlotModBatch.Tpo -c -o bin_uPlotBatch-PlotModBatch.obj `if test -f 'PlotModBatch.cc'; then $(CYGPATH_W) 'PlotModBatch.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBatch.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-PlotModBatch.Tpo $(DEPDIR)/bin_uPlotBatch-PlotModBatch.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='PlotModBatch.cc' object='bin_uPlotBatch-PlotModBatch.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-PlotModBatch.obj `if test -f 'PlotModBatch.cc'; then $(CYGPATH_W) 'PlotModBatch.cc'; else $(CYGPATH_W) '$(srcdir)/PlotModBatch.cc'; fi`
+
+bin_uPlotBatch-uPlotBatchApp.o: uPlotBatchApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-uPlotBatchApp.o -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Tpo -c -o bin_uPlotBatch-uPlotBatchApp.o `test -f 'uPlotBatchApp.cc' || echo '$(srcdir)/'`uPlotBatchApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Tpo $(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBatchApp.cc' object='bin_uPlotBatch-uPlotBatchApp.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-uPlotBatchApp.o `test -f 'uPlotBatchApp.cc' || echo '$(srcdir)/'`uPlotBatchApp.cc
+
+bin_uPlotBatch-uPlotBatchApp.obj: uPlotBatchApp.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotBatch-uPlotBatchApp.obj -MD -MP -MF $(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Tpo -c -o bin_uPlotBatch-uPlotBatchApp.obj `if test -f 'uPlotBatchApp.cc'; then $(CYGPATH_W) 'uPlotBatchApp.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotBatchApp.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Tpo $(DEPDIR)/bin_uPlotBatch-uPlotBatchApp.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotBatchApp.cc' object='bin_uPlotBatch-uPlotBatchApp.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotBatch_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotBatch-uPlotBatchApp.obj `if test -f 'uPlotBatchApp.cc'; then $(CYGPATH_W) 'uPlotBatchApp.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotBatchApp.cc'; fi`
+
+bin_uPlotManager-uPlotManager.o: uPlotManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotManager-uPlotManager.o -MD -MP -MF $(DEPDIR)/bin_uPlotManager-uPlotManager.Tpo -c -o bin_uPlotManager-uPlotManager.o `test -f 'uPlotManager.cc' || echo '$(srcdir)/'`uPlotManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotManager-uPlotManager.Tpo $(DEPDIR)/bin_uPlotManager-uPlotManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotManager.cc' object='bin_uPlotManager-uPlotManager.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotManager-uPlotManager.o `test -f 'uPlotManager.cc' || echo '$(srcdir)/'`uPlotManager.cc
+
+bin_uPlotManager-uPlotManager.obj: uPlotManager.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotManager-uPlotManager.obj -MD -MP -MF $(DEPDIR)/bin_uPlotManager-uPlotManager.Tpo -c -o bin_uPlotManager-uPlotManager.obj `if test -f 'uPlotManager.cc'; then $(CYGPATH_W) 'uPlotManager.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotManager.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotManager-uPlotManager.Tpo $(DEPDIR)/bin_uPlotManager-uPlotManager.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotManager.cc' object='bin_uPlotManager-uPlotManager.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotManager-uPlotManager.obj `if test -f 'uPlotManager.cc'; then $(CYGPATH_W) 'uPlotManager.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotManager.cc'; fi`
+
+bin_uPlotManager-uPlotService.o: uPlotService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotManager-uPlotService.o -MD -MP -MF $(DEPDIR)/bin_uPlotManager-uPlotService.Tpo -c -o bin_uPlotManager-uPlotService.o `test -f 'uPlotService.cc' || echo '$(srcdir)/'`uPlotService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotManager-uPlotService.Tpo $(DEPDIR)/bin_uPlotManager-uPlotService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotService.cc' object='bin_uPlotManager-uPlotService.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotManager-uPlotService.o `test -f 'uPlotService.cc' || echo '$(srcdir)/'`uPlotService.cc
+
+bin_uPlotManager-uPlotService.obj: uPlotService.cc
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bin_uPlotManager-uPlotService.obj -MD -MP -MF $(DEPDIR)/bin_uPlotManager-uPlotService.Tpo -c -o bin_uPlotManager-uPlotService.obj `if test -f 'uPlotService.cc'; then $(CYGPATH_W) 'uPlotService.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotService.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bin_uPlotManager-uPlotService.Tpo $(DEPDIR)/bin_uPlotManager-uPlotService.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='uPlotService.cc' object='bin_uPlotManager-uPlotService.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bin_uPlotManager_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bin_uPlotManager-uPlotService.obj `if test -f 'uPlotService.cc'; then $(CYGPATH_W) 'uPlotService.cc'; else $(CYGPATH_W) '$(srcdir)/uPlotService.cc'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf bin/.libs bin/_libs
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)"
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; test -n "$(sharedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sharedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sharedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bin/$(am__dirstamp)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-shareDATA
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-shareDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-shareDATA
+
+
+ # ------------- #
+ # DOCUMENTATION #
+ # ------------- #
+
+# --- #
+# MOC #
+# --- #
+
+.hpp.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cpp:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cc:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.cxx:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+.hpp.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.hh.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+.h.moc.C:
+	$(MOC) $(QT_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+# --- #
+# UIC #
+# --- #
+
+.ui.ui.hpp:
+	$(UIC) $< -o $@
+
+.ui.ui.hh:
+	$(UIC) $< -o $@
+
+.ui.ui.h:
+	$(UIC) $< -o $@
+
+# --- #
+# RCC #
+# --- #
+
+.qrc.qrc.cpp:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cc:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.cxx:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+.qrc.qrc.C:
+	$(RCC) -name `echo "$<" | sed 's/\.qrc$$//'` $< -o $@
+
+# to build the share data, we take the destination files and
+# remove their directory, e.g. $(local_sharedir)/DefFile becomes DefFile.
+# $< is the 'stripped' version and $@ is the 'full' version
+
+$(share_DATA): $(local_sharedir)/%: %
+	${INSTALL} $<  $(local_sharedir)
+
+#all: bin
+#	$(UPDATE_TITLE)
+
+bin:
+	ln -s ../../bin bin
+
+clean:
+	-rm -f *.o *.moc.cpp *.qrc.cpp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/uPlot/MapView.cc b/src/uPlot/MapView.cc
new file mode 100644
index 0000000..ce505da
--- /dev/null
+++ b/src/uPlot/MapView.cc
@@ -0,0 +1,545 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Methods for MapView.cc
+//
+//
+// This is the exemplar object for the MapView  class
+//
+//
+
+#include <Assertions.hpp>
+#include <MvRequestUtil.hpp>
+
+#include "MapView.h"
+#include "ObjectList.h"
+#include "GraphicsEngine.h"
+#include "Page.h"
+#include "PmContext.h"
+#include "Decoder.h"
+#include "PlotMod.h"
+#include "PlotModTask.h"
+
+class MapViewFactory : public PlotModViewFactory
+{
+	// Virtual Constructor - Builds a new MapView
+	virtual PlotModView* Build ( Page&            page,
+				     const MvRequest& contextRequest,
+				     const MvRequest& setupRequest      ) 
+		{ return new MapView ( page, contextRequest, setupRequest );}
+
+public:
+	MapViewFactory() : PlotModViewFactory ( "MapView" ) {}
+};
+
+static MapViewFactory mapViewFactoryInstance;
+
+MapView::MapView( Page&            owner,
+		  const MvRequest& viewRequest,
+		  const MvRequest& setupRequest ):
+	PlotModView ( owner, viewRequest, setupRequest ),
+	PlotModService   ( this )
+{
+	// Create a coastline request, if one does not exist
+	MvRequest coastRequest = viewRequest_.getSubrequest ("COASTLINES");
+	if ( !ObjectList::IsVisDefCoastlines(coastRequest.getVerb()) )
+	{
+		coastRequest = ObjectList::UserDefaultRequest ( "MCOAST" );
+		viewRequest_ ( "COASTLINES" ) = coastRequest;
+	}
+}	
+
+MapView::MapView(const MapView &old) :
+	PlotModView (old),
+	PlotModService(old)
+{
+}
+
+string
+MapView::Name()
+{
+	int id = Owner().Id();
+	return (const char*)  ObjectInfo::ObjectName ( viewRequest_, "MapView", id );
+}
+
+// If a group of Visdefs and DataUnits were dropped,
+// the Context organize them to ensure that all the
+// VisDefs are always after each DataUnit
+void
+MapView::Drop ( PmContext& context )
+{
+    MvIconDataBase&   dataBase = Owner().IconDataBase();
+
+    // Process the drop
+//    MvRequest dropRequest = context.InRequest();
+    // for efficiency, only copy that portion of the request that we will need
+    MvRequest dropRequest;
+    dropRequest.copyFromCurrentTo(context.InRequest(), NEWPAGE.c_str());
+    MvIcon dataUnit;
+    while ( dropRequest )
+    {
+        // VisDefs are processed in one single goal. This
+        // is because the processing of a single or a group
+        // of visdefs is different. It is assumed that 
+        // visdefs always come after a dataunit (if it exists).
+        MvRequest vdRequestList;
+        if ( this->RetrieveVisdefList (dropRequest,vdRequestList) )
+        {
+            Owner().InsertVisDef (vdRequestList, dataUnit);
+
+            if ( !dropRequest ) // no more drops
+                break;
+        }
+
+        MvRequest  request =  dropRequest.justOneRequest();
+        Cached verb        =  request.getVerb();
+        if ( verb == Cached ( "DRAWING_PRIORITY" ) )
+        {
+            Owner().SetDrawPriority ( request );
+
+            // Redraw this page
+            if (  request ("_APPL") != Cached ("macro") )
+            {
+                Owner().EraseDraw();
+                Owner().RedrawIfWindow();
+            }
+        }
+        else if ( ObjectList::IsDataUnit ( verb ) == true )
+        {
+            dataUnit = dataBase.InsertDataUnit ( request, Owner().Id() );
+            Owner().InitMatching();
+            DecodeDataUnit ( dataUnit );
+        }
+        else if ( ObjectList::IsVisDefText ( verb ) )
+            Owner().InsertPText ( request );
+        else if ( ObjectList::IsVisDefLegend ( verb ) )
+            Owner().InsertLegend ( request );
+
+        // Update view (if applicable)
+        else if ( ObjectList::IsView ( verb ) == true )
+            this->UpdateView ( request );
+
+        else if ( ObjectList::IsVisDefCoastlines ( verb ) )
+            this->ReplaceCoastlines ( request );
+
+        else if ( ObjectList::IsService ( verb,"visualise",true ) )
+        {
+            // Call the service to process the request.
+            // After CallService is finished, function PlotModService::endOfTask
+            // should be called and this function should perform the drawing.
+            Owner().HasDrawTask(false);
+            CallService(request, context );
+
+            // Avoid this drop to be send to visualization
+            // The result of the service call is the one that will
+            // be send to the visualization procedure later
+            //Owner().NeedsRedrawing(false);
+        }
+        else if ( (const char*)verb == PLOTSUPERPAGE )
+        {
+            context.AdvanceTo(PLOTSUPERPAGE);
+            return;
+        }
+        else if ( (const char*)verb == NEWPAGE )
+        {
+            context.AdvanceTo(NEWPAGE);
+            return;
+        }
+
+        dropRequest.advance();
+    }
+
+    context.AdvanceToEnd();
+}
+
+void
+MapView::InsertDataRequest ( MvRequest& dropRequest )
+{
+	MvIconDataBase& dataBase = Owner().IconDataBase();
+
+	while ( dropRequest )
+	{
+		MvRequest request = dropRequest.justOneRequest();
+
+		// Initialise the Matching
+		Owner().InitMatching();
+
+		MvIcon dataUnit = dataBase.InsertDataUnit ( request );
+		DecodeDataUnit ( dataUnit );
+
+		dropRequest.advance();
+	}
+}
+
+// Decode the data unit and send each field to the page for matching
+void MapView::DecodeDataUnit ( MvIcon& dataUnit )
+{
+    ensure ( dataUnit.Id() > 0 );
+
+    int subpageId;
+    MvIconDataBase& dataBase = Owner().IconDataBase();
+
+    // Build a new data decoder, which will provide information
+    // about the data
+    auto_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
+    ensure (decoder.get() != 0);
+
+    // Inquire if this Page is empty
+    bool empty = Owner().ChildHasData() ? false : true;
+
+    // Read data headers (one by one)
+    // retrieve the data offset and matching info
+    // Pass this information to the page for matching
+    int dimFlag = 0;
+    while ( decoder->ReadNextData() )
+    {
+        long offset = decoder->CurrentOffset();
+        long nextDataOffset = offset;
+
+        MatchingInfo dataInfo = decoder->CreateMatchingInfo();
+
+        MvRequest iconRequest = dataInfo.Request();
+        if ( IsParameterSet ( iconRequest, "MY_COMPANION" ) )
+        {
+            if ( decoder->ReadNextData() )
+            {
+                nextDataOffset = decoder->CurrentOffset();
+                MatchingInfo nextDataInfo = decoder->CreateMatchingInfo();
+
+                // Are they companions ?
+                if ( !matchingCriteria_.IsPair( dataInfo, nextDataInfo ) ||
+                    !matchingCriteria_.Match ( dataInfo, nextDataInfo ))
+                {
+                    // No, so plot them separately
+                    dimFlag = dimFlag | 1;
+                    if ( Owner().InsertDataUnit ( dataUnit.Id(), offset, offset, dataInfo, subpageId) == false ) break;
+
+                    if ( Owner().InsertDataUnit ( dataUnit.Id(), nextDataOffset, nextDataOffset, nextDataInfo, subpageId ) == false ) break;
+                }
+                else
+                {
+                    // Yes, so plot them together
+                    dimFlag = dimFlag | 2;
+                    if ( Owner().InsertDataUnit ( dataUnit.Id(), offset, nextDataOffset, dataInfo, subpageId) == false ) break;
+                }
+            }
+            else // An isolated field, who just happens to have a companion defined.
+            {
+                dimFlag = dimFlag | 1;
+                if ( Owner().InsertDataUnit ( dataUnit.Id(), offset, nextDataOffset, dataInfo, subpageId) == false ) break;
+            }
+        }
+        else
+        {
+            // It is an isolated field
+            dimFlag = dimFlag | 1;
+            if ( Owner().InsertDataUnit ( dataUnit.Id(), offset, nextDataOffset, dataInfo, subpageId) == false )
+                break;
+        }
+
+        MvRequest decRequest = decoder->Request ();
+
+//F TEMPORARY SOLUTION FOR VISUALISATION OF SATELLITE
+//F IMAGES PRODUCED AT INPE (use Cylindrical projection)
+//F		if ( (int)decRequest ("_ORIGCENTRE") ==  46 ) continue;
+//F		else {
+
+        const char* ident = decRequest ( "IDENT" );
+        if ( ObjectList::IsImage(ident) )
+        {
+            string myName = this->Name ();
+            if ( myName != "Satellite" )
+            {
+                MvRequest ownerReq = Owner ().Request ();
+
+                // To change the view to Satellite, two requirements are needed:
+                // 1. current View has to be a default one
+                // 2. current View is empty (no data) 
+                MvRequest viewRequest = ownerReq.getSubrequest( "VIEW" );
+                if ( ((int)viewRequest ( "_DEFAULT" ) == 1) && empty )
+                {
+                    this->ConvertToSatellite ( decRequest );
+
+                    // PlotMod service will be called again to decode this grib file
+                    return;
+                }
+            }
+        }
+//F		}
+        empty = false;
+    }
+
+    // Some decoders will want to update the data requests
+    MvRequest dataRequest;
+    if ( decoder->UpdateDataRequest(dataRequest) )
+        dataBase.UpdateDataUnit(dataUnit.Id(),dataRequest);
+
+     // If the dataset contains single and companion fields then
+     // tell Magics to plot single and companion fields separately
+     // Otherwise, if there is no Overlay Control customized by the user
+     // then always overlay
+//     if ( single && companion )
+//          viewRequest_("MAP_OVERLAY_CONTROL") = "NEVER";
+//     else if ( !viewRequest_.getSubrequest("OVERLAY_CONTROL") )
+//          viewRequest_("SUBPAGE_OVERLAY_MODE") = "ALWAYS";
+
+    // Update icon request to indicate a vector drawing
+    MvRequest req = dataUnit.Request();
+    req("_NDIM_FLAG") = dimFlag;
+    dataUnit.SaveRequest(req);
+}
+
+void
+MapView::ConvertToSatellite ( MvRequest& decRequest )
+{
+	MvRequest newViewReq = ObjectList::CreateDefaultRequest ( "SATELLITEVIEW");
+
+	newViewReq ( "SUBPAGE_MAP_SUB_SAT_LONGITUDE" ) = decRequest ( "_IMAGE_MAP_SUB_SAT_LONGITUDE" );
+	newViewReq ( "INPUT_IMAGE_COLUMNS"           ) = decRequest ( "_IMAGE_MAP_COLUMNS"           );
+	newViewReq ( "INPUT_IMAGE_ROWS"              ) = decRequest ( "_IMAGE_MAP_ROWS"              );
+	newViewReq ( "SUBPAGE_MAP_INITIAL_COLUMN"    ) = decRequest ( "_IMAGE_MAP_INITIAL_COLUMN"    );
+	newViewReq ( "SUBPAGE_MAP_INITIAL_ROW"       ) = decRequest ( "_IMAGE_MAP_INITIAL_ROW"       );
+	newViewReq ( "SUBPAGE_MAP_SUB_SAT_X"         ) = decRequest ( "_IMAGE_MAP_SUB_SAT_X"         );
+	newViewReq ( "SUBPAGE_MAP_SUB_SAT_Y"         ) = decRequest ( "_IMAGE_MAP_SUB_SAT_Y"         );
+	newViewReq ( "SUBPAGE_MAP_X_EARTH_DIAMETER"  ) = decRequest ( "_IMAGE_MAP_X_EARTH_DIAMETER"  );
+	newViewReq ( "SUBPAGE_MAP_Y_EARTH_DIAMETER"  ) = decRequest ( "_IMAGE_MAP_Y_EARTH_DIAMETER"  );
+	newViewReq ( "SUBPAGE_MAP_GRID_ORIENTATION"  ) = decRequest ( "_IMAGE_MAP_GRID_ORIENTATION"  );
+	newViewReq ( "SUBPAGE_MAP_CAMERA_ALTITUDE"   ) = decRequest ( "_IMAGE_MAP_CAMERA_ALTITUDE"   );
+
+	this->UpdateView ( newViewReq );
+}
+
+void
+MapView::UpdateView ( MvRequest& viewRequest )
+{
+	if ( ObjectList::IsGeographicalView( viewRequest.getVerb() ) )
+	{
+#if 0  //FAMI022012 With the introduction of Proj4 in Magics there are many more 
+       // projections available. So, Magics should be now responsible for the projection 
+       // code.
+		auto_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
+
+		Location area;
+		if ( ! proj.get()->CheckGeodeticCoordinates (area))
+		{
+			PlotMod::Instance().UserMessage ( "Inconsistent geographic coordinates!\nReplaced by default values" );
+		}
+
+		viewRequest ( "AREA" )  = area.Bottom();
+		viewRequest ( "AREA" ) += area.Left();
+		viewRequest ( "AREA" ) += area.Top();
+		viewRequest ( "AREA" ) += area.Right();
+
+		double vertLong = proj.get()->CheckOriginLongitude ();
+		viewRequest ( "MAP_VERTICAL_LONGITUDE" ) = vertLong;
+#endif
+#if 0
+		if ( ! proj.get()->CheckCoord() )
+		{
+			PlotMod::UserMessage ( "Check later" );
+			viewRequest = ObjectList::CreateDefaultRequest ( "MAPVIEW");
+		}
+#endif
+		viewRequest_ = viewRequest;
+	
+		// Ensure coastlines exist
+		MvRequest coastRequest = viewRequest_.getSubrequest ("COASTLINES");
+		if ( ! coastRequest )
+		{
+			coastRequest = ObjectList::UserDefaultRequest ( "MCOAST" );
+			viewRequest_ ( "COASTLINES" ) = coastRequest;
+		}
+
+//D		Owner().EraseDraw();
+		// Redraw this page
+		Owner().RedrawIfWindow();
+		Owner().NotifyObservers();
+		
+		Owner().InitZoomStacks();
+	}
+	else 
+	{
+        // Changing MapView to another view is disabled at the moment.
+        // The code below needs to be updated if uPlot will allow changing views
+        #if 0
+		RecreateData();
+		viewRequest_ = viewRequest;
+
+		// Create a view associated to the page
+		auto_ptr <PlotModView> view ( PlotModViewFactory::Make (Owner(), viewRequest ) );
+		Owner().SetView(view);
+        #endif
+	}
+}
+
+void
+MapView::ReplaceCoastlines ( MvRequest& coastRequest )
+{
+	viewRequest_ ( "COASTLINES" ) = coastRequest;
+
+	// Redraw this page
+	Owner().EraseDraw();
+	Owner().RedrawIfWindow();
+}
+
+#if 0
+void
+MapView::ReplaceArea ( const Location& coordinates, int izoom)
+{
+     // If the zoom level is 0 (original request) and the geographical area was
+     // not given by the user then unset parameter AREA. The default geographical 
+     // area will be computed by Magics.
+     if ( izoom == 0 )
+     {
+          if ( (const char*)viewRequest_("_DEFAULT_AREA") )
+          {
+               viewRequest_.unsetParam("AREA");
+               return;
+          }
+     }
+
+	// Initialize the bounding box in geodetic coordinates
+	viewRequest_ ( "AREA" ) = coordinates.Bottom();
+	viewRequest_ ( "AREA" ) += coordinates.Left();
+	viewRequest_ ( "AREA" ) += coordinates.Top();
+	viewRequest_ ( "AREA" ) += coordinates.Right();
+}
+#endif
+
+void
+MapView::DrawBackground ( )
+{
+	// Retrieve the graphics Engine
+	GraphicsEngine& ge = Owner().GetGraphicsEngine();
+
+	// Ask the graphics engine to draw the coastlines
+	ge.DrawCoastlinesBack ( viewRequest_ );
+
+	Owner().SetProjection ( viewRequest_ );
+}
+
+void
+MapView::DrawForeground ( )
+{
+	// Retrieve the graphics Engine
+	GraphicsEngine& ge = Owner().GetGraphicsEngine();
+
+	// Ask the graphics engine to draw the coastlines
+	ge.DrawCoastlinesFront ( viewRequest_ );
+
+	Owner().SetProjection ( viewRequest_ );
+}
+
+// Describe the contents of the view
+// for saving into a macro
+void 
+MapView::DescribeYourself ( ObjectInfo& description )
+{
+	// Describe the coastlines
+
+	// convert my request to macro
+    string defView = DEFAULTVIEW;
+    std::transform(defView.begin(), defView.end(), defView.begin(), ::tolower);
+	set<Cached> skipSet;
+	description.ConvertRequestToMacro ( viewRequest_, PUT_END, MacroName().c_str(),defView.c_str(),skipSet);
+}
+
+bool MapView::CallService(const MvRequest &req, PmContext &context)
+{
+	MvRequest appRequest = req;
+	appRequest("_CONTEXT") = viewRequest_;
+
+	// Find service name
+	string service = ObjectList::FindService(appRequest.getVerb(),"visualise");
+
+	// Call service
+	if ( service.size() )
+	{
+		( new PlotModTask (this, context, service.c_str(), appRequest ) )->run();
+		return true;
+	}
+	else
+	{
+		cout << " ADD ERROR MESSAGE: SERVICE NOT FOUND" << endl;
+		return false;
+	}
+}
+
+#if 0
+void
+MapView::DescribeSubrequest ( ObjectInfo& description, 
+			      MvRequest& request,
+			      const Cached& name,
+			      const Cached& verb)
+{
+	Cached macroName = ObjectInfo::SpaceToUnderscore ( name );
+	description.ConvertRequestToMacro ( request, PUT_END,macroName,verb );
+}
+
+void
+MapView::SaveRequest ( const Cached& path, MvRequest& viewRequest )
+{
+	Cached fileName = MakeIconName ( path, "MapView" );
+	
+	// WARNING - this command should not be needed, but there is a "feature"
+	// in GenApp that does not allow a complete definition to be overrriden
+	// by a name
+	viewRequest.unsetParam ("COASTLINES");
+	
+	viewRequest.save ( (const char*) fileName );
+
+	// If icon, create description for Metview UI
+	Cached iconFile = MakeIconDescriptionName( fileName );
+  
+	UtWriteIconDescriptionFile ( iconFile, "MAPVIEW" );
+}
+
+// Attach a psymb request, return the id for the it's visdef, and
+// fill in the request with the visdef's request.
+int MapView::CheckPSymb(MvRequest &symbRequest)
+{
+	MvIconDataBase&  dataBase = Owner().IconDataBase();
+  
+	dataBase.PresentableVisDefRelationRewind();
+
+	bool found = false;
+	MvIcon visDef;
+	int visDefId;
+
+	// Check if it's already attached.
+	while ( dataBase.NextVisDefByPresentableId ( Owner().Id(), visDef ) )
+	{
+		MvRequest vdRequest = visDef.Request();
+		if ( vdRequest.getVerb() == Cached("PSYMB") )
+		{
+			symbRequest = vdRequest;
+			found = true;
+			visDefId = visDef.Id();
+		}
+	} 
+
+	// If not found, attach one from the viewRequest, or a default request.
+	if ( ! found ) 
+	{
+		symbRequest = viewRequest_.getSubrequest ("SYMBOL");
+		if ( symbRequest.getVerb() == Cached( "PSYMB" ) )
+		{
+			symbRequest = ObjectList::UserDefaultRequest ( "PSYMB" );
+			viewRequest_ ( "SYMBOL" ) = symbRequest;
+		}
+
+		// Add the visdef to the database.
+		MvIcon symbIcon(symbRequest);
+		dataBase.InsertVisDef(symbIcon);
+		//dataBase.PresentableVisDefRelation(Owner().Id(), symbIcon.Id() );
+		visDefId = symbIcon.Id();
+	}
+	return visDefId;
+}
+#endif
diff --git a/src/uPlot/MapView.h b/src/uPlot/MapView.h
new file mode 100644
index 0000000..1c058c2
--- /dev/null
+++ b/src/uPlot/MapView.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MapView
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the MapView class, which handles the
+//  matching issues related to the Map View
+//
+//
+// .CLIENTS:
+//  DropAction
+//
+// .RESPONSIBILITY:
+//
+//  - Process the drop, asking the 
+//
+//
+// .COLLABORATORS:
+//  MvRequest - extracts information from the request
+//
+// .DESCENDENT:
+//
+// .RELATED:
+//  Presentable, SuperPage, Page, DataObject
+//
+// .ASCENDENT:
+// PlotModView, PlotModService
+//
+
+#ifndef MapView_H
+#define MapView_H
+
+#include "PlotModView.h"
+#include "PlotModService.h"
+
+class MapView: public PlotModView, public PlotModService {
+
+public:
+
+  // Constructors
+  MapView( Page&, const MvRequest&, const MvRequest& );
+  MapView(const MapView&);
+  virtual PlotModView *Clone() const { return new MapView(*this); }
+
+  // Destructor
+  ~MapView() {}
+
+  // Get the object name
+  virtual string Name();
+
+//  static void SaveRequest ( const Cached& path, MvRequest& viewRequest );
+  // save a request for later use
+
+  // Methods Overriden from PlotModView class
+  virtual void Drop ( PmContext& );
+
+  // Insert a new data request into the page hierarchy;
+  virtual void InsertDataRequest ( MvRequest& dropRequest );
+
+  // Updates the current view
+  virtual void UpdateView ( MvRequest& viewRequest);
+
+  // Replaces the current geographical area
+//  virtual void ReplaceArea ( const Location& coordinates, int izoom=-1 );
+
+  // Draw the background (coastlines)
+  virtual void DrawBackground ( );
+
+  // Draw the foreground (coastlines with land-sea shade)
+  virtual void DrawForeground ( );
+
+  // Describe the contents of the view
+  virtual void DescribeYourself ( ObjectInfo& );
+
+  // Decode the data Unit
+  virtual void DecodeDataUnit ( MvIcon& dataUnit);
+
+  // Call an application
+  virtual bool CallService(const MvRequest &,  PmContext &);
+
+//  virtual Cached InputMode () { return Cached ("MAP"); }
+  // Input mode is MAP
+
+//  virtual bool CanChangeGeography() { return true; }
+  // Allow to change geography coordinates
+
+protected:
+
+//  virtual int CheckPSymb(MvRequest&);
+  // Find, and if necessary, add a psymb. Return it's id.
+
+//  virtual void DescribeSubrequest ( ObjectInfo& description, MvRequest& request, const Cached& name, const Cached& verb);
+
+  // Provide coastline information
+  virtual void ReplaceCoastlines ( MvRequest& coastRequest );
+
+  void ConvertToSatellite ( MvRequest& decoderRequest );
+
+private:
+
+  // No assignment
+  MapView& operator=(const MapView&);
+};
+
+#endif
diff --git a/src/uPlot/MatchingCriteria.cc b/src/uPlot/MatchingCriteria.cc
new file mode 100644
index 0000000..2720c20
--- /dev/null
+++ b/src/uPlot/MatchingCriteria.cc
@@ -0,0 +1,198 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MatchingCriteria.h"
+#include "ObjectList.h"
+#include "BufrDecoder.h"
+#include "MatchingInfo.h"
+
+MatchingCriteria::MatchingCriteria ( const MvRequest& viewReq ):
+	matchingRequest_("MATCHING_REQUEST")
+{
+	// Build a matching criteria based on the information provided
+	// by a view request, subrequest OVERLAY_CONTROL
+	// Go through the request, extract all param which begin
+	// with the words "OVERLAY_" and insert them in the matching request
+	MvRequest overlayReq = viewReq.getSubrequest ("OVERLAY_CONTROL");
+	if (overlayReq == 0)
+		overlayReq = ObjectList::CreateDefaultRequest("OVERLAY_CONTROL");
+
+	overlayReq = ObjectList::ExpandRequest(overlayReq,EXPAND_DEFAULTS);
+	int count = overlayReq.countParameters();
+	for(int i = 0; i< count ; i++)
+	{
+		const char* param = overlayReq.getParameter(i);
+		if(strncmp(param,"OVERLAY_",8) == 0)
+		{
+			int n = overlayReq.countValues(param);
+			for(int j = 0; j < n ; j++)
+			{
+				const char *value= 0;
+				overlayReq.getValue(value,param,j);
+				matchingRequest_.addValue(param+8,value);
+			}
+		}
+	}
+
+	//-- Observation grouping parameters --//
+
+	//-- grouping time can be taken from metadata (section1,msg) or data (section4,obs)
+	const char* timeFrom = overlayReq( "OBS_GROUPING_TIME_FROM" );
+	if( timeFrom )
+	  ObsGroupControl::setUseObsTime( strcmp( timeFrom, "DATA" ) == 0 );
+
+	int obsGroup = (int)overlayReq( "OBS_GROUPING_PERIOD" );
+	if( obsGroup )
+	  ObsGroupControl::setGroupingPeriod( obsGroup );
+
+	if( (const char*)overlayReq( "OBS_GROUPING_PERIOD_START_MIN" ) )
+	  {
+	    int obsGroupStart = (int)overlayReq( "OBS_GROUPING_PERIOD_START_MIN" );
+	    ObsGroupControl::setGroupingPeriodStart( obsGroupStart );
+	  }
+}
+
+MatchingCriteria::~MatchingCriteria ()
+{
+	// Empty
+}
+
+// Match
+// compare two matching informations
+//
+bool
+MatchingCriteria::IsPair(const MatchingInfo& lhs, const MatchingInfo& rhs) const
+{
+	MvRequest lhsRequest = lhs.matchingRequest_;
+	MvRequest rhsRequest = rhs.matchingRequest_;
+	Cached companionExpected = lhsRequest( "MY_COMPANION" );
+	Cached         parameter = rhsRequest( "PARAM" );
+
+	return ( companionExpected == parameter );
+}
+
+bool 
+MatchingCriteria::Match(const MatchingInfo& lhs, const MatchingInfo& rhs) const
+{
+	// Check Overlay_Mode
+	Cached mode = matchingRequest_("MODE",0);
+	if (mode == Cached ("ALWAYS_OVERLAY"))     return true;
+	else if (mode == Cached ("NEVER_OVERLAY")) return false;
+
+      	int count = matchingRequest_.countParameters();
+	Cached ON = "ON";
+	bool flagOn = false;
+	for(int i = 0; i< count ; i++)
+	{
+		Cached param = matchingRequest_.getParameter(i);
+
+		if ( matchingRequest_(param) == ON )
+		{
+			// This approach does not take into account date-time tolerance
+			// and vector fields
+			flagOn = true;
+			Cached lhsValue = lhs.matchingRequest_(param,0);
+			Cached rhsValue = rhs.matchingRequest_(param,0);
+
+			if( !lhsValue || !rhsValue)
+			{
+				// What shall we do?
+				cout << "MatchingCriteria What shall we do? " << param << endl;
+				//(breaks XSect!) return false; //F05-07-2001, implemented 010709/vk
+			}
+			else if(lhsValue != rhsValue)
+			{
+				return false;
+			}
+		}
+	}
+
+	if (flagOn) return true;
+	else        return false;  //Never overlay
+}
+
+#if 0
+
+MatchingInfo 
+MatchingCriteria::merge(const MatchingInfo& lhs,const MatchingInfo& rhs)
+{
+	
+}
+
+bool 
+MapView::Match( MatchingInfo& dataInfo,
+	        MatchingInfo& nodeInfo )
+{
+	bool    levelMatch = false, 
+		timeMatch  = false, 
+		paramMatch = false;
+
+	if ( levelChecking_ == true )
+		levelMatch = LevelMatching (dataInfo.Level(), nodeInfo.Level());
+
+	if ( timeChecking_ == true )
+		timeMatch = TimeMatching (dataInfo.Date(), nodeInfo.Date());
+	if ( paramChecking_ == true )
+		paramMatch = ParamMatching (dataInfo.Param(), nodeInfo.Param());
+	
+	return (timeMatch || paramMatch || levelMatch);
+
+}
+
+bool
+MapView::TimeMatching(const MvDate& dataDate, const MvDate& nodeDate)
+{
+	if (dataDate != nodeDate)
+		return false;
+
+	if ((dataDate - timeTolerance_) > nodeDate || 
+	    (dataDate + timeTolerance_) < nodeDate)
+		return false;
+
+	return true;
+}
+
+bool
+MapView::LevelMatching(const int dataLevel, const int nodeLevel)
+{
+
+	// Compares level according to some criteria
+	return (dataLevel == nodeLevel ?  true : false); 
+}
+
+bool
+MapView::ParamMatching(const int  dataParam, const int nodeParam)
+{
+
+	// Compares the two parameters - are they equal ?
+	if (dataParam == nodeParam)
+		return true;
+
+	// Use the GribTable2 object
+
+	// If the parameters are not equal,
+	// they may be a pair of components of a vector field
+	
+	// First, convert parameter number from long to char
+	char strParamNum[10];
+	sprintf(strParamNum, "%ld", dataParam); 
+
+	// Then, retrieve from PlotModTable the parameter number
+	// corresponding to the companion 
+	// That is U/V, V/D, etc.
+	const char* value = MvRequest::EnquireTable 
+		            ("vector_field", strParamNum, "companion_number");
+
+	if ((value != 0) && atol(value) == nodeParam)  // found other vector field
+		return true;
+			
+	return false;
+
+}
+#endif
diff --git a/src/uPlot/MatchingCriteria.h b/src/uPlot/MatchingCriteria.h
new file mode 100644
index 0000000..f47b340
--- /dev/null
+++ b/src/uPlot/MatchingCriteria.h
@@ -0,0 +1,69 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MatchingCriteria
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class for that stores the criteria used for
+//  matching. Is HAS_A request which is of the following form:
+//       OVERLAY_CONTROL,
+//               OVERLAY_MODE   = CHECK_SETTINGS/NEVER_OVERLAY/ALWAYS_OVERLAY
+//               OVERLAY_DATES  = ON/OFF,
+//               OVERLAY_TIMES  = ON/OFF,
+//               OVERLAY_LEVELS = ON/OFF,
+//               OVERLAY_AREAS  = ON/OFF,
+//
+//
+// .CLIENTS:
+//  PlotModView
+//
+//
+// .RESPONSABILITIES:
+//  - Create a matching criteria request from a view request
+//  - Compare two matching information and indicate if they match
+//
+//
+// .COLLABORATORS:
+//  MatchingInfo
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef MatchingCriteria_H
+#define MatchingCriteria_H
+
+#include <MvRequest.h>
+
+class MatchingInfo;
+
+class MatchingCriteria {
+public:
+
+	MatchingCriteria ( const MvRequest& matchingRequest );
+	~MatchingCriteria();
+
+	bool Match ( const MatchingInfo&, const MatchingInfo& ) const;
+	bool IsPair( const MatchingInfo&, const MatchingInfo& ) const;
+
+private:
+
+	MvRequest  matchingRequest_;
+};
+#endif
diff --git a/src/uPlot/MatchingInfo.cc b/src/uPlot/MatchingInfo.cc
new file mode 100644
index 0000000..f14f4c0
--- /dev/null
+++ b/src/uPlot/MatchingInfo.cc
@@ -0,0 +1,21 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MatchingInfo.h"
+
+MatchingInfo::MatchingInfo ( const MvRequest& matchingRequest ):
+	matchingRequest_(matchingRequest)
+{
+	// Empty
+}
+
+MatchingInfo::~MatchingInfo ()
+{
+	// Empty
+}
diff --git a/src/uPlot/MatchingInfo.h b/src/uPlot/MatchingInfo.h
new file mode 100644
index 0000000..5932d3b
--- /dev/null
+++ b/src/uPlot/MatchingInfo.h
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MatchingInfo
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class for handling the matching information.
+//  Each object of this class HAS_A request, which should
+//  be of the type:
+//          MATCHING_INFO,
+//                        DATE = 860125,
+//                        TIME = 1330Z,
+//                        .....
+//
+// .CLIENTS:
+//  Presentable, Matching Criteria
+//
+//
+//
+// .RESPONSABILITIES:
+//  Store the information 
+//  Retrieve the matching information 
+//
+//
+// .COLLABORATORS:
+//  MvRequest
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+
+
+#ifndef MatchingInfo_H
+#define MatchingInfo_H
+
+#include <MvRequest.h>
+
+class MatchingInfo {
+	friend class MatchingCriteria;
+public:
+
+	MatchingInfo ( const MvRequest& matchingRequest );
+	~MatchingInfo();
+
+	MvRequest Request () const
+		{ return matchingRequest_; }
+private:
+
+	MvRequest  matchingRequest_;
+};
+#endif
diff --git a/src/uPlot/MvCallback.hpp b/src/uPlot/MvCallback.hpp
new file mode 100644
index 0000000..3827b85
--- /dev/null
+++ b/src/uPlot/MvCallback.hpp
@@ -0,0 +1,82 @@
+//
+// .NAME:	
+//  MvCallback
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//     ECMWF, December 1997
+//
+// .SUMMARY:
+//  Describes the MvCallback class, a generic class
+//  for handling METVIEW-type callbacks (which involve
+//  requests)
+//
+//
+// .CLIENTS:
+//  GenAppService, MacroService
+//
+// .RESPONSABILITY:
+//  This class will provide support for the handling
+//  of callbacks associated to Metview requests
+//
+//  Each new object of this class will, on its constructor:
+//  - store a copy of an object and a procedure to be called
+//    when the "ExecuteCallback" method is used
+//
+//
+// .COLLABORATORS:
+//  
+//
+// .ASCENDENT:
+//  
+//
+// .DESCENDENT:
+//  
+//
+// .REFERENCES:
+//
+//  The ideas of template callbacks implemented here is described
+//  in the article "Callbacks in C++ Using Template Functors", 
+//  included in the "C++ Gems" book.
+//  (see also the "XtCallback" class)
+
+
+#ifndef MvCallback_H
+#define MvCallback_H
+
+class MvRequest;
+
+class MvCallbackBase {
+
+public:
+	MvCallbackBase(){}
+
+        virtual ~MvCallbackBase(){}
+
+	virtual void ExecuteCallback( MvRequest& ) = 0;
+};
+
+
+template <class T>
+class MvCallback: public MvCallbackBase {
+
+	typedef void(T::* Procedure)(MvRequest&);
+	Procedure calledProc_;    
+	T&        calledObject_;
+public:
+
+// -- Constructors
+
+	MvCallback<T>( T& object, Procedure proc ):
+		calledObject_ ( object ), calledProc_ ( proc ) {}
+
+// -- Destructor
+        virtual ~MvCallback() {}
+
+// -- Methods
+
+	// Perform a METVIEW-style callback
+        void ExecuteCallback( MvRequest& replyRequest )
+		{ ( calledObject_.*calledProc_ )( replyRequest ); }
+};
+#endif
diff --git a/src/uPlot/MvIcon.cc b/src/uPlot/MvIcon.cc
new file mode 100644
index 0000000..0412ae0
--- /dev/null
+++ b/src/uPlot/MvIcon.cc
@@ -0,0 +1,197 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MvIcon
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the MvIcon class, a base class
+//  for the various types of icons in PlotMod
+//
+// .CLIENTS:
+//  Presentable
+//
+// .RESPONSABILITY:
+//  This class will provide support for dealing with 
+//  the different types of Icons in PlotMod. 
+//  
+// .COLLABORATORS:
+//  MvIconRep
+//
+// .ASCENDENT:
+//
+// .DESCENDENT:
+// 
+//
+// .REFERENCES:
+//  This "reference counted" class is based on the
+//  "handle/body" C++ idiom, described in Coplien(1992), pg. 58.
+//
+
+#include <Assertions.hpp>
+#include "MvIcon.h"
+
+// --- This is the body class - MvIconRep
+
+MvIconRep::MvIconRep ():
+	iconId_( 0 ),
+	parentId_( 0 ),
+	myRequest_("EMPTY")
+{
+	//Empty 
+}
+
+MvIconRep::MvIconRep(const Cached& iconName, const Cached& iconClass):
+	parentId_( 0 ),
+	iconName_(iconName),
+	iconClass_(iconClass)
+{
+	// Empty
+}
+
+MvIconRep::MvIconRep(const MvRequest& inRequest, bool idSave): 
+	iconId_(++iconNextId_),
+	parentId_( 0 ),
+	myRequest_(inRequest)
+{ 
+	iconName_     = ObjectInfo::ObjectName (inRequest); 
+	iconClass_    = inRequest.getVerb();
+	iconFullPath_ = ObjectInfo::ObjectPath (inRequest);
+
+	// Save iconId to the request
+	if ( idSave )
+		myRequest_("_ID") = iconId_;
+}
+
+// Copy Constructor and Operator =
+MvIconRep& 
+MvIconRep::operator=(const MvIconRep& mvIconRep)
+{
+	if (this == &mvIconRep)
+		return *this;
+	
+	iconName_     = mvIconRep.iconName_;
+	iconClass_    = mvIconRep.iconClass_;
+	iconFullPath_ = mvIconRep.iconFullPath_;
+	iconId_       = mvIconRep.iconId_;
+	parentId_     = mvIconRep.parentId_;
+	
+	myRequest_    = mvIconRep.myRequest_;
+	
+	return *this;
+}
+
+MvIconRep:: MvIconRep(const MvIconRep& mvIconRep)
+{
+	iconName_     = mvIconRep.iconName_;
+	iconClass_    = mvIconRep.iconClass_;
+	iconFullPath_ = mvIconRep.iconFullPath_;
+	iconId_       = mvIconRep.iconId_;
+	parentId_     = mvIconRep.parentId_;
+
+	myRequest_    = mvIconRep.myRequest_;
+}
+
+// Initialization of the static counter 
+// (this gives each icon its unique Id)
+int MvIconRep::iconNextId_ = 0;
+
+//---------------------------------------------
+// --- This is the Handle class - MvIcon
+
+MvIcon::MvIcon()
+{
+	ptrIconRep_ = new MvIconRep;
+	ptrIconRep_->refCount_ = 1;	
+}
+
+MvIcon::MvIcon ( const Cached& iconName, const Cached& iconClass )
+{
+	ptrIconRep_ = new MvIconRep ( iconName, iconClass );
+	ptrIconRep_->refCount_ = 1;
+}
+
+// Default constructor
+// Builds an icon from Request
+// Initialises the reference counter
+MvIcon::MvIcon(const MvRequest& inRequest, bool idSave)
+{
+	ptrIconRep_ = new MvIconRep(inRequest,idSave);
+	ptrIconRep_->refCount_ = 1;
+}
+
+// Copy constructor
+// copies the representation pointer
+// increments the reference counter
+MvIcon::MvIcon(const MvIcon& inIcon)
+{
+	ptrIconRep_ = inIcon.ptrIconRep_;
+	ptrIconRep_->refCount_++;
+}
+
+// Operator =
+// Copies the representation pointer
+// Decrements the reference counter of the current object
+// Increments the reference counter for the new object
+MvIcon& 
+MvIcon::operator=(const MvIcon& inIcon)
+{
+	inIcon.ptrIconRep_->refCount_++;
+	
+	if ( --(ptrIconRep_->refCount_) <= 0 )
+		delete ptrIconRep_;
+	
+	ptrIconRep_ = inIcon.ptrIconRep_;
+	return *this;
+}
+
+// Destructor
+MvIcon::~MvIcon()
+{
+	if ( --(ptrIconRep_->refCount_) <= 0 )
+		delete ptrIconRep_;	
+}
+
+void
+MvIcon::SaveRequest (const MvRequest& inRequest, bool idSave)
+{
+	ptrIconRep_->myRequest_ = inRequest;
+	if ( idSave )
+		ptrIconRep_->myRequest_("_ID") = ptrIconRep_->iconId_;
+}
+
+MvRequest
+MvIcon::Request() const
+{ 
+	require(ptrIconRep_ != 0);
+
+	return ptrIconRep_->myRequest_; 
+}
+
+MvRequest
+MvIcon::SvcRequest() const
+{ 
+	require(ptrIconRep_ != 0);
+
+        return ptrIconRep_->svcRequest_;
+}
+
+bool
+operator== (MvIcon& a, MvIcon& b)
+{
+	if (a.IconClass() != b.IconClass()) return false;
+	if (a.FullName()  != b.FullName())  return false;
+	if (a.PathName()  != b.PathName())  return false;
+
+	return true;
+}
diff --git a/src/uPlot/MvIcon.h b/src/uPlot/MvIcon.h
new file mode 100644
index 0000000..987a8e2
--- /dev/null
+++ b/src/uPlot/MvIcon.h
@@ -0,0 +1,177 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MvIcon
+// Gilberto Camara - ECMWF Apr 97
+//
+// .NAME:
+//  MvIcon
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the MvIcon class, a base class
+//  for the various types of icons in PlotMod
+//
+// .CLIENTS:
+//  Presentable, Matcher
+//
+// .RESPONSABILITY:
+//  This class will provide support for dealing with 
+//  the different types of Icons in PlotMod. 
+//
+// .COLLABORATORS:
+//  MvIconRep
+//
+// .ASCENDENT:
+//
+// .DESCENDENT:
+//
+//
+// .REFERENCES:
+//  This "reference counted" class is based on the
+//  "handle/body" C++ idiom, described in Coplien(1992), pg. 58.
+//
+#ifndef MvIcon_H
+#define MvIcon_H
+
+#include "MvRequest.h"
+#include "ObjectInfo.h"
+
+class MvIcon;
+
+// --- This is the handle class - MvIconRep
+
+class MvIconRep {
+
+	friend class MvIcon;
+
+private:
+
+        // Constructors
+	MvIconRep();
+	MvIconRep(const Cached& iconName, const Cached& iconClass);
+	MvIconRep(const MvRequest& inRequest, bool idSave=false);
+
+	// Destructor
+	~MvIconRep() {}
+
+	// Copy Constructor and Operator =
+	MvIconRep& operator=(const MvIconRep& mvIconRep);
+	MvIconRep(const MvIconRep& mvIconRep);
+
+        static int  iconNextId_;
+	int         iconId_;
+	int         parentId_;
+
+	Cached      iconName_;
+	Cached      iconFullPath_;
+	Cached      iconClass_;
+//	Cached      iconDot_;
+
+	MvRequest   myRequest_;
+
+	MvRequest   svcRequest_;
+
+	// reference counter
+	int         refCount_;
+};
+
+
+class MvIcon {
+
+public:
+
+	// Contructors
+	MvIcon();
+	MvIcon(const Cached& iconName, const Cached& iconClass);
+
+	// Default constructor
+	// Builds an icon from Request
+	// Initialises the reference counter
+	MvIcon(const MvRequest& inRequest, bool idSave=false);
+
+	// Copy constructor
+	// copies the representation pointer
+	// increments the reference counter
+	MvIcon(const MvIcon& inIcon);
+
+	// Operator =
+	// Copies the representation pointer
+	// Decrements the reference counter of the current object
+	// Increments the reference counter for the new object
+	MvIcon& operator=(const MvIcon& inIcon);
+
+	// Destructor
+	~MvIcon();
+
+	// Change name
+	void Rename(const Cached& newName)
+		{ ptrIconRep_->iconName_ = newName; }
+
+	// Save the request associated to the icon
+	void SaveRequest (const MvRequest& inRequest, bool idSave=false);
+
+	// void Remove() {}                        // Move to trash
+        //	void move(const MvIcon& parent);      // Change folder
+        //	void move(int x,int y);
+
+
+        // File name
+	Cached PathName() const
+		{ return ptrIconRep_->iconFullPath_;}
+
+        // Icon full name
+	Cached FullName() const
+		{ return ptrIconRep_->iconName_;}
+
+	// Icon short name
+	Cached IconName() const
+		{ return ptrIconRep_->iconName_;} 
+
+	// Icon class
+	Cached IconClass() const
+		{ return ptrIconRep_->iconClass_; }
+
+	// Icon MetviewUI class. It can be different from iconClass()
+	// value, because MetviewUI retrieves this information from
+	// the icon file.
+	// I think that the method IconClass should be renamed to
+	// IconVerb (Fernando, 01/00)
+	Cached IconMetUIClass() const
+		{ return ObjectInfo::IconClass(Request()); }
+
+	// Retrieves the associated request
+	MvRequest Request() const;
+    
+	// Retrieves the id
+	int Id() const
+		{ return ptrIconRep_->iconId_; } 
+
+	// Overloaded operator == , checks for the same path and name
+	friend bool operator== (MvIcon& a, MvIcon& b);
+
+	void ParentId ( int parentId ) {
+		ptrIconRep_->parentId_ = parentId; }
+
+	int  ParentId () {
+		return ptrIconRep_->parentId_; }
+
+        // Save the request associated to the icon
+	void SvcRequest (const MvRequest& svcRequest)
+		{ ptrIconRep_->svcRequest_ = svcRequest; }
+
+	MvRequest SvcRequest() const;
+
+private:
+        MvIconRep   *ptrIconRep_;
+
+};
+#endif
diff --git a/src/uPlot/MvIconDataBase.cc b/src/uPlot/MvIconDataBase.cc
new file mode 100644
index 0000000..1cf2cab
--- /dev/null
+++ b/src/uPlot/MvIconDataBase.cc
@@ -0,0 +1,2034 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MvIconDataBase
+// Gilberto Camara - ECMWF Jun 97
+//
+// .NAME:	
+//  MvIconDataBase
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Implements a data base of Data Units and VisDefs
+//  and a m:n relation between a DataUnit and a VisDef
+//
+//
+#include <Assertions.hpp>
+#include <MvPath.hpp>
+
+#include "MvIconDataBase.h"
+#include "PlotModConst.h"
+#include "Root.h"
+#include "ObjectList.h"
+
+MvIconDataBase::MvIconDataBase()
+{
+	//empty
+}
+
+MvIconDataBase::MvIconDataBase(const MvIconDataBase &old) :
+  dataunitList_(old.dataunitList_),
+  visdefList_(old.visdefList_),
+  textList_(old.textList_),
+  legendList_(old.legendList_)
+{
+  // Initialize cursors
+  duListCursor_  = dataunitList_.begin();
+  vdListCursor_  = visdefList_.begin();
+  ptListCursor_  = textList_.begin();
+  legListCursor_ = legendList_.begin();
+
+  // Don't copy relations. These will be rebuilt with
+  // presentable id's for new hierarchy.
+}
+
+MvIconDataBase::~MvIconDataBase()
+{
+	// Remove all data links
+	DeleteLink();
+}
+
+// If presentable id is > 0, do the insertion into the presentable/
+// dataunit relation also.
+bool 
+MvIconDataBase::InsertDataUnit ( MvIcon& newDataUnit,int presentableId)
+{
+	bool retVal;
+
+	retVal = InsertIfNew(newDataUnit,dataunitList_,presentableDataUnitRelation_, presentableId);
+
+	RelationInsertIfNew(presentableDataUnitRelation_,presentableId, newDataUnit.Id() );
+ 
+	return retVal;
+}
+
+bool 
+MvIconDataBase::InsertVisDef ( MvIcon& newVisDef)
+{
+	return InsertIfNew(newVisDef,visdefList_, presentableVisDefRelation_);
+}
+
+void 
+MvIconDataBase::DataUnitVisDefRelation (const int dataunitId, const int visdefId)
+{
+	RelationInsertIfNew(dataUnitVisDefRelation_,dataunitId,visdefId);
+}
+
+bool
+MvIconDataBase::RetrieveVisDefList ( const MvIcon& dataUnit, MvIconList& visdefList )
+{
+	// Start from the beginning of the dataunit-visdef pairs
+	this->DataUnitVisDefRelationRewind();
+
+	MvIcon tmpVisDef;
+	bool found = false;
+	visdefList.clear();    //initialise list
+
+	// Retrieve the VisDefs associated to the DataUnit
+	while ( this->NextVisDefByDataUnitId ( dataUnit.Id(), tmpVisDef ) )
+	{
+		visdefList.push_back(tmpVisDef);
+		found = true;
+	}
+
+	return found;
+}
+
+#if 0
+void 
+MvIconDataBase::RetrieveVisDefList ( MvIconList& dataUnitList, MvIconList& vdList)
+{
+	duListCursor_ = dataUnitList.begin();
+	MvIcon theDataUnit;
+
+	while ( duListCursor_ != dataUnitList.end() )
+	{
+		theDataUnit = *duListCursor_;
+
+		RetrieveVisDefList ( theDataUnit, vdList );
+
+		++duListCursor_;
+	}
+}
+
+bool
+MvIconDataBase::RetrieveDataUnitFromVisDef ( const int visdefId, MvIcon& theDataUnit)
+{
+	MvRelationCursor duvdCursor = dataUnitVisDefRelation_.begin();
+        
+	while (  duvdCursor != dataUnitVisDefRelation_.end() )
+	{
+              // VisDefs have a unique icon id 
+	      // find the one on the list
+	      if ( (*duvdCursor).second == visdefId )
+	      {
+	              // retrieve the dataunit Id
+		      const int dataunitId = (*duvdCursor).first;
+
+      		      // retrieve the dataunit
+		      return RetrieveDataUnit(dataunitId, theDataUnit);
+	      }
+	      ++duvdCursor;
+	}		      
+
+	return false;
+}
+#endif
+
+bool
+MvIconDataBase::NextVisDefByDataUnitId (const int dataunitId, MvIcon& theVisDef)
+{
+	while (duvdRelationCursor_ !=  dataUnitVisDefRelation_.end())
+	{
+              // DataUnits have a unique icon id 
+	      // find the one on the list
+	      if ( (*duvdRelationCursor_).first == dataunitId )
+	      {
+	              // Retrieve the visdef Id
+		      const int visdefId = (*duvdRelationCursor_).second;
+
+		      // Increment the relation Cursor (to point to next item)
+		      ++duvdRelationCursor_;
+
+		      // Retrieve the visdef
+		      return RetrieveVisDef(visdefId, theVisDef);
+	      }
+	      ++duvdRelationCursor_;
+	}
+
+	return false;
+}
+
+#if 0
+bool MvIconDataBase::DataUnitHasVisDef(const int dataUnitId,const int visdefId)
+{
+  bool retVal = false;
+
+  if ( dataUnitId == 0 || visdefId == 0 )
+    return retVal;
+
+ MvIconList vdList;
+ MvIcon dataUnit;
+
+ RetrieveDataUnit(dataUnitId,dataUnit);
+ RetrieveVisDefList(dataUnit,vdList);
+ MvIcon currvd;
+
+ for ( MvListCursor ii = vdList.begin(); ii != vdList.end(); ii++)
+   {
+     if ( (*ii).Id() == visdefId)
+       {
+	 retVal = true;
+	 break;
+       }
+   }
+ return retVal;
+}
+#endif
+
+bool
+MvIconDataBase::RetrieveDataUnit(const int dataunitId, MvIcon& theDataUnit)
+{
+	require ( dataunitId > 0 );
+
+	// DataUnits have a unique icon id
+	// find the one on the list
+	duListCursor_ = dataunitList_.begin();
+
+	while (duListCursor_ != dataunitList_.end())
+	{
+		if ( (*duListCursor_).Id() == dataunitId )
+		{
+			theDataUnit = *duListCursor_;
+			return true;
+		}
+		++duListCursor_;
+	}
+
+	return false;
+}
+
+bool
+MvIconDataBase::UpdateDataUnit ( const int dataunitId, const MvRequest& duRequest )
+{
+	require ( dataunitId > 0 );
+
+	// Data units have a unique icon id
+	// find the one on the list
+	duListCursor_ = dataunitList_.begin();
+	while (duListCursor_ != dataunitList_.end())
+	{
+		if ( (*duListCursor_).Id() == dataunitId ) // update Request
+		{
+			(*duListCursor_).SaveRequest(duRequest,true);
+			return true;
+		}
+		++duListCursor_;
+	}
+
+	return false;
+}
+
+void
+MvIconDataBase::RemoveDataUnitFromList (const int dataunitId)
+{
+	require ( dataunitId > 0 );
+
+	MvListCursor duListCursor = dataunitList_.begin();
+	MvListCursor foundCursor;
+	while ( duListCursor != dataunitList_.end() )
+	{
+	        foundCursor = duListCursor;
+		++duListCursor;
+
+		if ( (*foundCursor).Id() == dataunitId ||
+		     (*foundCursor).ParentId() == dataunitId )
+		{
+		      dataunitList_.erase ( foundCursor );
+		}
+	}
+}
+
+bool
+MvIconDataBase::RetrieveVisDef(const int visdefId, MvIcon& theVisDef)
+{
+	require ( visdefId > 0 );
+
+	// VisDefs have a unique icon id
+	// find the one on the list
+	vdListCursor_ = visdefList_.begin();
+
+	while (vdListCursor_ != visdefList_.end())
+	{
+		if ( (*vdListCursor_).Id() == visdefId )
+		{
+			theVisDef = *vdListCursor_;
+			return true;
+		}
+		++vdListCursor_;
+	}
+
+	return false;
+}
+
+void
+MvIconDataBase::RemoveVisDefFromList ( const int visdefId )
+{
+	require ( visdefId > 0 );
+
+	// VisDefs have a unique icon id
+	// find the one on the list
+	vdListCursor_ = visdefList_.begin();
+
+	while ( vdListCursor_ != visdefList_.end() )
+	{
+		if ( (*vdListCursor_).Id() == visdefId )
+		{
+			visdefList_.erase ( vdListCursor_ );
+			break;
+		}
+		++vdListCursor_;
+	}
+}
+
+#if 0
+void 
+MvIconDataBase::DataUnitRewind()
+{
+	duListCursor_ = dataunitList_.begin();
+}
+
+void 
+MvIconDataBase::VisDefRewind()
+{
+	vdListCursor_ = visdefList_.begin();
+}
+
+bool
+MvIconDataBase::NextDataUnitByClass (const Cached& iconClass, MvIcon& theDataUnit)
+{
+	while (duListCursor_ != dataunitList_.end())
+	{
+		if ( (*duListCursor_).IconClass() == iconClass )
+		{
+			theDataUnit = *duListCursor_;
+
+		        ++duListCursor_;          // to point to next element
+			return true;
+		}
+		++duListCursor_;
+	}
+return false;
+}
+
+bool
+MvIconDataBase::NextDataUnit ( MvIcon& theDataUnit )
+{
+	if (duListCursor_ != dataunitList_.end())
+	{
+		theDataUnit = *duListCursor_;
+
+		++duListCursor_;          // to point to next element
+		return true;
+	}
+	return false;
+}
+#endif
+
+bool
+MvIconDataBase::RemoveAllVisDefsByDataUnit ( MvIcon& theDataUnit, const MvRequest* vd )
+{
+	bool found = false;
+
+	MvRelationCursor duvdCursor = dataUnitVisDefRelation_.begin();
+	MvRelationCursor foundCursor;
+
+        MvIcon currentDataUnit;
+	while (  duvdCursor != dataUnitVisDefRelation_.end() )
+	{
+		// DataUnits have a unique icon id
+		// find the one on the list
+	        MvListCursor oldCursor = duListCursor_;
+	        RetrieveDataUnit((*duvdCursor).first,currentDataUnit);
+		duListCursor_ = oldCursor;
+
+		if ( currentDataUnit.Id() == theDataUnit.Id() || 
+		     currentDataUnit.ParentId() == theDataUnit.Id() )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = duvdCursor;
+
+			// Increment, so we can continue our search
+			++duvdCursor;
+
+			MvIcon visDef;
+			RetrieveVisDef ( (*foundCursor).second, visDef );
+
+			// Do not remove if they are not of the same class
+			if ( !vd || ObjectInfo::CheckVisDefClass(*vd, visDef.Request( )) )
+			{ 
+				// delete the relation pair
+				dataUnitVisDefRelation_.erase ( foundCursor );
+
+				// Remove visdef from list
+				RemoveVisDefFromList ( (*foundCursor).second );
+
+				// indicate that visdef is related to dataunit
+				found = true;
+			}
+		}
+		else
+			++duvdCursor;
+	}
+
+	return found;
+}
+
+void
+MvIconDataBase::RemoveDataUnit ( MvIcon& theDataUnit )
+{
+	// Remove the visdef from the visdef-data unit relation
+	RemoveAllVisDefsByDataUnit ( theDataUnit );
+
+	// Remove data unit from the Presentable-DataUnit Relation
+	RemoveAllDataUnitsFromPresRel (theDataUnit );
+
+	// Remove data unit from List
+	RemoveDataUnitFromList ( theDataUnit.Id() );
+}
+
+void
+MvIconDataBase::RemoveDataUnit ( const int presentableId )
+{
+	// Retrieve list of DataUnits by presentable ID
+	MvIconList dataUnitList;
+	DataUnitListByPresentableId ( presentableId, dataUnitList );
+
+	// Remove DataUnits
+	MvListCursor duListCursor = dataUnitList.begin();
+	while ( duListCursor != dataUnitList.end() )
+	{
+		RemoveDataUnit (*duListCursor);
+		++duListCursor;
+	}
+}
+
+void
+MvIconDataBase::RemoveDataUnit ( )
+{
+	// Remove all DataUnits
+	MvListCursor duListCursor = dataunitList_.begin();
+	MvListCursor foundCursor;
+
+	while ( duListCursor != dataunitList_.end() )
+	{
+		// Keep a copy of the found iterator
+		foundCursor = duListCursor;
+
+		// Increment, so we can continue our search
+		++duListCursor;
+
+		// Remove the visdef from the visdef-data unit relation
+		RemoveAllVisDefsByDataUnit ( *foundCursor );
+
+		// Remove data unit from the Presentable-DataUnit Relation
+		RemoveAllDataUnitsFromPresRel ( *foundCursor );
+
+		dataunitList_.erase ( foundCursor );
+	}
+}
+
+bool
+MvIconDataBase::RemoveAllVisDefsByVisDefId ( MvIcon& theVisDef )
+{
+	bool found = false;
+
+	MvRelationCursor duvdCursor = dataUnitVisDefRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while ( duvdCursor != dataUnitVisDefRelation_.end() )
+	{
+		// DataUnits have a unique icon id 
+		// find the one on the list
+		if ( (*duvdCursor).second == theVisDef.Id() )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = duvdCursor;
+
+			// Increment, so we can continue our search
+			++duvdCursor;
+
+			// delete the relation pair
+			dataUnitVisDefRelation_.erase ( foundCursor );
+
+			// indicate that visdef is related to dataunit
+			found = true;
+		}
+		else
+			++duvdCursor;
+	}
+
+	return found;
+}
+
+bool
+MvIconDataBase::RemoveAllVisDefsFromPresRel ( MvIcon& theVisDef )
+{
+	bool found = false;
+
+	MvRelationCursor prvdCursor = presentableVisDefRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while ( prvdCursor != presentableVisDefRelation_.end() )
+	{
+		if ( (*prvdCursor).second == theVisDef.Id() )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prvdCursor;
+
+			// Increment, so we can continue our search
+			++prvdCursor;
+
+			// delete the relation pair
+			presentableVisDefRelation_.erase ( foundCursor );
+
+			// indicate that visdef is related to presentable
+			found = true;
+		}
+		else
+			++prvdCursor;
+	}
+
+	return found;
+}
+
+bool
+MvIconDataBase::RemoveAllDataUnitsFromPresRel ( MvIcon& theDataUnit )
+{
+	bool found = false;
+
+	MvRelationCursor prduCursor = presentableDataUnitRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	MvIcon currentDataUnit;
+	while ( prduCursor != presentableDataUnitRelation_.end() )
+	{
+	        RetrieveDataUnit((*prduCursor).second,currentDataUnit);
+		if ( currentDataUnit.Id() == theDataUnit.Id() || 
+		     currentDataUnit.ParentId() == theDataUnit.Id() )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prduCursor;
+
+			// Increment, so we can continue our search
+			++prduCursor;
+
+			// Delete the relation pair
+			presentableDataUnitRelation_.erase ( foundCursor );
+
+			// Indicate that visdef is related to presentable
+			found = true;
+		}
+		else
+			++prduCursor;
+	}
+
+	return found;
+}
+
+bool
+MvIconDataBase::RemoveDataUnitFromPresRel ( MvIcon& theDataUnit, int presentableId)
+{
+	bool found = false; 
+
+	MvRelationCursor prduCursor = presentableDataUnitRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	MvIcon currentDataUnit;
+	while ( prduCursor != presentableDataUnitRelation_.end() )
+	{
+	        RetrieveDataUnit((*prduCursor).second,currentDataUnit);
+		if ( (currentDataUnit.Id() == theDataUnit.Id() || 
+		      currentDataUnit.ParentId() == theDataUnit.Id()) &&
+		      (*prduCursor).first == presentableId )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prduCursor;
+
+			// delete the relation pair
+			presentableDataUnitRelation_.erase ( foundCursor );
+
+			// indicate that visdef is related to presentable
+			found = true;
+			break;
+		}
+		else
+			++prduCursor;
+	}
+
+	return found;
+}
+
+#if 0
+void
+MvIconDataBase::RemoveVisDef ( MvIcon& theVisDef )
+{
+	bool found; 
+
+	// Remove the visdef from the visdef-data unit relation
+
+	found = RemoveAllVisDefsByVisDefId ( theVisDef );
+
+	// If the visdef is not related to a data unit, then it must be
+	// related to a presentable
+
+	if ( found == false )
+		RemoveAllVisDefsFromPresRel ( theVisDef );
+
+	// Remove visdef
+
+	RemoveVisDefFromList ( theVisDef.Id() );
+}
+#endif
+
+void
+MvIconDataBase::RemoveVisDef ( const int presentableId, const MvRequest* vd )
+{
+	// Remove VisDefs from DataUnit relation
+	MvIconList dataUnitList;
+        if (DataUnitListByPresentableId ( presentableId, dataUnitList ))
+		RemoveAllVisDefsByDataUnitList ( dataUnitList, vd );
+
+	// Remove VisDefs from Presentable relation
+	RemoveVisDefFromPresRel ( presentableId, vd );
+}
+
+void
+MvIconDataBase::RemoveVisDefFromPresRel ( const int presentableId, const MvRequest* vd )
+{
+	MvRelationCursor prvdCursor =  presentableVisDefRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while (prvdCursor !=  presentableVisDefRelation_.end())
+	{
+              // Presentable have a unique icon id
+	      // find the one on the list
+	      if ( (*prvdCursor).first == presentableId )
+	      {
+		      foundCursor = prvdCursor;
+
+		      // Increment the relation Cursor (to point to next item)
+		      ++prvdCursor;
+
+		      // Check if class is given
+		      MvIcon theVisDef;
+		      if (vd && RetrieveVisDef((*foundCursor).second,theVisDef))
+		      {
+			// Do not remove if they are not of the same class
+			if (!ObjectInfo::CheckVisDefClass(*vd,theVisDef.Request()) )
+			     continue;
+		      }
+
+		      // Delete visdef from VisDefList
+		       RemoveVisDefFromList ( (*foundCursor).second );
+
+		      // Delete the visdef-presentable pair
+		      presentableVisDefRelation_.erase ( foundCursor );
+	      }
+	      else
+		      ++prvdCursor;
+	}
+}
+
+void
+MvIconDataBase::RemoveVisDef ( )
+{
+	bool found;
+
+	// Remove all VisDefs
+	MvListCursor vdListCursor = visdefList_.begin();
+	MvListCursor foundCursor;
+
+	while ( vdListCursor != visdefList_.end() )
+	{
+		// Keep a copy of the found iterator
+		foundCursor = vdListCursor;
+
+		// Increment, so we can continue our search
+		++vdListCursor;
+
+		// Remove the visdef from the visdef-data unit relation
+		found = RemoveAllVisDefsByVisDefId ( *foundCursor );
+
+		// If the visdef is not related to a data unit, then 
+		// it must be related to a presentable
+		if ( found == false )
+			RemoveAllVisDefsFromPresRel ( *foundCursor );
+
+		// delete the relation pair
+		visdefList_.erase ( foundCursor );
+	}
+}
+
+void
+MvIconDataBase::RemoveAllVisDefsByDataUnitList ( MvIconList& dataUnitList, const MvRequest* vd )
+{
+	duListCursor_ = dataUnitList.begin();
+	MvIcon theDataUnit;
+
+	while ( duListCursor_ != dataUnitList.end() )
+	{
+		theDataUnit = *duListCursor_;
+
+		RemoveAllVisDefsByDataUnit ( theDataUnit, vd );
+
+		++duListCursor_;
+	}
+}
+
+#if 0
+void 
+MvIconDataBase::PresentableVisDefRelation (const int presentableId, const int visdefId)
+{
+  RelationInsertIfNew(presentableVisDefRelation_,presentableId,visdefId);
+}
+#endif
+
+bool
+MvIconDataBase::VisDefListByDataUnitAndPresentableId ( const int   presentableId_, const char* dataUnitClass, MvIconList& visdefList )
+{
+	// Instantiate auxiliary variables
+	MvIcon tmpVisDef;
+	bool success = false;
+
+	// Rewind the Presentable-VisDef relation
+	this->PresentableVisDefRelationRewind();
+
+	// Loop through the database and find all visdefs associated to
+	// the superpage
+	while ( this->NextVisDefByPresentableId ( presentableId_, tmpVisDef ) )
+	{
+                // Accept all valid visdefs
+                if ( ObjectList::CheckValidVisDef ( dataUnitClass, tmpVisDef.IconClass() ) )
+		{
+			success = true;
+			visdefList.push_back ( tmpVisDef );
+		}
+	}
+
+	return success;
+}
+
+bool
+MvIconDataBase::VisDefListByPresentableId ( const int   presentableId, MvIconList& visdefList )
+{
+	// Instantiate auxiliary variables
+	MvIcon tmpVisDef;
+	bool success = false;
+
+	// Rewind the Presentable-VisDef relation
+	this->PresentableVisDefRelationRewind();
+
+	// Loop through the database and find all visdefs associated to the presentable
+	while ( this->NextVisDefByPresentableId ( presentableId, tmpVisDef ) )
+	{
+		success = true;
+		visdefList.push_back ( tmpVisDef );
+	}
+
+	return success;
+}
+
+bool
+MvIconDataBase::NextVisDefByPresentableId (const int presentableId, MvIcon& theVisDef)
+{
+	while (prvdRelationCursor_ !=  presentableVisDefRelation_.end())
+	{
+              // Presentable have a unique icon id 
+	      // find the one on the list
+	      if ( (*prvdRelationCursor_).first == presentableId )
+	      {
+	              // Retrieve the visdef Id
+		      const int visdefId = (*prvdRelationCursor_).second;
+
+		      // Increment the relation Cursor (to point to next item)
+		      ++prvdRelationCursor_;
+
+		      // Retrieve the visdef
+		      return RetrieveVisDef(visdefId, theVisDef);
+	      }
+	      ++prvdRelationCursor_;
+	}
+
+	return false;
+}
+
+#if 0
+void
+MvIconDataBase::UpdatePresentableVisDefRelation ( const int newPresentableId, const int oldPresentableId )
+{
+	int              visdefId;
+	MvRelationCursor foundCursor;
+
+	// Rewind the Presentable-VisDef relation
+	this->PresentableVisDefRelationRewind();
+
+	// Loop through the database and find all visdefs associated to
+	// the presentable
+	while (prvdRelationCursor_ !=  presentableVisDefRelation_.end())
+	{
+              // Presentable have a unique icon id 
+	      // find the one on the list
+	      if ( (*prvdRelationCursor_).first == oldPresentableId )
+	      {
+		      foundCursor = prvdRelationCursor_;
+		      visdefId    = (*prvdRelationCursor_).second;
+
+		      // delete the visdef-presentable pair
+		      presentableVisDefRelation_.erase ( foundCursor );
+
+	              // insert the new visdef-presentable pair
+		      RelationInsertIfNew(presentableVisDefRelation_,newPresentableId,visdefId);
+	      }
+	      ++prvdRelationCursor_;
+	}
+}
+#endif
+
+void
+MvIconDataBase::PresentableDataUnitRelation (const int presentableId, const int dataunitId)
+{
+	RelationInsertIfNew(presentableDataUnitRelation_,presentableId,dataunitId);
+}
+
+bool
+MvIconDataBase::DataUnitListByPresentableId ( const int   presentableId, MvIconList& dataUnitList )
+{
+	// Instantiate auxiliary variables
+	MvIcon tmpDataUnit;
+	bool success = false;
+
+	// Rewind the Presentable-DataUnit relation
+	this->PresentableDataUnitRelationRewind();
+
+	// Loop through the database and find all dataunits associated to
+	// the superpage
+	while ( this->NextDataUnitByPresentableId ( presentableId, tmpDataUnit ) )
+	{
+		success = true;
+		dataUnitList.push_back ( tmpDataUnit );
+	}
+
+	return success;
+}
+
+bool
+MvIconDataBase::PresentableHasData ( const int presentableId )
+{
+	// Instantiate auxiliary variables
+	MvIcon tmpDataUnit;
+
+	// Rewind the Presentable-DataUnit relation
+	this->PresentableDataUnitRelationRewind();
+
+	// Retrieve the first dataunit associated to the Presentable Id
+	return this->NextDataUnitByPresentableId ( presentableId, tmpDataUnit );
+}
+
+bool
+MvIconDataBase::NextDataUnitByPresentableId (const int presentableId, MvIcon& theDataUnit)
+{
+	while (prduRelationCursor_ !=  presentableDataUnitRelation_.end())
+	{
+              // Presentable have a unique icon id
+	      // find the one on the list
+	      if ( (*prduRelationCursor_).first == presentableId )
+	      {
+	              // Retrieve the dataunit Id
+		      const int dataunitId = (*prduRelationCursor_).second;
+		     
+		      // Increment the relation Cursor (to point to next item)
+		      ++prduRelationCursor_;
+
+		      // Retrieve the dataunit
+		      return RetrieveDataUnit ( dataunitId, theDataUnit );
+	      }
+	      ++prduRelationCursor_;
+	}
+
+	return false;
+}
+
+#if 0
+void
+MvIconDataBase::UpdatePresentableDataUnitRelation ( const int newPresentableId, const int oldPresentableId )
+{
+	int              dataunitId;
+	MvRelationCursor foundCursor;
+
+	// Rewind the Presentable-DataUnit relation
+	this->PresentableDataUnitRelationRewind();
+
+	// Loop through the database and find all dataunits associated to
+	// the presentable
+	while (prduRelationCursor_ !=  presentableDataUnitRelation_.end())
+	{
+              // Presentable have a unique icon id 
+	      // find the one on the list
+	      if ( (*prduRelationCursor_).first == oldPresentableId )
+	      {
+		      foundCursor = prduRelationCursor_;
+		      dataunitId    = (*prduRelationCursor_).second;
+
+		      // delete the dataunit-presentable pair
+		      presentableDataUnitRelation_.erase ( foundCursor );
+
+	              // insert the new dataunit-presentable pair
+		      RelationInsertIfNew(presentableDataUnitRelation_,newPresentableId,dataunitId);
+	      }
+	      ++prduRelationCursor_;
+	}
+}
+
+void
+MvIconDataBase::RemovePresentable (const int presentableId)
+{
+	require (presentableId > 0 );
+	
+	prvdRelationCursor_ = presentableVisDefRelation_.begin();
+	
+	while (prvdRelationCursor_ !=  presentableVisDefRelation_.end())
+	{
+              // Presentables have a unique icon id 
+	      // find the one on the list
+	      if ( (*prvdRelationCursor_).first == presentableId )
+	      {
+	              // delete this entry
+		      presentableVisDefRelation_.erase(prvdRelationCursor_);
+	      }
+	      ++prvdRelationCursor_;
+	}
+
+}
+#endif
+
+MvIcon
+MvIconDataBase::InsertDataUnit (  const MvRequest& dataunitRequest, int presentableId )
+{
+	// Copy the grib Request into a new DataUnit
+	MvIcon newDataUnit ( dataunitRequest );
+
+	// If the data existed before, we get rid of old drawings to make sure
+	// redraw is done properly
+	if ( ! this->InsertDataUnit ( newDataUnit,presentableId ) )
+	{
+		if ( presentableId > 0 )
+		{
+			// Erase the segments to force redrawing
+			Presentable* treeNode = Root::Instance().FindBranch (presentableId);
+			bool oldStatus = treeNode->RemoveData();
+			treeNode->RemoveData(false);
+			treeNode->RemoveIcon(newDataUnit);
+			treeNode->RemoveData(oldStatus);
+		}
+	}
+
+	return newDataUnit;
+}
+
+MvIcon
+MvIconDataBase::InsertVisDef ( const MvRequest& visdefRequest,
+			       const int         nodeId,
+			       MvIcon&           dataUnit )
+{
+	require ( nodeId > 0 );
+	require ( dataUnit.Id() >= 0 );
+
+	// Copy the visdef Request into a new VisDef
+	MvIcon visDef ( visdefRequest );
+
+	int id;
+	MvRelation *relation; // Pointer to avoid any copying of maps.
+
+	// VisDefs that come after a DataUnit are assigned
+	// to that DataUnit (or else they 
+	// are assigned to the presentable)
+	// NB Don't check validity of drop. This is responsibility of caller.
+	if (  dataUnit.Id() > 0 )
+	  {
+	    id = dataUnit.Id();
+	    relation = &dataUnitVisDefRelation_;
+	  }
+	else
+	  {
+	    id = nodeId;
+	    relation = &presentableVisDefRelation_;
+	  }
+
+	// Put the visdef in the DataBase and in relation if it's not there
+	if ( this->InsertIfNew(visDef,visdefList_,*relation,id) )
+	  RelationInsertIfNew(*relation,id,visDef.Id() );
+
+	return visDef;
+}
+
+void
+MvIconDataBase::InsertVisDef ( MvIcon& visDef, const int nodeId )
+{
+	require ( nodeId > 0 );
+
+	// Put the visdef in the DataBase and in relation if it's not there
+	if ( this->InsertIfNew(visDef,visdefList_,presentableVisDefRelation_,nodeId) )
+		RelationInsertIfNew( presentableVisDefRelation_,nodeId,visDef.Id() );
+
+	return;
+}
+
+bool
+MvIconDataBase::UpdateVisDef ( const int        visdefId,
+			       const MvRequest& visdefRequest )
+{
+	require ( visdefId > 0 );
+
+	// VisDefs have a unique icon id
+	// find the one on the list
+	vdListCursor_ = visdefList_.begin();
+	while (vdListCursor_ != visdefList_.end())
+	{
+		if ( (*vdListCursor_).Id() == visdefId ) // update Request
+		{
+			(*vdListCursor_).SaveRequest(visdefRequest,true);
+			return true;
+		}
+		++vdListCursor_;
+	}
+
+	return false;
+}
+
+#if 0
+int
+MvIconDataBase::UpdateVisDefByName (const MvRequest& visdefRequest, const MvIcon& dataUnit)
+{
+	// Copy the visdef Request into a new VisDef icon
+	MvIcon visDef ( visdefRequest );
+
+	// Retrieve list of visdefs connect to the dataunit
+	MvIconList vdList;
+	if ( !RetrieveVisDefList(dataUnit,vdList) )
+		return 0; //No relation found
+
+	MvListCursor vdCursor = vdList.begin();
+	while (vdCursor != vdList.end())
+	{
+		// Are the icons the "same" ?
+		if (*vdCursor == visDef)
+		{
+			(*vdCursor).SaveRequest(visdefRequest,true);
+			return (*vdCursor).Id();
+		}
+
+		++vdCursor;
+	}
+
+	return 0;
+}
+
+bool
+MvIconDataBase::UpdateVisDefByName (const MvRequest& visdefRequest, const int nodeId, MvIconList& list, int option)
+{
+	require ( nodeId > 0 );
+
+	// Copy the visdef Request into a new VisDef icon
+	MvIcon visDef ( visdefRequest );
+
+	// Search visdef list
+	bool updated = false;
+	MvListCursor vdCursor = visdefList_.begin();
+	while (vdCursor != visdefList_.end())
+	{
+		// Are the icons the "same" ?
+//		if (!CheckIconByNameAndType(*vdCursor,visDef))
+		if (*vdCursor == visDef)
+		{
+			++vdCursor;
+			continue;
+		}
+
+		// Update visdef at Presentable level
+		if (option == DB_PRESENTABLE || option == DB_PRESENT_DU)
+		{
+			// Update if Presentable are the same
+			if (ExistsInRelation( presentableVisDefRelation_,nodeId,(*vdCursor).Id()))
+			{
+				(*vdCursor).SaveRequest(visdefRequest,true);
+				list.push_back((*vdCursor));
+				updated = true;
+				++vdCursor;
+				continue;  //visdef is unique
+			}
+		}
+
+		// Update visdef at DataUnit level
+		if (option == DB_DATAUNIT || option == DB_PRESENT_DU)
+		{
+			// Check if visdef are related with dataunit
+			MvIcon theDataUnit;
+			if (RetrieveDataUnitFromVisDef ((*vdCursor).Id(),theDataUnit))
+			{
+				// Check if DataUnit are drawn in this Presentable
+				if (ExistsInRelation( presentableDataUnitRelation_,nodeId,theDataUnit.Id()))
+				{
+				      (*vdCursor).SaveRequest(visdefRequest,true);
+				      list.push_back((*vdCursor));
+				      updated = true;
+				}
+			}
+		}
+		++vdCursor;
+	}
+
+	return updated;
+}
+#endif
+
+// -----------------------------------------------------------------
+// -- Methods for the Layers
+// -----------------------------------------------------------------
+
+bool
+MvIconDataBase::UpdateLayerTransparency( int id, int value )
+{
+#if 0
+    require ( id > 0 );
+
+    // Layers have a unique icon id, find the one on the list
+    MvListCursor layerListCursor = layerList_.begin();
+    while (layerListCursor != layerList_.end())
+    {
+        if ( (*layerListCursor).Id() == id )
+        {
+            MvRequest req = (*layerListCursor).Request();
+            req("TRANSPARENCY") = value;
+            (*layerListCursor).SaveRequest(req,true);
+            return true;
+        }
+        ++layerListCursor;
+    }
+#endif
+    return false;
+}
+
+bool
+MvIconDataBase::UpdateLayerVisibility( int id, bool onoff )
+{
+#if 0
+    require ( id > 0 );
+
+    // Layers have a unique icon id, find the one on the list
+    layerListCursor_ = layerList_.begin();
+    while (layerListCursor_ != layerList_.end())
+    {
+        if ( (*layerListCursor_).Id() == id )
+        {
+            MvRequest req = (*layerListCursor_).Request();
+            req("VISIBILITY") = onoff;
+            (*layerListCursor_).SaveRequest(req,true);
+            return true;
+        }
+        ++layerListCursor_;
+    }
+#endif
+    return false;
+}
+
+bool
+MvIconDataBase::UpdateLayerStackingOrder ( )
+{
+    return false;
+}
+
+// -----------------------------------------------------------------
+// -- Methods for the Presentable-PText Relation
+// -----------------------------------------------------------------
+void
+MvIconDataBase::PresentableTextRelation (const int presentableId, const int ptextId)
+{
+  	RelationInsertIfNew ( presentableTextRelation_,presentableId,ptextId );
+}
+
+bool
+MvIconDataBase::TextListByPresentableId ( const int presentableId, MvIconList& ptextList )
+{
+	// Instantiate auxiliary variables
+	MvIcon tmpPText;
+	bool success = false;
+
+	// Rewind the Presentable-PText relation
+	this->PresentableTextRelationRewind();
+
+	// Loop through the database and find all PTexts associated to the presentable
+	while ( this->NextTextByPresentableId ( presentableId, tmpPText ) )
+	{
+		success = true;
+		ptextList.push_back ( tmpPText );
+	}
+
+	return success;
+}
+
+bool
+MvIconDataBase::NextTextByPresentableId (const int presentableId, MvIcon& thePText)
+{
+	while (prptRelationCursor_ !=  presentableTextRelation_.end())
+	{
+              // Presentable have a unique icon id
+	      // find the one on the list
+	      if ( (*prptRelationCursor_).first == presentableId )
+	      {
+	              // Retrieve the PText Id
+		      const int ptextId = (*prptRelationCursor_).second;
+
+		      // Increment the relation Cursor (to point to next item)
+		      ++prptRelationCursor_;
+
+		      // Retrieve the visdef
+		      return RetrieveText(ptextId, thePText);
+	      }
+	      ++prptRelationCursor_;
+	}
+	return false;
+}
+
+bool
+MvIconDataBase::TextListByPresentableId ( const int presentableId, MvIconList&  textList, const string& type )
+{
+	// Instantiate auxiliary variables
+	MvIcon tmpText;
+	bool success = false;
+
+	// Rewind the Presentable-Text relation
+	this->PresentableTextRelationRewind();
+
+	// Loop through the database and find all Texts - type TITLE
+	// or ANNOTATION - associated to the presentable
+	while ( this->NextTextByPresentableId ( presentableId, tmpText ) )
+	{
+		MvRequest tmpReq = tmpText.Request();
+
+		// Temporary (and ugly) code. Update this code after Annotation and
+		// MText icons are defined properly
+		string verb = tmpReq.getVerb();
+		if ( (type == "TEXT" && (verb == "MTEXT" || verb == "PTEXT")) || 
+		     (type == "ANNOTATION" && verb == "ANNOTATION") )
+		{
+			success = true;
+			textList.push_back ( tmpText );
+		}
+	}
+
+	return success;
+}
+
+bool
+MvIconDataBase::RetrieveText(const int ptextId, MvIcon& thePText)
+{
+	require ( ptextId > 0 );
+
+	// VisDefs have a unique icon id
+	// find the one on the list
+	ptListCursor_ = textList_.begin();
+	while (ptListCursor_ != textList_.end())
+	{
+		if ( (*ptListCursor_).Id() == ptextId )
+		{
+			thePText = *ptListCursor_;
+			return true;
+		}
+		++ptListCursor_;
+	}
+	return false;
+}
+
+void
+MvIconDataBase::InsertText ( const MvRequest& textRequest, const int nodeId )
+{
+	require ( nodeId > 0 );
+
+	// Copy the ptext Request into a new PText
+	MvIcon text ( textRequest, true );
+
+	// Retrieve list of Ptexts by presentable ID
+	MvIconList textList;
+	TextListByPresentableId ( nodeId, textList );
+
+	// Scan list of icons
+	MvListCursor ptListCursor = textList.begin();
+	while (ptListCursor != textList.end())
+	{
+		MvIcon tmpIcon = *ptListCursor;
+		if (tmpIcon == text)
+		{
+			// The icon exists in list - Just update
+			(*ptListCursor).SaveRequest(textRequest,true);
+			return;
+		}
+		++ptListCursor;
+	}
+	// Put the new ptext icon in the DataBase
+	this->InsertText (text);
+
+	// Put the pair Presentable - PText in the DataBase
+	this->PresentableTextRelation ( nodeId, text.Id());
+}
+
+void
+MvIconDataBase::UpdateTitleText ( const MvRequest& textRequest, const int nodeId )
+{
+	// Retrieve list of Ptexts by presentable ID
+	MvIconList textList;
+	TextListByPresentableId ( nodeId, textList );
+
+	// Find the Icon on the list that is TITLE-TEXT
+	MvListCursor ptListCursor = textList.begin();
+	while (ptListCursor != textList.end())
+	{
+		MvIcon tmpIcon = *ptListCursor;
+		MvRequest tmpRequest = tmpIcon.Request();
+
+//		if ( tmpRequest ("TEXT_TYPE") == Cached( "TITLE" ) )
+		if ( tmpRequest.getVerb() != ANNOTATION )
+		{
+			Presentable* treeNode = Root::Instance().FindBranch ( nodeId );
+			treeNode->RemoveIcon ( tmpIcon );
+
+			// update Request and return
+			Cached iconName = textRequest ( "_NAME" );
+			(*ptListCursor).Rename(iconName);
+			(*ptListCursor).SaveRequest(textRequest,true);
+			return;
+		}
+		++ptListCursor;
+	}
+	// If there is no TITLE TEXT, insert as a new one
+	InsertText(textRequest, nodeId);
+}
+
+#if 0
+void
+MvIconDataBase::UpdateTitleText ( Cached textLine1, Cached textLine2, const int nodeId )
+{
+	// Retrieve list of Ptexts by presentable ID
+	MvIconList ptextList;
+	PTextListByPresentableId ( nodeId, ptextList );
+
+	// Find the Icon on the list that is not POSITIONAL TEXT_MODE, i.e. TITLE mode
+	MvListCursor ptListCursor = ptextList.begin();
+	while (ptListCursor != ptextList.end())
+	{
+		MvIcon tmpIcon = *ptListCursor;
+		MvRequest tmpRequest = tmpIcon.Request();
+
+		if ( ObjectList::IsAutomaticTitleText ( tmpRequest ) )
+		{
+			tmpRequest ("TEXT_LINE_1") = textLine1;				
+			tmpRequest ("TEXT_LINE_2") = textLine2;	
+			tmpRequest ("TEXT_LINE_COUNT") = 2;
+			tmpIcon.SaveRequest ( tmpRequest,true );
+			return;
+		}
+		++ptListCursor;
+	}
+}
+#endif
+
+void
+MvIconDataBase::RemoveTextFromList ( const int textId )
+{
+	require ( textId > 0 );
+
+	// PTexts have a unique icon id
+	// find the one on the list
+	ptListCursor_ = textList_.begin();
+
+	while ( ptListCursor_ != textList_.end() )
+	{
+		if ( (*ptListCursor_).Id() == textId )
+		{
+			textList_.erase ( ptListCursor_ );
+			break;
+		}
+		++ptListCursor_;
+	}
+}
+
+#if 0
+void
+MvIconDataBase::RemovePText ( MvIcon& thePText )
+{
+	// Remove PText from the Presentable-PText Relation
+
+	RemoveAllPTextsFromPresRel (thePText );
+
+	// Remove PText from List
+
+	RemovePTextFromList ( thePText.Id() );
+}
+#endif
+
+void
+MvIconDataBase::RemoveText ( const int presentableId  )
+{
+	MvRelationCursor prptCursor = presentableTextRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while ( prptCursor != presentableTextRelation_.end() )
+	{
+		if ( (*prptCursor).first == presentableId )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prptCursor;
+
+			// Increment, so we can continue our search
+			++prptCursor;
+
+			// delete PText from List
+			RemoveTextFromList ( (*foundCursor).second );
+
+			// delete the relation pair
+			presentableTextRelation_.erase ( foundCursor );
+		}
+		else
+			++prptCursor;
+	}
+}
+
+void
+MvIconDataBase::RemoveText ( )
+{
+	// Remove all PTexts
+	MvListCursor ptListCursor = textList_.begin();
+	MvListCursor foundCursor;
+
+	while ( ptListCursor != textList_.end() )
+	{
+		// Keep a copy of the found iterator
+		foundCursor = ptListCursor;
+
+		// Increment, so we can continue our search
+		++ptListCursor;
+
+		// Remove PText from the Presentable-PText Relation
+		RemoveAllTextsFromPresRel ( *foundCursor );
+
+		// delete the relation pair
+		textList_.erase ( foundCursor );
+	}
+}
+
+bool
+MvIconDataBase::RemoveAllTextsFromPresRel ( MvIcon& theText )
+{
+	bool found = false;
+
+	MvRelationCursor prptCursor = presentableTextRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while ( prptCursor != presentableTextRelation_.end() )
+	{
+		if ( (*prptCursor).second == theText.Id() )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prptCursor;
+
+			// Increment, so we can continue our search
+			++prptCursor;
+
+			// delete the relation pair
+			presentableTextRelation_.erase ( foundCursor );
+
+			// indicate that ptext is related to presentable
+			found = true;
+		}
+		else
+			++prptCursor;
+	}
+
+	return found;
+}
+
+#if 0
+void
+MvIconDataBase::UpdatePresentablePTextRelation ( const int newPresentableId, const int oldPresentableId )
+{
+	int              ptextId;
+	MvRelationCursor foundCursor;
+
+	// Rewind the Presentable-PText relation
+	this->PresentablePTextRelationRewind();
+
+	// Loop through the database and find all ptexts associated to
+	// the presentable
+	while (prptRelationCursor_ !=  presentablePTextRelation_.end())
+	{
+              // Presentable have a unique icon id 
+	      // find the one on the list
+	      if ( (*prptRelationCursor_).first == oldPresentableId )
+	      {
+		      foundCursor = prptRelationCursor_;
+		      ptextId    = (*prptRelationCursor_).second;
+
+		      // delete the ptext-presentable pair
+		      presentablePTextRelation_.erase ( foundCursor );
+
+	              // insert the new ptext-presentable pair
+		      RelationInsertIfNew(presentablePTextRelation_,newPresentableId,ptextId);
+	      }
+	      ++prptRelationCursor_;
+	}
+}
+#endif
+
+// -----------------------------------------------------------------
+// -- Methods for the Presentable-Legend Relation
+// -----------------------------------------------------------------
+
+void
+MvIconDataBase::RemoveLegendFromList ( const int legId )
+{
+	require ( legId > 0 );
+
+	// Legends have a unique icon id; find the one on the list
+	legListCursor_ = legendList_.begin();
+	while ( legListCursor_ != legendList_.end() )
+	{
+		if ( (*legListCursor_).Id() == legId )
+		{
+			legendList_.erase ( legListCursor_ );
+			break;
+		}
+		++legListCursor_;
+	}
+}
+
+bool
+MvIconDataBase::RemoveLegendFromPresRel ( MvIcon& theLeg )
+{
+	bool found = false;
+
+	MvRelationCursor prlegCursor = presentableLegendRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while ( prlegCursor != presentableLegendRelation_.end() )
+	{
+		if ( (*prlegCursor).second == theLeg.Id() )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prlegCursor;
+
+			// Increment, so we can continue our search
+			++prlegCursor;
+
+			// delete the relation pair
+			presentableLegendRelation_.erase ( foundCursor );
+
+			// indicate that legend was found
+			found = true;
+		}
+		else
+			++prlegCursor;
+	}
+
+	return found;
+}
+
+void
+MvIconDataBase::RemoveLegend ( const int presentableId  )
+{
+	MvRelationCursor prlegCursor = presentableLegendRelation_.begin();
+	MvRelationCursor foundCursor;
+
+	while ( prlegCursor != presentableLegendRelation_.end() )
+	{
+		if ( (*prlegCursor).first == presentableId )
+		{
+			// Keep a copy of the found iterator
+			foundCursor = prlegCursor;
+
+			// Increment, so we can continue our search
+			++prlegCursor;
+
+			// delete Legend from List
+			RemoveLegendFromList ( (*foundCursor).second );
+
+			// delete the relation pair
+			presentableLegendRelation_.erase ( foundCursor );
+
+			return;
+		}
+		else
+			++prlegCursor;
+	}
+
+	return;
+}
+
+void
+MvIconDataBase::RemoveLegend ( )
+{
+	// Remove all Legends
+	MvListCursor legListCursor = legendList_.begin();
+	MvListCursor foundCursor;
+
+	while ( legListCursor != legendList_.end() )
+	{
+		// Keep a copy of the found iterator
+		foundCursor = legListCursor;
+
+		// Increment, so we can continue our search
+		++legListCursor;
+
+		// Remove Legend from the Presentable-Legend Relation
+		RemoveLegendFromPresRel ( *foundCursor );
+
+		// delete the relation pair
+		legendList_.erase ( foundCursor );
+	}
+}
+
+void
+MvIconDataBase::RemoveAllData ( )
+{
+	// Remove all DataUnits
+	RemoveDataUnit ( );
+
+	// Remove all VisDefs
+	RemoveVisDef ( );
+
+	// Remove all PTexts
+	RemoveText ( );
+
+	// Remove all Legends
+	RemoveLegend ( );}
+
+void
+MvIconDataBase::RemovePresentable ( const int presentableId )
+{
+	// Remove all DataUnits by Presentable Id
+	RemoveDataUnit ( presentableId );
+
+	// Remove all VisDefs by Presentable Id
+	RemoveVisDef ( presentableId );
+
+	// Remove all PTexts by Presentable Id
+	RemoveText ( presentableId );
+
+	// Remove Legend by Presentable Id
+	RemoveLegend ( presentableId );
+}
+
+void
+MvIconDataBase::Print ()
+{
+	cout << "MvIconDataBase Contents" << endl;
+
+	cout << "DataUnitList :" << endl;
+	MvListCursor lCursor = dataunitList_.begin();
+	while (lCursor != dataunitList_.end())
+	{
+		cout << " " << (*lCursor).Id();
+		++lCursor;
+	}
+
+	cout << " " << endl;
+	cout << "VisDefList :" << endl;
+	lCursor = visdefList_.begin();
+	while (lCursor != visdefList_.end())
+	{
+		cout << " " << (*lCursor).Id();
+		++lCursor;
+	}
+
+	cout << " " << endl;
+	cout << "TextList :" << endl;
+	lCursor = textList_.begin();
+	while ( lCursor != textList_.end() )
+	{
+		cout << " " << (*lCursor).Id();
+		++lCursor;
+	}
+
+	cout << " " << endl;
+	cout << "LegendList :" << endl;
+	lCursor = legendList_.begin();
+	while ( lCursor != legendList_.end() )
+	{
+		cout << " " << (*lCursor).Id();
+		++lCursor;
+	}
+
+    cout << " " << endl;
+    cout << "LayerList :" << endl;
+    lCursor = layerList_.begin();
+    while ( lCursor != layerList_.end() )
+    {
+        cout << " " << (*lCursor).Id();
+        ++lCursor;
+    }
+
+	cout << " " << endl;
+	cout << "DataUnitVisDefRelation :" << endl;
+	MvRelationCursor rCursor = dataUnitVisDefRelation_.begin();
+	while ( rCursor != dataUnitVisDefRelation_.end() )
+	{
+		cout << " " << (*rCursor).first;
+		cout << " " << (*rCursor).second << endl;
+		++rCursor;
+	}
+
+	cout << " " << endl;
+	cout << "PresentableDataUnitRelation :" << endl;
+	rCursor = presentableDataUnitRelation_.begin();
+	while ( rCursor != presentableDataUnitRelation_.end() )
+	{
+		cout << " " << (*rCursor).first;
+		cout << " " << (*rCursor).second << endl;
+		++rCursor;
+	}
+
+	cout << " " << endl;
+	cout << "PresentableVisDefRelation :" << endl;
+	rCursor = presentableVisDefRelation_.begin();
+	while ( rCursor != presentableVisDefRelation_.end() )
+	{
+		cout << " " << (*rCursor).first;
+		cout << " " << (*rCursor).second << endl;
+		++rCursor;
+	}
+
+	cout << " " << endl;
+	cout << "PresentableTextRelation :" << endl;
+	rCursor = presentableTextRelation_.begin();
+	while ( rCursor != presentableTextRelation_.end() )
+	{
+		cout << " " << (*rCursor).first;
+		cout << " " << (*rCursor).second << endl;
+		++rCursor;
+	}
+
+	cout << " " << endl;
+	cout << "PresentableLegendRelation :" << endl;
+	rCursor = presentableLegendRelation_.begin();
+	while ( rCursor != presentableLegendRelation_.end() )
+	{
+		cout << " " << (*rCursor).first;
+		cout << " " << (*rCursor).second << endl;
+		++rCursor;
+	}
+
+    cout << " " << endl;
+    cout << "IconLayerRelation :" << endl;
+    rCursor = iconLayerRelation_.begin();
+    while ( rCursor != iconLayerRelation_.end() )
+    {
+        cout << " " << (*rCursor).first;
+        cout << " " << (*rCursor).second << endl;
+        ++rCursor;
+    }
+}
+
+#if 0
+void
+MvIconDataBase::UpdatePresentable (const int newPresentableId, const int oldPresentableId )
+{
+	// Update all DataUnits related to a  Presentable Id
+	UpdatePresentableDataUnitRelation ( newPresentableId, oldPresentableId );
+
+	// Update all VisDefs relate to a Presentable Id
+	UpdatePresentableVisDefRelation ( newPresentableId, oldPresentableId );
+
+	// Update all PTexts related to a Presentable Id
+	UpdatePresentablePTextRelation ( newPresentableId, oldPresentableId );
+}
+#endif
+
+bool MvIconDataBase::InsertIfNew(MvIcon& icon,MvIconList &list,
+				 MvRelation& relation,
+				 int iconId)
+{
+	MvRequest newRequest = icon.Request();
+
+	// It is important that the icon Id is added to the request:
+	// newRequest("_ID") = xx . 
+	// This will be used later when the request is passed to Magics
+
+	// If no name, we can't check it's existence. Add it and return true
+	const char *name = newRequest("_NAME");
+	if ( ! name )
+	{
+		CreateLink (newRequest);
+		icon.SaveRequest(newRequest,true);
+		list.push_back(icon);
+		return true;
+	}
+
+	// Loop through the list to find a match
+	bool found = false;
+	MvListCursor ii = list.begin();
+	for ( ; ii != list.end(); ii++ )
+	{
+		MvIcon currentIcon = *ii;
+		MvRequest currentRequest = currentIcon.Request();
+		const char *currentName = currentRequest("_NAME");
+
+		// Found a match on name. As the data units are
+		// propagated downwards there may be more with 
+		// same name. Check that this is the one beloning
+		// to correct icon.
+		if ( currentName && ! strcmp(currentName, name) )
+		{
+			if ( iconId == 0 || ( iconId > 0  && ExistsInRelation(relation,iconId,currentIcon.Id() ) ) )
+			{
+				CreateLink (newRequest);
+				currentIcon.SaveRequest(newRequest,true);
+				icon = currentIcon;
+				found = true;
+				break;
+			}
+		}
+	}
+
+	if ( ! found )
+	{
+		CreateLink (newRequest);
+		icon.SaveRequest(newRequest,true);
+		list.push_back(icon);
+		return true;
+	}
+
+	return false;
+}
+
+void
+MvIconDataBase::RelationInsertIfNew(MvRelation &relation,
+				    const int firstId, const int secondId)
+{
+  if ( firstId == 0 || secondId == 0 )
+    return;
+
+  if ( ! ExistsInRelation(relation,firstId,secondId ) )
+	relation.insert ( MvEntryPair (firstId, secondId));
+}
+
+bool MvIconDataBase::ExistsInRelation ( MvRelation &relation, const int firstId, const int secondId )
+{
+  // Check if this key and value is already there
+  MvRelationCursor lower_ii = relation.lower_bound(firstId);
+  MvRelationCursor upper_ii = relation.upper_bound(firstId);
+
+  bool found = false;
+  while ( lower_ii != relation.end() && lower_ii != upper_ii )
+    {
+      if ( (*lower_ii).second == secondId )
+	{
+	  found = true;
+	  break;
+	}
+      lower_ii++;
+    }
+
+  return found;
+}
+
+void MvIconDataBase::CreateLink (MvRequest& req)
+{
+      // If there is no path, do no create a link
+      const char* mpath = (const char*)(req("PATH"));
+      if ( mpath == 0) return;
+
+      // Check if the link has to be created
+      const char* createLink = (const char*)req("_CREATE_LINK");
+      if ( createLink && strcmp(createLink,"NO") == 0 )
+	      return;
+
+      string spath = (const char*)mpath;
+      string slink = tempnam(getenv("METVIEW_TMPDIR"),"link");
+      if ( link(spath.c_str(),slink.c_str()) != 0 )
+      {
+	    marslog( LOG_WARN
+		   , (char*)"Unable to create hard link to %s, try soft link...", spath.c_str());
+
+	    if ( symlink(spath.c_str(),slink.c_str()) != 0 ) //-- create a soft link
+	    {
+		  marslog(LOG_WARN,(char*)"MvIconDataBase::CreateLink: unable to create a link");
+
+		  return; //-- nothing to do => bail out!
+	    }
+
+	    //-- make sure that soft link is not a dangling ptr!
+	    if( !FileCanBeOpened( slink.c_str(), "r" ) )
+	    {
+			marslog(LOG_WARN,(char*)"Created soft link is dangling: %s", slink.c_str());
+
+			return; //-- nothing to do => bail out!
+	    }
+      }
+
+      req("PATH") = slink.c_str();
+      linkList_.push_back(slink.c_str());
+
+	 return;
+}
+
+void MvIconDataBase::DeleteLink ()
+{
+	list <string>::iterator listIter = linkList_.begin();
+
+	while ( listIter != linkList_.end() )
+	{
+	      string mpath = (*listIter);
+	      if ( unlink(mpath.c_str()) )
+		     cout << "MvIconDataBase::DeleteLink : Error : Try to unlink a non existing file : " << mpath << endl;
+
+	      ++listIter;
+	}
+}
+
+// -----------------------------------------------------------------
+// -- General methods
+// -----------------------------------------------------------------
+
+MvRelation* MvIconDataBase::IconRelation ( const int iconType )
+{
+    if ( iconType == DATAUNIT_VISDEF_REL )
+        return &dataUnitVisDefRelation_;
+    else if ( iconType == PRES_VISDEF_REL )
+        return &presentableVisDefRelation_;
+    else if ( iconType == PRES_DATAUNIT_REL )
+        return &presentableDataUnitRelation_;
+    else if ( iconType == PRES_TEXT_REL )
+        return &presentableTextRelation_;
+    else if ( iconType == PRES_LEGEND_REL )
+        return &presentableLegendRelation_;
+    else if ( iconType == ICON_LAYER_REL )
+        return &iconLayerRelation_;
+    else
+    {
+        marslog(LOG_WARN,(char*)"Wrong type value for Icon Relation: %d", iconType);
+        return NULL;
+    }
+}
+
+MvIconList* MvIconDataBase::IconList ( const int iconType )
+{
+    if ( iconType == DATAUNIT )
+        return &dataunitList_;
+    else if ( iconType == VISDEF )
+        return &visdefList_;
+    else if ( iconType == TEXT )
+        return &textList_;
+    else if ( iconType == LEGEND )
+        return &legendList_;
+    else if ( iconType == LAYER )
+        return &layerList_;
+    else
+    {
+        marslog(LOG_WARN,(char*)"Wrong type value for Icon List: %d", iconType);
+        return NULL;
+    }
+}
+
+void
+MvIconDataBase::InsertIcon ( const int iconType, const int iconRelId, const MvIcon& icon )
+{
+    require ( iconRelId > 0 );
+
+    // Check if icon already exists
+    MvIcon iconAux;
+    if ( this->RetrieveIcon ( iconType,iconRelId,iconAux ) )
+    {
+        // The icon exists - Just update it
+        iconAux.SaveRequest(icon.Request(),true);
+        return;
+    }
+
+    // Copy the icon request into a new icon
+//    MvIcon icon ( iconRequest,true );
+
+    // Put the new icon in the correspondent List
+    this->InsertIcon (iconType,icon);
+
+    // Put the pair IconRel - Icon in the Relation
+    this->InsertIconRelation ( iconType, iconRelId, icon.Id());
+
+    return;
+}
+
+void
+MvIconDataBase::InsertIcon ( const int iconType, const MvIcon& icon )
+{
+    MvIconList* list = this->IconList( iconType );
+    list->push_back(icon);
+}
+
+void
+MvIconDataBase::InsertIconRelation ( const int iconType, const int iconRelId, const int iconId)
+{
+    MvRelation* rel = this->IconRelation ( iconType );
+    this->RelationInsertIfNew ( *rel,iconRelId,iconId );
+}
+
+bool
+MvIconDataBase::RetrieveIcon( int iconType, int relId, MvIcon& theIcon )
+{
+    // Get the correspondent icon relation
+    MvRelation* iconRelation = this->IconRelation(iconType);
+
+    // Loop through the database and find the unique Layer associated to the Icon
+    MvRelationCursor relCursor = iconRelation->begin();
+    while (relCursor !=  iconRelation->end())
+    {
+        // Icon has a unique id; find the one on the list
+        if ( (*relCursor).first == relId )
+        {
+            // Retrieve the icon Id
+            const int iconId = (*relCursor).second;
+
+            // Retrieve the icon
+            return RetrieveIconFromList(iconType,iconId,theIcon);
+        }
+        ++relCursor;
+    }
+
+    return false;
+}
+
+bool
+MvIconDataBase::RetrieveIconFromList( const int iconType, const int iconId, MvIcon& theIcon)
+{
+    require ( iconId > 0 );
+
+    // Get the correspondent icon list
+    MvIconList* iconList = this->IconList(iconType);
+
+    // Icons have a unique id; find the one on the list
+    MvListCursor listCursor = iconList->begin();
+    while (listCursor != iconList->end())
+    {
+        if ( (*listCursor).Id() == iconId )
+        {
+            theIcon = *listCursor;
+            return true;
+        }
+        ++listCursor;
+    }
+    return false;
+}
diff --git a/src/uPlot/MvIconDataBase.h b/src/uPlot/MvIconDataBase.h
new file mode 100644
index 0000000..38ba48e
--- /dev/null
+++ b/src/uPlot/MvIconDataBase.h
@@ -0,0 +1,470 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File MvIconDataBase
+// Gilberto Camara - ECMWF Jun 97
+//
+// .NAME:	
+//  MvIconDataBase
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Implements a data base of Data Units and VisDefs
+//  and a m:n relation between a DataUnit and a VisDef
+//
+//
+// .CLIENTS:
+//  Presentable
+//
+//
+// .RESPONSABILITIES:
+//  - Store the dataunits and visdef, 
+//  - Retrieve them based on a key (Id) or an icon name
+//  - Given a DataUnit, retrieve the corresponding VisDef
+//
+//  
+// .COLLABORATORS:
+//  MvIcon, STL classes (list, multimap)
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef MvIconDataBase_H
+#define MvIconDataBase_H
+
+#include <inc_iostream.h>
+#include "MvIcon.h"
+
+// General typedefs used in MvIconDataBase
+// which need to be publicly acessible
+#define DB_PRESENTABLE 1
+#define DB_DATAUNIT    2
+#define DB_PRESENT_DU  3
+
+// Relation types
+enum { PRES_DATAUNIT_REL, PRES_VISDEF_REL, PRES_TEXT_REL, PRES_LEGEND_REL, ICON_LAYER_REL, DATAUNIT_VISDEF_REL };
+
+// Icon list types
+enum { DATAUNIT, VISDEF, TEXT, LEGEND, LAYER };
+
+//  Definitions for the Icon List
+typedef list <MvIcon> MvIconList;
+
+//  Definitions for the Link List
+typedef list <string> MvLinkList;
+
+// Definitions of the iterators that will loop
+// through the lists
+typedef MvIconList::iterator MvListCursor;
+
+// Definition for a relation to store m:n relationships
+typedef multimap <int, int > MvRelation;
+
+// Definition for the pairs of entries in the relation 
+typedef MvRelation::value_type MvEntryPair;
+
+// Definition for the iterator that loops through the
+// relation pairs
+typedef MvRelation::iterator MvRelationCursor;
+
+class MvIconDataBase {
+
+public:
+
+	// Contructors
+	MvIconDataBase();
+        MvIconDataBase(const MvIconDataBase&);
+
+	// Destructor
+       ~MvIconDataBase();
+
+//---------------------------------------------
+// --- Methods for the Data Unit List
+//---------------------------------------------
+
+// Inserts a new DataUnit into the DataUnit List
+	bool InsertDataUnit ( MvIcon& newDataUnit, int presentableId = 0);
+
+	// Retrieves a DataUnit, given its unique Id
+	bool RetrieveDataUnit(const int dataunitId, MvIcon& theDataUnit);
+
+	// Updates the Data request, given its unique Id
+	bool UpdateDataUnit (const int dataunitId, const MvRequest& duRequest);
+
+	// Removes a DataUnit, given its unique Id
+	void RemoveDataUnitFromList (const int dataunitId);
+
+//	void DataUnitRewind();
+	// Rewinds the cursor, putting it at the beginning of the list
+
+//	bool NextDataUnit ( MvIcon& theDataUnit );
+	// Retrieves current data unit (if not at end) and sets pointer to the next data
+
+//	bool NextDataUnitByClass (const Cached& iconClass, MvIcon& theDataUnit);
+	// Retrieves the next data unit associated with a class 
+
+//---------------------------------------------
+// --- Methods for the VisDef List
+//---------------------------------------------
+
+	// Inserts a new VisDef into the VisDef List
+	bool InsertVisDef   ( MvIcon& newVisDef);
+
+	// Retrieves a VisDef, given its unique Id
+	bool RetrieveVisDef (const int visdefId, MvIcon& theVisDef);
+
+	// Updates the VisDef's Request, given its unique Id
+	bool UpdateVisDef (const int visdefId, const MvRequest& visdefRequest);
+
+//	bool UpdateVisDefByName (const MvRequest& visdefRequest, const int nodeId, MvIconList& list, const int option);
+	// Updates visdefs given its name. Returns the VisDefs updated.
+	// The parameter <option> has the following values:
+	// DB_PRESENTABLE: search VisDef at Presentable level
+	// DB_DATAUNIT   : search VisDef at Data Unit level
+	// DB_PRESENT_DU : search VisDef at both cases
+
+	// Removes a VisDef, given its unique Id
+	void RemoveVisDefFromList ( const int visdefId );
+
+//	void VisDefRewind();
+	// Rewind the cursor
+
+//---------------------------------------------
+// --- Methods for the PText List
+//---------------------------------------------
+
+	// Inserts a ptext
+	void InsertText (const MvIcon& newPText)
+		{ textList_.push_back(newPText); }
+
+	void InsertText (const MvRequest& ptextReq, const int nodeId);
+
+	// Retrieves a PText, given its unique Id
+	bool RetrieveText(const int ptextId, MvIcon& thePText);
+
+	// Updates the unique PText that contains the title for the presentable
+	void UpdateTitleText (const MvRequest& ptextRequest, const int nodeId);
+
+//	void UpdateTitleText ( Cached textLine1, Cached textLine2, const int nodeId );
+	// Updates the unique PText that contains the user defined title for the presentable
+
+	// Removes a PText, given its unique Id
+	void RemoveTextFromList ( const int ptextId );
+
+//	void RemovePText ( MvIcon& thePText );
+	// Removes a Ptext from the Data Base
+
+	// Remove all PTexts, associated with a specific
+	// presentable Id, from the database
+	void RemoveText ( const int presentableId );
+
+	// Removes all PTexts from the Data Base
+	void RemoveText ( );
+
+	// Rewind the cursor
+	void TextRewind()
+		{ ptListCursor_ = textList_.begin(); }
+
+
+//---------------------------------------------
+// --- Methods for the Legend list
+//---------------------------------------------
+
+	void PresentableLegendRelation (const int presId, const int legId);
+
+	void InsertLegend ( const MvIcon& newLeg )
+		{ legendList_.push_back(newLeg); }
+
+	void RemoveLegendFromList ( const int legId );
+	bool RemoveLegendFromPresRel ( MvIcon& theLeg );
+	void RemoveLegend ( const int presentableId  );
+	void RemoveLegend ( );
+
+
+//---------------------------------------------
+// --- Methods for the Layer list
+//---------------------------------------------
+
+    bool UpdateLayerTransparency  ( int, int );
+    bool UpdateLayerVisibility    ( int, bool );
+    bool UpdateLayerStackingOrder ( );
+
+
+//---------------------------------------------
+// --- Methods for the DataUnit-VisDef Relation
+//---------------------------------------------
+
+	// Inserts a new pair in the relation
+	void DataUnitVisDefRelation (const int dataunitId, const int visdefId);
+
+	// Rewinds the cursor
+	void DataUnitVisDefRelationRewind()
+	     { duvdRelationCursor_ = dataUnitVisDefRelation_.begin(); }
+
+	// Retrieves the next VisDef, from the current cursor position,
+	// given a Data Unit ID
+	bool NextVisDefByDataUnitId (const int dataunitId, MvIcon& theVisDef);
+
+//       bool DataUnitHasVisDef(const int dataUnitId,const int visdefId);
+       // Find out if a dataunit has visdef with the given id.
+
+	// Retrieve all visdefs associated a data unit
+	bool RetrieveVisDefList ( const MvIcon& dataUnit, MvIconList& visdefList );
+
+//	bool RetrieveDataUnitFromVisDef ( const int visdefId, MvIcon& theDataUnit);
+	// Retrieve data unit given a visdef Id
+
+//	void RetrieveVisDefList ( MvIconList& dataUnitList, MvIconList& visdefList );
+	// Retrieve all visdefs associated to a data unit list
+
+	// Remove all visdefs associated to a data unit
+	bool RemoveAllVisDefsByDataUnit( MvIcon& dataUnit, const MvRequest* vd = 0 );
+
+	// Remove all visdefs associated to a data unit list
+	// according to its class (if defined)
+	void RemoveAllVisDefsByDataUnitList ( MvIconList& dataUnitList, const MvRequest* vd = 0 );
+
+	// Remove all visdefs from the data base of Data Units and 
+	// VisDefs, given its Id
+	bool RemoveAllVisDefsByVisDefId ( MvIcon& theVisDef );
+
+	// Remove Data Unit from the database
+	void RemoveDataUnit ( MvIcon& theDataUnit );
+
+	// Remove all Data Units, associated with a specific
+	// presentable Id, from the database
+	void RemoveDataUnit ( const int presentableId );
+
+	// Remove all Data Units from the database
+	void RemoveDataUnit ( );
+
+//	void RemoveVisDef ( MvIcon& theVisDef );
+	// Remove Visdef from the database
+
+	// Remove all VisDefs, associated with a specific
+	// presentable Id and for a given class (if presente),
+	// from the database
+	void RemoveVisDef ( const int presentableId, const MvRequest* vd=0 );
+
+	// Remove all VisDefs  from the database
+	void RemoveVisDef ( );
+
+//	int UpdateVisDefByName (const MvRequest& visdefRequest, const MvIcon& duIcon);
+	// Updates visdef given its name. Returns the Id of the VisDef updated.
+
+
+//--------------------------------------------------
+// --- Methods for the Presentable-VisDef Relation
+//--------------------------------------------------
+
+//	void PresentableVisDefRelation (const int presentableId, const int visdefId);
+	// Inserts a new pair in the relation
+
+	// Rewinds the cursor
+	void PresentableVisDefRelationRewind()
+	     { prvdRelationCursor_ = presentableVisDefRelation_.begin(); }
+
+	// Retrieves the next VisDef, from the current cursor position,
+	// given a Presentable Id
+	bool NextVisDefByPresentableId (const int presentableId, MvIcon& theVisDef);
+
+	// Retrieve the visdef list associated to a data unit and a presentable
+	bool VisDefListByDataUnitAndPresentableId ( const int   presentableId, const char* dataUnitName, MvIconList& visdefList );
+
+	// Retrieve the visdef list associated to a presentable
+	bool VisDefListByPresentableId ( const int presentableId, MvIconList& visdefList );
+
+//	void UpdatePresentableVisDefRelation ( const int newPresentableId, const int oldPresentableId );
+	// Update Presentable-VisDef Relation with a new Presentable Id
+
+	// Remove VisDefs associated to a presentable, given a
+	// certain class (if selected)
+	void RemoveVisDefFromPresRel ( const int presentableId, const MvRequest* vd = 0 );
+
+    
+//--------------------------------------------------
+// --- Methods for the Presentable-DataUnit Relation
+//--------------------------------------------------
+
+	// Inserts a new pair in the relation
+	void PresentableDataUnitRelation (const int presentableId, const int dataUnitId);
+
+	// Rewinds the cursor
+	void PresentableDataUnitRelationRewind()
+		{ prduRelationCursor_ = presentableDataUnitRelation_.begin(); }
+
+	// Retrieves the next DataUnit, from the current cursor position,
+	// given a Presentable Id
+	bool NextDataUnitByPresentableId (const int presentableId, MvIcon& theVisDef);
+
+	// Retrieve the dataunit list associated to a presentable
+	bool DataUnitListByPresentableId ( const int   presentableId,
+					   MvIconList& dataUnitList );
+
+	// Verify if there is any DataUnit related to the Presentable Id
+	bool PresentableHasData ( const int presentableId );
+
+//	void UpdatePresentableDataUnitRelation ( const int newPresentableId, const int oldPresentableId );
+	// Update Presentable-DataUnit Relation with a new Presentable Id
+
+
+//--------------------------------------------------------
+// --- Methods which apply to both the Presentable-VisDef
+//     and Presentable-DataUnit Relations
+//--------------------------------------------------------
+
+	// Removes all visdefs, given an Id
+	bool RemoveAllVisDefsFromPresRel ( MvIcon& theVisDef );
+
+	// Removes all data units, given an Id
+	bool RemoveAllDataUnitsFromPresRel ( MvIcon& theDataUnit );
+
+	// Removes Presentable-DataUnit Relation given the identification
+	bool RemoveDataUnitFromPresRel ( MvIcon& theDataUnit, int presentableId);
+
+//        void UpdatePresentable ( const int newPresentableId, const int oldPresentableId );
+
+	//  Removes all entries which are related to the presentable
+	void RemovePresentable(const int PresentableId);
+
+//--------------------------------------------------
+// --- Method for dealing with dataRequests
+//--------------------------------------------------
+
+	// Includes dataunits from a request
+    MvIcon InsertDataUnit ( const MvRequest& inRequest, int presentableId = 0 );
+	
+	// Inserts a visdef
+	MvIcon InsertVisDef ( const MvRequest& visdefRequest, const int nodeId, MvIcon& dataUnit );
+
+	void InsertVisDef ( MvIcon& visdef, const int nodeId );
+
+//--------------------------------------------------
+// --- Methods for the Presentable-PText Relation
+//--------------------------------------------------
+
+	// Inserts a new pair in the relation
+	void PresentableTextRelation (const int presentableId, const int ptextId);
+
+	// Rewinds the cursor
+	void PresentableTextRelationRewind()
+	     { prptRelationCursor_ = presentableTextRelation_.begin(); }
+
+	// Retrieves the next PText from the current cursor position,
+	// given a Presentable Id
+	bool NextTextByPresentableId (const int presentableId, MvIcon& thePText);
+
+	// Retrieves the Text list associated to a presentable
+	bool TextListByPresentableId ( const int, MvIconList& );
+
+	// Retrieves the PText list - according to the type - 
+	// associated to a presentable
+	bool TextListByPresentableId ( const int presentableId, MvIconList&  textList, const string& type );
+
+	// Removes all ptexts, given an Id
+	bool RemoveAllTextsFromPresRel ( MvIcon& thePText );
+
+	// Update Presentable-PText Relation with a new Presentable Id
+//	void UpdatePresentablePTextRelation ( const int newPresentableId, const int oldPresentableId );
+
+//--------------------------------------------------
+// --- General methods
+//--------------------------------------------------
+
+	// Removes all data (DataUnit,VisDef,PText)
+	void RemoveAllData ( );
+
+	// Removes all data (DataUnit,VisDef,PText) by presentable ID
+//	void RemovePresentable ( const int presentableId );
+
+    // Prints the Data Base contents
+    void Print ( );
+
+//--------------------------------------------------
+// --- General methods to retrieve and insert info
+//--------------------------------------------------
+
+    bool RetrieveIcon ( const int, const int, MvIcon& );
+    bool RetrieveIconFromList ( const int, const int, MvIcon& );
+    void InsertIcon ( const int, const int, const MvIcon& );
+    void InsertIcon ( const int, const MvIcon& );
+    void InsertIconRelation ( const int, const int, const int);
+
+
+private:
+
+	// No copy allowed
+	MvIconDataBase& operator=(const MvIconDataBase&);
+
+	// Utility functions for adding icons only if they do not already exist
+	bool InsertIfNew(MvIcon &, MvIconList&, MvRelation& relation,
+			 int relationId = 0);
+    void RelationInsertIfNew (MvRelation &relation, const int firstId, const int secondId);
+    bool ExistsInRelation (MvRelation &relation, const int firstId, const int secondId);
+
+    // All the data links are created by CreateLink routine and they
+    // will be removed by calling DeleteLink in the Destructor
+    void CreateLink ( MvRequest& );
+    void DeleteLink ( );
+
+    // Utility functions for handling Relations and Lists
+    MvRelation* IconRelation( const int );
+    MvIconList* IconList    ( const int );
+
+	// Members
+	// Definitions for the objects lists
+    MvIconList   dataunitList_,
+                 visdefList_,
+                 textList_,
+                 legendList_,
+                 layerList_;
+
+    MvListCursor duListCursor_,
+                 vdListCursor_,
+                 ptListCursor_,
+                 legListCursor_;
+
+    // Definitions for the DataUnit - VisDef pairs
+    // Each DataUnit may be related to one or more VisDefs
+	MvRelation       dataUnitVisDefRelation_;
+	MvRelationCursor duvdRelationCursor_;
+	
+	// Definition for the Presentable - VisDef Relation
+	MvRelation       presentableVisDefRelation_;
+	MvRelationCursor prvdRelationCursor_;	
+
+	// Definition for the Presentable - DataUnit Relation
+	MvRelation       presentableDataUnitRelation_;
+	MvRelationCursor prduRelationCursor_;
+
+	// Definition for the Presentable - PText Relation
+	MvRelation       presentableTextRelation_;
+	MvRelationCursor prptRelationCursor_;
+
+	// Definition for the Presentable - Legend Relation
+	MvRelation       presentableLegendRelation_;
+	MvRelationCursor prlegRelationCursor_;
+
+    // Definition for the Layer - Icon Relation
+    MvRelation       iconLayerRelation_;
+
+	// List of dataunit links
+	MvLinkList linkList_;
+};
+
+#endif
diff --git a/src/uPlot/MvLayer.cc b/src/uPlot/MvLayer.cc
new file mode 100644
index 0000000..36453c7
--- /dev/null
+++ b/src/uPlot/MvLayer.cc
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvLayer.h"
+#include "MvRequest.h"
+
+MvLayer::MvLayer () : id_ (0),
+                      transparency_ (0),
+                      visibility_ (0),
+                      order_ (-1),
+                      name_ ("")
+{
+    //empty
+}
+
+MvLayer::MvLayer ( const MvRequest& layerReq )
+{
+   id_           = (int)layerReq("_ID") ? (int)layerReq("_ID") : 0;
+   transparency_ = (int)layerReq("TRANSPARENCY") ? (int)layerReq("TRANSPARENCY") : 0;
+   visibility_   = (int)layerReq("VISIBILITY") ? (int)layerReq("VISIBILITY") : 0;
+   order_        = (int)layerReq("STACKING_ORDER") ? (int)layerReq("STACKING_ORDER") : -1;
+   name_         = (const char*)layerReq("_NAME") ? (const char*)layerReq("_NAME") : "";
+
+   if ( (const char*)layerReq("ICONS_ID") )
+   {
+       size_t count = layerReq.countValues("ICONS_ID");
+       icons_.reserve(count);
+       for (unsigned int i = 0; i < count; i++)
+           icons_[i] = layerReq("ICONS_ID",i);
+   }
+}
+
+MvRequest
+MvLayer::Request()
+{
+    MvRequest req("LAYER");
+    req("TRANSPARENCY") = transparency_;
+    req("VISIBILITY") = visibility_;
+    req("STACKING_ORDER") = order_;
+    req("_NAME") = name_.c_str();
+    req("_ID") = id_;
+
+    return req;
+}
diff --git a/src/uPlot/MvLayer.h b/src/uPlot/MvLayer.h
new file mode 100644
index 0000000..1b380eb
--- /dev/null
+++ b/src/uPlot/MvLayer.h
@@ -0,0 +1,79 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  MvLayer
+//
+// .AUTHOR:
+//  Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class that stores the layer information, such as transparency
+//  and visibility.
+//
+// .CLIENTS:
+//
+// .RESPONSABILITIES:
+//  - Store and provide the layer information.
+//
+// .COLLABORATORS:
+//
+// .BASE CLASS:
+//
+// .DERIVED CLASSES:
+//
+// .REFERENCES:
+//
+#ifndef MvLayer_H
+#define MvLayer_H
+
+#include <string>
+#include <vector>
+
+class MvRequest;
+
+using namespace std;
+
+class MvLayer {
+public:
+
+    // Constructors
+    MvLayer ();
+	MvLayer ( const MvRequest& );
+
+    // Destructor
+	~MvLayer() { };
+
+    // Members get information
+    int Id() { return id_; }
+    int Transparency() { return transparency_; }
+    int Visibility() { return visibility_; }
+    int StackingOrder() { return order_; }
+    string Name() { return name_; }
+    vector<int> IconsId() { return icons_; }
+    MvRequest Request();
+
+    // Members set information
+    void Id( int id ) { id_ = id; }
+    void Visibility( int n ) { visibility_ = n; }
+    void StackingOrder( int n ) { order_ = n; }
+    void Name( string name ) { name_ = name; }
+    void IconsId(vector<int> icons) { icons_ = icons; }
+
+private:
+
+	int id_;              // layer Id
+	int transparency_;    // 0 - 100
+    int visibility_;      // 0/1
+    int order_;           // stacking order: 0, 1, ...
+    string name_;         // layer name
+    vector<int> icons_;   // list of icons Id
+};
+#endif
diff --git a/src/uPlot/MvMain.cc b/src/uPlot/MvMain.cc
new file mode 100644
index 0000000..798c152
--- /dev/null
+++ b/src/uPlot/MvMain.cc
@@ -0,0 +1,161 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "uPlot.h"
+#include "MvRequest.h"
+#include "Root.h"
+#include "MvDebugPrintControl.h"
+#include "PlotModInteractive.h"
+#include "uPlotApp.h"
+#include "MagPlusInteractiveService.h"
+#include "SuperPage.h"
+#include <mars.h>
+
+using namespace std;
+
+bool SetUplotEnv (int argc, char **argv, MvRequest &req, bool &reqExists)
+{
+	// Create Root instance
+	Root::Create();
+
+	// Initialize Mars communication
+	marsinit(&argc,argv,0,0,0);
+	mvSetMarslogLevel();
+
+	// Read the input request, if available
+	reqExists = false;
+	if (argc > 1)
+	{
+		//Check if the input request exists
+		if ( access(argv[1],F_OK) == 0 )
+		{
+			//Read the initial input request saved by uPlotManager
+			req.read(argv[1]);
+			req.print();
+
+			// Skip UPLOT_MANAGER request
+			if ( strcmp(req.getVerb(),"UPLOT_MANAGER") == 0)
+				req.advance();
+
+			reqExists = true;
+		}
+	}
+
+//DOES IT NEED TO TEST FOR INTERACTIVE MODE?????
+// CHECK THIS CODE LATER WHEN THE EXPORT BUTTON IS ACTIVATED
+#if 0
+	// Batch or Interactive mode
+	const char *metviewMode = getenv("METVIEW_MODE");
+	if ( metviewMode && strcmp(metviewMode,"batch") == 0 )
+	{
+		// Initialize uPlot in batch mode
+		PlotMod::Instance().SetBatchMode();
+	}
+	else
+	{
+		// Initialize uPlot in interactive mode
+		PlotMod::Instance().SetInteractiveMode();
+
+		// Indicate if a window needs to be created
+		bool dispWindow = true;
+		if (reqExists)
+		{
+			// Check if a Display Window needs to be created
+			MvRequest reqaux = req.justOneRequest();
+			dispWindow = PlotMod::Instance().CheckSetWindowOutputFormat(reqaux);
+		}
+		PlotMod::Instance().SetWindowMode(dispWindow);
+	}
+
+	return PlotMod::Instance().IsWindow();
+#endif
+	return true;
+}
+
+string GetProcessName ()
+{
+	// Build a process name according to the process id
+	char name[64];
+	sprintf(name,"uPlot%ld",(long int)getpid());
+
+	return string(name);
+}
+
+int main(int argc, char **argv)
+{
+	// Get process name
+	string name = GetProcessName();
+
+	MvRequest req;
+	bool reqExists;
+
+	// Setup uPlot environment
+	if ( SetUplotEnv(argc,argv,req,reqExists) )
+	{
+		//Initialise resorces from a static library (libMvQtGui)
+		Q_INIT_RESOURCE(window);
+		Q_INIT_RESOURCE(keyDialog);
+
+		// Start uPlot interactively with Qt facilities
+		uPlotApp app(argc, argv, name.c_str());
+		MagPlusInteractiveService* magplus = new MagPlusInteractiveService();
+		MagPlusService::Instance(magplus);
+				
+		PlotModInteractive* pm = new PlotModInteractive();
+		PlotMod::Instance(pm);
+
+		// Instantiate uPlot Display Window
+		uPlotBase *pw = new uPlot;
+		magplus->setPlotApplication(pw);
+		SuperPage::setPlotApplication(pw);		
+		pm->setPlotApplication(pw);
+		
+		//PlotModInteractive* pm = new PlotModInteractive();
+		//PlotMod::Instance(pm);
+
+		// Instantiate uPlot Display Window
+		//uPlot *pw = new uPlot;
+
+		// Initialize plotting dimension
+		double x = 29.7;
+		double y = 21.;
+		pw->setPlotWidgetSize(x,y);
+
+		// Enable Drag and Drop
+		pw->EnableDropAction(name);
+
+		// Call myself to execute the initial request
+		// It needs to be execute after uPlot window has been created
+		if(reqExists)
+			MvApplication::callService ( name.c_str(),req,0 );
+
+		// Show uPlot
+		pw->show();
+		
+		return app.exec();
+	}
+
+//DOES IT NEED TO TEST FOR INTERACTIVE MODE?????
+// CHECK THIS CODE LATER WHEN THE EXPORT BUTTON IS ACTIVATED
+
+	else
+	{
+		// Start uPlot without a window (eg. batch mode or interactive mode
+		// without a Qt window)
+//		uPlotApp app(argc, argv, name.c_str());
+
+		// Call myself to execute the initial request
+//		if(reqExists)
+//			MvApplication::callService ( name.c_str(),req,0 );
+
+//		app.run();
+	}
+
+ 	Root::ServerDead(0,0);
+}
diff --git a/src/uPlot/MvMainGeoTool.cc b/src/uPlot/MvMainGeoTool.cc
new file mode 100644
index 0000000..eaba1c0
--- /dev/null
+++ b/src/uPlot/MvMainGeoTool.cc
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "uPlotBase.h"
+#include "GeoTool.h"
+#include "Root.h"
+#include "MagPlusInteractiveService.h"
+#include "PlotModInteractive.h"
+#include "SuperPage.h"
+
+#include "MvDebugPrintControl.h"
+#include "uPlotApp.h"
+
+#include <mars.h>
+
+using namespace std;
+
+bool SetUplotEnv (int argc, char **argv, MvRequest &req)
+{
+	// Create Root instance
+	Root::Create();
+
+	// Initialize Mars communication
+	marsinit(&argc,argv,0,0,0);
+	mvSetMarslogLevel();
+
+	// Get request to be processed
+	if (argc > 1)
+	{
+		//Check if the input request exists
+		if ( access(argv[1],F_OK) == 0 )
+		{
+			//Read the initial input request saved by uPlotManager
+			req.read(argv[1]);
+req.print();
+			// Skip UPLOT_MANAGER request
+			if ( strcmp(req.getVerb(),"GEOTOOL_MANAGER") == 0)
+				req.advance();
+
+			return true;
+		}
+	}
+
+	return false;
+}
+
+string GetProcessName ()
+{
+	// Build a process name according to the process id
+	char name[64];
+	sprintf(name,"GeoTool%ld",(long int)getpid());
+
+	return string(name);
+}
+
+int main(int argc, char **argv)
+{
+	MvRequest req;
+
+	// Get process name and start GeoTool application
+	string name = GetProcessName();
+	uPlotApp app(argc, argv, name.c_str());
+
+	MagPlusInteractiveService* magplus = new MagPlusInteractiveService();
+	MagPlusService::Instance(magplus);
+
+	PlotModInteractive* pm = new PlotModInteractive();
+	PlotMod::Instance(pm);
+
+	// Setup uPlot environment
+	if ( SetUplotEnv(argc,argv,req) )
+	{
+		// Instantiate GeoTool application
+		uPlotBase *pw = new GeoTool(req);
+		magplus->setPlotApplication(pw);
+		SuperPage::setPlotApplication(pw);
+		
+		// Initialize plotting dimension
+		double x = 14.8;
+		double y = 10.5;
+		
+		//double x = 29.6;
+		//double y = 21;
+		pw->setPlotWidgetSize(x,y);
+
+		// Enable Drag and Drop
+		pw->EnableDropAction(name);
+
+		// Call myself to process the request
+		MvRequest req1 = pw->SuperPageRequest();
+		MvApplication::callService ( name.c_str(),req1,0 );
+		
+		// Show uPlot
+		pw->show();
+	}
+
+	return app.exec();
+}
diff --git a/src/uPlot/MvMainuPlotBatch.cc b/src/uPlot/MvMainuPlotBatch.cc
new file mode 100644
index 0000000..78548fc
--- /dev/null
+++ b/src/uPlot/MvMainuPlotBatch.cc
@@ -0,0 +1,38 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "uPlotBatchApp.h"
+#include "Root.h"
+#include "MvDebugPrintControl.h"
+#include "PlotModBatch.h"
+#include "MagPlusBatchService.h"
+
+#include <mars.h>
+
+int main(int argc,char **argv)
+{
+	// Create Root instance
+	Root::Create();
+
+	// Initialize Mars communication
+	marsinit(&argc,argv,0,0,0);
+	mvSetMarslogLevel();
+
+	// Start uPlot without a window (eg. batch mode or interactive mode
+	// without a window)
+	uPlotBatchApp app(argc, argv, "uPlotBatch");
+
+	MagPlusBatchService* batch = new MagPlusBatchService();
+	MagPlusService::Instance(batch);
+
+	PlotModBatch* pm = new PlotModBatch();
+	PlotMod::Instance(pm);
+
+	app.run();
+}
diff --git a/src/uPlot/MvQAreaSelection.cc b/src/uPlot/MvQAreaSelection.cc
new file mode 100644
index 0000000..1aa9694
--- /dev/null
+++ b/src/uPlot/MvQAreaSelection.cc
@@ -0,0 +1,781 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QMouseEvent>
+#include <QPainter>
+
+#include "MvQAreaSelection.h"
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+#include "MgQLayoutItem.h"
+
+MvQAreaSelection::MvQAreaSelection(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	MvQPlotItem(scene,view,parent)
+{	
+	pen_=QPen(QColor(0,0,255,230),2);
+	pen_.setCosmetic(true);
+	
+	brush_=QBrush(QColor(164,219,255,180));
+	currentAction_=NoAction;
+	zoomLayout_=0;
+	rect_=QRectF();
+
+	selectionPen_=pen_;
+	selectionPen_.setCosmetic(true);
+	selectionPen_.setStyle(Qt::DotLine);
+	resizeId_=-1;
+	physicalHandleSize_=8.;
+	handleSize_=8.;
+	for(int i=0;i< 8; i++)	
+	{
+		handle_ << QRectF(0.,0.,handleSize_,handleSize_);		
+	}
+
+	showHandles_=false;
+	handleHover_=-1;
+
+	
+}
+
+MvQAreaSelection::~MvQAreaSelection()
+{
+}
+
+QRectF MvQAreaSelection::boundingRect() const
+{
+	checkHandleSize();
+	
+	//qDebug() << "brect" << rect_;
+	return rect_.adjusted(-handleSize_/2.,-handleSize_/2.,handleSize_/2.,handleSize_/2.);
+}
+
+void MvQAreaSelection::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+	checkHandleSize();	
+	
+	painter->setPen(QPen());
+	painter->setBrush(brush_);
+	painter->drawRect(rect_);
+
+	//Outline
+	if(currentAction_==ResizeAction || currentAction_==MoveAction ||
+	   showHandles_)
+	{
+		painter->setPen(selectionPen_);
+	}
+	else
+	{
+		painter->setPen(pen_);
+	}
+
+	painter->setBrush(QBrush());
+	painter->drawRect(rect_);
+ 
+	//Handlers
+	if(showHandles_)
+	{
+		for(int i=0; i < handle_.count(); i++)
+		{
+			QRectF r=handle_[i];
+			r.translate(rect_.topLeft());
+			if(handleHover_ == i)
+			{
+				painter->setPen(Qt::blue);
+				painter->setBrush(QColor(164,219,255));
+			}
+			else
+			{
+				painter->setPen(Qt::blue);
+				painter->setBrush(Qt::blue);
+			}
+			
+			painter->drawRect(r);
+		}
+	}
+}
+
+void MvQAreaSelection::mousePressEventFromView(QMouseEvent *event)
+{
+	checkHandleSize();	
+	
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	//
+	handleHover_=-1;
+
+	if(rect_.isNull())
+	{
+		//Get scene position
+		zoomRectOrigin_ = mapFromScene(plotView_->mapToScene(event->pos()));
+
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(zoomRectOrigin_))) == 0) 
+		{
+			currentAction_=NoAction;
+		}
+		else
+		{
+			currentAction_=DefineAction;
+			rect_.setRect(zoomRectOrigin_.x(),zoomRectOrigin_.y(),0,0);	
+			setVisible(true);
+		}
+	}
+
+	else
+	{
+		float dh=handleSize_/2;
+		QRectF cRect=controlRect();
+
+		//qDebug() << "crect" << cRect;
+
+		dragPos_=mapFromScene(plotView_->mapToScene(event->pos()));
+				
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(cRect.center())))!= 0 &&
+		   cRect.adjusted(-dh,-dh,dh,dh).contains(dragPos_))
+		{
+			QPointF xp=dragPos_-cRect.topLeft();
+
+			//qDebug() << "xp" << dragPos_<< xp << rect_.topLeft();
+
+			updateHandles();
+
+			resizeId_=-1;
+			for(int i=0; i < handle_.count(); i++)
+			{
+				//qDebug() << "handle" << i << handle_[i];
+				//If a handle is selected it starts a resize action 
+				if(handle_[i].contains(xp))
+				{
+					resizeId_=i;
+
+					Qt::CursorShape shape;
+					
+					switch(resizeId_)
+					{
+					case 0: shape=Qt::SizeBDiagCursor; break;
+					case 1: shape=Qt::SizeHorCursor; break;	
+					case 2: shape=Qt::SizeFDiagCursor; break;
+					case 3: shape=Qt::SizeVerCursor; break;
+					case 4: shape=Qt::SizeBDiagCursor; break;
+					case 5: shape=Qt::SizeHorCursor; break;
+					case 6: shape=Qt::SizeFDiagCursor; break;
+					case 7: shape=Qt::SizeVerCursor; break;
+					default: break;
+					}
+
+					setCursor(QCursor(shape));
+					currentAction_=ResizeAction;
+
+					//qDebug() << "resizeId" << resizeId_;
+					return;
+				}
+			}		
+
+			//If no resize action it checks if the drag point is 
+			//in the selection rentangle and starts a move action 
+			if(resizeId_== -1 && cRect.contains(dragPos_))
+			{
+				currentAction_=MoveAction;
+				setCursor(QCursor(Qt::SizeAllCursor));
+			}
+			//Otherwise unselect
+			else
+			{
+				currentAction_=NoAction;
+				dragPos_=QPointF();
+				if(showHandles_)
+				{
+					showHandles_=false;
+					update();
+				}
+			}	
+
+		}
+		else
+		{
+			currentAction_=NoAction;
+			dragPos_=QPointF();
+
+			if(showHandles_)
+			{
+				showHandles_=false;
+				update();
+			}		
+		}
+	}
+}
+
+void MvQAreaSelection::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	//qDebug() << "mouseMove in area";
+
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+	
+	if(currentAction_ == DefineAction)
+	{
+		QPointF dp = pos - zoomRectOrigin_;
+
+		if(dp.x() <= 0. || dp.y() >= 0.)
+			return;
+
+		QRectF r=updateControlRect(currentAction_,dp);
+		if(r.isEmpty())
+		{
+			return;
+		}
+		
+		prepareGeometryChange();
+		updateItemByControlRect(r);
+		update();
+	}
+	else if(currentAction_ == ResizeAction)
+	{	
+		QPointF dp = pos - dragPos_;
+
+		qDebug() << "resize" << pos << dragPos_;
+				
+		//Current control rect
+		QRectF rOri=controlRect();
+		QRectF r=updateControlRect(currentAction_,dp);
+	
+		
+		if(r.isEmpty() || 
+		   fabs(r.width()) <= 8. || fabs(r.height()) <=8. || 
+		   r.width() < 0. || r.height() < 0.)
+		{
+			
+			dragPos_=pos;
+			return;
+		}
+		
+		qDebug() << "resize" << r;
+		
+		if(r.width() < rOri.width() || r.height() < rOri.height())
+		{
+			QRectF plotRect=mapRectFromScene(zoomLayout_->mapToScene(zoomLayout_->boundingRect()).boundingRect());
+			if(!plotRect.contains(pos))
+			{
+			  	qDebug() << "   resize" << "out";
+			  	dragPos_=pos;
+				return;
+			}
+		}
+		
+		
+		
+
+		prepareGeometryChange();
+		updateItemByControlRect(r);
+		dragPos_=pos;
+		showHandles_=false;
+		update();		
+	}
+	else if(currentAction_ == MoveAction)
+	{	
+		QPointF dp = pos - dragPos_;
+
+		//qDebug() << "move" << dp << rect_; 
+
+
+		QRectF r=updateControlRect(currentAction_,dp);
+		if(r.isEmpty())
+		{
+			return;
+		}
+
+		prepareGeometryChange();
+		updateItemByControlRect(r); 
+		dragPos_=pos;
+		showHandles_=false;
+		update();		
+	}
+	else if(event->buttons() ==  Qt::NoButton)
+	{
+		if(showHandles_==false)
+			return;
+
+		QRectF r=controlRect(); //controlRect
+		QPointF dp= pos-r.topLeft();
+
+		updateHandles();
+		int oriHover=handleHover_;
+		handleHover_=-1;
+		for(int i=0; i < handle_.count(); i++)
+		{			
+			if(handle_[i].contains(dp))
+			{
+				handleHover_=i;	
+				if(handleHover_ != oriHover)
+				{
+					update();
+				}
+				break;
+			}
+		}
+		
+		if(oriHover != -1)
+		{
+			update();
+		}	
+	}
+}
+
+ void MvQAreaSelection::mouseReleaseEventFromView(QMouseEvent *event)
+ {
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+
+	if(currentAction_ == DefineAction)
+	{	
+		QPointF dp = pos - zoomRectOrigin_;
+		if(dp.x() <= 0. || dp.y() >= 0.)
+		{
+			clearArea();
+			return;
+		}
+
+		QRectF r=updateControlRect(currentAction_,dp);
+		if(r.isEmpty() || fabs(r.width()) < 8. || fabs(r.height()) <8.  )
+		{
+			clearArea();
+			return;
+		}
+		
+		prepareGeometryChange();
+		updateItemByControlRect(r);
+		update();
+
+		QPointF gp1,gp2;
+		getAreaGeoCorners(gp1,gp2);
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+
+		//blLat,blLon,trLat,trLon
+		emit areaIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+	}	
+	else if(currentAction_ == ResizeAction)
+	{
+		QPointF dp = pos - dragPos_;
+
+		QRectF r=updateControlRect(currentAction_,dp);
+
+		if(r.isEmpty() || 
+		   fabs(r.width()) < 8. || fabs(r.height()) <8. || 
+		   r.width() < 0. || r.height() < 0.)
+		{
+			r=rect_;
+			//clearArea();
+			//return;
+		}
+		
+		prepareGeometryChange();
+		updateItemByControlRect(r);
+		//update();
+
+		QPointF gp1,gp2;
+		getAreaGeoCorners(gp1,gp2);
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+		dragPos_=QPointF();
+
+		//blLat,blLon,trLat,trLon
+		emit areaIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+
+		updateHandles();
+		showHandles_=true;
+		update();	
+		unsetCursor();
+	}	
+	else if(currentAction_ == MoveAction)
+	{
+		QPointF dp = pos - dragPos_;
+
+		QRectF r=updateControlRect(currentAction_,dp);
+		if(r.isEmpty())
+		{
+			return;
+		}
+
+		prepareGeometryChange();
+		updateItemByControlRect(r); 
+
+		QPointF gp1,gp2;
+		getAreaGeoCorners(gp1,gp2);
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+		dragPos_=QPointF();
+
+		//blLat,blLon,trLat,trLon
+		emit areaIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+
+		updateHandles();
+		showHandles_=true;
+		update();	
+		unsetCursor();
+	}	
+ }
+
+
+void MvQAreaSelection::setArea(double blLat,double blLon,double trLat,double trLon)
+{
+	//double west, double north, double east, double south)		
+	QPointF sp1,sp2;
+
+	if(rect_.isEmpty())
+	{		
+	  	if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+		{
+			return;
+		}	
+	}
+	else
+	{
+		sp1.setX(rect_.x());
+		sp1.setY(rect_.y());
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(sp1))) == 0)
+		{
+			return;
+
+		}
+	}
+
+	QPointF gp1(blLon,blLat);
+	QPointF gp2(trLon,trLat);
+
+	if(zoomLayout_->containsGeoCoords(gp1) && 
+	   zoomLayout_->containsGeoCoords(gp2))
+	{
+		zoomLayout_->mapFromGeoToSceneCoords(gp1,sp1);	
+		zoomLayout_->mapFromGeoToSceneCoords(gp2,sp2);
+
+		sp1=mapFromScene(sp1);
+		sp2=mapFromScene(sp2);
+				
+		//qDebug() << gp1 << gp2 << sp1 << sp2;
+
+		QRectF r=QRectF(sp1.x(),sp1.y(),sp2.x()-sp1.x(),sp2.y()-sp1.y());
+		if(r.width() <0 || r.height() < 0)
+		{
+			if(rect_.isEmpty() == false)
+			{	
+				getAreaGeoCorners(gp1,gp2);
+				//blLat,blLon,trLat,trLon
+				emit areaIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+			}
+			return;
+		}
+		//qDebug() << rect_;
+	
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+		prepareGeometryChange();
+		rect_=r;
+		updateHandles();
+		update();
+	}
+	else
+	{
+		QPointF gp1,gp2;
+		getAreaGeoCorners(gp1,gp2);
+		//blLat,blLon,trLat,trLon
+		emit areaIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+	}
+}
+	
+void MvQAreaSelection::clearArea()
+{
+	currentAction_=NoAction;
+	prepareGeometryChange();
+	rect_=QRectF();
+	coordPoint_.clear();
+	showHandles_=false;
+	update();
+	emit areaIsUndefined();
+}
+
+
+// It should be called only after zoom!!!
+// If the projection is changed the area should be set "undefined"!!
+
+void MvQAreaSelection::reset()
+{
+	if(coordPoint_.isEmpty() || rect_.isNull())
+		return;
+
+	//We need to find the projectorItem!!
+	QPointF sp0,sp1;
+
+	if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+	{
+		clearArea();
+		return;
+	}
+
+	QPointF gp0=coordPoint_[0];
+	QPointF gp1=coordPoint_[1];
+
+	//qDebug() << coordPoint_;
+
+	if(zoomLayout_->containsGeoCoords(gp0) && 
+	   zoomLayout_->containsGeoCoords(gp1))
+	{
+		zoomLayout_->mapFromGeoToSceneCoords(gp0,sp0);	
+		zoomLayout_->mapFromGeoToSceneCoords(gp1,sp1);
+
+		sp0=mapFromScene(sp0);
+		sp1=mapFromScene(sp1);
+				
+		
+		//qDebug() << sp0 << sp1;
+
+		prepareGeometryChange();
+		rect_=QRectF(sp0.x(),sp0.y(),sp1.x()-sp0.x(),sp1.y()-sp0.y());
+		updateHandles();
+		update();
+	}
+	else
+	{
+		clearArea();
+	}
+}
+
+void MvQAreaSelection::selectAllArea()
+{
+	if((zoomLayout_=plotScene_->firstProjectorItem()) != 0)
+	{
+		prepareGeometryChange();
+		rect_=mapRectFromScene(zoomLayout_->mapRectToScene(zoomLayout_->boundingRect()));
+
+		QPointF gp1,gp2;
+		getAreaGeoCorners(gp1,gp2); //this requires zoomLayout_ !!!
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		dragPos_=QPointF();
+
+		showHandles_=false;
+		update();
+
+		//blLat,blLon,trLat,trLon
+		emit areaIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+	}
+}
+
+void MvQAreaSelection::updateHandles()
+{
+	QRectF r=controlRect();
+
+	checkHandleSize();	
+	
+	float dh=handleSize_/2;
+	float w=r.width();
+	float h=r.height();
+
+	//Check handles!!!
+	handle_[0].moveTo(-dh,-dh);
+	handle_[1].moveTo(-dh,h/2.-dh);
+	handle_[2].moveTo(-dh,h-dh);
+	handle_[3].moveTo(w/2.-dh,h-dh);
+	handle_[4].moveTo(w-dh,h-dh);
+	handle_[5].moveTo(w-dh,h/2.-dh);
+	handle_[6].moveTo(w-dh,-dh);	
+	handle_[7].moveTo(w/2.-dh,-dh);
+}
+
+
+void MvQAreaSelection::setActivated(bool b)
+{
+	if(showHandles_==true)
+	{
+		showHandles_=false;
+		update();
+	}
+	activated_=b;
+}
+
+
+
+
+QRectF MvQAreaSelection::updateControlRect(CurrentAction action,QPointF &dp)
+{
+	//Current control rect
+	QRectF r=controlRect();
+
+	if(!zoomLayout_)
+	{
+		return QRectF();
+	}
+
+	//Plot area in local coordinates
+	QRectF plotRect=mapRectFromScene(zoomLayout_->mapToScene(zoomLayout_->boundingRect()).boundingRect());
+
+	if(action == DefineAction)
+	{
+		r=QRectF(zoomRectOrigin_.x(),zoomRectOrigin_.y()+dp.y(),dp.x(),-dp.y());
+		
+		if(r.right() > plotRect.right())
+		{
+			dp.setX(dp.x()-(r.right()-plotRect.right()));
+		}
+		else if(r.left() < plotRect.left())
+		{
+			dp.setX(dp.x()+plotRect.left()-r.left());	
+		}
+		if(r.bottom() > plotRect.bottom())
+		{
+			dp.setY(dp.y()-(r.bottom()-plotRect.bottom()));	
+		}
+		else if(r.top() < plotRect.top())
+		{
+			dp.setY(dp.y()+plotRect.top()-r.top());	
+		}
+
+		r=QRectF(zoomRectOrigin_.x(),zoomRectOrigin_.y()+dp.y(),dp.x(),-dp.y());
+	}
+	else if(action == ResizeAction)
+	{
+		r=rect_;
+		
+		switch(resizeId_)
+		{
+		case 0:
+			r.adjust(dp.x(),dp.y(),0,0);
+			break;
+		case 1:
+			r.adjust(dp.x(),0,0,0);
+			break;	
+		case 2:
+			r.adjust(dp.x(),0,0,dp.y());
+			break;	
+		case 3:
+			r.adjust(0,0,0,dp.y());
+			break;	
+		case 4:
+			r.adjust(0,0,dp.x(),dp.y());
+			break;	
+		case 5:
+			r.adjust(0,0,dp.x(),0);
+			break;	
+		case 6:
+			r.adjust(0,dp.y(),dp.x(),0);
+			break;	
+		case 7:
+			r.adjust(0,dp.y(),0,0);
+			break;	
+		default:
+			break;
+		}
+		
+		if(r.width() < 0)
+		{
+			//r.setWidth(8.);
+			r=rect_;
+		}
+		if(r.height() <0)
+		{
+			//r.setHeight(8.);
+			r=rect_;
+		}
+
+		//qDebug() << "RESIZE" << rect_ << r;
+
+		r=plotRect.intersected(r);
+	}
+	else if(action == MoveAction)
+	{
+		r=rect_.translated(dp);
+
+		if(r.right() > plotRect.right())
+		{
+			dp.setX(dp.x()-(r.right()-plotRect.right()));
+		}
+		else if(r.left() < plotRect.left())
+		{
+			dp.setX(dp.x()+plotRect.left()-r.left());	
+		}
+		if(r.bottom() > plotRect.bottom())
+		{
+			dp.setY(dp.y()-(r.bottom()-plotRect.bottom()));	
+		}
+		else if(r.top() < plotRect.top())
+		{
+			dp.setY(dp.y()+plotRect.top()-r.top());	
+		}
+
+		r=rect_.translated(dp);
+	}
+	
+
+	QPointF p1=mapToScene(r.topLeft());
+	QPointF p2=mapToScene(r.bottomRight());
+
+	if(!zoomLayout_->containsSceneCoords(p1) ||
+	   !zoomLayout_->containsSceneCoords(p2))
+	{
+		//qDebug() << "false";
+		return QRectF();;
+	}
+
+	return r;
+}
+
+void MvQAreaSelection::updateItemByControlRect(QRectF r)
+{
+	rect_=r;
+}
+
+QRectF MvQAreaSelection::controlRect()
+{
+	return rect_;
+
+}
+
+void MvQAreaSelection::getAreaGeoCorners(QPointF &gp1,QPointF &gp2)
+{
+	if(!zoomLayout_)
+		return;
+
+	//Get geo coordinates of the bl and tr rect corners on the map.
+	//The y axis is inverted!! So we need tl and br corners of the
+	//qt rectangle!!!!!!!
+	QPointF sp1=mapToScene(rect_.topLeft());
+	QPointF sp2=mapToScene(rect_.bottomRight());
+	zoomLayout_->mapFromSceneToGeoCoords(sp1,gp1);
+	zoomLayout_->mapFromSceneToGeoCoords(sp2,gp2);
+	
+	
+}
+
+void MvQAreaSelection::checkHandleSize() const
+{  
+	handleSize_=physicalHandleSize_/parentItem()->scale();
+	for(int i=0;i< 8; i++)	
+	{
+		handle_[i].setWidth(handleSize_);
+		handle_[i].setHeight(handleSize_);
+	}
+	
+}
\ No newline at end of file
diff --git a/src/uPlot/MvQAreaSelection.h b/src/uPlot/MvQAreaSelection.h
new file mode 100644
index 0000000..512bf8d
--- /dev/null
+++ b/src/uPlot/MvQAreaSelection.h
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQAreaSelection_H
+#define MvQAreaSelection_H
+
+#include <QBrush>
+#include <QGraphicsItem>
+#include <QPen>
+
+#include "MvQPlotItem.h"
+
+class MgQLayoutItem;
+
+using namespace std;
+
+class MvQAreaSelection : public MvQPlotItem
+{
+
+Q_OBJECT
+
+public:
+	MvQAreaSelection(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQAreaSelection();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+
+	void setArea(double,double,double,double);
+	void clearArea();
+	void selectAllArea();
+
+	void setActivated(bool); 
+
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+	void reset();
+
+signals:
+	void areaIsDefined(double,double,double,double);
+	void areaIsUndefined();
+	
+protected:	
+	enum CurrentAction {NoAction, DefineAction, ResizeAction, MoveAction};
+
+	void updateHandles();	
+	QRectF updateControlRect(CurrentAction,QPointF&);
+	void updateItemByControlRect(QRectF);
+	QRectF controlRect();
+	void getAreaGeoCorners(QPointF &,QPointF &);
+	void checkHandleSize() const;
+
+	QPen		pen_;
+	QBrush  	brush_;
+	QRectF		rect_;
+	QPointF 	zoomRectOrigin_;
+	QList<QPointF> 	scenePoint_;
+	QList<QPointF> 	coordPoint_;
+	CurrentAction 	currentAction_;
+	MgQLayoutItem*  zoomLayout_;
+	QPointF 	dragPos_;
+
+	bool 		showHandles_;
+	QPen		selectionPen_;
+	mutable QList<QRectF> 	handle_;
+	mutable float 		handleSize_;
+	mutable float 		physicalHandleSize_;
+	int 		resizeId_;
+	int 		handleHover_;
+};	
+
+
+#endif
diff --git a/src/uPlot/MvQContentsModel.cc b/src/uPlot/MvQContentsModel.cc
new file mode 100644
index 0000000..1dd3c03
--- /dev/null
+++ b/src/uPlot/MvQContentsModel.cc
@@ -0,0 +1,579 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QBrush>
+#include <QColor>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMimeData>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QPushButton>
+#include <QSlider>
+#include <QStringList>
+#include <QTextDocument>
+
+#include "MvPath.hpp"
+#include "Presentable.h"
+#include "SuperPage.h"
+#include "Page.h"
+#include "Root.h"
+
+#include "MvQContentsModel.h"
+
+//===============================
+//
+//  MvQContentsNode
+//
+//===============================
+
+
+MvQContentsNode::MvQContentsNode(Presentable& pr, MvQContentsNode *parent,Type type)
+{
+	//presentable_=pr; 
+	parent_=parent;
+	if(type == DisplayTitleType)
+	{  
+		name_=QObject::tr("Global settings");
+	}
+	else
+	{   
+		name_=QObject::tr("Plot");
+		//name_=QString::fromStdString(pr.Name());
+	}
+	type_=type;
+}  
+
+MvQContentsNode::MvQContentsNode(MvIcon& pr, MvQContentsNode *parent,Type type)
+{
+	//presentable_=pr;
+	parent_=parent;  
+	name_=(const char *)pr.IconName();
+	Cached iconFileName = MakeIconPath (pr.IconClass());
+	pixmap_ = QPixmap::fromImage(QImage((const char*)iconFileName,"xpm")).scaled(QSize(22,22),Qt::KeepAspectRatio,Qt::SmoothTransformation);
+	type_=type;
+}  
+
+MvQContentsNode::MvQContentsNode(QString str, MvQContentsNode *parent,Type type)
+{
+	//presentable_=pr; 
+	parent_=parent;
+	name_=str;
+	type_=type;
+}  
+
+MvQContentsNode* MvQContentsNode::addChild(Presentable &sp,Type type)
+{
+  	MvQContentsNode *node=new MvQContentsNode(sp,this,type);
+	children_ << node;
+	return node;
+}  
+
+MvQContentsNode* MvQContentsNode::addChild(MvIcon &icon,Type type)
+{
+  	MvQContentsNode *node=new MvQContentsNode(icon,this,type);
+	children_ << node;
+	return node;
+}
+
+MvQContentsNode* MvQContentsNode::addChild(QString str,Type type)
+{
+  	MvQContentsNode *node=new MvQContentsNode(str,this,type);
+	children_ << node;
+	return node;
+}
+
+
+//===============================
+//
+//  MvQContentsTree
+//
+//===============================
+
+MvQContentsTree::MvQContentsTree()
+{
+  	root_=new MvQContentsNode(Root::Instance(),0,MvQContentsNode::NoType);  	
+  	Root::Instance().Visit(*this);   
+	
+}
+
+void MvQContentsTree::Visit(SuperPage &sp)
+{
+	//Create a nofde for the superpage
+	MvQContentsNode *node=root_->addChild(sp,MvQContentsNode::DisplayTitleType);
+	
+  	//Get the list of visdefs and mtexts
+	MvIconList objList=iconList(sp);
+	MvListCursor cr;
+	for(cr=objList.begin(); cr != objList.end(); cr++)
+	{
+		node->addChild(*cr,MvQContentsNode::IconType);
+	}	  
+}
+
+void MvQContentsTree::Visit(Page &page)
+{
+	//need to find the parent!!!!!!!!!
+	MvQContentsNode *node=root_->addChild(page,MvQContentsNode::PageTitleType);
+	
+  	// Retrieve the Icon Data Base
+	MvIconDataBase&   dataBase = page.IconDataBase();
+
+	// Create the View icon associated to the Page
+	MvRequest reqview = page.Request().getSubrequest("VIEW");
+	//ensure ( reqview != 0 );
+	MvIcon viewIcon ( reqview);
+	node->addChild(viewIcon,MvQContentsNode::IconType);
+
+	// Describe the objects associated to the Page
+	MvIconList objList=iconList(page);
+	MvListCursor cr;
+	for(cr=objList.begin(); cr != objList.end(); cr++)
+	{
+		node->addChild(*cr,MvQContentsNode::IconType);
+	}
+
+
+	// Retrieve DataUnits related to the Page
+	MvIconList duList;
+	dataBase.DataUnitListByPresentableId (page.Id(), duList );
+	
+	MvListCursor duCursor;
+	MvQContentsNode *duNode;
+	
+	int dataCnt=1;
+	for( duCursor = duList.begin(); duCursor != duList.end(); duCursor++)
+	{
+		// Find out the visdefs associated to this dataunit
+		objList.clear();
+		dataBase.RetrieveVisDefList((*duCursor),objList);
+
+		duNode=node->addChild("Data " + QString::number(dataCnt) ,MvQContentsNode::DataTitleType);				
+		duNode->addChild(*duCursor,MvQContentsNode::IconType);
+		//duNode->addData(*duCursor);
+		for(cr=objList.begin(); cr != objList.end(); cr++)
+		{
+			duNode->addChild(*cr,MvQContentsNode::IconType);
+			//duNode->addData(*cr);
+		}
+		
+		dataCnt++;
+	}	
+}	
+
+MvIconList MvQContentsTree::iconList(Presentable &treeNode)
+{
+  	// Retrieve the Icon Data Base
+	MvIconDataBase&   dataBase = treeNode.IconDataBase();
+
+	// Find the list of objects associated to the Presentable
+	MvIconList objList;
+	dataBase.VisDefListByPresentableId ( treeNode.Id(), objList );
+	dataBase.TextListByPresentableId ( treeNode.Id(), objList );
+
+	return objList;
+}
+
+
+
+//======================================
+// Item delegate
+//======================================
+
+MvQContentsDelegate::MvQContentsDelegate(QWidget *parent) : QStyledItemDelegate(parent)
+{
+  
+}
+
+void MvQContentsDelegate::paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const
+{	
+	if(index.data(Qt::UserRole).toInt() > 0)
+	{
+		QStyleOptionViewItemV4 options = option;
+    		initStyleOption(&options, index);
+
+		//const QStyle *style = vopt.widget ? vopt.widget->style() : QApplication::style();
+
+    		painter->save();
+		
+		if(index.data(Qt::UserRole).toInt()  == 1)
+		{  
+		  	//painter->fillRect(options.rect, QColor(188,215,255));
+			//painter->fillRect(options.rect, QColor(233,233,255));
+			painter->fillRect(options.rect, QColor(187,199,203));
+			painter->setPen(QColor(255,255,255));
+			//painter->setPen(QColor(200,200,200));
+			//painter->drawRect(options.rect);
+		}  
+		else if(index.data(Qt::UserRole).toInt()  == 2)
+		{
+			painter->fillRect(options.rect, QColor(194,224,233));
+			//painter->fillRect(options.rect, QColor(245,245,255));
+			//painter->fillRect(options.rect, QColor(188,215,255));
+			painter->setPen(QColor(255,255,255));
+			//painter->setPen(QColor(200,200,200));
+			//painter->drawRect(options.rect);
+		}
+		else if(index.data(Qt::UserRole).toInt()  == 3)
+		{
+		  	//painter->fillRect(options.rect, QColor(245,245,255));
+			painter->fillRect(options.rect, QColor(239,239,239));
+			painter->setPen(QColor(255,255,255));
+			//painter->drawRect(options.rect);
+			
+		}
+		
+		//painter->setPen(QColor(221,221,221));
+		painter->drawRect(options.rect);
+
+		//painter->setPen(QColor(200,200,200));
+		//painter->drawLine(options.rect.topLeft(),options.rect.topRight());
+		//painter->drawLine(options.rect.bottomLeft(),options.rect.bottomRight());
+		
+		QTextDocument doc;
+    		doc.setHtml(options.text);
+
+    		options.text = "";
+    		options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter);
+
+   	 	painter->translate(options.rect.left(), options.rect.top());
+    		QRect clip(0, 0, options.rect.width(), options.rect.height());
+    		doc.drawContents(painter, clip);
+
+    		painter->restore();	  
+	}
+	else
+	{
+		QStyledItemDelegate::paint(painter,option,index);	  
+	}  
+	
+	
+    
+    
+  
+/*	QStyleOptionViewItemV4 vopt(option);
+   	initStyleOption(&vopt, index);
+
+	//Save painter state
+	painter->save();
+	
+	//Draw separator line
+	painter->setPen(QColor(230,230,230));
+	painter->drawLine(option.rect.bottomLeft(),option.rect.bottomRight());
+
+	//restore painter state
+	painter->restore();*/	
+
+	/*if(index.column() == 0)
+	{
+		QStyleOptionViewItemV4 vopt(option);
+   		initStyleOption(&vopt, index);
+   
+    		const QStyle *style = vopt.widget ? vopt.widget->style() : QApplication::style();
+    		const QWidget* widget = vopt.widget;
+
+		int height=option.rect.height();
+
+		//vopt.text=QString();
+		//vopt.icon=QIcon();		
+
+		//We render everything with the default method
+  		style->drawControl(QStyle::CE_ItemViewItem, &vopt, painter, widget);
+	
+		//Get current values from model
+		QString txt=index.data(Qt::DisplayRole).toString();
+		QPixmap pixmap=index.data(Qt::DecorationRole).value<QPixmap>();
+		QBrush bg=index.data(Qt::BackgroundRole).value<QBrush>();
+	
+		//Save painter state
+		painter->save();
+
+		//Highlight
+		//if (option.state & QStyle::State_HasFocus)
+             	//	painter->fillRect(option.rect, option.palette.highlight());
+	
+	        //QRect checkRect = style->subElementRect(QStyle::SE_ItemViewItemCheckIndicator,&vopt, widget);
+                QRect iconRect = style->subElementRect(QStyle::SE_ItemViewItemDecoration, &vopt, widget);
+                //QRect textRect = style-> subElementRect(QStyle::SE_ItemViewItemText, &vopt, widget);
+
+		//Draw icon border
+		painter->setPen(QColor(230,230,230));
+		painter->drawRect(iconRect);
+
+		//Text
+		//QString text=index.data(Qt::DisplayRole).toString();
+		//QRect textRect(iconRect.x()+iconRect.width()+10,option.rect.y()+5,
+		//	       option.rect.width()-(iconRect.x()+iconRect.width()+5)-10, height/2-5);
+		
+		//painter->setPen(Qt::black);
+		//painter->drawText(textRect,Qt::AlignLeft,text);
+
+		//Draw separator line
+		painter->setPen(QColor(230,230,230));
+		painter->drawLine(option.rect.bottomLeft(),option.rect.bottomRight());
+
+		//restore painter state
+		painter->restore();			
+	}		
+	else
+	{		
+		QStyledItemDelegate::paint(painter,option,index);
+	}*/
+}
+
+/*QSize MvQLayerDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const
+{
+	QSize size=QStyledItemDelegate::sizeHint(option,index);
+	size.setHeight(itemHeight_);
+	return size;
+}*/
+
+QSize MvQContentsDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const
+{
+	if(index.data(Qt::UserRole).toInt()  == 1 || index.data(Qt::UserRole).toInt()  == 2 ||index.data(Qt::UserRole).toInt()  == 3 )
+	{
+		QStyleOptionViewItemV4 options = option;
+    		initStyleOption(&options, index);
+
+    		QTextDocument doc;
+    		doc.setHtml(options.text);
+    		doc.setTextWidth(options.rect.width());
+    		return QSize(doc.idealWidth(), doc.size().height())+ QSize(0,6);
+	}
+	
+	return QStyledItemDelegate::sizeHint(option,index) + QSize(0,6);
+}
+
+//===============================
+//
+//  MvQContentsModel
+//
+//===============================
+
+
+MvQContentsModel::MvQContentsModel()
+{
+	root_=0;
+}
+
+void MvQContentsModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQContentsModel::setRootNode(MvQContentsNode *root)
+{	
+	root_=root;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+
+int MvQContentsModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 1;
+}
+
+int MvQContentsModel::rowCount( const QModelIndex& parent) const
+{
+	if(!root_)
+		return 0;
+
+	MvQContentsNode* parentNode=nodeFromIndex(parent);
+	if(!parentNode)
+		return 0;
+	
+	
+	//qDebug() << "rowNum" << parent << parentNode->children().count();
+	
+	return parentNode->children().count(); 
+			
+	/*Presentable *parentNode=nodeFromIndex(parent);
+	if(!parentNode)
+		return 0;
+
+	qDebug() << "rowNum" << parent << parentNode->NrOfChildren();
+	
+	return parentNode->NrOfChildren(); */
+}
+
+
+QVariant MvQContentsModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || 
+	   (role != Qt::DisplayRole && role != Qt::ToolTipRole && role != Qt::DecorationRole &&
+	    role != Qt::BackgroundRole && role != Qt::UserRole))
+        {			
+		return QVariant();
+	}
+
+	MvQContentsNode *node=nodeFromIndex(index);
+	if(!node)
+		return QVariant();
+	
+	//qDebug() << "data" << index << node->name();
+	
+	if(role == Qt::ToolTipRole)
+	{
+		//QString s="Title: " + node->displayValue() + "<br>" +
+		//	  "Name:  " + node->value();
+		
+		//return s;
+		return QVariant();
+	}
+	else if(role == Qt::DecorationRole)
+	{
+		if(!node->pixmap().isNull())
+			return node->pixmap();
+		else
+		  	return QVariant();
+	}  
+	/*else if(role  == Qt::BackgroundRole)
+	{
+	  	if(node->parent() && node->parent()->name() == "Data")
+		{
+		  	return QBrush(QColor(245,245,255));
+		}
+		else
+			return QVariant();
+		
+	}*/  
+	else if(role  == Qt::UserRole)
+	{
+ 		if(node->type() == MvQContentsNode::DisplayTitleType)
+		{
+			return 1;
+		}
+		else if(node->type() == MvQContentsNode::PageTitleType)
+		{
+			return 2;
+		}
+		else if(node->type() == MvQContentsNode::DataTitleType )
+		{
+			return 3;
+		}
+		else
+		{
+		  	return 0;
+		}	
+	}
+	else
+	{
+		if(node->type() == MvQContentsNode::DataTitleType || 
+		   node->type() == MvQContentsNode::DisplayTitleType || 
+		   node->type() == MvQContentsNode::PageTitleType )
+		{
+		  
+		  	return "<b>" + node->name() + "</b>";
+		}
+		else
+		{
+		  	return node->name();
+		}	
+	}
+	
+	return QVariant();
+}
+
+
+QVariant MvQContentsModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+      		  return QAbstractItemModel::headerData( section, orient, role );
+
+   	switch ( section ) 
+	{
+   	case 0: return "Layer title";
+   	}
+
+    	return QVariant();
+}
+
+QModelIndex MvQContentsModel::index( int row, int column, const QModelIndex & parent ) const
+{
+	if(!root_ || row < 0 || column < 0)
+	{
+		return QModelIndex();
+	}
+	
+	
+	MvQContentsNode* parentNode=nodeFromIndex(parent);
+	MvQContentsNode* childNode=parentNode->children().at(row);
+	
+	if(!childNode)
+		return QModelIndex();
+
+	//qDebug() << "index" <<  row << column << parent << createIndex(row,column,childNode);
+	return createIndex(row,column,childNode);
+}
+
+MvQContentsNode* MvQContentsModel::nodeFromIndex( const QModelIndex & index) const
+{
+	if(index.isValid() )
+	{
+		//qDebug() << "NodeFromIndex" << index <<  static_cast<Presentable*>(index.internalPointer())->Name().c_str();
+	  	return static_cast<MvQContentsNode*>(index.internalPointer());
+	}
+	else
+	{
+		//qDebug() << "NodeFromIndex root" << index << root_->Name().c_str();
+		return root_;
+	}
+}
+
+QModelIndex MvQContentsModel::parent( const QModelIndex &child) const
+{		
+	//qDebug() << "parent" << child;
+	
+	MvQContentsNode *node=nodeFromIndex(child);
+	if(!node || node == root_)
+		return QModelIndex();
+
+	MvQContentsNode *parentNode=node->parent();
+	if(!parentNode || parentNode == root_)
+		return QModelIndex();	
+	//else
+	  	//qDebug() << "child's parent" << parentNode->name();
+	
+	MvQContentsNode *grandParentNode=parentNode->parent();
+	if(!grandParentNode)
+		return QModelIndex();
+	else
+	{
+		//qDebug() << "grandParent" << grandParentNode->name();
+	}	
+
+	int row=grandParentNode->children().indexOf(parentNode);
+	//qDebug() << "parent return" << createIndex(row,0,parentNode);
+	
+	
+	return createIndex(row,0,parentNode);
+}
+
+QModelIndex MvQContentsModel::indexFromNode(MvQContentsNode* node) const
+{
+	if(node != 0 && node->parent() != 0)
+	{
+	  
+	  	int row=node->parent()->children().indexOf(node);
+		if(row != -1)
+		{
+			return createIndex(row,0,node);
+			//qDebug() << "indexFromNode" << node->name() << createIndex(row,0,node);
+		}
+	}
+	
+	return QModelIndex();
+}
+
+		
diff --git a/src/uPlot/MvQContentsModel.h b/src/uPlot/MvQContentsModel.h
new file mode 100644
index 0000000..ccc21cc
--- /dev/null
+++ b/src/uPlot/MvQContentsModel.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQContentsModel_H
+#define MvQContentsModel_H
+
+#include <QAbstractItemModel>
+#include <QStyledItemDelegate>
+
+#include "MvIconDataBase.h"
+#include "Visitor.h"
+
+class MvIcon;
+class Page;
+class Presentable;
+class SuperPage;
+
+using namespace std;
+
+class MvQContentsNode
+{
+public:
+ 	enum Type {NoType,DisplayTitleType,PageTitleType,DataTitleType,IconType};
+  
+  	MvQContentsNode(Presentable&,MvQContentsNode*,Type);
+	MvQContentsNode(MvIcon&,MvQContentsNode*,Type);
+	MvQContentsNode(QString,MvQContentsNode*,Type);
+	MvQContentsNode* addChild(Presentable&,Type);
+	MvQContentsNode* addChild(MvIcon&,Type);
+	MvQContentsNode* addChild(QString,Type);
+	QString name() {return name_;}
+	QPixmap pixmap() {return pixmap_;}
+	MvQContentsNode* parent() {return parent_;}
+	QList<MvQContentsNode*> children() {return children_;}
+	Type type() {return type_;}
+	
+protected:
+	QList<MvQContentsNode*> children_;
+	MvQContentsNode* parent_;
+	QString name_;
+	QPixmap pixmap_;
+	Type type_;
+  
+};  
+
+class MvQContentsTree : public Visitor
+{
+public:
+	MvQContentsTree();
+	void Visit(SuperPage &sp);
+	void Visit(Page &page);
+	void Visit(SubPage&) {};
+
+	MvQContentsNode *root() {return root_;}
+
+  protected:
+    	MvIconList iconList(Presentable &treeNode);
+	MvQContentsNode *root_;	
+};
+
+class MvQContentsDelegate : public QStyledItemDelegate
+{
+public:
+
+	MvQContentsDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const;
+
+
+};
+
+
+/*class MvQContentsList : public Visitor
+{
+public:
+	MvQContentsList();
+	void Visit(SuperPage &sp);
+	void Visit(Page &page);
+	void Visit(SubPage&) {};
+
+	//MvQContentsNode *root() {return root_;}
+
+protected:
+    	MvIconList iconList(Presentable &treeNode);
+	QList<MvQContentsNode*> *items_;	
+};*/
+
+
+
+
+class MvQContentsModel : public QAbstractItemModel
+{
+
+public:
+   	MvQContentsModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	void dataIsAboutToChange();
+	void setRootNode(MvQContentsNode*);
+	QModelIndex indexFromNode(MvQContentsNode*) const;
+	MvQContentsNode* nodeFromIndex( const QModelIndex & index) const;
+
+protected:
+
+	MvQContentsNode* root_;
+	
+};
+
+
+#endif 
diff --git a/src/uPlot/MvQContentsWidget.cc b/src/uPlot/MvQContentsWidget.cc
new file mode 100644
index 0000000..8066616
--- /dev/null
+++ b/src/uPlot/MvQContentsWidget.cc
@@ -0,0 +1,112 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QDebug>
+#include <QFile> 
+#include <QHeaderView>
+#include <QLabel>
+#include <QHBoxLayout>
+#include <QMenu>
+#include <QSlider>
+#include <QSpinBox>
+#include <QSplitter>
+#include <QTextBrowser>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvQContentsModel.h"
+#include "MvQContentsWidget.h"
+
+#include "Presentable.h"
+
+MvQContentsWidget::MvQContentsWidget(QWidget *parent) : QWidget(parent)
+{
+	QVBoxLayout *layout = new QVBoxLayout;
+	setLayout(layout);
+		
+	//Create layer model and view	
+	view_ = new QTreeView(this);
+	view_->setItemDelegate(new MvQContentsDelegate());
+	view_->setIndentation(10);
+	//view_->setRootIsDecorated(false);
+	view_->setContextMenuPolicy(Qt::CustomContextMenu);
+	view_->setProperty("mvStyle",2);
+
+	connect(view_, SIGNAL(customContextMenuRequested( const QPoint& )), 
+		this, SLOT(slotShowContextMenu(const QPoint &)));
+
+	actions_["edit"] = new QAction(tr("Edit"),view_);
+        actions_["remove"] = new QAction(tr("Remove"),view_);
+	actions_["save"] = new QAction(tr("Save"),view_);
+	
+	layout->addWidget(view_);	
+
+	model_= new MvQContentsModel;
+	view_->setModel(model_);
+	
+
+//view_->setRootIsDecorated(false);
+
+	//view_->setDragEnabled(true);
+ 	//view_->setAcceptDrops(true);
+ 	//view_->setDropIndicatorShown(true);
+	//view_->setDragDropMode(QAbstractItemView::DragDrop);
+	
+	tree_=0;
+
+}
+
+
+MvQContentsWidget::~MvQContentsWidget()
+{
+	if(model_)
+	  	delete model_;
+	if(tree_)
+		delete tree_;	
+}
+
+
+void MvQContentsWidget::dataIsAboutToChange()
+{
+	model_->dataIsAboutToChange();
+}
+
+void MvQContentsWidget::reset(Presentable* /*root*/)
+{
+ 	//model_->dataIsAboutToChange();
+	
+	if(tree_)
+	{
+	  	delete tree_;
+		tree_=0;
+	}  
+
+	tree_=new MvQContentsTree;
+  	
+  	model_->setRootNode(tree_->root());
+
+	view_->expandAll();
+	
+}
+
+void MvQContentsWidget::slotShowContextMenu(const QPoint& pt)
+{
+	//QList<QAction *> actions;
+
+	if(!view_->indexAt(pt).isValid()) 
+	{
+		//actions.append(m_addAction);
+		return;
+	}
+	if(actions_.size() > 0)
+		QMenu::exec(actions_.values(), view_->mapToGlobal(pt));
+
+}
\ No newline at end of file
diff --git a/src/uPlot/MvQContentsWidget.h b/src/uPlot/MvQContentsWidget.h
new file mode 100644
index 0000000..9fe16be
--- /dev/null
+++ b/src/uPlot/MvQContentsWidget.h
@@ -0,0 +1,53 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQContentsWidget_H
+#define MvQContentsWidget_H
+
+#include <QModelIndex>
+#include <QWidget>
+
+class QAction;
+class QLabel;
+class QSlider;
+class QSpinBox;
+class QSplitter;
+class QTextBrowser;
+class QToolButton;
+class QTreeView;
+
+class MvQContentsModel;
+class MvQContentsTree;
+
+class Presentable;
+
+
+class MvQContentsWidget : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MvQContentsWidget(QWidget *parent=0);
+	~MvQContentsWidget();
+	MvQContentsModel* model() {return model_;}
+	void dataIsAboutToChange();
+	void reset(Presentable*);
+	
+public slots:
+	void slotShowContextMenu(const QPoint&);
+
+protected:	
+	QTreeView *view_;
+	MvQContentsModel *model_;
+	MvQContentsTree *tree_;
+	QMap<QString,QAction*> actions_;
+};
+
+#endif
+
diff --git a/src/uPlot/MvQCursorData.cc b/src/uPlot/MvQCursorData.cc
new file mode 100644
index 0000000..275d4b9
--- /dev/null
+++ b/src/uPlot/MvQCursorData.cc
@@ -0,0 +1,691 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+
+#include <QAbstractTextDocumentLayout>
+#include <QDebug>
+#include <QFile>
+#include <QGraphicsDropShadowEffect>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QTextDocument>
+#include <QTextStream>
+
+#include "MvQCursorData.h"
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+#include "MgQLayoutItem.h"
+#include "MgQSceneItem.h"
+
+#include "Transformation.h"
+
+MvQCursorData::MvQCursorData(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	 MvQPlotItem(scene,view,parent)
+{
+	dataLayout_=0;
+	sceneItem_=0;
+
+	positionMode_ = FollowCursor;
+	offsetFromCursor_=QPointF(20,20);
+	probeMode_=FollowCursorProbe;
+
+	font_= new QFont();
+	font_->setPointSize(10);
+	fontMetrics_= new QFontMetrics(*font_);
+
+	//fontPen_=QPen(Qt::white);
+	//fontBrush_=QBrush(Qt::white);
+
+	fontPen_=QPen();
+	fontBrush_=QBrush();
+	
+	
+	areaPen_=QPen(QColor(255,255,255,190));
+	areaBrush_=QBrush(QColor(0,0,255,190)); 
+
+	zoomWasPerformedAfterMouseRelease_=true;
+	
+	QGraphicsDropShadowEffect *effect=new QGraphicsDropShadowEffect;
+	effect->setXOffset(3.);
+	effect->setYOffset(3.);
+	setGraphicsEffect(effect);
+	
+	//Read css for the text formatting
+	QString cssDoc;
+	QFile f(":/uPlot/layerInfo.css");
+	QTextStream in(&f);
+	if(f.open(QIODevice::ReadOnly | QIODevice::Text))
+	{
+       		cssDoc=QString(f.readAll());
+	}
+	f.close();
+	
+	textDoc_=new QTextDocument();
+	textDoc_->setDefaultStyleSheet(cssDoc);
+
+}
+
+MvQCursorData::~MvQCursorData()
+{
+}
+
+void MvQCursorData::setActivated(bool flag)
+{
+	MvQPlotItem::setActivated(flag);
+
+	if(flag)
+	{
+		show();
+	}
+	else
+	{		
+		hide();
+	}
+}
+
+void MvQCursorData::prepareForReset()
+{
+	dataLayout_=0;
+	sceneItem_=0;
+}
+
+
+void MvQCursorData::reset()
+{
+
+}
+
+QRectF MvQCursorData::boundingRect() const
+{
+	return boundingRect_;
+}
+
+void MvQCursorData::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{		
+	painter->setPen(QPen());
+	painter->setBrush(Qt::white);
+	painter->setRenderHint(QPainter::Antialiasing,true);
+	painter->drawRoundedRect(boundingRect_.adjusted(1,1,-1,-1),5.,5.);
+	
+	//Render text	
+	painter->translate(0,boundingRect_.height());
+	painter->scale(1.,-1.);		
+	textDoc_->drawContents(painter);	
+}
+
+void MvQCursorData::setPositionMode(MvQCursorData::PositionMode mode)
+{
+	positionMode_ = mode;
+
+	if(positionMode_ == Anchored)
+	{
+		setPos(offsetFromCursor_);
+	}
+}
+
+void MvQCursorData::changePositionMode(QPointF& cursor)
+{
+	if(positionMode_ ==  Anchored)
+	{
+		positionMode_=FollowCursor;
+	}
+	else
+	{
+		positionMode_=Anchored;
+	}
+
+	if(positionMode_ == FollowCursor)
+	{
+		offsetFromCursor_=pos()-cursor;
+	}
+
+}
+
+void MvQCursorData::changeProbeMode(QPointF& cursor)
+{
+	if(probeMode_ ==  AnchoredProbe)
+	{
+		probeMode_=FollowCursorProbe;
+	}
+	else
+	{
+		probeMode_=AnchoredProbe;
+	}
+	
+	emit probeEnabled(probeMode_==AnchoredProbe);
+}
+
+void MvQCursorData::setCursorPos(QPointF& cursor)
+{
+	if(positionMode_ == FollowCursor)
+	{
+		//setPos(cursor+offsetFromCursor_-boundingRect_.topLeft());
+		setPos(cursor+offsetFromCursor_);
+	}
+	else if(probeMode_ == FollowCursorProbe)
+	{
+		update();
+	}
+	//update();
+}
+
+
+void MvQCursorData::setText(QPointF coord,QList<ValuesCollector> layerData,QString nameX, QString nameY, bool hasDistance)
+{		
+	QString s;
+	
+	s+="<table>";
+	s+="<tr><td class=\"first\">" + nameX +"</td><td>";
+	s+=QString::number(coord.x(),'f',3);
+	s+="</td><td class=\"first\">" + nameY + "</td><td>";
+	s+=QString::number(coord.y(),'f',3);
+	s+="</td></tr>";	
+	s+="</table>";
+	
+	bool collectedLayerExists=false;
+	bool hasValue=false;
+	bool hasScaledValue=false;
+	bool hasVector=false;
+	foreach(ValuesCollector d,layerData)
+	{	  
+		  if(d.collected())
+		  {
+		    	collectedLayerExists=true;
+			if(d.hasValue())
+				hasValue=true;
+			if(d.scaled()) 
+			  	hasScaledValue=true;  
+		  
+		  	if(!hasVector && d[0].size() > 0)
+			{ 
+				//Get values
+				currentValues_.clear();
+				d[0].at(0)->visit(*this);
+				
+				if(currentValues_.size() == 2)
+				{
+				  	hasVector=true;
+				}
+			}				
+		  }
+	}
+	
+ 	if(!collectedLayerExists)
+	{	
+	  	setText(s);
+  		return;
+	}
+	 
+	//----------------------------------
+	// If any of the layers have data
+	//----------------------------------
+	 	 
+	s+="<br>";	
+	s+="<table>";
+		
+	//Create table header
+	s+="<tr><td class=\"first\">Layer</td>";
+	if(hasValue)
+	{
+		int colSpan=1;
+		QString valueLabel("Value");
+		if(hasVector)
+		{
+		  	colSpan=2;
+			valueLabel="Value(s)";
+		}	
+			  		  
+		if(hasScaledValue)
+		{
+			s+="<td class=\"first\"> Scaled Value</td>";
+		}
+		
+		s+="<td class=\"first\" colspan=\"" + QString::number(colSpan) + "\">" + valueLabel + "</td>";			
+	}
+		
+	s+="<td class=\"first\">" + nameX + "</td><td class=\"first\">" + nameY + "</td>";
+	if(hasDistance)
+	{
+		s+="<td class=\"first\">Dist (km)</td>";
+	}
+	s+="</tr>";
+	
+		
+	//Loop for each layer
+	foreach(ValuesCollector d,layerData)
+	{
+		if(d.collected() == false)
+			continue;
+			
+		s+="<tr>";
+				
+		//Cell: layer name
+		QStringList lst=QString::fromStdString(d.name()).split("/");
+		if(!lst.isEmpty())
+		{
+			QString layerName=lst.last();
+			layerName.truncate(8);
+			s+="<td>" + layerName + "</td>"; 
+		}
+		else
+		{
+		 	s+="<td></td>"; 
+		}				  
+		
+		//We only check the first point in the collector (at present there
+		//must be only one point anyway!!)  
+		if(d[0].size() == 0)
+		{
+			s+="<td>-</td><td>-</td><td>-</td>";  
+			if(hasValue)
+			{		
+				s+="<td>-</td>";
+				if(hasVector)  s+="<td>-</td>";
+				if(hasScaledValue)
+				{	
+				  	s+="<td>-</td>";
+					if(hasVector)  s+="<td>-</td>";	 	
+				}
+			}
+		}	
+		else
+		{  
+		
+			ValuesCollectorData *data=d[0].at(0); 
+			
+			//Get values
+			if(d.hasValue())
+			{
+				currentValues_.clear();
+				d[0].at(0)->visit(*this);
+				
+				//----------------------------------------------------
+				// Cell: Scalar value (can be scaled or/and unscaled)
+				//----------------------------------------------------
+
+				if(currentValues_.size() == 1)		  
+				{
+					double value;
+					QString valueStr,units;
+					QString scaledTxt, unscaledTxt;	
+				
+					if(d.scaled())
+					{	
+						value=data->scaledValue();
+						units=unitsString(QString::fromStdString(d.scaledUnits()));
+						
+						if(data->missing())
+						{
+							valueStr=tr("Missing");
+							scaledTxt=valueStr;
+						}	
+						else
+						{  
+							valueStr=formatNumber(value);
+							scaledTxt=valueStr+units;
+						}
+					}
+				
+					value=data->value();
+					units=unitsString(QString::fromStdString(d.units()));	
+					if(data->missing())
+					{
+						valueStr=tr("Missing");
+						unscaledTxt=valueStr;
+					}
+					else
+					{
+					  	valueStr=formatNumber(value);
+						unscaledTxt=valueStr+units;
+					}	
+					
+					if(hasScaledValue)
+					{
+						if(d.scaled())  	
+						{
+					  		s+="<td class=\"highlight\">"+scaledTxt+"</td>";
+							//if(hasVector) s+="<td></td>";
+							s+="<td>"+unscaledTxt+"</td>";
+							if(hasVector) s+="<td></td>";
+						}
+						else
+						{  	
+					  		s+="<td></td>";
+							//if(hasVector) s+="<td></td>"; 					
+							s+="<td class=\"highlight\">"+unscaledTxt+"</td>";
+							if(hasVector) s+="<td></td>";
+						}
+					}
+					else
+					{
+						//s+="<td></td>";
+						//if(hasVector) s+="<td></td>"; 					
+						s+="<td class=\"highlight\">"+unscaledTxt+"</td>";
+						if(hasVector) s+="<td></td>";	
+					}
+				}
+			
+				//----------------------------------------------------
+				// Cell: vector value (no scaling at the moment)
+				//----------------------------------------------------
+				
+				if(currentValues_.size() == 2)		  
+				{
+					double value;
+					QString valueStr;
+					QString  value1Txt,value2Txt;	
+					QStringList units;
+					
+					value=currentValues_[0];
+					units=QString::fromStdString(d.units()).split("/");
+					for(int i=0; i < units.count(); i++)					  
+					{
+					  	units[i]=unitsString(units[i]);
+					}
+					for(int i=units.count(); i < 2; i++)
+					{
+					  	units << "";
+					}	
+										
+					if(data->missing())
+					{
+						valueStr=tr("Missing");
+						value1Txt=valueStr;
+					}
+					else
+					{  
+						valueStr=formatNumber(value);
+						value1Txt=valueStr+units[0];
+					}
+					
+				
+					value=currentValues_[1];
+					if(data->missing())
+					{
+						valueStr=tr("Missing");
+						value2Txt=valueStr;
+					}
+					else
+					{
+					  	valueStr=formatNumber(value);
+						
+						if(units[1].contains("(deg)"))
+						{
+							valueStr=QString::number(value,'f',2);  	
+						}	
+							
+						value2Txt=valueStr+units[1];
+					}
+					
+				
+					if(hasScaledValue)
+					{					
+						//s+="<td></td><td></td>";
+						s+="<td></td>";
+						s+="<td class=\"highlight\">"+value1Txt+"</td>";
+						s+="<td class=\"highlight\">"+value2Txt+"</td>";
+					}
+					else				
+					{
+						s+="<td class=\"highlight\">"+value1Txt+"</td>";
+						s+="<td class=\"highlight\">"+value2Txt+"</td>";				  
+					}
+					
+				}
+			}	
+			
+			//Cell: pos X			
+			s+="<td>" + QString::number(data->x(),'f',2) +  "</td>";			
+			
+			//Cell: pos Y
+			s+="<td>" + QString::number(data->y(),'f',2) +  "</td>";
+				
+			//Cell: distance
+			if(hasDistance)
+			{
+				  s+="<td>" + QString::number(data->distance(),'f',2) +  "</td>";
+			}
+				
+		}
+
+		s+="</tr>";
+	}	
+
+	s+="</table>";
+	
+	setText(s);
+	
+	
+}
+
+void MvQCursorData::setText()
+{
+	QString s(QObject::tr("Cursor outside plot area!"));
+	setText(s);	
+}
+
+void MvQCursorData::setText(QString str)
+{
+	text_=str;	
+	textDoc_->setHtml(text_);
+	
+	QSizeF docSize=textDoc_->documentLayout()->documentSize();	
+	QRectF rect(0,0,docSize.width(),docSize.height());
+	
+	if(boundingRect_ != rect )
+	{
+		prepareGeometryChange(); 
+	}
+
+	boundingRect_=rect;
+}
+
+
+void MvQCursorData::mousePressEventFromView(QMouseEvent *event)
+{
+	if(activated_ && acceptMouseEvents_)
+	{
+		if(event->buttons() & Qt::LeftButton)
+		{		
+     			//Get scene position
+			QPointF pos=plotView_->mapToScene(event->pos());
+			changePositionMode(pos);	
+		}
+		/*if(event->buttons() & Qt::MidButton)
+		{		
+     			//Get scene position
+			QPointF pos=plotView_->mapToScene(event->pos());
+			changeProbeMode(pos);	
+		}*/
+	}	
+}
+
+void MvQCursorData::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+  
+  	//Scene position
+	QPointF pos = plotView_->mapToScene(event->pos());
+		
+	if(probeMode_ == FollowCursorProbe)
+	{	
+		MgQLayoutItem* dataLayout=0;
+		
+		//Now if dataLayout_ is not null it should contain the point
+		if(plotScene_->identifyPos(pos,&sceneItem_,&dataLayout))
+		{
+			QPointF posM=pos;
+			QPointF coord;
+			if(pointInMagnifier_)
+			{
+				posM=magnifierScenePos_+(pos-magnifierScenePos_)/magnifierZoomFactor_;
+			}
+
+			double searchRadiusX=2.;
+			double searchRadiusY=2.;
+			
+			float plotScale=plotScene_->plotScale();						
+			double cx=dataLayout->coordRatioX();
+			double cy=dataLayout->coordRatioY();			
+			if(cx != 0.)
+			{
+			  	searchRadiusX=20./fabs(cx*plotScale);
+			}
+			if(cy != 0.)
+			{
+			  	searchRadiusY=20./fabs(cy*plotScale);
+			}
+			
+			//qDebug() << "searchRadius:" <<  cx << cy << plotScale << searchRadiusX << searchRadiusY;
+			
+			dataLayout->mapFromSceneToGeoCoords(posM,coord);
+			//cursorData_->setCoordinates(coord);
+
+			/*QList<QPointF> posL;
+			QPointF projCoord;
+			dataLayout->mapFromSceneToProjectionCoords(pos,projCoord);
+			posL << projCoord;*/
+
+			QList<QPointF> posL;
+			posL << coord;;
+			
+			QList<ValuesCollector> layerData;
+		
+			/*QList<QStringList> txtL;
+			foreach(QPointF pp,posL)
+			{
+				txtL << QStringList();
+			}
+
+			sceneItem_->collectLayerDataForCurrentStep(posL,txtL);
+
+			setText(coord,txtL[0]);
+			
+			
+			emit positionChanged(txtL[0]);*/
+			
+			qDebug() << "cursor:" <<  coord << posL;
+			
+			sceneItem_->collectLayerDataForCurrentStep(posL,layerData,
+								   searchRadiusX,searchRadiusY);
+			
+			
+			const Transformation& transformation = dataLayout->layout().transformation();
+			QString nameX, nameY;
+			bool hasDistance=false;
+			switch(transformation.coordinateType())
+			{
+			case Transformation::GeoType:
+				nameX=tr("Lon");
+				nameY=tr("Lat");
+				hasDistance=true;
+				break;
+			case Transformation::XyType:
+			default:
+			  	nameX=tr("X");
+				nameY=tr("Y");
+				break;
+			}
+							
+			setText(coord,layerData,nameX,nameY,hasDistance);
+			
+			//emit positionChanged(coord,layerData);
+			
+			
+			
+		}
+		else
+		{
+			setText();
+		}
+
+		setCursorPos(pos);
+	}	
+	else
+	{
+		setCursorPos(pos);
+	}  
+	  
+}
+
+ void MvQCursorData::mouseReleaseEventFromView(QMouseEvent *event)
+ {
+	if(activated_ && acceptMouseEvents_)
+	{	
+		if(zoomWasPerformedAfterMouseRelease_ == false)
+		{
+			QPointF pos=plotView_->mapToScene(event->pos());
+			changePositionMode(pos);
+		}
+	}
+ }
+
+
+QString  MvQCursorData::unitsString(QString val)
+{
+	QString res;
+	
+	if(val == "m s**-1")
+	  	res="m/s";
+	else if(val == "deg c")
+	  	res="°C";
+	else if(val == "degrees")
+	  	res="deg";
+	else res=val;
+		
+	if(!res.isEmpty())						
+		res=" (" + res + ")";
+	
+	return res;
+}	
+
+
+QString MvQCursorData::formatNumber(double value)
+{
+	QString valueStr;
+	double  absValue = abs(value);
+
+	if (trunc(value) == value)					// is the number an integer?
+		valueStr = QString::number(value,'f',0);// - cut off the decimal places
+	else if (absValue < 0.000001 ||				// is the number very small?
+	         absValue > 1000000000)				// or very large?
+		valueStr = QString::number(value,'e');	// - use scientific notation
+	else										// otherwise
+		valueStr = QString::number(value,'f');	// - use 6 decimal places (default)
+
+	return valueStr;
+}
+
+
+
+void MvQCursorData::setMagnifierInfo(bool pointInMag,QPointF magPos,float magZoomFactor)
+{
+	pointInMagnifier_=pointInMag;
+	magnifierScenePos_=magPos;
+	magnifierZoomFactor_=magZoomFactor;
+}
+
+void MvQCursorData::visit(const ValuesCollectorData& data)
+{	
+	currentValues_.push_back(data.value());  
+}
+
+void MvQCursorData::visit(const ValuesCollectorUVData& data)
+{
+	currentValues_.push_back(data.xComponent()); 
+	currentValues_.push_back(data.yComponent()); 
+}
+
+void MvQCursorData::visit(const ValuesCollectorSDData& data)
+{
+	currentValues_.push_back(data.speed()); 
+	currentValues_.push_back(data.direction()); 
+}
diff --git a/src/uPlot/MvQCursorData.h b/src/uPlot/MvQCursorData.h
new file mode 100644
index 0000000..b7871b4
--- /dev/null
+++ b/src/uPlot/MvQCursorData.h
@@ -0,0 +1,107 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQCursorData_H
+#define MvQCursorData_H
+
+#include <QBrush>
+#include <QGraphicsItem>
+#include <QPen>
+
+#include "MvQPlotItem.h"
+
+#include "Layer.h"
+
+class QTextDocument;
+
+class MgQLayoutItem;
+class MgQSceneItem;
+
+using namespace std;
+
+class MvQCursorData : public MvQPlotItem, public ValuesCollectorVisitor
+{
+
+Q_OBJECT  
+  
+public:
+	enum PositionMode {Anchored, FollowCursor};
+	enum ProbeMode {AnchoredProbe, FollowCursorProbe};
+
+	MvQCursorData(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQCursorData();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+	
+	void setActivated(bool);
+	void prepareForReset();
+	void reset();
+
+	void setPositionMode(PositionMode);
+	void changePositionMode(QPointF&);
+	void changeProbeMode(QPointF&);
+	void setCursorPos(QPointF&);
+	void setText(QPointF,QList<ValuesCollector> layerData,QString,QString,bool);
+	void setText();	
+	void setMagnifierInfo(bool,QPointF magScenePos=QPointF(),float magZoomFactor=1.);
+
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);	
+
+	void setZoomWasPerformedAfterMouseRelease(bool b) {zoomWasPerformedAfterMouseRelease_=b;} ;
+		
+	QString  unitsString(QString);
+	
+	void visit(const ValuesCollectorData&);
+	void visit(const ValuesCollectorUVData&);
+	void visit(const ValuesCollectorSDData&);
+
+signals:
+    	void positionChanged(QPointF,QList<ValuesCollector>);
+	void probeEnabled(bool);
+private:	
+	void setText(QString);
+	QString formatNumber(double);
+
+	QGraphicsScene* scene_;
+	QString text_;
+	QPointF         coordinates_;
+
+	PositionMode    positionMode_;		
+	QPointF         offsetFromCursor_;	
+	
+	ProbeMode    	probeMode_;
+	
+	QRectF		 boundingRect_;
+	QRectF		 textBoundingRect_;
+	QFont*           font_;
+	QFontMetrics*    fontMetrics_;
+	QTextDocument*   textDoc_;
+
+	QPen	fontPen_;
+	QBrush  fontBrush_;
+	QPen    areaPen_;
+	QBrush  areaBrush_;
+
+	MgQLayoutItem*     dataLayout_;
+	MgQSceneItem*      sceneItem_;
+
+	bool pointInMagnifier_;
+	QPointF magnifierScenePos_;
+	float magnifierZoomFactor_;
+	bool zoomWasPerformedAfterMouseRelease_; 
+	
+	vector<float>currentValues_;
+};
+
+
+
+#endif
diff --git a/src/uPlot/MvQCursorDataWidget.cc b/src/uPlot/MvQCursorDataWidget.cc
new file mode 100644
index 0000000..9184001
--- /dev/null
+++ b/src/uPlot/MvQCursorDataWidget.cc
@@ -0,0 +1,73 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QDebug>
+#include <QFile> 
+#include <QHeaderView>
+#include <QLabel>
+#include <QHBoxLayout>
+#include <QMenu>
+#include <QPlainTextEdit>
+#include <QSlider>
+#include <QSpinBox>
+#include <QSplitter>
+#include <QTextBrowser>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvQCursorDataWidget.h"
+
+MvQCursorDataWidget::MvQCursorDataWidget(QWidget *parent) : QWidget(parent)
+{
+	QVBoxLayout *layout = new QVBoxLayout;
+	setLayout(layout);
+		
+	te_=new QPlainTextEdit;
+	layout->addWidget(te_);
+
+}
+
+
+MvQCursorDataWidget::~MvQCursorDataWidget()
+{
+}
+
+
+/*void MvQCursorDataWidget::dataIsAboutToChange()
+{
+	model_->dataIsAboutToChange();
+}*/
+
+void MvQCursorDataWidget::slotReset(QPointF coord,QList<ValuesCollector> val)
+{	
+	/*QString s;
+	s+="Lat=";
+	s+=QString::number(coord.y(),'f',2);
+	s+=" Lon=";
+	s+=QString::number(coord.x(),'f',2);
+
+	foreach(ValuesCollector d,val)
+	{
+		if(d.size() > 0)
+		{
+		  	for(ValuesCollectorPoint::iterator it =  d[0].begin(); it != d[0].end(); it++)			  			
+			{
+		  		s+="\n";
+				s+=QString::number((*it).value()) + " (";
+				s+=QString::number((*it).y(),'f',2) + ",";
+				s+=QString::number((*it).x(),'f',2) + ")";
+			}	
+		}
+	}	
+	
+	te_->setPlainText(s);*/
+	
+}
diff --git a/src/uPlot/MvQCursorDataWidget.h b/src/uPlot/MvQCursorDataWidget.h
new file mode 100644
index 0000000..6144b7a
--- /dev/null
+++ b/src/uPlot/MvQCursorDataWidget.h
@@ -0,0 +1,47 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQCursorDataWidget_H
+#define MvQCursorDataWidget_H
+
+#include <QModelIndex>
+#include <QWidget>
+
+class QAction;
+class QLabel;
+class QPlainTextEdit;
+class QSlider;
+class QSpinBox;
+class QSplitter;
+class QTextBrowser;
+class QToolButton;
+class QTreeView;
+
+#include "Layer.h"
+
+class MvQCursorDataWidget : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MvQCursorDataWidget(QWidget *parent=0);
+	~MvQCursorDataWidget();
+	//void dataIsAboutToChange();
+	//void reset(QStringList);
+	
+public slots:
+	//void slotShowContextMenu(const QPoint&);
+	void slotReset(QPointF,QList<ValuesCollector>);
+
+protected:	
+	QPlainTextEdit *te_;
+};
+
+#endif
+
diff --git a/src/uPlot/MvQDataWidget.cc b/src/uPlot/MvQDataWidget.cc
new file mode 100644
index 0000000..65429eb
--- /dev/null
+++ b/src/uPlot/MvQDataWidget.cc
@@ -0,0 +1,426 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QButtonGroup>
+#include <QDebug>
+#include <QLabel>
+#include <QListWidget>
+#include <QHBoxLayout>
+#include <QPainter>
+#include <QStackedLayout>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "MgQSceneItem.h"
+
+#include "MvQDataWidget.h"
+#include "MvQLayerDataWidget.h"
+#include "MvQLayerMetaDataWidget.h"
+
+MvQDataWidget::MvQDataWidget(MgQPlotScene *scene,MvQPlotView *plotView,QWidget *parent) : QWidget(parent), sceneItem_(0)
+{
+	metaLoaded_=false;
+	dataLoaded_=false;
+	
+	QVBoxLayout *layout = new QVBoxLayout;
+	layout->setContentsMargins(2,2,2,2);
+	setLayout(layout);
+	
+	//----------------------
+	// Layer selector list	
+	//----------------------
+	
+	QHBoxLayout *hb=new QHBoxLayout;
+	layout->addLayout(hb);
+	
+	layerList_=new QListWidget;
+	layerList_->setViewMode(QListView::IconMode);
+	layerList_->setFlow(QListView::LeftToRight);
+	layerList_->setMovement(QListView::Static);
+	layerList_->setWrapping(false);
+    	layerList_->setIconSize(QSize(48, 48));
+	layerList_->setMaximumHeight(75);
+     	layerList_->setSpacing(5);
+	hb->addWidget(layerList_);
+
+	connect(layerList_,SIGNAL(itemActivated(QListWidgetItem*)),
+		this,SLOT(slotSelectLayerFromList(QListWidgetItem*)));
+		
+		
+	//Top row
+	hb = new QHBoxLayout;
+	hb->setContentsMargins(0,0,0,0);
+	layout->addLayout(hb);
+	
+	//connect(showLayerTb_,SIGNAL(toggled(bool)),
+	//	this,SLOT(slotLayerMeta(bool)));
+	
+	showMetaTb_ = new QToolButton(this);
+	showMetaTb_->setText(tr("Metadata"));
+	showMetaTb_->setToolTip(tr("View metadata"));
+	//showMetaTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/meta_data.svg")));
+	showMetaTb_->setCheckable(true);
+	showMetaTb_->setChecked(false);
+	//showMetaTb_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+	
+	hb->addWidget(showMetaTb_);
+	//hb->addStretch(1);
+	
+	//connect(showLayerTb_,SIGNAL(toggled(bool)),
+	//	this,SLOT(slotLayerMeta(bool)));
+	
+	showDataTb_ = new QToolButton(this);
+	showDataTb_->setText(tr("Values"));
+	showDataTb_->setToolTip(tr("View values"));
+	//showDataTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/meta_data.svg")));
+	showDataTb_->setCheckable(true);
+	showDataTb_->setChecked(false);
+	//showDataTb_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+	hb->addWidget(showDataTb_);
+	hb->addStretch(1);
+
+	//connect(showMetaTb_,SIGNAL(toggled(bool)),
+	//	this,SLOT(slotShowMeta(bool)));
+	
+	showBg_=new QButtonGroup(this);
+	showBg_->setExclusive(true);
+	showBg_->addButton(showMetaTb_,0);
+	showBg_->addButton(showDataTb_,1);
+
+	connect(showBg_,SIGNAL(buttonClicked(int)),
+		this,SLOT(slotShowContents(int)));
+					
+	//----------------------
+	// Central
+	//----------------------
+	
+	centralLayout_=new QStackedLayout;
+	layout->addLayout(centralLayout_,1);
+			
+	//----------------------
+	// Metadata widget
+	//----------------------
+	
+	metaWidget_=new MvQLayerMetaDataWidget();
+	centralLayout_->addWidget(metaWidget_);	
+	
+	//----------------------
+	// Data widget
+	//----------------------
+	
+	dataWidget_=new MvQLayerDataWidget(scene,plotView);
+	centralLayout_->addWidget(dataWidget_);		
+						
+}
+
+
+MvQDataWidget::~MvQDataWidget()
+{
+}
+
+MgQLayerItem* MvQDataWidget::currentLayerFromList()
+{	
+  	QListWidgetItem *item=layerList_->currentItem();
+	if(!item)
+	{  
+		return 0;
+	}  
+	
+	int layerIndex=item->data(Qt::UserRole).toInt();
+	if( layerIndex >=0 &&  layerIndex < sceneItem_->layerItems().count())
+	{  
+		return sceneItem_->layerItems().at(layerIndex);
+	}
+	else
+	{
+	  	return 0;
+	}	
+}
+
+void MvQDataWidget::setCurrentItemForLayerList(QString title)
+{		
+	for(int i=0; i < layerList_->count(); i++)
+	{
+	  	if(layerList_->item(i)->text() == title)
+		{
+		  	layerList_->setCurrentRow(i,QItemSelectionModel::SelectCurrent);
+			return;
+		}
+	}	
+}	
+
+void MvQDataWidget::setCurrentItemForLayerList(MgQLayerItem* item)
+{	
+	if(!item)
+  		return;
+	
+	int layerIndex= sceneItem_->layerItems().indexOf(item);
+	if(layerIndex != -1)
+	{
+		for(int i=0; i < layerList_->count(); i++)
+		{
+	  		if(layerList_->item(i)->data(Qt::UserRole).toInt() == layerIndex)
+			{
+		  		layerList_->setCurrentRow(i,QItemSelectionModel::SelectCurrent);
+				break;
+			}
+		}
+	}	
+}	
+	
+
+void MvQDataWidget::slotShowContents(int id)
+{
+	MgQLayerItem* layer;
+	int currentId=centralLayout_->currentIndex();
+		
+	layer=currentLayerFromList();	
+	
+	//We need to do it all the time to pick up the current layer stacking order
+	//resetLayerList(sceneItem_,layer);
+	
+	if(id == 0)
+	{
+		if(!metaLoaded_)
+		{
+			metaWidget_->reset(sceneItem_,layer);	
+			metaLoaded_=true;
+		}
+		else
+		{  
+			metaWidget_->setLayer(layer);
+		}
+	}
+	else if(id == 1)
+	{
+		if(!dataLoaded_)
+		{
+			dataWidget_->reset(sceneItem_,layer);	
+			dataLoaded_=true;
+		}
+		else
+		{  
+			dataWidget_->setLayer(layer);
+		}
+	}
+										
+  	centralLayout_->setCurrentIndex(id);  
+}  
+
+void MvQDataWidget::slotFrameChanged()
+{
+  	switch(centralLayout_->currentIndex())
+	{
+	case 0:
+	  	metaWidget_->slotFrameChanged(); 
+		break;
+	case 1:
+	  	dataWidget_->slotFrameChanged(); 
+		break;
+	default:
+	  	break;
+	}
+}
+
+void  MvQDataWidget::slotSelectLayerFromList(QListWidgetItem* /*item*/)
+{  	
+  	int currentId=centralLayout_->currentIndex();
+	switch(currentId)
+	{
+	case 0:	
+		metaWidget_->setLayer(currentLayerFromList());	  
+		break;
+	case 1:	
+		dataWidget_->setLayer(currentLayerFromList());	  
+		break;
+	default:
+	  	break;
+	}  
+}  
+
+void MvQDataWidget::slotPlotScaleChanged()
+{
+  	dataWidget_->updateProbe();	 	
+}  
+  
+  
+void MvQDataWidget::layersAreAboutToChange()
+{
+	switch(centralLayout_->currentIndex())
+	{
+	case 0:
+	  	if(layerList_->currentItem())
+		{
+		  	lastSelectedLayerText_=layerList_->currentItem()->text();
+		}
+		break;
+	case 1:
+	  	if(layerList_->currentItem())
+		{
+		  	lastSelectedLayerText_=layerList_->currentItem()->text();
+		}
+		break;			
+	default:
+	  	break;
+	}
+}
+
+void MvQDataWidget::reset(MgQSceneItem *sceneItem)
+{
+	sceneItem_=sceneItem;
+	
+	MgQLayerItem *layer=0;
+	MgQLayerItem *lastLayer=0;
+	
+	for(int i=sceneItem_->layerItems().count()-1; i >=0; i--)
+	{
+	  	MgQLayerItem *item=sceneItem_->layerItems().at(i);
+	  	lastLayer=item;
+		
+	  	QString str(item->layer().name().c_str());
+		QStringList lst=str.split("/");
+		if(!lst.isEmpty())
+		{
+			str=lst.last();
+		}		
+
+		if(str == lastSelectedLayerText_)
+		{  
+			layer=item;
+		}
+	}
+		
+	if(!layer)
+	  	layer=lastLayer;
+	
+	
+	int currentId=centralLayout_->currentIndex();
+	
+	//reset widget load states
+	metaLoaded_=false;
+	dataLoaded_=false;
+	
+	resetLayerList(layer);
+
+	switch(currentId)
+	{
+	case 0:	
+		metaWidget_->reset(sceneItem,layer);		
+		metaLoaded_=true;
+		break;
+	case 1:	
+		dataWidget_->reset(sceneItem,layer);		
+		dataLoaded_=true;	
+	default:
+	  	break;
+	}	
+}
+
+//Update layer selector
+
+void MvQDataWidget::resetLayerList(MgQLayerItem * layer)
+{
+	resetLayerList(false);
+	setCurrentItemForLayerList(layer);
+}
+
+
+void MvQDataWidget::resetLayerList(bool restoreCurrentItem)
+{	
+	if(restoreCurrentItem)
+	{  
+  		if(layerList_->currentItem())
+		{
+			lastSelectedLayerText_=layerList_->currentItem()->text();
+		}
+	}
+	
+  	layerList_->clear();
+	
+	if(!sceneItem_)
+	  	return;
+	
+	std::map<int,int> stackLevel;
+	for(int i=0; i < sceneItem_->layerItems().count(); i++)
+	{
+		stackLevel[sceneItem_->layerItems().at(i)->stackLevel()]=i;
+	}
+	
+	//Check is needed!!
+		
+	for(int i=sceneItem_->layerItems().count()-1; i >=0; i--)
+	{
+	//  	MgQLayerItem *item=sceneItem->layerItems().at(i);
+	  	
+		MgQLayerItem *item=sceneItem_->layerItems().at(stackLevel[i]);	
+
+		QString str(item->layer().name().c_str());
+		QStringList lst=str.split("/");
+		if(!lst.isEmpty())
+		{
+			str=lst.last();
+		}		
+
+		QPixmap pix=QPixmap::fromImage(item->preview().scaled(QSize(48,48),Qt::KeepAspectRatio));
+		QPainter painter(&pix);
+		painter.setPen(QColor(230,230,230));
+		painter.drawRect(pix.rect().adjusted(1,1,-1,-1));
+			
+		QListWidgetItem *lstItem=new QListWidgetItem(pix,str);
+		lstItem->setData(Qt::UserRole,stackLevel[i]); // We store the real index 
+		layerList_->addItem(lstItem);		
+	}
+	
+	if(restoreCurrentItem)
+	{  
+		setCurrentItemForLayerList(lastSelectedLayerText_);
+	}	
+}
+
+void MvQDataWidget::writeSettings(QSettings& settings)
+{
+  	settings.beginGroup("MvQDataWidget");
+  
+	settings.setValue("id",centralLayout_->currentIndex());
+	settings.setValue("histoEnabled",metaWidget_->isHistoEnabled());
+	settings.setValue("histoVisdefIndex",metaWidget_->histoVisdefCurrentIndex());
+	settings.setValue("statsEnabled",metaWidget_->isStatsEnabled());
+	
+	settings.endGroup();
+	
+	dataWidget_->writeSettings(settings);	
+}
+
+void MvQDataWidget::readSettings(QSettings& settings)
+{
+  	settings.beginGroup("MvQDataWidget");
+	
+	QVariant val;
+	
+	val=settings.value("id");	
+	QAbstractButton *tb=showBg_->button((val.isNull())?0:val.toInt());
+	if(tb)
+	  	tb->click();
+	else
+		showBg_->button(0)->click();
+	
+	val=settings.value("histoEnabled");
+	metaWidget_->setHistoEnabled((val.isNull())?true:val.toBool());
+	
+	val=settings.value("histoVisdefIndex");
+	metaWidget_->setHistoVisdefInitialIndex((val.isNull())?0:val.toInt());
+	
+	val=settings.value("statsEnabled");
+	metaWidget_->setStatsEnabled((val.isNull())?true:val.toBool());
+
+  	settings.endGroup();
+	
+	dataWidget_->readSettings(settings);
+  
+}  
\ No newline at end of file
diff --git a/src/uPlot/MvQDataWidget.h b/src/uPlot/MvQDataWidget.h
new file mode 100644
index 0000000..e9cd1d3
--- /dev/null
+++ b/src/uPlot/MvQDataWidget.h
@@ -0,0 +1,70 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQDataWidget_H
+#define MvQDataWidget_H
+
+#include <QSettings>
+#include <QWidget>
+
+class QButtonGroup;
+class QListWidget;
+class QListWidgetItem;
+class QStackedLayout;
+class QToolButton;
+
+class MgQLayerItem;
+class MgQPlotScene;
+class MgQSceneItem;
+
+class MvQLayerDataWidget;
+class MvQLayerMetaDataWidget;
+class MvQPlotView;
+
+class MvQDataWidget : public QWidget
+{
+Q_OBJECT
+
+public:
+	MvQDataWidget(MgQPlotScene*,MvQPlotView*,QWidget *parent=0);
+	~MvQDataWidget();
+	void layersAreAboutToChange();
+	void reset(MgQSceneItem *);
+	void resetLayerList(bool restoreCurrentItem=true);
+	void resetLayerList(MgQLayerItem*);
+	void writeSettings(QSettings&);
+	void readSettings(QSettings&);
+
+public slots:
+	void slotPlotScaleChanged();
+	void slotFrameChanged();
+	void slotShowContents(int);
+	void slotSelectLayerFromList(QListWidgetItem*);
+	
+protected:
+	MgQLayerItem* currentLayerFromList();
+	void setCurrentItemForLayerList(QString);
+	void setCurrentItemForLayerList(MgQLayerItem*);
+	
+	QStackedLayout *centralLayout_;
+	MvQLayerMetaDataWidget* metaWidget_;
+	MvQLayerDataWidget* dataWidget_;
+	QToolButton *showLayerTb_;
+	QToolButton *showMetaTb_;
+	QToolButton *showDataTb_;
+	QButtonGroup *showBg_;
+	QListWidget* layerList_;
+	MgQSceneItem *sceneItem_;
+	QString lastSelectedLayerText_;
+	bool metaLoaded_;
+	bool dataLoaded_;
+};
+
+#endif
+
diff --git a/src/uPlot/MvQLayerContentsIcon.cc b/src/uPlot/MvQLayerContentsIcon.cc
new file mode 100644
index 0000000..94a47b1
--- /dev/null
+++ b/src/uPlot/MvQLayerContentsIcon.cc
@@ -0,0 +1,149 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQLayerContentsIcon.h"
+
+#include "MvQApplication.h"
+
+#include "MvPath.hpp"
+#include "GenAppService.hpp"
+#include "ObjectList.h"
+
+#include "uPlotBase.h"
+
+#include "MgQSceneItem.h"
+
+MvQLayerContentsIcon::MvQLayerContentsIcon(const MgQIcon &icon) : 
+                   canBeDeleted_(false), canBeEdited_(false), canBeSaved_(false), isData_(false)		
+{	
+  	path_=icon.name_;
+	type_=icon.class_;
+	id_=icon.id_;
+  
+	QStringList lst=icon.name_.split("/");
+	if(!lst.isEmpty())
+	{
+		name_=lst.last();
+	}
+	
+	Cached n(type_.toStdString().c_str());	
+	MvRequest r=ObjectList::Find("object",n);
+	
+	const char* pixmap=r("pixmap");
+	
+	if(pixmap)
+		pix_=QPixmap::fromImage(QImage(pixmap,"xpm")).scaled(QSize(24,24),Qt::KeepAspectRatio,Qt::SmoothTransformation);
+	  
+	//Cached iconFileName = MakeIconPath(type_.toStdString().c_str());
+	//qDebug() <<  "icon" << (const char*)iconFileName;
+	//pix_=QPixmap::fromImage(QImage((const char*)iconFileName,"xpm")).scaled(QSize(24,24),Qt::KeepAspectRatio,Qt::SmoothTransformation);				 
+	Cached verb(type_.toStdString().c_str());
+
+	canBeDeleted_ = false;
+	canBeEdited_  = false;
+	canBeSaved_   = false;
+	
+	if(ObjectList::IsDataUnit(verb))
+	{
+		canBeDeleted_ = true;
+		canBeEdited_  = false;
+		canBeSaved_   = false;
+	}
+	else if( ObjectList::IsVisDef(verb)) // || 
+//		 ObjectList::IsPText(verb)  )
+	{
+		canBeDeleted_ = true;
+		canBeEdited_   = true;
+		canBeSaved_   = true;
+	}
+	else if(ObjectList::IsView(verb))
+	{
+		canBeDeleted_ = false;
+		canBeEdited_   = true;
+		canBeSaved_   = true;
+	}
+	else
+	{
+		canBeDeleted_ = false;
+		canBeEdited_   = false;
+		canBeSaved_   = false;
+	}
+	
+	if(ObjectList::IsDataUnit(verb))
+		isData_=true;  	
+	
+	
+	//Check if it is a default icon
+	//int idefault = icon_.Request()("_DEFAULT");
+	//if (idefault) canBeSaved_ = false;
+}
+
+
+void  MvQLayerContentsIcon::startEditor()
+{
+	if(!canBeEdited_)
+	  	return;
+		
+	// I need to be edited by MetviewUI
+	// Retrieve my Request
+	//MvRequest iconRequest = icon_.Request();
+
+	MvRequest req;
+	req.read(MakeUserPath(path_.toStdString().c_str()));
+
+	//cout << "ContentsItem::Edit " << endl;
+	req.print();
+
+	// editor will commit suicide
+	//ContentsItemEditor* editor = new ContentsItemEditor(MakeName());
+
+	// Ask GenApp to edit my request
+	//CallGenAppService(*editor,&MvQLayerContentsWidget::iconEdited,iconRequest);
+	
+	CallGenAppService(*this,&MvQLayerContentsIcon::edited,req);
+
+}
+
+void MvQLayerContentsIcon::edited(MvRequest& newIconRequest)
+{
+	// Nothing to be edited. Button CANCEL selected by user.
+	if(!newIconRequest) return;
+
+	newIconRequest.print();
+	newIconRequest ("_CONTENTS_ICON_EDITED") = id_.toInt();
+	newIconRequest ("ICON_ID") = id_.toInt();
+
+	// Retrieve the correct name and other parameters
+	newIconRequest("_NAME")  = name_.toStdString().c_str();
+	
+	// Flag indicating that data was edited from Contents window	
+
+	// Create a new drop request
+
+	newIconRequest("DROP_ID")   = 2;
+	newIconRequest("_CONTENTS") = 1;
+	newIconRequest("_ACTION") = "EDIT";
+	
+	
+	//!!!!!!!!!!!!!!
+	//We would need signals and slots here!!!
+	//uPlotBase::Instance().processContentsRequest(newIconRequest);
+	
+	
+	
+	
+	//MvQApplication::instance()->processDropRequest(&dropRequest);
+	
+	//MvApplication::callService ("uPlot", dropRequest, 0 );
+}
+	
+	
+	
\ No newline at end of file
diff --git a/src/uPlot/MvQLayerContentsIcon.h b/src/uPlot/MvQLayerContentsIcon.h
new file mode 100644
index 0000000..3ac396a
--- /dev/null
+++ b/src/uPlot/MvQLayerContentsIcon.h
@@ -0,0 +1,48 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLayerContentsIcon_H
+#define MvQLayerContentsIcon_H
+
+#include <QPixmap>
+
+#include "MvRequest.h"
+
+class MgQIcon;
+
+class MvQLayerContentsIcon
+{
+public:
+	MvQLayerContentsIcon(const MgQIcon&);
+
+	QString name() {return name_;}
+	QPixmap pixmap() {return pix_;}
+	QString path() {return path_;}
+	QString id() {return id_;}
+	void startEditor();
+	void edited(MvRequest&);	
+	bool canBeDeleted() {return canBeDeleted_;}
+	bool canBeEdited() {return canBeEdited_;}
+	bool canBeSaved() {return canBeSaved_;}
+	bool isData() {return isData_;}
+	
+protected:		
+  	QString name_;
+	QString path_;
+	QString type_;
+	QString id_;
+	QPixmap pix_;
+	
+	bool canBeDeleted_;
+	bool canBeEdited_;
+	bool canBeSaved_;
+	bool isData_;
+};
+
+#endif
diff --git a/src/uPlot/MvQLayerDataWidget.cc b/src/uPlot/MvQLayerDataWidget.cc
new file mode 100644
index 0000000..cf08157
--- /dev/null
+++ b/src/uPlot/MvQLayerDataWidget.cc
@@ -0,0 +1,607 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QLabel>
+#include <QStackedLayout>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "MvQLayerDataWidget.h"
+
+#include "Layer.h"
+#include "Transformation.h"
+
+#ifdef METVIEW_ODB_NEW
+#include "MvQOdbDataWidget.h"
+#endif
+
+#include "MvQPlaceMark.h"
+#include "MvQPlotView.h"
+
+#include "MgQPlotScene.h"
+#include "MgQRootItem.h"
+#include "MgQSceneItem.h"
+
+MvQLayerDataWidget::MvQLayerDataWidget(MgQPlotScene *plotScene,MvQPlotView *plotView,QWidget *parent) : 
+          QWidget(parent),
+          plotScene_(plotScene),
+          plotView_(plotView),
+          sceneItem_(0), 
+          layer_(0),
+          dataProbe_(0)
+{
+  	layout_=new QVBoxLayout;
+	layout_->setContentsMargins(0,0,0,0);
+	//layout_->setSpacing(1);
+	setLayout(layout_);
+	
+	//Panels
+		
+	panelLayout_=new QStackedLayout;
+	layout_->addLayout(panelLayout_);
+	
+	QWidget *emptyWidget=new QWidget(this);
+	QVBoxLayout *emptyVb=new QVBoxLayout(emptyWidget);
+	QLabel *label=new QLabel(tr("No data is available for this layer!"),this);
+	emptyVb->addWidget(label);
+	emptyVb->addStretch(1);
+	panelLayout_->addWidget(emptyWidget);
+	
+	QPair<PanelType,QWidget*> item(EmptyPanel,label);		
+	panels_ << item;
+		
+	//Data probe
+	
+	QHBoxLayout *probeHb=new QHBoxLayout();
+	layout_->addLayout(probeHb);
+	
+	probeTb_=new QToolButton(this);
+	probeTb_->setToolTip(tr("Enable data probe"));
+	probeTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/data_probe.svg")));
+	probeTb_->setText("Probe");
+	probeTb_->setCheckable(true);
+	probeTb_->setChecked(false);	
+	
+	QToolButton  *resetProbeTb = new QToolButton(this);
+	resetProbeTb->setToolTip(tr("Reset probe"));
+	resetProbeTb->setIcon(QPixmap(QString::fromUtf8(":/uPlot/reset.svg")));
+	
+	probeHb->addWidget(probeTb_);
+	probeHb->addWidget(resetProbeTb);
+	probeHb->addSpacing(24);
+
+	probeLabel_=new QLabel("",this);
+	probeLabel_->setObjectName(QString::fromUtf8("fileInfoLabel"));	
+	probeLabel_->setMargin(0);
+	probeLabel_->setAlignment(Qt::AlignLeft| Qt::AlignVCenter);
+        probeLabel_->setAutoFillBackground(true);
+        probeLabel_->setTextInteractionFlags(Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse);
+	probeLabel_->setFrameShape(QFrame::Box);
+        probeLabel_->setFrameShape(QFrame::StyledPanel);
+	//probeLabel_->setVisible(false);
+	probeHb->addWidget(probeLabel_,1);
+	//probeHb->addStretch(1);
+	
+	connect(probeTb_,SIGNAL(toggled(bool)),
+		this,SLOT(slotProbe(bool)));
+	
+	connect(resetProbeTb,SIGNAL(clicked(bool)),
+		this,SLOT(slotResetProbe(bool)));	
+		
+	updateProbeLabel();
+	
+}
+
+MvQLayerDataWidget::~MvQLayerDataWidget()
+{
+}	
+
+void MvQLayerDataWidget::updateData()
+{
+	if(!layer_ || !sceneItem_)
+	{
+	  	panelLayout_->setCurrentIndex(0);
+		return;
+	}
+	
+	//---------------------------------------------------------
+	// Check if the panel assigned to the current layer exists
+	//---------------------------------------------------------
+	
+	QMap<MgQLayerItem*,QWidget*>::iterator itP=activePanels_.find(layer_);
+	if(itP != activePanels_.end())
+	{
+		if(itP.value() == panelLayout_->currentWidget())
+			return;	
+		else
+		{	
+			panelLayout_->setCurrentWidget(itP.value());
+			return;
+		}	
+	}
+	
+	//---------------------------------------------------------
+	// Create the panel
+	//---------------------------------------------------------
+	
+	//Get metadata
+	MetaDataCollector md;
+	md["_datatype"]="";
+	md["path"]="";
+	md["hasMatrix"]="";
+	layerMetaData(md);
+		
+	//Get datatype and path
+	map<string,string>::iterator it=md.find("_datatype");
+	if(it==md.end())
+	{
+		panelLayout_->setCurrentIndex(0);
+		return;
+	}	
+	string dataType=it->second;
+
+	QString dataPath;
+	it=md.find("path");
+	if(it != md.end())
+		dataPath=QString::fromStdString(it->second);  
+		
+	//Get data indexes
+	DataIndexCollector info;
+	sceneItem_->layerDataIndexForCurrentStep(layer_,info);
+	if(info.dataIndex().size() <=0)
+	{
+	  	panelLayout_->setCurrentIndex(0);
+		return;
+	}
+	
+	//ODB
+	if(dataType == "ODB_geopoints")
+	{  
+		loadOdb(dataPath,info);
+	}
+	else if(dataType == "ODB_xy")
+	{  
+		it=md.find("hasMatrix");
+		if(it == md.end() || it->second != "true")
+		{
+			loadOdb(dataPath,info);
+		}	
+	}	
+	else
+	{
+	  	panelLayout_->setCurrentIndex(0);
+	}
+	
+}
+
+void MvQLayerDataWidget::slotFrameChanged()
+{
+	updateData();
+}
+
+void MvQLayerDataWidget::layerMetaData(MetaDataCollector &md) 
+{
+	if(!layer_ || !sceneItem_)
+		return;
+
+	sceneItem_->layerMetaDataForCurrentStep(layer_,md);	
+}
+
+void MvQLayerDataWidget::loadOdb(QString path,const DataIndexCollector& info )
+{
+#ifdef METVIEW_ODB_NEW	
+
+	if(!layer_)
+		return;
+	
+	QWidget *panel=findIdlePanel(OdbPanel);
+	MvQOdbDataWidget *w=0;
+	if(!panel)
+	{	
+		panel=new MvQOdbDataWidget(this);
+		w=static_cast<MvQOdbDataWidget*>(panel);
+		w->setMaxChunkSizeInMb(0); //we do not allow data chunks
+		
+		panelLayout_->addWidget(panel);
+		
+		QPair<PanelType,QWidget*> item(OdbPanel,panel);		
+		panels_ << item;
+		activePanels_[layer_]=panel;
+		
+		connect(w,SIGNAL(dataRowSelected(int)),
+			this,SLOT(slotSetIndex(int)));					
+	}
+	else
+	{
+	  	w=static_cast<MvQOdbDataWidget*>(panel);
+		if(activePanels_.find(layer_) == activePanels_.end())
+	 	activePanels_[layer_]=panel; 
+	}
+	
+	if(w)
+	{
+		w->init(path,info.dataIndex());
+		if(visibleOdbColumns_.count() > 0)
+		{
+		  	w->setVisibleColumns(visibleOdbColumns_);
+		}	
+	}	
+	
+	panelLayout_->setCurrentWidget(panel);
+#endif	
+}
+
+
+void MvQLayerDataWidget::slotProbe(bool b)
+{
+	if(b)
+	{   
+  		if(dataProbe_)
+		{
+	  		dataProbe_->setActivated(true);
+		}
+		else
+		{  		  
+	  		createDataProbe(); 
+		}
+		
+		
+	}
+	else
+	{
+	  	if(dataProbe_)
+		{
+		  	dataProbe_->setActivated(false);
+		}
+	}
+	
+	updateProbeLabel();
+}
+
+void MvQLayerDataWidget::slotResetProbe(bool /*b*/)
+{
+	if(dataProbe_ && dataProbe_->activated() && layoutItem_)
+	{ 
+		QRectF rect=layoutItem_->mapRectToScene(layoutItem_->boundingRect());	
+		QPointF coord;
+		layoutItem_->mapFromSceneToGeoCoords(rect.center(),coord);
+				
+		dataProbe_->setCoordinates(coord);
+		slotPointSelected(coord);
+	}	
+}
+
+void MvQLayerDataWidget::createDataProbe()
+{
+	if(dataProbe_ || !sceneItem_)
+		return;
+	
+	if(layoutItem_)
+	{	
+		QRectF rect=layoutItem_->mapRectToScene(layoutItem_->boundingRect());	
+		QPointF coord;
+		layoutItem_->mapFromSceneToGeoCoords(rect.center(),coord);
+				
+		dataProbe_=new MvQPlaceMark(plotScene_,plotView_,0);
+		//dataProbe_->setFlag(QGraphicsItem::ItemIgnoresTransformations);
+		dataProbe_->setZValue(1.8);
+		dataProbe_->setActivated(true);
+		dataProbe_->setCoordinates(coord);
+		dataProbe_->reset(layoutItem_);		
+
+		connect(dataProbe_,SIGNAL(pointSelected(QPointF)),
+			this,SLOT(slotPointSelected(QPointF)));
+			
+		connect(dataProbe_,SIGNAL(beingMoved(QPointF)),
+			this,SLOT(slotUpdateProbeLabel(QPointF)));	
+
+		plotView_->setDataProbe(dataProbe_);
+		//dataProbe_->setParentItem(plotScene_->annotationRootItem());
+		plotScene_->addItem(dataProbe_);
+	}
+}
+
+void MvQLayerDataWidget::updateProbe()
+{
+	/*if(dataProbe_ && dataProbe_->activated())
+	{	
+		dataProbe_->setCoordinates(dataProbe_->coordinates());
+		updateProbeLabel();
+	}*/
+}			
+			
+void MvQLayerDataWidget::updateProbeLabel()
+{
+	if(dataProbe_ && dataProbe_->activated())
+		slotUpdateProbeLabel(dataProbe_->coordinates());
+	else
+	  	slotUpdateProbeLabel(QPointF());
+}  
+
+void MvQLayerDataWidget::slotUpdateProbeLabel(QPointF cr)
+{
+	QString s;
+	
+	if(!layer_ || !sceneItem_)
+	{
+	 	s=tr("<i>No plot is avilable</i>");
+	}	
+	else if(dataProbe_ && dataProbe_->activated())
+	{
+	  	if(dataProbe_->isOutOfPlot())
+		{
+			s=tr("<i>Probe is out of plot</i>");	
+		}
+		else
+		{  
+			s=tr("Probe position: ");
+		  	s+="<b>" + coordXName_ + ": </b>";
+	  		s+=QString::number(cr.x());
+	  		s+="  <b>" + coordYName_ + ": </b>";
+	  		s+=QString::number(cr.y());
+		}	
+	}
+	else
+	{
+	  	s=tr("<i>Probe is disabled</i>");
+	}
+	
+	probeLabel_->setText(s);
+}	
+  
+void MvQLayerDataWidget::slotPointSelected(QPointF coord)	
+{	
+	if(!layer_ || !sceneItem_)
+	{
+	 	return;
+	}
+	
+	updateProbeLabel();
+	
+	if(dataProbe_ && 
+	   (!dataProbe_->activated() || dataProbe_->isOutOfPlot()))
+	{
+		return;
+	}	
+	  
+	QMap<MgQLayerItem*,QWidget*>::iterator it=activePanels_.find(layer_);
+	if(it == activePanels_.end())
+		return;
+	
+	QWidget *panel=it.value();
+	PanelType type=panelType(panel);
+	
+	if(type == EmptyPanel)
+	  	return;	
+  
+  	//Get the index for the position	
+	double searchRadiusX=2.;
+	double searchRadiusY=2.;
+			
+	float plotScale=plotScene_->plotScale();						
+	double cx=layoutItem_->coordRatioX();
+	double cy=layoutItem_->coordRatioY();			
+		
+	if(cx != 0.)
+	{
+		searchRadiusX=20./fabs(cx*plotScale);
+	}
+	if(cy != 0.)
+	{
+		searchRadiusY=20./fabs(cy*plotScale);
+	}
+		
+
+	ValuesCollector vc;		
+	vc.setSearchRadius(searchRadiusX,searchRadiusY);
+	vc.push_back(ValuesCollectorPoint(coord.x(),coord.y()));
+		
+	sceneItem_->collectLayerDataForCurrentStep(layer_,vc);	
+	
+	//Pass the inex to the panel widget 
+	if(vc.size()>0 && vc.at(0).size() > 0)
+	{
+		int index=vc.at(0).at(0)->index();
+		setIndexForPanel(index,type,panel);
+	}		
+}			
+
+void MvQLayerDataWidget::slotSetIndex(int index)
+{	
+	if(!dataProbe_ || !dataProbe_->activated() ||  !layer_ || !sceneItem_)
+	{
+	 	return;
+	}
+		
+	ValuesCollector vc;		
+	vc.push_back(ValuesCollectorPoint(index));
+		
+	sceneItem_->collectLayerDataForCurrentStep(layer_,vc);	
+	
+	//Pass the inex to the panel widget 
+	if(vc.size()>0 && vc.at(0).size() > 0)
+	{
+		double x=vc.at(0).at(0)->x();
+		double y=vc.at(0).at(0)->y();
+				
+		QPointF pos(x,y);		
+		dataProbe_->setCoordinates(pos);
+		updateProbeLabel();
+	}
+}
+
+void MvQLayerDataWidget::setIndexForPanel(int index,PanelType type,QWidget *panel)
+{
+	if(index == -1)
+		  return;
+
+	if(type == OdbPanel)
+	{
+#ifdef METVIEW_ODB_NEW		
+		MvQOdbDataWidget *data=static_cast<MvQOdbDataWidget*>(panel);  	
+		if(data)
+		{
+			  data->highlightRow(index);
+		}
+#endif		
+	}
+}
+
+//===============================================
+//
+// Reset
+//
+//===============================================
+
+void MvQLayerDataWidget::setLayer(MgQLayerItem* layer)
+{ 
+	layer_=layer;
+	
+	if(!layer_)
+	{
+		updateData();		
+		return;
+	}	
+			
+	updateData();	    
+} 
+
+MvQLayerDataWidget::PanelType MvQLayerDataWidget::panelType(QWidget* w)
+{
+ 	QPair<PanelType,QWidget*> p;
+  	foreach(p,panels_)
+	{
+		if(p.second == w)
+		{	  
+	  		return p.first;
+		}
+	}
+	return EmptyPanel;
+}	
+
+QWidget* MvQLayerDataWidget::findIdlePanel(PanelType type)
+{  
+	QPair<PanelType,QWidget*> p;
+  	foreach(p,panels_)
+	{
+		if(p.first == type)
+		{
+			QMap<MgQLayerItem*,QWidget*>::iterator it=activePanels_.find(layer_);  	
+			if(it == activePanels_.end())
+			{
+			  	return p.second;
+			}
+		}
+	}	
+	
+	return 0;
+}
+
+QWidget* MvQLayerDataWidget::findActivePanel(PanelType type)
+{  
+	QPair<PanelType,QWidget*> p;
+  	foreach(p,panels_)
+	{
+		if(p.first == type)
+		{
+			if(activePanels_.values().indexOf(p.second) != -1)
+			{  
+				return p.second;
+			}
+		}
+	}	
+		qDebug() << "active" << activePanels_;
+	
+	return 0;
+}
+
+void MvQLayerDataWidget::clear()
+{
+	activePanels_.clear(); 
+}
+
+void MvQLayerDataWidget::reset(MgQSceneItem* sceneItem, MgQLayerItem* layer)
+{
+	sceneItem_=sceneItem;
+	layer_=layer;
+	
+	//Save some data
+	storePanelProperties();
+		
+	activePanels_.clear();
+   	setLayer(layer_);
+	
+	layoutItem_=0;
+	if(sceneItem_)
+	{
+		layoutItem_=sceneItem_->firstProjectorItem();
+		
+		if(layoutItem_)
+		{  
+			const Transformation& transformation = layoutItem_->layout().transformation();
+			switch(transformation.coordinateType())
+			{
+			case Transformation::GeoType:
+				coordXName_=tr("Lon");
+				coordYName_=tr("Lat");
+				break;
+			case Transformation::XyType:
+			default:
+			  	coordXName_=tr("X");
+				coordYName_=tr("Y");
+				
+				break;
+			}													
+							
+			if(dataProbe_)
+			{	
+				dataProbe_->reset(layoutItem_);
+				updateProbeLabel();
+			}
+		}
+	}	
+}
+
+void MvQLayerDataWidget::storePanelProperties()
+{
+	QWidget *panel=findActivePanel(OdbPanel);
+	if(panel)
+	{
+#ifdef METVIEW_ODB_NEW
+		MvQOdbDataWidget *data=static_cast<MvQOdbDataWidget*>(panel);  	
+		if(data)
+		{
+			visibleOdbColumns_=data->visibleColumns();
+		}
+#endif		
+	}
+}	
+	
+void MvQLayerDataWidget::writeSettings(QSettings& settings)
+{
+  	settings.beginGroup("MvQLayerDataWidget");  
+	
+	//Save some data
+	storePanelProperties();
+	
+	if(visibleOdbColumns_.count() > 0)
+	{  	
+		settings.setValue("visibleOdbColumns",visibleOdbColumns_);
+	}
+	
+	settings.endGroup();	
+}
+
+void MvQLayerDataWidget::readSettings(QSettings& settings)
+{
+  	settings.beginGroup("MvQLayerDataWidget");
+	visibleOdbColumns_=settings.value("visibleOdbColumns").toStringList();
+  	settings.endGroup(); 
+}  
\ No newline at end of file
diff --git a/src/uPlot/MvQLayerDataWidget.h b/src/uPlot/MvQLayerDataWidget.h
new file mode 100644
index 0000000..710648e
--- /dev/null
+++ b/src/uPlot/MvQLayerDataWidget.h
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLayerDataWidget_H
+#define MvQLayerDataWidget_H
+
+#include <QSettings>
+#include <QWidget>
+
+class QLabel;
+class QStackedLayout;
+class QToolButton;
+class QVBoxLayout;
+
+class MvQPlaceMark;
+class MvQPlotView;
+
+class MgQSceneItem;
+class MgQPlotScene;
+
+
+#include "MgQLayerItem.h"
+	
+class MvQLayerDataWidget : public QWidget
+{
+  
+Q_OBJECT  
+
+public:
+    	MvQLayerDataWidget(MgQPlotScene*,MvQPlotView*,QWidget *parent=0);
+	~MvQLayerDataWidget();
+	
+	void updateProbe();
+	void reset(MgQSceneItem*,MgQLayerItem*);	
+	void setLayer(MgQLayerItem*);
+	void writeSettings(QSettings&);
+	void readSettings(QSettings&);
+
+public slots:
+	void slotFrameChanged();
+	void slotProbe(bool);
+	void slotResetProbe(bool);
+	void slotUpdateProbeLabel(QPointF);
+	void slotPointSelected(QPointF);
+	void slotSetIndex(int);
+
+protected:      
+	enum PanelType {EmptyPanel,OdbPanel}; 
+  
+  	void updateData();
+	void layerMetaData(MetaDataCollector &);
+	void loadOdb(QString,const DataIndexCollector&);
+	void setIndexForPanel(int,PanelType,QWidget *);
+	PanelType panelType(QWidget*);
+	QWidget* findIdlePanel(PanelType);
+	QWidget* findActivePanel(PanelType);
+	void storePanelProperties();
+	void clear();	
+	void createDataProbe();
+	void updateProbeLabel();
+	
+	MgQPlotScene* plotScene_;
+	MvQPlotView* plotView_;
+	MgQSceneItem* sceneItem_;
+	MgQLayoutItem* layoutItem_;
+	MgQLayerItem* layer_;
+	QVBoxLayout *layout_;
+	QStackedLayout* panelLayout_;
+	QMap<MgQLayerItem*,QWidget*> activePanels_;
+	QList<QPair<PanelType,QWidget*> > panels_;
+	
+	QToolButton* probeTb_;
+	QLabel* probeLabel_;
+	MvQPlaceMark* dataProbe_;
+	
+	QString coordXName_;
+	QString coordYName_;
+	
+	QStringList visibleOdbColumns_;
+	
+ 	
+}; 
+
+#endif
\ No newline at end of file
diff --git a/src/uPlot/MvQLayerMetaDataWidget.cc b/src/uPlot/MvQLayerMetaDataWidget.cc
new file mode 100644
index 0000000..66dc6dc
--- /dev/null
+++ b/src/uPlot/MvQLayerMetaDataWidget.cc
@@ -0,0 +1,844 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QComboBox>
+#include <QDebug>
+#include <QFile>
+#include <QLabel>
+#include <QListWidget>
+#include <QPainter>
+#include <QScrollBar>
+#include <QTextEdit>
+#include <QTextStream>
+#include <QVBoxLayout>
+
+#include "MvQLayerMetaDataWidget.h"
+
+#include "Layer.h"
+#include "MvKeyProfile.h"
+#include "MvQKeyManager.h"
+#include "MgQPlotScene.h"
+#include "MgQSceneItem.h"
+
+#include "Cached.h"
+#include "MvPath.hpp"
+
+MvQLayerMetaDataWidget::MvQLayerMetaDataWidget(QWidget *parent) : QWidget(parent), 
+          sceneItem_(0), layer_(0), statsEnabled_(false), histoEnabled_(false),
+          histoVisdefInitialIndex_(0)
+{
+	visdefs_ << "MCONT" << "PCONT" << "MSYMB" << "PSYMB" << "MWIND" << "PWIND";       
+  
+  	QVBoxLayout *layout=new QVBoxLayout;
+	layout->setContentsMargins(0,0,0,0);
+	setLayout(layout);
+	
+  	//Read css for the text formatting
+	QString cssDoc;
+	QFile f(":/uPlot/layerInfo.css");
+	QTextStream in(&f);
+	if(f.open(QIODevice::ReadOnly | QIODevice::Text))
+	{
+       		cssDoc=QString(f.readAll());
+	}
+	f.close();
+
+	//TextEdit
+	layerTe_=new QTextEdit;
+	layerTe_->setReadOnly(true);
+	layerTe_->document()->setDefaultStyleSheet(cssDoc);
+	layerTe_->setWordWrapMode(QTextOption::WordWrap);
+	//layerTe_->setLineWrapMode(QTextEdit::WidgetWidth);
+	layout->addWidget(layerTe_,1);
+  
+	//Stats + histo row
+	
+	QHBoxLayout *hb=new QHBoxLayout;
+	layout->addLayout(hb);
+	
+	//Stats button
+	statsTb_ = new QToolButton;
+	statsTb_->setToolTip(tr("Statistics"));
+	statsTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/stats.svg")));
+	statsTb_->setCheckable(true);
+	statsTb_->setChecked(statsEnabled_);
+
+	connect(statsTb_,SIGNAL(toggled(bool)),
+		this,SLOT(slotStatsEnabled(bool)));
+				
+	//Histogram button
+	histoTb_ = new QToolButton;
+	histoTb_->setToolTip(tr("Histogram"));
+	histoTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/histogram.svg")));
+	histoTb_->setCheckable(true);
+	histoTb_->setChecked(histoEnabled_);
+	
+	connect(histoTb_,SIGNAL(toggled(bool)),
+		this,SLOT(slotHistoEnabled(bool)));	
+	
+	//QLabel *visdefLabel= new QLabel(tr("Histogram method:"));	
+			
+	//ComboBox
+	histoVisdefCb_=new QComboBox;
+	histoVisdefCb_->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+		
+	connect(histoVisdefCb_,SIGNAL(activated(int)),
+		this,SLOT(slotSelectHistoVisdef(int)));
+	
+	connect(histoTb_,SIGNAL(toggled(bool)),
+		histoVisdefCb_,SLOT(setEnabled(bool)));	
+		
+
+	hb->addWidget(statsTb_);
+	hb->addWidget(histoTb_);
+	//hb->addWidget(visdefLabel);
+	hb->addWidget(histoVisdefCb_);
+	hb->addStretch(1);
+	//hb->addWidget(label,0,Qt::AlignRight);
+	/*hb->addWidget(layerLabel);
+	hb->addWidget(layerCb_);*/
+	
+	//Meta-data key	
+	keyManager_ = new MvQKeyManager(MvQKeyManager::LayerType);
+	keyManager_->loadProfiles();
+	
+}
+
+MvQLayerMetaDataWidget::~MvQLayerMetaDataWidget()
+{
+  	delete keyManager_;
+}	
+
+void MvQLayerMetaDataWidget::updateData()
+{
+	if(!layer_)
+	{		
+		layerTe_->clear();
+		return;
+	}
+	
+	//Collect data
+	MetaDataCollector infoMap;
+	infoMap["_datatype"]="";
+	infoMap["_description"]="";
+	layerMetaData(infoMap);
+
+	bool hasData=false;
+	
+	QString str;
+	QString txt("<table><tbody>");
+	string dataType,description;
+
+	//Identifiy datatype
+	map<string,string>::const_iterator it=infoMap.find("_datatype");
+	if(it != infoMap.end())
+	{
+		dataType="System::" + it->second;
+	}
+	else
+	{
+		layerTe_->setHtml(tr("No meta data is available for this layer!"));
+		return;
+	
+	}
+	
+	if((it=infoMap.find("_description")) != infoMap.end())
+	{
+	  	description=it->second;
+	}	
+	
+	//qDebug() << "layer info";						
+	//for(map<string,string>::iterator it=infoMap.begin(); it!= infoMap.end(); it++)
+	//qDebug() << it->first.c_str() << it->second.c_str();
+
+	//Get key profile
+	MvKeyProfile *prof=keyManager_->findProfile(dataType);	
+
+	if(!prof)
+	{
+		layerTe_->setHtml(tr("No meta data is available for this layer!"));
+		return;
+	}
+	
+
+	infoMap.reset();
+
+	//Find out the needed keys' list
+	for(unsigned int i=0; i < prof->size(); i++)
+	{
+		QString key=QString::fromStdString(prof->at(i)->name());
+		QString label=QString::fromStdString(prof->at(i)->shortName());
+
+		string group=prof->at(i)->metaData("group");
+		string source=prof->at(i)->metaData("source");
+
+		if(group == "stats" && !statsEnabled_)
+		  	continue;	
+		if(group == "histo" && !histoEnabled_)
+		  	continue;
+
+		//Get keyType		
+		string keyType=prof->at(i)->metaData("type");	
+		if(keyType == "table")
+		{				
+			foreach(QString s,QString::fromStdString(prof->at(i)->metaData("column")).split("/"))
+			{
+				infoMap[s.toStdString()]="";	
+			}	
+		}
+		else if(keyType == "list")
+		{	
+			if(prof->at(i)->metaData("subType") != "label")
+			{			  	
+				foreach(QString s, QString::fromStdString(prof->at(i)->metaData("item")).split("/"))
+				{
+					infoMap[s.toStdString()]="";
+					if(group == "stats")
+					{  
+						MetaDataAttribute attr;
+						attr.setGroup(MetaDataAttribute::StatsGroup);
+						infoMap.setAttribute(s.toStdString(),attr);
+					}	
+				}	
+			}
+		}
+		else if(keyType != "title")
+		{
+		  	infoMap[key.toStdString()]="";
+			MetaDataAttribute attr;
+			if(source == "gribapi")
+			{
+			  	attr.setSource(MetaDataAttribute::GribApiSource);
+			}
+			if(group == "stats")
+			{  
+				attr.setGroup(MetaDataAttribute::StatsGroup);
+			}
+			infoMap.setAttribute(key.toStdString(),attr);
+		}	
+	}	
+	
+	//infoMap.setMode(MetaDataCollector::Append);
+	layerMetaData(infoMap);	
+	
+	//Find out colspan for 2nd column
+	int colSpan=getColSpan(prof,infoMap);
+		
+	//The first row is always the layer type
+	if(!description.empty())
+	{
+	  	addTextInfoRow("Layer type",description.c_str(),txt,colSpan);
+		hasData=true; 
+	}
+	
+	if(prof->size() == 0)
+	{			
+		for(map<string,string>::const_iterator it=infoMap.begin(); it != infoMap.end(); it++)
+		{
+			if(it->first != "_datatype" && it->first != "_description")
+			{
+				QString key(it->first.c_str());
+				QString label(it->first.c_str());
+				addTextInfoRow(label,key,infoMap,txt,colSpan);
+				hasData=true;  	
+			} 
+		}
+	}	
+	else
+	{		    
+		//Loop through the profile items	
+		for(unsigned int i=0; i < prof->size(); i++)
+		{
+			QString key=QString::fromStdString(prof->at(i)->name());
+			QString label=QString::fromStdString(prof->at(i)->shortName());
+
+			if(key == "_datatype" || key == "_layertype")
+				continue;
+						
+			string group=prof->at(i)->metaData("group");
+
+			if(group == "stats" && !statsEnabled_)
+				continue;
+			
+			if(group == "histo" && !histoEnabled_)
+				continue;
+
+			string dep=prof->at(i)->metaData("dependency");
+			if(!dep.empty() && 
+				(infoMap.find(dep) == infoMap.end() || infoMap[dep].empty()))
+			{
+				continue;
+			}	
+				  
+				  
+			//Get keyType		
+			string keyType=prof->at(i)->metaData("type");
+			
+			if(keyType == "table")
+			{							
+				string subType=prof->at(i)->metaData("subType");
+				QStringList keyLst=QString::fromStdString(prof->at(i)->metaData("column")).split("/");
+				QStringList headerLst=QString::fromStdString(prof->at(i)->metaData("header")).split("/");						
+				addTableInfoRow(label,keyLst,headerLst,QString::fromStdString(subType),infoMap,txt,colSpan);	
+			}
+			else if(keyType == "list")
+			{	
+				string subType=prof->at(i)->metaData("subType");
+				QStringList keyLst=QString::fromStdString(prof->at(i)->metaData("item")).split("/");
+				addListInfoRow(label,keyLst,QString::fromStdString(subType),infoMap,txt);
+			}
+			else if(keyType == "image")
+			{
+				QString subType=QString::fromStdString(prof->at(i)->metaData("subType"));
+				if(subType == "histogram" && histoEnabled_)
+				{
+					QPixmap p=layerInfoImage("histo");
+					if(!p.isNull())
+					{
+						//txt+="<tr><td class=\"first\">" + label + "</td><td align=left colspan=\"" + QString::number(colSpan) + "\"><img src=\"histo.png\"></td></tr>";
+						txt+="<tr><td align=\"center\" colspan=\"" + QString::number(colSpan+1) + "\"><img src=\"histo.png\"></td></tr>";
+						QTextDocument *doc=layerTe_->document();
+						doc->addResource(QTextDocument::ImageResource, QUrl("histo.png"), p.toImage());
+						hasData=true;
+						//Histogram generation updates the infos so we need to get it again!
+						infoMap.reset();
+						layerMetaData(infoMap);
+
+						//qDebug() << "histo";
+						//for(map<string,string>::iterator it=infoMap.begin(); it!= infoMap.end(); it++)
+						//	qDebug() << it->first.c_str() << it->second.c_str();
+					}
+				}
+				else
+				{
+					addImageInfoRow(label,key,infoMap,txt,colSpan);
+				}	
+			}
+			else if(keyType == "title")
+			{
+				//string dep=prof->at(i)->metaData("dependency");
+				//if(dep.empty() || 
+				//  (infoMap.find(dep) != infoMap.end() && !infoMap[dep].empty()))
+				//{
+					addTitleInfoRow(label,txt,colSpan);
+				//}
+			}
+			else
+			{
+				addTextInfoRow(label,key,infoMap,txt,colSpan);
+			}
+		}
+		
+		hasData=true;
+	}
+
+	txt+="</tbody></table>";
+	
+	if(hasData == false)
+	{
+		txt=tr("No meta data is available for this layer!");
+	}
+	
+	//qDebug() << txt;
+
+	int oldScrollPos=layerTe_->verticalScrollBar()->value();	
+	layerTe_->setHtml(txt);
+	layerTe_->verticalScrollBar()->setValue(oldScrollPos);
+
+}
+
+void MvQLayerMetaDataWidget::addTitleInfoRow(QString label,QString &info, int colSpan)
+{
+	info+="<tr><td class=\"title\" align=\"center\" colspan=\"" + QString::number(colSpan+1) + + "\">" + label + "</td></tr>";
+}
+
+void MvQLayerMetaDataWidget::addTextInfoRow(QString label,QString key,const map<string,string>& infoMap,QString &info, int colSpan)
+{
+	map<string,string>::const_iterator it=infoMap.find(key.toStdString());
+	if(it == infoMap.end()) return;
+	QString str=QString::fromStdString(it->second);
+	if(str.isEmpty()) return;
+
+	info+="<tr><td class=\"first\">" + label + "</td><td colspan=\"" + QString::number(colSpan) + "\">" + str + "</td></tr>";
+}
+
+
+void MvQLayerMetaDataWidget::addTextInfoRow(QString label,QString value,QString &info, int colSpan)
+{
+	if(value.isEmpty()) return;
+	info+="<tr><td class=\"first\">" + label + "</td><td colspan=\"" + QString::number(colSpan) + "\">" + value + "</td></tr>";
+}
+
+
+void MvQLayerMetaDataWidget::addImageInfoRow(QString label,QString key,const map<string,string>& infoMap,QString &info,int colSpan)
+{
+	map<string,string>::const_iterator it=infoMap.find(key.toStdString());
+	if(it == infoMap.end()) return;
+	QString str=QString::fromStdString(it->second);
+	if(str.isEmpty()) return;
+	
+	info+="<tr><td class=\"first\">"+ label + "</td><td align=left colspan=\"" + QString::number(colSpan) + "\"><img src=" +  str + "></td></tr>";
+}
+
+
+void MvQLayerMetaDataWidget::addListInfoRow(QString label,QStringList keys, QString listType,
+	                            const map<string,string>& infoMap,QString &info)
+{
+	if(keys.count() <=0 )
+		return;
+
+	QStringList keyVal;
+	if(listType == "label")
+	{
+		keyVal=keys;
+	}
+	else
+	{
+		map<string,string>::const_iterator it;
+		foreach(QString key, keys)
+		{		
+			it=infoMap.find(key.toStdString());
+			if(it != infoMap.end())
+			{
+				keyVal << QString::fromStdString(it->second);
+			}
+			else
+			{
+			  	keyVal << QString();
+			}	
+		}
+	}
+		
+	info+="<tr>";
+	info+="<td class=\"first\">" + label + "</td>";
+
+	foreach(QString key, keyVal)
+	{
+		if(listType == "label")
+		{
+			info+="<td class=\"first\">" + key + "</td>";
+		}
+		else
+		{
+			 info+="<td>" + key + "</td>";
+		}
+	}
+
+	info+="</tr>";								
+}
+
+void MvQLayerMetaDataWidget::addTableInfoRow(QString label,QStringList keys, QStringList headers,QString tableType,
+	                            const map<string,string>& infoMap,QString &info,int colSpan)
+{
+	if(keys.count() <=0 )
+		return;
+
+	map<string,string>::const_iterator it;
+
+	//Loop for the columns
+	QList<QStringList> keyVal;
+	int rowNum=0;
+	foreach(QString key, keys)
+	{		
+		qDebug() << "key" << key;
+		it=infoMap.find(key.toStdString());
+		if(it == infoMap.end())
+			return;				  
+		qDebug() << "key" << key << QString::fromStdString(it->second);
+		keyVal << QString::fromStdString(it->second).split("/");
+				
+		//Each column must have the same number of rows
+		if(rowNum==0)
+			rowNum=keyVal.back().count();		
+		else if(rowNum != keyVal.back().count())
+			return;		
+	}
+		
+	if(rowNum<=0) return;
+	if(headers.count()> 0) rowNum++;
+ 
+	if(tableType == "histogram")	  	
+	{
+	  	info+="<tr>";	
+		if(headers.count()> 0)
+		{
+			foreach(QString s,headers)
+			{
+				info+="<td class=\"first\">" + s + "</td>"; 
+			}
+			info+="</tr>";
+		}
+	  	  
+	  
+	  	QImage img(70+16,15,QImage::Format_ARGB32_Premultiplied);
+		QPainter painter(&img);
+		painter.setPen(Qt::black);
+		QTextDocument *doc=layerTe_->document();						
+		
+		float maxVal=0.;
+		for(int i=0; i < keyVal[3].count(); i++)
+		{		  	
+			const float fVal=keyVal[3].at(i).toFloat();
+			if(fVal > maxVal)
+			  	maxVal=fVal;
+		}	
+			
+		for(int i=0; i < keyVal[0].count(); i++)
+		{			
+			if(headers.count() > 0 || i >0)
+			{
+				info+="<tr>";
+			}
+			
+			QColor col(Qt::red);
+			QStringList clst=keyVal[0].at(i).split(":");
+			if(clst.count() ==3)
+			{
+				col=QColor::fromRgbF(clst[0].toFloat(),clst[1].toFloat(),clst[2].toFloat());
+			}	
+		
+			const float fVal=keyVal[3].at(i).toFloat();
+			int r=static_cast<int>(fVal/maxVal*70.);
+			painter.fillRect(0,0,70+16,15,QColor("#F9F9F9")); 		
+			//painter.fillRect(0,0,r,15,col);
+			
+			painter.setBrush(col);			
+			painter.drawRect(0,0,10,14);
+			
+			if(r > 2)
+			{
+			  	painter.drawRect(16,0,r-1,14);
+			}
+			
+			//Crate a deep copy of the image to add it to the document resources
+			QImage imgRes=img.copy(); 
+			
+			QString imgName="imgBar" + QString::number(i);
+			doc->addResource(QTextDocument::ImageResource, QUrl(imgName), imgRes);		
+		
+			info+="<td><img src=\"" + imgName + "\"></td>";
+		
+			for(int j=1; j < keyVal.count(); j++)
+			{		
+				info+="<td>" +keyVal[j].at(i) + "</td>";
+			}
+			
+			info+="</tr>";				
+		}	
+	}
+	else if(tableType == "noShortName" || tableType == "noShortNameHighlightFirst")
+	{ 
+		if(headers.count()> 0 && (headers.count() > 1 || !headers[0].isEmpty()))
+		{
+			info+="<tr>";
+			if(headers.count()-1 >= colSpan)
+			{
+				foreach(QString s,headers)
+				{
+					info+="<td class=\"first\">" + s + "</td>"; 
+				}
+			}
+			//We need to stretch the last column
+			else
+			{
+				for(int i=0; i < headers.count()-1; i++)	
+				{
+					info+="<td class=\"first\">" + headers[i] + "</td>"; 
+				}  
+		
+				info+="<td class=\"first\" colspan=\"" + QString::number(colSpan-headers.count()+2) +
+				       "\" >" + headers[headers.count()-1] + "</td>";
+			} 
+						
+			info+="</tr>";
+		}
+		
+		for(int i=0; i < keyVal[0].count(); i++)
+		{			
+			info+="<tr>";			
+			if(keyVal.count()-1 >= colSpan)
+			{
+			  	for(int j=0; j < keyVal.count(); j++)	
+				{
+					if(j==0 && tableType == "noShortNameHighlightFirst")
+						info+="<td class=\"first\" >" + keyVal[j].at(i) + "</td>";
+					else
+						info+="<td>" + keyVal[j].at(i) + "</td>"; 
+				}  
+				
+			}
+			else
+			{
+				for(int j=0; j < keyVal.count()-1; j++)	
+				{
+					if(j==0 && tableType == "noShortNameHighlightFirst")
+						info+="<td class=\"first\" >" + keyVal[j].at(i) + "</td>";
+					else
+						info+="<td>" + keyVal[j].at(i) + "</td>"; 
+				}  
+		
+				info+="<td colspan=\"" + QString::number(colSpan-keyVal.count()+2) +
+				       "\" >" + keyVal[keyVal.count()-1].at(i) + "</td>";
+			} 
+			info+="</tr>";	
+		}	
+	}
+	else
+	{ 
+		info+="<tr>";
+		info+="<td class=\"first\" rowspan=\"" + QString::number(rowNum) + "\" >" + label + "</td>";
+
+		if(headers.count()> 0)
+		{
+			foreach(QString s,headers)
+			{
+				info+="<td class=\"first\">" + s + "</td>"; 
+			}
+			info+="</tr>";
+		}
+		
+		for(int i=0; i < keyVal[0].count(); i++)
+		{			
+			if(headers.count() > 0 || i >0)
+			{
+				info+="<tr>";
+			}
+			
+			foreach(QStringList lst,keyVal)
+			{					
+				info+="<td>" + lst[i] + "</td>";
+			}
+			info+="</tr>";	
+		}	
+	}
+	
+	
+}
+
+int MvQLayerMetaDataWidget::getColSpan(MvKeyProfile *prof,const map<string,string>& infoMap)
+{
+	//Find out colspan for 2nd column
+	int colSpan=1;
+	for(unsigned int i=0; i < prof->size(); i++)
+	{		
+		string group=prof->at(i)->metaData("group");		
+		if(group == "histo" && !histoEnabled_)
+		  	continue;
+				
+		if(group == "stats" && !statsEnabled_)
+		  	continue;		
+		
+		string dep=prof->at(i)->metaData("dependency");
+		if(!dep.empty())
+		{
+		  	map<string,string>::const_iterator it=infoMap.find(dep);
+		 	if(it == infoMap.end() || it->second.empty())
+			{
+		  		continue;
+			}	
+		}
+		
+		string keyType=prof->at(i)->metaData("type");			  
+		if(keyType == "table")
+		{	
+			string subType=prof->at(i)->metaData("subType");	
+			
+			int colNum=QString::fromStdString(prof->at(i)->metaData("column")).split("/").count();
+			if(subType == "histogram")
+			{
+			  	colNum-=1;
+			}	
+			else if(subType == "noShortName")
+			{
+			  	colNum-=1;
+			}	
+			
+			if(colNum==0)
+				colNum=QString::fromStdString(prof->at(i)->metaData("header")).split("/").count();
+			if(colSpan < colNum)
+				colSpan=colNum;
+			
+		}
+		else if(keyType == "list")
+		{				
+			int itemNum=QString::fromStdString(prof->at(i)->metaData("item")).split("/").count();
+			if(colSpan < itemNum)
+				colSpan=itemNum;
+		}	
+	}
+
+	return colSpan;
+}		
+
+void MvQLayerMetaDataWidget::layerMetaData(MetaDataCollector &md) 
+{
+	if(!layer_)
+		return;
+
+	if(sceneItem_)
+		sceneItem_->layerMetaDataForCurrentStep(layer_,md);	
+}
+
+QString MvQLayerMetaDataWidget::layerMetaData(QString key) 
+{
+	if(!layer_)
+		return QString();
+
+	MetaDataCollector md;
+	string keyStr=key.toStdString();
+	md[keyStr]="";
+		
+	sceneItem_->layerMetaDataForCurrentStep(layer_,md);	
+
+	return QString::fromStdString(md[keyStr]);
+}
+
+//AKA histogram
+QPixmap MvQLayerMetaDataWidget::layerInfoImage(QString /*key*/) 
+{
+	if(!layer_)
+		return QPixmap();
+	
+	QStringList lst=histoVisdefCb_->itemData(histoVisdefCb_->currentIndex()).toStringList();		
+	QHash<QString,QString> vdef;
+	if(lst.count() == 2)
+	{
+	  	vdef["visdefName"]=lst[0];
+		vdef["visdefClass"]=lst[1];
+	}
+	
+	QPixmap p=sceneItem_->layerInfoImageForCurrentStep(layer_,vdef);	
+	return p;	
+}
+
+//=============================================
+//
+// Signals and slots
+//
+//=============================================
+
+
+void MvQLayerMetaDataWidget::slotHistoEnabled(bool b)
+{
+	histoEnabled_=b;	
+	updateData();
+}
+
+void MvQLayerMetaDataWidget::slotStatsEnabled(bool b)
+{
+	statsEnabled_=b;
+	updateData();
+}	
+
+void MvQLayerMetaDataWidget::slotSelectHistoVisdef(int /*index*/)
+{			
+	updateData();
+}
+
+void MvQLayerMetaDataWidget::slotFrameChanged()
+{
+	updateData();
+}
+
+//===============================================
+//
+// Reset
+//
+//===============================================
+
+void MvQLayerMetaDataWidget::setLayer(MgQLayerItem* layer)
+{ 
+	layer_=layer;
+	
+	if(!layer_)
+	{
+		histoVisdefCb_->clear();
+		updateData();
+		return;
+	}	
+			
+	// Update histogram visdef combo
+	MgQIconList icons;	
+	
+	if(sceneItem_)
+		sceneItem_->layerIconsForCurrentStep(layer_,icons);	
+	
+	int lastIndex;
+	
+	if(histoVisdefCb_->count() == 0)
+	{
+	  	lastIndex=histoVisdefInitialIndex_;
+	}
+	else
+	{
+	  	lastIndex=histoVisdefCb_->currentIndex();
+	}	  	
+	
+	histoVisdefCb_->clear();	
+	histoVisdefCb_->addItem(tr("Data values"));
+	
+	for(int i=0; i < icons.size(); i++)
+	{
+	  	QString vdefClass=icons.at(i).class_;
+		
+		if(visdefs_.contains(vdefClass))
+		{
+			QString str;
+			QStringList lst=icons.at(i).name_.split("/");
+			if(!lst.isEmpty())
+			{
+				str=lst.last();
+			}
+		 
+			histoVisdefCb_->addItem(str);
+			
+			lst.clear();
+			lst << icons.at(i).name_ << vdefClass;			
+			histoVisdefCb_->setItemData(histoVisdefCb_->count()-1,lst);
+		
+			
+			if(visdefPixmaps_.find(vdefClass) == visdefPixmaps_.end())
+			{  			  
+				Cached iconFileName = MakeIconPath(vdefClass.toStdString().c_str());
+				visdefPixmaps_[vdefClass]= QPixmap::fromImage(QImage((const char*)iconFileName,"xpm")).scaled(QSize(16,16),
+					                         Qt::KeepAspectRatio,Qt::SmoothTransformation);				
+			}
+			histoVisdefCb_->setItemIcon(histoVisdefCb_->count()-1,visdefPixmaps_[vdefClass]);					 
+		}	
+	}
+	
+	if(lastIndex == -1)
+	{
+		histoVisdefCb_->setCurrentIndex(0);
+	}	
+	else if(lastIndex < histoVisdefCb_->count())
+	{
+		histoVisdefCb_->setCurrentIndex(lastIndex);
+	}
+	else
+	{
+	  	histoVisdefCb_->setCurrentIndex(histoVisdefCb_->count()-1);
+	}	
+		
+	//Update data widget 
+	updateData();	    
+} 
+
+void MvQLayerMetaDataWidget::setHistoVisdefInitialIndex(int index)
+{
+	histoVisdefInitialIndex_=index;
+}  
+
+void MvQLayerMetaDataWidget::reset(MgQSceneItem* sceneItem, MgQLayerItem* layer)
+{
+	sceneItem_=sceneItem;
+	layer_=layer;
+	setLayer(layer_);
+}
+
diff --git a/src/uPlot/MvQLayerMetaDataWidget.h b/src/uPlot/MvQLayerMetaDataWidget.h
new file mode 100644
index 0000000..8d8da8a
--- /dev/null
+++ b/src/uPlot/MvQLayerMetaDataWidget.h
@@ -0,0 +1,84 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLayerMetaDataWidget_H
+#define MvQLayerMetaDataWidget_H
+
+#include <QComboBox>
+#include <QSet>
+#include <QToolButton>
+#include <QWidget>
+
+class QComboBox;
+class QListWidget;
+class QListWidgetItem;
+class QTextEdit;
+
+class MvKeyProfile;
+class MvQKeyManager;
+
+class MgQSceneItem;
+class MgQPlotScene;
+
+#include "MgQLayerItem.h"
+
+class MvQLayerMetaDataWidget : public QWidget
+{
+  
+Q_OBJECT  
+
+public:
+    	MvQLayerMetaDataWidget(QWidget *parent=0);
+	~MvQLayerMetaDataWidget();
+	
+	void reset(MgQSceneItem*,MgQLayerItem*);
+	void setHistoEnabled(bool b) {histoTb_->setChecked(b);}
+	bool isHistoEnabled() {return histoEnabled_;}   
+	void setStatsEnabled(bool b) {statsTb_->setChecked(b);}
+	bool isStatsEnabled() {return statsEnabled_;}
+	int  histoVisdefCurrentIndex() {return histoVisdefCb_->currentIndex();}
+	void setHistoVisdefInitialIndex(int);
+	void setLayer(MgQLayerItem*);
+
+  public slots:
+	void slotStatsEnabled(bool);
+	void slotHistoEnabled(bool);
+	void slotFrameChanged();
+	void slotSelectHistoVisdef(int);
+
+protected:      
+	void updateData();	
+	void addTitleInfoRow(QString,QString &, int);
+	void addTextInfoRow(QString,QString,const std::map<std::string,std::string>&,QString &,int);
+	void addTextInfoRow(QString,QString,QString &,int);
+	void addImageInfoRow(QString,QString,const std::map<std::string,std::string>&,QString &,int);
+	void addListInfoRow(QString,QStringList, QString,const std::map<std::string,std::string>&,QString &);
+	void addTableInfoRow(QString,QStringList,QStringList,QString,const std::map<std::string,std::string>&,QString &,int);
+	int getColSpan(MvKeyProfile *,const map<string,string>&);	
+	void layerMetaData(MetaDataCollector&); 
+	QString layerMetaData(QString); 
+	QPixmap layerInfoImage(QString); 
+
+	MvQKeyManager* keyManager_; 
+	QTextEdit* layerTe_;
+	QToolButton* statsTb_;
+	QToolButton* histoTb_;
+	QComboBox* histoVisdefCb_;
+	QSet<QString> visdefs_;
+	QHash<QString,QPixmap> visdefPixmaps_;
+	
+	MgQSceneItem* sceneItem_;
+	MgQLayerItem* layer_;
+	bool statsEnabled_;
+	bool histoEnabled_;
+	int histoVisdefInitialIndex_;
+ 	
+}; 
+
+#endif
\ No newline at end of file
diff --git a/src/uPlot/MvQLayerModel.cc b/src/uPlot/MvQLayerModel.cc
new file mode 100644
index 0000000..0bad68c
--- /dev/null
+++ b/src/uPlot/MvQLayerModel.cc
@@ -0,0 +1,863 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QBrush>
+#include <QColor>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMimeData>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QPushButton>
+#include <QSlider>
+#include <QStringList>
+#include <QStyleOptionProgressBar>
+
+#include "MvQLayerModel.h"
+#include "MgQLayerItem.h"
+#include "MgQPlotScene.h"
+#include "MgQSceneItem.h"
+
+#include "MvQLayerContentsIcon.h"
+
+#include "Cached.h"
+#include "MvPath.hpp"
+
+//======================================
+// Item delegate
+//======================================
+
+MvQLayerDelegate::MvQLayerDelegate(QWidget *parent) : QStyledItemDelegate(parent)
+{
+	itemHeight_=50+8;
+}
+
+void MvQLayerDelegate::paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const
+{
+	int id=index.internalId();
+	if(id <  100 && index.column() == 0)
+	{
+		QStyleOptionViewItemV4 vopt(option);
+   		initStyleOption(&vopt, index);
+   
+    		const QStyle *style = vopt.widget ? vopt.widget->style() : QApplication::style();
+    		const QWidget* widget = vopt.widget;
+
+		//int height=option.rect.height();
+
+		//vopt.text=QString();
+		//vopt.icon=QIcon();		
+
+		//We render everything with the default method
+  		style->drawControl(QStyle::CE_ItemViewItem, &vopt, painter, widget);
+	
+		//Get current values from model
+		QString txt=index.data(Qt::DisplayRole).toString();
+		QPixmap pixmap=index.data(Qt::DecorationRole).value<QPixmap>();
+		QBrush bg=index.data(Qt::BackgroundRole).value<QBrush>();
+	
+		//Save painter state
+		painter->save();
+
+		//Highlight
+		//if (option.state & QStyle::State_HasFocus)
+             	//	painter->fillRect(option.rect, option.palette.highlight());
+	
+	        //QRect checkRect = style->subElementRect(QStyle::SE_ItemViewItemCheckIndicator,&vopt, widget);
+                QRect iconRect = style->subElementRect(QStyle::SE_ItemViewItemDecoration, &vopt, widget);
+                //QRect textRect = style-> subElementRect(QStyle::SE_ItemViewItemText, &vopt, widget);
+
+		//Draw icon border
+		painter->setPen(QColor(230,230,230));
+		painter->drawRect(iconRect);
+
+		//Text
+		/*QString text=index.data(Qt::DisplayRole).toString();
+		QRect textRect(iconRect.x()+iconRect.width()+10,option.rect.y()+5,
+			       option.rect.width()-(iconRect.x()+iconRect.width()+5)-10, height/2-5);
+		
+		painter->setPen(Qt::black);
+		painter->drawText(textRect,Qt::AlignLeft,text);*/
+
+		//Draw separator line
+		painter->setPen(QColor(230,230,230));
+		painter->drawLine(option.rect.bottomLeft(),option.rect.bottomRight());
+
+		//restore painter state
+		painter->restore();			
+	}		
+	else
+	{		
+		QStyledItemDelegate::paint(painter,option,index);
+	}
+}
+QSize MvQLayerDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const
+{
+	QSize size=QStyledItemDelegate::sizeHint(option,index);
+	
+	int id=index.internalId();
+	if(id <  100 && index.column() == 0)
+	{
+		size.setHeight(itemHeight_);
+	}
+	else
+	{
+	  	size+=QSize(0,6);
+	}
+	
+	return size;
+}
+	
+//======================================
+// Item model
+//======================================
+
+MvQLayerModel::MvQLayerModel(MgQPlotScene *scene)
+{
+	scene_=scene;
+}
+
+MvQLayerModel::~MvQLayerModel()
+{
+	clearIcons();
+}
+
+void MvQLayerModel::clearIcons()
+{
+  	QHashIterator<MgQLayerItem*,QList<MvQLayerContentsIcon*> > it(icons_);
+	while (it.hasNext()) 
+	{
+     		it.next();
+	  	foreach(MvQLayerContentsIcon* icon,it.value())
+		{
+		  	if(icon) delete icon;
+		}
+	}
+	 
+	icons_.clear();
+}  
+
+
+void MvQLayerModel::layersAreAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQLayerModel::resetLayers(MgQSceneItem* scenItem)
+{
+  	sceneItem_=scenItem;
+	clearIcons();
+	if(sceneItem_)
+	{
+	  	layers_=sceneItem_->layerItems();
+	}
+	else
+	{
+	  	layers_.clear();
+	}	
+	endResetModel();
+}
+
+int MvQLayerModel::layerToRow(MgQLayerItem* layer) const
+{
+	if(!layer)
+	  	return -1;
+	
+	int stackLevel=layer->stackLevel();
+	
+	return layers_.count()-1-stackLevel;
+}
+
+MgQLayerItem* MvQLayerModel::rowToLayer(int row) const
+{
+	//
+	int stackLevel=layers_.count()-1-row;
+
+	foreach(MgQLayerItem *item,layers_)
+	{
+		if(item->stackLevel() == stackLevel)
+		{
+			return item;
+		}
+	}
+	return 0;
+}
+
+int MvQLayerModel::rowToStackLevel(int row)
+{
+	//
+	return layers_.count()-1-row;
+}
+
+int MvQLayerModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 1;
+}
+
+int MvQLayerModel::rowCount( const QModelIndex& parent) const
+{
+    	if(!sceneItem_)
+	  	return 0;
+	  
+	//Non-root
+	if(parent.isValid() )
+	{
+		int id=parent.internalId();
+		if(idToLevel(id) == 0)
+		{
+			MgQIconList icons;
+			MgQLayerItem *item=rowToLayer(id);
+			if(item)
+			{
+			  	sceneItem_->layerIconsForCurrentStep(item,icons);		
+			}
+			return icons.size();			
+		}
+		else
+		{
+			return 0;
+		}
+	}
+	//Root
+	else
+	{
+		return layers_.count();
+	}	
+	
+	
+}
+
+Qt::ItemFlags MvQLayerModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	if(index.column() == 0)
+		defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable |
+		   Qt::ItemIsEditable |
+		   Qt::ItemIsUserCheckable;
+	else 
+		defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable |
+		   Qt::ItemIsEditable;
+
+ 	
+    	if (index.isValid())
+       		return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
+     	else
+        	return Qt::ItemIsDropEnabled | defaultFlags;
+}
+
+QVariant MvQLayerModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid() || index.column() != 0)
+        {			
+		return QVariant();
+	}
+	
+ 	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		MgQLayerItem* layer=rowToLayer(id);
+		if(!layer)
+		  	return QVariant();
+		
+	  	if(role == Qt::CheckStateRole)
+		{
+			if(layer->layerVisibility() == true)
+				return QVariant(Qt::Checked);
+			else
+				return QVariant(Qt::Unchecked);
+		}
+		else if(role == Qt::DisplayRole)
+		{
+			return label(layer,index.row(),index.column() );
+		}
+		else if(role == Qt::DecorationRole)
+		{
+			return QPixmap::fromImage(layer->preview());		
+		}
+	}	
+	else if(idToLevel(id) == 1)	  
+	{
+		int parentRow=idToParentRow(id);
+		MgQLayerItem* layer=rowToLayer( parentRow);
+		if(!layer)
+		  	return QVariant();
+		
+		MvQLayerContentsIcon *icon=layerIcon(layer,index.row());
+		if(!icon)
+		  	return QVariant();
+				
+		if(role == Qt::DisplayRole)
+		{		
+			return icon->name();
+		}  
+		else if(role == Qt::DecorationRole)
+		{		
+			return icon->pixmap();
+		}  
+		else if(role == Qt::UserRole)
+		{
+			return icon->path();	  
+		}  
+		  
+	}
+		
+	
+	/*else if(role == Qt::ToolTipRole)
+	{
+ 		MgQLayerItem* layer=rowToLayer(index.row());
+		
+		map<string,string>::const_iterator it=layer->layer().getInfos().find("Desc");
+
+		if( it!= layer->layer().getInfos().end())
+		{
+			return 	QString::fromStdString(it->second);
+		}
+
+		return QVariant();
+	}*/
+
+	return  QVariant();
+}
+
+bool MvQLayerModel::setData( const QModelIndex & index, const QVariant & value, int role) 
+{
+	if( !index.isValid())
+	{
+		return false;	
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) != 0)
+		return false;
+	  
+	if(index.column() == 0)
+	{		
+		if(role == Qt::CheckStateRole)
+		{	
+			MgQLayerItem* layer=rowToLayer(index.row());
+
+			bool checked=(value.toInt() == Qt::Checked)?true:false;
+			if(checked != layer->layerVisibility())
+			{
+				layer->setLayerVisibility(checked);	
+				emit  dataChanged(index,index);
+
+				//Notify the scene about the change in the layer status
+
+				if(sceneItem_)
+				  	sceneItem_->updateLayers();
+				
+				//emit  layerUpdate(); 
+				emit layerVisibilityChanged(QString(layer->layer().id().c_str()),checked);
+				
+				return true;
+								
+			}
+		}	
+	}
+
+	return false;
+
+}
+QVariant MvQLayerModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+	if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+        return QAbstractItemModel::headerData( section, orient, role );   
+
+   	switch (section) 
+    	{
+    	case 0: 	
+		return QString("Title");
+		break;	
+    	default:
+        	return QString();
+    	}
+    	  	
+    	return QVariant();
+}
+
+QString MvQLayerModel::label(MgQLayerItem* layer,const int /*row*/, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		QString str(layer->layer().name().c_str());
+		QStringList lst=str.split("/");
+		if(!lst.isEmpty())
+		{
+			return lst.last();
+		}
+		return QString();
+	}
+    	default:
+        	return QString();
+    	}
+}
+
+MvQLayerContentsIcon*  MvQLayerModel::layerIcon(MgQLayerItem *layer, int index) const
+{
+	if(index <0 || !layer) return 0;
+  	
+  	QHash<MgQLayerItem*,QList<MvQLayerContentsIcon*> >::const_iterator it=icons_.find(layer);
+	if(it!= icons_.end())
+	{
+		if(index< it.value().count())
+		{
+			return it.value().at(index);	
+		}
+	}
+	
+	MgQIconList icons;
+	sceneItem_->layerIconsForCurrentStep(layer,icons);
+			
+	for(int i=0; i < icons.size(); i++)	 
+	{
+	 	MvQLayerContentsIcon *icon=new MvQLayerContentsIcon(icons.at(i));			
+		icons_[layer] << icon;
+	} 
+	 
+
+	it=icons_.find(layer);
+	if(it!= icons_.end())
+	{ 
+		if(index< it.value().count())
+		{
+			return it.value().at(index);	
+		} 
+	} 
+	  
+	return 0;  
+}		
+	
+	
+MvQLayerContentsIcon* MvQLayerModel::indexToIcon(const QModelIndex& index) const
+{
+	if( !index.isValid() || index.column() != 0)
+        {			
+		return 0;
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 1)	  
+	{
+		int parentRow=idToParentRow(id);
+		MgQLayerItem* layer=rowToLayer(parentRow);
+		if(!layer)
+		  	return 0;
+		
+		return layerIcon(layer,index.row());
+	}	
+
+	return  0;
+}			  
+
+QModelIndex MvQLayerModel::index( int row, int column, const QModelIndex& parent) const
+{
+	if(!sceneItem_ || row < 0 || column < 0 || parent.column() > 3)
+	{
+		return QModelIndex();
+	}
+	
+	//Parent is non-root -> level-1 items: id is the parent row (number+1)*1000
+	if(parent.isValid() )
+	{
+		int id=(parent.row()+1)*1000;
+		return createIndex(row, column, id); 
+	}
+	//Parent is root -> level-0 items: id is the row number
+	else
+	{
+		return createIndex(row, column, row); 
+	}
+}
+
+
+QModelIndex MvQLayerModel::parent( const QModelIndex& index) const
+{
+	if(!index.isValid() )
+	{
+		return QModelIndex();
+	}
+	
+	int id=index.internalId();
+	if(idToLevel(id) == 0)
+	{
+		return QModelIndex();
+	}
+	else 
+	{
+		int parentRow=idToParentRow(id);
+		return createIndex(parentRow,0,parentRow);
+	}
+
+	return QModelIndex();
+}
+
+int MvQLayerModel::idToLevel(int id) const
+{
+	if(id >=0 && id < 1000)
+		return 0;
+	else
+		return 1;
+}
+
+int MvQLayerModel::idToParentRow(int id) const
+{
+	if(idToLevel(id) == 0)
+		return -1;
+	else
+		return id/1000-1;
+}
+
+int MvQLayerModel::indexToLevel(const QModelIndex& index) const
+{
+  	return idToLevel(index.internalId());
+}	
+
+MgQLayerItem* MvQLayerModel::layer(const QModelIndex& index) const
+{
+	if(!index.isValid())
+		return 0;
+	
+	return rowToLayer(index.row());
+}
+
+int MvQLayerModel::transparency(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return 0;
+	
+	MgQLayerItem* layer=rowToLayer(index.row());
+  	
+	if(!layer)
+	  	return 0;
+	
+	int value=static_cast<int>((1.-layer->layerAlpha())*100.);
+	if(value < 0)
+		value=0;
+	else if (value > 100)
+		value=100;
+	
+	return value;
+}
+
+
+void MvQLayerModel::setTransparency(const QModelIndex& index,int value)
+{
+	if(!index.isValid() || value < 0 || value > 100)
+		return;
+	
+	MgQLayerItem* layer=rowToLayer(index.row());
+	float alpha = 1.-static_cast<float>(value)/100.;
+	layer->setLayerAlpha(alpha);
+
+	//Notify the scene about the change in the layer status
+
+	if(sceneItem_)
+	  	sceneItem_->updateLayers();
+	
+	emit layerTransparencyChanged(QString(layer->layer().id().c_str()),value);
+	
+}
+
+
+void MvQLayerModel::moveUp(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return;
+
+	moveLayer(index.row(),index.row()-1);	
+}	
+
+void MvQLayerModel::moveDown(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return;
+
+	moveLayer(index.row(),index.row()+1);
+	
+}	
+
+void MvQLayerModel::moveTop(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return;
+
+	moveLayer(index.row(),0);	
+}
+
+void MvQLayerModel::moveBottom(const QModelIndex& index)
+{
+	if(!index.isValid())
+		return;
+
+	moveLayer(index.row(),rowCount(index));	
+}
+
+
+void MvQLayerModel::moveLayer(int sourceRow,int targetRow)
+{
+	if(sourceRow < 0 ||  sourceRow >= layers_.count() ||
+	   targetRow < 0 ||  targetRow >= layers_.count() ||
+           sourceRow == targetRow )
+	{
+		return;
+	}
+
+	//This list for each stackLevel assigns the corresponding Layer item
+	QList<MgQLayerItem*> stackLevel;
+	for(int i=0; i < layers_.count(); i++)
+	{
+		bool found=false;
+		foreach(MgQLayerItem *item, layers_)
+		{
+			if(item->stackLevel() == i)
+			{
+				stackLevel << item;
+				found=true;
+			}
+		}
+		if(found == false)
+		{
+			qDebug() <<  "MvQLayerModel::moveLayer --> Inconsistency in stackLevels!";
+			return;
+		}
+	}
+
+	//No simpy move the sorce index to the target!!
+	stackLevel.move(rowToStackLevel(sourceRow),rowToStackLevel(targetRow));
+
+	QList<QPair<QString,int> > stackingOrder;
+	
+	
+	//Reset the stacklevels for all the layer items!!!
+	for(int i=0; i < stackLevel.count(); i++)
+	{
+		stackLevel[i]->setStackLevel(i);
+		stackingOrder << qMakePair(QString(stackLevel[i]->layer().id().c_str()),i); 
+	}
+
+	emit layerStackingOrderChanged(stackingOrder);
+	
+	/*
+
+	layers_[i]->setStackLevel(stackLevel[i]);
+		qDebug() << "set layer:" << i << "to" << stackLevel[i];
+	}	
+
+
+	QList<int> stackLevel;
+	foreach(MgQLayerItem *item, layers_)
+	{
+		stackLevel << item->stackLevel();
+	}
+	
+	qDebug() << "stackLevel:" << stackLevel;
+	qDebug() << "move" << sourceRow << targetRow << rowToStackLevel(sourceRow) <<  rowToStackLevel(targetRow);
+
+	stackLevel.move(rowToStackLevel(sourceRow),rowToStackLevel(targetRow));
+
+	qDebug() << "stackLevel:" << stackLevel;
+
+	for(int i=0; i < stackLevel.count(); i++)
+	{
+		layers_[i]->setStackLevel(stackLevel[i]);
+		qDebug() << "set layer:" << i << "to" << stackLevel[i];
+	}
+	
+	*/
+	
+	//Notify the scene about the change in the layer status
+
+	if(sceneItem_)
+	  	sceneItem_->updateLayers();
+	
+	//layers_[0]->scene()->update();
+
+	reset();	
+}
+
+string MvQLayerModel::layerId(const QModelIndex& index) 
+{	
+	MgQLayerItem* item=layer(index);
+
+	if(!item)
+		return string();
+		
+	return item->layer().id();
+}
+
+  
+QString MvQLayerModel::layerName(const QModelIndex& index) 
+{
+	MgQLayerItem* item=layer(index);
+
+	if(!item)
+		return QString();
+		
+	QString str(item->layer().name().c_str());
+	QStringList lst=str.split("/");
+	if(!lst.isEmpty())
+	{
+		return lst.last();
+	}
+	
+	return QString();
+}
+
+
+void MvQLayerModel::layerMetaData(const QModelIndex& index,MetaDataCollector &md) 
+{
+	MgQLayerItem* item=layer(index);
+	if(!item)
+		return;
+	
+	//MetaDataCollector mdc=metaData;
+
+	if(sceneItem_)
+		sceneItem_->layerMetaDataForCurrentStep(item,md);	
+	
+	//metaData=mdc;
+}
+
+QString MvQLayerModel::layerMetaData(const QModelIndex& index,QString key) 
+{
+	MgQLayerItem* item=layer(index);
+
+	if(!item)
+		return QString();
+
+	MetaDataCollector md;
+	string keyStr=key.toStdString();
+	md[keyStr]="";
+		
+	sceneItem_->layerMetaDataForCurrentStep(item,md);	
+	
+	return QString::fromStdString(md[keyStr]);
+}
+
+
+/*
+const map<string,string>& MvQLayerModel::layerInfo(const QModelIndex& index) 
+{
+	static const map<string,string> emptyMap;
+
+	MgQLayerItem* item=layer(index);
+	if(!item)
+		return emptyMap;
+
+	return scene_->getLayerInfoForCurrentStep(item);
+}
+
+QString MvQLayerModel::layerInfo(const QModelIndex& index,QString key) 
+{
+	MgQLayerItem* item=layer(index);
+
+	if(!item)
+		return QString();
+
+	const map<string, string>& itemInfo=scene_->getLayerInfoForCurrentStep(item);		
+	//const map<string, string>& itemInfo=item->layer().getInfos();
+	if(!itemInfo.empty())
+	{
+		map<string,string>::const_iterator it=item->layer().getInfos().find(key.toStdString());
+		if(it !=  itemInfo.end())
+		{
+			return QString::fromStdString(it->second);
+		}
+	}
+	
+	return QString();
+}
+*/
+
+Qt::DropActions MvQLayerModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQLayerModel::mimeTypes() const
+ {
+     QStringList types;
+     types << "application/vnd.text.list";
+     return types;
+ }
+
+QMimeData* MvQLayerModel::mimeData(const QModelIndexList &indexes) const
+ {
+     	QMimeData *mimeData = new QMimeData();
+     	QByteArray encodedData;
+
+     	QDataStream stream(&encodedData, QIODevice::WriteOnly);
+
+    	foreach (QModelIndex index, indexes) 
+	{
+        	if (index.isValid()) 
+		{
+             		QString text = QString::number(index.row());
+             		stream << text;
+         	}
+     	}
+
+     	mimeData->setData("application/vnd.text.list", encodedData);
+     	return mimeData;
+}
+
+bool MvQLayerModel::dropMimeData(const QMimeData *data,
+     Qt::DropAction action, int row, int /*column*/, const QModelIndex &parent)
+{
+     	if (action == Qt::IgnoreAction)
+        	return true;
+
+     	if (!data->hasFormat("application/vnd.text.list"))
+        	return false;
+
+	int beginRow;
+
+     	if (row != -1)
+        	beginRow = row; 
+	else if (parent.isValid())
+        	beginRow = parent.row();
+	else
+         	beginRow = rowCount(QModelIndex());
+
+	QByteArray encodedData = data->data("application/vnd.text.list");
+     	QDataStream stream(&encodedData, QIODevice::ReadOnly);
+    	QStringList newItems;
+     	int rows = 0;
+
+     	while (!stream.atEnd()) 
+	{
+        	QString text;
+         	stream >> text;
+         	newItems << text;
+         	rows++;
+     	}
+ 	
+	qDebug() << "newItems:" <<  newItems;
+
+
+	if(rows ==0)
+		return false;
+
+	
+	int sourceRow=newItems[0].toInt();
+	moveLayer(sourceRow,beginRow);
+
+	emit layerDragFinished();
+
+     	return true;
+}
diff --git a/src/uPlot/MvQLayerModel.h b/src/uPlot/MvQLayerModel.h
new file mode 100644
index 0000000..feec6ae
--- /dev/null
+++ b/src/uPlot/MvQLayerModel.h
@@ -0,0 +1,122 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLayerModel_H
+#define MvQLayerModel_H
+
+#include <QAbstractItemModel>
+#include <QIcon>
+#include <QList>
+#include <QStyledItemDelegate>
+#include <QStyleOptionViewItem>
+
+class MgQLayerItem;
+class MgQPlotScene;
+class MgQSceneItem;
+class MvQLayerContentsIcon;
+
+#include "MgQLayerItem.h"
+#include "MgQSceneItem.h"
+
+
+//class MetaDataCollector;
+
+using namespace std;
+
+class MvQLayerDelegate : public QStyledItemDelegate
+{
+public:
+
+	MvQLayerDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const;
+
+private:
+	int itemHeight_;
+};
+
+
+class MvQLayerModel : public QAbstractItemModel
+{
+	Q_OBJECT
+
+public:
+   	MvQLayerModel(MgQPlotScene*);
+ 	~MvQLayerModel();
+
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+   	bool setData( const QModelIndex &, const QVariant &, int role = Qt::EditRole ); 
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+	
+	QList<MgQLayerItem*>& layers() {return layers_;}
+	MgQLayerItem* layer(const QModelIndex&) const;
+	string layerId(const QModelIndex&);
+	QString layerName(const QModelIndex&);
+	void layerMetaData(const QModelIndex&,MetaDataCollector&);
+	QString layerMetaData(const QModelIndex&,QString);
+
+	void layersAreAboutToChange();
+	void resetLayers(MgQSceneItem*);
+
+	void moveUp(const QModelIndex& index);
+	void moveDown(const QModelIndex& index);
+	void moveTop(const QModelIndex& index);
+	void moveBottom(const QModelIndex& index);
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+	void setTransparency(const QModelIndex&,int );
+	int transparency(const QModelIndex&);
+	MgQLayerItem* rowToLayer(int) const;
+	int layerToRow(MgQLayerItem*) const;
+	int indexToLevel(const QModelIndex&) const;
+	MvQLayerContentsIcon* indexToIcon(const QModelIndex&) const;
+	
+signals:
+	void layerVisibilityChanged(QString,bool);
+	void layerTransparencyChanged(QString,int);
+	void layerStackingOrderChanged(QList<QPair<QString,int> >);
+	void layerUpdate();
+	void layerDragFinished();
+
+protected:
+	void clearIcons();
+	MvQLayerContentsIcon* layerIcon(MgQLayerItem*,int) const;
+	int rowToStackLevel(int row);
+	QString label(MgQLayerItem*,const int,const int) const;
+	int idToLevel(int) const;
+	int idToParentRow(int) const;
+	void moveLayer(int,int);
+
+	
+	MgQPlotScene *scene_;
+	MgQSceneItem* sceneItem_;
+	QList<MgQLayerItem*> layers_;
+	Qt::CheckState state_;			
+	mutable QHash<MgQLayerItem*,QList<MvQLayerContentsIcon*> > icons_;
+};
+
+
+
+
+#endif 
diff --git a/src/uPlot/MvQLayerWidget.cc b/src/uPlot/MvQLayerWidget.cc
new file mode 100644
index 0000000..ef2707d
--- /dev/null
+++ b/src/uPlot/MvQLayerWidget.cc
@@ -0,0 +1,948 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QDebug>
+#include <QLabel>
+#include <QHBoxLayout>
+#include <QMenu>
+#include <QSlider>
+#include <QSpinBox>
+#include <QToolButton>
+#include <QTreeView>
+#include <QVBoxLayout>
+
+#include "MvQLayerWidget.h"
+#include "MvQLayerContentsIcon.h"
+#include "MvQLayerModel.h"
+
+MvQLayerWidget::MvQLayerWidget(MgQPlotScene *scene,QWidget *parent) : QWidget(parent)
+{	
+	QVBoxLayout *layerVb=new QVBoxLayout;
+	layerVb->setContentsMargins(2,2,2,2);
+	setLayout(layerVb);
+			
+	//Create layer model and view	
+	view_ = new QTreeView(this);
+	view_->setItemDelegate(new MvQLayerDelegate());
+	layerVb->addWidget(view_);	
+
+	model_= new MvQLayerModel(scene);
+	view_->setModel(model_);
+
+	//view_->setRootIsDecorated(false);
+
+	view_->setDragEnabled(true);
+ 	view_->setAcceptDrops(true);
+ 	view_->setDropIndicatorShown(true);
+	view_->setDragDropMode(QAbstractItemView::DragDrop);
+	
+	/*view_->setContextMenuPolicy(Qt::CustomContextMenu);
+
+	connect(view_,SIGNAL(customContextMenuRequested(const QPoint &)),
+                this,SLOT(slotContextMenu(const QPoint &)));*/
+		
+		
+	QPalette pal = view_->palette();
+	pal.setColor(QPalette::Highlight,Qt::white);
+	//view_->setPalette(pal);
+	
+	//Slider
+	QHBoxLayout *hb = new QHBoxLayout;
+	layerVb->addLayout(hb);
+	
+	QLabel *label=new QLabel(tr("Transparency (%)"));
+	hb->addWidget(label);	
+
+	trSlider_ = new QSlider;
+	trSlider_->setOrientation(Qt::Horizontal);
+	trSlider_->setMinimum(0);
+	trSlider_->setMaximum(100);
+	trSlider_->setToolTip(tr("Change layer transparency"));
+	hb->addWidget(trSlider_);		
+	
+	trSpin_ = new QSpinBox;
+	trSpin_->setMinimum(0);
+	trSpin_->setMaximum(100);
+	trSpin_->setToolTip(tr("Change layer transparency"));
+	hb->addWidget(trSpin_);	
+
+	initTrWidgets_=false;
+
+	connect(trSlider_,SIGNAL(valueChanged(int)),
+		this,SLOT(slotTrSliderValueChanged(int)));
+
+	connect(trSlider_,SIGNAL(sliderReleased()),
+		this,SLOT(slotTrSliderReleased()));
+
+	connect(trSpin_,SIGNAL(valueChanged(int)),
+		this,SLOT(slotTrSpinValueChanged(int)));
+		
+	//Buttons
+	hb = new QHBoxLayout;
+	layerVb->addLayout(hb);
+
+	topTb_ = new QToolButton(this);
+	topTb_->setToolTip(tr("Move the current layer to the top"));
+	topTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/arrow_top.svg")));
+
+	upTb_ = new QToolButton(this);
+	upTb_->setToolTip(tr("Move the current layer up"));
+  	upTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/arrow_up.svg")));
+
+	downTb_ = new QToolButton(this);
+	downTb_->setToolTip(tr("Move the current layer down"));
+	downTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/arrow_down.svg")));
+
+	bottomTb_ = new QToolButton(this);
+	bottomTb_->setToolTip(tr("Move the current layer to the bottom"));
+	bottomTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/arrow_bottom.svg")));
+	
+	hb->addWidget(topTb_);
+	hb->addWidget(upTb_);
+	hb->addWidget(downTb_);
+	hb->addWidget(bottomTb_);
+	hb->addStretch(1.);
+	
+	connect(topTb_,SIGNAL(clicked()),
+		this,SLOT(slotMoveTop()));
+
+	connect(upTb_,SIGNAL(clicked()),
+		this,SLOT(slotMoveUp()));
+
+	connect(downTb_,SIGNAL(clicked()),
+		this,SLOT(slotMoveDown()));
+
+	connect(bottomTb_,SIGNAL(clicked()),
+		this,SLOT(slotMoveBottom()));
+		
+	connect(view_,SIGNAL(clicked(const QModelIndex &)),
+		this,SLOT(slotSelectLayer(const QModelIndex &)));
+
+	connect(model_,SIGNAL(layerDragFinished()),
+		this,SLOT(slotCheckItemStatus()));
+		
+	connect(model_,SIGNAL(layerTransparencyChanged(QString,int)),
+		this,SIGNAL(layerTransparencyChanged(QString,int)));	
+		
+	connect(model_,SIGNAL(layerVisibilityChanged(QString,bool)),
+		this,SIGNAL(layerVisibilityChanged(QString,bool)));
+		
+	//connect(model_,SIGNAL(layerStackingOrderChanged(QList<QPair<QString,int> >)),
+	//	this,SIGNAL(layerStackingOrderChanged(QList<QPair<QString,int> >)));	
+		
+}		
+
+
+MvQLayerWidget::~MvQLayerWidget()
+{
+  
+}
+
+MgQLayerItem* MvQLayerWidget::currentLayer()
+{
+	int row=view_->currentIndex().row(); 
+	return model_->rowToLayer(row);
+}  
+
+QString MvQLayerWidget::currentLayerText()
+{
+	return model_->data(view_->currentIndex()).toString();  
+}  
+
+void MvQLayerWidget::slotSelectLayer(MgQLayerItem* layer)
+{
+	int row=model_->layerToRow(layer);
+	QModelIndex index=model_->index(row,0);
+	slotSelectLayer(index);
+}
+
+void MvQLayerWidget::slotSelectLayer(const QModelIndex &index)
+{
+	if(index != view_->currentIndex())
+	{
+		view_->setCurrentIndex(index);
+	}
+	
+	int value=model_->transparency(index);
+
+	slotCheckItemStatus();
+
+	initTrWidgets_=true;
+	trSlider_->setValue(value);
+	trSpin_->setValue(value);
+	initTrWidgets_=false;
+}
+
+
+void MvQLayerWidget::slotTrSpinValueChanged(int value)
+{
+	if(initTrWidgets_)
+		return;
+
+	trSlider_->setValue(value);
+	changeTransparency(value);
+}
+
+void MvQLayerWidget::slotTrSliderValueChanged(int value)
+{
+	if(initTrWidgets_)
+		return;
+	
+	initTrWidgets_=true;
+	trSpin_->setValue(value);
+	initTrWidgets_=false;
+	
+}
+
+void MvQLayerWidget::slotTrSliderReleased()
+{
+	int value=trSlider_->value();	
+	changeTransparency(value);
+}
+
+void MvQLayerWidget::changeTransparency(int value)
+{
+	model_->setTransparency(view_->currentIndex(),value);
+}
+
+void MvQLayerWidget::slotMoveTop()
+{
+	model_->moveTop(view_->currentIndex());
+	view_->setCurrentIndex(model_->index(0,0));
+	slotCheckItemStatus();
+}
+
+void MvQLayerWidget::slotMoveUp()
+{
+	int row=view_->currentIndex().row();
+	//QModelIndex parent=view_->currentIndex().parent();
+
+	model_->moveUp(view_->currentIndex());
+	view_->setCurrentIndex(model_->index(row-1,0));
+	slotCheckItemStatus();
+}
+
+void MvQLayerWidget::slotMoveBottom()
+{
+	model_->moveBottom(view_->currentIndex());
+
+	int num=model_->rowCount(QModelIndex());
+	view_->setCurrentIndex(model_->index(num-1,0));
+	slotCheckItemStatus();
+}
+
+void MvQLayerWidget::slotMoveDown()
+{
+	int row=view_->currentIndex().row();
+	//QModelIndex parent=view_->currentIndex().parent();
+
+	model_->moveDown(view_->currentIndex());	
+	view_->setCurrentIndex(model_->index(row+1,0));
+	slotCheckItemStatus();
+}
+
+void MvQLayerWidget::slotCheckItemStatus()
+{
+	if(!view_->currentIndex().isValid())
+	{
+		trSlider_->setEnabled(false);
+		trSpin_->setEnabled(false);
+		topTb_->setEnabled(false);
+		upTb_->setEnabled(false);
+		bottomTb_->setEnabled(false);
+		downTb_->setEnabled(false);
+	}
+	else
+	{
+		trSlider_->setEnabled(true);
+		trSpin_->setEnabled(true);
+		
+		int row=view_->currentIndex().row();
+		int num=model_->rowCount(QModelIndex());
+	
+		if(num==1)
+		{
+			topTb_->setEnabled(false);
+			upTb_->setEnabled(false);
+			downTb_->setEnabled(false);
+			bottomTb_->setEnabled(false);
+		}
+		else if(row==0)
+		{
+			topTb_->setEnabled(false);
+			upTb_->setEnabled(false);
+			downTb_->setEnabled(true);
+			bottomTb_->setEnabled(true);
+		}		
+		else if(row==num-1)
+		{
+			topTb_->setEnabled(true);
+			upTb_->setEnabled(true);
+			downTb_->setEnabled(false);
+			bottomTb_->setEnabled(false);
+		}
+		else 
+		{
+			topTb_->setEnabled(true);
+			upTb_->setEnabled(true);
+			downTb_->setEnabled(true);
+			bottomTb_->setEnabled(true);
+		}
+	}
+}
+
+void MvQLayerWidget::slotContextMenu(const QPoint &position)
+{
+	QModelIndex index=view_->indexAt(position); 
+		
+	if(!index.isValid() || model_->indexToLevel(index) == 0)
+	  	return;
+	
+	qDebug() << "Selected: " << model_->data(index,Qt::DisplayRole).toString();	  
+	
+	MvQLayerContentsIcon *icon=model_->indexToIcon(index);
+	if(!icon)
+	  	return;
+		
+	QList<QAction*> actions;
+
+	//Inser new key
+	QAction *actionEdit = new QAction(this);
+        actionEdit->setObjectName(QString::fromUtf8("actionEdit"));
+	actionEdit->setText(tr("Edit"));
+	actions.append(actionEdit);
+	if(!icon->canBeEdited())
+	 	actionEdit->setEnabled(false); 
+	
+	//Inser new key
+	QAction *actionSave = new QAction(this);
+        actionSave->setObjectName(QString::fromUtf8("actionSave"));
+	actionSave->setText(tr("Save"));
+	actions.append(actionSave);
+	if(!icon->canBeSaved())
+	 	actionSave->setEnabled(false); 
+
+	QAction *actionDelete = new QAction(this);
+        actionDelete->setObjectName(QString::fromUtf8("actionDelete"));
+	actionDelete->setText(tr("Delete"));
+	actions.append(actionDelete);
+	if(!icon->canBeDeleted())
+	 	actionDelete->setEnabled(false); 
+		
+	QAction *res=QMenu::exec(actions,view_->mapToGlobal(position));	
+	if(res == actionEdit) 
+	{
+		qDebug() << "Context menu: Edit"; 
+		icon->startEditor();
+	}  
+	else if(res == actionSave) 
+	{
+		qDebug() << "Context menu: Save"; 				
+	} 
+	else if(res == actionDelete) 
+	{
+		qDebug() << "Context menu: Delete"; 				
+	}  
+		
+	foreach(QAction *ac,actions)
+	  	delete ac;
+}
+
+void MvQLayerWidget::slotFrameChanged()
+{
+}
+
+void MvQLayerWidget::layersAreAboutToChange()
+{
+	//Save expand state
+	QModelIndexList indexLst=model_->match(model_->index(0,0),
+			    Qt::DisplayRole,"*",-1,
+		            Qt::MatchWildcard | Qt::MatchRecursive);
+	
+	expandList_.clear();	
+	foreach(QModelIndex index,indexLst)
+	{
+		if(view_->isExpanded(index))
+			expandList_ << index;
+	}	
+  
+	model_->layersAreAboutToChange();	
+}
+
+/*void MvQLayerWidget::reset(MgQSceneItem *sceneItem,int layerIndex)
+{
+  	model_->resetLayers(sceneItem);
+	
+	QModelIndex index=model_->index(layerIndex,0);
+	if(!index.isValid())
+	{
+		index=model_->index(model_->rowCount()-1,0);
+	}
+
+	if(index.isValid())
+	{
+		slotSelectLayer(index);
+	}
+	else
+	{
+		slotCheckItemStatus();
+	}	
+}*/
+
+void MvQLayerWidget::reset(MgQSceneItem *sceneItem,MgQLayerItem *layer)
+{
+  	model_->resetLayers(sceneItem);
+		
+	int row=model_->layerToRow(layer);
+	QModelIndex index=model_->index(row,0);
+	if(index.isValid())
+	{
+		slotSelectLayer(index);
+	}
+	else
+	{
+		slotCheckItemStatus();
+	}
+	
+	//Try to restore the expand state
+	foreach(QModelIndex index,expandList_)
+	{
+		if(model_->hasChildren(index))
+		{
+			view_->setExpanded(index,true);
+		}
+	}	
+	
+}
+
+void MvQLayerWidget::reset(MgQSceneItem *sceneItem)
+{
+	MgQLayerItem *layer=0;
+	MgQLayerItem *lastLayer=0;
+	
+	for(int i=sceneItem->layerItems().count()-1; i >=0; i--)
+	{
+	  	MgQLayerItem *item=sceneItem->layerItems().at(i);
+	  	lastLayer=item;
+		
+	  	QString str(item->layer().name().c_str());
+		QStringList lst=str.split("/");
+		if(!lst.isEmpty())
+		{
+			str=lst.last();
+		}		
+
+		if(str == lastSelectedLayerText_)
+		{  
+			layer=item;
+		}
+	}
+		
+	if(!layer)
+	  	layer=lastLayer;
+			
+	//contentsLoaded_=false;
+	reset(sceneItem,layer);   
+	//contentsLoaded_=true;
+}
+
+
+int MvQLayerWidget::layerAtGlobalPos(const QPoint& p)
+{
+  	QPoint pv=view_->mapFromGlobal(p);
+  	QModelIndex index=view_->indexAt(pv);
+	
+	MvQLayerContentsIcon *icon=model_->indexToIcon(index);
+	if(!icon)
+	  	return -1;
+	
+	qDebug() << "name: " << icon->name();	
+
+	return -1;
+	
+	//Get the dataUinitId
+	/*MvIcon& dropIcon =  cl->GetIconMain ();
+	Cached verbTarget = dropIcon.Request ().getVerb ();
+	if ( ObjectList::IsDataUnit ( verbTarget ) == true )
+	     set_value ( id->header, "_CONTENTS_DATAUNIT_ID", "%d", dropIcon.Id());*/
+	
+	/*if(index.isValid())
+	{
+	  	MgQLayerItem *layer=model_->rowToLayer(index.row());
+		if(layer)
+		{
+		  	QString str(layer->layer().name().c_str());
+		} 
+	}
+	
+	qDebug() << "layer drop index" << index;
+  	*/
+}
+
+
+
+
+
+
+
+
+
+
+/*
+
+#include <QButtonGroup>
+#include <QDebug>
+#include <QLabel>
+#include <QListWidget>
+#include <QHBoxLayout>
+#include <QPainter>
+#include <QStackedLayout>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "MgQSceneItem.h"
+
+#include "MvQLayerWidget.h"
+#include "MvQLayerWidget.h"
+#include "MvQLayerDataWidget.h"
+#include "MvQLayerMetaDataWidget.h"
+
+MvQLayerWidget::MvQLayerWidget(MgQPlotScene *scene,MvQPlotView *plotView,QWidget *parent) : QWidget(parent), sceneItem_(0)
+{
+  	contentsLoaded_=false;
+	metaLoaded_=false;
+	dataLoaded_=false;
+	layerListLoaded_=false;	
+	
+	QVBoxLayout *layout = new QVBoxLayout;
+	layout->setContentsMargins(0,0,0,0);
+	setLayout(layout);
+	
+	//Top row
+	QHBoxLayout *hb = new QHBoxLayout;
+	layout->addLayout(hb);
+	
+	showLayerTb_ = new QToolButton(this);
+	showLayerTb_->setToolTip(tr("View layers"));
+	showLayerTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/layers.svg")));
+	showLayerTb_->setCheckable(true);
+	showLayerTb_->setChecked(true);
+	hb->addWidget(showLayerTb_);
+
+	//connect(showLayerTb_,SIGNAL(toggled(bool)),
+	//	this,SLOT(slotLayerMeta(bool)));
+	
+	showMetaTb_ = new QToolButton(this);
+	showMetaTb_->setToolTip(tr("View meta-data"));
+	showMetaTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/meta_data.svg")));
+	showMetaTb_->setCheckable(true);
+	showMetaTb_->setChecked(false);
+	hb->addWidget(showMetaTb_);
+	//hb->addStretch(1);
+	
+	//connect(showLayerTb_,SIGNAL(toggled(bool)),
+	//	this,SLOT(slotLayerMeta(bool)));
+	
+	showDataTb_ = new QToolButton(this);
+	showDataTb_->setToolTip(tr("View data"));
+	showDataTb_->setIcon(QPixmap(QString::fromUtf8(":/uPlot/meta_data.svg")));
+	showDataTb_->setCheckable(true);
+	showDataTb_->setChecked(false);
+	hb->addWidget(showDataTb_);
+	hb->addStretch(1);
+
+	//connect(showMetaTb_,SIGNAL(toggled(bool)),
+	//	this,SLOT(slotShowMeta(bool)));
+	
+	showBg_=new QButtonGroup(this);
+	showBg_->setExclusive(true);
+	showBg_->addButton(showLayerTb_,0);
+	showBg_->addButton(showMetaTb_,1);
+	showBg_->addButton(showDataTb_,2);
+
+	connect(showBg_,SIGNAL(buttonClicked(int)),
+		this,SLOT(slotShowContents(int)));
+				
+	//----------------------
+	// Layer selector list	
+	//----------------------
+	
+	hb=new QHBoxLayout;
+	layout->addLayout(hb);
+	
+	layerList_=new QListWidget;
+	layerList_->setViewMode(QListView::IconMode);
+	layerList_->setFlow(QListView::LeftToRight);
+	layerList_->setMovement(QListView::Static);
+	layerList_->setWrapping(false);
+    	layerList_->setIconSize(QSize(48, 48));
+	layerList_->setMaximumHeight(75);
+     	layerList_->setSpacing(5);
+	hb->addWidget(layerList_);
+
+	connect(layerList_,SIGNAL(itemActivated(QListWidgetItem*)),
+		this,SLOT(slotSelectLayerFromList(QListWidgetItem*)));
+		
+	layerList_->hide();
+	
+	//----------------------
+	// Central
+	//----------------------
+	
+	centralLayout_=new QStackedLayout;
+	layout->addLayout(centralLayout_,1);
+
+	//----------------------
+	// ContentsWidget	
+	//----------------------
+	
+	contentsWidget_=new MvQLayerWidget(scene);
+	centralLayout_->addWidget(contentsWidget_);
+			
+	//----------------------
+	// Metadata widget
+	//----------------------
+	
+	metaWidget_=new MvQLayerMetaDataWidget();
+	centralLayout_->addWidget(metaWidget_);	
+	
+	//----------------------
+	// Data widget
+	//----------------------
+	
+	dataWidget_=new MvQLayerDataWidget(scene,plotView);
+	centralLayout_->addWidget(dataWidget_);		
+						
+}
+
+
+MvQLayerWidget::~MvQLayerWidget()
+{
+}
+
+MgQLayerItem* MvQLayerWidget::currentLayerFromList()
+{	
+  	QListWidgetItem *item=layerList_->currentItem();
+	if(!item)
+	{  
+		return 0;
+	}  
+	
+	int layerIndex=item->data(Qt::UserRole).toInt();
+	if( layerIndex >=0 &&  layerIndex < sceneItem_->layerItems().count())
+	{  
+		return sceneItem_->layerItems().at(layerIndex);
+	}
+	else
+	{
+	  	return 0;
+	}	
+}
+
+void MvQLayerWidget::setCurrentItemForLayerList(MgQLayerItem* item)
+{	
+	if(!item)
+  		return;
+	
+	int layerIndex= sceneItem_->layerItems().indexOf(item);
+	if(layerIndex != -1)
+	{
+		for(int i=0; i < layerList_->count(); i++)
+		{
+	  		if(layerList_->item(i)->data(Qt::UserRole).toInt() == layerIndex)
+			{
+		  		layerList_->setCurrentRow(i,QItemSelectionModel::SelectCurrent);
+				break;
+			}
+		}
+	}	
+}	
+	
+
+void MvQLayerWidget::slotShowContents(int id)
+{
+	MgQLayerItem* layer;
+	int currentId=centralLayout_->currentIndex();
+	
+	if(currentId == 0)
+	{
+		layer=contentsWidget_->currentLayer(); 				
+	}
+	else
+	{
+	  	layer=currentLayerFromList();	
+	}  
+	
+      	if(id == 0)	
+	{
+		if(!contentsLoaded_)
+		{
+		  	contentsWidget_->layersAreAboutToChange();
+			contentsWidget_->reset(sceneItem_,layer);
+			contentsLoaded_=true;
+		}
+		else
+		{
+		  	contentsWidget_->slotSelectLayer(layer);		  		  
+		}  
+		layerList_->hide();
+	}	
+	else
+	{
+		//We need to do it all the time to pick up the current layer stacking order
+		resetLayerList(sceneItem_,layer);
+		layerListLoaded_=true;
+		
+		
+		layerList_->show();
+		
+		if(id == 1)
+		{
+		  	if(!metaLoaded_)
+			{
+			  	metaWidget_->reset(sceneItem_,layer);	
+				metaLoaded_=true;
+			}
+			else
+			{  
+				metaWidget_->setLayer(layer);
+			}
+		}
+		else if(id == 2)
+		{
+		  	if(!dataLoaded_)
+			{
+			  	dataWidget_->reset(sceneItem_,layer);	
+				dataLoaded_=true;
+			}
+			else
+			{  
+				dataWidget_->setLayer(layer);
+			}
+		}
+		
+	}	
+								
+  	centralLayout_->setCurrentIndex(id);  
+}  
+
+
+void MvQLayerWidget::slotFrameChanged()
+{
+  	switch(centralLayout_->currentIndex())
+	{
+	case 1:
+	  	metaWidget_->slotFrameChanged(); 
+		break;
+	case 2:
+	  	dataWidget_->slotFrameChanged(); 
+		break;
+	default:
+	  	break;
+	}
+}
+
+void  MvQLayerWidget::slotSelectLayerFromList(QListWidgetItem* )
+{  	
+  	int currentId=centralLayout_->currentIndex();
+	switch(currentId)
+	{
+	case 1:	
+		metaWidget_->setLayer(currentLayerFromList());	  
+		break;
+	case 2:	
+		dataWidget_->setLayer(currentLayerFromList());	  
+		break;
+	default:
+	  	break;
+	}  
+}  
+
+
+void MvQLayerWidget::layersAreAboutToChange()
+{
+	switch(centralLayout_->currentIndex())
+	{
+	case 0:
+		lastSelectedLayerText_=contentsWidget_->currentLayerText();
+		contentsWidget_->layersAreAboutToChange();
+		break;
+	case 1:
+	  	if(layerList_->currentItem())
+		{
+		  	lastSelectedLayerText_=layerList_->currentItem()->text();
+		}
+		break;
+	case 2:
+	  	if(layerList_->currentItem())
+		{
+		  	lastSelectedLayerText_=layerList_->currentItem()->text();
+		}
+		break;			
+	default:
+	  	break;
+	}
+}
+
+void MvQLayerWidget::reset(MgQSceneItem *sceneItem)
+{
+	sceneItem_=sceneItem;
+	
+	MgQLayerItem *layer=0;
+	MgQLayerItem *lastLayer=0;
+	
+	for(int i=sceneItem_->layerItems().count()-1; i >=0; i--)
+	{
+	  	MgQLayerItem *item=sceneItem_->layerItems().at(i);
+	  	lastLayer=item;
+		
+	  	QString str(item->layer().name().c_str());
+		QStringList lst=str.split("/");
+		if(!lst.isEmpty())
+		{
+			str=lst.last();
+		}		
+
+		if(str == lastSelectedLayerText_)
+		{  
+			layer=item;
+		}
+	}
+		
+	if(!layer)
+	  	layer=lastLayer;
+	
+	
+	int currentId=centralLayout_->currentIndex();
+	
+	//reset widget load states
+	contentsLoaded_=false;
+	metaLoaded_=false;
+	dataLoaded_=false;
+	layerListLoaded_=false;	
+
+	switch(currentId)
+	{
+	case 0:
+	  	contentsWidget_->reset(sceneItem,layer);   
+		contentsLoaded_=true;
+		break;
+	case 1:	
+	  	contentsWidget_->reset(0,0); 
+		
+		resetLayerList(sceneItem,layer);
+		metaWidget_->reset(sceneItem,layer);		
+		metaLoaded_=true;
+		layerListLoaded_=true;	
+		break;
+	case 2:	
+	  	contentsWidget_->reset(0,0); 
+		
+		resetLayerList(sceneItem,layer);
+		dataWidget_->reset(sceneItem,layer);		
+		dataLoaded_=true;
+		layerListLoaded_=true;	
+	
+	default:
+	  	break;
+	}	
+}
+
+//Update layer selector
+void MvQLayerWidget::resetLayerList(MgQSceneItem *sceneItem, MgQLayerItem* layer)
+{
+	layerList_->clear();
+	
+	if(!sceneItem)
+	  	return;
+	
+	std::map<int,int> stackLevel;
+	for(int i=0; i < sceneItem->layerItems().count(); i++)
+	{
+		stackLevel[sceneItem->layerItems().at(i)->stackLevel()]=i;
+	}
+	
+	//Check is needed!!
+		
+	for(int i=sceneItem->layerItems().count()-1; i >=0; i--)
+	{
+	//  	MgQLayerItem *item=sceneItem->layerItems().at(i);
+	  	
+		MgQLayerItem *item=sceneItem->layerItems().at(stackLevel[i]);	
+
+		QString str(item->layer().name().c_str());
+		QStringList lst=str.split("/");
+		if(!lst.isEmpty())
+		{
+			str=lst.last();
+		}		
+
+		QPixmap pix=QPixmap::fromImage(item->preview().scaled(QSize(48,48),Qt::KeepAspectRatio));
+		QPainter painter(&pix);
+		painter.setPen(QColor(230,230,230));
+		painter.drawRect(pix.rect().adjusted(1,1,-1,-1));
+			
+		QListWidgetItem *lstItem=new QListWidgetItem(pix,str);
+		lstItem->setData(Qt::UserRole,stackLevel[i]); // We store the real index 
+		layerList_->addItem(lstItem);		
+	}
+	
+	setCurrentItemForLayerList(layer);
+}
+
+int MvQLayerWidget::layerAtGlobalPos(const QPoint& p)
+{
+  	if(centralLayout_->currentIndex() == 0)
+	{  
+		return contentsWidget_->layerAtGlobalPos(p);	  	
+	}
+	return -1;
+}	
+
+void MvQLayerWidget::writeSettings(QSettings& settings)
+{
+  	settings.beginGroup("MvQLayerWidget");
+  
+	settings.setValue("id",centralLayout_->currentIndex());
+	settings.setValue("histoEnabled",metaWidget_->isHistoEnabled());
+	settings.setValue("histoVisdefIndex",metaWidget_->histoVisdefCurrentIndex());
+	settings.setValue("statsEnabled",metaWidget_->isStatsEnabled());
+	
+	settings.endGroup();
+	
+}
+
+void MvQLayerWidget::readSettings(QSettings& settings)
+{
+  	settings.beginGroup("MvQLayerWidget");
+	
+	QVariant val;
+	
+	val=settings.value("id");	
+	QAbstractButton *tb=showBg_->button((val.isNull())?0:val.toInt());
+	if(tb)
+	  	tb->click();
+	else
+		showBg_->button(0)->click();
+	
+	val=settings.value("histoEnabled");
+	metaWidget_->setHistoEnabled((val.isNull())?true:val.toBool());
+	
+	val=settings.value("histoVisdefIndex");
+	metaWidget_->setHistoVisdefInitialIndex((val.isNull())?0:val.toInt());
+	
+	val=settings.value("statsEnabled");
+	metaWidget_->setStatsEnabled((val.isNull())?true:val.toBool());
+
+  	settings.endGroup();
+  
+}  
+
+*/
\ No newline at end of file
diff --git a/src/uPlot/MvQLayerWidget.h b/src/uPlot/MvQLayerWidget.h
new file mode 100644
index 0000000..3ed81b4
--- /dev/null
+++ b/src/uPlot/MvQLayerWidget.h
@@ -0,0 +1,167 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLayerWidget_H
+#define MvQLayerWidget_H
+
+#include <QModelIndex>
+#include <QWidget>
+
+#include "MvRequest.h"
+
+class QLabel;
+class QSlider;
+class QSpinBox;
+class QToolButton;
+class QTreeView;
+
+class MgQLayerItem;
+class MvQLayerModel;
+class MgQPlotScene;
+class MgQSceneItem;
+
+class MvQLayerContentsItemEditor
+{
+public:
+	MvQLayerContentsItemEditor(const Cached& name);
+
+	~MvQLayerContentsItemEditor() {}
+
+	void EditedDefinition(MvRequest&);
+
+private:
+	Cached name_;
+
+};
+
+class MvQLayerWidget : public QWidget
+{
+Q_OBJECT
+
+public:
+	MvQLayerWidget(MgQPlotScene*,QWidget *parent=0);
+	~MvQLayerWidget();
+	void layersAreAboutToChange();
+	void reset(MgQSceneItem *,MgQLayerItem*);
+	void reset(MgQSceneItem *);
+	MgQLayerItem* currentLayer();
+	QString currentLayerText();
+	int  layerAtGlobalPos(const QPoint&);
+	void iconEdited(MvRequest&);
+
+public slots:
+	void slotSelectLayer(MgQLayerItem* layer);
+	void slotSelectLayer(const QModelIndex &);
+	void slotTrSpinValueChanged(int);
+	void slotTrSliderValueChanged(int);
+	void slotTrSliderReleased();
+	void slotMoveBottom();
+	void slotMoveDown();
+	void slotMoveUp();
+	void slotMoveTop();
+	void slotCheckItemStatus();
+	void slotContextMenu(const QPoint &position);
+	void slotFrameChanged();
+	
+signals:
+        void layerVisibilityChanged(QString,bool);
+	void layerTransparencyChanged(QString,int);
+	void layerStackingOrderChanged(QList<QPair<QString,int> >);
+  
+protected:
+	void changeTransparency(int);
+	void startIconEditor(QString);
+	
+	QTreeView *view_;
+	MvQLayerModel *model_;
+	QSlider *trSlider_;
+	QSpinBox *trSpin_;
+	bool initTrWidgets_;
+
+	QToolButton *topTb_;
+	QToolButton *upTb_;
+	QToolButton *downTb_;
+	QToolButton *bottomTb_;
+	
+	QModelIndexList expandList_; 
+	QString lastSelectedLayerText_;
+};
+
+#endif
+
+
+/*
+
+
+
+#ifndef MvQLayerWidget_H
+#define MvQLayerWidget_H
+
+#include <QSettings>
+#include <QWidget>
+
+class QButtonGroup;
+class QListWidget;
+class QListWidgetItem;
+class QStackedLayout;
+class QToolButton;
+
+class MgQLayerItem;
+class MgQPlotScene;
+class MgQSceneItem;
+
+class MvQLayerContentsWidget;
+class MvQLayerDataWidget;
+class MvQLayerMetaDataWidget;
+class MvQPlotView;
+
+class MvQLayerWidget : public QWidget
+{
+Q_OBJECT
+
+public:
+	MvQLayerWidget(MgQPlotScene*,MvQPlotView*,QWidget *parent=0);
+	~MvQLayerWidget();
+	void layersAreAboutToChange();
+	void reset(MgQSceneItem *);
+	void writeSettings(QSettings&);
+	void readSettings(QSettings&);
+	int  layerAtGlobalPos(const QPoint&);
+	MvQLayerContentsWidget *contentsWidget() const {return contentsWidget_;}
+
+public slots:
+	void slotShowContents(int);
+	void slotFrameChanged();
+	void slotSelectLayerFromList(QListWidgetItem*);
+	
+protected:
+	MgQLayerItem* currentLayerFromList();
+	void setCurrentItemForLayerList(MgQLayerItem*);
+	void resetLayerList(MgQSceneItem *,MgQLayerItem*);
+	
+	QStackedLayout *centralLayout_;
+	MvQLayerContentsWidget *contentsWidget_;
+	MvQLayerMetaDataWidget* metaWidget_;
+	MvQLayerDataWidget* dataWidget_;
+	QToolButton *showLayerTb_;
+	QToolButton *showMetaTb_;
+	QToolButton *showDataTb_;
+	QButtonGroup *showBg_;
+	QListWidget* layerList_;
+	MgQSceneItem *sceneItem_;
+	QString lastSelectedLayerText_;
+	bool contentsLoaded_;
+	bool metaLoaded_;
+	bool dataLoaded_;
+	bool layerListLoaded_;	
+};
+
+#endif
+
+*/
\ No newline at end of file
diff --git a/src/uPlot/MvQLineSelection.cc b/src/uPlot/MvQLineSelection.cc
new file mode 100644
index 0000000..f262245
--- /dev/null
+++ b/src/uPlot/MvQLineSelection.cc
@@ -0,0 +1,790 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+
+#include <QDebug>
+#include <QMouseEvent>
+#include <QPainter>
+
+#include "MvQLineSelection.h"
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+#include "MgQLayoutItem.h"
+
+MvQLineSelection::MvQLineSelection(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	MvQPlotItem(scene,view,parent)
+{	
+	pen_=QPen(QColor(0,0,255,230),2);
+	pen_.setCosmetic(true);
+	//pen_=QPen(QColor(103,140,168),2);
+	brush_=QBrush(QColor(164,219,255,180));
+	currentAction_=NoAction;
+	zoomLayout_=0;
+	line_=QLine();
+
+	arrowPen_=QPen(QColor(0,0,0));
+	arrowPen_.setCosmetic(true);
+	
+	//arrowBrush_=QBrush(QColor(103,140,168));
+	arrowBrush_=QBrush(QColor(0,0,255));
+
+	selectionPen_=QPen(QColor(0,0,0),2);
+	selectionPen_.setStyle(Qt::DotLine);
+	selectionPen_.setCosmetic(true);
+	resizeId_=-1;
+	handleSize_=8.;
+	physicalHandleSize_=8.;
+	for(int i=0;i< 2; i++)	
+	{
+		handle_ << QRectF(0.,0.,handleSize_,handleSize_);
+	}
+
+	showHandles_=false;
+	handleHover_=-1;
+
+	arrowSize_=10.;
+
+	
+}
+
+MvQLineSelection::~MvQLineSelection()
+{
+}
+
+QRectF MvQLineSelection::boundingRect() const
+{
+	checkHandleSize();
+	
+	qreal x1=line_.p1().x();
+	qreal y1=line_.p1().y();
+	qreal x2=line_.p2().x();
+	qreal y2=line_.p2().y();
+
+	qreal tlx,tly,brx,bry;
+
+	tlx=(x1 <= x2)?x1:x2;
+	tly=(y1 < y2)?y1:y2;
+	brx=(x1 <= x2)?x2:x1;
+	bry=(y1 < y2)?y2:y1;
+
+	QRectF r(QPointF(tlx,tly),QPointF(brx,bry));
+
+	if(r.height() < 10.)
+	{
+		r.adjust(0.,-5.,0.,5.);
+	}
+	else if(r.width() < 10.)
+	{
+		r.adjust(-5.,0.,5.,0.);
+	}
+
+	float d=(handleSize_/2. > arrowSize_)?handleSize_/2.:arrowSize_;
+
+	return r.adjusted(-d/2.,-d/2.,d/2.,d/2.);
+}
+
+void MvQLineSelection::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+
+	checkHandleSize();
+	
+	/*painter->setBrush(startBrush_);
+	painter->drawEllipse(QRectF(line_.p1().x()-5,line_.p1().y()-5,
+				10,10));
+
+	painter->setBrush(endBrush_);
+	painter->drawEllipse(QRectF(line_.p2().x()-5,line_.p2().y()-5,
+				10,10));
+	painter->setBrush(QBrush());*/
+
+	painter->setRenderHint(QPainter::Antialiasing);	
+	painter->setBrush(QBrush());
+
+	//Outline
+	if(currentAction_==ResizeAction || currentAction_==MoveAction ||
+	   showHandles_)
+	{
+		painter->setPen(selectionPen_);
+	}
+	else
+	{
+		painter->setPen(pen_);
+	}
+	painter->drawLine(line_);
+
+	//Draw arrow
+	QPolygonF arrow;
+	QPointF  cp((line_.p1().x()+line_.p2().x())/2.,
+		    (line_.p1().y()+line_.p2().y())/2.);
+
+	arrow << QPointF(0.,0.) << QPointF(-arrowSize_,arrowSize_/2.) << 
+		 QPointF(-arrowSize_,-arrowSize_/2.);
+
+	//arrow.translate(cp);
+	
+	float angle=atan2f(line_.p2().y()-line_.p1().y(),
+			   line_.p2().x()-line_.p1().x());
+
+	angle=angle*180./M_PI;
+
+	//qDebug() << "angle" << angle*180./M_PI;
+
+	painter->setPen(arrowPen_);
+	painter->setBrush(arrowBrush_);
+
+	painter->save();
+	painter->translate(cp);
+	painter->rotate(angle);
+	painter->drawPolygon(arrow);
+	painter->restore();
+		
+	painter->setRenderHint(QPainter::Antialiasing,false);
+
+	//Handlers
+	if(showHandles_)
+	{
+		for(int i=0; i < handle_.count(); i++)
+		{
+			QRectF r=handle_[i];
+			r.translate(line_.p1());
+			if(handleHover_ == i)
+			{
+				painter->setPen(Qt::blue);
+				painter->setBrush(QColor(164,219,255,150));
+			}
+			else
+			{
+				painter->setPen(Qt::blue);
+				painter->setBrush(QColor(0,0,255,150));
+			}
+			
+			painter->drawRect(r);
+		}
+	}
+}
+
+void MvQLineSelection::mousePressEventFromView(QMouseEvent *event)
+{
+	checkHandleSize();
+	
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	handleHover_=-1;
+
+	if(line_.isNull())
+	{
+		//Get item position
+		lineOrigin_ = mapFromScene(plotView_->mapToScene(event->pos()));
+		
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(lineOrigin_))) == 0) 
+		{
+			currentAction_=NoAction;
+		}
+		else
+		{
+			currentAction_=DefineAction;
+		
+			line_.setPoints(lineOrigin_,lineOrigin_);			
+			setVisible(true);
+		}
+	}
+
+	else
+	{
+		//float dh=handleSize_/2;
+		//QRectF cRect=controlRect();
+
+		//qDebug() << "crect" << cRect;
+
+		dragPos_=mapFromScene(plotView_->mapToScene(event->pos()));
+	
+		if((zoomLayout_=plotScene_->firstProjectorItem()) != 0 &&
+		    checkPointInLineArea(dragPos_) == true)
+		{
+			QPointF xp=dragPos_-line_.p1();
+
+			qDebug() << "xp" << dragPos_<< xp;
+
+			updateHandles();
+
+			resizeId_=-1;
+			for(int i=0; i < handle_.count(); i++)
+			{
+				qDebug() << "handle" << i << handle_[i];
+				//If a handle is selected it starts a resize action 
+				if(handle_[i].contains(xp))
+				{
+					resizeId_=i;
+
+					Qt::CursorShape shape;
+					shape=Qt::SizeBDiagCursor;
+					setCursor(QCursor(shape));
+					currentAction_=ResizeAction;
+
+					//qDebug() << "resizeId" << resizeId_;
+					return;
+				}
+			}		
+
+			//If no resize action it checks if the drag point is 
+			//in the selection rentangle and starts a move action 
+			if(resizeId_== -1)
+			{
+				currentAction_=MoveAction;
+				setCursor(QCursor(Qt::SizeAllCursor));
+			}
+			//Otherwise unselect
+			else
+			{
+				currentAction_=NoAction;
+				dragPos_=QPointF();
+				if(showHandles_)
+				{
+					showHandles_=false;
+					update();
+				}
+			}	
+
+		}
+		else
+		{
+			currentAction_=NoAction;
+			dragPos_=QPointF();
+
+			if(showHandles_)
+			{
+				showHandles_=false;
+				update();
+			}		
+		}
+	}
+}
+
+void MvQLineSelection::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	//qDebug() << "mouseMove in area";
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+
+	if(currentAction_ == DefineAction)
+	{	
+		QPointF p2=pos;
+		checkEndPoint(p2);
+		if(p2.isNull())
+		{
+			clearLine();
+			return;
+		}
+
+		prepareGeometryChange();
+		line_=QLineF(lineOrigin_,p2);
+		update();
+	}
+	else if(currentAction_ == ResizeAction)
+	{	
+		QPointF dp = pos - dragPos_;
+
+		QPointF p=dp;
+		if(resizeId_==0)
+			p+=line_.p1();
+		else if(resizeId_==1)
+			p+=line_.p2();
+
+		checkEndPoint(p);
+
+		QLineF ln;
+		if(resizeId_==0)
+			ln=QLineF(p,line_.p2());
+		else if(resizeId_==1)
+			ln=QLineF(line_.p1(),p);
+
+		qDebug() << "resize" << ln;
+
+		/*if(r.isNull() || 
+		   fabs(r.width()) <= 8. || fabs(r.height()) <=8. || 
+		   r.width() < 0. || r.height() < 0.)
+		{
+			qDebug() << "resize false" << line_;
+			return;
+		}*/
+		
+		prepareGeometryChange();
+		line_=ln;
+		dragPos_=pos;
+		showHandles_=false;
+		update();		
+	}
+	else if(currentAction_ == MoveAction)
+	{	
+		QPointF dp = pos - dragPos_;
+
+		qDebug() << "move" << dp << line_; 
+
+		checkMoveDelta(dp);
+
+		prepareGeometryChange();
+		line_.translate(dp);
+		dragPos_=pos;
+		showHandles_=false;
+		update();		
+	}
+	else if(event->buttons() ==  Qt::NoButton)
+	{
+		if(showHandles_==false)
+			return;
+
+		QPointF dp= pos-line_.p1();
+
+		updateHandles();
+		int oriHover=handleHover_;
+		handleHover_=-1;
+		for(int i=0; i < handle_.count(); i++)
+		{			
+			if(handle_[i].contains(dp))
+			{
+				handleHover_=i;	
+				if(handleHover_ != oriHover)
+				{
+					update();
+				}
+				break;
+			}
+		}
+		
+		if(oriHover != -1)
+		{
+			update();
+		}	
+	}
+}
+
+ void MvQLineSelection::mouseReleaseEventFromView(QMouseEvent *event)
+ {
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+
+	if(currentAction_ == DefineAction)
+	{	
+		QPointF p2=pos;
+		checkEndPoint(p2);
+		if(p2.isNull() || 
+		   QLineF(lineOrigin_,p2).length() < 8.)
+		{
+			clearLine();
+			return;
+		}
+		
+		prepareGeometryChange();
+		line_=QLineF(lineOrigin_,p2);
+		update();
+
+		//Get geo coordinates of rect corners
+		QPointF sp1=line_.p1();
+		QPointF sp2=line_.p2();
+		QPointF gp1, gp2;
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp1),gp1);
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp2),gp2);
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+
+		emit lineIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+
+	}	
+	else if(currentAction_ == ResizeAction)
+	{
+		QPointF dp = pos - dragPos_;
+
+		QPointF p=dp;
+		if(resizeId_==0)
+			p+=line_.p1();
+		else if(resizeId_==1)
+			p+=line_.p2();
+
+		checkEndPoint(p);
+
+		QLineF ln;
+		if(resizeId_==0)
+			ln=QLineF(p,line_.p2());
+		else if(resizeId_==1)
+			ln=QLineF(line_.p1(),p);
+
+		if(ln.isNull() || ln.length() < 8.) 
+		{
+			clearLine();
+			return;
+		}
+
+		prepareGeometryChange();
+		line_=ln;
+		//update();
+
+		//Get geo coordinates of rect corners
+		QPointF sp1=line_.p1();
+		QPointF sp2=line_.p2();
+		QPointF gp1, gp2;
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp1),gp1);
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp2),gp2);
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		dragPos_=QPointF();
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+
+		emit lineIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+
+		updateHandles();
+		showHandles_=true;
+		update();	
+		unsetCursor();
+	}	
+	else if(currentAction_ == MoveAction)
+	{
+		QPointF dp = pos - dragPos_;
+
+		checkMoveDelta(dp);
+
+		prepareGeometryChange();
+		line_.translate(dp); 
+
+		QPointF sp1=line_.p1();
+		QPointF sp2=line_.p2();
+		QPointF gp1, gp2;
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp1),gp1);
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp2),gp2);
+
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		dragPos_=QPointF();
+		coordPoint_.clear();
+		coordPoint_ << gp1 << gp2;
+
+		emit lineIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+
+		updateHandles();
+		showHandles_=true;
+		update();	
+		unsetCursor();
+	}
+ }
+
+
+void MvQLineSelection::setLine(double lat1,double lon1,double lat2,double lon2)
+{
+	//double west, double north, double east, double south)
+	
+	double x1=lon1;
+	double y1=lat1;
+	double x2=lon2;
+	double y2=lat2;
+	
+	QPointF sp0,sp1;
+
+	if(line_.isNull() || line_.p1() == line_.p2())
+	{
+		if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+		{
+			return;
+		}
+	}
+	else
+	{
+		sp0=line_.p1();
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(sp0))) == 0)
+		{
+			return;
+
+		}
+	}
+
+
+	QPointF gp0(x1,y1);
+	QPointF gp1(x2,y2);
+
+	qDebug() << zoomLayout_->containsGeoCoords(gp0);
+	qDebug() << zoomLayout_->containsGeoCoords(gp1);
+
+	if(zoomLayout_->containsGeoCoords(gp0) && 
+	   zoomLayout_->containsGeoCoords(gp1))
+	{
+		zoomLayout_->mapFromGeoToSceneCoords(gp0,sp0);	
+		zoomLayout_->mapFromGeoToSceneCoords(gp1,sp1);
+
+		sp0=mapFromScene(sp0);
+		sp1=mapFromScene(sp1);
+		
+		prepareGeometryChange();
+		line_.setPoints(sp0,sp1);
+		coordPoint_.clear();
+		coordPoint_ << gp0 << gp1;
+		updateHandles();
+		update();
+	}
+	else
+	{
+		QPointF sp1=line_.p1();
+		QPointF sp2=line_.p2();
+		
+		sp0=mapToScene(sp0);
+		sp1=mapToScene(sp1);
+		
+		QPointF gp1, gp2;
+		zoomLayout_->mapFromSceneToGeoCoords(sp1,gp1);
+		zoomLayout_->mapFromSceneToGeoCoords(sp2,gp2);
+
+		emit lineIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+	}
+}
+	
+void MvQLineSelection::clearLine()
+{
+	currentAction_=NoAction;
+	prepareGeometryChange();
+	line_=QLineF();
+	coordPoint_.clear();
+	showHandles_=false;
+	update();
+	emit lineIsUndefined();
+}
+
+
+// It should be called only after zoom!!!
+// If the projection is changed the line should be set "undefined"!!
+
+void MvQLineSelection::reset()
+{
+	if(coordPoint_.isEmpty() || line_.isNull())
+		return;
+
+	//We need to find the projectorItem!!
+	QPointF sp0,sp1;
+
+	if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+	{
+		clearLine();
+		return;
+	}
+
+	
+	QPointF gp0=coordPoint_[0];
+	QPointF gp1=coordPoint_[1];
+
+	//qDebug() << coordPoint_;
+
+	if(zoomLayout_->containsGeoCoords(gp0) && 
+	   zoomLayout_->containsGeoCoords(gp1))
+	{
+		zoomLayout_->mapFromGeoToSceneCoords(gp0,sp0);	
+		zoomLayout_->mapFromGeoToSceneCoords(gp1,sp1);
+
+		sp0=mapFromScene(sp0);
+		sp1=mapFromScene(sp1);
+		
+		prepareGeometryChange();
+		line_=QLineF(sp0,sp1);
+		coordPoint_.clear();
+		coordPoint_ << gp0 << gp1;
+		update();
+	}
+	else
+	{
+		clearLine();
+	}
+}
+
+void MvQLineSelection::changeDirection()
+{
+	if(coordPoint_.isEmpty() || line_.isNull())
+		return;
+
+	if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+	{
+		return;
+	}
+
+	QPointF sp1=line_.p2();
+	QPointF sp2=line_.p1();
+		
+	QPointF gp1,gp2;
+	
+	zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp1),gp1);	
+	zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp2),gp2);
+
+	prepareGeometryChange();
+	line_=QLineF(sp1,sp2);
+	coordPoint_.clear();
+	coordPoint_ << gp1 << gp2;
+	
+	emit lineIsDefined(gp1.y(),gp1.x(),gp2.y(),gp2.x());
+
+	updateHandles();
+	update();
+}
+
+void MvQLineSelection::updateHandles()
+{
+	checkHandleSize();
+	
+	float dh=handleSize_/2.;
+	float w=line_.p2().x()-line_.p1().x();
+	float h=line_.p2().y()-line_.p1().y();
+	handle_[0].moveTo(-dh,-dh);
+	handle_[1].moveTo(w-dh,h-dh);
+}
+
+
+void MvQLineSelection::setActivated(bool b)
+{
+	if(showHandles_==true)
+	{
+		showHandles_=false;
+		update();
+	}
+	activated_=b;
+}
+
+void MvQLineSelection::checkEndPoint(QPointF &p2)
+{
+	if(!zoomLayout_)
+	{
+		p2=QPointF();
+	}
+
+	//Plot area in scene coordinates
+	QRectF plotRect=mapRectFromScene(zoomLayout_->mapToScene(zoomLayout_->boundingRect()).boundingRect());
+
+	if(p2.x() > plotRect.right())
+	{
+		p2.setX(plotRect.right());
+	}
+	else if(p2.x() < plotRect.left())
+	{
+		p2.setX(plotRect.left());
+	}
+	if(p2.y() > plotRect.bottom())
+	{
+		p2.setY( plotRect.bottom());
+	}
+	else if(p2.y() < plotRect.top())
+	{
+		p2.setY(plotRect.top());
+	}	
+
+}
+
+void MvQLineSelection::checkMoveDelta(QPointF &dp)
+{
+	if(!zoomLayout_)
+	{
+		dp=QPointF();
+	}
+
+	//Plot area in scene coordinates
+	//QRectF plotRect=zoomLayout_->mapToScene(zoomLayout_->boundingRect()).boundingRect();
+
+	//qDebug() << "delta" << dp;
+
+	QLineF r=line_.translated(dp);
+	
+	//qDebug() << "translated" << r;
+
+	QPointF p1=r.p1();
+	checkEndPoint(p1);	
+
+	QPointF delta1=p1-r.p1();
+
+	//qDebug() << "1 p/delta" << p1 << delta1; 
+
+	r.translate(delta1);
+
+	dp=dp+delta1;
+
+	//qDebug() << r << dp;
+
+	QPointF p2=r.p2();
+	checkEndPoint(p2);
+	QPointF delta2=p2-r.p2();
+
+	//qDebug() << "2 p/delta" << p2 << delta2; 
+
+	r.translate(p2-r.p2());
+	
+	dp=dp+delta2;
+
+	//qDebug() << "dp" << dp;
+
+}
+
+bool MvQLineSelection::checkPointInLineArea(QPointF &p)
+{
+	double maxd=20.;
+
+	QPointF p1=line_.p1();
+	QPointF p2=line_.p2();
+
+	QPointF r=p2-p1;
+	QPointF d=p-p1;
+	QPointF d2=p-p2;
+	
+	double rlen=sqrt(r.x()*r.x()+r.y()*r.y()); 
+	double dlen=sqrt(d.x()*d.x()+d.y()*d.y());
+
+	//scalar product
+	double sp=d.x()*r.x()+d.y()*r.y();
+
+	double dp;
+	if(sp==0.)
+		dp=dlen;
+	else
+	{		
+		double dpr=sp/rlen;			
+		dp=sqrt(dlen*dlen-dpr*dpr);
+	}
+
+	if(fabs(dp) < maxd)
+	{	
+		QPointF d2=p-p2;
+		double lsp=d.x()*d2.x()+d.y()*d2.y();
+		double d2len=sqrt(d2.x()*d2.x()+d2.y()*d2.y());
+
+		qDebug() << "dp" << dp << lsp << dlen << d2len;
+
+		if(lsp > 0 && dlen > maxd && d2len > maxd)
+		{
+			return false;
+		} 
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+void MvQLineSelection::checkHandleSize() const
+{  
+	handleSize_=physicalHandleSize_/parentItem()->scale();
+	arrowSize_=10./parentItem()->scale();
+
+	for(int i=0;i< 2; i++)	
+	{
+		handle_[i].setWidth(handleSize_);
+		handle_[i].setHeight(handleSize_);
+	}
+	
+}
\ No newline at end of file
diff --git a/src/uPlot/MvQLineSelection.h b/src/uPlot/MvQLineSelection.h
new file mode 100644
index 0000000..c47ec37
--- /dev/null
+++ b/src/uPlot/MvQLineSelection.h
@@ -0,0 +1,83 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQLineSelection_H
+#define MvQLineSelection_H
+
+#include <QBrush>
+#include <QGraphicsItem>
+#include <QPen>
+
+#include "MvQPlotItem.h"
+
+class MgQLayoutItem;
+
+using namespace std;
+
+class MvQLineSelection : public MvQPlotItem
+{
+
+Q_OBJECT
+
+public:
+	MvQLineSelection(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQLineSelection();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+
+	void setLine(double,double,double,double);
+	void clearLine();
+
+	void setActivated(bool); 
+
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+	void reset();
+	void changeDirection();
+
+signals:
+	void lineIsDefined(double,double,double,double);
+	void lineIsUndefined();
+	
+protected:	
+	enum CurrentAction {NoAction, DefineAction, ResizeAction, MoveAction};
+
+	void updateHandles();	
+	void checkEndPoint(QPointF&);
+	void checkMoveDelta(QPointF&);
+	bool checkPointInLineArea(QPointF &);
+	void checkHandleSize() const;
+
+	QPen		pen_;
+	QBrush  	brush_;
+	QLineF		line_;
+	QPointF 	lineOrigin_;
+	QList<QPointF> 	scenePoint_;
+	QList<QPointF> 	coordPoint_;
+	CurrentAction 	currentAction_;
+	MgQLayoutItem*  zoomLayout_;
+	QPointF 	dragPos_;
+	
+	bool 		showHandles_;
+	QPen		selectionPen_;
+	mutable QList<QRectF> 	handle_;
+	mutable float 		handleSize_;
+	mutable float 		physicalHandleSize_;
+	int 		resizeId_;
+	int 		handleHover_;
+
+	mutable float 		arrowSize_;
+	QBrush  	arrowBrush_;
+	QPen  		arrowPen_;
+};	
+
+
+#endif
diff --git a/src/uPlot/MvQMagnifier.cc b/src/uPlot/MvQMagnifier.cc
new file mode 100644
index 0000000..fc1c3fe
--- /dev/null
+++ b/src/uPlot/MvQMagnifier.cc
@@ -0,0 +1,946 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQMagnifier.h"
+
+#include <math.h>
+
+#include <QApplication>
+#include <QDebug>
+#include <QGraphicsPixmapItem>
+#include <QImage>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QPixmap>
+
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+
+#include "MgQLayoutItem.h"
+
+static bool sceneRendering=false;
+
+MvQMagnifierSlider::MvQMagnifierSlider(QList<float> &values, int actIndex,QColor colour)
+{
+	actCellIndex_=actIndex;
+	
+	cellHeight_=13.;
+	cellWidth_=6.;	
+	cellPen_=QPen(QColor(50,50,50));	
+
+	handlerSize_=cellWidth_+4;
+
+	panelPen_=QPen(Qt::black);	
+	panelWidth_=cellWidth_+10;	
+
+	for(int i=0; i < values.count(); i++)
+	{
+		int lightFactor=100+static_cast<int>(100.*static_cast<float>(i)/static_cast<float>(values.count()));
+		qDebug() << lightFactor;
+		cells_.push_back(new MvQMagnifierFactorCell(values[i],colour.lighter(lightFactor)));
+	}
+}
+
+
+void MvQMagnifierSlider::setGeometry(float r)
+{	
+	radius_=r;
+
+	cellSweepAngle_=(180./M_PI)*cellHeight_/radius_;
+	
+	cellBarStartAngle_=180.-cells_.count()*cellSweepAngle_/2.;
+	cellBarEndAngle_=cellBarStartAngle_+cells_.count()*cellSweepAngle_;
+	cellBarSweepAngle_=cellBarEndAngle_-cellBarStartAngle_;
+
+	cellInnerRadius_=radius_+(panelWidth_-cellWidth_)/2.;
+	cellOuterRadius_=radius_+panelWidth_-(panelWidth_-cellWidth_)/2.;
+
+	panelInnerRadius_=radius_;
+	panelOuterRadius_=radius_+panelWidth_;
+
+}
+
+float MvQMagnifierSlider::actCellAngle()
+{
+	return cellBarEndAngle_-(actCellIndex_+0.5)*cellSweepAngle_;
+}
+
+void MvQMagnifierSlider::handlerCentre(float &cx, float &cy)
+{
+	float r=(cellInnerRadius_+cellOuterRadius_)/2.;
+	float an=actCellAngle();
+
+	cx=r*cos(an*M_PI/180.);
+	cy=r*sin(an*M_PI/180.);
+}
+
+bool MvQMagnifierSlider::checkPointInHandler(float x, float y)
+{
+	float r=(cellInnerRadius_+cellOuterRadius_)/2.;
+	float an=actCellAngle();
+
+	float cx=r*cos(an*M_PI/180.);
+	float cy=r*sin(an*M_PI/180.);
+
+	return (cx-x)*(cx-x) + (cy-y)*(cy-y) <=  handlerSize_*handlerSize_/4.;
+}
+
+bool MvQMagnifierSlider::checkPointInCell(float x, float y, int &index)
+{
+	index=-1;
+	float dist=sqrt(x*x+y*y);       
+	if(dist >= panelInnerRadius_  && dist <= panelOuterRadius_)
+	{
+		float angle=atan2f(y,x)*180./M_PI;
+		if(angle < 0.) angle=360.+angle;
+		if(angle >= cellBarStartAngle_ && angle <= cellBarEndAngle_)
+		{
+			index=static_cast<int>((cellBarEndAngle_-angle)/cellSweepAngle_);
+			return true;
+		}
+	}	
+
+	return false;		
+}
+
+bool MvQMagnifierSlider::checkPointInPanel(float x, float y)
+{
+	float dist=sqrt(x*x+y*y);       
+	if(dist >= panelInnerRadius_  && dist <= panelOuterRadius_)
+	{
+		float angle=atan2f(y,x)*180./M_PI;
+		if(angle < 0.) angle=360.+angle;
+		if(angle >= cellBarStartAngle_ && angle <= cellBarEndAngle_)
+		{
+			return true;
+		}
+	}	
+
+	return false;		
+}
+
+
+bool MvQMagnifierSlider::shiftHandler(float x, float y,int &index)
+{
+	float dist=sqrt(x*x+y*y);       
+	if(dist < panelInnerRadius_  || dist > panelOuterRadius_)
+		return false;	
+
+	index =-1;
+	
+	float xc, yc;      
+        handlerCentre(xc,yc);
+
+	float dx=x-xc;
+	float dy=y-yc;        
+
+        float a=xc*xc+yc*yc;
+        float b=(xc+dx)*(xc+dx)+(yc+dy)*(yc+dy);
+        float c=dx*dx+dy*dy;
+        
+        float dfi=(a+b-c)/(2.*sqrt(a*b));
+        dfi=acos(dfi)*180./M_PI; 
+        float angle=actCellAngle()+((dy<0)?1:-1)*dfi;                	  
+
+	index=static_cast<int>((cellBarEndAngle_-angle)/cellSweepAngle_);
+
+	qDebug() << x << y << xc << yc << dfi << index;
+
+	if(index >=0 && index < cells_.count() && index != actCellIndex_)
+	{
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+
+MagnifierFrameData::MagnifierFrameData(float w, float minr, float maxr, int n) :
+			width_(w), minRadius_(minr), maxRadius_(maxr), ptNum_(n)
+{	
+	float PI=3.1415926535;
+	
+	float an=0.;
+	float an_step=2.*PI/ptNum_;
+	for(int i=0; i< ptNum_; i++)
+	{		
+		coeffCos_.push_back(cos(an));
+		coeffSin_.push_back(sin(an));		
+		an+=an_step;					
+		
+	}		
+}
+
+
+
+MvQMagnifier::MvQMagnifier(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+		          MvQPlotItem(scene,view,parent) 
+{
+	dataScene_=0;
+	dataItem_=0;
+
+	pointInMagnifier_=false;
+
+	minRadius_=50.;
+	innerFrameWidth_=3;
+	outerFrameWidth_=7;
+	frameWidth_=innerFrameWidth_+outerFrameWidth_;
+	
+	//Default geometry 
+	radius_=100.;	
+	centreX_=radius_+250.;
+	centreY_=radius_+250.;
+
+	//Init factor scales
+	QList<float> factors;
+	MvQMagnifierSlider *slider;
+
+	//Set text magnification factors		
+	factors << 1.5 << 2. << 2.5 << 3. << 3.5 << 4. ;	
+	slider = new MvQMagnifierSlider(factors,1,QColor(Qt::red));
+	slider->setGeometry(radius_);
+	//slider->setHandlerSize(handlerPixmap_->width());
+	sliders_[TextMode]=slider;
+
+	//Set data magnification factors		
+	factors.clear();
+	factors << 2. << 5. << 10. << 25.;	
+	slider = new MvQMagnifierSlider(factors,1,QColor(Qt::red));
+	slider->setGeometry(radius_);
+	//slider->setHandlerSize(handlerPixmap_->width());
+	sliders_[DataMode]=slider;			
+
+	//Slider handler pixmap
+	QPixmap pxm(QString::fromUtf8(":/uPlot/magnifier_handler"));
+	handlerPixmap_=new QPixmap(pxm.scaledToWidth(slider->handlerSize(),Qt::SmoothTransformation)); //!!
+
+	magnifierMode_=TextMode;
+	magnifierAction_=NoAction;
+	actSlider_=sliders_[magnifierMode_];
+
+	magnifierModeChanged_=false;
+
+	//Set frame data
+	frames_.push_back(MagnifierFrameData(6.,20.,150.,60));
+	frames_.push_back(MagnifierFrameData(6.,150.,300.,80));
+	frames_.push_back(MagnifierFrameData(6.,300.,1000.,100));
+	
+	actFrameIndex_=0;
+
+	device_= new QImage(823,630,QImage::Format_RGB888);
+	//device_= new QPixmap(823,630);
+	painter_=new QPainter(device_);
+
+	setPos(centreX_, centreY_);
+	setFlag(QGraphicsItem::ItemIsMovable ); 
+
+	actCellIndexAtHandlerActionStart_=0;  
+
+	mouseInLens_=false;
+}
+
+MvQMagnifier::~MvQMagnifier()
+{
+}
+	
+bool MvQMagnifier::checkCircleInWindow(const float x,const float y,const float r) const
+{	
+	if(x+r < maxX_ && x-r > minX_ && y+r < maxY_ && y-r > minY_)
+	{
+		return true;
+	}
+	else	
+	{
+		return false;	
+	}
+}
+
+
+bool MvQMagnifier::checkPointInWindow(const float x,const float y) const
+{
+	if((x-minX_)*(maxX_-x) < 0 || (y-minY_)*(maxY_-y) < 0)
+	{
+		return false;
+	}
+	else
+	{
+		return true;	
+	}
+}
+
+bool MvQMagnifier::checkPointInMagnifier(const QPointF& pos)
+{
+	float dx=pos.x()-centreX_;
+	float dy=pos.y()-centreY_;		
+	float dist=sqrt(dx*dx+dy*dy);
+
+	if(dist < radius_)
+	{  
+		return true;
+	}
+	return false;
+}
+
+MvQMagnifier::MagnifierPointType MvQMagnifier::identifyPoint(const QPointF& point)
+{	
+	//qDebug() << point;
+
+	//If it is the first time
+	if(centreX_ < -99999.) 
+	{
+		centreX_=point.x();
+		centreY_=point.y();
+	}	
+	
+	float dx=point.x();//-centreX_;
+	float dy=point.y();//-centreY_;		
+	float dist=sqrt(dx*dx+dy*dy);
+	
+
+	
+	int index;
+	if(actSlider_->checkPointInHandler(dx,dy))
+	{
+		return SliderHandlerPoint;
+	}
+	else if(actSlider_->checkPointInCell(dx,dy,index))
+	{
+		if(actSlider_->actCellIndex() != index)
+		{
+			actSlider_->setActCellIndex(index);
+			reset();
+			//updateMagnifierState();
+			//update();
+			emit factorChanged();
+			return SliderCellPoint;	
+		}
+		return OuterPoint;
+
+	}
+	else if(dist < radius_-3)
+	{  
+		return LensPoint;
+	}
+	else if(dist >= radius_-3 && dist <= radius_+ frameWidth_+3)			
+	{
+		return FramePoint;
+	}
+				
+	return OuterPoint;		
+}
+
+MvQMagnifier::ScenePointType MvQMagnifier::identifyScenePoint(const QPointF& scPos)
+{	
+  	if(checkPointInMagnifier(scPos))
+	{		
+		QPointF magPos=sceneToMagnifiedPos(scPos); 		
+		if(checkPointInMagnifier(magPos))
+		{
+		  	return InnerScenePoint;
+		}
+		else
+		{
+		  	return CoveredScenePoint;
+		}	
+	}		
+	
+	return OuterScenePoint;
+}
+
+QPointF	MvQMagnifier::sceneToMagnifiedPos(const QPointF& scPos)
+{
+	float zoom=actSlider_->actFactorValue();
+	QPointF cp(centreX_,centreY_);
+	//return cp+(scPos-cp)/zoom;  	
+	return (scPos-cp)*zoom+cp;
+}  
+
+QPointF	MvQMagnifier::magnifiedToScenePos(const QPointF& magPos)
+{
+	float zoom=actSlider_->actFactorValue();
+	QPointF cp(centreX_,centreY_);
+	return cp+(magPos-cp)/zoom;  	
+}  
+
+void MvQMagnifier::render(QPainter *painter)
+{			
+	float zoom=actSlider_->actFactorValue();						
+
+	QRectF sourceRect(centreX_-radius_/zoom,centreY_-radius_/zoom,
+			2.*radius_/zoom,2.*radius_/zoom);
+
+	float devX=device_->width()/2;
+	float devY=device_->height()/2;
+
+	QRectF targetRect(devX-radius_,devY-radius_,
+			2.*radius_,2.*radius_);
+
+	painter_->fillRect(0,0,device_->width(),device_->height(),
+			 QBrush(Qt::white));
+
+	sceneRendering=true;
+	//scene_->setMagnifierParams(zoom,sourceRect);
+	//scene_->render(painter_,targetRect,sourceRect);
+
+	plotScene_->renderForMagnifier(painter_,targetRect,sourceRect);
+
+	sceneRendering=false;
+
+	if(magnifierMode_ == DataMode)
+	{
+		foreach(QGraphicsItem *item,dataItem_->childItems())
+		{
+			item->setFlag(QGraphicsItem::ItemHasNoContents);
+		}
+
+		QList<QGraphicsItem *> itemList = dataScene_->items(sourceRect, Qt::IntersectsItemBoundingRect);
+		foreach(QGraphicsItem *item,itemList)
+		{
+			item->setFlag(QGraphicsItem::ItemHasNoContents,false);
+			//qDebug() << it->childItems().count() << it->parentItem()->data(0);
+			//if( it->childItems().count() != 0)
+			//	qDebug() << " " << it->childItems().at(0)->childItems().count();
+		}
+
+		/*QList<QGraphicsItem *> itemList = dataScene_->items(sourceRect, Qt::IntersectsItemBoundingRect);
+		qDebug() << "rendered items:" << itemList.count();
+		foreach(QGraphicsItem *it,itemList)
+		{
+			qDebug() << it->childItems().count() << it->parentItem()->data(0);
+			if( it->childItems().count() != 0)
+				qDebug() << " " << it->childItems().at(0)->childItems().count();
+		}*/
+
+		dataScene_->render(painter_,targetRect,sourceRect);	
+	}
+
+
+	//device_->copy(centreX_-radius_,centreY_-radius_,
+	//		2.*radius_,2.*radius_).save("/var/tmp/cgr/demo.png");
+
+	//device_->save("/var/tmp/cgr/demo.png");
+	
+	QPainterPath path;
+	path.addEllipse(-radius_,-radius_,2.*radius_,2.*radius_);
+
+	painter->setClipPath(path);
+	painter->drawImage(QRectF(-radius_,-radius_,2.*radius_,2.*radius_),
+			   device_->copy(devX-radius_,devY-radius_,2.*radius_,2.*radius_));
+	
+	painter->setClipping(false);
+
+}
+
+void MvQMagnifier::renderFrame(QPainter *painter)
+{
+	QConicalGradient innerGradient(0.,0.,-45.0);
+	innerGradient.setColorAt(0.0,QColor(220,220,220));
+	innerGradient.setColorAt(0.5,QColor(80,80,80));
+	innerGradient.setColorAt(1.0,QColor(220,220,220));	
+
+	QPainterPath innerFrame;	
+	createRingSlice(innerFrame,0,360,radius_,radius_+innerFrameWidth_);
+	painter->fillPath(innerFrame,innerGradient);
+
+	QConicalGradient outerGradient(0.,0.,-45.0);
+	outerGradient.setColorAt(0.0,Qt::darkGray);
+	outerGradient.setColorAt(0.2,QColor(150,150,150));
+	outerGradient.setColorAt(0.5,Qt::white);
+	outerGradient.setColorAt(1.0,Qt::darkGray);
+
+	QPainterPath outerFrame;	
+	createRingSlice(outerFrame,0,360,radius_+innerFrameWidth_,radius_+frameWidth_);
+	painter->fillPath(outerFrame,outerGradient);
+
+	painter->setBrush(QBrush());
+	painter->drawEllipse(QPointF(0.,0.),radius_,radius_);
+	painter->drawEllipse(QPointF(0.,0.),radius_+innerFrameWidth_,radius_+innerFrameWidth_);
+	painter->drawEllipse(QPointF(0.,0.),radius_+frameWidth_,radius_+frameWidth_);
+}
+
+void MvQMagnifier::renderSlider(QPainter *painter)
+{
+	float rad1, rad2, anStart, anSweep;
+	float anStartInner, anEndInner, anSweepInner;
+	float an, totalRotation;
+
+	//Panel	
+	QPainterPath panel;
+
+	rad1=actSlider_->panelInnerRadius();
+	rad2=actSlider_->panelOuterRadius();
+	anStart=actSlider_->cellBarStartAngle();
+	anSweep=actSlider_->cellBarSweepAngle();
+	anStartInner=anStart-(180./M_PI)*10./rad1;
+	anEndInner=anStart+anSweep+(180./M_PI)*10./rad1;
+	anSweepInner=anEndInner-anStartInner;
+	
+	panel.moveTo(rad1*cos(anStartInner/180.*M_PI),
+		     rad1*sin(anStartInner/180.*M_PI));
+	panel.arcTo(-rad2,-rad2,2.*rad2,2.*rad2,-anStart,-anSweep);
+	//panel.lineTo(rad1*cos(anEndInner/180.*M_PI),
+	//	     rad1*sin(anEndInner/180.*M_PI)));
+
+	panel.arcTo(-rad1,-rad1,2.*rad1,2.*rad1,-anEndInner,anSweepInner);
+
+	QConicalGradient panelGradient(0.,0.,anStartInner);
+	panelGradient.setColorAt(0.0,Qt::white);
+	//panelGradient.setColorAt(0.2,QColor(150,150,150));
+	panelGradient.setColorAt(anSweepInner/360.,Qt::darkGray);
+	panelGradient.setColorAt(0.5,QColor(150,150,150));
+	panelGradient.setColorAt(1.0,Qt::white);
+
+	//createRingSlice(panel,anStart,anSweep,rad1,rad2);
+	//painter->setBrush(QBrush());
+	painter->setBrush(panelGradient);
+	painter->drawPath(panel);
+
+	//Cells
+	QPainterPath cell;
+
+	rad1=actSlider_->cellInnerRadius();
+	rad2=actSlider_->cellOuterRadius();
+	anStart=-actSlider_->cellSweepAngle();
+	anSweep=actSlider_->cellSweepAngle();
+	createRingSlice(cell,anStart,anSweep,rad1,rad2);
+	
+	
+	an=360.-actSlider_->cellBarStartAngle();
+	painter->rotate(an);
+	totalRotation=an;
+	for(int i=actSlider_->cellNum()-1 ; i >= 0; i--)
+	{
+		//qDebug() << slider_->cellColour(i);
+		painter->setBrush(actSlider_->cellColour(i));
+		painter->drawPath(cell);
+		painter->rotate(-anSweep);
+		totalRotation+=-anSweep;
+	}
+
+	painter->rotate(-totalRotation);
+
+#if 0	
+	//Render number panel
+	if(mouseInLens_)
+	{
+		//TEXT PANEL background
+		QPainterPath textPanel;
+		int alpha=80;
+		
+		float maxTextWidth=0.;
+		for(int i=0; i < actSlider_->cellNum(); i++)
+		{
+			QString txt=QString::number(actSlider_->factorValue(i));
+			float w=painter->fontMetrics().boundingRect(txt).width();
+			if(w > maxTextWidth)
+				maxTextWidth=w;
+		}
+
+	
+		float textRad1=actSlider_->panelInnerRadius()-maxTextWidth-8-4;
+		float textRad2=actSlider_->panelInnerRadius();
+		float textAnStart=actSlider_->cellBarStartAngle()-(180./M_PI)*10./actSlider_->panelInnerRadius();
+		float textAnEnd=textAnStart+actSlider_->cellBarSweepAngle()+2.*(180./M_PI)*10./actSlider_->panelInnerRadius();
+		float textAnSweep=textAnEnd-textAnStart;
+	
+		textPanel.moveTo(textRad1*cos(textAnStart/180.*M_PI),
+		     textRad1*sin(textAnStart/180.*M_PI));
+		textPanel.arcTo(-textRad2,-textRad2,2.*textRad2,2.*textRad2,-textAnStart,-textAnSweep);
+		//panel.lineTo(rad1*cos(anEndInner/180.*M_PI),
+		//	     rad1*sin(anEndInner/180.*M_PI)));
+
+		textPanel.arcTo(-textRad1,-textRad1,2.*textRad1,2.*textRad1,-textAnEnd,textAnSweep);
+
+		QConicalGradient textPanelGradient(0.,0.,textAnStart);
+		textPanelGradient.setColorAt(0.0,QColor(255,255,255,alpha));
+		//panelGradient.setColorAt(0.2,QColor(150,150,150));
+		textPanelGradient.setColorAt(textAnSweep/360.,Qt::darkGray);
+		textPanelGradient.setColorAt(0.5,QColor(150,150,150,alpha));
+		textPanelGradient.setColorAt(1.0,QColor(255,255,255,alpha));
+
+		//createRingSlice(panel,anStart,anSweep,rad1,rad2);
+		//painter->setBrush(QBrush());
+		painter->setBrush(textPanelGradient);
+		painter->drawPath(textPanel);
+
+		//Tetx panel text
+		an=180.-actSlider_->cellBarStartAngle()-anSweep/2.;
+		painter->rotate(an);
+		totalRotation=an;
+		for(int i=actSlider_->cellNum()-1 ; i >= 0; i--)
+		{
+			painter->drawText(QPointF(-(rad1-8),0),QString::number(actSlider_->factorValue(i)));
+			painter->rotate(-anSweep);
+			totalRotation+=-anSweep;
+		}
+		painter->rotate(-totalRotation);
+	}
+#endif
+
+	//Handler
+	painter->rotate(360.-actSlider_->actCellAngle());
+        painter->drawPixmap((actSlider_->cellInnerRadius() + actSlider_->cellOuterRadius())/2.-handlerPixmap_->width()/2.,
+		            -handlerPixmap_->height()/2.,
+			    *handlerPixmap_);
+
+	//painter->setBrush(Qt::blue);
+	//painter->drawEllipse(QPointF((slider_->cellInnerRadius() + slider_->cellOuterRadius())/2.,0),
+	//		      slider_->handlerSize()/2.,slider_->handlerSize()/2.);
+}
+
+
+
+void MvQMagnifier::createRing(QPainterPath& /*path*/,float /*innerRadius*/,float /*outerRadius*/)
+{
+	//path.arcTo(-outerRadius,-outerRadius,2.*outerRadius,2.*outerRadius,0,360);
+	//path.arcTo(-innerRadius,-outerRadius,2.*outerRadius,2.*outerRadius,0,360);
+
+	//path.moveTo(innerRadius*cos(startAngle/180.*M_PI),innerRadius*sin(startAngle/180.*M_PI));
+	//path.arcTo(-outerRadius,-outerRadius,2.*outerRadius,2.*outerRadius,-startAngle,-sweepAngle);
+	//path.arcTo(-innerRadius,-innerRadius,2.*innerRadius,2.*innerRadius,-(startAngle+sweepAngle),sweepAngle);
+}
+
+void MvQMagnifier::createRingSlice(QPainterPath& path,float startAngle,float sweepAngle, float innerRadius,float outerRadius)
+{
+	path.moveTo(innerRadius*cos(startAngle/180.*M_PI),innerRadius*sin(startAngle/180.*M_PI));
+	path.arcTo(-outerRadius,-outerRadius,2.*outerRadius,2.*outerRadius,-startAngle,-sweepAngle);
+	path.arcTo(-innerRadius,-innerRadius,2.*innerRadius,2.*innerRadius,-(startAngle+sweepAngle),sweepAngle);
+}
+
+
+
+
+void MvQMagnifier::paint(QPainter *painter, const QStyleOptionGraphicsItem* /*o*/, QWidget* /*w*/)
+{
+	if(sceneRendering)
+		return;
+
+	painter->setRenderHint(QPainter::Antialiasing,true);
+
+	//!!!!
+	//painter->scale(1.,-1.);
+
+	//renderFrame(painter);
+
+	//painter->scale(1.,-1.);
+	render(painter);
+	//painter->scale(1.,-1.);
+
+	painter->scale(1.,-1.);
+	renderFrame(painter);	
+	renderSlider(painter);
+}
+
+QRectF MvQMagnifier::boundingRect() const
+{
+	float r = radius_+ frameWidth_;
+	if(r < actSlider_->panelOuterRadius())
+		r=actSlider_->panelOuterRadius();
+
+	QRectF f(-r,-r,2.*r,2.*r);
+	//qDebug() << "br"; // << f << rect() << mapRectFromParent(rect());
+	return f;
+}
+
+bool MvQMagnifier::contains(const QPointF &point) const
+{
+	//qDebug() << "contains" << point;
+	bool b=QGraphicsItem::contains(point);
+	//qDebug() << "contains" << point << b;
+	return b;
+}
+
+/*bool MvQMagnifier::sceneEvent(QEvent *event)
+{
+	//qDebug() << "magnifier event" << event->type();
+	return QGraphicsItem::sceneEvent(event);
+}*/
+
+void MvQMagnifier::mousePressEventFromView(QMouseEvent* event)
+{
+	//qDebug() << "magnifier press" << event->pos();
+	//qDebug() << identifyPoint(event->pos());
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+
+	switch(identifyPoint(pos))
+	{
+	case LensPoint:
+		/*if(event->buttons() & Qt::RightButton)
+		{
+			changeMagnifierMode();
+		}
+		else
+		{*/
+			setSelected(true);
+			magnifierAction_=MoveAction;
+			dragPos_=pos;
+		//}
+		//qDebug() << "Lens selected";
+		break;
+	case FramePoint:
+		setSelected(true);
+		magnifierAction_=ResizeAction;
+		//qDebug() << "Frame selected";
+		break; 
+	case SliderCellPoint:
+		magnifierAction_=NoAction;
+		//qDebug() << "Cell selected";
+		break;
+	case SliderHandlerPoint:
+		magnifierAction_=HandlerAction;
+		actCellIndexAtHandlerActionStart_=actSlider_->actCellIndex();
+		//qDebug() << "Handler selected";
+		break;
+	default:
+		magnifierAction_=NoAction;
+		break;
+	}
+}
+
+void MvQMagnifier::mouseMoveEventFromView(QMouseEvent* event)
+{
+	//qDebug() << "magnifier move"  << mapToScene(event->pos());
+	if((event->buttons() & Qt::LeftButton) == 0)
+		return;
+
+	QPointF pos=plotView_->mapToScene(event->pos());
+	
+	if(magnifierAction_ == MoveAction)
+	{
+		QPointF dp= mapFromScene(pos)-dragPos_;
+		centreX_+=dp.x();
+		centreY_+=dp.y();
+		setPos(centreX_, centreY_);
+		dragPos_=mapFromScene(pos);
+		emit positionChanged();
+		
+	}
+	else if(magnifierAction_ == ResizeAction)
+	{		
+		float dist=sqrt(pow(centreX_-pos.x(),2) + pow(centreY_-pos.y(),2));
+	
+		//qDebug() << "dist" << dist;
+
+		float maxRadius=(device_->width()<device_->height())?device_->width()/2:device_->height()/2;
+
+		//qDebug() << "maxrad" << maxRadius;		
+
+		//Check if magnifying glass is inside window and size is not too small
+		if(dist >= minRadius_ && dist <= maxRadius)				
+		{
+			radius_=dist;			
+		}
+		else if(dist < minRadius_) 
+		{
+			return;
+		}
+		else if(dist > maxRadius) 
+		{
+			return;
+		}
+
+		prepareGeometryChange();
+		actSlider_->setGeometry(radius_);
+		update();
+
+	}	
+	else if(magnifierAction_ == HandlerAction)
+	{
+		int index;
+		if(actSlider_->shiftHandler(pos.x()-centreX_,pos.y()-centreY_,index))
+                {	        		
+			actSlider_->setActCellIndex(index);
+			reset();
+			emit factorChanged();
+	 	}
+	}	
+	
+}
+void MvQMagnifier::mouseReleaseEventFromView(QMouseEvent* /*event*/)
+{
+	/*QPointF pos=mapToScene(event->pos());
+
+	if(magnifierAction_ == HandlerAction)
+	{		
+		if(magnifierMode_ == DataMode)
+		{			
+			if(actCellIndexAtHandlerActionStart_ != actSlider_->actCellIndex())
+			{
+				reset();
+			}
+	 	}
+	}*/
+
+	magnifierAction_=NoAction;	
+}
+
+
+void MvQMagnifier::changeMagnifierMode()
+{
+	prepareForReset();
+
+	if(magnifierMode_ == TextMode)
+	{
+		magnifierMode_ = DataMode;
+	}
+	else
+	{
+		magnifierMode_ = TextMode;
+	}
+
+	actSlider_=sliders_[magnifierMode_];
+	actSlider_->setGeometry(radius_);
+
+	/*if(magnifierMode_ == DataMode)
+	{
+		updateMagnifierState();
+		update();
+	}
+	else if(magnifierMode_ == TextMode)
+	{
+		if(dataScene_ !=0 && dataItem_ != 0)
+		{
+			dataItem_->clearPlotContents();
+			dataScene_->removeItem(dataItem_);
+			dataItem_->addToMainScene();
+		}	
+	}*/
+
+	reset();
+}
+
+/*void MvQMagnifier::updateMagnifierState()
+{
+	if(magnifierMode_ == DataMode)
+	{
+		float zoom=actSlider_->actFactorValue();						
+
+		if(dataScene_ !=0 && dataItem_ != 0)
+		{
+			dataScene_->removeItem(dataItem_);
+			dataItem_->addToMainScene();
+		}
+
+		MgQPlotScene *scene=static_cast<MgQPlotScene*>(scene_);
+		scene->updateMagnifier(zoom);
+		
+		MgQLayoutNode *lnode=scene->findMagnifierLayout();
+		if(!lnode) return;
+
+		dataItem_=static_cast<MgQMagnifierLayoutNode*>(lnode);
+
+		scene->removeItem(dataItem_);
+		
+		if(!dataScene_)
+		{
+			dataScene_=new QGraphicsScene;
+		}
+	
+		dataScene_->addItem(dataItem_);
+	}
+}*/
+
+void MvQMagnifier::setActivated(bool flag)
+{
+	MvQPlotItem::setActivated(flag);
+
+	if(flag)
+	{
+		reset();
+		show();
+	}
+	else
+	{		
+		hide();
+		prepareForReset();
+	}
+}
+
+
+/*void MvQMagnifier::operationBegin()
+{
+	reset();
+	show();
+}
+
+
+void MvQMagnifier::operationEnd()
+{
+	hide();
+	prepareForReset();
+}*/
+
+/*!
+  \brief prepare resetting the magnifier state
+
+  \sa prepareForReset()
+*/
+void MvQMagnifier::prepareForReset()
+{
+	//Clear the garphics contents of the data node
+	//remove it from the local scene and add it back to the 
+	//main scene
+
+	if(magnifierMode_ == DataMode)
+	{
+		if(dataScene_ !=0 && dataItem_ != 0)
+		{
+			dataScene_->removeItem(dataItem_);
+			dataItem_->clearPlotContents();
+			dataItem_->addToMainScene();
+			dataItem_=0;
+		}	
+	}
+}
+
+void MvQMagnifier::reset()
+{
+	if(magnifierMode_ == DataMode)
+	{
+		//float zoom=actSlider_->actFactorValue();						
+
+		if(!dataScene_)
+		{
+			dataScene_=new QGraphicsScene;
+			dataItem_=0;
+		}
+	
+		if(dataItem_ != 0)
+		{
+			dataScene_->removeItem(dataItem_);
+			dataItem_->clearPlotContents();
+			dataItem_->addToMainScene();
+		}
+
+		QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+	
+		//To be implemented!!!
+		//dataItem_=plotScene_->updateMagnifier(zoom); 
+		dataItem_=0;
+
+		if(dataItem_)
+		{		
+			plotScene_->removeItem(dataItem_);
+		
+			if(!dataScene_)
+			{
+				dataScene_=new QGraphicsScene;
+			}
+	
+			dataScene_->addItem(dataItem_);
+		}
+
+		QApplication::restoreOverrideCursor();
+	}
+
+	//???
+	update();
+}
diff --git a/src/uPlot/MvQMagnifier.h b/src/uPlot/MvQMagnifier.h
new file mode 100644
index 0000000..8c38667
--- /dev/null
+++ b/src/uPlot/MvQMagnifier.h
@@ -0,0 +1,219 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQMagnifier_H
+#define MvQMagnifier_H
+
+#include <vector>
+
+#include <QGraphicsWidget>
+#include <QPen>
+
+#include "MvQPlotItem.h"
+
+class QImage;
+class QPainter;
+class QPixmap;
+
+class MgQMagnifierLayoutItem;
+
+using namespace std;
+
+class MvQMagnifierFactorCell
+{
+public:
+	MvQMagnifierFactorCell(float value, QColor colour) :
+			value_(value), colour_(colour) {};
+	float value_;
+	QColor colour_;
+};
+
+
+class MvQMagnifierSlider
+{
+public:
+	MvQMagnifierSlider(QList<float> &, int,QColor);
+	void    setGeometry(float);
+
+	float cellSweepAngle() {return cellSweepAngle_;}
+	float cellInnerRadius() {return cellInnerRadius_;}
+	float cellOuterRadius() {return cellOuterRadius_;}
+
+	const  MvQMagnifierFactorCell* cell(int i) const {return cells_[i];}
+	float   factorValue(int i) {return cells_.at(i)->value_;}
+	QColor& cellColour(int i) {return cells_.at(i)->colour_;}
+	float  actFactorValue() {return cells_.at(actCellIndex_)->value_;}
+	int    cellNum() {return cells_.count();}
+	float  cellBarStartAngle() {return cellBarStartAngle_;}
+	float  cellBarSweepAngle() {return cellBarSweepAngle_;}
+
+	float panelInnerRadius() {return panelInnerRadius_;}
+	float panelOuterRadius() {return panelOuterRadius_;}
+
+	int   actCellIndex() {return actCellIndex_;}
+	void  setActCellIndex(int i) {actCellIndex_=i;}
+	float actCellAngle();
+
+	bool  checkPointInHandler(float,float);
+	bool  checkPointInCell(float,float,int&);
+	bool  checkPointInPanel(float,float);
+
+	float handlerSize() {return handlerSize_;}
+	void  setHandlerSize(float s) {handlerSize_=s;}
+	bool  shiftHandler(float, float,int &);
+	void  handlerCentre(float &, float &);
+
+public:
+	float radius_;
+	float actCellIndex_;
+	float handlerSize_;
+
+	//Cell item
+	float   cellSweepAngle_;	
+	float   cellWidth_;	
+	float   cellHeight_;
+	float   cellInnerRadius_;
+	float   cellOuterRadius_;
+	QPen    cellPen_;
+		
+	//All the cells
+	float 	cellBarStartAngle_;
+	float 	cellBarEndAngle_;
+	float cellBarSweepAngle_;
+	QList<MvQMagnifierFactorCell*> cells_;
+	
+	//Panel
+	QPen 	panelPen_;
+	float 	panelWidth_;
+	float   panelInnerRadius_;
+	float   panelOuterRadius_;
+};
+
+
+class MagnifierFrameData
+{
+public:
+	MagnifierFrameData(float,float, float, int);
+	bool checkRadius(float r) { return r>=minRadius_ && r< maxRadius_;};
+	
+	float width_;
+	float minRadius_;
+	float maxRadius_;
+	vector<float> coeffCos_;
+	vector<float> coeffSin_;
+	int ptNum_;	
+};
+
+
+class MvQMagnifier : public MvQPlotItem
+{
+  
+Q_OBJECT
+
+public:
+	enum MagnifierAction {NoAction, MoveAction, ResizeAction, HandlerAction};
+	enum ScenePointType {InnerScenePoint,CoveredScenePoint,OuterScenePoint};
+
+	MvQMagnifier(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQMagnifier();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+	bool contains ( const QPointF & ) const; 
+
+	void render(QPainter *painter);	
+
+	void setActivated(bool);
+	void prepareForReset();
+	void reset();
+	//void operationBegin();
+	//void operationEnd();
+	MagnifierAction magnifierAction() {return magnifierAction_;}
+	float zoomFactor() {return actSlider_->actFactorValue();}
+	bool checkPointInMagnifier(const QPointF&);
+	ScenePointType identifyScenePoint(const QPointF&);
+	QPointF	sceneToMagnifiedPos(const QPointF&);
+	QPointF	magnifiedToScenePos(const QPointF&);
+	
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+
+signals:
+	void factorChanged();   
+	void positionChanged();    
+	
+private:
+	enum MagnifierPointType {LensPoint,FramePoint,SliderHandlerPoint,SliderCellPoint,OuterPoint};
+	enum MagnifierMode {TextMode, DataMode };
+
+	bool checkPointInWindow(const float,const float) const;	
+	bool checkCircleInWindow(const float,const float,const float) const;
+	
+	bool checkPointInMagnifier(const int, const int);
+	MagnifierPointType identifyPoint(const QPointF&);
+
+	void renderFrame(QPainter *);
+	void renderSlider(QPainter*);
+
+	void createRing(QPainterPath&,float,float);
+	void createRingSlice(QPainterPath&,float,float,float,float);
+
+	void changeMagnifierMode();
+	void updateMagnifierState();
+	//bool calcPowerScaleForData();
+
+	float radius_;
+	float minRadius_;
+
+	MagnifierMode magnifierMode_;
+	MagnifierAction magnifierAction_;
+	MvQMagnifierSlider* actSlider_;
+	QMap<MagnifierMode,MvQMagnifierSlider*> sliders_;
+	int actCellIndexAtHandlerActionStart_;
+
+	int actFrameIndex_;
+	vector<MagnifierFrameData> frames_;
+	
+	QPointF dragPos_;
+	
+	float centreX_;
+	float centreY_;
+		
+	int minX_;
+	int maxX_;
+	int minY_;
+	int maxY_;
+	
+	int refX_;
+	int refY_;
+	
+	int prevX_;
+	int prevY_;
+	
+	float innerFrameWidth_;
+	float outerFrameWidth_;
+	float frameWidth_;
+
+	bool pointInMagnifier_;	
+	
+	QGraphicsScene* dataScene_;
+	MgQMagnifierLayoutItem* dataItem_;
+	QImage* device_;
+	QPainter *painter_;
+
+	bool magnifierModeChanged_;
+
+	QPixmap *handlerPixmap_;
+
+	bool mouseInLens_;
+};
+
+
+#endif
diff --git a/src/uPlot/MvQPlaceMark.cc b/src/uPlot/MvQPlaceMark.cc
new file mode 100644
index 0000000..76917b2
--- /dev/null
+++ b/src/uPlot/MvQPlaceMark.cc
@@ -0,0 +1,757 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQPlaceMark.h"
+
+#include <QApplication>
+#include <QDebug>
+#include <QImage>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QStyle>
+
+#include "MvQMagnifier.h"
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+#include "MgQLayoutItem.h"
+
+#include <assert.h>
+
+
+#define METVIEW_MULTIPAGE
+
+MvQPlaceMarkNode::MvQPlaceMarkNode(Type type) :
+	 type_(type), visible_(true), outOfPlot_(false), parent_(0)
+{
+	if(type_== FolderType)
+	{
+		QIcon icon(QApplication::style()->standardIcon(QStyle::SP_DirIcon));
+		pix_=icon.pixmap(22);
+	}
+	else
+	{
+		pix_=QPixmap(QString::fromUtf8(":/uPlot/blue_dot"));
+	}
+}
+
+void MvQPlaceMarkNode::setVisible(bool status)
+{
+	visible_=status;
+	foreach(MvQPlaceMarkNode *cn,children_)
+	{
+		cn->setVisible(status);
+	}
+}
+
+void MvQPlaceMarkNode::setOutOfPlot(bool status)
+{
+	outOfPlot_=status;
+}
+
+void MvQPlaceMarkNode::setCoordinates(QPointF &pt) 
+{
+	coordinates_=pt;
+} 
+
+QIcon MvQPlaceMarkNode::icon()
+{
+	/*if(type_== FolderType)
+	{
+		return QIcon(QApplication::style()->standardIcon(QStyle::SP_DirIcon));
+	}
+	else
+	{
+		return QIcon(QPixmap(QString::fromUtf8(":/uPlot/blue_dot")));
+	}*/
+	return QIcon();
+}
+
+void MvQPlaceMarkNode::removeChild(MvQPlaceMarkNode *node)
+{
+	children_.removeOne(node); 
+}
+
+void MvQPlaceMarkNode::removeChild(int i)
+{
+	if(i < 0 || i >= children_.count())
+		return;
+
+	children_.removeAt(i); 
+}
+
+//==========================================
+//
+//  MvQPlaceMarkTree
+//
+//==========================================
+
+void MvQPlaceMarkTree::moveNode(MvQPlaceMarkNode *node, MvQPlaceMarkNode *parent)
+{
+	if(!node || !parent)
+		return;
+
+	node->parent()->removeChild(node);
+	parent->addChild(node);
+}
+
+//==========================================
+//
+//  MvQPlaceMarkItem
+//
+//==========================================
+
+MvQPlaceMarkItem::MvQPlaceMarkItem(MvQPlaceMarkNode* pm,MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	MvQPlotItem(scene,view,parent)
+{	
+	pm_=pm;
+
+	//if(!pm_)
+	//	return;
+
+	currentAction_=NoAction;
+	dataLayout_=0;
+
+	if(pm_)
+		pix_=QPixmap::fromImage(pm_->pixmap().toImage().mirrored(false,true));
+	//pix_=QPixmap::fromImage(img.mirrored(false,true));
+
+	anchor_ = CentreAnchor;
+
+	if(anchor_== BottomCentreAnchor)
+		boundingRect_=QRectF(-pix_.width()/2.,0,pix_.width(),pix_.height());	
+	else 
+		boundingRect_=QRectF(-pix_.width()/2.,-pix_.height()/2.,pix_.width(),pix_.height());
+		
+
+	outOfPlot_=true;	
+	highlighted_=false; 	
+}
+
+MvQPlaceMarkItem::~MvQPlaceMarkItem()
+{
+}
+
+QRectF MvQPlaceMarkItem::boundingRect() const
+{
+	return boundingRect_;
+}
+
+void MvQPlaceMarkItem::paint(QPainter *painter, const QStyleOptionGraphicsItem* /*o*/, QWidget* /*w*/)
+{
+	if(outOfPlot_)
+		return;
+
+	float sx=painter->transform().m11();
+	float sy=painter->transform().m22();
+
+	//bool clipping=(painter->clipRegion().isEmpty())?false:true;
+	QRect clipRect=painter->clipRegion().boundingRect();
+
+	if(1)	
+	{
+		QTransform tr=painter->transform();
+		tr.scale(1/sx,1/sy);
+		painter->setTransform(tr);
+	}	
+
+	if(highlighted_)
+	{
+		painter->setPen(QColor(255,0,0,190));
+		painter->setBrush(QColor(255,0,0,190));	
+		painter->drawRect(boundingRect_);
+	}
+	
+
+	if(pm_)
+		painter->drawPixmap(boundingRect_,pix_,pix_.rect());
+	
+	//painter->setPen(QColor(255,255,255));
+	//painter->drawPoint(0,0);
+
+	//painter->translate(QPointF(5,5));
+	/*painter->scale(1.,-1.);
+	painter->setPen(Qt::white);
+	painter->setBrush(Qt::white);
+	painter->drawText(QPointF(0,0),text_);*/
+}
+
+void MvQPlaceMarkItem::setPixmapColour(QColor col)
+{
+	QImage img=pm_->pixmap().toImage().mirrored(false,true);
+	QPainter painter(&img);
+	//painter.setBrush(QColor(255,0,0,190,140));	
+	painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
+     	painter.fillRect(img.rect(),col);
+	pix_=QPixmap::fromImage(img);
+	update();
+	
+}
+
+void MvQPlaceMarkItem::setScenePosition(QPointF &scPos)
+{
+	setPos(scPos);
+	dataLayout_=plotScene_->projectorItem(QGraphicsObject::pos());
+	QPointF cr;
+
+	if(dataLayout_)
+	{
+		dataLayout_->mapFromSceneToGeoCoords(scPos,cr);
+		if(pm_)
+		  	pm_->setCoordinates(cr);
+		outOfPlot_=false;
+	}
+	else
+	{
+		outOfPlot_=true;
+		
+	}
+	updateLayerData();
+	emit itemUpdated();	
+}
+
+/*void MvQPlaceMarkItem::setCoordinates(QPointF &co)
+{
+	coordinates_=co;
+
+	QPointF scPos;
+	dataLayout_=plotScene_->projectorItem(QGraphicsObject::pos());
+
+	if(dataLayout_)
+	{
+		dataLayout_->mapFromGeoToSceneCoords(coordinates_,scPos);
+		setPos(scPos);
+		outOfPlot_=false;
+	}
+	else
+	{
+		outOfPlot_=true;
+	}
+	updateLayerData();
+	emit itemUpdated();	
+}
+*/
+
+void MvQPlaceMarkItem::setHighlighted(bool flag)
+{
+	if(highlighted_ == flag)
+		return;
+
+	highlighted_ = flag;
+	update();
+}
+
+void MvQPlaceMarkItem::mousePressEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_ || outOfPlot_)
+		return;
+
+        if(event->buttons() & Qt::LeftButton && outOfPlot_ == false)
+	{		
+     		QPointF lPos = mapFromScene(plotView_->mapToScene(event->pos()));
+		if(!boundingRect_.contains(lPos))
+		{
+			currentAction_=NoAction;
+			dragPos_=QPointF();
+			return;
+		}
+	
+		dragPos_=plotView_->mapToScene(event->pos());
+		dataLayout_=plotScene_->projectorItem(QGraphicsObject::pos());
+
+		if(dataLayout_)
+		{
+			currentAction_=MoveAction;
+			//setCursor(QCursor(Qt::SizeAllCursor));
+		}
+		else
+		{
+			currentAction_=NoAction;
+			dragPos_=QPointF();
+		}
+	}
+}
+
+void MvQPlaceMarkItem::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_ || outOfPlot_)
+		return;
+
+	if(currentAction_ == MoveAction)
+	{	
+		QPointF posM = plotView_->mapToScene(event->pos());
+		QPointF dp = posM - dragPos_;
+		QPointF newPos=QGraphicsObject::pos() + dp;
+
+		if(dataLayout_->contains(dataLayout_->mapFromScene(newPos)))
+		{
+			QPointF cr;
+			dataLayout_->mapFromSceneToGeoCoords(newPos,cr);
+			if(pm_)
+			  	pm_->setCoordinates(cr);
+		
+			prepareGeometryChange();
+		
+			setPos(newPos);
+			dragPos_=posM;
+			update();
+			updateLayerData();
+
+			emit itemUpdated();
+		}
+	}
+}
+
+ void MvQPlaceMarkItem::mouseReleaseEventFromView(QMouseEvent* /*event*/)
+ {
+	if(!activated_ || !acceptMouseEvents_ || outOfPlot_)
+		return;
+
+	if(currentAction_ == MoveAction)
+	{
+		//Scene position
+		/*QPointF posM = plotView_->mapToScene(event->pos());
+		zoomLayout_->mapFromSceneToGeoCoords(posM,coordinates_);*/
+		
+		currentAction_=NoAction;
+		dataLayout_=0;
+		dragPos_=QPointF();
+
+		/*emit areaIsDefined(
+			corners[0].x(), corners[0].y(),
+			corners[1].x(), corners[1].y());*/
+
+		//unsetCursor();
+	}
+}	
+
+
+void MvQPlaceMarkItem::updateLayerData()
+{
+/*	if(outOfPlot_)
+	{
+		
+		pm_->clearLayerData();
+		return;
+	}
+	
+	QList<QPointF> posL;
+	posL << pm_->coordinates();
+
+	QList<QStringList> layerData;
+	foreach(QPointF pp,posL)
+	{
+		layerData << QStringList();
+	}
+#ifndef METVIEW_MULTIPAGE 
+	plotScene_->collectLayerDataForCurrentStep(posL,layerData);
+#endif
+	pm_->setLayerData(layerData);
+	*/
+	
+}
+
+void MvQPlaceMarkItem::updateVisibility()
+{
+	/*if(pm_->isOutOfPlot()== false)
+		setVisible(pm_->isVisible());*/
+}
+
+void MvQPlaceMarkItem::reset()
+{
+#ifndef METVIEW_MULTIPAGE 
+	if((dataLayout_=plotScene_->projectorItem()) == 0)
+	{
+		//clearLine();
+		return;
+	}
+#else
+	return;
+#endif	
+
+	QPointF gp0=pm_->coordinates();
+	QPointF sp0;
+
+
+	//This should be called for the real placeMarks
+	//pix_=QPixmap::fromImage(pm_->pixmap().toImage().mirrored(false,true));
+
+	QRectF br;
+	if(anchor_ == BottomCentreAnchor)
+		br=QRectF(-pix_.width()/2.,0,pix_.width(),pix_.height());	
+	else 
+		br=QRectF(-pix_.width()/2.,-pix_.height()/2.,pix_.width(),pix_.height());
+
+	//QRectF br=QRectF(-pix_.width()/2.,0,pix_.width(),pix_.height());	
+
+
+	if(dataLayout_->containsGeoCoords(gp0))
+	{
+		dataLayout_->mapFromGeoToSceneCoords(gp0,sp0);	
+		outOfPlot_=false;
+		if(isVisible())
+		{
+			prepareGeometryChange();
+			setPos(sp0);
+			boundingRect_=br;
+			update();
+		}
+		else if(pm_->isVisible())
+		{
+			setPos(sp0);
+			boundingRect_=br;
+			setVisible(true);
+		}	
+		else
+		{
+			boundingRect_=br;
+			setPos(sp0);
+		}
+		pm_->setOutOfPlot(false);
+	}
+	else
+	{	
+		outOfPlot_=true;
+		if(isVisible())
+		{
+			setVisible(false);
+		}	
+		boundingRect_=br;
+		pm_->setOutOfPlot(true);
+	}
+}
+
+
+//==========================================
+//
+//  MvQPlaceMark  --  A.K.A. dataProbe
+//
+//==========================================
+
+MvQPlaceMark::MvQPlaceMark(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	MvQPlotItem(scene,view,parent),
+	magnifier_(0)
+{		
+	currentAction_=NoAction;
+	dataLayout_=0;
+	coordinates_=QPointF(0.,0.);
+	
+	//pix_=QPixmap::fromImage(pm_->pixmap().toImage().mirrored(false,true));
+	//pix_=QPixmap::fromImage(img.mirrored(false,true));
+	pix_=QPixmap(QString::fromUtf8(":/uPlot/data_probe.svg"));
+	
+	anchor_ = CentreAnchor;
+
+	if(anchor_== BottomCentreAnchor)
+		boundingRect_=QRectF(-pix_.width()/2.,0,pix_.width(),pix_.height());	
+	else 
+		boundingRect_=QRectF(-pix_.width()/2.,-pix_.height()/2.,pix_.width(),pix_.height());
+		
+	outOfPlot_=true;	
+	highlighted_=false; 
+}
+
+MvQPlaceMark::~MvQPlaceMark()
+{
+}
+
+QRectF MvQPlaceMark::boundingRect() const
+{
+	return boundingRect_;
+}
+
+void MvQPlaceMark::paint(QPainter *painter, const QStyleOptionGraphicsItem* /*o*/, QWidget* /*w*/)
+{
+	//if(outOfPlot_)
+	//	return;
+
+	float sx=painter->transform().m11();
+	float sy=painter->transform().m22();
+
+	//bool clipping=(painter->clipRegion().isEmpty())?false:true;
+
+	//qDebug() << "clip" << painter->clipRegion();
+	//qDebug() << "scaling" << sx;
+	
+	QRect clipRect=painter->clipRegion().boundingRect();
+
+	if(1)	
+	{
+		QTransform tr=painter->transform();
+		tr.scale(1/sx,1/sy);
+		painter->setTransform(tr);
+	}	
+
+	if(highlighted_)
+	{
+		painter->setPen(QColor(255,0,0,190));
+		painter->setBrush(QColor(255,0,0,190));	
+		painter->drawRect(boundingRect_);
+	}
+		
+	painter->drawPixmap(boundingRect_,pix_,pix_.rect());
+
+	//painter->setPen(QColor(255,255,255));
+	//painter->drawPoint(0,0);
+
+	//painter->translate(QPointF(5,5));
+	/*painter->scale(1.,-1.);
+	painter->setPen(Qt::white);
+	painter->setBrush(Qt::white);
+	painter->drawText(QPointF(0,0),text_);*/
+}
+
+void MvQPlaceMark::setPixmapColour(QColor /*col*/)
+{
+	/*QImage img=pm_->pixmap().toImage().mirrored(false,true);
+	QPainter painter(&img);
+	//painter.setBrush(QColor(255,0,0,190,140));	
+	painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
+     	painter.fillRect(img.rect(),col);
+	pix_=QPixmap::fromImage(img);
+	update();*/	
+}
+
+void MvQPlaceMark::setScenePosition(QPointF /*scPos*/)
+{
+}
+
+void MvQPlaceMark::setCoordinates(QPointF co)
+{	 
+   	if(!activated_)
+	  	return;
+   
+   	coordinates_=co;
+	
+	if(!dataLayout_)
+	{
+	  	outOfPlot_=true;
+		setVisible(false);
+		return;
+	}
+	
+	if(dataLayout_->containsGeoCoords(coordinates_))
+	{   
+		QPointF scPos;
+		
+		dataLayout_->mapFromGeoToSceneCoords(coordinates_,scPos);
+		
+		if(magnifier_ && magnifier_->activated())
+		{	
+			scPos=checkScenePosInMagnifier(scPos);
+		}  
+		else
+		{
+		  	setVisible(true);
+		}	
+		
+		setPos(scPos);
+		outOfPlot_=false;
+	}		
+	else
+	{
+	  	outOfPlot_=true;
+		setVisible(false);
+	}
+}	
+
+void MvQPlaceMark::setHighlighted(bool flag)
+{
+	if(highlighted_ == flag)
+		return;
+
+	highlighted_ = flag;
+	update();
+}
+
+void MvQPlaceMark::setActivated(bool b) 
+{
+	if(activated_ == b)
+		return;
+  
+  	activated_=b;
+	if(!activated_)
+	{
+	  	setVisible(false);
+	}
+	else
+	{
+		if(!dataLayout_)
+		{
+			setVisible(false);			
+		}
+		else
+		{
+		  	setVisible(true);
+		}	
+		
+	}	
+}
+
+void MvQPlaceMark::mousePressEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_ || !dataLayout_)
+		return;
+
+        if(event->buttons() & Qt::LeftButton)
+	{		
+     		QPointF lPos = mapFromScene(plotView_->mapToScene(event->pos()));
+		if(!boundingRect_.contains(lPos))
+		{
+			currentAction_=NoAction;
+			dragPos_=QPointF();
+			return;
+		}
+	
+		dragPos_=plotView_->mapToScene(event->pos());						
+		currentAction_=MoveAction;
+	}
+}
+
+void MvQPlaceMark::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_ || !dataLayout_)
+		return;
+
+	if(currentAction_ == MoveAction)
+	{	
+		QPointF posM = plotView_->mapToScene(event->pos());
+		QPointF dp = posM - dragPos_;		
+		QPointF newPos=QGraphicsObject::pos() + dp;		
+		
+		QPointF realPos=newPos;	
+		if(magnifier_ && magnifier_->activated())
+		{	
+			realPos=checkMagnifiedPosInMagnifier(realPos);
+		}  
+		else
+		{
+		  	setVisible(true);
+		}		
+		
+		QPointF cr;			
+		if(dataLayout_->contains(dataLayout_->mapFromScene(realPos)))
+		{				
+			outOfPlot_ = false;
+			dataLayout_->mapFromSceneToGeoCoords(realPos,cr);
+		}	
+		else
+		{	outOfPlot_ = true;  
+		
+		}
+		setPos(newPos);
+		dragPos_=posM;
+		//update();		
+		
+		emit beingMoved(cr);
+	}
+}
+
+ void MvQPlaceMark::mouseReleaseEventFromView(QMouseEvent* /*event*/)
+ {
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	if(currentAction_ == MoveAction)
+	{		
+		QPointF newPos=QGraphicsObject::pos();
+		QPointF realPos=newPos;
+			
+		if(magnifier_ && magnifier_->activated())
+		{	
+			realPos=checkMagnifiedPosInMagnifier(realPos);
+		}  
+				
+	  	if(dataLayout_->contains(dataLayout_->mapFromScene(realPos)))
+		{
+			dataLayout_->mapFromSceneToGeoCoords(realPos,coordinates_);
+			outOfPlot_=false;
+		}
+		else
+		{
+		 	outOfPlot_=true;
+		}	 
+		
+		emit pointSelected(coordinates_);	
+			
+		currentAction_=NoAction;
+			
+		dragPos_=QPointF();
+	
+	}
+}	
+
+void MvQPlaceMark::updateVisibility()
+{
+	/*if(pm_->isOutOfPlot()== false)
+		setVisible(pm_->isVisible());*/
+}
+
+void MvQPlaceMark::reset(MgQLayoutItem*  dataLayout)
+{
+	dataLayout_=dataLayout;
+	setCoordinates(coordinates_);
+}
+
+void MvQPlaceMark::setMagnifier(MvQMagnifier *m)
+{
+	magnifier_=m;
+	setCoordinates(coordinates_);
+}	
+			
+
+QPointF MvQPlaceMark::checkScenePosInMagnifier(const QPointF& scPos)
+{
+	//qDebug() << "magpos" << magnifier_->identifyScenePoint(scPos);
+	
+	QPointF pos=scPos;
+	if(magnifier_ &&  magnifier_->activated()) 
+	{
+		switch(magnifier_->identifyScenePoint(scPos))
+		{
+		case MvQMagnifier::OuterScenePoint:
+			setVisible(true);
+			break;
+			
+		case MvQMagnifier::InnerScenePoint:	
+			pos=magnifier_->sceneToMagnifiedPos(scPos);		
+			setVisible(true);
+			break;
+			
+		case MvQMagnifier::CoveredScenePoint:
+			setVisible(false);
+			break;
+			
+		default:
+		  	break;
+		}
+	}
+	
+	return pos;
+}	
+	
+QPointF MvQPlaceMark::checkMagnifiedPosInMagnifier(const QPointF& magPos)
+{
+	//qDebug() << "magpos" << magnifier_->identifyScenePoint(scPos);
+	
+	QPointF pos=magPos;
+	if(magnifier_ && magnifier_->activated()) 
+	{	
+		if(magnifier_->checkPointInMagnifier(magPos))
+		{
+			pos=magnifier_->magnifiedToScenePos(magPos);
+		}
+	}
+	
+	return pos;
+}		
+	
+	
+	
+	
+			
\ No newline at end of file
diff --git a/src/uPlot/MvQPlaceMark.h b/src/uPlot/MvQPlaceMark.h
new file mode 100644
index 0000000..fbae66a
--- /dev/null
+++ b/src/uPlot/MvQPlaceMark.h
@@ -0,0 +1,243 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlaceMark_H
+#define MvQPlaceMark_H
+
+#include <QGraphicsItem>
+#include <QIcon>
+#include <QPixmap>
+
+#include "MvQPlotItem.h"
+
+class MgQLayoutItem;
+class MvQMagnifier;
+
+using namespace std;
+
+
+/*class MvQPlaceMark
+{
+public:
+	MvQPlaceMarkNode();
+	QString name() {return name_;}
+	QPointF coordinates() {return coordinates_;}	
+	bool highlighted() {return highlighted_;};
+
+	void setName(QString name) {name_=name;}
+	void setCoordinates(QPointF &); 
+	void setScenePosition(QPointF &);
+	void setHighlighted(bool);
+
+protected:
+	QString name_;
+	QPointF coordinates_;	
+	QPixmap 	 pix_;
+	QList<QStringList> layerData_;
+};*/
+
+
+class MvQPlaceMarkNode
+{
+public:
+	enum Type {FolderType,ItemType};
+	enum View {MapView,CartesianView};
+
+	MvQPlaceMarkNode(Type type=ItemType);	
+	~MvQPlaceMarkNode() {clear();}
+
+	void clear() 
+	{
+		foreach(MvQPlaceMarkNode* n,children())
+			delete n;
+		children_.clear();
+	}
+
+	QString name() {return name_;}
+	QPointF coordinates() {return coordinates_;}
+	QString description() {return description_;}	
+	bool isVisible() {return visible_;}
+	bool isOutOfPlot() {return outOfPlot_;}
+	Type type() {return type_;}
+	QIcon icon();
+	QPixmap pixmap() {return pix_;}
+
+	void setName(QString name) {name_=name;}
+	void setCoordinates(QPointF &); 
+	void setDescription(QString d) {description_=d;}	
+	void setVisible(bool);
+	void setOutOfPlot(bool);
+	void setPixmap(QPixmap pix) {pix_=pix;} 
+	void setPixmap(QString pixPath) {pix_=QPixmap(pixPath);} 
+
+	const QList<QStringList>& layerData() {return layerData_;}
+	void setLayerData(QList<QStringList> d) {layerData_=d;}
+	void clearLayerData() {layerData_.clear();}
+
+	void addChild(MvQPlaceMarkNode* node) {children_ << node; node->setParent(this);}
+	void removeChild(MvQPlaceMarkNode* node);
+	void removeChild(int);
+	QList<MvQPlaceMarkNode*> children() {return children_;}
+	//bool findByNode(MvQOgcNode*,MvQOgcNode **);
+	//bool findByValue(QString,MvQOgcNode **);
+	//bool findByDisplayValue(QString,MvQOgcNode **);
+
+	MvQPlaceMarkNode* parent() {return parent_;}
+
+protected:
+	void setParent(MvQPlaceMarkNode* parent) {parent_=parent;}
+
+	QString	name_;
+	QPointF coordinates_;
+	QString description_;	
+	QPixmap pix_;
+	QList<QStringList> layerData_;
+	Type 	type_;
+	bool	visible_;
+	bool 	outOfPlot_;
+
+	MvQPlaceMarkNode* parent_;
+	QList<MvQPlaceMarkNode*> children_;
+};
+
+class MvQPlaceMarkTree 
+{
+public:
+	MvQPlaceMarkTree() {root_=new MvQPlaceMarkNode(MvQPlaceMarkNode::FolderType);}	
+	~MvQPlaceMarkTree() {clear();}
+	
+	/*MvQOgcNode* currentNode() {return currentNode_;}
+	void setCurrentNode(MvQOgcNode*);
+	QString currentValue() {return (currentNode_)?currentNode_->value():QString();}
+	QString currentDisplayValue() {return (currentNode_)?currentNode_->displayValue():QString();}
+	QString currentDescription() {return (currentNode_)?currentNode_->description():QString();}
+
+	void setCurrentValue(QString);
+	void setCurrentDisplayValue(QString);*/
+
+	MvQPlaceMarkNode* root() {return root_;}
+	void clear() {root_->clear();}
+	void moveNode(MvQPlaceMarkNode*,MvQPlaceMarkNode*);
+
+protected:
+	MvQPlaceMarkNode* root_;
+};
+
+
+class MvQPlaceMarkItem : public MvQPlotItem
+{
+Q_OBJECT
+
+public:
+	enum CurrentAction {NoAction, MoveAction};
+	enum PixmapAnchor  {CentreAnchor, BottomCentreAnchor};
+
+
+	MvQPlaceMarkItem(MvQPlaceMarkNode*,MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQPlaceMarkItem();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+	
+	CurrentAction currentAction() {return currentAction_;} 
+
+	bool highlighted() {return highlighted_;};
+
+	void setPixmapColour(QColor);
+	void setScenePosition(QPointF &);
+	void setHighlighted(bool);
+
+	void updateVisibility();
+	void reset();
+
+	MvQPlaceMarkNode* placeMark() {return pm_;}
+	
+signals:
+	void itemUpdated();
+	
+protected:	
+	void updateLayerData();
+
+	CurrentAction 	currentAction_;
+	QString 	name_;
+	MgQLayoutItem*  dataLayout_;
+	QRectF		boundingRect_;
+	QPointF 	dragPos_;
+	bool 		outOfPlot_;
+	bool 		highlighted_;
+	QPixmap 	pix_;
+	PixmapAnchor    anchor_;
+
+     	MvQPlaceMarkNode*	pm_;	
+};
+
+
+
+class MvQPlaceMark : public MvQPlotItem
+{
+Q_OBJECT
+
+public:
+	enum CurrentAction {NoAction, MoveAction};
+	enum PixmapAnchor  {CentreAnchor, BottomCentreAnchor};
+
+	MvQPlaceMark(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQPlaceMark();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+
+	void setActivated(bool); 
+	
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+	
+	CurrentAction currentAction() {return currentAction_;} 
+
+	bool highlighted() {return highlighted_;};
+	bool isOutOfPlot() {return outOfPlot_;}
+	
+	void setPixmapColour(QColor);
+	void setScenePosition(QPointF);
+	void setCoordinates(QPointF);
+	QPointF coordinates() const {return coordinates_;}
+	void setHighlighted(bool);
+	
+	void updateVisibility();
+	void reset(MgQLayoutItem*);
+	void reset() {};
+	void setMagnifier(MvQMagnifier*);
+	
+signals:
+	void pointSelected(QPointF);
+	void beingMoved(QPointF);
+	
+protected:	
+	QPointF checkScenePosInMagnifier(const QPointF&);
+	QPointF checkMagnifiedPosInMagnifier(const QPointF&);
+	
+	CurrentAction 	currentAction_;
+	QString 	name_;
+	MgQLayoutItem*  dataLayout_;
+	QRectF		boundingRect_;
+	QPointF 	dragPos_;
+	bool 		outOfPlot_;
+	bool 		highlighted_;
+	QPixmap 	pix_;
+	PixmapAnchor    anchor_;
+	QPointF         coordinates_;
+	MvQMagnifier*	magnifier_;
+};
+
+#endif
diff --git a/src/uPlot/MvQPlaceMarkDialog.cc b/src/uPlot/MvQPlaceMarkDialog.cc
new file mode 100644
index 0000000..431fedb
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkDialog.cc
@@ -0,0 +1,342 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QComboBox>
+#include <QDebug>
+#include <QDialogButtonBox>
+#include <QFileIconProvider>
+#include <QFileSystemModel>
+#include <QGridLayout>
+#include <QHBoxLayout> 
+#include <QLabel>
+#include <QLineEdit>
+#include <QListView>
+#include <QPushButton>
+#include <QSettings>
+#include <QTextEdit>
+#include <QToolButton>
+#include <QVBoxLayout> 
+
+#include "MvQPlaceMarkDialog.h"
+#include "MvQPlaceMark.h"
+
+class MvQPmFileIconProvider : public QFileIconProvider
+{
+public:
+	MvQPmFileIconProvider() {};
+	QIcon icon(const QFileInfo& info) const;
+};
+
+QIcon MvQPmFileIconProvider::icon(const QFileInfo& info) const
+{
+	QString suffix = info.suffix();
+	if(suffix != "png")
+	{
+		return QFileIconProvider::icon(info);
+	}
+	
+	return QIcon(info.absoluteFilePath());
+}
+
+
+MvQIconSelector::MvQIconSelector(QString path,QWidget *parent) : QDialog(parent), path_(path)
+{
+	setWindowTitle(tr("Select Icon"));	
+
+	QVBoxLayout *layout= new QVBoxLayout;	
+
+	QDir dir(path_);
+	QFileInfoList dirs=dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Dirs);
+
+	if(dirs.count() ==0)
+		QDialog::reject();
+
+
+	QHBoxLayout *hb=new QHBoxLayout;
+
+	QLabel* label=new QLabel(tr("Categories:"));
+	QComboBox *dirCombo= new QComboBox;
+	foreach(QFileInfo info,dirs)
+	{
+		dirCombo->addItem(info.baseName());
+	}
+
+	connect(dirCombo,SIGNAL(currentIndexChanged(QString)),
+		this,SLOT(slotCategoryChanged(QString)));
+
+	hb->addWidget(label);
+	hb->addWidget(dirCombo);
+	layout->addLayout(hb);
+
+	QStringList filter;
+	filter << "*.png";
+
+ 	fsModel_ = new QFileSystemModel;
+    	fsModel_->setNameFilters(filter);
+	QModelIndex rootIndex=fsModel_->setRootPath(path);
+
+	MvQPmFileIconProvider *iconProvider=new MvQPmFileIconProvider;
+	fsModel_->setIconProvider(iconProvider);
+
+	listView_=new QListView(this);
+	listView_->setViewMode(QListView::IconMode);
+	listView_->setFlow(QListView::LeftToRight);
+	listView_->setGridSize(QSize(90,60));
+	listView_->setResizeMode(QListView::Adjust);
+	listView_->setModel(fsModel_); 
+
+	//This will set the rootindex for the listview
+	if(dirCombo->currentIndex() != 0)
+	{
+		dirCombo->setCurrentIndex(0);
+	}
+	else
+	{	
+		slotCategoryChanged(dirCombo->itemText(0));
+	}
+
+	//listView_->setRootIndex(rootIndex);
+
+	connect(listView_,SIGNAL(clicked(const QModelIndex&)),
+		this,SLOT(slotSelectIcon(const QModelIndex&)));
+
+	layout->addWidget(listView_);
+
+	//-----------------------------
+	// Buttonbox
+	//-----------------------------
+
+	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+                                      | QDialogButtonBox::Cancel);
+ 
+	
+	layout->addWidget(buttonBox);
+
+
+	setLayout(layout);
+
+	//-----------------------------
+	// Signals and slots
+	//-----------------------------	
+
+     	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+     	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+}
+
+MvQIconSelector::~MvQIconSelector()
+{
+}
+
+void MvQIconSelector::slotCategoryChanged(const QString& catName)
+{
+	QString catPath=path_ + catName;
+	QModelIndex catIndex=fsModel_->index(catPath);
+	listView_->setRootIndex(catIndex);
+}
+
+void MvQIconSelector::slotSelectIcon(const QModelIndex& index)
+{
+	selection_=fsModel_->filePath(index);
+}
+
+void MvQIconSelector::accept()
+{
+	hide();	
+
+	emit iconChanged(selection_);
+}
+
+void MvQIconSelector::reject()
+{
+	QDialog::reject();
+}
+
+void MvQIconSelector::writeSettings()
+{
+}
+
+void MvQIconSelector::readSettings()
+{
+}
+
+MvQPlaceMarkDialog::MvQPlaceMarkDialog(MvQPlaceMarkNode *pm,QString iconPath,QWidget *parent) : 
+	QDialog(parent), pm_(pm), systemIconPath_(iconPath)
+{
+	//setAttribute(Qt::WA_DeleteOnClose);
+
+	setWindowTitle(tr("PlaceMark Dialog"));		
+
+	QLabel *label;
+	QLineEdit *lEdit;
+	QTextEdit *tEdit;
+	QToolButton *tb;
+
+	QVBoxLayout *layout= new QVBoxLayout;
+
+	QGridLayout *grid= new QGridLayout;
+  	int cnt=0;
+
+	//Name
+	label = new QLabel(tr("Name:"),this);
+	lEdit=new QLineEdit(pm_->name(),this);
+	elem_["name"]=lEdit; 
+
+	grid->addWidget(label,cnt,0);
+	grid->addWidget(elem_["name"],cnt,1);
+	cnt++;	
+
+	//XPos
+	label = new QLabel(tr("X-position:"),this);
+	lEdit=new QLineEdit(QString::number(pm_->coordinates().x()),this);
+	elem_["xpos"] = lEdit; 
+
+	grid->addWidget(label,cnt,0);
+	grid->addWidget(elem_["xpos"],cnt,1);
+	cnt++;	
+
+	//YPos
+	label = new QLabel(tr("Y-position:"),this);
+	lEdit = new QLineEdit(QString::number(pm_->coordinates().y()),this);
+	elem_["ypos"] = lEdit;
+
+	grid->addWidget(label,cnt,0);
+	grid->addWidget(elem_["ypos"],cnt,1);
+	cnt++;	
+
+	//icon
+	label = new QLabel(tr("Icon:"),this);
+	tb =  new QToolButton(this);
+	pix_=pm_->pixmap();
+	tb->setIcon(pix_);
+	elem_["icon"]=tb;
+
+	grid->addWidget(label,cnt,0);
+	grid->addWidget(elem_["icon"],cnt,1);
+	cnt++;	
+		
+	//Description
+	label = new QLabel(tr("Description:"),this);
+	tEdit = new QTextEdit(pm_->description(),this);
+	elem_["desc"] = tEdit;
+
+	grid->addWidget(label,cnt,0);
+	grid->addWidget(elem_["desc"],cnt,1,3,1);
+	cnt++;	
+
+	layout->addLayout(grid);
+
+	//-----------------------------
+	// Buttonbox
+	//-----------------------------
+
+	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+                                      | QDialogButtonBox::Cancel);
+ 
+	
+	layout->addWidget(buttonBox);
+
+
+	setLayout(layout);
+
+	//-----------------------------
+	// Signals and slots
+	//-----------------------------
+
+	connect(elem_["icon"],SIGNAL(clicked(bool)),
+		this,SLOT(slotLoadIconSelector(bool)));	
+
+     	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+     	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+}
+
+
+MvQPlaceMarkDialog::~MvQPlaceMarkDialog()
+{
+
+}
+
+void MvQPlaceMarkDialog::slotLoadIconSelector(bool)
+{
+	//The dialog will set the node!!!
+	MvQIconSelector dialog(systemIconPath_);
+
+	connect(&dialog,SIGNAL(iconChanged(QString)),
+		this,SLOT(slotIconChanged(QString)));
+
+
+	if(dialog.exec() == QDialog::Accepted)
+	{
+		//We update the model (this will will update the view)
+		//model_->updateItem(view_->currentIndex());
+	}
+}
+
+void MvQPlaceMarkDialog::slotIconChanged(QString iconPath)
+{
+	if(iconPath.isEmpty())
+		return;
+
+
+	pix_=QPixmap(iconPath);
+	QToolButton *tb=static_cast<QToolButton*>(elem_["icon"]);
+	tb->setIcon(pix_);
+}
+
+void MvQPlaceMarkDialog::accept()
+{
+	QLineEdit *lEdit;
+	QTextEdit *tEdit;
+	
+	lEdit=static_cast<QLineEdit*>(elem_["name"]);
+	pm_->setName(lEdit->text());
+
+	lEdit=static_cast<QLineEdit*>(elem_["xpos"]);
+	double xp=lEdit->text().toFloat();
+
+	lEdit=static_cast<QLineEdit*>(elem_["ypos"]);
+	double yp=lEdit->text().toFloat();
+
+	QPointF pp(xp,yp);
+	pm_->setCoordinates(pp);
+	
+	tEdit=static_cast<QTextEdit*>(elem_["desc"]);
+	pm_->setDescription(tEdit->toPlainText());
+
+	pm_->setPixmap(pix_);
+
+	hide();
+}
+
+void MvQPlaceMarkDialog::reject()
+{
+	QDialog::reject();
+}
+
+void MvQPlaceMarkDialog::writeSettings()
+{
+	QSettings settings("ECMWF","MvQPlaceMarkDialog");
+	
+	settings.beginGroup("dialog");
+	settings.setValue("geometry",saveGeometry());
+	//settings.setValue("state",saveState());
+	settings.endGroup();
+}
+
+void MvQPlaceMarkDialog::readSettings()
+{
+	QSettings settings("ECMWF","MvQPlaceMarkDialog");
+	
+	settings.beginGroup("dialog");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	//restoreState(settings.value("state").toByteArray());
+	
+	settings.endGroup();
+}
diff --git a/src/uPlot/MvQPlaceMarkDialog.h b/src/uPlot/MvQPlaceMarkDialog.h
new file mode 100644
index 0000000..dab05d4
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkDialog.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlaceMarkDialog_H
+#define MvQPlaceMarkDialog_H
+
+#include <QDialog>
+#include <QMap>
+#include <QModelIndex>
+
+class QFileSystemModel ;
+class QListView;
+
+class MvQPlaceMarkNode;
+
+
+class MvQIconSelector : public QDialog
+{
+Q_OBJECT
+
+public:
+	MvQIconSelector(QString,QWidget *parent=0);
+	virtual ~MvQIconSelector();
+
+public slots:
+	void slotCategoryChanged(const QString&);
+	void slotSelectIcon(const QModelIndex&);
+	void accept();
+	void reject();
+
+signals:
+	void iconChanged(QString);
+
+protected:
+	void writeSettings();
+	void readSettings();
+
+	QString path_;
+	QFileSystemModel *fsModel_;
+	QListView*	listView_;
+	QString 	selection_; 
+};
+
+
+class MvQPlaceMarkDialog : public QDialog
+{
+Q_OBJECT
+
+public:
+	MvQPlaceMarkDialog(MvQPlaceMarkNode*,QString,QWidget *parent=0);
+	virtual ~MvQPlaceMarkDialog();
+
+public slots:
+	void slotLoadIconSelector(bool);
+	void slotIconChanged(QString);
+	void accept();
+	void reject();
+
+protected:
+	void writeSettings();
+	void readSettings();
+
+	MvQPlaceMarkNode* pm_;
+	QMap<QString,QWidget*> elem_;
+	QString systemIconPath_;
+	QPixmap pix_;
+
+};
+
+#endif
diff --git a/src/uPlot/MvQPlaceMarkMimeData.cc b/src/uPlot/MvQPlaceMarkMimeData.cc
new file mode 100644
index 0000000..716deed
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkMimeData.cc
@@ -0,0 +1,30 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+
+#include "MvQPlaceMarkMimeData.h"
+
+bool MvQPlaceMarkMimeData::hasFormat ( const QString & mimeType ) const
+{	
+	if(mimeType == "metview/mvplacemark")	
+		return true;
+	else
+		return QMimeData::hasFormat(mimeType);
+}
+
+QStringList MvQPlaceMarkMimeData::formats () const
+{
+	return QStringList("metview/mvplacemark");  //QMimeData::formats();
+}
+
+QVariant MvQPlaceMarkMimeData::retrieveData(const QString& /*mimeType*/,QVariant::Type /*type*/) const
+{
+	return QVariant();
+}
diff --git a/src/uPlot/MvQPlaceMarkMimeData.h b/src/uPlot/MvQPlaceMarkMimeData.h
new file mode 100644
index 0000000..4721fd8
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkMimeData.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlaceMarkMimeData_H
+#define MvQPlaceMarkMimeData_H
+
+#include <QMimeData>
+#include <QStringList>
+
+class MvQPlaceMarkNode;
+class QAbstractItemModel;
+
+class MvQPlaceMarkMimeData : public QMimeData
+{
+	Q_OBJECT
+public:
+	MvQPlaceMarkMimeData(const QAbstractItemModel* model) : model_(model) {};
+
+	bool hasFormat ( const QString & mimeType ) const;
+	QStringList	formats () const;
+
+	void addPlaceMark(MvQPlaceMarkNode* pm){ pm_ << pm;}
+	const QList<MvQPlaceMarkNode*>& placeMark() const {return pm_;}	
+	const QAbstractItemModel* model() const {return model_;}
+
+protected:
+	QVariant retrieveData ( const QString & mimeType, QVariant::Type type ) const;
+
+	const QAbstractItemModel* model_;
+	QList<MvQPlaceMarkNode*> pm_;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/uPlot/MvQPlaceMarkModel.cc b/src/uPlot/MvQPlaceMarkModel.cc
new file mode 100644
index 0000000..a1b1c8e
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkModel.cc
@@ -0,0 +1,435 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QBrush>
+#include <QColor>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMimeData>
+#include <QPainter>
+#include <QSlider>
+#include <QStringList>
+#include <QStyle>
+
+#include "MvQPlaceMark.h"
+#include "MvQPlaceMarkMimeData.h"
+#include "MvQPlaceMarkModel.h"
+
+MvQPlaceMarkModel::MvQPlaceMarkModel()
+{
+	root_=0;
+}
+
+void MvQPlaceMarkModel::dataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+
+void MvQPlaceMarkModel::setRootNode(MvQPlaceMarkNode *root)
+{	
+	root_=root;
+	
+	//Reset the model (views will be notified)
+	endResetModel();
+}
+
+
+int MvQPlaceMarkModel::columnCount( const QModelIndex& /* parent */ ) const
+{
+   	 return 4;
+}
+
+int MvQPlaceMarkModel::rowCount( const QModelIndex& parent) const
+{
+ 	if(!root_)
+		return 0;
+
+	if(parent.column() > 0)
+	{
+		return 0;
+	}
+
+	MvQPlaceMarkNode *parentNode=nodeFromIndex(parent);
+	if(!parentNode)
+		return 0;
+
+	return parentNode->children().count();
+}
+
+Qt::ItemFlags MvQPlaceMarkModel::flags ( const QModelIndex & index) const
+{
+	Qt::ItemFlags defaultFlags;
+
+	if(index.column() == 0)
+		defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable |
+		   Qt::ItemIsEditable |
+		   Qt::ItemIsUserCheckable;
+	else 
+		defaultFlags=Qt::ItemIsEnabled |
+		   Qt::ItemIsSelectable;
+		   //Qt::ItemIsEditable;
+
+	if (index.isValid())
+       		return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
+     	else
+		return  Qt::ItemIsDropEnabled | defaultFlags;
+}
+
+QVariant MvQPlaceMarkModel::data( const QModelIndex& index, int role ) const
+{
+	if( !index.isValid())
+        {			
+		return QVariant();
+	}
+ 
+	MvQPlaceMarkNode *node=nodeFromIndex(index);
+	if(!node)
+		return QVariant();
+
+	if(role == Qt::CheckStateRole)
+	{
+		if(index.column() != 0)
+			return QVariant();
+	
+		if(node->isVisible() == true)
+			return QVariant(Qt::Checked);
+		else
+			return QVariant(Qt::Unchecked);
+	}
+	else if(role == Qt::DisplayRole)
+	{
+  		return label(node,index.row(),index.column() );
+	}
+	else if(role == Qt::DecorationRole && index.column() ==0)
+	{
+		return QIcon(node->pixmap());
+	}
+	else if(role == Qt::ForegroundRole && node->isOutOfPlot())
+	{
+		return QBrush(QColor(100,100,100));
+	}
+
+	return  QVariant();
+}
+
+bool MvQPlaceMarkModel::setData( const QModelIndex & index, const QVariant & value, int role) 
+{
+	if( !index.isValid())
+	{
+		return false;	
+	}
+	if(role == Qt::CheckStateRole && index.column() == 0)
+	{	
+		MvQPlaceMarkNode* node=nodeFromIndex(index);
+
+		if(!node)
+			return false;
+
+		bool checked=(value.toInt() == Qt::Checked)?true:false;
+		if(checked != node->isVisible())
+		{
+			beginResetModel();
+			node->setVisible(checked);		
+			endResetModel();
+
+			//emit dataChanged(index,index);
+
+			emit  visibilityChanged(); 
+
+			//The tree will manage this
+			//node->setVisible(checked);
+	
+			qDebug() << "setData";
+			//emit  dataChanged(index,index);
+
+			return true;
+		}
+	}
+	
+	/*else if(role == Qt::DisplayRole && index.column() == 1)
+	{
+		MgQPlaceMarkNode* layer=rowToPlaceMark(index.row()); 
+		
+		float alpha = 1.-value.toDouble()/100.;
+
+		layer->setPlaceMarkAlpha(alpha);
+
+		emit  dataChanged(index,index);
+
+		emit  layerUpdate();
+
+		return true;
+	}*/
+
+	return false;
+
+}
+QVariant MvQPlaceMarkModel::headerData( const int section, const Qt::Orientation orient , const int role ) const
+{
+    if ( orient != Qt::Horizontal || role != Qt::DisplayRole )
+        return QAbstractItemModel::headerData( section, orient, role );
+
+    switch ( section ) {
+    case 0: return tr("Name");
+    case 1: return tr("X Pos");
+    case 2: return tr("Y Pos");
+    case 3: return tr("Data");
+    }
+
+    return QVariant();
+}
+
+QString MvQPlaceMarkModel::label(MvQPlaceMarkNode* node,const int /*row*/, const int column ) const
+{
+	switch ( column ) 
+	{
+    	case 0: 
+	{
+		return node->name();
+	}
+    	case 1: 
+	{
+		return QString::number(node->coordinates().x());
+	}
+	case 2: 
+	{
+		return QString::number(node->coordinates().y());
+	}
+	case 3:
+	{
+		if(!node->layerData().isEmpty())
+		{
+			QString s;	
+			foreach(QString t,node->layerData().at(0))
+			{	
+				if(!t.isEmpty())
+				{
+					s+=" ";
+					s+=t;
+				}
+			}
+			return s;
+		}
+		else
+		{
+			return QString();
+		}
+	}
+
+    	default:
+        	return QString();
+    	}
+}
+
+QModelIndex MvQPlaceMarkModel::index( int row, int column, const QModelIndex & parent ) const
+{
+  	 if(!root_ || row < 0 || column < 0)
+	{
+		return QModelIndex();
+	}
+	
+	MvQPlaceMarkNode* parentNode=nodeFromIndex(parent);
+	MvQPlaceMarkNode* childNode=parentNode->children().at(row);
+	
+	if(!childNode)
+		return QModelIndex();
+
+	return createIndex(row,column,childNode);
+
+}
+
+MvQPlaceMarkNode* MvQPlaceMarkModel::nodeFromIndex( const QModelIndex & index) const
+{
+	if(index.isValid() )
+	{
+		return static_cast<MvQPlaceMarkNode*>(index.internalPointer());
+	}
+	else
+	{
+		return root_;
+	}
+}
+
+QModelIndex MvQPlaceMarkModel::parent( const QModelIndex &child) const
+{		
+	MvQPlaceMarkNode *node=nodeFromIndex(child);
+	if(!node)
+		return QModelIndex();
+
+	MvQPlaceMarkNode *parentNode=node->parent();
+	if(!parentNode)
+		return QModelIndex();	
+
+	MvQPlaceMarkNode *grandParentNode=parentNode->parent();
+	if(!grandParentNode)
+		return QModelIndex();
+
+	int row=grandParentNode->children().indexOf(parentNode);
+	return createIndex(row,0,parentNode);
+}
+
+QModelIndex MvQPlaceMarkModel::indexFromNode(MvQPlaceMarkNode* node) const
+{
+	if(node != 0 && node->parent() != 0)
+	{
+		int row=node->parent()->children().indexOf(node);
+		if(row != -1)
+		{
+			return createIndex(row,0,node);
+		}
+	}
+	
+	return QModelIndex();
+}
+
+void MvQPlaceMarkModel::updateItem(const QModelIndex &ind)	
+{
+	QModelIndex index1=index(ind.row(),0,ind.parent());
+	QModelIndex index2=index(ind.row(),columnCount()-1,ind.parent());
+	emit  dataChanged(index1,index2);
+}
+
+
+void MvQPlaceMarkModel::slotItemUpdated()
+{
+	MvQPlaceMarkItem* item=static_cast<MvQPlaceMarkItem*>(sender());
+	if(!item || !item->placeMark())
+		return;
+
+	QModelIndex index0=indexFromNode(item->placeMark());
+	QModelIndex index1=index(index0.row(),0,index0.parent());
+	QModelIndex index2=index(index0.row(),columnCount()-1,index0.parent());
+	emit  dataChanged(index1,index2);
+
+}
+
+
+Qt::DropActions MvQPlaceMarkModel::supportedDropActions() const
+{
+	return Qt::CopyAction;
+}
+
+QStringList MvQPlaceMarkModel::mimeTypes() const
+ {
+	QStringList types;
+    	types << "metview/mvplacemark";
+    	return types;
+ }
+
+QMimeData* MvQPlaceMarkModel::mimeData(const QModelIndexList &indexes) const
+ {
+	qDebug() << "source:" << indexes;
+
+     	MvQPlaceMarkMimeData *mimeData = new MvQPlaceMarkMimeData(this);
+     	
+	QList<int> procRows;
+
+    	foreach (QModelIndex index, indexes) 
+	{
+	       	if (index.isValid() && 
+		    procRows.indexOf(index.row()) == -1) 
+		{
+			MvQPlaceMarkNode* node=nodeFromIndex(index);
+			mimeData->addPlaceMark(node);
+			procRows << index.row();
+         	}
+     	}
+
+     	return mimeData;
+}
+
+bool MvQPlaceMarkModel::dropMimeData(const QMimeData *data,
+     Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+	//if(!profile_)
+	//	return false;
+
+	qDebug() << "target:" << row << column << parent;
+
+	if (action == Qt::IgnoreAction)
+        	return true;
+
+     	if (!data->hasFormat("metview/mvplacemark"))
+        	return false;
+
+	const MvQPlaceMarkMimeData *nodeData=qobject_cast<const MvQPlaceMarkMimeData*>(data);
+
+	if(!nodeData)
+		return false;
+
+	//Dnd from self --> move rows
+	if(nodeData->model() == this)
+	{
+		qDebug() << "self";
+
+
+
+
+		/*foreach(MvQPlaceMarkNode* n,nodeData->placeMark()) 
+		{     			
+			QModelIndex i=indexFromNode(n);
+			removeRows(i.row(),1,i.parent());
+			n->removeChild(n);
+		}*/
+
+
+		MvQPlaceMarkNode* parentNode=nodeFromIndex(parent);
+		int targetRow=row;
+	
+		//Parent hast to be a folder
+		if(parentNode->type() != MvQPlaceMarkNode::FolderType)
+		{
+			parentNode=parentNode->parent();
+			if(!parentNode || parentNode->type() == MvQPlaceMarkNode::FolderType)
+			{
+				//Root is alwas a folder
+				parentNode=root_;
+			}
+		}
+		
+		QModelIndex targetParent = indexFromNode(parentNode);
+		targetRow=rowCount(targetParent);
+		
+		qDebug() << targetRow << targetParent;
+
+		beginResetModel();
+
+
+		foreach(MvQPlaceMarkNode* n,nodeData->placeMark()) 
+		{     			
+			if(n->parent())
+				n->parent()->removeChild(n);
+			parentNode->addChild(n);			
+		}
+
+		endResetModel();
+	}
+
+	//Dnd from another model --> insert new row
+	/*else	
+	{
+		qDebug() << "other";
+		beginResetModel();
+		QMapIterator<int,MvKey*> it(keyData->keys());
+		while(it.hasNext()) 
+		{
+     			it.next();
+			MvKey *key=it.value()->clone();	
+			profile_->addKey(key);
+		}
+		endResetModel();		
+	}*/
+
+     	return true;
+}
+
diff --git a/src/uPlot/MvQPlaceMarkModel.h b/src/uPlot/MvQPlaceMarkModel.h
new file mode 100644
index 0000000..ff7f532
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkModel.h
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlaceMarkModel_H
+#define MvQPlaceMarkModel_H
+
+#include <QAbstractItemModel>
+#include <QList>
+//#include <QStyledItemDelegate>
+//#include <QStyleOptionViewItem>
+
+//class QSlider;
+//class QLabel;
+
+class MvQPlaceMarkNode;
+/*
+class MvQSlider : public QWidget
+{
+	Q_OBJECT
+
+public: 
+	MvQSlider(QWidget *parent);
+	~MvQSlider();
+	
+	int sliderPosition();
+	void setSliderPosition(int);	
+
+protected slots:
+	void slotUpdateLabel(int);
+
+signals:
+	void editingFinished();
+
+private:
+	QSlider *slider_;
+	QLabel *label_;
+};
+
+
+class MvQPlaceMarkDelegate : public QStyledItemDelegate
+{
+	Q_OBJECT
+
+public:
+
+	MvQPlaceMarkDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+	void setEditorData(QWidget *editor,const QModelIndex& index) const;
+	void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem &option, const QModelIndex &index );
+
+	void setModelData(QWidget *editor,QAbstractItemModel *model,const QModelIndex& index) const;
+
+private slots:
+	void commmitAndCloseEditor();
+
+};
+*/
+
+class MvQPlaceMarkModel : public QAbstractItemModel
+{
+	Q_OBJECT
+
+public:
+   	MvQPlaceMarkModel();
+ 	
+   	int columnCount (const QModelIndex& parent = QModelIndex() ) const;
+   	int rowCount (const QModelIndex& parent = QModelIndex() ) const;
+
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+   	bool setData( const QModelIndex &, const QVariant &, int role = Qt::EditRole ); 
+	QVariant headerData(int,Qt::Orientation,int role = Qt::DisplayRole ) const;
+ 
+   	QModelIndex index (int, int, const QModelIndex& parent = QModelIndex() ) const;
+   	QModelIndex parent (const QModelIndex & ) const;
+		
+	void dataIsAboutToChange();
+
+	void setRootNode(MvQPlaceMarkNode*);
+	QModelIndex indexFromNode(MvQPlaceMarkNode*) const;
+	MvQPlaceMarkNode* nodeFromIndex( const QModelIndex & index) const;
+	void updateItem(const QModelIndex &index);	
+
+	Qt::ItemFlags flags ( const QModelIndex &) const;
+
+	Qt::DropActions supportedDropActions() const;
+	QStringList mimeTypes() const;
+	QMimeData* mimeData(const QModelIndexList &) const;
+	bool dropMimeData(const QMimeData *data,
+     			Qt::DropAction action, int row, int column, 
+			const QModelIndex &parent);
+
+public slots:
+	void slotItemUpdated();
+
+signals:
+	void visibilityChanged();
+
+protected:	
+	QString label(MvQPlaceMarkNode*,const int,const int) const;
+
+
+private:
+	MvQPlaceMarkNode* root_;
+	Qt::CheckState state_;
+	
+};
+
+
+
+
+#endif 
diff --git a/src/uPlot/MvQPlaceMarkWidget.cc b/src/uPlot/MvQPlaceMarkWidget.cc
new file mode 100644
index 0000000..973776f
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkWidget.cc
@@ -0,0 +1,338 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QHBoxLayout>
+#include <QMenu>
+#include <QPushButton>
+#include <QVBoxLayout>
+
+#include "MvKeyProfile.h"
+
+#include "MvQKeyManager.h"
+#include "MvQPlaceMark.h"
+#include "MvQPlaceMarkDialog.h"
+#include "MvQPlaceMarkModel.h"
+#include "MvQPlaceMarkWidget.h"
+#include "MvQTreeView.h"
+#include "MvQPlotView.h"
+
+#include "MgQLayoutItem.h"
+#include "MgQPlotScene.h"
+
+#define METVIEW_MULTIPAGE
+
+
+MvQPlaceMarkWidget::MvQPlaceMarkWidget(MgQPlotScene *plotScene,MvQPlotView *plotView,
+		    QWidget *parent) : QWidget(parent)
+{
+
+	manager_ = new MvQKeyManager(MvQKeyManager::PlaceMarkType);
+	//manager->loadProfiles();
+
+	pmTree_=new MvQPlaceMarkTree;
+
+	plotScene_=plotScene;
+	plotView_=plotView;
+
+	QVBoxLayout *layout = new QVBoxLayout;
+	setLayout(layout);
+
+	//Create layer model and view	
+	view_ = new QTreeView(this);
+	view_->setObjectName("placeMarkTree");
+	//view_->setProperty("mvStyle",0);
+	//view_->setAlternatingRowColors(true);
+        view_->setAllColumnsShowFocus(true);
+	view_->setDragEnabled(true);
+ 	view_->setAcceptDrops(true);
+	view_->setDropIndicatorShown(true);
+
+//view_->setActvatedByKeyNavigation(true);
+
+//view_->setItemDelegate(new MvQPlaceMarkDelegate());
+	layout->addWidget(view_);	
+
+	model_= new MvQPlaceMarkModel;
+	view_->setModel(model_);
+
+	model_->dataIsAboutToChange();
+	model_->setRootNode(pmTree_->root());
+
+	connect(model_,SIGNAL(visibilityChanged()),
+		this, SLOT(slotVisibilityChanged()));
+
+	view_->setContextMenuPolicy(Qt::CustomContextMenu);
+
+	connect(view_, SIGNAL(customContextMenuRequested( const QPoint& )), 
+		this, SLOT(slotShowTreeContextMenu(const QPoint &)));
+
+	actions_["addFolder"] = new QAction(tr("Add folder"),view_);
+	actions_["addPlaceMark"] = new QAction(tr("Add placemark"),view_);
+        actions_["delete"] = new QAction(tr("Delete"),view_);
+	actions_["edit"] = new QAction(tr("Properties"),view_);
+
+	connect(actions_["addFolder"], SIGNAL(triggered()), 
+		this, SLOT(slotAddFolder()));
+
+	connect(actions_["addPlaceMark"], SIGNAL(triggered()), 
+		this, SLOT(slotAddPlaceMark()));
+
+	connect(actions_["edit"], SIGNAL(triggered()), 
+		this, SLOT(slotEditPlaceMark()));
+
+
+	//Buttons
+	QHBoxLayout *hb = new QHBoxLayout;
+	layout->addLayout(hb);
+
+	QPushButton *upPb = new QPushButton("Up");
+
+	QPushButton *downPb = new QPushButton("Down");
+
+	hb->addWidget(downPb);
+	hb->addWidget(upPb);
+
+	connect(upPb,SIGNAL(clicked()),
+		this,SLOT(slotMoveUp()));
+
+	connect(downPb,SIGNAL(clicked()),
+		this,SLOT(slotMoveDown()));
+
+	connect(view_,SIGNAL(clicked(const QModelIndex &)),
+		this,SLOT(slotLayerSelected(const QModelIndex &)));
+
+
+	char *mvhome=getenv("METVIEW_DIR_SHARE");
+	if (mvhome == 0)  
+	{
+		
+	}
+	else
+	{
+		systemIconPath_=QString(mvhome);
+	}
+
+	systemIconPath_.append("/icons/placemark/");
+	//defaultPixmap_=QPixmap(systemIconPath_ + "");
+	defaultPixmap_=QPixmap();
+
+	slotAddFolder();
+}
+
+
+MvQPlaceMarkWidget::~MvQPlaceMarkWidget()
+{
+	savePlaceMarks();
+	delete manager_;
+
+}
+
+void MvQPlaceMarkWidget::slotLayerSelected(const QModelIndex &index)
+{
+	if( !index.isValid())
+	{
+		return;	
+	}
+
+	//int row=index.row();
+	
+	/*for(int i=0; i <  pmTree_.count(); i++)
+	{
+		if(i==row)
+			pmTree_[i]->setHighlighted(true);
+		else			
+			pmTree_[i]->setHighlighted(false);
+
+	}*/
+}
+
+void MvQPlaceMarkWidget::slotMoveUp()
+{
+	
+}
+
+void MvQPlaceMarkWidget::slotMoveDown()
+{
+
+}
+
+
+
+
+void MvQPlaceMarkWidget::slotAddPlaceMark()
+{
+#ifndef METVIEW_MULTIPAGE
+	MgQLayoutItem *layout=plotScene_->projectorItem();
+#else
+	MgQLayoutItem *layout=0;
+#endif
+
+	QRectF rect=layout->mapRectToScene(layout->boundingRect());	
+	createPlaceMark(rect.center());	
+
+
+/*MvQPlaceMark *pm=new MvQPlaceMark(plotScene_,plotView_,0);
+	pm->setParentItem(0);
+	pm->setData(0,QVariant("PlaceMark"));
+	pm->setZValue(1.8);
+	//pm->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+	pm->setActivated(true);
+	pm->setName("Budapest");
+	//pm->setLat(47.12);
+	//pm->setLon(19.2);
+	
+	plotScene_->addItem(pm);
+	
+	pmTree_.push_back(pm);
+
+	model_->setPlaceMarks(pmTree_);
+
+	connect(pm,SIGNAL(itemUpdated()),
+		model_,SLOT(slotItemUpdated()));*/
+
+}
+void MvQPlaceMarkWidget::slotAddFolder()
+{
+	MvQPlaceMarkNode* node=model_->nodeFromIndex(view_->currentIndex());
+	if(!node)
+		node=pmTree_->root();
+
+	model_->dataIsAboutToChange();
+
+	MvQPlaceMarkNode* pm=new MvQPlaceMarkNode(MvQPlaceMarkNode::FolderType);
+	pm->setName("Folder");
+
+	node->addChild(pm);
+	model_->setRootNode(pmTree_->root());
+	
+}
+
+MvQPlaceMarkItem* MvQPlaceMarkWidget::createPlaceMark(QPointF sPos)
+{
+	//QPointF sPos=plotView_->mapToScene(pos);
+        MgQLayoutItem *layout=plotScene_->projectorItem(sPos);
+
+	if(layout)
+	{
+		model_->dataIsAboutToChange();
+
+		MvQPlaceMarkNode* pm=new MvQPlaceMarkNode();
+		pm->setName("Untitled");
+		pm->setPixmap(defaultPixmap_);
+
+		pmTree_->root()->addChild(pm);
+
+		model_->setRootNode(pmTree_->root());
+		
+		MvQPlaceMarkItem *item=new MvQPlaceMarkItem(pm,plotScene_,plotView_,0);
+		item->setParentItem(0);
+		item->setZValue(1.8);
+		item->setActivated(true);
+		item->setScenePosition(sPos);
+
+
+		connect(item,SIGNAL(itemUpdated()),
+			model_,SLOT(slotItemUpdated()));
+
+		plotScene_->addItem(item);
+
+		pmItems_ << item;
+
+		return item;
+	}
+
+	return 0;
+
+}
+
+void MvQPlaceMarkWidget::slotEditPlaceMark()
+{
+	MvQPlaceMarkNode* node=model_->nodeFromIndex(view_->currentIndex());
+	if(!node)
+		node=pmTree_->root();
+
+	//The dialog will set the node!!!
+	MvQPlaceMarkDialog dialog(node,systemIconPath_);
+	if(dialog.exec() == QDialog::Accepted)
+	{
+		//We update the model (this will will update the view)
+		model_->updateItem(view_->currentIndex());
+	}
+
+	//We reset the corresponding item
+	if(node->type() == MvQPlaceMarkNode::ItemType)
+	{
+		foreach(MvQPlaceMarkItem* item, pmItems_)
+		{
+			if(item->placeMark() == node)
+				item->reset();
+		}
+	}
+}
+
+void MvQPlaceMarkWidget::savePlaceMarks()
+{
+	/*MvKeyProfile *prof=new MvKeyProfile("Default");
+
+	foreach(MvQPlaceMark *pm,pmTree_)
+	{
+		MvKey *key=new MvKey("name","shortname");
+		key->setMetaData("name",pm->name().toStdString());
+		key->setMetaData("xCoord",QString::number(pm->coordinates().x()).toStdString());
+		key->setMetaData("yCoord",QString::number(pm->coordinates().y()).toStdString());
+		key->setMetaData("visible",(pm->isVisible())?"true":"false");
+		key->setMetaData("pixmap","1");
+		prof->addKey(key);
+		
+	}
+
+	manager_->addProfile(prof);
+	manager_->saveProfiles();*/
+}
+
+
+
+void MvQPlaceMarkWidget::slotShowTreeContextMenu(const QPoint& pt)
+{
+	//QList<QAction *> actions;
+
+	if(!view_->indexAt(pt).isValid()) 
+	{
+		//actions.append(m_addAction);
+		return;
+	}
+	if(actions_.size() > 0)
+		QMenu::exec(actions_.values(), view_->mapToGlobal(pt));
+
+}
+
+void MvQPlaceMarkWidget::slotVisibilityChanged()
+{
+	foreach(MvQPlaceMarkItem* item,pmItems_)
+	{
+		item->updateVisibility();
+	}
+}
+
+void MvQPlaceMarkWidget::prepareForReset()
+{
+
+}
+
+void MvQPlaceMarkWidget::reset()
+{
+	foreach(MvQPlaceMarkItem* item,pmItems_)
+	{
+		item->reset();
+		
+	}
+	model_->dataIsAboutToChange();
+	model_->setRootNode(pmTree_->root());
+}
diff --git a/src/uPlot/MvQPlaceMarkWidget.h b/src/uPlot/MvQPlaceMarkWidget.h
new file mode 100644
index 0000000..e5e9d85
--- /dev/null
+++ b/src/uPlot/MvQPlaceMarkWidget.h
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlaceMarkWidget_H
+#define MvQPlaceMarkWidget_H
+
+#include <QModelIndex>
+#include <QWidget>
+
+class QAction;
+class QTreeView;
+
+class MvQKeyManager;
+class MvQPlaceMarkItem;
+class MvQPlaceMarkTree;
+class MvQPlaceMarkModel;
+class MvQTreeView;
+class MvQPlotView;
+
+class MgQPlotScene;
+
+class MvQPlaceMarkWidget : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MvQPlaceMarkWidget(MgQPlotScene*,MvQPlotView *,QWidget *parent=0);
+	~MvQPlaceMarkWidget();
+	MvQPlaceMarkModel* model() {return model_;}
+        const QList<MvQPlaceMarkItem*>& placeMarks() {return pmItems_;}
+	MvQPlaceMarkItem* createPlaceMark(QPointF);
+	void savePlaceMarks();
+
+	void prepareForReset();
+	void reset();
+
+public slots:
+	void slotLayerSelected(const QModelIndex &);
+	void slotMoveDown();
+	void slotMoveUp();
+	void slotShowTreeContextMenu(const QPoint&);
+	void slotAddFolder();
+	void slotAddPlaceMark();
+	void slotVisibilityChanged();
+	void slotEditPlaceMark();
+
+protected:
+	QTreeView *view_;
+	MvQPlaceMarkModel *model_;
+	MgQPlotScene *plotScene_;
+	MvQPlotView *plotView_;
+	QMap<QString,QAction*> actions_;
+
+	MvQPlaceMarkTree* pmTree_;
+	QList<MvQPlaceMarkItem*> pmItems_;
+	MvQKeyManager *manager_;
+
+	QString systemIconPath_;
+	QPixmap defaultPixmap_;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/uPlot/MvQPlotItem.h b/src/uPlot/MvQPlotItem.h
new file mode 100644
index 0000000..a30c0d5
--- /dev/null
+++ b/src/uPlot/MvQPlotItem.h
@@ -0,0 +1,50 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlotItem_H
+#define MvQPlotItem_H
+
+#include <QGraphicsObject>
+
+class QMouseEvent;
+
+class MgQPlotScene;
+class MvQPlotView;	
+
+class MvQPlotItem : public QGraphicsObject
+{
+public:
+	MvQPlotItem(MgQPlotScene* scene,MvQPlotView* view,QGraphicsItem *parent=0) : 
+			QGraphicsObject(parent), plotScene_(scene),plotView_(view),
+			activated_(false), acceptMouseEvents_(true) {};
+
+	bool activated() {return activated_;}
+	virtual void setActivated(bool b) {activated_=b;}
+	void setAcceptMouseEvents(bool b) {acceptMouseEvents_=b;}
+
+	virtual void mousePressEventFromView(QMouseEvent*) {};
+	virtual void mouseMoveEventFromView(QMouseEvent*) {};	
+	virtual void mouseReleaseEventFromView(QMouseEvent*){};
+
+	virtual void prepareForReset() {};
+	virtual void reset()  {};
+
+protected:
+	void mousePressEvent(QGraphicsSceneMouseEvent*) {};
+	void mouseMoveEvent(QGraphicsSceneMouseEvent*) {};	
+	void mouseReleaseEvent(QGraphicsSceneMouseEvent*) {};
+
+	MgQPlotScene *plotScene_;
+	MvQPlotView *plotView_;
+	bool activated_;
+	bool acceptMouseEvents_;
+};
+
+
+#endif
diff --git a/src/uPlot/MvQPlotView.cc b/src/uPlot/MvQPlotView.cc
new file mode 100644
index 0000000..943bb64
--- /dev/null
+++ b/src/uPlot/MvQPlotView.cc
@@ -0,0 +1,762 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "MvQPlotView.h"
+
+#include <QContextMenuEvent>
+#include <QDebug>
+#include <QMouseEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+
+#include "MvKeyProfile.h"
+
+#include "MgQLayoutItem.h"
+#include "MgQPlotScene.h"
+#include "MgQRootItem.h"
+#include "MvQAreaSelection.h"
+#include "MvQLineSelection.h"
+#include "MvQCursorData.h"
+#include "MvQMagnifier.h"
+#include "MvQPlaceMark.h"
+#include "MvQPlaceMarkWidget.h"
+#include "MvQPointSelection.h"
+#include "MvQZoom.h"
+#include "uPlotBase.h"
+
+#define METVIEW_MULTIPAGE
+
+MvQPlotView::MvQPlotView(QGraphicsScene *scene,QWidget *parent) : QGraphicsView(scene,parent)
+{	
+	zoom_=0;
+	magnifier_=0;
+	cursorData_=0;
+	cursorDataProbe_=0;
+	area_=0;
+	line_=0;
+	point_=0;
+	placeMark_=0;
+	dataProbe_=0;
+	placeMarkIsBeingCreated_=false;
+	sceneIsBeingSelected_=false;
+
+	plotScene_=static_cast<MgQPlotScene*>(scene);
+	
+	resetTransform();
+	//translate(0,height);
+	scale(1.,-1);
+}
+
+MvQPlotView::~MvQPlotView()
+{
+}
+
+void MvQPlotView::slotSetEnableZoom(bool flag)
+{	
+	if(zoom_ && flag == zoom_->activated())
+		return;
+
+	if(flag == false)
+	{
+		if(!zoom_)
+			return;
+		else
+		{
+			zoom_->setActivated(false);
+			unsetCursor();
+		}
+	}
+	else
+	{
+		if(!zoom_)
+		{		
+			zoom_= new MvQZoom(plotScene_,this,0);
+			//zoom_->setVisible(true);
+			zoom_->setZValue(2.5);
+			plotScene_->addItem(zoom_); 
+			
+			connect(zoom_,SIGNAL(zoomRectangleIsDefined(const string&,const string &)),
+				this,SIGNAL(zoomRectangleIsDefined(const string&,const string &)));
+			
+			connect(zoom_,SIGNAL(mousePressInSceneItem(MgQSceneItem*)),
+				this,SIGNAL(zoomActionStarted(MgQSceneItem*)));	
+		}	
+		
+		zoom_->setActivated(true);
+		emit magnifierIsEnabledProgramatically(false);
+		emit inputSIsEnabledProgramatically(false);
+		setCursor(QCursor(Qt::CrossCursor));
+	}		
+}
+
+void MvQPlotView::slotSetEnableMagnifier(bool flag)
+{
+	if(magnifier_ && flag == magnifier_->activated())
+		return;
+
+	if(flag == false)
+	{
+		if(!magnifier_)
+			return;
+		else
+		{
+			magnifier_->setActivated(false);
+			//magnifier_->operationEnd(); 
+		}
+	}
+	else
+	{
+		emit zoomIsEnabledProgramatically(false);
+		if(!magnifier_)
+		{		
+			magnifier_= new MvQMagnifier(plotScene_,this,0);
+			//zoom_->setVisible(true);
+			magnifier_->setZValue(1.5);
+			plotScene_->addItem(magnifier_); 
+			
+			connect(magnifier_,SIGNAL(factorChanged()),
+				this,SLOT(slotMagnifierChanged()));
+				
+			connect(magnifier_,SIGNAL(positionChanged()),
+				this,SLOT(slotMagnifierChanged()));						
+		}	
+
+		magnifier_->setActivated(true);
+		//magnifier_->operationBegin();		
+	}
+	
+	slotMagnifierChanged();
+}
+
+void MvQPlotView::slotMagnifierChanged()
+{
+	if(!magnifier_) 
+		return;
+	
+	//Update dataprobe
+	if(dataProbe_ && dataProbe_->activated())
+	{  
+		dataProbe_->setMagnifier(magnifier_);
+	}	  
+}
+
+void MvQPlotView::slotSetEnableCursorData(bool flag)
+{
+	if(cursorData_ && flag == cursorData_->activated())
+		return;
+
+	if(flag == false)
+	{
+		if(!cursorData_)
+			return;
+		else
+		{
+			cursorData_->setActivated(false);
+		}
+	}
+	else
+	{
+		if(!cursorData_)
+		{		
+			cursorData_= new MvQCursorData(plotScene_,this,0);
+			cursorData_->setVisible(true);
+			cursorData_->setZValue(2.);
+			plotScene_->addItem(cursorData_);
+			
+			connect(cursorData_,SIGNAL(positionChanged(QPointF,QList<ValuesCollector>)),
+				this,SIGNAL(cursorDataChanged(QPointF,QList<ValuesCollector>)));
+
+			/*cursorDataProbe_=new MvQPlaceMark(plotScene_,this,0);
+			cursorDataProbe_->setZValue(1.8);
+			cursorDataProbe_->setActivated(false);
+			
+			connect(cursorData_,SIGNAL(probeEnabled(bool)),
+				this,SLOT(slotEnableCursorDataProbe(bool)));
+		
+			plotScene_->addItem(cursorDataProbe_);	*/			
+		}	
+		
+		cursorData_->setActivated(true);
+	}		
+}
+
+void MvQPlotView::slotEnableCursorDataProbe(bool /*b*/)
+{
+	//cursorDataProbe_->setActivated(b);
+}
+
+void MvQPlotView::slotSetEnableAreaSelection(bool flag)
+{
+	if(area_ && flag == area_->activated())
+		return;
+
+	if(flag == false)
+	{
+		if(!area_)
+			return;
+		else
+		{
+			area_->setActivated(false);
+		}
+	}
+	else
+	{
+		if(!area_)
+		{		
+			area_= new MvQAreaSelection(plotScene_,this,0);
+			area_->setParentItem(plotScene_->annotationRootItem());
+			area_->setZValue(2.);
+	
+			connect(area_,SIGNAL(areaIsDefined(double,double,double,double)),
+				this,SIGNAL(areaIsDefined(double,double,double,double)));
+
+			connect(area_,SIGNAL(areaIsUndefined()),
+				this,SIGNAL(areaIsUndefined()));
+		}	
+		
+		area_->setActivated(true);
+		emit magnifierIsEnabledProgramatically(false);
+		emit zoomIsEnabledProgramatically(false);		
+	}		
+
+}
+void MvQPlotView::slotChangeArea(double blLat,double blLon,double trLat,double trLon)
+{
+	if(!area_ ||  !area_->activated())
+		return;
+	
+	area_->setArea(blLat,blLon,trLat,trLon);
+}
+
+void MvQPlotView::slotClearArea()
+{
+	if(!area_ ||  !area_->activated())
+		return;
+
+	area_->clearArea();
+}
+
+void MvQPlotView::slotSelectAllArea()
+{
+	if(!area_ ||  !area_->activated())
+		return;
+
+	area_->selectAllArea();
+}
+
+void MvQPlotView::slotSetEnableLineSelection(bool flag)
+{
+	if(line_ && flag == line_->activated())
+		return;
+
+	if(flag == false)
+	{
+		if(!line_)
+			return;
+		else
+		{
+			line_->setActivated(false);
+		}
+	}
+	else
+	{
+		if(!line_)
+		{		
+			line_= new MvQLineSelection(plotScene_,this,0);
+			line_->setParentItem(plotScene_->annotationRootItem());
+			line_->setZValue(2.);
+			
+			connect(line_,SIGNAL(lineIsDefined(double,double,double,double)),
+				this,SIGNAL(lineIsDefined(double,double,double,double)));
+
+			connect(line_,SIGNAL(lineIsUndefined()),
+				this,SIGNAL(lineIsUndefined()));
+			
+		}	
+		
+		line_->setActivated(true);
+		emit magnifierIsEnabledProgramatically(false);
+		emit zoomIsEnabledProgramatically(false);		
+	}		
+
+}
+void MvQPlotView::slotChangeLine(double lat1,double lon1,double lat2,double lon2)
+{
+	if(!line_ ||  !line_->activated())
+		return;
+	
+	line_->setLine(lat1,lon1,lat2,lon2);
+}
+
+void MvQPlotView::slotClearLine()
+{
+	if(!line_ ||  !line_->activated())
+		return;
+
+	line_->clearLine();
+}
+void MvQPlotView::slotChangeLineDirection()
+{
+	if(!line_ ||  !line_->activated())
+		return;
+	
+	line_->changeDirection();
+}
+
+void MvQPlotView::slotSetEnablePointSelection(bool flag)
+{
+	if(point_ && flag == point_->activated())
+		return;
+
+	if(flag == false)
+	{
+		if(!point_)
+			return;
+		else
+		{
+			point_->setActivated(false);
+		}
+	}
+	else
+	{
+		if(!point_)
+		{		
+			point_= new MvQPointSelection(plotScene_,this,0);
+			point_->setParentItem(plotScene_->annotationRootItem());
+			point_->setZValue(2.);
+			
+			connect(point_,SIGNAL(pointIsDefined(double,double)),
+				this,SIGNAL(pointIsDefined(double,double)));
+
+			connect(point_,SIGNAL(pointIsUndefined()),
+				this,SIGNAL(pointIsUndefined()));
+			
+		}	
+		
+		point_->setActivated(true);
+		emit magnifierIsEnabledProgramatically(false);
+		emit zoomIsEnabledProgramatically(false);		
+	}		
+
+}
+void MvQPlotView::slotChangePoint(double lat,double lon)
+{
+	if(!point_ ||  !point_->activated())
+		return;
+	
+	point_->setPoint(lat,lon);
+}
+
+void MvQPlotView::slotClearPoint()
+{
+	if(!point_ ||  !point_->activated())
+		return;
+
+	point_->clearPoint();
+}
+
+
+void MvQPlotView::slotSelectScene()
+{
+	sceneIsBeingSelected_=true;
+	setCursor(Qt::PointingHandCursor);
+}
+
+void MvQPlotView::setDataProbe(MvQPlaceMark *p)
+{
+	dataProbe_=p;	
+}
+
+void MvQPlotView::slotCreatePlaceMark()
+{
+	placeMarkIsBeingCreated_=true;
+}
+
+void MvQPlotView::setPlaceMark(MvQPlaceMarkWidget *p)
+{
+	placeMark_=p;
+}
+
+/*void MvQPlotView::updatePlaceMarks()
+{
+	QList<MvQPlaceMarkNode*> vis=placeMark_->visibleNodes();
+
+	foreach(MvQPlaceMarkNode)
+
+
+	QMapIterator<MvQPlaceMarkNode*,MvQPlaceMark*> it(pmItem_);
+	while (it.hasNext()) 
+	{
+     		it.next();
+		if(!it.key()->isVisible())
+		{
+			pmItem[it.key()]=0;
+			delete it.value();
+		}
+	}
+	
+	if()
+
+
+}*/
+
+
+void MvQPlotView::slotFrameProfileChanged(MvKeyProfile* prof)
+{
+#ifdef METVIEW_EXPERIMENTAL
+
+	QPixmap defaultPixmap(QString::fromUtf8(":/uPlot/gunsight.svg"));
+	
+	int cnt=0;
+	for(int i=0; i < static_cast<int>(prof->size()); i++)
+	{
+		QString s=QString::fromStdString(prof->at(i)->name());
+		QString sname=QString::fromStdString(prof->at(i)->shortName());
+
+		if(s.startsWith("MV_Value"))
+		{			
+			float xf=QString::fromStdString(prof->at(i)->metaData("x_coord")).toFloat();
+			float yf=QString::fromStdString(prof->at(i)->metaData("y_coord")).toFloat();
+#ifndef METVIEW_MULTIPAGE	
+			MgQLayoutItem *layout=plotScene_->projectorItem();
+#else
+			MgQLayoutItem *layout=0;
+#endif			
+			if(layout)
+			{
+				MvQPlaceMarkNode* pm=0;
+				if(cnt >= pointData_.count())
+				{
+					pm=new MvQPlaceMarkNode();
+				}
+				else
+				{
+					pm=pointData_[cnt]->placeMark();	
+				}
+			
+				pm->setName(sname);
+				QPointF pp(xf,yf);
+				pm->setCoordinates(pp);
+				pm->setPixmap(defaultPixmap);
+
+				MvQPlaceMarkItem *item=0;
+				if(cnt >= pointData_.count())
+				{
+					item=new MvQPlaceMarkItem(pm,plotScene_,this,0);
+					item->setParentItem(plotScene_->annotationRootItem());
+					item->setFlag(QGraphicsItem::ItemIgnoresTransformations);
+					item->setZValue(1.8);
+					item->setActivated(true);
+
+					plotScene_->addItem(item);
+				}
+				else
+				{
+					item=pointData_[cnt];
+				}	
+				
+				item->setPixmapColour(QColor(QString::fromStdString(prof->at(i)->metaData("colour"))));
+				item->reset();
+				
+				if(cnt >= pointData_.count())
+				{
+					pointData_ << item;
+				}
+			}
+			cnt++;
+
+		}
+	}
+#endif
+
+}
+
+void MvQPlotView::resetBegin()
+{
+	if(zoom_)
+		zoom_->prepareForReset();
+	if(magnifier_)
+		magnifier_->prepareForReset();
+	if(cursorData_)
+		cursorData_->prepareForReset();
+	if(area_)
+		area_->prepareForReset();
+	if(line_)
+		line_->prepareForReset();
+	if(point_)
+		point_->prepareForReset();
+	if(placeMark_)
+		placeMark_->prepareForReset();
+	if(dataProbe_)
+	  	dataProbe_->prepareForReset();
+}
+
+void MvQPlotView::resetEnd()
+{
+	if(zoom_)
+		zoom_->reset();
+	if(magnifier_)
+		magnifier_->reset();
+	if(cursorData_)
+		cursorData_->reset();
+	if(area_)
+		area_->reset();
+	if(line_)
+		line_->reset();
+	if(point_)
+		point_->reset();
+	if(placeMark_)
+		placeMark_->reset();
+	if(dataProbe_)
+	  	dataProbe_->reset();
+}
+
+void MvQPlotView::mousePressEvent(QMouseEvent *event)
+{
+	if(sceneIsBeingSelected_)
+	{
+		unsetCursor();
+		
+		sceneIsBeingSelected_=false;			
+		QPointF sPos=mapToScene(event->pos());
+		emit sceneSelected(sPos);
+		return;
+	}	
+
+
+	if(placeMarkIsBeingCreated_)
+	{
+		placeMarkIsBeingCreated_=false;	
+		QPointF sPos=mapToScene(event->pos());
+		placeMark_->createPlaceMark(sPos);
+		unsetCursor();
+		return;
+	}	
+
+	MvQMagnifier::MagnifierAction magnifierAction=MvQMagnifier::NoAction;
+
+	//Zoom and magnifier are exclusive!
+
+	//First comes the zoom if it is active
+	if(zoom_ && zoom_->activated())	
+	{
+		zoom_->mousePressEventFromView(event);
+		return;
+	}
+	
+	//Then we check if the dataProbe is selected
+	if(dataProbe_ && dataProbe_->activated())
+	{
+		QPointF pos = mapToScene(event->pos());						
+		dataProbe_->mousePressEventFromView(event); 
+		if(dataProbe_->currentAction() != MvQPlaceMark::NoAction)
+		{
+		  	return;
+		}	
+	}
+
+	//If there is no zoom and the dataProbe is not selected tries the magnifier
+	if(magnifier_ && magnifier_->activated())	
+	{
+		magnifier_->mousePressEventFromView(event); 
+		magnifierAction=magnifier_->magnifierAction();
+	}
+	
+	//We continuew with the ...
+	
+	//area selection
+	if(area_ && area_->activated())	
+	{
+		area_->mousePressEventFromView(event); 
+	}
+	//line selection
+	else if(line_ && line_->activated())	
+	{
+		line_->mousePressEventFromView(event); 
+	}
+	//point selection
+	else if(point_ && point_->activated())	
+	{
+		point_->mousePressEventFromView(event); 
+	}	
+	//placemarks
+	else if(placeMark_)
+	{
+		foreach(MvQPlaceMarkItem *m,placeMark_->placeMarks())
+		{		
+			m->mousePressEventFromView(event); 
+			if(m->currentAction() == MvQPlaceMarkItem::MoveAction)
+			{
+				break;
+			}	
+		}
+	}
+
+	//Cursor data can be active both for zoom and magnifier.
+	//If the mousepress event triggered some actions in the magnifier
+	//then we ignore this event for the cursor data.
+	if(cursorData_ && cursorData_->activated() &&  
+	   magnifierAction==MvQMagnifier::NoAction && 
+	   (!zoom_ || zoom_->activated() == false))
+	{		
+		cursorData_->mousePressEventFromView(event);	
+	}
+	else
+	{
+		QGraphicsView::mousePressEvent(event);
+	}
+}
+
+void MvQPlotView::mouseMoveEvent(QMouseEvent *event)
+{
+	if(cursorData_ && cursorData_->activated())
+	{
+		QPointF pos = mapToScene(event->pos());
+
+		//If the cursor is inside tha magnifier cursor data has to 
+		//be notified know about the magnifier geometry. 
+		if(magnifier_ && magnifier_->activated() && 
+		   magnifier_->checkPointInMagnifier(pos))
+		{
+			cursorData_->setMagnifierInfo(true,magnifier_->pos(),magnifier_->zoomFactor());
+		}
+		else
+		{
+			cursorData_->setMagnifierInfo(false);
+		}
+			
+		cursorData_->mouseMoveEventFromView(event);		
+	}
+	
+	if(dataProbe_ && dataProbe_->activated() && dataProbe_->currentAction() == MvQPlaceMark::MoveAction)
+	{
+		QPointF pos = mapToScene(event->pos());
+		dataProbe_->mouseMoveEventFromView(event);
+		return;
+	}
+	
+	if(zoom_ && zoom_->activated())	
+	{
+		zoom_->mouseMoveEventFromView(event);
+	}
+	else if(area_ && area_->activated())	
+	{
+		area_->mouseMoveEventFromView(event);
+	}
+	else if(line_ && line_->activated())	
+	{
+		line_->mouseMoveEventFromView(event);
+	}
+	else if(point_ && point_->activated())	
+	{
+		point_->mouseMoveEventFromView(event);
+	}
+	else if(magnifier_ && magnifier_->activated())	
+	{
+		magnifier_->mouseMoveEventFromView(event);
+	}
+	//else if(dataProbe_ && dataProbe_->activated())	
+	//{
+	//	dataProbe_->mouseMoveEventFromView(event);
+	//}
+	else if(placeMark_)
+	{
+		foreach(MvQPlaceMarkItem *m,placeMark_->placeMarks())
+		{
+			m->mouseMoveEventFromView(event); 
+			if(m->currentAction() == MvQPlaceMarkItem::MoveAction)
+			{
+				break;
+			}	
+		}
+	}
+	else
+	{
+		QGraphicsView::mouseMoveEvent(event);
+	}
+
+	return;
+}
+
+ void MvQPlotView::mouseReleaseEvent(QMouseEvent *event)
+ {
+	bool zoomStatus=true;
+
+	if(zoom_ && zoom_->activated())	
+	{
+		zoom_->mouseReleaseEventFromView(event);
+		zoomStatus=zoom_->zoomWasPerformedAfterMouseRelease();
+	}
+	else if(area_ && area_->activated())	
+	{
+		area_->mouseReleaseEventFromView(event);
+	}
+	else if(line_ && line_->activated())	
+	{
+		line_->mouseReleaseEventFromView(event);
+	}
+	else if(point_ && point_->activated())	
+	{
+		point_->mouseReleaseEventFromView(event);
+	}
+	else if(dataProbe_ && dataProbe_->activated())	
+	{
+		dataProbe_->mouseReleaseEventFromView(event);
+	}
+	else if(placeMark_)
+	{
+		foreach(MvQPlaceMarkItem *m,placeMark_->placeMarks())
+		{
+			m->mouseReleaseEventFromView(event); 
+		}
+	}
+
+	if(cursorData_ && cursorData_->activated())
+	{
+		cursorData_->setZoomWasPerformedAfterMouseRelease(zoomStatus);
+		cursorData_->mouseReleaseEventFromView(event);		
+	}
+	if(magnifier_ && magnifier_->activated())	
+	{
+		magnifier_->mouseReleaseEventFromView(event);
+	}
+	else
+	{
+		QGraphicsView::mouseReleaseEvent(event);
+	}
+
+	return;
+
+
+ }
+
+void MvQPlotView::DrawRectangle(double /*north*/, double /*west*/, double /*south*/, double /*east*/)
+{
+}
+
+void MvQPlotView::contextMenuEvent(QContextMenuEvent *event)
+{
+	emit contextMenuEventHappened(event->globalPos(),mapToScene(event->pos()));	
+}	
+
+void MvQPlotView::resizeEvent(QResizeEvent *event)
+{
+	QGraphicsView::resizeEvent(event);
+	emit resizeEventHappened(event->size());	
+}	
+
+
+void MvQPlotView::setMvPlotSize(double /*width*/,double /*height*/)
+{
+	//resetTransform();
+	//translate(0,height);
+	//scale(1.,-1);
+	
+	//setSceneRect(0,0,width*2,height*2); 
+}
diff --git a/src/uPlot/MvQPlotView.h b/src/uPlot/MvQPlotView.h
new file mode 100644
index 0000000..533a562
--- /dev/null
+++ b/src/uPlot/MvQPlotView.h
@@ -0,0 +1,109 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPlotView_H
+#define MvQPlotView_H
+
+#include <QGraphicsView>
+
+class MvKeyProfile;
+
+class MvQAreaSelection;
+class MvQCursorData;
+class MvQLineSelection;
+class MvQMagnifier;
+class MvQZoom;
+class MvQPlaceMark;
+class MvQPlaceMarkItem;
+class MvQPlaceMarkWidget;
+class MvQPointSelection;
+
+class MgQPlotScene;
+class MgQLayoutItem;
+class MgQSceneItem;
+
+#include "Layer.h"
+
+class MvQPlotView : public QGraphicsView
+{
+Q_OBJECT
+
+public:
+	MvQPlotView(QGraphicsScene*,QWidget *parent=0);
+	~MvQPlotView();
+	void resetBegin();
+	void resetEnd();
+	void setMvPlotSize(double,double);
+	void setPlaceMark(MvQPlaceMarkWidget*);
+	void setDataProbe(MvQPlaceMark*);
+	void DrawRectangle(double,double,double,double);
+
+public slots:
+	void slotSetEnableZoom(bool);
+	void slotSetEnableMagnifier(bool);
+	void slotMagnifierChanged();
+	void slotSetEnableCursorData(bool);
+	void slotEnableCursorDataProbe(bool);
+	void slotSetEnableAreaSelection(bool);
+	void slotSetEnableLineSelection(bool);
+	void slotSetEnablePointSelection(bool);
+	void slotCreatePlaceMark();
+	void slotChangeArea(double,double,double,double);
+	void slotClearArea();
+	void slotSelectAllArea();
+	void slotChangeLine(double,double,double,double);
+	void slotClearLine();
+	void slotChangeLineDirection();
+	void slotChangePoint(double,double);
+	void slotClearPoint();
+	void slotFrameProfileChanged(MvKeyProfile*);
+	void slotSelectScene();
+
+signals:
+	void zoomRectangleIsDefined(const string&,const string&);
+	void areaIsDefined(double,double,double,double);
+	void areaIsUndefined();
+	void lineIsDefined(double,double,double,double);
+	void lineIsUndefined();
+	void pointIsDefined(double,double);
+	void pointIsUndefined();
+	void magnifierIsEnabledProgramatically(bool);
+	void zoomIsEnabledProgramatically(bool);
+	void inputSIsEnabledProgramatically(bool);
+	void sceneSelected(QPointF);
+	void contextMenuEventHappened(const QPoint&,const QPointF&); 
+	void resizeEventHappened(const QSize&);
+	void zoomActionStarted(MgQSceneItem*);	
+	void cursorDataChanged(QPointF,QList<ValuesCollector>); 	
+
+protected:
+	void mouseMoveEvent ( QMouseEvent * event );
+	void mousePressEvent ( QMouseEvent * event );
+	void mouseReleaseEvent ( QMouseEvent * event );
+	void contextMenuEvent(QContextMenuEvent *);
+	void resizeEvent(QResizeEvent *);
+
+	MgQPlotScene* plotScene_;
+
+	//Zoom
+	MvQZoom *zoom_;
+	MvQMagnifier *magnifier_;
+	MvQCursorData* cursorData_;
+	MvQPlaceMark* cursorDataProbe_;
+	MvQAreaSelection *area_;
+	MvQLineSelection *line_;
+	MvQPointSelection *point_;
+	MvQPlaceMarkWidget *placeMark_;
+	bool placeMarkIsBeingCreated_;
+	QList<MvQPlaceMarkItem*> pointData_;
+	bool sceneIsBeingSelected_;
+	MvQPlaceMark* dataProbe_;
+};
+
+#endif
diff --git a/src/uPlot/MvQPointSelection.cc b/src/uPlot/MvQPointSelection.cc
new file mode 100644
index 0000000..669c31b
--- /dev/null
+++ b/src/uPlot/MvQPointSelection.cc
@@ -0,0 +1,378 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <math.h>
+
+#include <QDebug>
+#include <QMouseEvent>
+#include <QPainter>
+
+#include "MvQPointSelection.h"
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+#include "MgQLayoutItem.h"
+
+MvQPointSelection::MvQPointSelection(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	MvQPlotItem(scene,view,parent)
+{	
+	pen_=QPen(QColor(0,0,255,230),2);
+	pen_.setCosmetic(true);
+	brush_=QBrush(QColor(0,0,255,180));
+	hoverBrush_=QBrush(QColor(164,219,255,150));
+
+	currentAction_=NoAction;
+	zoomLayout_=0;
+	point_=QPointF();
+	pointDefined_=false;
+
+	//selectionPen_=QPen(QColor(0,0,0),2);
+	//selectionPen_.setCosmetic(true);
+
+	selectorSize_=32.;
+	physicalSelectorSize_=32.;
+	hover_=false;
+}
+
+MvQPointSelection::~MvQPointSelection()
+{
+}
+
+QRectF MvQPointSelection::boundingRect() const
+{
+	checkSelectorSize();	
+	float d=selectorSize_/2.;
+	return QRectF(point_.x()-d,point_.y()-d,d*2.,d*2.);
+}
+
+void MvQPointSelection::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+	if(!pointDefined_)
+	  	return;
+  
+  	checkSelectorSize();
+
+	painter->setRenderHint(QPainter::Antialiasing);	
+
+	QBrush brush;
+		
+	//Hover
+	if(hover_)
+	{
+		brush=hoverBrush_; 	  
+	}
+	else
+	{
+	  	brush=brush_;
+	}	
+	
+	painter->setPen(pen_);
+	painter->setBrush(brush);
+
+	float d=selectorSize_/2.-1.;	
+	float x=point_.x();
+	float y=point_.y();
+		
+	QRectF rIn=QRectF(x-d/4.,y-d/4.,d/2.,d/2.);
+	QRectF rOut=QRectF(x-d,y-d,d*2.,d*2.);
+	
+	painter->drawEllipse(rIn);
+	
+	painter->setBrush(QBrush());
+	painter->drawEllipse(rOut);
+	//painter->drawLine(x-d,y,x+d,y);
+	//painter->drawLine(x,y-d,x,y+d);
+}
+
+void MvQPointSelection::mousePressEventFromView(QMouseEvent *event)
+{
+	checkSelectorSize();
+	
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	hover_=false;
+
+	if(!pointDefined_)
+	{
+		//Get item position
+		QPointF p = mapFromScene(plotView_->mapToScene(event->pos()));
+		
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(p))) == 0) 
+		{
+			currentAction_=NoAction;
+		}
+		else
+		{
+			currentAction_=NoAction;
+		
+			point_=p;
+			pointDefined_=true;
+			setVisible(true);
+			
+			QPointF gp, sp=point_;
+			zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp),gp);
+						
+			zoomLayout_=0;
+			coordPoint_=gp;
+			
+			emit pointIsDefined(gp.y(),gp.x());
+		}
+	}
+
+	else
+	{
+		
+		dragPos_=mapFromScene(plotView_->mapToScene(event->pos()));
+	
+		//Checks if the drag point is		
+		//in the selection rentangle and starts a move action 					
+		if((zoomLayout_=plotScene_->firstProjectorItem()) != 0 &&
+		    checkPointInSelector(dragPos_) == true)
+		{
+			
+		  	currentAction_=MoveAction;
+			QPointF xp=dragPos_-point_;
+
+			qDebug() << "xp" << dragPos_<< xp;
+												
+			currentAction_=MoveAction;
+			setCursor(QCursor(Qt::SizeAllCursor));			
+		}
+		else
+		{
+			currentAction_=NoAction;
+			dragPos_=QPointF();	
+		}
+	}
+}
+
+void MvQPointSelection::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+
+	if(currentAction_ == MoveAction)
+	{	
+		QPointF p = point_ + (pos - dragPos_);				
+		checkPoint(p);
+		point_=p; 
+	
+		prepareGeometryChange();
+
+		dragPos_=pos;
+		update();		
+	}
+	else if(event->buttons() ==  Qt::NoButton)
+	{		
+		bool oriHover=hover_;
+		hover_=false;
+		
+		if(checkPointInSelector(pos))
+		{
+			hover_=true;
+		}	
+
+		if(hover_ != oriHover)
+		{
+			update();
+		}
+	}
+}
+
+ void MvQPointSelection::mouseReleaseEventFromView(QMouseEvent *event)
+ {
+	if(!activated_ || !acceptMouseEvents_)
+		return;
+
+	QPointF pos = mapFromScene(plotView_->mapToScene(event->pos()));
+
+	if(currentAction_ == MoveAction)
+	{
+		QPointF p = point_ + (pos - dragPos_);				
+		checkPoint(p);
+		point_=p; 
+		
+		prepareGeometryChange();
+		
+		QPointF sp=point_;
+		QPointF gp;
+		zoomLayout_->mapFromSceneToGeoCoords(mapToScene(sp),gp);
+		
+		currentAction_=NoAction;
+		zoomLayout_=0;
+		dragPos_=QPointF();
+		coordPoint_ =gp;
+
+		emit pointIsDefined(gp.y(),gp.x());
+
+		update();	
+		unsetCursor();
+	}
+ }
+
+
+void MvQPointSelection::setPoint(double lat,double lon)
+{
+	//double west, double north, double east, double south)
+	
+	double x=lon;
+	double y=lat;
+		
+	QPointF sp;
+
+	if(!pointDefined_)
+	{
+		if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+		{
+			return;
+		}
+	}
+	else
+	{
+		sp=point_;
+		if((zoomLayout_=plotScene_->findProjectorItem(mapToScene(sp))) == 0)
+		{
+			return;
+
+		}
+	}
+
+	
+	QPointF gp(x,y);
+
+	qDebug() << zoomLayout_->containsGeoCoords(gp);
+
+	if(zoomLayout_->containsGeoCoords(gp))
+	{
+		zoomLayout_->mapFromGeoToSceneCoords(gp,sp);	
+		
+		sp=mapFromScene(sp);
+	
+		prepareGeometryChange();
+		point_=sp;
+		coordPoint_=gp;
+		pointDefined_=true;
+		update();
+	}
+	else
+	{
+		pointDefined_=true;
+		QPointF sp=point_;
+
+		sp=mapToScene(sp);
+		
+		QPointF gp;
+		zoomLayout_->mapFromSceneToGeoCoords(sp,gp);
+		
+		emit pointIsDefined(gp.y(),gp.x());
+	}
+}
+	
+void MvQPointSelection::clearPoint()
+{
+	currentAction_=NoAction;
+	prepareGeometryChange();
+	point_=QPointF();
+	pointDefined_=false;
+	coordPoint_=point_;
+	hover_=false;
+	update();
+	emit pointIsUndefined();
+}
+
+
+// It should be called only after zoom!!!
+// If the projection is changed the line should be set "undefined"!!
+
+void MvQPointSelection::reset()
+{
+	if(!pointDefined_)
+		return;
+
+	//We need to find the projectorItem!!
+	QPointF sp;
+
+	if((zoomLayout_=plotScene_->firstProjectorItem()) == 0)
+	{
+		clearPoint();
+		return;
+	}
+
+	
+	QPointF gp=coordPoint_;
+
+	//qDebug() << coordPoint_;
+
+	if(zoomLayout_->containsGeoCoords(gp))
+	{
+		zoomLayout_->mapFromGeoToSceneCoords(gp,sp);	
+		sp=mapFromScene(sp);
+	
+		prepareGeometryChange();
+		point_=sp;
+		coordPoint_=gp;
+		pointDefined_=true;
+		update();
+	}
+	else
+	{
+		clearPoint();
+	}
+}
+
+void MvQPointSelection::setActivated(bool b)
+{
+	activated_=b;
+}
+
+
+bool MvQPointSelection::checkPointInSelector(QPointF &p)
+{
+  	float d=selectorSize_/2.;
+	QRectF r(point_.x()-d,point_.y()-d,d*2.,d*2.);
+		
+	return r.contains(p);
+}
+
+
+void MvQPointSelection::checkPoint(QPointF &p)
+{
+	if(!zoomLayout_)
+	{
+		p=QPointF();
+	}
+
+	//Plot area in scene coordinates
+	QRectF plotRect=mapRectFromScene(zoomLayout_->mapToScene(zoomLayout_->boundingRect()).boundingRect());
+
+	if(p.x() > plotRect.right())
+	{
+		p.setX(plotRect.right());
+	}
+	else if(p.x() < plotRect.left())
+	{
+		p.setX(plotRect.left());
+	}
+	if(p.y() > plotRect.bottom())
+	{
+		p.setY( plotRect.bottom());
+	}
+	else if(p.y() < plotRect.top())
+	{
+		p.setY(plotRect.top());
+	}	
+
+}
+
+void MvQPointSelection::checkSelectorSize() const
+{  
+	selectorSize_=physicalSelectorSize_/parentItem()->scale();	
+}
\ No newline at end of file
diff --git a/src/uPlot/MvQPointSelection.h b/src/uPlot/MvQPointSelection.h
new file mode 100644
index 0000000..49810fa
--- /dev/null
+++ b/src/uPlot/MvQPointSelection.h
@@ -0,0 +1,73 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQPointSelection_H
+#define MvQPointSelection_H
+
+#include <QBrush>
+#include <QGraphicsItem>
+#include <QPen>
+
+#include "MvQPlotItem.h"
+
+class MgQLayoutItem;
+
+using namespace std;
+
+class MvQPointSelection : public MvQPlotItem
+{
+
+Q_OBJECT
+
+public:
+	MvQPointSelection(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQPointSelection();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+
+	void setPoint(double,double);
+	void clearPoint();
+
+	void setActivated(bool); 
+
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+	void reset();
+
+signals:
+	void pointIsDefined(double,double);
+	void pointIsUndefined();
+	
+protected:	
+	enum CurrentAction {NoAction, DefineAction, MoveAction};
+
+	bool checkPointInSelector(QPointF &);
+	void checkPoint(QPointF&);
+	void checkSelectorSize() const;
+
+	QPen		pen_;
+	QBrush  	brush_;
+	QBrush          hoverBrush_;
+	QPointF		point_;
+	bool 		pointDefined_;
+	QPointF		coordPoint_;
+	CurrentAction 	currentAction_;
+	MgQLayoutItem*  zoomLayout_;
+	QPointF 	dragPos_;
+		
+	bool 		hover_;
+	mutable float 	selectorSize_;
+	mutable float 	physicalSelectorSize_;
+	
+};	
+
+
+#endif
diff --git a/src/uPlot/MvQProgressItem.cc b/src/uPlot/MvQProgressItem.cc
new file mode 100644
index 0000000..3ec2ed9
--- /dev/null
+++ b/src/uPlot/MvQProgressItem.cc
@@ -0,0 +1,62 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QFile>
+#include <QPainter>
+
+#include "MvQProgressItem.h"
+
+MvQProgressItem::MvQProgressItem(QGraphicsItem *parent) : QGraphicsItem(parent)
+{
+	font_= new QFont();
+	font_->setPointSize(26);
+	fontMetrics_= new QFontMetrics(*font_);
+
+	//fontPen_=QPen(Qt::white);
+	//fontBrush_=QBrush(Qt::white);
+
+	fontPen_=QPen();
+	fontBrush_=QBrush();
+		
+	bgPen_=QPen(QColor(255,255,255,190));
+	bgBrush_=QBrush(QColor(120,120,120,190)); 
+}
+
+MvQProgressItem::~MvQProgressItem()
+{ 
+}
+
+void MvQProgressItem::setRect(QRectF r)
+{
+	if(rect_ != r)
+	{
+		rect_=r;
+		update();
+	}	
+}
+
+QRectF MvQProgressItem::boundingRect() const
+{
+	return rect_;
+}
+
+void MvQProgressItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{		
+	painter->setPen(bgPen_);
+	painter->setBrush(bgBrush_);
+	painter->setRenderHint(QPainter::Antialiasing,true);
+	painter->drawRect(rect_);
+	
+	
+	//Render text	
+	painter->translate(rect_.width()/2,rect_.height()/2);
+	painter->scale(1.,-1.);		
+	painter->drawText(0,0,QObject::tr("Loading ..."));	
+}
diff --git a/src/uPlot/MvQProgressItem.h b/src/uPlot/MvQProgressItem.h
new file mode 100644
index 0000000..689e28e
--- /dev/null
+++ b/src/uPlot/MvQProgressItem.h
@@ -0,0 +1,40 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQProgressItem_H
+#define MvQProgressItem_H
+
+#include <QGraphicsItem>
+
+using namespace std;
+
+class MvQProgressItem : public QGraphicsItem
+{
+public:
+	MvQProgressItem(QGraphicsItem* parent=0);
+	~MvQProgressItem();
+	
+	void setRect(QRectF);
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+	
+protected:	
+	QRectF		 rect_;
+	QFont*           font_;
+	QFontMetrics*    fontMetrics_;
+	
+
+	QPen	fontPen_;
+	QBrush  fontBrush_;
+	QPen    bgPen_;
+	QBrush  bgBrush_;	
+};
+
+#endif
+
diff --git a/src/uPlot/MvQPushButton.h b/src/uPlot/MvQPushButton.h
new file mode 100644
index 0000000..0002798
--- /dev/null
+++ b/src/uPlot/MvQPushButton.h
@@ -0,0 +1,39 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QPushButton>
+#include <QStyleOptionButton>
+
+class MvQPushButton : public QPushButton
+{
+public:
+    MvQPushButton(QWidget* parent = 0);
+    MvQPushButton(const QString& text, QWidget* parent = 0);
+    MvQPushButton(const QIcon& icon, const QString& text, QWidget* parent = 0);
+    ~MvQPushButton();
+    
+    Qt::Orientation orientation() const;
+    void setOrientation(Qt::Orientation orientation);
+    
+    bool mirrored() const;
+    void setMirrored(bool mirrored);
+    
+    QSize sizeHint() const;
+    QSize minimumSizeHint() const;
+    
+protected:
+    void paintEvent(QPaintEvent* event);
+    
+private:
+    QStyleOptionButton getStyleOption() const;
+    void init();
+    
+    Qt::Orientation orientation_;
+    bool mirrored_;
+};
diff --git a/src/uPlot/MvQStepModel.cc b/src/uPlot/MvQStepModel.cc
new file mode 100644
index 0000000..b9aa89a
--- /dev/null
+++ b/src/uPlot/MvQStepModel.cc
@@ -0,0 +1,104 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QColor>
+#include <QBrush>
+#include <QDebug>
+#include <QLinearGradient>
+#include <QPainter>
+
+#include "MvKeyProfile.h"
+
+#include "MvQStepModel.h"
+#include "MgQPlotScene.h"
+#include "MgQSceneItem.h"
+
+
+MvQStepDelegate::MvQStepDelegate(QWidget *parent) : QStyledItemDelegate(parent)
+{
+}
+
+void MvQStepDelegate::paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const
+{
+	QStyledItemDelegate::paint(painter,option,index);
+	QRect rect = option.rect;
+	QLine line(rect.x(),rect.y(),rect.x()+rect.width(),rect.y());
+
+	painter->setPen(QPen("#BBBBBB"));
+	painter->drawLine(line); 
+}
+
+
+MvQStepModel::MvQStepModel()
+{
+	stepData_=0;
+}
+
+void MvQStepModel::stepDataIsAboutToChange()
+{
+	beginResetModel();
+}
+
+void MvQStepModel::setStepData(MgQSceneItem *data)
+{
+	stepData_=data;
+	endResetModel();
+}
+
+QVariant MvQStepModel::data( const QModelIndex& index, int role ) const
+{
+ 	if ( !index.isValid())
+	{
+		return QVariant();
+	}
+	else if(role == Qt::UserRole )
+	{
+		if(messageFilterStatus_[index.row()] == true)
+			return QString("1");
+		else
+			return QString("0");	
+	
+	}
+	else if(role == Qt::BackgroundRole)
+	{
+	 	if(stepData_->stepCached(index.row()))
+		{
+			if(index.row() % 2 == 0)
+				//return QBrush(QColor(70,180,40));
+				//return QBrush(QColor(92,206,113)); 
+				return QColor("#FFE6BF");
+			else
+				//return QBrush(QColor(187,238,202));
+				return QColor("#FFF2DE");
+		}	
+		else
+		{
+			return QBrush(Qt::white); 
+		}
+	}
+	else if(role == Qt::TextAlignmentRole)
+	{
+		if(profile_->at(index.column())->name() == "MV_Value")
+			return Qt::AlignRight;
+    		else
+			return QVariant();
+	}
+	else if(role != Qt::DisplayRole )
+        {	
+		return QVariant();
+	}
+
+	//vector<magics::MagicsAnimationStepData> animation_;	
+
+   	//QObject* obj = children(_widget)[index.row()];
+ 
+	//return QString("1");
+	return label(index.row(),index.column());
+}
diff --git a/src/uPlot/MvQStepModel.h b/src/uPlot/MvQStepModel.h
new file mode 100644
index 0000000..db40f3d
--- /dev/null
+++ b/src/uPlot/MvQStepModel.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQStepModel_H
+#define MvQStepModel_H
+
+#include <QAbstractItemModel>
+#include <QSortFilterProxyModel>
+#include <QStyledItemDelegate>
+
+#include "MvQKeyProfileModel.h"
+
+class MgQPlotScene;
+class MgQSceneItem;
+
+
+class MvQStepDelegate : public QStyledItemDelegate
+{
+public:
+
+	MvQStepDelegate(QWidget* parent=0);
+	void paint(QPainter *painter,const QStyleOptionViewItem &option,
+		           const QModelIndex& index) const;
+
+};
+
+
+class MvQStepModel : public MvQKeyProfileModel
+{
+	Q_OBJECT
+public:   
+  	MvQStepModel();
+ 
+   	QVariant data (const QModelIndex& , int role = Qt::DisplayRole ) const;
+   	
+
+	MgQSceneItem* stepData() {return stepData_;}
+	void stepDataIsAboutToChange();
+	void setStepData(MgQSceneItem*);
+
+signals:
+	void stepCacheStateChanged();
+	
+protected:
+    	//QString label( const int,const int) const;
+
+private:
+    	MgQSceneItem* stepData_;
+};
+
+
+#endif 
+
diff --git a/src/uPlot/MvQStepWidget.cc b/src/uPlot/MvQStepWidget.cc
new file mode 100644
index 0000000..12a3b6f
--- /dev/null
+++ b/src/uPlot/MvQStepWidget.cc
@@ -0,0 +1,734 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QAction>
+#include <QComboBox>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QInputDialog>
+#include <QLabel>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QSortFilterProxyModel>
+#include <QToolButton>
+#include <QVBoxLayout>
+
+#include "MvKeyProfile.h"
+
+#include "MvQKeyDialog.h"
+#include "MvQKeyProfileTree.h"
+#include "MvQKeyManager.h"
+#include "MvQStepModel.h"
+#include "MvQStepWidget.h"
+#include "MvQTreeView.h"
+
+#include "MgQPlotScene.h"
+#include "MgQSceneItem.h"
+#include "MgQStepMetaData.h"
+
+class MgQPlotScene;
+
+MvQStepWidget::MvQStepWidget(QWidget *parent) : QWidget(parent)
+{
+	activeScene_=0;
+	
+	QVBoxLayout *layout = new QVBoxLayout;
+	setLayout(layout);
+
+	//Combo box
+	//We will add items + signal/slots later in "init"!
+	/*QHBoxLayout *hb=new  QHBoxLayout;
+
+	QPushButton *pbEdit=new QPushButton(tr("Edit"));
+	hb->addWidget(pbEdit);
+	hb->addStretch(2);
+
+	connect(pbEdit,SIGNAL(clicked()),
+		this,SLOT(slotManageKeyProfiles()));
+	
+f
+	//Combo box for key profile selection
+	QLabel *keyLabel = new QLabel(tr("Key profile:"));
+	keyCombo_ = new QComboBox;
+	keyLabel->setBuddy(keyCombo_);
+
+	hb->addWidget(keyLabel);
+	hb->addWidget(keyCombo_);
+	
+	layout->addLayout(hb);	*/
+	
+	//Create model
+	model_= new MvQStepModel;
+	
+
+	sortModel_= new MvQKeyProfileSortFilterModel; //QSortFilterProxyModel;
+        sortModel_->setSourceModel(model_);
+	sortModel_->setDynamicSortFilter(true);
+	//sortModel_->setFilterRole(Qt::UserRole);
+	//messageSortModel_->setFilterRegExp(QRegExp("[1]"));
+	//sortModel_->setFilterFixedString("1");
+	//sortModel_->setFilterKeyColumn(0);
+	
+	//Create view	
+	view_ = new MvQKeyProfileTree(model_,sortModel_);
+	//We do not want to use the styel here so it is et to -1
+	view_->setProperty("mvStyle",-1);
+
+	connect(view_,SIGNAL(profileChanged(bool)),
+		this,SLOT(slotProfileChanged(bool)));	
+
+	/*view_ = new MvQTreeView;
+	view_->setItemDelegate(new MvQStepDelegate());
+	
+	view_->setObjectName("stepTree");
+	//view_->setProperty("mvStyle",0);
+	view_->setSortingEnabled(true); 
+	view_->sortByColumn (0,Qt::AscendingOrder); 
+	//view->setAlternatingRowColors(true);
+        view_->setAllColumnsShowFocus(true);
+	view_->setModel(sortModel_);	
+	//messageTree_->header()->setContextMenuPolicy(Qt::CustomContextMenu);
+	view_->setActvatedByKeyNavigation(true);
+	view_->setAcceptDrops(true);
+	view_->setDragDropMode(QAbstractItemView::DropOnly);
+	view_->setRootIsDecorated(false);*/
+
+	/*view_->setDragEnabled(true);
+ 	view_->setAcceptDrops(true);
+ 	view_->setDropIndicatorShown(true);
+	view_->setDragDropMode(QAbstractItemView::DragDrop);*/
+
+	layout->addWidget(view_);
+
+	//Buttons at the bottom
+	
+	QHBoxLayout *hb=new  QHBoxLayout;
+
+	actionSave_ = new QAction(this);
+        actionSave_->setObjectName(QString::fromUtf8("actionProfileSave"));
+	actionSave_->setText(tr("&Save profile"));
+	actionSave_->setToolTip(tr("Save key profile"));
+	QIcon icon;
+	icon.addPixmap(QPixmap(QString::fromUtf8(":/keyDialog/profile_save.svg")), QIcon::Normal, QIcon::Off);
+ 	actionSave_->setIcon(icon);
+	actionSave_->setEnabled(false);
+
+	/*QToolButton *tbNew=new QToolButton(this);
+	tbNew->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_new.svg"))));
+	hb->addWidget(tbNew);*/
+
+	QToolButton *tbSave=new QToolButton(this);
+	//tbSave->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_save.svg"))));
+	//tbSave->setToolTip(tr("Save key profile"));
+	tbSave->setDefaultAction(actionSave_);
+	hb->addWidget(tbSave);
+
+	//QToolButton *tbSaveAs=new QToolButton(this);
+	//tbSaveAs->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_saveas.svg"))));
+	//hb->addWidget(tbSaveAs);
+
+	QToolButton *tbEdit=new QToolButton(this);
+	tbEdit->setIcon(QIcon(QPixmap(QString::fromUtf8(":/keyDialog/profile_manage.svg"))));
+	tbEdit->setToolTip(tr("Manage key profiles"));
+	hb->addWidget(tbEdit);
+	hb->addStretch(2);
+
+	//connect(actionNew, SIGNAL(triggered()), 
+	//	this, SLOT(slotCreateNewProfile()));
+
+	connect(actionSave_, SIGNAL(triggered()), 
+		this, SLOT(slotSaveCurrentProfile()));
+
+	//connect(tbSaveAs, SIGNAL(clicked()), 
+	//	this, SLOT(slotSaveAsCurrentProfile()));
+
+	connect(tbEdit,SIGNAL(clicked()),
+		this,SLOT(slotManageKeyProfiles()));
+
+	
+	//Combo box
+	//We will add items + signal/slots later in "init"!
+	QLabel *keyLabel = new QLabel(tr("Key profile:"));
+	keyCombo_ = new QComboBox;
+	keyLabel->setBuddy(keyCombo_);
+
+	hb->addWidget(keyLabel);
+	hb->addWidget(keyCombo_);
+	
+	layout->addLayout(hb);	
+
+	keyManager_ = new MvQKeyManager(MvQKeyManager::FrameType);
+	keyManager_->loadProfiles();
+
+	tmpProfile_=0;
+}
+
+
+MvQStepWidget::~MvQStepWidget()
+{
+	keyManager_->saveProfiles();
+}
+
+void MvQStepWidget::init(MgQPlotScene *scene,QString keyProfileName)
+{
+	scene_=scene;
+
+	model_->setStepData(scene_->currentSceneItem()); //Just to have something!!!
+	
+	//----------------------------------
+	// Initilaize the key profile list
+	//---------------------------------
+	
+	//disconnect(keyCombo_,SIGNAL(currentIndexChanged(int)),this,SLOT(loadKeyProfile(int)));
+
+   	int currentProfileIndex=0;
+	for (unsigned int i=0; i < keyManager_->data().size();i++) 
+	{
+		QString str(keyManager_->data().at(i)->name().c_str());
+		keyCombo_->addItem(str);
+		if(keyProfileName==str)
+		{
+			currentProfileIndex=i;
+		}
+		if(keyManager_->data().at(i)->systemProfile())
+		{
+			keyCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+	}
+
+	keyCombo_->setCurrentIndex(-1);
+	
+	connect(keyCombo_, SIGNAL(currentIndexChanged(int)),  
+		this,SLOT(slotLoadKeyProfile(int)));
+
+	//Select the first element	
+	keyCombo_->setCurrentIndex(currentProfileIndex);
+
+	//Get all keys
+	vector<MvKeyProfile*> allKeyProf;
+	keyManager_->loadAllKeys(allKeyProf);
+	for(vector<MvKeyProfile*>::iterator it=allKeyProf.begin(); it != allKeyProf.end(); it++)
+	{
+		allKeys_ << *it;
+	}
+}
+
+void MvQStepWidget::init(QString keyProfileName)
+{
+	//----------------------------------
+	// Initilaize the key profile list
+	//---------------------------------
+	
+	//disconnect(keyCombo_,SIGNAL(currentIndexChanged(int)),this,SLOT(loadKeyProfile(int)));
+
+   	int currentProfileIndex=0;
+	for (unsigned int i=0; i < keyManager_->data().size();i++) 
+	{
+		QString str(keyManager_->data().at(i)->name().c_str());
+		keyCombo_->addItem(str);
+		if(keyProfileName==str)
+		{
+			currentProfileIndex=i;
+		}
+		if(keyManager_->data().at(i)->systemProfile())
+		{
+			keyCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+		}
+	}
+
+	keyCombo_->setCurrentIndex(-1);
+	
+	connect(keyCombo_, SIGNAL(currentIndexChanged(int)),  
+		this,SLOT(slotLoadKeyProfile(int)));
+
+	//Select the first element	
+	keyCombo_->setCurrentIndex(currentProfileIndex);
+
+	//Get all keys
+	vector<MvKeyProfile*> allKeyProf;
+	keyManager_->loadAllKeys(allKeyProf);
+	for(vector<MvKeyProfile*>::iterator it=allKeyProf.begin(); it != allKeyProf.end(); it++)
+	{
+		allKeys_ << *it;
+	}
+}
+
+QString MvQStepWidget::currentKeyProfile()
+{
+	return keyCombo_->currentText();
+}
+
+void MvQStepWidget::setCurrentKeyProfile(QString keyProfileName)
+{
+	if(keyCombo_->count() == 0)
+		return;
+
+	for(int i=0; i < keyCombo_->count(); i++)
+	{
+		if(keyCombo_->itemText(i) == keyProfileName)
+		{
+			keyCombo_->setCurrentIndex(i);
+			return;
+		}
+	}
+}
+
+
+void MvQStepWidget::reset()
+{
+	//Get the current profile from the model 
+	//MvKeyProfile* prof = model_->keyProfile();
+
+	model_->setStepData(scene_->currentSceneItem()); 
+
+	if(tmpProfile_)
+		loadKeyProfile(tmpProfile_);
+}
+
+void MvQStepWidget::reset(MgQSceneItem* sceneItem)
+{
+	//Get the current profile from the model 
+	//MvKeyProfile* prof = model_->keyProfile();
+	
+	activeScene_=sceneItem;	
+	model_->setStepData(activeScene_); 
+
+	if(tmpProfile_)
+		loadKeyProfile(tmpProfile_);
+}
+
+void MvQStepWidget::reset(MvKeyProfile* prof)
+{
+	if(!prof)
+		return;
+
+	QStringList keys;
+	QList<QPointF> posL;
+	QList<int> posIndex;
+
+	for(int i=0; i < static_cast<int>(prof->size()); i++)
+	{
+		QString s=QString::fromStdString(prof->at(i)->name());
+
+		if(s.startsWith("MV_Value"))
+		{
+			float x=QString::fromStdString(prof->at(i)->metaData("x_coord")).toFloat();	
+			float y=QString::fromStdString(prof->at(i)->metaData("y_coord")).toFloat();
+			posL << QPointF(x,y);
+			posIndex << i;
+			keys << "MV_Value";
+		}
+		else
+		{			
+			keys << s;
+		}
+ 	}
+
+	//The model should be notified!!!!
+	prof->clearKeyData();
+
+	//Get metadata
+	MgQStepMetaData *metaData=new MgQStepMetaData(keys);
+
+	if(activeScene_)
+		activeScene_->stepMetaData(metaData);
+	
+	for(int i=0; i< keys.count(); i++)
+	{
+		MvKey* kd=prof->at(i);
+		int step=1;
+		foreach(QString str,metaData->stepData(i))
+		{
+			if(str.endsWith('\n'))
+			{
+				str.remove(str.size()-1,1);
+			}
+			if(keys[i] == "MV_Frame")
+			{
+				str=QString::number(step);
+			}
+			else if(keys[i] == "MV_Index")
+			{
+				str=QString();
+			}
+			else if(keys[i] == "MV_Value")
+			{
+				str=QString();
+			}
+	
+			kd->addValue(str.toStdString());
+
+			step++;
+		}
+	}
+
+	delete metaData;
+
+#ifdef METVIEW_EXPERIMENTAL
+
+#if 0
+	if(scene_->stepNum() <= 0)
+		return;
+	//Get layerdata -> data values for given positions
+	QMap<int,QList<QStringList> > layerData;
+	for(int i=0; i < scene_->stepNum(); i++)
+	{
+		foreach(QPointF pp,posL)
+		{
+			layerData[i] << QStringList();
+		}
+	}
+
+	scene_->collectLayerData(posL,layerData,false);
+	
+	for(int i=0; i< posIndex.count(); i++)
+	{
+		MvKey* kd=prof->at(posIndex[i]);	
+
+		for(int step=0; step < scene_->stepNum(); step++)
+		{
+			QString t;
+			foreach(QString str,layerData[step][i])
+			{
+				if(str.endsWith('\n'))
+				{
+					str.remove(str.size()-1,1);
+				}
+				t+=str + '\n';			
+			}
+			if(t.endsWith('\n'))
+				t.remove(t.size()-1,1);
+
+			kd->setValue(step,t.toStdString());
+		}
+	}
+	
+#endif
+
+#endif
+
+}
+
+
+
+void MvQStepWidget::slotLoadKeyProfile(int index)
+{
+	//qDebug() << "loadKeyProfile " << index  << " " << keyManager_->data().size();
+
+	saveProfileBeforeAction(false);
+
+	if(index != -1 && keyManager_->isEmpty() == false) 
+	{
+		loadKeyProfile(keyManager_->data().at(index));
+		//emit keyProfileLoaded(keyManager_->at(index));	
+	}
+}
+
+void MvQStepWidget::loadKeyProfile(MvKeyProfile *prof)
+{	
+	if(!prof)
+		return;
+
+	//Get the current profile from the model (this will be the previous)
+	//MvKeyProfile* prevProfile = model_->keyProfile();
+
+	model_->keyProfileIsAboutToChange();
+
+	//Create a tmp profile with contents of the current profile
+	if(prof != tmpProfile_)
+	{
+		if(tmpProfile_)
+		{
+			delete tmpProfile_;
+		}
+
+		tmpProfile_= new MvKeyProfile(*prof);
+	}
+	else
+	{
+		tmpProfile_->clearKeyData();
+	}
+	
+	//Update grib metadata with the new key profile
+	reset(tmpProfile_);
+
+	//---------------------
+	// Update message tree
+	//---------------------
+	
+	model_->setKeyProfile(tmpProfile_);
+
+	for(int i=0;i < model_->columnCount()-1; i++)
+	{ 
+		view_->resizeColumnToContents(i);
+	}
+
+	view_->setCurrentIndex(sortModel_->index(0,0));
+
+	if(prof->systemProfile())
+	{
+		view_->setEditable(false);
+	}
+	else
+	{
+		view_->setEditable(true);
+	}
+
+	emit keyProfileChanged(tmpProfile_);
+}
+
+
+void MvQStepWidget::slotProfileChanged(bool reload)
+{
+	actionSave_->setEnabled(true);
+	if(reload)
+	{
+		loadKeyProfile(tmpProfile_);
+	}
+	else
+	{
+		emit keyProfileChanged(tmpProfile_); 
+	}
+
+	//keyManager_->saveProfiles();
+}
+
+void MvQStepWidget::slotSaveCurrentProfile()
+{
+	if(!tmpProfile_)
+		return;
+
+	keyManager_->changeProfile(tmpProfile_->name(),tmpProfile_);
+	actionSave_->setEnabled(false);
+}
+
+void MvQStepWidget::slotSaveAsCurrentProfile()
+{
+	if(!tmpProfile_)
+		return;
+
+	bool ok;
+     	QString text = QInputDialog::getText(0, tr("Duplicate profile"),
+                                          tr("New profile name:"), QLineEdit::Normal,
+                                          "", &ok);
+	if(ok && !text.isEmpty())
+        { 	
+		keyManager_->addProfile(text.toStdString(),tmpProfile_);
+		keyCombo_->addItem(text);
+		actionSave_->setEnabled(false);
+	}
+}
+
+int MvQStepWidget::stepNum()
+{
+	if(!activeScene_)
+	  	return -1;
+	
+	return activeScene_->stepNum();
+}  
+
+void MvQStepWidget::updateStepForScenes(const QList<MgQSceneItem*>& scenesToStep)
+{
+	if(!activeScene_)
+	  	return;
+	
+	int step=activeScene_->currentStep();
+	
+	foreach(MgQSceneItem* item,scenesToStep)
+	{
+	  	if(item != activeScene_ && item->stepNum() >0)
+		{
+			int current=step;
+			if(current > item->stepNum()-1)
+				current=current % item->stepNum();
+			
+			//We just load it and do not render it into the pixmap cache!!!
+			item->setCurrentStep(current,false); 	
+		}
+	}	  
+}  
+
+int MvQStepWidget::setCurrentStep(int sortedStep,const QList<MgQSceneItem*>& scenesToStep)
+{
+	if(!activeScene_ || sortedStep <0 || sortedStep >= activeScene_->stepNum())
+	{
+	  	return -1;
+	}
+	
+	//Get the original (unsorted) model index for the step num
+	QModelIndex index=sortModel_->mapToSource(sortModel_->index(sortedStep,0)); 
+	
+	int step=index.row();
+		
+	bool oriCacheState=activeScene_->stepCached(step);
+	activeScene_->setCurrentStep(step);
+	if(oriCacheState != activeScene_->stepCached(step))
+	{
+		emit stepCacheStateChanged();
+	}
+		  
+	foreach(MgQSceneItem* item,scenesToStep)
+	{
+	  	if(item != activeScene_ && item->stepNum() >0)
+		{
+			int current=step;
+			if(current > item->stepNum()-1)
+				current=current % item->stepNum();
+					  
+			item->setCurrentStep(current); 	
+		}
+	}	
+	
+	return sortedStep; //!!!!
+}
+
+int MvQStepWidget::currentStep() 
+{
+	if(!activeScene_)
+	  	return -1;
+	
+	int currentStep=activeScene_->currentStep();
+  	QModelIndex index=sortModel_->mapFromSource(model_->index(currentStep,0)); 
+	int sortedStep=index.row();
+	return sortedStep;
+}
+
+void MvQStepWidget::setViewToCurrentStep()
+{	
+	if(!activeScene_)
+	  	return;
+	
+	int currentStep=activeScene_->currentStep();
+	
+	QModelIndex src=model_->index(currentStep,0);
+	QModelIndex index=sortModel_->mapFromSource(model_->index(currentStep,0)); 
+	QModelIndex current=view_->currentIndex();
+
+	//qDebug() << model_->currentStep() << src << index;
+	if(index.row() != current.row())
+	{  
+	 	view_->setCurrentIndex(index);
+
+	}
+}	
+
+void MvQStepWidget::stepDataIsAboutToChange()
+{
+	model_->stepDataIsAboutToChange();
+}
+
+//==============================
+// Key manager
+//==============================
+
+void MvQStepWidget::slotManageKeyProfiles()
+{	
+	if(saveProfileBeforeAction(false) == false)
+		return;
+	
+
+	//Create a tmp copy of the whole manager (no data
+	//values, just key descriptions)
+	MvQKeyManager *tmpManager=keyManager_->clone();
+
+	MvQKeyDialog profDialog(tr("Metview - Frame Key Profile Manager"),MvQKeyManager::FrameType,tmpManager,keyCombo_->currentIndex(),allKeys_);
+
+	if(profDialog.exec()  == QDialog::Accepted)
+	{
+		//Save the current profile name
+		string currentProfName=keyCombo_->currentText().toStdString(); 
+		
+		model_->keyProfileIsAboutToChange();
+		model_->setKeyProfile(0);
+
+		keyManager_->update(tmpManager);
+		keyManager_->saveProfiles();
+
+		disconnect(keyCombo_, SIGNAL(currentIndexChanged(int)),0,0);
+
+		//Clear the profile list
+		keyCombo_->clear();
+
+		//resetMessageHeader();
+
+		int i=0;
+		int index=-1;
+		for (vector<MvKeyProfile*>::const_iterator it=keyManager_->data().begin(); it != keyManager_->data().end(); it++) 
+		{
+			keyCombo_->addItem(QString((*it)->name().c_str() ));
+			if((*it)->name()== currentProfName)
+			{
+				index=i;
+			}
+			if((*it)->systemProfile())
+			{
+				keyCombo_->setItemIcon(i,QPixmap(QString::fromUtf8(":/window/metview_logo")));
+			}
+			i++;
+		}
+
+		keyCombo_->setCurrentIndex(-1);
+
+		connect(keyCombo_, SIGNAL(currentIndexChanged(int)),  
+			this,SLOT(slotLoadKeyProfile(int)));
+
+		if(index != -1)
+		{
+			keyCombo_->setCurrentIndex(index);
+		}
+		else
+		{
+			keyCombo_->setCurrentIndex(0);
+		}
+	}
+
+	delete tmpManager;
+}
+
+
+bool MvQStepWidget::saveProfileBeforeAction(bool offerCancel)
+{
+	if(actionSave_->isEnabled() == false)
+		return true;
+	
+	QString str=tr("The current key profile as been modified.<br>Do you want to save your changes or discard them?");
+
+ 	QMessageBox msgBox;
+	msgBox.setWindowTitle(tr("Save changes to current profile"));
+	msgBox.setText(str);
+	msgBox.setIcon(QMessageBox::Warning);
+ 	if(offerCancel)
+	{
+ 		msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+	}
+	else
+	{
+		msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard);
+	}
+
+	msgBox.setDefaultButton(QMessageBox::Save);
+	int ret=msgBox.exec();
+
+	switch (ret) 
+	{
+   	case QMessageBox::Save:
+		slotSaveCurrentProfile();				
+     		break;
+   	case QMessageBox::Cancel:
+		return false;	
+       		break;
+   	default:
+      	 	break;
+	}
+
+	actionSave_->setEnabled(false);
+
+	return true;
+}
+
diff --git a/src/uPlot/MvQStepWidget.h b/src/uPlot/MvQStepWidget.h
new file mode 100644
index 0000000..5f60923
--- /dev/null
+++ b/src/uPlot/MvQStepWidget.h
@@ -0,0 +1,83 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQStepWidget_H
+#define MvQStepWidget_H
+
+#include <QWidget>
+
+class QComboBox;
+
+class MvKeyProfile;
+
+class MvQKeyProfileSortFilterModel;
+class MvQKeyProfileTree;
+class MvQKeyManager;
+class MvQStepModel;
+class MvQTreeView;
+class MgQPlotScene;
+class MgQSceneItem;
+
+class MvQStepWidget : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MvQStepWidget(QWidget *parent=0);
+	~MvQStepWidget();
+	
+	MvQKeyProfileTree* view() {return view_;}
+	void init(MgQPlotScene *,QString);
+	void init(QString);
+	void reset();
+	void reset(MgQSceneItem*);
+	void updateStepForScenes(const QList<MgQSceneItem*>&);
+	int setCurrentStep(int,const QList<MgQSceneItem*>&);
+	int currentStep();
+	int stepNum();
+	void setViewToCurrentStep();
+	void stepDataIsAboutToChange();
+	QString currentKeyProfile();
+	void setCurrentKeyProfile(QString);
+
+public slots:
+	void slotLoadKeyProfile(int);
+	void slotProfileChanged(bool);
+	//void slotCreateNewProfile();
+	void slotSaveCurrentProfile();
+	void slotSaveAsCurrentProfile();
+	void slotManageKeyProfiles();
+
+signals:
+	void keyProfileChanged(MvKeyProfile*);
+	void stepCacheStateChanged();
+
+protected:	
+	void reset(MvKeyProfile*);
+	void loadKeyProfile(MvKeyProfile *);
+	bool saveProfileBeforeAction(bool);
+
+	MvQKeyProfileTree *view_;
+	MvQStepModel *model_; 
+	MvQKeyProfileSortFilterModel *sortModel_;
+	QComboBox *keyCombo_;
+
+	MgQPlotScene *scene_;
+	MvQKeyManager *keyManager_;
+	MvKeyProfile* tmpProfile_;
+
+	QAction *actionSave_;
+
+	QList<MvKeyProfile*> allKeys_;
+	
+	MgQSceneItem* activeScene_;
+};
+
+#endif
+
diff --git a/src/uPlot/MvQZoom.cc b/src/uPlot/MvQZoom.cc
new file mode 100644
index 0000000..b2f8aa8
--- /dev/null
+++ b/src/uPlot/MvQZoom.cc
@@ -0,0 +1,157 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QDebug>
+#include <QMouseEvent>
+#include <QPainter>
+
+#include "MvQZoom.h"
+#include "MvQPlotView.h"
+#include "MgQPlotScene.h"
+#include "MgQLayoutItem.h"
+#include "MgQSceneItem.h"
+
+MvQZoom::MvQZoom(MgQPlotScene *scene,MvQPlotView *view,QGraphicsItem *parent) : 
+	MvQPlotItem(scene,view,parent)
+{	
+	pen_=QPen(QColor(110,110,110),2);
+	brush_=QBrush(QColor(230,230,230,180));
+	currentAction_=NoAction;
+	zoomLayout_=0;
+	zoomWasPerformedAfterMouseRelease_=false;
+}
+
+MvQZoom::~MvQZoom()
+{
+}
+
+QRectF MvQZoom::boundingRect() const
+{
+	//return zoomRect_.adjusted(-2,-2,2,-2);
+	return zoomRect_;
+}
+
+void MvQZoom::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+	qDebug() << "zoom" << zoomRect_;
+
+	painter->setPen(QPen());
+	painter->setBrush(brush_);
+	painter->drawRect(zoomRect_);
+
+	painter->setPen(pen_);
+	painter->setBrush(QBrush());
+	painter->drawRect(zoomRect_);
+}
+
+void MvQZoom::mousePressEventFromView(QMouseEvent *event)
+{
+	if(activated_ && acceptMouseEvents_ &&
+           event->buttons() & Qt::LeftButton)
+	{		
+     		//Get scene position
+		zoomRectOrigin_ = plotView_->mapToScene(event->pos());
+		
+		MgQSceneItem *sceneItem=0;
+		
+		if(plotScene_->identifyPos(zoomRectOrigin_,&sceneItem,&zoomLayout_))
+		{
+			currentAction_=ZoomAction;
+		
+			//Set geometry
+			zoomRect_.setRect(zoomRectOrigin_.x(),zoomRectOrigin_.y(),0,0);	
+		
+			setVisible(true);
+			
+			emit mousePressInSceneItem(sceneItem);
+		}
+		else
+		{
+		  	currentAction_=NoAction;
+		}
+	}
+}	
+
+void MvQZoom::mouseMoveEventFromView(QMouseEvent *event)
+{
+	if(activated_ && acceptMouseEvents_ &&
+	   currentAction_ == ZoomAction)
+	{	
+		QPointF pos = plotView_->mapToScene(event->pos());
+		QPointF dp = pos - zoomRectOrigin_;
+
+		if(dp.x() <= 0. || dp.y() >= 0.)
+			return;
+
+		if(!zoomLayout_->contains(zoomLayout_->mapFromScene(pos)))
+			return;
+
+		prepareGeometryChange();
+		//zoomRect_=QRectF(zoomRectOrigin_, pos);
+		zoomRect_=QRectF(zoomRectOrigin_.x(),pos.y(),dp.x(),-dp.y());
+
+		qDebug() << "zoom update" << isVisible() << boundingRect();
+
+		update();
+	}
+}
+
+ void MvQZoom::mouseReleaseEventFromView(QMouseEvent *event)
+ {
+	if(activated_ && acceptMouseEvents_  &&
+	   currentAction_ == ZoomAction)
+	{	
+		QPointF pos= plotView_->mapToScene(event->pos());
+		QPointF dp = pos - zoomRectOrigin_;
+
+		//Rubberband rect in scene coordinates
+		//QRectF rect(zoomRectOrigin_,pos);	
+		QRectF rect(zoomRectOrigin_.x(),pos.y(),dp.x(),-dp.y());	
+
+		if(dp.x() <= 0. || dp.y() >= 0. || fabs(rect.width()) <= 8. || fabs(rect.height()) <=8.)
+		{
+			setVisible(false);
+			
+			//plotScene_->removeItem(rubberBand_);
+
+			//Reset zoom data
+			currentAction_=NoAction;
+			zoomWasPerformedAfterMouseRelease_=false;
+			zoomLayout_=0;
+		}
+		else
+		{
+			//Get geo coordinates of rect corners
+			QPointF gp1,gp2;//Get geo coordinates of rect corners
+			QPointF sp1=zoomRect_.topLeft();
+			QPointF sp2=zoomRect_.bottomRight();
+			//zoomLayout_->mapFromSceneToGeoCoords(sp1,gp1);
+			//zoomLayout_->mapFromSceneToGeoCoords(sp2,gp2);
+
+			string trDef = zoomLayout_->mapFromSceneToTransformationDefinition(sp1, sp2);
+
+			QString layoutId(zoomLayout_->layout().id().c_str());
+			setVisible(false);			
+
+			//Reset zoom data
+			currentAction_=NoAction;
+			zoomWasPerformedAfterMouseRelease_=true;
+			zoomLayout_=0;
+
+			qDebug() << "zoom def:" << QString(trDef.c_str());
+			
+			//Perform the zoom
+			emit zoomRectangleIsDefined(layoutId.toStdString(),trDef);
+		}
+	}
+	else
+	{
+		zoomWasPerformedAfterMouseRelease_=false;
+ 	}
+}
diff --git a/src/uPlot/MvQZoom.h b/src/uPlot/MvQZoom.h
new file mode 100644
index 0000000..12eea4d
--- /dev/null
+++ b/src/uPlot/MvQZoom.h
@@ -0,0 +1,64 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQZoom_H
+#define MvQZoom_H
+
+#include <QBrush>
+#include <QGraphicsItem>
+#include <QPen>
+
+#include "MvQPlotItem.h"
+
+class MgQLayoutItem;
+class MgQSceneItem;
+
+using namespace std;
+
+class MvQZoom : public MvQPlotItem
+{
+
+Q_OBJECT
+
+public:
+	enum CurrentAction {NoAction, ZoomAction};
+
+	MvQZoom(MgQPlotScene*,MvQPlotView*,QGraphicsItem *parent=0);
+	~MvQZoom();
+
+	void paint(QPainter *, const QStyleOptionGraphicsItem*, QWidget*);
+	QRectF boundingRect() const;
+
+	void mousePressEventFromView(QMouseEvent*);
+	void mouseMoveEventFromView(QMouseEvent*);	
+	void mouseReleaseEventFromView(QMouseEvent*);
+	
+	CurrentAction currentAction() {return currentAction_;} 
+	bool zoomWasPerformedAfterMouseRelease() {return zoomWasPerformedAfterMouseRelease_;}
+
+signals:
+	void zoomRectangleIsDefined(const string&,const string&);
+	void zoomRectangleIsDefined(QString,double,double,double,double);
+	void mousePressInSceneItem(MgQSceneItem*);
+
+private:	
+
+	QPen	pen_;
+	QBrush  brush_;
+	QRectF	zoomRect_;
+	QPointF zoomRectOrigin_;
+	CurrentAction currentAction_;
+	MgQLayoutItem*     zoomLayout_;
+	bool zoomWasPerformedAfterMouseRelease_;
+	
+	
+};
+
+
+#endif
diff --git a/src/uPlot/MvQZoomStackWidget.cc b/src/uPlot/MvQZoomStackWidget.cc
new file mode 100644
index 0000000..cefac6c
--- /dev/null
+++ b/src/uPlot/MvQZoomStackWidget.cc
@@ -0,0 +1,563 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include <QIcon>
+#include <QPainter>
+#include <QStyle>
+
+#include "MgQLayoutItem.h"
+#include "MgQPlotScene.h"
+#include "MgQSceneItem.h"
+
+#include "MvQZoomStackWidget.h"
+
+#include "MagPlusService.h"
+
+
+int MvQZoomStackMenuStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
+{
+        if (metric == PM_SmallIconSize)
+            return 64;
+ 
+       return QProxyStyle::pixelMetric(metric, option,widget);
+}
+    
+
+int MvQZoomStackMenuPlastiqueStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
+{
+        if (metric == PM_SmallIconSize)
+            return 64;
+ 
+       return QPlastiqueStyle::pixelMetric(metric, option,widget);
+}
+
+//=========================
+//   MvQZoomStackLevel
+//=========================
+
+MvQZoomStackLevel::MvQZoomStackLevel()
+{
+}
+
+MvQZoomStackLevel::~MvQZoomStackLevel()
+{
+}
+
+void MvQZoomStackLevel::setImage(QImage &img)
+{
+	float w=img.width();
+	float h=img.height();
+
+	//We copy the image into a pixmap with the maximum sie of 60x48
+	QPixmap pix;
+	if(h*60./w <=48.)
+	{
+		pix=QPixmap::fromImage(img).scaledToWidth(60,Qt::SmoothTransformation);
+	}
+	else
+	{
+		pix=QPixmap::fromImage(img).scaledToHeight(48,Qt::SmoothTransformation);
+	}	
+
+	//Define the pixmap rectangle
+	int pw=pix.width();
+	int ph=pix.height();
+	int pdy=(64-ph)/2;
+	int pdx=(64-pw)/2;			
+	QRect pixRect(pdx,pdy,pw,-pdy);
+	
+	//We create a 60x60 pixmap with white background
+	pixmap_=QPixmap(64,64);
+	pixmap_.fill(Qt::white);
+
+	//Paint the image pixmap into the middle
+	QPainter painter(&pixmap_);
+	painter.drawPixmap(pixRect,pix);
+
+	//Render a border around it
+	painter.setPen(QColor(230,230,230));
+	painter.drawRect(0,0,64,64);
+
+
+}
+
+//=========================
+//   MvQZoomStackData
+//=========================
+
+
+MvQZoomStackData::MvQZoomStackData(QString grLayoutId) : 
+		  grLayoutId_(grLayoutId)
+{
+	//Initially we do not have levels
+	levelNum_=0;
+	actLevel_=-1;
+	selectedLevel_=-1;
+
+	//levelPreviewWidth_=180;
+	levelPreviewWidth_=100;
+}
+
+
+MvQZoomStackData::~MvQZoomStackData()
+{
+	clear();
+}
+
+void MvQZoomStackData::clear()
+{
+	foreach(MvQZoomStackLevel *level,levels_)
+	{
+		delete level;
+	}
+	levels_.clear();
+
+	levelNum_=0;
+	actLevel_=-1;
+	selectedLevel_=-1;
+}
+
+
+int MvQZoomStackData::update(int levelNum,int actLevel,MgQLayoutItem *item)
+{
+	//Get the new number of levels
+	int levelNumOri=levelNum_;
+	int actLevelOri=actLevel_;
+	
+	//int selectedLevel=-1;
+
+	levelNum_=levelNum;
+	actLevel_=actLevel;
+		
+	if(levelNum_ > 30)
+	{
+		levelNum_=0;
+		actLevel_=0;
+	}
+
+	// By default levelNum = 0 and actLevel = -1
+	// and there are no zoom levels.
+
+	if(levelNum_<=0)
+	{
+		clear();
+
+		//The gui is not enabled yet
+		//enabled_=false;
+
+		//Clear the preview textures
+		//clear();
+
+		//Save the preview map into a texture
+		if(levelNum_==0 && actLevel_==-1)
+		{
+			if(levels_.count() == 0) // && currentLayout_ != 0)
+			{
+				MvQZoomStackLevel *level= new MvQZoomStackLevel;
+				generatePreview(level,item);
+				//level->tb()->setChecked(true);
+				levels_.push_back(level);
+				selectedLevel_=0;
+			}
+			else 
+			{
+				generatePreview(levels_[0],item);
+				selectedLevel_=0;
+				//levels_[0]->tb()->setChecked(true);
+			}
+		}	
+		return selectedLevel_;
+	
+	}
+	else
+	{
+		//enabled_=true;
+	}
+
+	//If the levelNum or the current level has changed.
+	if(levelNumOri != levelNum_  || actLevelOri != actLevel_)
+	{
+		//focusedLevel_=-1;
+
+		//If there are less levels
+		if(levelNumOri > levelNum_)
+		{
+			for(int i=levelNumOri-1; i>= levelNum_; i--)
+			{
+				MvQZoomStackLevel *level=levels_.back();
+				//tbGroup_->removeButton(level->tb());
+				//layout_->removeWidget(level->tb());
+				delete level;
+				levels_.pop_back();
+			}
+
+			generatePreview(levels_.back(),item);
+			selectedLevel_=levels_.count()-1;
+			//levels_.back()->tb()->setChecked(true);
+		}
+
+		//If there are more levels
+		else if(levelNumOri < levelNum_)
+		{
+			MvQZoomStackLevel *level= new MvQZoomStackLevel;
+			generatePreview(level,item);
+			//layout_->addWidget(level->tb());
+			//tbGroup_->addButton(level->tb(),levels_.count());
+			//level->tb()->setChecked(true);
+			levels_.push_back(level);
+			selectedLevel_=levels_.count()-1;
+		}
+
+		//If the level num is the same. If the actLevel is the last one we 
+		//regenerate the preview
+		else 
+		{
+			selectedLevel_=actLevel_;
+			if(actLevel_ == levelNum_-1)
+			{
+				generatePreview(levels_[actLevel_],item);
+				//levels_[actLevel_]->tb()->setChecked(true);
+			}
+		}
+	}
+	
+	return selectedLevel_;
+
+}
+
+void MvQZoomStackData::generatePreview(MvQZoomStackLevel *level,MgQLayoutItem* qln)
+{
+	if(qln == 0) return;
+
+	//Get the preview layout's scene rectangle. We increase the width and
+	//height a bit so that the rendered image could contain the whole frame
+	QRectF sourceRect=qln->sceneBoundingRect();
+	sourceRect.adjust(0.,0.,5.,5.);
+
+	//Define the size of the device where the preview plot will be rendered
+	float tw=levelPreviewWidth_;
+
+	float w=sourceRect.width();
+	float h=sourceRect.height();
+	float r=tw/w;
+	float th=h*r;
+
+	if(th > levelPreviewWidth_)
+	{
+		th=levelPreviewWidth_;
+		r=th/h;
+		tw=w*r;
+	}
+
+	//Create the device. We double the needed size for later smooth recaling!
+	QImage device=QImage(tw*2,th*2,QImage::Format_RGB888);
+
+	//Set the target rect
+	QRectF targetRect(0,0,device.width(),device.height());
+
+	//Create the painter
+	QPainter *painter=new QPainter(&device);	
+
+	//Fill the target device with with colour
+	painter->fillRect(0,0,device.width(),device.height(),
+			 QBrush(Qt::white));
+
+	//Render the item into the device
+	qln->scene()->render(painter,targetRect,sourceRect);
+
+	//Rescale the device to the needed side with smooth transformation. Then mirror it horizontally.
+	QImage img=device.scaledToWidth(tw,Qt::SmoothTransformation).mirrored(false,true);
+
+	img.save("/var/tmp/cgr/zoom.png");
+	
+	
+	//Now we can set the preview!
+	level->setImage(img);
+}
+
+bool MvQZoomStackData::setActLevel(int level)
+{
+	if(level >=0 && level < levelNum_ && level != actLevel_)
+	{
+		actLevel_=level;
+		selectedLevel_=actLevel_;
+		return true;
+	}
+	return false;
+}
+
+void MvQZoomStackData::stepUp()
+{
+	slotStepTo(actLevel_-1);
+}
+
+void MvQZoomStackData::stepDown()
+{
+	slotStepTo(actLevel_+1);
+}
+
+void MvQZoomStackData::slotStepTo(int level)
+{
+	if(setActLevel(level))
+	{
+		emit actLevelChanged(grLayoutId_,actLevel_);				 
+	}
+}
+
+//=========================
+//   MvQZoomStackWidget
+//=========================
+
+MvQZoomStackWidget::MvQZoomStackWidget(MgQPlotScene *scene,QWidget *parent) : QMenu(parent)
+{
+	setObjectName(QString::fromUtf8("zoomStackWidget"));        
+
+	plotScene_=scene;
+	activeScene_=0;
+	currentPage_=0;
+	skipUpdate_=false;
+	setStyle(new MvQZoomStackMenuPlastiqueStyle);
+
+	connect(this,SIGNAL(triggered(QAction*)),
+		this,SLOT(slotStepTo(QAction*)));
+}
+
+MvQZoomStackWidget::~MvQZoomStackWidget()
+{
+	QMapIterator<QString,MvQZoomStackData*> it(page_);
+ 	while (it.hasNext()) 
+	{
+     		it.next();
+		delete it.value();
+ 	}
+	page_.clear();	
+}
+
+void MvQZoomStackWidget::updateData()
+{
+	if(skipUpdate_) 
+	{
+		return;
+	}
+}
+
+void MvQZoomStackWidget::reset(MgQSceneItem* activeScene,bool changeActiveScene)
+{
+	if(skipUpdate_) 
+	{
+		return;
+	}
+
+	activeScene_=activeScene;
+
+ 	if(!changeActiveScene)
+	{  
+		QStringList idLst;
+		foreach(MgQSceneItem* item,plotScene_->sceneItems())
+		{
+			MgQLayoutItem *zoomLayout=item->firstProjectorItem();	
+			if(zoomLayout)
+			{
+		   		idLst << QString::fromStdString(zoomLayout->layout().id());	
+			}
+		}
+	
+		//Remove unused scenes from the zoomstack
+		foreach(QString id, page_.keys())
+		{
+	  		if(idLst.indexOf(id) == -1)
+			{
+				delete page_[id]; 
+				page_.remove(id);
+			}	
+		}	
+	}
+	
+	if(!activeScene_)
+		return;
+
+	//-----------------------------
+	// Identify the active scene
+	//-----------------------------
+	
+	MgQLayoutItem *zoomLayout=activeScene_->firstProjectorItem();
+	if(!zoomLayout) return;
+
+	int levelNum=zoomLayout->layout().zoomLevels();
+	int actLevel=zoomLayout->layout().zoomCurrentLevel();
+	QString id = QString::fromStdString(zoomLayout->layout().id());
+
+	if(changeActiveScene)
+	{  
+		if(!page_.contains(id))
+		{ 	
+			page_[id] = new MvQZoomStackData(id);
+
+			connect(page_[id],SIGNAL(actLevelChanged(QString,int)),
+			        this,SIGNAL(actLevelChanged(QString,int)));
+		
+			//Find preview layout in the scene and remove it
+			MgQPreviewLayoutItem *previewLayout=activeScene_->previewLayoutItem();
+			if(!previewLayout) return;	
+			plotScene_->removeItem(previewLayout);
+
+			//Create a new scene and add the previewLayout to it!
+			QGraphicsScene *previewScene= new QGraphicsScene;
+			previewScene->addItem(previewLayout);
+			previewLayout->setVisible(true);
+
+			page_[id]->update(levelNum,actLevel,previewLayout);
+		
+			delete previewScene;
+		}
+	}
+	else
+	{
+		if(!page_.contains(id))
+		{	
+			page_[id] = new MvQZoomStackData(id);
+
+			connect(page_[id],SIGNAL(actLevelChanged(QString,int)),
+			        this,SIGNAL(actLevelChanged(QString,int)));
+		}
+
+
+		//Find preview layout in the scene an remove it
+		MgQPreviewLayoutItem *previewLayout=activeScene_->previewLayoutItem();
+		if(!previewLayout) return;	
+		plotScene_->removeItem(previewLayout);
+
+		//Create a new scene and add the previewLayout to it!
+		QGraphicsScene *previewScene= new QGraphicsScene;
+		previewScene->addItem(previewLayout);
+		previewLayout->setVisible(true);
+	
+		page_[id]->update(levelNum,actLevel,previewLayout);	  
+	  
+		delete previewScene;
+	}
+	
+		
+	foreach(QAction *action,actions())
+	{
+		removeAction(action);
+		delete action;
+	}
+
+	for(int i=0; i < page_[id]->levels().count(); i++)
+	{
+		QAction *action = new QAction(this);			        		
+		action->setIcon(page_[id]->levels().at(i)->pixmap());
+		action->setData(i);
+		addAction(action);
+	}
+
+	if(currentPage_ != page_[id])
+	{
+		currentPage_ = page_[id];
+	}
+}
+
+MvQZoomStackData* MvQZoomStackWidget::pageData(MgQSceneItem* item)
+{
+	if(!item)
+		return 0;
+			
+	MgQLayoutItem *zoomLayout=item->firstProjectorItem();	
+	if(zoomLayout)
+	{
+		QString id=QString::fromStdString(zoomLayout->layout().id());	
+	  	if(page_.find(id) != page_.end())
+		{
+		  	return page_[id];
+		}
+	}
+	
+	return 0;
+}  
+
+void MvQZoomStackWidget::slotStepUp()
+{
+	if(!currentPage_)
+		return;
+
+	if(currentLevel() >= 1)
+	{	
+		int level=currentLevel()-1;
+		skipUpdate_=true;
+		slotStepTo(level);
+		skipUpdate_=false;
+	}
+}
+
+void MvQZoomStackWidget::slotStepDown()
+{
+	if(!currentPage_)
+		return;
+
+	skipUpdate_=true;
+	if(currentLevel() >=0 && currentLevel() < levelNum()-1)
+	{
+		int level=currentLevel()+1;
+		skipUpdate_=true;	
+		slotStepTo(level);
+		skipUpdate_=false;
+	}
+}
+
+void MvQZoomStackWidget::slotStepTo(QAction *action)
+{
+	if(!currentPage_)
+		return;
+
+	int level=action->data().toInt();
+
+	qDebug() << "level" << level;
+
+	if(level != -1)
+	{
+		skipUpdate_=true;
+		currentPage_->slotStepTo(level);
+		skipUpdate_=false;
+	}
+}
+
+void MvQZoomStackWidget::slotStepTo(int level)
+{
+	if(!currentPage_)
+		return;
+
+	qDebug() << "level" << level;
+
+	if(level != -1)
+	{
+		skipUpdate_=true;
+		currentPage_->slotStepTo(level);
+		skipUpdate_=false;
+	}
+}
+
+int MvQZoomStackWidget::levelNum()
+{
+	if(!currentPage_)
+		return 0;
+
+	return currentPage_->levels().count();
+}
+
+int MvQZoomStackWidget::currentLevel()
+{
+	if(!currentPage_)
+		return 0;
+
+	return currentPage_->selectedLevel();
+}
+
diff --git a/src/uPlot/MvQZoomStackWidget.h b/src/uPlot/MvQZoomStackWidget.h
new file mode 100644
index 0000000..7c60009
--- /dev/null
+++ b/src/uPlot/MvQZoomStackWidget.h
@@ -0,0 +1,120 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef MvQZoomStackWidget_H
+#define MvQZoomStackWidget_H
+
+#include <QImage>
+#include <QMap>
+#include <QMenu>
+#include <QPlastiqueStyle>
+#include <QProxyStyle>
+
+class QAction;
+
+class MgQLayoutItem;
+class MgQPlotScene;
+class MgQSceneItem;
+ 
+class MvQZoomStackMenuStyle : public QProxyStyle
+{
+    public:
+        MvQZoomStackMenuStyle(QStyle* style=0) : QProxyStyle(style) {};   
+        int pixelMetric(PixelMetric, const QStyleOption *option=0, const QWidget *w=0) const;
+};
+    
+class MvQZoomStackMenuPlastiqueStyle : public QPlastiqueStyle
+{
+    public:
+        MvQZoomStackMenuPlastiqueStyle() : QPlastiqueStyle() {};   
+        int pixelMetric(PixelMetric, const QStyleOption *option=0, const QWidget *w=0) const;
+};
+
+class MvQZoomStackLevel
+{
+public:
+	MvQZoomStackLevel();
+	~MvQZoomStackLevel();
+	void setImage(QImage&);	
+	const QPixmap& pixmap() const {return pixmap_;}
+	
+protected:
+	QPixmap  pixmap_;
+};
+
+
+class MvQZoomStackData : public QObject
+{
+	Q_OBJECT
+public:
+	MvQZoomStackData(QString);
+	~MvQZoomStackData();
+	int update(int,int,MgQLayoutItem*);
+	void clear();
+
+	int levelNum() {return levelNum_;}
+	int actLevel() {return actLevel_;}
+	int selectedLevel() {return selectedLevel_;}
+	QString grLayoutId() {return grLayoutId_;}
+	void stepUp();
+	void stepDown();
+	bool setActLevel(int);
+	const QList<MvQZoomStackLevel*>& levels() const {return levels_;}
+
+public slots:
+	void slotStepTo(int);
+
+signals:
+	void actLevelChanged(QString,int);
+
+protected:
+	void generatePreview(MvQZoomStackLevel*,MgQLayoutItem*);
+
+	QString grLayoutId_;
+	int levelPreviewWidth_;	
+	int levelNum_;
+	int actLevel_;
+	int selectedLevel_;
+	QList<MvQZoomStackLevel*> levels_;
+};
+
+
+class MvQZoomStackWidget : public QMenu
+{
+	Q_OBJECT
+
+public:
+	MvQZoomStackWidget(MgQPlotScene*,QWidget *parent=0);
+	~MvQZoomStackWidget();
+	void updateData();	
+	void reset(MgQSceneItem*,bool);
+	MvQZoomStackData *pageData(MgQSceneItem*); 
+	
+	int levelNum();
+	int currentLevel();
+
+public slots:
+	void slotStepUp();
+	void slotStepDown();
+	void slotStepTo(QAction*);
+	void slotStepTo(int);
+
+signals:
+	void actLevelChanged(QString,int);
+
+protected:	
+	QMap<QString,MvQZoomStackData*> page_;
+	MvQZoomStackData* currentPage_;
+
+	bool skipUpdate_;
+	MgQPlotScene* plotScene_;
+	MgQSceneItem* activeScene_;
+};
+
+#endif
diff --git a/src/uPlot/NewpageAction.cc b/src/uPlot/NewpageAction.cc
new file mode 100644
index 0000000..d3bfb14
--- /dev/null
+++ b/src/uPlot/NewpageAction.cc
@@ -0,0 +1,42 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "NewpageAction.h"
+#include "Root.h"
+
+// This is the exemplar object for the Newpage Action class
+static NewpageAction newpageActionInstance("Newpage");
+
+PlotModAction& 
+NewpageAction::Instance()
+{
+	return newpageActionInstance;
+}
+
+// METHOD : Execute
+//
+// PURPOSE: // Skip the request and update the request without the skipped one
+void
+NewpageAction::Execute ( PmContext& context )
+{
+     context.Advance(); // Skip the newpage request
+
+	// Indicate a new superpage
+	Root::Instance().HasReceivedNewpage(true);
+
+     // Save the remaining requests.
+	// It will skip all the previous requests and only save the
+	// remaining ones. 
+	//MvRequest remainingReqs;
+    //remainingReqs.copyFromCurrent(context.InRequest());
+
+    // Update context
+    //context.Update(remainingReqs);
+    context.SetFirstInRequestToCurrent();
+}
diff --git a/src/uPlot/NewpageAction.h b/src/uPlot/NewpageAction.h
new file mode 100644
index 0000000..c749dce
--- /dev/null
+++ b/src/uPlot/NewpageAction.h
@@ -0,0 +1,60 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  NewpageAction
+//
+// .AUTHOR:
+//  Fernando Ii
+//
+// .SUMMARY:
+//  Describes the NewpageAction class, a derived class
+//  for the various types of requests in PlotMod which indicate
+//  that a new superpage branch will be created in the Tree.
+//
+// .CLIENTS:
+//  PlotModAction class, called by PlotMod main module (PlotMod.cc)
+//
+// .RESPONSIBILITY:
+//  Will set a flag to indicate that a new superpage branch is going
+//  to be created.
+//
+// .COLLABORATORS:
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+// .REFERENCES:
+//
+
+#ifndef NewpageAction_H
+#define NewpageAction_H
+#include "PlotModAction.h"
+
+class NewpageAction: public PlotModAction
+{
+public:
+
+	// Constructors
+	NewpageAction(const Cached& name): PlotModAction(name) {  }
+
+	// Destructor
+	~NewpageAction() {}
+
+	// Methods
+	static PlotModAction& Instance();
+
+	// Overriden from Base Class (PlotModAction)
+	virtual void Execute ( PmContext& context );
+};
+
+#endif
diff --git a/src/uPlot/ObjectInfo.cc b/src/uPlot/ObjectInfo.cc
new file mode 100644
index 0000000..4d22e8f
--- /dev/null
+++ b/src/uPlot/ObjectInfo.cc
@@ -0,0 +1,779 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <dirent.h>
+#include <MvRequest.h>
+#include <MvIcon.h>
+#include <MvPath.hpp>
+#include <Assertions.hpp>
+#include <MvScanFileType.h>
+#include <MvRequestUtil.hpp>
+
+#include "ObjectInfo.h"
+#include "ObjectList.h"
+#include "PlotModConst.h"
+#include "MacroConverter.h"
+
+typedef map<Cached,Cached> ExpandedMap;
+typedef ExpandedMap::iterator ExpandedIterator;
+
+NamesMap ObjectInfo::namesMap_;
+
+// -- METHOD :
+//
+// -- PURPOSE:
+//
+// -- INPUT  :
+//
+// -- OUTPUT :
+void
+ObjectInfo::PutNewLine ( const	 Cached& newLine )
+{
+	description_.push_back( newLine );
+}
+
+void
+ObjectInfo::ConvertRequestToMacro( MvRequest& inRequest,
+				   MacroConversion lastComma,Cached varName,
+				   Cached macroName, set<Cached> skipSet,
+				   bool onlySub)
+{
+	// Initializations
+	ExpandedMap expandedMap;
+	int id = 1;
+	MvRequest tmpRequest = inRequest;
+	int count = inRequest.countParameters();
+	int i;
+
+	// Compute maximum parameters length names
+	int size = MaximumParameterNameLength(inRequest);
+
+	// Loop all parameters
+	for( i = 0; i < count ; i++ )
+	{
+		const char* param = inRequest.getParameter(i);
+
+		const char* value= 0;
+		inRequest.getValue(value,param,0);
+		if ( !value )
+		{
+			// No value, so check if there is a subrequest
+			MvRequest subReq = inRequest.getSubrequest(param);
+			if ( !subReq )
+				continue;
+
+			// There is a subrequest
+			value = "#";
+		}
+
+		// Strip out the debug information and anything that should be skipped
+		if ( ( strncmp(param, "_", 1 ) == 0 ) || ( skipSet.find(param) != skipSet.end()) )
+		{
+			tmpRequest.unsetParam(param);
+			continue;
+		}
+
+		if ( inRequest.countValues(param) > 1 )
+			continue;
+
+		MvRequest subRequest;
+		if ( strcmp(value, "#" ) == 0 )  // Subrequest
+		{
+			subRequest = inRequest.getSubrequest(param);
+			bool subExpanded = false;
+			Cached varName;
+
+			// Can we follow subRequest also ?
+			if ( (const char *)subRequest("_NAME") )
+			{
+				Cached fullName = MakeUserPath(subRequest("_NAME") );
+				if ( FileCanBeOpened(fullName,"r") )
+				{
+					Cached returnName = Convert(subRequest);
+					if ( strcmp(returnName,"") )
+					{
+						varName = returnName;
+						subExpanded = true;
+					}
+				}
+			}
+
+			// Could not follow the subRequest, expand it as it is.
+			if ( ! subExpanded )
+			{
+				varName = Cached(param) + id++;
+				ConvertRequestToMacro(subRequest,PUT_END,varName,
+				ObjectList::MacroName(subRequest.getVerb()) );
+			}
+
+			tmpRequest.unsetParam(param);
+			expandedMap[param] = varName;
+		}
+
+		else if ( ObjectInfo::IsAName ( value ) )
+		{
+			// Try to find out if this is a file reference.
+			// We need to get the full path
+			Cached tmpName = value;
+			if ( IsParameterSet(inRequest,"_NAME") )
+				tmpName = dirname(inRequest("_NAME")) + Cached("/") + value;
+
+			Cached refName =  MakeUserPath(tmpName);
+			if ( access( refName, R_OK )  == 0 )
+			{
+				// If it is a DATA (binary) file, creates a dummy request.
+				// The crucial information needed is parameter _NAME
+				if ( ! IsBinaryOrMissingFile( refName ) )
+					subRequest.read  ( (const char*) refName);
+				else
+					subRequest.setVerb("DATA");
+
+				if ( ! IsParameterSet(subRequest,"_NAME") )
+				subRequest("_NAME") = tmpName;
+
+				Cached returnName = Convert(subRequest);
+				if ( strcmp(returnName,"") )
+				{
+					tmpRequest.unsetParam(param);
+					expandedMap[param] = returnName;
+				}
+			}
+		}
+	}
+
+	if ( onlySub == false )
+	{
+		// Now handle the fields that are not subrequests or references.
+		// We have expanded all, now we need to print the header for the
+		// original request.
+		// Convert macroName to lower case.
+		char *macrolower = new char[ strlen(macroName) + 1];
+		strcpy(macrolower,macroName);
+
+		for (i = 0; i < (int)strlen(macrolower); i++ )
+		macrolower[i] = tolower(macrolower[i]);
+
+		PutNewLine( ObjectInfo::SpaceToUnderscore(varName) + Cached(" = ") +  Cached(macrolower) + Cached("( ") );
+
+		delete [] macrolower;
+
+		count = tmpRequest.countParameters();
+		for( i = 0; i < count ; i++)
+		{
+			const char* param = tmpRequest.getParameter(i);
+			int n = tmpRequest.countValues(param);
+			Cached valueList;
+
+			 // is there more than one value ?
+			if ( n > 1 )
+				valueList = Cached ("[ "); // add a list
+
+			if ( n == 0 ) 
+				continue;
+
+			for(int j = 0; j < n ; j++)
+			{
+				// put a "comma" before the new value
+				if ( j > 0 )
+				valueList = valueList + Cached(",");
+
+				// add a new value to the list
+				const char *val = 0;
+				tmpRequest.getValue(val,param,j);
+				valueList = valueList + FormatValue(val, param, macroName);
+			}
+
+			// close the list, if needed
+			if ( n > 1 )
+				valueList = valueList + Cached ( " ]" );
+
+			// add a new value to the description	
+			// remember the last comma
+			Cached newLine;
+			Cached comma = ",";
+			if  ( i == ( count - 1 ) )
+			{
+				if ( expandedMap.size() == 0  && ( lastComma == NO_LAST_COMMA || lastComma == PUT_END ) )
+				comma = "";
+			}
+
+			FormatLine(param,valueList,comma,size);
+		}
+
+		// At last print out the fields that has been expanded
+		int j= 0;
+		ExpandedIterator ii = expandedMap.begin();
+		for ( ; ii != expandedMap.end(); ii++,j++)
+		{
+			Cached comma = ",";
+			if ( j == (expandedMap.size() -1 ) )
+			{
+				if ( lastComma == NO_LAST_COMMA ||lastComma == PUT_END )
+					comma = "";
+			}
+
+			FormatLine((*ii).first,(*ii).second,comma,size);
+		}
+ 
+		if ( lastComma == PUT_END )
+			this->PutNewLine (  Cached("\t)") );
+    	}
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+
+Cached
+ObjectInfo::ConvertDataUnitToMacro ( MvIcon& dataUnit )
+{
+  // Retrieve the request associated to the dataUnit
+  MvRequest duRequest = dataUnit.Request();
+  Cached objectName;
+
+  if ( isPrint_ )
+    {
+      Cached fileName;
+
+      MvRequest svcRequest = dataUnit.SvcRequest ();
+      if ( svcRequest.getVerb() == NETCDF )
+	fileName = svcRequest ( "PATH" );
+      else if ( duRequest.getVerb() == GRIB )
+	fileName = duRequest ( "PATH" );
+
+      if ( FileCanBeOpened ( fileName, "r" ) )		
+	{
+	  Cached objectName = Cached ("DataUnit") + dataUnit.Id();
+	  this->PutNewLine ( Cached ( "# Importing   ") + objectName );	
+	  this->PutNewLine ( objectName + Cached("  = read  ( \"")  + fileName + Cached("\")") );
+	  return objectName;
+	}
+    }
+
+  int use_mode = duRequest("_USE_MODE");
+
+  if ( ! use_mode )
+    objectName = Convert(duRequest);
+
+  else
+    {
+      MvRequest modeRequest = duRequest.getSubrequest("_MODE");
+      if ( (const char *) duRequest("_NAME") )
+	modeRequest("_NAME") = duRequest("_NAME");
+      if ( (const char *) duRequest("_CLASS") )
+	modeRequest("_CLASS") = duRequest("_CLASS");
+      if ( (const char *) duRequest("_APPL") )
+	modeRequest("_APPL") = duRequest("_APPL");
+
+      modeRequest.print();
+      MvIcon tmpIcon(modeRequest);
+      // Call itself with the mode request.
+      objectName = ConvertDataUnitToMacro(tmpIcon);
+    }
+
+  return objectName;
+}
+
+Cached
+ObjectInfo::ConvertIconToMacro ( MvRequest& iconRequest, Cached defVal,int id )
+{
+  int first = 0;
+  Cached returnName;
+
+  // Cater for request containing more than one request.
+  while ( iconRequest )
+    {
+      Cached uiName = ObjectInfo::ObjectName ( iconRequest,defVal,id );
+
+      // Find out the iconClass and macro class name
+      Cached iconClass = ObjectInfo::IconClass ( iconRequest );
+
+      if ( ! strcmp("",uiName ) )
+	uiName =  defVal + id;
+
+      Cached macroName = ObjectList::MacroName ( iconClass );
+
+      // Convert the user interface name to a macro readable name
+      Cached iconName    = ObjectInfo::SpaceToUnderscore ( uiName );
+ 
+      if ( first > 0 )
+	iconName = iconName + Cached("_") + first;
+ 
+      // Write the contents of the icon
+      this->ConvertRequestToMacro ( iconRequest, PUT_END,iconName,macroName );
+ 
+      if ( first > 0  ) 
+	returnName = returnName + Cached(", ");
+ 
+      returnName = returnName + iconName;
+      first++;
+      iconRequest.advance();
+    }
+
+  return returnName;
+}
+
+// -- METHOD :  Write Description
+//
+// -- PURPOSE:  Write a description to a file
+//
+// -- INPUT  :  A pointer to a file
+//
+// -- OUTPUT :  Description written in the file
+
+void
+ObjectInfo::WriteDescription ( FILE* filePtr )
+{
+  require ( filePtr != 0 );
+
+  CachedList::iterator line = description_.begin();
+
+  while ( line != description_.end() )
+    {
+      Cached newLine = (*line);
+      fprintf ( filePtr, "%s%s \n", linePrefix_.c_str(), (const char*) newLine );
+
+      ++line;
+    }
+}
+
+// =======================================================
+//
+//  Static methods - Used in General by PlotMod
+//
+
+
+// -- METHOD : ObjectPath
+//
+// -- PURPOSE: Provide the complete path to the object
+//
+// -- INPUT  : A request which describes the object
+//
+// -- OUTPUT : Fully-qualified path
+
+Cached
+ObjectInfo::ObjectPath ( const MvRequest& request )
+{
+  Cached path;
+
+  const char* mPath = request( "_PATH" );
+//  if ( ! mPath )
+//    mPath = request( "_PATH" );
+
+  if ( mPath )
+    //              Path contains file name, it shouldn't but .....
+    //              If it's been corrected, use following commented line
+    //		return Cached( mPath );
+    {
+      path  = Cached ( dirname ( mPath ) );
+      return path;
+    }
+
+  // Have we been called from a macro ??
+  if ( ObjectList::CalledFromMacro ( request ) == true  )
+    {
+      // Macro should give us the fully qualified path
+      const char* mvPath = request ( "_MACRO" );	
+      path               = Cached ( dirname ( mvPath ) );
+    }
+  else
+    {
+      // Obtain the fully qualified path to the object
+      const char* mvPath = request ( "_NAME" );
+      path               = MakeUserPath ( dirname ( mvPath  ) );
+    }
+
+  // Try to open a directory - if failed, set the path to METVIEW_USER_DIR
+
+  DIR* metDir = 0;
+  if ( ( metDir = opendir ( (const char*) path ) ) == 0 )
+    path = getenv("METVIEW_USER_DIRECTORY");
+  else
+    closedir ( metDir );
+
+  return path;
+}
+
+// -- METHOD :  ObjectName
+//
+// -- PURPOSE:  Determine the object's name 
+//
+// -- INPUT  :  A request which describes the object, the object's type,
+//              and the object's id;
+//
+// -- OUTPUT :  The "best guess" of the object's name
+//
+// -- NOTES  :  Usually, the object's name is contained in the request,
+//              in the "_NAME" field. However, when called from a macro
+//              this field contains the line of the macro.
+//              Therefore, in the case of a macro, we have to create a
+//              name for the object
+
+Cached 
+ObjectInfo::ObjectName ( const MvRequest& request, const char* objType, int id,
+			 bool updateId)
+{
+  char tmpstr[100];
+  Cached objName;
+
+  if ( objType == 0 ||  ! strcmp(objType,"") )
+    objName = request.getVerb();
+  else
+    objName = objType;
+
+  // Have we been called from a macro ??
+  if ( ObjectInfo::CalledFromMacro ( request ) == true  )
+    {
+      if ( id == 0 && updateId )
+		id = GenerateId(objName);
+
+      // Macro does not give us a proper name
+      sprintf(tmpstr,"%s%d",(const char *)objName,id);
+      return tmpstr;
+    } 
+  else
+    {
+      // Obtain the name of the object
+      const char* mvName = request ( "_NAME" );
+      // mvName should be checked, sometimes request has no _NAME
+      if ( mvName == 0 )
+	{
+	  if ( id == 0 && updateId ) 
+	    id = GenerateId(objName);
+	  sprintf(tmpstr,"%s%d",(const char *)objName,id);
+	  return tmpstr;
+	}
+      else
+	return  mbasename ( mvName );
+    }
+}
+
+Cached ObjectInfo::GenerateName(MvRequest req)
+{
+  return SpaceToUnderscore(ObjectName(req,"",0,true));
+}
+
+int ObjectInfo::GenerateId(const char *name )
+{
+  return ++namesMap_[name];
+}
+
+// -- METHOD :  IsAName
+//
+// -- PURPOSE:  Indicate is a value is a name
+//
+// -- INPUT  :  Value
+//
+// -- OUTPUT :  true - the value is a name
+//              false - otherwise
+
+bool
+ObjectInfo::IsAName ( const char* value )
+{
+  for ( int i = 0; i < (signed int)strlen (value); i ++ )
+    {
+      if ( isalpha ( value[i] ) )
+	return true;
+    }
+  return false;
+}
+
+// -- METHOD :  CalledFromMacro
+//
+// -- PURPOSE:  Indicate if the request is called within a macro
+//
+// -- INPUT  :  A request
+//
+// -- OUTPUT :  true/false
+
+bool 
+ObjectInfo::CalledFromMacro ( const MvRequest& request )
+{
+  Cached  applicationName, appClass;
+
+  request.getValue ( applicationName, "_APPL", 0 );
+  request.getValue( appClass,"_CLASS");
+
+  if ( applicationName == Cached ( "macro" )  ||
+       appClass == Cached("MACRO") )
+    return true;
+  else
+    return false;
+
+}
+
+// -- METHOD :  IconClass
+//
+// -- PURPOSE:  Indicate the icon Class
+//
+// -- INPUT  :  a fully-qualified path 
+//              the name of the icon
+//
+// -- OUTPUT :  The class of the icon
+//
+// -- NOTES  :  This method uses the "hidden" user interface
+//              requestes, which are also used by MetvuewUI
+//              to identify the objects
+Cached
+ObjectInfo::IconClass ( const MvRequest &req )
+{
+  Cached path = ObjectPath(req);
+  Cached iconName = ObjectName(req);
+
+  // Create a path to a hidden file  
+  Cached hiddenFileName = path + Cached("/.") + iconName;
+
+  // If the file exists, read it
+  if ( FileCanBeOpened ( hiddenFileName, "r" )  == true )
+    {
+      MvRequest uiRequest;
+      uiRequest.read  ( (const char*) hiddenFileName );
+
+      // Obtain the value of the icon class
+      Cached iconClass;
+      uiRequest.getValue ( iconClass, "ICON_CLASS", 0 );
+
+      return iconClass;
+    }
+  return req.getVerb();
+}
+
+Cached 
+ObjectInfo::StripExtension ( const char* value )
+{
+  int len = strlen ( value );
+  Cached name;
+
+  for ( int i = 0; i < len; i++ )
+    {
+      if ( *value ==  '.' )
+	return name;
+      else
+	name = name + (*value);
+      value++;
+    }
+
+  return name;
+}
+
+// -- METHOD :  SpaceToUnderscore
+//
+// -- PURPOSE:  Convert a name with spaces to a name with underscores
+//              Converts parenthesis to underscores
+//              Converts first character to underscore if is a number
+//
+// -- INPUT  :  an object name with might contain spaces
+//
+// -- OUTPUT :  an object name where the spaces have been converted to underscores
+//
+Cached
+ObjectInfo::SpaceToUnderscore ( const char* nameWithSpaces )
+{
+  int len = strlen ( nameWithSpaces );
+  char* nameWithUnderscores = (char*) malloc ( len+1 );
+
+  for ( int i = 0; i < len; i++ )
+    {
+      if (( i == 0 ) && ( isdigit ( nameWithSpaces[i] ) ))
+	nameWithUnderscores[i] = '_';
+      else if (( nameWithSpaces[i]  == ' ' ) ||
+	       ( nameWithSpaces[i]  == ')' ) ||
+	       ( nameWithSpaces[i]  == '(' ) ||
+	       ( nameWithSpaces[i]  == ',' ) ||
+	       ( nameWithSpaces[i]  == ':' ) ||
+	       ( nameWithSpaces[i]  == '.' ) ||
+	       ( nameWithSpaces[i]  == '<' ) ||
+	       ( nameWithSpaces[i]  == '-' ) ||
+	       ( nameWithSpaces[i]  == '>' ) )
+
+	nameWithUnderscores[i] = '_';
+      else
+	nameWithUnderscores[i] = nameWithSpaces[i];
+    }
+  nameWithUnderscores[ len ] = '\0';
+
+  return nameWithUnderscores;
+}
+
+Cached
+ObjectInfo::DefaultVisDefName ( int treeNode )
+{
+  Cached visdefName = Cached("(Contour") + treeNode + Cached(")");
+  return visdefName;
+}
+
+bool
+ObjectInfo::CheckVisDefClass (const MvRequest& req1, const MvRequest& req2)
+{
+        const char* class1 = (const char*)req1("_CLASS");
+        const char* class2 = (const char*)req2("_CLASS");
+	if ( !class1 || !class2 )
+		return false;
+
+	// Visdefs in Metview 3 and Metview 4 have the same name apart from
+	// the first character (M for Metview 4 and P for Metview 3)
+	if ( strcmp(&class1[1],&class2[1]) )
+		 return false; //different classes
+
+#if 0 //FAMI1110 Metview 4 does not do ISOTACHS yet
+	//If it is PCONT, then check for Data_transformation
+	if ( ObjectList::IsVisDefContour(class1) )
+	{
+		const char* data1 = (const char*)req1("CONTOUR_DATA_TRANSFORMATION");
+		const char* data2 = (const char*)req2("CONTOUR_DATA_TRANSFORMATION");
+		if ( !data1 && !data2 ) //no information about data_transformation
+			return true;
+
+		if ( !data1 || !data2 )    //different data transformation
+			return false;
+
+		if ( strcmp(data1,data2) )
+			return false; //different data transformation
+	}
+#endif
+	return true;
+}
+
+Cached
+ObjectInfo::Convert(MvRequest &req)
+{
+  int first = 0;
+  Cached returnName, oneReqName;
+
+  while ( req )
+    {
+      Cached iconClass = ObjectInfo::IconClass ( req );
+      MacroConverter & converter = MacroConverter::Find(iconClass );
+
+      Cached fileName = ObjectInfo::ObjectPath(req) + Cached("/") + 
+	ObjectInfo::ObjectName(req);
+      oneReqName = "";
+      if ( ! IsBinaryOrMissingFile( fileName ) )
+	{
+	  MvRequest fileReq;
+	  fileReq.read(fileName);
+
+	  // Just in case further expansion is needed.
+	  fileReq("_NAME") = req("_NAME");
+	  oneReqName = converter.Convert(fileReq, this);
+	}
+
+      if ( oneReqName == Cached("") )
+	oneReqName = converter.Convert(req, this);
+
+      if ( first == 1 )
+	returnName = Cached("[") + returnName;
+
+      if ( first > 0 )
+	returnName = returnName + Cached(", ");
+
+      returnName = returnName + oneReqName;
+      first++;
+
+      req.advance();
+    }
+
+  if ( first > 1 )
+	returnName = returnName + Cached("] ");
+
+  return returnName;
+}
+
+void ObjectInfo::FormatLine(const Cached &param, const Cached &val, const Cached &comma, int width)
+{
+	ostrstream str;
+	str.setf(ios::left);
+	str << "\t\t";str.width(width);
+	str << param;
+	str << ": " << val << comma << ends;
+
+	const char *cStr = str.str();
+
+	PutNewLine(cStr);
+	delete [] cStr;
+}
+
+Cached ObjectInfo::FormatValue(const char *val, const char *param,
+			       const Cached &macroName)
+{
+	string sval;
+	bool addQuotes = false;
+
+	// Multiple lines
+	if(strstr(val,"\n") != 0)
+	{
+ 		char *pch;
+		int len = strlen(val);
+		if(len > 0)
+		{
+			char *buff=(char*) calloc(len+1,sizeof(char));
+			sprintf(buff,"%s",val);
+  			pch = strtok (buff,"\n");
+			//fprintf(f,"\"%s \"",pch);
+			sval = sval + "\"" + pch + " \"";
+		
+ 			while (pch != NULL)
+ 			{
+				pch = strtok (NULL, "\n");
+				if(pch != NULL)
+				{
+					//fprintf(f," &\n",pch);
+					//fprintf(f,"%s%s%s%s%s\"%s \"",tab,tab,tab,tab,tab,pch);
+					sval += " &\n";
+					sval = sval + "\t\t\t\t\"" + pch + " \"";
+				}
+			}
+
+			free(buff);
+		}
+
+		return Cached(sval.c_str());
+	}
+
+	// Single line
+	// Put all names under '' symbols
+	if ( ( ObjectInfo::IsAName ( val ) ) || ( strcmp(val,"") == 0 ) ||
+	     ( ( strcmp(param, "TIME" ) == 0 ) && ( macroName == Cached ("retrieve") ) ) )
+		addQuotes = true;
+
+	if ( addQuotes ) sval = "\"";
+	while ( *val )
+	{
+		if ( *val == '\\' ) sval += '\\';
+
+		// If dot is first character and it's a number, add a 0 at the beginning.
+		if ( *val == '.' && sval.length() == 0 && is_number(val) )
+			sval += "0";
+
+		sval += *val;
+		val++;
+	}
+
+	if ( addQuotes ) sval += "\"";
+
+	return Cached(sval.c_str());
+}
+
+int ObjectInfo::MaximumParameterNameLength( MvRequest& inRequest)
+{
+	int size = 0;
+	for (int j = 0; j < inRequest.countParameters(); j++ )
+	{
+		const char* param = inRequest.getParameter(j);
+		if ( size < (int)strlen(param) )
+			size = strlen(param);
+	}
+
+	// Give one extra space
+	return size+1;
+}
diff --git a/src/uPlot/ObjectInfo.h b/src/uPlot/ObjectInfo.h
new file mode 100644
index 0000000..22318ae
--- /dev/null
+++ b/src/uPlot/ObjectInfo.h
@@ -0,0 +1,164 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:	
+//  ObjectInfo
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  A class for handling description of PlotMod objects
+//
+//
+// .CLIENTS:
+//  Presentable 
+//
+//
+// .RESPONSABILITIES:
+//  - Convert a request from the METVIEW request to the
+//    macro syntax
+//  - Write the contents of a PLOT_SUPERPAGE into a 
+//    macro file
+//
+// .COLLABORATORS:
+//  MvRequest 
+// 
+// .BASE CLASS:
+//  (none)
+//
+// .DERIVED CLASSES:
+//  (none)	
+//
+// .REFERENCES:
+//
+//
+#ifndef ObjectInfo_H
+#define ObjectInfo_H
+
+#include "inc_stl.h"
+using std::string;
+
+#include <Cached.h>
+#include <Types.hpp>
+
+class MvIcon;
+class MvRequest;
+
+typedef  list<Cached> CachedList;
+typedef  map<Cached,int >  NamesMap;
+
+class ObjectInfo {
+
+public:
+
+	// Constructors
+	ObjectInfo():
+    		hasAction_ ( false ),
+    		isPrint_ ( false ) { namesMap_.erase(namesMap_.begin(), namesMap_.end() ); } 
+
+	// Class Methods
+	void IsPrint ( bool yesno )
+		{ isPrint_ = yesno; }
+
+	void SetPlotAction ()
+		{ hasAction_ = true; }
+
+	bool HasAction()
+		{ return hasAction_; } 
+
+	void LinePrefix(const string& xx ) { linePrefix_ = xx; }
+
+	// Puts a new line in the description
+	void PutNewLine ( const	 Cached& newLine );
+
+	// Format a line and a Value
+	void FormatLine(const Cached &, const Cached&, const Cached &, int width = 25 );
+	Cached FormatValue(const char *, const char *, const Cached &);
+
+	// Calculate maximum size of the parameters name
+	int MaximumParameterNameLength( MvRequest& );
+
+	// Writes a description into a file
+	void WriteDescription ( FILE* filePtr );
+
+	// Convert a request to the macro syntax
+	void ConvertRequestToMacro( MvRequest& inRequest,
+			      	    MacroConversion lastComma,
+			      	    Cached varName, Cached macroName,
+			      	    set<Cached> skip = set<Cached>(),
+			      	    bool onlySub = false);
+
+	 // Converts a data unit to macro syntax
+	Cached ConvertDataUnitToMacro ( MvIcon& dataUnit );
+
+	// Converts a visdef to macro syntax
+	Cached ConvertIconToMacro ( MvRequest& req, Cached defVal, int id = 1 );
+
+	// Utility function, will call the correct converter
+	Cached Convert(MvRequest &);
+
+	// Static Methods
+	// Find the object path associated to a request
+	// which describes the object
+	static Cached ObjectPath ( const MvRequest& request );
+
+	// Find the object name associated to a request
+	// which describes the object
+	static Cached ObjectName ( const MvRequest& request, const char* = "",
+			     int id = 0, bool updateId = false );
+
+	// Generate a number to tell variable names apart
+	static int GenerateId(const char *name );
+
+	// indicates if the value has characters
+	static bool IsAName ( const char* value );
+
+	// indicates if the request has been called from a macro
+	static bool CalledFromMacro ( const MvRequest& request );
+
+	static Cached IconClass ( const MvRequest&);
+
+	// Obtain the name of the object, without the extension
+	static Cached StripExtension ( const char* value );
+
+	// Converts a name with spaces to a name with underscores
+	static Cached SpaceToUnderscore ( const char* nameWithSpaces );
+
+	// Obtain the default Visdef name
+	static Cached DefaultVisDefName ( int treeNode );
+
+	// Check if visdefs are from the same Class
+	// EXCEPTION:  PCONT(NORMAL) and PCONT(ISOTACHS) are assumed to
+	// belong from different Classes
+	// Return : 
+	//          TRUE  : same class
+	//          FALSE : different class
+	static bool CheckVisDefClass (const MvRequest&, const MvRequest&);
+
+	static Cached GenerateName(MvRequest req);
+
+	// Destructor
+	virtual ~ObjectInfo() {}
+
+private:
+
+	CachedList description_;
+	static NamesMap namesMap_;
+	bool       hasAction_;
+	bool       isPrint_;
+	string linePrefix_;
+
+	// No copy allowed
+	ObjectInfo(const ObjectInfo&);
+	ObjectInfo& operator=(const ObjectInfo&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/ObjectList.cc b/src/uPlot/ObjectList.cc
new file mode 100644
index 0000000..15bd209
--- /dev/null
+++ b/src/uPlot/ObjectList.cc
@@ -0,0 +1,837 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Assertions.hpp>
+#include <MvPath.hpp>
+#include <MvRequest.h>
+#include <MvLanguage.h>
+#include <MvRequestUtil.hpp>
+
+#include "ObjectList.h"
+#include "PlotModConst.h"
+
+MvRequest&
+ObjectList::Instance()
+{
+	static MvRequest objectList = mars.setup; // hides the global "mars.setup"
+
+/*
+	MvRequest reqObj = mars.setup; // hides the global "mars.setup"
+
+	// Reads uPlot resources
+	string filename(getenv("METVIEW_DIR_SHARE"));
+	filename += "/etc/uPlotTable";
+	MvRequest uPlotRes;
+	uPlotRes.read(filename.c_str());
+
+#if 0
+int i = 0;
+objectList.save("/tmp/cgk/data/ObjectList.txt");
+objectList.rewind();
+	while ( objectList )
+	{
+		i++;
+		objectList.advance();
+	}
+	cout << "Number total resources = " << i << endl;
+
+
+	i = 0;
+uPlotRes.save("/tmp/cgk/data/uPlotTable.txt");
+	uPlotRes.rewind();
+	while ( uPlotRes )
+	{
+		i++;
+		uPlotRes.advance();
+	}
+	cout << "Number total resources = " << i << endl;
+
+i = 0;
+objectList.rewind();
+uPlotRes.rewind();
+objectList = objectList + uPlotRes;
+objectList.rewind();
+	while ( objectList )
+	{
+		i++;
+		objectList.advance();
+	}
+	cout << "Number total resources = " << i << endl;
+
+objectList.rewind();
+objectList.save("/tmp/cgk/data/ObjectList1.txt");
+#else
+//	Merge Mars setup and uPlot object list
+	reqObj.rewind();
+	uPlotRes.rewind();
+	reqObj = reqObj + uPlotRes;
+	static MvRequest objectList = reqObj;
+#endif
+*/
+	return objectList;
+}
+
+MvRequest
+ObjectList::Find ( const Cached& name, const Cached& classe)
+{
+	MvRequest& objectList = ObjectList::Instance();
+
+	objectList.rewind();
+	while ( objectList )
+	{
+		if ( objectList.getVerb() == name  &&
+		     objectList ("class") == classe )
+			return objectList.justOneRequest();
+
+		objectList.advance();
+	}
+
+	return MvRequest ("EMPTY");
+}
+
+int
+ObjectList::FindAll ( const Cached& name, MvRequest& list)
+{
+	MvRequest& objectList = ObjectList::Instance();
+	objectList.rewind();
+	int count = 0;
+	while ( objectList )
+	{
+		if ( objectList.getVerb() == name )
+		{
+			list = list + objectList.justOneRequest();
+			count++;
+		}
+
+		objectList.advance();
+	}
+
+	return count;
+}
+
+int
+ObjectList::FindAll ( const Cached& name, const Cached& classe, MvRequest& list)
+{
+	MvRequest& objectList = ObjectList::Instance();
+	objectList.rewind();
+	int count = 0;
+	while ( objectList )
+	{
+		if ( objectList.getVerb() == name &&
+		     objectList("class") == classe )
+		{
+			list = list + objectList.justOneRequest();
+			count++;
+		}
+
+		objectList.advance();
+	}
+
+	return count;
+}
+
+//
+// -- METHOD :  Find
+//
+// -- PURPOSE: Given a parameter, the method finds the list of values 
+//             associated to it. 
+//
+// -- INPUT :
+//
+// -- OUTPUT :  This method returns ALL the values
+//               as a list in Mars Languade ( ex. "VALUE1/VALUE2/VALUE3" )
+Cached
+ObjectList::Find( const Cached& name, const Cached& classe, const Cached& param )
+{
+	MvRequest oneRequest = Find ( name, classe );
+	Cached listValues = oneRequest( param );
+	Cached oneValue;
+	for ( int i=1; i<oneRequest.countValues( param ); i++ )
+	{
+		oneRequest.getValue( oneValue, param, i );
+		listValues = listValues + "/" + oneValue;
+	}
+
+	return  listValues;
+}
+
+//
+// -- METHOD :  FindMainRequestValue
+//
+// -- PURPOSE: Given a parameter, the method finds the dominant
+//             request associated to the parameter, and returns
+//             the associated value
+//
+//             The idea here is that there is always one dominant
+//             request in a list of request (PLOT_SUPERPAGE, and
+//             DROP are exemples of "dominant" requests).
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+Cached
+ObjectList::FindMainRequestValue ( const Cached& requestVerb, 
+				   const Cached& parameter )
+{
+	return Find ( "request", requestVerb, parameter );
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+Cached
+ObjectList::FindGraphicsEngine ( const MvRequest& request )
+{      
+	// Option 1. Try to detect an Graphics Engine 
+	//           associated with the subrequest
+	Cached  geName = request ( "GRAPHICS_ENGINE" );
+	if ( (const char*) geName ) // Found it
+		return geName;
+
+	// Option 2. Look for the default in the PM Table
+	geName = Find ("graphics_engine", "Default", "choice");
+	ensure ( (const char*) geName != 0);
+
+	return geName;
+}
+
+Cached ObjectList::FindView(const MvRequest &request)
+{
+	// First check if there's any view field in the request.
+	// This way an application can specify which view it wants
+	// if the default view for the data unit is not the right one.
+	Cached viewName = request("_VIEW");
+
+	// If not, check the given view for data unit.
+	if ( ! (const char *) viewName )
+		viewName = Find("request",request.getVerb(),"view");
+  
+	if ( (const char *) viewName )
+		return viewName;
+	else
+		return DEFAULTVIEW.c_str();
+}
+
+MvRequest
+ObjectList::FindReqService(const char* classe, const char* action)
+{
+	const char* cval;
+	bool found = false;
+
+	// Find all requests associate to "class"
+	MvRequest reqAll;
+	FindAll("state",classe,reqAll);
+
+	// Find service related to "action"
+	while ( reqAll )
+	{
+		reqAll.iterInit( "action" );
+		while ( reqAll.iterGetNextValue( cval ) )
+		{
+			if ( !action || strcmp ( cval, action ) == 0 )
+			{
+				found = true;
+				break;
+			}
+		}
+
+		if ( found )
+			return reqAll.justOneRequest();
+
+		reqAll.advance();
+	}
+
+	return MvRequest();
+}
+
+string
+ObjectList::FindService(const char* classe, const char* action)
+{
+	// Find request 
+	MvRequest req = FindReqService(classe,action);
+	if ( req )
+		return string(req("service"));
+
+	return string("");
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+Cached
+ObjectList::DefaultVisDefClass (const char* dataUnitVerb)
+{
+	require (dataUnitVerb != 0);
+
+	// Find out the name of the VisDef from the Plot Mod Table which
+	// contains the relation between DataUnits and VisDefs
+	Cached defaultVisDefClass = Find ("dataunit", dataUnitVerb,"defaultVisDef");
+	ensure ( (const char*) defaultVisDefClass != 0);
+
+	return defaultVisDefClass;
+}
+
+// -- METHOD : CheckValidVisDef
+//
+// -- PURPOSE:
+//
+// -- INPUT  : 1. the name of a visDef 
+//             2. the name of a data unit
+//             3. the specific parameter to be checked (default=listVisDef)
+//
+// -- OUTPUT : Yes - The VisDef is accepted for that data unit
+//             No -  The VisDef does not match the data unit 
+bool
+ObjectList::CheckValidVisDef ( const char* duClass, const char* vdClass, const char* vdPar )
+{
+	require ( duClass != 0 );
+	require ( vdClass != 0 );
+
+	// Retrieve the list of acceptable visdefs in the Object List
+     const char* param = ( vdPar ) ? vdPar : "listVisDef";
+	Cached listVisDef = Find ("dataunit", duClass, param);
+
+     // If no visdefs found, try the default key "listVisDef" 
+     if ( (const char*)listVisDef == 0 && vdPar )
+          listVisDef = Find ("dataunit", duClass, "listVisDef");
+
+	ensure ( (const char*)listVisDef != 0);
+	
+	// Verify if the visDefClass belongs to the VisDefList
+	return strstr( (const char*)listVisDef, vdClass );
+}
+
+bool
+ObjectList::CheckValidVisDef ( const char* duClass, const char* vdClass, int ndimFlag )
+{
+     require ( duClass != 0 );
+     require ( vdClass != 0 );
+
+     // Get visdef's key strings according to the input flag
+     vector<string> vstr;
+     VisDefNDimFlags ( ndimFlag,vstr );
+
+     // Check if visdef is valid
+     // Use the default key string
+     if ( vstr.size() == 0 || vstr.size() > 1 )
+          return ObjectList::CheckValidVisDef(duClass,vdClass,"listVisDef");
+
+     return ObjectList::CheckValidVisDef(duClass,vdClass,vstr[0].c_str());
+}
+
+#if 0
+// MAYBE METVIEW 4 WILL NEED THIS FUNCTION IF IT STARTS HANDLING PTACH
+
+// -- METHOD :  CheckValidVisDef
+//
+// -- PURPOSE:  Check if VisDef is valid using the Specific Valid Visdef
+//              entry. If there is no such entry in the PlotModTable,
+//              try to check in the Common Valid Visdef entry.
+//              The reasons are that:
+//              1) PGRIB accepts PWIND during the Drop process because
+//                 PlotMod does not open the grib file to check if it
+//                 contains any VECTOR_FIELD. This is done during the
+//                 drawing process.
+//              2) PlotMod does not have an icon of the type PTACH, so
+//                 unfortunately there is an special treatment to deal 
+//                 with PTACHs.
+//
+//  -- INPUT :  1. the visDef request
+//              2. the name of a data unit
+//
+//  -- OUTPUT:  Yes - The VisDef is accepted for that data unit
+//              No -  The VisDef does not match the data unit 
+bool
+ObjectList::CheckValidVisDef ( const char* dataunitClass, const MvRequest& request )
+{
+	require ( dataunitClass != 0 );
+
+        // Check if visdef is of type PTACH
+	const char* visdefClass;
+	if ( ObjectList::IsVisDefIsotachs (request) )
+		visdefClass =  PTACH;
+	else
+		visdefClass = request.getVerb();
+
+	// Retrieve the list of acceptable visdefs in the Object List
+	Cached listVisDef = Find ("dataunit", dataunitClass, "listSpecVisDef");
+	if ( (const char*) listVisDef )
+	{
+		// Verify if visDefClass belongs to the VisDefList
+		if ( strstr( (const char*)listVisDef, visdefClass ) )
+			return true;
+		else
+			return false;
+	}
+	else
+		return CheckValidVisDef(dataunitClass,visdefClass);
+}
+#endif
+
+bool
+ObjectList::CheckValidVisDefList ( const char* duClass, MvIconList& visdefList, const char* vdpar )
+{
+	MvIconList tmplist;
+	MvIcon     oneIcon;
+	for ( MvListCursor jj = visdefList.begin(); jj != visdefList.end(); jj++ )
+	{
+		oneIcon = *jj;
+		if ( ObjectList::CheckValidVisDef(duClass, oneIcon.Request().getVerb(),vdpar) )
+			tmplist.push_back(oneIcon);
+	}
+
+	visdefList = tmplist;
+
+	return  ( visdefList.size() > 0 ) ? true : false;
+}
+
+void
+ObjectList::VisDefNDimFlags ( int dimFlag, vector<string>& vstr )
+{
+     // No info about data dimension
+     vstr.clear();
+     if ( dimFlag == 0 )
+          return;
+
+     // Data contains 1-D data
+     if ( dimFlag & 1 )
+          vstr.push_back("1D_VISDEF");
+
+     // Data contains 2D data
+     if ( dimFlag & 2 )
+          vstr.push_back("2D_VISDEF");
+}
+
+
+MvRequest
+ObjectList::UserPreferencesRequest(const char* name)
+{
+	// Read the objectFileName in the METVIEW ObjectList
+	MvRequest prefRequest;
+	const char* requestFileName = Find("object", name)("default_name");
+
+	// Get the filename full path
+	string tt = MakeUserPrefPath (requestFileName);
+	const char* filename = tt.c_str();
+
+	// Do we have a preference ?
+	if ( ( FileCanBeOpened ( filename, "rw" ) == false ) || ( FileHasValidSize ( filename ) == false ))
+	{
+		// Try first to read the icon from the user Defaults directory.
+		// If fails then creates a default version
+		prefRequest = ObjectList::UserDefaultRequest  (name);
+		prefRequest.save ( filename  );
+		return prefRequest;
+	}
+
+	prefRequest.read ( filename );
+
+	return prefRequest;
+}
+
+// -- METHOD :  UserDefaultRequest
+//
+// -- PURPOSE:  For each type of object, read a request 
+//              based on the user's default
+//
+// -- INPUT  :  request name
+//
+// -- OUTPUT :  request
+//
+MvRequest
+ObjectList::UserDefaultRequest(const char* requestName)
+{
+	require ( requestName != 0 );
+
+	// Read the objectFileName in the METVIEW ObjectList
+	const char* requestFileName = Find("object", requestName)("default_name"); 
+	ensure ( requestFileName != 0);
+
+	// Determine  the default path for the icon
+	// Find the file which contains the request 
+	string fullName = MakeUserDefPath (requestFileName);
+
+	// Create a new request and read its contents
+	// for the file in the default directory
+	MvRequest defaultRequest;
+	if ( FileCanBeOpened ( fullName.c_str(), "r" ) == true )
+	{
+		defaultRequest.read (fullName.c_str());
+		if ( defaultRequest.countParameters() == 0 )
+			defaultRequest =  ObjectList::CreateDefaultRequest(requestName);
+	}
+	else
+	{
+		defaultRequest =  ObjectList::CreateDefaultRequest(requestName);
+	}
+
+	return defaultRequest;
+}
+
+// -- METHOD :  ExpandRequest
+//
+// -- PURPOSE:  Expand the request according to the Metview definition
+//              and rules
+//
+// -- INPUT  :  Request, expansion flag
+//
+// -- OUTPUT :  Expanded request
+MvRequest
+ObjectList::ExpandRequest ( const MvRequest& reqst, long expandFlag )
+{
+	// Expand the request against the METVIEW definition file
+	MvRequest objectDef = Find ( "object", reqst.getVerb() );
+	Cached rulesFileName = objectDef ( "rules_file" );
+	Cached defFileName   = objectDef ( "definition_file" );
+
+	if ( expandFlag == 0 )
+		expandFlag           = objectDef ( "expand" );	
+
+	MvLanguage langMetview ( (const char*) defFileName,
+				 (const char*) rulesFileName,
+				 expandFlag );
+
+	return langMetview.expandOne ( reqst );
+}
+
+// -- METHOD :  CreateDefaultRequest
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+MvRequest
+ObjectList::CreateDefaultRequest ( const char* requestName, int expandFlag )
+{
+ 	MvRequest request ( requestName );
+	MvRequest expandedRequest = ObjectList::ExpandRequest ( request,expandFlag );
+	
+	return expandedRequest;
+
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+bool
+ObjectList::IsDataUnit( const Cached& requestVerb )
+{
+        if ( !requestVerb )
+	  	return false;
+
+	MvRequest objectDef = Find ( "dataunit", requestVerb );
+
+	return objectDef("class") == requestVerb;
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+bool
+ObjectList::IsWindow ( const Cached& requestVerb )
+{
+        if ( !requestVerb )
+		return false;
+
+	MvRequest objectDef = Find ( "window", requestVerb );
+
+	return objectDef ( "class" ) == requestVerb;
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+bool
+ObjectList::IsView ( const Cached& requestVerb )
+{
+        if ( !requestVerb )
+		return false;
+
+	MvRequest objectDef = Find ( "view", requestVerb );
+	
+	return objectDef ( "class" ) == requestVerb;
+}
+
+bool
+ObjectList::IsGeographicalView ( const string& verb )
+{
+    if ( verb.empty() )
+        return false;
+
+    // Find viewname in the registered view list
+    MvRequest objectDef = Find ( "view", verb.c_str() );
+
+    // Check if this is a geographical view
+    string class1 = (const char*)objectDef ( "class" );
+    return (!class1.empty() && (class1 == GEOVIEW || class1 == MAPVIEW) );
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+bool
+ObjectList::IsVisDef( const Cached& requestVerb )
+{
+        if ( !requestVerb )
+		return false;
+
+	MvRequest objectDef = Find ( "visdef", requestVerb );
+	
+	return objectDef ( "class" ) == requestVerb;
+}
+
+// -- METHOD :  IsVisDefContour
+//
+// -- PURPOSE:  Indicate if the request is a contouring request
+//
+// -- INPUT  :  Request verb
+//
+// -- OUTPUT :  true/false
+
+bool
+ObjectList::IsVisDefContour ( const char* verb )
+{
+	return ( verb == MCONT || verb == PCONT );
+}
+
+// -- PURPOSE: Indicate if the request is a PTACH visdef  
+//
+// -- INPUT  : Request
+//
+// -- OUTPUT : true/false
+bool
+ObjectList::IsVisDefIsotachs( const MvRequest& request )
+{
+	//If it is PCONT, then check for Data_transformation
+	if ( IsVisDefContour(request.getVerb() ) )
+	{
+		const char* data = (const char*)request("CONTOUR_DATA_TRANSFORMATION");
+		if ( !data ) //no information about data_transformation
+			return false;
+
+		if ( strcmp(data,ISOTACHS) == 0 )
+			return true;
+		else
+			return false;
+	}
+
+	return false;
+}
+
+// -- METHOD :  IsVisDefCoastlines
+//
+// -- PURPOSE:  Indicate if the request is a coastline request
+//
+// -- INPUT  :  Request verb
+//
+// -- OUTPUT :  true/false
+
+bool
+ObjectList::IsVisDefCoastlines ( const Cached& requestVerb )
+{
+	return ( requestVerb == MCOAST || requestVerb == PCOAST );
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+bool
+ObjectList::IsVisDefText ( const Cached& requestVerb )
+{
+	return ( requestVerb == MTEXT || requestVerb == PTEXT || requestVerb == ANNOTATION );
+}
+
+bool
+ObjectList::IsVisDefLegend( const Cached& requestVerb )
+{
+	return ( requestVerb == MLEGEND );
+}
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+bool
+ObjectList::IsAutomaticTitleText ( const MvRequest& request )
+{
+	Cached verb = request.getVerb();
+	if ( ( !(ObjectList::IsVisDefText( verb )) ) ||
+	     ( request ( "TEXT_ORIGIN" ) == Cached ( "USER" ) ) ||
+	     ( request ( "TEXT_ORDER_MODE" ) == Cached ( "USER" ) ) )
+		return false;
+
+	return true;
+}
+
+// -- METHOD :  IsAxis
+//
+// -- PURPOSE:  Indicate if the request is a PAXIS request
+//
+// -- INPUT  :  Request verb
+//
+// -- OUTPUT :  true/false
+bool
+ObjectList::IsVisDefAxis ( const Cached& requestVerb )
+{
+	return ( requestVerb == MAXIS || requestVerb == PAXIS );
+}
+
+bool
+ObjectList::IsVisDefGraph ( const Cached& requestVerb )
+{
+	return ( requestVerb == MGRAPH || requestVerb == PGRAPH );
+}
+
+bool
+ObjectList::IsLayer ( const char* verb )
+{
+    return ( strcmp(verb,"LAYER") == 0 || strcmp(verb,"layer") == 0 );
+}
+
+// -- METHOD :  MacroName
+//
+// -- PURPOSE:  Find the macro name associated to a METVIEW object
+//
+// -- INPUT  :  The Object's class
+//
+// -- OUTPUT :  The macro name associated to the object
+Cached
+ObjectList::MacroName ( const Cached& iconClass )
+{
+	Cached retVal = Find ( "object", iconClass, "macro" );
+	if ( ! retVal )
+		retVal = iconClass;
+
+	return retVal;
+}
+
+// -- METHOD :  CalledFromMacro
+//
+// -- PURPOSE:  Indicate if the request has been called from a macro
+//
+// -- INPUT  :  A request
+//
+// -- OUTPUT :  true/false
+bool
+ObjectList::CalledFromMacro ( const MvRequest& request )
+{
+	int i = request ( "_CALLED_FROM_MACRO" );
+	if ( i == 1 )
+		return true;
+
+	return false;
+}
+
+// -- METHOD :  GetCompanion
+//
+// -- PURPOSE:  Return the expected parameter to make a pair in a vector field.
+//              ex. U/V, D/T... and the correspondent wind mode
+//
+// -- INPUT  :  A parameter (the first in the pair)
+//
+// -- OUTPUT :  The second parameter of the pair and the related wind mode plotting
+//              or "no_pair" for scalar data 
+//
+void ObjectList::GetCompanion ( const string& param, string& pair, string& mode )
+{
+	MvRequest& objectList = ObjectList::Instance();
+
+	objectList.rewind();
+	string comp("companion");
+	while ( objectList )
+	{
+		if ( objectList.getVerb() == comp  && (const char*)objectList("class") == param )
+        {
+            pair = (const char*)objectList( "friend" );
+            mode = (const char*)objectList("mode") ? (const char*)objectList("mode") : "";
+            return;
+        }
+		objectList.advance();
+	}
+
+    pair = "no_pair";
+    mode = "";
+	return;
+}
+
+// -- METHOD :  IsImage
+//
+// -- PURPOSE:  Return true if the input ident is an image field..
+//              Note that mars.param is not always defined for satellite
+//              images. In theory, mars.ident should only be defined
+//              if the GRIB is satellite, so we rely on this.
+//
+//
+bool
+ObjectList::IsImage ( const char* ident )
+{
+	return (ident != NULL);
+}
+
+bool
+ObjectList::IsService ( const char* classe, const char* action, bool context )
+{
+	MvRequest req = FindReqService(classe,action);
+	if ( !req )
+		return false;
+
+	if ( context && !(int)req("context"))
+		return false;
+
+	return true;
+}
+
+bool ObjectList::IsDefaultValue(MvRequest &in, const char *param )
+{
+	bool retVal = false;
+
+	MvRequest defReq = CreateDefaultRequest(in.getVerb() );
+
+	if ( IsParameterSet(in,param) && IsParameterSet(defReq,param) )
+	{
+		if ( is_number(in(param)) && is_number(defReq(param)) )
+		   retVal = ( (double)in(param) == (double)defReq(param) );
+		else
+		   retVal = (strcmp(in(param),defReq(param)) == 0 );
+	}
+
+	return retVal;
+}
diff --git a/src/uPlot/ObjectList.h b/src/uPlot/ObjectList.h
new file mode 100644
index 0000000..8c0beb3
--- /dev/null
+++ b/src/uPlot/ObjectList.h
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File ObjectList
+// Gilberto Camara - ECMWF Sep 97
+//
+// .NAME:	
+//  ObjectList
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  A class for handling methods associated
+//  with the ObjectList
+//
+// .CLIENTS:
+//  Most modules in PlotMod
+//
+//
+// .RESPONSABILITIES:
+//  Provide configuration information for
+//  other modules in PlotMod, by use of static methods
+//
+//
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef ObjectList_H
+#define ObjectList_H
+
+#include <MvRequest.h>
+#include <MvIconDataBase.h>
+
+class ObjectList {
+
+public:
+
+	static MvRequest& Instance();
+
+	static MvRequest Find ( const Cached& name, const Cached& classe );
+
+	static int FindAll ( const Cached& name, MvRequest& out);
+
+	static int FindAll ( const Cached& name, const Cached& classe, MvRequest& out);
+
+	static Cached Find    ( const Cached& name,
+				const Cached& classe,
+				const Cached& param );
+
+	static Cached FindMainRequestValue ( const Cached& requestVerb,
+					     const Cached& parameter );
+
+	static Cached FindGraphicsEngine ( const MvRequest& reqst );
+	static Cached FindView ( const MvRequest& reqst );
+	static MvRequest FindReqService(const char* classe, const char* action);
+	static string FindService(const char* classe, const char* action);
+
+	static Cached DefaultVisDefClass  ( const char* dataUnitVerb );
+
+     static bool CheckValidVisDef ( const char*, const char*, const char* );
+     static bool CheckValidVisDef ( const char*, const char*, int = 0);
+     static bool CheckValidVisDefList ( const char*, MvIconList&, const char* = 0 );
+     //static bool CheckValidVisDef ( const char* dataunitClass, const MvRequest& reqst );
+
+     static void VisDefNDimFlags ( int, vector<string>& );
+
+	static MvRequest UserPreferencesRequest ( const char* verb );
+	static MvRequest UserDefaultRequest  ( const char* requestName );
+
+	static MvRequest ExpandRequest ( const MvRequest&, long );
+
+	// Create a request in case there isn't one
+	static MvRequest CreateDefaultRequest( const char*, int expandFlag=EXPAND_DEFAULTS );
+
+	// Check objects
+	static bool IsDataUnit			( const Cached& );
+	static bool IsImage				( const char* );
+	static bool IsService			( const char*, const char* action=0, bool context=false );
+	static bool IsDefaultValue		( MvRequest&, const char * );
+	static bool IsWindow			( const Cached& );
+	static bool IsView				( const Cached& );
+    static bool IsGeographicalView  ( const string& );
+	static bool IsVisDef			( const Cached& );
+	static bool IsVisDefContour		( const char* );
+	static bool IsVisDefIsotachs    ( const MvRequest& );
+	static bool IsVisDefCoastlines	( const Cached& );
+	static bool IsVisDefText        ( const Cached& );
+	static bool IsVisDefLegend		( const Cached& );
+	static bool IsVisDefAxis        ( const Cached& );
+	static bool IsVisDefGraph		( const Cached& );
+	static bool IsAutomaticTitleText( const MvRequest& );
+    static bool IsLayer             ( const char* );
+	static bool CalledFromMacro		( const MvRequest& );
+
+	static Cached MacroName ( const Cached& iconClass   );
+	static void GetCompanion ( const string&, string&, string& );
+
+private:
+
+	// Contructor
+	ObjectList();
+
+	// Destructor
+	~ObjectList();
+};
+
+#endif
diff --git a/src/uPlot/ObjectSpec.OutputFormats b/src/uPlot/ObjectSpec.OutputFormats
new file mode 100644
index 0000000..df2276d
--- /dev/null
+++ b/src/uPlot/ObjectSpec.OutputFormats
@@ -0,0 +1,286 @@
+############################################
+#  User Interface (Editor) definition
+############################################
+
+object,
+    class               = PSOUTPUT,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/PSOutputDef',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/PSOUTPUT.icon',
+    default_name        = PS Output,
+    help_page           = Output_Formats_and_Destinations,
+    type                = Window,
+    macro               = ps_output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+object,
+    class               = KMLOUTPUT,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/KMLOutputDef',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/PSOUTPUT.icon',
+    default_name        = KML Output,
+    help_page           = Output_Formats_and_Destinations, #-- not the best one!
+    type                = Window,
+    macro               = kml_output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+object,
+    class               = SVGOUTPUT,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/SVGOutputDef',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/SVGOUTPUT.icon',
+    default_name        = SVG Output,
+    help_page           = Output_Formats_and_Destinations, #-- not the best one!
+    type                = Window,
+    macro               = svg_output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+object,
+    class               = PNGOUTPUT,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/PNGOutputDef',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/PSOUTPUT.icon',
+    default_name        = PNG Output,
+    help_page           = Output_Formats_and_Destinations, #-- not the best one!
+    type                = Window,
+    macro               = png_output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+object,
+    class               = PDFOUTPUT,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/PDFOutputDef',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/PSOUTPUT.icon',
+    default_name        = PDF Output,
+    help_page           = Output_Formats_and_Destinations, #-- not the best one!
+    type                = Window,
+    macro               = pdf_output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+object,
+    class               = EPSOUTPUT,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/EPSOutputDef',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/PSOUTPUT.icon',
+    default_name        = EPS Output,
+    help_page           = Output_Formats_and_Destinations, #-- not the best one!
+    type                = Window,
+    macro               = eps_output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+
+# REMOVE LATER #############################
+# This is a temporary solution to make the Metview 3 output, e.g. DEVICE_DRIVER,
+# backwards compatible with Metview 4
+object,
+    class               = DEVICE_DRIVER,
+    can_be_created      = False,
+    definition_file     = '$METVIEW_DIR_SHARE/etc/DeviceDriverDef',
+    rules_file          = '$METVIEW_DIR_SHARE/etc/DeviceDriverRules',
+    pixmap            	= '$METVIEW_DIR_SHARE/icons/DEVICE.icon',
+    default_name        = Output Device,
+    help_page           = Output_Formats_and_Destinations, #-- not the best one!
+    type                = Window,
+    macro               = output,
+    editor_type         = SimpleEditor,
+    graphical_editor  	= NoEditor,
+    expand              = 16, # EXPAND_2ND_NAME! # 32,#EXPAND_FIRST_NAME
+    doubleclick_method  = Edit
+
+state,
+	class    = DEVICE_DRIVER,
+	action   = execute,
+	service  = uPlotBatch
+
+
+############################################
+#  File definition
+############################################
+
+object,
+	class              = PSFILE,
+	check              = False,
+	type               = File,
+	default_object     = False,
+	default_name	   = Postscript File,
+	doubleclick_method = Visualise,
+	editor_type        = TextEditor,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/PSFILE.icon'
+
+object,
+	class              = KML,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/KML.icon',
+	default_name       = HTML File,
+	editor_type        = TextEditor
+
+object,
+	class              = SVG,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/SVG.icon',
+	default_name       = SVG File,
+	editor_type        = TextEditor
+
+object,
+	class              = PNG,
+	check       	   = False,
+	default_object     = False,
+	type        	   = File,
+	pixmap      	   = '$METVIEW_DIR_SHARE/icons/PNG.icon',
+	default_name       = PNG File,
+	editor_type 	   = NoEditor
+
+object,
+	class              = PDF,
+	check              = False,
+	default_object     = False,
+	type               = File,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/PDF.icon',
+	default_name       = PDF File,
+	editor_type        = NoEditor
+
+object,
+	class              = EPS,
+	check              = False,
+	type               = File,
+	default_object     = False,
+	default_name	   = EncapsulatedPostscript File,
+	doubleclick_method = Visualise,
+	editor_type        = TextEditor,
+	pixmap             = '$METVIEW_DIR_SHARE/icons/PSFILE.icon'
+
+
+############################################
+#  Output Formats (to be used by uPlot)
+############################################
+
+output_format,
+	class		= PS,
+	output  	= PSOUTPUT
+
+output_format,
+	class		= KML,
+	output  	= KMLOUTPUT
+
+output_format,
+	class		= SVG,
+	output  	= SVGOUTPUT
+
+output_format,
+	class		= PNG,
+	output  	= PNGOUTPUT
+
+output_format,
+	class		= PDF,
+	output  	= PDFOUTPUT
+
+output_format,
+	class		= EPS,
+	output  	= EPSOUTPUT
+
+
+############################################
+#  State machine definition
+############################################
+
+state,
+	class	     = PSFILE,
+	action       = visualise,
+	service      = '($METVIEW_PS_VIEWER \"%s\")'
+
+state,
+	class        = KML,
+	action	     = visualise,
+	service      = '($METVIEW_KML_VIEWER \"%s\")'
+
+state,
+	class        = KML,
+	action	     = examine,
+	service      = macroedit
+
+state,
+	class	     = KML,
+	action	     = save,
+	service	     = savepool
+
+state,
+	class        = SVG,
+	action	     = visualise,
+	service      = '($MV_BROWSER_NAME \"%s\")'
+
+state,
+	class        = SVG,
+	action	     = examine,
+	service      = '(inkscape \"%s\")'
+
+state,
+	class        = PNG,
+	action	     = visualise,
+	service      = '($METVIEW_PNG_VIEWER \"%s\")'
+
+state,
+	class        = PNG,
+	action	     = examine,
+	service      = '($METVIEW_RASTER_EDITOR \"%s\")'
+
+state,
+	class        = PDF,
+	action	     = visualise,
+	service      = '($METVIEW_PDF_VIEWER \"%s\")'
+
+state,
+	class	     = EPS,
+	action       = visualise,
+	service      = '($METVIEW_PS_VIEWER \"%s\")'
+
+#state,
+#	class        = JPEG,
+#	action	     = visualise,
+#	service      = '($METVIEW_JPEG_VIEWER \"%s\")'
+
+#state,
+#	class        = JPEG,
+#	action	     = examine,
+#	service      = '($METVIEW_RASTER_EDITOR \"%s\")'
+
+#state,
+#	class        = GIF,
+#	action	     = visualise,
+#	service      = '($METVIEW_GIF_VIEWER \"%s\")'
+
+#state,
+#	class        = GIF,
+#	action	     = examine,
+#	service      = '($METVIEW_RASTER_EDITOR \"%s\")'
+
+#state,
+#	class        = TIFF,
+#	action	     = visualise,
+#	service      = '($METVIEW_TIFF_VIEWER \"%s\")'
+
+#state,
+#	class        = TIFF,
+#	action	     = examine,
+#	service      = '($METVIEW_RASTER_EDITOR \"%s\")'
diff --git a/src/uPlot/OutputFormatAction.cc b/src/uPlot/OutputFormatAction.cc
new file mode 100644
index 0000000..569b061
--- /dev/null
+++ b/src/uPlot/OutputFormatAction.cc
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// OutputFormatAction class
+//
+
+#include "OutputFormatAction.h"
+#include "PlotMod.h"
+
+void
+OutputFormatAction::Execute (PmContext& context)
+{
+	// Save the output definition request to be used in the plotting routine
+	MvRequest req = context.InRequest().justOneRequest();
+
+	// Check if request has a flag indicating that it comes from the Macro module
+	if ( PlotMod::Instance().CalledFromMacro ( req ) )
+		PlotMod::Instance().CalledFromMacro (true);
+
+#if 1
+	// FAMI062010 THIS CODE SHOULD BE REMOVED LATER
+	// For TEMPORARY backwards compatibiliy we are translating Metview 3 
+	// output format definition, e.g. DEVICE_DRIVER, to Metview 4 format
+	MvRequest newreqdev;
+	MvRequest reqdev = req("OUTPUT_DEVICES");
+	if ( strcmp(reqdev.getVerb(),"DEVICE_DRIVER") == 0 )
+	{
+		const char* format = reqdev("FORMAT");
+		if ( !format || strcmp(format,"POSTSCRIPT") == 0 )
+		{
+			newreqdev.setVerb("PSOUTPUT");
+		}
+		else if ( strcmp(format,"JPEG") == 0 )
+		{
+			newreqdev.setVerb("JPEGOUTPUT");
+		}
+		else if ( strcmp(format,"PNG") == 0 )
+		{
+			newreqdev.setVerb("PNGOUTPUT");
+		}
+		else //SCREEN
+		{
+
+		}
+
+		newreqdev ("OUTPUT_FULLNAME") = reqdev ("FILE_NAME");
+		req("OUTPUT_DEVICES") = newreqdev;
+	}
+#endif
+
+// Save output definition
+	PlotMod::Instance().OutputFormat(req);
+
+	// Advance the input context
+	context.Advance();
+
+	// Save the remaining requests.
+	// It will skip all the previous requests and only save the
+	// remaining ones. Usually, the skipped request is the first
+	// request, such as ODB_MANAGER and NETCDF_MANAGER. So, there
+	// will be no problems to save only the remaining requests.
+	// If this situation changes, this function.will need to be updated.
+	//MvRequest remainingReqs;
+    //remainingReqs.copyFromCurrent(context.InRequest());
+
+    // Update context
+	//context.Update(remainingReqs);
+	context.SetFirstInRequestToCurrent();
+}
+
+//
+// This is the exemplar object for the OutputFormat Action class
+//
+static OutputFormatAction outputFormatActionInstance("OutputFormat");
diff --git a/src/uPlot/OutputFormatAction.h b/src/uPlot/OutputFormatAction.h
new file mode 100644
index 0000000..52d225b
--- /dev/null
+++ b/src/uPlot/OutputFormatAction.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  OutputFormatAction
+//
+// .AUTHOR:
+//  Fernando Ii
+//
+// .SUMMARY:
+//  Describes the OutputFormatAction class, a derived class
+//  for the various types of requests in uPlot which requires
+//  saving all the output formats related to this plot.
+//
+//
+// .CLIENTS:
+//  PlotModAction class, called by uPlot main module
+//
+// .RESPONSABILITY:
+//  This class will provide all support for the visualisation
+//  actions whithin uPlot
+//
+// .COLLABORATORS:
+//  Builder, Matcher, Drawer
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+//
+#ifndef OutputFormatAction_H
+#define OutputFormatAction_H
+
+#include "PlotModAction.h"
+
+class OutputFormatAction: public PlotModAction
+{
+
+public:
+
+  // Constructors
+  OutputFormatAction(const Cached name): PlotModAction(name) {}
+
+  // Destructor
+  ~OutputFormatAction() {}
+
+  // Methods
+  // Overriden from PlotModAction
+  virtual void Execute ( PmContext& context );
+};
+
+#endif
diff --git a/src/uPlot/Page.cc b/src/uPlot/Page.cc
new file mode 100644
index 0000000..f92d565
--- /dev/null
+++ b/src/uPlot/Page.cc
@@ -0,0 +1,1723 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+ // File Page.CC
+// Gilberto Camara and Fernando Ii - ECMWF Mar 97
+// Lubia Vinhas                    - ECMWF Mar 98
+
+#include "Page.h"
+
+#include <Assertions.hpp>
+#include <MvApplication.h>
+#include <MvRequestUtil.hpp>
+
+#include "ObjectList.h"
+#include "PlotMod.h"
+#include "PmContext.h"
+#include "SubPage.h"
+
+Page::Page ( MvRequest& pageRequest ):
+           Presentable   ( pageRequest ),
+           firstVisible_ ( 1 ),
+           visibleCount_ (0),
+           dropShouldStay_(false)
+{
+   // Each page has its own graphics engine
+   auto_ptr <GraphicsEngine> eng ( GraphicsEngineFactory::Make ( *this ) );
+   engine_ = eng;
+
+   // Find out if there is a view associated with the request
+   MvRequest viewRequest = pageRequest.getSubrequest( "VIEW" );
+   const char* viewClass = (const char*)viewRequest.getVerb();
+   if ( viewClass && ObjectList::IsGeographicalView(viewClass) )
+   {
+      auto_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
+
+      // If AREA is not given, Magics will use the default value
+      if ( (const char*)viewRequest("AREA") )
+      {
+         Location area;
+         if ( ! proj.get()->CheckGeodeticCoordinates (area) )
+         {
+            PlotMod::Instance().MetviewError ( "Some/All Area Coordinates Invalid! Replaced by default values" );
+         }
+         viewRequest ( "AREA" )  = area.Bottom();
+         viewRequest ( "AREA" ) += area.Left();
+         viewRequest ( "AREA" ) += area.Top();
+         viewRequest ( "AREA" ) += area.Right();
+
+         double vertLong = proj.get()->CheckOriginLongitude ();
+         viewRequest ( "MAP_VERTICAL_LONGITUDE" ) = vertLong;
+      }
+      // Flag to indicate that this is a default area. This will be used by the zoom scheme
+      else
+      {
+         viewRequest("_DEFAULT_AREA") = "YES";
+      }
+
+      myRequest_  ( "VIEW" ) = viewRequest;
+      pageRequest ( "VIEW" ) = viewRequest;
+   }
+
+   // Create a new view request if there isn't any
+   if ( !viewClass || ObjectList::IsView ( viewClass ) == false )
+   {
+      viewRequest = ObjectList::CreateDefaultRequest ( DEFAULTVIEW.c_str(), EXPAND_NO_DEFAULT );
+      string name = "<" + DEFAULTVIEW + ">";
+      viewRequest ( "_NAME" )    = name.c_str();
+      viewRequest ( "_DEFAULT" ) = true;
+      pageRequest ( "VIEW" )     = viewRequest;
+      myRequest_  ( "VIEW" )     = viewRequest;
+   }
+
+   // Create a view associated to the page
+   auto_ptr <PlotModView> view ( PlotModViewFactory::Make (*this, viewRequest ) );
+   myView_ = view;
+
+   // By default, indicates that a drawing needs to be performed later.
+   // This default will be overrulled if the dropping icon triggers a call
+   // to a Service. In this case, PlotModService::endOfTask should be called
+   // and this function should perform the drawing.
+   this->HasDrawTask(true);
+
+   // Create the subpages associated to the page
+   CreateSubpages();
+}
+
+Page::Page ( const Page & old ):
+           Presentable   ( old ),
+           firstVisible_ ( 1 ),
+           visibleCount_(old.visibleCount_),
+           dropShouldStay_(old.dropShouldStay_),
+           drawingPriority_(old.drawingPriority_)
+{
+   // ZoomStacks not copied
+   // Easiest to make new projection from view request
+   auto_ptr<PmProjection> proj(  PmProjectionFactory::Make ( old.myView_->ViewRequest() ) );
+   projection_ = proj;
+
+   // Each page has its own graphics engine, create one for this page
+   auto_ptr <GraphicsEngine> eng ( GraphicsEngineFactory::Make ( *this ) );
+   engine_ = eng;
+
+   // Clone the view associated to the page and set the new owner.
+   auto_ptr <PlotModView> view ( old.GetView().Clone() ) ;
+   myView_ = view;
+   myView_->Owner(*this);
+}
+
+Page::~Page ()
+{
+   MvChildList revertedChildList = childList_;
+   revertedChildList.reverse ();
+
+   // Get Last and previous to last in child list
+   for ( MvChildIterator j = revertedChildList.begin(); j != revertedChildList.end(); ++j )
+   {
+      if ( ! ( (*j)->GetDeviceData () ) )
+         this->RemovePresentable ( *j );
+   }
+
+   // Remove Page from DataBase
+   this->RemovePageFromDataBase ();
+}
+
+string
+Page::Name()
+{
+   return (const char*)ObjectInfo::ObjectName ( myRequest_,"Page",Id() );
+}
+
+#if 0
+void
+Page::Save ()
+{
+	Cached name = ObjectInfo::ObjectName ( myRequest_,"Page",Id() );
+	Cached path = ObjectInfo::ObjectPath ( myRequest_ );
+
+	Cached fullName = path + Cached("/") + name;
+
+	MvRequest genappRequest;
+	genappRequest.read ( (const char* ) fullName );
+
+	bool changed = false;
+
+	while  ( genappRequest )
+	{
+		if ( genappRequest.getVerb() == PLOTPAGE  )
+		{
+			const char* genappName = genappRequest ( "VIEW" );
+			if ( genappName != 0 )
+			{
+				Cached viewName = mbasename ( genappName );
+				Cached newName  = myView_->Name();
+				
+				if ( ! ( viewName ==  newName ) )
+				{
+					genappRequest ( "VIEW" ) = (const char*) newName;
+					changed = true;
+				}
+			}
+
+			if ( UpdatePageParameters(genappRequest) )
+				changed = true;
+		}
+		genappRequest.advance();
+	}
+
+	if ( changed )
+	{
+		genappRequest.rewind();
+		genappRequest.save ( (const char*) fullName );
+	}
+}
+
+bool
+Page::UpdatePageParameters ( MvRequest& req)
+{
+	bool changed=false;
+
+       	if ((double)req("TOP") != myLocation_.Top()*100.)
+	{
+	       	req("TOP") = myLocation_.Top()*100.;
+	        changed = true;
+	}
+       	if ((double)req("BOTTOM") != myLocation_.Bottom()*100.)
+	{
+		req("BOTTOM") = myLocation_.Bottom()*100.;
+	        changed = true;
+	}
+	if ((double)req("LEFT") != myLocation_.Left()*100.)
+	{
+		req("LEFT") = myLocation_.Left()*100.;
+	        changed = true;
+	}
+	if ((double)req("RIGHT") != myLocation_.Right()*100.)
+	{
+		req("RIGHT") = myLocation_.Right()*100.;
+	        changed = true;
+	}
+
+	return changed;
+}
+#endif
+
+void	
+Page::Draw()
+{
+	HasDrawTask ( true );
+	this->NeedsRedrawing(true);
+
+	// Draw all my children
+	DrawChildren();
+
+	this->HasDrawTask ( false );
+	this->NeedsRedrawing ( false );
+}
+
+void	
+Page::DrawProlog()
+{
+        MvChildIterator child = childList_.begin();
+	(*child)->DrawProlog();
+}
+
+void
+Page::DrawPageHeader()
+{
+        MvChildIterator child = childList_.begin();
+	(*child)->DrawPageHeader ();
+}
+
+#if 0
+void
+Page::DrawNewPage ( Canvas& canvas )
+{
+	myView_->DrawNewPage( canvas );
+}
+
+#if 0 //D
+void
+Page::DrawFrame ( Canvas& canvas )
+{
+	myView_->DrawFrame ( canvas );
+}
+#endif
+
+void
+Page::DrawBackground ( Canvas& canvas, bool emptyBack )
+{
+//FAMI  if ( canvas.HasShared("BACKGROUND") ) return;
+
+//FAMI  canvas.SelectShared("BACKGROUND");
+
+	// Retrieve the graphics engine
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+
+	// Set background metafile
+	ge.StartPicture ( canvas, "BACKGROUND" );
+
+	// PlotModView NewPage
+	myView_->DrawNewPage( canvas );
+
+	if ( ! emptyBack )
+		// View background
+		myView_->DrawBackground( canvas );
+
+	// PlotModView Frame
+//D	myView_->DrawFrame ( canvas );
+
+	// terminate the drawing
+	ge.EndPicture ();
+
+	// Set SubPage Drawings Pendings counter
+	int subpageId = canvas.PresentableId ();
+	Presentable* subpage = Root::Instance().FindBranch ( subpageId );
+	subpage->PendingDrawingsAdd();
+}
+
+void
+Page::DrawForeground ( Canvas& canvas, bool emptyFore )
+{
+//FAMI  if ( canvas.HasShared ("FOREGROUND") ) return;
+
+//FAMI  canvas.SelectShared("FOREGROUND");
+
+	// Retrieve the graphics engine
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+
+	// Set foreground metafile
+	ge.StartPicture ( canvas, "FOREGROUND" );
+
+	// PlotModView NewPage
+	myView_->DrawNewPage( canvas );
+
+	if ( ! emptyFore )
+		// View foreground
+		myView_->DrawForeground( canvas );
+
+	// Draw Positional Text on screen
+	this->DrawText ( canvas );
+
+	// PlotModView Frame
+//D	myView_->DrawFrame ( canvas );
+
+	// terminate the drawing
+	ge.EndPicture ();
+
+	// Set SubPage Drawings Pendings counter
+	int subpageId = canvas.PresentableId ();
+	Presentable* subpage = Root::Instance().FindBranch ( subpageId );
+	subpage->PendingDrawingsAdd();
+}
+#endif
+
+// Draw Page Text, i.e. Annotation Only
+void
+Page::DrawText ( )
+{
+	// Retrieve the graphics engine
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+
+	// Draw the texts associated to this page
+	MvIconList textList;
+	RetrieveTextList ( textList );
+
+	// Look for Non Title Texts
+	MvListCursor  vdCursor;
+	for ( vdCursor = textList.begin(); vdCursor != textList.end(); ++vdCursor)
+	{		
+		MvIcon oneIcon = *( vdCursor );
+		MvRequest textRequest = oneIcon.Request();
+		if ( textRequest.getVerb() == ANNOTATION )
+		{
+			// make sure that option TEXT_TYPE is not passed to MAGICS
+//			textRequest.unsetParam("TEXT_TYPE");
+//			textRequest ( "_VERB" )  = PTEXT;
+//			textRequest ( "_CLASS" ) = PTEXT;
+
+			// It is necessary, because Annotation has default
+			// values different from Title (ex: TEXT_MODE)
+			textRequest = ObjectList::ExpandRequest(textRequest,EXPAND_DEFAULTS);
+			// Magics needs PTEXT verb, not ANNOTATION verb
+			textRequest.setVerb ( "PTEXT" );
+
+			ge.Draw ( textRequest );
+		}
+	}
+}
+
+#if 0
+bool
+Page::FindView(string viewName)
+{
+	if ((const char*)myView_->GetVerb() == viewName)
+		return true;
+	else
+		return false;
+}
+#endif
+
+void
+Page::Drop ( PmContext& context )
+{
+   // Skip the first request if it's a drop ( it normally is).
+   // If visualize is done directly on a data object, the
+   // data request is the first, and should not be skipped.
+   if ( context.InRequest().getVerb() == Cached("DROP") )
+      context.RewindToAfterDrop();
+
+   myView_->Drop ( context );
+}
+
+void
+Page::Visit ( Visitor& v )
+{
+        // Implement the visitor pattern
+        // Visit me
+	v.Visit (*this);
+
+	// Visit all my children
+	Presentable::Visit ( v );
+}
+
+bool
+Page::InsertDataUnit ( int dataUnitId, long offset, long offset2, 
+		       MatchingInfo& dataInfo, int &subPageId )
+{
+	require ( myView_.get() != 0 );
+
+        // Initialise variables
+	SubPage* subpage = 0;            // pointer to subpage
+
+        // Start at the beginning of the list
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		subpage = (SubPage*) (*child);
+
+		subpage->InsertDataUnit ( dataUnitId, offset, offset2, dataInfo );
+		subPageId = subpage->Id();
+			
+		subpage->NeedsRedrawing(true);
+		RedrawIfWindow ();
+		break;
+	}
+
+#if 0
+        // No subpage has matched or there are no more subpages
+        // How to put these pages in the right order ???
+	if ( success == false )
+	{
+		// Retrieve available canvas and the associated request
+		MvRequest subpageRequest;
+		Canvas* canvas = this->GetNextCanvas (subpageRequest);
+
+		// Create a new subPage
+		subpage = new SubPage ( subpageRequest, dataUnitId, offset, offset2, dataInfo );
+
+		// Assign new subpage canvas
+		subpage->SetCanvas ( canvas );
+		subPageId = subpage->Id();
+
+		// Insert the subpage as a child of the page
+		this->Insert ( subpage );
+
+		// Add the new presentable/dataunit relation to icondatabase.
+		// subpage->InsertDataUnit normally does this, but the constructor
+		// can not do it because the subpage has no parent yet.
+		MvIconDataBase& iconDataBase = IconDataBase();
+		iconDataBase.PresentableDataUnitRelation (subpage->Id(), dataUnitId);
+
+		// Remember to redraw the subpage if it's visible
+		if ( firstVisible_ + visibleCount_ > childList_.size() )
+		{
+			subpage->SetVisibility( true );
+			RedrawIfWindow ();
+		}
+		else
+			subpage->SetVisibility( false );
+	}
+#endif
+
+	NotifyObservers();
+
+	return true;
+}
+
+// The algorithm is the following:
+// 1. DROP in the FRAME: Visdef (VD) and dataunit (DU) icons
+//                       go to DataLevel (DL). Otherwise,
+//                       they go to ViewLevel (LV).
+//    1.1. (VDs) without (DU):
+//         1.1.1. single (VD):
+//                . first try to replace all (VDs) with similar name.
+//                . IF there is no replacement THEN
+//                     . FOR each (DU) in the Contents DO
+//                          . add (VDs) and remove the old ones
+//                            with similar TYPE (Algorithm 1).
+//                  ELSE return.
+//         1.1.2. group of (VDs):
+//                . FOR each (DU) in the Contents DO
+//                          . (Algorithm 1)
+//    1.2. (VDs) with (DU):
+//         . (Algorithm 1)
+//
+// 2. DROP in the CONTENTS: icons stay where there were dropped
+//    2.1. (VDs) without (DUs)
+//         . replace (VDs) with similar name OR
+//         . add (VDs).
+//    2.2. (VDs) with (DU)
+//         . add (VDs) to (DU).
+void
+Page::InsertVisDef (MvRequest& vdRequestList, MvIcon& dataUnit)
+{
+	// Check if visdef was dropped to superpage, in which case it's already added
+	if ( myParent_->DroppedHere() )
+		return;
+
+        // Insert visdef according to where the drop comes from
+	if( this->DropShouldStay() )
+	{
+		cout << "DROP FROM CONTENTS TAB" << endl;
+		cout << "NEEDS TO ADD CODE" << endl;
+		exit(0);
+//		InsertVisDefInPlace (vdRequestList, dataUnit);
+	}
+	else
+		InsertVisDefFromWindow   (vdRequestList, dataUnit);
+}
+
+#if 0
+void
+Page::InsertVisDefInPlace ( MvRequest& vdRequestList, MvIcon& dataUnit )
+{
+	// Retrieve the Icon Data Base
+	MvIconDataBase&   dataBase = this->IconDataBase();
+
+	MvIcon currentDataUnit = dataUnit;
+	while ( vdRequestList )
+	{
+	    // Visdef already exists in the data base
+	    // Visdef came from Contents edition window
+	    MvRequest visdefRequest = vdRequestList.justOneRequest();
+	    int visdefId = visdefRequest( "_CONTENTS_ICON_EDITED" );
+	    if (visdefId != 0)
+	    {
+		// Replace visdef in the data base
+		dataBase.UpdateVisDef ( visdefId,visdefRequest );
+
+		// Erase old visDef drawing
+		EraseDraw ( visdefId );
+	    }
+	    else
+	    {
+		// Visdef dropped in a data unit
+		// Visdef came from Contents window
+		if ( dataUnitId_ )
+		{
+			// Retrieve the data unit icon
+			MvIcon theDataUnit;
+			if ( dataBase.RetrieveDataUnit(dataUnitId_,theDataUnit))
+			{
+				currentDataUnit = theDataUnit;
+				
+				if ( CheckValidVisDef(currentDataUnit,visdefRequest) )
+				  {
+				    dataBase.InsertVisDef ( visdefRequest, Id(), currentDataUnit );
+				    // Remove DataUnit drawings
+				    removeData_ = false; // Remove only drawings
+				    this->RemoveIcon( currentDataUnit );
+				    removeData_ = true; // Reset
+				    
+				  }
+				else
+				  {
+				    Cached message = ("Invalid VisDef. Can't be added to this data ");
+				    PlotMod::UserMessage ( (const char*) message );
+				  }
+			}
+
+		}
+		else  // No data unit, will be added to page.
+		{
+		  EraseDefaultDraw();
+		  dataBase.InsertVisDef ( visdefRequest, Id(), currentDataUnit );
+		}
+	    }
+
+	    vdRequestList.advance();
+	}
+
+	RedrawIfWindow();
+	NotifyObservers();
+}
+#endif
+
+void
+Page::InsertVisDefFromWindow (MvRequest& vdRequestList, MvIcon& dataUnit)
+{
+	// All Visdefs go to the Data Level (DL), with the exception of
+	// the PText and PAxis (maybe others?), which will be conected 
+	// to the View Level.
+
+	// 1.2 Visdef(s) came together with a dataunit.
+	//     They will be all connected in the DL.
+	if ( dataUnit.Id() > 0 )
+	{
+		InsertVisDefToDataUnit (vdRequestList,dataUnit);
+	}
+	else // 1.1. Visdef(s) came without a dataunit. Add it to all, or to page.
+	{
+	  MvIconDataBase&   dataBase = this->IconDataBase();
+	  MvIconList duList;
+	  bool found = false;
+	  if ( dataBase.DataUnitListByPresentableId (Id(),duList) )
+	    {
+	      MvListCursor duCursor;
+	      // Process visdefs for each dataunit
+	      for ( duCursor = duList.begin(); duCursor != duList.end(); ++duCursor)
+		{
+		  if ( InsertVisDefToDataUnit(vdRequestList,*duCursor) )
+		    found = true;
+		}
+	    }
+#if 0 //FAMI022012: The insertion to the database will be done later
+	  if ( ! found )
+	    {
+	      vdRequestList.rewind();
+	      while ( vdRequestList )
+		{
+		  MvRequest  request =  vdRequestList.justOneRequest();
+		  dataBase.InsertVisDef(request, Id(), dataUnit );
+		  vdRequestList.advance();
+		}
+	    }
+#endif
+	}
+	// Redraw window
+	RedrawIfWindow();
+	NotifyObservers();
+}
+
+#if 0
+bool
+Page::InsertVisDef ( MvRequest& vdRequestList, bool updateByName )
+{
+	// Retrieve the Icon Data Base
+	MvIconDataBase&   dataBase = this->IconDataBase();
+
+	// Retrieve list of dataunits
+	MvIconList duList;
+	if (!dataBase.DataUnitListByPresentableId (Id(),duList))
+	{
+		Cached message = ("Invalid Drop. Data not available");
+		PlotMod::UserMessage ( (const char*) message );
+		return false;
+	}
+
+	// Update visdefs with same 'name'.
+	// Only try to update the first request (it is assumed that
+	// a single visdef was dropped)
+	MvListCursor  duCursor;
+	if (updateByName)
+	{
+		int           vdId;
+		bool          updated=false;
+		for ( duCursor = duList.begin(); duCursor != duList.end(); ++duCursor)
+		{
+			// Update visdef with same 'name'
+			if ( (vdId = dataBase.UpdateVisDefByName(vdRequestList,*duCursor)) )
+			{
+				// Erase old visDef drawing
+				EraseDraw ( vdId );
+				updated = true;
+			}
+		}
+
+		if (updated)
+			return true;
+	}
+
+	// Process visdefs for each dataunit
+	for ( duCursor = duList.begin(); duCursor != duList.end(); ++duCursor)
+	{
+		this->InsertVisDefToDataUnit(vdRequestList,*duCursor);
+	}
+
+	return true;
+}
+#endif
+
+bool
+Page::InsertVisDefToDataUnit (MvRequest& vdRequestList, const MvIcon& du )
+{
+    // Retrieve the Icon Data Base
+    MvIconDataBase&   dataBase = this->IconDataBase();
+
+    // Remove visdefs with same TYPE
+    vdRequestList.rewind();
+    while ( vdRequestList )
+    {
+        MvRequest request =  vdRequestList.justOneRequest();
+        MvIcon dataUnit = du;
+        if ( CheckValidVisDef(dataUnit,request) )
+            dataBase.RemoveAllVisDefsByDataUnit ( dataUnit, &request );
+
+        vdRequestList.advance();
+    }
+
+    // Insert new VD
+    bool found = false;
+    vdRequestList.rewind();
+    while ( vdRequestList )
+    {
+        MvRequest request =  vdRequestList.justOneRequest();
+        MvIcon dataUnit = du;
+        if ( CheckValidVisDef(dataUnit,request) )
+        {
+            dataBase.InsertVisDef ( request, Id(), dataUnit);
+            found  = true;
+        }
+
+        vdRequestList.advance();
+    }
+
+    if ( found )
+    {
+        // Remove all drawings related to the DataUnit,
+        // but not the DataUnit itself
+        removeData_ = false;
+        MvIcon dataUnit = du;
+        this->RemoveIcon( dataUnit );
+        removeData_ = true;
+    }
+
+    return found;
+}
+
+#if 0
+// Process the dropping of PTEXTS
+void
+Page::InsertPText (  MvRequest& textRequest )
+{
+	// Check if ptext was dropped to superpage, in which case it's already added
+	Presentable* sp = FindSuperPage();
+	if ( sp->DroppedHere() ) return;
+
+	// PText came from Contents window and
+	// dropped in a Data Unit window
+	if ( dataUnitId_ )
+	{
+		PlotMod::UserMessage("Drop not allowed");
+		return;
+	}
+
+	Presentable::InsertPText(textRequest);
+}
+
+void
+Page::UpdateVisDef(MvRequest &vdreq)
+{
+	SubPage* subpage = 0;            // pointer to subpage
+	MvChildIterator child;
+
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		subpage = (SubPage*) (*child);
+		myView_->UpdateVisDef(subpage,vdreq);
+	}
+}
+
+void
+Page::RemoveVisDef(const char *verb)
+{
+	SubPage* subpage = 0;            // pointer to subpage
+	MvChildIterator child;
+
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		subpage = (SubPage*) (*child);
+		myView_->RemoveVisDef(subpage,verb);
+	}
+}
+#endif
+
+void
+Page::RemoveIcon ( MvIcon& icon )
+{
+	// Remove drawings
+        MvRequest req = icon.Request();
+	Cached verb = req.getVerb();
+	if ( ObjectList::IsVisDef     ( verb ) ||
+	     ObjectList::IsDataUnit   ( verb ) ||
+	     ObjectList::IsVisDefText ( verb ) )
+	{
+		MvChildIterator child;
+		for ( child = childList_.begin(); child != childList_.end(); ++child )
+			(*child)->RemoveIcon ( icon );
+		if ( ObjectList::IsVisDefAxis(verb) )
+		{
+			cout << "Page::RemoveIcon -> NEEDS TO IMPLEMENT FUNCTION ERASEBACKDRAW()" << endl;
+		  //U EraseBackDraw();
+		}
+	}
+
+	// Remove PText annotation
+	if ( ObjectList::IsVisDefText ( verb ) )
+	{
+//U		if ( verb == ANNOTATION )
+//U			this->EraseForeDraw ();
+	}
+	myView_->Reset(req);
+
+	RedrawIfWindow ();
+	if ( ObjectList::IsDataUnit ( verb ) )
+		NotifyObservers ();
+}
+
+void
+Page:: RemoveAllData()
+{
+	RemoveAllDataChildren ();
+
+	if ( myView_->BackgroundFromData() )
+		// Enable new drawing of back and foreground
+		EraseDraw();
+
+	RemoveMyData();
+
+	// Clear Matching Info
+	this->InitMatching();
+}
+
+#if 0
+void
+Page::MakeSubPageRequest ( MvRequest& subPageRequest, int position, int nrows, int ncols )
+{
+	subPageRequest.setVerb("PLOT_SUBPAGE");
+  
+	// Calculates the size (in percentage of page) of each subpage
+	// to be created
+	int verSize  = 100 / nrows;
+	int horSize  = 100 / ncols;
+
+//	int gap = 2; // two per cent
+	int gapX = myRequest_ ("PAGE_X_GAP");
+	int gapY = myRequest_ ("PAGE_Y_GAP");
+
+	while ( position >= (nrows * ncols) )
+		position -= (nrows * ncols);
+
+	int i = position / ncols;
+	int j = position % ncols;
+
+	int subpageTop 		 = gapY + i * verSize;
+	subPageRequest("TOP")    = subpageTop;
+	subPageRequest("BOTTOM") = subpageTop + verSize - gapY;
+
+	int subpageLeft 	 = gapX + j * horSize;
+	subPageRequest("LEFT")   = subpageLeft;
+	subPageRequest("RIGHT")  = subpageLeft + horSize - gapX;
+}
+#endif
+
+void
+Page::UpdateDataForZoom(const string& /*zoomInfo*/)
+{
+ 	bool updateWmsForZoom=true;
+	if(!updateWmsForZoom)
+		return;
+		
+	vector<Presentable*> presVec;
+	FindBranchesByRequest("PRASTERLOOP",presVec);
+
+	for(int i=0; i < (int)presVec.size(); i++)
+	{
+		Presentable *pres=presVec.at(i);		
+		
+ 		MvIcon  dataUnit;
+		pres->DataUnit(dataUnit);
+		if(strcmp(dataUnit.Request().getVerb(),"PRASTERLOOP") == 0)
+		{
+			MvRequest r=dataUnit.Request().getSubrequest("WMS_CLIENT_REQUEST"); 
+
+			r("_CONTEXT")=myView_->ViewRequest();			
+	
+			r("_CLASS")   = "WMSCLIENT";
+			r("_ACTION")  = "update";
+			r("_SERVICE") = "WmsClient";
+			r("_USELOGWINDOW") = "1";
+
+			int error;
+			MvRequest result = MvApplication::waitService("wmsclient",r,error);
+
+			if(result && error == 0)
+			{
+				cout << "Page::UpdateDataForZoom --> WMS request's bounding box was updated for zoom" << endl;
+			  
+			  	pres->SetRequest(result);
+
+				MvIconDataBase&  dataBase = pres->IconDataBase();
+				dataBase.UpdateDataUnit(dataUnit.Id(),result);
+            //dataBase.UpdateIcon(DB_DATAUNIT,dataUnit.Id(),result);
+			}
+		} 
+	}			  
+ }
+
+#if 0
+void
+Page::ZoomRequest ( const Location& zoomCoord )
+{
+    // Check if Zoom operation can be performed in this Page
+    if ( this->CanDoZoom() == false ) return;
+
+    // Retrieve zoom stack structure
+    ZoomStacks* stacks = this->GetZoomStacks();
+    if ( stacks == 0 ) return;
+
+    // Save new coordinates
+    if ( stacks->Size() == 0 )
+    {
+        // Save initial lat/long coordinates
+        PmProjection* projection = this->GetProjection();
+        stacks->GeodeticPush ( projection->GeodeticCoord() );
+    }
+    stacks->GeodeticPush ( zoomCoord );
+
+    // Replace geographical area
+    this->ReplaceArea(zoomCoord);
+
+    //Update some dataUnits for the new area
+    this->UpdateDataForZoom(zoomCoord);
+}
+#endif
+
+void
+Page::ZoomRequest ( int izoom )
+{
+     // Retrieve zoom stack structure
+    ZoomStacks* stacks = this->GetZoomStacks();
+    if ( stacks == 0 ) return;
+
+    string zoomInfo;
+   
+    //If zoom level is 0 then send the original message to Magics
+    if ( izoom == 0 )
+    {
+        // Set zoom stack index to 0
+        stacks->Current(izoom);
+        (*myView_).ViewRequest().unsetParam("_ZOOM_DEFINITION");
+	zoomInfo = stacks->Get(izoom);
+    }
+    else
+    {  
+    	// Get the requested element
+    	zoomInfo = stacks->Get(izoom);
+
+    	// Update zoom info
+    	(*myView_).ViewRequest()("_ZOOM_DEFINITION") = zoomInfo.c_str();
+    }
+    
+    //Update some dataUnits for the new area
+    this->UpdateDataForZoom(zoomInfo);
+}
+
+void
+Page::ZoomRequest ( const string& zoomInfo )
+{
+    // Check if Zoom operation can be performed in this Page
+    if ( this->CanDoZoom() == false ) return;
+
+    // Retrieve zoom stack structure
+    ZoomStacks* stacks = this->GetZoomStacks();
+    if ( stacks == 0 ) return;
+
+    // Save new coordinates
+    if ( stacks->Size() == 0 )
+    {
+        // Save initial zoom info
+        string cc1("Zoom 0");
+        stacks->GeodeticPush ( cc1 );
+    }
+    stacks->GeodeticPush ( zoomInfo );
+
+    // Update zoom info
+    (*myView_).ViewRequest()("_ZOOM_DEFINITION") = zoomInfo.c_str();
+    
+    this->UpdateDataForZoom(zoomInfo);
+}
+
+void
+Page::ZoomInfo(int& zoomNumberOfLevels, int& zoomCurrentLevel)
+{
+    // Initial values
+    zoomNumberOfLevels = zoomCurrentLevel = 0;
+
+    // Retrieve stack
+    ZoomStacks* stacks = this->GetZoomStacks();
+    if ( stacks == 0 ) return;
+
+    // Get values
+    zoomNumberOfLevels = stacks->Size();
+    zoomCurrentLevel   = stacks->Current();
+}
+
+#if 0
+void
+Page::ReplaceArea ( const Location& zoomCoord, int izoom )
+{
+	// Replace geographical area in the View
+	(*myView_).ReplaceArea ( zoomCoord, izoom );
+}
+#endif
+
+void
+Page::DescribeYourself ( ObjectInfo& description )
+{
+	description.PutNewLine ("#PageDescription ");
+
+	// Ask the view to describe itself
+	myView_->DescribeYourself ( description );
+
+	// Convert the page description to the macro syntax
+	set<Cached> skipSet;
+	skipSet.insert("VIEW");
+	description.ConvertRequestToMacro ( myRequest_, PUT_LAST_COMMA, MacroName().c_str(), "plot_page", skipSet);
+
+	// Include the view information
+	string viewName = myView_->MacroName();
+	description.FormatLine ("VIEW",viewName.c_str(),"" );
+
+	// Close the page description	
+	description.PutNewLine ("\t) " );
+}
+
+void
+Page::CreateSubpages ()
+{
+	MvRequest sub = myRequest_("SUB_PAGES");
+
+        // Subpage request can be NULL when the Page contains only
+        // one Subpage. In this case, creates a default Subpage
+	if(!sub)
+	{
+		MvRequest subpageRequest("PLOT_SUBPAGE");
+		subpageRequest = ObjectList::ExpandRequest(subpageRequest,EXPAND_DEFAULTS);
+
+		Presentable* subpage = new SubPage ( subpageRequest );
+		ensure ( subpage != 0 );
+
+		// Insert the subpage in the superpage's child list
+		this->Insert ( subpage );
+		visibleCount_++;
+	}
+	else
+	{
+		while(sub)
+		{
+			MvRequest r =  sub.justOneRequest();
+			Presentable* subpage = new SubPage ( r );
+			ensure ( subpage != 0 );
+			this->Insert ( subpage );
+			sub.advance();
+			visibleCount_++;
+		}
+	}
+}
+
+#if 0
+void
+Page::UpdateChildList ()
+{
+	// Find SubPages with no data
+	MvChildList toDeleteSPs;
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		if ( ! (*child)->HasData() )
+			toDeleteSPs.push_back ( *child );
+	}
+
+	// Start deleting superfluous subpages
+	for ( child = toDeleteSPs.begin(); child != toDeleteSPs.end(); ++child )
+		this->RemovePresentable ( *child );
+
+	GotoFirst();
+}
+#endif
+
+bool
+Page::RemovePresentable ( Presentable* subpage )
+{
+	// If is the last and doesnt't own a canvas
+	if ( ( subpage == childList_.back () ) &&
+	     ( (signed int)childList_.size () > visibleCount_ ) &&
+	     ! subpage->IsVisible() )
+	{
+		delete subpage;
+		return true;
+	}
+
+	MvChildList revertedChildList = childList_;
+	revertedChildList.reverse ();
+
+	// Get Last and previous to last in child list
+	MvChildIterator j = revertedChildList.begin ();
+	Presentable* lastSubPage     = *j;
+	Presentable* previousSubPage = *(++j);
+
+	// Save DeviceData and Canvas of the last SubPage that owns a canvas
+	DeviceData* savedDevDat = 0;
+	Canvas* savedCanvas = 0;
+	if ( ( (signed int)childList_.size () == visibleCount_ ) &&
+	     ( lastSubPage != subpage ) )
+	{
+		savedCanvas = &( lastSubPage->GetCanvas () );
+		savedDevDat = lastSubPage->ReleaseDeviceData ();
+	}
+
+	// Scan child list in reverse order
+	while ( lastSubPage != subpage )
+	{
+		// Disconnect last SubPage canvas from it
+                Canvas& lastCanvas = lastSubPage->GetCanvas ();
+		lastCanvas.RemovePresentableId ( lastSubPage->Id (), RMNONE );
+
+		// Disconnect and save previous SubPage canvas
+		Canvas& previousCanvas = previousSubPage->GetCanvas ();
+		previousCanvas.RemovePresentableId ( previousSubPage->Id (), RMNONE );
+
+		// Assign saved canvas to last SubPage
+		lastSubPage->SetCanvas ( &previousCanvas );
+
+		lastSubPage->NeedsRedrawing(true);
+		previousSubPage->NeedsRedrawing(true);
+
+		// If previous SubPage owns the canvas
+		// Save and disconnect device data
+		DeviceData* deviceData = 0;
+		if ( previousSubPage->GetDeviceData () )
+			deviceData = previousSubPage->ReleaseDeviceData ();
+
+		// Assign device data to last SubPage
+		if ( deviceData )
+			lastSubPage->SetDeviceData ( deviceData );
+
+		// If SubPage to delete owns a canvas
+		if ( ( (signed int)childList_.size () == visibleCount_ ) &&
+		     ( previousSubPage == subpage ) )
+		{
+			// Assign saved canvas and Device Data
+		        previousSubPage->SetCanvas ( savedCanvas );
+			previousSubPage->SetDeviceData ( savedDevDat );
+
+			previousSubPage->NeedsRedrawing(true);
+			subpage->NeedsRedrawing(true);
+			
+			// Make SubPage the last of child list
+			MvChildIterator i 
+				= find ( childList_.begin(), childList_.end(), subpage );
+			ensure ((*i) == subpage);	
+
+			childList_.erase(i);
+			childList_.push_back ( subpage );
+		}
+
+		// Get next set of SubPages
+		lastSubPage = previousSubPage;
+		previousSubPage = *(++j);
+	}
+
+	if ( ! ( subpage->GetDeviceData () ) )
+		delete subpage;
+
+	return true;
+}
+
+#if 0
+void Page::GotoFirst()
+{
+	Goto(1);
+}
+
+void Page::GotoLast()
+{
+	Goto(childList_.size());
+}
+
+void Page::GotoNext(bool wrap)
+{
+  int n = firstVisible_ + scrollCount_; //visibleCount_;
+
+  if(wrap) 
+    {
+      if (  n > childList_.size())
+	n = n - childList_.size();
+    }
+  else 
+    {
+      if ( n > (childList_.size() - visibleCount_ + 1 ) )
+	n = childList_.size() - visibleCount_ + 1;
+    }
+  Goto(n);
+}
+
+void Page::GotoPrevious(bool wrap)
+{
+  int n = firstVisible_ - scrollCount_; //visibleCount_;
+
+  if(wrap )
+    {
+      if ( n < 1)
+	n = childList_.size() + n;
+    }
+  else
+    {
+      if ( n < 1 ) 
+	n = 1;
+    }
+
+  Goto(n);
+}
+
+bool Page::CanGotoNext()
+{
+	return firstVisible_ + visibleCount_ - 1 < childList_.size();
+}
+
+bool Page::CanGotoPrevious()
+{
+	return firstVisible_ > 1;
+}
+
+bool Page::CanScroll()
+{
+	return visibleCount_  < childList_.size();
+}
+
+
+void Page::Goto(int subpageIndex )
+{
+	int nrVisible = visibleCount_;
+	int subpageNr = subpageIndex;
+	MvChildIterator child;
+	int i;
+	SubPage *subPage = 0, *firstVisSubPage = 0;
+	vector<SubPage*> managePages, unmanagePages;
+
+	if ( subpageNr < 1 || subpageNr > childList_.size() ||
+	     subpageNr == firstVisible_ )
+		return ; // Already visible or invalid 
+
+	int j = 0, position = 1;
+	// Now find manage pages and switch canvases with other ones.
+	for (child = childList_.begin(),i = 1;
+	     child != childList_.end();child++,i++)
+	{
+	  subPage = (SubPage*) *child;
+	  
+	  if ( i < subpageNr )
+	    continue;
+
+	  if ( i == subpageNr )
+	    firstVisSubPage = subPage;
+
+	  Canvas &current = subPage->GetCanvas();
+	  current.MovePresentable(subPage,position);
+	  managePages.push_back(subPage);
+
+	  j++;
+	  position++;
+
+	  if ( i >= (subpageNr + nrVisible - 1) )
+	    break;
+	}
+
+	// Check if we've got enough pages.
+	if ( j < nrVisible )
+	  {
+	    for (child = childList_.begin(),i = 1;
+	     child != childList_.end();child++,i++)
+	      {
+		subPage = (SubPage*) *child;
+		Canvas &current = subPage->GetCanvas();
+		current.MovePresentable(subPage,position);
+		managePages.push_back(subPage);
+		
+		j++;
+		position++;
+		
+		if ( j == nrVisible )
+		  break;
+	      }
+	  }
+
+	// Can be required from Visibility method
+	firstVisible_ = subpageNr;
+	myRequest_ ("FIRST_VISIBLE") = subpageNr;
+
+	// Manage/unmanage pages and update firstVisible_;
+	for (i = 0; i < managePages.size(); i++ )
+	{
+		if ( managePages[i]->NeedsRedrawing() )
+		{
+			AddTask(*managePages[i], &SubPage::Draw);
+			managePages[i]->HasDrawTask ( true );
+			managePages[i]->NeedsRedrawing ( false );
+		}
+
+		managePages[i]->SetVisibility(true);
+	}
+
+	if ( firstVisSubPage )
+		firstVisSubPage->NotifyObservers ();
+
+	TaskBase::Flush();  
+}
+
+bool Page::LoadNextFrame()
+{
+	MvChildIterator child;
+	bool loading = false;
+	SubPage *subPage;
+
+	for ( child = childList_.begin(); !loading && child != childList_.end();
+	      child++)
+	{
+		subPage = (SubPage*) *child;
+		if ( subPage->NeedsRedrawing() )
+		{
+			AddTask(*subPage, &SubPage::Draw);
+			subPage->HasDrawTask ( true );
+			subPage->NeedsRedrawing ( false );
+			loading = true;
+		}
+
+		if (subPage->PendingDrawings())
+			loading = true;
+
+		subPage->VisitInBackground(true);
+	}
+
+	TaskBase::Flush();
+
+	return loading;
+}
+
+void
+Page::NeedsRedrawing(bool yesno)
+{
+	for (MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++)
+	{
+		if ( yesno )
+			(*ii)->NeedsRedrawing (yesno);
+		else if ( (*ii)->IsVisible () )
+			//Set false only if not visible
+			(*ii)->NeedsRedrawing (yesno);
+	}
+}
+
+bool
+Page::NeedsRedrawing()
+{
+	for (MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++)
+		if ( (*ii)->NeedsRedrawing() )
+			return true;
+
+	return false;
+}
+#endif
+
+void
+Page::RemovePageFromDataBase ()
+{
+	// Verify if my Parent is still alive
+	if ( myParent_ == 0 ) return;
+
+        // Retrieve the Icon Data Base
+	MvIconDataBase& dataBase = this->IconDataBase();
+
+	// Remove Page from DataBase
+	dataBase.RemovePresentable ( presentableId_ );
+
+	// Remove children from DataBase
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+		dataBase.RemovePresentable ( (*child)->Id() );
+}
+
+#if 0
+// This method is not been called, last seem in ContentsItem inside a ( #if 0 )
+// PageWidget use commented
+void
+Page::SetPageSize ( double top, double left, double bottom, double right )
+{
+        myLocation_.UpdateRectangle ( top, left, bottom, right );
+}
+#endif
+
+void
+Page::SetProjection ( const MvRequest& viewRequest )
+{
+	// Initialize projection based on a request
+	auto_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
+
+	projection_ = proj;
+}
+
+#if 0
+// Utility function, to get rid of duplicated code.
+void Page::RedrawIfWindow(int visdefId)
+{
+	if (IsAWindow() )
+	{
+		if ( myView_->EraseAll() )
+			EraseDraw (visdefId);
+
+		if ( ! HasDrawTask () )
+		{
+			AddTask ( *this, &Page::DrawProlog );
+			AddTask ( *this, &Page::Draw );
+			HasDrawTask ( true );
+		}
+	}
+}
+#endif
+
+int
+Page::FirstPrintable ()
+{
+	if ( IsParameterSet ( myRequest_, "FIRST_VISIBLE" ) )
+		return myRequest_ ( "FIRST_VISIBLE" );
+	else
+		return 1;
+}
+
+int
+Page::PaperPageNumber ( int subPageId )
+{
+	int nrVisible = visibleCount_;
+
+	MvChildIterator child;
+	int i;
+
+	for ( child = childList_.begin(), i = 1; child != childList_.end();
+	      ++child, i++ )
+	{
+		if ( (*child)->Id() == subPageId )
+			break;
+	}
+
+	int paperPageNumber;
+	if ( myParent_->PrintAll () )
+	{
+		paperPageNumber = ( (i - 1) / nrVisible ) + myParent_->PageIndex();
+	}
+	else
+	{
+		int firstPrintable = this->FirstPrintable ();
+		if ( ( i >= firstPrintable ) &&
+		     ( i < firstPrintable + nrVisible ) ) 
+			paperPageNumber = myParent_->PageIndex();
+		else
+			paperPageNumber = -1;
+	}
+
+	return paperPageNumber;
+}
+
+#if 0
+void
+Page::EraseBackDraw ()
+{
+#if 0 //D
+	CanvasList canvasList = this->GetCanvases ();
+	CanvasList::iterator i;
+	for ( i = canvasList.begin(); i != canvasList.end(); ++i )
+		(*i)->ClearShared("BACKGROUND");
+#endif
+}
+
+void
+Page::EraseForeDraw ()
+{
+#if 0 //D
+	CanvasList canvasList = this->GetCanvases ();
+	CanvasList::iterator i;
+	for ( i = canvasList.begin(); i != canvasList.end(); ++i )
+		(*i)->ClearShared ("FOREGROUND");
+#endif
+}
+
+CanvasList
+Page::GetCanvases ()
+{
+	CanvasList canvasList;
+	MvChildIterator child = childList_.begin();
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		Canvas& canvas = (*child)->GetCanvas ();
+		canvasList.push_back ( &canvas );
+	}
+
+	return canvasList;
+}
+#endif
+
+Canvas*
+Page::GetNextCanvas( MvRequest& subpageReq )
+{
+	Canvas* canvas = 0;
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		if ( ! (*child)->HasData () )
+			// Found available canvas on existing child
+			break;
+	}
+
+	if ( child == childList_.end() )
+	{
+		// Look for the least used canvas
+		int index = childList_.size () % visibleCount_;
+
+		child = childList_.begin();
+		for ( int i = 0; i < index; i++ )
+			child++;
+	}
+	canvas     = & ( (*child)->GetCanvas () );
+	subpageReq =   (*child)->Request();
+
+	return canvas;
+}
+ 
+#if 0
+void
+Page::InputCoordinates ( const Location& geodeticCoord, int presentableId )
+{
+	// Check if GribTool is available, start it if not, start it if
+	// it's linked to another presentable
+	GribToolService::Instance().SetInputPresentableId ( presentableId );
+
+	// Send coordinates to GribTool
+	GribToolService::Instance().SetLocation ( geodeticCoord );
+}
+
+void
+Page::ExecuteToolPlusPointScript ( const Location& geodeticCoord )
+{
+	// Check if ToolPlus is available, start it if not, start it
+	// if it's linked to another presentable
+	Presentable* sp = FindSuperPage();
+	ToolPlusService::Instance().SetInputPresentableIdPoint ( sp );
+
+	// Send coordinates to EpsTool
+	ToolPlusService::Instance().SetLocationPoint ( geodeticCoord );
+}
+
+void
+Page::ExecuteToolPlusAreaScript ( const Location& geodeticCoord )
+{
+	// Check if ToolPlus is available, start it if not, start it
+	// if it's linked to another presentable
+	Presentable* sp = FindSuperPage();
+	ToolPlusService::Instance().SetInputPresentableIdArea ( sp );
+
+	// Send coordinates to EpsTool
+	ToolPlusService::Instance().SetLocationArea ( geodeticCoord );
+}
+
+MvRequest& 
+Page::Request () 
+{ 
+	if ( myView_.get () )
+	{
+		MvRequest viewRequest = (*myView_).ViewRequest ();
+		myRequest_.setValue ( "VIEW", viewRequest );
+	}
+
+	return myRequest_; 
+}
+
+list<bool>
+Page::ReadyChilds ()
+{
+	list<bool> readyChilds;
+	for ( MvChildIterator ii = childList_.begin (); ii != childList_.end ();
+	      ii++ )
+		readyChilds.push_back ( ! ( (*ii)->PendingDrawings () || (*ii)->NeedsRedrawing () ) );
+
+	return readyChilds;
+}
+
+void
+Page::PrintInfo ()
+{
+	SubPage* subpage = 0;            // pointer to subpage
+
+	cout << "Page " << presentableId_ << endl;
+	myRequest_.print();
+
+        // Start at the beginning of the list
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		subpage = (SubPage*) (*child);
+		cout << "SubPage " << subpage->Id() << endl;
+		subpage->Request().print();
+		Canvas& canvas = (*child)->GetCanvas ();
+		cout << "Canvas width/height: " << canvas.GetWidth() << " " << canvas.GetHeight() << endl;
+	}
+}
+
+void
+Page::StartMapEditor()
+{
+	// Call a Request which is sent directly to PlotMod
+
+	MvRequest mapRequest ("EDIT_MAP");
+
+	mapRequest ( "CUSTOM_WIDTH"  ) = 14.8;
+	mapRequest ( "CUSTOM_HEIGHT" ) = 10.5;
+	mapRequest ( "INPUT_TYPE")     = myView_->InputMode();
+	mapRequest ( "PATH"   )        = ObjectInfo::ObjectPath ( myRequest_ );
+	mapRequest ( "_PAGE_ID")       = presentableId_;
+
+	// Add the map information to the request
+	mapRequest = mapRequest + myView_->ViewRequest();
+
+	MvApplication::callService ( "uPlot", mapRequest, 0 );	
+}	
+
+void
+Page::SaveView()
+{
+        // Confirm if the user really wants to save the geography
+	MvRequest genappRequest = myView_->ViewRequest();
+	Cached name = ObjectInfo::ObjectName ( genappRequest );
+	Cached title("uPlot: Save Geography");
+	Cached message("This will save the current geography to the view icon: ");
+	message = message + name;
+        QuestionDialogManager::Instance().post( (const char*)title, (const char*)message, &genappRequest, okSaveViewCallback, cancelSaveViewCallback);
+}
+
+void 
+Page::okSaveViewCallback (void *cd)
+{
+	// Save request
+	MvRequest *req = (MvRequest*)cd;
+	Cached name = ObjectInfo::ObjectName ( *req );
+	Cached path = ObjectInfo::ObjectPath ( *req );
+	Cached clas = ObjectInfo::IconClass  ( *req );
+	Cached fullPath = path + Cached("/") + name;
+	req->save ( (const char*) fullPath );
+
+	// Notify everyone
+	MvApplication::notifyIconModified(name,clas);
+}
+
+void 
+Page::cancelSaveViewCallback (void *)
+{
+	// empty
+}
+#endif
+
+bool
+Page::CheckValidVisDef ( MvIcon& dataUnit, MvRequest& vdRequest )
+{
+    // Check only if a visdef is being wrongly applied to a 1D or 2D fields
+    // Get the dimension flag
+    int iflag = dataUnit.Request()("_NDIM_FLAG");
+
+    // Check visdef on the page level
+    if ( ObjectList::CheckValidVisDef ( dataUnit.IconClass(),vdRequest.getVerb(),iflag ) )
+        return true;
+
+    // Visdef is not valid here, check its children
+    MvChildIterator child;
+    for (child = childList_.begin(); child != childList_.end(); ++child)
+    {
+        SubPage* subpage = (SubPage*)(*child);
+        if ( subpage->CheckValidVisDef ( dataUnit,vdRequest,iflag ) )
+            return true;
+    }
+
+    return false;
+}
+
+bool
+Page::CanDoZoom ()
+{
+	if ( this->HasProjection() == false )
+	{
+//		Cached message ("No projection associated to this plotting" );
+//		PlotMod::MetviewError( (const char*) message );
+		return false;
+	}
+
+	if ( projection_->CanDoZoom() == false )
+	{
+//		Cached message ("Change coordinates not available" );
+//		PlotMod::MetviewError( (const char*)message, (const char*)projection_->Name() );
+		return false;
+	}
+
+	return true;
+}
+
+#if 0
+bool
+Page::CanChangeGeography ()
+{
+	// Check if my View allows to change the geography
+	if ( myView_->CanChangeGeography() == false ) return false;
+
+	// This test is suitable for XSectView, AverageView, ...
+	// They do not have a Projection, but they can change coordinates
+	if ( this->HasProjection() == false ) return true;
+
+	// Check if the current Projection can change coordinates
+	return ( this->CanDoZoom() );
+}
+
+void
+Page::ChangeFontType ( bool flag )
+{
+	myView_->ChangeFontType ( flag );
+	EraseDraw ();
+
+	if ( ! HasDrawTask () )
+	{
+		AddTask ( *this, &Page::Draw );
+		HasDrawTask ( true );
+		NeedsRedrawing ( true );
+	}
+
+	TaskBase::Flush();
+}
+#endif
+
+void Page::RegisterDrawTrailer()
+{
+	// Call plotting procedure
+	myParent_->DrawTrailer();
+	return;
+}
+
+void
+Page::DropSimulate ( PmContext& context )
+{
+	if ( !context.InRequest() )
+		return;
+
+	this->Drop(context);
+}
diff --git a/src/uPlot/Page.h b/src/uPlot/Page.h
new file mode 100644
index 0000000..e442742
--- /dev/null
+++ b/src/uPlot/Page.h
@@ -0,0 +1,366 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Page
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a concrete Page class for the page hierarchy in PlotMod.
+//  The Page class is an example a Component class 
+//  of the Composite "pattern".
+//
+//  Its methods allow for the insertion and removal of nodes and
+//  on a tree structure, and also for the drawing method.
+//
+//
+// .DESCRIPTION:
+//  Refer to the "Design Patterns" book, page 163 for more details
+//
+//
+// .DESCENDENT:
+//
+//
+// .RELATED:
+//  PlotMod, DataObject, SubPage, Text, Legend
+//  Builder, Visitor, Device, DataUnit
+//
+// .ASCENDENT:
+//  Presentable
+//
+#ifndef Page_H
+#define Page_H
+
+#include "Presentable.h"
+#include "PlotModView.h"
+#include "GraphicsEngine.h"
+#include "PmProjection.h"
+#include "DrawingPriority.h"
+#include "ZoomStacks.h"
+#include "MatchingInfo.h"
+
+class Page : public Presentable {
+
+public:
+
+        // Constructors
+        Page(MvRequest& pageRequest);
+	Page(const Page&);
+        virtual Presentable* Clone() const { return new Page(*this); }
+
+        // Destructor
+	~Page();
+
+        // Methods
+        // Overriden from Presentable class
+
+	// Return my name
+	virtual string Name();
+	
+	virtual bool IsVisible()
+		{ return true; }
+
+//	virtual void Save ();
+	// Save the contents of the page
+
+        virtual void Draw ();
+	// Draw me and all my children
+	
+        virtual void DrawProlog ();
+        //	draws the presentable
+
+	// Draw page header
+        virtual void DrawPageHeader ();
+
+        // Register to draw trailer later
+        virtual void RegisterDrawTrailer ();
+
+	// Draw Positional Text Only, Title text is drawn by SubPage
+        virtual void DrawText ( );
+
+	// Respond to a drop action
+	virtual void Drop ( PmContext& context );
+
+	// Return the graphics engine (one per page)
+	virtual GraphicsEngine& GetGraphicsEngine() const
+		{ return *engine_; }
+
+	// Accept a visitor
+	virtual void Visit ( Visitor& v );
+
+#if 0
+	virtual void DrawBackground ( Canvas& canvas, bool emptyBack = false );
+	// Draw the background (ask my view to do it )
+	// Obs: draws shared background, not to be used on PostScript
+
+	virtual void DrawForeground ( Canvas& canvas, bool emptyFore = false );
+	// Draw the foreground (ask my view to do it )
+	// Obs: draws shared foreground, not to be used on PostScript
+
+//D	virtual void DrawFrame ( Canvas& canvas );
+	// Draw the frame (ask my view to do it )
+
+	virtual void DrawNewPage ( Canvas& canvas );
+	// Draw the frame (ask my view to do it )
+#endif
+
+	// Zoom request given a new location to be added to the stack
+	//virtual void ZoomRequest ( const Location& zoomCoord );
+
+	// Zoom request given an index from the stack
+	virtual void ZoomRequest ( int izoom );
+
+    // Zoom request given a string containing the zoom info
+    virtual void ZoomRequest ( const string& zoomInfo );
+
+	// Retrieve zoom information
+	virtual void ZoomInfo(int& zoomNumberOfLevels, int& zoomCurrentLevel);
+
+	// Replace the geographical area and plot the result
+	//virtual void ReplaceArea ( const Location& zoomCoord, int zoom=-1 );
+
+	// Generate a description of the page
+	virtual void DescribeYourself ( ObjectInfo& );
+
+#if 0
+	virtual void NeedsRedrawing(bool yesno);
+	// Sets all subpages to the same state (bool yesno) of page.
+
+        virtual bool NeedsRedrawing();
+	// Checks all subpages, returns true if one of then are true.
+  
+        virtual void RedrawIfWindow(int visdefId = 0);
+        // Sets redrawing flags and does AddTask if needed.
+
+	virtual void SetPageSize ( double top, double left, double bottom, double right );
+	// Update Page's size
+
+	virtual void ContentsDataUnit( int dataUnitId ) { dataUnitId_ = dataUnitId; }
+        virtual int  ContentsDataUnit() { return  dataUnitId_; }
+#endif
+
+        virtual string MacroPlotIndexName(bool = true)
+		{ return myParent_->MacroPlotIndexName(true); }
+
+	virtual void DropShouldStay( bool drop )
+		{ dropShouldStay_ = drop; }
+        virtual bool DropShouldStay()
+		{ return  dropShouldStay_; }
+
+//	virtual bool FindView(string viewName);
+
+	// Local methods
+	// Insert a new data unit (used in response to a drop action)
+	bool InsertDataUnit ( int dataUnitId, long offset, long offset2, MatchingInfo& dataInfo, int &subpageId );
+
+	// Insert a new visdef ( used in response to a drop action )
+	void InsertVisDef ( MvRequest& visdefRequest, MvIcon& dataunit );
+
+//	void InsertVisDefInPlace ( MvRequest& visdefRequest, MvIcon& dataunit );
+	// Insert a new visdef that came from a drop in the Contents window or from a macro.
+	// This algorithm does not remove any old visdefs, only add the
+	// new ones in the level where they were dropped.
+
+	// Insert a new visdef that came from a drop in the Plot window.
+	// If visdef was dropped alone, first check if it has already being
+	// in use. If yes, replace it. If not, remove all the old visdefs
+	// and then applied this new one.
+	// If visdef was dropped together with a dataunit, add visdef to
+	// that dataunit
+	void InsertVisDefFromWindow ( MvRequest& visdefRequest, MvIcon& dataunit );
+
+//	bool InsertVisDef ( MvRequest& visdefRequest, bool updateByName );
+	// Insert single or group of visdefs to dataunits
+
+	// Insert visdefs to dataunit
+	bool InsertVisDefToDataUnit (MvRequest& vdList, const MvIcon& du);
+
+#if 0
+	void InsertPText ( MvRequest& ptextRequest );
+	// Insert a new ptext ( used in response to a drop action )
+
+        virtual void UpdateVisDef(MvRequest &visdefRequest);
+        // Update a visdef request for all subpages. Delegated to view.
+
+        virtual void RemoveVisDef(const char *verb);
+        // Remove visdef ( or part of it ) for all subpages. Delegated to view.
+#endif
+
+   // Remove icon from tree structure
+   virtual void RemoveIcon ( MvIcon& );
+
+   // Remove all data icon from tree structure
+   virtual void RemoveAllData ();
+
+//	void MakeSubPageRequest ( MvRequest&,int,int ,int );
+	// Create a subpage request
+
+	// Create rows* columns subpages
+	void CreateSubpages();
+
+#if 0
+	bool UpdatePageParameters ( MvRequest& );
+	// Update page parameters
+
+	bool CanGotoNext();
+	bool CanGotoPrevious();
+	bool CanScroll();
+
+	void GotoNext(bool wrap = false);
+	void GotoPrevious(bool wrap = false);
+
+	void GotoFirst();
+	void GotoLast();
+
+	void Goto(int);
+
+	bool CanChangeGeography();
+
+        void ScrollByScreen(bool xx ) { scrollCount_ = xx ? visibleCount_ : 1; } 
+
+	bool LoadNextFrame();
+#endif
+
+	ZoomStacks* GetZoomStacks() 
+		{ return &zoomStacks_; }
+
+	void InitZoomStacks()
+	    { zoomStacks_.ClearAll(); }
+
+	// Remove Page relationships from the DataBase
+	void RemovePageFromDataBase();
+
+#if 0
+	bool RemoveSubPage ( SubPage* );
+	// Remove SubPage from SubPages list
+
+	void UpdateChildList ();
+	// Look for Subpages with no data, remove then if they are not visible
+
+	int FirstVisible() const { return firstVisible_; }
+	// Return number of first visible page ( for Scroll interface )
+#endif
+
+	// Return number of visible subpages
+	int NumberOfVisible() { return visibleCount_; }
+
+//	Location GetDrawingArea ()
+//		{ return drawingArea_; }
+
+//	void SetDrawingArea ( Location drawingArea )
+//		{ drawingArea_ = drawingArea; }
+
+//U	void EraseBackDraw ();
+//U	void EraseForeDraw ();
+
+	// Set/Get the projection associated to the canvas
+	virtual void SetProjection ( const MvRequest& viewRequest );
+
+	PmProjection* GetProjection ()
+		{ return ( projection_.get() ); }
+
+	// Return TRUE if there is a projection associated to the page
+	bool HasProjection ()
+		{ return (projection_.get() != NULL); }
+
+	// Return TRUE if zooming is allowed for this projection
+	bool CanDoZoom ();
+
+	void SetDrawPriority( MvRequest& drawPriorRequest )
+		{ drawingPriority_.SetPriority ( drawPriorRequest ); }
+
+	DrawingPriority& GetDrawPriority ()
+		{ return drawingPriority_; }
+
+	virtual PlotModView& GetView() const
+		{ return *myView_; }
+
+        void SetView(auto_ptr<PlotModView>& newView)
+                 { myView_ = newView; } 
+
+	int FirstPrintable ();
+
+	virtual int PaperPageNumber ( int );
+
+	// return list of canvas used by Page children
+//	virtual CanvasList GetCanvases();
+
+	// Return pointer to the canvas associated to the first device with the fewest
+	//  number of canvas. Also returns the associated subpage request.
+	Canvas* GetNextCanvas(MvRequest& subpageReq);
+
+	// Remove from child list
+	bool RemovePresentable ( Presentable* );
+
+#if 0
+	virtual void InputCoordinates ( const Location& , int );
+
+	// Call the ToolPlus point script
+	virtual void ExecuteToolPlusPointScript ( const Location& );
+
+	// Call the ToolPlus area script
+	virtual void ExecuteToolPlusAreaScript ( const Location& );
+
+	virtual void SetInputPresentableId ( int presID )
+		{ myParent_->SetInputPresentableId ( presID ); }
+
+	virtual MvRequest& Request();
+	// Returns a reference to the object's associated request
+
+        virtual list<bool> ReadyChilds();
+
+	virtual void PrintInfo();
+
+	virtual void  StartMapEditor();
+	// Initiate a map editor
+
+	virtual void SaveView();
+	// Save View in the disk.
+#endif
+
+   bool CheckValidVisDef(MvIcon &,MvRequest&);
+
+   // Dealing with Drop
+   virtual void DropSimulate ( PmContext& context );
+
+   // Dealing with Contents tools
+   virtual void contentsRequest( MvRequest& req)
+      { myView_->contentsRequest( req ); }
+
+protected:
+
+   //Update certain data units for the new area
+   virtual void UpdateDataForZoom( const string& zoomInfo);
+
+private:
+
+   // No copy allowed
+   Page& operator=(const Page&);
+
+   // Members
+   auto_ptr <PlotModView> myView_;
+
+   auto_ptr <GraphicsEngine> engine_;
+
+   int firstVisible_;
+   int visibleCount_;
+//	int scrollCount_;
+
+   ZoomStacks zoomStacks_;
+
+   bool dropShouldStay_;
+
+   auto_ptr <PmProjection> projection_;  // projection associated with page
+   DrawingPriority drawingPriority_;
+};
+
+#endif
diff --git a/src/uPlot/PaperSize.h b/src/uPlot/PaperSize.h
new file mode 100644
index 0000000..de7cf7a
--- /dev/null
+++ b/src/uPlot/PaperSize.h
@@ -0,0 +1,67 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PaperSize
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  A class for encapsulation of the size of the drawing area
+//  (expressed in paper coordinates, in cm. )
+//
+// .CLIENTS:
+//  Presentable
+//
+//
+// .RESPONSABILITIES:
+//   - Keep track of width and height (in cm) of the drawing area
+//
+//
+// .COLLABORATORS:
+//   (none)
+//
+//
+// .BASE CLASS:
+//   (none)
+//
+// .DERIVED CLASSES:
+//   (none)
+//
+// .REFERENCES:
+//
+//
+#ifndef PaperSize_H
+#define PaperSize_H
+
+class PaperSize {
+public:
+
+	// Contructors
+	PaperSize( double width = 1., double height = 1. ):
+		width_ ( width ), height_ ( height ) {}
+
+	// Destructor
+	~PaperSize() {}
+ 
+	double GetWidth() const
+		{ return width_; }
+
+	double GetHeight()  const
+		{ return height_; }
+
+private:
+
+	double width_;   // size in cm
+	double height_;  // size in cm
+};
+
+#endif
diff --git a/src/uPlot/PlotAction.cc b/src/uPlot/PlotAction.cc
new file mode 100644
index 0000000..7b69d14
--- /dev/null
+++ b/src/uPlot/PlotAction.cc
@@ -0,0 +1,57 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+//PlotAction class
+//
+
+#include "PlotAction.h"
+#include "PlotMod.h"
+#include "MagPlusService.h"
+#include "PlotModConst.h"
+
+void
+PlotAction::Execute (PmContext& context)
+{
+	// The request constains all the information to be sent to Magics
+	// Just needs to add the output devices
+	MvRequest fullReq = PlotMod::Instance().OutputFormat()("OUTPUT_DEVICES");
+	fullReq = fullReq + context.InRequest();
+
+       // Call MAGICS to process the request
+        MagPlusService::Instance().SetRequest ( fullReq );
+
+	// Check where to send the output file(s)
+	// If destination is file, Magics has already created it 
+	MvRequest info = PlotMod::Instance().OutputFormatInfo();
+	if ( strcmp((const char*)info("DESTINATION"),MVPRINTER) == 0 )
+	{
+		// Call lpr command
+		ostringstream tmpp;
+		tmpp << "lpr -P" << (const char*)info("PRINTER_NAME");
+		tmpp << " -#" << (int)info("NUMBER_COPIES");
+		tmpp << " " << (const char*)info("FILE_NAME");
+		system ( tmpp.str().c_str() );
+
+		// Remove temporary file
+		ostringstream rm;
+		rm << "rm -f " << (const char*)info("FILE_NAME");
+		system (rm.str().c_str());
+	}
+	else if ( strcmp((const char*)info("DESTINATION"),MVPREVIEW) == 0 )
+	{
+		//add code later
+	}
+
+        // Advance to the end the input context
+         context.AdvanceToEnd();
+}
+
+// This is the exemplar object for the PlotAction class
+static PlotAction plotActionInstance("Plot");
diff --git a/src/uPlot/PlotAction.h b/src/uPlot/PlotAction.h
new file mode 100644
index 0000000..c3f4d96
--- /dev/null
+++ b/src/uPlot/PlotAction.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  PlotAction
+//
+// .AUTHOR:
+//  Fernando Ii  Jul-2010
+//
+// .SUMMARY:
+//  Describes the PlottAction class, a derived class
+//  for the various types of requests in uPlot which requires
+//  plotting all the requests related to this plot.
+//
+//
+// .CLIENTS:
+//  PlotModAction class, called by uPlot main module
+//
+// .RESPONSABILITY:
+//  This class will provide all support for the visualisation
+//  actions whithin uPlot
+//
+// .COLLABORATORS:
+//  Builder, Matcher, Drawer
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+//
+#ifndef PlotAction_H
+#define PlotAction_H
+
+#include "PlotModAction.h"
+
+class PlotAction: public PlotModAction
+{
+
+public:
+
+  // Constructors
+  PlotAction(const char* name): PlotModAction(name) {}
+
+  // Destructor
+  ~PlotAction() {}
+
+  // Methods
+  // Overriden from PlotModAction
+  virtual void Execute ( PmContext& context );
+};
+
+#endif
diff --git a/src/uPlot/PlotMod.cc b/src/uPlot/PlotMod.cc
new file mode 100644
index 0000000..3803be1
--- /dev/null
+++ b/src/uPlot/PlotMod.cc
@@ -0,0 +1,280 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvApplication.h>
+#include <MvRequestUtil.hpp>
+#include "PlotMod.h"
+#include "PlotModConst.h"
+#include "MvStopWatch.h"
+
+#include <assert.h>
+
+// Methods for the PlotMod class
+//
+// --- METHOD:  Instance
+//
+// Methods to provide access to the singleton
+//              PlotMod class 
+
+PlotMod* PlotMod::plotModInstance_ = 0;
+
+void
+PlotMod::Instance ( PlotMod* pm )
+{
+	plotModInstance_ = pm;
+}
+
+PlotMod&
+PlotMod::Instance()
+{
+	assert (plotModInstance_ != 0 );
+	return *plotModInstance_;
+}
+
+PlotMod::PlotMod () : calledFromMacro_ (false)
+{
+	watch_ = 0;
+}
+
+bool
+PlotMod::IsWindow( const char* driver )
+{
+	return !strcmp( MVSCREEN_DRIVER, driver );
+}
+
+bool
+PlotMod::CalledFromMacro ( MvRequest& req )
+{
+	// Check if the request comes from a Macro
+	int calledFromMacro = req("_CALLED_FROM_MACRO");
+
+	// Only updates the plot environment if the request
+	// comes from Macro. Otherwise, keeps the current status.
+	if ( calledFromMacro )
+		calledFromMacro_ = calledFromMacro;
+
+	return calledFromMacro;
+}
+
+MvRequest
+PlotMod::OutputFormat()
+{
+	if ( !outFormat_ ) 
+		outFormat_ = MakeDefaultOutputFormat();
+
+	return outFormat_;
+}
+
+void
+PlotMod::OutputFormat( MvRequest& req)
+{
+	outFormat_ = req;
+	if ( (const char*)outFormat_("DESTINATION") )
+	{
+		plotDestination_ = (const char*)outFormat_("DESTINATION");
+		if ( plotDestination_ == MVPRINTER && (const char*)outFormat_("PRINTER_NAME") )
+			printerName_ = (const char*)outFormat_("PRINTER_NAME");
+	}
+	else
+		plotDestination_ = MVSCREEN;
+}
+
+MvRequest
+PlotMod::MakeDefaultOutputFormat()
+{
+	MvRequest req( "PRINTER_MANAGER" );
+	MvRequest gldriverReq( MVSCREEN_DRIVER );
+	gldriverReq ( "DESTINATION" ) = MVSCREEN;
+	req("OUTPUT_DEVICES") = gldriverReq;
+
+	return req;
+}
+
+MvRequest
+PlotMod::OutputFormatInfo()
+{
+	MvRequest info("OUTPUTINFO");
+	info("DESTINATION")  = plotDestination_.c_str();
+	info("PRINTER_NAME") = printerName_.c_str();
+	info("NUMBER_COPIES") = (int)outFormat_("NUMBER_COPIES");
+	MvRequest subReq = outFormat_.getSubrequest("OUTPUT_DEVICES");
+	if ( subReq )
+	{
+		if ( (const char*)subReq("OUTPUT_NAME") )
+			info("FILE_NAME") = subReq("OUTPUT_NAME");
+		else if ( (const char*)subReq("OUTPUT_FULLNAME") )
+			info("FILE_NAME") = subReq("OUTPUT_FULLNAME");
+		else
+			info("FILE_NAME") = "defaultFilename";  //default filename
+	}
+
+	return info;
+}
+
+#if 0
+bool
+PlotMod::CheckSetWindowOutputFormat( MvRequest& req )
+{
+	// Default value;
+	isWindow_ = true;
+
+	if ( IsParameterSet(req,"OUTPUT_DEVICES") )
+	{
+		// Output device definition was set by the user
+		// Try to find the screen driver
+		MvRequest outDev = req("OUTPUT_DEVICES");
+		while ( outDev )
+		{
+			if ( strcmp(outDev.getVerb(),MVSCREEN_DRIVER) == 0 )
+				return true;  //screen driver found
+
+			outDev.advance();
+		}
+
+		// Screen driver not found
+		isWindow_ = false;
+		return false;
+	}
+
+	return true;
+}
+#endif
+
+
+// ----------------------------------------------------------------------------
+// PlotMod::infoMessage, warningMessage, errorMessage
+// Receives message callbacks from Magics
+// ----------------------------------------------------------------------------
+
+void PlotMod::infoMessage(const string& msg)
+{
+    printMessage("Info: " + msg, false);
+    //MetviewError (msg, "INFO");
+    //messageToLogWindow (msg, LOG_INFO);
+}
+
+void PlotMod::warningMessage(const string& msg)
+{
+    printMessage("Warn: " + msg, true);
+    //MetviewError (msg, "WARN");
+    //messageToLogWindow (msg, LOG_WARN);
+}
+
+void PlotMod::errorMessage(const string& msg)
+{
+    string extra;
+
+    // intercept the 'spherical harmonics' message and add our own information
+    if (msg.find("Grib Decoder") != string::npos && 
+        msg.find("Representation [sh]") != string::npos )
+    {
+        extra = "If you wish to plot this field, you should first convert it to a grid. "
+                "If the data comes from a Mars Retrieval icon, you should set its GRID "
+                "parameter; if it is from a GRIB file, you should use the GRIB Filter icon "
+                "and set its GRID parameter.";
+    }
+
+
+    printMessage("Error: " + msg + extra, true);
+    //MetviewError (msg, "ERROR");
+    UserMessage (msg + extra);
+    //messageToLogWindow (msg, LOG_EROR);
+
+    exitWithError();
+}
+
+
+
+// --------------------------------------------------------------------------------------
+// PlotModBatch::MetviewError
+// Called by PlotMod::infoMessage, PlotMod::warningMessage and PlotMod::errorMessage, but
+// the errorlevel is different for each.
+// --------------------------------------------------------------------------------------
+
+void PlotMod::MetviewError ( const string & message, const string & errorlevel )
+{
+    string fullMsg;
+    bool priority = false;
+    bool exit     = false;
+
+    if ( errorlevel.length() )
+    {
+        fullMsg = errorlevel + ": ";
+        
+        if (errorlevel == "Warn")
+        {
+            priority = true;
+        }
+
+        else if (errorlevel == "Error")
+        {
+            priority = true;
+            exit     = true;
+        }
+    }
+
+
+    fullMsg += message;
+    printMessage(fullMsg, priority);
+
+
+    if (exit)
+    {
+        exitWithError();
+    }
+}
+
+
+// the module will exit with an error code
+void PlotMod::exitWithError()
+{
+    svc *service = MvApplication::instance().getService();
+    
+    if (service != NULL)
+    {
+        set_svc_err(service->id,1);
+    }
+}
+
+// Timming functions
+//Starts and names the session
+void PlotMod::watchStart ( const char* txt )
+{
+	if( watch_ )
+	{
+		marslog(LOG_WARN,"stopwatch_start - watch already running, replace old watch!");
+		delete watch_;
+	}
+	watch_ = new MvStopWatch( txt );
+}
+
+// Prints the laptime since the previous call to
+// watchLaptime() or from watchStart()
+void PlotMod::watchLaptime ( const char* txt )
+{
+	if( ! watch_ )
+	{
+		marslog(LOG_WARN,"stopwatch_laptime - watch not running, starting now!");
+		watch_ = new MvStopWatch( "tictac" );
+	}
+	else
+		watch_->lapTime( txt );
+}
+
+// Stops and prints a report
+void PlotMod::watchStop()
+{
+	if( watch_ )
+	{
+		delete watch_;
+		watch_ = 0;
+	}
+	else
+		marslog(LOG_WARN,"stopwatch_stop - no watch running!");
+}
diff --git a/src/uPlot/PlotMod.h b/src/uPlot/PlotMod.h
new file mode 100644
index 0000000..a37e881
--- /dev/null
+++ b/src/uPlot/PlotMod.h
@@ -0,0 +1,126 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Plot Mod
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines an concrete class for higher level of control of Plot Mod.
+//
+//
+// .CLIENTS:
+//   This class is used the "main" module and by any METVIEW
+//   object which needs to know, whether METVIEW is in interative
+//   or in batch mode
+// 
+// .RESPONSIBILITIES:
+//   - Inform the other classes about the operation of METVIEW
+//     (interactive or bacth mode)
+//
+//
+// .COLLABORATORS:
+//   PlotModApp ( which will be either PlotModXApp or PlotModBatchApp).
+//
+// .DESCENDENT:
+//   (none)
+//
+// .RELATED:
+//   (none)
+//
+// .ASCENDENT:
+//   (none)
+//
+#ifndef PlotMod_H
+#define PlotMod_H
+
+#include "MvRequest.h"
+#include "MagicsObserver.h"
+
+class MvStopWatch;
+
+class PlotMod : public magics::MagicsObserver 
+{
+
+public:
+	// Access to singleton object
+	static PlotMod *plotModInstance_;
+	static PlotMod& Instance();
+	static void Instance(PlotMod*);
+
+	// Default Constructor/Destructor
+	PlotMod();
+	~PlotMod() {}
+
+	// Returns running mode: true: interactive, false: batch
+	bool IsInteractive () { return isInteractive_; }
+
+	// Window mode functions
+//	bool CheckSetWindowOutputFormat( MvRequest& );	//Check and set
+	bool IsWindow( const char* );			//Check a given driver
+	bool IsWindow() { return isWindow_; }		//Inquire current status
+
+	// Check/initialize request came from a Macro
+	void CalledFromMacro ( bool flag ) { calledFromMacro_ = flag; }
+	bool CalledFromMacro () { return calledFromMacro_; }
+	bool CalledFromMacro ( MvRequest& );
+
+	// Output Format methods
+	MvRequest OutputFormatInfo();		// Get output info
+ 	MvRequest OutputFormat(); 		// Get request
+	MvRequest MakeDefaultOutputFormat();  	// Get default
+	void OutputFormat( MvRequest& ); 	// Initialize
+	const char* Destination()		// "SCREEN","PRINTER","PREVIEW"
+		{ return plotDestination_.c_str(); }
+	const char* PrinterName()		// name of the printer
+		{ return printerName_.c_str(); }
+
+	// Internal Error should not happen in user version
+//	static void InternalError ( const string & message, const string & title = string() );
+
+	// System Error is used when probems are in one of the modules that PlotMod uses
+	// including OpenGL
+	virtual void SystemError   ( const string & message, const string & title = string() ) = 0;
+
+	// Metview Error is due to user defining wrong parameters
+	void MetviewError ( const string & message, const string & errorlevel = string() );
+	
+	// Show message dialog
+	virtual void UserMessage  ( const string& ) = 0;
+
+	// print a message to the log window or the output so it will be visible without '-slog'
+	virtual void printMessage (const string&, bool) = 0;
+
+	// the module will exit with an error code
+	void exitWithError ();
+
+	void warningMessage     (const string&);
+	void errorMessage       (const string&);
+	void infoMessage        (const string&);
+	virtual void progressMessage    (const string&) {};
+
+	// Timing methods
+	void watchStart(const char*);		// Starts and names the session
+	void watchLaptime(const char*);	// Prints the laptime since the previous call to
+								// watchLaptime() or from watchStart()
+	void watchStop();				// Stops and prints a report
+
+protected:
+	bool isInteractive_;
+	bool isWindow_;			// output on screen?
+	bool calledFromMacro_;		// request came from Macro?
+	MvRequest outFormat_;		// output format info
+	string plotDestination_;		// "SCREEN","PRINTER","PREVIEW"."FILE"
+	string printerName_;		// name of the printer
+	MvStopWatch* watch_;		// timing debug
+};
+#endif
diff --git a/src/uPlot/PlotModAction.cc b/src/uPlot/PlotModAction.cc
new file mode 100644
index 0000000..2c2836e
--- /dev/null
+++ b/src/uPlot/PlotModAction.cc
@@ -0,0 +1,24 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PlotModAction
+// Gilberto Camara - ECMWF Apr 97
+//
+//
+//  Methods for the PlotModAction class
+//
+//
+#include "PlotModAction.h"
+#include "CreateAction.h"
+
+PlotModAction&
+ActionTraits::DefaultObject()
+{
+	return CreateAction::Instance();
+}
diff --git a/src/uPlot/PlotModAction.h b/src/uPlot/PlotModAction.h
new file mode 100644
index 0000000..13279e4
--- /dev/null
+++ b/src/uPlot/PlotModAction.h
@@ -0,0 +1,86 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PlotModAction
+// Gilberto Camara - ECMWF Apr 97
+//
+// .NAME:
+//  PlotModAction
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the PlotModAction class, a base class
+//  for the various types of actions in PlotMod
+//
+// .CLIENTS:
+//  PlotMod main module (PlotMod.cc)
+//
+// .RESPONSABILITY:
+//  This class will provide a run-time binding
+//  for the PlotMod actions. The idea is to define, at run-time,
+//  the action which is called based on the contents of a request.
+// 
+//
+// .COLLABORATORS:
+//  Builder, Matcher, GraphicsEngine
+//
+// .ASCENDENT:
+//
+// .DESCENDENT:
+//  VisualiseAction, EditMapAction, DropAction, HardcopyAction
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107).
+//
+//  For additional references please see Coplien's chapther 8
+//  ("Programming with Exemplars")
+//
+#ifndef PlotModAction_H
+#define PlotModAction_H
+
+#include "Prototype.hpp"
+#include "PmContext.h"
+
+class PlotModAction;
+
+struct ActionTraits {
+	typedef PlotModAction Type;
+	static  Type&         DefaultObject();
+};
+
+class PlotModAction: public Prototype <ActionTraits>
+{
+
+public:
+	// Contructors
+	PlotModAction (const Cached& actionName):
+		Prototype<ActionTraits> ( actionName, this ){} 
+
+	// Destructor
+	virtual ~PlotModAction(){} 
+
+	// Methods
+        virtual void Execute ( PmContext& ) = 0;
+
+private:
+
+	// No copy allowed
+	PlotModAction(const PlotModAction&);
+	PlotModAction& operator=(const PlotModAction&){ return *this;}
+
+	// Friends
+	//friend ostream& operator<<(ostream& ostr, const PlotModAction& act)
+	//	{ act.print(ostr); return ostr; }
+};
+
+#endif
diff --git a/src/uPlot/PlotModBatch.cc b/src/uPlot/PlotModBatch.cc
new file mode 100644
index 0000000..6091f29
--- /dev/null
+++ b/src/uPlot/PlotModBatch.cc
@@ -0,0 +1,91 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvApplication.h>
+#include "PlotModBatch.h"
+#include "PlotModConst.h"
+
+PlotModBatch::PlotModBatch()
+{
+	isInteractive_   = false;
+	isWindow_        = false;
+	plotDestination_ = MVFILE;
+	printerName_     = "";
+}
+
+void
+PlotModBatch::UserMessage( const string& message )
+{
+	cout << message.c_str() << endl;
+}
+
+
+
+// print a message to the log window or the output; if 'priority', then 
+// it will be visible without '-slog'
+void PlotModBatch::printMessage(const string& msg, bool priority)
+{
+    char c_msg[1024];
+    strncpy (c_msg, msg.c_str(), 1023);
+
+    if (priority)
+    {
+        svc *service = MvApplication::instance().getService();
+
+        // copy the message into a C string and send it to the service
+
+        if (service != NULL)
+        {
+            set_svc_msg(service->id,c_msg);
+        }
+    }
+    else
+    {
+        marslog(LOG_INFO|LOG_PERR, c_msg);
+    }
+}
+
+
+
+void
+PlotModBatch::SystemError ( const string & message, const string & title )
+{
+	//cout << "PlotMod::SystemError -> IT NEEDS TO IMPLEMENT THIS METHOD" << endl;
+
+    // call the MetviewError method to get some output to the user
+
+    string fullMessage = title + ": " + message;
+    MetviewError (fullMessage, "ERROR");
+
+
+#if 0
+      cout << ">>>>> " << title.c_str() << " <<<<<" << endl;
+      cout << message.c_str() << endl << endl;
+
+  MvRequest reqst("USER_MESSAGE");
+  reqst("INFO") = message.c_str(); 
+  send_message(PlotModApp::Instance().getService(),(request*)reqst);
+#endif
+}
+
+
+#if 0
+void
+PlotMod::InternalError ( const string & message, const string & title )
+{
+      cout << ">>>>> " << title.c_str() << " <<<<<" << endl;
+      cout << message.c_str() << endl << endl;
+
+  MvRequest reqst("USER_MESSAGE");
+  reqst("INFO") = message.c_str(); 
+
+  send_message(PlotModApp::Instance().getService(),(request*)reqst);
+}
+
+#endif
diff --git a/src/uPlot/PlotModBatch.h b/src/uPlot/PlotModBatch.h
new file mode 100644
index 0000000..c6d0b61
--- /dev/null
+++ b/src/uPlot/PlotModBatch.h
@@ -0,0 +1,66 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PlotModBatch
+//
+// .AUTHOR:
+//  Fernando Ii		Jul/2010
+//
+// .SUMMARY:
+//   Defines the batch mode of the PlotMod
+//   class, which defines a higher level of the
+//   visualisation control
+//
+// .CLIENTS:
+//   This class is used by any METVIEW object, which
+//   defines a batch access
+// 
+// .RESPONSIBILITY:
+//
+// .COLLABORATORS:
+//   PlotModApp ( which will be either PlotModXApp or PlotModBatchApp).
+//
+// .DESCENDENT:
+//   (none)
+//
+// .RELATED:
+//   (none)
+//
+// .ASCENDENT:
+//   (none)
+//
+#ifndef PlotModBatch_H
+#define PlotModBatch_H
+
+#include "PlotMod.h"
+
+class PlotModBatch: public PlotMod {
+
+public:
+	// Default Constructor/Destructor
+	PlotModBatch();
+	~PlotModBatch() {};
+
+
+	// Internal Error should not happen in user version
+//	static void InternalError ( const string & message, const string & title = string() );
+
+	// System Error is used when probems are in one of the modules that PlotMod uses
+	// including OpenGL
+	void SystemError ( const string & message, const string & title = string() );
+
+	// Show message dialog
+	void UserMessage  ( const string& );
+
+	// print a message to the log window or the output so it will be visible without '-slog'
+	void printMessage (const string&, bool);
+};
+#endif
diff --git a/src/uPlot/PlotModBuilder.cc b/src/uPlot/PlotModBuilder.cc
new file mode 100644
index 0000000..6f06009
--- /dev/null
+++ b/src/uPlot/PlotModBuilder.cc
@@ -0,0 +1,53 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PlotModBuilder.h"
+#include "PlotPageBuilder.h"
+#include "PmContext.h"
+#include "ObjectList.h"
+
+//
+//  Methods for the PlotModBuilder class
+//
+PlotModBuilder&
+BuilderTraits::DefaultObject()
+{
+	return PlotPageBuilder::Instance();
+}
+
+Cached PlotModBuilder::GetView(PmContext &context)
+{
+	Cached viewName = context.InRequest()("_VIEW");
+	if ( ( const char *)viewName )
+		return viewName;
+
+	viewName =  context.FirstDataView();
+	if ( ( const char *)viewName )
+		return viewName;
+
+	const char* verb = context.InRequest()("_VERB");
+	if ( ! verb )
+		verb = context.InRequest().getVerb();
+
+	viewName = ObjectList::Find("request", verb, "view");
+	if ( ( const char *)viewName )
+	{
+		int slen = (const char*)viewName ? strlen(viewName) : 0;
+		char *upName = new char[slen + 1];
+
+		for ( int i = 0; i < slen; i++ )
+			upName[i] = toupper(viewName[i]);
+
+		upName[slen] = 0;
+		viewName = upName;
+		delete []upName;
+	}
+
+	return viewName;
+}
diff --git a/src/uPlot/PlotModBuilder.h b/src/uPlot/PlotModBuilder.h
new file mode 100644
index 0000000..1b0464f
--- /dev/null
+++ b/src/uPlot/PlotModBuilder.h
@@ -0,0 +1,92 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PlotModBuilder
+// Gilberto Camara - ECMWF Apr 97
+//
+// .NAME:
+//  Builder
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the builder class, an abstract class for
+//  building the PlotMod page hierarchy from a request
+//
+// .DESCRIPTION:
+//  This class is based on the "Builder" pattern (see
+//  "Design Patterns" book, page 97).
+//
+//  The idea is to define a base class for all possible instances
+//  of requests which create a plot window hierarchy from a request
+//  Details of internal structure of the objects being created are
+//  hidden from client applications which then can invoke the
+//  appropriate builder.
+//
+//  There are three types of specialised builders in PlotMod:
+//
+//  - SuperPageBuilder, which builds a page hierarcy based on
+//    a "SUPERPAGE" request
+//
+//  - PlotWindowBuilder, which builds a page hierarchy based on
+//    a "PLOT" request
+//
+//  - GribBuilder, which builds a page hierarchy based on a 
+//    "GRIB" request
+//
+//
+//  These builders will be concrete classes derived from the
+//  Builder abstract (base) class
+//
+// .DESCENDENT:
+//  SuperPageBuilder, PlotWindowBuilder, GribBuilder
+//
+// .RELATED:
+//  Presentable, SuperPage, Page, DataObject
+//
+// .ASCENDENT:
+//
+//
+#ifndef PlotModBuilder_H
+#define PlotModBuilder_H
+
+#include "Prototype.hpp"
+
+class Presentable;
+class PlotModBuilder;
+class PmContext;
+
+struct BuilderTraits {
+	typedef PlotModBuilder Type;
+	static  Type&          DefaultObject();
+};
+
+class PlotModBuilder : public Prototype <BuilderTraits>
+{
+
+public:
+
+        // Contructors
+	PlotModBuilder ( const Cached& builderName ): 
+		Prototype<BuilderTraits> ( builderName, this ){}
+
+        // Destructor
+	virtual ~PlotModBuilder() {}
+
+        // Methods
+	virtual Presentable* Execute ( PmContext& ) = 0;
+        virtual Cached GetView(PmContext &);
+
+	// Friends
+	//friend ostream& operator<<(ostream& ostr, const PlotModBuilder& bld)
+	//{ return ostr << bld.Name(); }
+};
+
+#endif
diff --git a/src/uPlot/PlotModConst.h b/src/uPlot/PlotModConst.h
new file mode 100644
index 0000000..1fbd10c
--- /dev/null
+++ b/src/uPlot/PlotModConst.h
@@ -0,0 +1,195 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PlotModConst
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  General Definitions, Enumerations,
+//  Macros and Constants used in PlotMod 
+//
+
+#ifndef PlotModConst_H
+#define PlotModConst_H
+
+#if 0
+#include <Cached.h>
+
+// Path length for UNIX files
+#ifndef MAXPATHLEN
+const  int MAXPATHLEN = 256;
+#endif
+
+// Default file for printing Requests
+#ifndef OUT_REQUEST_FILE_defined
+#define OUT_REQUEST_FILE_defined
+static Cached OUT_REQUEST_FILE =   "request.dmp";
+#endif
+
+// Text line
+const short MAXNAMEICON = 50;
+
+// Time Tolerance
+const double TIME_TOLERANCE = 0.3333; 
+// 3 hours expressed in fractions of a day 
+#endif
+
+// ImageParameter Number taken from WMO Code Table 2
+const int GRIB_IMAGE_PARAM_NUMBER = 127;
+
+// Maximum number of Legends package allowed in Magics
+const short MAX_LEGENDS_PACKAGE = 5;
+
+#if 0
+const bool SHADED     = true;
+const bool NOT_SHADED = false ; 
+
+// Request Classes
+static Cached DATAVISDEF	= "DATAVISDEF";
+static Cached DATA		= "DATA";
+static Cached BACKVISDEF	= "BACKVISDEF";
+static Cached COMMAND		= "COMMAND";
+static Cached TEXT		= "TEXT";
+static Cached LEGEND		= "LEGEND";
+static Cached LEGEND_ENTRY	= "LEGEND_ENTRY";
+static Cached NOCLASS		= "NOCLASS";
+static Cached NOTYPE		= "NOTYPE";
+static Cached PLOTWINDOW        = "PLOTWINDOW";
+static Cached RETRIEVE          = "RETRIEVE";
+static Cached READ              = "READ";
+#endif
+
+// Data Requests
+//static Cached LIST_OF_POINTS 	= "LIST_OF_POINTS";
+static string GRIB           	= "GRIB";
+//static Cached BUFR           	= "BUFR";
+//static Cached IMAGE          	= "IMAGE";
+static string NETCDF            = "NETCDF";
+#if 0
+static Cached MATRIX         	= "MATRIX";
+static Cached MATRIX1D         	= "MATRIX1D";
+static Cached MATRIX2D         	= "MATRIX2D";
+static Cached MATRIX3D         	= "MATRIX3D";
+static Cached DRAWING        	= "DRAWING";
+static Cached CURVE          	= "CURVE";
+static Cached BAR_GRAPH      	= "BAR_GRAPH";
+static Cached DOUBLE_CURVE   	= "DOUBLE_CURVE";
+static Cached VECTOR_FIELD   	= "VECTOR_FIELD";
+static Cached POLAR_FIELD    	= "POLAR_FIELD";
+static Cached GEOPOINTS      	= "GEOPOINTS";
+static Cached STATION		= "STATION";
+static Cached BACKGROUND        = "BACKGROUND";
+#endif
+
+// Page visualization Definitions
+static Cached MCOAST    	= "MCOAST";
+static Cached PCOAST    	= "PCOAST";
+static Cached MTEXT		= "MTEXT";
+static Cached PTEXT		= "PTEXT";
+static Cached MLEGEND		= "MLEGEND";
+static Cached MAXIS		= "MAXIS";
+static Cached PAXIS		= "PAXIS";
+//static Cached PTEPHI		= "PTEPHI";
+//static Cached MAGICS_PARAMETERS = "MAGICS_PARAMETERS";
+static Cached ANNOTATION	= "ANNOTATION";
+
+#if 0
+// Page organization
+static Cached INDEPENDENT       = "INDEPENDENT";
+static Cached ROW_CONNECTED     = "ROW_CONNECTED";
+static Cached AUTOMATIC         = "AUTOMATIC";
+static Cached POSITIONAL        = "POSITIONAL";
+static Cached HORIZONTAL        = "HORIZONTAL";
+static Cached VERTICAL          = "VERTICAL";
+static Cached BOTTOM            = "BOTTOM";
+static Cached TOP               = "TOP";
+#endif
+
+// Data Visualization Definitions
+//static Cached PIMAGE    	= "PIMAGE";
+static Cached MCONT     	= "MCONT";
+static Cached PCONT     	= "PCONT";
+static Cached MGRAPH    	= "MGRAPH";
+static Cached PGRAPH    	= "PGRAPH";
+static Cached MWIND     	= "MWIND";
+static Cached PWIND     	= "PWIND";
+//static Cached POBS      	= "POBS";
+static Cached MSYMB     	= "MSYMB";
+static Cached PSYMB     	= "PSYMB";
+static Cached PTACH     	= "PTACH";
+static Cached ISOTACHS     	= "ISOTACHS";
+
+// Command Definitions
+//static Cached DEVICE		= "DEVICE";
+static Cached DEVICEDRIVER	= "DEVICE_DRIVER";
+static string PLOTSUPERPAGE     = "PLOT_SUPERPAGE";
+static Cached PLOTPAGE          = "PLOT_PAGE";
+//static Cached PLOTSUBPAGE       = "PLOT_SUBPAGE";
+//static Cached SUPERPAGE		= "SUPERPAGE";
+//static Cached PAGE		= "PAGE";
+static Cached PAGES             = "PAGES";
+//static Cached SUBPAGES          = "SUBPAGES";
+static string NEWPAGE		= "NEWPAGE";
+//static Cached DROP		= "DROP";
+//static Cached CLEAN		= "CLEAN";
+//static Cached STATE		= "STATE";
+//static Cached NEXT		= "NEXT";
+//static Cached FLUSHSUPERPAGE    = "FLUSHSUPERPAGE";
+//static Cached MATCHINGINFO      = "MATCHING_INFO";
+//static Cached EDITMAPPAGE	= "EDIT_MAP_PAGE";
+//static Cached EDITMAPWIDGET	= "EDIT_MAP_WIDGET";
+//static Cached PAGEWIDGET       	= "PAGE_WIDGET";
+
+// Request Parameters
+//static Cached ICON              = "ICON";
+
+// Others
+//static Cached YES		= "YES";
+//static Cached NO		= "NO";
+static Cached ON		= "ON";
+//static Cached OFF		= "OFF";
+
+#if 0
+// PlotMod modules definitions
+
+static Cached DEFAULT           = "Default";
+static Cached NONE              = "None";
+static Cached POSTSCRIPT        = "POSTSCRIPT";
+static Cached X_WINDOW          = "X_WINDOW";
+static Cached OPENGL            = "OpenGL";
+static Cached MAGICS            = "Magics";
+#endif
+
+// Views
+static const string MAPVIEW       = "MAPVIEW";
+static const string GEOVIEW       = "GEOVIEW";
+static const string CARTESIANVIEW = "CARTESIANVIEW";
+static const string DEFAULTVIEW   = "GEOVIEW";
+
+// Output devices
+static const char* const MVPRINTER       = "PRINTER";
+static const char* const MVSCREEN        = "SCREEN";
+static const char* const MVPREVIEW       = "PREVIEW";
+static const char* const MVFILE          = "FILE";
+static const char* const MVSCREEN_DRIVER = "QTOUTPUT";
+
+#if 0
+static Cached EMPTY             = "EMPTY";
+
+// Widgets
+const char* const SCROLLWIDGETNAME = "Scroll";
+const char* const ZOOMWIDGETNAME = "Zoom";
+#endif
+
+#endif
+
diff --git a/src/uPlot/PlotModInteractive.cc b/src/uPlot/PlotModInteractive.cc
new file mode 100644
index 0000000..d69074e
--- /dev/null
+++ b/src/uPlot/PlotModInteractive.cc
@@ -0,0 +1,87 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PlotModInteractive.h"
+#include "PlotModConst.h"
+
+#include <QMessageBox>
+#include <QString>
+
+#include "uPlotBase.h"
+
+PlotModInteractive::PlotModInteractive()
+{
+	isInteractive_   = true;
+	isWindow_        = true;
+	plotDestination_ = MVSCREEN;
+	printerName_     = "";
+	plotApplication_=0;
+}
+
+void
+PlotModInteractive::UserMessage( const string& message )
+{
+	QString str = message.c_str();
+
+	QMessageBox msgBox;
+	msgBox.setText(str);
+	msgBox.setStandardButtons(QMessageBox::Ok);
+	msgBox.exec();
+}
+
+void
+PlotModInteractive::progressMessage( const string& message )
+{
+	if(plotApplication_)
+	  	plotApplication_->progressMessage(message);
+}	
+
+
+// print a message to the log window or the output; if 'priority', then 
+// it will be visible without '-slog'
+void PlotModInteractive::printMessage(const string& msg, bool /*priority*/)
+{
+    // XXX cannot seem to get the output to go to the proper message log
+    cout << msg;
+}
+
+
+void
+PlotModInteractive::SystemError ( const string & message, const string & /*title*/ )
+{
+	cout << "PlotMod::SystemError -> IT NEEDS TO IMPLEMENT THIS METHOD. " << message << endl;
+#if 0
+      string titleText ( "PlotMod System Error" );
+      if ( title.length() )
+	titleText = titleText + ": " + title;
+      InfoDialogManager::Instance().post( titleText.c_str(), message.c_str());
+  
+  MvRequest reqst("USER_MESSAGE");
+  reqst("INFO") = message.c_str(); 
+  send_message(PlotModApp::Instance().getService(),(request*)reqst);
+#endif
+}
+
+
+#if 0
+void
+PlotMod::InternalError ( const string & message, const string & title )
+{
+     string titleText ( "PlotMod Internal Error" );
+      if ( title.length() )
+	titleText = titleText + ": " + title;
+      InfoDialogManager::Instance().post( titleText.c_str(), message.c_str());
+
+  MvRequest reqst("USER_MESSAGE");
+  reqst("INFO") = message.c_str(); 
+
+  send_message(PlotModApp::Instance().getService(),(request*)reqst);
+}
+
+#endif
diff --git a/src/uPlot/PlotModInteractive.h b/src/uPlot/PlotModInteractive.h
new file mode 100644
index 0000000..f5be830
--- /dev/null
+++ b/src/uPlot/PlotModInteractive.h
@@ -0,0 +1,75 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PlotModInteractive
+//
+// .AUTHOR:
+//  Fernando Ii		Jul/2010
+//
+// .SUMMARY:
+//   Defines the interactive mode of the PlotMod
+//   class, which defines a higher level of the
+//   visualisation control
+//
+// .CLIENTS:
+//   This class is used by any METVIEW object, which
+//   defines an interactive access
+// 
+// .RESPONSIBILITY:
+//
+// .COLLABORATORS:
+//   PlotModApp ( which will be either PlotModXApp or PlotModBatchApp).
+//
+// .DESCENDENT:
+//   (none)
+//
+// .RELATED:
+//   (none)
+//
+// .ASCENDENT:
+//   (none)
+//
+#ifndef PlotModInteractive_H
+#define PlotModInteractive_H
+
+#include "PlotMod.h"
+
+class uPlotBase;
+
+class PlotModInteractive: public PlotMod {
+
+public:
+	// Default Constructor/Destructor
+	PlotModInteractive();
+	~PlotModInteractive() {};
+
+
+	// Internal Error should not happen in user version
+//	static void InternalError ( const string & message, const string & title = string() );
+
+	// System Error is used when probems are in one of the modules that PlotMod uses
+	// including OpenGL
+	void SystemError ( const string & message, const string & title = string() );
+
+	// Show message dialog
+	void UserMessage  ( const string& );
+	
+	void progressMessage(const string& );
+
+	// print a message to the log window or the output so it will be visible without '-slog'
+	void printMessage (const string&, bool);
+	
+	void setPlotApplication(uPlotBase * pa) {plotApplication_=pa;}	
+
+private:    
+	uPlotBase *plotApplication_;
+};
+#endif
diff --git a/src/uPlot/PlotModService.cc b/src/uPlot/PlotModService.cc
new file mode 100644
index 0000000..c69af53
--- /dev/null
+++ b/src/uPlot/PlotModService.cc
@@ -0,0 +1,68 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PlotModService.h"
+#include "MvRequest.h"
+#include "PlotModTask.h"
+#include "Task.h"
+#include "Page.h"
+#include "PlotMod.h"
+#include "Root.h"
+
+PlotModService::PlotModService ( const char *serviceName,
+				 PlotModView *view ):
+	serviceName_( serviceName ),
+	view_( view )
+{
+}
+
+PlotModService::PlotModService ( PlotModView *view ):
+	view_( view )
+{
+}
+
+PlotModService::PlotModService ( const PlotModService &old) :
+	serviceName_(old.serviceName_),
+	view_((PlotModView*)this)
+{
+}
+
+PlotModService::~PlotModService()
+{
+}
+
+void PlotModService::endOfTask (MvTask* task)
+{
+    MvServiceTask* serviceTask = (PlotModTask* ) task;
+    MvRequest replyRequest = serviceTask->getReply();
+
+    if ( serviceTask->getError() == 0 )
+    {
+        // Get the parent data unit id.
+        MvRequest contextRequest = replyRequest.getSubrequest ("_CONTEXT");
+        if ( contextRequest )
+            view_->ParentDataUnitId(contextRequest("_PARENT_DATAUNIT_ID") );
+
+        // Call the presentable and insert the data
+        view_->InsertDataRequest ( replyRequest );
+
+        // Register drawing task
+        int pageId = view_->Owner().Id();
+        Presentable* pageNode = Root::Instance().FindBranch (pageId);
+        pageNode->HasDrawTask(true);
+        pageNode->DrawTask(); //Draw
+    }
+    else
+    {
+        string title = "Error from "; title += serviceName_.c_str();
+        PlotMod::Instance().UserMessage(title);
+    }
+
+    msg_.erase();
+}
diff --git a/src/uPlot/PlotModService.h b/src/uPlot/PlotModService.h
new file mode 100644
index 0000000..125146e
--- /dev/null
+++ b/src/uPlot/PlotModService.h
@@ -0,0 +1,80 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PlotModService
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the ServiceView class, which deals with
+//  application modules
+//
+// .CLIENTS:
+//  DropAction
+//
+// .RESPONSIBILITY:
+//
+//  - When receiving a drop or a request in a page associated
+//    to a service view, call the service to process the request
+//
+//  - When the application is finished, pass the request sent
+//    by the application to the presentable, which then should 
+//    perform the data matching
+//
+//  
+// .COLLABORATORS:
+//  MvTask - communication with METVIEW modules
+//
+// .ASCENDENT:
+//  PlotModView, MvClient
+//
+// .DESCENDENT:
+//  MapView
+//
+//
+#ifndef PlotModService_H
+#define PlotModService_H
+
+#include "PlotModView.h"
+#include <MvTask.h>
+
+class PlotModService: public MvClient {
+
+public:
+
+	// -- Constructors
+	PlotModService( const char*, PlotModView* );
+	PlotModService( PlotModView* );
+	PlotModService(const PlotModService&);
+
+	// -- Destructor
+	~PlotModService();
+
+	void ServiceName ( const char* name ) {
+		serviceName_ = name; }
+
+	virtual void progress(const char *msg) {
+		msg_.append(msg); }
+ 
+	// Perform actions after receiving response from service
+	virtual void endOfTask ( MvTask* );
+
+protected:
+
+	string		serviceName_;
+	PlotModView	*view_;
+	string 		msg_;
+
+	// No copy allowed
+	PlotModService& operator=(const PlotModService&);
+};
+#endif
diff --git a/src/uPlot/PlotModTask.cc b/src/uPlot/PlotModTask.cc
new file mode 100644
index 0000000..eaf98c9
--- /dev/null
+++ b/src/uPlot/PlotModTask.cc
@@ -0,0 +1,29 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PlotModTask.h"
+
+PlotModTask::PlotModTask( MvClient* client,
+			  PmContext& context,
+			  const Cached& serviceName,
+			  const MvRequest& outRequest ):
+	MvServiceTask ( client, serviceName, outRequest ),
+	context_ ( context )
+{
+	context_.Attach(); // increment the refence counting
+	                   // in order to GUARANTEE that the
+	                   //  context will still exist when the 
+	                   //  service module responds
+}
+
+// -- Destructor
+PlotModTask::~PlotModTask()
+{
+	context_.Detach(); // decrement the reference counting
+}
diff --git a/src/uPlot/PlotModTask.h b/src/uPlot/PlotModTask.h
new file mode 100644
index 0000000..166e64d
--- /dev/null
+++ b/src/uPlot/PlotModTask.h
@@ -0,0 +1,91 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PlotModTask
+// Gilberto Camara - ECMWF Sep 97
+//
+// .NAME:
+//  PlotModTask
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//
+// .CLIENTS:
+//
+// .RESPONSABILITIES:
+//
+// .COLLABORATORS:
+//
+// .BASE CLASS:
+//
+// .DERIVED CLASSES:
+//
+// .REFERENCES:
+//
+//
+#ifndef PlotModTask_H
+#define PlotModTask_H
+
+#include <MvServiceTask.h>
+#include "PmContext.h"
+
+class PlotModTask: public MvServiceTask {
+public:
+
+	// -- Contructors
+	PlotModTask( MvClient* client,
+		     PmContext& context,
+		     const Cached& serviceName,
+		     const MvRequest& outRequest );
+
+	// -- Destructor
+	~PlotModTask(); // Change to virtual if base class
+
+	// -- Convertors
+	// None
+
+	// -- Operators
+	// None
+
+	// -- Methods
+	// None
+
+	// -- Overridden methods
+	// None
+
+protected:
+
+	// -- Members
+	// None
+
+	// -- Methods
+	// void print(ostream&) const; // Change to virtual if base class	
+
+	// -- Overridden methods
+	// None
+
+	// -- Class members
+	// None
+
+	// -- Class methods
+	// None
+
+private:
+
+	// No copy allowed
+	PlotModTask(const PlotModTask&);
+	PlotModTask& operator=(const PlotModTask&){return *this;}
+
+	// -- Members
+	PmContext&   context_;
+};
+
+#endif
diff --git a/src/uPlot/PlotModView.cc b/src/uPlot/PlotModView.cc
new file mode 100644
index 0000000..20eaee0
--- /dev/null
+++ b/src/uPlot/PlotModView.cc
@@ -0,0 +1,479 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+//  Methods for the PlotModView class
+//
+#include <Assertions.hpp>
+#include <MvApplication.h>
+
+#include "PlotModView.h"
+#include "Page.h"
+#include "ObjectList.h"
+#include "MapView.h"
+#include "SubPage.h"
+#include "Root.h"
+#include "PlotMod.h"
+#include "DataObject.h"
+
+// Initialization of factory map
+PlotModViewFactory::FactoryMap* PlotModViewFactory::factoryMap_ = 0;
+
+PlotModViewFactory::PlotModViewFactory ( const Cached& factoryName ): 
+	name_(factoryName)
+{
+	if(factoryMap_ == 0)
+	  factoryMap_ = new PlotModViewFactory::FactoryMap();
+
+	(*factoryMap_)[name_] = this;
+}
+
+// Make method
+PlotModView*
+PlotModViewFactory::Make ( Page& owner, MvRequest& viewRequest )
+{
+	require ( owner.Id() > 1 );
+
+	// Retrieve the class  associated to the viewRequest
+	Cached viewClass = viewRequest.getVerb();
+
+	// Find the request associated with the view, which contains the
+	// name of the factory to be called and
+	// which contains the name of the service to be called (e.g. CrossSection)
+	MvRequest setupRequest = ObjectList::Find ( "view", viewClass );
+	Cached    factoryName  = setupRequest( "name" );
+
+	// Call the virtual constructor associated with the factory name
+	FactoryMap::iterator i = factoryMap_->find ( factoryName );
+
+	if ( i == factoryMap_->end() )
+		return new MapView ( owner, viewRequest, setupRequest );
+
+	return (*i).second->Build ( owner, viewRequest, setupRequest );
+}
+
+//
+// Class PlotModView
+PlotModView::PlotModView ( Page& owner,
+			   const MvRequest& viewRequest,
+			   const MvRequest& ):
+	owner_           ( &owner      ),
+	viewRequest_     ( viewRequest ),
+	matchingCriteria_( viewRequest ),
+	pageId_          ( owner.Id()  ),
+        parentDataUnitId_( 0           )
+{
+	// Empty
+}
+
+PlotModView::PlotModView(const PlotModView &old ) :
+  owner_(old.owner_),
+  viewRequest_     ( old.viewRequest_ ),
+  matchingCriteria_( old.matchingCriteria_ ),
+  pageId_(old.pageId_),
+  parentDataUnitId_( old.parentDataUnitId_)
+{
+
+}
+
+PlotModView::~PlotModView()
+{
+	// Empty
+}
+
+bool 
+PlotModView::Match ( const MatchingInfo&,const MatchingInfo& ) const
+{
+//	return matchingCriteria_.Match(lhs,rhs);
+	// Remove temporarily the matching criteria, FAMI 06-2009
+	// It needs to be discussed with Magics++ who will be responsible
+	// for the matching 
+	return true;
+}
+
+string
+PlotModView::MacroName ()
+{
+	return (const char*)ObjectInfo::SpaceToUnderscore ( this->Name().c_str() );
+}
+
+// Sets up the drawing area
+void
+PlotModView::DrawNewPage ( )
+{
+    // Retrieve the graphics Engine
+    GraphicsEngine& ge = Owner().GetGraphicsEngine();
+
+    // Update view (depending on the type of the view)
+    UpdateView();
+
+    // Retrieve sizes e location information
+    Presentable* sp  = Owner().FindSuperPage();
+    PaperSize spSize = sp->GetMySize();         //SuperPage size
+    Rectangle myLoc  = Owner().GetLocation();   //Page location
+    PaperSize mySize = Owner().GetMySize();     //Page size
+
+    // Metview origin coordinates is top left corner
+    // Magics origin coordinates is lower left corner
+    viewRequest_ ("_WIDTH" )    = mySize.GetWidth();
+    viewRequest_ ("_HEIGHT" )   = mySize.GetHeight();
+    viewRequest_ ("_X_ORIGIN" ) = spSize.GetWidth()  * myLoc.left;
+    viewRequest_ ("_Y_ORIGIN" ) = spSize.GetHeight() - (spSize.GetHeight()*myLoc.bottom);
+
+    // Ask the graphics engine to draw the frame
+    ge.DrawNewPage ( viewRequest_ );
+}
+
+#if 0 //D
+void
+PlotModView::DrawFrame ( Canvas& canvas )
+{
+	// Retrieve the graphics Engine
+	GraphicsEngine& ge = Owner().GetGraphicsEngine();
+
+	// Ask the graphics engine to draw the frame
+	ge.DrawFrame ( canvas, viewRequest_ );
+}
+
+void
+PlotModView::DrawExternalFrame ( Canvas& canvas )
+{
+	// Retrieve the graphics Engine
+	GraphicsEngine& ge = Owner().GetGraphicsEngine();
+
+	// Ask the graphics engine to draw the frame
+	ge.DrawExternalFrame ( canvas, viewRequest_ );
+}
+#endif
+
+void
+PlotModView::Draw ( SubPage* subPage )
+{
+	DrawPriorMap drawPriorMap;
+	subPage->GetDrawPrior ( &drawPriorMap );
+
+	CommonDraw(subPage,drawPriorMap);
+}
+
+void PlotModView::CommonDraw(SubPage *subPage,DrawPriorMap &drawPriorMap)
+{
+	if ( subPage->NrOfChildren() == 0 )
+	{
+		cout << "ERROR: Nr of Children = 0" << endl;
+		return;
+	}
+
+	// Loop on all data to be plotted
+	DrawPriorMap::iterator j;
+	MvIcon dataUnit;
+	for ( j = drawPriorMap.begin(); j != drawPriorMap.end(); ++j )
+	{
+		// Get DataObject node
+		int currentDO = ((*j).second).first;  // Get DataObject ID
+		Presentable*  treeNode = Root::Instance().FindBranch ( currentDO );
+		if ( treeNode == 0 )
+		{
+			PlotMod::Instance().SystemError ( "PlotModView::CommonDraw -> treeNode == 0" );
+			return;
+		}
+
+		// Set draw actions: data + visdef
+		treeNode->DrawDataVisDef();
+	}
+
+#if 0 //FAMI Old code 20100922
+  MvIconDataBase&  dataBase = Owner().IconDataBase();
+
+  if ( subPage->NrOfChildren() == 0 )
+    {
+//D      if ( subPage->IsAWindow () )
+//D	return;
+	    cout << "Nr of Children = 0" << endl;
+    }
+
+  // Retrieve the Graphics Engine
+//D0210  GraphicsEngine& ge = subPage->GetGraphicsEngine();
+
+  Canvas &canvas = subPage->GetCanvas();
+
+  DrawPriorMap::iterator j;
+  bool first = true;
+  int lastDO, currentDO;
+  MvIcon dataUnit;
+  for ( j = drawPriorMap.begin(); j != drawPriorMap.end(); ++j )
+  {
+      if ( first )
+	lastDO = ((*j).second).first;
+
+      // Get DataObject ID
+      currentDO = ((*j).second).first;
+      Presentable*  treeNode = Root::Instance().FindBranch ( currentDO );
+      if ( treeNode == 0 )
+      {
+	  PlotMod::Instance().SystemError ( "PlotModView::CommonDraw -> treeNode == 0" );
+	  return;
+      }
+
+      // If the draw exist, don't draw again
+      string dataString = (*j).first;
+      if ( ! canvas.HasSegment ( subPage->Id (), dataString ) )
+      {
+
+	  MvIcon tmpVisDef;
+	  if ( ! dataBase.RetrieveVisDef( ((*j).second).second, tmpVisDef) )
+	  {
+	      PlotMod::Instance().SystemError ( "PlotModView::CommonDraw -> can't find given visdef id" );
+	      continue;
+	  }
+
+//D	  if ( subPage->IsAWindow () )
+//D	    {
+//D	      ge.StartPicture ( canvas, dataString.c_str(),
+//D				treeNode->Id() );
+//D	      
+//D	      this->DrawNewPage ( canvas );
+//D	    }
+
+	  if ( ! first && currentDO == lastDO )
+	  {
+	      int currentDataUnitId = ((DataObject *)treeNode)->DataUnitId();
+	      map<int,MvRequest>::iterator ii = resetMap.find(currentDataUnitId);
+	      if ( ii != resetMap.end() )
+	      {
+		  if ( dataBase.RetrieveDataUnit( currentDataUnitId , dataUnit) )
+		    dataUnit.SaveRequest((*ii).second);
+	      }
+	  }
+
+	  treeNode->DrawVisDef (tmpVisDef, dataString);
+
+//D	  if ( subPage->IsAWindow () )
+//D	    {
+//D	      this->DrawFrame ( canvas );
+	      
+//D				// terminate the drawing
+//D	      ge.EndPicture ();
+	      
+//D	      subPage->PendingDrawingsAdd();
+//D	    }
+      }
+      first = false;
+      lastDO = currentDO;
+    }
+#endif
+
+}
+
+#if 0
+void
+PlotModView::RetrieveTitleFromMagics ( SubPage* subPage )
+{
+	// Retrieve initial information
+	DrawPriorMap drawPriorMap;
+	subPage->GetDrawPrior ( &drawPriorMap );
+	MvIconDataBase&  dataBase = Owner().IconDataBase();
+	Canvas &canvas = subPage->GetCanvas();
+  
+        DrawPriorMap::iterator j;
+	for ( j = drawPriorMap.begin(); j != drawPriorMap.end(); ++j )
+	{
+		// If the draw exist, don't retrieve the title again
+		string dataString = (*j).first;
+		if ( canvas.HasSegment ( subPage->Id (), dataString ) )
+			return;
+
+		// Retrieve VisDef (VisDef contains informations to PGRIB)
+		MvIcon tmpVisDef;
+		if ( ! dataBase.RetrieveVisDef( ((*j).second).second, tmpVisDef) )
+		{
+			PlotMod::SystemError ( "PlotModView::RetrieveTitleFromMagics -> can't find given visdef id" );
+			continue;
+		}
+
+		// Get DataObject ID
+		Presentable*  treeNode = Root::Instance().FindBranch ( ((*j).second).first );
+		if ( treeNode == 0 )
+		{
+			PlotMod::SystemError ( "PlotModView::RetrieveTitleFromMagics -> treeNode == 0" );
+			return;
+		}
+  
+		treeNode->RetrieveTitleFromMagics(tmpVisDef);
+       }
+}
+#endif
+
+void PlotModView::RecreateData()
+{
+	MvIconDataBase&  dataBase = Owner().IconDataBase();
+	MvIconList duList;
+
+	// Get all data units and resend them to plotmod.
+	dataBase.DataUnitListByPresentableId(Owner().Id(), duList);
+
+	MvListCursor ii;
+	for ( ii = duList.begin(); ii != duList.end(); ii++ )
+	{
+		MvIcon currentIcon = *ii;
+		MvRequest req = currentIcon.Request();
+
+		MvRequest dropRequest ("DROP");
+		dropRequest ("DROP_ID") = Owner().Id();
+
+		if ( (const char *)req("_DROP_X") )
+			dropRequest("DROP_X") = req("_DROP_X");
+
+		if ( (const char *)req("_DROP_Y") )
+			dropRequest("DROP_Y") = req("_DROP_Y");
+
+		// No need to create a new link. Use the current one, provides
+		// that it will not be deleted when cleaning the old data
+		req("_CREATE_LINK") = Cached("NO");
+		dropRequest = dropRequest + req;
+		MvApplication::callService ( "uPlot", dropRequest, 0 );
+	}
+
+	// Clean out data
+	Owner().RemoveAllData();
+
+	Owner().InitMatching();
+
+	// Erase drawings
+//U	Owner().EraseBackDraw();
+//U	Owner().EraseForeDraw();
+	Owner().EraseDraw();
+
+	// Redraw this page
+	Owner().RedrawIfWindow();
+	Owner().NotifyObservers();
+}
+
+bool PlotModView::GetVisDef(Presentable &treeNode,const MvRequest &compare,MvIconList &vdList)
+{
+	const char *verb = compare.getVerb();
+
+	MvIconList tmpList;
+
+	bool usingDefault = treeNode.DefaultVisDefList(verb,tmpList,GETBYVISDEF);
+
+	MvListCursor ii;
+	MvRequest defaultReq = ObjectList::CreateDefaultRequest(verb);
+	int count = compare.countParameters();
+
+	for ( ii = tmpList.begin(); ii != tmpList.end(); ii++ )
+	{
+		bool match = true;
+		MvIcon currentvd = *ii; 
+		MvRequest currentreq = currentvd.Request();
+
+		int defaultvd = currentreq("_DEFAULT");
+		if ( defaultvd )
+		{
+			//currentvd.SaveRequest(compare);
+			usingDefault = true;
+			match = true;
+		}
+		else
+		{
+			// Check that all values in compare request are either the same as in currentReq, or if
+			// currentReq value not set, that it is the default
+			for (int i = 0; i < count; i++ )
+			{
+				const char *param = compare.getParameter(i);
+				const char *testValue = compare(param);
+				const char *value = currentreq(param);
+				const char *defValue = defaultReq(param);
+
+				compare.getValue(testValue,param,0);
+				currentreq.getValue(value,param,0);
+				if ( !( ( value && ! strcmp(value,testValue) ) || ( defValue && ! strcmp(defValue,testValue) ) ) )
+				{
+					match = false;
+					break;
+				}
+			}
+		}
+
+		if ( match )
+			vdList.push_back(currentvd);
+	}
+
+	return usingDefault;
+}
+
+void PlotModView::Owner( Page &xx )
+{
+	owner_ = &xx;
+	pageId_ = xx.Id();
+}
+
+bool
+PlotModView::RetrieveVisdefList (MvRequest& dropRequest, MvRequest& vdRequestList)
+{
+    // Return if this is not a visdef
+    const char* verb = dropRequest.getVerb();
+    if ( !ObjectList::IsVisDef ( verb ) )
+        return false;
+
+    // Get all visdefs
+	vdRequestList.rewind();
+	if (vdRequestList)
+		vdRequestList = empty_request(NULL); // Clean visdef list
+
+	while ( dropRequest )
+	{
+		// Retrieve visdefs
+        verb = dropRequest.getVerb();
+		if ( ObjectList::IsVisDef ( verb ) )
+		{
+			vdRequestList += dropRequest.justOneRequest();
+			dropRequest.advance();
+		}
+		else break;
+	}
+
+	return true;
+}
+
+void
+PlotModView::contentsRequest( MvRequest& dropRequest )
+{
+    // Process the drop
+    MvIcon dataUnit;
+    while ( dropRequest )
+    {
+        // VisDefs are processed in one single goal. This is because the processing
+        // of a single or a group of visdefs is different. It is assumed that
+        // visdefs always come after a dataunit (if it exists).
+        MvRequest vdRequestList;
+        if ( this->RetrieveVisdefList (dropRequest,vdRequestList) )
+        {
+            Owner().InsertVisDef (vdRequestList, dataUnit);
+            if ( !dropRequest ) // no more drops
+                break;
+        }
+
+        MvRequest request = dropRequest.justOneRequest();
+        const char* verb  = request.getVerb();
+        if ( ObjectList::IsVisDefText ( verb ) )
+            Owner().InsertPText ( request );
+        else if ( ObjectList::IsVisDefLegend ( verb ) )
+            Owner().InsertLegend ( request );
+
+        // Update view (if applicable)
+        else if ( ObjectList::IsView ( verb ) )
+            this->UpdateView ( request );
+
+//        else if ( ObjectList::IsVisDefCoastlines ( verb ) )
+//            this->ReplaceCoastlines ( request );
+
+        dropRequest.advance();
+    }
+}
+
diff --git a/src/uPlot/PlotModView.h b/src/uPlot/PlotModView.h
new file mode 100644
index 0000000..adbc251
--- /dev/null
+++ b/src/uPlot/PlotModView.h
@@ -0,0 +1,219 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PlotModView
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the PlotModView class, a base class
+//  for the various types of views in PlotMod
+//
+//  There is one view per page and the view is responsible
+//  for providing the page with the matching information
+//
+//
+// .CLIENTS:
+//  CreateAction, DropAction
+//
+// .RESPONSIBILITY:
+//
+//  - For a page already with data, inform if two
+//    matching information are compatible
+//
+//
+// .COLLABORATORS:
+//  ObjectList - extracts information from the request
+//  MatchingCriteria - verify compatibility of data 
+//
+// .ASCENDENT:
+//
+//
+// .DESCENDENT:
+//  MapView
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107)
+//
+//
+#ifndef PlotModView_H
+#define PlotModView_H
+
+#include <inc_stl.h>
+#include <Cached.h>
+#include <MvRequest.h>
+
+#include "Presentable.h"
+#include "MatchingCriteria.h"
+
+class PlotModView;
+class Page;
+
+class PlotModViewFactory
+{
+
+protected:
+
+	typedef map< Cached, PlotModViewFactory*, less<Cached> > FactoryMap;
+	static FactoryMap* factoryMap_;
+	Cached             name_;
+
+	virtual PlotModView* Build ( Page&, const MvRequest&, const MvRequest& ) = 0;
+
+public:
+        // Normal Constructor
+	PlotModViewFactory ( const Cached& decoderName );
+
+        // Virtual Constructor
+	static PlotModView* Make ( Page& , MvRequest& viewRequest );
+
+       // Keep compiler happy
+       virtual ~PlotModViewFactory() {}
+};
+
+class PlotModView
+{
+
+public:
+
+        // Contructor
+	PlotModView ( Page& , const MvRequest&, const MvRequest&);
+        PlotModView(const PlotModView &old);
+        virtual PlotModView* Clone() const  = 0;
+
+        // Destructor
+	virtual ~PlotModView();
+
+	// Get the object name
+	virtual string Name() = 0;
+
+ 	virtual string MacroName();
+
+        virtual Page& Owner() { return *owner_; }
+        virtual void Owner( Page &xx );
+
+        // Overridden by views that needs to call an application.
+        virtual bool CallService(const MvRequest &,  PmContext &)
+		{ return false; }
+
+	// Verify if matching is possible
+        virtual bool Match(const MatchingInfo& lhs,const MatchingInfo& rhs) const;
+
+       // Delete all data and drop it to PlotMod again
+        virtual void RecreateData();
+
+       // Get a visdef from the database matching the fields in the given request
+       virtual bool GetVisDef(Presentable&, const MvRequest&,MvIconList&);
+
+        // -- Methods which are overriden by derived classes
+
+	// Process the drop
+	virtual void Drop ( PmContext& context ) = 0;
+
+    // Dealing with Contents tools
+    virtual void contentsRequest( MvRequest& );
+
+    // Retrieves a list of visdefs
+    virtual bool RetrieveVisdefList (MvRequest& dropReq, MvRequest& vdReqList);
+
+	// Insert a new data request into the page hierarchy;
+	virtual void InsertDataRequest ( MvRequest& dropRequest ) = 0;
+
+	// Decode the data unit
+	virtual void DecodeDataUnit(MvIcon & ) = 0;
+
+	// Update the current view
+	virtual void UpdateView ( MvRequest& viewRequest) = 0;
+
+    // Replace the current view depending on the type of the view
+    virtual void UpdateView () {}
+
+	// Replace the current geographical area
+	//virtual void ReplaceArea ( const Location&, int /* izoom=-1 */ ) {}
+
+ 	// Sets up the drawing area
+	virtual void DrawNewPage ( );
+
+	virtual void DrawBackground ( ) = 0;
+
+#if 0
+        virtual bool EmptyShared() { return false; }
+	// Draw the backgroung (coastlines or axis ). By default shared background is not empty, so views
+       // that don't want the background drawn if there are data, must override this to true.
+
+//D	virtual void DrawFrame ( Canvas& canvas );
+	// Draw the frame 
+
+	virtual void DrawExternalFrame ( Canvas& canvas );
+	// Draw the external frame 
+#endif
+
+	// Draw the foreground (coastlines or axis )
+	virtual void DrawForeground ( ) = 0;
+
+	virtual void Draw (SubPage *);
+
+        virtual void CommonDraw(SubPage*, DrawPriorMap&);
+
+	// Describe the contents of the view
+	virtual void DescribeYourself ( ObjectInfo& ) = 0;
+
+	virtual MvRequest& ViewRequest ()
+		{ return viewRequest_; }
+
+#if 0
+        virtual void UpdateVisDef(SubPage *, MvRequest &) {}
+        // Some views needs to do special things with VisDefs
+        
+        virtual void RemoveVisDef(SubPage *, const char *) {}
+        // For some views the visual part of the visdef should be removed for subpages.
+      
+        virtual bool EraseAll() { return false; } 
+        // Some views may choose to erase all when EraseDraw(visdefId) is called.
+
+	virtual Cached GetVerb () { return viewRequest_.getVerb(); }
+
+	virtual Cached InputMode () { return Cached ("MAP"); }
+#endif
+
+	void ParentDataUnitId ( int parentDataUnitId ) {
+			viewRequest_("_PARENT_DATAUNIT_ID") = parentDataUnitId;
+			parentDataUnitId_ = parentDataUnitId; 
+		}
+
+	int  ParentDataUnitId () { return parentDataUnitId_; }
+
+        virtual bool BackgroundFromData() const
+		{ return false; }
+
+//	virtual bool CanChangeGeography() { return false; }
+
+//	virtual void RetrieveTitleFromMagics ( SubPage* subPage );
+
+//	virtual void ChangeFontType ( bool flag );
+
+       // Overridden by derived classes if they need to do something when things are removed from contents
+        virtual bool Reset(const MvRequest &)
+		{ return false; }
+
+protected:
+
+	Page* owner_;
+	MvRequest viewRequest_;
+	MatchingCriteria matchingCriteria_;
+	int  pageId_;
+	int parentDataUnitId_;
+};
+
+#endif
diff --git a/src/uPlot/PlotPageBuilder.cc b/src/uPlot/PlotPageBuilder.cc
new file mode 100644
index 0000000..0872c10
--- /dev/null
+++ b/src/uPlot/PlotPageBuilder.cc
@@ -0,0 +1,132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File PlotModBuilder
+// Gilberto Camara - ECMWF Apr 97
+//
+//
+
+#include "PlotPageBuilder.h"
+
+#include <Assertions.hpp>
+#include "ObjectList.h"
+#include "Page.h"
+#include "PmContext.h"
+#include "Root.h"
+#include "SuperPage.h"
+
+// This is the singleton instance of the prototype 
+static PlotPageBuilder plotpageBuilderInstance("PlotPageBuilder");
+
+//
+//   Methods for the PlotPageBuilder  class
+//
+
+PlotPageBuilder& 
+PlotPageBuilder::Instance()
+{
+  return plotpageBuilderInstance;
+}
+
+Presentable*
+PlotPageBuilder::Execute (PmContext& context)
+{
+	// Creation of a new PlotPage and associated pages
+	// Check if request is a PLOTSUPERPAGE
+	MvRequest contextReq = context.InRequest();
+
+	const char* verb = contextReq.getVerb();
+	Presentable* superpage = 0;
+	MvRequest defaultSuperPage;
+
+	// Build a PLOTSUPERPAGE. If the superpage structure 
+	// already exists, only add the new page
+	if ( verb == PLOTSUPERPAGE )
+	{
+		superpage = Root::Instance().FindSuperPage();
+		if ( superpage )
+		{
+			// Insert Page
+			Page* page = superpage->InsertOnePage(contextReq);
+
+			context.Advance();  // Skip request processed above
+
+			// Deal with further requests
+			page->DropSimulate(context);
+
+			return superpage;
+		}
+		// for efficiency, only copy the portion of the request that we will need
+		MvRequest nextReq;
+		nextReq.copyFromCurrentTo(context.InRequest(), NEWPAGE.c_str());
+
+		superpage = new SuperPage ( nextReq );
+//		superpage = new SuperPage ( context.InRequest() );
+	}
+	else   // build a default PLOTSUPERPAGE (to deal with MAPVIEW,...)
+	{
+		defaultSuperPage = ObjectList::CreateDefaultRequest ( "PLOT_SUPERPAGE" );
+
+		// Make sure the macro is generated in current dir, even when defaults are used.
+		const char *val;
+		if ( ( val =  context.InRequest()("_NAME")) )
+		{
+			string newName = dirname(val);
+			newName  += "/<Display Window>";
+			defaultSuperPage("_NAME") = newName.c_str();
+		}
+
+		if ( strcmp(verb,PLOTPAGE) == 0 )
+			defaultSuperPage("PAGES") = context.InRequest();
+		else  if ( ObjectList::IsView(verb) )  // View
+		{
+			// Create default page and add view to this request.
+			MvRequest pageRequest = ObjectList::CreateDefaultRequest ( "PLOT_PAGE" );
+			pageRequest("VIEW") = contextReq.justOneRequest();
+			defaultSuperPage("PAGES") = pageRequest;
+		}
+
+		// If there is a data unit, we try to build a view according to this.
+		// Else a default superpage with nothing in it will be built.
+		else if ( ObjectList::IsDataUnit(verb) || ObjectList::IsVisDef(verb))
+		{
+			MvRequest pageRequest = ObjectList::CreateDefaultRequest ( "PLOT_PAGE" );
+
+			Cached viewName = GetView(context);
+			if ( (const char *)viewName ) 
+			{
+				MvRequest viewRequest = ObjectList::CreateDefaultRequest( viewName );
+
+				pageRequest("VIEW") = viewRequest;
+			}
+
+			defaultSuperPage("PAGES") = pageRequest;
+		}
+
+		superpage = new SuperPage ( defaultSuperPage );
+	}
+
+	ensure ( superpage != 0 );
+
+	// Put the new branch in the tree
+	Root::Instance().Insert ( superpage );
+
+	// Add the page Ids in the reply
+	// Create a Reply
+	MvRequest reply;
+	superpage->CreateReply ( reply );
+	context.AddToReply ( reply );
+
+	context.Advance();  // Skip request processed above
+
+	// Deal with further requests
+	superpage->DropSimulate(context);
+
+	return superpage;
+}
diff --git a/src/uPlot/PlotPageBuilder.h b/src/uPlot/PlotPageBuilder.h
new file mode 100644
index 0000000..7d547c2
--- /dev/null
+++ b/src/uPlot/PlotPageBuilder.h
@@ -0,0 +1,63 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PlotPageBuilder
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the PlotPageBuilder class, an concrete class for
+//  building the PlotMod page hierarchy from a "SUPERPAGE" request
+//
+// .DESCRIPTION:
+//  This class is based on the "Builder" pattern (see
+//  "Design Patterns" book, page 97).
+//
+//
+// .DESCENDENT:
+//
+// .RELATED:
+//  Presentable, PlotPage, Page, DataObject 
+//
+// .ASCENDENT:
+// PlotModBuilder
+//
+#ifndef PlotPageBuilder_H
+#define PlotPageBuilder_H
+
+#include "PlotModBuilder.h"
+
+class PlotPageBuilder: public PlotModBuilder {
+
+public:
+
+	// Constructors
+	PlotPageBuilder(Cached name): PlotModBuilder(name) {}
+
+	//  Destructor
+        ~PlotPageBuilder() {}
+
+	// Methods
+	static PlotPageBuilder& Instance();
+
+	// Overriden from PlotModBuilder class
+	//  Builds the superpage and its children
+	//  Return a pointer to the node which has been created
+	virtual Presentable* Execute (PmContext& );
+
+private:
+
+	// No copy allowed
+	PlotPageBuilder(const PlotPageBuilder&);
+	PlotPageBuilder& operator=(const PlotPageBuilder&);
+};
+#endif
diff --git a/src/uPlot/PmContext.cc b/src/uPlot/PmContext.cc
new file mode 100644
index 0000000..14e7d49
--- /dev/null
+++ b/src/uPlot/PmContext.cc
@@ -0,0 +1,105 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PmContext.h"
+
+#include <MvProtocol.h>
+#include "ObjectList.h"
+#include "PlotModAction.h"
+#include "Root.h"
+
+// Contructors
+PmContext::PmContext ( MvProtocol& proto , const MvRequest& inRequest ):
+                     inRequest_ ( inRequest ),
+                     proto_ ( proto )
+{
+// Empty
+}
+
+// Destructor
+PmContext::~PmContext()
+{
+   proto_.sendReply(outRequest_);
+}
+
+// Methods
+ostream& 
+PmContext::Progress()
+{
+   return cout;
+}
+
+ostream& 
+PmContext::Error()
+{
+   return cout;
+}
+
+void
+PmContext::RewindToAfterDrop ()
+{
+   inRequest_.rewind();
+   if ( strcmp(inRequest_.getVerb(),"DROP") == 0 )
+      inRequest_.advance();
+}
+
+void
+PmContext::AddToReply (const MvRequest& reply)
+{
+   outRequest_ += reply;
+}
+
+#if 0
+void 
+PmContext::SetCurrentPresentable ( Presentable* p )
+{
+   presentable_ = p;
+}
+
+Presentable* 
+PmContext::GetCurrentPresentable ( )
+{
+   return presentable_;
+}
+#endif
+
+const MvRequest&
+PmContext::InRequest()
+{
+   return inRequest_;
+}
+
+void
+PmContext::Execute ()
+{
+   // The translator will attempt to add a "_VIEW" to first
+   // request, no matter what the firt request is.
+   FirstDataView(inRequest_("_VIEW"));
+
+   DropX((double)inRequest_("DROP_X"));
+   DropY((double)inRequest_("DROP_Y"));
+
+   //PlotMod::Instance().watchStart("PmContext");
+   while ( inRequest_ )
+   {
+      // Enquire the Action name
+      // There is an action type associated to each
+      // incoming request, as defined by the PlotModTable
+      const char* actionName = ObjectList::Find ("request",inRequest_.getVerb() , "action");
+      PlotModAction& action = PlotModAction::Find ( actionName );
+
+      // Each action advances the request
+      action.Execute ( *this );
+   }
+
+   // Process pending actions
+   Root::Instance().DrawTask();
+   //PlotMod::Instance().watchLaptime("PmContext");
+   //PlotMod::Instance().watchStop();
+}
diff --git a/src/uPlot/PmContext.h b/src/uPlot/PmContext.h
new file mode 100644
index 0000000..241934b
--- /dev/null
+++ b/src/uPlot/PmContext.h
@@ -0,0 +1,147 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  PmContext
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a context for the execution of actions in PlotMod.
+//  The context is the object which is used to control the
+//  processing of a request in PlotMod.
+//
+//  A context is created based on an MvProtocol and an input MvRequest.
+//  For each new action which processes part of the input request,
+//  the context is updated (by advancing to the next request).
+//
+//  PmContext is a "reference counted" class, to increase efficiency
+//  and avoid unecessary copying. As such, it is derived from "Counted" (q.v.) 
+//
+// .CLIENTS:
+//  PlotModApp, PlotModAction, PlotModView, PlotModTask
+//
+//
+// .RESPONSABILITIES:
+//  1. Call the necessary actions for processing a request
+//  2. Keep track of which requests have been processed
+//  3. Advance to the next input request after the current
+//     request has been processed
+//  4. Provide indication of progress and errors
+//
+// .COLLABORATORS:
+//  PlotModAction
+//
+//
+// .BASE CLASS:
+//  Counted
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef PmContext_H
+#define PmContext_H
+
+#include "MvRequest.h"
+#include "Counted.h"
+
+class MvProtocol;
+
+class PmContext : public Counted {
+
+public:
+
+     // Contructors
+     // Builds a context from a protocol and an input request
+     PmContext ( MvProtocol& proto, const MvRequest& inRequest );
+
+     //  Methods
+     // Indicate progress
+     ostream& Progress();
+
+     // Indicate error
+     ostream& Error ();
+
+     // Add this request to the reply request
+     void AddToReply(const MvRequest&);
+
+     // Set the presentable
+     //void SetCurrentPresentable ( Presentable* );
+
+     // Find out the current presentable
+     //Presentable* GetCurrentPresentable ( );
+
+     // Execute the request
+     void Execute ();
+
+     // Advance to the next request
+     void Advance () { inRequest_.advance(); }
+
+     // Advance to the next verb request
+     void AdvanceTo ( string& v) { inRequest_.advanceTo(v); }
+
+     // Advance to the next verb request
+     void AdvanceAfter ( string& v) { inRequest_.advanceAfter(v); }
+
+     // Advance to the end of all requests
+     void AdvanceToEnd () { inRequest_.advanceToEnd(); }
+
+     // Rewind and advance to the next request after DROP request
+     void RewindToAfterDrop ();
+
+     // Return the input request
+     const MvRequest&  InRequest();
+
+     // Return the verb of the first data unit found in input request.
+     Cached FirstDataView() { return firstDataView_; }
+     void FirstDataView(Cached xx ) { firstDataView_ = xx; }
+
+     // Give the clients the option of updating the inRequest, either to massage
+     // it to add fields for helping macro generation, or for removing requests
+     // that has been processed.
+     void Update(const MvRequest &changedReq) { inRequest_ = changedReq; }
+
+     // Quick way to 'fast-forward' the in request to the current request
+     void SetFirstInRequestToCurrent() {inRequest_.setFirstToCurrent();};
+
+     void DropX(double x) { dropX_ = x; }
+     double DropX() { return dropX_; } 
+
+     void DropY(double y) { dropY_ = y; }
+     double DropY() { return dropY_; } 
+
+protected:
+
+     // Destructor
+     virtual ~PmContext();
+
+private:
+
+     // No copy allowed
+     PmContext(const PmContext&);
+     PmContext& operator=(const PmContext&){return *this;}
+
+     MvRequest    inRequest_;
+     MvRequest    outRequest_;
+
+     MvProtocol&  proto_;
+
+     //Presentable* presentable_;
+
+     Cached firstDataView_;
+
+     double dropX_,dropY_;
+};
+
+#endif
diff --git a/src/uPlot/PmGeneralProjection.cc b/src/uPlot/PmGeneralProjection.cc
new file mode 100644
index 0000000..acd9777
--- /dev/null
+++ b/src/uPlot/PmGeneralProjection.cc
@@ -0,0 +1,781 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PmGeneralProjection.h"
+
+//=================================================================
+//
+//  class PmGeneralProjection
+//  ( a wrapper around Polar, Mercator and Cylindrical projections)
+PmGeneralProjection :: PmGeneralProjection ( const MvRequest& reqst ):
+	PmProjection ( reqst ),
+	GPhemis    ( NORTH ),
+	GPlat0     ( 0.    ),
+	GPlon0     ( 0.    ),
+	GPstlat1   ( 0.    ),
+	GPstlat2   ( 0.    )
+{
+	// Empty
+}
+
+bool
+PmGeneralProjection::CheckGeodeticCoordinates (Location& area)
+{
+    area = geodCoord_;
+    return true;
+}
+
+// =============================================================
+// class PmMercatorProjectionFactory - builds PmMercator projections
+class PmMercatorProjectionFactory : public PmProjectionFactory 
+{
+	virtual PmProjection* Build( const MvRequest& reqst ) 
+		{ return new PmMercator( reqst ); }
+
+public:
+	PmMercatorProjectionFactory() : PmProjectionFactory("MERCATOR") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmMercatorProjectionFactory mercatorProjectionFactoryInstance;
+
+// ====================================================================
+//
+//  PmMercator projection
+PmMercator::PmMercator ( const MvRequest& viewRequest ):
+	PmGeneralProjection ( viewRequest )	//PmGeneralProjection ( "MERCATOR" )
+{
+	// Initialize vertical longitude
+	GPlon0 = viewRequest ( "MAP_VERTICAL_LONGITUDE" ); 
+//	GPlon0 *= DEG_TO_RAD;
+
+	// Initialize standard parallel ( the other values are the default ones)
+	GPstlat1 = (( geodCoord_.Top() + geodCoord_.Bottom() ) / 2. ) * DEG_TO_RAD;
+
+	// Calculate the projection coordinates
+	this->CalculateProjectionCoord();
+}
+
+// 		GEODETIC TO MERCATOR COORDINATES
+Point
+PmMercator :: LL2PC (Point& ptll)
+{
+	double	equad,			//Squared eccentricity
+		aux1,			// Ancillary variables
+		aux2,aux3,aux4,aux5,aux6,ptllx,ptlly;
+
+	ptllx = ptll.X();		
+	ptlly = ptll.Y();		
+
+	equad = 2.*Pflt;		
+	equad -= Pflt*Pflt;		
+	double	a1,a2,a3;		
+
+	a1 = tan(ptlly/(double)2);	
+	a2 = 1.+a1;			
+	a3 = 1.-a1;			
+	aux1 = a2/a3;			
+
+	a1 = equad*equad/4.;		
+	a1 += equad;			
+	a2 = equad*equad*equad/8.;	
+	a3 = sin(ptlly);		
+	aux2 = (a1+a2)*a3;		
+
+	a1 = equad*equad/12.;		
+	a2 = equad*equad*equad/16.;	
+	a3 = sin((double)3*ptlly);	
+	aux3 = (a1+a2)*a3;		
+
+	a1 = equad*equad*equad/80.;	
+	a2 = sin((double)5*ptlly);	
+	aux4 = a1*a2;			
+	aux5 = cos(GPstlat1);
+
+	a1 = sin(GPstlat1);		
+	a1 *= a1;			
+	a1 *= equad;			
+	a2 = sqrt((double)1-a1);	
+	aux6 = 1./a2;			
+
+	ptllx = Prd*(ptllx - GPlon0)*aux5*aux6;
+	if (aux1 <= 0.0) ptlly = BIGFLOAT;
+	else             ptlly = Prd*(log(aux1) - aux2 + aux3 - aux4)*aux5*aux6;
+
+	return(Point(ptllx,ptlly));
+}
+
+//		MERCATOR TO GEODETIC COORDINATES
+Point
+PmMercator :: PC2LL (Point& ptpc)
+{
+	double	equad,			//Squared eccentricity 
+	        pi,			// PII value
+		t,			// Ancillary variables
+		xx,aux1,aux2,aux3,aux4,aux5,ptpcx,ptpcy;
+
+	ptpcx = ptpc.X();		
+	ptpcy = ptpc.Y();		
+
+	equad = 2.*Pflt;		
+	equad -= Pflt*Pflt;		
+	pi = 4.*atan((double)1);
+	double	a1,a2;		
+	aux1 = cos(GPstlat1);
+
+	a1 = sin(GPstlat1);		
+	a1 *= a1;			
+	a1 *= equad;			
+	a2 = sqrt((double)1-a1);	
+	aux2 = 1./a2;			
+	ptpcx = ptpcx/(aux1*aux2);
+	ptpcy = ptpcy/(aux1*aux2);
+	t = exp(-ptpcy/Prd);
+	xx = pi/2. - 2.*atan(t);
+
+	a1 = equad/2.;			
+	a1 += 5.*equad*equad/24.;	
+	a1 += equad*equad*equad/12.;	
+	a2 = sin((double)4*atan(t));	
+	aux3 = a1*a2;			
+
+	a1 = 7.*equad*equad/48.;	
+	a1 += 29.*equad*equad*equad/240.;	
+	a2 = sin((double)8*atan(t));	
+	aux4 = -a1*a2;			
+
+	a1 = 7.*equad*equad*equad/120.;	
+	a2 = sin((double)12*atan(t));	
+	aux5 = a1*a2;			
+
+	ptpcy = xx + aux3 + aux4 + aux5;
+	ptpcx = ptpcx/Prd + GPlon0;
+
+	return(Point(ptpcx,ptpcy));
+}
+
+double
+PmMercator::CheckOriginLongitude ()
+{
+	double x0 = GPlon0 - 180.;
+	if ( ( geodCoord_.Left() < x0 ) || ( geodCoord_.Right() > x0 + 360. ) )
+		GPlon0 = geodCoord_.Left() +
+			 ( ( geodCoord_.Right() - geodCoord_.Left() ) / 2. );
+
+	return GPlon0;
+}
+
+bool
+PmMercator::CheckGeodeticCoordinates (Location& area)
+{
+	bool flag = true;
+
+	// check if individual values are within the range
+	double x1 = ( geodCoord_.Left()   < -360. ) ? -360 : geodCoord_.Left();
+	double x2 = ( geodCoord_.Right()  >  360. ) ?  360 : geodCoord_.Right();
+	double y2 = ( geodCoord_.Top()    >   89. ) ?   89 : geodCoord_.Top();
+	double y1 = ( geodCoord_.Bottom() <  -89. ) ?  -89 : geodCoord_.Bottom();
+
+	// check if difference between long values are within the range
+	if ( (x2 - x1) > 360 )
+	{
+		x1 = -180.;
+		x2 = +180.;
+	}
+
+	// check if direction is ok (S -> N, W -> E)
+	if ( x2 <  x1 ) x2 += 360.;
+	if ( y2 <= y1 )
+	{
+		y1 = -90.;
+		y2 = +90.;
+	}
+
+	// special cases
+	if ( x2 == x1 )
+	{
+		if ( x2 == 0. )         x2 =  360.;
+		else if ( x1 == 180.  ) x1 = -180.;
+		else if ( x2 == -180. ) x2 =  180.;
+	} 
+
+	// check if some values have been changed
+	if ( ( geodCoord_.Left()   != x1 ) ||
+	     ( geodCoord_.Right()  != x2 ) ||
+	     ( geodCoord_.Bottom() != y1 ) ||
+	     ( geodCoord_.Top()    != y2 )   )
+	{
+		flag = false;
+		geodCoord_ = Location ( y2, x1, y1, x2 );
+	}
+
+	area = geodCoord_;
+
+	return flag;
+}
+
+// =============================================================
+// class PmCylindProjectionFactory - builds PmCylindrical projections
+class PmCylindProjectionFactory : public PmProjectionFactory 
+{
+	virtual PmProjection* Build( const MvRequest& reqst ) 
+		{ return new PmCylindEquid ( reqst ); }
+
+public:
+	PmCylindProjectionFactory() : PmProjectionFactory("CYLINDRICAL") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmCylindProjectionFactory cylindProjectionFactoryInstance;
+
+
+//==============================================================
+// CYLINDRICAL Projection
+//
+PmCylindEquid::PmCylindEquid ( const MvRequest& viewRequest ):
+	PmGeneralProjection ( viewRequest )
+{
+	GPlon0 = viewRequest ( "MAP_VERTICAL_LONGITUDE" ); 
+//	GPlon0 *= DEG_TO_RAD;
+
+	// Calculate the projection coordinates
+	this->CalculateProjectionCoord();
+}
+
+//	GEODETIC TO EQUIDISTANT CYLINDRICAL COORDINATES
+Point
+PmCylindEquid :: LL2PC (Point& ptll)
+{
+	double ptllx = (double)ptll.X();
+	double ptlly = (double)ptll.Y();
+
+	ptllx = Prd*(ptllx - GPlon0)*cos(GPstlat1);
+	ptlly = Prd*ptlly;
+
+	return(Point(ptllx,ptlly));
+}
+
+//	EQUIDISTANT CYLINDRICAL TO GEODETIC COORDINATES
+Point
+PmCylindEquid :: PC2LL (Point& ptpc)
+{
+	double ptpcx = (double)ptpc.X();
+	double ptpcy = (double)ptpc.Y();
+
+	ptpcy = ptpcy/Prd;
+	ptpcx = GPlon0 + ptpcx/(Prd*cos(GPstlat1));
+
+	return (Point(ptpcx,ptpcy));
+}
+ 
+double
+PmCylindEquid::CheckOriginLongitude ()
+{
+	double x0 = GPlon0 - 180.;
+	if ( ( geodCoord_.Left() < x0 ) || ( geodCoord_.Right() > x0 + 360. ) )
+		GPlon0 = geodCoord_.Left() +
+			 ( ( geodCoord_.Right() - geodCoord_.Left() ) / 2. );
+
+	return GPlon0;
+}
+
+bool
+PmCylindEquid::CheckGeodeticCoordinates (Location& area)
+{
+	bool flag = true;
+
+	// check if individual values are within the range
+	double x1 = ( geodCoord_.Left()   < -360. ) ? -360 : geodCoord_.Left();
+	double x2 = ( geodCoord_.Right()  >  360. ) ?  360 : geodCoord_.Right();
+	double y2 = ( geodCoord_.Top()    >   90. ) ?   90 : geodCoord_.Top();
+	double y1 = ( geodCoord_.Bottom() <  -90. ) ?  -90 : geodCoord_.Bottom();
+
+	// check if difference between long values are within the range
+	if ( (x2 - x1) > 360 )
+	{
+		x1 = -180.;
+		x2 = +180.;
+	}
+
+	// check if direction is ok (S -> N, W -> E)
+	if ( x2 <  x1 ) x2 += 360.;
+	if ( y2 <= y1 )
+	{
+		y1 = -90.;
+		y2 = +90.;
+	}
+
+	// special cases
+	if ( x2 == x1 )
+	{
+		if ( x2 == 0. )         x2 =  360.;
+		else if ( x1 == 180.  ) x1 = -180.;
+		else if ( x2 == -180. ) x2 =  180.;
+	} 
+
+	// check if some values have been changed
+	if ( ( geodCoord_.Left()   != x1 ) ||
+	     ( geodCoord_.Right()  != x2 ) ||
+	     ( geodCoord_.Bottom() != y1 ) ||
+	     ( geodCoord_.Top()    != y2 )   )
+	{
+		flag = false;
+		geodCoord_ = Location ( y2, x1, y1, x2 );
+	}
+
+	area = geodCoord_;
+
+	return flag;
+}
+
+// =============================================================
+// class PmPolarProjectionFactory - builds Polar projections
+//
+class PmPolarProjectionFactory : public PmProjectionFactory 
+{
+	virtual PmProjection* Build( const MvRequest& reqst  ) 
+		{ return new PmPolarStereo ( reqst ); }
+
+public:
+	PmPolarProjectionFactory() : PmProjectionFactory("POLAR_STEREOGRAPHIC") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmPolarProjectionFactory polarProjectionFactoryInstance;
+
+//===============================================================
+//  PmPolar Stereo projection
+//
+PmPolarStereo::PmPolarStereo ( const MvRequest& viewRequest ):
+	PmGeneralProjection ( viewRequest )
+{
+	if ( viewRequest ( "MAP_HEMISPHERE" ) == Cached ( "SOUTH" ) )
+		 GPhemis = SOUTH;
+	else
+	         GPhemis = NORTH;
+
+	if ( GPhemis == NORTH )
+		GPlat0 =  90. * DEG_TO_RAD;
+	else
+		GPlat0 = -90. * DEG_TO_RAD;
+
+	GPlon0 = viewRequest ( "MAP_VERTICAL_LONGITUDE" ); 
+//	GPlon0 *= DEG_TO_RAD;
+
+	// Calculate the projection coordinates
+	this->CalculateProjectionCoord();
+}
+
+//	GEODETIC TO POLAR STEREOGRAPHIC COORDINATES
+//
+Point
+PmPolarStereo :: LL2PC (Point& ptll)
+{
+	double	k0,			// Scale factor
+		e,			// Eccentricity
+		pi,			// Ancillary variables
+		lon0,			// auxilliary origin longitude
+		t,ro,aux1,aux2,aux3,ptllx,ptlly;
+	
+	ptllx = (double)ptll.X();
+	ptlly = (double)ptll.Y();
+
+//	k0 = 0.994;	// Standard parallel 80.1 degrees 
+	k0 = 0.933;	// Standard parallel 60 degrees 
+	e = sqrt((double)2*Pflt - pow(Pflt,(double)2));
+	pi = 4.*atan((double)1);
+
+	ptlly *= GPhemis;
+	ptllx *= GPhemis;
+	lon0 = (GPhemis == 1) ? GPlon0 : -GPlon0;
+	lon0 *= DEG_TO_RAD;
+
+	aux1 = (1. - e*sin(ptlly))/(1. + e*sin(ptlly));
+	t = tan((pi/4.) - (ptlly/2.))/pow(aux1,(e/(double)2));
+	aux2 = pow(((double)1 + e),((double)1 + e));
+	aux3 = pow(((double)1 - e),((double)1 - e));
+	ro = 2.*Prd*k0*t/sqrt(aux2*aux3);
+
+	aux1   = ro*sin(ptllx - lon0);
+	ptlly = -ro*cos(ptllx - lon0);
+	aux1 *= GPhemis;
+	ptlly *= GPhemis;
+	
+	if (GPhemis == -1)
+	{
+		aux1 *= GPhemis;
+		ptlly *= GPhemis;
+	}
+
+	return(Point(aux1,ptlly));
+}
+
+//	POLAR STEREOGRAPHIC TO GEODETIC COORDINATES
+//
+Point
+PmPolarStereo :: PC2LL (Point& ptpc)
+{
+	double	k0,			// Scale factor
+
+		equad,			// Squared eccentricity
+		e,		        // Eccentricity
+		pi,			// Ancillary variables
+		lon0,			// auxilliary origin longitude
+		ro,t,xx,aux1,aux2,aux3,aux4,aux5,ptpcx,ptpcy,px,py;
+
+	px = (double)ptpc.X();
+	py = (double)ptpc.Y();
+
+//	k0 = 0.994;	// Standard parallel 80.1 degrees 
+	k0 = 0.933;	// Standard parallel 60 degrees
+	pi = 4.*atan((double)1);
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	e = sqrt(equad);
+
+	if (GPhemis == -1)
+	{
+		px *= GPhemis;
+		py *= GPhemis;
+	}
+
+	lon0 = (GPhemis == 1) ? GPlon0 : -GPlon0;
+	lon0 *= DEG_TO_RAD;
+
+	ro = sqrt(px*px + py*py);
+	aux1 = pow(((double)1 + e),((double)1 + e));
+	aux2 = pow(((double)1 - e),((double)1 - e));
+	t = (ro*sqrt(aux1*aux2))/(2.*Prd*k0);
+	xx = pi/2. - 2.*atan(t);
+	aux3 = equad/2. + 5.*equad*equad/24. + equad*equad*equad/12.;
+	aux4 = 7.*equad*equad/48. + 29.*equad*equad*equad/240.;
+	aux5 = 7.*equad*equad*equad/120.;
+
+	ptpcy = xx + aux3*sin((double)2*xx) + aux4*sin((double)4*xx) + aux5*sin((double)6*xx);
+
+	if (py != 0.)
+		ptpcx = lon0 + atan(px/(-py));
+
+	if (GPhemis == 1)
+	{
+		if (px > 0. && py > 0.)
+			ptpcx = ptpcx + pi;
+		else if (px < 0. && py > 0.)
+			ptpcx = ptpcx - pi;
+		else if (px > 0. && py == 0.)
+			ptpcx = lon0 + pi / 2.;
+		else if (px < 0. && py == 0.)
+			ptpcx = lon0 - pi / 2.;
+		else if (px == 0. && py == 0.)
+			ptpcx = lon0;
+	}
+	else
+	{
+		ptpcy *= GPhemis;
+		ptpcx *= GPhemis;
+
+		if (px > 0. && py < 0.)
+			ptpcx = ptpcx + pi;
+		else if (px < 0. && py < 0.)
+			ptpcx = ptpcx - pi;
+		else if (px > 0. && py == 0.)
+			ptpcx = lon0 + pi / 2.;
+		else if (px < 0. && py == 0.)
+			ptpcx = lon0 - pi / 2.;
+		else if (px == 0. && py == 0.)
+			ptpcx = lon0;
+	}
+
+	if (ptpcx < (-pi)) ptpcx += 2.*pi;
+	else if (ptpcx > pi)    ptpcx -= 2.*pi;
+
+	return (Point(ptpcx,ptpcy));
+}
+
+bool
+PmPolarStereo::CheckGeodeticCoordinates (Location& area)
+{
+	bool flag = true;
+
+//	Remember: if GPhemis == NORTH, GPhemis =  1
+//	          if GPhemis == SOUTH, GPhemis = -1
+	if ( geodCoord_.Top()*GPhemis < -20. )
+	{
+		geodCoord_ = Location ( -20.*GPhemis, geodCoord_.Left(),
+					geodCoord_.Bottom(), geodCoord_.Right() );
+		flag = false;
+	}
+
+	if ( geodCoord_.Bottom()*GPhemis < -20. )
+	{
+		geodCoord_ = Location ( geodCoord_.Top(), geodCoord_.Left(),
+					-20.*GPhemis, geodCoord_.Right() );
+		flag = false;
+	}
+
+	Point llPointLL ( geodCoord_.Left() * DEG_TO_RAD, geodCoord_.Bottom() * DEG_TO_RAD );
+	Point llPointPC = this->LL2PC ( llPointLL );
+
+	Point urPointLL ( geodCoord_.Right() * DEG_TO_RAD, geodCoord_.Top() * DEG_TO_RAD );
+	Point urPointPC = this->LL2PC ( urPointLL );
+
+ 	Point bmPointLL ( GPlon0 * DEG_TO_RAD, -1.*GPhemis * DEG_TO_RAD );
+	Point bmPointPC = this->LL2PC ( bmPointLL );
+
+	Point lmPointLL ( ( GPlon0 - 90.*GPhemis ) * DEG_TO_RAD, -1.*GPhemis * DEG_TO_RAD );
+	Point lmPointPC = this->LL2PC ( lmPointLL );
+
+	Point tmPointLL ( ( GPlon0 + 180. ) * DEG_TO_RAD, -1.*GPhemis * DEG_TO_RAD );
+	Point tmPointPC = this->LL2PC ( tmPointLL );
+
+	Point rmPointLL ( ( GPlon0 + 90.*GPhemis ) * DEG_TO_RAD, -1.*GPhemis * DEG_TO_RAD );
+	Point rmPointPC = this->LL2PC ( rmPointLL );
+
+	if ( ( urPointPC.Y() <= llPointPC.Y() ) ||
+	     ( urPointPC.X() <= llPointPC.X() ) ||
+	     ( llPointPC.Y()  < bmPointPC.Y() ) ||
+	     ( llPointPC.X()  < lmPointPC.X() ) ||
+	     ( urPointPC.Y()  > tmPointPC.Y() ) ||
+	     ( urPointPC.X()  > rmPointPC.X() ) )
+     	{
+		geodCoord_ = Location ( -20. * GPhemis, -45. * GPhemis,
+					-20. * GPhemis, 135. * GPhemis );
+		GPlon0 = 0;
+		flag   = false;
+	}
+
+	area = geodCoord_;
+	return flag;
+}
+
+// =============================================================
+// class PmLambertProjectionFactory - builds PmLambert projections
+class PmLambertProjectionFactory : public PmProjectionFactory 
+{
+	virtual PmProjection* Build( const MvRequest& reqst ) 
+		{ return new PmLambert( reqst ); }
+
+public:
+	PmLambertProjectionFactory() : PmProjectionFactory("LAMBERT") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmLambertProjectionFactory lambertProjectionFactoryInstance;
+
+// ====================================================================
+//
+//  PmLambert projection
+PmLambert::PmLambert ( const MvRequest& viewRequest ):
+	PmGeneralProjection ( viewRequest )	//PmGeneralProjection ( "LAMBERT" )
+{
+	// Initialize some parameters
+	GPlon0   = viewRequest("SUBPAGE_MAP_CENTRE_LONGITUDE");
+	GPlat0   = (double)viewRequest("SUBPAGE_MAP_CENTRE_LATITUDE") * DEG_TO_RAD;
+	GPstlat1 = (double)viewRequest("SUBPAGE_MAP_STANDARD_LATITUDE_1") * DEG_TO_RAD;
+	GPstlat2 = (double)viewRequest("SUBPAGE_MAP_STANDARD_LATITUDE_2") * DEG_TO_RAD;
+	LScale   = (double)viewRequest("SUBPAGE_MAP_SCALE");
+
+	// Calculate the projection coordinates
+	this->CalculateProjectionCoord();
+}
+
+// 		GEODETIC TO LAMBERT COORDINATES
+Point
+PmLambert :: LL2PC (Point& ) //ptll
+{
+#if 0
+	double	equad,			// Squared eccentricity
+		e,			// Ancillary variables
+		m1,m2,aux1,aux2,aux0,t1,t2,t0,n,efe,ro0,aux,
+		t,ro,teta,ptllx,ptlly;
+
+	ptllx = (double)ptll.X();
+	ptlly = (double)ptll.Y();
+
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	e = sqrt(equad);
+
+	m1 = cos(GPstlat1)/sqrt((double)1-equad*pow(sin(GPstlat1),(double)2));
+	m2 = cos(GPstlat2)/sqrt((double)1-equad*pow(sin(GPstlat2),(double)2));
+	aux1 = sqrt(((double)1-e*sin(GPstlat1))/((double)1+e*sin(GPstlat1)));
+	aux2 = sqrt(((double)1-e*sin(GPstlat2))/((double)1+e*sin(GPstlat2)));
+	aux0 = sqrt(((double)1-e*sin(GPlat0))/((double)1+e*sin(GPlat0)));
+	t1 = ((1.-tan(GPstlat1/(double)2))/(1.+tan(GPstlat1/(double)2)))/pow(aux1,e);
+	t2 = ((1.-tan(GPstlat2/(double)2))/(1.+tan(GPstlat2/(double)2)))/pow(aux2,e);
+	t0 = ((1.-tan(GPlat0/(double)2))/(1.+tan(GPlat0/(double)2)))/pow(aux0,e);
+
+	if (GPstlat1 == GPstlat2)
+		n = sin(GPstlat1);
+	else
+		n = (log(m1)-log(m2))/(log(t1)-log(t2));
+
+	efe = m1/(n*pow(t1,n));
+	ro0 = Prd*efe*pow(t0,n);
+
+	aux = sqrt(((double)1-e*sin(ptlly))/((double)1+e*sin(ptlly)));
+	t = ((1.-tan(ptlly/(double)2))/(1.+tan(ptlly/(double)2)))/pow(aux,e);
+	ro = Prd*efe*pow(t,n);
+	teta = n*(ptllx - GPlon0);
+	ptllx = ro*sin(teta);
+	ptlly = ro0 - ro*cos(teta);
+
+	return(Point(ptllx,ptlly));
+#endif
+	return(Point(0.,0.));
+}
+
+//		LAMBERT TO GEODETIC COORDINATES
+Point
+PmLambert :: PC2LL (Point& ) //ptpc
+{
+#if 0
+	double	equad,			// Squared eccentricity 
+		pi,			// PI value
+		e,m1,m2,aux1,aux2,aux0,t1,t2,t0,n,efe,ro0,ro,teta,
+		t,xx,aux3,aux4,aux5,ptpcx,ptpcy;
+
+	int	sinal;
+
+	ptpcx = (double)ptpc.X();
+	ptpcy = (double)ptpc.Y();
+
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	e = sqrt(equad);
+	pi = 4.*atan((double)1);
+
+	m1 = cos(GPstlat1)/sqrt((double)1-equad*pow(sin(GPstlat1),(double)2));
+	m2 = cos(GPstlat2)/sqrt((double)1-equad*pow(sin(GPstlat2),(double)2));
+	aux1 = sqrt(((double)1-e*sin(GPstlat1))/((double)1+e*sin(GPstlat1)));
+	aux2 = sqrt(((double)1-e*sin(GPstlat2))/((double)1+e*sin(GPstlat2)));
+	aux0 = sqrt(((double)1-e*sin(GPlat0))/((double)1+e*sin(GPlat0)));
+	t1 = ((1.-tan(GPstlat1/(double)2))/(1.+tan(GPstlat1/(double)2)))/pow(aux1,e);
+	t2 = ((1.-tan(GPstlat2/(double)2))/(1.+tan(GPstlat2/(double)2)))/pow(aux2,e);
+	t0 = ((1.-tan(GPlat0/(double)2))/(1.+tan(GPlat0/(double)2)))/pow(aux0,e);
+
+	if (GPstlat1 == GPstlat2)
+		n = sin(GPstlat1);
+	else
+		n = (log(m1)-log(m2))/(log(t1)-log(t2));
+
+	efe = m1/(n*pow(t1,n));
+	ro0 = Prd*efe*pow(t0,n);
+
+	sinal = (int)(n/fabs(n));
+	ro = sqrt(ptpcx*ptpcx + (ro0-ptpcy)*(ro0-ptpcy));
+	ro *= sinal;
+	teta = atan(ptpcx/(ro0-ptpcy));
+	t = pow((ro/(Prd*efe)),(double)1/n);
+	xx = pi/2. - 2.*atan(t);
+	aux3 = equad/2. + 5.*equad*equad/24. + equad*equad*equad/12.;
+	aux4 = 7.*equad*equad/48. + 29.*equad*equad*equad/240.;
+	aux5 = (7.*equad*equad*equad/120.)*sin(12.*atan(t));
+
+	ptpcy = xx + aux3*sin(4.*atan(t)) - aux4*sin(8.*atan(t)) + aux5;
+	ptpcx = teta/n + GPlon0;
+
+	return (Point(ptpcx,ptpcy));
+#endif
+	return(Point(0.,0.));
+}
+
+double
+PmLambert::CheckOriginLongitude ()
+{
+	//Add code later
+	return 0.;
+}
+
+// =============================================================
+// class PmOceanSectionProjectionFactory - builds PmOceanSection projections
+class PmOceanSectionProjectionFactory : public PmProjectionFactory 
+{
+	virtual PmProjection* Build( const MvRequest& reqst ) 
+		{ return new PmOceanSection( reqst ); }
+
+public:
+	PmOceanSectionProjectionFactory() : PmProjectionFactory("OCEAN_SECTION") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmOceanSectionProjectionFactory oceansectionProjectionFactoryInstance;
+
+// ====================================================================
+//
+//  PmOceanSection projection
+PmOceanSection::PmOceanSection ( const MvRequest& viewRequest ):
+	PmGeneralProjection ( viewRequest )	//PmGeneralProjection ( "OCEAN_SECTION" )
+{
+	this->CalculateProjectionCoord();
+}
+
+// 		GEODETIC TO OCEAN_SECTION COORDINATES
+Point
+PmOceanSection :: LL2PC (Point& )
+{
+	//Add code later
+	return(Point(0.,0.));
+}
+
+//		OCEAN_SECTION TO GEODETIC COORDINATES
+Point
+PmOceanSection :: PC2LL (Point& )
+{
+	//Add code later
+	return(Point(0.,0.));
+}
+
+double
+PmOceanSection::CheckOriginLongitude ()
+{
+	//Add code later
+	return 0.;
+}
+
+// =============================================================
+// class PmAitoffProjectionFactory - builds PmAitoff projections
+class PmAitoffProjectionFactory : public PmProjectionFactory 
+{
+	virtual PmProjection* Build( const MvRequest& reqst ) 
+		{ return new PmAitoff( reqst ); }
+
+public:
+	PmAitoffProjectionFactory() : PmProjectionFactory("AITOFF") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmAitoffProjectionFactory aitoffProjectionFactoryInstance;
+
+// ====================================================================
+//
+//  PmAitoff projection
+PmAitoff::PmAitoff ( const MvRequest& viewRequest ):
+	PmGeneralProjection ( viewRequest )	//PmGeneralProjection ( "AITOFF" )
+{
+	// Initialize vertical longitude
+	GPlon0 = viewRequest ( "MAP_VERTICAL_LONGITUDE" ); 
+
+	// Calculate the projection coordinates
+	this->CalculateProjectionCoord();
+}
+
+// 		GEODETIC TO AITOFF COORDINATES
+Point
+PmAitoff :: LL2PC (Point& )
+{
+	//Add code later
+	return(Point(0.,0.));
+}
+
+//		AITOFF TO GEODETIC COORDINATES
+Point
+PmAitoff :: PC2LL (Point& )
+{
+	//Add code later
+	return(Point(0.,0.));
+}
+
diff --git a/src/uPlot/PmGeneralProjection.h b/src/uPlot/PmGeneralProjection.h
new file mode 100644
index 0000000..09ae7e6
--- /dev/null
+++ b/src/uPlot/PmGeneralProjection.h
@@ -0,0 +1,737 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+// PmGeneralProjection
+//
+// .AUTHOR:
+// Ubirajara Freitas, Julio d'Alge.
+//
+// .SUMMARY:
+//  Provides methods that are required to handle all conventional map
+//  projections.
+//
+// .DESCRIPTION:
+//  Specifies earth and projection parameters that represent a common ground
+//  in terms of defining the following conventional map projections: utm,
+//  mercator, gauss-kruger, lambert conformal conic, polyconic, cylindrical
+//  equidistant, polar stereographic, bipolar conformal conic, albers equal
+//  area conic, and miller. Class PmGeneralProjection also encapsulates the
+//  following important information:
+//		Hemisphere;
+//		Latitude of origin;
+
+//		Longitude of origin;
+//		Latitudes of standard parallels
+//
+// .DESCENDENT:
+//  PmMercator, PmCylinEquid, PmPolarStereo
+//
+//
+// .RELATED:
+//  Point, GribData
+//
+// .ASCENDENT:
+//  PmProjection
+//// .COMMENTS:
+//  None
+
+#ifndef PM_GENERAL_PROJECTION_H
+#define PM_GENERAL_PROJECTION_H
+
+#include "PmProjection.h"
+
+class PmGeneralProjection : public PmProjection
+{
+protected:
+	int		GPhemis;	// Hemisphere: 1 (north) or -1 (south)
+	double		GPlat0;		// Latitude of origin (rad)  
+	double		GPlon0;		// Longitude of origin (rad)
+	double		GPstlat1;	// First standard parallel (rad)
+	double		GPstlat2;	// Second standard parallel (rad)
+
+public:
+	PmGeneralProjection( const MvRequest& reqst );
+//		Normal constructor.
+//		Description:
+//			Activates object of type PmGeneralProjection with the
+//			current projection.
+
+	~PmGeneralProjection() { }
+//		Empty destructor.
+
+	friend 	bool operator== (PmGeneralProjection& a, PmGeneralProjection& b);
+//		Equality operator. Objects a and b are considered equal if 
+//		their common projection parameters are the same.
+//		Input:
+//			a:	Object of type PmGeneralProjection;
+//			b:	Object of type PmGeneralProjection.
+//		Return:
+//			TRUE:	Objects are equal;
+//			FALSE:	Objects are different.
+
+	virtual int Hemisphere () {return GPhemis;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the hemisphere for the polar
+//		stereographic projection.
+//		Return:
+//			GPhemis:	Hemisphere: 1 (north) or -1 (south)
+
+	virtual	void Hemisphere (int h) {GPhemis = h;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the hemisphere for the polar
+//		stereographic projection.
+//		Input:
+//			h: 		Hemisphere: 1 (north) or -1 (south).
+//		Precondition:
+//			h must be either 1 (north) or -1 (south).
+
+	virtual double OriginLatitude () {return GPlat0;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the latitude of origin
+//		Return:
+//			GPlat0:		Latitude of origin (rad)
+
+	virtual	void OriginLatitude (double o)  {GPlat0 = o;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the latitude of origin
+//		Input:
+//			o: 		Latitude of origin (rad)
+//		Precondition:
+//			o must be a valid latitude ([0,pi/2] or [0,-pi/2])
+
+	virtual	double OriginLongitude () {return GPlon0;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the longitude of origin
+//		Return:
+//			GPlon0:		Longitude of origin (rad)
+
+	virtual void OriginLongitude (double o) {GPlon0 = o;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the longitude of origin.
+//		Input:
+//			o: 		Longitude of origin (rad)
+//		Precondition:
+//			o must be a valid longitude ([0,pi] or [0,-pi])
+
+	virtual double StandardLatitudeOne () {return GPstlat1;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the latitude of the first standard
+//		parallel.
+//		Return:
+//			GPslat1:	Latitude of the first standard
+//					parallel (rad).
+
+	virtual void StandardLatitudeOne (double s) {GPstlat1 = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the latitude of the first standard
+//		parallel.
+//		Input:
+//			s: 		Latitude of the first standard
+//					parallel (rad).
+//		Precondition:
+//			s must be a valid latitude ([0,pi/2] or [0,-pi/2]).
+
+	virtual double StandardLatitudeTwo () {return GPstlat2;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the latitude of the second standard
+//		parallel.
+//		Return:
+//			GPslat2:	Latitude of the second standard 
+//					parallel (rad)
+
+	virtual void StandardLatitudeTwo (double s) {GPstlat2 = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the latitude of the second standard
+//		parallel.
+//		Input:
+//			s: 		Latitude of the second standard 
+//					parallel (rad)
+//		Precondition:
+//			s must be a valid latitude ([0,pi/2] or [0,-pi/2])
+
+	virtual	Point LL2PC (Point& p) = 0;
+//		Pure virtual method that transforms geodetic into
+//		projection coordinates.
+//		Description:
+//			This method is implemented for each available
+//			projection class and represents the so-called
+//			direct formulas, which compute projection
+//			coordinates from geodetic coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad)
+//		Return: 
+//			p:	Projection coordinates (m)
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi])
+
+	virtual	Point PC2LL (Point& p) = 0;
+//		Pure virtual method that transforms projection into
+//		geodetic coordinates.
+//		Description:
+//			This method is implemented for each available
+//			projection class and represents the so-called
+//			inverse formulas, which compute geodetic
+//			coordinates from projection coordinates.
+//		Input: 
+//			p:	Projection coordinates (m)
+//		Return: 
+//			p:	Geodetic coordinates (rad)
+//		Preconditions:
+//			X and Y projection coordinates must be both valid,
+//			within the typical range of each projection class.
+
+	virtual	double SensorResolutionX () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sensor angular resolution along X direction.
+//			Not implemented yet.
+
+	virtual void SensorResolutionX (double ) { }
+//		No code.
+//		Description:
+//			Updates sensor angular resolution along X direction.
+//			Not implemented yet.
+
+	virtual double SensorResolutionY () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sensor angular resolution along Y direction.
+//			Not implemented yet.
+
+	virtual void SensorResolutionY (double ) { }
+//		No code.
+//		Description:
+//			Updates sensor angular resolution along Y direction.
+//			Not implemented yet.
+
+	virtual double SubSatelliteX () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sub-satellite X coordinate. Not implemented
+//			yet.
+
+	virtual void SubSatelliteX (double ) { }
+//		No code.
+//		Description:
+//			Updates sub-satellite X coordinate. Not implemented
+//			yet.
+
+	virtual double SubSatelliteY () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sub-satellite Y coordinate. Not implemented 
+//			yet.
+
+	virtual void SubSatelliteY (double ) { }
+//		No code.
+//		Description:
+//			Updates sub-satellite Y coordinate. Not implemented
+//			yet.
+
+	virtual double OriginX () {return 0.;}
+//		No code.
+//		Description:
+//			Returns image initial x coordinate. Not implemented
+//			yet.
+
+	virtual double OriginY () {return 0.;}
+//		No code.
+//		Description:
+//			Returns image initial y coordinate. Not implemented
+//			yet.
+
+	virtual double SubSatelliteLng () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sub-satellite longitude. Not implemented yet.
+
+	virtual	void SubSatelliteLng (double ) { }
+//		No code.
+//		Description:
+//			Updates sub-satellite longitude. Not implemented yet.
+
+	virtual double SubSatelliteLat () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sub-satellite latitude. Not implemented yet.
+
+	virtual	void SubSatelliteLat (double ) { }
+//		No code.
+//		Description:
+//			Updates sub-satellite latitude. Not implemented yet.
+
+	virtual double Radius () {return 0.;}
+//		No code.
+//		Description:
+//			Returns satellite orbit radius. Not implemented yet.
+
+	virtual void Radius (double ) { }
+//		No code.
+//		Description:
+//			Updates satellite orbit radius. Not implemented yet.
+
+	virtual double ScanMode () {return 0.;}
+//		No code.
+//		Description:
+//			Returns sensor scanning mode. Not implemented yet.
+
+	virtual	double Yaw () {return 0.;}
+//		No code.
+//		Description:
+//			Returns orientation or yaw angle. Not implemented
+//			yet.
+
+	virtual void Yaw (double ) { }
+//		No code.
+//		Description:
+//			Updates orientation or yaw angle. Not implemented
+//			yet.
+
+	void Print()
+//		Prints  projection parameters.
+//		Description:
+//			This method prints the projection parameters that
+//			are common to all descendent classes.
+		{ printf("\nHemisphere=%hd OriginLat=%lf OriginLongi=%lf StdLatOne=%lf ERad=%lf EFlt=%lf",GPhemis, GPlat0, GPlon0, GPstlat1,Prd,Pflt ); }
+
+	virtual bool CheckGeodeticCoordinates (Location&);
+
+	virtual double 	CheckOriginLongitude () = 0;
+};
+
+//
+// .NAME:
+// PmMercator
+//
+// .AUTHOR:
+// Ubirajara Freitas, Julio d'Alge
+//
+// .SUMMARY:
+//  Provides methods that are required to handle the PmMercator map projection.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and PmMercator coordinates. Mercator is a conformal projection
+//  system that uses the Hayford ellipsoid. Ellipsoid options can be redefined
+//  by editing the file "Datum" under $SPRINGHOME/etc.
+//
+// .DESCENDENT:
+//  None
+//
+// .RELATED:
+//  Point
+// 
+// .ASCENDENT:
+//  PmGeneralProjection.
+//
+// .COMMENTS:
+//  None
+//
+
+class PmMercator : public PmGeneralProjection
+{
+
+public:
+	PmMercator (const MvRequest& reqst);
+	// Constructor from a request
+
+	~PmMercator () {}
+//		Empty destructor
+
+
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms geodetic into PmMercator 
+//		coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad).
+//		Return: 
+//			p:	Mercator coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms Mercator into geodetic
+//		coordinates.
+//		Input: 
+//			p:	Mercator coordinates (m).
+//		Return: 
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y Mercator coordinates must be both valid,
+//			within their typical range.
+
+	virtual bool CheckGeodeticCoordinates (Location&);
+
+	virtual double 	CheckOriginLongitude ();
+};
+
+//
+// .NAME:
+// PmCylinEquid
+// 
+// .AUTHOR:
+// Ubirajara Freitas, Julio d'Alge.
+//
+// .SUMMARY:
+//  Provides methods that are required to handle the Equidistant Cylindrical
+//  map projection.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and Equidistant Cylindrical coordinates. Equidistant Cylindrical
+//  is a projection system that is neither conformal nor equal-area and uses 
+//  a spherical earth. Spheroid options can be redefined by editing the file
+//  "Datum" under $SPRINGHOME/etc.
+//
+// .DESCENDENT:
+//  None
+//
+// .RELATED:
+//  Point, Datum
+//
+// .ASCENDENT:
+//  PmGeneralProjection
+//
+// .COMMENTS:
+//  None
+//  
+
+class PmCylindEquid : public PmGeneralProjection
+{
+
+public :
+	PmCylindEquid ( const MvRequest& reqst );
+//	       Constructor from a request
+
+	~PmCylindEquid () {}
+//		Empty destructor
+
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms geodetic into Equidistant
+//		Cylindrical coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad).
+//		Return: 
+//			p:	Equidistant Cylindrical coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms Equidistant Cylindrical into 
+//		geodetic coordinates.
+//		Input: 
+//			p:	Equidistant Cylindrical coordinates (m).
+//		Return: 
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y Equidistant Cylindrical coordinates must 
+//			be both valid, within their typical range.
+
+	virtual bool CheckGeodeticCoordinates (Location&);
+
+	virtual double 	CheckOriginLongitude ();
+};
+
+//
+// .NAME:
+// PmPolarStereo
+//
+// .AUTHOR:
+// Ubirajara Freitas, Julio d'Alge.
+//
+// .SUMMARY:
+//  Provides methods that are required to handle the Polar Stereographic map 
+//  projection.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and Polar Stereographic coordinates. Polar Stereographic is a
+//  conformal projection system that uses the Hayford ellipsoid. 
+//  Ellipsoid options can be redefined by editing the file "Datum" under
+//  $SPRINGHOME/etc.
+//
+// .DESCENDENT:
+//  None.
+//
+// .RELATED:
+//  Point, Datum.
+//
+// .ASCENDENT:
+//  PmGeneralProjection.
+//
+// .COMMENTS:
+//  Direct and inverse formulas require explicit knowledge of the hemisphere.
+//  (see Snyder's 'Map Projections used by the U.S. Geological Survey').
+//
+
+class PmPolarStereo : public PmGeneralProjection
+{
+
+public:
+	PmPolarStereo ( const MvRequest& reqst );
+//		Constructor from a request
+
+	~PmPolarStereo () {}
+//		Empty destructor.
+	
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms geodetic into Polar
+//		Stereographic coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad).
+//		Return: 
+//			p:	Polar Stereographic coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms Polar Stereographic into 
+//		geodetic coordinates.
+//		Input: 
+//			p:	Polar Stereographic coordinates (m).
+//		Return: 
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y Polar Stereographic coordinates must 
+//			be both valid, within their typical range.
+
+	virtual bool CheckGeodeticCoordinates (Location&);
+
+	virtual double CheckOriginLongitude ()
+		{ return OriginLongitude (); }
+};
+
+//
+// .NAME:
+//  PmLambert
+//
+// .AUTHOR:
+//  Ubirajara Freitas, Julio d'Alge
+//
+// .SUMMARY:
+//  Provides methods that are required to handle the PmLambert map projection.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and PmLambert conformal conic coordinates. Lambert conformal 
+//  conic uses the planimetric datum Corrego Alegre (Hayford ellipsoid).
+//  Ellipsoid options can be redefined by editing the file "Datum" under
+//  $SPRINGHOME/etc.
+//
+// .DESCENDENT:
+//  None
+//
+// .RELATED:
+//  Point
+// 
+// .ASCENDENT:
+//  PmGeneralProjection.
+//
+// .COMMENTS:
+//  None
+//
+
+class PmLambert : public PmGeneralProjection
+{
+protected:
+	double LScale;	   // Map scale
+
+public:
+	PmLambert (const MvRequest& reqst);
+//		Constructor from a request.
+
+	~PmLambert () {}
+//		Empty destructor.
+
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms geodetic into PmLambert 
+//		coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad).
+//		Return: 
+//			p:	Lambert coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms Lambert into geodetic
+//		coordinates.
+//		Input: 
+//			p:	Lambert coordinates (m).
+//		Return: 
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y Lambert coordinates must be both valid,
+//			within their typical range.
+
+	virtual double 	CheckOriginLongitude ();
+
+	bool CanDoZoom ()
+		{ return true; }
+};
+
+//
+// .NAME:
+//  PmAitoff
+//
+// .AUTHOR:
+//  Paddy O'Sullivan
+//
+// .SUMMARY:
+//  Provides methods that are required to handle the PmAitoff map projection.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and PmAitoff coordinates.
+//
+// .DESCENDENT:
+//  None.
+//
+// .RELATED:
+//  Point
+// 
+// .ASCENDENT:
+//  PmGeneralProjection.
+//
+// .COMMENTS:
+//  None.
+//  
+
+class PmAitoff : public PmGeneralProjection
+{
+
+public:
+	PmAitoff (const MvRequest& reqst);
+//		Constructor from a request
+
+	~PmAitoff () {}
+//		Empty destructor
+
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms geodetic into PmAitoff 
+//		coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad).
+//		Return: 
+//			p:	Aitoff coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms Aitoff into geodetic
+//		coordinates.
+//		Input: 
+//			p:	Aitoff coordinates (m).
+//		Return: 
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y Aitoff coordinates must be both valid,
+//			within their typical range.
+
+	virtual double CheckOriginLongitude ()
+		{ return OriginLongitude (); }
+
+	bool CanDoZoom ()
+		{ return false; }
+};
+
+//
+// .NAME:
+//  PmOceanSection
+//
+// .AUTHOR:
+//  Paddy O'Sullivan
+//
+// .SUMMARY:
+//  Provides methods that are required to handle the PmOceanSection map projection.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and PmOceanSection coordinates.
+//
+// .DESCENDENT:
+//  None
+//
+// .RELATED:
+//  Point
+//
+// .ASCENDENT:
+//  PmGeneralProjection
+//
+// .COMMENTS:
+//  None
+//
+
+class PmOceanSection : public PmGeneralProjection
+{
+
+public:
+	PmOceanSection (const MvRequest& reqst);
+//		Constructor from a request.
+
+	~PmOceanSection () {}
+//		Empty destructor.
+
+
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms geodetic into PmOceanSection 
+//		coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad).
+//		Return: 
+//			p:	OceanSection coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		PmGeneralProjection transforms OceanSection into geodetic
+//		coordinates.
+//		Input: 
+//			p:	OceanSection coordinates (m).
+//		Return: 
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y OceanSection coordinates must be both valid,
+//			within their typical range.
+
+	virtual double 	CheckOriginLongitude ();
+
+	bool CanDoZoom ()
+		{ return false; }
+};
+
+#endif
diff --git a/src/uPlot/PmIndividualProjection.cc b/src/uPlot/PmIndividualProjection.cc
new file mode 100644
index 0000000..f6cd8b0
--- /dev/null
+++ b/src/uPlot/PmIndividualProjection.cc
@@ -0,0 +1,64 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PmIndividualProjection.h"
+
+// =============================================================
+// class PmCartesianViewProjectionFactory - builds PmCartesianView projection
+class PmCartesianViewProjectionFactory : public PmProjectionFactory
+{
+	virtual PmProjection* Build( const MvRequest& reqst ) 
+		{ return new PmCartesianView ( reqst ); }
+
+public:
+	PmCartesianViewProjectionFactory() : PmProjectionFactory("CARTESIANVIEW") {}
+};
+
+// Instance which is loaded in the "factory"
+static PmCartesianViewProjectionFactory cartesianViewProjectionFactoryInstance;
+
+// ====================================================================
+//
+// PmCartesianView projection
+
+PmCartesianView::PmCartesianView ( const MvRequest& viewRequest ):
+	PmProjection ( viewRequest )
+{
+	this->CalculateProjectionCoord();
+}
+
+// GEODETIC TO CARTESIANVIEW COORDINATES
+Point
+PmCartesianView:: LL2PC (Point& )
+{
+	//Add code later
+	return(Point(0.,0.));
+}
+
+// CARTESIANVIEW TO GEODETIC COORDINATES
+Point
+PmCartesianView :: PC2LL (Point& )
+{
+	//Add code later
+	return(Point(0.,0.));
+}
+
+double
+PmCartesianView::CheckOriginLongitude ()
+{
+	//Add code later
+	return 0.;
+}
+
+bool
+PmCartesianView::CheckGeodeticCoordinates (Location& )
+{
+	//Add code later
+	return true;
+}
diff --git a/src/uPlot/PmIndividualProjection.h b/src/uPlot/PmIndividualProjection.h
new file mode 100644
index 0000000..d381720
--- /dev/null
+++ b/src/uPlot/PmIndividualProjection.h
@@ -0,0 +1,97 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+// PmIndividualProjection
+//
+// .AUTHOR:
+//Fernando Ii
+//
+// .SUMMARY:
+//  Provides methods that are required to handle specific map projections.
+//
+// .DESCRIPTION:
+//  Defines individual projections that are not following conventional map projections.
+//
+// .DESCENDENT:
+//
+// .RELATED:
+//
+// .ASCENDENT:
+//  PmProjection
+
+// .COMMENTS:
+//  None
+
+#ifndef PM_INDIVIDUAL_PROJECTION_H
+#define PM_INDIVIDUAL_PROJECTION_H
+
+#include "PmProjection.h"
+
+class PmCartesianView : public PmProjection
+{
+protected:
+
+public:
+	PmCartesianView( const MvRequest& reqst );
+//		Normal constructor from a request
+
+	~PmCartesianView() { }
+//		Empty destructor
+
+	friend 	bool operator== (PmCartesianView& a, PmCartesianView& b);
+//		Equality operator. Objects a and b are considered equal if 
+//		their common projection parameters are the same.
+//		Input:
+//			a:	Object of type PmCartesianView
+//			b:	Object of type PmCartesianView
+//		Return:
+//			TRUE:	Objects are equal;
+//			FALSE:	Objects are different.
+
+	virtual	Point LL2PC (Point& p);
+//		Pure virtual method that transforms geodetic into
+//		projection coordinates.
+//		Description:
+//			This method is implemented for each available
+//			projection class and represents the so-called
+//			direct formulas, which compute projection
+//			coordinates from geodetic coordinates.
+//		Input: 
+//			p:	Geodetic coordinates (rad)
+//		Return: 
+//			p:	Projection coordinates (m)
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi])
+
+	virtual	Point PC2LL (Point& p);
+//		Pure virtual method that transforms projection into
+//		geodetic coordinates.
+//		Description:
+//			This method is implemented for each available
+//			projection class and represents the so-called
+//			inverse formulas, which compute geodetic
+//			coordinates from projection coordinates.
+//		Input: 
+//			p:	Projection coordinates (m)
+//		Return: 
+//			p:	Geodetic coordinates (rad)
+//		Preconditions:
+//			X and Y projection coordinates must be both valid,
+//			within the typical range of each projection class.
+
+	virtual bool CheckGeodeticCoordinates (Location&);
+
+	virtual double CheckOriginLongitude ();
+};
+
+#endif
diff --git a/src/uPlot/PmProjection.cc b/src/uPlot/PmProjection.cc
new file mode 100644
index 0000000..ce159be
--- /dev/null
+++ b/src/uPlot/PmProjection.cc
@@ -0,0 +1,254 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "PmProjection.h"
+#include "ObjectList.h"
+#include "PmGeneralProjection.h"
+#include "SatelliteProjection.h"
+
+bool
+IsEqual (float a, float b)
+{
+	double da, db;
+	da = floor(double(a));
+	db = floor(double(b));
+
+	if ( da != db) return false;
+
+	long la, lb;
+	la = (long)((a - da)*100000.);
+	lb = (long)((b - db)*100000.);
+	if (la != lb) return false;
+	return true;
+}
+
+bool
+IsEqual (double a, double b)
+{
+	double da, db;
+	da = floor(a);
+	db = floor(b);
+
+	if ( da != db) return false;
+
+	long la, lb;
+	la = (long)((a - da)*1000000.);
+	lb = (long)((b - db)*1000000.);
+	if (la != lb) return false;
+	return true;
+}
+
+bool
+operator== (PmGeneralProjection& a, PmGeneralProjection& b)
+{
+	if (a.Pname != b.Pname ) return false;
+	if (!IsEqual(a.Prd, b.Prd)) return false;
+	if (!IsEqual(a.Pflt, b.Pflt)) return false;
+
+	if (a.GPhemis != b.GPhemis) return false;
+	if (!IsEqual(a.GPlat0, b.GPlat0)) return false;
+	if (!IsEqual(a.GPlon0, b.GPlon0)) return false;
+	if (!IsEqual(a.GPstlat1, b.GPstlat1)) return false;
+
+	return true;
+}
+
+bool
+operator== (Satellite& a, Satellite& b)
+{
+	if (a.Pname != b.Pname) return false;
+	if (!IsEqual(a.Prd, b.Prd)) return false;
+	if (!IsEqual(a.Pflt, b.Pflt)) return false;
+
+	if (!IsEqual(a.SPri, b.SPri)) return false;
+	if (!IsEqual(a.SPrj, b.SPrj)) return false;
+	if (!IsEqual(a.SPis, b.SPis)) return false;
+	if (!IsEqual(a.SPjs, b.SPjs)) return false;
+	if (!IsEqual(a.SPla0, b.SPla0)) return false;
+	if (!IsEqual(a.SPlo0, b.SPlo0)) return false;
+	if (!IsEqual(a.SPrs, b.SPrs)) return false;
+
+	return true;
+}
+
+// ===========================================================
+//
+//  Factory for Projections
+//
+Cached
+PmProjectionFactoryTraits::FactoryName ( const MvRequest& reqst )
+{
+	// Get the projection name. If it does not exist in the request, 
+	// expand the request to search for the default projection name
+	Cached projectionName = reqst( "MAP_PROJECTION" );
+	if ( !projectionName )
+	{
+		MvRequest tmpReq = ObjectList::ExpandRequest(reqst,EXPAND_DEFAULTS);
+		projectionName = tmpReq( "MAP_PROJECTION" );
+	}
+
+	return projectionName;
+}
+
+PmProjection* 
+PmProjectionFactoryTraits::DefaultObject ( const MvRequest& reqst )
+{
+       return new PmCylindEquid ( reqst );
+}
+
+// ================================================================
+//
+//   PmProjection base class
+//
+//
+PmProjection :: PmProjection ( const MvRequest& viewRequest )
+{
+	// Get the projection name. If it does not exist in the request, 
+	// expand the request to search for the default projection name
+	MvRequest tmpReq(viewRequest);
+	Pname = tmpReq ("MAP_PROJECTION");
+	if ( !Pname )
+	{
+		tmpReq = ObjectList::ExpandRequest(viewRequest,EXPAND_DEFAULTS);
+		Pname = tmpReq( "MAP_PROJECTION" );
+	}
+
+	// Default values for radius and flatness
+	Prd      = EARTHRADIUS;
+	Pflt     = EARTHFLATNESS;
+
+	// Initialize the bounding box in geodetic coordinates
+     double lat1  = tmpReq ( "AREA", 0 );
+	double long1 = tmpReq ( "AREA", 1 );
+	double lat2  = tmpReq ( "AREA", 2 );
+	double long2 = tmpReq ( "AREA", 3 );
+
+	Location geodeticCoord ( lat2, long1, lat1, long2 );
+	geodCoord_ = geodeticCoord;
+}
+
+PmProjection :: ~PmProjection ()
+{
+	// Empty
+}
+
+PmProjection&
+PmProjection :: operator= (PmProjection& proj)
+{
+	Pname = proj.Pname;
+
+	Prd   = proj.Prd;
+	Pflt  = proj.Pflt;
+
+	geodCoord_ = proj.geodCoord_;
+	projCoord_ = proj.projCoord_;
+
+	return *this;
+}
+
+bool
+operator== (PmProjection& a, PmProjection& b)
+{
+	if ( a.Pname != b.Pname ) return false;
+
+	if ( a.Pname == SATELLITE )
+	{
+		if (*(Satellite*)&a == *(Satellite*)&b)
+			return true;
+		else	return false;
+	}	
+	else	// GENERALPROJ
+	{
+		if (*(PmGeneralProjection*)&a == *(PmGeneralProjection*)&b)
+			return true;
+		else	
+			return false;
+	}
+}
+
+//
+//  LatLongTransf
+//
+//  PURPOSE : Transform a box on projection coordinates
+//            to a box in lat/long coordinates (in degrees)
+Location
+PmProjection::LatLongTransf ( const Location& box )
+{
+	// Extract the lower left and upper right points
+	Point projLowerLeft  ( box.Left() , box.Bottom() );
+	Point projUpperRight ( box.Right(), box.Top ()   );
+
+	// Calculate the coordinates in geodetic coordinates
+	Point geodLowerLeft  = this->PC2LL ( projLowerLeft );
+	Point geodUpperRight = this->PC2LL ( projUpperRight );
+
+	return Location ( geodUpperRight.Y() * RAD_TO_DEG, 
+			  geodLowerLeft.X()  * RAD_TO_DEG,
+			  geodLowerLeft.Y()  * RAD_TO_DEG,
+			  geodUpperRight.X() * RAD_TO_DEG);
+}
+
+//
+//  ProjectionTransf
+//
+//  PURPOSE : Transform a box in lat/long coordinates (in degrees)
+//            to a box in projection coordinates
+Location
+PmProjection::ProjectionTransf ( const Location& box )
+{
+	// Extract the lower left and upper right points
+	Point geodLowerLeft  ( box.Left()   * DEG_TO_RAD,
+			       box.Bottom() * DEG_TO_RAD );
+	Point geodUpperRight ( box.Right()  * DEG_TO_RAD,
+			       box.Top ()   * DEG_TO_RAD );
+
+	// Calculate the coordinates in geodetic coordinates
+	Point projLowerLeft  = this->LL2PC ( geodLowerLeft );
+	Point projUpperRight = this->LL2PC ( geodUpperRight );
+
+	return Location ( projUpperRight.Y() ,
+			  projLowerLeft.X()  ,
+			  projLowerLeft.Y()  ,
+			  projUpperRight.X() );
+}
+
+void
+PmProjection::CalculateProjectionCoord()
+{
+	// Extract the lower left and upper right points
+	Point geodLowerLeft  ( geodCoord_.Left()   * DEG_TO_RAD,
+			       geodCoord_.Bottom() * DEG_TO_RAD );
+	Point geodUpperRight ( geodCoord_.Right()  * DEG_TO_RAD,
+			       geodCoord_.Top()    * DEG_TO_RAD );
+	
+	// Calculate the box in projection coordinates
+	Point projLowerLeft = this->LL2PC ( geodLowerLeft );
+	Point projUpperRight = this->LL2PC ( geodUpperRight );
+
+	Location projCoord ( projUpperRight.Y(),
+			     projLowerLeft.X(),
+			     projLowerLeft.Y(),
+			     projUpperRight.X() );
+
+	// Store the projection coordinates for later use
+	projCoord_ = projCoord;
+}
+
+#if 0
+bool
+PmProjection::CheckCoord()
+{
+	this->CalculateProjectionCoord ();
+
+	if ( ( projCoord_.Left()   > projCoord_.Right() ) ||
+	     ( projCoord_.Bottom() > projCoord_.Top()   ) )
+		return false;
+	return true;
+}
+#endif
diff --git a/src/uPlot/PmProjection.h b/src/uPlot/PmProjection.h
new file mode 100644
index 0000000..6e8f51c
--- /dev/null
+++ b/src/uPlot/PmProjection.h
@@ -0,0 +1,528 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef PM_projectionDEFINED
+#define PM_projectionDEFINED
+
+#include <MvRequest.h>
+#include <Point.hpp>
+
+#include "Factory.hpp"
+#include "Location.h"
+
+const Cached MERCATOR      = "MERCATOR";
+const Cached CYLINDRICAL   = "CYLINDRICAL";
+const Cached POLAR         = "POLAR_STEREOGRAPHIC";
+const Cached SATELLITE     = "SATELLITE";
+const Cached SPACEVIEW     = "SPACEVIEW";
+const Cached OCEANSECTION  = "OCEAN_SECTION";
+const Cached AITOFF        = "AITOFF";
+const Cached LAMBERT       = "LAMBERT";
+
+enum PROJECTIONID { CylindricalId, PolarNorthId, PolarSouthId, MercatorId, SpaceViewId, OceanSectionId, AitoffId, LambertId, CartesianViewId };
+
+const short PDATUM = 0x1 ;
+const short PHEMISPHERE = 0x2 ;
+const short PLATITUDE = 0x4 ;
+const short PLONGITUDE = 0x8 ;
+const short PFIRSTLAT = 0x10 ;
+const short PSECDLAT = 0x20 ;
+
+const short NORTH = 1;
+const short SOUTH = -1;
+
+const double EARTHRADIUS   = 6378160.; // Int. Astronomical Union - 1965
+const double EARTHFLATNESS = 1. / 297.;
+
+const double DEG_TO_RAD = M_PI / 180.;
+const double RAD_TO_DEG = 180./ M_PI;
+
+const double SCALE_THSD    = 1./1000.;    // 10**(-3)
+const double SCALE_MILLION = 1./1000000.; // 10**(-6) (scale factor used in GRIB )
+
+// Class Device Factory - clones a new Device on Request
+class PmProjection;
+
+struct PmProjectionFactoryTraits {
+	typedef PmProjection     Type;
+	typedef const MvRequest& Parameter;
+	static  Cached           FactoryName   ( Parameter );
+	static  Type*            DefaultObject ( Parameter );
+};
+
+
+class PmProjectionFactory : public Factory<PmProjectionFactoryTraits> 
+{
+public:
+	PmProjectionFactory( const Cached& name ) :
+		Factory<PmProjectionFactoryTraits>(name) {}
+};
+
+// 
+// .NAME:
+// PmProjection.
+//
+// .AUTHOR:
+// Ubirajara Freitas, Julio d'Alge.
+//
+// .SUMMARY:
+//  Provides methods that are required to handle all map projection
+//  definitions and georeferencing of satellite images.
+//
+// .DESCRIPTION:
+//  Specifies earth and projection parameters that represent a common
+//  ground in terms of defining conventional map projections, navigating
+//  on low-resolution images of geostationary satellites. Class PmProjection
+//  also encapsulates the following important information:
+//		Earth equatorial radius;
+//		Earth flatenning;
+//		Coordinates of bounding box (in lat/long and projection meters).
+//
+// .DESCENDENT:
+//  PMGeneralProjection, Satellite
+//
+// .RELATED:
+//  Location, Point.
+//
+// .COMMENTS:
+//  Modified from original INPE projection code for use in METVIEW by G.Camara
+//  (included creation based on a request)
+
+class PmProjection
+{
+protected:
+	Cached		Pname;		// PmProjection name
+	double		Prd;		// Earth equatorial radius (m)
+	double		Pflt;		// Earth flattening
+
+	Location        geodCoord_;     // Bounding box in lat/long coordinates
+	Location        projCoord_;     // Bounding box in projection coordinates
+
+public:
+	PmProjection ( const MvRequest& reqst );
+//		Normal constructor.
+//		Description:
+//			Initializes its members
+//                      Earth radius and flattening are given default values
+//                      Calculates the bounding box (in geodetic coordinates)	
+
+	virtual ~PmProjection ();
+//		Destructor.
+//		Description:
+//			Frees allocated memory.
+
+	PmProjection& operator= (PmProjection& p);
+//		Assignment operator.
+//		Input:
+//			p: 	PmProjection to be copied.
+//		Return:
+//			Assigned projection.
+
+	friend bool operator== (PmProjection& a, PmProjection& b);
+//		Equality operator. Objects a and b are considered equal if
+//		their projection codes are the same.
+//		Input:
+//			a:	Object of type PmProjection;
+//			b:	Object of type PmProjection.
+//		Return:
+//			TRUE:	Objects are equal;
+//			FALSE:	Objects are different.
+
+//      Returns the location of the bounding box in lat/long
+	const Location& GeodeticCoord()
+		{ return geodCoord_; }
+
+#if 0
+	void SetGeodeticCoord ( const Location coord )
+		{ geodCoord_ = coord; }
+//              Sets the location of the bounding box in lat/long
+
+	Location& ProjectionCoord()
+		{ return projCoord_; }
+//              Returns the location of the bounding box in projection coordinates
+#endif
+
+	Location LatLongTransf ( const Location& box );
+//               Transformation operator that generates a location in lat/long (degrees)
+//               given a location in projection coordinates
+//
+//               Input:
+//                    box : rectangle in projection coordinates (m)
+//               Output:
+//                    Location in lat/long (degrees)
+//
+	Location ProjectionTransf ( const Location& box );
+//               Transformation operator that generates a location in projection
+//               coordinates (m) given a location in lat/long (degrees)
+//               Input:
+//                    box : rectangle in lat/long (degrees)
+//               Output:
+//                    Location in projection coordinates (m)
+//
+
+	virtual void CalculateProjectionCoord();
+//              Calculate the bounding box in projection coordinates
+//              (internal function )
+//              Input:
+//                    geodCoord_ : bounding box in lat/long
+//              Output:
+//                    projCoord_ : bounding box in projection coordinates
+
+#if 0
+	const   Cached&	Name()
+		       {return Pname;} 
+// 		Returns projection name.
+//		Return:
+//			Pname:	PmProjection name.	     
+
+	double 	EarthRadius() 			{return Prd;}
+//		Returns earth equatorial radius.
+//		Return:
+//			Prd:	Earth equatorial radius (m).
+
+	void   	EarthRadius (double e) 		{Prd = e;}
+//		Updates earth equatorial radius.
+//		Input:
+//			e:	Earth equatorial radius (m).
+//		Precondition:
+//			e must be a valid earth equatorial radius
+//			(e.g., about 6,370,000 m).
+
+	double 	EarthFlattening() 		{return Pflt;}
+//		Returns earth flattening.
+//		Return:
+//			Pflt:	Earth flattening.
+
+	void   	EarthFlattening (double e) 	{Pflt = e;}
+//		Updates earth flattening.
+//		Input:
+//			e: 	Earth flattening.
+//		Precondition:
+//			e must be a valid earth flattening (e.g., about
+//			1/298  for an ellipsoidal earth and 0 for a 
+//			spherical earth).
+#endif
+
+	virtual	Point LL2PC (Point& p) = 0;
+//		Pure virtual method that transforms geodetic into 
+//		projection coordinates.
+//		Description:
+//			This method is implemented for each available
+//			projection class and represents the so-called
+//			direct formulas, which compute projection
+//			coordinates from geodetic coordinates.
+//		Input: 
+//			p: 	Geodetic coordinates (rad)
+//		Return: 
+//			p:  	PmProjection coordinates (m)
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi])
+
+	virtual	Point PC2LL (Point& p) = 0;
+//		Pure virtual method that transforms projection into
+//		geodetic coordinates.
+//		Description:
+//			This method is implemented for each available
+//			projection class and represents the so-called
+//			inverse formulas, which compute geodetic
+//			coordinates from projection coordinates.
+//		Input: 
+//			p: 	PmProjection coordinates (m)
+//		Return:
+//			p:	Geodetic coordinates (rad)
+//		Preconditions:
+//			X and Y projection coordinates must be both valid
+//			within the typical range of each projection class
+
+#if 0
+	virtual double	SensorResolutionX () = 0;
+//		Pure virtual method that returns the sensor angular
+//		resolution along X direction.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the sensor
+//			angular resolution (IFOV) along X direction.
+
+	virtual void	SensorResolutionX (double s) = 0;
+//		Pure virtual method that updates the sensor angular
+//		resolution along X direction.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the sensor
+//			angular resolution (IFOV) along X direction.
+//		Input:
+//			s: 	Angular resolution along X direction (rad).
+//		Precondition:
+//			s must be a valid angular resolution.
+
+	virtual double 	SensorResolutionY () = 0;
+//		Pure virtual method that returns the sensor angular
+//		resolution along Y direction.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the sensor
+//			angular resolution (IFOV) along Y direction.
+
+	virtual void    SensorResolutionY (double s) = 0;
+//		Pure virtual method that updates the sensor angular
+//		resolution along Y direction.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the sensor
+//			angular resolution (IFOV) along Y direction.
+//		Input:
+//			s: 	Angular resolution along Y direction (rad).
+//		Precondition:
+//			s must be a valid angular resolution.
+
+	virtual double	SubSatelliteX () = 0;
+//		Pure virtual method that returns the sub-satellite X 
+//		coordinate.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the satellite
+//			X coordinate of sub-satellite point, which is the
+//			pixel or column coordinate multiplied by the spatial
+//			resolution in meters.
+
+	virtual void	SubSatelliteX (double s) = 0;
+//		Pure virtual method that updates the sub-satellite X 
+//		coordinate.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the satellite
+//			X coordinate of sub-satellite point, which is the
+//			pixel or column coordinate multiplied by the spatial
+//			resolution in meters.
+//		Input:
+//			s: 	Sub-satellite X coordinate (m).
+//		Precondition:
+//			s must be a valid coordinate value.
+
+	virtual double 	SubSatelliteY () = 0;
+//		Pure virtual method that returns the sub-satellite Y 
+//		coordinate.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the satellite
+//			Y coordinate of sub-satellite point, which is the
+//			line coordinate multiplied by the spatial resolution
+//			in meters.
+
+	virtual void   	SubSatelliteY (double s) = 0;
+//		Pure virtual method that updates the sub-satellite Y
+//		coordinate.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the satellite
+//			Y coordinate of sub-satellite point, which is the
+//			line coordinate multiplied by the spatial resolution
+//			in meters.
+//		Input:
+//			s: 	Sub-satellite Y coordinate (m).
+//		Precondition:
+//			s must be a valid coordinate value.
+
+	virtual double	ScanMode () = 0;
+//		Pure virtual method that returns the sensor scanning 
+//		mode: 0-WE/NS, 1-SN/EW.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the sensor
+//			scanning mode, which is used in relating geodetic
+//			and satellite X and Y coordinates.
+
+	virtual double 	OriginX () = 0;
+//		Pure virtual method that returns the initial image X 
+//		coordinate.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the initial
+//			image X coordinate, which is the initial pixel or
+//			column coordinate multiplied by the spatial
+//			resolution in meters.
+
+	virtual double 	OriginY () = 0;
+//		Pure virtual method that returns the initial image Y 
+//		coordinate.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the initial
+//			image Y coordinate, which is the initial line
+//			coordinate multiplied by the spatial resolution
+//			in meters.
+
+	virtual double 	SubSatelliteLng () = 0;
+//		Pure virtual method that returns the sub-satellite geodetic 
+//		longitude.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the satellite
+//			geodetic longitude of sub-satellite point in radians.
+
+	virtual void   	SubSatelliteLng (double s) = 0;
+//		Pure virtual method that updates the sub-satellite geodetic 
+//		longitude.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the satellite
+//			geodetic longitude of sub-satellite point in radians.
+//		Input:
+//			s: 	Geodetic longitude (rad).
+//		Precondition:
+//			Longitude must be valid ([0,pi] or [0,-pi]).
+
+	virtual	double 	SubSatelliteLat () = 0;
+//		Pure virtual method that returns the sub-satellite geodetic 
+//		latitude.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the satellite
+//			geodetic latitude of sub-satellite point in radians.
+
+	virtual void   	SubSatelliteLat (double s) = 0;
+//		Pure virtual method that updates the sub-satellite geodetic 
+//		latitude.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the satellite
+//			geodetic latitude of sub-satellite point in radians.
+//		Input:
+//			s: 	Geodetic latitude (rad).
+//		Precondition:
+//			Latitude must be valid ([0,pi/2] or [0,-pi/2]).
+
+	virtual double 	Radius () = 0;
+//		Pure virtual method that returns the satellite orbit radius.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the satellite
+//			orbit radius in meters.
+
+	virtual void   	Radius (double s) = 0;
+//		Pure virtual method that updates the satellite orbit radius.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the satellite
+//			orbit radius in meters.
+//		Input:
+//			s: 	Orbit radius (m).
+//		Precondition:
+//			s must be a valid orbit radius.
+
+	virtual double 	Yaw () = 0;
+//		Pure virtual method that returns the satellite/sensor
+//		orientation angle.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and returns the yaw
+//			or orientation angle of the satellite/sensor
+//			in radians.
+
+	virtual void   	Yaw (double s) = 0;
+//		Pure virtual method that updates the satellite/sensor
+//		orientation angle.
+//		Description:
+//			This method is implemented, when appropriate,
+//			for each descendent class and updates the yaw
+//			or orientation angle of the satellite/sensor
+//			in radians.
+//		Input:
+//			s: 	Orientation angle (rad).
+//		Precondition:
+//			s must be a valid orientation angle.
+
+	virtual int	Hemisphere () = 0;
+//		Pure virtual method that returns the hemisphere.
+//		Description:
+//			This method is implemented for the PMGeneralProjection
+//			descendent classes that require an explicit knowledge
+//			of the hemisphere to relate geodetic and projection
+//			coordinates.
+
+	virtual void  	Hemisphere (int h) = 0;
+//		Pure virtual method that updates the hemisphere.
+//		Description:
+//			This method is implemented for the PMGeneralProjection
+//			descendent classes that require an explicit knowledge
+//			of the hemisphere to relate geodetic and projection
+//			coordinates.
+//		Input:
+//			h: 	Hemisphere: 1-north, -1-south.
+//		Precondition:
+//			h must be either north (1) or south (-1).
+
+	virtual double 	OriginLatitude () = 0;
+//		Pure virtual method that returns the latitude of origin.
+//		Description:
+//			This method is implemented for each descendent class
+//			and returns the latitude of origin in radians.
+
+	virtual void   	OriginLatitude (double o) = 0;
+//		Pure virtual method that updates the latitude of origin.
+//		Description:
+//			This method is implemented for each descendent class
+//			and updates the latitude of origin in radians.
+//		Input:
+//			o: 	Latitude of origin (rad).
+//		Precondition:
+//			Latitude must be valid ([0,pi/2] or [0,-pi/2]).
+
+	virtual double 	OriginLongitude () = 0;
+//		Pure virtual method that returns the longitude of origin 
+//		or central meridian.
+//		Description:
+//			This method is implemented for each descendent class
+//			and returns the longitude of origin or central
+//			meridian in radians.
+
+	virtual	void   	OriginLongitude (double o) = 0;
+//		Pure virtual method that updates the longitude of origin 
+//		or central meridian.
+//		Description:
+//			This method is implemented for each descendent class
+//			and updates the longitude of origin or central
+//			meridian in radians.
+//		Input:
+//			o: 	longitude of origin or central meridian (rad).
+//		Precondition:
+//			Longitude must be valid ([0,pi] or [0,-pi]).
+
+	virtual	double 	StandardLatitudeOne () = 0;
+//		Pure virtual method that returns the first standard parallel.
+//		Description:
+//			This method is implemented for all descendent classes
+//			that require the latitude of the first standard 
+//			parallel as a parameter to relate geodetic and				//			projection coordinates.
+
+	virtual void   	StandardLatitudeOne (double s) = 0;
+//		Pure virtual method that updates the first standard parallel.
+//		Description:
+//			This method is implemented for all descendent classes
+//			that require the latitude of the first standard 
+//			parallel as a parameter to relate geodetic and		//			projection coordinates.
+//		Input:
+//			s: 	Latitude of first standard parallel (rad).
+//		Precondition:
+//			Latitude must be valid ([0,pi/2] or [0,-pi/2]).
+
+	virtual bool CheckCoord ();
+#endif
+
+	virtual bool CheckGeodeticCoordinates (Location&) = 0;
+
+	virtual double CheckOriginLongitude () = 0;
+
+	virtual bool CanDoZoom ()
+		{ return true; }
+};
+
+#endif
diff --git a/src/uPlot/Preferences.cc b/src/uPlot/Preferences.cc
new file mode 100644
index 0000000..abf1c8d
--- /dev/null
+++ b/src/uPlot/Preferences.cc
@@ -0,0 +1,275 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Preferences.h"
+#include "MvPath.hpp"
+#include "ObjectList.h"
+
+Preferences::Preferences( Presentable& owner ):
+		owner_           ( &owner         )
+//		inputType_       ( NOINPUT       ),
+//		cursorType_      ( POINTERCURSOR ),
+//		keepAspectRatio_ ( true          ),
+//		printJob_        ( false         )
+{
+
+}
+Preferences::Preferences( const Preferences& old ):
+		owner_           ( old.owner_ )
+//		inputType_  (  old.inputType_      ),
+//		cursorType_  ( old.cursorType_ ),
+//		keepAspectRatio_ (old.keepAspectRatio_  ),
+//		printJob_        (  old.printJob_ )
+{
+
+}
+
+MvRequest Preferences::CoastRequest ()
+{
+	// Create a coastline request and read user's preferences
+	MvRequest coastRequest;
+	string path = MakeUserDefPath ("CoastlinesGeographyHelper");
+
+	// Do we have a preference ?
+	if ( ( FileCanBeOpened ( path.c_str(), "rw" ) == false ) ||
+	     ( FileHasValidSize( path.c_str() ) == false ) )
+	{
+		// Create a new one
+		coastRequest = ObjectList::CreateDefaultRequest  ("MCOAST");
+		coastRequest.save ( path.c_str()  );
+	}
+	else
+		coastRequest.read ( path.c_str() );
+
+	return coastRequest;
+}
+
+#if 0
+// --  METHOD:  DeviceRequest
+//
+// --  PURPOSE: Retrieves the device Request from
+//              the user's preferences directory
+
+
+MvRequest
+Preferences::PrinterRequest()
+{
+	MvRequest printerRequest;
+
+	Cached path = MakeUserPrefPath ("Printer Manager");
+
+	// Do we have a preference ?
+
+	if ( ( FileCanBeOpened ( path, "rw" ) == false ) || ( FileHasValidSize ( path ) == false ))
+	{
+		// Create a new one
+		printerRequest = ObjectList::CreateDefaultRequest  ("PRINTER_MANAGER");
+		printerRequest.save ( path  );
+		return printerRequest;
+	}
+
+	printerRequest.read ( (const char*) path );
+
+	return printerRequest;
+}
+
+
+void
+Preferences::EditPrinterPreferences( bool printJob )
+{
+	// Check if we are creating a macro job afterwards
+	printJob_ = printJob;
+
+	MvRequest printerRequest;
+	Cached path = MakeUserPrefPath ("Printer Manager");
+
+	// Try to open a file on the user's preferences directory
+	if ( ( FileCanBeOpened ( path, "r" ) == false ) || ( FileHasValidSize ( path ) == false ) ) 
+	{
+		// Create a new one
+		printerRequest = ObjectList::CreateDefaultRequest  ("PRINTER_MANAGER");
+		printerRequest.save ( path  );
+	}
+	else
+		printerRequest.read ( path );
+
+	// Call GenApp - if failed, post a message
+	// Note the callback function
+	if ( CallGenAppService ( *this,  &Preferences::SavePrinterPreferences, 
+				 printerRequest ) == false )
+		PlotMod::UserMessage ("Please Finish Current Preferences Setup");
+}
+//
+// -- METHOD: SavePrinterPreferences 
+//
+// -- PURPOSE: Save the user preferences (which are edited by GenApp)
+//             in a file AND tell the superpage to print the request
+//			   This method is called back after GenApp has finished
+//
+// -- CAVEAT:  This "side effect" is difficult to avoid, since we cannot
+//             start printing until the user has decided on his preferences
+// 
+void
+Preferences::SavePrinterPreferences( MvRequest& replyRequest )
+{
+	// Test for Cancel button selected on Printer interface
+	if ( replyRequest.getVerb() != Cached ( "PRINTER_MANAGER" ) )
+		return;
+
+	// Expand the reply request from GenApp
+	MvRequest expandedRequest = ObjectList::ExpandRequest ( replyRequest, 0  );
+
+	Cached path = MakeUserPrefPath ("Printer Manager");
+
+	// Save the reply request
+
+	if ( FileCanBeOpened ( path, "w" ) == true )
+		expandedRequest.save ( path );
+
+	// Based on destination set the owner print mode (preview or file)
+	Cached destination = expandedRequest( "DESTINATION" );
+	if (( destination == Cached( "SCREEN" )) || 
+            ( destination == Cached( "PREVIEW" ))  )
+		Owner().PrintPreview();
+	
+
+	if ( expandedRequest( "PRINT_OPTION" ) == Cached ( "ALL" ) )
+		Owner().PrintAll ( true );
+	else
+		Owner().PrintAll ( false );
+
+	// Remember to ask the superpage to really print
+	if ( printJob_ == true )
+		Owner().PrintJob();
+}
+
+void
+Preferences::EditInterfacePreferences()
+{
+}
+
+void
+Preferences::SaveInterfacePreferences(MvRequest& )
+{
+}
+
+void
+Preferences::EditMapPreferences()
+{
+	MvRequest mapRequest;
+	Cached path = MakeUserPrefPath ("MapDefinition");
+
+	// Do we have a preference ?
+
+	if ( ( FileCanBeOpened ( path, "rw" ) == false )|| ( FileHasValidSize( path ) == false ) )
+	{
+		// Create a new one
+		mapRequest = ObjectList::CreateDefaultRequest  ("MAP_DEFINITION");
+		mapRequest.save ( path  );
+	}
+	else
+		mapRequest.read ( (const char*) path );
+
+	// Call GenApp - if failed, post a message
+	// Note the callback function
+	
+	if ( CallGenAppService ( *this,  &Preferences::SaveMapPreferences, 
+				 mapRequest ) == false )
+		PlotMod::UserMessage ("Please Finish Current Preferences Setup");
+
+
+}
+
+void
+Preferences::SaveMapPreferences( MvRequest& replyRequest )
+{
+	// Expand the reply request from GenApp
+	MvRequest expandedRequest = ObjectList::ExpandRequest ( replyRequest, 0  );
+
+	Cached path = MakeUserPrefPath ("MapDefinition");
+
+	// Save the reply request
+
+	if ( FileCanBeOpened ( path, "w" ) == true )
+		expandedRequest.save ( path );
+}
+
+MvRequest
+Preferences::MapDefRequest()
+{
+         // Create a map definition request
+	MvRequest mapdefRequest;
+
+	Cached path = MakeUserPrefPath ("MapDefinition");
+
+	// Do we have a preference ?
+	if ( ( FileCanBeOpened ( path, "rw" ) == false ) || ( FileHasValidSize( path ) == false ) )
+	{
+		// Create a new one
+		mapdefRequest = ObjectList::CreateDefaultRequest  ("MAP_DEFINITION");
+		mapdefRequest.save ( path  );
+	}
+	else
+		mapdefRequest.read ( (const char*) path );
+
+return mapdefRequest;
+}
+
+void
+Preferences::EditCoastPreferences ()
+{
+	// Create a coastline request and read user's preferences
+
+	MvRequest coastRequest;
+	Cached path = MakeUserPrefPath ("Coastlines");
+
+	// Do we have a preference ?
+	if ( ( FileCanBeOpened ( path, "rw" ) == false ) || ( FileHasValidSize( path ) == false ) )
+	{
+		// Create a new one
+		coastRequest = ObjectList::CreateDefaultRequest  ("PCOAST");
+		coastRequest.save ( path  );
+	}
+	else
+		coastRequest.read ( (const char*) path );
+
+	// Call GenApp - if failed, post a message
+	// Note the callback function
+	if ( CallGenAppService ( *this, &Preferences::SaveCoastPreferences, 
+				 coastRequest ) == false )
+		PlotMod::UserMessage ("Please Finish Current Preferences Setup");
+}
+
+void
+Preferences::SaveCoastPreferences ( MvRequest& replyRequest )
+{
+	if ( replyRequest.getVerb () != PCOAST )
+		return;
+
+	// Expand the reply request from GenApp
+	MvRequest expandedRequest = ObjectList::ExpandRequest ( replyRequest, 0  );
+
+	Cached path = MakeUserPrefPath ("Coastlines");
+
+	// Save the reply request
+	if ( FileCanBeOpened ( path, "w" ) == true )
+		expandedRequest.save ( path );
+
+	Owner().UpdateVisDef ( replyRequest );
+}
+
+void
+Preferences::SetZoomOption ( int option )
+{
+	if ( option == MAGNIFY )
+		cursorType_ = MAGNIFYCURSOR;
+	else
+		cursorType_ = ZOOMCURSOR;
+}
+#endif
diff --git a/src/uPlot/Preferences.h b/src/uPlot/Preferences.h
new file mode 100644
index 0000000..23de4cb
--- /dev/null
+++ b/src/uPlot/Preferences.h
@@ -0,0 +1,160 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Preferences
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class for handling interfaces preferences
+//
+//
+// .CLIENTS:
+//  SuperPage
+//
+// .RESPONSABILITIES:
+//  - Keep track of users' preferences
+//  - Inform these preferences to the user
+//
+//
+// .COLLABORATORS:
+//
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef Preferences_H
+#define Preferences_H
+
+#include "Presentable.h"
+
+class Preferences {
+
+public:
+
+	// Constructors
+	Preferences ( Presentable& owner );
+	Preferences(const Preferences&);
+	
+	// Destructor
+	~Preferences() {}
+
+	// Class Members
+        void Owner(Presentable& xx) { owner_ = &xx; }
+        Presentable& Owner() { return *owner_; }
+
+	// Class functions
+	static MvRequest CoastRequest();
+
+#if 0
+	static MvRequest PrinterRequest();
+
+	static MvRequest MapDefRequest();
+
+
+	void SetZoomOption ( int option );
+
+	void SetInputType ( InputType inputType )
+		{ inputType_ = inputType; }
+
+	bool IsInput()
+		{ return ( inputType_ != NOINPUT ); }
+
+	bool IsPoint()
+		{ return ( ( cursorType_ == POINTCURSOR ) && 
+			   ( inputType_  == POINTINPUT ) ); }
+
+	bool IsToolPlusPoint()
+		{ return ( ( cursorType_ == TOOLPLUSPOINTCURSOR ) && 
+			   ( inputType_  == POINTINPUT ) ); }
+
+	bool IsToolPlusArea()
+		{ return ( ( cursorType_ == TOOLPLUSAREACURSOR ) && 
+			   ( inputType_  == AREAINPUT ) ); }
+	bool IsLine()
+		{ return ( ( cursorType_ == POINTERCURSOR ) && 
+			   ( inputType_  == LINEINPUT ) ); }
+
+	bool IsArea()
+		{ return ( ( cursorType_ == POINTERCURSOR ) && 
+			   ( inputType_  == AREAINPUT ) ); }
+
+	bool IsMap()
+		{ return ( ( cursorType_ == POINTERCURSOR ) && 
+			   ( inputType_  == MAPINPUT ) ); }
+
+	void SetCursorType ( CursorType cursorType )
+		{ cursorType_ = cursorType; }
+
+	bool IsPointerCursor()
+		{ return ( cursorType_ == POINTERCURSOR ); }
+
+	bool IsMagnify()
+		{ return ( cursorType_ == MAGNIFYCURSOR ); }
+
+	bool IsZoom()
+		{ return ( cursorType_ == ZOOMCURSOR ); }
+
+	bool IsScroll()
+		{ return ( cursorType_ == SCROLLCURSOR ); }
+
+	bool ZoomInNewWindow()
+		{ return ( cursorType_ == MAGNIFYCURSOR ); }
+
+	bool KeepAspectRatio()
+		{ return keepAspectRatio_; }
+
+	void SetAspectRatioConstraint ( bool option )
+		{ keepAspectRatio_ = option; } 
+
+	void EditPrinterPreferences( bool printJob = false );
+
+	void SavePrinterPreferences(MvRequest& );
+
+	MvRequest ReadPinterPreferences();
+
+	void EditInterfacePreferences();
+
+	void SaveInterfacePreferences( MvRequest& );
+
+	MvRequest ReadInterfacePreferences();
+
+	void EditMapPreferences();
+
+	void SaveMapPreferences( MvRequest& );
+
+	void EditCoastPreferences();
+
+	void SaveCoastPreferences( MvRequest& );
+#endif
+
+private:
+
+	// No assignment allowed
+	Preferences& operator=(const Preferences&){return *this;}
+
+	// Members
+//	CursorType         cursorType_;
+//	InputType          inputType_;
+//	bool               keepAspectRatio_;
+//	bool               printJob_;
+	Presentable*       owner_;
+};
+
+#endif
diff --git a/src/uPlot/Presentable.cc b/src/uPlot/Presentable.cc
new file mode 100644
index 0000000..e4836fe
--- /dev/null
+++ b/src/uPlot/Presentable.cc
@@ -0,0 +1,1432 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Presentable.h"
+
+#include <Assertions.hpp>
+#include "DrawingPriority.h"
+#include "GraphicsEngine.h"
+#include "MvLayer.h"
+#include "ObjectList.h"
+#include "PmContext.h"
+#include "Root.h"
+#include "Task.h"
+
+int Presentable::treeNodeCounter_ = 0;
+
+// -- METHOD :  Default Constructor
+//
+// -- INPUT  :  (none)
+//
+// -- OUTPUT :  (none)
+Presentable::Presentable():
+    myRequest_       (                     ),
+    presentableId_   ( treeNodeCounter_++  ),
+    myParent_        ( 0                   ),
+    myLocation_      ( 0., 0., 1., 1.      ),
+//    hasNewpage_      ( false               ),
+    hasMatch_        ( false               ),
+    matchingInfo_    ( MvRequest ("EMPTY" )),
+    pendingDrawings_ ( 0                   ),
+    needsRedrawing_  ( true                ),
+    removeData_      ( true                ),
+    hasDrawTask_     ( false               ),
+    refresh_		 ( false			   )
+//    droppedHere_     ( 0               )
+{
+    // Empty
+}
+
+// -- METHOD :  Constructor
+//
+// -- PURPOSE:  Build a new presentable from a request 
+//
+// -- INPUT  :  request
+//
+// -- OUTPUT :  
+
+Presentable::Presentable(const MvRequest& inRequest):
+	myRequest_       ( inRequest ),
+	presentableId_   ( treeNodeCounter_++),
+	myParent_        ( 0 ),
+	myLocation_      ( inRequest ),
+	hasMatch_        ( false ),
+	matchingInfo_    ( MvRequest ("EMPTY") ),
+	isVisible_       ( false ),
+//	hasNewpage_      ( false ),
+	pendingDrawings_ ( 0     ),
+        needsRedrawing_  ( true  ),
+//	inAnimation_     ( false ),
+	removeData_      ( true  ),
+	hasDrawTask_     ( false ),
+	droppedHere_     ( 0     ),
+	refresh_		  ( false	)
+{
+	// Empty
+}
+
+// -- METHOD :  Copy constructor
+
+Presentable::Presentable(const Presentable& old ):
+	myRequest_       (old.myRequest_       ),
+	presentableId_   ( treeNodeCounter_++  ),
+	myParent_        ( 0                   ),
+	myLocation_      ( old.myLocation_     ),
+	hasMatch_        ( old.hasMatch_       ),
+	matchingInfo_    ( old.matchingInfo_   ),
+//	isVisible_       ( old.isVisible_      ),
+//	hasNewpage_      ( false               ),
+	pendingDrawings_ ( 0                   ),
+        needsRedrawing_  ( true                ),
+//	inAnimation_      ( false              ),
+	removeData_      ( true                ),
+	hasDrawTask_     ( false               ),
+	droppedHere_     ( 0    	       	    ),
+	refresh_		  ( old.refresh_	    )
+{
+  // Ignore the observers for now, should not be copied,
+  // as this copy constructor is at the moment 
+  // for non-interactive devices. Consequently, device
+  // data is not copied.
+  //Childlist will be rebuilt in DuplicateChildren function.
+}
+
+void Presentable::SetRequest(const MvRequest& in)
+{
+	myRequest_=in;
+	myLocation_=in;	
+}
+
+bool Presentable::HasDrawTask()
+{
+	if ( myParent_ )
+		return hasDrawTask_ | myParent_->HasDrawTask() ;
+	else
+		return hasDrawTask_;
+}
+
+#if 0
+void Presentable::DuplicateChildren(const Presentable& old)
+{
+  MvIconDataBase& dataBase = IconDataBase();
+  MvIconDataBase& oldDB = old.IconDataBase();
+  // Now go through the childlist and copy construct
+  // all the children
+  MvChildConstIterator ii = old.childList_.begin();
+  MvIconList vdList,duList,ptextList;
+
+  MvListCursor jj;
+  for ( ; ii != old.childList_.end(); ii++ )
+    {
+
+      Presentable *oldPresentable = *ii;
+      Presentable *newPresentable = oldPresentable->Clone();
+      Insert(newPresentable);
+
+      newPresentable->DuplicateChildren(*oldPresentable);
+
+      // Now get everything attached to old and attach
+      // it to new also.
+      // Empty lists, functions below just add data.
+      vdList.erase(vdList.begin(),vdList.end());
+      duList.erase(duList.begin(),duList.end());
+      ptextList.erase(ptextList.begin(),ptextList.end());
+
+      // VisDefs
+      oldDB.VisDefListByPresentableId(oldPresentable->Id(),
+				 vdList);
+      for ( jj = vdList.begin(); jj != vdList.end(); jj++ )
+	dataBase.PresentableVisDefRelation(newPresentable->Id(),
+					   (*jj).Id() );
+
+      // Data units
+      oldDB.DataUnitListByPresentableId(oldPresentable->Id(),
+					 duList);
+      for ( jj = duList.begin(); jj != duList.end(); jj++ )
+	{
+	  MvIcon visDef;
+	  dataBase.PresentableDataUnitRelation(newPresentable->Id(),
+					       (*jj).Id() );
+
+	  // Then attach any visdefs for this data unit.
+	   oldDB.DataUnitVisDefRelationRewind();
+	   while ( oldDB.NextVisDefByDataUnitId((*jj).Id(),visDef) )
+	     dataBase.DataUnitVisDefRelation((*jj).Id(),visDef.Id() );
+	}
+
+
+      // Ptexts 
+      oldDB.PTextListByPresentableId(oldPresentable->Id(),
+				     ptextList);
+      for ( jj = ptextList.begin(); jj != ptextList.end();
+	    jj++ )
+	dataBase.PresentablePTextRelation(newPresentable->Id(),
+					  (*jj).Id() );
+    }
+
+   // I am the SuperPage, check VisDefs and Texts associated with me
+   if ( this->FindSuperPage () == this )
+   {
+	// Clean auxiliary lists
+        vdList.erase(vdList.begin(),vdList.end());
+        ptextList.erase(ptextList.begin(),ptextList.end());
+
+	// VisDefs
+        oldDB.VisDefListByPresentableId(old.Id(), vdList);
+        for ( jj = vdList.begin(); jj != vdList.end(); jj++ )
+	    dataBase.PresentableVisDefRelation(Id(), (*jj).Id() );
+
+        // Ptexts 
+        oldDB.PTextListByPresentableId(old.Id(), ptextList);
+        for ( jj = ptextList.begin(); jj != ptextList.end(); jj++ )
+	    dataBase.PresentablePTextRelation(Id(), (*jj).Id() );
+   }
+}
+#endif
+
+// -- METHOD : Destructor
+//
+// -- PURPOSE: Remove the non-automatic members of the presentable
+//
+// -- INPUT  :
+//
+// -- OUTPUT :
+Presentable::~Presentable()
+{
+	// First of all, remove the presentable from the parent list
+	// the presentable may be anywhere in the hierarchy
+	if ( myParent_ )
+		myParent_->Remove(this);
+
+	// Then, for all its children, delete them
+	MvChildIterator child = childList_.begin();
+	while ( child != childList_.end() )
+	{
+          // Before deletion, make the parent point to NULL
+		// This is necessary because otherwise the top
+		// statement would generate a recursive call
+		(*child)->myParent_ = 0; //Don't get called back
+
+		// Create a temporary pointer to store the child's address
+		Presentable* pt = (*child);
+		
+          // Remove the child from the list
+		childList_.erase(child++);
+
+		// Ok, now the child's parent points to NULL and we can 
+		// safely call the child's destructor
+		delete pt;
+	}
+
+	set<PresentableObserver*> o = observers_;
+	observers_.clear();
+
+	for(set<PresentableObserver*>::iterator j= o.begin(); j != o.end(); ++j)
+		(*j)->Dead(this);
+}
+
+#if 0
+Cached
+Presentable::Class()
+{
+  //	Cached name = ObjectInfo::ObjectName ( myRequest_ );
+  //Cached path = ObjectInfo::ObjectPath ( myRequest_ );
+
+  return ObjectInfo::IconClass (myRequest_);
+}
+
+// -- METHOD :  SuperPageName
+//
+// -- PURPOSE:  Provide the name of the superpage associated
+//              to a presentable ( the main branch of the tree)
+// -- INPUT  :  (none)
+//
+// -- OUTPUT : The name of the superpage (with spaces)
+Cached
+Presentable::SuperPageName()
+{
+	return myParent_->SuperPageName();
+}
+
+
+// -- METHOD:   Close
+//
+// -- PURPOSE: 	Delete the superpage and its contents
+//
+void
+Presentable::Close()
+{
+    	myParent_->Close();
+}
+#endif
+
+string
+Presentable::Name()
+{
+	ostringstream ostr;
+	ostr << "Presentable" << Id();
+	return ostr.str();
+}
+
+// -- METHOD :  MacroName
+//
+// -- PURPOSE:  Provide the presentable's macro name (in which
+//              spaces are changed to underscores)
+// -- INPUT  :  (none)
+//
+// -- OUTPUT :  A valid name for macro
+string
+Presentable::MacroName()
+{
+	string str = (const char*) ObjectInfo::SpaceToUnderscore ( this->Name().c_str() );
+	return str;
+}
+
+// --   METHOD  :  Insert
+// --   PURPOSE :  Include the presentable in my child list
+//
+// --   INPUT   :  A pointer to a presentable
+
+void
+Presentable::Insert (Presentable* p )
+{
+	require (p != 0);
+	require (p->myParent_ == 0);
+
+        // Test if child is at a lower depth than parent
+	childList_.push_back(p);
+
+	p->myParent_ = this;
+
+	// Notify the change
+	NotifyObservers();
+}
+
+// --   METHOD  : Remove
+// --   PURPOSE : Erase the presentable from my child
+//                (should be used in connection with delete)
+
+void
+Presentable::Remove (Presentable* p )
+{
+	require (p != 0);
+	require (p->myParent_ == this); // Am I his father ??
+
+     // Test if child is at a lower depth than parent
+	// Remove the child from the tree
+	MvChildIterator child = find (childList_.begin(), childList_.end(), p);
+	
+	ensure ((*child) == p);
+	childList_.erase(child);
+
+	//  The child no longer has a father
+        //  (a.k.a. "abandon the child")
+	p->myParent_ = 0;
+
+	// Notify the change
+	NotifyObservers();
+}
+
+struct DropFunctor {
+	PmContext& context_;
+	DropFunctor(PmContext& context) : context_(context) {}
+
+	void operator()(Presentable* p)
+	{
+		context_.RewindToAfterDrop(); p->Drop(context_);
+	}
+};
+
+void
+Presentable::Drop( PmContext& context )
+{
+	for_each ( childList_.begin() ,childList_.end(), DropFunctor(context) );
+}
+
+void
+Presentable::DropSimulate ( PmContext& context )
+{
+	if ( !context.InRequest() )
+		return;
+
+	for (MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++)
+		(*ii)->Drop(context);
+}
+
+#if 0
+
+// -- METHOD :  
+//
+// -- PURPOSE:   
+//
+// -- INPUT  :
+//
+// -- OUTPUT : 
+void
+Presentable::SetVisibility ( bool visibility )
+{
+	isVisible_ = visibility;
+}
+
+// -- Methods used for Matching 
+
+
+// --   METHOD  : DataInserted
+// --   PURPOSE : Indicates that the presentable (or one of its
+//                children) is on a tree branch with dataObjects
+//
+void 
+Presentable::DataInserted()
+{
+
+}
+
+// --   METHOD  : DataRemoved
+// --   PURPOSE : Indicates that the presentable contains no dataObjects
+
+void 
+Presentable::DataRemoved()
+{
+
+}
+#endif
+
+// --   METHOD :   HasData
+// --   PURPOSE:   Informs if the presentable has a dataObject
+//
+bool
+Presentable::HasData()
+{
+	// Retrieve the Icon Data Base
+	MvIconDataBase& iconDataBase = this->IconDataBase();
+
+	return iconDataBase.PresentableHasData ( presentableId_ );
+}
+
+// --   METHOD :   ChildHasData
+// --   PURPOSE:   Informs if the presentable has a child with a dataObject
+//
+bool
+Presentable::ChildHasData()
+{
+	// Retrieve the Icon Data Base
+	MvIconDataBase& iconDataBase = this->IconDataBase();
+
+	// Search all the children
+	// OBS: It would be better to use MvChildConstIterator. However
+	// HP compiler gives an error.
+	MvChildIterator child;
+	for (child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		if ( iconDataBase.PresentableHasData ( (*child)->Id() ) )
+		     return true;
+	}
+
+	return false;
+}
+
+// --   METHOD  : InitMatching
+// --   PURPOSE : Resets all presentables' children to be unmatched
+//
+struct InitMatchingFunctor {
+	void operator()(Presentable* p) { p->NotMatched(); }
+};
+
+void
+Presentable::InitMatching()
+{
+	for_each(childList_.begin(),childList_.end(),InitMatchingFunctor());
+}
+
+// --   METHOD  : DrawChildren
+// --   PURPOSE : Tell all my children to draw themselves
+struct DrawFunctor {
+	void operator()(Presentable* p) { p->Draw(); }
+};
+
+void
+Presentable::DrawChildren()
+{
+	for_each ( childList_.begin() ,childList_.end(), DrawFunctor() );
+}
+
+
+// --   METHOD  : RemoveAllDataChildren
+// --   PURPOSE : Tell all my children to remove data
+struct RemoveAllDataFunctor {
+	void operator()(Presentable* p) { p->RemoveAllData(); }
+};
+
+void
+Presentable::RemoveAllDataChildren()
+{
+   for_each ( childList_.begin() ,childList_.end(), RemoveAllDataFunctor() );
+}
+
+void
+Presentable::RemoveMyData()
+{
+   MvIconDataBase& iconDataBase = this->IconDataBase();
+
+   // Remove Data Units
+   MvIconList duList;
+   if ( iconDataBase.DataUnitListByPresentableId ( this->Id(), duList ) )
+   {
+      MvListCursor  duCursor;
+      for ( duCursor = duList.begin(); duCursor != duList.end(); ++duCursor)
+      {
+         MvIcon& theDataUnit = *( duCursor );
+         this->RemoveIcon ( theDataUnit );
+         iconDataBase.RemoveDataUnit(theDataUnit);
+      }
+   }
+
+   // Remove PTexts
+   MvIconList ptList;
+   if ( iconDataBase.TextListByPresentableId ( this->Id(), ptList ) )
+   {
+      MvListCursor  ptCursor;
+      for ( ptCursor = ptList.begin(); ptCursor != ptList.end(); ++ptCursor)
+      {
+         MvIcon& thePText = *( ptCursor );
+         this->RemoveIcon ( thePText );
+      }
+   }
+}
+
+#if 0
+// --   METHOD  : RemoveAllVisDefChildren
+// --   PURPOSE : Tell all my children to remove visdefs
+struct RemoveAllVisDefFunctor {
+	void operator()(Presentable* p) { p->RemoveAllVisDef(); }
+};
+
+void
+Presentable::RemoveAllVisDefChildren()
+{
+	for_each ( childList_.begin() ,childList_.end(), RemoveAllVisDefFunctor() );
+}
+
+void
+Presentable::RemoveAllVisDef()
+{
+	RemoveAllVisDefChildren();
+	RemoveMyVisDef();
+}
+
+void
+Presentable::RemoveMyVisDef( const MvRequest* cl)
+{
+	MvIconDataBase&   iconDataBase = this->IconDataBase();
+
+	// Remove VisDefs related to DataUnits
+	MvIconList vdList,duList;
+	if ( iconDataBase.DataUnitListByPresentableId ( this->Id(), duList ) )
+	{
+		iconDataBase.RetrieveVisDefList ( duList, vdList );
+		RemoveMyVisDef (vdList,cl);
+	}
+
+	// Remove VisDefs from Presentable
+	vdList.clear();
+	if ( iconDataBase.VisDefListByPresentableId ( this->Id(), vdList ) )
+		RemoveMyVisDef (vdList,cl);
+}
+
+void
+Presentable::RemoveMyVisDef (MvIconList& iconList, const MvRequest* req)
+{
+	MvListCursor  lCursor;
+	for ( lCursor = iconList.begin(); lCursor != iconList.end(); ++lCursor)
+	{
+		MvIcon& theVisDef = *( lCursor );
+
+		// Remove visdef if they are of the same class
+		// Exception: PCONT(NORMAL) and PCONT(ISOTACHS)
+		// are assumed to belong to different classes
+		if ( req )
+		{
+			if (!ObjectInfo::CheckVisDefClass(*req,theVisDef.Request()) )
+				continue;
+		}
+
+		this->RemoveIcon ( theVisDef );
+	}
+}
+
+// --   METHOD  : RemoveAllPTextChildren
+// --   PURPOSE : Tell all my children to remove ptexts
+struct RemoveAllPTextFunctor {
+	void operator()(Presentable* p) { p->RemoveAllPText(); }
+};
+
+void
+Presentable::RemoveAllPTextChildren()
+{
+	for_each ( childList_.begin() ,childList_.end(), RemoveAllPTextFunctor() );
+}
+
+void
+Presentable::RemoveAllPText()
+{
+	RemoveAllPTextChildren();
+	RemoveMyPText();
+}
+
+void
+Presentable::RemoveMyPText()
+{
+	MvIconDataBase&   iconDataBase = this->IconDataBase();
+
+	// Remove PTexts from Presentable
+	MvIconList ptList;
+	if ( iconDataBase.PTextListByPresentableId ( this->Id(), ptList ) )
+	{
+		MvListCursor  lCursor;
+		for ( lCursor = ptList.begin(); lCursor != ptList.end(); ++lCursor)
+		{
+			MvIcon& thePText = *( lCursor );
+			this->RemoveIcon ( thePText );
+		}
+	}
+}
+
+// --   METHOD  : SaveChildren
+// --   PURPOSE : Tell all my children to save themselves 
+struct SaveFunctor {
+	void operator()(Presentable* p) { p->Save(); }
+};
+
+void
+Presentable::SaveChildren()
+{
+	for_each ( childList_.begin(), childList_.end(), SaveFunctor () );
+}
+#endif
+
+// --   METHOD  : FindBranch
+// --   PURPOSE : Find a branch of the tree which has a node Id
+// --   INPUT   : Presentable Id ( unique )
+Presentable*
+Presentable::FindBranch (const int treeNodeId) const
+{
+	require (treeNodeId > 0 );
+
+	// Check for the current node
+	if ( treeNodeId == presentableId_ )
+		return (Presentable*)this;
+
+	Presentable* node = 0;
+
+	// Look at the descendents
+	MvChildConstIterator child;
+	for (child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		if ( ( node = (*child)->FindBranch (treeNodeId)  ) != 0 )
+			return (Presentable*) node;
+	}
+
+	return 0;
+}
+
+// --   METHOD  : FindBranchesByRequest
+// --   PURPOSE : Find branches of the tree which have an specific request
+// --   INPUT   : String requestName, vector<Presentable*>& presVec
+void
+Presentable::FindBranchesByRequest(string requestName,vector<Presentable*>& presVec)
+{
+	// Check for the current node
+        const char *name=myRequest_.getVerb();
+	if(name && strcmp(name,requestName.c_str()) == 0)
+		presVec.push_back((Presentable*)this);
+
+	// Look at the descendents
+	MvChildIterator child;
+	for (child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		(*child)->FindBranchesByRequest(requestName,presVec);
+	}
+}
+
+
+#if 0
+// --   METHOD  : FindBranch
+// --   PURPOSE : Find a branch of the tree which has an specific View
+// --   INPUT   : String viewName
+Presentable*
+Presentable::FindBranch (string viewName)
+{
+	// Check for the current node
+        if ( FindView(viewName) )
+		return (Presentable*)this;
+
+	// Look at the descendents
+	Presentable* node = 0;
+	MvChildConstIterator child;
+	for (child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		if ( ( node = (*child)->FindBranch (viewName)) != 0 )
+			return (Presentable*) node;
+	}
+	return 0;
+}
+#endif
+
+// --   METHOD  : FindSuperPage
+// --   PURPOSE : Find the superpage of the tree which has a node Id
+// --   INPUT   : Presentable Id ( unique )
+Presentable*
+Presentable::FindSuperPage () const
+{
+	// Go up the tree, until a superpage is found
+	// ( all superpages are children of the root )
+	if ( myParent_->Id() == 0 )
+		return (Presentable*) this;
+	else
+		return myParent_->FindSuperPage();
+}
+
+void
+Presentable::PendingDrawingsAdd ()
+{
+	require ( myParent_ != 0 );
+	myParent_->PendingDrawingsAdd ();
+}
+
+void
+Presentable::PendingDrawingsRemove ()
+{
+	require ( myParent_ != 0 );
+	myParent_->PendingDrawingsRemove ();
+}
+
+#if 0
+bool
+Presentable::DrawingIsFinished()
+{
+	require ( myParent_ != 0 );
+	return  myParent_->DrawingIsFinished ();
+}
+
+Location
+Presentable::GetDrawingArea ()
+{
+	require ( myParent_ != 0 );
+	return  myParent_->GetDrawingArea ();
+}
+
+void
+Presentable::SetDrawingArea ( Location loc )
+{
+	require ( myParent_ != 0 );
+	myParent_->SetDrawingArea ( loc );
+}
+#endif
+
+// -- METHOD  :  DefaultVisDefList
+//
+// -- PURPOSE : This method will retrieve the default visdef list 
+//              associated to a presentable
+//
+//         If there is no default visdef associated the presentable
+//         this method will go up the tree
+//         until the Root treeNode (the top of the tree)
+//         that will retrieve the user's default visdef list
+bool
+Presentable::DefaultVisDefList ( const char* className, MvIconList& visdefList, int type)
+{
+	require (className != 0);
+ 
+        bool usingDefault = false;
+	bool found = false;
+
+	// Retrieve the Icon Data Base
+	MvIconDataBase&   iconDataBase = this->IconDataBase();
+
+	// Try to find a visdef associated to the presentable
+	visdefList.clear();  //initialise list
+	if ( type == GETBYVISDEF )
+	{
+	    MvIconList tmpList;
+	    iconDataBase.VisDefListByPresentableId(presentableId_,tmpList);
+	    MvListCursor ii;
+	    MvIcon currentVisDef;
+	    for ( ii = tmpList.begin(); ii != tmpList.end(); ii++ )
+	    {
+		currentVisDef = *ii;
+		if ( currentVisDef.Request().getVerb() == Cached(className) )
+		  visdefList.push_back(currentVisDef);
+	    }
+	    found = visdefList.size() > 0;
+	}
+	else
+	  found = iconDataBase.VisDefListByDataUnitAndPresentableId( presentableId_, className, visdefList );
+
+	// If not found, try to find Visdefs up in the tree
+	if ( !found )
+		 usingDefault = myParent_->DefaultVisDefList(className, visdefList,type);
+	else //If Visdef(s) are found, check if there is at least one valid.
+	{    //Be careful, only make this check if type is GETBYDATAUNIT
+		if ( type != GETBYVISDEF && !ObjectList::CheckValidVisDefList ( className, visdefList ) )
+		 	usingDefault = myParent_->DefaultVisDefList(className, visdefList,type);
+	}
+	ensure(visdefList.size() > 0);
+
+     // FAMI022012 Remove this code temporarily. In the new visualisation scheme
+     // the DataObject::DrawDataVisDef() function is in charge to insert Visdefs
+     // into the DataBase
+#if 0
+	// It is a Visdef default and I am the SuperPage
+	// Save Visdefs default in the DataBase
+	if ( usingDefault && this->FindSuperPage () == this )
+//	if ( usingDefault && dynamic_cast <SuperPage> ( *this ) )
+	{
+		MvListCursor  vdCursor;
+		for ( vdCursor = visdefList.begin(); vdCursor != visdefList.end(); ++vdCursor)
+		{
+			MvIcon& visDef = *( vdCursor );
+
+			// Do not add PAXIS default to the database. This
+			// is to avoid PAXIS be shown in the Contents
+			// (Display Level). We need to rewrite the Drop 
+			// behavior of PAXIS. It is not working properly at
+			// moment, because the definition of PAXIS inside
+			// the Vertical Profile View is causing some problems. 
+//			if ( !ObjectList::IsAxis(visDef.Request().getVerb()) )
+				iconDataBase.InsertVisDef ( visDef, Id() );
+		}
+	}
+#endif
+
+	return usingDefault;
+}
+
+// -- METHOD  :  RetrieveTextList
+//
+// -- PURPOSE : This method will retrieve the Text list 
+//              associated to the node
+//
+//         Two routines will be called :
+//         1. RetrieveTextTitle : retrieve the first title text in the tree
+//         2. RetrievePTextAnnot : retrieve all the texts - type
+//            annotation - in the tree
+void
+Presentable::RetrieveTextList ( MvIconList& textList )
+{
+	require (textList.size() == 0);
+ 
+	RetrieveTextTitle(textList);
+	RetrievePTextAnnot(textList);
+
+	ensure(textList.size() > 0);
+
+	return;
+}
+
+// -- METHOD  :  RetrieveTextTitle
+//
+// -- PURPOSE : This method will retrieve the Text title associated to a presentable
+//
+//         If there is no Text title associated to the
+//         presentable, this method will go up the tree
+//         until the Root treeNode (the top of the tree)
+//         that will retrieve the user's default Text title.
+bool
+Presentable::RetrieveTextTitle ( MvIconList& textList )
+{
+        bool usingDefault = false;
+	string type("TEXT");
+
+	// Try to find a ptext associated to the presentable
+	MvIconDataBase& dataBase = this->IconDataBase();
+	if (!dataBase.TextListByPresentableId ( presentableId_, textList, type))
+		usingDefault = myParent_->RetrieveTextTitle(textList);
+
+	ensure(textList.size() > 0);
+
+	return usingDefault;
+}
+
+// -- METHOD  :  RetrievePTextAnnot
+//
+// -- PURPOSE : This method will retrieve all the PText - type annotation - 
+//              presented in the tree
+//
+bool
+Presentable::RetrievePTextAnnot ( MvIconList& ptextList )
+{
+	bool foundP,foundL;
+	string type("ANNOTATION");
+
+	// Try to find a ptext associated to the presentable
+	MvIconDataBase& dataBase = this->IconDataBase();
+	foundL = dataBase.TextListByPresentableId ( presentableId_, ptextList, type);
+
+	foundP = myParent_->RetrievePTextAnnot(ptextList);
+
+	return (foundP | foundL);
+}
+
+// -- METHOD  :  RetrieveLegend
+//
+// -- PURPOSE : This method will retrieve the Legend associated to a presentable
+//
+//         If there is no Legend associated to the presentable, this method will 
+//	   go up the tree until the Root treeNode (the top of the tree)
+//         that will retrieve the user's default Legend.
+bool
+Presentable::RetrieveLegend ( MvIcon& iconLeg )
+{
+        bool usingDefault = false;
+
+	// Try to find a legend associated to the presentable
+	MvIconDataBase& dataBase = this->IconDataBase();
+	if (!dataBase.RetrieveIcon ( PRES_LEGEND_REL,presentableId_,iconLeg ))
+		usingDefault = myParent_->RetrieveLegend(iconLeg);
+
+	return usingDefault;
+}
+
+// -- METHOD : SetDeviceData
+//
+// -- PURPOSE: Store the device information for later use
+//             ( note the use of a "smart pointer")
+//
+// -- INPUT  : pointer to a device data
+//
+// -- OUTPUT : (none)
+void
+Presentable::SetDeviceData ( DeviceData* devdata )
+{ 
+	require ( devdata != 0 );
+	auto_ptr <DeviceData> p ( devdata );
+	deviceData_ = p;
+}
+
+DeviceData*
+Presentable::ReleaseDeviceData ( )
+{
+	require ( deviceData_.get() != 0 );
+
+	return deviceData_.release();
+}
+
+#if 0
+// -- METHOD :  GetDevice
+//
+// -- PURPOSE:  Retrieve the device associated to the presentable
+//
+// -- INPUT  :  (none)
+//
+// -- OUTPUT :  a const reference to the device
+Device&
+Presentable::GetDevice() const 
+{
+	return myParent_->GetDevice();
+}
+#endif
+
+// -- METHOD :  GetGraphics Engine
+//
+// -- PURPOSE:  Retrieve the grapics engine associated to the presentable
+//
+GraphicsEngine&
+Presentable::GetGraphicsEngine() const 
+{
+	require ( myParent_ != 0 );
+	return myParent_->GetGraphicsEngine();
+}
+
+PlotModView&
+Presentable::GetView() const
+{
+	require ( myParent_ != 0 );
+	return myParent_->GetView();
+}
+
+// -- METHOD :  GetCanvas
+//
+// -- PURPOSE:  Retrieve the canvas associated to the presentable
+//
+Canvas&
+Presentable::GetCanvas() const
+{
+	require ( myParent_ != 0 );
+	return myParent_->GetCanvas();
+}
+
+#if 0
+bool
+Presentable::CanScroll()
+{
+	require ( myParent_ != 0 );
+	return myParent_->CanScroll();
+}
+
+
+// -- METHOD :  GetCanvases
+//
+// -- PURPOSE:  Return list of canvas, get from Page or EditMapPage
+CanvasList
+Presentable::GetCanvases () 
+{
+	require ( myParent_ != 0 );
+	return myParent_->GetCanvases ();
+}
+#endif
+
+DrawingPriority&
+Presentable::GetDrawPriority() 
+{
+	require ( myParent_ != 0 );
+	return myParent_->GetDrawPriority();
+}
+
+// -- METHOD :  Visitor
+//
+// -- PURPOSE:  Implement the visitor pattern by allowing the
+//              visitor to visit all my children
+// -- INPUT  :  a visitor
+//
+struct VisitFunctor {
+	Visitor& visitor_;
+	VisitFunctor(Visitor& visitor) : visitor_ ( visitor ) {}
+	void operator()(Presentable* p) { p->Visit( visitor_); }
+};
+
+void
+Presentable::VisitChildren( Visitor& v )
+{
+	for_each ( childList_.begin(), childList_.end(), VisitFunctor(v) );
+}
+
+#if 0
+struct ContentsFunctor {
+	MvRequest& request_;
+	ContentsFunctor ( MvRequest& request) : request_ ( request ) {}
+	void operator()(Presentable* p) { p->ChildrenContents ( request_ ); }
+};
+
+void
+Presentable::ChildrenContents( MvRequest& request )
+{
+	for_each ( childList_.begin(), childList_.end(), ContentsFunctor ( request ) );
+}
+
+void
+Presentable::IncludeContents ( MvRequest& request )
+{
+	request = request + myRequest_;
+}
+
+MvRequest
+Presentable::ContentsRequest ()
+{
+	MvRequest dropRequest ("DROP");
+
+	dropRequest ("DROP_ID") = presentableId_; // not really necessary
+
+	dropRequest ("_INTERNAL") = "YES"; // information for later use
+
+	// Include here all the information on tree contents
+
+	// Include my contents
+	this->IncludeContents ( dropRequest );
+
+	// Include the contents of my children
+
+	this->ChildrenContents ( dropRequest );
+ 
+return dropRequest;
+}
+#endif
+
+PaperSize
+Presentable::GetChildSize ( Presentable& child )
+{
+	PaperSize size = this->GetMySize();
+
+	Rectangle rect = child.GetLocation();
+
+	double height = size.GetHeight() * (rect.bottom - rect.top);
+	double width  = size.GetWidth() * (rect.right - rect.left);
+
+	return PaperSize ( width, height );
+}
+
+#if 0
+void
+Presentable::Print()
+{
+	myParent_->Print();
+}
+
+void
+Presentable::PrintPreview()
+{
+	myParent_->PrintPreview();
+}
+
+void
+Presentable::Undo()
+{
+	MvChildIterator child;
+
+	for ( child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		(*child)->Undo();		
+	}
+}
+
+void
+Presentable::Redo()
+{
+	MvChildIterator child;
+
+	for ( child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		(*child)->Redo();		
+	}
+}
+
+void
+Presentable::Reset()
+{
+	MvChildIterator child;
+
+	for ( child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		(*child)->Reset();		
+	}
+}
+#endif
+
+void
+Presentable::DescribeDrops ( ObjectInfo& myDescription, MacroVisDefMap& vdMap )
+{
+	// Retrieve the Icon Data Base
+	MvIconDataBase& dataBase = this->IconDataBase();
+
+	// Find any ptexts associated with the presentable.
+	MvIconList ptextList;
+	dataBase.TextListByPresentableId ( Id(), ptextList );
+
+	// Find the list of Visdefs associated to the presentable
+	MvIconList visdefList;
+	dataBase.VisDefListByPresentableId ( Id(), visdefList );
+
+	// Find the list of data units associated to the presentable
+	MvIconList dataUnitList;
+	dataBase.DataUnitListByPresentableId ( Id(), dataUnitList );
+
+	// Get an indexed name for the page. Need to be called even if
+	// there are no drops, beacuse it updates the index.
+	string macroIndexName = this->MacroPlotIndexName();
+
+	// If nothing attached, just return.
+	//if ( dataUnitList.size() == 0 && visdefList.size() == 0 && ptextList.size() == 0 )
+		//return;
+
+	Cached listDrops, ptextDrops;
+	myDescription.PutNewLine ( " " );
+	myDescription.PutNewLine ( "# Data and Visualisation parameters" );
+	myDescription.PutNewLine ( " " );
+
+	MvListCursor ptCursor;
+	for ( ptCursor = ptextList.begin(); ptCursor != ptextList.end(); ++ptCursor)
+	{
+		MvIcon currentpt = *ptCursor;
+		MvRequest currentptRequest = currentpt.Request();
+		if ( (const char*)currentptRequest("_SKIP_MACRO") || (const char*)currentptRequest("_DEFAULT") )
+			continue;
+
+		Cached ptextName = myDescription.Convert( currentptRequest);
+		ptextDrops = ptextDrops + Cached (", " ) + ptextName;
+	}
+
+	MvIcon dummy;
+	DescribeVisDefList(myDescription,visdefList,dummy,listDrops,true,vdMap);
+
+	MvListCursor du = dataUnitList.begin();
+	while ( du != dataUnitList.end() )
+	{
+		MvIcon currentDataUnit = *du;
+		if ( (int)currentDataUnit.Request()("_SKIP_MACRO")  )
+		{
+			++du;
+			continue;
+		}
+
+		int use_mode = currentDataUnit.Request()("_USE_MODE");
+
+		// Convert the data unit to macro
+		Cached dataUnitName = myDescription.ConvertDataUnitToMacro ( currentDataUnit );
+		if ( ! strcmp("",dataUnitName) )
+		{
+			++du;
+			continue;
+		}
+
+		listDrops = listDrops + Cached (", " ) + dataUnitName;
+
+		if ( use_mode )
+		{
+			++du;
+			continue;
+		}
+
+		// Find all visdefs associated to the data unit
+		visdefList.erase(visdefList.begin(),visdefList.end() );
+		dataBase.RetrieveVisDefList ( (*du) , visdefList );
+
+		DescribeVisDefList(myDescription,visdefList,*du,listDrops,true,vdMap );
+		++du;
+	}
+
+
+	if ( this->FindSuperPage () != this ) // Not a SuperPage
+	{
+		// Describe priority
+		DrawingPriority& pageDrawPriority = this->GetDrawPriority ();
+		string priorName = pageDrawPriority.DescribeYourself ( myDescription, MacroName() );
+
+		if ( strcmp(priorName.c_str(),"") != 0 )
+			listDrops = ptextDrops + listDrops + Cached (", " ) + priorName.c_str();
+	}
+
+    // Skip superpage, but should produce the plot command for a map without data
+//	if ( listDrops || ptextDrops )
+    if ( this->FindSuperPage () != this )
+	{
+		myDescription.SetPlotAction();
+		myDescription.PutNewLine ( " "  );
+		myDescription.PutNewLine ( "# Plot command "  );
+		myDescription.PutNewLine ( Cached ("plot ( ") + macroIndexName.c_str() + ptextDrops + listDrops + Cached ( " )" ) );
+	}
+}
+
+int
+Presentable::PageIndex ()
+{
+	ensure ( myParent_ != 0);
+
+	return myParent_->PageIndex ();
+}
+
+int
+Presentable::PaperPageIndex () const
+{
+	ensure ( myParent_ != 0);
+
+	return myParent_->PaperPageIndex ();
+}
+
+void
+Presentable::PaperPageIndex ( int paperPageIndex )
+{
+	ensure ( myParent_ != 0);
+
+	myParent_->PaperPageIndex ( paperPageIndex );
+}
+
+void
+Presentable::EraseDefaultDraw ()
+{
+	for ( MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++ )
+		(*ii)->EraseDefaultDraw ();
+}
+
+bool Presentable::DescribeVisDefList( ObjectInfo &myDescription,
+				      MvIconList& visdefList,MvIcon &dataUnit,
+				      Cached &listDrops, bool addToDrops,
+				      MacroVisDefMap &vdMap )
+{
+	bool found = false;
+	MvListCursor vd = visdefList.begin();
+	while ( vd != visdefList.end() )
+	{
+		MvIcon currentvd = *vd;
+		MvRequest currentvdRequest =  currentvd.Request();
+		if ( (const char*)currentvdRequest("_SKIP_MACRO")  || (const char*)currentvdRequest("_DEFAULT") )
+		{
+			++vd;
+			continue;
+		}
+
+		// Only generate the definition if it hasn't been done before
+		MacroVisDefMap::iterator ii = vdMap.find(currentvd.Id());
+		Cached visDefName;
+		if ( ii == vdMap.end() )
+		{
+			visDefName = myDescription.Convert(currentvdRequest);
+			vdMap[currentvd.Id()] = visDefName;
+		}
+		else
+			visDefName = (*ii).second.c_str();
+
+		currentvdRequest.rewind();
+		if ( ( dataUnit.Id() == 0 || CheckValidVisDef ( dataUnit, currentvdRequest ) ) &&  addToDrops )
+		{
+			found = true;
+			listDrops = listDrops + Cached (", " ) + visDefName;	
+		}
+		++vd;
+	}
+
+	return found;
+}
+
+// Process the dropping of PTEXTS
+void
+Presentable::InsertPText (  MvRequest& textRequest )
+{
+   // Retrieve the Icon Data Base
+   MvIconDataBase& dataBase = this->IconDataBase();
+
+   if ( textRequest.getVerb() == ANNOTATION )
+   {
+       // Acumulate positional texts in the list
+       dataBase.InsertText ( textRequest, presentableId_  );
+   }
+   else
+       // there should be only one title text in the list
+       dataBase.UpdateTitleText ( textRequest, presentableId_ );
+
+   // Redraw this page
+   RedrawIfWindow();
+   NotifyObservers();
+}
+
+// Process the dropping of Legend
+void
+Presentable::InsertLegend (  const MvRequest& legRequest )
+{
+   // Retrieve the Icon Data Base
+   MvIconDataBase& dataBase = this->IconDataBase();
+
+   // There should be only one legend associated to this node
+   MvIcon legIcon(legRequest,true);
+   dataBase.InsertIcon ( PRES_LEGEND_REL,presentableId_,legIcon  );
+
+   // Redraw this page
+   RedrawIfWindow();
+   NotifyObservers();
+}
+
+void Presentable::Draw ()
+{
+	// Draw all my children
+	DrawChildren ();
+}
+
+void Presentable::DrawProlog ()
+{
+     MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+		(*child)->DrawProlog();
+}
+
+void Presentable::DrawTrailer( MvRequest& fullReq )
+{
+     // Get children requests
+     MvChildIterator child;
+     for ( child = childList_.begin(); child != childList_.end(); ++child )
+          (*child)->DrawTrailer(fullReq);
+}
+
+void Presentable::DrawLayerInfo ( const int iconRelId )
+{
+    // Retrieve the Graphics Engine and the data base info
+    GraphicsEngine& ge = GetGraphicsEngine();
+    MvIconDataBase& dataBase = IconDataBase();
+
+    // Call the Graphics Engine to store the Layer info.
+    // If it does not exist, create a default one.
+    MvIcon iconLayer;
+    if ( !dataBase.RetrieveIcon( ICON_LAYER_REL,iconRelId,iconLayer ) )
+    {
+        MvLayer layer;
+        MvIcon icon(layer.Request(),true);
+        dataBase.InsertIcon( ICON_LAYER_REL,iconRelId,icon );
+        ge.Draw ( icon.Request() );
+    }
+    else
+        ge.Draw ( iconLayer.Request() );
+
+    return;
+}
+
+void Presentable::DrawTask ()
+{
+   // Ask the Root to perform the drawing
+   Root::Instance().DrawTask();
+}
+
+bool Presentable::CheckDrawTask ()
+{
+   if ( this->HasDrawTask() )
+      return true;
+
+   // Check if any of my children has some task to be performed
+   MvChildIterator child;
+   for ( child = childList_.begin(); child != childList_.end(); ++child )
+      if ( (*child)->CheckDrawTask() )
+         return true;
+
+   return false;
+}
+
+void Presentable::NotifyObservers()
+{
+	set<PresentableObserver*> o = observers_;
+	for(set<PresentableObserver*>::iterator j= o.begin(); j != o.end(); ++j)
+		(*j)->Notify(*this);
+}
+
+#if 0
+void Presentable::Add(PresentableObserver* o)
+{
+	observers_.insert(o);
+}
+
+void Presentable::Remove(PresentableObserver* o)
+{
+	observers_.erase(o);
+}
+
+void PresentableObserver::Observe(Presentable& p)
+{
+	p.Add(this);
+	observed_.insert(&p);
+}
+
+void PresentableObserver::Forget(Presentable& p)
+{
+	p.Remove(this);
+	observed_.erase(&p);
+}
+
+void PresentableObserver::ForgetAll()
+{
+	set<Presentable*>& o = observed_;
+	for(set<Presentable*>::iterator j= o.begin(); j != o.end(); ++j)
+		(*j)->Remove(this);
+	observed_.clear();
+}
+
+PresentableObserver::~PresentableObserver()
+{
+	ForgetAll();
+}
+#endif
+
+void PresentableObserver::Dead(Presentable* p)
+{
+	observed_.erase(p);
+}
diff --git a/src/uPlot/Presentable.h b/src/uPlot/Presentable.h
new file mode 100644
index 0000000..9588b65
--- /dev/null
+++ b/src/uPlot/Presentable.h
@@ -0,0 +1,716 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Presentable
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoiun Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines an abstract base class for the page hierarchy in PlotMod.
+//  The Presentable class is an example of the Composite "pattern".
+//
+//  Its methods allow for the insertion and removal of nodes and
+//  leaves on a tree structure, and also for the drawing method.
+//
+//  The building of the tree structure, from a description,
+//  is done by the Builder class.
+//
+//  Other applications that use Presentable (such as Matching) are
+//  implemented by the Visitor class.
+//
+// .DESCRIPTION:
+//  Refer to the "Design Patterns" book, page 163 for more details
+//
+//
+// .DESCENDENT:
+//  Page, SubPage, DataObject, Text, Legend
+//
+// .RELATED:
+//  PlotMod, Builder, Visitor, Device
+//
+// .ASCENDENT:
+//
+//
+#ifndef Presentable_H
+#define Presentable_H
+
+#include <inc_stl.h>
+
+#include "MvRequest.h"
+#include "MvIconDataBase.h"
+#include "DeviceData.h"
+#include "Visitor.h"
+#include "PlotModConst.h"
+#include "PaperSize.h"
+#include "Location.h"
+#include "MatchingInfo.h"
+
+class PmContext;
+class Canvas;
+class GraphicsEngine;
+class DrawingPriority;
+class PlotModView;
+class Presentable;
+class ObjectInfo;
+
+typedef map <string, pair<int, int> > DrawPriorMap;
+
+//typedef set<int> MvIntSet;
+typedef map<int,string> MacroVisDefMap;
+//typedef list<Canvas*> CanvasList;
+
+enum { GETBYDATAUNIT,GETBYVISDEF};
+
+class PresentableObserver {
+
+	friend class Presentable;
+
+	set <Presentable*> observed_;
+	void Dead(Presentable*);
+
+	// Override this one
+	virtual void Notify(Presentable&) = 0;
+
+public:
+
+	void Observe(Presentable&);
+	void Forget(Presentable&);
+
+	void ForgetAll();
+
+	virtual ~PresentableObserver();
+};
+
+class Presentable {
+
+public:
+
+	// Contructor
+	// Builds a presentable without a request
+	// (used for data objects)
+	Presentable();
+
+	// Builds a presentable from a Request
+	Presentable( const MvRequest& inRequest);
+
+	Presentable(const Presentable&);
+
+	virtual Presentable* Clone() const { return new Presentable(*this); }
+
+	// Destructor
+	virtual ~Presentable();
+
+	// Members Information
+
+	// Returns a reference to the object's associated request
+	virtual MvRequest& Request()
+		{ return myRequest_; }
+
+	// true : presentable is a window (interactive)
+        // false: presentable is not a window
+	virtual bool IsAWindow()
+		{ return myParent_->IsAWindow(); }
+
+	virtual bool HasDrawTask ();
+	virtual void HasDrawTask( bool yesno )
+		{ hasDrawTask_ = yesno; }
+
+    // Draws the presentable
+    virtual void Draw ();
+    virtual void DrawProlog ();
+    virtual void DrawPageHeader () {}
+    virtual void DrawTrailer () {}
+    virtual void DrawTrailer ( MvRequest& );
+    virtual void DrawTask ();    // Ask the server to draw me
+    virtual bool CheckDrawTask(); // Check if there is any task to be performed
+
+	// Methods for Inserting and Removing Children
+        // Inserts a new child in the tree hierachy
+        // Fails if the object is a leaf
+        virtual void Insert (Presentable* p);
+
+        // Remove an existing child from the tree hierarchy
+        // Fails if the object is a leaf
+        virtual void Remove (Presentable* p);
+
+	virtual void CreateReply ( MvRequest& ) {}
+
+	// Dealing with Drop
+	virtual void Drop ( PmContext& context );
+	virtual void DropSimulate ( PmContext& context );
+
+	// Dealing with observers
+	void NotifyObservers();
+
+#if 0
+        // Recursively copies children and attachments to new SuperPage hierarchy
+	virtual void DuplicateChildren(const Presentable&);
+
+
+	// Close All Windows Associated With a Presentable
+	virtual void Close();
+#endif
+
+	// Zoom methods
+//	virtual void ZoomRequest ( const Location&  ) {}
+	virtual void ZoomRequest ( int, const Location&  ) {}
+	virtual void ZoomRequest ( int, const string&  ) {}
+	virtual void ZoomRequest ( int, int  ) {}
+	virtual void ZoomInfo(int&, int&) {cout << "Should not be here" << endl;}
+
+    // Layer methods
+    virtual bool UpdateLayerTransparency  ( int, int )  { return false; }
+    virtual bool UpdateLayerVisibility    ( int, bool ) { return false; }
+    virtual bool UpdateLayerStackingOrder ( ) { return false; }
+
+	// Replace the geographical area
+	//virtual void  ReplaceArea ( const Location&  ) {}
+
+#if 0
+	// Update the view based on a magnification
+	virtual void  MagnifyRequest ( const Location&  ) {}
+
+	virtual void  InputCoordinates ( const Location&, int ) {}
+
+	virtual void  ExecuteToolPlusPointScript ( const Location& ) {}
+
+	virtual void  ExecuteToolPlusAreaScript ( const Location& ) {}
+
+	virtual void SetInputPresentableId ( int ) {}
+
+	// Methods used in relation to Printing actions
+	// Printing the presentable
+	virtual void  Print();
+
+	// Preview the printing
+	virtual void  PrintPreview();
+
+	// Methods in relation to User Preferences 
+	virtual Preferences& GetPreferences()
+		{ return myParent_->GetPreferences(); }
+
+	// Setup the preferences according to the desired user setup
+	virtual void  EditPrinterPreferences () {}
+
+        // Edit the interface preferences
+	virtual void  EditInterfacePreferences() {}
+
+
+        // Edit the map preferences
+	virtual void  EditMapPreferences() {}
+
+        // Edit the coast preferences
+	virtual void  EditCoastPreferences() {}
+
+	// Methods associated with the callbacks on the user interface
+	virtual void  SetCursorType ( CursorType ) {}
+	virtual void  SetInputType  ( InputType ) {}
+
+	virtual void  PostMessage ( const char*, const char* ) {}
+
+	virtual void  PrintJob () {}  //D Remove later
+	virtual void  PrintJob ( string& ) {}
+
+	virtual void  Undo();
+	virtual void  Redo();
+	virtual void  Reset();
+
+	virtual void  StartMapEditor() {}
+
+	virtual void  SaveView() {}
+
+	virtual void  OKCallback () {}
+
+	virtual void  SelectProjection ( int, double  = 0.0 ) {}
+
+	virtual void  MouseMode () {}
+
+	virtual void ChangeFontType ( bool ) {}
+
+	// Methods associated with  scrolling
+	virtual bool CanGotoNext() { return false; }
+	virtual bool CanGotoPrevious() { return false; }
+	virtual bool CanScroll();
+
+	virtual void GotoNext(bool  = false) {}
+	virtual void GotoPrevious(bool  = false) {}
+
+	virtual void GotoFirst() {}
+	virtual void GotoLast() {}
+
+	virtual bool CanChangeGeography() { return false; }
+
+        virtual void ScrollByScreen(bool) {}
+
+	// Dealing with Contents
+	virtual Cached Name();
+	virtual Cached Class();
+	virtual Cached SuperPageName();
+
+	virtual Cached Type() { return Cached("Presentable"); }
+
+	// Generates a Request for all data contained in the presentable's branch
+	virtual MvRequest  ContentsRequest ();
+
+	// Visit my children and find their information
+	virtual void ChildrenContents( MvRequest& request );
+	
+	// Include my own contents in the request
+	virtual void IncludeContents ( MvRequest& request );
+
+	// Show a contents visitor
+	// Set or get the data unit from contents.
+	virtual void ContentsDataUnit( int ) { }
+        virtual int ContentsDataUnit() { return 0; }
+#endif
+
+    // Dealing with Contents
+    virtual string MacroPlotIndexName(bool = false) { return ""; }
+          //	{ return myParent_->MacroPlotIndexName(useIndex);}
+    virtual void contentsRequest( MvRequest& ) {}
+
+	virtual string Name();
+	virtual string MacroName();
+
+    // Flag indicanting if drop came from Contents Window
+    virtual void DropShouldStay( bool ) { }
+	virtual bool DropShouldStay() { return false; }
+
+    // Register to draw trailer later
+    virtual void RegisterDrawTrailer () {}
+
+	// Remove from tree structure, not database
+	virtual void RemoveIcon ( MvIcon& ) {}
+	virtual void RemoveMyData ();
+	virtual void RemoveAllData () {}
+	virtual void RemoveAllDataChildren ();
+
+#if 0
+	virtual void RemoveMyVisDef (const MvRequest* req=0);
+	virtual void RemoveMyVisDef (MvIconList&, const MvRequest* req=0);
+	virtual void RemoveAllVisDef ();
+	virtual void RemoveAllVisDefChildren ();
+	virtual void RemoveMyPText ();
+	virtual void RemoveAllPText ();
+	virtual void RemoveAllPTextChildren ();
+#endif
+
+	// Dealing with Macro
+	// Create Macro code from the Display Window
+	virtual void GenerateMacro ( ) { }
+
+	// Generate a description of the presentable
+	virtual void DescribeYourself ( ObjectInfo&   ) {}
+
+	// Describe the drops (data units and visdefs)
+	virtual void DescribeDrops ( ObjectInfo& myDescription, MacroVisDefMap &vdMap );
+
+#if 0
+	// Save your contents to a request
+	virtual void Save () {}
+
+	virtual void SaveMap () {}
+
+	// Save the contents of your children
+	virtual void SaveChildren ();
+
+        // Update a visdef request for all children. Overridden if needed.
+        virtual void UpdateVisDef(MvRequest &) {}
+
+        // Remove visdef ( or part of it ) for all children. Overridden if needed.
+        virtual void RemoveVisDef(const char *) {}
+#endif
+
+	// Methods for Handling the Children and the Father
+	const Presentable* Parent() const
+		{ return myParent_; }
+
+     void Parent( Presentable* pp ) 
+          { myParent_ = pp; }
+
+	// Return number of children
+	int NrOfChildren() const { return childList_.size(); }
+
+	// Update list of childeren in case of changes ( ie from contents).
+//	virtual void UpdateChildList () {}
+
+	// Methods which traverse the tree hierarchy
+        // Finds a sub-branch of the tree hierarchy whose
+        // top node has the same ID as "treeNodeId"
+	Presentable* FindBranch (const int treeNodeId) const;
+
+	// Finds a sub-branch of the tree hierarchy whose
+	// top node has a View specified by "viewName"
+	Presentable* FindBranch (string viewName);
+
+	// Finds a sub-branch of the tree hierarchy whose
+	// top node has a request specified by "requestName"
+  	void FindBranchesByRequest(string requestName,vector<Presentable*>& presVec);
+
+        // Finds the superpage associated to a presentable
+	virtual Presentable* FindSuperPage () const;
+
+	// Methods used for Matching
+
+	// Indicates that the presentable (or one of its
+	// children) is on a tree branch with dataObjects
+//	virtual void DataInserted();
+
+	// Indicates that the presentable contains no dataObjects
+//	virtual void DataRemoved();
+
+	// Informs if the presentable has a dataObject
+	virtual bool HasData();
+
+	// Informs if the presentable has a child with a dataObject
+	virtual bool ChildHasData();
+
+         // Indicates that a presentable is not matched
+	virtual void NotMatched()
+		{ hasMatch_ = false; }
+
+	// Indicates that a match has been found for the presentable
+	virtual void MatchFound()
+		{ hasMatch_ = true; }
+
+	// Retrives the information about the object's matching
+	virtual bool HasBeenMatched()
+		{ return hasMatch_; }
+
+	// Initializes all of the presentables' children 
+	// to be un-matched (to be used in the beginning of
+	// the matching procedure)
+	virtual void InitMatching();
+
+	// Indicates a reference matching info for the presentable
+	virtual void SetMatchingInfo(const MatchingInfo& dataInfo)
+		{ matchingInfo_ = dataInfo; }
+
+	// Retrive the matching info associated with the treeNode
+	virtual const MatchingInfo& GetMatchingInfo() const
+		{ return matchingInfo_; }
+
+	// Methods used for Drawing
+       // Draws the data
+//        virtual void DrawData () {}
+
+    // Draws the presentable's children
+    virtual void DrawChildren ();
+
+    // Store the Layer info
+    virtual void DrawLayerInfo ( const int );
+
+#if 0
+	// Draw the background (ask my view to do it )
+	virtual void DrawBackground ( Canvas& , bool = false ) {}
+
+	// Draw the foreground (ask my view to do it )
+	virtual void DrawForeground ( Canvas& , bool = false ) {}
+
+//D	virtual void DrawFrame ( Canvas&  ) {}
+	// Draw the frame (ask my view to do it )
+	//  
+
+	// Draw the frame (ask my view to do it )
+	virtual void DrawNewPage ( Canvas&  ) {}
+#endif
+
+	virtual void DrawText ( ) {}
+
+	virtual int PageIndex();
+
+	virtual int PaperPageIndex() const;
+	virtual void PaperPageIndex ( int );
+
+	virtual bool PrintAll () { return false; } 
+	virtual void PrintAll ( bool ) {} 
+
+	virtual int PaperPageNumber ( int ) { return -1; }
+
+        virtual void DrawDataVisDef() {}
+
+	virtual void EraseDraw ( int  = 0 ) {}
+	virtual void EraseDefaultDraw ();
+
+//        virtual void RetrieveTitleFromMagics( MvIcon& ) {}		
+
+	// Dealing with DrawingArea, return from Page or EditMapPage
+//	virtual Location GetDrawingArea ();
+//	virtual void SetDrawingArea ( Location );
+
+	// Methods which access the MvIconDataBase
+        // This method is used to retrieve a valid visdef.
+	// It is called when there are no visual definitions
+	// associated to a data unit. If last arg is GETBYDATAUNIT,
+        // the first arg is interpreted as a dataunit class.
+        // If last arg is GETBYVISDEF, first arg is the visdef class to retrive.
+        virtual bool DefaultVisDefList (const char* className, 
+					MvIconList& visdefList,
+					int type = GETBYDATAUNIT);
+
+        // Overridden by Page/SubPage
+        virtual bool CheckValidVisDef(MvIcon &,MvRequest&)
+		{ return true; }
+
+	// Retrieve the Text list associated to the node
+	virtual void RetrieveTextList ( MvIconList& );
+
+	// Retrieve the Text Title list associated to the node
+	virtual bool RetrieveTextTitle ( MvIconList& );
+
+	// Retrieve the PText list - type annotation - associated 
+	// to the PlotMod
+	virtual bool RetrievePTextAnnot ( MvIconList& ptList );
+
+	// Retrieve the Legend associated to the tree
+	virtual bool RetrieveLegend ( MvIcon& );
+
+	// Retrieves the icon database associated to the
+	// tree branch (normally, a superpage)
+	virtual MvIconDataBase& IconDataBase() const
+		{ return myParent_->IconDataBase(); }
+
+	//  Dealing with Devices and GraphicsEngine
+//	virtual Device&          GetDevice () const ;
+	virtual GraphicsEngine& GetGraphicsEngine() const;
+	virtual PlotModView& GetView() const;
+//	virtual bool FindView(string viewName)
+//		{ return false; }
+
+	// Dealing with Canvas
+	virtual Canvas& GetCanvas() const ;
+	virtual void    SetCanvas ( Canvas * ) {}
+	virtual bool    HasCanvas()
+		{ return false; }
+//	virtual CanvasList GetCanvases ();
+
+	// Dealing with Magnify, to be override in child class MagnifyPage
+//	virtual Canvas* GetOwnerCanvas()
+//		{ return 0; }
+
+//	virtual int     MagFactor ()
+//		{ return 1; }
+
+	// Dealing with Printing
+	virtual void PendingDrawingsAdd();
+	virtual void PendingDrawingsRemove();
+	virtual bool PendingDrawings()
+		{ return  (  pendingDrawings_ != 0 ); }
+
+
+//	virtual bool DrawingIsFinished();
+//		{ return  (  pendingDrawings_ == 0 ) && 
+//			  (  hasNewpage_  == true  ); }
+
+	virtual void HasReceivedNewpage( bool flag)
+	     { hasNewpage_ = flag; }
+
+	virtual bool HasReceivedNewpage()
+	     { return hasNewpage_; }
+
+// Save title information
+//	virtual void SaveTitle ( MvRequest& ) {}
+
+	// Dealing with DeviceData
+	DeviceData* ReleaseDeviceData ( );
+	void        SetDeviceData ( DeviceData* devdata );
+	DeviceData* GetDeviceData() const
+		{ return deviceData_.get(); }
+
+	virtual void Visit ( Visitor& v )
+		{ VisitChildren ( v ); }
+
+	void VisitChildren ( Visitor& v );
+
+	// Set/Get the location for the presentable
+        virtual void SetLocation ( Location pos )
+		{ myLocation_ = pos; }
+
+	Rectangle GetLocation ( )
+		{ return myLocation_; }
+
+//	virtual void UpdateWidget ( MvRequest& , const int, int& ) {}
+
+	// Members and Object Information
+//	virtual bool IsSuperPage()
+//		{ return (myRequest_.getVerb() == PLOTSUPERPAGE); }
+
+	// true : presentable is visible and will be drawn
+        // false: presentable is not visible
+	virtual bool IsVisible()
+		{ return isVisible_; }
+
+	// Set the visibility for the presentable
+	virtual void SetVisibility ( bool visibility )
+		{ isVisible_ = visibility; }
+	
+	// Returns the object's unique identification
+	int Id() const { return presentableId_ ; }
+
+	virtual long PictureId(const char *, bool = false)
+		{ return 0; }
+
+	virtual PaperSize GetChildSize ( Presentable& );
+
+	virtual PaperSize GetMySize()
+		{ return myParent_->GetChildSize ( *this ); }
+
+        virtual void NeedsRedrawing(bool yesno)
+		{ needsRedrawing_ = yesno; }
+
+        virtual bool NeedsRedrawing()
+		{ return  needsRedrawing_; }
+
+#if 0
+	virtual ZoomStacks* GetZoomStacks()
+		{ return 0; }
+
+	virtual void SetWidgetSensitive ( const char*, bool ) {}
+
+	void  InAnimation ( bool inAnimation )
+		{ inAnimation_ = inAnimation; }
+
+	bool InAnimation ()
+		{ return inAnimation_; }
+
+	// Update SuperPage's size
+	virtual void SetMySize ( double, double ) {}
+
+	// Update Page's size
+	virtual void SetPageSize ( double, double, double, double ) {}
+#endif
+
+	// Set the projection associated to the canvas
+	virtual void SetProjection ( const MvRequest& ) {}
+
+//	virtual bool HasProjection()
+//		{ return false; }
+
+	virtual bool CanDoZoom()
+		{ return false; }
+
+//	virtual PmProjection* GetProjection()
+//		{ return 0; }
+
+	virtual void SetDrawPriority( MvRequest& ) {}
+
+	virtual DrawingPriority& GetDrawPriority ();
+
+	// Indicate//determine whether a page is visited in background
+	virtual bool VisitInBackground() { return false; }
+	virtual void VisitInBackground(bool ) {}
+
+	virtual bool RemoveData()
+		{ return removeData_; }
+
+	virtual void RemoveData( bool yesno )
+		{ removeData_ = yesno; }
+
+	// Used to indicate Contents drop on a window
+	bool DroppedHere () { return droppedHere_; }
+	void DroppedHere ( int Id ) { droppedHere_ = ( Id == presentableId_ ); }
+
+	virtual void InsertPText ( MvRequest& textRequest );
+	virtual void InsertLegend ( const MvRequest& legRequest );
+	virtual Page* InsertOnePage ( MvRequest& )
+		{ cout << "Should not be here" << endl; return 0; }
+
+//U	virtual void EraseForeDraw () {}
+
+        // Sets redrawing flags and does AddTask if needed
+        virtual void RedrawIfWindow(int = 0) {}
+
+//	virtual void SetBackgroundDraw ( bool  ) {}
+
+//	virtual bool GetBackgroundDraw ()
+//		{ return 0; }
+
+//	virtual int GetProjectionId ()
+//		{ return 0; }
+
+	virtual void DataUnit(MvIcon&) {} 
+
+	// Dealing with Export plotting
+	virtual bool ExportPlot ( MvRequest* ) { return false; }
+
+	// Dealing with Print plotting
+	virtual void PrintFile ( MvRequest& ) { }
+
+	virtual void SetRequest(const MvRequest & );
+
+	// Dealing with rebuilding the visualization tree
+	void Refresh ( bool refresh ) { refresh_ = refresh; }
+	bool Refresh () { return refresh_; }
+
+protected:
+
+        bool DescribeVisDefList( ObjectInfo &myDescription,
+				 MvIconList& visdefList,MvIcon &du,
+				 Cached &listDrops, bool addToDrops,
+				 MacroVisDefMap & vdMap);
+
+	// Members
+	static int treeNodeCounter_;	// used to obtain unique Id
+	MvRequest myRequest_;		// request used to build me
+	int presentableId_;			// unique Id
+	Presentable* myParent_;		// next level up on the tree
+	auto_ptr <DeviceData > deviceData_;	// information on the device
+	Location myLocation_;       	// position of the presentable
+
+	// Definition for the tree hierarchy of the Presentable class
+	typedef list <Presentable* > MvChildList;
+	typedef list <Presentable* >::iterator MvChildIterator;
+	typedef list <Presentable* >::const_iterator MvChildConstIterator;
+
+	MvChildList childList_;		// list of children
+	bool hasMatch_;			// indicates that a object has been matched
+	MatchingInfo matchingInfo_;	// matching information
+
+	bool isVisible_;			// indicates if the presentable is visible
+
+	bool hasNewpage_;			// indicates if the presentable
+							// has received a newpage directive
+
+	int pendingDrawings_;		// number of pending drawings
+	bool needsRedrawing_;		// Needed when scrolling to find out 
+							// if presentable needs redrawing
+
+//        bool                    inAnimation_;
+
+	bool removeData_;			// To be used when removing icons
+							// True if data is to be removed
+							// False removes data drawing only
+
+	bool hasDrawTask_;			// Used to indicate if the presentable
+							// has been put in the Task list to be drawn
+
+	bool droppedHere_;			// indicates if Contents Drop was
+							// done in this window
+
+	bool refresh_;				// tag to rebuild/not the visualization tree
+
+private:
+
+	// No copy allowed
+	Presentable& operator=(const Presentable&);
+
+	// Observer
+	set<PresentableObserver*> observers_;
+//	bool dying_;
+
+	friend class PresentableObserver;
+
+	void Add(PresentableObserver*);
+	void Remove(PresentableObserver*);
+};
+
+#endif
diff --git a/src/uPlot/Root.cc b/src/uPlot/Root.cc
new file mode 100644
index 0000000..05dc79f
--- /dev/null
+++ b/src/uPlot/Root.cc
@@ -0,0 +1,244 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File Root.CC
+// Gilberto Camara and Fernando Ii - ECMWF Mar 97
+
+#include "Root.h"
+
+#include <Assertions.hpp>
+#include "MagPlusService.h"
+#include "ObjectList.h"
+#include "PlotMod.h"
+#include "Task.h"
+
+Root* Root::rootInstance_;
+
+Root::Root() 
+{
+	install_exit_proc(Root::ServerDead,0 );
+}
+
+void Root::ServerDead(int, void *)
+{
+	delete rootInstance_;
+}
+
+Root& Root::Instance()
+{
+	return *rootInstance_;
+}
+
+bool
+Root::DefaultVisDefList (const char* className, MvIconList& visdefList, int type)
+{
+	// Pre-condition
+	require (visdefList.size() == 0); // visdefList should be empty
+	require (className != 0);
+
+	// Find out the name of the default VisDef(s)
+	// associated to the data unit
+	string str;
+	if ( type == GETBYVISDEF )
+	  	str = className;
+	else
+	    	str = ObjectList::DefaultVisDefClass ( className );
+
+     // Add all default visdefs to the list
+     size_t ip1,ip2,ip;
+     ip1 = 0;
+     do
+     {
+          // Get visdef name
+          ip = str.find('/',ip1);
+          ip2 = ( ip != string::npos ) ? (ip - ip1) : ip;
+          string str1 = str.substr(ip1,ip2);
+          ip1 = ip2+1;
+
+          // Create default visdef
+          MvRequest visdefRequest = ObjectList::UserDefaultRequest ( str1.c_str() );
+
+          // Now we have all the information to create the VisDef
+          // Create the visdef
+          MvRequest expandedRequest = ObjectList::ExpandRequest ( visdefRequest, 0  );
+          Cached name = ObjectList::Find("object",str1.c_str(),"default_name");
+          expandedRequest( "_NAME" )  = Cached("<") + name + Cached(">");
+          expandedRequest( "_CLASS" ) = str1.c_str();
+          expandedRequest("_DEFAULT") = true;
+          MvIcon newVisDef ( expandedRequest );
+
+          // Insert the visdef into the list
+          visdefList.push_back(newVisDef);
+
+     } while (ip != string::npos);
+
+	// Post-condition
+	ensure(visdefList.size() >= 1);
+
+	return true; // Using default
+}
+
+bool Root::RetrieveTextTitle ( MvIconList& textList )
+{
+	// Initialises the text request with an empty ptext
+        // this is used to plot the default text
+	MvRequest textRequest( "MTEXT" );
+//	MvRequest expandedRequest = ObjectList::ExpandRequest(textRequest,EXPAND_DEFAULTS);
+
+	Cached name = ObjectList::Find("object","MTEXT","default_name");
+	textRequest( "_NAME" )  = Cached("<") + name + Cached(">");
+	textRequest( "_CLASS" ) = Cached("MTEXT");
+	textRequest("_DEFAULT") = true;
+
+	// Insert the ptext into the list
+	MvIcon newText ( textRequest,true );
+	textList.push_back( newText );
+
+	ensure(textList.size() > 0);
+
+	return true; // Using default
+}
+
+bool Root::RetrieveLegend ( MvIcon& legIcon )
+{
+    // Initialises the legend request with an empty legend
+    // this is used to plot the default legend
+    MvRequest legRequest( "MLEGEND" );
+
+    const char* defName = ObjectList::Find("object","MLEGEND","default_name");
+    string name = "<";
+    name += defName;
+    name += ">";
+    legRequest( "_NAME" )  = name.c_str();
+    legRequest( "_CLASS" ) = "MLEGEND";
+    legRequest("_DEFAULT") = true;
+
+    // Copy the default request to the icon.
+    // Make sure that the icon has an ID; otherwise, create a new one.
+    if ( legIcon.Id() )
+        legIcon.SaveRequest(legRequest,true);
+    else
+    {
+        MvIcon auxIcon(legRequest,true);
+        legIcon = auxIcon;
+    }
+
+    return true; // Using default
+}
+
+Presentable* Root::FindSuperPage( int index )
+{
+	Presentable* sp = 0;
+	int nr = NrOfChildren();
+
+     // Indicate to build a new superpage
+     if ( HasReceivedNewpage() || nr == 0 || index > (nr-1) )
+	{
+          HasReceivedNewpage(false);
+		return sp;
+	}
+
+     // Negative index indicates to get the last superpage
+     MvChildIterator ii = childList_.begin();
+     int idx = (index < 0 ) ? nr-1 : index; 
+	for (int i = 0; i < idx; ++i, ++ii);
+
+     sp = (*ii);
+	
+	return sp;
+}
+
+void Root::Clean()
+{
+     // Delete all children
+     MvChildIterator child = childList_.begin();
+     while ( child != childList_.end() )
+     {
+          // Before deletion, make the parent point to NULL
+          // This is necessary because otherwise the top
+          // statement would generate a recursive call
+          (*child)->Parent(0); //Don't get called back
+
+          // Create a temporary pointer to store the child's address
+          Presentable* pt = (*child);
+
+          // Remove the child from the list
+          childList_.erase(child++);
+
+          // Ok, now the child's parent points to NULL and we can 
+          // safely call the child's destructor
+          delete pt;
+     }
+}
+
+void Root::AddDrawTask()
+{
+     if (  !this->HasDrawTask () )
+     {
+          AddTask( *(Presentable*)this, &Presentable::DrawProlog );
+          AddTask( *(Presentable*)this, &Presentable::Draw );
+          AddTask( *(Presentable*)this, &Presentable::DrawTrailer );
+          this->HasDrawTask ( true );
+     }
+}
+
+bool Root::CheckDrawTask()
+{
+   if (  this->HasDrawTask () )
+      return true;
+
+   // Check if any children has some task to be performed
+   MvChildIterator child;
+   for ( child = childList_.begin(); child != childList_.end(); ++child )
+      if ( (*child)->CheckDrawTask() )
+         return true;
+
+   return false;
+}
+
+void Root::DrawTask ()
+{
+   // Check if there is something to be drawn
+   if ( this->CheckDrawTask() )
+   {
+      this->AddDrawTask();
+      TaskBase::Flush();
+   }
+}
+
+void Root::DrawTrailer()
+{
+     // Nothing to be drawn
+     if (  !this->HasDrawTask () )
+          return;
+
+     // First request indicates if the visualization tree needs to be rebuilt
+     MvRequest fullReq;
+     if ( this->Refresh() )
+          fullReq += MvRequest("REFRESH");
+     else
+     {
+          fullReq += MvRequest("CLEAR");
+          this->Refresh(true);
+     }
+
+     // Second request are the output devices
+     fullReq += PlotMod::Instance().OutputFormat()("OUTPUT_DEVICES");
+
+     // Get children requests
+     MvChildIterator child;
+     for ( child = childList_.begin(); child != childList_.end(); ++child )
+          (*child)->DrawTrailer(fullReq);
+
+     // Call MAGICS to process the request
+     MagPlusService::Instance().SetRequest ( fullReq );
+
+     // Reset the draw task
+     this->HasDrawTask ( false );
+}
diff --git a/src/uPlot/Root.h b/src/uPlot/Root.h
new file mode 100644
index 0000000..0ccf3d9
--- /dev/null
+++ b/src/uPlot/Root.h
@@ -0,0 +1,117 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Root
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a concrete Root class for the page hierarchy in PlotMod.
+//  The Root class is an example a Component class 
+//  of the Composite "pattern".
+//
+//  It is also implemented as a Singleton, since there is only one
+//  copy of the Root object available to the clients
+//
+// .DESCRIPTION:
+//
+//  The objects of this class lie at the root of the page hierarchy 
+//  in PlotMod, and provide the defaults for all actions related 
+//  to visualisation and plotting
+//
+//  The Root object contains a copy of METVIEW's Object List and
+//  a map which associates each DataUnit to its default VisDef
+//
+//  The ObjectList is an object which is read
+//  from the METVIEW general description file
+//  (located in $METVIEW_DIR/etc/ObjectList).
+//
+//  The DataUnitVisDefMap is an associative map
+//  which contains, for each class of DataUnit,
+//  the corresponding VisDef class.
+//
+//
+// .DESCENDENT:
+//
+//
+// .RELATED:
+//  PlotMod, DataObject, SuperPage,
+//  Builder, Visitor, Device, DataUnit, VisDef
+//
+// .ASCENDENT:
+//  Presentable
+//
+#ifndef Root_H
+#define Root_H
+
+#include "Presentable.h"
+
+class Root : public Presentable {
+
+public:
+
+	// Access Point to the Root's single instance
+	static Root& Instance();
+
+        // Create the instance
+        static void Create() { if ( rootInstance_ == 0 ) rootInstance_ = new Root(); }
+
+        // Destructor
+        ~Root() { }
+
+        // Cleanup function
+        static void ServerDead(int, void *);
+
+	// Methods
+        // Overriden from Presentable class
+        // Returns the default visdef list for the data unit or visdef name
+	virtual bool DefaultVisDefList (const char* className, MvIconList& visdefList, int type);
+
+	// Returns the default ptext list - type title
+	virtual bool RetrieveTextTitle ( MvIconList& ptextList );
+
+	// Returns the default (empty) ptext list - type annotation
+	virtual bool RetrievePTextAnnot ( MvIconList&  )
+		{return false;}
+
+	// Returns the default legend
+	bool RetrieveLegend ( MvIcon& legIcon );
+
+	// Returns the superpage 
+	Presentable* FindSuperPage (int index=-1);
+
+	// Clean the structure and release memory
+	void Clean();
+
+     // Notify the server to draw me later
+     void AddDrawTask();
+
+     // Check if there is a task to be performed
+     bool CheckDrawTask();
+
+     // Ask the server to draw me
+     void DrawTask ();
+
+     // Draw the presentable
+     void DrawTrailer();
+
+protected:
+	// Constructors
+	Root();
+
+private:
+	static Root* rootInstance_;
+	Root(const Root&);
+	Root& operator=(const Root&);
+};
+
+#endif
diff --git a/src/uPlot/SatelliteProjection.cc b/src/uPlot/SatelliteProjection.cc
new file mode 100644
index 0000000..04b6ddb
--- /dev/null
+++ b/src/uPlot/SatelliteProjection.cc
@@ -0,0 +1,278 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "SatelliteProjection.h"
+
+// =============================================================
+// class SatelliteProjectionFactory - builds Satellite projections
+
+class SatelliteProjectionFactory : public PmProjectionFactory
+{
+	virtual PmProjection* Build( const MvRequest& reqst )
+		{ return new Satellite ( reqst ); }
+
+public:
+	SatelliteProjectionFactory() : PmProjectionFactory("SPACEVIEW") {}
+};
+
+
+// Instance of which is loaded in the "factory"
+static SatelliteProjectionFactory satelliteProjectionFactoryInstance;
+ 
+//=====================================================================
+//
+// SATELLITE projection
+//
+//
+Satellite::Satellite ( const MvRequest& request ):
+	PmProjection ( request )
+{
+	// Original parameters used by INPE's satellite projection
+	// These parameters come from the GRIB documentation
+
+	// These values are scaled by 10**3 in the GRIB file
+	SPlo0 = request ( "SUBPAGE_MAP_SUB_SAT_LONGITUDE" );
+	SPla0 = request ( "SUBPAGE_MAP_SUB_SAT_LATITUDE"  );
+	SPyaw = request ( "SUBPAGE_MAP_GRID_ORIENTATION"  );
+
+	SPlo0 *= DEG_TO_RAD * SCALE_THSD;
+	SPla0 *= DEG_TO_RAD * SCALE_THSD;
+	SPyaw *= DEG_TO_RAD * SCALE_THSD;
+
+	// This value is scaled by 10**6 in the GRIB file
+	SPrs  = request ( "SUBPAGE_MAP_CAMERA_ALTITUDE"   );
+	SPrs *= Prd * SCALE_MILLION;
+
+	SPis  = request ( "SUBPAGE_MAP_SUB_SAT_Y" );
+	SPjs  = request ( "SUBPAGE_MAP_SUB_SAT_X" );
+
+	double diay = request ( "SUBPAGE_MAP_X_EARTH_DIAMETER");
+	double diax = request ( "SUBPAGE_MAP_Y_EARTH_DIAMETER");
+
+	SPri  = 2. * asin( Prd/SPrs ) / diay;
+	SPrj  = 2. * asin( Prd/SPrs ) / diax;
+
+	SPscn = request ( "MAP_SCANNING_MODE");
+
+	// Additional parameters used at ECMWF
+	SProw0   = request ( "SUBPAGE_MAP_INITIAL_ROW"         );
+	SPcol0   = request ( "SUBPAGE_MAP_INITIAL_COLUMN"      );
+
+	SPnrows  = request ( "INPUT_IMAGE_ROWS"        );
+	SPncols  = request ( "INPUT_IMAGE_COLUMNS"     );
+
+	SPglobal = request ( "IMAGE_SUBAREA_SELECTION" );
+
+	if ( request ( "IMAGE_SUBAREA_SELECTION" ) == Cached ( "ON" ) )
+	{
+    		Point inGeo ( (double) request ( "SUBPAGE_MAP_CENTRE_LONGITUDE" ),
+			      (double) request ( "SUBPAGE_MAP_CENTRE_LATITUDE"  ) );
+		inGeo.x ( inGeo.x () * DEG_TO_RAD );
+ 		inGeo.y ( inGeo.y () * DEG_TO_RAD );
+		Point centerInProj = this->LL2PC ( inGeo );
+
+    		inGeo.x ( (double) request ( "SUBPAGE_MAP_CORNER_LONGITUDE" ) );
+		inGeo.y ( (double) request ( "SUBPAGE_MAP_CORNER_LATITUDE"  ) );
+		inGeo.x ( inGeo.x () * DEG_TO_RAD );
+ 		inGeo.y ( inGeo.y () * DEG_TO_RAD );
+		Point topRightInProj = this->LL2PC ( inGeo );
+		
+		Point botLeftInProj ( 2.0 * centerInProj.x () - topRightInProj.x (),
+				      2.0 * centerInProj.y () - topRightInProj.y () );
+
+      		Location projCoord ( topRightInProj.y (),
+				     botLeftInProj.x  (),
+				     botLeftInProj.y (),
+				     topRightInProj.x () );
+
+		// Store the projection coordinates for later use
+		projCoord_ = projCoord;
+
+		geodCoord_ = this->LatLongTransf ( projCoord );
+	}
+	else
+		this->CalculateProjectionCoord ();
+}
+
+/************************************************************************
+		GEODETIC COORDINATES TO SATELLITE PROJECTION
+*************************************************************************/
+Point
+Satellite :: LL2PC(Point& ptll)
+{
+	double equad, n, x, y, z, sn, dp, dl,xlo,yla,lin,col,resx,resy;
+	double x1, x2, a, b, c,  Rd2, Rm, Rm2, Rs2, v;
+
+	xlo = (double)ptll.X();
+	yla = (double)ptll.Y();
+
+	// Cartesian geocentric coordinates
+	xlo = xlo - SPlo0;
+	yla = yla - SPla0;
+	equad = 2.*Pflt - pow(Pflt,(double)2);
+	n = Prd/sqrt((double)1-equad*pow(sin(yla),(double)2));
+	x = n*cos(yla)*cos(xlo);
+	y = n*cos(yla)*sin(xlo);
+	z = (n*(1-equad))*sin(yla);
+ 
+	// Field of view angles
+	dp = atan(y / (SPrs - x));
+	dl = atan(z * cos(dp) /(SPrs - x));
+
+	// Visibility test
+	if ( x < 0.0 )
+	{
+		col = MAXFLOAT;
+		lin = MAXFLOAT;
+		return (Point(col,lin));
+	}
+	else
+	{
+		Rd2 = Prd * Prd ;
+		Rm  = Prd * (1 - Pflt);
+		Rm2 = Rm * Rm ;
+		Rs2 = SPrs * SPrs;
+
+		v = (tan(dp)*tan(dp)*cos(dp)*cos(dp)*Rm2)+(tan(dl)*tan(dl)*Rd2);
+		a = cos(dp)*cos(dp)*Rm2 + v;
+		b = -2.*SPrs*v;
+		c = Rs2*v-Rd2*Rm2*cos(dp)*cos(dp);
+
+		// Equation Resolution a*x**2+b*x+c=0 
+		v = (b*b) - (4.*a*c);
+		if (v < 0.0) v=0.0;
+   		x1 = (-b + sqrt(v)) / (2.*a);
+		x2 = (-b - sqrt(v)) / (2.*a);
+		if (x1 < x2)  x1 = x2;
+
+		if ( fabs(x-x1) > 1.0 )
+		{
+			col = MAXFLOAT;
+			lin = MAXFLOAT;
+			return (Point(col,lin));
+		}
+	}
+
+	// Line and column of image
+	if (SPscn == 0.) sn = 1.0;  else sn = -1.0;
+	col = (sn * dp / SPrj + SPjs );
+	lin = (-sn * dl / SPri + SPis);
+
+	// Axis rotation correction due to yaw angle
+//	col = col*cos(SPyaw) - lin*sin(SPyaw);
+//	lin = lin*cos(SPyaw) + col*sin(SPyaw);
+	resx = tan(SPrj) * (SPrs - Prd);
+	resy = tan(SPri) * (SPrs - Prd);
+
+//	return (Point(col*resx,-(lin*resy)));
+	return ( Point ( col*resx, (SPnrows-lin) * resy ) );
+}
+
+/************************************************************************
+		SATELLITE PROJECTION TO GEODETIC COORDINATES
+************************************************************************/
+Point
+Satellite :: PC2LL(Point& ptpc)
+{
+	double	dl, dp, x, y, z, x1, x2, equad, n, d, sn,
+		a, b, c,  Rd2, Rm,Rm2, Rs2,v,ptpcx,ptpcy,
+		yla,xlo,resx,resy;
+
+	resx = tan(SPrj) * (SPrs - Prd);
+	resy = tan(SPri) * (SPrs - Prd);
+//	ptpcx = (double)ptpc.X()*SPncols;
+//	ptpcy = (double)ptpc.Y()*SPnrows;
+	ptpcx = (double)ptpc.X() / resx;
+	ptpcy = SPnrows - (double)ptpc.Y() / resy;
+
+	// Axis rotation correction due yaw angle
+//	ptpcx = ptpcx*cos(SPyaw) + ptpcy*sin(SPyaw);
+//	ptpcy = ptpcy*cos(SPyaw) - ptpcx*sin(SPyaw);
+
+	// Field of view angles
+	if (SPscn == 0.) sn =  1.0;
+	else 		 sn = -1.0;
+	dl = - sn * ((ptpcy - SPis) * SPri);
+	dp =   sn * ((ptpcx - SPjs) * SPrj);
+
+	// Cartesian coordinates
+	Rd2 = Prd * Prd ;
+	Rm  = Prd * (1 - Pflt);
+	Rm2 = Rm * Rm ;
+	Rs2 = SPrs * SPrs;
+
+	v = (tan(dp)*tan(dp)*cos(dp)*cos(dp)*Rm2)+(tan(dl)*tan(dl)*Rd2);
+	a = cos(dp)*cos(dp)*Rm2 + v;
+	b = -2.*SPrs*v;
+	c = Rs2*v-Rd2*Rm2*cos(dp)*cos(dp);
+
+	// Equation Resolution a*x**2+b*x+c=0 
+	v = (b*b) - (4.*a*c);
+	if (v < 0)
+	{
+//		xlo = MAXFLOAT;
+//		yla = MAXFLOAT;
+		xlo = 90  * DEG_TO_RAD;
+		yla = 180 * DEG_TO_RAD;
+		return (Point(xlo,yla));
+	}
+
+   	x1 = (-b + sqrt(v)) / (2.*a);
+	x2 = (-b - sqrt(v)) / (2.*a);
+
+	if ( x1 >= x2)  x = x1;
+	else		x = x2;
+
+	z = (SPrs - x) * tan(dl) / cos(dp);
+	y = (SPrs - x) * tan(dp);
+
+	// Geodetic coordinates
+	equad 	= 2. * Pflt - Pflt * Pflt;
+
+	double aux = SPrs * dl / Prd;
+	if (aux > 1.0) aux = 1.0;
+	if (aux < -1.0) aux = -1.0;
+
+	yla = asin(aux);
+	
+	do
+	{
+		n= Prd/sqrt((double)1-equad*pow(sin(yla),(double)2));
+		yla = atan((z + n*equad*sin(yla))/sqrt(x*x + y*y));
+		d = Prd/sqrt((double)1-equad*pow(sin(yla),(double)2)) - n;
+	}
+	while (fabs(d) > 0.001);
+
+	xlo = atan(y/x) + SPlo0;
+	yla = yla + SPla0;
+
+	return (Point(xlo,yla));
+}
+
+void
+Satellite::CalculateProjectionCoord ()
+{
+	double resx = tan(SPrj) * (SPrs - Prd);
+	double resy = tan(SPri) * (SPrs - Prd);
+
+	Location projCoord ( SPnrows * resy,	//projUpperRight.Y(),
+			     0.0,		//projLowerLeft.X(),
+			     0.0,		//projLowerLeft.Y(),
+			     SPncols * resx );  	//projUpperRight.X() );
+
+	// Store the projection coordinates for later use
+	projCoord_ = projCoord;
+}
+
+bool
+Satellite::CheckGeodeticCoordinates (Location& area)
+{
+	area = geodCoord_;
+	return true;
+}
diff --git a/src/uPlot/SatelliteProjection.h b/src/uPlot/SatelliteProjection.h
new file mode 100644
index 0000000..15930ce
--- /dev/null
+++ b/src/uPlot/SatelliteProjection.h
@@ -0,0 +1,304 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME
+// Satellite
+//
+// .AUTHOR:
+// Ubirajara Freitas, Julio d'Alge
+//
+// .SUMMARY:
+//  Provides methods that are required to handle geostationary satellites
+//  image georeferencing.
+//
+// .DESCRIPTION:
+//  Specifies methods that are necessary to establish the relation between
+//  geodetic and image coordinates in the case of geostationary satellites,
+//  typically used for low-resolution meteorological images. The "satellite"
+//  projection uses the Hayford ellipsoid. Class Satellite also
+//  encapsulates the following important information:
+//		Sensor angular resolution or IFOV;
+//		Sub-satellite point coordinates;
+//		Radius of satellite orbit;
+//		Scanning mode;
+//		Orientation or yaw angle.
+//
+// . DESCENDENT:
+//  None
+//
+// .RELATED:
+//  Point
+//
+// .ASCENDENT:
+//  PmProjection.
+//
+// .COMMENTS:
+//  None
+//
+
+#ifndef SATELLITE_H
+#define SATELLITE_H
+
+#include "PmProjection.h"
+
+class Satellite : public PmProjection
+{
+	double		SPri;		// IFOV along y axis (rad);
+	double		SPrj;		// IFOV along x axis (rad);
+	double		SPis;		// Sub-satellite Y coordinate (m);
+	double		SPjs;		// Sub-satellite X coordinate (m);
+	double		SPla0;		// Sub-satellite latitude (rad);
+	double		SPlo0;		// Sub-satellite longitude (rad);
+	double		SPrs;		// Radius of satellite orbit (m);
+	double		SPscn;		// Scanning mode: 0 (WE/NS), 1 (SN/EW)
+	double		SPyaw;		// Orientation or yaw angle (rad).
+
+	int             SProw0;         // Image initial row
+	int             SPcol0;         // Map initial column
+	int             SPnrows;        // Input image rows
+	int             SPncols;        // Input image columns
+	int             SPgrid;         // Map Grid orientation 
+
+	Cached          SPglobal;       // IMAGE_SUBAREA_SELECTION (ON/OFF)
+
+
+public:
+	Satellite ( const MvRequest& reqst );
+//		Empty constructor.
+
+	~Satellite () {}
+//		Empty destructor.
+
+	friend 	bool operator== (Satellite& a, Satellite& b);
+//		Equality operator. Objects a and b are considered equal if
+//		their Satellite projection parameters are the same.
+//		Input:
+//			a:	Object of type Satellite;
+//			b:	Object of type Satellite.
+//		Return:
+//			TRUE:	Objects are equal;
+//			FALSE:	Objects are different.
+
+	virtual double SensorResolutionX () {return SPrj;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sensor angular resolution (IFOV)
+//		along X direction.
+//		Return:
+//			SPrj:	Sensor IFOV along X direction (rad).
+
+	virtual void SensorResolutionX (double s) {SPrj = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the sensor angular resolution (IFOV) 
+//		along X direction.
+//		Input:
+//			s: 	Sensor IFOV along X direction (rad).
+//		Precondition:
+//			s must be a valid angular resolution.
+
+	virtual double SensorResolutionY () {return SPri;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sensor angular resolution (IFOV)
+//		along Y direction.
+//		Return:
+//			SPri:	Sensor IFOV along Y direction (rad)
+
+	virtual void SensorResolutionY (double s) {SPri = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the sensor angular resolution (IFOV)
+//		along Y direction.
+//		Input:
+//			s: 	Sensor IFOV along Y direction (rad).
+//		Precondition:
+//			s must be a valid angular resolution.
+
+	virtual double SubSatelliteX () {return SPjs;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sub-satellite X coordinate.
+//		Return:
+//			SPjs:	Sub-satellite X coordinate (m)
+
+	virtual	void SubSatelliteX (double s) {SPjs = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the sub-satellite X coordinate.
+//		Input:
+//			s: 	Sub-satellite X coordinate (m)
+//		Precondition:
+//			s must be a valid X coordinate
+
+	virtual double SubSatelliteY () {return SPis;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sub-satellite Y coordinate.
+//		Return:
+//			SPis:	Sub-satellite Y coordinate (m)
+
+	virtual	void SubSatelliteY (double s) {SPis = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the sub-satellite Y coordinate.
+//		Input:
+//			s: 	Sub-satellite Y coordinate (m)
+//		Precondition:
+//			s must be a valid Y coordinate
+
+	virtual	double SubSatelliteLng () {return SPlo0;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sub-satellite longitude.
+//		Return:
+//			SPlo0:	Sub-satellite longitude (rad)
+
+	virtual void SubSatelliteLng (double s) {SPlo0 = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the sub-satellite longitude.
+//		Input:
+//			s: 	Sub-satellite longitude (rad)
+//		Precondition:
+//			s must be a valid longitude ([0,pi] or [0,-pi])
+
+	virtual double SubSatelliteLat () {return SPla0;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sub-satellite latitude.
+//		Return:
+//			SPla0:	Sub-satellite latitude (rad)
+
+	virtual void SubSatelliteLat (double s) {SPla0 = s;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the sub-satellite latitude.
+//		Input:
+//			s: 	Sub-satellite latitude (rad)
+//		Precondition:
+//			s must be a valid latitude ([0,pi/2] or [0,-pi/2])
+
+	virtual double Radius () {return SPrs;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the satellite orbit radius.
+//		Return:
+//			SPrs:	Satellite orbit radius (m)
+
+	virtual	void Radius (double r) {SPrs = r;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the satellite orbit radius.
+//		Input:
+//			r: 	Satellite orbit radius (m)
+//		Precondition:
+//			r must be a valid orbit radius
+
+	virtual double ScanMode ()  {return SPscn;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the sensor scanning mode.
+//		Return:
+//			SPscn:	Scanning mode: 0 (WE/NS), 1 (SN/EW)
+
+	virtual double Yaw () {return SPyaw;}
+//		This implementation of a pure virtual method defined in
+//		Projection returns the orientation or yaw angle.
+//		Return:
+//			SPyaw:	Orientation or yaw angle (rad)
+
+	virtual void  Yaw (double y) {SPyaw = y;}
+//		This implementation of a pure virtual method defined in
+//		Projection updates the orientation or yaw angle.
+//		Input:
+//			y: 	Orientation or yaw angle (rad)
+//		Precondition:
+//			y must be a valid orientation angle
+
+	virtual double OriginX () {return 0.;}
+//		No code.
+//		Description:
+//			Returns the image initial x coordinate. Not
+//			implemented yet.
+
+	virtual double OriginY () {return 0.;}
+//		No code.
+//		Description:
+//			Returns the image initial y coordinate. Not
+//			implemented yet.
+
+	virtual int Hemisphere () {return 0;}
+//		No code
+//		Description:
+//			Returns the hemisphere. Not implemented yet.
+
+	virtual	void Hemisphere (int) { }
+//		No code
+//		Description:
+//			Updates the hemisphere. Not implemented yet.
+
+	virtual	double OriginLatitude () {return 0.;}
+//		No code
+//		Description:
+//			Returns the latitude of origin. Not implemented yet.
+
+	virtual void OriginLatitude (double ) { }
+//		No code
+//		Description: 
+//			Updates the latitude of origin. Not implemented yet.
+
+	virtual double OriginLongitude () {return 0.;}
+//		No code
+//		Description:
+//			Returns the longitude of origin. Not implemented yet.
+
+	virtual	void OriginLongitude (double ) { }
+//		No code
+//		Description:
+//			Updates the longitude of origin. Not implemented yet.
+
+	virtual double StandardLatitudeOne () {return 0.;}
+//		No code
+//		Description:
+//			Returns the latitude of the first standard parallel.
+//			Not implemented yet.
+
+	virtual	void StandardLatitudeOne (double ) { }
+//		No code
+//		Description:
+//			Updates the latitude of the first standard parallel.
+//			Not implemented yet
+
+	virtual Point LL2PC(Point& p);
+//		This implementation of a pure virtual method defined in
+//		Projection transforms geodetic into Satellite projection
+//		coordinates.
+//		Input:
+//			p:	Geodetic coordinates (rad).
+//		Return:
+//			p:	Satellite projection coordinates (m).
+//		Preconditions:
+//			Geodetic coordinates must be a valid latitude
+//			([0,pi/2] or [0,-pi/2]) and a valid longitude
+//			([0,pi] or [0,-pi]).
+
+	virtual Point PC2LL(Point& p);
+//		This implementation of a pure virtual method defined in
+//		Projection transforms Satellite projection into geodetic
+//		coordinates.
+//		Input:
+//			p:	Satellite projection coordinates (m).
+//		Return:
+//			p:	Geodetic coordinates (rad).
+//		Preconditions:
+//			X and Y Satellite projection coordinates must be
+//			both valid, within their typical range.
+
+	virtual void CalculateProjectionCoord();
+//              Calculate the bounding box in projection coordinates
+//              (internal function )
+//              Input:
+//                    geodCoord_ : bounding box in lat/long
+//              Output:
+//                    projCoord_ : bounding box in projection coordinates
+
+	virtual bool CheckGeodeticCoordinates (Location&);
+
+	virtual double 	CheckOriginLongitude ()
+		{ return OriginLongitude (); }
+};
+
+#endif
diff --git a/src/uPlot/SimpleDecoder.cc b/src/uPlot/SimpleDecoder.cc
new file mode 100644
index 0000000..ced6b8e
--- /dev/null
+++ b/src/uPlot/SimpleDecoder.cc
@@ -0,0 +1,71 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "SimpleDecoder.h"
+#include "MatchingInfo.h"
+
+// =====================================================
+// class SimpleDecoderFactory - builds  decoders
+//
+
+class SimpleDecoderFactory : public DecoderFactory 
+{
+  // Virtual Constructor - Builds a new SimpleDecoder
+  virtual Decoder* Build ( const MvRequest& inRequest )
+    { return new SimpleDecoder ( inRequest ); }
+
+public:
+  SimpleDecoderFactory() : DecoderFactory("SimpleDecoder") {}
+};
+
+static SimpleDecoderFactory Instance;
+
+//=======================================================
+//
+// Methods for the SimpleDecoder class
+//
+SimpleDecoder::SimpleDecoder( const MvRequest& dataUnitRequest ):
+  Decoder(dataUnitRequest)
+{
+  metadataRequest_ = dataUnitRequest;
+  nextData_ = true;
+}
+
+SimpleDecoder::~SimpleDecoder()
+{
+  // Empty
+}
+
+// Read Next Data
+//
+// -- Returns true first time it's called, then false.
+bool
+SimpleDecoder::ReadNextData ()
+{
+  if ( nextData_ )
+    {
+      nextData_ = false;
+      return true;
+    }
+  else
+    return false;
+}
+
+// Create MatchingInfo
+//
+// -- Nothing meaningful to match, as we have no metadata,
+//    so just return an empty request.
+//
+MatchingInfo
+SimpleDecoder::CreateMatchingInfo ()
+{
+  MvRequest matchingRequest ("MATCHING_INFO");
+  matchingRequest( "DATA_TYPE" ) = metadataRequest_.getVerb();
+  return MatchingInfo( matchingRequest );
+}
diff --git a/src/uPlot/SimpleDecoder.h b/src/uPlot/SimpleDecoder.h
new file mode 100644
index 0000000..db0a7a1
--- /dev/null
+++ b/src/uPlot/SimpleDecoder.h
@@ -0,0 +1,67 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  SimpleDecoder
+//
+// .AUTHOR:
+//  Geir Austad
+//
+// .SUMMARY:
+//  A class for decoding data units with no metadata. 
+//
+// .CLIENTS:
+//  PlotModMatcher, Graphics Engine
+//
+// .RESPONSABILITIES:
+//  Return true first time ReadNextData is called. No matching is done.
+//
+// .COLLABORATORS:
+//
+// .BASE CLASS:
+//  Decoder
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//  The design of this class is based on the "Factory" pattern
+//  ("Design Patterns", page. 107).
+//
+//
+#ifndef SimpleDecoder_H
+#define SimpleDecoder_H 
+
+#include "Decoder.h"
+
+class SimpleDecoder: public Decoder {
+public:
+
+  // Contructors
+  SimpleDecoder ( const MvRequest& inRequest );
+
+  // Destructor
+  virtual ~SimpleDecoder();
+
+  // Overridden methods from Decoder class
+  // Returns true first time it's called
+  virtual bool ReadNextData ();
+
+  virtual MatchingInfo CreateMatchingInfo ();
+
+private:
+
+  // No copy allowed
+  SimpleDecoder(const SimpleDecoder&);
+  SimpleDecoder& operator=(const SimpleDecoder&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/SkipAction.cc b/src/uPlot/SkipAction.cc
new file mode 100644
index 0000000..c33130e
--- /dev/null
+++ b/src/uPlot/SkipAction.cc
@@ -0,0 +1,43 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "SkipAction.h"
+
+// This is the exemplar object for the Skip Action class
+static SkipAction skipActionInstance("Skip");
+
+PlotModAction& 
+SkipAction::Instance()
+{
+	return skipActionInstance;
+}
+
+// METHOD : Execute
+//
+// PURPOSE: // Skip the request and update the request without the skipped one
+void
+SkipAction::Execute ( PmContext& context )
+{
+	context.Advance(); // Skip this request
+
+	// Save the remaining requests.
+	// It will skip all the previous requests and only save the
+	// remaining ones. Usually, the skipped request is the first
+	// request, such as ODB_MANAGER and NETCDF_MANAGER. So, there
+	// will be no problems to save only the remaining requests.
+	// If this situation changes, this function.will need to be updated.
+	MvRequest remainingReqs;
+	MvRequest aux = context.InRequest();
+	while (aux)
+	{
+		remainingReqs = remainingReqs + aux.justOneRequest();
+		aux.advance();
+	}
+	context.Update(remainingReqs);
+}
diff --git a/src/uPlot/SkipAction.h b/src/uPlot/SkipAction.h
new file mode 100644
index 0000000..4bffcdf
--- /dev/null
+++ b/src/uPlot/SkipAction.h
@@ -0,0 +1,59 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  SkipAction
+//
+// .AUTHOR:
+//  Geir Austad, Fernando Ii
+//
+// .SUMMARY:
+//  Describes the SkipAction class, a derived class
+//  for the various types of requests in PlotMod which skip
+//  the processing of a request.
+//
+// .CLIENTS:
+//  PlotModAction class, called by PlotMod main module (PlotMod.cc)
+//
+// .RESPONSIBILITY:
+//  Will skip requests that PlotMod don't care about.
+//
+// .COLLABORATORS:
+//
+// .ASCENDENT:
+//  PlotModAction
+//
+// .DESCENDENT:
+//
+// .REFERENCES:
+//
+
+#ifndef SkipAction_H
+#define SkipAction_H
+#include "PlotModAction.h"
+
+class SkipAction: public PlotModAction
+{
+public:
+
+	// Constructors
+	SkipAction(const Cached& name): PlotModAction(name) {  }
+
+	// Destructor
+	~SkipAction() {}
+
+	// Methods
+	static PlotModAction& Instance();
+
+	// Overriden from Base Class (PlotModAction)
+	virtual void Execute ( PmContext& context );
+};
+
+#endif
diff --git a/src/uPlot/SubPage.cc b/src/uPlot/SubPage.cc
new file mode 100644
index 0000000..5859520
--- /dev/null
+++ b/src/uPlot/SubPage.cc
@@ -0,0 +1,756 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SubPage.cc
+// Gilberto Camara and Fernando Ii - ECMWF Mar 97
+
+#include <Assertions.hpp>
+#include <MvRequestUtil.hpp>
+
+#include "SubPage.h"
+#include "Canvas.h"
+#include "PlotModView.h"
+#include "GraphicsEngine.h"
+#include "DataObject.h"
+#include "ObjectList.h"
+
+SubPage::SubPage ( MvRequest& subpageRequest ):
+	Presentable ( subpageRequest ),
+	subpageCanvas_ (0),
+	visitInBackground_(false),
+	hasTitleDraw_(false)
+{
+	// Empty
+}
+
+SubPage::SubPage ( MvRequest&          subpageRequest,
+		   int                 dataunitId,
+		   long                offset,
+		   long                offset2,
+		   const MatchingInfo& dataInfo ):
+	Presentable        ( subpageRequest ),
+	subpageCanvas_ 	   (0),
+	visitInBackground_ ( false ),
+	hasTitleDraw_      ( false )
+{
+	// Copy the matching information
+	matchingInfo_  = dataInfo;
+
+	// Create a new DataObject
+	Presentable* dataObj = new DataObject ( dataunitId, offset, offset2, dataInfo.Request() );
+	ensure (dataObj != 0);
+	
+ 	// Insert the data object as a child of the subpage
+	this->Insert(dataObj);
+
+	// Indicate that the subpage has found a match
+	this->MatchFound();
+}
+
+SubPage::SubPage(const SubPage& old) :
+		 Presentable(old),
+		 subpageCanvas_     (0),
+  		 visitInBackground_ ( false ),
+		 hasTitleDraw_      ( false )
+{
+}
+
+SubPage::~SubPage()
+{
+	if ( subpageCanvas_ )
+	{
+		Canvas& canvas = this->GetCanvas();
+		canvas.RemovePresentableId (this->Id(), RMALL);
+	}
+}
+
+void 
+SubPage::Visit ( Visitor& v )
+{ 
+	// Implements the visitor pattern
+	// Visit me
+	v.Visit ( *this );
+}
+
+void
+SubPage::InsertDataUnit ( int dataunitId, long offset, long offset2, const MatchingInfo& dataInfo )
+{
+	// If data unit already exists -> append it.
+	DataObject* dob = 0;
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		dob = (DataObject*) (*child);
+		if ( dob->AppendDataUnit( dataunitId,offset,offset2,dataInfo.Request() ))
+			return;
+	}
+
+	// New Data Unit
+	// Create a data object which will store ONE field
+	Presentable* dataObj = new DataObject ( dataunitId, offset, offset2, dataInfo.Request() );
+	ensure ( dataObj != 0 );
+
+	// Put the data object into  the subpage
+	this->Insert ( dataObj );
+
+	// Insert the data in the the subpage IconDataBase
+	MvIconDataBase&   iconDataBase = this->IconDataBase();
+	iconDataBase.PresentableDataUnitRelation (presentableId_, dataunitId);
+
+	// Indicate that the subpage has found a match
+	this->MatchFound();
+
+	// Set the matching information
+	this->SetMatchingInfo ( dataInfo );
+}
+
+void
+SubPage::RemoveIcon ( MvIcon& icon )
+{
+	DataObject* dataObj = 0;
+	MvChildIterator child;
+	Canvas& canvas = this->GetCanvas ();
+
+	Cached verb = icon.Request().getVerb();
+	if ( ObjectList::IsVisDef ( verb ) )
+	{
+		for ( child = childList_.begin(); child != childList_.end(); ++child )
+		{
+			dataObj = (DataObject*) (*child);
+			dataObj->EraseDraw ( icon.Id() );
+		}
+		// What else??
+	}
+	else if ( ObjectList::IsDataUnit ( verb ) )
+	{
+		MvIconDataBase& iconDataBase = this->IconDataBase();
+		child = childList_.begin();
+		while (  child != childList_.end() )
+		{
+			dataObj = (DataObject*) (*child);
+
+			MvIcon dataUnit;
+			MvChildIterator foundChild;
+			iconDataBase.RetrieveDataUnit( dataObj->DataUnitId(), dataUnit);
+			if ( dataUnit.Id() == icon.Id() ||
+			     dataUnit.ParentId() == icon.Id())
+			{
+			        foundChild = child;
+				child++;
+				dataObj->EraseDraw();
+				if (myParent_->RemoveData())
+					iconDataBase.RemoveDataUnitFromPresRel ( dataUnit,this->Id() );
+//D				canvas.RemoveForAll ( this->Id (),"999TITLETEXT" );
+				if ( myParent_->RemoveData() )
+				  childList_.erase ( foundChild );
+			}
+			else
+			  child++;
+
+		}
+		// What else??
+	}
+	else if ( ObjectList::IsVisDefText ( verb ) ) 
+	{
+//		MvRequest textRequest = icon.Request();
+//		if ( textRequest ( "TEXT_TYPE" ) == Cached ( "TITLE" ) )
+		if ( verb != ANNOTATION )
+		  canvas.RemoveForAll ( this->Id (),"999TITLETEXT" );
+	}
+}
+
+bool
+SubPage::GetDrawPrior ( DrawPriorMap* drawPriorMap )
+{
+	if ( childList_.empty() )
+		return false;
+
+	DrawPriorMap::iterator j;
+
+	DataObject* dataObj = 0;
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+	{
+		dataObj = (DataObject*) (*child);
+		DrawPriorMap tmpDrawPriorMap = dataObj->DrawPriority();
+		for ( j = tmpDrawPriorMap.begin(); j != tmpDrawPriorMap.end(); ++j )
+			drawPriorMap->insert ( *j );
+	}
+	return true;
+}
+
+bool SubPage::GetDataObjects(list<DataObject*> &dolist)
+{
+	if ( childList_.empty() )
+		return false;
+
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+		dolist.push_back( (DataObject*) (*child) );
+
+	return true;
+}
+
+#if 0
+void
+SubPage::EraseDraw ( int visdefId )
+{
+  if ( visdefId == 0 ) 
+    return;
+
+  MvIconDataBase&   iconDataBase = IconDataBase();
+
+  // Call dataObject::EraseDraw for all dataobjects having 
+  // visdefs for this id.
+
+  DataObject* dataObj = 0;
+  MvChildIterator child;
+  MvIcon notused;
+
+  for ( child = childList_.begin(); child != childList_.end(); ++child )
+    {
+      dataObj = (DataObject*) (*child);
+      iconDataBase.DataUnitVisDefRelationRewind();
+      bool hasAnyVisdefs = iconDataBase.NextVisDefByDataUnitId(dataObj->DataUnitId(),
+							       notused);
+
+      if ( iconDataBase.DataUnitHasVisDef(dataObj->DataUnitId(),visdefId) ||
+	   ! hasAnyVisdefs )
+	dataObj->EraseDraw ( visdefId );
+    }
+}
+#endif
+
+void
+SubPage::Draw ()
+{
+	if ( ! ( this->IsVisible() || VisitInBackground() ) && 
+	     this->IsAWindow () )
+	{
+		HasDrawTask ( false );
+		return;
+	}
+
+	hasTitleDraw_ = false;
+	HasDrawTask ( true );
+	NeedsRedrawing ( false ); // For Animation purpose
+
+	PlotModView& view = this->GetView ();
+//	Canvas &canvas = this->GetCanvas();
+
+	// FAMI 29/09/2010 Review Paper page number algorithm
+//	int paperPageNumber = myParent_->PaperPageNumber ( this->Id() );
+#if 0  ///SYLVIE
+		if ( paperPageNumber == -1 )
+		{
+			HasDrawTask ( false );
+			return;
+		}
+		else
+		{
+			if ( paperPageNumber > myParent_->PaperPageIndex () )
+			{
+				myParent_->PaperPageIndex ( paperPageNumber );
+				this->DrawPageHeader (); // Use incremented PaperPageIndex
+			}
+		}
+#endif  //SYLVIE
+
+		// Retrieve the graphics engine
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+
+//	ge.StartPicture ( canvas, "DATA", paperPageNumber );
+     ge.StartPicture ( "DATA" );
+
+	view.DrawNewPage ();
+
+	view.DrawBackground ();
+
+	// Data drawing
+	view.Draw ( this );
+
+	view.DrawForeground ( );
+
+	// Ask my parent to draw positional text
+	myParent_->DrawText ();
+
+	// Draw title text and legend
+	this->DrawText ( );
+	this->DrawLegend ( );
+	
+	// terminate the drawing
+	ge.EndPicture ();
+
+	this->PendingDrawingsAdd();
+
+	HasDrawTask ( false );
+	VisitInBackground(false);
+}
+
+#if 0
+void
+SubPage::DrawData ()
+{
+	if ( ! ( this->IsVisible() || VisitInBackground() ) && 
+	     this->IsAWindow () )
+	{
+		HasDrawTask ( false );
+		return;
+	}
+
+	hasTitleDraw_ = false;
+	HasDrawTask ( true );
+	NeedsRedrawing ( false ); // For Animation purpose
+
+	PlotModView& view = this->GetView ();
+	Canvas &canvas = this->GetCanvas();
+//D	if ( ! this->IsAWindow () )
+	{
+		int paperPageNumber = myParent_->PaperPageNumber ( this->Id() );
+		if ( paperPageNumber == -1 )
+		{
+			HasDrawTask ( false );
+			return;
+		}
+		else
+		{
+			if ( paperPageNumber > myParent_->PaperPageIndex () )
+			{
+				myParent_->PaperPageIndex ( paperPageNumber );
+				this->DrawPageHeader (); // Use incremented PaperPageIndex
+			}
+		}
+		// Retrieve the graphics engine
+		GraphicsEngine& ge = this->GetGraphicsEngine();
+
+		ge.StartPicture ( canvas, "DATA", paperPageNumber );
+
+		view.DrawNewPage ( canvas );
+
+		view.DrawBackground ( canvas );
+	}
+//D	else
+//D	  myParent_->DrawBackground ( canvas ); 
+
+	view.Draw ( this );
+
+//D	if ( ! this->IsAWindow () )
+	{
+		view.DrawForeground ( canvas );
+
+		// Ask my parent to draw positional text 
+		myParent_->DrawText ( canvas );
+
+		// Draw title text 
+		this->DrawText ( canvas );
+
+		// Ask my parent's view to draw the frame 
+//D		view.DrawFrame ( canvas );
+	
+		// Retrieve the graphics engine
+		GraphicsEngine& ge = this->GetGraphicsEngine();
+
+		// terminate the drawing
+		ge.EndPicture ();
+
+		this->PendingDrawingsAdd();
+	}
+//D	else
+//D	  myParent_->DrawForeground ( canvas );
+
+	if ( ! PendingDrawings() )
+	  this->DrawText ( this->GetCanvas() );
+
+	HasDrawTask ( false );
+	VisitInBackground(false);
+}
+
+void
+SubPage::DrawForeground ( Canvas &, bool )
+{
+//D	if ( this->IsAWindow () )
+//D		return;
+	// Used only on PS file
+	{
+		Canvas& canvas = this->GetCanvas ();
+
+		int paperPageNumber = myParent_->PaperPageNumber ( this->Id() );
+
+		// Retrieve the graphics engine
+		GraphicsEngine& ge = this->GetGraphicsEngine();
+
+		ge.StartPicture ( canvas, "DATAFOREGROUND", paperPageNumber );
+
+		myParent_->DrawNewPage ( canvas );
+
+		PlotModView& view = this->GetView ();
+		view.DrawForeground ( canvas );
+
+		// Ask my parent to draw positional and/or user defined title text 
+		myParent_->DrawText ( canvas );
+
+		// Ask my parent's view to draw the frame 
+//D		myParent_->DrawFrame ( canvas );
+	
+		// terminate the drawing
+		ge.EndPicture ();
+
+		this->PendingDrawingsAdd();
+	}
+}
+#endif
+
+// Draw SubPage Text, i.e. Title Text Only
+void
+SubPage::DrawText ( )
+{
+#if 0 //D
+	// To avoid redrawing
+ 	if ( ! hasTitleDraw_ )
+		hasTitleDraw_ = true;
+	else
+	{
+		this->NotifyObservers ();
+		return;
+	}
+#endif
+
+	// Retrieve the texts associated to this page
+	MvIconList textList;
+	RetrieveTextList ( textList );
+
+	// Look for Title Text
+	MvRequest pageTextRequest;
+	MvListCursor vdCursor;
+	for ( vdCursor = textList.begin(); vdCursor != textList.end(); ++vdCursor)
+	{
+		MvIcon oneIcon = *( vdCursor );
+		pageTextRequest = oneIcon.Request();
+
+		// Remember: there is only one Title Text for each page
+		if ( pageTextRequest.getVerb() != ANNOTATION )
+			break;
+	}
+
+	if ( vdCursor == textList.end() )
+		return;
+
+	// Title Text found, draw the layer info
+    DrawLayerInfo( (int)pageTextRequest("_ID") );
+
+    // Draw the title
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+
+//D	MvRequest textRequest( "MTEXT" );
+//D	CopySomeParameters( pageTextRequest, textRequest, "TEXT" );
+//D	CopySomeParameters( pageTextRequest, textRequest, "LEGEND" );
+
+#if 0 //D
+		int i = 1;//     virtual void DrawTrailer();
+
+		int j = 1;
+		for ( MvChildIterator child = childList_.begin();
+		      child != childList_.end(); ++child )
+		{
+			DataObject* dataObj = (DataObject*) (*child);
+			dataObj->GetTitle  ( textRequest, &i );
+			dataObj->GetLegend ( textRequest, &j );
+		}
+#endif
+	ge.DrawText ( pageTextRequest );
+}
+
+// Draw SubPage Legend
+void
+SubPage::DrawLegend ( )
+{
+	// Retrieve the legend associated to this page
+	// It there is no legend, get a default one
+	MvIcon legIcon;
+	RetrieveLegend ( legIcon );
+
+    // Draw the layer info
+    DrawLayerInfo( legIcon.Id() );
+
+	// Draw legend
+    MvRequest legRequest = legIcon.Request();
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+	ge.DrawLegend ( legRequest );
+}
+
+#if 0
+void
+SubPage::SaveTitle (MvRequest& magicsRequest)
+{
+//cout << "SubPage::SaveTitle " << endl;
+//magicsRequest.print();
+
+	for ( MvChildIterator child = childList_.begin();
+		child != childList_.end(); ++child )
+	{
+		DataObject* dataObj = (DataObject*) (*child);
+		if ( IsParameterSet ( magicsRequest, "$METVIEW_TITLE_PACKAGE_COUNT" ) )
+		  dataObj->SetTitle ( magicsRequest );
+
+		if ( IsParameterSet ( magicsRequest, "$METVIEW_LEGEND_PACKAGE_COUNT" ) ) 
+		  dataObj->SetLegend ( magicsRequest );
+	}
+}
+#endif
+
+void
+SubPage::DrawProlog ()
+{
+	// Retrieve the graphics engine
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+	ge.DrawProlog ( );
+
+	this->PendingDrawingsAdd();
+}
+
+void
+SubPage::DrawPageHeader ()
+{
+	// Retrieve the graphics engine
+	GraphicsEngine& ge = this->GetGraphicsEngine();
+	ge.DrawPageHeader ( this->GetCanvas() );
+
+	this->PendingDrawingsAdd();
+}
+
+void
+SubPage::DrawTrailer () //CHECK IF THIS IS STILL NEEDED
+{
+	// Retrieve the graphics engine
+//	GraphicsEngine& ge = this->GetGraphicsEngine();
+//?	ge.DrawTrailer ( this->GetCanvas() );
+
+	this->PendingDrawingsAdd();
+}
+
+void
+SubPage::DrawTrailer ( MvRequest& fullReq )
+{
+     // Retrieve the graphics engine
+     GraphicsEngine& ge = this->GetGraphicsEngine();
+     ge.DrawTrailer ( fullReq );
+
+     this->PendingDrawingsAdd();
+}
+
+void
+SubPage::SetCanvas ( Canvas * canvas )
+{
+ 	subpageCanvas_ = canvas;
+	subpageCanvas_->PresentableId ( this->Id () );
+}
+
+Canvas&
+SubPage::GetCanvas () const
+{
+	ensure ( subpageCanvas_ != 0 );
+	
+	// Select this presentable sector in the canvas
+//D	subpageCanvas_->PresentableId ( presentableId_ );
+
+	return *subpageCanvas_;
+}
+
+bool
+SubPage::CheckCanvas ( )
+{
+ 	return (subpageCanvas_ != 0 ? true : false);
+}
+
+#if 0
+void  
+SubPage::Undo()
+{
+//	if ( subpageCanvas_.get() )
+//		subpageCanvas_->UndoSelection();
+}
+void 
+SubPage::Redo()
+{
+//	if ( subpageCanvas_.get() )
+//		subpageCanvas_->RedoSelection();
+}
+ 
+void
+SubPage::Reset()
+{
+//	if ( subpageCanvas_.get() )
+//		subpageCanvas_->ResetSelection();
+}
+#endif
+
+void
+SubPage::PendingDrawingsAdd ()
+{
+	pendingDrawings_++;
+	myParent_->PendingDrawingsAdd ();
+}
+
+void
+SubPage::PendingDrawingsRemove ()
+{
+	pendingDrawings_--;
+	myParent_->PendingDrawingsRemove ();
+}
+
+void
+SubPage::SetVisibility ( bool visibility )
+{
+	Presentable::SetVisibility ( visibility );
+	
+	if ( isVisible_ )
+	{
+		Canvas& canvas = this->GetCanvas();
+		canvas.ShowPresentableId ( this->Id () );
+	}
+}
+
+bool
+SubPage::IsVisible ()
+{
+//	Canvas& canvas = this->GetCanvas ();
+	
+//U	return ( canvas.ShowPresentableId () == this->Id () );
+	return true; //U revise this function later
+}
+
+#if 0
+void
+SubPage::DescribeData ( MvRequest& request )
+{
+	for ( MvChildIterator child = childList_.begin();
+		              child != childList_.end(); ++child )
+	{
+		request = request + ( (DataObject*)(*child) )->DataRequest ();
+	}
+}			
+
+Cached
+SubPage::DescribeMatchingInfo ()
+{
+	Cached title;
+
+	const MatchingInfo mf = this->GetMatchingInfo ();
+	MvRequest req = mf.Request ();
+
+	if ( IsParameterSet ( req, "DATA_TYPE" ) )
+	{
+		title = req ( "DATA_TYPE" );
+		if ( IsParameterSet ( req, "DATE" ) )
+		{
+			title = title + Cached ( " " );
+			title = title + ( int ) req ( "DATE" );
+		}
+  		if ( IsParameterSet ( req, "TIME" ) )
+		{
+			title = title + Cached ( " " );
+			title = title + ( int ) req ( "TIME" );
+		}
+		if ( IsParameterSet ( req, "LEVEL" ) )
+		{
+			title = title + Cached ( " " );
+			title = title + ( int ) req ( "LEVEL" );
+		}
+		if ( IsParameterSet ( req, "PARAM" ) )
+		{
+			title = title + Cached ( " " );
+			title = title + (const char*)req( "PARAM" ); //-- may be 'ppp.ttt'
+		}
+	}
+	return title;
+}
+#endif
+
+long SubPage::PictureId(const char *typeName,bool generate )
+{
+	long id = 0;
+	if ( generate )
+	{
+		struct timeval t;
+		gettimeofday(&t,NULL);
+		id = t.tv_sec + t.tv_usec;
+		pictureIdMap_[typeName] = id;
+	}
+	else
+	{
+		PictureIdMap::iterator ii;
+		if ( ( ii = pictureIdMap_.find(typeName)) != pictureIdMap_.end() )
+			id =  (*ii).second;
+	}
+
+	return id;
+}
+
+#if 0
+// Reset all if true, reset only current canvas if false.
+void SubPage::NeedsRedrawing(bool yesno)
+{
+  if ( ! subpageCanvas_ )
+    return;
+
+  if ( yesno )
+    {
+      for ( RedrawMap::iterator ii = redrawMap_.begin(); ii != redrawMap_.end(); ii++)
+	(*ii).second = true;
+    }
+  
+  // Set value, or Insert it if it's not there.
+  redrawMap_[GetCanvas().PresentableString(Id())] = yesno;
+}
+
+bool SubPage::NeedsRedrawing()
+{
+  if ( ! subpageCanvas_ )
+    return false;
+
+  RedrawMap::iterator ii = redrawMap_.find(GetCanvas().PresentableString(Id() ) );
+  if ( ii != redrawMap_.end() )
+    return (*ii).second;
+
+  else
+    return true;
+}
+#endif
+
+bool
+SubPage::CheckValidVisDef ( MvIcon& dataUnit, MvRequest& vdRequest, int ndimFlag )
+{
+    MvChildIterator child;
+    if (childList_.size() == 0) return true;
+    MvIconDataBase& dataBase = IconDataBase();
+
+    for (child = childList_.begin(); child != childList_.end(); ++child)
+    {
+        DataObject* dataObj = (DataObject*)(*child);
+
+        // Get corresponding dataunit
+        MvIcon currentdu;
+        dataBase.RetrieveDataUnit(dataObj->DataUnitId(),currentdu);
+
+        // Find the appropriate dataUnit and check if it ( or its parent) matches.
+        if ( currentdu.Id()   == dataUnit.Id() || 
+             currentdu.ParentId() == dataUnit.Id() )
+        {
+            if ( ObjectList::CheckValidVisDef ( dataObj->Request().getVerb(),vdRequest.getVerb(),ndimFlag ) )
+            {
+                // Get data object
+                dataUnit = currentdu;
+
+                return true;  //found a valid visdef
+            }
+        }
+    }
+
+    return false;
+}
diff --git a/src/uPlot/SubPage.h b/src/uPlot/SubPage.h
new file mode 100644
index 0000000..414d483
--- /dev/null
+++ b/src/uPlot/SubPage.h
@@ -0,0 +1,185 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  SubPage
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Provides supprot for subpages in the PlotMod plot hierarchy
+//
+//
+// .CLIENTS:
+//  Page
+//
+// .RESPONSBILITIES:
+//  - Include new data units 
+//  - Create data objects (leaves of the PlotMod tree )
+//  - Keep track of the matching information
+//
+//
+// .COLLABORATORS: 
+//  DatObject, MatchingInfo
+//
+// .ASCENDENT:
+//  Presentable
+//
+//
+// .DESCENDENT:
+//  (none)
+//
+#ifndef SubPage_H
+#define SubPage_H
+
+#include "Presentable.h"
+
+class DataObject;
+
+class SubPage: public Presentable {
+public:
+
+	// Constructors
+	// Constructor from a request
+	SubPage( MvRequest&  subpageRequest );
+
+	SubPage ( MvRequest&          subpageRequest,
+		  int                 dataunitId,
+		  long                offset,
+		  long                offset2,
+		  const MatchingInfo& dataInfo );
+
+	SubPage(const SubPage&);
+        virtual Presentable* Clone() const  { return new SubPage(*this); }
+
+	// Destructor
+	~SubPage();
+
+	// Methods
+        // Overriden from Presentable class
+
+	// Draw me and all my children
+	virtual void Draw ();
+
+//	virtual void DrawData ();
+	// Draw data
+
+//	virtual void SaveTitle (MvRequest& magicsRequest);
+	// Save title information
+
+	// Draw Title Text only, positional is drawn by Page
+	virtual void DrawText ();
+
+	// Draw Legend
+	virtual void DrawLegend ( );
+
+     // Draws output file Prolog
+     void DrawProlog ();
+
+     // Draws output file page header
+     void DrawPageHeader ();
+
+	// Finalize drawing
+     void DrawTrailer (); //CHECK IF THIS IS STILL NEEDED
+     void DrawTrailer ( MvRequest& );
+
+#if 0
+        void DrawForeground ( Canvas& canvas, bool emptyFore = false );
+        //	draws output file foreground
+
+	virtual void EraseDraw ( int visDefId = 0 );
+	//      remove drawings of the visdef
+
+        virtual void NeedsRedrawing(bool yesno);
+
+        virtual bool NeedsRedrawing();
+
+	virtual const MatchingInfo& GetMatchingInfo() const
+		{ return matchingInfo_; }
+	// Return the matching information
+#endif
+
+	// Accept a  visitor
+	virtual void Visit ( Visitor& v );
+
+#if 0
+	virtual void Undo();
+
+	virtual void Redo();
+
+	virtual void Reset();
+#endif
+
+        virtual long PictureId(const char *typeName, bool generate = false);
+
+	// Local to subpage class
+	// Set/return/check the canvas ( one per subpage )
+	virtual void SetCanvas ( Canvas* canvas );
+	virtual Canvas& GetCanvas() const ;
+	bool CheckCanvas();
+
+	// Insert a new data unit (response to a drop action)
+	void InsertDataUnit ( int                 dataunitId, long offset, long offset2, const MatchingInfo& dataInfo  );
+
+        // Remove icon from tree structure
+        virtual void RemoveIcon ( MvIcon& );
+
+        // Remove all data icon from tree structure
+	virtual void RemoveAllData ()
+		{ RemoveMyData(); }
+
+//	virtual void RemoveAllVisDef ()
+//		{ RemoveMyVisDef(); }
+        // Remove all visdef icon from tree structure
+
+	bool GetDrawPrior ( DrawPriorMap* );
+
+        bool GetDataObjects(list<DataObject*>&);
+
+	// Indicate/determine whether a page is visited in background
+	virtual bool VisitInBackground()
+		{ return visitInBackground_; }
+	virtual void VisitInBackground(bool xx )
+		{ visitInBackground_ = xx; }
+
+	virtual void PendingDrawingsAdd ();
+	virtual void PendingDrawingsRemove ();
+
+	virtual void SetVisibility ( bool );
+	virtual bool IsVisible ();
+
+//	virtual void DescribeData ( MvRequest& );
+	// Add to request SubPage dataunit icons with dataobject requests
+
+//	virtual Cached DescribeMatchingInfo ();
+	// Describes Matching info in the "DATE TIME LEVEL PARAM" format
+
+	// Check if there is any Visdef associated with the Dataunit
+	virtual bool CheckValidVisDef ( MvIcon& du, MvRequest& vd, int = 0 );
+
+private:
+
+	// No copy allowed
+	SubPage& operator=(const SubPage&);
+
+	// Members
+	Canvas* subpageCanvas_;
+        bool visitInBackground_;
+        bool hasTitleDraw_;
+
+        typedef map<string,long> PictureIdMap;
+        PictureIdMap pictureIdMap_;      // for synchronization problems
+
+//       typedef map<string,bool> RedrawMap;
+//       RedrawMap redrawMap_;
+};
+
+#endif
diff --git a/src/uPlot/SuperPage.cc b/src/uPlot/SuperPage.cc
new file mode 100644
index 0000000..2230fca
--- /dev/null
+++ b/src/uPlot/SuperPage.cc
@@ -0,0 +1,1444 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// File SuperPage.CC
+// Gilberto Camara and Fernando Ii - ECMWF Mar 97
+
+#ifndef NOMETVIEW_QT
+#include "uPlotBase.h"
+#endif
+
+#include "SuperPage.h"
+
+#include <Assertions.hpp>
+#include "MacroVisitor.h"
+#include "MvApplication.h"
+#include "ObjectList.h"
+#include "Page.h"
+#include "PlotMod.h"
+#include "PmContext.h"
+
+int SuperPage::nrSuperPages_ = 0;
+
+#ifndef NOMETVIEW_QT
+uPlotBase* SuperPage::plotApplication_=0;
+#endif
+
+SuperPage::SuperPage    ( const MvRequest& superpageRequest ):
+	Presentable     ( superpageRequest   ),
+	iconDataBase_   ( new MvIconDataBase ),
+	preferences_    ( *this              ),
+//	macroType_      ( SCREEN_MACRO       ),
+//	zoomPageId_     ( 0                  ),
+//	printPreview_   ( false              ),
+//	contentsActive_ ( false              ),
+	pageIndex_      ( 1                  ),
+	superPageIndex_ ( 1                  ),
+//	paperPageIndex_ ( 1                  ),
+	printIndex_     ( 0                  )
+
+{
+   // bool calledFromMacro = ObjectInfo::CalledFromMacro(superpageRequest);
+
+   // Retrieve the subrequest describing the Pages
+   MvRequest pagesRequest = superpageRequest.getSubrequest ( PAGES );
+
+   // Check if the request is a PAGE request
+   // If it does not exist, create one PAGE request
+   Cached pageVerb = pagesRequest.getVerb();
+   if ( pageVerb != PLOTPAGE )
+       pagesRequest = ObjectList::CreateDefaultRequest ( "PLOT_PAGE" );
+
+   // Rewind the request
+   pagesRequest.rewind();
+
+   // Loop through the request, create new Pages
+   // and insert them as children of the superpage
+   while ( pagesRequest )
+   {
+      // Extract the page request
+      MvRequest newpageRequest = pagesRequest.justOneRequest();
+
+      // Create a new page
+      //Presentable* page = new Page ( newpageRequest );
+      Page* page = new Page ( newpageRequest );
+      ensure ( page != 0 );
+
+      // Insert the page in the superpage's child list
+      this->Insert ( page );
+
+      // Goto the next page request
+      pagesRequest.advance();
+   }
+
+   // Store my size
+   double width  = superpageRequest ( "CUSTOM_WIDTH" );
+   double height = superpageRequest ( "CUSTOM_HEIGHT" );
+   if ( width <= 0 || height <= 0 )
+   {
+       // default A4 landscape
+       width = 29.7;
+       height = 21.0;
+   }
+   size_ = PaperSize ( width, height );
+
+   // Create and store the device information
+   this->SetDeviceInfo ( superpageRequest );
+
+#ifndef NOMETVIEW_QT
+   // Save information in uPlot
+   if (PlotMod::Instance().IsWindow() && plotApplication_)
+   plotApplication_->SetPresentable(*this);
+#endif
+
+   nrSuperPages_++;
+   // The purpose of this is to keep PlotMod alive when called in batch. Macro will die once it gets
+   // a reply request from PlotMod, and take other modules down before plotting is finished.
+   if ( nrSuperPages_ == 1 && ! PlotMod::Instance().IsInteractive() )
+       MvApplication::setKeepAlive(true);
+}
+
+
+SuperPage::SuperPage(const SuperPage &old) :
+    Presentable(old),
+//  size_(old.size_),
+//  macroFileName_(old.macroFileName_),
+    preferences_(old.preferences_),
+//  macroType_(old.macroType_),
+//  zoomPageId_(0),
+//  printPreview_(old.printPreview_),
+//  contentsActive_(old.contentsActive_),
+    pageIndex_(1),
+    superPageIndex_(1),
+//  paperPageIndex_(1),
+//  backDrawEnabled_(old.backDrawEnabled_),
+  printIndex_(0)
+{
+	// Make a new icon db from the old one
+	auto_ptr<MvIconDataBase> iconDb( new MvIconDataBase(old.IconDataBase() ) );
+	iconDataBase_ = iconDb;
+
+	// Set new owner for preferences
+	preferences_.Owner(*this);
+
+	// Member myDevice_ is intentionally not copied
+	nrSuperPages_++;
+
+	// Should never kick in, nrSuperPages_ should be at least 2 here.
+	if ( nrSuperPages_ == 1 && ! PlotMod::Instance().IsInteractive() )
+		MvApplication::setKeepAlive(true);
+}
+
+SuperPage::~SuperPage()
+{ 
+	nrSuperPages_--;
+
+        // If called from macro, we don't need to keep PlotMod artificially alive any more.
+	if ( nrSuperPages_ == 0 && ! PlotMod::Instance().IsInteractive() )
+	  MvApplication::setKeepAlive(false);
+}
+
+// -- METHOD  : Create Reply
+//
+// -- PURPOSE : Indicate to MetviewUI and to Macro the ids 
+//              of the superpage and pages
+//
+// -- INPUT   : A reply request 
+//
+// -- OUTPUT  : An updated reply request (which is included 
+//              in the Context)
+//
+// -- OBS     : Please see the PmContext class ( especially
+//              the destructor )
+
+void
+SuperPage::CreateReply ( MvRequest& replyRequest )
+{
+	// First, for all its children, include the drop id
+	MvChildIterator child = childList_.begin();
+
+	int k = 0;
+	while ( child != childList_.end() )
+	{
+		MvRequest pageReply ( "DROP" );
+		pageReply.setValue  ( "DROP_ID", (*child)->Id() );
+
+		//If the superpage  has been called from a Macro,
+		//  then it needs to ask Macro to notify when finished.
+		if ( PlotMod::Instance().CalledFromMacro () && k++ == 0)
+			pageReply ( "_NOTIFY" ) = "NEWPAGE";
+
+		replyRequest += pageReply;
+		++child;
+	}
+
+// This facility was removed due to backward compatibilities.
+// The "count(superpage)" command  should return only the number 
+// of pages and not the number of pages plus one (the superpage id).
+  // Return drop id for superpage at the end.
+//  MvRequest myReply ( "DROP" );
+//  myReply.setValue  ( "DROP_ID", Id() );
+//  replyRequest = replyRequest + myReply;
+}
+
+struct DropFunctor {
+	PmContext& context_;
+	DropFunctor(PmContext& context) : context_(context) {}
+
+	void operator()(Presentable* p) 
+	{
+		context_.RewindToAfterDrop(); p->Drop(context_);
+	}
+};
+
+void
+SuperPage::Drop ( PmContext& context )
+{
+	MvRequest dropRequest = context.InRequest();
+
+	// Accept VisDefs in the Super Page, if other icon needs the same
+	// add here
+	while ( dropRequest )
+        {
+	    MvRequest request =  dropRequest.justOneRequest();
+	    Cached verb = request.getVerb();
+
+	    if ( this->DroppedHere () )
+	    {
+		    if ( ObjectList::IsVisDef ( verb ) == true )
+		          this->InsertVisDef ( request );
+		    else if ( ObjectList::IsVisDefText ( verb ) == true )
+		          this->InsertPText ( request );
+		    else if ( ObjectList::IsVisDefLegend ( verb ) == true )
+		          this->InsertLegend ( request );
+	    }
+	    dropRequest.advance();
+	 }
+
+	// Send to Page
+	for_each ( childList_.begin(), childList_.end(), DropFunctor(context) );
+}
+
+#if 0
+// -- METHOD  : Close
+//
+// -- PURPOSE : Save and delete a superpage
+//
+// -- OBS     : This is achieved by sending a request to PlotMod
+//              indicating the presentable to be deleted
+
+void
+SuperPage::Close()
+{
+	// Delete all structures and exit
+	//command exit(0) should do the job
+        Presentable* treeNode = Root::Instance().FindBranch (Id());
+          if (treeNode == 0)
+          {
+                   cout << "SuperPage::Close " << endl;
+                   cout << " ** Error - Cannot associate page with DropId" << endl;
+                   return;
+          }
+ 
+          // delete the tree node and its children
+          delete treeNode;
+//	  exit(0);
+
+MvRequest closeRequest ("CLOSE");
+closeRequest ("DROP_ID") = Id();
+MvApplication::callService ( "uPlotBatch", closeRequest, 0 );
+}
+
+// -- METHOD  : Save in File
+//
+// -- PURPOSE : Save the contents of the superpage
+
+void
+SuperPage::SaveInFile()
+{
+	// Don't save if called from a macro
+
+	if ( ObjectInfo::CalledFromMacro ( myRequest_ ) == false )
+	{
+	}
+		// My pages may have changed their views
+
+// SuperPage shouldn't save the views associated to the pages, 
+// unless the users ask explicitly for that. A tool for that 
+// should be built.
+// It will make sense only when the view associated to the page 
+// can be replaced.
+//		this->SaveChildren ();
+
+}
+#endif
+
+
+// -- METHOD :  Name 
+//
+// -- PURPOSE:  Inform the superpage's name 
+//
+// -- INPUT  :  (none)
+//
+// -- OUTPUT :  The name of the superpage
+string
+SuperPage::Name()
+{
+	return  (const char*)ObjectInfo::ObjectName ( myRequest_, "SuperPage", Id() );
+}
+
+// -- METHOD :   Draw
+// 
+// -- PURPOSE:   Draws a superpage
+//
+// -- INPUT  :   (none)
+//
+// -- OUTPUT : 	 Drawing on window or paper
+//	
+void
+SuperPage::Draw()
+{
+	HasDrawTask ( true );
+
+	printIndex_ = 0;
+
+	// Draw all my children
+	DrawChildren ();
+
+	this->HasDrawTask ( false );
+}
+
+void
+SuperPage::DrawProlog()
+{
+     // Call all my children
+	MvChildIterator child;
+	for ( child = childList_.begin(); child != childList_.end(); ++child )
+		(*child)->DrawProlog();
+}
+
+void
+SuperPage::DrawTrailer( MvRequest& fullReq )
+{
+     // Get all requests
+     GetAllRequests( fullReq );
+}
+
+void
+SuperPage::GetAllRequests( MvRequest& fullReq )
+{
+     // Add the superpage request
+     MvRequest sp("SUPERPAGE");
+     sp( "SUPER_PAGE_X_LENGTH") = size_.GetWidth();
+     sp( "SUPER_PAGE_Y_LENGTH") = size_.GetHeight();
+     fullReq += sp;
+
+	// Get all page requests
+     MvChildIterator child;
+     for ( child = childList_.begin(); child != childList_.end(); ++child )
+          (*child)->DrawTrailer ( fullReq );
+}
+
+#if 0
+void
+SuperPage::HasReceivedNewpage( bool isLast )
+{
+        if ( NeedsRedrawing ( ) ) this->Draw ();
+
+//D	if ( this->IsAWindow () ) return;
+
+	if ( isLast )
+	{
+//D		MvChildIterator child = childList_.begin();
+//D		Page* page = (Page*) (*child);			  
+//D		page->DrawTrailer ();
+		this->DrawTrailer();
+		hasNewpage_ = true;
+	}
+	else
+		superPageIndex_ = paperPageIndex_ + 1;
+}
+#endif
+
+// -- METHOD :  SetDeviceInfo
+//
+// -- PURPOSE:   Create and initialise the superpage's device
+//               (called by the constructor)
+// -- INPUT  :   The request which created the superpage
+//
+// -- OUTPUT :   (none)
+//
+// -- OBS    :   The device class will implement the "Visitor"
+//               pattern, and this method will enable it
+//               to "visit" the superpage and its children
+
+void
+SuperPage::SetDeviceInfo ( const MvRequest& inRequest )
+{
+	// The input request contains the necessary information
+	// for creating a device driver
+	
+	// The Create Request method will generate an
+	// appropriate device Request
+	MvRequest deviceRequest = Device::CreateRequest ( inRequest );
+
+	auto_ptr <Device> dev ( DeviceFactory::Make ( deviceRequest ) );
+
+	myDevice_ = dev;
+
+	// The device is a visitor - this command will trigger
+	// its visit (i.e., its traversal through the page hierarchy)
+	myDevice_->Initialise( *this );
+}
+
+void
+SuperPage::SetDeviceInfo ( )
+{
+//	ensure ( myDevice_ == 0);
+
+	// The device is a visitor - this command will trigger
+	// its visit (i.e., its traversal through the page hierarchy)
+	myDevice_->Initialise( *this );
+}
+
+// --- METHOD : GenerateMacro
+// --- PURPOSE: Generate a macro file with the contents of the superpage
+//
+// --- INPUT  : Name of the macro file the be written
+//              Type of the macro (can be:
+//                  SCREEN_MACRO - Reproduce the output of the screen
+//       	    ZOOM_AREA    - Zoom into a single page
+//
+// --- OUTPUT : Macro program written (by the class MacroDevice)
+
+void
+SuperPage::GenerateMacro( )
+{
+	// Restart the page index count (used later)
+    pageIndex_ = 1;
+
+	// Update the macro type for later use
+//	macroType_ = type;
+
+	// Update the macrofile name, if screenmacro, put file in the superpage directory,
+	// otherwise put in temporary directory.
+	macroFileName_ = MacroVisitor::CreateFileName ( myRequest_ );
+
+	// Create a new visitor
+	auto_ptr <Visitor> vis ( new MacroVisitor ( macroFileName_ ) );
+
+	// Visit me
+	vis->Visit (*this);
+
+	// Visit all my children
+	Presentable::Visit ( *vis );
+
+	// Post a message on the screen
+	string message = "Macro Generated in File " + macroFileName_;
+	PlotMod::Instance().UserMessage (message);
+}
+
+// -- METHOD :  Visit
+//
+// -- PURPOSE:  Implement the visitor pattern
+//
+// -- INPUT  :  visitor (XDevice or PSDevice or MacroVisitor)
+//
+// -- OUTPUT :  (none)
+void
+SuperPage::Visit ( Visitor& v )
+{ 
+	// Visit me
+	v.Visit (*this);
+
+	// Visit all my children
+	Presentable::Visit ( v );
+}
+
+// -- METHOD :  GetMySize
+//
+// -- PURPOSE:  Return the presentable's size 
+//
+// -- INPUT  :  (none)
+//
+// -- OUTPUT :  The size of the superpage window
+//              (which is always in paper coordinates)
+PaperSize
+SuperPage::GetMySize()
+{
+	return size_;
+}
+
+#if 0
+// -- METHOD :  SetMySize
+//
+// -- PURPOSE:  Update the presentable's size 
+//
+// -- INPUT  :  Dimensions width and height
+//
+// -- OUTPUT :  (none)
+
+void
+SuperPage::SetMySize ( double width, double height )
+{
+	size_ = PaperSize ( width, height );
+
+	SuperPageWidget* myWidget = (SuperPageWidget*) deviceData_.get();
+	myWidget->UpdateSize();
+}
+#endif
+
+#if 0
+// -- METHOD :  IsAWindow
+//
+// -- PURPOSE:  Determine if the superpage is a window 
+//
+// -- INPUT  :  (none)
+//
+// -- OUTPUT :  true/false
+
+bool
+SuperPage::IsAWindow ()
+{
+	MvRequest req = myDevice_->DeviceRequest();
+
+        if ( IsParameterSet(req,"OUTPUT_DEVICES") )
+	{
+		MvRequest req1 = req("OUTPUT_DEVICES");
+                if ( strcmp(req1.getVerb(),"QtDriver") == 0 )
+		     return true;
+	}
+
+	return false;
+}
+#endif
+
+
+#if 0
+// -- METHOD: PrintPreview
+//
+// -- PURPOSE: set printing mode to Preview'
+
+void
+SuperPage::PrintPreview()
+{
+	printPreview_ = true;
+}
+
+// -- METHOD: Print
+//
+// -- PURPOSE: Print the current request.
+//			   This is done in three steps:
+//             1. Create a temporary ps file by calling SuperPage::PrintJob (see below)
+//			   2. Call the following printer command:
+//			    	 <$METVIEW_PRINTER_COMMAND> -P<$METVIEW_PRINTER> <temp.ps>
+//				  If environment variable $METVIEW_PRINTER_COMMAND is not defined
+//				  then uses the lpr command.
+//				  If environment variable $METVIEW_PRINTER is not defined
+//				  then uses the default lpr printer.
+//             3. Delete the temporary ps file
+//                
+
+//This is done in five steps:
+//             1. Ask the preferences member to establish the
+//                user's printer choices
+//             2. The "preferences" object will ask GenApp to
+//                show an Editor with the Printer Preferences menu
+//             3. After GenApp returns, the "preferences" object
+//                will call the superpage's method "PrintJob" (see below)
+//             4. The SuperPage::PrintJob will duplicate the hierarchy,
+//                including all dataunits and visdefs, set device according
+//                to given printrequest, and just call DrawProlog, Draw and
+//                DrawTrailer to draw the new superpage.
+//             5. Printing is finalised from MagicsPicturAction. When the 
+//                trailer is received, plotmod generates the postscript file
+//                and sends itself a close request. The CloseAction will delete
+//                the superpage, and the PSDevice destructor will put the file
+//                where it should be ( file,preview, printer).
+//                
+void
+SuperPage::Print()
+{
+	printPreview_ = false;
+
+	// Create the ps file
+	// Get the process number to build the ps temporary file name
+	// This file should be deleted in the uPlot destructor
+    stringstream sid;
+	sid << getpid();
+    string psname = sid.str() + "tmpfile.ps";
+	string tmpfile = MakeTmpPath(psname.c_str());
+	PrintJob(tmpfile);
+	
+	// Call printer command
+	string com;
+	const char* prcom = getenv("METVIEW_PRINTER_COMMAND");
+	const char* printer = getenv ("METVIEW_PRINTER");
+	prcom ? com = prcom : com = "lpr";
+	if ( printer )
+	{
+		com += " -P";
+		com += printer;
+	}
+	com += " " + tmpfile;
+
+//	/opt/kde3/bin/kprinter
+	system(com.c_str());
+	
+	// Send message to the user, if printer command is not defined
+	if ( !prcom )
+	{
+		string message = "Print Job sent to printer: ";
+		printer ? message += printer : message += "default";
+    	PlotMod::UserMessage ( message );
+	}
+
+// Need to move this command to the destructor???
+// Maybe it should destroy all the temporary files
+// together: rm -f <pid>*
+	// Delete the temporary ps file
+	string del = "rm -f " + tmpfile;
+	system(del.c_str());
+}
+
+// -- METHOD: PrintJob
+//
+// -- PURPOSE: Duplicates SuperPage hierarchy, including all dataunits
+//		       and visdefs, set device according to given printrequest,
+//			   and just call DrawProlog, Draw and DrawTrailer to draw 
+//			   the new superpage.
+
+// Remove this routine
+void SuperPage::PrintJob()
+{
+#if 0 //D It is not need anymore
+  MvRequest printReq = preferences_.PrinterRequest();
+
+  MvRequest superpageReq = myRequest_;
+  superpageReq("_DRIVER") = printReq;
+  superpageReq("_PRINT_OPTION")  = printReq("PRINT_OPTION");
+
+  SuperPage *printSuperPage = new SuperPage(*this);
+  Root::Instance().Insert(printSuperPage);
+  printSuperPage->DuplicateChildren(*this);
+
+  myRequest_ = superpageReq;
+  printSuperPage->SetDeviceInfo(superpageReq);
+
+  printSuperPage->NeedsRedrawing(true);
+
+  printSuperPage->hasNewpage_ = true;  
+
+  // Refresh tag: do not need to rebuild the visualization tree
+  printSuperPage->myRequest_("_REFRESH") = "OFF";
+
+  // Draw 
+  AddTask( *printSuperPage, &SuperPage::DrawProlog );
+  AddTask( *printSuperPage, &SuperPage::Draw );
+  AddTask( *printSuperPage, &SuperPage::DrawTrailer );
+
+  TaskBase::Flush();
+ 
+ #endif
+ }
+ 
+void SuperPage::PrintJob( string& tmpfile )
+{
+	// Define postscript driver
+	MvRequest subreq("PSDriver");
+	subreq("OUTPUT_NAME") = tmpfile.c_str();
+	
+	// Add postscript driver to the printer manager
+	MvRequest printReq("PRINTER_MANAGER");
+	printReq("OUTPUT_DEVICES") = subreq;
+
+	// Add printer manager to the request
+  	MvRequest superpageReq = myRequest_;
+  	superpageReq("_DRIVER") = printReq;
+  	superpageReq("_PRINT_OPTION")  = printReq("PRINT_OPTION");
+
+	// Clone the visualized superpage
+  	SuperPage *printSuperPage = new SuperPage(*this);
+ 	Root::Instance().Insert(printSuperPage);
+  	printSuperPage->DuplicateChildren(*this);
+
+	// Update variables
+  	myRequest_ = superpageReq;
+  	printSuperPage->SetDeviceInfo(superpageReq);
+ 	printSuperPage->NeedsRedrawing(true);
+  	printSuperPage->hasNewpage_ = true;  
+
+  	// Refresh tag: do not need to rebuild the visualization tree
+ 	printSuperPage->myRequest_("_REFRESH") = "OFF";
+
+  	// Draw 
+  	printSuperPage->DrawProlog();
+  	printSuperPage->Draw();
+  	printSuperPage->DrawTrailer();
+	
+	// Check if it is destroying everything, including
+	// removing it from the list of superpages????????????
+	// The object has not been destroyed because variable
+	// nrSuperPages_ is static and > 1.
+	delete printSuperPage;
+}
+
+// -- METHOD: PrintingFinished
+//   Probably not needed anymore.
+// -- PURPOSE: Called by MacroService after the macro has 
+//             finished printing to print a message indicating
+//             if the job has been completed
+//
+// -- INPUT:   The reply Request from the Macro Service
+//
+void
+SuperPage::PrintingFinished( MvRequest& replyRequest )
+{
+	int errCode = replyRequest ( "ERR_CODE" );
+
+	// If we are not in print preview mode, generate a message
+	// on the screen
+
+	if ( printPreview_ == false )
+	{
+		if ( errCode == 0 )
+			PlotMod::UserMessage ( "Print Job Finished" );
+		else
+		{
+			PlotMod::SystemError ( (const char*) replyRequest ( "ERROR" ), "Printing" );
+		}
+	}
+}
+
+
+
+
+// -- METHOD:  PostMessage
+//
+// -- PURPOSE: Put a warning on the screen
+//			   (done by the SuperPageWidget)
+//
+void
+SuperPage::PostMessage ( const char* title, const char* message )
+{
+	// Are we in interactive mode ?
+	if ( PlotMod::IsInteractive() == true )
+	{
+		SuperPageWidget* myWidget = (SuperPageWidget*) deviceData_.get();
+		myWidget->PostMessage ( title, message );
+	}
+}
+
+// -- METHOD:  EditPrinterPreferences
+//
+// -- PURPOSE: Called by the interface to edit the
+//             printer preferences
+//
+void
+SuperPage::EditPrinterPreferences()
+{
+	preferences_.EditPrinterPreferences();
+
+}
+
+void
+SuperPage::EditInterfacePreferences()
+{
+	preferences_.EditInterfacePreferences();
+}
+
+void
+SuperPage::SetCursorType ( CursorType option )
+{
+	preferences_.SetCursorType ( option );
+}
+
+void
+SuperPage::SetInputType ( InputType option )
+{
+	preferences_.SetCursorType ( POINTERCURSOR );
+	preferences_.SetInputType ( option );
+}
+
+#if 0
+void
+SuperPage::StartMapEditor()
+{
+	// Call a Request which is sent directly to PlotMod
+
+	MvRequest mapRequest ("EDIT_MAP");
+
+	mapRequest ( "CUSTOM_WIDTH"  ) = size_.GetWidth();
+	mapRequest ( "CUSTOM_HEIGHT" ) = size_.GetHeight();
+
+	mapRequest ( "PATH"   ) = ObjectInfo::ObjectPath ( myRequest_ );
+
+	MvApplication::callService ( "uPlot", mapRequest, 0 );	
+}	
+#endif
+
+void
+SuperPage::MouseMode()
+{
+	cout << "SuperPage::MouseMode" << endl;
+}
+
+void
+SuperPage::UpdateWidget ( MvRequest& newpageRequest, const int treeNodeId, int& newTreeNodeId)
+{
+        // Find a sub-branch in the tree hierarchy
+	Presentable* oldPage = FindBranch ( treeNodeId );
+
+	// Delete old page
+	// ????????? IMPORTANTE ????????????
+	// FAMI0698 PLEASE CHECK IF ALL THE DESTRUCTORS HAS BEEN
+	// CALLED (THE MEMORY SHOULD BE CLEANED PROPERLY)
+	delete oldPage;
+
+	// Create a new page	
+	Presentable* page = new Page ( newpageRequest );
+	ensure ( page != 0 );
+	newTreeNodeId = page->Id();
+
+	// Insert the page in the superpage's child list
+	this->Insert ( page );
+
+	// Create and store the device information
+	page->Visit ( *myDevice_ );
+}
+#endif
+
+// --  METHOD  : MacroPlotIndexName
+//
+// --  PURPOSE : Provide a sequential index to all pages
+//                associated to the superpage
+// --  INPUT   : none
+//
+// --  OUTPUT  : An index into the name returned by plot_superpage.
+//
+//               Has the side effect of updating member pageIndex_.
+//
+string
+SuperPage::MacroPlotIndexName(bool useIndex)
+{
+	int index;
+  	if ( useIndex)
+        index = pageIndex_++;
+	else
+		index = childList_.size() + 1;
+
+	ostringstream ostr;
+	ostr << "display_window[" << index << "]";
+	return ostr.str();
+}
+
+// -- METHOD :  Describe Device
+//
+// -- PURPOSE:  Generate the device description in macro syntax
+//
+// -- INPUT  :  a description object
+//
+// -- OUTPUT :  an updated description object
+//
+void
+SuperPage::DescribeDevice ( ObjectInfo& myDescription )
+{
+	myDescription.PutNewLine ( " " );
+	myDescription.PutNewLine ( "# Device Description" );
+
+	// Obtains the preferred printer request
+//	MvRequest printerRequest = Preferences::PrinterRequest();
+
+/*
+	// Creates for device descriptions (printer, file, preview, screen)
+	myDescription.PutNewLine ( "# Define output device.");
+	if ( macroType_ == SCREEN_MACRO )
+	{
+		myDescription.PutNewLine ( "# Screen is default output device.");
+
+		// Generate description for screen
+		myDescription.PutNewLine ( "Screen  = output ( " );
+		myDescription.FormatLine ( "FORMAT","'SCREEN'","" );
+		myDescription.PutNewLine ( "\t) ");
+		myDescription.PutNewLine ( " " );
+	}
+	else
+		myDescription.PutNewLine ( "# Can be printer, file or preview");
+
+	// Generate description for printer
+	printerRequest ( "DESTINATION" ) = "PRINTER";
+	myDescription.ConvertRequestToMacro ( printerRequest,PUT_END,
+					      "Printer","output" );
+	myDescription.PutNewLine ( " " );
+*/
+
+	// Generate description for file
+//	MvRequest reqDev = ObjectList::CreateDefaultRequest ( "PSDriver" );
+	MvRequest reqDev( "PSOUTPUT" );
+	string filename = (const char*)ObjectInfo::ObjectPath ( myRequest_ );
+	filename += "/ps";
+	reqDev("OUTPUT_NAME") = filename.c_str();
+	myDescription.ConvertRequestToMacro ( reqDev,PUT_END,"File","ps_output"  );
+
+	// Check running mode 
+	myDescription.PutNewLine ( " " );
+	myDescription.PutNewLine ( "# Checks running mode " );
+	myDescription.PutNewLine ( "mode = runmode() " );
+	myDescription.PutNewLine ( "if mode = 'batch' or mode = 'execute' then " );
+	myDescription.PutNewLine ( "          setoutput(File) " );
+	myDescription.PutNewLine ( "end if " );
+	myDescription.PutNewLine ( " " );
+}
+
+// -- METHOD :  Describe Yourself
+//
+// -- PURPOSE:  Generate the superpage description in macro syntax
+//
+// -- INPUT  :  a description object
+//
+// -- OUTPUT :  an updated description object
+//
+void
+SuperPage::DescribeYourself ( ObjectInfo& myDescription )
+{
+	myDescription.PutNewLine ( " " );
+	myDescription.PutNewLine ( "# SuperPageDescription" );
+
+	set<Cached> skipSet;
+	skipSet.insert("PAGES");
+	myDescription.ConvertRequestToMacro ( myRequest_, PUT_LAST_COMMA,
+					      MacroName().c_str(),"plot_superpage",
+					      skipSet);
+
+	// Print the page list
+	string pageList = ListMyPages();
+	myDescription.FormatLine ("PAGES",pageList.c_str(),"" );
+
+	// Close superpage request
+	myDescription.PutNewLine ( "\t)"  );
+	myDescription.PutNewLine ( "# plot_superpage returns a list of drop identifiers." );
+	myDescription.PutNewLine ( "# Index 1 is for first page, and so on." );
+	myDescription.PutNewLine ( "# end of superpage definition " );
+	myDescription.PutNewLine ( " "  );
+	string ret = "return " + MacroName();
+	myDescription.PutNewLine( ret.c_str() );
+}
+
+// --  METHOD  : ListMyPages
+//
+// --  PURPOSE : Provide a listing all all pages
+//                associated to the superpage
+// --  INPUT   : none
+//
+// --  OUTPUT  : list of page name ( enclosed in [..] )
+//
+string
+SuperPage::ListMyPages()
+{
+	// Put an enclosing brace
+ 	string pageNames = "[ ";
+ 
+ 	MvChildIterator child = childList_.begin();
+	int npages = 1;
+	while ( child != childList_.end() )
+	{
+		// Put a comma separator
+		if ( npages > 1 )
+			pageNames += ", ";
+
+		// Get the name of the page
+		pageNames += (*child)->MacroName();
+
+		++child;
+		++npages;
+	}
+ 	
+	// Put a termination brace
+	pageNames += " ]";
+
+	return pageNames;
+}
+
+void
+SuperPage:: PrintAll ( bool printAll )
+{
+	if ( printAll )
+		myRequest_ ( "_PRINT_OPTION" ) = "ALL";
+	else
+		myRequest_ ( "_PRINT_OPTION" ) = "VISIBLE";
+}
+
+bool
+SuperPage:: PrintAll ()
+{
+	return ( myRequest_ ( "_PRINT_OPTION" ) == Cached ( "ALL" ) );
+}
+
+void
+SuperPage::InsertVisDef ( MvRequest& visdefRequest  )
+{
+   // Retrieve the Icon Data Base
+   MvIconDataBase& dataBase = this->IconDataBase();
+
+   // Test if Visdef came from Contents edition window
+   int visdefId = visdefRequest( "_CONTENTS_ICON_EDITED" );
+   if (visdefId != 0)
+   {
+      // Visdef already exists in the data base replace in data base
+      dataBase.UpdateVisDef ( visdefId, visdefRequest );
+      EraseDraw(visdefId);
+   }
+   else
+   {
+      // Insert the visdef in the data base
+      EraseDefaultDraw();
+      MvIcon dummy;
+      dataBase.InsertVisDef ( visdefRequest, Id(), dummy );
+   }
+
+   // Draw me later on
+   RedrawIfWindow();
+   NotifyObservers();
+}
+
+void
+SuperPage::RemoveIcon ( MvIcon& icon )
+{
+	Cached verb =  icon.Request().getVerb();
+	if ( ObjectList::IsVisDef     ( verb ) ||
+	     ObjectList::IsVisDefText ( verb )    )
+	{
+		MvChildIterator child;
+		for ( child = childList_.begin(); child != childList_.end(); ++child )
+			(*child)->RemoveIcon ( icon );
+	}
+}
+
+#if 0
+void
+SuperPage::NeedsRedrawing(bool yesno)
+{
+	for (MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++)
+		(*ii)->NeedsRedrawing(yesno);
+}
+
+bool
+SuperPage::NeedsRedrawing()
+{
+	for (MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++)
+		if ( (*ii)->NeedsRedrawing() )
+			return true;
+
+	return false;
+}
+#endif
+
+void
+SuperPage::EraseDraw (int visdefId)
+{
+	for ( MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++ )
+		(*ii)->EraseDraw (visdefId);
+}
+
+#if 0
+void
+SuperPage::EraseForeDraw ()
+{
+  for ( MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++ )
+    (*ii)->EraseForeDraw ();		
+}
+
+void SuperPage::RedrawIfWindow(int visdefId)
+{
+  for ( MvChildIterator ii = childList_.begin(); ii != childList_.end(); ii++ )
+    (*ii)->RedrawIfWindow (visdefId);		
+}
+
+void
+SuperPage::SetInputPresentableId ( int presentableId )
+{
+      	// Build heading request with drop id
+	MvRequest vistool = "VISTOOL";
+
+	MvRequest window = "DROP";
+	window ( "DROP_ID" ) = presentableId;
+	vistool ( "WINDOW" ) = window;
+
+	MvRequest setup = "vistool";
+	setup ( "service" ) = "gribtool";
+	setup ( "mode" ) = "Default";
+	setup ( "type" ) = "button";
+	setup ( "interest" ) = "POSITION";
+	setup.addValue  ( "interest", "CHANGE_WINDOW" );
+	setup.addValue  ( "interest", "CONTENTS" );
+	setup.addValue  ( "interest", "CLOSE_WINDOW" );
+	setup ( "pixmap" ) = "/cc/od/graphics/icons/pw_sight.icon" ;
+	vistool ( "SETUP" ) = setup;
+
+	vistool ( "TITLE" ) = "Plot Window 1";
+	vistool ( "SOURCE" ) = "uPlot";
+
+//	VISTOOL,
+//	    WINDOW     = (DROP,
+//	    DROP_ID    = 1
+//
+//	),
+//	    SETUP      = (vistool,
+//	    service    = gribtool,
+//	    mode       = Default,
+//	    type       = button,
+//	    interest   = POSITION/CHANGE_WINDOW/CONTENTS/CLOSE_WINDOW,
+//	    pixmap     = '/cc/od/graphics/icons/pw_sight.icon'
+//
+//	),
+//	    TITLE      = Plot Window 1
+
+//	MvApplication::callService ( "gribtool", vistool, 0 );
+	GribToolService::Instance().CallGribTool ( vistool );
+}
+#endif
+
+// -- METHOD  :  RetrievePTextTitle
+//
+// -- PURPOSE : This method will retrieve the PText list - type ptext
+//
+//         If there is no PTextList it will go up to the Root 
+//         treeNode (the top of the tree) to retrieve
+//         the user's default PText list
+
+bool
+SuperPage::RetrieveTextTitle ( MvIconList& textList )
+{
+   bool usingDefault = false;
+	string type("TEXT");
+
+	// Try to find a visdef associated to the presentable
+	if (!iconDataBase_->TextListByPresentableId ( presentableId_, textList, type ))
+		usingDefault = myParent_->RetrieveTextTitle(textList);
+
+	ensure(textList.size() > 0);
+
+	// It is a Text default and I am the SuperPage
+	// Save Texts default in the DataBase
+	if ( usingDefault )
+	{
+		MvListCursor  vdCursor;
+		for ( vdCursor = textList.begin(); vdCursor != textList.end(); ++vdCursor)
+		{
+			MvIcon& text = *( vdCursor );
+			iconDataBase_->InsertText( text.Request(),presentableId_ );
+		}
+	}
+
+	return usingDefault;
+}
+
+// -- METHOD  :  RetrieveLegend
+//
+// -- PURPOSE : This method will retrieve the Legend
+//
+//         If there is no Legend it will go up to the Root 
+//         treeNode (the top of the tree) to retrieve
+//         the user's default Legend
+
+bool
+SuperPage::RetrieveLegend ( MvIcon& legIcon )
+{
+        bool usingDefault = false;
+
+	// Try to find a visdef associated to the presentable
+	if (!iconDataBase_->RetrieveIcon ( PRES_LEGEND_REL,presentableId_,legIcon ))
+		usingDefault = myParent_->RetrieveLegend(legIcon);
+
+	// It is a Legend default and I am the SuperPage
+	// Save Legend default in the DataBase
+	if ( usingDefault )
+	{
+		iconDataBase_->InsertIcon( PRES_LEGEND_REL,presentableId_ ,legIcon);
+
+		// The new request contains extra info (e.g. _ID)
+		//legIcon.SaveRequest(newReq);
+	}
+
+	return usingDefault;
+}
+
+#if 0
+void
+SuperPage::SetBackgroundDraw ( bool truefalse )
+{
+	backDrawEnabled_ = truefalse;
+//D	this->NotifyObservers();
+
+	//Temporary code to test the animation procedure
+	if (backDrawEnabled_)
+	{
+                // Draw only the first page (test)
+		MvChildIterator child = childList_.begin();
+		Page* page = (Page*) (*child);
+		page->DrawProlog();
+		page->Draw();
+
+		// Change PGRIB to GRIBLOOP
+		MvRequest fullReq;
+		GetAllRequests(fullReq);
+
+		MvRequest fullNewReq;
+		while (fullReq)
+		{
+			MvRequest newReq = fullReq.justOneRequest();
+			if ( strcmp(newReq.getVerb(),"PGRIB") == 0 )
+			{
+				newReq.setVerb("GRIBLOOP");
+			}
+			fullNewReq = fullNewReq + newReq;
+			fullReq.advance();
+		}
+
+                // Call MAGICS to process the request
+cout << "SuperPage::SetBackgroundDrawCCCCCCCC" << endl;
+fullNewReq.print();
+                MagPlusService::Instance().SetRequest( fullNewReq );
+	}
+}
+
+void
+SuperPage::PrintInfo ()
+{
+	cout << "SuperPage " << presentableId_ << endl;
+	MvChildIterator child = childList_.begin();
+	while ( child != childList_.end() )
+	{
+		Page *page = (Page*) (*child);
+		page->PrintInfo(); 
+
+		++child;
+	}
+}
+#endif
+
+int
+SuperPage::IncrementPrintIndex ()
+{
+	printIndex_++;
+	return printIndex_;
+}
+
+#if 0
+void
+SuperPage::ZoomRequest( int treeNodeId, const Location& zoomCoord )
+{
+	// Find which child to send the information
+	MvChildConstIterator child;
+	for (child = childList_.begin(); child != childList_.end(); ++child)
+	{
+		if ( treeNodeId == (*child)->Id() )
+		{
+			// Update page geographical area
+			Page *page = (Page*) (*child);
+			page->ZoomRequest(zoomCoord);
+
+			// Rebuild page request
+         page->HasDrawTask(true);
+         page->DrawTask();
+
+            // Process pending actions
+            TaskBase::Flush();
+            return;
+        }
+    }
+
+    PlotMod::Instance().UserMessage ( "Page to perform the zoom not found" );
+}
+#endif
+
+void
+SuperPage::ZoomRequest( int treeNodeId, const string& zoomInfo)
+{
+    // Find which child to send the information
+    MvChildConstIterator child;
+    for (child = childList_.begin(); child != childList_.end(); ++child)
+    {
+        if ( treeNodeId == (*child)->Id() )
+        {
+            // Update page info
+            Page *page = (Page*) (*child);
+            page->ZoomRequest(zoomInfo);
+
+            // Rebuild page request
+            page->HasDrawTask(true);
+            page->DrawTask();
+            return;
+        }
+    }
+
+    PlotMod::Instance().UserMessage ( "Page to perform the zoom not found" );
+}
+
+void
+SuperPage::ZoomRequest( int treeNodeId, int izoom )
+{
+   // Find which child to send the information
+   MvChildConstIterator child;
+   for (child = childList_.begin(); child != childList_.end(); ++child)
+   {
+      if ( treeNodeId == (*child)->Id() )
+      {
+         // Update page geographical area
+         Page *page = (Page*) (*child);
+         page->ZoomRequest(izoom);
+
+         // Rebuild page request
+         page->HasDrawTask(true);
+         page->DrawTask();
+         return;
+      }
+   }
+
+   PlotMod::Instance().UserMessage ( "Page to perform the zoom not found" );
+}
+
+bool
+SuperPage::UpdateLayerTransparency ( int id, int value)
+{
+    // Retrieve the Icon Data Base
+    MvIconDataBase& dataBase = this->IconDataBase();
+
+    // Update transparency value in the data base
+    return dataBase.UpdateLayerTransparency( id, value );
+}
+
+bool
+SuperPage::UpdateLayerVisibility ( int id, bool onoff)
+{
+    // Retrieve the Icon Data Base
+    MvIconDataBase& dataBase = this->IconDataBase();
+
+    // Update transparency value in the data base
+    return dataBase.UpdateLayerVisibility( id, onoff );
+}
+
+bool
+SuperPage::UpdateLayerStackingOrder ()
+{
+    // Retrieve the Icon Data Base
+    MvIconDataBase& dataBase = this->IconDataBase();
+
+    // Update transparency value in the data base
+    return dataBase.UpdateLayerStackingOrder();
+}
+
+bool
+SuperPage::ExportPlot ( MvRequest* req )
+{
+	MvRequest inReq = *req;
+
+	// Create printer request
+	MvRequest printerReq( "PRINTER_MANAGER" );
+	printerReq("DESTINATION") = MVFILE;
+	printerReq("OUTPUT_DEVICES") = inReq;
+
+	// Retrieve current plot request without output formats
+	MvRequest plotReq;
+	GetAllRequests( plotReq );
+
+	// Create the full request: output formats + plot requests
+	MvRequest newReq = printerReq + plotReq;
+
+	// Call uPlotBatch to do the job
+	MvApplication::callService ( "uPlotBatch", newReq, 0 );
+
+	return true;
+}
+
+void
+SuperPage::PrintFile ( MvRequest& req )
+{
+	// Create output format request
+	MvRequest driverReq("PSOUTPUT");
+	string fileName = tempnam(getenv("METVIEW_TMPDIR"),"plot");
+	fileName += ".ps";
+	driverReq("OUTPUT_FULLNAME") = fileName.c_str();
+	if ( (const char*)req("_OUTPUT_FRAME_LIST") )
+	{
+		for ( int i = 0; i < req.countValues("_OUTPUT_FRAME_LIST"); i++ )
+		driverReq.addValue("OUTPUT_FRAME_LIST",(int)req("_OUTPUT_FRAME_LIST",i));
+		req.unsetParam(("_OUTPUT_FRAME_LIST"));
+	}
+
+	// Create printer request
+	MvRequest printerReq = req;
+	printerReq("OUTPUT_DEVICES") = driverReq;
+
+	// Retrieve current plot requests
+	MvRequest fullReq;
+	GetAllRequests( fullReq );
+
+	// Create the full request: printer request + plot requests
+	MvRequest newReq = printerReq + fullReq;
+
+	// Call uPlotBatch to do the job
+	MvApplication::callService ( "uPlotBatch", newReq, 0 );
+
+	return;
+}
+
+Page*
+SuperPage::InsertOnePage(MvRequest& superpageRequest)
+{
+	// Retrieve the subrequest describing the Page
+	MvRequest pagesRequest = superpageRequest.getSubrequest ( PAGES );
+
+	// Check if the request is a PAGE request
+	// If it does not exist, create one PAGE request
+	const char* pageVerb = pagesRequest.getVerb();
+	if ( strcmp(pageVerb,PLOTPAGE) )
+		pagesRequest = ObjectList::CreateDefaultRequest ( "PLOT_PAGE" );
+
+	// Create a new Page 
+	// and insert it as a child of the superpage
+	// Extract the page request 
+	MvRequest newpageRequest = pagesRequest.justOneRequest();
+
+	// Create a new page
+	Page* page = new Page ( newpageRequest );
+	ensure ( page != 0 );
+		
+	// Insert the page in the superpage's child list
+	this->Insert ( page );
+
+	// Create and store the device information	
+	this->SetDeviceInfo ( );
+
+	return page;
+}
+
+void
+SuperPage::contentsRequest( MvRequest& req)
+{
+    // Find which child to send the information
+    int treeNodeId = req("DROP_ID");
+    MvChildConstIterator child;
+    for (child = childList_.begin(); child != childList_.end(); ++child)
+    {
+        if ( treeNodeId == (*child)->Id() )
+        {
+            // Update page geographical area
+            Page *page = (Page*) (*child);
+            page->contentsRequest(req);
+
+            // Rebuild page request
+            page->HasDrawTask(true);
+            page->DrawTask();
+            return;
+        }
+    }
+
+     PlotMod::Instance().UserMessage ( "Page to perform the zoom not found" );
+}
diff --git a/src/uPlot/SuperPage.h b/src/uPlot/SuperPage.h
new file mode 100644
index 0000000..565db80
--- /dev/null
+++ b/src/uPlot/SuperPage.h
@@ -0,0 +1,328 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  SuperPage
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a concrete SuperPage class for the page hierarchy in PlotMod.
+//  The SuperPage class is an example a Component class 
+//  of the Composite "pattern".
+//
+//  Its methods allow for the insertion and removal of nodes and
+//  on a tree structure, and also for the drawing method.
+//
+//
+// .DESCRIPTION:
+//  Refer to the "Design Patterns" book, page 163 for more details
+//
+//
+// .DESCENDENT:
+//
+//
+// .RELATED:
+//  PlotMod, DataObject, SubPage, Text, Legend
+//  Builder, Visitor, Device, DataUnit
+//
+// .ASCENDENT:
+//  Presentable
+//
+#ifndef SuperPage_H
+#define SuperPage_H
+
+#include "Device.h"
+#include "Preferences.h"
+#include "Presentable.h"
+
+#ifndef NOMETVIEW_QT
+class uPlotBase;
+#endif
+
+class SuperPage : public Presentable {
+
+public:
+
+	// Constructors
+        SuperPage ( const MvRequest& inRequest );
+        SuperPage(const SuperPage&);
+
+        virtual Presentable* Clone() const { return new SuperPage(*this); }
+
+	// Destructor
+	~SuperPage();
+
+	// Methods
+	// Overriden from Presentable class
+
+	// Create a reply request for creation
+	virtual void CreateReply ( MvRequest& replyRequest );
+
+	// Respond to a drop action
+	virtual void Drop ( PmContext& context );
+
+	// Returns the preferences
+	virtual  Preferences& GetPreferences()
+		{ return preferences_ ; }
+
+	// Set print option: All subpages or visible ones only
+	virtual void PrintAll ( bool );
+	virtual bool PrintAll ();
+
+	// Return my Name
+	virtual string Name();
+
+//	virtual Cached SuperPageName()
+//		{ return this->Name(); }
+
+	virtual string MacroPlotIndexName(bool useIndex = false);
+
+	// Returns a pointer to the icon data base
+	virtual MvIconDataBase& IconDataBase() const
+		{ return *(iconDataBase_.get()); }
+
+//	virtual void    Close();
+        // Close all objects associated with the SuperPage
+
+	virtual void RemoveAllData ()
+		{ RemoveAllDataChildren (); }
+
+	virtual void Draw();
+	// Draws the superpage and all its children
+
+//	void EraseForeDraw ();
+	// Erase Foreground
+	
+     virtual void DrawProlog();
+     virtual void DrawTrailer( MvRequest& );
+
+     virtual void GetAllRequests( MvRequest& );
+
+//	virtual void HasReceivedNewpage( bool isLast );
+//		{ hasNewpage_ = true; }
+
+//	virtual int TreeDepth() 
+//		{ return 1; }
+
+	virtual bool IsVisible()
+		{ return true;}
+
+	// Implements the visitor pattern
+	virtual void Visit ( Visitor& v );
+
+	// Returns the device associated to the superpage
+	virtual Device& GetDevice() const
+		{ return *myDevice_; }
+
+	// Creates the device for the superpage
+	virtual void SetDeviceInfo ( const MvRequest& );
+	virtual void SetDeviceInfo ( );
+
+	// Indicates the size of the superpage
+	virtual PaperSize GetMySize ();
+
+#if 0
+
+	virtual void SetMySize ( double width, double height );
+	// Update superpage's size
+
+	virtual bool IsAWindow();
+	// indicates if the superpage is a window or a paper
+
+	virtual void  Print();
+	// Print the superpage 
+
+	virtual void  PrintPreview();
+	// preview the printing
+
+	virtual void  EditPrinterPreferences ();
+	// Setup the preferences according to the desired user setup
+
+	virtual void  EditInterfacePreferences ();
+	// Setup the preferences according to the desired user setup
+
+	virtual void  SetCursorType (CursorType option );
+	// Set the zoom option
+
+	virtual void  SetInputType (InputType option );
+	// Set the input option
+
+	virtual void  MouseMode ();
+	// Set the mouse mode
+
+	virtual void PostMessage ( const char* title, const char* message );
+	// Post a warning in the interface
+
+	virtual void PrintJob();
+	// Create a postscript file
+
+	virtual void PrintJob( string& );
+	// Create a postscript file 
+
+#endif
+
+         // Generate a description of the superpage's device
+	virtual void DescribeDevice ( ObjectInfo& myDescription );
+
+	// Generate a description of the superpage
+	virtual void DescribeYourself ( ObjectInfo& myDescription );
+
+	// Insert Visdef in the database
+	virtual void InsertVisDef ( MvRequest& visdefRequest );
+
+       // Call EraseDraw for all children
+        virtual void EraseDraw ( int visdefId = 0 );
+
+//	virtual void UpdateWidget ( MvRequest& inRequest, const int treeNodeId, int& newTreeNodeId );
+	// Update SuperPage Widget
+
+	// Retrieve the PText list - type title -
+	// If failed, retrieves the root's PText list (default)
+	virtual bool RetrieveTextTitle ( MvIconList& );
+
+	// Retrieve the Legend
+	// If failed, retrieves the root's Legend (default)
+	virtual bool RetrieveLegend ( MvIcon& );
+
+	// Zoom methods
+	//virtual void ZoomRequest ( int id, const Location& zoomCoord );
+	virtual void ZoomRequest ( int id, const string& );
+	virtual void ZoomRequest ( int id, int izoom );
+
+    // Layer methods
+    virtual bool UpdateLayerTransparency  ( int, int  );
+    virtual bool UpdateLayerVisibility    ( int, bool );
+    virtual bool UpdateLayerStackingOrder (  );
+
+// --  Internal methods
+
+//	void  SetMacroType ( MacroType type )
+//		{ macroType_ = type; }
+	// Indicates what is the type of macro  
+
+//	void  SetZoomPageId ( int id )
+//		{ zoomPageId_ = id; }
+
+	// Generate a new macro file based on the plot displayed on the screen
+	void GenerateMacro();
+
+	// Provide a list of the names of the pages
+	string ListMyPages();
+
+//	void PrintingFinished ( MvRequest& );
+	// Complete the printing job - tell the user
+
+//	void SaveInFile();
+	// Save the contents of the superpage in a file
+
+	virtual void PendingDrawingsAdd ()
+		{ pendingDrawings_++; }
+
+	virtual void PendingDrawingsRemove ()
+		{ pendingDrawings_--; }
+
+//	virtual bool DrawingIsFinished()
+//		{ return  (  pendingDrawings_ == 0 ) && 
+//			  (  hasNewpage_  == true  ); }
+
+	// Returns the number of SuperPages for this SuperPage
+ 	virtual int PageIndex ()
+		{ return superPageIndex_; }
+
+	// Returns the number of paper pages
+	virtual int PaperPageIndex () 
+		{ return paperPageIndex_; }
+
+ 	// Sets the number of paper pages
+	virtual void PaperPageIndex ( int paperPageIndex ) 
+		{ paperPageIndex_ = paperPageIndex; }
+
+	// Increments and returns the number of pictures printed
+	virtual int IncrementPrintIndex ( );
+
+//        virtual void NeedsRedrawing ( bool yesno );
+
+//        virtual bool NeedsRedrawing ();
+
+//        virtual void RedrawIfWindow(int visdefId = 0);
+        // Sets redrawing flags and does AddTask if needed.
+
+	virtual void RemoveIcon ( MvIcon& );
+
+//	virtual void SetInputPresentableId ( int );
+
+//	virtual void SetBackgroundDraw ( bool );
+
+//	virtual bool GetBackgroundDraw ()
+//		{ return backDrawEnabled_; }
+
+//	virtual void PrintInfo ();
+
+	// Dealing with Export plotting
+	// Save a copy of the plotting
+	virtual bool ExportPlot ( MvRequest* );
+
+	// Dealing with Print plotting
+	// Recreate the plotting and send it to a given printer
+	virtual void PrintFile ( MvRequest& );
+
+	// Insert one Page
+	virtual Page* InsertOnePage ( MvRequest& );
+
+    // Dealing with Contents tools
+    virtual void contentsRequest( MvRequest& );
+    
+#ifndef NOMETVIEW_QT     
+        static void setPlotApplication(uPlotBase * pa) {plotApplication_=pa;}
+#endif
+
+  private:
+
+    // Copy Constructor and Operator=
+    SuperPage& operator=(const SuperPage&);
+
+    // Members
+    PaperSize                 size_;            // size of superpage in paper coords (cms)
+    string                    macroFileName_;   // name of the macro file which is produced
+    auto_ptr <MvIconDataBase> iconDataBase_;    // icon data base (one per superpage)
+    auto_ptr <Device>         myDevice_;        // device (plot media)
+    Preferences               preferences_;     // preferences associated to the superpage
+
+#if 0
+	MacroType                 macroType_;       // type of macro generated
+
+	int                       zoomPageId_;      // page to be zoomed
+
+	bool                      printPreview_;    // controls the previewing
+
+	bool                      contentsActive_;  // controls the contents visitor display
+#endif
+
+    int                       pageIndex_;       // number of pages used in Macro generation
+
+    int                       superPageIndex_;  // number of Super Pages for this SuperPage,
+                                                // incremented when receives New Page in a macro
+    int                       paperPageIndex_;  // number of paper pages used for this SuperPage
+
+//	bool			  backDrawEnabled_; // true if background drawing is enabled
+
+    static int                nrSuperPages_;    // Total number of superpages currently active;
+    int  printIndex_;      // Number of pictures printed
+    
+#ifndef NOMETVIEW_QT 
+    static uPlotBase *plotApplication_;    
+#endif
+   
+    
+};
+
+#endif
diff --git a/src/uPlot/Task.cc b/src/uPlot/Task.cc
new file mode 100644
index 0000000..21af790
--- /dev/null
+++ b/src/uPlot/Task.cc
@@ -0,0 +1,142 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "Task.h"
+
+#ifdef PM_USE_THREADS
+#include "Mutex.hpp"
+#endif
+
+// -- Lists for holding tasks
+//    pendingTaskList: holds the tasks to be processed first
+//    cleanupTaskList: holds the taks to be processed in the end
+
+PendingTaskList TaskBase::pendingTaskList_;
+PendingTaskList TaskBase::cleanupTaskList_;
+
+TaskBase::TaskBase()
+{
+	// Empty
+}
+
+TaskBase::~TaskBase()
+{
+	// Empty
+}
+
+void
+TaskBase::RegisterTask ( TaskBase* task )
+{
+#ifdef PM_USE_THREADS
+	glMutex.Lock();
+#endif
+	pendingTaskList_.push_back ( task );
+
+#ifdef PM_USE_THREADS
+	glMutex.Unlock();
+#endif
+}
+
+// Register a task on the cleanup list
+void 
+TaskBase::RegisterCleanUpTask ( TaskBase*  task )
+{
+	cleanupTaskList_.push_back ( task );
+}
+
+void*
+TaskBase::Run(void *)
+{
+	PendingTaskList:: iterator t;
+
+	for (  t = pendingTaskList_.begin();
+		t != pendingTaskList_.end(); ++t )
+	{
+		// Execute the tasks
+		(*t)->Execute();
+
+		// delete the task element
+		TaskBase *pt =  *t;
+		delete pt;
+
+		// make the element of the list point to zero
+	        (*t) = 0;
+	}
+
+	return 0;
+}
+
+void
+TaskBase::Flush()
+{
+	TaskBase::FlushPending();
+	TaskBase::FlushCleanUp();
+}
+
+// -- Flush Pending
+//    execute all pending tasks (called first)
+void 
+TaskBase::FlushPending()
+{
+
+#ifdef PM_USE_THREADS
+	pthread_attr_t attr;
+	pthread_attr_init(&attr);
+	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+	pthread_t thread;
+	pthread_create(&thread,&attr,TaskBase::Run,0);
+	pthread_attr_destroy(&attr);
+#else
+
+	PendingTaskList:: iterator t;
+
+	for (  t = pendingTaskList_.begin();
+		t != pendingTaskList_.end(); ++t )
+	{
+		// Execute the tasks
+		(*t)->Execute();
+
+		// delete the task element
+		TaskBase *pt =  *t;
+		delete pt;
+
+		// make the element of the list point to zero
+	        (*t) = 0;
+
+	}
+
+	pendingTaskList_.clear();
+#endif
+
+}
+
+// -- Flush CleanUp
+//
+// Execute all clean up tasks (called in the end)
+void 
+TaskBase::FlushCleanUp()
+{
+	PendingTaskList::iterator t;
+
+	for (  t = cleanupTaskList_.begin();
+		t != cleanupTaskList_.end(); ++t )
+	{
+		// Execute the tasks
+		(*t)->Execute();
+
+		// delete the task element
+		TaskBase *pt =  *t;
+		delete pt;
+
+		// make the element of the list point to zero
+	        (*t) = 0;
+	}
+
+	cleanupTaskList_.clear();
+}
diff --git a/src/uPlot/Task.h b/src/uPlot/Task.h
new file mode 100644
index 0000000..f2ab5ec
--- /dev/null
+++ b/src/uPlot/Task.h
@@ -0,0 +1,125 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Task
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Provide support for handling a list of tasks. 
+//  The idea is that there are some lengthy tasks which should
+//  better be delayed. Therefore, these tasks are placed in a queue
+//  and are executed at a covenient moment.
+//
+//  A task consists of an object and a called procedure. 
+//  Executing a task is done by calling "object->Proc()"
+// .CLIENTS:
+//  Page, SubPage (which ask for a new drawing)
+//
+//
+// .RESPONSABILITIES:
+//
+//  1. Put tasks in a task list 
+//
+//  2. Execute all tasks in the list  
+//     when the "Flush" method is called
+//
+// .COLLABORATORS:
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef TaskList_H
+#define TaskList_H
+
+#include <inc_stl.h>
+
+class TaskBase;
+
+typedef list < TaskBase* > PendingTaskList;
+
+class TaskBase {
+
+public:
+
+	// Contructors
+	TaskBase();
+
+	// Destructor
+	virtual ~TaskBase(); // Change to virtual if base class
+
+	// Abstract method which should be supplied by the derived class
+	virtual void Execute() = 0;
+
+	// Execute all tasks in the list
+	static void Flush();
+
+	// Execute all pending tasks (called first)
+	static void FlushPending();
+
+	// Execute all clean up tasks (called in the end)
+	static void FlushCleanUp();
+
+	// Register a task on the pending list
+	static void RegisterTask ( TaskBase* );
+
+	// Register a task on the cleanup list
+	static void RegisterCleanUpTask ( TaskBase* );
+
+private:
+
+	// List of tasks to be executed first
+	static PendingTaskList     pendingTaskList_;
+
+	// List of tasks to be executed on cleanup
+	static PendingTaskList     cleanupTaskList_;
+
+	// Method used when in multi_thread mode
+	static void* Run(void*);
+};
+
+template <class T>
+class Task : public TaskBase
+{
+	T&        calledObject_;
+	typedef void(T::* Procedure)();
+	Procedure calledProc_;
+
+public:
+	Task ( T& object, Procedure proc) : 
+		calledObject_( object ), calledProc_( proc ) {}
+
+	// Execute - calls object->procedure
+	virtual void Execute ()
+		{ (calledObject_.*calledProc_)(); }
+};
+
+template<class T>
+void AddTask ( T& object, void(T::*proc)() )
+{
+	TaskBase::RegisterTask ( new Task<T>(object,proc));
+}
+
+template<class T>
+void AddCleanUpTask ( T& object, void(T::*proc)() )
+{
+	TaskBase::RegisterCleanUpTask ( new Task<T>(object,proc));
+}
+
+#endif
diff --git a/src/uPlot/VertProfView.cc b/src/uPlot/VertProfView.cc
new file mode 100644
index 0000000..f78979d
--- /dev/null
+++ b/src/uPlot/VertProfView.cc
@@ -0,0 +1,124 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Methods for class VertProfView
+
+#include "VertProfView.h"
+#include "ObjectList.h"
+#include "Root.h"
+
+//----------------------------------------------------------
+class VertProfViewFactory : public PlotModViewFactory
+{
+    // --  Virtual Constructor - Builds a new VertProfView
+    virtual PlotModView* Build ( Page& page,
+                                 const MvRequest& contextRequest,
+                                 const MvRequest& setupRequest ) 
+    {
+        // Expand request
+        MvRequest expReq = ObjectList::ExpandRequest(contextRequest,EXPAND_DEFAULTS);
+
+        return new VertProfView ( page, expReq, setupRequest );
+    }
+
+public:
+
+    VertProfViewFactory() : PlotModViewFactory ( "VertProfView" ) {}
+};
+
+static VertProfViewFactory vertprofViewFactoryInstance;
+
+//---------------------------------------------------------
+
+VertProfView::VertProfView ( Page& owner,
+                             const MvRequest& viewRequest,
+                             const MvRequest& setupRequest ):
+              CommonXSectView ( owner, viewRequest, setupRequest)
+{
+    ApplicationName("PM_VPROF");
+    SetVariables(viewRequest,true);
+}
+
+VertProfView::VertProfView (const VertProfView& old) :
+              CommonXSectView ( old )
+{
+}
+
+string VertProfView::Name()
+{
+    int id =  Owner().Id();
+    string name =  (const char*)ObjectInfo::ObjectName ( viewRequest_, "VertProfView", id );
+
+    return name ;
+}
+
+void VertProfView::DescribeYourself ( ObjectInfo& description )
+{
+#if 0
+  // convert my request to macro
+  set<Cached> skipSet;
+ 
+  description.ConvertRequestToMacro ( viewRequest_, PUT_END,
+                      MacroName(),"xsectview",skipSet);
+#endif
+}
+
+void VertProfView::SetVariables(const MvRequest &in, bool setMembers)
+{
+    #if 0
+    char param[10];
+    if ( in.countValues("LINE") )
+        strcpy(param,"LINE");
+    else
+        strcpy(param,"AREA");
+
+    if ( setMembers )
+    {
+        latMin_ = in(param,0);
+        latMax_ = in(param,2);
+        lonMin_ = in(param,1);
+        lonMax_ = in(param,3);
+    }
+    else
+    {
+        viewRequest_.unsetParam("LINE");
+        viewRequest_.addValue("LINE",(double)in(param,0));
+        viewRequest_.addValue("LINE",(double)in(param,1));
+        viewRequest_.addValue("LINE",(double)in(param,2));
+        viewRequest_.addValue("LINE",(double)in(param,3));
+    }
+    #endif
+}
+
+void VertProfView::UpdateView ()
+{
+    if ( string(viewRequest_.getVerb()) == CARTESIANVIEW )
+    {
+        // Delegate the x-axis min/max definition to the data
+        viewRequest_("X_AUTOMATIC") = "on";
+        return;
+    }
+
+    // Translate X coordinates
+    MvRequest cartView("CARTESIANVIEW");
+    cartView("X_AUTOMATIC")     = "off";
+    cartView("X_AXIS_TYPE")     = "regular";
+
+    // Translate Y coordinates
+    cartView("Y_AUTOMATIC") = "off";
+    cartView("Y_AXIS_TYPE") = "regular";
+    cartView("Y_MIN")       = yMin_;
+    cartView("Y_MAX")       = yMax_;
+
+    // Update request
+    viewRequest_ = cartView;;
+
+    // Indicate that the plotting tree needs to be rebuilt
+    Root::Instance().Refresh(false);
+}
diff --git a/src/uPlot/VertProfView.h b/src/uPlot/VertProfView.h
new file mode 100644
index 0000000..0bc8622
--- /dev/null
+++ b/src/uPlot/VertProfView.h
@@ -0,0 +1,83 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  VertProfView
+//
+// .AUTHOR:
+//  Geir Austad and Gilberto Camara
+//    Modified by Fernando Ii 03-2012
+//
+// .SUMMARY:
+//  Describes the VertProfView class, which deals with
+//  vertical profile application
+//
+// .CLIENTS:
+//  Page
+//
+// .RESPONSIBILITY:
+//
+//  - When receiving a drop or a request in a page associated
+//    to a service view, call the service to process the request
+//
+//  - When the application is finished, pass the request sent
+//    by the application to the presentable, which then should 
+//    perform the data matching
+//
+//  
+// .COLLABORATORS:
+//  MvTask - communication with METVIEW modules
+//
+// .ASCENDENT:
+//  PlotModView, PlotModTable
+//
+// .DESCENDENT:
+//
+//
+//
+#ifndef VertProfView_H
+#define VertProfView_H
+
+#include "CommonXSectView.h"
+
+class VertProfView: public CommonXSectView
+{
+public:
+
+    // -- Constructors
+    VertProfView( Page&, const MvRequest&, const MvRequest& );
+    VertProfView(const VertProfView&);
+    virtual PlotModView *Clone() const { return new VertProfView(*this); }
+
+    // -- Destructor
+    ~VertProfView() {}
+
+    // --   Methods overriden from CurveView class
+    virtual string Name();
+
+  // Draw the background (axis )
+    virtual void DrawBackground ( ) {}
+
+    // Describe the contents of the view
+    virtual void DescribeYourself ( ObjectInfo& description );
+
+    // Initialize some variable members
+    virtual void SetVariables(const MvRequest&, bool);
+
+    // Update the current view
+    virtual void UpdateView ( MvRequest& ) {}
+    virtual void UpdateView ();
+
+private:
+
+    // No assignment
+    VertProfView& operator=(const VertProfView&);
+};
+#endif
diff --git a/src/uPlot/Visitor.h b/src/uPlot/Visitor.h
new file mode 100644
index 0000000..6700eca
--- /dev/null
+++ b/src/uPlot/Visitor.h
@@ -0,0 +1,76 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:
+//  Visitor
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudouin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  An abstract base class for definition of a "Visitor" pattern
+//
+//
+// .CLIENTS:
+//  Presentable
+//
+//
+// .RESPONSABILITIES:
+//  Provide an interface for the subclasses which visit the
+//  page hierarchy
+//
+//
+// .COLLABORATORS:
+//
+//
+// .BASE CLASS:
+//
+//
+// .DERIVED CLASSES:
+//  Device, MacroVisitor
+//
+// .REFERENCES:
+//  The relation between
+//
+#ifndef Visitor_H
+#define Visitor_H
+
+class SuperPage;
+class Page;
+class SubPage;
+
+class Visitor {
+public:
+
+	// Contructors
+	Visitor() {}
+
+	// Destructor
+	virtual ~Visitor() {}
+
+	//  Visitor methods
+	virtual void Visit ( SuperPage& ) = 0;
+
+	virtual void Visit ( Page& ) = 0;
+
+	virtual void Visit ( SubPage& ) = 0;
+
+//	virtual void Visit ( MagnifyPage& ) = 0;
+
+//	virtual void Visit ( EditMapPage& ) = 0;
+
+private:
+
+	// No copy allowed
+	Visitor(const Visitor&);
+	Visitor& operator=(const Visitor&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/XDevice.cc b/src/uPlot/XDevice.cc
new file mode 100644
index 0000000..e7a379f
--- /dev/null
+++ b/src/uPlot/XDevice.cc
@@ -0,0 +1,321 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <Assertions.hpp>
+
+#include "XDevice.h"
+#include "GraphicsEngine.h"
+#include "SubPage.h"
+
+// class XDeviceFactory - builds X Devices
+class XDeviceFactory : public DeviceFactory
+{
+	virtual Device* Build( const MvRequest& deviceRequest ) 
+		{ return new XDevice( deviceRequest ); }
+
+public:
+	XDeviceFactory( const Cached& name) : DeviceFactory( name ) {}
+};
+
+// Instance of XDevice which is loaded in the "factory"
+static XDeviceFactory x11DeviceFactoryInstance ( "SCREEN" );
+
+#if 0
+/////// Event handlers  and translations //////////////////////////
+
+// For setting up translations in the subpages. The action function
+// needs access to the SubPage object, therefore it's done here 
+// rather than in OpenGLCanvas that handles other input ( zooming etc).
+static char scrollTranslations[] = 
+"<Enter>: EnterProc()\n\
+<Leave>: LeaveProc()\n\
+Ctrl<Btn1Down>,Ctrl<Btn1Up>: ScrollProc(b)\n\
+Ctrl<Btn3Down>,Ctrl<Btn3Up>: ScrollProc(f)\n\
+<Motion>: MotionProc()";
+    
+static XtActionsRec scrollActions[] = 
+{
+	{ "EnterProc" , XDevice::EnterProc  } ,
+	{ "LeaveProc" , XDevice::LeaveProc  } ,
+	{ "ScrollProc", XDevice::ScrollProc } ,
+	{ "MotionProc", XDevice::MotionProc } 
+};
+static XtTranslations  parsed_xlations;
+
+// Event handler called before a subpage is mapped 
+// ( for scrolling/animation).
+// This redraws the contents before it's shown, getting rid of
+// the flickers that would otherwise be there. Eventmask is
+// MapNotify
+void XDevice::SubPageMappedHandler ( Widget, XtPointer clientData, 
+				     XEvent *event, Boolean * )
+{
+	OpenGLCanvas* self = (OpenGLCanvas*) clientData;
+
+	if ( event->type == MapNotify )
+		// Redraw the window if it's getting mapped.
+		self->ExposeProc();
+}
+
+// Event handler called when a subpage visibility status changes.
+// When an icon is dragged over a page, it gets no Expose, 
+// so it does not refresh properly.
+// This handler makes sure it redraws itself in these cases, 
+// so we don't leave traces of the dragged icon.
+// Eventmask is VisibilityNotify.
+void XDevice::RedrawCanvasHandler ( Widget, XtPointer clientData, 
+				    XVisibilityEvent *event, Boolean * )
+{
+	OpenGLCanvas* self = (OpenGLCanvas*)clientData;
+
+	if ( event->type  == VisibilityNotify && 
+	     event->state != VisibilityFullyObscured )
+	{
+		// Redraw the window if visibility status changing
+//F		self->ExposeProc(); //It seems that it is no longer needed
+	}
+}
+
+// Action proc for scrolling using keybd/mouse. Should possibly
+// be taken away, or integrated with the Scrollvisitor stuff.
+void XDevice::ScrollProc ( Widget w, XEvent *,
+			   String *params, Cardinal * )
+{
+	SubPageWidget* subPageWidget;
+  
+	XtVaGetValues ( w, XmNuserData, &subPageWidget, NULL );
+  
+	PresentableWidget& pageWidget = subPageWidget->Parent();
+	Presentable& page = pageWidget.Owner();
+
+	switch(params[0][0])
+	{
+	case 'f':
+		page.GotoNext();
+		break;
+
+	case 'b':
+		page.GotoPrevious();
+		break;
+	}
+}
+
+// Ensure that Canvas is redrawn when pointer enters window
+// Prevents background to be shown when draging any object over canvas
+void XDevice::EnterProc ( Widget w, XEvent *,
+			  String *, Cardinal * )
+{
+	PresentableWidget* presentableWidget;
+	XtVaGetValues ( w, XmNuserData, &presentableWidget, NULL );
+
+	Canvas& canvas = presentableWidget->GetCanvas();
+	canvas.ExposeProc ();
+
+	// Set Scroll button (if it is possible)
+//	presentableWidget->SetScrollButton (true);
+}
+
+// Removes Coordinates window when leaving a Window
+void XDevice::LeaveProc ( Widget w, XEvent *,
+			  String *, Cardinal * )
+{
+	PresentableWidget* presentableWidget;
+	XtVaGetValues ( w, XmNuserData, &presentableWidget, NULL );
+
+	Canvas& canvas = presentableWidget->GetCanvas();
+	canvas.OnLeave ();
+
+	// Unset scroll button
+//	presentableWidget->SetScrollButton ( false );
+}
+
+// Captures pointer motion inside window
+void XDevice::MotionProc ( Widget widget, XEvent* event,
+			   String*, Cardinal*  )
+{
+	XmAnyCallbackStruct cb_struct;
+
+	cb_struct.reason = 0;
+	cb_struct.event = event;
+
+	XtCallCallbacks( widget, GLwNinputCallback, (XtPointer) &cb_struct );
+}
+#endif
+///////////////////////////////////////////////////////////////
+
+XDevice::XDevice ( const MvRequest& deviceRequest ):
+	Device ( deviceRequest )
+{
+	// Empty
+}
+
+XDevice::~XDevice()
+{
+	// Empty
+}
+
+// -- Implementation of the "Visitor" pattern
+// -- Each type of node associated to widgets (superpage, page and subpage)
+//    is visited by the "XDevice" object, which performs the appropriate action
+//    of creating the widgets associated with each presentable
+void
+XDevice::Visit ( SuperPage& )
+{
+cout << "XDevice::Visit(Superpage) -> EMPTY CODE" << endl;
+#if 0
+	// Create a new superpage widget (includes a main window)
+	// and save this information as the superpage's device data
+	SuperPageWidget* spw =  new SuperPageWidget ( superpage );
+	ensure ( spw != 0);
+
+	superpage.SetDeviceData ( spw );
+
+	// Save superpage widget
+	Widget wid = spw->GetWidget();
+	PlotModApp::Instance().SetMagPlusWidget(wid);
+#endif
+}
+
+void
+XDevice::Visit ( Page& )
+{
+cout << "XDevice::Visit(Page) -> EMPTY CODE" << endl;
+#if 0
+	// Find out the widget associated to the superpage
+	const Presentable* parent = page.Parent();
+	PresentableWidget* parentWidget = (PresentableWidget*) parent->GetDeviceData(); 
+	ensure ( parentWidget != 0 );
+
+	// Create a new page widget (a form) and
+	// save this information as the page's device data
+	PageWidget * pw = new PageWidget ( page, parentWidget );
+	ensure ( pw != 0 );
+
+	page.SetDeviceData ( pw );
+#endif
+}
+
+void
+XDevice::Visit ( SubPage& subpage )
+{
+#if 0
+	// Retrieval of the parent of the widget associated to the subpage
+	// (this is a safe cast since "DeviceData" is a completely opaque class)
+	const Presentable* parent = subpage.Parent();
+	PresentableWidget* parentWidget = (PresentableWidget*) parent->GetDeviceData(); 
+	ensure ( parent != 0 );
+
+	// Creation of a new subpage widget 
+	SubPageWidget* spw = new SubPageWidget ( subpage, parentWidget ) ;
+	ensure ( spw != 0 );
+
+	// Save superpage widget
+//	Widget wid = spw->GetWidget();
+//	PlotModApp::Instance().SetMagPlusWidget(wid);
+
+//	if ( subpage.IsVisible() )
+//		spw->Manage();
+#endif
+
+#if 1 //FAMI
+	// Creation a new canvas - there is one canvas per subpage.
+	if ( subpage.CheckCanvas() )
+		return;  // Canvas already created
+
+	GraphicsEngine& ge = subpage.GetGraphicsEngine();
+//U	XCanvas* canvas = ge.MakeXCanvas ( *this, spw, 
+	Canvas* canvas = ge.MakeCanvas ( *this, subpage.GetLocation(), subpage.GetMySize()  , subpage.Id()          );
+	ensure ( canvas != 0 );
+
+//U	subpage.SetDeviceData ( spw );
+	subpage.SetCanvas ( canvas );
+//U	spw->SetCanvas ( canvas );
+//FAMI	SetTranslations( (*canvas), spw );
+
+//FAMI	subpage.SetVisibility ( true );
+//U	spw->Manage();
+#endif
+
+#if 0 //FAMI
+	// Set up event handler to redraw the window when it's
+	// mapped. Passes the canvas as client data.
+	// This means that the expose proc will be called twice,
+	// once before the window is mapped, and once when it
+	// gets the expose event. It's quick anyway and the
+	// event handler is needed to make smooth scrolling/
+	// animation, because the glwdrawingarea doesn't preserve
+	// it's contents when it's unmapped/mapped.
+	XtAddEventHandler ( *spw, StructureNotifyMask  ,
+			    False, SubPageMappedHandler,
+			    (XtPointer) canvas           );
+
+	// Another event handler for when things are dragged over 
+	// the glwdrawingarea, because it doesn't refresh properly.
+	XtAddEventHandler ( *canvas, VisibilityChangeMask,
+			    False, 
+			    (XtEventHandler) RedrawCanvasHandler, 
+			    (XtPointer) canvas                   );
+#endif
+}
+
+#if 0
+void
+XDevice::Visit ( MagnifyPage& magPage )
+{
+	cout << "ERROR: SHOULD NOT COME HERE!!!!!!!!!" << endl;
+#if 0 //D
+	// Create a page widget which holds the canvas
+	MagnifyWidget* mw = new MagnifyWidget ( magPage );
+
+	magPage.SetDeviceData ( mw );
+
+	// Creation a new canvas
+	GraphicsEngine& ge = magPage.GetGraphicsEngine();
+	XCanvas* xcanvas = ge.MakeXCanvas ( *this, mw,
+					    magPage.GetLocation(),	 
+					    magPage.GetMySize()  ,
+					    magPage.Id() );
+	xcanvas->IsMagnifyWindow ( true );
+
+	magPage.SetCanvas ( xcanvas );
+
+	mw->SetCanvas ( xcanvas );
+#endif
+}
+
+void
+XDevice::Visit ( EditMapPage& editPage )
+{
+	// Create Main Widget
+	EditMapWidget* emw = new EditMapWidget ( editPage );
+
+	editPage.SetDeviceData ( emw );
+
+	// Creation a new canvas
+	GraphicsEngine& ge = editPage.GetGraphicsEngine();
+	XCanvas* xcanvas = ge.MakeXCanvas ( *this, emw,
+					    editPage.GetLocation(),	 
+					    editPage.GetMySize()  ,
+					    editPage.Id() );
+
+	editPage.SetCanvas ( xcanvas );
+
+	SetTranslations( (*xcanvas), emw );
+}
+
+void XDevice::SetTranslations (Widget w, const PresentableWidget* subPageWidget )
+{
+	parsed_xlations = XtParseTranslationTable ( scrollTranslations ); 
+	XtAppAddActions ( XtWidgetToApplicationContext (w), scrollActions,
+			  XtNumber (scrollActions) );
+	XtOverrideTranslations ( w, parsed_xlations );
+
+	XtVaSetValues ( w, XmNuserData, (XtPointer) subPageWidget, NULL );
+}
+#endif
diff --git a/src/uPlot/XDevice.h b/src/uPlot/XDevice.h
new file mode 100644
index 0000000..15a5395
--- /dev/null
+++ b/src/uPlot/XDevice.h
@@ -0,0 +1,88 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  XDevice
+//
+// .AUTHOR:
+//  Gilberto Camara, Baudoin Raoult and Fernando Ii
+//
+// .SUMMARY:
+//  Defines a class for creating devices associated
+//  with X Window System (see the Device class for 
+//  more information)
+//
+//
+// .CLIENTS:
+//  Presentable
+//
+//
+// .RESPONSABILITIES:
+//  Provide the creating of X-based widgets associated
+//  with each presentable
+//
+//
+// .COLLABORATORS:
+//  PresentableWidget
+//
+//
+// .BASE CLASS:
+//  Device
+//
+// .DERIVED CLASSES:
+//  (none)	
+//
+// .REFERENCES:
+//
+//
+#ifndef XDevice_H
+#define XDevice_H
+
+#include "Device.h"
+
+class XDevice: public Device {
+public:
+
+	// Contructors
+	XDevice( const MvRequest& deviceRequest );
+
+	// Destructor
+	~XDevice(); // Change to virtual if base class
+
+	// Visitor methods
+	virtual void Visit ( SuperPage& );
+	virtual void Visit ( Page& );
+	virtual void Visit ( SubPage& );
+#if 0
+	virtual void Visit ( MagnifyPage& );
+	virtual void Visit ( EditMapPage& );
+
+        // Add translations
+        void SetTranslations(Widget,const PresentableWidget*);
+        static void ScrollProc(Widget w, XEvent *,String *, Cardinal *);
+        static void MotionProc(Widget w, XEvent *,String *, Cardinal *);
+        static void EnterProc(Widget w, XEvent *,String *, Cardinal *);
+        static void LeaveProc(Widget w, XEvent *,String *, Cardinal *);
+      
+       // Event handlers for updating drawing area properly.
+       static void SubPageMappedHandler(Widget w, XtPointer clientData, 
+			      XEvent *event, Boolean *);
+
+       static void RedrawCanvasHandler(Widget w, XtPointer clientData, 
+				       XVisibilityEvent *event, Boolean *);
+#endif
+
+private:
+
+	// No copy allowed
+	XDevice(const XDevice&);
+	XDevice& operator=(const XDevice&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/XSectView.cc b/src/uPlot/XSectView.cc
new file mode 100644
index 0000000..a0d316d
--- /dev/null
+++ b/src/uPlot/XSectView.cc
@@ -0,0 +1,143 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// Methods for class XSectView
+//
+//
+// This is the exemplar object for the XSectView  class
+//
+
+#include "XSectView.h"
+#include <MvRequestUtil.hpp>
+#include "ObjectList.h"
+#include "Root.h"
+
+//--------------------------------------------------------
+class XSectViewFactory : public PlotModViewFactory 
+{
+    // --  Virtual Constructor - Builds a new XSectView
+    virtual PlotModView* Build ( Page& page,
+                                 const MvRequest& contextRequest,
+                                 const MvRequest& setupRequest )
+    {
+        // Expand request
+        MvRequest expReq = ObjectList::ExpandRequest(contextRequest,EXPAND_DEFAULTS);
+        return new XSectView ( page, expReq, setupRequest );
+    }
+
+public:
+
+    XSectViewFactory() : PlotModViewFactory ( "XSectView" ) {}
+};
+
+static XSectViewFactory xSectViewFactoryInstance;
+
+//------------------------------------------------------------
+
+XSectView::XSectView ( Page& owner,
+                       const MvRequest& viewRequest,
+                       const MvRequest& setupRequest ):
+           CommonXSectView ( owner, viewRequest, setupRequest )
+{
+    ApplicationName("PM_XSECT");
+    SetVariables(viewRequest,true);
+}
+
+XSectView::XSectView (const XSectView &old) :
+           CommonXSectView(old)
+{
+}
+
+string XSectView::Name()
+{
+    int id = Owner().Id();
+    string name =  (const char*)ObjectInfo::ObjectName ( viewRequest_, "XSectView", id );
+
+    return name ;
+}
+
+void XSectView::DescribeYourself ( ObjectInfo& description )
+{
+  // convert my request to macro
+  set<Cached> skipSet;
+ 
+  description.ConvertRequestToMacro ( appViewReq_, PUT_END,
+				      MacroName().c_str(),"mxsectview",skipSet);
+}
+
+// In request is either a view request, if view parameters have
+// changed, or a data info request.
+// Using  AREA as metadata for all lat/lon specification in
+// xsect/average/vprof.
+void XSectView::SetVariables(const MvRequest &in, bool setMembers)
+{
+    char param[10];
+    if ( in.countValues("LINE") )
+        strcpy(param,"LINE");
+    else
+        strcpy(param,"AREA");
+
+    if ( setMembers )
+    {
+        latMin_ = in(param,0);
+        latMax_ = in(param,2);
+        lonMin_ = in(param,1);
+        lonMax_ = in(param,3);
+    }
+    else
+    {
+        viewRequest_.unsetParam("LINE");
+        viewRequest_.addValue("LINE",(double)in(param,0));
+        viewRequest_.addValue("LINE",(double)in(param,1));
+        viewRequest_.addValue("LINE",(double)in(param,2));
+        viewRequest_.addValue("LINE",(double)in(param,3));
+    }
+}
+
+void XSectView::UpdateView ()
+{
+    // It has already been updated
+    if ( string(viewRequest_.getVerb()) == CARTESIANVIEW )
+        return;
+
+    // Translate geographical coordinates
+    MvRequest cartView("CARTESIANVIEW");
+    cartView("X_AUTOMATIC")     = "off";
+    cartView("X_AXIS_TYPE")     = "geoline";
+    cartView("X_MIN_LATITUDE")  = latMin_;
+    cartView("X_MAX_LATITUDE")  = latMax_;
+    cartView("X_MIN_LONGITUDE") = lonMin_;
+    cartView("X_MAX_LONGITUDE") = lonMax_;
+
+    // Translate Y coordinates
+    cartView("Y_AUTOMATIC") = "off";
+    const char* log = viewRequest_("PRESSURE_LEVEL_AXIS");
+    if ( log && strcmp(log,"LOG") == 0 )
+        cartView("Y_AXIS_TYPE") = "logarithmic";
+    else
+        cartView("Y_AXIS_TYPE") = "regular";
+
+    cartView("Y_MIN")       = yMin_;
+    cartView("Y_MAX")       = yMax_;
+
+    // Copy axis definition
+    cartView.setValue("HORIZONTAL_AXIS",viewRequest_.getSubrequest("HORIZONTAL_AXIS"));
+    cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("VERTICAL_AXIS"));
+
+    // Copy PAGE and SUBPAGE definition
+    CopySomeParameters( viewRequest_,cartView,"PAGE" );
+    CopySomeParameters( viewRequest_,cartView,"SUBPAGE" );
+
+    // Update request
+    viewRequest_ = cartView;;
+
+    // Indicate that the plotting tree needs to be rebuilt
+    Root::Instance().Refresh(false);
+}
+
diff --git a/src/uPlot/XSectView.h b/src/uPlot/XSectView.h
new file mode 100644
index 0000000..0dd28e5
--- /dev/null
+++ b/src/uPlot/XSectView.h
@@ -0,0 +1,100 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+//
+// .NAME:	
+//  XSectView
+//
+// .AUTHOR:
+//  Gilberto Camara and Fernando Ii
+//
+// .SUMMARY:
+//  Describes the XSectView class, which handles the
+//  matching issues related to the XSect View
+//
+//
+// .CLIENTS:
+//  DropAction
+//
+// .RESPONSIBILITY:
+//
+////  - When receiving a drop or a request in a page associated
+//    to a service view, call the service to process the request
+//
+//  - When the application is finished, pass the request sent
+//    by the application to the presentable, which then should 
+//    perform the data matching
+//
+//  
+// .COLLABORATORS:
+//  MvRequest - extracts information from the request
+//  MvTask - communication with METVIEW modules
+//
+// .DESCENDENT:
+//
+// .RELATED:
+//  Presentable, SuperPage, Page, DataObject
+//
+// .ASCENDENT:
+// ServiceView
+//
+
+#ifndef XSectView_H
+#define XSectView_H
+
+#include "CommonXSectView.h"
+
+class XSectView: public CommonXSectView {
+
+public:
+
+    // -- Constructors
+    XSectView( Page&, const MvRequest&, const MvRequest& );
+    XSectView(const XSectView&);
+    virtual PlotModView *Clone() const { return new XSectView(*this); }
+
+    // -- Destructor
+    ~XSectView() {} 
+
+    // -- Methods
+    // -- Overriden from CommonXSectView class
+    virtual string Name();
+
+    // Draw the background (axis )
+    virtual void DrawBackground ( ) {}
+
+    // Describe the contents of the view
+    virtual void DescribeYourself ( ObjectInfo& );
+
+    // Initialize some variable members
+    virtual void SetVariables(const MvRequest&, bool);
+
+    // Update view
+    virtual void UpdateView ();
+
+#if 0
+    // Input mode is LINE
+    virtual Cached InputMode () { return Cached ("LINE"); }
+
+    // Allow to change geography coordinates
+    virtual bool CanChangeGeography() { return true; }
+
+    // Check horizontal value
+    virtual bool CheckHorizontal(MvRequest &);
+
+    // Reset data members when stuff are removed from contents.
+    bool Reset(const MvRequest&);
+#endif
+
+private:
+
+    // No assignment
+    XSectView& operator=(const XSectView&);
+};
+#endif
diff --git a/src/uPlot/ZoomStacks.cc b/src/uPlot/ZoomStacks.cc
new file mode 100644
index 0000000..babe1f9
--- /dev/null
+++ b/src/uPlot/ZoomStacks.cc
@@ -0,0 +1,61 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "ZoomStacks.h"
+
+ZoomStacks::ZoomStacks () : zoomIndex_( -1 )
+{
+//empty constructor
+}
+
+ZoomStacks::~ZoomStacks ()
+{
+//empty destructor
+}
+
+void
+ZoomStacks::ClearAll ()
+{
+    while ( zoomGeodeticCoordStack_.empty () != true )
+        zoomGeodeticCoordStack_.pop_back ();
+
+    zoomIndex_ = -1;
+}
+
+string
+ZoomStacks::Get( int index )
+{
+    // Check input index
+    if ( zoomGeodeticCoordStack_.empty() || index >=  (int)zoomGeodeticCoordStack_.size() )
+    {
+        zoomIndex_ = -1;
+        return "";
+    }
+    else
+    {
+        zoomIndex_ = index;
+        return zoomGeodeticCoordStack_[index];
+    }
+}
+
+void
+ZoomStacks::GeodeticPush (const string& zinfo )
+{
+    // If this zoom is not related to the stack top position then
+    // remove elements from the stack
+    if ( zoomIndex_+1 < Size() )
+    {
+        for (int i = Size(); i > zoomIndex_+1; i-- )
+            zoomGeodeticCoordStack_.pop_back();
+    }
+
+    // Add new zoom to the stack
+    zoomGeodeticCoordStack_.push_back ( zinfo );
+    zoomIndex_++;
+}
diff --git a/src/uPlot/ZoomStacks.h b/src/uPlot/ZoomStacks.h
new file mode 100644
index 0000000..c88ec79
--- /dev/null
+++ b/src/uPlot/ZoomStacks.h
@@ -0,0 +1,90 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+// .NAME:
+//  ZoomStacks
+//
+// .AUTHOR:
+//  Laercio M, Namikawa and Lubia Vinhas
+//  Modified by Fernando Ii to adapt to uPlot environment
+//
+// .SUMMARY:
+//  A class for handling stacks with window coordinates 
+//  associated with X Window System. It stores world
+//  and geodetic coordinates and performs Undo and Redo
+//  operations
+//
+//
+// .CLIENTS:
+//  XCanvas, OpenGLCanvas
+//
+//
+// .RESPONSABILITIES:
+//  Handle coordinates stacks for X/Motif drawing areas
+//
+//
+// .COLLABORATORS:
+//
+//
+// .DERIVED CLASSES:
+//
+//
+// .REFERENCES:
+//
+//
+#ifndef ZoomStacks_H
+#define ZoomStacks_H
+
+#include <inc_stl.h>
+
+using namespace std;
+
+class ZoomStacks {
+public:
+
+    // Contructors
+    ZoomStacks();
+
+    // Destructor
+    ~ZoomStacks();
+
+    // Methods
+    void ClearAll();
+
+    // Insert a new element
+    void GeodeticPush ( const string& );
+
+    // Stack size
+    int Size()
+        { return zoomGeodeticCoordStack_.size(); }
+
+    // Set/Get current zoom position
+    void Current( int index )
+        { zoomIndex_ = index; }
+
+    int Current()
+        { return zoomIndex_; }
+
+    // Get an element
+    string Get( int ipos );
+
+protected:
+
+    // Methods ( local to the class )
+    vector <string> zoomGeodeticCoordStack_;
+    int zoomIndex_;   // 0 - original area, 1 - first zoom, ...
+
+private:
+
+    // No copy allowed
+    ZoomStacks(const ZoomStacks&);
+    ZoomStacks& operator=(const ZoomStacks&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/geoSelect.qrc b/src/uPlot/geoSelect.qrc
new file mode 100644
index 0000000..f936fbb
--- /dev/null
+++ b/src/uPlot/geoSelect.qrc
@@ -0,0 +1,10 @@
+<RCC>
+  <qresource prefix="geoSelect" >
+    <file alias="select_all.svg">../images/select_all.svg</file>
+    <file alias="select_rect.svg">../images/select_rect.svg</file>
+    <file alias="select_line.svg">../images/select_line.svg</file>
+    <file alias="select_point.svg">../images/select_point.svg</file> 
+    <file alias="swap_direction.svg">../images/swap_direction.svg</file>
+    <file alias="remove.svg">../images/remove.svg</file>
+  </qresource> 	
+</RCC>
diff --git a/src/uPlot/layerInfo.css b/src/uPlot/layerInfo.css
new file mode 100644
index 0000000..45aac3c
--- /dev/null
+++ b/src/uPlot/layerInfo.css
@@ -0,0 +1,81 @@
+/***************************** LICENSE START ***********************************
+ * Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ * of the Apache License version 2.0. In applying this license, ECMWF does not
+ * waive the privileges and immunities granted to it by virtue of its status as
+ * an Intergovernmental Organization or submit itself to any jurisdiction.
+ ***************************** LICENSE END *************************************/
+
+ html
+    {
+        color: #000000;
+        background-color: #FFFFFF;
+    }
+  
+    /*table
+    {
+	border-color:  #0000FF;
+	background-color: #FF0000;
+
+     }*/
+
+/*  table
+   {
+        background-color: #F6F6F6;
+        border: 1px solid #000000;
+        border-collapse: separate;
+        font-size: 11px;
+        margin-bottom: 25px; 
+	border-collapse: collapse;
+        border-spacing: 0;
+    }*/
+   td
+    {
+        padding: 3px 10px 3px 10px;
+	background-color: #F9F9F9;
+        color: #000000;
+    }
+
+   td.first
+    {
+        padding: 3px 10px 3px 10px;
+	font-weight: bold;
+	/*font-size: large;*/
+	background-color: #F6F6F6;
+        color: #000000;
+    }
+ 
+   td.image
+    {
+       background-color: #F9F9F9;
+       color: #F9F9F9;
+    }
+
+   td.title
+    {
+	font-weight: bold;
+	/*font-size: large;*/
+	background-color: #E7F6FF;
+        color: #000000;
+    }
+   td.highlight
+    {
+	/*font-size: large;*/
+	background-color: #E7F6FF;
+        color: #000000;
+    }
+  th
+    {
+       padding: 3px 10px 3px 10px;
+       background-color: #F9F9F9;
+       color: #000000;
+
+    }
+
+
+/*   tr
+    {
+        background-color: #F6F6F6;
+        color: #000000;
+    }
+  
+*/
\ No newline at end of file
diff --git a/src/uPlot/uPlot.cc b/src/uPlot/uPlot.cc
new file mode 100644
index 0000000..36d3c07
--- /dev/null
+++ b/src/uPlot/uPlot.cc
@@ -0,0 +1,1290 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "uPlot.h"
+
+//#ifndef QT_NO_OPENGL
+//#include <QGLWidget>
+//#endif
+
+#include <QAction>
+#include <QComboBox>
+#include <QCursor>
+#include <QDebug>
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMenu>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QSettings>
+#include <QSplitter>
+#include <QStatusBar>
+#include <QStringList>
+#include <QTabWidget>
+#include <QTimer>
+#include <QToolButton>
+#include <QVBoxLayout>
+#include <QWidgetAction>
+
+#include "MgQPlotScene.h"
+#include "MgQRootItem.h"
+#include "MgQSceneItem.h"
+
+#include "ExportDialog.h"
+
+#include "MvQAbout.h"
+#include "MvQApplication.h"
+#include "MvQCursorDataWidget.h"
+#include "MvQDataWidget.h"
+#include "MvQKeyProfileTree.h"
+#include "MvQLayerModel.h"
+#include "MvQLayerWidget.h"
+#include "MvQMagnifier.h"
+#include "MvQPlaceMarkWidget.h" 
+#include "MvQPlotView.h"
+#include "MvQProgressItem.h"
+#include "MvQStepModel.h"
+#include "MvQStepWidget.h"
+#include "MvQTreeView.h"
+#include "MvQZoomStackWidget.h"
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+#include "MvKeyProfile.h"
+
+#include "MagPlusService.h"
+#include "ObjectList.h"
+#include "Root.h"
+#include "PlotModView.h"
+
+void MvQSceneComboBox::hidePopup()
+{
+	QComboBox::hidePopup();
+	emit cursorLeft();
+}  
+
+
+uPlot::uPlot(QWidget *parent) : uPlotBase(parent),
+				progressItem_(0)
+{
+	setAttribute(Qt::WA_DeleteOnClose);
+	
+	setWindowTitle("Metview - uPlot");
+
+	//Initial size
+	setInitialSize(1200,760);
+	
+	//---------------------
+	// The view
+	//---------------------
+
+	connect(plotView_,SIGNAL(zoomActionStarted(MgQSceneItem*)),
+		this,SLOT(slotSetActiveScene(MgQSceneItem*)));	
+				
+	//-------------------	
+	// Frames widget
+	//-------------------
+
+	stepWidget_ = new MvQStepWidget;	
+
+	connect(stepWidget_->view(),SIGNAL(activated(QModelIndex)),
+		this,SLOT(slotStepTo(QModelIndex)));
+
+	connect(stepWidget_,SIGNAL(keyProfileChanged(MvKeyProfile*)),
+		plotView_,SLOT(slotFrameProfileChanged(MvKeyProfile*)));
+
+	//-------------------	
+	// Layer content swidget
+	//-------------------
+
+	layerWidget_ = new MvQLayerWidget(plotScene_,plotView_);
+     
+	connect(layerWidget_,SIGNAL(layerTransparencyChanged(QString,int)),
+                this, SLOT(slotLayerTransparencyChanged(QString,int)));
+
+        connect(layerWidget_,SIGNAL(layerVisibilityChanged(QString,bool)),
+                this, SLOT(slotLayerVisibilityChanged(QString,bool)));
+
+        connect(layerWidget_,SIGNAL(layerStackingOrderChanged(QList<QPair<QString,int> >)),
+                this, SLOT(slotLayerStackingOrderChanged(QList<QPair<QString,int> >)));
+
+	//-------------------	
+	// Layers data widget
+	//-------------------
+	
+	dataWidget_ = new MvQDataWidget(plotScene_,plotView_);
+	
+	//-------------------------------	
+	//
+	//
+	//-------------------------------
+	
+	//-------------------	
+	// Placemarks widget
+	//-------------------
+	
+	//Create placeMarker model and view	
+	placeMarkWidget_ = new MvQPlaceMarkWidget(plotScene_,plotView_);
+
+	plotView_->setPlaceMark(placeMarkWidget_);
+		
+	//-----------------------------------
+	// Control widget
+	//-----------------------------------
+	
+	controlWidget_=new QWidget;
+	QVBoxLayout *controlLayout=new QVBoxLayout;
+	controlLayout->setContentsMargins(0,0,0,0);
+	controlWidget_->setLayout(controlLayout);
+		
+	// Scene selection	
+	sceneWidget_=new QWidget;
+	QLabel *label=new QLabel(tr("Active scene:"));
+	sceneCb_ = new MvQSceneComboBox;
+	
+	QHBoxLayout *hb= new QHBoxLayout;
+	sceneWidget_->setLayout(hb);
+	hb->addWidget(label);
+	hb->addWidget(sceneCb_);
+	hb->addStretch(1.);
+	
+	sceneWidget_->hide();
+	controlLayout->addWidget(sceneWidget_);
+	
+	connect(sceneCb_,SIGNAL(activated(int)),
+		this,SLOT(slotSetActiveScene(int)));	
+	
+	connect(sceneCb_,SIGNAL(highlighted(int)),
+		this,SLOT(slotHighlightScene(int)));
+		
+	connect(sceneCb_,SIGNAL(cursorLeft()),
+		this,SLOT(slotNotHighlightScene()));
+
+	
+	//Control tab containing the widgets defined above
+	controlTab_ = new QTabWidget;
+	controlLayout->addWidget(controlTab_,1);
+		
+	controlTab_->addTab(stepWidget_,tr("Frames"));
+	controlTab_->addTab(layerWidget_,tr("Layers"));
+	controlTab_->addTab(dataWidget_,tr("Data"));
+
+#ifdef PLACEMARK
+	controlTab_->addTab(placeMarkWidget_,tr("Placemarks"));
+#endif
+
+#ifdef METVIEW_EXPERIMENTAL
+	//controlTab_->addTab(cursorWidget_,tr("Cursor Data"));
+#endif			
+	connect(controlTab_,SIGNAL(currentChanged(int)),
+		this,SLOT(slotControlTabChanged(int)));
+			
+	stepWidget_->init(plotScene_,"");
+	//placeMarkerWidget_->init(plotScene_);
+	
+	//Plot rescale
+	connect(this,SIGNAL(plotScaleChanged()),
+		this,SLOT(slotPlotScaleChanged()));
+		
+	//Setup the actions
+	//setupFileActions();
+	//setupViewActions();
+	//setupAnimationActions();
+	//setupZoomActions();
+	//setupToolsActions();
+	//setupHelpActions();
+
+	actionContextSelectScene_=0;
+	actionContextZoomUp_=0;
+	actionContextZoomDown_=0;
+		
+	//Setup the actions
+	setupFileActions();
+	setupViewActions();
+	setupAnimationActions();
+	setupZoomActions();
+	setupToolsActions();
+	setupHelpActions();
+		
+	setupMenus(menuItems_);
+	
+	//------------------------------
+	// uPlot area
+	//------------------------------
+
+	mainSplitter_ = new QSplitter;
+	mainSplitter_->setOpaqueResize(false);
+
+	mainSplitter_->addWidget(plotView_);
+	mainSplitter_->addWidget(controlWidget_);
+	mainSplitter_->setCollapsible(1,false);
+
+	//Set splitter initial size
+	int spWidth=mainSplitter_->size().width();
+	if(spWidth > 0)
+	{
+		QList<int> spSize;
+		spSize << spWidth*0.75;
+		spSize << spWidth-spSize[0];
+		mainSplitter_->setSizes(spSize);
+	}
+	
+	//------------------
+	// Statusbar
+	//------------------
+	
+	//Define the whole lot as central widget
+	setCentralWidget(mainSplitter_);
+	
+	//------------------
+	// Statusbar
+	//------------------
+	
+	//statusBar()->addPermanentWidget(uPlotBase::Instance().loadProgress());
+
+    	//statusBar()->addPermanentWidget(uPlotBase::Instance().statusMessageLabel(),1); 
+    	
+	//Read qt geometry settings
+	readSettings();
+}
+
+uPlot::~uPlot()
+{
+	//Save qt geometry settings
+	writeSettings();
+}
+
+
+void uPlot::setupFileActions()
+{
+	//Print
+	QAction *actionPrint = new QAction(this);
+        actionPrint->setObjectName(QString::fromUtf8("actionPrint"));
+        QIcon icon;
+        icon.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/print.svg")), QIcon::Normal, QIcon::Off);
+        actionPrint->setIcon(icon); 
+	actionPrint->setText(tr("&Print"));
+        actionPrint->setShortcut(tr("Ctrl+P"));
+
+	//Export
+	QAction *actionExport = new QAction(this);
+        actionExport->setObjectName(QString::fromUtf8("actionExport"));
+        QIcon icon1;
+        icon1.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/filesaveas.svg")), QIcon::Normal, QIcon::Off);
+	actionExport->setIcon(icon1); 
+	actionExport->setText(tr("&Export"));
+        actionExport->setShortcut(tr("Ctrl+S"));
+
+	//Generate Macro
+	QAction *actionMacro = new QAction(this);
+        actionMacro->setObjectName(QString::fromUtf8("actionMacro"));
+        QIcon icon2;
+        icon2.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/macro.svg")), QIcon::Normal, QIcon::Off);
+        actionMacro->setIcon(icon2); 
+	actionMacro->setText(tr("Generate &Macro"));
+        actionMacro->setShortcut(tr("Ctrl+M"));
+
+	//Exit
+	/*QAction* actionExit = new QAction(this);
+        actionExit->setObjectName(QString::fromUtf8("actionExit"));
+	actionExit->setText(tr("Exit"));
+	fileActions_.push_back(actionExit);*/
+	
+	connect(actionExport,SIGNAL(triggered()),
+		this,SLOT(slotLoadExportDialog()));
+
+	connect(actionPrint,SIGNAL(triggered()),
+		this,SLOT(slotLoadPrintDialog()));
+
+	connect(actionMacro,SIGNAL(triggered()),
+		this,SLOT(slotGenerateMacro()));
+
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::FileMenu;	
+		
+	menuItems_[menuType].push_back(new MvQMenuItem(actionExport));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionPrint));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionMacro));
+}
+
+void uPlot::setupToolsActions()
+{
+	//Antialias
+        actionAntialias_ = new QAction(this);
+        actionAntialias_->setObjectName(QString::fromUtf8("actionAntialias"));
+        actionAntialias_->setCheckable(true);
+        actionAntialias_->setChecked(false);
+        QIcon icon2;
+        icon2.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/antialias.svg")), QIcon::Normal, QIcon::Off);
+        actionAntialias_->setIcon(icon2);
+ 	actionAntialias_->setText(tr("Antialias"));
+        actionAntialias_->setShortcut(tr("Ctrl+L"));	
+	//controlActions_.push_back(actionAntialias_);
+
+	//Magnfier
+	QAction *actionMagnifier = new QAction(this);
+        actionMagnifier->setObjectName(QString::fromUtf8("actionMagnifier"));
+        actionMagnifier->setCheckable(true);
+        QIcon icon3;
+        icon3.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/magnifier.svg")), QIcon::Normal, QIcon::Off);
+        actionMagnifier->setIcon(icon3);
+	actionMagnifier->setText(tr("&Magnifier"));
+
+	//Cursor data
+        QAction *actionCursorData = new QAction(this);
+        actionCursorData->setObjectName(QString::fromUtf8("actionCursorData"));
+        actionCursorData->setCheckable(true);  
+	QIcon icon1;
+        icon1.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/gunsight.svg")), QIcon::Normal, QIcon::Off);
+        actionCursorData->setIcon(icon1);
+	actionCursorData->setText(tr("&Cursor data"));	
+	
+	//OpenGL
+        QAction *actionOpenGL = new QAction(this);
+        actionOpenGL->setObjectName(QString::fromUtf8("actionOpenGL"));
+        actionOpenGL->setCheckable(true);
+        actionOpenGL->setEnabled(true);
+        //QIcon icon2;
+        //icon2.addPixmap(QPixmap(QString::fromUtf8(":/new/prefix1/image/antialias.svg")), QIcon::Normal, QIcon::Off);
+        //actionAntialias->setIcon(icon2);
+ 	actionOpenGL->setText(tr("OpenGL"));
+        //actionAntialias->setShortcut(tr("Ctrl+L"));	
+	//controlActions_.push_back(actionAntialias);
+
+	//Placemark
+        QAction *actionPlaceMark = new QAction(this);
+        actionPlaceMark->setObjectName(QString::fromUtf8("actionPlaceMark"));
+        //actionPlaceMark->setCheckable(true);
+        //QIcon icon4;
+        //icon4.addPixmap(QPixmap(QString::fromUtf8(":/new/prefix1/image/zoom.svg")), QIcon::Normal, QIcon::Off);
+        //actionPlaceMark->setIcon(icon4);
+	actionPlaceMark->setText(tr("Placemark"));
+	//actionPlaceMark->setEnabled(false);
+	
+//#ifndef QT_NO_OPENGL
+//     	actionOpenGL->setEnabled(QGLFormat::hasOpenGL());
+//#else
+//     	actionOpenGL->setEnabled(false);
+//#endif	
+
+	actionOpenGL->setEnabled(false);
+
+	//Magnifier 
+	connect(actionMagnifier, SIGNAL(toggled(bool)),
+		plotView_, SLOT(slotSetEnableMagnifier(bool)));
+
+	connect(plotView_,SIGNAL(magnifierIsEnabledProgramatically(bool)),
+		actionMagnifier, SLOT(setChecked(bool)));
+
+	//Cursor data 
+	connect(actionCursorData, SIGNAL(toggled(bool)),
+		plotView_,SLOT(slotSetEnableCursorData(bool)));
+		
+	//OpenGL button
+	connect(actionOpenGL, SIGNAL(toggled(bool)),
+		this, SLOT(slotEnableOpenGL(bool)));
+
+	connect(actionPlaceMark, SIGNAL(triggered()),
+		plotView_,SLOT(slotCreatePlaceMark()));
+
+	connect(actionAntialias_, SIGNAL(toggled(bool)),
+		this,SLOT(slotEnableAntialias(bool)));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ToolsMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionMagnifier));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAntialias_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionCursorData));
+	//menuItems_["controls"].push_back(new MvQMenuItem(actionOpenGL));
+#ifdef PLACEMARK
+	menuItems_[menuType].push_back(new MvQMenuItem(actionPlaceMark));
+#endif	
+}
+
+void uPlot::setupViewActions()
+{
+	QAction* action;
+
+	//Sidebar
+	actionControlPanel_ = new QAction(this);
+        actionControlPanel_->setObjectName(QString::fromUtf8("actionControlPanel"));
+        actionControlPanel_->setCheckable(true);
+	actionControlPanel_->setChecked(true); //!!!
+	actionControlPanel_->setText(tr("&Sidebar"));
+	QIcon icon2;
+        icon2.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/sidebar.svg")), QIcon::Normal, QIcon::Off);
+        actionControlPanel_->setIcon(icon2);
+	
+	//Active scene highlight
+        action = new QAction(this);
+        action->setObjectName(QString::fromUtf8("actionHighlightScene"));
+        QIcon icon4;
+        icon4.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/highlight_scene.svg")), QIcon::Normal, QIcon::Off);
+        action->setIcon(icon4); 
+	action->setText(tr("&Highlight active scene"));  
+	action->setCheckable(true);
+	action->setChecked(true); //!!!
+	actionHighlightScene_=action;
+		
+	connect(actionControlPanel_,SIGNAL(toggled(bool)),
+		this,SLOT(slotShowControlPanel(bool)));
+
+	connect(actionHighlightScene_,SIGNAL(toggled(bool)),
+		this,SLOT(slotHighlightActiveScene(bool)));	
+			
+	QAction *sep=new QAction(this);	
+	sep->setSeparator(true);
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;	
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionControlPanel_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionHighlightScene_));
+	menuItems_[menuType].push_back(new MvQMenuItem(sep));
+	
+	uPlotBase::setupViewActions();
+}
+
+void uPlot::setupAnimationActions()
+{
+	//Play
+        actionPlay_ = new QAction(this);
+        actionPlay_->setObjectName(QString::fromUtf8("actionPlay"));
+        QIcon icon5;
+        icon5.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_play.svg")), QIcon::Normal, QIcon::Off);
+        actionPlay_->setIcon(icon5); 
+	actionPlay_->setText(tr("&Play"));
+	//animationActions_.push_back(actionPlay_);
+
+	//Stop
+        actionStop_ = new QAction(this);
+        actionStop_->setObjectName(QString::fromUtf8("actionStop"));
+        QIcon icon6;
+        icon6.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_stop.svg")), QIcon::Normal, QIcon::Off);
+        actionStop_->setIcon(icon6);
+	actionStop_->setText(tr("&Stop"));
+	//animationActions_.push_back(actionStop_);
+
+	//Prev
+        actionPrevious_ = new QAction(this);
+        actionPrevious_->setObjectName(QString::fromUtf8("actionPrevious"));
+        QIcon icon8;
+        icon8.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_prev.svg")), QIcon::Normal, QIcon::Off);
+        actionPrevious_->setIcon(icon8);
+	actionPrevious_->setText(tr("P&revious"));
+        actionPrevious_->setShortcut(tr("Left"));
+	//animationActions_.push_back(actionPrevious_);
+
+	//Next
+        actionNext_ = new QAction(this);
+        actionNext_->setObjectName(QString::fromUtf8("actionNext"));
+        QIcon icon7;
+        icon7.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_next.svg")), QIcon::Normal, QIcon::Off);
+        actionNext_->setIcon(icon7); 
+	actionNext_->setText(tr("&Next"));
+        actionNext_->setShortcut(tr("Right"));
+	//animationActions_.push_back(actionNext_);
+
+	//First
+        actionFirst_ = new QAction(this);
+        actionFirst_->setObjectName(QString::fromUtf8("actionFirst"));
+        QIcon icon9;
+        icon9.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_start.svg")), QIcon::Normal, QIcon::Off);
+        actionFirst_->setIcon(icon9);
+	actionFirst_->setText(tr("&First"));
+        actionFirst_->setShortcut(tr("Home"));
+	//animationActions_.push_back(actionFirst_);
+
+	//Last
+        actionLast_ = new QAction(this);
+        actionLast_->setObjectName(QString::fromUtf8("actionLast"));
+        QIcon icon10;
+        icon10.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_end.svg")), QIcon::Normal, QIcon::Off);
+        actionLast_->setIcon(icon10);
+	actionLast_->setText(tr("&Last"));
+        actionLast_->setShortcut(tr("End"));
+	//animationActions_.push_back(actionLast_);
+
+
+	connect(actionPlay_, SIGNAL(triggered()),
+		this, SLOT(slotPlay()));
+	
+	connect(actionStop_, SIGNAL(triggered()),
+		this,SLOT(slotStop()));
+
+	connect(actionNext_, SIGNAL(triggered()),
+		this, SLOT(slotToNext()));
+	
+	connect(actionPrevious_, SIGNAL(triggered()),
+		this, SLOT(slotToPrev()));
+	
+	connect(actionFirst_, SIGNAL(triggered()),
+		this, SLOT(slotToFirst()));
+	
+	connect(actionLast_, SIGNAL(triggered()),
+		this, SLOT(slotToLast()));
+
+
+	//Animation speed
+	float fval[]={0.5,0.7,1,1.5,2,3,4,5,10};
+	for(int i=0; i< 9; i++)
+	{
+		speed_.push_back(fval[i]);
+	}
+
+	actSpeedIndex_=2;
+
+	timer_= new QTimer(this);
+	timer_->setInterval(1000./speed_[actSpeedIndex_]);
+	connect(timer_, SIGNAL(timeout()), this, SLOT(slotToNext()) );
+
+	QPushButton *speedPb = new QPushButton;
+
+	speedPb->setText(tr("Speed"));
+	speedPb->setObjectName("speedPb");
+
+	QMenu *menuSpeed = new QMenu("&Animation");
+
+	speedPb->setMenu(menuSpeed);
+	
+	speedSlider_ = new QSlider(Qt::Vertical);
+	speedSlider_->setMaximumWidth(100);
+	speedSlider_->setMinimum(0);
+	speedSlider_->setMaximum(speed_.size()-1);
+	speedSlider_->setSliderPosition(actSpeedIndex_);
+ 	speedSlider_->setSingleStep(1);
+	speedSlider_->setPageStep(1);
+	speedSlider_->setTickInterval(1);
+	speedSlider_->setTickPosition(QSlider::TicksBelow);
+	speedSlider_->setToolTip("Animation speed");
+
+	speedLabel_=new QLabel;
+	speedLabel_->setText("Speed: 1 fr/s");
+	//toolBarAnimation->addWidget(speedLabel_);
+	
+	//QVBoxLayout *vl = new QVBoxLayout;
+	//vl->addWidget(speedSlider_);
+	//vl->addWidget(speedLabel_);
+
+	QWidgetAction *wa = new QWidgetAction(menuSpeed);
+	wa->setDefaultWidget(speedSlider_);
+	menuSpeed->addAction(wa);
+
+	wa = new QWidgetAction(menuSpeed);
+	wa->setDefaultWidget(speedLabel_);
+	menuSpeed->addAction(wa);
+	
+
+	connect(speedSlider_, SIGNAL(valueChanged(int)), this, SLOT(slotSetSpeed(int)) );
+
+	
+	//Active scene highlight
+        QAction* action = new QAction(this);
+        action->setObjectName(QString::fromUtf8("actionAnimatedScenes"));
+        QIcon icon4;
+        icon4.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/connectAnimations.svg")), QIcon::Normal, QIcon::Off);
+        action->setIcon(icon4); 
+	action->setText(tr("&Animate all scenes"));  
+	action->setCheckable(true);
+	action->setChecked(false);
+	actionAnimatedScenes_=action;
+
+	connect(actionAnimatedScenes_, SIGNAL(toggled(bool)),
+		this, SLOT(slotAnimatedScenes(bool)));
+		
+	//
+	actionPlay_->setEnabled(false);
+	actionStop_->setEnabled(false);
+	actionFirst_->setEnabled(false);
+	actionNext_->setEnabled(false);
+	actionPrevious_->setEnabled(false);
+	actionLast_->setEnabled(false);
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::AnimationMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionPlay_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionStop_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionPrevious_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionNext_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionFirst_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionLast_));	
+	menuItems_[menuType].push_back(new MvQMenuItem(speedPb));	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAnimatedScenes_,MvQMenuItem::MenuTarget));
+
+}
+
+bool uPlot::setDropTarget(QPoint globalPos)
+{
+	MgQSceneItem *item=0;
+	
+	QPointF scenePos = plotView_->mapToScene(plotView_->mapFromGlobal(globalPos));
+	
+	/*if(layerWidget_->layerAtGlobalPos(globalPos) != -1)
+	{
+		return false;
+	}
+	else
+	{  	
+		if(activeScene_)
+		{
+	  		if(activeScene_->sceneBoundingRect().contains(scenePos))
+				return true; 
+		}			
+	}*/
+	
+	if(activeScene_)
+	{
+	  	if(activeScene_->sceneBoundingRect().contains(scenePos))
+			return true; 
+	}
+		
+	item = plotScene_->findSceneItem(scenePos);
+	if(item || plotScene_->sceneItems().count() == 0)
+	{  
+			slotSetActiveScene(item);
+			return true;
+	}
+	else
+	{	
+		return false;
+	}
+	
+	return false;
+}	
+	
+
+void uPlot::newRequestForDriversBegin()
+{
+	plotScene_->saveStateBeforeNewRequest();
+
+	//Frames
+	stepWidget_->stepDataIsAboutToChange();
+	
+	//Layer contents
+	layerWidget_->layersAreAboutToChange();
+	
+	//Layer data
+	dataWidget_->layersAreAboutToChange();
+
+	//Magnifier
+	plotView_->resetBegin();
+	
+	if(activeScene_)
+	{
+	 	prevActiveSceneId_=activeScene_->layout().id();
+		if(prevActiveSceneId_.empty())
+		{
+		  	MgQLayoutItem *projItem=activeScene_->firstProjectorItem();
+			prevActiveSceneId_=projItem->layout().id();
+		}	
+	}
+	else
+	{
+	  	prevActiveSceneId_.clear();
+	} 
+	
+	activeScene_=0;
+	
+	controlWidget_->setEnabled(false);
+	
+	loadStarted();
+
+}
+
+
+void uPlot::newRequestForDriversEnd()
+{	
+	controlWidget_->setEnabled(true);
+	
+	//Select the active scene
+	if(!activeScene_)
+	{	  
+	  	if(!prevActiveSceneId_.empty())
+		{
+			foreach(MgQSceneItem *item,plotScene_->sceneItems())
+			{
+			  	MgQLayoutItem *projItem=item->firstProjectorItem();
+				if(item->layout().id() == prevActiveSceneId_)
+				{
+				  	activeScene_=item;
+					break;
+				}
+				else if(item->layout().id().empty() && projItem &&
+				        prevActiveSceneId_==projItem->layout().id())
+				{
+					activeScene_=item;
+					break;  
+				}	
+			}
+		}
+		
+		
+		if(!activeScene_ && plotScene_->sceneItems().count() >0)
+		{
+		  	activeScene_=plotScene_->sceneItems().back();	
+		}
+	}		
+
+	//Resize without rendering!!
+	changeSize(sizeCombo_->itemData(sizeCombo_->currentIndex(),Qt::UserRole).toInt(),false);	
+	
+	//Load steps/layers and generate layer thumbnails - No rendering at this point!
+	//It tries to set the current step for all the scenes!
+	//The current step should be correctly set at least for the active scene.
+	plotScene_->updateAfterNewRequest();
+	
+	//Zoom stack - generate thumbnail for the new area
+	zoomStackWidget_->reset(activeScene_,false);	
+	updateZoomActionState();	
+	
+	//Layer contents
+	layerWidget_->reset(activeScene_);
+		
+	//Layer data - will set the current step for the data widgets!
+	dataWidget_->reset(activeScene_);
+			
+	//Update scene combobox
+	if(plotScene_->sceneItems().count() <= 1)
+	{
+		sceneWidget_->hide();
+		sceneCb_->clear();
+	}	
+	else
+	{ 
+  		//Scene combo
+		sceneCb_->clear();
+		for(int i=0; i < plotScene_->sceneItems().count(); i++)
+		{
+	  		sceneCb_->addItem(tr("Scene ") + QString::number(i+1));
+		}	
+		int actIndex=plotScene_->sceneItems().indexOf(activeScene_);
+		if(actIndex != -1)
+			sceneCb_->setCurrentIndex(actIndex);  
+		
+		sceneWidget_->show();				
+	}
+	
+	//Generate animated scenes list
+	if(plotScene_->sceneItems().count() <=1)
+	{
+		animatedScenes_.clear();
+	}
+	else
+	{
+	  	actionAnimatedScenes_->setEnabled(true);
+		slotAnimatedScenes(actionAnimatedScenes_->isChecked());
+	}	
+	
+	//Frames - no rendering!!
+	//At this point the current step should be correctly set for the active scene!!
+	stepWidget_->reset(activeScene_);
+	if(activeScene_)
+	{
+		//Update the view
+		stepWidget_->setViewToCurrentStep();
+		
+		//Set the correct step for the aminated scenes. No rendering involved!
+		stepWidget_->updateStepForScenes(animatedScenes_);
+	}
+	
+	//Animation buttons
+	updateAnimationActionState();
+	
+	//NOW RENDER IT! We render the whole scene into the pixmap cache at this point!
+	plotScene_->sceneItemChanged();
+	
+	//Update magnifier, cursordata etc
+	plotView_->resetEnd();
+	
+	//Udate scene selection
+	if(plotScene_->sceneItems().count() <=1)
+	{
+	  	actionHighlightScene_->setEnabled(false);
+	}
+	else
+	{  
+		actionHighlightScene_->setEnabled(true);
+		slotHighlightActiveScene(actionHighlightScene_->isChecked());
+	}	
+	
+	
+	loadFinished();
+		
+	//Emit a signal that the plot window has been updated
+	emit plotWindowUpdated();
+}
+
+
+
+void uPlot::slotShowControlPanel(bool status)
+{
+	if(status)
+	{
+		controlWidget_->show();
+	}
+	else
+	{
+		controlWidget_->hide();
+	}
+}
+
+
+
+//===============================================
+//
+// Animaton
+//
+//===============================================
+
+void uPlot::slotToPrev()
+{
+	if(stepWidget_->currentStep() > 0)
+	{		
+		slotStepTo(stepWidget_->currentStep()-1);
+	}
+}	
+
+void uPlot::slotToNext()
+{	
+	if(stepWidget_->currentStep() < stepWidget_->stepNum()-1)
+	{
+		slotStepTo(stepWidget_->currentStep()+1);		
+	}
+	else if(timer_->isActive())
+	{
+		slotToFirst();
+	}	
+}			
+
+void uPlot::slotToLast()
+{
+	if(stepWidget_->currentStep() < stepWidget_->stepNum()-1)
+	{		
+		slotStepTo(stepWidget_->stepNum()-1);
+	}
+}	
+
+void uPlot::slotToFirst()
+{
+	if(stepWidget_->currentStep() > 0)
+	{		
+		slotStepTo(0);
+	}
+}	
+
+void uPlot::slotPlay()
+{	
+	timer_->start();
+	updateAnimationActionState();
+}
+	
+void uPlot::slotStop()
+{
+	timer_->stop();
+	updateAnimationActionState();
+}
+
+void uPlot::slotStepTo(const QModelIndex &index)
+{	
+	slotStepTo(index.row());
+}
+
+void uPlot::slotStepTo(int fr)
+{	
+	plotView_->resetBegin();
+	
+	if(fr == stepWidget_->setCurrentStep(fr,animatedScenes_))
+	{
+		updateAnimationActionState();		
+		stepWidget_->setViewToCurrentStep();			
+		layerWidget_->slotFrameChanged();
+		dataWidget_->slotFrameChanged();
+	}
+	
+	plotView_->resetEnd();
+
+}
+
+void uPlot::slotSetSpeed(int sp)
+{		
+	if(actSpeedIndex_ != sp)
+	{
+		actSpeedIndex_=sp;
+		timer_->setInterval(1000./speed_[actSpeedIndex_]);
+		
+		QString s="Speed: ";
+		s.append(QString::number(speed_[actSpeedIndex_]));
+		s.append(" fr/s");
+		speedLabel_->setText(s);
+	}
+}
+
+void uPlot::updateAnimationActionState()	
+{
+	if(stepWidget_->stepNum() < 2)
+	{
+		actionPlay_->setEnabled(false);
+		actionStop_->setEnabled(false);
+		actionFirst_->setEnabled(false);
+		actionNext_->setEnabled(false);
+		actionPrevious_->setEnabled(false);
+		actionLast_->setEnabled(false);
+		return;
+	}
+	else
+	{
+		if(timer_->isActive() == true)
+		{
+			actionPlay_->setEnabled(false);
+			actionStop_->setEnabled(true);
+		}
+		else
+		{
+			actionPlay_->setEnabled(true);
+			actionStop_->setEnabled(false);
+		}
+
+	}
+
+	if(timer_->isActive() == false)
+	{
+		if(stepWidget_->currentStep()==0)
+		{
+			actionFirst_->setEnabled(false);
+			actionNext_->setEnabled(true);
+			actionPrevious_->setEnabled(false);
+			actionLast_->setEnabled(true);
+		}
+		else if(stepWidget_->currentStep()  == stepWidget_->stepNum()-1)
+		{
+			actionFirst_->setEnabled(true);
+			actionNext_->setEnabled(false);
+			actionPrevious_->setEnabled(true);
+			actionLast_->setEnabled(false);
+		}
+		else
+		{
+			actionFirst_->setEnabled(true);
+			actionNext_->setEnabled(true);
+			actionPrevious_->setEnabled(true);
+			actionLast_->setEnabled(true);
+		}
+	}
+	else
+	{
+		actionFirst_->setEnabled(false);
+		actionNext_->setEnabled(false);
+		actionPrevious_->setEnabled(false);
+		actionLast_->setEnabled(false);
+	}
+}
+int uPlot::currentStep()
+{
+  	return stepWidget_->currentStep();
+}
+
+int uPlot::stepNum()
+{
+	return stepWidget_->stepNum();
+}
+
+//=================================
+//
+// Active scene selection
+//
+//=================================
+
+void uPlot::slotSelectActiveScene()
+{
+	//actionSelectScene_->setEnabled(false);
+	//plotView_->slotSelectScene();
+}
+
+void uPlot::slotActiveSceneSelected(QPointF /*scenePos*/)
+{
+ 	//MgQSceneItem *item=plotScene_->findSceneItem(scenePos);
+
+	//setActiveScene(item);	
+	//identifyScene(item);
+	//actionSelectScene_->setEnabled(true);
+}
+
+void uPlot::slotHighlightActiveScene(bool bval)
+{	
+	 plotScene_->highlightSceneItem(activeScene_,bval);	
+}	
+
+void uPlot::slotAnimatedScenes(bool bval)
+{
+	if(bval)
+	{
+		animatedScenes_=plotScene_->sceneItems();
+	}
+	else
+	{
+	  	animatedScenes_.clear();
+	}	
+}
+
+
+void uPlot::slotSetActiveScene(int index)
+{
+	if(index <0 || index >=plotScene_->sceneItems().count() )
+		return; 
+	
+	slotSetActiveScene(plotScene_->sceneItems().at(index));
+}
+
+void uPlot::slotSetActiveScene(MgQSceneItem *activeScene)
+{
+	if(!activeScene)
+		return;
+	
+	if(activeScene_ == activeScene)
+		return;
+	
+	activeScene_=activeScene;
+	
+	//Zoom stack
+	zoomStackWidget_->reset(activeScene_,true);	
+	updateZoomActionState();	
+	
+	layerWidget_->layersAreAboutToChange();
+	layerWidget_->reset(activeScene_);
+
+	dataWidget_->layersAreAboutToChange();
+	dataWidget_->reset(activeScene_);
+	
+	stepWidget_->stepDataIsAboutToChange();  
+	stepWidget_->reset(activeScene_);	
+	
+	slotHighlightActiveScene(actionHighlightScene_->isChecked());
+	
+	//Remove the highlight rectangle activated by the scene combo box!
+	slotNotHighlightScene();
+
+	updateAnimationActionState();
+	
+	sceneCb_->setCurrentIndex(plotScene_->sceneItems().indexOf(activeScene));
+	
+	//Emit a signal that the plot windows has been updated
+	//emit plotWindowUpdated();  ???????????????	
+}
+
+
+void uPlot::slotHighlightScene(int index)
+{	
+  	if(index <0 || index >=plotScene_->sceneItems().count() )
+		return; 
+	
+	MgQSceneItem *item=plotScene_->sceneItems().at(index);	 
+	
+	plotScene_->highlightSceneItemForBrief(item,true);	
+}	
+
+void uPlot::slotNotHighlightScene()
+{
+  	plotScene_->highlightSceneItemForBrief(0,false);	
+}	
+
+
+
+void uPlot::slotLayerUpdate()
+{	
+	//Notify the scene about the change in the layer status
+	//plotScene_->updateLayers(layerWidget_->model()->layers());
+	plotScene_->update(); 
+}
+
+void uPlot::progressMessage(const string& /*m*/)
+{
+#ifdef METVIEW_EXPERIMENTAL
+
+#if 0	
+	if(progressItem_ && progressItem_->isVisible())
+	{
+		qDebug() << "progress";
+		progressItem_->progress();
+		QCoreApplication::sendPostedEvents(plotScene_,0);  
+	}
+#endif
+#endif	
+}  	
+
+void uPlot::loadStarted()
+{  
+#ifdef METVIEW_EXPERIMENTAL		
+#if 0	
+	if(!progressItem_)
+	{
+	  	progressItem_=new MvQProgressItem;
+		progressItem_->setVisible(false);
+		plotScene_->addItem(progressItem_);
+	}
+	
+	progressItem_->setRect(plotScene_->sceneRect());
+	progressItem_->startProgress();
+	progressItem_->setVisible(true);
+#endif			
+#endif	
+
+}
+
+void uPlot::loadFinished()
+{
+#ifdef METVIEW_EXPERIMENTAL	
+#if 0	
+	if(progressItem_)
+	{	
+		progressItem_->setVisible(false);
+	}
+#endif	
+#endif	
+}
+
+void uPlot::slotLayerTransparencyChanged(QString sid, int value)
+{
+    int id = sid.toInt();
+    owner_->UpdateLayerTransparency(id,value);
+}
+
+void uPlot::slotLayerVisibilityChanged(QString sid, bool onoff)
+{
+    int id = sid.toInt();
+    owner_->UpdateLayerVisibility(id,onoff);
+}
+
+void uPlot::slotLayerStackingOrderChanged(QList<QPair<QString,int> >)
+{
+//    int id = sid.toInt();
+//    owner_->UpdateLayerStackingOrder(id,value);
+}
+
+void uPlot::slotPlotScaleChanged()
+{
+	dataWidget_->slotPlotScaleChanged();  
+}  
+
+void uPlot::slotControlTabChanged(int index)
+{
+	if(index==2)
+	{
+	  	dataWidget_->resetLayerList();
+	}	
+}  
+
+void uPlot::writeSettings()
+{	
+	QSettings settings("ECMWF","MV4-uPlot");
+	
+	//!!
+	settings.clear();
+	
+	settings.beginGroup("main");
+	settings.setValue("geometry",saveGeometry());
+	settings.setValue("state",saveState());
+	settings.setValue("mainSplitter",mainSplitter_->saveState());
+	
+	settings.setValue("stepKeyProfileName",stepWidget_->currentKeyProfile());
+	settings.setValue("currentControlTabIndex",controlTab_->currentIndex()); 
+	settings.setValue("antialias",actionAntialias_->isChecked());
+	settings.setValue("controlPanel",actionControlPanel_->isChecked());
+	settings.setValue("highlightScene",actionHighlightScene_->isChecked());
+	settings.setValue("animatedScenes",actionAnimatedScenes_->isChecked());	
+	
+	settings.setValue("sizeIndex",sizeCombo_->currentIndex());
+	int sizeId=sizeCombo_->itemData(sizeCombo_->currentIndex(),Qt::UserRole).toInt();
+	settings.setValue("sizeId",sizeId);	
+	
+	settings.endGroup();
+	
+	dataWidget_->writeSettings(settings);
+}	
+	
+void uPlot::readSettings()
+{
+	QSettings settings("ECMWF","MV4-uPlot");
+	
+	settings.beginGroup("main");
+	restoreGeometry(settings.value("geometry").toByteArray());
+	restoreState(settings.value("state").toByteArray());
+	mainSplitter_->restoreState(settings.value("mainSplitter").toByteArray());
+	
+	stepWidget_->setCurrentKeyProfile(settings.value("stepKeyProfileName").toString());
+	controlTab_->setCurrentIndex(settings.value("currentControlTabIndex").toInt());
+
+	if(settings.value("antialias").isNull())
+	{
+		actionAntialias_->setChecked(false);
+	}
+	else
+	{
+		actionAntialias_->setChecked(settings.value("antialias").toBool());
+	}
+
+	if(settings.value("controlPanel").isNull())
+	{
+		actionControlPanel_->setChecked(true);
+	}
+	else
+	{
+		actionControlPanel_->setChecked(settings.value("controlPanel").toBool());
+	}
+	
+	if(settings.value("highlightScene").isNull())
+	{
+		actionHighlightScene_->setChecked(true);
+	}
+	else
+	{
+		actionHighlightScene_->setChecked(settings.value("highlightScene").toBool());
+	}
+		
+	if(settings.value("animatedScenes").isNull())
+	{
+		actionAnimatedScenes_->setChecked(false);
+	}
+	else
+	{
+		actionAnimatedScenes_->setChecked(settings.value("animatedScenes").toBool());
+	}
+
+	if(settings.value("sizeIndex").isNull())
+	{
+		sizeCombo_->setCurrentIndex(5);
+	}
+	else
+	{
+		int current=settings.value("sizeIndex").toInt();
+		if(current == customSizeItemIndex_)
+		{
+		  	if(!settings.value("sizeId").isNull())
+			{
+				int sizeId=settings.value("sizeId").toInt();
+				setCustomSize(sizeId);	
+			}
+			else
+			{
+				sizeCombo_->setCurrentIndex(0);	
+
+			}
+		}	
+		else		  
+		{ 
+			sizeCombo_->setCurrentIndex(settings.value("sizeIndex").toInt());
+		}
+	}
+	
+	
+	settings.endGroup();
+	
+	dataWidget_->readSettings(settings);
+}
diff --git a/src/uPlot/uPlot.h b/src/uPlot/uPlot.h
new file mode 100644
index 0000000..03a1e41
--- /dev/null
+++ b/src/uPlot/uPlot.h
@@ -0,0 +1,149 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef uPlot_H
+#define uPlot_H
+
+#include "uPlotBase.h"
+
+class MvRequest;
+
+class QAction;
+class QComboBox;
+class QGraphicsRectItem;
+class QGraphicsScene;
+class QGraphicsView;
+class QLabel;
+class QProgressBar;
+class QScrollArea;
+class QSlider;
+class QSplitter;
+class QTabWidget;
+class QTreeView;
+class QTimer;
+
+class ExportDialog;
+class MgQPlotScene;
+class MgQSceneItem;
+class MvQCursorDataWidget;
+class MvQDataWidget;
+class MvQStepModel;
+class MvQLayerWidget;
+class MvQPlaceMarkWidget;
+class MvQPlotView;
+class MvQProgressItem;
+class MvQStepWidget;
+class MvQTreeView;
+class MvQZoomStackWidget;
+
+using namespace std;
+
+class MvQSceneComboBox : public QComboBox
+{
+    Q_OBJECT
+public:
+    	MvQSceneComboBox(QWidget *parent=0) : QComboBox(parent) {};
+	void hidePopup();
+signals:
+	void cursorLeft();	
+};
+
+class uPlot : public uPlotBase
+{
+    Q_OBJECT
+
+public:
+	uPlot(QWidget *parent = 0);
+	~uPlot();
+	
+	void newRequestForDriversBegin();
+	void newRequestForDriversEnd();
+	void progressMessage(const string&);
+
+public slots:
+	void slotShowControlPanel(bool);		
+	void slotPlay();
+	void slotStop();
+	void slotToFirst();
+	void slotToLast();
+	void slotToNext();
+	void slotToPrev();
+	void slotStepTo(int);
+	void slotStepTo(const QModelIndex&);
+	void slotSetSpeed(int);
+	void slotLayerUpdate();
+	void slotSelectActiveScene();
+	void slotActiveSceneSelected(QPointF);
+	void slotSetActiveScene(MgQSceneItem*);
+	void slotSetActiveScene(int);
+	void slotHighlightActiveScene(bool);
+	void slotHighlightScene(int);
+	void slotNotHighlightScene();	
+	void slotAnimatedScenes(bool);
+    	void slotLayerTransparencyChanged(QString,int);
+    	void slotLayerVisibilityChanged(QString,bool);
+    	void slotLayerStackingOrderChanged(QList<QPair<QString,int> >);
+    	void slotControlTabChanged(int);
+	void slotPlotScaleChanged();
+
+protected:
+	void setupFileActions();
+	void setupViewActions();
+	void setupToolsActions();
+	void setupAnimationActions();
+	
+	bool setDropTarget(QPoint);
+	
+	void updateAnimationActionState();
+	int currentStep();
+	int stepNum();
+	
+	void loadStarted();
+	void loadFinished();
+	
+	void readSettings();
+	void writeSettings();
+	
+	QWidget*	controlWidget_;
+	QTabWidget*     controlTab_;	
+
+	MvQStepWidget*  stepWidget_;
+	MvQLayerWidget* layerWidget_;
+	MvQDataWidget* dataWidget_;
+	MvQPlaceMarkWidget* placeMarkWidget_;	
+        MvQCursorDataWidget* cursorWidget_;
+
+        QAction* actionAntialias_;
+	QAction* actionControlPanel_;
+	
+	//Animation control
+	QAction* actionPlay_;
+	QAction* actionStop_;
+	QAction* actionNext_;
+	QAction* actionPrevious_;
+	QAction* actionFirst_;
+	QAction* actionLast_;
+	QSlider*       speedSlider_;
+	QTimer*        timer_;
+	vector<float>  speed_;
+	int            actSpeedIndex_;
+	QLabel*        speedLabel_;
+
+        QAction* actionHighlightScene_;
+	QList<MgQSceneItem*> animatedScenes_;
+	QAction* actionAnimatedScenes_;
+	MvQSceneComboBox* sceneCb_;
+	QWidget* sceneWidget_;
+	
+	MvQProgressItem* progressItem_;
+
+	QSplitter*  mainSplitter_;
+};
+
+#endif
diff --git a/src/uPlot/uPlot.qrc b/src/uPlot/uPlot.qrc
new file mode 100644
index 0000000..fcdac29
--- /dev/null
+++ b/src/uPlot/uPlot.qrc
@@ -0,0 +1,37 @@
+<RCC>
+  <qresource prefix="uPlot">    
+    <file alias="antialias.svg">../images/antialias.svg</file>
+    <file alias="magnifier.svg">../images/magnifier.svg</file>
+    <file alias="print.svg">../images/print.svg</file>
+    <file alias="filesaveas.svg">../images/filesaveas.svg</file>
+    <file alias="zoom.svg">../images/zoom.svg</file>
+    <file alias="zoom_in.svg">../images/zoom_in.svg</file> 
+    <file alias="zoom_out.svg">../images/zoom_out.svg</file>
+    <file alias="zoom_stack.svg">../images/zoom_stack.svg</file>
+    <file alias="player_play.svg">../images/player_play.svg</file>
+    <file alias="player_stop.svg">../images/player_stop.svg</file>
+    <file alias="player_start.svg">../images/player_start.svg</file>
+    <file alias="player_end.svg">../images/player_end.svg</file>
+    <file alias="player_prev.svg">../images/player_prev.svg</file>
+    <file alias="player_next.svg">../images/player_next.svg</file>
+    <file alias="connectAnimations.svg">../images/connectAnimations.svg</file>
+    <file alias="gunsight.svg">../images/gunsight.svg</file>
+    <file alias="arrow_up.svg">../images/arrow_up.svg</file>
+    <file alias="arrow_top.svg">../images/arrow_top.svg</file>  
+    <file alias="arrow_down.svg">../images/arrow_down.svg</file>
+    <file alias="arrow_bottom.svg">../images/arrow_bottom.svg</file>
+    <file alias="data_probe.svg">../images/data_probe.svg</file>
+    <file alias="macro.svg">../images/macro.svg</file>
+    <file alias="magnifier_handler">../images/magnifier_handler.png</file>
+    <file alias="sidebar.svg">../images/sidebar.svg</file>
+    <file alias="highlight_scene.svg">../images/highlight_scene.svg</file>
+    <file alias="histogram.svg">../images/histogram.svg</file>
+    <file alias="stats.svg">../images/stats.svg</file>
+    <file alias="size_up.svg">../images/size_up.svg</file>
+    <file alias="size_down.svg">../images/size_down.svg</file>
+    <file alias="layers.svg">../images/layers.svg</file>
+    <file alias="meta_data.svg">../images/meta_data.svg</file>
+    <file alias="reset.svg">../images/reset.svg</file>
+    <file alias="layerInfo.css">layerInfo.css</file>   
+  </qresource> 	
+</RCC>
\ No newline at end of file
diff --git a/src/uPlot/uPlotApp.cc b/src/uPlot/uPlotApp.cc
new file mode 100644
index 0000000..fae13c6
--- /dev/null
+++ b/src/uPlot/uPlotApp.cc
@@ -0,0 +1,45 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvTemplates.h>
+
+#include "uPlotApp.h"
+#include "PmContext.h"
+
+uPlotApp::uPlotApp(int& ac, char** av, const char* name) : 
+	MvQApplication(ac,av,name)
+{
+	// Install Resources
+//	InstallResources();
+
+	// Register this service
+	registerTMvServe(*this,0);
+}
+
+uPlotApp::~uPlotApp()
+{
+}
+
+// Serve Method
+// called by MvTransaction to process the request
+void
+uPlotApp::serve ( MvProtocol& proto, MvRequest& inRequest )
+{
+	// Create a new context, based on the input Request
+	PmContext * context = new PmContext ( proto, inRequest );
+
+	// Increment the reference counting
+	context->Attach();
+
+	// Execute the context
+	context->Execute();
+
+	// Decrement the reference counting
+//	context->Detach();
+}
diff --git a/src/uPlot/uPlotApp.h b/src/uPlot/uPlotApp.h
new file mode 100644
index 0000000..88e500c
--- /dev/null
+++ b/src/uPlot/uPlotApp.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef uPlotApp_H
+#define uPlotApp_H
+
+#include <MvRequest.h>
+#include <MvProtocol.h>
+#include <MvQApplication.h>
+
+using namespace std;
+
+class uPlotApp : public MvQApplication
+{
+public:
+	// Constructor
+	uPlotApp (int& ac, char** av, const char* name=NULL);
+
+	// Destructor
+	virtual ~uPlotApp();
+
+	// Processing the request
+	virtual void serve (MvProtocol&,MvRequest&);
+
+private:
+	// No copy allowed
+	uPlotApp (const uPlotApp&);
+	uPlotApp& operator=(const uPlotApp&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/uPlotBase.cc b/src/uPlot/uPlotBase.cc
new file mode 100644
index 0000000..28cec04
--- /dev/null
+++ b/src/uPlot/uPlotBase.cc
@@ -0,0 +1,1132 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "uPlotBase.h"
+
+// Qt include files
+#include <QAbstractPrintDialog>
+#include <QAction>
+#include <QComboBox>
+#include <QDebug>   
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMenu>
+#include <QMessageBox>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPushButton>
+#include <QStringList>
+#include <QToolButton>
+#include <QVBoxLayout>
+#include <QWidgetAction>
+#include <QX11Info>
+
+//#ifndef QT_NO_OPENGL
+//#include <QGLWidget>
+//#endif
+
+// My Qt include files
+#include "MgQPlotScene.h"
+#include "MgQRootItem.h"
+#include "MgQSceneItem.h"
+
+#include "ExportDialog.h"
+#include "MvQAbout.h"
+#include "MvQApplication.h"
+#include "MvQPlotView.h"
+#include "MvQZoomStackWidget.h"
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+#include "MagPlusService.h"
+#include "ObjectList.h"
+#include "Root.h"
+#include "PlotModView.h"
+
+//#define PLACEMARK
+
+
+uPlotBase::uPlotBase(QWidget* parent) : MvQMainWindow(parent),
+	owner_  (0)
+{
+  	//Find out screen resolution
+  	int res=screenResolutionInDpi();
+  
+  	//resize(1020,720);
+
+	oriPlotWidthInCm_=-1.;
+	oriPlotHeightInCm_=-1.;
+		
+	//---------------------
+	// The scene
+	//---------------------
+	
+	plotScene_= new MgQPlotScene;
+ 	plotScene_->setSceneRect(QRectF());
+	plotScene_->setDpiResolution(res);
+
+	activeScene_=0;
+
+	//---------------------
+	// The view
+	//---------------------
+	
+	plotView_=new MvQPlotView(plotScene_);
+	plotView_->setMouseTracking(true);
+	plotView_->setBackgroundBrush(QColor(125,124,123));
+
+	connect(plotView_,SIGNAL(contextMenuEventHappened(const QPoint&,const QPointF&)),
+		this,SLOT(slotBuildContextMenu(const QPoint&,const QPointF&)));
+
+	connect(plotView_,SIGNAL(resizeEventHappened(const QSize&)),
+		this,SLOT(slotResizeEvent(const QSize&)));	
+	
+	connect(plotView_,SIGNAL(zoomRectangleIsDefined(const string&,const string&)),
+		this,SLOT(slotPerformZoom(const string&,const string&)));
+
+	//Setup the actions
+	//setupFileActions();
+	//setupViewActions();
+	//setupAnimationActions();
+	//setupZoomActions();
+	//setupToolsActions();
+	//setupHelpActions();
+
+	actionContextSelectScene_=0;
+	actionContextZoomUp_=0;
+	actionContextZoomDown_=0;
+	
+	// Setup Drag-Drop connection
+ 	connect(QApplication::instance(), SIGNAL(sendDropInfo(MvQIconDropItem* )),
+	        this, SLOT(processDrop(MvQIconDropItem*)));
+
+ 	connect(this, SIGNAL(sendDropRequest(MvRequest*)),
+		QApplication::instance(), SLOT(processDropRequest(MvRequest* )));
+
+	statusMessageLabel_ = new QLabel("");
+    	statusMessageLabel_->setFrameShape(QFrame::NoFrame);
+	   
+}
+
+uPlotBase::~uPlotBase()
+{
+	owner_  = 0;
+}
+
+void uPlotBase::setupViewActions()
+{
+QAction* action;
+	
+	//------------------
+	// Resize
+	//------------------
+	
+	//Plot size combo
+	sizeCombo_ = new QComboBox;
+
+	sizeMinValue_=10;
+	sizeMaxValue_=200;
+	sizeValueStep_=10;
+	
+	predefSizeValues_ << uPlotBase::FitToWindow << 
+	           uPlotBase::FitToWidth << uPlotBase::FitToHeight <<
+	           50 <<  75 << 100 << 150 << 200;   
+
+	customSizeItemIndex_=predefSizeValues_.count();
+
+	foreach(int val, predefSizeValues_)
+	{
+	  	if(val==uPlotBase::FitToWindow)
+		{
+			sizeCombo_->addItem(tr("Fit to Window"));
+		}
+		else if(val==uPlotBase::FitToWidth)
+		{
+			sizeCombo_->addItem(tr("Fit to Width"));
+		}
+		else if(val==uPlotBase::FitToHeight)
+		{
+			sizeCombo_->addItem(tr("Fit to Height"));
+		}
+		else 
+		{
+		 	QString s=QString::number(val) + "%";
+		 	sizeCombo_->addItem(s);
+		}
+		
+		sizeCombo_->setItemData(sizeCombo_->count()-1,val,Qt::UserRole);
+	}	
+
+	//sizeCombo_->setCurrentIndex(4);
+		
+	action=new QAction(this);
+	action->setText(tr("Decrease size"));
+        action->setIcon(QIcon(QPixmap(QString::fromUtf8(":/uPlot/size_down.svg"))));
+	actionSizeDown_=action;
+	
+	action=new QAction(this);
+	action->setText(tr("Increase size"));
+	action->setIcon(QIcon(QPixmap(QString::fromUtf8(":/uPlot/size_up.svg"))));
+	actionSizeUp_=action;
+		
+	connect(sizeCombo_,SIGNAL(currentIndexChanged(int)),
+		this,SLOT(slotSizeChanged(int)));	
+	
+	connect(actionSizeDown_,SIGNAL(triggered()),
+		this,SLOT(slotSizeDown()));
+
+	connect(actionSizeUp_,SIGNAL(triggered()),
+		this,SLOT(slotSizeUp()));	
+		
+	QAction *sep=new QAction(this);	
+	sep->setSeparator(true);
+		
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ViewMenu;	
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(sizeCombo_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionSizeDown_));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionSizeUp_));
+}
+
+void uPlotBase::setupZoomActions()
+{		
+	//Zoom
+        QAction *actionZoom = new QAction(this);
+        actionZoom->setObjectName(QString::fromUtf8("actionZoom"));
+        actionZoom->setCheckable(true);
+        QIcon icon;
+        icon.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/zoom.svg")), QIcon::Normal, QIcon::Off);
+        actionZoom->setIcon(icon);
+	actionZoom->setText(tr("&Zoom"));
+	//controlActions_.push_back(actionZoom);
+
+	//Up
+        actionZoomUp_ = new QAction(this);
+        actionZoomUp_->setObjectName(QString::fromUtf8("actionZoomStackUp"));
+	QIcon iconUp;
+	iconUp.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/zoom_out.svg")), QIcon::Normal, QIcon::Off);
+        actionZoomUp_->setIcon(iconUp);
+	//actionUp->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowUp));        
+	actionZoomUp_->setText(tr("Zoom &out"));
+        actionZoomUp_->setShortcut(tr("Ctrl+Up"));
+
+	//Down
+        actionZoomDown_ = new QAction(this);
+       	actionZoomDown_->setObjectName(QString::fromUtf8("actionZoomStackUp"));        
+	QIcon iconDown;
+	iconDown.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/zoom_in.svg")), QIcon::Normal, QIcon::Off);
+        actionZoomDown_->setIcon(iconDown);
+	//actionDown->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowDown));       
+	actionZoomDown_->setText(tr("Zoom &in"));
+        actionZoomDown_->setShortcut(tr("Ctrl+Down"));
+
+	//Zoomstack 
+	QToolButton *zoomStackPb = new QToolButton;
+	QIcon icon11;
+        icon11.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/zoom_stack.svg")), QIcon::Normal, QIcon::Off);
+        zoomStackPb->setIcon(icon11); 
+	zoomStackPb->setToolTip(tr("Zoom levels"));
+	zoomStackPb->setPopupMode(QToolButton::InstantPopup);
+
+	//zoomStackPb->setText(tr("Zoom history"));
+	zoomStackPb->setObjectName("zoomStackPb");
+
+	//QMenu *zoomStackMenu = new QMenu("&ZoomStack");
+
+	zoomStackWidget_ = new MvQZoomStackWidget(plotScene_);
+	zoomStackPb->setMenu(zoomStackWidget_);
+
+	//QWidgetAction *wa = new QWidgetAction(zoomStackMenu);
+	//wa->setDefaultWidget(zoomStackWidget_);
+	//zoomStackMenu->addAction(wa);
+
+	//Zoomstack combo
+	//zoomStackWidget_ = new MvQZoomStackWidget(plotScene_);
+
+	//Separator
+	//QAction *actionSep=new QAction(this);
+	//actionSep->setSeparator(true);
+
+	//Zoom button
+	connect(actionZoom, SIGNAL(toggled(bool)),
+		plotView_, SLOT(slotSetEnableZoom(bool)));
+
+	connect(plotView_,SIGNAL(zoomIsEnabledProgramatically(bool)),
+		actionZoom, SLOT(setChecked(bool)));
+
+
+	connect(zoomStackWidget_,SIGNAL(actLevelChanged(QString,int)),
+		this,SLOT(slotZoomStackLevelChanged(QString,int)));
+
+	connect(actionZoomUp_,SIGNAL(triggered()),
+		zoomStackWidget_,SLOT(slotStepUp()));
+
+	connect(actionZoomDown_,SIGNAL(triggered()),
+		zoomStackWidget_,SLOT(slotStepDown()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::ZoomMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionZoom));
+	menuItems_[menuType].push_back(new MvQMenuItem(actionZoomUp_)); //!!!
+	menuItems_[menuType].push_back(new MvQMenuItem(actionZoomDown_)); //!!!
+	//menuItems_["zoom"].push_back(new MvQMenuItem(actionSep));
+	menuItems_[menuType].push_back(new MvQMenuItem(zoomStackPb));
+}
+
+
+void uPlotBase::setupHelpActions()
+{		
+    	// About
+    	QAction *actionAbout = new QAction(this);
+    	actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
+    	QIcon icon;
+    	icon.addPixmap(QPixmap(QString::fromUtf8(":/window/metview_logo")), QIcon::Normal, QIcon::Off);
+   	 actionAbout->setIcon(icon);
+    	actionAbout->setText(tr("&About uPlot"));
+
+	connect(actionAbout, SIGNAL(triggered()), this, SLOT(slotShowAboutBox()));
+
+	MvQMainWindow::MenuType menuType=MvQMainWindow::HelpMenu;
+	
+	menuItems_[menuType].push_back(new MvQMenuItem(actionAbout,MvQMenuItem::MenuTarget));
+}
+
+void uPlotBase::setupContextMenuActions()
+{
+	QAction *action;
+	
+	//Up
+        action = new QAction(this);
+        action->setObjectName(QString::fromUtf8("actionContextZoomStackUp"));
+	QIcon iconUp;
+	iconUp.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/zoom_out.svg")), QIcon::Normal, QIcon::Off);
+        action->setIcon(iconUp);      
+	action->setText(tr("Zoom &out"));
+        action->setShortcut(tr("Ctrl+Up"));
+	actionContextZoomUp_=action;
+
+	//Down
+        action = new QAction(this);
+       	action->setObjectName(QString::fromUtf8("actionContextZoomStackUp"));        
+	QIcon iconDown;
+	iconDown.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/zoom_in.svg")), QIcon::Normal, QIcon::Off);
+        action->setIcon(iconDown); 
+	action->setText(tr("Zoom &in"));
+        action->setShortcut(tr("Ctrl+Down"));
+	actionContextZoomDown_=action;
+		
+	action = new QAction(this);
+        action->setObjectName(QString::fromUtf8("actionContextSelectScene"));
+        QIcon icon;
+        icon.addPixmap(QPixmap(QString::fromUtf8(":/uPlot/player_play.svg")), QIcon::Normal, QIcon::Off);
+        //action->setIcon(icon); 
+	action->setText(tr("&Select as active scene"));  	
+	actionContextSelectScene_=action;
+}
+
+
+void uPlotBase::SetupResources()
+{
+	// Find uPlot resources file and read it
+	Cached path = ObjectList::Find("visual_resources","uPlot","path");
+	MvRequest requPlot;
+	requPlot.read(path);
+requPlot.print();
+	int i = 0;
+	requPlot.rewind();
+	while ( requPlot )
+	{
+		i++;
+		requPlot.advance();
+	}
+	cout << "Number uPlot resources = " << i << endl;
+
+MvRequest tt;
+tt.read("/tmp/cgk/data/setup.txt");
+
+	i = 0;
+	tt.rewind();
+	while ( tt )
+	{
+		i++;
+		tt.advance();
+	}
+	cout << "Number total resources = " << i << endl;
+}
+
+
+void uPlotBase::setPlot(float hor,float ver)
+{	
+  	if(oriPlotWidthInCm_ < 0)
+	{
+	  	oriPlotWidthInCm_=hor;
+		oriPlotHeightInCm_=ver;
+	}
+	
+  	// Set drawing area size
+	//float hsize = floorf((75.*1./2.54) * hor);
+	//float vsize = floorf((75.*1./2.54) * ver);
+
+	//plotScene_->setSceneRect(0,0,hsize,vsize);
+	//plotView_->setMvPlotSize(hsize,vsize);
+}
+
+void uPlotBase::processDrop(MvQIconDropItem* drop)
+{
+	QPoint globalPos(x()+drop->x(),y()+drop->y());
+	
+	setDropTarget(globalPos);
+	
+	if(!plotView_->rect().contains(plotView_->mapFromGlobal(globalPos)))
+  		return;
+	
+  	// IMPORTANT: THIS CODE WILL BE REPLACED BY:
+	//	sPageId = activeScene_->layout().id();
+	// WE WILL ASK SYLVIE TO IMPLEMENT THIS FUNCTION
+
+	string sPageId;
+
+	if(activeScene_)	
+	{
+		sPageId = activeScene_->layout().id();
+		if(sPageId.empty())
+		{
+			MgQLayoutItem *projItem = activeScene_->firstProjectorItem();
+			sPageId = projItem->layout().id();
+		}
+	}
+	
+	// Build request to be sent back to source
+	int pageId;
+	istringstream sst(sPageId);
+    	sst >> pageId;
+    
+	MvRequest req("DROP_REQUEST");
+	req("BATCH") = drop->batchNumber();
+		
+	req("ACTION") = 3;
+
+	MvRequest subreq("DROP");
+	subreq("DROP_ID") = pageId;
+	subreq("DROP_X") = 12.;
+	subreq("DROP_Y") = 4.2;
+	subreq("_REGISTER_TRAILER") = 1;
+
+	req("HEADER") = subreq;
+
+	// Add View request if it exists
+	if ( owner_ )
+	{
+		Presentable *pres=owner_->FindBranch (pageId);
+		if(pres)
+		{
+		  	MvRequest reqView =pres->GetView().ViewRequest();
+			req("_CONTEXT") = reqView;
+		}
+		//Safety solution
+		else
+		{
+		  	MvRequest reqView = owner_->Request()("PAGES");
+			reqView = reqView("VIEW");
+			req("_CONTEXT") = reqView;
+		}
+	}
+	
+	req.print();
+	
+	// Send drop request to the appropriate function
+	emit sendDropRequest(&req);
+
+}
+
+
+void uPlotBase::processContentsRequest(MvRequest &iconReq)
+{
+  	owner_->contentsRequest(iconReq);	
+}  
+  
+void uPlotBase::EnableDropAction(string& name)
+{
+	// Set drag&drop properties
+	Atom CanDropAtom   = XInternAtom(QX11Info::display(),"ICON_CAN_DRAG_DROP",False);
+	XChangeProperty(
+	    QX11Info::display(),
+	    winId(),
+	    CanDropAtom,
+	    XA_WINDOW,
+	    8,
+	    PropModeReplace,
+	    (unsigned char *)name.c_str(),
+	    strlen(name.c_str())+1);
+
+	Atom InfoAtom   = XInternAtom(QX11Info::display(),"ICON_DROP_INFO",False);
+	XChangeProperty(
+	    QX11Info::display(),
+	    winId(),
+	    InfoAtom,
+	    XA_WINDOW,
+	    8,
+	    PropModeReplace,
+	    (unsigned char *)name.c_str(),
+	    strlen(name.c_str())+1);
+}
+
+#if 0
+void uPlotBase::dataReceived()
+{
+	cout << " dataReceived " << endl;
+	const QMetaObject *tt = metaObject ();
+}
+#endif
+
+
+void uPlotBase::slotEnableOpenGL(bool /*opengl*/)
+{
+//#ifndef QT_NO_OPENGL	
+//     	plotView_->setViewport(opengl ? 
+//		new QGLWidget(QGLFormat(QGL::SampleBuffers |  QGL::DoubleBuffer | QGL::AlphaChannel)) :
+//		new QWidget);
+//#endif
+}
+
+void uPlotBase::slotEnableAntialias(bool status)
+{
+	plotScene_->setEnableAntialias(status);
+}
+
+//===================================================
+//
+//  Zoom slots
+//
+//===================================================
+
+void uPlotBase::slotZoomStackLevelChanged(QString layoutId, int actLevel)
+{
+	owner_->ZoomRequest(layoutId.toInt(),actLevel);
+}
+
+void uPlotBase::updateZoomActionState()	
+{
+	int levelNum=zoomStackWidget_->levelNum();
+	int actLevel=zoomStackWidget_->currentLevel();
+
+	if(levelNum <= 1)
+	{
+		actionZoomUp_->setEnabled(false);
+		actionZoomDown_->setEnabled(false);
+	}
+	else if(actLevel == 0)
+	{
+		actionZoomUp_->setEnabled(false);
+		actionZoomDown_->setEnabled(true);
+	}
+	else if(actLevel == levelNum-1)
+	{	
+		actionZoomUp_->setEnabled(true);
+		actionZoomDown_->setEnabled(false);
+	}
+	else
+	{
+		actionZoomUp_->setEnabled(true);
+		actionZoomDown_->setEnabled(true);
+	}
+}	
+
+void uPlotBase::slotPerformZoom(const string& sid,const string &def)
+{
+	//Location stores the bottom-left,top-right corners. 
+	//Its constructor is requeres the following order:
+	//top,left,bottom,right
+	
+	//Change active scen if needed befor performing the zoom
+	if(activeScene_)
+	{	  
+	  	MgQLayoutItem *projItem=activeScene_->firstProjectorItem();
+		if(projItem && projItem->layout().id() != sid)
+		{
+			foreach(MgQSceneItem *item,plotScene_->sceneItems())
+			{
+			  	projItem=item->firstProjectorItem();		
+				if(projItem && sid == projItem->layout().id())
+				{
+					activeScene_=item;
+					break;  
+				}	 
+			}
+		}
+	}	
+		
+	//Location zoomCoord(tr_y,bl_x,bl_y,tr_x);
+	int id=QString(sid.c_str()).toInt();
+	owner_->ZoomRequest(id,def);
+}
+
+
+void uPlotBase::slotStepCacheStateChanged()
+{
+	//Layer model will be reset since as new animation step is cached
+	//new layers might have added to the scene
+	//layerWidget_->model()->layersAreAboutToChange();
+
+	//Notify the scene about the unique layers's status. This will set the
+	//status of all the new layers to the correct values
+	//plotScene_->updateLayers(layerWidget_->model()->layers());
+
+	//Pass the new list of unique layers to the layer model and 
+	//finish its resetting
+	//layerWidget_->model()->setLayers(plotScene_->uniqueLayers());
+}
+
+
+void uPlotBase::slotLoadExportDialog()
+{
+	ExportDialog exportDialog(currentStep(),stepNum());
+
+	connect(&exportDialog,SIGNAL(sendExpDialogInfo(MvRequest*)),
+		this,SLOT(slotExpDialogInfo(MvRequest*)));
+
+	if ( !exportDialog.exec() )
+		return;
+}
+
+void uPlotBase::slotLoadPrintDialog()
+{
+	// Is there anything plotted?
+	if ( !owner_ )
+	{
+		cout << "Nothing to be printed" << endl;
+		return;
+	}
+
+	// Create the PrintDialog user interface
+#if 0 // Qt printing
+	QPrinter printer(QPrinter::HighResolution);
+	QPrintDialog dialog( &printer );
+	if ( !dialog.exec() )
+		return;
+
+	// Get printer attributes
+//	printer.setResolution(300);
+//	printer.setOutputFormat(QPrinter::PostScriptFormat);Enabled
+//qDebug() << printer.resolution();
+
+	// Recreate the plot and sent it to the printer
+	QPainter painter(&printer);
+	painter.translate(0,painter.viewport().height()); //origin moved to lower left corner
+	painter.scale(1.,-1.);				  //plot directions: W->E and S->N
+	plotScene_->render(&painter);
+
+#else //lpr printing
+	QPrintDialog printDialog;
+	QPrinter* pr = printDialog.printer();
+
+	// Read and apply previous gui settings
+	// The default printer name is defined by UNIX and
+	// it seems that it can not be changed by QPrinter
+	QSettings settings("ECMWF","uPlotPrintDialog");
+	settings.beginGroup("main");
+        pr->setOrientation((QPrinter::Orientation)settings.value("orientation").toInt());
+	settings.endGroup();
+
+	// Set print dialog default values
+	printDialog.setOption(QAbstractPrintDialog::PrintToFile,false);
+	printDialog.setOption(QAbstractPrintDialog::PrintCollateCopies,false);
+	printDialog.setPrintRange(QAbstractPrintDialog::PageRange);
+	printDialog.setMinMax(1,stepNum());
+	printDialog.setFromTo(currentStep()+1,currentStep()+1);
+	if ( !printDialog.exec() ) return;
+
+	// Get printer parameters
+	string name = pr->printerName().toLocal8Bit().constData();
+	int orientation = pr->orientation();  //0-portrait, 1-landscape
+	int numCopies = pr->actualNumCopies();
+
+	// Create printer request
+	MvRequest printerReq( "PRINTER_MANAGER" );
+	printerReq("DESTINATION")  = MVPRINTER;
+	printerReq("PRINTER_NAME") = name.c_str();
+	printerReq("ORIENTATION")  = orientation;
+	printerReq("NUMBER_COPIES") = numCopies;
+
+	// Get print range parameters
+	if ( printDialog.printRange() == QAbstractPrintDialog::PageRange )
+	{
+		// Get range of values
+		for ( int i = printDialog.fromPage(); i <= printDialog.toPage(); i++ )
+			printerReq.addValue("_OUTPUT_FRAME_LIST",i);
+	}
+
+	// Ask my owner to recreate the plot and send it to the output device
+	owner_->PrintFile(printerReq);
+
+	// Save current gui settings
+	settings.beginGroup("main");
+	settings.setValue("orientation",orientation);
+	settings.endGroup();
+#endif
+}
+
+void uPlotBase::slotExpDialogInfo (MvRequest* req1)
+{
+	// Is there anything plotted?
+	if ( !owner_ ) {
+		cout << "Nothing to be exported" << endl;
+		return;
+	}
+
+// THIS IS A TEMPORARY SOLUTION TO ACCEPT ONLY FORMATS PS AND PDF
+// MOVE FROM QPRINTER TO QIMAGE TO ACCEPT OTHER FORMATS
+#if 0 //Qt export
+
+	// Loop on drivers
+	MvRequest req (*req1);  // change prototype to receive a req& not a *req
+	while (req)
+	{
+		const char* fname;
+		req.getValue(fname,"OUTPUT_NAME");
+		string verb = req.getVerb();
+		size_t found = verb.find("OUTPUT");
+		string format = verb.substr(0,found);
+		std::transform(format.begin(), format.end(),format.begin(), ::tolower);
+
+		if ( format.compare("ps") == 0 || format.compare("pdf") == 0 )
+		{
+			QPrinter printer (QPrinter::HighResolution);
+			printer.setPaperSize(QPrinter::A4);
+
+			if ( format.compare("ps") == 0 )
+				printer.setOutputFormat(QPrinter::PostScriptFormat);
+			else
+				printer.setOutputFormat(QPrinter::PdfFormat);
+
+			string str(fname);
+			str += ".";
+			str += format;
+
+			printer.setOutputFileName(str.c_str());
+			printer.setOrientation(QPrinter::Landscape);
+
+			// Recreate the plot and save it accordingly
+			QPainter painter(&printer);
+			painter.translate(0,painter.viewport().height()); //origin moved to lower left corner
+			painter.scale(1.,-1.); //plot directions: W->E and S->N
+			//plotScene_->render(&painter);
+			plotScene_->renderForPrinter(&painter);
+		}
+		else
+		{
+/*
+			QImage image;
+			QPainter painter(&image);
+			painter.translate(0,painter.viewport().height()); //origin moved to lower left corner
+			painter.scale(1.,-1.); //plot directions: W->E and S->N
+			plotScene_->render(&painter);*/
+		}
+
+		req.advance();
+	}
+
+#else //Magics++ export
+	// Ask my owner to recreate the plot and save it accordingly
+	if ( owner_->ExportPlot(req1) == false )
+	{
+		cout << "CREATE A ERROR WINDOW MESSAGE" << endl;
+	}
+#endif
+}
+
+void uPlotBase::slotGenerateMacro ()
+{
+	if ( !owner_ ) {
+		cout << "Display image empty. Nothing to be generated" << endl;
+		return;
+	}
+
+	// Ask my owner to recreate the plot and save it in a file
+	owner_->GenerateMacro();
+}
+
+void uPlotBase::slotShowAboutBox()
+{
+	string magicsVersionString = getMagicsVersionString();
+   	QString magicsVersion(QString::fromUtf8(magicsVersionString.c_str()));
+
+   	QMap<MvQAbout::Version,QString> text;
+  	text[MvQAbout::MagicsVersion]=magicsVersion;	
+
+   	MvQAbout about("uPlot","",
+		  MvQAbout::GribApiVersion | MvQAbout::MetviewVersion | MvQAbout::MagicsVersion,
+		  text);
+		  
+	about.exec();	  
+}
+
+//===============================
+//
+// Resize
+//
+//===============================
+
+void uPlotBase::slotResizeEvent(const QSize&)
+{
+	int index=sizeCombo_->currentIndex();
+  	int id=sizeCombo_->itemData(index,Qt::UserRole).toInt();
+	if(id==FitToWindow || id==FitToWidth || id==FitToHeight)
+	{
+	 	changeSize(id);
+	}	
+}  
+
+void uPlotBase::slotSizeChanged(int index)
+{
+  	changeSize(sizeCombo_->itemData(index,Qt::UserRole).toInt());	
+}
+
+void uPlotBase::slotSizeDown()
+{	
+	int scalingId;
+  	int id=sizeCombo_->itemData(sizeCombo_->currentIndex(),Qt::UserRole).toInt();	
+	
+	if(id == FitToWindow  ||  id == FitToWidth || id == FitToHeight)	
+	{
+	  	float scaling=currentSizeRatio();
+  		scalingId=static_cast<int>(scaling*100.);
+	}
+	else
+	{
+		scalingId=id;
+	}		
+
+	scalingId-=sizeValueStep_;
+	
+	if(scalingId >= sizeMinValue_ && scalingId <= sizeMaxValue_ )
+	{
+	 	setCustomSize(scalingId);
+	}	
+}
+
+void uPlotBase::slotSizeUp()
+{
+	int scalingId;
+  	int id=sizeCombo_->itemData(sizeCombo_->currentIndex(),Qt::UserRole).toInt();	
+	
+	if(id == FitToWindow  ||  id == FitToWidth || id == FitToHeight)	
+	{
+	  	float scaling=currentSizeRatio();
+  		scalingId=static_cast<int>(scaling*100.);
+	}
+	else
+	{
+		scalingId=id;
+	}		
+  
+	scalingId+=sizeValueStep_;
+	
+	if(scalingId >= sizeMinValue_ && scalingId <= sizeMaxValue_ )
+	{
+	 	setCustomSize(scalingId);
+	}	  
+}
+
+void uPlotBase::setCustomSize(int sizeId)
+{	
+	//If custom size item is not available in the combobox we add one to it
+	if(customSizeItemIndex_ >= sizeCombo_->count())
+	{  
+		sizeCombo_->addItem(QString::number(sizeId) + "%",sizeId);		
+	}
+	else if(customSizeItemIndex_ == sizeCombo_->count()-1)
+	{  
+	 	sizeCombo_->setItemData(customSizeItemIndex_,sizeId);
+	 	sizeCombo_->setItemText(customSizeItemIndex_,QString::number(sizeId) + "%");
+	}
+	
+	if(sizeCombo_->currentIndex() != customSizeItemIndex_)
+	{	  		
+		sizeCombo_->setCurrentIndex(customSizeItemIndex_);
+	}
+	else
+	{
+		changeSize(sizeId);	
+	}  	
+}
+
+float uPlotBase::currentSizeRatio()
+{
+	QRectF currentRect=plotScene_->sceneRect();  
+  	if(currentRect.isEmpty())
+	{
+		 return 1.;
+	}	 
+			
+	QRectF oriRect=plotScene_->oriSceneRect();
+	if(oriRect.isEmpty())
+	{
+		 return 1.;
+	}
+	
+	return currentRect.width()/oriRect.width();
+}  
+
+void uPlotBase::changeSize(int sizeId,bool renderIt)
+{
+  	float scaling;
+  	
+	if(sizeId==FitToWindow)
+	{
+		QRectF sceneRect=plotScene_->sceneRect();
+		if(sceneRect.isEmpty())
+		{
+		  	return;
+		}		
+		
+		QSize size=plotView_->maximumViewportSize();
+		float wRatio=size.width()/sceneRect.width();
+		float hRatio=size.height()/sceneRect.height();		
+		scaling=(wRatio < hRatio)?wRatio:hRatio;	
+	
+	  	if(scaling < 0.95 || scaling > 1.05)
+		{		
+	 		plotScene_->setPlotScale(scaling,MgQPlotScene::RelativeToCurrentSize);
+		}
+
+	}
+	else if(sizeId==FitToWidth)
+	{
+	  	QRectF sceneRect=plotScene_->sceneRect();
+		if(sceneRect.isEmpty())
+		{
+		  	return;
+		}
+		
+		QSize size=plotView_->maximumViewportSize();
+		float wRatio=size.width()/sceneRect.width();	
+		scaling=wRatio;	
+	
+	  	if(scaling < 0.95 || scaling > 1.05)
+		{		
+	 		plotScene_->setPlotScale(scaling,MgQPlotScene::RelativeToCurrentSize);
+		}		
+	}  
+	else if(sizeId==FitToHeight)
+	{
+	  	QRectF sceneRect=plotScene_->sceneRect();
+		if(sceneRect.isEmpty())
+		{
+		  	return;
+		}
+		
+		QSize size=plotView_->maximumViewportSize();
+		float hRatio=size.height()/sceneRect.height();		
+		scaling=hRatio;	
+	
+	  	if(scaling < 0.95 || scaling > 1.05)
+		{		
+	 		plotScene_->setPlotScale(scaling,MgQPlotScene::RelativeToCurrentSize);
+		}		
+	}  		
+	else if(sizeId >=10 && sizeId <= 200)
+	{
+	  	scaling=static_cast<float>(sizeId)*0.01;
+		
+		//float w=oriPlotWidthInCm_*scaling;
+		//float h=oriPlotHeightInCm_*scaling; 
+		
+		plotScene_->setPlotScale(scaling,MgQPlotScene::RelativeToOriSize);
+		
+ 		if(renderIt)
+		{
+			plotScene_->sceneItemChanged();	
+		}	
+	}
+	
+	if(renderIt)
+	{
+		plotScene_->sceneItemChanged();	
+	}	
+		
+	updateResizeActionState();	
+
+	emit plotScaleChanged();
+	
+	//GraphicsEngine& ge = owner_->GetGraphicsEngine();
+	//owner_->ResizeRequest(w,h);	
+}  
+
+void uPlotBase::updateResizeActionState()	
+{
+	int index=sizeCombo_->currentIndex();
+	int id=sizeCombo_->itemData(index,Qt::UserRole).toInt();
+	int sizeId;
+	
+	if(index < 0)
+		return;	
+	
+	if(id==FitToWindow || id==FitToWidth || id==FitToHeight)
+	{
+		sizeId=static_cast<int>(plotScene_->plotScale()*100);
+	}
+	else
+	{
+		sizeId=id;
+	}
+
+	if(sizeId+sizeValueStep_ <= sizeMaxValue_)
+	{
+		actionSizeUp_->setEnabled(true);
+	}
+	else
+	{
+		actionSizeUp_->setEnabled(false);
+	}
+	
+	if(sizeId-sizeValueStep_ >= sizeMinValue_)
+	{
+		  actionSizeDown_->setEnabled(true);
+	}
+	else
+	{
+		  actionSizeDown_->setEnabled(false);
+	}				  
+}
+
+
+void uPlotBase::slotBuildContextMenu(const QPoint& globalPos,const QPointF& scenePos)
+{
+	setupContextMenuActions();
+ 
+	QList<QAction*> actions;
+	
+  	//If there is only one scene
+ 	if(plotScene_->sceneItems().count() <=1)
+	{ 	
+		actions  << actionZoomUp_ << actionZoomDown_;
+		QMenu::exec(actions,globalPos);
+		return;
+	}
+	
+	//More than one scene	
+	MgQSceneItem *item=plotScene_->findSceneItem(scenePos);
+	if(!item)
+	  	return;
+	
+	
+	//Context menu triggered from the active scene
+	if(item == activeScene_)
+	{
+		actions  << actionZoomUp_ << actionZoomDown_;
+		QMenu::exec(actions,globalPos);		
+	} 
+		
+	//Context menu triggered from a non-active scene
+	else
+	{		  
+		actions << actionContextSelectScene_ << actionContextZoomUp_ << actionContextZoomDown_;
+		
+		//Set the status of the context zoom actions
+		MvQZoomStackData* zoomData=zoomStackWidget_->pageData(item);
+		if(zoomData)
+		{
+			int levelNum=zoomData->levelNum();
+			int actLevel=zoomData->selectedLevel();
+
+			if(levelNum <= 1)
+			{
+				actionContextZoomUp_->setEnabled(false);
+				actionContextZoomDown_->setEnabled(false);
+			}
+			else if(actLevel == 0)
+			{
+				actionContextZoomUp_->setEnabled(false);
+				actionContextZoomDown_->setEnabled(true);
+			}
+			else if(actLevel == levelNum-1)
+			{	
+				actionContextZoomUp_->setEnabled(true);
+				actionContextZoomDown_->setEnabled(false);
+			}
+			else
+			{
+				actionContextZoomUp_->setEnabled(true);
+				actionContextZoomDown_->setEnabled(true);
+			}
+		}
+		else
+		{
+		 	actionContextZoomUp_->setEnabled(false);
+			actionContextZoomDown_->setEnabled(false);
+		}  
+
+		QAction *action=QMenu::exec(actions,globalPos);
+	
+		if(action == actionContextSelectScene_)
+		{  
+			slotSetActiveScene(item);			
+		}
+		else if(action == actionContextZoomUp_)
+		{  
+			slotSetActiveScene(item);
+			//Now this scene is active. We can use the original zoomUp action!!
+			actionZoomUp_->trigger();
+		}
+		else if(action == actionContextZoomDown_)
+		{  
+			slotSetActiveScene(item);
+			//Now this scene is active. We can use the original zoomDown action!!
+			actionZoomDown_->trigger();
+		}				
+	}	
+}
+
+
+
+int uPlotBase::screenResolutionInDpi()
+{	
+	int defaultRes=75;
+  
+  	char *mvres=getenv("METVIEW_SCREEN_RESOLUTION");
+	if (mvres)  
+	{
+		int res=QString(mvres).toInt();	
+		if(res > 50 && res < 320)
+		{
+			  return res;
+		}
+	}	
+	
+	return defaultRes;
+}
+
+// ----------------------------------------------------------------------------
+// uPlotBase::messageToLogWindow
+// sends the given message to the Metview message log window
+// ----------------------------------------------------------------------------
+
+void uPlotBase::messageToLogWindow (const string& msg, int severity)
+{
+	MvRequest reqst("USER_MESSAGE");
+	reqst("INFO") = msg.c_str(); 
+	send_message(MvApplication::instance().getService(),(request*)reqst);
+
+
+        // also send to the Mars/Metview module log
+	char msg_c[1024];
+	strncpy(msg_c, msg.c_str(), 1023);
+	marslog(severity, msg_c);
+}
+
+void uPlotBase::setPlotWidgetSize(float hor,float ver)
+{
+	setPlot(hor,ver);
+}
+
+
diff --git a/src/uPlot/uPlotBase.h b/src/uPlot/uPlotBase.h
new file mode 100644
index 0000000..90c3cd6
--- /dev/null
+++ b/src/uPlot/uPlotBase.h
@@ -0,0 +1,154 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef uPlotBase_H
+#define uPlotBase_H
+
+#include <QComboBox>
+#include <QModelIndex>
+#include <QPointF>
+#include <QSettings>
+
+#include "MvQDragDrop.h"
+#include "MvQMainWindow.h"
+#include "MvQMenuItem.h"
+
+#include "Presentable.h"
+
+class MvRequest;
+
+class QAction;
+class QComboBox;
+class QGraphicsRectItem;
+class QGraphicsScene;
+class QGraphicsView;
+class QLabel;
+class QSlider;
+
+class ExportDialog;
+class MgQPlotScene;
+class MgQSceneItem;
+class MvQPlotView;
+class MvQZoomStackWidget;
+
+using namespace std;
+
+class uPlotBase : public MvQMainWindow
+{
+    Q_OBJECT
+
+public:
+	uPlotBase(QWidget *parent = 0);
+	virtual ~uPlotBase();
+
+	void setPlot(float hor,float ver);
+	void setPlotWidgetSize(float hor,float ver);
+	void messageToLogWindow (const string&, int severity);
+	
+	MvQPlotView*  plotView() {return plotView_;}
+	MgQPlotScene* plotScene() {return plotScene_;}
+		
+	virtual void newRequestForDriversBegin() =0;
+	virtual void newRequestForDriversEnd()  =0;
+	virtual void progressMessage(const string&) {};
+		
+	void EnableDropAction(string&);
+	void processContentsRequest(MvRequest&);
+	void SetPresentable(Presentable& owner) { owner_=&owner;}
+	virtual MvRequest SuperPageRequest( ) { return MvRequest();}
+
+signals:	
+	void plotWindowUpdated();
+	void plotScaleChanged();
+	void sendDropRequest(MvRequest*);
+
+public slots:
+	virtual void processDrop(MvQIconDropItem*);
+	void slotEnableAntialias(bool);
+	void slotEnableOpenGL(bool);
+	void slotZoomStackLevelChanged(QString,int);
+	void slotPerformZoom(const string& sid,const string &def);
+	void slotStepCacheStateChanged();	
+	void slotLoadExportDialog();
+	void slotLoadPrintDialog();
+	void slotGenerateMacro();
+	void slotExpDialogInfo(MvRequest*);
+	void slotShowAboutBox();
+	void slotSizeChanged(int);
+	void slotSizeDown();
+	void slotSizeUp();	
+	void slotBuildContextMenu(const QPoint&,const QPointF&);
+	void slotResizeEvent(const QSize &);
+	virtual void slotSetActiveScene(MgQSceneItem*)=0;
+
+protected:
+	void SetupResources();
+
+	virtual void setupViewActions();
+	void setupZoomActions();
+	void setupHelpActions();
+	void setupContextMenuActions();
+
+	void updateZoomActionState();	
+	void updateResizeActionState();
+
+	virtual bool setDropTarget(QPoint)=0;
+	virtual int currentStep()=0;
+	virtual int stepNum()=0;
+	
+	void setCustomSize(int);
+	float currentSizeRatio();
+	void changeSize(int,bool renderIt=true);
+	int screenResolutionInDpi();
+	
+	virtual void loadStarted() {};
+	virtual void loadFinished() {};
+
+	virtual void writeSettings()=0;
+	virtual void readSettings()=0;
+		
+	Presentable* owner_;
+
+	MvQMainWindow::MenuItemMap menuItems_;
+		
+	MvQPlotView* plotView_;
+	MgQPlotScene* plotScene_;
+
+	//Zoom
+	MvQZoomStackWidget* zoomStackWidget_;
+	QAction* actionZoomUp_;
+	QAction* actionZoomDown_;
+
+	//Context menu 
+	QAction* actionContextSelectScene_;
+	QAction* actionContextZoomUp_;
+	QAction* actionContextZoomDown_;
+	
+	//Active scene
+	MgQSceneItem* activeScene_;
+	string prevActiveSceneId_;
+
+	//Size
+	enum SizeOptions {FitToWindow=-1,FitToWidth=-2,FitToHeight=-3};
+	QAction* actionSizeDown_;
+	QAction* actionSizeUp_;
+	QComboBox* sizeCombo_;
+	QList<int> predefSizeValues_;
+	int sizeMinValue_;
+	int sizeMaxValue_;
+	int sizeValueStep_; 
+	int customSizeItemIndex_;
+	float oriPlotWidthInCm_;
+	float oriPlotHeightInCm_;
+	
+	//Progress
+	QLabel*		statusMessageLabel_;
+};
+
+#endif
diff --git a/src/uPlot/uPlotBatchApp.cc b/src/uPlot/uPlotBatchApp.cc
new file mode 100644
index 0000000..8175284
--- /dev/null
+++ b/src/uPlot/uPlotBatchApp.cc
@@ -0,0 +1,49 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <MvTemplates.h>
+
+#include "uPlotBatchApp.h"
+#include "PmContext.h"
+#include "Root.h"
+
+uPlotBatchApp::uPlotBatchApp(int& ac, char** av, const char* name) : 
+	MvApplication(ac,av,name)
+{
+	// Install Resources
+//	InstallResources();
+
+	// Register this service
+	registerTMvServe(*this,0);
+}
+
+uPlotBatchApp::~uPlotBatchApp()
+{
+}
+
+// Serve Method
+// called by MvTransaction to process the request
+void
+uPlotBatchApp::serve ( MvProtocol& proto, MvRequest& inRequest )
+{
+	// Create a new context, based on the input Request
+	PmContext * context = new PmContext ( proto, inRequest );
+
+	// Increment the reference counting
+	context->Attach();
+
+	// It is a new call, so it first needs to clean the previous structure
+	Root::Instance().Clean();
+
+	// Execute the context
+	context->Execute();
+
+	// Decrement the reference counting
+//	context->Detach();
+}
diff --git a/src/uPlot/uPlotBatchApp.h b/src/uPlot/uPlotBatchApp.h
new file mode 100644
index 0000000..b75a43b
--- /dev/null
+++ b/src/uPlot/uPlotBatchApp.h
@@ -0,0 +1,37 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#ifndef uPlotBatchApp_H
+#define uPlotBatchApp_H
+
+#include <MvRequest.h>
+#include <MvProtocol.h>
+#include <MvApplication.h>
+
+using namespace std;
+
+class uPlotBatchApp : public MvApplication
+{
+public:
+	// Constructor
+	uPlotBatchApp (int& ac, char** av, const char* name=NULL);
+
+	// Destructor
+	virtual ~uPlotBatchApp();
+
+	// Processing the request
+	virtual void serve (MvProtocol&,MvRequest&);
+
+private:
+	// No copy allowed
+	uPlotBatchApp (const uPlotBatchApp&);
+	uPlotBatchApp& operator=(const uPlotBatchApp&){return *this;}
+};
+
+#endif
diff --git a/src/uPlot/uPlotManager.cc b/src/uPlot/uPlotManager.cc
new file mode 100644
index 0000000..0455e65
--- /dev/null
+++ b/src/uPlot/uPlotManager.cc
@@ -0,0 +1,99 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include "uPlotManager.hpp"
+#include <uPlotService.hpp>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "MvScanFileType.h"
+#ifdef METVIEW_ODB_NEW
+#include "MvOdb.h"
+#endif
+
+uPlotManager::uPlotManager(const char* kw): MvService(kw)
+{
+     saveToPool(false);
+}
+
+void uPlotManager::serve(MvRequest& in,MvRequest& out)
+{
+	cout << "uPlotManager::serve --> in" << endl;
+	in.print();
+
+        uPlotService::Instance().CalluPlot ( in,out );
+
+	return;
+}
+
+//--------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+	// Set option -debug to true
+	// This is needed in order to force the Save Request command
+	// to save the hidden parameters too (underscore parameters)
+   option opts[] = {"debug","MARS_DEBUG","-debug","1",t_boolean, sizeof(boolean),OFFSET(globals,debug)};
+
+	MvApplication theApp(argc,argv,NULL,&mars,1,opts);
+
+	uPlotManager vis0("UPLOT_MANAGER");
+	uPlotManager vis1("GRIB");
+	uPlotManager vis2("GEOPOINTS");
+	uPlotManager vis3("MAPVIEW");
+	uPlotManager vis4("CARTESIANVIEW");
+	uPlotManager vis6("PLOT_SUPERPAGE");
+	uPlotManager vis7("PRASTERLOOP");
+	uPlotManager vis8("BUFR");
+	uPlotManager vis9("PRINTER_MANAGER");
+    uPlotManager vis10("GEOVIEW");
+    uPlotManager vis11("MXSECTVIEW");
+    uPlotManager vis12("MVERTPROFVIEW");
+    uPlotManager vis13("MAVERAGEVIEW");
+
+    uPlotManager nc0("NETCDF_GEO_POINTS");
+    uPlotManager nc1("NETCDF_GEO_VECTORS");
+    uPlotManager nc2("NETCDF_GEO_MATRIX");
+    uPlotManager nc3("NETCDF_XY_MATRIX");
+    uPlotManager nc4("NETCDF_XY_POINTS");
+
+    uPlotManager i1 ("INPUT_HISTOGRAM");
+	uPlotManager i2 ("INPUT_XY_POINTS");
+	uPlotManager i3 ("INPUT_GEO_POINTS");
+	uPlotManager i4 ("INPUT_XY_VECTORS");
+	uPlotManager i5 ("INPUT_GEO_VECTORS");
+	uPlotManager i6 ("INPUT_XY_BINNING");
+	uPlotManager i7 ("INPUT_GEO_BINNING");
+	uPlotManager i8 ("INPUT_XY_BOXES");
+	uPlotManager i9 ("INPUT_GEO_BOXES");
+	uPlotManager i10("INPUT_HOR_BAR");
+	uPlotManager i11("INPUT_VER_BAR");
+
+	uPlotManager t1 ("TABLE_HISTOGRAM");
+	uPlotManager t2 ("TABLE_XY_POINTS");
+	uPlotManager t3 ("TABLE_GEO_POINTS");
+	uPlotManager t4 ("TABLE_XY_VECTORS");
+	uPlotManager t5 ("TABLE_GEO_VECTORS");
+	uPlotManager t6 ("TABLE_XY_BINNING");
+	uPlotManager t7 ("TABLE_GEO_BINNING");
+	uPlotManager t8 ("TABLE_XY_BOXES");
+	uPlotManager t9 ("TABLE_GEO_BOXES");
+	uPlotManager t10("TABLE_HOR_BAR");
+	uPlotManager t11("TABLE_VER_BAR");
+
+	uPlotManager odb1("ODB_GEO_POINTS");
+	uPlotManager odb2("ODB_GEO_VECTORS");
+	uPlotManager odb3("ODB_XY_POINTS");
+	uPlotManager odb4("ODB_XY_VECTORS");
+	uPlotManager odb5("ODB_XY_BINNING");
+	
+   uPlotManager gv1("GRIB_VECTORS");
+
+	theApp.run();
+}
diff --git a/src/uPlot/uPlotManager.hpp b/src/uPlot/uPlotManager.hpp
new file mode 100644
index 0000000..a6c4e2d
--- /dev/null
+++ b/src/uPlot/uPlotManager.hpp
@@ -0,0 +1,29 @@
+#ifndef uPLOTMANAGER_H
+#define uPLOTMANAGER_H
+
+/**************
+  Application uPlotManager
+
+  Manager the uPlot visualisation module
+***************/
+
+#include "Metview.h"
+
+class uPlotManager : public MvService {
+
+public:
+
+	// Constructor
+	uPlotManager(const char* kw);
+
+	// Destructor
+	~uPlotManager() {}
+
+	void serve(MvRequest&,MvRequest&);
+
+protected:
+
+
+};
+
+#endif
diff --git a/src/uPlot/uPlotService.cc b/src/uPlot/uPlotService.cc
new file mode 100644
index 0000000..3a20265
--- /dev/null
+++ b/src/uPlot/uPlotService.cc
@@ -0,0 +1,134 @@
+/***************************** LICENSE START ***********************************
+
+ Copyright 2012 ECMWF and INPE. This software is distributed under the terms
+ of the Apache License version 2.0. In applying this license, ECMWF does not
+ waive the privileges and immunities granted to it by virtue of its status as
+ an Intergovernmental Organization or submit itself to any jurisdiction.
+
+ ***************************** LICENSE END *************************************/
+
+#include <inc_iostream.h>
+#include "Assertions.hpp"
+#include <MvServiceTask.h>
+#include "uPlotService.hpp"
+
+// Methods for the uPlot Service class
+//
+
+// --- METHOD:  Instance
+//
+// --- PURPOSE: Provide access to the singleton
+//              uPlotService class 
+
+uPlotService&
+uPlotService::Instance()
+{
+	static uPlotService uPlotServiceInstance_;
+	return uPlotServiceInstance_;
+}
+
+uPlotService::uPlotService ()
+{
+	// Empty
+}
+
+uPlotService::~uPlotService()
+{
+
+}
+
+// --- METHOD:  CalluPlot
+//
+// --- PURPOSE: Calls uPlot
+//
+// --- INPUT:   (a) Request containing an action for uPlot to process
+void
+uPlotService::CalluPlot ( MvRequest& uPlotRequest, MvRequest& out)
+{
+#if 1
+	// Option 1: Use system command to start uPlot. uPlot will fork,
+	// register itself and read the initial request to be processed.
+	// This request is stored in a temporary file whose filename is
+	// passed to uPlot in the command line argument.
+
+	// Save request to be processed by uPlot
+	const char* ftemp = marstmp();
+	uPlotRequest.save(ftemp);
+
+	// Tell the caller that the request was done
+	// The problem here is that the icon will be green even if uPlot
+	// can not process the request.
+	// WE NEED TO FIND A BETTER SOLUTION!!!!!!!
+	out.setVerb("REPLY");
+	out("TARGET") = "MetviewUI";
+
+	string GRIB_DEFINITION_PATH_ENV;
+	const char* grb_def_path=getenv("GRIB_DEFINITION_PATH");
+	if(grb_def_path)
+	{
+		GRIB_DEFINITION_PATH_ENV=string(grb_def_path);
+	}
+
+	string cmd;
+
+	// does this request contain a directive to change the working directory?
+	const char* cwd = uPlotRequest("_CWD");
+	if (cwd)
+	{
+		cmd += "cd " + string(cwd) + ";";
+		uPlotRequest.unsetParam("_CWD");
+	}
+	
+	// Start uPlot
+	if(!GRIB_DEFINITION_PATH_ENV.empty())
+	{
+		cmd+="export GRIB_DEFINITION_PATH=" + GRIB_DEFINITION_PATH_ENV + ";";
+	}
+	cmd+="$metview_command $METVIEW_BIN/uPlot " + string(ftemp) + " $METVIEW_QT_APPLICATION_FLAGS &";
+		
+	system(cmd.c_str());
+#else
+	MvRequest req("DYNSERVICE");
+	req("name") = "uPlot";
+	req("fullname") = "Display Module";
+	long pid = getpid();
+	req("id") = pid;
+	req("cmd") = "env LD_LIBRARY_PATH=$MAGPLUS_HOME/lib:$LD_LIBRARY_PATH $metview_command $METVIEW_BIN/uPlot  -stylesheet $METVIEW_DIR_SHARE/app-defaults/metview.qss -graphicssystem raster";
+
+	req = req + uPlotRequest;
+
+         // Call event to process the request
+        char buf[64];
+	sprintf(buf,"uPlot",pid);
+	// Call uPlot to process the request
+//	( new MvServiceTask (this,"uPlot",req) )->run();
+	uPlotRequest.advance();
+	( new MvServiceTask (this,"uPlot",uPlotRequest) )->run();
+#endif
+
+}
+void
+uPlotService::endOfTask ( MvTask* task )
+{
+cout << " END OF CALLUPLOT " << endl;
+	// If error, send a message and return 
+	if ( task->getError() != 0 )
+	{
+		//int i = 0;
+		//const char* msg = 0;
+		//while ( msg = task->getMessage (i++ ) )
+		
+//		PlotMod::MetviewError ( "uPlot crashed" );
+		cout << "uPlot crashed" << endl;
+	}
+
+	// Retrieve the reply request
+	MvServiceTask* serviceTask = ( MvServiceTask* ) task;
+
+	MvRequest replyRequest = serviceTask->getReply();
+replyRequest.print();
+
+	// Execute the callback procedure
+	// Call uPlot
+//	MvApplication::callService ( "uPlot", replyRequest, 0 );
+}
diff --git a/src/uPlot/uPlotService.hpp b/src/uPlot/uPlotService.hpp
new file mode 100644
index 0000000..7ad8be5
--- /dev/null
+++ b/src/uPlot/uPlotService.hpp
@@ -0,0 +1,91 @@
+//
+// .NAME:	
+//  uPlotService
+//
+// .AUTHOR:
+//  Fernando Ii
+//  (adapted from MagicsService class)
+//     ECMWF, December 2008
+//
+// .SUMMARY:
+//  Describes the uPlotService class, which handles
+//  the communication with uPlot for the purposes of 
+//  execution of tasks. This is a "singleton" class 
+//
+//  uPlotManager calls uPlot for three different reasons:
+//      
+//       - when generating a plot request 
+//  	 - when producing a macro which is able to 
+//         reproduce the contents of the current window
+//       - when zooming a geographical area to generate 
+//  	   a new window with the contents of the current one
+//
+// .CLIENTS:
+//  SuperPage, as called by the main menu (SuperPageWidget)
+//
+// .RESPONSABILITY:
+//  This class will provide support for the communication
+//  with uPlot for the purposes of user interface definitions
+//
+//  The unique object of this class will, on the "Call uPlot"
+//  method :
+//  - stores a copy of a callback procedure to be called
+//    when uPlot returns its actions
+//  - calls uPlot (using the MvServiceTask facilities)
+//
+//  When the "endofTask" function is returned by "event",
+//  the object will perform the callback action stored
+//  in the "Call uPlot" method
+//
+// .COLLABORATORS:
+//  MvServiceTask, uPlot
+//
+// .ASCENDENT:
+//  MvClient
+//
+// .DESCENDENT:
+//  
+//
+// .REFERENCES:
+//  This class is based on the general facilities for
+//  process communication used in METVIEW, especially the
+//  MvClient and MvServiceTask facilities. Please refer
+//  to these classes (or have a chat with Baudoin) for
+//  more information.
+//
+//  This class implements a "singleton" as suggested 
+//  by Myers, "More Effective C+", page 130.
+//  
+
+#ifndef uPlotService_H
+#define uPlotService_H
+#include <MvTask.h>
+
+class uPlotService: public MvClient {
+
+public:
+
+// -- Access to singleton object
+
+	static uPlotService& Instance();
+
+// -- Destructor
+
+	~uPlotService();
+
+// -- Methods
+
+	// Perform actions after receiving response from uPlot
+	virtual void endOfTask ( MvTask* );
+
+	// Call uPlot
+	void  CalluPlot( MvRequest& in, MvRequest& out );
+
+private:
+
+// -- Constructors
+
+	uPlotService();  // no external access point
+
+};
+#endif
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100755
index 0000000..dce7021
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,4 @@
+AUTOMAKE_OPTIONS	= foreign
+SUBDIRS			= . macros
+
+EXTRA_DIST		= data/z500.grb
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..bb3f85e
--- /dev/null
+++ b/test/Makefile.in
@@ -0,0 +1,650 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = . macros
+EXTRA_DIST = data/z500.grb
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/data/z500.grb b/test/data/z500.grb
new file mode 100644
index 0000000..bbeaa88
Binary files /dev/null and b/test/data/z500.grb differ
diff --git a/test/macros/HelloWorld.mv b/test/macros/HelloWorld.mv
new file mode 100644
index 0000000..1f4f22a
--- /dev/null
+++ b/test/macros/HelloWorld.mv
@@ -0,0 +1,20 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+include "set_output.mv"
+
+
+data = read("../data/z500.grb")
+
+set_output("HelloWorld")
+
+plot(data)
diff --git a/test/macros/Makefile.am b/test/macros/Makefile.am
new file mode 100644
index 0000000..277457e
--- /dev/null
+++ b/test/macros/Makefile.am
@@ -0,0 +1,11 @@
+AUTOMAKE_OPTIONS  = foreign
+AM_COLOR_TESTS    = always
+
+TESTS_ENVIRONMENT = ../../metview -b
+TESTS             = HelloWorld.mv layoutx3.mv
+
+if METVIEW_MARS
+TESTS	       += MarsAccess.mv
+endif
+
+EXTRA_DIST = set_output.mv HelloWorld.mv layoutx3.mv MarsAccess.mv
diff --git a/test/macros/Makefile.in b/test/macros/Makefile.in
new file mode 100644
index 0000000..6055813
--- /dev/null
+++ b/test/macros/Makefile.in
@@ -0,0 +1,547 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ at METVIEW_MARS_TRUE@am__append_1 = MarsAccess.mv
+subdir = test/macros
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/aux_build/autotroll.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/metview_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXX = @AXX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPLIBS = @CPPLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBMLIB = @DBMLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMOS_LIB_NAME = @EMOS_LIB_NAME@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FDBLIB = @FDBLIB@
+FFIXED_FLAGS = @FFIXED_FLAGS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLIBS = @FLIBS@
+GREP = @GREP@
+GRIBAPI_LIBS = @GRIBAPI_LIBS@
+GRIB_API_INC = @GRIB_API_INC@
+GRIB_API_LIB = @GRIB_API_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_INLINE = @LDFLAGS_INLINE@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBNAME = @LIBNAME@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGICS_CFLAGS = @MAGICS_CFLAGS@
+MAGICS_LIBS = @MAGICS_LIBS@
+MAGPLUS_CPPFLAGS = @MAGPLUS_CPPFLAGS@
+MAGPLUS_HOME = @MAGPLUS_HOME@
+MAGPLUS_LDFLAGS = @MAGPLUS_LDFLAGS@
+MAGPLUS_LIB = @MAGPLUS_LIB@
+MAGPLUS_LIBDIR = @MAGPLUS_LIBDIR@
+MAKEINFO = @MAKEINFO@
+MARS_ACCESS = @MARS_ACCESS@
+MARS_ODB_ACCESS = @MARS_ODB_ACCESS@
+METVIEW_3RDPARTY_INCLUDE = @METVIEW_3RDPARTY_INCLUDE@
+METVIEW_3RDPARTY_LIBS = @METVIEW_3RDPARTY_LIBS@
+METVIEW_EXTRA_TITLE = @METVIEW_EXTRA_TITLE@
+METVIEW_GRIBAPI_MIN_VERSION = @METVIEW_GRIBAPI_MIN_VERSION@
+METVIEW_MAGICS_MIN_VERSION = @METVIEW_MAGICS_MIN_VERSION@
+METVIEW_NETCDF_FLAGS = @METVIEW_NETCDF_FLAGS@
+METVIEW_NETCDF_LIB = @METVIEW_NETCDF_LIB@
+METVIEW_PACKAGE_NAME = @METVIEW_PACKAGE_NAME@
+METVIEW_PACKAGE_RELEASE_DATE = @METVIEW_PACKAGE_RELEASE_DATE@
+METVIEW_PACKAGE_VERSION = @METVIEW_PACKAGE_VERSION@
+METVIEW_UTIL_LIB = @METVIEW_UTIL_LIB@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MVINCLUDE = @MVINCLUDE@
+MVSTARTDIR = @MVSTARTDIR@
+MV_EMOSLIB = @MV_EMOSLIB@
+MV_ENVIRON = @MV_ENVIRON@
+MV_MOTIF_FLAGS = @MV_MOTIF_FLAGS@
+MV_MOTIF_UTIL_LIB = @MV_MOTIF_UTIL_LIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ODB1_BIN = @ODB1_BIN@
+ODB1_USE_SCRIPT = @ODB1_USE_SCRIPT@
+ODB1_VERSION = @ODB1_VERSION@
+ODB_CPPFLAGS = @ODB_CPPFLAGS@
+ODB_LDFLAGS = @ODB_LDFLAGS@
+ODB_LIBDIR = @ODB_LIBDIR@
+ODB_LIBS = @ODB_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@
+PKG_CONFIG = @PKG_CONFIG@
+PROJ4_LIBS = @PROJ4_LIBS@
+QMAKE = @QMAKE@
+QT_CFLAGS = @QT_CFLAGS@
+QT_CPPFLAGS = @QT_CPPFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_DEFINES = @QT_DEFINES@
+QT_INCPATH = @QT_INCPATH@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LFLAGS = @QT_LFLAGS@
+QT_LIBS = @QT_LIBS@
+QT_PATH = @QT_PATH@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SITE_NAME = @SITE_NAME@
+SITE_WMO_CODE = @SITE_WMO_CODE@
+STANDARD_METVIEW_LIBS = @STANDARD_METVIEW_LIBS@
+STANDARD_METVIEW_LIBS_NO_UTIL = @STANDARD_METVIEW_LIBS_NO_UTIL@
+STARTUP_SCRIPT = @STARTUP_SCRIPT@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign
+AM_COLOR_TESTS = always
+TESTS_ENVIRONMENT = ../../metview -b
+TESTS = HelloWorld.mv layoutx3.mv $(am__append_1)
+EXTRA_DIST = set_output.mv HelloWorld.mv layoutx3.mv MarsAccess.mv
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/macros/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign test/macros/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
+	  done; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
+	    else \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
+	    else \
+	      skipped="($$skip tests were not run)"; \
+	    fi; \
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    echo "$$grn$$dashes"; \
+	  else \
+	    echo "$$red$$dashes"; \
+	  fi; \
+	  echo "$$banner"; \
+	  test -z "$$skipped" || echo "$$skipped"; \
+	  test -z "$$report" || echo "$$report"; \
+	  echo "$$dashes$$std"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-TESTS check-am clean clean-generic \
+	clean-libtool distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/macros/MarsAccess.mv b/test/macros/MarsAccess.mv
new file mode 100644
index 0000000..96aff32
--- /dev/null
+++ b/test/macros/MarsAccess.mv
@@ -0,0 +1,19 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+data = retrieve (date: -3)
+
+if (data <> nil) then
+    print ('Retrieved ', count(data), ' fields.')
+else
+    fail ('Failed to retrieve data.')
+end if
diff --git a/test/macros/layoutx3.mv b/test/macros/layoutx3.mv
new file mode 100644
index 0000000..96fe937
--- /dev/null
+++ b/test/macros/layoutx3.mv
@@ -0,0 +1,61 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+include "set_output.mv"
+
+
+data = read("../data/z500.grb")
+
+set_output("layoutx3")
+
+
+map_view = mapview
+(
+    area               : [-70,-180,90,180],
+    subpage_y_position : 40,
+    subpage_y_length   : 50,
+    page_frame         : "off"
+)
+
+
+page = plot_page
+(
+    bottom : 50,
+    left   : 25,
+    view   : map_view
+)
+
+
+page_1 = plot_page
+(
+    top    : 50,
+    right  : 50,
+    view   : map_view
+)
+
+page_2 = plot_page
+ (
+    top   : 50,
+    left  : 50,
+    view  : map_view
+)
+
+
+dw = plot_superpage
+(
+    pages : [page,page_1,page_2]
+)
+
+
+plot (dw[1], data)
+plot (dw[2], data*10)
+plot (dw[3], data*20)
diff --git a/test/macros/set_output.mv b/test/macros/set_output.mv
new file mode 100644
index 0000000..c15c867
--- /dev/null
+++ b/test/macros/set_output.mv
@@ -0,0 +1,50 @@
+# Metview Macro
+
+# **************************** LICENSE START ***********************************
+#
+# Copyright 2012 ECMWF. This software is distributed under the terms
+# of the Apache License version 2.0. In applying this license, ECMWF does not
+# waive the privileges and immunities granted to it by virtue of its status as
+# an Intergovernmental Organization or submit itself to any jurisdiction.
+#
+# ***************************** LICENSE END ************************************
+
+
+function set_output(name)
+ mode = runmode()
+
+ if mode = "batch" then 
+
+     out = ps_output(
+      output_name : name,
+      output_ps_scale : 0.5,
+      OUTPUT_PS_COLOUR_MODEL : "RGB"
+     )
+     svg = svg_output(
+      output_name : name
+     )
+     setoutput(out, svg)
+
+ else if mode = "save" then 
+ 
+     out = pdf_output(
+      output_name :  name
+     )
+     setoutput(out)
+
+  else if mode = "execute" then 
+ 
+     out = png_output(
+      output_name     :   name
+     )
+     setoutput(out)
+
+ else if mode = "visualise" then 
+     out = output(format :"screen")
+ #    setoutput(out) 
+
+ else
+     fail("run mode not authorized - batch or visualise only")
+ end if
+ 
+end set_output
diff --git a/version.sh b/version.sh
new file mode 100644
index 0000000..1263910
--- /dev/null
+++ b/version.sh
@@ -0,0 +1,25 @@
+#
+# Package name and versioning information for Metview
+#
+METVIEW_PACKAGE_NAME='Metview'
+METVIEW_PACKAGE_VERSION_MAJOR='4'
+METVIEW_PACKAGE_VERSION_MINOR='3'
+METVIEW_PACKAGE_VERSION_REVISION='11'
+METVIEW_PACKAGE_VERSION_LABEL=''
+
+METVIEW_MAGICS_MIN_VERSION='2.18.12'
+METVIEW_GRIBAPI_MIN_VERSION='1.9.8'
+
+# for METVIEW_PACKAGE_VERSION, add a '-' before the label string
+
+if test "x$METVIEW_PACKAGE_VERSION_LABEL" != x; then
+  METVIEW_PACKAGE_VERSION_LABEL_STRING="-${METVIEW_PACKAGE_VERSION_LABEL}"
+else
+  METVIEW_PACKAGE_VERSION_LABEL_STRING=""
+fi
+
+
+METVIEW_PACKAGE_VERSION=${METVIEW_PACKAGE_VERSION_MAJOR}.${METVIEW_PACKAGE_VERSION_MINOR}.${METVIEW_PACKAGE_VERSION_REVISION}${METVIEW_PACKAGE_VERSION_LABEL_STRING}
+METVIEW_PACKAGE_COPYRIGHT_YEAR='2013'
+METVIEW_PACKAGE_COPYRIGHT_PERIOD='1990-2013'
+METVIEW_PACKAGE_RELEASE_DATE=`date +%d-%B-%Y`

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/metview.git



More information about the debian-science-commits mailing list